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.

Linux/PROCESSOR-SDK-AM335X: BeagleBone Green Wireless enabling UART ports

Part Number: PROCESSOR-SDK-AM335X


Tool/software: Linux

Hello,

I have built ti wilink mesh drivers for beaglebone green wireless (BBGW) board using ti-processor-sdk-linux-am335x-evm-03.01.00.06. Now I want to enable the UART4 available at cape expansion header P9.11 and P9.13. As per the answers at  https://e2e.ti.com/support/embedded/linux/f/354/t/424616   link, I need to add the pinmux definitions in the am335x-bone-common.dtsi file for each uart that I want to enable. The problem is that I do not know the pin address and other mux mode, etc. values that need to be set for BeagleBone green wireless board. I could not find anything related to BBGW on internet. I believe that the value are different for BeagleBone Black and BB Green wireless. The pin mux tool avvailable on TI website, i believe, gives the pin outs for AM335X and not the cape expansion pin address (Not sure about this).  Can you please provide some information on how to proceed with enabling the UART4 device?

When building the linux kernel with mesh driver, the build script adds a am335x-bonegreen-wl1835.dtsi and  am335x-bonegreen-wireless.dtb files for BBGW in which the UART3 is enabled. After booting the BBGW with the built image, I can see the UART3 enable at ttyS3 port in the dmesg output :

[    0.371684] 44e09000.serial: ttyS0 at MMIO 0x44e09000 (irq = 158, base_baud = 3000000) is a 8250
[    0.984412] console [ttyS0] enabled
[    0.989014] 481a6000.serial: ttyS3 at MMIO 0x481a6000 (irq = 159, base_baud = 3000000) is a 8250

But there is no ttyS3 enabled message. So, I am not sure that I can use the UART3 port. Is the UART3 enabled here or do I have to do something else, to use UART3 port?

There were many sites on the internet referring to bone_capemgr and dtso files for enabling UART, but the bone_capemgr is not available in the linux kernel built from TI Wilink sources. Does it need some configuration to be set in the config file?

Thanks in advance.

Regards,

Aditya Kamat.

  • Hi,

    Can you please provide some information on how to proceed with enabling the UART4 device?


    Form BBGW schematics I see that UART4_RXD & UART4_TXD signals muxed on P9.11 & P9.13 come from device balls T17 and U17. Now you need to check the AM335x Data Manual (www.ti.com/.../am3358.pdf), Table 4-1. Pin Attributes (ZCE and ZCZ Packages) to see which SoC pad you need to modify. In the case of balls T17 and U17, the pads are named:
    GPMC_WAIT0 (T17) => you can see that muxmode 6 corresponds to the UART4_RXD signal
    GPMC_WPn (U17) => muxmode 6 corresponds to the UART4_TXD signal

    The device pad names correspond to the name of the pinmux register you need to modify. The pinmux registers can be found in AM335x TRM (www.ti.com/.../spruh73o.pdf)

    conf_gpmc_wait0 ==> address is 0x44E10870
    conf_gpmc_wpn ==> address is 0x44E10874

    So for uart4 pinmux you need to add:
    uart4_pins: uart4_pins {
            pinctrl-single,pins = <
                       0x70 (PIN_INPUT | MUX_MODE6) /*conf_gpmc_wait0.UART4_RXD*/
                       0x74 (PIN_OUTPUT | MUX_MODE6) /*conf_gpmc_wpn.UART4_TXD*/
            >;
    };

    &uart4 {
              status = "okay";
              pinctrl-names = "default";
              pinctrl-0 = <&uart4_pins>;
    };

    The modifications for uart3 are similar.

    Best Regards,
    Yordan

  • Hello Yordan,

    Thank you for sharing the information.

    I am able to see UART4 port at startup in the dmesg logs after adding the uart4 pinmux details to am335x-bone-common.dtsi:

    [    0.000000] Kernel command line: console=ttyO0,115200n8 root=PARTUUID=0007a9fd-02 rw rootfstype=ext4 rootwait
    [    0.000354] WARNING: Your 'console=ttyO0' has been replaced by 'ttyS0'
    [    0.371988] 44e09000.serial: ttyS0 at MMIO 0x44e09000 (irq = 158, base_baud = 3000000) is a 8250
    [    0.984725] console [ttyS0] enabled
    [    0.989360] 481a6000.serial: ttyS3 at MMIO 0x481a6000 (irq = 159, base_baud = 3000000) is a 8250
    [    0.999258] 481a8000.serial: ttyS4 at MMIO 0x481a8000 (irq = 160, base_baud = 3000000) is a 8250

    Thanks for the help.

    Regards,

    Aditya Kamat.