From: Robin Murphy <robin.murphy-5wv7dgnIgG8@public.gmane.org> To: Jagan Teki <jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org>, Simon Glass <sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>, Philipp Tomsich <philipp.tomsich-SN7IsUiht6C/RdPyistoZJqQE7yCjDx5@public.gmane.org>, Kever Yang <kever.yang-TNX95d0MmH7DzftRWevZcw@public.gmane.org>, Akash Gajjar <akash-oRp2ZoJdM/RWk0Htik3J/w@public.gmane.org> Cc: linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, linux-amarula-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org, u-boot-0aAXYlwwYIKGBzrmiIFOJg@public.gmane.org Subject: Re: [PATCH v2 08/14] rockchip: dts: rk3399: nanopi4: Use CD pin as RK_FUNC_1 Date: Tue, 16 Apr 2019 12:10:12 +0100 [thread overview] Message-ID: <148886f2-b1f2-8e90-c6cc-00fd49d98c86@arm.com> (raw) In-Reply-To: <20190416105647.18437-9-jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org> On 16/04/2019 11:56, Jagan Teki wrote: > sdmmc cd pin is configured as RK_FUNC_GPIO which is wrong and > indeed failed to detect the sdcard on the board with below error > > Card did not respond to voltage select! > > So, fix it by replacing RK_FUNC_GPIO with RK_FUNC_1 which > is already defined in rk3399.dts so make use of same like > other boards. I guess the U-Boot dwmmc driver doesn't support using a GPIO? The reason we do this for Linux is that the dedicated function is not compatible with runtime power management - once we see that no card is present and suspend the idle controller, the CD logic is also powered off and thus no longer capable of generating the interrupt necessary to wake everything up again. The GPIO function of the same pin, however, is in an always-on power domain so is able to do the right thing. So it's not "wrong" as such, but this change should be fine for U-Boot as long as it never turns off PD_SD itself. Robin. > Signed-off-by: Jagan Teki <jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org> > --- > arch/arm/dts/rk3399-nanopi4.dtsi | 6 +----- > 1 file changed, 1 insertion(+), 5 deletions(-) > > diff --git a/arch/arm/dts/rk3399-nanopi4.dtsi b/arch/arm/dts/rk3399-nanopi4.dtsi > index d325e11728..5dc8a8de16 100644 > --- a/arch/arm/dts/rk3399-nanopi4.dtsi > +++ b/arch/arm/dts/rk3399-nanopi4.dtsi > @@ -521,10 +521,6 @@ > }; > > sdmmc { > - sdmmc0_det_l: sdmmc0-det-l { > - rockchip,pins = <0 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>; > - }; > - > sdmmc0_pwr_h: sdmmc0-pwr-h { > rockchip,pins = <0 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none>; > }; > @@ -582,7 +578,7 @@ > cd-gpios = <&gpio0 RK_PA7 GPIO_ACTIVE_LOW>; > disable-wp; > pinctrl-names = "default"; > - pinctrl-0 = <&sdmmc_bus4 &sdmmc_clk &sdmmc_cmd &sdmmc0_det_l>; > + pinctrl-0 = <&sdmmc_bus4 &sdmmc_clk &sdmmc_cmd &sdmmc_cd>; > sd-uhs-sdr104; > vmmc-supply = <&vcc3v0_sd>; > vqmmc-supply = <&vcc_sdio>; >
WARNING: multiple messages have this Message-ID (diff)
From: Robin Murphy <robin.murphy@arm.com> To: u-boot@lists.denx.de Subject: [U-Boot] [PATCH v2 08/14] rockchip: dts: rk3399: nanopi4: Use CD pin as RK_FUNC_1 Date: Tue, 16 Apr 2019 12:10:12 +0100 [thread overview] Message-ID: <148886f2-b1f2-8e90-c6cc-00fd49d98c86@arm.com> (raw) In-Reply-To: <20190416105647.18437-9-jagan@amarulasolutions.com> On 16/04/2019 11:56, Jagan Teki wrote: > sdmmc cd pin is configured as RK_FUNC_GPIO which is wrong and > indeed failed to detect the sdcard on the board with below error > > Card did not respond to voltage select! > > So, fix it by replacing RK_FUNC_GPIO with RK_FUNC_1 which > is already defined in rk3399.dts so make use of same like > other boards. I guess the U-Boot dwmmc driver doesn't support using a GPIO? The reason we do this for Linux is that the dedicated function is not compatible with runtime power management - once we see that no card is present and suspend the idle controller, the CD logic is also powered off and thus no longer capable of generating the interrupt necessary to wake everything up again. The GPIO function of the same pin, however, is in an always-on power domain so is able to do the right thing. So it's not "wrong" as such, but this change should be fine for U-Boot as long as it never turns off PD_SD itself. Robin. > Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> > --- > arch/arm/dts/rk3399-nanopi4.dtsi | 6 +----- > 1 file changed, 1 insertion(+), 5 deletions(-) > > diff --git a/arch/arm/dts/rk3399-nanopi4.dtsi b/arch/arm/dts/rk3399-nanopi4.dtsi > index d325e11728..5dc8a8de16 100644 > --- a/arch/arm/dts/rk3399-nanopi4.dtsi > +++ b/arch/arm/dts/rk3399-nanopi4.dtsi > @@ -521,10 +521,6 @@ > }; > > sdmmc { > - sdmmc0_det_l: sdmmc0-det-l { > - rockchip,pins = <0 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>; > - }; > - > sdmmc0_pwr_h: sdmmc0-pwr-h { > rockchip,pins = <0 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none>; > }; > @@ -582,7 +578,7 @@ > cd-gpios = <&gpio0 RK_PA7 GPIO_ACTIVE_LOW>; > disable-wp; > pinctrl-names = "default"; > - pinctrl-0 = <&sdmmc_bus4 &sdmmc_clk &sdmmc_cmd &sdmmc0_det_l>; > + pinctrl-0 = <&sdmmc_bus4 &sdmmc_clk &sdmmc_cmd &sdmmc_cd>; > sd-uhs-sdr104; > vmmc-supply = <&vcc3v0_sd>; > vqmmc-supply = <&vcc_sdio>; >
next prev parent reply other threads:[~2019-04-16 11:10 UTC|newest] Thread overview: 68+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-04-16 10:56 [PATCH v2 00/14] rockchip: Add new rk3399 boards Jagan Teki 2019-04-16 10:56 ` [U-Boot] " Jagan Teki [not found] ` <20190416105647.18437-1-jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org> 2019-04-16 10:56 ` [PATCH v2 01/14] rockchip: dts: rk3399: Sync rk3399-opp from Linux Jagan Teki 2019-04-16 10:56 ` [U-Boot] " Jagan Teki [not found] ` <20190416105647.18437-2-jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org> 2019-04-16 11:59 ` Paul Kocialkowski 2019-04-16 11:59 ` Paul Kocialkowski 2019-04-16 10:56 ` [PATCH v2 02/14] rockchip: dts: rk3399: Sync pwm2_pin_pull_down from Linux 5.1-rc2 Jagan Teki 2019-04-16 10:56 ` [U-Boot] " Jagan Teki [not found] ` <20190416105647.18437-3-jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org> 2019-04-16 12:00 ` Paul Kocialkowski 2019-04-16 12:00 ` Paul Kocialkowski 2019-04-16 10:56 ` [PATCH v2 03/14] rockchip: dts: rk3399: Create initial rk3399-u-boot.dtsi Jagan Teki 2019-04-16 10:56 ` [U-Boot] " Jagan Teki [not found] ` <20190416105647.18437-4-jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org> 2019-04-16 12:00 ` Paul Kocialkowski 2019-04-16 12:00 ` Paul Kocialkowski 2019-04-16 10:56 ` [PATCH v2 04/14] Kconfig: Add default SPL_FIT_GENERATOR for rockchip Jagan Teki 2019-04-16 10:56 ` [U-Boot] " Jagan Teki [not found] ` <20190416105647.18437-5-jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org> 2019-04-16 12:01 ` Paul Kocialkowski 2019-04-16 12:01 ` Paul Kocialkowski 2019-04-16 10:56 ` [PATCH v2 05/14] arm: rockchip: rk3399: Move common configs in Kconfig Jagan Teki 2019-04-16 10:56 ` [U-Boot] " Jagan Teki [not found] ` <20190416105647.18437-6-jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org> 2019-04-16 12:02 ` Paul Kocialkowski 2019-04-16 12:02 ` Paul Kocialkowski 2019-04-16 10:56 ` [PATCH v2 06/14] rockchip: rk3399: Add Orangepi RK3399 support Jagan Teki 2019-04-16 10:56 ` [U-Boot] " Jagan Teki [not found] ` <20190416105647.18437-7-jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org> 2019-04-16 12:03 ` Paul Kocialkowski 2019-04-16 12:03 ` Paul Kocialkowski 2019-04-16 10:56 ` [PATCH v2 07/14] rockchip: dts: rk3399: Sync rk3399-nanopi4.dtsi from Linux Jagan Teki 2019-04-16 10:56 ` [U-Boot] " Jagan Teki [not found] ` <20190416105647.18437-8-jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org> 2019-04-16 12:04 ` Paul Kocialkowski 2019-04-16 12:04 ` Paul Kocialkowski 2019-04-16 10:56 ` [PATCH v2 08/14] rockchip: dts: rk3399: nanopi4: Use CD pin as RK_FUNC_1 Jagan Teki 2019-04-16 10:56 ` [U-Boot] " Jagan Teki [not found] ` <20190416105647.18437-9-jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org> 2019-04-16 11:10 ` Robin Murphy [this message] 2019-04-16 11:10 ` Robin Murphy [not found] ` <148886f2-b1f2-8e90-c6cc-00fd49d98c86-5wv7dgnIgG8@public.gmane.org> 2019-04-17 11:09 ` Jagan Teki 2019-04-17 11:09 ` [U-Boot] " Jagan Teki 2019-04-16 10:56 ` [PATCH v2 09/14] rockchip: rk3399: Add 4GB LPDDR3-1866 DMC settings Jagan Teki 2019-04-16 10:56 ` [U-Boot] " Jagan Teki 2019-04-17 7:40 ` [PATCH v2 09/14] rockchip: rk3399: Add 4GB LPDDR3-1866 DMC settings【请注意,邮件由linux-rockchip-bounces+kever.yang=rock-chips.com@lists.infradead.org代发】 Kever Yang 2019-04-17 7:40 ` [U-Boot] " Kever Yang 2019-04-17 11:11 ` Jagan Teki 2019-04-17 11:11 ` [U-Boot] " Jagan Teki 2019-04-18 2:57 ` Kever Yang 2019-04-18 2:57 ` [U-Boot] " Kever Yang [not found] ` <12b48e92-be80-3600-6ab2-2c0d4c132603-TNX95d0MmH7DzftRWevZcw@public.gmane.org> 2019-04-18 6:30 ` Philipp Tomsich 2019-04-18 6:30 ` [U-Boot] " Philipp Tomsich 2019-04-16 10:56 ` [PATCH v2 10/14] rockchip: rk3399: Add Nanopi M4 board support Jagan Teki 2019-04-16 10:56 ` [U-Boot] " Jagan Teki [not found] ` <20190416105647.18437-11-jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org> 2019-04-16 12:04 ` Paul Kocialkowski 2019-04-16 12:04 ` Paul Kocialkowski 2019-04-16 10:56 ` [PATCH v2 11/14] rockchip: rk3399: Add Nanopc T4 " Jagan Teki 2019-04-16 10:56 ` [U-Boot] " Jagan Teki [not found] ` <20190416105647.18437-12-jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org> 2019-04-16 12:05 ` Paul Kocialkowski 2019-04-16 12:05 ` Paul Kocialkowski 2019-04-16 10:56 ` [PATCH v2 12/14] rockchip: rk3399: Add Nanopi NEO4 " Jagan Teki 2019-04-16 10:56 ` [U-Boot] " Jagan Teki [not found] ` <20190416105647.18437-13-jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org> 2019-04-16 12:06 ` Paul Kocialkowski 2019-04-16 12:06 ` Paul Kocialkowski 2019-04-16 10:56 ` [PATCH v2 13/14] rockchip: rk3399: Add Rockpro64 " Jagan Teki 2019-04-16 10:56 ` [U-Boot] " Jagan Teki [not found] ` <20190416105647.18437-14-jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org> 2019-04-16 12:07 ` Paul Kocialkowski 2019-04-16 12:07 ` [U-Boot] " Paul Kocialkowski 2019-04-16 10:56 ` [PATCH v2 14/14] doc: rockchip: Add global doc for rk3399 build/flash Jagan Teki 2019-04-16 10:56 ` [U-Boot] " Jagan Teki 2019-04-16 11:58 ` [PATCH v2 00/14] rockchip: Add new rk3399 boards Paul Kocialkowski 2019-04-16 11:58 ` [U-Boot] " Paul Kocialkowski 2019-04-17 11:19 ` Jagan Teki 2019-04-17 11:19 ` [U-Boot] " Jagan Teki
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=148886f2-b1f2-8e90-c6cc-00fd49d98c86@arm.com \ --to=robin.murphy-5wv7dgnigg8@public.gmane.org \ --cc=akash-oRp2ZoJdM/RWk0Htik3J/w@public.gmane.org \ --cc=jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org \ --cc=kever.yang-TNX95d0MmH7DzftRWevZcw@public.gmane.org \ --cc=linux-amarula-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org \ --cc=linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \ --cc=philipp.tomsich-SN7IsUiht6C/RdPyistoZJqQE7yCjDx5@public.gmane.org \ --cc=sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \ --cc=u-boot-0aAXYlwwYIKGBzrmiIFOJg@public.gmane.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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.