1 From 932dac0380bbf7276d4111c35674679bc9ad6384 Mon Sep 17 00:00:00 2001
2 From: Vabhav Sharma <vabhav.sharma@nxp.com>
3 Date: Thu, 31 Oct 2019 19:20:47 +0530
4 Subject: [PATCH] tty: serial: lpuart: add LS1028A support
6 NXP LS1028A lpuart is the same IP as LS1021A, but it is
7 little endian for register accessing instead of big endian
10 So add LS1028A matching data to distiguish the chips.
12 Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
13 Signed-off-by: Vabhav Sharma <vabhav.sharma@nxp.com>
14 Acked-by: Fugang Duan <fugang.duan@nxp.com>
16 drivers/tty/serial/fsl_lpuart.c | 14 ++++++++++++--
17 1 file changed, 12 insertions(+), 2 deletions(-)
19 --- a/drivers/tty/serial/fsl_lpuart.c
20 +++ b/drivers/tty/serial/fsl_lpuart.c
22 * Freescale lpuart serial port driver
24 * Copyright 2012-2014 Freescale Semiconductor, Inc.
25 + * Copyright 2019 NXP
28 #if defined(CONFIG_SERIAL_FSL_LPUART_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ)
29 @@ -260,6 +261,7 @@ static DEFINE_IDA(fsl_lpuart_ida);
37 @@ -311,13 +313,20 @@ static const struct lpuart_soc_data vf_d
38 .rx_dma_cyclic = true,
41 -static const struct lpuart_soc_data ls_data = {
42 +static const struct lpuart_soc_data ls1021a_data = {
43 .devtype = LS1021A_LPUART,
44 .iotype = UPIO_MEM32BE,
46 .rx_dma_cyclic = true,
49 +static const struct lpuart_soc_data ls1028a_data = {
50 + .devtype = LS1028A_LPUART,
51 + .iotype = UPIO_MEM32,
53 + .rx_dma_cyclic = true,
56 static struct lpuart_soc_data imx7ulp_data = {
57 .devtype = IMX7ULP_LPUART,
59 @@ -336,7 +345,8 @@ static struct lpuart_soc_data imx8qxp_da
61 static const struct of_device_id lpuart_dt_ids[] = {
62 { .compatible = "fsl,vf610-lpuart", .data = &vf_data, },
63 - { .compatible = "fsl,ls1021a-lpuart", .data = &ls_data, },
64 + { .compatible = "fsl,ls1021a-lpuart", .data = &ls1021a_data, },
65 + { .compatible = "fsl,ls1028a-lpuart", .data = &ls1028a_data, },
66 { .compatible = "fsl,imx7ulp-lpuart", .data = &imx7ulp_data, },
67 { .compatible = "fsl,imx8qxp-lpuart", .data = &imx8qxp_data, },