Skip to contentSkip to conversation

add initial Milk-V Duo S board support

PATCH In review [email protected] 3 participants 8 messages Apr 21, 2024 – Apr 22, 2024

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

v6 cover add initial Milk-V Duo S board support

From: Michael Opdenacker <[email protected]>

This adds an initial device tree for the Milk-V Duo S board. Last tested on linux-next 20240419

Patch produced against the "for-next" branch of the sophgo "linux" tree:
https://github.com/sophgo/linux.git

- Changes in V6
- Change board compatible from "milkv,duos" to "milkv,duo-s"
- Rename sg2000-milkv-duos.dts to cv1812h-milkv-duo-s.dts
- Remove redundant line from board DTS:
device_type = "memory";
It was already set in cv1812h.dtsi

- Changes in V5
- Fix the commit message describing the board DTS. MMC is not supported yet.

- Changes in V4
- Remove mmc device (&sdhci0) as not working yet with linux-next
- Use "sophgo,cv1812h" compatible as on the Huashan Pi board. Should I call the DTS cv1812h-milkv-duos.dts instead of sg2000-milkv-duos.dts?

- Changes in V3
- Fix enum in devicetree/bindings/riscv/sophgo.yaml

- Changes in V2:
- Add a first patch to register the new compatible string for this board.
- Use a correct SoC compatible string
- Add "disable-wp" (disable write protect) property to enable write access to the external SD card.

Michael Opdenacker (2):
dt-bindings: riscv: add Milk-V Duo S board compatibles
riscv: dts: sophgo: add initial Milk-V Duo S board support

 .../devicetree/bindings/riscv/sophgo.yaml     |  1 +
 arch/riscv/boot/dts/sophgo/Makefile           |  1 +
 .../boot/dts/sophgo/cv1812h-milkv-duo-s.dts   | 33 +++++++++++++++++++
 3 files changed, 35 insertions(+)
 create mode 100644 arch/riscv/boot/dts/sophgo/cv1812h-milkv-duo-s.dts
Signature · 7 lines
2.34.1


_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
#1 lore raw

PATCH v6 1/2 dt-bindings: riscv: add Milk-V Duo S board compatibles

From: Michael Opdenacker <[email protected]>

Document the compatible strings for the Milk-V Duo S board[1] which uses the SOPHGO SG2000 SoC, compatible with the CV1812H SoC[2].

---
 Documentation/devicetree/bindings/riscv/sophgo.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/riscv/sophgo.yaml +1 -0
index 9bc813dad098..79546aa21021 100644
@@ -24,6 +24,7 @@ properties:
           - const: sophgo,cv1800b
       - items:
           - enum:
+              - milkv,duo-s
               - sophgo,huashan-pi
           - const: sophgo,cv1812h
       - items:
Signature · 1 line
2.34.1
#2 lore raw

Re: [PATCH v6 1/2] dt-bindings: riscv: add Milk-V Duo S board compatibles

Quoted 10 lines · On 21/04/2024 07:57, [email protected] wrote:

From: Michael Opdenacker <[email protected]>

Document the compatible strings for the Milk-V Duo S board[1] which uses the SOPHGO SG2000 SoC, compatible with the CV1812H SoC[2].

---

Where is the changelog? It's v6!

Documentation/devicetree/bindings/riscv/sophgo.yaml properties: · line 27

Quoted 12 lines
 Documentation/devicetree/bindings/riscv/sophgo.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/riscv/sophgo.yaml +1 -0
index 9bc813dad098..79546aa21021 100644
@@ -24,6 +24,7 @@ properties:
           - const: sophgo,cv1800b
       - items:
           - enum:
+              - milkv,duo-s

? It was duo... and duos... now weirdly duo-s without explanation.

Documentation/devicetree/bindings/riscv/sophgo.yaml properties: · line 29

Quoted 2 lines
Documentation/devicetree/bindings/riscv/sophgo.yaml +0 -0
               - sophgo,huashan-pi
           - const: sophgo,cv1812h

It was CV1800 before... and you were asked for SoC compatible.

Please reach to your Bootlin folks to explain you how to send new versions of patchsets and how to use compatibles.

Best regards,
Krzysztof

#3 lore raw

Re: [PATCH v6 1/2] dt-bindings: riscv: add Milk-V Duo S board compatibles

Hi Krzysztof

Quoted 6 lines · Krzysztof Kozlowski
Quoted 5 lines · On 21/04/2024 07:57, [email protected] wrote:

From: Michael Opdenacker <[email protected]>

Document the compatible strings for the Milk-V Duo S board[1] which uses the SOPHGO SG2000 SoC, compatible with the CV1812H SoC[2].

Quoted 6 lines
Quoted 5 lines

---

Where is the changelog? It's v6!

Oops, it was in my cover letter (https://lore.kernel.org/linux-riscv/[email protected]/T/#t), which you didn't get because of get-maintainer.pl. As the recipients are patch dependent, am I supposed to describe the changes in all patches and not only in the cover letter?

Cheers
Michael.

Signature · 3 lines
Michael Opdenacker, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#4 lore raw

Re: [PATCH v6 1/2] dt-bindings: riscv: add Milk-V Duo S board compatibles

Quoted 14 lines · Michael Opdenacker

Hi Krzysztof

Quoted 11 lines · Krzysztof Kozlowski
Quoted 10 lines · On 21/04/2024 07:57, [email protected] wrote:

From: Michael Opdenacker <[email protected]>

Document the compatible strings for the Milk-V Duo S board[1] which uses the SOPHGO SG2000 SoC, compatible with the CV1812H SoC[2].

---

Quoted 7 lines
Quoted 1 line

Where is the changelog? It's v6!

Oops, it was in my cover letter
(https://lore.kernel.org/linux-riscv/[email protected]/T/#t),
which you didn't get because of get-maintainer.pl. As the recipients are patch dependent, am I supposed to describe the changes in all patches and not only in the cover letter?

If you do not send the changelog to everyone, then yes, please describe respective changes in each patch.

It's your choice, but if you decide not to send cover letter to some folks, then *it does not exist* for such folks.

Best regards,
Krzysztof

#5 lore raw

Re: [PATCH v6 1/2] dt-bindings: riscv: add Milk-V Duo S board compatibles

Quoted 15 lines · Krzysztof Kozlowski
Quoted 14 lines · Michael Opdenacker

Hi Krzysztof

Quoted 11 lines · Krzysztof Kozlowski
Quoted 10 lines · On 21/04/2024 07:57, [email protected] wrote:

From: Michael Opdenacker <[email protected]>

Document the compatible strings for the Milk-V Duo S board[1] which uses the SOPHGO SG2000 SoC, compatible with the CV1812H SoC[2].

---

Quoted 8 lines
Quoted 6 lines
Quoted 1 line

Where is the changelog? It's v6!

Oops, it was in my cover letter
(https://lore.kernel.org/linux-riscv/[email protected]/T/#t),
which you didn't get because of get-maintainer.pl. As the recipients are patch dependent, am I supposed to describe the changes in all patches and not only in the cover letter?

If you do not send the changelog to everyone, then yes, please describe respective changes in each patch.

Ok, will do, thanks!

Quoted 3 lines

It's your choice, but if you decide not to send cover letter to some folks, then *it does not exist* for such folks.

Well, actually, I shouldn't have let get-maintainer.pl decide for me. Is there a way to send the cover-letter to the union of people who will receive the individual patches? Cheers
Michael.

Signature · 3 lines
Michael Opdenacker, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#6 lore raw

Re: [PATCH v6 1/2] dt-bindings: riscv: add Milk-V Duo S board compatibles

Hi Michael,

Quoted 30 lines · Michael Opdenacker
Quoted 16 lines · Krzysztof Kozlowski
Quoted 15 lines · Michael Opdenacker

Hi Krzysztof

Quoted 12 lines · Krzysztof Kozlowski
Quoted 11 lines · On 21/04/2024 07:57, [email protected] wrote:

From: Michael Opdenacker <[email protected]>

Document the compatible strings for the Milk-V Duo S board[1] which uses
the SOPHGO SG2000 SoC, compatible with the CV1812H SoC[2].

---

Quoted 8 lines
Quoted 6 lines
Quoted 1 line

Where is the changelog? It's v6!

Oops, it was in my cover letter
(https://lore.kernel.org/linux-riscv/[email protected]/T/#t),
which you didn't get because of get-maintainer.pl. As the recipients are patch dependent, am I supposed to describe the changes in all patches and not only in the cover letter?

If you do not send the changelog to everyone, then yes, please describe respective changes in each patch.

Ok, will do, thanks!

Quoted 1 line
Quoted 6 lines
Quoted 2 lines

It's your choice, but if you decide not to send cover letter to some folks, then *it does not exist* for such folks.

Well, actually, I shouldn't have let get-maintainer.pl decide for me. Is there a way to send the cover-letter to the union of people who will receive the individual patches?

You may call get-maintainer.pl once for all the patches in the series (e.g. use a glob pattern to select all needed files) and then manually edit the cover letter to provide the 'To:' and 'Cc:' fields.

Additionally, you could use '--to-cover --cc-cover' arguments passed to 'git send-email' so that all those recipients will receive all patches.

Alternatively, you may try the b4 utility [1], which is able to automate most of the manual steps.

Hope this helps!

Regards,
Cristian

[1]: https://b4.docs.kernel.org/en/latest/contributor/prep.html

#7 lore raw

PATCH v6 2/2 riscv: dts: sophgo: add initial Milk-V Duo S board support

In reply to [email protected]

From: Michael Opdenacker <[email protected]>

This adds initial support for the Milk-V Duo S board
(https://milkv.io/duo-s), enabling the serial port, making it possible to boot Linux to the command line.

---
 arch/riscv/boot/dts/sophgo/Makefile           |  1 +
 .../boot/dts/sophgo/cv1812h-milkv-duo-s.dts   | 33 +++++++++++++++++++
 2 files changed, 34 insertions(+)
 create mode 100644 arch/riscv/boot/dts/sophgo/cv1812h-milkv-duo-s.dts
arch/riscv/boot/dts/sophgo/Makefile +1 -0
index 57ad82a61ea6..a410f6af03fc 100644
@@ -1,4 +1,5 @@
 # SPDX-License-Identifier: GPL-2.0
 dtb-$(CONFIG_ARCH_SOPHGO) += cv1800b-milkv-duo.dtb
 dtb-$(CONFIG_ARCH_SOPHGO) += cv1812h-huashan-pi.dtb
+dtb-$(CONFIG_ARCH_SOPHGO) += cv1812h-milkv-duo-s.dtb
 dtb-$(CONFIG_ARCH_SOPHGO) += sg2042-milkv-pioneer.dtb
arch/riscv/boot/dts/sophgo/cv1812h-milkv-duo-s.dts new file +33 -0
new file mode 100644
index 000000000000..0f2991d8c8f5
@@ -0,0 +1,33 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright (C) 2024 Michael Opdenacker <[email protected]>
+ */
+
+/dts-v1/;
+
+#include "cv1812h.dtsi"
+
+/ {
+	model = "Milk-V Duo S";
+	compatible = "milkv,duo-s", "sophgo,cv1812h";
+
+	aliases {
+		serial0 = &uart0;
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+
+	memory@80000000 {
+		reg = <0x80000000 0x20000000>;
+	};
+};
+
+&osc {
+	clock-frequency = <25000000>;
+};
+
+&uart0 {
+	status = "okay";
+};
Signature · 1 line
2.34.1