arm64: dts: rockchip: Enable analog sound on RK3576 EVB1

Rockchip RK3576 EVB1 board uses the typical configuration with an ES8388
analog codec driven from built-in SAI I2S.

Add device tree nodes for it.

Signed-off-by: Alexey Charkov <alchark@gmail.com>
Link: https://patch.msgid.link/20251229-rk3576-sound-v1-7-2f59ef0d19b1@gmail.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
This commit is contained in:
Alexey Charkov 2025-12-29 14:12:04 +04:00 committed by Heiko Stuebner
parent f5c9549964
commit d8872b9dd9

View File

@ -246,6 +246,63 @@ vcc_wifi_reg_on: regulator-wifi-reg-on {
regulator-max-microvolt = <1800000>;
vin-supply = <&vcc_1v8_s3>;
};
sound {
compatible = "simple-audio-card";
pinctrl-names = "default";
pinctrl-0 = <&hp_det>;
simple-audio-card,name = "On-board Analog ES8388";
simple-audio-card,aux-devs = <&hp_power>, <&spk_power>;
simple-audio-card,bitclock-master = <&masterdai>;
simple-audio-card,format = "i2s";
simple-audio-card,frame-master = <&masterdai>;
simple-audio-card,hp-det-gpios = <&gpio0 RK_PD3 GPIO_ACTIVE_LOW>;
simple-audio-card,mclk-fs = <256>;
simple-audio-card,routing =
"Headphone Power INL", "LOUT1",
"Headphone Power INR", "ROUT1",
"Speaker Power INL", "LOUT2",
"Speaker Power INR", "ROUT2",
"Headphones", "Headphone Power OUTL",
"Headphones", "Headphone Power OUTR",
"Speaker", "Speaker Power OUTL",
"Speaker", "Speaker Power OUTR",
"LINPUT1", "Main Mic",
"LINPUT2", "Main Mic",
"RINPUT1", "Headset Mic",
"RINPUT2", "Headset Mic";
simple-audio-card,widgets =
"Microphone", "Main Mic",
"Microphone", "Headset Mic",
"Headphone", "Headphones",
"Speaker", "Speaker";
simple-audio-card,cpu {
sound-dai = <&sai1>;
};
masterdai: simple-audio-card,codec {
sound-dai = <&es8388>;
system-clock-frequency = <12288000>;
};
};
hp_power: headphone-amplifier {
compatible = "simple-audio-amplifier";
enable-gpios = <&gpio3 RK_PD6 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&hp_ctl>;
sound-name-prefix = "Headphone Power";
};
spk_power: speaker-amplifier {
compatible = "simple-audio-amplifier";
enable-gpios = <&gpio2 RK_PB1 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&spk_ctl>;
sound-name-prefix = "Speaker Power";
VCC-supply = <&vcc5v0_device>;
};
};
&cpu_l0 {
@ -712,6 +769,25 @@ hym8563: rtc@51 {
};
};
&i2c3 {
status = "okay";
es8388: audio-codec@10 {
compatible = "everest,es8388", "everest,es8328";
reg = <0x10>;
AVDD-supply = <&vcca_3v3_s0>;
DVDD-supply = <&vcc_1v8_s0>;
HPVDD-supply = <&vcca_3v3_s0>;
PVDD-supply = <&vcc_1v8_s0>;
assigned-clocks = <&cru CLK_SAI1_MCLKOUT_TO_IO>;
assigned-clock-rates = <12288000>;
clocks = <&cru CLK_SAI1_MCLKOUT_TO_IO>;
pinctrl-names = "default";
pinctrl-0 = <&sai1m0_mclk>;
#sound-dai-cells = <0>;
};
};
&mdio0 {
rgmii_phy0: ethernet-phy@1 {
compatible = "ethernet-phy-id001c.c916";
@ -778,6 +854,20 @@ &pcie1 {
};
&pinctrl {
audio {
hp_det: hp-det {
rockchip,pins = <0 RK_PD3 RK_FUNC_GPIO &pcfg_pull_up>;
};
hp_ctl: hp-ctl {
rockchip,pins = <3 RK_PD6 RK_FUNC_GPIO &pcfg_pull_down>;
};
spk_ctl: spk-ctl {
rockchip,pins = <2 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
bluetooth {
bt_reg_on: bt-reg-on {
rockchip,pins = <1 RK_PC7 RK_FUNC_GPIO &pcfg_pull_up>;
@ -839,6 +929,15 @@ wifi_wake_host: wifi-wake-host {
};
};
&sai1 {
pinctrl-names = "default";
pinctrl-0 = <&sai1m0_lrck
&sai1m0_sclk
&sai1m0_sdi0
&sai1m0_sdo0>;
status = "okay";
};
&sai6 {
status = "okay";
};