r8a7793, gose: Add audio support to device tree
Subsystems (2)
v2 cover r8a7793, gose: Add audio support to device tree
Hi,
this series adds support to r8a7793 and gose device trees for rcar sound: first in PIO mode then using DMA
I have been unable to test if audio works (in PIO mode) as I do not have physical access to a gose board. I would appreciate some assistance there too.
This work is based heavily on the work of others for the r8a7791 and koelsch as noted in the changelogs of individual patches.
This series is based on renesas-devel-20160105-v4.4-rc8.
This series depends on:
* [PATCH] ARM: shmobile: r8a7793: move dmac nodes
* [PATCH v2] ARM: shmobile: gose: add i2c2 bus to device tree
Changes since v1:
* Dropped RFC designation
* Dropped i2c patches: they have been posted and partially merged separately
* Dropped MIX/CTU support pending more work on that feature
* Enable Audio DMAC peri peri via sound driver
* Other changes noted in per-patch changelogs
Simon Horman (13):
ARM: shmobile: r8a7793: add audio clock to device tree
ARM: shmobile: r8a7793: add m2 clock to device tree
ARM: shmobile: r8a7793: add R-Car sound support to device tree
ARM: shmobile: r8a7793: add DVC support to device tree
ARM: shmobile: r8a7793: add audio DMAC clocks to device tree
ARM: shmobile: r8a7793: add audio DMAC to device tree
ARM: shmobile: r8a7793: enable Audio DMAC peri peri via sound driver
ARM: shmobile: gose: Enable sound PIO support in device tree
ARM: shmobile: gose: enable sound DMA support in device tree
ARM: shmobile: gose: enable sound DMA support via BUSIF in device tree
ARM: shmobile: gose: enable sound DMA support via SRC in device tree
ARM: shmobile: gose: enable sound DMA support via DVC in device tree
ARM: shmobile: r8a7793: enable audio DMAC in device tree
arch/arm/boot/dts/r8a7793-gose.dts | 88 +++++++++++++ arch/arm/boot/dts/r8a7793.dtsi | 253 ++++++++++++++++++++++++++++++++++++- 2 files changed, 338 insertions(+), 3 deletions(-)
Signature · 1 line
2.1.4
PATCH v2 1/13 ARM: shmobile: r8a7793: add audio clock to device tree
Instantiate audio clock in r8a7793 device tree. audio_clk_a/b/c are required for R-Car sound.
Based on similar work for the r8a7791 by Kuninori Morimoto.
--- arch/arm/boot/dts/r8a7793.dtsi | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+)
arch/arm/boot/dts/r8a7793.dtsi +23 -0
@@ -706,6 +706,29 @@ clock-output-names = "extal"; }; + /* + * The external audio clocks are configured as 0 Hz fixed frequency clocks by + * default. Boards that provide audio clocks should override them. + */ + audio_clk_a: audio_clk_a { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <0>; + clock-output-names = "audio_clk_a"; + }; + audio_clk_b: audio_clk_b { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <0>; + clock-output-names = "audio_clk_b"; + }; + audio_clk_c: audio_clk_c { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <0>; + clock-output-names = "audio_clk_c"; + }; + /* Special CPG clocks */ cpg_clocks: cpg_clocks at e6150000 { compatible = "renesas,r8a7793-cpg-clocks",
Signature · 1 line
2.1.4
PATCH v2 2/13 ARM: shmobile: r8a7793: add m2 clock to device tree
In reply to Simon HormanDeclare m2 clock in r8a7793 device tree.
Based on similar work for the r8a7791 by Laurent Pinchart.
--- arch/arm/boot/dts/r8a7793.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+)
arch/arm/boot/dts/r8a7793.dtsi +8 -0
@@ -817,6 +817,14 @@ clock-mult = <1>; clock-output-names = "p"; }; + m2_clk: m2_clk { + compatible = "fixed-factor-clock"; + clocks = <&cpg_clocks R8A7793_CLK_PLL1>; + #clock-cells = <0>; + clock-div = <8>; + clock-mult = <1>; + clock-output-names = "m2"; + }; rclk_clk: rclk_clk { compatible = "fixed-factor-clock"; clocks = <&cpg_clocks R8A7793_CLK_PLL1>;
Signature · 1 line
2.1.4
PATCH v2 3/13 ARM: shmobile: r8a7793: add R-Car sound support to device tree
In reply to Simon HormanInstantiate R-Car sound node in r8a7793 device tree. This only supports PIO transfers.
Based on similar work for the r8a7791 by Kuninori Morimoto.
---
v2
* Added audmapp
--- arch/arm/boot/dts/r8a7793.dtsi | 83 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+)
arch/arm/boot/dts/r8a7793.dtsi +83 -0
@@ -1101,4 +1101,87 @@ #iommu-cells = <1>; status = "disabled"; }; + + rcar_sound: sound at ec500000 { + /* + * #sound-dai-cells is required + * + * Single DAI : #sound-dai-cells = <0>; <&rcar_sound>; + * Multi DAI : #sound-dai-cells = <1>; <&rcar_sound N>; + */ + compatible = "renesas,rcar_sound-r8a7793", "renesas,rcar_sound-gen2"; + reg = <0 0xec500000 0 0x1000>, /* SCU */ + <0 0xec5a0000 0 0x100>, /* ADG */ + <0 0xec540000 0 0x1000>, /* SSIU */ + <0 0xec541000 0 0x280>; /* SSI */ + reg-names = "scu", "adg", "ssiu", "ssi"; + + clocks = <&mstp10_clks R8A7793_CLK_SSI_ALL>, + <&mstp10_clks R8A7793_CLK_SSI9>, <&mstp10_clks R8A7793_CLK_SSI8>, + <&mstp10_clks R8A7793_CLK_SSI7>, <&mstp10_clks R8A7793_CLK_SSI6>, + <&mstp10_clks R8A7793_CLK_SSI5>, <&mstp10_clks R8A7793_CLK_SSI4>, + <&mstp10_clks R8A7793_CLK_SSI3>, <&mstp10_clks R8A7793_CLK_SSI2>, + <&mstp10_clks R8A7793_CLK_SSI1>, <&mstp10_clks R8A7793_CLK_SSI0>, + <&mstp10_clks R8A7793_CLK_SCU_SRC9>, <&mstp10_clks R8A7793_CLK_SCU_SRC8>, + <&mstp10_clks R8A7793_CLK_SCU_SRC7>, <&mstp10_clks R8A7793_CLK_SCU_SRC6>, + <&mstp10_clks R8A7793_CLK_SCU_SRC5>, <&mstp10_clks R8A7793_CLK_SCU_SRC4>, + <&mstp10_clks R8A7793_CLK_SCU_SRC3>, <&mstp10_clks R8A7793_CLK_SCU_SRC2>, + <&mstp10_clks R8A7793_CLK_SCU_SRC1>, <&mstp10_clks R8A7793_CLK_SCU_SRC0>, + <&audio_clk_a>, <&audio_clk_b>, <&audio_clk_c>, <&m2_clk>; + clock-names = "ssi-all", + "ssi.9", "ssi.8", "ssi.7", "ssi.6", "ssi.5", + "ssi.4", "ssi.3", "ssi.2", "ssi.1", "ssi.0", + "src.9", "src.8", "src.7", "src.6", "src.5", + "src.4", "src.3", "src.2", "src.1", "src.0", + "clk_a", "clk_b", "clk_c", "clk_i"; + power-domains = <&cpg_clocks>; + + status = "disabled"; + + rcar_sound,src { + src0: src at 0 { }; + src1: src at 1 { }; + src2: src at 2 { }; + src3: src at 3 { }; + src4: src at 4 { }; + src5: src at 5 { }; + src6: src at 6 { }; + src7: src at 7 { }; + src8: src at 8 { }; + src9: src at 9 { }; + }; + + rcar_sound,ssi { + ssi0: ssi at 0 { + interrupts = <0 370 IRQ_TYPE_LEVEL_HIGH>; + }; + ssi1: ssi at 1 { + interrupts = <0 371 IRQ_TYPE_LEVEL_HIGH>; + }; + ssi2: ssi at 2 { + interrupts = <0 372 IRQ_TYPE_LEVEL_HIGH>; + }; + ssi3: ssi at 3 { + interrupts = <0 373 IRQ_TYPE_LEVEL_HIGH>; + }; + ssi4: ssi at 4 { + interrupts = <0 374 IRQ_TYPE_LEVEL_HIGH>; + }; + ssi5: ssi at 5 { + interrupts = <0 375 IRQ_TYPE_LEVEL_HIGH>; + }; + ssi6: ssi at 6 { + interrupts = <0 376 IRQ_TYPE_LEVEL_HIGH>; + }; + ssi7: ssi at 7 { + interrupts = <0 377 IRQ_TYPE_LEVEL_HIGH>; + }; + ssi8: ssi at 8 { + interrupts = <0 378 IRQ_TYPE_LEVEL_HIGH>; + }; + ssi9: ssi at 9 { + interrupts = <0 379 IRQ_TYPE_LEVEL_HIGH>; + }; + }; + }; };
Signature · 1 line
2.1.4
PATCH v2 3/13 ARM: shmobile: r8a7793: add R-Car sound support to device tree
Hi Simon,
Quoted 11 lines · Simon Horman
Instantiate R-Car sound node in r8a7793 device tree. This only supports PIO transfers.
Based on similar work for the r8a7791 by Kuninori Morimoto.
Cc Kuninori Morimoto <[email protected]>Signed-off-by Simon Horman <[email protected]>---
v2
* Added audmapp
Really??
Quoted 16 lines
--- arch/arm/boot/dts/r8a7793.dtsi | 83 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+)arch/arm/boot/dts/r8a7793.dtsi +4
-0@@ -1101,4 +1101,87 @@ #iommu-cells = <1>; status = "disabled"; }; + + rcar_sound: sound at ec500000 { + /* + * #sound-dai-cells is required
arch/arm/boot/dts/r8a7793.dtsi line 1117
Quoted 10 lines
arch/arm/boot/dts/r8a7793.dtsi +10
-0+ * + * Single DAI : #sound-dai-cells = <0>; <&rcar_sound>; + * Multi DAI : #sound-dai-cells = <1>; <&rcar_sound N>; + */ + compatible = "renesas,rcar_sound-r8a7793", "renesas,rcar_sound-gen2"; + reg = <0 0xec500000 0 0x1000>, /* SCU */ + <0 0xec5a0000 0 0x100>, /* ADG */ + <0 0xec540000 0 0x1000>, /* SSIU */ + <0 0xec541000 0 0x280>; /* SSI */ + reg-names = "scu", "adg", "ssiu", "ssi";
No "audmapp"...
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org
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
PATCH v2 3/13 ARM: shmobile: r8a7793: add R-Car sound support to device tree
Quoted 38 lines · Geert Uytterhoeven
Hi Simon,
Quoted 11 lines · Simon Horman
Instantiate R-Car sound node in r8a7793 device tree. This only supports PIO transfers.
Based on similar work for the r8a7791 by Kuninori Morimoto.
Cc Kuninori Morimoto <[email protected]>Signed-off-by Simon Horman <[email protected]>---
v2
* Added audmappReally??
Quoted 20 lines
--- arch/arm/boot/dts/r8a7793.dtsi | 83 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+)arch/arm/boot/dts/r8a7793.dtsi +8
-0@@ -1101,4 +1101,87 @@ #iommu-cells = <1>; status = "disabled"; }; + + rcar_sound: sound at ec500000 { + /* + * #sound-dai-cells is required + * + * Single DAI : #sound-dai-cells = <0>; <&rcar_sound>; + * Multi DAI : #sound-dai-cells = <1>; <&rcar_sound N>; + */
Quoted 8 lines
arch/arm/boot/dts/r8a7793.dtsi line 1117
Quoted 6 lines
arch/arm/boot/dts/r8a7793.dtsi +6
-0+ compatible = "renesas,rcar_sound-r8a7793", "renesas,rcar_sound-gen2"; + reg = <0 0xec500000 0 0x1000>, /* SCU */ + <0 0xec5a0000 0 0x100>, /* ADG */ + <0 0xec540000 0 0x1000>, /* SSIU */ + <0 0xec541000 0 0x280>; /* SSI */ + reg-names = "scu", "adg", "ssiu", "ssi";No "audmapp"...
Sorry about that, audmapp is added by another patch
"ARM: shmobile: r8a7793: enable Audio DMAC peri peri via sound driver".
PATCH v2 4/13 ARM: shmobile: r8a7793: add DVC support to device tree
In reply to Simon HormanAdd DVS support to sound node in r8a7793 device tree.
Based on similar work for the r8a7791 by Kuninori Morimoto.
--- arch/arm/boot/dts/r8a7793.dtsi | 6 ++++++ 1 file changed, 6 insertions(+)
arch/arm/boot/dts/r8a7793.dtsi +6 -0
@@ -1127,17 +1127,23 @@ <&mstp10_clks R8A7793_CLK_SCU_SRC5>, <&mstp10_clks R8A7793_CLK_SCU_SRC4>, <&mstp10_clks R8A7793_CLK_SCU_SRC3>, <&mstp10_clks R8A7793_CLK_SCU_SRC2>, <&mstp10_clks R8A7793_CLK_SCU_SRC1>, <&mstp10_clks R8A7793_CLK_SCU_SRC0>, + <&mstp10_clks R8A7793_CLK_SCU_DVC0>, <&mstp10_clks R8A7793_CLK_SCU_DVC1>, <&audio_clk_a>, <&audio_clk_b>, <&audio_clk_c>, <&m2_clk>; clock-names = "ssi-all", "ssi.9", "ssi.8", "ssi.7", "ssi.6", "ssi.5", "ssi.4", "ssi.3", "ssi.2", "ssi.1", "ssi.0", "src.9", "src.8", "src.7", "src.6", "src.5", "src.4", "src.3", "src.2", "src.1", "src.0", + "dvc.0", "dvc.1", "clk_a", "clk_b", "clk_c", "clk_i"; power-domains = <&cpg_clocks>; status = "disabled"; + rcar_sound,dvc { + dvc0: dvc at 0 { }; + dvc1: dvc at 1 { }; + }; rcar_sound,src { src0: src at 0 { }; src1: src at 1 { };
Signature · 1 line
2.1.4
PATCH v2 4/13 ARM: shmobile: r8a7793: add DVC support to device tree
Hello.
Quoted 1 line · Simon Horman
Add DVS support to sound node in r8a7793 device tree.
So it's DVC or DVS?
Quoted 5 lines
Based on similar work for the r8a7791 by Kuninori Morimoto.
Cc Kuninori Morimoto <[email protected]>Signed-off-by Simon Horman <[email protected]>
[...]
MBR, Sergei
PATCH v2 4/13 ARM: shmobile: r8a7793: add DVC support to device tree
Quoted 7 lines · Sergei Shtylyov
Hello.
Quoted 1 line · Simon Horman
Add DVS support to sound node in r8a7793 device tree.
So it's DVC or DVS?
Thanks, I have updated the changelog to refer to DVC.
PATCH v2 4/13 ARM: shmobile: r8a7793: add DVC support to device tree
In reply to Simon HormanQuoted 1 line · Simon Horman
Add DVS support to sound node in r8a7793 device tree.
Thanks, I have updated the changelog to refer to DVC.
PATCH v2 5/13 ARM: shmobile: r8a7793: add audio DMAC clocks to device tree
In reply to Simon HormanInstantiate Audio DMA clocks in the r8a7791 device tree.
Based on similar work for the r8a7791 by Kuninori Morimoto.
--- arch/arm/boot/dts/r8a7793.dtsi | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
arch/arm/boot/dts/r8a7793.dtsi +4 -3
@@ -924,10 +924,11 @@ mstp5_clks: mstp5_clks at e6150144 { compatible = "renesas,r8a7793-mstp-clocks", "renesas,cpg-mstp-clocks"; reg = <0 0xe6150144 0 4>, <0 0xe615003c 0 4>; - clocks = <&extal_clk>; + clocks = <&hp_clk>, <&hp_clk>, <&extal_clk>; #clock-cells = <1>; - clock-indices = <R8A7793_CLK_THERMAL>; - clock-output-names = "thermal"; + clock-indices = <R8A7793_CLK_AUDIO_DMAC0 R8A7793_CLK_AUDIO_DMAC1 + R8A7793_CLK_THERMAL>; + clock-output-names = "audmac0", "audmac1", "thermal"; }; mstp7_clks: mstp7_clks at e615014c { compatible = "renesas,r8a7793-mstp-clocks",
Signature · 1 line
2.1.4
PATCH v2 6/13 ARM: shmobile: r8a7793: add audio DMAC to device tree
In reply to Simon HormanInstantiate the two Audio DMA controllers in the r8a7791 device tree.
Based on similar work for the r8a7791 by Kuninori Morimoto.
--- arch/arm/boot/dts/r8a7793.dtsi | 58 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+)
arch/arm/boot/dts/r8a7793.dtsi +58 -0
@@ -301,6 +301,64 @@ dma-channels = <15>; }; + audma0: dma-controller at ec700000 { + compatible = "renesas,dmac-r8a7793", "renesas,rcar-dmac"; + reg = <0 0xec700000 0 0x10000>; + interrupts = <0 346 IRQ_TYPE_LEVEL_HIGH + 0 320 IRQ_TYPE_LEVEL_HIGH + 0 321 IRQ_TYPE_LEVEL_HIGH + 0 322 IRQ_TYPE_LEVEL_HIGH + 0 323 IRQ_TYPE_LEVEL_HIGH + 0 324 IRQ_TYPE_LEVEL_HIGH + 0 325 IRQ_TYPE_LEVEL_HIGH + 0 326 IRQ_TYPE_LEVEL_HIGH + 0 327 IRQ_TYPE_LEVEL_HIGH + 0 328 IRQ_TYPE_LEVEL_HIGH + 0 329 IRQ_TYPE_LEVEL_HIGH + 0 330 IRQ_TYPE_LEVEL_HIGH + 0 331 IRQ_TYPE_LEVEL_HIGH + 0 332 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "error", + "ch0", "ch1", "ch2", "ch3", + "ch4", "ch5", "ch6", "ch7", + "ch8", "ch9", "ch10", "ch11", + "ch12"; + clocks = <&mstp5_clks R8A7793_CLK_AUDIO_DMAC0>; + clock-names = "fck"; + power-domains = <&cpg_clocks>; + #dma-cells = <1>; + dma-channels = <13>; + }; + + audma1: dma-controller at ec720000 { + compatible = "renesas,dmac-r8a7793", "renesas,rcar-dmac"; + reg = <0 0xec720000 0 0x10000>; + interrupts = <0 347 IRQ_TYPE_LEVEL_HIGH + 0 333 IRQ_TYPE_LEVEL_HIGH + 0 334 IRQ_TYPE_LEVEL_HIGH + 0 335 IRQ_TYPE_LEVEL_HIGH + 0 336 IRQ_TYPE_LEVEL_HIGH + 0 337 IRQ_TYPE_LEVEL_HIGH + 0 338 IRQ_TYPE_LEVEL_HIGH + 0 339 IRQ_TYPE_LEVEL_HIGH + 0 340 IRQ_TYPE_LEVEL_HIGH + 0 341 IRQ_TYPE_LEVEL_HIGH + 0 342 IRQ_TYPE_LEVEL_HIGH + 0 343 IRQ_TYPE_LEVEL_HIGH + 0 344 IRQ_TYPE_LEVEL_HIGH + 0 345 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "error", + "ch0", "ch1", "ch2", "ch3", + "ch4", "ch5", "ch6", "ch7", + "ch8", "ch9", "ch10", "ch11", + "ch12"; + clocks = <&mstp5_clks R8A7793_CLK_AUDIO_DMAC1>; + clock-names = "fck"; + power-domains = <&cpg_clocks>; + #dma-cells = <1>; + dma-channels = <13>; + }; + /* The memory map in the User's Manual maps the cores to bus numbers */ i2c0: i2c at e6508000 { #address-cells = <1>;
Signature · 1 line
2.1.4
PATCH v2 7/13 ARM: shmobile: r8a7793: enable Audio DMAC peri peri via sound driver
In reply to Simon HormanAudio DMAC peri peri is no longer DMAEngine. it is supported by sound driver. this patch enable it.
Base on work for the r8a7791 by Kuninori Morimoto.
---
v2
* New patch
--- arch/arm/boot/dts/r8a7793.dtsi | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
arch/arm/boot/dts/r8a7793.dtsi +3 -2
@@ -1172,8 +1172,9 @@ reg = <0 0xec500000 0 0x1000>, /* SCU */ <0 0xec5a0000 0 0x100>, /* ADG */ <0 0xec540000 0 0x1000>, /* SSIU */ - <0 0xec541000 0 0x280>; /* SSI */ - reg-names = "scu", "adg", "ssiu", "ssi"; + <0 0xec541000 0 0x280>, /* SSI */ + <0 0xec740000 0 0x200>; /* Audio DMAC peri peri*/ + reg-names = "scu", "adg", "ssiu", "ssi", "audmapp"; clocks = <&mstp10_clks R8A7793_CLK_SSI_ALL>, <&mstp10_clks R8A7793_CLK_SSI9>, <&mstp10_clks R8A7793_CLK_SSI8>,
Signature · 1 line
2.1.4
PATCH v2 8/13 ARM: shmobile: gose: Enable sound PIO support in device tree
In reply to Simon HormanEnable sound PIO support in the r8a7793/gose device tree.
Based on similar work for the r8a7791/koelsch by Kuninori Morimoto.
--- arch/arm/boot/dts/r8a7793-gose.dts | 76 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+)
arch/arm/boot/dts/r8a7793-gose.dts +76 -0
@@ -8,6 +8,17 @@ * 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 "r8a7793.dtsi" #include <dt-bindings/gpio/gpio.h>
@@ -129,6 +140,30 @@ label = "LED8"; }; }; + + audio_clock: clock { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <11289600>; + clock-output-names = "audio_clock"; + }; + + rsnd_ak4643: 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>; + clocks = <&audio_clock>; + }; + }; }; &extal_clk {
@@ -165,6 +200,16 @@ renesas,groups = "qspi_ctrl", "qspi_data4"; renesas,function = "qspi"; }; + + 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 {
@@ -247,9 +292,40 @@ status = "okay"; clock-frequency = <100000>; + ak4643: codec at 12 { + compatible = "asahi-kasei,ak4643"; + #sound-dai-cells = <0>; + reg = <0x12>; + }; eeprom at 50 { compatible = "renesas,r1ex24002", "atmel,24c02"; reg = <0x50>; pagesize = <16>; }; }; + +&rcar_sound { + pinctrl-0 = <&sound_pins &sound_clk_pins>; + pinctrl-names = "default"; + + /* Single DAI */ + #sound-dai-cells = <0>; + + status = "okay"; + + rcar_sound,dai { + dai0 { + playback = <&ssi0>; + capture = <&ssi1>; + }; + }; +}; + +&ssi0 { + pio-transfer; +}; + +&ssi1 { + pio-transfer; + shared-pin; +};
Signature · 1 line
2.1.4
PATCH v2 9/13 ARM: shmobile: gose: enable sound DMA support in device tree
In reply to Simon HormanEnable DMA transfer to/from SSI in r8a7793/gose device tree.
DMA
[MEM] -> [SSI]
DMA
[MEM] <- [SSI]
Based on similar work for the r8a7791/koelsch by Kuninori Morimoto.
--- arch/arm/boot/dts/r8a7793-gose.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/boot/dts/r8a7793-gose.dts +2 -2
@@ -322,10 +322,10 @@ }; &ssi0 { - pio-transfer; + no-busif; }; &ssi1 { - pio-transfer; + no-busif; shared-pin; };
Signature · 1 line
2.1.4
PATCH v2 10/13 ARM: shmobile: gose: enable sound DMA support via BUSIF in device tree
In reply to Simon HormanEnable DMA transfer to/from SSIU in gose/r8a7791 device tree.
DMA
[MEM] -> [SSIU] -> [SSI]
DMA
[MEM] <- [SSIU] <- [SSI]
Based on similar work for the r8a7791/koelsch by Kuninori Morimoto.
--- arch/arm/boot/dts/r8a7793-gose.dts | 5 ----- 1 file changed, 5 deletions(-)
arch/arm/boot/dts/r8a7793-gose.dts +0 -5
@@ -321,11 +321,6 @@ }; }; -&ssi0 { - no-busif; -}; - &ssi1 { - no-busif; shared-pin; };
Signature · 1 line
2.1.4
PATCH v2 11/13 ARM: shmobile: gose: enable sound DMA support via SRC in device tree
In reply to Simon HormanEnable DMA transfer to/from SRC in r8a7793/gose device tree.
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
Based on similar work for the r8a7791/koeslch by Kuninori Morimoto.
--- arch/arm/boot/dts/r8a7793-gose.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/boot/dts/r8a7793-gose.dts +2 -2
@@ -315,8 +315,8 @@ rcar_sound,dai { dai0 { - playback = <&ssi0>; - capture = <&ssi1>; + playback = <&ssi0 &src2>; + capture = <&ssi1 &src3>; }; }; };
Signature · 1 line
2.1.4
PATCH v2 12/13 ARM: shmobile: gose: enable sound DMA support via DVC in device tree
In reply to Simon HormanEnable DMA transfer using DVC in r8a7793/gose device tree.
DMA DMApp
[MEM] -> [SRC] -> [DVC] -> [SSIU] -> [SSI]
DMA DMApp
[MEM] <- [DVC] <- [SRC] <- [SSIU] <- [SSI]
Based on similar work for the r8a7791/koelsch by Kuninori Morimoto.
--- arch/arm/boot/dts/r8a7793-gose.dts | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-)
arch/arm/boot/dts/r8a7793-gose.dts +19 -2
@@ -18,7 +18,24 @@ * 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 + * + * 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/; #include "r8a7793.dtsi" #include <dt-bindings/gpio/gpio.h>
@@ -315,8 +332,8 @@ rcar_sound,dai { dai0 { - playback = <&ssi0 &src2>; - capture = <&ssi1 &src3>; + playback = <&ssi0 &src2 &dvc0>; + capture = <&ssi1 &src3 &dvc1>; }; }; };
Signature · 1 line
2.1.4
PATCH v2 13/13 ARM: shmobile: r8a7793: enable audio DMAC in device tree
In reply to Simon HormanEnable audio DMAC (= rcar-dmac) in r8a7793 device tree.
Based on similar work for the r8a7791 by Kuninori Morimoto.
--- arch/arm/boot/dts/r8a7793.dtsi | 91 ++++++++++++++++++++++++++++++++++++------ 1 file changed, 79 insertions(+), 12 deletions(-)
arch/arm/boot/dts/r8a7793.dtsi +79 -12
@@ -1201,52 +1201,119 @@ status = "disabled"; rcar_sound,dvc { - dvc0: dvc at 0 { }; - dvc1: dvc at 1 { }; + dvc0: dvc at 0 { + dmas = <&audma0 0xbc>; + dma-names = "tx"; + }; + dvc1: dvc at 1 { + dmas = <&audma0 0xbe>; + dma-names = "tx"; + }; }; + rcar_sound,src { - src0: src at 0 { }; - src1: src at 1 { }; - src2: src at 2 { }; - src3: src at 3 { }; - src4: src at 4 { }; - src5: src at 5 { }; - src6: src at 6 { }; - src7: src at 7 { }; - src8: src at 8 { }; - src9: src at 9 { }; + src0: src at 0 { + interrupts = <0 352 IRQ_TYPE_LEVEL_HIGH>; + dmas = <&audma0 0x85>, <&audma1 0x9a>; + dma-names = "rx", "tx"; + }; + src1: src at 1 { + interrupts = <0 353 IRQ_TYPE_LEVEL_HIGH>; + dmas = <&audma0 0x87>, <&audma1 0x9c>; + dma-names = "rx", "tx"; + }; + src2: src at 2 { + interrupts = <0 354 IRQ_TYPE_LEVEL_HIGH>; + dmas = <&audma0 0x89>, <&audma1 0x9e>; + dma-names = "rx", "tx"; + }; + src3: src at 3 { + interrupts = <0 355 IRQ_TYPE_LEVEL_HIGH>; + dmas = <&audma0 0x8b>, <&audma1 0xa0>; + dma-names = "rx", "tx"; + }; + src4: src at 4 { + interrupts = <0 356 IRQ_TYPE_LEVEL_HIGH>; + dmas = <&audma0 0x8d>, <&audma1 0xb0>; + dma-names = "rx", "tx"; + }; + src5: src at 5 { + interrupts = <0 357 IRQ_TYPE_LEVEL_HIGH>; + dmas = <&audma0 0x8f>, <&audma1 0xb2>; + dma-names = "rx", "tx"; + }; + src6: src at 6 { + interrupts = <0 358 IRQ_TYPE_LEVEL_HIGH>; + dmas = <&audma0 0x91>, <&audma1 0xb4>; + dma-names = "rx", "tx"; + }; + src7: src at 7 { + interrupts = <0 359 IRQ_TYPE_LEVEL_HIGH>; + dmas = <&audma0 0x93>, <&audma1 0xb6>; + dma-names = "rx", "tx"; + }; + src8: src at 8 { + interrupts = <0 360 IRQ_TYPE_LEVEL_HIGH>; + dmas = <&audma0 0x95>, <&audma1 0xb8>; + dma-names = "rx", "tx"; + }; + src9: src at 9 { + interrupts = <0 361 IRQ_TYPE_LEVEL_HIGH>; + dmas = <&audma0 0x97>, <&audma1 0xba>; + dma-names = "rx", "tx"; + }; }; rcar_sound,ssi { ssi0: ssi at 0 { interrupts = <0 370 IRQ_TYPE_LEVEL_HIGH>; + dmas = <&audma0 0x01>, <&audma1 0x02>, <&audma0 0x15>, <&audma1 0x16>; + dma-names = "rx", "tx", "rxu", "txu"; }; ssi1: ssi at 1 { interrupts = <0 371 IRQ_TYPE_LEVEL_HIGH>; + dmas = <&audma0 0x03>, <&audma1 0x04>, <&audma0 0x49>, <&audma1 0x4a>; + dma-names = "rx", "tx", "rxu", "txu"; }; ssi2: ssi at 2 { interrupts = <0 372 IRQ_TYPE_LEVEL_HIGH>; + dmas = <&audma0 0x05>, <&audma1 0x06>, <&audma0 0x63>, <&audma1 0x64>; + dma-names = "rx", "tx", "rxu", "txu"; }; ssi3: ssi at 3 { interrupts = <0 373 IRQ_TYPE_LEVEL_HIGH>; + dmas = <&audma0 0x07>, <&audma1 0x08>, <&audma0 0x6f>, <&audma1 0x70>; + dma-names = "rx", "tx", "rxu", "txu"; }; ssi4: ssi at 4 { interrupts = <0 374 IRQ_TYPE_LEVEL_HIGH>; + dmas = <&audma0 0x09>, <&audma1 0x0a>, <&audma0 0x71>, <&audma1 0x72>; + dma-names = "rx", "tx", "rxu", "txu"; }; ssi5: ssi at 5 { interrupts = <0 375 IRQ_TYPE_LEVEL_HIGH>; + dmas = <&audma0 0x0b>, <&audma1 0x0c>, <&audma0 0x73>, <&audma1 0x74>; + dma-names = "rx", "tx", "rxu", "txu"; }; ssi6: ssi at 6 { interrupts = <0 376 IRQ_TYPE_LEVEL_HIGH>; + dmas = <&audma0 0x0d>, <&audma1 0x0e>, <&audma0 0x75>, <&audma1 0x76>; + dma-names = "rx", "tx", "rxu", "txu"; }; ssi7: ssi at 7 { interrupts = <0 377 IRQ_TYPE_LEVEL_HIGH>; + dmas = <&audma0 0x0f>, <&audma1 0x10>, <&audma0 0x79>, <&audma1 0x7a>; + dma-names = "rx", "tx", "rxu", "txu"; }; ssi8: ssi at 8 { interrupts = <0 378 IRQ_TYPE_LEVEL_HIGH>; + dmas = <&audma0 0x11>, <&audma1 0x12>, <&audma0 0x7b>, <&audma1 0x7c>; + dma-names = "rx", "tx", "rxu", "txu"; }; ssi9: ssi at 9 { interrupts = <0 379 IRQ_TYPE_LEVEL_HIGH>; + dmas = <&audma0 0x13>, <&audma1 0x14>, <&audma0 0x7d>, <&audma1 0x7e>; + dma-names = "rx", "tx", "rxu", "txu"; }; }; };
Signature · 1 line
2.1.4