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.

ti-processor-sdk-linux-am335x-evm-02.00.01.07



Hi All,

Can somebody tell me how to enable uart 1/2/3 and i2c module on beaglebone black?

I am using ti-processor-sdk-linux-am335x-evm-02.00.01.07 sdk and Linux am335x-evm 4.1.13-g8dc6617 OS.

Thanks in advance!

  • Hi,

    I'll take i2c2 as a reference. It is pinned out on device balls D17 & D18, and is connected to expansion header pins P9.19 & P9.20.

    Its pin mux registers are on the following addresses:
    I2C2_SDA (ball D18) -> pinmux register at 0x44E10978
    I2C2_SCL (ball D17) -> pinmux register at 0x44E1097C

    So in arch/arm/boot/dts/am335x-boneblack.dts, add the following node:
    &am33xx_pinmux {
    + i2c2_pins: i2c2_pins{
    + pinctrl-single,pins = <
    + 0x178 (PIN_INPUT_PULLUP | MUX_MODE3) /*UART1_CTSN.I2C2_SDA*/
    + 0x17C (PIN_INPUT_PULLUP | MUX_MODE3) /*UART1_RTSN.I2C2_SCL*/
    + >;
    + }
    nxp_hdmi_bonelt_pins: nxp_hdmi_bonelt_pins {

    Make sure that no other pinctrl setting uses these pins (at 0x178 & 0x17C). Look at am335x-boneblack.dts & am335x-bone-common.dtsi

    Then in arch/arm/boot/dts/am335x-boneblack.dts add:
    };

    +&i2c2 {
    + status = "okay";
    + pinctrl-names = "default";
    + pinctrl-0 = <&i2c2_pins>;
    +};

    &lcdc {
    status = "okay";
    };

    Then you can read the documentation in Documentation/i2c/dev-interface, to see how to use the i2c-dev & dev/i2c entries in you linux fs.

    You should enable the uart the same way:
    1. create uartX_pins { structure to configure the uart on device balls.
    2. create
    &uartX {
    pinctrl-names = "default";
    pinctrl-0 = <&uartX_pins>;
    status = "okay";
    }
    And your uart should be enabled.

    Best Regards,
    Yordan
  • Hi,

    Thank you for your answer.

    Regards,
    Amey