Skip to contentSkip to conversation

riscv:dts:starfive:add framework dts

PATCH In review Sandie Cao 2 participants 2 messages Sep 23, 2024

Subsystems (3)
lore
Share & tools
lore

Sandie Cao

author
#0 lore raw

PATCH 1/2 riscv:dts:starfive:add framework dts

Add dts to support RISC-V Framework Laptop 13 Mainboard.

---
 arch/riscv/boot/dts/starfive/Makefile         |  1 +
 .../boot/dts/starfive/jh7110-framework.dts    | 35 +++++++++++++++++++
 2 files changed, 36 insertions(+)
 create mode 100644 arch/riscv/boot/dts/starfive/jh7110-framework.dts
arch/riscv/boot/dts/starfive/Makefile +1 -0
index 7a163a7d6ba3..ebc8966fde0c 100644
@@ -12,3 +12,4 @@ dtb-$(CONFIG_ARCH_STARFIVE) += jh7110-milkv-mars.dtb
 dtb-$(CONFIG_ARCH_STARFIVE) += jh7110-pine64-star64.dtb
 dtb-$(CONFIG_ARCH_STARFIVE) += jh7110-starfive-visionfive-2-v1.2a.dtb
 dtb-$(CONFIG_ARCH_STARFIVE) += jh7110-starfive-visionfive-2-v1.3b.dtb
+dtb-$(CONFIG_ARCH_STARFIVE) += jh7110-framework.dtb
arch/riscv/boot/dts/starfive/jh7110-framework.dts new file +35 -0
new file mode 100644
index 000000000000..4da7ade5c8e7
@@ -0,0 +1,35 @@
+// SPDX-License-Identifier: GPL-2.0 OR MIT
+/*
+ * Copyright (C) 2022 StarFive Technology Co., Ltd.
+ * Copyright (C) 2022 Emil Renner Berthing <[email protected]>
+ */
+
+/dts-v1/;
+#include "jh7110-common.dtsi"
+
+/ {
+	model = "jh7110 framework";
+	compatible = "jh7110 framework", "starfive,jh7110";
+};
+
+&gmac0 {
+	status = "disabled";
+};
+
+&gmac1 {
+	status = "disabled";
+};
+
+&usb0 {
+	dr_mode = "host"; /*host or peripheral*/
+	status = "okay";
+};
+
+&pwmdac {
+	status = "disabled";
+};
+
+
+&pcie0 {
+	status = "disabled";
+};
Signature · 6 lines
2.34.1

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

Hey,

Firstly your $subject should have a space after each :

Quoted 14 lines · Sandie Cao

Add dts to support RISC-V Framework Laptop 13 Mainboard.

---
 arch/riscv/boot/dts/starfive/Makefile         |  1 +
 .../boot/dts/starfive/jh7110-framework.dts    | 35 +++++++++++++++++++
 2 files changed, 36 insertions(+)
 create mode 100644 arch/riscv/boot/dts/starfive/jh7110-framework.dts
arch/riscv/boot/dts/starfive/Makefile +0 -0
index 7a163a7d6ba3..ebc8966fde0c 100644

arch/riscv/boot/dts/starfive/Makefile dtb-$(CONFIG_ARCH_STARFIVE) += jh7110-milkv-mars.dtb · line 15

Quoted 4 lines
arch/riscv/boot/dts/starfive/Makefile +1 -0
@@ -12,3 +12,4 @@ dtb-$(CONFIG_ARCH_STARFIVE) += jh7110-milkv-mars.dtb
 dtb-$(CONFIG_ARCH_STARFIVE) += jh7110-pine64-star64.dtb
 dtb-$(CONFIG_ARCH_STARFIVE) += jh7110-starfive-visionfive-2-v1.2a.dtb
 dtb-$(CONFIG_ARCH_STARFIVE) += jh7110-starfive-visionfive-2-v1.3b.dtb
+dtb-$(CONFIG_ARCH_STARFIVE) += jh7110-framework.dtb

Can you add this in alphanumerical order please?

Quoted 8 lines
arch/riscv/boot/dts/starfive/jh7110-framework.dts new file +2 -0
new file mode 100644
index 000000000000..4da7ade5c8e7
@@ -0,0 +1,35 @@
+// SPDX-License-Identifier: GPL-2.0 OR MIT
+/*

arch/riscv/boot/dts/starfive/jh7110-framework.dts line 12

Quoted 10 lines
arch/riscv/boot/dts/starfive/jh7110-framework.dts new file +10 -0
+ * Copyright (C) 2022 StarFive Technology Co., Ltd.
+ * Copyright (C) 2022 Emil Renner Berthing <[email protected]>
+ */
+
+/dts-v1/;
+#include "jh7110-common.dtsi"
+
+/ {
+	model = "jh7110 framework";
+	compatible = "jh7110 framework", "starfive,jh7110";

"jh7110 framework" is not a real compatible (you need a vendor prefix
and no spaces) nor is it documented - which produces warnings:
arch/riscv/boot/dts/starfive/jh7110-framework.dtb: /: compatible: 'oneOf' conditional failed, one must be fixed:
'jh7110 framework' is not one of ['beagle,beaglev-starlight-jh7100-r0', 'starfive,visionfive-v1']
'jh7110 framework' is not one of ['milkv,mars', 'pine64,star64', 'starfive,visionfive-2-v1.2a', 'starfive,visionfive-2-v1.3b'] 'starfive,jh7100' was expected
from schema $id: http://devicetree.org/schemas/riscv/starfive.yaml#
arch/riscv/boot/dts/starfive/jh7110-framework.dtb: /: compatible:0: 'jh7110 framework' does not match '^[a-zA-Z0-9][a-zA-Z0-9,+\\-._/]+$'
from schema $id: http://devicetree.org/schemas/dt-core.yaml#
arch/riscv/boot/dts/starfive/jh7110-framework.dtb: /: failed to match any schema with compatible: ['jh7110 framework', 'starfive,jh7110']

Please run dtbs_check on future versions and fix reported warnings by documenting things in dt-bindings.
"jh7110 framework" isn't very specific, so if there's a model number attached to the mainboard that'd be good to have. The vendor in the vendor prefix should be deepcomputing, so you'll likely have to add a new vendor prefix for that.

The model field could also be improved, check out the visionfive 2 and see how that property was written there.

arch/riscv/boot/dts/starfive/jh7110-framework.dts line 24

Quoted 12 lines
arch/riscv/boot/dts/starfive/jh7110-framework.dts new file +12 -0
+};
+
+&gmac0 {
+	status = "disabled";
+};
+
+&gmac1 {
+	status = "disabled";
+};
+
+&usb0 {
+	dr_mode = "host"; /*host or peripheral*/

What does the comment here mean?

Cheers,
Conor.

Quoted 18 lines
arch/riscv/boot/dts/starfive/jh7110-framework.dts new file +11 -0
+	status = "okay";
+};
+
+&pwmdac {
+	status = "disabled";
+};
+
+
+&pcie0 {
+	status = "disabled";
+};
Signature · 6 lines
2.34.1

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