#define CTRL_RE (1 << 18)
#define FIFO_TXFE 0x80
+#ifdef CONFIG_ARCH_IMX8
+#define FIFO_RXFE 0x08
+#else
#define FIFO_RXFE 0x40
+#endif
#define WATER_TXWATER_OFF 1
#define WATER_RXWATER_OFF 16
enum lpuart_devtype {
DEV_VF610 = 1,
DEV_LS1021A,
- DEV_MX7ULP
+ DEV_MX7ULP,
+ DEV_IMX8
};
struct lpuart_serial_platdata {
lpuart_write32(plat->flags, &base->match, 0);
- if (plat->devtype == DEV_MX7ULP) {
+ if (plat->devtype == DEV_MX7ULP || plat->devtype == DEV_IMX8) {
_lpuart32_serial_setbrg_7ulp(plat, gd->baudrate);
} else {
/* provide data bits, parity, stop bit, etc */
struct lpuart_serial_platdata *plat = dev->platdata;
if (is_lpuart32(dev)) {
- if (plat->devtype == DEV_MX7ULP)
+ if (plat->devtype == DEV_MX7ULP || plat->devtype == DEV_IMX8)
_lpuart32_serial_setbrg_7ulp(plat, baudrate);
else
_lpuart32_serial_setbrg(plat, baudrate);
plat->devtype = DEV_MX7ULP;
else if (!fdt_node_check_compatible(blob, node, "fsl,vf610-lpuart"))
plat->devtype = DEV_VF610;
+ else if (!fdt_node_check_compatible(blob, node, "fsl,imx8qm-lpuart"))
+ plat->devtype = DEV_IMX8;
return 0;
}
{ .compatible = "fsl,imx7ulp-lpuart",
.data = LPUART_FLAG_REGMAP_32BIT_REG },
{ .compatible = "fsl,vf610-lpuart"},
+ { .compatible = "fsl,imx8qm-lpuart",
+ .data = LPUART_FLAG_REGMAP_32BIT_REG },
{ }
};