diff mbox

Odroid U2 Kernel 4.7rc7+ Hang on reboot

Message ID 578E0F28.6010600@samsung.com (mailing list archive)
State Not Applicable
Headers show

Commit Message

Krzysztof Kozlowski July 19, 2016, 11:29 a.m. UTC
On 07/15/2016 05:56 PM, Nicolas Dufresne wrote:
> Le vendredi 15 juillet 2016 à 16:33 +0200, Tobias Jakobi a écrit :
>> I can confirm that this indeed doesn't work.
>>
>> chidori ~ # echo 1 > /proc/sys/kernel/sysrq
>> chidori ~ # echo s > /proc/sysrq-trigger
>> chidori ~ # echo u > /proc/sysrq-trigger
>> chidori ~ # echo b > /proc/sysrq-trigger
>> <board hangs, only red power LED on>
>>
>> I guess Nicolas is seeing a different or another problem here though.
> 
> Well for me both method hangs. On an extra note, reset inside Uboot
> works, but reboot in Linux hang. I tried adding a trace
> in syscon_restart_handle(), but the trace is never displayed. I'm
> wondering if that handler is ever called, or if it's just that the
> serial console was shut down already.
> 
> Any idea what else should I trace ?

This is weird... reboot should work. Just to confirm it - can you test
following patch in both scenarios (this should fix both of them... at
least on Odroid U3 but your board might have different SPL/BL1):

-- >8 --




--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Krzysztof Kozlowski July 20, 2016, 12:29 p.m. UTC | #1
On 07/19/2016 01:29 PM, Krzysztof Kozlowski wrote:
> On 07/15/2016 05:56 PM, Nicolas Dufresne wrote:
>> Le vendredi 15 juillet 2016 à 16:33 +0200, Tobias Jakobi a écrit :
>>> I can confirm that this indeed doesn't work.
>>>
>>> chidori ~ # echo 1 > /proc/sys/kernel/sysrq
>>> chidori ~ # echo s > /proc/sysrq-trigger
>>> chidori ~ # echo u > /proc/sysrq-trigger
>>> chidori ~ # echo b > /proc/sysrq-trigger
>>> <board hangs, only red power LED on>
>>>
>>> I guess Nicolas is seeing a different or another problem here though.
>>
>> Well for me both method hangs. On an extra note, reset inside Uboot
>> works, but reboot in Linux hang. I tried adding a trace
>> in syscon_restart_handle(), but the trace is never displayed. I'm
>> wondering if that handler is ever called, or if it's just that the
>> serial console was shut down already.
>>
>> Any idea what else should I trace ?
> 
> This is weird... reboot should work. Just to confirm it - can you test
> following patch in both scenarios (this should fix both of them... at
> least on Odroid U3 but your board might have different SPL/BL1):

I dig a little bit and emergency reboot on Odroid U3 (and family) is not
solvable in an easy and clean way.

The problem is: reset is a software reset of AP which means that clocks
go to default values. If cpufreq is active and CPU regulator voltage is
low, then it will fail to boot because clock frequency is high but
voltage is low, too low.

Possible solutions would be:
1. Reset PMIC values. This does not happen on software reset. I tried
also hardware reset through watchdog - also nothing.

2. Set regulator to safe value (same as for suspend, opp-suspend). This
cannot be used in emergency path because it is a sleeping, long
operation. I even wrote simpler cpufreq restart handler but still this
is not accepted sleeping operation. Also on Odroid U3 the CPU regulator
voltage cannot be controlled through GPIO/DVS because... they are wired
to VDD.

3. Extend emergency reboot path with execution of some new
syscore_emergency_shutdown() op. That is quite intrusive and requires
changing in many archs... Not really applicable.

4. Change the minimum voltage of buck2 to 1.0V on Odroid. Set is as
constrain, always. Not nice, but should help... Is it worth the effort?

Best regards,
Krzysztof

--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Nicolas Dufresne July 20, 2016, 12:53 p.m. UTC | #2
Hi Krzysztof,

I'm leaving for a long vacation (6w) today and didn't find the time to
test your patch. I'd like to thank you for looking into this issue. I
will we able to test this patch at my return.

I do understand now (and with the following mail), that this hardware
have problematic constraints that are specific to the Hardkernel
integration.

regards,
Nicolas

Le mardi 19 juillet 2016 à 13:29 +0200, Krzysztof Kozlowski a écrit :
> On 07/15/2016 05:56 PM, Nicolas Dufresne wrote:
> > Le vendredi 15 juillet 2016 à 16:33 +0200, Tobias Jakobi a écrit :
> > > I can confirm that this indeed doesn't work.
> > > 
> > > chidori ~ # echo 1 > /proc/sys/kernel/sysrq
> > > chidori ~ # echo s > /proc/sysrq-trigger
> > > chidori ~ # echo u > /proc/sysrq-trigger
> > > chidori ~ # echo b > /proc/sysrq-trigger
> > > <board hangs, only red power LED on>
> > > 
> > > I guess Nicolas is seeing a different or another problem here
> > > though.
> > 
> > Well for me both method hangs. On an extra note, reset inside Uboot
> > works, but reboot in Linux hang. I tried adding a trace
> > in syscon_restart_handle(), but the trace is never displayed. I'm
> > wondering if that handler is ever called, or if it's just that the
> > serial console was shut down already.
> > 
> > Any idea what else should I trace ?
> 
> This is weird... reboot should work. Just to confirm it - can you
> test
> following patch in both scenarios (this should fix both of them... at
> least on Odroid U3 but your board might have different SPL/BL1):
> 
> -- >8 --
> diff --git a/arch/arm/boot/dts/exynos4412-odroid-common.dtsi
> b/arch/arm/boot/dts/exynos4412-odroid-common.dtsi
> index 58ad48e7b8f7..7d963d36e96d 100644
> --- a/arch/arm/boot/dts/exynos4412-odroid-common.dtsi
> +++ b/arch/arm/boot/dts/exynos4412-odroid-common.dtsi
> @@ -423,7 +423,8 @@
> 
>                         buck2_reg: BUCK2 {
>                                 regulator-name = "vdd_arm";
> -                               regulator-min-microvolt = <900000>;
> +                               //regulator-min-microvolt = <900000>;
> +                               regulator-min-microvolt = <1000000>;
>                                 regulator-max-microvolt = <1350000>;
>                                 regulator-always-on;
>                                 regulator-boot-on;
> 
> 
> 
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Marian Mihailescu July 20, 2016, 11:56 p.m. UTC | #3
S3J6eXN6dG9mIEtvemxvd3NraSA8ay5rb3psb3dza2kgPGF0PiBzYW1zdW5nLmNvbT4gd3JpdGVzOgoKPiAKPiBPbiAwNy8xNS8yMDE2IDA1OjU2IFBNLCBOaWNvbGFzIER1ZnJlc25lIHdyb3RlOgo+ID4gTGUgdmVuZHJlZGkgMTUganVpbGxldCAyMDE2IMOgIDE2OjMzICswMjAwLCBUb2JpYXMg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sung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/arch/arm/boot/dts/exynos4412-odroid-common.dtsi
b/arch/arm/boot/dts/exynos4412-odroid-common.dtsi
index 58ad48e7b8f7..7d963d36e96d 100644
--- a/arch/arm/boot/dts/exynos4412-odroid-common.dtsi
+++ b/arch/arm/boot/dts/exynos4412-odroid-common.dtsi
@@ -423,7 +423,8 @@ 

                        buck2_reg: BUCK2 {
                                regulator-name = "vdd_arm";
-                               regulator-min-microvolt = <900000>;
+                               //regulator-min-microvolt = <900000>;
+                               regulator-min-microvolt = <1000000>;
                                regulator-max-microvolt = <1350000>;
                                regulator-always-on;
                                regulator-boot-on;