aboutsummaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
Diffstat (limited to 'target')
-rw-r--r--target/linux/mpc85xx/base-files/etc/hotplug.d/ieee80211/10-fix-wifi-mac3
-rw-r--r--target/linux/mpc85xx/files/arch/powerpc/boot/dts/ws-ap3825i.dts249
-rw-r--r--target/linux/mpc85xx/files/arch/powerpc/platforms/85xx/ws-ap3825i.c91
-rw-r--r--target/linux/mpc85xx/image/Makefile6
-rw-r--r--target/linux/mpc85xx/image/p1020.mk12
-rw-r--r--target/linux/mpc85xx/p1020/config-default3
-rw-r--r--target/linux/mpc85xx/patches-5.10/107-powerpc-85xx-add-ws-ap3825i-support.patch44
7 files changed, 407 insertions, 1 deletions
diff --git a/target/linux/mpc85xx/base-files/etc/hotplug.d/ieee80211/10-fix-wifi-mac b/target/linux/mpc85xx/base-files/etc/hotplug.d/ieee80211/10-fix-wifi-mac
index c6cede3a1f..8050c7bea2 100644
--- a/target/linux/mpc85xx/base-files/etc/hotplug.d/ieee80211/10-fix-wifi-mac
+++ b/target/linux/mpc85xx/base-files/etc/hotplug.d/ieee80211/10-fix-wifi-mac
@@ -12,7 +12,8 @@ PHYNBR=${DEVPATH##*/phy}
board=$(board_name)
case "$board" in
-enterasys,ws-ap3710i)
+enterasys,ws-ap3710i|\
+extreme-networks,ws-ap3825i)
mtd_get_mac_ascii cfg2 RADIOADDR${PHYNBR} > /sys${DEVPATH}/macaddress
;;
ocedo,panda)
diff --git a/target/linux/mpc85xx/files/arch/powerpc/boot/dts/ws-ap3825i.dts b/target/linux/mpc85xx/files/arch/powerpc/boot/dts/ws-ap3825i.dts
new file mode 100644
index 0000000000..3dcbac21a4
--- /dev/null
+++ b/target/linux/mpc85xx/files/arch/powerpc/boot/dts/ws-ap3825i.dts
@@ -0,0 +1,249 @@
+// SPDX-License-Identifier: GPL-2.0-or-later or MIT
+
+/include/ "fsl/p1020si-pre.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ model = "Extreme Networks WS-AP3825i";
+ compatible = "extreme-networks,ws-ap3825i";
+
+ aliases {
+ ethernet0 = &enet0;
+ ethernet1 = &enet2;
+ led-boot = &led_power_green;
+ led-failsafe = &led_power_red;
+ led-running = &led_power_green;
+ led-upgrade = &led_power_red;
+ };
+
+ chosen {
+ bootargs-override = "console=ttyS0,115200";
+ };
+
+ memory {
+ device_type = "memory";
+ };
+
+ led_spi {
+ /*
+ * This is currently non-functioning because the spi-gpio
+ * driver refuses to register when presented with this node.
+ */
+ compatible = "spi-gpio";
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ sck-gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>;
+ mosi-gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
+ num-chipselects = <0>;
+
+ spi_gpio: led_gpio@0 {
+ compatible = "fairchild,74hc595";
+ reg = <0>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ registers-number = <1>;
+ spi-max-frequency = <100000>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ wifi1 {
+ gpios = <&spi_gpio 3 GPIO_ACTIVE_HIGH>;
+ label = "ws-ap3825i:green:radio1";
+ linux,default-trigger = "phy0tpt";
+ };
+
+ wifi2 {
+ gpios = <&spi_gpio 2 GPIO_ACTIVE_HIGH>;
+ label = "ws-ap3825i:green:radio2";
+ linux,default-trigger = "phy1tpt";
+ };
+
+ led_power_green: power_green {
+ gpios = <&spi_gpio 0 GPIO_ACTIVE_HIGH>;
+ label = "ws-ap3825i:green:power";
+ };
+
+ led_power_red: power_red {
+ gpios = <&spi_gpio 1 GPIO_ACTIVE_HIGH>;
+ label = "ws-ap3825i:red:power";
+ };
+
+ eth0_red {
+ gpios = <&spi_gpio 6 GPIO_ACTIVE_HIGH>;
+ label = "ws-ap3825i:red:eth0";
+ };
+
+ eth0_green {
+ gpios = <&spi_gpio 4 GPIO_ACTIVE_HIGH>;
+ label = "ws-ap3825i:green:eth0";
+ };
+
+ eth1_red {
+ gpios = <&spi_gpio 7 GPIO_ACTIVE_HIGH>;
+ label = "ws-ap3825i:red:eth1";
+ };
+
+ eth1_green {
+ gpios = <&spi_gpio 5 GPIO_ACTIVE_HIGH>;
+ label = "ws-ap3825i:green:eth1";
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "Reset button";
+ gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+
+ lbc: localbus@ffe05000 {
+ reg = <0 0xffe05000 0 0x1000>;
+ ranges = <0x0 0x0 0x0 0xec000000 0x4000000>;
+
+ nor@0 {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ compatible = "cfi-flash";
+ reg = <0x0 0x0 0x4000000>;
+ bank-width = <2>;
+ device-width = <1>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ compatible = "denx,fit";
+ reg = <0x0 0x3d60000>;
+ label = "firmware";
+ };
+
+ partition@3d60000 {
+ reg = <0x3d60000 0x20000>;
+ label = "calib";
+ read-only;
+ };
+
+ partition@3d80000{
+ reg = <0x3d80000 0x80000>;
+ label = "u-boot";
+ read-only;
+ };
+
+ partition@3e00000{
+ reg = <0x3e00000 0x100000>;
+ label = "nvram";
+ read-only;
+ };
+
+ partition@3f00000 {
+ reg = <0x3f00000 0x20000>;
+ label = "cfg2";
+ read-only;
+ };
+
+ partition@3f20000 {
+ reg = <0x3f20000 0x20000>;
+ label = "cfg1";
+ read-only;
+ };
+ };
+ };
+ };
+
+ soc: soc@ffe00000 {
+ ranges = <0x0 0x0 0xffe00000 0x100000>;
+
+ gpio0: gpio-controller@fc00 {
+ };
+
+ mdio@24000 {
+ phy0: ethernet-phy@0 {
+ interrupts = <3 1 0 0>;
+ reg = <0x5>;
+ reset-gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
+ };
+
+ phy2: ethernet-phy@2 {
+ interrupts = <1 1 0 0>;
+ reg = <0x6>;
+ reset-gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ mdio@25000 {
+ status = "disabled";
+ };
+
+ mdio@26000 {
+ status = "disabled";
+ };
+
+ enet0: ethernet@b0000 {
+ status = "okay";
+ phy-handle = <&phy0>;
+ phy-connection-type = "rgmii-id";
+ };
+
+ enet1: ethernet@b1000 {
+ status = "disabled";
+ };
+
+ enet2: ethernet@b2000 {
+ status = "okay";
+ phy-handle = <&phy2>;
+ phy-connection-type = "rgmii-id";
+ };
+
+ usb@22000 {
+ phy_type = "ulpi";
+ dr_mode = "host";
+ };
+
+ usb@23000 {
+ status = "disabled";
+ };
+ };
+
+ pci0: pcie@ffe09000 {
+ ranges = <0x2000000 0x0 0xa0000000 0 0xa0000000 0x0 0x20000000
+ 0x1000000 0x0 0x00000000 0 0xffc10000 0x0 0x10000>;
+ reg = <0 0xffe09000 0 0x1000>;
+ pcie@0 {
+ ranges = <0x2000000 0x0 0xa0000000
+ 0x2000000 0x0 0xa0000000
+ 0x0 0x20000000
+
+ 0x1000000 0x0 0x0
+ 0x1000000 0x0 0x0
+ 0x0 0x100000>;
+ };
+ };
+
+ 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/p1020si-post.dtsi"
diff --git a/target/linux/mpc85xx/files/arch/powerpc/platforms/85xx/ws-ap3825i.c b/target/linux/mpc85xx/files/arch/powerpc/platforms/85xx/ws-ap3825i.c
new file mode 100644
index 0000000000..5a0919c200
--- /dev/null
+++ b/target/linux/mpc85xx/files/arch/powerpc/platforms/85xx/ws-ap3825i.c
@@ -0,0 +1,91 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+/*
+ * Extreme Networks WS-AP3825i Board Setup
+ *
+ * Copyright (C) 2021 Martin Kennedy <hurricos@gmail.com>
+ *
+ * Based on:
+ * mpc85xx_rdb.c:
+ * MPC85xx RDB Board Setup
+ * Copyright 2013 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 "smp.h"
+
+#include "mpc85xx.h"
+
+void __init ws_ap3825i_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 ws_ap3825i_setup_arch(void)
+{
+ if (ppc_md.progress)
+ ppc_md.progress("ws_ap3825i_setup_arch()", 0);
+
+ mpc85xx_smp_init();
+
+ fsl_pci_assign_primary();
+
+ pr_info("WS-AP3825i board from Extreme Networks\n");
+}
+
+machine_arch_initcall(ws_ap3825i, mpc85xx_common_publish_devices);
+
+/*
+ * Called very early, device-tree isn't unflattened
+ */
+static int __init ws_ap3825i_probe(void)
+{
+ if (of_machine_is_compatible("extreme-networks,ws-ap3825i"))
+ return 1;
+ return 0;
+}
+
+define_machine(ws_ap3825i) {
+ .name = "P1020 RDB",
+ .probe = ws_ap3825i_probe,
+ .setup_arch = ws_ap3825i_setup_arch,
+ .init_IRQ = ws_ap3825i_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,
+};
diff --git a/target/linux/mpc85xx/image/Makefile b/target/linux/mpc85xx/image/Makefile
index 2b81884032..e1d1bc6948 100644
--- a/target/linux/mpc85xx/image/Makefile
+++ b/target/linux/mpc85xx/image/Makefile
@@ -3,6 +3,12 @@
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/image.mk
+DEVICE_VARS += DTB_SIZE
+
+define Build/dtb
+ $(call Image/BuildDTB,$(DTS_DIR)/$(DEVICE_DTS).dts,$@.dtb,,--space $(DTB_SIZE))
+endef
+
define Device/Default
PROFILES := Default
DEVICE_DTS := $(lastword $(subst _, ,$(1)))
diff --git a/target/linux/mpc85xx/image/p1020.mk b/target/linux/mpc85xx/image/p1020.mk
index 64cad1ad9c..234bdc26a1 100644
--- a/target/linux/mpc85xx/image/p1020.mk
+++ b/target/linux/mpc85xx/image/p1020.mk
@@ -68,6 +68,18 @@ define Device/enterasys_ws-ap3710i
endef
TARGET_DEVICES += enterasys_ws-ap3710i
+define Device/extreme-networks_ws-ap3825i
+ DEVICE_VENDOR := Extreme Networks
+ DEVICE_MODEL := WS-AP3825i
+ DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca988x-ct
+ BLOCKSIZE := 128k
+ DTB_SIZE := 20480
+ KERNEL = kernel-bin | lzma | dtb | fit lzma $(KDIR)/image-$$(DEVICE_DTS).dtb
+ IMAGES := sysupgrade.bin
+ IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
+endef
+TARGET_DEVICES += extreme-networks_ws-ap3825i
+
define Device/ocedo_panda
DEVICE_VENDOR := OCEDO
DEVICE_MODEL := Panda
diff --git a/target/linux/mpc85xx/p1020/config-default b/target/linux/mpc85xx/p1020/config-default
index 31fce8b60a..6f2a9d2c3b 100644
--- a/target/linux/mpc85xx/p1020/config-default
+++ b/target/linux/mpc85xx/p1020/config-default
@@ -7,6 +7,7 @@ CONFIG_EEPROM_LEGACY=y
# CONFIG_FSL_CORENET_CF is not set
CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
CONFIG_GENERIC_TBSYNC=y
+CONFIG_GPIO_74X164=y
# CONFIG_GPIO_MAX77620 is not set
CONFIG_HAVE_RCU_TABLE_FREE=y
CONFIG_HIVEAP_330=y
@@ -40,6 +41,7 @@ CONFIG_RPS=y
# CONFIG_RTC_DRV_MAX77686 is not set
CONFIG_RWSEM_SPIN_ON_OWNER=y
CONFIG_SMP=y
+CONFIG_SPI_GPIO=y
CONFIG_SWCONFIG_B53=y
# CONFIG_SWCONFIG_B53_MMAP_DRIVER is not set
CONFIG_SWCONFIG_B53_PHY_DRIVER=y
@@ -49,4 +51,5 @@ CONFIG_SWCONFIG_B53_PHY_DRIVER=y
CONFIG_TREE_RCU=y
CONFIG_UBIFS_FS=y
CONFIG_WS_AP3710I=y
+CONFIG_WS_AP3825I=y
CONFIG_XPS=y
diff --git a/target/linux/mpc85xx/patches-5.10/107-powerpc-85xx-add-ws-ap3825i-support.patch b/target/linux/mpc85xx/patches-5.10/107-powerpc-85xx-add-ws-ap3825i-support.patch
new file mode 100644
index 0000000000..881f88ddb5
--- /dev/null
+++ b/target/linux/mpc85xx/patches-5.10/107-powerpc-85xx-add-ws-ap3825i-support.patch
@@ -0,0 +1,44 @@
+From 2fa1a7983ef30f3c7486f9b07c001bee87d1f6d6 Mon Sep 17 00:00:00 2001
+From: Martin Kennedy <hurricos@gmail.com>
+Date: Sat, 1 Jan 2022 11:01:37 -0500
+Subject: [PATCH] PowerPC 85xx: Add WS-AP3825i support
+
+This patch adds support for building Linux for the Extreme Networks
+WS-AP3825i AP.
+
+diff --git a/arch/powerpc/platforms/85xx/Kconfig b/arch/powerpc/platforms/85xx/Kconfig
+index 764b916..66cbb73 100644
+--- a/arch/powerpc/platforms/85xx/Kconfig
++++ b/arch/powerpc/platforms/85xx/Kconfig
+@@ -82,6 +82,16 @@ config WS_AP3710I
+ This board is a Concurrent Dual-Band wireless access point with a
+ Freescale P1020 SoC.
+
++config WS_AP3825I
++ bool "Extreme Networks WS-AP3825i"
++ select DEFAULT_UIMAGE
++ select ARCH_REQUIRE_GPIOLIB
++ select GPIO_MPC8XXX
++ help
++ This option enables support for the Extreme Networks WS-AP3825i board.
++ This board is a Concurrent Dual-Band wireless access point with a
++ Freescale P1020 SoC.
++
+ config MPC8540_ADS
+ bool "Freescale MPC8540 ADS"
+ select DEFAULT_UIMAGE
+diff --git a/arch/powerpc/platforms/85xx/Makefile b/arch/powerpc/platforms/85xx/Makefile
+index 443b44b..d37b650 100644
+--- a/arch/powerpc/platforms/85xx/Makefile
++++ b/arch/powerpc/platforms/85xx/Makefile
+@@ -27,6 +27,7 @@ obj-$(CONFIG_P1023_RDB) += p1023_rdb.o
+ obj-$(CONFIG_PANDA) += panda.o
+ obj-$(CONFIG_TWR_P102x) += twr_p102x.o
+ obj-$(CONFIG_WS_AP3710I) += ws-ap3710i.o
++obj-$(CONFIG_WS_AP3825I) += ws-ap3825i.o
+ obj-$(CONFIG_CORENET_GENERIC) += corenet_generic.o
+ obj-$(CONFIG_FB_FSL_DIU) += t1042rdb_diu.o
+ obj-$(CONFIG_RED_15W_REV1) += red15w_rev1.o
+--
+2.25.1
+