diff --git a/arch/arm64/boot/dts/rockchip/overlays/Makefile b/arch/arm64/boot/dts/rockchip/overlays/Makefile index b07e6d98..0f87a4a7 100644 --- a/arch/arm64/boot/dts/rockchip/overlays/Makefile +++ b/arch/arm64/boot/dts/rockchip/overlays/Makefile @@ -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 \ diff --git a/arch/arm64/boot/dts/rockchip/overlays/rock-3ab-max98357a.dts b/arch/arm64/boot/dts/rockchip/overlays/rock-3ab-max98357a.dts new file mode 100644 index 00000000..2fe027e3 --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/overlays/rock-3ab-max98357a.dts @@ -0,0 +1,47 @@ +/dts-v1/; +/plugin/; + +/ { + 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_A2", "GPIO3_A3", "GPIO3_A4", "GPIO3_A5", "GPIO3_A6", "i2s3_2ch"; + }; +}; + +&{/} { + max98357a_codec: max98357a { + #sound-dai-cells = <0>; + compatible = "maxim,max98357a"; + sdmode-gpios = <&gpio3 0 0>; + 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"; +};