Message ID | 20200217064250.15516-2-samuel@sholland.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | sun8i-codec fixes and new features | expand |
On Mon, Feb 17, 2020 at 2:42 PM Samuel Holland <samuel@sholland.org> wrote: > > The digital codec in the A64 is largely compatible with the one in the > A33, with two changes: > - It is missing some muxing options for AIF1/2/3 (not currently > supported by the driver) Is this at the pinctrl level or mixer level? If it's at the pinctrl level then it's out of the scope of this driver/binding. It could very well have those signals, just that they aren't routed outside the SoC. ChenYu > - It does not have the LRCK inversion issue that A33 has > > To fix the Left/Right channel inversion on the A64 caused by the A33 > LRCK fix, we need to introduce a new compatible for the codec in the > A64. > > Cc: stable@kernel.org > Fixes: ec4a95409d5c ("arm64: dts: allwinner: a64: add nodes necessary for analog sound support") > Signed-off-by: Samuel Holland <samuel@sholland.org> > --- > .../devicetree/bindings/sound/allwinner,sun8i-a33-codec.yaml | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/Documentation/devicetree/bindings/sound/allwinner,sun8i-a33-codec.yaml b/Documentation/devicetree/bindings/sound/allwinner,sun8i-a33-codec.yaml > index 55d28268d2f4..7c66409f13ea 100644 > --- a/Documentation/devicetree/bindings/sound/allwinner,sun8i-a33-codec.yaml > +++ b/Documentation/devicetree/bindings/sound/allwinner,sun8i-a33-codec.yaml > @@ -15,7 +15,9 @@ properties: > const: 0 > > compatible: > - const: allwinner,sun8i-a33-codec > + enum: > + - allwinner,sun8i-a33-codec > + - allwinner,sun50i-a64-codec > > reg: > maxItems: 1 > -- > 2.24.1 >
On 2/17/20 3:49 AM, Chen-Yu Tsai wrote: > On Mon, Feb 17, 2020 at 2:42 PM Samuel Holland <samuel@sholland.org> wrote: >> >> The digital codec in the A64 is largely compatible with the one in the >> A33, with two changes: >> - It is missing some muxing options for AIF1/2/3 (not currently >> supported by the driver) > > Is this at the pinctrl level or mixer level? If it's at the pinctrl level > then it's out of the scope of this driver/binding. It could very well have > those signals, just that they aren't routed outside the SoC. This is in reference to the muxes shown at the top of the A33 diagram, above the I2S/PCM interfaces. These appear to map to bits 0-6 of AIF3_SGP_CTRL, which are marked as reserved on the A64 and the AC100. Comparing the three datasheets in a bit more detail (but by no means exhaustively): - The A64 has a second DRC block, unlike the A33 and AC100. - The jack detection registers (0x310-0x318) are present on the A64 and AC100, but undocumented/missing on the A33. So there are enough differences to warrant a new compatible, but since none of the unique functionality is used by the driver (even after this series), a fallback should work.
On Mon, 17 Feb 2020 00:42:17 -0600, Samuel Holland wrote: > The digital codec in the A64 is largely compatible with the one in the > A33, with two changes: > - It is missing some muxing options for AIF1/2/3 (not currently > supported by the driver) > - It does not have the LRCK inversion issue that A33 has > > To fix the Left/Right channel inversion on the A64 caused by the A33 > LRCK fix, we need to introduce a new compatible for the codec in the > A64. > > Cc: stable@kernel.org > Fixes: ec4a95409d5c ("arm64: dts: allwinner: a64: add nodes necessary for analog sound support") > Signed-off-by: Samuel Holland <samuel@sholland.org> > --- > .../devicetree/bindings/sound/allwinner,sun8i-a33-codec.yaml | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > Acked-by: Rob Herring <robh@kernel.org>
diff --git a/Documentation/devicetree/bindings/sound/allwinner,sun8i-a33-codec.yaml b/Documentation/devicetree/bindings/sound/allwinner,sun8i-a33-codec.yaml index 55d28268d2f4..7c66409f13ea 100644 --- a/Documentation/devicetree/bindings/sound/allwinner,sun8i-a33-codec.yaml +++ b/Documentation/devicetree/bindings/sound/allwinner,sun8i-a33-codec.yaml @@ -15,7 +15,9 @@ properties: const: 0 compatible: - const: allwinner,sun8i-a33-codec + enum: + - allwinner,sun8i-a33-codec + - allwinner,sun50i-a64-codec reg: maxItems: 1
The digital codec in the A64 is largely compatible with the one in the A33, with two changes: - It is missing some muxing options for AIF1/2/3 (not currently supported by the driver) - It does not have the LRCK inversion issue that A33 has To fix the Left/Right channel inversion on the A64 caused by the A33 LRCK fix, we need to introduce a new compatible for the codec in the A64. Cc: stable@kernel.org Fixes: ec4a95409d5c ("arm64: dts: allwinner: a64: add nodes necessary for analog sound support") Signed-off-by: Samuel Holland <samuel@sholland.org> --- .../devicetree/bindings/sound/allwinner,sun8i-a33-codec.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)