linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* 4.13 (and probably all recent) kernels refuse to boot on one Nokia N950, work or another
@ 2017-10-25 20:34 Pavel Machek
  2017-10-25 21:28 ` Tony Lindgren
  2017-10-26  6:25 ` Filip Matijević
  0 siblings, 2 replies; 24+ messages in thread
From: Pavel Machek @ 2017-10-25 20:34 UTC (permalink / raw)
  To: pali.rohar, sre, kernel list, linux-arm-kernel, linux-omap, tony,
	khilman, aaro.koskinen, ivo.g.dimitrov.75, patrikbachan, serge,
	abcloriens, clayton, martijn, sakari.ailus, filip.matijevic.pz

[-- Attachment #1: Type: text/plain, Size: 734 bytes --]

Hi!

...hardware should be identical. 3.5.3-nemo kernel seems to work on
both. 4.13-rc2 with display and clock patches boots on phone "S", but
does not on phone "P"; nothing nothing is received on serial port.

There is some difference in the bootloaders: S's bootloader provides
lots of debug info, P's is silent. R&D settings do _not_ have
influence on bootloader. We know P's serial works, as 3.5.3 kernel
prints "Uncompressing linux...booting" there.

I'll need to return "S" phone and serial cable tommorow. If you have
any ideas, let me know.

Best regards,
									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: 4.13 (and probably all recent) kernels refuse to boot on one Nokia N950, work or another
  2017-10-25 20:34 4.13 (and probably all recent) kernels refuse to boot on one Nokia N950, work or another Pavel Machek
@ 2017-10-25 21:28 ` Tony Lindgren
  2017-10-25 21:34   ` Aaro Koskinen
                     ` (3 more replies)
  2017-10-26  6:25 ` Filip Matijević
  1 sibling, 4 replies; 24+ messages in thread
From: Tony Lindgren @ 2017-10-25 21:28 UTC (permalink / raw)
  To: Pavel Machek
  Cc: pali.rohar, sre, kernel list, linux-arm-kernel, linux-omap,
	khilman, aaro.koskinen, ivo.g.dimitrov.75, patrikbachan, serge,
	abcloriens, clayton, martijn, sakari.ailus, filip.matijevic.pz

* Pavel Machek <pavel@ucw.cz> [171025 13:36]:
> Hi!
> 
> ...hardware should be identical. 3.5.3-nemo kernel seems to work on
> both. 4.13-rc2 with display and clock patches boots on phone "S", but
> does not on phone "P"; nothing nothing is received on serial port.
> 
> There is some difference in the bootloaders: S's bootloader provides
> lots of debug info, P's is silent. R&D settings do _not_ have
> influence on bootloader. We know P's serial works, as 3.5.3 kernel
> prints "Uncompressing linux...booting" there.
> 
> I'll need to return "S" phone and serial cable tommorow. If you have
> any ideas, let me know.

If you get nothing out of the uart, chances are the pins are
not muxed for the uart in nolo and maybe kernel dts is missing the
pinctrl entries for uart?

Also try booting with mem=512M@0x80000000 or 256M or 768M. Maybe the
memory is different size or partially broken?

Regards,

Tony

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: 4.13 (and probably all recent) kernels refuse to boot on one Nokia N950, work or another
  2017-10-25 21:28 ` Tony Lindgren
@ 2017-10-25 21:34   ` Aaro Koskinen
  2017-10-26  7:16   ` Pavel Machek
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 24+ messages in thread
From: Aaro Koskinen @ 2017-10-25 21:34 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Pavel Machek, ivo.g.dimitrov.75, khilman, kernel list, sre,
	martijn, filip.matijevic.pz, abcloriens, sakari.ailus,
	pali.rohar, clayton, linux-omap, patrikbachan, linux-arm-kernel,
	serge

Hi,

On Wed, Oct 25, 2017 at 02:28:07PM -0700, Tony Lindgren wrote:
> Also try booting with mem=512M@0x80000000 or 256M or 768M. Maybe the
> memory is different size or partially broken?

Yeah, some early N950s may have only 512 MB.

A.

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: 4.13 (and probably all recent) kernels refuse to boot on one Nokia N950, work or another
  2017-10-25 20:34 4.13 (and probably all recent) kernels refuse to boot on one Nokia N950, work or another Pavel Machek
  2017-10-25 21:28 ` Tony Lindgren
@ 2017-10-26  6:25 ` Filip Matijević
  2017-10-26  7:08   ` Pavel Machek
  1 sibling, 1 reply; 24+ messages in thread
From: Filip Matijević @ 2017-10-26  6:25 UTC (permalink / raw)
  To: Pavel Machek, pali.rohar, sre, kernel list, linux-arm-kernel,
	linux-omap, tony, khilman, aaro.koskinen, ivo.g.dimitrov.75,
	patrikbachan, serge, abcloriens, clayton, martijn, sakari.ailus

Hi Pavel,

On 10/25/2017 10:34 PM, Pavel Machek wrote:
> 3.5.3-nemo kernel seems to work

I did take a quick look at the board-rm680.c since there are some
conditional statements with regards to system revision but I didn't
notice anything that might prevent it from booting.

> If you have
> any ideas, let me know.

Last time I couldn't get output on serial I used CONFIG_DEBUG_LL,
CONFIG_DEBUG_OMAP3UART3, CONFIG_EARLY_PRINTK... and ignore_loglevel
earlyprintk kernel params to get output early enough - I guess you
already tried that.

Regards,
Filip

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: 4.13 (and probably all recent) kernels refuse to boot on one Nokia N950, work or another
  2017-10-26  6:25 ` Filip Matijević
@ 2017-10-26  7:08   ` Pavel Machek
  2017-10-26  7:21     ` Pali Rohár
  0 siblings, 1 reply; 24+ messages in thread
From: Pavel Machek @ 2017-10-26  7:08 UTC (permalink / raw)
  To: Filip Matijević
  Cc: pali.rohar, sre, kernel list, linux-arm-kernel, linux-omap, tony,
	khilman, aaro.koskinen, ivo.g.dimitrov.75, patrikbachan, serge,
	abcloriens, clayton, martijn, sakari.ailus

[-- Attachment #1: Type: text/plain, Size: 1015 bytes --]

On Thu 2017-10-26 08:25:02, Filip Matijević wrote:
> Hi Pavel,
> 
> On 10/25/2017 10:34 PM, Pavel Machek wrote:
> > 3.5.3-nemo kernel seems to work
> 
> I did take a quick look at the board-rm680.c since there are some
> conditional statements with regards to system revision but I didn't
> notice anything that might prevent it from booting.

Thanks.

> > If you have
> > any ideas, let me know.
> 
> Last time I couldn't get output on serial I used CONFIG_DEBUG_LL,
> CONFIG_DEBUG_OMAP3UART3, CONFIG_EARLY_PRINTK... and ignore_loglevel
> earlyprintk kernel params to get output early enough - I guess you
> already tried that.

I realized I'm not getting output from the decompessor (even on "S"
machine), and enabled that.

But I'm _still_ not getting any output on decompressor... early
printing works ok on "S" but not on "P".

									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: 4.13 (and probably all recent) kernels refuse to boot on one Nokia N950, work or another
  2017-10-25 21:28 ` Tony Lindgren
  2017-10-25 21:34   ` Aaro Koskinen
@ 2017-10-26  7:16   ` Pavel Machek
  2017-10-26  7:34     ` Filip Matijević
  2017-10-26  8:49   ` Pavel Machek
  2017-10-26  9:13   ` Pavel Machek
  3 siblings, 1 reply; 24+ messages in thread
From: Pavel Machek @ 2017-10-26  7:16 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: pali.rohar, sre, kernel list, linux-arm-kernel, linux-omap,
	khilman, aaro.koskinen, ivo.g.dimitrov.75, patrikbachan, serge,
	abcloriens, clayton, martijn, sakari.ailus, filip.matijevic.pz

[-- Attachment #1: Type: text/plain, Size: 1593 bytes --]

On Wed 2017-10-25 14:28:07, Tony Lindgren wrote:
> * Pavel Machek <pavel@ucw.cz> [171025 13:36]:
> > Hi!
> > 
> > ...hardware should be identical. 3.5.3-nemo kernel seems to work on
> > both. 4.13-rc2 with display and clock patches boots on phone "S", but
> > does not on phone "P"; nothing nothing is received on serial port.
> > 
> > There is some difference in the bootloaders: S's bootloader provides
> > lots of debug info, P's is silent. R&D settings do _not_ have
> > influence on bootloader. We know P's serial works, as 3.5.3 kernel
> > prints "Uncompressing linux...booting" there.
> > 
> > I'll need to return "S" phone and serial cable tommorow. If you have
> > any ideas, let me know.
> 
> If you get nothing out of the uart, chances are the pins are
> not muxed for the uart in nolo and maybe kernel dts is missing the
> pinctrl entries for uart?

"Uart pins not muxed in NOLO" would certainly explain my problems. In
3.5.X, output works even in decompressor ("Uncompressing
kernel... done, booting linux"). Where is the code to do the muxing?
Does it need fixing on v4.x?

Is

 CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h"

right setting for me?

> Also try booting with mem=512M@0x80000000 or 256M or 768M. Maybe the
> memory is different size or partially broken?

"P" machine runs Hartmann, latest release, and is stable
there... including games. RAM should be ok.

Best regards,
									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: 4.13 (and probably all recent) kernels refuse to boot on one Nokia N950, work or another
  2017-10-26  7:08   ` Pavel Machek
@ 2017-10-26  7:21     ` Pali Rohár
  2017-10-26  7:27       ` Pavel Machek
  0 siblings, 1 reply; 24+ messages in thread
From: Pali Rohár @ 2017-10-26  7:21 UTC (permalink / raw)
  To: Pavel Machek
  Cc: Filip Matijević,
	sre, kernel list, linux-arm-kernel, linux-omap, tony, khilman,
	aaro.koskinen, ivo.g.dimitrov.75, patrikbachan, serge,
	abcloriens, clayton, martijn, sakari.ailus

On Thursday 26 October 2017 09:08:15 Pavel Machek wrote:
> On Thu 2017-10-26 08:25:02, Filip Matijević wrote:
> > Last time I couldn't get output on serial I used CONFIG_DEBUG_LL,
> > CONFIG_DEBUG_OMAP3UART3, CONFIG_EARLY_PRINTK... and ignore_loglevel
> > earlyprintk kernel params to get output early enough - I guess you
> > already tried that.
> 
> I realized I'm not getting output from the decompessor (even on "S"
> machine), and enabled that.

That is because you have not enabled those EARLY PRINK or DEBUG LL.
Similar thing is needed for N900 and IIRC in some of my linux-n900
branches I have config for it. Plus it needs patching some arch/arm
source files to make it working.

> But I'm _still_ not getting any output on decompressor... early
> printing works ok on "S" but not on "P".

I guess there can be either problem with memory mapping and RAM size or
with OMAP HS mode?

-- 
Pali Rohár
pali.rohar@gmail.com

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: 4.13 (and probably all recent) kernels refuse to boot on one Nokia N950, work or another
  2017-10-26  7:21     ` Pali Rohár
@ 2017-10-26  7:27       ` Pavel Machek
  2017-10-26  7:32         ` Pali Rohár
  0 siblings, 1 reply; 24+ messages in thread
From: Pavel Machek @ 2017-10-26  7:27 UTC (permalink / raw)
  To: Pali Rohár
  Cc: Filip Matijević,
	sre, kernel list, linux-arm-kernel, linux-omap, tony, khilman,
	aaro.koskinen, ivo.g.dimitrov.75, patrikbachan, serge,
	abcloriens, clayton, martijn, sakari.ailus

[-- Attachment #1: Type: text/plain, Size: 1623 bytes --]

Hi!

On Thu 2017-10-26 09:21:13, Pali Rohár wrote:
> On Thursday 26 October 2017 09:08:15 Pavel Machek wrote:
> > On Thu 2017-10-26 08:25:02, Filip Matijević wrote:
> > > Last time I couldn't get output on serial I used CONFIG_DEBUG_LL,
> > > CONFIG_DEBUG_OMAP3UART3, CONFIG_EARLY_PRINTK... and ignore_loglevel
> > > earlyprintk kernel params to get output early enough - I guess you
> > > already tried that.
> > 
> > I realized I'm not getting output from the decompessor (even on "S"
> > machine), and enabled that.
> 
> That is because you have not enabled those EARLY PRINK or DEBUG LL.
> Similar thing is needed for N900 and IIRC in some of my linux-n900
> branches I have config for it. Plus it needs patching some arch/arm
> source files to make it working.

Do you have a patch? That would be very useful.

Seems like debugging in uncompressor was broken some time ago:

config DEBUG_UNCOMPRESS
        bool
		depends on ARCH_MULTIPLATFORM || PLAT_SAMSUNG ||         ARM_SINGLE_ARMV7M
	        default y if DEBUG_LL && !DEBUG_OMAP2PLUS_UART && 
		                     (!DEBUG_TEGRA_UART || !ZBOOT_ROM)
        && \!DEBUG_BRCMSTB_UART
			     

> > But I'm _still_ not getting any output on decompressor... early
> > printing works ok on "S" but not on "P".
> 
> I guess there can be either problem with memory mapping and RAM size or
> with OMAP HS mode?

RAM size should be ok... how do I check for OMAP HS problems?

									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: 4.13 (and probably all recent) kernels refuse to boot on one Nokia N950, work or another
  2017-10-26  7:27       ` Pavel Machek
@ 2017-10-26  7:32         ` Pali Rohár
  2017-10-26  8:24           ` Pavel Machek
  0 siblings, 1 reply; 24+ messages in thread
From: Pali Rohár @ 2017-10-26  7:32 UTC (permalink / raw)
  To: Pavel Machek
  Cc: Filip Matijević,
	sre, kernel list, linux-arm-kernel, linux-omap, tony, khilman,
	aaro.koskinen, ivo.g.dimitrov.75, patrikbachan, serge,
	abcloriens, clayton, martijn, sakari.ailus

On Thursday 26 October 2017 09:27:59 Pavel Machek wrote:
> Hi!
> 
> On Thu 2017-10-26 09:21:13, Pali Rohár wrote:
> > On Thursday 26 October 2017 09:08:15 Pavel Machek wrote:
> > > On Thu 2017-10-26 08:25:02, Filip Matijević wrote:
> > > > Last time I couldn't get output on serial I used CONFIG_DEBUG_LL,
> > > > CONFIG_DEBUG_OMAP3UART3, CONFIG_EARLY_PRINTK... and ignore_loglevel
> > > > earlyprintk kernel params to get output early enough - I guess you
> > > > already tried that.
> > > 
> > > I realized I'm not getting output from the decompessor (even on "S"
> > > machine), and enabled that.
> > 
> > That is because you have not enabled those EARLY PRINK or DEBUG LL.
> > Similar thing is needed for N900 and IIRC in some of my linux-n900
> > branches I have config for it. Plus it needs patching some arch/arm
> > source files to make it working.
> 
> Do you have a patch? That would be very useful.

Yes, in v4.9-n900 branch, see:
https://github.com/pali/linux-n900/commit/66b22ba4132ca90f7efc3f9e8ece8d4b9adddcdc

> Seems like debugging in uncompressor was broken some time ago:
> 
> config DEBUG_UNCOMPRESS
>         bool
> 		depends on ARCH_MULTIPLATFORM || PLAT_SAMSUNG ||         ARM_SINGLE_ARMV7M
> 	        default y if DEBUG_LL && !DEBUG_OMAP2PLUS_UART && 
> 		                     (!DEBUG_TEGRA_UART || !ZBOOT_ROM)
>         && \!DEBUG_BRCMSTB_UART
> 			     
> 
> > > But I'm _still_ not getting any output on decompressor... early
> > > printing works ok on "S" but not on "P".
> > 
> > I guess there can be either problem with memory mapping and RAM size or
> > with OMAP HS mode?
> 
> RAM size should be ok... how do I check for OMAP HS problems?

For problems with smc or any other it is needed to look into kernel log :-(

-- 
Pali Rohár
pali.rohar@gmail.com

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: 4.13 (and probably all recent) kernels refuse to boot on one Nokia N950, work or another
  2017-10-26  7:16   ` Pavel Machek
@ 2017-10-26  7:34     ` Filip Matijević
  0 siblings, 0 replies; 24+ messages in thread
From: Filip Matijević @ 2017-10-26  7:34 UTC (permalink / raw)
  To: Pavel Machek
  Cc: Tony Lindgren, pali.rohar, sre, kernel list, linux-arm-kernel,
	linux-omap, khilman, aaro.koskinen, ivo.g.dimitrov.75,
	patrikbachan, serge, abcloriens, clayton, martijn, sakari.ailus

On 10/26/2017 09:16 AM, Pavel Machek wrote:
> "Uart pins not muxed in NOLO" would certainly explain my problems. In
> 3.5.X, output works even in decompressor ("Uncompressing
> kernel... done, booting linux").

IIRC bootloader passes some additional settings for gpio that kernel
should apply (2.6 and 3.5 do that). I'm not sure if that would cause
booting to fail on that specific device, but can you compare kernel
params on S and P devices (by using 3.5.3 for P device)?

Filip

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: 4.13 (and probably all recent) kernels refuse to boot on one Nokia N950, work or another
  2017-10-26  7:32         ` Pali Rohár
@ 2017-10-26  8:24           ` Pavel Machek
  0 siblings, 0 replies; 24+ messages in thread
From: Pavel Machek @ 2017-10-26  8:24 UTC (permalink / raw)
  To: Pali Rohár
  Cc: Filip Matijević,
	sre, kernel list, linux-arm-kernel, linux-omap, tony, khilman,
	aaro.koskinen, ivo.g.dimitrov.75, patrikbachan, serge,
	abcloriens, clayton, martijn, sakari.ailus

[-- Attachment #1: Type: text/plain, Size: 1490 bytes --]

Hi!
On Thu 2017-10-26 09:32:36, Pali Rohár wrote:
> On Thursday 26 October 2017 09:27:59 Pavel Machek wrote:
> > Hi!
> > 
> > On Thu 2017-10-26 09:21:13, Pali Rohár wrote:
> > > On Thursday 26 October 2017 09:08:15 Pavel Machek wrote:
> > > > On Thu 2017-10-26 08:25:02, Filip Matijević wrote:
> > > > > Last time I couldn't get output on serial I used CONFIG_DEBUG_LL,
> > > > > CONFIG_DEBUG_OMAP3UART3, CONFIG_EARLY_PRINTK... and ignore_loglevel
> > > > > earlyprintk kernel params to get output early enough - I guess you
> > > > > already tried that.
> > > > 
> > > > I realized I'm not getting output from the decompessor (even on "S"
> > > > machine), and enabled that.
> > > 
> > > That is because you have not enabled those EARLY PRINK or DEBUG LL.
> > > Similar thing is needed for N900 and IIRC in some of my linux-n900
> > > branches I have config for it. Plus it needs patching some arch/arm
> > > source files to make it working.
> > 
> > Do you have a patch? That would be very useful.
> 
> Yes, in v4.9-n900 branch, see:
> https://github.com/pali/linux-n900/commit/66b22ba4132ca90f7efc3f9e8ece8d4b9adddcdc

Thanks for a pointer; but I still don't see how this is supposed to
work:

arch/arm/include/debug/uncompress.h provides empty static inline void
arch_decomp_setup(void) {}

...?
								Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: 4.13 (and probably all recent) kernels refuse to boot on one Nokia N950, work or another
  2017-10-25 21:28 ` Tony Lindgren
  2017-10-25 21:34   ` Aaro Koskinen
  2017-10-26  7:16   ` Pavel Machek
@ 2017-10-26  8:49   ` Pavel Machek
  2017-10-26  9:13   ` Pavel Machek
  3 siblings, 0 replies; 24+ messages in thread
From: Pavel Machek @ 2017-10-26  8:49 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: pali.rohar, sre, kernel list, linux-arm-kernel, linux-omap,
	khilman, aaro.koskinen, ivo.g.dimitrov.75, patrikbachan, serge,
	abcloriens, clayton, martijn, sakari.ailus, filip.matijevic.pz

[-- Attachment #1: Type: text/plain, Size: 8700 bytes --]

Hi!

> > ...hardware should be identical. 3.5.3-nemo kernel seems to work on
> > both. 4.13-rc2 with display and clock patches boots on phone "S", but
> > does not on phone "P"; nothing nothing is received on serial port.
> > 
> > There is some difference in the bootloaders: S's bootloader provides
> > lots of debug info, P's is silent. R&D settings do _not_ have
> > influence on bootloader. We know P's serial works, as 3.5.3 kernel
> > prints "Uncompressing linux...booting" there.
> > 
> > I'll need to return "S" phone and serial cable tommorow. If you have
> > any ideas, let me know.
> 
> If you get nothing out of the uart, chances are the pins are
> not muxed for the uart in nolo and maybe kernel dts is missing the
> pinctrl entries for uart?

Ok. With patch below, I get:

[    4.770965] Booting...
Uncompressing Linux... done, booting the kernel.
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.13.0-rc2-12806-g7603303-dirty
(pavel@duo) (gcc version 4.7.2 (GCC)) #7

... on "S" machine. (But still nothing on "P" machine).

3.5.3 does have to set up pinmux for debug printing somewhere, right?
Where can I copy that from?

Thanks,
								Pavel

commit 5dc1c6ea8f20b6480e01c24710514434c00d53f8
Author: Pavel <pavel@ucw.cz>
Date:   Thu Oct 26 10:42:06 2017 +0200

    Add debugging hacks. In particular, Uncompressing Linux.... done,
    booting... is now printed.

diff --git a/.config b/.config
index 40aaa5e..60750b3 100644
--- a/.config
+++ b/.config
@@ -2534,10 +2534,29 @@ CONFIG_ARCH_HAS_DEVMEM_IS_ALLOWED=y
 # CONFIG_ARM_PTDUMP is not set
 # CONFIG_ARM_UNWIND is not set
 # CONFIG_DEBUG_USER is not set
-# CONFIG_DEBUG_LL is not set
-CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S"
+CONFIG_DEBUG_LL=y
+# CONFIG_DEBUG_OMAP2UART1 is not set
+# CONFIG_DEBUG_OMAP2UART2 is not set
+# CONFIG_DEBUG_OMAP2UART3 is not set
+CONFIG_DEBUG_OMAP3UART3=y
+# CONFIG_DEBUG_OMAP4UART3 is not set
+# CONFIG_DEBUG_OMAP3UART4 is not set
+# CONFIG_DEBUG_OMAP4UART4 is not set
+# CONFIG_DEBUG_TI81XXUART1 is not set
+# CONFIG_DEBUG_TI81XXUART2 is not set
+# CONFIG_DEBUG_TI81XXUART3 is not set
+# CONFIG_DEBUG_AM33XXUART1 is not set
+# CONFIG_DEBUG_ZOOM_UART is not set
+# CONFIG_DEBUG_ICEDCC is not set
+# CONFIG_DEBUG_SEMIHOSTING is not set
+# CONFIG_DEBUG_LL_UART_8250 is not set
+# CONFIG_DEBUG_LL_UART_PL01X is not set
+CONFIG_DEBUG_OMAP2PLUS_UART=y
+CONFIG_DEBUG_LL_INCLUDE="debug/omap2plus.S"
 # CONFIG_DEBUG_UART_8250 is not set
+CONFIG_DEBUG_UNCOMPRESS=y
 CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h"
+CONFIG_EARLY_PRINTK=y
 # CONFIG_PID_IN_CONTEXTIDR is not set
 # CONFIG_CORESIGHT is not set
 
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
index 447629d..0f50439 100644
--- a/arch/arm/Kconfig.debug
+++ b/arch/arm/Kconfig.debug
@@ -1736,7 +1736,7 @@ config DEBUG_UART_8250_FLOW_CONTROL
 config DEBUG_UNCOMPRESS
 	bool
 	depends on ARCH_MULTIPLATFORM || PLAT_SAMSUNG || ARM_SINGLE_ARMV7M
-	default y if DEBUG_LL && !DEBUG_OMAP2PLUS_UART && \
+	default y if DEBUG_LL && (!DEBUG_OMAP2PLUS_UART || !ZROM_BOOT) && \
 		     (!DEBUG_TEGRA_UART || !ZBOOT_ROM) && \
 		     !DEBUG_BRCMSTB_UART
 	help
diff --git a/arch/arm/include/debug/omap2plus.S b/arch/arm/include/debug/omap2plus.S
index 6d867ae..3684e04 100644
--- a/arch/arm/include/debug/omap2plus.S
+++ b/arch/arm/include/debug/omap2plus.S
@@ -58,12 +58,17 @@
 
 #define UART_OFFSET(addr)	((addr) & 0x00ffffff)
 
+#if defined(ZIMAGE)
+	omap_uart_phys:	.word	0
+	omap_uart_virt:	.word	0
+	omap_uart_lsr:	.word	0
+#else
 		.pushsection .data
-omap_uart_phys:	.word	0
-omap_uart_virt:	.word	0
-omap_uart_lsr:	.word	0
+	omap_uart_phys:	.word	0
+	omap_uart_virt:	.word	0
+	omap_uart_lsr:	.word	0
 		.popsection
-
+#endif
 		.macro	addruart, rp, rv, tmp
 
 		/* Use omap_uart_phys/virt if already configured */
diff --git a/arch/arm/include/debug/uncompress.h b/arch/arm/include/debug/uncompress.h
index 0e2949b..f660c51 100644
--- a/arch/arm/include/debug/uncompress.h
+++ b/arch/arm/include/debug/uncompress.h
@@ -1,7 +1,109 @@
-#ifdef CONFIG_DEBUG_UNCOMPRESS
-extern void putc(int c);
-#else
-static inline void putc(int c) {}
-#endif
-static inline void flush(void) {}
-static inline void arch_decomp_setup(void) {}
+/*
+ * arch/arm/plat-omap/include/mach/uncompress.h
+ *
+ * Serial port stubs for kernel decompress status messages
+ *
+ * Initially based on:
+ * linux-2.4.15-rmk1-dsplinux1.6/arch/arm/plat-omap/include/mach1510/uncompress.h
+ * Copyright (C) 2000 RidgeRun, Inc.
+ * Author: Greg Lonnon <glonnon@ridgerun.com>
+ *
+ * Rewritten by:
+ * Author: <source@mvista.com>
+ * 2004 (c) MontaVista Software, Inc.
+ *
+ * This file is licensed under the terms of the GNU General Public License
+ * version 2. This program is licensed "as is" without any warranty of any
+ * kind, whether express or implied.
+ */
+
+#include <linux/types.h>
+#include <linux/serial_reg.h>
+
+#include <asm/memory.h>
+#include <asm/mach-types.h>
+
+//#include <mach/serial.h>
+
+#define OMAP_UART_INFO_OFS 0x3ffc
+
+#define MDR1_MODE_MASK			0x07
+
+volatile u8 *uart_base;
+int uart_shift;
+
+/*
+ * Store the DEBUG_LL uart number into memory.
+ * See also debug-macro.S, and serial.c for related code.
+ */
+static void set_omap_uart_info(unsigned char port)
+{
+	/*
+	 * Get address of some.bss variable and round it down
+	 * a la CONFIG_AUTO_ZRELADDR.
+	 */
+	u32 ram_start = (u32)&uart_shift & 0xf8000000;
+	u32 *uart_info = (u32 *)(ram_start + OMAP_UART_INFO_OFS);
+	*uart_info = port;
+}
+
+static inline void putc(int c)
+{
+	if (!uart_base)
+		return;
+
+	/* Check for UART 16x mode */
+	if ((uart_base[UART_OMAP_MDR1 << uart_shift] & MDR1_MODE_MASK) != 0)
+		return;
+
+	while (!(uart_base[UART_LSR << uart_shift] & UART_LSR_THRE))
+		barrier();
+	uart_base[UART_TX << uart_shift] = c;
+}
+
+static inline void flush(void)
+{
+}
+
+/*
+ * Macros to configure UART1 and debug UART
+ */
+#define _DEBUG_LL_ENTRY(mach, dbg_uart, dbg_shft, dbg_id)		\
+	if (1) {					\
+		uart_base = (volatile u8 *)(dbg_uart);			\
+		uart_shift = (dbg_shft);				\
+		port = (dbg_id);					\
+		set_omap_uart_info(port);				\
+		break;							\
+	}
+
+#define DEBUG_LL_OMAP7XX(p, mach)					\
+	_DEBUG_LL_ENTRY(mach, OMAP1_UART##p##_BASE, OMAP7XX_PORT_SHIFT,	\
+		OMAP1UART##p)
+
+#define DEBUG_LL_OMAP1(p, mach)						\
+	_DEBUG_LL_ENTRY(mach, OMAP1_UART##p##_BASE, OMAP_PORT_SHIFT,	\
+		OMAP1UART##p)
+
+#define DEBUG_LL_OMAP3(p, mach)                                         \
+	_DEBUG_LL_ENTRY(mach, OMAP3_UART##p##_BASE, OMAP_PORT_SHIFT,    \
+			OMAP3UART##p)
+
+#define OMAP3_UART3_BASE 0x49020000
+#define OMAP_PORT_SHIFT 2
+#define OMAP3UART3 33
+
+static inline void arch_decomp_setup(void)
+{
+	int port = 0;
+
+	/*
+	 * Initialize the port based on the machine ID from the bootloader.
+	 * Note that we're using macros here instead of switch statement
+	 * as machine_is functions are optimized out for the boards that
+	 * are not selected.
+	 */
+	do {
+		DEBUG_LL_OMAP3(3, nokia_rm680);
+	} while (0);
+}
diff --git a/arch/arm/mach-omap2/common.c b/arch/arm/mach-omap2/common.c
index 484cdad..7d3e635 100644
--- a/arch/arm/mach-omap2/common.c
+++ b/arch/arm/mach-omap2/common.c
@@ -14,6 +14,7 @@
  */
 #include <linux/kernel.h>
 #include <linux/init.h>
+#include <linux/gpio.h>
 
 #include "common.h"
 #include "omap-secure.h"
@@ -32,3 +33,20 @@ void __init omap_reserve(void)
 	omap_secure_ram_reserve_memblock();
 	omap_barrier_reserve_memblock();
 }
+
+void iam_alive(void)
+{
+	int i;
+	int debug_gpio = 92;
+	printk("request: %d\n", gpio_request(debug_gpio, "debug"));
+	printk("output: %d\n", gpio_direction_output(debug_gpio, 1));
+
+	for (i=0; i<5; i++) {
+		gpio_set_value(debug_gpio, 0);
+		msleep(1000);
+		gpio_set_value(debug_gpio, 1);
+		msleep(1000);
+	}
+	
+}
+
diff --git a/arch/arm/mach-omap2/dma.c b/arch/arm/mach-omap2/dma.c
index 0b77a01..97b59e0 100644
--- a/arch/arm/mach-omap2/dma.c
+++ b/arch/arm/mach-omap2/dma.c
@@ -118,6 +118,10 @@ static void omap2_show_dma_caps(void)
 	u8 revision = dma_read(REVISION, 0) & 0xff;
 	printk(KERN_INFO "OMAP DMA hardware revision %d.%d\n",
 				revision >> 4, revision & 0xf);
+       {
+              extern void iam_alive(void);
+               iam_alive();
+      }
 }
 
 static unsigned configure_dma_errata(void)

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* Re: 4.13 (and probably all recent) kernels refuse to boot on one Nokia N950, work or another
  2017-10-25 21:28 ` Tony Lindgren
                     ` (2 preceding siblings ...)
  2017-10-26  8:49   ` Pavel Machek
@ 2017-10-26  9:13   ` Pavel Machek
  2017-10-26  9:31     ` Sebastian Reichel
  2017-10-26  9:53     ` Pavel Machek
  3 siblings, 2 replies; 24+ messages in thread
From: Pavel Machek @ 2017-10-26  9:13 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: pali.rohar, sre, kernel list, linux-arm-kernel, linux-omap,
	khilman, aaro.koskinen, ivo.g.dimitrov.75, patrikbachan, serge,
	abcloriens, clayton, martijn, sakari.ailus, filip.matijevic.pz

[-- Attachment #1: Type: text/plain, Size: 1457 bytes --]

On Wed 2017-10-25 14:28:07, Tony Lindgren wrote:
> * Pavel Machek <pavel@ucw.cz> [171025 13:36]:
> > Hi!
> > 
> > ...hardware should be identical. 3.5.3-nemo kernel seems to work on
> > both. 4.13-rc2 with display and clock patches boots on phone "S", but
> > does not on phone "P"; nothing nothing is received on serial port.
> > 
> > There is some difference in the bootloaders: S's bootloader provides
> > lots of debug info, P's is silent. R&D settings do _not_ have
> > influence on bootloader. We know P's serial works, as 3.5.3 kernel
> > prints "Uncompressing linux...booting" there.
> > 
> > I'll need to return "S" phone and serial cable tommorow. If you have
> > any ideas, let me know.
> 
> If you get nothing out of the uart, chances are the pins are
> not muxed for the uart in nolo and maybe kernel dts is missing the
> pinctrl entries for uart?
> 
> Also try booting with mem=512M@0x80000000 or 256M or 768M. Maybe the
> memory is different size or partially broken?

Uhuh. It looks like "P" nokia really wants initrd, otherwise it will
not boot.

I got "uncompressing Linux 4.13" on serial console now, debug LEDs
blinking, and if I use a flashlight, I see output on the screen, too.

(What do I need to do to get the backlight working?)

Best regards,
									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: 4.13 (and probably all recent) kernels refuse to boot on one Nokia N950, work or another
  2017-10-26  9:13   ` Pavel Machek
@ 2017-10-26  9:31     ` Sebastian Reichel
  2017-10-26  9:57       ` Pavel Machek
                         ` (2 more replies)
  2017-10-26  9:53     ` Pavel Machek
  1 sibling, 3 replies; 24+ messages in thread
From: Sebastian Reichel @ 2017-10-26  9:31 UTC (permalink / raw)
  To: Pavel Machek
  Cc: Tony Lindgren, pali.rohar, kernel list, linux-arm-kernel,
	linux-omap, khilman, aaro.koskinen, ivo.g.dimitrov.75,
	patrikbachan, serge, abcloriens, clayton, martijn, sakari.ailus,
	filip.matijevic.pz

[-- Attachment #1: Type: text/plain, Size: 1985 bytes --]

Hi,

On Thu, Oct 26, 2017 at 11:13:26AM +0200, Pavel Machek wrote:
> On Wed 2017-10-25 14:28:07, Tony Lindgren wrote:
> > * Pavel Machek <pavel@ucw.cz> [171025 13:36]:
> > > Hi!
> > > 
> > > ...hardware should be identical. 3.5.3-nemo kernel seems to work on
> > > both. 4.13-rc2 with display and clock patches boots on phone "S", but
> > > does not on phone "P"; nothing nothing is received on serial port.
> > > 
> > > There is some difference in the bootloaders: S's bootloader provides
> > > lots of debug info, P's is silent. R&D settings do _not_ have
> > > influence on bootloader. We know P's serial works, as 3.5.3 kernel
> > > prints "Uncompressing linux...booting" there.
> > > 
> > > I'll need to return "S" phone and serial cable tommorow. If you have
> > > any ideas, let me know.
> > 
> > If you get nothing out of the uart, chances are the pins are
> > not muxed for the uart in nolo and maybe kernel dts is missing the
> > pinctrl entries for uart?
> > 
> > Also try booting with mem=512M@0x80000000 or 256M or 768M. Maybe the
> > memory is different size or partially broken?
> 
> Uhuh. It looks like "P" nokia really wants initrd, otherwise it will
> not boot.
> 
> I got "uncompressing Linux 4.13" on serial console now, debug LEDs
> blinking, and if I use a flashlight, I see output on the screen, too.
> 
> (What do I need to do to get the backlight working?)

Glad you got it working :) For backlight you can add this
in drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c:

add the following code at the end of dsicm_probe:

-----------------------------------------------------------
mutex_unlock(&ddata->lock);
mutex_lock(&ddata->lock);
ddata->in->ops.dsi->bus_lock(ddata->in);
r = dsicm_wake_up(ddata);
if (!r)
    r = dsicm_dcs_write_1(ddata, DCS_BRIGHTNESS, 100);
ddata->in->ops.dsi->bus_unlock(ddata->in);
mutex_unlock(&ddata->lock);
-----------------------------------------------------------

-- Sebastian

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: 4.13 (and probably all recent) kernels refuse to boot on one Nokia N950, work or another
  2017-10-26  9:13   ` Pavel Machek
  2017-10-26  9:31     ` Sebastian Reichel
@ 2017-10-26  9:53     ` Pavel Machek
  1 sibling, 0 replies; 24+ messages in thread
From: Pavel Machek @ 2017-10-26  9:53 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: pali.rohar, sre, kernel list, linux-arm-kernel, linux-omap,
	khilman, aaro.koskinen, ivo.g.dimitrov.75, patrikbachan, serge,
	abcloriens, clayton, martijn, sakari.ailus, filip.matijevic.pz

[-- Attachment #1: Type: text/plain, Size: 2021 bytes --]

On Thu 2017-10-26 11:13:26, Pavel Machek wrote:
> On Wed 2017-10-25 14:28:07, Tony Lindgren wrote:
> > * Pavel Machek <pavel@ucw.cz> [171025 13:36]:
> > > Hi!
> > > 
> > > ...hardware should be identical. 3.5.3-nemo kernel seems to work on
> > > both. 4.13-rc2 with display and clock patches boots on phone "S", but
> > > does not on phone "P"; nothing nothing is received on serial port.
> > > 
> > > There is some difference in the bootloaders: S's bootloader provides
> > > lots of debug info, P's is silent. R&D settings do _not_ have
> > > influence on bootloader. We know P's serial works, as 3.5.3 kernel
> > > prints "Uncompressing linux...booting" there.
> > > 
> > > I'll need to return "S" phone and serial cable tommorow. If you have
> > > any ideas, let me know.
> > 
> > If you get nothing out of the uart, chances are the pins are
> > not muxed for the uart in nolo and maybe kernel dts is missing the
> > pinctrl entries for uart?
> > 
> > Also try booting with mem=512M@0x80000000 or 256M or 768M. Maybe the
> > memory is different size or partially broken?
> 
> Uhuh. It looks like "P" nokia really wants initrd, otherwise it will
> not boot.

No. Nokia "P" really hates command line on 0xffff command line. initrd
is optional. It also forces delay on "Warning! You have modified"
... screen.

I configured serial port. Now I get up-to working userspace (initrd)
on both "S" and "P" devices.


Welcome to MOSLO vNEMO_MOSLO-N9_0.0.13.2
Could not ioctl(OMAPFB_UPDATE_WINDOW): Inappropriate ioctl for device
check wiki.merproject.org/wiki/Nemo
Could not ioctl(OMAPFB_UPDATE_WINDOW): Inappropriate ioctl for device

Could not ioctl(OMAPFB_UPDATE_WINDOW): Inappropriate ioctl for device
Waiting for eMMC device...
Could not ioctl(OMAPFB_UPDATE_WINDOW): Inappropriate ioctl for device
eMMC device not found!

									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: 4.13 (and probably all recent) kernels refuse to boot on one Nokia N950, work or another
  2017-10-26  9:31     ` Sebastian Reichel
@ 2017-10-26  9:57       ` Pavel Machek
  2017-10-26 12:01         ` Sebastian Reichel
  2017-10-27 20:27       ` Backlight on Nokia N900 " Pavel Machek
  2017-10-30  7:51       ` Pavel Machek
  2 siblings, 1 reply; 24+ messages in thread
From: Pavel Machek @ 2017-10-26  9:57 UTC (permalink / raw)
  To: Sebastian Reichel
  Cc: Tony Lindgren, pali.rohar, kernel list, linux-arm-kernel,
	linux-omap, khilman, aaro.koskinen, ivo.g.dimitrov.75,
	patrikbachan, serge, abcloriens, clayton, martijn, sakari.ailus,
	filip.matijevic.pz

[-- Attachment #1: Type: text/plain, Size: 2403 bytes --]

On Thu 2017-10-26 11:31:15, Sebastian Reichel wrote:
> Hi,
> 
> On Thu, Oct 26, 2017 at 11:13:26AM +0200, Pavel Machek wrote:
> > On Wed 2017-10-25 14:28:07, Tony Lindgren wrote:
> > > * Pavel Machek <pavel@ucw.cz> [171025 13:36]:
> > > > Hi!
> > > > 
> > > > ...hardware should be identical. 3.5.3-nemo kernel seems to work on
> > > > both. 4.13-rc2 with display and clock patches boots on phone "S", but
> > > > does not on phone "P"; nothing nothing is received on serial port.
> > > > 
> > > > There is some difference in the bootloaders: S's bootloader provides
> > > > lots of debug info, P's is silent. R&D settings do _not_ have
> > > > influence on bootloader. We know P's serial works, as 3.5.3 kernel
> > > > prints "Uncompressing linux...booting" there.
> > > > 
> > > > I'll need to return "S" phone and serial cable tommorow. If you have
> > > > any ideas, let me know.
> > > 
> > > If you get nothing out of the uart, chances are the pins are
> > > not muxed for the uart in nolo and maybe kernel dts is missing the
> > > pinctrl entries for uart?
> > > 
> > > Also try booting with mem=512M@0x80000000 or 256M or 768M. Maybe the
> > > memory is different size or partially broken?
> > 
> > Uhuh. It looks like "P" nokia really wants initrd, otherwise it will
> > not boot.
> > 
> > I got "uncompressing Linux 4.13" on serial console now, debug LEDs
> > blinking, and if I use a flashlight, I see output on the screen, too.
> > 
> > (What do I need to do to get the backlight working?)
> 
> Glad you got it working :) For backlight you can add this
> in drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c:
> 
> add the following code at the end of dsicm_probe:

You did not actually include code to paste into panel-dsi-cm, can you
try a again?

Thanks a lot,
								Pavel

> -----------------------------------------------------------
> mutex_unlock(&ddata->lock);
> mutex_lock(&ddata->lock);
> ddata->in->ops.dsi->bus_lock(ddata->in);
> r = dsicm_wake_up(ddata);
> if (!r)
>     r = dsicm_dcs_write_1(ddata, DCS_BRIGHTNESS, 100);
> ddata->in->ops.dsi->bus_unlock(ddata->in);
> mutex_unlock(&ddata->lock);
> -----------------------------------------------------------
> 
> -- Sebastian



-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: 4.13 (and probably all recent) kernels refuse to boot on one Nokia N950, work or another
  2017-10-26  9:57       ` Pavel Machek
@ 2017-10-26 12:01         ` Sebastian Reichel
  2017-10-26 16:28           ` Pavel Machek
  2017-10-27 10:19           ` Pavel Machek
  0 siblings, 2 replies; 24+ messages in thread
From: Sebastian Reichel @ 2017-10-26 12:01 UTC (permalink / raw)
  To: Pavel Machek
  Cc: Tony Lindgren, pali.rohar, kernel list, linux-arm-kernel,
	linux-omap, khilman, aaro.koskinen, ivo.g.dimitrov.75,
	patrikbachan, serge, abcloriens, clayton, martijn, sakari.ailus,
	filip.matijevic.pz

[-- Attachment #1: Type: text/plain, Size: 2524 bytes --]

Hi,

On Thu, Oct 26, 2017 at 11:57:34AM +0200, Pavel Machek wrote:
> On Thu 2017-10-26 11:31:15, Sebastian Reichel wrote:
> > Hi,
> > 
> > On Thu, Oct 26, 2017 at 11:13:26AM +0200, Pavel Machek wrote:
> > > On Wed 2017-10-25 14:28:07, Tony Lindgren wrote:
> > > > * Pavel Machek <pavel@ucw.cz> [171025 13:36]:
> > > > > Hi!
> > > > > 
> > > > > ...hardware should be identical. 3.5.3-nemo kernel seems to work on
> > > > > both. 4.13-rc2 with display and clock patches boots on phone "S", but
> > > > > does not on phone "P"; nothing nothing is received on serial port.
> > > > > 
> > > > > There is some difference in the bootloaders: S's bootloader provides
> > > > > lots of debug info, P's is silent. R&D settings do _not_ have
> > > > > influence on bootloader. We know P's serial works, as 3.5.3 kernel
> > > > > prints "Uncompressing linux...booting" there.
> > > > > 
> > > > > I'll need to return "S" phone and serial cable tommorow. If you have
> > > > > any ideas, let me know.
> > > > 
> > > > If you get nothing out of the uart, chances are the pins are
> > > > not muxed for the uart in nolo and maybe kernel dts is missing the
> > > > pinctrl entries for uart?
> > > > 
> > > > Also try booting with mem=512M@0x80000000 or 256M or 768M. Maybe the
> > > > memory is different size or partially broken?
> > > 
> > > Uhuh. It looks like "P" nokia really wants initrd, otherwise it will
> > > not boot.
> > > 
> > > I got "uncompressing Linux 4.13" on serial console now, debug LEDs
> > > blinking, and if I use a flashlight, I see output on the screen, too.
> > > 
> > > (What do I need to do to get the backlight working?)
> > 
> > Glad you got it working :) For backlight you can add this
> > in drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c:
> > 
> > add the following code at the end of dsicm_probe:
> 
> You did not actually include code to paste into panel-dsi-cm, can you
> try a again?

I added it directly below and you quoted it. I guess you mistook it
for a signature or something :)

-- Sebastian

> > -----------------------------------------------------------
> > mutex_unlock(&ddata->lock);
> > mutex_lock(&ddata->lock);
> > ddata->in->ops.dsi->bus_lock(ddata->in);
> > r = dsicm_wake_up(ddata);
> > if (!r)
> >     r = dsicm_dcs_write_1(ddata, DCS_BRIGHTNESS, 100);
> > ddata->in->ops.dsi->bus_unlock(ddata->in);
> > mutex_unlock(&ddata->lock);
> > -----------------------------------------------------------
> > 
> > -- Sebastian

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: 4.13 (and probably all recent) kernels refuse to boot on one Nokia N950, work or another
  2017-10-26 12:01         ` Sebastian Reichel
@ 2017-10-26 16:28           ` Pavel Machek
  2017-10-27 10:19           ` Pavel Machek
  1 sibling, 0 replies; 24+ messages in thread
From: Pavel Machek @ 2017-10-26 16:28 UTC (permalink / raw)
  To: Sebastian Reichel
  Cc: Tony Lindgren, pali.rohar, kernel list, linux-arm-kernel,
	linux-omap, khilman, aaro.koskinen, ivo.g.dimitrov.75,
	patrikbachan, serge, abcloriens, clayton, martijn, sakari.ailus,
	filip.matijevic.pz

[-- Attachment #1: Type: text/plain, Size: 808 bytes --]

Hi!

> > > Glad you got it working :) For backlight you can add this
> > > in drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c:
> > > 
> > > add the following code at the end of dsicm_probe:
> > 
> > You did not actually include code to paste into panel-dsi-cm, can you
> > try a again?
> 
> I added it directly below and you quoted it. I guess you mistook it
> for a signature or something :)

Ahha. Two semicolons confused me, and I thought you were talking about
two different files. My fault. Let me try...

And.. If I catch the bus, I should be at cca 20:15 at the Hilton. We
can meet at the seats where we were hacking...?

									Pavel
 

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: 4.13 (and probably all recent) kernels refuse to boot on one Nokia N950, work or another
  2017-10-26 12:01         ` Sebastian Reichel
  2017-10-26 16:28           ` Pavel Machek
@ 2017-10-27 10:19           ` Pavel Machek
  2017-10-27 12:58             ` Filip Matijević
  1 sibling, 1 reply; 24+ messages in thread
From: Pavel Machek @ 2017-10-27 10:19 UTC (permalink / raw)
  To: Sebastian Reichel
  Cc: Tony Lindgren, pali.rohar, kernel list, linux-arm-kernel,
	linux-omap, khilman, aaro.koskinen, ivo.g.dimitrov.75,
	patrikbachan, serge, abcloriens, clayton, martijn, sakari.ailus,
	filip.matijevic.pz

[-- Attachment #1: Type: text/plain, Size: 1332 bytes --]

Hi!

So I got it to work; here are my notes from debugging. I put them on
https://elinux.org/N950 , too.

If someone knows how to fix the backlight, it would still be useful.

Best regards,
								Pavel
								

Run your kernels with something like:

# power off your phone
sudo ../maemo/0xffff/src/0xFFFF -l -m kernel:arch/arm/boot/$IMG -b
# plug in the phone.
Your usually get an error here:

Waiting for ASIC ID...
Error: Invalid size of ASIC ID
Error: Reading ASIC ID failed
Error: No device detected
^C

Hit ^c, and restart 0xFFFF. You should get

Sending image...
  100% [#################################################################]
Done

now.

You should get /!\ Warning! screen now. Some bootloader versions way
for ~10 seconds, some don't. Some bootloader versions power off
immediately if you attempt to supply command line arguments.

Watch the screen. It will go dark. If it blinks, it is a good
sign. You may want to check with flashlight, maybe there's almost
invisible text there.

Ignore the notification LED. It seems to blink even without kernel involvement.

Keyboard "debug enabled" LED can be used for debugging.




-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: 4.13 (and probably all recent) kernels refuse to boot on one Nokia N950, work or another
  2017-10-27 10:19           ` Pavel Machek
@ 2017-10-27 12:58             ` Filip Matijević
  2017-10-30 19:43               ` n950: mmc fails to work, omap_hsmmc 480b4000.mmc: RX DMA channel request failed ? was " Pavel Machek
  0 siblings, 1 reply; 24+ messages in thread
From: Filip Matijević @ 2017-10-27 12:58 UTC (permalink / raw)
  To: Pavel Machek
  Cc: Sebastian Reichel, Tony Lindgren, pali.rohar, kernel list,
	linux-arm-kernel, linux-omap, khilman, aaro.koskinen,
	ivo.g.dimitrov.75, patrikbachan, serge, abcloriens, clayton,
	martijn, sakari.ailus


> If someone knows how to fix the backlight, it would still be useful.

In panel-dsi-cm.c it's set to maximum with

dsicm_dcs_write_1(ddata, DCS_BRIGHTNESS, 0xff);

Sebastian suggested the same but used 100 instead of 0xff, which might
be a bit too low. You can also add msleep(1000) after

dsicm_dcs_write_0(ddata, MIPI_DCS_SET_DISPLAY_ON);

to see if brightness gets overwritten, the whole display goes into sleep
mode, is turned off or similar somewhere down the line.

I'm still unable to make N9 panel to cooperate (despite having "the
right" clocks and able to send image to panel with
MIPI_DCS_WRITE_MEMORY_START/MIPI_DCS_READ_MEMORY_CONTINUE) so I hope
you'll have more luck than me!

Filip

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Backlight on Nokia N900 was Re: 4.13 (and probably all recent) kernels refuse to boot on one Nokia N950, work or another
  2017-10-26  9:31     ` Sebastian Reichel
  2017-10-26  9:57       ` Pavel Machek
@ 2017-10-27 20:27       ` Pavel Machek
  2017-10-30  7:51       ` Pavel Machek
  2 siblings, 0 replies; 24+ messages in thread
From: Pavel Machek @ 2017-10-27 20:27 UTC (permalink / raw)
  To: Sebastian Reichel
  Cc: Tony Lindgren, pali.rohar, kernel list, linux-arm-kernel,
	linux-omap, khilman, aaro.koskinen, ivo.g.dimitrov.75,
	patrikbachan, serge, abcloriens, clayton, martijn, sakari.ailus,
	filip.matijevic.pz

[-- Attachment #1: Type: text/plain, Size: 2404 bytes --]

Hi!

> > I got "uncompressing Linux 4.13" on serial console now, debug LEDs
> > blinking, and if I use a flashlight, I see output on the screen, too.
> > 
> > (What do I need to do to get the backlight working?)
> 
> Glad you got it working :) For backlight you can add this
> in drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c:
> 
> add the following code at the end of dsicm_probe:
> 
> -----------------------------------------------------------
> mutex_unlock(&ddata->lock);
> mutex_lock(&ddata->lock);
> ddata->in->ops.dsi->bus_lock(ddata->in);
> r = dsicm_wake_up(ddata);
> if (!r)
>     r = dsicm_dcs_write_1(ddata, DCS_BRIGHTNESS, 100);
> ddata->in->ops.dsi->bus_unlock(ddata->in);
> mutex_unlock(&ddata->lock);
> -----------------------------------------------------------

Ok, I tried that, and did not help. I also tried removing first
mutex_unlock(), since that's unbalanced and strange. Did not work. So
I commented it out with #if 0, and tried more hacks, but no luck :-(.

(I still see the display.. but no backlight so reading it is
.. difficult.)

Best regards,
								Pavel

diff --git a/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c b/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c
index 8f74633..c0bbb42 100644
--- a/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c
+++ b/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c
@@ -668,6 +668,7 @@ static int dsicm_power_on(struct panel_drv_data *ddata)
 		goto err;
 
 	r = dsicm_dcs_write_1(ddata, DCS_BRIGHTNESS, 0xff);
+	mdelay(1000);
 	if (r)
 		goto err;
 
@@ -703,6 +704,8 @@ static int dsicm_power_on(struct panel_drv_data *ddata)
 
 	in->ops.dsi->enable_hs(in, ddata->channel, true);
 
+	r = dsicm_dcs_write_1(ddata, DCS_BRIGHTNESS, 0xff);
+
 	return 0;
 err:
 	dev_err(&ddata->pdev->dev, "error while enabling panel, issuing HW reset\n");
@@ -1396,6 +1399,15 @@ static int dsicm_probe(struct platform_device *pdev)
 		goto err_bl;
 	}
 
+#if 0	
+	mutex_lock(&ddata->lock);
+	ddata->in->ops.dsi->bus_lock(ddata->in);
+	r = dsicm_wake_up(ddata);
+	if (!r)
+		r = dsicm_dcs_write_1(ddata, DCS_BRIGHTNESS, 100);
+	ddata->in->ops.dsi->bus_unlock(ddata->in);
+	mutex_unlock(&ddata->lock);
+#endif
 	return 0;
 
 err_bl:



-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* Re: 4.13 (and probably all recent) kernels refuse to boot on one Nokia N950, work or another
  2017-10-26  9:31     ` Sebastian Reichel
  2017-10-26  9:57       ` Pavel Machek
  2017-10-27 20:27       ` Backlight on Nokia N900 " Pavel Machek
@ 2017-10-30  7:51       ` Pavel Machek
  2 siblings, 0 replies; 24+ messages in thread
From: Pavel Machek @ 2017-10-30  7:51 UTC (permalink / raw)
  To: Sebastian Reichel
  Cc: Tony Lindgren, pali.rohar, kernel list, linux-arm-kernel,
	linux-omap, khilman, aaro.koskinen, ivo.g.dimitrov.75,
	patrikbachan, serge, abcloriens, clayton, martijn, sakari.ailus,
	filip.matijevic.pz

[-- Attachment #1: Type: text/plain, Size: 1601 bytes --]

Hi!

> > I got "uncompressing Linux 4.13" on serial console now, debug LEDs
> > blinking, and if I use a flashlight, I see output on the screen, too.
> > 
> > (What do I need to do to get the backlight working?)
> 
> Glad you got it working :) For backlight you can add this
> in drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c:
> 
> add the following code at the end of dsicm_probe:
> 
> -----------------------------------------------------------
> mutex_unlock(&ddata->lock);
> mutex_lock(&ddata->lock);
> ddata->in->ops.dsi->bus_lock(ddata->in);
> r = dsicm_wake_up(ddata);
> if (!r)
>     r = dsicm_dcs_write_1(ddata, DCS_BRIGHTNESS, 100);
> ddata->in->ops.dsi->bus_unlock(ddata->in);
> mutex_unlock(&ddata->lock);
> -----------------------------------------------------------

That one did not work; but after some help from Filip, this did:

Best regards,
									Pavel

diff --git a/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c b/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c
index b5ea8e5..2cb74cc 100644
--- a/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c
+++ b/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c
@@ -385,7 +385,7 @@ static int dsicm_bl_update_status(struct backlight_device *dev)
 
 		r = dsicm_wake_up(ddata);
 		if (!r)
-			r = dsicm_dcs_write_1(ddata, DCS_BRIGHTNESS, level);
+			r = dsicm_dcs_write_1(ddata, DCS_BRIGHTNESS, 0xff /* level */);
 
 		in->ops.dsi->bus_unlock(in);
 	}


-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* n950: mmc fails to work, omap_hsmmc 480b4000.mmc: RX DMA channel request failed ? was Re: 4.13 (and probably all recent) kernels refuse to boot on one Nokia N950, work or another
  2017-10-27 12:58             ` Filip Matijević
@ 2017-10-30 19:43               ` Pavel Machek
  2017-10-30 20:02                 ` Pavel Machek
  0 siblings, 1 reply; 24+ messages in thread
From: Pavel Machek @ 2017-10-30 19:43 UTC (permalink / raw)
  To: Filip Matijević
  Cc: Sebastian Reichel, Tony Lindgren, pali.rohar, kernel list,
	linux-arm-kernel, linux-omap, khilman, aaro.koskinen,
	ivo.g.dimitrov.75, patrikbachan, serge, abcloriens, clayton,
	martijn, sakari.ailus

[-- Attachment #1: Type: text/plain, Size: 1242 bytes --]

Hi!

I was able to setup nfsroot, and boot postmarketos (with root
read/only, but that's good enough for debugging).

Then I was (finally!) able to run dmesg, and that tells me:

[    0.816040] mousedev: PS/2 mouse device common for all mice
[    0.817657] input: TWL4030 Keypad as
/devices/platform/68000000.ocp/48070000.i2c/i2c-0/0-0048/48070000.i2c:twl@48:keypad/input/input0
[    0.820800] i2c /dev entries driver
[    0.830261] omap_wdt: OMAP Watchdog Timer Rev 0x31: initial timeout
60 sec
[    0.836212] omap_hsmmc 480b4000.mmc: RX DMA channel request failed
[    0.840026] ledtrig-cpu: registered to indicate activity on CPUs
[    0.840789] omap-aes 480c5000.aes: OMAP AES hw accel rev: 2.6
[    0.840942] omap-aes 480c5000.aes: Unable to request in DMA channel
[    0.841644] omap-aes 480c5000.aes: will run requests pump with
realtime priority

Kernel 4.13-rc2.

I'm now trying:

+++ b/.config
-CONFIG_MMC_OMAP_HS=y
+# CONFIG_MMC_OMAP_HS is not set

With that, error is gone, but so is MMC driver, so... not good.

Any ideas?

Best regards,
									Pavel   
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: n950: mmc fails to work, omap_hsmmc 480b4000.mmc: RX DMA channel request failed ? was Re: 4.13 (and probably all recent) kernels refuse to boot on one Nokia N950, work or another
  2017-10-30 19:43               ` n950: mmc fails to work, omap_hsmmc 480b4000.mmc: RX DMA channel request failed ? was " Pavel Machek
@ 2017-10-30 20:02                 ` Pavel Machek
  0 siblings, 0 replies; 24+ messages in thread
From: Pavel Machek @ 2017-10-30 20:02 UTC (permalink / raw)
  To: Filip Matijević
  Cc: Sebastian Reichel, Tony Lindgren, pali.rohar, kernel list,
	linux-arm-kernel, linux-omap, khilman, aaro.koskinen,
	ivo.g.dimitrov.75, patrikbachan, serge, abcloriens, clayton,
	martijn, sakari.ailus

[-- Attachment #1: Type: text/plain, Size: 1079 bytes --]

Hi!

> Then I was (finally!) able to run dmesg, and that tells me:
> 
> [    0.816040] mousedev: PS/2 mouse device common for all mice
> [    0.817657] input: TWL4030 Keypad as
> /devices/platform/68000000.ocp/48070000.i2c/i2c-0/0-0048/48070000.i2c:twl@48:keypad/input/input0
> [    0.820800] i2c /dev entries driver
> [    0.830261] omap_wdt: OMAP Watchdog Timer Rev 0x31: initial timeout
> 60 sec
> [    0.836212] omap_hsmmc 480b4000.mmc: RX DMA channel request failed
> [    0.840026] ledtrig-cpu: registered to indicate activity on CPUs
> [    0.840789] omap-aes 480c5000.aes: OMAP AES hw accel rev: 2.6
> [    0.840942] omap-aes 480c5000.aes: Unable to request in DMA channel
> [    0.841644] omap-aes 480c5000.aes: will run requests pump with
> realtime priority
> 
> Kernel 4.13-rc2.

Aha. DMADEVICES=y, then DMA_OMAP can be selected. Then mmc
works. Debugging is much easier with dmesg :-).

									Pavel

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2017-10-30 20:03 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-25 20:34 4.13 (and probably all recent) kernels refuse to boot on one Nokia N950, work or another Pavel Machek
2017-10-25 21:28 ` Tony Lindgren
2017-10-25 21:34   ` Aaro Koskinen
2017-10-26  7:16   ` Pavel Machek
2017-10-26  7:34     ` Filip Matijević
2017-10-26  8:49   ` Pavel Machek
2017-10-26  9:13   ` Pavel Machek
2017-10-26  9:31     ` Sebastian Reichel
2017-10-26  9:57       ` Pavel Machek
2017-10-26 12:01         ` Sebastian Reichel
2017-10-26 16:28           ` Pavel Machek
2017-10-27 10:19           ` Pavel Machek
2017-10-27 12:58             ` Filip Matijević
2017-10-30 19:43               ` n950: mmc fails to work, omap_hsmmc 480b4000.mmc: RX DMA channel request failed ? was " Pavel Machek
2017-10-30 20:02                 ` Pavel Machek
2017-10-27 20:27       ` Backlight on Nokia N900 " Pavel Machek
2017-10-30  7:51       ` Pavel Machek
2017-10-26  9:53     ` Pavel Machek
2017-10-26  6:25 ` Filip Matijević
2017-10-26  7:08   ` Pavel Machek
2017-10-26  7:21     ` Pali Rohár
2017-10-26  7:27       ` Pavel Machek
2017-10-26  7:32         ` Pali Rohár
2017-10-26  8:24           ` Pavel Machek

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).