Add Sophgo EVB V1/V2 Board support
Subsystems (3)
v2 cover Add Sophgo EVB V1/V2 Board support
Sophgo EVB V1/V2 [1][2] is a prototype board based on SOPHON SG2042 [3]. There are many of these two boards in the hands of developers.
Currently supports serial port, sdcard/emmc, pwm, fan speed control.
Added ethernet support based on [4].
Changed from v1:
1. replace "sophgo,sg2042-x8/4-evb" with "sophgo,sg2042-evb-v1/2".
2. replace "Sophgo SG2042 X8/X4 EVB" with "Sophgo SG2042 EVB V1.X/V2.0".
v1: https://lore.kernel.org/linux-riscv/[email protected]/
Thanks,
Han
[1]: https://github.com/sophgo/sophgo-hardware/tree/master/SG2042/SG2042-x8-EVB
[2]: https://github.com/sophgo/sophgo-hardware/tree/master/SG2042/SG2042-x4-EVB
[3]: https://en.sophgo.com/product/introduce/sg2042.html
[4]: https://lore.kernel.org/all/[email protected]/
Han Gao (4):
dt-bindings: riscv: add Sophgo SG2042_EVB_V1.X bindings
riscv: dts: sophgo: add Sophgo SG2042_EVB_V1.X board device tree
dt-bindings: riscv: add Sophgo SG2042_EVB_V2.0 bindings
riscv: dts: sophgo: add Sophgo SG2042_EVB_V2.0 board device tree
.../devicetree/bindings/riscv/sophgo.yaml | 2 + arch/riscv/boot/dts/sophgo/Makefile | 2 + arch/riscv/boot/dts/sophgo/sg2042-evb-v1.dts | 247 ++++++++++++++++++ arch/riscv/boot/dts/sophgo/sg2042-evb-v2.dts | 235 +++++++++++++++++ 4 files changed, 486 insertions(+) create mode 100644 arch/riscv/boot/dts/sophgo/sg2042-evb-v1.dts create mode 100644 arch/riscv/boot/dts/sophgo/sg2042-evb-v2.dts
base-commit: 550de367614f7a9a0c1d40d7e19764aa9305009a
prerequisite-patch-id: 7a82e319b011e5d0486a6ef4216d931d671c9f53
prerequisite-patch-id: 5a30fb99ec483c1f5a8dca97df862c3a042c9027
prerequisite-patch-id: e0da79790a934916d9fc39c18e8e98c9596d27ab
prerequisite-patch-id: 84d1e1637549f632729eaeb7cf935ca78a642fe3
Signature · 1 line
2.47.2
PATCH v2 1/4 dt-bindings: riscv: add Sophgo SG2042_EVB_V1.X bindings
Add DT binding documentation for the Sophgo SG2042_EVB_V1.X board [1].
--- Documentation/devicetree/bindings/riscv/sophgo.yaml | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/riscv/sophgo.yaml +1 -0
@@ -34,6 +34,7 @@ properties: - items: - enum: - milkv,pioneer + - sophgo,sg2042-evb-v1 - const: sophgo,sg2042 additionalProperties: true
Signature · 1 line
2.47.2
Re: [PATCH v2 1/4] dt-bindings: riscv: add Sophgo SG2042_EVB_V1.X bindings
Quoted 1 line · Han Gao
Add DT binding documentation for the Sophgo SG2042_EVB_V1.X board [1].
1.x? Is the v1.0 something people can get their hands on, or just the v1.1?
What differences do the boards have that are minimal enough that specific compatibles would not be required?
Quoted 23 lines
Signed-off-by Han Gao <[email protected]>--- Documentation/devicetree/bindings/riscv/sophgo.yaml | 1 + 1 file changed, 1 insertion(+)Documentation/devicetree/bindings/riscv/sophgo.yaml +1
-0@@ -34,6 +34,7 @@ properties: - items: - enum: - milkv,pioneer + - sophgo,sg2042-evb-v1 - const: sophgo,sg2042 additionalProperties: trueSignature · 1 line
2.47.2
Re: [PATCH v2 1/4] dt-bindings: riscv: add Sophgo SG2042_EVB_V1.X bindings
Quoted 9 lines · Conor Dooley
Quoted 1 line · Han Gao
Add DT binding documentation for the Sophgo SG2042_EVB_V1.X board [1].
1.x? Is the v1.0 something people can get their hands on, or just the v1.1?
What differences do the boards have that are minimal enough that specific compatibles would not be required?
First of all, v1.1 and v1.0 are compatible boards. There is no difference between v1.1 and v1.0 from dts.
Both v1.1 and v1.0 have been discontinued.
About 80 pieces of v1.1 are in the hands of community developers.
Quoted 23 lines
Quoted 23 lines
Signed-off-by Han Gao <[email protected]>--- Documentation/devicetree/bindings/riscv/sophgo.yaml | 1 + 1 file changed, 1 insertion(+)Documentation/devicetree/bindings/riscv/sophgo.yaml +1
-1@@ -34,6 +34,7 @@ properties: - items: - enum: - milkv,pioneer + - sophgo,sg2042-evb-v1 - const: sophgo,sg2042 additionalProperties: true --2.47.2
Conor Dooley
Acked-byRe: [PATCH v2 1/4] dt-bindings: riscv: add Sophgo SG2042_EVB_V1.X bindings
Quoted 11 lines · Han Gao
Quoted 9 lines · Conor Dooley
Quoted 1 line · Han Gao
Add DT binding documentation for the Sophgo SG2042_EVB_V1.X board [1].
1.x? Is the v1.0 something people can get their hands on, or just the v1.1?
What differences do the boards have that are minimal enough that specific compatibles would not be required?
Quoted 5 lines
First of all, v1.1 and v1.0 are compatible boards. There is no difference between v1.1 and v1.0 from dts.
Both v1.1 and v1.0 have been discontinued.
About 80 pieces of v1.1 are in the hands of community developers.
PATCH v2 2/4 riscv: dts: sophgo: add Sophgo SG2042_EVB_V1.X board device tree
In reply to Han GaoSophgo SG2042_EVB_V1.X [1] is a prototype development board based on SG2042
Currently supports serial port, sdcard/emmc, pwm, fan speed control.
--- arch/riscv/boot/dts/sophgo/Makefile | 1 + arch/riscv/boot/dts/sophgo/sg2042-evb-v1.dts | 247 +++++++++++++++++++ 2 files changed, 248 insertions(+) create mode 100644 arch/riscv/boot/dts/sophgo/sg2042-evb-v1.dts
arch/riscv/boot/dts/sophgo/Makefile +1 -0
@@ -3,3 +3,4 @@ dtb-$(CONFIG_ARCH_SOPHGO) += cv1800b-milkv-duo.dtb dtb-$(CONFIG_ARCH_SOPHGO) += cv1812h-huashan-pi.dtb dtb-$(CONFIG_ARCH_SOPHGO) += sg2002-licheerv-nano-b.dtb dtb-$(CONFIG_ARCH_SOPHGO) += sg2042-milkv-pioneer.dtb +dtb-$(CONFIG_ARCH_SOPHGO) += sg2042-evb-v1.dtb
arch/riscv/boot/dts/sophgo/sg2042-evb-v1.dts new file +247 -0
247 lines not on this page · raw message
Signature · 1 line
2.47.2
Re: [PATCH v2 2/4] riscv: dts: sophgo: add Sophgo SG2042_EVB_V1.X board device tree
Hi, Han,
arch/riscv/boot/dts/sophgo/sg2042-evb-v1.dts
Quoted 27 lines · Han Gao
Sophgo SG2042_EVB_V1.X [1] is a prototype development board based on SG2042
Currently supports serial port, sdcard/emmc, pwm, fan speed control.
Signed-off-by Han Gao <[email protected]>--- arch/riscv/boot/dts/sophgo/Makefile | 1 + arch/riscv/boot/dts/sophgo/sg2042-evb-v1.dts | 247 +++++++++++++++++++ 2 files changed, 248 insertions(+)create mode 100644
arch/riscv/boot/dts/sophgo/sg2042-evb-v1.dtsarch/riscv/boot/dts/sophgo/Makefile +1
-0@@ -3,3 +3,4 @@ dtb-$(CONFIG_ARCH_SOPHGO) += cv1800b-milkv-duo.dtb dtb-$(CONFIG_ARCH_SOPHGO) += cv1812h-huashan-pi.dtb dtb-$(CONFIG_ARCH_SOPHGO) += sg2002-licheerv-nano-b.dtb dtb-$(CONFIG_ARCH_SOPHGO) += sg2042-milkv-pioneer.dtb +dtb-$(CONFIG_ARCH_SOPHGO) += sg2042-evb-v1.dtbarch/riscv/boot/dts/sophgo/sg2042-evb-v1.dts new file +0
-0
Please run "make CHECK_DTBS=y W=1 your_dtb_file" before submitting patch. I have a quick check and get following warnings/errors:
Error: ....../arch/riscv/boot/dts/sophgo/sg2042-evb-v1.dts:67.1-7 Label or path gmac0 not found
Error: ....../arch/riscv/boot/dts/sophgo/sg2042-evb-v1.dts:86.14-15 syntax error FATAL ERROR: Unable to parse input tree
And the similar issues existing for sg2042-evb-v2.dts.
[......]
Quoted 5 lines
+&gmac0 {
arch/riscv/boot/dts/sophgo/sg2042-evb-v1.dts new file +4
-0+ phy-handle = <&phy0>; + phy-mode = "rgmii-id"; + status = "okay"; +
arch/riscv/boot/dts/sophgo/sg2042-evb-v1.dts line 81
Quoted 10 lines
arch/riscv/boot/dts/sophgo/sg2042-evb-v1.dts new file +10
-0+ mdio { + phy0: phy@0 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <0>; + reset-gpios = <&port0a 27 GPIO_ACTIVE_LOW>; + reset-assert-us = <100000>; + reset-deassert-us = <100000>; + }; + }; +};
This should be dropped, we can add this after ethernet support is upstreamed.
The same for evb_v2.
[......]
Thanks.
Chen
Re: [PATCH v2 2/4] riscv: dts: sophgo: add Sophgo SG2042_EVB_V1.X board device tree
Added ethernet support based on [4].
[4]: https://lore.kernel.org/all/[email protected]/
Quoted 73 lines · Chen Wang
Hi, Han,
arch/riscv/boot/dts/sophgo/sg2042-evb-v1.dts
Quoted 27 lines · Han Gao
Sophgo SG2042_EVB_V1.X [1] is a prototype development board based on SG2042
Currently supports serial port, sdcard/emmc, pwm, fan speed control.
Signed-off-by Han Gao <[email protected]>--- arch/riscv/boot/dts/sophgo/Makefile | 1 + arch/riscv/boot/dts/sophgo/sg2042-evb-v1.dts | 247 +++++++++++++++++++ 2 files changed, 248 insertions(+)create mode 100644
arch/riscv/boot/dts/sophgo/sg2042-evb-v1.dtsarch/riscv/boot/dts/sophgo/Makefile +1
-0@@ -3,3 +3,4 @@ dtb-$(CONFIG_ARCH_SOPHGO) += cv1800b-milkv-duo.dtb dtb-$(CONFIG_ARCH_SOPHGO) += cv1812h-huashan-pi.dtb dtb-$(CONFIG_ARCH_SOPHGO) += sg2002-licheerv-nano-b.dtb dtb-$(CONFIG_ARCH_SOPHGO) += sg2042-milkv-pioneer.dtb +dtb-$(CONFIG_ARCH_SOPHGO) += sg2042-evb-v1.dtbarch/riscv/boot/dts/sophgo/sg2042-evb-v1.dts new file +0
-0Please run "make CHECK_DTBS=y W=1
your_dtb_file" before submitting patch. I have a quick check and get following warnings/errors:Error: ....../arch/riscv/boot/dts/sophgo/sg2042-evb-v1.dts:67.1-7 Label or path gmac0 not found
Error: ....../arch/riscv/boot/dts/sophgo/sg2042-evb-v1.dts:86.14-15 syntax error
FATAL ERROR: Unable to parse input treeAnd the similar issues existing for
sg2042-evb-v2.dts.[......]
Quoted 5 lines
+&gmac0 {
arch/riscv/boot/dts/sophgo/sg2042-evb-v1.dts new file +4
-0+ phy-handle = <&phy0>; + phy-mode = "rgmii-id"; + status = "okay"; +arch/riscv/boot/dts/sophgo/sg2042-evb-v1.dts line 81
Quoted 10 lines
arch/riscv/boot/dts/sophgo/sg2042-evb-v1.dts new file +10
-0+ mdio { + phy0: phy@0 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <0>; + reset-gpios = <&port0a 27 GPIO_ACTIVE_LOW>; + reset-assert-us = <100000>; + reset-deassert-us = <100000>; + }; + }; +};This should be dropped, we can add this after ethernet support is upstreamed.
The same for
evb_v2.[......]
Thanks.
Chen
PATCH v2 3/4 dt-bindings: riscv: add Sophgo SG2042_EVB_V2.0 bindings
In reply to Han GaoAdd DT binding documentation for the Sophgo SG2042_EVB_V2.0 board [1].
--- Documentation/devicetree/bindings/riscv/sophgo.yaml | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/riscv/sophgo.yaml +1 -0
@@ -35,6 +35,7 @@ properties: - enum: - milkv,pioneer - sophgo,sg2042-evb-v1 + - sophgo,sg2042-evb-v2 - const: sophgo,sg2042 additionalProperties: true
Signature · 1 line
2.47.2
Re: [PATCH v2 3/4] dt-bindings: riscv: add Sophgo SG2042_EVB_V2.0 bindings
Quoted 14 lines · Han Gao
Add DT binding documentation for the Sophgo SG2042_EVB_V2.0 board [1].
Signed-off-by Han Gao <[email protected]>--- Documentation/devicetree/bindings/riscv/sophgo.yaml | 1 + 1 file changed, 1 insertion(+)Documentation/devicetree/bindings/riscv/sophgo.yaml +0
-0
Documentation/devicetree/bindings/riscv/sophgo.yaml properties: · line 38
Quoted 4 lines
Documentation/devicetree/bindings/riscv/sophgo.yaml +1
-0@@ -35,6 +35,7 @@ properties: - enum: - milkv,pioneer - sophgo,sg2042-evb-v1 + - sophgo,sg2042-evb-v2
Comment from v1 looks ignored. Squash the patch.
Best regards,
Krzysztof
PATCH v2 4/4 riscv: dts: sophgo: add Sophgo SG2042_EVB_V2.0 board device tree
In reply to Han GaoSophgo SG2042_EVB_V2.0 [1] is a prototype development board based on SG2042
Currently supports serial port, sdcard/emmc, pwm, fan speed control.
--- arch/riscv/boot/dts/sophgo/Makefile | 1 + arch/riscv/boot/dts/sophgo/sg2042-evb-v2.dts | 235 +++++++++++++++++++ 2 files changed, 236 insertions(+) create mode 100644 arch/riscv/boot/dts/sophgo/sg2042-evb-v2.dts
arch/riscv/boot/dts/sophgo/Makefile +1 -0
@@ -4,3 +4,4 @@ dtb-$(CONFIG_ARCH_SOPHGO) += cv1812h-huashan-pi.dtb dtb-$(CONFIG_ARCH_SOPHGO) += sg2002-licheerv-nano-b.dtb dtb-$(CONFIG_ARCH_SOPHGO) += sg2042-milkv-pioneer.dtb dtb-$(CONFIG_ARCH_SOPHGO) += sg2042-evb-v1.dtb +dtb-$(CONFIG_ARCH_SOPHGO) += sg2042-evb-v2.dtb
arch/riscv/boot/dts/sophgo/sg2042-evb-v2.dts new file +235 -0
235 lines not on this page · raw message
Signature · 1 line
2.47.2
Re: [PATCH v2 4/4] riscv: dts: sophgo: add Sophgo SG2042_EVB_V2.0 board device tree
arch/riscv/boot/dts/sophgo/sg2042-evb-v2.dts line 151
Quoted 7 lines · Han Gao
+&uart0 {
arch/riscv/boot/dts/sophgo/sg2042-evb-v2.dts new file +6
-0+ pinctrl-0 = <&uart0_cfg>; + pinctrl-names = "default"; + status = "okay"; +}; + +/ {
Why do you have two root nodes in a file? That's not the expected syntax. Really odd/unusal.
Best regards,
Krzysztof