All of lore.kernel.org
 help / color / mirror / Atom feed
* linux-congatec (fido) silent after Starting kernel ...
@ 2015-05-19 15:07 Leon Woestenberg
  2015-05-19 15:21 ` Nikolay Dimitrov
  2015-05-19 19:44 ` Peter Bergin
  0 siblings, 2 replies; 16+ messages in thread
From: Leon Woestenberg @ 2015-05-19 15:07 UTC (permalink / raw)
  To: meta-freescale

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

Hello all,

I am trying the fido branch linux-congatec kernel for MACHINE=cgtqmx6.

More specifically, this DTB and kernel

uImage--3.10.53-r0-cgtqmx6-20150519142407.bin
uImage--3.10.53-r0-imx6q-qmx6-20150519142407.dtb

for the P/N 0161103 (Quad-Core)

Question on the side: I noticed the Congatec pre-flashed setup does not
seem to load a FDT DTB from eMMC? Shouldn't these platforms always load a
FDT DTB?

I am sure the error is on my side, what did I miss?

Thanks, Leon.

bootcmd_net=tftpboot ${fdtaddr} ${fdtfile}; tftpboot ${loadaddr}
${bootfile}; run bootargs_base bootargs_nfs;bootm ${loadaddr} - ${fdtaddr}


conga-QMX6 U-Boot > run bootcmd_net
FEC: Link is Up 796d
Using FEC0 device
TFTP from server 192.168.1.9; our IP address is 192.168.1.103
Filename 'cgtqmx6/uImage.dtb'.
Load address: 0x10780000
Loading: ####
done
Bytes transferred = 48083 (bbd3 hex)
FEC: Link is Up 796d
Using FEC0 device
TFTP from server 192.168.1.9; our IP address is 192.168.1.103
Filename 'cgtqmx6/uImage'.
Load address: 0x10800000
Loading: #################################################################
     #################################################################
     #################################################################
     #################################################################
     #################################################################
     ##############################################
done
Bytes transferred = 5432656 (52e550 hex)
## Booting kernel from Legacy Image at 10800000 ...
   Image Name:   Linux-3.10.53-1.1.1_qmx6+g9f56bf
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    5432592 Bytes =  5.2 MB
   Load Address: 10008000
   Entry Point:  10008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...


-- 
Leon

[-- Attachment #2: Type: text/html, Size: 2289 bytes --]

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

* Re: linux-congatec (fido) silent after Starting kernel ...
  2015-05-19 15:07 linux-congatec (fido) silent after Starting kernel Leon Woestenberg
@ 2015-05-19 15:21 ` Nikolay Dimitrov
  2015-05-19 19:44 ` Peter Bergin
  1 sibling, 0 replies; 16+ messages in thread
From: Nikolay Dimitrov @ 2015-05-19 15:21 UTC (permalink / raw)
  To: Leon Woestenberg, meta-freescale

Hi Leon,

On 05/19/2015 06:07 PM, Leon Woestenberg wrote:
> Hello all,
>
> I am trying the fido branch linux-congatec kernel for MACHINE=cgtqmx6.
>
> More specifically, this DTB and kernel
>
> uImage--3.10.53-r0-cgtqmx6-20150519142407.bin
> uImage--3.10.53-r0-imx6q-qmx6-20150519142407.dtb
>
> for the P/N 0161103 (Quad-Core)
>
> Question on the side: I noticed the Congatec pre-flashed setup does not
> seem to load a FDT DTB from eMMC? Shouldn't these platforms always load
> a FDT DTB?
>
> I am sure the error is on my side, what did I miss?
>
> Thanks, Leon.
>
> bootcmd_net=tftpboot ${fdtaddr} ${fdtfile}; tftpboot ${loadaddr}
> ${bootfile}; run bootargs_base bootargs_nfs;bootm ${loadaddr} - ${fdtaddr}
>
>
> conga-QMX6 U-Boot > run bootcmd_net
> FEC: Link is Up 796d
> Using FEC0 device
> TFTP from server 192.168.1.9; our IP address is 192.168.1.103
> Filename 'cgtqmx6/uImage.dtb'.
> Load address: 0x10780000
> Loading: ####
> done
> Bytes transferred = 48083 (bbd3 hex)
> FEC: Link is Up 796d
> Using FEC0 device
> TFTP from server 192.168.1.9; our IP address is 192.168.1.103
> Filename 'cgtqmx6/uImage'.
> Load address: 0x10800000
> Loading: #################################################################
>       #################################################################
>       #################################################################
>       #################################################################
>       #################################################################
>       ##############################################
> done
> Bytes transferred = 5432656 (52e550 hex)
> ## Booting kernel from Legacy Image at 10800000 ...
>     Image Name:   Linux-3.10.53-1.1.1_qmx6+g9f56bf
>     Image Type:   ARM Linux Kernel Image (uncompressed)
>     Data Size:    5432592 Bytes =  5.2 MB
>     Load Address: 10008000
>     Entry Point:  10008000
>     Verifying Checksum ... OK
>     Loading Kernel Image ... OK
> OK
>
> Starting kernel ...

Kernel 3.10.53 _requires_ a DT, otherwise you'll get no console. Please
look at $fdtfile u-boot env-var and provide the required DTB file on
your TFTP server, and then verify in the bootlogs that it was properly
loaded in memory.

Regards,
Nikolay


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

* Re: linux-congatec (fido) silent after Starting kernel ...
  2015-05-19 15:07 linux-congatec (fido) silent after Starting kernel Leon Woestenberg
  2015-05-19 15:21 ` Nikolay Dimitrov
@ 2015-05-19 19:44 ` Peter Bergin
  2015-05-20 14:27   ` Leon Woestenberg
  1 sibling, 1 reply; 16+ messages in thread
From: Peter Bergin @ 2015-05-19 19:44 UTC (permalink / raw)
  To: Leon Woestenberg, meta-freescale

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

Hi Leon,

On 05/19/2015 05:09 PM, Leon Woestenberg wrote:
Hello all,

I am trying the fido branch linux-congatec kernel for MACHINE=cgtqmx6.

More specifically, this DTB and kernel

uImage--3.10.53-r0-cgtqmx6-20150519142407.bin
uImage--3.10.53-r0-imx6q-qmx6-20150519142407.dtb

for the P/N 0161103 (Quad-Core)

Question on the side: I noticed the Congatec pre-flashed setup does not seem to load a FDT DTB from eMMC? Shouldn't these platforms always load a FDT DTB?

I am sure the error is on my side, what did I miss?

Thanks, Leon.

bootcmd_net=tftpboot ${fdtaddr} ${fdtfile}; tftpboot ${loadaddr} ${bootfile}; run bootargs_base bootargs_nfs;bootm ${loadaddr} - ${fdtaddr}


conga-QMX6 U-Boot > run bootcmd_net
FEC: Link is Up 796d
Using FEC0 device
TFTP from server 192.168.1.9; our IP address is 192.168.1.103
Filename 'cgtqmx6/uImage.dtb'.
Load address: 0x10780000
Loading: ####
done
Bytes transferred = 48083 (bbd3 hex)
FEC: Link is Up 796d
Using FEC0 device
TFTP from server 192.168.1.9; our IP address is 192.168.1.103
Filename 'cgtqmx6/uImage'.
Load address: 0x10800000
Loading: #################################################################
     #################################################################
     #################################################################
     #################################################################
     #################################################################
     ##############################################
done
Bytes transferred = 5432656 (52e550 hex)
## Booting kernel from Legacy Image at 10800000 ...
   Image Name:   Linux-3.10.53-1.1.1_qmx6+g9f56bf
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    5432592 Bytes =  5.2 MB
   Load Address: 10008000
   Entry Point:  10008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...


--
Leon


I have recently built and booted an image build with fido on Qmx6 with success. One difference is that I did not netboot but used an SD card attached to the Q7 module.

Your question regarding load of DTB from eMMC, if I remember correct the default script for u-boot-congatec (version 2013.04) will search for kernel and device-tree in mmc device 0,1 and 2 which are 'SD card on module', 'SD card on carrier board' and eMMC. It will use the first found. Could you check the version of your u-boot on the target? Probably you have 2009.x or something that doesn't have support for DTB. In that case you must upgrade your u-boot to 2013.xx in order to boot kernel with device-tree.

Regards,
/Peter

[-- Attachment #2: Type: text/html, Size: 3728 bytes --]

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

* Re: linux-congatec (fido) silent after Starting kernel ...
  2015-05-19 19:44 ` Peter Bergin
@ 2015-05-20 14:27   ` Leon Woestenberg
  2015-05-20 14:43     ` Peter Bergin
  0 siblings, 1 reply; 16+ messages in thread
From: Leon Woestenberg @ 2015-05-20 14:27 UTC (permalink / raw)
  To: Peter Bergin; +Cc: meta-freescale

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

Hi Peter, Nikolay.

On Tue, May 19, 2015 at 9:44 PM, Peter Bergin <peter.bergin@tritech.se>
wrote:

>  Hi Leon,
>
>
Could you check the version of your u-boot on the target? Probably you have
> 2009.x or something that doesn't have support for DTB. In that case you
> must upgrade your u-boot to 2013.xx in order to boot kernel with
> device-tree.
>
> Regards,
> /Peter
>

Peter, indeed: U-Boot 2009.08-00671-g5e573f0 QMX6Rx07 pn016103 (Jan 15 2014
- 14:19:05)

Wow. It would have taken me ages to consider the boot loader didn't support
device tree yet.

Thanks Nikolay for confirming a DTB is needed. In fact my boot log in my
email did copy the DTB, but it's hidden at the top just before loading the
kernel.

I have put the .sdcard image on a uSD card for the module SD slot (not the
carrier board SD slot).
I think the Congatec always loads from SPI NOR first (where the old u-boot
lives).

Peter, what did you do to boot the u-boot from uSD card?

Regards,

Leon.



Thanks,
-- 
Leon

[-- Attachment #2: Type: text/html, Size: 2234 bytes --]

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

* Re: linux-congatec (fido) silent after Starting kernel ...
  2015-05-20 14:27   ` Leon Woestenberg
@ 2015-05-20 14:43     ` Peter Bergin
  2015-05-20 15:04       ` Nikolay Dimitrov
  0 siblings, 1 reply; 16+ messages in thread
From: Peter Bergin @ 2015-05-20 14:43 UTC (permalink / raw)
  To: Leon Woestenberg; +Cc: meta-freescale

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

Hi Leon,

On 05/20/2015 04:28 PM, Leon Woestenberg wrote:
Hi Peter, Nikolay.

On Tue, May 19, 2015 at 9:44 PM, Peter Bergin <peter.bergin@tritech.se<mailto:peter.bergin@tritech.se>> wrote:
Hi Leon,

Could you check the version of your u-boot on the target? Probably you have 2009.x or something that doesn't have support for DTB. In that case you must upgrade your u-boot to 2013.xx in order to boot kernel with device-tree.

Regards,
/Peter

Peter, indeed: U-Boot 2009.08-00671-g5e573f0 QMX6Rx07 pn016103 (Jan 15 2014 - 14:19:05)

Wow. It would have taken me ages to consider the boot loader didn't support device tree yet.

Thanks Nikolay for confirming a DTB is needed. In fact my boot log in my email did copy the DTB, but it's hidden at the top just before loading the kernel.

I have put the .sdcard image on a uSD card for the module SD slot (not the carrier board SD slot).
I think the Congatec always loads from SPI NOR first (where the old u-boot lives).

Peter, what did you do to boot the u-boot from uSD card?

Regards,

Leon.



Thanks,
--
Leon


correct that i.Mx6 boot from SPI NOR flash where u-boot is located.

On my board I am using u-boot-congatec 2013.04. I prepared a uSD card for the module slot with one partition including both kernel and rootfs. Make sure that your image have kernel and dtb files installed or you have to add them manually.

If I remember correct Congatec u-boot parameters assumes that you have one partition with kernel and rootfs. I don't know if the .sdcard image is prepared that way, it could be two partitions one for kernel and one for rootfs, like other reference targets like Nitrogen6. Either you have to change u-boot environment or prepare a sd card from the tar-file instead.

Another thing to verify in the u-boot console is that the u-boot parameters fdt_file and uImage is pointing to the correct location for those files.

Regards,
/Peter



[-- Attachment #2: Type: text/html, Size: 3767 bytes --]

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

* Re: linux-congatec (fido) silent after Starting kernel ...
  2015-05-20 14:43     ` Peter Bergin
@ 2015-05-20 15:04       ` Nikolay Dimitrov
  2015-05-20 20:27         ` Leon Woestenberg
  0 siblings, 1 reply; 16+ messages in thread
From: Nikolay Dimitrov @ 2015-05-20 15:04 UTC (permalink / raw)
  To: Leon Woestenberg; +Cc: meta-freescale

Hi Leon,

On 05/20/2015 05:43 PM, Peter Bergin wrote:
> Hi Leon,
>
> On 05/20/2015 04:28 PM, Leon Woestenberg wrote:
>> Hi Peter, Nikolay.
>>
>> On Tue, May 19, 2015 at 9:44 PM, Peter Bergin
>> <peter.bergin@tritech.se <mailto:peter.bergin@tritech.se>> wrote:
>>
>> Hi Leon,
>>
>> Could you check the version of your u-boot on the target? Probably
>>  you have 2009.x or something that doesn't have support for DTB. In
>>  that case you must upgrade your u-boot to 2013.xx in order to boot
>>  kernel with device-tree.
>>
>> Regards, /Peter
>>
>>
>> Peter, indeed: U-Boot 2009.08-00671-g5e573f0 QMX6Rx07 pn016103
>> (Jan 15 2014 - 14:19:05)
>>
>> Wow. It would have taken me ages to consider the boot loader
>> didn't support device tree yet.
>>
>> Thanks Nikolay for confirming a DTB is needed. In fact my boot log
>> in my email did copy the DTB, but it's hidden at the top just
>> before loading the kernel.
>>
>> I have put the .sdcard image on a uSD card for the module SD slot
>> (not the carrier board SD slot). I think the Congatec always loads
>> from SPI NOR first (where the old u-boot lives).
>>
>> Peter, what did you do to boot the u-boot from uSD card?
>>
>> Regards,
>>
>> Leon.
>>
>>
>>
>> Thanks, -- Leon
>
>
> correct that i.Mx6 boot from SPI NOR flash where u-boot is located.
>
> On my board I am using u-boot-congatec 2013.04. I prepared a uSD
> card for the module slot with one partition including both kernel
> and rootfs. Make sure that your image have kernel and dtb files
> installed or you have to add them manually.
>
> If I remember correct Congatec u-boot parameters assumes that you
> have one partition with kernel and rootfs. I don't know if the
> .sdcard image is prepared that way, it could be two partitions one
> for kernel and one for rootfs, like other reference targets like
> Nitrogen6. Either you have to change u-boot environment or prepare a
> sd card from the tar-file instead.
>
> Another thing to verify in the u-boot console is that the u-boot
> parameters fdt_file and uImage is pointing to the correct location
> for those files.

If the board boots from SPI NOR, this means that the chip OTP FUSES are
already programmed to do so. Your options to change the boot loader are:

1. Check whether your u-boot version has the "bmode" command and try to
use it to boot from sd-card (not sure how well this worked on earlier
u-boot versions though);

2. You can upload the newer u-boot in board's RAM via network,
usb-storage, or even serial console, and then you can erase the SPI
flash and program the newer u-boot.

3. If you have boot-mode micro switches on your board, you can change
boot mode to USB OTG, build newer u-boot and force the board to boot
from USB, by using this Linux tool
(https://github.com/boundarydevices/imx_usb_loader), or Freescale's
Windows MFGtool.

If #3 is not available and this is a development board, you should
change your development board... :D.

Regards,
Nikolay

PS: When writing u-boot.imx on a new sd-card or on-board SPI NOR, don't
forget to use 1k offset from the memory start, otherwise the imx6 won't
boot.


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

* Re: linux-congatec (fido) silent after Starting kernel ...
  2015-05-20 15:04       ` Nikolay Dimitrov
@ 2015-05-20 20:27         ` Leon Woestenberg
  2015-05-20 20:32           ` Otavio Salvador
  0 siblings, 1 reply; 16+ messages in thread
From: Leon Woestenberg @ 2015-05-20 20:27 UTC (permalink / raw)
  To: Nikolay Dimitrov; +Cc: meta-freescale

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

Hi all,

thanks for the options.

Indeed Congatec seems to burn the fuses for SPI-NOR, from their
documentation.

I have seen mention in other threads of programming the System Reset
Controller (SRC) to boot from uSD card upon a (warm?) reset.

mw.l 0x20D8040 0x3840
mw.l 0x20D8044 0x10000000
reset

However, these bits are not documented on the given registers; all bits are
reserved in "i.MX 6Dual/6Quad Applications Processor Reference Manual, Rev.
2, 06/2014".
So what does the above do?

<snippet>
60.7.15 SRC General Purpose Register 9 (SRC_GPR9)
Reserved for Internal Use.
Address: 20D_8000h base + 40h offset = 20D_8040h
</snippet>

Looking at the value 0x3840, and seeing which register makes sense, I
suspect he 0x20D.8004 register is targeted, which holds the
BOOT_CFG1...BOOT_CFG4 fields.

Now, for the 0x1000.0000 value, I cannot find a sane register in the SCR.

Can anybody provide more insight here?

Regards,

Leon.


On Wed, May 20, 2015 at 5:04 PM, Nikolay Dimitrov <picmaster@mail.bg> wrote:

> Hi Leon,
>
> On 05/20/2015 05:43 PM, Peter Bergin wrote:
>
>> Hi Leon,
>>
>> On 05/20/2015 04:28 PM, Leon Woestenberg wrote:
>>
>>> Hi Peter, Nikolay.
>>>
>>> On Tue, May 19, 2015 at 9:44 PM, Peter Bergin
>>> <peter.bergin@tritech.se <mailto:peter.bergin@tritech.se>> wrote:
>>>
>>> Hi Leon,
>>>
>>> Could you check the version of your u-boot on the target? Probably
>>>  you have 2009.x or something that doesn't have support for DTB. In
>>>  that case you must upgrade your u-boot to 2013.xx in order to boot
>>>  kernel with device-tree.
>>>
>>> Regards, /Peter
>>>
>>>
>>> Peter, indeed: U-Boot 2009.08-00671-g5e573f0 QMX6Rx07 pn016103
>>> (Jan 15 2014 - 14:19:05)
>>>
>>> Wow. It would have taken me ages to consider the boot loader
>>> didn't support device tree yet.
>>>
>>> Thanks Nikolay for confirming a DTB is needed. In fact my boot log
>>> in my email did copy the DTB, but it's hidden at the top just
>>> before loading the kernel.
>>>
>>> I have put the .sdcard image on a uSD card for the module SD slot
>>> (not the carrier board SD slot). I think the Congatec always loads
>>> from SPI NOR first (where the old u-boot lives).
>>>
>>> Peter, what did you do to boot the u-boot from uSD card?
>>>
>>> Regards,
>>>
>>> Leon.
>>>
>>>
>>>
>>> Thanks, -- Leon
>>>
>>
>>
>> correct that i.Mx6 boot from SPI NOR flash where u-boot is located.
>>
>> On my board I am using u-boot-congatec 2013.04. I prepared a uSD
>> card for the module slot with one partition including both kernel
>> and rootfs. Make sure that your image have kernel and dtb files
>> installed or you have to add them manually.
>>
>> If I remember correct Congatec u-boot parameters assumes that you
>> have one partition with kernel and rootfs. I don't know if the
>> .sdcard image is prepared that way, it could be two partitions one
>> for kernel and one for rootfs, like other reference targets like
>> Nitrogen6. Either you have to change u-boot environment or prepare a
>> sd card from the tar-file instead.
>>
>> Another thing to verify in the u-boot console is that the u-boot
>> parameters fdt_file and uImage is pointing to the correct location
>> for those files.
>>
>
> If the board boots from SPI NOR, this means that the chip OTP FUSES are
> already programmed to do so. Your options to change the boot loader are:
>
> 1. Check whether your u-boot version has the "bmode" command and try to
> use it to boot from sd-card (not sure how well this worked on earlier
> u-boot versions though);
>
> 2. You can upload the newer u-boot in board's RAM via network,
> usb-storage, or even serial console, and then you can erase the SPI
> flash and program the newer u-boot.
>
> 3. If you have boot-mode micro switches on your board, you can change
> boot mode to USB OTG, build newer u-boot and force the board to boot
> from USB, by using this Linux tool
> (https://github.com/boundarydevices/imx_usb_loader), or Freescale's
> Windows MFGtool.
>
> If #3 is not available and this is a development board, you should
> change your development board... :D.
>
> Regards,
> Nikolay
>
> PS: When writing u-boot.imx on a new sd-card or on-board SPI NOR, don't
> forget to use 1k offset from the memory start, otherwise the imx6 won't
> boot.
>



-- 
Leon

[-- Attachment #2: Type: text/html, Size: 5791 bytes --]

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

* Re: linux-congatec (fido) silent after Starting kernel ...
  2015-05-20 20:27         ` Leon Woestenberg
@ 2015-05-20 20:32           ` Otavio Salvador
  2015-05-20 20:43             ` Leon Woestenberg
  0 siblings, 1 reply; 16+ messages in thread
From: Otavio Salvador @ 2015-05-20 20:32 UTC (permalink / raw)
  To: Leon Woestenberg; +Cc: meta-freescale

On Wed, May 20, 2015 at 5:27 PM, Leon Woestenberg
<leon.woestenberg@gmail.com> wrote:
...
> Can anybody provide more insight here?
...

yes. This is mostly what bmode in new U-Boot versions does. The
0x10000000 can be seen at:

https://github.com/Freescale/u-boot-fslc/blob/patches-2015.04/arch/arm/cpu/armv7/mx6/soc.c#L478

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750


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

* Re: linux-congatec (fido) silent after Starting kernel ...
  2015-05-20 20:32           ` Otavio Salvador
@ 2015-05-20 20:43             ` Leon Woestenberg
  2015-05-20 20:47               ` Leon Woestenberg
  0 siblings, 1 reply; 16+ messages in thread
From: Leon Woestenberg @ 2015-05-20 20:43 UTC (permalink / raw)
  To: Otavio Salvador; +Cc: meta-freescale

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

Hi Otavio,


On Wed, May 20, 2015 at 10:32 PM, Otavio Salvador <otavio@ossystems.com.br>
wrote:

> On Wed, May 20, 2015 at 5:27 PM, Leon Woestenberg
> <leon.woestenberg@gmail.com> wrote:
> ...
> > Can anybody provide more insight here?
> ...
>
> yes. This is mostly what bmode in new U-Boot versions does. The
> 0x10000000 can be seen at:
>
>
> https://github.com/Freescale/u-boot-fslc/blob/patches-2015.04/arch/arm/cpu/armv7/mx6/soc.c#L478
>

Thanks. So these registers are interpreted by the SoC itself and not by
u-boot on subsequent warm-reset?

I found some explanation of these "secret" registers here:

https://patchwork.ozlabs.org/patch/404723/


Regards,
-- 
Leon

[-- Attachment #2: Type: text/html, Size: 1449 bytes --]

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

* Re: linux-congatec (fido) silent after Starting kernel ...
  2015-05-20 20:43             ` Leon Woestenberg
@ 2015-05-20 20:47               ` Leon Woestenberg
  2015-05-21 14:20                 ` Leon Woestenberg
  0 siblings, 1 reply; 16+ messages in thread
From: Leon Woestenberg @ 2015-05-20 20:47 UTC (permalink / raw)
  To: Otavio Salvador; +Cc: meta-freescale

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

Reading that patch comment more clearly, I now understand that both u-boot
and the SoC do in fact interpret the registers, because the SoC ignores it
for SPL type boot.

With that, I will try to boot the .sdcard image generated by the
fsl-community-bsp-platform tomorrow.

Thanks,

Leon.

On Wed, May 20, 2015 at 10:43 PM, Leon Woestenberg <
leon.woestenberg@gmail.com> wrote:

> Hi Otavio,
>
>
> On Wed, May 20, 2015 at 10:32 PM, Otavio Salvador <otavio@ossystems.com.br
> > wrote:
>
>> On Wed, May 20, 2015 at 5:27 PM, Leon Woestenberg
>> <leon.woestenberg@gmail.com> wrote:
>> ...
>> > Can anybody provide more insight here?
>> ...
>>
>> yes. This is mostly what bmode in new U-Boot versions does. The
>> 0x10000000 can be seen at:
>>
>>
>> https://github.com/Freescale/u-boot-fslc/blob/patches-2015.04/arch/arm/cpu/armv7/mx6/soc.c#L478
>>
>
> Thanks. So these registers are interpreted by the SoC itself and not by
> u-boot on subsequent warm-reset?
>
> I found some explanation of these "secret" registers here:
>
> https://patchwork.ozlabs.org/patch/404723/
>
>
> Regards,
> --
> Leon
>



-- 
Leon

[-- Attachment #2: Type: text/html, Size: 2387 bytes --]

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

* Re: linux-congatec (fido) silent after Starting kernel ...
  2015-05-20 20:47               ` Leon Woestenberg
@ 2015-05-21 14:20                 ` Leon Woestenberg
  2015-05-21 14:37                   ` Nikolay Dimitrov
  0 siblings, 1 reply; 16+ messages in thread
From: Leon Woestenberg @ 2015-05-21 14:20 UTC (permalink / raw)
  To: Otavio Salvador; +Cc: meta-freescale

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

I could start the built u-boot from (u)SD card using the not-really-public
registers.

# setting for BOOT_CFG1, this select USDHC2 (Congatec on-module uSD)
mw.l 0x020d8040 0x2850
mw.l 0x020d8044 0x10000000
reset

# setting for BOOT_CFG1, this select USDHC4 (Congatec carrier board SD slot)
mw.l 0x020d8040 0x3850
mw.l 0x020d8044 0x10000000
reset

As 'bmode' was not available on my pre-installed u-boot, I used this
convenience command to boot u-boot from the SD card:

setenv sd 'mw.l 0x020d8040 0x3850; mw.l 0x020d8044 0x10000000; reset'


However, although the newer u-boot 2013.04 supports the DTB now, I'm still
getting stuck after the kernel starts.
Any further ideas?

Thanks,

Leon.


conga-QMX6 U-Boot > run sd
resetting ...


U-Boot 2013.04 QMX6Rx20 (May 19 2015 - 13:34:17)

CPU:   Freescale i.MX6Q rev1.2 at 792 MHz
CPU:   Temperature 32 C, calibration data: 0x56b4d469
Reset cause: POR
Board: conga-QMX6
I2C:   ready
DRAM:  1 GiB
MMC:   FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 2
SF: Detected SST25VF032B with page size 4 KiB, total 4 MiB
No panel detected: default to Hannstar-XGA
Display: Hannstar-XGA (1024x768)
In:    serial
Out:   serial
Err:   serial
PFUZE100 Rev. [10/21] detected
Net:   configure Atheros AR8035 Ethernet Phy at address 6
FEC
Warning: FEC using MAC address from net device

Normal Boot
Hit any key to stop autoboot:  0
U-Boot > run bootcmd_net
Using FEC device
TFTP from server 192.168.1.9; our IP address is 192.168.1.103
Filename 'cgtqmx6/uImage.dtb'.
Load address: 0x10780000
Loading: ####
     6.6 MiB/s
done
Bytes transferred = 48083 (bbd3 hex)
Using FEC device
TFTP from server 192.168.1.9; our IP address is 192.168.1.103
Filename 'cgtqmx6/uImage'.
Load address: 0x10800000
Loading: #################################################################
     #################################################################
     #################################################################
     #################################################################
     #################################################################
     ##############################################
     6.9 MiB/s
done
Bytes transferred = 5432656 (52e550 hex)
## Booting kernel from Legacy Image at 10800000 ...
   Image Name:   Linux-3.10.53-1.1.1_qmx6+g9f56bf
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    5432592 Bytes = 5.2 MiB
   Load Address: 10008000
   Entry Point:  10008000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 10780000
   Booting using the fdt blob at 0x10780000
   Loading Kernel Image ... OK
OK
switch to ldo_bypass mode!
   Loading Device Tree to 4f543000, end 4f551bd2 ... OK

Starting kernel ...









On Wed, May 20, 2015 at 10:47 PM, Leon Woestenberg <
leon.woestenberg@gmail.com> wrote:

> Reading that patch comment more clearly, I now understand that both u-boot
> and the SoC do in fact interpret the registers, because the SoC ignores it
> for SPL type boot.
>
> With that, I will try to boot the .sdcard image generated by the
> fsl-community-bsp-platform tomorrow.
>
> Thanks,
>
> Leon.
>
> On Wed, May 20, 2015 at 10:43 PM, Leon Woestenberg <
> leon.woestenberg@gmail.com> wrote:
>
>> Hi Otavio,
>>
>>
>> On Wed, May 20, 2015 at 10:32 PM, Otavio Salvador <
>> otavio@ossystems.com.br> wrote:
>>
>>> On Wed, May 20, 2015 at 5:27 PM, Leon Woestenberg
>>> <leon.woestenberg@gmail.com> wrote:
>>> ...
>>> > Can anybody provide more insight here?
>>> ...
>>>
>>> yes. This is mostly what bmode in new U-Boot versions does. The
>>> 0x10000000 can be seen at:
>>>
>>>
>>> https://github.com/Freescale/u-boot-fslc/blob/patches-2015.04/arch/arm/cpu/armv7/mx6/soc.c#L478
>>>
>>
>> Thanks. So these registers are interpreted by the SoC itself and not by
>> u-boot on subsequent warm-reset?
>>
>> I found some explanation of these "secret" registers here:
>>
>> https://patchwork.ozlabs.org/patch/404723/
>>
>>
>> Regards,
>> --
>> Leon
>>
>
>
>
> --
> Leon
>



-- 
Leon

[-- Attachment #2: Type: text/html, Size: 6138 bytes --]

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

* Re: linux-congatec (fido) silent after Starting kernel ...
  2015-05-21 14:20                 ` Leon Woestenberg
@ 2015-05-21 14:37                   ` Nikolay Dimitrov
  0 siblings, 0 replies; 16+ messages in thread
From: Nikolay Dimitrov @ 2015-05-21 14:37 UTC (permalink / raw)
  To: Leon Woestenberg; +Cc: meta-freescale, Otavio Salvador

Hi Leon,

On 05/21/2015 05:20 PM, Leon Woestenberg wrote:
> I could start the built u-boot from (u)SD card using the
> not-really-public registers.
>
> # setting for BOOT_CFG1, this select USDHC2 (Congatec on-module uSD)
> mw.l 0x020d8040 0x2850
> mw.l 0x020d8044 0x10000000
> reset
>
> # setting for BOOT_CFG1, this select USDHC4 (Congatec carrier board SD slot)
> mw.l 0x020d8040 0x3850
> mw.l 0x020d8044 0x10000000
> reset
>
> As 'bmode' was not available on my pre-installed u-boot, I used this
> convenience command to boot u-boot from the SD card:
>
> setenv sd 'mw.l 0x020d8040 0x3850; mw.l 0x020d8044 0x10000000; reset'
>
>
> However, although the newer u-boot 2013.04 supports the DTB now, I'm
> still getting stuck after the kernel starts.
> Any further ideas?

Here's a simple checklist:

1. Verify that DT configures both the serial port AND the IOMUXC,
please replace port numbers with your own:

&uart3 {                                <<= ttymxc2
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_uart3_2>; <<= use pinctrl uart3_2
	status = "okay";                <<= port is now enabled
};

If your UART pins are not available as ready-made pinctrl
configuration, you need to define new pinctrl and pass it here.

2. Verify that u-boot sets bootargs:

setenv bootargs ... console=ttymxcX,115200 ...


I followed these on a customer board and all worked fine without issues.

> Thanks,
>
> Leon.
>
>
> conga-QMX6 U-Boot > run sd
> resetting ...
>
>
> U-Boot 2013.04 QMX6Rx20 (May 19 2015 - 13:34:17)
>
> CPU:   Freescale i.MX6Q rev1.2 at 792 MHz
> CPU:   Temperature 32 C, calibration data: 0x56b4d469
> Reset cause: POR
> Board: conga-QMX6
> I2C:   ready
> DRAM:  1 GiB
> MMC:   FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 2
> SF: Detected SST25VF032B with page size 4 KiB, total 4 MiB
> No panel detected: default to Hannstar-XGA
> Display: Hannstar-XGA (1024x768)
> In:    serial
> Out:   serial
> Err:   serial
> PFUZE100 Rev. [10/21] detected
> Net:   configure Atheros AR8035 Ethernet Phy at address 6
> FEC
> Warning: FEC using MAC address from net device
>
> Normal Boot
> Hit any key to stop autoboot:  0
> U-Boot > run bootcmd_net
> Using FEC device
> TFTP from server 192.168.1.9; our IP address is 192.168.1.103
> Filename 'cgtqmx6/uImage.dtb'.
> Load address: 0x10780000
> Loading: ####
>       6.6 MiB/s
> done
> Bytes transferred = 48083 (bbd3 hex)
> Using FEC device
> TFTP from server 192.168.1.9; our IP address is 192.168.1.103
> Filename 'cgtqmx6/uImage'.
> Load address: 0x10800000
> Loading: #################################################################
>       #################################################################
>       #################################################################
>       #################################################################
>       #################################################################
>       ##############################################
>       6.9 MiB/s
> done
> Bytes transferred = 5432656 (52e550 hex)
> ## Booting kernel from Legacy Image at 10800000 ...
>     Image Name:   Linux-3.10.53-1.1.1_qmx6+g9f56bf
>     Image Type:   ARM Linux Kernel Image (uncompressed)
>     Data Size:    5432592 Bytes = 5.2 MiB
>     Load Address: 10008000
>     Entry Point:  10008000
>     Verifying Checksum ... OK
> ## Flattened Device Tree blob at 10780000
>     Booting using the fdt blob at 0x10780000
>     Loading Kernel Image ... OK
> OK
> switch to ldo_bypass mode!
>     Loading Device Tree to 4f543000, end 4f551bd2 ... OK
>
> Starting kernel ...
>
>
>
>
>
>
>
>
>
> On Wed, May 20, 2015 at 10:47 PM, Leon Woestenberg
> <leon.woestenberg@gmail.com <mailto:leon.woestenberg@gmail.com>> wrote:
>
>     Reading that patch comment more clearly, I now understand that both
>     u-boot and the SoC do in fact interpret the registers, because the
>     SoC ignores it for SPL type boot.
>
>     With that, I will try to boot the .sdcard image generated by the
>     fsl-community-bsp-platform tomorrow.
>
>     Thanks,
>
>     Leon.
>
>     On Wed, May 20, 2015 at 10:43 PM, Leon Woestenberg
>     <leon.woestenberg@gmail.com <mailto:leon.woestenberg@gmail.com>> wrote:
>
>         Hi Otavio,
>
>
>         On Wed, May 20, 2015 at 10:32 PM, Otavio Salvador
>         <otavio@ossystems.com.br <mailto:otavio@ossystems.com.br>> wrote:
>
>             On Wed, May 20, 2015 at 5:27 PM, Leon Woestenberg
>             <leon.woestenberg@gmail.com
>             <mailto:leon.woestenberg@gmail.com>> wrote:
>             ...
>             > Can anybody provide more insight here?
>             ...
>
>             yes. This is mostly what bmode in new U-Boot versions does. The
>             0x10000000 can be seen at:
>
>             https://github.com/Freescale/u-boot-fslc/blob/patches-2015.04/arch/arm/cpu/armv7/mx6/soc.c#L478
>
>
>         Thanks. So these registers are interpreted by the SoC itself and
>         not by u-boot on subsequent warm-reset?
>
>         I found some explanation of these "secret" registers here:
>
>         https://patchwork.ozlabs.org/patch/404723/

Regards,
Nikolay


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

* Re: linux-congatec (fido) silent after Starting kernel ...
  2015-05-27  6:37   ` Alejandro.de-cabo-Garcia
@ 2015-05-27  7:31     ` Nikolay Dimitrov
  0 siblings, 0 replies; 16+ messages in thread
From: Nikolay Dimitrov @ 2015-05-27  7:31 UTC (permalink / raw)
  To: Leon Woestenberg; +Cc: meta-freescale, Alejandro.de-cabo-Garcia

Hi Leon,

On 05/27/2015 09:37 AM, Alejandro.de-cabo-Garcia@congatec.com wrote:
> Hi,
>
>  >
>  > I am trying to understand why the higher FDT address would help.
>  > Where does the kernel extract to upon start?
>
> loadaddr=0x12000000

Just keep an eye on the addresses, so that the starting address of an
"item" doesn't step over the previous "item" payload. I'm usually too
lazy to calculate the differences all the time, and just use a 32 MiB
address step, like this:

0x12000000 - kernel
0x13000000 - device tree (or optional initrd)
0x14000000 - (optional device tree if initrd was loaded at 0x13000000)

Thus if all of your items are <= 32 MiB, these addresses will work all
the time.

Regards,
Nikolay


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

* Re: linux-congatec (fido) silent after Starting kernel ...
  2015-05-26  9:52 ` Leon Woestenberg
@ 2015-05-27  6:37   ` Alejandro.de-cabo-Garcia
  2015-05-27  7:31     ` Nikolay Dimitrov
  0 siblings, 1 reply; 16+ messages in thread
From: Alejandro.de-cabo-Garcia @ 2015-05-27  6:37 UTC (permalink / raw)
  To: Leon Woestenberg; +Cc: meta-freescale

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

Hi,

> 
> I am trying to understand why the higher FDT address would help. 
> Where does the kernel extract to upon start?

loadaddr=0x12000000


Kind regards,
alex.

[-- Attachment #2: Type: text/html, Size: 371 bytes --]

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

* Re: linux-congatec (fido) silent after Starting kernel ...
  2015-05-22  7:29 Alejandro.de-cabo-Garcia
@ 2015-05-26  9:52 ` Leon Woestenberg
  2015-05-27  6:37   ` Alejandro.de-cabo-Garcia
  0 siblings, 1 reply; 16+ messages in thread
From: Leon Woestenberg @ 2015-05-26  9:52 UTC (permalink / raw)
  To: Alejandro.de-cabo-Garcia; +Cc: meta-freescale

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

Hello Alejandro, all,

I have used the MfgTool to flash the latest official Congatec u-boot, and
used this write the Yocto FSL Community BSP u-boot to SPI NOR. I have my
working upgraded system now.

(OK, so I probably forgot to set the console in u-boot. Making beginner
mistakes all over again.)

I am trying to understand why the higher FDT address would help. Where does
the kernel extract to upon start?

Thanks for the insights and tips all,

Regards,

Leon.


On Fri, May 22, 2015 at 9:29 AM, <Alejandro.de-cabo-Garcia@congatec.com>
wrote:

> Hi Leon,
>
> could you try to set the following fdt loading address:
>
> setenv fdt_addr 0x18000000
>
>
> Regards,
> alex.
> --
> _______________________________________________
> meta-freescale mailing list
> meta-freescale@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/meta-freescale
>
>


-- 
Leon

[-- Attachment #2: Type: text/html, Size: 1792 bytes --]

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

* Re: linux-congatec (fido) silent after Starting kernel ...
@ 2015-05-22  7:29 Alejandro.de-cabo-Garcia
  2015-05-26  9:52 ` Leon Woestenberg
  0 siblings, 1 reply; 16+ messages in thread
From: Alejandro.de-cabo-Garcia @ 2015-05-22  7:29 UTC (permalink / raw)
  To: meta-freescale

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

Hi Leon,

could you try to set the following fdt loading address:

setenv fdt_addr 0x18000000


Regards,
alex.

[-- Attachment #2: Type: text/html, Size: 343 bytes --]

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

end of thread, other threads:[~2015-05-27  7:31 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-19 15:07 linux-congatec (fido) silent after Starting kernel Leon Woestenberg
2015-05-19 15:21 ` Nikolay Dimitrov
2015-05-19 19:44 ` Peter Bergin
2015-05-20 14:27   ` Leon Woestenberg
2015-05-20 14:43     ` Peter Bergin
2015-05-20 15:04       ` Nikolay Dimitrov
2015-05-20 20:27         ` Leon Woestenberg
2015-05-20 20:32           ` Otavio Salvador
2015-05-20 20:43             ` Leon Woestenberg
2015-05-20 20:47               ` Leon Woestenberg
2015-05-21 14:20                 ` Leon Woestenberg
2015-05-21 14:37                   ` Nikolay Dimitrov
2015-05-22  7:29 Alejandro.de-cabo-Garcia
2015-05-26  9:52 ` Leon Woestenberg
2015-05-27  6:37   ` Alejandro.de-cabo-Garcia
2015-05-27  7:31     ` Nikolay Dimitrov

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.