Skip to contentSkip to conversation

Convert ls1021aqds to use driver model for serial ports

RFC PATCH New York Sun 3 participants 10 messages Feb 9, 2016 – Feb 22, 2016 Arm (32-bit)

lore
Share & tools
lore

York Sun

author
#0 lore raw

cover Convert ls1021aqds to use driver model for serial ports

Since a recent merge 5160def "dm: lpuart: Drop the legacy code", ls1021aqds_ddr4_nor_lpuart and ls1021aqds_nor_lpuart failed to compile because they are using legacy driver for lpuart. Following ls1021atwr, ls1021aqds should be converted as well.

Not tested on boards yet. Serial DM driver is not enabled for SD and QSPI configuration.

York Sun (2):
arm: ls1021aqds: Convert to driver model and enable serial support
arm: ls1021aqds: Enable driver model lpuart serial driver

 arch/arm/dts/Makefile                              |    3 ++-
 arch/arm/dts/ls1021a-qds-duart.dts                 |   16 ++++++++++++++++
 arch/arm/dts/ls1021a-qds-lpuart.dts                |   16 ++++++++++++++++
 arch/arm/dts/{ls1021a-qds.dts => ls1021a-qds.dtsi} |    3 +--
 configs/ls1021aqds_ddr4_nor_defconfig              |    4 ++++
 configs/ls1021aqds_ddr4_nor_lpuart_defconfig       |    4 ++++
 configs/ls1021aqds_nor_defconfig                   |    4 ++++
 configs/ls1021aqds_nor_lpuart_defconfig            |    4 ++++
 configs/ls1021aqds_qspi_defconfig                  |    2 +-
 configs/ls1021aqds_sdcard_defconfig                |    3 +++
 include/configs/ls1021aqds.h                       |    2 ++
 11 files changed, 57 insertions(+), 4 deletions(-)
 create mode 100644 arch/arm/dts/ls1021a-qds-duart.dts
 create mode 100644 arch/arm/dts/ls1021a-qds-lpuart.dts
 rename arch/arm/dts/{ls1021a-qds.dts => ls1021a-qds.dtsi} (98%)
Signature · 1 line
1.7.9.5
author
#1 lore raw

RFC PATCH 1/2 arm: ls1021aqds: Convert to driver model and enable serial support

Split duart configuration as device tree file. Move /chosen node out of board commone device tree. Convert ls1021aqds nor and SD configurations to driver model support (qspi already uses DM). Enable ns16550 DM serial driver for nor configurations.

CC Alison Wang <[email protected]>
CC Bin Meng <[email protected]>

---

 arch/arm/dts/Makefile                              |    2 +-
 arch/arm/dts/ls1021a-qds-duart.dts                 |   16 ++++++++++++++++
 arch/arm/dts/{ls1021a-qds.dts => ls1021a-qds.dtsi} |    3 +--
 configs/ls1021aqds_ddr4_nor_defconfig              |    4 ++++
 configs/ls1021aqds_nor_defconfig                   |    4 ++++
 configs/ls1021aqds_qspi_defconfig                  |    2 +-
 configs/ls1021aqds_sdcard_defconfig                |    3 +++
 include/configs/ls1021aqds.h                       |    2 ++
 8 files changed, 32 insertions(+), 4 deletions(-)
 create mode 100644 arch/arm/dts/ls1021a-qds-duart.dts
 rename arch/arm/dts/{ls1021a-qds.dts => ls1021a-qds.dtsi} (98%)
arch/arm/dts/Makefile +1 -1
index 0fa5796..ef58aec 100644
@@ -94,7 +94,7 @@ dtb-$(CONFIG_TARGET_DRA7XX_EVM) += dra72-evm.dtb dra7-evm.dtb
 dtb-$(CONFIG_TARGET_BEAGLE_X15) += am57xx-beagle-x15.dtb
 dtb-$(CONFIG_TARGET_STV0991) += stv0991.dtb
 
-dtb-$(CONFIG_LS102XA) += ls1021a-qds.dtb \
+dtb-$(CONFIG_LS102XA) += ls1021a-qds-duart.dtb \
 	ls1021a-twr-duart.dtb ls1021a-twr-lpuart.dtb
 dtb-$(CONFIG_FSL_LSCH3) += fsl-ls2080a-qds.dtb \
 	fsl-ls2080a-rdb.dtb
arch/arm/dts/ls1021a-qds-duart.dts new file +16 -0
new file mode 100644
index 0000000..bc56867
@@ -0,0 +1,16 @@
+/*
+ * Freescale ls1021a QDS board common device tree source
+ *
+ * Copyright 2013-2015 Freescale Semiconductor, Inc.
+ *
+ * SPDX-License-Identifier:	GPL-2.0+
+ */
+
+/dts-v1/;
+#include "ls1021a-qds.dtsi"
+
+/ {
+	chosen {
+		stdout-path = &uart0;
+	};
+};
arch/arm/dts/ls1021a-qds.dtsi renamed from arch/arm/dts/ls1021a-qds.dts +1 -2
similarity index 98%
rename from arch/arm/dts/ls1021a-qds.dts
rename to arch/arm/dts/ls1021a-qds.dtsi
index e634292..ca9e835 100644
@@ -1,12 +1,11 @@
 /*
- * Freescale ls1021a QDS board device tree source
+ * Freescale ls1021a QDS board common device tree source
  *
  * Copyright 2013-2015 Freescale Semiconductor, Inc.
  *
  * SPDX-License-Identifier:	GPL-2.0+
  */
 
-/dts-v1/;
 #include "ls1021a.dtsi"
 
 / {
configs/ls1021aqds_ddr4_nor_defconfig +4 -0
index 2f16339..842f645 100644
@@ -1,7 +1,11 @@
 CONFIG_ARM=y
 CONFIG_TARGET_LS1021AQDS=y
 CONFIG_SYS_EXTRA_OPTIONS="SYS_FSL_DDR4"
+CONFIG_DM_SERIAL=y
+CONFIG_DEFAULT_DEVICE_TREE="ls1021a-qds-duart"
 # CONFIG_CMD_SETEXPR is not set
+CONFIG_OF_CONTROL=y
+CONFIG_DM=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
 CONFIG_SYS_NS16550=y
configs/ls1021aqds_nor_defconfig +4 -0
index 6878df4..f4c81e2 100644
@@ -1,6 +1,10 @@
 CONFIG_ARM=y
 CONFIG_TARGET_LS1021AQDS=y
+CONFIG_DM_SERIAL=y
+CONFIG_DEFAULT_DEVICE_TREE="ls1021a-qds-duart"
 # CONFIG_CMD_SETEXPR is not set
+CONFIG_OF_CONTROL=y
+CONFIG_DM=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
 CONFIG_SYS_NS16550=y
configs/ls1021aqds_qspi_defconfig +1 -1
index 0f740fd..2e98d6c 100644
@@ -1,7 +1,7 @@
 CONFIG_ARM=y
 CONFIG_TARGET_LS1021AQDS=y
 CONFIG_DM_SPI=y
-CONFIG_DEFAULT_DEVICE_TREE="ls1021a-qds"
+CONFIG_DEFAULT_DEVICE_TREE="ls1021a-qds-duart"
 CONFIG_SYS_EXTRA_OPTIONS="QSPI_BOOT"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_SETEXPR is not set
configs/ls1021aqds_sdcard_defconfig +3 -0
index 3249b48..e283f69 100644
@@ -1,8 +1,11 @@
 CONFIG_ARM=y
 CONFIG_TARGET_LS1021AQDS=y
+CONFIG_DEFAULT_DEVICE_TREE="ls1021a-qds-duart"
 CONFIG_SPL=y
 CONFIG_SYS_EXTRA_OPTIONS="RAMBOOT_PBL,SPL_FSL_PBL,SD_BOOT"
 # CONFIG_CMD_SETEXPR is not set
+CONFIG_OF_CONTROL=y
+CONFIG_DM=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
 CONFIG_SYS_NS16550=y
include/configs/ls1021aqds.h +2 -0
index f6efc55..5bdc124 100644
@@ -375,7 +375,9 @@ unsigned long get_board_ddr_clk(void);
 #else
 #define CONFIG_CONS_INDEX		1
 #define CONFIG_SYS_NS16550_SERIAL
+#ifndef CONFIG_DM_SERIAL
 #define CONFIG_SYS_NS16550_REG_SIZE	1
+#endif
 #define CONFIG_SYS_NS16550_CLK		get_serial_clock()
 #endif
 
Signature · 1 line
1.7.9.5
author
#4 lore raw

RFC PATCH 2/2 arm: ls1021aqds: Enable driver model lpuart serial driver

In reply to York Sun

Convert ls1021aqds_nor_lpuart and ls1021aqds_ddr4_nor_lpuart to driver model suport. Enable lpuart port driver.

CC Alison Wang <[email protected]>
CC Bin Meng <[email protected]>

---

 arch/arm/dts/Makefile                        |    1 +
 arch/arm/dts/ls1021a-qds-lpuart.dts          |   16 ++++++++++++++++
 configs/ls1021aqds_ddr4_nor_lpuart_defconfig |    4 ++++
 configs/ls1021aqds_nor_lpuart_defconfig      |    4 ++++
 4 files changed, 25 insertions(+)
 create mode 100644 arch/arm/dts/ls1021a-qds-lpuart.dts
arch/arm/dts/Makefile +1 -0
index ef58aec..c27b80c 100644
@@ -95,6 +95,7 @@ dtb-$(CONFIG_TARGET_BEAGLE_X15) += am57xx-beagle-x15.dtb
 dtb-$(CONFIG_TARGET_STV0991) += stv0991.dtb
 
 dtb-$(CONFIG_LS102XA) += ls1021a-qds-duart.dtb \
+	ls1021a-qds-lpuart.dtb \
 	ls1021a-twr-duart.dtb ls1021a-twr-lpuart.dtb
 dtb-$(CONFIG_FSL_LSCH3) += fsl-ls2080a-qds.dtb \
 	fsl-ls2080a-rdb.dtb
arch/arm/dts/ls1021a-qds-lpuart.dts new file +16 -0
new file mode 100644
index 0000000..1d16ffd
@@ -0,0 +1,16 @@
+/*
+ * Freescale ls1021a QDS board common device tree source
+ *
+ * Copyright 2013-2015 Freescale Semiconductor, Inc.
+ *
+ * SPDX-License-Identifier:	GPL-2.0+
+ */
+
+/dts-v1/;
+#include "ls1021a-qds.dtsi"
+
+/ {
+	chosen {
+		stdout-path = &lpuart0;
+	};
+};
configs/ls1021aqds_ddr4_nor_lpuart_defconfig +4 -0
index 44b2a0d..ffac6dd 100644
@@ -1,7 +1,11 @@
 CONFIG_ARM=y
 CONFIG_TARGET_LS1021AQDS=y
 CONFIG_SYS_EXTRA_OPTIONS="SYS_FSL_DDR4,LPUART"
+CONFIG_DM_SERIAL=y
+CONFIG_DEFAULT_DEVICE_TREE="ls1021a-qds-duart"
 # CONFIG_CMD_SETEXPR is not set
+CONFIG_OF_CONTROL=y
+CONFIG_DM=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
 CONFIG_FSL_LPUART=y
configs/ls1021aqds_nor_lpuart_defconfig +4 -0
index 1186af2..e81448d 100644
@@ -1,7 +1,11 @@
 CONFIG_ARM=y
 CONFIG_TARGET_LS1021AQDS=y
+CONFIG_DM_SERIAL=y
+CONFIG_DEFAULT_DEVICE_TREE="ls1021a-qds-lpuart"
 CONFIG_SYS_EXTRA_OPTIONS="LPUART"
 # CONFIG_CMD_SETEXPR is not set
+CONFIG_OF_CONTROL=y
+CONFIG_DM=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
 CONFIG_FSL_LPUART=y
Signature · 1 line
1.7.9.5
author
#8 lore raw

cover Convert ls1021aqds to use driver model for serial ports

In reply to York Sun
Quoted 13 lines · York Sun

Since a recent merge 5160def "dm: lpuart: Drop the legacy code", ls1021aqds_ddr4_nor_lpuart and ls1021aqds_nor_lpuart failed to compile because they are using legacy driver for lpuart. Following ls1021atwr, ls1021aqds should be converted as well.

Not tested on boards yet. Serial DM driver is not enabled for SD and QSPI configuration.

York Sun (2):
arm: ls1021aqds: Convert to driver model and enable serial support
arm: ls1021aqds: Enable driver model lpuart serial driver

Quoted 16 lines
 arch/arm/dts/Makefile                              |    3 ++-
 arch/arm/dts/ls1021a-qds-duart.dts                 |   16 ++++++++++++++++
 arch/arm/dts/ls1021a-qds-lpuart.dts                |   16 ++++++++++++++++
 arch/arm/dts/{ls1021a-qds.dts => ls1021a-qds.dtsi} |    3 +--
 configs/ls1021aqds_ddr4_nor_defconfig              |    4 ++++
 configs/ls1021aqds_ddr4_nor_lpuart_defconfig       |    4 ++++
 configs/ls1021aqds_nor_defconfig                   |    4 ++++
 configs/ls1021aqds_nor_lpuart_defconfig            |    4 ++++
 configs/ls1021aqds_qspi_defconfig                  |    2 +-
 configs/ls1021aqds_sdcard_defconfig                |    3 +++
 include/configs/ls1021aqds.h                       |    2 ++
 11 files changed, 57 insertions(+), 4 deletions(-)
 create mode 100644 arch/arm/dts/ls1021a-qds-duart.dts
 create mode 100644 arch/arm/dts/ls1021a-qds-lpuart.dts
 rename arch/arm/dts/{ls1021a-qds.dts => ls1021a-qds.dtsi} (98%)

Alison,

Please review this set when you come back. I could only test NOR boot on the remote board.

York

#2 lore raw

RFC PATCH 1/2 arm: ls1021aqds: Convert to driver model and enable serial support

In reply to York Sun
Quoted 10 lines · York Sun

Split duart configuration as device tree file. Move /chosen node out of board commone device tree. Convert ls1021aqds nor and SD configurations to driver model support (qspi already uses DM). Enable ns16550 DM serial driver for nor configurations.

CC Alison Wang <[email protected]>
CC Bin Meng <[email protected]>

---

Quoted 12 lines
 arch/arm/dts/Makefile                              |    2 +-
 arch/arm/dts/ls1021a-qds-duart.dts                 |   16 ++++++++++++++++
 arch/arm/dts/{ls1021a-qds.dts => ls1021a-qds.dtsi} |    3 +--
 configs/ls1021aqds_ddr4_nor_defconfig              |    4 ++++
 configs/ls1021aqds_nor_defconfig                   |    4 ++++
 configs/ls1021aqds_qspi_defconfig                  |    2 +-
 configs/ls1021aqds_sdcard_defconfig                |    3 +++
 include/configs/ls1021aqds.h                       |    2 ++
 8 files changed, 32 insertions(+), 4 deletions(-)
 create mode 100644 arch/arm/dts/ls1021a-qds-duart.dts
 rename arch/arm/dts/{ls1021a-qds.dts => ls1021a-qds.dtsi} (98%)
#5 lore raw

RFC PATCH 2/2 arm: ls1021aqds: Enable driver model lpuart serial driver

In reply to York Sun

Hi York,

Quoted 55 lines · York Sun

Convert ls1021aqds_nor_lpuart and ls1021aqds_ddr4_nor_lpuart to driver model suport. Enable lpuart port driver.

CC Alison Wang <[email protected]>
CC Bin Meng <[email protected]>

---

 arch/arm/dts/Makefile                        |    1 +
 arch/arm/dts/ls1021a-qds-lpuart.dts          |   16 ++++++++++++++++
 configs/ls1021aqds_ddr4_nor_lpuart_defconfig |    4 ++++
 configs/ls1021aqds_nor_lpuart_defconfig      |    4 ++++
 4 files changed, 25 insertions(+)
 create mode 100644 arch/arm/dts/ls1021a-qds-lpuart.dts
arch/arm/dts/Makefile +1 -0
index ef58aec..c27b80c 100644
@@ -95,6 +95,7 @@ dtb-$(CONFIG_TARGET_BEAGLE_X15) += am57xx-beagle-x15.dtb
 dtb-$(CONFIG_TARGET_STV0991) += stv0991.dtb
 
 dtb-$(CONFIG_LS102XA) += ls1021a-qds-duart.dtb \
+       ls1021a-qds-lpuart.dtb \
        ls1021a-twr-duart.dtb ls1021a-twr-lpuart.dtb
 dtb-$(CONFIG_FSL_LSCH3) += fsl-ls2080a-qds.dtb \
        fsl-ls2080a-rdb.dtb
arch/arm/dts/ls1021a-qds-lpuart.dts new file +16 -0
new file mode 100644
index 0000000..1d16ffd
@@ -0,0 +1,16 @@
+/*
+ * Freescale ls1021a QDS board common device tree source
+ *
+ * Copyright 2013-2015 Freescale Semiconductor, Inc.
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+/dts-v1/;
+#include "ls1021a-qds.dtsi"
+
+/ {
+       chosen {
+               stdout-path = &lpuart0;
+       };
+};
configs/ls1021aqds_ddr4_nor_lpuart_defconfig +0 -0
index 44b2a0d..ffac6dd 100644

configs/ls1021aqds_ddr4_nor_lpuart_defconfig line 5

Quoted 5 lines
configs/ls1021aqds_ddr4_nor_lpuart_defconfig +2 -0
@@ -1,7 +1,11 @@
 CONFIG_ARM=y
 CONFIG_TARGET_LS1021AQDS=y
 CONFIG_SYS_EXTRA_OPTIONS="SYS_FSL_DDR4,LPUART"
+CONFIG_DM_SERIAL=y
+CONFIG_DEFAULT_DEVICE_TREE="ls1021a-qds-duart"

I believe this should be "ls1021a-qds-lpuart"?

Quoted 13 lines
configs/ls1021aqds_ddr4_nor_lpuart_defconfig +2 -0
 # CONFIG_CMD_SETEXPR is not set
+CONFIG_OF_CONTROL=y
+CONFIG_DM=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
 CONFIG_FSL_LPUART=y
configs/ls1021aqds_nor_lpuart_defconfig +0 -0
index 1186af2..e81448d 100644
@@ -1,7 +1,11 @@
 CONFIG_ARM=y
 CONFIG_TARGET_LS1021AQDS=y

configs/ls1021aqds_nor_lpuart_defconfig

Quoted 10 lines
configs/ls1021aqds_nor_lpuart_defconfig +4 -1
+CONFIG_DM_SERIAL=y
+CONFIG_DEFAULT_DEVICE_TREE="ls1021a-qds-lpuart"
 CONFIG_SYS_EXTRA_OPTIONS="LPUART"
 # CONFIG_CMD_SETEXPR is not set
+CONFIG_OF_CONTROL=y
+CONFIG_DM=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
 CONFIG_FSL_LPUART=y
--

Regards,
Bin

#9 lore raw

cover Convert ls1021aqds to use driver model for serial ports

In reply to york sun

Hi, York,

Quoted 33 lines · York Sun
Quoted 9 lines

Since a recent merge 5160def "dm: lpuart: Drop the legacy code", ls1021aqds_ddr4_nor_lpuart and ls1021aqds_nor_lpuart failed to compile because they are using legacy driver for lpuart. Following ls1021atwr, ls1021aqds should be converted as well.

Not tested on boards yet. Serial DM driver is not enabled for SD and QSPI configuration.

Quoted 6 lines

York Sun (2):
arm: ls1021aqds: Convert to driver model and enable serial support
arm: ls1021aqds: Enable driver model lpuart serial driver

 arch/arm/dts/Makefile                              |    3 ++-
 arch/arm/dts/ls1021a-qds-duart.dts                 |   16

++++++++++++++++

Quoted 1 line
 arch/arm/dts/ls1021a-qds-lpuart.dts                |   16

++++++++++++++++

Quoted 4 lines
 arch/arm/dts/{ls1021a-qds.dts => ls1021a-qds.dtsi} |    3 +--
 configs/ls1021aqds_ddr4_nor_defconfig              |    4 ++++
 configs/ls1021aqds_ddr4_nor_lpuart_defconfig       |    4 ++++
 configs/ls1021aqds_nor_defconfig                   |    4 ++++
Quoted 9 lines
 configs/ls1021aqds_nor_lpuart_defconfig            |    4 ++++
 configs/ls1021aqds_qspi_defconfig                  |    2 +-
 configs/ls1021aqds_sdcard_defconfig                |    3 +++
 include/configs/ls1021aqds.h                       |    2 ++
 11 files changed, 57 insertions(+), 4 deletions(-)  create mode
100644 arch/arm/dts/ls1021a-qds-duart.dts
 create mode 100644 arch/arm/dts/ls1021a-qds-lpuart.dts
 rename arch/arm/dts/{ls1021a-qds.dts => ls1021a-qds.dtsi} (98%)
Quoted 5 lines

Alison,

Please review this set when you come back. I could only test NOR boot on the remote board.

[Alison Wang] I reviewed this set, and have no other comments except Bin Meng's.

BTW, I tested this set on LS1021AQDS board with that little modification.

Best Regards,
Alison Wang

#3 lore raw

RFC PATCH 1/2 arm: ls1021aqds: Convert to driver model and enable serial support

In reply to York Sun
Quoted 21 lines

-----Original Message-----
From: York Sun [mailto:york.sun at nxp.com]
Sent: Tuesday, February 09, 2016 8:57 AM
To: u-boot at lists.denx.de
Cc: jteki at openedev.com; sjg at chromium.org; yamada.masahiro at socionext.com; lokeshvutla at ti.com; bmeng.cn at gmail.com; ijc at hellion.org.uk; hdegoede at redhat.com; albert.u.boot at aribaud.net; sr at denx.de; alison.wang at freescale.com; york sun; Huan Wang
Subject: [RFC PATCH v1 1/2] arm: ls1021aqds: Convert to driver model and enable serial support

Split duart configuration as device tree file. Move /chosen node out of board commone device tree. Convert ls1021aqds nor and SD configurations to driver model support (qspi already uses DM).
Enable ns16550 DM serial driver for nor configurations.

CC Alison Wang <[email protected]>
CC Bin Meng <[email protected]>

---

Quoted 13 lines
 arch/arm/dts/Makefile                              |    2 +-
 arch/arm/dts/ls1021a-qds-duart.dts                 |   16
++++++++++++++++
 arch/arm/dts/{ls1021a-qds.dts => ls1021a-qds.dtsi} |    3 +--
 configs/ls1021aqds_ddr4_nor_defconfig              |    4 ++++
 configs/ls1021aqds_nor_defconfig                   |    4 ++++
 configs/ls1021aqds_qspi_defconfig                  |    2 +-
 configs/ls1021aqds_sdcard_defconfig                |    3 +++
 include/configs/ls1021aqds.h                       |    2 ++
 8 files changed, 32 insertions(+), 4 deletions(-)  create mode 100644
arch/arm/dts/ls1021a-qds-duart.dts
 rename arch/arm/dts/{ls1021a-qds.dts => ls1021a-qds.dtsi} (98%)
#6 lore raw

RFC PATCH 2/2 arm: ls1021aqds: Enable driver model lpuart serial driver

In reply to Bin Meng

Hi, York,

Quoted 83 lines · York Sun
Quoted 58 lines

Convert ls1021aqds_nor_lpuart and ls1021aqds_ddr4_nor_lpuart to driver model suport. Enable lpuart port driver.

CC Alison Wang <[email protected]>
CC Bin Meng <[email protected]>

---

 arch/arm/dts/Makefile                        |    1 +
 arch/arm/dts/ls1021a-qds-lpuart.dts          |   16 ++++++++++++++++
 configs/ls1021aqds_ddr4_nor_lpuart_defconfig |    4 ++++
 configs/ls1021aqds_nor_lpuart_defconfig      |    4 ++++
 4 files changed, 25 insertions(+)
 create mode 100644 arch/arm/dts/ls1021a-qds-lpuart.dts
arch/arm/dts/Makefile index renamed from arch/arm/dts/Makefile +0 -0

ef58aec..c27b80c 100644

arch/arm/dts/Makefile +0 -0
@@ -95,6 +95,7 @@ dtb-$(CONFIG_TARGET_BEAGLE_X15) +=

am57xx-beagle-x15.dtb
dtb-$(CONFIG_TARGET_STV0991) += stv0991.dtb

dtb-$(CONFIG_LS102XA) += ls1021a-qds-duart.dtb \

arch/arm/dts/Makefile +1 -0
+       ls1021a-qds-lpuart.dtb \
        ls1021a-twr-duart.dtb ls1021a-twr-lpuart.dtb
 dtb-$(CONFIG_FSL_LSCH3) += fsl-ls2080a-qds.dtb \
        fsl-ls2080a-rdb.dtb
arch/arm/dts/ls1021a-qds-lpuart.dts new file +16 -0
new file mode 100644
index 0000000..1d16ffd
@@ -0,0 +1,16 @@
+/*
+ * Freescale ls1021a QDS board common device tree source
+ *
+ * Copyright 2013-2015 Freescale Semiconductor, Inc.
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+/dts-v1/;
+#include "ls1021a-qds.dtsi"
+
+/ {
+       chosen {
+               stdout-path = &lpuart0;
+       };
+};
configs/ls1021aqds_ddr4_nor_lpuart_defconfig +0 -0
index 44b2a0d..ffac6dd 100644

configs/ls1021aqds_ddr4_nor_lpuart_defconfig line 5

Quoted 5 lines
configs/ls1021aqds_ddr4_nor_lpuart_defconfig +2 -0
@@ -1,7 +1,11 @@
 CONFIG_ARM=y
 CONFIG_TARGET_LS1021AQDS=y
 CONFIG_SYS_EXTRA_OPTIONS="SYS_FSL_DDR4,LPUART"
+CONFIG_DM_SERIAL=y
+CONFIG_DEFAULT_DEVICE_TREE="ls1021a-qds-duart"

I believe this should be "ls1021a-qds-lpuart"?

Quoted 16 lines
configs/ls1021aqds_ddr4_nor_lpuart_defconfig +2 -0
 # CONFIG_CMD_SETEXPR is not set
+CONFIG_OF_CONTROL=y
+CONFIG_DM=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
 CONFIG_FSL_LPUART=y
configs/ls1021aqds_nor_lpuart_defconfig +2 -0
index 1186af2..e81448d 100644
@@ -1,7 +1,11 @@
 CONFIG_ARM=y
 CONFIG_TARGET_LS1021AQDS=y
+CONFIG_DM_SERIAL=y
+CONFIG_DEFAULT_DEVICE_TREE="ls1021a-qds-lpuart"
Quoted 9 lines

configs/ls1021aqds_nor_lpuart_defconfig

Quoted 8 lines
configs/ls1021aqds_nor_lpuart_defconfig +2 -1
 CONFIG_SYS_EXTRA_OPTIONS="LPUART"
 # CONFIG_CMD_SETEXPR is not set
+CONFIG_OF_CONTROL=y
+CONFIG_DM=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
 CONFIG_FSL_LPUART=y
--

[Alison Wang] I reviewed this set, and have no other comments except Bin Meng's.

BTW, I tested this set on LS1021AQDS board with that little modification about the comment.

Best Regards,
Alison Wang

author
#7 lore raw

RFC PATCH 2/2 arm: ls1021aqds: Enable driver model lpuart serial driver

Quoted 94 lines · Huan Wang

Hi, York,

Quoted 83 lines · York Sun
Quoted 58 lines

Convert ls1021aqds_nor_lpuart and ls1021aqds_ddr4_nor_lpuart to driver model suport. Enable lpuart port driver.

CC Alison Wang <[email protected]>
CC Bin Meng <[email protected]>

---

 arch/arm/dts/Makefile                        |    1 +
 arch/arm/dts/ls1021a-qds-lpuart.dts          |   16 ++++++++++++++++
 configs/ls1021aqds_ddr4_nor_lpuart_defconfig |    4 ++++
 configs/ls1021aqds_nor_lpuart_defconfig      |    4 ++++
 4 files changed, 25 insertions(+)
 create mode 100644 arch/arm/dts/ls1021a-qds-lpuart.dts
arch/arm/dts/Makefile index renamed from arch/arm/dts/Makefile +0 -0

ef58aec..c27b80c 100644

arch/arm/dts/Makefile +0 -0
@@ -95,6 +95,7 @@ dtb-$(CONFIG_TARGET_BEAGLE_X15) +=

am57xx-beagle-x15.dtb
dtb-$(CONFIG_TARGET_STV0991) += stv0991.dtb

dtb-$(CONFIG_LS102XA) += ls1021a-qds-duart.dtb \

arch/arm/dts/Makefile +1 -0
+       ls1021a-qds-lpuart.dtb \
        ls1021a-twr-duart.dtb ls1021a-twr-lpuart.dtb
 dtb-$(CONFIG_FSL_LSCH3) += fsl-ls2080a-qds.dtb \
        fsl-ls2080a-rdb.dtb
arch/arm/dts/ls1021a-qds-lpuart.dts new file +16 -0
new file mode 100644
index 0000000..1d16ffd
@@ -0,0 +1,16 @@
+/*
+ * Freescale ls1021a QDS board common device tree source
+ *
+ * Copyright 2013-2015 Freescale Semiconductor, Inc.
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+/dts-v1/;
+#include "ls1021a-qds.dtsi"
+
+/ {
+       chosen {
+               stdout-path = &lpuart0;
+       };
+};
configs/ls1021aqds_ddr4_nor_lpuart_defconfig +0 -0
index 44b2a0d..ffac6dd 100644

configs/ls1021aqds_ddr4_nor_lpuart_defconfig line 5

Quoted 5 lines
configs/ls1021aqds_ddr4_nor_lpuart_defconfig +2 -0
@@ -1,7 +1,11 @@
 CONFIG_ARM=y
 CONFIG_TARGET_LS1021AQDS=y
 CONFIG_SYS_EXTRA_OPTIONS="SYS_FSL_DDR4,LPUART"
+CONFIG_DM_SERIAL=y
+CONFIG_DEFAULT_DEVICE_TREE="ls1021a-qds-duart"

I believe this should be "ls1021a-qds-lpuart"?

Quoted 16 lines
configs/ls1021aqds_ddr4_nor_lpuart_defconfig +2 -0
 # CONFIG_CMD_SETEXPR is not set
+CONFIG_OF_CONTROL=y
+CONFIG_DM=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
 CONFIG_FSL_LPUART=y
configs/ls1021aqds_nor_lpuart_defconfig +2 -0
index 1186af2..e81448d 100644
@@ -1,7 +1,11 @@
 CONFIG_ARM=y
 CONFIG_TARGET_LS1021AQDS=y
+CONFIG_DM_SERIAL=y
+CONFIG_DEFAULT_DEVICE_TREE="ls1021a-qds-lpuart"
Quoted 9 lines

configs/ls1021aqds_nor_lpuart_defconfig

Quoted 8 lines
configs/ls1021aqds_nor_lpuart_defconfig +2 -1
 CONFIG_SYS_EXTRA_OPTIONS="LPUART"
 # CONFIG_CMD_SETEXPR is not set
+CONFIG_OF_CONTROL=y
+CONFIG_DM=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
 CONFIG_FSL_LPUART=y
--
Quoted 4 lines

[Alison Wang] I reviewed this set, and have no other comments except Bin Meng's.

BTW, I tested this set on LS1021AQDS board with that little modification about the comment.

Thanks. I will send out an update.

York