Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp1510599rwb; Sat, 5 Aug 2023 17:51:51 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHjB3rCvIZ1+21w3u3VseAhq3OCgGerA4jOU5IqrrQt46i4coT2m4DODghLhA7AA8xyBMUS X-Received: by 2002:a05:6a00:180c:b0:666:e1f4:5153 with SMTP id y12-20020a056a00180c00b00666e1f45153mr5227253pfa.0.1691283111178; Sat, 05 Aug 2023 17:51:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691283111; cv=none; d=google.com; s=arc-20160816; b=Eb2D1Wme4FLJbH7bLQ4hzsur44PtLoa5N+nyjorY70GbXFgoq98r8Q9J58sgGQOVvb hXI+wg85dbc1vNide79bHA+WVZ+XCoCqbUKtrBd8L90VBzjIpufLTqxgewS4Ba9NJw3G YPHq2jj0nL0/mEjj1uksPy9uN05BWYztZgnKl7eKxnGJEswM1k9frqklq7b5BS68gtWE G0cOVy5pOx+RIJO3oNyQJJM3R6hXWvyGRhl/4AGJsx2CAgKN89I7Rh/tW3Rcdk8+DlH9 JYNXd6zhIxaQCP6oTH2orzMT5nT0txI+1uYApNTjvrtZpeSiwaKszMq4OiLnSIPOZTe6 Q/uQ== 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:dkim-signature :from; bh=j8Ex3P9gUvSbzz5ZfJ4rugGr8cfWoSUIVvrIlfDnzEQ=; fh=5EcTGzr5TqzAwvi5AbSPHjOGBija2YP4yIljfz8BFYE=; b=Vx4B2UJDf9qj5Z7HAlSqsq+FY7zeuePkkBs4myktwywA6PYu7IWtEcZCGIWeqD0nXb PtD1oF16bqZtZtI9Bq09UO5SHlw8+ZzygKfe4/iWbmv6KHzYhHpB/D2rDpfeQXXUM8Aa rBELCGbxspHNiblu0wqWZr6d1MDlhgQkMYu8uTcpAhoxOYK93jtSHK6BJXgkjOeLY/ID hNr/JKjsv0ySqT8oyGwlr3RA08LcILNrzX3e9Gkf1Wyg6NO/eHKeDPs0xBM+o9QbDP3S oujMf89OLAXFQ4230OJrIsSt4HeqKHsnvBAxrM9iMNSbhYEMY6uY7wpsSiPlvCMlzLx0 Jf1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nix.how header.s=mail header.b=dIgyPWVp; 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=nix.how Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a20-20020a056a000c9400b00686f034ed7fsi3814257pfv.371.2023.08.05.17.51.30; Sat, 05 Aug 2023 17:51:51 -0700 (PDT) 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=@nix.how header.s=mail header.b=dIgyPWVp; 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=nix.how Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229784AbjHEXiZ (ORCPT + 99 others); Sat, 5 Aug 2023 19:38:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38154 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229691AbjHEXiX (ORCPT ); Sat, 5 Aug 2023 19:38:23 -0400 Received: from mail.croughan.sh (mail.croughan.sh [135.181.193.41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D0792212D; Sat, 5 Aug 2023 16:38:21 -0700 (PDT) From: Matthew Croughan DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nix.how; s=mail; t=1691278699; bh=j8Ex3P9gUvSbzz5ZfJ4rugGr8cfWoSUIVvrIlfDnzEQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=dIgyPWVpA9u1eDXGAu64Itq3wAY12V6NlJwRnStVMtD7X9nd+yYPWwNtFjXpO+Ap9 MICjdI4JUSNPz//0eccmGn1gffuY1pEWDDF1Hft8Fx4WPZc1M1vDvKM+S/ETi7Onv+ 09+RC32WPUHYAz9t2+n7gmzgU9QaBlULBqRIG09c= To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland Cc: Matthew Croughan , Andre Przywara , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH v6 2/2] arm64: dts: allwinner: h616: Add Mango Pi MQ-Quad DTS Date: Sun, 6 Aug 2023 00:34:56 +0100 Message-ID: <20230805233715.1216456-3-matthew.croughan@nix.how> In-Reply-To: <20230805233715.1216456-1-matthew.croughan@nix.how> References: <20230805233715.1216456-1-matthew.croughan@nix.how> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 Mango Pi MQ Quad is a H616 based SBC, add basic support for the board and its peripherals Signed-off-by: Matthew Croughan Reviewed-by: Andre Przywara --- arch/arm64/boot/dts/allwinner/Makefile | 1 + .../allwinner/sun50i-h616-mangopi-mq-quad.dts | 187 ++++++++++++++++++ 2 files changed, 188 insertions(+) create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-h616-mangopi-mq-quad.dts diff --git a/arch/arm64/boot/dts/allwinner/Makefile b/arch/arm64/boot/dts/allwinner/Makefile index 6a96494a2e0a..06c5b97dbfc3 100644 --- a/arch/arm64/boot/dts/allwinner/Makefile +++ b/arch/arm64/boot/dts/allwinner/Makefile @@ -38,5 +38,6 @@ dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h6-pine-h64.dtb dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h6-pine-h64-model-b.dtb dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h6-tanix-tx6.dtb dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h6-tanix-tx6-mini.dtb +dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h616-mangopi-mq-quad.dtb dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h616-orangepi-zero2.dtb dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h616-x96-mate.dtb diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h616-mangopi-mq-quad.dts b/arch/arm64/boot/dts/allwinner/sun50i-h616-mangopi-mq-quad.dts new file mode 100644 index 000000000000..6121c14bc66b --- /dev/null +++ b/arch/arm64/boot/dts/allwinner/sun50i-h616-mangopi-mq-quad.dts @@ -0,0 +1,187 @@ +/* SPDX-License-Identifier: (GPL-2.0+ OR MIT) + * Copyright (C) 2020 Arm Ltd. + * + * Copyright (C) 2023 Matthew Croughan + */ + +/dts-v1/; + +#include "sun50i-h616.dtsi" + +#include +#include +#include + +/ { + model = "MangoPi MQ-Quad"; + compatible = "widora,mangopi-mq-quad", "allwinner,sun50i-h616"; + + aliases { + serial0 = &uart0; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; + + leds { + compatible = "gpio-leds"; + + led-0 { + function = LED_FUNCTION_STATUS; + color = ; + gpios = <&pio 2 13 GPIO_ACTIVE_HIGH>; /* PC13 */ + }; + }; + + reg_vcc5v: vcc5v { + /* board wide 5V supply directly from the USB-C socket */ + compatible = "regulator-fixed"; + regulator-name = "vcc-5v"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + regulator-always-on; + }; + + reg_vcc3v3: vcc3v3 { + /* board wide 3V3 supply directly from SY8008 regulator */ + compatible = "regulator-fixed"; + regulator-name = "vcc-3v3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + }; + + wifi_pwrseq: wifi-pwrseq { + compatible = "mmc-pwrseq-simple"; + reset-gpios = <&pio 6 18 GPIO_ACTIVE_LOW>; /* PG18 */ + }; +}; + +&ehci1 { + status = "okay"; +}; + +&pio { + vcc-pc-supply = <®_vcc3v3>; + vcc-pg-supply = <®_vcc3v3>; + vcc-pi-supply = <®_vcc3v3>; +}; + +/* USB 2 & 3 are on headers only. */ + +&mmc0 { + vmmc-supply = <®_vcc3v3>; + cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */ + bus-width = <4>; + status = "okay"; +}; + +&mmc1 { + bus-width = <4>; + mmc-pwrseq = <&wifi_pwrseq>; + non-removable; + vmmc-supply = <®_vcc3v3>; + vqmmc-supply = <®_vcc3v3>; + pinctrl-0 = <&mmc1_pins>; + pinctrl-names = "default"; + status = "okay"; + + rtl8723ds: wifi@1 { + reg = <1>; + interrupt-parent = <&pio>; + interrupts = <6 15 IRQ_TYPE_LEVEL_LOW>; /* PG15 */ + interrupt-names = "host-wake"; + }; +}; + + +&uart1 { + uart-has-rtscts; + pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>; + pinctrl-names = "default"; + status = "okay"; + + bluetooth { + compatible = "realtek,rtl8723ds-bt"; + device-wake-gpios = <&pio 6 17 GPIO_ACTIVE_HIGH>; /* PG17 */ + enable-gpios = <&pio 6 19 GPIO_ACTIVE_HIGH>; /* PG19 */ + host-wake-gpios = <&pio 6 16 GPIO_ACTIVE_HIGH>; /* PG16 */ + }; +}; + +&ohci1 { + status = "okay"; +}; + +&r_i2c { + status = "okay"; + + axp313a: pmic@36 { + compatible = "x-powers,axp313a"; + interrupt-controller; + #interrupt-cells = <1>; + reg = <0x36>; + regulators { + /* + * ALDO1 is feeding both VCC-PLL and VCC-DCXO, always-on is required, + * as removing power would cut the 1.8v supply for the RAM + */ + reg_aldo1: aldo1 { + regulator-always-on; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-name = "vcc-1v8"; + }; + + reg_dcdc1: dcdc1 { + regulator-always-on; + regulator-min-microvolt = <810000>; + regulator-max-microvolt = <990000>; + regulator-name = "vdd-gpu-sys"; + }; + + reg_dcdc2: dcdc2 { + regulator-always-on; + regulator-min-microvolt = <810000>; + regulator-max-microvolt = <1100000>; + regulator-name = "vdd-cpu"; + }; + + reg_dcdc3: dcdc3 { + regulator-always-on; + regulator-min-microvolt = <1500000>; + regulator-max-microvolt = <1500000>; + regulator-name = "vdd-dram"; + }; + + }; + }; +}; + +&uart0 { + pinctrl-names = "default"; + pinctrl-0 = <&uart0_ph_pins>; + status = "okay"; +}; + +&usbotg { + /* + * PHY0 pins are connected to a USB-C socket, but a role switch + * is not implemented: both CC pins are pulled to GND. + * The VBUS pins power the device, so a fixed peripheral mode + * is the best choice. + * The board can be powered via GPIOs, in this case port0 *can* + * act as a host (with a cable/adapter ignoring CC), as VBUS is + * then provided by the GPIOs. Any user of this setup would + * need to adjust the DT accordingly: dr_mode set to "host", + * enabling OHCI0 and EHCI0. + */ + dr_mode = "peripheral"; + status = "okay"; +}; + +&usbphy { + usb1_vbus-supply = <®_vcc5v>; + status = "okay"; +}; -- 2.41.0