devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Heiko Stuebner <heiko@sntech.de>, Sasha Levin <sashal@kernel.org>,
	linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org
Subject: [PATCH AUTOSEL 4.14 053/109] ARM: dts: rockchip: explicitly set vcc_sd0 pin to gpio on rk3188-radxarock
Date: Sat,  9 Nov 2019 21:44:45 -0500	[thread overview]
Message-ID: <20191110024541.31567-53-sashal@kernel.org> (raw)
In-Reply-To: <20191110024541.31567-1-sashal@kernel.org>

From: Heiko Stuebner <heiko@sntech.de>

[ Upstream commit a2df0984e73fd9e1dad5fc3f1c307ec3de395e30 ]

It is good practice to make the setting of gpio-pinctrls explicitly in the
devicetree, and in this case even necessary.
Rockchip boards start with iomux settings set to gpio for most pins and
while the linux pinctrl driver also implicitly sets the gpio function if
a pin is requested as gpio that is not necessarily true for other drivers.

The issue in question stems from uboot, where the sdmmc_pwr pin is set
to function 1 (sdmmc-power) by the bootrom when reading the 1st-stage
loader. The regulator controlled by the pin is active-low though, so
when the dwmmc hw-block sets its enabled bit, it actually disables the
regulator. By changing the pin back to gpio we fix that behaviour.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/arm/boot/dts/rk3188-radxarock.dts | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/arch/arm/boot/dts/rk3188-radxarock.dts b/arch/arm/boot/dts/rk3188-radxarock.dts
index 53d6fc2fdbce8..541a798d3d202 100644
--- a/arch/arm/boot/dts/rk3188-radxarock.dts
+++ b/arch/arm/boot/dts/rk3188-radxarock.dts
@@ -130,6 +130,8 @@
 		regulator-min-microvolt = <3300000>;
 		regulator-max-microvolt = <3300000>;
 		gpio = <&gpio3 RK_PA1 GPIO_ACTIVE_LOW>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&sdmmc_pwr>;
 		startup-delay-us = <100000>;
 		vin-supply = <&vcc_io>;
 	};
@@ -348,6 +350,12 @@
 		};
 	};
 
+	sd0 {
+		sdmmc_pwr: sdmmc-pwr {
+			rockchip,pins = <RK_GPIO3 1 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+	};
+
 	usb {
 		host_vbus_drv: host-vbus-drv {
 			rockchip,pins = <0 3 RK_FUNC_GPIO &pcfg_pull_none>;
-- 
2.20.1


  parent reply	other threads:[~2019-11-10  3:03 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20191110024541.31567-1-sashal@kernel.org>
2019-11-10  2:44 ` [PATCH AUTOSEL 4.14 030/109] ARM: dts: am335x-evm: fix number of cpsw Sasha Levin
2019-11-10  2:44 ` [PATCH AUTOSEL 4.14 032/109] ARM: dts: ux500: Correct SCU unit address Sasha Levin
2019-11-10  2:44 ` [PATCH AUTOSEL 4.14 033/109] ARM: dts: ux500: Fix LCDA clock line muxing Sasha Levin
2019-11-10  2:44 ` [PATCH AUTOSEL 4.14 034/109] ARM: dts: ste: Fix SPI controller node names Sasha Levin
2019-11-10  2:44 ` [PATCH AUTOSEL 4.14 038/109] ARM: dts: marvell: Fix SPI and I2C bus warnings Sasha Levin
2019-11-10  2:44 ` [PATCH AUTOSEL 4.14 040/109] ARM: dts: clearfog: fix sdhci supply property name Sasha Levin
2019-11-10  2:44 ` [PATCH AUTOSEL 4.14 043/109] net: phy: mdio-bcm-unimac: Allow configuring MDIO clock divider Sasha Levin
2019-11-10  2:44 ` [PATCH AUTOSEL 4.14 049/109] arm64: dts: rockchip: Fix microSD in rk3399 sapphire board Sasha Levin
2019-11-10  2:44 ` Sasha Levin [this message]
2019-11-10  2:45 ` [PATCH AUTOSEL 4.14 073/109] ARM: dts: tegra30: fix xcvr-setup-use-fuses Sasha Levin
2019-11-10  2:45 ` [PATCH AUTOSEL 4.14 074/109] ARM: tegra: apalis_t30: fix mmc1 cmd pull-up Sasha Levin
2019-11-10  2:45 ` [PATCH AUTOSEL 4.14 075/109] ARM: dts: paz00: fix wakeup gpio keycode Sasha Levin
2019-11-10  2:45 ` [PATCH AUTOSEL 4.14 081/109] ARM: dts: realview: Fix SPI controller node names Sasha Levin
2019-11-10  2:45 ` [PATCH AUTOSEL 4.14 100/109] arm64: dts: amd: Fix SPI bus warnings Sasha Levin
2019-11-10  2:45 ` [PATCH AUTOSEL 4.14 101/109] arm64: dts: lg: Fix SPI controller node names Sasha Levin
2019-11-10  2:45 ` [PATCH AUTOSEL 4.14 102/109] ARM: dts: lpc32xx: " Sasha Levin
2019-11-10  2:45 ` [PATCH AUTOSEL 4.14 103/109] arm64: dts: rockchip: enable display nodes on rk3328-rock64 Sasha Levin

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=20191110024541.31567-53-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=heiko@sntech.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=stable@vger.kernel.org \
    /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).