From patchwork Tue Jul 9 10:07:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Bonnefille X-Patchwork-Id: 13727579 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 85B40C3DA49 for ; Tue, 9 Jul 2024 10:07:35 +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=RTZTYNPS1uvUM9yrHTT5YjBoNRkd0Iky1jOZXQuHA3A=; b=KxqzBG0cZl//0/ iY4LUAeRahrk66MjL2qpd+qrwfzgQJ/hoQV4dxjwLeKuKHsRVfxb7DsjLK9yrirvKLGSJULAQeOz1 TkA1WJqSCOggLT0bqeEFe/MAOYyNyIQPKFyvv4hGKvydX6LGFU8gXiCE1Ulhv7qj/xzamQ89IQcqJ YUsrc975ZtgqBtZpUw41a33p/R0J3y1YUlMDWqIYOK8L6EM8k2H3CQlmnBMOwu/2sQjgxNlAl1Wmp PDsOl+KG8ujFjvvRF4lZ7g5cXKrsRZTOQS9/k/PzP2rb/VmzoykFAKOgtS6pIlURKoguaF7MXxA5q PeAgpQvDjYzdPr+0adpA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sR7kz-00000006jms-0LMa; Tue, 09 Jul 2024 10:07:33 +0000 Received: from relay2-d.mail.gandi.net ([2001:4b98:dc4:8::222]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sR7kt-00000006jk5-3PaY for linux-riscv@lists.infradead.org; Tue, 09 Jul 2024 10:07:29 +0000 Received: by mail.gandi.net (Postfix) with ESMTPSA id 89A6C4000D; Tue, 9 Jul 2024 10:07:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1720519646; 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=ES8mi7d+KSw4EqedKB92e7v4sIMF0mwW3Ict+VP51AU=; b=OG5NbqLDCZjIVYYEUEpydKqEgnUS2ISHAhyus72wN8mPU9VLi8sNlv2ZeyIq+gaPg/twZO DSk9KwzEfjEtR/MVQPOBArnRqobi0nK4vodab2PZIGka9JLfE/yWCZnFbBEbNWFlvIfkIl rNholjGdHPOw+N8qT1cQF9VPoKXbVb86Q6Ik0ItnuAuu6VUbMMyZEBNHsDXwpTGkDhk130 1FUzp2yeuX7fVYc2xjRgrB+7JpCSdV6zwyIxeGrxbo0j4+JmIERL6Ovy6psxcDMkhBv2y/ NOme7KpDrtvuNmv4ifF5hitt6J0ZsfvMHfyAEAghDIYngs7x6GIdY5A3TkdI+w== From: Thomas Bonnefille Date: Tue, 09 Jul 2024 12:07:20 +0200 Subject: [PATCH v3 5/5] riscv: dts: sophgo: Add LicheeRV Nano board device tree MIME-Version: 1.0 Message-Id: <20240709-sg2002-v3-5-af779c3d139d@bootlin.com> References: <20240709-sg2002-v3-0-af779c3d139d@bootlin.com> In-Reply-To: <20240709-sg2002-v3-0-af779c3d139d@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.14.0 X-GND-Sasl: thomas.bonnefille@bootlin.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240709_030728_196511_B3F1076C X-CRM114-Status: GOOD ( 12.09 ) 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 | 54 ++++++++++++++++++++++ 2 files changed, 55 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..fc98b6a0ddf7 --- /dev/null +++ b/arch/riscv/boot/dts/sophgo/sg2002-licheerv-nano-b.dts @@ -0,0 +1,54 @@ +// 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; + disable-wp; +}; + +&uart0 { + status = "okay"; +}; + +&uart1 { + status = "okay"; +}; + +&i2c0 { + status = "okay"; +};