aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/mpc85xx/files/arch/powerpc
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/mpc85xx/files/arch/powerpc')
-rw-r--r--target/linux/mpc85xx/files/arch/powerpc/boot/dts/red-15w-rev1.dts207
-rw-r--r--target/linux/mpc85xx/files/arch/powerpc/platforms/85xx/red15w_rev1.c87
2 files changed, 294 insertions, 0 deletions
diff --git a/target/linux/mpc85xx/files/arch/powerpc/boot/dts/red-15w-rev1.dts b/target/linux/mpc85xx/files/arch/powerpc/boot/dts/red-15w-rev1.dts
new file mode 100644
index 0000000000..600426bb6e
--- /dev/null
+++ b/target/linux/mpc85xx/files/arch/powerpc/boot/dts/red-15w-rev1.dts
@@ -0,0 +1,207 @@
+// SPDX-License-Identifier: GPL-2.0-or-later or MIT
+
+/include/ "fsl/p1010si-pre.dtsi"
+
+/ {
+ model = "Sophos RED 15w Rev.1";
+ compatible = "sophos,red-15w-rev1";
+
+ memory {
+ device_type = "memory";
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ system_green {
+ gpios = <&gpio0 7 0>;
+ label = "red-15w-rev1:green:system";
+ };
+
+ system_red {
+ gpios = <&gpio0 3 0>;
+ label = "red-15w-rev1:red:system";
+ };
+
+ router {
+ gpios = <&gpio0 5 1>;
+ label = "red-15w-rev1:green:router";
+ };
+
+ internet {
+ gpios = <&gpio0 4 1>;
+ label = "red-15w-rev1:green:internet";
+ };
+
+ tunnel {
+ gpios = <&gpio0 8 1>;
+ label = "red-15w-rev1:green:tunnel";
+ };
+ };
+
+ soc: soc@ffe00000 {
+ ranges = <0x0 0x0 0xffe00000 0x100000>;
+
+ i2c@3000 {
+ eeprom@50 {
+ compatible = "st,24c256";
+ reg = <0x50>;
+ };
+ };
+
+ i2c@3100 {
+ eeprom@52 {
+ compatible = "atmel,24c01";
+ reg = < 0x52 >;
+ };
+ };
+
+ gpio0: gpio-controller@fc00 {
+ };
+
+ usb@22000 {
+ phy_type = "utmi";
+ dr_mode = "host";
+ };
+
+ mdio@24000 {
+ phy0: ethernet-phy@0 {
+ reg = <0x0>;
+ };
+ };
+
+ mdio@25000 {
+ tbi_phy: tbi-phy@11 {
+ reg = <0x11>;
+ };
+ };
+
+ mdio@26000 {
+ status = "disabled";
+ };
+
+ enet0: ethernet@b0000 {
+ phy-connection-type = "rgmii-id";
+
+ fixed-link {
+ speed = <1000>;
+ full-duplex;
+ };
+ };
+
+ enet1: ethernet@b1000 {
+ phy-handle = <&phy0>;
+ phy-connection-type = "sgmii";
+
+ tbi-handle = <&tbi_phy>;
+ };
+
+ enet2: ethernet@b2000 {
+ status = "disabled";
+ };
+
+ sdhc@2e000 {
+ status = "disabled";
+ };
+ };
+
+ ifc: ifc@ffe1e000 {
+ reg = <0x0 0xffe1e000 0 0x2000>;
+
+ /* NOR, NAND Flashes and CPLD on board */
+ ranges = <0x0 0x0 0x0 0xee000000 0x02000000
+ 0x1 0x0 0x0 0xff800000 0x00010000
+ 0x3 0x0 0x0 0xffb00000 0x00000020>;
+
+ nand@1,0 {
+ compatible = "fsl,ifc-nand";
+ reg = <0x1 0x0 0x10000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ /*
+ * Original partition layout:
+ * 0x000000000000-0x000000100000 : "NAND U-Boot Image"
+ * 0x000000100000-0x000000200000 : "NAND U-Boot Environment"
+ * 0x000000200000-0x000000300000 : "Provisioning"
+ * - OS-Image 1
+ * 0x000000300000-0x000000400000 : "fdt1"
+ * 0x000000400000-0x000000c00000 : "uimage1"
+ * 0x000000c00000-0x000001c00000 : "rootfs1"
+ * - OS-Image 2
+ * 0x000001c00000-0x000001d00000 : "fdt2"
+ * 0x000001d00000-0x000002500000 : "uimage2"
+ * 0x000002500000-0x000003500000 : "rootfs2"
+ * - Empty
+ * 0x000003500000-0x000008000000 : "data"
+ */
+
+ partition@0 {
+ reg = <0x0 0x100000>;
+ label = "u-boot";
+ read-only;
+ };
+
+ partition@100000 {
+ reg = <0x100000 0x100000>;
+ label = "u-boot-env";
+ };
+
+ partition@200000 {
+ reg = <0x200000 0x100000>;
+ label = "provisioning";
+ read-only;
+ };
+
+ partition@300000 {
+ reg = <0x300000 0x800000>;
+ label = "kernel";
+ };
+
+ partition@b00000 {
+ reg = <0xb00000 0x7500000>;
+ label = "ubi";
+ };
+
+ oem-partition@300000 {
+ reg = <0x300000 0x1900000>;
+ label = "sophos-os1";
+ };
+
+ oem-partition@1c00000 {
+ reg = <0x1c00000 0x1900000>;
+ label = "sophos-os2";
+ };
+
+ oem-partition@3500000 {
+ reg = <0x3500000 0x4b00000>;
+ label = "sophos-data";
+ };
+ };
+ };
+ };
+
+ pci0: pcie@ffe09000 {
+ status = "disabled";
+ };
+
+ pci1: pcie@ffe0a000 {
+ reg = <0 0xffe0a000 0 0x1000>;
+ ranges = <0x2000000 0x0 0x80000000 0 0x80000000 0x0 0x20000000
+ 0x1000000 0x0 0x00000000 0 0xffc00000 0x0 0x10000>;
+ pcie@0 {
+ ranges = <0x2000000 0x0 0x80000000
+ 0x2000000 0x0 0x80000000
+ 0x0 0x20000000
+
+ 0x1000000 0x0 0x0
+ 0x1000000 0x0 0x0
+ 0x0 0x100000>;
+ };
+ };
+};
+
+/include/ "fsl/p1010si-post.dtsi"
diff --git a/target/linux/mpc85xx/files/arch/powerpc/platforms/85xx/red15w_rev1.c b/target/linux/mpc85xx/files/arch/powerpc/platforms/85xx/red15w_rev1.c
new file mode 100644
index 0000000000..6669d5a57e
--- /dev/null
+++ b/target/linux/mpc85xx/files/arch/powerpc/platforms/85xx/red15w_rev1.c
@@ -0,0 +1,87 @@
+// SPDX-License-Identifier: GPL-2.0+
+
+/*
+ * Sophos RED 15w Rev.1 Board Setup
+ *
+ * Copyright (C) 2019 David Bauer <mail@david-bauer.net>
+ *
+ * Based on:
+ * p1010rdb.c:
+ * P1010 RDB Board Setup
+ * Copyright 2011 Freescale Semiconductor Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ */
+
+#include <linux/stddef.h>
+#include <linux/kernel.h>
+#include <linux/delay.h>
+#include <linux/interrupt.h>
+#include <linux/of_platform.h>
+
+#include <asm/time.h>
+#include <asm/machdep.h>
+#include <asm/pci-bridge.h>
+#include <mm/mmu_decl.h>
+#include <asm/prom.h>
+#include <asm/udbg.h>
+#include <asm/mpic.h>
+
+#include <sysdev/fsl_soc.h>
+#include <sysdev/fsl_pci.h>
+
+#include "mpc85xx.h"
+
+void __init red_15w_rev1_pic_init(void)
+{
+ struct mpic *mpic;
+
+ mpic = mpic_alloc(NULL, 0,
+ MPIC_BIG_ENDIAN | MPIC_SINGLE_DEST_CPU,
+ 0, 256, " OpenPIC ");
+
+ BUG_ON(mpic == NULL);
+ mpic_init(mpic);
+}
+
+/*
+ * Setup the architecture
+ */
+static void __init red_15w_rev1_setup_arch(void)
+{
+ if (ppc_md.progress)
+ ppc_md.progress("red_15w_rev1_setup_arch()", 0);
+
+ fsl_pci_assign_primary();
+
+ pr_info("RED 15w Rev.1 from Sophos\n");
+}
+
+machine_arch_initcall(red_15w_rev1, mpc85xx_common_publish_devices);
+
+/*
+ * Called very early, device-tree isn't unflattened
+ */
+static int __init red_15w_rev1_probe(void)
+{
+ if (of_machine_is_compatible("sophos,red-15w-rev1"))
+ return 1;
+ return 0;
+}
+
+define_machine(red_15w_rev1) {
+ .name = "P1010 RDB",
+ .probe = red_15w_rev1_probe,
+ .setup_arch = red_15w_rev1_setup_arch,
+ .init_IRQ = red_15w_rev1_pic_init,
+#ifdef CONFIG_PCI
+ .pcibios_fixup_bus = fsl_pcibios_fixup_bus,
+ .pcibios_fixup_phb = fsl_pcibios_fixup_phb,
+#endif
+ .get_irq = mpic_get_irq,
+ .calibrate_decr = generic_calibrate_decr,
+ .progress = udbg_progress,
+};