Skip to content

Commit 15cfe55

Browse files
committed
Add basic SPI support for SOPHGO SG2042 SoC
Merge series from Zixian Zeng <sycamoremoon376@gmail.com>: Implemented basic SPI support for SG2042 SoC[1] using the upstreamed Synopsys DW-SPI IP. The way of testing can be found here [2]. Signed-off-by: Zixian Zeng <sycamoremoon376@gmail.com> --- Changes in v6: - patch 1: Apply Krzysztof's tag. - patch 2: Adjust enum to alphabetical order. - Link to v5: https://lore.kernel.org/r/20250422-sfg-spi-v5-0-c7f6554a94a0@gmail.com Changes in v5: - patch 1: New patch merges all vendors fall back to snps,dw-apb-ssi into one entry - Link to v4: https://lore.kernel.org/r/20250407-sfg-spi-v4-0-30ac949a1e35@gmail.com Changes in v4: - Adjust the order of spi nodes. - Place the binding after Renesas. - Fix the description issues of patches. - Link to v3: https://lore.kernel.org/r/20250313-sfg-spi-v3-0-e686427314b2@gmail.com Changes in v3: - Remove the spi status on sg2042-milkv-pioneer board. - Remove clock GATE_CLK_SYSDMA_AXI from spi. [3] - Create dt-binding of compatible property. - Replace the general compatible property with SoC-specific in dts. - Link to v2: https://lore.kernel.org/r/20250228-sfg-spi-v2-1-8bbf23b85d0e@gmail.com 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/20250228-sfg-spi-v1-1-b989aed94911@gmail.com Link: https://github.com/sophgo/sophgo-doc/blob/main/SG2042/TRM/source/SPI.rst [1] Link: https://lore.kernel.org/all/CAKyUbwXqg13Ho7QHw8vV2W6OcObphwhQ8HUrZMDNBxrVxLmdug@mail.gmail.com/ [2] Link: https://github.com/sophgo/sophgo-doc/blob/main/SG2042/TRM/source/clock.rst#clock-tree [3] --- Zixian Zeng (3): spi: dt-bindings: snps,dw-apb-ssi: Merge duplicate compatible entry 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 | 19 ++++++---------- arch/riscv/boot/dts/sophgo/sg2042.dtsi | 26 ++++++++++++++++++++++ 2 files changed, 33 insertions(+), 12 deletions(-) --- base-commit: 8ffd015 change-id: 20250228-sfg-spi-e3f2aeca09ab Best regards, -- Zixian Zeng <sycamoremoon376@gmail.com>
2 parents 8e4d3d8 + 0889c4d commit 15cfe55

File tree

1 file changed

+7
-12
lines changed

1 file changed

+7
-12
lines changed

Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -56,19 +56,18 @@ properties:
5656
enum:
5757
- snps,dw-apb-ssi
5858
- snps,dwc-ssi-1.01a
59-
- description: Microsemi Ocelot/Jaguar2 SoC SPI Controller
60-
items:
61-
- enum:
62-
- mscc,ocelot-spi
63-
- mscc,jaguar2-spi
64-
- const: snps,dw-apb-ssi
6559
- description: Microchip Sparx5 SoC SPI Controller
6660
const: microchip,sparx5-spi
6761
- description: Amazon Alpine SPI Controller
6862
const: amazon,alpine-dw-apb-ssi
69-
- description: Renesas RZ/N1 SPI Controller
63+
- description: Vendor controllers which use snps,dw-apb-ssi as fallback
7064
items:
71-
- const: renesas,rzn1-spi
65+
- enum:
66+
- mscc,ocelot-spi
67+
- mscc,jaguar2-spi
68+
- renesas,rzn1-spi
69+
- sophgo,sg2042-spi
70+
- thead,th1520-spi
7271
- const: snps,dw-apb-ssi
7372
- description: Intel Keem Bay SPI Controller
7473
const: intel,keembay-ssi
@@ -88,10 +87,6 @@ properties:
8887
- renesas,r9a06g032-spi # RZ/N1D
8988
- renesas,r9a06g033-spi # RZ/N1S
9089
- const: renesas,rzn1-spi # RZ/N1
91-
- description: T-HEAD TH1520 SoC SPI Controller
92-
items:
93-
- const: thead,th1520-spi
94-
- const: snps,dw-apb-ssi
9590

9691
reg:
9792
minItems: 1

0 commit comments

Comments
 (0)