* [PATCH 0/5] spi: Few cleanups while looking at num-cs
@ 2026-08-04 7:16 Krzysztof Kozlowski
2026-08-04 7:16 ` [PATCH 1/5] spi: dt-bindings: andestech,ae350-spi: Drop redundant num-cs Krzysztof Kozlowski
` (5 more replies)
0 siblings, 6 replies; 8+ messages in thread
From: Krzysztof Kozlowski @ 2026-08-04 7:16 UTC (permalink / raw)
To: CL Wang, Mark Brown, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Kousik Sanagavarapu, Vladimir Moravcevic,
Tzu-Hao Wei, Swark Yang, Prasad Bolisetty, Karthikeyan Mitran,
Michal Simek
Cc: linux-spi, devicetree, linux-kernel, linux-arm-kernel,
Krzysztof Kozlowski
Few minor cleanups for DT bindings and Andes driver.
Patches do not have inter-dependencies.
Best regards,
Krzysztof
---
Krzysztof Kozlowski (5):
spi: dt-bindings: andestech,ae350-spi: Drop redundant num-cs
spi: dt-bindings: marvell,armada-3700-spi: Drop redundant num-cs
spi: dt-bindings: axiado,ax3000-spi: Drop duplicated type/ref
spi: dt-bindings: spi-cadence: Drop duplicated type/ref
spi: atcspi200: Drop redundant andestech,qilai-spi compatible
Documentation/devicetree/bindings/spi/andestech,ae350-spi.yaml | 4 ----
Documentation/devicetree/bindings/spi/axiado,ax3000-spi.yaml | 1 -
Documentation/devicetree/bindings/spi/marvell,armada-3700-spi.yaml | 3 ---
Documentation/devicetree/bindings/spi/spi-cadence.yaml | 1 -
drivers/spi/spi-atcspi200.c | 1 -
5 files changed, 10 deletions(-)
---
base-commit: 415606a7be939835db9b0d6b711887586646346d
change-id: 20260804-spi-num-cs-2a41ca406eb0
Best regards,
--
Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/5] spi: dt-bindings: andestech,ae350-spi: Drop redundant num-cs
2026-08-04 7:16 [PATCH 0/5] spi: Few cleanups while looking at num-cs Krzysztof Kozlowski
@ 2026-08-04 7:16 ` Krzysztof Kozlowski
2026-08-04 7:16 ` [PATCH 2/5] spi: dt-bindings: marvell,armada-3700-spi: " Krzysztof Kozlowski
` (4 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: Krzysztof Kozlowski @ 2026-08-04 7:16 UTC (permalink / raw)
To: CL Wang, Mark Brown, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Kousik Sanagavarapu, Vladimir Moravcevic,
Tzu-Hao Wei, Swark Yang, Prasad Bolisetty, Karthikeyan Mitran,
Michal Simek
Cc: linux-spi, devicetree, linux-kernel, linux-arm-kernel,
Krzysztof Kozlowski
'num-cs' property is a single integer, thus the binding should not set
maxItems. This could be replaced with proper min/max constraints for
values, except that hardware (as expressed in driver) supports only one
native chipselect, thus constraint of "const:1" would make the property
implied by the compatible. spi-controller.yaml schema already defines
this property, so its presence here is redundant.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
---
Documentation/devicetree/bindings/spi/andestech,ae350-spi.yaml | 4 ----
1 file changed, 4 deletions(-)
diff --git a/Documentation/devicetree/bindings/spi/andestech,ae350-spi.yaml b/Documentation/devicetree/bindings/spi/andestech,ae350-spi.yaml
index 8e441742cee6..381042e07fd0 100644
--- a/Documentation/devicetree/bindings/spi/andestech,ae350-spi.yaml
+++ b/Documentation/devicetree/bindings/spi/andestech,ae350-spi.yaml
@@ -24,10 +24,6 @@ properties:
clocks:
maxItems: 1
- num-cs:
- description: Number of chip selects supported
- maxItems: 1
-
dmas:
items:
- description: Transmit FIFO DMA channel
--
2.53.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/5] spi: dt-bindings: marvell,armada-3700-spi: Drop redundant num-cs
2026-08-04 7:16 [PATCH 0/5] spi: Few cleanups while looking at num-cs Krzysztof Kozlowski
2026-08-04 7:16 ` [PATCH 1/5] spi: dt-bindings: andestech,ae350-spi: Drop redundant num-cs Krzysztof Kozlowski
@ 2026-08-04 7:16 ` Krzysztof Kozlowski
2026-08-04 7:16 ` [PATCH 3/5] spi: dt-bindings: axiado,ax3000-spi: Drop duplicated type/ref Krzysztof Kozlowski
` (3 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: Krzysztof Kozlowski @ 2026-08-04 7:16 UTC (permalink / raw)
To: CL Wang, Mark Brown, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Kousik Sanagavarapu, Vladimir Moravcevic,
Tzu-Hao Wei, Swark Yang, Prasad Bolisetty, Karthikeyan Mitran,
Michal Simek
Cc: linux-spi, devicetree, linux-kernel, linux-arm-kernel,
Krzysztof Kozlowski
'num-cs' property is a single integer, thus the binding should not set
maxItems. This could be replaced with proper min/max constraints for
values, except that such constraints are not known.
spi-controller.yaml schema already defines this property, so its
presence here is redundant.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
---
Documentation/devicetree/bindings/spi/marvell,armada-3700-spi.yaml | 3 ---
1 file changed, 3 deletions(-)
diff --git a/Documentation/devicetree/bindings/spi/marvell,armada-3700-spi.yaml b/Documentation/devicetree/bindings/spi/marvell,armada-3700-spi.yaml
index 61caa1d86188..75437c46e65a 100644
--- a/Documentation/devicetree/bindings/spi/marvell,armada-3700-spi.yaml
+++ b/Documentation/devicetree/bindings/spi/marvell,armada-3700-spi.yaml
@@ -28,9 +28,6 @@ properties:
clocks:
maxItems: 1
- num-cs:
- maxItems: 1
-
required:
- compatible
- reg
--
2.53.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 3/5] spi: dt-bindings: axiado,ax3000-spi: Drop duplicated type/ref
2026-08-04 7:16 [PATCH 0/5] spi: Few cleanups while looking at num-cs Krzysztof Kozlowski
2026-08-04 7:16 ` [PATCH 1/5] spi: dt-bindings: andestech,ae350-spi: Drop redundant num-cs Krzysztof Kozlowski
2026-08-04 7:16 ` [PATCH 2/5] spi: dt-bindings: marvell,armada-3700-spi: " Krzysztof Kozlowski
@ 2026-08-04 7:16 ` Krzysztof Kozlowski
2026-08-04 7:17 ` [PATCH 4/5] spi: dt-bindings: spi-cadence: " Krzysztof Kozlowski
` (2 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: Krzysztof Kozlowski @ 2026-08-04 7:16 UTC (permalink / raw)
To: CL Wang, Mark Brown, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Kousik Sanagavarapu, Vladimir Moravcevic,
Tzu-Hao Wei, Swark Yang, Prasad Bolisetty, Karthikeyan Mitran,
Michal Simek
Cc: linux-spi, devicetree, linux-kernel, linux-arm-kernel,
Krzysztof Kozlowski
spi-controller.yaml schema already defines this $ref for this property,
so binding does not have to.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
---
Documentation/devicetree/bindings/spi/axiado,ax3000-spi.yaml | 1 -
1 file changed, 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/spi/axiado,ax3000-spi.yaml b/Documentation/devicetree/bindings/spi/axiado,ax3000-spi.yaml
index cd2aac66fca2..be258c1f36b1 100644
--- a/Documentation/devicetree/bindings/spi/axiado,ax3000-spi.yaml
+++ b/Documentation/devicetree/bindings/spi/axiado,ax3000-spi.yaml
@@ -37,7 +37,6 @@ properties:
num-cs:
description: |
Number of chip selects used.
- $ref: /schemas/types.yaml#/definitions/uint32
minimum: 1
maximum: 4
default: 4
--
2.53.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 4/5] spi: dt-bindings: spi-cadence: Drop duplicated type/ref
2026-08-04 7:16 [PATCH 0/5] spi: Few cleanups while looking at num-cs Krzysztof Kozlowski
` (2 preceding siblings ...)
2026-08-04 7:16 ` [PATCH 3/5] spi: dt-bindings: axiado,ax3000-spi: Drop duplicated type/ref Krzysztof Kozlowski
@ 2026-08-04 7:17 ` Krzysztof Kozlowski
2026-08-04 7:17 ` [PATCH 5/5] spi: atcspi200: Drop redundant andestech,qilai-spi compatible Krzysztof Kozlowski
2026-08-04 17:51 ` [PATCH 0/5] spi: Few cleanups while looking at num-cs Mark Brown
5 siblings, 0 replies; 8+ messages in thread
From: Krzysztof Kozlowski @ 2026-08-04 7:17 UTC (permalink / raw)
To: CL Wang, Mark Brown, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Kousik Sanagavarapu, Vladimir Moravcevic,
Tzu-Hao Wei, Swark Yang, Prasad Bolisetty, Karthikeyan Mitran,
Michal Simek
Cc: linux-spi, devicetree, linux-kernel, linux-arm-kernel,
Krzysztof Kozlowski
spi-controller.yaml schema already defines this $ref for this property,
so binding does not have to.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
---
Documentation/devicetree/bindings/spi/spi-cadence.yaml | 1 -
1 file changed, 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/spi/spi-cadence.yaml b/Documentation/devicetree/bindings/spi/spi-cadence.yaml
index 347bed0c4956..429cd824156c 100644
--- a/Documentation/devicetree/bindings/spi/spi-cadence.yaml
+++ b/Documentation/devicetree/bindings/spi/spi-cadence.yaml
@@ -43,7 +43,6 @@ properties:
Number of chip selects used. If a decoder is used,
this will be the number of chip selects after the
decoder.
- $ref: /schemas/types.yaml#/definitions/uint32
minimum: 1
maximum: 4
default: 4
--
2.53.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 5/5] spi: atcspi200: Drop redundant andestech,qilai-spi compatible
2026-08-04 7:16 [PATCH 0/5] spi: Few cleanups while looking at num-cs Krzysztof Kozlowski
` (3 preceding siblings ...)
2026-08-04 7:17 ` [PATCH 4/5] spi: dt-bindings: spi-cadence: " Krzysztof Kozlowski
@ 2026-08-04 7:17 ` Krzysztof Kozlowski
2026-08-04 7:27 ` sashiko-bot
2026-08-04 17:51 ` [PATCH 0/5] spi: Few cleanups while looking at num-cs Mark Brown
5 siblings, 1 reply; 8+ messages in thread
From: Krzysztof Kozlowski @ 2026-08-04 7:17 UTC (permalink / raw)
To: CL Wang, Mark Brown, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Kousik Sanagavarapu, Vladimir Moravcevic,
Tzu-Hao Wei, Swark Yang, Prasad Bolisetty, Karthikeyan Mitran,
Michal Simek
Cc: linux-spi, devicetree, linux-kernel, linux-arm-kernel,
Krzysztof Kozlowski
"andestech,qilai-spi" compatible can only be used with a fallback, which
is already matched by the driver's OF device ID table, thus it is
redundant in the driver.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
---
drivers/spi/spi-atcspi200.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/spi/spi-atcspi200.c b/drivers/spi/spi-atcspi200.c
index b6ea8e556335..b532c58c0ab9 100644
--- a/drivers/spi/spi-atcspi200.c
+++ b/drivers/spi/spi-atcspi200.c
@@ -638,7 +638,6 @@ static int atcspi_resume(struct device *dev)
static DEFINE_SIMPLE_DEV_PM_OPS(atcspi_pm_ops, atcspi_suspend, atcspi_resume);
static const struct of_device_id atcspi_of_match[] = {
- { .compatible = "andestech,qilai-spi", },
{ .compatible = "andestech,ae350-spi", },
{ /* sentinel */ }
};
--
2.53.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 5/5] spi: atcspi200: Drop redundant andestech,qilai-spi compatible
2026-08-04 7:17 ` [PATCH 5/5] spi: atcspi200: Drop redundant andestech,qilai-spi compatible Krzysztof Kozlowski
@ 2026-08-04 7:27 ` sashiko-bot
0 siblings, 0 replies; 8+ messages in thread
From: sashiko-bot @ 2026-08-04 7:27 UTC (permalink / raw)
To: Krzysztof Kozlowski; +Cc: devicetree, conor+dt, robh
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] Direct casting and dereferencing of potentially unaligned buffers to 'unsigned int *' causes undefined behavior and unaligned access faults.
--
--- Patch [5]: [PATCH 5/5] spi: atcspi200: Drop redundant andestech,qilai-spi compatible ---
commit 0adcd926abd385a3e807d5c95896eac0c48c12aa
Author: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
spi: atcspi200: Drop redundant andestech,qilai-spi compatible
"andestech,qilai-spi" compatible can only be used with a fallback, which
is already matched by the driver's OF device ID table, thus it is
redundant in the driver.
> diff --git a/drivers/spi/spi-atcspi200.c b/drivers/spi/spi-atcspi200.c
> index b6ea8e5563359..b532c58c0ab91 100644
> --- a/drivers/spi/spi-atcspi200.c
> +++ b/drivers/spi/spi-atcspi200.c
[ ... ]
[Severity: High]
This isn't a bug introduced by this patch, but while reviewing this file I
noticed a pre-existing issue that can cause unaligned access faults.
Looking at the transmit path in drivers/spi/spi-atcspi200.c:atcspi_xfer_data_poll():
if (spi->data_merge)
val = *(unsigned int *)tx_buf;
And on the receive path in the same function:
if (spi->data_merge)
*(unsigned int *)rx_buf = val;
Does this code directly cast and dereference potentially unaligned buffers?
Since spi->data_merge is enabled whenever the transfer size is a multiple
of 4, it appears to ignore the memory alignment of the op->data.buf.out and
op->data.buf.in input/output buffers.
On architectures that do not support hardware unaligned accesses, such as
RISC-V CPUs lacking this feature, could this cause an unaligned access fault
and kernel panic?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260804-spi-num-cs-v1-0-4ccb13dcc7b0@oss.qualcomm.com?part=5
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 0/5] spi: Few cleanups while looking at num-cs
2026-08-04 7:16 [PATCH 0/5] spi: Few cleanups while looking at num-cs Krzysztof Kozlowski
` (4 preceding siblings ...)
2026-08-04 7:17 ` [PATCH 5/5] spi: atcspi200: Drop redundant andestech,qilai-spi compatible Krzysztof Kozlowski
@ 2026-08-04 17:51 ` Mark Brown
5 siblings, 0 replies; 8+ messages in thread
From: Mark Brown @ 2026-08-04 17:51 UTC (permalink / raw)
To: CL Wang, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Kousik Sanagavarapu, Vladimir Moravcevic, Tzu-Hao Wei, Swark Yang,
Prasad Bolisetty, Karthikeyan Mitran, Michal Simek,
Krzysztof Kozlowski
Cc: linux-spi, devicetree, linux-kernel, linux-arm-kernel
On Tue, 04 Aug 2026 09:16:56 +0200, Krzysztof Kozlowski wrote:
> spi: Few cleanups while looking at num-cs
>
> Few minor cleanups for DT bindings and Andes driver.
>
> Patches do not have inter-dependencies.
>
> Best regards,
> Krzysztof
>
> [...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-7.3
Thanks!
[1/5] spi: dt-bindings: andestech,ae350-spi: Drop redundant num-cs
https://git.kernel.org/broonie/spi/c/82024a7ae057
[2/5] spi: dt-bindings: marvell,armada-3700-spi: Drop redundant num-cs
https://git.kernel.org/broonie/spi/c/9ec27e118da7
[3/5] spi: dt-bindings: axiado,ax3000-spi: Drop duplicated type/ref
https://git.kernel.org/broonie/spi/c/577ada5875dc
[4/5] spi: dt-bindings: spi-cadence: Drop duplicated type/ref
https://git.kernel.org/broonie/spi/c/ad0dcba3ab9c
[5/5] spi: atcspi200: Drop redundant andestech,qilai-spi compatible
https://git.kernel.org/broonie/spi/c/463c840f54f8
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2026-08-04 21:19 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-04 7:16 [PATCH 0/5] spi: Few cleanups while looking at num-cs Krzysztof Kozlowski
2026-08-04 7:16 ` [PATCH 1/5] spi: dt-bindings: andestech,ae350-spi: Drop redundant num-cs Krzysztof Kozlowski
2026-08-04 7:16 ` [PATCH 2/5] spi: dt-bindings: marvell,armada-3700-spi: " Krzysztof Kozlowski
2026-08-04 7:16 ` [PATCH 3/5] spi: dt-bindings: axiado,ax3000-spi: Drop duplicated type/ref Krzysztof Kozlowski
2026-08-04 7:17 ` [PATCH 4/5] spi: dt-bindings: spi-cadence: " Krzysztof Kozlowski
2026-08-04 7:17 ` [PATCH 5/5] spi: atcspi200: Drop redundant andestech,qilai-spi compatible Krzysztof Kozlowski
2026-08-04 7:27 ` sashiko-bot
2026-08-04 17:51 ` [PATCH 0/5] spi: Few cleanups while looking at num-cs Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox