From patchwork Wed Jun 12 08:02:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Bonnefille X-Patchwork-Id: 13694611 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8520AC41513 for ; Wed, 12 Jun 2024 08:06:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=cavR6gLGVjHV9oIiCBYSVY4Qpn6jOulzdL2LeDGnr2A=; b=STxnnd3xVbpK2f Zm3HjKjoCyNqlr6Xtz/yP9tjOvTNjX7m+IOw6jDxShRZ94HqRqFLpa17+EZKYkte139Ox3NlD0y1+ uh3USc+tzrSNRUukIWvJBvvpTc7tpsG/prCdrx3t4NVSeLL3BlQfby3ODIyBOcldbjdfGDzG/mR84 Ht6JeLLsenbbDXM9BegcAJNlOeDhLP+NrZPObL99DmQ3y9KBSMwxxz179G32eSTkjI1vC9piueyXS QLIGiJwU4VXYTx5mebwlZddRwiXI7lzbZlws3Zj6WTy8V4XV+tL4vDvVnh8aDkKxSC32EbiStGufo 3Hc73aoXAHSCF0ZZEzqw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sHIzf-0000000Bb3W-1von; Wed, 12 Jun 2024 08:06:07 +0000 Received: from relay5-d.mail.gandi.net ([2001:4b98:dc4:8::225]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sHIzW-0000000BaxC-3fOd for linux-riscv@lists.infradead.org; Wed, 12 Jun 2024 08:06:02 +0000 Received: by mail.gandi.net (Postfix) with ESMTPSA id 929BD1C0002; Wed, 12 Jun 2024 08:05:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1718179557; 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=8cLMXjvfEqyMBXrMbdMH+tIHzjtRz2d2ko71kBeiLcI=; b=iIm6xzSt5Gxk05vhA3vKbOj/Flg8tbzPp3QN/cKBogYJuvcs37ugqloTIENU+/oT3ZpNc4 HWZHCpzucQtoxxdCoqIFz5pGwI7vySAfiprEHOLDixuuNo+9axTqW/OVPeZiyhJWa5GMA0 gQyoWAuE4m5CEuCA7j/IiEnYNsTix7n7eELU9kotTX6pP23kq2aZ5aYGBKdbQe21uAs90U kVFSHIhvJLSE+0XgQEic9+saaH+oyhVgTZP+49wE875jsA2yNjr+1rGlPynliNV9yGMap3 hnbV1Qv05b/PW68ggH7C1rxpImn/SNThR6Y5waYvlal4R8LMAEjMnFFeGBaPHg== From: Thomas Bonnefille Date: Wed, 12 Jun 2024 10:02:36 +0200 Subject: [PATCH v2 6/6] riscv: dts: sophgo: Add LicheeRV Nano board device tree MIME-Version: 1.0 Message-Id: <20240612-sg2002-v2-6-19a585af6846@bootlin.com> References: <20240612-sg2002-v2-0-19a585af6846@bootlin.com> In-Reply-To: <20240612-sg2002-v2-0-19a585af6846@bootlin.com> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Paul Walmsley , Chen Wang , Inochi Amaoto , Chao Wei Cc: Albert Ou , Palmer Dabbelt , Samuel Holland , Thomas Gleixner , Daniel Lezcano , Thomas Petazzoni , =?utf-8?q?Miqu=C3=A8l_Ray?= =?utf-8?q?nal?= , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-riscv@lists.infradead.org, Thomas Bonnefille X-Mailer: b4 0.13.0 X-GND-Sasl: thomas.bonnefille@bootlin.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240612_010559_232972_7E1C8930 X-CRM114-Status: GOOD ( 11.56 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org 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 --- arch/riscv/boot/dts/sophgo/Makefile | 1 + .../boot/dts/sophgo/sg2002-licheerv-nano-b.dts | 53 ++++++++++++++++++++++ 2 files changed, 54 insertions(+) diff --git a/arch/riscv/boot/dts/sophgo/Makefile b/arch/riscv/boot/dts/sophgo/Makefile index 57ad82a61ea6..47d4243a8f35 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) += sg2002-licheerv-nano-b.dtb dtb-$(CONFIG_ARCH_SOPHGO) += sg2042-milkv-pioneer.dtb diff --git a/arch/riscv/boot/dts/sophgo/sg2002-licheerv-nano-b.dts b/arch/riscv/boot/dts/sophgo/sg2002-licheerv-nano-b.dts new file mode 100644 index 000000000000..d011fb15b097 --- /dev/null +++ b/arch/riscv/boot/dts/sophgo/sg2002-licheerv-nano-b.dts @@ -0,0 +1,53 @@ +// SPDX-License-Identifier: (GPL-2.0 OR MIT) +/* + * Copyright (C) 2024 Thomas Bonnefille + */ + +/dts-v1/; + +#include "sg2002.dtsi" + +/ { + model = "LicheeRV Nano B"; + compatible = "sipeed,licheerv-nano-b", "sipeed,licheerv-nano", "sophgo,sg2002"; + + aliases { + gpio0 = &gpio0; + gpio1 = &gpio1; + gpio2 = &gpio2; + gpio3 = &gpio3; + serial0 = &uart0; + serial1 = &uart1; + serial2 = &uart2; + serial3 = &uart3; + serial4 = &uart4; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; +}; + +&osc { + clock-frequency = <25000000>; +}; + +&sdhci0 { + status = "okay"; + bus-width = <4>; + no-1-8-v; + no-mmc; + no-sdio; +}; + +&uart0 { + status = "okay"; +}; + +&uart1 { + status = "okay"; +}; + +&i2c0 { + status = "okay"; +};