ARM: shmobile: lager: Sound PIO support on DTS
Subsystems (5)
PATCH 5/11 ARM: shmobile: lager: Sound PIO support on DTS
From: Kuninori Morimoto <[email protected]>
--- arch/arm/boot/dts/r8a7790-lager.dts | 70 +++++++++++++++++++++++++++++++++++ arch/arm/mach-shmobile/Kconfig | 1 + 2 files changed, 71 insertions(+)
arch/arm/boot/dts/r8a7790-lager.dts +70 -0
@@ -9,6 +9,18 @@ * kind, whether express or implied. */ +/* + * SSI-AK4643 + * + * SW1: 1: AK4643 + * 2: CN22 + * 3: ADV7511 + * + * This command is required when Playback/Capture + * + * amixer set "LINEOUT Mixer DACL" on + */ + /dts-v1/; #include "r8a7790.dtsi" #include <dt-bindings/gpio/gpio.h>
@@ -146,6 +158,23 @@ 1800000 0>; }; + sound { + compatible = "simple-audio-card"; + + simple-audio-card,format = "left_j"; + simple-audio-card,bitclock-master = <&sndcodec>; + simple-audio-card,frame-master = <&sndcodec>; + + sndcpu: simple-audio-card,cpu { + sound-dai = <&rcar_sound>; + }; + + sndcodec: simple-audio-card,codec { + sound-dai = <&ak4643>; + system-clock-frequency = <11289600>; + }; + }; + vga-encoder { compatible = "adi,adv7123";
@@ -292,6 +321,16 @@ renesas,groups = "vin1_data8", "vin1_clk"; renesas,function = "vin1"; }; + + sound_pins: sound { + renesas,groups = "ssi0129_ctrl", "ssi0_data", "ssi1_data"; + renesas,function = "ssi"; + }; + + sound_clk_pins: sound_clk { + renesas,groups = "audio_clk_a"; + renesas,function = "audio_clk"; + }; }; ðer {
@@ -429,6 +468,12 @@ pinctrl-0 = <&iic2_pins>; pinctrl-names = "default"; + ak4643: sound-codec@12 { + compatible = "asahi-kasei,ak4643"; + #sound-dai-cells = <0>; + reg = <0x12>; + }; + composite-in@20 { compatible = "adi,adv7180"; reg = <0x20>;
@@ -511,3 +556,28 @@ }; }; }; + +&rcar_sound { + pinctrl-0 = <&sound_pins &sound_clk_pins>; + pinctrl-names = "default"; + + #sound-dai-cells = <0>; + + status = "okay"; + + rcar_sound,dai { + dai0 { + playback = <&ssi0>; + capture = <&ssi1>; + }; + }; +}; + +&ssi0 { + pio-transfer; +}; + +&ssi1 { + pio-transfer; + shared-pin; +};
arch/arm/mach-shmobile/Kconfig +1 -0
@@ -77,6 +77,7 @@ config MACH_LAGER bool "Lager board" depends on ARCH_R8A7790 select MICREL_PHY if SH_ETH + select SND_SOC_AK4642 if SND_SIMPLE_CARD config MACH_MARZEN bool "MARZEN board"
Signature · 1 line
1.7.9.5
Hi Morimoto-san,
arch/arm/mach-shmobile/Kconfig config MACH_LAGER · line 80
Quoted 7 lines · Kuninori Morimoto
-- a/arch/arm/mach-shmobile/Kconfig
+++ b/arch/arm/mach-shmobile/Kconfigarch/arm/mach-shmobile/Kconfig +1
-0@@ -77,6 +77,7 @@ config MACH_LAGER bool "Lager board" depends on ARCH_R8A7790 select MICREL_PHY if SH_ETH + select SND_SOC_AK4642 if SND_SIMPLE_CARD
I know there's a long history of putting this into Kconfig.
However, once Lager becomes multi-platform-only without board file, there will be no MACH_LAGER Kconfig option anymore, and you will have to add SND_SOC_AK4642=y to the shmobile_defconfig anyway.
So I think it's better to add it to shmobile_defconfig now, so it won't be forgotten.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Hi Geert
Quoted 10 lines
arch/arm/mach-shmobile/Kconfig config MACH_LAGER · line 80
Quoted 7 lines
-- a/arch/arm/mach-shmobile/Kconfig
+++ b/arch/arm/mach-shmobile/Kconfigarch/arm/mach-shmobile/Kconfig +1
-0@@ -77,6 +77,7 @@ config MACH_LAGER bool "Lager board" depends on ARCH_R8A7790 select MICREL_PHY if SH_ETH + select SND_SOC_AK4642 if SND_SIMPLE_CARDI know there's a long history of putting this into
Kconfig.
Quoted 6 lines
However, once Lager becomes multi-platform-only without board file, there will be no
MACH_LAGERKconfigoption anymore, and you will have to add SND_SOC_AK4642=y to theshmobile_defconfiganyway.So I think it's better to add it to
shmobile_defconfignow, so it won't be forgotten.
Inded, good catch !
Will fix in v2 patch-set
Best regards
---
Kuninori Morimoto