* [PATCH v4 1/2] spi: dt-bindings: snps,dw-apb-ssi: Add compatible for SOPHGO SG2042 SoC
2025-04-07 6:35 [PATCH v4 0/2] Add basic SPI support for SG2042 SoC Zixian Zeng
@ 2025-04-07 6:35 ` Zixian Zeng
2025-04-07 14:07 ` Rob Herring
2025-04-07 6:35 ` [PATCH v4 2/2] riscv: sophgo: dts: Add spi controller for SG2042 Zixian Zeng
2025-04-25 19:09 ` (subset) [PATCH v4 0/2] Add basic SPI support for SG2042 SoC Mark Brown
2 siblings, 1 reply; 6+ messages in thread
From: Zixian Zeng @ 2025-04-07 6:35 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Paul Walmsley,
Palmer Dabbelt, Albert Ou, Chen Wang, Inochi Amaoto,
Alexandre Ghiti, Mark Brown, Inochi Amaoto
Cc: devicetree, linux-riscv, linux-kernel, linux-spi, sophgo,
chao.wei, xiaoguang.xing, dlan, Zixian Zeng
add compatible property to include "sophgo,sg2042-spi" for
the SOPHGO SG2042 SoC SPI Controller.
Signed-off-by: Zixian Zeng <sycamoremoon376@gmail.com>
---
Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml b/Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml
index bccd00a1ddd0ad92b437eed5b525a6ea1963db57..94102d94ed5dffe889a8a11c1c637d466713c208 100644
--- a/Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml
+++ b/Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml
@@ -88,6 +88,10 @@ properties:
- renesas,r9a06g032-spi # RZ/N1D
- renesas,r9a06g033-spi # RZ/N1S
- const: renesas,rzn1-spi # RZ/N1
+ - description: SOPHGO SG2042 SoC SPI Controller
+ items:
+ - const: sophgo,sg2042-spi
+ - const: snps,dw-apb-ssi
- description: T-HEAD TH1520 SoC SPI Controller
items:
- const: thead,th1520-spi
--
2.49.0
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH v4 1/2] spi: dt-bindings: snps,dw-apb-ssi: Add compatible for SOPHGO SG2042 SoC
2025-04-07 6:35 ` [PATCH v4 1/2] spi: dt-bindings: snps,dw-apb-ssi: Add compatible for SOPHGO " Zixian Zeng
@ 2025-04-07 14:07 ` Rob Herring
2025-04-08 11:21 ` Zixian Zeng
0 siblings, 1 reply; 6+ messages in thread
From: Rob Herring @ 2025-04-07 14:07 UTC (permalink / raw)
To: Zixian Zeng
Cc: Krzysztof Kozlowski, Conor Dooley, Paul Walmsley, Palmer Dabbelt,
Albert Ou, Chen Wang, Inochi Amaoto, Alexandre Ghiti, Mark Brown,
Inochi Amaoto, devicetree, linux-riscv, linux-kernel, linux-spi,
sophgo, chao.wei, xiaoguang.xing, dlan
On Mon, Apr 07, 2025 at 02:35:12PM +0800, Zixian Zeng wrote:
> add compatible property to include "sophgo,sg2042-spi" for
> the SOPHGO SG2042 SoC SPI Controller.
>
> Signed-off-by: Zixian Zeng <sycamoremoon376@gmail.com>
> ---
> Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml b/Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml
> index bccd00a1ddd0ad92b437eed5b525a6ea1963db57..94102d94ed5dffe889a8a11c1c637d466713c208 100644
> --- a/Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml
> +++ b/Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml
> @@ -88,6 +88,10 @@ properties:
> - renesas,r9a06g032-spi # RZ/N1D
> - renesas,r9a06g033-spi # RZ/N1S
> - const: renesas,rzn1-spi # RZ/N1
> + - description: SOPHGO SG2042 SoC SPI Controller
> + items:
> + - const: sophgo,sg2042-spi
> + - const: snps,dw-apb-ssi
This and all the other cases with snps,dw-apb-ssi fallback should be
combined into 1 entry.
> - description: T-HEAD TH1520 SoC SPI Controller
> items:
> - const: thead,th1520-spi
>
> --
> 2.49.0
>
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v4 1/2] spi: dt-bindings: snps,dw-apb-ssi: Add compatible for SOPHGO SG2042 SoC
2025-04-07 14:07 ` Rob Herring
@ 2025-04-08 11:21 ` Zixian Zeng
0 siblings, 0 replies; 6+ messages in thread
From: Zixian Zeng @ 2025-04-08 11:21 UTC (permalink / raw)
To: Rob Herring
Cc: Krzysztof Kozlowski, Conor Dooley, Paul Walmsley, Palmer Dabbelt,
Albert Ou, Chen Wang, Inochi Amaoto, Alexandre Ghiti, Mark Brown,
Inochi Amaoto, devicetree, linux-riscv, linux-kernel, linux-spi,
sophgo, chao.wei, xiaoguang.xing, dlan
On 25/04/07 09:07AM, Rob Herring wrote:
> On Mon, Apr 07, 2025 at 02:35:12PM +0800, Zixian Zeng wrote:
> > add compatible property to include "sophgo,sg2042-spi" for
> > the SOPHGO SG2042 SoC SPI Controller.
> >
> > Signed-off-by: Zixian Zeng <sycamoremoon376@gmail.com>
> > ---
> > Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml | 4 ++++
> > 1 file changed, 4 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml b/Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml
> > index bccd00a1ddd0ad92b437eed5b525a6ea1963db57..94102d94ed5dffe889a8a11c1c637d466713c208 100644
> > --- a/Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml
> > +++ b/Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml
> > @@ -88,6 +88,10 @@ properties:
> > - renesas,r9a06g032-spi # RZ/N1D
> > - renesas,r9a06g033-spi # RZ/N1S
> > - const: renesas,rzn1-spi # RZ/N1
> > + - description: SOPHGO SG2042 SoC SPI Controller
> > + items:
> > + - const: sophgo,sg2042-spi
> > + - const: snps,dw-apb-ssi
>
> This and all the other cases with snps,dw-apb-ssi fallback should be
> combined into 1 entry.
>
Sounds good, did you mean conbining "SOPHGO SG2042" "T-HEAD TH1520" and "Renesas RZ/N1" together? But How about the description?
> > - description: T-HEAD TH1520 SoC SPI Controller
> > items:
> > - const: thead,th1520-spi
> >
> > --
> > 2.49.0
> >
Best regards,
Zixian
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v4 2/2] riscv: sophgo: dts: Add spi controller for SG2042
2025-04-07 6:35 [PATCH v4 0/2] Add basic SPI support for SG2042 SoC Zixian Zeng
2025-04-07 6:35 ` [PATCH v4 1/2] spi: dt-bindings: snps,dw-apb-ssi: Add compatible for SOPHGO " Zixian Zeng
@ 2025-04-07 6:35 ` Zixian Zeng
2025-04-25 19:09 ` (subset) [PATCH v4 0/2] Add basic SPI support for SG2042 SoC Mark Brown
2 siblings, 0 replies; 6+ messages in thread
From: Zixian Zeng @ 2025-04-07 6:35 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Paul Walmsley,
Palmer Dabbelt, Albert Ou, Chen Wang, Inochi Amaoto,
Alexandre Ghiti, Mark Brown, Inochi Amaoto
Cc: devicetree, linux-riscv, linux-kernel, linux-spi, sophgo,
chao.wei, xiaoguang.xing, dlan, Zixian Zeng
Add spi controllers for SG2042.
SG2042 uses the upstreamed Synopsys DW SPI IP.
Signed-off-by: Zixian Zeng <sycamoremoon376@gmail.com>
---
arch/riscv/boot/dts/sophgo/sg2042.dtsi | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/arch/riscv/boot/dts/sophgo/sg2042.dtsi b/arch/riscv/boot/dts/sophgo/sg2042.dtsi
index aa8b7fcc125d71eec12b09493964d90f5dfed27c..ddde4c613c4734db191de500b016b322a9602efc 100644
--- a/arch/riscv/boot/dts/sophgo/sg2042.dtsi
+++ b/arch/riscv/boot/dts/sophgo/sg2042.dtsi
@@ -537,6 +537,32 @@ uart0: serial@7040000000 {
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";
+ };
+
emmc: mmc@704002a000 {
compatible = "sophgo,sg2042-dwcmshc";
reg = <0x70 0x4002a000 0x0 0x1000>;
--
2.49.0
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: (subset) [PATCH v4 0/2] Add basic SPI support for SG2042 SoC
2025-04-07 6:35 [PATCH v4 0/2] Add basic SPI support for SG2042 SoC Zixian Zeng
2025-04-07 6:35 ` [PATCH v4 1/2] spi: dt-bindings: snps,dw-apb-ssi: Add compatible for SOPHGO " Zixian Zeng
2025-04-07 6:35 ` [PATCH v4 2/2] riscv: sophgo: dts: Add spi controller for SG2042 Zixian Zeng
@ 2025-04-25 19:09 ` Mark Brown
2 siblings, 0 replies; 6+ messages in thread
From: Mark Brown @ 2025-04-25 19:09 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Paul Walmsley,
Palmer Dabbelt, Albert Ou, Chen Wang, Inochi Amaoto,
Alexandre Ghiti, Inochi Amaoto, Zixian Zeng
Cc: devicetree, linux-riscv, linux-kernel, linux-spi, sophgo,
chao.wei, xiaoguang.xing, dlan
On Mon, 07 Apr 2025 14:35:11 +0800, Zixian Zeng wrote:
> Implemented basic SPI support for SG2042 SoC[1] using
> the upstreamed Synopsys DW-SPI IP.
>
> This is tested on milkv-pioneer board on bus level. Using
> driver/spi/spidev.c for creating virtual /dev/spidevX.Y and
> tools/spi/spidev_test for testing functionality.
>
> [...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next
Thanks!
[1/2] spi: dt-bindings: snps,dw-apb-ssi: Add compatible for SOPHGO SG2042 SoC
commit: 0889c4d28ad79b55ee8cf3c818e9d86203ace8f0
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
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 6+ messages in thread