aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorTom Rini2023-02-12 15:25:09 -0500
committerTom Rini2023-02-12 15:25:09 -0500
commit386e77cda8b690dbf5b2b7c828b3313205e5078c (patch)
tree50308d557caee50e8decc77f4be5ddfdeabcc9cb /arch
parent0d91c88230fe8bd9f8d39ca2ab69cd6282e9f949 (diff)
parent6a8c36b936ab69a7521ec1ecfd20f7b85f7f59c5 (diff)
Merge branch 'for-2023.04' of https://source.denx.de/u-boot/custodians/u-boot-mpc8xx
- A fix for a long standing bug that has been exposed by commit 50128aeb0f8 ("cyclic: get rid of cyclic_init()") preventing 8xx boards from booting since u-boot 2023.01 - A GPIO driver for powerpc 8xx chip - Fixup for powerpc 8xx SPI driver - A new powerpc 8xx board - The two devices having that board.
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/Kconfig1
-rw-r--r--arch/powerpc/cpu/mpc8xx/Kconfig6
-rw-r--r--arch/powerpc/cpu/mpc8xx/start.S1
-rw-r--r--arch/powerpc/dts/Makefile1
-rw-r--r--arch/powerpc/dts/cmpc885.dts94
-rw-r--r--arch/powerpc/include/asm/arch-mpc8xx/gpio.h12
6 files changed, 114 insertions, 1 deletions
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index e0801c25941..bee59c3bea4 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -28,6 +28,7 @@ config MPC85xx
config MPC8xx
bool "MPC8xx"
+ select CREATE_ARCH_SYMLINK
select BOARD_EARLY_INIT_F
imply CMD_REGINFO
imply WDT_MPC8xx
diff --git a/arch/powerpc/cpu/mpc8xx/Kconfig b/arch/powerpc/cpu/mpc8xx/Kconfig
index d63071104c4..628d3617bc8 100644
--- a/arch/powerpc/cpu/mpc8xx/Kconfig
+++ b/arch/powerpc/cpu/mpc8xx/Kconfig
@@ -11,6 +11,9 @@ choice
config TARGET_MCR3000
bool "Support MCR3000 board from CSSI"
+config TARGET_CMPC885
+ bool "Support CMPC885 board from CSSI"
+
endchoice
choice
@@ -84,6 +87,7 @@ config SYS_DER
help
Debug Event Register (37-47)
-source "board/cssi/MCR3000/Kconfig"
+source "board/cssi/mcr3000/Kconfig"
+source "board/cssi/cmpc885/Kconfig"
endmenu
diff --git a/arch/powerpc/cpu/mpc8xx/start.S b/arch/powerpc/cpu/mpc8xx/start.S
index 1f1107e61d5..0aa73fca125 100644
--- a/arch/powerpc/cpu/mpc8xx/start.S
+++ b/arch/powerpc/cpu/mpc8xx/start.S
@@ -171,6 +171,7 @@ in_flash:
lis r3, CONFIG_SYS_IMMR@h
bl cpu_init_f /* run low-level CPU init code (from Flash) */
+ li r3, 0 /* clear boot_flag for calling board_init_f */
bl board_init_f /* run 1st part of board init code (from Flash) */
/* NOTREACHED - board_init_f() does not return */
diff --git a/arch/powerpc/dts/Makefile b/arch/powerpc/dts/Makefile
index a4b0d7ddc4f..26b592b85db 100644
--- a/arch/powerpc/dts/Makefile
+++ b/arch/powerpc/dts/Makefile
@@ -29,6 +29,7 @@ dtb-$(CONFIG_TARGET_TUGE1) += kmtuge1.dtb
dtb-$(CONFIG_TARGET_TUXX1) += kmtuxa1.dtb
dtb-$(CONFIG_TARGET_MCR3000) += mcr3000.dtb
dtb-$(CONFIG_TARGET_GAZERBEAM) += gazerbeam.dtb
+dtb-$(CONFIG_TARGET_CMPC885) += cmpc885.dtb
include $(srctree)/scripts/Makefile.dts
diff --git a/arch/powerpc/dts/cmpc885.dts b/arch/powerpc/dts/cmpc885.dts
new file mode 100644
index 00000000000..adda0f3e9dd
--- /dev/null
+++ b/arch/powerpc/dts/cmpc885.dts
@@ -0,0 +1,94 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * CMPC885 Device Tree Source
+ *
+ * Copyright 2020 CS Group
+ *
+ */
+
+/dts-v1/;
+
+/ {
+ model = "CMPC885";
+ compatible = "fsl, cmpc885", "fsl,mod885";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ chosen {
+ stdout-path = &SERIAL;
+ };
+
+ WDT: watchdog@0 {
+ device_type = "watchdog";
+ compatible = "fsl,pq1-wdt";
+ };
+
+ SERIAL: serial {
+ compatible = "fsl,pq1-smc";
+ };
+
+ FEC1: fec@0 {
+ compatible = "fsl,pq1-fec1";
+ };
+
+ FEC2: fec@1 {
+ compatible = "fsl,pq1-fec2";
+ };
+
+ soc: immr@ff000000 {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ device-type = "soc";
+ compatible = "simple-bus";
+ ranges = <0 0xff000000 0x4000>;
+ reg = <0xff000000 0x00000200>;
+
+ CPM1_PIO_B: gpio-controller@ab8 {
+ #gpio-cells = <2>;
+ compatible = "fsl,cpm1-pario-bank-b";
+ reg = <0xab8 0x10>;
+ gpio-controller;
+ };
+
+ CPM1_PIO_D: gpio-controller@970 {
+ #gpio-cells = <2>;
+ compatible = "fsl,cpm1-pario-bank-d";
+ reg = <0x970 0x10>;
+ gpio-controller;
+ };
+
+ CPM1_PIO_A: gpio-controller@950 {
+ #gpio-cells = <2>;
+ compatible = "fsl,cpm1-pario-bank-a";
+ reg = <0x950 0x10>;
+ gpio-controller;
+ };
+
+ CPM1_PIO_C: gpio-controller@960 {
+ #gpio-cells = <2>;
+ compatible = "fsl,cpm1-pario-bank-c";
+ reg = <0x960 0x10>;
+ gpio-controller;
+ };
+
+ CPM1_PIO_E: gpio-controller@ac8 {
+ #gpio-cells = <2>;
+ compatible = "fsl,cpm1-pario-bank-e";
+ reg = <0xac8 0x18>;
+ gpio-controller;
+ };
+
+ spi: spi@aa0 {
+ status = "okay";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ cell-index = <0>;
+ compatible = "fsl,mpc8xx-spi";
+ gpios = <&CPM1_PIO_B 21 1>; /* /EEPROM_CS ACTIVE_LOW */
+
+ eeprom@0 {
+ cell-index = <1>;
+ };
+ };
+ };
+};
diff --git a/arch/powerpc/include/asm/arch-mpc8xx/gpio.h b/arch/powerpc/include/asm/arch-mpc8xx/gpio.h
new file mode 100644
index 00000000000..6b73acbaee7
--- /dev/null
+++ b/arch/powerpc/include/asm/arch-mpc8xx/gpio.h
@@ -0,0 +1,12 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+
+#ifndef _MPC8XX_GPIO_H_
+#define _MPC8XX_GPIO_H_
+
+struct mpc8xx_gpio_plat {
+ ulong addr;
+ unsigned long size;
+ uint ngpios;
+};
+
+#endif /* MPC8XX_GPIO_H_ */