From mboxrd@z Thu Jan 1 00:00:00 1970 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1B816C001DE for ; Sun, 6 Aug 2023 11:52:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ZOjHV21kx06WwqdXxQJPQjlaVLqbnBVjPE01Yjyg9ic=; b=dbr5pP+LZT3osY xhdBk/eDG6Kcr3w+9vxCbGo77H+z2sthuumzl0qZT8Z2934OjqaQYK4a2Sy8MXKbo7w4DoJnOLgDi EYZlqQ8Ok5h5ShLp9jkijy1tc1dUrBU25uMo2y2XHRBr+W1502c9WQLhy1AXNVcjlExQtbsedWkuN OSutlItLzp3F+04Q9VlfSLqk3Yk+/LIrDiyn7EZTLm0ZhqRv3eBUEgxdla0KgLlPIENqzwKBLdW9I TS7pvDx1/f7F62078pC7LB8I5UaBY6qHRHf6R8IFgWi1kRPqFxUMRrOypNcQr86X5ZHHqUxf+DcsR 3mmsUiB4tMbvsiYWL2OQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qScIT-00FMsA-0a; Sun, 06 Aug 2023 11:51:45 +0000 Received: from mail-lf1-x135.google.com ([2a00:1450:4864:20::135]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qScIP-00FMrb-2q for linux-arm-kernel@lists.infradead.org; Sun, 06 Aug 2023 11:51:43 +0000 Received: by mail-lf1-x135.google.com with SMTP id 2adb3069b0e04-4fe2de785e7so6004805e87.1 for ; Sun, 06 Aug 2023 04:51:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691322698; x=1691927498; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=uSegRepTwLPnXiUntiRa8X8cOH9xGOm2xw2wPMUtKGg=; b=mWYIoanLfnktzVBbEXpR8CNDx0mgUaNc4QdnR0Xrgls6h0+OKuhVMPOvGsJtbDSsTF RxLLF0KllFSvWwVfol0qvezBHiBlOak6mcBQ2FEqeXciM4g68mvgXhMNDYQS/EuUUTtM 8E3UTo9T2Q1B1f37UFSIJ4rrpZyfu3Az3QmTSU+TDKQ0RL8GfQeQvfuR/BevCU07/FZb OafcEJ/EPkmWlC/Tp04BJ7H28x4F1gmdUIQBYmV08Y8ynhktQ9GC6aSFnwlyswhAWcKf X4c1WYEKfVeHUMllqUrrh6nUQWa313lTr/cekfopgZIirtRKUFfJHeZdHVVekaMFSmBy P3ww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691322698; x=1691927498; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=uSegRepTwLPnXiUntiRa8X8cOH9xGOm2xw2wPMUtKGg=; b=bvU4NQD9BCWE7d0K2i4BaxVGPyfkBLbgjY0nwN7hJPOGpEyrWLyNDylzIpH9D/aRb2 9xZPynXJWesRSZfAKtIuOietyJwboqRhS0gsHu1zkLh1L1sbtq9rYgogjdAuKuQJ1zut EkGvDHXI3l5tdv73RaBm45M1PTosu1e0r6OM6gmEYib6jUMUKeWp9ti6zHye7oJ3Uxpg JoaKjk4Gzbo6q+yM6Gzy8terxKjntEUfUMHIvJGq1IEJ4CaCDoGwpGGszTqs4JUzpc3s hFDOGExA4eMnmKDyzbTc3pmxUWUYb2EpfyyNn8Z5gs+U0Lge5TFyQcIgDt9yDkU04mU5 fbXg== X-Gm-Message-State: AOJu0YwW/g3SJw06m+aW5O7WhOcXHu8HeGKe228sCjf1dtzlrRMeza91 1gri513ebfnct0LKg/0iwOU= X-Google-Smtp-Source: AGHT+IEPlxMTuUEU7CB6rXL95xZ/zc5jRJORtE6U8tMI2zzQLoxtVWhNj6S7L+Tr/Bpu+DtoeCc9Eg== X-Received: by 2002:a05:6512:34d2:b0:4f8:7513:8cac with SMTP id w18-20020a05651234d200b004f875138cacmr3451801lfr.48.1691322697578; Sun, 06 Aug 2023 04:51:37 -0700 (PDT) Received: from jernej-laptop.localnet (82-149-1-233.dynamic.telemach.net. [82.149.1.233]) by smtp.gmail.com with ESMTPSA id g3-20020a50ee03000000b0052314366967sm3788421eds.80.2023.08.06.04.51.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 06 Aug 2023 04:51:37 -0700 (PDT) From: Jernej =?utf-8?B?xaBrcmFiZWM=?= To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chen-Yu Tsai , Samuel Holland , Matthew Croughan 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: Re: [PATCH v6 2/2] arm64: dts: allwinner: h616: Add Mango Pi MQ-Quad DTS Date: Sun, 06 Aug 2023 13:51:36 +0200 Message-ID: <2151035.irdbgypaU6@jernej-laptop> In-Reply-To: <20230805233715.1216456-3-matthew.croughan@nix.how> References: <20230805233715.1216456-1-matthew.croughan@nix.how> <20230805233715.1216456-3-matthew.croughan@nix.how> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230806_045141_923915_69853BF3 X-CRM114-Status: GOOD ( 24.58 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Dne nedelja, 06. avgust 2023 ob 01:34:56 CEST je Matthew Croughan napisal(a): > 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"; There is no point having device node with properties but without compatible. You also don't provide any ethernet alias, which would allow U-Boot to add MAC property. In any case, rtw88 driver now supports rtl8723ds, but it's loaded based on SDIO ID. It doesn't take any info from DT yet. I suggest that you drop it for now and if/when rtw88 driver gains support for taking GPIO property for host wakeup, it's added then. Best regards, Jernej > + }; > +}; > + > + > +&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"; > +}; _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel