From nobody Wed Sep 17 11:59:16 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 18050C4167B for ; Tue, 20 Dec 2022 01:13:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232893AbiLTBNX convert rfc822-to-8bit (ORCPT ); Mon, 19 Dec 2022 20:13:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46710 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232880AbiLTBM6 (ORCPT ); Mon, 19 Dec 2022 20:12:58 -0500 Received: from ex01.ufhost.com (ex01.ufhost.com [61.152.239.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D95A811C15; Mon, 19 Dec 2022 17:12:56 -0800 (PST) Received: from EXMBX165.cuchost.com (unknown [175.102.18.54]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "EXMBX165", Issuer "EXMBX165" (not verified)) by ex01.ufhost.com (Postfix) with ESMTP id B428424E19A; Tue, 20 Dec 2022 09:12:55 +0800 (CST) Received: from EXMBX172.cuchost.com (172.16.6.92) by EXMBX165.cuchost.com (172.16.6.75) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Tue, 20 Dec 2022 09:12:55 +0800 Received: from ubuntu.localdomain (183.27.97.120) by EXMBX172.cuchost.com (172.16.6.92) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Tue, 20 Dec 2022 09:12:54 +0800 From: Hal Feng To: , CC: Conor Dooley , Palmer Dabbelt , "Rob Herring" , Krzysztof Kozlowski , Paul Walmsley , Albert Ou , Ben Dooks , Daniel Lezcano , "Thomas Gleixner" , Marc Zyngier , Stephen Boyd , Michael Turquette , "Philipp Zabel" , Linus Walleij , Emil Renner Berthing , Hal Feng , Subject: [PATCH v3 7/7] riscv: dts: starfive: Add StarFive JH7110 VisionFive 2 board device tree Date: Tue, 20 Dec 2022 09:12:47 +0800 Message-ID: <20221220011247.35560-8-hal.feng@starfivetech.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221220011247.35560-1-hal.feng@starfivetech.com> References: <20221220011247.35560-1-hal.feng@starfivetech.com> MIME-Version: 1.0 X-Originating-IP: [183.27.97.120] X-ClientProxiedBy: EXCAS066.cuchost.com (172.16.6.26) To EXMBX172.cuchost.com (172.16.6.92) X-YovoleRuleAgent: yovoleflag Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Emil Renner Berthing Add a minimal device tree for StarFive JH7110 VisionFive 2 board which has version A and version B. Support booting and basic clock/reset/pinctrl/uart drivers. Signed-off-by: Emil Renner Berthing Co-developed-by: Jianlong Huang Signed-off-by: Jianlong Huang Co-developed-by: Hal Feng Signed-off-by: Hal Feng Acked-by: Conor Dooley Suggested-by: Emil Renner Berthing --- arch/riscv/boot/dts/starfive/Makefile | 1 + .../jh7110-starfive-visionfive-2-va.dts | 13 ++ .../jh7110-starfive-visionfive-2-vb.dts | 13 ++ .../jh7110-starfive-visionfive-2.dtsi | 111 ++++++++++++++++++ 4 files changed, 138 insertions(+) create mode 100644 arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive= -2-va.dts create mode 100644 arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive= -2-vb.dts create mode 100644 arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive= -2.dtsi diff --git a/arch/riscv/boot/dts/starfive/Makefile b/arch/riscv/boot/dts/st= arfive/Makefile index 0ea1bc15ab30..79e925a4a227 100644 --- a/arch/riscv/boot/dts/starfive/Makefile +++ b/arch/riscv/boot/dts/starfive/Makefile @@ -1,2 +1,3 @@ # SPDX-License-Identifier: GPL-2.0 dtb-$(CONFIG_SOC_STARFIVE) +=3D jh7100-beaglev-starlight.dtb +dtb-$(CONFIG_SOC_STARFIVE) +=3D jh7110-starfive-visionfive-2-va.dtb jh7110= -starfive-visionfive-2-vb.dtb diff --git a/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2-va.d= ts b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2-va.dts new file mode 100644 index 000000000000..188d3fddbe88 --- /dev/null +++ b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2-va.dts @@ -0,0 +1,13 @@ +// SPDX-License-Identifier: GPL-2.0 OR MIT +/* + * Copyright (C) 2022 StarFive Technology Co., Ltd. + * Copyright (C) 2022 Emil Renner Berthing + */ + +/dts-v1/; +#include "jh7110-starfive-visionfive-2.dtsi" + +/ { + model =3D "StarFive VisionFive 2 VA"; + compatible =3D "starfive,visionfive-2-va", "starfive,jh7110"; +}; diff --git a/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2-vb.d= ts b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2-vb.dts new file mode 100644 index 000000000000..f75c10536f84 --- /dev/null +++ b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2-vb.dts @@ -0,0 +1,13 @@ +// SPDX-License-Identifier: GPL-2.0 OR MIT +/* + * Copyright (C) 2022 StarFive Technology Co., Ltd. + * Copyright (C) 2022 Emil Renner Berthing + */ + +/dts-v1/; +#include "jh7110-starfive-visionfive-2.dtsi" + +/ { + model =3D "StarFive VisionFive 2 VB"; + compatible =3D "starfive,visionfive-2-vb", "starfive,jh7110"; +}; diff --git a/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi= b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi new file mode 100644 index 000000000000..c60280b89c73 --- /dev/null +++ b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi @@ -0,0 +1,111 @@ +// SPDX-License-Identifier: GPL-2.0 OR MIT +/* + * Copyright (C) 2022 StarFive Technology Co., Ltd. + * Copyright (C) 2022 Emil Renner Berthing + */ + +/dts-v1/; +#include "jh7110.dtsi" +#include "jh7110-pinfunc.h" +#include + +/ { + aliases { + serial0 =3D &uart0; + }; + + chosen { + stdout-path =3D "serial0:115200n8"; + }; + + cpus { + timebase-frequency =3D <4000000>; + }; + + memory@40000000 { + device_type =3D "memory"; + reg =3D <0x0 0x40000000 0x1 0x0>; + }; + + gpio-restart { + compatible =3D "gpio-restart"; + gpios =3D <&gpio 35 GPIO_ACTIVE_HIGH>; + priority =3D <224>; + }; +}; + +&osc { + clock-frequency =3D <24000000>; +}; + +&rtc_osc { + clock-frequency =3D <32768>; +}; + +&gmac0_rmii_refin { + clock-frequency =3D <50000000>; +}; + +&gmac0_rgmii_rxin { + clock-frequency =3D <125000000>; +}; + +&gmac1_rmii_refin { + clock-frequency =3D <50000000>; +}; + +&gmac1_rgmii_rxin { + clock-frequency =3D <125000000>; +}; + +&i2stx_bclk_ext { + clock-frequency =3D <12288000>; +}; + +&i2stx_lrck_ext { + clock-frequency =3D <192000>; +}; + +&i2srx_bclk_ext { + clock-frequency =3D <12288000>; +}; + +&i2srx_lrck_ext { + clock-frequency =3D <192000>; +}; + +&tdm_ext { + clock-frequency =3D <49152000>; +}; + +&mclk_ext { + clock-frequency =3D <12288000>; +}; + +&uart0 { + pinctrl-names =3D "default"; + pinctrl-0 =3D <&uart0_pins>; + status =3D "okay"; +}; + +&gpio { + uart0_pins: uart0-0 { + tx-pins { + pinmux =3D ; + bias-disable; + drive-strength =3D <12>; + input-disable; + input-schmitt-disable; + slew-rate =3D <0>; + }; + + rx-pins { + pinmux =3D ; + bias-disable; /* external pull-up */ + drive-strength =3D <2>; + input-enable; + input-schmitt-enable; + slew-rate =3D <0>; + }; + }; +}; --=20 2.38.1