]> www.infradead.org Git - linux.git/commitdiff
arm64: dts: rockchip: Enable RK809 audio codec for Radxa ROCK 4C+
authorJonathan Liu <net147@gmail.com>
Wed, 28 Aug 2024 07:47:53 +0000 (17:47 +1000)
committerHeiko Stuebner <heiko@sntech.de>
Wed, 28 Aug 2024 12:49:45 +0000 (14:49 +0200)
This adds the necessary device tree changes to enable analog audio
output for the 3.5 mm TRS headphone jack on the Radxa ROCK 4C+ with
its RK809 audio codec.

Signed-off-by: Jonathan Liu <net147@gmail.com>
Link: https://lore.kernel.org/r/20240828074755.1320692-1-net147@gmail.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
arch/arm64/boot/dts/rockchip/rk3399-rock-4c-plus.dts

index d4b4dced3e39e4a3fba081b28d0222ceeb24cbda..475d57f64d58f545504fd3860f4e70d140607011 100644 (file)
                };
        };
 
+       rk809-sound {
+               compatible = "simple-audio-card";
+               simple-audio-card,format = "i2s";
+               simple-audio-card,name = "Analog RK809";
+               simple-audio-card,mclk-fs = <256>;
+
+               simple-audio-card,cpu {
+                       sound-dai = <&i2s0>;
+               };
+
+               simple-audio-card,codec {
+                       sound-dai = <&rk809>;
+               };
+       };
+
        sdio_pwrseq: sdio-pwrseq {
                compatible = "mmc-pwrseq-simple";
                clocks = <&rk809 1>;
                interrupt-parent = <&gpio1>;
                interrupts = <RK_PC5 IRQ_TYPE_LEVEL_LOW>;
                #clock-cells = <1>;
+               clock-names = "mclk";
+               clocks = <&cru SCLK_I2S_8CH_OUT>;
                clock-output-names = "rk808-clkout1", "rk808-clkout2";
                pinctrl-names = "default";
-               pinctrl-0 = <&pmic_int_l>;
+               pinctrl-0 = <&pmic_int_l>, <&i2s_8ch_mclk>;
                rockchip,system-power-controller;
+               #sound-dai-cells = <0>;
                wakeup-source;
 
                vcc1-supply = <&vcc5v0_sys>;
        status = "okay";
 };
 
+&i2s0 {
+       status = "okay";
+};
+
+&i2s0_8ch_bus {
+       rockchip,pins =
+               <3 RK_PD0 1 &pcfg_pull_none>,
+               <3 RK_PD2 1 &pcfg_pull_none>,
+               <3 RK_PD3 1 &pcfg_pull_none>,
+               <3 RK_PD7 1 &pcfg_pull_none>;
+};
+
+&i2s0_8ch_bus_bclk_off {
+       rockchip,pins =
+               <3 RK_PD0 RK_FUNC_GPIO &pcfg_pull_none>,
+               <3 RK_PD2 1 &pcfg_pull_none>,
+               <3 RK_PD3 1 &pcfg_pull_none>,
+               <3 RK_PD7 1 &pcfg_pull_none>;
+};
+
 &i2s2 {
        status = "okay";
 };
                };
        };
 
+       i2s0 {
+               i2s_8ch_mclk: i2s-8ch-mclk {
+                       rockchip,pins = <4 RK_PA0 1 &pcfg_pull_none>;
+               };
+       };
+
        leds {
                user_led1: user-led1 {
                        rockchip,pins = <3 RK_PD4 RK_FUNC_GPIO &pcfg_pull_none>;