Skip to content

Commit

Permalink
feat: add rock-3ab-max98357a
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeChenL committed Dec 11, 2024
1 parent ed16941 commit d8f0805
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 0 deletions.
1 change: 1 addition & 0 deletions arch/arm64/boot/dts/rockchip/overlays/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@ dtb-$(CONFIG_CLK_RK3568) += \
rock-3a-sata2.dtbo \
rock-3a-v12-radxa-25w-poe.dtbo \
rock-3a-raspberrypi-7inch-touchscreen.dtbo \
rock-3ab-max98357a.dtbo \
rock-3ab-okdo-5mp-camera.dtbo \
rock-3ab-rpi-camera-v1p3-ov5647.dtbo \
rock-3ab-rpi-camera-v2-imx219.dtbo \
Expand Down
50 changes: 50 additions & 0 deletions arch/arm64/boot/dts/rockchip/overlays/rock-3ab-max98357a.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
/dts-v1/;
/plugin/;

#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/pinctrl/rockchip.h>

/ {
metadata {
title = "Enable MAX97357A on I2S3-M0";
compatible = "radxa,rock-3a", "radxa,rock-3b";
category = "audio";
description = "Enable MAX97357A on I2S3-M0";
exclusive = "GPIO3_A0", "GPIO3_A3", "GPIO3_A4", "GPIO3_A5", "GPIO3_A6", "i2s3_2ch";
};
};

&{/} {
max98357a_codec: max98357a {
#sound-dai-cells = <0>;
compatible = "maxim,max98357a";
sdmode-gpios = <&gpio3 RK_PA0 GPIO_ACTIVE_HIGH>;
sdmode-delay = <5>;
status = "okay";
};

sound_ext_card: sound-ext-card {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
compatible = "simple-audio-card";
simple-audio-card,format = "i2s";
simple-audio-card,mclk-fs = <256>;
simple-audio-card,name = "snd_max98357a_dac";
simple-audio-card,dai-link@0 {
reg = <0>;
format = "i2s";
cpu {
sound-dai = <&i2s3_2ch>;
};
codec {
sound-dai = <&max98357a_codec>;
};
};
};
};

&i2s3_2ch {
pinctrl-0 = <&i2s3m0_lrck &i2s3m0_sclk &i2s3m0_sdi &i2s3m0_sdo>;
status = "okay";
};

0 comments on commit d8f0805

Please sign in to comment.