* [PATCH] arm64: dts: meson: odroid-n2: keep SD card regulator always on
@ 2019-07-19 19:29 Xavier Ruppen
2019-07-22 7:21 ` Neil Armstrong
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Xavier Ruppen @ 2019-07-19 19:29 UTC (permalink / raw)
To: khilman
Cc: linux-amlogic, linux-kernel, linux-arm-kernel, narmstrong,
martin.blumenstingl, Xavier Ruppen
When powering off the Odroid N2, the tflash_vdd regulator is
automatically turned off by the kernel. This is a problem
when issuing the "reboot" command while using an SD card.
The boot ROM does not power this regulator back on, blocking
the reboot process at the boot ROM stage, preventing the
SD card from being detected.
Adding the "regulator-always-on" property fixes the problem.
Signed-off-by: Xavier Ruppen <xruppen@gmail.com>
---
Here is what the boot ROM output looks like without this patch:
[root@alarm ~]# reboot
[...]
[ 24.275860] shutdown[1]: All loop devices detached.
[ 24.278864] shutdown[1]: Detaching DM devices.
[ 24.287105] kvm: exiting hardware virtualization
[ 24.318776] reboot: Restarting system
bl31 reboot reason: 0xd
bl31 reboot reason: 0x0
system cmd 1.
G12B:BL:6e7c85:7898ac;FEAT:E0F83180:2000;POC:F;RCY:0;
EMMC:800;NAND:81;SD?:0;SD:400;USB:8;LOOP:1;EMMC:800;
NAND:81;SD?:0;SD:400;USB:8;LOOP:2;EMMC:800;NAND:81;
SD?:0;SD:400;USB:8;LOOP:3; [...]
Other people can be seen having this problem on the odroid
forum [1].
The cause of the problem was found by Martin Blumenstingl
on #linux-amlogic. We may want to add his Suggested-by tag
if he agrees.
[1] https://forum.odroid.com/viewtopic.php?f=176&t=33993
arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts
index 81780ffcc7f0..4e916e1f71f7 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts
@@ -53,6 +53,7 @@
gpio = <&gpio_ao GPIOAO_8 GPIO_ACTIVE_HIGH>;
enable-active-high;
+ regulator-always-on;
};
tf_io: gpio-regulator-tf_io {
--
2.21.0
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH] arm64: dts: meson: odroid-n2: keep SD card regulator always on 2019-07-19 19:29 [PATCH] arm64: dts: meson: odroid-n2: keep SD card regulator always on Xavier Ruppen @ 2019-07-22 7:21 ` Neil Armstrong 2019-07-24 5:30 ` Anand Moon 2019-07-23 19:48 ` Martin Blumenstingl 2019-07-25 23:41 ` Kevin Hilman 2 siblings, 1 reply; 7+ messages in thread From: Neil Armstrong @ 2019-07-22 7:21 UTC (permalink / raw) To: Xavier Ruppen, khilman Cc: linux-amlogic, linux-kernel, linux-arm-kernel, martin.blumenstingl On 19/07/2019 21:29, Xavier Ruppen wrote: > When powering off the Odroid N2, the tflash_vdd regulator is > automatically turned off by the kernel. This is a problem > when issuing the "reboot" command while using an SD card. > The boot ROM does not power this regulator back on, blocking > the reboot process at the boot ROM stage, preventing the > SD card from being detected. > > Adding the "regulator-always-on" property fixes the problem. > > Signed-off-by: Xavier Ruppen <xruppen@gmail.com> > --- > > Here is what the boot ROM output looks like without this patch: > > [root@alarm ~]# reboot > [...] > [ 24.275860] shutdown[1]: All loop devices detached. > [ 24.278864] shutdown[1]: Detaching DM devices. > [ 24.287105] kvm: exiting hardware virtualization > [ 24.318776] reboot: Restarting system > bl31 reboot reason: 0xd > bl31 reboot reason: 0x0 > system cmd 1. > G12B:BL:6e7c85:7898ac;FEAT:E0F83180:2000;POC:F;RCY:0; > EMMC:800;NAND:81;SD?:0;SD:400;USB:8;LOOP:1;EMMC:800; > NAND:81;SD?:0;SD:400;USB:8;LOOP:2;EMMC:800;NAND:81; > SD?:0;SD:400;USB:8;LOOP:3; [...] > > Other people can be seen having this problem on the odroid > forum [1]. > > The cause of the problem was found by Martin Blumenstingl > on #linux-amlogic. We may want to add his Suggested-by tag > if he agrees. > > [1] https://forum.odroid.com/viewtopic.php?f=176&t=33993 > > arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts > index 81780ffcc7f0..4e916e1f71f7 100644 > --- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts > +++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts > @@ -53,6 +53,7 @@ > > gpio = <&gpio_ao GPIOAO_8 GPIO_ACTIVE_HIGH>; > enable-active-high; > + regulator-always-on; > }; > > tf_io: gpio-regulator-tf_io { > Surely solves the situation, thanks ! please add a comment on top of "regulator-always-on" to explain why we always enable it, note we should always enable it in case of watchdog reboot or other uncontrolled reset, this regulator must never be disabled. Reviewed-by: Neil Armstrong <narmstrong@baylibre.com> Thanks, Neil ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] arm64: dts: meson: odroid-n2: keep SD card regulator always on 2019-07-22 7:21 ` Neil Armstrong @ 2019-07-24 5:30 ` Anand Moon 2019-07-24 6:49 ` Neil Armstrong 0 siblings, 1 reply; 7+ messages in thread From: Anand Moon @ 2019-07-24 5:30 UTC (permalink / raw) To: Neil Armstrong Cc: Xavier Ruppen, Kevin Hilman, Martin Blumenstingl, linux-amlogic, Linux Kernel, linux-arm-kernel Hi All, On Mon, 22 Jul 2019 at 12:51, Neil Armstrong <narmstrong@baylibre.com> wrote: > > On 19/07/2019 21:29, Xavier Ruppen wrote: > > When powering off the Odroid N2, the tflash_vdd regulator is > > automatically turned off by the kernel. This is a problem > > when issuing the "reboot" command while using an SD card. > > The boot ROM does not power this regulator back on, blocking > > the reboot process at the boot ROM stage, preventing the > > SD card from being detected. > > > > Adding the "regulator-always-on" property fixes the problem. > > > > Signed-off-by: Xavier Ruppen <xruppen@gmail.com> > > --- > > > > Here is what the boot ROM output looks like without this patch: > > > > [root@alarm ~]# reboot > > [...] > > [ 24.275860] shutdown[1]: All loop devices detached. > > [ 24.278864] shutdown[1]: Detaching DM devices. > > [ 24.287105] kvm: exiting hardware virtualization > > [ 24.318776] reboot: Restarting system > > bl31 reboot reason: 0xd > > bl31 reboot reason: 0x0 > > system cmd 1. > > G12B:BL:6e7c85:7898ac;FEAT:E0F83180:2000;POC:F;RCY:0; > > EMMC:800;NAND:81;SD?:0;SD:400;USB:8;LOOP:1;EMMC:800; > > NAND:81;SD?:0;SD:400;USB:8;LOOP:2;EMMC:800;NAND:81; > > SD?:0;SD:400;USB:8;LOOP:3; [...] > > > > Other people can be seen having this problem on the odroid > > forum [1]. > > > > The cause of the problem was found by Martin Blumenstingl > > on #linux-amlogic. We may want to add his Suggested-by tag > > if he agrees. > > > > [1] https://forum.odroid.com/viewtopic.php?f=176&t=33993 > > > > arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts > > index 81780ffcc7f0..4e916e1f71f7 100644 > > --- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts > > +++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts > > @@ -53,6 +53,7 @@ > > > > gpio = <&gpio_ao GPIOAO_8 GPIO_ACTIVE_HIGH>; > > enable-active-high; > > + regulator-always-on; > > }; > > > > tf_io: gpio-regulator-tf_io { > > > > Surely solves the situation, thanks ! > > please add a comment on top of "regulator-always-on" to explain why we always enable it, > note we should always enable it in case of watchdog reboot or other uncontrolled reset, > this regulator must never be disabled. > > Reviewed-by: Neil Armstrong <narmstrong@baylibre.com> > > Thanks, > Neil > I am afraid this did not fix the issue I was also facing with Archlinux on Odroid N2 using mainline u-boot. Here is the log of at my end using latest mainline u-boot with Neil's patches. [0] https://pastebin.com/HNmeY5uF Well this issue also persist with eMMC not getting detected after reboot If I try to change the dts to fix the sdcard. I am checking this should we enable regulator-boot-on option but still no luck. Best Regards -Anand ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] arm64: dts: meson: odroid-n2: keep SD card regulator always on 2019-07-24 5:30 ` Anand Moon @ 2019-07-24 6:49 ` Neil Armstrong 2019-07-24 9:00 ` Anand Moon 0 siblings, 1 reply; 7+ messages in thread From: Neil Armstrong @ 2019-07-24 6:49 UTC (permalink / raw) To: Anand Moon Cc: Xavier Ruppen, Kevin Hilman, Martin Blumenstingl, linux-amlogic, Linux Kernel, linux-arm-kernel Hi Anand, On 24/07/2019 07:30, Anand Moon wrote: > Hi All, > > On Mon, 22 Jul 2019 at 12:51, Neil Armstrong <narmstrong@baylibre.com> wrote: >> >> On 19/07/2019 21:29, Xavier Ruppen wrote: >>> When powering off the Odroid N2, the tflash_vdd regulator is >>> automatically turned off by the kernel. This is a problem >>> when issuing the "reboot" command while using an SD card. >>> The boot ROM does not power this regulator back on, blocking >>> the reboot process at the boot ROM stage, preventing the >>> SD card from being detected. >>> >>> Adding the "regulator-always-on" property fixes the problem. >>> >>> Signed-off-by: Xavier Ruppen <xruppen@gmail.com> >>> --- >>> >>> Here is what the boot ROM output looks like without this patch: >>> >>> [root@alarm ~]# reboot >>> [...] >>> [ 24.275860] shutdown[1]: All loop devices detached. >>> [ 24.278864] shutdown[1]: Detaching DM devices. >>> [ 24.287105] kvm: exiting hardware virtualization >>> [ 24.318776] reboot: Restarting system >>> bl31 reboot reason: 0xd >>> bl31 reboot reason: 0x0 >>> system cmd 1. >>> G12B:BL:6e7c85:7898ac;FEAT:E0F83180:2000;POC:F;RCY:0; >>> EMMC:800;NAND:81;SD?:0;SD:400;USB:8;LOOP:1;EMMC:800; >>> NAND:81;SD?:0;SD:400;USB:8;LOOP:2;EMMC:800;NAND:81; >>> SD?:0;SD:400;USB:8;LOOP:3; [...] >>> >>> Other people can be seen having this problem on the odroid >>> forum [1]. >>> >>> The cause of the problem was found by Martin Blumenstingl >>> on #linux-amlogic. We may want to add his Suggested-by tag >>> if he agrees. >>> >>> [1] https://forum.odroid.com/viewtopic.php?f=176&t=33993 >>> >>> arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts | 1 + >>> 1 file changed, 1 insertion(+) >>> >>> diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts >>> index 81780ffcc7f0..4e916e1f71f7 100644 >>> --- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts >>> +++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts >>> @@ -53,6 +53,7 @@ >>> >>> gpio = <&gpio_ao GPIOAO_8 GPIO_ACTIVE_HIGH>; >>> enable-active-high; >>> + regulator-always-on; >>> }; >>> >>> tf_io: gpio-regulator-tf_io { >>> >> >> Surely solves the situation, thanks ! >> >> please add a comment on top of "regulator-always-on" to explain why we always enable it, >> note we should always enable it in case of watchdog reboot or other uncontrolled reset, >> this regulator must never be disabled. >> >> Reviewed-by: Neil Armstrong <narmstrong@baylibre.com> >> >> Thanks, >> Neil >> > > I am afraid this did not fix the issue I was also facing with > Archlinux on Odroid N2 using mainline u-boot. Seems to be a separate issue, could we start a separate thread with all your setup (branch, git SHAa, configs, board setup, ...) for this ? Thanks, Neil > Here is the log of at my end using latest mainline u-boot with Neil's patches. > > [0] https://pastebin.com/HNmeY5uF > > Well this issue also persist with eMMC not getting detected after reboot > If I try to change the dts to fix the sdcard. > > I am checking this should we enable regulator-boot-on option but still no luck. > > Best Regards > -Anand > ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] arm64: dts: meson: odroid-n2: keep SD card regulator always on 2019-07-24 6:49 ` Neil Armstrong @ 2019-07-24 9:00 ` Anand Moon 0 siblings, 0 replies; 7+ messages in thread From: Anand Moon @ 2019-07-24 9:00 UTC (permalink / raw) To: Neil Armstrong Cc: Xavier Ruppen, Kevin Hilman, Martin Blumenstingl, linux-amlogic, Linux Kernel, linux-arm-kernel Hi Neil, On Wed, 24 Jul 2019 at 12:19, Neil Armstrong <narmstrong@baylibre.com> wrote: > > Hi Anand, > > On 24/07/2019 07:30, Anand Moon wrote: > > Hi All, > > > > On Mon, 22 Jul 2019 at 12:51, Neil Armstrong <narmstrong@baylibre.com> wrote: > >> > >> On 19/07/2019 21:29, Xavier Ruppen wrote: > >>> When powering off the Odroid N2, the tflash_vdd regulator is > >>> automatically turned off by the kernel. This is a problem > >>> when issuing the "reboot" command while using an SD card. > >>> The boot ROM does not power this regulator back on, blocking > >>> the reboot process at the boot ROM stage, preventing the > >>> SD card from being detected. > >>> > >>> Adding the "regulator-always-on" property fixes the problem. > >>> > >>> Signed-off-by: Xavier Ruppen <xruppen@gmail.com> > >>> --- > >>> > >>> Here is what the boot ROM output looks like without this patch: > >>> > >>> [root@alarm ~]# reboot > >>> [...] > >>> [ 24.275860] shutdown[1]: All loop devices detached. > >>> [ 24.278864] shutdown[1]: Detaching DM devices. > >>> [ 24.287105] kvm: exiting hardware virtualization > >>> [ 24.318776] reboot: Restarting system > >>> bl31 reboot reason: 0xd > >>> bl31 reboot reason: 0x0 > >>> system cmd 1. > >>> G12B:BL:6e7c85:7898ac;FEAT:E0F83180:2000;POC:F;RCY:0; > >>> EMMC:800;NAND:81;SD?:0;SD:400;USB:8;LOOP:1;EMMC:800; > >>> NAND:81;SD?:0;SD:400;USB:8;LOOP:2;EMMC:800;NAND:81; > >>> SD?:0;SD:400;USB:8;LOOP:3; [...] > >>> > >>> Other people can be seen having this problem on the odroid > >>> forum [1]. > >>> > >>> The cause of the problem was found by Martin Blumenstingl > >>> on #linux-amlogic. We may want to add his Suggested-by tag > >>> if he agrees. > >>> > >>> [1] https://forum.odroid.com/viewtopic.php?f=176&t=33993 > >>> > >>> arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts | 1 + > >>> 1 file changed, 1 insertion(+) > >>> > >>> diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts > >>> index 81780ffcc7f0..4e916e1f71f7 100644 > >>> --- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts > >>> +++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts > >>> @@ -53,6 +53,7 @@ > >>> > >>> gpio = <&gpio_ao GPIOAO_8 GPIO_ACTIVE_HIGH>; > >>> enable-active-high; > >>> + regulator-always-on; > >>> }; > >>> > >>> tf_io: gpio-regulator-tf_io { > >>> > >> > >> Surely solves the situation, thanks ! > >> > >> please add a comment on top of "regulator-always-on" to explain why we always enable it, > >> note we should always enable it in case of watchdog reboot or other uncontrolled reset, > >> this regulator must never be disabled. > >> > >> Reviewed-by: Neil Armstrong <narmstrong@baylibre.com> > >> > >> Thanks, > >> Neil > >> > > > > I am afraid this did not fix the issue I was also facing with > > Archlinux on Odroid N2 using mainline u-boot. > > Seems to be a separate issue, could we start a separate thread with all your > setup (branch, git SHAa, configs, board setup, ...) for this ? > > Thanks, > Neil > Ok sorry for the noise. Best Regards -Anand ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] arm64: dts: meson: odroid-n2: keep SD card regulator always on 2019-07-19 19:29 [PATCH] arm64: dts: meson: odroid-n2: keep SD card regulator always on Xavier Ruppen 2019-07-22 7:21 ` Neil Armstrong @ 2019-07-23 19:48 ` Martin Blumenstingl 2019-07-25 23:41 ` Kevin Hilman 2 siblings, 0 replies; 7+ messages in thread From: Martin Blumenstingl @ 2019-07-23 19:48 UTC (permalink / raw) To: Xavier Ruppen Cc: khilman, linux-amlogic, linux-kernel, linux-arm-kernel, Neil Armstrong On Fri, Jul 19, 2019 at 9:29 PM Xavier Ruppen <xruppen@gmail.com> wrote: > > When powering off the Odroid N2, the tflash_vdd regulator is > automatically turned off by the kernel. This is a problem > when issuing the "reboot" command while using an SD card. > The boot ROM does not power this regulator back on, blocking > the reboot process at the boot ROM stage, preventing the > SD card from being detected. > > Adding the "regulator-always-on" property fixes the problem. > > Signed-off-by: Xavier Ruppen <xruppen@gmail.com> Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> > --- > > Here is what the boot ROM output looks like without this patch: > > [root@alarm ~]# reboot > [...] > [ 24.275860] shutdown[1]: All loop devices detached. > [ 24.278864] shutdown[1]: Detaching DM devices. > [ 24.287105] kvm: exiting hardware virtualization > [ 24.318776] reboot: Restarting system > bl31 reboot reason: 0xd > bl31 reboot reason: 0x0 > system cmd 1. > G12B:BL:6e7c85:7898ac;FEAT:E0F83180:2000;POC:F;RCY:0; > EMMC:800;NAND:81;SD?:0;SD:400;USB:8;LOOP:1;EMMC:800; > NAND:81;SD?:0;SD:400;USB:8;LOOP:2;EMMC:800;NAND:81; > SD?:0;SD:400;USB:8;LOOP:3; [...] > > Other people can be seen having this problem on the odroid > forum [1]. thank you for submitting this patch (and not keeping it to yourself)! > The cause of the problem was found by Martin Blumenstingl > on #linux-amlogic. We may want to add his Suggested-by tag > if he agrees. yes, if you re-send this patch to address Neil's comment then feel free to add my Reviewed-by as well as a Suggested-by Martin ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] arm64: dts: meson: odroid-n2: keep SD card regulator always on 2019-07-19 19:29 [PATCH] arm64: dts: meson: odroid-n2: keep SD card regulator always on Xavier Ruppen 2019-07-22 7:21 ` Neil Armstrong 2019-07-23 19:48 ` Martin Blumenstingl @ 2019-07-25 23:41 ` Kevin Hilman 2 siblings, 0 replies; 7+ messages in thread From: Kevin Hilman @ 2019-07-25 23:41 UTC (permalink / raw) To: Xavier Ruppen Cc: linux-amlogic, linux-kernel, linux-arm-kernel, narmstrong, martin.blumenstingl, Xavier Ruppen Xavier Ruppen <xruppen@gmail.com> writes: > When powering off the Odroid N2, the tflash_vdd regulator is > automatically turned off by the kernel. This is a problem > when issuing the "reboot" command while using an SD card. > The boot ROM does not power this regulator back on, blocking > the reboot process at the boot ROM stage, preventing the > SD card from being detected. > > Adding the "regulator-always-on" property fixes the problem. > > Signed-off-by: Xavier Ruppen <xruppen@gmail.com> Thanks for the fix and the detailed background description. Queued as a fix for v5.3. Note that I also added this to the commit log, for the benefit of anyone wanting to backport. Fixes: c35f6dc5c377 ("arm64: dts: meson: Add minimal support for Odroid-N2") > > Here is what the boot ROM output looks like without this patch: > > [root@alarm ~]# reboot > [...] > [ 24.275860] shutdown[1]: All loop devices detached. > [ 24.278864] shutdown[1]: Detaching DM devices. > [ 24.287105] kvm: exiting hardware virtualization > [ 24.318776] reboot: Restarting system > bl31 reboot reason: 0xd > bl31 reboot reason: 0x0 > system cmd 1. > G12B:BL:6e7c85:7898ac;FEAT:E0F83180:2000;POC:F;RCY:0; > EMMC:800;NAND:81;SD?:0;SD:400;USB:8;LOOP:1;EMMC:800; > NAND:81;SD?:0;SD:400;USB:8;LOOP:2;EMMC:800;NAND:81; > SD?:0;SD:400;USB:8;LOOP:3; [...] > > Other people can be seen having this problem on the odroid > forum [1]. > > The cause of the problem was found by Martin Blumenstingl > on #linux-amlogic. We may want to add his Suggested-by tag > if he agrees. Added. Thanks! Kevin ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2019-07-25 23:43 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2019-07-19 19:29 [PATCH] arm64: dts: meson: odroid-n2: keep SD card regulator always on Xavier Ruppen 2019-07-22 7:21 ` Neil Armstrong 2019-07-24 5:30 ` Anand Moon 2019-07-24 6:49 ` Neil Armstrong 2019-07-24 9:00 ` Anand Moon 2019-07-23 19:48 ` Martin Blumenstingl 2019-07-25 23:41 ` Kevin Hilman
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox
Powered by JetHome