* [PATCH 0/2] spi: davinci: Convert bindings to dt-schema and clean up DTS
@ 2026-08-15 21:49 Bhargav Joshi
2026-08-15 21:49 ` [PATCH 1/2] ARM: dts: ti: keystone-k2l: Remove obsolete ti,davinci-spi-num-cs property Bhargav Joshi
2026-08-15 21:49 ` [PATCH 2/2] dt-bindings: spi: ti,davinci-spi: convert to DT schema Bhargav Joshi
0 siblings, 2 replies; 5+ messages in thread
From: Bhargav Joshi @ 2026-08-15 21:49 UTC (permalink / raw)
To: Mark Brown, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Bartosz Golaszewski, Nishanth Menon, Santosh Shilimkar
Cc: linux-spi, devicetree, linux-kernel, linux-arm-kernel, goledhruva,
m-chawdhry, daniel.baluta, simona.toaca, j.bhargav.u
This series converts the TI DaVinci/Keystone SPI controller device tree
bindings from the legacy text format to DT schema.
- Patch 1 removes the obsolete property `ti,davinci-spi-num-cs` from
keystone-k2l.dtsi, as the driver uses the standard `num-cs` property.
- Patch 2 Converts ti,davinci-spi from text to DT schema.
Signed-off-by: Bhargav Joshi <j.bhargav.u@gmail.com>
---
Bhargav Joshi (2):
ARM: dts: ti: keystone-k2l: Remove obsolete ti,davinci-spi-num-cs property
dt-bindings: spi: ti,davinci-spi: convert to DT schema
.../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 +++++++++++++++++++++
arch/arm/boot/dts/ti/keystone/keystone-k2l.dtsi | 9 --
5 files changed, 144 insertions(+), 109 deletions(-)
---
base-commit: 3eb40771c00a8488fa6ed2cc1fe203477908bf38
change-id: 20260816-ti-davinci-spi-e64e4e48b6b6
Best regards,
--
Bhargav
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/2] ARM: dts: ti: keystone-k2l: Remove obsolete ti,davinci-spi-num-cs property
2026-08-15 21:49 [PATCH 0/2] spi: davinci: Convert bindings to dt-schema and clean up DTS Bhargav Joshi
@ 2026-08-15 21:49 ` Bhargav Joshi
2026-08-15 21:57 ` sashiko-bot
2026-08-15 21:49 ` [PATCH 2/2] dt-bindings: spi: ti,davinci-spi: convert to DT schema Bhargav Joshi
1 sibling, 1 reply; 5+ messages in thread
From: Bhargav Joshi @ 2026-08-15 21:49 UTC (permalink / raw)
To: Mark Brown, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Bartosz Golaszewski, Nishanth Menon, Santosh Shilimkar
Cc: linux-spi, devicetree, linux-kernel, linux-arm-kernel, goledhruva,
m-chawdhry, daniel.baluta, simona.toaca, j.bhargav.u
Remove the property `ti,davinci-spi-num-cs` that is present in the SPI
nodes of keystone-k2l.dtsi, but it has never been documented in the
bindings or matched by driver. Driver relies on standard `num-cs`
property instead.
Signed-off-by: Bhargav Joshi <j.bhargav.u@gmail.com>
---
arch/arm/boot/dts/ti/keystone/keystone-k2l.dtsi | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/arch/arm/boot/dts/ti/keystone/keystone-k2l.dtsi b/arch/arm/boot/dts/ti/keystone/keystone-k2l.dtsi
index 330b437b667f..65fdb45e8368 100644
--- a/arch/arm/boot/dts/ti/keystone/keystone-k2l.dtsi
+++ b/arch/arm/boot/dts/ti/keystone/keystone-k2l.dtsi
@@ -400,16 +400,7 @@ mdio: mdio@26200f00 {
/include/ "keystone-k2l-netcp.dtsi"
};
-&spi0 {
- ti,davinci-spi-num-cs = <5>;
-};
-
-&spi1 {
- ti,davinci-spi-num-cs = <3>;
-};
-
&spi2 {
- ti,davinci-spi-num-cs = <5>;
/* Pin muxed. Enabled and configured by Bootloader */
status = "disabled";
};
--
2.55.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] dt-bindings: spi: ti,davinci-spi: convert to DT schema
2026-08-15 21:49 [PATCH 0/2] spi: davinci: Convert bindings to dt-schema and clean up DTS Bhargav Joshi
2026-08-15 21:49 ` [PATCH 1/2] ARM: dts: ti: keystone-k2l: Remove obsolete ti,davinci-spi-num-cs property Bhargav Joshi
@ 2026-08-15 21:49 ` Bhargav Joshi
2026-08-15 21:58 ` sashiko-bot
1 sibling, 1 reply; 5+ messages in thread
From: Bhargav Joshi @ 2026-08-15 21:49 UTC (permalink / raw)
To: Mark Brown, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Bartosz Golaszewski, Nishanth Menon, Santosh Shilimkar
Cc: linux-spi, devicetree, linux-kernel, linux-arm-kernel, goledhruva,
m-chawdhry, daniel.baluta, simona.toaca, j.bhargav.u
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.
- Add constraints to num-cs based on the maximum hardware chip
selects available on the DA850 SoC.
Signed-off-by: Bhargav Joshi <j.bhargav.u@gmail.com>
---
.../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(-)
diff --git a/Documentation/devicetree/bindings/spi/spi-davinci.txt b/Documentation/devicetree/bindings/spi/spi-davinci.txt
deleted file mode 100644
index f012888656ec..000000000000
--- a/Documentation/devicetree/bindings/spi/spi-davinci.txt
+++ /dev/null
@@ -1,100 +0,0 @@
-Davinci SPI controller device bindings
-
-Links on DM:
-Keystone 2 - https://www.ti.com/lit/ug/sprugp2a/sprugp2a.pdf
-dm644x - https://www.ti.com/lit/ug/sprue32a/sprue32a.pdf
-OMAP-L138/da830 - http://www.ti.com/lit/ug/spruh77a/spruh77a.pdf
-
-Required properties:
-- #address-cells: number of cells required to define a chip select
- address on the SPI bus. Should be set to 1.
-- #size-cells: should be zero.
-- compatible:
- - "ti,dm6441-spi" for SPI used similar to that on DM644x SoC family
- - "ti,da830-spi" for SPI used similar to that on DA8xx SoC family
- - "ti,keystone-spi" for SPI used similar to that on Keystone2 SoC
- family
-- reg: Offset and length of SPI controller register space
-- num-cs: Number of chip selects. This includes internal as well as
- GPIO chip selects.
-- ti,davinci-spi-intr-line: interrupt line used to connect the SPI
- IP to the interrupt controller within the SoC. Possible values
- are 0 and 1. Manual says one of the two possible interrupt
- lines can be tied to the interrupt controller. Set this
- based on a specific SoC configuration.
-- interrupts: interrupt number mapped to CPU.
-- clocks: spi clk phandle
- For 66AK2G this property should be set per binding,
- Documentation/devicetree/bindings/clock/ti,sci-clk.yaml
-
-SoC-specific Required Properties:
-
-The following are mandatory properties for Keystone 2 66AK2G SoCs only:
-
-- power-domains: Should contain a phandle to a PM domain provider node
- and an args specifier containing the SPI device id
- value. This property is as per the binding,
-
-Optional:
-- cs-gpios: gpio chip selects
- For example to have 3 internal CS and 2 GPIO CS, user could define
- cs-gpios = <0>, <0>, <0>, <&gpio1 30 0>, <&gpio1 31 0>;
- where first three are internal CS and last two are GPIO CS.
-
-Optional properties for slave devices:
-SPI slave nodes can contain the following properties.
-Not all SPI Peripherals from Texas Instruments support this.
-Please check SPI peripheral documentation for a device before using these.
-
-- ti,spi-wdelay : delay between transmission of words
- (SPIFMTn.WDELAY, SPIDAT1.WDEL) must be specified in number of SPI module
- clock periods.
-
- delay = WDELAY * SPI_module_clock_period + 2 * SPI_module_clock_period
-
-Below is timing diagram which shows functional meaning of
-"ti,spi-wdelay" parameter.
-
- +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+
-SPI_CLK | | | | | | | | | | | | | | | |
- +----------+ +-+ +-+ +-+ +-+ +---------------------------+ +-+ +-+ +-
-
-SPI_SOMI/SIMO+-----------------+ +-----------
- +----------+ word1 +---------------------------+word2
- +-----------------+ +-----------
- WDELAY
- <-------------------------->
-
-Example of a NOR flash slave device (n25q032) connected to DaVinci
-SPI controller device over the SPI bus.
-
-spi0:spi@20bf0000 {
- #address-cells = <1>;
- #size-cells = <0>;
- compatible = "ti,dm6446-spi";
- reg = <0x20BF0000 0x1000>;
- num-cs = <4>;
- ti,davinci-spi-intr-line = <0>;
- interrupts = <338>;
- clocks = <&clkspi>;
-
- flash: flash@0 {
- #address-cells = <1>;
- #size-cells = <1>;
- compatible = "st,m25p32";
- spi-max-frequency = <25000000>;
- reg = <0>;
- ti,spi-wdelay = <8>;
-
- partition@0 {
- label = "u-boot-spl";
- reg = <0x0 0x80000>;
- read-only;
- };
-
- partition@1 {
- label = "test";
- reg = <0x80000 0x380000>;
- };
- };
-};
diff --git a/Documentation/devicetree/bindings/spi/spi-peripheral-props.yaml b/Documentation/devicetree/bindings/spi/spi-peripheral-props.yaml
index 880a9f624566..cb5d608998e1 100644
--- a/Documentation/devicetree/bindings/spi/spi-peripheral-props.yaml
+++ b/Documentation/devicetree/bindings/spi/spi-peripheral-props.yaml
@@ -155,5 +155,6 @@ allOf:
- $ref: fsl,dspi-peripheral-props.yaml#
- $ref: samsung,spi-peripheral-props.yaml#
- $ref: nvidia,tegra210-quad-peripheral-props.yaml#
+ - $ref: ti,davinci-spi-peripheral-props.yaml#
additionalProperties: true
diff --git a/Documentation/devicetree/bindings/spi/ti,davinci-spi-peripheral-props.yaml b/Documentation/devicetree/bindings/spi/ti,davinci-spi-peripheral-props.yaml
new file mode 100644
index 000000000000..1060f176c6cb
--- /dev/null
+++ b/Documentation/devicetree/bindings/spi/ti,davinci-spi-peripheral-props.yaml
@@ -0,0 +1,25 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/spi/ti,davinci-spi-peripheral-props.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: TI DaVinci/Keystone SPI Peripheral Properties
+
+maintainers:
+ - Bartosz Golaszewski <brgl@kernel.org>
+
+description:
+ Peripheral-specific properties for SPI devices attached to a TI
+ DaVinci/Keystone SPI controller.
+
+properties:
+ ti,spi-wdelay:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 0
+ maximum: 63
+ description:
+ delay between transmission of words (SPIFMTn.WDELAY, SPIDAT1.WDEL)
+ must be specified in number of SPI module clock periods.
+
+additionalProperties: true
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..81014e963909
--- /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@kernel.org>
+
+properties:
+ compatible:
+ oneOf:
+ - enum:
+ - ti,da830-spi
+ - ti,keystone-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
+ maximum: 6
+ 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
+
+allOf:
+ - $ref: spi-controller.yaml#
+ - if:
+ properties:
+ compatible:
+ const: ti,keystone-spi
+ then:
+ required:
+ - power-domains
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ spi@20bf0000 {
+ compatible = "ti,keystone-spi","ti,dm6441-spi";
+ reg = <0x20bf0000 0x1000>;
+ num-cs = <4>;
+ ti,davinci-spi-intr-line = <0>;
+ interrupts = <338>;
+ clocks = <&clkspi>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ spi-max-frequency = <25000000>;
+ reg = <0>;
+ ti,spi-wdelay = <8>;
+ };
+ };
+
+ - |
+ spi@41000 {
+ compatible = "ti,da830-spi";
+ reg = <0x41000 0x1000>;
+ num-cs = <6>;
+ ti,davinci-spi-intr-line = <1>;
+ interrupts = <20>;
+ dmas = <&edma0 14 0>, <&edma0 15 0>;
+ dma-names = "rx", "tx";
+ clocks = <&psc0 4>;
+ power-domains = <&psc0 4>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
--
2.55.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] ARM: dts: ti: keystone-k2l: Remove obsolete ti,davinci-spi-num-cs property
2026-08-15 21:49 ` [PATCH 1/2] ARM: dts: ti: keystone-k2l: Remove obsolete ti,davinci-spi-num-cs property Bhargav Joshi
@ 2026-08-15 21:57 ` sashiko-bot
0 siblings, 0 replies; 5+ messages in thread
From: sashiko-bot @ 2026-08-15 21:57 UTC (permalink / raw)
To: Bhargav Joshi; +Cc: conor+dt, robh, devicetree
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Removing `ti,davinci-spi-num-cs` without replacing it with the standard `num-cs` property permanently discards the correct hardware capability limits, such as the 5 chip selects for `spi2`.
--
--- Patch [1]: [PATCH 1/2] ARM: dts: ti: keystone-k2l: Remove obsolete ti,davinci-spi-num-cs property ---
commit 09741cd34d52c73b4d50caafab226d5b1bedeba4
Author: Bhargav Joshi <j.bhargav.u@gmail.com>
ARM: dts: ti: keystone-k2l: Remove obsolete ti,davinci-spi-num-cs property
The commit removes the obsolete ti,davinci-spi-num-cs property from the SPI
nodes in keystone-k2l.dtsi, as it is not documented or used by the driver.
The driver relies on the standard num-cs property instead.
> diff --git a/arch/arm/boot/dts/ti/keystone/keystone-k2l.dtsi b/arch/arm/boot/dts/ti/keystone/keystone-k2l.dtsi
> index 330b437b667f6..65fdb45e83681 100644
> --- a/arch/arm/boot/dts/ti/keystone/keystone-k2l.dtsi
> +++ b/arch/arm/boot/dts/ti/keystone/keystone-k2l.dtsi
> @@ -400,16 +400,7 @@ mdio: mdio@26200f00 {
> /include/ "keystone-k2l-netcp.dtsi"
> };
>
> -&spi0 {
> - ti,davinci-spi-num-cs = <5>;
> -};
> -
> -&spi1 {
> - ti,davinci-spi-num-cs = <3>;
> -};
> -
> &spi2 {
> - ti,davinci-spi-num-cs = <5>;
[Severity: Medium]
Does removing this property instead of converting it to the standard num-cs
property permanently discard the correct hardware limits?
By removing the property entirely, these nodes will silently inherit the default
num-cs = <4> from keystone.dtsi. This discards the intended capabilities
(5 chip selects for spi0/spi2, 3 for spi1) rather than fixing them. The file
itself documents SPI2CS4 (the 5th chip select) for spi2 pinmux.
Should these be replaced with num-cs = <5> and num-cs = <3> respectively?
> /* Pin muxed. Enabled and configured by Bootloader */
> status = "disabled";
> };
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260816-ti-davinci-spi-v1-0-a7f57dfd5262@gmail.com?part=1
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] dt-bindings: spi: ti,davinci-spi: convert to DT schema
2026-08-15 21:49 ` [PATCH 2/2] dt-bindings: spi: ti,davinci-spi: convert to DT schema Bhargav Joshi
@ 2026-08-15 21:58 ` sashiko-bot
0 siblings, 0 replies; 5+ messages in thread
From: sashiko-bot @ 2026-08-15 21:58 UTC (permalink / raw)
To: Bhargav Joshi; +Cc: devicetree, conor+dt, robh
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Medium] The `num-cs` property is incorrectly capped at a maximum of 6, artificially limiting the use of GPIO-based chip selects.
- [Medium] The converted DT schema incorrectly drops standalone support for `ti,dm6441-spi`, breaking backwards compatibility for DM644x device trees.
--
--- Patch [2]: [PATCH 2/2] dt-bindings: spi: ti,davinci-spi: convert to DT schema ---
commit e89abf8864b6f9ee684db27ba9936dcad0c1cd48
Author: Bhargav Joshi <j.bhargav.u@gmail.com>
dt-bindings: spi: ti,davinci-spi: convert to DT schema
This commit converts the TI DaVinci/Keystone SPI controller binding
from text format to DT schema. It also creates a separate schema for
peripheral properties.
> 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 0000000000000..81014e9639097
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/spi/ti,davinci-spi.yaml
[ ... ]
> +properties:
> + compatible:
> + oneOf:
> + - enum:
> + - ti,da830-spi
> + - ti,keystone-spi
> + - items:
> + - const: ti,keystone-spi
> + - const: ti,dm6441-spi
[Severity: Medium]
Does this structure accidentally drop support for using ti,dm6441-spi
as a standalone compatible string?
The original text binding documented ti,dm6441-spi as valid on its own,
and the driver natively matches it. This new schema restricts it to
only being used as a fallback for ti,keystone-spi, which will cause
schema validation to fail for existing DM644x device trees.
[ ... ]
> + 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
> + maximum: 6
> + default: 1
> + description:
> + Number of chip selects supported by the controller. This
> + includes both internal and GPIO chip selects.
[Severity: Medium]
Should this property be capped at a maximum of 6?
The commit message notes this constraint is based on the maximum
hardware chip selects available. However, since the description explicitly
states this includes GPIO chip selects, imposing a rigid hardware maximum
prevents using an unbounded number of GPIO chip selects.
Device trees using more than 6 total chip selects (such as by defining
num-cs = <8> along with a cs-gpios array) will now fail validation.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260816-ti-davinci-spi-v1-0-a7f57dfd5262@gmail.com?part=2
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-08-15 21:58 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-15 21:49 [PATCH 0/2] spi: davinci: Convert bindings to dt-schema and clean up DTS Bhargav Joshi
2026-08-15 21:49 ` [PATCH 1/2] ARM: dts: ti: keystone-k2l: Remove obsolete ti,davinci-spi-num-cs property Bhargav Joshi
2026-08-15 21:57 ` sashiko-bot
2026-08-15 21:49 ` [PATCH 2/2] dt-bindings: spi: ti,davinci-spi: convert to DT schema Bhargav Joshi
2026-08-15 21:58 ` sashiko-bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox