Re: [PATCH v3] dt-bindings: net: Convert mdio-gpio to yaml

From: Andrew Lunn
Date: Mon May 03 2021 - 08:14:32 EST


> > What's the order with 3 lines? In any case, define the order with
> > schema:
> >
> > minItems:
> > items:
> > - description: MDC signal
> > - description: MDIO or ?? signal
> > - description: ?? signal
> >
>
> I dont know what to write in the third line, I added the "maxItems: 3" by request of Andrew Lunn.
> But I have no example at hand.
>
> Andrew could you give me an example of: "You often find with x86 machines you don't have GPIOs, just GPI
> and GPO, and you need to combine two to form the MDIO line of the MDIO bus."
> Or could I drop the "maxItems: 3" until a board need it.

The code gets the GPIOs via index. The index are defined in
include/linux/gpio-mdio.h as:

#define MDIO_GPIO_MDC 0
#define MDIO_GPIO_MDIO 1
#define MDIO_GPIO_MDO 2

So you can describe them MDC, MDIO, MDO.

Andrew