With the IMX6 processor, where in the the device tree source do I configure the serial uarts to use inverted logic for TX and RX?
I can see from the programming reference that UARTx_UCR3 / UARTx_UCR4 registers can be configured to invert the UART pins by setting INVT and INVR bits.
Is there a 'high level' linux device tree way of doing this, or do I need to set the register directly? In either case what is the best way to do this?
So far it seems I have to patch the driver and add a new device tree option. Can fsl mainline this ?
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart2>;
status = "okay";
if (of_get_property(np, "fsl,invert-logic", NULL))
sport->inv_rx = 1;
sport->inv_tx = 1;
if (sport->inv_rx == 1)
temp = readl(sport->port.membase + UCR4);
temp |= UCR4_INVR;
writel(temp, sport->port.membase + UCR4);
if (sport->inv_tx == 1)
temp = readl(sport->port.membase + UCR3);
temp |= UCR3_INVT;
writel(temp, sport->port.membase + UCR3);