From patchwork Thu Jul 11 10:01:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Bonnefille X-Patchwork-Id: 13730292 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 11A6DC3DA47 for ; Thu, 11 Jul 2024 10:01:51 +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=Fr3riJxWvOsFDp oO0/7XU88NNMvPHYiCAzhI3C5lc2KxBv7xzJxtdIBjCUbPeCyF3PbsRV6T/vkXtrcnpveloHkZcjV K6SltkxSUe2nJUm98DxX55Txp2peDGHeTQWC9Pgi7EsbQDtMC+OKK5OZN9pSKVt+8ZJ76dY24jQ3r P9GKxRy03RONeblV4c3b3/q6tyi9w5+6FWeGmZ+Td25bYZ2vAE9O5rXvGjR3Uecm1xgrWVjqXWcRY wNUiE0K2170iglIKL8BCTkPXUg7iACoZFmnbvKcgwgXS9wcL0TqoiSHSbj2nF6td7iXb/2dO+KJKH AUmb2TwtExJTXzEkcjfA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sRqcT-0000000DRDE-3UF4; Thu, 11 Jul 2024 10:01:45 +0000 Received: from relay1-d.mail.gandi.net ([217.70.183.193]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sRqcM-0000000DRA1-1ylo for linux-riscv@lists.infradead.org; Thu, 11 Jul 2024 10:01:41 +0000 Received: by mail.gandi.net (Postfix) with ESMTPSA id 4CE8F24000B; Thu, 11 Jul 2024 10:01:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1720692097; 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=ZE5BXLR57bsa5m7g8Ihks6LcaGQ8UnM1nMs8mFExm5NEkou3gUFQKZ5WJlV6Hi/mb3mBig VQ8y4xj4eCAKeWRL45ml+xuVcdRPNQO+QAqrvHBlQbxTMMyK3MHUDMsyoSyOEsL29K7QjM KaOnaur4TlpZ8lYTSQGGW/B0HSRH/GCzEPAWsnBxzKHhCBVqD4E3JMaAS5reQ7aMDUPX78 uG1cyGb/JsYfIPC9EP0anORiJlLY/RduY1LULOrZVOoXlXr8gjEVCM4i5WF5w/9tgvKQYW n5w0uZcDg/CWZjlcyFzBd2O/JPdBBBXTYkRRFZuoHAW53+dJ4qikKbQ45B2tXQ== From: Thomas Bonnefille Date: Thu, 11 Jul 2024 12:01:31 +0200 Subject: [PATCH v4 4/4] riscv: dts: sophgo: Add LicheeRV Nano board device tree MIME-Version: 1.0 Message-Id: <20240711-sg2002-v4-4-d97ec2367095@bootlin.com> References: <20240711-sg2002-v4-0-d97ec2367095@bootlin.com> In-Reply-To: <20240711-sg2002-v4-0-d97ec2367095@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_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-20240711_030138_785453_6901C7D2 X-CRM114-Status: GOOD ( 12.02 ) 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"; +};