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: U-boot UART setting

Other Parts Discussed in Thread: AM5728, TPS51200, TPIC2810, SN65HVS882, AM5718, PMP, DRA722

SDK = ti-processor-sdk-linux-rt-am57xx-evm-05.03.00.07

u-boot = u-boot-2018.01+gitAUTOINC+313dcd69c2-ge2bc936055

cross compiler = arm-linux-gnueabihf-gcc

----------------------------------------------------------------------------------------------

I have a AM5728 custom board.

I want to change the UART default setting from UART3 to UART2.

My board does not have an eeprom.

1. Pinmux Setting

u-boot/board/ti/am57xx/mux_data.h

const struct pad_conf_entry core_padconf_array_essential_am572x_idk[] = {

...

{UART2_RXD, (M4 | PIN_INPUT)}, /* uart2_rxd.uart2_rxd */
{UART2_TXD, (M4 | PIN_OUTPUT)}, /* uart2_txd.uart2_txd */

...

}

2. Device Tree Setting

u-boot/arch/arm/dts/am57xx-idk-common.dtsi

...

chosen {
stdout-path = &uart2;
};

...

&uart2 {
status = "okay";
};

...

3. board_detect.c

u-boot/board/ti/common/board_detect.c

int __maybe_unused ti_i2c_eeprom_am_get(int bus_addr, int dev_addr)
{

...

if (rc)
strlcpy(ep->name, "AM572IDK", TI_EEPROM_HDR_NAME_LEN + 1);
else
strlcpy(ep->name, am_ep.name, TI_EEPROM_HDR_NAME_LEN + 1);

ep->header = am_ep.header;
ti_eeprom_string_cleanup(ep->name);

...

I want to know if there is something I need to set up besides this part.

  • Hi Sunmin,

    Any particular problem do you have after these uboot changes?
  • I want the boot loader to recognize the AM5728 IDK on my board without an eeprom.

    I want to change the default UART setting from UART3 to UART2.

    UART2 is not output.

    Trying to boot through SD card.

    Please
  • I solved this problem.

    But I do not know why.

    the problem is
    From uboot - * / arch / arm / dtb / omap5-uboot.dtsi

    & uart2 {
    u-boot, dm-spl;
    reg-shift = <2>;
    };
    Not declared.

    I want to know what this dtsi file defines.

    Could you explain the information about this? please

  • Hi Sunmin,

    The u-boot device tree file *-u-boot.dtsi defines u-boot specific DT properties.

    The flag u-boot,dm-spl, which is equivalent to status = "okay" in kernel devicetree, specifies the corresponding DT node, uart2 in this case, is needed for SPL. (hint: not all u-boot DT nodes are needed in SPL stage.)

  • It helped me a lot.

    Thank you.

  • Hi Sunmin Kim, 

    Did it work for you? Am also facing same issue. I want to use UART1 instead of UART3. 

    Thanks and Regards

    Arpita.J

  • Hi, 

    Things to do when changing the UART

    1. pinmux setting

    2. From u-boot - * / arch / arm / dts / am57xx-idk-common.dtsi
    ...
    chosen {
    stdout-path = & uart1;
    };
    ...
    ...
    & uart1 {
    status = "okay";
    interrupts-extended = <& crossbar_mpu GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH
    & dra7_pmx_core 0x3e0>;
    };
    ...


    Must be added.

  • Hi Sunmin Kim,

    We have followed the same as you mentioned ,still facing the same issue .

    we have probed the pin-mux settings and it's observed to be proper for uart1.

    Is there anything else to be followed to get the debug prints in uart1 ?

    Thanks and regards

    Arpita Jena

  • HI, 

    Can I show U-BOOT LOG when booting UART3?

    Also, can you show me the *- common.dtsi file?

  • Hi Sunmin Kim,

    Thank you for the reply.

    WE are using AM571x custom board where only uart1 is conected. EVM we have checked UART3 and its log is attached.

    And we have only am57xx-idk-common.dts in u-boot dts folder and we have done all the configuration in this file. It is also attached.

    ---------------------------------------------------------------------------------------------------------------

    I tried to attach as file. But not able to, so file is copy pasted down

    1) dts file

    /*
    * Copyright (C) 2015-2016 Texas Instruments Incorporated - http://www.ti.com/
    *
    * This program is free software; you can redistribute it and/or modify
    * it under the terms of the GNU General Public License version 2 as
    * published by the Free Software Foundation.
    */

    #include "am57xx-industrial-grade.dtsi"

    / {
    aliases {
    rtc0 = &tps659038_rtc;
    rtc1 = &rtc;
    };

    chosen {
    stdout-path = &uart1;
    };

    vmain: fixedregulator-vmain {
    compatible = "regulator-fixed";
    regulator-name = "VMAIN";
    regulator-min-microvolt = <5000000>;
    regulator-max-microvolt = <5000000>;
    regulator-always-on;
    regulator-boot-on;
    };

    v3_3d: fixedregulator-v3_3d {
    compatible = "regulator-fixed";
    regulator-name = "V3_3D";
    vin-supply = <&smps9_reg>;
    regulator-min-microvolt = <3300000>;
    regulator-max-microvolt = <3300000>;
    regulator-always-on;
    regulator-boot-on;
    };

    vtt_fixed: fixedregulator-vtt {
    /* TPS51200 */
    compatible = "regulator-fixed";
    regulator-name = "vtt_fixed";
    vin-supply = <&v3_3d>;
    regulator-min-microvolt = <3300000>;
    regulator-max-microvolt = <3300000>;
    regulator-always-on;
    regulator-boot-on;
    };

    leds-iio {
    status = "disabled";
    compatible = "gpio-leds";
    led-out0 {
    label = "out0";
    gpios = <&tpic2810 0 GPIO_ACTIVE_HIGH>;
    default-state = "off";
    };

    led-out1 {
    label = "out1";
    gpios = <&tpic2810 1 GPIO_ACTIVE_HIGH>;
    default-state = "off";
    };

    led-out2 {
    label = "out2";
    gpios = <&tpic2810 2 GPIO_ACTIVE_HIGH>;
    default-state = "off";
    };

    led-out3 {
    label = "out3";
    gpios = <&tpic2810 3 GPIO_ACTIVE_HIGH>;
    default-state = "off";
    };

    led-out4 {
    label = "out4";
    gpios = <&tpic2810 4 GPIO_ACTIVE_HIGH>;
    default-state = "off";
    };

    led-out5 {
    label = "out5";
    gpios = <&tpic2810 5 GPIO_ACTIVE_HIGH>;
    default-state = "off";
    };

    led-out6 {
    label = "out6";
    gpios = <&tpic2810 6 GPIO_ACTIVE_HIGH>;
    default-state = "off";
    };

    led-out7 {
    label = "out7";
    gpios = <&tpic2810 7 GPIO_ACTIVE_HIGH>;
    default-state = "off";
    };
    };
    };

    &dra7_pmx_core {
    dcan1_pins_default: dcan1_pins_default {
    pinctrl-single,pins = <
    DRA7XX_CORE_IOPAD(0x37d0, PIN_OUTPUT_PULLUP | MUX_MODE0) /* dcan1_tx */
    DRA7XX_CORE_IOPAD(0x37d4, PIN_INPUT_PULLUP | MUX_MODE0) /* dcan1_rx */
    >;
    };

    dcan1_pins_sleep: dcan1_pins_sleep {
    pinctrl-single,pins = <
    DRA7XX_CORE_IOPAD(0x37d0, MUX_MODE15 | PULL_UP) /* dcan1_tx.off */
    DRA7XX_CORE_IOPAD(0x37d4, MUX_MODE15 | PULL_UP) /* dcan1_rx.off */
    >;
    };
    };

    &i2c1 {
    status = "okay";
    clock-frequency = <400000>;

    tps659038: tps659038@58 {
    compatible = "ti,tps659038";
    reg = <0x58>;
    interrupts-extended = <&gpio6 16 IRQ_TYPE_LEVEL_HIGH
    &dra7_pmx_core 0x418>;
    #interrupt-cells = <2>;
    interrupt-controller;
    ti,system-power-controller;
    ti,palmas-override-powerhold;

    tps659038_pmic {
    compatible = "ti,tps659038-pmic";

    smps12-in-supply = <&vmain>;
    smps3-in-supply = <&vmain>;
    smps45-in-supply = <&vmain>;
    smps6-in-supply = <&vmain>;
    smps7-in-supply = <&vmain>;
    smps8-in-supply = <&vmain>;
    smps9-in-supply = <&vmain>;
    ldo1-in-supply = <&vmain>;
    ldo2-in-supply = <&vmain>;
    ldo3-in-supply = <&vmain>;
    ldo4-in-supply = <&vmain>;
    ldo9-in-supply = <&vmain>;
    ldoln-in-supply = <&vmain>;
    ldousb-in-supply = <&vmain>;
    ldortc-in-supply = <&vmain>;

    regulators {
    smps12_reg: smps12 {
    /* VDD_MPU */
    regulator-name = "smps12";
    regulator-min-microvolt = <850000>;
    regulator-max-microvolt = <1250000>;
    regulator-always-on;
    regulator-boot-on;
    };

    smps3_reg: smps3 {
    /* VDD_DDR EMIF1 EMIF2 */
    regulator-name = "smps3";
    regulator-min-microvolt = <1350000>;
    regulator-max-microvolt = <1350000>;
    regulator-always-on;
    regulator-boot-on;
    };

    smps45_reg: smps45 {
    /* VDD_DSPEVE on AM572 */
    /* VDD_IVA + VDD_DSP on AM571 */
    regulator-name = "smps45";
    regulator-min-microvolt = <850000>;
    regulator-max-microvolt = <1250000>;
    regulator-always-on;
    regulator-boot-on;
    };

    smps6_reg: smps6 {
    /* VDD_GPU */
    regulator-name = "smps6";
    regulator-min-microvolt = <850000>;
    regulator-max-microvolt = <1250000>;
    regulator-always-on;
    regulator-boot-on;
    };

    smps7_reg: smps7 {
    /* VDD_CORE */
    regulator-name = "smps7";
    regulator-min-microvolt = <850000>;
    regulator-max-microvolt = <1150000>;
    regulator-always-on;
    regulator-boot-on;
    };

    smps8_reg: smps8 {
    /* 5728 - VDD_IVAHD */
    /* 5718 - N.C. test point */
    regulator-name = "smps8";
    };

    smps9_reg: smps9 {
    /* VDD_3_3D */
    regulator-name = "smps9";
    regulator-min-microvolt = <3300000>;
    regulator-max-microvolt = <3300000>;
    regulator-always-on;
    regulator-boot-on;
    };

    ldo1_reg: ldo1 {
    /* VDDSHV8 - VSDMMC */
    /* NOTE: on rev 1.3a, data supply */
    regulator-name = "ldo1";
    regulator-min-microvolt = <1800000>;
    regulator-max-microvolt = <3300000>;
    regulator-boot-on;
    regulator-always-on;
    };

    ldo2_reg: ldo2 {
    /* VDDSH18V */
    regulator-name = "ldo2";
    regulator-min-microvolt = <1800000>;
    regulator-max-microvolt = <1800000>;
    regulator-always-on;
    regulator-boot-on;
    };

    ldo3_reg: ldo3 {
    /* R1.3a 572x V1_8PHY_LDO3: USB, SATA */
    regulator-name = "ldo3";
    regulator-min-microvolt = <1800000>;
    regulator-max-microvolt = <1800000>;
    regulator-always-on;
    regulator-boot-on;
    };

    ldo4_reg: ldo4 {
    /* R1.3a 572x V1_8PHY_LDO4: PCIE, HDMI*/
    regulator-name = "ldo4";
    regulator-min-microvolt = <1800000>;
    regulator-max-microvolt = <1800000>;
    regulator-always-on;
    regulator-boot-on;
    };

    /* LDO5-8 unused */

    ldo9_reg: ldo9 {
    /* VDD_RTC */
    regulator-name = "ldo9";
    regulator-min-microvolt = <840000>;
    regulator-max-microvolt = <1160000>;
    regulator-always-on;
    regulator-boot-on;
    };

    ldoln_reg: ldoln {
    /* VDDA_1V8_PLL */
    regulator-name = "ldoln";
    regulator-min-microvolt = <1800000>;
    regulator-max-microvolt = <1800000>;
    regulator-always-on;
    regulator-boot-on;
    };

    ldousb_reg: ldousb {
    /* VDDA_3V_USB: VDDA_USBHS33 */
    regulator-name = "ldousb";
    regulator-min-microvolt = <3300000>;
    regulator-max-microvolt = <3300000>;
    regulator-always-on;
    regulator-boot-on;
    };

    ldortc_reg: ldortc {
    /* VDDA_RTC */
    regulator-name = "ldortc";
    regulator-min-microvolt = <1800000>;
    regulator-max-microvolt = <1800000>;
    regulator-always-on;
    regulator-boot-on;
    };

    regen1: regen1 {
    /* VDD_3V3_ON */
    regulator-name = "regen1";
    regulator-boot-on;
    regulator-always-on;
    };

    regen2: regen2 {
    /* Needed for PMIC internal resource */
    regulator-name = "regen2";
    regulator-boot-on;
    regulator-always-on;
    };
    };
    };

    tps659038_rtc: tps659038_rtc {
    compatible = "ti,palmas-rtc";
    interrupt-parent = <&tps659038>;
    interrupts = <8 IRQ_TYPE_EDGE_FALLING>;
    wakeup-source;
    };

    tps659038_pwr_button: tps659038_pwr_button {
    compatible = "ti,palmas-pwrbutton";
    interrupt-parent = <&tps659038>;
    interrupts = <1 IRQ_TYPE_EDGE_FALLING>;
    wakeup-source;
    ti,palmas-long-press-seconds = <12>;
    };

    tps659038_gpio: tps659038_gpio {
    compatible = "ti,palmas-gpio";
    gpio-controller;
    #gpio-cells = <2>;
    };

    extcon_usb2: tps659038_usb {
    compatible = "ti,palmas-usb-vid";
    ti,enable-vbus-detection;
    ti,enable-id-detection;
    /* ID & VBUS GPIOs provided in board dts */
    };
    };

    tpic2810: tpic2810@60 {
    compatible = "ti,tpic2810";
    reg = <0x60>;
    gpio-controller;
    #gpio-cells = <2>;
    };
    };

    &mcspi3 {
    status = "okay";
    ti,pindir-d0-out-d1-in;

    sn65hvs882: sn65hvs882@0 {
    compatible = "pisosr-gpio";
    gpio-controller;
    #gpio-cells = <2>;

    reg = <0>;
    spi-max-frequency = <1000000>;
    spi-cpol;
    };
    };

    &uart1 {
    status = "okay";
    interrupts-extended = <&crossbar_mpu GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH
    &dra7_pmx_core 0x3e0>;
    };

    &rtc {
    status = "okay";
    ext-clk-src;
    };

    &mac {
    status = "okay";
    dual_emac;
    };

    &cpsw_emac0 {
    phy_id = <&davinci_mdio>, <0>;
    phy-mode = "rgmii";
    dual_emac_res_vlan = <1>;
    };

    &cpsw_emac1 {
    phy_id = <&davinci_mdio>, <1>;
    phy-mode = "rgmii";
    dual_emac_res_vlan = <2>;
    };

    &usb2_phy1 {
    phy-supply = <&ldousb_reg>;
    };

    &usb2_phy2 {
    phy-supply = <&ldousb_reg>;
    };

    &usb1 {
    dr_mode = "host";
    };

    &usb2 {
    dr_mode = "peripheral";
    };

    &mmc1 {
    status = "okay";
    vmmc-supply = <&v3_3d>;
    vqmmc-supply = <&ldo1_reg>;
    bus-width = <4>;
    cd-gpios = <&gpio6 27 GPIO_ACTIVE_LOW>; /* gpio 219 */
    };

    &mmc2 {
    status = "okay";
    vmmc-supply = <&v3_3d>;
    bus-width = <8>;
    ti,non-removable;
    max-frequency = <96000000>;
    no-1-8-v;
    /delete-property/ mmc-hs200-1_8v;
    };

    &dcan1 {
    status = "okay";
    pinctrl-names = "default", "sleep", "active";
    pinctrl-0 = <&dcan1_pins_sleep>;
    pinctrl-1 = <&dcan1_pins_sleep>;
    pinctrl-2 = <&dcan1_pins_default>;
    };

    &qspi {
    status = "okay";

    spi-max-frequency = <76800000>;
    m25p80@0 {
    compatible = "s25fl256s1", "jedec,spi-nor";
    spi-max-frequency = <76800000>;
    reg = <0>;
    spi-tx-bus-width = <1>;
    spi-rx-bus-width = <4>;
    #address-cells = <1>;
    #size-cells = <1>;

    /* MTD partition table.
    * The ROM checks the first four physical blocks
    * for a valid file to boot and the flash here is
    * 64KiB block size.
    */
    partition@0 {
    label = "QSPI.SPL";
    reg = <0x00000000 0x000040000>;
    };
    partition@1 {
    label = "QSPI.u-boot";
    reg = <0x00040000 0x00100000>;
    };
    partition@2 {
    label = "QSPI.u-boot-spl-os";
    reg = <0x00140000 0x00080000>;
    };
    partition@3 {
    label = "QSPI.u-boot-env";
    reg = <0x001c0000 0x00010000>;
    };
    partition@4 {
    label = "QSPI.u-boot-env.backup1";
    reg = <0x001d0000 0x0010000>;
    };
    partition@5 {
    label = "QSPI.kernel";
    reg = <0x001e0000 0x0800000>;
    };
    partition@6 {
    label = "QSPI.file-system";
    reg = <0x009e0000 0x01620000>;
    };
    };
    };

    --------------------------------------------------------------------------------------------------------------------

    2) UART3 print log on EVM


    U-Boot SPL 2018.01-00444-g17164f4-dirty (Nov 21 2018 - 10:49:50)
    DRA722-GP ES2.0
    Trying to boot from MMC1
    no pinctrl state for default mode
    no pinctrl state for default mode


    U-Boot 2018.01-00444-g17164f4-dirty (Nov 21 2018 - 10:49:50 +0530)

    CPU : DRA722-GP ES2.0
    Model: TI AM5718 IDK
    Board: AM571x IDK REV 1.3B
    DRAM: 1 GiB
    MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
    GUID Partition Table Header signature is wrong: 0x0 != 0x5452415020494645
    part_get_info_efi: *** ERROR: Invalid GPT ***
    GUID Partition Table Header signature is wrong: 0x0 != 0x5452415020494645
    part_get_info_efi: *** ERROR: Invalid Backup GPT ***
    SCSI: SATA link 0 timeout.
    AHCI 0001.0300 32 slots 1 ports 3 Gbps 0x1 impl SATA mode
    flags: 64bit ncq stag pm led clo only pmp pio slum part ccc apst 
    scanning bus for devices...
    Found 0 device(s).
    Net: eth0: ethernet@48484000
    Hit any key to stop autoboot: 0 
    switch to partitions #0, OK
    mmc0 is current device
    1490 bytes read in 4 ms (363.3 KiB/s)
    Importing environment from mmc0 ...
    4010496 bytes read in 332 ms (11.5 MiB/s)
    96953 bytes read in 56 ms (1.7 MiB/s)
    ## Flattened Device Tree blob at 88000000
    Booting using the fdt blob at 0x88000000
    Loading Device Tree to 8ffe5000, end 8ffffab8 ... OK

    Starting kernel ...

    [ 0.000000] Booting Linux on physical CPU 0x0
    [ 0.000000] Linux version 4.14.67-gd315a9bb00 (root@ubuntu-Vostro-2520) (gcc version 7.2.1 20171011 (Linaro GCC 7.2-2017.11)) #4 SMP PREEMPT Wed Mar 27 15:18:27 IST 2019
    [ 0.000000] CPU: ARMv7 Processor [412fc0f2] revision 2 (ARMv7), cr=30c5387d
    [ 0.000000] CPU: div instructions available: patching division code
    [ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache
    [ 0.000000] OF: fdt: Machine model: TI AM5718 IDK
    [ 0.000000] Memory policy: Data cache writealloc
    [ 0.000000] efi: Getting EFI parameters from FDT:
    [ 0.000000] efi: UEFI not found.
    [ 0.000000] Reserved memory: created CMA memory pool at 0x0000000095800000, size 56 MiB
    [ 0.000000] OF: reserved mem: initialized node ipu2-memory@95800000, compatible id shared-dma-pool
    [ 0.000000] Reserved memory: created CMA memory pool at 0x0000000099000000, size 64 MiB
    [ 0.000000] OF: reserved mem: initialized node dsp1-memory@99000000, compatible id shared-dma-pool
    [ 0.000000] Reserved memory: created CMA memory pool at 0x000000009d000000, size 32 MiB
    [ 0.000000] OF: reserved mem: initialized node ipu1-memory@9d000000, compatible id shared-dma-pool
    [ 0.000000] cma: Reserved 128 MiB at 0x00000000b7c00000
    [ 0.000000] OMAP4: Map 0x00000000bfd00000 to fe600000 for dram barrier
    [ 0.000000] DRA722 ES2.0
    [ 0.000000] percpu: Embedded 15 pages/cpu @ef649000 s31308 r8192 d21940 u61440
    [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 210496
    [ 0.000000] Kernel command line: console=ttyO2,115200n8 cma=128MiB root=PARTUUID=d88907e8-02 rw rootfstype=ext4 rootwait
    [ 0.000000] PID hash table entries: 4096 (order: 2, 16384 bytes)
    [ 0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
    [ 0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
    [ 0.000000] Memory: 538068K/848896K available (8192K kernel code, 346K rwdata, 2552K rodata, 2048K init, 299K bss, 24108K reserved, 286720K cma-reserved, 128000K highmem)
    [ 0.000000] Virtual kernel memory layout:
    [ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
    [ 0.000000] fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
    [ 0.000000] vmalloc : 0xf0800000 - 0xff800000 ( 240 MB)
    [ 0.000000] lowmem : 0xc0000000 - 0xf0000000 ( 768 MB)
    [ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
    [ 0.000000] modules : 0xbf000000 - 0xbfe00000 ( 14 MB)
    [ 0.000000] .text : 0xc0008000 - 0xc0a00000 (10208 kB)
    [ 0.000000] .init : 0xc0e00000 - 0xc1000000 (2048 kB)
    [ 0.000000] .data : 0xc1000000 - 0xc1056ba8 ( 347 kB)
    [ 0.000000] .bss : 0xc1058000 - 0xc10a2c3c ( 300 kB)
    [ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
    [ 0.000000] Preemptible hierarchical RCU implementation.
    [ 0.000000] RCU restricting CPUs from NR_CPUS=2 to nr_cpu_ids=1.
    [ 0.000000] Tasks RCU enabled.
    [ 0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
    [ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
    [ 0.000000] GIC: Using split EOI/Deactivate mode
    [ 0.000000] OMAP clockevent source: timer1 at 32786 Hz
    [ 0.000000] arch_timer: cp15 timer(s) running at 6.14MHz (phys).
    [ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x16af5adb9, max_idle_ns: 440795202250 ns
    [ 0.000005] sched_clock: 56 bits at 6MHz, resolution 162ns, wraps every 4398046511023ns
    [ 0.000016] Switching to timer-based delay loop, resolution 162ns
    [ 0.000340] clocksource: 32k_counter: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 58327039986419 ns
    [ 0.000348] OMAP clocksource: 32k_counter at 32768 Hz
    [ 0.000787] Console: colour dummy device 80x30
    [ 0.000804] WARNING: Your 'console=ttyO2' has been replaced by 'ttyS2'
    [ 0.000811] This ensures that you still see kernel messages. Please
    [ 0.000818] update your kernel commandline.
    [ 0.000837] Calibrating delay loop (skipped), value calculated using timer frequency.. 12.29 BogoMIPS (lpj=61475)
    [ 0.000852] pid_max: default: 32768 minimum: 301
    [ 0.000975] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
    [ 0.000988] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
    [ 0.001499] CPU: Testing write buffer coherency: ok
    [ 0.001720] /cpus/cpu@0 missing clock-frequency property
    [ 0.001734] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
    [ 0.039856] Setting up static identity map for 0x80200000 - 0x80200060
    [ 0.059861] Hierarchical SRCU implementation.
    [ 0.080047] EFI services will not be available.
    [ 0.099922] smp: Bringing up secondary CPUs ...
    [ 0.099932] smp: Brought up 1 node, 1 CPU
    [ 0.099942] SMP: Total of 1 processors activated (12.29 BogoMIPS).
    [ 0.099949] CPU: All CPU(s) started in HYP mode.
    [ 0.099956] CPU: Virtualization extensions available.
    [ 0.100360] devtmpfs: initialized
    [ 0.117550] random: get_random_u32 called from bucket_table_alloc+0x108/0x230 with crng_init=0
    [ 0.120081] VFP support v0.3: implementor 41 architecture 4 part 30 variant f rev 0
    [ 0.120279] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
    [ 0.120296] futex hash table entries: 256 (order: 2, 16384 bytes)
    [ 0.125974] pinctrl core: initialized pinctrl subsystem
    [ 0.126470] DMI not present or invalid.
    [ 0.126717] NET: Registered protocol family 16
    [ 0.130844] DMA: preallocated 256 KiB pool for atomic coherent allocations
    [ 0.131698] omap_hwmod: l3_main_2 using broken dt data from ocp
    [ 0.325656] cpuidle: using governor ladder
    [ 0.325690] cpuidle: using governor menu
    [ 0.333963] OMAP GPIO hardware version 0.1
    [ 0.360487] No ATAGs?
    [ 0.360531] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
    [ 0.360545] hw-breakpoint: maximum watchpoint size is 8 bytes.
    [ 0.360929] omap4_sram_init:Unable to allocate sram needed to handle errata I688
    [ 0.360940] omap4_sram_init:Unable to get sram pool needed to handle errata I688
    [ 0.361472] OMAP DMA hardware revision 0.0
    [ 0.392285] edma 43300000.edma: memcpy is disabled
    [ 0.395426] edma 43300000.edma: TI EDMA DMA engine driver
    [ 0.402074] omap-dma-engine 4a056000.dma-controller: OMAP DMA engine driver (LinkedList1/2/3 supported)
    [ 0.405367] omap-iommu 40d01000.mmu: 40d01000.mmu registered
    [ 0.405572] omap-iommu 40d02000.mmu: 40d02000.mmu registered
    [ 0.405805] omap-iommu 58882000.mmu: 58882000.mmu registered
    [ 0.406045] omap-iommu 55082000.mmu: 55082000.mmu registered
    [ 0.406337] iommu: Adding device 58820000.ipu to group 1
    [ 0.406411] iommu: Adding device 55020000.ipu to group 2
    [ 0.406546] iommu: Adding device 40800000.dsp to group 0
    [ 0.408926] palmas 0-0058: Irq flag is 0x00000004
    [ 0.432918] palmas 0-0058: Muxing GPIO 2f, PWM 0, LED 0
    [ 0.434579] SMPS12: supplied by regulator-dummy
    [ 0.436352] SMPS3: supplied by VMAIN
    [ 0.437959] SMPS45: supplied by regulator-dummy
    [ 0.439849] SMPS6: supplied by VMAIN
    [ 0.441596] SMPS7: supplied by VMAIN
    [ 0.443483] SMPS8: supplied by VMAIN
    [ 0.444774] SMPS9: supplied by VMAIN
    [ 0.445774] LDO1: supplied by VMAIN
    [ 0.446141] random: fast init done
    [ 0.451299] LDO2: supplied by VMAIN
    [ 0.461153] LDO3: supplied by VMAIN
    [ 0.471164] LDO4: supplied by VMAIN
    [ 0.481161] LDO5: supplied by regulator-dummy
    [ 0.481882] LDO6: supplied by regulator-dummy
    [ 0.482585] LDO7: supplied by regulator-dummy
    [ 0.483296] LDO8: supplied by regulator-dummy
    [ 0.484031] LDO9: supplied by VMAIN
    [ 0.491523] LDOLN: supplied by VMAIN
    [ 0.501206] LDOUSB: supplied by VMAIN
    [ 0.513997] omap_i2c 48070000.i2c: bus 0 rev0.12 at 400 kHz
    [ 0.514200] media: Linux media interface: v0.10
    [ 0.514240] Linux video capture interface: v2.00
    [ 0.514318] pps_core: LinuxPPS API ver. 1 registered
    [ 0.514326] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
    [ 0.514345] PTP clock support registered
    [ 0.514372] EDAC MC: Ver: 3.0.0
    [ 0.520692] dmi: Firmware registration failed.
    [ 0.521112] omap-mailbox 48840000.mailbox: omap mailbox rev 0x400
    [ 0.521316] omap-mailbox 48842000.mailbox: omap mailbox rev 0x400
    [ 0.521652] Advanced Linux Sound Architecture Driver Initialized.
    [ 0.530767] clocksource: Switched to clocksource arch_sys_counter
    [ 0.538069] NET: Registered protocol family 2
    [ 0.538603] TCP established hash table entries: 8192 (order: 3, 32768 bytes)
    [ 0.538667] TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
    [ 0.538794] TCP: Hash tables configured (established 8192 bind 8192)
    [ 0.538864] UDP hash table entries: 512 (order: 2, 16384 bytes)
    [ 0.538896] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
    [ 0.539014] NET: Registered protocol family 1
    [ 0.559373] RPC: Registered named UNIX socket transport module.
    [ 0.559384] RPC: Registered udp transport module.
    [ 0.559391] RPC: Registered tcp transport module.
    [ 0.559398] RPC: Registered tcp NFSv4.1 backchannel transport module.
    [ 0.560329] hw perfevents: no interrupt-affinity property for /pmu, guessing.
    [ 0.560455] hw perfevents: enabled with armv7_cortex_a15 PMU driver, 7 counters available
    [ 0.561475] workingset: timestamp_bits=14 max_order=18 bucket_order=4
    [ 0.565471] squashfs: version 4.0 (2009/01/31) Phillip Lougher
    [ 0.576026] NFS: Registering the id_resolver key type
    [ 0.576050] Key type id_resolver registered
    [ 0.576058] Key type id_legacy registered
    [ 0.576096] ntfs: driver 2.1.32 [Flags: R/O].
    [ 0.577738] bounce: pool size: 64 pages
    [ 0.577782] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 245)
    [ 0.577792] io scheduler noop registered
    [ 0.577801] io scheduler deadline registered
    [ 0.577947] io scheduler cfq registered (default)
    [ 0.577956] io scheduler mq-deadline registered
    [ 0.577964] io scheduler kyber registered
    [ 0.583631] pinctrl-single 4a003400.pinmux: 282 pins at pa fc003400 size 1128
    [ 0.583780] pinctrl-single 4a002e8c.pinmux: please update dts to use #pinctrl-cells = <1>
    [ 0.583854] pinctrl-single 4a002e8c.pinmux: initialized with no interrupts
    [ 0.583865] pinctrl-single 4a002e8c.pinmux: 1 pins at pa fc002e8c size 4
    [ 0.596475] dra7-pcie 51000000.pcie: Linked as a consumer to phy-4a094000.pciephy.3
    [ 0.596856] OF: PCI: host bridge /ocp/axi@0/pcie@51000000 ranges:
    [ 0.596892] OF: PCI: IO 0x20003000..0x20012fff -> 0x00000000
    [ 0.596915] OF: PCI: MEM 0x20013000..0x2fffffff -> 0x20013000
    [ 1.597177] dra7-pcie 51000000.pcie: phy link never came up
    [ 1.597314] dra7-pcie 51000000.pcie: PCI host bridge to bus 0000:00
    [ 1.597328] pci_bus 0000:00: root bus resource [bus 00-ff]
    [ 1.597339] pci_bus 0000:00: root bus resource [io 0x0000-0xffff]
    [ 1.597349] pci_bus 0000:00: root bus resource [mem 0x20013000-0x2fffffff]
    [ 1.597660] PCI: bus0: Fast back to back transfers disabled
    [ 1.597749] PCI: bus1: Fast back to back transfers enabled
    [ 1.597786] pci 0000:00:00.0: BAR 0: assigned [mem 0x20100000-0x201fffff 64bit]
    [ 1.597804] pci 0000:00:00.0: PCI bridge to [bus 01-ff]
    [ 1.598123] pcieport 0000:00:00.0: Signaling PME with IRQ 170
    [ 1.598245] pcieport 0000:00:00.0: AER enabled with IRQ 170
    [ 1.601085] V3_3D: supplied by smps9
    [ 1.601362] vtt_fixed: supplied by V3_3D
    [ 1.642443] Serial: 8250/16550 driver, 10 ports, IRQ sharing disabled
    [ 1.645033] 48020000.serial: ttyS2 at MMIO 0x48020000 (irq = 45, base_baud = 3000000) is a 8250
    [ 2.684588] console [ttyS2] enabled
    [ 2.689961] omap_rng 48090000.rng: Random Number Generator ver. 20
    [ 2.697052] DSS: OMAP DSS rev 6.1
    [ 2.702028] omapdss_dss 58000000.dss: bound 58001000.dispc (ops dispc_component_ops)
    [ 2.710483] omapdss_dss 58000000.dss: bound 58040000.encoder (ops hdmi5_component_ops)
    [ 2.730265] brd: module loaded
    [ 2.738754] loop: module loaded
    [ 2.745837] m25p80 spi0.0: s25fl256s1 (32768 Kbytes)
    [ 2.750969] 7 ofpart partitions found on MTD device spi0.0
    [ 2.756478] Creating 7 MTD partitions on "spi0.0":
    [ 2.761311] 0x000000000000-0x000000040000 : "QSPI.SPL"
    [ 2.767159] 0x000000040000-0x000000140000 : "QSPI.u-boot"
    [ 2.773202] 0x000000140000-0x0000001c0000 : "QSPI.u-boot-spl-os"
    [ 2.779844] 0x0000001c0000-0x0000001d0000 : "QSPI.u-boot-env"
    [ 2.786238] 0x0000001d0000-0x0000001e0000 : "QSPI.u-boot-env.backup1"
    [ 2.793326] 0x0000001e0000-0x0000009e0000 : "QSPI.kernel"
    [ 2.799340] 0x0000009e0000-0x000002000000 : "QSPI.file-system"
    [ 2.806381] libphy: Fixed MDIO Bus: probed
    [ 2.870800] davinci_mdio 48485000.mdio: davinci mdio revision 1.6, bus freq 1000000
    [ 2.878495] davinci_mdio 48485000.mdio: detected phy mask fffffffc
    [ 2.899501] libphy: 48485000.mdio: probed
    [ 2.903588] davinci_mdio 48485000.mdio: phy[0]: device 48485000.mdio:00, driver Micrel KSZ9031 Gigabit PHY
    [ 2.913325] davinci_mdio 48485000.mdio: phy[1]: device 48485000.mdio:01, driver Micrel KSZ9031 Gigabit PHY
    [ 2.923856] cpsw 48484000.ethernet: Detected MACID = 9c:1d:58:59:c2:f2
    [ 2.930465] cpsw 48484000.ethernet: initialized cpsw ale version 1.4
    [ 2.936898] cpsw 48484000.ethernet: ALE Table size 1024
    [ 2.942194] cpsw 48484000.ethernet: device node lookup for pps timer failed
    [ 2.949223] cpsw 48484000.ethernet: cpts: overflow check period 500 (jiffies)
    [ 2.957099] cpsw 48484000.ethernet: cpsw: Detected MACID = 9c:1d:58:59:c2:f3
    [ 2.965324] i2c /dev entries driver
    [ 2.969512] IR NEC protocol handler initialized
    [ 2.974089] IR RC5(x/sz) protocol handler initialized
    [ 2.979161] IR RC6 protocol handler initialized
    [ 2.983723] IR JVC protocol handler initialized
    [ 2.988270] IR Sony protocol handler initialized
    [ 2.993253] IR SANYO protocol handler initialized
    [ 2.997977] IR Sharp protocol handler initialized
    [ 3.002716] IR MCE Keyboard/mouse protocol handler initialized
    [ 3.008573] IR XMP protocol handler initialized
    [ 3.018433] sdhci: Secure Digital Host Controller Interface driver
    [ 3.024746] sdhci: Copyright(c) Pierre Ossman
    [ 3.030183] sdhci-pltfm: SDHCI platform and OF driver helper
    [ 3.036599] sdhci-omap 4809c000.mmc: Got CD GPIO
    [ 3.042002] sdhci-omap 4809c000.mmc: no pinctrl state for ddr_1_8v mode
    [ 3.048645] sdhci-omap 4809c000.mmc: no pinctrl state for hs200_1_8v mode
    [ 3.110989] mmc0: SDHCI controller on 4809c000.mmc [4809c000.mmc] using ADMA
    [ 3.159198] mmc0: host does not support reading read-only switch, assuming write-enable
    [ 3.170391] mmc0: new high speed SDHC card at address 0007
    [ 3.176267] mmcblk0: mmc0:0007 SD16G 14.9 GiB 
    [ 3.180811] mmc1: SDHCI controller on 480b4000.mmc [480b4000.mmc] using ADMA
    [ 3.182239] ledtrig-cpu: registered to indicate activity on CPUs
    [ 3.185871] NET: Registered protocol family 10
    [ 3.204265] Segment Routing with IPv6
    [ 3.204312] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
    [ 3.204690] NET: Registered protocol family 17
    [ 3.204851] Key type dns_resolver registered
    [ 3.204971] omap_voltage_late_init: Voltage driver support not added
    [ 3.204974] Power Management for TI OMAP4+ devices.
    [ 3.205187] Registering SWP/SWPB emulation handler
    [ 3.230082] dmm 4e000000.dmm: workaround for errata i878 in use
    [ 3.241772] dmm 4e000000.dmm: initialized all PAT entries
    [ 3.252834] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
    [ 3.252837] [drm] No driver support for vblank timestamp query.
    [ 3.252864] [drm] Cannot find any crtc or sizes
    [ 3.253635] [drm] Initialized omapdrm 1.0.0 20110917 for omapdrm.0 on minor 0
    [ 3.290187] NOHZ: local_softirq_pending 40
    [ 3.294397] mmcblk0: p1 p2
    [ 3.301869] hctosys: unable to open rtc device (rtc0)
    [ 3.307930] ALSA device list:
    [ 3.311093] No soundcards found.
    [ 3.389941] ti-iodelay 4844a000.padconf: Set reg 0x18c Delay(a: 0 g: 0), Elements(C=0 F=0)0x29000
    [ 3.398887] ti-iodelay 4844a000.padconf: Set reg 0x1a4 Delay(a: 119 g: 0), Elements(C=0 F=3)0x29003
    [ 3.407992] ti-iodelay 4844a000.padconf: Set reg 0x1b0 Delay(a: 0 g: 0), Elements(C=0 F=0)0x29000
    [ 3.416926] ti-iodelay 4844a000.padconf: Set reg 0x1bc Delay(a: 18 g: 0), Elements(C=0 F=0)0x29000
    [ 3.425940] ti-iodelay 4844a000.padconf: Set reg 0x1c8 Delay(a: 894 g: 0), Elements(C=1 F=12)0x2902c
    [ 3.435130] ti-iodelay 4844a000.padconf: Set reg 0x1d4 Delay(a: 30 g: 0), Elements(C=0 F=0)0x29000
    [ 3.444145] ti-iodelay 4844a000.padconf: Set reg 0x1e0 Delay(a: 0 g: 0), Elements(C=0 F=0)0x29000
    [ 3.453072] ti-iodelay 4844a000.padconf: Set reg 0x1ec Delay(a: 23 g: 0), Elements(C=0 F=0)0x29000
    [ 3.462086] ti-iodelay 4844a000.padconf: Set reg 0x1f8 Delay(a: 0 g: 0), Elements(C=0 F=0)0x29000
    [ 3.471013] ti-iodelay 4844a000.padconf: Set reg 0x360 Delay(a: 0 g: 0), Elements(C=0 F=0)0x29000
    [ 3.479926] ti-iodelay 4844a000.padconf: Set reg 0x194 Delay(a: 152 g: 0), Elements(C=0 F=4)0x29004
    [ 3.489027] ti-iodelay 4844a000.padconf: Set reg 0x1ac Delay(a: 206 g: 0), Elements(C=0 F=6)0x29006
    [ 3.498128] ti-iodelay 4844a000.padconf: Set reg 0x1b8 Delay(a: 78 g: 0), Elements(C=0 F=2)0x29002
    [ 3.507142] ti-iodelay 4844a000.padconf: Set reg 0x1c4 Delay(a: 2 g: 0), Elements(C=0 F=0)0x29000
    [ 3.516073] ti-iodelay 4844a000.padconf: Set reg 0x1d0 Delay(a: 266 g: 0), Elements(C=0 F=7)0x29007
    [ 3.525181] ti-iodelay 4844a000.padconf: Set reg 0x1dc Delay(a: 0 g: 0), Elements(C=0 F=0)0x29000
    [ 3.534108] ti-iodelay 4844a000.padconf: Set reg 0x1e8 Delay(a: 0 g: 0), Elements(C=0 F=0)0x29000
    [ 3.543035] ti-iodelay 4844a000.padconf: Set reg 0x1f4 Delay(a: 43 g: 0), Elements(C=0 F=1)0x29001
    [ 3.552049] ti-iodelay 4844a000.padconf: Set reg 0x200 Delay(a: 0 g: 0), Elements(C=0 F=0)0x29000
    [ 3.560975] ti-iodelay 4844a000.padconf: Set reg 0x368 Delay(a: 0 g: 0), Elements(C=0 F=0)0x29000
    [ 3.569888] ti-iodelay 4844a000.padconf: Set reg 0x190 Delay(a: 0 g: 0), Elements(C=0 F=0)0x29000
    [ 3.578814] ti-iodelay 4844a000.padconf: Set reg 0x1a8 Delay(a: 0 g: 0), Elements(C=0 F=0)0x29000
    [ 3.587741] ti-iodelay 4844a000.padconf: Set reg 0x1b4 Delay(a: 0 g: 0), Elements(C=0 F=0)0x29000
    [ 3.596670] ti-iodelay 4844a000.padconf: Set reg 0x1c0 Delay(a: 0 g: 0), Elements(C=0 F=0)0x29000
    [ 3.605598] ti-iodelay 4844a000.padconf: Set reg 0x1d8 Delay(a: 0 g: 0), Elements(C=0 F=0)0x29000
    [ 3.614525] ti-iodelay 4844a000.padconf: Set reg 0x1e4 Delay(a: 0 g: 0), Elements(C=0 F=0)0x29000
    [ 3.623451] ti-iodelay 4844a000.padconf: Set reg 0x1f0 Delay(a: 0 g: 0), Elements(C=0 F=0)0x29000
    [ 3.632378] ti-iodelay 4844a000.padconf: Set reg 0x1fc Delay(a: 0 g: 0), Elements(C=0 F=0)0x29000
    [ 3.641305] ti-iodelay 4844a000.padconf: Set reg 0x364 Delay(a: 0 g: 0), Elements(C=0 F=0)0x29000
    [ 3.656440] mmc1: new DDR MMC card at address 0001
    [ 3.661856] mmcblk1: mmc1:0001 R1J56L 13.8 GiB 
    [ 3.666687] mmcblk1boot0: mmc1:0001 R1J56L partition 1 4.00 MiB
    [ 3.672790] mmcblk1boot1: mmc1:0001 R1J56L partition 2 4.00 MiB
    [ 3.678871] mmcblk1rpmb: mmc1:0001 R1J56L partition 3 128 KiB
    [ 3.928124] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
    [ 3.936326] VFS: Mounted root (ext4 filesystem) on device 179:2.
    [ 3.944822] devtmpfs: mounted
    [ 3.949437] Freeing unused kernel memory: 2048K
    [ 4.080777] NOHZ: local_softirq_pending 40
    [ 4.110775] NOHZ: local_softirq_pending 40
    [ 4.304353] systemd[1]: System time before build time, advancing clock.
    [ 4.320840] [drm] Cannot find any crtc or sizes
    [ 4.362752] systemd[1]: systemd 234 running in system mode. (+PAM -AUDIT -SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP -LIBCRYPTSETUP -GCRYPT -GNUTLS +ACL +XZ -LZ4 -SECCOMP +BLKID -ELFUTILS +KMOD -IDN2 -IDN default-hierarchy=hybrid)
    [ 4.384415] systemd[1]: Detected architecture arm.

    Welcome to Arago 2018.08!

    [ 4.421697] systemd[1]: Set hostname to <am57xx-evm>.
    [ 4.436004] random: systemd: uninitialized urandom read (16 bytes read)
    [ 4.442706] systemd[1]: Initializing machine ID from random generator.
    [ 5.103569] random: systemd: uninitialized urandom read (16 bytes read)
    [ 5.111926] systemd[1]: Created slice User and Session Slice.
    [ OK ] Created slice User and Session Slice.
    [ 5.140915] random: systemd: uninitialized urandom read (16 bytes read)
    [ 5.147632] systemd[1]: Listening on udev Kernel Socket.
    [ OK ] Listening on udev Kernel Socket.
    [ 5.182470] systemd[1]: Listening on Journal Socket (/dev/log).
    [ OK ] Listening on Journal Socket (/dev/log).
    [ 5.210903] systemd[1]: Reached target Swap.
    [ OK ] Reached target Swap.
    [ 5.241073] systemd[1]: Reached target Remote File Systems.
    [ OK ] Reached target Remote File Systems.
    [ 5.271352] systemd[1]: Listening on Journal Socket.
    [ OK ] Listening on Journal Socket.
    [ OK ] Listening on Network Service Netlink Socket.
    [ OK ] Listening on Process Core Dump Socket.
    [ OK ] Created slice System Slice.
    Mounting Kernel Debug File System...
    Mounting POSIX Message Queue File System...
    Mounting Temporary Directory (/tmp)...
    [ OK ] Reached target Slices.
    Starting Remount Root and Kernel File Systems...
    Starting Load Kernel Modules...
    [ 5.557824] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
    [ OK ] Listening on udev Control Socket.
    [ OK ] Listening on /dev/initctl Compatibility Named Pipe.
    [ 5.614908] cmemk: loading out-of-tree module taints kernel.
    [ OK ] Created slice system-getty.slice.
    [ 5.623063] CMEMK module: reference Linux version 4.14.67
    [ 5.633795] cmemk initialized
    [ 5.654206] cryptodev: driver 1.9 loaded.
    [ OK ] Created slice system-serial\x2dgetty.slice.
    [ 5.698413] usbcore: registered new interface driver usbfs
    [ OK ] Started Forward Password Requests to Wall Dir[ 5.705187] usbcore: registered new interface driver hub
    ectory Watch.
    [ 5.716371] usbcore: registered new device driver usb
    [ 5.728020] usbcore: registered new interface driver usbserial
    [ OK ] Listening on Syslog Socket.
    [ 5.744660] usbcore: registered new interface driver ftdi_sio
    [ 5.751451] usbserial: USB Serial support registered for FTDI USB Serial Device
    Starting Journal Service...
    [ OK ] Started Dispatch Password Requests to Console Directory Watch.
    [ OK ] Reached target Paths.
    [ OK ] Mounted Kernel Debug File System.
    [ OK ] Mounted POSIX Message Queue File System.
    [ OK ] Mounted Temporary Directory (/tmp).
    [ OK ] Started Journal Service.
    [ OK ] Started Remount Root and Kernel File Systems.
    [ OK ] Started Load Kernel Modules.
    Mounting Kernel Configuration File System...
    Starting Apply Kernel Variables...
    Starting Rebuild Hardware Database...
    Starting Create System Users...
    Starting Flush Journal to Persistent Storage...
    [ OK ] Mounted Kernel Configuration File System.
    [ OK ] Started Apply Kernel Variables.
    [ OK ] Started Create System Users.
    [ 6.293719] systemd-journald[84]: Received request to flush runtime journal from PID 1
    Starting Create Static Device Nodes in /dev...
    [ OK ] Started Flush Journal to Persistent Storage.
    [ OK ] Started Create Static Device Nodes in /dev.
    Starting udev Kernel Device Manager...
    [ OK ] Reached target Local File Systems (Pre).
    Mounting /media/ram...
    Mounting /var/volatile...
    [ OK ] Mounted /var/volatile.
    [ OK ] Mounted /media/ram.
    [ OK ] Started udev Kernel Device Manager.
    Starting Load/Save Random Seed...
    [ OK ] Reached target Local File Systems.
    Starting Rebuild Journal Catalog...
    Starting Rebuild Dynamic Linker Cache...
    Starting Create Volatile Files and Directories...
    [ OK ] Started Load/Save Random Seed.
    [ OK ] Started Create Volatile Files and Directories.
    Starting Update UTMP about System Boot/Shutdown...
    Starting Opkg first boot configure...
    Starting Network Time Synchronization...
    [ OK ] Started Rebuild Journal Catalog.
    [ OK ] Started Update UTMP about System Boot/Shutdown.
    [ OK ] Started Network Time Synchronization.
    [ OK ] Reached target System Time Synchronized.
    [ OK ] Started Rebuild Hardware Database.
    Starting udev Coldplug all Devices...
    [ 8.953614] omap-rproc 58820000.ipu: assigned reserved memory node ipu1-memory@9d000000
    [ 9.078524] remoteproc remoteproc0: 58820000.ipu is available
    [ 9.117862] omap-rproc 55020000.ipu: assigned reserved memory node ipu2-memory@95800000
    [ OK ] Found device /dev/ttyS2.
    [ 9.218741] remoteproc remoteproc1: 55020000.ipu is available
    [ OK ] Started udev Coldplug all Devices.
    [ 9.317582] omap-rproc 40800000.dsp: assigned reserved memory node dsp1-memory@99000000
    [ 9.421216] remoteproc remoteproc2: 40800000.dsp is available
    [ 9.630711] remoteproc remoteproc1: powering up 55020000.ipu
    [ 9.646627] remoteproc remoteproc1: Booting fw image dra7-ipu2-fw.xem4, size 3747220
    [ 9.672219] omap-iommu 55082000.mmu: 55082000.mmu: version 2.1
    [ 9.678680] remoteproc remoteproc0: powering up 58820000.ipu
    [ 9.697329] remoteproc remoteproc0: Booting fw image dra7-ipu1-fw.xem4, size 6665500
    [ 9.712015] palmas-rtc 48070000.i2c:tps659038@58:tps659038_rtc: rtc core: registered 48070000.i2c:tps659038@58:tps659038_rtc as rtc0
    [ 9.713539] omap_gpio 4805b000.gpio: Could not set line 7 debounce to 20000 microseconds (-22)
    [ 9.818713] omap-iommu 58882000.mmu: 58882000.mmu: version 2.1
    [ 9.899977] omap-des 480a5000.des: OMAP DES hw accel rev: 2.2
    [ 9.920999] ov2659 0-0030: Sensor detection failed (3030, 0)
    [ 10.001727] omap-des 480a5000.des: will run requests pump with realtime priority
    [ 10.166717] virtio_rpmsg_bus virtio0: rpmsg host is online
    [ 10.180876] remoteproc remoteproc0: registered virtio0 (type 7)
    [ 10.186827] remoteproc remoteproc0: remote processor 58820000.ipu is now up
    [ 10.243693] virtio_rpmsg_bus virtio0: creating channel rpmsg-proto addr 0x3d
    [ 10.255801] virtio_rpmsg_bus virtio1: rpmsg host is online
    [ 10.274130] remoteproc remoteproc1: registered virtio1 (type 7)
    [ 10.283516] remoteproc remoteproc1: remote processor 55020000.ipu is now up
    [ 10.305445] virtio_rpmsg_bus virtio1: creating channel rpmsg-rpc addr 0x65
    [ 10.324576] virtio_rpmsg_bus virtio1: creating channel rpmsg-rpc addr 0x66
    [ 10.532437] omap_rtc 48838000.rtc: registered as rtc1
    [ 10.840619] vpe 489d0000.vpe: loading firmware vpdma-1b8.bin
    [ 10.857946] CAN device driver interface
    [ 10.871078] vpe 489d0000.vpe: Device registered as /dev/video0
    [ 11.006967] c_can_platform 4ae3c000.can: c_can_platform device registered (regs=fce3c000, irq=88)
    [ 11.027747] remoteproc remoteproc2: powering up 40800000.dsp
    [ 11.027757] remoteproc remoteproc2: Booting fw image dra7-dsp1-fw.xe66, size 20388756
    [ 11.034388] omap_hwmod: mmu0_dsp1: _wait_target_disable failed
    [ 11.034423] omap-iommu 40d01000.mmu: 40d01000.mmu: version 3.0
    [ 11.034496] omap-iommu 40d02000.mmu: 40d02000.mmu: version 3.0
    [ 11.061648] SCSI subsystem initialized
    [ 11.092011] virtio_rpmsg_bus virtio2: rpmsg host is online
    [ 11.092045] remoteproc remoteproc2: registered virtio2 (type 7)
    [ 11.092049] remoteproc remoteproc2: remote processor 40800000.dsp is now up
    [ 11.096499] virtio_rpmsg_bus virtio2: creating channel rpmsg-proto addr 0x3d
    [ OK ] Started Opkg first boot configure.
    [ 11.306163] omap_wdt: OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec
    [ 11.341047] omap-sham 4b101000.sham: hw accel on OMAP rev 4.3
    [ 11.413672] ahci 4a140000.sata: SSS flag set, parallel bus scan disabled
    [ 11.440881] ahci 4a140000.sata: AHCI 0001.0300 32 slots 1 ports 3 Gbps 0x1 impl platform mode
    [ 11.518410] ahci 4a140000.sata: flags: 64bit ncq sntf stag pm led clo only pmp pio slum part ccc apst 
    [ 11.638492] scsi host0: ahci
    [ 11.641670] ata1: SATA max UDMA/133 mmio [mem 0x4a140000-0x4a1410ff] port 0x100 irq 80
    [ 11.717108] vip 48970000.vip: loading firmware vpdma-1b8.bin
    [ 11.750828] vip 48970000.vip: VPDMA firmware loaded
    [ 11.886612] omap-aes 4b500000.aes: OMAP AES hw accel rev: 3.3
    [ 11.941834] omap-aes 4b500000.aes: will run requests pump with realtime priority
    [ 12.039202] omap-aes 4b700000.aes: OMAP AES hw accel rev: 3.3
    [ 12.045167] ata1: SATA link down (SStatus 0 SControl 300)
    [ 12.147075] omap-aes 4b700000.aes: will run requests pump with realtime priority
    [ 12.197854] [drm] Initialized pvr 1.14.3699939 20110701 for 56000000.gpu on minor 1
    [ 12.320275] pruss 4b200000.pruss: creating PRU cores and other child platform devices
    [ 12.331171] omap-hdmi-audio omap-hdmi-audio.0.auto: snd-soc-dummy-dai <-> 58040000.encoder mapping ok
    [ 12.331178] omap-hdmi-audio omap-hdmi-audio.0.auto: ASoC: no DMI vendor name!
    [ 12.540811] davinci_mdio 4b232400.mdio: davinci mdio revision 1.6, bus freq 1000000
    [ 12.564222] libphy: 4b232400.mdio: probed
    [ 12.614839] davinci_mdio 4b232400.mdio: phy[0]: device 4b232400.mdio:00, driver TI TLK10X 10/100 Mbps PHY
    [ 12.686420] davinci_mdio 4b232400.mdio: phy[1]: device 4b232400.mdio:01, driver TI TLK10X 10/100 Mbps PHY
    [ 12.816984] pruss 4b280000.pruss: creating PRU cores and other child platform devices
    [ 12.980816] davinci_mdio 4b2b2400.mdio: davinci mdio revision 1.6, bus freq 1000000
    [ 13.060819] libphy: 4b2b2400.mdio: probed
    [ 13.144454] davinci_mdio 4b2b2400.mdio: phy[0]: device 4b2b2400.mdio:00, driver TI TLK10X 10/100 Mbps PHY
    [ 13.241461] davinci_mdio 4b2b2400.mdio: phy[1]: device 4b2b2400.mdio:01, driver TI TLK10X 10/100 Mbps PHY
    [ 13.339711] remoteproc remoteproc3: 4b234000.pru is available
    [ 13.376632] pru-rproc 4b234000.pru: PRU rproc node /ocp/pruss_soc_bus@4b226004/pruss@0/pru@34000 probed successfully
    [ OK ] Listening on Load/Save RF Kill Switch Status [ 13.451049] remoteproc remoteproc4: 4b238000.pru is available
    /dev/rfkill Watch.
    [ 13.508326] pru-rproc 4b238000.pru: PRU rproc node /ocp/pruss_soc_bus@4b226004/pruss@0/pru@38000 probed successfully
    [ 13.577717] remoteproc remoteproc5: 4b2b4000.pru is available
    [ 13.630826] pru-rproc 4b2b4000.pru: PRU rproc node /ocp/pruss_soc_bus@4b2a6004/pruss@0/pru@34000 probed successfully
    [ 13.684144] remoteproc remoteproc6: 4b2b8000.pru is available
    [ 13.716160] pru-rproc 4b2b8000.pru: PRU rproc node /ocp/pruss_soc_bus@4b2a6004/pruss@0/pru@38000 probed successfully
    [ 13.801648] prueth pruss2_eth: pruss_fw_drop_untagged_vlan 0
    [ 13.833697] prueth pruss2_eth: pruss MC Mask 0:0:0:0:0:0
    [ 14.090713] prueth pruss2_eth: request for sync latch pins failed: -19
    [ 14.122754] prueth pruss2_eth: TI PRU ethernet (type 0) driver initialized
    [ 14.181796] prueth pruss1_eth: pruss_fw_drop_untagged_vlan 0
    [ 14.213345] NET: Registered protocol family 44
    [ 14.220221] rpmsg_rpc virtio1.rpmsg-rpc.-1.101: probing service dce-callback with src 1024 dst 101
    [ 14.220512] rpmsg_rpc virtio1.rpmsg-rpc.-1.102: probing service rpmsg-dce with src 1025 dst 102
    [ 14.221955] rpmsg_rpc virtio1.rpmsg-rpc.-1.101: published functions = 4
    [ 14.221980] rpmsg_rpc virtio1.rpmsg-rpc.-1.102: published functions = 9
    [ 14.534081] xhci-hcd xhci-hcd.1.auto: xHCI Host Controller
    [ 14.534101] xhci-hcd xhci-hcd.1.auto: new USB bus registered, assigned bus number 1
    [ 14.540246] xhci-hcd xhci-hcd.1.auto: hcc params 0x0220f04c hci version 0x100 quirks 0x02010010
    [ 14.540291] xhci-hcd xhci-hcd.1.auto: irq 177, io mem 0x48890000
    [ 14.541410] hub 1-0:1.0: USB hub found
    [ 14.541435] hub 1-0:1.0: 1 port detected
    [ 14.542303] xhci-hcd xhci-hcd.1.auto: xHCI Host Controller
    [ 14.542315] xhci-hcd xhci-hcd.1.auto: new USB bus registered, assigned bus number 2
    [ 14.542324] xhci-hcd xhci-hcd.1.auto: Host supports USB 3.0 SuperSpeed
    [ 14.542376] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
    [ 14.542763] hub 2-0:1.0: USB hub found
    [ 14.542787] hub 2-0:1.0: 1 port detected
    [ 14.800723] prueth pruss1_eth: pruss MC Mask 0:0:0:0:0:0
    [ 15.025663] prueth pruss1_eth: request for sync latch pins failed: -19
    [ 15.042463] prueth pruss1_eth: TI PRU ethernet (type 0) driver initialized
    [ OK ] Started Rebuild Dynamic Linker Cache.
    Starting Update is Completed...
    [ OK ] Reached target Sound Card.
    [ OK ] Started Update is Completed.
    [ OK ] Reached target System Initialization.
    [ OK ] Listening on dropbear.socket.
    [ OK ] Listening on RPCbind Server Activation Socket.
    [ OK ] Listening on D-Bus System Message Bus Socket.
    [ OK ] Started Daily rotation of log files.
    Starting Network Service...
    [ OK ] Listening on Avahi mDNS/DNS-SD Stack Activation Socket.
    [ OK ] Reached target Sockets.
    [ OK ] Reached target Basic System.
    [ OK ] Started Job spooling tools.
    [ OK ] Reached target Containers.
    Starting TI IPC Daemon...
    [ OK ] Started Kernel Logging Service.
    Starting Print notice about GPLv3 packages...
    [ OK ] Started D-Bus System Message Bus.
    Starting RPC Bind Service...
    Starting Save/Restore Sound Card State...
    Starting uim-sysfs.service...
    [ OK ] Started Hardware RNG Entropy Gatherer Daemon.
    Starting TI MultiCore Tools Daemon...
    [ 16.536865] random: crng init done
    [ 16.542536] remoteproc remoteproc4: powering up 4b238000.pru
    [ 16.544899] remoteproc remoteproc4: Booting fw image ti-pruss/am57xx-pru1-prueth-fw.elf, size 5060
    [ 16.545013] pruss 4b200000.pruss: configured system_events[63-0] = 0x00600000.00a00000
    [ 16.545018] pruss 4b200000.pruss: configured intr_channels = 0x0000012a host_intr = 0x0000022a
    [ 16.545023] remoteproc remoteproc4: remote processor 4b238000.pru is now up
    [ 16.545053] net eth5: started
    [ 16.545176] IPv6: ADDRCONF(NETDEV_UP): eth5: link is not ready
    [ 16.550802] remoteproc remoteproc3: powering up 4b234000.pru
    [ 16.554949] remoteproc remoteproc3: Booting fw image ti-pruss/am57xx-pru0-prueth-fw.elf, size 5028
    [ 16.555055] pruss 4b200000.pruss: configured system_events[63-0] = 0x00000600.00500000
    [ 16.555059] pruss 4b200000.pruss: configured intr_channels = 0x00000095 host_intr = 0x00000115
    [ 16.555064] remoteproc remoteproc3: remote processor 4b234000.pru is now up
    [ 16.555090] net eth4: started
    [ 16.555214] IPv6: ADDRCONF(NETDEV_UP): eth4: link is not ready
    [ 16.577736] remoteproc remoteproc6: powering up 4b2b8000.pru
    [ 16.577805] remoteproc remoteproc6: Booting fw image ti-pruss/am57xx-pru1-prueth-fw.elf, size 5060
    [ 16.577918] pruss 4b280000.pruss: configured system_events[63-0] = 0x00600000.00a00000
    [ 16.577922] pruss 4b280000.pruss: configured intr_channels = 0x0000012a host_intr = 0x0000022a
    [ 16.577928] remoteproc remoteproc6: remote processor 4b2b8000.pru is now up
    [ 16.577954] net eth3: started
    [ 16.578409] IPv6: ADDRCONF(NETDEV_UP): eth3: link is not ready
    [ 16.590639] remoteproc remoteproc5: powering up 4b2b4000.pru
    [ 16.590705] remoteproc remoteproc5: Booting fw image ti-pruss/am57xx-pru0-prueth-fw.elf, size 5028
    [ 16.590938] pruss 4b280000.pruss: configured system_events[63-0] = 0x00000600.00500000
    [ 16.590943] pruss 4b280000.pruss: configured intr_channels = 0x00000095 host_intr = 0x00000115
    [ 16.590948] remoteproc remoteproc5: remote processor 4b2b4000.pru is now up
    [ 16.590972] net eth2: started
    [ 16.591090] IPv6: ADDRCONF(NETDEV_UP): eth2: link is not ready
    [ 16.615334] net eth1: initializing cpsw version 1.15 (0)
    [ 16.748249] Micrel KSZ9031 Gigabit PHY 48485000.mdio:01: attached PHY driver [Micrel KSZ9031 Gigabit PHY] (mii_bus:phy_addr=48485000.mdio:01, irq=POLL)
    [ 16.752761] cpts ptp bc clkid 0
    [ 16.773919] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
    [ 16.798955] net eth0: initializing cpsw version 1.15 (0)
    [ 16.950032] Micrel KSZ9031 Gigabit PHY 48485000.mdio:00: attached PHY driver [Micrel KSZ9031 Gigabit PHY] (mii_bus:phy_addr=48485000.mdio:00, irq=POLL)
    [ 16.962399] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
    [ OK ] Started Daily Cleanup of Temporary Directorie[ 17.578245] random: 7 urandom warning(s) missed due to ratelimiting
    s.
    [ OK ] Reached target Timers.
    Starting Login Service...
    [ OK ] Started System Logging Service.
    [ OK ] Started Periodic Command Scheduler.
    Starting Avahi mDNS/DNS-SD Stack...
    [ OK ] Started Network Service.
    [ OK ] Started TI IPC Daemon.
    [ OK ] Started RPC Bind Service.
    [ OK ] Started Save/Restore Sound Card State.
    [ OK ] Started TI MultiCore Tools Daemon.
    [ OK ] Started Login Service.
    [ OK ] Started Avahi mDNS/DNS-SD Stack.
    [ OK ] Reached target Network.
    [ OK ] Started Redis In-Memory Data Store.
    Starting Enable and configure wl18xx bluetooth stack...
    Starting Lightning Fast Webserver With Light System Requirements...
    Starting Permit User Sessions...
    Starting Simple Network Management Protocol (SNMP) Daemon....
    Starting Wait for Network to be Configured...
    Starting Network Name Resolution...
    [ OK ] Started Enable and configure wl18xx bluetooth stack.
    [ OK ] Started Lightning Fast Webserver With Light System Requirements.
    [ OK ] Started Permit User Sessions.
    [ OK ] Started Getty on tty1.
    [ OK ] Started Serial Getty on ttyS2.
    [ OK ] Reached target Login Prompts.
    Starting Synchronize System and HW clocks...
    [ OK ] Stopped Redis In-Memory Data Store.
    [ OK ] Started Redis In-Memory Data Store.
    [ OK ] Started Synchronize System and HW clocks.
    [ OK ] Started Network Name Resolution.
    [ OK ] Reached target Host and Network Name Lookups.
    [ OK ] Started NFS status monitor for NFSv2/3 locking..
    [ OK ] Started uim-sysfs.service.
    Starting rc.pvr.service...
    [ 18.280003] PVR_K: UM DDK-(3699939) and KM DDK-(3699939) match. [ OK ]
    [ OK ] Stopped Redis In-Memory Data Store.
    [ OK ] Started Redis In-Memory Data Store.
    [ OK ] Started rc.pvr.service.
    Starting weston.service...
    [ 18.820783] NOHZ: local_softirq_pending 40
    [ OK ] Started Simple Network Management Protocol (SNMP) Daemon..
    [ OK ] Stopped Redis In-Memory Data Store.
    [ OK ] Started Redis In-Memory Data Store.
    [ OK ] Stopped Redis In-Memory Data Store.
    [ OK ] Started Redis In-Memory Data Store.
    [ 19.490776] NOHZ: local_softirq_pending 40
    [ OK ] Stopped Redis In-Memory Data Store.
    [FAILED] Failed to start Redis In-Memory Data Store.
    See 'systemctl status redis.service' for details.
    ***************************************************************
    ***************************************************************
    NOTICE: This file system contains the following GPLv3 packages:
    autoconf
    bash-dev
    bash
    binutils-dev
    binutils
    bison-dev
    bison
    cifs-utils
    cpio
    cpp-symlinks
    cpp
    dosfstools
    elfutils-dev
    elfutils
    findutils
    g++-symlinks
    g++
    gawk
    gcc-symlinks
    gcc
    gdb
    gdbc6x
    gdbserver
    gettext
    gstreamer1.0-libav
    gzip
    hidapi
    libasm1
    libcairo-perf-utils
    libdw1
    libelf1
    libgdbm-compat4
    libgdbm-dev
    libgdbm4
    libgettextlib
    libgettextsrc
    libgmp10
    libidn11
    libmavconn
    libmpc3
    libmpfr4
    libreadline-dev
    libreadline7
    libunistring2
    m4-dev
    m4
    make
    mavlink
    mavros-extras
    mavros-msgs
    mavros
    nettle
    parted
    python3-pycairo
    socketcan-interface
    swig-dev
    swig
    which

    If you do not wish to distribute GPLv3 components please remove
    the above packages prior to distribution. This can be done using
    the opkg remove command. i.e.:
    opkg remove <package>
    Where <package> is the name printed in the list above

    NOTE: If the package is a dependency of another package you
    will be notified of the dependent packages. You should
    use the --force-removal-of-dependent-packages option to
    also remove the dependent packages as well
    ***************************************************************
    ***************************************************************
    [ OK ] Started Print notice about GPLv3 packages.
    [ 21.608026] omap_hwmod: mmu0_dsp1: _wait_target_disable failed
    [ OK ] Started weston.service.
    Starting telnetd.service...
    [ OK ] Started telnetd.service.
    Starting thttpd.service...
    [ OK ] Started thttpd.service.
    Starting rng-tools.service...
    [ OK ] Started rng-tools.service.

    Thanks and Regards

    Arpita.J

  • Hi, 

    Both files look okay.

    Do you have an EEPROM on your custom board?

    Does the EEPROM contain information about the chip?

    TI side u-boot reads information from EEPROM and recognizes chip.

    If there is no EEPROM, you must force the chip to recognize the information.

    If that's not a problem
    Can I show the pinmux.c and omap5-u-boot.dtsi files?

  • Hi Sunmin Kim,

    We have forced chip not to read from EEPROM. Please find the pinmux.c and omap5-u-boot.dtsi files.

    can u please tell me exact path for pinmux.c:

    -------------------------------------------------------------------------

    omap5-u-boot.dtsi

    /*
    * Copyright (C) 2017 Texas Instruments Incorporated - http://www.ti.com/
    *
    * This program is free software; you can redistribute it and/or modify
    * it under the terms of the GNU General Public License version 2 as
    * published by the Free Software Foundation.
    * Based on "dra7.dtsi"
    */

    /{
    chosen {
    tick-timer = &timer2;
    };

    ocp {
    u-boot,dm-spl;

    ocp2scp@4a080000 {
    compatible = "ti,omap-ocp2scp", "simple-bus";
    };

    ocp2scp@4a090000 {
    compatible = "ti,omap-ocp2scp", "simple-bus";
    };

    bandgap@4a0021e0 {
    u-boot,dm-spl;
    };
    };
    };

    &uart1 {
    u-boot,dm-spl;
    reg-shift = <2>;
    };

    &mmc1 {
    u-boot,dm-spl;
    };

    &mmc2 {
    u-boot,dm-spl;
    };

    &l4_cfg {
    u-boot,dm-spl;
    };

    &scm {
    u-boot,dm-spl;
    };

    &scm_conf {
    u-boot,dm-spl;
    };

    &qspi {
    u-boot,dm-spl;

    m25p80@0 {
    compatible = "spi-flash";
    u-boot,dm-spl;
    };
    };

    &gpio1 {
    u-boot,dm-spl;
    };

    &gpio2 {
    u-boot,dm-spl;
    };

    &gpio3 {
    u-boot,dm-spl;
    };

    &gpio4 {
    u-boot,dm-spl;
    };

    &gpio5 {
    u-boot,dm-spl;
    };

    &gpio6 {
    u-boot,dm-spl;
    };

    &gpio7 {
    u-boot,dm-spl;
    };

    ------------------------------------------------------------------------------------------------------------------------

    Thanks and regards

    Arpita.J

  • Hi, 

    Can I show the u-boot*/board/ti/am57xx/mux.data.h files?

  • Sure. please find it below.

    /*
    * Copyright (C) 2014 Texas Instruments Incorporated - http://www.ti.com
    *
    * Author: Felipe Balbi <balbi@ti.com>
    *
    * Based on board/ti/dra7xx/evm.c
    *
    * SPDX-License-Identifier: GPL-2.0+
    */
    #ifndef _MUX_DATA_BEAGLE_X15_H_
    #define _MUX_DATA_BEAGLE_X15_H_

    #include <asm/arch/mux_dra7xx.h>

    const struct pad_conf_entry core_padconf_array_essential_x15[] = {
    {GPMC_AD0, (M2 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_ad0.vin3a_d0 */
    {GPMC_AD1, (M2 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_ad1.vin3a_d1 */
    {GPMC_AD2, (M2 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_ad2.vin3a_d2 */
    {GPMC_AD3, (M2 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_ad3.vin3a_d3 */
    {GPMC_AD4, (M2 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_ad4.vin3a_d4 */
    {GPMC_AD5, (M2 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_ad5.vin3a_d5 */
    {GPMC_AD6, (M2 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_ad6.vin3a_d6 */
    {GPMC_AD7, (M2 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_ad7.vin3a_d7 */
    {GPMC_AD8, (M2 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_ad8.vin3a_d8 */
    {GPMC_AD9, (M2 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_ad9.vin3a_d9 */
    {GPMC_AD10, (M2 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_ad10.vin3a_d10 */
    {GPMC_AD11, (M2 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_ad11.vin3a_d11 */
    {GPMC_AD12, (M2 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_ad12.vin3a_d12 */
    {GPMC_AD13, (M2 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_ad13.vin3a_d13 */
    {GPMC_AD14, (M2 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_ad14.vin3a_d14 */
    {GPMC_AD15, (M2 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_ad15.vin3a_d15 */
    {GPMC_A0, (M2 | PIN_INPUT_PULLDOWN | MANUAL_MODE)}, /* gpmc_a0.vin3a_d16 */
    {GPMC_A1, (M2 | PIN_INPUT_PULLDOWN | MANUAL_MODE)}, /* gpmc_a1.vin3a_d17 */
    {GPMC_A2, (M2 | PIN_INPUT_PULLDOWN | MANUAL_MODE)}, /* gpmc_a2.vin3a_d18 */
    {GPMC_A3, (M2 | PIN_INPUT_PULLDOWN | MANUAL_MODE)}, /* gpmc_a3.vin3a_d19 */
    {GPMC_A4, (M2 | PIN_INPUT_PULLDOWN | MANUAL_MODE)}, /* gpmc_a4.vin3a_d20 */
    {GPMC_A5, (M2 | PIN_INPUT_PULLDOWN | MANUAL_MODE)}, /* gpmc_a5.vin3a_d21 */
    {GPMC_A6, (M2 | PIN_INPUT_PULLDOWN | MANUAL_MODE)}, /* gpmc_a6.vin3a_d22 */
    {GPMC_A7, (M2 | PIN_INPUT_PULLDOWN | MANUAL_MODE)}, /* gpmc_a7.vin3a_d23 */
    {GPMC_A8, (M2 | PIN_INPUT_PULLDOWN | MANUAL_MODE)}, /* gpmc_a8.vin3a_hsync0 */
    {GPMC_A9, (M2 | PIN_INPUT_PULLDOWN | MANUAL_MODE)}, /* gpmc_a9.vin3a_vsync0 */
    {GPMC_A10, (M2 | PIN_INPUT_PULLDOWN | MANUAL_MODE)}, /* gpmc_a10.vin3a_de0 */
    {GPMC_A11, (M2 | PIN_INPUT_PULLDOWN | MANUAL_MODE)}, /* gpmc_a11.vin3a_fld0 */
    {GPMC_A12, (M14 | PIN_INPUT_PULLUP)}, /* gpmc_a12.gpio2_2 */
    {GPMC_A13, (M14 | PIN_INPUT_PULLDOWN)}, /* gpmc_a13.gpio2_3 */
    {GPMC_A14, (M14 | PIN_INPUT_PULLUP)}, /* gpmc_a14.gpio2_4 */
    {GPMC_A15, (M14 | PIN_INPUT_PULLDOWN)}, /* gpmc_a15.gpio2_5 */
    {GPMC_A16, (M14 | PIN_INPUT_PULLDOWN)}, /* gpmc_a16.gpio2_6 */
    {GPMC_A17, (M14 | PIN_INPUT_PULLDOWN)}, /* gpmc_a17.gpio2_7 */
    {GPMC_A18, (M14 | PIN_INPUT_PULLUP)}, /* gpmc_a18.gpio2_8 */
    {GPMC_A19, (M1 | PIN_INPUT_PULLUP)}, /* gpmc_a19.mmc2_dat4 */
    {GPMC_A20, (M1 | PIN_INPUT_PULLUP)}, /* gpmc_a20.mmc2_dat5 */
    {GPMC_A21, (M1 | PIN_INPUT_PULLUP)}, /* gpmc_a21.mmc2_dat6 */
    {GPMC_A22, (M1 | PIN_INPUT_PULLUP)}, /* gpmc_a22.mmc2_dat7 */
    {GPMC_A23, (M1 | PIN_INPUT_PULLUP)}, /* gpmc_a23.mmc2_clk */
    {GPMC_A24, (M1 | PIN_INPUT_PULLUP)}, /* gpmc_a24.mmc2_dat0 */
    {GPMC_A25, (M1 | PIN_INPUT_PULLUP)}, /* gpmc_a25.mmc2_dat1 */
    {GPMC_A26, (M1 | PIN_INPUT_PULLUP)}, /* gpmc_a26.mmc2_dat2 */
    {GPMC_A27, (M1 | PIN_INPUT_PULLUP)}, /* gpmc_a27.mmc2_dat3 */
    {GPMC_CS1, (M1 | PIN_INPUT_PULLUP)}, /* gpmc_cs1.mmc2_cmd */
    {GPMC_CS0, (M14 | PIN_INPUT_PULLDOWN)}, /* gpmc_cs0.gpio2_19 */
    {GPMC_CS2, (M14 | PIN_INPUT_PULLUP)}, /* gpmc_cs2.gpio2_20 */
    {GPMC_CS3, (M2 | PIN_INPUT_PULLDOWN | MANUAL_MODE)}, /* gpmc_cs3.vin3a_clk0 */
    {GPMC_CLK, (M9 | PIN_INPUT_PULLDOWN)}, /* gpmc_clk.dma_evt1 */
    {GPMC_ADVN_ALE, (M14 | PIN_INPUT_PULLUP)}, /* gpmc_advn_ale.gpio2_23 */
    {GPMC_OEN_REN, (M14 | PIN_INPUT_PULLUP)}, /* gpmc_oen_ren.gpio2_24 */
    {GPMC_WEN, (M14 | PIN_INPUT_PULLUP)}, /* gpmc_wen.gpio2_25 */
    {GPMC_BEN0, (M9 | PIN_INPUT_PULLDOWN)}, /* gpmc_ben0.dma_evt3 */
    {GPMC_BEN1, (M9 | PIN_INPUT_PULLDOWN)}, /* gpmc_ben1.dma_evt4 */
    {GPMC_WAIT0, (M14 | PIN_INPUT_PULLUP | SLEWCONTROL)}, /* gpmc_wait0.gpio2_28 */
    {VIN1B_CLK1, (M14 | PIN_INPUT_SLEW)}, /* vin1b_clk1.gpio2_31 */
    {VIN1A_D2, (M14 | PIN_INPUT_PULLDOWN)}, /* vin1a_d2.gpio3_6 */
    {VIN1A_D3, (M14 | PIN_INPUT_PULLDOWN)}, /* vin1a_d3.gpio3_7 */
    {VIN1A_D4, (M14 | PIN_INPUT_PULLDOWN)}, /* vin1a_d4.gpio3_8 */
    {VIN1A_D5, (M14 | PIN_INPUT_PULLDOWN)}, /* vin1a_d5.gpio3_9 */
    {VIN1A_D6, (M14 | PIN_INPUT_PULLDOWN)}, /* vin1a_d6.gpio3_10 */
    {VIN1A_D7, (M14 | PIN_INPUT_PULLDOWN)}, /* vin1a_d7.gpio3_11 */
    {VIN1A_D8, (M14 | PIN_INPUT_PULLDOWN)}, /* vin1a_d8.gpio3_12 */
    {VIN1A_D10, (M14 | PIN_INPUT_PULLDOWN)}, /* vin1a_d10.gpio3_14 */
    {VIN1A_D11, (M14 | PIN_INPUT_PULLDOWN)}, /* vin1a_d11.gpio3_15 */
    {VIN1A_D12, (M14 | PIN_INPUT_PULLDOWN)}, /* vin1a_d12.gpio3_16 */
    {VIN1A_D14, (M14 | PIN_INPUT_PULLDOWN)}, /* vin1a_d14.gpio3_18 */
    {VIN1A_D16, (M14 | PIN_INPUT_PULLDOWN)}, /* vin1a_d16.gpio3_20 */
    {VIN1A_D19, (M14 | PIN_INPUT_PULLDOWN)}, /* vin1a_d19.gpio3_23 */
    {VIN1A_D20, (M14 | PIN_INPUT_PULLDOWN)}, /* vin1a_d20.gpio3_24 */
    {VIN1A_D22, (M14 | PIN_INPUT_PULLDOWN)}, /* vin1a_d22.gpio3_26 */
    {VIN2A_CLK0, (M14 | PIN_INPUT_PULLDOWN)}, /* vin2a_clk0.gpio3_28 */
    {VIN2A_DE0, (M14 | PIN_INPUT_PULLDOWN)}, /* vin2a_de0.gpio3_29 */
    {VIN2A_FLD0, (M14 | PIN_INPUT_PULLDOWN)}, /* vin2a_fld0.gpio3_30 */
    {VIN2A_HSYNC0, (M11 | PIN_INPUT_PULLUP)}, /* vin2a_hsync0.pr1_uart0_cts_n */
    {VIN2A_VSYNC0, (M11 | PIN_OUTPUT_PULLUP)}, /* vin2a_vsync0.pr1_uart0_rts_n */
    {VIN2A_D0, (M11 | PIN_INPUT_PULLUP)}, /* vin2a_d0.pr1_uart0_rxd */
    {VIN2A_D1, (M11 | PIN_OUTPUT)}, /* vin2a_d1.pr1_uart0_txd */
    {VIN2A_D2, (M8 | PIN_INPUT_PULLUP)}, /* vin2a_d2.uart10_rxd */
    {VIN2A_D3, (M8 | PIN_OUTPUT)}, /* vin2a_d3.uart10_txd */
    {VIN2A_D4, (M8 | PIN_INPUT_PULLUP)}, /* vin2a_d4.uart10_ctsn */
    {VIN2A_D5, (M8 | PIN_OUTPUT_PULLUP)}, /* vin2a_d5.uart10_rtsn */
    {VIN2A_D6, (M14 | PIN_INPUT_PULLDOWN)}, /* vin2a_d6.gpio4_7 */
    {VIN2A_D7, (M14 | PIN_INPUT_PULLDOWN)}, /* vin2a_d7.gpio4_8 */
    {VIN2A_D8, (M14 | PIN_INPUT_PULLDOWN)}, /* vin2a_d8.gpio4_9 */
    {VIN2A_D9, (M14 | PIN_INPUT_PULLDOWN)}, /* vin2a_d9.gpio4_10 */
    {VIN2A_D10, (M10 | PIN_OUTPUT_PULLDOWN)}, /* vin2a_d10.ehrpwm2B */
    {VIN2A_D11, (M10 | PIN_INPUT_PULLDOWN)}, /* vin2a_d11.ehrpwm2_tripzone_input */
    {VIN2A_D12, (M3 | PIN_OUTPUT | MANUAL_MODE)}, /* vin2a_d12.rgmii1_txc */
    {VIN2A_D13, (M3 | PIN_OUTPUT | MANUAL_MODE)}, /* vin2a_d13.rgmii1_txctl */
    {VIN2A_D14, (M3 | PIN_OUTPUT | MANUAL_MODE)}, /* vin2a_d14.rgmii1_txd3 */
    {VIN2A_D15, (M3 | PIN_OUTPUT | MANUAL_MODE)}, /* vin2a_d15.rgmii1_txd2 */
    {VIN2A_D16, (M3 | PIN_OUTPUT | MANUAL_MODE)}, /* vin2a_d16.rgmii1_txd1 */
    {VIN2A_D17, (M3 | PIN_OUTPUT | MANUAL_MODE)}, /* vin2a_d17.rgmii1_txd0 */
    {VIN2A_D18, (M3 | PIN_INPUT | MANUAL_MODE)}, /* vin2a_d18.rgmii1_rxc */
    {VIN2A_D19, (M3 | PIN_INPUT | MANUAL_MODE)}, /* vin2a_d19.rgmii1_rxctl */
    {VIN2A_D20, (M3 | PIN_INPUT | MANUAL_MODE)}, /* vin2a_d20.rgmii1_rxd3 */
    {VIN2A_D21, (M3 | PIN_INPUT | MANUAL_MODE)}, /* vin2a_d21.rgmii1_rxd2 */
    {VIN2A_D22, (M3 | PIN_INPUT | MANUAL_MODE)}, /* vin2a_d22.rgmii1_rxd1 */
    {VIN2A_D23, (M3 | PIN_INPUT | MANUAL_MODE)}, /* vin2a_d23.rgmii1_rxd0 */
    {VOUT1_FLD, (M14 | PIN_INPUT)}, /* vout1_fld.gpio4_21 */
    {MDIO_MCLK, (M0 | PIN_OUTPUT | SLEWCONTROL)}, /* mdio_mclk.mdio_mclk */
    {MDIO_D, (M0 | PIN_INPUT | SLEWCONTROL)}, /* mdio_d.mdio_d */
    {RMII_MHZ_50_CLK, (M14 | PIN_INPUT_PULLUP)}, /* RMII_MHZ_50_CLK.gpio5_17 */
    {UART3_RXD, (M14 | PIN_INPUT_SLEW)}, /* uart3_rxd.gpio5_18 */
    {UART3_TXD, (M14 | PIN_INPUT_SLEW)}, /* uart3_txd.gpio5_19 */
    {RGMII0_TXC, (M0 | PIN_OUTPUT | MANUAL_MODE)}, /* rgmii0_txc.rgmii0_txc */
    {RGMII0_TXCTL, (M0 | PIN_OUTPUT | MANUAL_MODE)}, /* rgmii0_txctl.rgmii0_txctl */
    {RGMII0_TXD3, (M0 | PIN_OUTPUT | MANUAL_MODE)}, /* rgmii0_txd3.rgmii0_txd3 */
    {RGMII0_TXD2, (M0 | PIN_OUTPUT | MANUAL_MODE)}, /* rgmii0_txd2.rgmii0_txd2 */
    {RGMII0_TXD1, (M0 | PIN_OUTPUT | MANUAL_MODE)}, /* rgmii0_txd1.rgmii0_txd1 */
    {RGMII0_TXD0, (M0 | PIN_OUTPUT | MANUAL_MODE)}, /* rgmii0_txd0.rgmii0_txd0 */
    {RGMII0_RXC, (M0 | PIN_INPUT | MANUAL_MODE)}, /* rgmii0_rxc.rgmii0_rxc */
    {RGMII0_RXCTL, (M0 | PIN_INPUT | MANUAL_MODE)}, /* rgmii0_rxctl.rgmii0_rxctl */
    {RGMII0_RXD3, (M0 | PIN_INPUT | MANUAL_MODE)}, /* rgmii0_rxd3.rgmii0_rxd3 */
    {RGMII0_RXD2, (M0 | PIN_INPUT | MANUAL_MODE)}, /* rgmii0_rxd2.rgmii0_rxd2 */
    {RGMII0_RXD1, (M0 | PIN_INPUT | MANUAL_MODE)}, /* rgmii0_rxd1.rgmii0_rxd1 */
    {RGMII0_RXD0, (M0 | PIN_INPUT | MANUAL_MODE)}, /* rgmii0_rxd0.rgmii0_rxd0 */
    {USB1_DRVVBUS, (M0 | PIN_OUTPUT | SLEWCONTROL)}, /* usb1_drvvbus.usb1_drvvbus */
    {USB2_DRVVBUS, (M0 | PIN_OUTPUT_PULLDOWN | SLEWCONTROL)}, /* usb2_drvvbus.usb2_drvvbus */
    {GPIO6_14, (M10 | PIN_INPUT_PULLUP)}, /* gpio6_14.timer1 */
    {GPIO6_15, (M10 | PIN_INPUT_PULLUP)}, /* gpio6_15.timer2 */
    {GPIO6_16, (M10 | PIN_INPUT_PULLUP)}, /* gpio6_16.timer3 */
    {XREF_CLK0, (M9 | PIN_OUTPUT_PULLDOWN)}, /* xref_clk0.clkout2 */
    {XREF_CLK1, (M14 | PIN_INPUT_PULLDOWN)}, /* xref_clk1.gpio6_18 */
    {XREF_CLK2, (M14 | PIN_INPUT_PULLDOWN)}, /* xref_clk2.gpio6_19 */
    {XREF_CLK3, (M9 | PIN_OUTPUT_PULLDOWN)}, /* xref_clk3.clkout3 */
    {MCASP1_ACLKX, (M10 | PIN_INPUT_PULLUP)}, /* mcasp1_aclkx.i2c3_sda */
    {MCASP1_FSX, (M10 | PIN_INPUT_PULLUP | SLEWCONTROL)}, /* mcasp1_fsx.i2c3_scl */
    {MCASP1_ACLKR, (M10 | PIN_INPUT_PULLUP)}, /* mcasp1_aclkr.i2c4_sda */
    {MCASP1_FSR, (M10 | PIN_INPUT_PULLUP)}, /* mcasp1_fsr.i2c4_scl */
    {MCASP1_AXR0, (M10 | PIN_INPUT_PULLUP | SLEWCONTROL)}, /* mcasp1_axr0.i2c5_sda */
    {MCASP1_AXR1, (M10 | PIN_INPUT_PULLUP | SLEWCONTROL)}, /* mcasp1_axr1.i2c5_scl */
    {MCASP1_AXR2, (M14 | PIN_INPUT_PULLDOWN)}, /* mcasp1_axr2.gpio5_4 */
    {MCASP1_AXR3, (M14 | PIN_INPUT_PULLDOWN)}, /* mcasp1_axr3.gpio5_5 */
    {MCASP1_AXR4, (M14 | PIN_INPUT_PULLDOWN)}, /* mcasp1_axr4.gpio5_6 */
    {MCASP1_AXR5, (M14 | PIN_INPUT_PULLDOWN)}, /* mcasp1_axr5.gpio5_7 */
    {MCASP1_AXR6, (M14 | PIN_INPUT_PULLDOWN)}, /* mcasp1_axr6.gpio5_8 */
    {MCASP1_AXR7, (M14 | PIN_INPUT_PULLDOWN)}, /* mcasp1_axr7.gpio5_9 */
    {MCASP1_AXR8, (M14 | PIN_INPUT | SLEWCONTROL)}, /* mcasp1_axr8.gpio5_10 */
    {MCASP1_AXR9, (M14 | PIN_INPUT | SLEWCONTROL)}, /* mcasp1_axr9.gpio5_11 */
    {MCASP1_AXR10, (M14 | PIN_INPUT | SLEWCONTROL)}, /* mcasp1_axr10.gpio5_12 */
    {MCASP1_AXR11, (M14 | PIN_INPUT_PULLUP | SLEWCONTROL)}, /* mcasp1_axr11.gpio4_17 */
    {MCASP1_AXR12, (M1 | PIN_INPUT_SLEW | VIRTUAL_MODE10)}, /* mcasp1_axr12.mcasp7_axr0 */
    {MCASP1_AXR13, (M1 | PIN_INPUT_SLEW | VIRTUAL_MODE10)}, /* mcasp1_axr13.mcasp7_axr1 */
    {MCASP1_AXR14, (M1 | PIN_INPUT_SLEW | VIRTUAL_MODE10)}, /* mcasp1_axr14.mcasp7_aclkx */
    {MCASP1_AXR15, (M1 | PIN_INPUT_SLEW | VIRTUAL_MODE10)}, /* mcasp1_axr15.mcasp7_fsx */
    {MCASP3_ACLKX, (M0 | PIN_INPUT_PULLDOWN)}, /* mcasp3_aclkx.mcasp3_aclkx */
    {MCASP3_FSX, (M0 | PIN_INPUT_SLEW)}, /* mcasp3_fsx.mcasp3_fsx */
    {MCASP3_AXR0, (M0 | PIN_INPUT_SLEW)}, /* mcasp3_axr0.mcasp3_axr0 */
    {MCASP3_AXR1, (M0 | PIN_INPUT_SLEW)}, /* mcasp3_axr1.mcasp3_axr1 */
    {MCASP4_ACLKX, (M3 | PIN_INPUT_PULLUP)}, /* mcasp4_aclkx.uart8_rxd */
    {MCASP4_FSX, (M3 | PIN_OUTPUT)}, /* mcasp4_fsx.uart8_txd */
    {MCASP4_AXR0, (M3 | PIN_INPUT_PULLUP)}, /* mcasp4_axr0.uart8_ctsn */
    {MCASP4_AXR1, (M3 | PIN_OUTPUT_PULLUP)}, /* mcasp4_axr1.uart8_rtsn */
    {MCASP5_ACLKX, (M3 | PIN_INPUT_PULLUP)}, /* mcasp5_aclkx.uart9_rxd */
    {MCASP5_FSX, (M3 | PIN_OUTPUT)}, /* mcasp5_fsx.uart9_txd */
    {MCASP5_AXR0, (M3 | PIN_INPUT_PULLUP)}, /* mcasp5_axr0.uart9_ctsn */
    {MCASP5_AXR1, (M3 | PIN_OUTPUT_PULLUP)}, /* mcasp5_axr1.uart9_rtsn */
    {MMC1_CLK, (M0 | PIN_INPUT_PULLUP)}, /* mmc1_clk.mmc1_clk */
    {MMC1_CMD, (M0 | PIN_INPUT_PULLUP)}, /* mmc1_cmd.mmc1_cmd */
    {MMC1_DAT0, (M0 | PIN_INPUT_PULLUP)}, /* mmc1_dat0.mmc1_dat0 */
    {MMC1_DAT1, (M0 | PIN_INPUT_PULLUP)}, /* mmc1_dat1.mmc1_dat1 */
    {MMC1_DAT2, (M0 | PIN_INPUT_PULLUP)}, /* mmc1_dat2.mmc1_dat2 */
    {MMC1_DAT3, (M0 | PIN_INPUT_PULLUP)}, /* mmc1_dat3.mmc1_dat3 */
    {MMC1_SDCD, (M14 | PIN_INPUT_PULLUP | SLEWCONTROL)}, /* mmc1_sdcd.gpio6_27 */
    {GPIO6_10, (M10 | PIN_OUTPUT_PULLDOWN)}, /* gpio6_10.ehrpwm2A */
    {GPIO6_11, (M0 | PIN_INPUT_PULLUP)}, /* gpio6_11.gpio6_11 */
    {MMC3_CLK, (M0 | PIN_INPUT_PULLUP | MANUAL_MODE)}, /* mmc3_clk.mmc3_clk */
    {MMC3_CMD, (M0 | PIN_INPUT_PULLUP | MANUAL_MODE)}, /* mmc3_cmd.mmc3_cmd */
    {MMC3_DAT0, (M0 | PIN_INPUT_PULLUP | MANUAL_MODE)}, /* mmc3_dat0.mmc3_dat0 */
    {MMC3_DAT1, (M0 | PIN_INPUT_PULLUP | MANUAL_MODE)}, /* mmc3_dat1.mmc3_dat1 */
    {MMC3_DAT2, (M0 | PIN_INPUT_PULLUP | MANUAL_MODE)}, /* mmc3_dat2.mmc3_dat2 */
    {MMC3_DAT3, (M0 | PIN_INPUT_PULLUP | MANUAL_MODE)}, /* mmc3_dat3.mmc3_dat3 */
    {MMC3_DAT4, (M0 | PIN_INPUT_PULLUP | MANUAL_MODE)}, /* mmc3_dat4.mmc3_dat4 */
    {MMC3_DAT5, (M0 | PIN_INPUT_PULLUP | MANUAL_MODE)}, /* mmc3_dat5.mmc3_dat5 */
    {MMC3_DAT6, (M0 | PIN_INPUT_PULLUP | MANUAL_MODE)}, /* mmc3_dat6.mmc3_dat6 */
    {MMC3_DAT7, (M0 | PIN_INPUT_PULLUP | MANUAL_MODE)}, /* mmc3_dat7.mmc3_dat7 */
    {SPI1_SCLK, (M14 | PIN_INPUT_PULLDOWN)}, /* spi1_sclk.gpio7_7 */
    {SPI1_D1, (M14 | PIN_INPUT_PULLDOWN)}, /* spi1_d1.gpio7_8 */
    {SPI1_D0, (M14 | PIN_INPUT_PULLDOWN)}, /* spi1_d0.gpio7_9 */
    {SPI1_CS0, (M14 | PIN_INPUT)}, /* spi1_cs0.gpio7_10 */
    {SPI1_CS1, (M14 | PIN_INPUT)}, /* spi1_cs1.gpio7_11 */
    {SPI1_CS2, (M14 | PIN_INPUT_SLEW)}, /* spi1_cs2.gpio7_12 */
    {SPI1_CS3, (M6 | PIN_INPUT_PULLUP | SLEWCONTROL)}, /* spi1_cs3.hdmi1_cec */
    {SPI2_SCLK, (M14 | PIN_INPUT_PULLDOWN)}, /* spi2_sclk.gpio7_14 */
    {SPI2_D1, (M14 | PIN_INPUT_SLEW)}, /* spi2_d1.gpio7_15 */
    {SPI2_D0, (M14 | PIN_INPUT_PULLUP | SLEWCONTROL)}, /* spi2_d0.gpio7_16 */
    {SPI2_CS0, (M14 | PIN_INPUT_PULLUP | SLEWCONTROL)}, /* spi2_cs0.gpio7_17 */
    {DCAN1_TX, (M0 | PIN_OUTPUT | SLEWCONTROL)}, /* dcan1_tx.dcan1_tx */
    {DCAN1_RX, (M0 | PIN_INPUT | SLEWCONTROL)}, /* dcan1_rx.dcan1_rx */
    {UART1_RXD, (M0 | PIN_INPUT_PULLUP | SLEWCONTROL)}, /* uart1_rxd.uart1_rxd */
    {UART1_TXD, (M0 | PIN_OUTPUT | SLEWCONTROL)}, /* uart1_txd.uart1_txd */
    {UART1_CTSN, (M14 | PIN_INPUT_PULLDOWN)}, /* uart1_ctsn.gpio7_24 */
    {UART1_RTSN, (M14 | PIN_INPUT)}, /* uart1_rtsn.gpio7_25 */
    {UART2_RXD, (M14 | PIN_INPUT_PULLDOWN)}, /* uart2_rxd.gpio7_26 */
    {UART2_TXD, (M14 | PIN_INPUT_PULLDOWN)}, /* uart2_txd.gpio7_27 */
    {UART2_CTSN, (M2 | PIN_INPUT_PULLUP)}, /* uart2_ctsn.uart3_rxd */
    {UART2_RTSN, (M1 | PIN_OUTPUT)}, /* uart2_rtsn.uart3_txd */
    {I2C1_SDA, (M0 | PIN_INPUT_PULLUP)}, /* i2c1_sda.i2c1_sda */
    {I2C1_SCL, (M0 | PIN_INPUT_PULLUP)}, /* i2c1_scl.i2c1_scl */
    {I2C2_SDA, (M1 | PIN_INPUT_PULLUP)}, /* i2c2_sda.hdmi1_ddc_scl */
    {I2C2_SCL, (M1 | PIN_INPUT_PULLUP)}, /* i2c2_scl.hdmi1_ddc_sda */
    {WAKEUP0, (M0 | PIN_INPUT)}, /* Wakeup0.Wakeup0 */
    {WAKEUP1, (M0 | PIN_INPUT)}, /* Wakeup1.Wakeup1 */
    {WAKEUP2, (M0 | PIN_INPUT)}, /* Wakeup2.Wakeup2 */
    {WAKEUP3, (M0 | PIN_INPUT)}, /* Wakeup3.Wakeup3 */
    {ON_OFF, (M0 | PIN_OUTPUT)}, /* on_off.on_off */
    {RTC_PORZ, (M0 | PIN_INPUT)}, /* rtc_porz.rtc_porz */
    {TMS, (M0 | PIN_INPUT_PULLUP)}, /* tms.tms */
    {TDI, (M0 | PIN_INPUT_PULLUP | SLEWCONTROL)}, /* tdi.tdi */
    {TDO, (M0 | PIN_OUTPUT)}, /* tdo.tdo */
    {TCLK, (M0 | PIN_INPUT_PULLDOWN)}, /* tclk.tclk */
    {TRSTN, (M0 | PIN_INPUT)}, /* trstn.trstn */
    {RTCK, (M0 | PIN_OUTPUT)}, /* rtck.rtck */
    {EMU0, (M0 | PIN_INPUT)}, /* emu0.emu0 */
    {EMU1, (M0 | PIN_INPUT)}, /* emu1.emu1 */
    {NMIN_DSP, (M0 | PIN_INPUT)}, /* nmin_dsp.nmin_dsp */
    {RSTOUTN, (M0 | PIN_OUTPUT)}, /* rstoutn.rstoutn */
    };

    const struct pad_conf_entry core_padconf_array_delta_x15_sr1_1[] = {
    {MMC1_SDWP, (M14 | PIN_INPUT | SLEWCONTROL)}, /* mmc1_sdwp.gpio6_28 */
    {VOUT1_CLK, (M0 | PIN_OUTPUT | SLEWCONTROL)}, /* vout1_clk.vout1_clk */
    {VOUT1_DE, (M0 | PIN_OUTPUT | SLEWCONTROL)}, /* vout1_de.vout1_de */
    {VOUT1_HSYNC, (M0 | PIN_OUTPUT | SLEWCONTROL)}, /* vout1_hsync.vout1_hsync */
    {VOUT1_VSYNC, (M0 | PIN_OUTPUT | SLEWCONTROL)}, /* vout1_vsync.vout1_vsync */
    {VOUT1_D0, (M0 | PIN_OUTPUT | SLEWCONTROL)}, /* vout1_d0.vout1_d0 */
    {VOUT1_D1, (M0 | PIN_OUTPUT | SLEWCONTROL)}, /* vout1_d1.vout1_d1 */
    {VOUT1_D2, (M0 | PIN_OUTPUT | SLEWCONTROL)}, /* vout1_d2.vout1_d2 */
    {VOUT1_D3, (M0 | PIN_OUTPUT | SLEWCONTROL)}, /* vout1_d3.vout1_d3 */
    {VOUT1_D4, (M0 | PIN_OUTPUT | SLEWCONTROL)}, /* vout1_d4.vout1_d4 */
    {VOUT1_D5, (M0 | PIN_OUTPUT | SLEWCONTROL)}, /* vout1_d5.vout1_d5 */
    {VOUT1_D6, (M0 | PIN_OUTPUT | SLEWCONTROL)}, /* vout1_d6.vout1_d6 */
    {VOUT1_D7, (M0 | PIN_OUTPUT | SLEWCONTROL)}, /* vout1_d7.vout1_d7 */
    {VOUT1_D8, (M0 | PIN_OUTPUT | SLEWCONTROL)}, /* vout1_d8.vout1_d8 */
    {VOUT1_D9, (M0 | PIN_OUTPUT | SLEWCONTROL)}, /* vout1_d9.vout1_d9 */
    {VOUT1_D10, (M0 | PIN_OUTPUT | SLEWCONTROL)}, /* vout1_d10.vout1_d10 */
    {VOUT1_D11, (M0 | PIN_OUTPUT | SLEWCONTROL)}, /* vout1_d11.vout1_d11 */
    {VOUT1_D12, (M0 | PIN_OUTPUT | SLEWCONTROL)}, /* vout1_d12.vout1_d12 */
    {VOUT1_D13, (M0 | PIN_OUTPUT | SLEWCONTROL)}, /* vout1_d13.vout1_d13 */
    {VOUT1_D14, (M0 | PIN_OUTPUT | SLEWCONTROL)}, /* vout1_d14.vout1_d14 */
    {VOUT1_D15, (M0 | PIN_OUTPUT | SLEWCONTROL)}, /* vout1_d15.vout1_d15 */
    {VOUT1_D16, (M0 | PIN_OUTPUT | SLEWCONTROL)}, /* vout1_d16.vout1_d16 */
    {VOUT1_D17, (M0 | PIN_OUTPUT | SLEWCONTROL)}, /* vout1_d17.vout1_d17 */
    {VOUT1_D18, (M0 | PIN_OUTPUT | SLEWCONTROL)}, /* vout1_d18.vout1_d18 */
    {VOUT1_D19, (M0 | PIN_OUTPUT | SLEWCONTROL)}, /* vout1_d19.vout1_d19 */
    {VOUT1_D20, (M0 | PIN_OUTPUT | SLEWCONTROL)}, /* vout1_d20.vout1_d20 */
    {VOUT1_D21, (M0 | PIN_OUTPUT | SLEWCONTROL)}, /* vout1_d21.vout1_d21 */
    {VOUT1_D22, (M0 | PIN_OUTPUT | SLEWCONTROL)}, /* vout1_d22.vout1_d22 */
    {VOUT1_D23, (M0 | PIN_OUTPUT | SLEWCONTROL)}, /* vout1_d23.vout1_d23 */
    };

    const struct pad_conf_entry core_padconf_array_delta_x15_sr2_0[] = {
    {VIN1A_CLK0, (M14 | PIN_INPUT)}, /* vin1a_clk0.gpio2_30 */
    {VOUT1_CLK, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_clk.vout1_clk */
    {VOUT1_DE, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_de.vout1_de */
    {VOUT1_HSYNC, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_hsync.vout1_hsync */
    {VOUT1_VSYNC, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_vsync.vout1_vsync */
    {VOUT1_D0, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d0.vout1_d0 */
    {VOUT1_D1, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d1.vout1_d1 */
    {VOUT1_D2, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d2.vout1_d2 */
    {VOUT1_D3, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d3.vout1_d3 */
    {VOUT1_D4, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d4.vout1_d4 */
    {VOUT1_D5, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d5.vout1_d5 */
    {VOUT1_D6, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d6.vout1_d6 */
    {VOUT1_D7, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d7.vout1_d7 */
    {VOUT1_D8, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d8.vout1_d8 */
    {VOUT1_D9, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d9.vout1_d9 */
    {VOUT1_D10, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d10.vout1_d10 */
    {VOUT1_D11, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d11.vout1_d11 */
    {VOUT1_D12, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d12.vout1_d12 */
    {VOUT1_D13, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d13.vout1_d13 */
    {VOUT1_D14, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d14.vout1_d14 */
    {VOUT1_D15, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d15.vout1_d15 */
    {VOUT1_D16, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d16.vout1_d16 */
    {VOUT1_D17, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d17.vout1_d17 */
    {VOUT1_D18, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d18.vout1_d18 */
    {VOUT1_D19, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d19.vout1_d19 */
    {VOUT1_D20, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d20.vout1_d20 */
    {VOUT1_D21, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d21.vout1_d21 */
    {VOUT1_D22, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d22.vout1_d22 */
    {VOUT1_D23, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d23.vout1_d23 */
    };

    const struct pad_conf_entry core_padconf_array_essential_am574x_idk[] = {
    {GPMC_A0, (M6 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_a0.vin4b_d0 */
    {GPMC_A1, (M6 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_a1.vin4b_d1 */
    {GPMC_A2, (M6 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_a2.vin4b_d2 */
    {GPMC_A3, (M6 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_a3.vin4b_d3 */
    {GPMC_A4, (M6 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_a4.vin4b_d4 */
    {GPMC_A5, (M6 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_a5.vin4b_d5 */
    {GPMC_A6, (M6 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_a6.vin4b_d6 */
    {GPMC_A7, (M6 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_a7.vin4b_d7 */
    {GPMC_A8, (M6 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_a8.vin4b_hsync1 */
    {GPMC_A9, (M6 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_a9.vin4b_vsync1 */
    {GPMC_A10, (M6 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_a10.vin4b_clk1 */
    {GPMC_A11, (M6 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_a11.vin4b_de1 */
    {GPMC_A12, (M6 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_a12.vin4b_fld1 */
    {GPMC_A13, (M1 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_a13.qspi1_rtclk */
    {GPMC_A14, (M1 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_a14.qspi1_d3 */
    {GPMC_A15, (M1 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_a15.qspi1_d2 */
    {GPMC_A16, (M1 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_a16.qspi1_d0 */
    {GPMC_A17, (M1 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_a17.qspi1_d1 */
    {GPMC_A18, (M1 | PIN_OUTPUT | MANUAL_MODE)}, /* gpmc_a18.qspi1_sclk */
    {GPMC_A19, (M1 | PIN_INPUT_PULLUP)}, /* gpmc_a19.mmc2_dat4 */
    {GPMC_A20, (M1 | PIN_INPUT_PULLUP)}, /* gpmc_a20.mmc2_dat5 */
    {GPMC_A21, (M1 | PIN_INPUT_PULLUP)}, /* gpmc_a21.mmc2_dat6 */
    {GPMC_A22, (M1 | PIN_INPUT_PULLUP)}, /* gpmc_a22.mmc2_dat7 */
    {GPMC_A23, (M1 | PIN_INPUT_PULLUP)}, /* gpmc_a23.mmc2_clk */
    {GPMC_A24, (M1 | PIN_INPUT_PULLUP)}, /* gpmc_a24.mmc2_dat0 */
    {GPMC_A25, (M1 | PIN_INPUT_PULLUP)}, /* gpmc_a25.mmc2_dat1 */
    {GPMC_A26, (M1 | PIN_INPUT_PULLUP)}, /* gpmc_a26.mmc2_dat2 */
    {GPMC_A27, (M1 | PIN_INPUT_PULLUP)}, /* gpmc_a27.mmc2_dat3 */
    {GPMC_CS1, (M1 | PIN_INPUT_PULLUP)}, /* gpmc_cs1.mmc2_cmd */
    {GPMC_CS2, (M1 | PIN_OUTPUT | MANUAL_MODE)}, /* gpmc_cs2.qspi1_cs0 */
    {VIN1A_D5, (M14 | PIN_OUTPUT)}, /* vin1a_d5.gpio3_9 */
    {VIN1A_D6, (M14 | PIN_OUTPUT)}, /* vin1a_d6.gpio3_10 */
    {VIN1A_D7, (M14 | PIN_OUTPUT)}, /* vin1a_d7.gpio3_11 */
    {VIN1A_D8, (M14 | PIN_OUTPUT)}, /* vin1a_d8.gpio3_12 */
    {VIN1A_D10, (M14 | PIN_INPUT_PULLDOWN)}, /* vin1a_d10.gpio3_14 */
    {VIN1A_D12, (M14 | PIN_INPUT)}, /* vin1a_d12.gpio3_16 */
    {VIN1A_D13, (M14 | PIN_OUTPUT)}, /* vin1a_d13.gpio3_17 */
    {VIN1A_D14, (M14 | PIN_OUTPUT)}, /* vin1a_d14.gpio3_18 */
    {VIN1A_D15, (M14 | PIN_OUTPUT)}, /* vin1a_d15.gpio3_19 */
    {VIN1A_D17, (M14 | PIN_OUTPUT)}, /* vin1a_d17.gpio3_21 */
    {VIN1A_D18, (M14 | PIN_OUTPUT_PULLDOWN)}, /* vin1a_d18.gpio3_22 */
    {VIN1A_D19, (M14 | PIN_OUTPUT_PULLUP)}, /* vin1a_d19.gpio3_23 */
    {VIN1A_D22, (M14 | PIN_INPUT)}, /* vin1a_d22.gpio3_26 */
    {VIN2A_CLK0, (M14 | PIN_INPUT_PULLUP)}, /* vin2a_clk0.gpio3_28 */
    {VIN2A_DE0, (M14 | PIN_INPUT_PULLUP)}, /* vin2a_de0.gpio3_29 */
    {VIN2A_FLD0, (M14 | PIN_INPUT_PULLUP)}, /* vin2a_fld0.gpio3_30 */
    {VIN2A_HSYNC0, (M14 | PIN_INPUT_PULLUP)}, /* vin2a_hsync0.gpio3_31 */
    {VIN2A_VSYNC0, (M14 | PIN_INPUT)}, /* vin2a_vsync0.gpio4_0 */
    {VIN2A_D0, (M11 | PIN_INPUT)}, /* vin2a_d0.pr1_uart0_rxd */
    {VIN2A_D1, (M11 | PIN_OUTPUT)}, /* vin2a_d1.pr1_uart0_txd */
    {VIN2A_D2, (M10 | PIN_OUTPUT)}, /* vin2a_d2.eCAP1_in_PWM1_out */
    {VIN2A_D3, (M11 | PIN_INPUT_PULLDOWN)}, /* vin2a_d3.pr1_edc_latch0_in */
    {VIN2A_D4, (M11 | PIN_OUTPUT)}, /* vin2a_d4.pr1_edc_sync0_out */
    {VIN2A_D5, (M13 | PIN_OUTPUT_PULLDOWN | MANUAL_MODE)}, /* vin2a_d5.pr1_pru1_gpo2 */
    {VIN2A_D10, (M11 | PIN_OUTPUT_PULLDOWN)}, /* vin2a_d10.pr1_mdio_mdclk */
    {VIN2A_D11, (M11 | PIN_INPUT)}, /* vin2a_d11.pr1_mdio_data */
    {VIN2A_D12, (M3 | PIN_OUTPUT_PULLDOWN | MANUAL_MODE)}, /* vin2a_d12.rgmii1_txc */
    {VIN2A_D13, (M3 | PIN_OUTPUT_PULLDOWN | MANUAL_MODE)}, /* vin2a_d13.rgmii1_txctl */
    {VIN2A_D14, (M3 | PIN_OUTPUT_PULLDOWN | MANUAL_MODE)}, /* vin2a_d14.rgmii1_txd3 */
    {VIN2A_D15, (M3 | PIN_OUTPUT_PULLDOWN | MANUAL_MODE)}, /* vin2a_d15.rgmii1_txd2 */
    {VIN2A_D16, (M3 | PIN_OUTPUT_PULLDOWN | MANUAL_MODE)}, /* vin2a_d16.rgmii1_txd1 */
    {VIN2A_D17, (M3 | PIN_OUTPUT_PULLDOWN | MANUAL_MODE)}, /* vin2a_d17.rgmii1_txd0 */
    {VIN2A_D18, (M3 | PIN_INPUT_PULLDOWN | MANUAL_MODE)}, /* vin2a_d18.rgmii1_rxc */
    {VIN2A_D19, (M3 | PIN_INPUT_PULLDOWN | MANUAL_MODE)}, /* vin2a_d19.rgmii1_rxctl */
    {VIN2A_D20, (M3 | PIN_INPUT_PULLUP | MANUAL_MODE)}, /* vin2a_d20.rgmii1_rxd3 */
    {VIN2A_D21, (M3 | PIN_INPUT_PULLUP | MANUAL_MODE)}, /* vin2a_d21.rgmii1_rxd2 */
    {VIN2A_D22, (M3 | PIN_INPUT_PULLUP | MANUAL_MODE)}, /* vin2a_d22.rgmii1_rxd1 */
    {VIN2A_D23, (M3 | PIN_INPUT_PULLUP | MANUAL_MODE)}, /* vin2a_d23.rgmii1_rxd0 */
    {VOUT1_CLK, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_clk.vout1_clk */
    {VOUT1_DE, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_de.vout1_de */
    {VOUT1_FLD, (M14 | PIN_OUTPUT)}, /* vout1_fld.gpio4_21 */
    {VOUT1_HSYNC, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_hsync.vout1_hsync */
    {VOUT1_VSYNC, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_vsync.vout1_vsync */
    {VOUT1_D0, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d0.vout1_d0 */
    {VOUT1_D1, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d1.vout1_d1 */
    {VOUT1_D2, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d2.vout1_d2 */
    {VOUT1_D3, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d3.vout1_d3 */
    {VOUT1_D4, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d4.vout1_d4 */
    {VOUT1_D5, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d5.vout1_d5 */
    {VOUT1_D6, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d6.vout1_d6 */
    {VOUT1_D7, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d7.vout1_d7 */
    {VOUT1_D8, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d8.vout1_d8 */
    {VOUT1_D9, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d9.vout1_d9 */
    {VOUT1_D10, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d10.vout1_d10 */
    {VOUT1_D11, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d11.vout1_d11 */
    {VOUT1_D12, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d12.vout1_d12 */
    {VOUT1_D13, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d13.vout1_d13 */
    {VOUT1_D14, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d14.vout1_d14 */
    {VOUT1_D15, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d15.vout1_d15 */
    {VOUT1_D16, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d16.vout1_d16 */
    {VOUT1_D17, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d17.vout1_d17 */
    {VOUT1_D18, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d18.vout1_d18 */
    {VOUT1_D19, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d19.vout1_d19 */
    {VOUT1_D20, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d20.vout1_d20 */
    {VOUT1_D21, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d21.vout1_d21 */
    {VOUT1_D22, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d22.vout1_d22 */
    {VOUT1_D23, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d23.vout1_d23 */
    {MDIO_MCLK, (M0 | PIN_INPUT_SLEW)}, /* mdio_mclk.mdio_mclk */
    {MDIO_D, (M0 | PIN_INPUT | SLEWCONTROL)}, /* mdio_d.mdio_d */
    {RGMII0_TXC, (M0 | PIN_OUTPUT_PULLDOWN | MANUAL_MODE)}, /* rgmii0_txc.rgmii0_txc */
    {RGMII0_TXCTL, (M0 | PIN_OUTPUT_PULLDOWN | MANUAL_MODE)}, /* rgmii0_txctl.rgmii0_txctl */
    {RGMII0_TXD3, (M0 | PIN_OUTPUT_PULLDOWN | MANUAL_MODE)}, /* rgmii0_txd3.rgmii0_txd3 */
    {RGMII0_TXD2, (M0 | PIN_OUTPUT_PULLDOWN | MANUAL_MODE)}, /* rgmii0_txd2.rgmii0_txd2 */
    {RGMII0_TXD1, (M0 | PIN_OUTPUT_PULLDOWN | MANUAL_MODE)}, /* rgmii0_txd1.rgmii0_txd1 */
    {RGMII0_TXD0, (M0 | PIN_OUTPUT_PULLDOWN | MANUAL_MODE)}, /* rgmii0_txd0.rgmii0_txd0 */
    {RGMII0_RXC, (M0 | PIN_INPUT_PULLDOWN | MANUAL_MODE)}, /* rgmii0_rxc.rgmii0_rxc */
    {RGMII0_RXCTL, (M0 | PIN_INPUT_PULLDOWN | MANUAL_MODE)}, /* rgmii0_rxctl.rgmii0_rxctl */
    {RGMII0_RXD3, (M0 | PIN_INPUT_PULLUP | MANUAL_MODE)}, /* rgmii0_rxd3.rgmii0_rxd3 */
    {RGMII0_RXD2, (M0 | PIN_INPUT_PULLUP | MANUAL_MODE)}, /* rgmii0_rxd2.rgmii0_rxd2 */
    {RGMII0_RXD1, (M0 | PIN_INPUT_PULLUP | MANUAL_MODE)}, /* rgmii0_rxd1.rgmii0_rxd1 */
    {RGMII0_RXD0, (M0 | PIN_INPUT_PULLUP | MANUAL_MODE)}, /* rgmii0_rxd0.rgmii0_rxd0 */
    {USB1_DRVVBUS, (M0 | PIN_OUTPUT | SLEWCONTROL)}, /* usb1_drvvbus.usb1_drvvbus */
    {USB2_DRVVBUS, (M0 | PIN_OUTPUT | SLEWCONTROL)}, /* usb2_drvvbus.usb2_drvvbus */
    {GPIO6_14, (M0 | PIN_OUTPUT)}, /* gpio6_14.gpio6_14 */
    {GPIO6_15, (M0 | PIN_OUTPUT)}, /* gpio6_15.gpio6_15 */
    {GPIO6_16, (M0 | PIN_INPUT_PULLUP)}, /* gpio6_16.gpio6_16 */
    {XREF_CLK0, (M11 | PIN_INPUT_PULLDOWN)}, /* xref_clk0.pr2_mii1_col */
    {XREF_CLK1, (M11 | PIN_INPUT_PULLDOWN)}, /* xref_clk1.pr2_mii1_crs */
    {XREF_CLK2, (M14 | PIN_OUTPUT)}, /* xref_clk2.gpio6_19 */
    {XREF_CLK3, (M9 | PIN_OUTPUT_PULLDOWN)}, /* xref_clk3.clkout3 */
    {MCASP1_ACLKX, (M11 | PIN_OUTPUT_PULLDOWN)}, /* mcasp1_aclkx.pr2_mdio_mdclk */
    {MCASP1_FSX, (M11 | PIN_INPUT | SLEWCONTROL)}, /* mcasp1_fsx.pr2_mdio_data */
    {MCASP1_ACLKR, (M14 | PIN_INPUT)}, /* mcasp1_aclkr.gpio5_0 */
    {MCASP1_FSR, (M14 | PIN_INPUT)}, /* mcasp1_fsr.gpio5_1 */
    {MCASP1_AXR0, (M11 | PIN_INPUT_PULLUP | SLEWCONTROL)}, /* mcasp1_axr0.pr2_mii0_rxer */
    {MCASP1_AXR1, (M11 | PIN_INPUT_PULLUP | SLEWCONTROL)}, /* mcasp1_axr1.pr2_mii_mt0_clk */
    {MCASP1_AXR2, (M14 | PIN_INPUT)}, /* mcasp1_axr2.gpio5_4 */
    {MCASP1_AXR3, (M14 | PIN_INPUT)}, /* mcasp1_axr3.gpio5_5 */
    {MCASP1_AXR4, (M14 | PIN_OUTPUT)}, /* mcasp1_axr4.gpio5_6 */
    {MCASP1_AXR5, (M14 | PIN_OUTPUT)}, /* mcasp1_axr5.gpio5_7 */
    {MCASP1_AXR6, (M14 | PIN_OUTPUT)}, /* mcasp1_axr6.gpio5_8 */
    {MCASP1_AXR7, (M14 | PIN_OUTPUT)}, /* mcasp1_axr7.gpio5_9 */
    {MCASP1_AXR8, (M11 | PIN_OUTPUT_PULLUP | SLEWCONTROL)}, /* mcasp1_axr8.pr2_mii0_txen */
    {MCASP1_AXR9, (M11 | PIN_OUTPUT_PULLUP | SLEWCONTROL)}, /* mcasp1_axr9.pr2_mii0_txd3 */
    {MCASP1_AXR10, (M11 | PIN_OUTPUT_PULLUP | SLEWCONTROL)}, /* mcasp1_axr10.pr2_mii0_txd2 */
    {MCASP1_AXR11, (M11 | PIN_OUTPUT_PULLUP | SLEWCONTROL)}, /* mcasp1_axr11.pr2_mii0_txd1 */
    {MCASP1_AXR12, (M11 | PIN_OUTPUT_PULLUP | SLEWCONTROL)}, /* mcasp1_axr12.pr2_mii0_txd0 */
    {MCASP1_AXR13, (M11 | PIN_INPUT_PULLUP | SLEWCONTROL)}, /* mcasp1_axr13.pr2_mii_mr0_clk */
    {MCASP1_AXR14, (M11 | PIN_INPUT_SLEW)}, /* mcasp1_axr14.pr2_mii0_rxdv */
    {MCASP1_AXR15, (M11 | PIN_INPUT_SLEW)}, /* mcasp1_axr15.pr2_mii0_rxd3 */
    {MCASP2_ACLKX, (M11 | PIN_INPUT_PULLDOWN)}, /* mcasp2_aclkx.pr2_mii0_rxd2 */
    {MCASP2_FSX, (M11 | PIN_INPUT_SLEW)}, /* mcasp2_fsx.pr2_mii0_rxd1 */
    {MCASP2_AXR2, (M11 | PIN_INPUT_SLEW)}, /* mcasp2_axr2.pr2_mii0_rxd0 */
    {MCASP2_AXR3, (M11 | PIN_INPUT_SLEW)}, /* mcasp2_axr3.pr2_mii0_rxlink */
    {MCASP2_AXR4, (M14 | PIN_INPUT)}, /* mcasp2_axr4.gpio1_4 */
    {MCASP2_AXR5, (M14 | PIN_OUTPUT)}, /* mcasp2_axr5.gpio6_7 */
    {MCASP2_AXR6, (M14 | PIN_OUTPUT)}, /* mcasp2_axr6.gpio2_29 */
    {MCASP2_AXR7, (M14 | PIN_INPUT)}, /* mcasp2_axr7.gpio1_5 */
    {MCASP3_ACLKX, (M11 | PIN_INPUT_PULLDOWN)}, /* mcasp3_aclkx.pr2_mii0_crs */
    {MCASP3_FSX, (M11 | PIN_INPUT_SLEW)}, /* mcasp3_fsx.pr2_mii0_col */
    {MCASP3_AXR0, (M11 | PIN_INPUT_PULLUP | SLEWCONTROL)}, /* mcasp3_axr0.pr2_mii1_rxer */
    {MCASP3_AXR1, (M11 | PIN_INPUT_PULLUP | SLEWCONTROL)}, /* mcasp3_axr1.pr2_mii1_rxlink */
    {MCASP4_ACLKX, (M2 | PIN_INPUT)}, /* mcasp4_aclkx.spi3_sclk */
    {MCASP4_FSX, (M2 | PIN_INPUT)}, /* mcasp4_fsx.spi3_d1 */
    {MCASP4_AXR1, (M2 | PIN_INPUT_PULLUP)}, /* mcasp4_axr1.spi3_cs0 */
    {MCASP5_ACLKX, (M13 | PIN_OUTPUT | MANUAL_MODE)}, /* mcasp5_aclkx.pr2_pru1_gpo1 */
    {MCASP5_FSX, (M12 | PIN_INPUT | MANUAL_MODE)}, /* mcasp5_fsx.pr2_pru1_gpi2 */
    {MMC1_CLK, (M0 | PIN_INPUT_PULLUP)}, /* mmc1_clk.mmc1_clk */
    {MMC1_CMD, (M0 | PIN_INPUT_PULLUP)}, /* mmc1_cmd.mmc1_cmd */
    {MMC1_DAT0, (M0 | PIN_INPUT_PULLUP)}, /* mmc1_dat0.mmc1_dat0 */
    {MMC1_DAT1, (M0 | PIN_INPUT_PULLUP)}, /* mmc1_dat1.mmc1_dat1 */
    {MMC1_DAT2, (M0 | PIN_INPUT_PULLUP)}, /* mmc1_dat2.mmc1_dat2 */
    {MMC1_DAT3, (M0 | PIN_INPUT_PULLUP)}, /* mmc1_dat3.mmc1_dat3 */
    {MMC1_SDCD, (M14 | PIN_INPUT | SLEWCONTROL)}, /* mmc1_sdcd.gpio6_27 */
    {MMC1_SDWP, (M14 | PIN_INPUT | SLEWCONTROL)}, /* mmc1_sdwp.gpio6_28 */
    {GPIO6_10, (M11 | PIN_INPUT_PULLUP)}, /* gpio6_10.pr2_mii_mt1_clk */
    {GPIO6_11, (M11 | PIN_OUTPUT_PULLUP)}, /* gpio6_11.pr2_mii1_txen */
    {MMC3_CLK, (M11 | PIN_OUTPUT_PULLUP)}, /* mmc3_clk.pr2_mii1_txd3 */
    {MMC3_CMD, (M11 | PIN_OUTPUT_PULLUP)}, /* mmc3_cmd.pr2_mii1_txd2 */
    {MMC3_DAT0, (M11 | PIN_OUTPUT_PULLUP)}, /* mmc3_dat0.pr2_mii1_txd1 */
    {MMC3_DAT1, (M11 | PIN_OUTPUT_PULLUP)}, /* mmc3_dat1.pr2_mii1_txd0 */
    {MMC3_DAT2, (M11 | PIN_INPUT_PULLUP)}, /* mmc3_dat2.pr2_mii_mr1_clk */
    {MMC3_DAT3, (M11 | PIN_INPUT_PULLDOWN)}, /* mmc3_dat3.pr2_mii1_rxdv */
    {MMC3_DAT4, (M11 | PIN_INPUT_PULLDOWN)}, /* mmc3_dat4.pr2_mii1_rxd3 */
    {MMC3_DAT5, (M11 | PIN_INPUT_PULLDOWN)}, /* mmc3_dat5.pr2_mii1_rxd2 */
    {MMC3_DAT6, (M11 | PIN_INPUT_PULLDOWN)}, /* mmc3_dat6.pr2_mii1_rxd1 */
    {MMC3_DAT7, (M11 | PIN_INPUT_PULLDOWN)}, /* mmc3_dat7.pr2_mii1_rxd0 */
    {SPI1_SCLK, (M14 | PIN_OUTPUT)}, /* spi1_sclk.gpio7_7 */
    {SPI1_D1, (M14 | PIN_OUTPUT)}, /* spi1_d1.gpio7_8 */
    {SPI1_D0, (M14 | PIN_OUTPUT)}, /* spi1_d0.gpio7_9 */
    {SPI1_CS0, (M14 | PIN_OUTPUT)}, /* spi1_cs0.gpio7_10 */
    {SPI1_CS1, (M14 | PIN_OUTPUT)}, /* spi1_cs1.gpio7_11 */
    {SPI1_CS2, (M14 | PIN_INPUT_SLEW)}, /* spi1_cs2.gpio7_12 */
    {SPI1_CS3, (M6 | PIN_INPUT_PULLUP | SLEWCONTROL)}, /* spi1_cs3.hdmi1_cec */
    {SPI2_SCLK, (M0 | PIN_INPUT)}, /* spi2_sclk.spi2_sclk */
    {SPI2_D1, (M0 | PIN_INPUT | SLEWCONTROL)}, /* spi2_d1.spi2_d1 */
    {SPI2_D0, (M0 | PIN_INPUT | SLEWCONTROL)}, /* spi2_d0.spi2_d0 */
    {SPI2_CS0, (M0 | PIN_INPUT | SLEWCONTROL)}, /* spi2_cs0.spi2_cs0 */
    {DCAN1_TX, (M15 | PULL_UP)}, /* dcan1_tx.safe for dcan1_tx */
    {DCAN1_RX, (M15 | PULL_UP)}, /* dcan1_rx.safe for dcan1_rx */
    {UART1_RXD, (M14 | PIN_OUTPUT | SLEWCONTROL)}, /* uart1_rxd.gpio7_22 */
    {UART1_TXD, (M14 | PIN_OUTPUT | SLEWCONTROL)}, /* uart1_txd.gpio7_23 */
    {UART2_RXD, (M4 | PIN_INPUT)}, /* uart2_rxd.uart2_rxd */
    {UART2_TXD, (M0 | PIN_OUTPUT)}, /* uart2_txd.uart2_txd */
    {UART2_CTSN, (M2 | PIN_INPUT)}, /* uart2_ctsn.uart3_rxd */
    {UART2_RTSN, (M1 | PIN_OUTPUT)}, /* uart2_rtsn.uart3_txd */
    {I2C1_SDA, (M0 | PIN_INPUT)}, /* i2c1_sda.i2c1_sda */
    {I2C1_SCL, (M0 | PIN_INPUT)}, /* i2c1_scl.i2c1_scl */
    {I2C2_SDA, (M1 | PIN_INPUT)}, /* i2c2_sda.hdmi1_ddc_scl */
    {I2C2_SCL, (M1 | PIN_INPUT)}, /* i2c2_scl.hdmi1_ddc_sda */
    {WAKEUP0, (M0 | PIN_INPUT)}, /* Wakeup0.Wakeup0 */
    {WAKEUP1, (M0 | PIN_INPUT)}, /* Wakeup1.Wakeup1 */
    {WAKEUP2, (M0 | PIN_INPUT)}, /* Wakeup2.Wakeup2 */
    {WAKEUP3, (M0 | PIN_INPUT)}, /* Wakeup3.Wakeup3 */
    {ON_OFF, (M0 | PIN_OUTPUT)}, /* on_off.on_off */
    {RTC_PORZ, (M0 | PIN_INPUT)}, /* rtc_porz.rtc_porz */
    {TMS, (M0 | PIN_INPUT_PULLUP)}, /* tms.tms */
    {TDI, (M0 | PIN_INPUT_PULLUP | SLEWCONTROL)}, /* tdi.tdi */
    {TDO, (M0 | PIN_OUTPUT_PULLUP)}, /* tdo.tdo */
    {TCLK, (M0 | PIN_INPUT_PULLUP)}, /* tclk.tclk */
    {TRSTN, (M0 | PIN_INPUT_PULLDOWN)}, /* trstn.trstn */
    {RTCK, (M0 | PIN_OUTPUT_PULLUP)}, /* rtck.rtck */
    {EMU0, (M0 | PIN_INPUT_PULLUP)}, /* emu0.emu0 */
    {EMU1, (M0 | PIN_INPUT_PULLUP)}, /* emu1.emu1 */
    {RESETN, (M0 | PIN_INPUT)}, /* resetn.resetn */
    {NMIN_DSP, (M0 | PIN_INPUT)}, /* nmin_dsp.nmin_dsp */
    {RSTOUTN, (M0 | PIN_OUTPUT)}, /* rstoutn.rstoutn */
    };

    const struct pad_conf_entry core_padconf_array_essential_am572x_idk[] = {
    {GPMC_A0, (M6 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_a0.vin4b_d0 */
    {GPMC_A1, (M6 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_a1.vin4b_d1 */
    {GPMC_A2, (M6 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_a2.vin4b_d2 */
    {GPMC_A3, (M6 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_a3.vin4b_d3 */
    {GPMC_A4, (M6 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_a4.vin4b_d4 */
    {GPMC_A5, (M6 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_a5.vin4b_d5 */
    {GPMC_A6, (M6 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_a6.vin4b_d6 */
    {GPMC_A7, (M6 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_a7.vin4b_d7 */
    {GPMC_A8, (M6 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_a8.vin4b_hsync1 */
    {GPMC_A9, (M6 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_a9.vin4b_vsync1 */
    {GPMC_A10, (M6 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_a10.vin4b_clk1 */
    {GPMC_A11, (M6 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_a11.vin4b_de1 */
    {GPMC_A12, (M6 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_a12.vin4b_fld1 */
    {GPMC_A13, (M1 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_a13.qspi1_rtclk */
    {GPMC_A14, (M1 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_a14.qspi1_d3 */
    {GPMC_A15, (M1 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_a15.qspi1_d2 */
    {GPMC_A16, (M1 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_a16.qspi1_d0 */
    {GPMC_A17, (M1 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_a17.qspi1_d1 */
    {GPMC_A18, (M1 | PIN_OUTPUT | MANUAL_MODE)}, /* gpmc_a18.qspi1_sclk */
    {GPMC_A19, (M1 | PIN_INPUT_PULLUP)}, /* gpmc_a19.mmc2_dat4 */
    {GPMC_A20, (M1 | PIN_INPUT_PULLUP)}, /* gpmc_a20.mmc2_dat5 */
    {GPMC_A21, (M1 | PIN_INPUT_PULLUP)}, /* gpmc_a21.mmc2_dat6 */
    {GPMC_A22, (M1 | PIN_INPUT_PULLUP)}, /* gpmc_a22.mmc2_dat7 */
    {GPMC_A23, (M1 | PIN_INPUT_PULLUP)}, /* gpmc_a23.mmc2_clk */
    {GPMC_A24, (M1 | PIN_INPUT_PULLUP)}, /* gpmc_a24.mmc2_dat0 */
    {GPMC_A25, (M1 | PIN_INPUT_PULLUP)}, /* gpmc_a25.mmc2_dat1 */
    {GPMC_A26, (M1 | PIN_INPUT_PULLUP)}, /* gpmc_a26.mmc2_dat2 */
    {GPMC_A27, (M1 | PIN_INPUT_PULLUP)}, /* gpmc_a27.mmc2_dat3 */
    {GPMC_CS1, (M1 | PIN_INPUT_PULLUP)}, /* gpmc_cs1.mmc2_cmd */
    {GPMC_CS2, (M1 | PIN_OUTPUT | MANUAL_MODE)}, /* gpmc_cs2.qspi1_cs0 */
    {VIN1A_D5, (M14 | PIN_OUTPUT)}, /* vin1a_d5.gpio3_9 */
    {VIN1A_D6, (M14 | PIN_OUTPUT)}, /* vin1a_d6.gpio3_10 */
    {VIN1A_D7, (M14 | PIN_OUTPUT)}, /* vin1a_d7.gpio3_11 */
    {VIN1A_D8, (M14 | PIN_OUTPUT)}, /* vin1a_d8.gpio3_12 */
    {VIN1A_D10, (M14 | PIN_INPUT_PULLDOWN)}, /* vin1a_d10.gpio3_14 */
    {VIN1A_D12, (M14 | PIN_INPUT)}, /* vin1a_d12.gpio3_16 */
    {VIN1A_D13, (M14 | PIN_OUTPUT)}, /* vin1a_d13.gpio3_17 */
    {VIN1A_D14, (M14 | PIN_OUTPUT)}, /* vin1a_d14.gpio3_18 */
    {VIN1A_D15, (M14 | PIN_OUTPUT)}, /* vin1a_d15.gpio3_19 */
    {VIN1A_D17, (M14 | PIN_OUTPUT)}, /* vin1a_d17.gpio3_21 */
    {VIN1A_D18, (M14 | PIN_OUTPUT_PULLDOWN)}, /* vin1a_d18.gpio3_22 */
    {VIN1A_D19, (M14 | PIN_OUTPUT_PULLUP)}, /* vin1a_d19.gpio3_23 */
    {VIN1A_D22, (M14 | PIN_INPUT)}, /* vin1a_d22.gpio3_26 */
    {VIN2A_CLK0, (M14 | PIN_INPUT_PULLUP)}, /* vin2a_clk0.gpio3_28 */
    {VIN2A_DE0, (M14 | PIN_INPUT_PULLUP)}, /* vin2a_de0.gpio3_29 */
    {VIN2A_FLD0, (M14 | PIN_INPUT_PULLUP)}, /* vin2a_fld0.gpio3_30 */
    {VIN2A_HSYNC0, (M14 | PIN_INPUT_PULLUP)}, /* vin2a_hsync0.gpio3_31 */
    {VIN2A_VSYNC0, (M14 | PIN_INPUT)}, /* vin2a_vsync0.gpio4_0 */
    {VIN2A_D0, (M11 | PIN_INPUT)}, /* vin2a_d0.pr1_uart0_rxd */
    {VIN2A_D1, (M11 | PIN_OUTPUT)}, /* vin2a_d1.pr1_uart0_txd */
    {VIN2A_D2, (M10 | PIN_OUTPUT)}, /* vin2a_d2.eCAP1_in_PWM1_out */
    {VIN2A_D3, (M11 | PIN_INPUT_PULLDOWN)}, /* vin2a_d3.pr1_edc_latch0_in */
    {VIN2A_D4, (M11 | PIN_OUTPUT)}, /* vin2a_d4.pr1_edc_sync0_out */
    {VIN2A_D5, (M13 | PIN_OUTPUT_PULLDOWN | MANUAL_MODE)}, /* vin2a_d5.pr1_pru1_gpo2 */
    {VIN2A_D10, (M11 | PIN_OUTPUT_PULLDOWN)}, /* vin2a_d10.pr1_mdio_mdclk */
    {VIN2A_D11, (M11 | PIN_INPUT)}, /* vin2a_d11.pr1_mdio_data */
    {VIN2A_D12, (M3 | PIN_OUTPUT_PULLDOWN | MANUAL_MODE)}, /* vin2a_d12.rgmii1_txc */
    {VIN2A_D13, (M3 | PIN_OUTPUT_PULLDOWN | MANUAL_MODE)}, /* vin2a_d13.rgmii1_txctl */
    {VIN2A_D14, (M3 | PIN_OUTPUT_PULLDOWN | MANUAL_MODE)}, /* vin2a_d14.rgmii1_txd3 */
    {VIN2A_D15, (M3 | PIN_OUTPUT_PULLDOWN | MANUAL_MODE)}, /* vin2a_d15.rgmii1_txd2 */
    {VIN2A_D16, (M3 | PIN_OUTPUT_PULLDOWN | MANUAL_MODE)}, /* vin2a_d16.rgmii1_txd1 */
    {VIN2A_D17, (M3 | PIN_OUTPUT_PULLDOWN | MANUAL_MODE)}, /* vin2a_d17.rgmii1_txd0 */
    {VIN2A_D18, (M3 | PIN_INPUT_PULLDOWN | MANUAL_MODE)}, /* vin2a_d18.rgmii1_rxc */
    {VIN2A_D19, (M3 | PIN_INPUT_PULLDOWN | MANUAL_MODE)}, /* vin2a_d19.rgmii1_rxctl */
    {VIN2A_D20, (M3 | PIN_INPUT_PULLUP | MANUAL_MODE)}, /* vin2a_d20.rgmii1_rxd3 */
    {VIN2A_D21, (M3 | PIN_INPUT_PULLUP | MANUAL_MODE)}, /* vin2a_d21.rgmii1_rxd2 */
    {VIN2A_D22, (M3 | PIN_INPUT_PULLUP | MANUAL_MODE)}, /* vin2a_d22.rgmii1_rxd1 */
    {VIN2A_D23, (M3 | PIN_INPUT_PULLUP | MANUAL_MODE)}, /* vin2a_d23.rgmii1_rxd0 */
    {VOUT1_CLK, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_clk.vout1_clk */
    {VOUT1_DE, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_de.vout1_de */
    {VOUT1_FLD, (M14 | PIN_OUTPUT)}, /* vout1_fld.gpio4_21 */
    {VOUT1_HSYNC, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_hsync.vout1_hsync */
    {VOUT1_VSYNC, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_vsync.vout1_vsync */
    {VOUT1_D0, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d0.vout1_d0 */
    {VOUT1_D1, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d1.vout1_d1 */
    {VOUT1_D2, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d2.vout1_d2 */
    {VOUT1_D3, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d3.vout1_d3 */
    {VOUT1_D4, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d4.vout1_d4 */
    {VOUT1_D5, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d5.vout1_d5 */
    {VOUT1_D6, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d6.vout1_d6 */
    {VOUT1_D7, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d7.vout1_d7 */
    {VOUT1_D8, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d8.vout1_d8 */
    {VOUT1_D9, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d9.vout1_d9 */
    {VOUT1_D10, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d10.vout1_d10 */
    {VOUT1_D11, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d11.vout1_d11 */
    {VOUT1_D12, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d12.vout1_d12 */
    {VOUT1_D13, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d13.vout1_d13 */
    {VOUT1_D14, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d14.vout1_d14 */
    {VOUT1_D15, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d15.vout1_d15 */
    {VOUT1_D16, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d16.vout1_d16 */
    {VOUT1_D17, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d17.vout1_d17 */
    {VOUT1_D18, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d18.vout1_d18 */
    {VOUT1_D19, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d19.vout1_d19 */
    {VOUT1_D20, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d20.vout1_d20 */
    {VOUT1_D21, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d21.vout1_d21 */
    {VOUT1_D22, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d22.vout1_d22 */
    {VOUT1_D23, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d23.vout1_d23 */
    {MDIO_MCLK, (M0 | PIN_INPUT_SLEW)}, /* mdio_mclk.mdio_mclk */
    {MDIO_D, (M0 | PIN_INPUT | SLEWCONTROL)}, /* mdio_d.mdio_d */
    {RGMII0_TXC, (M0 | PIN_OUTPUT_PULLDOWN | MANUAL_MODE)}, /* rgmii0_txc.rgmii0_txc */
    {RGMII0_TXCTL, (M0 | PIN_OUTPUT_PULLDOWN | MANUAL_MODE)}, /* rgmii0_txctl.rgmii0_txctl */
    {RGMII0_TXD3, (M0 | PIN_OUTPUT_PULLDOWN | MANUAL_MODE)}, /* rgmii0_txd3.rgmii0_txd3 */
    {RGMII0_TXD2, (M0 | PIN_OUTPUT_PULLDOWN | MANUAL_MODE)}, /* rgmii0_txd2.rgmii0_txd2 */
    {RGMII0_TXD1, (M0 | PIN_OUTPUT_PULLDOWN | MANUAL_MODE)}, /* rgmii0_txd1.rgmii0_txd1 */
    {RGMII0_TXD0, (M0 | PIN_OUTPUT_PULLDOWN | MANUAL_MODE)}, /* rgmii0_txd0.rgmii0_txd0 */
    {RGMII0_RXC, (M0 | PIN_INPUT_PULLDOWN | MANUAL_MODE)}, /* rgmii0_rxc.rgmii0_rxc */
    {RGMII0_RXCTL, (M0 | PIN_INPUT_PULLDOWN | MANUAL_MODE)}, /* rgmii0_rxctl.rgmii0_rxctl */
    {RGMII0_RXD3, (M0 | PIN_INPUT_PULLUP | MANUAL_MODE)}, /* rgmii0_rxd3.rgmii0_rxd3 */
    {RGMII0_RXD2, (M0 | PIN_INPUT_PULLUP | MANUAL_MODE)}, /* rgmii0_rxd2.rgmii0_rxd2 */
    {RGMII0_RXD1, (M0 | PIN_INPUT_PULLUP | MANUAL_MODE)}, /* rgmii0_rxd1.rgmii0_rxd1 */
    {RGMII0_RXD0, (M0 | PIN_INPUT_PULLUP | MANUAL_MODE)}, /* rgmii0_rxd0.rgmii0_rxd0 */
    {USB1_DRVVBUS, (M0 | PIN_OUTPUT | SLEWCONTROL)}, /* usb1_drvvbus.usb1_drvvbus */
    {USB2_DRVVBUS, (M0 | PIN_OUTPUT | SLEWCONTROL)}, /* usb2_drvvbus.usb2_drvvbus */
    {GPIO6_14, (M0 | PIN_OUTPUT)}, /* gpio6_14.gpio6_14 */
    {GPIO6_15, (M0 | PIN_OUTPUT)}, /* gpio6_15.gpio6_15 */
    {GPIO6_16, (M0 | PIN_INPUT_PULLUP)}, /* gpio6_16.gpio6_16 */
    {XREF_CLK0, (M11 | PIN_INPUT_PULLDOWN)}, /* xref_clk0.pr2_mii1_col */
    {XREF_CLK1, (M11 | PIN_INPUT_PULLDOWN)}, /* xref_clk1.pr2_mii1_crs */
    {XREF_CLK2, (M14 | PIN_OUTPUT)}, /* xref_clk2.gpio6_19 */
    {XREF_CLK3, (M9 | PIN_OUTPUT_PULLDOWN)}, /* xref_clk3.clkout3 */
    {MCASP1_ACLKX, (M11 | PIN_OUTPUT_PULLDOWN)}, /* mcasp1_aclkx.pr2_mdio_mdclk */
    {MCASP1_FSX, (M11 | PIN_INPUT | SLEWCONTROL)}, /* mcasp1_fsx.pr2_mdio_data */
    {MCASP1_ACLKR, (M14 | PIN_INPUT)}, /* mcasp1_aclkr.gpio5_0 */
    {MCASP1_FSR, (M14 | PIN_INPUT)}, /* mcasp1_fsr.gpio5_1 */
    {MCASP1_AXR0, (M11 | PIN_INPUT_PULLUP | SLEWCONTROL)}, /* mcasp1_axr0.pr2_mii0_rxer */
    {MCASP1_AXR1, (M11 | PIN_INPUT_PULLUP | SLEWCONTROL)}, /* mcasp1_axr1.pr2_mii_mt0_clk */
    {MCASP1_AXR2, (M14 | PIN_INPUT)}, /* mcasp1_axr2.gpio5_4 */
    {MCASP1_AXR3, (M14 | PIN_INPUT)}, /* mcasp1_axr3.gpio5_5 */
    {MCASP1_AXR4, (M14 | PIN_OUTPUT)}, /* mcasp1_axr4.gpio5_6 */
    {MCASP1_AXR5, (M14 | PIN_OUTPUT)}, /* mcasp1_axr5.gpio5_7 */
    {MCASP1_AXR6, (M14 | PIN_OUTPUT)}, /* mcasp1_axr6.gpio5_8 */
    {MCASP1_AXR7, (M14 | PIN_OUTPUT)}, /* mcasp1_axr7.gpio5_9 */
    {MCASP1_AXR8, (M11 | PIN_OUTPUT_PULLUP | SLEWCONTROL)}, /* mcasp1_axr8.pr2_mii0_txen */
    {MCASP1_AXR9, (M11 | PIN_OUTPUT_PULLUP | SLEWCONTROL)}, /* mcasp1_axr9.pr2_mii0_txd3 */
    {MCASP1_AXR10, (M11 | PIN_OUTPUT_PULLUP | SLEWCONTROL)}, /* mcasp1_axr10.pr2_mii0_txd2 */
    {MCASP1_AXR11, (M11 | PIN_OUTPUT_PULLUP | SLEWCONTROL)}, /* mcasp1_axr11.pr2_mii0_txd1 */
    {MCASP1_AXR12, (M11 | PIN_OUTPUT_PULLUP | SLEWCONTROL)}, /* mcasp1_axr12.pr2_mii0_txd0 */
    {MCASP1_AXR13, (M11 | PIN_INPUT_PULLUP | SLEWCONTROL)}, /* mcasp1_axr13.pr2_mii_mr0_clk */
    {MCASP1_AXR14, (M11 | PIN_INPUT_SLEW)}, /* mcasp1_axr14.pr2_mii0_rxdv */
    {MCASP1_AXR15, (M11 | PIN_INPUT_SLEW)}, /* mcasp1_axr15.pr2_mii0_rxd3 */
    {MCASP2_ACLKX, (M11 | PIN_INPUT_PULLDOWN)}, /* mcasp2_aclkx.pr2_mii0_rxd2 */
    {MCASP2_FSX, (M11 | PIN_INPUT_SLEW)}, /* mcasp2_fsx.pr2_mii0_rxd1 */
    {MCASP2_AXR2, (M11 | PIN_INPUT_SLEW)}, /* mcasp2_axr2.pr2_mii0_rxd0 */
    {MCASP2_AXR3, (M11 | PIN_INPUT_SLEW)}, /* mcasp2_axr3.pr2_mii0_rxlink */
    {MCASP2_AXR4, (M14 | PIN_OUTPUT)}, /* mcasp2_axr4.gpio1_4 */
    {MCASP2_AXR5, (M14 | PIN_OUTPUT)}, /* mcasp2_axr5.gpio6_7 */
    {MCASP2_AXR6, (M14 | PIN_OUTPUT)}, /* mcasp2_axr6.gpio2_29 */
    {MCASP2_AXR7, (M14 | PIN_OUTPUT)}, /* mcasp2_axr7.gpio1_5 */
    {MCASP3_ACLKX, (M11 | PIN_INPUT_PULLDOWN)}, /* mcasp3_aclkx.pr2_mii0_crs */
    {MCASP3_FSX, (M11 | PIN_INPUT_SLEW)}, /* mcasp3_fsx.pr2_mii0_col */
    {MCASP3_AXR0, (M11 | PIN_INPUT_PULLUP | SLEWCONTROL)}, /* mcasp3_axr0.pr2_mii1_rxer */
    {MCASP3_AXR1, (M11 | PIN_INPUT_PULLUP | SLEWCONTROL)}, /* mcasp3_axr1.pr2_mii1_rxlink */
    {MCASP4_ACLKX, (M2 | PIN_INPUT)}, /* mcasp4_aclkx.spi3_sclk */
    {MCASP4_FSX, (M2 | PIN_INPUT)}, /* mcasp4_fsx.spi3_d1 */
    {MCASP4_AXR1, (M2 | PIN_INPUT_PULLUP)}, /* mcasp4_axr1.spi3_cs0 */
    {MCASP5_ACLKX, (M13 | PIN_OUTPUT | MANUAL_MODE)}, /* mcasp5_aclkx.pr2_pru1_gpo1 */
    {MCASP5_FSX, (M12 | PIN_INPUT | MANUAL_MODE)}, /* mcasp5_fsx.pr2_pru1_gpi2 */
    {MMC1_CLK, (M0 | PIN_INPUT_PULLUP)}, /* mmc1_clk.mmc1_clk */
    {MMC1_CMD, (M0 | PIN_INPUT_PULLUP)}, /* mmc1_cmd.mmc1_cmd */
    {MMC1_DAT0, (M0 | PIN_INPUT_PULLUP)}, /* mmc1_dat0.mmc1_dat0 */
    {MMC1_DAT1, (M0 | PIN_INPUT_PULLUP)}, /* mmc1_dat1.mmc1_dat1 */
    {MMC1_DAT2, (M0 | PIN_INPUT_PULLUP)}, /* mmc1_dat2.mmc1_dat2 */
    {MMC1_DAT3, (M0 | PIN_INPUT_PULLUP)}, /* mmc1_dat3.mmc1_dat3 */
    {MMC1_SDCD, (M14 | PIN_INPUT | SLEWCONTROL)}, /* mmc1_sdcd.gpio6_27 */
    {MMC1_SDWP, (M14 | PIN_INPUT | SLEWCONTROL)}, /* mmc1_sdwp.gpio6_28 */
    {GPIO6_10, (M11 | PIN_INPUT_PULLUP)}, /* gpio6_10.pr2_mii_mt1_clk */
    {GPIO6_11, (M11 | PIN_OUTPUT_PULLUP)}, /* gpio6_11.pr2_mii1_txen */
    {MMC3_CLK, (M11 | PIN_OUTPUT_PULLUP)}, /* mmc3_clk.pr2_mii1_txd3 */
    {MMC3_CMD, (M11 | PIN_OUTPUT_PULLUP)}, /* mmc3_cmd.pr2_mii1_txd2 */
    {MMC3_DAT0, (M11 | PIN_OUTPUT_PULLUP)}, /* mmc3_dat0.pr2_mii1_txd1 */
    {MMC3_DAT1, (M11 | PIN_OUTPUT_PULLUP)}, /* mmc3_dat1.pr2_mii1_txd0 */
    {MMC3_DAT2, (M11 | PIN_INPUT_PULLUP)}, /* mmc3_dat2.pr2_mii_mr1_clk */
    {MMC3_DAT3, (M11 | PIN_INPUT_PULLDOWN)}, /* mmc3_dat3.pr2_mii1_rxdv */
    {MMC3_DAT4, (M11 | PIN_INPUT_PULLDOWN)}, /* mmc3_dat4.pr2_mii1_rxd3 */
    {MMC3_DAT5, (M11 | PIN_INPUT_PULLDOWN)}, /* mmc3_dat5.pr2_mii1_rxd2 */
    {MMC3_DAT6, (M11 | PIN_INPUT_PULLDOWN)}, /* mmc3_dat6.pr2_mii1_rxd1 */
    {MMC3_DAT7, (M11 | PIN_INPUT_PULLDOWN)}, /* mmc3_dat7.pr2_mii1_rxd0 */
    {SPI1_SCLK, (M14 | PIN_OUTPUT)}, /* spi1_sclk.gpio7_7 */
    {SPI1_D1, (M14 | PIN_OUTPUT)}, /* spi1_d1.gpio7_8 */
    {SPI1_D0, (M14 | PIN_OUTPUT)}, /* spi1_d0.gpio7_9 */
    {SPI1_CS0, (M14 | PIN_OUTPUT)}, /* spi1_cs0.gpio7_10 */
    {SPI1_CS1, (M14 | PIN_OUTPUT)}, /* spi1_cs1.gpio7_11 */
    {SPI1_CS2, (M14 | PIN_INPUT_SLEW)}, /* spi1_cs2.gpio7_12 */
    {SPI1_CS3, (M6 | PIN_INPUT_PULLUP | SLEWCONTROL)}, /* spi1_cs3.hdmi1_cec */
    {SPI2_SCLK, (M0 | PIN_INPUT)}, /* spi2_sclk.spi2_sclk */
    {SPI2_D1, (M0 | PIN_INPUT | SLEWCONTROL)}, /* spi2_d1.spi2_d1 */
    {SPI2_D0, (M0 | PIN_INPUT | SLEWCONTROL)}, /* spi2_d0.spi2_d0 */
    {SPI2_CS0, (M0 | PIN_INPUT | SLEWCONTROL)}, /* spi2_cs0.spi2_cs0 */
    {DCAN1_TX, (M15 | PULL_UP)}, /* dcan1_tx.safe for dcan1_tx */
    {DCAN1_RX, (M15 | PULL_UP)}, /* dcan1_rx.safe for dcan1_rx */
    {UART1_RXD, (M14 | PIN_OUTPUT | SLEWCONTROL)}, /* uart1_rxd.gpio7_22 */
    {UART1_TXD, (M14 | PIN_OUTPUT | SLEWCONTROL)}, /* uart1_txd.gpio7_23 */
    {UART2_RXD, (M4 | PIN_INPUT)}, /* uart2_rxd.uart2_rxd */
    {UART2_TXD, (M0 | PIN_OUTPUT)}, /* uart2_txd.uart2_txd */
    {UART2_CTSN, (M2 | PIN_INPUT)}, /* uart2_ctsn.uart3_rxd */
    {UART2_RTSN, (M1 | PIN_OUTPUT)}, /* uart2_rtsn.uart3_txd */
    {I2C1_SDA, (M0 | PIN_INPUT)}, /* i2c1_sda.i2c1_sda */
    {I2C1_SCL, (M0 | PIN_INPUT)}, /* i2c1_scl.i2c1_scl */
    {I2C2_SDA, (M1 | PIN_INPUT)}, /* i2c2_sda.hdmi1_ddc_scl */
    {I2C2_SCL, (M1 | PIN_INPUT)}, /* i2c2_scl.hdmi1_ddc_sda */
    {WAKEUP0, (M0 | PIN_INPUT)}, /* Wakeup0.Wakeup0 */
    {WAKEUP1, (M0 | PIN_INPUT)}, /* Wakeup1.Wakeup1 */
    {WAKEUP2, (M0 | PIN_INPUT)}, /* Wakeup2.Wakeup2 */
    {WAKEUP3, (M0 | PIN_INPUT)}, /* Wakeup3.Wakeup3 */
    {ON_OFF, (M0 | PIN_OUTPUT)}, /* on_off.on_off */
    {RTC_PORZ, (M0 | PIN_INPUT)}, /* rtc_porz.rtc_porz */
    {TMS, (M0 | PIN_INPUT_PULLUP)}, /* tms.tms */
    {TDI, (M0 | PIN_INPUT_PULLUP | SLEWCONTROL)}, /* tdi.tdi */
    {TDO, (M0 | PIN_OUTPUT_PULLUP)}, /* tdo.tdo */
    {TCLK, (M0 | PIN_INPUT_PULLUP)}, /* tclk.tclk */
    {TRSTN, (M0 | PIN_INPUT_PULLDOWN)}, /* trstn.trstn */
    {RTCK, (M0 | PIN_OUTPUT_PULLUP)}, /* rtck.rtck */
    {EMU0, (M0 | PIN_INPUT_PULLUP)}, /* emu0.emu0 */
    {EMU1, (M0 | PIN_INPUT_PULLUP)}, /* emu1.emu1 */
    {RESETN, (M0 | PIN_INPUT)}, /* resetn.resetn */
    {NMIN_DSP, (M0 | PIN_INPUT)}, /* nmin_dsp.nmin_dsp */
    {RSTOUTN, (M0 | PIN_OUTPUT)}, /* rstoutn.rstoutn */
    };

    const struct pad_conf_entry core_padconf_array_essential_am571x_idk[] = {
    {GPMC_A0, (M6 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_a0.vin1b_d0 */
    {GPMC_A1, (M6 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_a1.vin1b_d1 */
    {GPMC_A2, (M6 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_a2.vin1b_d2 */
    {GPMC_A3, (M6 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_a3.vin1b_d3 */
    {GPMC_A4, (M6 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_a4.vin1b_d4 */
    {GPMC_A5, (M6 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_a5.vin1b_d5 */
    {GPMC_A6, (M6 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_a6.vin1b_d6 */
    {GPMC_A7, (M6 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_a7.vin1b_d7 */
    {GPMC_A8, (M6 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_a8.vin1b_hsync1 */
    {GPMC_A9, (M6 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_a9.vin1b_vsync1 */
    {GPMC_A10, (M6 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_a10.vin1b_clk1 */
    {GPMC_A11, (M6 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_a11.vin1b_de1 */
    {GPMC_A12, (M6 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_a12.vin1b_fld1 */
    {GPMC_A13, (M1 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_a13.qspi1_rtclk */
    {GPMC_A14, (M1 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_a14.qspi1_d3 */
    {GPMC_A15, (M1 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_a15.qspi1_d2 */
    {GPMC_A16, (M1 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_a16.qspi1_d0 */
    {GPMC_A17, (M1 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_a17.qspi1_d1 */
    {GPMC_A18, (M1 | PIN_OUTPUT | MANUAL_MODE)}, /* gpmc_a18.qspi1_sclk */
    {GPMC_A19, (M1 | PIN_INPUT_PULLUP)}, /* gpmc_a19.mmc2_dat4 */
    {GPMC_A20, (M1 | PIN_INPUT_PULLUP)}, /* gpmc_a20.mmc2_dat5 */
    {GPMC_A21, (M1 | PIN_INPUT_PULLUP)}, /* gpmc_a21.mmc2_dat6 */
    {GPMC_A22, (M1 | PIN_INPUT_PULLUP)}, /* gpmc_a22.mmc2_dat7 */
    {GPMC_A23, (M1 | PIN_INPUT_PULLUP)}, /* gpmc_a23.mmc2_clk */
    {GPMC_A24, (M1 | PIN_INPUT_PULLUP)}, /* gpmc_a24.mmc2_dat0 */
    {GPMC_A25, (M1 | PIN_INPUT_PULLUP)}, /* gpmc_a25.mmc2_dat1 */
    {GPMC_A26, (M1 | PIN_INPUT_PULLUP)}, /* gpmc_a26.mmc2_dat2 */
    {GPMC_A27, (M1 | PIN_INPUT_PULLUP)}, /* gpmc_a27.mmc2_dat3 */
    {GPMC_CS1, (M1 | PIN_INPUT_PULLUP)}, /* gpmc_cs1.mmc2_cmd */
    {GPMC_CS0, (M14 | PIN_OUTPUT)}, /* gpmc_cs0.gpio2_19 */
    {GPMC_CS2, (M1 | PIN_OUTPUT | MANUAL_MODE)}, /* gpmc_cs2.qspi1_cs0 */
    {GPMC_CS3, (M14 | PIN_OUTPUT)}, /* gpmc_cs3.gpio2_21 */
    {GPMC_CLK, (M14 | PIN_INPUT)}, /* gpmc_clk.gpio2_22 */
    {GPMC_ADVN_ALE, (M14 | PIN_OUTPUT)}, /* gpmc_advn_ale.gpio2_23 */
    {GPMC_OEN_REN, (M14 | PIN_OUTPUT)}, /* gpmc_oen_ren.gpio2_24 */
    {GPMC_WEN, (M14 | PIN_OUTPUT)}, /* gpmc_wen.gpio2_25 */
    {GPMC_BEN0, (M14 | PIN_OUTPUT)}, /* gpmc_ben0.gpio2_26 */
    {GPMC_BEN1, (M14 | PIN_OUTPUT)}, /* gpmc_ben1.gpio2_27 */
    {GPMC_WAIT0, (M14 | PIN_OUTPUT | SLEWCONTROL)}, /* gpmc_wait0.gpio2_28 */
    {VIN2A_CLK0, (M14 | PIN_INPUT_PULLUP)}, /* vin2a_clk0.gpio3_28 */
    {VIN2A_DE0, (M14 | PIN_INPUT_PULLUP)}, /* vin2a_de0.gpio3_29 */
    {VIN2A_FLD0, (M14 | PIN_INPUT_PULLUP)}, /* vin2a_fld0.gpio3_30 */
    {VIN2A_HSYNC0, (M14 | PIN_INPUT_PULLUP)}, /* vin2a_hsync0.gpio3_31 */
    {VIN2A_VSYNC0, (M14 | PIN_OUTPUT)}, /* vin2a_vsync0.gpio4_0 */
    {VIN2A_D0, (M11 | PIN_INPUT)}, /* vin2a_d0.pr1_uart0_rxd */
    {VIN2A_D1, (M11 | PIN_OUTPUT)}, /* vin2a_d1.pr1_uart0_txd */
    {VIN2A_D2, (M10 | PIN_OUTPUT)}, /* vin2a_d2.eCAP1_in_PWM1_out */
    {VIN2A_D10, (M11 | PIN_OUTPUT_PULLDOWN)}, /* vin2a_d10.pr1_mdio_mdclk */
    {VIN2A_D11, (M11 | PIN_INPUT)}, /* vin2a_d11.pr1_mdio_data */
    {VIN2A_D12, (M3 | PIN_OUTPUT_PULLDOWN | MANUAL_MODE)}, /* vin2a_d12.rgmii1_txc */
    {VIN2A_D13, (M3 | PIN_OUTPUT_PULLDOWN | MANUAL_MODE)}, /* vin2a_d13.rgmii1_txctl */
    {VIN2A_D14, (M3 | PIN_OUTPUT_PULLDOWN | MANUAL_MODE)}, /* vin2a_d14.rgmii1_txd3 */
    {VIN2A_D15, (M3 | PIN_OUTPUT_PULLDOWN | MANUAL_MODE)}, /* vin2a_d15.rgmii1_txd2 */
    {VIN2A_D16, (M3 | PIN_OUTPUT_PULLDOWN | MANUAL_MODE)}, /* vin2a_d16.rgmii1_txd1 */
    {VIN2A_D17, (M3 | PIN_OUTPUT_PULLDOWN | MANUAL_MODE)}, /* vin2a_d17.rgmii1_txd0 */
    {VIN2A_D18, (M3 | PIN_INPUT_PULLDOWN | MANUAL_MODE)}, /* vin2a_d18.rgmii1_rxc */
    {VIN2A_D19, (M3 | PIN_INPUT_PULLDOWN | MANUAL_MODE)}, /* vin2a_d19.rgmii1_rxctl */
    {VIN2A_D20, (M3 | PIN_INPUT_PULLUP | MANUAL_MODE)}, /* vin2a_d20.rgmii1_rxd3 */
    {VIN2A_D21, (M3 | PIN_INPUT_PULLUP | MANUAL_MODE)}, /* vin2a_d21.rgmii1_rxd2 */
    {VIN2A_D22, (M3 | PIN_INPUT_PULLUP | MANUAL_MODE)}, /* vin2a_d22.rgmii1_rxd1 */
    {VIN2A_D23, (M3 | PIN_INPUT_PULLUP | MANUAL_MODE)}, /* vin2a_d23.rgmii1_rxd0 */
    {VOUT1_FLD, (M14 | PIN_OUTPUT)}, /* vout1_fld.gpio4_21 */
    {MDIO_MCLK, (M0 | PIN_OUTPUT_PULLDOWN | SLEWCONTROL)}, /* mdio_mclk.mdio_mclk */
    {MDIO_D, (M0 | PIN_INPUT | SLEWCONTROL)}, /* mdio_d.mdio_d */
    //{UART1_RXD, (M0 | PIN_OUTPUT_PULLUP | SLEWCONTROL)}, /* uart3_rxd.gpio5_18 */
    //{UART1_TXD, (M0 | PIN_OUTPUT_PULLDOWN | SLEWCONTROL)}, /* uart3_txd.gpio5_19 */
    {RGMII0_TXC, (M0 | PIN_OUTPUT_PULLDOWN | MANUAL_MODE)}, /* rgmii0_txc.rgmii0_txc */
    {RGMII0_TXCTL, (M0 | PIN_OUTPUT_PULLDOWN | MANUAL_MODE)}, /* rgmii0_txctl.rgmii0_txctl */
    {RGMII0_TXD3, (M0 | PIN_OUTPUT_PULLDOWN | MANUAL_MODE)}, /* rgmii0_txd3.rgmii0_txd3 */
    {RGMII0_TXD2, (M0 | PIN_OUTPUT_PULLDOWN | MANUAL_MODE)}, /* rgmii0_txd2.rgmii0_txd2 */
    {RGMII0_TXD1, (M0 | PIN_OUTPUT_PULLDOWN | MANUAL_MODE)}, /* rgmii0_txd1.rgmii0_txd1 */
    {RGMII0_TXD0, (M0 | PIN_OUTPUT_PULLDOWN | MANUAL_MODE)}, /* rgmii0_txd0.rgmii0_txd0 */
    {RGMII0_RXC, (M0 | PIN_INPUT_PULLDOWN | MANUAL_MODE)}, /* rgmii0_rxc.rgmii0_rxc */
    {RGMII0_RXCTL, (M0 | PIN_INPUT_PULLDOWN | MANUAL_MODE)}, /* rgmii0_rxctl.rgmii0_rxctl */
    {RGMII0_RXD3, (M0 | PIN_INPUT_PULLUP | MANUAL_MODE)}, /* rgmii0_rxd3.rgmii0_rxd3 */
    {RGMII0_RXD2, (M0 | PIN_INPUT_PULLUP | MANUAL_MODE)}, /* rgmii0_rxd2.rgmii0_rxd2 */
    {RGMII0_RXD1, (M0 | PIN_INPUT_PULLUP | MANUAL_MODE)}, /* rgmii0_rxd1.rgmii0_rxd1 */
    {RGMII0_RXD0, (M0 | PIN_INPUT_PULLUP | MANUAL_MODE)}, /* rgmii0_rxd0.rgmii0_rxd0 */
    {USB1_DRVVBUS, (M0 | PIN_OUTPUT | SLEWCONTROL)}, /* usb1_drvvbus.usb1_drvvbus */
    {USB2_DRVVBUS, (M0 | PIN_OUTPUT | SLEWCONTROL)}, /* usb2_drvvbus.usb2_drvvbus */
    {GPIO6_14, (M0 | PIN_OUTPUT)}, /* gpio6_14.gpio6_14 */
    {GPIO6_15, (M0 | PIN_OUTPUT)}, /* gpio6_15.gpio6_15 */
    {GPIO6_16, (M0 | PIN_INPUT_PULLUP)}, /* gpio6_16.gpio6_16 */
    {XREF_CLK0, (M11 | PIN_INPUT_PULLDOWN)}, /* xref_clk0.pr2_mii1_col */
    {XREF_CLK1, (M11 | PIN_INPUT_PULLDOWN)}, /* xref_clk1.pr2_mii1_crs */
    {XREF_CLK2, (M14 | PIN_OUTPUT)}, /* xref_clk2.gpio6_19 */
    {XREF_CLK3, (M7 | PIN_INPUT)}, /* xref_clk3.hdq0 */
    {MCASP1_ACLKX, (M11 | PIN_OUTPUT_PULLDOWN)}, /* mcasp1_aclkx.pr2_mdio_mdclk */
    {MCASP1_FSX, (M11 | PIN_INPUT | SLEWCONTROL)}, /* mcasp1_fsx.pr2_mdio_data */
    {MCASP1_ACLKR, (M14 | PIN_INPUT)}, /* mcasp1_aclkr.gpio5_0 */
    {MCASP1_FSR, (M14 | PIN_INPUT)}, /* mcasp1_fsr.gpio5_1 */
    {MCASP1_AXR0, (M11 | PIN_INPUT_PULLUP | SLEWCONTROL)}, /* mcasp1_axr0.pr2_mii0_rxer */
    {MCASP1_AXR1, (M11 | PIN_INPUT_PULLUP | SLEWCONTROL)}, /* mcasp1_axr1.pr2_mii_mt0_clk */
    {MCASP1_AXR2, (M14 | PIN_INPUT)}, /* mcasp1_axr2.gpio5_4 */
    {MCASP1_AXR3, (M14 | PIN_INPUT)}, /* mcasp1_axr3.gpio5_5 */
    {MCASP1_AXR4, (M14 | PIN_INPUT_PULLDOWN)}, /* mcasp1_axr4.gpio5_6 */
    {MCASP1_AXR5, (M14 | PIN_INPUT)}, /* mcasp1_axr5.gpio5_7 */
    {MCASP1_AXR6, (M14 | PIN_OUTPUT)}, /* mcasp1_axr6.gpio5_8 */
    {MCASP1_AXR7, (M14 | PIN_OUTPUT)}, /* mcasp1_axr7.gpio5_9 */
    {MCASP1_AXR8, (M11 | PIN_OUTPUT_PULLUP | SLEWCONTROL)}, /* mcasp1_axr8.pr2_mii0_txen */
    {MCASP1_AXR9, (M11 | PIN_OUTPUT_PULLUP | SLEWCONTROL)}, /* mcasp1_axr9.pr2_mii0_txd3 */
    {MCASP1_AXR10, (M11 | PIN_OUTPUT_PULLUP | SLEWCONTROL)}, /* mcasp1_axr10.pr2_mii0_txd2 */
    {MCASP1_AXR11, (M11 | PIN_OUTPUT_PULLUP | SLEWCONTROL)}, /* mcasp1_axr11.pr2_mii0_txd1 */
    {MCASP1_AXR12, (M11 | PIN_OUTPUT_PULLUP | SLEWCONTROL)}, /* mcasp1_axr12.pr2_mii0_txd0 */
    {MCASP1_AXR13, (M11 | PIN_INPUT_PULLUP | SLEWCONTROL)}, /* mcasp1_axr13.pr2_mii_mr0_clk */
    {MCASP1_AXR14, (M11 | PIN_INPUT_SLEW)}, /* mcasp1_axr14.pr2_mii0_rxdv */
    {MCASP1_AXR15, (M11 | PIN_INPUT_SLEW)}, /* mcasp1_axr15.pr2_mii0_rxd3 */
    {MCASP2_ACLKX, (M11 | PIN_INPUT_PULLDOWN)}, /* mcasp2_aclkx.pr2_mii0_rxd2 */
    {MCASP2_FSX, (M11 | PIN_INPUT_SLEW)}, /* mcasp2_fsx.pr2_mii0_rxd1 */
    {MCASP2_AXR2, (M11 | PIN_INPUT_SLEW)}, /* mcasp2_axr2.pr2_mii0_rxd0 */
    {MCASP2_AXR3, (M11 | PIN_INPUT_SLEW)}, /* mcasp2_axr3.pr2_mii0_rxlink */
    {MCASP2_AXR4, (M14 | PIN_OUTPUT)}, /* mcasp2_axr4.gpio1_4 */
    {MCASP2_AXR5, (M14 | PIN_OUTPUT)}, /* mcasp2_axr5.gpio6_7 */
    {MCASP2_AXR6, (M14 | PIN_OUTPUT)}, /* mcasp2_axr6.gpio2_29 */
    {MCASP2_AXR7, (M14 | PIN_OUTPUT)}, /* mcasp2_axr7.gpio1_5 */
    {MCASP3_ACLKX, (M11 | PIN_INPUT_PULLDOWN)}, /* mcasp3_aclkx.pr2_mii0_crs */
    {MCASP3_FSX, (M11 | PIN_INPUT_SLEW)}, /* mcasp3_fsx.pr2_mii0_col */
    {MCASP3_AXR0, (M11 | PIN_INPUT_PULLUP | SLEWCONTROL)}, /* mcasp3_axr0.pr2_mii1_rxer */
    {MCASP3_AXR1, (M11 | PIN_INPUT_PULLUP | SLEWCONTROL)}, /* mcasp3_axr1.pr2_mii1_rxlink */
    {MCASP4_ACLKX, (M2 | PIN_OUTPUT)}, /* mcasp4_aclkx.spi3_sclk */
    {MCASP4_FSX, (M2 | PIN_INPUT)}, /* mcasp4_fsx.spi3_d1 */
    {MCASP4_AXR1, (M2 | PIN_OUTPUT_PULLUP)}, /* mcasp4_axr1.spi3_cs0 */
    {MCASP5_AXR0, (M4 | PIN_INPUT)}, /* mcasp5_axr0.uart3_rxd */
    {MCASP5_AXR1, (M4 | PIN_OUTPUT)}, /* mcasp5_axr1.uart3_txd */
    {MMC1_CLK, (M0 | PIN_INPUT_PULLUP)}, /* mmc1_clk.mmc1_clk */
    {MMC1_CMD, (M0 | PIN_INPUT_PULLUP)}, /* mmc1_cmd.mmc1_cmd */
    {MMC1_DAT0, (M0 | PIN_INPUT_PULLUP)}, /* mmc1_dat0.mmc1_dat0 */
    {MMC1_DAT1, (M0 | PIN_INPUT_PULLUP)}, /* mmc1_dat1.mmc1_dat1 */
    {MMC1_DAT2, (M0 | PIN_INPUT_PULLUP)}, /* mmc1_dat2.mmc1_dat2 */
    {MMC1_DAT3, (M0 | PIN_INPUT_PULLUP)}, /* mmc1_dat3.mmc1_dat3 */
    {MMC1_SDCD, (M14 | PIN_INPUT | SLEWCONTROL)}, /* mmc1_sdcd.gpio6_27 */
    {MMC1_SDWP, (M14 | PIN_INPUT | SLEWCONTROL)}, /* mmc1_sdwp.gpio6_28 */
    {GPIO6_10, (M11 | PIN_INPUT_PULLUP)}, /* gpio6_10.pr2_mii_mt1_clk */
    {GPIO6_11, (M11 | PIN_OUTPUT_PULLUP)}, /* gpio6_11.pr2_mii1_txen */
    {MMC3_CLK, (M11 | PIN_OUTPUT_PULLUP)}, /* mmc3_clk.pr2_mii1_txd3 */
    {MMC3_CMD, (M11 | PIN_OUTPUT_PULLUP)}, /* mmc3_cmd.pr2_mii1_txd2 */
    {MMC3_DAT0, (M11 | PIN_OUTPUT_PULLUP)}, /* mmc3_dat0.pr2_mii1_txd1 */
    {MMC3_DAT1, (M11 | PIN_OUTPUT_PULLUP)}, /* mmc3_dat1.pr2_mii1_txd0 */
    {MMC3_DAT2, (M11 | PIN_INPUT_PULLUP)}, /* mmc3_dat2.pr2_mii_mr1_clk */
    {MMC3_DAT3, (M11 | PIN_INPUT_PULLDOWN)}, /* mmc3_dat3.pr2_mii1_rxdv */
    {MMC3_DAT4, (M11 | PIN_INPUT_PULLDOWN)}, /* mmc3_dat4.pr2_mii1_rxd3 */
    {MMC3_DAT5, (M11 | PIN_INPUT_PULLDOWN)}, /* mmc3_dat5.pr2_mii1_rxd2 */
    {MMC3_DAT6, (M11 | PIN_INPUT_PULLDOWN)}, /* mmc3_dat6.pr2_mii1_rxd1 */
    {MMC3_DAT7, (M11 | PIN_INPUT_PULLDOWN)}, /* mmc3_dat7.pr2_mii1_rxd0 */
    {SPI1_SCLK, (M14 | PIN_OUTPUT)}, /* spi1_sclk.gpio7_7 */
    {SPI1_D1, (M14 | PIN_OUTPUT)}, /* spi1_d1.gpio7_8 */
    {SPI1_D0, (M14 | PIN_OUTPUT)}, /* spi1_d0.gpio7_9 */
    {SPI1_CS0, (M14 | PIN_OUTPUT)}, /* spi1_cs0.gpio7_10 */
    {SPI1_CS1, (M14 | PIN_OUTPUT)}, /* spi1_cs1.gpio7_11 */
    {SPI1_CS2, (M14 | PIN_INPUT_SLEW)}, /* spi1_cs2.gpio7_12 */
    {SPI1_CS3, (M6 | PIN_INPUT | SLEWCONTROL)}, /* spi1_cs3.hdmi1_cec */
    {SPI2_SCLK, (M0 | PIN_INPUT)}, /* spi2_sclk.spi2_sclk */
    {SPI2_D1, (M0 | PIN_INPUT | SLEWCONTROL)}, /* spi2_d1.spi2_d1 */
    {SPI2_D0, (M0 | PIN_INPUT | SLEWCONTROL)}, /* spi2_d0.spi2_d0 */
    {SPI2_CS0, (M0 | PIN_INPUT | SLEWCONTROL)}, /* spi2_cs0.spi2_cs0 */
    {DCAN1_TX, (M15 | PULL_UP)}, /* dcan1_tx.safe for dcan1_tx */
    {DCAN1_RX, (M15 | PULL_UP)}, /* dcan1_rx.safe for dcan1_rx */

    /* By Noufal */
    {UART2_CTSN, (M14 | PIN_OUTPUT_PULLUP)}, /* tx2en.gpio1_16 */
    {UART2_RTSN, (M14 | PIN_OUTPUT_PULLDOWN)}, /* rx2en.gpio1_17 */
    {UART1_RXD, (M0 | PIN_INPUT_PULLUP)}, /* uart1_rxd.uart1_rxd */
    {UART1_TXD, (M0 | PIN_OUTPUT)}, /* uart1_rxd.uart1_txd */
    {UART1_CTSN, (M14 | PIN_OUTPUT)}, /* uart1_ctsn.gpio7_24 */
    {UART1_RTSN, (M14 | PIN_OUTPUT)}, /* uart1_rtsn.gpio7_25 */
    /*---till here */
    {I2C1_SDA, (M0 | PIN_INPUT)}, /* i2c1_sda.i2c1_sda */
    {I2C1_SCL, (M0 | PIN_INPUT)}, /* i2c1_scl.i2c1_scl */
    {I2C2_SDA, (M1 | PIN_INPUT)}, /* i2c2_sda.hdmi1_ddc_scl */
    {I2C2_SCL, (M1 | PIN_INPUT)}, /* i2c2_scl.hdmi1_ddc_sda */
    {WAKEUP0, (M0 | PIN_INPUT)}, /* Wakeup0.Wakeup0 */
    {WAKEUP3, (M0 | PIN_INPUT)}, /* Wakeup3.Wakeup3 */
    {ON_OFF, (M0 | PIN_OUTPUT)}, /* on_off.on_off */
    {RTC_PORZ, (M0 | PIN_INPUT)}, /* rtc_porz.rtc_porz */
    {TMS, (M0 | PIN_INPUT_PULLUP)}, /* tms.tms */
    {TDI, (M0 | PIN_INPUT_PULLUP | SLEWCONTROL)}, /* tdi.tdi */
    {TDO, (M0 | PIN_OUTPUT_PULLUP)}, /* tdo.tdo */
    {TCLK, (M0 | PIN_INPUT_PULLUP)}, /* tclk.tclk */
    {TRSTN, (M0 | PIN_INPUT)}, /* trstn.trstn */
    {RTCK, (M0 | PIN_OUTPUT_PULLUP)}, /* rtck.rtck */
    {EMU0, (M0 | PIN_INPUT)}, /* emu0.emu0 */
    {EMU1, (M0 | PIN_INPUT)}, /* emu1.emu1 */
    {RESETN, (M0 | PIN_INPUT)}, /* resetn.resetn */
    {RSTOUTN, (M0 | PIN_OUTPUT)}, /* rstoutn.rstoutn */
    };

    const struct pad_conf_entry core_padconf_array_icss1eth_am571x_idk[] = {
    /* PR1 MII0 */
    {VOUT1_D8, (M12 | PIN_INPUT_PULLUP)}, /* vout1_d8.pr1_mii_mt0_clk */
    {VOUT1_D9, (M13 | PIN_OUTPUT_PULLUP)}, /* vout1_d9.pr1_mii0_txd3 */
    {VOUT1_D10, (M13 | PIN_OUTPUT_PULLUP)}, /* vout1_d10.pr1_mii0_txd2 */
    {VOUT1_D11, (M13 | PIN_OUTPUT_PULLUP)}, /* vout1_d11.pr1_mii0_txen */
    {VOUT1_D12, (M13 | PIN_OUTPUT_PULLUP)}, /* vout1_d12.pr1_mii0_txd1 */
    {VOUT1_D13, (M13 | PIN_OUTPUT_PULLUP)}, /* vout1_d13.pr1_mii0_txd0 */
    {VOUT1_D14, (M12 | PIN_INPUT_PULLUP)}, /* vout1_d14.pr1_mii_mr0_clk */
    {VOUT1_D15, (M12 | PIN_INPUT_PULLDOWN)}, /* vout1_d15.pr1_mii0_rxdv */
    {VOUT1_D16, (M12 | PIN_INPUT_PULLDOWN)}, /* vout1_d16.pr1_mii0_rxd3 */
    {VOUT1_D17, (M12 | PIN_INPUT_PULLDOWN)}, /* vout1_d17.pr1_mii0_rxd2 */
    {VOUT1_D18, (M12 | PIN_INPUT_PULLDOWN)}, /* vout1_d18.pr1_mii0_rxd1 */
    {VOUT1_D19, (M12 | PIN_INPUT_PULLDOWN)}, /* vout1_d19.pr1_mii0_rxd0 */
    {VOUT1_D20, (M12 | PIN_INPUT_PULLUP)}, /* vout1_d20.pr1_mii0_rxer */
    {VOUT1_D21, (M12 | PIN_INPUT_PULLDOWN)}, /* vout1_d21.pr1_mii0_rxlink */
    {VOUT1_D22, (M12 | PIN_INPUT_PULLDOWN)}, /* vout1_d22.pr1_mii0_col */
    {VOUT1_D23, (M12 | PIN_INPUT_PULLDOWN)}, /* vout1_d23.pr1_mii0_crs */

    /* PR1 MII1 */
    {VIN2A_D3, (M12 | PIN_INPUT_PULLDOWN)}, /* vin2a_d3.pr1_mii1_col */
    {VIN2A_D4, (M13 | PIN_OUTPUT_PULLUP)}, /* vin2a_d4.pr1_mii1_txd1 */
    {VIN2A_D5, (M13 | PIN_OUTPUT_PULLUP)}, /* vin2a_d5.pr1_mii1_txd0 */
    {VIN2A_D6, (M11 | PIN_INPUT_PULLUP)}, /* vin2a_d6.pr1_mii_mt1_clk */
    {VIN2A_D7, (M11 | PIN_OUTPUT_PULLUP)}, /* vin2a_d7.pr1_mii1_txen */
    {VIN2A_D8, (M11 | PIN_OUTPUT_PULLUP)}, /* vin2a_d8.pr1_mii1_txd3 */
    {VIN2A_D9, (M11 | PIN_OUTPUT_PULLUP)}, /* vin2a_d9.pr1_mii1_txd2 */
    {VOUT1_VSYNC, (M12 | PIN_INPUT_PULLUP)}, /* vout1_vsync.pr1_mii1_rxer */
    {VOUT1_D0, (M12 | PIN_INPUT_PULLUP)}, /* vout1_d0.pr1_mii1_rxlink */
    {VOUT1_D1, (M12 | PIN_INPUT_PULLDOWN)}, /* vout1_d1.pr1_mii1_crs */
    {VOUT1_D2, (M12 | PIN_INPUT_PULLUP)}, /* vout1_d2.pr1_mii_mr1_clk */
    {VOUT1_D3, (M12 | PIN_INPUT_PULLDOWN)}, /* vout1_d3.pr1_mii1_rxdv */
    {VOUT1_D4, (M12 | PIN_INPUT_PULLDOWN)}, /* vout1_d4.pr1_mii1_rxd3 */
    {VOUT1_D5, (M12 | PIN_INPUT_PULLDOWN)}, /* vout1_d5.pr1_mii1_rxd2 */
    {VOUT1_D6, (M12 | PIN_INPUT_PULLDOWN)}, /* vout1_d6.pr1_mii1_rxd1 */
    {VOUT1_D7, (M12 | PIN_INPUT_PULLDOWN)}, /* vout1_d7.pr1_mii1_rxd0 */
    };

    const struct pad_conf_entry core_padconf_array_vout_am571x_idk[] = {
    {VOUT1_CLK, (M0 | PIN_OUTPUT | SLEWCONTROL)}, /* vout1_clk.vout1_clk */
    {VOUT1_DE, (M0 | PIN_OUTPUT | SLEWCONTROL)}, /* vout1_de.vout1_de */
    {VOUT1_HSYNC, (M0 | PIN_OUTPUT | SLEWCONTROL)}, /* vout1_hsync.vout1_hsync */
    {VOUT1_VSYNC, (M0 | PIN_OUTPUT | SLEWCONTROL)}, /* vout1_vsync.vout1_vsync */
    {VOUT1_D0, (M0 | PIN_OUTPUT | SLEWCONTROL)}, /* vout1_d0.vout1_d0 */
    {VOUT1_D1, (M0 | PIN_OUTPUT | SLEWCONTROL)}, /* vout1_d1.vout1_d1 */
    {VOUT1_D2, (M0 | PIN_OUTPUT | SLEWCONTROL)}, /* vout1_d2.vout1_d2 */
    {VOUT1_D3, (M0 | PIN_OUTPUT | SLEWCONTROL)}, /* vout1_d3.vout1_d3 */
    {VOUT1_D4, (M0 | PIN_OUTPUT | SLEWCONTROL)}, /* vout1_d4.vout1_d4 */
    {VOUT1_D5, (M0 | PIN_OUTPUT | SLEWCONTROL)}, /* vout1_d5.vout1_d5 */
    {VOUT1_D6, (M0 | PIN_OUTPUT | SLEWCONTROL)}, /* vout1_d6.vout1_d6 */
    {VOUT1_D7, (M0 | PIN_OUTPUT | SLEWCONTROL)}, /* vout1_d7.vout1_d7 */
    {VOUT1_D8, (M0 | PIN_OUTPUT | SLEWCONTROL)}, /* vout1_d8.vout1_d8 */
    {VOUT1_D9, (M0 | PIN_OUTPUT | SLEWCONTROL)}, /* vout1_d9.vout1_d9 */
    {VOUT1_D10, (M0 | PIN_OUTPUT | SLEWCONTROL)}, /* vout1_d10.vout1_d10 */
    {VOUT1_D11, (M0 | PIN_OUTPUT | SLEWCONTROL)}, /* vout1_d11.vout1_d11 */
    {VOUT1_D12, (M0 | PIN_OUTPUT | SLEWCONTROL)}, /* vout1_d12.vout1_d12 */
    {VOUT1_D13, (M0 | PIN_OUTPUT | SLEWCONTROL)}, /* vout1_d13.vout1_d13 */
    {VOUT1_D14, (M0 | PIN_OUTPUT | SLEWCONTROL)}, /* vout1_d14.vout1_d14 */
    {VOUT1_D15, (M0 | PIN_OUTPUT | SLEWCONTROL)}, /* vout1_d15.vout1_d15 */
    {VOUT1_D16, (M0 | PIN_OUTPUT | SLEWCONTROL)}, /* vout1_d16.vout1_d16 */
    {VOUT1_D17, (M0 | PIN_OUTPUT | SLEWCONTROL)}, /* vout1_d17.vout1_d17 */
    {VOUT1_D18, (M0 | PIN_OUTPUT | SLEWCONTROL)}, /* vout1_d18.vout1_d18 */
    {VOUT1_D19, (M0 | PIN_OUTPUT | SLEWCONTROL)}, /* vout1_d19.vout1_d19 */
    {VOUT1_D20, (M0 | PIN_OUTPUT | SLEWCONTROL)}, /* vout1_d20.vout1_d20 */
    {VOUT1_D21, (M0 | PIN_OUTPUT | SLEWCONTROL)}, /* vout1_d21.vout1_d21 */
    {VOUT1_D22, (M0 | PIN_OUTPUT | SLEWCONTROL)}, /* vout1_d22.vout1_d22 */
    {VOUT1_D23, (M0 | PIN_OUTPUT | SLEWCONTROL)}, /* vout1_d23.vout1_d23 */

    {MCASP5_ACLKX, (M12 | PIN_INPUT | MANUAL_MODE)}, /* mcasp5_aclkx.pr2_pru1_gpi1 */
    {MCASP5_FSX, (M12 | PIN_INPUT | MANUAL_MODE)}, /* mcasp5_fsx.pr2_pru1_gpi2 */
    {UART2_RXD, (M0 | PIN_INPUT)}, /* uart2_rxd.uart2_rxd */
    {UART2_TXD, (M0 | PIN_OUTPUT)}, /* uart2_txd.uart2_txd */
    {VIN2A_D5, (M13 | PIN_OUTPUT_PULLDOWN | MANUAL_MODE)}, /* vin2a_d5.pr1_pru1_gpo2 */
    };

    const struct pad_conf_entry early_padconf[] = {
    {UART2_CTSN, (M2 | PIN_INPUT_SLEW)}, /* uart2_ctsn.uart3_rxd */
    {UART2_RTSN, (M1 | PIN_INPUT_SLEW)}, /* uart2_rtsn.uart3_txd */
    {I2C1_SDA, (PIN_INPUT_PULLUP | M0)}, /* I2C1_SDA */
    {I2C1_SCL, (PIN_INPUT_PULLUP | M0)}, /* I2C1_SCL */
    };

    #ifdef CONFIG_IODELAY_RECALIBRATION
    const struct iodelay_cfg_entry iodelay_cfg_array_x15_sr1_1[] = {
    {0x0114, 2980, 0}, /* CFG_GPMC_A0_IN */
    {0x0120, 2648, 0}, /* CFG_GPMC_A10_IN */
    {0x012C, 2918, 0}, /* CFG_GPMC_A11_IN */
    {0x0198, 2917, 0}, /* CFG_GPMC_A1_IN */
    {0x0204, 3156, 178}, /* CFG_GPMC_A2_IN */
    {0x0210, 3109, 246}, /* CFG_GPMC_A3_IN */
    {0x021C, 3142, 100}, /* CFG_GPMC_A4_IN */
    {0x0228, 3084, 33}, /* CFG_GPMC_A5_IN */
    {0x0234, 2778, 0}, /* CFG_GPMC_A6_IN */
    {0x0240, 3110, 0}, /* CFG_GPMC_A7_IN */
    {0x024C, 2874, 0}, /* CFG_GPMC_A8_IN */
    {0x0258, 3072, 0}, /* CFG_GPMC_A9_IN */
    {0x0264, 2466, 0}, /* CFG_GPMC_AD0_IN */
    {0x0270, 2523, 0}, /* CFG_GPMC_AD10_IN */
    {0x027C, 2453, 0}, /* CFG_GPMC_AD11_IN */
    {0x0288, 2285, 0}, /* CFG_GPMC_AD12_IN */
    {0x0294, 2206, 0}, /* CFG_GPMC_AD13_IN */
    {0x02A0, 1898, 0}, /* CFG_GPMC_AD14_IN */
    {0x02AC, 2473, 0}, /* CFG_GPMC_AD15_IN */
    {0x02B8, 2307, 0}, /* CFG_GPMC_AD1_IN */
    {0x02C4, 2691, 0}, /* CFG_GPMC_AD2_IN */
    {0x02D0, 2384, 0}, /* CFG_GPMC_AD3_IN */
    {0x02DC, 2462, 0}, /* CFG_GPMC_AD4_IN */
    {0x02E8, 2335, 0}, /* CFG_GPMC_AD5_IN */
    {0x02F4, 2370, 0}, /* CFG_GPMC_AD6_IN */
    {0x0300, 2389, 0}, /* CFG_GPMC_AD7_IN */
    {0x030C, 2672, 0}, /* CFG_GPMC_AD8_IN */
    {0x0318, 2334, 0}, /* CFG_GPMC_AD9_IN */
    {0x0378, 0, 0}, /* CFG_GPMC_CS3_IN */
    {0x0678, 406, 0}, /* CFG_MMC3_CLK_IN */
    {0x0680, 659, 0}, /* CFG_MMC3_CLK_OUT */
    {0x0684, 0, 0}, /* CFG_MMC3_CMD_IN */
    {0x0688, 0, 0}, /* CFG_MMC3_CMD_OEN */
    {0x068C, 0, 0}, /* CFG_MMC3_CMD_OUT */
    {0x0690, 130, 0}, /* CFG_MMC3_DAT0_IN */
    {0x0694, 0, 0}, /* CFG_MMC3_DAT0_OEN */
    {0x0698, 0, 0}, /* CFG_MMC3_DAT0_OUT */
    {0x069C, 169, 0}, /* CFG_MMC3_DAT1_IN */
    {0x06A0, 0, 0}, /* CFG_MMC3_DAT1_OEN */
    {0x06A4, 0, 0}, /* CFG_MMC3_DAT1_OUT */
    {0x06A8, 0, 0}, /* CFG_MMC3_DAT2_IN */
    {0x06AC, 0, 0}, /* CFG_MMC3_DAT2_OEN */
    {0x06B0, 0, 0}, /* CFG_MMC3_DAT2_OUT */
    {0x06B4, 457, 0}, /* CFG_MMC3_DAT3_IN */
    {0x06B8, 0, 0}, /* CFG_MMC3_DAT3_OEN */
    {0x06BC, 0, 0}, /* CFG_MMC3_DAT3_OUT */
    {0x06C0, 702, 0}, /* CFG_MMC3_DAT4_IN */
    {0x06C4, 0, 0}, /* CFG_MMC3_DAT4_OEN */
    {0x06C8, 0, 0}, /* CFG_MMC3_DAT4_OUT */
    {0x06CC, 738, 0}, /* CFG_MMC3_DAT5_IN */
    {0x06D0, 0, 0}, /* CFG_MMC3_DAT5_OEN */
    {0x06D4, 0, 0}, /* CFG_MMC3_DAT5_OUT */
    {0x06D8, 856, 0}, /* CFG_MMC3_DAT6_IN */
    {0x06DC, 0, 0}, /* CFG_MMC3_DAT6_OEN */
    {0x06E0, 0, 0}, /* CFG_MMC3_DAT6_OUT */
    {0x06E4, 610, 0}, /* CFG_MMC3_DAT7_IN */
    {0x06E8, 0, 0}, /* CFG_MMC3_DAT7_OEN */
    {0x06EC, 0, 0}, /* CFG_MMC3_DAT7_OUT */
    {0x06F0, 480, 0}, /* CFG_RGMII0_RXC_IN */
    {0x06FC, 111, 1641}, /* CFG_RGMII0_RXCTL_IN */
    {0x0708, 272, 1116}, /* CFG_RGMII0_RXD0_IN */
    {0x0714, 243, 1260}, /* CFG_RGMII0_RXD1_IN */
    {0x0720, 0, 1614}, /* CFG_RGMII0_RXD2_IN */
    {0x072C, 105, 1673}, /* CFG_RGMII0_RXD3_IN */
    {0x0740, 531, 120}, /* CFG_RGMII0_TXC_OUT */
    {0x074C, 201, 60}, /* CFG_RGMII0_TXCTL_OUT */
    {0x0758, 229, 120}, /* CFG_RGMII0_TXD0_OUT */
    {0x0764, 141, 0}, /* CFG_RGMII0_TXD1_OUT */
    {0x0770, 495, 120}, /* CFG_RGMII0_TXD2_OUT */
    {0x077C, 660, 120}, /* CFG_RGMII0_TXD3_OUT */
    {0x0A70, 1551, 115}, /* CFG_VIN2A_D12_OUT */
    {0x0A7C, 816, 0}, /* CFG_VIN2A_D13_OUT */
    {0x0A88, 876, 0}, /* CFG_VIN2A_D14_OUT */
    {0x0A94, 312, 0}, /* CFG_VIN2A_D15_OUT */
    {0x0AA0, 58, 0}, /* CFG_VIN2A_D16_OUT */
    {0x0AAC, 0, 0}, /* CFG_VIN2A_D17_OUT */
    {0x0AB0, 702, 0}, /* CFG_VIN2A_D18_IN */
    {0x0ABC, 136, 976}, /* CFG_VIN2A_D19_IN */
    {0x0AD4, 210, 1357}, /* CFG_VIN2A_D20_IN */
    {0x0AE0, 189, 1462}, /* CFG_VIN2A_D21_IN */
    {0x0AEC, 232, 1278}, /* CFG_VIN2A_D22_IN */
    {0x0AF8, 0, 1397}, /* CFG_VIN2A_D23_IN */
    };

    const struct iodelay_cfg_entry iodelay_cfg_array_x15_sr2_0[] = {
    {0x0114, 2519, 702}, /* CFG_GPMC_A0_IN */
    {0x0120, 2435, 411}, /* CFG_GPMC_A10_IN */
    {0x012C, 2379, 755}, /* CFG_GPMC_A11_IN */
    {0x0198, 2384, 778}, /* CFG_GPMC_A1_IN */
    {0x0204, 2499, 1127}, /* CFG_GPMC_A2_IN */
    {0x0210, 2455, 1181}, /* CFG_GPMC_A3_IN */
    {0x021C, 2486, 1039}, /* CFG_GPMC_A4_IN */
    {0x0228, 2456, 938}, /* CFG_GPMC_A5_IN */
    {0x0234, 2463, 573}, /* CFG_GPMC_A6_IN */
    {0x0240, 2608, 783}, /* CFG_GPMC_A7_IN */
    {0x024C, 2430, 656}, /* CFG_GPMC_A8_IN */
    {0x0258, 2465, 850}, /* CFG_GPMC_A9_IN */
    {0x0264, 2316, 301}, /* CFG_GPMC_AD0_IN */
    {0x0270, 2324, 406}, /* CFG_GPMC_AD10_IN */
    {0x027C, 2278, 352}, /* CFG_GPMC_AD11_IN */
    {0x0288, 2297, 160}, /* CFG_GPMC_AD12_IN */
    {0x0294, 2278, 108}, /* CFG_GPMC_AD13_IN */
    {0x02A0, 2035, 0}, /* CFG_GPMC_AD14_IN */
    {0x02AC, 2279, 378}, /* CFG_GPMC_AD15_IN */
    {0x02B8, 2440, 70}, /* CFG_GPMC_AD1_IN */
    {0x02C4, 2404, 446}, /* CFG_GPMC_AD2_IN */
    {0x02D0, 2343, 212}, /* CFG_GPMC_AD3_IN */
    {0x02DC, 2355, 322}, /* CFG_GPMC_AD4_IN */
    {0x02E8, 2337, 192}, /* CFG_GPMC_AD5_IN */
    {0x02F4, 2270, 314}, /* CFG_GPMC_AD6_IN */
    {0x0300, 2339, 259}, /* CFG_GPMC_AD7_IN */
    {0x030C, 2308, 577}, /* CFG_GPMC_AD8_IN */
    {0x0318, 2334, 166}, /* CFG_GPMC_AD9_IN */
    {0x0378, 0, 0}, /* CFG_GPMC_CS3_IN */
    {0x0678, 0, 386}, /* CFG_MMC3_CLK_IN */
    {0x0680, 605, 0}, /* CFG_MMC3_CLK_OUT */
    {0x0684, 0, 0}, /* CFG_MMC3_CMD_IN */
    {0x0688, 0, 0}, /* CFG_MMC3_CMD_OEN */
    {0x068C, 0, 0}, /* CFG_MMC3_CMD_OUT */
    {0x0690, 171, 0}, /* CFG_MMC3_DAT0_IN */
    {0x0694, 0, 0}, /* CFG_MMC3_DAT0_OEN */
    {0x0698, 0, 0}, /* CFG_MMC3_DAT0_OUT */
    {0x069C, 221, 0}, /* CFG_MMC3_DAT1_IN */
    {0x06A0, 0, 0}, /* CFG_MMC3_DAT1_OEN */
    {0x06A4, 0, 0}, /* CFG_MMC3_DAT1_OUT */
    {0x06A8, 0, 0}, /* CFG_MMC3_DAT2_IN */
    {0x06AC, 0, 0}, /* CFG_MMC3_DAT2_OEN */
    {0x06B0, 0, 0}, /* CFG_MMC3_DAT2_OUT */
    {0x06B4, 474, 0}, /* CFG_MMC3_DAT3_IN */
    {0x06B8, 0, 0}, /* CFG_MMC3_DAT3_OEN */
    {0x06BC, 0, 0}, /* CFG_MMC3_DAT3_OUT */
    {0x06C0, 792, 0}, /* CFG_MMC3_DAT4_IN */
    {0x06C4, 0, 0}, /* CFG_MMC3_DAT4_OEN */
    {0x06C8, 0, 0}, /* CFG_MMC3_DAT4_OUT */
    {0x06CC, 782, 0}, /* CFG_MMC3_DAT5_IN */
    {0x06D0, 0, 0}, /* CFG_MMC3_DAT5_OEN */
    {0x06D4, 0, 0}, /* CFG_MMC3_DAT5_OUT */
    {0x06D8, 942, 0}, /* CFG_MMC3_DAT6_IN */
    {0x06DC, 0, 0}, /* CFG_MMC3_DAT6_OEN */
    {0x06E0, 0, 0}, /* CFG_MMC3_DAT6_OUT */
    {0x06E4, 636, 0}, /* CFG_MMC3_DAT7_IN */
    {0x06E8, 0, 0}, /* CFG_MMC3_DAT7_OEN */
    {0x06EC, 0, 0}, /* CFG_MMC3_DAT7_OUT */
    {0x06F0, 260, 0}, /* CFG_RGMII0_RXC_IN */
    {0x06FC, 0, 1412}, /* CFG_RGMII0_RXCTL_IN */
    {0x0708, 123, 1047}, /* CFG_RGMII0_RXD0_IN */
    {0x0714, 139, 1081}, /* CFG_RGMII0_RXD1_IN */
    {0x0720, 195, 1100}, /* CFG_RGMII0_RXD2_IN */
    {0x072C, 239, 1216}, /* CFG_RGMII0_RXD3_IN */
    {0x0740, 89, 0}, /* CFG_RGMII0_TXC_OUT */
    {0x074C, 15, 125}, /* CFG_RGMII0_TXCTL_OUT */
    {0x0758, 339, 162}, /* CFG_RGMII0_TXD0_OUT */
    {0x0764, 146, 94}, /* CFG_RGMII0_TXD1_OUT */
    {0x0770, 0, 27}, /* CFG_RGMII0_TXD2_OUT */
    {0x077C, 291, 205}, /* CFG_RGMII0_TXD3_OUT */
    {0x0A70, 0, 0}, /* CFG_VIN2A_D12_OUT */
    {0x0A7C, 219, 101}, /* CFG_VIN2A_D13_OUT */
    {0x0A88, 92, 58}, /* CFG_VIN2A_D14_OUT */
    {0x0A94, 135, 100}, /* CFG_VIN2A_D15_OUT */
    {0x0AA0, 154, 101}, /* CFG_VIN2A_D16_OUT */
    {0x0AAC, 78, 27}, /* CFG_VIN2A_D17_OUT */
    {0x0AB0, 411, 0}, /* CFG_VIN2A_D18_IN */
    {0x0ABC, 0, 382}, /* CFG_VIN2A_D19_IN */
    {0x0AD4, 320, 750}, /* CFG_VIN2A_D20_IN */
    {0x0AE0, 192, 836}, /* CFG_VIN2A_D21_IN */
    {0x0AEC, 294, 669}, /* CFG_VIN2A_D22_IN */
    {0x0AF8, 50, 700}, /* CFG_VIN2A_D23_IN */
    {0x0B9C, 0, 706}, /* CFG_VOUT1_CLK_OUT */
    {0x0BA8, 2313, 0}, /* CFG_VOUT1_D0_OUT */
    {0x0BB4, 2199, 0}, /* CFG_VOUT1_D10_OUT */
    {0x0BC0, 2266, 0}, /* CFG_VOUT1_D11_OUT */
    {0x0BCC, 3159, 0}, /* CFG_VOUT1_D12_OUT */
    {0x0BD8, 2100, 0}, /* CFG_VOUT1_D13_OUT */
    {0x0BE4, 2229, 0}, /* CFG_VOUT1_D14_OUT */
    {0x0BF0, 2202, 0}, /* CFG_VOUT1_D15_OUT */
    {0x0BFC, 2084, 0}, /* CFG_VOUT1_D16_OUT */
    {0x0C08, 2195, 0}, /* CFG_VOUT1_D17_OUT */
    {0x0C14, 2342, 0}, /* CFG_VOUT1_D18_OUT */
    {0x0C20, 2463, 0}, /* CFG_VOUT1_D19_OUT */
    {0x0C2C, 2439, 0}, /* CFG_VOUT1_D1_OUT */
    {0x0C38, 2304, 0}, /* CFG_VOUT1_D20_OUT */
    {0x0C44, 2103, 0}, /* CFG_VOUT1_D21_OUT */
    {0x0C50, 2145, 0}, /* CFG_VOUT1_D22_OUT */
    {0x0C5C, 1932, 0}, /* CFG_VOUT1_D23_OUT */
    {0x0C68, 2200, 0}, /* CFG_VOUT1_D2_OUT */
    {0x0C74, 2355, 0}, /* CFG_VOUT1_D3_OUT */
    {0x0C80, 3215, 0}, /* CFG_VOUT1_D4_OUT */
    {0x0C8C, 2314, 0}, /* CFG_VOUT1_D5_OUT */
    {0x0C98, 2238, 0}, /* CFG_VOUT1_D6_OUT */
    {0x0CA4, 2381, 0}, /* CFG_VOUT1_D7_OUT */
    {0x0CB0, 2138, 0}, /* CFG_VOUT1_D8_OUT */
    {0x0CBC, 2383, 0}, /* CFG_VOUT1_D9_OUT */
    {0x0CC8, 1984, 0}, /* CFG_VOUT1_DE_OUT */
    {0x0CE0, 1947, 0}, /* CFG_VOUT1_HSYNC_OUT */
    {0x0CEC, 2739, 0}, /* CFG_VOUT1_VSYNC_OUT */
    };

    const struct iodelay_cfg_entry iodelay_cfg_array_am574x_idk[] = {
    {0x0114, 2199, 621}, /* CFG_GPMC_A0_IN */
    {0x0120, 0, 0}, /* CFG_GPMC_A10_IN */
    {0x012C, 2133, 859}, /* CFG_GPMC_A11_IN */
    {0x0138, 2258, 562}, /* CFG_GPMC_A12_IN */
    {0x0144, 0, 0}, /* CFG_GPMC_A13_IN */
    {0x0150, 2149, 1052}, /* CFG_GPMC_A14_IN */
    {0x015C, 2121, 997}, /* CFG_GPMC_A15_IN */
    {0x0168, 2159, 1134}, /* CFG_GPMC_A16_IN */
    {0x0170, 0, 0}, /* CFG_GPMC_A16_OUT */
    {0x0174, 2135, 1085}, /* CFG_GPMC_A17_IN */
    {0x0188, 0, 0}, /* CFG_GPMC_A18_OUT */
    {0x0198, 1989, 612}, /* CFG_GPMC_A1_IN */
    {0x0204, 2218, 912}, /* CFG_GPMC_A2_IN */
    {0x0210, 2168, 963}, /* CFG_GPMC_A3_IN */
    {0x021C, 2196, 813}, /* CFG_GPMC_A4_IN */
    {0x0228, 2082, 782}, /* CFG_GPMC_A5_IN */
    {0x0234, 2098, 407}, /* CFG_GPMC_A6_IN */
    {0x0240, 2343, 585}, /* CFG_GPMC_A7_IN */
    {0x024C, 2030, 685}, /* CFG_GPMC_A8_IN */
    {0x0258, 2116, 832}, /* CFG_GPMC_A9_IN */
    {0x0374, 0, 0}, /* CFG_GPMC_CS2_OUT */
    {0x0590, 1000, 3900}, /* CFG_MCASP5_ACLKX_OUT */
    {0x05AC, 1000, 3800}, /* CFG_MCASP5_FSX_IN */
    {0x06F0, 451, 0}, /* CFG_RGMII0_RXC_IN */
    {0x06FC, 127, 1571}, /* CFG_RGMII0_RXCTL_IN */
    {0x0708, 165, 1178}, /* CFG_RGMII0_RXD0_IN */
    {0x0714, 136, 1302}, /* CFG_RGMII0_RXD1_IN */
    {0x0720, 0, 1520}, /* CFG_RGMII0_RXD2_IN */
    {0x072C, 28, 1690}, /* CFG_RGMII0_RXD3_IN */
    {0x0740, 121, 0}, /* CFG_RGMII0_TXC_OUT */
    {0x074C, 60, 0}, /* CFG_RGMII0_TXCTL_OUT */
    {0x0758, 153, 0}, /* CFG_RGMII0_TXD0_OUT */
    {0x0764, 35, 0}, /* CFG_RGMII0_TXD1_OUT */
    {0x0770, 0, 0}, /* CFG_RGMII0_TXD2_OUT */
    {0x077C, 172, 0}, /* CFG_RGMII0_TXD3_OUT */
    {0x0A70, 147, 0}, /* CFG_VIN2A_D12_OUT */
    {0x0A7C, 110, 0}, /* CFG_VIN2A_D13_OUT */
    {0x0A88, 18, 0}, /* CFG_VIN2A_D14_OUT */
    {0x0A94, 82, 0}, /* CFG_VIN2A_D15_OUT */
    {0x0AA0, 33, 0}, /* CFG_VIN2A_D16_OUT */
    {0x0AAC, 0, 0}, /* CFG_VIN2A_D17_OUT */
    {0x0AB0, 417, 0}, /* CFG_VIN2A_D18_IN */
    {0x0ABC, 156, 843}, /* CFG_VIN2A_D19_IN */
    {0x0AD4, 223, 1413}, /* CFG_VIN2A_D20_IN */
    {0x0AE0, 169, 1415}, /* CFG_VIN2A_D21_IN */
    {0x0AEC, 43, 1150}, /* CFG_VIN2A_D22_IN */
    {0x0AF8, 0, 1210}, /* CFG_VIN2A_D23_IN */
    {0x0B30, 0, 200}, /* CFG_VIN2A_D5_OUT */
    {0x0B9C, 1281, 497}, /* CFG_VOUT1_CLK_OUT */
    {0x0BA8, 379, 0}, /* CFG_VOUT1_D0_OUT */
    {0x0BB4, 441, 0}, /* CFG_VOUT1_D10_OUT */
    {0x0BC0, 461, 0}, /* CFG_VOUT1_D11_OUT */
    {0x0BCC, 1189, 0}, /* CFG_VOUT1_D12_OUT */
    {0x0BD8, 312, 0}, /* CFG_VOUT1_D13_OUT */
    {0x0BE4, 298, 0}, /* CFG_VOUT1_D14_OUT */
    {0x0BF0, 284, 0}, /* CFG_VOUT1_D15_OUT */
    {0x0BFC, 152, 0}, /* CFG_VOUT1_D16_OUT */
    {0x0C08, 216, 0}, /* CFG_VOUT1_D17_OUT */
    {0x0C14, 408, 0}, /* CFG_VOUT1_D18_OUT */
    {0x0C20, 519, 0}, /* CFG_VOUT1_D19_OUT */
    {0x0C2C, 475, 0}, /* CFG_VOUT1_D1_OUT */
    {0x0C38, 316, 0}, /* CFG_VOUT1_D20_OUT */
    {0x0C44, 59, 0}, /* CFG_VOUT1_D21_OUT */
    {0x0C50, 221, 0}, /* CFG_VOUT1_D22_OUT */
    {0x0C5C, 96, 0}, /* CFG_VOUT1_D23_OUT */
    {0x0C68, 264, 0}, /* CFG_VOUT1_D2_OUT */
    {0x0C74, 421, 0}, /* CFG_VOUT1_D3_OUT */
    {0x0C80, 1257, 0}, /* CFG_VOUT1_D4_OUT */
    {0x0C8C, 432, 0}, /* CFG_VOUT1_D5_OUT */
    {0x0C98, 436, 0}, /* CFG_VOUT1_D6_OUT */
    {0x0CA4, 440, 0}, /* CFG_VOUT1_D7_OUT */
    {0x0CB0, 81, 100}, /* CFG_VOUT1_D8_OUT */
    {0x0CBC, 471, 0}, /* CFG_VOUT1_D9_OUT */
    {0x0CC8, 0, 0}, /* CFG_VOUT1_DE_OUT */
    {0x0CE0, 0, 0}, /* CFG_VOUT1_HSYNC_OUT */
    {0x0CEC, 815, 0}, /* CFG_VOUT1_VSYNC_OUT */
    };

    const struct iodelay_cfg_entry iodelay_cfg_array_am572x_idk[] = {
    {0x0114, 1861, 901}, /* CFG_GPMC_A0_IN */
    {0x0120, 0, 0}, /* CFG_GPMC_A10_IN */
    {0x012C, 1783, 1178}, /* CFG_GPMC_A11_IN */
    {0x0138, 1903, 853}, /* CFG_GPMC_A12_IN */
    {0x0144, 0, 0}, /* CFG_GPMC_A13_IN */
    {0x0150, 2575, 966}, /* CFG_GPMC_A14_IN */
    {0x015C, 2503, 889}, /* CFG_GPMC_A15_IN */
    {0x0168, 2528, 1007}, /* CFG_GPMC_A16_IN */
    {0x0170, 0, 0}, /* CFG_GPMC_A16_OUT */
    {0x0174, 2533, 980}, /* CFG_GPMC_A17_IN */
    {0x0188, 590, 0}, /* CFG_GPMC_A18_OUT */
    {0x0198, 1652, 891}, /* CFG_GPMC_A1_IN */
    {0x0204, 1888, 1212}, /* CFG_GPMC_A2_IN */
    {0x0210, 1839, 1274}, /* CFG_GPMC_A3_IN */
    {0x021C, 1868, 1113}, /* CFG_GPMC_A4_IN */
    {0x0228, 1757, 1079}, /* CFG_GPMC_A5_IN */
    {0x0234, 1800, 670}, /* CFG_GPMC_A6_IN */
    {0x0240, 1967, 898}, /* CFG_GPMC_A7_IN */
    {0x024C, 1731, 959}, /* CFG_GPMC_A8_IN */
    {0x0258, 1766, 1150}, /* CFG_GPMC_A9_IN */
    {0x0374, 0, 0}, /* CFG_GPMC_CS2_OUT */
    {0x0590, 1000, 4200}, /* CFG_MCASP5_ACLKX_OUT */
    {0x05AC, 800, 3800}, /* CFG_MCASP5_FSX_IN */
    {0x06F0, 260, 0}, /* CFG_RGMII0_RXC_IN */
    {0x06FC, 0, 1412}, /* CFG_RGMII0_RXCTL_IN */
    {0x0708, 123, 1047}, /* CFG_RGMII0_RXD0_IN */
    {0x0714, 139, 1081}, /* CFG_RGMII0_RXD1_IN */
    {0x0720, 195, 1100}, /* CFG_RGMII0_RXD2_IN */
    {0x072C, 239, 1216}, /* CFG_RGMII0_RXD3_IN */
    {0x0740, 89, 0}, /* CFG_RGMII0_TXC_OUT */
    {0x074C, 15, 125}, /* CFG_RGMII0_TXCTL_OUT */
    {0x0758, 339, 162}, /* CFG_RGMII0_TXD0_OUT */
    {0x0764, 146, 94}, /* CFG_RGMII0_TXD1_OUT */
    {0x0770, 0, 27}, /* CFG_RGMII0_TXD2_OUT */
    {0x077C, 291, 205}, /* CFG_RGMII0_TXD3_OUT */
    {0x0A70, 0, 0}, /* CFG_VIN2A_D12_OUT */
    {0x0A7C, 219, 101}, /* CFG_VIN2A_D13_OUT */
    {0x0A88, 92, 58}, /* CFG_VIN2A_D14_OUT */
    {0x0A94, 135, 100}, /* CFG_VIN2A_D15_OUT */
    {0x0AA0, 154, 101}, /* CFG_VIN2A_D16_OUT */
    {0x0AAC, 78, 27}, /* CFG_VIN2A_D17_OUT */
    {0x0AB0, 411, 0}, /* CFG_VIN2A_D18_IN */
    {0x0ABC, 0, 382}, /* CFG_VIN2A_D19_IN */
    {0x0AD4, 320, 750}, /* CFG_VIN2A_D20_IN */
    {0x0AE0, 192, 836}, /* CFG_VIN2A_D21_IN */
    {0x0AEC, 294, 669}, /* CFG_VIN2A_D22_IN */
    {0x0AF8, 50, 700}, /* CFG_VIN2A_D23_IN */
    {0x0B30, 0, 0}, /* CFG_VIN2A_D5_OUT */
    {0x0B9C, 1126, 751}, /* CFG_VOUT1_CLK_OUT */
    {0x0BA8, 395, 0}, /* CFG_VOUT1_D0_OUT */
    {0x0BB4, 282, 0}, /* CFG_VOUT1_D10_OUT */
    {0x0BC0, 348, 0}, /* CFG_VOUT1_D11_OUT */
    {0x0BCC, 1240, 0}, /* CFG_VOUT1_D12_OUT */
    {0x0BD8, 182, 0}, /* CFG_VOUT1_D13_OUT */
    {0x0BE4, 311, 0}, /* CFG_VOUT1_D14_OUT */
    {0x0BF0, 285, 0}, /* CFG_VOUT1_D15_OUT */
    {0x0BFC, 166, 0}, /* CFG_VOUT1_D16_OUT */
    {0x0C08, 278, 0}, /* CFG_VOUT1_D17_OUT */
    {0x0C14, 425, 0}, /* CFG_VOUT1_D18_OUT */
    {0x0C20, 516, 0}, /* CFG_VOUT1_D19_OUT */
    {0x0C2C, 521, 0}, /* CFG_VOUT1_D1_OUT */
    {0x0C38, 386, 0}, /* CFG_VOUT1_D20_OUT */
    {0x0C44, 111, 0}, /* CFG_VOUT1_D21_OUT */
    {0x0C50, 227, 0}, /* CFG_VOUT1_D22_OUT */
    {0x0C5C, 0, 0}, /* CFG_VOUT1_D23_OUT */
    {0x0C68, 282, 0}, /* CFG_VOUT1_D2_OUT */
    {0x0C74, 438, 0}, /* CFG_VOUT1_D3_OUT */
    {0x0C80, 1298, 0}, /* CFG_VOUT1_D4_OUT */
    {0x0C8C, 397, 0}, /* CFG_VOUT1_D5_OUT */
    {0x0C98, 321, 0}, /* CFG_VOUT1_D6_OUT */
    {0x0CA4, 155, 309}, /* CFG_VOUT1_D7_OUT */
    {0x0CB0, 212, 0}, /* CFG_VOUT1_D8_OUT */
    {0x0CBC, 466, 0}, /* CFG_VOUT1_D9_OUT */
    {0x0CC8, 0, 0}, /* CFG_VOUT1_DE_OUT */
    {0x0CE0, 0, 0}, /* CFG_VOUT1_HSYNC_OUT */
    {0x0CEC, 139, 701}, /* CFG_VOUT1_VSYNC_OUT */
    };

    const struct iodelay_cfg_entry iodelay_cfg_array_am571x_idk[] = {
    {0x0114, 1873, 702}, /* CFG_GPMC_A0_IN */
    {0x0120, 0, 0}, /* CFG_GPMC_A10_IN */
    {0x012C, 1851, 1011}, /* CFG_GPMC_A11_IN */
    {0x0138, 2009, 601}, /* CFG_GPMC_A12_IN */
    {0x0144, 0, 0}, /* CFG_GPMC_A13_IN */
    {0x0150, 2247, 1186}, /* CFG_GPMC_A14_IN */
    {0x015C, 2176, 1197}, /* CFG_GPMC_A15_IN */
    {0x0168, 2229, 1268}, /* CFG_GPMC_A16_IN */
    {0x0170, 0, 0}, /* CFG_GPMC_A16_OUT */
    {0x0174, 2251, 1217}, /* CFG_GPMC_A17_IN */
    {0x0188, 0, 0}, /* CFG_GPMC_A18_OUT */
    {0x0198, 1629, 772}, /* CFG_GPMC_A1_IN */
    {0x0204, 1734, 898}, /* CFG_GPMC_A2_IN */
    {0x0210, 1757, 1076}, /* CFG_GPMC_A3_IN */
    {0x021C, 1794, 893}, /* CFG_GPMC_A4_IN */
    {0x0228, 1726, 853}, /* CFG_GPMC_A5_IN */
    {0x0234, 1792, 612}, /* CFG_GPMC_A6_IN */
    {0x0240, 2117, 610}, /* CFG_GPMC_A7_IN */
    {0x024C, 1758, 653}, /* CFG_GPMC_A8_IN */
    {0x0258, 1705, 899}, /* CFG_GPMC_A9_IN */
    {0x0374, 0, 0}, /* CFG_GPMC_CS2_OUT */
    {0x06F0, 413, 0}, /* CFG_RGMII0_RXC_IN */
    {0x06FC, 27, 2296}, /* CFG_RGMII0_RXCTL_IN */
    {0x0708, 3, 1721}, /* CFG_RGMII0_RXD0_IN */
    {0x0714, 134, 1786}, /* CFG_RGMII0_RXD1_IN */
    {0x0720, 40, 1966}, /* CFG_RGMII0_RXD2_IN */
    {0x072C, 0, 2057}, /* CFG_RGMII0_RXD3_IN */
    {0x0740, 0, 60}, /* CFG_RGMII0_TXC_OUT */
    {0x074C, 0, 60}, /* CFG_RGMII0_TXCTL_OUT */
    {0x0758, 0, 60}, /* CFG_RGMII0_TXD0_OUT */
    {0x0764, 0, 0}, /* CFG_RGMII0_TXD1_OUT */
    {0x0770, 0, 60}, /* CFG_RGMII0_TXD2_OUT */
    {0x077C, 0, 120}, /* CFG_RGMII0_TXD3_OUT */
    {0x0A70, 0, 0}, /* CFG_VIN2A_D12_OUT */
    {0x0A7C, 170, 0}, /* CFG_VIN2A_D13_OUT */
    {0x0A88, 150, 0}, /* CFG_VIN2A_D14_OUT */
    {0x0A94, 0, 0}, /* CFG_VIN2A_D15_OUT */
    {0x0AA0, 60, 0}, /* CFG_VIN2A_D16_OUT */
    {0x0AAC, 60, 0}, /* CFG_VIN2A_D17_OUT */
    {0x0AB0, 530, 0}, /* CFG_VIN2A_D18_IN */
    {0x0ABC, 71, 1099}, /* CFG_VIN2A_D19_IN */
    {0x0AD4, 142, 1337}, /* CFG_VIN2A_D20_IN */
    {0x0AE0, 114, 1517}, /* CFG_VIN2A_D21_IN */
    {0x0AEC, 171, 1331}, /* CFG_VIN2A_D22_IN */
    {0x0AF8, 0, 1328}, /* CFG_VIN2A_D23_IN */
    };

    const struct iodelay_cfg_entry iodelay_cfg_array_am571x_idk_4port[] = {
    {0x0588, 2100, 1959}, /* CFG_MCASP5_ACLKX_IN */
    {0x05AC, 2100, 1780}, /* CFG_MCASP5_FSX_IN */
    {0x0B30, 0, 400}, /* CFG_VIN2A_D5_OUT */
    };
    #endif
    #endif /* _MUX_DATA_BEAGLE_X15_H_ */

  • Hi, Arpita Jena

    There seems to be no problem at all.

    Is it possible to see the part of the circuit diagram connected to UART part?

  • Hi Sunmin Kim,

    Below is the schematic of UART. 

    This UART(uart1) is working fine with RTOS.

    Thanks and regards

    Arpita Jena

  • Hi, Arpita Jena

    There seems to be no problem at all.

    Is there a way to view UART3?

    When UART3 is output to the console,

    If the model name of the output part is different, it seems that there is a part that board_detect.c needs to modify.

    Below is my editing file.

    /*
     * Copyright (C) 2017 Texas Instruments Incorporated - http://www.ti.com/
     *
     * This program is free software; you can redistribute it and/or modify
     * it under the terms of the GNU General Public License version 2 as
     * published by the Free Software Foundation.
     * Based on "dra7.dtsi"
     */
    
    /{
    	chosen {
    		tick-timer = &timer2;
    	};
    
    	ocp {
    		u-boot,dm-spl;
    
    		ocp2scp@4a080000 {
    			compatible = "ti,omap-ocp2scp", "simple-bus";
    		};
    
    		ocp2scp@4a090000 {
    			compatible = "ti,omap-ocp2scp", "simple-bus";
    		};
    
    		bandgap@4a0021e0 {
    			u-boot,dm-spl;
    		};
    	};
    };
    
    &uart1 {
    	u-boot,dm-spl;
    	reg-shift = <2>;
    };
    
    /* ksmwork - AM5728 */
    &uart2 {
    	u-boot,dm-spl;
    	reg-shift = <2>;
    };
    
    &uart3 {
    	u-boot,dm-spl;
    	reg-shift = <2>;
    };
    
    &mmc1 {
    	u-boot,dm-spl;
    };
    
    &mmc2 {
    	u-boot,dm-spl;
    };
    
    &l4_cfg {
    	u-boot,dm-spl;
    };
    
    &scm {
    	u-boot,dm-spl;
    };
    
    &scm_conf {
    	u-boot,dm-spl;
    };
    
    &qspi {
    	u-boot,dm-spl;
    
    	m25p80@0 {
    		compatible = "spi-flash";
    		u-boot,dm-spl;
    	};
    };
    
    &gpio1 {
    	u-boot,dm-spl;
    };
    
    &gpio2 {
    	u-boot,dm-spl;
    };
    
    &gpio3 {
    	u-boot,dm-spl;
    };
    
    &gpio4 {
    	u-boot,dm-spl;
    };
    
    &gpio5 {
    	u-boot,dm-spl;
    };
    
    &gpio6 {
    	u-boot,dm-spl;
    };
    
    &gpio7 {
    	u-boot,dm-spl;
    };
    

    /*
     * Copyright (C) 2015-2016 Texas Instruments Incorporated - http://www.ti.com/
     *
     * This program is free software; you can redistribute it and/or modify
     * it under the terms of the GNU General Public License version 2 as
     * published by the Free Software Foundation.
     */
    
    #include "am57xx-industrial-grade.dtsi"
    
    / {
    	aliases {
    		rtc0 = &tps659038_rtc;
    		rtc1 = &rtc;
    	};
    
    	chosen {
    		stdout-path = &uart2; /* ksmwork - Base Uart 2 */
    	};
    
    	vmain: fixedregulator-vmain {
    		compatible = "regulator-fixed";
    		regulator-name = "VMAIN";
    		regulator-min-microvolt = <5000000>;
    		regulator-max-microvolt = <5000000>;
    		regulator-always-on;
    		regulator-boot-on;
    	};
    
    	v3_3d: fixedregulator-v3_3d {
    		compatible = "regulator-fixed";
    		regulator-name = "V3_3D";
    		vin-supply = <&smps9_reg>;
    		regulator-min-microvolt = <3300000>;
    		regulator-max-microvolt = <3300000>;
    		regulator-always-on;
    		regulator-boot-on;
    	};
    
    	vtt_fixed: fixedregulator-vtt {
    		/* TPS51200 */
    		compatible = "regulator-fixed";
    		regulator-name = "vtt_fixed";
    		vin-supply = <&v3_3d>;
    		regulator-min-microvolt = <3300000>;
    		regulator-max-microvolt = <3300000>;
    		regulator-always-on;
    		regulator-boot-on;
    	};
    
    	leds-iio {
    		status = "disabled";
    		compatible = "gpio-leds";
    		led-out0 {
    			label = "out0";
    			gpios = <&tpic2810 0 GPIO_ACTIVE_HIGH>;
    			default-state = "off";
    		};
    
    		led-out1 {
    			label = "out1";
    			gpios = <&tpic2810 1 GPIO_ACTIVE_HIGH>;
    			default-state = "off";
    		};
    
    		led-out2 {
    			label = "out2";
    			gpios = <&tpic2810 2 GPIO_ACTIVE_HIGH>;
    			default-state = "off";
    		};
    
    		led-out3 {
    			label = "out3";
    			gpios = <&tpic2810 3 GPIO_ACTIVE_HIGH>;
    			default-state = "off";
    		};
    
    		led-out4 {
    			label = "out4";
    			gpios = <&tpic2810 4 GPIO_ACTIVE_HIGH>;
    			default-state = "off";
    		};
    
    		led-out5 {
    			label = "out5";
    			gpios = <&tpic2810 5 GPIO_ACTIVE_HIGH>;
    			default-state = "off";
    		};
    
    		led-out6 {
    			label = "out6";
    			gpios = <&tpic2810 6 GPIO_ACTIVE_HIGH>;
    			default-state = "off";
    		};
    
    		led-out7 {
    			label = "out7";
    			gpios = <&tpic2810 7 GPIO_ACTIVE_HIGH>;
    			default-state = "off";
    		};
    	};
    };
    
    &dra7_pmx_core {
    	dcan1_pins_default: dcan1_pins_default {
    		pinctrl-single,pins = <
    			DRA7XX_CORE_IOPAD(0x37d0, PIN_OUTPUT_PULLUP | MUX_MODE0)	/* dcan1_tx */
    			DRA7XX_CORE_IOPAD(0x37d4, PIN_INPUT_PULLUP | MUX_MODE0)		/* dcan1_rx */
    		>;
    	};
    
    	dcan1_pins_sleep: dcan1_pins_sleep {
    		pinctrl-single,pins = <
    			DRA7XX_CORE_IOPAD(0x37d0, MUX_MODE15 | PULL_UP)	/* dcan1_tx.off */
    			DRA7XX_CORE_IOPAD(0x37d4, MUX_MODE15 | PULL_UP)	/* dcan1_rx.off */
    		>;
    	};
    };
    
    &i2c1 {
    	status = "okay";
    	clock-frequency = <400000>;
    
    	tps659038: tps659038@58 {
    		compatible = "ti,tps659038";
    		reg = <0x58>;
    		interrupts-extended = <&gpio6 16 IRQ_TYPE_LEVEL_HIGH
    			       &dra7_pmx_core 0x418>;
    		#interrupt-cells = <2>;
    		interrupt-controller;
    		ti,system-power-controller;
    		ti,palmas-override-powerhold;
    
    		tps659038_pmic {
    			compatible = "ti,tps659038-pmic";
    
    			smps12-in-supply = <&vmain>;
    			smps3-in-supply = <&vmain>;
    			smps45-in-supply = <&vmain>;
    			smps6-in-supply = <&vmain>;
    			smps7-in-supply = <&vmain>;
    			smps8-in-supply = <&vmain>;
    			smps9-in-supply = <&vmain>;
    			ldo1-in-supply = <&vmain>;
    			ldo2-in-supply = <&vmain>;
    			ldo3-in-supply = <&vmain>;
    			ldo4-in-supply = <&vmain>;
    			ldo9-in-supply = <&vmain>;
    			ldoln-in-supply = <&vmain>;
    			ldousb-in-supply = <&vmain>;
    			ldortc-in-supply = <&vmain>;
    
    			regulators {
    				smps12_reg: smps12 {
    					/* VDD_MPU */
    					regulator-name = "smps12";
    					regulator-min-microvolt = <850000>;
    					regulator-max-microvolt = <1250000>;
    					regulator-always-on;
    					regulator-boot-on;
    				};
    
    				smps3_reg: smps3 {
    					/* VDD_DDR EMIF1 EMIF2 */
    					regulator-name = "smps3";
    					regulator-min-microvolt = <1350000>;
    					regulator-max-microvolt = <1350000>;
    					regulator-always-on;
    					regulator-boot-on;
    				};
    
    				smps45_reg: smps45 {
    					/* VDD_DSPEVE on AM572 */
    					/* VDD_IVA + VDD_DSP on AM571 */
    					regulator-name = "smps45";
    					regulator-min-microvolt = <850000>;
    					regulator-max-microvolt = <1250000>;
    					regulator-always-on;
    					regulator-boot-on;
    				};
    
    				smps6_reg: smps6 {
    					/* VDD_GPU */
    					regulator-name = "smps6";
    					regulator-min-microvolt = <850000>;
    					regulator-max-microvolt = <1250000>;
    					regulator-always-on;
    					regulator-boot-on;
    				};
    
    				smps7_reg: smps7 {
    					/* VDD_CORE */
    					regulator-name = "smps7";
    					regulator-min-microvolt = <850000>;
    					regulator-max-microvolt = <1150000>;
    					regulator-always-on;
    					regulator-boot-on;
    				};
    
    				smps8_reg: smps8 {
    					/* 5728 - VDD_IVAHD */
    					/* 5718 - N.C. test point */
    					regulator-name = "smps8";
    				};
    
    				smps9_reg: smps9 {
    					/* VDD_3_3D */
    					regulator-name = "smps9";
    					regulator-min-microvolt = <3300000>;
    					regulator-max-microvolt = <3300000>;
    					regulator-always-on;
    					regulator-boot-on;
    				};
    
    				ldo1_reg: ldo1 {
    					/* VDDSHV8 - VSDMMC  */
    					/* NOTE: on rev 1.3a, data supply */
    					regulator-name = "ldo1";
    					regulator-min-microvolt = <1800000>;
    					regulator-max-microvolt = <3300000>;
    					regulator-boot-on;
    					regulator-always-on;
    				};
    
    				ldo2_reg: ldo2 {
    					/* VDDSH18V */
    					regulator-name = "ldo2";
    					regulator-min-microvolt = <1800000>;
    					regulator-max-microvolt = <1800000>;
    					regulator-always-on;
    					regulator-boot-on;
    				};
    
    				ldo3_reg: ldo3 {
    					/* R1.3a 572x V1_8PHY_LDO3: USB, SATA */
    					regulator-name = "ldo3";
    					regulator-min-microvolt = <1800000>;
    					regulator-max-microvolt = <1800000>;
    					regulator-always-on;
    					regulator-boot-on;
    				};
    
    				ldo4_reg: ldo4 {
    					/* R1.3a 572x V1_8PHY_LDO4: PCIE, HDMI*/
    					regulator-name = "ldo4";
    					regulator-min-microvolt = <1800000>;
    					regulator-max-microvolt = <1800000>;
    					regulator-always-on;
    					regulator-boot-on;
    				};
    
    				/* LDO5-8 unused */
    
    				ldo9_reg: ldo9 {
    					/* VDD_RTC  */
    					regulator-name = "ldo9";
    					regulator-min-microvolt = <840000>;
    					regulator-max-microvolt = <1160000>;
    					regulator-always-on;
    					regulator-boot-on;
    				};
    
    				ldoln_reg: ldoln {
    					/* VDDA_1V8_PLL */
    					regulator-name = "ldoln";
    					regulator-min-microvolt = <1800000>;
    					regulator-max-microvolt = <1800000>;
    					regulator-always-on;
    					regulator-boot-on;
    				};
    
    				ldousb_reg: ldousb {
    					/* VDDA_3V_USB: VDDA_USBHS33 */
    					regulator-name = "ldousb";
    					regulator-min-microvolt = <3300000>;
    					regulator-max-microvolt = <3300000>;
    					regulator-always-on;
    					regulator-boot-on;
    				};
    
    				ldortc_reg: ldortc {
    					/* VDDA_RTC  */
    					regulator-name = "ldortc";
    					regulator-min-microvolt = <1800000>;
    					regulator-max-microvolt = <1800000>;
    					regulator-always-on;
    					regulator-boot-on;
    				};
    
    				regen1: regen1 {
    					/* VDD_3V3_ON */
    					regulator-name = "regen1";
    					regulator-boot-on;
    					regulator-always-on;
    				};
    
    				regen2: regen2 {
    					/* Needed for PMIC internal resource */
    					regulator-name = "regen2";
    					regulator-boot-on;
    					regulator-always-on;
    				};
    			};
    		};
    
    		tps659038_rtc: tps659038_rtc {
    			compatible = "ti,palmas-rtc";
    			interrupt-parent = <&tps659038>;
    			interrupts = <8 IRQ_TYPE_EDGE_FALLING>;
    			wakeup-source;
    		};
    
    		tps659038_pwr_button: tps659038_pwr_button {
    			compatible = "ti,palmas-pwrbutton";
    			interrupt-parent = <&tps659038>;
    			interrupts = <1 IRQ_TYPE_EDGE_FALLING>;
    			wakeup-source;
    			ti,palmas-long-press-seconds = <12>;
    		};
    
    		tps659038_gpio: tps659038_gpio {
    			compatible = "ti,palmas-gpio";
    			gpio-controller;
    			#gpio-cells = <2>;
    		};
    
    		extcon_usb2: tps659038_usb {
    			compatible = "ti,palmas-usb-vid";
    			ti,enable-vbus-detection;
    			ti,enable-id-detection;
    			/* ID & VBUS GPIOs provided in board dts */
    		};
    	};
    
    	tpic2810: tpic2810@60 {
    		compatible = "ti,tpic2810";
    		reg = <0x60>;
    		gpio-controller;
    		#gpio-cells = <2>;
    	};
    };
    
    /* ksmwork - i2c4,5 setting */
    &i2c4 {
    	status = "okay";
    	clock-frequency = <200000>;
    };
    
    &i2c5 {
    	status = "okay";
    	clock-frequency = <200000>;
    };
    
    &mcspi3 {
    	status = "okay";
    	ti,pindir-d0-out-d1-in;
    
    	sn65hvs882: sn65hvs882@0 {
    		compatible = "pisosr-gpio";
    		gpio-controller;
    		#gpio-cells = <2>;
    
    		reg = <0>;
    		spi-max-frequency = <1000000>;
    		spi-cpol;
    	};
    };
    
    
    /* ksmwork - UART include */ 
    &uart1 {
    	status = "okay";
    	interrupts-extended = <&crossbar_mpu GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH
    		       &dra7_pmx_core 0x3e0>;
    };
    
    &uart2 {
    	status = "okay";
    	interrupts-extended = <&crossbar_mpu GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH
    		       	&dra7_pmx_core 0x3f0>;
    };
    
    &uart3 {
    	status = "okay";
    	interrupts-extended = <&crossbar_mpu GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH
    			       &dra7_pmx_core 0x248>;
    };
    
    &rtc {
    	status = "okay";
    	ext-clk-src;
    };
    
    &mac {
    	status = "okay";
    	dual_emac;
    };
    
    &cpsw_emac0 {
    	phy_id = <&davinci_mdio>, <0>;
    	phy-mode = "rgmii";
    	dual_emac_res_vlan = <1>;
    };
    
    &cpsw_emac1 {
    	phy_id = <&davinci_mdio>, <1>;
    	phy-mode = "rgmii";
    	dual_emac_res_vlan = <2>;
    };
    
    &usb2_phy1 {
    	phy-supply = <&ldousb_reg>;
    };
    
    &usb2_phy2 {
    	phy-supply = <&ldousb_reg>;
    };
    
    &usb1 {
    	dr_mode = "host";
    };
    
    &usb2 {
    	dr_mode = "peripheral";
    };
    
    &mmc1 {
    	status = "okay";
    	vmmc-supply = <&v3_3d>;
    	vqmmc-supply = <&ldo1_reg>;
    	bus-width = <4>;
    	cd-gpios = <&gpio6 27 GPIO_ACTIVE_LOW>; /* gpio 219 */
    };
    
    &mmc2 {
    	status = "okay";
    	vmmc-supply = <&v3_3d>;
    	bus-width = <8>;
    	ti,non-removable;
    	max-frequency = <96000000>;
    	no-1-8-v;
    	/delete-property/ mmc-hs200-1_8v;
    };
    
    &dcan1 {
    	status = "okay";
    	pinctrl-names = "default", "sleep", "active";
    	pinctrl-0 = <&dcan1_pins_sleep>;
    	pinctrl-1 = <&dcan1_pins_sleep>;
    	pinctrl-2 = <&dcan1_pins_default>;
    };
    
    &qspi {
    	status = "okay";
    
    	spi-max-frequency = <76800000>;
    	m25p80@0 {
    		compatible = "s25fl256s1", "jedec,spi-nor";
    		spi-max-frequency = <76800000>;
    		reg = <0>;
    		spi-tx-bus-width = <1>;
    		spi-rx-bus-width = <4>;
    		#address-cells = <1>;
    		#size-cells = <1>;
    
    		/* MTD partition table.
    		 * The ROM checks the first four physical blocks
    		 * for a valid file to boot and the flash here is
    		 * 64KiB block size.
    		 */
    		partition@0 {
    			label = "QSPI.SPL";
    			reg = <0x00000000 0x000040000>;
    		};
    		partition@1 {
    			label = "QSPI.u-boot";
    			reg = <0x00040000 0x00100000>;
    		};
    		partition@2 {
    			label = "QSPI.u-boot-spl-os";
    			reg = <0x00140000 0x00080000>;
    		};
    		partition@3 {
    			label = "QSPI.u-boot-env";
    			reg = <0x001c0000 0x00010000>;
    		};
    		partition@4 {
    			label = "QSPI.u-boot-env.backup1";
    			reg = <0x001d0000 0x0010000>;
    		};
    		partition@5 {
    			label = "QSPI.kernel";
    			reg = <0x001e0000 0x0800000>;
    		};
    		partition@6 {
    			label = "QSPI.file-system";
    			reg = <0x009e0000 0x01620000>;
    		};
    	};
    };
    

    /*
     * Copyright (C) 2014 Texas Instruments Incorporated - http://www.ti.com
     *
     * Author: Felipe Balbi <balbi@ti.com>
     *
     * Based on board/ti/dra7xx/evm.c
     *
     * SPDX-License-Identifier:	GPL-2.0+
     */
    #include <stdbool.h>
    #include <common.h>
    #include <palmas.h>
    #include <sata.h>
    #include <usb.h>
    #include <asm/omap_common.h>
    #include <asm/omap_sec_common.h>
    #include <asm/emif.h>
    #include <asm/gpio.h>
    #include <asm/arch/gpio.h>
    #include <asm/arch/clock.h>
    #include <asm/arch/dra7xx_iodelay.h>
    #include <asm/arch/sys_proto.h>
    #include <asm/arch/mmc_host_def.h>
    #include <asm/arch/sata.h>
    #include <asm/arch/gpio.h>
    #include <asm/arch/omap.h>
    #include <environment.h>
    #include <usb.h>
    #include <linux/usb/gadget.h>
    #include <dwc3-uboot.h>
    #include <dwc3-omap-uboot.h>
    #include <ti-usb-phy-uboot.h>
    #include <mmc.h>
    
    #include "../common/board_detect.h"
    #include "mux_data.h"
    
    #define board_is_x15()		board_ti_is("BBRDX15_")
    #define board_is_x15_revb1()	(board_ti_is("BBRDX15_") && \
    				 !strncmp("B.10", board_ti_get_rev(), 3))
    #define board_is_x15_revc()	(board_ti_is("BBRDX15_") && \
    				 !strncmp("C.00", board_ti_get_rev(), 3))
    #define board_is_am572x_evm()	board_ti_is("AM572PM_")
    #define board_is_am572x_evm_reva3()	\
    				(board_ti_is("AM572PM_") && \
    				 !strncmp("A.30", board_ti_get_rev(), 3))
    #define board_is_am574x_idk()	board_ti_is("AM574IDK")
    #define board_is_am572x_idk()	board_ti_is("AM572IDK")
    #define board_is_am571x_idk()	board_ti_is("AM571IDK")
    
    #ifdef CONFIG_DRIVER_TI_CPSW
    #include <cpsw.h>
    #endif
    
    DECLARE_GLOBAL_DATA_PTR;
    
    #define GPIO_ETH_LCD		GPIO_TO_PIN(2, 22)
    /* GPIO 7_11 */
    #define GPIO_DDR_VTT_EN 203
    
    /* Touch screen controller to identify the LCD */
    #define OSD_TS_FT_BUS_ADDRESS	0
    #define OSD_TS_FT_CHIP_ADDRESS	0x38
    #define OSD_TS_FT_REG_ID	0xA3
    /*
     * Touchscreen IDs for various OSD panels
     * Ref: http://www.osddisplays.com/TI/OSD101T2587-53TS_A.1.pdf
     */
    /* Used on newer osd101t2587 Panels */
    #define OSD_TS_FT_ID_5x46	0x54
    /* Used on older osd101t2045 Panels */
    #define OSD_TS_FT_ID_5606	0x08
    
    #define SYSINFO_BOARD_NAME_MAX_LEN	45
    
    #define TPS65903X_PRIMARY_SECONDARY_PAD2	0xFB
    #define TPS65903X_PAD2_POWERHOLD_MASK		0x20
    
    const struct omap_sysinfo sysinfo = {
    	"Board: UNKNOWN(BeagleBoard X15?) REV UNKNOWN\n"
    };
    
    static const struct dmm_lisa_map_regs beagle_x15_lisa_regs = {
    	.dmm_lisa_map_3 = 0x80740300,
    	.is_ma_present  = 0x1
    };
    
    static const struct dmm_lisa_map_regs am571x_idk_lisa_regs = {
    	.dmm_lisa_map_3 = 0x80640100,
    	.is_ma_present  = 0x1
    };
    
    static const struct dmm_lisa_map_regs am574x_idk_lisa_regs = {
    	.dmm_lisa_map_2 = 0xc0600200,
    	.dmm_lisa_map_3 = 0x80600100,
    	.is_ma_present  = 0x1
    };
    
    void emif_get_dmm_regs(const struct dmm_lisa_map_regs **dmm_lisa_regs)
    {
    	if (board_is_am571x_idk())
    		*dmm_lisa_regs = &am571x_idk_lisa_regs;
    	else if (board_is_am574x_idk())
    		*dmm_lisa_regs = &am574x_idk_lisa_regs;
    	else
    		*dmm_lisa_regs = &beagle_x15_lisa_regs;
    }
    
    static const struct emif_regs beagle_x15_emif1_ddr3_532mhz_emif_regs = {
    	.sdram_config_init		= 0x61851b32,
    	.sdram_config			= 0x61851b32,
    	.sdram_config2			= 0x08000000,
    	.ref_ctrl			= 0x000040F1,
    	.ref_ctrl_final			= 0x00001035,
    	.sdram_tim1			= 0xcccf36ab,
    	.sdram_tim2			= 0x308f7fda,
    	.sdram_tim3			= 0x409f88a8,
    	.read_idle_ctrl			= 0x00050000,
    	.zq_config			= 0x5007190b,
    	.temp_alert_config		= 0x00000000,
    	.emif_ddr_phy_ctlr_1_init 	= 0x0024400b,
    	.emif_ddr_phy_ctlr_1		= 0x0e24400b,
    	.emif_ddr_ext_phy_ctrl_1 	= 0x10040100,
    	.emif_ddr_ext_phy_ctrl_2 	= 0x00910091,
    	.emif_ddr_ext_phy_ctrl_3 	= 0x00950095,
    	.emif_ddr_ext_phy_ctrl_4 	= 0x009b009b,
    	.emif_ddr_ext_phy_ctrl_5 	= 0x009e009e,
    	.emif_rd_wr_lvl_rmp_win		= 0x00000000,
    	.emif_rd_wr_lvl_rmp_ctl		= 0x80000000,
    	.emif_rd_wr_lvl_ctl		= 0x00000000,
    	.emif_rd_wr_exec_thresh		= 0x00000305
    };
    
    /* Ext phy ctrl regs 1-35 */
    static const u32 beagle_x15_emif1_ddr3_ext_phy_ctrl_const_regs[] = {
    	0x10040100,
    	0x00910091,
    	0x00950095,
    	0x009B009B,
    	0x009E009E,
    	0x00980098,
    	0x00340034,
    	0x00350035,
    	0x00340034,
    	0x00310031,
    	0x00340034,
    	0x007F007F,
    	0x007F007F,
    	0x007F007F,
    	0x007F007F,
    	0x007F007F,
    	0x00480048,
    	0x004A004A,
    	0x00520052,
    	0x00550055,
    	0x00500050,
    	0x00000000,
    	0x00600020,
    	0x40011080,
    	0x08102040,
    	0x0,
    	0x0,
    	0x0,
    	0x0,
    	0x0,
    	0x0,
    	0x0,
    	0x0,
    	0x0,
    	0x0
    };
    
    static const struct emif_regs beagle_x15_emif2_ddr3_532mhz_emif_regs = {
    	.sdram_config_init		= 0x61851b32,
    	.sdram_config			= 0x61851b32,
    	.sdram_config2			= 0x08000000,
    	.ref_ctrl			= 0x000040F1,
    	.ref_ctrl_final			= 0x00001035,
    	.sdram_tim1			= 0xcccf36b3,
    	.sdram_tim2			= 0x308f7fda,
    	.sdram_tim3			= 0x407f88a8,
    	.read_idle_ctrl			= 0x00050000,
    	.zq_config			= 0x5007190b,
    	.temp_alert_config		= 0x00000000,
    	.emif_ddr_phy_ctlr_1_init 	= 0x0024400b,
    	.emif_ddr_phy_ctlr_1		= 0x0e24400b,
    	.emif_ddr_ext_phy_ctrl_1 	= 0x10040100,
    	.emif_ddr_ext_phy_ctrl_2 	= 0x00910091,
    	.emif_ddr_ext_phy_ctrl_3 	= 0x00950095,
    	.emif_ddr_ext_phy_ctrl_4 	= 0x009b009b,
    	.emif_ddr_ext_phy_ctrl_5 	= 0x009e009e,
    	.emif_rd_wr_lvl_rmp_win		= 0x00000000,
    	.emif_rd_wr_lvl_rmp_ctl		= 0x80000000,
    	.emif_rd_wr_lvl_ctl		= 0x00000000,
    	.emif_rd_wr_exec_thresh		= 0x00000305
    };
    
    static const u32 beagle_x15_emif2_ddr3_ext_phy_ctrl_const_regs[] = {
    	0x10040100,
    	0x00910091,
    	0x00950095,
    	0x009B009B,
    	0x009E009E,
    	0x00980098,
    	0x00340034,
    	0x00350035,
    	0x00340034,
    	0x00310031,
    	0x00340034,
    	0x007F007F,
    	0x007F007F,
    	0x007F007F,
    	0x007F007F,
    	0x007F007F,
    	0x00480048,
    	0x004A004A,
    	0x00520052,
    	0x00550055,
    	0x00500050,
    	0x00000000,
    	0x00600020,
    	0x40011080,
    	0x08102040,
    	0x0,
    	0x0,
    	0x0,
    	0x0,
    	0x0,
    	0x0,
    	0x0,
    	0x0,
    	0x0,
    	0x0
    };
    
    static const struct emif_regs am571x_emif1_ddr3_666mhz_emif_regs = {
    	.sdram_config_init		= 0x61863332,
    	.sdram_config			= 0x61863332,
    	.sdram_config2			= 0x08000000,
    	.ref_ctrl			= 0x0000514d,
    	.ref_ctrl_final			= 0x0000144a,
    	.sdram_tim1			= 0xd333887c,
    	.sdram_tim2			= 0x30b37fe3,
    	.sdram_tim3			= 0x409f8ad8,
    	.read_idle_ctrl			= 0x00050000,
    	.zq_config			= 0x5007190b,
    	.temp_alert_config		= 0x00000000,
    	.emif_ddr_phy_ctlr_1_init	= 0x0024400f,
    	.emif_ddr_phy_ctlr_1		= 0x0e24400f,
    	.emif_ddr_ext_phy_ctrl_1	= 0x10040100,
    	.emif_ddr_ext_phy_ctrl_2	= 0x00910091,
    	.emif_ddr_ext_phy_ctrl_3	= 0x00950095,
    	.emif_ddr_ext_phy_ctrl_4	= 0x009b009b,
    	.emif_ddr_ext_phy_ctrl_5	= 0x009e009e,
    	.emif_rd_wr_lvl_rmp_win		= 0x00000000,
    	.emif_rd_wr_lvl_rmp_ctl		= 0x80000000,
    	.emif_rd_wr_lvl_ctl		= 0x00000000,
    	.emif_rd_wr_exec_thresh		= 0x00000305
    };
    
    static const struct emif_regs am574x_emif1_ddr3_666mhz_emif_ecc_regs = {
    	.sdram_config_init		= 0x61863332,
    	.sdram_config			= 0x61863332,
    	.sdram_config2			= 0x08000000,
    	.ref_ctrl			= 0x0000514d,
    	.ref_ctrl_final			= 0x0000144a,
    	.sdram_tim1			= 0xd333887c,
    	.sdram_tim2			= 0x30b37fe3,
    	.sdram_tim3			= 0x409f8ad8,
    	.read_idle_ctrl			= 0x00050000,
    	.zq_config			= 0x5007190b,
    	.temp_alert_config		= 0x00000000,
    	.emif_ddr_phy_ctlr_1_init	= 0x0024400f,
    	.emif_ddr_phy_ctlr_1		= 0x0e24400f,
    	.emif_ddr_ext_phy_ctrl_1	= 0x10040100,
    	.emif_ddr_ext_phy_ctrl_2	= 0x00910091,
    	.emif_ddr_ext_phy_ctrl_3	= 0x00950095,
    	.emif_ddr_ext_phy_ctrl_4	= 0x009b009b,
    	.emif_ddr_ext_phy_ctrl_5	= 0x009e009e,
    	.emif_rd_wr_lvl_rmp_win		= 0x00000000,
    	.emif_rd_wr_lvl_rmp_ctl		= 0x80000000,
    	.emif_rd_wr_lvl_ctl		= 0x00000000,
    	.emif_rd_wr_exec_thresh		= 0x00000305,
    	.emif_ecc_ctrl_reg		= 0xD0000001,
    	.emif_ecc_address_range_1	= 0x3FFF0000,
    	.emif_ecc_address_range_2	= 0x00000000
    };
    
    void emif_get_reg_dump(u32 emif_nr, const struct emif_regs **regs)
    {
    	switch (emif_nr) {
    	case 1:
    		if (board_is_am571x_idk())
    			*regs = &am571x_emif1_ddr3_666mhz_emif_regs;
    		else if (board_is_am574x_idk())
    			*regs = &am574x_emif1_ddr3_666mhz_emif_ecc_regs;
    		else
    			*regs = &beagle_x15_emif1_ddr3_532mhz_emif_regs;
    		break;
    	case 2:
    		if (board_is_am574x_idk())
    			*regs = &am571x_emif1_ddr3_666mhz_emif_regs;
    		else
    			*regs = &beagle_x15_emif2_ddr3_532mhz_emif_regs;
    		break;
    	}
    }
    
    void emif_get_ext_phy_ctrl_const_regs(u32 emif_nr, const u32 **regs, u32 *size)
    {
    	switch (emif_nr) {
    	case 1:
    		*regs = beagle_x15_emif1_ddr3_ext_phy_ctrl_const_regs;
    		*size = ARRAY_SIZE(beagle_x15_emif1_ddr3_ext_phy_ctrl_const_regs);
    		break;
    	case 2:
    		*regs = beagle_x15_emif2_ddr3_ext_phy_ctrl_const_regs;
    		*size = ARRAY_SIZE(beagle_x15_emif2_ddr3_ext_phy_ctrl_const_regs);
    		break;
    	}
    }
    
    struct vcores_data beagle_x15_volts = {
    	.mpu.value[OPP_NOM]	= VDD_MPU_DRA7_NOM,
    	.mpu.efuse.reg[OPP_NOM]	= STD_FUSE_OPP_VMIN_MPU_NOM,
    	.mpu.efuse.reg_bits     = DRA752_EFUSE_REGBITS,
    	.mpu.addr		= TPS659038_REG_ADDR_SMPS12,
    	.mpu.pmic		= &tps659038,
    	.mpu.abb_tx_done_mask	= OMAP_ABB_MPU_TXDONE_MASK,
    
    	.eve.value[OPP_NOM]	= VDD_EVE_DRA7_NOM,
    	.eve.value[OPP_OD]	= VDD_EVE_DRA7_OD,
    	.eve.value[OPP_HIGH]	= VDD_EVE_DRA7_HIGH,
    	.eve.efuse.reg[OPP_NOM]	= STD_FUSE_OPP_VMIN_DSPEVE_NOM,
    	.eve.efuse.reg[OPP_OD]	= STD_FUSE_OPP_VMIN_DSPEVE_OD,
    	.eve.efuse.reg[OPP_HIGH]	= STD_FUSE_OPP_VMIN_DSPEVE_HIGH,
    	.eve.efuse.reg_bits	= DRA752_EFUSE_REGBITS,
    	.eve.addr		= TPS659038_REG_ADDR_SMPS45,
    	.eve.pmic		= &tps659038,
    	.eve.abb_tx_done_mask	= OMAP_ABB_EVE_TXDONE_MASK,
    
    	.gpu.value[OPP_NOM]	= VDD_GPU_DRA7_NOM,
    	.gpu.value[OPP_OD]	= VDD_GPU_DRA7_OD,
    	.gpu.value[OPP_HIGH]	= VDD_GPU_DRA7_HIGH,
    	.gpu.efuse.reg[OPP_NOM]	= STD_FUSE_OPP_VMIN_GPU_NOM,
    	.gpu.efuse.reg[OPP_OD]	= STD_FUSE_OPP_VMIN_GPU_OD,
    	.gpu.efuse.reg[OPP_HIGH]	= STD_FUSE_OPP_VMIN_GPU_HIGH,
    	.gpu.efuse.reg_bits	= DRA752_EFUSE_REGBITS,
    	.gpu.addr		= TPS659038_REG_ADDR_SMPS45,
    	.gpu.pmic		= &tps659038,
    	.gpu.abb_tx_done_mask	= OMAP_ABB_GPU_TXDONE_MASK,
    
    	.core.value[OPP_NOM]	= VDD_CORE_DRA7_NOM,
    	.core.efuse.reg[OPP_NOM]	= STD_FUSE_OPP_VMIN_CORE_NOM,
    	.core.efuse.reg_bits	= DRA752_EFUSE_REGBITS,
    	.core.addr		= TPS659038_REG_ADDR_SMPS6,
    	.core.pmic		= &tps659038,
    
    	.iva.value[OPP_NOM]	= VDD_IVA_DRA7_NOM,
    	.iva.value[OPP_OD]	= VDD_IVA_DRA7_OD,
    	.iva.value[OPP_HIGH]	= VDD_IVA_DRA7_HIGH,
    	.iva.efuse.reg[OPP_NOM]	= STD_FUSE_OPP_VMIN_IVA_NOM,
    	.iva.efuse.reg[OPP_OD]	= STD_FUSE_OPP_VMIN_IVA_OD,
    	.iva.efuse.reg[OPP_HIGH]	= STD_FUSE_OPP_VMIN_IVA_HIGH,
    	.iva.efuse.reg_bits	= DRA752_EFUSE_REGBITS,
    	.iva.addr		= TPS659038_REG_ADDR_SMPS45,
    	.iva.pmic		= &tps659038,
    	.iva.abb_tx_done_mask	= OMAP_ABB_IVA_TXDONE_MASK,
    };
    
    struct vcores_data am572x_idk_volts = {
    	.mpu.value[OPP_NOM]	= VDD_MPU_DRA7_NOM,
    	.mpu.efuse.reg[OPP_NOM]	= STD_FUSE_OPP_VMIN_MPU_NOM,
    	.mpu.efuse.reg_bits     = DRA752_EFUSE_REGBITS,
    	.mpu.addr		= TPS659038_REG_ADDR_SMPS12,
    	.mpu.pmic		= &tps659038,
    	.mpu.abb_tx_done_mask	= OMAP_ABB_MPU_TXDONE_MASK,
    
    	.eve.value[OPP_NOM]	= VDD_EVE_DRA7_NOM,
    	.eve.value[OPP_OD]	= VDD_EVE_DRA7_OD,
    	.eve.value[OPP_HIGH]	= VDD_EVE_DRA7_HIGH,
    	.eve.efuse.reg[OPP_NOM]	= STD_FUSE_OPP_VMIN_DSPEVE_NOM,
    	.eve.efuse.reg[OPP_OD]	= STD_FUSE_OPP_VMIN_DSPEVE_OD,
    	.eve.efuse.reg[OPP_HIGH]	= STD_FUSE_OPP_VMIN_DSPEVE_HIGH,
    	.eve.efuse.reg_bits	= DRA752_EFUSE_REGBITS,
    	.eve.addr		= TPS659038_REG_ADDR_SMPS45,
    	.eve.pmic		= &tps659038,
    	.eve.abb_tx_done_mask	= OMAP_ABB_EVE_TXDONE_MASK,
    
    	.gpu.value[OPP_NOM]	= VDD_GPU_DRA7_NOM,
    	.gpu.value[OPP_OD]	= VDD_GPU_DRA7_OD,
    	.gpu.value[OPP_HIGH]	= VDD_GPU_DRA7_HIGH,
    	.gpu.efuse.reg[OPP_NOM]	= STD_FUSE_OPP_VMIN_GPU_NOM,
    	.gpu.efuse.reg[OPP_OD]	= STD_FUSE_OPP_VMIN_GPU_OD,
    	.gpu.efuse.reg[OPP_HIGH]	= STD_FUSE_OPP_VMIN_GPU_HIGH,
    	.gpu.efuse.reg_bits	= DRA752_EFUSE_REGBITS,
    	.gpu.addr		= TPS659038_REG_ADDR_SMPS6,
    	.gpu.pmic		= &tps659038,
    	.gpu.abb_tx_done_mask	= OMAP_ABB_GPU_TXDONE_MASK,
    
    	.core.value[OPP_NOM]	= VDD_CORE_DRA7_NOM,
    	.core.efuse.reg[OPP_NOM]	= STD_FUSE_OPP_VMIN_CORE_NOM,
    	.core.efuse.reg_bits	= DRA752_EFUSE_REGBITS,
    	.core.addr		= TPS659038_REG_ADDR_SMPS7,
    	.core.pmic		= &tps659038,
    
    	.iva.value[OPP_NOM]	= VDD_IVA_DRA7_NOM,
    	.iva.value[OPP_OD]	= VDD_IVA_DRA7_OD,
    	.iva.value[OPP_HIGH]	= VDD_IVA_DRA7_HIGH,
    	.iva.efuse.reg[OPP_NOM]	= STD_FUSE_OPP_VMIN_IVA_NOM,
    	.iva.efuse.reg[OPP_OD]	= STD_FUSE_OPP_VMIN_IVA_OD,
    	.iva.efuse.reg[OPP_HIGH]	= STD_FUSE_OPP_VMIN_IVA_HIGH,
    	.iva.efuse.reg_bits	= DRA752_EFUSE_REGBITS,
    	.iva.addr		= TPS659038_REG_ADDR_SMPS8,
    	.iva.pmic		= &tps659038,
    	.iva.abb_tx_done_mask	= OMAP_ABB_IVA_TXDONE_MASK,
    };
    
    struct vcores_data am571x_idk_volts = {
    	.mpu.value[OPP_NOM]	= VDD_MPU_DRA7_NOM,
    	.mpu.efuse.reg[OPP_NOM]	= STD_FUSE_OPP_VMIN_MPU_NOM,
    	.mpu.efuse.reg_bits     = DRA752_EFUSE_REGBITS,
    	.mpu.addr		= TPS659038_REG_ADDR_SMPS12,
    	.mpu.pmic		= &tps659038,
    	.mpu.abb_tx_done_mask = OMAP_ABB_MPU_TXDONE_MASK,
    
    	.eve.value[OPP_NOM]	= VDD_EVE_DRA7_NOM,
    	.eve.value[OPP_OD]	= VDD_EVE_DRA7_OD,
    	.eve.value[OPP_HIGH]	= VDD_EVE_DRA7_HIGH,
    	.eve.efuse.reg[OPP_NOM]	= STD_FUSE_OPP_VMIN_DSPEVE_NOM,
    	.eve.efuse.reg[OPP_OD]	= STD_FUSE_OPP_VMIN_DSPEVE_OD,
    	.eve.efuse.reg[OPP_HIGH]	= STD_FUSE_OPP_VMIN_DSPEVE_HIGH,
    	.eve.efuse.reg_bits	= DRA752_EFUSE_REGBITS,
    	.eve.addr		= TPS659038_REG_ADDR_SMPS45,
    	.eve.pmic		= &tps659038,
    	.eve.abb_tx_done_mask	= OMAP_ABB_EVE_TXDONE_MASK,
    
    	.gpu.value[OPP_NOM]	= VDD_GPU_DRA7_NOM,
    	.gpu.value[OPP_OD]	= VDD_GPU_DRA7_OD,
    	.gpu.value[OPP_HIGH]	= VDD_GPU_DRA7_HIGH,
    	.gpu.efuse.reg[OPP_NOM]	= STD_FUSE_OPP_VMIN_GPU_NOM,
    	.gpu.efuse.reg[OPP_OD]	= STD_FUSE_OPP_VMIN_GPU_OD,
    	.gpu.efuse.reg[OPP_HIGH]	= STD_FUSE_OPP_VMIN_GPU_HIGH,
    	.gpu.efuse.reg_bits	= DRA752_EFUSE_REGBITS,
    	.gpu.addr		= TPS659038_REG_ADDR_SMPS6,
    	.gpu.pmic		= &tps659038,
    	.gpu.abb_tx_done_mask	= OMAP_ABB_GPU_TXDONE_MASK,
    
    	.core.value[OPP_NOM]	= VDD_CORE_DRA7_NOM,
    	.core.efuse.reg[OPP_NOM]	= STD_FUSE_OPP_VMIN_CORE_NOM,
    	.core.efuse.reg_bits	= DRA752_EFUSE_REGBITS,
    	.core.addr		= TPS659038_REG_ADDR_SMPS7,
    	.core.pmic		= &tps659038,
    
    	.iva.value[OPP_NOM]	= VDD_IVA_DRA7_NOM,
    	.iva.value[OPP_OD]	= VDD_IVA_DRA7_OD,
    	.iva.value[OPP_HIGH]	= VDD_IVA_DRA7_HIGH,
    	.iva.efuse.reg[OPP_NOM]	= STD_FUSE_OPP_VMIN_IVA_NOM,
    	.iva.efuse.reg[OPP_OD]	= STD_FUSE_OPP_VMIN_IVA_OD,
    	.iva.efuse.reg[OPP_HIGH]	= STD_FUSE_OPP_VMIN_IVA_HIGH,
    	.iva.efuse.reg_bits	= DRA752_EFUSE_REGBITS,
    	.iva.addr		= TPS659038_REG_ADDR_SMPS45,
    	.iva.pmic		= &tps659038,
    	.iva.abb_tx_done_mask	= OMAP_ABB_IVA_TXDONE_MASK,
    };
    
    int get_voltrail_opp(int rail_offset)
    {
    	int opp;
    
    	switch (rail_offset) {
    	case VOLT_MPU:
    		opp = DRA7_MPU_OPP;
    		break;
    	case VOLT_CORE:
    		opp = DRA7_CORE_OPP;
    		break;
    	case VOLT_GPU:
    		opp = DRA7_GPU_OPP;
    		break;
    	case VOLT_EVE:
    		opp = DRA7_DSPEVE_OPP;
    		break;
    	case VOLT_IVA:
    		opp = DRA7_IVA_OPP;
    		break;
    	default:
    		opp = OPP_NOM;
    	}
    
    	return opp;
    }
    
    
    #ifdef CONFIG_SPL_BUILD
    /* No env to setup for SPL */
    static inline void setup_board_eeprom_env(void) { }
    
    /* Override function to read eeprom information */
    void do_board_detect(void)
    {
    	int rc;
    
    	rc = ti_i2c_eeprom_am_get(CONFIG_EEPROM_BUS_ADDRESS,
    				  CONFIG_EEPROM_CHIP_ADDRESS);
    	if (rc)
    		printf("ti_i2c_eeprom_init failed %d\n", rc);
    }
    
    #else	/* CONFIG_SPL_BUILD */
    
    /* Override function to read eeprom information: actual i2c read done by SPL*/
    void do_board_detect(void)
    {
    	char *bname = NULL;
    	int rc;
    
    	rc = ti_i2c_eeprom_am_get(CONFIG_EEPROM_BUS_ADDRESS,
    				  CONFIG_EEPROM_CHIP_ADDRESS);
    	if (rc)
    		printf("ti_i2c_eeprom_init failed %d\n", rc);
    
    	if (board_is_x15())
    		bname = "BeagleBoard X15";
    	else if (board_is_am572x_evm())
    		bname = "AM572x EVM";
    	else if (board_is_am574x_idk())
    		bname = "AM574x IDK";
    	else if (board_is_am572x_idk())
    		bname = "AM572x IDK";
    	else if (board_is_am571x_idk())
    		bname = "AM571x IDK";
    
    	if (bname)
    		snprintf(sysinfo.board_string, SYSINFO_BOARD_NAME_MAX_LEN,
    			 "Board: %s REV %s\n", bname, board_ti_get_rev());
    }
    
    static void setup_board_eeprom_env(void)
    {
    	char *name = "beagle_x15";
    	int rc;
    
    	rc = ti_i2c_eeprom_am_get(CONFIG_EEPROM_BUS_ADDRESS,
    				  CONFIG_EEPROM_CHIP_ADDRESS);
    	if (rc)
    		goto invalid_eeprom;
    
    	if (board_is_x15()) {
    		if (board_is_x15_revb1())
    			name = "beagle_x15_revb1";
    		else if (board_is_x15_revc())
    			name = "beagle_x15_revc";
    		else
    			name = "beagle_x15";
    	} else if (board_is_am572x_evm()) {
    		if (board_is_am572x_evm_reva3())
    			name = "am57xx_evm_reva3";
    		else
    			name = "am57xx_evm";
    	} else if (board_is_am574x_idk()) {
    		name = "am574x_idk";
    	} else if (board_is_am572x_idk()) {
    		name = "am572x_idk";
    	} else if (board_is_am571x_idk()) {
    		name = "am571x_idk";
    	} else {
    		printf("Unidentified board claims %s in eeprom header\n",
    		       board_ti_get_name());
    	}
    
    invalid_eeprom:
    	set_board_info_env(name);
    }
    
    #endif	/* CONFIG_SPL_BUILD */
    
    void vcores_init(void)
    {
        // ksmwork - am5728
        *omap_vcores = &am572x_idk_volts;
    #if 0
    	if (board_is_am572x_idk() || board_is_am574x_idk())
    		*omap_vcores = &am572x_idk_volts;
    	else if (board_is_am571x_idk())
    		*omap_vcores = &am571x_idk_volts;
    	else
    		*omap_vcores = &beagle_x15_volts;
    #endif
    }
    
    void hw_data_init(void)
    {
    	*prcm = &dra7xx_prcm;
    	if (is_dra72x())
    		*dplls_data = &dra72x_dplls;
    	else if (is_dra76x())
    		*dplls_data = &dra76x_dplls;
    	else
    		*dplls_data = &dra7xx_dplls;
    	*ctrl = &dra7xx_ctrl;
    }
    
    bool am571x_idk_needs_lcd(void)
    {
    	bool needs_lcd;
    
    	gpio_request(GPIO_ETH_LCD, "nLCD_Detect");
    	if (gpio_get_value(GPIO_ETH_LCD))
    		needs_lcd = false;
    	else
    		needs_lcd = true;
    
    	gpio_free(GPIO_ETH_LCD);
    
    	return needs_lcd;
    }
    
    int board_init(void)
    {
    	gpmc_init();
    	gd->bd->bi_boot_params = (CONFIG_SYS_SDRAM_BASE + 0x100);
    
    	return 0;
    }
    
    void am57x_idk_lcd_detect(void)
    {
    	int r = -ENODEV;
    	char *idk_lcd = "no";
    	uint8_t buf = 0;
    
    	/* Only valid for IDKs */
    	if (board_is_x15() || board_is_am572x_evm())
    		return;
    
    	/* Only AM571x IDK has gpio control detect.. so check that */
    	if (board_is_am571x_idk() && !am571x_idk_needs_lcd())
    		goto out;
    
    	r = i2c_set_bus_num(OSD_TS_FT_BUS_ADDRESS);
    	if (r) {
    		printf("%s: Failed to set bus address to %d: %d\n",
    		       __func__, OSD_TS_FT_BUS_ADDRESS, r);
    		goto out;
    	}
    	r = i2c_probe(OSD_TS_FT_CHIP_ADDRESS);
    	if (r) {
    		/* AM572x IDK has no explicit settings for optional LCD kit */
    		if (board_is_am571x_idk()) {
    			printf("%s: Touch screen detect failed: %d!\n",
    			       __func__, r);
    		}
    		goto out;
    	}
    
    	/* Read FT ID */
    	r = i2c_read(OSD_TS_FT_CHIP_ADDRESS, OSD_TS_FT_REG_ID, 1, &buf, 1);
    	if (r) {
    		printf("%s: Touch screen ID read %d:0x%02x[0x%02x] failed:%d\n",
    		       __func__, OSD_TS_FT_BUS_ADDRESS, OSD_TS_FT_CHIP_ADDRESS,
    		       OSD_TS_FT_REG_ID, r);
    		goto out;
    	}
    
    	switch (buf) {
    	case OSD_TS_FT_ID_5606:
    		idk_lcd = "osd101t2045";
    		break;
    	case OSD_TS_FT_ID_5x46:
    		idk_lcd = "osd101t2587";
    		break;
    	default:
    		printf("%s: Unidentifed Touch screen ID 0x%02x\n",
    		       __func__, buf);
    		/* we will let default be "no lcd" */
    	}
    out:
    	env_set("idk_lcd", idk_lcd);
    
    	/*
    	 * On AM571x_IDK, no Display with J51 set to LCD is considered as an
    	 * invalid configuration and we prevent boot to get user attention.
    	 */
    	if (board_is_am571x_idk() && am571x_idk_needs_lcd() &&
    	    !strncmp(idk_lcd, "no", 2)) {
    		printf("%s: Invalid HW configuration: display not detected/supported but J51 is set. Remove J51 to boot without display.\n",
    		       __func__);
    		hang();
    	}
    
    	return;
    }
    
    #if CONFIG_IS_ENABLED(DM_USB) && CONFIG_IS_ENABLED(OF_CONTROL)
    static int device_okay(const char *path)
    {
    	int node;
    
    	node = fdt_path_offset(gd->fdt_blob, path);
    	if (node < 0)
    		return 0;
    
    	return fdtdec_get_is_enabled(gd->fdt_blob, node);
    }
    #endif
    
    int board_late_init(void)
    {
    	setup_board_eeprom_env();
    	u8 val;
    
    	/*
    	 * DEV_CTRL.DEV_ON = 1 please - else palmas switches off in 8 seconds
    	 * This is the POWERHOLD-in-Low behavior.
    	 */
    	palmas_i2c_write_u8(TPS65903X_CHIP_P1, 0xA0, 0x1);
    
    	/*
    	 * Default FIT boot on HS devices. Non FIT images are not allowed
    	 * on HS devices.
    	 */
    	if (get_device_type() == HS_DEVICE)
    		env_set("boot_fit", "1");
    
    	/*
    	 * Set the GPIO7 Pad to POWERHOLD. This has higher priority
    	 * over DEV_CTRL.DEV_ON bit. This can be reset in case of
    	 * PMIC Power off. So to be on the safer side set it back
    	 * to POWERHOLD mode irrespective of the current state.
    	 */
    	palmas_i2c_read_u8(TPS65903X_CHIP_P1, TPS65903X_PRIMARY_SECONDARY_PAD2,
    			   &val);
    	val = val | TPS65903X_PAD2_POWERHOLD_MASK;
    	palmas_i2c_write_u8(TPS65903X_CHIP_P1, TPS65903X_PRIMARY_SECONDARY_PAD2,
    			    val);
    
    	omap_die_id_serial();
    	omap_set_fastboot_vars();
    
    	am57x_idk_lcd_detect();
    
    #if !defined(CONFIG_SPL_BUILD)
    	board_ti_set_ethaddr(2);
    #endif
    
    #if CONFIG_IS_ENABLED(DM_USB) && CONFIG_IS_ENABLED(OF_CONTROL)
    	if (device_okay("/ocp/omap_dwc3_1@48880000"))
    		enable_usb_clocks(0);
    	if (device_okay("/ocp/omap_dwc3_2@488c0000"))
    		enable_usb_clocks(1);
    #endif
    	return 0;
    }
    
    void set_muxconf_regs(void)
    {
    	do_set_mux32((*ctrl)->control_padconf_core_base,
    		     early_padconf, ARRAY_SIZE(early_padconf));
    }
    
    #ifdef CONFIG_IODELAY_RECALIBRATION
    void recalibrate_iodelay(void)
    {
    	const struct pad_conf_entry *pconf;
    	const struct iodelay_cfg_entry *iod, *delta_iod;
    	int pconf_sz, iod_sz, delta_iod_sz = 0;
    	int ret;
    
    
    	// ksmwork - all am5728
    	if (board_is_am572x_idk()) {
    		pconf = core_padconf_array_essential_am572x_idk;
    		pconf_sz = ARRAY_SIZE(core_padconf_array_essential_am572x_idk);
    		iod = iodelay_cfg_array_am572x_idk;
    		iod_sz = ARRAY_SIZE(iodelay_cfg_array_am572x_idk);
    	} else if (board_is_am574x_idk()) {
            pconf = core_padconf_array_essential_am572x_idk;
            pconf_sz = ARRAY_SIZE(core_padconf_array_essential_am572x_idk);
            iod = iodelay_cfg_array_am572x_idk;
            iod_sz = ARRAY_SIZE(iodelay_cfg_array_am572x_idk);
    	} else if (board_is_am571x_idk()) {
            pconf = core_padconf_array_essential_am572x_idk;
            pconf_sz = ARRAY_SIZE(core_padconf_array_essential_am572x_idk);
            iod = iodelay_cfg_array_am572x_idk;
            iod_sz = ARRAY_SIZE(iodelay_cfg_array_am572x_idk);
    	} else {
            pconf = core_padconf_array_essential_am572x_idk;
            pconf_sz = ARRAY_SIZE(core_padconf_array_essential_am572x_idk);
            iod = iodelay_cfg_array_am572x_idk;
            iod_sz = ARRAY_SIZE(iodelay_cfg_array_am572x_idk);
    	}
    
    	/* Setup I/O isolation */
    	ret = __recalibrate_iodelay_start();
    	if (ret)
    		goto err;
    
    	/* Do the muxing here */
    	do_set_mux32((*ctrl)->control_padconf_core_base, pconf, pconf_sz);
    
    	/* Now do the weird minor deltas that should be safe */
    	if (board_is_x15() || board_is_am572x_evm()) {
    		if (board_is_x15_revb1() || board_is_am572x_evm_reva3() ||
    		    board_is_x15_revc()) {
    		    pconf = core_padconf_array_essential_am572x_idk;
               pconf_sz = ARRAY_SIZE(core_padconf_array_essential_am572x_idk);
    		} else {
    		    pconf = core_padconf_array_essential_am572x_idk;
               pconf_sz = ARRAY_SIZE(core_padconf_array_essential_am572x_idk);
    		}
    		do_set_mux32((*ctrl)->control_padconf_core_base, pconf, pconf_sz);
    	}
    
    	if (board_is_am571x_idk()) {
    		if (am571x_idk_needs_lcd()) {
    	        pconf = core_padconf_array_essential_am572x_idk;
    	        pconf_sz = ARRAY_SIZE(core_padconf_array_essential_am572x_idk);
    		} else {
                pconf = core_padconf_array_essential_am572x_idk;
                pconf_sz = ARRAY_SIZE(core_padconf_array_essential_am572x_idk);
    		}
    		do_set_mux32((*ctrl)->control_padconf_core_base, pconf, pconf_sz);
    	}
    
    	/* Setup IOdelay configuration */
    	ret = do_set_iodelay((*ctrl)->iodelay_config_base, iod, iod_sz);
    	if (delta_iod_sz)
    		ret = do_set_iodelay((*ctrl)->iodelay_config_base, delta_iod,
    				     delta_iod_sz);
    
    err:
    	/* Closeup.. remove isolation */
    	__recalibrate_iodelay_end(ret);
    }
    #endif
    
    #if defined(CONFIG_MMC)
    int board_mmc_init(bd_t *bis)
    {
    	omap_mmc_init(0, 0, 0, -1, -1);
    	omap_mmc_init(1, 0, 0, -1, -1);
    	return 0;
    }
    
    static const struct mmc_platform_fixups am57x_es1_1_mmc1_fixups = {
    	.hw_rev = "rev11",
    	.unsupported_caps = MMC_CAP(MMC_HS_200) |
    			    MMC_CAP(UHS_SDR104),
    	.max_freq = 96000000,
    };
    
    static const struct mmc_platform_fixups am57x_es1_1_mmc23_fixups = {
    	.hw_rev = "rev11",
    	.unsupported_caps = MMC_CAP(MMC_HS_200) |
    			    MMC_CAP(UHS_SDR104) |
    			    MMC_CAP(UHS_SDR50),
    	.max_freq = 48000000,
    };
    
    const struct mmc_platform_fixups *platform_fixups_mmc(uint32_t addr)
    {
    	switch (omap_revision()) {
    	case DRA752_ES1_0:
    	case DRA752_ES1_1:
    		if (addr == OMAP_HSMMC1_BASE)
    			return &am57x_es1_1_mmc1_fixups;
    		else
    			return &am57x_es1_1_mmc23_fixups;
    	default:
    		return NULL;
    	}
    }
    #endif
    
    #if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_OS_BOOT)
    int spl_start_uboot(void)
    {
    	/* break into full u-boot on 'c' */
    	if (serial_tstc() && serial_getc() == 'c')
    		return 1;
    
    #ifdef CONFIG_SPL_ENV_SUPPORT
    	env_init();
    	env_load();
    	if (env_get_yesno("boot_os") != 1)
    		return 1;
    #endif
    
    	return 0;
    }
    #endif
    
    #ifdef CONFIG_USB_DWC3
    static struct dwc3_device usb_otg_ss2 = {
    	.maximum_speed = USB_SPEED_HIGH,
    	.base = DRA7_USB_OTG_SS2_BASE,
    	.tx_fifo_resize = false,
    	.index = 1,
    };
    
    static struct dwc3_omap_device usb_otg_ss2_glue = {
    	.base = (void *)DRA7_USB_OTG_SS2_GLUE_BASE,
    	.utmi_mode = DWC3_OMAP_UTMI_MODE_SW,
    	.index = 1,
    };
    
    static struct ti_usb_phy_device usb_phy2_device = {
    	.usb2_phy_power = (void *)DRA7_USB2_PHY2_POWER,
    	.index = 1,
    };
    
    int usb_gadget_handle_interrupts(int index)
    {
    	u32 status;
    
    	status = dwc3_omap_uboot_interrupt_status(index);
    	if (status)
    		dwc3_uboot_handle_interrupt(index);
    
    	return 0;
    }
    #endif /* CONFIG_USB_DWC3 */
    
    #if defined(CONFIG_USB_DWC3) || defined(CONFIG_USB_XHCI_OMAP)
    int board_usb_init(int index, enum usb_init_type init)
    {
    	enable_usb_clocks(index);
    	switch (index) {
    	case 0:
    		if (init == USB_INIT_DEVICE) {
    			printf("port %d can't be used as device\n", index);
    			disable_usb_clocks(index);
    			return -EINVAL;
    		}
    		break;
    	case 1:
    		if (init == USB_INIT_DEVICE) {
    #ifdef CONFIG_USB_DWC3
    			usb_otg_ss2.dr_mode = USB_DR_MODE_PERIPHERAL;
    			usb_otg_ss2_glue.vbus_id_status = OMAP_DWC3_VBUS_VALID;
    			ti_usb_phy_uboot_init(&usb_phy2_device);
    			dwc3_omap_uboot_init(&usb_otg_ss2_glue);
    			dwc3_uboot_init(&usb_otg_ss2);
    #endif
    		} else {
    			printf("port %d can't be used as host\n", index);
    			disable_usb_clocks(index);
    			return -EINVAL;
    		}
    
    		break;
    	default:
    		printf("Invalid Controller Index\n");
    	}
    
    	return 0;
    }
    
    int board_usb_cleanup(int index, enum usb_init_type init)
    {
    #ifdef CONFIG_USB_DWC3
    	switch (index) {
    	case 0:
    	case 1:
    		if (init == USB_INIT_DEVICE) {
    			ti_usb_phy_uboot_exit(index);
    			dwc3_uboot_exit(index);
    			dwc3_omap_uboot_exit(index);
    		}
    		break;
    	default:
    		printf("Invalid Controller Index\n");
    	}
    #endif
    	disable_usb_clocks(index);
    	return 0;
    }
    #endif /* defined(CONFIG_USB_DWC3) || defined(CONFIG_USB_XHCI_OMAP) */
    
    #ifdef CONFIG_DRIVER_TI_CPSW
    
    /* Delay value to add to calibrated value */
    #define RGMII0_TXCTL_DLY_VAL		((0x3 << 5) + 0x8)
    #define RGMII0_TXD0_DLY_VAL		((0x3 << 5) + 0x8)
    #define RGMII0_TXD1_DLY_VAL		((0x3 << 5) + 0x2)
    #define RGMII0_TXD2_DLY_VAL		((0x4 << 5) + 0x0)
    #define RGMII0_TXD3_DLY_VAL		((0x4 << 5) + 0x0)
    #define VIN2A_D13_DLY_VAL		((0x3 << 5) + 0x8)
    #define VIN2A_D17_DLY_VAL		((0x3 << 5) + 0x8)
    #define VIN2A_D16_DLY_VAL		((0x3 << 5) + 0x2)
    #define VIN2A_D15_DLY_VAL		((0x4 << 5) + 0x0)
    #define VIN2A_D14_DLY_VAL		((0x4 << 5) + 0x0)
    
    static void cpsw_control(int enabled)
    {
    	/* VTP can be added here */
    }
    
    static struct cpsw_slave_data cpsw_slaves[] = {
    	{
    		.slave_reg_ofs	= 0x208,
    		.sliver_reg_ofs	= 0xd80,
    		.phy_addr	= 1,
    	},
    	{
    		.slave_reg_ofs	= 0x308,
    		.sliver_reg_ofs	= 0xdc0,
    		.phy_addr	= 2,
    	},
    };
    
    static struct cpsw_platform_data cpsw_data = {
    	.mdio_base		= CPSW_MDIO_BASE,
    	.cpsw_base		= CPSW_BASE,
    	.mdio_div		= 0xff,
    	.channels		= 8,
    	.cpdma_reg_ofs		= 0x800,
    	.slaves			= 1,
    	.slave_data		= cpsw_slaves,
    	.ale_reg_ofs		= 0xd00,
    	.ale_entries		= 1024,
    	.host_port_reg_ofs	= 0x108,
    	.hw_stats_reg_ofs	= 0x900,
    	.bd_ram_ofs		= 0x2000,
    	.mac_control		= (1 << 5),
    	.control		= cpsw_control,
    	.host_port_num		= 0,
    	.version		= CPSW_CTRL_VERSION_2,
    };
    
    static u64 mac_to_u64(u8 mac[6])
    {
    	int i;
    	u64 addr = 0;
    
    	for (i = 0; i < 6; i++) {
    		addr <<= 8;
    		addr |= mac[i];
    	}
    
    	return addr;
    }
    
    static void u64_to_mac(u64 addr, u8 mac[6])
    {
    	mac[5] = addr;
    	mac[4] = addr >> 8;
    	mac[3] = addr >> 16;
    	mac[2] = addr >> 24;
    	mac[1] = addr >> 32;
    	mac[0] = addr >> 40;
    }
    
    int board_eth_init(bd_t *bis)
    {
    	int ret;
    	uint8_t mac_addr[6];
    	uint32_t mac_hi, mac_lo;
    	uint32_t ctrl_val;
    	int i;
    	u64 mac1, mac2;
    	u8 mac_addr1[6], mac_addr2[6];
    	int num_macs;
    
    	/* try reading mac address from efuse */
    	mac_lo = readl((*ctrl)->control_core_mac_id_0_lo);
    	mac_hi = readl((*ctrl)->control_core_mac_id_0_hi);
    	mac_addr[0] = (mac_hi & 0xFF0000) >> 16;
    	mac_addr[1] = (mac_hi & 0xFF00) >> 8;
    	mac_addr[2] = mac_hi & 0xFF;
    	mac_addr[3] = (mac_lo & 0xFF0000) >> 16;
    	mac_addr[4] = (mac_lo & 0xFF00) >> 8;
    	mac_addr[5] = mac_lo & 0xFF;
    
    	if (!env_get("ethaddr")) {
    		printf("<ethaddr> not set. Validating first E-fuse MAC\n");
    
    		if (is_valid_ethaddr(mac_addr))
    			eth_env_set_enetaddr("ethaddr", mac_addr);
    	}
    
    	mac_lo = readl((*ctrl)->control_core_mac_id_1_lo);
    	mac_hi = readl((*ctrl)->control_core_mac_id_1_hi);
    	mac_addr[0] = (mac_hi & 0xFF0000) >> 16;
    	mac_addr[1] = (mac_hi & 0xFF00) >> 8;
    	mac_addr[2] = mac_hi & 0xFF;
    	mac_addr[3] = (mac_lo & 0xFF0000) >> 16;
    	mac_addr[4] = (mac_lo & 0xFF00) >> 8;
    	mac_addr[5] = mac_lo & 0xFF;
    
    	if (!env_get("eth1addr")) {
    		if (is_valid_ethaddr(mac_addr))
    			eth_env_set_enetaddr("eth1addr", mac_addr);
    	}
    
    	ctrl_val = readl((*ctrl)->control_core_control_io1) & (~0x33);
    	ctrl_val |= 0x22;
    	writel(ctrl_val, (*ctrl)->control_core_control_io1);
    
    	/* The phy address for the AM57xx IDK are different than x15 */
    	if (board_is_am572x_idk() || board_is_am571x_idk() ||
    	    board_is_am574x_idk()) {
    		cpsw_data.slave_data[0].phy_addr = 0;
    		cpsw_data.slave_data[1].phy_addr = 1;
    	}
    
    	ret = cpsw_register(&cpsw_data);
    	if (ret < 0)
    		printf("Error %d registering CPSW switch\n", ret);
    
    	/*
    	 * Export any Ethernet MAC addresses from EEPROM.
    	 * On AM57xx the 2 MAC addresses define the address range
    	 */
    	board_ti_get_eth_mac_addr(0, mac_addr1);
    	board_ti_get_eth_mac_addr(1, mac_addr2);
    
    	if (is_valid_ethaddr(mac_addr1) && is_valid_ethaddr(mac_addr2)) {
    		mac1 = mac_to_u64(mac_addr1);
    		mac2 = mac_to_u64(mac_addr2);
    
    		/* must contain an address range */
    		num_macs = mac2 - mac1 + 1;
    		/* <= 50 to protect against user programming error */
    		if (num_macs > 0 && num_macs <= 50) {
    			for (i = 0; i < num_macs; i++) {
    				u64_to_mac(mac1 + i, mac_addr);
    				if (is_valid_ethaddr(mac_addr)) {
    					eth_env_set_enetaddr_by_index("eth",
    								      i + 2,
    								      mac_addr);
    				}
    			}
    		}
    	}
    
    	return ret;
    }
    #endif
    
    #ifdef CONFIG_BOARD_EARLY_INIT_F
    /* VTT regulator enable */
    static inline void vtt_regulator_enable(void)
    {
    	if (omap_hw_init_context() == OMAP_INIT_CONTEXT_UBOOT_AFTER_SPL)
    		return;
    
    	gpio_request(GPIO_DDR_VTT_EN, "ddr_vtt_en");
    	gpio_direction_output(GPIO_DDR_VTT_EN, 1);
    }
    
    int board_early_init_f(void)
    {
    	vtt_regulator_enable();
    	return 0;
    }
    #endif
    
    #if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP)
    int ft_board_setup(void *blob, bd_t *bd)
    {
    	ft_cpu_setup(blob, bd);
    
    	return 0;
    }
    #endif
    
    #ifdef CONFIG_SPL_LOAD_FIT
    int board_fit_config_name_match(const char *name)
    {
    	if (board_is_x15()) {
    		if (board_is_x15_revb1()) {
    			if (!strcmp(name, "am57xx-beagle-x15-revb1"))
    				return 0;
    		} else if (board_is_x15_revc()) {
    			if (!strcmp(name, "am57xx-beagle-x15-revc"))
    				return 0;
    		} else if (!strcmp(name, "am57xx-beagle-x15")) {
    			return 0;
    		}
    	} else if (board_is_am572x_evm() &&
    		   !strcmp(name, "am57xx-beagle-x15")) {
    		return 0;
    	} else if (board_is_am572x_idk() && !strcmp(name, "am572x-idk")) {
    		return 0;
    	} else if (board_is_am574x_idk() && !strcmp(name, "am574x-idk")) {
    		return 0;
    	} else if (board_is_am571x_idk() && !strcmp(name, "am571x-idk")) {
    		return 0;
    	}
    
    	return -1;
    }
    #endif
    
    #ifdef CONFIG_TI_SECURE_DEVICE
    void board_fit_image_post_process(void **p_image, size_t *p_size)
    {
    	secure_boot_verify_image(p_image, p_size);
    }
    
    void board_tee_image_process(ulong tee_image, size_t tee_size)
    {
    	secure_tee_install((u32)tee_image);
    }
    
    U_BOOT_FIT_LOADABLE_HANDLER(IH_TYPE_TEE, board_tee_image_process);
    #endif
    

    8255.mux_data.h

    /*
     * Library to support early TI EVM EEPROM handling
     *
     * Copyright (C) 2015-2016 Texas Instruments Incorporated - http://www.ti.com/
     *	Lokesh Vutla
     *	Steve Kipisz
     *
     * SPDX-License-Identifier:    GPL-2.0+
     */
    
    #include <common.h>
    #include <asm/arch/hardware.h>
    #include <asm/omap_common.h>
    #include <dm/uclass.h>
    #include <i2c.h>
    
    #include "board_detect.h"
    
    #if defined(CONFIG_DM_I2C_COMPAT)
    /**
     * ti_i2c_set_alen - Set chip's i2c address length
     * @bus_addr - I2C bus number
     * @dev_addr - I2C eeprom id
     * @alen     - I2C address length in bytes
     *
     * DM_I2C by default sets the address length to be used to 1. This
     * function allows this address length to be changed to match the
     * eeprom used for board detection.
     */
    int __maybe_unused ti_i2c_set_alen(int bus_addr, int dev_addr, int alen)
    {
    	struct udevice *dev;
    	struct udevice *bus;
    	int rc;
    
    	rc = uclass_get_device_by_seq(UCLASS_I2C, bus_addr, &bus);
    	if (rc)
    		return rc;
    	rc = i2c_get_chip(bus, dev_addr, 1, &dev);
    	if (rc)
    		return rc;
    	rc = i2c_set_chip_offset_len(dev, alen);
    	if (rc)
    		return rc;
    
    	return 0;
    }
    #else
    int __maybe_unused ti_i2c_set_alen(int bus_addr, int dev_addr, int alen)
    {
    	return 0;
    }
    #endif
    
    #if !defined(CONFIG_DM_I2C) || defined(CONFIG_DM_I2C_COMPAT)
    /**
     * ti_i2c_eeprom_init - Initialize an i2c bus and probe for a device
     * @i2c_bus: i2c bus number to initialize
     * @dev_addr: Device address to probe for
     *
     * Return: 0 on success or corresponding error on failure.
     */
    static int __maybe_unused ti_i2c_eeprom_init(int i2c_bus, int dev_addr)
    {
    	int rc;
    
    	if (i2c_bus >= 0) {
    		rc = i2c_set_bus_num(i2c_bus);
    		if (rc)
    			return rc;
    	}
    
    	return i2c_probe(dev_addr);
    }
    
    /**
     * ti_i2c_eeprom_read - Read data from an EEPROM
     * @dev_addr: The device address of the EEPROM
     * @offset: Offset to start reading in the EEPROM
     * @ep: Pointer to a buffer to read into
     * @epsize: Size of buffer
     *
     * Return: 0 on success or corresponding result of i2c_read
     */
    static int __maybe_unused ti_i2c_eeprom_read(int dev_addr, int offset,
    					     uchar *ep, int epsize)
    {
    	int bus_num, rc, alen;
    
    	bus_num = i2c_get_bus_num();
    
    	alen = 2;
    
    	rc = ti_i2c_set_alen(bus_num, dev_addr, alen);
    	if (rc)
    		return rc;
    
    	return i2c_read(dev_addr, offset, alen, ep, epsize);
    }
    #endif
    
    /**
     * ti_eeprom_string_cleanup() - Handle eeprom programming errors
     * @s:	eeprom string (should be NULL terminated)
     *
     * Some Board manufacturers do not add a NULL termination at the
     * end of string, instead some binary information is kludged in, hence
     * convert the string to just printable characters of ASCII chart.
     */
    static void __maybe_unused ti_eeprom_string_cleanup(char *s)
    {
    	int i, l;
    
    	l = strlen(s);
    	for (i = 0; i < l; i++, s++)
    		if (*s < ' ' || *s > '~') {
    			*s = 0;
    			break;
    		}
    }
    
    __weak void gpi2c_init(void)
    {
    }
    
    static int __maybe_unused ti_i2c_eeprom_get(int bus_addr, int dev_addr,
    					    u32 header, u32 size, uint8_t *ep)
    {
    	u32 hdr_read;
    	int rc;
    
    #if defined(CONFIG_DM_I2C) && !defined(CONFIG_DM_I2C_COMPAT)
    	struct udevice *dev;
    	struct udevice *bus;
    
    	rc = uclass_get_device_by_seq(UCLASS_I2C, bus_addr, &bus);
    	if (rc)
    		return rc;
    	rc = i2c_get_chip(bus, dev_addr, 1, &dev);
    	if (rc)
    		return rc;
    
    	/*
    	 * Read the header first then only read the other contents.
    	 */
    	rc = i2c_set_chip_offset_len(dev, 2);
    	if (rc)
    		return rc;
    
    	rc = dm_i2c_read(dev, 0, (uint8_t *)&hdr_read, 4);
    	if (rc)
    		return rc;
    
    	/* Corrupted data??? */
    	if (hdr_read != header) {
    		rc = dm_i2c_read(dev, 0, (uint8_t *)&hdr_read, 4);
    		/*
    		 * read the eeprom header using i2c again, but use only a
    		 * 1 byte address (some legacy boards need this..)
    		 */
    		if (rc) {
    			rc =  i2c_set_chip_offset_len(dev, 1);
    			if (rc)
    				return rc;
    
    			rc = dm_i2c_read(dev, 0, (uint8_t *)&hdr_read, 4);
    		}
    		if (rc)
    			return rc;
    	}
    	if (hdr_read != header)
    		return -1;
    
    	rc = dm_i2c_read(dev, 0, ep, size);
    	if (rc)
    		return rc;
    #else
    	u32 byte;
    
    	gpi2c_init();
    	rc = ti_i2c_eeprom_init(bus_addr, dev_addr);
    	if (rc)
    		return rc;
    
    	/*
    	 * Read the header first then only read the other contents.
    	 */
    	byte = 2;
    
    	rc = ti_i2c_set_alen(bus_addr, dev_addr, byte);
    	if (rc)
    		return rc;
    
    	rc = i2c_read(dev_addr, 0x0, byte, (uint8_t *)&hdr_read, 4);
    	if (rc)
    		return rc;
    
    	/* Corrupted data??? */
    	if (hdr_read != header) {
    		rc = i2c_read(dev_addr, 0x0, byte, (uint8_t *)&hdr_read, 4);
    		/*
    		 * read the eeprom header using i2c again, but use only a
    		 * 1 byte address (some legacy boards need this..)
    		 */
    		byte = 1;
    		if (rc) {
    			rc = ti_i2c_set_alen(bus_addr, dev_addr, byte);
    			if (rc)
    				return rc;
    
    			rc = i2c_read(dev_addr, 0x0, byte, (uint8_t *)&hdr_read,
    				      4);
    		}
    		if (rc)
    			return rc;
    	}
    	if (hdr_read != header)
    		return -1;
    
    	rc = i2c_read(dev_addr, 0x0, byte, ep, size);
    	if (rc)
    		return rc;
    #endif
    	return 0;
    }
    
    int __maybe_unused ti_i2c_eeprom_am_set(const char *name, const char *rev)
    {
    	struct ti_common_eeprom *ep;
    
    	if (!name || !rev)
    		return -1;
    
    	ep = TI_EEPROM_DATA;
    	if (ep->header == TI_EEPROM_HEADER_MAGIC)
    		goto already_set;
    
    	/* Set to 0 all fields */
    	memset(ep, 0, sizeof(*ep));
    	strncpy(ep->name, name, TI_EEPROM_HDR_NAME_LEN);
    	strncpy(ep->version, rev, TI_EEPROM_HDR_REV_LEN);
    	/* Some dummy serial number to identify the platform */
    	strncpy(ep->serial, "0000", TI_EEPROM_HDR_SERIAL_LEN);
    	/* Mark it with a valid header */
    	ep->header = TI_EEPROM_HEADER_MAGIC;
    
    already_set:
    	return 0;
    }
    
    /**************************************************
     * AM5728 - Setting
     * EEPROM Not
     ***************************************************/
    int __maybe_unused ti_i2c_eeprom_am_get(int bus_addr, int dev_addr)
    {
    	// int rc;
    	struct ti_am_eeprom am_ep;
    	struct ti_common_eeprom *ep;
    
    	ep = TI_EEPROM_DATA;
    #ifndef CONFIG_SPL_BUILD
    	if (ep->header == TI_EEPROM_HEADER_MAGIC)
    		return 0; /* EEPROM has already been read */
    #endif
    
    	/* Initialize with a known bad marker for i2c fails.. */
    	ep->header = TI_DEAD_EEPROM_MAGIC;
    	ep->name[0] = 0x0;
    	ep->version[0] = 0x0;
    	ep->serial[0] = 0x0;
    	ep->config[0] = 0x0;
    
    #if 0
    	rc = ti_i2c_eeprom_get(bus_addr, dev_addr, TI_EEPROM_HEADER_MAGIC,
    			       sizeof(am_ep), (uint8_t *)&am_ep);
    	if (rc)
    		return rc;*/
    
    	ep->header = am_ep.header;
    	strlcpy(ep->name, am_ep.name, TI_EEPROM_HDR_NAME_LEN + 1);
    	ti_eeprom_string_cleanup(ep->name);
    #endif
    
    	ep->header = am_ep.header;
    	strlcpy(ep->name, "AM572IDK", TI_EEPROM_HDR_NAME_LEN + 1);
        ti_eeprom_string_cleanup(ep->name);
    
    	/* BeagleBone Green '1' eeprom, board_rev: 0x1a 0x00 0x00 0x00 */
    	if (am_ep.version[0] == 0x1a && am_ep.version[1] == 0x00 &&
    	    am_ep.version[2] == 0x00 && am_ep.version[3] == 0x00)
    		strlcpy(ep->version, "BBG1", TI_EEPROM_HDR_REV_LEN + 1);
    	else
    		strlcpy(ep->version, am_ep.version, TI_EEPROM_HDR_REV_LEN + 1);
    	ti_eeprom_string_cleanup(ep->version);
    	strlcpy(ep->serial, am_ep.serial, TI_EEPROM_HDR_SERIAL_LEN + 1);
    	ti_eeprom_string_cleanup(ep->serial);
    	strlcpy(ep->config, am_ep.config, TI_EEPROM_HDR_CONFIG_LEN + 1);
    	ti_eeprom_string_cleanup(ep->config);
    
    	memcpy(ep->mac_addr, am_ep.mac_addr,
    	       TI_EEPROM_HDR_NO_OF_MAC_ADDR * TI_EEPROM_HDR_ETH_ALEN);
    
    	return 0;
    }
    
    int __maybe_unused ti_i2c_eeprom_dra7_get(int bus_addr, int dev_addr)
    {
    	int rc, offset = 0;
    	struct dra7_eeprom dra7_ep;
    	struct ti_common_eeprom *ep;
    
    	ep = TI_EEPROM_DATA;
    #ifndef CONFIG_SPL_BUILD
    	if (ep->header == DRA7_EEPROM_HEADER_MAGIC)
    		return 0; /* EEPROM has already been read */
    #endif
    
    	/* Initialize with a known bad marker for i2c fails.. */
    	ep->header = TI_DEAD_EEPROM_MAGIC;
    	ep->name[0] = 0x0;
    	ep->version[0] = 0x0;
    	ep->serial[0] = 0x0;
    	ep->config[0] = 0x0;
    	ep->emif1_size = 0;
    	ep->emif2_size = 0;
    
    	rc = ti_i2c_eeprom_get(bus_addr, dev_addr, DRA7_EEPROM_HEADER_MAGIC,
    			       sizeof(dra7_ep), (uint8_t *)&dra7_ep);
    	if (rc)
    		return rc;
    
    	ep->header = dra7_ep.header;
    	strlcpy(ep->name, dra7_ep.name, TI_EEPROM_HDR_NAME_LEN + 1);
    	ti_eeprom_string_cleanup(ep->name);
    
    	offset = dra7_ep.version_major - 1;
    
    	/* Rev F is skipped */
    	if (offset >= 5)
    		offset = offset + 1;
    	snprintf(ep->version, TI_EEPROM_HDR_REV_LEN + 1, "%c.%d",
    		 'A' + offset, dra7_ep.version_minor);
    	ti_eeprom_string_cleanup(ep->version);
    	ep->emif1_size = (u64)dra7_ep.emif1_size;
    	ep->emif2_size = (u64)dra7_ep.emif2_size;
    	strlcpy(ep->config, dra7_ep.config, TI_EEPROM_HDR_CONFIG_LEN + 1);
    	ti_eeprom_string_cleanup(ep->config);
    
    	return 0;
    }
    
    static int ti_i2c_eeprom_am6_parse_record(struct ti_am6_eeprom_record *record,
    					  struct ti_am6_eeprom *ep,
    					  char **mac_addr,
    					  u8 mac_addr_max_cnt,
    					  u8 *mac_addr_cnt)
    {
    	switch (record->header.id) {
    	case TI_AM6_EEPROM_RECORD_BOARD_INFO:
    		if (record->header.len != sizeof(record->data.board_info))
    			return -EINVAL;
    
    		if (!ep)
    			break;
    
    		/* Populate (and clean, if needed) the board name */
    		strlcpy(ep->name, record->data.board_info.name,
    			sizeof(ep->name));
    		ti_eeprom_string_cleanup(ep->name);
    
    		/* Populate selected other fields from the board info record */
    		strlcpy(ep->version, record->data.board_info.version,
    			sizeof(ep->version));
    		strlcpy(ep->software_revision,
    			record->data.board_info.software_revision,
    			sizeof(ep->software_revision));
    		strlcpy(ep->serial, record->data.board_info.serial,
    			sizeof(ep->serial));
    		break;
    	case TI_AM6_EEPROM_RECORD_MAC_INFO:
    		if (record->header.len != sizeof(record->data.mac_info))
    			return -EINVAL;
    
    		if (!mac_addr || !mac_addr_max_cnt)
    			break;
    
    		*mac_addr_cnt = ((record->data.mac_info.mac_control &
    				 TI_AM6_EEPROM_MAC_ADDR_COUNT_MASK) >>
    				 TI_AM6_EEPROM_MAC_ADDR_COUNT_SHIFT) + 1;
    
    		/*
    		 * The EEPROM can (but may not) hold a very large amount
    		 * of MAC addresses, by far exceeding what we want/can store
    		 * in the common memory array, so only grab what we can fit.
    		 * Note that a value of 0 means 1 MAC address, and so on.
    		 */
    		*mac_addr_cnt = min(*mac_addr_cnt, mac_addr_max_cnt);
    
    		memcpy(mac_addr, record->data.mac_info.mac_addr,
    		       *mac_addr_cnt * TI_EEPROM_HDR_ETH_ALEN);
    		break;
    	case 0x00:
    		/* Illegal value... Fall through... */
    	case 0xFF:
    		/* Illegal value... Something went horribly wrong... */
    		return -EINVAL;
    	default:
    		pr_warn("%s: Ignoring record id %u\n", __func__,
    			record->header.id);
    	}
    
    	return 0;
    }
    
    int __maybe_unused ti_i2c_eeprom_am6_get(int bus_addr, int dev_addr,
    					 struct ti_am6_eeprom *ep,
    					 char **mac_addr,
    					 u8 mac_addr_max_cnt,
    					 u8 *mac_addr_cnt)
    {
    	struct udevice *dev;
    	struct udevice *bus;
    	unsigned int eeprom_addr;
    	struct ti_am6_eeprom_record_board_id board_id;
    	struct ti_am6_eeprom_record record;
    	int rc;
    
    	/* Initialize with a known bad marker for i2c fails.. */
    	memset(ep, 0, sizeof(*ep));
    	ep->header = TI_DEAD_EEPROM_MAGIC;
    
    	/* Read the board ID record which is always the first EEPROM record */
    	rc = ti_i2c_eeprom_get(bus_addr, dev_addr, TI_EEPROM_HEADER_MAGIC,
    			       sizeof(board_id), (uint8_t *)&board_id);
    	if (rc)
    		return rc;
    
    	if (board_id.header.id != TI_AM6_EEPROM_RECORD_BOARD_ID) {
    		pr_err("%s: Invalid board ID record!\n", __func__);
    		return -EINVAL;
    	}
    
    	/* Establish DM handle to board config EEPROM */
    	rc = uclass_get_device_by_seq(UCLASS_I2C, bus_addr, &bus);
    	if (rc)
    		return rc;
    	rc = i2c_get_chip(bus, dev_addr, 1, &dev);
    	if (rc)
    		return rc;
    
    	ep->header = TI_EEPROM_HEADER_MAGIC;
    
    	/* Ready to parse TLV structure. Initialize variables... */
    	*mac_addr_cnt = 0;
    
    	/*
    	 * After the all-encompassing board ID record all other records follow
    	 * a TLV-type scheme. Point to the first such record and then start
    	 * parsing those one by one.
    	 */
    	eeprom_addr = sizeof(board_id);
    
    	while (true) {
    		rc = dm_i2c_read(dev, eeprom_addr, (uint8_t *)&record.header,
    				 sizeof(record.header));
    		if (rc)
    			return rc;
    
    		/*
    		 * Check for end of list marker. If we reached it don't go
    		 * any further and stop parsing right here.
    		 */
    		if (record.header.id == TI_AM6_EEPROM_RECORD_END_LIST)
    			break;
    
    		eeprom_addr += sizeof(record.header);
    
    		debug("%s: dev_addr=0x%02x header.id=%u header.len=%u\n",
    		      __func__, dev_addr, record.header.id,
    		      record.header.len);
    
    		/* Read record into memory if it fits */
    		if (record.header.len <= sizeof(record.data)) {
    			rc = dm_i2c_read(dev, eeprom_addr,
    					 (uint8_t *)&record.data,
    					 record.header.len);
    			if (rc)
    				return rc;
    
    			/* Process record */
    			rc = ti_i2c_eeprom_am6_parse_record(&record, ep,
    							    mac_addr,
    							    mac_addr_max_cnt,
    							    mac_addr_cnt);
    			if (rc) {
    				pr_err("%s: EEPROM parsing error!\n", __func__);
    				return rc;
    			}
    		} else {
    			/*
    			 * We may get here in case of larger records which
    			 * are not yet understood.
    			 */
    			pr_err("%s: Ignoring record id %u\n", __func__,
    			       record.header.id);
    		}
    
    		eeprom_addr += record.header.len;
    	}
    
    	return 0;
    }
    
    int __maybe_unused ti_i2c_eeprom_am6_get_base(int bus_addr, int dev_addr)
    {
    	struct ti_am6_eeprom *ep = TI_AM6_EEPROM_DATA;
    	int ret;
    
    	/*
    	 * Always execute EEPROM read by not allowing to bypass it during the
    	 * first invocation of SPL which happens on the R5 core.
    	 */
    #if !(defined(CONFIG_SPL_BUILD) && defined(CONFIG_CPU_V7R))
    	if (ep->header == TI_EEPROM_HEADER_MAGIC) {
    		debug("%s: EEPROM has already been read\n", __func__);
    		return 0;
    	}
    #endif
    
    	ret = ti_i2c_eeprom_am6_get(bus_addr, dev_addr, ep,
    				    (char **)ep->mac_addr,
    				    AM6_EEPROM_HDR_NO_OF_MAC_ADDR,
    				    &ep->mac_addr_cnt);
    	return ret;
    }
    
    bool __maybe_unused board_ti_is(char *name_tag)
    {
    	struct ti_common_eeprom *ep = TI_EEPROM_DATA;
    
    	if (ep->header == TI_DEAD_EEPROM_MAGIC)
    		return false;
    	return !strncmp(ep->name, name_tag, TI_EEPROM_HDR_NAME_LEN);
    }
    
    bool __maybe_unused board_ti_rev_is(char *rev_tag, int cmp_len)
    {
    	struct ti_common_eeprom *ep = TI_EEPROM_DATA;
    	int l;
    
    	if (ep->header == TI_DEAD_EEPROM_MAGIC)
    		return false;
    
    	l = cmp_len > TI_EEPROM_HDR_REV_LEN ? TI_EEPROM_HDR_REV_LEN : cmp_len;
    	return !strncmp(ep->version, rev_tag, l);
    }
    
    char * __maybe_unused board_ti_get_rev(void)
    {
    	struct ti_common_eeprom *ep = TI_EEPROM_DATA;
    
    	/* if ep->header == TI_DEAD_EEPROM_MAGIC, this is empty already */
    	return ep->version;
    }
    
    char * __maybe_unused board_ti_get_config(void)
    {
    	struct ti_common_eeprom *ep = TI_EEPROM_DATA;
    
    	/* if ep->header == TI_DEAD_EEPROM_MAGIC, this is empty already */
    	return ep->config;
    }
    
    char * __maybe_unused board_ti_get_name(void)
    {
    	struct ti_common_eeprom *ep = TI_EEPROM_DATA;
    
    	/* if ep->header == TI_DEAD_EEPROM_MAGIC, this is empty already */
    	return ep->name;
    }
    
    void __maybe_unused
    board_ti_get_eth_mac_addr(int index,
    			  u8 mac_addr[TI_EEPROM_HDR_ETH_ALEN])
    {
    	struct ti_common_eeprom *ep = TI_EEPROM_DATA;
    
    	if (ep->header == TI_DEAD_EEPROM_MAGIC)
    		goto fail;
    
    	if (index < 0 || index >= TI_EEPROM_HDR_NO_OF_MAC_ADDR)
    		goto fail;
    
    	memcpy(mac_addr, ep->mac_addr[index], TI_EEPROM_HDR_ETH_ALEN);
    	return;
    
    fail:
    	memset(mac_addr, 0, TI_EEPROM_HDR_ETH_ALEN);
    }
    
    void __maybe_unused
    board_ti_am6_get_eth_mac_addr(int index,
    			      u8 mac_addr[TI_EEPROM_HDR_ETH_ALEN])
    {
    	struct ti_am6_eeprom *ep = TI_AM6_EEPROM_DATA;
    
    	if (ep->header == TI_DEAD_EEPROM_MAGIC)
    		goto fail;
    
    	if (index < 0 || index >= ep->mac_addr_cnt)
    		goto fail;
    
    	memcpy(mac_addr, ep->mac_addr[index], TI_EEPROM_HDR_ETH_ALEN);
    	return;
    
    fail:
    	memset(mac_addr, 0, TI_EEPROM_HDR_ETH_ALEN);
    }
    
    u64 __maybe_unused board_ti_get_emif1_size(void)
    {
    	struct ti_common_eeprom *ep = TI_EEPROM_DATA;
    
    	if (ep->header != DRA7_EEPROM_HEADER_MAGIC)
    		return 0;
    
    	return ep->emif1_size;
    }
    
    u64 __maybe_unused board_ti_get_emif2_size(void)
    {
    	struct ti_common_eeprom *ep = TI_EEPROM_DATA;
    
    	if (ep->header != DRA7_EEPROM_HEADER_MAGIC)
    		return 0;
    
    	return ep->emif2_size;
    }
    
    void __maybe_unused set_board_info_env(char *name)
    {
    	char *unknown = "unknown";
    	struct ti_common_eeprom *ep = TI_EEPROM_DATA;
    
    	if (name)
    		env_set("board_name", name);
    	else if (ep->name)
    		env_set("board_name", ep->name);
    	else
    		env_set("board_name", unknown);
    
    	if (ep->version)
    		env_set("board_rev", ep->version);
    	else
    		env_set("board_rev", unknown);
    
    	if (ep->serial)
    		env_set("board_serial", ep->serial);
    	else
    		env_set("board_serial", unknown);
    }
    
    void __maybe_unused set_board_info_env_am6(char *name)
    {
    	char *unknown = "unknown";
    	struct ti_am6_eeprom *ep = TI_AM6_EEPROM_DATA;
    
    	if (name)
    		env_set("board_name", name);
    	else if (ep->name)
    		env_set("board_name", ep->name);
    	else
    		env_set("board_name", unknown);
    
    	if (ep->version)
    		env_set("board_rev", ep->version);
    	else
    		env_set("board_rev", unknown);
    
    	if (ep->software_revision)
    		env_set("board_software_revision", ep->software_revision);
    	else
    		env_set("board_software_revision", unknown);
    
    	if (ep->serial)
    		env_set("board_serial", ep->serial);
    	else
    		env_set("board_serial", unknown);
    }
    
    static u64 mac_to_u64(u8 mac[6])
    {
    	int i;
    	u64 addr = 0;
    
    	for (i = 0; i < 6; i++) {
    		addr <<= 8;
    		addr |= mac[i];
    	}
    
    	return addr;
    }
    
    static void u64_to_mac(u64 addr, u8 mac[6])
    {
    	mac[5] = addr;
    	mac[4] = addr >> 8;
    	mac[3] = addr >> 16;
    	mac[2] = addr >> 24;
    	mac[1] = addr >> 32;
    	mac[0] = addr >> 40;
    }
    
    void board_ti_set_ethaddr(int index)
    {
    	uint8_t mac_addr[6];
    	int i;
    	u64 mac1, mac2;
    	u8 mac_addr1[6], mac_addr2[6];
    	int num_macs;
    	/*
    	 * Export any Ethernet MAC addresses from EEPROM.
    	 * The 2 MAC addresses in EEPROM define the address range.
    	 */
    	board_ti_get_eth_mac_addr(0, mac_addr1);
    	board_ti_get_eth_mac_addr(1, mac_addr2);
    
    	if (is_valid_ethaddr(mac_addr1) && is_valid_ethaddr(mac_addr2)) {
    		mac1 = mac_to_u64(mac_addr1);
    		mac2 = mac_to_u64(mac_addr2);
    
    		/* must contain an address range */
    		num_macs = mac2 - mac1 + 1;
    		if (num_macs <= 0)
    			return;
    
    		if (num_macs > 50) {
    			printf("%s: Too many MAC addresses: %d. Limiting to 50\n",
    			       __func__, num_macs);
    			num_macs = 50;
    		}
    
    		for (i = 0; i < num_macs; i++) {
    			u64_to_mac(mac1 + i, mac_addr);
    			if (is_valid_ethaddr(mac_addr)) {
    				eth_env_set_enetaddr_by_index("eth", i + index,
    							      mac_addr);
    			}
    		}
    	}
    }
    
    void board_ti_am6_set_ethaddr(int index, int count)
    {
    	u8 mac_addr[6];
    	int i;
    
    	for (i = 0; i < count; i++) {
    		board_ti_am6_get_eth_mac_addr(i, mac_addr);
    		if (is_valid_ethaddr(mac_addr))
    			eth_env_set_enetaddr_by_index("eth", i + index,
    						      mac_addr);
    	}
    }
    
    bool __maybe_unused board_ti_was_eeprom_read(void)
    {
    	struct ti_common_eeprom *ep = TI_EEPROM_DATA;
    
    	if (ep->header == TI_EEPROM_HEADER_MAGIC)
    		return true;
    	else
    		return false;
    }
    

  • Hi Sunmin Kim,

    Currently we have only UART1 as on board header. We don't have access to UART3 now.

    omap5_uboot,am57xx-idk-common and mux_data.h files are same as yours.I have attached the modified board.c and board_detect.c.Still no debug prints on uart1.

    Please let me know if any other changes are need to be done .

    /*
     * Copyright (C) 2014 Texas Instruments Incorporated - http://www.ti.com
     *
     * Author: Felipe Balbi <balbi@ti.com>
     *
     * Based on board/ti/dra7xx/evm.c
     *
     * SPDX-License-Identifier:	GPL-2.0+
     */
    
    #include <common.h>
    #include <palmas.h>
    #include <sata.h>
    #include <usb.h>
    #include <asm/omap_common.h>
    #include <asm/omap_sec_common.h>
    #include <asm/emif.h>
    #include <asm/gpio.h>
    #include <asm/arch/gpio.h>
    #include <asm/arch/clock.h>
    #include <asm/arch/dra7xx_iodelay.h>
    #include <asm/arch/sys_proto.h>
    #include <asm/arch/mmc_host_def.h>
    #include <asm/arch/sata.h>
    #include <asm/arch/gpio.h>
    #include <asm/arch/omap.h>
    #include <environment.h>
    #include <usb.h>
    #include <linux/usb/gadget.h>
    #include <dwc3-uboot.h>
    #include <dwc3-omap-uboot.h>
    #include <ti-usb-phy-uboot.h>
    #include <mmc.h>
    
    #include "../common/board_detect.h"
    #include "mux_data.h"
    
    #define board_is_x15()		board_ti_is("BBRDX15_")
    #define board_is_x15_revb1()	(board_ti_is("BBRDX15_") && \
    				 !strncmp("B.10", board_ti_get_rev(), 3))
    #define board_is_x15_revc()	(board_ti_is("BBRDX15_") && \
    				 !strncmp("C.00", board_ti_get_rev(), 3))
    #define board_is_am572x_evm()	board_ti_is("AM572PM_")
    #define board_is_am572x_evm_reva3()	\
    				(board_ti_is("AM572PM_") && \
    				 !strncmp("A.30", board_ti_get_rev(), 3))
    #define board_is_am574x_idk()	board_ti_is("AM574IDK")
    #define board_is_am572x_idk()	board_ti_is("AM572IDK")
    #define board_is_am571x_idk()	board_ti_is("AM571IDK")
    
    #ifdef CONFIG_DRIVER_TI_CPSW
    #include <cpsw.h>
    #endif
    
    DECLARE_GLOBAL_DATA_PTR;
    
    #define GPIO_ETH_LCD		GPIO_TO_PIN(2, 22)
    /* GPIO 7_11 */
    #define GPIO_DDR_VTT_EN 203
    
    /* Touch screen controller to identify the LCD */
    #define OSD_TS_FT_BUS_ADDRESS	0
    #define OSD_TS_FT_CHIP_ADDRESS	0x38
    #define OSD_TS_FT_REG_ID	0xA3
    /*
     * Touchscreen IDs for various OSD panels
     * Ref: http://www.osddisplays.com/TI/OSD101T2587-53TS_A.1.pdf
     */
    /* Used on newer osd101t2587 Panels */
    #define OSD_TS_FT_ID_5x46	0x54
    /* Used on older osd101t2045 Panels */
    #define OSD_TS_FT_ID_5606	0x08
    
    #define SYSINFO_BOARD_NAME_MAX_LEN	45
    
    #define TPS65903X_PRIMARY_SECONDARY_PAD2	0xFB
    #define TPS65903X_PAD2_POWERHOLD_MASK		0x20
    
    const struct omap_sysinfo sysinfo = {
    	"Board: UNKNOWN(BeagleBoard X15?) REV UNKNOWN\n"
    };
    
    static const struct dmm_lisa_map_regs beagle_x15_lisa_regs = {
    	.dmm_lisa_map_3 = 0x80740300,
    	.is_ma_present  = 0x1
    };
    
    static const struct dmm_lisa_map_regs am571x_idk_lisa_regs = {
    	.dmm_lisa_map_3 = 0x80640100,
    	.is_ma_present  = 0x1
    };
    
    static const struct dmm_lisa_map_regs am574x_idk_lisa_regs = {
    	.dmm_lisa_map_2 = 0xc0600200,
    	.dmm_lisa_map_3 = 0x80600100,
    	.is_ma_present  = 0x1
    };
    
    void emif_get_dmm_regs(const struct dmm_lisa_map_regs **dmm_lisa_regs)
    {
    	if (board_is_am571x_idk())
    		*dmm_lisa_regs = &am571x_idk_lisa_regs;
    	else if (board_is_am574x_idk())
    		*dmm_lisa_regs = &am574x_idk_lisa_regs;
    	else
    		*dmm_lisa_regs = &beagle_x15_lisa_regs;
    }
    
    static const struct emif_regs beagle_x15_emif1_ddr3_532mhz_emif_regs = {
    	.sdram_config_init		= 0x61851b32,
    	.sdram_config			= 0x61851b32,
    	.sdram_config2			= 0x08000000,
    	.ref_ctrl			= 0x000040F1,
    	.ref_ctrl_final			= 0x00001035,
    	.sdram_tim1			= 0xcccf36ab,
    	.sdram_tim2			= 0x308f7fda,
    	.sdram_tim3			= 0x409f88a8,
    	.read_idle_ctrl			= 0x00050000,
    	.zq_config			= 0x5007190b,
    	.temp_alert_config		= 0x00000000,
    	.emif_ddr_phy_ctlr_1_init 	= 0x0024400b,
    	.emif_ddr_phy_ctlr_1		= 0x0e24400b,
    	.emif_ddr_ext_phy_ctrl_1 	= 0x10040100,
    	.emif_ddr_ext_phy_ctrl_2 	= 0x00910091,
    	.emif_ddr_ext_phy_ctrl_3 	= 0x00950095,
    	.emif_ddr_ext_phy_ctrl_4 	= 0x009b009b,
    	.emif_ddr_ext_phy_ctrl_5 	= 0x009e009e,
    	.emif_rd_wr_lvl_rmp_win		= 0x00000000,
    	.emif_rd_wr_lvl_rmp_ctl		= 0x80000000,
    	.emif_rd_wr_lvl_ctl		= 0x00000000,
    	.emif_rd_wr_exec_thresh		= 0x00000305
    };
    
    /* Ext phy ctrl regs 1-35 */
    static const u32 beagle_x15_emif1_ddr3_ext_phy_ctrl_const_regs[] = {
    	0x10040100,
    	0x00910091,
    	0x00950095,
    	0x009B009B,
    	0x009E009E,
    	0x00980098,
    	0x00340034,
    	0x00350035,
    	0x00340034,
    	0x00310031,
    	0x00340034,
    	0x007F007F,
    	0x007F007F,
    	0x007F007F,
    	0x007F007F,
    	0x007F007F,
    	0x00480048,
    	0x004A004A,
    	0x00520052,
    	0x00550055,
    	0x00500050,
    	0x00000000,
    	0x00600020,
    	0x40011080,
    	0x08102040,
    	0x0,
    	0x0,
    	0x0,
    	0x0,
    	0x0,
    	0x0,
    	0x0,
    	0x0,
    	0x0,
    	0x0
    };
    
    static const struct emif_regs beagle_x15_emif2_ddr3_532mhz_emif_regs = {
    	.sdram_config_init		= 0x61851b32,
    	.sdram_config			= 0x61851b32,
    	.sdram_config2			= 0x08000000,
    	.ref_ctrl			= 0x000040F1,
    	.ref_ctrl_final			= 0x00001035,
    	.sdram_tim1			= 0xcccf36b3,
    	.sdram_tim2			= 0x308f7fda,
    	.sdram_tim3			= 0x407f88a8,
    	.read_idle_ctrl			= 0x00050000,
    	.zq_config			= 0x5007190b,
    	.temp_alert_config		= 0x00000000,
    	.emif_ddr_phy_ctlr_1_init 	= 0x0024400b,
    	.emif_ddr_phy_ctlr_1		= 0x0e24400b,
    	.emif_ddr_ext_phy_ctrl_1 	= 0x10040100,
    	.emif_ddr_ext_phy_ctrl_2 	= 0x00910091,
    	.emif_ddr_ext_phy_ctrl_3 	= 0x00950095,
    	.emif_ddr_ext_phy_ctrl_4 	= 0x009b009b,
    	.emif_ddr_ext_phy_ctrl_5 	= 0x009e009e,
    	.emif_rd_wr_lvl_rmp_win		= 0x00000000,
    	.emif_rd_wr_lvl_rmp_ctl		= 0x80000000,
    	.emif_rd_wr_lvl_ctl		= 0x00000000,
    	.emif_rd_wr_exec_thresh		= 0x00000305
    };
    
    static const u32 beagle_x15_emif2_ddr3_ext_phy_ctrl_const_regs[] = {
    	0x10040100,
    	0x00910091,
    	0x00950095,
    	0x009B009B,
    	0x009E009E,
    	0x00980098,
    	0x00340034,
    	0x00350035,
    	0x00340034,
    	0x00310031,
    	0x00340034,
    	0x007F007F,
    	0x007F007F,
    	0x007F007F,
    	0x007F007F,
    	0x007F007F,
    	0x00480048,
    	0x004A004A,
    	0x00520052,
    	0x00550055,
    	0x00500050,
    	0x00000000,
    	0x00600020,
    	0x40011080,
    	0x08102040,
    	0x0,
    	0x0,
    	0x0,
    	0x0,
    	0x0,
    	0x0,
    	0x0,
    	0x0,
    	0x0,
    	0x0
    };
    
    static const struct emif_regs am571x_emif1_ddr3_666mhz_emif_regs = {
    	.sdram_config_init		= 0x61863332,
    	.sdram_config			= 0x61863332,
    	.sdram_config2			= 0x08000000,
    	.ref_ctrl			= 0x0000514d,
    	.ref_ctrl_final			= 0x0000144a,
    	.sdram_tim1			= 0xd333887c,
    	.sdram_tim2			= 0x30b37fe3,
    	.sdram_tim3			= 0x409f8ad8,
    	.read_idle_ctrl			= 0x00050000,
    	.zq_config			= 0x5007190b,
    	.temp_alert_config		= 0x00000000,
    	.emif_ddr_phy_ctlr_1_init	= 0x0024400f,
    	.emif_ddr_phy_ctlr_1		= 0x0e24400f,
    	.emif_ddr_ext_phy_ctrl_1	= 0x10040100,
    	.emif_ddr_ext_phy_ctrl_2	= 0x00910091,
    	.emif_ddr_ext_phy_ctrl_3	= 0x00950095,
    	.emif_ddr_ext_phy_ctrl_4	= 0x009b009b,
    	.emif_ddr_ext_phy_ctrl_5	= 0x009e009e,
    	.emif_rd_wr_lvl_rmp_win		= 0x00000000,
    	.emif_rd_wr_lvl_rmp_ctl		= 0x80000000,
    	.emif_rd_wr_lvl_ctl		= 0x00000000,
    	.emif_rd_wr_exec_thresh		= 0x00000305
    };
    
    static const struct emif_regs am574x_emif1_ddr3_666mhz_emif_ecc_regs = {
    	.sdram_config_init		= 0x61863332,
    	.sdram_config			= 0x61863332,
    	.sdram_config2			= 0x08000000,
    	.ref_ctrl			= 0x0000514d,
    	.ref_ctrl_final			= 0x0000144a,
    	.sdram_tim1			= 0xd333887c,
    	.sdram_tim2			= 0x30b37fe3,
    	.sdram_tim3			= 0x409f8ad8,
    	.read_idle_ctrl			= 0x00050000,
    	.zq_config			= 0x5007190b,
    	.temp_alert_config		= 0x00000000,
    	.emif_ddr_phy_ctlr_1_init	= 0x0024400f,
    	.emif_ddr_phy_ctlr_1		= 0x0e24400f,
    	.emif_ddr_ext_phy_ctrl_1	= 0x10040100,
    	.emif_ddr_ext_phy_ctrl_2	= 0x00910091,
    	.emif_ddr_ext_phy_ctrl_3	= 0x00950095,
    	.emif_ddr_ext_phy_ctrl_4	= 0x009b009b,
    	.emif_ddr_ext_phy_ctrl_5	= 0x009e009e,
    	.emif_rd_wr_lvl_rmp_win		= 0x00000000,
    	.emif_rd_wr_lvl_rmp_ctl		= 0x80000000,
    	.emif_rd_wr_lvl_ctl		= 0x00000000,
    	.emif_rd_wr_exec_thresh		= 0x00000305,
    	.emif_ecc_ctrl_reg		= 0xD0000001,
    	.emif_ecc_address_range_1	= 0x3FFF0000,
    	.emif_ecc_address_range_2	= 0x00000000
    };
    
    void emif_get_reg_dump(u32 emif_nr, const struct emif_regs **regs)
    {
    	switch (emif_nr) {
    	case 1:
    		if (board_is_am571x_idk())
    			*regs = &am571x_emif1_ddr3_666mhz_emif_regs;
    		else if (board_is_am574x_idk())
    			*regs = &am574x_emif1_ddr3_666mhz_emif_ecc_regs;
    		else
    			*regs = &beagle_x15_emif1_ddr3_532mhz_emif_regs;
    		break;
    	case 2:
    		if (board_is_am574x_idk())
    			*regs = &am571x_emif1_ddr3_666mhz_emif_regs;
    		else
    			*regs = &beagle_x15_emif2_ddr3_532mhz_emif_regs;
    		break;
    	}
    }
    
    void emif_get_ext_phy_ctrl_const_regs(u32 emif_nr, const u32 **regs, u32 *size)
    {
    	switch (emif_nr) {
    	case 1:
    		*regs = beagle_x15_emif1_ddr3_ext_phy_ctrl_const_regs;
    		*size = ARRAY_SIZE(beagle_x15_emif1_ddr3_ext_phy_ctrl_const_regs);
    		break;
    	case 2:
    		*regs = beagle_x15_emif2_ddr3_ext_phy_ctrl_const_regs;
    		*size = ARRAY_SIZE(beagle_x15_emif2_ddr3_ext_phy_ctrl_const_regs);
    		break;
    	}
    }
    
    struct vcores_data beagle_x15_volts = {
    	.mpu.value[OPP_NOM]	= VDD_MPU_DRA7_NOM,
    	.mpu.efuse.reg[OPP_NOM]	= STD_FUSE_OPP_VMIN_MPU_NOM,
    	.mpu.efuse.reg_bits     = DRA752_EFUSE_REGBITS,
    	.mpu.addr		= TPS659038_REG_ADDR_SMPS12,
    	.mpu.pmic		= &tps659038,
    	.mpu.abb_tx_done_mask	= OMAP_ABB_MPU_TXDONE_MASK,
    
    	.eve.value[OPP_NOM]	= VDD_EVE_DRA7_NOM,
    	.eve.value[OPP_OD]	= VDD_EVE_DRA7_OD,
    	.eve.value[OPP_HIGH]	= VDD_EVE_DRA7_HIGH,
    	.eve.efuse.reg[OPP_NOM]	= STD_FUSE_OPP_VMIN_DSPEVE_NOM,
    	.eve.efuse.reg[OPP_OD]	= STD_FUSE_OPP_VMIN_DSPEVE_OD,
    	.eve.efuse.reg[OPP_HIGH]	= STD_FUSE_OPP_VMIN_DSPEVE_HIGH,
    	.eve.efuse.reg_bits	= DRA752_EFUSE_REGBITS,
    	.eve.addr		= TPS659038_REG_ADDR_SMPS45,
    	.eve.pmic		= &tps659038,
    	.eve.abb_tx_done_mask	= OMAP_ABB_EVE_TXDONE_MASK,
    
    	.gpu.value[OPP_NOM]	= VDD_GPU_DRA7_NOM,
    	.gpu.value[OPP_OD]	= VDD_GPU_DRA7_OD,
    	.gpu.value[OPP_HIGH]	= VDD_GPU_DRA7_HIGH,
    	.gpu.efuse.reg[OPP_NOM]	= STD_FUSE_OPP_VMIN_GPU_NOM,
    	.gpu.efuse.reg[OPP_OD]	= STD_FUSE_OPP_VMIN_GPU_OD,
    	.gpu.efuse.reg[OPP_HIGH]	= STD_FUSE_OPP_VMIN_GPU_HIGH,
    	.gpu.efuse.reg_bits	= DRA752_EFUSE_REGBITS,
    	.gpu.addr		= TPS659038_REG_ADDR_SMPS45,
    	.gpu.pmic		= &tps659038,
    	.gpu.abb_tx_done_mask	= OMAP_ABB_GPU_TXDONE_MASK,
    
    	.core.value[OPP_NOM]	= VDD_CORE_DRA7_NOM,
    	.core.efuse.reg[OPP_NOM]	= STD_FUSE_OPP_VMIN_CORE_NOM,
    	.core.efuse.reg_bits	= DRA752_EFUSE_REGBITS,
    	.core.addr		= TPS659038_REG_ADDR_SMPS6,
    	.core.pmic		= &tps659038,
    
    	.iva.value[OPP_NOM]	= VDD_IVA_DRA7_NOM,
    	.iva.value[OPP_OD]	= VDD_IVA_DRA7_OD,
    	.iva.value[OPP_HIGH]	= VDD_IVA_DRA7_HIGH,
    	.iva.efuse.reg[OPP_NOM]	= STD_FUSE_OPP_VMIN_IVA_NOM,
    	.iva.efuse.reg[OPP_OD]	= STD_FUSE_OPP_VMIN_IVA_OD,
    	.iva.efuse.reg[OPP_HIGH]	= STD_FUSE_OPP_VMIN_IVA_HIGH,
    	.iva.efuse.reg_bits	= DRA752_EFUSE_REGBITS,
    	.iva.addr		= TPS659038_REG_ADDR_SMPS45,
    	.iva.pmic		= &tps659038,
    	.iva.abb_tx_done_mask	= OMAP_ABB_IVA_TXDONE_MASK,
    };
    
    struct vcores_data am572x_idk_volts = {
    	.mpu.value[OPP_NOM]	= VDD_MPU_DRA7_NOM,
    	.mpu.efuse.reg[OPP_NOM]	= STD_FUSE_OPP_VMIN_MPU_NOM,
    	.mpu.efuse.reg_bits     = DRA752_EFUSE_REGBITS,
    	.mpu.addr		= TPS659038_REG_ADDR_SMPS12,
    	.mpu.pmic		= &tps659038,
    	.mpu.abb_tx_done_mask	= OMAP_ABB_MPU_TXDONE_MASK,
    
    	.eve.value[OPP_NOM]	= VDD_EVE_DRA7_NOM,
    	.eve.value[OPP_OD]	= VDD_EVE_DRA7_OD,
    	.eve.value[OPP_HIGH]	= VDD_EVE_DRA7_HIGH,
    	.eve.efuse.reg[OPP_NOM]	= STD_FUSE_OPP_VMIN_DSPEVE_NOM,
    	.eve.efuse.reg[OPP_OD]	= STD_FUSE_OPP_VMIN_DSPEVE_OD,
    	.eve.efuse.reg[OPP_HIGH]	= STD_FUSE_OPP_VMIN_DSPEVE_HIGH,
    	.eve.efuse.reg_bits	= DRA752_EFUSE_REGBITS,
    	.eve.addr		= TPS659038_REG_ADDR_SMPS45,
    	.eve.pmic		= &tps659038,
    	.eve.abb_tx_done_mask	= OMAP_ABB_EVE_TXDONE_MASK,
    
    	.gpu.value[OPP_NOM]	= VDD_GPU_DRA7_NOM,
    	.gpu.value[OPP_OD]	= VDD_GPU_DRA7_OD,
    	.gpu.value[OPP_HIGH]	= VDD_GPU_DRA7_HIGH,
    	.gpu.efuse.reg[OPP_NOM]	= STD_FUSE_OPP_VMIN_GPU_NOM,
    	.gpu.efuse.reg[OPP_OD]	= STD_FUSE_OPP_VMIN_GPU_OD,
    	.gpu.efuse.reg[OPP_HIGH]	= STD_FUSE_OPP_VMIN_GPU_HIGH,
    	.gpu.efuse.reg_bits	= DRA752_EFUSE_REGBITS,
    	.gpu.addr		= TPS659038_REG_ADDR_SMPS6,
    	.gpu.pmic		= &tps659038,
    	.gpu.abb_tx_done_mask	= OMAP_ABB_GPU_TXDONE_MASK,
    
    	.core.value[OPP_NOM]	= VDD_CORE_DRA7_NOM,
    	.core.efuse.reg[OPP_NOM]	= STD_FUSE_OPP_VMIN_CORE_NOM,
    	.core.efuse.reg_bits	= DRA752_EFUSE_REGBITS,
    	.core.addr		= TPS659038_REG_ADDR_SMPS7,
    	.core.pmic		= &tps659038,
    
    	.iva.value[OPP_NOM]	= VDD_IVA_DRA7_NOM,
    	.iva.value[OPP_OD]	= VDD_IVA_DRA7_OD,
    	.iva.value[OPP_HIGH]	= VDD_IVA_DRA7_HIGH,
    	.iva.efuse.reg[OPP_NOM]	= STD_FUSE_OPP_VMIN_IVA_NOM,
    	.iva.efuse.reg[OPP_OD]	= STD_FUSE_OPP_VMIN_IVA_OD,
    	.iva.efuse.reg[OPP_HIGH]	= STD_FUSE_OPP_VMIN_IVA_HIGH,
    	.iva.efuse.reg_bits	= DRA752_EFUSE_REGBITS,
    	.iva.addr		= TPS659038_REG_ADDR_SMPS8,
    	.iva.pmic		= &tps659038,
    	.iva.abb_tx_done_mask	= OMAP_ABB_IVA_TXDONE_MASK,
    };
    
    struct vcores_data am571x_idk_volts = {
    	.mpu.value[OPP_NOM]	= VDD_MPU_DRA7_NOM,
    	.mpu.efuse.reg[OPP_NOM]	= STD_FUSE_OPP_VMIN_MPU_NOM,
    	.mpu.efuse.reg_bits     = DRA752_EFUSE_REGBITS,
    	.mpu.addr		= TPS659038_REG_ADDR_SMPS12,
    	.mpu.pmic		= &tps659038,
    	.mpu.abb_tx_done_mask = OMAP_ABB_MPU_TXDONE_MASK,
    
    	.eve.value[OPP_NOM]	= VDD_EVE_DRA7_NOM,
    	.eve.value[OPP_OD]	= VDD_EVE_DRA7_OD,
    	.eve.value[OPP_HIGH]	= VDD_EVE_DRA7_HIGH,
    	.eve.efuse.reg[OPP_NOM]	= STD_FUSE_OPP_VMIN_DSPEVE_NOM,
    	.eve.efuse.reg[OPP_OD]	= STD_FUSE_OPP_VMIN_DSPEVE_OD,
    	.eve.efuse.reg[OPP_HIGH]	= STD_FUSE_OPP_VMIN_DSPEVE_HIGH,
    	.eve.efuse.reg_bits	= DRA752_EFUSE_REGBITS,
    	.eve.addr		= TPS659038_REG_ADDR_SMPS45,
    	.eve.pmic		= &tps659038,
    	.eve.abb_tx_done_mask	= OMAP_ABB_EVE_TXDONE_MASK,
    
    	.gpu.value[OPP_NOM]	= VDD_GPU_DRA7_NOM,
    	.gpu.value[OPP_OD]	= VDD_GPU_DRA7_OD,
    	.gpu.value[OPP_HIGH]	= VDD_GPU_DRA7_HIGH,
    	.gpu.efuse.reg[OPP_NOM]	= STD_FUSE_OPP_VMIN_GPU_NOM,
    	.gpu.efuse.reg[OPP_OD]	= STD_FUSE_OPP_VMIN_GPU_OD,
    	.gpu.efuse.reg[OPP_HIGH]	= STD_FUSE_OPP_VMIN_GPU_HIGH,
    	.gpu.efuse.reg_bits	= DRA752_EFUSE_REGBITS,
    	.gpu.addr		= TPS659038_REG_ADDR_SMPS6,
    	.gpu.pmic		= &tps659038,
    	.gpu.abb_tx_done_mask	= OMAP_ABB_GPU_TXDONE_MASK,
    
    	.core.value[OPP_NOM]	= VDD_CORE_DRA7_NOM,
    	.core.efuse.reg[OPP_NOM]	= STD_FUSE_OPP_VMIN_CORE_NOM,
    	.core.efuse.reg_bits	= DRA752_EFUSE_REGBITS,
    	.core.addr		= TPS659038_REG_ADDR_SMPS7,
    	.core.pmic		= &tps659038,
    
    	.iva.value[OPP_NOM]	= VDD_IVA_DRA7_NOM,
    	.iva.value[OPP_OD]	= VDD_IVA_DRA7_OD,
    	.iva.value[OPP_HIGH]	= VDD_IVA_DRA7_HIGH,
    	.iva.efuse.reg[OPP_NOM]	= STD_FUSE_OPP_VMIN_IVA_NOM,
    	.iva.efuse.reg[OPP_OD]	= STD_FUSE_OPP_VMIN_IVA_OD,
    	.iva.efuse.reg[OPP_HIGH]	= STD_FUSE_OPP_VMIN_IVA_HIGH,
    	.iva.efuse.reg_bits	= DRA752_EFUSE_REGBITS,
    	.iva.addr		= TPS659038_REG_ADDR_SMPS45,
    	.iva.pmic		= &tps659038,
    	.iva.abb_tx_done_mask	= OMAP_ABB_IVA_TXDONE_MASK,
    };
    
    int get_voltrail_opp(int rail_offset)
    {
    	int opp;
    
    	switch (rail_offset) {
    	case VOLT_MPU:
    		opp = DRA7_MPU_OPP;
    		break;
    	case VOLT_CORE:
    		opp = DRA7_CORE_OPP;
    		break;
    	case VOLT_GPU:
    		opp = DRA7_GPU_OPP;
    		break;
    	case VOLT_EVE:
    		opp = DRA7_DSPEVE_OPP;
    		break;
    	case VOLT_IVA:
    		opp = DRA7_IVA_OPP;
    		break;
    	default:
    		opp = OPP_NOM;
    	}
    
    	return opp;
    }
    
    
    #ifdef CONFIG_SPL_BUILD
    /* No env to setup for SPL */
    static inline void setup_board_eeprom_env(void) { }
    
    /* Override function to read eeprom information */
    void do_board_detect(void)
    {
    	int rc;
    
    	rc = ti_i2c_eeprom_am_get(CONFIG_EEPROM_BUS_ADDRESS,
    				  CONFIG_EEPROM_CHIP_ADDRESS);
    	if (rc)
    		printf("ti_i2c_eeprom_init failed %d\n", rc);
    }
    
    #else	/* CONFIG_SPL_BUILD */
    
    /* Override function to read eeprom information: actual i2c read done by SPL*/
    void do_board_detect(void)
    {
    	char *bname = NULL;
    	int rc;
    
    	rc = ti_i2c_eeprom_am_get(CONFIG_EEPROM_BUS_ADDRESS,
    				  CONFIG_EEPROM_CHIP_ADDRESS);
    	if (rc)
    		printf("ti_i2c_eeprom_init failed %d\n", rc);
    
    	if (board_is_x15())
    		bname = "BeagleBoard X15";
    	else if (board_is_am572x_evm())
    		bname = "AM572x EVM";
    	else if (board_is_am574x_idk())
    		bname = "AM574x IDK";
    	else if (board_is_am572x_idk())
    		bname = "AM572x IDK";
    	else if (board_is_am571x_idk())
    		bname = "AM571x IDK";
    
    	if (bname)
    		snprintf(sysinfo.board_string, SYSINFO_BOARD_NAME_MAX_LEN,
    			 "Board: %s REV %s\n", bname, board_ti_get_rev());
    }
    
    static void setup_board_eeprom_env(void)
    {
    	char *name = "beagle_x15";
    	int rc;
    
    	rc = ti_i2c_eeprom_am_get(CONFIG_EEPROM_BUS_ADDRESS,
    				  CONFIG_EEPROM_CHIP_ADDRESS);
    	if (rc)
    		goto invalid_eeprom;
    
    	if (board_is_x15()) {
    		if (board_is_x15_revb1())
    			name = "beagle_x15_revb1";
    		else if (board_is_x15_revc())
    			name = "beagle_x15_revc";
    		else
    			name = "beagle_x15";
    	} else if (board_is_am572x_evm()) {
    		if (board_is_am572x_evm_reva3())
    			name = "am57xx_evm_reva3";
    		else
    			name = "am57xx_evm";
    	} else if (board_is_am574x_idk()) {
    		name = "am574x_idk";
    	} else if (board_is_am572x_idk()) {
    		name = "am572x_idk";
    	} else if (board_is_am571x_idk()) {
    		name = "am571x_idk";
    	} else {
    		printf("Unidentified board claims %s in eeprom header\n",
    		       board_ti_get_name());
    	}
    
    invalid_eeprom:
    	set_board_info_env(name);
    }
    
    #endif	/* CONFIG_SPL_BUILD */
    
    void vcores_init(void)
    {
    	if (board_is_am572x_idk() || board_is_am574x_idk())
    		*omap_vcores = &am572x_idk_volts;
    	else if (board_is_am571x_idk())
    		*omap_vcores = &am571x_idk_volts;
    	else
    		*omap_vcores = &beagle_x15_volts;
    }
    
    void hw_data_init(void)
    {
    	*prcm = &dra7xx_prcm;
    	if (is_dra72x())
    		*dplls_data = &dra72x_dplls;
    	else if (is_dra76x())
    		*dplls_data = &dra76x_dplls;
    	else
    		*dplls_data = &dra7xx_dplls;
    	*ctrl = &dra7xx_ctrl;
    }
    
    bool am571x_idk_needs_lcd(void)
    {
    	bool needs_lcd;
    
    	gpio_request(GPIO_ETH_LCD, "nLCD_Detect");
    	if (gpio_get_value(GPIO_ETH_LCD))
    		needs_lcd = false;
    	else
    		needs_lcd = true;
    
    	gpio_free(GPIO_ETH_LCD);
    
    	return needs_lcd;
    }
    
    int board_init(void)
    {
    	gpmc_init();
    	gd->bd->bi_boot_params = (CONFIG_SYS_SDRAM_BASE + 0x100);
    
    	return 0;
    }
    
    void am57x_idk_lcd_detect(void)
    {
    	int r = -ENODEV;
    	char *idk_lcd = "no";
    	uint8_t buf = 0;
    
    	/* Only valid for IDKs */
    	if (board_is_x15() || board_is_am572x_evm())
    		return;
    
    	/* Only AM571x IDK has gpio control detect.. so check that */
    	if (board_is_am571x_idk() && !am571x_idk_needs_lcd())
    		goto out;
    
    	r = i2c_set_bus_num(OSD_TS_FT_BUS_ADDRESS);
    	if (r) {
    		printf("%s: Failed to set bus address to %d: %d\n",
    		       __func__, OSD_TS_FT_BUS_ADDRESS, r);
    		goto out;
    	}
    	r = i2c_probe(OSD_TS_FT_CHIP_ADDRESS);
    	if (r) {
    		/* AM572x IDK has no explicit settings for optional LCD kit */
    		if (board_is_am571x_idk()) {
    			printf("%s: Touch screen detect failed: %d!\n",
    			       __func__, r);
    		}
    		goto out;
    	}
    
    	/* Read FT ID */
    	r = i2c_read(OSD_TS_FT_CHIP_ADDRESS, OSD_TS_FT_REG_ID, 1, &buf, 1);
    	if (r) {
    		printf("%s: Touch screen ID read %d:0x%02x[0x%02x] failed:%d\n",
    		       __func__, OSD_TS_FT_BUS_ADDRESS, OSD_TS_FT_CHIP_ADDRESS,
    		       OSD_TS_FT_REG_ID, r);
    		goto out;
    	}
    
    	switch (buf) {
    	case OSD_TS_FT_ID_5606:
    		idk_lcd = "osd101t2045";
    		break;
    	case OSD_TS_FT_ID_5x46:
    		idk_lcd = "osd101t2587";
    		break;
    	default:
    		printf("%s: Unidentifed Touch screen ID 0x%02x\n",
    		       __func__, buf);
    		/* we will let default be "no lcd" */
    	}
    out:
    	env_set("idk_lcd", idk_lcd);
    
    	/*
    	 * On AM571x_IDK, no Display with J51 set to LCD is considered as an
    	 * invalid configuration and we prevent boot to get user attention.
    	 */
    	if (board_is_am571x_idk() && am571x_idk_needs_lcd() &&
    	    !strncmp(idk_lcd, "no", 2)) {
    		printf("%s: Invalid HW configuration: display not detected/supported but J51 is set. Remove J51 to boot without display.\n",
    		       __func__);
    		hang();
    	}
    
    	return;
    }
    
    #if CONFIG_IS_ENABLED(DM_USB) && CONFIG_IS_ENABLED(OF_CONTROL)
    static int device_okay(const char *path)
    {
    	int node;
    
    	node = fdt_path_offset(gd->fdt_blob, path);
    	if (node < 0)
    		return 0;
    
    	return fdtdec_get_is_enabled(gd->fdt_blob, node);
    }
    #endif
    
    int board_late_init(void)
    {
    	setup_board_eeprom_env();
    	u8 val;
    
    	/*
    	 * DEV_CTRL.DEV_ON = 1 please - else palmas switches off in 8 seconds
    	 * This is the POWERHOLD-in-Low behavior.
    	 */
    	palmas_i2c_write_u8(TPS65903X_CHIP_P1, 0xA0, 0x1);
    
    	/*
    	 * Default FIT boot on HS devices. Non FIT images are not allowed
    	 * on HS devices.
    	 */
    	if (get_device_type() == HS_DEVICE)
    		env_set("boot_fit", "1");
    
    	/*
    	 * Set the GPIO7 Pad to POWERHOLD. This has higher priority
    	 * over DEV_CTRL.DEV_ON bit. This can be reset in case of
    	 * PMIC Power off. So to be on the safer side set it back
    	 * to POWERHOLD mode irrespective of the current state.
    	 */
    	palmas_i2c_read_u8(TPS65903X_CHIP_P1, TPS65903X_PRIMARY_SECONDARY_PAD2,
    			   &val);
    	val = val | TPS65903X_PAD2_POWERHOLD_MASK;
    	palmas_i2c_write_u8(TPS65903X_CHIP_P1, TPS65903X_PRIMARY_SECONDARY_PAD2,
    			    val);
    
    	omap_die_id_serial();
    	omap_set_fastboot_vars();
    
    	am57x_idk_lcd_detect();
    
    #if !defined(CONFIG_SPL_BUILD)
    	board_ti_set_ethaddr(2);
    #endif
    
    #if CONFIG_IS_ENABLED(DM_USB) && CONFIG_IS_ENABLED(OF_CONTROL)
    	if (device_okay("/ocp/omap_dwc3_1@48880000"))
    		enable_usb_clocks(0);
    	if (device_okay("/ocp/omap_dwc3_2@488c0000"))
    		enable_usb_clocks(1);
    #endif
    	return 0;
    }
    
    void set_muxconf_regs(void)
    {
    	do_set_mux32((*ctrl)->control_padconf_core_base,
    		     early_padconf, ARRAY_SIZE(early_padconf));
    }
    
    #ifdef CONFIG_IODELAY_RECALIBRATION
    void recalibrate_iodelay(void)
    {
    	const struct pad_conf_entry *pconf;
    	const struct iodelay_cfg_entry *iod, *delta_iod;
    	int pconf_sz, iod_sz, delta_iod_sz = 0;
    	int ret;
    
    	if (board_is_am572x_idk()) {
    		pconf = core_padconf_array_essential_am572x_idk;
    		pconf_sz = ARRAY_SIZE(core_padconf_array_essential_am572x_idk);
    		iod = iodelay_cfg_array_am572x_idk;
    		iod_sz = ARRAY_SIZE(iodelay_cfg_array_am572x_idk);
    	} else if (board_is_am574x_idk()) {
    		pconf = core_padconf_array_essential_am574x_idk;
    		pconf_sz = ARRAY_SIZE(core_padconf_array_essential_am574x_idk);
    		iod = iodelay_cfg_array_am574x_idk;
    		iod_sz = ARRAY_SIZE(iodelay_cfg_array_am574x_idk);
    	} else if (board_is_am571x_idk()) {
    		pconf = core_padconf_array_essential_am571x_idk;
    		pconf_sz = ARRAY_SIZE(core_padconf_array_essential_am571x_idk);
    		iod = iodelay_cfg_array_am571x_idk;
    		iod_sz = ARRAY_SIZE(iodelay_cfg_array_am571x_idk);
    	} else {
    		/* Common for X15/GPEVM */
    		pconf = core_padconf_array_essential_x15;
    		pconf_sz = ARRAY_SIZE(core_padconf_array_essential_x15);
    		/* There never was an SR1.0 X15.. So.. */
    		if (omap_revision() == DRA752_ES1_1) {
    			iod = iodelay_cfg_array_x15_sr1_1;
    			iod_sz = ARRAY_SIZE(iodelay_cfg_array_x15_sr1_1);
    		} else {
    			/* Since full production should switch to SR2.0  */
    			iod = iodelay_cfg_array_x15_sr2_0;
    			iod_sz = ARRAY_SIZE(iodelay_cfg_array_x15_sr2_0);
    		}
    	}
    
    	/* Setup I/O isolation */
    	ret = __recalibrate_iodelay_start();
    	if (ret)
    		goto err;
    
    	/* Do the muxing here */
    	do_set_mux32((*ctrl)->control_padconf_core_base, pconf, pconf_sz);
    
    	/* Now do the weird minor deltas that should be safe */
    	if (board_is_x15() || board_is_am572x_evm()) {
    		if (board_is_x15_revb1() || board_is_am572x_evm_reva3() ||
    		    board_is_x15_revc()) {
    			pconf = core_padconf_array_delta_x15_sr2_0;
    			pconf_sz = ARRAY_SIZE(core_padconf_array_delta_x15_sr2_0);
    		} else {
    			pconf = core_padconf_array_delta_x15_sr1_1;
    			pconf_sz = ARRAY_SIZE(core_padconf_array_delta_x15_sr1_1);
    		}
    		do_set_mux32((*ctrl)->control_padconf_core_base, pconf, pconf_sz);
    	}
    
    	if (board_is_am571x_idk()) {
    		if (am571x_idk_needs_lcd()) {
    			pconf = core_padconf_array_vout_am571x_idk;
    			pconf_sz = ARRAY_SIZE(core_padconf_array_vout_am571x_idk);
    			delta_iod = iodelay_cfg_array_am571x_idk_4port;
    			delta_iod_sz = ARRAY_SIZE(iodelay_cfg_array_am571x_idk_4port);
    
    		} else {
    			pconf = core_padconf_array_icss1eth_am571x_idk;
    			pconf_sz = ARRAY_SIZE(core_padconf_array_icss1eth_am571x_idk);
    		}
    		do_set_mux32((*ctrl)->control_padconf_core_base, pconf, pconf_sz);
    	}
    
    	/* Setup IOdelay configuration */
    	ret = do_set_iodelay((*ctrl)->iodelay_config_base, iod, iod_sz);
    	if (delta_iod_sz)
    		ret = do_set_iodelay((*ctrl)->iodelay_config_base, delta_iod,
    				     delta_iod_sz);
    
    err:
    	/* Closeup.. remove isolation */
    	__recalibrate_iodelay_end(ret);
    }
    #endif
    
    #if defined(CONFIG_MMC)
    int board_mmc_init(bd_t *bis)
    {
    	omap_mmc_init(0, 0, 0, -1, -1);
    	omap_mmc_init(1, 0, 0, -1, -1);
    	return 0;
    }
    
    static const struct mmc_platform_fixups am57x_es1_1_mmc1_fixups = {
    	.hw_rev = "rev11",
    	.unsupported_caps = MMC_CAP(MMC_HS_200) |
    			    MMC_CAP(UHS_SDR104),
    	.max_freq = 96000000,
    };
    
    static const struct mmc_platform_fixups am57x_es1_1_mmc23_fixups = {
    	.hw_rev = "rev11",
    	.unsupported_caps = MMC_CAP(MMC_HS_200) |
    			    MMC_CAP(UHS_SDR104) |
    			    MMC_CAP(UHS_SDR50),
    	.max_freq = 48000000,
    };
    
    const struct mmc_platform_fixups *platform_fixups_mmc(uint32_t addr)
    {
    	switch (omap_revision()) {
    	case DRA752_ES1_0:
    	case DRA752_ES1_1:
    		if (addr == OMAP_HSMMC1_BASE)
    			return &am57x_es1_1_mmc1_fixups;
    		else
    			return &am57x_es1_1_mmc23_fixups;
    	default:
    		return NULL;
    	}
    }
    #endif
    
    #if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_OS_BOOT)
    int spl_start_uboot(void)
    {
    	/* break into full u-boot on 'c' */
    	if (serial_tstc() && serial_getc() == 'c')
    		return 1;
    
    #ifdef CONFIG_SPL_ENV_SUPPORT
    	env_init();
    	env_load();
    	if (env_get_yesno("boot_os") != 1)
    		return 1;
    #endif
    
    	return 0;
    }
    #endif
    
    #ifdef CONFIG_USB_DWC3
    static struct dwc3_device usb_otg_ss2 = {
    	.maximum_speed = USB_SPEED_HIGH,
    	.base = DRA7_USB_OTG_SS2_BASE,
    	.tx_fifo_resize = false,
    	.index = 1,
    };
    
    static struct dwc3_omap_device usb_otg_ss2_glue = {
    	.base = (void *)DRA7_USB_OTG_SS2_GLUE_BASE,
    	.utmi_mode = DWC3_OMAP_UTMI_MODE_SW,
    	.index = 1,
    };
    
    static struct ti_usb_phy_device usb_phy2_device = {
    	.usb2_phy_power = (void *)DRA7_USB2_PHY2_POWER,
    	.index = 1,
    };
    
    int usb_gadget_handle_interrupts(int index)
    {
    	u32 status;
    
    	status = dwc3_omap_uboot_interrupt_status(index);
    	if (status)
    		dwc3_uboot_handle_interrupt(index);
    
    	return 0;
    }
    #endif /* CONFIG_USB_DWC3 */
    
    #if defined(CONFIG_USB_DWC3) || defined(CONFIG_USB_XHCI_OMAP)
    int board_usb_init(int index, enum usb_init_type init)
    {
    	enable_usb_clocks(index);
    	switch (index) {
    	case 0:
    		if (init == USB_INIT_DEVICE) {
    			printf("port %d can't be used as device\n", index);
    			disable_usb_clocks(index);
    			return -EINVAL;
    		}
    		break;
    	case 1:
    		if (init == USB_INIT_DEVICE) {
    #ifdef CONFIG_USB_DWC3
    			usb_otg_ss2.dr_mode = USB_DR_MODE_PERIPHERAL;
    			usb_otg_ss2_glue.vbus_id_status = OMAP_DWC3_VBUS_VALID;
    			ti_usb_phy_uboot_init(&usb_phy2_device);
    			dwc3_omap_uboot_init(&usb_otg_ss2_glue);
    			dwc3_uboot_init(&usb_otg_ss2);
    #endif
    		} else {
    			printf("port %d can't be used as host\n", index);
    			disable_usb_clocks(index);
    			return -EINVAL;
    		}
    
    		break;
    	default:
    		printf("Invalid Controller Index\n");
    	}
    
    	return 0;
    }
    
    int board_usb_cleanup(int index, enum usb_init_type init)
    {
    #ifdef CONFIG_USB_DWC3
    	switch (index) {
    	case 0:
    	case 1:
    		if (init == USB_INIT_DEVICE) {
    			ti_usb_phy_uboot_exit(index);
    			dwc3_uboot_exit(index);
    			dwc3_omap_uboot_exit(index);
    		}
    		break;
    	default:
    		printf("Invalid Controller Index\n");
    	}
    #endif
    	disable_usb_clocks(index);
    	return 0;
    }
    #endif /* defined(CONFIG_USB_DWC3) || defined(CONFIG_USB_XHCI_OMAP) */
    
    #ifdef CONFIG_DRIVER_TI_CPSW
    
    /* Delay value to add to calibrated value */
    #define RGMII0_TXCTL_DLY_VAL		((0x3 << 5) + 0x8)
    #define RGMII0_TXD0_DLY_VAL		((0x3 << 5) + 0x8)
    #define RGMII0_TXD1_DLY_VAL		((0x3 << 5) + 0x2)
    #define RGMII0_TXD2_DLY_VAL		((0x4 << 5) + 0x0)
    #define RGMII0_TXD3_DLY_VAL		((0x4 << 5) + 0x0)
    #define VIN2A_D13_DLY_VAL		((0x3 << 5) + 0x8)
    #define VIN2A_D17_DLY_VAL		((0x3 << 5) + 0x8)
    #define VIN2A_D16_DLY_VAL		((0x3 << 5) + 0x2)
    #define VIN2A_D15_DLY_VAL		((0x4 << 5) + 0x0)
    #define VIN2A_D14_DLY_VAL		((0x4 << 5) + 0x0)
    
    static void cpsw_control(int enabled)
    {
    	/* VTP can be added here */
    }
    
    static struct cpsw_slave_data cpsw_slaves[] = {
    	{
    		.slave_reg_ofs	= 0x208,
    		.sliver_reg_ofs	= 0xd80,
    		.phy_addr	= 1,
    	},
    	{
    		.slave_reg_ofs	= 0x308,
    		.sliver_reg_ofs	= 0xdc0,
    		.phy_addr	= 2,
    	},
    };
    
    static struct cpsw_platform_data cpsw_data = {
    	.mdio_base		= CPSW_MDIO_BASE,
    	.cpsw_base		= CPSW_BASE,
    	.mdio_div		= 0xff,
    	.channels		= 8,
    	.cpdma_reg_ofs		= 0x800,
    	.slaves			= 1,
    	.slave_data		= cpsw_slaves,
    	.ale_reg_ofs		= 0xd00,
    	.ale_entries		= 1024,
    	.host_port_reg_ofs	= 0x108,
    	.hw_stats_reg_ofs	= 0x900,
    	.bd_ram_ofs		= 0x2000,
    	.mac_control		= (1 << 5),
    	.control		= cpsw_control,
    	.host_port_num		= 0,
    	.version		= CPSW_CTRL_VERSION_2,
    };
    
    static u64 mac_to_u64(u8 mac[6])
    {
    	int i;
    	u64 addr = 0;
    
    	for (i = 0; i < 6; i++) {
    		addr <<= 8;
    		addr |= mac[i];
    	}
    
    	return addr;
    }
    
    static void u64_to_mac(u64 addr, u8 mac[6])
    {
    	mac[5] = addr;
    	mac[4] = addr >> 8;
    	mac[3] = addr >> 16;
    	mac[2] = addr >> 24;
    	mac[1] = addr >> 32;
    	mac[0] = addr >> 40;
    }
    
    int board_eth_init(bd_t *bis)
    {
    	int ret;
    	uint8_t mac_addr[6];
    	uint32_t mac_hi, mac_lo;
    	uint32_t ctrl_val;
    	int i;
    	u64 mac1, mac2;
    	u8 mac_addr1[6], mac_addr2[6];
    	int num_macs;
    
    	/* try reading mac address from efuse */
    	mac_lo = readl((*ctrl)->control_core_mac_id_0_lo);
    	mac_hi = readl((*ctrl)->control_core_mac_id_0_hi);
    	mac_addr[0] = (mac_hi & 0xFF0000) >> 16;
    	mac_addr[1] = (mac_hi & 0xFF00) >> 8;
    	mac_addr[2] = mac_hi & 0xFF;
    	mac_addr[3] = (mac_lo & 0xFF0000) >> 16;
    	mac_addr[4] = (mac_lo & 0xFF00) >> 8;
    	mac_addr[5] = mac_lo & 0xFF;
    
    	if (!env_get("ethaddr")) {
    		printf("<ethaddr> not set. Validating first E-fuse MAC\n");
    
    		if (is_valid_ethaddr(mac_addr))
    			eth_env_set_enetaddr("ethaddr", mac_addr);
    	}
    
    	mac_lo = readl((*ctrl)->control_core_mac_id_1_lo);
    	mac_hi = readl((*ctrl)->control_core_mac_id_1_hi);
    	mac_addr[0] = (mac_hi & 0xFF0000) >> 16;
    	mac_addr[1] = (mac_hi & 0xFF00) >> 8;
    	mac_addr[2] = mac_hi & 0xFF;
    	mac_addr[3] = (mac_lo & 0xFF0000) >> 16;
    	mac_addr[4] = (mac_lo & 0xFF00) >> 8;
    	mac_addr[5] = mac_lo & 0xFF;
    
    	if (!env_get("eth1addr")) {
    		if (is_valid_ethaddr(mac_addr))
    			eth_env_set_enetaddr("eth1addr", mac_addr);
    	}
    
    	ctrl_val = readl((*ctrl)->control_core_control_io1) & (~0x33);
    	ctrl_val |= 0x22;
    	writel(ctrl_val, (*ctrl)->control_core_control_io1);
    
    	/* The phy address for the AM57xx IDK are different than x15 */
    	if (board_is_am572x_idk() || board_is_am571x_idk() ||
    	    board_is_am574x_idk()) {
    		cpsw_data.slave_data[0].phy_addr = 0;
    		cpsw_data.slave_data[1].phy_addr = 1;
    	}
    
    	ret = cpsw_register(&cpsw_data);
    	if (ret < 0)
    		printf("Error %d registering CPSW switch\n", ret);
    
    	/*
    	 * Export any Ethernet MAC addresses from EEPROM.
    	 * On AM57xx the 2 MAC addresses define the address range
    	 */
    	board_ti_get_eth_mac_addr(0, mac_addr1);
    	board_ti_get_eth_mac_addr(1, mac_addr2);
    
    	if (is_valid_ethaddr(mac_addr1) && is_valid_ethaddr(mac_addr2)) {
    		mac1 = mac_to_u64(mac_addr1);
    		mac2 = mac_to_u64(mac_addr2);
    
    		/* must contain an address range */
    		num_macs = mac2 - mac1 + 1;
    		/* <= 50 to protect against user programming error */
    		if (num_macs > 0 && num_macs <= 50) {
    			for (i = 0; i < num_macs; i++) {
    				u64_to_mac(mac1 + i, mac_addr);
    				if (is_valid_ethaddr(mac_addr)) {
    					eth_env_set_enetaddr_by_index("eth",
    								      i + 2,
    								      mac_addr);
    				}
    			}
    		}
    	}
    
    	return ret;
    }
    #endif
    
    #ifdef CONFIG_BOARD_EARLY_INIT_F
    /* VTT regulator enable */
    static inline void vtt_regulator_enable(void)
    {
    	if (omap_hw_init_context() == OMAP_INIT_CONTEXT_UBOOT_AFTER_SPL)
    		return;
    
    	gpio_request(GPIO_DDR_VTT_EN, "ddr_vtt_en");
    	gpio_direction_output(GPIO_DDR_VTT_EN, 1);
    }
    
    int board_early_init_f(void)
    {
    	vtt_regulator_enable();
    	return 0;
    }
    #endif
    
    #if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP)
    int ft_board_setup(void *blob, bd_t *bd)
    {
    	ft_cpu_setup(blob, bd);
    
    	return 0;
    }
    #endif
    
    #ifdef CONFIG_SPL_LOAD_FIT
    int board_fit_config_name_match(const char *name)
    {
    	if (board_is_x15()) {
    		if (board_is_x15_revb1()) {
    			if (!strcmp(name, "am57xx-beagle-x15-revb1"))
    				return 0;
    		} else if (board_is_x15_revc()) {
    			if (!strcmp(name, "am57xx-beagle-x15-revc"))
    				return 0;
    		} else if (!strcmp(name, "am57xx-beagle-x15")) {
    			return 0;
    		}
    	} else if (board_is_am572x_evm() &&
    		   !strcmp(name, "am57xx-beagle-x15")) {
    		return 0;
    	} else if (board_is_am572x_idk() && !strcmp(name, "am572x-idk")) {
    		return 0;
    	} else if (board_is_am574x_idk() && !strcmp(name, "am574x-idk")) {
    		return 0;
    	} else if (board_is_am571x_idk() && !strcmp(name, "am571x-idk")) {
    		return 0;
    	}
    
    	return -1;
    }
    #endif
    
    #ifdef CONFIG_TI_SECURE_DEVICE
    void board_fit_image_post_process(void **p_image, size_t *p_size)
    {
    	secure_boot_verify_image(p_image, p_size);
    }
    
    void board_tee_image_process(ulong tee_image, size_t tee_size)
    {
    	secure_tee_install((u32)tee_image);
    }
    
    U_BOOT_FIT_LOADABLE_HANDLER(IH_TYPE_TEE, board_tee_image_process);
    #endif
    
    /*
     * Library to support early TI EVM EEPROM handling
     *
     * Copyright (C) 2015-2016 Texas Instruments Incorporated - http://www.ti.com/
     *	Lokesh Vutla
     *	Steve Kipisz
     *
     * SPDX-License-Identifier:    GPL-2.0+
     */
    
    #include <common.h>
    #include <asm/omap_common.h>
    #include <dm/uclass.h>
    #include <i2c.h>
    
    #include "board_detect.h"
    
    #if defined(CONFIG_DM_I2C_COMPAT)
    /**
     * ti_i2c_set_alen - Set chip's i2c address length
     * @bus_addr - I2C bus number
     * @dev_addr - I2C eeprom id
     * @alen     - I2C address length in bytes
     *
     * DM_I2C by default sets the address length to be used to 1. This
     * function allows this address length to be changed to match the
     * eeprom used for board detection.
     */
    int __maybe_unused ti_i2c_set_alen(int bus_addr, int dev_addr, int alen)
    {
    	struct udevice *dev;
    	struct udevice *bus;
    	int rc;
    
    	rc = uclass_get_device_by_seq(UCLASS_I2C, bus_addr, &bus);
    	if (rc)
    		return rc;
    	rc = i2c_get_chip(bus, dev_addr, 1, &dev);
    	if (rc)
    		return rc;
    	rc = i2c_set_chip_offset_len(dev, alen);
    	if (rc)
    		return rc;
    
    	return 0;
    }
    #else
    int __maybe_unused ti_i2c_set_alen(int bus_addr, int dev_addr, int alen)
    {
    	return 0;
    }
    #endif
    
    /**
     * ti_i2c_eeprom_init - Initialize an i2c bus and probe for a device
     * @i2c_bus: i2c bus number to initialize
     * @dev_addr: Device address to probe for
     *
     * Return: 0 on success or corresponding error on failure.
     */
    static int __maybe_unused ti_i2c_eeprom_init(int i2c_bus, int dev_addr)
    {
    	int rc;
    
    	if (i2c_bus >= 0) {
    		rc = i2c_set_bus_num(i2c_bus);
    		if (rc)
    			return rc;
    	}
    
    	return i2c_probe(dev_addr);
    }
    
    /**
     * ti_i2c_eeprom_read - Read data from an EEPROM
     * @dev_addr: The device address of the EEPROM
     * @offset: Offset to start reading in the EEPROM
     * @ep: Pointer to a buffer to read into
     * @epsize: Size of buffer
     *
     * Return: 0 on success or corresponding result of i2c_read
     */
    static int __maybe_unused ti_i2c_eeprom_read(int dev_addr, int offset,
    					     uchar *ep, int epsize)
    {
    	int bus_num, rc, alen;
    
    	bus_num = i2c_get_bus_num();
    
    	alen = 2;
    
    	rc = ti_i2c_set_alen(bus_num, dev_addr, alen);
    	if (rc)
    		return rc;
    
    	return i2c_read(dev_addr, offset, alen, ep, epsize);
    }
    
    /**
     * ti_eeprom_string_cleanup() - Handle eeprom programming errors
     * @s:	eeprom string (should be NULL terminated)
     *
     * Some Board manufacturers do not add a NULL termination at the
     * end of string, instead some binary information is kludged in, hence
     * convert the string to just printable characters of ASCII chart.
     */
    static void __maybe_unused ti_eeprom_string_cleanup(char *s)
    {
    	int i, l;
    
    	l = strlen(s);
    	for (i = 0; i < l; i++, s++)
    		if (*s < ' ' || *s > '~') {
    			*s = 0;
    			break;
    		}
    }
    
    __weak void gpi2c_init(void)
    {
    }
    
    static int __maybe_unused ti_i2c_eeprom_get(int bus_addr, int dev_addr,
    					    u32 header, u32 size, uint8_t *ep)
    {
    	u32 byte, hdr_read;
    	int rc;
    
    	gpi2c_init();
    	rc = ti_i2c_eeprom_init(bus_addr, dev_addr);
    	if (rc)
    		return rc;
    
    	/*
    	 * Read the header first then only read the other contents.
    	 */
    	byte = 2;
    
    	rc = ti_i2c_set_alen(bus_addr, dev_addr, byte);
    	if (rc)
    		return rc;
    
    	rc = i2c_read(dev_addr, 0x0, byte, (uint8_t *)&hdr_read, 4);
    	if (rc)
    		return rc;
    
    	/* Corrupted data??? */
    	if (hdr_read != header) {
    		rc = i2c_read(dev_addr, 0x0, byte, (uint8_t *)&hdr_read, 4);
    		/*
    		 * read the eeprom header using i2c again, but use only a
    		 * 1 byte address (some legacy boards need this..)
    		 */
    		byte = 1;
    		if (rc) {
    			rc = ti_i2c_set_alen(bus_addr, dev_addr, byte);
    			if (rc)
    				return rc;
    
    			rc = i2c_read(dev_addr, 0x0, byte, (uint8_t *)&hdr_read,
    				      4);
    		}
    		if (rc)
    			return rc;
    	}
    	if (hdr_read != header)
    		return -1;
    
    	rc = i2c_read(dev_addr, 0x0, byte, ep, size);
    	if (rc)
    		return rc;
    
    	return 0;
    }
    
    int __maybe_unused ti_i2c_eeprom_am_set(const char *name, const char *rev)
    {
    	struct ti_common_eeprom *ep;
    
    	if (!name || !rev)
    		return -1;
    
    	ep = TI_EEPROM_DATA;
    	if (ep->header == TI_EEPROM_HEADER_MAGIC)
    		goto already_set;
    
    	/* Set to 0 all fields */
    	memset(ep, 0, sizeof(*ep));
    	strncpy(ep->name, name, TI_EEPROM_HDR_NAME_LEN);
    	strncpy(ep->version, rev, TI_EEPROM_HDR_REV_LEN);
    	/* Some dummy serial number to identify the platform */
    	strncpy(ep->serial, "0000", TI_EEPROM_HDR_SERIAL_LEN);
    	/* Mark it with a valid header */
    	ep->header = TI_EEPROM_HEADER_MAGIC;
    
    already_set:
    	return 0;
    }
    
    int __maybe_unused ti_i2c_eeprom_am_get(int bus_addr, int dev_addr)
    {
    	/* int rc; */
    	struct ti_am_eeprom am_ep;
    	struct ti_common_eeprom *ep;
    
    	ep = TI_EEPROM_DATA;
    #ifndef CONFIG_SPL_BUILD
    	if (ep->header == TI_EEPROM_HEADER_MAGIC)
    		return 0; /* EEPROM has already been read */
    #endif
    
    	/* Initialize with a known bad marker for i2c fails.. */
    	ep->header = TI_DEAD_EEPROM_MAGIC;
    	ep->name[0] = 0x0;
    	ep->version[0] = 0x0;
    	ep->serial[0] = 0x0;
    	ep->config[0] = 0x0;
    
    	/* rc = ti_i2c_eeprom_get(bus_addr, dev_addr, TI_EEPROM_HEADER_MAGIC,
    			       sizeof(am_ep), (uint8_t *)&am_ep);
    	if (rc)
    		return rc; */
    
    	ep->header = am_ep.header;
    	strlcpy(ep->name, "AM571IDK", TI_EEPROM_HDR_NAME_LEN + 1);
    	ti_eeprom_string_cleanup(ep->name);
    
    	/* BeagleBone Green '1' eeprom, board_rev: 0x1a 0x00 0x00 0x00 */
    	if (am_ep.version[0] == 0x1a && am_ep.version[1] == 0x00 &&
    	    am_ep.version[2] == 0x00 && am_ep.version[3] == 0x00)
    		strlcpy(ep->version, "BBG1", TI_EEPROM_HDR_REV_LEN + 1);
    	else
    		strlcpy(ep->version, am_ep.version, TI_EEPROM_HDR_REV_LEN + 1);
    	ti_eeprom_string_cleanup(ep->version);
    	strlcpy(ep->serial, am_ep.serial, TI_EEPROM_HDR_SERIAL_LEN + 1);
    	ti_eeprom_string_cleanup(ep->serial);
    	strlcpy(ep->config, am_ep.config, TI_EEPROM_HDR_CONFIG_LEN + 1);
    	ti_eeprom_string_cleanup(ep->config);
    
    	memcpy(ep->mac_addr, am_ep.mac_addr,
    	       TI_EEPROM_HDR_NO_OF_MAC_ADDR * TI_EEPROM_HDR_ETH_ALEN);
    
    	return 0;
    }
    
    int __maybe_unused ti_i2c_eeprom_dra7_get(int bus_addr, int dev_addr)
    {
    	int rc, offset = 0;
    	struct dra7_eeprom dra7_ep;
    	struct ti_common_eeprom *ep;
    
    	ep = TI_EEPROM_DATA;
    #ifndef CONFIG_SPL_BUILD
    	if (ep->header == DRA7_EEPROM_HEADER_MAGIC)
    		return 0; /* EEPROM has already been read */
    #endif
    
    	/* Initialize with a known bad marker for i2c fails.. */
    	ep->header = TI_DEAD_EEPROM_MAGIC;
    	ep->name[0] = 0x0;
    	ep->version[0] = 0x0;
    	ep->serial[0] = 0x0;
    	ep->config[0] = 0x0;
    	ep->emif1_size = 0;
    	ep->emif2_size = 0;
    
    	rc = ti_i2c_eeprom_get(bus_addr, dev_addr, DRA7_EEPROM_HEADER_MAGIC,
    			       sizeof(dra7_ep), (uint8_t *)&dra7_ep);
    	if (rc)
    		return rc;
    
    	ep->header = dra7_ep.header;
    	strlcpy(ep->name, dra7_ep.name, TI_EEPROM_HDR_NAME_LEN + 1);
    	ti_eeprom_string_cleanup(ep->name);
    
    	offset = dra7_ep.version_major - 1;
    
    	/* Rev F is skipped */
    	if (offset >= 5)
    		offset = offset + 1;
    	snprintf(ep->version, TI_EEPROM_HDR_REV_LEN + 1, "%c.%d",
    		 'A' + offset, dra7_ep.version_minor);
    	ti_eeprom_string_cleanup(ep->version);
    	ep->emif1_size = (u64)dra7_ep.emif1_size;
    	ep->emif2_size = (u64)dra7_ep.emif2_size;
    	strlcpy(ep->config, dra7_ep.config, TI_EEPROM_HDR_CONFIG_LEN + 1);
    	ti_eeprom_string_cleanup(ep->config);
    
    	return 0;
    }
    
    bool __maybe_unused board_ti_is(char *name_tag)
    {
    	struct ti_common_eeprom *ep = TI_EEPROM_DATA;
    
    	if (ep->header == TI_DEAD_EEPROM_MAGIC)
    		return false;
    	return !strncmp(ep->name, name_tag, TI_EEPROM_HDR_NAME_LEN);
    }
    
    bool __maybe_unused board_ti_rev_is(char *rev_tag, int cmp_len)
    {
    	struct ti_common_eeprom *ep = TI_EEPROM_DATA;
    	int l;
    
    	if (ep->header == TI_DEAD_EEPROM_MAGIC)
    		return false;
    
    	l = cmp_len > TI_EEPROM_HDR_REV_LEN ? TI_EEPROM_HDR_REV_LEN : cmp_len;
    	return !strncmp(ep->version, rev_tag, l);
    }
    
    char * __maybe_unused board_ti_get_rev(void)
    {
    	struct ti_common_eeprom *ep = TI_EEPROM_DATA;
    
    	/* if ep->header == TI_DEAD_EEPROM_MAGIC, this is empty already */
    	return ep->version;
    }
    
    char * __maybe_unused board_ti_get_config(void)
    {
    	struct ti_common_eeprom *ep = TI_EEPROM_DATA;
    
    	/* if ep->header == TI_DEAD_EEPROM_MAGIC, this is empty already */
    	return ep->config;
    }
    
    char * __maybe_unused board_ti_get_name(void)
    {
    	struct ti_common_eeprom *ep = TI_EEPROM_DATA;
    
    	/* if ep->header == TI_DEAD_EEPROM_MAGIC, this is empty already */
    	return ep->name;
    }
    
    void __maybe_unused
    board_ti_get_eth_mac_addr(int index,
    			  u8 mac_addr[TI_EEPROM_HDR_ETH_ALEN])
    {
    	struct ti_common_eeprom *ep = TI_EEPROM_DATA;
    
    	if (ep->header == TI_DEAD_EEPROM_MAGIC)
    		goto fail;
    
    	if (index < 0 || index >= TI_EEPROM_HDR_NO_OF_MAC_ADDR)
    		goto fail;
    
    	memcpy(mac_addr, ep->mac_addr[index], TI_EEPROM_HDR_ETH_ALEN);
    	return;
    
    fail:
    	memset(mac_addr, 0, TI_EEPROM_HDR_ETH_ALEN);
    }
    
    u64 __maybe_unused board_ti_get_emif1_size(void)
    {
    	struct ti_common_eeprom *ep = TI_EEPROM_DATA;
    
    	if (ep->header != DRA7_EEPROM_HEADER_MAGIC)
    		return 0;
    
    	return ep->emif1_size;
    }
    
    u64 __maybe_unused board_ti_get_emif2_size(void)
    {
    	struct ti_common_eeprom *ep = TI_EEPROM_DATA;
    
    	if (ep->header != DRA7_EEPROM_HEADER_MAGIC)
    		return 0;
    
    	return ep->emif2_size;
    }
    
    void __maybe_unused set_board_info_env(char *name)
    {
    	char *unknown = "unknown";
    	struct ti_common_eeprom *ep = TI_EEPROM_DATA;
    
    	if (name)
    		env_set("board_name", name);
    	else if (ep->name)
    		env_set("board_name", ep->name);
    	else
    		env_set("board_name", unknown);
    
    	if (ep->version)
    		env_set("board_rev", ep->version);
    	else
    		env_set("board_rev", unknown);
    
    	if (ep->serial)
    		env_set("board_serial", ep->serial);
    	else
    		env_set("board_serial", unknown);
    }
    
    static u64 mac_to_u64(u8 mac[6])
    {
    	int i;
    	u64 addr = 0;
    
    	for (i = 0; i < 6; i++) {
    		addr <<= 8;
    		addr |= mac[i];
    	}
    
    	return addr;
    }
    
    static void u64_to_mac(u64 addr, u8 mac[6])
    {
    	mac[5] = addr;
    	mac[4] = addr >> 8;
    	mac[3] = addr >> 16;
    	mac[2] = addr >> 24;
    	mac[1] = addr >> 32;
    	mac[0] = addr >> 40;
    }
    
    void board_ti_set_ethaddr(int index)
    {
    	uint8_t mac_addr[6];
    	int i;
    	u64 mac1, mac2;
    	u8 mac_addr1[6], mac_addr2[6];
    	int num_macs;
    	/*
    	 * Export any Ethernet MAC addresses from EEPROM.
    	 * The 2 MAC addresses in EEPROM define the address range.
    	 */
    	board_ti_get_eth_mac_addr(0, mac_addr1);
    	board_ti_get_eth_mac_addr(1, mac_addr2);
    
    	if (is_valid_ethaddr(mac_addr1) && is_valid_ethaddr(mac_addr2)) {
    		mac1 = mac_to_u64(mac_addr1);
    		mac2 = mac_to_u64(mac_addr2);
    
    		/* must contain an address range */
    		num_macs = mac2 - mac1 + 1;
    		if (num_macs <= 0)
    			return;
    
    		if (num_macs > 50) {
    			printf("%s: Too many MAC addresses: %d. Limiting to 50\n",
    			       __func__, num_macs);
    			num_macs = 50;
    		}
    
    		for (i = 0; i < num_macs; i++) {
    			u64_to_mac(mac1 + i, mac_addr);
    			if (is_valid_ethaddr(mac_addr)) {
    				eth_env_set_enetaddr_by_index("eth", i + index,
    							      mac_addr);
    			}
    		}
    	}
    }
    
    bool __maybe_unused board_ti_was_eeprom_read(void)
    {
    	struct ti_common_eeprom *ep = TI_EEPROM_DATA;
    
    	if (ep->header == TI_EEPROM_HEADER_MAGIC)
    		return true;
    	else
    		return false;
    }
    

    Thanks and Regards

    Arpita Jena

  • Hi, Arpita Jena

    After backing up your code,

    Change to board.c below.

    /*
     * Copyright (C) 2014 Texas Instruments Incorporated - http://www.ti.com
     *
     * Author: Felipe Balbi <balbi@ti.com>
     *
     * Based on board/ti/dra7xx/evm.c
     *
     * SPDX-License-Identifier:	GPL-2.0+
     */
    
    #include <common.h>
    #include <palmas.h>
    #include <sata.h>
    #include <usb.h>
    #include <asm/omap_common.h>
    #include <asm/omap_sec_common.h>
    #include <asm/emif.h>
    #include <asm/gpio.h>
    #include <asm/arch/gpio.h>
    #include <asm/arch/clock.h>
    #include <asm/arch/dra7xx_iodelay.h>
    #include <asm/arch/sys_proto.h>
    #include <asm/arch/mmc_host_def.h>
    #include <asm/arch/sata.h>
    #include <asm/arch/gpio.h>
    #include <asm/arch/omap.h>
    #include <environment.h>
    #include <usb.h>
    #include <linux/usb/gadget.h>
    #include <dwc3-uboot.h>
    #include <dwc3-omap-uboot.h>
    #include <ti-usb-phy-uboot.h>
    #include <mmc.h>
    
    #include "../common/board_detect.h"
    #include "mux_data.h"
    
    #define board_is_x15()		board_ti_is("BBRDX15_")
    #define board_is_x15_revb1()	(board_ti_is("BBRDX15_") && \
    				 !strncmp("B.10", board_ti_get_rev(), 3))
    #define board_is_x15_revc()	(board_ti_is("BBRDX15_") && \
    				 !strncmp("C.00", board_ti_get_rev(), 3))
    #define board_is_am572x_evm()	board_ti_is("AM572PM_")
    #define board_is_am572x_evm_reva3()	\
    				(board_ti_is("AM572PM_") && \
    				 !strncmp("A.30", board_ti_get_rev(), 3))
    #define board_is_am574x_idk()	board_ti_is("AM574IDK")
    #define board_is_am572x_idk()	board_ti_is("AM572IDK")
    #define board_is_am571x_idk()	board_ti_is("AM571IDK")
    
    #ifdef CONFIG_DRIVER_TI_CPSW
    #include <cpsw.h>
    #endif
    
    DECLARE_GLOBAL_DATA_PTR;
    
    #define GPIO_ETH_LCD		GPIO_TO_PIN(2, 22)
    /* GPIO 7_11 */
    #define GPIO_DDR_VTT_EN 203
    
    /* Touch screen controller to identify the LCD */
    #define OSD_TS_FT_BUS_ADDRESS	0
    #define OSD_TS_FT_CHIP_ADDRESS	0x38
    #define OSD_TS_FT_REG_ID	0xA3
    /*
     * Touchscreen IDs for various OSD panels
     * Ref: http://www.osddisplays.com/TI/OSD101T2587-53TS_A.1.pdf
     */
    /* Used on newer osd101t2587 Panels */
    #define OSD_TS_FT_ID_5x46	0x54
    /* Used on older osd101t2045 Panels */
    #define OSD_TS_FT_ID_5606	0x08
    
    #define SYSINFO_BOARD_NAME_MAX_LEN	45
    
    #define TPS65903X_PRIMARY_SECONDARY_PAD2	0xFB
    #define TPS65903X_PAD2_POWERHOLD_MASK		0x20
    
    const struct omap_sysinfo sysinfo = {
    	"Board: UNKNOWN(BeagleBoard X15?) REV UNKNOWN\n"
    };
    
    static const struct dmm_lisa_map_regs beagle_x15_lisa_regs = {
    	.dmm_lisa_map_3 = 0x80740300,
    	.is_ma_present  = 0x1
    };
    
    static const struct dmm_lisa_map_regs am571x_idk_lisa_regs = {
    	.dmm_lisa_map_3 = 0x80640100,
    	.is_ma_present  = 0x1
    };
    
    static const struct dmm_lisa_map_regs am574x_idk_lisa_regs = {
    	.dmm_lisa_map_2 = 0xc0600200,
    	.dmm_lisa_map_3 = 0x80600100,
    	.is_ma_present  = 0x1
    };
    
    void emif_get_dmm_regs(const struct dmm_lisa_map_regs **dmm_lisa_regs)
    {
    *dmm_lisa_regs = &am571x_idk_lisa_regs;
    #if 0
    	if (board_is_am571x_idk())
    		*dmm_lisa_regs = &am571x_idk_lisa_regs;
    	else if (board_is_am574x_idk())
    		*dmm_lisa_regs = &am574x_idk_lisa_regs;
    	else
    		*dmm_lisa_regs = &beagle_x15_lisa_regs;
    #endif
    }
    
    static const struct emif_regs beagle_x15_emif1_ddr3_532mhz_emif_regs = {
    	.sdram_config_init		= 0x61851b32,
    	.sdram_config			= 0x61851b32,
    	.sdram_config2			= 0x08000000,
    	.ref_ctrl			= 0x000040F1,
    	.ref_ctrl_final			= 0x00001035,
    	.sdram_tim1			= 0xcccf36ab,
    	.sdram_tim2			= 0x308f7fda,
    	.sdram_tim3			= 0x409f88a8,
    	.read_idle_ctrl			= 0x00050000,
    	.zq_config			= 0x5007190b,
    	.temp_alert_config		= 0x00000000,
    	.emif_ddr_phy_ctlr_1_init 	= 0x0024400b,
    	.emif_ddr_phy_ctlr_1		= 0x0e24400b,
    	.emif_ddr_ext_phy_ctrl_1 	= 0x10040100,
    	.emif_ddr_ext_phy_ctrl_2 	= 0x00910091,
    	.emif_ddr_ext_phy_ctrl_3 	= 0x00950095,
    	.emif_ddr_ext_phy_ctrl_4 	= 0x009b009b,
    	.emif_ddr_ext_phy_ctrl_5 	= 0x009e009e,
    	.emif_rd_wr_lvl_rmp_win		= 0x00000000,
    	.emif_rd_wr_lvl_rmp_ctl		= 0x80000000,
    	.emif_rd_wr_lvl_ctl		= 0x00000000,
    	.emif_rd_wr_exec_thresh		= 0x00000305
    };
    
    /* Ext phy ctrl regs 1-35 */
    static const u32 beagle_x15_emif1_ddr3_ext_phy_ctrl_const_regs[] = {
    	0x10040100,
    	0x00910091,
    	0x00950095,
    	0x009B009B,
    	0x009E009E,
    	0x00980098,
    	0x00340034,
    	0x00350035,
    	0x00340034,
    	0x00310031,
    	0x00340034,
    	0x007F007F,
    	0x007F007F,
    	0x007F007F,
    	0x007F007F,
    	0x007F007F,
    	0x00480048,
    	0x004A004A,
    	0x00520052,
    	0x00550055,
    	0x00500050,
    	0x00000000,
    	0x00600020,
    	0x40011080,
    	0x08102040,
    	0x0,
    	0x0,
    	0x0,
    	0x0,
    	0x0,
    	0x0,
    	0x0,
    	0x0,
    	0x0,
    	0x0
    };
    
    static const struct emif_regs beagle_x15_emif2_ddr3_532mhz_emif_regs = {
    	.sdram_config_init		= 0x61851b32,
    	.sdram_config			= 0x61851b32,
    	.sdram_config2			= 0x08000000,
    	.ref_ctrl			= 0x000040F1,
    	.ref_ctrl_final			= 0x00001035,
    	.sdram_tim1			= 0xcccf36b3,
    	.sdram_tim2			= 0x308f7fda,
    	.sdram_tim3			= 0x407f88a8,
    	.read_idle_ctrl			= 0x00050000,
    	.zq_config			= 0x5007190b,
    	.temp_alert_config		= 0x00000000,
    	.emif_ddr_phy_ctlr_1_init 	= 0x0024400b,
    	.emif_ddr_phy_ctlr_1		= 0x0e24400b,
    	.emif_ddr_ext_phy_ctrl_1 	= 0x10040100,
    	.emif_ddr_ext_phy_ctrl_2 	= 0x00910091,
    	.emif_ddr_ext_phy_ctrl_3 	= 0x00950095,
    	.emif_ddr_ext_phy_ctrl_4 	= 0x009b009b,
    	.emif_ddr_ext_phy_ctrl_5 	= 0x009e009e,
    	.emif_rd_wr_lvl_rmp_win		= 0x00000000,
    	.emif_rd_wr_lvl_rmp_ctl		= 0x80000000,
    	.emif_rd_wr_lvl_ctl		= 0x00000000,
    	.emif_rd_wr_exec_thresh		= 0x00000305
    };
    
    static const u32 beagle_x15_emif2_ddr3_ext_phy_ctrl_const_regs[] = {
    	0x10040100,
    	0x00910091,
    	0x00950095,
    	0x009B009B,
    	0x009E009E,
    	0x00980098,
    	0x00340034,
    	0x00350035,
    	0x00340034,
    	0x00310031,
    	0x00340034,
    	0x007F007F,
    	0x007F007F,
    	0x007F007F,
    	0x007F007F,
    	0x007F007F,
    	0x00480048,
    	0x004A004A,
    	0x00520052,
    	0x00550055,
    	0x00500050,
    	0x00000000,
    	0x00600020,
    	0x40011080,
    	0x08102040,
    	0x0,
    	0x0,
    	0x0,
    	0x0,
    	0x0,
    	0x0,
    	0x0,
    	0x0,
    	0x0,
    	0x0
    };
    
    static const struct emif_regs am571x_emif1_ddr3_666mhz_emif_regs = {
    	.sdram_config_init		= 0x61863332,
    	.sdram_config			= 0x61863332,
    	.sdram_config2			= 0x08000000,
    	.ref_ctrl			= 0x0000514d,
    	.ref_ctrl_final			= 0x0000144a,
    	.sdram_tim1			= 0xd333887c,
    	.sdram_tim2			= 0x30b37fe3,
    	.sdram_tim3			= 0x409f8ad8,
    	.read_idle_ctrl			= 0x00050000,
    	.zq_config			= 0x5007190b,
    	.temp_alert_config		= 0x00000000,
    	.emif_ddr_phy_ctlr_1_init	= 0x0024400f,
    	.emif_ddr_phy_ctlr_1		= 0x0e24400f,
    	.emif_ddr_ext_phy_ctrl_1	= 0x10040100,
    	.emif_ddr_ext_phy_ctrl_2	= 0x00910091,
    	.emif_ddr_ext_phy_ctrl_3	= 0x00950095,
    	.emif_ddr_ext_phy_ctrl_4	= 0x009b009b,
    	.emif_ddr_ext_phy_ctrl_5	= 0x009e009e,
    	.emif_rd_wr_lvl_rmp_win		= 0x00000000,
    	.emif_rd_wr_lvl_rmp_ctl		= 0x80000000,
    	.emif_rd_wr_lvl_ctl		= 0x00000000,
    	.emif_rd_wr_exec_thresh		= 0x00000305
    };
    
    static const struct emif_regs am574x_emif1_ddr3_666mhz_emif_ecc_regs = {
    	.sdram_config_init		= 0x61863332,
    	.sdram_config			= 0x61863332,
    	.sdram_config2			= 0x08000000,
    	.ref_ctrl			= 0x0000514d,
    	.ref_ctrl_final			= 0x0000144a,
    	.sdram_tim1			= 0xd333887c,
    	.sdram_tim2			= 0x30b37fe3,
    	.sdram_tim3			= 0x409f8ad8,
    	.read_idle_ctrl			= 0x00050000,
    	.zq_config			= 0x5007190b,
    	.temp_alert_config		= 0x00000000,
    	.emif_ddr_phy_ctlr_1_init	= 0x0024400f,
    	.emif_ddr_phy_ctlr_1		= 0x0e24400f,
    	.emif_ddr_ext_phy_ctrl_1	= 0x10040100,
    	.emif_ddr_ext_phy_ctrl_2	= 0x00910091,
    	.emif_ddr_ext_phy_ctrl_3	= 0x00950095,
    	.emif_ddr_ext_phy_ctrl_4	= 0x009b009b,
    	.emif_ddr_ext_phy_ctrl_5	= 0x009e009e,
    	.emif_rd_wr_lvl_rmp_win		= 0x00000000,
    	.emif_rd_wr_lvl_rmp_ctl		= 0x80000000,
    	.emif_rd_wr_lvl_ctl		= 0x00000000,
    	.emif_rd_wr_exec_thresh		= 0x00000305,
    	.emif_ecc_ctrl_reg		= 0xD0000001,
    	.emif_ecc_address_range_1	= 0x3FFF0000,
    	.emif_ecc_address_range_2	= 0x00000000
    };
    
    void emif_get_reg_dump(u32 emif_nr, const struct emif_regs **regs)
    {
    	*regs = &am571x_emif1_ddr3_666mhz_emif_regs;
    #if 0
    	switch (emif_nr) {
    	case 1:
    		if (board_is_am571x_idk())
    			*regs = &am571x_emif1_ddr3_666mhz_emif_regs;
    		else if (board_is_am574x_idk())
    			*regs = &am574x_emif1_ddr3_666mhz_emif_ecc_regs;
    		else
    			*regs = &beagle_x15_emif1_ddr3_532mhz_emif_regs;
    		break;
    	case 2:
    		if (board_is_am574x_idk())
    			*regs = &am571x_emif1_ddr3_666mhz_emif_regs;
    		else
    			*regs = &beagle_x15_emif2_ddr3_532mhz_emif_regs;
    		break;
    	}
    #endif
    }
    
    void emif_get_ext_phy_ctrl_const_regs(u32 emif_nr, const u32 **regs, u32 *size)
    {
    	switch (emif_nr) {
    	case 1:
    		*regs = beagle_x15_emif1_ddr3_ext_phy_ctrl_const_regs;
    		*size = ARRAY_SIZE(beagle_x15_emif1_ddr3_ext_phy_ctrl_const_regs);
    		break;
    	case 2:
    		*regs = beagle_x15_emif2_ddr3_ext_phy_ctrl_const_regs;
    		*size = ARRAY_SIZE(beagle_x15_emif2_ddr3_ext_phy_ctrl_const_regs);
    		break;
    	}
    }
    
    struct vcores_data beagle_x15_volts = {
    	.mpu.value[OPP_NOM]	= VDD_MPU_DRA7_NOM,
    	.mpu.efuse.reg[OPP_NOM]	= STD_FUSE_OPP_VMIN_MPU_NOM,
    	.mpu.efuse.reg_bits     = DRA752_EFUSE_REGBITS,
    	.mpu.addr		= TPS659038_REG_ADDR_SMPS12,
    	.mpu.pmic		= &tps659038,
    	.mpu.abb_tx_done_mask	= OMAP_ABB_MPU_TXDONE_MASK,
    
    	.eve.value[OPP_NOM]	= VDD_EVE_DRA7_NOM,
    	.eve.value[OPP_OD]	= VDD_EVE_DRA7_OD,
    	.eve.value[OPP_HIGH]	= VDD_EVE_DRA7_HIGH,
    	.eve.efuse.reg[OPP_NOM]	= STD_FUSE_OPP_VMIN_DSPEVE_NOM,
    	.eve.efuse.reg[OPP_OD]	= STD_FUSE_OPP_VMIN_DSPEVE_OD,
    	.eve.efuse.reg[OPP_HIGH]	= STD_FUSE_OPP_VMIN_DSPEVE_HIGH,
    	.eve.efuse.reg_bits	= DRA752_EFUSE_REGBITS,
    	.eve.addr		= TPS659038_REG_ADDR_SMPS45,
    	.eve.pmic		= &tps659038,
    	.eve.abb_tx_done_mask	= OMAP_ABB_EVE_TXDONE_MASK,
    
    	.gpu.value[OPP_NOM]	= VDD_GPU_DRA7_NOM,
    	.gpu.value[OPP_OD]	= VDD_GPU_DRA7_OD,
    	.gpu.value[OPP_HIGH]	= VDD_GPU_DRA7_HIGH,
    	.gpu.efuse.reg[OPP_NOM]	= STD_FUSE_OPP_VMIN_GPU_NOM,
    	.gpu.efuse.reg[OPP_OD]	= STD_FUSE_OPP_VMIN_GPU_OD,
    	.gpu.efuse.reg[OPP_HIGH]	= STD_FUSE_OPP_VMIN_GPU_HIGH,
    	.gpu.efuse.reg_bits	= DRA752_EFUSE_REGBITS,
    	.gpu.addr		= TPS659038_REG_ADDR_SMPS45,
    	.gpu.pmic		= &tps659038,
    	.gpu.abb_tx_done_mask	= OMAP_ABB_GPU_TXDONE_MASK,
    
    	.core.value[OPP_NOM]	= VDD_CORE_DRA7_NOM,
    	.core.efuse.reg[OPP_NOM]	= STD_FUSE_OPP_VMIN_CORE_NOM,
    	.core.efuse.reg_bits	= DRA752_EFUSE_REGBITS,
    	.core.addr		= TPS659038_REG_ADDR_SMPS6,
    	.core.pmic		= &tps659038,
    
    	.iva.value[OPP_NOM]	= VDD_IVA_DRA7_NOM,
    	.iva.value[OPP_OD]	= VDD_IVA_DRA7_OD,
    	.iva.value[OPP_HIGH]	= VDD_IVA_DRA7_HIGH,
    	.iva.efuse.reg[OPP_NOM]	= STD_FUSE_OPP_VMIN_IVA_NOM,
    	.iva.efuse.reg[OPP_OD]	= STD_FUSE_OPP_VMIN_IVA_OD,
    	.iva.efuse.reg[OPP_HIGH]	= STD_FUSE_OPP_VMIN_IVA_HIGH,
    	.iva.efuse.reg_bits	= DRA752_EFUSE_REGBITS,
    	.iva.addr		= TPS659038_REG_ADDR_SMPS45,
    	.iva.pmic		= &tps659038,
    	.iva.abb_tx_done_mask	= OMAP_ABB_IVA_TXDONE_MASK,
    };
    
    struct vcores_data am572x_idk_volts = {
    	.mpu.value[OPP_NOM]	= VDD_MPU_DRA7_NOM,
    	.mpu.efuse.reg[OPP_NOM]	= STD_FUSE_OPP_VMIN_MPU_NOM,
    	.mpu.efuse.reg_bits     = DRA752_EFUSE_REGBITS,
    	.mpu.addr		= TPS659038_REG_ADDR_SMPS12,
    	.mpu.pmic		= &tps659038,
    	.mpu.abb_tx_done_mask	= OMAP_ABB_MPU_TXDONE_MASK,
    
    	.eve.value[OPP_NOM]	= VDD_EVE_DRA7_NOM,
    	.eve.value[OPP_OD]	= VDD_EVE_DRA7_OD,
    	.eve.value[OPP_HIGH]	= VDD_EVE_DRA7_HIGH,
    	.eve.efuse.reg[OPP_NOM]	= STD_FUSE_OPP_VMIN_DSPEVE_NOM,
    	.eve.efuse.reg[OPP_OD]	= STD_FUSE_OPP_VMIN_DSPEVE_OD,
    	.eve.efuse.reg[OPP_HIGH]	= STD_FUSE_OPP_VMIN_DSPEVE_HIGH,
    	.eve.efuse.reg_bits	= DRA752_EFUSE_REGBITS,
    	.eve.addr		= TPS659038_REG_ADDR_SMPS45,
    	.eve.pmic		= &tps659038,
    	.eve.abb_tx_done_mask	= OMAP_ABB_EVE_TXDONE_MASK,
    
    	.gpu.value[OPP_NOM]	= VDD_GPU_DRA7_NOM,
    	.gpu.value[OPP_OD]	= VDD_GPU_DRA7_OD,
    	.gpu.value[OPP_HIGH]	= VDD_GPU_DRA7_HIGH,
    	.gpu.efuse.reg[OPP_NOM]	= STD_FUSE_OPP_VMIN_GPU_NOM,
    	.gpu.efuse.reg[OPP_OD]	= STD_FUSE_OPP_VMIN_GPU_OD,
    	.gpu.efuse.reg[OPP_HIGH]	= STD_FUSE_OPP_VMIN_GPU_HIGH,
    	.gpu.efuse.reg_bits	= DRA752_EFUSE_REGBITS,
    	.gpu.addr		= TPS659038_REG_ADDR_SMPS6,
    	.gpu.pmic		= &tps659038,
    	.gpu.abb_tx_done_mask	= OMAP_ABB_GPU_TXDONE_MASK,
    
    	.core.value[OPP_NOM]	= VDD_CORE_DRA7_NOM,
    	.core.efuse.reg[OPP_NOM]	= STD_FUSE_OPP_VMIN_CORE_NOM,
    	.core.efuse.reg_bits	= DRA752_EFUSE_REGBITS,
    	.core.addr		= TPS659038_REG_ADDR_SMPS7,
    	.core.pmic		= &tps659038,
    
    	.iva.value[OPP_NOM]	= VDD_IVA_DRA7_NOM,
    	.iva.value[OPP_OD]	= VDD_IVA_DRA7_OD,
    	.iva.value[OPP_HIGH]	= VDD_IVA_DRA7_HIGH,
    	.iva.efuse.reg[OPP_NOM]	= STD_FUSE_OPP_VMIN_IVA_NOM,
    	.iva.efuse.reg[OPP_OD]	= STD_FUSE_OPP_VMIN_IVA_OD,
    	.iva.efuse.reg[OPP_HIGH]	= STD_FUSE_OPP_VMIN_IVA_HIGH,
    	.iva.efuse.reg_bits	= DRA752_EFUSE_REGBITS,
    	.iva.addr		= TPS659038_REG_ADDR_SMPS8,
    	.iva.pmic		= &tps659038,
    	.iva.abb_tx_done_mask	= OMAP_ABB_IVA_TXDONE_MASK,
    };
    
    struct vcores_data am571x_idk_volts = {
    	.mpu.value[OPP_NOM]	= VDD_MPU_DRA7_NOM,
    	.mpu.efuse.reg[OPP_NOM]	= STD_FUSE_OPP_VMIN_MPU_NOM,
    	.mpu.efuse.reg_bits     = DRA752_EFUSE_REGBITS,
    	.mpu.addr		= TPS659038_REG_ADDR_SMPS12,
    	.mpu.pmic		= &tps659038,
    	.mpu.abb_tx_done_mask = OMAP_ABB_MPU_TXDONE_MASK,
    
    	.eve.value[OPP_NOM]	= VDD_EVE_DRA7_NOM,
    	.eve.value[OPP_OD]	= VDD_EVE_DRA7_OD,
    	.eve.value[OPP_HIGH]	= VDD_EVE_DRA7_HIGH,
    	.eve.efuse.reg[OPP_NOM]	= STD_FUSE_OPP_VMIN_DSPEVE_NOM,
    	.eve.efuse.reg[OPP_OD]	= STD_FUSE_OPP_VMIN_DSPEVE_OD,
    	.eve.efuse.reg[OPP_HIGH]	= STD_FUSE_OPP_VMIN_DSPEVE_HIGH,
    	.eve.efuse.reg_bits	= DRA752_EFUSE_REGBITS,
    	.eve.addr		= TPS659038_REG_ADDR_SMPS45,
    	.eve.pmic		= &tps659038,
    	.eve.abb_tx_done_mask	= OMAP_ABB_EVE_TXDONE_MASK,
    
    	.gpu.value[OPP_NOM]	= VDD_GPU_DRA7_NOM,
    	.gpu.value[OPP_OD]	= VDD_GPU_DRA7_OD,
    	.gpu.value[OPP_HIGH]	= VDD_GPU_DRA7_HIGH,
    	.gpu.efuse.reg[OPP_NOM]	= STD_FUSE_OPP_VMIN_GPU_NOM,
    	.gpu.efuse.reg[OPP_OD]	= STD_FUSE_OPP_VMIN_GPU_OD,
    	.gpu.efuse.reg[OPP_HIGH]	= STD_FUSE_OPP_VMIN_GPU_HIGH,
    	.gpu.efuse.reg_bits	= DRA752_EFUSE_REGBITS,
    	.gpu.addr		= TPS659038_REG_ADDR_SMPS6,
    	.gpu.pmic		= &tps659038,
    	.gpu.abb_tx_done_mask	= OMAP_ABB_GPU_TXDONE_MASK,
    
    	.core.value[OPP_NOM]	= VDD_CORE_DRA7_NOM,
    	.core.efuse.reg[OPP_NOM]	= STD_FUSE_OPP_VMIN_CORE_NOM,
    	.core.efuse.reg_bits	= DRA752_EFUSE_REGBITS,
    	.core.addr		= TPS659038_REG_ADDR_SMPS7,
    	.core.pmic		= &tps659038,
    
    	.iva.value[OPP_NOM]	= VDD_IVA_DRA7_NOM,
    	.iva.value[OPP_OD]	= VDD_IVA_DRA7_OD,
    	.iva.value[OPP_HIGH]	= VDD_IVA_DRA7_HIGH,
    	.iva.efuse.reg[OPP_NOM]	= STD_FUSE_OPP_VMIN_IVA_NOM,
    	.iva.efuse.reg[OPP_OD]	= STD_FUSE_OPP_VMIN_IVA_OD,
    	.iva.efuse.reg[OPP_HIGH]	= STD_FUSE_OPP_VMIN_IVA_HIGH,
    	.iva.efuse.reg_bits	= DRA752_EFUSE_REGBITS,
    	.iva.addr		= TPS659038_REG_ADDR_SMPS45,
    	.iva.pmic		= &tps659038,
    	.iva.abb_tx_done_mask	= OMAP_ABB_IVA_TXDONE_MASK,
    };
    
    int get_voltrail_opp(int rail_offset)
    {
    	int opp;
    
    	switch (rail_offset) {
    	case VOLT_MPU:
    		opp = DRA7_MPU_OPP;
    		break;
    	case VOLT_CORE:
    		opp = DRA7_CORE_OPP;
    		break;
    	case VOLT_GPU:
    		opp = DRA7_GPU_OPP;
    		break;
    	case VOLT_EVE:
    		opp = DRA7_DSPEVE_OPP;
    		break;
    	case VOLT_IVA:
    		opp = DRA7_IVA_OPP;
    		break;
    	default:
    		opp = OPP_NOM;
    	}
    
    	return opp;
    }
    
    
    #ifdef CONFIG_SPL_BUILD
    /* No env to setup for SPL */
    static inline void setup_board_eeprom_env(void) { }
    
    /* Override function to read eeprom information */
    void do_board_detect(void)
    {
    	int rc;
    
    	rc = ti_i2c_eeprom_am_get(CONFIG_EEPROM_BUS_ADDRESS,
    				  CONFIG_EEPROM_CHIP_ADDRESS);
    	if (rc)
    		printf("ti_i2c_eeprom_init failed %d\n", rc);
    }
    
    #else	/* CONFIG_SPL_BUILD */
    
    /* Override function to read eeprom information: actual i2c read done by SPL*/
    void do_board_detect(void)
    {
    	char *bname = "AM571x IDK";
    	int rc;
    
    	rc = ti_i2c_eeprom_am_get(CONFIG_EEPROM_BUS_ADDRESS,
    				  CONFIG_EEPROM_CHIP_ADDRESS);
    #if 0
    	if (rc)
    		printf("ti_i2c_eeprom_init failed %d\n", rc);
    
    	if (board_is_x15())
    		bname = "BeagleBoard X15";
    	else if (board_is_am572x_evm())
    		bname = "AM572x EVM";
    	else if (board_is_am574x_idk())
    		bname = "AM574x IDK";
    	else if (board_is_am572x_idk())
    		bname = "AM572x IDK";
    	else if (board_is_am571x_idk())
    		bname = "AM571x IDK";
    #endif
    
    	if (bname)
    		snprintf(sysinfo.board_string, SYSINFO_BOARD_NAME_MAX_LEN,
    			 "Board: %s REV %s\n", bname, board_ti_get_rev());
    }
    
    static void setup_board_eeprom_env(void)
    {
    	char *name = "am571x_idk";
    	int rc;
    
    	rc = ti_i2c_eeprom_am_get(CONFIG_EEPROM_BUS_ADDRESS,
    				  CONFIG_EEPROM_CHIP_ADDRESS);
    	if (rc)
    		goto invalid_eeprom;
    #if 0
    	if (board_is_x15()) {
    		if (board_is_x15_revb1())
    			name = "beagle_x15_revb1";
    		else if (board_is_x15_revc())
    			name = "beagle_x15_revc";
    		else
    			name = "beagle_x15";
    	} else if (board_is_am572x_evm()) {
    		if (board_is_am572x_evm_reva3())
    			name = "am57xx_evm_reva3";
    		else
    			name = "am57xx_evm";
    	} else if (board_is_am574x_idk()) {
    		name = "am574x_idk";
    	} else if (board_is_am572x_idk()) {
    		name = "am572x_idk";
    	} else if (board_is_am571x_idk()) {
    		name = "am571x_idk";
    	} else {
    		printf("Unidentified board claims %s in eeprom header\n",
    		       board_ti_get_name());
    	}
    #endif
    invalid_eeprom:
    	set_board_info_env(name);
    }
    
    #endif	/* CONFIG_SPL_BUILD */
    
    void vcores_init(void)
    {
    	*omap_vcores = &am571x_idk_volts;
    #if 0
    	if (board_is_am572x_idk() || board_is_am574x_idk())
    		*omap_vcores = &am572x_idk_volts;
    	else if (board_is_am571x_idk())
    		*omap_vcores = &am571x_idk_volts;
    	else
    		*omap_vcores = &beagle_x15_volts;
    #endif
    }
    
    void hw_data_init(void)
    {
    	*prcm = &dra7xx_prcm;
    	if (is_dra72x())
    		*dplls_data = &dra72x_dplls;
    	else if (is_dra76x())
    		*dplls_data = &dra76x_dplls;
    	else
    		*dplls_data = &dra7xx_dplls;
    	*ctrl = &dra7xx_ctrl;
    }
    
    bool am571x_idk_needs_lcd(void)
    {
    	bool needs_lcd;
    
    	gpio_request(GPIO_ETH_LCD, "nLCD_Detect");
    	if (gpio_get_value(GPIO_ETH_LCD))
    		needs_lcd = false;
    	else
    		needs_lcd = true;
    
    	gpio_free(GPIO_ETH_LCD);
    
    	return needs_lcd;
    }
    
    int board_init(void)
    {
    	gpmc_init();
    	gd->bd->bi_boot_params = (CONFIG_SYS_SDRAM_BASE + 0x100);
    
    	return 0;
    }
    
    void am57x_idk_lcd_detect(void)
    {
    	int r = -ENODEV;
    	char *idk_lcd = "no";
    	uint8_t buf = 0;
    #if 0
    	/* Only valid for IDKs */
    	if (board_is_x15() || board_is_am572x_evm())
    		return;
    
    	/* Only AM571x IDK has gpio control detect.. so check that */
    	if (board_is_am571x_idk() && !am571x_idk_needs_lcd())
    		goto out;
    
    	r = i2c_set_bus_num(OSD_TS_FT_BUS_ADDRESS);
    	if (r) {
    		printf("%s: Failed to set bus address to %d: %d\n",
    		       __func__, OSD_TS_FT_BUS_ADDRESS, r);
    		goto out;
    	}
    	r = i2c_probe(OSD_TS_FT_CHIP_ADDRESS);
    	if (r) {
    		/* AM572x IDK has no explicit settings for optional LCD kit */
    		if (board_is_am571x_idk()) {
    			printf("%s: Touch screen detect failed: %d!\n",
    			       __func__, r);
    		}
    		goto out;
    	}
    
    	/* Read FT ID */
    	r = i2c_read(OSD_TS_FT_CHIP_ADDRESS, OSD_TS_FT_REG_ID, 1, &buf, 1);
    	if (r) {
    		printf("%s: Touch screen ID read %d:0x%02x[0x%02x] failed:%d\n",
    		       __func__, OSD_TS_FT_BUS_ADDRESS, OSD_TS_FT_CHIP_ADDRESS,
    		       OSD_TS_FT_REG_ID, r);
    		goto out;
    	}
    
    	switch (buf) {
    	case OSD_TS_FT_ID_5606:
    		idk_lcd = "osd101t2045";
    		break;
    	case OSD_TS_FT_ID_5x46:
    		idk_lcd = "osd101t2587";
    		break;
    	default:
    		printf("%s: Unidentifed Touch screen ID 0x%02x\n",
    		       __func__, buf);
    		/* we will let default be "no lcd" */
    	}
    out:
    #endif
    	env_set("idk_lcd", idk_lcd);
    
    	/*
    	 * On AM571x_IDK, no Display with J51 set to LCD is considered as an
    	 * invalid configuration and we prevent boot to get user attention.
    	 */
    	if (board_is_am571x_idk() && am571x_idk_needs_lcd() &&
    	    !strncmp(idk_lcd, "no", 2)) {
    		printf("%s: Invalid HW configuration: display not detected/supported but J51 is set. Remove J51 to boot without display.\n",
    		       __func__);
    		hang();
    	}
    
    	return;
    }
    
    #if CONFIG_IS_ENABLED(DM_USB) && CONFIG_IS_ENABLED(OF_CONTROL)
    static int device_okay(const char *path)
    {
    	int node;
    
    	node = fdt_path_offset(gd->fdt_blob, path);
    	if (node < 0)
    		return 0;
    
    	return fdtdec_get_is_enabled(gd->fdt_blob, node);
    }
    #endif
    
    int board_late_init(void)
    {
    	setup_board_eeprom_env();
    	u8 val;
    
    	/*
    	 * DEV_CTRL.DEV_ON = 1 please - else palmas switches off in 8 seconds
    	 * This is the POWERHOLD-in-Low behavior.
    	 */
    	palmas_i2c_write_u8(TPS65903X_CHIP_P1, 0xA0, 0x1);
    
    	/*
    	 * Default FIT boot on HS devices. Non FIT images are not allowed
    	 * on HS devices.
    	 */
    	if (get_device_type() == HS_DEVICE)
    		env_set("boot_fit", "1");
    
    	/*
    	 * Set the GPIO7 Pad to POWERHOLD. This has higher priority
    	 * over DEV_CTRL.DEV_ON bit. This can be reset in case of
    	 * PMIC Power off. So to be on the safer side set it back
    	 * to POWERHOLD mode irrespective of the current state.
    	 */
    	palmas_i2c_read_u8(TPS65903X_CHIP_P1, TPS65903X_PRIMARY_SECONDARY_PAD2,
    			   &val);
    	val = val | TPS65903X_PAD2_POWERHOLD_MASK;
    	palmas_i2c_write_u8(TPS65903X_CHIP_P1, TPS65903X_PRIMARY_SECONDARY_PAD2,
    			    val);
    
    	omap_die_id_serial();
    	omap_set_fastboot_vars();
    
    	am57x_idk_lcd_detect();
    
    #if !defined(CONFIG_SPL_BUILD)
    	board_ti_set_ethaddr(2);
    #endif
    
    #if CONFIG_IS_ENABLED(DM_USB) && CONFIG_IS_ENABLED(OF_CONTROL)
    	if (device_okay("/ocp/omap_dwc3_1@48880000"))
    		enable_usb_clocks(0);
    	if (device_okay("/ocp/omap_dwc3_2@488c0000"))
    		enable_usb_clocks(1);
    #endif
    	return 0;
    }
    
    void set_muxconf_regs(void)
    {
    	do_set_mux32((*ctrl)->control_padconf_core_base,
    		     early_padconf, ARRAY_SIZE(early_padconf));
    }
    
    #ifdef CONFIG_IODELAY_RECALIBRATION
    void recalibrate_iodelay(void)
    {
    	const struct pad_conf_entry *pconf;
    	const struct iodelay_cfg_entry *iod, *delta_iod;
    	int pconf_sz, iod_sz, delta_iod_sz = 0;
    	int ret;
    
    	if (board_is_am572x_idk()) {
    		pconf = core_padconf_array_essential_am571x_idk;
    		pconf_sz = ARRAY_SIZE(core_padconf_array_essential_am571x_idk);
    		iod = iodelay_cfg_array_am571x_idk;
    		iod_sz = ARRAY_SIZE(iodelay_cfg_array_am571x_idk);
    	} else if (board_is_am574x_idk()) {
    		pconf = core_padconf_array_essential_am571x_idk;
    		pconf_sz = ARRAY_SIZE(core_padconf_array_essential_am571x_idk);
    		iod = iodelay_cfg_array_am571x_idk;
    		iod_sz = ARRAY_SIZE(iodelay_cfg_array_am571x_idk);
    	} else if (board_is_am571x_idk()) {
    		pconf = core_padconf_array_essential_am571x_idk;
    		pconf_sz = ARRAY_SIZE(core_padconf_array_essential_am571x_idk);
    		iod = iodelay_cfg_array_am571x_idk;
    		iod_sz = ARRAY_SIZE(iodelay_cfg_array_am571x_idk);
    	} else {
    		pconf = core_padconf_array_essential_am571x_idk;
    		pconf_sz = ARRAY_SIZE(core_padconf_array_essential_am571x_idk);
    		iod = iodelay_cfg_array_am571x_idk;
    		iod_sz = ARRAY_SIZE(iodelay_cfg_array_am571x_idk);
    	}
    
    	/* Setup I/O isolation */
    	ret = __recalibrate_iodelay_start();
    	if (ret)
    		goto err;
    
    	/* Do the muxing here */
    	do_set_mux32((*ctrl)->control_padconf_core_base, pconf, pconf_sz);
    #if 0
    	/* Now do the weird minor deltas that should be safe */
    	if (board_is_x15() || board_is_am572x_evm()) {
    		if (board_is_x15_revb1() || board_is_am572x_evm_reva3() ||
    		    board_is_x15_revc()) {
    			pconf = core_padconf_array_delta_x15_sr2_0;
    			pconf_sz = ARRAY_SIZE(core_padconf_array_delta_x15_sr2_0);
    		} else {
    			pconf = core_padconf_array_delta_x15_sr1_1;
    			pconf_sz = ARRAY_SIZE(core_padconf_array_delta_x15_sr1_1);
    		}
    		do_set_mux32((*ctrl)->control_padconf_core_base, pconf, pconf_sz);
    	}
    
    	if (board_is_am571x_idk()) {
    		if (am571x_idk_needs_lcd()) {
    			pconf = core_padconf_array_vout_am571x_idk;
    			pconf_sz = ARRAY_SIZE(core_padconf_array_vout_am571x_idk);
    			delta_iod = iodelay_cfg_array_am571x_idk_4port;
    			delta_iod_sz = ARRAY_SIZE(iodelay_cfg_array_am571x_idk_4port);
    
    		} else {
    			pconf = core_padconf_array_icss1eth_am571x_idk;
    			pconf_sz = ARRAY_SIZE(core_padconf_array_icss1eth_am571x_idk);
    		}
    		do_set_mux32((*ctrl)->control_padconf_core_base, pconf, pconf_sz);
    	}
    #endif
    
    	/* Setup IOdelay configuration */
    	ret = do_set_iodelay((*ctrl)->iodelay_config_base, iod, iod_sz);
    	if (delta_iod_sz)
    		ret = do_set_iodelay((*ctrl)->iodelay_config_base, delta_iod,
    				     delta_iod_sz);
    
    err:
    	/* Closeup.. remove isolation */
    	__recalibrate_iodelay_end(ret);
    }
    #endif
    
    #if defined(CONFIG_MMC)
    int board_mmc_init(bd_t *bis)
    {
    	omap_mmc_init(0, 0, 0, -1, -1);
    	omap_mmc_init(1, 0, 0, -1, -1);
    	return 0;
    }
    
    static const struct mmc_platform_fixups am57x_es1_1_mmc1_fixups = {
    	.hw_rev = "rev11",
    	.unsupported_caps = MMC_CAP(MMC_HS_200) |
    			    MMC_CAP(UHS_SDR104),
    	.max_freq = 96000000,
    };
    
    static const struct mmc_platform_fixups am57x_es1_1_mmc23_fixups = {
    	.hw_rev = "rev11",
    	.unsupported_caps = MMC_CAP(MMC_HS_200) |
    			    MMC_CAP(UHS_SDR104) |
    			    MMC_CAP(UHS_SDR50),
    	.max_freq = 48000000,
    };
    
    const struct mmc_platform_fixups *platform_fixups_mmc(uint32_t addr)
    {
    	switch (omap_revision()) {
    	case DRA752_ES1_0:
    	case DRA752_ES1_1:
    		if (addr == OMAP_HSMMC1_BASE)
    			return &am57x_es1_1_mmc1_fixups;
    		else
    			return &am57x_es1_1_mmc23_fixups;
    	default:
    		return NULL;
    	}
    }
    #endif
    
    #if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_OS_BOOT)
    int spl_start_uboot(void)
    {
    	/* break into full u-boot on 'c' */
    	if (serial_tstc() && serial_getc() == 'c')
    		return 1;
    
    #ifdef CONFIG_SPL_ENV_SUPPORT
    	env_init();
    	env_load();
    	if (env_get_yesno("boot_os") != 1)
    		return 1;
    #endif
    
    	return 0;
    }
    #endif
    
    #ifdef CONFIG_USB_DWC3
    static struct dwc3_device usb_otg_ss2 = {
    	.maximum_speed = USB_SPEED_HIGH,
    	.base = DRA7_USB_OTG_SS2_BASE,
    	.tx_fifo_resize = false,
    	.index = 1,
    };
    
    static struct dwc3_omap_device usb_otg_ss2_glue = {
    	.base = (void *)DRA7_USB_OTG_SS2_GLUE_BASE,
    	.utmi_mode = DWC3_OMAP_UTMI_MODE_SW,
    	.index = 1,
    };
    
    static struct ti_usb_phy_device usb_phy2_device = {
    	.usb2_phy_power = (void *)DRA7_USB2_PHY2_POWER,
    	.index = 1,
    };
    
    int usb_gadget_handle_interrupts(int index)
    {
    	u32 status;
    
    	status = dwc3_omap_uboot_interrupt_status(index);
    	if (status)
    		dwc3_uboot_handle_interrupt(index);
    
    	return 0;
    }
    #endif /* CONFIG_USB_DWC3 */
    
    #if defined(CONFIG_USB_DWC3) || defined(CONFIG_USB_XHCI_OMAP)
    int board_usb_init(int index, enum usb_init_type init)
    {
    	enable_usb_clocks(index);
    	switch (index) {
    	case 0:
    		if (init == USB_INIT_DEVICE) {
    			printf("port %d can't be used as device\n", index);
    			disable_usb_clocks(index);
    			return -EINVAL;
    		}
    		break;
    	case 1:
    		if (init == USB_INIT_DEVICE) {
    #ifdef CONFIG_USB_DWC3
    			usb_otg_ss2.dr_mode = USB_DR_MODE_PERIPHERAL;
    			usb_otg_ss2_glue.vbus_id_status = OMAP_DWC3_VBUS_VALID;
    			ti_usb_phy_uboot_init(&usb_phy2_device);
    			dwc3_omap_uboot_init(&usb_otg_ss2_glue);
    			dwc3_uboot_init(&usb_otg_ss2);
    #endif
    		} else {
    			printf("port %d can't be used as host\n", index);
    			disable_usb_clocks(index);
    			return -EINVAL;
    		}
    
    		break;
    	default:
    		printf("Invalid Controller Index\n");
    	}
    
    	return 0;
    }
    
    int board_usb_cleanup(int index, enum usb_init_type init)
    {
    #ifdef CONFIG_USB_DWC3
    	switch (index) {
    	case 0:
    	case 1:
    		if (init == USB_INIT_DEVICE) {
    			ti_usb_phy_uboot_exit(index);
    			dwc3_uboot_exit(index);
    			dwc3_omap_uboot_exit(index);
    		}
    		break;
    	default:
    		printf("Invalid Controller Index\n");
    	}
    #endif
    	disable_usb_clocks(index);
    	return 0;
    }
    #endif /* defined(CONFIG_USB_DWC3) || defined(CONFIG_USB_XHCI_OMAP) */
    
    #ifdef CONFIG_DRIVER_TI_CPSW
    
    /* Delay value to add to calibrated value */
    #define RGMII0_TXCTL_DLY_VAL		((0x3 << 5) + 0x8)
    #define RGMII0_TXD0_DLY_VAL		((0x3 << 5) + 0x8)
    #define RGMII0_TXD1_DLY_VAL		((0x3 << 5) + 0x2)
    #define RGMII0_TXD2_DLY_VAL		((0x4 << 5) + 0x0)
    #define RGMII0_TXD3_DLY_VAL		((0x4 << 5) + 0x0)
    #define VIN2A_D13_DLY_VAL		((0x3 << 5) + 0x8)
    #define VIN2A_D17_DLY_VAL		((0x3 << 5) + 0x8)
    #define VIN2A_D16_DLY_VAL		((0x3 << 5) + 0x2)
    #define VIN2A_D15_DLY_VAL		((0x4 << 5) + 0x0)
    #define VIN2A_D14_DLY_VAL		((0x4 << 5) + 0x0)
    
    static void cpsw_control(int enabled)
    {
    	/* VTP can be added here */
    }
    
    static struct cpsw_slave_data cpsw_slaves[] = {
    	{
    		.slave_reg_ofs	= 0x208,
    		.sliver_reg_ofs	= 0xd80,
    		.phy_addr	= 1,
    	},
    	{
    		.slave_reg_ofs	= 0x308,
    		.sliver_reg_ofs	= 0xdc0,
    		.phy_addr	= 2,
    	},
    };
    
    static struct cpsw_platform_data cpsw_data = {
    	.mdio_base		= CPSW_MDIO_BASE,
    	.cpsw_base		= CPSW_BASE,
    	.mdio_div		= 0xff,
    	.channels		= 8,
    	.cpdma_reg_ofs		= 0x800,
    	.slaves			= 1,
    	.slave_data		= cpsw_slaves,
    	.ale_reg_ofs		= 0xd00,
    	.ale_entries		= 1024,
    	.host_port_reg_ofs	= 0x108,
    	.hw_stats_reg_ofs	= 0x900,
    	.bd_ram_ofs		= 0x2000,
    	.mac_control		= (1 << 5),
    	.control		= cpsw_control,
    	.host_port_num		= 0,
    	.version		= CPSW_CTRL_VERSION_2,
    };
    
    static u64 mac_to_u64(u8 mac[6])
    {
    	int i;
    	u64 addr = 0;
    
    	for (i = 0; i < 6; i++) {
    		addr <<= 8;
    		addr |= mac[i];
    	}
    
    	return addr;
    }
    
    static void u64_to_mac(u64 addr, u8 mac[6])
    {
    	mac[5] = addr;
    	mac[4] = addr >> 8;
    	mac[3] = addr >> 16;
    	mac[2] = addr >> 24;
    	mac[1] = addr >> 32;
    	mac[0] = addr >> 40;
    }
    
    int board_eth_init(bd_t *bis)
    {
    	int ret;
    	uint8_t mac_addr[6];
    	uint32_t mac_hi, mac_lo;
    	uint32_t ctrl_val;
    	int i;
    	u64 mac1, mac2;
    	u8 mac_addr1[6], mac_addr2[6];
    	int num_macs;
    
    	/* try reading mac address from efuse */
    	mac_lo = readl((*ctrl)->control_core_mac_id_0_lo);
    	mac_hi = readl((*ctrl)->control_core_mac_id_0_hi);
    	mac_addr[0] = (mac_hi & 0xFF0000) >> 16;
    	mac_addr[1] = (mac_hi & 0xFF00) >> 8;
    	mac_addr[2] = mac_hi & 0xFF;
    	mac_addr[3] = (mac_lo & 0xFF0000) >> 16;
    	mac_addr[4] = (mac_lo & 0xFF00) >> 8;
    	mac_addr[5] = mac_lo & 0xFF;
    
    	if (!env_get("ethaddr")) {
    		printf("<ethaddr> not set. Validating first E-fuse MAC\n");
    
    		if (is_valid_ethaddr(mac_addr))
    			eth_env_set_enetaddr("ethaddr", mac_addr);
    	}
    
    	mac_lo = readl((*ctrl)->control_core_mac_id_1_lo);
    	mac_hi = readl((*ctrl)->control_core_mac_id_1_hi);
    	mac_addr[0] = (mac_hi & 0xFF0000) >> 16;
    	mac_addr[1] = (mac_hi & 0xFF00) >> 8;
    	mac_addr[2] = mac_hi & 0xFF;
    	mac_addr[3] = (mac_lo & 0xFF0000) >> 16;
    	mac_addr[4] = (mac_lo & 0xFF00) >> 8;
    	mac_addr[5] = mac_lo & 0xFF;
    
    	if (!env_get("eth1addr")) {
    		if (is_valid_ethaddr(mac_addr))
    			eth_env_set_enetaddr("eth1addr", mac_addr);
    	}
    
    	ctrl_val = readl((*ctrl)->control_core_control_io1) & (~0x33);
    	ctrl_val |= 0x22;
    	writel(ctrl_val, (*ctrl)->control_core_control_io1);
    		
    
    	cpsw_data.slave_data[0].phy_addr = 0;
    	cpsw_data.slave_data[1].phy_addr = 1;
    #if 0
    	/* The phy address for the AM57xx IDK are different than x15 */
    	if (board_is_am572x_idk() || board_is_am571x_idk() ||
    	    board_is_am574x_idk()) {
    		cpsw_data.slave_data[0].phy_addr = 0;
    		cpsw_data.slave_data[1].phy_addr = 1;
    	}
    #endif
    
    
    	ret = cpsw_register(&cpsw_data);
    	if (ret < 0)
    		printf("Error %d registering CPSW switch\n", ret);
    
    	/*
    	 * Export any Ethernet MAC addresses from EEPROM.
    	 * On AM57xx the 2 MAC addresses define the address range
    	 */
    	board_ti_get_eth_mac_addr(0, mac_addr1);
    	board_ti_get_eth_mac_addr(1, mac_addr2);
    
    	if (is_valid_ethaddr(mac_addr1) && is_valid_ethaddr(mac_addr2)) {
    		mac1 = mac_to_u64(mac_addr1);
    		mac2 = mac_to_u64(mac_addr2);
    
    		/* must contain an address range */
    		num_macs = mac2 - mac1 + 1;
    		/* <= 50 to protect against user programming error */
    		if (num_macs > 0 && num_macs <= 50) {
    			for (i = 0; i < num_macs; i++) {
    				u64_to_mac(mac1 + i, mac_addr);
    				if (is_valid_ethaddr(mac_addr)) {
    					eth_env_set_enetaddr_by_index("eth",
    								      i + 2,
    								      mac_addr);
    				}
    			}
    		}
    	}
    
    	return ret;
    }
    #endif
    
    #ifdef CONFIG_BOARD_EARLY_INIT_F
    /* VTT regulator enable */
    static inline void vtt_regulator_enable(void)
    {
    	if (omap_hw_init_context() == OMAP_INIT_CONTEXT_UBOOT_AFTER_SPL)
    		return;
    
    	gpio_request(GPIO_DDR_VTT_EN, "ddr_vtt_en");
    	gpio_direction_output(GPIO_DDR_VTT_EN, 1);
    }
    
    int board_early_init_f(void)
    {
    	vtt_regulator_enable();
    	return 0;
    }
    #endif
    
    #if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP)
    int ft_board_setup(void *blob, bd_t *bd)
    {
    	ft_cpu_setup(blob, bd);
    
    	return 0;
    }
    #endif
    
    #ifdef CONFIG_SPL_LOAD_FIT
    int board_fit_config_name_match(const char *name)
    {
    	return 0;
    
    	if (board_is_x15()) {
    		if (board_is_x15_revb1()) {
    			if (!strcmp(name, "am57xx-beagle-x15-revb1"))
    				return 0;
    		} else if (board_is_x15_revc()) {
    			if (!strcmp(name, "am57xx-beagle-x15-revc"))
    				return 0;
    		} else if (!strcmp(name, "am57xx-beagle-x15")) {
    			return 0;
    		}
    	} else if (board_is_am572x_evm() &&
    		   !strcmp(name, "am57xx-beagle-x15")) {
    		return 0;
    	} else if (board_is_am572x_idk() && !strcmp(name, "am572x-idk")) {
    		return 0;
    	} else if (board_is_am574x_idk() && !strcmp(name, "am574x-idk")) {
    		return 0;
    	} else if (board_is_am571x_idk() && !strcmp(name, "am571x-idk")) {
    		return 0;
    	}
    
    	return -1;
    }
    #endif
    
    #ifdef CONFIG_TI_SECURE_DEVICE
    void board_fit_image_post_process(void **p_image, size_t *p_size)
    {
    	secure_boot_verify_image(p_image, p_size);
    }
    
    void board_tee_image_process(ulong tee_image, size_t tee_size)
    {
    	secure_tee_install((u32)tee_image);
    }
    
    U_BOOT_FIT_LOADABLE_HANDLER(IH_TYPE_TEE, board_tee_image_process);
    #endif
    

  • Hi Sunmin Kim,

    We tried with the board.c you have given but same issue.

    We checked PC value after connecting through CCS . We are getting PC value as 0X4030 6DXX. Means  PC is there in OCM and that corresponds to downloaded Image.

    Can you please tell the sequence of function call in SPL and u-boot.

    Is it same as mentioned in board.su ?

    Thanks and regards

    Arpita Jena

  • Hi, Arpita Jena

    1. board.su (u-boot)

    board.c:995:13:cpsw_control	0	static
    board.c:99:6:emif_get_dmm_regs	8	static
    board.c:289:6:emif_get_reg_dump	8	static
    board.c:309:6:emif_get_ext_phy_ctrl_const_regs	0	static
    board.c:467:5:get_voltrail_opp	0	static
    board.c:500:6:do_board_detect	8	static
    board.c:578:6:vcores_init	0	static
    board.c:592:6:hw_data_init	0	static
    board.c:604:6:am571x_idk_needs_lcd	8	static
    board.c:619:5:board_init	8	static
    board.c:627:6:am57x_idk_lcd_detect	24	static
    board.c:708:5:board_late_init	24	static
    board.c:756:6:set_muxconf_regs	0	static
    board.c:763:6:recalibrate_iodelay	8	static
    board.c:839:5:board_mmc_init	16	static
    board.c:861:35:platform_fixups_mmc	0	static
    board.c:877:5:spl_start_uboot	8	static
    board.c:913:5:usb_gadget_handle_interrupts	8	static
    board.c:926:5:board_usb_init	16	static
    board.c:960:5:board_usb_cleanup	8	static
    board.c:1055:5:board_eth_init	56	static
    board.c:1153:5:board_early_init_f	8	static
    board.c:1161:5:ft_board_setup	8	static
    board.c:1170:5:board_fit_config_name_match	8	static
    

    2. board.su (SPL)

    board.c:995:13:cpsw_control	0	static
    board.c:99:6:emif_get_dmm_regs	8	static
    board.c:289:6:emif_get_reg_dump	8	static
    board.c:309:6:emif_get_ext_phy_ctrl_const_regs	0	static
    board.c:467:5:get_voltrail_opp	0	static
    board.c:500:6:do_board_detect	8	static
    board.c:578:6:vcores_init	0	static
    board.c:592:6:hw_data_init	0	static
    board.c:604:6:am571x_idk_needs_lcd	8	static
    board.c:619:5:board_init	8	static
    board.c:627:6:am57x_idk_lcd_detect	24	static
    board.c:708:5:board_late_init	24	static
    board.c:756:6:set_muxconf_regs	0	static
    board.c:763:6:recalibrate_iodelay	8	static
    board.c:839:5:board_mmc_init	16	static
    board.c:861:35:platform_fixups_mmc	0	static
    board.c:877:5:spl_start_uboot	8	static
    board.c:913:5:usb_gadget_handle_interrupts	8	static
    board.c:926:5:board_usb_init	16	static
    board.c:960:5:board_usb_cleanup	8	static
    board.c:1055:5:board_eth_init	56	static
    board.c:1153:5:board_early_init_f	8	static
    board.c:1161:5:ft_board_setup	8	static
    board.c:1170:5:board_fit_config_name_match	8	static
    

  • Hi Sunmin Kim,

    Can you please check if both the files you have shared are same (for spl and u-boot) ?

    I am still facing the same issue.

    Here  am attaching the board.su for both u-boot and spl.

    1.u-boot : board.su

    board.c:1022:13:cpsw_control	0	static
    board.c:709:12:device_okay	8	static
    board.c:99:6:emif_get_dmm_regs	0	static
    board.c:292:6:emif_get_reg_dump	0	static
    board.c:315:6:emif_get_ext_phy_ctrl_const_regs	0	static
    board.c:473:5:get_voltrail_opp	0	static
    board.c:522:6:do_board_detect	16	static
    board.c:591:6:vcores_init	0	static
    board.c:604:6:hw_data_init	0	static
    board.c:616:6:am571x_idk_needs_lcd	8	static
    board.c:631:5:board_init	8	static
    board.c:639:6:am57x_idk_lcd_detect	8	static
    board.c:721:5:board_late_init	24	static
    board.c:769:6:set_muxconf_regs	0	static
    board.c:776:6:recalibrate_iodelay	16	static
    board.c:855:5:board_mmc_init	24	static
    board.c:880:35:platform_fixups_mmc	8	static
    board.c:940:5:usb_gadget_handle_interrupts	8	static
    board.c:953:5:board_usb_init	16	static
    board.c:987:5:board_usb_cleanup	8	static
    board.c:1082:5:board_eth_init	64	static
    board.c:1186:5:board_early_init_f	8	static
    board.c:1194:5:ft_board_setup	8	static
    board.c:1203:5:board_fit_config_name_match	0	static
    

    2.spl : board.su

    board.c:1022:13:cpsw_control	0	static
    board.c:99:6:emif_get_dmm_regs	0	static
    board.c:292:6:emif_get_reg_dump	0	static
    board.c:315:6:emif_get_ext_phy_ctrl_const_regs	0	static
    board.c:473:5:get_voltrail_opp	0	static
    board.c:506:6:do_board_detect	8	static
    board.c:591:6:vcores_init	0	static
    board.c:604:6:hw_data_init	0	static
    board.c:616:6:am571x_idk_needs_lcd	8	static
    board.c:631:5:board_init	8	static
    board.c:639:6:am57x_idk_lcd_detect	8	static
    board.c:721:5:board_late_init	24	static
    board.c:769:6:set_muxconf_regs	0	static
    board.c:776:6:recalibrate_iodelay	16	static
    board.c:855:5:board_mmc_init	24	static
    board.c:880:35:platform_fixups_mmc	8	static
    board.c:904:5:spl_start_uboot	8	static
    board.c:940:5:usb_gadget_handle_interrupts	8	static
    board.c:953:5:board_usb_init	16	static
    board.c:987:5:board_usb_cleanup	8	static
    board.c:1082:5:board_eth_init	64	static
    board.c:1186:5:board_early_init_f	8	static
    board.c:1194:5:ft_board_setup	8	static
    board.c:1203:5:board_fit_config_name_match	0	static
    

    Thanks and Regards

    Arpita Jena

  • Hi, Arpita Jena

    I do not know how to compare it.

    It would be more efficient to ask a better professional.

    I'm sorry I can not help you.

  • Hi, Sunmin Kim

    Thank You for your help.

    Thanks and Regards

    Arpita Jena