ARM: shmobile: armadillo800eva dts: Correct extal1 frequency to 24 MHz
Subsystems (3)
PATCH 1/1 ARM: shmobile: armadillo800eva dts: Correct extal1 frequency to 24 MHz
On r8a7740/armadillo, actual clock rates are ca. 4% lower than reported by /sys/kernel/debug/clk/clk_summary. Correct the extal1 frequency from 25 MHz to 24 MHz to fix this.
This matches the Armadillo-800 EVA Product Manual, which claims the main crystal runs at 24 MHz, and the old legacy/reference board code.
--- arch/arm/boot/dts/r8a7740-armadillo800eva.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/r8a7740-armadillo800eva.dts +1 -1
@@ -180,7 +180,7 @@ }; &extal1_clk { - clock-frequency = <25000000>; + clock-frequency = <24000000>; }; &extal2_clk { clock-frequency = <48000000>;
Signature · 1 line
1.9.1
Quoted 6 lines · Geert Uytterhoeven
On r8a7740/armadillo, actual clock rates are ca. 4% lower than reported by
/sys/kernel/debug/clk/clk_summary. Correct the extal1 frequency from 25 MHz to 24 MHz to fix this.This matches the Armadillo-800 EVA Product Manual, which claims the main crystal runs at 24 MHz, and the old legacy/reference board code.
Ping? I think we want this applied to -stable and -ltsi, too.
Quoted 19 lines
Signed-off-by Geert Uytterhoeven <[email protected]>--- arch/arm/boot/dts/r8a7740-armadillo800eva.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/arm/boot/dts/r8a7740-armadillo800eva.dts +1
-2@@ -180,7 +180,7 @@ }; &extal1_clk { - clock-frequency = <25000000>; + clock-frequency = <24000000>; }; &extal2_clk { clock-frequency = <48000000>; --
Quoted 1 line
1.9.1
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
Quoted 10 lines · Geert Uytterhoeven
Quoted 6 lines · Geert Uytterhoeven
On r8a7740/armadillo, actual clock rates are ca. 4% lower than reported by
/sys/kernel/debug/clk/clk_summary. Correct the extal1 frequency from 25 MHz to 24 MHz to fix this.This matches the Armadillo-800 EVA Product Manual, which claims the main crystal runs at 24 MHz, and the old legacy/reference board code.
Ping? I think we want this applied to -stable and -ltsi, too.
Sorry for letting this slip through the cracks.
I have queued up the following as a fix for v4.5.
From: Geert Uytterhoeven <[email protected]>
Subject: [PATCH] ARM: dts: armadillo800eva Correct extal1 frequency to 24 MHz
On r8a7740/armadillo, actual clock rates are ca. 4% lower than reported by /sys/kernel/debug/clk/clk_summary. Correct the extal1 frequency from 25 MHz to 24 MHz to fix this.
This matches the Armadillo-800 EVA Product Manual, which claims the main crystal runs at 24 MHz, and the old legacy/reference board code.
--- arch/arm/boot/dts/r8a7740-armadillo800eva.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/r8a7740-armadillo800eva.dts +1 -1
@@ -180,7 +180,7 @@ }; &extal1_clk { - clock-frequency = <25000000>; + clock-frequency = <24000000>; }; &extal2_clk { clock-frequency = <48000000>;
Signature · 18 lines
2.1.4 -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html 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. Cc: Kuninori Morimoto <[email protected]> Acked-by: Geert Uytterhoeven <[email protected]> Signed-off-by: Simon Horman <[email protected]> --- 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@e6150000 { compatible = "renesas,r8a7793-cpg-clocks",
Signature · 1 line
2.1.4
v4 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.
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-20160111-v4.4 and has no other dependencies that I am aware of.
Changes between v3 and v4
* Use GIC_SPI in interrupt properties
Changes between v2 and v3
* Minor changelog tweaks
Changes since v1 and v2:
* 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 (14):
ARM: dts: r8a7793: add MSTP10 clocks to device tree
ARM: dts: r8a7793: add audio clock to device tree
ARM: dts: r8a7793: add m2 clock to device tree
ARM: dts: r8a7793: add R-Car sound support to device tree
ARM: dts: r8a7793: add DVC support to device tree
ARM: dts: r8a7793: add audio DMAC clocks to device tree
ARM: dts: r8a7793: add audio DMAC to device tree
ARM: dts: r8a7793: enable Audio DMAC peri peri via sound driver
ARM: dts: gose: Enable sound PIO support in device tree
ARM: dts: gose: enable sound DMA support in device tree
ARM: dts: gose: enable sound DMA support via BUSIF in device tree
ARM: dts: gose: enable sound DMA support via SRC in device tree
ARM: dts: gose: enable sound DMA support via DVC in device tree
ARM: dts: r8a7793: enable audio DMAC in device tree
arch/arm/boot/dts/r8a7793-gose.dts | 88 +++++++++ arch/arm/boot/dts/r8a7793.dtsi | 289 +++++++++++++++++++++++++++++- include/dt-bindings/clock/r8a7793-clock.h | 2 + 3 files changed, 376 insertions(+), 3 deletions(-)
Signature · 1 line
2.1.4
PATCH v4 1/14 ARM: dts: r8a7793: add MSTP10 clocks to device tree
Instantiate MSTP10 clocks in r8a7793 device tree.
Based on similar work for the r8a7791 by Kuninori Morimoto.
--- arch/arm/boot/dts/r8a7793.dtsi | 36 +++++++++++++++++++++++++++++++ include/dt-bindings/clock/r8a7793-clock.h | 2 ++ 2 files changed, 38 insertions(+)
arch/arm/boot/dts/r8a7793.dtsi +36 -0
@@ -963,6 +963,42 @@ "qspi_mod", "i2c5", "i2c6", "i2c4", "i2c3", "i2c2", "i2c1", "i2c0"; }; + mstp10_clks: mstp10_clks at e6150998 { + compatible = "renesas,r8a7793-mstp-clocks", "renesas,cpg-mstp-clocks"; + reg = <0 0xe6150998 0 4>, <0 0xe61509a8 0 4>; + clocks = <&p_clk>, + <&p_clk>, <&p_clk>, <&p_clk>, <&p_clk>, <&p_clk>, + <&p_clk>, <&p_clk>, <&p_clk>, <&p_clk>, <&p_clk>, + <&p_clk>, + <&mstp10_clks R8A7793_CLK_SCU_ALL>, <&mstp10_clks R8A7793_CLK_SCU_ALL>, + <&mstp10_clks R8A7793_CLK_SCU_ALL>, <&mstp10_clks R8A7793_CLK_SCU_ALL>, + <&mstp10_clks R8A7793_CLK_SCU_ALL>, <&mstp10_clks R8A7793_CLK_SCU_ALL>, + <&mstp10_clks R8A7793_CLK_SCU_ALL>, <&mstp10_clks R8A7793_CLK_SCU_ALL>, + <&mstp10_clks R8A7793_CLK_SCU_ALL>, <&mstp10_clks R8A7793_CLK_SCU_ALL>, + <&mstp10_clks R8A7793_CLK_SCU_ALL>, <&mstp10_clks R8A7793_CLK_SCU_ALL>, + <&mstp10_clks R8A7793_CLK_SCU_ALL>, <&mstp10_clks R8A7793_CLK_SCU_ALL>; + + #clock-cells = <1>; + clock-indices = < + R8A7793_CLK_SSI_ALL + R8A7793_CLK_SSI9 R8A7793_CLK_SSI8 R8A7793_CLK_SSI7 R8A7793_CLK_SSI6 R8A7793_CLK_SSI5 + R8A7793_CLK_SSI4 R8A7793_CLK_SSI3 R8A7793_CLK_SSI2 R8A7793_CLK_SSI1 R8A7793_CLK_SSI0 + R8A7793_CLK_SCU_ALL + R8A7793_CLK_SCU_DVC1 R8A7793_CLK_SCU_DVC0 + R8A7793_CLK_SCU_CTU1_MIX1 R8A7793_CLK_SCU_CTU0_MIX0 + R8A7793_CLK_SCU_SRC9 R8A7793_CLK_SCU_SRC8 R8A7793_CLK_SCU_SRC7 R8A7793_CLK_SCU_SRC6 R8A7793_CLK_SCU_SRC5 + R8A7793_CLK_SCU_SRC4 R8A7793_CLK_SCU_SRC3 R8A7793_CLK_SCU_SRC2 R8A7793_CLK_SCU_SRC1 R8A7793_CLK_SCU_SRC0 + >; + clock-output-names = + "ssi-all", + "ssi9", "ssi8", "ssi7", "ssi6", "ssi5", + "ssi4", "ssi3", "ssi2", "ssi1", "ssi0", + "scu-all", + "scu-dvc1", "scu-dvc0", + "scu-ctu1-mix1", "scu-ctu0-mix0", + "scu-src9", "scu-src8", "scu-src7", "scu-src6", "scu-src5", + "scu-src4", "scu-src3", "scu-src2", "scu-src1", "scu-src0"; + }; mstp11_clks: mstp11_clks at e615099c { compatible = "renesas,r8a7793-mstp-clocks", "renesas,cpg-mstp-clocks"; reg = <0 0xe615099c 0 4>, <0 0xe61509ac 0 4>;
include/dt-bindings/clock/r8a7793-clock.h +2 -0
@@ -145,6 +145,8 @@#define R8A7793_CLK_SCU_ALL 17#define R8A7793_CLK_SCU_DVC1 18#define R8A7793_CLK_SCU_DVC0 19 +#define R8A7793_CLK_SCU_CTU1_MIX1 20 +#define R8A7793_CLK_SCU_CTU0_MIX0 21#define R8A7793_CLK_SCU_SRC9 22#define R8A7793_CLK_SCU_SRC8 23#define R8A7793_CLK_SCU_SRC7 24
Signature · 1 line
2.1.4
PATCH v4 2/14 ARM: dts: r8a7793: add audio clock to device tree
In reply to Simon HormanInstantiate 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 v4 3/14 ARM: dts: 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 v4 4/14 ARM: dts: 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.
---
v4
* Use GIC_SPI
--- 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 = <GIC_SPI 370 IRQ_TYPE_LEVEL_HIGH>; + }; + ssi1: ssi at 1 { + interrupts = <GIC_SPI 371 IRQ_TYPE_LEVEL_HIGH>; + }; + ssi2: ssi at 2 { + interrupts = <GIC_SPI 372 IRQ_TYPE_LEVEL_HIGH>; + }; + ssi3: ssi at 3 { + interrupts = <GIC_SPI 373 IRQ_TYPE_LEVEL_HIGH>; + }; + ssi4: ssi at 4 { + interrupts = <GIC_SPI 374 IRQ_TYPE_LEVEL_HIGH>; + }; + ssi5: ssi at 5 { + interrupts = <GIC_SPI 375 IRQ_TYPE_LEVEL_HIGH>; + }; + ssi6: ssi at 6 { + interrupts = <GIC_SPI 376 IRQ_TYPE_LEVEL_HIGH>; + }; + ssi7: ssi at 7 { + interrupts = <GIC_SPI 377 IRQ_TYPE_LEVEL_HIGH>; + }; + ssi8: ssi at 8 { + interrupts = <GIC_SPI 378 IRQ_TYPE_LEVEL_HIGH>; + }; + ssi9: ssi at 9 { + interrupts = <GIC_SPI 379 IRQ_TYPE_LEVEL_HIGH>; + }; + }; + }; };
Signature · 1 line
2.1.4
PATCH v4 5/14 ARM: dts: r8a7793: add DVC support to device tree
In reply to Simon HormanAdd DVC support to sound node in r8a7793 device tree.
Based on similar work for the r8a7791 by Kuninori Morimoto.
---
v3
* Updated changelog to refer to DVC
--- 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 v4 6/14 ARM: dts: 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 v4 7/14 ARM: dts: 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 = <GIC_SPI 346 IRQ_TYPE_LEVEL_HIGH + GIC_SPI 320 IRQ_TYPE_LEVEL_HIGH + GIC_SPI 321 IRQ_TYPE_LEVEL_HIGH + GIC_SPI 322 IRQ_TYPE_LEVEL_HIGH + GIC_SPI 323 IRQ_TYPE_LEVEL_HIGH + GIC_SPI 324 IRQ_TYPE_LEVEL_HIGH + GIC_SPI 325 IRQ_TYPE_LEVEL_HIGH + GIC_SPI 326 IRQ_TYPE_LEVEL_HIGH + GIC_SPI 327 IRQ_TYPE_LEVEL_HIGH + GIC_SPI 328 IRQ_TYPE_LEVEL_HIGH + GIC_SPI 329 IRQ_TYPE_LEVEL_HIGH + GIC_SPI 330 IRQ_TYPE_LEVEL_HIGH + GIC_SPI 331 IRQ_TYPE_LEVEL_HIGH + GIC_SPI 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 = <GIC_SPI 347 IRQ_TYPE_LEVEL_HIGH + GIC_SPI 333 IRQ_TYPE_LEVEL_HIGH + GIC_SPI 334 IRQ_TYPE_LEVEL_HIGH + GIC_SPI 335 IRQ_TYPE_LEVEL_HIGH + GIC_SPI 336 IRQ_TYPE_LEVEL_HIGH + GIC_SPI 337 IRQ_TYPE_LEVEL_HIGH + GIC_SPI 338 IRQ_TYPE_LEVEL_HIGH + GIC_SPI 339 IRQ_TYPE_LEVEL_HIGH + GIC_SPI 340 IRQ_TYPE_LEVEL_HIGH + GIC_SPI 341 IRQ_TYPE_LEVEL_HIGH + GIC_SPI 342 IRQ_TYPE_LEVEL_HIGH + GIC_SPI 343 IRQ_TYPE_LEVEL_HIGH + GIC_SPI 344 IRQ_TYPE_LEVEL_HIGH + GIC_SPI 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 v4 8/14 ARM: dts: 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 v4 9/14 ARM: dts: 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 v4 10/14 ARM: dts: 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 v4 11/14 ARM: dts: 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 v4 12/14 ARM: dts: 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 v4 13/14 ARM: dts: 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 v4 14/14 ARM: dts: 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.
---
v4
* Use GIC_SPI in interrupts properties
--- 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 = <GIC_SPI 352 IRQ_TYPE_LEVEL_HIGH>; + dmas = <&audma0 0x85>, <&audma1 0x9a>; + dma-names = "rx", "tx"; + }; + src1: src at 1 { + interrupts = <GIC_SPI 353 IRQ_TYPE_LEVEL_HIGH>; + dmas = <&audma0 0x87>, <&audma1 0x9c>; + dma-names = "rx", "tx"; + }; + src2: src at 2 { + interrupts = <GIC_SPI 354 IRQ_TYPE_LEVEL_HIGH>; + dmas = <&audma0 0x89>, <&audma1 0x9e>; + dma-names = "rx", "tx"; + }; + src3: src at 3 { + interrupts = <GIC_SPI 355 IRQ_TYPE_LEVEL_HIGH>; + dmas = <&audma0 0x8b>, <&audma1 0xa0>; + dma-names = "rx", "tx"; + }; + src4: src at 4 { + interrupts = <GIC_SPI 356 IRQ_TYPE_LEVEL_HIGH>; + dmas = <&audma0 0x8d>, <&audma1 0xb0>; + dma-names = "rx", "tx"; + }; + src5: src at 5 { + interrupts = <GIC_SPI 357 IRQ_TYPE_LEVEL_HIGH>; + dmas = <&audma0 0x8f>, <&audma1 0xb2>; + dma-names = "rx", "tx"; + }; + src6: src at 6 { + interrupts = <GIC_SPI 358 IRQ_TYPE_LEVEL_HIGH>; + dmas = <&audma0 0x91>, <&audma1 0xb4>; + dma-names = "rx", "tx"; + }; + src7: src at 7 { + interrupts = <GIC_SPI 359 IRQ_TYPE_LEVEL_HIGH>; + dmas = <&audma0 0x93>, <&audma1 0xb6>; + dma-names = "rx", "tx"; + }; + src8: src at 8 { + interrupts = <GIC_SPI 360 IRQ_TYPE_LEVEL_HIGH>; + dmas = <&audma0 0x95>, <&audma1 0xb8>; + dma-names = "rx", "tx"; + }; + src9: src at 9 { + interrupts = <GIC_SPI 361 IRQ_TYPE_LEVEL_HIGH>; + dmas = <&audma0 0x97>, <&audma1 0xba>; + dma-names = "rx", "tx"; + }; }; rcar_sound,ssi { ssi0: ssi at 0 { interrupts = <GIC_SPI 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 = <GIC_SPI 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 = <GIC_SPI 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 = <GIC_SPI 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 = <GIC_SPI 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 = <GIC_SPI 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 = <GIC_SPI 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 = <GIC_SPI 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 = <GIC_SPI 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 = <GIC_SPI 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
v4 cover r8a7793, gose: Add audio support to device tree
In reply to Simon HormanQuoted 8 lines · Simon Horman
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.
I have been able to perform some basic testing and have queued up this series.
Quoted 5 lines
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-20160111-v4.4 and has no other dependencies that I am aware of.
[snip]