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 B6C23C369CB for ; Sun, 20 Apr 2025 02:15:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:Message-ID:References:In-Reply-To:Subject:Cc:To:From:Date: MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=MQ+9HgPjVG9TGJ6Ak3dboveUb3Ox1/+E5O2oe0/PTLM=; b=wLx9e6KAPOzsD33JUksm2E6W10 84/fZuqjnJuWOeLYqCIZgBNtLec9dkTQTBm8cdrSgO9Z5XGUF2sMVisQN5Fe+xdJIEdG0bETwzc32 jnBMzEcea9TjvLkYs/WXSVKaWfC11M+iDzdgOpO+ab0tgz7RUjKthmvPIk2oQzCmbHIE1crwtcfp/ TCOqYlXDvn4uN8r8rU8vpEifDCnYroUpzEARx6GH5MtbSgu6Kck4B8GGjscpsGxbNu+Ptuu12T/MQ 2edhssd9lwYl7sPHZWUe9SlbBSK4yNgAM9CKnMzn2FuCGI1AWR+EzGeLmuBLXH0Hkjq6svKYa9/WM mzCEcHeg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1u6KDW-000000025JX-2iXq; Sun, 20 Apr 2025 02:15:34 +0000 Received: from mail.manjaro.org ([2a01:4f8:c0c:51f3::1]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1u6KBd-000000025FC-0wxP for linux-arm-kernel@lists.infradead.org; Sun, 20 Apr 2025 02:13:38 +0000 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=manjaro.org; s=2021; t=1745115214; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=MQ+9HgPjVG9TGJ6Ak3dboveUb3Ox1/+E5O2oe0/PTLM=; b=t/K4e4ZQ91U40MPZZfYP+tW7G8Yt+i2KZljqWJH+xAXlmPPJo85Mud9lHJYQ0NxQFb1yrf OI8F0v6rB8uJJqtrgdH4UQjas+4Yj85SFZDpOu/jihMblsVFvar4sLTstmayAM5Hxy0aG2 peURqUsmQ7eg28ekoJ4eRw1OrYrBJYgarfySl+uvuXQ/wmvmHsTFCp9Wd4Wt9dNMj4tAH+ 0ipphEZCWT/ECQ6YwexkEWgdxqYZu4xrI2OUvnmN0Ui0DicAt/SxLKi2I0XQrfuusLjo3L xgJEC/I8D9eRihda+pkzKGPNPqu6XpndioVPD47rshQjihexa3tjtFpgjHGUzg== Date: Sun, 20 Apr 2025 04:13:33 +0200 From: Dragan Simic To: wens@csie.org Cc: Peter Robinson , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jernej Skrabec , Samuel Holland , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev Subject: Re: [PATCH v3 2/2] arm64: dts: allwinner: a64: Add WiFi/BT header on SoPine In-Reply-To: References: <20250419160051.677485-1-pbrobinson@gmail.com> <20250419160051.677485-3-pbrobinson@gmail.com> <5dd7825c9fcc83764fbb4b0b53704152@manjaro.org> <9380495a5dd09c6ab08e0a8cd315bf45@manjaro.org> Message-ID: <20b11baa25be196ec3e46144f11cb334@manjaro.org> X-Sender: dsimic@manjaro.org Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Authentication-Results: ORIGINATING; auth=pass smtp.auth=dsimic@manjaro.org smtp.mailfrom=dsimic@manjaro.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250419_191337_648627_5011112E X-CRM114-Status: GOOD ( 22.52 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hello Chen-Yu, On 2025-04-20 03:59, Chen-Yu Tsai wrote: > On Sun, Apr 20, 2025 at 3:57 AM Dragan Simic > wrote: >> >> On 2025-04-19 21:26, Peter Robinson wrote: >> > On Sat, 19 Apr 2025 at 19:25, Dragan Simic wrote: >> >> On 2025-04-19 18:00, Peter Robinson wrote: >> >>> This adds all the pin mappings on the WiFi/BT header on >> >>> the SoPine baseboard/A64-LTS. They're disabled by default >> >>> as the modules don't ship by default. This includes, where >> >>> they haven't been already, UART1 for BT and mmc1 for WiFi. >> >> >> >> The patch subject should be improved a bit, to include >> >> "Baseboard" as well. Having just "SoPine" is a bit too >> >> vague, and it should actually be written as "SOPINE" >> >> at all places in the prose. >> >> >> >>> Signed-off-by: Peter Robinson >> >>> --- >> >>> .../allwinner/sun50i-a64-sopine-baseboard.dts | 25 >> >> +++++++++++++++++++ >> >>> 1 file changed, 25 insertions(+) >> >>> >> >>> diff --git >> >>> a/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts >> >>> b/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts >> >>> index be2347c8f267..64d696f110ee 100644 >> >>> --- >> >> a/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts >> >>> +++ >> >> b/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts >> >>> @@ -42,6 +42,11 @@ reg_vcc1v8: vcc1v8 { >> >>> regulator-min-microvolt = <1800000>; >> >>> regulator-max-microvolt = <1800000>; >> >>> }; >> >>> + >> >>> + wifi_pwrseq: pwrseq { >> >>> + compatible = "mmc-pwrseq-simple"; >> >>> + reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 >> >> */ >> >>> + }; >> >> >> >> Is there a reason why the status of this node isn't set to >> >> "disabled"? Or even better, why don't we move this node >> >> entirely into the proposed DT overlay? >> >> >> >> The required reset procedure actually depends on what's >> >> found on the add-on module, so it should belong to the DT >> >> overlay that defines the add-on module. >> > >> > But the pin itself is pinned out through the header on the device. >> >> Good point. On second thought, the right approach should be >> to reserve the reset pin through pinctrl additions to the >> board dts files, but to move the "mmc-pwrseq-simple" nodes >> to the proposed add-on overlays. Actually, s/overlays/overlay/ >> >> You can have a look at rk3399-pinebook-pro.dts for an example >> of such a pinctrl definition and its use. > > For sunxi, we don't add pinctrl nodes for GPIO usage. I see, thanks for the note. In that case, I'd still suggest that the "mmc-pwrseq-simple" nodes are moved to the proposed add-on overlay, because that's where they belong to. In theory, some add-on module may actually not need resetting, so defining that should belong to what defines the specific add-on module, which is the add-on overlay. >> >>> }; >> >>> >> >>> &ac_power_supply { >> >>> @@ -103,6 +108,18 @@ ext_rgmii_phy: ethernet-phy@1 { >> >>> }; >> >>> }; >> >>> >> >>> +/* On Wifi/BT connector */ >> >>> +&mmc1 { >> >>> + pinctrl-names = "default"; >> >>> + pinctrl-0 = <&mmc1_pins>; >> >>> + vmmc-supply = <®_dldo4>; >> >>> + vqmmc-supply = <®_eldo1>; >> >>> + mmc-pwrseq = <&wifi_pwrseq>; >> >> >> >> Of course, the "mmc-pwrseq" property would then also be moved >> >> to the DT overlay that defines the add-on module. >> >> >> >>> + bus-width = <4>; >> >>> + non-removable; >> >>> + status = "disabled"; >> >>> +}; >> >>> + >> >>> &mmc2 { >> >>> pinctrl-names = "default"; >> >>> pinctrl-0 = <&mmc2_pins>; >> >>> @@ -175,6 +192,14 @@ &uart0 { >> >>> status = "okay"; >> >>> }; >> >>> >> >>> +/* On Wifi/BT connector, with RTS/CTS */ >> >>> +&uart1 { >> >>> + pinctrl-names = "default"; >> >>> + pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>; >> >>> + uart-has-rtscts; >> >>> + status = "disabled"; >> >>> +}; >> >>> + >> >>> /* On Pi-2 connector */ >> >>> &uart2 { >> >>> pinctrl-names = "default";