[linux-sunxi] Re: A20 with Samsung's SDRAM 'K4B1G1646G BCK0'

2015-05-31 Thread sufi al hussaini hassani kamili raheemi
Hi,

I was finally able to boot my board!
It turned out to be a h/w problem after all (as @Siarhei suspected)- A 
missing 1ohm resistor! That wasn't placed by the board manufacturer, 
although it was in the BOM list. 

I can also confirm that the DRAM (Samsung's SDRAM 'K4B1G1646G BCK0', for 
which I created this thread) works out of the box with mainline U-Boot.
I'm now have problems in getting the ethernet to work, but it looks like a 
minor problem (and certainly unrelated to this thread).

Thanks again to @Siarhei's indispensable help!

Thanks and regards,
Shoaib Ahmed.

On Tuesday, May 19, 2015 at 2:56:30 PM UTC+4, sufi al hussaini hassani 
kamili raheemi wrote:
>
> I have a board that's got A20 with Samsung's SDRAM 'K4B1G1646G BCK0'. 
>
> The problem I'm facing now is that I'm not able to get it to boot. I keep 
> getting the following on debug UART:
>
> U-Boot SPL 2014.04-10706-g36080eb (Aug 19 2014 - 16:42:16)
> DRAM:Timeout initialising DRAM
>
> resetting ...
>
>  (Repeats infinitely)
>
>
> I suspected that the (old) '[dram_para]' in my FEX file was causing this, 
> as it was configured for 'K4B4G1646D' (which is widely used).
> So, I edited the FEX file based on the info I could gather from the 
> SDRAM's datasheet. It now looks like this:
>
>
> [dram_para]
> dram_baseaddr = 0x4000
> dram_clk = 384
> dram_type = 3
> dram_rank_num = 1
> dram_chip_density = 1024
> dram_io_width = 16
> dram_bus_width = 32
> dram_cas = 9
> dram_zq = 0x7f
> dram_odt_en = 0
> dram_size = 256
> dram_tpr0 = 0x42d899b7
> dram_tpr1 = 0xa090
> dram_tpr2 = 0x22a00
> dram_tpr3 = 0x0
> dram_tpr4 = 0x0
> dram_tpr5 = 0x0
> dram_emr1 = 0x4
> dram_emr2 = 0x10
> dram_emr3 = 0x0
>
> I tried booting with this but to no avail. The problem persists (same 
> error).
>
> I looked for ways to get the DRAM info directly from the hardware and 
> found meminfo in sunxi tools. 
> I was able to compile (and run) it (on a A20 based commercial board), but 
> I just can't figure out how to get it running on my board.
>
> Now, I'm confused- whether just setting the correct values in my FEX would 
> suffice or would I have to rebuild U-Boot.
> I would appreciate if someone could point me in the right direction to 
> solve this problem. 
>
> Thanks.
>

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [linux-sunxi] Re: A20 with Samsung's SDRAM 'K4B1G1646G BCK0'

2015-05-23 Thread sufi al hussaini hassani kamili raheemi
I'm sorry I couldn't find time to reply here as I was busy with another 
project over the last couple of days.

Thanks for trying it and confirming that it works fine on the known 
> good boards. 
>

You're welcome! ;)

 This all makes me think that the hardware problems are the most 

likely culprit. 


I have sent the board for RAM replacement to some hardware folk. 
I have asked the RAM to be interchanged with a Banana Pi M1, so I can try 
to boot the M1 with this RAM as well and be sure if it's really the RAM 
that's causing the problem.

Are you using a single DRAM chip now or a pair of them for getting 
> the full 32-bit bus width? 
>

I'm using a pair of these chips. 
>From the datasheets, it appears both chips (K4B1G1646G) and (K4B4G1646D) 
are pin-to-pin compatible.

As for the troubleshooting ideas, you can also check voltages. Is 
> this board using the AXP209 PMIC or relies on some fixed voltage 
> regulators? 
>

Thanks again. I will try this. It is using the AXP.

I was wondering if I should try to get some code to run baremetal on the 
ARM. 
For now, I'm waiting for the board, which should hopefully arrive tomorrow.

Thanks and regards,
Shoaib Ahmed.


On Thursday, May 21, 2015 at 5:12:44 AM UTC+4, Siarhei Siamashka wrote:
>
> On Wed, 20 May 2015 05:03:00 -0700 (PDT) 
> sufi al hussaini hassani kamili raheemi  > 
> wrote: 
>
> > Hi Siarhei Siamashka, 
> > 
> > I tried your prototype image v5 
> > <
> https://github.com/ssvb/sunxi-bootsetup/releases/tag/20141215-sunxi-bootsetup-prototype>
>  
> with 
> > some of the A20 and A10 boards I have 
> > (i.e. A20-OLinuXino_MICRO, A10-OLinuXino_LIME, and some BPis), to make 
> sure 
> > the image on SD card was written alright; and it booted fine (both on 
> debug 
> > UART and HDMI). 
>
> Thanks for trying it and confirming that it works fine on the known 
> good boards. 
>
> > Next, I tried it with my board, but It still gives me the same error: 
> > 
> > U-Boot SPL 2014.10-01707-gc4fca89 (Feb 10 2015 - 04:03:30) 
> > DRAM:Timeout initialising DRAM 
> > 
> > 
> > resetting ... 
>   
> This all makes me think that the hardware problems are the most 
> likely culprit. 
>
> > Based on the "Timeout initialising DRAM" error message, this is often 
> > > encountered when you have configured U-Boot for the wrong SoC type. 
> > > Is your board really using specifically the *A20* SoC? 
> > 
> > I can confirm that the board is actually using A20 (Dual-core T). 
>
> OK. 
>
> > I was wondering if it would be a good idea to replace my RAM with a 
> > 'K4B4G1646D' from a spare BPi I have, and give it a try. 
>
> Yes, you can try to replace the RAM chip (if you are a hardware person 
> and know how to do this). Your current DRAM chip has 1Gb density, which 
> is rather low. And I'm not aware of any other Allwinner devices using 
> such chips. however the chips of 1Gb/2Gb/4Gb densities differ only by 
> the number of address lines and everything else is similar. So 
> personally I don't think that it should be a problem, but still I 
> can't be completely sure either. 
>
> It is possible to search for "A20_DDR" or "Allwinner A20 SDRAM Support 
> List" keywords in the Internet and find some sort of a compatibility 
> list of the DRAM chips. There is only one 1Gb chip listed there, and it 
> is x8 (yours is x16). 
>
> Are you using a single DRAM chip now or a pair of them for getting 
> the full 32-bit bus width? 
>
> As for the troubleshooting ideas, you can also check voltages. Is 
> this board using the AXP209 PMIC or relies on some fixed voltage 
> regulators? 
>
> Also I'm not a hardware person myself, but I heard that the DRAM tracks 
> routing on the PCB tends to be rather difficult and there are some 
> strict length and impedance matching requirements. 
>
> -- 
> Best regards, 
> Siarhei Siamashka 
>

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [linux-sunxi] Re: A20 with Samsung's SDRAM 'K4B1G1646G BCK0'

2015-05-20 Thread Siarhei Siamashka
On Wed, 20 May 2015 05:03:00 -0700 (PDT)
sufi al hussaini hassani kamili raheemi 
wrote:

> Hi Siarhei Siamashka,
> 
> I tried your prototype image v5 
> 
>  with 
> some of the A20 and A10 boards I have 
> (i.e. A20-OLinuXino_MICRO, A10-OLinuXino_LIME, and some BPis), to make sure 
> the image on SD card was written alright; and it booted fine (both on debug 
> UART and HDMI).

Thanks for trying it and confirming that it works fine on the known
good boards.

> Next, I tried it with my board, but It still gives me the same error:
> 
> U-Boot SPL 2014.10-01707-gc4fca89 (Feb 10 2015 - 04:03:30)
> DRAM:Timeout initialising DRAM
> 
> 
> resetting ...
 
This all makes me think that the hardware problems are the most
likely culprit.

> Based on the "Timeout initialising DRAM" error message, this is often 
> > encountered when you have configured U-Boot for the wrong SoC type. 
> > Is your board really using specifically the *A20* SoC? 
> 
> I can confirm that the board is actually using A20 (Dual-core T). 

OK.

> I was wondering if it would be a good idea to replace my RAM with a 
> 'K4B4G1646D' from a spare BPi I have, and give it a try.

Yes, you can try to replace the RAM chip (if you are a hardware person
and know how to do this). Your current DRAM chip has 1Gb density, which
is rather low. And I'm not aware of any other Allwinner devices using
such chips. however the chips of 1Gb/2Gb/4Gb densities differ only by
the number of address lines and everything else is similar. So
personally I don't think that it should be a problem, but still I
can't be completely sure either.

It is possible to search for "A20_DDR" or "Allwinner A20 SDRAM Support
List" keywords in the Internet and find some sort of a compatibility
list of the DRAM chips. There is only one 1Gb chip listed there, and it
is x8 (yours is x16).

Are you using a single DRAM chip now or a pair of them for getting
the full 32-bit bus width?

As for the troubleshooting ideas, you can also check voltages. Is
this board using the AXP209 PMIC or relies on some fixed voltage
regulators?

Also I'm not a hardware person myself, but I heard that the DRAM tracks
routing on the PCB tends to be rather difficult and there are some
strict length and impedance matching requirements.

-- 
Best regards,
Siarhei Siamashka

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[linux-sunxi] Re: A20 with Samsung's SDRAM 'K4B1G1646G BCK0'

2015-05-20 Thread sufi al hussaini hassani kamili raheemi
I was reading the http://linux-sunxi.org/New_Device_howto 
.
 
I'm now trying to get my board DRAM settings to create a custom u-boot 
defconfig using the meminfo (sunxi) tool. 
But, I'm not able to figure out how to deploy it to my board (I did quite a 
lot of reading before asking this here).

I tried to enter into the FEL mode on my board, but none of the methods 
described here  seem to work.

I'd appreciate if anyone could help me out here.

Thanks,
Shoaib.

On Tuesday, May 19, 2015 at 2:56:30 PM UTC+4, sufi al hussaini hassani 
kamili raheemi wrote:
>
> I have a board that's got A20 with Samsung's SDRAM 'K4B1G1646G BCK0'. 
>
> The problem I'm facing now is that I'm not able to get it to boot. I keep 
> getting the following on debug UART:
>
> U-Boot SPL 2014.04-10706-g36080eb (Aug 19 2014 - 16:42:16)
> DRAM:Timeout initialising DRAM
>
> resetting ...
>
>  (Repeats infinitely)
>
>
> I suspected that the (old) '[dram_para]' in my FEX file was causing this, 
> as it was configured for 'K4B4G1646D' (which is widely used).
> So, I edited the FEX file based on the info I could gather from the 
> SDRAM's datasheet. It now looks like this:
>
>
> [dram_para]
> dram_baseaddr = 0x4000
> dram_clk = 384
> dram_type = 3
> dram_rank_num = 1
> dram_chip_density = 1024
> dram_io_width = 16
> dram_bus_width = 32
> dram_cas = 9
> dram_zq = 0x7f
> dram_odt_en = 0
> dram_size = 256
> dram_tpr0 = 0x42d899b7
> dram_tpr1 = 0xa090
> dram_tpr2 = 0x22a00
> dram_tpr3 = 0x0
> dram_tpr4 = 0x0
> dram_tpr5 = 0x0
> dram_emr1 = 0x4
> dram_emr2 = 0x10
> dram_emr3 = 0x0
>
> I tried booting with this but to no avail. The problem persists (same 
> error).
>
> I looked for ways to get the DRAM info directly from the hardware and 
> found meminfo in sunxi tools. 
> I was able to compile (and run) it (on a A20 based commercial board), but 
> I just can't figure out how to get it running on my board.
>
> Now, I'm confused- whether just setting the correct values in my FEX would 
> suffice or would I have to rebuild U-Boot.
> I would appreciate if someone could point me in the right direction to 
> solve this problem. 
>
> Thanks.
>

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[linux-sunxi] Re: A20 with Samsung's SDRAM 'K4B1G1646G BCK0'

2015-05-20 Thread sufi al hussaini hassani kamili raheemi
Hi Siarhei Siamashka,

I tried your prototype image v5 

 with 
some of the A20 and A10 boards I have 
(i.e. A20-OLinuXino_MICRO, A10-OLinuXino_LIME, and some BPis), to make sure 
the image on SD card was written alright; and it booted fine (both on debug 
UART and HDMI).

Next, I tried it with my board, but It still gives me the same error:

U-Boot SPL 2014.10-01707-gc4fca89 (Feb 10 2015 - 04:03:30)
DRAM:Timeout initialising DRAM


resetting ...


Based on the "Timeout initialising DRAM" error message, this is often 
> encountered when you have configured U-Boot for the wrong SoC type. 
> Is your board really using specifically the *A20* SoC? 


I can confirm that the board is actually using A20 (Dual-core T). 
I was wondering if it would be a good idea to replace my RAM with a 
'K4B4G1646D' from a spare BPi I have, and give it a try.


Thanks and regards,
Shoaib.

On Tuesday, May 19, 2015 at 2:56:30 PM UTC+4, sufi al hussaini hassani 
kamili raheemi wrote:
>
> I have a board that's got A20 with Samsung's SDRAM 'K4B1G1646G BCK0'. 
>
> The problem I'm facing now is that I'm not able to get it to boot. I keep 
> getting the following on debug UART:
>
> U-Boot SPL 2014.04-10706-g36080eb (Aug 19 2014 - 16:42:16)
> DRAM:Timeout initialising DRAM
>
> resetting ...
>
>  (Repeats infinitely)
>
>
> I suspected that the (old) '[dram_para]' in my FEX file was causing this, 
> as it was configured for 'K4B4G1646D' (which is widely used).
> So, I edited the FEX file based on the info I could gather from the 
> SDRAM's datasheet. It now looks like this:
>
>
> [dram_para]
> dram_baseaddr = 0x4000
> dram_clk = 384
> dram_type = 3
> dram_rank_num = 1
> dram_chip_density = 1024
> dram_io_width = 16
> dram_bus_width = 32
> dram_cas = 9
> dram_zq = 0x7f
> dram_odt_en = 0
> dram_size = 256
> dram_tpr0 = 0x42d899b7
> dram_tpr1 = 0xa090
> dram_tpr2 = 0x22a00
> dram_tpr3 = 0x0
> dram_tpr4 = 0x0
> dram_tpr5 = 0x0
> dram_emr1 = 0x4
> dram_emr2 = 0x10
> dram_emr3 = 0x0
>
> I tried booting with this but to no avail. The problem persists (same 
> error).
>
> I looked for ways to get the DRAM info directly from the hardware and 
> found meminfo in sunxi tools. 
> I was able to compile (and run) it (on a A20 based commercial board), but 
> I just can't figure out how to get it running on my board.
>
> Now, I'm confused- whether just setting the correct values in my FEX would 
> suffice or would I have to rebuild U-Boot.
> I would appreciate if someone could point me in the right direction to 
> solve this problem. 
>
> Thanks.
>

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[linux-sunxi] Re: A20 with Samsung's SDRAM 'K4B1G1646G BCK0'

2015-05-19 Thread sufi al hussaini hassani kamili raheemi
I'm very grateful to you @Siarhei, for having taken the time to write these 
very helpful replies. You're awesome!

I'll read how to get myself a uboot defconfig for my board, and will 
continue that way.
But first, I'm starting with 'sunxi-bootsetup-prototype' image, to make 
sure all's well hardware-wise. 

Thanks again!

On Tuesday, May 19, 2015 at 2:56:30 PM UTC+4, sufi al hussaini hassani 
kamili raheemi wrote:
>
> I have a board that's got A20 with Samsung's SDRAM 'K4B1G1646G BCK0'. 
>
> The problem I'm facing now is that I'm not able to get it to boot. I keep 
> getting the following on debug UART:
>
> U-Boot SPL 2014.04-10706-g36080eb (Aug 19 2014 - 16:42:16)
> DRAM:Timeout initialising DRAM
>
> resetting ...
>
>  (Repeats infinitely)
>
>
> I suspected that the (old) '[dram_para]' in my FEX file was causing this, 
> as it was configured for 'K4B4G1646D' (which is widely used).
> So, I edited the FEX file based on the info I could gather from the 
> SDRAM's datasheet. It now looks like this:
>
>
> [dram_para]
> dram_baseaddr = 0x4000
> dram_clk = 384
> dram_type = 3
> dram_rank_num = 1
> dram_chip_density = 1024
> dram_io_width = 16
> dram_bus_width = 32
> dram_cas = 9
> dram_zq = 0x7f
> dram_odt_en = 0
> dram_size = 256
> dram_tpr0 = 0x42d899b7
> dram_tpr1 = 0xa090
> dram_tpr2 = 0x22a00
> dram_tpr3 = 0x0
> dram_tpr4 = 0x0
> dram_tpr5 = 0x0
> dram_emr1 = 0x4
> dram_emr2 = 0x10
> dram_emr3 = 0x0
>
> I tried booting with this but to no avail. The problem persists (same 
> error).
>
> I looked for ways to get the DRAM info directly from the hardware and 
> found meminfo in sunxi tools. 
> I was able to compile (and run) it (on a A20 based commercial board), but 
> I just can't figure out how to get it running on my board.
>
> Now, I'm confused- whether just setting the correct values in my FEX would 
> suffice or would I have to rebuild U-Boot.
> I would appreciate if someone could point me in the right direction to 
> solve this problem. 
>
> Thanks.
>

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [linux-sunxi] Re: A20 with Samsung's SDRAM 'K4B1G1646G BCK0'

2015-05-19 Thread Siarhei Siamashka
On Tue, 19 May 2015 07:57:19 -0700 (PDT)
sufi al hussaini hassani kamili raheemi 
wrote:

> I tried building mainline u-boot as you suggested @Hans. Here's what I did 
> (please bear with me):
> 
> Compiled u-boot (natively on olimex A20-micro):
> (Installed dtc first)
> 
> > git clone git://git.denx.de/u-boot.git
> > make A20-OLinuXino_MICRO_defconfig
> > make

So you have an A20-OLinuXino_MICRO board, which is working fine. That's
very good. Using it you can learn quite a lot about the Allwinner
hardware in general.

And this experience should help with the other boards.

> Wrote the bootloader files to an SD card using:
> > sudo dd if=~/u-boot/u-boot.bin of=/dev/disk2 bs=1024 seek=32 
> > sudo dd if=~/u-boot/spl/sunxi-spl.bin of=/dev/disk2 bs=1024 seek=8

> However, I still (sadly) get the same error.
> U-Boot SPL 2015.07-rc1-00255-g0e6b7a2 (May 19 2015 - 16:55:13)
> 
> DRAM:Timeout initialising DRAM
>
> As seen above, this is a recent U-Boot version, so I'm guessing I did 
> compile the U-Boot alright.

Your U-Boot is configured for the A20-OLinuXino_MICRO board. Does
the A20-OLinuXino_MICRO board boot fine with this new freshly compiled
mainline U-Boot?

Using the A20-OLinuXino_MICRO config for a different Allwinner based
board may lead to unpredictable results. Each board has its own
defconfig file for a reason. You need to provide a proper defconfig
file for your board. To help people to succeed in this task, there
is a guide about bringing up new and previously unsupported devices:

   http://linux-sunxi.org/New_Device_howto

> But, the problem persists and I've run out of ideas. 
> 
> Any other suggestions? 
> Could there be any other reason (apart from DRAM parameters) that could be 
> causing this?

Based on the "Timeout initialising DRAM" error message, this is often
encountered when you have configured U-Boot for the wrong SoC type.
Is your board really using specifically the *A20* SoC?

And as an extra experiment, you may also try:

https://github.com/ssvb/sunxi-bootsetup/releases/tag/20141215-sunxi-bootsetup-prototype
If your board is really A10, A10s or A20 (and the hardware is not
defective), then you may successfully boot it with this SD card image.

-- 
Best regards,
Siarhei Siamashka

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [linux-sunxi] Re: A20 with Samsung's SDRAM 'K4B1G1646G BCK0'

2015-05-19 Thread Siarhei Siamashka
On Tue, 19 May 2015 08:20:24 -0700 (PDT)
sufi al hussaini hassani kamili raheemi 
wrote:

> Has anyone tried this specific DRAM (Samsung's SDRAM 'K4B1G1646G BCK0')?

Regarding the "has anyone tried" part of the question, this particular
DDR3 chip does not seem to be very popular, according to the information
from http://linux-sunxi.org/DDR3

However this should not be a problem and DRAM should work just fine.
Assuming that the board itself is not defective.

> I was wondering if someone could provide me with '[dram_para]' for the FEX 
> file for this specific RAM.

The FEX file is not used by U-Boot at all. All the DRAM parameters are
configured in the U-Boot defconfig files. And this is explained at:

http://linux-sunxi.org/Mainline_U-boot#DRAM_Settings

The http://linux-sunxi.org/Fex_Guide#SDRAM section probably needs to
be adjusted and explicitly say that you don't want to touch this stuff
unless using the Allwinner's boot0 bootloader and/or livesuit.

If there is some other part of the wiki with misleading information,
please let us know.

-- 
Best regards,
Siarhei Siamashka

> 
> Thanks.
> 
> On Tuesday, May 19, 2015 at 2:56:30 PM UTC+4, sufi al hussaini hassani 
> kamili raheemi wrote:
> >
> > I have a board that's got A20 with Samsung's SDRAM 'K4B1G1646G BCK0'. 
> >
> > The problem I'm facing now is that I'm not able to get it to boot. I keep 
> > getting the following on debug UART:
> >
> > U-Boot SPL 2014.04-10706-g36080eb (Aug 19 2014 - 16:42:16)
> > DRAM:Timeout initialising DRAM
> >
> > resetting ...
> >
> >  (Repeats infinitely)
> >
> >
> > I suspected that the (old) '[dram_para]' in my FEX file was causing this, 
> > as it was configured for 'K4B4G1646D' (which is widely used).
> > So, I edited the FEX file based on the info I could gather from the 
> > SDRAM's datasheet. It now looks like this:
> >
> >
> > [dram_para]
> > dram_baseaddr = 0x4000
> > dram_clk = 384
> > dram_type = 3
> > dram_rank_num = 1
> > dram_chip_density = 1024
> > dram_io_width = 16
> > dram_bus_width = 32
> > dram_cas = 9
> > dram_zq = 0x7f
> > dram_odt_en = 0
> > dram_size = 256
> > dram_tpr0 = 0x42d899b7
> > dram_tpr1 = 0xa090
> > dram_tpr2 = 0x22a00
> > dram_tpr3 = 0x0
> > dram_tpr4 = 0x0
> > dram_tpr5 = 0x0
> > dram_emr1 = 0x4
> > dram_emr2 = 0x10
> > dram_emr3 = 0x0
> >
> > I tried booting with this but to no avail. The problem persists (same 
> > error).
> >
> > I looked for ways to get the DRAM info directly from the hardware and 
> > found meminfo in sunxi tools. 
> > I was able to compile (and run) it (on a A20 based commercial board), but 
> > I just can't figure out how to get it running on my board.
> >
> > Now, I'm confused- whether just setting the correct values in my FEX would 
> > suffice or would I have to rebuild U-Boot.
> > I would appreciate if someone could point me in the right direction to 
> > solve this problem. 
> >
> > Thanks.
> >

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[linux-sunxi] Re: A20 with Samsung's SDRAM 'K4B1G1646G BCK0'

2015-05-19 Thread sufi al hussaini hassani kamili raheemi
Has anyone tried this specific DRAM (Samsung's SDRAM 'K4B1G1646G BCK0')?
I was wondering if someone could provide me with '[dram_para]' for the FEX 
file for this specific RAM.

Thanks.

On Tuesday, May 19, 2015 at 2:56:30 PM UTC+4, sufi al hussaini hassani 
kamili raheemi wrote:
>
> I have a board that's got A20 with Samsung's SDRAM 'K4B1G1646G BCK0'. 
>
> The problem I'm facing now is that I'm not able to get it to boot. I keep 
> getting the following on debug UART:
>
> U-Boot SPL 2014.04-10706-g36080eb (Aug 19 2014 - 16:42:16)
> DRAM:Timeout initialising DRAM
>
> resetting ...
>
>  (Repeats infinitely)
>
>
> I suspected that the (old) '[dram_para]' in my FEX file was causing this, 
> as it was configured for 'K4B4G1646D' (which is widely used).
> So, I edited the FEX file based on the info I could gather from the 
> SDRAM's datasheet. It now looks like this:
>
>
> [dram_para]
> dram_baseaddr = 0x4000
> dram_clk = 384
> dram_type = 3
> dram_rank_num = 1
> dram_chip_density = 1024
> dram_io_width = 16
> dram_bus_width = 32
> dram_cas = 9
> dram_zq = 0x7f
> dram_odt_en = 0
> dram_size = 256
> dram_tpr0 = 0x42d899b7
> dram_tpr1 = 0xa090
> dram_tpr2 = 0x22a00
> dram_tpr3 = 0x0
> dram_tpr4 = 0x0
> dram_tpr5 = 0x0
> dram_emr1 = 0x4
> dram_emr2 = 0x10
> dram_emr3 = 0x0
>
> I tried booting with this but to no avail. The problem persists (same 
> error).
>
> I looked for ways to get the DRAM info directly from the hardware and 
> found meminfo in sunxi tools. 
> I was able to compile (and run) it (on a A20 based commercial board), but 
> I just can't figure out how to get it running on my board.
>
> Now, I'm confused- whether just setting the correct values in my FEX would 
> suffice or would I have to rebuild U-Boot.
> I would appreciate if someone could point me in the right direction to 
> solve this problem. 
>
> Thanks.
>

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[linux-sunxi] Re: A20 with Samsung's SDRAM 'K4B1G1646G BCK0'

2015-05-19 Thread sufi al hussaini hassani kamili raheemi
I tried building mainline u-boot as you suggested @Hans. Here's what I did 
(please bear with me):

Compiled u-boot (natively on olimex A20-micro):
(Installed dtc first)

> git clone git://git.denx.de/u-boot.git
> make A20-OLinuXino_MICRO_defconfig
> make



Wrote the bootloader files to an SD card using:
> sudo dd if=~/u-boot/u-boot.bin of=/dev/disk2 bs=1024 seek=32 
> sudo dd if=~/u-boot/spl/sunxi-spl.bin of=/dev/disk2 bs=1024 seek=8



However, I still (sadly) get the same error.
U-Boot SPL 2015.07-rc1-00255-g0e6b7a2 (May 19 2015 - 16:55:13)

DRAM:Timeout initialising DRAM

As seen above, this is a recent U-Boot version, so I'm guessing I did 
compile the U-Boot alright.
But, the problem persists and I've run out of ideas. 

Any other suggestions? 
Could there be any other reason (apart from DRAM parameters) that could be 
causing this?

Thanks and regards,
Shoaib.

On Tuesday, May 19, 2015 at 2:56:30 PM UTC+4, sufi al hussaini hassani 
kamili raheemi wrote:
>
> I have a board that's got A20 with Samsung's SDRAM 'K4B1G1646G BCK0'. 
>
> The problem I'm facing now is that I'm not able to get it to boot. I keep 
> getting the following on debug UART:
>
> U-Boot SPL 2014.04-10706-g36080eb (Aug 19 2014 - 16:42:16)
> DRAM:Timeout initialising DRAM
>
> resetting ...
>
>  (Repeats infinitely)
>
>
> I suspected that the (old) '[dram_para]' in my FEX file was causing this, 
> as it was configured for 'K4B4G1646D' (which is widely used).
> So, I edited the FEX file based on the info I could gather from the 
> SDRAM's datasheet. It now looks like this:
>
>
> [dram_para]
> dram_baseaddr = 0x4000
> dram_clk = 384
> dram_type = 3
> dram_rank_num = 1
> dram_chip_density = 1024
> dram_io_width = 16
> dram_bus_width = 32
> dram_cas = 9
> dram_zq = 0x7f
> dram_odt_en = 0
> dram_size = 256
> dram_tpr0 = 0x42d899b7
> dram_tpr1 = 0xa090
> dram_tpr2 = 0x22a00
> dram_tpr3 = 0x0
> dram_tpr4 = 0x0
> dram_tpr5 = 0x0
> dram_emr1 = 0x4
> dram_emr2 = 0x10
> dram_emr3 = 0x0
>
> I tried booting with this but to no avail. The problem persists (same 
> error).
>
> I looked for ways to get the DRAM info directly from the hardware and 
> found meminfo in sunxi tools. 
> I was able to compile (and run) it (on a A20 based commercial board), but 
> I just can't figure out how to get it running on my board.
>
> Now, I'm confused- whether just setting the correct values in my FEX would 
> suffice or would I have to rebuild U-Boot.
> I would appreciate if someone could point me in the right direction to 
> solve this problem. 
>
> Thanks.
>

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[linux-sunxi] Re: A20 with Samsung's SDRAM 'K4B1G1646G BCK0'

2015-05-19 Thread sufi al hussaini hassani kamili raheemi
Thanks for the guidance @Hans. 
I'm trying to build Mainline U-Boot  
now. 
Will post my progress here.

On Tuesday, May 19, 2015 at 2:56:30 PM UTC+4, sufi al hussaini hassani 
kamili raheemi wrote:
>
> I have a board that's got A20 with Samsung's SDRAM 'K4B1G1646G BCK0'. 
>
> The problem I'm facing now is that I'm not able to get it to boot. I keep 
> getting the following on debug UART:
>
> U-Boot SPL 2014.04-10706-g36080eb (Aug 19 2014 - 16:42:16)
> DRAM:Timeout initialising DRAM
>
> resetting ...
>
>  (Repeats infinitely)
>
>
> I suspected that the (old) '[dram_para]' in my FEX file was causing this, 
> as it was configured for 'K4B4G1646D' (which is widely used).
> So, I edited the FEX file based on the info I could gather from the 
> SDRAM's datasheet. It now looks like this:
>
>
> [dram_para]
> dram_baseaddr = 0x4000
> dram_clk = 384
> dram_type = 3
> dram_rank_num = 1
> dram_chip_density = 1024
> dram_io_width = 16
> dram_bus_width = 32
> dram_cas = 9
> dram_zq = 0x7f
> dram_odt_en = 0
> dram_size = 256
> dram_tpr0 = 0x42d899b7
> dram_tpr1 = 0xa090
> dram_tpr2 = 0x22a00
> dram_tpr3 = 0x0
> dram_tpr4 = 0x0
> dram_tpr5 = 0x0
> dram_emr1 = 0x4
> dram_emr2 = 0x10
> dram_emr3 = 0x0
>
> I tried booting with this but to no avail. The problem persists (same 
> error).
>
> I looked for ways to get the DRAM info directly from the hardware and 
> found meminfo in sunxi tools. 
> I was able to compile (and run) it (on a A20 based commercial board), but 
> I just can't figure out how to get it running on my board.
>
> Now, I'm confused- whether just setting the correct values in my FEX would 
> suffice or would I have to rebuild U-Boot.
> I would appreciate if someone could point me in the right direction to 
> solve this problem. 
>
> Thanks.
>

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.