Enable DM_SERIAL for NXP PPC T-series boards
cover Enable DM_SERIAL for NXP PPC T-series boards
This series enables DM_SERIAL for t2080rdb, t4240rdb, t1042d4rdb and t1024rdb.
Similar steps are taken for each board:
- The get_serial_clock() callback is implemented for each board
- The serial nodes are described in the device tree, similar to Linux v6.4
- The serial nodes are marked with 'bootph-all' to guarantee the drivers are initialized before relocation. New board specific *-u-boot.dtsi files are created to store these properties.
- CONFIG_DM_SERIAL is enabled in the board defconfigs
While here, enumerate the PCI devices at probe time for each board.
Camelia Groza (20):
board: freescale: t2080rdb: enumerate PCI devices
board: freescale: t2080rdb: implement get_serial_clock
powerpc: dts: t2080rdb: add serial nodes
powerpc: dts: t2080rdb: tag serial nodes with bootph-all
configs: T2080RDB: enable DM_SERIAL
board: freescale: t4240rdb: enumerate PCI devices
board: freescale: t4240rdb: implement get_serial_clock
powerpc: dts: t4240rdb: add serial nodes
powerpc: dts: t4240rdb: tag serial nodes with bootph-all
configs: T4240RDB: enable DM_SERIAL
board: freescale: t104xrdb: enumerate PCI devices
board: freescale: t104xrdb: implement get_serial_clock
powerpc: dts: t1042d4rdb: add serial nodes
powerpc: dts: t1042d4rdb: tag serial nodes with bootph-all
configs: T1042D4RDB: enable DM_SERIAL
board: freescale: t102xrdb: enumerate PCI devices
board: freescale: t102xrdb: implement get_serial_clock
powerpc: dts: t1024rdb: add serial nodes
powerpc: dts: t1024rdb: tag serial nodes with bootph-all
configs: T1024RDB: enable DM_SERIAL
arch/powerpc/dts/t1023si-post.dtsi | 4 +++- arch/powerpc/dts/t1024rdb-u-boot.dtsi | 12 ++++++++++++ arch/powerpc/dts/t1024rdb.dts | 6 +++++- arch/powerpc/dts/t1042d4rdb-u-boot.dtsi | 12 ++++++++++++ arch/powerpc/dts/t1042d4rdb.dts | 6 +++++- arch/powerpc/dts/t1042si-post.dtsi | 4 +++- arch/powerpc/dts/t2080rdb-u-boot.dtsi | 12 ++++++++++++ arch/powerpc/dts/t2080rdb.dts | 6 +++++- arch/powerpc/dts/t2080si-post.dtsi | 4 +++- arch/powerpc/dts/t4240rdb-u-boot.dtsi | 12 ++++++++++++ arch/powerpc/dts/t4240rdb.dts | 6 +++++- arch/powerpc/dts/t4240si-post.dtsi | 4 +++- board/freescale/t102xrdb/t102xrdb.c | 12 +++++++++++- board/freescale/t104xrdb/t104xrdb.c | 12 ++++++++++++ board/freescale/t208xrdb/t208xrdb.c | 13 ++++++++++++- board/freescale/t4rdb/t4240rdb.c | 11 +++++++++++ configs/T1024RDB_defconfig | 4 +++- configs/T1042D4RDB_defconfig | 4 +++- configs/T2080RDB_defconfig | 4 +++- configs/T2080RDB_revD_defconfig | 4 +++- configs/T4240RDB_defconfig | 4 +++- include/configs/T102xRDB.h | 4 +++- include/configs/T104xRDB.h | 4 +++- include/configs/T208xRDB.h | 4 +++- include/configs/T4240RDB.h | 4 +++- 25 files changed, 153 insertions(+), 19 deletions(-) create mode 100644 arch/powerpc/dts/t1024rdb-u-boot.dtsi create mode 100644 arch/powerpc/dts/t1042d4rdb-u-boot.dtsi create mode 100644 arch/powerpc/dts/t2080rdb-u-boot.dtsi create mode 100644 arch/powerpc/dts/t4240rdb-u-boot.dtsi
--
2.17.1
PATCH 1/20 board: freescale: t2080rdb: enumerate PCI devices
Call pci_init() to force PCI enumeration at probe time.
--- board/freescale/t208xrdb/t208xrdb.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
board/freescale/t208xrdb/t208xrdb.c +4 -1
@@ -1,7 +1,7 @@// SPDX-License-Identifier: GPL-2.0+ /* * Copyright 2009-2013 Freescale Semiconductor, Inc. -* Copyright 2021 NXP +* Copyright 2021-2023 NXP */ #include <common.h>
@@ -106,6 +106,9 @@ int board_early_init_r(void)*/ if (adjust_vdd (0 ))printf ("Warning: Adjusting core voltage failed.\n" ); + +pci_init (); +return 0 ; }
Signature · 1 line
2.17.1
PATCH 2/20 board: freescale: t2080rdb: implement get_serial_clock
In reply to Camelia GrozaThe serial clock is provided by the get_serial_clock() callback on PPC under DM_SERIAL. Use the same method to compute the clock as for non-DM_SERIAL use cases.
--- board/freescale/t208xrdb/t208xrdb.c | 8 ++++++++ include/configs/T208xRDB.h | 4 +++- 2 files changed, 11 insertions(+), 1 deletion(-)
board/freescale/t208xrdb/t208xrdb.c +8 -0
@@ -20,6 +20,7 @@#include <asm/fsl_law.h> #include <asm/fsl_serdes.h> #include <asm/fsl_liodn.h> +#include <clock_legacy.h> #include <fm_eth.h> #include "t208xrdb.h" #include "cpld.h"
@@ -42,6 +43,13 @@ u8 get_hw_revision(void) } } +#if CONFIG_IS_ENABLED (DM_SERIAL ) +int get_serial_clock (void ) +{ +return get_bus_freq (0 ) /2 ; +} +#endif +int checkboard (void ) {struct cpu_type *cpu = gd->arch.cpu;
include/configs/T208xRDB.h +3 -1
@@ -1,7 +1,7 @@/* SPDX-License-Identifier: GPL-2.0+ */ /* * Copyright 2014 Freescale Semiconductor, Inc. -* Copyright 2020-2021 NXP +* Copyright 2020-2023 NXP */ /*
@@ -215,7 +215,9 @@/* * Serial Port */ +#if !CONFIG_IS_ENABLED (DM_SERIAL )#define CFG_SYS_NS16550_CLK (get_bus_freq(0)/2) +#endif #define CFG_SYS_BAUDRATE_TABLE \ {300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200}#define CFG_SYS_NS16550_COM1 (CFG_SYS_CCSRBAR+0x11C500)
Signature · 1 line
2.17.1
PATCH 3/20 powerpc: dts: t2080rdb: add serial nodes
In reply to Camelia GrozaAdd the serial node descriptions similar to Linux v6.4 for the t2080rdb board and its dependencies.
--- arch/powerpc/dts/t2080rdb.dts | 6 +++++- arch/powerpc/dts/t2080si-post.dtsi | 4 +++- 2 files changed, 8 insertions(+), 2 deletions(-)
arch/powerpc/dts/t2080rdb.dts +5 -1
@@ -3,7 +3,7 @@ * T2080RDB Device Tree Source * * Copyright 2013 - 2015 Freescale Semiconductor Inc. - * Copyright 2019-2021 NXP + * Copyright 2019-2023 NXP */ /include/ "t2080.dtsi"
@@ -17,6 +17,10 @@ aliases { spi0 = &espi0; + serial0 = &serial0; + serial1 = &serial1; + serial2 = &serial2; + serial3 = &serial3; }; };
arch/powerpc/dts/t2080si-post.dtsi +3 -1
@@ -3,12 +3,14 @@ * T2080 Silicon/SoC Device Tree Source (post include) * * Copyright 2013 Freescale Semiconductor Inc. - * Copyright 2021 NXP + * Copyright 2021-2023 NXP * */ &soc { /include/ "qoriq-clockgen2.dtsi" +/include/ "qoriq-duart-0.dtsi" +/include/ "qoriq-duart-1.dtsi" /include/ "qoriq-gpio-0.dtsi" /include/ "qoriq-gpio-1.dtsi" /include/ "qoriq-gpio-2.dtsi"
Signature · 1 line
2.17.1
PATCH 4/20 powerpc: dts: t2080rdb: tag serial nodes with bootph-all
In reply to Camelia GrozaMake sure the serial driver is initialized before relocation by tagging the serial nodes with "bootph-all". Add these u-boot specific properties to an *-u-boot.dtsi file.
--- arch/powerpc/dts/t2080rdb-u-boot.dtsi | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 arch/powerpc/dts/t2080rdb-u-boot.dtsi
arch/powerpc/dts/t2080rdb-u-boot.dtsi new file +12 -0
@@ -0,0 +1,12 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* Copyright 2023 NXP */ + +&serial0 { + bootph-all; +}; + +&serial1 { + bootph-all; +}; + +#include "u-boot.dtsi"
Signature · 1 line
2.17.1
PATCH 5/20 configs: T2080RDB: enable DM_SERIAL
In reply to Camelia GrozaAs the serial devices are configured in the device tree, enable DM_SERIAL in the non-SPL T2080RDB defconfigs.
--- configs/T2080RDB_defconfig | 4 +++- configs/T2080RDB_revD_defconfig | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-)
configs/T2080RDB_defconfig +3 -1
@@ -106,7 +106,9 @@ CONFIG_PCIE_FSL=y CONFIG_SYS_QE_FMAN_FW_IN_NOR=y CONFIG_DM_RTC=y CONFIG_RTC_DS1307=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_ESPI=y
configs/T2080RDB_revD_defconfig +3 -1
@@ -108,7 +108,9 @@ CONFIG_PCIE_FSL=y CONFIG_SYS_QE_FMAN_FW_IN_NOR=y CONFIG_DM_RTC=y CONFIG_RTC_DS1307=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_ESPI=y
Signature · 1 line
2.17.1
PATCH 6/20 board: freescale: t4240rdb: enumerate PCI devices
In reply to Camelia GrozaCall pci_init() to force PCI enumeration at probe time.
--- board/freescale/t4rdb/t4240rdb.c | 2 ++ 1 file changed, 2 insertions(+)
board/freescale/t4rdb/t4240rdb.c +2 -0
@@ -86,6 +86,8 @@ int board_early_init_r(void)if (adjust_vdd (0 ))printf ("Warning: Adjusting core voltage failed.\n" ); +pci_init (); +return 0 ; }
Signature · 1 line
2.17.1
PATCH 7/20 board: freescale: t4240rdb: implement get_serial_clock
In reply to Camelia GrozaThe serial clock is provided by the get_serial_clock() callback on PPC under DM_SERIAL. Use the same method to compute the clock as for non-DM_SERIAL use cases.
--- board/freescale/t4rdb/t4240rdb.c | 9 +++++++++ include/configs/T4240RDB.h | 4 +++- 2 files changed, 12 insertions(+), 1 deletion(-)
board/freescale/t4rdb/t4240rdb.c +9 -0
@@ -1,6 +1,7 @@// SPDX-License-Identifier: GPL-2.0+ /* * Copyright 2014 Freescale Semiconductor, Inc. +* Copyright 2023 NXP */ #include <common.h>
@@ -20,6 +21,7 @@#include <asm/fsl_law.h> #include <asm/fsl_serdes.h> #include <asm/fsl_liodn.h> +#include <clock_legacy.h> #include <fm_eth.h> #include "t4rdb.h"
@@ -28,6 +30,13 @@DECLARE_GLOBAL_DATA_PTR ; +#if CONFIG_IS_ENABLED (DM_SERIAL ) +int get_serial_clock (void ) +{ +return get_bus_freq (0 ) /2 ; +} +#endif +int checkboard (void ) {struct cpu_type *cpu = gd->arch.cpu;
include/configs/T4240RDB.h +3 -1
@@ -1,7 +1,7 @@/* SPDX-License-Identifier: GPL-2.0+ */ /* * Copyright 2014 Freescale Semiconductor, Inc. -* Copyright 2020-2021 NXP +* Copyright 2020-2023 NXP */ /*
@@ -77,7 +77,9 @@* open - index 2 * shorted - index 1 */ +#if !CONFIG_IS_ENABLED (DM_SERIAL )#define CFG_SYS_NS16550_CLK (get_bus_freq(0)/2) +#endif #define CFG_SYS_BAUDRATE_TABLE \ {300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200}
Signature · 1 line
2.17.1
PATCH 8/20 powerpc: dts: t4240rdb: add serial nodes
In reply to Camelia GrozaAdd the serial node descriptions similar to Linux v6.4 for the t4240rdb board and its dependencies.
--- arch/powerpc/dts/t4240rdb.dts | 6 +++++- arch/powerpc/dts/t4240si-post.dtsi | 4 +++- 2 files changed, 8 insertions(+), 2 deletions(-)
arch/powerpc/dts/t4240rdb.dts +5 -1
@@ -3,7 +3,7 @@ * T4240RDB Device Tree Source * * Copyright 2013 - 2015 Freescale Semiconductor Inc. - * Copyright 2019-2021 NXP + * Copyright 2019-2023 NXP */ /include/ "t4240.dtsi"
@@ -17,6 +17,10 @@ aliases { spi0 = &espi0; + serial0 = &serial0; + serial1 = &serial1; + serial2 = &serial2; + serial3 = &serial3; }; };
arch/powerpc/dts/t4240si-post.dtsi +3 -1
@@ -3,11 +3,13 @@ * T4240 Silicon/SoC Device Tree Source (post include) * * Copyright 2012 - 2015 Freescale Semiconductor Inc. - * Copyright 2021 NXP + * Copyright 2021-2023 NXP * */ &soc { /include/ "qoriq-clockgen2.dtsi" +/include/ "qoriq-duart-0.dtsi" +/include/ "qoriq-duart-1.dtsi" /include/ "qoriq-gpio-0.dtsi" /include/ "qoriq-gpio-1.dtsi" /include/ "qoriq-gpio-2.dtsi"
Signature · 1 line
2.17.1
PATCH 9/20 powerpc: dts: t4240rdb: tag serial nodes with bootph-all
In reply to Camelia GrozaMake sure the serial driver is initialized before relocation by tagging the serial nodes with "bootph-all". Add these u-boot specific properties to an *-u-boot.dtsi file.
--- arch/powerpc/dts/t4240rdb-u-boot.dtsi | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 arch/powerpc/dts/t4240rdb-u-boot.dtsi
arch/powerpc/dts/t4240rdb-u-boot.dtsi new file +12 -0
@@ -0,0 +1,12 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* Copyright 2023 NXP */ + +&serial0 { + bootph-all; +}; + +&serial1 { + bootph-all; +}; + +#include "u-boot.dtsi"
Signature · 1 line
2.17.1
PATCH 11/20 board: freescale: t104xrdb: enumerate PCI devices
In reply to Camelia GrozaCall pci_init() to force PCI enumeration at probe time.
--- board/freescale/t104xrdb/t104xrdb.c | 3 +++ 1 file changed, 3 insertions(+)
board/freescale/t104xrdb/t104xrdb.c +3 -0
@@ -88,6 +88,9 @@ int board_early_init_r(void)MAS3_SX |MAS3_SW |MAS3_SR ,MAS2_I |MAS2_G , 0, flash_esel, BOOKE_PAGESZ_256M, 1);#endif + +pci_init (); +return 0 ; }
Signature · 1 line
2.17.1
PATCH 10/20 configs: T4240RDB: enable DM_SERIAL
In reply to Camelia GrozaAs the serial devices are configured in the device tree, enable DM_SERIAL in the non-SPL T4240RDB defconfig.
--- configs/T4240RDB_defconfig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
configs/T4240RDB_defconfig +3 -1
@@ -96,7 +96,9 @@ CONFIG_MII=y CONFIG_DM_PCI_COMPAT=y CONFIG_PCIE_FSL=y 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_FSL_ESPI=y
Signature · 1 line
2.17.1
PATCH 12/20 board: freescale: t104xrdb: implement get_serial_clock
In reply to Camelia GrozaThe serial clock is provided by the get_serial_clock() callback on PPC under DM_SERIAL. Use the same method to compute the clock as for non-DM_SERIAL use cases.
--- board/freescale/t104xrdb/t104xrdb.c | 9 +++++++++ include/configs/T104xRDB.h | 4 +++- 2 files changed, 12 insertions(+), 1 deletion(-)
board/freescale/t104xrdb/t104xrdb.c +9 -0
@@ -1,6 +1,7 @@// SPDX-License-Identifier: GPL-2.0+ /* * Copyright 2013 Freescale Semiconductor, Inc. +* Copyright 2023 NXP */ #include <common.h>
@@ -22,6 +23,7 @@#include <asm/fsl_law.h> #include <asm/fsl_serdes.h> #include <asm/fsl_liodn.h> +#include <clock_legacy.h> #include <fm_eth.h> #include "../common/sleep.h" #include "t104xrdb.h"
@@ -29,6 +31,13 @@DECLARE_GLOBAL_DATA_PTR ; +#if CONFIG_IS_ENABLED (DM_SERIAL ) +int get_serial_clock (void ) +{ +return get_bus_freq (0 ) /2 ; +} +#endif +int checkboard (void ) {struct cpu_type *cpu = gd->arch.cpu;
include/configs/T104xRDB.h +3 -1
@@ -1,7 +1,7 @@/* SPDX-License-Identifier: GPL-2.0+ */ /* * Copyright 2014 Freescale Semiconductor, Inc. -* Copyright 2020-2021 NXP +* Copyright 2020-2023 NXP */ #ifndef __CONFIG_H
@@ -238,7 +238,9 @@* open - index 2 * shorted - index 1 */ +#if !CONFIG_IS_ENABLED (DM_SERIAL )#define CFG_SYS_NS16550_CLK (get_bus_freq(0)/2) +#endif #define CFG_SYS_BAUDRATE_TABLE \ {300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200}
Signature · 1 line
2.17.1
PATCH 13/20 powerpc: dts: t1042d4rdb: add serial nodes
In reply to Camelia GrozaAdd the serial node descriptions similar to Linux v6.4 for the t1042d4rdb board and its dependencies.
--- arch/powerpc/dts/t1042d4rdb.dts | 6 +++++- arch/powerpc/dts/t1042si-post.dtsi | 4 +++- 2 files changed, 8 insertions(+), 2 deletions(-)
arch/powerpc/dts/t1042d4rdb.dts +5 -1
@@ -3,7 +3,7 @@ * T1042D4RDB Device Tree Source * * Copyright 2013 - 2015 Freescale Semiconductor Inc. - * Copyright 2019-2021 NXP + * Copyright 2019-2023 NXP */ /include/ "t104x.dtsi"
@@ -17,6 +17,10 @@ aliases { spi0 = &espi0; + serial0 = &serial0; + serial1 = &serial1; + serial2 = &serial2; + serial3 = &serial3; }; };
arch/powerpc/dts/t1042si-post.dtsi +3 -1
@@ -3,11 +3,13 @@ * T1042 Silicon/SoC Device Tree Source (post include) * * Copyright 2013 - 2014 Freescale Semiconductor Inc. - * Copyright 2021 NXP + * Copyright 2021-2023 NXP * */ &soc { /include/ "qoriq-clockgen2.dtsi" +/include/ "qoriq-duart-0.dtsi" +/include/ "qoriq-duart-1.dtsi" /include/ "qoriq-gpio-0.dtsi" /include/ "qoriq-gpio-1.dtsi" /include/ "qoriq-gpio-2.dtsi"
Signature · 1 line
2.17.1
PATCH 14/20 powerpc: dts: t1042d4rdb: tag serial nodes with bootph-all
In reply to Camelia GrozaMake sure the serial driver is initialized before relocation by tagging the serial nodes with "bootph-all". Add these u-boot specific properties to an *-u-boot.dtsi file.
--- arch/powerpc/dts/t1042d4rdb-u-boot.dtsi | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 arch/powerpc/dts/t1042d4rdb-u-boot.dtsi
arch/powerpc/dts/t1042d4rdb-u-boot.dtsi new file +12 -0
@@ -0,0 +1,12 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* Copyright 2023 NXP */ + +&serial0 { + bootph-all; +}; + +&serial1 { + bootph-all; +}; + +#include "u-boot.dtsi"
Signature · 1 line
2.17.1
PATCH 15/20 configs: T1042D4RDB: enable DM_SERIAL
In reply to Camelia GrozaAs the serial devices are configured in the device tree, enable DM_SERIAL in the non-SPL T1042D4RDB defconfigs.
--- configs/T1042D4RDB_defconfig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
configs/T1042D4RDB_defconfig +3 -1
@@ -101,7 +101,9 @@ CONFIG_SYS_QE_FW_ADDR=0xEFF10000 CONFIG_SYS_QE_FMAN_FW_IN_NOR=y CONFIG_DM_RTC=y CONFIG_RTC_DS1337=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_ESPI=y
Signature · 1 line
2.17.1
PATCH 16/20 board: freescale: t102xrdb: enumerate PCI devices
In reply to Camelia GrozaCall pci_init() to force PCI enumeration at probe time.
--- board/freescale/t102xrdb/t102xrdb.c | 2 ++ 1 file changed, 2 insertions(+)
board/freescale/t102xrdb/t102xrdb.c +2 -0
@@ -159,6 +159,8 @@ int board_early_init_r(void)board_mux_lane ();#endif +pci_init (); +return 0 ; }
Signature · 1 line
2.17.1
PATCH 18/20 powerpc: dts: t1024rdb: add serial nodes
In reply to Camelia GrozaAdd the serial node descriptions similar to Linux v6.4 for the t1024rdb board and its dependencies.
--- arch/powerpc/dts/t1023si-post.dtsi | 4 +++- arch/powerpc/dts/t1024rdb.dts | 6 +++++- 2 files changed, 8 insertions(+), 2 deletions(-)
arch/powerpc/dts/t1023si-post.dtsi +3 -1
@@ -3,13 +3,15 @@ * T1023 Silicon/SoC Device Tree Source (post include) * * Copyright 2014 Freescale Semiconductor Inc. - * Copyright 2019-2020 NXP + * Copyright 2019-2023 NXP * */ &soc { /include/ "qoriq-clockgen2.dtsi" +/include/ "qoriq-duart-0.dtsi" +/include/ "qoriq-duart-1.dtsi" /include/ "qoriq-gpio-0.dtsi" /include/ "qoriq-gpio-1.dtsi" /include/ "qoriq-gpio-2.dtsi"
arch/powerpc/dts/t1024rdb.dts +5 -1
@@ -3,7 +3,7 @@ * T1024RDB Device Tree Source * * Copyright 2013 - 2015 Freescale Semiconductor Inc. - * Copyright 2019-2020 NXP + * Copyright 2019-2023 NXP */ /include/ "t102x.dtsi"
@@ -17,6 +17,10 @@ aliases { sg_2500_aqr105_phy4 = &sg_2500_aqr105_phy4; + serial0 = &serial0; + serial1 = &serial1; + serial2 = &serial2; + serial3 = &serial3; spi0 = &espi0; };
Signature · 1 line
2.17.1
PATCH 17/20 board: freescale: t102xrdb: implement get_serial_clock
In reply to Camelia GrozaThe serial clock is provided by the get_serial_clock() callback on PPC under DM_SERIAL. Use the same method to compute the clock as for non-DM_SERIAL use cases.
--- board/freescale/t102xrdb/t102xrdb.c | 10 +++++++++- include/configs/T102xRDB.h | 4 +++- 2 files changed, 12 insertions(+), 2 deletions(-)
board/freescale/t102xrdb/t102xrdb.c +9 -1
@@ -1,7 +1,7 @@// SPDX-License-Identifier: GPL-2.0+ /* * Copyright 2014 Freescale Semiconductor, Inc. -* Copyright 2020 NXP +* Copyright 2020-2023 NXP */ #include <common.h>
@@ -20,6 +20,7 @@#include <asm/fsl_law.h> #include <asm/fsl_serdes.h> #include <asm/fsl_liodn.h> +#include <clock_legacy.h> #include <fm_eth.h> #include "t102xrdb.h" #ifdef CONFIG_TARGET_T1024RDB
@@ -45,6 +46,13 @@ enum { };#endif +#if CONFIG_IS_ENABLED (DM_SERIAL ) +int get_serial_clock (void ) +{ +return get_bus_freq (0 ) /2 ; +} +#endif +int checkboard (void ) {struct cpu_type *cpu = gd->arch.cpu;
include/configs/T102xRDB.h +3 -1
@@ -1,7 +1,7 @@/* SPDX-License-Identifier: GPL-2.0+ */ /* * Copyright 2014 Freescale Semiconductor, Inc. -* Copyright 2020-2021 NXP +* Copyright 2020-2023 NXP */ /*
@@ -283,7 +283,9 @@#define CFG_SYS_INIT_SP_OFFSET (CFG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)/* Serial Port */ +#if !CONFIG_IS_ENABLED (DM_SERIAL )#define CFG_SYS_NS16550_CLK (get_bus_freq(0)/2) +#endif #define CFG_SYS_BAUDRATE_TABLE \ {300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200}
Signature · 1 line
2.17.1
PATCH 19/20 powerpc: dts: t1024rdb: tag serial nodes with bootph-all
In reply to Camelia GrozaMake sure the serial driver is initialized before relocation by tagging the serial nodes with "bootph-all". Add these u-boot specific properties to an *-u-boot.dtsi file.
--- arch/powerpc/dts/t1024rdb-u-boot.dtsi | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 arch/powerpc/dts/t1024rdb-u-boot.dtsi
arch/powerpc/dts/t1024rdb-u-boot.dtsi new file +12 -0
@@ -0,0 +1,12 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* Copyright 2023 NXP */ + +&serial0 { + bootph-all; +}; + +&serial1 { + bootph-all; +}; + +#include "u-boot.dtsi"
Signature · 1 line
2.17.1
PATCH 20/20 configs: T1024RDB: enable DM_SERIAL
In reply to Camelia GrozaAs the serial devices are configured in the device tree, enable DM_SERIAL in the non-SPL T1024RDB defconfigs.
--- configs/T1024RDB_defconfig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
configs/T1024RDB_defconfig +3 -1
@@ -101,7 +101,9 @@ CONFIG_SYS_QE_FW_ADDR=0xEFE00000 CONFIG_SYS_QE_FMAN_FW_IN_NOR=y CONFIG_DM_RTC=y CONFIG_RTC_DS1337=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_ESPI=y
Signature · 1 line
2.17.1