2021-05-14 22:11:22

by Tobias Schramm

[permalink] [raw]
Subject: [PATCH v3 0/7] Add missing peripherals to Allwinner V3s/V3 device trees

The Allwinner V3s/V3 SoCs feature quite a few peripherals that have good
driver support but yet are nowhere to be found in the SoCs dts.
This patchset adds the DMA controller, the relevant DMA properties for all
peripherals supporting DMA, the integrated analog codec and - for the
Allwinner V3 SoC - also the I2S interface.
I've included all of those changes in one patchset since they do all
depend on addition of the DMA controller.
All changes have been tested in a recent project of mine using a Sochip S3
(a rebranded Allwinner V3) and are confirmed working.

This is v3 of this patchset.

Cheers,
Tobias

Changelog:
v2:
- add v3/v3s specific compatible strings
- fix v3s audio codec analog frontend compatible
- fix an I2S -> I2C typo

v3:
- fix yaml list indentation in allwinner,sun8i-a23-codec-analog.yaml

Tobias Schramm (7):
ARM: dts: sun8i: v3s: add DMA controller to v3s dts
ARM: dts: sun8i: v3s: add DMA properties to peripherals supporting DMA
ARM: dts: sun8i: v3s: add analog codec and frontend to v3s dts
ASoC: dt-bindings: sun8i-a23-codec-analog: add compatible for
Allwinner V3
ARM: dts: sun8i: V3: add codec analog frontend to V3 dts
dt-bindings: sound: sun4i-i2s: add Allwinner V3 I2S compatible
ARM: dts: sun8i: V3: add I2S interface to V3 dts

.../sound/allwinner,sun4i-a10-i2s.yaml | 3 ++
.../allwinner,sun8i-a23-codec-analog.yaml | 9 +++--
arch/arm/boot/dts/sun8i-v3.dtsi | 31 +++++++++++++++
arch/arm/boot/dts/sun8i-v3s.dtsi | 39 +++++++++++++++++++
4 files changed, 79 insertions(+), 3 deletions(-)

--
2.31.1



2021-05-14 22:11:23

by Tobias Schramm

[permalink] [raw]
Subject: [PATCH v3 3/7] ARM: dts: sun8i: v3s: add analog codec and frontend to v3s dts

The Allwinner V3s and V3 SoCs feature an integrated analog audio codec.
Additionally both have an analog frontend with mixers and amplifiers for
the codec.
This commit adds both, the analog codec and its frontend to the V3s dtsi.

Signed-off-by: Tobias Schramm <[email protected]>
---
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 3eaa8703e2ac..236cf45bba91 100644
--- a/arch/arm/boot/dts/sun8i-v3s.dtsi
+++ b/arch/arm/boot/dts/sun8i-v3s.dtsi
@@ -441,6 +441,25 @@ lradc: lradc@1c22800 {
status = "disabled";
};

+ codec: codec@1c22c00 {
+ #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@1c23000 {
+ compatible = "allwinner,sun8i-v3s-codec-analog";
+ reg = <0x01c23000 0x4>;
+ };
+
uart0: serial@1c28000 {
compatible = "snps,dw-apb-uart";
reg = <0x01c28000 0x400>;
--
2.31.1


2021-05-14 22:11:31

by Tobias Schramm

[permalink] [raw]
Subject: [PATCH v3 5/7] ARM: dts: sun8i: V3: add codec analog frontend to V3 dts

The Allwinner V3 SoC has a different analog codec frontend than the V3s
SoC. The frontend used on the V3 SoC is compatible with the on used in
the Allwinner H3 SoC.
This patch adds the corresponding node to the Allwinner V3 dtsi.

Signed-off-by: Tobias Schramm <[email protected]>
---
arch/arm/boot/dts/sun8i-v3.dtsi | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/arch/arm/boot/dts/sun8i-v3.dtsi b/arch/arm/boot/dts/sun8i-v3.dtsi
index c279e13583ba..8af790d286b9 100644
--- a/arch/arm/boot/dts/sun8i-v3.dtsi
+++ b/arch/arm/boot/dts/sun8i-v3.dtsi
@@ -9,6 +9,11 @@ &ccu {
compatible = "allwinner,sun8i-v3-ccu";
};

+&codec_analog {
+ compatible = "allwinner,sun8i-v3-codec-analog",
+ "allwinner,sun8i-h3-codec-analog";
+};
+
&emac {
/delete-property/ phy-handle;
/delete-property/ phy-mode;
--
2.31.1


2021-05-14 22:11:40

by Tobias Schramm

[permalink] [raw]
Subject: [PATCH v3 4/7] ASoC: dt-bindings: sun8i-a23-codec-analog: add compatible for Allwinner V3

The analog codec frontend of the Allwinner V3 is compatible with the
analog codec frontend used on the Allwinner H3.
This patch adds a compatible string for the analog codec frontend on the
Allwinner V3 SoC.

Signed-off-by: Tobias Schramm <[email protected]>
---
.../bindings/sound/allwinner,sun8i-a23-codec-analog.yaml | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/Documentation/devicetree/bindings/sound/allwinner,sun8i-a23-codec-analog.yaml b/Documentation/devicetree/bindings/sound/allwinner,sun8i-a23-codec-analog.yaml
index 9718358826ab..26eca21e1f0f 100644
--- a/Documentation/devicetree/bindings/sound/allwinner,sun8i-a23-codec-analog.yaml
+++ b/Documentation/devicetree/bindings/sound/allwinner,sun8i-a23-codec-analog.yaml
@@ -12,12 +12,15 @@ maintainers:

properties:
compatible:
- enum:
+ oneOf:
# FIXME: This is documented in the PRCM binding, but needs to be
# migrated here at some point
# - allwinner,sun8i-a23-codec-analog
- - allwinner,sun8i-h3-codec-analog
- - allwinner,sun8i-v3s-codec-analog
+ - const: allwinner,sun8i-h3-codec-analog
+ - items:
+ - const: allwinner,sun8i-v3-codec-analog
+ - const: allwinner,sun8i-h3-codec-analog
+ - const: allwinner,sun8i-v3s-codec-analog

reg:
maxItems: 1
--
2.31.1


2021-05-19 10:18:50

by Rob Herring

[permalink] [raw]
Subject: Re: [PATCH v3 4/7] ASoC: dt-bindings: sun8i-a23-codec-analog: add compatible for Allwinner V3

On Fri, 14 May 2021 15:44:02 +0200, Tobias Schramm wrote:
> The analog codec frontend of the Allwinner V3 is compatible with the
> analog codec frontend used on the Allwinner H3.
> This patch adds a compatible string for the analog codec frontend on the
> Allwinner V3 SoC.
>
> Signed-off-by: Tobias Schramm <[email protected]>
> ---
> .../bindings/sound/allwinner,sun8i-a23-codec-analog.yaml | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
>

Reviewed-by: Rob Herring <[email protected]>

2021-05-19 18:20:34

by Maxime Ripard

[permalink] [raw]
Subject: Re: [PATCH v3 0/7] Add missing peripherals to Allwinner V3s/V3 device trees

On Fri, May 14, 2021 at 03:43:58PM +0200, Tobias Schramm wrote:
> The Allwinner V3s/V3 SoCs feature quite a few peripherals that have good
> driver support but yet are nowhere to be found in the SoCs dts.
> This patchset adds the DMA controller, the relevant DMA properties for all
> peripherals supporting DMA, the integrated analog codec and - for the
> Allwinner V3 SoC - also the I2S interface.
> I've included all of those changes in one patchset since they do all
> depend on addition of the DMA controller.
> All changes have been tested in a recent project of mine using a Sochip S3
> (a rebranded Allwinner V3) and are confirmed working.
>
> This is v3 of this patchset.

Applied all, thanks
Maxime


Attachments:
(No filename) (724.00 B)
signature.asc (235.00 B)
Download all attachments