Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp689564rwb; Thu, 8 Dec 2022 01:27:18 -0800 (PST) X-Google-Smtp-Source: AA0mqf5CelC3yXlYrTeZaSG+81jnHyuFHvJl60Ef5qINoWL7wRFUCT8LmOs+Tfn7lT4pLyqU08oo X-Received: by 2002:a05:6402:370e:b0:464:fa1:9dc3 with SMTP id ek14-20020a056402370e00b004640fa19dc3mr27842882edb.343.1670491638328; Thu, 08 Dec 2022 01:27:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670491638; cv=none; d=google.com; s=arc-20160816; b=cF2D7L2eASxREq9Opyx/niR6+pcpz0PkWvEsbb4WkjqP5KuE1+wjZByTSB5Hqr/oe8 A1RNMevT2i+BNp4qymbD0qqCyIPp7AnwNyj1Lge/yrEHoxCQwK/RdXa5gxQ3A2BBq9HT 0RBY91uZmZTuv9bYbP5N2su0FZxlixxtSlKkFA+C3HemUPKD21b7k7NDWElXrb/sMx+w 6lM5Km6e4fW6Dm4JqHxrv/RLlnoWpqqBM91b1hROzRxMaQkCFylu5qHpyTHbkUe8/ecy s1a9h38rqNVkRueI5ON9HVphG0DitVBM/4YkIPgyKYl3WNLb5YxtYkyfogtqNkYDdgqU xTJg== 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=41whx7KvqBEB58RKMRO0vKW/I8/pBktkjuNKvdJjsMY=; b=OtnKxMWiLwtgjs14+7nyddN7hdC//jakxuP3II59RunvlDEGV2wz1WZ53apMfe37m7 /uXFn1rMZugc7Go74Z7eMpVx+OxXeGPNYIcoA4bNlfkUVuUM9rWzqngUdGv8T7RlQLwN M8Pb28ky+q7QQs22cKboPU36DAF9i9eshmhSqQB37e3zXltD04Z/fXIHVu/RnVbJtHiQ UgVGYOOGHzF+tgM/Dnbd1dbn7tpLHd374TGRkROI5hcZGtlFyZ5JkrHf2T2xJOrTMmCG 5qnSkucxlzN15/G7SCQQhi9GHxoUll80X0HkDw/nYHebuZhrl4mWOhlTtq3UwcxU+xvX w8hw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sholland.org header.s=fm3 header.b=D07jKE3m; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=lnGrIKM2; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ss28-20020a170907c01c00b007a9b7e68634si15597107ejc.515.2022.12.08.01.27.01; Thu, 08 Dec 2022 01:27:18 -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=fm3 header.b=D07jKE3m; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=lnGrIKM2; 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 S230220AbiLHJEN (ORCPT + 72 others); Thu, 8 Dec 2022 04:04:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35778 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230194AbiLHJDi (ORCPT ); Thu, 8 Dec 2022 04:03:38 -0500 Received: from wout2-smtp.messagingengine.com (wout2-smtp.messagingengine.com [64.147.123.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AC78C6A745; Thu, 8 Dec 2022 01:03:13 -0800 (PST) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id C61D03200941; Thu, 8 Dec 2022 04:03:11 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Thu, 08 Dec 2022 04:03:13 -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=fm3; t=1670490191; x=1670576591; bh=41 whx7KvqBEB58RKMRO0vKW/I8/pBktkjuNKvdJjsMY=; b=D07jKE3mBpu66M9o6Y D6FNE96890r4QWccxhVeiKdol9QC99WqoQ7ALAcFdAm4quykmvYTlpTLCAsJ04J8 LHdHzsFN87nQBLjoBRFf+Vt695zTRnNscCr903m1GoZZJUl8OglkpnwBdhl5C9jw s8qyPMeQB9HxZPvjukGUqHUzoMtgicD2BsTCXQlv6aVPGSF1xYcC9CT4hXvTZAF/ 4ikr2KBrXKiUkxD+7xx1M9JvfJrYvDlhclRyUVKpLH5rIf4ARsczo/9ibvxV4JM2 zE9JwaWW2JPOevIlGAYrPZO31g0ZAXq7H1KCIKFAupuiWXnt1kLCGGDVxr3KtKF4 dzHA== 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=fm2; t=1670490191; x=1670576591; bh=41whx7KvqBEB5 8RKMRO0vKW/I8/pBktkjuNKvdJjsMY=; b=lnGrIKM2LTavJkr4PwkqBzaFDSrpg GMo29gIRkgPcyq8VTweDmnBKO4/xhYzCyx2oFGToEeWft4VzLgeEC5Hqnxy749AK jU4cCJZz7t7ywf9qJUc3IkTrRqjvcK7IOnB6zddOvbzHKtTXjNEFLxvuo9Raqh09 8qvcFc5tK31DqBna4AAL4jKH+HkbeikTdDF/KtNE8poBAuNLScBdNNRv8hWIY3OO 13e+gRPKqO5DX7ztWxZ04TrbxHWsF8nYVxcQCwse3efbL28p82pQVGncQFixFBhh 2ilM/7q9t+sr8pnNRgRlo1WioLhu4USn5RKhNLrdVh4D4h5CyCT8mitwA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvddtucetufdoteggodetrfdotffvucfrrh hofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgenuceurghi lhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurh ephffvvefufffkofgjfhgggfestdekredtredttdenucfhrhhomhepufgrmhhuvghlucfj ohhllhgrnhguuceoshgrmhhuvghlsehshhholhhlrghnugdrohhrgheqnecuggftrfgrth htvghrnhepudekteeuudehtdelteevgfduvddvjefhfedulefgudevgeeghefgudefiedt veetnecuvehluhhsthgvrhfuihiivgepudenucfrrghrrghmpehmrghilhhfrhhomhepsh grmhhuvghlsehshhholhhlrghnugdrohhrgh X-ME-Proxy: Feedback-ID: i0ad843c9:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 8 Dec 2022 04:03:10 -0500 (EST) From: Samuel Holland To: Chen-Yu Tsai , Jernej Skrabec , linux-sunxi@lists.linux.dev, Palmer Dabbelt , Conor Dooley , linux-riscv@lists.infradead.org Cc: Jisheng Zhang , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Krzysztof Kozlowski , Rob Herring , Heiko Stuebner , linux-arm-kernel@lists.infradead.org, Andre Przywara , Samuel Holland , Palmer Dabbelt , Guo Ren Subject: [PATCH v3 09/12] riscv: dts: allwinner: Add Dongshan Nezha STU devicetree Date: Thu, 8 Dec 2022 03:02:34 -0600 Message-Id: <20221208090237.20572-10-samuel@sholland.org> X-Mailer: git-send-email 2.37.4 In-Reply-To: <20221208090237.20572-1-samuel@sholland.org> References: <20221208090237.20572-1-samuel@sholland.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.1 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,URIBL_BLACK autolearn=no 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 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 --- 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"; +}; -- 2.37.4