[PATCH v2 3/3] dt-bindings: gpio: Add Nuvoton NPCM750 serial I/O expansion interface(SGPIO)

Jim Liu jim.t90615 at gmail.com
Fri Nov 11 20:30:15 AEDT 2022


Hi Linus and Krzysztof

This is a special feature of npcm750.
it's not a normal gpio.
It's similar to aspeed sgpio.

The spec as below:

The full name is "serial I/O expansion"  interface.
The NPCM7xx and NPCM8xx include two SGPIO modules.
This interface has 4 pins  (D_out , D_in, S_CLK, LDSH).
Each module includes eight input ports and eight output ports.
Each port can control eight pins.
Input ports only can be input ,output is so on.
So support up to 64 input pins and 64 output pins.

-S_CLK:
The clock is generated by APB3, so users can set the bus frequency and
the driver will set the spgio divided reg to
generate a similar clock to sgpio bus.

-D_out:
the output data is the serial data needed to connect to hc595 and the
data will output to hc595 parallel pins.
you can use dts nout_gpios to create the number of pins.

-D_in
this pin need to connect to hc165 and get the serial data from hc165.
you can use dts nin_gpios to create the number of pins.

LDSH:
this pin is used to get input data or send output data.
the user can't control this pin.
one operation cycle is include input and output
beginning the signal, the  LDSH is low and now will send output serial data ,
after finished output serial data the LDSH will be high and get serial
input data.

If you have any questions or are confused please let me know.
Your comments are most welcome.

Best regards,
Jim


On Wed, Nov 9, 2022 at 5:14 PM Linus Walleij <linus.walleij at linaro.org> wrote:
>
> On Tue, Nov 8, 2022 at 10:29 AM Jim Liu <jim.t90615 at gmail.com> wrote:
>
> > +  nin_gpios: true
> > +
> > +  nout_gpios: true
>
> My comment from v1 still holds.
> I'd say just drop these two, it's too much trying to protect
> the users from themselves.
>
> > +  bus-frequency: true
>
> Given that you have clocks already, what does this actually specify?
> Which bus? The one the GPIO is connected to? Why is it different
> from the frequency from the clocks? And what is it used for, why does
> it need to be specified? So many questions.
>
> A description is necessary.
>
> I guess the : true means it is picked up from the core schemas somehow
> but that doesn't make me smarter.
>
> Yours,
> Linus Walleij


More information about the openbmc mailing list