Skip to content

Commit

Permalink
HACK: panda-es: S/PDIF support
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@gmail.com>
  • Loading branch information
ujfalusi committed Jul 4, 2021
1 parent 32762f3 commit 2f0a632
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 27 deletions.
21 changes: 0 additions & 21 deletions arch/arm/boot/dts/omap4-panda-common.dtsi
Expand Up @@ -62,21 +62,6 @@
};
};

gpio_keys: gpio_keys {
compatible = "gpio-keys";
pinctrl-names = "default";
pinctrl-0 = <
&button_pins
>;

buttonS2 {
label = "button S2";
gpios = <&gpio4 25 GPIO_ACTIVE_LOW>; /* gpio_121 */
linux,code = <BTN_0>;
wakeup-source;
};
};

sound: sound {
compatible = "ti,abe-twl6040";
ti,model = "PandaBoard";
Expand Down Expand Up @@ -381,12 +366,6 @@
OMAP4_IOPAD(0x152, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc5_dat3.sdmmc5_dat3 */
>;
};

button_pins: pinmux_button_pins {
pinctrl-single,pins = <
OMAP4_IOPAD(0x114, PIN_INPUT_PULLUP | MUX_MODE3) /* gpio_121 */
>;
};
};

&omap4_pmx_wkup {
Expand Down
51 changes: 45 additions & 6 deletions arch/arm/boot/dts/omap4-panda-es.dts
Expand Up @@ -6,10 +6,41 @@

#include "omap4460.dtsi"
#include "omap4-panda-common.dtsi"
#include <dt-bindings/sound/ti-mcasp.h>

/ {
model = "TI OMAP4 PandaBoard-ES";
compatible = "ti,omap4-panda-es", "ti,omap4-panda", "ti,omap4460", "ti,omap4430", "ti,omap4";

dummy_codec0: dummy_codec@0 {
compatible = "linux,snd-soc-dummy";
#sound-dai-cells = <0>;
};

spdif_out: spdif-out {
#sound-dai-cells = <0>;
compatible = "linux,spdif-dit";
};

sound3: sound@3 {
compatible = "simple-audio-card";
simple-audio-card,name = "omap4-spdif";
simple-audio-card,format = "dsp_b";
simple-audio-card,bitclock-master = <&sound3_master>;
simple-audio-card,frame-master = <&sound3_master>;

status = "okay";

sound3_master: simple-audio-card,cpu {
sound-dai = <&mcasp0>;
clocks = <&abe_clkctrl OMAP4_MCASP_CLKCTRL 0>;
system-clock-id = <MCASP_CLK_HCLK_AUXCLK>;
};

simple-audio-card,codec {
sound-dai = <&spdif_out>;
};
};
};

/* Audio routing is differnet between PandaBoard4430 and PandaBoardES */
Expand Down Expand Up @@ -65,6 +96,12 @@
OMAP4_IOPAD(0x11e, PIN_OUTPUT | MUX_MODE0) /* uart2_tx.uart2_tx */
>;
};

mcasp_pins: mcasp_pins {
pinctrl-single,pins = <
OMAP4_IOPAD(0x114, PIN_OUTPUT | MUX_MODE2) /* abe_dmic_din2.abe_mcasp_axr */
>;
};
};

&led_wkgpio_pins {
Expand All @@ -87,12 +124,6 @@
};
};

&gpio_keys {
buttonS2 {
gpios = <&gpio4 17 GPIO_ACTIVE_LOW>; /* gpio_113 */
};
};

&gpio1_target {
ti,no-reset-on-init;
};
Expand All @@ -112,3 +143,11 @@
enable-gpios = <&gpio2 14 GPIO_ACTIVE_HIGH>; /* GPIO_46 */
};
};

&mcasp0 {
#sound-dai-cells = <0>;
status = "okay";

pinctrl-0 = <&mcasp_pins>;
pinctrl-names = "default";
};

0 comments on commit 2f0a632

Please sign in to comment.