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.

UART2 UART3 UART4 UART5 McASP1 & GPIO0 register base addresses

Hi,

I my custom board, I need to configure UART2, UART3, UART4, UART5, McASP1 & GPIO0 bank register base addresses I read Am335x referance manual but I was not clear on what basis how the register base addresses for this modules have been calculated

Could you please let me know what are the register base addresses of & UART2, UART3, UART4, UART5, McASP1 & GPIO0 bank how this is modules are been configured in device tree as am using TI-sdk 7 & evaluating on begalebone black

As am trying from 2days kindly do the needful in providing this information

Awaiting for your replies,

Many Many Thanks in advance

  • Hi,

    Refer this link http://www.ti.com/lit/ug/spruh73k/spruh73k.pdf see for page 175 (Memory Map).

    Thanks,

    --Prabhakar Lad

  • Thanks a lot Prabhakar for your replies,

    As am new to device tree & ti am335x platform, could you please let me know how you are configuring register address of uart2, 3, 4, 5 & mcasp1, gpio0, gpio1, gpio2 , gpio3 register address & its contents

    Many Thanks in advance

  • Hi Srini,

    		uart0: serial@44e09000 {
    			pinctrl-names = "default";
    			pinctrl-0 = <&uart0_pins>;
    
    			status = "okay";
    		};
    
    		i2c0: i2c@44e0b000 {
    			pinctrl-names = "default";
    			pinctrl-0 = <&i2c0_pins>;
    

    From the above code snippet, you can see the BASE registers of UART and I2C peripherals.

    0x44e09000 -> UART0

    0x44e0b000 -> I2C0

  • Thanks a lot for your replies Titus,

    I have done all the configuration related to register base addresses

    uart2: serial@48024000 {

    pinctrl-names = "default";
    pinctrl-0 = <&uart2_pins>;

    status = "okay";
    };

    uart3: serial@481A6000 {
    pinctrl-names = "default";
    pinctrl-0 = <&uart3_pins>;

    status = "okay";
    };

    uart4: serial@481A8000 {
    pinctrl-names = "default";
    pinctrl-0 = <&uart4_pins>;

    status = "okay";
    };


    uart5: serial@481AA000 {
    pinctrl-names = "default";
    pinctrl-0 = <&uart5_pins>;

    status = "okay";
    };

    Could you please let me know how do you calculate & set the ? register address in the below pin mux configuration


    uart2_pins: pinmux_uart2_pins {
    pinctrl-single,pins = <
    ? (PIN_INPUT_PULLUP | MUX_MODE0) /* uart2_rxd.uart2_rxd */
    ?(PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* uart2_txd.uart2_txd */
    >;
    };

    uart3_pins: pinmux_uart3_pins {
    pinctrl-single,pins = <
    ?(PIN_INPUT_PULLUP | MUX_MODE0) /* uart3_rxd.uart3_rxd */
    ? (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* uart3_txd.uart3_txd */
    >;
    };

    uart4_pins: pinmux_uart4_pins {
    pinctrl-single,pins = <
    ? (PIN_INPUT_PULLUP | MUX_MODE0) /* uart4_rxd.uart4_rxd */
    ? (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* uart4_txd.uart4_txd */
    >;
    };

    uart5_pins: pinmux_uart5_pins {
    pinctrl-single,pins = <
    ?(PIN_INPUT_PULLUP | MUX_MODE0) /* uart5_rxd.uart5_rxd */
    ?(PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* uart5_txd.uart5_txd */
    >;
    };

    Kindly do the needful as early as possible

  • 1) Need to find out the pin name of AM335x for UART2 peripheral from data sheet.

    MII1_TX_CLK

    MII1_RX_CLK

    2) Then search with that name in AM335x TRM from "Control Module" chapter for register.

    Ex for UART2:

    uart2_pins: pinmux_uart2_pins {
    pinctrl-single,pins = <
    0x12C (PIN_INPUT_PULLUP | MUX_MODE1) /* mii1_tx_clk.uart2_rxd */
    0x130 (PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* mii1_rx_clk.uart2_txd */
    >;
    };

    You have to understand the mode configuration and pin control configuration.

    Please refer to the AM335x TRM chapter control module,

    Do the same for other UARTs.

    Try this and let me know.