Re: [PATCH v5 1/7] ASoC: dt-bindings: add amlogic,gxbb-audin

From: Martin Blumenstingl

Date: Sun Nov 15 2026 - 16:03:58 EST


Hi Valerio,

On Sun, Oct 18, 2026 at 12:18 PM Valerio Setti <vsetti@xxxxxxxxxxxx> wrote:
>
> AUDIN provides I2S audio input support to the Meson GXBB and GXL SoCs.
>
> The AUDIN block on GXL is identical to the GXBB one, so "amlogic,gxl-audin"
> uses "amlogic,gxbb-audin" as fallback; the SoC-specific compatible is
> added so that differences can be handled later if any are found.
>
> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxxxxxxxx>
> Signed-off-by: Valerio Setti <vsetti@xxxxxxxxxxxx>
> ---
> .../bindings/sound/amlogic,gxbb-audin.yaml | 69 ++++++++++++++++++++++
> 1 file changed, 69 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/sound/amlogic,gxbb-audin.yaml b/Documentation/devicetree/bindings/sound/amlogic,gxbb-audin.yaml
> new file mode 100644
> index 000000000000..4df4796623ed
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/sound/amlogic,gxbb-audin.yaml
> @@ -0,0 +1,69 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/sound/amlogic,gxbb-audin.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Amlogic GXBB AUDIN audio input controller
> +
> +maintainers:
> + - Valerio Setti <vsetti@xxxxxxxxxxxx>
> +
> +description:
> + AUDIN is the audio input block of the Amlogic GXBB/GXL SoCs. It supports
> + various input formatters (I2S, SPDIF, PCM, HDMI) feeding three FIFOs that
> + transfer captured samples to memory. The sound-dai cell selects the FIFO.
> +
> +allOf:
> + - $ref: dai-common.yaml#
> +
> +properties:
> + compatible:
> + oneOf:
> + - const: amlogic,gxbb-audin
> + - items:
> + - const: amlogic,gxl-audin
> + - const: amlogic,gxbb-audin
>From what I can tell it's even amlogic,meson8-audin compatible.
Although I didn't have the time to test in on hardware yet.

[...]
> + audio-controller@a000 {
> + compatible = "amlogic,gxbb-audin";
> + reg = <0xa000 0x148>;
I believe the audin registers are 0x300 wide.
Both, GXL datasheet [0] page 43 and GXM datasheet [1] page 48 claim
that the register area is 0x100 wide.
The last documented register with AUDIN_ prefix is AUDIN_FIFO2_PIO_RDH
= 0xb8. The datasheet [0] (page 395) lists register numbers divided by
4, so to get the actual address in the memory map we need to multiply
it by 4, which gives 0x2e0.
The 32-bit SoC vendor kernel [2] has a header that states: #define
AUDIN_ADDR_END 0x28bf (same as in datasheet, we need to multiply this
by 4).

I'm bringing this up because dt-bindings are supposed to be complete.
So even if the driver doesn't use a resource yet we're supposed to
still describe it.
I don't see any additional resources that we'd need to describe and
#sound-dai-cells allows adding the additional SPDIF input later.
>From what I saw in the registers there's also the possibility to send
the input signal to AUDIN but I couldn't find any additional resources
we'd need to describe in the dt-bindings for this.



[0] https://dl.khadas.com/products/vim1/datasheet/s905x-datasheet-v0.3.pdf
[1] https://dl.khadas.com/products/vim2/datasheet/s912-datasheet.pdf
[2] https://github.com/endlessm/linux-meson/blob/d6e13c220931110fe676ede6da69fc61a7cb04b6/arch/arm/mach-meson8/include/mach/register.h#L2274