From 2532eadcd5bfe9e98fff5585785af737e475fb4c Mon Sep 17 00:00:00 2001 From: Vladimir Oltean Date: Wed, 15 Mar 2023 13:01:16 +0200 Subject: [PATCH 01/11] configs: convert NXP LS1028A RDB and QDS to DM_SERIAL Since the device trees are more or less synchronized with Linux, the only necessary changes are to enable CONFIG_DM_SERIAL and the DM_SERIAL driver for ns16550 (ns16550.c rather than serial_ns16550.c). ls1028aqds_tfa_lpuart_defconfig already uses DM_SERIAL for the LPUART driver, so I didn't touch that. Signed-off-by: Vladimir Oltean Reviewed-by: Ioana Ciornei Signed-off-by: Peng Fan --- configs/ls1028aqds_tfa_SECURE_BOOT_defconfig | 3 ++- configs/ls1028aqds_tfa_defconfig | 3 ++- configs/ls1028ardb_tfa_SECURE_BOOT_defconfig | 3 ++- configs/ls1028ardb_tfa_defconfig | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/configs/ls1028aqds_tfa_SECURE_BOOT_defconfig b/configs/ls1028aqds_tfa_SECURE_BOOT_defconfig index ae01d83de91..15ac90fa650 100644 --- a/configs/ls1028aqds_tfa_SECURE_BOOT_defconfig +++ b/configs/ls1028aqds_tfa_SECURE_BOOT_defconfig @@ -86,7 +86,8 @@ CONFIG_DM_RTC=y CONFIG_RTC_PCF2127=y CONFIG_SCSI=y CONFIG_DM_SCSI=y -CONFIG_SYS_NS16550_SERIAL=y +CONFIG_DM_SERIAL=y +CONFIG_SYS_NS16550=y CONFIG_SPI=y CONFIG_DM_SPI=y CONFIG_FSL_DSPI=y diff --git a/configs/ls1028aqds_tfa_defconfig b/configs/ls1028aqds_tfa_defconfig index 2361c35b258..78dd20a0e5d 100644 --- a/configs/ls1028aqds_tfa_defconfig +++ b/configs/ls1028aqds_tfa_defconfig @@ -92,7 +92,8 @@ CONFIG_DM_RTC=y CONFIG_RTC_PCF2127=y CONFIG_SCSI=y CONFIG_DM_SCSI=y -CONFIG_SYS_NS16550_SERIAL=y +CONFIG_DM_SERIAL=y +CONFIG_SYS_NS16550=y CONFIG_SPI=y CONFIG_DM_SPI=y CONFIG_FSL_DSPI=y diff --git a/configs/ls1028ardb_tfa_SECURE_BOOT_defconfig b/configs/ls1028ardb_tfa_SECURE_BOOT_defconfig index af560c61fb8..2c3c9bd080d 100644 --- a/configs/ls1028ardb_tfa_SECURE_BOOT_defconfig +++ b/configs/ls1028ardb_tfa_SECURE_BOOT_defconfig @@ -80,7 +80,8 @@ CONFIG_DM_RTC=y CONFIG_RTC_PCF2127=y CONFIG_SCSI=y CONFIG_DM_SCSI=y -CONFIG_SYS_NS16550_SERIAL=y +CONFIG_DM_SERIAL=y +CONFIG_SYS_NS16550=y CONFIG_SPI=y CONFIG_DM_SPI=y CONFIG_FSL_DSPI=y diff --git a/configs/ls1028ardb_tfa_defconfig b/configs/ls1028ardb_tfa_defconfig index 93e87212db9..3384b98dae4 100644 --- a/configs/ls1028ardb_tfa_defconfig +++ b/configs/ls1028ardb_tfa_defconfig @@ -86,7 +86,8 @@ CONFIG_DM_RTC=y CONFIG_RTC_PCF2127=y CONFIG_SCSI=y CONFIG_DM_SCSI=y -CONFIG_SYS_NS16550_SERIAL=y +CONFIG_DM_SERIAL=y +CONFIG_SYS_NS16550=y CONFIG_SPI=y CONFIG_DM_SPI=y CONFIG_FSL_DSPI=y From 204d574fe4b01a9468ac5256cf3cffdd874d204a Mon Sep 17 00:00:00 2001 From: Ioana Ciornei Date: Wed, 15 Mar 2023 13:04:09 +0200 Subject: [PATCH 02/11] arch: arm: dts: fsl-ls1088a.dtsi: add an 'soc' node The u-boot dts for these boards do not have an soc node, unlike its Linux counterpart. This patch just adds the soc node as seen in Linux, the next patches will move some nodes under it. Signed-off-by: Ioana Ciornei Signed-off-by: Peng Fan --- arch/arm/dts/fsl-ls1088a.dtsi | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/arch/arm/dts/fsl-ls1088a.dtsi b/arch/arm/dts/fsl-ls1088a.dtsi index 9b7c54b260e..36ec0ff51f2 100644 --- a/arch/arm/dts/fsl-ls1088a.dtsi +++ b/arch/arm/dts/fsl-ls1088a.dtsi @@ -35,6 +35,15 @@ <1 10 0x8>; /* Hypervisor PPI, active-low */ }; + soc { + compatible = "simple-bus"; + #address-cells = <2>; + #size-cells = <2>; + ranges; + dma-ranges = <0x0 0x0 0x0 0x0 0x10000 0x00000000>; + + }; + i2c0: i2c@2000000 { compatible = "fsl,vf610-i2c"; #address-cells = <1>; From 2b7d2c236bc246b3640268675daeda68f24a98d4 Mon Sep 17 00:00:00 2001 From: Ioana Ciornei Date: Wed, 15 Mar 2023 13:04:10 +0200 Subject: [PATCH 03/11] arch: arm: dts: fsl-ls1088a.dtsi: move the serial nodes under soc Move the serial nodes under the soc node. No changes are made to the nodes, just their location is changed. Signed-off-by: Ioana Ciornei Signed-off-by: Peng Fan --- arch/arm/dts/fsl-ls1088a.dtsi | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/arch/arm/dts/fsl-ls1088a.dtsi b/arch/arm/dts/fsl-ls1088a.dtsi index 36ec0ff51f2..0eb0f6c41ae 100644 --- a/arch/arm/dts/fsl-ls1088a.dtsi +++ b/arch/arm/dts/fsl-ls1088a.dtsi @@ -42,6 +42,21 @@ ranges; dma-ranges = <0x0 0x0 0x0 0x0 0x10000 0x00000000>; + serial0: serial@21c0500 { + device_type = "serial"; + compatible = "fsl,ns16550", "ns16550a"; + reg = <0x0 0x21c0500 0x0 0x100>; + clock-frequency = <0>; /* Updated by bootloader */ + interrupts = <0 32 0x1>; /* edge triggered */ + }; + + serial1: serial@21c0600 { + device_type = "serial"; + compatible = "fsl,ns16550", "ns16550a"; + reg = <0x0 0x21c0600 0x0 0x100>; + clock-frequency = <0>; /* Updated by bootloader */ + interrupts = <0 32 0x1>; /* edge triggered */ + }; }; i2c0: i2c@2000000 { @@ -76,22 +91,6 @@ interrupts = <0 35 4>; }; - serial0: serial@21c0500 { - device_type = "serial"; - compatible = "fsl,ns16550", "ns16550a"; - reg = <0x0 0x21c0500 0x0 0x100>; - clock-frequency = <0>; /* Updated by bootloader */ - interrupts = <0 32 0x1>; /* edge triggered */ - }; - - serial1: serial@21c0600 { - device_type = "serial"; - compatible = "fsl,ns16550", "ns16550a"; - reg = <0x0 0x21c0600 0x0 0x100>; - clock-frequency = <0>; /* Updated by bootloader */ - interrupts = <0 32 0x1>; /* edge triggered */ - }; - dspi: dspi@2100000 { compatible = "fsl,vf610-dspi"; #address-cells = <1>; From 571c49789d419548c1573864b170e2c3db80d064 Mon Sep 17 00:00:00 2001 From: Ioana Ciornei Date: Wed, 15 Mar 2023 13:04:11 +0200 Subject: [PATCH 04/11] arch: arm: dts: fsl-ls1088a.dtsi: sync serial nodes with Linux Sync the serial nodes of the LS1088A based boards with their representation in Linux. We also imported the clockgen and sysclk nodes which are dependencies. Signed-off-by: Ioana Ciornei Signed-off-by: Peng Fan --- arch/arm/dts/fsl-ls1088a-qds.dtsi | 8 ++++++ arch/arm/dts/fsl-ls1088a-rdb.dts | 8 ++++++ arch/arm/dts/fsl-ls1088a-ten64.dts | 6 +++-- arch/arm/dts/fsl-ls1088a.dtsi | 39 +++++++++++++++++++++--------- 4 files changed, 48 insertions(+), 13 deletions(-) diff --git a/arch/arm/dts/fsl-ls1088a-qds.dtsi b/arch/arm/dts/fsl-ls1088a-qds.dtsi index 85dc7457bfb..4d21d4fbd5e 100644 --- a/arch/arm/dts/fsl-ls1088a-qds.dtsi +++ b/arch/arm/dts/fsl-ls1088a-qds.dtsi @@ -132,6 +132,14 @@ }; }; +&duart0 { + status = "okay"; +}; + +&duart1 { + status = "okay"; +}; + &dspi { bus-num = <0>; status = "okay"; diff --git a/arch/arm/dts/fsl-ls1088a-rdb.dts b/arch/arm/dts/fsl-ls1088a-rdb.dts index 01f8fcb61ae..c63d4158e49 100644 --- a/arch/arm/dts/fsl-ls1088a-rdb.dts +++ b/arch/arm/dts/fsl-ls1088a-rdb.dts @@ -142,6 +142,14 @@ }; }; +&duart0 { + status = "okay"; +}; + +&duart1 { + status = "okay"; +}; + &qspi { status = "okay"; diff --git a/arch/arm/dts/fsl-ls1088a-ten64.dts b/arch/arm/dts/fsl-ls1088a-ten64.dts index 43b669c642c..55a7d41fb01 100644 --- a/arch/arm/dts/fsl-ls1088a-ten64.dts +++ b/arch/arm/dts/fsl-ls1088a-ten64.dts @@ -20,6 +20,8 @@ compatible = "traverse,ten64", "fsl,ls1088a"; aliases { + serial0 = &duart0; + serial1 = &duart1; spi0 = &qspi; }; @@ -164,11 +166,11 @@ status = "okay"; }; -&serial0 { +&duart0 { status = "okay"; }; -&serial1 { +&duart1 { status = "okay"; }; diff --git a/arch/arm/dts/fsl-ls1088a.dtsi b/arch/arm/dts/fsl-ls1088a.dtsi index 0eb0f6c41ae..b094bcf67c4 100644 --- a/arch/arm/dts/fsl-ls1088a.dtsi +++ b/arch/arm/dts/fsl-ls1088a.dtsi @@ -2,9 +2,10 @@ /* * NXP ls1088a SOC common device tree source * - * Copyright 2017, 2020-2021 NXP + * Copyright 2017, 2020-2021, 2023 NXP */ +#include #include / { compatible = "fsl,ls1088a"; @@ -35,6 +36,13 @@ <1 10 0x8>; /* Hypervisor PPI, active-low */ }; + sysclk: sysclk { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <100000000>; + clock-output-names = "sysclk"; + }; + soc { compatible = "simple-bus"; #address-cells = <2>; @@ -42,20 +50,29 @@ ranges; dma-ranges = <0x0 0x0 0x0 0x0 0x10000 0x00000000>; - serial0: serial@21c0500 { - device_type = "serial"; - compatible = "fsl,ns16550", "ns16550a"; - reg = <0x0 0x21c0500 0x0 0x100>; - clock-frequency = <0>; /* Updated by bootloader */ - interrupts = <0 32 0x1>; /* edge triggered */ + clockgen: clocking@1300000 { + compatible = "fsl,ls1088a-clockgen"; + reg = <0 0x1300000 0 0xa0000>; + #clock-cells = <2>; + clocks = <&sysclk>; }; - serial1: serial@21c0600 { - device_type = "serial"; + duart0: serial@21c0500 { + compatible = "fsl,ns16550", "ns16550a"; + reg = <0x0 0x21c0500 0x0 0x100>; + clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL + QORIQ_CLK_PLL_DIV(4)>; + interrupts = <0 32 IRQ_TYPE_LEVEL_HIGH>; + status = "disabled"; + }; + + duart1: serial@21c0600 { compatible = "fsl,ns16550", "ns16550a"; reg = <0x0 0x21c0600 0x0 0x100>; - clock-frequency = <0>; /* Updated by bootloader */ - interrupts = <0 32 0x1>; /* edge triggered */ + clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL + QORIQ_CLK_PLL_DIV(4)>; + interrupts = <0 32 IRQ_TYPE_LEVEL_HIGH>; + status = "disabled"; }; }; From a593c1fec579ea2e23ace4f06b06d8c168db2d05 Mon Sep 17 00:00:00 2001 From: Ioana Ciornei Date: Wed, 15 Mar 2023 13:04:12 +0200 Subject: [PATCH 05/11] arch: arm: dts: fsl-ls1088a.dtsi: tag serial nodes with bootph-all Tag the serial nodes with bootph-all in order to have these nodes and the drivers available before relocation. Signed-off-by: Ioana Ciornei Signed-off-by: Peng Fan --- arch/arm/dts/fsl-ls1088a.dtsi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/dts/fsl-ls1088a.dtsi b/arch/arm/dts/fsl-ls1088a.dtsi index b094bcf67c4..4782b83515a 100644 --- a/arch/arm/dts/fsl-ls1088a.dtsi +++ b/arch/arm/dts/fsl-ls1088a.dtsi @@ -64,6 +64,7 @@ QORIQ_CLK_PLL_DIV(4)>; interrupts = <0 32 IRQ_TYPE_LEVEL_HIGH>; status = "disabled"; + bootph-all; }; duart1: serial@21c0600 { @@ -73,6 +74,7 @@ QORIQ_CLK_PLL_DIV(4)>; interrupts = <0 32 IRQ_TYPE_LEVEL_HIGH>; status = "disabled"; + bootph-all; }; }; From c1186a99bf083b8731a8c615711b5ac943b06e82 Mon Sep 17 00:00:00 2001 From: Ioana Ciornei Date: Wed, 15 Mar 2023 13:04:13 +0200 Subject: [PATCH 06/11] configs: ls1088a: enable DM_SERIAL Now that the DT nodes for the serial devices are in place for these boards, enable DM_SERIAL in the associated configs. Signed-off-by: Ioana Ciornei Signed-off-by: Peng Fan --- configs/ls1088aqds_tfa_defconfig | 4 +++- configs/ls1088ardb_tfa_SECURE_BOOT_defconfig | 4 +++- configs/ls1088ardb_tfa_defconfig | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/configs/ls1088aqds_tfa_defconfig b/configs/ls1088aqds_tfa_defconfig index 419572470ed..09e273ab425 100644 --- a/configs/ls1088aqds_tfa_defconfig +++ b/configs/ls1088aqds_tfa_defconfig @@ -118,7 +118,9 @@ CONFIG_PCIE_LAYERSCAPE_RC=y CONFIG_DM_RTC=y CONFIG_RTC_PCF2127=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_DSPI=y diff --git a/configs/ls1088ardb_tfa_SECURE_BOOT_defconfig b/configs/ls1088ardb_tfa_SECURE_BOOT_defconfig index 5633901e965..558958c9015 100644 --- a/configs/ls1088ardb_tfa_SECURE_BOOT_defconfig +++ b/configs/ls1088ardb_tfa_SECURE_BOOT_defconfig @@ -90,7 +90,9 @@ CONFIG_PCIE_LAYERSCAPE_RC=y CONFIG_DM_RTC=y CONFIG_RTC_PCF2127=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_DSPI=y diff --git a/configs/ls1088ardb_tfa_defconfig b/configs/ls1088ardb_tfa_defconfig index fd466a5061a..89f814130de 100644 --- a/configs/ls1088ardb_tfa_defconfig +++ b/configs/ls1088ardb_tfa_defconfig @@ -96,7 +96,9 @@ CONFIG_PCIE_LAYERSCAPE_RC=y CONFIG_DM_RTC=y CONFIG_RTC_PCF2127=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_DSPI=y From 677fb953720e664f1603a36041f5aa31599d2f57 Mon Sep 17 00:00:00 2001 From: Ioana Ciornei Date: Wed, 15 Mar 2023 13:04:14 +0200 Subject: [PATCH 07/11] arch: arm: dts: fsl-lx2160a.dtsi: add an 'soc' node The u-boot dts for these boards do not have an soc node, unlike its Linux counterpart. This patch just adds the soc node as seen in Linux, the next patches will move some nodes under it. Signed-off-by: Ioana Ciornei Signed-off-by: Peng Fan --- arch/arm/dts/fsl-lx2160a.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/arm/dts/fsl-lx2160a.dtsi b/arch/arm/dts/fsl-lx2160a.dtsi index 57c7d3ef711..08f160f6989 100644 --- a/arch/arm/dts/fsl-lx2160a.dtsi +++ b/arch/arm/dts/fsl-lx2160a.dtsi @@ -27,6 +27,14 @@ clock-output-names = "sysclk"; }; + soc { + compatible = "simple-bus"; + #address-cells = <2>; + #size-cells = <2>; + ranges; + dma-ranges = <0x0 0x0 0x0 0x0 0x10000 0x00000000>; + }; + crypto: crypto@8000000 { compatible = "fsl,sec-v5.0", "fsl,sec-v4.0"; fsl,sec-era = <10>; From 853493b9f9d6b2ca9ebf239820ba0636b5a957e7 Mon Sep 17 00:00:00 2001 From: Ioana Ciornei Date: Wed, 15 Mar 2023 13:04:15 +0200 Subject: [PATCH 08/11] arch: arm: dts: fsl-lx2160a.dtsi: move the serial nodes under soc Move the serial nodes under the soc node. No changes are made to the nodes, just their location is changed. Signed-off-by: Ioana Ciornei Signed-off-by: Peng Fan --- arch/arm/dts/fsl-lx2160a.dtsi | 56 +++++++++++++++++------------------ 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/arch/arm/dts/fsl-lx2160a.dtsi b/arch/arm/dts/fsl-lx2160a.dtsi index 08f160f6989..58a408d2dc3 100644 --- a/arch/arm/dts/fsl-lx2160a.dtsi +++ b/arch/arm/dts/fsl-lx2160a.dtsi @@ -33,6 +33,34 @@ #size-cells = <2>; ranges; dma-ranges = <0x0 0x0 0x0 0x0 0x10000 0x00000000>; + + uart0: serial@21c0000 { + compatible = "arm,pl011"; + reg = <0x0 0x21c0000 0x0 0x1000>; + clocks = <&clockgen 4 0>; + status = "disabled"; + }; + + uart1: serial@21d0000 { + compatible = "arm,pl011"; + reg = <0x0 0x21d0000 0x0 0x1000>; + clocks = <&clockgen 4 0>; + status = "disabled"; + }; + + uart2: serial@21e0000 { + compatible = "arm,pl011"; + reg = <0x0 0x21e0000 0x0 0x1000>; + clocks = <&clockgen 4 0>; + status = "disabled"; + }; + + uart3: serial@21f0000 { + compatible = "arm,pl011"; + reg = <0x0 0x21f0000 0x0 0x1000>; + clocks = <&clockgen 4 0>; + status = "disabled"; + }; }; crypto: crypto@8000000 { @@ -185,34 +213,6 @@ status = "disabled"; }; - uart0: serial@21c0000 { - compatible = "arm,pl011"; - reg = <0x0 0x21c0000 0x0 0x1000>; - clocks = <&clockgen 4 0>; - status = "disabled"; - }; - - uart1: serial@21d0000 { - compatible = "arm,pl011"; - reg = <0x0 0x21d0000 0x0 0x1000>; - clocks = <&clockgen 4 0>; - status = "disabled"; - }; - - uart2: serial@21e0000 { - compatible = "arm,pl011"; - reg = <0x0 0x21e0000 0x0 0x1000>; - clocks = <&clockgen 4 0>; - status = "disabled"; - }; - - uart3: serial@21f0000 { - compatible = "arm,pl011"; - reg = <0x0 0x21f0000 0x0 0x1000>; - clocks = <&clockgen 4 0>; - status = "disabled"; - }; - dspi0: dspi@2100000 { compatible = "fsl,vf610-dspi"; #address-cells = <1>; From dea0f1a27fb51d1775586c10ae080335d467d49c Mon Sep 17 00:00:00 2001 From: Ioana Ciornei Date: Wed, 15 Mar 2023 13:04:16 +0200 Subject: [PATCH 09/11] arch: arm: dts: fsl-lx2160a.dtsi: sync serial nodes with Linux Sync the serial nodes of the LX2160A based boards with their representation in Linux. We also imported the clockgen and sysclk nodes which are dependencies. Signed-off-by: Ioana Ciornei Signed-off-by: Peng Fan --- arch/arm/dts/fsl-lx2160a-qds.dtsi | 11 ++++++++++- arch/arm/dts/fsl-lx2160a-rdb.dts | 11 ++++++++++- arch/arm/dts/fsl-lx2160a.dtsi | 22 +++++++++++++--------- 3 files changed, 33 insertions(+), 11 deletions(-) diff --git a/arch/arm/dts/fsl-lx2160a-qds.dtsi b/arch/arm/dts/fsl-lx2160a-qds.dtsi index 6635c525859..e96605b1b4f 100644 --- a/arch/arm/dts/fsl-lx2160a-qds.dtsi +++ b/arch/arm/dts/fsl-lx2160a-qds.dtsi @@ -2,7 +2,7 @@ /* * NXP LX2160AQDS common device tree source * - * Copyright 2018-2020 NXP + * Copyright 2018-2020, 2023 NXP * */ @@ -11,6 +11,7 @@ / { aliases { spi0 = &fspi; + serial0 = &uart0; }; }; @@ -286,3 +287,11 @@ &sata3 { status = "okay"; }; + +&uart0 { + status = "okay"; +}; + +&uart1 { + status = "okay"; +}; diff --git a/arch/arm/dts/fsl-lx2160a-rdb.dts b/arch/arm/dts/fsl-lx2160a-rdb.dts index 399409776e7..aaa59598bd4 100644 --- a/arch/arm/dts/fsl-lx2160a-rdb.dts +++ b/arch/arm/dts/fsl-lx2160a-rdb.dts @@ -5,7 +5,7 @@ * Author: Priyanka Jain * Sriram Dash * - * Copyright 2018 NXP + * Copyright 2018, 2023 NXP * */ @@ -18,6 +18,7 @@ compatible = "fsl,lx2160ardb", "fsl,lx2160a"; aliases { spi0 = &fspi; + serial0 = &uart0; }; }; @@ -137,3 +138,11 @@ &sata3 { status = "okay"; }; + +&uart0 { + status = "okay"; +}; + +&uart1 { + status = "okay"; +}; diff --git a/arch/arm/dts/fsl-lx2160a.dtsi b/arch/arm/dts/fsl-lx2160a.dtsi index 58a408d2dc3..0b0f317f305 100644 --- a/arch/arm/dts/fsl-lx2160a.dtsi +++ b/arch/arm/dts/fsl-lx2160a.dtsi @@ -2,7 +2,7 @@ /* * NXP lx2160a SOC common device tree source * - * Copyright 2018-2021 NXP + * Copyright 2018-2021, 2023 NXP * */ @@ -35,30 +35,34 @@ dma-ranges = <0x0 0x0 0x0 0x0 0x10000 0x00000000>; uart0: serial@21c0000 { - compatible = "arm,pl011"; + compatible = "arm,sbsa-uart","arm,pl011"; reg = <0x0 0x21c0000 0x0 0x1000>; - clocks = <&clockgen 4 0>; + interrupts = ; + current-speed = <115200>; status = "disabled"; }; uart1: serial@21d0000 { - compatible = "arm,pl011"; + compatible = "arm,sbsa-uart","arm,pl011"; reg = <0x0 0x21d0000 0x0 0x1000>; - clocks = <&clockgen 4 0>; + interrupts = ; + current-speed = <115200>; status = "disabled"; }; uart2: serial@21e0000 { - compatible = "arm,pl011"; + compatible = "arm,sbsa-uart","arm,pl011"; reg = <0x0 0x21e0000 0x0 0x1000>; - clocks = <&clockgen 4 0>; + interrupts = ; + current-speed = <115200>; status = "disabled"; }; uart3: serial@21f0000 { - compatible = "arm,pl011"; + compatible = "arm,sbsa-uart","arm,pl011"; reg = <0x0 0x21f0000 0x0 0x1000>; - clocks = <&clockgen 4 0>; + interrupts = ; + current-speed = <115200>; status = "disabled"; }; }; From f2ac9f6a17aeffbca1926f4364ccddce329659b1 Mon Sep 17 00:00:00 2001 From: Ioana Ciornei Date: Wed, 15 Mar 2023 13:04:17 +0200 Subject: [PATCH 10/11] arch: arm: dts: fsl-lx2160a.dtsi: tag serial nodes with bootph-all Tag the serial nodes with bootph-all in order to have these nodes and the drivers available before relocation. Signed-off-by: Ioana Ciornei Signed-off-by: Peng Fan --- arch/arm/dts/fsl-lx2160a.dtsi | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm/dts/fsl-lx2160a.dtsi b/arch/arm/dts/fsl-lx2160a.dtsi index 0b0f317f305..680c69c7b73 100644 --- a/arch/arm/dts/fsl-lx2160a.dtsi +++ b/arch/arm/dts/fsl-lx2160a.dtsi @@ -40,6 +40,7 @@ interrupts = ; current-speed = <115200>; status = "disabled"; + bootph-all; }; uart1: serial@21d0000 { @@ -48,6 +49,7 @@ interrupts = ; current-speed = <115200>; status = "disabled"; + bootph-all; }; uart2: serial@21e0000 { @@ -56,6 +58,7 @@ interrupts = ; current-speed = <115200>; status = "disabled"; + bootph-all; }; uart3: serial@21f0000 { @@ -64,6 +67,7 @@ interrupts = ; current-speed = <115200>; status = "disabled"; + bootph-all; }; }; From 8ac04e9062fc65bb09754cefefc096d554c6881c Mon Sep 17 00:00:00 2001 From: Ioana Ciornei Date: Wed, 15 Mar 2023 13:04:18 +0200 Subject: [PATCH 11/11] board: freescale: lx2160a: remove the PL01X device instantiation There is no need for the board file to instantiate a PL01X platform device anymore. This is all taken care of by the DM code which now will probe the device based on the DT node. Signed-off-by: Ioana Ciornei Signed-off-by: Peng Fan --- board/freescale/lx2160a/lx2160a.c | 34 ------------------------------- 1 file changed, 34 deletions(-) diff --git a/board/freescale/lx2160a/lx2160a.c b/board/freescale/lx2160a/lx2160a.c index 33842d02178..2a752054cd9 100644 --- a/board/freescale/lx2160a/lx2160a.c +++ b/board/freescale/lx2160a/lx2160a.c @@ -55,45 +55,11 @@ DECLARE_GLOBAL_DATA_PTR; -static struct pl01x_serial_plat serial0 = { -#if CONFIG_CONS_INDEX == 0 - .base = CFG_SYS_SERIAL0, -#elif CONFIG_CONS_INDEX == 1 - .base = CFG_SYS_SERIAL1, -#else -#error "Unsupported console index value." -#endif - .type = TYPE_PL011, -}; - -U_BOOT_DRVINFO(nxp_serial0) = { - .name = "serial_pl01x", - .plat = &serial0, -}; - -static struct pl01x_serial_plat serial1 = { - .base = CFG_SYS_SERIAL1, - .type = TYPE_PL011, -}; - -U_BOOT_DRVINFO(nxp_serial1) = { - .name = "serial_pl01x", - .plat = &serial1, -}; - -static void uart_get_clock(void) -{ - serial0.clock = get_serial_clock(); - serial1.clock = get_serial_clock(); -} - int board_early_init_f(void) { #if defined(CONFIG_SYS_I2C_EARLY_INIT) && defined(CONFIG_SPL_BUILD) i2c_early_init_f(); #endif - /* get required clock for UART IP */ - uart_get_clock(); #ifdef CONFIG_EMC2305 select_i2c_ch_pca9547(I2C_MUX_CH_EMC2305, 0);