devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] ARM: sunxi: Add SPDIF playback support
@ 2016-02-27 16:18 codekipper-Re5JQEeQqe8AvxtiuMwx3w
       [not found] ` <1456589909-2428-1-git-send-email-codekipper-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 9+ messages in thread
From: codekipper-Re5JQEeQqe8AvxtiuMwx3w @ 2016-02-27 16:18 UTC (permalink / raw)
  To: maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw,
	ennesimamail.av-Re5JQEeQqe8AvxtiuMwx3w, Marcus Cooper

From: Marcus Cooper <codekipper-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

Hi All,

now that the sun4i-spdif driver has made it into linux-next then this patch
series completes what is needed to have SPDIF working on both A10 and A20
devices.

Enjoy,
CK

Andrea Venturi (1):
  clk: sunxi: mod1 clock should modify it's parent

Marcus Cooper (4):
  ARM: dts :sunxi: Add SPDIF pins to A10 and A20
  ARM: dts: sunxi: Add the SPDIF to the A10 and A20
  ARM: dts: sun4i: Add SPDIF to the Mele A1000
  ARM: dts: sun7i: Add SPDIF to Itead Ibox

 arch/arm/boot/dts/sun4i-a10-a1000.dts      | 23 ++++++++++++++++
 arch/arm/boot/dts/sun4i-a10.dtsi           | 44 ++++++++++++++++++++++++++++++
 arch/arm/boot/dts/sun7i-a20-itead-ibox.dts | 24 ++++++++++++++++
 arch/arm/boot/dts/sun7i-a20.dtsi           | 44 ++++++++++++++++++++++++++++++
 drivers/clk/sunxi/clk-a10-mod1.c           |  2 +-
 5 files changed, 136 insertions(+), 1 deletion(-)

-- 
2.7.1

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 1/5] clk: sunxi: mod1 clock should modify it's parent
       [not found] ` <1456589909-2428-1-git-send-email-codekipper-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2016-02-27 16:18   ` codekipper-Re5JQEeQqe8AvxtiuMwx3w
  2016-02-27 16:18   ` [PATCH 2/5] ARM: dts :sunxi: Add SPDIF pins to A10 and A20 codekipper-Re5JQEeQqe8AvxtiuMwx3w
                     ` (3 subsequent siblings)
  4 siblings, 0 replies; 9+ messages in thread
From: codekipper-Re5JQEeQqe8AvxtiuMwx3w @ 2016-02-27 16:18 UTC (permalink / raw)
  To: maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw,
	ennesimamail.av-Re5JQEeQqe8AvxtiuMwx3w, Marcus Cooper

From: Andrea Venturi <ennesimamail.av-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

add CLK_SET_RATE_PARENT to modify the rate on clk upstream

Signed-off-by: Marcus Cooper <codekipper-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
 drivers/clk/sunxi/clk-a10-mod1.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/sunxi/clk-a10-mod1.c b/drivers/clk/sunxi/clk-a10-mod1.c
index e9d870d..e2819fa 100644
--- a/drivers/clk/sunxi/clk-a10-mod1.c
+++ b/drivers/clk/sunxi/clk-a10-mod1.c
@@ -62,7 +62,7 @@ static void __init sun4i_mod1_clk_setup(struct device_node *node)
 	clk = clk_register_composite(NULL, clk_name, parents, i,
 				     &mux->hw, &clk_mux_ops,
 				     NULL, NULL,
-				     &gate->hw, &clk_gate_ops, 0);
+				     &gate->hw, &clk_gate_ops, CLK_SET_RATE_PARENT);
 	if (IS_ERR(clk))
 		goto err_free_gate;
 
-- 
2.7.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 2/5] ARM: dts :sunxi: Add SPDIF pins to A10 and A20
       [not found] ` <1456589909-2428-1-git-send-email-codekipper-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  2016-02-27 16:18   ` [PATCH 1/5] clk: sunxi: mod1 clock should modify it's parent codekipper-Re5JQEeQqe8AvxtiuMwx3w
@ 2016-02-27 16:18   ` codekipper-Re5JQEeQqe8AvxtiuMwx3w
  2016-02-27 16:18   ` [PATCH 3/5] ARM: dts: sunxi: Add the SPDIF to the " codekipper-Re5JQEeQqe8AvxtiuMwx3w
                     ` (2 subsequent siblings)
  4 siblings, 0 replies; 9+ messages in thread
From: codekipper-Re5JQEeQqe8AvxtiuMwx3w @ 2016-02-27 16:18 UTC (permalink / raw)
  To: maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw,
	ennesimamail.av-Re5JQEeQqe8AvxtiuMwx3w, Marcus Cooper

From: Marcus Cooper <codekipper-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

Add the SPDIF pins to the A10 and A20 dtsi.

Signed-off-by: Marcus Cooper <codekipper-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
 arch/arm/boot/dts/sun4i-a10.dtsi | 21 +++++++++++++++++++++
 arch/arm/boot/dts/sun7i-a20.dtsi | 21 +++++++++++++++++++++
 2 files changed, 42 insertions(+)

diff --git a/arch/arm/boot/dts/sun4i-a10.dtsi b/arch/arm/boot/dts/sun4i-a10.dtsi
index 2c8f5e6..0483640 100644
--- a/arch/arm/boot/dts/sun4i-a10.dtsi
+++ b/arch/arm/boot/dts/sun4i-a10.dtsi
@@ -1006,6 +1006,27 @@
 				allwinner,drive = <SUN4I_PINCTRL_10_MA>;
 				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
 			};
+
+			spdif_tx_pins_a: spdif@0 {
+				allwinner,pins = "PB13";
+				allwinner,function = "spdif";
+				allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+				allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+			};
+
+			spdif_rx_pins_a: spdif@1 {
+				allwinner,pins = "PB12";
+				allwinner,function = "spdif";
+				allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+			};
+
+			spdif_mclk_pins_a: spdif@2 {
+				allwinner,pins = "PB3";
+				allwinner,function = "spdif";
+				allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+			};
 		};
 
 		timer@01c20c00 {
diff --git a/arch/arm/boot/dts/sun7i-a20.dtsi b/arch/arm/boot/dts/sun7i-a20.dtsi
index 0940a78..7264d5e 100644
--- a/arch/arm/boot/dts/sun7i-a20.dtsi
+++ b/arch/arm/boot/dts/sun7i-a20.dtsi
@@ -1193,6 +1193,27 @@
 				allwinner,drive = <SUN4I_PINCTRL_10_MA>;
 				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
 			};
+
+			spdif_tx_pins_a: spdif@0 {
+				allwinner,pins = "PB13";
+				allwinner,function = "spdif";
+				allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+				allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+			};
+
+			spdif_rx_pins_a: spdif@1 {
+				allwinner,pins = "PB12";
+				allwinner,function = "spdif";
+				allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+			};
+
+			spdif_mclk_pins_a: spdif@2 {
+				allwinner,pins = "PB3";
+				allwinner,function = "spdif";
+				allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+			};
 		};
 
 		timer@01c20c00 {
-- 
2.7.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 3/5] ARM: dts: sunxi: Add the SPDIF to the A10 and A20
       [not found] ` <1456589909-2428-1-git-send-email-codekipper-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  2016-02-27 16:18   ` [PATCH 1/5] clk: sunxi: mod1 clock should modify it's parent codekipper-Re5JQEeQqe8AvxtiuMwx3w
  2016-02-27 16:18   ` [PATCH 2/5] ARM: dts :sunxi: Add SPDIF pins to A10 and A20 codekipper-Re5JQEeQqe8AvxtiuMwx3w
@ 2016-02-27 16:18   ` codekipper-Re5JQEeQqe8AvxtiuMwx3w
       [not found]     ` <1456589909-2428-4-git-send-email-codekipper-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  2016-02-27 16:18   ` [PATCH 4/5] ARM: dts: sun4i: Add SPDIF to the Mele A1000 codekipper-Re5JQEeQqe8AvxtiuMwx3w
  2016-02-27 16:18   ` [PATCH 5/5] ARM: dts: sun7i: Add SPDIF to Itead Ibox codekipper-Re5JQEeQqe8AvxtiuMwx3w
  4 siblings, 1 reply; 9+ messages in thread
From: codekipper-Re5JQEeQqe8AvxtiuMwx3w @ 2016-02-27 16:18 UTC (permalink / raw)
  To: maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw,
	ennesimamail.av-Re5JQEeQqe8AvxtiuMwx3w, Marcus Cooper

From: Marcus Cooper <codekipper-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

Add the SPDIF transceiver controller and clock to the A10 and
A20 dtsi.

Signed-off-by: Marcus Cooper <codekipper-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
 arch/arm/boot/dts/sun4i-a10.dtsi | 23 +++++++++++++++++++++++
 arch/arm/boot/dts/sun7i-a20.dtsi | 23 +++++++++++++++++++++++
 2 files changed, 46 insertions(+)

diff --git a/arch/arm/boot/dts/sun4i-a10.dtsi b/arch/arm/boot/dts/sun4i-a10.dtsi
index 0483640..83d46b2 100644
--- a/arch/arm/boot/dts/sun4i-a10.dtsi
+++ b/arch/arm/boot/dts/sun4i-a10.dtsi
@@ -477,6 +477,17 @@
 			clock-output-names = "ir1";
 		};
 
+		spdif_clk: clk@01c200c0 {
+			#clock-cells = <0>;
+			compatible = "allwinner,sun4i-a10-mod1-clk";
+			reg = <0x01c200c0 0x4>;
+			clocks = <&pll2 SUN4I_A10_PLL2_8X>,
+				 <&pll2 SUN4I_A10_PLL2_4X>,
+				 <&pll2 SUN4I_A10_PLL2_2X>,
+				 <&pll2 SUN4I_A10_PLL2_1X>;
+			clock-output-names = "spdif";
+		};
+
 		usb_clk: clk@01c200cc {
 			#clock-cells = <1>;
 			#reset-cells = <1>;
@@ -1055,6 +1066,18 @@
 			status = "disabled";
 		};
 
+		spdif: spdif@01c21000 {
+			#sound-dai-cells = <0>;
+			compatible = "allwinner,sun4i-a10-spdif";
+			reg = <0x01c21000 0x40>;
+			interrupts = <13>;
+			clocks = <&apb0_gates 1>, <&spdif_clk>;
+			clock-names = "apb", "spdif";
+			dmas = <&dma 0 2>, <&dma 0 2>;
+			dma-names = "rx", "tx";
+			status = "disabled";
+		};
+
 		ir0: ir@01c21800 {
 			compatible = "allwinner,sun4i-a10-ir";
 			clocks = <&apb0_gates 6>, <&ir0_clk>;
diff --git a/arch/arm/boot/dts/sun7i-a20.dtsi b/arch/arm/boot/dts/sun7i-a20.dtsi
index 7264d5e..4631660 100644
--- a/arch/arm/boot/dts/sun7i-a20.dtsi
+++ b/arch/arm/boot/dts/sun7i-a20.dtsi
@@ -476,6 +476,17 @@
 			clock-output-names = "ir1";
 		};
 
+		spdif_clk: clk@01c200c0 {
+			#clock-cells = <0>;
+			compatible = "allwinner,sun4i-a10-mod1-clk";
+			reg = <0x01c200c0 0x4>;
+			clocks = <&pll2 SUN4I_A10_PLL2_8X>,
+				 <&pll2 SUN4I_A10_PLL2_4X>,
+				 <&pll2 SUN4I_A10_PLL2_2X>,
+				 <&pll2 SUN4I_A10_PLL2_1X>;
+			clock-output-names = "spdif";
+		};
+
 		keypad_clk: clk@01c200c4 {
 			#clock-cells = <0>;
 			compatible = "allwinner,sun4i-a10-mod0-clk";
@@ -1247,6 +1258,18 @@
 			status = "disabled";
 		};
 
+		spdif: spdif@01c21000 {
+			#sound-dai-cells = <0>;
+			compatible = "allwinner,sun4i-a10-spdif";
+			reg = <0x01c21000 0x40>;
+			interrupts = <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&apb0_gates 1>, <&spdif_clk>;
+			clock-names = "apb", "spdif";
+			dmas = <&dma 0 2>, <&dma 0 2>;
+			dma-names = "rx", "tx";
+			status = "disabled";
+		};
+
 		ir0: ir@01c21800 {
 			compatible = "allwinner,sun4i-a10-ir";
 			clocks = <&apb0_gates 6>, <&ir0_clk>;
-- 
2.7.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 4/5] ARM: dts: sun4i: Add SPDIF to the Mele A1000
       [not found] ` <1456589909-2428-1-git-send-email-codekipper-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
                     ` (2 preceding siblings ...)
  2016-02-27 16:18   ` [PATCH 3/5] ARM: dts: sunxi: Add the SPDIF to the " codekipper-Re5JQEeQqe8AvxtiuMwx3w
@ 2016-02-27 16:18   ` codekipper-Re5JQEeQqe8AvxtiuMwx3w
  2016-02-27 16:18   ` [PATCH 5/5] ARM: dts: sun7i: Add SPDIF to Itead Ibox codekipper-Re5JQEeQqe8AvxtiuMwx3w
  4 siblings, 0 replies; 9+ messages in thread
From: codekipper-Re5JQEeQqe8AvxtiuMwx3w @ 2016-02-27 16:18 UTC (permalink / raw)
  To: maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw,
	ennesimamail.av-Re5JQEeQqe8AvxtiuMwx3w, Marcus Cooper

From: Marcus Cooper <codekipper-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

Enable the S/PDIF transmitter that is present on the A1000.

Signed-off-by: Marcus Cooper <codekipper-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
 arch/arm/boot/dts/sun4i-a10-a1000.dts | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/arch/arm/boot/dts/sun4i-a10-a1000.dts b/arch/arm/boot/dts/sun4i-a10-a1000.dts
index 97570cb..aaf5605 100644
--- a/arch/arm/boot/dts/sun4i-a10-a1000.dts
+++ b/arch/arm/boot/dts/sun4i-a10-a1000.dts
@@ -87,6 +87,23 @@
 		enable-active-high;
 		gpio = <&pio 7 15 GPIO_ACTIVE_HIGH>;
 	};
+
+	sound {
+		compatible = "simple-audio-card";
+		simple-audio-card,name = "On-board SPDIF";
+		simple-audio-card,cpu {
+			sound-dai = <&spdif>;
+		};
+
+		simple-audio-card,codec {
+			sound-dai = <&spdif_out>;
+		};
+	};
+
+	spdif_out: spdif-out {
+		#sound-dai-cells = <0>;
+		compatible = "linux,spdif-dit";
+	};
 };
 
 &ahci {
@@ -188,6 +205,12 @@
 	status = "okay";
 };
 
+&spdif {
+	pinctrl-names = "default";
+	pinctrl-0 = <&spdif_tx_pins_a>;
+	status = "okay";
+};
+
 &uart0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart0_pins_a>;
-- 
2.7.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 5/5] ARM: dts: sun7i: Add SPDIF to Itead Ibox
       [not found] ` <1456589909-2428-1-git-send-email-codekipper-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
                     ` (3 preceding siblings ...)
  2016-02-27 16:18   ` [PATCH 4/5] ARM: dts: sun4i: Add SPDIF to the Mele A1000 codekipper-Re5JQEeQqe8AvxtiuMwx3w
@ 2016-02-27 16:18   ` codekipper-Re5JQEeQqe8AvxtiuMwx3w
  4 siblings, 0 replies; 9+ messages in thread
From: codekipper-Re5JQEeQqe8AvxtiuMwx3w @ 2016-02-27 16:18 UTC (permalink / raw)
  To: maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw,
	ennesimamail.av-Re5JQEeQqe8AvxtiuMwx3w, Marcus Cooper

From: Marcus Cooper <codekipper-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

Enable the S/PDIF transmitter that is present on the Itead Ibox.

Signed-off-by: Marcus Cooper <codekipper-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
 arch/arm/boot/dts/sun7i-a20-itead-ibox.dts | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/arch/arm/boot/dts/sun7i-a20-itead-ibox.dts b/arch/arm/boot/dts/sun7i-a20-itead-ibox.dts
index a512581..df76b74 100644
--- a/arch/arm/boot/dts/sun7i-a20-itead-ibox.dts
+++ b/arch/arm/boot/dts/sun7i-a20-itead-ibox.dts
@@ -65,6 +65,23 @@
 			default-state = "on";
 		};
 	};
+
+	sound {
+		compatible = "simple-audio-card";
+		simple-audio-card,name = "On-board SPDIF";
+		simple-audio-card,cpu {
+			sound-dai = <&spdif>;
+		};
+
+		simple-audio-card,codec {
+			sound-dai = <&spdif_out>;
+		};
+	};
+
+	spdif_out: spdif-out {
+		#sound-dai-cells = <0>;
+		compatible = "linux,spdif-dit";
+	};
 };
 
 &ahci {
@@ -131,6 +148,13 @@
 	status = "okay";
 };
 
+
+&spdif {
+	pinctrl-names = "default";
+	pinctrl-0 = <&spdif_tx_pins_a>;
+	status = "okay";
+};
+
 &usbphy {
 	pinctrl-names = "default";
 	pinctrl-0 = <&usb0_id_detect_pin>;
-- 
2.7.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH 3/5] ARM: dts: sunxi: Add the SPDIF to the A10 and A20
       [not found]     ` <1456589909-2428-4-git-send-email-codekipper-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2016-03-13 21:50       ` Maxime Ripard
  2016-03-14 16:29         ` Code Kipper
  0 siblings, 1 reply; 9+ messages in thread
From: Maxime Ripard @ 2016-03-13 21:50 UTC (permalink / raw)
  To: codekipper-Re5JQEeQqe8AvxtiuMwx3w
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw,
	ennesimamail.av-Re5JQEeQqe8AvxtiuMwx3w

[-- Attachment #1: Type: text/plain, Size: 1727 bytes --]

Hi,

On Sat, Feb 27, 2016 at 05:18:27PM +0100, codekipper-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote:
> From: Marcus Cooper <codekipper-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> 
> Add the SPDIF transceiver controller and clock to the A10 and
> A20 dtsi.
> 
> Signed-off-by: Marcus Cooper <codekipper-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> ---
>  arch/arm/boot/dts/sun4i-a10.dtsi | 23 +++++++++++++++++++++++
>  arch/arm/boot/dts/sun7i-a20.dtsi | 23 +++++++++++++++++++++++
>  2 files changed, 46 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/sun4i-a10.dtsi b/arch/arm/boot/dts/sun4i-a10.dtsi
> index 0483640..83d46b2 100644
> --- a/arch/arm/boot/dts/sun4i-a10.dtsi
> +++ b/arch/arm/boot/dts/sun4i-a10.dtsi
> @@ -477,6 +477,17 @@
>  			clock-output-names = "ir1";
>  		};
>  
> +		spdif_clk: clk@01c200c0 {
> +			#clock-cells = <0>;
> +			compatible = "allwinner,sun4i-a10-mod1-clk";
> +			reg = <0x01c200c0 0x4>;
> +			clocks = <&pll2 SUN4I_A10_PLL2_8X>,
> +				 <&pll2 SUN4I_A10_PLL2_4X>,
> +				 <&pll2 SUN4I_A10_PLL2_2X>,
> +				 <&pll2 SUN4I_A10_PLL2_1X>;
> +			clock-output-names = "spdif";
> +		};
> +
>  		usb_clk: clk@01c200cc {
>  			#clock-cells = <1>;
>  			#reset-cells = <1>;
> @@ -1055,6 +1066,18 @@
>  			status = "disabled";
>  		};
>  
> +		spdif: spdif@01c21000 {
> +			#sound-dai-cells = <0>;
> +			compatible = "allwinner,sun4i-a10-spdif";
> +			reg = <0x01c21000 0x40>;

It only takes 64 bytes?

> +			interrupts = <13>;
> +			clocks = <&apb0_gates 1>, <&spdif_clk>;
> +			clock-names = "apb", "spdif";
> +			dmas = <&dma 0 2>, <&dma 0 2>;

Please use the defines here.

Thanks!
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 3/5] ARM: dts: sunxi: Add the SPDIF to the A10 and A20
  2016-03-13 21:50       ` Maxime Ripard
@ 2016-03-14 16:29         ` Code Kipper
       [not found]           ` <CAEKpxBm4bs7sNSbDjomdP6XS2ApvfDT-s942DBb3JWv1iOZJ0w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 9+ messages in thread
From: Code Kipper @ 2016-03-14 16:29 UTC (permalink / raw)
  To: Maxime Ripard; +Cc: linux-arm-kernel, devicetree, linux-sunxi, Andrea Venturi

On 13 March 2016 at 22:50, Maxime Ripard
<maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org> wrote:
> Hi,
>
> On Sat, Feb 27, 2016 at 05:18:27PM +0100, codekipper-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote:
>> From: Marcus Cooper <codekipper-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>>
>> Add the SPDIF transceiver controller and clock to the A10 and
>> A20 dtsi.
>>
>> Signed-off-by: Marcus Cooper <codekipper-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>> ---
>>  arch/arm/boot/dts/sun4i-a10.dtsi | 23 +++++++++++++++++++++++
>>  arch/arm/boot/dts/sun7i-a20.dtsi | 23 +++++++++++++++++++++++
>>  2 files changed, 46 insertions(+)
>>
>> diff --git a/arch/arm/boot/dts/sun4i-a10.dtsi b/arch/arm/boot/dts/sun4i-a10.dtsi
>> index 0483640..83d46b2 100644
>> --- a/arch/arm/boot/dts/sun4i-a10.dtsi
>> +++ b/arch/arm/boot/dts/sun4i-a10.dtsi
>> @@ -477,6 +477,17 @@
>>                       clock-output-names = "ir1";
>>               };
>>
>> +             spdif_clk: clk@01c200c0 {
>> +                     #clock-cells = <0>;
>> +                     compatible = "allwinner,sun4i-a10-mod1-clk";
>> +                     reg = <0x01c200c0 0x4>;
>> +                     clocks = <&pll2 SUN4I_A10_PLL2_8X>,
>> +                              <&pll2 SUN4I_A10_PLL2_4X>,
>> +                              <&pll2 SUN4I_A10_PLL2_2X>,
>> +                              <&pll2 SUN4I_A10_PLL2_1X>;
>> +                     clock-output-names = "spdif";
>> +             };
>> +
>>               usb_clk: clk@01c200cc {
>>                       #clock-cells = <1>;
>>                       #reset-cells = <1>;
>> @@ -1055,6 +1066,18 @@
>>                       status = "disabled";
>>               };
>>
>> +             spdif: spdif@01c21000 {
>> +                     #sound-dai-cells = <0>;
>> +                     compatible = "allwinner,sun4i-a10-spdif";
>> +                     reg = <0x01c21000 0x40>;
>
> It only takes 64 bytes?
Yep(just like the audio codec!)
http://linux-sunxi.org/SPDIF#SUNXI_SPDIF_DEFAULT_VALUES
>
>> +                     interrupts = <13>;
>> +                     clocks = <&apb0_gates 1>, <&spdif_clk>;
>> +                     clock-names = "apb", "spdif";
>> +                     dmas = <&dma 0 2>, <&dma 0 2>;
>
> Please use the defines here.
ACK...will resend.
Thanks,
CK
>
> Thanks!
> Maxime
>
> --
> Maxime Ripard, Free Electrons
> Embedded Linux, Kernel and Android engineering
> http://free-electrons.com

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 3/5] ARM: dts: sunxi: Add the SPDIF to the A10 and A20
       [not found]           ` <CAEKpxBm4bs7sNSbDjomdP6XS2ApvfDT-s942DBb3JWv1iOZJ0w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2016-03-14 18:52             ` Maxime Ripard
  0 siblings, 0 replies; 9+ messages in thread
From: Maxime Ripard @ 2016-03-14 18:52 UTC (permalink / raw)
  To: Code Kipper; +Cc: linux-arm-kernel, devicetree, linux-sunxi, Andrea Venturi

[-- Attachment #1: Type: text/plain, Size: 612 bytes --]

On Mon, Mar 14, 2016 at 05:29:37PM +0100, Code Kipper wrote:
> >> +             spdif: spdif@01c21000 {
> >> +                     #sound-dai-cells = <0>;
> >> +                     compatible = "allwinner,sun4i-a10-spdif";
> >> +                     reg = <0x01c21000 0x40>;
> >
> > It only takes 64 bytes?
>
> Yep(just like the audio codec!)
> http://linux-sunxi.org/SPDIF#SUNXI_SPDIF_DEFAULT_VALUES

Yet the datasheet says it takes 1k in the memory map.

Please use that value instead.

Thanks!
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2016-03-14 18:52 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-27 16:18 [PATCH 0/5] ARM: sunxi: Add SPDIF playback support codekipper-Re5JQEeQqe8AvxtiuMwx3w
     [not found] ` <1456589909-2428-1-git-send-email-codekipper-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-02-27 16:18   ` [PATCH 1/5] clk: sunxi: mod1 clock should modify it's parent codekipper-Re5JQEeQqe8AvxtiuMwx3w
2016-02-27 16:18   ` [PATCH 2/5] ARM: dts :sunxi: Add SPDIF pins to A10 and A20 codekipper-Re5JQEeQqe8AvxtiuMwx3w
2016-02-27 16:18   ` [PATCH 3/5] ARM: dts: sunxi: Add the SPDIF to the " codekipper-Re5JQEeQqe8AvxtiuMwx3w
     [not found]     ` <1456589909-2428-4-git-send-email-codekipper-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-03-13 21:50       ` Maxime Ripard
2016-03-14 16:29         ` Code Kipper
     [not found]           ` <CAEKpxBm4bs7sNSbDjomdP6XS2ApvfDT-s942DBb3JWv1iOZJ0w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-03-14 18:52             ` Maxime Ripard
2016-02-27 16:18   ` [PATCH 4/5] ARM: dts: sun4i: Add SPDIF to the Mele A1000 codekipper-Re5JQEeQqe8AvxtiuMwx3w
2016-02-27 16:18   ` [PATCH 5/5] ARM: dts: sun7i: Add SPDIF to Itead Ibox codekipper-Re5JQEeQqe8AvxtiuMwx3w

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).