From 2f0a632db0b52321f1fc3623d088a741aeb72ef7 Mon Sep 17 00:00:00 2001 From: Peter Ujfalusi Date: Sun, 4 Jul 2021 16:28:16 +0300 Subject: [PATCH] HACK: panda-es: S/PDIF support Signed-off-by: Peter Ujfalusi --- arch/arm/boot/dts/omap4-panda-common.dtsi | 21 ---------- arch/arm/boot/dts/omap4-panda-es.dts | 51 ++++++++++++++++++++--- 2 files changed, 45 insertions(+), 27 deletions(-) diff --git a/arch/arm/boot/dts/omap4-panda-common.dtsi b/arch/arm/boot/dts/omap4-panda-common.dtsi index 609a8dea946b3..78a45a2573b44 100644 --- a/arch/arm/boot/dts/omap4-panda-common.dtsi +++ b/arch/arm/boot/dts/omap4-panda-common.dtsi @@ -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 = ; - wakeup-source; - }; - }; - sound: sound { compatible = "ti,abe-twl6040"; ti,model = "PandaBoard"; @@ -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 { diff --git a/arch/arm/boot/dts/omap4-panda-es.dts b/arch/arm/boot/dts/omap4-panda-es.dts index 7c6886cd738f0..e4e8b100d02ae 100644 --- a/arch/arm/boot/dts/omap4-panda-es.dts +++ b/arch/arm/boot/dts/omap4-panda-es.dts @@ -6,10 +6,41 @@ #include "omap4460.dtsi" #include "omap4-panda-common.dtsi" +#include / { 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 = ; + }; + + simple-audio-card,codec { + sound-dai = <&spdif_out>; + }; + }; }; /* Audio routing is differnet between PandaBoard4430 and PandaBoardES */ @@ -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 { @@ -87,12 +124,6 @@ }; }; -&gpio_keys { - buttonS2 { - gpios = <&gpio4 17 GPIO_ACTIVE_LOW>; /* gpio_113 */ - }; -}; - &gpio1_target { ti,no-reset-on-init; }; @@ -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"; +};