From a8d943ed902bdbef05b64b7ad7ed8878a967a286 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 3 Nov 2014 17:48:49 -0800 Subject: ARM: shmobile: koelsch: fixup I2C2 clock frequency Current Koelsch I2C2 has 400kHz settings, but, ak4643 audio codec chip which is connected to I2C2 can't work such frequency. Fixup I2C2 clock frequency to 100kHz. Signed-off-by: Kuninori Morimoto Signed-off-by: Simon Horman --- arch/arm/boot/dts/r8a7791-koelsch.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/arm/boot/dts/r8a7791-koelsch.dts') diff --git a/arch/arm/boot/dts/r8a7791-koelsch.dts b/arch/arm/boot/dts/r8a7791-koelsch.dts index 191f32bc43ea..59e4251dc1af 100644 --- a/arch/arm/boot/dts/r8a7791-koelsch.dts +++ b/arch/arm/boot/dts/r8a7791-koelsch.dts @@ -425,7 +425,7 @@ pinctrl-names = "default"; status = "okay"; - clock-frequency = <400000>; + clock-frequency = <100000>; composite-in@20 { compatible = "adi,adv7180"; -- cgit v1.2.3 From b160f61516b9b93325b8bf0028ce53cbea8225d1 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 3 Nov 2014 17:49:00 -0800 Subject: ARM: shmobile: koelsch: Sound PIO support on DTS Signed-off-by: Kuninori Morimoto Signed-off-by: Simon Horman --- arch/arm/boot/dts/r8a7791-koelsch.dts | 70 +++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) (limited to 'arch/arm/boot/dts/r8a7791-koelsch.dts') diff --git a/arch/arm/boot/dts/r8a7791-koelsch.dts b/arch/arm/boot/dts/r8a7791-koelsch.dts index 59e4251dc1af..c92d0d713258 100644 --- a/arch/arm/boot/dts/r8a7791-koelsch.dts +++ b/arch/arm/boot/dts/r8a7791-koelsch.dts @@ -10,6 +10,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 "r8a7791.dtsi" #include @@ -210,6 +222,23 @@ states = <3300000 1 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>; + }; + }; }; &du { @@ -300,6 +329,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 { @@ -427,6 +466,12 @@ status = "okay"; clock-frequency = <100000>; + ak4643: sound-codec@12 { + compatible = "asahi-kasei,ak4643"; + #sound-dai-cells = <0>; + reg = <0x12>; + }; + composite-in@20 { compatible = "adi,adv7180"; reg = <0x20>; @@ -513,3 +558,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; +}; -- cgit v1.2.3 From 54153c26d206b9168a37704ca8b17f986f047d70 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 3 Nov 2014 17:49:12 -0800 Subject: ARM: shmobile: koelsch: Sound DMA support on DTS DMA transfer to/from SSI DMA [MEM] -> [SSI] DMA [MEM] <- [SSI] Signed-off-by: Kuninori Morimoto Signed-off-by: Simon Horman --- arch/arm/boot/dts/r8a7791-koelsch.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'arch/arm/boot/dts/r8a7791-koelsch.dts') diff --git a/arch/arm/boot/dts/r8a7791-koelsch.dts b/arch/arm/boot/dts/r8a7791-koelsch.dts index c92d0d713258..68628cf3fda1 100644 --- a/arch/arm/boot/dts/r8a7791-koelsch.dts +++ b/arch/arm/boot/dts/r8a7791-koelsch.dts @@ -576,10 +576,10 @@ }; &ssi0 { - pio-transfer; + no-busif; }; &ssi1 { - pio-transfer; + no-busif; shared-pin; }; -- cgit v1.2.3 From e975bb333e670f548986478eb24e498b95eb3e85 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 3 Nov 2014 17:49:22 -0800 Subject: ARM: shmobile: koelsch: Sound DMA support via BUSIF on DTS DMA transfer to/from SSIU DMA [MEM] -> [SSIU] -> [SSI] DMA [MEM] <- [SSIU] <- [SSI] Signed-off-by: Kuninori Morimoto Signed-off-by: Simon Horman --- arch/arm/boot/dts/r8a7791-koelsch.dts | 5 ----- 1 file changed, 5 deletions(-) (limited to 'arch/arm/boot/dts/r8a7791-koelsch.dts') diff --git a/arch/arm/boot/dts/r8a7791-koelsch.dts b/arch/arm/boot/dts/r8a7791-koelsch.dts index 68628cf3fda1..5bc675fd04cc 100644 --- a/arch/arm/boot/dts/r8a7791-koelsch.dts +++ b/arch/arm/boot/dts/r8a7791-koelsch.dts @@ -575,11 +575,6 @@ }; }; -&ssi0 { - no-busif; -}; - &ssi1 { - no-busif; shared-pin; }; -- cgit v1.2.3 From 664de6feea5978b9518a0bc4f8185e1f607be344 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 3 Nov 2014 17:49:33 -0800 Subject: ARM: shmobile: koelsch: Sound DMA support via SRC on DTS DMA transfer to/from SRC DMA DMApp [MEM] -> [SRC] -> [SSIU] -> [SSI] DMA DMApp [MEM] <- [SRC] <- [SSIU] <- [SSI] Current sound driver is supporting SSI/SRC random connection. So, this patch is tring SSI0 -> SRC2 SSI1 <- SRC3 Signed-off-by: Kuninori Morimoto Signed-off-by: Simon Horman --- arch/arm/boot/dts/r8a7791-koelsch.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'arch/arm/boot/dts/r8a7791-koelsch.dts') diff --git a/arch/arm/boot/dts/r8a7791-koelsch.dts b/arch/arm/boot/dts/r8a7791-koelsch.dts index 5bc675fd04cc..d2fe67747e0a 100644 --- a/arch/arm/boot/dts/r8a7791-koelsch.dts +++ b/arch/arm/boot/dts/r8a7791-koelsch.dts @@ -569,8 +569,8 @@ rcar_sound,dai { dai0 { - playback = <&ssi0>; - capture = <&ssi1>; + playback = <&ssi0 &src2>; + capture = <&ssi1 &src3>; }; }; }; -- cgit v1.2.3 From 5c6d4b947aeca23e10f7d4ddf2041eda51b0ded2 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 3 Nov 2014 17:49:45 -0800 Subject: ARM: shmobile: koelsch: Sound DMA support via DVC on DTS DMA transfer uses DVC DMA DMApp [MEM] -> [SRC] -> [DVC] -> [SSIU] -> [SSI] DMA DMApp [MEM] <- [DVC] <- [SRC] <- [SSIU] <- [SSI] Signed-off-by: Kuninori Morimoto Signed-off-by: Simon Horman --- arch/arm/boot/dts/r8a7791-koelsch.dts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'arch/arm/boot/dts/r8a7791-koelsch.dts') diff --git a/arch/arm/boot/dts/r8a7791-koelsch.dts b/arch/arm/boot/dts/r8a7791-koelsch.dts index d2fe67747e0a..f056e64e50c1 100644 --- a/arch/arm/boot/dts/r8a7791-koelsch.dts +++ b/arch/arm/boot/dts/r8a7791-koelsch.dts @@ -20,6 +20,13 @@ * This command is required when Playback/Capture * * amixer set "LINEOUT Mixer DACL" on + * amixer set "DVC Out" 100% + * amixer set "DVC In" 100% + * + * You can use Mute + * + * amixer set "DVC Out Mute" on + * amixer set "DVC In Mute" on */ /dts-v1/; @@ -569,8 +576,8 @@ rcar_sound,dai { dai0 { - playback = <&ssi0 &src2>; - capture = <&ssi1 &src3>; + playback = <&ssi0 &src2 &dvc0>; + capture = <&ssi1 &src3 &dvc1>; }; }; }; -- cgit v1.2.3 From 352faa5fedbc9f84faa849ce612ab2633c4db0ec Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Thu, 6 Nov 2014 13:49:58 +0100 Subject: ARM: shmobile: koelsch dts: Add labels for the LEDs The LEDs on the koelsch board are labeled using upper-case characters. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman --- arch/arm/boot/dts/r8a7791-koelsch.dts | 3 +++ 1 file changed, 3 insertions(+) (limited to 'arch/arm/boot/dts/r8a7791-koelsch.dts') diff --git a/arch/arm/boot/dts/r8a7791-koelsch.dts b/arch/arm/boot/dts/r8a7791-koelsch.dts index f056e64e50c1..a10f534ecec7 100644 --- a/arch/arm/boot/dts/r8a7791-koelsch.dts +++ b/arch/arm/boot/dts/r8a7791-koelsch.dts @@ -149,12 +149,15 @@ compatible = "gpio-leds"; led6 { gpios = <&gpio2 19 GPIO_ACTIVE_HIGH>; + label = "LED6"; }; led7 { gpios = <&gpio2 20 GPIO_ACTIVE_HIGH>; + label = "LED7"; }; led8 { gpios = <&gpio2 21 GPIO_ACTIVE_HIGH>; + label = "LED8"; }; }; -- cgit v1.2.3 From ce47481652106e955296651a1b76c0dd4561cfbc Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Tue, 11 Nov 2014 04:37:05 +0000 Subject: ARM: shmobile: koelsch: add Volume Ramp usage on comment Signed-off-by: Kuninori Morimoto Signed-off-by: Simon Horman --- arch/arm/boot/dts/r8a7791-koelsch.dts | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'arch/arm/boot/dts/r8a7791-koelsch.dts') diff --git a/arch/arm/boot/dts/r8a7791-koelsch.dts b/arch/arm/boot/dts/r8a7791-koelsch.dts index a10f534ecec7..487fc99a2fa3 100644 --- a/arch/arm/boot/dts/r8a7791-koelsch.dts +++ b/arch/arm/boot/dts/r8a7791-koelsch.dts @@ -27,6 +27,15 @@ * * amixer set "DVC Out Mute" on * amixer set "DVC In Mute" on + * + * You can use Volume Ramp + * + * amixer set "DVC Out Ramp Up Rate" "0.125 dB/64 steps" + * amixer set "DVC Out Ramp Down Rate" "0.125 dB/512 steps" + * amixer set "DVC Out Ramp" on + * aplay xxx.wav & + * amixer set "DVC Out" 80% // Volume Down + * amixer set "DVC Out" 100% // Volume Up */ /dts-v1/; -- cgit v1.2.3