Re: [U-Boot] [linux-sunxi] linux-sunxi/u-boot-sunxi is no longer supported, time to switch to upstream u-boot

2014-12-22 Thread Michal Suchanek
On 20 December 2014 at 19:27, Hans de Goede hdego...@redhat.com wrote:
 Hi All,

 There are 3 topics which I would like to cover in this mail:

 1) Switching over to upstream u-boot for the linux-sunxi project
 2) How to build upstream u-boot for use with linux-sunxi sunxi-3.4 kernels
 3) Adding more boards to upstream u-boot


 1. Switching over to upstream u-boot for the linux-sunxi project
 

 Upstream u-boot has had sunxi support for a while now, and has slowly been
 gaining a lot of features over the linux-sunxi/u-boot-sunxi version at:
 https://github.com/linux-sunxi/u-boot-sunxi/

 Some of the new features supported upstream are booting from usb, booting
 from
 sata (ahci) and full sun6i (A31) support including SPL support. Also
 upstream
 u-boot supports using hdmi out + an usb keyboard as u-boot console, so that
 one does not need to solder a serial console to things like hdmi tv-dongles.

 Upstream u-boot also has full sun8i (A23) support in the pipeline including
 SPL support.

Since we have sun8i memory support is there corresponding meminfo
which can dump the timing?

Thanks

Michal
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [linux-sunxi] linux-sunxi/u-boot-sunxi is no longer supported, time to switch to upstream u-boot

2014-12-22 Thread Hans de Goede

Hi,

On 22-12-14 09:32, Michal Suchanek wrote:

On 20 December 2014 at 19:27, Hans de Goede hdego...@redhat.com wrote:

Hi All,

There are 3 topics which I would like to cover in this mail:

1) Switching over to upstream u-boot for the linux-sunxi project
2) How to build upstream u-boot for use with linux-sunxi sunxi-3.4 kernels
3) Adding more boards to upstream u-boot


1. Switching over to upstream u-boot for the linux-sunxi project


Upstream u-boot has had sunxi support for a while now, and has slowly been
gaining a lot of features over the linux-sunxi/u-boot-sunxi version at:
https://github.com/linux-sunxi/u-boot-sunxi/

Some of the new features supported upstream are booting from usb, booting
from
sata (ahci) and full sun6i (A31) support including SPL support. Also
upstream
u-boot supports using hdmi out + an usb keyboard as u-boot console, so that
one does not need to solder a serial console to things like hdmi tv-dongles.

Upstream u-boot also has full sun8i (A23) support in the pipeline including
SPL support.


Since we have sun8i memory support is there corresponding meminfo
which can dump the timing?


No, just like with previous boards all boards seem to use the same timing
(tpr) values so I've simply hardcoded them. The only 2 things which can be
configured in the sun8i dram code or the dram-clk and the zq value, both
of which (so far) have been filled in in the fex files, so there is no reason
to read it back, moreover reading it back is impossible in the case of the zq
value, as that does not end up 1:1 in a register.

Regards,

Hans
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [linux-sunxi] linux-sunxi/u-boot-sunxi is no longer supported, time to switch to upstream u-boot

2014-12-22 Thread Hans de Goede

Hi,

On 21-12-14 21:40, Emilio López wrote:

snip


Sorry for the noise, I messed up and was using the Cubieboard config instead of the 
Cubietruck one .

Seems to work fine other than this warning:

Error: dwmac.1c5 address ab:cd:ef:ab:cd:ef illegal value


Weird, try doing:

setenv ethaddr
saveenv

It seems you've a bogus ethaddr setting in your environment, or maybe
in uEnv.txt ?

Or alternatively, nuke your environment so that you get the default
one using:

sudo dd if=/dev/zero of=/dev/sdc bs=1024 seek=544 count=256

Replacing sdc with the block device for your sdcard reader,
e.g. mmcblk0. Using the default env will get you closer to how most
people will be using upstream u-boot, so running with the default env
is preferred.

Regards,

Hans
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [linux-sunxi] linux-sunxi/u-boot-sunxi is no longer supported, time to switch to upstream u-boot

2014-12-22 Thread Ian Campbell
On Mon, 2014-12-22 at 14:53 +0100, Hans de Goede wrote:
 Or alternatively, nuke your environment so that you get the default
 one using:
 
 sudo dd if=/dev/zero of=/dev/sdc bs=1024 seek=544 count=256

You can do this with the env command from the u-boot cmdline too. I
forget the parameters, but they are in help env.

Ian.

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [linux-sunxi] linux-sunxi/u-boot-sunxi is no longer supported, time to switch to upstream u-boot

2014-12-22 Thread Siarhei Siamashka
On Mon, 22 Dec 2014 14:50:09 +0100
Hans de Goede hdego...@redhat.com wrote:

 Hi,
 
 On 22-12-14 09:32, Michal Suchanek wrote:
  On 20 December 2014 at 19:27, Hans de Goede hdego...@redhat.com wrote:
  Hi All,
 
  There are 3 topics which I would like to cover in this mail:
 
  1) Switching over to upstream u-boot for the linux-sunxi project
  2) How to build upstream u-boot for use with linux-sunxi sunxi-3.4 kernels
  3) Adding more boards to upstream u-boot
 
 
  1. Switching over to upstream u-boot for the linux-sunxi project
  
 
  Upstream u-boot has had sunxi support for a while now, and has slowly been
  gaining a lot of features over the linux-sunxi/u-boot-sunxi version at:
  https://github.com/linux-sunxi/u-boot-sunxi/
 
  Some of the new features supported upstream are booting from usb, booting
  from
  sata (ahci) and full sun6i (A31) support including SPL support. Also
  upstream
  u-boot supports using hdmi out + an usb keyboard as u-boot console, so that
  one does not need to solder a serial console to things like hdmi 
  tv-dongles.
 
  Upstream u-boot also has full sun8i (A23) support in the pipeline including
  SPL support.
 
  Since we have sun8i memory support is there corresponding meminfo
  which can dump the timing?
 
 No, just like with previous boards all boards seem to use the same timing
 (tpr) values so I've simply hardcoded them. The only 2 things which can be
 configured in the sun8i dram code or the dram-clk and the zq value, both
 of which (so far) have been filled in in the fex files, so there is no reason
 to read it back, moreover reading it back is impossible in the case of the zq
 value, as that does not end up 1:1 in a register.

It still makes a lot of sense having a tool, which recovers as much of
the 'dram_para' struct as possible. At least this can provide a way to
verify the correctness of the sun8i dram code in u-boot, if compared
with the same results obtained on a system with the allwinner boot0
bootloader. And also compared with the settings from FEX.

Hans, do you remember your recent screw-up with the axp152 regulators?
http://lists.denx.de/pipermail/u-boot/2014-October/191528.html
You noticed the problem only several months after introducing this
regression. This could be discovered because you were playing with the
sunxi-3.4 kernel, and thankfully it was able to report the voltage,
originally set by the bootloader. Had you thought about a way to test
your axp152 tweaks at the time when you had initially implemented them,
this regression could have been avoided altogether.

Exactly the same applies here. The sun8i dram code contains some weird
dram parameters scrambling before they are written to the registers
among other things. How can we be sure that you have really correctly
transplanted all of the boot0 logic into your C code without any typo
or missing anything in the process? Especially considering that you are
not disclosing any details about the way you have done this, or the
exact boot0 binary that was used to borrow this logic from.

Reading back from the hardware registers via /dev/mem and comparing
this data with the expected values could definitely help. And no, it's
not something that some other person could maybe do in some distant
future. This is a necessary action to ensure the sun8i dram code
quality, which is better to be done right now.

-- 
Best regards,
Siarhei Siamashka
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [linux-sunxi] linux-sunxi/u-boot-sunxi is no longer supported, time to switch to upstream u-boot

2014-12-21 Thread Siarhei Siamashka
On Sun, 21 Dec 2014 17:00:46 -0300
Emilio López emi...@elopez.com.ar wrote:

 Hi Hans,
 
 El 20/12/14 a las 15:27, Hans de Goede escibió:
  Hi All,
 
  There are 3 topics which I would like to cover in this mail:
 
  1) Switching over to upstream u-boot for the linux-sunxi project
 (...)
  Here are some example instructions on how to build upstream u-boot for
  the Cubietruck:
 
  git clone git://git.denx.de/u-boot.git
  cd u-boot
  make -j4 CROSS_COMPILE=arm-linux-gnu- Cubietruck_defconfig
  # If you want to use an upstream kernel the next steps can be skipped (*)
  make -j4 CROSS_COMPILE=arm-linux-gnu- menuconfig
  #  select ARM architecture - Enable workarounds for booting old
  kernels
  #  exit  save
  make -j4 CROSS_COMPILE=arm-linux-gnu- spl/menuconfig
  #  select ARM architecture - Enable workarounds for booting old
  kernels
  #  exit  save
  # skip to here if you're using an upstream kernel
  make -j4 CROSS_COMPILE=arm-linux-gnu-
 
  And now you will have a u-boot-sunxi-with-spl.bin to dd to your sdcard as
  usual.
 (...)
 
 So I thought it'd be a good idea to move over to mainline uboot, but it 
 doesn't seem to be working at all on Cubietruck. When applying power to 
 the board, all I get is
 
 U-Boot SPL 2015.01-rc3-00163-gd8bec60 (Dec 21 2014 - 16:43:41)
 DRAM:Timeout initialising DRAM
 
 resetting ...
 
 U-Boot SPL 2015.01-rc3-00163-gd8bec60 (Dec 21 2014 - 16:43:41)
 DRAM:Timeout initialising DRAM
 
 resetting ...
 
 ...ad infinitum.
 
 The hardware itself is fine, the NAND bootloader runs OK and I used the 
 board with an old uboot-sunxi some days back. Any ideas on what may be 
 going on?

Thanks for reporting this.

First of all, please ensure that there is no obvious misconfiguration.
For example, whether you have really configured u-boot for Cubietruck.

If everything is configured correctly, then it would help a lot to
identify which of the await_bits_set() or await_bits_clear() calls
is failing in 'arch/arm/cpu/armv7/sunxi/dram_sun4i.c' by adding
some extra debugging prints.

-- 
Best regards,
Siarhei Siamashka
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [linux-sunxi] linux-sunxi/u-boot-sunxi is no longer supported, time to switch to upstream u-boot

2014-12-21 Thread Emilio López

Hi Hans,

El 20/12/14 a las 15:27, Hans de Goede escibió:

Hi All,

There are 3 topics which I would like to cover in this mail:

1) Switching over to upstream u-boot for the linux-sunxi project

(...)

Here are some example instructions on how to build upstream u-boot for
the Cubietruck:

git clone git://git.denx.de/u-boot.git
cd u-boot
make -j4 CROSS_COMPILE=arm-linux-gnu- Cubietruck_defconfig
# If you want to use an upstream kernel the next steps can be skipped (*)
make -j4 CROSS_COMPILE=arm-linux-gnu- menuconfig
#  select ARM architecture - Enable workarounds for booting old
kernels
#  exit  save
make -j4 CROSS_COMPILE=arm-linux-gnu- spl/menuconfig
#  select ARM architecture - Enable workarounds for booting old
kernels
#  exit  save
# skip to here if you're using an upstream kernel
make -j4 CROSS_COMPILE=arm-linux-gnu-

And now you will have a u-boot-sunxi-with-spl.bin to dd to your sdcard as
usual.

(...)

So I thought it'd be a good idea to move over to mainline uboot, but it 
doesn't seem to be working at all on Cubietruck. When applying power to 
the board, all I get is


U-Boot SPL 2015.01-rc3-00163-gd8bec60 (Dec 21 2014 - 16:43:41)
DRAM:Timeout initialising DRAM

resetting ...

U-Boot SPL 2015.01-rc3-00163-gd8bec60 (Dec 21 2014 - 16:43:41)
DRAM:Timeout initialising DRAM

resetting ...

...ad infinitum.

The hardware itself is fine, the NAND bootloader runs OK and I used the 
board with an old uboot-sunxi some days back. Any ideas on what may be 
going on?


Cheers!

Emilio
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [linux-sunxi] linux-sunxi/u-boot-sunxi is no longer supported, time to switch to upstream u-boot

2014-12-21 Thread Emilio López

Hi,

El 21/12/14 a las 17:28, Siarhei Siamashka escibió:

On Sun, 21 Dec 2014 17:00:46 -0300
Emilio López emi...@elopez.com.ar wrote:


Hi Hans,

El 20/12/14 a las 15:27, Hans de Goede escibió:

Hi All,

There are 3 topics which I would like to cover in this mail:

1) Switching over to upstream u-boot for the linux-sunxi project

(...)

Here are some example instructions on how to build upstream u-boot for
the Cubietruck:

git clone git://git.denx.de/u-boot.git
cd u-boot
make -j4 CROSS_COMPILE=arm-linux-gnu- Cubietruck_defconfig
# If you want to use an upstream kernel the next steps can be skipped (*)
make -j4 CROSS_COMPILE=arm-linux-gnu- menuconfig
#  select ARM architecture - Enable workarounds for booting old
kernels
#  exit  save
make -j4 CROSS_COMPILE=arm-linux-gnu- spl/menuconfig
#  select ARM architecture - Enable workarounds for booting old
kernels
#  exit  save
# skip to here if you're using an upstream kernel
make -j4 CROSS_COMPILE=arm-linux-gnu-

And now you will have a u-boot-sunxi-with-spl.bin to dd to your sdcard as
usual.

(...)

So I thought it'd be a good idea to move over to mainline uboot, but it
doesn't seem to be working at all on Cubietruck. When applying power to
the board, all I get is

U-Boot SPL 2015.01-rc3-00163-gd8bec60 (Dec 21 2014 - 16:43:41)
DRAM:Timeout initialising DRAM

resetting ...

U-Boot SPL 2015.01-rc3-00163-gd8bec60 (Dec 21 2014 - 16:43:41)
DRAM:Timeout initialising DRAM

resetting ...

...ad infinitum.

The hardware itself is fine, the NAND bootloader runs OK and I used the
board with an old uboot-sunxi some days back. Any ideas on what may be
going on?


Thanks for reporting this.

First of all, please ensure that there is no obvious misconfiguration.
For example, whether you have really configured u-boot for Cubietruck.


Sorry for the noise, I messed up and was using the Cubieboard config 
instead of the Cubietruck one .


Seems to work fine other than this warning:

Error: dwmac.1c5 address ab:cd:ef:ab:cd:ef illegal value

Cheers!

Emilio
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot