This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/AM5726: Booting a Custom board with Linux from SD Card

Part Number: AM5726
Other Parts Discussed in Thread: AM5728, , BEAGLEBOARD-X15

Tool/software: Linux

Hi,

We have been developing using the AM5728 IDK dev board and transitioned to bringing a custom board using the AM5726.

It looks like the bootloader is reading an EEPROM for the Board ID.  We did not put an EEPROM on our custom board.  We tried bypassing the Board ID check and forced the 

board to be the AM5728 IDK.  It also looks like it's trying to access the PMIC chip tps65903x chip.  On our custom board, the chip is mapped to I2C2 instead of I2C1.

We are looking into how to remap this in the bootloader.  It also looked like it was trying to load linux from emm1 interface which I think is the eMMC Flash and we want to boot from the SD Card.

We tried forcing the code to boot from mmc0 .

Sample output is below.  Any recommendations or insight into bringing up the board would be appreciated.  

Thanks,

Christine

Output:

could not set LDO1 voltage.
no pinctrl state for default mode
*** Warning - bad CRC, using default environment

reading u-boot.img
reading u-boot.img
reading u-boot.img
reading u-boot.img

CPU : DRA752-GP ES2.0
Model: TI AM5728 BeagleBoard-X15

Board: AM572x IDK REV
DRAM: 2 GiB
OMAP SD/MMC: 0, OMAP SD/MMC: 1
*** Warning - bad CRC, using default environment

tatus=0x116)
Warning: fastboot.board_rev: unknown board revision
GUID Partition Table Header signature is wrong: 0x0 != 0x5452415020494645
part_get_info_efi: *** ERROR: Invalid GPT ***
GUID Partition Table Header signature is wrong: 0x0 != 0x54524150SATA link 0 timeout.
AHCI 0001.030or devices...
Found 0 device(s).
Net: Cou
Hit any key to stop autoboot: 0
i2c_write: error waiting for data ACK (status=0x116)
read error from device: fdf2fa90 register: 0x50!i2c_write: error or waiting for data ACK (status=0x116)
read error from device: fdf2fa90 register: 0x50!i2c_write: error waiting for data ACK (16)
read error from device: fdf2fa90 register: 0x50!Error enabling VMMC supply
i2c_write: error waiting for data ACK (status=0x116)
read error from device: fdf2fa90 register: 0x50!i2c_write: error waiting for data ACK (status=0x116)
read error from dswitch to partitions #0, OK
mmc0(part 0) is current device
i2c_write: error waiting for data ACK (status=0x116)
read error fster: 0x50!Error enabling VMMC supply
Trying to boot Android from eMMC ...
rom device: fdf2fa90 register: 0x50!i2c_write: error waiting for data ACK (status=0x116)
read error from device: fdf2fa90 register: 0x50!Error enabling VMMC supply
mmc - MMC sub system

Usage:
mmc info - display info of the current MMC device
mmc r current mmc device
mmc dev [dev] [part] - show or set current mmc device [partition]
mmc list - lists available devices
mmc{on|off}]] - sets user data area attributes
[gp1|gp2|gp3|gp4 cnt [enh] [wrrel {on|off}]] - general purpose partition
nce it is set to complete.
Power cycling is required to initialize partitions after set to complete.
mmc bootbus dev boot_bot part size MB> <RPMB part size MB>
- Change sizes of boot and RPMB partitions of specified device
mmc partconf dev [boot_aeld and 0 / 1 / 2 are the only valid values.
mmc setdsr <value> - set DSR register value

mmc - MMC sub system

Usage:
mmn
mmc part - lists available partition on current mmc device
mmc dev [dev] [part] - show or set current mmc device [partition]
mmc list - lists available devices
mmc hwpartition [args...] - does hardware partitioning
arguments (sizes ih] [wrrel {on|off}]] - general purpose partition
[check|set|complete] - mode, complete set partitioning completed
WARNIof the specified device
mmc bootpart-resize <dev> <boot part size MB> <RPMB part size MB>
- Change sizes of boot and RPMB paRTITION_CONFIG field of the specified device
mmc rst-function dev value
- Change the RST_n_FUNCTION field of theR register value

Wrong Image Format for bootm command
ERROR: can't get kernel image!

  • Hello Christine,

    Christine Nason said:
    On our custom board, the chip is mapped to I2C2 instead of I2C1.

    You can change the CONFIG_EEPROM_BUS_ADDRESS in menuconfig to fix this.

    ARCH=arm make menuconfig
    ARM architecture  ---> (0) Board EEPROM's I2C bus address



    Christine Nason said:
    It also looked like it was trying to load linux from emm1 interface which I think is the eMMC Flash and we want to boot from the SD Card.
    If the booting from mmc fails, then the board tries to boot from eMMC. To boot from mmc you need to run these commands in U-Boot console.

    => env default -a -f
    => saveenv
    => reset

    Hit any key to stop autoboot:  0

    => run findfdt
    => setenv mmcdev 0
    => run mmcboot

    Best regards,
    Kemal

  • Hi, the PMIC chip is mapped to I2C2 instead of I2C1, not the EEPROM chip.  We don’t have an EEPROM.  Any recommendations for how to change that mapping in the boot loader code?

    Thanks,

    Christine

  • Hello Christine,

    Try this patch.

    cd <Processor SDK>/board-support/u-boot-<version>/
    git apply 0001-AM572IDK-I2C2-pinmux-and-tps659038-DT-change.patch

    Best regards,
    Kemal

  • Hi Kemal,

    We actually have the pin mux made this change on our end.  We weren't sure if the bootloader also uses the device tree or if only Linux uses the device tree.

    It looks like from your answer the bootloader also uses the device tree?

    Thanks,

    Christine

  • Yes. Not all but some drivers where you can see OF_CONTROL and the dtc-parser uses these device tree files while generating the final u-boot.img.

  • Hi Kemal,

    Thanks this is very helpful. I believe that worked because when we mapped the PMIC to I2C2, the IDK board complained.

    Another change on the custom board is UART3 has been mapped to different pins on our board. Still UART3, but now it is mapped to V2 and Y1 (pads uart3_rxd, uart3_txd).

    We are trying to bypass the Board ID on the EEPROM by setting it to "AM572IDK", but the way we are doing this may not be taking everywhere.

    It seems like the Pin Mux set for our board is not being set. It looks like it is being set in the UBoot SPL, but not UBoot. UBoot thinks the board is a X15.

    We did get Linux to begin booting by updating the X15 pin mux to match our configuration. Of course this is a hack and not the right solution.

    Can you provide a recommendation of how you would get around the EEPROM and force the board to be "AM572IDK" for both UBoot and Uboot SPL?

    Thanks,
    Christine
  • Hello Christine,

    Christine Nason said:
    Another change on the custom board is UART3 has been mapped to different pins on our board. Still UART3, but now it is mapped to V2 and Y1 (pads uart3_rxd, uart3_txd).

    You need to setup the new pinmixes in <Processor SDK>/board-support/u-boot-<version>/board/ti/am57xx/mux_data.h file.


    Christine Nason said:
    We are trying to bypass the Board ID on the EEPROM by setting it to "AM572IDK", but the way we are doing this may not be taking everywhere.

    Please use this method, that way the board ID will be taken from everywhere.


    Christine Nason said:
    It seems like the Pin Mux set for our board is not being set. It looks like it is being set in the UBoot SPL, but not UBoot. UBoot thinks the board is a X15.

    Please, see this post.

    Best regards,
    Kemal

  • Hi Kemal,

    Thank you. Your patch worked. The EEPROM was bypassed.