Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp8952104rwl; Sat, 31 Dec 2022 15:48:29 -0800 (PST) X-Google-Smtp-Source: AMrXdXs6WSg+1t2VUVL1MhCa1kBObAMK+NXytYs7v6Zp6OyLjtk/uD3OsZQwEZd6LlpA6RrSeMVm X-Received: by 2002:a05:6402:88d:b0:46d:1c38:1537 with SMTP id e13-20020a056402088d00b0046d1c381537mr30585335edy.29.1672530509267; Sat, 31 Dec 2022 15:48:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672530509; cv=none; d=google.com; s=arc-20160816; b=I2xTv+tav/VMfvzaoiByYvksP07TzUp1vR1YMvSNKPKKRv4990lmp33cgLd3GLbtjT nrCgfovCMhgso+GWoLc6XwAks3i415RcX+ifEXcX7WO8WbfIw374zZaFECCL8Dtqb8MD a49eXirFc7NFoayodJExv4g1UG3bfEn89zprVRD+SRVci4M0H/iTSwWgdJ4S6reg44J3 0bJqyDNSims30FBiHWhUOiT8RqYdXzXclrsFdu0TIVDNyPoKWxX9sJurSuY5oG5spwav kKrfZ/5lQ6tGxaVkVEgSsFkqk1YdNT+OBMriDVKuU2eISO/z9VsqgldmtoEcrxCz5oMh E/Og== 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=wbFFkWaW2y6QyfCP9hXP49i729SiTDGdcYu+wz7LKDm+RQ4avS3MmUeh1hK9X9n/0F Lf0vH73zc4EWew+XzrLAivMAs4AL9QNiBFPAyMmRUrCdyXdQEix3Kd1AEBNyCiLY7O2y 5kfdc/cyJmjXYj5AVo9x8rs4LDKdVGNZTAuDEeccfZZ5GoCDLJjHwFCq20Ys6pfIGOpe E1RxGxGfHa75nxOlip0G7DSM1GKISqA/XHb5Yh/YU5M/KQv9hJ5I+9kfm5NvdYuEaCJ6 jV0bFoS9BE0I9bIbCUbQV6VfMA6aOZvLHFnIHvqAbzSS40f8fF0jroXrDZt+KBWaT7cE yDtw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sholland.org header.s=fm3 header.b=a7KJ+hf8; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=jRJXt+KZ; 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 u26-20020a50951a000000b0046b32882b04si20687574eda.440.2022.12.31.15.48.14; Sat, 31 Dec 2022 15:48:29 -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=a7KJ+hf8; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=jRJXt+KZ; 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 S236011AbiLaXjw (ORCPT + 61 others); Sat, 31 Dec 2022 18:39:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42930 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232544AbiLaXjH (ORCPT ); Sat, 31 Dec 2022 18:39:07 -0500 Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3C90863DB; Sat, 31 Dec 2022 15:39:06 -0800 (PST) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id A24235C00A4; Sat, 31 Dec 2022 18:39:05 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Sat, 31 Dec 2022 18:39:05 -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=1672529945; x=1672616345; bh=YF Kd9giNzlj6iUohyftPkzjCm0pqQLw/TQaK49fbfIE=; b=a7KJ+hf8IGrqRNWT1U RWNSZpVMxgZ9iFyyUnyi6b6Rc4VBbw0rgRSgqGNZ5uXBubGAd23IUNhlHi15B+Pu hT6ZQ6WvFPW0HVs9LC3URvtTg+fq6w7O1y86lqw259hywBywq808sBfvt1+2CWQV s4/Rd22pCSE6G/78C02/pyf0DXnKT2q9SOhUkCJktgOO1E/vxQoqNvyjLywHvGr8 lqsGky9d2RGQXb5TT1CKYRrf1ReebPgzhfMqzmljxm29KhFTUMgga64qJia2YjYu uy8TtYJUeG90FdvWd30xHuQ9WQiTfUJzEuxLuxNP4aDvlCGazV8gVPNuLQJaUYlj 702w== 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=1672529945; x=1672616345; bh=YFKd9giNzlj6i UohyftPkzjCm0pqQLw/TQaK49fbfIE=; b=jRJXt+KZAe7/jfTqfGdEpkcaNMrlg cPbuFscOlv16hKDdU70XO+4XF3lPQd7vhT5G+D64LbCTEoSAj0dM6MyIWeaUpu8X V5dwI4DBfaENAMWwFPCbEF356uCMCUDtH+/YkxzUksX0vwLYKYIKrMajs4+f/0C2 Bi6siVOTnVljt6P2heh9TrNvhkigrOS5hTpPyLUN3UP+5DgaY2ms37y1yGZpHlRp uGACK5rM1+CZcrAtmykZSxEmiyPIi8+pSWYA88dKtxMjHo6/uO62th/1QQ+C0HR/ P99vdVCbSUAch4P0ETFoYuMozbFC20JoMhwbZCyi68fsEa1/RQxIzOExA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrieelgddufecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefurghmuhgv lhcujfholhhlrghnugcuoehsrghmuhgvlhesshhhohhllhgrnhgurdhorhhgqeenucggtf frrghtthgvrhhnpedukeetueduhedtleetvefguddvvdejhfefudelgfduveeggeehgfdu feeitdevteenucevlhhushhtvghrufhiiigvpedvnecurfgrrhgrmhepmhgrihhlfhhroh hmpehsrghmuhgvlhesshhhohhllhgrnhgurdhorhhg X-ME-Proxy: Feedback-ID: i0ad843c9:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 31 Dec 2022 18:39:04 -0500 (EST) From: Samuel Holland To: Chen-Yu Tsai , Jernej Skrabec , linux-sunxi@lists.linux.dev Cc: devicetree@vger.kernel.org, Rob Herring , Jisheng Zhang , linux-riscv@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Andre Przywara , Palmer Dabbelt , Krzysztof Kozlowski , Conor Dooley , linux-kernel@vger.kernel.org, Heiko Stuebner , Samuel Holland , Palmer Dabbelt , Guo Ren Subject: [PATCH v4 09/12] riscv: dts: allwinner: Add Dongshan Nezha STU devicetree Date: Sat, 31 Dec 2022 17:38:48 -0600 Message-Id: <20221231233851.24923-10-samuel@sholland.org> X-Mailer: git-send-email 2.37.4 In-Reply-To: <20221231233851.24923-1-samuel@sholland.org> References: <20221231233851.24923-1-samuel@sholland.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 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"; +}; -- 2.37.4