Initially, I've initialized the sam9x60 and dbgu in the at91 bootstrap -- seems to be no issues there. In the at91 bootstrap I selected the menuconfig option to load u-boot. There appears to be good signal on the external 24mhz clock. The 32768 khz oscillator has a good signals being produced.
My u-boot binary has multiple gzipped dtb files. The dts file compiles with no errors. It appears to extract them when embedded in the binary. I had to be careful with the malloc sizes on the gzip compression but it appears to work.
When control is switched to u-boot in the boot process before relocation I get an error:
Code: Select all
SD/MMC: Image: Read file u-boot.bin to 0x23f00000
MMC: ADMA supported
SD: Card Capacity: High or Extended
SD: Specification Version 3.0X
SD/MMC: Done to load image
�No serial driver found
resetting ...
I dumped the code and it only showed a single root node. I'm under the impression "u-boot,dm-pre-reloc;" would have caused drivers to be loaded in u-boot?
I made a dts file that includes sam9x60.dtsi. Stuff related to the dbgu is like the following from fdtdump -s on the uboot.bin file:
note: I used "[AT]" to get through the spam filter.
Code: Select all
/ {
model = "My test board";
compatible = "vendor,myproject", "microchip,sam9x60", "atmel,at91sam9";
chosen {
stdout-path = "/ahb/apb/serial[AT]fffff200";
i2c0 = "/ahb/apb/flexcom[AT]f801c600";
u-boot,dm-pre-reloc;
};
aliases {
serial0 = "/ahb/apb/serial[AT]fffff200";
gpio0 = "/ahb/apb/gpio[AT]fffff400";
gpio1 = "/ahb/apb/gpio[AT]fffff600";
gpio3 = "/ahb/apb/gpio[AT]fffffa00";
spi0 = "/ahb/apb/spi[AT]f0014000";
u-boot,dm-pre-reloc;
};
flexcom[AT]f801c600 {
compatible = "atmel,sama5d2-flexcom";
reg = <0xf801c000 0x00000200>;
clocks = <0x00000009>;
#address-cells = <0x00000001>;
#size-cells = <0x00000001>;
ranges = <0x00000000 0xf801c000 0x00000800>;
status = "okay";
atmel,flexcom-mode = <0x00000003>;
};
serial[AT]fffff200 {
compatible = "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart";
reg = <0xfffff200 0x00000200>;
clocks = <0x0000000e>;
clock-names = "usart";
status = "okay";
u-boot,dm-pre-reloc;
};
dbgu_clk {
#clock-cells = <0x00000000>;
reg = <0x0000002f>;
u-boot,dm-pre-reloc;
phandle = <0x0000000e>;
};
Code: Select all
baudrate=115200
stderr=serial0[AT]fffff200
stdin=serial0[AT]ffff200
stdout=serial0[AT]fffff200
In flexcom[AT]f801c600, there is a reg with two cell values. The first is the address and the second is size cell of 0x00000200 . How is the size determined? If I look at the datasheet I see a range from 0xF801C000 to 0xF8020000 with an id of 5. Should that be 0x4000 for the second cell? Or is it just the registers needed to access dbgu are only in the first 0x200? If I were to look at the datasheet how would I arrive at the size cell number?
I suspect its something really simple is causing the serial not to load.
