diff mbox series

[1/7] ASoC: dt-bindings: Add a new compatible for the A64 codec

Message ID 20200726012557.38282-2-samuel@sholland.org (mailing list archive)
State Accepted
Commit cef305d4eb0733f25215793ed30b056a7db9bb62
Headers show
Series Allwinner A64 digital audio codec fixes | expand

Commit Message

Samuel Holland July 26, 2020, 1:25 a.m. UTC
The audio codecs in the A33 and A64 are both integrated variants of the
X-Powers AC100 codec. However, there are some differences between them
that merit having a separate compatible:
 - The A64 has a second DRC block, not present in the AC100 or A33.
 - The A33 has some extra muxing options for AIF1/2/3 in the
   AIF3_SGP_CTRL register, which are not present in the AC100 or A64.
 - The A33 is missing registers providing jack detection functionality.
 - The A33 is claimed to invert LRCK, but this is not seen on A64.

Since the driver will continue to work on the A64 using the A33
compatible, albeit without jack detection functionality and with
possibly inverted channels, as it does now, allow the A33 compatible
to be used as a fallback.

Signed-off-by: Samuel Holland <samuel@sholland.org>
---
 .../bindings/sound/allwinner,sun8i-a33-codec.yaml           | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Comments

Rob Herring (Arm) July 31, 2020, 8:20 p.m. UTC | #1
On Sat, 25 Jul 2020 20:25:51 -0500, Samuel Holland wrote:
> The audio codecs in the A33 and A64 are both integrated variants of the
> X-Powers AC100 codec. However, there are some differences between them
> that merit having a separate compatible:
>  - The A64 has a second DRC block, not present in the AC100 or A33.
>  - The A33 has some extra muxing options for AIF1/2/3 in the
>    AIF3_SGP_CTRL register, which are not present in the AC100 or A64.
>  - The A33 is missing registers providing jack detection functionality.
>  - The A33 is claimed to invert LRCK, but this is not seen on A64.
> 
> Since the driver will continue to work on the A64 using the A33
> compatible, albeit without jack detection functionality and with
> possibly inverted channels, as it does now, allow the A33 compatible
> to be used as a fallback.
> 
> Signed-off-by: Samuel Holland <samuel@sholland.org>
> ---
>  .../bindings/sound/allwinner,sun8i-a33-codec.yaml           | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 

Reviewed-by: Rob Herring <robh@kernel.org>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/sound/allwinner,sun8i-a33-codec.yaml b/Documentation/devicetree/bindings/sound/allwinner,sun8i-a33-codec.yaml
index 55d28268d2f4..67405e6d8168 100644
--- a/Documentation/devicetree/bindings/sound/allwinner,sun8i-a33-codec.yaml
+++ b/Documentation/devicetree/bindings/sound/allwinner,sun8i-a33-codec.yaml
@@ -15,7 +15,11 @@  properties:
     const: 0
 
   compatible:
-    const: allwinner,sun8i-a33-codec
+    oneOf:
+      - items:
+          - const: allwinner,sun50i-a64-codec
+          - const: allwinner,sun8i-a33-codec
+      - const: allwinner,sun8i-a33-codec
 
   reg:
     maxItems: 1