Re: [PATCH v2 2/2] dt-bindings: spi: ti,davinci-spi: convert to DT schema
From: Bhargav Joshi
Date: Sun Aug 16 2026 - 17:41:00 EST
Hi,
On Sun, Aug 16, 2026 at 11:09 PM Dhruva G <goledhruva@xxxxxxxxx> wrote:
>
> Hi Bhargav,
>
> On 16-08-2026 03:53, Bhargav Joshi wrote:
> > Convert the TI DaVinci/Keystone SPI controller binding from text format
> > to DT schema.
> >
> > Changes during the conversion:
> > - Create a separate ti,davinci-spi-peripheral-props.yaml schema to
> > properly define the ti,spi-wdelay peripheral property.
> > - Add missing dmas and dma-names properties.
> > - Add constraints to ti,spi-wdelay based on the 6-bit width
> > of the SPIFMTn.WDELAY hardware register field.
> >
> > Signed-off-by: Bhargav Joshi <j.bhargav.u@xxxxxxxxx>
> > ---
> > .../devicetree/bindings/spi/spi-davinci.txt | 100 -----------------> .../bindings/spi/spi-peripheral-props.yaml | 1 +
> > .../spi/ti,davinci-spi-peripheral-props.yaml | 25 +++++
> > .../devicetree/bindings/spi/ti,davinci-spi.yaml | 118 +++++++++++++++++++++
> > 4 files changed, 144 insertions(+), 100 deletions(-)
> >
> [..snip..]
> > diff --git a/Documentation/devicetree/bindings/spi/ti,davinci-spi.yaml b/Documentation/devicetree/bindings/spi/ti,davinci-spi.yaml
> > new file mode 100644
> > index 000000000000..b685082de721
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/spi/ti,davinci-spi.yaml
> > @@ -0,0 +1,118 @@
> > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/spi/ti,davinci-spi.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: TI DaVinci/Keystone SPI Controller
> > +
> > +maintainers:
> > + - Bartosz Golaszewski <brgl@xxxxxxxxxx>
> > +
> > +properties:
> > + compatible:
> > + oneOf:
> > + - enum:
> > + - ti,da830-spi
> > + - ti,keystone-spi
> > + - ti,dm6441-spi
> > + - items:
> > + - const: ti,keystone-spi
> > + - const: ti,dm6441-spi
> > +
> > + reg:
> > + maxItems: 1
> > +
> > + interrupts:
> > + maxItems: 1
> > +
> > + clocks:
> > + maxItems: 1
> > +
> > + power-domains:
> > + maxItems: 1
> > + description:
> > + Should contain a phandle to a PM domain provider node
> > + and an args specifier containing the SPI device id
> > + value.
> > +
> > + num-cs:
> > + minimum: 1
> > + default: 1
> > + description:
> > + Number of chip selects supported by the controller. This
> > + includes both internal and GPIO chip selects.
> > +
> > + ti,davinci-spi-intr-line:
> > + $ref: /schemas/types.yaml#/definitions/uint32
> > + enum: [0, 1]
> > + description:
> > + Interrupt line used to connect the SPI IP to the interrupt
> > + controller within the SoC. The SPI peripheral can route its
> > + interrupt output to one of two lines (INT0 or INT1). Set
> > + this based on the SoC-specific wiring to the interrupt
> > + controller.
> > +
> > + dmas:
> > + items:
> > + - description: RX DMA channel
> > + - description: TX DMA channel
> > +
> > + dma-names:
> > + items:
> > + - const: rx
> > + - const: tx
> > +
> > +required:
> > + - compatible
> > + - reg
> > + - interrupts
> > + - clocks
> > + - ti,davinci-spi-intr-line
>
> The old text binding lists #address-cells, #size-cells, and num-cs as required properties,
> but the converted schema omits all three from the required list, was that intentional?
>
since #address-cells #size-cells are required only if there are child
nodes so i omitted it but will fix it
v3.
> spi-controller.yaml defines these properties but does not require them, so this silently relaxes
> the binding and permits controller nodes without the SPI bus cell declarations.
>
> num-cs was also required by the old binding. It should remain required to preserve the existing binding,
> or else the commit message should explain why making it optional and relying on the driver's default of one
> is intentional.
driver defaults to 1 when num-cs is not defined in dt so i kept it
optional, but since legacy text binding required it
i will add it to required in v3
Best regards,
Bhargav