Re: [U-Boot] U-Boot

2018-03-05 Thread Mariano Coromac
I changed fdt_high but got the same result.
I wrote my device tree, added it into the makefile and copy the
sama5d2.config with my board name. I also got rid of all the unnecessary
stuff.
I'm now using the correct .dtb file (in arch/arm/boot/dts/)
My device tree stdout-path does point into my flexcom1 serial port.
Do you see something wrong?
flx1: flexcom@f8038000 {
atmel,flexcom-mode = ;
status = "okay";

uart5: serial@200 {
compatible = "atmel,at91sam9260-usart";
reg = <0x200 0x200>;
interrupts = <19 IRQ_TYPE_LEVEL_HIGH 7>;
#address-cells = <1>;
#size-cells = <0>;
clocks = <_clk>;
pinctrl-names = "default";
pinctrl-0 = <_flx0_default>;
atmel,fifo-size = <16>;
status = "okay";
};
};
Here's a new log if it is of any use:
AT91Bootstrap 3.8.9-00026-gd7a52fb-dirty (miƩ feb 21 10:03:49 CST 2018)

SD/MMC: Image: Read file u-boot.bin to 0x26f0
MMC: Specification Version 1.2
SD/MMC: Done to load image
 MMC:   sdio-host@a000: 0

** Unable to use mmc 0:1 for loading the env **
Using default environment

In:serial@f8038200
Out:   serial@f8038200
Err:   serial@f8038200
stdin
stdout
stderr
Hit any key to stop autoboot:  0
reading p_a5_tab_reva.dtb
26135 bytes read in 18 ms (1.4 MiB/s)
reading zImage
2452336 bytes read in 198 ms (11.8 MiB/s)
## Current stack ends at 0x27b84588 *  kernel: cmdline image address =
0x2200
## Flattened Device Tree blob at 2100
   Booting using the fdt blob at 0x2100
using: FDT
   Loading Device Tree to 27b79000, end 27b82616 ... OK
## Transferring control to Linux (at address 2200)...

Starting kernel ...

As my understanding goes those are the only things I need, my device tree
and the linux image. I think my main problem is that I don't have the
console in my serial port, that's why it appears like it hangs but I'm not
so sure about that.
I also defined the following inside my config file:
CONFIG_DEBUG_UART_PHYS=0xf8038200
CONFIG_DEBUG_UART_VIRT=0xf7038200

Any help would be appreciated.


On Fri, Mar 2, 2018 at 11:58 AM, Nicolas Ferre <nicolas.fe...@microchip.com>
wrote:

> On 01/03/2018 at 20:55, Mariano Coromac wrote:
>
>> I found the problem. In my header file I was reading from eMMC device 1.
>> Not 0. That's why the operations with mmc worked in command line but did
>> not on startup.
>> Please correct me if I'm mistaken but I have a couple questions.
>> 1) Do I need a partition in my eMMC in order to boot the Linux kernel?
>> When I run "mmc part" it shows no partition at all.
>> 2) When U-Boot finishes compiling it generates a .dtb with the name of my
>> custom board. I need to write this file (alongside zImage) inside my eMMC
>> for my Linux Kernel to boot right?
>>
>
> Actually no: the .dtb from U-Boot is for U-Boot to use. For loading the
> Linux kernel, you must use the .dtb that is produced by the compilation of
> the kernel (in arch/arm/boot/dts/)
>
>
>
> When I try to boot the kernel it hangs in here:
>> => boot
>> reading p_a5_tab_reva.dtb
>> 13699 bytes read in 18 ms (743.2 KiB/s)
>> reading zImage
>> 3749624 bytes read in 298 ms (12 MiB/s)
>> ## Flattened Device Tree blob at 2100
>> Booting using the fdt blob at 0x2100
>> Loading Device Tree to 27b7d000, end 27b83582 ... OK
>>
>> Starting kernel ...
>>
>> What do you think of this? Perhaps is regarding the kernel itself or
>> maybe is a UBoot configuration?
>>
>
>
> --
> Nicolas Ferre
>



-- 
Mariano Coromac <https://gps.gt/>
I of Electronics Engineer
mcoro...@stsa.info
+502 41544712
www.gps.gt <http://facebook.com/startracksa>
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] U-Boot

2018-03-01 Thread Mariano Coromac
I found the problem. In my header file I was reading from eMMC device 1.
Not 0. That's why the operations with mmc worked in command line but did
not on startup.
Please correct me if I'm mistaken but I have a couple questions.
1) Do I need a partition in my eMMC in order to boot the Linux kernel?
When I run "mmc part" it shows no partition at all.
2) When U-Boot finishes compiling it generates a .dtb with the name of my
custom board. I need to write this file (alongside zImage) inside my eMMC
for my Linux Kernel to boot right?
When I try to boot the kernel it hangs in here:
=> boot
reading p_a5_tab_reva.dtb
13699 bytes read in 18 ms (743.2 KiB/s)
reading zImage
3749624 bytes read in 298 ms (12 MiB/s)
## Flattened Device Tree blob at 2100
   Booting using the fdt blob at 0x2100
   Loading Device Tree to 27b7d000, end 27b83582 ... OK

Starting kernel ...

What do you think of this? Perhaps is regarding the kernel itself or maybe
is a UBoot configuration?
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] U-Boot

2018-02-28 Thread Mariano Coromac
Yes, for example I did:
=> mmc read 0x 512 1

MMC read: dev # 0, block # 1298, count 1 ... CMD_SEND:16
ARG 0x0200
MMC_RSP_R1,5,6,7  0x0900
CMD_SEND:17
ARG 0x0512
MMC_RSP_R1,5,6,7  0x0900
1 blocks read: OK

Then I tried to write into it like this:
=> mmc write 0x 512 1

MMC write: dev # 0, block # 1298, count 1 ... CMD_SEND:16
ARG 0x0200
MMC_RSP_R1,5,6,7  0x0900
CMD_SEND:24
ARG 0x0512
MMC_RSP_R1,5,6,7  0x0900
CMD_SEND:13
ARG 0x0001
sdhci_send_command: MMC: 0 busy timeout increasing to: 200 ms.
MMC_RSP_R1,5,6,7  0x0900
CURR STATE:4
1 blocks written: OK

What do you think?
I'm reading JEDEC Specification Version 5.0 document maybe it could bring
some insight on what is happening. The driver is supposed to match with any
eMMC but still.

On Tue, Feb 27, 2018 at 7:24 PM, Yang, Wenyou <wenyou.y...@microchip.com>
wrote:

>
> On 2018/2/28 0:55, Mariano Coromac wrote:
>
>> Hmmm, by sequential number do you mean the Specification Version? This
>> one is correct.
>> Here's my eMMC info.
>> => mmc info
>> Device: sdio-host@a000
>> Manufacturer ID: eb
>> OEM: 10d
>> Name: eMMC
>> Tran Speed: 5200
>> Rd Block Len: 512
>> MMC version 5.0
>> High Capacity: Yes
>> Capacity: 3.6 GiB
>> Bus Width: 4-bit
>> Erase Group Size: 512 KiB
>> HC WP Group Size: 8 MiB
>> User Capacity: 3.6 GiB
>> Boot Capacity: 2 MiB ENH
>> RPMB Capacity: 512 KiB ENH
>>
> This is right, did you try the command,
> => mmc read addr blk# cnt
> does it work?
>
> Best Regards,
> Wenyou Yang
>



-- 
Mariano Coromac <https://gps.gt/>
I of Electronics Engineer
mcoro...@stsa.info
+502 41544712
www.gps.gt <http://facebook.com/startracksa>
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] U-Boot

2018-02-27 Thread Mariano Coromac
Hmmm, by sequential number do you mean the Specification Version? This one
is correct.
Here's my eMMC info.
=> mmc info
Device: sdio-host@a000
Manufacturer ID: eb
OEM: 10d
Name: eMMC
Tran Speed: 5200
Rd Block Len: 512
MMC version 5.0
High Capacity: Yes
Capacity: 3.6 GiB
Bus Width: 4-bit
Erase Group Size: 512 KiB
HC WP Group Size: 8 MiB
User Capacity: 3.6 GiB
Boot Capacity: 2 MiB ENH
RPMB Capacity: 512 KiB ENH
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] U-Boot

2018-02-26 Thread Mariano Coromac
Hello Again,
I have been working with UBoot but now when I try to boot my Linux kernel
image that's inside my eMMC it displays the following:
=> boot
CMD_SEND:0
ARG 0x
RET -110
mmc_init: -110, time 10
** Bad device mmc 1 **
CMD_SEND:0
ARG 0x
RET -110
mmc_init: -110, time 11
** Bad device mmc 1 **

I know it is a timeout error and I also know that the error occurs inside
mmc-uclass line 31. I'm aware send_cmd() is defined in mmc.h but I honestly
don't know how to dig deeper into this error.

mmc info works fine. Here's the mmc rescan log if it makes any use:
=> mmc rescan
CMD_SEND:0
ARG 0x
MMC_RSP_NONE
CMD_SEND:8
ARG 0x01AA
RET -110
CMD_SEND:55
ARG 0x
RET -110
CMD_SEND:0
ARG 0x
MMC_RSP_NONE
CMD_SEND:1
ARG 0x
MMC_RSP_R3,4 0x00FF8080
CMD_SEND:1
ARG 0x40360080
MMC_RSP_R3,4 0xC0FF8080
CMD_SEND:2
ARG 0x
MMC_RSP_R2 0xEB010D65
   0x4D4D4320
   0x205000AC
   0x008E7300

DUMPING DATA
000 - EB 01 0D 65
004 - 4D 4D 43 20
008 - 20 50 00 AC
012 - 00 8E 73 00
CMD_SEND:3
ARG 0x0001
MMC_RSP_R1,5,6,7  0x0500
CMD_SEND:9
ARG 0x0001
MMC_RSP_R2 0xD04F0132
   0x0F5903FF
   0xFFEF
   0x8A40

DUMPING DATA
000 - D0 4F 01 32
004 - 0F 59 03 FF
008 - FF FF FF EF
012 - 8A 40 00 00
CMD_SEND:13
ARG 0x0001
MMC_RSP_R1,5,6,7  0x0700
CURR STATE:3
CMD_SEND:7
ARG 0x0001
MMC_RSP_R1,5,6,7  0x0700
CMD_SEND:8
ARG 0x
MMC_RSP_R1,5,6,7  0x0900
CMD_SEND:8
ARG 0x
MMC_RSP_R1,5,6,7  0x0900
CMD_SEND:6
ARG 0x03B90100
MMC_RSP_R1b 0x0800
CMD_SEND:13
ARG 0x0001
MMC_RSP_R1,5,6,7  0x0900
CURR STATE:4
CMD_SEND:8
ARG 0x
MMC_RSP_R1,5,6,7  0x0900
CMD_SEND:6
ARG 0x03B70100
MMC_RSP_R1b 0x0800
CMD_SEND:13
ARG 0x0001
MMC_RSP_R1,5,6,7  0x0900
CURR STATE:4
CMD_SEND:8
ARG 0x
MMC_RSP_R1,5,6,7  0x0900
CMD_SEND:16
ARG 0x0200
MMC_RSP_R1,5,6,7  0x0900
CMD_SEND:17
ARG 0x
MMC_RSP_R1,5,6,7  0x0900

Any guidance would be appreciated.
Thank you.

On Wed, Feb 14, 2018 at 3:27 PM, Mariano Coromac <mcoro...@stsa.info> wrote:

> Forget it guys, I just realized what was wrong.
> reg = <0xf8038200 0x200>;
> Before it was
> reg = <0xf8038200 0x100>;
> So if anyone else (that wants to use the flexcom uart) asks you about this
> now there's another thing you can point to.
> If I encounter another problem or something I'll get back to you.
>



-- 
Mariano Coromac <https://gps.gt/>
I of Electronics Engineer
mcoro...@stsa.info
+502 41544712
www.gps.gt <http://facebook.com/startracksa>
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] U-Boot

2018-02-14 Thread Mariano Coromac
Forget it guys, I just realized what was wrong.
reg = <0xf8038200 0x200>;
Before it was
reg = <0xf8038200 0x100>;
So if anyone else (that wants to use the flexcom uart) asks you about this
now there's another thing you can point to.
If I encounter another problem or something I'll get back to you.
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] U-Boot

2018-02-14 Thread Mariano Coromac
I think I found the root problem for this. I am using a flexcom uart. The
ones that are defined in sama5d2.dtsi are normal uarts, one can use those
definitions alongside the drivers to use uart0 to uart4.
I found a definition to use flexcom, here:
https://github.com/linux4sam/linux-at91/blob/master/Documentation/devicetree/bindings/mfd/atmel-flexcom.txt
The problem I see is that I need a driver also and atmel did not provide
one. Or at least I'm not seeing it because I have search for it around the
entire project.

Could you confirm if my assumptions are correct? Because I see that the
flexcom clocks are defined and makes me wonder if the problem is something
else.
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] U-Boot

2018-02-14 Thread Mariano Coromac
H it displays the following:
  Class   Probed   Name

 root[ + ]root_driver
 simple_bus  [   ]`-- ahb
 mmc [   ]|-- sdio-host@a000
 blk [   ]|   `-- sdio-h...@a000.blk
 mmc [   ]|-- sdio-host@b000
 blk [   ]|   `-- sdio-h...@b000.blk
 simple_bus  [   ]`-- apb
 simple_bus  [   ]|-- pmc@f0014000
 clk [   ]|   |-- mainck
 clk [   ]|   |-- pllack@0
 clk [   ]|   |-- utmick
 clk [   ]|   |-- masterck
 clk [   ]|   |-- h32mxck
 misc[   ]|   |-- periph32ck
 clk [   ]|   |   |-- pioA_clk@18
 clk [   ]|   |   |-- uart0_clk@24
 clk [   ]|   |   |-- uart1_clk@25
 clk [   ]|   |   |-- uart2_clk@26
 clk [   ]|   |   `-- spi0_clk@33
 misc[   ]|   |-- periph64ck
 clk [   ]|   |   |-- sdmmc0_hclk@31
 clk [   ]|   |   |-- sdmmc1_hclk@32
 clk [   ]|   |   |-- qspi0_clk@52
 clk [   ]|   |   `-- qspi1_clk@53
 misc[   ]|   `-- gck
 clk [   ]|   |-- sdmmc0_gclk@31
 clk [   ]|   `-- sdmmc1_gclk@32
 spi [   ]|-- spi@f800
 serial  [   ]|-- serial@f8038200
 gpio[   ]`-- gpio@fc038000
 pinctrl [   ]`-- pinctrl
 pinconfig   [   ]|-- sdmmc0_cmd_dat_default
 pinconfig   [   ]|-- sdmmc0_ck_cd_default
 pinconfig   [   ]|-- sdmmc1_cmd_dat_default
 pinconfig   [   ]|-- sdmmc1_ck_cd_default
 pinconfig   [   ]|-- spi0_default
 pinconfig   [   ]`-- serial0_default
bind node serial@f8038200
   - attempt to match compatible string 'atmel,at91sam9260-usart'
   - found match at 'serial_atmel'
No serial driver found
resetting ...

stdout is declared like this: stdout-path = 
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] U-Boot

2018-02-13 Thread Mariano Coromac
Thank you very much. I expanded the malloc into a bigger number and now I
don't get those errors.
My remaining problem is that I can't seem to move the serial console or
console monitor (I don't know which term is better) into my flexcom1 usart.
It always keep saying:

No serial driver found
resetting ...

I followed the example that Nicolas pointed to (modified the stdout-path,
modified the address, modified the pins, added the serial port into my
device tree, modified all the CONFIGS in my defconfig file) but still I
don't know why it doesn't link.

My device tree is alright because now I see that the drivers do get binded.
If I disable the CONFIG_DEBUG_UART=n nothing gets displayed but if I
activate it, it shows me the message above.
Any idea on how to debug this help would be appreciated.
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] U-Boot

2018-02-13 Thread Mariano Coromac
Thanks for the info. Apparently now the console is redirected but I keep
getting these driver errors:
bind node serial@f8038200
   - attempt to match compatible string 'atmel,at91sam9260-usart'
   - found match at 'serial_atmel'
Error binding driver 'serial_atmel': -12

For what I understand, the drivers are found but not binded. Any idea why?
All the parameters seemed to be correct. I found the function declared in
System.map and u-boot.map
Does this have to do with uclass.c? I don't know if I am correct but that
one is in charge of handling all the drivers.
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] U-Boot

2018-02-12 Thread Mariano Coromac
With that one there is none, I had problems with the other one.
Right now I just want to know how the CONIG parameters like this one:
CONFIG_8xx_CONS_SMC1=
Apply to my SAMA5D2. I already have my debug uart working but not the
monitor console. Therefore I can't even print 'help'.
Also, I'm still having trouble with the drivers as you can see above.
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] U-Boot

2018-02-12 Thread Mariano Coromac
Oh ok.
My main problem is that I DO have debug_uart but I don't have U-Boot main
console.
I already have the configuration on my defconf for the debug UART like this:
CONFIG_DM=y
CONFIG_DM_SERIAL=y
CONFIG_DEBUG_UART=y
CONFIG_DEBUG_UART_ATMEL=y
CONFIG_DEBUG_UART_BASE=0xf8038200
CONFIG_DEBUG_UART_CLOCK=5800
CONFIG_DEBUG_UART_BOARD_INIT=y
CONFIG_DEBUG_UART_ANNOUNCE=y
I cloned from the github repository *https://github.com/linux4sam/u-boot-at91
<https://github.com/linux4sam/u-boot-at91>*
My configuration was derived from the sama5d2_xplained board because I'm
working with a custom one.

On Mon, Feb 12, 2018 at 8:59 AM, Marek Vasut <ma...@denx.de> wrote:

> On 02/12/2018 03:52 PM, Mariano Coromac wrote:
> > Hello, I was hoping you could help me out with something. I just have 2
> > main questions. I am using a SAMA5D27 and I've managed to port
> > AT91Bootloader and I'm currently on U-Boot
>
> U-Boot SPL can bring SAMA5D2 up, you don't need the AT91 bootloader.
>
> > 1. I am trying to use FLEXCOM1 (UART) as the main console of U-Boot but
> > haven't been able to find any documentation saying where or how U-Boot
> > specifies the console port.
>
> $ git grep DEBUG_UART configs/sama5d2*
> configs/sama5d27_som1_ek_mmc_defconfig:CONFIG_DEBUG_UART=y
> configs/sama5d27_som1_ek_mmc_defconfig:CONFIG_DEBUG_UART_ATMEL=y
> configs/sama5d27_som1_ek_mmc_defconfig:CONFIG_DEBUG_UART_BASE=0xf802
> configs/sama5d27_som1_ek_mmc_defconfig:CONFIG_DEBUG_UART_CLOCK=8200
> configs/sama5d27_som1_ek_mmc_defconfig:CONFIG_DEBUG_UART_BOARD_INIT=y
> configs/sama5d27_som1_ek_mmc_defconfig:CONFIG_DEBUG_UART_ANNOUNCE=y
>
> would indicate there's a debug uart which you can use.
>
> I'm adding atmel maintainer to CC and dropping dead contacts.
>
> > 2. When U-Boot tries to boot it gives me these errors:
> >
> > bind node sdio-host@a000
> >- attempt to match compatible string 'atmel,sama5d2-sdhci'
> > No match for node 'sdio-host@a000'
> > bind node sdio-host@b000
> >- attempt to match compatible string 'atmel,sama5d2-sdhci'
> > No match for node 'sdio-host@b000'
> > bind node apb
> >- attempt to match compatible string 'simple-bus'
> >- found match at 'generic_simple_bus'
> > bind node pmc@f0014000
> >- attempt to match compatible string 'atmel,sama5d2-pmc'
> >- found match at 'at91-pmc'
> > bind node mainck
> >- attempt to match compatible string 'atmel,at91sam9x5-clk-main'
> >- found match at 'at91sam9x5-main-osc-clk'
> > bind node pllack@0
> >- attempt to match compatible string 'atmel,sama5d3-clk-pll'
> >- found match at 'at91-plla-clk'
> > bind node utmick
> >- attempt to match compatible string 'atmel,at91sam9x5-clk-utmi'
> > No match for node 'utmick'
> > bind node masterck
> >- attempt to match compatible string 'atmel,at91sam9x5-clk-master'
> >- found match at 'at91-master-clk'
> > bind node h32mxck
> >- attempt to match compatible string 'atmel,sama5d4-clk-h32mx'
> > No match for node 'h32mxck'
> > bind node periph32ck
> >- attempt to match compatible string 'atmel,at91sam9x5-clk-
> peripheral'
> >- found match at 'sam9x5-periph-clk'
> > Cannot create device named 'uart1_clk@25' (err=-12)
> > Error binding driver 'sam9x5-periph-clk': -12
> > bind node periph64ck
> >- attempt to match compatible string 'atmel,at91sam9x5-clk-
> peripheral'
> >- found match at 'sam9x5-periph-clk'
> > Error binding driver 'sam9x5-periph-clk': -12
> > bind node gck
> >- attempt to match compatible string 'atmel,sama5d2-clk-generated'
> > No match for node 'gck'
> > Some drivers failed to bind
> > Error binding driver 'at91-pmc': -12
> > bind node spi@f800
> >- attempt to match compatible string 'atmel,at91rm9200-spi'
> > No match for node 'spi@f800'
> > bind node serial@f8038200
> >- attempt to match compatible string 'atmel,at91sam9260-usart'
> >- found match at 'serial_atmel'
> > Error binding driver 'serial_atmel': -12
> > bind node gpio@fc038000
> >- attempt to match compatible string 'atmel,sama5d2-gpio'
> >- found match at 'gpio_atmel_pio4'
> > Error binding driver 'gpio_atmel_pio4': -12
> > Some drivers failed to bind
> > Error binding driver 'generic_simple_bus': -12
> > Some drivers failed to bind
> > Error binding driver 'generic_simple_bus': -12
> > Some drivers failed to bind
> > initcall sequence 26f20864 failed at call 26f073e4 (err=-12)
> > ### ERROR ### Please RESET the board ###
> >
> > NOTE: On my lists.c file 

Re: [U-Boot] U-Boot

2018-02-12 Thread Mariano Coromac
Sorry, I tried to switch to the upstream repo but it gave some compiling
errors.
I am using the 409952795f8a28d3c266b2b8b2b9eccf46347601 commit from git://
github.com/linux4sam/u-boot-at91.git
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] UART

2018-02-08 Thread Mariano Coromac
Hello, I'm using a sama5d27 SoC and I've already port at91bootloader but
now I'm having trouble with u-boot. When u-boot.bin finishes loading
SD/MMC: Done to load image
But then it says
 No serial driver found
resetting
In my device tree I already defined my usart using FLEXCOM1.
How do I redirect the debug uart into these usart?
Or do you think this has to do with my device tree?
atmel_usart.o does gets generated and the target is defined on the
makefiles.
Thank you, sorry if this has been asked before.
PD: I'm not using any commercial board, is a custom one.
-- 
Mariano Coromac <https://gps.gt/>
I of Electronics Engineer
mcoro...@stsa.info
+502 41544712
www.gps.gt <http://facebook.com/startracksa>
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot