All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/7] Enable DM_SERIAL for the LS104xA RDB/FRWY boards
@ 2023-06-15 12:37 Camelia Groza
  2023-06-15 12:37 ` [PATCH 1/7] arch: arm: dts: ls1043a: sync serial nodes with Linux Camelia Groza
                   ` (6 more replies)
  0 siblings, 7 replies; 12+ messages in thread
From: Camelia Groza @ 2023-06-15 12:37 UTC (permalink / raw)
  To: peng.fan, mingkai.hu, pramod.kumar_1, u-boot; +Cc: Camelia Groza

This series enables DM_SERIAL for ls1043ardb, ls1046ardb and
ls1046afrwy.

First, the device tree serial nodes are synced with their counterpart
descriptions in Linux.

Secondly, the serial nodes are tagged with 'bootph-all' to guarantee
the drivers are initialized before relocation.

Lastly, CONFIG_DM_SERIAL is enabled in the relevant defconfigs.

Camelia Groza (7):
  arch: arm: dts: ls1043a: sync serial nodes with Linux
  arch: arm: dts: ls1043a: tag the serial nodes with bootph-all
  configs: ls1043ardb: enable DM_SERIAL
  arch: arm: dts: ls1046a: sync serial nodes with Linux
  arch: arm: dts: ls1046a: tag the serial nodes with bootph-all
  configs: ls1046ardb: enable DM_SERIAL
  configs: ls1046afrwy: enable DM_SERIAL

 arch/arm/dts/fsl-ls1043a-qds.dtsi             |  2 +-
 arch/arm/dts/fsl-ls1043a-rdb.dts              |  6 +++-
 arch/arm/dts/fsl-ls1043a.dtsi                 | 20 +++++++++----
 arch/arm/dts/fsl-ls1046a-frwy.dts             | 22 ++++++++++++++-
 arch/arm/dts/fsl-ls1046a-qds.dtsi             |  2 +-
 arch/arm/dts/fsl-ls1046a-rdb.dts              | 14 +++++++++-
 arch/arm/dts/fsl-ls1046a.dtsi                 | 28 +++++++++++++------
 configs/ls1043ardb_SECURE_BOOT_defconfig      |  4 ++-
 configs/ls1043ardb_defconfig                  |  4 ++-
 configs/ls1043ardb_nand_SECURE_BOOT_defconfig |  4 ++-
 configs/ls1043ardb_nand_defconfig             |  3 +-
 .../ls1043ardb_sdcard_SECURE_BOOT_defconfig   |  4 ++-
 configs/ls1043ardb_sdcard_defconfig           |  3 +-
 configs/ls1043ardb_tfa_SECURE_BOOT_defconfig  |  4 ++-
 configs/ls1043ardb_tfa_defconfig              |  4 ++-
 configs/ls1046afrwy_tfa_SECURE_BOOT_defconfig |  4 ++-
 configs/ls1046afrwy_tfa_defconfig             |  4 ++-
 configs/ls1046ardb_emmc_defconfig             |  3 +-
 configs/ls1046ardb_qspi_SECURE_BOOT_defconfig |  4 ++-
 configs/ls1046ardb_qspi_defconfig             |  4 ++-
 configs/ls1046ardb_qspi_spl_defconfig         |  3 +-
 .../ls1046ardb_sdcard_SECURE_BOOT_defconfig   |  4 ++-
 configs/ls1046ardb_sdcard_defconfig           |  3 +-
 configs/ls1046ardb_tfa_SECURE_BOOT_defconfig  |  4 ++-
 configs/ls1046ardb_tfa_defconfig              |  4 ++-
 25 files changed, 124 insertions(+), 37 deletions(-)

--
2.17.1


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH 1/7] arch: arm: dts: ls1043a: sync serial nodes with Linux
  2023-06-15 12:37 [PATCH 0/7] Enable DM_SERIAL for the LS104xA RDB/FRWY boards Camelia Groza
@ 2023-06-15 12:37 ` Camelia Groza
  2023-06-16  1:10   ` Peng Fan
  2023-06-15 12:37 ` [PATCH 2/7] arch: arm: dts: ls1043a: tag serial nodes with bootph-all Camelia Groza
                   ` (5 subsequent siblings)
  6 siblings, 1 reply; 12+ messages in thread
From: Camelia Groza @ 2023-06-15 12:37 UTC (permalink / raw)
  To: peng.fan, mingkai.hu, pramod.kumar_1, u-boot; +Cc: Camelia Groza

Pick up the serial node descriptions from Linux for the ls1043ardb board
and its dependencies. Including the fsl,qoriq-clockgen.h and arm-gic.h
headers forces us to change the include directives to explicitly go through
the C preprocessor for all boards in the ls1043a SoC family.

Signed-off-by: Camelia Groza <camelia.groza@nxp.com>
---
 arch/arm/dts/fsl-ls1043a-qds.dtsi |  2 +-
 arch/arm/dts/fsl-ls1043a-rdb.dts  |  6 +++++-
 arch/arm/dts/fsl-ls1043a.dtsi     | 16 +++++++++++-----
 3 files changed, 17 insertions(+), 7 deletions(-)

diff --git a/arch/arm/dts/fsl-ls1043a-qds.dtsi b/arch/arm/dts/fsl-ls1043a-qds.dtsi
index 884bdad196b3..5e02cd91d75f 100644
--- a/arch/arm/dts/fsl-ls1043a-qds.dtsi
+++ b/arch/arm/dts/fsl-ls1043a-qds.dtsi
@@ -7,7 +7,7 @@
  * Mingkai Hu <Mingkai.hu@freescale.com>
  */
 
-/include/ "fsl-ls1043a.dtsi"
+#include "fsl-ls1043a.dtsi"
 
 / {
 	model = "LS1043A QDS Board";
diff --git a/arch/arm/dts/fsl-ls1043a-rdb.dts b/arch/arm/dts/fsl-ls1043a-rdb.dts
index 9e7c79fd2b98..f5b3bb68b3db 100644
--- a/arch/arm/dts/fsl-ls1043a-rdb.dts
+++ b/arch/arm/dts/fsl-ls1043a-rdb.dts
@@ -9,13 +9,17 @@
  */
 
 /dts-v1/;
-/include/ "fsl-ls1043a.dtsi"
+#include "fsl-ls1043a.dtsi"
 
 / {
 	model = "LS1043A RDB Board";
 
         aliases {
 		spi1 = &dspi0;
+		serial0 = &duart0;
+		serial1 = &duart1;
+		serial2 = &duart2;
+		serial3 = &duart3;
         };
 
 };
diff --git a/arch/arm/dts/fsl-ls1043a.dtsi b/arch/arm/dts/fsl-ls1043a.dtsi
index 4960973a6035..21643a1d951f 100644
--- a/arch/arm/dts/fsl-ls1043a.dtsi
+++ b/arch/arm/dts/fsl-ls1043a.dtsi
@@ -8,7 +8,9 @@
  * Mingkai Hu <Mingkai.hu@freescale.com>
  */
 
-/include/ "skeleton64.dtsi"
+#include "skeleton64.dtsi"
+#include <dt-bindings/clock/fsl,qoriq-clockgen.h>
+#include <dt-bindings/interrupt-controller/arm-gic.h>
 
 / {
 	compatible = "fsl,ls1043a";
@@ -223,28 +225,32 @@
 			compatible = "fsl,ns16550", "ns16550a";
 			reg = <0x00 0x21c0500 0x0 0x100>;
 			interrupts = <0 54 0x4>;
-			clocks = <&clockgen 4 0>;
+			clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL
+					    QORIQ_CLK_PLL_DIV(1)>;
 		};
 
 		duart1: serial@21c0600 {
 			compatible = "fsl,ns16550", "ns16550a";
 			reg = <0x00 0x21c0600 0x0 0x100>;
 			interrupts = <0 54 0x4>;
-			clocks = <&clockgen 4 0>;
+			clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL
+					    QORIQ_CLK_PLL_DIV(1)>;
 		};
 
 		duart2: serial@21d0500 {
 			compatible = "fsl,ns16550", "ns16550a";
 			reg = <0x0 0x21d0500 0x0 0x100>;
 			interrupts = <0 55 0x4>;
-			clocks = <&clockgen 4 0>;
+			clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL
+					    QORIQ_CLK_PLL_DIV(1)>;
 		};
 
 		duart3: serial@21d0600 {
 			compatible = "fsl,ns16550", "ns16550a";
 			reg = <0x0 0x21d0600 0x0 0x100>;
 			interrupts = <0 55 0x4>;
-			clocks = <&clockgen 4 0>;
+			clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL
+					    QORIQ_CLK_PLL_DIV(1)>;
 		};
 
 		lpuart0: serial@2950000 {
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 2/7] arch: arm: dts: ls1043a: tag serial nodes with bootph-all
  2023-06-15 12:37 [PATCH 0/7] Enable DM_SERIAL for the LS104xA RDB/FRWY boards Camelia Groza
  2023-06-15 12:37 ` [PATCH 1/7] arch: arm: dts: ls1043a: sync serial nodes with Linux Camelia Groza
@ 2023-06-15 12:37 ` Camelia Groza
  2023-06-16  1:11   ` Peng Fan
  2023-06-15 12:37 ` [PATCH 3/7] configs: ls1043ardb: enable DM_SERIAL Camelia Groza
                   ` (4 subsequent siblings)
  6 siblings, 1 reply; 12+ messages in thread
From: Camelia Groza @ 2023-06-15 12:37 UTC (permalink / raw)
  To: peng.fan, mingkai.hu, pramod.kumar_1, u-boot; +Cc: Camelia Groza

Make sure the serial driver is initialized before relocation by tagging
the serial nodes with "bootph-all".

Signed-off-by: Camelia Groza <camelia.groza@nxp.com>
---
 arch/arm/dts/fsl-ls1043a.dtsi | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm/dts/fsl-ls1043a.dtsi b/arch/arm/dts/fsl-ls1043a.dtsi
index 21643a1d951f..79f67e7183c3 100644
--- a/arch/arm/dts/fsl-ls1043a.dtsi
+++ b/arch/arm/dts/fsl-ls1043a.dtsi
@@ -227,6 +227,7 @@
 			interrupts = <0 54 0x4>;
 			clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL
 					    QORIQ_CLK_PLL_DIV(1)>;
+			bootph-all;
 		};

 		duart1: serial@21c0600 {
@@ -235,6 +236,7 @@
 			interrupts = <0 54 0x4>;
 			clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL
 					    QORIQ_CLK_PLL_DIV(1)>;
+			bootph-all;
 		};

 		duart2: serial@21d0500 {
@@ -243,6 +245,7 @@
 			interrupts = <0 55 0x4>;
 			clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL
 					    QORIQ_CLK_PLL_DIV(1)>;
+			bootph-all;
 		};

 		duart3: serial@21d0600 {
@@ -251,6 +254,7 @@
 			interrupts = <0 55 0x4>;
 			clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL
 					    QORIQ_CLK_PLL_DIV(1)>;
+			bootph-all;
 		};

 		lpuart0: serial@2950000 {
--
2.17.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 3/7] configs: ls1043ardb: enable DM_SERIAL
  2023-06-15 12:37 [PATCH 0/7] Enable DM_SERIAL for the LS104xA RDB/FRWY boards Camelia Groza
  2023-06-15 12:37 ` [PATCH 1/7] arch: arm: dts: ls1043a: sync serial nodes with Linux Camelia Groza
  2023-06-15 12:37 ` [PATCH 2/7] arch: arm: dts: ls1043a: tag serial nodes with bootph-all Camelia Groza
@ 2023-06-15 12:37 ` Camelia Groza
  2023-06-15 12:37 ` [PATCH 4/7] arch: arm: dts: ls1046a: sync serial nodes with Linux Camelia Groza
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 12+ messages in thread
From: Camelia Groza @ 2023-06-15 12:37 UTC (permalink / raw)
  To: peng.fan, mingkai.hu, pramod.kumar_1, u-boot; +Cc: Camelia Groza

As the serial devices are configured in the device tree, enable
DM_SERIAL in the ls1043ardb defconfigs.

Signed-off-by: Camelia Groza <camelia.groza@nxp.com>
---
 configs/ls1043ardb_SECURE_BOOT_defconfig        | 4 +++-
 configs/ls1043ardb_defconfig                    | 4 +++-
 configs/ls1043ardb_nand_SECURE_BOOT_defconfig   | 4 +++-
 configs/ls1043ardb_nand_defconfig               | 3 ++-
 configs/ls1043ardb_sdcard_SECURE_BOOT_defconfig | 4 +++-
 configs/ls1043ardb_sdcard_defconfig             | 3 ++-
 configs/ls1043ardb_tfa_SECURE_BOOT_defconfig    | 4 +++-
 configs/ls1043ardb_tfa_defconfig                | 4 +++-
 8 files changed, 22 insertions(+), 8 deletions(-)

diff --git a/configs/ls1043ardb_SECURE_BOOT_defconfig b/configs/ls1043ardb_SECURE_BOOT_defconfig
index 069a8dc0c3ce..ea195d7c5041 100644
--- a/configs/ls1043ardb_SECURE_BOOT_defconfig
+++ b/configs/ls1043ardb_SECURE_BOOT_defconfig
@@ -86,7 +86,9 @@ CONFIG_NVME_PCI=y
 CONFIG_PCIE_LAYERSCAPE_RC=y
 CONFIG_SYS_QE_FW_ADDR=0x60940000
 CONFIG_SYS_QE_FMAN_FW_IN_NOR=y
-CONFIG_SYS_NS16550_SERIAL=y
+CONFIG_SPECIFY_CONSOLE_INDEX=y
+CONFIG_DM_SERIAL=y
+CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
 CONFIG_USB=y
diff --git a/configs/ls1043ardb_defconfig b/configs/ls1043ardb_defconfig
index e796c0a9a2e0..ae8600ffd958 100644
--- a/configs/ls1043ardb_defconfig
+++ b/configs/ls1043ardb_defconfig
@@ -89,7 +89,9 @@ CONFIG_NVME_PCI=y
 CONFIG_PCIE_LAYERSCAPE_RC=y
 CONFIG_SYS_QE_FW_ADDR=0x60940000
 CONFIG_SYS_QE_FMAN_FW_IN_NOR=y
-CONFIG_SYS_NS16550_SERIAL=y
+CONFIG_SPECIFY_CONSOLE_INDEX=y
+CONFIG_DM_SERIAL=y
+CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
 CONFIG_USB=y
diff --git a/configs/ls1043ardb_nand_SECURE_BOOT_defconfig b/configs/ls1043ardb_nand_SECURE_BOOT_defconfig
index f5faa02e5920..d9ff0fd16a58 100644
--- a/configs/ls1043ardb_nand_SECURE_BOOT_defconfig
+++ b/configs/ls1043ardb_nand_SECURE_BOOT_defconfig
@@ -110,7 +110,9 @@ CONFIG_SYS_FMAN_FW_ADDR=0x900000
 CONFIG_NVME_PCI=y
 CONFIG_PCIE_LAYERSCAPE_RC=y
 CONFIG_SYS_QE_FMAN_FW_IN_NAND=y
-CONFIG_SYS_NS16550_SERIAL=y
+CONFIG_SPECIFY_CONSOLE_INDEX=y
+CONFIG_DM_SERIAL=y
+CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
 CONFIG_USB=y
diff --git a/configs/ls1043ardb_nand_defconfig b/configs/ls1043ardb_nand_defconfig
index b75550b2d3ad..ad118187432e 100644
--- a/configs/ls1043ardb_nand_defconfig
+++ b/configs/ls1043ardb_nand_defconfig
@@ -117,7 +117,8 @@ CONFIG_SYS_FMAN_FW_ADDR=0x900000
 CONFIG_NVME_PCI=y
 CONFIG_PCIE_LAYERSCAPE_RC=y
 CONFIG_SYS_QE_FMAN_FW_IN_NAND=y
-CONFIG_SYS_NS16550_SERIAL=y
+CONFIG_DM_SERIAL=y
+CONFIG_SPL_SYS_NS16550_SERIAL=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
 CONFIG_USB=y
diff --git a/configs/ls1043ardb_sdcard_SECURE_BOOT_defconfig b/configs/ls1043ardb_sdcard_SECURE_BOOT_defconfig
index 3e0d16430e04..fe0dd04f1f90 100644
--- a/configs/ls1043ardb_sdcard_SECURE_BOOT_defconfig
+++ b/configs/ls1043ardb_sdcard_SECURE_BOOT_defconfig
@@ -110,7 +110,9 @@ CONFIG_SYS_FMAN_FW_ADDR=0x900000
 CONFIG_PCIE_LAYERSCAPE_RC=y
 CONFIG_SYS_QE_FW_ADDR=0x940000
 CONFIG_SYS_QE_FMAN_FW_IN_MMC=y
-CONFIG_SYS_NS16550_SERIAL=y
+CONFIG_SPECIFY_CONSOLE_INDEX=y
+CONFIG_DM_SERIAL=y
+CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
 CONFIG_USB=y
diff --git a/configs/ls1043ardb_sdcard_defconfig b/configs/ls1043ardb_sdcard_defconfig
index 04e66f1e6ca2..aa5404cbb50e 100644
--- a/configs/ls1043ardb_sdcard_defconfig
+++ b/configs/ls1043ardb_sdcard_defconfig
@@ -115,7 +115,8 @@ CONFIG_NVME_PCI=y
 CONFIG_PCIE_LAYERSCAPE_RC=y
 CONFIG_SYS_QE_FW_ADDR=0x940000
 CONFIG_SYS_QE_FMAN_FW_IN_MMC=y
-CONFIG_SYS_NS16550_SERIAL=y
+CONFIG_DM_SERIAL=y
+CONFIG_SPL_SYS_NS16550_SERIAL=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
 CONFIG_USB=y
diff --git a/configs/ls1043ardb_tfa_SECURE_BOOT_defconfig b/configs/ls1043ardb_tfa_SECURE_BOOT_defconfig
index cf4623eb631d..480e928936a9 100644
--- a/configs/ls1043ardb_tfa_SECURE_BOOT_defconfig
+++ b/configs/ls1043ardb_tfa_SECURE_BOOT_defconfig
@@ -84,7 +84,9 @@ CONFIG_SYS_FMAN_FW_ADDR=0x900000
 CONFIG_NVME_PCI=y
 CONFIG_PCIE_LAYERSCAPE_RC=y
 CONFIG_SYS_QE_FW_ADDR=0x940000
-CONFIG_SYS_NS16550_SERIAL=y
+CONFIG_SPECIFY_CONSOLE_INDEX=y
+CONFIG_DM_SERIAL=y
+CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
 CONFIG_USB=y
diff --git a/configs/ls1043ardb_tfa_defconfig b/configs/ls1043ardb_tfa_defconfig
index 15e2916538a1..e25904170858 100644
--- a/configs/ls1043ardb_tfa_defconfig
+++ b/configs/ls1043ardb_tfa_defconfig
@@ -90,7 +90,9 @@ CONFIG_SYS_FMAN_FW_ADDR=0x900000
 CONFIG_NVME_PCI=y
 CONFIG_PCIE_LAYERSCAPE_RC=y
 CONFIG_SYS_QE_FW_ADDR=0x940000
-CONFIG_SYS_NS16550_SERIAL=y
+CONFIG_SPECIFY_CONSOLE_INDEX=y
+CONFIG_DM_SERIAL=y
+CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
 CONFIG_USB=y
--
2.17.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 4/7] arch: arm: dts: ls1046a: sync serial nodes with Linux
  2023-06-15 12:37 [PATCH 0/7] Enable DM_SERIAL for the LS104xA RDB/FRWY boards Camelia Groza
                   ` (2 preceding siblings ...)
  2023-06-15 12:37 ` [PATCH 3/7] configs: ls1043ardb: enable DM_SERIAL Camelia Groza
@ 2023-06-15 12:37 ` Camelia Groza
  2023-06-16  1:12   ` Peng Fan
  2023-06-15 12:37 ` [PATCH 5/7] arch: arm: dts: ls1046a: tag serial nodes with bootph-all Camelia Groza
                   ` (2 subsequent siblings)
  6 siblings, 1 reply; 12+ messages in thread
From: Camelia Groza @ 2023-06-15 12:37 UTC (permalink / raw)
  To: peng.fan, mingkai.hu, pramod.kumar_1, u-boot; +Cc: Camelia Groza

Pick up the serial node descriptions from Linux for the ls1046ardb and
ls1046afrwy boards and their dependencies. Including the
fsl,qoriq-clockgen.h and arm-gic.h headers forces us to change the include
directives to explicitly go through the C preprocessor for all boards in
the ls1046a SoC family.

Signed-off-by: Camelia Groza <camelia.groza@nxp.com>
---
 arch/arm/dts/fsl-ls1046a-frwy.dts | 22 +++++++++++++++++++++-
 arch/arm/dts/fsl-ls1046a-qds.dtsi |  2 +-
 arch/arm/dts/fsl-ls1046a-rdb.dts  | 14 +++++++++++++-
 arch/arm/dts/fsl-ls1046a.dtsi     | 24 +++++++++++++++---------
 4 files changed, 50 insertions(+), 12 deletions(-)

diff --git a/arch/arm/dts/fsl-ls1046a-frwy.dts b/arch/arm/dts/fsl-ls1046a-frwy.dts
index cda05411d881..f3ba2acd6d51 100644
--- a/arch/arm/dts/fsl-ls1046a-frwy.dts
+++ b/arch/arm/dts/fsl-ls1046a-frwy.dts
@@ -7,17 +7,37 @@
  */
 
 /dts-v1/;
-/include/ "fsl-ls1046a.dtsi"
+#include "fsl-ls1046a.dtsi"
 
 / {
 	model = "LS1046A FRWY Board";
 
 	aliases {
 		spi0 = &qspi;
+		serial0 = &duart0;
+		serial1 = &duart1;
+		serial2 = &duart2;
+		serial3 = &duart3;
 	};
 
 };
 
+&duart0 {
+	status = "okay";
+};
+
+&duart1 {
+	status = "okay";
+};
+
+&duart2 {
+	status = "okay";
+};
+
+&duart3 {
+	status = "okay";
+};
+
 &qspi {
 	status = "okay";
 
diff --git a/arch/arm/dts/fsl-ls1046a-qds.dtsi b/arch/arm/dts/fsl-ls1046a-qds.dtsi
index fec5c8ddb23a..d66824975c5e 100644
--- a/arch/arm/dts/fsl-ls1046a-qds.dtsi
+++ b/arch/arm/dts/fsl-ls1046a-qds.dtsi
@@ -7,7 +7,7 @@
  * Mingkai Hu <Mingkai.hu@nxp.com>
  */
 
-/include/ "fsl-ls1046a.dtsi"
+#include "fsl-ls1046a.dtsi"
 
 / {
 	model = "LS1046A QDS Board";
diff --git a/arch/arm/dts/fsl-ls1046a-rdb.dts b/arch/arm/dts/fsl-ls1046a-rdb.dts
index 464129291c91..66d718905c7d 100644
--- a/arch/arm/dts/fsl-ls1046a-rdb.dts
+++ b/arch/arm/dts/fsl-ls1046a-rdb.dts
@@ -9,17 +9,29 @@
  */
 
 /dts-v1/;
-/include/ "fsl-ls1046a.dtsi"
+#include "fsl-ls1046a.dtsi"
 
 / {
 	model = "LS1046A RDB Board";
 
 	aliases {
 		spi0 = &qspi;
+		serial0 = &duart0;
+		serial1 = &duart1;
+		serial2 = &duart2;
+		serial3 = &duart3;
 	};
 
 };
 
+&duart0 {
+	status = "okay";
+};
+
+&duart1 {
+	status = "okay";
+};
+
 &qspi {
 	status = "okay";
 
diff --git a/arch/arm/dts/fsl-ls1046a.dtsi b/arch/arm/dts/fsl-ls1046a.dtsi
index 060dc399c2f6..9fdd398e2c4c 100644
--- a/arch/arm/dts/fsl-ls1046a.dtsi
+++ b/arch/arm/dts/fsl-ls1046a.dtsi
@@ -8,7 +8,9 @@
  * Mingkai Hu <mingkai.hu@nxp.com>
  */
 
-/include/ "skeleton64.dtsi"
+#include "skeleton64.dtsi"
+#include <dt-bindings/clock/fsl,qoriq-clockgen.h>
+#include <dt-bindings/interrupt-controller/arm-gic.h>
 
 / {
 	compatible = "fsl,ls1046a";
@@ -222,29 +224,33 @@
 		duart0: serial@21c0500 {
 			compatible = "fsl,ns16550", "ns16550a";
 			reg = <0x00 0x21c0500 0x0 0x100>;
-			interrupts = <0 54 0x4>;
-			clocks = <&clockgen 4 0>;
+			interrupts = <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL
+					    QORIQ_CLK_PLL_DIV(2)>;
 		};
 
 		duart1: serial@21c0600 {
 			compatible = "fsl,ns16550", "ns16550a";
 			reg = <0x00 0x21c0600 0x0 0x100>;
-			interrupts = <0 54 0x4>;
-			clocks = <&clockgen 4 0>;
+			interrupts = <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL
+					    QORIQ_CLK_PLL_DIV(2)>;
 		};
 
 		duart2: serial@21d0500 {
 			compatible = "fsl,ns16550", "ns16550a";
 			reg = <0x0 0x21d0500 0x0 0x100>;
-			interrupts = <0 55 0x4>;
-			clocks = <&clockgen 4 0>;
+			interrupts = <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL
+					    QORIQ_CLK_PLL_DIV(2)>;
 		};
 
 		duart3: serial@21d0600 {
 			compatible = "fsl,ns16550", "ns16550a";
 			reg = <0x0 0x21d0600 0x0 0x100>;
-			interrupts = <0 55 0x4>;
-			clocks = <&clockgen 4 0>;
+			interrupts = <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL
+					    QORIQ_CLK_PLL_DIV(2)>;
 		};
 
 		lpuart0: serial@2950000 {
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 5/7] arch: arm: dts: ls1046a: tag serial nodes with bootph-all
  2023-06-15 12:37 [PATCH 0/7] Enable DM_SERIAL for the LS104xA RDB/FRWY boards Camelia Groza
                   ` (3 preceding siblings ...)
  2023-06-15 12:37 ` [PATCH 4/7] arch: arm: dts: ls1046a: sync serial nodes with Linux Camelia Groza
@ 2023-06-15 12:37 ` Camelia Groza
  2023-06-16  1:12   ` Peng Fan
  2023-06-15 12:37 ` [PATCH 6/7] configs: ls1046ardb: enable DM_SERIAL Camelia Groza
  2023-06-15 12:37 ` [PATCH 7/7] configs: ls1046afrwy: " Camelia Groza
  6 siblings, 1 reply; 12+ messages in thread
From: Camelia Groza @ 2023-06-15 12:37 UTC (permalink / raw)
  To: peng.fan, mingkai.hu, pramod.kumar_1, u-boot; +Cc: Camelia Groza

Make sure the serial driver is initialized before relocation by tagging
the serial nodes with "bootph-all".

Signed-off-by: Camelia Groza <camelia.groza@nxp.com>
---
 arch/arm/dts/fsl-ls1046a.dtsi | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm/dts/fsl-ls1046a.dtsi b/arch/arm/dts/fsl-ls1046a.dtsi
index 9fdd398e2c4c..3986360c0c93 100644
--- a/arch/arm/dts/fsl-ls1046a.dtsi
+++ b/arch/arm/dts/fsl-ls1046a.dtsi
@@ -227,6 +227,7 @@
 			interrupts = <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>;
 			clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL
 					    QORIQ_CLK_PLL_DIV(2)>;
+			bootph-all;
 		};

 		duart1: serial@21c0600 {
@@ -235,6 +236,7 @@
 			interrupts = <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>;
 			clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL
 					    QORIQ_CLK_PLL_DIV(2)>;
+			bootph-all;
 		};

 		duart2: serial@21d0500 {
@@ -243,6 +245,7 @@
 			interrupts = <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>;
 			clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL
 					    QORIQ_CLK_PLL_DIV(2)>;
+			bootph-all;
 		};

 		duart3: serial@21d0600 {
@@ -251,6 +254,7 @@
 			interrupts = <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>;
 			clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL
 					    QORIQ_CLK_PLL_DIV(2)>;
+			bootph-all;
 		};

 		lpuart0: serial@2950000 {
--
2.17.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 6/7] configs: ls1046ardb: enable DM_SERIAL
  2023-06-15 12:37 [PATCH 0/7] Enable DM_SERIAL for the LS104xA RDB/FRWY boards Camelia Groza
                   ` (4 preceding siblings ...)
  2023-06-15 12:37 ` [PATCH 5/7] arch: arm: dts: ls1046a: tag serial nodes with bootph-all Camelia Groza
@ 2023-06-15 12:37 ` Camelia Groza
  2023-06-15 12:37 ` [PATCH 7/7] configs: ls1046afrwy: " Camelia Groza
  6 siblings, 0 replies; 12+ messages in thread
From: Camelia Groza @ 2023-06-15 12:37 UTC (permalink / raw)
  To: peng.fan, mingkai.hu, pramod.kumar_1, u-boot; +Cc: Camelia Groza

As the serial devices are configured in the device tree, enable
DM_SERIAL in the ls1046ardb defconfigs.

Signed-off-by: Camelia Groza <camelia.groza@nxp.com>
---
 configs/ls1046ardb_emmc_defconfig               | 3 ++-
 configs/ls1046ardb_qspi_SECURE_BOOT_defconfig   | 4 +++-
 configs/ls1046ardb_qspi_defconfig               | 4 +++-
 configs/ls1046ardb_qspi_spl_defconfig           | 3 ++-
 configs/ls1046ardb_sdcard_SECURE_BOOT_defconfig | 4 +++-
 configs/ls1046ardb_sdcard_defconfig             | 3 ++-
 configs/ls1046ardb_tfa_SECURE_BOOT_defconfig    | 4 +++-
 configs/ls1046ardb_tfa_defconfig                | 4 +++-
 8 files changed, 21 insertions(+), 8 deletions(-)

diff --git a/configs/ls1046ardb_emmc_defconfig b/configs/ls1046ardb_emmc_defconfig
index 7be98df566fc..924ff78b4593 100644
--- a/configs/ls1046ardb_emmc_defconfig
+++ b/configs/ls1046ardb_emmc_defconfig
@@ -111,7 +111,8 @@ CONFIG_POWER_LEGACY=y
 CONFIG_POWER_I2C=y
 CONFIG_SYS_QE_FMAN_FW_IN_MMC=y
 CONFIG_DM_SCSI=y
-CONFIG_SYS_NS16550_SERIAL=y
+CONFIG_DM_SERIAL=y
+CONFIG_SPL_SYS_NS16550_SERIAL=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
 CONFIG_FSL_QSPI=y
diff --git a/configs/ls1046ardb_qspi_SECURE_BOOT_defconfig b/configs/ls1046ardb_qspi_SECURE_BOOT_defconfig
index 3cefae092f34..bb278845e069 100644
--- a/configs/ls1046ardb_qspi_SECURE_BOOT_defconfig
+++ b/configs/ls1046ardb_qspi_SECURE_BOOT_defconfig
@@ -86,7 +86,9 @@ CONFIG_POWER_LEGACY=y
 CONFIG_POWER_I2C=y
 CONFIG_SYS_QE_FMAN_FW_IN_SPIFLASH=y
 CONFIG_DM_SCSI=y
-CONFIG_SYS_NS16550_SERIAL=y
+CONFIG_SPECIFY_CONSOLE_INDEX=y
+CONFIG_DM_SERIAL=y
+CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
 CONFIG_FSL_QSPI=y
diff --git a/configs/ls1046ardb_qspi_defconfig b/configs/ls1046ardb_qspi_defconfig
index 02979dd2ff01..0fb1a6c281e5 100644
--- a/configs/ls1046ardb_qspi_defconfig
+++ b/configs/ls1046ardb_qspi_defconfig
@@ -90,7 +90,9 @@ CONFIG_POWER_LEGACY=y
 CONFIG_POWER_I2C=y
 CONFIG_SYS_QE_FMAN_FW_IN_SPIFLASH=y
 CONFIG_DM_SCSI=y
-CONFIG_SYS_NS16550_SERIAL=y
+CONFIG_SPECIFY_CONSOLE_INDEX=y
+CONFIG_DM_SERIAL=y
+CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
 CONFIG_FSL_QSPI=y
diff --git a/configs/ls1046ardb_qspi_spl_defconfig b/configs/ls1046ardb_qspi_spl_defconfig
index 8f7d05fab976..eb0184c59276 100644
--- a/configs/ls1046ardb_qspi_spl_defconfig
+++ b/configs/ls1046ardb_qspi_spl_defconfig
@@ -118,7 +118,8 @@ CONFIG_POWER_LEGACY=y
 CONFIG_POWER_I2C=y
 CONFIG_SYS_QE_FMAN_FW_IN_SPIFLASH=y
 CONFIG_DM_SCSI=y
-CONFIG_SYS_NS16550_SERIAL=y
+CONFIG_DM_SERIAL=y
+CONFIG_SPL_SYS_NS16550_SERIAL=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
 CONFIG_FSL_QSPI=y
diff --git a/configs/ls1046ardb_sdcard_SECURE_BOOT_defconfig b/configs/ls1046ardb_sdcard_SECURE_BOOT_defconfig
index 900e26be3be0..2813c79f5975 100644
--- a/configs/ls1046ardb_sdcard_SECURE_BOOT_defconfig
+++ b/configs/ls1046ardb_sdcard_SECURE_BOOT_defconfig
@@ -109,7 +109,9 @@ CONFIG_POWER_LEGACY=y
 CONFIG_POWER_I2C=y
 CONFIG_SYS_QE_FMAN_FW_IN_MMC=y
 CONFIG_SCSI_AHCI_PLAT=y
-CONFIG_SYS_NS16550_SERIAL=y
+CONFIG_SPECIFY_CONSOLE_INDEX=y
+CONFIG_DM_SERIAL=y
+CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
 CONFIG_FSL_QSPI=y
diff --git a/configs/ls1046ardb_sdcard_defconfig b/configs/ls1046ardb_sdcard_defconfig
index ded6be50a3f6..a621859aa792 100644
--- a/configs/ls1046ardb_sdcard_defconfig
+++ b/configs/ls1046ardb_sdcard_defconfig
@@ -111,7 +111,8 @@ CONFIG_POWER_LEGACY=y
 CONFIG_POWER_I2C=y
 CONFIG_SYS_QE_FMAN_FW_IN_MMC=y
 CONFIG_DM_SCSI=y
-CONFIG_SYS_NS16550_SERIAL=y
+CONFIG_DM_SERIAL=y
+CONFIG_SPL_SYS_NS16550_SERIAL=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
 CONFIG_FSL_QSPI=y
diff --git a/configs/ls1046ardb_tfa_SECURE_BOOT_defconfig b/configs/ls1046ardb_tfa_SECURE_BOOT_defconfig
index 3eaa985ec79b..fbcf294eb534 100644
--- a/configs/ls1046ardb_tfa_SECURE_BOOT_defconfig
+++ b/configs/ls1046ardb_tfa_SECURE_BOOT_defconfig
@@ -79,7 +79,9 @@ CONFIG_PCIE_LAYERSCAPE_EP=y
 CONFIG_POWER_LEGACY=y
 CONFIG_POWER_I2C=y
 CONFIG_DM_SCSI=y
-CONFIG_SYS_NS16550_SERIAL=y
+CONFIG_SPECIFY_CONSOLE_INDEX=y
+CONFIG_DM_SERIAL=y
+CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
 CONFIG_FSL_QSPI=y
diff --git a/configs/ls1046ardb_tfa_defconfig b/configs/ls1046ardb_tfa_defconfig
index 7e8d86d03c4c..24a54230f8ee 100644
--- a/configs/ls1046ardb_tfa_defconfig
+++ b/configs/ls1046ardb_tfa_defconfig
@@ -85,7 +85,9 @@ CONFIG_PCIE_LAYERSCAPE_EP=y
 CONFIG_POWER_LEGACY=y
 CONFIG_POWER_I2C=y
 CONFIG_DM_SCSI=y
-CONFIG_SYS_NS16550_SERIAL=y
+CONFIG_SPECIFY_CONSOLE_INDEX=y
+CONFIG_DM_SERIAL=y
+CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
 CONFIG_FSL_QSPI=y
--
2.17.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 7/7] configs: ls1046afrwy: enable DM_SERIAL
  2023-06-15 12:37 [PATCH 0/7] Enable DM_SERIAL for the LS104xA RDB/FRWY boards Camelia Groza
                   ` (5 preceding siblings ...)
  2023-06-15 12:37 ` [PATCH 6/7] configs: ls1046ardb: enable DM_SERIAL Camelia Groza
@ 2023-06-15 12:37 ` Camelia Groza
  6 siblings, 0 replies; 12+ messages in thread
From: Camelia Groza @ 2023-06-15 12:37 UTC (permalink / raw)
  To: peng.fan, mingkai.hu, pramod.kumar_1, u-boot; +Cc: Camelia Groza

As the serial devices are configured in the device tree, enable
DM_SERIAL in the ls1046afrwy defconfigs.

Signed-off-by: Camelia Groza <camelia.groza@nxp.com>
---
 configs/ls1046afrwy_tfa_SECURE_BOOT_defconfig | 4 +++-
 configs/ls1046afrwy_tfa_defconfig             | 4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/configs/ls1046afrwy_tfa_SECURE_BOOT_defconfig b/configs/ls1046afrwy_tfa_SECURE_BOOT_defconfig
index 8d6a1371acb7..e97092f2c9b7 100644
--- a/configs/ls1046afrwy_tfa_SECURE_BOOT_defconfig
+++ b/configs/ls1046afrwy_tfa_SECURE_BOOT_defconfig
@@ -67,7 +67,9 @@ CONFIG_FMAN_ENET=y
 CONFIG_SYS_FMAN_FW_ADDR=0x900000
 CONFIG_DM_PCI_COMPAT=y
 CONFIG_DM_SCSI=y
-CONFIG_SYS_NS16550_SERIAL=y
+CONFIG_SPECIFY_CONSOLE_INDEX=y
+CONFIG_DM_SERIAL=y
+CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
 CONFIG_FSL_QSPI=y
diff --git a/configs/ls1046afrwy_tfa_defconfig b/configs/ls1046afrwy_tfa_defconfig
index e5d2b556f783..fdf08ad3c63c 100644
--- a/configs/ls1046afrwy_tfa_defconfig
+++ b/configs/ls1046afrwy_tfa_defconfig
@@ -76,7 +76,9 @@ CONFIG_DM_PCI_COMPAT=y
 CONFIG_PCIE_LAYERSCAPE_RC=y
 CONFIG_PCIE_LAYERSCAPE_EP=y
 CONFIG_DM_SCSI=y
-CONFIG_SYS_NS16550_SERIAL=y
+CONFIG_SPECIFY_CONSOLE_INDEX=y
+CONFIG_DM_SERIAL=y
+CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
 CONFIG_FSL_QSPI=y
--
2.17.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH 1/7] arch: arm: dts: ls1043a: sync serial nodes with Linux
  2023-06-15 12:37 ` [PATCH 1/7] arch: arm: dts: ls1043a: sync serial nodes with Linux Camelia Groza
@ 2023-06-16  1:10   ` Peng Fan
  0 siblings, 0 replies; 12+ messages in thread
From: Peng Fan @ 2023-06-16  1:10 UTC (permalink / raw)
  To: Camelia Groza, mingkai.hu, pramod.kumar_1, u-boot



On 6/15/2023 8:37 PM, Camelia Groza wrote:
> Pick up the serial node descriptions from Linux for the ls1043ardb board
> and its dependencies. Including the fsl,qoriq-clockgen.h and arm-gic.h
> headers forces us to change the include directives to explicitly go through
> the C preprocessor for all boards in the ls1043a SoC family.

Better add the tag or commit of linux kernel that you sync from.

Other than that, Acked-by: Peng Fan <peng.fan@nxp.com>

> 
> Signed-off-by: Camelia Groza <camelia.groza@nxp.com>
> ---
>   arch/arm/dts/fsl-ls1043a-qds.dtsi |  2 +-
>   arch/arm/dts/fsl-ls1043a-rdb.dts  |  6 +++++-
>   arch/arm/dts/fsl-ls1043a.dtsi     | 16 +++++++++++-----
>   3 files changed, 17 insertions(+), 7 deletions(-)
> 
> diff --git a/arch/arm/dts/fsl-ls1043a-qds.dtsi b/arch/arm/dts/fsl-ls1043a-qds.dtsi
> index 884bdad196b3..5e02cd91d75f 100644
> --- a/arch/arm/dts/fsl-ls1043a-qds.dtsi
> +++ b/arch/arm/dts/fsl-ls1043a-qds.dtsi
> @@ -7,7 +7,7 @@
>    * Mingkai Hu <Mingkai.hu@freescale.com>
>    */
>   
> -/include/ "fsl-ls1043a.dtsi"
> +#include "fsl-ls1043a.dtsi"
>   
>   / {
>   	model = "LS1043A QDS Board";
> diff --git a/arch/arm/dts/fsl-ls1043a-rdb.dts b/arch/arm/dts/fsl-ls1043a-rdb.dts
> index 9e7c79fd2b98..f5b3bb68b3db 100644
> --- a/arch/arm/dts/fsl-ls1043a-rdb.dts
> +++ b/arch/arm/dts/fsl-ls1043a-rdb.dts
> @@ -9,13 +9,17 @@
>    */
>   
>   /dts-v1/;
> -/include/ "fsl-ls1043a.dtsi"
> +#include "fsl-ls1043a.dtsi"
>   
>   / {
>   	model = "LS1043A RDB Board";
>   
>           aliases {
>   		spi1 = &dspi0;
> +		serial0 = &duart0;
> +		serial1 = &duart1;
> +		serial2 = &duart2;
> +		serial3 = &duart3;
>           };
>   
>   };
> diff --git a/arch/arm/dts/fsl-ls1043a.dtsi b/arch/arm/dts/fsl-ls1043a.dtsi
> index 4960973a6035..21643a1d951f 100644
> --- a/arch/arm/dts/fsl-ls1043a.dtsi
> +++ b/arch/arm/dts/fsl-ls1043a.dtsi
> @@ -8,7 +8,9 @@
>    * Mingkai Hu <Mingkai.hu@freescale.com>
>    */
>   
> -/include/ "skeleton64.dtsi"
> +#include "skeleton64.dtsi"
> +#include <dt-bindings/clock/fsl,qoriq-clockgen.h>
> +#include <dt-bindings/interrupt-controller/arm-gic.h>
>   
>   / {
>   	compatible = "fsl,ls1043a";
> @@ -223,28 +225,32 @@
>   			compatible = "fsl,ns16550", "ns16550a";
>   			reg = <0x00 0x21c0500 0x0 0x100>;
>   			interrupts = <0 54 0x4>;
> -			clocks = <&clockgen 4 0>;
> +			clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL
> +					    QORIQ_CLK_PLL_DIV(1)>;
>   		};
>   
>   		duart1: serial@21c0600 {
>   			compatible = "fsl,ns16550", "ns16550a";
>   			reg = <0x00 0x21c0600 0x0 0x100>;
>   			interrupts = <0 54 0x4>;
> -			clocks = <&clockgen 4 0>;
> +			clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL
> +					    QORIQ_CLK_PLL_DIV(1)>;
>   		};
>   
>   		duart2: serial@21d0500 {
>   			compatible = "fsl,ns16550", "ns16550a";
>   			reg = <0x0 0x21d0500 0x0 0x100>;
>   			interrupts = <0 55 0x4>;
> -			clocks = <&clockgen 4 0>;
> +			clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL
> +					    QORIQ_CLK_PLL_DIV(1)>;
>   		};
>   
>   		duart3: serial@21d0600 {
>   			compatible = "fsl,ns16550", "ns16550a";
>   			reg = <0x0 0x21d0600 0x0 0x100>;
>   			interrupts = <0 55 0x4>;
> -			clocks = <&clockgen 4 0>;
> +			clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL
> +					    QORIQ_CLK_PLL_DIV(1)>;
>   		};
>   
>   		lpuart0: serial@2950000 {

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 2/7] arch: arm: dts: ls1043a: tag serial nodes with bootph-all
  2023-06-15 12:37 ` [PATCH 2/7] arch: arm: dts: ls1043a: tag serial nodes with bootph-all Camelia Groza
@ 2023-06-16  1:11   ` Peng Fan
  0 siblings, 0 replies; 12+ messages in thread
From: Peng Fan @ 2023-06-16  1:11 UTC (permalink / raw)
  To: Camelia Groza, mingkai.hu, pramod.kumar_1, u-boot



On 6/15/2023 8:37 PM, Camelia Groza wrote:
> Make sure the serial driver is initialized before relocation by tagging
> the serial nodes with "bootph-all".

Please add fsl-ls1043a-u-boot.dtsi for U-Boot specific changes.

Regards,
Peng.

> 
> Signed-off-by: Camelia Groza <camelia.groza@nxp.com>
> ---
>   arch/arm/dts/fsl-ls1043a.dtsi | 4 ++++
>   1 file changed, 4 insertions(+)
> 
> diff --git a/arch/arm/dts/fsl-ls1043a.dtsi b/arch/arm/dts/fsl-ls1043a.dtsi
> index 21643a1d951f..79f67e7183c3 100644
> --- a/arch/arm/dts/fsl-ls1043a.dtsi
> +++ b/arch/arm/dts/fsl-ls1043a.dtsi
> @@ -227,6 +227,7 @@
>   			interrupts = <0 54 0x4>;
>   			clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL
>   					    QORIQ_CLK_PLL_DIV(1)>;
> +			bootph-all;
>   		};
> 
>   		duart1: serial@21c0600 {
> @@ -235,6 +236,7 @@
>   			interrupts = <0 54 0x4>;
>   			clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL
>   					    QORIQ_CLK_PLL_DIV(1)>;
> +			bootph-all;
>   		};
> 
>   		duart2: serial@21d0500 {
> @@ -243,6 +245,7 @@
>   			interrupts = <0 55 0x4>;
>   			clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL
>   					    QORIQ_CLK_PLL_DIV(1)>;
> +			bootph-all;
>   		};
> 
>   		duart3: serial@21d0600 {
> @@ -251,6 +254,7 @@
>   			interrupts = <0 55 0x4>;
>   			clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL
>   					    QORIQ_CLK_PLL_DIV(1)>;
> +			bootph-all;
>   		};
> 
>   		lpuart0: serial@2950000 {
> --
> 2.17.1
> 

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 4/7] arch: arm: dts: ls1046a: sync serial nodes with Linux
  2023-06-15 12:37 ` [PATCH 4/7] arch: arm: dts: ls1046a: sync serial nodes with Linux Camelia Groza
@ 2023-06-16  1:12   ` Peng Fan
  0 siblings, 0 replies; 12+ messages in thread
From: Peng Fan @ 2023-06-16  1:12 UTC (permalink / raw)
  To: Camelia Groza, mingkai.hu, pramod.kumar_1, u-boot



On 6/15/2023 8:37 PM, Camelia Groza wrote:
> Pick up the serial node descriptions from Linux for the ls1046ardb and
> ls1046afrwy boards and their dependencies. Including the
> fsl,qoriq-clockgen.h and arm-gic.h headers forces us to change the include
> directives to explicitly go through the C preprocessor for all boards in
> the ls1046a SoC family.

Add the tag or commit of linux kernel.

Regards,
Peng.

> 
> Signed-off-by: Camelia Groza <camelia.groza@nxp.com>
> ---
>   arch/arm/dts/fsl-ls1046a-frwy.dts | 22 +++++++++++++++++++++-
>   arch/arm/dts/fsl-ls1046a-qds.dtsi |  2 +-
>   arch/arm/dts/fsl-ls1046a-rdb.dts  | 14 +++++++++++++-
>   arch/arm/dts/fsl-ls1046a.dtsi     | 24 +++++++++++++++---------
>   4 files changed, 50 insertions(+), 12 deletions(-)
> 
> diff --git a/arch/arm/dts/fsl-ls1046a-frwy.dts b/arch/arm/dts/fsl-ls1046a-frwy.dts
> index cda05411d881..f3ba2acd6d51 100644
> --- a/arch/arm/dts/fsl-ls1046a-frwy.dts
> +++ b/arch/arm/dts/fsl-ls1046a-frwy.dts
> @@ -7,17 +7,37 @@
>    */
>   
>   /dts-v1/;
> -/include/ "fsl-ls1046a.dtsi"
> +#include "fsl-ls1046a.dtsi"
>   
>   / {
>   	model = "LS1046A FRWY Board";
>   
>   	aliases {
>   		spi0 = &qspi;
> +		serial0 = &duart0;
> +		serial1 = &duart1;
> +		serial2 = &duart2;
> +		serial3 = &duart3;
>   	};
>   
>   };
>   
> +&duart0 {
> +	status = "okay";
> +};
> +
> +&duart1 {
> +	status = "okay";
> +};
> +
> +&duart2 {
> +	status = "okay";
> +};
> +
> +&duart3 {
> +	status = "okay";
> +};
> +
>   &qspi {
>   	status = "okay";
>   
> diff --git a/arch/arm/dts/fsl-ls1046a-qds.dtsi b/arch/arm/dts/fsl-ls1046a-qds.dtsi
> index fec5c8ddb23a..d66824975c5e 100644
> --- a/arch/arm/dts/fsl-ls1046a-qds.dtsi
> +++ b/arch/arm/dts/fsl-ls1046a-qds.dtsi
> @@ -7,7 +7,7 @@
>    * Mingkai Hu <Mingkai.hu@nxp.com>
>    */
>   
> -/include/ "fsl-ls1046a.dtsi"
> +#include "fsl-ls1046a.dtsi"
>   
>   / {
>   	model = "LS1046A QDS Board";
> diff --git a/arch/arm/dts/fsl-ls1046a-rdb.dts b/arch/arm/dts/fsl-ls1046a-rdb.dts
> index 464129291c91..66d718905c7d 100644
> --- a/arch/arm/dts/fsl-ls1046a-rdb.dts
> +++ b/arch/arm/dts/fsl-ls1046a-rdb.dts
> @@ -9,17 +9,29 @@
>    */
>   
>   /dts-v1/;
> -/include/ "fsl-ls1046a.dtsi"
> +#include "fsl-ls1046a.dtsi"
>   
>   / {
>   	model = "LS1046A RDB Board";
>   
>   	aliases {
>   		spi0 = &qspi;
> +		serial0 = &duart0;
> +		serial1 = &duart1;
> +		serial2 = &duart2;
> +		serial3 = &duart3;
>   	};
>   
>   };
>   
> +&duart0 {
> +	status = "okay";
> +};
> +
> +&duart1 {
> +	status = "okay";
> +};
> +
>   &qspi {
>   	status = "okay";
>   
> diff --git a/arch/arm/dts/fsl-ls1046a.dtsi b/arch/arm/dts/fsl-ls1046a.dtsi
> index 060dc399c2f6..9fdd398e2c4c 100644
> --- a/arch/arm/dts/fsl-ls1046a.dtsi
> +++ b/arch/arm/dts/fsl-ls1046a.dtsi
> @@ -8,7 +8,9 @@
>    * Mingkai Hu <mingkai.hu@nxp.com>
>    */
>   
> -/include/ "skeleton64.dtsi"
> +#include "skeleton64.dtsi"
> +#include <dt-bindings/clock/fsl,qoriq-clockgen.h>
> +#include <dt-bindings/interrupt-controller/arm-gic.h>
>   
>   / {
>   	compatible = "fsl,ls1046a";
> @@ -222,29 +224,33 @@
>   		duart0: serial@21c0500 {
>   			compatible = "fsl,ns16550", "ns16550a";
>   			reg = <0x00 0x21c0500 0x0 0x100>;
> -			interrupts = <0 54 0x4>;
> -			clocks = <&clockgen 4 0>;
> +			interrupts = <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>;
> +			clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL
> +					    QORIQ_CLK_PLL_DIV(2)>;
>   		};
>   
>   		duart1: serial@21c0600 {
>   			compatible = "fsl,ns16550", "ns16550a";
>   			reg = <0x00 0x21c0600 0x0 0x100>;
> -			interrupts = <0 54 0x4>;
> -			clocks = <&clockgen 4 0>;
> +			interrupts = <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>;
> +			clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL
> +					    QORIQ_CLK_PLL_DIV(2)>;
>   		};
>   
>   		duart2: serial@21d0500 {
>   			compatible = "fsl,ns16550", "ns16550a";
>   			reg = <0x0 0x21d0500 0x0 0x100>;
> -			interrupts = <0 55 0x4>;
> -			clocks = <&clockgen 4 0>;
> +			interrupts = <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>;
> +			clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL
> +					    QORIQ_CLK_PLL_DIV(2)>;
>   		};
>   
>   		duart3: serial@21d0600 {
>   			compatible = "fsl,ns16550", "ns16550a";
>   			reg = <0x0 0x21d0600 0x0 0x100>;
> -			interrupts = <0 55 0x4>;
> -			clocks = <&clockgen 4 0>;
> +			interrupts = <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>;
> +			clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL
> +					    QORIQ_CLK_PLL_DIV(2)>;
>   		};
>   
>   		lpuart0: serial@2950000 {

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 5/7] arch: arm: dts: ls1046a: tag serial nodes with bootph-all
  2023-06-15 12:37 ` [PATCH 5/7] arch: arm: dts: ls1046a: tag serial nodes with bootph-all Camelia Groza
@ 2023-06-16  1:12   ` Peng Fan
  0 siblings, 0 replies; 12+ messages in thread
From: Peng Fan @ 2023-06-16  1:12 UTC (permalink / raw)
  To: Camelia Groza, mingkai.hu, pramod.kumar_1, u-boot



On 6/15/2023 8:37 PM, Camelia Groza wrote:
> Make sure the serial driver is initialized before relocation by tagging
> the serial nodes with "bootph-all".

Add fsl-ls1046a-u-boot.dtsi for U-Boot specific changes.

Thanks,
Peng.

> 
> Signed-off-by: Camelia Groza <camelia.groza@nxp.com>
> ---
>   arch/arm/dts/fsl-ls1046a.dtsi | 4 ++++
>   1 file changed, 4 insertions(+)
> 
> diff --git a/arch/arm/dts/fsl-ls1046a.dtsi b/arch/arm/dts/fsl-ls1046a.dtsi
> index 9fdd398e2c4c..3986360c0c93 100644
> --- a/arch/arm/dts/fsl-ls1046a.dtsi
> +++ b/arch/arm/dts/fsl-ls1046a.dtsi
> @@ -227,6 +227,7 @@
>   			interrupts = <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>;
>   			clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL
>   					    QORIQ_CLK_PLL_DIV(2)>;
> +			bootph-all;
>   		};
> 
>   		duart1: serial@21c0600 {
> @@ -235,6 +236,7 @@
>   			interrupts = <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>;
>   			clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL
>   					    QORIQ_CLK_PLL_DIV(2)>;
> +			bootph-all;
>   		};
> 
>   		duart2: serial@21d0500 {
> @@ -243,6 +245,7 @@
>   			interrupts = <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>;
>   			clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL
>   					    QORIQ_CLK_PLL_DIV(2)>;
> +			bootph-all;
>   		};
> 
>   		duart3: serial@21d0600 {
> @@ -251,6 +254,7 @@
>   			interrupts = <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>;
>   			clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL
>   					    QORIQ_CLK_PLL_DIV(2)>;
> +			bootph-all;
>   		};
> 
>   		lpuart0: serial@2950000 {
> --
> 2.17.1
> 

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2023-06-16  1:12 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-15 12:37 [PATCH 0/7] Enable DM_SERIAL for the LS104xA RDB/FRWY boards Camelia Groza
2023-06-15 12:37 ` [PATCH 1/7] arch: arm: dts: ls1043a: sync serial nodes with Linux Camelia Groza
2023-06-16  1:10   ` Peng Fan
2023-06-15 12:37 ` [PATCH 2/7] arch: arm: dts: ls1043a: tag serial nodes with bootph-all Camelia Groza
2023-06-16  1:11   ` Peng Fan
2023-06-15 12:37 ` [PATCH 3/7] configs: ls1043ardb: enable DM_SERIAL Camelia Groza
2023-06-15 12:37 ` [PATCH 4/7] arch: arm: dts: ls1046a: sync serial nodes with Linux Camelia Groza
2023-06-16  1:12   ` Peng Fan
2023-06-15 12:37 ` [PATCH 5/7] arch: arm: dts: ls1046a: tag serial nodes with bootph-all Camelia Groza
2023-06-16  1:12   ` Peng Fan
2023-06-15 12:37 ` [PATCH 6/7] configs: ls1046ardb: enable DM_SERIAL Camelia Groza
2023-06-15 12:37 ` [PATCH 7/7] configs: ls1046afrwy: " Camelia Groza

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.