devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] Enable SPDIF on the Beelink X2
@ 2017-01-27 15:48 codekipper-Re5JQEeQqe8AvxtiuMwx3w
       [not found] ` <20170127154808.19229-1-codekipper-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: codekipper-Re5JQEeQqe8AvxtiuMwx3w @ 2017-01-27 15:48 UTC (permalink / raw)
  To: maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Marcus Cooper

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

Hi All,

here is the patchset required to get SPDIF working on the Beelink X2
which is a H3 based STB.

BR,
CK

Marcus Cooper (3):
  ARM: dts: sun8i-h3: Add SPDIF TX pin to the H3
  ARM: dts: sun8i-h3: Add the SPDIF block to the H3
  ARM: dts: sun8i-h3: Add SPDIF to the Beelink X2

 arch/arm/boot/dts/sun8i-h3-beelink-x2.dts | 24 ++++++++++++++++++++++++
 arch/arm/boot/dts/sun8i-h3.dtsi           | 18 ++++++++++++++++++
 2 files changed, 42 insertions(+)

-- 
2.11.0

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

* [PATCH 1/3] ARM: dts: sun8i-h3: Add SPDIF TX pin to the H3
       [not found] ` <20170127154808.19229-1-codekipper-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2017-01-27 15:48   ` codekipper-Re5JQEeQqe8AvxtiuMwx3w
  2017-01-27 15:48   ` [PATCH 2/3] ARM: dts: sun8i-h3: Add the SPDIF block " codekipper-Re5JQEeQqe8AvxtiuMwx3w
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: codekipper-Re5JQEeQqe8AvxtiuMwx3w @ 2017-01-27 15:48 UTC (permalink / raw)
  To: maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Marcus Cooper

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

Add the SPDIF TX pin to the H3 dtsi.

Signed-off-by: Marcus Cooper <codekipper-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
 arch/arm/boot/dts/sun8i-h3.dtsi | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/arm/boot/dts/sun8i-h3.dtsi b/arch/arm/boot/dts/sun8i-h3.dtsi
index 08fd0860bb6b..6e250bd9a8a9 100644
--- a/arch/arm/boot/dts/sun8i-h3.dtsi
+++ b/arch/arm/boot/dts/sun8i-h3.dtsi
@@ -375,6 +375,11 @@
 				bias-pull-up;
 			};
 
+			spdif_tx_pins_a: spdif@0 {
+				pins = "PA17";
+				function = "spdif";
+			};
+
 			spi0_pins: spi0 {
 				pins = "PC0", "PC1", "PC2", "PC3";
 				function = "spi0";
-- 
2.11.0

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

* [PATCH 2/3] ARM: dts: sun8i-h3: Add the SPDIF block to the H3
       [not found] ` <20170127154808.19229-1-codekipper-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  2017-01-27 15:48   ` [PATCH 1/3] ARM: dts: sun8i-h3: Add SPDIF TX pin to the H3 codekipper-Re5JQEeQqe8AvxtiuMwx3w
@ 2017-01-27 15:48   ` codekipper-Re5JQEeQqe8AvxtiuMwx3w
  2017-01-27 15:48   ` [PATCH 3/3] ARM: dts: sun8i-h3: Add SPDIF to the Beelink X2 codekipper-Re5JQEeQqe8AvxtiuMwx3w
  2017-01-27 20:10   ` [PATCH 0/3] Enable SPDIF on " Maxime Ripard
  3 siblings, 0 replies; 5+ messages in thread
From: codekipper-Re5JQEeQqe8AvxtiuMwx3w @ 2017-01-27 15:48 UTC (permalink / raw)
  To: maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Marcus Cooper

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

Add the SPDIF transceiver controller block to the H3 dtsi.

Signed-off-by: Marcus Cooper <codekipper-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
 arch/arm/boot/dts/sun8i-h3.dtsi | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/arch/arm/boot/dts/sun8i-h3.dtsi b/arch/arm/boot/dts/sun8i-h3.dtsi
index 6e250bd9a8a9..48f9a0419b82 100644
--- a/arch/arm/boot/dts/sun8i-h3.dtsi
+++ b/arch/arm/boot/dts/sun8i-h3.dtsi
@@ -462,6 +462,19 @@
 			interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>;
 		};
 
+		spdif: spdif@01c21000 {
+			#sound-dai-cells = <0>;
+			compatible = "allwinner,sun8i-h3-spdif";
+			reg = <0x01c21000 0x400>;
+			interrupts = <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&ccu CLK_BUS_SPDIF>, <&ccu CLK_SPDIF>;
+			resets = <&ccu RST_BUS_SPDIF>;
+			clock-names = "apb", "spdif";
+			dmas = <&dma 2>;
+			dma-names = "tx";
+			status = "disabled";
+		};
+
 		pwm: pwm@01c21400 {
 			compatible = "allwinner,sun8i-h3-pwm";
 			reg = <0x01c21400 0x8>;
-- 
2.11.0

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

* [PATCH 3/3] ARM: dts: sun8i-h3: Add SPDIF to the Beelink X2
       [not found] ` <20170127154808.19229-1-codekipper-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  2017-01-27 15:48   ` [PATCH 1/3] ARM: dts: sun8i-h3: Add SPDIF TX pin to the H3 codekipper-Re5JQEeQqe8AvxtiuMwx3w
  2017-01-27 15:48   ` [PATCH 2/3] ARM: dts: sun8i-h3: Add the SPDIF block " codekipper-Re5JQEeQqe8AvxtiuMwx3w
@ 2017-01-27 15:48   ` codekipper-Re5JQEeQqe8AvxtiuMwx3w
  2017-01-27 20:10   ` [PATCH 0/3] Enable SPDIF on " Maxime Ripard
  3 siblings, 0 replies; 5+ messages in thread
From: codekipper-Re5JQEeQqe8AvxtiuMwx3w @ 2017-01-27 15:48 UTC (permalink / raw)
  To: maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Marcus Cooper

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

Enable the S/PDIF transmitter that is present on the Beelink X2 STB.

Signed-off-by: Marcus Cooper <codekipper-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
 arch/arm/boot/dts/sun8i-h3-beelink-x2.dts | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/arch/arm/boot/dts/sun8i-h3-beelink-x2.dts b/arch/arm/boot/dts/sun8i-h3-beelink-x2.dts
index 2a016cd16a27..25b225b7dfd6 100644
--- a/arch/arm/boot/dts/sun8i-h3-beelink-x2.dts
+++ b/arch/arm/boot/dts/sun8i-h3-beelink-x2.dts
@@ -81,6 +81,24 @@
 		compatible = "mmc-pwrseq-simple";
 		reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; /* PL7 */
 	};
+
+	sound_spdif {
+		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";
+	};
 };
 
 &ehci1 {
@@ -124,6 +142,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.11.0

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

* Re: [PATCH 0/3] Enable SPDIF on the Beelink X2
       [not found] ` <20170127154808.19229-1-codekipper-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
                     ` (2 preceding siblings ...)
  2017-01-27 15:48   ` [PATCH 3/3] ARM: dts: sun8i-h3: Add SPDIF to the Beelink X2 codekipper-Re5JQEeQqe8AvxtiuMwx3w
@ 2017-01-27 20:10   ` Maxime Ripard
  3 siblings, 0 replies; 5+ messages in thread
From: Maxime Ripard @ 2017-01-27 20:10 UTC (permalink / raw)
  To: codekipper-Re5JQEeQqe8AvxtiuMwx3w
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw

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

On Fri, Jan 27, 2017 at 04:48:05PM +0100, codekipper-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote:
> From: Marcus Cooper <codekipper-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> 
> Hi All,
> 
> here is the patchset required to get SPDIF working on the Beelink X2
> which is a H3 based STB.
> 
> BR,
> CK

Merged all three, but this could have been in your earlier patch for
that board.

Thanks,
Maxime

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

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

end of thread, other threads:[~2017-01-27 20:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-27 15:48 [PATCH 0/3] Enable SPDIF on the Beelink X2 codekipper-Re5JQEeQqe8AvxtiuMwx3w
     [not found] ` <20170127154808.19229-1-codekipper-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-01-27 15:48   ` [PATCH 1/3] ARM: dts: sun8i-h3: Add SPDIF TX pin to the H3 codekipper-Re5JQEeQqe8AvxtiuMwx3w
2017-01-27 15:48   ` [PATCH 2/3] ARM: dts: sun8i-h3: Add the SPDIF block " codekipper-Re5JQEeQqe8AvxtiuMwx3w
2017-01-27 15:48   ` [PATCH 3/3] ARM: dts: sun8i-h3: Add SPDIF to the Beelink X2 codekipper-Re5JQEeQqe8AvxtiuMwx3w
2017-01-27 20:10   ` [PATCH 0/3] Enable SPDIF on " Maxime Ripard

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).