All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Summers <beagleboard-8lkWs+DogrrqRUWtDFdff/XRex20P6io@public.gmane.org>
To: Jonas Karlman <jonas-uIzNG4q0ceqzQB+pC5nmwQ@public.gmane.org>,
	"heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org"
	<heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org>,
	"robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org"
	<robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	"mark.rutland-5wv7dgnIgG8@public.gmane.org"
	<mark.rutland-5wv7dgnIgG8@public.gmane.org>
Cc: "linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org"
	<linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>,
	"devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH 1/3 v2] ARM: dts: rk3288-tinker.dtsi: Fix SD card detection
Date: Sun, 24 Feb 2019 20:10:50 +0000	[thread overview]
Message-ID: <e1f1a93e-505b-bf53-a253-5c1ddaeaebf8@davidjohnsummers.uk> (raw)
In-Reply-To: <AM3PR03MB09663F32FC40000E42C1A722AC790-XQTXrJX/giFAc9da7WRX18eAHadYHfrlvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>

On 24/02/2019 19:56, Jonas Karlman wrote:
> On 2019-02-24 20:35, David Summers wrote:
>> On 24/02/2019 19:26, Jonas Karlman wrote:
>>> On 2019-02-22 19:47, David Summers wrote:
>>>> The Problem:
>>>>
>>>> On ASUS Tinker Board S, when booting from the eMMC, and there is no
>>>> card sd slot, then there are constant errors.
>>>>
>>>> Cause:
>>>>
>>>> Thanks must go to Robin Murphy @ ARM for idenifying the problem. The
>>>> rk808 on the Tinker Board and Tinker Board S has many regulators, one
>>>> vccio_sd powers the IO for the sd card. Unfortunatly this is also used
>>>> in the card detect. Now when no card is install, the regulator is
>>>> powered down. This means that the card detect floats, and this means
>>>> random card detection.
>>>>
>>>> The Solution:
>>>>
>>>> Make sure that the sd IO is always powered, this means card detection
>>>> is always active, which is what should be done on a board with an sd
>>>> slot, which both the Tinker Board and Tinker Board S are. Hence change
>>>> is made to the .dtsi which takes effect on all Tinker Boards as
>>>> required.
>>>>
>>>> The change also adds "regulator-boot-on" the Tinker Board boot from
>>>> uboot, and the sd card is always one option. Hence the IO must be
>>>> powered in uboot, and so setting this flag.
>>>>
>>>> Also removed is "disable-wp" the micro sd card which are used have no
>>>> write  protection, so the concept doesn't mean anything, and the
>>>> Tinker Boards work without this. Hence it is removed to simply.
>>>>
>>>> This change came from ArchLinux Arm, but we note it is the fix also
>>>> used by Armbian:
>>>>
>>>> https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FMiouyouyou%2FRockMyy%2Fblob%2Fmaster%2Fpatches%2Fkernel%2Fv5.0%2FDTS%2F0016-ARM-DTSI-rk3288-tinker-Setting-up-the-SD-regulators.patch&amp;data=02%7C01%7C%7Cf5937082939e4163c84b08d69a8f3b61%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636866337295767294&amp;sdata=tK8QE3bsG9LW%2FJcvFzLKa8%2BPj5u%2F8exbEn8m2vqKly0%3D&amp;reserved=0
>>>>
>>>> Signed-off-by: David Summers <beagleboard-8lkWs+DogrrqRUWtDFdff/XRex20P6io@public.gmane.org>
>>>> ---
>>>>    arch/arm/boot/dts/rk3288-tinker.dtsi | 3 ++-
>>>>    1 file changed, 2 insertions(+), 1 deletion(-)
>>>>
>>>> diff --git a/arch/arm/boot/dts/rk3288-tinker.dtsi b/arch/arm/boot/dts/rk3288-tinker.dtsi
>>>> index aa107ee41b8b..6b7e55085b0c 100644
>>>> --- a/arch/arm/boot/dts/rk3288-tinker.dtsi
>>>> +++ b/arch/arm/boot/dts/rk3288-tinker.dtsi
>>>> @@ -254,6 +254,8 @@
>>>>    			};
>>>>    
>>>>    			vccio_sd: LDO_REG5 {
>>>> +				regulator-always-on;
>>>> +				regulator-boot-on;
>>>>    				regulator-min-microvolt = <1800000>;
>>>>    				regulator-max-microvolt = <3300000>;
>>>>    				regulator-name = "vccio_sd";
>>>> @@ -431,7 +433,6 @@
>>>>    	cap-mmc-highspeed;
>>>>    	cap-sd-highspeed;
>>>>    	card-detect-delay = <200>;
>>>> -	disable-wp;			/* wp not hooked up */
>>> I think disable-wp correctly describes that wp is not expected to work and should not be removed.
>>>
>>>   From comment in mmc_sd_get_ro():
>>> "Some systems don't feature a write-protect pin and don't need one.
>>> E.g. because they only have micro-SD card slot. For those systems
>>> assume that the SD card is always read-write."
>>>
>>> Without disable-wp core will call dw_mci_get_ro() to get wp status.
>>>
>>>
>>> This patch also fixes reboot when booting from sd-card and having emmc zeroed out.
>>>
>>> Tested-by: Jonas Karlman <jonas-uIzNG4q0ceqzQB+pC5nmwQ@public.gmane.org>
>>>
>>> Regards,
>>> Jonas
>>>
>>>>    	pinctrl-names = "default";
>>>>    	pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>;
>>>>    	status = "okay";
>> Hi Jonas,
>>
>> Thanks for testing - did you get an error with "disable-wp" ?
>>
>> We tested this with @TheSaint On ArchLinux Arm, and it worked!
>>
>> With the "regulator-boot-on" and on reboot, it should keep power on the
>> sd card - so reboot should work.
> I tested both with and without "disable-wp" removed and both works without error.
> SD-card reboots now works as it should thanks to "regulator-always-on" and "regulator-boot-on", I only tested using both.
>
> On a side note I have also been testing [1] to make reboot with UHS signal voltage work and will send out a RFC v2
> after I have concluded testing on my other devices supporting UHS signal voltage.
>
> [1] https://github.com/Kwiboo/linux-rockchip/compare/patch-rk-5.x-tinker-uhs%5E%5E%5E...patch-rk-5.x-tinker-uhs
>
> Regards,
> Jonas

Thanks.

Glad your are testing - and I hope the uhs tests work.

Alas for us to test uhs - and our user on Arch isn't so experienced. I 
could push him to try different speeds - but to be honest I expect it to 
be beyond his comfort zone.

But its good to here you confirm "disable-wp" works. To my mind it says 
we are sure that  all three changes in the patch are are correct.

Hopefully this will be straight forward to Heiko to accept. Its the 
simple patch of the 3 to accept ;)

Regards,

David.

>> Regards,
>>
>> David.
>>
>>

  parent reply	other threads:[~2019-02-24 20:10 UTC|newest]

Thread overview: 116+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-17 12:15 [PATCH 0/3] ARM: dts: rk3288 Tinker Board (S) updates David Summers
2019-02-17 12:15 ` David Summers
2019-02-17 12:15 ` [PATCH 1/3] ARM: dts: rk3288 Tinker Board (S) sdcard changes David Summers
2019-02-17 12:15   ` David Summers
2019-02-17 14:00   ` Robin Murphy
2019-02-17 14:00     ` Robin Murphy
2019-02-17 15:19     ` David Summers
2019-02-17 15:19       ` David Summers
2019-02-18 11:54       ` Robin Murphy
2019-02-18 11:54         ` Robin Murphy
2019-02-19 20:13         ` David Summers
2019-02-19 20:13           ` David Summers
     [not found]   ` <20190217121513.22965-2-beagleboard-8lkWs+DogrrqRUWtDFdff/XRex20P6io@public.gmane.org>
2019-02-17 20:29     ` Stefan Wahren
2019-02-17 20:29       ` Stefan Wahren
     [not found]       ` <1660942499.343639.1550435365757-uEpKuDZ350hmhno068Nerg@public.gmane.org>
2019-02-18 20:08         ` David Summers
2019-02-18 20:08           ` David Summers
2019-02-22 18:47     ` [PATCH 1/3 v2] ARM: dts: rk3288-tinker.dtsi: Fix SD card detection David Summers
     [not found]       ` <20190222184708.32004-1-beagleboard-8lkWs+DogrrqRUWtDFdff/XRex20P6io@public.gmane.org>
2019-02-24 19:26         ` Jonas Karlman
2019-02-24 19:26           ` Jonas Karlman
     [not found]           ` <AM3PR03MB096656098C6CB4712C73C095AC790-XQTXrJX/giFAc9da7WRX18eAHadYHfrlvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2019-02-24 19:35             ` David Summers
     [not found]               ` <5387a001-1036-bb5c-e781-18e87ca6e7bd-8lkWs+DogrrqRUWtDFdff/XRex20P6io@public.gmane.org>
2019-02-24 19:56                 ` Jonas Karlman
     [not found]                   ` <AM3PR03MB09663F32FC40000E42C1A722AC790-XQTXrJX/giFAc9da7WRX18eAHadYHfrlvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2019-02-24 20:10                     ` David Summers [this message]
     [not found]                       ` <e1f1a93e-505b-bf53-a253-5c1ddaeaebf8-8lkWs+DogrrqRUWtDFdff/XRex20P6io@public.gmane.org>
2019-02-24 22:54                         ` Heiko Stübner
2019-02-24 22:54                           ` Heiko Stübner
2019-02-25  8:59                           ` Jonas Karlman
2019-02-25 21:00                           ` David Summers
     [not found]                             ` <31863095-94b5-5fec-0293-b30172426b93-8lkWs+DogrrqRUWtDFdff/XRex20P6io@public.gmane.org>
2019-02-25 21:14                               ` Doug Anderson
2019-02-25 17:13         ` Doug Anderson
     [not found]           ` <CAD=FV=UkQ7pEan4aGezvQZZjBc0gDJ1R7YRbN1Lbv9HBVQRgHQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2019-02-25 21:11             ` David Summers
     [not found]               ` <9e90c5dd-7b1e-9e53-81ac-fb3b515215ca-8lkWs+DogrrqRUWtDFdff/XRex20P6io@public.gmane.org>
2019-02-25 21:18                 ` Doug Anderson
     [not found]                   ` <CAD=FV=XEPKpDVLdpCVB9eMzJNE8C5Pr=fRgRmJXgxzrDFJ39mQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2019-02-25 22:20                     ` Heiko Stübner
2019-02-26 14:46                       ` Robin Murphy
     [not found]                         ` <108411d8-9607-d92d-e546-d0c85bcabc51-5wv7dgnIgG8@public.gmane.org>
2019-02-26 16:43                           ` Doug Anderson
     [not found]                             ` <CAD=FV=X0rRPkEim1sHS9EqDCLiWPO7e5Vu-0gAcX7YZ_omeKPw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2019-02-27 13:48                               ` Robin Murphy
2019-03-03 11:08         ` David Summers
2019-02-17 12:15 ` [PATCH 2/3] ARM: dts: rk3288 Tinker Board (S) add wi-fi David Summers
2019-02-17 12:15   ` David Summers
     [not found]   ` <20190217121513.22965-3-beagleboard-8lkWs+DogrrqRUWtDFdff/XRex20P6io@public.gmane.org>
2019-02-17 14:32     ` Tony McKahan
2019-02-17 14:32       ` Tony McKahan
2019-02-17 15:55       ` David Summers
     [not found]         ` <4ef63671-f58d-3b16-9055-09e69314a0e6-8lkWs+DogrrqRUWtDFdff/XRex20P6io@public.gmane.org>
2019-02-17 17:32           ` Tony McKahan
2019-02-17 17:32             ` Tony McKahan
2019-02-17 21:19           ` Stefan Wahren
2019-02-17 21:19             ` Stefan Wahren
     [not found]       ` <CAERgokmpHQb2czJdx++qFoogFRmkvXZm=4BNOsVuCz-ZvgTEaw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2019-02-17 19:03         ` David Summers
2019-02-17 19:03           ` David Summers
2019-02-17 20:43     ` Stefan Wahren
2019-02-17 20:43       ` Stefan Wahren
2019-02-18 12:30       ` Robin Murphy
2019-02-18 12:30         ` Robin Murphy
     [not found]       ` <1528638260.343699.1550436208775-uEpKuDZ350hmhno068Nerg@public.gmane.org>
2019-02-18 20:26         ` David Summers
2019-02-18 20:26           ` David Summers
2019-02-18 21:48           ` Stefan Wahren
2019-02-18 21:48             ` Stefan Wahren
2019-03-03 19:40   ` David Summers
2019-03-03 19:40     ` David Summers
     [not found]     ` <9df2e318-a459-bded-2971-90a6722e1a4f-8lkWs+DogrrqRUWtDFdff/XRex20P6io@public.gmane.org>
2019-03-03 22:12       ` Tony McKahan
2019-03-03 22:12         ` Tony McKahan
2019-02-17 12:15 ` [PATCH 3/3] ARM: dts: rk3288 Tinker Board (S) add bluetooth David Summers
2019-02-17 12:15   ` David Summers
     [not found]   ` <20190217121513.22965-4-beagleboard-8lkWs+DogrrqRUWtDFdff/XRex20P6io@public.gmane.org>
2019-02-17 13:31     ` Tony McKahan
2019-02-17 13:31       ` Tony McKahan
2019-02-17 21:05     ` Stefan Wahren
2019-02-17 21:05       ` Stefan Wahren
2019-02-18 20:47       ` David Summers
2019-02-18 21:40         ` Stefan Wahren
2019-03-03 20:15   ` David Summers
2019-03-03 20:15     ` David Summers
2019-02-23 19:42 ` [PATCH 0/3] ARM: dts: rk3288 Tinker Board (S) updates David Summers
2019-02-23 19:42   ` David Summers
2019-03-09 15:36 ` [PATCH v3 1/3] arm: dts: rk3288-tinker.dtsi: Fix SD card detection David Summers
2019-03-09 15:36   ` David Summers
2019-03-09 15:39 ` David Summers
2019-03-09 15:39   ` David Summers
     [not found]   ` <20190309153923.22806-1-beagleboard-8lkWs+DogrrqRUWtDFdff/XRex20P6io@public.gmane.org>
2019-03-09 15:39     ` [PATCH v3 2/3] arm: dts: rk3288-tinker.dtsi: Enable WiFi David Summers
2019-03-09 15:39       ` David Summers
2019-03-11 22:18       ` Robin Murphy
2019-03-11 22:18         ` Robin Murphy
     [not found]         ` <383c9884-4885-34e1-9ef7-96e936bb211d-5wv7dgnIgG8@public.gmane.org>
2019-03-12 20:41           ` David Summers
2019-03-12 20:41             ` David Summers
     [not found]             ` <c91db9a2-4283-0ea5-949e-ed190a7a8083-8lkWs+DogrrqRUWtDFdff/XRex20P6io@public.gmane.org>
2019-03-12 20:55               ` Heiko Stübner
2019-03-12 20:55                 ` Heiko Stübner
     [not found]       ` <20190309153923.22806-2-beagleboard-8lkWs+DogrrqRUWtDFdff/XRex20P6io@public.gmane.org>
2019-03-12 14:18         ` Heiko Stuebner
2019-03-12 14:18           ` Heiko Stuebner
2019-03-12 14:21           ` Stefan Wahren
2019-03-12 14:21             ` Stefan Wahren
2019-03-13 10:50         ` Heiko Stübner
2019-03-13 10:50           ` Heiko Stübner
2019-03-09 15:39     ` [PATCH v3 3/3] arm: dts: rk3288-tinker.dtsi: Add outline Bluetooth support David Summers
2019-03-09 15:39       ` David Summers
2019-03-09 15:39       ` David Summers
2019-03-11 16:41       ` Marcel Holtmann
2019-03-11 16:41         ` Marcel Holtmann
2019-03-11 16:41         ` Marcel Holtmann
2019-03-11 20:48         ` David Summers
2019-03-11 20:48           ` David Summers
2019-03-11 20:48           ` David Summers
     [not found]       ` <20190309153923.22806-3-beagleboard-8lkWs+DogrrqRUWtDFdff/XRex20P6io@public.gmane.org>
2019-03-13 10:56         ` Heiko Stübner
2019-03-13 10:56           ` Heiko Stübner
2019-03-13 10:56           ` Heiko Stübner
2019-03-13 19:57           ` David Summers
2019-03-13 20:02           ` David Summers
2019-03-13 20:02             ` David Summers
2019-03-12 14:08     ` [PATCH v3 1/3] arm: dts: rk3288-tinker.dtsi: Fix SD card detection Heiko Stuebner
2019-03-12 14:08       ` Heiko Stuebner
2019-03-12 14:17       ` Robin Murphy
2019-03-12 14:17         ` Robin Murphy
2019-03-12 14:22     ` Heiko Stuebner
2019-03-12 14:22       ` Heiko Stuebner
2019-03-12 20:34       ` David Summers
     [not found]         ` <4a1ad220-103d-543e-56d1-3c6d6ad906ec-8lkWs+DogrrqRUWtDFdff/XRex20P6io@public.gmane.org>
2019-03-12 20:52           ` Heiko Stübner
2019-03-12 20:52             ` Heiko Stübner
2019-03-12 21:04             ` Jonas Karlman
2019-03-12 21:04               ` Jonas Karlman
2019-03-13 10:40     ` Heiko Stübner
2019-03-13 10:40       ` Heiko Stübner

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=e1f1a93e-505b-bf53-a253-5c1ddaeaebf8@davidjohnsummers.uk \
    --to=beagleboard-8lkws+dogrrqruwtdfdff/xrex20p6io@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org \
    --cc=jonas-uIzNG4q0ceqzQB+pC5nmwQ@public.gmane.org \
    --cc=linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
    --cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@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: link
Be 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.