From patchwork Thu Jan 26 04:57:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Holland X-Patchwork-Id: 48498 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp99206wrn; Wed, 25 Jan 2023 20:59:55 -0800 (PST) X-Google-Smtp-Source: AMrXdXt1N7iTpY8M4lK2o9CZcMWVufYI91Xy1vfxXNNKye4O013VNy2iVYyrnvgWlDIZFSEeW9v0 X-Received: by 2002:a05:6402:1009:b0:479:8313:3008 with SMTP id c9-20020a056402100900b0047983133008mr34189719edu.0.1674709195609; Wed, 25 Jan 2023 20:59:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674709195; cv=none; d=google.com; s=arc-20160816; b=V61c4EWoQEbIsdh56Mt1cGlTHxrsi2bHEBebJtt+5jicMi61MxZha+8wOExdOdLe9v AbtqiwBLpRmsawyuauMWqAOPCnrCdD6UxWDgQv+uBGbzgRVkX4M1vFZUq5Un8EBMKY1f 9Z+/RtXwnMx8TOq+9WhcK8007DZRwvFeS2dpvAZFVf3yPl1PaPbes15uiAdjFxJ/9ryd y9Wn63lEumSKoRCCNWqS0duFJsawOiSKD9TNshGBJCrar2umr9LsQ0eevdCE/SPk/2tl PlYtS1kDGntuqnud2iKfZWp3/IPOKHtbhSbPkJl1ysYLBX8DJjXM0npejKSy5vMO134I g3rg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :feedback-id:dkim-signature:dkim-signature; bh=YFKd9giNzlj6iUohyftPkzjCm0pqQLw/TQaK49fbfIE=; b=JrDlMJoJZFuZEheuiMqb4qRyY7itV++NshanKQ1cgHR6jtKyRtsPqdWvGrjG5EDekw APqWeC7OGARiN8XY4lTj6rPSMgob1ii7AYNxhXRr3b+ZhqhgqIvHL++uLiS5elpNsjRF 7B56Ie8JzmakLluborE013fLqyiV7GGCoOJlYCtBwypGDSVomdnWYvbFxXr2VVpJnWsc OakrbUblgJkBg5eWtA/Xc1V9hXKoLETth3yVw9UyCWtL83qnoqFFVl6WEzP1xX0ovgwK cqqfrl5BmyWUBNweMaszFD5n4jQ6zRdPJlUp18NobyCiRuxt7TbOSK/w9670EQrRa0sp qXxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sholland.org header.s=fm1 header.b="qD/9SJOc"; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=O7389FyA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sholland.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j10-20020a508a8a000000b0046afd9f07b0si712326edj.14.2023.01.25.20.59.26; Wed, 25 Jan 2023 20:59:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@sholland.org header.s=fm1 header.b="qD/9SJOc"; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=O7389FyA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sholland.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236109AbjAZE6S (ORCPT + 99 others); Wed, 25 Jan 2023 23:58:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45776 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235689AbjAZE5y (ORCPT ); Wed, 25 Jan 2023 23:57:54 -0500 Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AC84FA254; Wed, 25 Jan 2023 20:57:50 -0800 (PST) Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 878C35C013C; Wed, 25 Jan 2023 23:57:49 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Wed, 25 Jan 2023 23:57:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sholland.org; h= cc:cc:content-transfer-encoding:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm1; t=1674709069; x=1674795469; bh=YF Kd9giNzlj6iUohyftPkzjCm0pqQLw/TQaK49fbfIE=; b=qD/9SJOcOo0SYCb6fU Lv6XW189dYndnGKMZscQ6G+IGW1T3OcliBDMDb5lRnj4dKPPVYevCXmF9ENs8nG4 zZaND1Is4ulmdkDPykL6AR//WrRrDG1eLf/V0qhJ44MdoRh+lJ/79KBMSqmlzj4u nGZ4RMmT+LvIHC/0cFRJ4Dn1/r1IF5rIWb8qXimSvOGSsmDlm3vsLRH0GYxoe2rY ekqz7GUI+5KAHSiInk+OhvAxwgYy2dPyaM3XlsKy/u+LN2FmS9ZFyWaLp2x1hwwq s3ZxIIMpqdSwja4wmCDzjaMaiAQ0UM9Ezy031mNNGaJLmzFoZ+u3cKe0E9dDi/lL j8OA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; t=1674709069; x=1674795469; bh=YFKd9giNzlj6i UohyftPkzjCm0pqQLw/TQaK49fbfIE=; b=O7389FyAB5gEr0+nEpej93IAm16mb Eze1YDZ3TIzuOklakuJjBxXen1E1JqxfY/SnJ4QlqBR0SoWqMt/9jTOwAQpmj9nh L4qSsXiXeC4bX2Zwtgs1dTM4Vzu2nd9Mu+PPuF4V+i0UPvqpuR0WULHroFFzyt3d criPzT2J1pFTtdfVYn4/IEwMsCaWUN3h5p5ROHOa6Spmtkvo8MfWRo/1X/lvTYfq U3vc7OMVs09y4LYBeXg7WUR+uzBSKkaiDySP8be9Dg5w6aVazwyxRGvo9bh4rAn5 SnpXo/ow/bgowDbVK7VFRNa/vJWcODwcSMGEkLdU/EJyZIFbI5P8dC7/w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedruddvfedgjeehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgjfhgggfestdekredtredttdenucfhrhhomhepufgrmhhu vghlucfjohhllhgrnhguuceoshgrmhhuvghlsehshhholhhlrghnugdrohhrgheqnecugg ftrfgrthhtvghrnhepudekteeuudehtdelteevgfduvddvjefhfedulefgudevgeeghefg udefiedtveetnecuvehluhhsthgvrhfuihiivgepudenucfrrghrrghmpehmrghilhhfrh homhepshgrmhhuvghlsehshhholhhlrghnugdrohhrgh X-ME-Proxy: Feedback-ID: i0ad843c9:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 25 Jan 2023 23:57:48 -0500 (EST) From: Samuel Holland To: Chen-Yu Tsai , Jernej Skrabec , linux-sunxi@lists.linux.dev Cc: linux-riscv@lists.infradead.org, Heiko Stuebner , Palmer Dabbelt , Conor Dooley , Jisheng Zhang , Krzysztof Kozlowski , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Andre Przywara , Rob Herring , linux-arm-kernel@lists.infradead.org, Samuel Holland , Palmer Dabbelt , Guo Ren Subject: [PATCH v5 09/11] riscv: dts: allwinner: Add Dongshan Nezha STU devicetree Date: Wed, 25 Jan 2023 22:57:36 -0600 Message-Id: <20230126045738.47903-10-samuel@sholland.org> X-Mailer: git-send-email 2.37.4 In-Reply-To: <20230126045738.47903-1-samuel@sholland.org> References: <20230126045738.47903-1-samuel@sholland.org> MIME-Version: 1.0 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1756059869653622962?= X-GMAIL-MSGID: =?utf-8?q?1756059869653622962?= The 100ask Dongshan Nezha STU is a system-on-module that can be used standalone or with a carrier board. The SoM provides gigabit Ethernet, HDMI, a USB peripheral port, and WiFi/Bluetooth via an RTL8723DS chip. The "DIY" carrier board exposes almost every pin from the D1 SoC to 0.1" headers, but contains no digital circuitry, so it does not have its own devicetree. Acked-by: Jernej Skrabec Acked-by: Palmer Dabbelt Reviewed-by: Guo Ren Signed-off-by: Samuel Holland --- (no changes since v3) Changes in v3: - Drop mmc alias arch/riscv/boot/dts/allwinner/Makefile | 1 + .../sun20i-d1-dongshan-nezha-stu.dts | 117 ++++++++++++++++++ 2 files changed, 118 insertions(+) create mode 100644 arch/riscv/boot/dts/allwinner/sun20i-d1-dongshan-nezha-stu.dts diff --git a/arch/riscv/boot/dts/allwinner/Makefile b/arch/riscv/boot/dts/allwinner/Makefile index 2ed586fafaea..87f70b1af6b4 100644 --- a/arch/riscv/boot/dts/allwinner/Makefile +++ b/arch/riscv/boot/dts/allwinner/Makefile @@ -1,4 +1,5 @@ # SPDX-License-Identifier: GPL-2.0 +dtb-$(CONFIG_ARCH_SUNXI) += sun20i-d1-dongshan-nezha-stu.dtb dtb-$(CONFIG_ARCH_SUNXI) += sun20i-d1-lichee-rv-86-panel-480p.dtb dtb-$(CONFIG_ARCH_SUNXI) += sun20i-d1-lichee-rv-86-panel-720p.dtb dtb-$(CONFIG_ARCH_SUNXI) += sun20i-d1-lichee-rv-dock.dtb diff --git a/arch/riscv/boot/dts/allwinner/sun20i-d1-dongshan-nezha-stu.dts b/arch/riscv/boot/dts/allwinner/sun20i-d1-dongshan-nezha-stu.dts new file mode 100644 index 000000000000..8785de3c9224 --- /dev/null +++ b/arch/riscv/boot/dts/allwinner/sun20i-d1-dongshan-nezha-stu.dts @@ -0,0 +1,117 @@ +// SPDX-License-Identifier: (GPL-2.0+ or MIT) +// Copyright (C) 2022 Samuel Holland + +#include +#include + +/dts-v1/; + +#include "sun20i-d1.dtsi" +#include "sun20i-common-regulators.dtsi" + +/ { + model = "Dongshan Nezha STU"; + compatible = "100ask,dongshan-nezha-stu", "allwinner,sun20i-d1"; + + aliases { + ethernet0 = &emac; + serial0 = &uart0; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; + + leds { + compatible = "gpio-leds"; + + led-0 { + color = ; + function = LED_FUNCTION_STATUS; + gpios = <&pio 2 1 GPIO_ACTIVE_HIGH>; /* PC1 */ + }; + }; + + reg_usbvbus: usbvbus { + compatible = "regulator-fixed"; + regulator-name = "usbvbus"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + gpio = <&pio 3 19 GPIO_ACTIVE_HIGH>; /* PD19 */ + enable-active-high; + vin-supply = <®_vcc>; + }; + + /* + * This regulator is PWM-controlled, but the PWM controller is not + * yet supported, so fix the regulator to its default voltage. + */ + reg_vdd_cpu: vdd-cpu { + compatible = "regulator-fixed"; + regulator-name = "vdd-cpu"; + regulator-min-microvolt = <1100000>; + regulator-max-microvolt = <1100000>; + vin-supply = <®_vcc>; + }; +}; + +&cpu0 { + cpu-supply = <®_vdd_cpu>; +}; + +&dcxo { + clock-frequency = <24000000>; +}; + +&ehci0 { + status = "okay"; +}; + +&emac { + pinctrl-0 = <&rgmii_pe_pins>; + pinctrl-names = "default"; + phy-handle = <&ext_rgmii_phy>; + phy-mode = "rgmii-id"; + phy-supply = <®_vcc_3v3>; + status = "okay"; +}; + +&mdio { + ext_rgmii_phy: ethernet-phy@1 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <1>; + }; +}; + +&mmc0 { + broken-cd; + bus-width = <4>; + disable-wp; + vmmc-supply = <®_vcc_3v3>; + vqmmc-supply = <®_vcc_3v3>; + pinctrl-0 = <&mmc0_pins>; + pinctrl-names = "default"; + status = "okay"; +}; + +&ohci0 { + status = "okay"; +}; + +&uart0 { + pinctrl-0 = <&uart0_pb8_pins>; + pinctrl-names = "default"; + status = "okay"; +}; + +&usb_otg { + dr_mode = "otg"; + status = "okay"; +}; + +&usbphy { + usb0_id_det-gpios = <&pio 3 21 GPIO_ACTIVE_HIGH>; /* PD21 */ + usb0_vbus_det-gpios = <&pio 3 20 GPIO_ACTIVE_HIGH>; /* PD20 */ + usb0_vbus-supply = <®_usbvbus>; + status = "okay"; +};