Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp8775305rwp; Wed, 19 Jul 2023 15:24:30 -0700 (PDT) X-Google-Smtp-Source: APBJJlEPkwmSVi4p3FnbG6OwsMyNmmE9rEKVdU9hX3D9spaNVzTIKtL+vXXNrvrks+Vn8Rh/f+QZ X-Received: by 2002:a05:6358:292a:b0:134:d559:2590 with SMTP id y42-20020a056358292a00b00134d5592590mr305848rwb.14.1689805469964; Wed, 19 Jul 2023 15:24:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689805469; cv=none; d=google.com; s=arc-20160816; b=jS/BSw+vAS96w8UbmDVmZqbMSRKKte31vvhaMBh11vKM3Y7kXt5aQgNyX4VpbwCdfd +VLg8tjxqT+5+1YDURzC0BnXO5Murlluz7ayGvaTPFEVPQIysq86hQpT8wMed127abwL vogiBIsSJsZBsxBY1KAeoEe8TWqUCehHjbLEm0uqE+V+NdD3O2zcM+KGkcM7am0Q7aEf G9PWLwmwn8JwF+hnUyFFiaKP3x6z53jFbXMPEKNFPUI1J9X+MJYbcu5NW9UqwGWTXb7W YfwX22VFslzvCm+bpzH9JkC4wDN1OeLmTZVZvkFhT+jA0D/Esbk/N5vssJ8E7rpv+wll dfbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=lRW6CcT/L2E7YxVx03hDmVjN9WVwHSSuzHQOPSMfqaU=; fh=HOV9RfjXTe0MLEeDGEV8bg/ZltJJ1avS9FWCDzNrXi8=; b=L2HMSdwQtiXvEVhPUqbc7mGmhrBN9Eg3sP04UTKwErcG5IoR7NtlJyzZlRZ54e6XXN Q+1DYHO3ilhwKHPwlVFxp6YaQuYaCqbKzpxXmnuSnOnE2QokN+hIcVp1j4nxJmmMG8fQ dkG61ysDulbrhC4+Mo1pGoUvUZnCwi2PuRUBcoh8Fuxfvkd2SKB33l8mhbVjsDX7h2vQ y4izYEFh0LTG17ZMQntCKPdViw+JtrYNRk5l/rOUzOZfXJTK/CaWHcJ2zsArgYYuoDYE FbODLUjej9I19XmhJxPfmuVnJeOPr2oBX9Txv54E7fdWFINbsJLb7N1HVdUb7q4NQgnb 32Xg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Pmm1W96s; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j70-20020a638049000000b00553c2f85095si4228493pgd.832.2023.07.19.15.24.18; Wed, 19 Jul 2023 15:24:29 -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=@kernel.org header.s=k20201202 header.b=Pmm1W96s; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230256AbjGSWEz (ORCPT + 99 others); Wed, 19 Jul 2023 18:04:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44698 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230229AbjGSWEx (ORCPT ); Wed, 19 Jul 2023 18:04:53 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 07AB11FDC; Wed, 19 Jul 2023 15:04:46 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 682666184B; Wed, 19 Jul 2023 22:04:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EDB19C433C8; Wed, 19 Jul 2023 22:04:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689804284; bh=LxOZUcCoPlz4lTzVpOYBntP8TLpXJKJ8Pl+iUGHVfFM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Pmm1W96sEvo+HqQaHeU5H/echSiacOHIZHyQDgkhzZOktupW2XWtwjZ8uvu/ZGuO4 0QntzVGHMCQxBc1Fjj3ldeC5u1GSJXkOGG773jtvFX4oCsciu+nXOjGmENOGrm2mkE cgG+GRs+a+CMSGLI8HmkP3UeHZVv5xnndcuSEHANPj4GQMG7V6iFLhI2LntOrSs42n Zjl1RW2d/3crQDN3xuX8IXiLIELmek82JxLtVoKrkWzooQcwGsz3LmrFopuns45g5G ifL4zvz9aC4TUS+lWfuMBtN5jjKM0z2IG1jUvGgKT8Hhd5lV5I9g78/KAWsu2ml7Gl U/Ac/4UwbyLSA== Received: (nullmailer pid 861466 invoked by uid 1000); Wed, 19 Jul 2023 22:04:42 -0000 Date: Wed, 19 Jul 2023 16:04:42 -0600 From: Rob Herring To: Matthew Croughan Cc: Krzysztof Kozlowski , Conor Dooley , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Maxime Ripard , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3] arm64: dts: allwinner: h616: Add Mango Pi MQ-Quad DTS Message-ID: <20230719220442.GA859690-robh@kernel.org> References: <20230718152206.1430313-1-matthew.croughan@nix.how> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230718152206.1430313-1-matthew.croughan@nix.how> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 On Tue, Jul 18, 2023 at 04:22:03PM +0100, Matthew Croughan wrote: > Mango Pi MQ Quad is a H616 based SBC, add basic support for the board > and its peripherals > > Signed-off-by: Matthew Croughan > --- > V1 -> V2: Alphabetical ordering, added "widora,mangopi-mq-quad" compatible > V2 -> V3: Added Signed-off-by, add to device-tree compatible/bindings documentation > > .../devicetree/bindings/arm/sunxi.yaml | 5 + Bindings should be a separate patch. > arch/arm64/boot/dts/allwinner/Makefile | 1 + > .../allwinner/sun50i-h616-mangopi-mq-quad.dts | 183 ++++++++++++++++++ > 3 files changed, 189 insertions(+) > create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-h616-mangopi-mq-quad.dts > > diff --git a/Documentation/devicetree/bindings/arm/sunxi.yaml b/Documentation/devicetree/bindings/arm/sunxi.yaml > index ee8fdd2da869..2dee815fd45e 100644 > --- a/Documentation/devicetree/bindings/arm/sunxi.yaml > +++ b/Documentation/devicetree/bindings/arm/sunxi.yaml > @@ -862,6 +862,11 @@ properties: > - const: wexler,tab7200 > - const: allwinner,sun7i-a20 > > + - description: MangoPi MQ-Quad > + items: > + - const: widora,mangopi-mq-quad > + - const: allwinner,sun50i-h616 > + > - description: MangoPi MQ-R board > items: > - const: widora,mangopi-mq-r-t113 > 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..47fd49af2886 > --- /dev/null > +++ b/arch/arm64/boot/dts/allwinner/sun50i-h616-mangopi-mq-quad.dts > @@ -0,0 +1,183 @@ > +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) > +// Copyright (C) 2020 Arm Ltd. > +/* > + * Copyright (C) 2023 Matthew Croughan > + */ Why 2 comment styles for copyrights? > + > +/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"; > +}; > + > +/* 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"; > + reg = <0x36>; > + x-powers,self-working-mode; > + regulators { > + reg_aldo1: aldo1 { > + regulator-always-on; > + regulator-min-microvolt = <1800000>; > + regulator-max-microvolt = <1800000>; > + regulator-name = "vcc-1v8"; > + }; > + > + reg_dldo1: dldo1 { > + regulator-always-on; > + regulator-min-microvolt = <3300000>; > + regulator-max-microvolt = <3300000>; > + regulator-name = "vcc-3v3-pmic"; > + }; > + > + 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 >