RE: [PATCH 1/2] spi: renesas,rzv2m-csi: Add SPI Slave related properties

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

 



Hi Geert,

Thanks for your reply!

> From: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
> Subject: Re: [PATCH 1/2] spi: renesas,rzv2m-csi: Add SPI Slave related
> properties
> 
> Hi Fabrizio,
> 
> On Tue, Sep 26, 2023 at 11:08 PM Fabrizio Castro
> <fabrizio.castro.jz@xxxxxxxxxxx> wrote:
> > The CSI IP found inside the Renesas RZ/V2M SoC can also work
> > in SPI slave mode.
> > When working in slave mode, the IP can make use of the SS
> > (Slave Select) pin, with "low" as default active level.
> > The active level of SS can be changed to "high" upon configuration.
> > This patch adds two new properties, one to make use of the
> > SS pin when in slave mode, and one to make the SS pin active high.
> >
> > Signed-off-by: Fabrizio Castro <fabrizio.castro.jz@xxxxxxxxxxx>
> 
> Thanks for your patch!
> 
> > --- a/Documentation/devicetree/bindings/spi/renesas,rzv2m-csi.yaml
> > +++ b/Documentation/devicetree/bindings/spi/renesas,rzv2m-csi.yaml
> > @@ -39,6 +39,17 @@ properties:
> >    power-domains:
> >      maxItems: 1
> >
> > +  renesas,csi-ss:
> > +    type: boolean
> > +    description:
> > +      Use CSI Slave Selection (SS) pin to enable transmission and
> reception when
> > +      in slave mode.
> 
> Can't this be done in a more generic way? I had expected that the
> existing SPI_NO_CS flag can be set using a property in the "slave"
> subnode,
> but apparently there is no "spi-no-cs" property defined yet.

I couldn't find a generic way to address that in a generic way.

> 
> > +
> > +  renesas,csi-ss-high:
> > +    type: boolean
> > +    description:
> > +      The SS pin is active high (by default the SS pin is active
> low).
> 
> Can't you use the "spi-cs-high" property in the "slave" subnode
> instead?

I could. I didn't go for it for the first version of this series
after reading the automatic handling of SPI_CS_HIGH (which for
example doesn't get automatically added to the mode for targets
using a GPIO as CS). Even though nothing prevents you from
explicitly adding SPI_CS_HIGH to the mode and using "spi-cs-high"
in the device tree, I thought that could be confusing, but
maybe it's not?

Thanks,
Fab

> 
> > +
> >  required:
> >    - compatible
> >    - reg
> 
> Gr{oetje,eeting}s,
> 
>                         Geert
> 
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 --
> geert@xxxxxxxxxxxxxx
> 
> In personal conversations with technical people, I call myself a
> hacker. But
> when I'm talking to journalists I just say "programmer" or something
> like that.
>                                 -- Linus Torvalds




[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