[PATCH 1/2] mpc85xx: refactor msm460 dts
Evan Jobling
evan.jobling at mslsc.com.au
Sun Dec 1 03:20:14 PST 2024
MSM430,MSM460,MSM466 and HP 560 AP all share
the same main board numbered 5185-8967.
Split out common dtsi in preparation for
adding other support.
Signed-off-by: Evan Jobling <evan.jobling at mslsc.com.au>
---
.../arch/powerpc/boot/dts/hp-5185-8967.dtsi | 248 ++++++++++++++++++
.../files/arch/powerpc/boot/dts/msm460.dts | 246 +----------------
2 files changed, 249 insertions(+), 245 deletions(-)
create mode 100644 target/linux/mpc85xx/files/arch/powerpc/boot/dts/hp-5185-8967.dtsi
diff --git a/target/linux/mpc85xx/files/arch/powerpc/boot/dts/hp-5185-8967.dtsi b/target/linux/mpc85xx/files/arch/powerpc/boot/dts/hp-5185-8967.dtsi
new file mode 100644
index 0000000000..ae2596b130
--- /dev/null
+++ b/target/linux/mpc85xx/files/arch/powerpc/boot/dts/hp-5185-8967.dtsi
@@ -0,0 +1,248 @@
+// SPDX-License-Identifier: GPL-2.0-or-later or MIT
+
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/leds/common.h>
+
+/include/ "fsl/p1020si-pre.dtsi"
+/ {
+ aliases {
+ led-boot = &system_green;
+ led-failsafe = &system_green;
+ led-running = &system_green;
+ led-upgrade = &system_green;
+ label-mac-device = &enet0;
+ };
+
+ chosen {
+ /* Needed for initramfs */
+ bootargs-override = "console=ttyS0,115200 ubi.mtd=5,2048";
+ stdout-path = &serial0;
+ };
+
+ memory {
+ device_type = "memory";
+ };
+
+ lbc: localbus at ffe05000 {
+ reg = <0 0xffe05000 0 0x1000>;
+ ranges = <0x0 0x0 0x0 0xec000000 0x04000000
+ 0x1 0x0 0x0 0xff800000 0x00040000
+ 0x2 0x0 0x0 0xffa00000 0x00020000
+ 0x3 0x0 0x0 0xffb00000 0x00020000>;
+
+ nand at 1,0 {
+ compatible = "fsl,p1020-fcm-nand", "fsl,elbc-fcm-nand";
+ reg = <0x1 0x0 0x40000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition at 0 {
+ reg = <0x0 0xc0000>;
+ label = "u-boot";
+ read-only;
+ };
+
+ partition at c0000 {
+ reg = <0xc0000 0x40000>;
+ label = "colubris-bid";
+ read-only;
+
+ nvmem-layout {
+ compatible = "fixed-layout";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ macaddr_hwinfo_1f822: macaddr at 1f822 {
+ /* ETH */
+ compatible = "mac-base";
+ reg = <0x1f822 0x6>;
+ #nvmem-cell-cells = <1>;
+ };
+
+ macaddr_hwinfo_1f9bd: macaddr at 1f9bd {
+ /* WLAN */
+ compatible = "mac-base";
+ reg = <0x1f9bd 0x6>;
+ #nvmem-cell-cells = <1>;
+ };
+ };
+ };
+
+ /* uenv{0,1} and ubi occupy kernel and slash partitions */
+
+ partition at 100000 {
+ reg = <0x100000 0x80000>;
+ label = "uboot-env0";
+ };
+
+ partition at 180000 {
+ reg = <0x180000 0x80000>;
+ label = "uboot-env1";
+ };
+
+ partition at 200000 {
+ reg = <0x200000 0x300000>;
+ label = "reserved";
+ };
+
+ partition at 500000 {
+ reg = <0x500000 0x5f00000>;
+ label = "ubi";
+ };
+
+ partition at 6500000 {
+ reg = <0x6500000 0x400000>;
+ label = "pool";
+ read-only;
+ };
+
+ partition at 6900000 {
+ reg = <0x6900000 0x15e0000>;
+ label = "flash";
+ read-only;
+ };
+
+ partition at 7ee0000 {
+ reg = <0x7ee0000 0x20000>;
+ label = "pf";
+ read-only;
+ };
+
+ /* BBT is at the end of the flash - 100000 at 7f00000 */
+ };
+ };
+ };
+
+ soc: soc at ffe00000 {
+ ranges = <0x0 0x0 0xffe00000 0x100000>;
+
+ i2c at 3000 {
+ status = "disabled";
+ };
+
+ gpio0: gpio-controller at fc00 {
+ };
+
+ mdio at 24000 {
+ phy0: ethernet-phy at 0 {
+ reg = <0x0>;
+ reset-gpios = <&gpio0 4 GPIO_ACTIVE_LOW>;
+ reset-assert-us = <10000>;
+ reset-deassert-us = <10000>;
+ };
+ };
+
+ enet0: ethernet at b0000 {
+ phy-connection-type = "rgmii-id";
+ phy-handle = <&phy0>;
+ nvmem-cells = <&macaddr_hwinfo_1f822 0>;
+ nvmem-cell-names = "mac-address";
+ };
+
+ enet1: ethernet at b1000 {
+ status = "disabled";
+ };
+
+ enet2: ethernet at b2000 {
+ status = "disabled";
+ };
+
+ usb at 22000 {
+ status = "disabled";
+ };
+
+ usb at 23000 {
+ status = "disabled";
+ };
+ };
+
+ pci0: pcie at ffe09000 {
+ ranges = <0x2000000 0x0 0xa0000000 0 0xa0000000 0x0 0x20000000
+ 0x1000000 0x0 0x00000000 0 0xffc10000 0x0 0x10000>;
+ reg = <0 0xffe09000 0 0x1000>;
+ pcie at 0 {
+ ranges = <0x2000000 0x0 0xa0000000
+ 0x2000000 0x0 0xa0000000
+ 0x0 0x20000000
+
+ 0x1000000 0x0 0x0
+ 0x1000000 0x0 0x0
+ 0x0 0x100000>;
+
+ wifi at 0,0 {
+ reg = <0x0000 0 0 0 0>;
+ nvmem-cells = <&macaddr_hwinfo_1f9bd 0>;
+ nvmem-cell-names = "mac-address";
+ };
+ };
+ };
+
+ pci1: pcie at ffe0a000 {
+ reg = <0 0xffe0a000 0 0x1000>;
+ ranges = <0x2000000 0x0 0x80000000 0 0x80000000 0x0 0x20000000
+ 0x1000000 0x0 0x00000000 0 0xffc00000 0x0 0x10000>;
+ pcie at 0 {
+ ranges = <0x2000000 0x0 0x80000000
+ 0x2000000 0x0 0x80000000
+ 0x0 0x20000000
+
+ 0x1000000 0x0 0x0
+ 0x1000000 0x0 0x0
+ 0x0 0x100000>;
+
+ wifi at 0,0 {
+ reg = <0x0000 0 0 0 0>;
+ nvmem-cells = <&macaddr_hwinfo_1f9bd 16>;
+ nvmem-cell-names = "mac-address";
+ };
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ system_green: power {
+ gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_POWER;
+ default-state = "on";
+ };
+
+ lan {
+ gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_LAN;
+ };
+
+ radio1 {
+ gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_WLAN;
+ function-enumerator = <1>;
+ linux,default-trigger = "phy0tpt";
+ };
+
+ radio2 {
+ gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_WLAN;
+ function-enumerator = <2>;
+ linux,default-trigger = "phy1tpt";
+ };
+ };
+
+ buttons {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset-btn";
+ gpios = <&gpio0 5 GPIO_ACTIVE_HIGH>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+};
+/include/ "fsl/p1020si-post.dtsi"
diff --git a/target/linux/mpc85xx/files/arch/powerpc/boot/dts/msm460.dts b/target/linux/mpc85xx/files/arch/powerpc/boot/dts/msm460.dts
index 3666350271..7220fce098 100644
--- a/target/linux/mpc85xx/files/arch/powerpc/boot/dts/msm460.dts
+++ b/target/linux/mpc85xx/files/arch/powerpc/boot/dts/msm460.dts
@@ -1,251 +1,7 @@
// SPDX-License-Identifier: GPL-2.0-or-later or MIT
-#include <dt-bindings/input/input.h>
-#include <dt-bindings/gpio/gpio.h>
-#include <dt-bindings/leds/common.h>
-
-/include/ "fsl/p1020si-pre.dtsi"
+#include "hp-5185-8967.dtsi"
/ {
model = "Hewlett-Packard MSM460";
compatible = "hpe,msm460";
-
- aliases {
- led-boot = &system_green;
- led-failsafe = &system_green;
- led-running = &system_green;
- led-upgrade = &system_green;
- label-mac-device = &enet0;
- };
-
- chosen {
- /* Needed for initramfs */
- bootargs-override = "console=ttyS0,115200 ubi.mtd=5,2048";
- stdout-path = &serial0;
- };
-
- memory {
- device_type = "memory";
- };
-
- lbc: localbus at ffe05000 {
- reg = <0 0xffe05000 0 0x1000>;
- ranges = <0x0 0x0 0x0 0xec000000 0x04000000
- 0x1 0x0 0x0 0xff800000 0x00040000
- 0x2 0x0 0x0 0xffa00000 0x00020000
- 0x3 0x0 0x0 0xffb00000 0x00020000>;
-
- nand at 1,0 {
- compatible = "fsl,p1020-fcm-nand", "fsl,elbc-fcm-nand";
- reg = <0x1 0x0 0x40000>;
-
- partitions {
- compatible = "fixed-partitions";
- #address-cells = <1>;
- #size-cells = <1>;
-
- partition at 0 {
- reg = <0x0 0xc0000>;
- label = "u-boot";
- read-only;
- };
-
- partition at c0000 {
- reg = <0xc0000 0x40000>;
- label = "colubris-bid";
- read-only;
-
- nvmem-layout {
- compatible = "fixed-layout";
- #address-cells = <1>;
- #size-cells = <1>;
-
- macaddr_hwinfo_1f822: macaddr at 1f822 {
- /* ETH */
- compatible = "mac-base";
- reg = <0x1f822 0x6>;
- #nvmem-cell-cells = <1>;
- };
-
- macaddr_hwinfo_1f9bd: macaddr at 1f9bd {
- /* WLAN */
- compatible = "mac-base";
- reg = <0x1f9bd 0x6>;
- #nvmem-cell-cells = <1>;
- };
- };
- };
-
- /* uenv{0,1} and ubi occupy kernel and slash partitions */
-
- partition at 100000 {
- reg = <0x100000 0x80000>;
- label = "uboot-env0";
- };
-
- partition at 180000 {
- reg = <0x180000 0x80000>;
- label = "uboot-env1";
- };
-
- partition at 200000 {
- reg = <0x200000 0x300000>;
- label = "reserved";
- };
-
- partition at 500000 {
- reg = <0x500000 0x5f00000>;
- label = "ubi";
- };
-
- partition at 6500000 {
- reg = <0x6500000 0x400000>;
- label = "pool";
- read-only;
- };
-
- partition at 6900000 {
- reg = <0x6900000 0x15e0000>;
- label = "flash";
- read-only;
- };
-
- partition at 7ee0000 {
- reg = <0x7ee0000 0x20000>;
- label = "pf";
- read-only;
- };
-
- /* BBT is at the end of the flash - 100000 at 7f00000 */
- };
- };
- };
-
- soc: soc at ffe00000 {
- ranges = <0x0 0x0 0xffe00000 0x100000>;
-
- i2c at 3000 {
- status = "disabled";
- };
-
- gpio0: gpio-controller at fc00 {
- };
-
- mdio at 24000 {
- phy0: ethernet-phy at 0 {
- reg = <0x0>;
- reset-gpios = <&gpio0 4 GPIO_ACTIVE_LOW>;
- reset-assert-us = <10000>;
- reset-deassert-us = <10000>;
- };
- };
-
- enet0: ethernet at b0000 {
- phy-connection-type = "rgmii-id";
- phy-handle = <&phy0>;
- nvmem-cells = <&macaddr_hwinfo_1f822 0>;
- nvmem-cell-names = "mac-address";
- };
-
- enet1: ethernet at b1000 {
- status = "disabled";
- };
-
- enet2: ethernet at b2000 {
- status = "disabled";
- };
-
- usb at 22000 {
- status = "disabled";
- };
-
- usb at 23000 {
- status = "disabled";
- };
- };
-
- pci0: pcie at ffe09000 {
- ranges = <0x2000000 0x0 0xa0000000 0 0xa0000000 0x0 0x20000000
- 0x1000000 0x0 0x00000000 0 0xffc10000 0x0 0x10000>;
- reg = <0 0xffe09000 0 0x1000>;
- pcie at 0 {
- ranges = <0x2000000 0x0 0xa0000000
- 0x2000000 0x0 0xa0000000
- 0x0 0x20000000
-
- 0x1000000 0x0 0x0
- 0x1000000 0x0 0x0
- 0x0 0x100000>;
-
- wifi at 0,0 {
- reg = <0x0000 0 0 0 0>;
- nvmem-cells = <&macaddr_hwinfo_1f9bd 0>;
- nvmem-cell-names = "mac-address";
- };
- };
- };
-
- pci1: pcie at ffe0a000 {
- reg = <0 0xffe0a000 0 0x1000>;
- ranges = <0x2000000 0x0 0x80000000 0 0x80000000 0x0 0x20000000
- 0x1000000 0x0 0x00000000 0 0xffc00000 0x0 0x10000>;
- pcie at 0 {
- ranges = <0x2000000 0x0 0x80000000
- 0x2000000 0x0 0x80000000
- 0x0 0x20000000
-
- 0x1000000 0x0 0x0
- 0x1000000 0x0 0x0
- 0x0 0x100000>;
-
- wifi at 0,0 {
- reg = <0x0000 0 0 0 0>;
- nvmem-cells = <&macaddr_hwinfo_1f9bd 16>;
- nvmem-cell-names = "mac-address";
- };
- };
- };
-
- leds {
- compatible = "gpio-leds";
-
- system_green: power {
- gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
- color = <LED_COLOR_ID_GREEN>;
- function = LED_FUNCTION_POWER;
- default-state = "on";
- };
-
- lan {
- gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
- color = <LED_COLOR_ID_GREEN>;
- function = LED_FUNCTION_LAN;
- };
-
- radio1 {
- gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
- color = <LED_COLOR_ID_GREEN>;
- function = LED_FUNCTION_WLAN;
- function-enumerator = <1>;
- linux,default-trigger = "phy0tpt";
- };
-
- radio2 {
- gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
- color = <LED_COLOR_ID_GREEN>;
- function = LED_FUNCTION_WLAN;
- function-enumerator = <2>;
- linux,default-trigger = "phy1tpt";
- };
- };
-
- buttons {
- compatible = "gpio-keys";
-
- reset {
- label = "reset-btn";
- gpios = <&gpio0 5 GPIO_ACTIVE_HIGH>;
- linux,code = <KEY_RESTART>;
- };
- };
};
-/include/ "fsl/p1020si-post.dtsi"
--
2.39.5
More information about the openwrt-devel
mailing list