* [PATCH 1/3] ARM: dts: sun8i: add DMA engine in V3s DTSI
2018-02-02 14:01 [PATCH 0/3] Allwinner V3s audio codec device tree changes Icenowy Zheng
@ 2018-02-02 14:01 ` Icenowy Zheng
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
2018-02-02 14:01 ` [PATCH 3/3] ARM: sun8i: v3s: enable audio on Lichee Pi Zero Dock board Icenowy Zheng
2 siblings, 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, linux-arm-kernel, linux-kernel, linux-sunxi, Icenowy Zheng
Allwinner V3s SoC features a DMA engine.
Add it in the DTSI file.
Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
---
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
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH 1/3] ARM: dts: sun8i: add DMA engine in V3s DTSI
2018-02-02 14:01 ` [PATCH 1/3] ARM: dts: sun8i: add DMA engine in V3s DTSI Icenowy Zheng
@ 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, linux-arm-kernel, linux-kernel, linux-sunxi
[-- Attachment #1: Type: text/plain, Size: 1128 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@aosc.io>
> ---
> 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
* [PATCH 2/3] ARM: dts: sun8i: add audio codec support into V3s DTSI
2018-02-02 14:01 [PATCH 0/3] Allwinner V3s audio codec device tree changes Icenowy Zheng
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
2018-02-02 19:49 ` Maxime Ripard
2018-02-02 14:01 ` [PATCH 3/3] ARM: sun8i: v3s: enable audio on Lichee Pi Zero Dock board Icenowy Zheng
2 siblings, 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, linux-arm-kernel, linux-kernel, linux-sunxi, 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@aosc.io>
---
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 [flat|nested] 7+ messages in thread* Re: [PATCH 2/3] ARM: dts: sun8i: add audio codec support into V3s DTSI
2018-02-02 14:01 ` [PATCH 2/3] ARM: dts: sun8i: add audio codec support into " Icenowy Zheng
@ 2018-02-02 19:49 ` Maxime Ripard
2018-02-06 2:43 ` Icenowy Zheng
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, linux-arm-kernel, linux-kernel, linux-sunxi
[-- Attachment #1: Type: text/plain, Size: 1486 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@aosc.io>
> ---
> 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
2018-02-02 19:49 ` Maxime Ripard
@ 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, linux-arm-kernel, linux-kernel, linux-sunxi
于 2018年2月3日 GMT+08:00 上午3:49:35, Maxime Ripard <maxime.ripard@bootlin.com> 写到:
>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@aosc.io>
>> ---
>> 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
^ permalink raw reply [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
2018-02-02 14:01 ` [PATCH 1/3] ARM: dts: sun8i: add DMA engine in V3s DTSI Icenowy Zheng
2018-02-02 14:01 ` [PATCH 2/3] ARM: dts: sun8i: add audio codec support into " Icenowy Zheng
@ 2018-02-02 14:01 ` Icenowy Zheng
2 siblings, 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 [flat|nested] 7+ messages in thread