diff --git a/package/base-files/files/lib/upgrade/emmc.sh b/package/base-files/files/lib/upgrade/emmc.sh index 15fa370cd9..c3b02864aa 100644 --- a/package/base-files/files/lib/upgrade/emmc.sh +++ b/package/base-files/files/lib/upgrade/emmc.sh @@ -19,8 +19,11 @@ emmc_upgrade_tar() { [ "$has_kernel" = 1 -a "$EMMC_KERN_DEV" ] && export EMMC_KERNEL_BLOCKS=$(($(tar xf "$tar_file" ${board_dir}/kernel -O | dd of="$EMMC_KERN_DEV" bs=512 2>&1 | grep "records out" | cut -d' ' -f1))) - [ "$has_rootfs" = 1 -a "$EMMC_ROOT_DEV" ] && + [ "$has_rootfs" = 1 -a "$EMMC_ROOT_DEV" ] && { export EMMC_ROOTFS_BLOCKS=$(($(tar xf "$tar_file" ${board_dir}/root -O | dd of="$EMMC_ROOT_DEV" bs=512 2>&1 | grep "records out" | cut -d' ' -f1))) + # Account for 64KiB ROOTDEV_OVERLAY_ALIGN in libfstools + EMMC_ROOTFS_BLOCKS=$(((EMMC_ROOTFS_BLOCKS + 127) & ~127)) + } if [ -z "$UPGRADE_BACKUP" ]; then if [ "$EMMC_DATA_DEV" ]; then diff --git a/package/boot/uboot-bcm4908/Makefile b/package/boot/uboot-bcm4908/Makefile index 489b4d69bf..d6b689c9ce 100644 --- a/package/boot/uboot-bcm4908/Makefile +++ b/package/boot/uboot-bcm4908/Makefile @@ -7,9 +7,9 @@ PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://git.openwrt.org/project/bcm63xx/u-boot.git -PKG_SOURCE_DATE:=2022-03-03 -PKG_SOURCE_VERSION:=92e9eca819c9c898d9d2010e1a217726c42c8c47 -PKG_MIRROR_HASH:=11c37fe4c18d55e799153600d1cfd8ee9ca7da8326d0024c1d825f4a327c5f0d +PKG_SOURCE_DATE:=2022-03-15 +PKG_SOURCE_VERSION:=0625aad74d1f5b6f9c068955ad3fd7f6df635e50 +PKG_MIRROR_HASH:=0602e0e4f101ead206940eccca832b75191905c1e81290340a89b07dbee7a6ce include $(INCLUDE_DIR)/u-boot.mk include $(INCLUDE_DIR)/package.mk @@ -25,17 +25,23 @@ define U-Boot/bcm4908 UBOOT_CONFIG:=bcm94908 endef +define U-Boot/bcm4912 + NAME:=Broadcom's BCM4912 + UBOOT_CONFIG:=bcm94912 +endef + UBOOT_TARGETS := \ - bcm4908 + bcm4908 \ + bcm4912 define Build/Prepare $(call Build/Prepare/Default) mkdir -p $(PKG_BUILD_DIR)/include/generated/ ( cd $(PKG_BUILD_DIR)/board/broadcom/bcmbca/httpd/html/ && \ - xxd -i index.html > ../../../../../include/generated/index.h && \ - xxd -i flashing.html > ../../../../../include/generated/flashing.h && \ - xxd -i fail.html > ../../../../../include/generated/fail.h && \ - xxd -i 404.html > ../../../../../include/generated/404.h ) + $(STAGING_DIR_HOST)/bin/xxd -i index.html > ../../../../../include/generated/index.h && \ + $(STAGING_DIR_HOST)/bin/xxd -i flashing.html > ../../../../../include/generated/flashing.h && \ + $(STAGING_DIR_HOST)/bin/xxd -i fail.html > ../../../../../include/generated/fail.h && \ + $(STAGING_DIR_HOST)/bin/xxd -i 404.html > ../../../../../include/generated/404.h ) endef define Build/InstallDev diff --git a/package/boot/uboot-bcm4908/patches/200-configs-bcm94908-unset-CONFIG_SPL.patch b/package/boot/uboot-bcm4908/patches/200-configs-bcm94908-unset-CONFIG_SPL.patch index 26189bc571..0b434f356a 100644 --- a/package/boot/uboot-bcm4908/patches/200-configs-bcm94908-unset-CONFIG_SPL.patch +++ b/package/boot/uboot-bcm4908/patches/200-configs-bcm94908-unset-CONFIG_SPL.patch @@ -23,7 +23,8 @@ shipped with every firmware. Signed-off-by: Rafał Miłecki --- configs/bcm94908_defconfig | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + configs/bcm94912_defconfig | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) --- a/configs/bcm94908_defconfig +++ b/configs/bcm94908_defconfig @@ -36,3 +37,14 @@ Signed-off-by: Rafał Miłecki CONFIG_SPL_LIBDISK_SUPPORT=y CONFIG_ENV_VARS_UBOOT_CONFIG=y CONFIG_TPL_SYS_MALLOC_F_LEN=0x11000 +--- a/configs/bcm94912_defconfig ++++ b/configs/bcm94912_defconfig +@@ -22,7 +22,7 @@ CONFIG_TPL_LIBCOMMON_SUPPORT=y + CONFIG_TPL_LIBGENERIC_SUPPORT=y + CONFIG_SPL_SYS_MALLOC_F_LEN=0x2000 + CONFIG_NR_DRAM_BANKS=2 +-CONFIG_SPL=y ++# CONFIG_SPL is not set + CONFIG_SPL_LIBDISK_SUPPORT=y + CONFIG_ENV_VARS_UBOOT_CONFIG=y + CONFIG_TPL_SYS_MALLOC_F_LEN=0x10000 diff --git a/package/boot/uboot-bcm4908/patches/201-Assume-TPL-support-for-ATF-when-compiling-U-Boot-wit.patch b/package/boot/uboot-bcm4908/patches/201-Assume-TPL-support-for-ATF-when-compiling-U-Boot-wit.patch index 1e59705ac0..187ee96b18 100644 --- a/package/boot/uboot-bcm4908/patches/201-Assume-TPL-support-for-ATF-when-compiling-U-Boot-wit.patch +++ b/package/boot/uboot-bcm4908/patches/201-Assume-TPL-support-for-ATF-when-compiling-U-Boot-wit.patch @@ -19,8 +19,9 @@ deal with compiling SPL or TPL. Signed-off-by: Rafał Miłecki --- arch/arm/mach-bcmbca/bcm4908/cpu.c | 2 +- + arch/arm/mach-bcmbca/bcm4912/cpu.c | 2 +- board/broadcom/bcmbca/board.c | 4 ++-- - 2 files changed, 3 insertions(+), 3 deletions(-) + 3 files changed, 4 insertions(+), 4 deletions(-) --- a/arch/arm/mach-bcmbca/bcm4908/cpu.c +++ b/arch/arm/mach-bcmbca/bcm4908/cpu.c @@ -33,6 +34,17 @@ Signed-off-by: Rafał Miłecki void boot_secondary_cpu(unsigned long vector) { uint32_t cpu, nr_cpus = QUAD_CPUS; +--- a/arch/arm/mach-bcmbca/bcm4912/cpu.c ++++ b/arch/arm/mach-bcmbca/bcm4912/cpu.c +@@ -174,7 +174,7 @@ int bcmbca_get_boot_device(void) + return BOOT_DEVICE_NONE; + } + +-#if !defined(CONFIG_TPL_ATF) ++#if defined(CONFIG_TPL) && !defined(CONFIG_TPL_ATF) + void boot_secondary_cpu(unsigned long vector) + { + uint32_t cpu, nr_cpus = 4; --- a/board/broadcom/bcmbca/board.c +++ b/board/broadcom/bcmbca/board.c @@ -103,7 +103,7 @@ void board_spinor_init(void) diff --git a/package/libs/argp-standalone/Makefile b/package/libs/argp-standalone/Makefile index 21b154f29d..1a48dcb2cd 100644 --- a/package/libs/argp-standalone/Makefile +++ b/package/libs/argp-standalone/Makefile @@ -34,8 +34,10 @@ define Package/argp-standalone/description endef MAKE_FLAGS += \ - CFLAGS="$(TARGET_CFLAGS) $(FPIC)" + CFLAGS="$(TARGET_CFLAGS) $(FPIC) -std=gnu89" +HOST_MAKE_FLAGS += \ + CFLAGS="$(HOST_CFLAGS) $(FPIC) -std=gnu89" define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include diff --git a/package/libs/openssl/Makefile b/package/libs/openssl/Makefile index d0af1c2ad5..4f1dd5931c 100644 --- a/package/libs/openssl/Makefile +++ b/package/libs/openssl/Makefile @@ -9,9 +9,9 @@ include $(TOPDIR)/rules.mk PKG_NAME:=openssl PKG_BASE:=1.1.1 -PKG_BUGFIX:=m +PKG_BUGFIX:=n PKG_VERSION:=$(PKG_BASE)$(PKG_BUGFIX) -PKG_RELEASE:=3 +PKG_RELEASE:=1 PKG_USE_MIPS16:=0 PKG_BUILD_PARALLEL:=1 @@ -27,7 +27,7 @@ PKG_SOURCE_URL:= \ ftp://ftp.pca.dfn.de/pub/tools/net/openssl/source/ \ ftp://ftp.pca.dfn.de/pub/tools/net/openssl/source/old/$(PKG_BASE)/ -PKG_HASH:=f89199be8b23ca45fc7cb9f1d8d3ee67312318286ad030f5316aca6462db6c96 +PKG_HASH:=40dceb51a4f6a5275bde0e6bf20ef4b91bfc32ed57c0552e2e8e15463372b17a PKG_LICENSE:=OpenSSL PKG_LICENSE_FILES:=LICENSE diff --git a/target/linux/bcm4908/image/bootfs-generic.its b/target/linux/bcm4908/image/bootfs-generic.its index bd566d5d22..d32e094eb5 100644 --- a/target/linux/bcm4908/image/bootfs-generic.its +++ b/target/linux/bcm4908/image/bootfs-generic.its @@ -62,6 +62,28 @@ }; }; + fdt_GTAX6000 { + description = "dtb"; + data = /incbin/("${images_dir}/u-boot/GTAX6000.dtb"); + type = "flat_dt"; + compression = "none"; + + hash-1 { + algo = "sha256"; + }; + }; + + fdt_uboot_RAX220 { + description = "dtb"; + data = /incbin/("${images_dir}/u-boot/RAX220.dtb"); + type = "flat_dt"; + compression = "none"; + + hash-1 { + algo = "sha256"; + }; + }; + fdt_linux_RAX220 { description = "dtb"; data = /incbin/("${dts_dir}/broadcom/bcm4908/bcm4908-netgear-raxe500.dtb"); @@ -80,6 +102,18 @@ loadables = "atf", "uboot"; }; + conf_ub_GTAX6000 { + description = "GTAX6000"; + fdt = "fdt_GTAX6000"; + loadables = "atf", "uboot"; + }; + + conf_ub_RAX220 { + description = "RAX220"; + fdt = "fdt_uboot_RAX220"; + loadables = "atf", "uboot"; + }; + conf_lx_RAX220 { description = "BRCM 63xxx linux"; kernel = "kernel"; diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-vr2600v.dts b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-vr2600v.dts index 8fa0a5d291..27d9fc84b3 100644 --- a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-vr2600v.dts +++ b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-vr2600v.dts @@ -257,7 +257,8 @@ partition@320000 { label = "firmware"; reg = <0x320000 0xc60000>; - compatible = "denx,uimage"; + compatible = "openwrt,uimage"; + openwrt,offset = <512>; /* account for pad-extra 512 */ }; /* hole 0xf80000 - 0xfaf100 */ diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7362sl.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7362sl.dts index 4d86bf5542..c75edd933c 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7362sl.dts +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7362sl.dts @@ -22,25 +22,31 @@ #address-cells = <1>; #size-cells = <1>; compatible = "jedec,spi-nor"; - reg = <4 0>; + reg = <4>; spi-max-frequency = <1000000>; - urlader: partition@0 { - reg = <0x0 0x40000>; - label = "urlader"; - read-only; - }; + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; - partition@40000 { - reg = <0x40000 0x60000>; - label = "tffs (1)"; - read-only; - }; + urlader: partition@0 { + reg = <0x0 0x40000>; + label = "urlader"; + read-only; + }; - partition@A0000 { - reg = <0xA0000 0x60000>; - label = "tffs (2)"; - read-only; + partition@40000 { + reg = <0x40000 0x60000>; + label = "tffs (1)"; + read-only; + }; + + partition@A0000 { + reg = <0xA0000 0x60000>; + label = "tffs (2)"; + read-only; + }; }; }; }; 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/config-5.10 b/target/linux/mpc85xx/config-5.10 index e140239fc0..022fc75dac 100644 --- a/target/linux/mpc85xx/config-5.10 +++ b/target/linux/mpc85xx/config-5.10 @@ -265,6 +265,7 @@ CONFIG_VDSO32=y CONFIG_VM_EVENT_COUNTERS=y CONFIG_WATCHDOG_CORE=y # CONFIG_WS_AP3710I is not set +# CONFIG_WS_AP3825I is not set # CONFIG_XES_MPC85xx is not set CONFIG_XZ_DEC_BCJ=y CONFIG_XZ_DEC_POWERPC=y 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..b4a90b31c7 --- /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 +#include + +/ { + 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 = ; + }; + }; + + 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 + * + * 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 +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#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 +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 + diff --git a/target/linux/qoriq/config-5.10 b/target/linux/qoriq/config-5.10 index 0a338ee9da..6a582bbcd5 100644 --- a/target/linux/qoriq/config-5.10 +++ b/target/linux/qoriq/config-5.10 @@ -177,6 +177,9 @@ CONFIG_HAS_IOPORT_MAP=y CONFIG_HWMON=y CONFIG_HW_CONSOLE=y CONFIG_HW_RANDOM=y +CONFIG_I2C=y +CONFIG_I2C_BOARDINFO=y +CONFIG_I2C_MPC=y CONFIG_ILLEGAL_POINTER_VALUE=0x5deadbeef0000000 CONFIG_INITRAMFS_SOURCE="" CONFIG_INPUT=y diff --git a/target/linux/ramips/dts/mt7620a_dlink_dwr-960.dts b/target/linux/ramips/dts/mt7620a_dlink_dwr-960.dts index 77b94a1190..3de9533edc 100644 --- a/target/linux/ramips/dts/mt7620a_dlink_dwr-960.dts +++ b/target/linux/ramips/dts/mt7620a_dlink_dwr-960.dts @@ -1,93 +1,10 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT -#include "mt7620a.dtsi" - -#include -#include -#include +#include "mt7620a_dlink_dwr-96x.dtsi" / { compatible = "dlink,dwr-960", "ralink,mt7620a-soc"; model = "D-Link DWR-960"; - - aliases { - led-boot = &led_status; - led-failsafe = &led_status; - led-running = &led_status; - led-upgrade = &led_status; - }; - - keys { - compatible = "gpio-keys"; - - reset { - label = "reset"; - gpios = <&gpio0 1 GPIO_ACTIVE_LOW>; - linux,code = ; - }; - - wps { - label = "wps"; - gpios = <&gpio0 2 GPIO_ACTIVE_LOW>; - linux,code = ; - }; - }; - - leds { - compatible = "gpio-leds"; - - led_status: status { - label = "green:status"; - gpios = <&gpio0 7 GPIO_ACTIVE_LOW>; - }; - - wan { - label = "green:wan"; - gpios = <&gpio0 11 GPIO_ACTIVE_LOW>; - }; - - lan { - label = "green:lan"; - gpios = <&gpio0 12 GPIO_ACTIVE_LOW>; - }; - - sms { - label = "green:sms"; - gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; - }; - - signal_green { - label = "green:signal"; - gpios = <&gpio2 0 GPIO_ACTIVE_HIGH>; - }; - - signal_red { - label = "red:signal"; - gpios = <&gpio2 1 GPIO_ACTIVE_HIGH>; - }; - - 4g { - label = "green:4g"; - gpios = <&gpio2 2 GPIO_ACTIVE_LOW>; - }; - - 3g { - label = "green:3g"; - gpios = <&gpio2 3 GPIO_ACTIVE_LOW>; - }; - - wlan5g { - label = "green:wlan5g"; - gpios = <&gpio2 4 GPIO_ACTIVE_LOW>; - linux,default-trigger = "phy0tpt"; - }; - - wlan2g { - label = "green:wlan2g"; - gpios = <&gpio3 0 GPIO_ACTIVE_LOW>; - linux,default-trigger = "phy1tpt"; - }; - }; }; ðernet { @@ -112,91 +29,6 @@ }; }; -&gpio1 { - status = "okay"; -}; - -&gpio2 { - status = "okay"; -}; - -&gpio3 { - status = "okay"; -}; - -&spi0 { - status = "okay"; - - flash@0 { - compatible = "jedec,spi-nor"; - reg = <0>; - spi-max-frequency = <50000000>; - - partitions { - compatible = "fixed-partitions"; - #address-cells = <1>; - #size-cells = <1>; - - partition@0 { - label = "jboot"; - reg = <0x0 0x10000>; - read-only; - }; - - partition@10000 { - compatible = "openwrt,uimage", "denx,uimage"; - openwrt,ih-magic = ; - openwrt,offset = <0x10000>; - label = "firmware"; - reg = <0x10000 0xfe0000>; - }; - - config: partition@ff0000 { - label = "config"; - reg = <0xff0000 0x10000>; - read-only; - }; - }; - }; -}; - -&ehci { - status = "okay"; -}; - -&ohci { - status = "okay"; -}; - -&pcie { - status = "okay"; -}; - -&pcie0 { - wifi@0,0 { - compatible = "mediatek,mt76"; - reg = <0x0000 0 0 0 0>; - ieee80211-freq-limit = <5000000 6000000>; - mediatek,mtd-eeprom = <&config 0xe08e>; - nvmem-cells = <&macaddr_config_e50e>; - nvmem-cell-names = "mac-address"; - mac-address-increment = <2>; - }; -}; - -&state_default { - default { - groups = "i2c", "wled", "spi refclk", "uartf", "ephy"; - function = "gpio"; - }; -}; - -&config { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_config_e50e: macaddr@e50e { - reg = <0xe50e 0x6>; - }; +&wifi { + mediatek,mtd-eeprom = <&config 0xe08e>; }; diff --git a/target/linux/ramips/dts/mt7620a_dlink_dwr-961-a1.dts b/target/linux/ramips/dts/mt7620a_dlink_dwr-961-a1.dts new file mode 100644 index 0000000000..7eae666668 --- /dev/null +++ b/target/linux/ramips/dts/mt7620a_dlink_dwr-961-a1.dts @@ -0,0 +1,62 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* + * D-Link DWR-961 A1 Board Description + * Copyright 2022 Pawel Dembicki + */ +#include "mt7620a_dlink_dwr-96x.dtsi" + +/ { + compatible = "dlink,dwr-961-a1", "ralink,mt7620a-soc"; + model = "D-Link DWR-961 A1"; + + leds { + hidden-1 { /* hidden next to wlan5g led */ + label = "green:hidden-1"; + gpios = <&gpio0 13 GPIO_ACTIVE_LOW>; + }; + + hidden-2 { /* hidden next to sms led*/ + label = "green:hidden-2"; + gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; + }; + }; +}; + +ðernet { + pinctrl-names = "default"; + pinctrl-0 = <&rgmii1_pins &mdio_pins>; + + port@5 { + status = "okay"; + phy-mode = "rgmii"; + mediatek,fixed-link = <1000 1 1 1>; + }; + + mdio-bus { + status = "okay"; + + ethernet-phy@0 { + reg = <0>; + phy-mode = "rgmii"; + qca,ar8327-initvals = < + 0x04 0x87300000 /* PORT0 PAD MODE CTRL */ + 0x0c 0x00000000 /* PORT6 PAD MODE CTRL */ + 0x7c 0x0000007e /* PORT0_STATUS */ + 0x80 0x00001200 /* PORT1_STATUS */ + 0x84 0x00001200 /* PORT2_STATUS */ + 0x88 0x00001200 /* PORT3_STATUS */ + 0x8c 0x00001200 /* PORT4_STATUS */ + 0x90 0x00001200 /* PORT5_STATUS */ + 0x94 0x00000000 /* PORT6_STATUS */ + >; + }; + }; +}; + +&gsw { + mediatek,ephy-base = /bits/ 8 <8>; +}; + +&wifi { + mediatek,mtd-eeprom = <&config 0xe29e>; +}; diff --git a/target/linux/ramips/dts/mt7620a_dlink_dwr-96x.dtsi b/target/linux/ramips/dts/mt7620a_dlink_dwr-96x.dtsi new file mode 100644 index 0000000000..a5fd705eba --- /dev/null +++ b/target/linux/ramips/dts/mt7620a_dlink_dwr-96x.dtsi @@ -0,0 +1,178 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* + * D-Link DWR-96x Common Board Description + * Copyright 2022 Pawel Dembicki + */ +#include "mt7620a.dtsi" + +#include +#include +#include + +/ { + aliases { + led-boot = &led_status; + led-failsafe = &led_status; + led-running = &led_status; + led-upgrade = &led_status; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + gpios = <&gpio0 1 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + wps { + label = "wps"; + gpios = <&gpio0 2 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + }; + + leds { + compatible = "gpio-leds"; + + led_status: status { + label = "green:status"; + gpios = <&gpio0 7 GPIO_ACTIVE_LOW>; + }; + + wan { + label = "green:wan"; + gpios = <&gpio0 11 GPIO_ACTIVE_LOW>; + }; + + lan { + label = "green:lan"; + gpios = <&gpio0 12 GPIO_ACTIVE_LOW>; + }; + + sms { + label = "green:sms"; + gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; + }; + + signal_green { + label = "green:signal"; + gpios = <&gpio2 0 GPIO_ACTIVE_HIGH>; + }; + + signal_red { + label = "red:signal"; + gpios = <&gpio2 1 GPIO_ACTIVE_HIGH>; + }; + + 4g { + label = "green:4g"; + gpios = <&gpio2 2 GPIO_ACTIVE_LOW>; + }; + + 3g { + label = "green:3g"; + gpios = <&gpio2 3 GPIO_ACTIVE_LOW>; + }; + + wlan5g { + label = "green:wlan5g"; + gpios = <&gpio2 4 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy0tpt"; + }; + + wlan2g { + label = "green:wlan2g"; + gpios = <&gpio3 0 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy1tpt"; + }; + }; +}; + +&ehci { + status = "okay"; +}; + +&gpio1 { + status = "okay"; +}; + +&gpio2 { + status = "okay"; +}; + +&gpio3 { + status = "okay"; +}; + +&ohci { + status = "okay"; +}; + +&pcie { + status = "okay"; +}; + +&pcie0 { + wifi: wifi@0,0 { + compatible = "mediatek,mt76"; + reg = <0x0000 0 0 0 0>; + ieee80211-freq-limit = <5000000 6000000>; + nvmem-cells = <&macaddr_config_e50e>; + nvmem-cell-names = "mac-address"; + mac-address-increment = <(2)>; + }; +}; + +&spi0 { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <50000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "jboot"; + reg = <0x0 0x10000>; + read-only; + }; + + partition@10000 { + compatible = "openwrt,uimage", "denx,uimage"; + openwrt,ih-magic = ; + openwrt,offset = <0x10000>; + label = "firmware"; + reg = <0x10000 0xfe0000>; + }; + + config: partition@ff0000 { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + label = "config"; + reg = <0xff0000 0x10000>; + read-only; + + macaddr_config_e50e: macaddr@e50e { + reg = <0xe50e 0x6>; + }; + }; + }; + }; +}; + +&state_default { + default { + groups = "i2c", "wled", "spi refclk", "uartf", "ephy"; + function = "gpio"; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_netgear_wn3000rp-v3.dts b/target/linux/ramips/dts/mt7620a_netgear_wn3000rp-v3.dts index c6fe7baa67..cddffb7224 100644 --- a/target/linux/ramips/dts/mt7620a_netgear_wn3000rp-v3.dts +++ b/target/linux/ramips/dts/mt7620a_netgear_wn3000rp-v3.dts @@ -1,161 +1,8 @@ /* This file is released into the public domain */ -#include "mt7620a.dtsi" - -#include -#include +#include "mt7620a_netgear_wn3x00rp.dtsi" / { compatible = "netgear,wn3000rp-v3", "ralink,mt7620a-soc"; model = "Netgear WN3000RP v3"; - - aliases { - led-boot = &led_power_green; - led-failsafe = &led_power_green; - led-running = &led_power_green; - led-upgrade = &led_power_green; - }; - - keys { - compatible = "gpio-keys"; - - reset { - label = "reset"; - gpios = <&gpio0 1 GPIO_ACTIVE_LOW>; - linux,code = ; - }; - - wps { - label = "wps"; - gpios = <&gpio0 2 GPIO_ACTIVE_LOW>; - linux,code = ; - }; - }; - - leds { - compatible = "gpio-leds"; - - led_power_green: power_g { - label = "green:power"; - gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; - default-state = "on"; - }; - - power_r { - label = "red:power"; - gpios = <&gpio0 11 GPIO_ACTIVE_LOW>; - }; - - client_g { - label = "green:client"; - gpios = <&gpio0 13 GPIO_ACTIVE_LOW>; - }; - - client_r { - label = "red:client"; - gpios = <&gpio0 10 GPIO_ACTIVE_LOW>; - }; - - router_g { - label = "green:router"; - gpios = <&gpio0 12 GPIO_ACTIVE_LOW>; - }; - - router_r { - label = "red:router"; - gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; - }; - - wps { - label = "green:wps"; - gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; - }; - - l_arrow { - label = "blue:leftarrow"; - gpios = <&gpio0 7 GPIO_ACTIVE_LOW>; - }; - - r_arrow { - label = "blue:rightarrow"; - gpios = <&gpio0 8 GPIO_ACTIVE_LOW>; - }; - }; -}; - -&gpio1 { - status = "okay"; -}; - -&spi0 { - status = "okay"; - - flash@0 { - compatible = "jedec,spi-nor"; - reg = <0>; - spi-max-frequency = <10000000>; - - partitions { - compatible = "fixed-partitions"; - #address-cells = <1>; - #size-cells = <1>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; - - partition@40000 { - compatible = "denx,uimage"; - label = "firmware"; - reg = <0x40000 0x7b0000>; - }; - - art: partition@7f0000 { - label = "art"; - reg = <0x7f0000 0x10000>; - read-only; - }; - }; - }; -}; - -ðernet { - nvmem-cells = <&macaddr_art_0>; - nvmem-cell-names = "mac-address"; -}; - -&wmac { - ralink,mtd-eeprom = <&art 0x1000>; - - nvmem-cells = <&macaddr_art_6>; - nvmem-cell-names = "mac-address"; -}; - -&state_default { - default { - groups = "i2c", "uartf", "spi refclk"; - function = "gpio"; - }; -}; - -&art { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_art_0: macaddr@0 { - reg = <0x0 0x6>; - }; - - macaddr_art_6: macaddr@6 { - reg = <0x6 0x6>; - }; }; diff --git a/target/linux/ramips/dts/mt7620a_netgear_wn3100rp-v2.dts b/target/linux/ramips/dts/mt7620a_netgear_wn3100rp-v2.dts new file mode 100644 index 0000000000..af4a73bade --- /dev/null +++ b/target/linux/ramips/dts/mt7620a_netgear_wn3100rp-v2.dts @@ -0,0 +1,8 @@ +/* This file is released into the public domain */ + +#include "mt7620a_netgear_wn3x00rp.dtsi" + +/ { + compatible = "netgear,wn3100rp-v2", "ralink,mt7620a-soc"; + model = "Netgear WN3100RP v2"; +}; diff --git a/target/linux/ramips/dts/mt7620a_netgear_wn3x00rp.dtsi b/target/linux/ramips/dts/mt7620a_netgear_wn3x00rp.dtsi new file mode 100644 index 0000000000..914d4e6bba --- /dev/null +++ b/target/linux/ramips/dts/mt7620a_netgear_wn3x00rp.dtsi @@ -0,0 +1,158 @@ +/* This file is released into the public domain */ + +#include "mt7620a.dtsi" + +#include +#include + +/ { + aliases { + led-boot = &led_power_green; + led-failsafe = &led_power_green; + led-running = &led_power_green; + led-upgrade = &led_power_green; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + gpios = <&gpio0 1 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + wps { + label = "wps"; + gpios = <&gpio0 2 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; + + leds { + compatible = "gpio-leds"; + + led_power_green: power_g { + label = "green:power"; + gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; + default-state = "on"; + }; + + power_r { + label = "red:power"; + gpios = <&gpio0 11 GPIO_ACTIVE_LOW>; + }; + + client_g { + label = "green:client"; + gpios = <&gpio0 13 GPIO_ACTIVE_LOW>; + }; + + client_r { + label = "red:client"; + gpios = <&gpio0 10 GPIO_ACTIVE_LOW>; + }; + + router_g { + label = "green:router"; + gpios = <&gpio0 12 GPIO_ACTIVE_LOW>; + }; + + router_r { + label = "red:router"; + gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; + }; + + wps { + label = "green:wps"; + gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; + }; + + l_arrow { + label = "blue:leftarrow"; + gpios = <&gpio0 7 GPIO_ACTIVE_LOW>; + }; + + r_arrow { + label = "blue:rightarrow"; + gpios = <&gpio0 8 GPIO_ACTIVE_LOW>; + }; + }; +}; + +&gpio1 { + status = "okay"; +}; + +&spi0 { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <10000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + partition@40000 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x40000 0x7b0000>; + }; + + art: partition@7f0000 { + label = "art"; + reg = <0x7f0000 0x10000>; + read-only; + }; + }; + }; +}; + +ðernet { + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; +}; + +&wmac { + ralink,mtd-eeprom = <&art 0x1000>; + + nvmem-cells = <&macaddr_art_6>; + nvmem-cell-names = "mac-address"; +}; + +&state_default { + default { + groups = "i2c", "uartf", "spi refclk"; + function = "gpio"; + }; +}; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; + + macaddr_art_6: macaddr@6 { + reg = <0x6 0x6>; + }; +}; diff --git a/target/linux/ramips/image/mt7620.mk b/target/linux/ramips/image/mt7620.mk index fbb7f3aacc..b32168a59c 100644 --- a/target/linux/ramips/image/mt7620.mk +++ b/target/linux/ramips/image/mt7620.mk @@ -314,6 +314,21 @@ define Device/dlink_dwr-960 endef TARGET_DEVICES += dlink_dwr-960 +define Device/dlink_dwr-961-a1 + $(Device/amit_jboot) + SOC := mt7620a + IMAGE_SIZE := 16256k + DEVICE_VENDOR := D-Link + DEVICE_MODEL := DWR-961 + DEVICE_VARIANT := A1 + DLINK_ROM_ID := DLK6E3813001 + DLINK_FAMILY_MEMBER := 0x6E38 + DLINK_FIRMWARE_SIZE := 0xFE0000 + DEVICE_PACKAGES += kmod-mt76x2 kmod-usb-net-qmi-wwan kmod-usb-serial-option \ + uqmi +endef +TARGET_DEVICES += dlink_dwr-961-a1 + define Device/domywifi_dm202 SOC := mt7620a IMAGE_SIZE := 16064k @@ -806,6 +821,22 @@ define Device/netgear_wn3000rp-v3 endef TARGET_DEVICES += netgear_wn3000rp-v3 +define Device/netgear_wn3100rp-v2 + SOC := mt7620a + IMAGE_SIZE := 7872k + NETGEAR_HW_ID := 29764883+8+0+32+2x2+0 + NETGEAR_BOARD_ID := WN3100RPv2 + BLOCKSIZE := 4k + IMAGES += factory.bin + KERNEL := $(KERNEL_DTB) | uImage lzma | pad-offset 64k 64 | \ + append-uImage-fakehdr filesystem + IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | netgear-dni + DEVICE_VENDOR := NETGEAR + DEVICE_MODEL := WN3100RP + DEVICE_VARIANT := v2 +endef +TARGET_DEVICES += netgear_wn3100rp-v2 + define Device/netis_wf2770 SOC := mt7620a IMAGE_SIZE := 16064k diff --git a/target/linux/ramips/mt7620/base-files/etc/board.d/01_leds b/target/linux/ramips/mt7620/base-files/etc/board.d/01_leds index 1f53930311..1293c34cbf 100644 --- a/target/linux/ramips/mt7620/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/mt7620/base-files/etc/board.d/01_leds @@ -81,6 +81,10 @@ dlink,dwr-960) ucidef_set_led_switch "lan" "lan" "green:lan" "switch0" "0x2e" ucidef_set_led_switch "wan" "wan" "green:wan" "switch0" "0x01" ;; +dlink,dwr-961-a1) + ucidef_set_led_switch "lan" "lan" "green:lan" "switch0" "0x3c" + ucidef_set_led_switch "wan" "wan" "green:wan" "switch0" "0x02" + ;; domywifi,dm202|\ domywifi,dm203|\ domywifi,dw22d) @@ -157,7 +161,8 @@ lenovo,newifi-y1s) ucidef_set_led_netdev "wan" "WAN" "blue:internet" "eth0.2" "tx rx" ;; netgear,ex2700|\ -netgear,wn3000rp-v3) +netgear,wn3000rp-v3|\ +netgear,wn3100rp-v2) ucidef_set_led_netdev "wifi_led" "wifi" "green:router" "wlan0" ;; netgear,ex3700|\ diff --git a/target/linux/ramips/mt7620/base-files/etc/board.d/02_network b/target/linux/ramips/mt7620/base-files/etc/board.d/02_network index 47bd02f3d1..f7bc41669f 100644 --- a/target/linux/ramips/mt7620/base-files/etc/board.d/02_network +++ b/target/linux/ramips/mt7620/base-files/etc/board.d/02_network @@ -54,6 +54,7 @@ ramips_setup_interfaces() netgear,ex6120|\ netgear,ex6130|\ netgear,wn3000rp-v3|\ + netgear,wn3100rp-v2|\ planex,cs-qr10|\ planex,mzk-ex300np|\ planex,mzk-ex750np|\ @@ -130,6 +131,13 @@ ramips_setup_interfaces() ucidef_add_switch "switch0" \ "1:lan" "2:lan" "3:lan" "5:lan" "0:wan" "6@eth0" ;; + dlink,dwr-961-a1) + ucidef_add_switch "switch0" \ + "2:lan:1" "3:lan:2" "4:lan:3" "5:lan:4" "1:wan" "0@eth0" + ucidef_add_switch "switch1" \ + "5:lan" "6@eth0" + ucidef_add_switch_attr "switch1" "enable" "false" + ;; edimax,br-6478ac-v2|\ lb-link,bl-w1200|\ tplink,archer-c2-v1) @@ -303,6 +311,7 @@ ramips_setup_macs() dlink,dwr-921-c1|\ dlink,dwr-922-e2|\ dlink,dwr-960|\ + dlink,dwr-961-a1|\ lava,lr-25g001) wan_mac=$(jboot_config_read -m -i $(find_mtd_part "config") -o 0xE000) lan_mac=$(macaddr_add "$wan_mac" 1) diff --git a/target/linux/ramips/mt7620/base-files/etc/board.d/03_gpio_switches b/target/linux/ramips/mt7620/base-files/etc/board.d/03_gpio_switches index 969e9eba63..81daca4978 100644 --- a/target/linux/ramips/mt7620/base-files/etc/board.d/03_gpio_switches +++ b/target/linux/ramips/mt7620/base-files/etc/board.d/03_gpio_switches @@ -10,7 +10,8 @@ dlink,dir-510l) ucidef_add_gpio_switch "usb_enable1" "USB 1A enable" "12" "0" ucidef_add_gpio_switch "usb_enable05" "USB 0.5A enable" "13" "1" ;; -dlink,dwr-960) +dlink,dwr-960|\ +dlink,dwr-961-a1) ucidef_add_gpio_switch "power_mpcie" "mPCIe power" "0" "1" ;; head-weblink,hdrm200) diff --git a/target/linux/ramips/mt7620/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom b/target/linux/ramips/mt7620/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom index 291f89f41d..2d1ac2e872 100644 --- a/target/linux/ramips/mt7620/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom +++ b/target/linux/ramips/mt7620/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom @@ -29,6 +29,7 @@ case "$FIRMWARE" in dlink,dwr-921-c1|\ dlink,dwr-922-e2|\ dlink,dwr-960|\ + dlink,dwr-961-a1|\ lava,lr-25g001) wan_mac=$(jboot_config_read -m -i $(find_mtd_part "config") -o 0xE000) wifi_mac=$(macaddr_add "$wan_mac" 1)