Skip to content

Commit 0bd475d

Browse files
xdarklightsuperna9999
authored andcommitted
ARM: dts: meson8b: ec100: wire up the RT5640 audio codec
The Realtek RT5640 codec is connected to the SoC's I2S interface. Describe this in the .dts together with the codec's LDO1 enable GPIO so audio can be played on the Endless Mini. While here, add a note about the realtek,ldo1-en-gpios for which the EC100 uses GPIO_BSD_EN. Due to driver limitations this pin cannot be used currently. Signed-off-by: Martin Blumenstingl <[email protected]> Reviewed-by: Neil Armstrong <[email protected]> Signed-off-by: Neil Armstrong <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 4f8ca13 commit 0bd475d

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

arch/arm/boot/dts/meson8b-ec100.dts

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,32 @@
9696
#clock-cells = <0>;
9797
};
9898

99+
sound {
100+
compatible = "amlogic,gx-sound-card";
101+
model = "M8B-EC100";
102+
103+
assigned-clocks = <&clkc CLKID_MPLL0>,
104+
<&clkc CLKID_MPLL1>,
105+
<&clkc CLKID_MPLL2>;
106+
assigned-clock-rates = <270950400>,
107+
<294912000>,
108+
<393216000>;
109+
110+
dai-link-0 {
111+
sound-dai = <&aiu AIU_CPU CPU_I2S_FIFO>;
112+
};
113+
114+
dai-link-1 {
115+
sound-dai = <&aiu AIU_CPU CPU_I2S_ENCODER>;
116+
dai-format = "i2s";
117+
mclk-fs = <256>;
118+
119+
codec-0 {
120+
sound-dai = <&rt5640>;
121+
};
122+
};
123+
};
124+
99125
usb_vbus: regulator-usb-vbus {
100126
/*
101127
* Silergy SY6288CCAC-GP 2A Power Distribution Switch.
@@ -242,6 +268,14 @@
242268
};
243269
};
244270

271+
&aiu {
272+
status = "okay";
273+
274+
pinctrl-0 = <&i2s_am_clk_pins>, <&i2s_out_ao_clk_pins>,
275+
<&i2s_out_lr_clk_pins>, <&i2s_out_ch01_ao_pins>;
276+
pinctrl-names = "default";
277+
};
278+
245279
&cpu0 {
246280
cpu-supply = <&vcck>;
247281
};
@@ -283,9 +317,19 @@
283317

284318
rt5640: codec@1c {
285319
compatible = "realtek,rt5640";
320+
286321
reg = <0x1c>;
322+
323+
#sound-dai-cells = <0>;
324+
287325
interrupt-parent = <&gpio_intc>;
288326
interrupts = <13 IRQ_TYPE_EDGE_BOTH>; /* GPIOAO_13 */
327+
328+
/*
329+
* TODO: realtek,ldo1-en-gpios is connected to GPIO_BSD_EN.
330+
* We currently cannot configure this pin correctly.
331+
* Luckily for us it's in the "right" state by default.
332+
*/
289333
realtek,in1-differential;
290334
};
291335
};

0 commit comments

Comments
 (0)