[PATCH v5 1/7] ASoC: dt-bindings: add amlogic,gxbb-audin
Martin Blumenstingl
martin.blumenstingl at googlemail.com
Tue Nov 24 13:14:38 PST 2026
Hi Valerio,
+Cc Xianwei Zhao, I would appreciate it if you could take some time to
help us clarify the questions below (or refer us to a colleague).
On Mon, Nov 16, 2026 at 11:24 PM Valerio Setti <vsetti at baylibre.com> wrote:
>
> Hi Martin
>
> >> +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.
> >
>
> Thanks for catching it!
> Any testing is more than welcome. I don't have that board at home and,
> based on my quick search, it seems not super easy to find one these days.
>
> > [...]
> >> + audio-controller at 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 know that the register layout in these SoC is a bit messy, so let me
> explain how I got to the 0x148 that I wrote above.
>
> When working at this driver I used the S095 and S905X manuals that I
> found online, but based on the link you shared for the S912, I would say
> it's the same when it comes to AUDIN.
>
> Using [0] as reference, the highest register being mentioned in the
> AUDIN chapter is AUD_RESAMPLE_STATUS whose offset is 0x304 (i.e. 0xc1 *
> 4). However I noticed that before that there are a lot of registers
> whose name doesn't start with AUDIN_, but rather with AUDOUT_, PCMOUT_,
> PCMIN_.
> The first contiguous block of AUDIN_ stops at AUDIN_FIFO_INT which is
> 0x148 (= 0x52 * 4). The other AUDIN_ block you mentioned is between
> AUDIN_FIFO0_PIO_STS (at 0x2c0) and AUDIN_FIFO2_PIO_RDH (at 0x2e0).
Your approach is logical. And I have no way of proving my theory.
So the question for someone with access to better documentation or the
actual hardware description is:
- how big is the AUDIN IP block register space?
- what inputs are routed to the AUDIN IP block that neither Valerio
nor I identified so far (one reset line, one clock input, one
interrupt)?
> > 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 perfectly agree with this, but at the same time I thought that
> including registers which potentially do not belong to AUDIN was
> dangerous in the other direction, i.e. we cover a too large area that
> will be hard to use in the future if/when we want to use it and we
> realize it's really not part of AUDIN.
My concern is actually that the AUDIN hardware block spans 0x300 (or
close to it) and we'll find out later that there's a bit that we need
to toggle which is outside of the 0x148 area covered already.
Even worse: what if we put another register area after AUDIN and then
find out that this theoretical bit sits in the second register area.
Best regards,
Martin
More information about the linux-arm-kernel
mailing list