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.

AM5728: Changing EVM LEDs Functionality to Custom Board LEDs

Part Number: AM5728


Hello, 

I want to be able to change the LEDs on the EVM board that signals heartbeat, cpu0, mmc0, and disk activity to my custom board. 

The LEDs are located on gpio3_24 through gpio3_30 on the custom board, and I only want 24, 26, 28, and 30.

Here's what I've done so far: 

In uboot device tree am57xx-beagle-x15-common.dtsi: 

leds {
compatible = "gpio-leds";

led0 {
label = "beagle-x15:usr0";
gpios = <&gpio3 24 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "heartbeat";
default-state = "off";
};

led1 {
label = "beagle-x15:usr1";
gpios = <&gpio3 26 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "cpu0";
default-state = "off";
};

led2 {
label = "beagle-x15:usr2";
gpios = <&gpio3 28 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "mmc0";
default-state = "off";
};

led3 {
label = "beagle-x15:usr3";
gpios = <&gpio3 30 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "disk-activity";
default-state = "off";
};

&gpio3 {
ti,no-reset-on-init;
ti,no-idle-on-init;
};

In mux_data.h I have identified the pins in core_padconf_array_essential_x15[] 

{VIN1A_D20, (M14 | PIN_OUTPUT)},  /* vin1a_d20.gpio3_24 */
 {VIN1A_D21, (M14 | PIN_OUTPUT)},    /* vin1a_d20.gpio3_24 */
 {VIN1A_D22, (M14 | PIN_OUTPUT)},    /* vin1a_d22.gpio3_26 */
 {VIN1A_D23, (M14 | PIN_OUTPUT)},    /* vin1a_d22.gpio3_26 */
 {VIN2A_CLK0, (M14 | PIN_OUTPUT)},   /* vin2a_clk0.gpio3_28 */
 {VIN2A_DE0, (M14 | PIN_OUTPUT)},    /* vin2a_de0.gpio3_29 */
 {VIN2A_FLD0, (M14 | PIN_OUTPUT)},   /* vin2a_fld0.gpio3_30 */
 {VIN2A_HSYNC0, (M11 | PIN_OUTPUT)}, /* vin2a_hsync0.pr1_uart0_cts_n */
Now when I try to boot up from an SD card, this error pops up: 

U-Boot SPL 2019.01-g2bd8328999-dirty (Feb 27 2020 - 19:46:07 -0800)
DRA752-GP ES2.0
** Unable to read file dra7-ipu1-fw.xem4 **
Firmware loading failed
Trying to boot from MMC1
Loading Environment from FAT... *** Warning - bad CRC, using default environment

Loading Environment from MMC... *** Warning - bad CRC, using default environment

However, if I revert back all my changes, I can load the entire uboot and linux kernel just fine.

  • Hi,

    When you mean the error pops up, are you referring to just the message "Unable to read file dra7-ipu1-fw.xem4 " or the u-boot fails to boot.

    If it is the later, I believe you have got the pinmux details wrong. Review this data against your custom board's schematics

    Please try to write to the pinmux registers from userspace (using omapconf) and see if the SD card or UART functionality is broken after that.

    Regards,

    Nikhil D

  • Hey Nikhil, 

    Thanks for the reply! I did mean the latter of u-boot fails to boot! However, do you know what the other error unable read file dra7-ipu1-fw.xem4 is all about? 

    Anyways, I'm not too familiar of how to use omapconf, but I found this guide on git:  

    ./omapconf read [0x<physical address> | <name>]

    Read any OMAP memory address (register), given its 'physical address' or 'name' as listed in TRM.

    ./omapconf write [0x<physical address> | <name>] 0x<value>

    Write 'value' at any OMAP memory address (register), given its 'physical address' or 'name' as listed in TRM.

    ./omapconf set bit [0x<physical address> | <name>] <position>

    Basically, we want to read and write to the registers of the GPIO pins we want to control?

  • Hi,

    You can do something like below

    omapconf write 0x4a003400 0x0004000E

    Find out the register address (typically 0x4a003400 + some offset defiend in the DT) and write the mux mode and input enable bits

    Regards,

    Nikhil D