linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Konrad Dybcio <konrad.dybcio@somainline.org>
To: ~postmarketos/upstreaming@lists.sr.ht
Cc: martin.botka@somainline.org,
	angelogioacchino.delregno@somainline.org,
	marijn.suijten@somainline.org, jamipkettunen@somainline.org,
	Konrad Dybcio <konrad.dybcio@somainline.org>,
	Andy Gross <agross@kernel.org>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	Rob Herring <robh+dt@kernel.org>,
	linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH 08/39] arm64: dts: qcom: sdm630: Fix TLMM node and pinctrl configuration
Date: Thu, 29 Jul 2021 00:25:11 +0200	[thread overview]
Message-ID: <20210728222542.54269-9-konrad.dybcio@somainline.org> (raw)
In-Reply-To: <20210728222542.54269-1-konrad.dybcio@somainline.org>

From: AngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org>

Previous pinctrl configuration was wrong. Fix it.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org>
Signed-off-by: Konrad Dybcio <konrad.dybcio@somainline.org>
---
 arch/arm64/boot/dts/qcom/sdm630.dtsi | 212 ++++++++++++++++++---------
 1 file changed, 139 insertions(+), 73 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/sdm630.dtsi b/arch/arm64/boot/dts/qcom/sdm630.dtsi
index 35ed2e17f8b6..6f251e602996 100644
--- a/arch/arm64/boot/dts/qcom/sdm630.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm630.dtsi
@@ -626,14 +626,18 @@ tcsr_mutex_regs: syscon@1f40000 {
 			reg = <0x01f40000 0x20000>;
 		};
 
-		tlmm: pinctrl@3000000 {
+		tlmm: pinctrl@3100000 {
 			compatible = "qcom,sdm630-pinctrl";
-			reg = <0x03000000 0xc00000>;
+			reg = <0x03100000 0x400000>,
+				  <0x03500000 0x400000>,
+				  <0x03900000 0x400000>;
+			reg-names = "south", "center", "north";
 			interrupts = <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>;
 			gpio-controller;
-			#gpio-cells = <0x2>;
+			gpio-ranges = <&tlmm 0 0 114>;
+			#gpio-cells = <2>;
 			interrupt-controller;
-			#interrupt-cells = <0x2>;
+			#interrupt-cells = <2>;
 
 			blsp1_uart1_default: blsp1-uart1-default {
 				pins = "gpio0", "gpio1", "gpio2", "gpio3";
@@ -653,40 +657,48 @@ blsp1_uart2_default: blsp1-uart2-default {
 				bias-disable;
 			};
 
-			blsp2_uart1_tx_active: blsp2-uart1-tx-active {
-				pins = "gpio16";
-				drive-strength = <2>;
-				bias-disable;
-			};
-
-			blsp2_uart1_tx_sleep: blsp2-uart1-tx-sleep {
-				pins = "gpio16";
-				drive-strength = <2>;
-				bias-pull-up;
-			};
+			blsp2_uart1_default: blsp2-uart1-active {
+				tx-rts {
+					pins = "gpio16", "gpio19";
+					function = "blsp_uart5";
+					drive-strength = <2>;
+					bias-disable;
+				};
 
-			blsp2_uart1_rxcts_active: blsp2-uart1-rxcts-active {
-				pins = "gpio17", "gpio18";
-				drive-strength = <2>;
-				bias-disable;
-			};
+				rx {
+					/*
+					 * Avoid garbage data while BT module
+					 * is powered off or not driving signal
+					 */
+					pins = "gpio17";
+					function = "blsp_uart5";
+					drive-strength = <2>;
+					bias-pull-up;
+				};
 
-			blsp2_uart1_rxcts_sleep: blsp2-uart1-rxcts-sleep {
-				pins = "gpio17", "gpio18";
-				drive-strength = <2>;
-				bias-no-pull;
+				cts {
+					/* Match the pull of the BT module */
+					pins = "gpio18";
+					function = "blsp_uart5";
+					drive-strength = <2>;
+					bias-pull-down;
+				};
 			};
 
-			blsp2_uart1_rfr_active: blsp2-uart1-rfr-active {
-				pins = "gpio19";
-				drive-strength = <2>;
-				bias-disable;
-			};
+			blsp2_uart1_sleep: blsp2-uart1-sleep {
+				tx {
+					pins = "gpio16";
+					function = "gpio";
+					drive-strength = <2>;
+					bias-pull-up;
+				};
 
-			blsp2_uart1_rfr_sleep: blsp2-uart1-rfr-sleep {
-				pins = "gpio19";
-				drive-strength = <2>;
-				bias-no-pull;
+				rx-cts-rts {
+					pins = "gpio17", "gpio18", "gpio19";
+					function = "gpio";
+					drive-strength = <2>;
+					bias-no-pull;
+				};
 			};
 
 			i2c1_default: i2c1-default {
@@ -785,50 +797,106 @@ i2c8_sleep: i2c8-sleep {
 				bias-pull-up;
 			};
 
-			sdc1_clk_on: sdc1-clk-on {
-				pins = "sdc1_clk";
-				bias-disable;
-				drive-strength = <16>;
-			};
+			sdc1_state_on: sdc1-on {
+				clk {
+					pins = "sdc1_clk";
+					bias-disable;
+					drive-strength = <16>;
+				};
 
-			sdc1_clk_off: sdc1-clk-off {
-				pins = "sdc1_clk";
-				bias-disable;
-				drive-strength = <2>;
-			};
+				cmd {
+					pins = "sdc1_cmd";
+					bias-pull-up;
+					drive-strength = <10>;
+				};
 
-			sdc1_cmd_on: sdc1-cmd-on {
-				pins = "sdc1_cmd";
-				bias-pull-up;
-				drive-strength = <10>;
-			};
+				data {
+					pins = "sdc1_data";
+					bias-pull-up;
+					drive-strength = <10>;
+				};
 
-			sdc1_cmd_off: sdc1-cmd-off {
-				pins = "sdc1_cmd";
-				bias-pull-up;
-				drive-strength = <2>;
+				rclk {
+					pins = "sdc1_rclk";
+					bias-pull-down;
+				};
 			};
 
-			sdc1_data_on: sdc1-data-on {
-				pins = "sdc1_data";
-				bias-pull-up;
-				drive-strength = <8>;
-			};
+			sdc1_state_off: sdc1-off {
+				clk {
+					pins = "sdc1_clk";
+					bias-disable;
+					drive-strength = <2>;
+				};
 
-			sdc1_data_off: sdc1-data-off {
-				pins = "sdc1_data";
-				bias-pull-up;
-				drive-strength = <2>;
+				cmd {
+					pins = "sdc1_cmd";
+					bias-pull-up;
+					drive-strength = <2>;
+				};
+
+				data {
+					pins = "sdc1_data";
+					bias-pull-up;
+					drive-strength = <2>;
+				};
+
+				rclk {
+					pins = "sdc1_rclk";
+					bias-pull-down;
+				};
 			};
 
-			sdc1_rclk_on: sdc1-rclk-on {
-				pins = "sdc1_rclk";
-				bias-pull-down;
+			sdc2_state_on: sdc2-on {
+				clk {
+					pins = "sdc2_clk";
+					bias-disable;
+					drive-strength = <16>;
+				};
+
+				cmd {
+					pins = "sdc2_cmd";
+					bias-pull-up;
+					drive-strength = <10>;
+				};
+
+				data {
+					pins = "sdc2_data";
+					bias-pull-up;
+					drive-strength = <10>;
+				};
+
+				sd-cd {
+					pins = "gpio54";
+					bias-pull-up;
+					drive-strength = <2>;
+				};
 			};
 
-			sdc1_rclk_off: sdc1-rclk-off {
-				pins = "sdc1_rclk";
-				bias-pull-down;
+			sdc2_state_off: sdc2-off {
+				clk {
+					pins = "sdc2_clk";
+					bias-disable;
+					drive-strength = <2>;
+				};
+
+				cmd {
+					pins = "sdc2_cmd";
+					bias-pull-up;
+					drive-strength = <2>;
+				};
+
+				data {
+					pins = "sdc2_data";
+					bias-pull-up;
+					drive-strength = <2>;
+				};
+
+				sd-cd {
+					pins = "gpio54";
+					bias-disable;
+					drive-strength = <2>;
+				};
 			};
 		};
 
@@ -986,8 +1054,8 @@ sdhc_1: sdhci@c0c4000 {
 			clock-names = "core", "iface", "xo", "ice";
 
 			pinctrl-names = "default", "sleep";
-			pinctrl-0 = <&sdc1_clk_on &sdc1_cmd_on &sdc1_data_on &sdc1_rclk_on>;
-			pinctrl-1 = <&sdc1_clk_off &sdc1_cmd_off &sdc1_data_off &sdc1_rclk_off>;
+			pinctrl-0 = <&sdc1_state_on>;
+			pinctrl-1 = <&sdc1_state_off>;
 
 			bus-width = <8>;
 			non-removable;
@@ -1354,10 +1422,8 @@ blsp2_uart1: serial@c1af000 {
 			dmas = <&blsp2_dma 0>, <&blsp2_dma 1>;
 			dma-names = "tx", "rx";
 			pinctrl-names = "default", "sleep";
-			pinctrl-0 = <&blsp2_uart1_tx_active &blsp2_uart1_rxcts_active
-				&blsp2_uart1_rfr_active>;
-			pinctrl-1 = <&blsp2_uart1_tx_sleep &blsp2_uart1_rxcts_sleep
-				&blsp2_uart1_rfr_sleep>;
+			pinctrl-0 = <&blsp2_uart1_default>;
+			pinctrl-1 = <&blsp2_uart1_sleep>;
 			status = "disabled";
 		};
 
-- 
2.32.0


  parent reply	other threads:[~2021-07-28 22:26 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20210728222542.54269-1-konrad.dybcio@somainline.org>
2021-07-28 22:25 ` [PATCH 01/39] arm64: dts: qcom: sdm630: Rewrite memory map Konrad Dybcio
2021-07-28 22:25 ` [PATCH 02/39] arm64: dts: qcom: sdm630: Add RPMPD nodes Konrad Dybcio
2021-07-28 22:25 ` [PATCH 03/39] arm64: dts: qcom: sdm630: Add MMCC node Konrad Dybcio
2021-07-28 22:25 ` [PATCH 04/39] arm64: dts: qcom: sdm630: Add interconnect provider nodes Konrad Dybcio
2021-08-10  1:02   ` Dmitry Baryshkov
2021-07-28 22:25 ` [PATCH 05/39] arm64: dts: qcom: sdm630: Add MDSS nodes Konrad Dybcio
2021-07-28 22:25 ` [PATCH 06/39] arm64: dts: qcom: sdm630: Add qfprom subnodes Konrad Dybcio
2021-07-28 22:25 ` [PATCH 07/39] arm64: dts: qcom: sdm630: Add USB configuration Konrad Dybcio
2021-07-28 22:25 ` Konrad Dybcio [this message]
2021-07-28 22:25 ` [PATCH 09/39] arm64: dts: qcom: sdm630: Add SDHCI2 node Konrad Dybcio
2021-07-28 22:25 ` [PATCH 10/39] arm64: dts: qcom: sdm630: Add interconnect and opp table to sdhc_1 Konrad Dybcio
2021-07-28 22:25 ` [PATCH 11/39] arm64: dts: qcom: sdm630: Add GPU Clock Controller node Konrad Dybcio
2021-07-28 22:25 ` [PATCH 12/39] arm64: dts: qcom: sdm630: Add clocks and power domains to SMMU nodes Konrad Dybcio
2021-07-28 22:25 ` [PATCH 13/39] arm64: dts: qcom: sdm630: Add qcom,adreno-smmu compatible Konrad Dybcio
2021-07-28 22:25 ` [PATCH 14/39] arm64: dts: qcom: sdm630: Add TSENS node Konrad Dybcio
2021-07-29 10:50   ` Thara Gopinath
2021-07-29 10:52     ` Konrad Dybcio
2021-07-29 10:54       ` Thara Gopinath
2021-07-29 10:55         ` Konrad Dybcio
2021-07-29 11:14           ` Thara Gopinath
2021-07-29 13:48             ` AngeloGioacchino Del Regno
2021-08-24 15:16               ` Bjorn Andersson
2021-08-02 22:39   ` Rob Herring
2021-07-28 22:25 ` [PATCH 15/39] arm64: dts: qcom: sdm630: Add modem/ADSP SMP2P nodes Konrad Dybcio
2021-07-28 22:25 ` [PATCH 16/39] arm64: dts: qcom: sdm630: Add thermal-zones configuration Konrad Dybcio
2021-07-28 22:25 ` [PATCH 17/39] arm64: dts: qcom: sdm630: Add ADSP remoteproc configuration Konrad Dybcio
2021-07-28 22:25 ` [PATCH 18/39] arm64: dts: qcom: sdm630: Raise tcsr_mutex_regs size Konrad Dybcio
2021-07-28 22:25 ` [PATCH 19/39] arm64: dts: qcom: sdm630: Add Adreno 508 GPU configuration Konrad Dybcio
2021-07-28 22:25 ` [PATCH 20/39] arm64: dts: qcom: pm660: Support SPMI regulators on PMIC sid 1 Konrad Dybcio
2021-07-28 22:25 ` [PATCH 21/39] arm64: dts: qcom: pm660l: Add WLED support Konrad Dybcio
2021-07-28 22:25 ` [PATCH 22/39] arm64: dts: qcom: pm660l: Support SPMI regulators on PMIC sid 3 Konrad Dybcio
2021-07-28 22:25 ` [PATCH 23/39] arm64: dts: qcom: pm660(l): Add VADC and temp alarm nodes Konrad Dybcio
2021-07-28 22:25 ` [PATCH 24/39] arm64: dts: qcom: sdm660: Make the DTS an overlay on top of 630 Konrad Dybcio
2021-07-28 22:25 ` [PATCH 25/39] arm64: dts: qcom: Add device tree for SDM636 Konrad Dybcio
2021-07-28 22:25 ` [PATCH 26/39] arm64: dts: qcom: sdm630: Add IMEM node Konrad Dybcio
2021-07-28 22:25 ` [PATCH 27/39] arm64: dts: qcom: sdm630: Configure the camera subsystem Konrad Dybcio
2021-07-28 22:25 ` [PATCH 28/39] arm64: dts: qcom: sdm660: Add required nodes for DSI1 Konrad Dybcio
2021-07-28 22:25 ` [PATCH 29/39] arm64: dts: qcom: sdm630-xperia-nile: Add all RPM and fixed regulators Konrad Dybcio
2021-07-28 22:25 ` [PATCH 30/39] arm64: dts: qcom: sdm630-nile: Use &labels Konrad Dybcio
2021-07-28 22:25 ` [PATCH 31/39] arm64: dts: qcom: sdm630-nile: Add USB Konrad Dybcio
2021-07-28 22:25 ` [PATCH 32/39] arm64: dts: qcom: sdm630-nile: Add Volume up key Konrad Dybcio
2021-07-28 22:25 ` [PATCH 33/39] arm64: dts: qcom: sdm630-xperia: Retire sdm630-sony-xperia-ganges.dtsi Konrad Dybcio
2021-07-28 22:25 ` [PATCH 34/39] arm64: dts: qcom: sdm630-nile: Add Synaptics touchscreen Konrad Dybcio
2021-07-28 22:25 ` [PATCH 35/39] arm64: dts: qcom: sdm630-nile: Specify ADSP firmware name Konrad Dybcio
2021-07-28 22:25 ` [PATCH 36/39] arm64: dts: qcom: sdm630-nile: Enable uSD card slot Konrad Dybcio
2021-07-28 22:25 ` [PATCH 37/39] arm64: dts: qcom: sdm630-nile: Remove gpio-keys autorepeat Konrad Dybcio
2021-07-28 22:25 ` [PATCH 38/39] arm64: dts: qcom: sdm630: Add I2C functions to I2C pins Konrad Dybcio
2021-07-28 22:25 ` [PATCH 39/39] arm64: dts: qcom: sdm630: Add DMA to I2C hosts Konrad Dybcio

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210728222542.54269-9-konrad.dybcio@somainline.org \
    --to=konrad.dybcio@somainline.org \
    --cc=agross@kernel.org \
    --cc=angelogioacchino.delregno@somainline.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jamipkettunen@somainline.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marijn.suijten@somainline.org \
    --cc=martin.botka@somainline.org \
    --cc=robh+dt@kernel.org \
    --cc=~postmarketos/upstreaming@lists.sr.ht \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).