Skip to content

Commit 55529fe

Browse files
cristiccmmind
authored andcommitted
arm64: dts: rockchip: Add rk3588-rock-5b analog audio
Add the necessary DT nodes for the Rock 5B board to enable the analog audio support provided by the Everest Semi ES8316 codec. Signed-off-by: Cristian Ciocaltea <[email protected]> Reviewed-by: Christopher Obbard <[email protected]> Link: https://lore.kernel.org/r/[email protected] [adapted to the fan addition I applied slightly earlier] Signed-off-by: Heiko Stuebner <[email protected]>
1 parent 6f48c6f commit 55529fe

File tree

1 file changed

+60
-0
lines changed

1 file changed

+60
-0
lines changed

arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
/dts-v1/;
44

5+
#include <dt-bindings/gpio/gpio.h>
56
#include "rk3588.dtsi"
67

78
/ {
@@ -25,6 +26,23 @@
2526
#cooling-cells = <2>;
2627
};
2728

29+
sound {
30+
compatible = "audio-graph-card";
31+
label = "Analog";
32+
33+
widgets = "Microphone", "Mic Jack",
34+
"Headphone", "Headphones";
35+
36+
routing = "MIC2", "Mic Jack",
37+
"Headphones", "HPOL",
38+
"Headphones", "HPOR";
39+
40+
dais = <&i2s0_8ch_p0>;
41+
hp-det-gpio = <&gpio1 RK_PD5 GPIO_ACTIVE_HIGH>;
42+
pinctrl-names = "default";
43+
pinctrl-0 = <&hp_detect>;
44+
};
45+
2846
vcc5v0_sys: vcc5v0-sys-regulator {
2947
compatible = "regulator-fixed";
3048
regulator-name = "vcc5v0_sys";
@@ -52,12 +70,54 @@
5270
};
5371
};
5472

73+
&i2c7 {
74+
status = "okay";
75+
76+
es8316: es8316@11 {
77+
compatible = "everest,es8316";
78+
reg = <0x11>;
79+
clocks = <&cru I2S0_8CH_MCLKOUT>;
80+
clock-names = "mclk";
81+
#sound-dai-cells = <0>;
82+
83+
port {
84+
es8316_p0_0: endpoint {
85+
remote-endpoint = <&i2s0_8ch_p0_0>;
86+
};
87+
};
88+
};
89+
};
90+
91+
&i2s0_8ch {
92+
pinctrl-names = "default";
93+
pinctrl-0 = <&i2s0_lrck
94+
&i2s0_mclk
95+
&i2s0_sclk
96+
&i2s0_sdi0
97+
&i2s0_sdo0>;
98+
status = "okay";
99+
100+
i2s0_8ch_p0: port {
101+
i2s0_8ch_p0_0: endpoint {
102+
dai-format = "i2s";
103+
mclk-fs = <256>;
104+
remote-endpoint = <&es8316_p0_0>;
105+
};
106+
};
107+
};
108+
55109
&pinctrl {
56110
hym8563 {
57111
hym8563_int: hym8563-int {
58112
rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
59113
};
60114
};
115+
116+
sound {
117+
hp_detect: hp-detect {
118+
rockchip,pins = <1 RK_PD5 RK_FUNC_GPIO &pcfg_pull_none>;
119+
};
120+
};
61121
};
62122

63123
&pwm1 {

0 commit comments

Comments
 (0)