From nobody Tue Apr 7 11:18:26 2026 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 8A1F0C43217 for ; Sun, 16 Oct 2022 17:30:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230001AbiJPRaW (ORCPT ); Sun, 16 Oct 2022 13:30:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44348 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229803AbiJPRaQ (ORCPT ); Sun, 16 Oct 2022 13:30:16 -0400 Received: from proxmox1.postmarketos.org (proxmox1.postmarketos.org [213.239.216.189]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E9508240A9; Sun, 16 Oct 2022 10:30:15 -0700 (PDT) Received: from localhost.localdomain (cpc76482-cwma10-2-0-cust629.7-3.cable.virginm.net [86.14.22.118]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by proxmox1.postmarketos.org (Postfix) with ESMTPSA id 819381402B9; Sun, 16 Oct 2022 17:30:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=postmarketos.org; s=donut; t=1665941412; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=biK9SKRwYJsO1jq7QuCitwGwUZNgIZQWDcG6i8Ktt8Q=; b=zmWI3/T7/NCVm95YqsksbVCdkiMg9H2yLlvyJKghEcU4dW0P4Moq3o7ZpgkLrpsgvRz/tX CBIrJJtpnMMy4tWF8e231h+FDgRlSsRD0bv9ilPqgsqq//07tY9mH1IzePyu4QiPrABte6 LpHXzOaDpWrZCCpef/1gn13MDidn2zU= From: Caleb Connolly To: caleb@connolly.tech Cc: Dmitry Baryshkov , Andy Gross , Bjorn Andersson , devicetree@vger.kernel.org, Konrad Dybcio , Krzysztof Kozlowski , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Rob Herring Subject: [PATCH v2 1/3] arm64: dts: qcom: sdm845: commonize bluetooth UART pinmux Date: Sun, 16 Oct 2022 18:29:41 +0100 Message-Id: <20221016172944.1892206-2-kc@postmarketos.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221016172944.1892206-1-kc@postmarketos.org> References: <20221016172944.1892206-1-kc@postmarketos.org> Reply-To: Caleb Connolly 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" From: Caleb Connolly The 4-pin configuration for UART6 is used for all or almost all SDM845 devices with built in Bluetooth. Move the pinmux configuration to sdm845.dtsi in preparation to be removed from individual devices in future patches. Suggested-by: Dmitry Baryshkov Signed-off-by: Caleb Connolly Reviewed-by: Krzysztof Kozlowski --- arch/arm64/boot/dts/qcom/sdm845-cheza.dtsi | 37 +------------------ arch/arm64/boot/dts/qcom/sdm845-db845c.dts | 25 +------------ .../boot/dts/qcom/sdm845-oneplus-common.dtsi | 28 +------------- .../boot/dts/qcom/sdm845-xiaomi-beryllium.dts | 27 +------------- .../boot/dts/qcom/sdm845-xiaomi-polaris.dts | 27 +------------- arch/arm64/boot/dts/qcom/sdm845.dtsi | 22 +++++++++++ 6 files changed, 32 insertions(+), 134 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sdm845-cheza.dtsi b/arch/arm64/boot/d= ts/qcom/sdm845-cheza.dtsi index b5eb8f7eca1d..923d5d681daa 100644 --- a/arch/arm64/boot/dts/qcom/sdm845-cheza.dtsi +++ b/arch/arm64/boot/dts/qcom/sdm845-cheza.dtsi @@ -860,6 +860,8 @@ i2c_tunnel: i2c-tunnel { &uart6 { status =3D "okay"; =20 + pinctrl-0 =3D <&qup_uart6_4pin>; + bluetooth: wcn3990-bt { compatible =3D "qcom,wcn3990-bt"; vddio-supply =3D <&src_pp1800_s4a>; @@ -1079,41 +1081,6 @@ pinconf { }; }; =20 -&qup_uart6_default { - /* Change pinmux to all 4 pins since CTS and RTS are connected */ - pinmux { - pins =3D "gpio45", "gpio46", - "gpio47", "gpio48"; - }; - - pinconf-cts { - /* - * Configure a pull-down on 45 (CTS) to match the pull of - * the Bluetooth module. - */ - pins =3D "gpio45"; - bias-pull-down; - }; - - pinconf-rts-tx { - /* We'll drive 46 (RTS) and 47 (TX), so no pull */ - pins =3D "gpio46", "gpio47"; - drive-strength =3D <2>; - bias-disable; - }; - - pinconf-rx { - /* - * Configure a pull-up on 48 (RX). This is needed to avoid - * garbage data when the TX pin of the Bluetooth module is - * in tri-state (module powered off or not driving the - * signal yet). - */ - pins =3D "gpio48"; - bias-pull-up; - }; -}; - &qup_uart9_default { pinconf-tx { pins =3D "gpio4"; diff --git a/arch/arm64/boot/dts/qcom/sdm845-db845c.dts b/arch/arm64/boot/d= ts/qcom/sdm845-db845c.dts index c6e2c571b452..f87b1e2025b6 100644 --- a/arch/arm64/boot/dts/qcom/sdm845-db845c.dts +++ b/arch/arm64/boot/dts/qcom/sdm845-db845c.dts @@ -986,6 +986,8 @@ &uart3 { &uart6 { status =3D "okay"; =20 + pinctrl-0 =3D <&qup_uart6_4pin>; + bluetooth { compatible =3D "qcom,wcn3990-bt"; =20 @@ -1141,29 +1143,6 @@ pinconf { }; }; =20 -&qup_uart6_default { - pinmux { - pins =3D "gpio45", "gpio46", "gpio47", "gpio48"; - function =3D "qup6"; - }; - - cts { - pins =3D "gpio45"; - bias-disable; - }; - - rts-tx { - pins =3D "gpio46", "gpio47"; - drive-strength =3D <2>; - bias-disable; - }; - - rx { - pins =3D "gpio48"; - bias-pull-up; - }; -}; - &qup_uart9_default { pinconf-tx { pins =3D "gpio4"; diff --git a/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi b/arch/arm= 64/boot/dts/qcom/sdm845-oneplus-common.dtsi index 392461c29e76..02ec0fa4e5f0 100644 --- a/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi +++ b/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi @@ -500,35 +500,11 @@ pinconf-rx { }; }; =20 -/* - * Prevent garbage data on bluetooth UART lines - */ -&qup_uart6_default { - pinmux { - pins =3D "gpio45", "gpio46", "gpio47", "gpio48"; - function =3D "qup6"; - }; - - cts { - pins =3D "gpio45"; - bias-pull-down; - }; - - rts-tx { - pins =3D "gpio46", "gpio47"; - drive-strength =3D <2>; - bias-disable; - }; - - rx { - pins =3D "gpio48"; - bias-pull-up; - }; -}; - &uart6 { status =3D "okay"; =20 + pinctrl-0 =3D <&qup_uart6_4pin>; + bluetooth { compatible =3D "qcom,wcn3990-bt"; =20 diff --git a/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium.dts b/arch/ar= m64/boot/dts/qcom/sdm845-xiaomi-beryllium.dts index 82c27f90d300..5dde27b7daf2 100644 --- a/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium.dts +++ b/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium.dts @@ -481,6 +481,8 @@ wcd_intr_default: wcd_intr_default { &uart6 { status =3D "okay"; =20 + pinctrl-0 =3D <&qup_uart6_4pin>; + bluetooth { compatible =3D "qcom,wcn3990-bt"; =20 @@ -567,28 +569,3 @@ &wifi { vdd-3.3-ch0-supply =3D <&vreg_l25a_3p3>; vdd-3.3-ch1-supply =3D <&vreg_l23a_3p3>; }; - -/* PINCTRL - additions to nodes defined in sdm845.dtsi */ - -&qup_uart6_default { - pinmux { - pins =3D "gpio45", "gpio46", "gpio47", "gpio48"; - function =3D "qup6"; - }; - - cts { - pins =3D "gpio45"; - bias-disable; - }; - - rts-tx { - pins =3D "gpio46", "gpio47"; - drive-strength =3D <2>; - bias-disable; - }; - - rx { - pins =3D "gpio48"; - bias-pull-up; - }; -}; diff --git a/arch/arm64/boot/dts/qcom/sdm845-xiaomi-polaris.dts b/arch/arm6= 4/boot/dts/qcom/sdm845-xiaomi-polaris.dts index 7747081b9887..c8b439dcbca4 100644 --- a/arch/arm64/boot/dts/qcom/sdm845-xiaomi-polaris.dts +++ b/arch/arm64/boot/dts/qcom/sdm845-xiaomi-polaris.dts @@ -639,6 +639,8 @@ wcd_intr_default: wcd-intr-default { &uart6 { status =3D "okay"; =20 + pinctrl-0 =3D <&qup_uart6_4pin>; + bluetooth { compatible =3D "qcom,wcn3990-bt"; =20 @@ -735,28 +737,3 @@ &wifi { qcom,snoc-host-cap-skip-quirk; status =3D "okay"; }; - -/* PINCTRL - additions to nodes defined in sdm845.dtsi */ - -&qup_uart6_default { - pinmux { - pins =3D "gpio45", "gpio46", "gpio47", "gpio48"; - function =3D "qup6"; - }; - - cts { - pins =3D "gpio45"; - bias-disable; - }; - - rts-tx { - pins =3D "gpio46", "gpio47"; - drive-strength =3D <2>; - bias-disable; - }; - - rx { - pins =3D "gpio48"; - bias-pull-up; - }; -}; diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qco= m/sdm845.dtsi index f0e286715d1b..55de40bea684 100644 --- a/arch/arm64/boot/dts/qcom/sdm845.dtsi +++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi @@ -2971,6 +2971,28 @@ pinmux { }; }; =20 + qup_uart6_4pin: qup-uart6-4pin-state { + + cts-pins { + pins =3D "gpio45"; + function =3D "qup6"; + bias-pull-down; + }; + + rts-tx-pins { + pins =3D "gpio46", "gpio47"; + function =3D "qup6"; + drive-strength =3D <2>; + bias-disable; + }; + + rx-pins { + pins =3D "gpio48"; + function =3D "qup6"; + bias-pull-up; + }; + }; + qup_uart7_default: qup-uart7-default { pinmux { pins =3D "gpio95", "gpio96"; --=20 2.38.0 From nobody Tue Apr 7 11:18:26 2026 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 97807C433FE for ; Sun, 16 Oct 2022 17:30:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229803AbiJPRaY (ORCPT ); Sun, 16 Oct 2022 13:30:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44362 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229818AbiJPRaR (ORCPT ); Sun, 16 Oct 2022 13:30:17 -0400 Received: from proxmox1.postmarketos.org (proxmox1.postmarketos.org [213.239.216.189]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 90D3023EA0; Sun, 16 Oct 2022 10:30:16 -0700 (PDT) Received: from localhost.localdomain (cpc76482-cwma10-2-0-cust629.7-3.cable.virginm.net [86.14.22.118]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by proxmox1.postmarketos.org (Postfix) with ESMTPSA id 653D41402C7; Sun, 16 Oct 2022 17:30:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=postmarketos.org; s=donut; t=1665941414; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=WmAHFNIPG4R/4pg5dzKf5wTHE0K6fc3VSz40IAZ3aos=; b=JtfiFXJbdAObywfWqWqIjMLBMs/u5TAxwC41ktdma2SZ1trRHyQJUKn7uUyTV4CUP0ADj0 nXE6GW+q4pV8j5ClPOONtv1C5Ui31jAwnYNWSTbanhch3BzFAVAid3DsyplIwgQexR+DNW A58WrTtsIKAIXkqFBc0P9kQS0EEyFa4= From: Caleb Connolly To: caleb@connolly.tech Cc: Dylan Van Assche , Andy Gross , Bjorn Andersson , devicetree@vger.kernel.org, Konrad Dybcio , Krzysztof Kozlowski , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Rob Herring Subject: [PATCH v2 2/3] arm64: dts: qcom: sdm845-shift-axolotl: fix Bluetooth Date: Sun, 16 Oct 2022 18:29:42 +0100 Message-Id: <20221016172944.1892206-3-kc@postmarketos.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221016172944.1892206-1-kc@postmarketos.org> References: <20221016172944.1892206-1-kc@postmarketos.org> Reply-To: Caleb Connolly 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" From: Dylan Van Assche Add serial1 alias, firmware name and use 4 pin UART pinmux. Signed-off-by: Dylan Van Assche Signed-off-by: Caleb Connolly --- arch/arm64/boot/dts/qcom/sdm845-shift-axolotl.dts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sdm845-shift-axolotl.dts b/arch/arm64= /boot/dts/qcom/sdm845-shift-axolotl.dts index 83261c9bb4f2..bb77ccfdc68c 100644 --- a/arch/arm64/boot/dts/qcom/sdm845-shift-axolotl.dts +++ b/arch/arm64/boot/dts/qcom/sdm845-shift-axolotl.dts @@ -23,6 +23,7 @@ / { aliases { display0 =3D &framebuffer0; serial0 =3D &uart9; + serial1 =3D &uart6; }; =20 chosen { @@ -693,9 +694,17 @@ config { &uart6 { status =3D "okay"; =20 + pinctrl-0 =3D <&qup_uart6_4pin>; + bluetooth { compatible =3D "qcom,wcn3990-bt"; =20 + /* + * This path is relative to the qca/ + * subdir under lib/firmware. + */ + firmware-name =3D "axolotl/crnv21.bin"; + vddio-supply =3D <&vreg_s4a_1p8>; vddxo-supply =3D <&vreg_l7a_1p8>; vddrf-supply =3D <&vreg_l17a_1p3>; --=20 2.38.0 From nobody Tue Apr 7 11:18:26 2026 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 B4942C433FE for ; Sun, 16 Oct 2022 17:30:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230030AbiJPRa2 (ORCPT ); Sun, 16 Oct 2022 13:30:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44388 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229944AbiJPRaR (ORCPT ); Sun, 16 Oct 2022 13:30:17 -0400 Received: from proxmox1.postmarketos.org (proxmox1.postmarketos.org [213.239.216.189]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 1AEA12408D; Sun, 16 Oct 2022 10:30:17 -0700 (PDT) Received: from localhost.localdomain (cpc76482-cwma10-2-0-cust629.7-3.cable.virginm.net [86.14.22.118]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by proxmox1.postmarketos.org (Postfix) with ESMTPSA id 1A3D01402C8; Sun, 16 Oct 2022 17:30:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=postmarketos.org; s=donut; t=1665941416; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vLIoAuk5Ni3RxK9d6sJqHBNqJqsK4ckapijd/uqW65Q=; b=i8Ilo4hwcW4IvTuYvbiwaJs+IWdrZvzWjjiuMzCfZbLHGiZd+GHB6TU78gyTKaQbRq0S7B 1bonmIoYKPNvqiHWPBLTJ9d4J2ltbA1GxmZLy9vGDERkYBPRJvo6BwlBZrj/AGygusz+mz K4ju3uF805qTcGMQ82UJ166a9NtHC34= From: Caleb Connolly To: caleb@connolly.tech Cc: Andy Gross , Bjorn Andersson , devicetree@vger.kernel.org, Konrad Dybcio , Krzysztof Kozlowski , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Rob Herring Subject: [PATCH v2 3/3] arm64: dts: qcom: sdm845-*: fix uart6 aliases Date: Sun, 16 Oct 2022 18:29:43 +0100 Message-Id: <20221016172944.1892206-4-kc@postmarketos.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221016172944.1892206-1-kc@postmarketos.org> References: <20221016172944.1892206-1-kc@postmarketos.org> Reply-To: Caleb Connolly 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" From: Caleb Connolly Some devices have been using hsuart0 as an alias for the bluetooth UART, rename this to serial1 Signed-off-by: Caleb Connolly --- arch/arm64/boot/dts/qcom/sdm845-cheza.dtsi | 2 +- arch/arm64/boot/dts/qcom/sdm845-db845c.dts | 2 +- arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi | 2 +- arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium.dts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sdm845-cheza.dtsi b/arch/arm64/boot/d= ts/qcom/sdm845-cheza.dtsi index 923d5d681daa..a8ae6de51af4 100644 --- a/arch/arm64/boot/dts/qcom/sdm845-cheza.dtsi +++ b/arch/arm64/boot/dts/qcom/sdm845-cheza.dtsi @@ -16,7 +16,7 @@ / { aliases { bluetooth0 =3D &bluetooth; - hsuart0 =3D &uart6; + serial1 =3D &uart6; serial0 =3D &uart9; wifi0 =3D &wifi; }; diff --git a/arch/arm64/boot/dts/qcom/sdm845-db845c.dts b/arch/arm64/boot/d= ts/qcom/sdm845-db845c.dts index f87b1e2025b6..215dd8098a44 100644 --- a/arch/arm64/boot/dts/qcom/sdm845-db845c.dts +++ b/arch/arm64/boot/dts/qcom/sdm845-db845c.dts @@ -22,7 +22,7 @@ / { =20 aliases { serial0 =3D &uart9; - hsuart0 =3D &uart6; + serial1 =3D &uart6; }; =20 chosen { diff --git a/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi b/arch/arm= 64/boot/dts/qcom/sdm845-oneplus-common.dtsi index 02ec0fa4e5f0..5d99908d4628 100644 --- a/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi +++ b/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi @@ -19,7 +19,7 @@ / { aliases { serial0 =3D &uart9; - hsuart0 =3D &uart6; + serial1 =3D &uart6; }; =20 chosen { diff --git a/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium.dts b/arch/ar= m64/boot/dts/qcom/sdm845-xiaomi-beryllium.dts index 5dde27b7daf2..1646db2328d4 100644 --- a/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium.dts +++ b/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium.dts @@ -35,7 +35,7 @@ / { qcom,msm-id =3D <321 0x20001>; =20 aliases { - hsuart0 =3D &uart6; + serial1 =3D &uart6; }; =20 gpio-keys { --=20 2.38.0