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.

Clarification of "Enabling UART1 on AM18X/DA850/OMAP-L138 running Linux"

Other Parts Discussed in Thread: DA8XX

Hey, I have been trying to set up UART1 on an OMAP L138 experimenter kit running Linux. I came across this wiki page Enabling UART1 on AM18X/DA850/OMAP-L138 running Linux  which seem to be exactly what I am trying to do. The problem is that this page is not very clear to me. I am using DaVinci PSP release 3.20.00.14 so it seems like I have to "Merge below series patches". Can someone explain to me what that means and how I can do it. I have no idea what these files are or what to do with them.

Also, I've been looking at solving this by editing the "board-da850-evm.c" file located at:

               ~/ti-dvsdk_omapl138-evm_4_01_00_09/psp/linux-2.6.33-rc4-psp03.20.00.14/arch/arm/mach-davinci

which has various settings for the pin multiplexing, including code to shut off UART0 and UART1. I read a forum post where someone was trying to solve this issue by commenting out those lines of code as well as adding "ret = da8xx_pinmux_setup(da850_uart0_pins); " but they were having issues with it as well.

Thanks,

Matt

  • Noticed from your other posts that you are now using Linux PSP 4.21.00.04. Or is that 3.21.00.04. I think that version already has UART1 enabled. The version of board-da850-evm.c at the Arago git has these lines.

    static __init void da850_evm_init(void)
    {
    ...
        /* Support for UART 1 */
        ret = davinci_cfg_reg_list(da850_uart1_pins);
    ...
        davinci_serial_init(&da850_evm_uart_config);
    ...
        if (HAS_MCASP) {
    ...
            if (HAS_UART1_AFE)
                pr_warning("WARNING: both McASP and UART1_AFE are "
                    "enabled, but they share pins.\n"
                        "\tDisable one of them.\n");

            ret = davinci_cfg_reg_list(da850_mcasp_pins);
            if (ret)
                pr_warning("da850_evm_init: mcasp mux setup failed:"
                        "%d\n", ret);

            da8xx_register_mcasp(0, &da850_evm_snd_data);
        }
    ...
    }

    I vague remember that this kernel version also properly enables the power to the enabled uarts. Note that the UART1 pins are shared with the McAsp. The McAsp pinmux config could overwrite your UART1 pinmux config. Odd that the code has checks for McAsp on top of UART1 but not UART on top of McAsp.

  • Thanks, for the reply. I made a mistake on that post, it should have said PSP 3.21.00.04. And I recently noticed that code you referred to. I think UART1 is enabled by default, but that doesn't help the issue that I am having with changing its register contents to initialize it. It seem to me that the way to give such permissions to the user is to write and install a kernel module, of which I have found an example on the Linux forum.

    -Matt

  • I don't quite understand yet. I think davinci_serial_init() will do the chip specific initialization. The generic 8250.c driver will do the rest of the initialization. Have you tried disabling the McAsp in the kernel config. Maybe you are seeing audio stuff on the UART1 pins.