(no cover subject)
Subsystems (4)
v3 cover (no cover subject)
This is tested on milkv-pioneer board. Using driver/spi/spidev.c for creating /dev/spidevX.Y and tools/spi/spidev_test for testing functionality.
---
Changes in v3:
- disable the spi status on sg2042-milkv-pioneer board
- create dt-binding of compatible property
- replace the general compatible property with SoC-specific in dts
- Link to v2: https://lore.kernel.org/r/[email protected]
Changes in v2:
- rebase v1 to sophgo/master(github.com/sophgo/linux.git).
- order properties in device node.
- remove unevaluated properties clock-frequency.
- set default status to disable.
- Link to v1: https://lore.kernel.org/r/[email protected]
---
Zixian Zeng (2):
spi: dt-bindings: snps,dw-apb-ssi: Add compatible for SOPHGO SG2042 SoC
riscv: sophgo: dts: Add spi controller for SG2042
.../devicetree/bindings/spi/snps,dw-apb-ssi.yaml | 4 ++++ arch/riscv/boot/dts/sophgo/sg2042.dtsi | 26 ++++++++++++++++++++++ 2 files changed, 30 insertions(+)
---
base-commit: aa5ee7180ec41bb77c3e327e95d119f2294babea
change-id: 20250228-sfg-spi-e3f2aeca09ab
Best regards,
Signature · 1 line
Zixian Zeng <[email protected]>
PATCH v3 1/2 spi: dt-bindings: snps,dw-apb-ssi: Add compatible for SOPHGO SG2042 SoC
add compatible property to include "sophgo,sg2042-spi" for the SOPHGO SG2042 SoC SPI Controller.
--- Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml | 4 ++++ 1 file changed, 4 insertions(+)
Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml +4 -0
@@ -92,6 +92,10 @@ properties: items: - const: thead,th1520-spi - const: snps,dw-apb-ssi + - description: SOPHGO SG2042 SoC SPI Controller + items: + - const: sophgo,sg2042-spi + - const: snps,dw-apb-ssi reg: minItems: 1
Signature · 1 line
2.48.1
PATCH v3 2/2 riscv: sophgo: dts: Add spi controller for SG2042
In reply to Zixian ZengAdd spi controllers for SG2042.
SG2042 uses the upstreamed Synopsys DW SPI IP.
--- arch/riscv/boot/dts/sophgo/sg2042.dtsi | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+)
arch/riscv/boot/dts/sophgo/sg2042.dtsi +26 -0
@@ -545,5 +545,31 @@ sd: mmc@704002b000 { "timer"; status = "disabled"; }; + + spi0: spi@7040004000 { + compatible = "sophgo,sg2042-spi", "snps,dw-apb-ssi"; + reg = <0x70 0x40004000 0x00 0x1000>; + clocks = <&clkgen GATE_CLK_APB_SPI>; + interrupt-parent = <&intc>; + interrupts = <110 IRQ_TYPE_LEVEL_HIGH>; + #address-cells = <1>; + #size-cells = <0>; + num-cs = <2>; + resets = <&rstgen RST_SPI0>; + status = "disabled"; + }; + + spi1: spi@7040005000 { + compatible = "sophgo,sg2042-spi", "snps,dw-apb-ssi"; + reg = <0x70 0x40005000 0x00 0x1000>; + clocks = <&clkgen GATE_CLK_APB_SPI>; + interrupt-parent = <&intc>; + interrupts = <111 IRQ_TYPE_LEVEL_HIGH>; + #address-cells = <1>; + #size-cells = <0>; + num-cs = <2>; + resets = <&rstgen RST_SPI1>; + status = "disabled"; + }; }; };
Signature · 1 line
2.48.1
Re: [PATCH v3 1/2] spi: dt-bindings: snps,dw-apb-ssi: Add compatible for SOPHGO SG2042 SoC
In reply to Zixian ZengQuoted 13 lines · Zixian Zeng
add compatible property to include "sophgo,sg2042-spi" for the SOPHGO SG2042 SoC SPI Controller.
Signed-off-by Zixian Zeng <[email protected]>--- Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml | 4 ++++ 1 file changed, 4 insertions(+)Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml +0
-0
Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml properties: · line 95
Quoted 4 lines
Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml +1
-0@@ -92,6 +92,10 @@ properties: items: - const: thead,th1520-spi - const: snps,dw-apb-ssi + - description: SOPHGO SG2042 SoC SPI Controller
Please do not add things to the end - it increases conflicts and makes it difficult to find entries when reading the code. Place it after Renesas.
Best regards,
Krzysztof
Re: [PATCH v3 2/2] riscv: sophgo: dts: Add spi controller for SG2042
In reply to Zixian ZengQuoted 14 lines · Zixian Zeng
Add spi controllers for SG2042.
SG2042 uses the upstreamed Synopsys DW SPI IP.
Signed-off-by Zixian Zeng <[email protected]>--- arch/riscv/boot/dts/sophgo/sg2042.dtsi | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+)arch/riscv/boot/dts/sophgo/sg2042.dtsi +0
-0
arch/riscv/boot/dts/sophgo/sg2042.dtsi sd: mmc@704002b000 { · line 549
Quoted 5 lines
arch/riscv/boot/dts/sophgo/sg2042.dtsi +2
-0@@ -545,5 +545,31 @@ sd: mmc@704002b000 { "timer"; status = "disabled"; }; + + spi0: spi@7040004000 {
Does not look like you keep order by unit address (see DTS coding style).
Best regards,
Krzysztof
Re: [PATCH v3 2/2] riscv: sophgo: dts: Add spi controller for SG2042
Quoted 10 lines · Krzysztof Kozlowski
Quoted 9 lines · Zixian Zeng
Add spi controllers for SG2042.
SG2042 uses the upstreamed Synopsys DW SPI IP.
Signed-off-by Zixian Zeng <[email protected]>--- arch/riscv/boot/dts/sophgo/sg2042.dtsi | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+)
Quoted 13 lines
arch/riscv/boot/dts/sophgo/sg2042.dtsi sd: mmc@704002b000 { · line 549
Quoted 10 lines
arch/riscv/boot/dts/sophgo/sg2042.dtsi +2
-0@@ -545,5 +545,31 @@ sd: mmc@704002b000 { "timer"; status = "disabled"; }; + + spi0: spi@7040004000 {Does not look like you keep order by unit address (see DTS coding style).
Thanks for reminding, I will read it more carefully.
Quoted 3 lines
Best regards,
Krzysztof
Best regards,
Zixian Zeng
Hi, Zixian,
First, it looks like you forgot to write a subject line for your email.
Quoted 3 lines · Zixian Zeng
This is tested on milkv-pioneer board. Using
driver/spi/spidev.cfor creating/dev/spidevX.Yandtools/spi/spidev_testfor testing functionality.
Second, why is there no description of what was changed in the patch set? Maybe it was missed.
Introduction to testing can be used as supplementary information, but it should not be the main body of this email.
Quoted 4 lines
Signed-off-by Zixian Zeng <[email protected]>---
Changes in v3:
- disable the spi status on sg2042-milkv-pioneer board
Not "disable", should be "Remove", and please capitalize the first letter of the sentences.
Quoted 2 lines
- create dt-binding of compatible property
- replace the general compatible property with SoC-specific in dts
Another relatively important change is about the clock, which you seem to have missed.
Quoted 14 lines
- Link to v2: https://lore.kernel.org/r/[email protected]
Changes in v2:
- rebase v1 to sophgo/master(github.com/sophgo/linux.git).
- order properties in device node.
- remove unevaluated propertiesclock-frequency.
- set default status to disable.
- Link to v1: https://lore.kernel.org/r/[email protected]---
Zixian Zeng (2):
spi: dt-bindings: snps,dw-apb-ssi: Add compatible for SOPHGO SG2042 SoC
riscv: sophgo: dts: Add spi controller for SG2042
Quoted 8 lines
.../devicetree/bindings/spi/snps,dw-apb-ssi.yaml | 4 ++++ arch/riscv/boot/dts/sophgo/sg2042.dtsi | 26 ++++++++++++++++++++++ 2 files changed, 30 insertions(+)---
base-commit:aa5ee7180ec41bb77c3e327e95d119f2294babea
change-id: 20250228-sfg-spi-e3f2aeca09abBest regards,
BTW, I suggest you wait until 6.15-rc1 comes out before submitting the next version, because I have already sent a PR to Arnd for Sophgo DTS.
Regards,
Chen
Quoted 11 lines · Chen Wang
Hi, Zixian,
First, it looks like you forgot to write a subject line for your email.
Quoted 3 lines · Zixian Zeng
This is tested on milkv-pioneer board. Using
driver/spi/spidev.cfor creating/dev/spidevX.Yandtools/spi/spidev_testfor testing functionality.Second, why is there no description of what was changed in the patch set? Maybe it was missed.
I was intended to avoid duplication with commit msg, but it seems unnecessary. I will try to write a better cover letter next time. Thanks for your review.
Quoted 7 lines
Introduction to testing can be used as supplementary information, but it should not be the main body of this email.
Quoted 4 lines
Signed-off-by Zixian Zeng <[email protected]>---
Changes in v3:
- disable the spi status on sg2042-milkv-pioneer board
Quoted 6 lines
Not "disable", should be "Remove", and please capitalize the first letter of the sentences.
Quoted 2 lines
- create dt-binding of compatible property
- replace the general compatible property with SoC-specific in dtsAnother relatively important change is about the clock, which you seem to have missed.
My mistake, I will add it in the next version.
Quoted 21 lines
Quoted 21 lines
- Link to v2: https://lore.kernel.org/r/[email protected]
Changes in v2:
- rebase v1 to sophgo/master(github.com/sophgo/linux.git).
- order properties in device node.
- remove unevaluated propertiesclock-frequency.
- set default status to disable.
- Link to v1: https://lore.kernel.org/r/[email protected]---
Zixian Zeng (2):
spi: dt-bindings: snps,dw-apb-ssi: Add compatible for SOPHGO SG2042 SoC
riscv: sophgo: dts: Add spi controller for SG2042.../devicetree/bindings/spi/snps,dw-apb-ssi.yaml | 4 ++++ arch/riscv/boot/dts/sophgo/sg2042.dtsi | 26 ++++++++++++++++++++++ 2 files changed, 30 insertions(+)---
base-commit:aa5ee7180ec41bb77c3e327e95d119f2294babea
change-id: 20250228-sfg-spi-e3f2aeca09ab
Quoted 5 lines
Quoted 1 line
Best regards,
BTW, I suggest you wait until 6.15-rc1 comes out before submitting the next version, because I have already sent a PR to Arnd for Sophgo DTS.
Sure, I will keep an eye on the release.
Quoted 4 lines
Regards,
Chen
Best regards,
Zixian Zeng