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.

pinmux and device tree questions (DRA726)

Other Parts Discussed in Thread: DRA726

I am trying to figure out how to modify the device tree for our new design.

I thought that pinmux was part of the answer but I don't see how the files generated fit into u-boot or the linux kernel.


How does that work and do you have a pinmux that supports the DRA726?


Right now I am using the am572xx evaluation board until I get our hardware. Is there a pinmux file I could use to start with that has all the current settings used in the SDK?

I found something odd, what it means is not obvious to me.

In a conf file I get this when I pick two can ports that I can use on the evaluation board. Here is for CAN1

0x4A0037D4    0x50000    G19    CTRL_CORE_PAD_DCAN1_RX    dcan1_rx    dcan1_rx
0x4A0037D0    0x10000    G20    CTRL_CORE_PAD_DCAN1_TX    dcan1_tx    dcan1_tx

In the u-boot file dra72-evm-common.dtsi I see this for CAN1

The rx pin we connect to is not listed but that what is there does reflect the first entry in the Cortex M4 code         

    dcan1_pins_default: dcan1_pins_default {
                pinctrl-single,pins = <
                        0x3d0   (PIN_OUTPUT_PULLUP | MUX_MODE0) /* dcan1_tx */
                        0x418   (PULL_UP | MUX_MODE1)   /* wakeup0.dcan1_rx */
                >;
        };

        dcan1_pins_sleep: dcan1_pins_sleep {
                pinctrl-single,pins = <
                        0x3d0   (MUX_MODE15 | PULL_UP)  /* dcan1_tx.off */
                        0x418   (MUX_MODE15 | PULL_UP)  /* wakeup0.off */
                >;
        };

In order to get the can to work on the cortex M4 we enter this according to Brad. Why do we have to

            /* Wake-up dcan1_rx */
            u32RegVal = HW_RD_REG32(CSL_IPU_CORE_PAD_IO_REGISTERS_REGS + 0x20000418U);
            u32RegVal &= ~0x0000000F;
            u32RegVal |= 0x0000000F;
            HW_WR_REG32(CSL_IPU_CORE_PAD_IO_REGISTERS_REGS + 0x20000418U, u32RegVal);
            /* Select default/gpio function instead of dcantx in the CORE PAD */
            u32RegVal = HW_RD_REG32(CSL_IPU_CORE_PAD_IO_REGISTERS_REGS + 0x200003D0U);
            u32RegVal &= ~0x0000000F;
            u32RegVal |= 0x0000000F;
            HW_WR_REG32(CSL_IPU_CORE_PAD_IO_REGISTERS_REGS + 0x200003D0U, u32RegVal);
            /* Select default/gpio function instead of dcantx in the CORE PAD */
            u32RegVal = HW_RD_REG32(CSL_IPU_CORE_PAD_IO_REGISTERS_REGS + 0x200003D4U);
            u32RegVal &= ~0x0000000F;
            u32RegVal |= 0x0000000F;
            HW_WR_REG32(CSL_IPU_CORE_PAD_IO_REGISTERS_REGS + 0x200003D4U, u32RegVal);

The CAN code does work. Does that mean that u-boot pinmux is meaningless?

Why is the wakeup pin enabled instead of the actual pin for CAN 1 receive?

  • Michel Catudal said:
    I thought that pinmux was part of the answer but I don't see how the files generated fit into u-boot or the linux kernel.

    Michel,

    The format you provided is generated from either Pinmux tool (PMT for AM57xx device) or Pad Config Tool (PCT for DRA7xx devices). It is essentially a "generic file format" which then goes through a script to generate the final device tree file. The export format from tool is designed as generic so it fits aspects of various other teams as well (not just u-boot format). 

    For DRA72x I suggest contact your TI representative to get PCT downloaded (NDA only for now).

    For AM572x EVM attached .pinmux files. Let me know if you other revision. Attaching revision A3 AM572 GP EVM Rev A3 PG2.0 Pinmux files (tool ver 4.0.1257).zip

    Now as to why rx pin is overwritten in device tree I can't tell. I know that in some spots the tree was manually tweaked to work. We may have to loop u-boot experts to comment here or check with Brad.

    Thanks

    Alex

  • Alex,

    Thank you. The evaluation modules that we have all have the Rev A3 of the board.
    Do I need to change the device tree in u-boot to get the 2nd CAN channel to work when Linux is running?
    The can ports run out the Cortex M4. If so that would mean I have to have a similar hack as for DCAN1.

    As for the Pad Config Tool I will check to see if I already have it. I think that I may already have that program, a few months ago we got a lot of information on the devices as we were trying to decide if it would be a good move to use TI instead of Freescale. I will still check with Viktorija to see if I have the latest. We do have an NDA with TI.

    Michel
  • Hi Michel,

    U-boot selects dcan1_rx to be on ball wakeup0, set to mux mode=1:

    There is other dedicated ball (mux mode = 0) for dcan1_rx:

    EVM has dcan1 RX on the second option. You should change .dtsi file to match the second option. Refer to Data Manual and pad conf registers in TRM for details.

    Regards,

    Stan

  • Michel,

    Yes try that hack for the 2nd CAN, should work.

    If you have NDA with TI you may ping me via email for the latest PCT version(for DRA72x is v1.3.0.8) or find it on your respective NDA sharepoint.

    Thanks,
    Alex
  • I loaded the pinmux file and get a few warnings.

    HDMI > HDMI > ddc_sda >Voltage conflict
    vddshv3 is set to 3.3

    HDMI > HDMI > ddc_scl >Voltage conflict
    vddshv3 is set to 3.3

    HDMI > HDMI > cec >Voltage conflict
    vddshv3 is set to 3.3


    USB > USB1 (3.0 HUB) > drvvbus >Voltage conflict
    vddshv6 is set to 3.3

    USB > USB1 (3.0 HUB) > dp >Voltage conflict
    vdda33v_usb1 is set to 3.3

    USB > USB1 (3.0 HUB) > dm >Voltage conflict
    vdda33v_usb1 is set to 3.3


    Michel
  • Michel,

    This is a known issue, see  and here  

    Thanks,

    Alex

  • Michel Catudal said:

    In order to get the can to work on the cortex M4 we enter this according to Brad. Why do we have to

                /* Wake-up dcan1_rx */
                u32RegVal = HW_RD_REG32(CSL_IPU_CORE_PAD_IO_REGISTERS_REGS + 0x20000418U);
                u32RegVal &= ~0x0000000F;
                u32RegVal |= 0x0000000F;
                HW_WR_REG32(CSL_IPU_CORE_PAD_IO_REGISTERS_REGS + 0x20000418U, u32RegVal);
                /* Select default/gpio function instead of dcantx in the CORE PAD */
                u32RegVal = HW_RD_REG32(CSL_IPU_CORE_PAD_IO_REGISTERS_REGS + 0x200003D0U);
                u32RegVal &= ~0x0000000F;
                u32RegVal |= 0x0000000F;
                HW_WR_REG32(CSL_IPU_CORE_PAD_IO_REGISTERS_REGS + 0x200003D0U, u32RegVal);
                /* Select default/gpio function instead of dcantx in the CORE PAD */
                u32RegVal = HW_RD_REG32(CSL_IPU_CORE_PAD_IO_REGISTERS_REGS + 0x200003D4U);
                u32RegVal &= ~0x0000000F;
                u32RegVal |= 0x0000000F;
                HW_WR_REG32(CSL_IPU_CORE_PAD_IO_REGISTERS_REGS + 0x200003D4U, u32RegVal);

    Michel,

    I received some feedback on your original question. That configuration is a Dcan work around for stuck in transition.

    Hope it helps,

    Alex

  • Please see erratum i893 "DCAN Initialization Sequence" for further info on the special requirements pertaining to pin muxing with DCAN.

    Also, the script Alex mentioned earlier is part of the following app note:

    AM57xx Sitara™ IO Configuration Requirements
    http://www.ti.com/lit/sprac44

    Note that it specifically outputs data that can be leveraged by u-boot. Due to some of the requirements for configuring manual I/O modes (e.g. like pin isolation and executing from internal RAM), you must configure peripherals requiring manual I/O modes in u-boot.
  • Brad & Alex,

    Thanks for the info. My DCAN1 RX is not muxed with WAKEUP0. I do not want any wake up on DCAN1 or DCAN2. My wake ups will be on the 3 external Microchip devices connected to SPI ports in the final design. For the 12inch LCD for the demo with the beagleboard that came with the EVM I will not have those 3 devices connected, wake up on CAN is not required for that demo.


    During our POC we had a couple of small boards for the CAN drivers and DB9 connectors with proper wires connected to DCAN1 rx and DCAN1 tx as shown on the schematic, we never connected anything to WAKEUP0.

    I am trying to understand why the code that I inherited makes any mention of WAKEUP0, it is not connected at all. That code was written following suggestion from TI. Are those pins shorted internally or is it just a goof in the code? To me it doesn't make any sense to try to access WAKEUP0 since the DCAN1 rx pin we are using is not AD17 but G19.

    The errata document says this :

    with WAKEUP0:

    CTRL_CORE_PAD_WAKEUP0.MUXMODE

                  = 0xF

    Our connected pins.

    DCAN1 ==> RX G19 TX G20

    DCAN2 ==> RX F20 TX E21

    That bug that you mentioned, is it also present on the DRA726?

    Michel

  • Michel Catudal said:
    I am trying to understand why the code that I inherited makes any mention of WAKEUP0, it is not connected at all. That code was written following suggestion from TI. Are those pins shorted internally or is it just a goof in the code? To me it doesn't make any sense to try to access WAKEUP0 since the DCAN1 rx pin we are using is not AD17 but G19.

    Correct.  It's not necessary to touch the wakeup0 pin at all.

    Michel Catudal said:
    That bug that you mentioned, is it also present on the DRA726?

    Yes.  Please see the DRA72x Errata.

  • Brad,

    Thanks for the quick feedback.

    A few more comments and questions

    I modified the pinmux file to include my GPIOs and DCAN2 as well as remove some unused items that were conflicting with my choices.

    We are replacing TI's LCD with our own custom 12 inch LCD board on the beagleboard x15 that comes with the TI EVM572x.

    The pinmux program generates some iodelay. As I look into the board u-boot file mentioned in the document I cannot see any mention of the VOUT1 stuff. Do I need to add those to my u-boot board configuration. TI must have had a reason not to include those.

    Here a part of the code I generated with the perl script that I took out of the pdf document.

    {0x0B9C, 1067, 829},    /* CFG_VOUT1_CLK_OUT */
    {0x0BA8, 391, 0},       /* CFG_VOUT1_D0_OUT */
    {0x0BB4, 278, 0},       /* CFG_VOUT1_D10_OUT */
    {0x0BC0, 345, 0},       /* CFG_VOUT1_D11_OUT */
    {0x0BCC, 1236, 0},      /* CFG_VOUT1_D12_OUT */
    {0x0BD8, 178, 0},       /* CFG_VOUT1_D13_OUT */
    {0x0BE4, 308, 0},       /* CFG_VOUT1_D14_OUT */
    {0x0BF0, 281, 0},       /* CFG_VOUT1_D15_OUT */
    {0x0BFC, 0, 162},       /* CFG_VOUT1_D16_OUT */
    {0x0C08, 274, 0},       /* CFG_VOUT1_D17_OUT */
    {0x0C14, 421, 0},       /* CFG_VOUT1_D18_OUT */
    {0x0C20, 512, 0},       /* CFG_VOUT1_D19_OUT */
    {0x0C2C, 517, 0},       /* CFG_VOUT1_D1_OUT */
    {0x0C38, 383, 0},       /* CFG_VOUT1_D20_OUT */
    {0x0C44, 107, 0},       /* CFG_VOUT1_D21_OUT */
    {0x0C50, 223, 0},       /* CFG_VOUT1_D22_OUT */
    {0x0C5C, 0, 0}, /* CFG_VOUT1_D23_OUT */
    {0x0C68, 279, 0},       /* CFG_VOUT1_D2_OUT */  
    {0x0C74, 434, 0},       /* CFG_VOUT1_D3_OUT */  
    {0x0C80, 1294, 0},      /* CFG_VOUT1_D4_OUT */  
    {0x0C8C, 393, 0},       /* CFG_VOUT1_D5_OUT */  
    {0x0C98, 317, 0},       /* CFG_VOUT1_D6_OUT */  
    {0x0CA4, 135, 325},     /* CFG_VOUT1_D7_OUT */    
    {0x0CB0, 208, 0},       /* CFG_VOUT1_D8_OUT */   
    {0x0CBC, 462, 0},       /* CFG_VOUT1_D9_OUT */
    {0x0CC8, 0, 0}, /* CFG_VOUT1_DE_OUT */
    {0x0CE0, 0, 0}, /* CFG_VOUT1_HSYNC_OUT */
    {0x0CEC, 118, 701},     /* CFG_VOUT1_VSYNC_OUT */

    I do get tons of errors when I run the script, are those valid or caused by a bug in the perl script or pinmux program?


    michel@michel:~/Documents/pinmux$ ./gen_pin_config.pl -p genericFileFormatPadConf.txt -d genericFileFormatIOdelay.txt -o iopad >padconf.h
    splice() offset past end of array at ./gen_pin_config.pl line 116, <$fh> line 2.
    Use of uninitialized value $register in hash element at ./gen_pin_config.pl line 119, <$fh> line 2.
    splice() offset past end of array at ./gen_pin_config.pl line 116, <$fh> line 3.
    Use of uninitialized value $register in hash element at ./gen_pin_config.pl line 119, <$fh> line 3.
    splice() offset past end of array at ./gen_pin_config.pl line 116, <$fh> line 5.
    Use of uninitialized value $register in hash element at ./gen_pin_config.pl line 119, <$fh> line 5.
    splice() offset past end of array at ./gen_pin_config.pl line 116, <$fh> line 2.
    Use of uninitialized value $register in hash element at ./gen_pin_config.pl line 123, <$fh> line 2.
    splice() offset past end of array at ./gen_pin_config.pl line 116, <$fh> line 3.
    Use of uninitialized value $register in hash element at ./gen_pin_config.pl line 123, <$fh> line 3.
    splice() offset past end of array at ./gen_pin_config.pl line 116, <$fh> line 5.
    Use of uninitialized value $register in hash element at ./gen_pin_config.pl line 123, <$fh> line 5.
    Use of uninitialized value $reg_val in hex at ./gen_pin_config.pl line 174.
    Use of uninitialized value $reg_name in substr at ./gen_pin_config.pl line 267.
    substr outside of string at ./gen_pin_config.pl line 267.
    Use of uninitialized value $val_mux0_name in concatenation (.) or string at ./gen_pin_config.pl line 268.
    Use of uninitialized value $mux0 in concatenation (.) or string at ./gen_pin_config.pl line 281.
    Use of uninitialized value $mux in concatenation (.) or string at ./gen_pin_config.pl line 281.
    Use of uninitialized value $iod_ball in regexp compilation at ./gen_pin_config.pl line 249.
    Use of uninitialized value $iod_a_delay in pattern match (m//) at ./gen_pin_config.pl line 253.
    Use of uninitialized value $iod_ball in regexp compilation at ./gen_pin_config.pl line 249.
    Use of uninitialized value $iod_a_delay in pattern match (m//) at ./gen_pin_config.pl line 253.
    Use of uninitialized value $iod_ball in regexp compilation at ./gen_pin_config.pl line 249.
    Use of uninitialized value $iod_a_delay in pattern match (m//) at ./gen_pin_config.pl line 253.
    Use of uninitialized value $iod_ball in regexp compilation at ./gen_pin_config.pl line 249.
    Use of uninitialized value $iod_a_delay in pattern match (m//) at ./gen_pin_config.pl line 253.
    Use of uninitialized value $iod_ball in regexp compilation at ./gen_pin_config.pl line 249.
    Use of uninitialized value $iod_a_delay in pattern match (m//) at ./gen_pin_config.pl line 253.
    Use of uninitialized value $iod_ball in regexp compilation at ./gen_pin_config.pl line 249.
    Use of uninitialized value $iod_a_delay in pattern match (m//) at ./gen_pin_config.pl line 253.
    Use of uninitialized value $iod_ball in regexp compilation at ./gen_pin_config.pl line 249.
    Use of uninitialized value $iod_a_delay in pattern match (m//) at ./gen_pin_config.pl line 253.
    Use of uninitialized value $iod_ball in regexp compilation at ./gen_pin_config.pl line 249.
    Use of uninitialized value $iod_a_delay in pattern match (m//) at ./gen_pin_config.pl line 253.
    Use of uninitialized value $iod_ball in regexp compilation at ./gen_pin_config.pl line 249.
    Use of uninitialized value $iod_a_delay in pattern match (m//) at ./gen_pin_config.pl line 253.
    Use of uninitialized value $iod_ball in regexp compilation at ./gen_pin_config.pl line 249.
    Use of uninitialized value $iod_a_delay in pattern match (m//) at ./gen_pin_config.pl line 253.
    Use of uninitialized value $iod_ball in regexp compilation at ./gen_pin_config.pl line 249.
    Use of uninitialized value $iod_a_delay in pattern match (m//) at ./gen_pin_config.pl line 253.
    Use of uninitialized value $iod_ball in regexp compilation at ./gen_pin_config.pl line 249.
    Use of uninitialized value $iod_a_delay in pattern match (m//) at ./gen_pin_config.pl line 253.
    Use of uninitialized value $iod_ball in regexp compilation at ./gen_pin_config.pl line 249.
    Use of uninitialized value $iod_a_delay in pattern match (m//) at ./gen_pin_config.pl line 253.
    Use of uninitialized value $iod_ball in regexp compilation at ./gen_pin_config.pl line 249.
    Use of uninitialized value $iod_a_delay in pattern match (m//) at ./gen_pin_config.pl line 253.
    Use of uninitialized value $iod_ball in regexp compilation at ./gen_pin_config.pl line 249.
    Use of uninitialized value $iod_a_delay in pattern match (m//) at ./gen_pin_config.pl line 253.
    Use of uninitialized value $iod_ball in regexp compilation at ./gen_pin_config.pl line 249.
    Use of uninitialized value $iod_a_delay in pattern match (m//) at ./gen_pin_config.pl line 253.
    Use of uninitialized value $iod_ball in regexp compilation at ./gen_pin_config.pl line 249.
    Use of uninitialized value $iod_a_delay in pattern match (m//) at ./gen_pin_config.pl line 253.
    Use of uninitialized value $iod_ball in regexp compilation at ./gen_pin_config.pl line 249.
    Use of uninitialized value $iod_a_delay in pattern match (m//) at ./gen_pin_config.pl line 253.
    Use of uninitialized value $iod_ball in regexp compilation at ./gen_pin_config.pl line 249.
    Use of uninitialized value $iod_a_delay in pattern match (m//) at ./gen_pin_config.pl line 253.
    Use of uninitialized value $iod_ball in regexp compilation at ./gen_pin_config.pl line 249.
    Use of uninitialized value $iod_a_delay in pattern match (m//) at ./gen_pin_config.pl line 253.
    Use of uninitialized value $iod_ball in regexp compilation at ./gen_pin_config.pl line 249.
    Use of uninitialized value $iod_a_delay in pattern match (m//) at ./gen_pin_config.pl line 253.
    Use of uninitialized value $iod_ball in regexp compilation at ./gen_pin_config.pl line 249.
    Use of uninitialized value $iod_a_delay in pattern match (m//) at ./gen_pin_config.pl line 253.
    Use of uninitialized value $iod_ball in regexp compilation at ./gen_pin_config.pl line 249.
    Use of uninitialized value $iod_a_delay in pattern match (m//) at ./gen_pin_config.pl line 253.
    Use of uninitialized value $iod_ball in regexp compilation at ./gen_pin_config.pl line 249.
    Use of uninitialized value $iod_a_delay in pattern match (m//) at ./gen_pin_config.pl line 253.
    Use of uninitialized value $iod_ball in regexp compilation at ./gen_pin_config.pl line 249.
    Use of uninitialized value $iod_a_delay in pattern match (m//) at ./gen_pin_config.pl line 253.
    Use of uninitialized value $iod_ball in regexp compilation at ./gen_pin_config.pl line 249.
    Use of uninitialized value $iod_a_delay in pattern match (m//) at ./gen_pin_config.pl line 253.
    Use of uninitialized value $iod_ball in regexp compilation at ./gen_pin_config.pl line 249.
    Use of uninitialized value $iod_a_delay in pattern match (m//) at ./gen_pin_config.pl line 253.
    Use of uninitialized value $iod_ball in regexp compilation at ./gen_pin_config.pl line 249.
    Use of uninitialized value $iod_a_delay in pattern match (m//) at ./gen_pin_config.pl line 253.
    Use of uninitialized value $iod_ball in regexp compilation at ./gen_pin_config.pl line 249.
    Use of uninitialized value $iod_a_delay in pattern match (m//) at ./gen_pin_config.pl line 253.
    Use of uninitialized value $iod_ball in regexp compilation at ./gen_pin_config.pl line 249.
    Use of uninitialized value $iod_a_delay in pattern match (m//) at ./gen_pin_config.pl line 253.
    Use of uninitialized value $iod_ball in regexp compilation at ./gen_pin_config.pl line 249.
    Use of uninitialized value $iod_a_delay in pattern match (m//) at ./gen_pin_config.pl line 253.
    Use of uninitialized value $iod_ball in regexp compilation at ./gen_pin_config.pl line 249.
    Use of uninitialized value $iod_a_delay in pattern match (m//) at ./gen_pin_config.pl line 253.
    Use of uninitialized value $iod_ball in regexp compilation at ./gen_pin_config.pl line 249.
    Use of uninitialized value $iod_a_delay in pattern match (m//) at ./gen_pin_config.pl line 253.
    Use of uninitialized value $iod_ball in regexp compilation at ./gen_pin_config.pl line 249.
    Use of uninitialized value $iod_a_delay in pattern match (m//) at ./gen_pin_config.pl line 253.
    Use of uninitialized value $iod_ball in regexp compilation at ./gen_pin_config.pl line 249.
    Use of uninitialized value $iod_a_delay in pattern match (m//) at ./gen_pin_config.pl line 253.
    Use of uninitialized value $iod_ball in regexp compilation at ./gen_pin_config.pl line 249.
    Use of uninitialized value $iod_a_delay in pattern match (m//) at ./gen_pin_config.pl line 253.
    Use of uninitialized value $iod_ball in regexp compilation at ./gen_pin_config.pl line 249.
    Use of uninitialized value $iod_a_delay in pattern match (m//) at ./gen_pin_config.pl line 253.
    Use of uninitialized value $iod_ball in regexp compilation at ./gen_pin_config.pl line 249.
    Use of uninitialized value $iod_a_delay in pattern match (m//) at ./gen_pin_config.pl line 253.
    Use of uninitialized value $iod_ball in regexp compilation at ./gen_pin_config.pl line 249.
    Use of uninitialized value $iod_a_delay in pattern match (m//) at ./gen_pin_config.pl line 253.
    Use of uninitialized value $iod_ball in regexp compilation at ./gen_pin_config.pl line 249.
    Use of uninitialized value $iod_a_delay in pattern match (m//) at ./gen_pin_config.pl line 253.
    Use of uninitialized value $iod_ball in regexp compilation at ./gen_pin_config.pl line 249.
    Use of uninitialized value $iod_a_delay in pattern match (m//) at ./gen_pin_config.pl line 253.
    Use of uninitialized value $iod_ball in regexp compilation at ./gen_pin_config.pl line 249.
    Use of uninitialized value $iod_a_delay in pattern match (m//) at ./gen_pin_config.pl line 253.
    Use of uninitialized value $iod_ball in regexp compilation at ./gen_pin_config.pl line 249.
    Use of uninitialized value $iod_a_delay in pattern match (m//) at ./gen_pin_config.pl line 253.
    Use of uninitialized value $iod_ball in regexp compilation at ./gen_pin_config.pl line 249.
    Use of uninitialized value $iod_a_delay in pattern match (m//) at ./gen_pin_config.pl line 253.
    Use of uninitialized value $iod_ball in regexp compilation at ./gen_pin_config.pl line 249.
    Use of uninitialized value $iod_a_delay in pattern match (m//) at ./gen_pin_config.pl line 253.
    Use of uninitialized value $iod_ball in regexp compilation at ./gen_pin_config.pl line 249.
    Use of uninitialized value $iod_a_delay in pattern match (m//) at ./gen_pin_config.pl line 253.
    Use of uninitialized value $iod_ball in regexp compilation at ./gen_pin_config.pl line 249.
    Use of uninitialized value $iod_a_delay in pattern match (m//) at ./gen_pin_config.pl line 253.
    Use of uninitialized value $iod_ball in regexp compilation at ./gen_pin_config.pl line 249.
    Use of uninitialized value $iod_a_delay in pattern match (m//) at ./gen_pin_config.pl line 253.
    Use of uninitialized value $iod_ball in regexp compilation at ./gen_pin_config.pl line 249.
    Use of uninitialized value $iod_a_delay in pattern match (m//) at ./gen_pin_config.pl line 253.
    Use of uninitialized value $iod_ball in regexp compilation at ./gen_pin_config.pl line 249.
    Use of uninitialized value $iod_a_delay in pattern match (m//) at ./gen_pin_config.pl line 253.
    Use of uninitialized value $iod_ball in regexp compilation at ./gen_pin_config.pl line 249.
    Use of uninitialized value $iod_a_delay in pattern match (m//) at ./gen_pin_config.pl line 253.
    Use of uninitialized value $iod_ball in regexp compilation at ./gen_pin_config.pl line 249.
    Use of uninitialized value $iod_a_delay in pattern match (m//) at ./gen_pin_config.pl line 253.
    Use of uninitialized value $iod_ball in regexp compilation at ./gen_pin_config.pl line 249.
    Use of uninitialized value $iod_a_delay in pattern match (m//) at ./gen_pin_config.pl line 253.
    Use of uninitialized value $iod_ball in regexp compilation at ./gen_pin_config.pl line 249.
    Use of uninitialized value $iod_a_delay in pattern match (m//) at ./gen_pin_config.pl line 253.
    Use of uninitialized value $iod_ball in regexp compilation at ./gen_pin_config.pl line 249.
    Use of uninitialized value $iod_a_delay in pattern match (m//) at ./gen_pin_config.pl line 253.
    Use of uninitialized value $iod_ball in regexp compilation at ./gen_pin_config.pl line 249.
    Use of uninitialized value $iod_a_delay in pattern match (m//) at ./gen_pin_config.pl line 253.
    Use of uninitialized value $iod_ball in regexp compilation at ./gen_pin_config.pl line 249.
    Use of uninitialized value $iod_a_delay in pattern match (m//) at ./gen_pin_config.pl line 253.
    Use of uninitialized value $iod_ball in regexp compilation at ./gen_pin_config.pl line 249.
    Use of uninitialized value $iod_a_delay in pattern match (m//) at ./gen_pin_config.pl line 253.
    Use of uninitialized value $iod_ball in regexp compilation at ./gen_pin_config.pl line 249.
    Use of uninitialized value $iod_a_delay in pattern match (m//) at ./gen_pin_config.pl line 253.
    Use of uninitialized value $iod_ball in regexp compilation at ./gen_pin_config.pl line 249.
    Use of uninitialized value $iod_a_delay in pattern match (m//) at ./gen_pin_config.pl line 253.
    Use of uninitialized value $iod_ball in regexp compilation at ./gen_pin_config.pl line 249.
    Use of uninitialized value $iod_a_delay in pattern match (m//) at ./gen_pin_config.pl line 253.
    Use of uninitialized value $iod_ball in regexp compilation at ./gen_pin_config.pl line 249.
    Use of uninitialized value $iod_a_delay in pattern match (m//) at ./gen_pin_config.pl line 253.
    Use of uninitialized value $iod_ball in regexp compilation at ./gen_pin_config.pl line 249.
    Use of uninitialized value $iod_a_delay in pattern match (m//) at ./gen_pin_config.pl line 253.
    Use of uninitialized value $iod_ball in regexp compilation at ./gen_pin_config.pl line 249.
    Use of uninitialized value $iod_a_delay in pattern match (m//) at ./gen_pin_config.pl line 253.
    Use of uninitialized value $iod_ball in regexp compilation at ./gen_pin_config.pl line 249.
    Use of uninitialized value $iod_a_delay in pattern match (m//) at ./gen_pin_config.pl line 253.
    Use of uninitialized value $iod_ball in regexp compilation at ./gen_pin_config.pl line 249.
    Use of uninitialized value $iod_a_delay in pattern match (m//) at ./gen_pin_config.pl line 253.
    Use of uninitialized value $iod_ball in regexp compilation at ./gen_pin_config.pl line 249.
    Use of uninitialized value $iod_a_delay in pattern match (m//) at ./gen_pin_config.pl line 253.
    Use of uninitialized value $iod_ball in regexp compilation at ./gen_pin_config.pl line 249.
    Use of uninitialized value $iod_a_delay in pattern match (m//) at ./gen_pin_config.pl line 253.
    Use of uninitialized value $iod_ball in regexp compilation at ./gen_pin_config.pl line 249.
    Use of uninitialized value $iod_a_delay in pattern match (m//) at ./gen_pin_config.pl line 253.
    Use of uninitialized value $iod_ball in regexp compilation at ./gen_pin_config.pl line 249.
    Use of uninitialized value $iod_a_delay in pattern match (m//) at ./gen_pin_config.pl line 253.
    Use of uninitialized value $iod_ball in regexp compilation at ./gen_pin_config.pl line 249.
    Use of uninitialized value $iod_a_delay in pattern match (m//) at ./gen_pin_config.pl line 253.
    Use of uninitialized value $iod_ball in regexp compilation at ./gen_pin_config.pl line 249.
    Use of uninitialized value $iod_a_delay in pattern match (m//) at ./gen_pin_config.pl line 253.
    Use of uninitialized value $iod_ball in regexp compilation at ./gen_pin_config.pl line 249.
    Use of uninitialized value $iod_a_delay in pattern match (m//) at ./gen_pin_config.pl line 253.
    Use of uninitialized value $iod_ball in regexp compilation at ./gen_pin_config.pl line 249.
    Use of uninitialized value $iod_a_delay in pattern match (m//) at ./gen_pin_config.pl line 253.
    Use of uninitialized value $iod_ball in regexp compilation at ./gen_pin_config.pl line 249.
    Use of uninitialized value $iod_a_delay in pattern match (m//) at ./gen_pin_config.pl line 253.
    Use of uninitialized value $iod_ball in regexp compilation at ./gen_pin_config.pl line 249.
    Use of uninitialized value $iod_a_delay in pattern match (m//) at ./gen_pin_config.pl line 253.
    Use of uninitialized value $iod_ball in regexp compilation at ./gen_pin_config.pl line 249.
    Use of uninitialized value $iod_a_delay in pattern match (m//) at ./gen_pin_config.pl line 253.
    Use of uninitialized value $iod_ball in regexp compilation at ./gen_pin_config.pl line 249.
    Use of uninitialized value $iod_a_delay in pattern match (m//) at ./gen_pin_config.pl line 253.
    Use of uninitialized value $iod_ball in regexp compilation at ./gen_pin_config.pl line 249.
    Use of uninitialized value $iod_a_delay in pattern match (m//) at ./gen_pin_config.pl line 253.
    Use of uninitialized value $iod_ball in regexp compilation at ./gen_pin_config.pl line 249.
    Use of uninitialized value $iod_a_delay in pattern match (m//) at ./gen_pin_config.pl line 253.
    Use of uninitialized value $iod_ball in regexp compilation at ./gen_pin_config.pl line 249.
    Use of uninitialized value $iod_a_delay in pattern match (m//) at ./gen_pin_config.pl line 253.
    Use of uninitialized value $iod_ball in regexp compilation at ./gen_pin_config.pl line 249.
    Use of uninitialized value $iod_a_delay in pattern match (m//) at ./gen_pin_config.pl line 253.
    Use of uninitialized value $iod_ball in regexp compilation at ./gen_pin_config.pl line 249.
    Use of uninitialized value $iod_a_delay in pattern match (m//) at ./gen_pin_config.pl line 253.
    Use of uninitialized value $iod_ball in regexp compilation at ./gen_pin_config.pl line 249.
    Use of uninitialized value $iod_a_delay in pattern match (m//) at ./gen_pin_config.pl line 253.
    Use of uninitialized value $iod_ball in regexp compilation at ./gen_pin_config.pl line 249.
    Use of uninitialized value $iod_a_delay in pattern match (m//) at ./gen_pin_config.pl line 253.
    Use of uninitialized value $iod_ball in regexp compilation at ./gen_pin_config.pl line 249.
    Use of uninitialized value $iod_a_delay in pattern match (m//) at ./gen_pin_config.pl line 253.
    Use of uninitialized value $iod_ball in regexp compilation at ./gen_pin_config.pl line 249.
    Use of uninitialized value $iod_a_delay in pattern match (m//) at ./gen_pin_config.pl line 253.

    michel@michel:~/Documents/pinmux$ ./gen_pin_config.pl -p genericFileFormatPadConf.txt -d genericFileFormatIOdelay.txt -o iodelay >iodelay.h
    splice() offset past end of array at ./gen_pin_config.pl line 116, <$fh> line 2.
    Use of uninitialized value $register in hash element at ./gen_pin_config.pl line 119, <$fh> line 2.
    splice() offset past end of array at ./gen_pin_config.pl line 116, <$fh> line 3.
    Use of uninitialized value $register in hash element at ./gen_pin_config.pl line 119, <$fh> line 3.
    splice() offset past end of array at ./gen_pin_config.pl line 116, <$fh> line 5.
    Use of uninitialized value $register in hash element at ./gen_pin_config.pl line 119, <$fh> line 5.
    splice() offset past end of array at ./gen_pin_config.pl line 116, <$fh> line 2.
    Use of uninitialized value $register in hash element at ./gen_pin_config.pl line 123, <$fh> line 2.
    splice() offset past end of array at ./gen_pin_config.pl line 116, <$fh> line 3.
    Use of uninitialized value $register in hash element at ./gen_pin_config.pl line 123, <$fh> line 3.
    splice() offset past end of array at ./gen_pin_config.pl line 116, <$fh> line 5.
    Use of uninitialized value $register in hash element at ./gen_pin_config.pl line 123, <$fh> line 5.
    Use of uninitialized value $iod_a_delay in pattern match (m//) at ./gen_pin_config.pl line 307.
    Use of uninitialized value $iod_a_delay in pattern match (m//) at ./gen_pin_config.pl line 308.
    Use of uninitialized value $iod_g_delay in pattern match (m//) at ./gen_pin_config.pl line 316.
    Use of uninitialized value $val_a in concatenation (.) or string at ./gen_pin_config.pl line 327.
    Use of uninitialized value $val_g in concatenation (.) or string at ./gen_pin_config.pl line 327.
    Use of uninitialized value $iod_reg_name in concatenation (.) or string at ./gen_pin_config.pl line 327.

    If there is a problem with the perl script, do you have a better one?

    Use my Email if that is under NDA

    Michel

  • Michel Catudal said:
    I do get tons of errors when I run the script, are those valid or caused by a bug in the perl script or pinmux program?

    The underlying issue relates to carriage returns and how they're being handled in the script.  Page 10 of the app note says that you must run dos2unix on the txt files.

    A better solution might be to add the highlighted line:

    while ($row = <$fh>)
    {
    chomp($row);
    $row =~ s/\r//g; # Allow Windows style carriage returns
    # get rid of commented lines including single line and multiline
    next if $skip == 1;

    Here's my updated version: gen_pin_config.zip

    I haven't had a chance to look into your other question yet.  I'll reply later.

  • Michel Catudal said:

    Here a part of the code I generated with the perl script that I took out of the pdf document.

    {0x0B9C, 1067, 829},    /* CFG_VOUT1_CLK_OUT */
    {0x0BA8, 391, 0},       /* CFG_VOUT1_D0_OUT */
    {0x0BB4, 278, 0},       /* CFG_VOUT1_D10_OUT */
    {0x0BC0, 345, 0},       /* CFG_VOUT1_D11_OUT */
    {0x0BCC, 1236, 0},      /* CFG_VOUT1_D12_OUT */
    {0x0BD8, 178, 0},       /* CFG_VOUT1_D13_OUT */
    {0x0BE4, 308, 0},       /* CFG_VOUT1_D14_OUT */
    {0x0BF0, 281, 0},       /* CFG_VOUT1_D15_OUT */
    {0x0BFC, 0, 162},       /* CFG_VOUT1_D16_OUT */
    {0x0C08, 274, 0},       /* CFG_VOUT1_D17_OUT */
    {0x0C14, 421, 0},       /* CFG_VOUT1_D18_OUT */
    {0x0C20, 512, 0},       /* CFG_VOUT1_D19_OUT */
    {0x0C2C, 517, 0},       /* CFG_VOUT1_D1_OUT */
    {0x0C38, 383, 0},       /* CFG_VOUT1_D20_OUT */
    {0x0C44, 107, 0},       /* CFG_VOUT1_D21_OUT */
    {0x0C50, 223, 0},       /* CFG_VOUT1_D22_OUT */
    {0x0C5C, 0, 0}, /* CFG_VOUT1_D23_OUT */
    {0x0C68, 279, 0},       /* CFG_VOUT1_D2_OUT */  
    {0x0C74, 434, 0},       /* CFG_VOUT1_D3_OUT */  
    {0x0C80, 1294, 0},      /* CFG_VOUT1_D4_OUT */  
    {0x0C8C, 393, 0},       /* CFG_VOUT1_D5_OUT */  
    {0x0C98, 317, 0},       /* CFG_VOUT1_D6_OUT */  
    {0x0CA4, 135, 325},     /* CFG_VOUT1_D7_OUT */    
    {0x0CB0, 208, 0},       /* CFG_VOUT1_D8_OUT */   
    {0x0CBC, 462, 0},       /* CFG_VOUT1_D9_OUT */
    {0x0CC8, 0, 0}, /* CFG_VOUT1_DE_OUT */
    {0x0CE0, 0, 0}, /* CFG_VOUT1_HSYNC_OUT */
    {0x0CEC, 118, 701},     /* CFG_VOUT1_VSYNC_OUT */

    This is interesting.  The current u-boot code does not appear to be specifying a manual I/O mode for VOUT1.  However, I believe it should be.  I'm checking into it internally.

  • I found something else that is odd.

    The pixmux file for the EVM doesn't match to the code for u-boot.

    core_padconf_array_essential_x15 which I think is the one used for the EVM
    has one of the items present in the pinmux file for JTAG

    {ON_OFF, (M1 | PIN_OUTPUT_PULLUP)}, /* on_off.on_off */
    {RTC_PORZ, (M0 | PIN_OUTPUT_PULLDOWN)}, /* rtc_porz.rtc_porz */
    {RTCK, (M0 | PIN_INPUT_PULLDOWN)}, /* rtck.rtck */

    with pinmux

    {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)}, /* 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 */


    It is also different from core_padconf_array_essential_am572x_idk


    { ON_OFF, (M1 | PIN_OUTPUT_PULLUP) }, /* on_off.on_off */
    { RTC_PORZ, (M0 | PIN_OUTPUT_PULLDOWN) }, /* rtc_porz.rtc_porz */
    { TMS, (M0 | PIN_INPUT_PULLUP) }, /* tms.tms */
    { TDI, (M0 | PIN_INPUT_PULLUP | SLEWCONTROL) }, /* tdi.tdi */
    { TDO, (M0 | PIN_INPUT_PULLUP) }, /* tdo.tdo */
    { TCLK, (M0 | PIN_INPUT_PULLUP) }, /* tclk.tclk */
    { TRSTN, (M0 | PIN_INPUT_PULLDOWN) }, /* trstn.trstn */
    { RTCK, (M0 | PIN_INPUT) }, /* rtck.rtck */
    { EMU0, (M0 | PIN_INPUT_PULLUP) }, /* emu0.emu0 */
    { EMU1, (M0 | PIN_INPUT_PULLUP) }, /* emu1.emu1 */
    { RESETN, (M0 | PIN_OUTPUT_PULLUP) }, /* resetn.resetn */
    { RSTOUTN, (M0 | PIN_OUTPUT_PULLDOWN) }, /* rstoutn.rstoutn */



    also 4 items are in a different structure. There is probably a reason for that one but it is not clear to me

    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 */
    };


    according to pinmux the setttings are those

    { 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 */


    Michel
  • Regarding the VOUT1 settings, that appears to be an oversight. SR1.x required no manual mode for the default timings on VOUT1 and VOUT3. SR2.0 silicon now requires a manual mode even for the default timings on VOUT1/VOUT3.

  • The JTAG pins are designed to be in the proper state coming out of reset so that you can connect immediately if needed. I expect that's why they're not all being explicitly configured, i.e. we can just rely on the reset default values.

    For the uart3 pins (i.e. UART2_CTSN and UART_RTSN pin names), they should not have _SLEW (i.e. slow slew) specified.

    For the I2C, it could be debated whether the internal pullup should be on or off. I expect both values to work fine.