From nobody Wed Dec 17 10:02:20 2025 Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EF6A23D3B8; Thu, 10 Oct 2024 15:08:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.197 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728572898; cv=none; b=Vv0YuvAVG6f4vn1kY1i8+oz1FX+9+vRNkvdmiqsAJiyearslgzaT7axGp5JOvi7aYEIZy4fyxgngg3Gwyn0aJIST+lcSGi5xgC4Ea7yeHLuSJ2s2T0Qu/EL3ulHlKMP+dw2tyrMeLA+yhGdKpKlsUub6XWSirKzaMDQCkyWwYWU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728572898; c=relaxed/simple; bh=dLosNywBJ7Lee8nOYYUpr4AQkUC/E5LusguNX8FFw4A=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=pAosjvsaBRU99+PuGNtaIx3HDd5TiME9mTCMA6+wwXnDv0Eu7a8jS3kr0iaKwvyGm1tDcyjviQJ+NATALEz3cvjMOUUrerP8oLcxhWL7eTwiYEhjWK9B7+1F0yiXescY5jPg/FPI8zhP4h4EAb6Deu3WC82FNeSZRrCbXQLZB7A= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=k+cy53q3; arc=none smtp.client-ip=217.70.183.197 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="k+cy53q3" Received: by mail.gandi.net (Postfix) with ESMTPSA id E519E1C0002; Thu, 10 Oct 2024 15:08:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1728572887; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fqdCRYpUpWtmxoATzqfKvQ7Vf09Tqe7FVeasQf33ud4=; b=k+cy53q35OLyFbTyFYBQ//jALk6PBH18DJpyH2sY3ts1iHjqaQpo12zEsbCxXiUG/YrsTu e4iFSkNCYc3b+NtEhgo0C4+71izV7bw2LqHhpvW9LJHDczV5nwSd0VYobDkIXfOHIZKr66 /sskHOK9GXisLmywEEaCY86/oTE9j7mmp5h9fHsovbKW0hKWAxni5JWJsB0KHhPBkFsHuy BEr5Zy9aciD8Y8P8rO3+lb+bbEaM90ahS6hdgSSbOnaFFJzZTde/uPRXSyuW8Q2bq6Nh/g 7kq5/3OUkQu4WKZtI78oJVe5asnlrkEo+c5T/DH+qGQqDr8B3gbt2K9AdtoxiA== From: Thomas Bonnefille Date: Thu, 10 Oct 2024 17:07:06 +0200 Subject: [PATCH v5 1/2] riscv: dts: sophgo: Add initial SG2002 SoC device tree Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20241010-sg2002-v5-1-a0f2e582b932@bootlin.com> References: <20241010-sg2002-v5-0-a0f2e582b932@bootlin.com> In-Reply-To: <20241010-sg2002-v5-0-a0f2e582b932@bootlin.com> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Paul Walmsley , Chen Wang , Inochi Amaoto , Chao Wei , Conor Dooley Cc: Albert Ou , Palmer Dabbelt , Samuel Holland , Thomas Gleixner , Daniel Lezcano , Thomas Petazzoni , =?utf-8?q?Miqu=C3=A8l_Raynal?= , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-riscv@lists.infradead.org, Thomas Bonnefille X-Mailer: b4 0.14.2 X-GND-Sasl: thomas.bonnefille@bootlin.com Add initial device tree for the SG2002 RISC-V SoC by SOPHGO. Signed-off-by: Thomas Bonnefille Reviewed-by: Inochi Amaoto --- The commit adding the bindings for the compatible "sophgo,sg2002-clint" has been applied to Daniel Lezcano git tree. This commit may trigger the bots because of this missing binding. --- arch/riscv/boot/dts/sophgo/sg2002.dtsi | 42 ++++++++++++++++++++++++++++++= ++++ 1 file changed, 42 insertions(+) diff --git a/arch/riscv/boot/dts/sophgo/sg2002.dtsi b/arch/riscv/boot/dts/s= ophgo/sg2002.dtsi new file mode 100644 index 0000000000000000000000000000000000000000..242fde84443f0d6a2c8476666df= a3d72727071b1 --- /dev/null +++ b/arch/riscv/boot/dts/sophgo/sg2002.dtsi @@ -0,0 +1,42 @@ +// SPDX-License-Identifier: (GPL-2.0 OR MIT) +/* + * Copyright (C) 2024 Thomas Bonnefille + */ + +#include +#include +#include "cv18xx.dtsi" + +/ { + compatible =3D "sophgo,sg2002"; + + memory@80000000 { + device_type =3D "memory"; + reg =3D <0x80000000 0x10000000>; + }; + + soc { + pinctrl: pinctrl@3008000 { + compatible =3D "sophgo,sg2002-pinctrl"; + reg =3D <0x03001000 0x1000>, + <0x05027000 0x1000>; + reg-names =3D "sys", "rtc"; + }; + }; +}; + +&plic { + compatible =3D "sophgo,sg2002-plic", "thead,c900-plic"; +}; + +&clint { + compatible =3D "sophgo,sg2002-clint", "thead,c900-clint"; +}; + +&clk { + compatible =3D "sophgo,sg2000-clk"; +}; + +&sdhci0 { + compatible =3D "sophgo,sg2002-dwcmshc"; +}; --=20 2.47.0 From nobody Wed Dec 17 10:02:20 2025 Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9FC121C9DE5; Thu, 10 Oct 2024 15:08:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.197 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728572898; cv=none; b=Swv13MfQbb8QShnfuBoj5NOWjcKKXxYC6qRlwCcfRqitfTESpJeDg2S1F0k09TV4JAQHOEXbfD6XAF99g9yu56QCUxRQe+/rKTWeIh3EdbiXX1mF0HkOUqdKJBgcx1gwIUt/4eMsTFfZ3mmjp7j12L+JgziT+2Y2lY1rAGSpnLQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728572898; c=relaxed/simple; bh=wD4i9kj/9audO4B4bzXaWXVPo7h0jiAhECyhyOHq/1o=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=DWd4NyjPQy5NLLRZq0DNDNsY/FZPELZ+dou/+tf2G5OY4WAMgr0sLFDeVdp40eNETKErMTlvLlSRk8+Mt9FEnPAKKGlpy3IBKwaTH2B0dKd4TUQWCiHn9NuRotLOKnc7HzKybiQo4ntzUuivcpXJJ5bqZNZ7Gn8XS0RJpoO9Pdk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=iTf8Wn0a; arc=none smtp.client-ip=217.70.183.197 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="iTf8Wn0a" Received: by mail.gandi.net (Postfix) with ESMTPSA id DF13A1C0004; Thu, 10 Oct 2024 15:08:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1728572888; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0YNBiAIMY5vY73m87Shuq7HuEaUnsKbDGfj0sIKXoEg=; b=iTf8Wn0aGkGTEZdNtHdcMECbuLWCy9mXdN8rCdsruUa1+g4zBODdhyUXZoFRdvJDtvvt87 Nzh7HHBaWT8QXnm1/z49JFihNcJ9aQ/SCbpb0m93dkF68PnhvMnw0hQAOA2I0eQRYxm2Zb r/qPGrk8ixKWlIEZ7JTC95k5hWLIOW6iGrU4zuKwbakrqWd70lo5bfK4sUooS/8F9mcXmS wXoInCNNoehbvzwWOUf/yMVrVW+f0f0NxOCLWARhfkw89kNru5wURMmRmo13NxL+abQmvQ SA+wlS6riQ2M/mK+ZaNn/sJqwafhRdY8dbYNV122Emz+smEnn9NYVO0qeu3Z5Q== From: Thomas Bonnefille Date: Thu, 10 Oct 2024 17:07:07 +0200 Subject: [PATCH v5 2/2] riscv: dts: sophgo: Add LicheeRV Nano board device tree Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20241010-sg2002-v5-2-a0f2e582b932@bootlin.com> References: <20241010-sg2002-v5-0-a0f2e582b932@bootlin.com> In-Reply-To: <20241010-sg2002-v5-0-a0f2e582b932@bootlin.com> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Paul Walmsley , Chen Wang , Inochi Amaoto , Chao Wei , Conor Dooley Cc: Albert Ou , Palmer Dabbelt , Samuel Holland , Thomas Gleixner , Daniel Lezcano , Thomas Petazzoni , =?utf-8?q?Miqu=C3=A8l_Raynal?= , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-riscv@lists.infradead.org, Thomas Bonnefille X-Mailer: b4 0.14.2 X-GND-Sasl: thomas.bonnefille@bootlin.com LicheeRV Nano B [1] is an embedded development platform based on the SOPHGO SG2002 chip, the B(ase) version is deprived of Wifi/Bluetooth and Ethernet. Add only support for UART and SDHCI. Link: https://wiki.sipeed.com/hardware/en/lichee/RV_Nano/1_intro.html [1] Signed-off-by: Thomas Bonnefille Reviewed-by: Inochi Amaoto --- arch/riscv/boot/dts/sophgo/Makefile | 1 + .../boot/dts/sophgo/sg2002-licheerv-nano-b.dts | 95 ++++++++++++++++++= ++++ 2 files changed, 96 insertions(+) diff --git a/arch/riscv/boot/dts/sophgo/Makefile b/arch/riscv/boot/dts/soph= go/Makefile index 57ad82a61ea6fc25f72d0ade991e33feaa53266e..47d4243a8f35a7d5572dbf5ef98= 99297b908afde 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) +=3D cv1800b-milkv-duo.dtb dtb-$(CONFIG_ARCH_SOPHGO) +=3D cv1812h-huashan-pi.dtb +dtb-$(CONFIG_ARCH_SOPHGO) +=3D sg2002-licheerv-nano-b.dtb dtb-$(CONFIG_ARCH_SOPHGO) +=3D sg2042-milkv-pioneer.dtb diff --git a/arch/riscv/boot/dts/sophgo/sg2002-licheerv-nano-b.dts b/arch/r= iscv/boot/dts/sophgo/sg2002-licheerv-nano-b.dts new file mode 100644 index 0000000000000000000000000000000000000000..86a712b953a5acd5926120db613= 54243f5580a05 --- /dev/null +++ b/arch/riscv/boot/dts/sophgo/sg2002-licheerv-nano-b.dts @@ -0,0 +1,95 @@ +// SPDX-License-Identifier: (GPL-2.0 OR MIT) +/* + * Copyright (C) 2024 Thomas Bonnefille + */ + +/dts-v1/; + +#include "sg2002.dtsi" + +/ { + model =3D "LicheeRV Nano B"; + compatible =3D "sipeed,licheerv-nano-b", "sipeed,licheerv-nano", "sophgo,= sg2002"; + + aliases { + gpio0 =3D &gpio0; + gpio1 =3D &gpio1; + gpio2 =3D &gpio2; + gpio3 =3D &gpio3; + serial0 =3D &uart0; + serial1 =3D &uart1; + serial2 =3D &uart2; + serial3 =3D &uart3; + serial4 =3D &uart4; + }; + + chosen { + stdout-path =3D "serial0:115200n8"; + }; +}; + +&osc { + clock-frequency =3D <25000000>; +}; + +&pinctrl { + uart0_cfg: uart0-cfg { + uart0-pins { + pinmux =3D , + ; + bias-pull-up; + drive-strength-microamp =3D <10800>; + power-source =3D <3300>; + }; + }; + + sdhci0_cfg: sdhci0-cfg { + sdhci0-clk-pins { + pinmux =3D ; + bias-pull-up; + drive-strength-microamp =3D <16100>; + power-source =3D <3300>; + }; + + sdhci0-cmd-pins { + pinmux =3D ; + bias-pull-up; + drive-strength-microamp =3D <10800>; + power-source =3D <3300>; + }; + + sdhci0-data-pins { + pinmux =3D , + , + , + ; + bias-pull-up; + drive-strength-microamp =3D <10800>; + power-source =3D <3300>; + }; + + sdhci0-cd-pins { + pinmux =3D ; + bias-pull-up; + drive-strength-microamp =3D <10800>; + power-source =3D <3300>; + }; + }; +}; + +&sdhci0 { + pinctrl-0 =3D <&sdhci0_cfg>; + pinctrl-names =3D "default"; + status =3D "okay"; + bus-width =3D <4>; + no-1-8-v; + no-mmc; + no-sdio; + disable-wp; +}; + +&uart0 { + pinctrl-0 =3D <&uart0_cfg>; + pinctrl-names =3D "default"; + status =3D "okay"; +}; --=20 2.47.0