[PATCH] mpc8379erdb: Convert to using DM_SERIAL
sinan at writeme.com
sinan at writeme.com
Sat Apr 8 00:03:44 CEST 2023
From: Sinan Akman <sinan at writeme.com>
Convert to DM_SERIAL for mpc8379erdb.
Signed-off-by: Sinan Akman <sinan at writeme.com>
---
arch/powerpc/dts/mpc8379erdb.dts | 27 +++++++++++++++++++++++++++
configs/MPC837XERDB_defconfig | 7 ++++++-
include/configs/MPC837XERDB.h | 2 ++
3 files changed, 35 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/dts/mpc8379erdb.dts b/arch/powerpc/dts/mpc8379erdb.dts
index 2e7c8f103c..3db5ececae 100644
--- a/arch/powerpc/dts/mpc8379erdb.dts
+++ b/arch/powerpc/dts/mpc8379erdb.dts
@@ -13,6 +13,11 @@
#address-cells = <1>;
#size-cells = <1>;
+ aliases {
+ serial0 = &serial0;
+ serial1 = &serial1;
+ };
+
cpus {
#address-cells = <1>;
#size-cells = <0>;
@@ -60,6 +65,28 @@
clock-frequency = <0>;
};
+ serial0: serial at 4500 {
+ cell-index = <0>;
+ device_type = "serial";
+ compatible = "fsl,ns16550", "ns16550";
+ reg = <0x4500 0x100>;
+ clock-frequency = <333333000>;
+ interrupts = <9 0x8>;
+ interrupt-parent = <&ipic>;
+ bootph-all;
+ };
+
+ serial1: serial at 4600 {
+ cell-index = <1>;
+ device_type = "serial";
+ compatible = "fsl,ns16550", "ns16550";
+ reg = <0x4600 0x100>;
+ clock-frequency = <333333000>;
+ interrupts = <10 0x8>;
+ interrupt-parent = <&ipic>;
+ bootph-all;
+ };
+
ipic: interrupt-controller at 700 {
compatible = "fsl,ipic";
interrupt-controller;
diff --git a/configs/MPC837XERDB_defconfig b/configs/MPC837XERDB_defconfig
index 8f3f54cb4f..7bb878f369 100644
--- a/configs/MPC837XERDB_defconfig
+++ b/configs/MPC837XERDB_defconfig
@@ -4,6 +4,8 @@ CONFIG_SYS_MALLOC_LEN=0x80000
CONFIG_ENV_SIZE=0x4000
CONFIG_ENV_SECT_SIZE=0x10000
CONFIG_DEFAULT_DEVICE_TREE="mpc8379erdb"
+CONFIG_DEBUG_UART_BASE=0xe0004500
+CONFIG_DEBUG_UART_CLOCK=333333000
CONFIG_SYS_CLK_FREQ=66666667
CONFIG_ENV_ADDR=0xFE080000
# CONFIG_SYS_PCI_64BIT is not set
@@ -118,6 +120,7 @@ CONFIG_LCRR_DBYP_PLL_BYPASSED=y
CONFIG_LCRR_CLKDIV_8=y
CONFIG_FSL_SERDES=y
CONFIG_USE_UBOOTPATH=y
+CONFIG_DEBUG_UART=y
CONFIG_SYS_MONITOR_LEN=524288
CONFIG_OF_BOARD_SETUP=y
CONFIG_OF_STDOUT_VIA_ALIAS=y
@@ -185,7 +188,9 @@ CONFIG_MII=y
CONFIG_VSC7385_ENET=y
CONFIG_TSEC_ENET=y
CONFIG_RTC_DS1374=y
-CONFIG_SYS_NS16550_SERIAL=y
+CONFIG_SPECIFY_CONSOLE_INDEX=y
+CONFIG_DM_SERIAL=y
+CONFIG_SYS_NS16550=y
CONFIG_USB=y
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_EHCI_FSL=y
diff --git a/include/configs/MPC837XERDB.h b/include/configs/MPC837XERDB.h
index 70b1c39924..3967cc2836 100644
--- a/include/configs/MPC837XERDB.h
+++ b/include/configs/MPC837XERDB.h
@@ -140,7 +140,9 @@
/*
* Serial Port
*/
+#if !CONFIG_IS_ENABLED(DM_SERIAL) && !CONFIG_IS_ENABLED(DM_CLK)
#define CFG_SYS_NS16550_CLK get_bus_freq(0)
+#endif
#define CFG_SYS_BAUDRATE_TABLE \
{300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 115200}
--
2.25.1
More information about the U-Boot
mailing list