devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] Allwinner V3s audio codec device tree changes
@ 2018-02-02 14:01 Icenowy Zheng
       [not found] ` <20180202140153.21549-1-icenowy-h8G6r0blFSE@public.gmane.org>
  2018-02-02 14:01 ` [PATCH 3/3] ARM: sun8i: v3s: enable audio on Lichee Pi Zero Dock board Icenowy Zheng
  0 siblings, 2 replies; 7+ messages in thread
From: Icenowy Zheng @ 2018-02-02 14:01 UTC (permalink / raw)
  To: Maxime Ripard, Chen-Yu Tsai
  Cc: devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Icenowy Zheng

Here's the Allwinner V3s audio codec device tree changes, which used to
be blocked by the DMA engine code.

The first patch adds the DMA engine device tree node, and the second
adds the codec nodes (digital and analog).

The thrid patch is for Lichee Pi Zero with Dock board to enable the
audio jack and on-board mic.

Icenowy Zheng (3):
  ARM: dts: sun8i: add DMA engine in V3s DTSI
  ARM: dts: sun8i: add audio codec support into V3s DTSI
  ARM: sun8i: v3s: enable audio on Lichee Pi Zero Dock board

 arch/arm/boot/dts/sun8i-v3s-licheepi-zero-dock.dts |  9 +++++++
 arch/arm/boot/dts/sun8i-v3s.dtsi                   | 28 ++++++++++++++++++++++
 2 files changed, 37 insertions(+)

-- 
2.15.1

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH 1/3] ARM: dts: sun8i: add DMA engine in V3s DTSI
       [not found] ` <20180202140153.21549-1-icenowy-h8G6r0blFSE@public.gmane.org>
@ 2018-02-02 14:01   ` Icenowy Zheng
       [not found]     ` <20180202140153.21549-2-icenowy-h8G6r0blFSE@public.gmane.org>
  2018-02-02 14:01   ` [PATCH 2/3] ARM: dts: sun8i: add audio codec support into " Icenowy Zheng
  1 sibling, 1 reply; 7+ messages in thread
From: Icenowy Zheng @ 2018-02-02 14:01 UTC (permalink / raw)
  To: Maxime Ripard, Chen-Yu Tsai
  Cc: devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Icenowy Zheng

Allwinner V3s SoC features a DMA engine.

Add it in the DTSI file.

Signed-off-by: Icenowy Zheng <icenowy-h8G6r0blFSE@public.gmane.org>
---
 arch/arm/boot/dts/sun8i-v3s.dtsi | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/arch/arm/boot/dts/sun8i-v3s.dtsi b/arch/arm/boot/dts/sun8i-v3s.dtsi
index 443b083c6adc..20edebd983f0 100644
--- a/arch/arm/boot/dts/sun8i-v3s.dtsi
+++ b/arch/arm/boot/dts/sun8i-v3s.dtsi
@@ -178,6 +178,15 @@
 		};
 
 
+		dma: dma-controller@01c02000 {
+			compatible = "allwinner,sun8i-v3s-dma";
+			reg = <0x01c02000 0x1000>;
+			interrupts = <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&ccu CLK_BUS_DMA>;
+			resets = <&ccu RST_BUS_DMA>;
+			#dma-cells = <1>;
+		};
+
 		mmc0: mmc@1c0f000 {
 			compatible = "allwinner,sun7i-a20-mmc";
 			reg = <0x01c0f000 0x1000>;
-- 
2.15.1

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH 2/3] ARM: dts: sun8i: add audio codec support into V3s DTSI
       [not found] ` <20180202140153.21549-1-icenowy-h8G6r0blFSE@public.gmane.org>
  2018-02-02 14:01   ` [PATCH 1/3] ARM: dts: sun8i: add DMA engine in V3s DTSI Icenowy Zheng
@ 2018-02-02 14:01   ` Icenowy Zheng
       [not found]     ` <20180202140153.21549-3-icenowy-h8G6r0blFSE@public.gmane.org>
  1 sibling, 1 reply; 7+ messages in thread
From: Icenowy Zheng @ 2018-02-02 14:01 UTC (permalink / raw)
  To: Maxime Ripard, Chen-Yu Tsai
  Cc: devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Icenowy Zheng

Allwinner V3s SoC features an internal audio codec like the one in H3,
and a analog codec like the one in H3/A23 (but much simpler).

Add them in the DTSI file.

Signed-off-by: Icenowy Zheng <icenowy-h8G6r0blFSE@public.gmane.org>
---
 arch/arm/boot/dts/sun8i-v3s.dtsi | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/arch/arm/boot/dts/sun8i-v3s.dtsi b/arch/arm/boot/dts/sun8i-v3s.dtsi
index 20edebd983f0..f6c534efaef9 100644
--- a/arch/arm/boot/dts/sun8i-v3s.dtsi
+++ b/arch/arm/boot/dts/sun8i-v3s.dtsi
@@ -354,6 +354,25 @@
 			status = "disabled";
 		};
 
+		codec: codec@01c22c00 {
+			#sound-dai-cells = <0>;
+			compatible = "allwinner,sun8i-v3s-codec";
+			reg = <0x01c22c00 0x400>;
+			interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&ccu CLK_BUS_CODEC>, <&ccu CLK_AC_DIG>;
+			clock-names = "apb", "codec";
+			resets = <&ccu RST_BUS_CODEC>;
+			dmas = <&dma 15>, <&dma 15>;
+			dma-names = "rx", "tx";
+			allwinner,codec-analog-controls = <&codec_analog>;
+			status = "disabled";
+		};
+
+		codec_analog: codec-analog@01c23000 {
+			compatible = "allwinner,sun8i-v3s-codec-analog";
+			reg = <0x01c23000 0x4>;
+		};
+
 		uart0: serial@1c28000 {
 			compatible = "snps,dw-apb-uart";
 			reg = <0x01c28000 0x400>;
-- 
2.15.1

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

* [PATCH 3/3] ARM: sun8i: v3s: enable audio on Lichee Pi Zero Dock board
  2018-02-02 14:01 [PATCH 0/3] Allwinner V3s audio codec device tree changes Icenowy Zheng
       [not found] ` <20180202140153.21549-1-icenowy-h8G6r0blFSE@public.gmane.org>
@ 2018-02-02 14:01 ` Icenowy Zheng
  1 sibling, 0 replies; 7+ messages in thread
From: Icenowy Zheng @ 2018-02-02 14:01 UTC (permalink / raw)
  To: Maxime Ripard, Chen-Yu Tsai
  Cc: devicetree, linux-arm-kernel, linux-kernel, linux-sunxi, Icenowy Zheng

The Lichee Pi Zero Dock board has an audio jack and an onboard MIC.

Enable them.

Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
---
 arch/arm/boot/dts/sun8i-v3s-licheepi-zero-dock.dts | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/arch/arm/boot/dts/sun8i-v3s-licheepi-zero-dock.dts b/arch/arm/boot/dts/sun8i-v3s-licheepi-zero-dock.dts
index d1311098ea45..80f477738668 100644
--- a/arch/arm/boot/dts/sun8i-v3s-licheepi-zero-dock.dts
+++ b/arch/arm/boot/dts/sun8i-v3s-licheepi-zero-dock.dts
@@ -55,6 +55,15 @@
 	};
 };
 
+&codec {
+	allwinner,audio-routing =
+		"Headphone", "HP",
+		"Headphone", "HPCOM",
+		"MIC1", "Mic",
+		"Mic",  "HBIAS";
+	status = "okay";
+};
+
 &mmc1 {
 	broken-cd;
 	bus-width = <4>;
-- 
2.15.1

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

* Re: [PATCH 1/3] ARM: dts: sun8i: add DMA engine in V3s DTSI
       [not found]     ` <20180202140153.21549-2-icenowy-h8G6r0blFSE@public.gmane.org>
@ 2018-02-02 19:48       ` Maxime Ripard
  0 siblings, 0 replies; 7+ messages in thread
From: Maxime Ripard @ 2018-02-02 19:48 UTC (permalink / raw)
  To: Icenowy Zheng
  Cc: Chen-Yu Tsai, devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw

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

Hi,

On Fri, Feb 02, 2018 at 10:01:51PM +0800, Icenowy Zheng wrote:
> Allwinner V3s SoC features a DMA engine.
> 
> Add it in the DTSI file.
> 
> Signed-off-by: Icenowy Zheng <icenowy-h8G6r0blFSE@public.gmane.org>
> ---
>  arch/arm/boot/dts/sun8i-v3s.dtsi | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/sun8i-v3s.dtsi b/arch/arm/boot/dts/sun8i-v3s.dtsi
> index 443b083c6adc..20edebd983f0 100644
> --- a/arch/arm/boot/dts/sun8i-v3s.dtsi
> +++ b/arch/arm/boot/dts/sun8i-v3s.dtsi
> @@ -178,6 +178,15 @@
>  		};
>  
>

You have on extra line here

> +		dma: dma-controller@01c02000 {

The leading 0 will generate a DT warning

> +			compatible = "allwinner,sun8i-v3s-dma";
> +			reg = <0x01c02000 0x1000>;
> +			interrupts = <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>;
> +			clocks = <&ccu CLK_BUS_DMA>;
> +			resets = <&ccu RST_BUS_DMA>;
> +			#dma-cells = <1>;
> +		};
> +

Since you have that extra line above, you can just drop this new line
here.

Thanks!
Maxime

-- 
Maxime Ripard, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
http://bootlin.com

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH 2/3] ARM: dts: sun8i: add audio codec support into V3s DTSI
       [not found]     ` <20180202140153.21549-3-icenowy-h8G6r0blFSE@public.gmane.org>
@ 2018-02-02 19:49       ` Maxime Ripard
       [not found]         ` <20180202194935.vdqkgch6mowqi2px-ZC1Zs529Oq4@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Maxime Ripard @ 2018-02-02 19:49 UTC (permalink / raw)
  To: Icenowy Zheng
  Cc: Chen-Yu Tsai, devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw

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

On Fri, Feb 02, 2018 at 10:01:52PM +0800, Icenowy Zheng wrote:
> Allwinner V3s SoC features an internal audio codec like the one in H3,
> and a analog codec like the one in H3/A23 (but much simpler).
> 
> Add them in the DTSI file.
> 
> Signed-off-by: Icenowy Zheng <icenowy-h8G6r0blFSE@public.gmane.org>
> ---
>  arch/arm/boot/dts/sun8i-v3s.dtsi | 19 +++++++++++++++++++
>  1 file changed, 19 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/sun8i-v3s.dtsi b/arch/arm/boot/dts/sun8i-v3s.dtsi
> index 20edebd983f0..f6c534efaef9 100644
> --- a/arch/arm/boot/dts/sun8i-v3s.dtsi
> +++ b/arch/arm/boot/dts/sun8i-v3s.dtsi
> @@ -354,6 +354,25 @@
>  			status = "disabled";
>  		};
>  
> +		codec: codec@01c22c00 {
> +			#sound-dai-cells = <0>;
> +			compatible = "allwinner,sun8i-v3s-codec";
> +			reg = <0x01c22c00 0x400>;
> +			interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>;
> +			clocks = <&ccu CLK_BUS_CODEC>, <&ccu CLK_AC_DIG>;
> +			clock-names = "apb", "codec";
> +			resets = <&ccu RST_BUS_CODEC>;
> +			dmas = <&dma 15>, <&dma 15>;
> +			dma-names = "rx", "tx";
> +			allwinner,codec-analog-controls = <&codec_analog>;
> +			status = "disabled";
> +		};
> +
> +		codec_analog: codec-analog@01c23000 {
> +			compatible = "allwinner,sun8i-v3s-codec-analog";
> +			reg = <0x01c23000 0x4>;

This should be the whole size of the memory region.

Maxime

-- 
Maxime Ripard, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
http://bootlin.com

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH 2/3] ARM: dts: sun8i: add audio codec support into V3s DTSI
       [not found]         ` <20180202194935.vdqkgch6mowqi2px-ZC1Zs529Oq4@public.gmane.org>
@ 2018-02-06  2:43           ` Icenowy Zheng
  0 siblings, 0 replies; 7+ messages in thread
From: Icenowy Zheng @ 2018-02-06  2:43 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Chen-Yu Tsai, devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw



于 2018年2月3日 GMT+08:00 上午3:49:35, Maxime Ripard <maxime.ripard-LDxbnhwyfcJBDgjK7y7TUQ@public.gmane.org> 写到:
>On Fri, Feb 02, 2018 at 10:01:52PM +0800, Icenowy Zheng wrote:
>> Allwinner V3s SoC features an internal audio codec like the one in
>H3,
>> and a analog codec like the one in H3/A23 (but much simpler).
>> 
>> Add them in the DTSI file.
>> 
>> Signed-off-by: Icenowy Zheng <icenowy-h8G6r0blFSE@public.gmane.org>
>> ---
>>  arch/arm/boot/dts/sun8i-v3s.dtsi | 19 +++++++++++++++++++
>>  1 file changed, 19 insertions(+)
>> 
>> diff --git a/arch/arm/boot/dts/sun8i-v3s.dtsi
>b/arch/arm/boot/dts/sun8i-v3s.dtsi
>> index 20edebd983f0..f6c534efaef9 100644
>> --- a/arch/arm/boot/dts/sun8i-v3s.dtsi
>> +++ b/arch/arm/boot/dts/sun8i-v3s.dtsi
>> @@ -354,6 +354,25 @@
>>  			status = "disabled";
>>  		};
>>  
>> +		codec: codec@01c22c00 {
>> +			#sound-dai-cells = <0>;
>> +			compatible = "allwinner,sun8i-v3s-codec";
>> +			reg = <0x01c22c00 0x400>;
>> +			interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>;
>> +			clocks = <&ccu CLK_BUS_CODEC>, <&ccu CLK_AC_DIG>;
>> +			clock-names = "apb", "codec";
>> +			resets = <&ccu RST_BUS_CODEC>;
>> +			dmas = <&dma 15>, <&dma 15>;
>> +			dma-names = "rx", "tx";
>> +			allwinner,codec-analog-controls = <&codec_analog>;
>> +			status = "disabled";
>> +		};
>> +
>> +		codec_analog: codec-analog@01c23000 {
>> +			compatible = "allwinner,sun8i-v3s-codec-analog";
>> +			reg = <0x01c23000 0x4>;
>
>This should be the whole size of the memory region.

OK. (Although on the datasheet digital part and analog
part is listed as one region.)

>
>Maxime

-- 
You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit https://groups.google.com/d/optout.

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

end of thread, other threads:[~2018-02-06  2:43 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-02 14:01 [PATCH 0/3] Allwinner V3s audio codec device tree changes Icenowy Zheng
     [not found] ` <20180202140153.21549-1-icenowy-h8G6r0blFSE@public.gmane.org>
2018-02-02 14:01   ` [PATCH 1/3] ARM: dts: sun8i: add DMA engine in V3s DTSI Icenowy Zheng
     [not found]     ` <20180202140153.21549-2-icenowy-h8G6r0blFSE@public.gmane.org>
2018-02-02 19:48       ` Maxime Ripard
2018-02-02 14:01   ` [PATCH 2/3] ARM: dts: sun8i: add audio codec support into " Icenowy Zheng
     [not found]     ` <20180202140153.21549-3-icenowy-h8G6r0blFSE@public.gmane.org>
2018-02-02 19:49       ` Maxime Ripard
     [not found]         ` <20180202194935.vdqkgch6mowqi2px-ZC1Zs529Oq4@public.gmane.org>
2018-02-06  2:43           ` Icenowy Zheng
2018-02-02 14:01 ` [PATCH 3/3] ARM: sun8i: v3s: enable audio on Lichee Pi Zero Dock board Icenowy Zheng

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