ARM: DTS: am335x/am43xx: Audio support and fixes for audio
Subsystems (3)
v2 cover ARM: DTS: am335x/am43xx: Audio support and fixes for audio
Hi,
Changes since v1:
- Add patch for omap2plus_defconfig to enable needed audio drivers
- Included other board patches since they all need the change in omap2plus_defconfig
Enable the simple card in omap2plus_defconfig as more boards are using that for audio support.
am437x-sk-evm, am335x-evmsk and am335x-evm:
There is no reason to use the davinci-evm machine driver's compatible for audio support since the setup is simple and the common simple-audio-card can handle it just fine.
am43xx-epos-evm, am437x-gp-evm:
Add audio support via simple-card
Regards,
Peter
---
Peter Ujfalusi (20):
ARM: omap2plus_defconfig: Enable audio related config options
ARM: DTS: am437x-sk-evm: Add sleep pin settings for mcasp1
ARM: DTS: am437x-sk-evm: Switch using simple-audio-card for audio
support
ARM: DTS: am43xx-epos-evm: Add gpio-hog for configuring the
display/audio mux
ARM: DTS: am43xx-epos-evm: Add regulator for VBAT and DCDC4 of
tps65218
ARM: DTS: am43xx-epos-evm: McASP1 node for audio support
ARM: DTS: am43xx-epos-evm: Add node for tlv320aic3111 audio codec
ARM: DTS: am43xx-epos-evm: Enable analog audio via simple-card
ARM: DTS: am437x-gp-evm: Add gpio-hog for configuring the
display/audio mux
ARM: DTS: am437x-gp-evm: Rename fixed regulator vmmcsd_fixed to
evm_v3_3d ARM: DTS: am437x-gp-evm: Add node for tlv320aic3106 audio codec
ARM: DTS: am437x-gp-evm: McASP1 node for audio support
ARM: DTS: am437x-gp-evm: Enable analog audio via simple-card
ARM: DTS: am335x-evmsk: Fix mcasp1 node's indentation
ARM: DTS: am335x-evmsk: Add sleep pin settings for mcasp1
ARM: DTS: am335x-evmsk: Switch using simple-audio-card for audio
support
ARM: DTS: am335x-evm: Fix mcasp1 node's indentation
ARM: DTS: am335x-evm: Rename pinctrl section for McASP1
ARM: DTS: am335x-evm: Add sleep pin settings for mcasp1
ARM: DTS: am335x-evm: Switch using simple-audio-card for audio support
arch/arm/boot/dts/am335x-evm.dts | 69 +++++++++++++------ arch/arm/boot/dts/am335x-evmsk.dts | 62 ++++++++++++----- arch/arm/boot/dts/am437x-gp-evm.dts | 108 +++++++++++++++++++++++++---- arch/arm/boot/dts/am437x-sk-evm.dts | 45 +++++++++--- arch/arm/boot/dts/am43x-epos-evm.dts | 130 +++++++++++++++++++++++++++++++---- arch/arm/configs/omap2plus_defconfig | 3 + 6 files changed, 340 insertions(+), 77 deletions(-)
Signature · 1 line
2.4.5
PATCH v2 1/20 ARM: omap2plus_defconfig: Enable audio related config options
More and more boards are moving to have audio support via simple-card. At the same time enable options needed for most am335x and am43xx board for audio support: McASP and TLV320AIC3X codecs.
The later two has been selected by the CONFIG_SND_AM33XX_SOC_EVM option, but the aim is to convert all boards to use simple card.
--- arch/arm/configs/omap2plus_defconfig | 3 +++ 1 file changed, 3 insertions(+)
arch/arm/configs/omap2plus_defconfig +3 -0
@@ -324,10 +324,13 @@ CONFIG_SND_USB_AUDIO=m CONFIG_SND_SOC=m CONFIG_SND_EDMA_SOC=m CONFIG_SND_AM33XX_SOC_EVM=m +CONFIG_SND_DAVINCI_SOC_MCASP=m CONFIG_SND_OMAP_SOC=m CONFIG_SND_OMAP_SOC_OMAP_TWL4030=m CONFIG_SND_OMAP_SOC_OMAP_ABE_TWL6040=m CONFIG_SND_OMAP_SOC_OMAP3_PANDORA=m +CONFIG_SND_SIMPLE_CARD=m +CONFIG_SND_SOC_TLV320AIC3X=m CONFIG_HID_GENERIC=m CONFIG_USB_HIDDEV=y CONFIG_USB_KBD=m
Signature · 1 line
2.4.5
PATCH v2 2/20 ARM: DTS: am437x-sk-evm: Add sleep pin settings for mcasp1
In reply to Peter UjfalusiWhen McASP is not in use the pins can be put to sleep mode to conserve power.
--- arch/arm/boot/dts/am437x-sk-evm.dts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)
arch/arm/boot/dts/am437x-sk-evm.dts +11 -1
@@ -364,6 +364,15 @@ >; }; + mcasp1_pins_sleep: mcasp1_pins_sleep { + pinctrl-single,pins = < + 0x10c (PIN_INPUT_PULLDOWN | MUX_MODE7) + 0x110 (PIN_INPUT_PULLDOWN | MUX_MODE7) + 0x108 (PIN_INPUT_PULLDOWN | MUX_MODE7) + 0x144 (PIN_INPUT_PULLDOWN | MUX_MODE7) + >; + }; + lcd_pins: lcd_pins { pinctrl-single,pins = < 0x1c (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpcm_ad7.gpio1_7 */
@@ -640,8 +649,9 @@ }; &mcasp1 { - pinctrl-names = "default"; + pinctrl-names = "default", "sleep"; pinctrl-0 = <&mcasp1_pins>; + pinctrl-1 = <&mcasp1_pins_sleep>; status = "okay";
Signature · 1 line
2.4.5
PATCH v2 3/20 ARM: DTS: am437x-sk-evm: Switch using simple-audio-card for audio support
In reply to Peter UjfalusiThe sound support consist only Headset output on the board and can be handled by "simple-audio-card".
Also enable the Line-In route as the board has support for it.
--- arch/arm/boot/dts/am437x-sk-evm.dts | 33 +++++++++++++++++++++++++-------- 1 file changed, 25 insertions(+), 8 deletions(-)
arch/arm/boot/dts/am437x-sk-evm.dts +25 -8
@@ -32,14 +32,29 @@ }; sound { - compatible = "ti,da830-evm-audio"; - ti,model = "AM437x-SK-EVM"; - ti,audio-codec = <&tlv320aic3106>; - ti,mcasp-controller = <&mcasp1>; - ti,codec-clock-rate = <24000000>; - ti,audio-routing = - "Headphone Jack", "HPLOUT", - "Headphone Jack", "HPROUT"; + compatible = "simple-audio-card"; + simple-audio-card,name = "AM437x-SK-EVM"; + simple-audio-card,widgets = + "Headphone", "Headphone Jack", + "Line", "Line In"; + simple-audio-card,routing = + "Headphone Jack", "HPLOUT", + "Headphone Jack", "HPROUT", + "LINE1L", "Line In", + "LINE1R", "Line In"; + simple-audio-card,format = "dsp_b"; + simple-audio-card,bitclock-master = <&sound_master>; + simple-audio-card,frame-master = <&sound_master>; + simple-audio-card,bitclock-inversion; + + simple-audio-card,cpu { + sound-dai = <&mcasp1>; + }; + + sound_master: simple-audio-card,codec { + sound-dai = <&tlv320aic3106>; + system-clock-frequency = <24000000>; + }; }; matrix_keypad: matrix_keypad at 0 {
@@ -489,6 +504,7 @@ }; tlv320aic3106: tlv320aic3106 at 1b { + #sound-dai-cells = <0>; compatible = "ti,tlv320aic3106"; reg = <0x1b>; status = "okay";
@@ -649,6 +665,7 @@ }; &mcasp1 { + #sound-dai-cells = <0>; pinctrl-names = "default", "sleep"; pinctrl-0 = <&mcasp1_pins>; pinctrl-1 = <&mcasp1_pins_sleep>;
Signature · 1 line
2.4.5
PATCH v2 4/20 ARM: DTS: am43xx-epos-evm: Add gpio-hog for configuring the display/audio mux
In reply to Peter UjfalusiGPIO2_1 is used as a mux switch between LCD and HDMI displays. This mux affects audio routing as well since in LCD mode HDMI audio is not possible and when HDMI is selected analog audio is not working.
--- arch/arm/boot/dts/am43x-epos-evm.dts | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-)
arch/arm/boot/dts/am43x-epos-evm.dts +15 -12
@@ -35,17 +35,6 @@ compatible = "osddisplays,osd057T0559-34ts", "panel-dpi"; label = "lcd"; - pinctrl-names = "default"; - pinctrl-0 = <&lcd_pins>; - - /* - * SelLCDorHDMI, LOW to select HDMI. This is not really the - * panel's enable GPIO, but we don't have HDMI driver support nor - * support to switch between two displays, so using this gpio as - * panel's enable should be safe. - */ - enable-gpios = <&gpio2 1 GPIO_ACTIVE_HIGH>; - panel-timing { clock-frequency = <33000000>; hactive = <800>;
@@ -278,7 +267,7 @@ >; }; - lcd_pins: lcd_pins { + display_mux_pins: display_mux_pins { pinctrl-single,pins = < /* GPMC CLK -> GPIO 2_1 to select LCD / HDMI */ 0x08C (PIN_OUTPUT_PULLUP | MUX_MODE7)
@@ -458,7 +447,21 @@ }; &gpio2 { + pinctrl-names = "default"; + pinctrl-0 = <&display_mux_pins>; status = "okay"; + + p1 { + /* + * SelLCDorHDMI selects between display and audio paths: + * Low: HDMI display with audio via HDMI + * High: LCD display with analog audio via aic3111 codec + */ + gpio-hog; + gpios = <1 GPIO_ACTIVE_HIGH>; + output-high; + line-name = "SelLCDorHDMI"; + }; }; &gpio3 {
Signature · 1 line
2.4.5
PATCH v2 5/20 ARM: DTS: am43xx-epos-evm: Add regulator for VBAT and DCDC4 of tps65218
In reply to Peter UjfalusiThe VBAT and DCDC4 regulator is needed for audio support (tlv320aic3111)
--- arch/arm/boot/dts/am43x-epos-evm.dts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)
arch/arm/boot/dts/am43x-epos-evm.dts +17 -0
@@ -31,6 +31,14 @@ enable-active-high; }; + vbat: fixedregulator at 0 { + compatible = "regulator-fixed"; + regulator-name = "vbat"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + regulator-boot-on; + }; + lcd0: display { compatible = "osddisplays,osd057T0559-34ts", "panel-dpi"; label = "lcd";
@@ -388,6 +396,15 @@ regulator-always-on; }; + dcdc4: regulator-dcdc4 { + compatible = "ti,tps65218-dcdc4"; + regulator-name = "vdcdc4"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-boot-on; + regulator-always-on; + }; + dcdc5: regulator-dcdc5 { compatible = "ti,tps65218-dcdc5"; regulator-name = "v1_0bat";
Signature · 1 line
2.4.5
PATCH v2 6/20 ARM: DTS: am43xx-epos-evm: McASP1 node for audio support
In reply to Peter UjfalusiAdd node for McASP1 along with the needed pinctrl entries.
--- arch/arm/boot/dts/am43x-epos-evm.dts | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+)
arch/arm/boot/dts/am43x-epos-evm.dts +35 -0
@@ -317,6 +317,24 @@ 0x204 (DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7) >; }; + + mcasp1_pins: mcasp1_pins { + pinctrl-single,pins = < + 0x1a0 (PIN_INPUT_PULLDOWN | MUX_MODE3) /* MCASP0_ACLKR/MCASP1_ACLKX */ + 0x1a4 (PIN_INPUT_PULLDOWN | MUX_MODE3) /* MCASP0_FSR/MCASP1_FSX */ + 0x1a8 (PIN_OUTPUT_PULLDOWN | MUX_MODE3)/* MCASP0_AXR1/MCASP1_AXR0 */ + 0x1ac (PIN_INPUT_PULLDOWN | MUX_MODE3) /* MCASP0_AHCLKX/MCASP1_AXR1 */ + >; + }; + + mcasp1_sleep_pins: mcasp1_sleep_pins { + pinctrl-single,pins = < + 0x1a0 (PIN_INPUT_PULLDOWN | MUX_MODE7) + 0x1a4 (PIN_INPUT_PULLDOWN | MUX_MODE7) + 0x1a8 (PIN_INPUT_PULLDOWN | MUX_MODE7) + 0x1ac (PIN_INPUT_PULLDOWN | MUX_MODE7) + >; + }; }; &mmc1 {
@@ -706,3 +724,20 @@ }; }; }; + +&mcasp1 { + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&mcasp1_pins>; + pinctrl-1 = <&mcasp1_sleep_pins>; + + status = "okay"; + + op-mode = <0>; /* MCASP_IIS_MODE */ + tdm-slots = <2>; + /* 4 serializer */ + serial-dir = < /* 0: INACTIVE, 1: TX, 2: RX */ + 1 2 0 0 + >; + tx-num-evt = <32>; + rx-num-evt = <32>; +};
Signature · 1 line
2.4.5
PATCH v2 7/20 ARM: DTS: am43xx-epos-evm: Add node for tlv320aic3111 audio codec
In reply to Peter UjfalusiAnalog audio is using this codec on the board.
--- arch/arm/boot/dts/am43x-epos-evm.dts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)
arch/arm/boot/dts/am43x-epos-evm.dts +17 -0
@@ -14,6 +14,7 @@ #include <dt-bindings/pinctrl/am43xx.h> #include <dt-bindings/gpio/gpio.h> #include <dt-bindings/pwm/pwm.h> +#include <dt-bindings/sound/tlv320aic31xx-micbias.h> / { model = "TI AM43x EPOS EVM";
@@ -465,6 +466,22 @@ touchscreen-size-x = <1024>; touchscreen-size-y = <600>; }; + + tlv320aic3111: tlv320aic3111 at 18 { + compatible = "ti,tlv320aic3111"; + reg = <0x18>; + status = "okay"; + + ai31xx-micbias-vg = <MICBIAS_2_0V>; + + /* Regulators */ + HPVDD-supply = <&dcdc4>; /* v3_3AUD -> V3_3D -> DCDC4 */ + SPRVDD-supply = <&vbat>; /* vbat */ + SPLVDD-supply = <&vbat>; /* vbat */ + AVDD-supply = <&dcdc4>; /* v3_3AUD -> V3_3D -> DCDC4 */ + IOVDD-supply = <&dcdc4>; /* V3_3D -> DCDC4 */ + DVDD-supply = <&ldo1>; /* V1_8AUD -> V1_8D -> LDO1 */ + }; }; &i2c2 {
Signature · 1 line
2.4.5
PATCH v2 8/20 ARM: DTS: am43xx-epos-evm: Enable analog audio via simple-card
In reply to Peter UjfalusiUse simple card for audio support on ePOS-EVM. The audio on the board is: McASP1 <-> tlv320aic3111 codec.
--- arch/arm/boot/dts/am43x-epos-evm.dts | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+)
arch/arm/boot/dts/am43x-epos-evm.dts +34 -0
@@ -106,6 +106,38 @@ brightness-levels = <0 51 53 56 62 75 101 152 255>; default-brightness-level = <8>; }; + + sound0: sound at 0 { + compatible = "simple-audio-card"; + simple-audio-card,name = "AM43-EPOS-EVM"; + simple-audio-card,widgets = + "Microphone", "Microphone Jack", + "Headphone", "Headphone Jack", + "Speaker", "Speaker"; + simple-audio-card,routing = + "MIC1LP", "Microphone Jack", + "MIC1RP", "Microphone Jack", + "MIC1LP", "MICBIAS", + "MIC1RP", "MICBIAS", + "Headphone Jack", "HPL", + "Headphone Jack", "HPR", + "Speaker", "SPL", + "Speaker", "SPR"; + simple-audio-card,format = "dsp_b"; + simple-audio-card,bitclock-master = <&sound0_master>; + simple-audio-card,frame-master = <&sound0_master>; + simple-audio-card,bitclock-inversion; + + simple-audio-card,cpu { + sound-dai = <&mcasp1>; + system-clock-frequency = <12000000>; + }; + + sound0_master: simple-audio-card,codec { + sound-dai = <&tlv320aic3111>; + system-clock-frequency = <12000000>; + }; + }; }; &am43xx_pinmux {
@@ -468,6 +500,7 @@ }; tlv320aic3111: tlv320aic3111 at 18 { + #sound-dai-cells = <0>; compatible = "ti,tlv320aic3111"; reg = <0x18>; status = "okay";
@@ -743,6 +776,7 @@ }; &mcasp1 { + #sound-dai-cells = <0>; pinctrl-names = "default", "sleep"; pinctrl-0 = <&mcasp1_pins>; pinctrl-1 = <&mcasp1_sleep_pins>;
Signature · 1 line
2.4.5
PATCH v2 9/20 ARM: DTS: am437x-gp-evm: Add gpio-hog for configuring the display/audio mux
In reply to Peter UjfalusiGPIO5_8 is used as a mux switch between LCD and HDMI displays. This mux affects audio routing as well since in LCD mode HDMI audio is not possible and when HDMI is selected analog audio is not working.
--- arch/arm/boot/dts/am437x-gp-evm.dts | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-)
arch/arm/boot/dts/am437x-gp-evm.dts +15 -12
@@ -83,17 +83,6 @@ compatible = "osddisplays,osd057T0559-34ts", "panel-dpi"; label = "lcd"; - pinctrl-names = "default"; - pinctrl-0 = <&lcd_pins>; - - /* - * SelLCDorHDMI, LOW to select HDMI. This is not really the - * panel's enable GPIO, but we don't have HDMI driver support nor - * support to switch between two displays, so using this gpio as - * panel's enable should be safe. - */ - enable-gpios = <&gpio5 8 GPIO_ACTIVE_HIGH>; - panel-timing { clock-frequency = <33000000>; hactive = <800>;
@@ -270,7 +259,7 @@ >; }; - lcd_pins: lcd_pins { + display_mux_pins: display_mux_pins { pinctrl-single,pins = < /* GPIO 5_8 to select LCD / HDMI */ 0x238 (PIN_OUTPUT_PULLUP | MUX_MODE7)
@@ -558,8 +547,22 @@ }; &gpio5 { + pinctrl-names = "default"; + pinctrl-0 = <&display_mux_pins>; status = "okay"; ti,no-reset-on-init; + + p8 { + /* + * SelLCDorHDMI selects between display and audio paths: + * Low: HDMI display with audio via HDMI + * High: LCD display with analog audio via aic3111 codec + */ + gpio-hog; + gpios = <8 GPIO_ACTIVE_HIGH>; + output-high; + line-name = "SelLCDorHDMI"; + }; }; &mmc1 {
Signature · 1 line
2.4.5
PATCH v2 10/20 ARM: DTS: am437x-gp-evm: Rename fixed regulator vmmcsd_fixed to evm_v3_3d
In reply to Peter UjfalusiThe same regulator is used by other chips on the board. The power path is:
VBAT -> TPS63031 - Enable signal is V1_8D regulator -> V3_3D. V3_3D is used by SD slot and tlv320aic3106 codec as well.
--- arch/arm/boot/dts/am437x-gp-evm.dts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
arch/arm/boot/dts/am437x-gp-evm.dts +3 -3
@@ -24,9 +24,9 @@ serial3 = &uart3; }; - vmmcsd_fixed: fixedregulator-sd { + evm_v3_3d: fixedregulator-v3_3d { compatible = "regulator-fixed"; - regulator-name = "vmmcsd_fixed"; + regulator-name = "evm_v3_3d"; regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; enable-active-high;
@@ -567,7 +567,7 @@ &mmc1 { status = "okay"; - vmmc-supply = <&vmmcsd_fixed>; + vmmc-supply = <&evm_v3_3d>; bus-width = <4>; pinctrl-names = "default"; pinctrl-0 = <&mmc1_pins>;
Signature · 1 line
2.4.5
PATCH v2 11/20 ARM: DTS: am437x-gp-evm: Add node for tlv320aic3106 audio codec
In reply to Peter UjfalusiAnalog audio is using this codec on the board.
--- arch/arm/boot/dts/am437x-gp-evm.dts | 12 ++++++++++++ 1 file changed, 12 insertions(+)
arch/arm/boot/dts/am437x-gp-evm.dts +12 -0
@@ -510,6 +510,18 @@ }; }; }; + + tlv320aic3106: tlv320aic3106 at 1b { + compatible = "ti,tlv320aic3106"; + reg = <0x1b>; + status = "okay"; + + /* Regulators */ + IOVDD-supply = <&evm_v3_3d>; /* V3_3D -> <tps63031> EN: V1_8D -> VBAT */ + AVDD-supply = <&evm_v3_3d>; /* v3_3AUD -> V3_3D -> ... */ + DRVDD-supply = <&evm_v3_3d>; /* v3_3AUD -> V3_3D -> ... */ + DVDD-supply = <&ldo1>; /* V1_8D -> LDO1 */ + }; }; &epwmss0 {
Signature · 1 line
2.4.5
PATCH v2 12/20 ARM: DTS: am437x-gp-evm: McASP1 node for audio support
In reply to Peter UjfalusiAdd node for McASP1 along with the needed pinctrl entries.
--- arch/arm/boot/dts/am437x-gp-evm.dts | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+)
arch/arm/boot/dts/am437x-gp-evm.dts +35 -0
@@ -398,6 +398,24 @@ 0x234 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* uart3_rtsn.uart3_rtsn */ >; }; + + mcasp1_pins: mcasp1_pins { + pinctrl-single,pins = < + 0x108 (PIN_OUTPUT_PULLDOWN | MUX_MODE4) /* mii1_col.mcasp1_axr2 */ + 0x10c (PIN_INPUT_PULLDOWN | MUX_MODE4) /* mii1_crs.mcasp1_aclkx */ + 0x110 (PIN_INPUT_PULLDOWN | MUX_MODE4) /* mii1_rxerr.mcasp1_fsx */ + 0x144 (PIN_INPUT_PULLDOWN | MUX_MODE4) /* rmii1_ref_clk.mcasp1_axr3 */ + >; + }; + + mcasp1_sleep_pins: mcasp1_sleep_pins { + pinctrl-single,pins = < + 0x108 (PIN_INPUT_PULLDOWN | MUX_MODE7) + 0x10c (PIN_INPUT_PULLDOWN | MUX_MODE7) + 0x110 (PIN_INPUT_PULLDOWN | MUX_MODE7) + 0x144 (PIN_INPUT_PULLDOWN | MUX_MODE7) + >; + }; }; &i2c0 {
@@ -805,3 +823,20 @@ }; }; }; + +&mcasp1 { + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&mcasp1_pins>; + pinctrl-1 = <&mcasp1_sleep_pins>; + + status = "okay"; + + op-mode = <0>; /* MCASP_IIS_MODE */ + tdm-slots = <2>; + /* 4 serializers */ + serial-dir = < /* 0: INACTIVE, 1: TX, 2: RX */ + 0 0 1 2 + >; + tx-num-evt = <32>; + rx-num-evt = <32>; +};
Signature · 1 line
2.4.5
PATCH v2 13/20 ARM: DTS: am437x-gp-evm: Enable analog audio via simple-card
In reply to Peter UjfalusiThe board uses McASP1 <-> tlv320aic3106 for analog audio and has Headphone out and Line in connectors.
--- arch/arm/boot/dts/am437x-gp-evm.dts | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+)
arch/arm/boot/dts/am437x-gp-evm.dts +28 -0
@@ -113,6 +113,32 @@ clock-frequency = <12000000>; }; + sound0: sound at 0 { + compatible = "simple-audio-card"; + simple-audio-card,name = "AM437x-GP-EVM"; + simple-audio-card,widgets = + "Headphone", "Headphone Jack", + "Line", "Line In"; + simple-audio-card,routing = + "Headphone Jack", "HPLOUT", + "Headphone Jack", "HPROUT", + "LINE1L", "Line In", + "LINE1R", "Line In"; + simple-audio-card,format = "dsp_b"; + simple-audio-card,bitclock-master = <&sound0_master>; + simple-audio-card,frame-master = <&sound0_master>; + simple-audio-card,bitclock-inversion; + + simple-audio-card,cpu { + sound-dai = <&mcasp1>; + system-clock-frequency = <12000000>; + }; + + sound0_master: simple-audio-card,codec { + sound-dai = <&tlv320aic3106>; + system-clock-frequency = <12000000>; + }; + }; }; &am43xx_pinmux {
@@ -530,6 +556,7 @@ }; tlv320aic3106: tlv320aic3106 at 1b { + #sound-dai-cells = <0>; compatible = "ti,tlv320aic3106"; reg = <0x1b>; status = "okay";
@@ -825,6 +852,7 @@ }; &mcasp1 { + #sound-dai-cells = <0>; pinctrl-names = "default", "sleep"; pinctrl-0 = <&mcasp1_pins>; pinctrl-1 = <&mcasp1_sleep_pins>;
Signature · 1 line
2.4.5
PATCH v2 14/20 ARM: DTS: am335x-evmsk: Fix mcasp1 node's indentation
In reply to Peter UjfalusiThe section had two tabs instead of one.
--- arch/arm/boot/dts/am335x-evmsk.dts | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-)
arch/arm/boot/dts/am335x-evmsk.dts +11 -11
@@ -661,19 +661,19 @@ }; &mcasp1 { - pinctrl-names = "default"; - pinctrl-0 = <&mcasp1_pins>; + pinctrl-names = "default"; + pinctrl-0 = <&mcasp1_pins>; - status = "okay"; + status = "okay"; - op-mode = <0>; /* MCASP_IIS_MODE */ - tdm-slots = <2>; - /* 4 serializers */ - serial-dir = < /* 0: INACTIVE, 1: TX, 2: RX */ - 0 0 1 2 - >; - tx-num-evt = <32>; - rx-num-evt = <32>; + op-mode = <0>; /* MCASP_IIS_MODE */ + tdm-slots = <2>; + /* 4 serializers */ + serial-dir = < /* 0: INACTIVE, 1: TX, 2: RX */ + 0 0 1 2 + >; + tx-num-evt = <32>; + rx-num-evt = <32>; }; &tscadc {
Signature · 1 line
2.4.5
PATCH v2 15/20 ARM: DTS: am335x-evmsk: Add sleep pin settings for mcasp1
In reply to Peter UjfalusiWhen McASP is not in use the pins can be put to sleep mode to conserve power.
--- arch/arm/boot/dts/am335x-evmsk.dts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)
arch/arm/boot/dts/am335x-evmsk.dts +11 -1
@@ -396,6 +396,15 @@ >; }; + mcasp1_pins_sleep: mcasp1_pins_sleep { + pinctrl-single,pins = < + 0x10c (PIN_INPUT_PULLDOWN | MUX_MODE7) + 0x110 (PIN_INPUT_PULLDOWN | MUX_MODE7) + 0x108 (PIN_INPUT_PULLDOWN | MUX_MODE7) + 0x144 (PIN_INPUT_PULLDOWN | MUX_MODE7) + >; + }; + mmc2_pins: pinmux_mmc2_pins { pinctrl-single,pins = < 0x74 (PIN_INPUT_PULLUP | MUX_MODE7) /* gpmc_wpn.gpio0_31 */
@@ -661,8 +670,9 @@ }; &mcasp1 { - pinctrl-names = "default"; + pinctrl-names = "default", "sleep"; pinctrl-0 = <&mcasp1_pins>; + pinctrl-1 = <&mcasp1_pins_sleep>; status = "okay";
Signature · 1 line
2.4.5
PATCH v2 16/20 ARM: DTS: am335x-evmsk: Switch using simple-audio-card for audio support
In reply to Peter UjfalusiThe sound support consist only Headset output on the board and can be handled by "simple-audio-card"
--- arch/arm/boot/dts/am335x-evmsk.dts | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-)
arch/arm/boot/dts/am335x-evmsk.dts +22 -8
@@ -141,14 +141,26 @@ }; sound { - compatible = "ti,da830-evm-audio"; - ti,model = "AM335x-EVMSK"; - ti,audio-codec = <&tlv320aic3106>; - ti,mcasp-controller = <&mcasp1>; - ti,codec-clock-rate = <24000000>; - ti,audio-routing = - "Headphone Jack", "HPLOUT", - "Headphone Jack", "HPROUT"; + compatible = "simple-audio-card"; + simple-audio-card,name = "AM335x-EVMSK"; + simple-audio-card,widgets = + "Headphone", "Headphone Jack"; + simple-audio-card,routing = + "Headphone Jack", "HPLOUT", + "Headphone Jack", "HPROUT"; + simple-audio-card,format = "dsp_b"; + simple-audio-card,bitclock-master = <&sound_master>; + simple-audio-card,frame-master = <&sound_master>; + simple-audio-card,bitclock-inversion; + + simple-audio-card,cpu { + sound-dai = <&mcasp1>; + }; + + sound_master: simple-audio-card,codec { + sound-dai = <&tlv320aic3106>; + system-clock-frequency = <24000000>; + }; }; panel {
@@ -471,6 +483,7 @@ }; tlv320aic3106: tlv320aic3106 at 1b { + #sound-dai-cells = <0>; compatible = "ti,tlv320aic3106"; reg = <0x1b>; status = "okay";
@@ -670,6 +683,7 @@ }; &mcasp1 { + #sound-dai-cells = <0>; pinctrl-names = "default", "sleep"; pinctrl-0 = <&mcasp1_pins>; pinctrl-1 = <&mcasp1_pins_sleep>;
Signature · 1 line
2.4.5
PATCH v2 17/20 ARM: DTS: am335x-evm: Fix mcasp1 node's indentation
In reply to Peter UjfalusiThe section had two tabs instead of one.
--- arch/arm/boot/dts/am335x-evm.dts | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-)
arch/arm/boot/dts/am335x-evm.dts +11 -11
@@ -575,19 +575,19 @@ #include "tps65910.dtsi" &mcasp1 { - pinctrl-names = "default"; - pinctrl-0 = <&am335x_evm_audio_pins>; + pinctrl-names = "default"; + pinctrl-0 = <&am335x_evm_audio_pins>; - status = "okay"; + status = "okay"; - op-mode = <0>; /* MCASP_IIS_MODE */ - tdm-slots = <2>; - /* 4 serializers */ - serial-dir = < /* 0: INACTIVE, 1: TX, 2: RX */ - 0 0 1 2 - >; - tx-num-evt = <32>; - rx-num-evt = <32>; + op-mode = <0>; /* MCASP_IIS_MODE */ + tdm-slots = <2>; + /* 4 serializers */ + serial-dir = < /* 0: INACTIVE, 1: TX, 2: RX */ + 0 0 1 2 + >; + tx-num-evt = <32>; + rx-num-evt = <32>; }; &tps {
Signature · 1 line
2.4.5
PATCH v2 18/20 ARM: DTS: am335x-evm: Rename pinctrl section for McASP1
In reply to Peter UjfalusiUse mcasp1_pins as name for the pinctrl section needed for McASP1 instead of the am335x_evm_audio_pins name.
--- arch/arm/boot/dts/am335x-evm.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/boot/dts/am335x-evm.dts +2 -2
@@ -342,7 +342,7 @@ >; }; - am335x_evm_audio_pins: am335x_evm_audio_pins { + mcasp1_pins: mcasp1_pins { pinctrl-single,pins = < 0x10c (PIN_INPUT_PULLDOWN | MUX_MODE4) /* mii1_crs.mcasp1_aclkx */ 0x110 (PIN_INPUT_PULLDOWN | MUX_MODE4) /* mii1_rxerr.mcasp1_fsx */
@@ -576,7 +576,7 @@ &mcasp1 { pinctrl-names = "default"; - pinctrl-0 = <&am335x_evm_audio_pins>; + pinctrl-0 = <&mcasp1_pins>; status = "okay";
Signature · 1 line
2.4.5
PATCH v2 19/20 ARM: DTS: am335x-evm: Add sleep pin settings for mcasp1
In reply to Peter UjfalusiWhen McASP is not in use the pins can be put to sleep mode to conserve power.
--- arch/arm/boot/dts/am335x-evm.dts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)
arch/arm/boot/dts/am335x-evm.dts +11 -1
@@ -351,6 +351,15 @@ >; }; + mcasp1_pins_sleep: mcasp1_pins_sleep { + pinctrl-single,pins = < + 0x10c (PIN_INPUT_PULLDOWN | MUX_MODE7) + 0x110 (PIN_INPUT_PULLDOWN | MUX_MODE7) + 0x108 (PIN_INPUT_PULLDOWN | MUX_MODE7) + 0x144 (PIN_INPUT_PULLDOWN | MUX_MODE7) + >; + }; + dcan1_pins_default: dcan1_pins_default { pinctrl-single,pins = < 0x168 (PIN_OUTPUT | MUX_MODE2) /* uart0_ctsn.d_can1_tx */
@@ -575,8 +584,9 @@ #include "tps65910.dtsi" &mcasp1 { - pinctrl-names = "default"; + pinctrl-names = "default", "sleep"; pinctrl-0 = <&mcasp1_pins>; + pinctrl-1 = <&mcasp1_pins_sleep>; status = "okay";
Signature · 1 line
2.4.5
PATCH v2 20/20 ARM: DTS: am335x-evm: Switch using simple-audio-card for audio support
In reply to Peter UjfalusiThe sound support consist only Headset output on the board and can be handled by "simple-audio-card"
--- arch/arm/boot/dts/am335x-evm.dts | 35 +++++++++++++++++++++++++---------- 1 file changed, 25 insertions(+), 10 deletions(-)
arch/arm/boot/dts/am335x-evm.dts +25 -10
@@ -136,16 +136,29 @@ }; sound { - compatible = "ti,da830-evm-audio"; - ti,model = "AM335x-EVM"; - ti,audio-codec = <&tlv320aic3106>; - ti,mcasp-controller = <&mcasp1>; - ti,codec-clock-rate = <12000000>; - ti,audio-routing = - "Headphone Jack", "HPLOUT", - "Headphone Jack", "HPROUT", - "LINE1L", "Line In", - "LINE1R", "Line In"; + compatible = "simple-audio-card"; + simple-audio-card,name = "AM335x-EVM"; + simple-audio-card,widgets = + "Headphone", "Headphone Jack", + "Line", "Line In"; + simple-audio-card,routing = + "Headphone Jack", "HPLOUT", + "Headphone Jack", "HPROUT", + "LINE1L", "Line In", + "LINE1R", "Line In"; + simple-audio-card,format = "dsp_b"; + simple-audio-card,bitclock-master = <&sound_master>; + simple-audio-card,frame-master = <&sound_master>; + simple-audio-card,bitclock-inversion; + + simple-audio-card,cpu { + sound-dai = <&mcasp1>; + }; + + sound_master: simple-audio-card,codec { + sound-dai = <&tlv320aic3106>; + system-clock-frequency = <12000000>; + }; }; };
@@ -469,6 +482,7 @@ }; tlv320aic3106: tlv320aic3106 at 1b { + #sound-dai-cells = <0>; compatible = "ti,tlv320aic3106"; reg = <0x1b>; status = "okay";
@@ -584,6 +598,7 @@ #include "tps65910.dtsi" &mcasp1 { + #sound-dai-cells = <0>; pinctrl-names = "default", "sleep"; pinctrl-0 = <&mcasp1_pins>; pinctrl-1 = <&mcasp1_pins_sleep>;
Signature · 1 line
2.4.5
Re: [PATCH v2 01/20] ARM: omap2plus_defconfig: Enable audio related config options
In reply to Peter UjfalusiQuoted 7 lines · Peter Ujfalusi
More and more boards are moving to have audio support via simple-card. At the same time enable options needed for most am335x and am43xx board for audio support: McASP and TLV320AIC3X codecs.
The later two has been selected by theCONFIG_SND_AM33XX_SOC_EVMoption, but the aim is to convert all boards to use simple card.Signed-off-by Peter Ujfalusi <[email protected]>
Quoted 25 lines
--- arch/arm/configs/omap2plus_defconfig | 3 +++ 1 file changed, 3 insertions(+)arch/arm/configs/omap2plus_defconfig +3
-0@@ -324,10 +324,13 @@ CONFIG_SND_USB_AUDIO=m CONFIG_SND_SOC=m CONFIG_SND_EDMA_SOC=m CONFIG_SND_AM33XX_SOC_EVM=m +CONFIG_SND_DAVINCI_SOC_MCASP=m CONFIG_SND_OMAP_SOC=m CONFIG_SND_OMAP_SOC_OMAP_TWL4030=m CONFIG_SND_OMAP_SOC_OMAP_ABE_TWL6040=m CONFIG_SND_OMAP_SOC_OMAP3_PANDORA=m +CONFIG_SND_SIMPLE_CARD=m +CONFIG_SND_SOC_TLV320AIC3X=m CONFIG_HID_GENERIC=m CONFIG_USB_HIDDEV=y CONFIG_USB_KBD=mSignature · 1 line
2.4.5
Signature · 8 lines
balbi -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150702/df40b30d/attachment.sig>
Tony Lindgren
maintainerQuoted 10 lines · Peter Ujfalusi
Hi,
Changes since v1:
- Add patch foromap2plus_defconfigto enable needed audio drivers
- Included other board patches since they all need the change inomap2plus_defconfigEnable the simple card in
omap2plus_defconfigas more boards are using that for audio support.
Quoted 7 lines
am437x-sk-evm, am335x-evmsk and am335x-evm:
There is no reason to use the davinci-evm machine driver's compatible for audio support since the setup is simple and the common simple-audio-card can handle it just fine.am43xx-epos-evm, am437x-gp-evm:
Add audio support via simple-card
Applying all into omap-for-v4.3/dt thanks.
Tony