Skip to content

Commit d1e6f7c

Browse files
lkundrakarndb
authored andcommitted
ARM: dts: mmp2-olpc-xo-1-75: Enable audio support
This enables the audio SRAM, DMA engine, I2S interface, and codec, hooks them together and adds a audio-graph-card instance. It also removes the jack gpios from the gpio-keys instance, because the audio jack driver registers an input device. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Lubomir Rintel <[email protected]> Signed-off-by: Arnd Bergmann <[email protected]>
1 parent 3f23263 commit d1e6f7c

File tree

1 file changed

+47
-18
lines changed

1 file changed

+47
-18
lines changed

arch/arm/boot/dts/mmp2-olpc-xo-1-75.dts

Lines changed: 47 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -57,24 +57,6 @@
5757
linux,code = <SW_TABLET_MODE>;
5858
wakeup-source;
5959
};
60-
61-
microphone_insert {
62-
label = "Microphone Plug";
63-
gpios = <&gpio 96 GPIO_ACTIVE_HIGH>;
64-
linux,input-type = <EV_SW>;
65-
linux,code = <SW_MICROPHONE_INSERT>;
66-
debounce-interval = <100>;
67-
wakeup-source;
68-
};
69-
70-
headphone_insert {
71-
label = "Headphone Plug";
72-
gpios = <&gpio 97 GPIO_ACTIVE_HIGH>;
73-
linux,input-type = <EV_SW>;
74-
linux,code = <SW_HEADPHONE_INSERT>;
75-
debounce-interval = <100>;
76-
wakeup-source;
77-
};
7860
};
7961

8062
i2c {
@@ -123,6 +105,18 @@
123105
reset-gpios = <&gpio 58 GPIO_ACTIVE_HIGH>;
124106
};
125107

108+
sound-card {
109+
compatible = "audio-graph-card";
110+
label = "OLPC XO";
111+
dais = <&sspa0_dai>;
112+
routing = "Headphones", "HPOL",
113+
"Headphones", "HPOR",
114+
"MIC2", "Mic Jack";
115+
widgets = "Headphone", "Headphones", "Microphone", "Mic Jack";
116+
hp-det-gpio = <&gpio 97 GPIO_ACTIVE_HIGH>;
117+
mic-det-gpio = <&gpio 96 GPIO_ACTIVE_HIGH>;
118+
};
119+
126120
soc {
127121
axi@d4200000 {
128122
ap-sp@d4290000 {
@@ -197,6 +191,14 @@
197191
compatible = "realtek,alc5631";
198192
reg = <0x1a>;
199193
status = "okay";
194+
195+
port {
196+
rt5631_0: endpoint {
197+
mclk-fs = <256>;
198+
clocks = <&audio_clk 0>;
199+
remote-endpoint = <&sspa0_0>;
200+
};
201+
};
200202
};
201203
};
202204

@@ -243,3 +245,30 @@
243245
};
244246
};
245247
};
248+
249+
&asram {
250+
status = "okay";
251+
};
252+
253+
&adma0 {
254+
status = "okay";
255+
};
256+
257+
&audio_clk {
258+
status = "okay";
259+
};
260+
261+
&sspa0 {
262+
status = "okay";
263+
dmas = <&adma0 0>, <&adma0 1>;
264+
dma-names = "tx", "rx";
265+
266+
sspa0_dai: port {
267+
sspa0_0: endpoint {
268+
remote-endpoint = <&rt5631_0>;
269+
frame-master;
270+
bitclock-master;
271+
dai-format = "i2s";
272+
};
273+
};
274+
};

0 commit comments

Comments
 (0)