Re: [PATCH 1/7] dt-bindings: pinctrl: Add support for Broadcom STB pin controller

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Stefan

Sorry for the delay in responding - I was on holiday last week.

On Fri, 2 Aug 2024 at 19:10, Stefan Wahren <wahrenst@xxxxxxx> wrote:
>
> Hi,
>
> [add official Raspberry Pi kernel developer list]
>
> Am 31.07.24 um 08:28 schrieb Ivan T. Ivanov:
> > It looks like they are few revisions of this chip which varies
> > by number of pins. Perhaps not all of them are available on the
> > market. Perhaps some of them where early engineering samples,
> > I don't know. I decided to keep all of them just in case.
> The BCM2711 had also some revisions and we avoided successfully multiple
> versions of the RPi 4B DTS. So it would be nice if someone can explain
> if C0 & D0 are available in the market? Otherwise we may end up with
> multiple versions of the RPi 5 DTS.

AFAIK A0 and B0 silicon were never commercialised.
C0 is the current revision in use with Pi5.
D0 will be in devices imminently. CM5 will use it from launch, but
subsequently standard Pi5s will do as well.

In addition to putting in the few fixes that were desired, some
registers and DMA dreqs got shuffled around, hence some drivers will
need additional compatible strings (vc4 certainly does) and other
minor DT tweaks.

Checking our downstream dt files, we have bcm2712d0-rpi-5-b.dts[1]
that includes and patches the original (C0) bcm2712-rpi-5-b.dts[2].
The cleaner option would be to have a common bcm2712-rpi-5-b.dts(i)
and separate bcm2712c0-rpi-5-b.dts bcm2712d0-rpi-5-b.dts which include
the base and add the relevant customisations. Later a
bcm2712d0-rpi-cm5.dts DT should be able to include that same base file
as well.

I'm not quite sure why the GPIO names are redefined in our d0 file -
other than the unused ones using "-" instead of "", they appear
identical.

> I'm missing an explanation in the commit message, what's the difference
> between brcm,bcm2712-pinctrl and brcm,bcm2712-aon-pinctrl?

Two separate instantiations of the same IP block, but they differ in
the number of pins that are associated and the pinmux functions for
each of those pins. AFAIK there is no way from DT to specify those
pinmux function names, so otherwise
/sys/kernel/debug/pinctrl/<node>/pins will give the wrong function
mappings.

> According to the driver brcm,bcm2712-pinctrl is the same as
> brcm,bcm2712c0-pinctrl. So the former is more a fallback?

I'd need to check with Phil (who's on holiday this week) or Dom, but I
believe you are correct that "brcm,bcm2712-pinctrl" is a fallback.
Most likely due to our early DT files not having the c0 designation.
Obviously for mainline that is irrelevant, so dropping the
non-specific compatibles is fine.

I hope that makes some more sense.

  Dave

[1] https://github.com/raspberrypi/linux/blob/rpi-6.6.y/arch/arm64/boot/dts/broadcom/bcm2712d0-rpi-5-b.dts
[2] https://github.com/raspberrypi/linux/blob/rpi-6.6.y/arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dts

> Thanks
> >
> > Cc: Andrea della Porta <andrea.porta@xxxxxxxx>
> > Signed-off-by: Ivan T. Ivanov <iivanov@xxxxxxx>
> > ---
> >   .../pinctrl/brcm,brcmstb-pinctrl.yaml         | 73 +++++++++++++++++++
> >   1 file changed, 73 insertions(+)
> >   create mode 100644 Documentation/devicetree/bindings/pinctrl/brcm,brcmstb-pinctrl.yaml
> >
> > diff --git a/Documentation/devicetree/bindings/pinctrl/brcm,brcmstb-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/brcm,brcmstb-pinctrl.yaml
> > new file mode 100644
> > index 000000000000..c5afdb49d784
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/pinctrl/brcm,brcmstb-pinctrl.yaml
> > @@ -0,0 +1,73 @@
> > +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/pinctrl/brcm,brcmstb-pinctrl.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Broadcom STB family pin controller
> > +
> > +maintainers:
> > +  - Ivan T. Ivanov <iivanov@xxxxxxx>
> > +
> > +description:
> > +  Broadcom's STB family memory-mapped pin controller.
> > +
> > +properties:
> > +  compatible:
> > +    enum:
> > +      - brcm,bcm2712-pinctrl
> > +      - brcm,bcm2712-aon-pinctrl
> > +      - brcm,bcm2712c0-pinctrl
> > +      - brcm,bcm2712c0-aon-pinctrl
> > +      - brcm,bcm2712d0-pinctrl
> > +      - brcm,bcm2712d0-aon-pinctrl
> > +
> >
>




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux