* [PATCH v5 0/2] add initial Milk-V Duo S board support
@ 2024-04-17 6:53 michael.opdenacker
2024-04-17 6:53 ` [PATCH v5 1/2] dt-bindings: riscv: add Milk-V Duo S board compatibles michael.opdenacker
` (3 more replies)
0 siblings, 4 replies; 15+ messages in thread
From: michael.opdenacker @ 2024-04-17 6:53 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 on April 17, 2024.
- 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/sg2000-milkv-duos.dts | 34 +++++++++++++++++++
3 files changed, 36 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] 15+ messages in thread* [PATCH v5 1/2] dt-bindings: riscv: add Milk-V Duo S board compatibles 2024-04-17 6:53 [PATCH v5 0/2] add initial Milk-V Duo S board support michael.opdenacker @ 2024-04-17 6:53 ` michael.opdenacker 2024-04-17 9:25 ` Inochi Amaoto 2024-04-17 6:53 ` [PATCH v5 2/2] riscv: dts: sophgo: add initial Milk-V Duo S board support michael.opdenacker ` (2 subsequent siblings) 3 siblings, 1 reply; 15+ messages in thread From: michael.opdenacker @ 2024-04-17 6:53 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] 15+ messages in thread
* Re: [PATCH v5 1/2] dt-bindings: riscv: add Milk-V Duo S board compatibles 2024-04-17 6:53 ` [PATCH v5 1/2] dt-bindings: riscv: add Milk-V Duo S board compatibles michael.opdenacker @ 2024-04-17 9:25 ` Inochi Amaoto 0 siblings, 0 replies; 15+ messages in thread From: Inochi Amaoto @ 2024-04-17 9:25 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 17, 2024 at 08:53:10AM GMT, 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 Please ADD CPU COMPATIBLE, AND NOT JUST USE CV1800B. I do not want to say this again. > - 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 [flat|nested] 15+ messages in thread
* [PATCH v5 2/2] riscv: dts: sophgo: add initial Milk-V Duo S board support 2024-04-17 6:53 [PATCH v5 0/2] add initial Milk-V Duo S board support michael.opdenacker 2024-04-17 6:53 ` [PATCH v5 1/2] dt-bindings: riscv: add Milk-V Duo S board compatibles michael.opdenacker @ 2024-04-17 6:53 ` michael.opdenacker 2024-04-17 9:34 ` Inochi Amaoto 2024-04-17 9:19 ` [PATCH v5 0/2] " Emil Renner Berthing 2024-04-18 15:43 ` Rob Herring 3 siblings, 1 reply; 15+ messages in thread From: michael.opdenacker @ 2024-04-17 6:53 UTC (permalink / raw) To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen Wang, Inochi Amaoto, Paul Walmsley, Palmer Dabbelt, Albert Ou 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, making it possible 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 | 34 +++++++++++++++++++ 2 files changed, 35 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..c1ecf97d5e93 --- /dev/null +++ b/arch/riscv/boot/dts/sophgo/sg2000-milkv-duos.dts @@ -0,0 +1,34 @@ +// SPDX-License-Identifier: (GPL-2.0 OR MIT) +/* + * Copyright (C) 2024 Michael Opdenacker <michael.opdenacker@bootlin.com> + */ + +/dts-v1/; + +#include "cv1812h.dtsi" + +/ { + model = "Milk-V Duo S"; + compatible = "milkv,duos", "sophgo,cv1812h"; + + aliases { + serial0 = &uart0; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; + + memory@80000000 { + device_type = "memory"; + reg = <0x80000000 0x20000000>; + }; +}; + +&osc { + clock-frequency = <25000000>; +}; + +&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] 15+ messages in thread
* Re: [PATCH v5 2/2] riscv: dts: sophgo: add initial Milk-V Duo S board support 2024-04-17 6:53 ` [PATCH v5 2/2] riscv: dts: sophgo: add initial Milk-V Duo S board support michael.opdenacker @ 2024-04-17 9:34 ` Inochi Amaoto 2024-04-17 15:06 ` Conor Dooley 2024-04-21 5:57 ` Michael Opdenacker 0 siblings, 2 replies; 15+ messages in thread From: Inochi Amaoto @ 2024-04-17 9:34 UTC (permalink / raw) To: michael.opdenacker, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen Wang, Inochi Amaoto, Paul Walmsley, Palmer Dabbelt, Albert Ou Cc: devicetree, linux-riscv, linux-kernel On Wed, Apr 17, 2024 at 08:53:11AM GMT, michael.opdenacker@bootlin.com wrote: > 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, > making it possible 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 | 34 +++++++++++++++++++ > 2 files changed, 35 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..c1ecf97d5e93 > --- /dev/null > +++ b/arch/riscv/boot/dts/sophgo/sg2000-milkv-duos.dts > @@ -0,0 +1,34 @@ > +// SPDX-License-Identifier: (GPL-2.0 OR MIT) > +/* > + * Copyright (C) 2024 Michael Opdenacker <michael.opdenacker@bootlin.com> > + */ > + > +/dts-v1/; > + > +#include "cv1812h.dtsi" > + > +/ { > + model = "Milk-V Duo S"; > + compatible = "milkv,duos", "sophgo,cv1812h"; > + > + aliases { > + serial0 = &uart0; > + }; > + > + chosen { > + stdout-path = "serial0:115200n8"; > + }; > + > + memory@80000000 { > + device_type = "memory"; > + reg = <0x80000000 0x20000000>; > + }; Add a cpu specific file, and move this to it. > +}; > + > +&osc { > + clock-frequency = <25000000>; > +}; > + > +&uart0 { > + status = "okay"; > +}; > -- > 2.34.1 > Add necessary DT node in the cpu specific file. (clint, plic and clk). You also need to rebase your patch based on sophgo/for-next. _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v5 2/2] riscv: dts: sophgo: add initial Milk-V Duo S board support 2024-04-17 9:34 ` Inochi Amaoto @ 2024-04-17 15:06 ` Conor Dooley 2024-04-17 22:29 ` Inochi Amaoto 2024-04-21 5:57 ` Michael Opdenacker 1 sibling, 1 reply; 15+ messages in thread From: Conor Dooley @ 2024-04-17 15:06 UTC (permalink / raw) To: Inochi Amaoto Cc: michael.opdenacker, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen Wang, Paul Walmsley, Palmer Dabbelt, Albert Ou, devicetree, linux-riscv, linux-kernel [-- Attachment #1.1: Type: text/plain, Size: 2331 bytes --] On Wed, Apr 17, 2024 at 05:34:44PM +0800, Inochi Amaoto wrote: > On Wed, Apr 17, 2024 at 08:53:11AM GMT, michael.opdenacker@bootlin.com wrote: > > 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, > > making it possible 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 | 34 +++++++++++++++++++ > > 2 files changed, 35 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..c1ecf97d5e93 > > --- /dev/null > > +++ b/arch/riscv/boot/dts/sophgo/sg2000-milkv-duos.dts > > @@ -0,0 +1,34 @@ > > +// SPDX-License-Identifier: (GPL-2.0 OR MIT) > > +/* > > + * Copyright (C) 2024 Michael Opdenacker <michael.opdenacker@bootlin.com> > > + */ > > + > > +/dts-v1/; > > + > > +#include "cv1812h.dtsi" > > + > > +/ { > > + model = "Milk-V Duo S"; > > + compatible = "milkv,duos", "sophgo,cv1812h"; > > + > > + aliases { > > + serial0 = &uart0; > > + }; > > + > > + chosen { > > + stdout-path = "serial0:115200n8"; > > + }; > > + > > + memory@80000000 { > > + device_type = "memory"; > > + reg = <0x80000000 0x20000000>; > > + }; > > Add a cpu specific file, and move this to it. I take it that the memory is integrated into the package then? [-- Attachment #1.2: signature.asc --] [-- Type: application/pgp-signature, Size: 228 bytes --] [-- Attachment #2: Type: text/plain, Size: 161 bytes --] _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v5 2/2] riscv: dts: sophgo: add initial Milk-V Duo S board support 2024-04-17 15:06 ` Conor Dooley @ 2024-04-17 22:29 ` Inochi Amaoto 0 siblings, 0 replies; 15+ messages in thread From: Inochi Amaoto @ 2024-04-17 22:29 UTC (permalink / raw) To: Conor Dooley, Inochi Amaoto Cc: michael.opdenacker, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen Wang, Paul Walmsley, Palmer Dabbelt, Albert Ou, devicetree, linux-riscv, linux-kernel On Wed, Apr 17, 2024 at 04:06:29PM GMT, Conor Dooley wrote: > On Wed, Apr 17, 2024 at 05:34:44PM +0800, Inochi Amaoto wrote: > > On Wed, Apr 17, 2024 at 08:53:11AM GMT, michael.opdenacker@bootlin.com wrote: > > > 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, > > > making it possible 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 | 34 +++++++++++++++++++ > > > 2 files changed, 35 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..c1ecf97d5e93 > > > --- /dev/null > > > +++ b/arch/riscv/boot/dts/sophgo/sg2000-milkv-duos.dts > > > @@ -0,0 +1,34 @@ > > > +// SPDX-License-Identifier: (GPL-2.0 OR MIT) > > > +/* > > > + * Copyright (C) 2024 Michael Opdenacker <michael.opdenacker@bootlin.com> > > > + */ > > > + > > > +/dts-v1/; > > > + > > > +#include "cv1812h.dtsi" > > > + > > > +/ { > > > + model = "Milk-V Duo S"; > > > + compatible = "milkv,duos", "sophgo,cv1812h"; > > > + > > > + aliases { > > > + serial0 = &uart0; > > > + }; > > > + > > > + chosen { > > > + stdout-path = "serial0:115200n8"; > > > + }; > > > + > > > + memory@80000000 { > > > + device_type = "memory"; > > > + reg = <0x80000000 0x20000000>; > > > + }; > > > > Add a cpu specific file, and move this to it. > > I take it that the memory is integrated into the package then? Yes, of course. _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v5 2/2] riscv: dts: sophgo: add initial Milk-V Duo S board support 2024-04-17 9:34 ` Inochi Amaoto 2024-04-17 15:06 ` Conor Dooley @ 2024-04-21 5:57 ` Michael Opdenacker 2024-04-21 6:30 ` Inochi Amaoto 1 sibling, 1 reply; 15+ messages in thread From: Michael Opdenacker @ 2024-04-21 5:57 UTC (permalink / raw) To: Inochi Amaoto, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen Wang, Paul Walmsley, Palmer Dabbelt, Albert Ou Cc: michael.opdenacker, devicetree, linux-riscv, linux-kernel Hi Inochi Thanks for your advice! On 4/17/24 at 11:34, Inochi Amaoto wrote: > On Wed, Apr 17, 2024 at 08:53:11AM GMT, michael.opdenacker@bootlin.com wrote: >> 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, >> making it possible 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 | 34 +++++++++++++++++++ >> 2 files changed, 35 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..c1ecf97d5e93 >> --- /dev/null >> +++ b/arch/riscv/boot/dts/sophgo/sg2000-milkv-duos.dts >> @@ -0,0 +1,34 @@ >> +// SPDX-License-Identifier: (GPL-2.0 OR MIT) >> +/* >> + * Copyright (C) 2024 Michael Opdenacker <michael.opdenacker@bootlin.com> >> + */ >> + >> +/dts-v1/; >> + >> +#include "cv1812h.dtsi" >> + >> +/ { >> + model = "Milk-V Duo S"; >> + compatible = "milkv,duos", "sophgo,cv1812h"; >> + >> + aliases { >> + serial0 = &uart0; >> + }; >> + >> + chosen { >> + stdout-path = "serial0:115200n8"; >> + }; >> + >> + memory@80000000 { >> + device_type = "memory"; >> + reg = <0x80000000 0x20000000>; >> + }; > Add a cpu specific file, and move this to it. Now that I'm including "cv1812h.dtsi", which has the same structure, all I need is to change the reg setting to have 512 MB of RAM instead of 256MB, right? See the V6 I'm sending soon. > >> +}; >> + >> +&osc { >> + clock-frequency = <25000000>; >> +}; >> + >> +&uart0 { >> + status = "okay"; >> +}; >> -- >> 2.34.1 >> > Add necessary DT node in the cpu specific file. (clint, > plic and clk). You also need to rebase your patch based > on sophgo/for-next. Same here, cv1812h.dtsi already configures &clint, &plic and &clk, so it seems to me I don't need to make changes again here. At least the board boots fine for me as it is. 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] 15+ messages in thread
* Re: [PATCH v5 2/2] riscv: dts: sophgo: add initial Milk-V Duo S board support 2024-04-21 5:57 ` Michael Opdenacker @ 2024-04-21 6:30 ` Inochi Amaoto 2024-04-23 6:11 ` Michael Opdenacker 0 siblings, 1 reply; 15+ messages in thread From: Inochi Amaoto @ 2024-04-21 6:30 UTC (permalink / raw) To: Michael Opdenacker, Inochi Amaoto, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen Wang, Paul Walmsley, Palmer Dabbelt, Albert Ou Cc: devicetree, linux-riscv, linux-kernel On Sun, Apr 21, 2024 at 07:57:01AM GMT, Michael Opdenacker wrote: > Hi Inochi > > Thanks for your advice! > > On 4/17/24 at 11:34, Inochi Amaoto wrote: > > On Wed, Apr 17, 2024 at 08:53:11AM GMT, michael.opdenacker@bootlin.com wrote: > > > 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, > > > making it possible 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 | 34 +++++++++++++++++++ > > > 2 files changed, 35 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..c1ecf97d5e93 > > > --- /dev/null > > > +++ b/arch/riscv/boot/dts/sophgo/sg2000-milkv-duos.dts > > > @@ -0,0 +1,34 @@ > > > +// SPDX-License-Identifier: (GPL-2.0 OR MIT) > > > +/* > > > + * Copyright (C) 2024 Michael Opdenacker <michael.opdenacker@bootlin.com> > > > + */ > > > + > > > +/dts-v1/; > > > + > > > +#include "cv1812h.dtsi" > > > + > > > +/ { > > > + model = "Milk-V Duo S"; > > > + compatible = "milkv,duos", "sophgo,cv1812h"; > > > + > > > + aliases { > > > + serial0 = &uart0; > > > + }; > > > + > > > + chosen { > > > + stdout-path = "serial0:115200n8"; > > > + }; > > > + > > > + memory@80000000 { > > > + device_type = "memory"; > > > + reg = <0x80000000 0x20000000>; > > > + }; > > Add a cpu specific file, and move this to it. > > Now that I'm including "cv1812h.dtsi", which has the same structure, all I > need is to change the reg setting to have 512 MB of RAM instead of 256MB, > right? See the V6 I'm sending soon. > No, Duo S does not use cv1812h, in any means. I just told you to use cv1812h for local test. If you want to upstream Duo S, you must add the right cpu compatibles and necessary nodes. These two are different things. > > > > > +}; > > > + > > > +&osc { > > > + clock-frequency = <25000000>; > > > +}; > > > + > > > +&uart0 { > > > + status = "okay"; > > > +}; > > > -- > > > 2.34.1 > > > > > Add necessary DT node in the cpu specific file. (clint, > > plic and clk). You also need to rebase your patch based > > on sophgo/for-next. > > Same here, cv1812h.dtsi already configures &clint, &plic and &clk, so it > seems to me I don't need to make changes again here. At least the board > boots fine for me as it is. > 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] 15+ messages in thread
* Re: [PATCH v5 2/2] riscv: dts: sophgo: add initial Milk-V Duo S board support 2024-04-21 6:30 ` Inochi Amaoto @ 2024-04-23 6:11 ` Michael Opdenacker 2024-04-23 7:57 ` Thomas Bonnefille 2024-04-23 8:24 ` Inochi Amaoto 0 siblings, 2 replies; 15+ messages in thread From: Michael Opdenacker @ 2024-04-23 6:11 UTC (permalink / raw) To: Inochi Amaoto, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen Wang, Paul Walmsley, Palmer Dabbelt, Albert Ou Cc: michael.opdenacker, devicetree, linux-riscv, linux-kernel Hi Inochi, Thanks for the advice. On 4/21/24 at 08:30, Inochi Amaoto wrote: > On Sun, Apr 21, 2024 at 07:57:01AM GMT, Michael Opdenacker wrote: > +++ b/arch/riscv/boot/dts/sophgo/sg2000-milkv-duos.dts > @@ -0,0 +1,34 @@ > +// SPDX-License-Identifier: (GPL-2.0 OR MIT) > +/* > + * Copyright (C) 2024 Michael Opdenacker <michael.opdenacker@bootlin.com> > + */ > + > +/dts-v1/; > + > +#include "cv1812h.dtsi" > + > +/ { > + model = "Milk-V Duo S"; > + compatible = "milkv,duos", "sophgo,cv1812h"; > + > + aliases { > + serial0 = &uart0; > + }; > + > + chosen { > + stdout-path = "serial0:115200n8"; > + }; > + > + memory@80000000 { > + device_type = "memory"; > + reg = <0x80000000 0x20000000>; > + }; >>> Add a cpu specific file, and move this to it. >> Now that I'm including "cv1812h.dtsi", which has the same structure, all I >> need is to change the reg setting to have 512 MB of RAM instead of 256MB, >> right? See the V6 I'm sending soon. >> > No, Duo S does not use cv1812h, in any means. I just told you to use > cv1812h for local test. If you want to upstream Duo S, you must add > the right cpu compatibles and necessary nodes. These two are different > things. So, do you mean I should create a new "sophgo,sg2000" compatible, together with a new "sg2000.dtsi" (or "sg200x.dtsi"?) file? Could this file include "cv18xx.dtsi"? By the way, where's the best source of information about the Sophgo sg2000 and sg2002 processors? Even the Sophgo website doesn't seem to have them :-/ . It just mentions the CV18xx ones. Thanks again 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] 15+ messages in thread
* Re: [PATCH v5 2/2] riscv: dts: sophgo: add initial Milk-V Duo S board support 2024-04-23 6:11 ` Michael Opdenacker @ 2024-04-23 7:57 ` Thomas Bonnefille 2024-04-23 8:24 ` Inochi Amaoto 1 sibling, 0 replies; 15+ messages in thread From: Thomas Bonnefille @ 2024-04-23 7:57 UTC (permalink / raw) To: Michael Opdenacker, Inochi Amaoto, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen Wang, Paul Walmsley, Palmer Dabbelt, Albert Ou Cc: devicetree, linux-riscv, linux-kernel Hello Michael, > By the way, where's the best source of information about the Sophgo > sg2000 and sg2002 processors? Even the Sophgo website doesn't seem to > have them :-/ . It just mentions the CV18xx ones. The best source of information I found for the Sophgo SG2002 and SG200 is this Github repository from Sophgo : https://github.com/sophgo/sophgo-doc It contains the Technical Reference Manual for the Sophgo SG2000, SG2002 and SG2042. _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v5 2/2] riscv: dts: sophgo: add initial Milk-V Duo S board support 2024-04-23 6:11 ` Michael Opdenacker 2024-04-23 7:57 ` Thomas Bonnefille @ 2024-04-23 8:24 ` Inochi Amaoto 1 sibling, 0 replies; 15+ messages in thread From: Inochi Amaoto @ 2024-04-23 8:24 UTC (permalink / raw) To: Michael Opdenacker, Inochi Amaoto, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen Wang, Paul Walmsley, Palmer Dabbelt, Albert Ou Cc: devicetree, linux-riscv, linux-kernel On Tue, Apr 23, 2024 at 08:11:29AM GMT, Michael Opdenacker wrote: > Hi Inochi, > > Thanks for the advice. > > On 4/21/24 at 08:30, Inochi Amaoto wrote: > > On Sun, Apr 21, 2024 at 07:57:01AM GMT, Michael Opdenacker wrote: > > +++ b/arch/riscv/boot/dts/sophgo/sg2000-milkv-duos.dts > > @@ -0,0 +1,34 @@ > > +// SPDX-License-Identifier: (GPL-2.0 OR MIT) > > +/* > > + * Copyright (C) 2024 Michael Opdenacker <michael.opdenacker@bootlin.com> > > + */ > > + > > +/dts-v1/; > > + > > +#include "cv1812h.dtsi" > > + > > +/ { > > + model = "Milk-V Duo S"; > > + compatible = "milkv,duos", "sophgo,cv1812h"; > > + > > + aliases { > > + serial0 = &uart0; > > + }; > > + > > + chosen { > > + stdout-path = "serial0:115200n8"; > > + }; > > + > > + memory@80000000 { > > + device_type = "memory"; > > + reg = <0x80000000 0x20000000>; > > + }; > > > > Add a cpu specific file, and move this to it. > > > Now that I'm including "cv1812h.dtsi", which has the same structure, all I > > > need is to change the reg setting to have 512 MB of RAM instead of 256MB, > > > right? See the V6 I'm sending soon. > > > > > No, Duo S does not use cv1812h, in any means. I just told you to use > > cv1812h for local test. If you want to upstream Duo S, you must add > > the right cpu compatibles and necessary nodes. These two are different > > things. > > So, do you mean I should create a new "sophgo,sg2000" compatible, together > with a new "sg2000.dtsi" (or "sg200x.dtsi"?) file? Could this file include > "cv18xx.dtsi"? > Right. For the second question, it must. "cv18xx.dtsi" is the common file for the whole series. You can check the existed cpu file in sophgo upstream repository: https://github.com/sophgo/linux/tree/for-next. > By the way, where's the best source of information about the Sophgo sg2000 > and sg2002 processors? Even the Sophgo website doesn't seem to have them :-/ > . It just mentions the CV18xx ones. > In additional to the doc mentioned by Thomas, I think you may need to check Duo docs from milkv: https://github.com/milkv-duo/duo-files. It contains all you need for Duo S. > Thanks again > 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] 15+ messages in thread
* Re: [PATCH v5 0/2] add initial Milk-V Duo S board support 2024-04-17 6:53 [PATCH v5 0/2] add initial Milk-V Duo S board support michael.opdenacker 2024-04-17 6:53 ` [PATCH v5 1/2] dt-bindings: riscv: add Milk-V Duo S board compatibles michael.opdenacker 2024-04-17 6:53 ` [PATCH v5 2/2] riscv: dts: sophgo: add initial Milk-V Duo S board support michael.opdenacker @ 2024-04-17 9:19 ` Emil Renner Berthing 2024-04-21 5:58 ` Michael Opdenacker 2024-04-18 15:43 ` Rob Herring 3 siblings, 1 reply; 15+ messages in thread From: Emil Renner Berthing @ 2024-04-17 9:19 UTC (permalink / raw) To: michael.opdenacker, Paul Walmsley, Palmer Dabbelt, Albert Ou, Chen Wang, Inochi Amaoto Cc: linux-riscv michael.opdenacker@ wrote: > 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 on April 17, 2024. Hi Michael. Sorry for the late reply. It seems to me like spaces are usually repaced by dashes (-'s) in device trees, so I would have expected milkv,duo-s and sg2000-milkv-duo-s.dts so it's not confused with a Milk-V Duos board. /Emil > > - 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/sg2000-milkv-duos.dts | 34 +++++++++++++++++++ > 3 files changed, 36 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 _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v5 0/2] add initial Milk-V Duo S board support 2024-04-17 9:19 ` [PATCH v5 0/2] " Emil Renner Berthing @ 2024-04-21 5:58 ` Michael Opdenacker 0 siblings, 0 replies; 15+ messages in thread From: Michael Opdenacker @ 2024-04-21 5:58 UTC (permalink / raw) To: Emil Renner Berthing, Paul Walmsley, Palmer Dabbelt, Albert Ou, Chen Wang, Inochi Amaoto Cc: michael.opdenacker, linux-riscv Hi Emil On 4/17/24 at 11:19, Emil Renner Berthing wrote: > michael.opdenacker@ wrote: >> 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 on April 17, 2024. > Hi Michael. > > Sorry for the late reply. It seems to me like spaces are usually repaced by > dashes (-'s) in device trees, so I would have expected milkv,duo-s and > sg2000-milkv-duo-s.dts so it's not confused with a Milk-V Duos board. > > /Emil Good to know, many thanks! I've just done that in my V6 series. 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] 15+ messages in thread
* Re: [PATCH v5 0/2] add initial Milk-V Duo S board support 2024-04-17 6:53 [PATCH v5 0/2] add initial Milk-V Duo S board support michael.opdenacker ` (2 preceding siblings ...) 2024-04-17 9:19 ` [PATCH v5 0/2] " Emil Renner Berthing @ 2024-04-18 15:43 ` Rob Herring 3 siblings, 0 replies; 15+ messages in thread From: Rob Herring @ 2024-04-18 15:43 UTC (permalink / raw) To: michael.opdenacker Cc: Albert Ou, Inochi Amaoto, Paul Walmsley, Palmer Dabbelt, linux-riscv, Chen Wang On Wed, 17 Apr 2024 08:53:09 +0200, michael.opdenacker@bootlin.com wrote: > 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 on April 17, 2024. > > - 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/sg2000-milkv-duos.dts | 34 +++++++++++++++++++ > 3 files changed, 36 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 > > 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 New warnings running 'make CHECK_DTBS=y sophgo/sg2000-milkv-duos.dtb' for 20240417065311.3881023-1-michael.opdenacker@bootlin.com: arch/riscv/boot/dts/sophgo/sg2000-milkv-duos.dtb: /: compatible: 'oneOf' conditional failed, one must be fixed: 'milkv,duos' is not one of ['sophgo,huashan-pi'] 'milkv,duos' is not one of ['milkv,pioneer'] 'sophgo,cv1800b' was expected 'sophgo,sg2042' was expected from schema $id: http://devicetree.org/schemas/riscv/sophgo.yaml# _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv ^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2024-04-23 8:24 UTC | newest] Thread overview: 15+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2024-04-17 6:53 [PATCH v5 0/2] add initial Milk-V Duo S board support michael.opdenacker 2024-04-17 6:53 ` [PATCH v5 1/2] dt-bindings: riscv: add Milk-V Duo S board compatibles michael.opdenacker 2024-04-17 9:25 ` Inochi Amaoto 2024-04-17 6:53 ` [PATCH v5 2/2] riscv: dts: sophgo: add initial Milk-V Duo S board support michael.opdenacker 2024-04-17 9:34 ` Inochi Amaoto 2024-04-17 15:06 ` Conor Dooley 2024-04-17 22:29 ` Inochi Amaoto 2024-04-21 5:57 ` Michael Opdenacker 2024-04-21 6:30 ` Inochi Amaoto 2024-04-23 6:11 ` Michael Opdenacker 2024-04-23 7:57 ` Thomas Bonnefille 2024-04-23 8:24 ` Inochi Amaoto 2024-04-17 9:19 ` [PATCH v5 0/2] " Emil Renner Berthing 2024-04-21 5:58 ` Michael Opdenacker 2024-04-18 15:43 ` Rob Herring
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox