Message ID | 20241023120015.1049008-1-festevam@gmail.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | [1/3] dt-bindings: misc: lwn,bk4-spi: Add binding | expand |
Hi Fabio, > From: Fabio Estevam <festevam@denx.de> > > Add a lwn,bk4-spi.yaml binding for Liebherr's BK4 external SPI > controller. > > Currently, the compatible string used for this device is "lwn,bk4", > which is the same as the board compatible string documented at > fsl.yaml. > > This causes several dt-schema warnings: > > make dtbs_check DT_SCHEMA_FILES=fsl.yaml > ... > > ['lwn,bk4'] is too short > 'lwn,bk4' is not one of ['tq,imx8dxp-tqma8xdp-mba8xx'] > 'lwn,bk4' is not one of ['tq,imx8qxp-tqma8xqp-mba8xx'] > 'lwn,bk4' is not one of ['armadeus,imx1-apf9328', 'fsl,imx1ads'] > ... > > Use a more specific "lwn,bk4-spi" compatible string for this > device. > Thanks for updating this. BK4 is another example of to be long-time supported device... :-) > Signed-off-by: Fabio Estevam <festevam@denx.de> > --- > .../devicetree/bindings/misc/lwn,bk4-spi.yaml | 54 > +++++++++++++++++++ .../devicetree/bindings/misc/lwn-bk4.txt | > 26 --------- 2 files changed, 54 insertions(+), 26 deletions(-) > create mode 100644 > Documentation/devicetree/bindings/misc/lwn,bk4-spi.yaml delete mode > 100644 Documentation/devicetree/bindings/misc/lwn-bk4.txt > > diff --git a/Documentation/devicetree/bindings/misc/lwn,bk4-spi.yaml > b/Documentation/devicetree/bindings/misc/lwn,bk4-spi.yaml new file > mode 100644 index 000000000000..7fb86e6abade > --- /dev/null > +++ b/Documentation/devicetree/bindings/misc/lwn,bk4-spi.yaml > @@ -0,0 +1,54 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/misc/lwn,bk4-spi.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Liebherr's BK4 external SPI controller > + > +maintainers: > + - Lukasz Majewski <lukma@denx.de> > + > +description: | > + Liebherr's BK4 external SPI controller is a device which handles > data > + acquisition from compatible industrial peripherals. > + The SPI is used for data and management purposes in both master and > + slave modes. > + > +allOf: > + - $ref: /schemas/spi/spi-peripheral-props.yaml# > + > +properties: > + compatible: > + const: lwn,bk4-spi > + > + reg: > + maxItems: 1 > + > + spi-max-frequency: > + maximum: 30000000 > + > + fsl,spi-cs-sck-delay: true > + > + fsl,spi-sck-cs-delay: true > + > +required: > + - compatible > + - spi-max-frequency > + > +additionalProperties: false > + > +examples: > + - | > + spi { > + #address-cells = <1>; > + #size-cells = <0>; > + > + spidev@0 { > + compatible = "lwn,bk4-spi"; > + reg = <0>; > + spi-max-frequency = <30000000>; > + fsl,spi-cs-sck-delay = <200>; > + fsl,spi-sck-cs-delay = <400>; > + }; > + }; > diff --git a/Documentation/devicetree/bindings/misc/lwn-bk4.txt > b/Documentation/devicetree/bindings/misc/lwn-bk4.txt deleted file > mode 100644 index d6a8c188c087..000000000000 > --- a/Documentation/devicetree/bindings/misc/lwn-bk4.txt > +++ /dev/null > @@ -1,26 +0,0 @@ > -* Liebherr's BK4 controller external SPI > - > -A device which handles data acquisition from compatible industrial > -peripherals. > -The SPI is used for data and management purposes in both master and > -slave modes. > - > -Required properties: > - > -- compatible : Should be "lwn,bk4" > - > -Required SPI properties: > - > -- reg : Should be address of the device chip select within > - the controller. > - > -- spi-max-frequency : Maximum SPI clocking speed of device in Hz, > should be > - 30MHz at most for the Liebherr's BK4 external bus. > - > -Example: > - > -spidev0: spi@0 { > - compatible = "lwn,bk4"; > - spi-max-frequency = <30000000>; > - reg = <0>; > -}; Best regards, Lukasz Majewski -- DENX Software Engineering GmbH, Managing Director: Erika Unter HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de
On Wed, Oct 23, 2024 at 09:00:13AM -0300, Fabio Estevam wrote: > From: Fabio Estevam <festevam@denx.de> > > Add a lwn,bk4-spi.yaml binding for Liebherr's BK4 external SPI controller. > > Currently, the compatible string used for this device is "lwn,bk4", > which is the same as the board compatible string documented at fsl.yaml. > > This causes several dt-schema warnings: > > make dtbs_check DT_SCHEMA_FILES=fsl.yaml > ... > > ['lwn,bk4'] is too short > 'lwn,bk4' is not one of ['tq,imx8dxp-tqma8xdp-mba8xx'] > 'lwn,bk4' is not one of ['tq,imx8qxp-tqma8xqp-mba8xx'] > 'lwn,bk4' is not one of ['armadeus,imx1-apf9328', 'fsl,imx1ads'] > ... > > Use a more specific "lwn,bk4-spi" compatible string for this > device. > > Signed-off-by: Fabio Estevam <festevam@denx.de> > --- > .../devicetree/bindings/misc/lwn,bk4-spi.yaml | 54 +++++++++++++++++++ > .../devicetree/bindings/misc/lwn-bk4.txt | 26 --------- > 2 files changed, 54 insertions(+), 26 deletions(-) > create mode 100644 Documentation/devicetree/bindings/misc/lwn,bk4-spi.yaml > delete mode 100644 Documentation/devicetree/bindings/misc/lwn-bk4.txt > > diff --git a/Documentation/devicetree/bindings/misc/lwn,bk4-spi.yaml b/Documentation/devicetree/bindings/misc/lwn,bk4-spi.yaml > new file mode 100644 > index 000000000000..7fb86e6abade > --- /dev/null > +++ b/Documentation/devicetree/bindings/misc/lwn,bk4-spi.yaml > @@ -0,0 +1,54 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/misc/lwn,bk4-spi.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Liebherr's BK4 external SPI controller > + > +maintainers: > + - Lukasz Majewski <lukma@denx.de> > + > +description: | > + Liebherr's BK4 external SPI controller is a device which handles data > + acquisition from compatible industrial peripherals. > + The SPI is used for data and management purposes in both master and > + slave modes. > + > +allOf: > + - $ref: /schemas/spi/spi-peripheral-props.yaml# > + > +properties: > + compatible: > + const: lwn,bk4-spi > + > + reg: > + maxItems: 1 > + > + spi-max-frequency: > + maximum: 30000000 > + > + fsl,spi-cs-sck-delay: true > + > + fsl,spi-sck-cs-delay: true Why does this have fsl properties? I figure they're taken from the dts, but spidev doesn't use them, right? > + > +required: > + - compatible > + - spi-max-frequency > + > +additionalProperties: false > + > +examples: > + - | > + spi { > + #address-cells = <1>; > + #size-cells = <0>; > + > + spidev@0 { ^^^^^^ This should really be the type of device that this is. The way you word the description etc doesn't really make much sense to me but it sounds like this is a daisy chained spi controller? Or is it a data acquisition device that is a spi "slave"? > + compatible = "lwn,bk4-spi"; > + reg = <0>; > + spi-max-frequency = <30000000>; > + fsl,spi-cs-sck-delay = <200>; > + fsl,spi-sck-cs-delay = <400>; > + }; > + }; > diff --git a/Documentation/devicetree/bindings/misc/lwn-bk4.txt b/Documentation/devicetree/bindings/misc/lwn-bk4.txt > deleted file mode 100644 > index d6a8c188c087..000000000000 > --- a/Documentation/devicetree/bindings/misc/lwn-bk4.txt > +++ /dev/null > @@ -1,26 +0,0 @@ > -* Liebherr's BK4 controller external SPI > - > -A device which handles data acquisition from compatible industrial > -peripherals. > -The SPI is used for data and management purposes in both master and > -slave modes. > - > -Required properties: > - > -- compatible : Should be "lwn,bk4" > - > -Required SPI properties: > - > -- reg : Should be address of the device chip select within > - the controller. > - > -- spi-max-frequency : Maximum SPI clocking speed of device in Hz, should be > - 30MHz at most for the Liebherr's BK4 external bus. > - > -Example: > - > -spidev0: spi@0 { > - compatible = "lwn,bk4"; > - spi-max-frequency = <30000000>; > - reg = <0>; > -}; > -- > 2.34.1 >
On Wed, Oct 23, 2024 at 05:37:29PM +0100, Conor Dooley wrote: > On Wed, Oct 23, 2024 at 09:00:13AM -0300, Fabio Estevam wrote: > > + fsl,spi-cs-sck-delay: true > > + fsl,spi-sck-cs-delay: true > Why does this have fsl properties? I figure they're taken from the dts, > but spidev doesn't use them, right? These are controlling signal timing and implemented by the SPI controller rather than the device - they're the timing the device requires.
On Wed, Oct 23, 2024 at 06:33:07PM +0100, Mark Brown wrote: > On Wed, Oct 23, 2024 at 05:37:29PM +0100, Conor Dooley wrote: > > On Wed, Oct 23, 2024 at 09:00:13AM -0300, Fabio Estevam wrote: > > > > + fsl,spi-cs-sck-delay: true > > > > + fsl,spi-sck-cs-delay: true > > > Why does this have fsl properties? I figure they're taken from the dts, > > but spidev doesn't use them, right? > > These are controlling signal timing and implemented by the SPI > controller rather than the device - they're the timing the device > requires. I see, thanks.
On Wed, Oct 23, 2024 at 05:17:39PM +0200, Lukasz Majewski wrote: > Hi Fabio, > > > From: Fabio Estevam <festevam@denx.de> > > > > Add a lwn,bk4-spi.yaml binding for Liebherr's BK4 external SPI > > controller. > > > > Currently, the compatible string used for this device is "lwn,bk4", > > which is the same as the board compatible string documented at > > fsl.yaml. > > > > This causes several dt-schema warnings: > > > > make dtbs_check DT_SCHEMA_FILES=fsl.yaml > > ... > > > > ['lwn,bk4'] is too short > > 'lwn,bk4' is not one of ['tq,imx8dxp-tqma8xdp-mba8xx'] > > 'lwn,bk4' is not one of ['tq,imx8qxp-tqma8xqp-mba8xx'] > > 'lwn,bk4' is not one of ['armadeus,imx1-apf9328', 'fsl,imx1ads'] > > ... > > > > Use a more specific "lwn,bk4-spi" compatible string for this > > device. > > > > Thanks for updating this. > > BK4 is another example of to be long-time supported device... :-) Does that mean we shouldn't be changing this compatible? Rob
diff --git a/Documentation/devicetree/bindings/misc/lwn,bk4-spi.yaml b/Documentation/devicetree/bindings/misc/lwn,bk4-spi.yaml new file mode 100644 index 000000000000..7fb86e6abade --- /dev/null +++ b/Documentation/devicetree/bindings/misc/lwn,bk4-spi.yaml @@ -0,0 +1,54 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/misc/lwn,bk4-spi.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Liebherr's BK4 external SPI controller + +maintainers: + - Lukasz Majewski <lukma@denx.de> + +description: | + Liebherr's BK4 external SPI controller is a device which handles data + acquisition from compatible industrial peripherals. + The SPI is used for data and management purposes in both master and + slave modes. + +allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# + +properties: + compatible: + const: lwn,bk4-spi + + reg: + maxItems: 1 + + spi-max-frequency: + maximum: 30000000 + + fsl,spi-cs-sck-delay: true + + fsl,spi-sck-cs-delay: true + +required: + - compatible + - spi-max-frequency + +additionalProperties: false + +examples: + - | + spi { + #address-cells = <1>; + #size-cells = <0>; + + spidev@0 { + compatible = "lwn,bk4-spi"; + reg = <0>; + spi-max-frequency = <30000000>; + fsl,spi-cs-sck-delay = <200>; + fsl,spi-sck-cs-delay = <400>; + }; + }; diff --git a/Documentation/devicetree/bindings/misc/lwn-bk4.txt b/Documentation/devicetree/bindings/misc/lwn-bk4.txt deleted file mode 100644 index d6a8c188c087..000000000000 --- a/Documentation/devicetree/bindings/misc/lwn-bk4.txt +++ /dev/null @@ -1,26 +0,0 @@ -* Liebherr's BK4 controller external SPI - -A device which handles data acquisition from compatible industrial -peripherals. -The SPI is used for data and management purposes in both master and -slave modes. - -Required properties: - -- compatible : Should be "lwn,bk4" - -Required SPI properties: - -- reg : Should be address of the device chip select within - the controller. - -- spi-max-frequency : Maximum SPI clocking speed of device in Hz, should be - 30MHz at most for the Liebherr's BK4 external bus. - -Example: - -spidev0: spi@0 { - compatible = "lwn,bk4"; - spi-max-frequency = <30000000>; - reg = <0>; -};