Hi Rogan,

On Sun, Sep 24, 2023 at 5:16 PM Rogan Dawes <ro...@dawes.za.net> wrote:
>
> Hi folks,
>
> I eventually decided that I did need to figure out the DRAM timings for the 
> Micron chip on my board, but I found an easier way than actually 
> "understanding what I'm doing"! :-)
>
> I pulled the vendor U-Boot image off the flash, skipped the appropriate 
> number of bytes until I was actually dealing with a u-boot.sb formatted image 
> (looking for the STMP signature I found in the compiled mainline u-boot), 
> then used the Rockbox project's sbtoelf tool to convert the SB back to two 
> ELF files, the SPL.elf and the u-boot.elf. From there I loaded the SPL.elf 
> into ghidra, then went looking for byte sequences found in 
> arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c to see if I could locate them in 
> the vendor blob. I did, right at the end of the binary, then converted bytes 
> into uint32 sequences so that I could compare with the mxs_dram_vals for 
> CONFIG_MX28.
>
> Did the compare and found a single bit that is different between the two 
> sequences of initialisation values. Literally a 1 to a 0, and that is all. So 
> I built mainline with that change, and an updated iomux_setup because the 
> Wink Hub v1 uses MX28_PAD_I2C0_SCL__DUART_RX and MX28_PAD_I2C0_SDA__DUART_TX 
> for its console pins. i was hoping to see it boot via mxsldr, but 
> unfortunately, I got nothing.

Ideally, you should create a new imx28-wink_defconfig.

For a quick test, besides changing iomux_setup, please make sure that
arch/arm/dts/imx28-evk.dts also has the duart pins changed.

> How can I get the SPL to emit something on the console to confirm it is 
> running? i.e. before the DRAM initialisation?

SPL runs from the internal RAM, and should print something to the
console prior to the DRAM init.

Reply via email to