diff mbox series

[1/2] riscv:dts:starfive:add framework dts

Message ID 20240923053621.1585972-2-sandie.cao@deepcomputing.io (mailing list archive)
State Handled Elsewhere
Headers show
Series add framework dts and config | expand

Checks

Context Check Description
conchuod/vmtest-for-next-PR fail PR summary
conchuod/patch-1-test-1 success .github/scripts/patches/tests/build_rv32_defconfig.sh took 130.74s
conchuod/patch-1-test-2 success .github/scripts/patches/tests/build_rv64_clang_allmodconfig.sh took 1283.70s
conchuod/patch-1-test-3 success .github/scripts/patches/tests/build_rv64_gcc_allmodconfig.sh took 1514.75s
conchuod/patch-1-test-4 success .github/scripts/patches/tests/build_rv64_nommu_k210_defconfig.sh took 20.21s
conchuod/patch-1-test-5 success .github/scripts/patches/tests/build_rv64_nommu_virt_defconfig.sh took 22.28s
conchuod/patch-1-test-6 warning .github/scripts/patches/tests/checkpatch.sh took 0.79s
conchuod/patch-1-test-7 fail .github/scripts/patches/tests/dtb_warn_rv64.sh took 42.79s
conchuod/patch-1-test-8 success .github/scripts/patches/tests/header_inline.sh took 0.00s
conchuod/patch-1-test-9 success .github/scripts/patches/tests/kdoc.sh took 0.60s
conchuod/patch-1-test-10 success .github/scripts/patches/tests/module_param.sh took 0.01s
conchuod/patch-1-test-11 success .github/scripts/patches/tests/verify_fixes.sh took 0.00s
conchuod/patch-1-test-12 success .github/scripts/patches/tests/verify_signedoff.sh took 0.03s

Commit Message

Sandie Cao Sept. 23, 2024, 5:36 a.m. UTC
Add dts to support RISC-V Framework Laptop 13 Mainboard. 

Signed-off-by: Sandie Cao <sandie.cao@deepcomputing.io>
---
 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

Comments

Conor Dooley Sept. 23, 2024, 9:37 a.m. UTC | #1
Hey,

Firstly your $subject should have a space after each :

On Mon, Sep 23, 2024 at 01:36:20PM +0800, Sandie Cao wrote:
> Add dts to support RISC-V Framework Laptop 13 Mainboard. 
> 
> Signed-off-by: Sandie Cao <sandie.cao@deepcomputing.io>
> ---
>  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
> 
> diff --git a/arch/riscv/boot/dts/starfive/Makefile b/arch/riscv/boot/dts/starfive/Makefile
> index 7a163a7d6ba3..ebc8966fde0c 100644
> --- a/arch/riscv/boot/dts/starfive/Makefile
> +++ b/arch/riscv/boot/dts/starfive/Makefile
> @@ -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?

> diff --git a/arch/riscv/boot/dts/starfive/jh7110-framework.dts b/arch/riscv/boot/dts/starfive/jh7110-framework.dts
> new file mode 100644
> index 000000000000..4da7ade5c8e7
> --- /dev/null
> +++ b/arch/riscv/boot/dts/starfive/jh7110-framework.dts
> @@ -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 <kernel@esmil.dk>
> + */
> +
> +/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.


> +};
> +
> +&gmac0 {
> +	status = "disabled";
> +};
> +
> +&gmac1 {
> +	status = "disabled";
> +};
> +
> +&usb0 {
> +	dr_mode = "host"; /*host or peripheral*/

What does the comment here mean?

Cheers,
Conor.

> +	status = "okay";
> +};
> +
> +&pwmdac {
> +	status = "disabled";
> +};
> +
> +
> +&pcie0 {
> +	status = "disabled";
> +};
> -- 
> 2.34.1
> 
> _______________________________________________
> linux-riscv mailing list
> linux-riscv@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-riscv
diff mbox series

Patch

diff --git a/arch/riscv/boot/dts/starfive/Makefile b/arch/riscv/boot/dts/starfive/Makefile
index 7a163a7d6ba3..ebc8966fde0c 100644
--- a/arch/riscv/boot/dts/starfive/Makefile
+++ b/arch/riscv/boot/dts/starfive/Makefile
@@ -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
diff --git a/arch/riscv/boot/dts/starfive/jh7110-framework.dts b/arch/riscv/boot/dts/starfive/jh7110-framework.dts
new file mode 100644
index 000000000000..4da7ade5c8e7
--- /dev/null
+++ b/arch/riscv/boot/dts/starfive/jh7110-framework.dts
@@ -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 <kernel@esmil.dk>
+ */
+
+/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";
+};