* [PATCH v3 0/2] add initial Milk-V Duo S board support
@ 2024-04-10 6:22 michael.opdenacker
2024-04-10 6:22 ` [PATCH v3 1/2] dt-bindings: riscv: add Milk-V Duo S board compatibles michael.opdenacker
2024-04-10 6:22 ` [PATCH v3 2/2] riscv: dts: sophgo: add initial Milk-V Duo S board support michael.opdenacker
0 siblings, 2 replies; 6+ messages in thread
From: michael.opdenacker @ 2024-04-10 6:22 UTC (permalink / raw)
To: Paul Walmsley, Palmer Dabbelt, Albert Ou, Chen Wang,
Inochi Amaoto
Cc: Michael Opdenacker, linux-riscv
From: Michael Opdenacker <michael.opdenacker@bootlin.com>
This adds an initial device tree for the Milk-V Duo S board.
Last tested on linux-next as a May 9, 2024.
- 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.
Many thanks to reviewers!
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/sg2000-milkv-duos.dts | 39 +++++++++++++++++++
3 files changed, 41 insertions(+)
create mode 100644 arch/riscv/boot/dts/sophgo/sg2000-milkv-duos.dts
--
2.34.1
_______________________________________________
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 v3 1/2] dt-bindings: riscv: add Milk-V Duo S board compatibles 2024-04-10 6:22 [PATCH v3 0/2] add initial Milk-V Duo S board support michael.opdenacker @ 2024-04-10 6:22 ` michael.opdenacker 2024-04-10 7:19 ` Inochi Amaoto 2024-04-10 6:22 ` [PATCH v3 2/2] riscv: dts: sophgo: add initial Milk-V Duo S board support michael.opdenacker 1 sibling, 1 reply; 6+ messages in thread From: michael.opdenacker @ 2024-04-10 6:22 UTC (permalink / raw) To: Conor Dooley, Rob Herring, Krzysztof Kozlowski, Chen Wang, Inochi Amaoto, Paul Walmsley, Palmer Dabbelt, Albert Ou, Chao Wei Cc: Michael Opdenacker, linux-riscv, devicetree, linux-kernel From: Michael Opdenacker <michael.opdenacker@bootlin.com> Document the compatible strings for the Milk-V Duo S board[1] which uses the SOPHGO SG2000 SoC, compatible with the SOPHGO CV1800B SoC[2]. Link: https://milkv.io/duo-s [1] Link: https://en.sophgo.com/product/introduce/cv180xB.html [2] Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com> --- Documentation/devicetree/bindings/riscv/sophgo.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/riscv/sophgo.yaml b/Documentation/devicetree/bindings/riscv/sophgo.yaml index 9bc813dad098..1837bc550056 100644 --- a/Documentation/devicetree/bindings/riscv/sophgo.yaml +++ b/Documentation/devicetree/bindings/riscv/sophgo.yaml @@ -21,6 +21,7 @@ properties: - items: - enum: - milkv,duo + - milkv,duos - const: sophgo,cv1800b - items: - enum: -- 2.34.1 _______________________________________________ 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 v3 1/2] dt-bindings: riscv: add Milk-V Duo S board compatibles 2024-04-10 6:22 ` [PATCH v3 1/2] dt-bindings: riscv: add Milk-V Duo S board compatibles michael.opdenacker @ 2024-04-10 7:19 ` Inochi Amaoto 2024-04-10 7:55 ` Michael Opdenacker 0 siblings, 1 reply; 6+ messages in thread From: Inochi Amaoto @ 2024-04-10 7:19 UTC (permalink / raw) To: michael.opdenacker, Conor Dooley, Rob Herring, Krzysztof Kozlowski, Chen Wang, Inochi Amaoto, Paul Walmsley, Palmer Dabbelt, Albert Ou, Chao Wei Cc: linux-riscv, devicetree, linux-kernel On Wed, Apr 10, 2024 at 08:22:53AM +0200, michael.opdenacker@bootlin.com wrote: > From: Michael Opdenacker <michael.opdenacker@bootlin.com> > > Document the compatible strings for the Milk-V Duo S board[1] which uses > the SOPHGO SG2000 SoC, compatible with the SOPHGO CV1800B SoC[2]. > > Link: https://milkv.io/duo-s [1] > Link: https://en.sophgo.com/product/introduce/cv180xB.html [2] > > Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com> > --- > Documentation/devicetree/bindings/riscv/sophgo.yaml | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/Documentation/devicetree/bindings/riscv/sophgo.yaml b/Documentation/devicetree/bindings/riscv/sophgo.yaml > index 9bc813dad098..1837bc550056 100644 > --- a/Documentation/devicetree/bindings/riscv/sophgo.yaml > +++ b/Documentation/devicetree/bindings/riscv/sophgo.yaml > @@ -21,6 +21,7 @@ properties: > - items: > - enum: > - milkv,duo > + - milkv,duos > - const: sophgo,cv1800b Why not adding sg2000 property? They are different series. IIRC, it at least a cv1813h not cv1800b. I suggest checking the vendor SDK to get the right board compatibles. > - items: > - enum: > -- > 2.34.1 > _______________________________________________ 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 v3 1/2] dt-bindings: riscv: add Milk-V Duo S board compatibles 2024-04-10 7:19 ` Inochi Amaoto @ 2024-04-10 7:55 ` Michael Opdenacker 2024-04-10 10:17 ` Inochi Amaoto 0 siblings, 1 reply; 6+ messages in thread From: Michael Opdenacker @ 2024-04-10 7:55 UTC (permalink / raw) To: Inochi Amaoto, Conor Dooley, Rob Herring, Krzysztof Kozlowski, Chen Wang, Paul Walmsley, Palmer Dabbelt, Albert Ou, Chao Wei Cc: michael.opdenacker, linux-riscv, devicetree, linux-kernel Hi Inochi Thanks for the reviews! On 4/10/24 at 09:19, Inochi Amaoto wrote: > On Wed, Apr 10, 2024 at 08:22:53AM +0200, michael.opdenacker@bootlin.com wrote: >> From: Michael Opdenacker <michael.opdenacker@bootlin.com> >> >> Document the compatible strings for the Milk-V Duo S board[1] which uses >> the SOPHGO SG2000 SoC, compatible with the SOPHGO CV1800B SoC[2]. >> >> Link: https://milkv.io/duo-s [1] >> Link: https://en.sophgo.com/product/introduce/cv180xB.html [2] >> >> Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com> >> --- >> Documentation/devicetree/bindings/riscv/sophgo.yaml | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/Documentation/devicetree/bindings/riscv/sophgo.yaml b/Documentation/devicetree/bindings/riscv/sophgo.yaml >> index 9bc813dad098..1837bc550056 100644 >> --- a/Documentation/devicetree/bindings/riscv/sophgo.yaml >> +++ b/Documentation/devicetree/bindings/riscv/sophgo.yaml >> @@ -21,6 +21,7 @@ properties: >> - items: >> - enum: >> - milkv,duo >> + - milkv,duos >> - const: sophgo,cv1800b > Why not adding sg2000 property? They are different series. > IIRC, it at least a cv1813h not cv1800b. I suggest checking > the vendor SDK to get the right board compatibles. Here's what there was in the vendor provided DTB, if I noted it correctly: compatible = "cvitek,cv181x"; Cheers Michael -- Michael Opdenacker, Bootlin Embedded Linux and Kernel engineering https://bootlin.com _______________________________________________ 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 v3 1/2] dt-bindings: riscv: add Milk-V Duo S board compatibles 2024-04-10 7:55 ` Michael Opdenacker @ 2024-04-10 10:17 ` Inochi Amaoto 0 siblings, 0 replies; 6+ messages in thread From: Inochi Amaoto @ 2024-04-10 10:17 UTC (permalink / raw) To: Michael Opdenacker, Inochi Amaoto, Conor Dooley, Rob Herring, Krzysztof Kozlowski, Chen Wang, Paul Walmsley, Palmer Dabbelt, Albert Ou, Chao Wei Cc: linux-riscv, devicetree, linux-kernel On Wed, Apr 10, 2024 at 09:55:17AM +0200, Michael Opdenacker wrote: > Hi Inochi > > Thanks for the reviews! > > On 4/10/24 at 09:19, Inochi Amaoto wrote: > > On Wed, Apr 10, 2024 at 08:22:53AM +0200, michael.opdenacker@bootlin.com wrote: > > > From: Michael Opdenacker <michael.opdenacker@bootlin.com> > > > > > > Document the compatible strings for the Milk-V Duo S board[1] which uses > > > the SOPHGO SG2000 SoC, compatible with the SOPHGO CV1800B SoC[2]. > > > > > > Link: https://milkv.io/duo-s [1] > > > Link: https://en.sophgo.com/product/introduce/cv180xB.html [2] > > > > > > Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com> > > > --- > > > Documentation/devicetree/bindings/riscv/sophgo.yaml | 1 + > > > 1 file changed, 1 insertion(+) > > > > > > diff --git a/Documentation/devicetree/bindings/riscv/sophgo.yaml b/Documentation/devicetree/bindings/riscv/sophgo.yaml > > > index 9bc813dad098..1837bc550056 100644 > > > --- a/Documentation/devicetree/bindings/riscv/sophgo.yaml > > > +++ b/Documentation/devicetree/bindings/riscv/sophgo.yaml > > > @@ -21,6 +21,7 @@ properties: > > > - items: > > > - enum: > > > - milkv,duo > > > + - milkv,duos > > > - const: sophgo,cv1800b > > Why not adding sg2000 property? They are different series. > > IIRC, it at least a cv1813h not cv1800b. I suggest checking > > the vendor SDK to get the right board compatibles. > > Here's what there was in the vendor provided DTB, if I noted it correctly: > compatible = "cvitek,cv181x"; > > Cheers > Michael That's true, the chipcode can be only see in the build script or the board dts. You can use this as a base. For example, sg2000 can be something like: "sophgo,sg2000", "sophgo,cv1813h". But in fact, I do not prefer to add "sophgo,cv1813h". Because sg2000 can also boot as an aarch64 board, but cv1813h can't. _______________________________________________ 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 v3 2/2] riscv: dts: sophgo: add initial Milk-V Duo S board support 2024-04-10 6:22 [PATCH v3 0/2] add initial Milk-V Duo S board support michael.opdenacker 2024-04-10 6:22 ` [PATCH v3 1/2] dt-bindings: riscv: add Milk-V Duo S board compatibles michael.opdenacker @ 2024-04-10 6:22 ` michael.opdenacker 1 sibling, 0 replies; 6+ messages in thread From: michael.opdenacker @ 2024-04-10 6:22 UTC (permalink / raw) To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Paul Walmsley, Palmer Dabbelt, Albert Ou, Chen Wang, Inochi Amaoto Cc: Michael Opdenacker, devicetree, linux-riscv, linux-kernel From: Michael Opdenacker <michael.opdenacker@bootlin.com> This adds initial support for the Milk-V Duo S board (https://milkv.io/duo-s), enabling the serial port and SD card support, allowing to boot Linux to the command line. Link: https://lore.kernel.org/linux-riscv/171266958507.1032617.9460749136730849811.robh@kernel.org/T/#t Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com> --- arch/riscv/boot/dts/sophgo/Makefile | 1 + .../boot/dts/sophgo/sg2000-milkv-duos.dts | 39 +++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 arch/riscv/boot/dts/sophgo/sg2000-milkv-duos.dts diff --git a/arch/riscv/boot/dts/sophgo/Makefile b/arch/riscv/boot/dts/sophgo/Makefile index 57ad82a61ea6..e008acb5240f 100644 --- a/arch/riscv/boot/dts/sophgo/Makefile +++ b/arch/riscv/boot/dts/sophgo/Makefile @@ -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) += sg2000-milkv-duos.dtb dtb-$(CONFIG_ARCH_SOPHGO) += sg2042-milkv-pioneer.dtb diff --git a/arch/riscv/boot/dts/sophgo/sg2000-milkv-duos.dts b/arch/riscv/boot/dts/sophgo/sg2000-milkv-duos.dts new file mode 100644 index 000000000000..679d2854938a --- /dev/null +++ b/arch/riscv/boot/dts/sophgo/sg2000-milkv-duos.dts @@ -0,0 +1,39 @@ +// SPDX-License-Identifier: (GPL-2.0 OR MIT) +/* + * Copyright (C) 2024 Michael Opdenacker <michael.opdenacker@bootlin.com> + */ + +/dts-v1/; + +#include "cv1800b.dtsi" + +/ { + model = "Milk-V Duo S"; + compatible = "milkv,duos", "sophgo,cv1800b"; + + aliases { + serial0 = &uart0; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; + + memory@80000000 { + device_type = "memory"; + reg = <0x80000000 0x20000000>; + }; +}; + +&osc { + clock-frequency = <25000000>; +}; + +&sdhci0 { + status = "okay"; + disable-wp; +}; + +&uart0 { + status = "okay"; +}; -- 2.34.1 _______________________________________________ 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
end of thread, other threads:[~2024-04-10 10:17 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2024-04-10 6:22 [PATCH v3 0/2] add initial Milk-V Duo S board support michael.opdenacker 2024-04-10 6:22 ` [PATCH v3 1/2] dt-bindings: riscv: add Milk-V Duo S board compatibles michael.opdenacker 2024-04-10 7:19 ` Inochi Amaoto 2024-04-10 7:55 ` Michael Opdenacker 2024-04-10 10:17 ` Inochi Amaoto 2024-04-10 6:22 ` [PATCH v3 2/2] riscv: dts: sophgo: add initial Milk-V Duo S board support michael.opdenacker
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox