Add initial Milk-V Duo S board support
Subsystems (2)
cover Add initial Milk-V Duo S board support
This adds an initial device tree for the Milk-V Duo S board with support for reading from the SD card. This is continued work from Michael Opdenacker's v6 series on the ARM64 side. I'm still working on confirming the RISCV side.
https://lore.kernel.org/linux-riscv/[email protected]/
Patch produced against the "for-next" branch of the sophgo "linux" tree:
https://github.com/sophgo/linux.git
Joshua Milas (2):
dt-bindings: soc: sophgo: add Milk-V Duo S board compatibles
arm64: dts: sophgo: add initial Milk-V Duo S board support
.../bindings/soc/sophgo/sophgo.yaml | 1 + arch/arm64/boot/dts/sophgo/Makefile | 1 + .../boot/dts/sophgo/sg2000-milkv-duo-s.dts | 88 +++++++++++++++++++ 3 files changed, 90 insertions(+) create mode 100644 arch/arm64/boot/dts/sophgo/sg2000-milkv-duo-s.dts
Signature · 1 line
2.51.0
PATCH 1/2 dt-bindings: soc: sophgo: add Milk-V Duo S board compatibles
Document the compatible strings for the Milk-V Duo S board[1] which uses the SOPHGO SG2000 SoC[2]
--- Documentation/devicetree/bindings/soc/sophgo/sophgo.yaml | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/soc/sophgo/sophgo.yaml +1 -0
@@ -28,6 +28,7 @@ properties: - const: sophgo,cv1812h - items: - enum: + - milkv,duo-s - milkv,duo-module-01-evb - const: milkv,duo-module-01 - const: sophgo,sg2000
Signature · 1 line
2.51.0
Re: [PATCH 1/2] dt-bindings: soc: sophgo: add Milk-V Duo S board compatibles
Hi Joshua,
Quoted 16 lines · Joshua Milas
Document the compatible strings for the Milk-V Duo S board[1] which uses the SOPHGO SG2000 SoC[2]
Link https://milkv.io/duo-s [1]Signed-off-by Joshua Milas <[email protected]>--- Documentation/devicetree/bindings/soc/sophgo/sophgo.yaml | 1 + 1 file changed, 1 insertion(+)Documentation/devicetree/bindings/soc/sophgo/sophgo.yaml +0
-0
Documentation/devicetree/bindings/soc/sophgo/sophgo.yaml properties: · line 33
Quoted 6 lines
Documentation/devicetree/bindings/soc/sophgo/sophgo.yaml +1
-0@@ -28,6 +28,7 @@ properties: - const: sophgo,cv1812h - items: - enum: + - milkv,duo-s - milkv,duo-module-01-evb
Sort enums.
Quoted 2 lines
Documentation/devicetree/bindings/soc/sophgo/sophgo.yaml +0
-0- const: milkv,duo-module-01- const: sophgo,sg2000
Best regards,
-E Shattow
PATCH 2/2 arm64: dts: sophgo: add initial Milk-V Duo S board support
In reply to Joshua MilasThis adds initial arm64 support for the Milk-V Duo S board
(https://milkv.io/duo-s), enabling the serial port and sdhci0, making it possible to boot Linux to the command line.
--- arch/arm64/boot/dts/sophgo/Makefile | 1 + .../boot/dts/sophgo/sg2000-milkv-duo-s.dts | 88 +++++++++++++++++++ 2 files changed, 89 insertions(+) create mode 100644 arch/arm64/boot/dts/sophgo/sg2000-milkv-duo-s.dts
arch/arm64/boot/dts/sophgo/Makefile +1 -0
@@ -1,2 +1,3 @@ # SPDX-License-Identifier: GPL-2.0 dtb-$(CONFIG_ARCH_SOPHGO) += sg2000-milkv-duo-module-01-evb.dtb +dtb-$(CONFIG_ARCH_SOPHGO) += sg2000-milkv-duo-s.dtb
arch/arm64/boot/dts/sophgo/sg2000-milkv-duo-s.dts new file +88 -0
88 lines not on this page · raw message
Signature · 1 line
2.51.0
Re: [PATCH 2/2] arm64: dts: sophgo: add initial Milk-V Duo S board support
Hi Joshua,
Quoted 4 lines · Joshua Milas
This adds initial arm64 support for the Milk-V Duo S board
(https://milkv.io/duo-s), enabling the serial port and sdhci0, making it possible to boot Linux to the command line.
Review
Quoted 8 lines
Signed-off-by Joshua Milas <[email protected]>--- arch/arm64/boot/dts/sophgo/Makefile | 1 + .../boot/dts/sophgo/sg2000-milkv-duo-s.dts | 88 +++++++++++++++++++ 2 files changed, 89 insertions(+) create mode 100644 arch/arm64/boot/dts/sophgo/sg2000-milkv-duo-s.dts(quoted diff) +0
-0
b/arch/arm64/boot/dts/sophgo/Makefile
Review
Quoted 8 lines
index
94f52cd7d994..68aace728223100644arch/arm64/boot/dts/sophgo/Makefile +1
-0@@ -1,2 +1,3 @@ # SPDX-License-Identifier: GPL-2.0 dtb-$(CONFIG_ARCH_SOPHGO) += sg2000-milkv-duo-module-01-evb.dtb +dtb-$(CONFIG_ARCH_SOPHGO) += sg2000-milkv-duo-s.dtb(quoted diff) +0
-0
b/arch/arm64/boot/dts/sophgo/sg2000-milkv-duo-s.dts
Quoted 5 lines
new file mode 100644
index 000000000000..94cf89d423de
arch/arm64/boot/dts/sophgo/sg2000-milkv-duo-s.dts line 10
Quoted 10 lines
arch/arm64/boot/dts/sophgo/sg2000-milkv-duo-s.dts new file +10
-0@@ -0,0 +1,88 @@ +// SPDX-License-Identifier: (GPL-2.0 OR MIT) + +/dts-v1/; + +#include <dt-bindings/pinctrl/pinctrl-sg2000.h> +#include "sg2000.dtsi" + +/ { + model = "Milk-V DuoS"; + compatible = "milkv,duo-s", "sophgo,sg2000";
"Milk-V Duo S" with "milkv,duo-s, "sophgo,sg2000"
or
"Milk-V Duo S" with milkv,duos, "sophgo,sg2000"
and dts filename to agree.
arch/arm64/boot/dts/sophgo/sg2000-milkv-duo-s.dts line 15
Quoted 5 lines
arch/arm64/boot/dts/sophgo/sg2000-milkv-duo-s.dts new file +5
-0+ + aliases { + serial0 = &uart0; + mmc0 = &sdhci0; + };
Sort aliases.
Quoted 51 lines
arch/arm64/boot/dts/sophgo/sg2000-milkv-duo-s.dts new file +51
-0+ + chosen { + stdout-path = "serial0:115200n8"; + }; +}; + +&osc { + clock-frequency = <25000000>; +}; + +&pinctrl { + sdhci0_cfg: sdhci0-cfg { + sdhci0-cd-pins { + pinmux = <PINMUX(PIN_SD0_CD, 0)>; + bias-pull-up; + drive-strength-microamp = <10800>; + power-source = <3300>; + }; + + sdhci0-clk-pins { + pinmux = <PINMUX(PIN_SD0_CLK, 0)>; + bias-pull-up; + drive-strength-microamp = <16100>; + power-source = <3300>; + }; + + sdhci0-cmd-pins { + pinmux = <PINMUX(PIN_SD0_CMD, 0)>; + bias-pull-up; + drive-strength-microamp = <10800>; + power-source = <3300>; + }; + + sdhci0-data-pins { + pinmux = <PINMUX(PIN_SD0_D0, 0)>, + <PINMUX(PIN_SD0_D1, 0)>, + <PINMUX(PIN_SD0_D2, 0)>, + <PINMUX(PIN_SD0_D3, 0)>; + bias-pull-up; + drive-strength-microamp = <10800>; + power-source = <3300>; + }; + }; + + uart0_cfg: uart0-cfg { + uart0-pins { + pinmux = <PINMUX(PIN_UART0_TX, 0)>, + <PINMUX(PIN_UART0_RX, 0)>; + bias-pull-up; + drive-strength-microamp = <10800>; + power-source = <3300>;
arch/arm64/boot/dts/sophgo/sg2000-milkv-duo-s.dts line 76
Quoted 10 lines
arch/arm64/boot/dts/sophgo/sg2000-milkv-duo-s.dts new file +10
-0+ }; + }; +}; + +&uart0 { + pinctrl-0 = <&uart0_cfg>; + pinctrl-names = "default"; + status = "okay"; + /delete-property/ resets; +};
Needs parting of resets out from where it is now instead of delete-property here. I don't know if that can be the same series.
arch/arm64/boot/dts/sophgo/sg2000-milkv-duo-s.dts line 82
Quoted 6 lines
arch/arm64/boot/dts/sophgo/sg2000-milkv-duo-s.dts new file +6
-0+ +&sdhci0 { + bus-width = <4>; + no-1-8-v; + no-mmc; + no-sdio;
Unlikely to need 'no-mmc' 'no-sdio'. Test without, and drop?
arch/arm64/boot/dts/sophgo/sg2000-milkv-duo-s.dts line 88
Quoted 6 lines
arch/arm64/boot/dts/sophgo/sg2000-milkv-duo-s.dts new file +6
-0+ disable-wp; + pinctrl-0 = <&sdhci0_cfg>; + pinctrl-names = "default"; + status = "okay"; +}; +
Please use '--base=' with git format-patch so we will know the commit id your series is based from.
Best regards,
-E Shattow
Re: [PATCH 2/2] arm64: dts: sophgo: add initial Milk-V Duo S board support
Hi!
Quoted 5 lines · E Shattow
Quoted 5 lines
arch/arm64/boot/dts/sophgo/sg2000-milkv-duo-s.dts new file +2
-0@@ -0,0 +1,88 @@ +// SPDX-License-Identifier: (GPL-2.0 OR MIT) +
Quoted 8 lines
arch/arm64/boot/dts/sophgo/sg2000-milkv-duo-s.dts line 10
Quoted 8 lines
arch/arm64/boot/dts/sophgo/sg2000-milkv-duo-s.dts new file +8
-0+/dts-v1/; + +#include <dt-bindings/pinctrl/pinctrl-sg2000.h> +#include "sg2000.dtsi" + +/ { + model = "Milk-V DuoS"; + compatible = "milkv,duo-s", "sophgo,sg2000";
[]
Quoted 8 lines
arch/arm64/boot/dts/sophgo/sg2000-milkv-duo-s.dts line 76
Quoted 6 lines
arch/arm64/boot/dts/sophgo/sg2000-milkv-duo-s.dts new file +6
-0+&uart0 { + pinctrl-0 = <&uart0_cfg>; + pinctrl-names = "default"; + status = "okay"; + /delete-property/ resets; +};Needs parting of resets out from where it is now instead of delete-property here. I don't know if that can be the same series.
I wonder why is it necessary to remove "resets" at all, if it's exactly the SG2000 SoC. What is the exact problem with them?
Signature · 1 line
Alexander Sverdlin.
Re: [PATCH 2/2] arm64: dts: sophgo: add initial Milk-V Duo S board support
Alexander,
Quoted 2 lines
I wonder why is it necessary to remove "resets" at all, if it's exactly the SG2000 SoC. What is the exact problem with them?
When I dont have the 'resets' property removed I don't get any output, with or without the pinctrl property. I found this out by comparing the device tree from the released image from milk-v, it was the only property missing.
- Joshua Milas
Inochi Amaoto
maintainerRe: [PATCH 2/2] arm64: dts: sophgo: add initial Milk-V Duo S board support
In reply to E ShattowQuoted 25 lines · E Shattow
Hi Joshua,
Quoted 4 lines · Joshua Milas
This adds initial arm64 support for the Milk-V Duo S board
(https://milkv.io/duo-s), enabling the serial port and sdhci0, making it possible to boot Linux to the command line.Review
Quoted 8 lines
Signed-off-by Joshua Milas <[email protected]>--- arch/arm64/boot/dts/sophgo/Makefile | 1 + .../boot/dts/sophgo/sg2000-milkv-duo-s.dts | 88 +++++++++++++++++++ 2 files changed, 89 insertions(+) create mode 100644 arch/arm64/boot/dts/sophgo/sg2000-milkv-duo-s.dts(quoted diff) +0
-0b/arch/arm64/boot/dts/sophgo/Makefile
Review
Quoted 8 lines
index
94f52cd7d994..68aace728223100644arch/arm64/boot/dts/sophgo/Makefile +1
-0@@ -1,2 +1,3 @@ # SPDX-License-Identifier: GPL-2.0 dtb-$(CONFIG_ARCH_SOPHGO) += sg2000-milkv-duo-module-01-evb.dtb +dtb-$(CONFIG_ARCH_SOPHGO) += sg2000-milkv-duo-s.dtb(quoted diff) +0
-0
b/arch/arm64/boot/dts/sophgo/sg2000-milkv-duo-s.dts
Quoted 17 lines
Quoted 5 lines
new file mode 100644
index 000000000000..94cf89d423dearch/arm64/boot/dts/sophgo/sg2000-milkv-duo-s.dts line 10
Quoted 10 lines
arch/arm64/boot/dts/sophgo/sg2000-milkv-duo-s.dts new file +10
-0@@ -0,0 +1,88 @@ +// SPDX-License-Identifier: (GPL-2.0 OR MIT) + +/dts-v1/; + +#include <dt-bindings/pinctrl/pinctrl-sg2000.h> +#include "sg2000.dtsi" + +/ { + model = "Milk-V DuoS"; + compatible = "milkv,duo-s", "sophgo,sg2000";"Milk-V Duo S" with "milkv,duo-s, "sophgo,sg2000"
I prefer this one.
Quoted 97 lines
or
"Milk-V Duo S" with milkv,duos, "sophgo,sg2000"
and dts filename to agree.
arch/arm64/boot/dts/sophgo/sg2000-milkv-duo-s.dts line 15
Quoted 5 lines
arch/arm64/boot/dts/sophgo/sg2000-milkv-duo-s.dts new file +5
-0+ + aliases { + serial0 = &uart0; + mmc0 = &sdhci0; + };Sort aliases.
Quoted 51 lines
arch/arm64/boot/dts/sophgo/sg2000-milkv-duo-s.dts new file +51
-0+ + chosen { + stdout-path = "serial0:115200n8"; + }; +}; + +&osc { + clock-frequency = <25000000>; +}; + +&pinctrl { + sdhci0_cfg: sdhci0-cfg { + sdhci0-cd-pins { + pinmux = <PINMUX(PIN_SD0_CD, 0)>; + bias-pull-up; + drive-strength-microamp = <10800>; + power-source = <3300>; + }; + + sdhci0-clk-pins { + pinmux = <PINMUX(PIN_SD0_CLK, 0)>; + bias-pull-up; + drive-strength-microamp = <16100>; + power-source = <3300>; + }; + + sdhci0-cmd-pins { + pinmux = <PINMUX(PIN_SD0_CMD, 0)>; + bias-pull-up; + drive-strength-microamp = <10800>; + power-source = <3300>; + }; + + sdhci0-data-pins { + pinmux = <PINMUX(PIN_SD0_D0, 0)>, + <PINMUX(PIN_SD0_D1, 0)>, + <PINMUX(PIN_SD0_D2, 0)>, + <PINMUX(PIN_SD0_D3, 0)>; + bias-pull-up; + drive-strength-microamp = <10800>; + power-source = <3300>; + }; + }; + + uart0_cfg: uart0-cfg { + uart0-pins { + pinmux = <PINMUX(PIN_UART0_TX, 0)>, + <PINMUX(PIN_UART0_RX, 0)>; + bias-pull-up; + drive-strength-microamp = <10800>; + power-source = <3300>;arch/arm64/boot/dts/sophgo/sg2000-milkv-duo-s.dts line 76
Quoted 10 lines
arch/arm64/boot/dts/sophgo/sg2000-milkv-duo-s.dts new file +10
-0+ }; + }; +}; + +&uart0 { + pinctrl-0 = <&uart0_cfg>; + pinctrl-names = "default"; + status = "okay"; + /delete-property/ resets; +};Needs parting of resets out from where it is now instead of delete-property here. I don't know if that can be the same series.
arch/arm64/boot/dts/sophgo/sg2000-milkv-duo-s.dts line 82
Quoted 6 lines
arch/arm64/boot/dts/sophgo/sg2000-milkv-duo-s.dts new file +6
-0+ +&sdhci0 { + bus-width = <4>; + no-1-8-v; + no-mmc; + no-sdio;Unlikely to need 'no-mmc' 'no-sdio'. Test without, and drop?
arch/arm64/boot/dts/sophgo/sg2000-milkv-duo-s.dts line 88
Quoted 6 lines
arch/arm64/boot/dts/sophgo/sg2000-milkv-duo-s.dts new file +6
-0+ disable-wp; + pinctrl-0 = <&sdhci0_cfg>; + pinctrl-names = "default"; + status = "okay"; +}; +Please use '--base=' with git format-patch so we will know the commit id your series is based from.
Best regards,
-E Shattow
Inochi Amaoto
maintainerRe: [PATCH 2/2] arm64: dts: sophgo: add initial Milk-V Duo S board support
In reply to Joshua MilasQuoted 30 lines · Joshua Milas
This adds initial arm64 support for the Milk-V Duo S board
(https://milkv.io/duo-s), enabling the serial port and sdhci0, making it possible to boot Linux to the command line.Signed-off-by Joshua Milas <[email protected]>--- arch/arm64/boot/dts/sophgo/Makefile | 1 + .../boot/dts/sophgo/sg2000-milkv-duo-s.dts | 88 +++++++++++++++++++ 2 files changed, 89 insertions(+) create mode 100644 arch/arm64/boot/dts/sophgo/sg2000-milkv-duo-s.dtsarch/arm64/boot/dts/sophgo/Makefile +1
-0@@ -1,2 +1,3 @@ # SPDX-License-Identifier: GPL-2.0 dtb-$(CONFIG_ARCH_SOPHGO) += sg2000-milkv-duo-module-01-evb.dtb +dtb-$(CONFIG_ARCH_SOPHGO) += sg2000-milkv-duo-s.dtbarch/arm64/boot/dts/sophgo/sg2000-milkv-duo-s.dts new file +5
-0@@ -0,0 +1,88 @@ +// SPDX-License-Identifier: (GPL-2.0 OR MIT) + +/dts-v1/; + +#include <dt-bindings/pinctrl/pinctrl-sg2000.h>
arch/arm64/boot/dts/sophgo/sg2000-milkv-duo-s.dts line 15
Quoted 10 lines
arch/arm64/boot/dts/sophgo/sg2000-milkv-duo-s.dts new file +10
-0+#include "sg2000.dtsi" + +/ { + model = "Milk-V DuoS"; + compatible = "milkv,duo-s", "sophgo,sg2000"; + + aliases { + serial0 = &uart0; + mmc0 = &sdhci0; + };
It is better for adding gpio and other serial there?
Quoted 45 lines
arch/arm64/boot/dts/sophgo/sg2000-milkv-duo-s.dts new file +44
-0+ + chosen { + stdout-path = "serial0:115200n8"; + }; +}; + +&osc { + clock-frequency = <25000000>; +}; + +&pinctrl { + sdhci0_cfg: sdhci0-cfg { + sdhci0-cd-pins { + pinmux = <PINMUX(PIN_SD0_CD, 0)>; + bias-pull-up; + drive-strength-microamp = <10800>; + power-source = <3300>; + }; + + sdhci0-clk-pins { + pinmux = <PINMUX(PIN_SD0_CLK, 0)>; + bias-pull-up; + drive-strength-microamp = <16100>; + power-source = <3300>; + }; + + sdhci0-cmd-pins { + pinmux = <PINMUX(PIN_SD0_CMD, 0)>; + bias-pull-up; + drive-strength-microamp = <10800>; + power-source = <3300>; + }; + + sdhci0-data-pins { + pinmux = <PINMUX(PIN_SD0_D0, 0)>, + <PINMUX(PIN_SD0_D1, 0)>, + <PINMUX(PIN_SD0_D2, 0)>, + <PINMUX(PIN_SD0_D3, 0)>; + bias-pull-up; + drive-strength-microamp = <10800>; + power-source = <3300>; + }; + }; +
arch/arm64/boot/dts/sophgo/sg2000-milkv-duo-s.dts line 69
Quoted 10 lines
arch/arm64/boot/dts/sophgo/sg2000-milkv-duo-s.dts new file +10
-0+ uart0_cfg: uart0-cfg { + uart0-pins { + pinmux = <PINMUX(PIN_UART0_TX, 0)>, + <PINMUX(PIN_UART0_RX, 0)>; + bias-pull-up; + drive-strength-microamp = <10800>; + power-source = <3300>; + }; + }; +};
Small suggestion: please ensure the pinctrl is correct, different board may require different configuration.
Quoted 22 lines
arch/arm64/boot/dts/sophgo/sg2000-milkv-duo-s.dts new file +19
-0+ +&uart0 { + pinctrl-0 = <&uart0_cfg>; + pinctrl-names = "default"; + status = "okay"; + /delete-property/ resets; +}; + +&sdhci0 { + bus-width = <4>; + no-1-8-v; + no-mmc; + no-sdio; + disable-wp; + pinctrl-0 = <&sdhci0_cfg>; + pinctrl-names = "default"; + status = "okay"; +}; +Signature · 1 line
2.51.0
I suggest adding all the support devices instead of a minimum one. Like ethernet, wifi, bluetooth.
In the next cycle, there should be a patch for adding USB device node, as the driver is already merged. I also hope you can take it.
Regards,
Inochi
Re: [PATCH 2/2] arm64: dts: sophgo: add initial Milk-V Duo S board support
Hi Inochi, Joshua,
Quoted 12 lines · Inochi Amaoto
Quoted 12 lines
arch/arm64/boot/dts/sophgo/sg2000-milkv-duo-s.dts new file +9
-0@@ -0,0 +1,88 @@ +// SPDX-License-Identifier: (GPL-2.0 OR MIT) + +/dts-v1/; + +#include <dt-bindings/pinctrl/pinctrl-sg2000.h> +#include "sg2000.dtsi" + +/ { + model = "Milk-V DuoS";
Quoted 8 lines
arch/arm64/boot/dts/sophgo/sg2000-milkv-duo-s.dts line 15
Quoted 6 lines
arch/arm64/boot/dts/sophgo/sg2000-milkv-duo-s.dts new file +6
-0+ compatible = "milkv,duo-s", "sophgo,sg2000"; + + aliases { + serial0 = &uart0; + mmc0 = &sdhci0; + };It is better for adding gpio and other serial there?
I believe, gpio is long time discouraged here.
Signature · 1 line
Alexander Sverdlin.
Inochi Amaoto
maintainerRe: [PATCH 2/2] arm64: dts: sophgo: add initial Milk-V Duo S board support
Quoted 24 lines · Alexander Sverdlin
Hi Inochi, Joshua,
Quoted 12 lines · Inochi Amaoto
Quoted 12 lines
arch/arm64/boot/dts/sophgo/sg2000-milkv-duo-s.dts new file +9
-0@@ -0,0 +1,88 @@ +// SPDX-License-Identifier: (GPL-2.0 OR MIT) + +/dts-v1/; + +#include <dt-bindings/pinctrl/pinctrl-sg2000.h> +#include "sg2000.dtsi" + +/ { + model = "Milk-V DuoS";Quoted 8 lines
arch/arm64/boot/dts/sophgo/sg2000-milkv-duo-s.dts line 15
Quoted 6 lines
arch/arm64/boot/dts/sophgo/sg2000-milkv-duo-s.dts new file +6
-0+ compatible = "milkv,duo-s", "sophgo,sg2000"; + + aliases { + serial0 = &uart0; + mmc0 = &sdhci0; + };It is better for adding gpio and other serial there?
Quoted 4 lines
I believe, gpio is long time discouraged here.
Good to know, let's drop it.
Regards,
Inochi
Re: [PATCH 2/2] arm64: dts: sophgo: add initial Milk-V Duo S board support
In reply to Alexander SverdlinHi Alex,
Quoted 1 line
I believe, gpio is long time discouraged here.
Does this mean just the '&gpio*' entries, or other GPIO items like i2c and spi?
Thanks,
- Joshua Milas
Re: [PATCH 2/2] arm64: dts: sophgo: add initial Milk-V Duo S board support
Quoted 9 lines · Joshua Milas
Hi Alex,
Quoted 1 line
I believe, gpio is long time discouraged here.
Does this mean just the '&gpio*' entries, or other GPIO items like i2c and spi?
Thanks,
- Joshua Milas
Hi!
I referred to "&gpio*" entries only being deprecated.
Re: [PATCH 2/2] arm64: dts: sophgo: add initial Milk-V Duo S board support
In reply to Inochi AmaotoHi Inochi,
Quoted 2 lines
Small suggestion: please ensure the pinctrl is correct, different board may require different configuration.
Is there a certain way to do that? I have been checking it against the board schematic [1]. It shows that it is using UART0 on the pins defined in pinctrl-sg2000.h.
Quoted 4 lines
I suggest adding all the support devices instead of a minimum one. Like ethernet, wifi, bluetooth.
In the next cycle, there should be a patch for adding USB device node, as the driver is already merged. I also hope you can take it.
Lets do it! I tried adding the following but could not get some items working:
* emmc from 'sg2000-milkv-duo-module-01.dtsi'
* sdhci1 from 'sg2000-milkv-duo-module-01.dtsi'
* mdio
* gmac0
* dmac
* saradc
* i2c*
* spi*
I pulled the following logs of interest:
---
...
[ 0.647426] faux_driver regulatory: no of_node; not parsing pinctrl DT ... [ 0.732380] serial8250 serial8250: no of_node; not parsing pinctrl DT ... [ 2.418965] sophgo-cv1800-rtc cv1800b-rtc.0.auto: no of_node; not parsing pinctrl DT [ 2.427695] alarmtimer alarmtimer.1.auto: no of_node; not parsing pinctrl DT ... [ 2.441722] sophgo-cv1800-rtc cv1800b-rtc.0.auto: hctosys: unable to read the hardware clock ... [ 2.525580] SPI driver fb_st7789v has no spi_device_id for sitronix,st7789v ... [ 2.555363] faux_driver snd-soc-dummy: no of_node; not parsing pinctrl DT ... [ 2.767235] mmc1: Failed to initialize a non-removable card ... [ 2.900631] dw-apb-uart 4140000.serial: forbid DMA for kernel console ... [ 13.058020] stmmaceth 4070000.ethernet: IRQ eth_wake_irq not found [ 13.086915] stmmaceth 4070000.ethernet: IRQ eth_lpi not found [ 13.096993] stmmaceth 4070000.ethernet: IRQ sfty not found [ 13.105407] stmmaceth 4070000.ethernet: Hash table entries set to unexpected value 0 [ 13.115751] stmmaceth 4070000.ethernet: dt configuration failed [ 13.127832] platform 3009800.mdio-mux: deferred probe pending: mdio-mux-mmioreg: failed to register mdio-mux bus /soc/mdio-mux@3009800 [ 13.142739] platform 4070000.ethernet: deferred probe pending: (reason unknown) [ 13.152434] platform 4000000.i2c: deferred probe pending: (reason unknown) [ 13.161898] platform 4010000.i2c: deferred probe pending: (reason unknown) [ 13.171078] platform 4020000.i2c: deferred probe pending: (reason unknown) [ 13.180353] platform 4030000.i2c: deferred probe pending: (reason unknown) [ 13.189629] platform 4040000.i2c: deferred probe pending: (reason unknown) [ 13.198817] platform 3020000.gpio: deferred probe pending: gpio-dwapb: Cannot get reset descriptor [ 13.210208] platform 3021000.gpio: deferred probe pending: gpio-dwapb: Cannot get reset descriptor [ 13.221737] platform 3022000.gpio: deferred probe pending: gpio-dwapb: Cannot get reset descriptor [ 13.233111] platform 3023000.gpio: deferred probe pending: gpio-dwapb: Cannot get reset descriptor [ 13.244422] platform 4150000.serial: deferred probe pending: (reason unknown) [ 13.253971] platform 4160000.serial: deferred probe pending: (reason unknown) [ 13.263513] platform 4170000.serial: deferred probe pending: (reason unknown) [ 13.274037] platform 41c0000.serial: deferred probe pending: (reason unknown)
---
I believe I have the correct drivers enabled for everything. I'm figuring there is some pinctrl configuration ('PIN_ETH_*'?) I have to add to the device tree but unsure what it would look like.
Thanks for the feedback,
- Joshua Milas
Inochi Amaoto
maintainerRe: [PATCH 2/2] arm64: dts: sophgo: add initial Milk-V Duo S board support
Quoted 68 lines · Joshua Milas
Hi Inochi,
Quoted 2 lines
Small suggestion: please ensure the pinctrl is correct, different board may require different configuration.
Is there a certain way to do that? I have been checking it against the board schematic [1]. It shows that it is using UART0 on the pins defined in
pinctrl-sg2000.h.Quoted 4 lines
I suggest adding all the support devices instead of a minimum one. Like ethernet, wifi, bluetooth.
In the next cycle, there should be a patch for adding USB device node, as the driver is already merged. I also hope you can take it.Lets do it! I tried adding the following but could not get some items working:
* emmc from 'sg2000-milkv-duo-module-01.dtsi'
* sdhci1 from 'sg2000-milkv-duo-module-01.dtsi'
* mdio
* gmac0
* dmac
* saradc
* i2c*
* spi*I pulled the following logs of interest:
---
...[ 0.647426] faux_driver regulatory: no of_node; not parsing pinctrl DT ... [ 0.732380] serial8250 serial8250: no of_node; not parsing pinctrl DT ... [ 2.418965] sophgo-cv1800-rtc cv1800b-rtc.0.auto: no of_node; not parsing pinctrl DT [ 2.427695] alarmtimer alarmtimer.1.auto: no of_node; not parsing pinctrl DT ... [ 2.441722] sophgo-cv1800-rtc cv1800b-rtc.0.auto: hctosys: unable to read the hardware clock ... [ 2.525580] SPI driver fb_st7789v has no spi_device_id for sitronix,st7789v ... [ 2.555363] faux_driver snd-soc-dummy: no of_node; not parsing pinctrl DT ... [ 2.767235] mmc1: Failed to initialize a non-removable card ... [ 2.900631] dw-apb-uart 4140000.serial: forbid DMA for kernel console ... [ 13.058020] stmmaceth 4070000.ethernet: IRQ eth_wake_irq not found [ 13.086915] stmmaceth 4070000.ethernet: IRQ eth_lpi not found [ 13.096993] stmmaceth 4070000.ethernet: IRQ sfty not found [ 13.105407] stmmaceth 4070000.ethernet: Hash table entries set to unexpected value 0 [ 13.115751] stmmaceth 4070000.ethernet: dt configuration failed [ 13.127832] platform 3009800.mdio-mux: deferred probe pending: mdio-mux-mmioreg: failed to register mdio-mux bus /soc/mdio-mux@3009800 [ 13.142739] platform 4070000.ethernet: deferred probe pending: (reason unknown) [ 13.152434] platform 4000000.i2c: deferred probe pending: (reason unknown) [ 13.161898] platform 4010000.i2c: deferred probe pending: (reason unknown) [ 13.171078] platform 4020000.i2c: deferred probe pending: (reason unknown) [ 13.180353] platform 4030000.i2c: deferred probe pending: (reason unknown) [ 13.189629] platform 4040000.i2c: deferred probe pending: (reason unknown) [ 13.198817] platform 3020000.gpio: deferred probe pending: gpio-dwapb: Cannot get reset descriptor [ 13.210208] platform 3021000.gpio: deferred probe pending: gpio-dwapb: Cannot get reset descriptor [ 13.221737] platform 3022000.gpio: deferred probe pending: gpio-dwapb: Cannot get reset descriptor [ 13.233111] platform 3023000.gpio: deferred probe pending: gpio-dwapb: Cannot get reset descriptor [ 13.244422] platform 4150000.serial: deferred probe pending: (reason unknown) [ 13.253971] platform 4160000.serial: deferred probe pending: (reason unknown) [ 13.263513] platform 4170000.serial: deferred probe pending: (reason unknown) [ 13.274037] platform 41c0000.serial: deferred probe pending: (reason unknown)
Quoted 6 lines
---
I believe I have the correct drivers enabled for everything. I'm figuring there is some pinctrl configuration ('PIN_ETH_*'?) I have to add to the device tree but unsure what it would look like.
Weird, I don't see it in riscv build. Can you post your dts here?
Regards,
Inochi
Re: [PATCH 2/2] arm64: dts: sophgo: add initial Milk-V Duo S board support
Inochi,
Quoted 1 line
Weird, I don't see it in riscv build. Can you post your dts here?
It ended up being a driver selection issue on my part. I got the ARM64 and RICV both woring without the pinctrl config in the dts. I was also able to get Ethernet working so V2 is hopefully a maximal config.
Thanks,
- Joshua Milas
Inochi Amaoto
maintainerRe: [PATCH 2/2] arm64: dts: sophgo: add initial Milk-V Duo S board support
In reply to Joshua MilasQuoted 12 lines · Joshua Milas
Hi Inochi,
Quoted 2 lines
Small suggestion: please ensure the pinctrl is correct, different board may require different configuration.
Is there a certain way to do that? I have been checking it against the board schematic [1]. It shows that it is using UART0 on the pins defined in
pinctrl-sg2000.h.
Sorry for missing this. A simple way is to dump the vendor configuration for an example. It should show almost all you want to know. But if you want to find the best, it is necessary to check the peripheral manual, and it will tell the typical configuration.
Regards,
Inochi
Rob Herring (Arm)
maintainerQuoted 14 lines · Joshua Milas
This adds an initial device tree for the Milk-V Duo S board with support for reading from the SD card. This is continued work from Michael Opdenacker's v6 series on the ARM64 side. I'm still working on confirming the RISCV side.
https://lore.kernel.org/linux-riscv/[email protected]/
Patch produced against the "for-next" branch of the sophgo "linux" tree:
https://github.com/sophgo/linux.gitJoshua Milas (2):
dt-bindings: soc: sophgo: add Milk-V Duo S board compatibles
arm64: dts: sophgo: add initial Milk-V Duo S board support
Quoted 11 lines
.../bindings/soc/sophgo/sophgo.yaml | 1 + arch/arm64/boot/dts/sophgo/Makefile | 1 + .../boot/dts/sophgo/sg2000-milkv-duo-s.dts | 88 +++++++++++++++++++ 3 files changed, 90 insertions(+) create mode 100644 arch/arm64/boot/dts/sophgo/sg2000-milkv-duo-s.dts--
2.51.0
My bot found new DTB warnings on the .dts files added or changed in this series.
Some warnings may be from an existing SoC .dtsi. Or perhaps the warnings are fixed by another series. Ultimately, it is up to the platform maintainer whether these warnings are acceptable or not. No need to reply unless the platform maintainer has comments.
If you already ran DT checks and didn't see these error(s), then make sure dt-schema is up to date:
pip3 install dtschema --upgrade
This patch series was applied (using b4) to base:
Base: attempting to guess base-commit...
Base: tags/next-20250926 (exact match)
If this is not the correct base, please add 'base-commit' tag (or use b4 which does this automatically)
New warnings running 'make CHECK_DTBS=y for arch/arm64/boot/dts/sophgo/' for [email protected]:
arch/arm64/boot/dts/sophgo/sg2000-milkv-duo-s.dtb: / (milkv,duo-s): compatible: 'oneOf' conditional failed, one must be fixed:
['milkv,duo-s', 'sophgo,sg2000'] is too short
'milkv,duo-s' is not one of ['milkv,duo']
'milkv,duo-s' is not one of ['sophgo,huashan-pi']
'milkv,duo-s' is not one of ['sipeed,licheerv-nano-b']
'milkv,duo-s' is not one of ['milkv,pioneer', 'sophgo,sg2042-evb-v1', 'sophgo,sg2042-evb-v2'] 'milkv,duo-s' is not one of ['sophgo,srd3-10']
'sophgo,cv1800b' was expected
'sophgo,cv1812h' was expected
'milkv,duo-module-01' was expected
'sipeed,licheerv-nano' was expected
'sophgo,sg2042' was expected
'sophgo,sg2044' was expected
from schema $id: http://devicetree.org/schemas/soc/sophgo/sophgo.yaml#
Hi, Joshua,
Thanks for your post, please loop to [email protected] next time.
Quoted 6 lines · Joshua Milas
This adds an initial device tree for the Milk-V Duo S board with support for reading from the SD card. This is continued work from Michael Opdenacker's v6 series on the ARM64 side. I'm still working on confirming the RISCV side.
Please add prefix & reference number as below:
And you can refer the link as "[1]" in your text.
Quoted 8 lines
Patch produced against the "for-next" branch of the sophgo "linux" tree:
https://github.com/sophgo/linux.gitJoshua Milas (2):
dt-bindings: soc: sophgo: add Milk-V Duo S board compatibles
arm64: dts: sophgo: add initial Milk-V Duo S board support
Quoted 5 lines
.../bindings/soc/sophgo/sophgo.yaml | 1 + arch/arm64/boot/dts/sophgo/Makefile | 1 + .../boot/dts/sophgo/sg2000-milkv-duo-s.dts | 88 +++++++++++++++++++ 3 files changed, 90 insertions(+)create mode 100644
arch/arm64/boot/dts/sophgo/sg2000-milkv-duo-s.dts
Regards,
Chen