From nobody Sun Dec 22 17:58:11 2024 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0F7D9C05027 for ; Thu, 26 Jan 2023 04:58:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236146AbjAZE6W (ORCPT ); Wed, 25 Jan 2023 23:58:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45552 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235664AbjAZE5y (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 039F983C2; Wed, 25 Jan 2023 20:57:49 -0800 (PST) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 574275C019D; Wed, 25 Jan 2023 23:57:48 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Wed, 25 Jan 2023 23:57:48 -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=1674709068; x=1674795468; bh=Sw UIInRaqpqK3pAz3/IZrTNpaUhmNCe2HT4MVJV0DHk=; b=pKIMx7l/9X7jOoNfqB mDD8HzPDgIRwF/BRLn9eOs9560JDCLEJWjAroXQ2T3HnmD13PVbveeIm0Y4puUQB efh98L+htbO5k8hBwJ4FeAFOwcbSr4uGPNTaprE2VHVncgylgu90MaSkKXbw3dg0 lUdRXzurjnbwAQX9oZdIhehHDyHfcWtiXnUFVUKR8gEUPMd9kusgqzipT2ubkpd6 /1cB6RLVYGJF7AqW+m4DYQ4S+Vg+KZanrOdvvPE+rKp12VnrQCgcO47dY5lD8skn UEFvjQrD4J35Ymzu5+6OAYzYkYHwP+dpYTi+X/U4vNFZxF1I1Q0ajXpyaR1sLro+ HEUw== 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=1674709068; x=1674795468; bh=SwUIInRaqpqK3 pAz3/IZrTNpaUhmNCe2HT4MVJV0DHk=; b=kNbobxHm2ufnGfX7sAsmQq5EHbvZ1 lSfCAmL7LeEdHWP1qp9y/pH0jIjYnQGFliDlLdwXg8rFR6TQgS08fEFPGxIRWbXK uRzgrk740O9MvXzR1CP+nS4Qwc2/lDnxwUyuVS7JmW2J9wviTvU+uQ4JILwvz5qG 5SI+50H/2qsgdlhorAsXIrbKCq+KfJOVyNsqryiwNsbq82v7QLKEsdgkbCV/CO4Z Z/IuaveOYu0dm6KCnBYyND3VHN/NB41Bm7Z+mkKB4+RTgMBw/90U32PE4kq6SRM6 CKXWiB3cj6efaqiIeMLz9TXDSgUfD+ScPFKx4TfM/Aw+MWFtBw3awpb9A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedruddvfedgjeehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgjfhgggfestdekredtredttdenucfhrhhomhepufgrmhhu vghlucfjohhllhgrnhguuceoshgrmhhuvghlsehshhholhhlrghnugdrohhrgheqnecugg ftrfgrthhtvghrnhepudekteeuudehtdelteevgfduvddvjefhfedulefgudevgeeghefg udefiedtveetnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homhepshgrmhhuvghlsehshhholhhlrghnugdrohhrgh X-ME-Proxy: Feedback-ID: i0ad843c9:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 25 Jan 2023 23:57:47 -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 08/11] riscv: dts: allwinner: Add MangoPi MQ Pro devicetree Date: Wed, 25 Jan 2023 22:57:35 -0600 Message-Id: <20230126045738.47903-9-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 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" The MangoPi MQ Pro is a tiny SBC with a layout compatible to the Raspberry Pi Zero. It includes the Allwinner D1 SoC, 512M or 1G of DDR3, and an RTL8723DS-based WiFi/Bluetooth module. The board also exposes GPIO Port E via a connector on the end of the board, which can support either a camera or an RMII Ethernet PHY. The additional regulators supply that connector. 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 - Change LED_FUNCTION_BACKLIGHT to LED_FUNCTION_STATUS (the backlight regulator is disconnected by default, so this is a standalone LED) Changes in v2: - Added LED (GPIO shared between onboard LED and backlight regulator) arch/riscv/boot/dts/allwinner/Makefile | 1 + .../allwinner/sun20i-d1-mangopi-mq-pro.dts | 142 ++++++++++++++++++ 2 files changed, 143 insertions(+) create mode 100644 arch/riscv/boot/dts/allwinner/sun20i-d1-mangopi-mq-pro.= dts diff --git a/arch/riscv/boot/dts/allwinner/Makefile b/arch/riscv/boot/dts/a= llwinner/Makefile index f1c70b9dc9bf..2ed586fafaea 100644 --- a/arch/riscv/boot/dts/allwinner/Makefile +++ b/arch/riscv/boot/dts/allwinner/Makefile @@ -3,5 +3,6 @@ dtb-$(CONFIG_ARCH_SUNXI) +=3D sun20i-d1-lichee-rv-86-panel-= 480p.dtb dtb-$(CONFIG_ARCH_SUNXI) +=3D sun20i-d1-lichee-rv-86-panel-720p.dtb dtb-$(CONFIG_ARCH_SUNXI) +=3D sun20i-d1-lichee-rv-dock.dtb dtb-$(CONFIG_ARCH_SUNXI) +=3D sun20i-d1-lichee-rv.dtb +dtb-$(CONFIG_ARCH_SUNXI) +=3D sun20i-d1-mangopi-mq-pro.dtb dtb-$(CONFIG_ARCH_SUNXI) +=3D sun20i-d1-nezha.dtb dtb-$(CONFIG_ARCH_SUNXI) +=3D sun20i-d1s-mangopi-mq.dtb diff --git a/arch/riscv/boot/dts/allwinner/sun20i-d1-mangopi-mq-pro.dts b/a= rch/riscv/boot/dts/allwinner/sun20i-d1-mangopi-mq-pro.dts new file mode 100644 index 000000000000..f2e07043afb3 --- /dev/null +++ b/arch/riscv/boot/dts/allwinner/sun20i-d1-mangopi-mq-pro.dts @@ -0,0 +1,142 @@ +// 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 =3D "MangoPi MQ Pro"; + compatible =3D "widora,mangopi-mq-pro", "allwinner,sun20i-d1"; + + aliases { + ethernet0 =3D &rtl8723ds; + serial0 =3D &uart0; + }; + + chosen { + stdout-path =3D "serial0:115200n8"; + }; + + leds { + compatible =3D "gpio-leds"; + + led-0 { + color =3D ; + function =3D LED_FUNCTION_STATUS; + gpios =3D <&pio 3 18 GPIO_ACTIVE_HIGH>; /* PD18 */ + }; + }; + + reg_avdd2v8: avdd2v8 { + compatible =3D "regulator-fixed"; + regulator-name =3D "avdd2v8"; + regulator-min-microvolt =3D <2800000>; + regulator-max-microvolt =3D <2800000>; + vin-supply =3D <®_vcc_3v3>; + }; + + reg_dvdd: dvdd { + compatible =3D "regulator-fixed"; + regulator-name =3D "dvdd"; + regulator-min-microvolt =3D <1200000>; + regulator-max-microvolt =3D <1200000>; + vin-supply =3D <®_vcc_3v3>; + }; + + reg_vdd_cpu: vdd-cpu { + compatible =3D "regulator-fixed"; + regulator-name =3D "vdd-cpu"; + regulator-min-microvolt =3D <1100000>; + regulator-max-microvolt =3D <1100000>; + vin-supply =3D <®_vcc>; + }; + + wifi_pwrseq: wifi-pwrseq { + compatible =3D "mmc-pwrseq-simple"; + reset-gpios =3D <&pio 6 17 GPIO_ACTIVE_LOW>; /* PG17 */ + }; +}; + +&cpu0 { + cpu-supply =3D <®_vdd_cpu>; +}; + +&dcxo { + clock-frequency =3D <24000000>; +}; + +&ehci1 { + status =3D "okay"; +}; + +&mmc0 { + bus-width =3D <4>; + cd-gpios =3D <&pio 5 6 GPIO_ACTIVE_HIGH>; /* PF6 */ + disable-wp; + vmmc-supply =3D <®_vcc_3v3>; + vqmmc-supply =3D <®_vcc_3v3>; + pinctrl-0 =3D <&mmc0_pins>; + pinctrl-names =3D "default"; + status =3D "okay"; +}; + +&mmc1 { + bus-width =3D <4>; + mmc-pwrseq =3D <&wifi_pwrseq>; + non-removable; + vmmc-supply =3D <®_vcc_3v3>; + vqmmc-supply =3D <®_vcc_3v3>; + pinctrl-0 =3D <&mmc1_pins>; + pinctrl-names =3D "default"; + status =3D "okay"; + + rtl8723ds: wifi@1 { + reg =3D <1>; + interrupt-parent =3D <&pio>; + interrupts =3D <6 10 IRQ_TYPE_LEVEL_LOW>; /* PG10 */ + interrupt-names =3D "host-wake"; + }; +}; + +&ohci1 { + status =3D "okay"; +}; + +&pio { + vcc-pe-supply =3D <®_avdd2v8>; +}; + +&uart0 { + pinctrl-0 =3D <&uart0_pb8_pins>; + pinctrl-names =3D "default"; + status =3D "okay"; +}; + +&uart1 { + uart-has-rtscts; + pinctrl-0 =3D <&uart1_pg6_pins>, <&uart1_pg8_rts_cts_pins>; + pinctrl-names =3D "default"; + status =3D "okay"; + + bluetooth { + compatible =3D "realtek,rtl8723ds-bt"; + device-wake-gpios =3D <&pio 6 18 GPIO_ACTIVE_HIGH>; /* PG18 */ + enable-gpios =3D <&pio 6 15 GPIO_ACTIVE_HIGH>; /* PG15 */ + host-wake-gpios =3D <&pio 6 14 GPIO_ACTIVE_HIGH>; /* PG14 */ + }; +}; + +&usb_otg { + dr_mode =3D "peripheral"; + status =3D "okay"; +}; + +&usbphy { + usb1_vbus-supply =3D <®_vcc>; + status =3D "okay"; +}; --=20 2.37.4