diff --git a/scripts/cfe-bin-header.py b/scripts/cfe-bin-header.py index 476a36d8dd..3bf652bd0a 100755 --- a/scripts/cfe-bin-header.py +++ b/scripts/cfe-bin-header.py @@ -1,4 +1,4 @@ -#!/bin/env python3 +#!/usr/bin/env python3 import argparse import os diff --git a/scripts/cfe-wfi-tag.py b/scripts/cfe-wfi-tag.py index 3b60dbfc5d..78ae869f1d 100755 --- a/scripts/cfe-wfi-tag.py +++ b/scripts/cfe-wfi-tag.py @@ -1,4 +1,4 @@ -#!/bin/env python3 +#!/usr/bin/env python3 """ Whole Flash Image Tag diff --git a/target/linux/bcm63xx/base-files/etc/board.d/01_leds b/target/linux/bcm63xx/base-files/etc/board.d/01_leds index 3f73d914f9..89105866a4 100755 --- a/target/linux/bcm63xx/base-files/etc/board.d/01_leds +++ b/target/linux/bcm63xx/base-files/etc/board.d/01_leds @@ -63,6 +63,11 @@ netgear,dgnd3700-v1) ucidef_set_led_usbdev "usb1" "USB1" "DGND3700v1_3800B:green:usb-back" "1-1" ucidef_set_led_usbdev "usb2" "USB2" "DGND3700v1_3800B:green:usb-front" "1-2" ;; +netgear,dgnd3700-v2) + ucidef_set_led_netdev "lan" "LAN" "dgnd3700-v2:green:ethernet" "eth0" + ucidef_set_led_usbdev "usb1" "USB1" "dgnd3700-v2:green:usb1" "1-1" + ucidef_set_led_usbdev "usb2" "USB2" "dgnd3700-v2:green:usb2" "1-2" + ;; netgear,evg2000) ucidef_set_led_netdev "lan" "LAN" "EVG2000:green:lan" "eth0" ucidef_set_led_netdev "wan" "WAN" "EVG2000:green:wan" "eth1" @@ -79,6 +84,7 @@ sagem,fast-2704n) sagem,fast-2704-v2) ucidef_set_led_usbdev "usb" "USB" "F@ST2704V2:green:usb" "1-1" ;; +sercomm,ad1018|\ sercomm,ad1018-nor) ucidef_set_led_netdev "wlan0" "WLAN" "AD1018:green:wifi" "wlan0" ;; diff --git a/target/linux/bcm63xx/base-files/etc/board.d/02_network b/target/linux/bcm63xx/base-files/etc/board.d/02_network index 7203b1c3fc..14eb1091f5 100755 --- a/target/linux/bcm63xx/base-files/etc/board.d/02_network +++ b/target/linux/bcm63xx/base-files/etc/board.d/02_network @@ -12,6 +12,7 @@ actiontec,r1000h|\ dynalink,rta770bw|\ dynalink,rta770w|\ netgear,cvg834g|\ +netgear,dgnd3700-v2|\ netgear,evg2000|\ t-com,speedport-w-303v|\ t-com,speedport-w-500v) @@ -99,6 +100,10 @@ sagem,fast-2704n) ucidef_add_switch "switch0" \ "0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "8t@eth0" ;; +comtrend,vg-8050) + ucidef_add_switch "switch0" \ + "0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "4:wan" "8t@eth0" + ;; comtrend,vr-3032u) ucidef_add_switch "switch0" \ "0:lan:2" "1:lan:3" "2:lan:4" "3:lan:1" "8t@eth0" @@ -127,6 +132,7 @@ netgear,dgnd3700-v1) ucidef_add_switch "switch0" \ "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "0:wan" "8t@eth0" ;; +sercomm,ad1018|\ sercomm,ad1018-nor) ucidef_add_switch "switch0" \ "1:lan:3" "2:lan:2" "3:lan:1" "0:wan" "8t@eth0" diff --git a/target/linux/bcm63xx/base-files/etc/uci-defaults/09_fix_crc b/target/linux/bcm63xx/base-files/etc/uci-defaults/09_fix_crc index c33e56f28e..813b51fb52 100644 --- a/target/linux/bcm63xx/base-files/etc/uci-defaults/09_fix_crc +++ b/target/linux/bcm63xx/base-files/etc/uci-defaults/09_fix_crc @@ -40,4 +40,7 @@ case "$(board_name)" in zyxel,p870hw-51a-v2) do_fixcrc ;; + sercomm,ad1018) + mtd erase bootflag2 + ;; esac diff --git a/target/linux/bcm63xx/base-files/lib/upgrade/platform.sh b/target/linux/bcm63xx/base-files/lib/upgrade/platform.sh index 0debff28bb..093eba056e 100644 --- a/target/linux/bcm63xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/bcm63xx/base-files/lib/upgrade/platform.sh @@ -5,7 +5,10 @@ platform_check_image() { [ "$#" -gt 1 ] && return 1 case "$(board_name)" in - comtrend,vr-3032u) + comtrend,vg-8050|\ + comtrend,vr-3032u|\ + netgear,dgnd3700-v2|\ + sercomm,ad1018) # NAND sysupgrade return 0 ;; @@ -61,7 +64,10 @@ cfe_jffs2_upgrade_tar() { platform_do_upgrade() { case "$(board_name)" in - comtrend,vr-3032u) + comtrend,vg-8050|\ + comtrend,vr-3032u|\ + netgear,dgnd3700-v2|\ + sercomm,ad1018) REQUIRE_IMAGE_METADATA=1 cfe_jffs2_upgrade_tar "$1" ;; diff --git a/target/linux/bcm63xx/dts/bcm63169-comtrend-vg-8050.dts b/target/linux/bcm63xx/dts/bcm63169-comtrend-vg-8050.dts new file mode 100644 index 0000000000..4f54e9c842 --- /dev/null +++ b/target/linux/bcm63xx/dts/bcm63169-comtrend-vg-8050.dts @@ -0,0 +1,198 @@ +// SPDX-License-Identifier: GPL-2.0-or-later + +/dts-v1/; + +#include "bcm63268.dtsi" + +#include + +/ { + model = "Comtrend VG-8050"; + compatible = "comtrend,vg-8050", "brcm,bcm63268"; + + aliases { + led-boot = &led_power_green; + led-failsafe = &led_power_green; + led-running = &led_power_green; + led-upgrade = &led_power_green; + }; + + chosen { + bootargs = "rootfstype=squashfs,ubifs noinitrd console=ttyS0,115200"; + stdout-path = "serial0:115200n8"; + }; + + keys { + compatible = "gpio-keys-polled"; + #address-cells = <1>; + #size-cells = <0>; + poll-interval = <20>; + + reset { + label = "reset"; + gpios = <&pinctrl 33 1>; + linux,code = ; + debounce-interval = <60>; + }; + + wps { + label = "wps"; + gpios = <&pinctrl 34 1>; + linux,code = ; + debounce-interval = <60>; + }; + }; +}; + +&leds { + status = "ok"; + brcm,serial-leds; + brcm,serial-dat-low; + brcm,serial-shift-inv; + + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_serial_led>; + + led@2 { + reg = <2>; + active-low; + label = "vg-8050:red:internet"; + }; + + led@3 { + reg = <3>; + active-low; + label = "vg-8050:red:power"; + }; + + led_power_green: led@6 { + reg = <6>; + active-low; + label = "vg-8050:green:power"; + default-state = "on"; + }; + + led@7 { + reg = <7>; + active-low; + label = "vg-8050:green:wps"; + }; + + led@8 { + reg = <8>; + active-low; + label = "vg-8050:green:internet"; + }; + + led@10 { + reg = <10>; + active-low; + label = "vg-8050:green:voip"; + }; + + led@12 { + reg = <12>; + active-low; + label = "vg-8050:red:voip"; + }; + + led@14 { + reg = <14>; + active-low; + label = "vg-8050:red:wps"; + }; +}; + +&hsspi { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_hsspi_cs5>; + + switch@0 { + compatible = "brcm,bcm53125"; + reg = <5>; + spi-max-frequency = <781000>; + spi-cpha; + spi-cpol; + + lede,alias = "eth0"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + lan@0 { + reg = <0>; + label = "lan4"; + }; + + lan@1 { + reg = <1>; + label = "lan3"; + }; + + lan@2 { + reg = <2>; + label = "lan2"; + }; + + lan@3 { + reg = <3>; + label = "lan1"; + }; + + wan@4 { + reg = <4>; + label = "wan"; + }; + + cpu@8 { + reg = <8>; + label = "cpu"; + + fixed-link { + speed = <1000>; + full-duplex; + asym-pause; + pause; + }; + }; + }; + }; +}; + +&nflash { + status = "okay"; + + nandcs@0 { + compatible = "brcm,nandcs"; + #size-cells = <1>; + #address-cells = <1>; + reg = <0>; + nand-ecc-step-size = <512>; + nand-ecc-strength = <15>; + nand-on-flash-bbt; + brcm,nand-oob-sector-size = <64>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + cferom@0 { + label = "cferom"; + reg = <0x0000000 0x0020000>; + read-only; + }; + + wfi@20000 { + compatible = "brcm,wfi"; + label = "wfi"; + reg = <0x0020000 0x7ee0000>; + }; + }; + }; +}; + +&uart0 { + status = "ok"; +}; diff --git a/target/linux/bcm63xx/dts/bcm6328-sercomm-ad1018.dts b/target/linux/bcm63xx/dts/bcm6328-sercomm-ad1018.dts new file mode 100644 index 0000000000..7f9a6e2698 --- /dev/null +++ b/target/linux/bcm63xx/dts/bcm6328-sercomm-ad1018.dts @@ -0,0 +1,210 @@ +// SPDX-License-Identifier: GPL-2.0-or-later + +/dts-v1/; + +#include "bcm6328.dtsi" + +#include + +/ { + model = "Sercomm AD1018"; + compatible = "sercomm,ad1018", "brcm,bcm6328"; + + aliases { + led-boot = &led_power_green; + led-failsafe = &led_power_green; + led-running = &led_power_green; + led-upgrade = &led_power_green; + }; + + chosen { + bootargs = "rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200"; + stdout-path = "serial0:115200n8"; + }; + + keys { + compatible = "gpio-keys-polled"; + #address-cells = <1>; + #size-cells = <0>; + poll-interval = <20>; + + wps { + label = "wps"; + gpios = <&pinctrl 24 1>; + linux,code = ; + debounce-interval = <60>; + }; + + wifi { + label = "wifi"; + gpios = <&pinctrl 25 1>; + linux,code = ; + debounce-interval = <60>; + }; + + reset { + label = "reset"; + gpios = <&pinctrl 31 1>; + linux,code = ; + debounce-interval = <60>; + }; + }; +}; + +&leds { + status = "ok"; + + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_leds &pinctrl_serial_led + &pinctrl_ephy0_spd_led &pinctrl_ephy1_act_led + &pinctrl_ephy2_act_led &pinctrl_ephy3_act_led>; + + brcm,serial-leds; + brcm,serial-shift-inv; + brcm,serial-dat-low; + + led@0 { + reg = <0>; + active-low; + label = "ad1018:red:internet"; + }; + + led@1 { + reg = <1>; + active-low; + label = "ad1018:green:internet"; + }; + + led_power_green: led@8 { + reg = <8>; + active-low; + label = "ad1018:green:power"; + default-state = "on"; + }; + + led@10 { + reg = <10>; + active-low; + label = "ad1018:green:adsl"; + }; + + led@11 { + reg = <11>; + active-low; + label = "ad1018:red:adsl"; + }; + + led@12 { + reg = <12>; + active-low; + label = "ad1018:green:phone"; + }; + + led@13 { + reg = <13>; + active-low; + label = "ad1018:green:wps"; + }; + + led@14 { + reg = <14>; + active-low; + label = "ad1018:green:wifi"; + }; + + led@15 { + reg = <15>; + active-low; + label = "ad1018:green:usb"; + }; + + led@17 { + /* EPHY0 Spd */ + reg = <17>; + brcm,hardware-controlled; + }; +}; + +&nflash { + status = "okay"; + + nandcs@0 { + compatible = "brcm,nandcs"; + #size-cells = <1>; + #address-cells = <1>; + reg = <0>; + nand-ecc-step-size = <512>; + nand-ecc-strength = <15>; + nand-on-flash-bbt; + brcm,nand-oob-sector-size = <64>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "cferom"; + reg = <0x0000000 0x0020000>; + read-only; + }; + + partition@20000 { + label = "mmap"; + reg = <0x0020000 0x00a0000>; + read-only; + }; + + partition@c0000 { + label = "cferam1"; + reg = <0x00c0000 0x0140000>; + read-only; + }; + + partition@200000 { + label = "cferam2"; + reg = <0x0200000 0x0140000>; + read-only; + }; + + partition@520000 { + compatible = "brcm,wfi-sercomm"; + label = "wfi"; + reg = <0x0520000 0x6400000>; + }; + + partition@6920000 { + label = "bootflag1"; + reg = <0x6920000 0x0140000>; + }; + + partition@6a60000 { + label = "bootflag2"; + reg = <0x6a60000 0x0140000>; + }; + + partition@6ba0000 { + label = "xml_cfg"; + reg = <0x6ba0000 0x0280000>; + read-only; + }; + + partition@6e20000 { + label = "app_dat"; + reg = <0x6e20000 0x0280000>; + read-only; + }; + }; + }; +}; + +&pinctrl { + pinctrl_leds: leds { + function = "led"; + pins = "gpio0", "gpio1"; + }; +}; + +&uart0 { + status = "ok"; +}; diff --git a/target/linux/bcm63xx/dts/bcm6362-netgear-dgnd3700-v2.dts b/target/linux/bcm63xx/dts/bcm6362-netgear-dgnd3700-v2.dts new file mode 100644 index 0000000000..07e5c1eff8 --- /dev/null +++ b/target/linux/bcm63xx/dts/bcm6362-netgear-dgnd3700-v2.dts @@ -0,0 +1,216 @@ +// SPDX-License-Identifier: GPL-2.0-or-later + +/dts-v1/; + +#include "bcm6362.dtsi" + +#include + +/ { + model = "Netgear DGND3700v2"; + compatible = "netgear,dgnd3700-v2", "brcm,bcm6362"; + + aliases { + led-boot = &led_power_green; + led-failsafe = &led_power_green; + led-running = &led_power_green; + led-upgrade = &led_power_green; + }; + + chosen { + bootargs = "rootfstype=squashfs,ubifs noinitrd console=ttyS0,115200"; + stdout-path = "serial0:115200n8"; + }; + + keys { + compatible = "gpio-keys-polled"; + #address-cells = <1>; + #size-cells = <0>; + poll-interval = <20>; + + reset { + label = "reset"; + gpios = <&pinctrl 24 1>; + linux,code = ; + debounce-interval = <60>; + }; + + wlan { + label = "wlan"; + gpios = <&pinctrl 25 1>; + linux,code = ; + debounce-interval = <60>; + }; + + wps { + label = "wps"; + gpios = <&pinctrl 26 1>; + linux,code = ; + debounce-interval = <60>; + }; + }; + + leds { + compatible = "gpio-leds"; + + led@28 { + label = "dgnd3700-v2:green:dsl"; + gpios = <&pinctrl 28 1>; + }; + + led@34 { + label = "dgnd3700-v2:red:power"; + gpios = <&pinctrl 34 1>; + }; + }; +}; + +&leds { + status = "okay"; + brcm,serial-leds; + brcm,serial-dat-low; + brcm,serial-shift-inv; + brcm,serial-mux; + + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_leds &pinctrl_serial_led>; + + led@1 { + reg = <1>; + active-low; + label = "dgnd3700-v2:green:internet"; + }; + + led_power_green: led@8 { + reg = <8>; + label = "dgnd3700-v2:green:power"; + default-state = "on"; + }; + + led@9 { + reg = <9>; + active-low; + label = "dgnd3700-v2:green:wps"; + }; + + led@10 { + reg = <10>; + active-low; + label = "dgnd3700-v2:green:usb1"; + }; + + led@11 { + reg = <11>; + active-low; + label = "dgnd3700-v2:green:usb2"; + }; + + led@12 { + reg = <12>; + active-low; + label = "dgnd3700-v2:amber:internet"; + }; + + led@13 { + reg = <13>; + active-low; + label = "dgnd3700-v2:green:ethernet"; + }; + + led@14 { + reg = <14>; + active-low; + label = "dgnd3700-v2:amber:dsl"; + }; + + led@16 { + reg = <16>; + active-low; + label = "dgnd3700-v2:amber:usb1"; + }; + + led@17 { + reg = <17>; + active-low; + label = "dgnd3700-v2:amber:usb2"; + }; + + led@18 { + reg = <18>; + active-low; + label = "dgnd3700-v2:amber:ethernet"; + }; +}; + +&nflash { + status = "ok"; + + nandcs@0 { + compatible = "brcm,nandcs"; + #size-cells = <1>; + #address-cells = <1>; + reg = <0>; + nand-ecc-step-size = <512>; + nand-ecc-strength = <15>; + nand-on-flash-bbt; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "cferom"; + reg = <0x0000000 0x0004000>; + read-only; + }; + + partition@4000 { + compatible = "brcm,wfi"; + label = "wfi"; + reg = <0x0004000 0x1c7c000>; + }; + + partition@1c80000 { + label = "flag"; + reg = <0x1c80000 0x0040000>; + read-only; + }; + + partition@1cc0000 { + label = "pcbasn"; + reg = <0x1cc0000 0x0040000>; + read-only; + }; + + partition@1d00000 { + label = "xxx"; + reg = <0x1d00000 0x0080000>; + read-only; + }; + + partition@1d80000 { + label = "language_dev"; + reg = <0x1d80000 0x0040000>; + read-only; + }; + + partition@1dc0000 { + label = "scnvram"; + reg = <0x1dc0000 0x0100000>; + read-only; + }; + }; + }; +}; + +&pinctrl { + pinctrl_leds: leds { + function = "led"; + pins = "gpio1"; + }; +}; + +&uart0 { + status = "ok"; +}; diff --git a/target/linux/bcm63xx/image/Makefile b/target/linux/bcm63xx/image/Makefile index e392d99f2c..483e711a5d 100644 --- a/target/linux/bcm63xx/image/Makefile +++ b/target/linux/bcm63xx/image/Makefile @@ -95,6 +95,31 @@ define Image/FileSystemStrip $(firstword $(subst +,$(space),$(subst root.,,$(notdir $(1))))) endef +define Build/ad1018-jffs2-cferam + mv $@ $@.kernel + + rm -rf $@-cferam + mkdir -p $@-cferam + + # CFE RAM JFFS2 partition + cp $(KDIR)/bcm63xx-cfe/$(CFE_RAM_FILE) $@-cferam/$(CFE_RAM_JFFS2_NAME) + $(call Build/cfe-jffs2,$@-cferam) + mv $@ $@.cferam + + # First block of CFE RAM 1 will be destroyed by MMAP + dd if=$@.cferam bs=$(BLOCKSIZE) count=1 > $@ + dd if=$@.cferam >> $@ + $(call Build/pad-to,896k) + + # CFE RAM 2 + dd if=$@.cferam >> $@ + + # Append kernel @ 4M + $(call Build/pad-to,4096k) + dd if=$@.kernel >> $@ + rm -f $@.kernel +endef + define Build/cfe-bin $(STAGING_DIR_HOST)/bin/imagetag -i $(IMAGE_KERNEL) -f $(IMAGE_ROOTFS) \ --output $@ --boardid $(CFE_BOARD_ID) --chipid $(CFE_CHIP_ID) \ diff --git a/target/linux/bcm63xx/image/bcm63xx_nand.mk b/target/linux/bcm63xx/image/bcm63xx_nand.mk index 5be27a3f75..012745bbac 100644 --- a/target/linux/bcm63xx/image/bcm63xx_nand.mk +++ b/target/linux/bcm63xx/image/bcm63xx_nand.mk @@ -51,3 +51,55 @@ define Device/comtrend_vr-3032u CFE_WFI_FLASH_TYPE := 3 endef TARGET_DEVICES += comtrend_vr-3032u + +define Device/comtrend_vg-8050 + $(Device/bcm63xx-nand) + DEVICE_VENDOR := Comtrend + DEVICE_MODEL := VG-8050 + CFE_CHIP_ID := 63268 + SOC := bcm63169 + CFE_RAM_FILE := comtrend,vg-8050/cferam.000 + CFE_RAM_JFFS2_NAME := cferam.000 + BLOCKSIZE := 128k + PAGESIZE := 2048 + SUBPAGESIZE := 512 + VID_HDR_OFFSET := 2048 + DEVICE_PACKAGES += $(USB2_PACKAGES) + CFE_WFI_FLASH_TYPE := 3 +endef +TARGET_DEVICES += comtrend_vg-8050 + +### Netgear ### +define Device/netgear_dgnd3700-v2 + $(Device/bcm63xx-nand) + DEVICE_VENDOR := NETGEAR + DEVICE_MODEL := DGND3700 + DEVICE_VARIANT := v2 + CFE_CHIP_ID := 6362 + CFE_RAM_FILE := netgear,dgnd3700-v2/cferam + CFE_RAM_JFFS2_NAME := cferam + CFE_RAM_JFFS2_PAD := 496k + BLOCKSIZE := 16k + PAGESIZE := 512 + DEVICE_PACKAGES += $(B43_PACKAGES) $(USB2_PACKAGES) + CFE_WFI_FLASH_TYPE := 2 +endef +TARGET_DEVICES += netgear_dgnd3700-v2 + +### Sercomm ### +define Device/sercomm_ad1018 + $(Device/bcm63xx-nand) + IMAGE/cfe.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | ad1018-jffs2-cferam | append-ubi | cfe-wfi-tag + DEVICE_VENDOR := Sercomm + DEVICE_MODEL := AD1018 + CFE_CHIP_ID := 6328 + CFE_RAM_FILE := sercomm,ad1018/cferam + CFE_RAM_JFFS2_NAME := cferam + BLOCKSIZE := 128k + PAGESIZE := 2048 + SUBPAGESIZE := 512 + VID_HDR_OFFSET := 2048 + DEVICE_PACKAGES += $(B43_PACKAGES) $(USB2_PACKAGES) + CFE_WFI_FLASH_TYPE := 3 +endef +TARGET_DEVICES += sercomm_ad1018 diff --git a/target/linux/bcm63xx/patches-5.4/120-leds-bcm6328-support-second-hw-blinking-interval.patch b/target/linux/bcm63xx/patches-5.4/120-leds-bcm6328-support-second-hw-blinking-interval.patch new file mode 100644 index 0000000000..6ed26f2741 --- /dev/null +++ b/target/linux/bcm63xx/patches-5.4/120-leds-bcm6328-support-second-hw-blinking-interval.patch @@ -0,0 +1,137 @@ +--- a/drivers/leds/leds-bcm6328.c ++++ b/drivers/leds/leds-bcm6328.c +@@ -24,12 +24,16 @@ + + #define BCM6328_LED_MAX_COUNT 24 + #define BCM6328_LED_DEF_DELAY 500 ++#define BCM6328_LED_INTERVAL_NUM 2 + #define BCM6328_LED_INTERVAL_MS 20 + + #define BCM6328_LED_INTV_MASK 0x3f +-#define BCM6328_LED_FAST_INTV_SHIFT 6 +-#define BCM6328_LED_FAST_INTV_MASK (BCM6328_LED_INTV_MASK << \ +- BCM6328_LED_FAST_INTV_SHIFT) ++#define BCM6328_LED_INTV1_SHIFT 0 ++#define BCM6328_LED_INTV1_MASK (BCM6328_LED_INTV_MASK << \ ++ BCM6328_LED_INTV1_SHIFT) ++#define BCM6328_LED_INTV2_SHIFT 6 ++#define BCM6328_LED_INTV2_MASK (BCM6328_LED_INTV_MASK << \ ++ BCM6328_LED_INTV2_SHIFT) + #define BCM6328_SERIAL_LED_EN BIT(12) + #define BCM6328_SERIAL_LED_MUX BIT(13) + #define BCM6328_SERIAL_LED_CLK_NPOL BIT(14) +@@ -45,8 +49,8 @@ + + #define BCM6328_LED_MODE_MASK 3 + #define BCM6328_LED_MODE_ON 0 +-#define BCM6328_LED_MODE_FAST 1 +-#define BCM6328_LED_MODE_BLINK 2 ++#define BCM6328_LED_MODE_INTV1 1 ++#define BCM6328_LED_MODE_INTV2 2 + #define BCM6328_LED_MODE_OFF 3 + #define BCM6328_LED_SHIFT(X) ((X) << 1) + +@@ -127,12 +131,18 @@ static void bcm6328_led_set(struct led_c + unsigned long flags; + + spin_lock_irqsave(led->lock, flags); +- *(led->blink_leds) &= ~BIT(led->pin); ++ ++ /* Remove LED from cached HW blinking intervals */ ++ led->blink_leds[0] &= ~BIT(led->pin); ++ led->blink_leds[1] &= ~BIT(led->pin); ++ ++ /* Set LED on/off */ + if ((led->active_low && value == LED_OFF) || + (!led->active_low && value != LED_OFF)) + bcm6328_led_mode(led, BCM6328_LED_MODE_ON); + else + bcm6328_led_mode(led, BCM6328_LED_MODE_OFF); ++ + spin_unlock_irqrestore(led->lock, flags); + } + +@@ -176,20 +186,59 @@ static int bcm6328_blink_set(struct led_ + } + + spin_lock_irqsave(led->lock, flags); +- if (*(led->blink_leds) == 0 || +- *(led->blink_leds) == BIT(led->pin) || +- *(led->blink_delay) == delay) { ++ /* ++ * Check if any of the two configurable HW blinking intervals is ++ * available: ++ * 1. No LEDs assigned to the HW blinking interval. ++ * 2. LEDs with the same delay assigned. ++ */ ++ if (led->blink_leds[0] == 0 || ++ led->blink_leds[0] == BIT(led->pin) || ++ led->blink_delay[0] == delay) { ++ unsigned long val; ++ ++ /* Add LED to the first HW blinking interval cache */ ++ led->blink_leds[0] |= BIT(led->pin); ++ ++ /* Remove LED from the second HW blinking interval cache */ ++ led->blink_leds[1] &= ~BIT(led->pin); ++ ++ /* Cache the LED in the first HW blinking interval delay */ ++ led->blink_delay[0] = delay; ++ ++ /* Update the delay for the first HW blinking interval */ ++ val = bcm6328_led_read(led->mem + BCM6328_REG_INIT); ++ val &= ~BCM6328_LED_INTV1_MASK; ++ val |= (delay << BCM6328_LED_INTV1_SHIFT); ++ bcm6328_led_write(led->mem + BCM6328_REG_INIT, val); ++ ++ /* Set the LED to first HW blinking interval */ ++ bcm6328_led_mode(led, BCM6328_LED_MODE_INTV1); ++ ++ rc = 0; ++ } else if (led->blink_leds[1] == 0 || ++ led->blink_leds[1] == BIT(led->pin) || ++ led->blink_delay[1] == delay) { + unsigned long val; + +- *(led->blink_leds) |= BIT(led->pin); +- *(led->blink_delay) = delay; ++ /* Remove LED from the first HW blinking interval */ ++ led->blink_leds[0] &= ~BIT(led->pin); ++ ++ /* Add LED to the second HW blinking interval */ ++ led->blink_leds[1] |= BIT(led->pin); + ++ /* Cache the LED in the first HW blinking interval delay */ ++ led->blink_delay[1] = delay; ++ ++ /* Update the delay for the second HW blinking interval */ + val = bcm6328_led_read(led->mem + BCM6328_REG_INIT); +- val &= ~BCM6328_LED_FAST_INTV_MASK; +- val |= (delay << BCM6328_LED_FAST_INTV_SHIFT); ++ val &= ~BCM6328_LED_INTV2_MASK; ++ val |= (delay << BCM6328_LED_INTV2_SHIFT); + bcm6328_led_write(led->mem + BCM6328_REG_INIT, val); + +- bcm6328_led_mode(led, BCM6328_LED_MODE_BLINK); ++ /* Set the LED to second HW blinking interval */ ++ bcm6328_led_mode(led, BCM6328_LED_MODE_INTV2); ++ + rc = 0; + } else { + dev_dbg(led_cdev->dev, +@@ -363,11 +412,13 @@ static int bcm6328_leds_probe(struct pla + if (!lock) + return -ENOMEM; + +- blink_leds = devm_kzalloc(dev, sizeof(*blink_leds), GFP_KERNEL); ++ blink_leds = devm_kcalloc(dev, BCM6328_LED_INTERVAL_NUM, ++ sizeof(*blink_leds), GFP_KERNEL); + if (!blink_leds) + return -ENOMEM; + +- blink_delay = devm_kzalloc(dev, sizeof(*blink_delay), GFP_KERNEL); ++ blink_delay = devm_kcalloc(dev, BCM6328_LED_INTERVAL_NUM, ++ sizeof(*blink_delay), GFP_KERNEL); + if (!blink_delay) + return -ENOMEM; + diff --git a/target/linux/bcm63xx/patches-5.4/150-mips-bcm63xx-bcm6328-fix-strapbus-boot-sel.patch b/target/linux/bcm63xx/patches-5.4/150-mips-bcm63xx-bcm6328-fix-strapbus-boot-sel.patch new file mode 100644 index 0000000000..17e9d7e888 --- /dev/null +++ b/target/linux/bcm63xx/patches-5.4/150-mips-bcm63xx-bcm6328-fix-strapbus-boot-sel.patch @@ -0,0 +1,13 @@ +--- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h ++++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h +@@ -1367,8 +1367,8 @@ + #define MISC_STRAPBUS_6328_REG 0x240 + #define STRAPBUS_6328_FCVO_SHIFT 7 + #define STRAPBUS_6328_FCVO_MASK (0x1f << STRAPBUS_6328_FCVO_SHIFT) +-#define STRAPBUS_6328_BOOT_SEL_SERIAL (1 << 28) +-#define STRAPBUS_6328_BOOT_SEL_NAND (0 << 28) ++#define STRAPBUS_6328_BOOT_SEL_SERIAL (1 << 18) ++#define STRAPBUS_6328_BOOT_SEL_NAND (0 << 18) + + /************************************************************************* + * _REG relative to RSET_PCIE diff --git a/target/linux/bcm63xx/patches-5.4/411-MIPS-BCM63XX-Register-SPI-flash-if-present.patch b/target/linux/bcm63xx/patches-5.4/411-MIPS-BCM63XX-Register-SPI-flash-if-present.patch index 7912c26696..0a3b34b743 100644 --- a/target/linux/bcm63xx/patches-5.4/411-MIPS-BCM63XX-Register-SPI-flash-if-present.patch +++ b/target/linux/bcm63xx/patches-5.4/411-MIPS-BCM63XX-Register-SPI-flash-if-present.patch @@ -153,4 +153,4 @@ Signed-off-by: Jonas Gorski +#define STRAPBUS_6328_HSSPI_CLK_FAST (1 << 4) #define STRAPBUS_6328_FCVO_SHIFT 7 #define STRAPBUS_6328_FCVO_MASK (0x1f << STRAPBUS_6328_FCVO_SHIFT) - #define STRAPBUS_6328_BOOT_SEL_SERIAL (1 << 28) + #define STRAPBUS_6328_BOOT_SEL_SERIAL (1 << 18) diff --git a/target/linux/bcm63xx/patches-5.4/519_board_CPVA502plus.patch b/target/linux/bcm63xx/patches-5.4/517_board_CPVA502plus.patch similarity index 100% rename from target/linux/bcm63xx/patches-5.4/519_board_CPVA502plus.patch rename to target/linux/bcm63xx/patches-5.4/517_board_CPVA502plus.patch diff --git a/target/linux/bcm63xx/patches-5.4/520-bcm63xx-add-support-for-96368MVWG-board.patch b/target/linux/bcm63xx/patches-5.4/518-bcm63xx-add-support-for-96368MVWG-board.patch similarity index 100% rename from target/linux/bcm63xx/patches-5.4/520-bcm63xx-add-support-for-96368MVWG-board.patch rename to target/linux/bcm63xx/patches-5.4/518-bcm63xx-add-support-for-96368MVWG-board.patch diff --git a/target/linux/bcm63xx/patches-5.4/521-bcm63xx-add-support-for-96368MVNgr-board.patch b/target/linux/bcm63xx/patches-5.4/519-bcm63xx-add-support-for-96368MVNgr-board.patch similarity index 100% rename from target/linux/bcm63xx/patches-5.4/521-bcm63xx-add-support-for-96368MVNgr-board.patch rename to target/linux/bcm63xx/patches-5.4/519-bcm63xx-add-support-for-96368MVNgr-board.patch diff --git a/target/linux/bcm63xx/patches-5.4/522-MIPS-BCM63XX-add-96328avng-reference-board.patch b/target/linux/bcm63xx/patches-5.4/520-MIPS-BCM63XX-add-96328avng-reference-board.patch similarity index 100% rename from target/linux/bcm63xx/patches-5.4/522-MIPS-BCM63XX-add-96328avng-reference-board.patch rename to target/linux/bcm63xx/patches-5.4/520-MIPS-BCM63XX-add-96328avng-reference-board.patch diff --git a/target/linux/bcm63xx/patches-5.4/523-MIPS-BCM63XX-add-963281TAN-reference-board.patch b/target/linux/bcm63xx/patches-5.4/521-MIPS-BCM63XX-add-963281TAN-reference-board.patch similarity index 100% rename from target/linux/bcm63xx/patches-5.4/523-MIPS-BCM63XX-add-963281TAN-reference-board.patch rename to target/linux/bcm63xx/patches-5.4/521-MIPS-BCM63XX-add-963281TAN-reference-board.patch diff --git a/target/linux/bcm63xx/patches-5.4/524-board_dsl_274xb_rev_f.patch b/target/linux/bcm63xx/patches-5.4/522-board_dsl_274xb_rev_f.patch similarity index 100% rename from target/linux/bcm63xx/patches-5.4/524-board_dsl_274xb_rev_f.patch rename to target/linux/bcm63xx/patches-5.4/522-board_dsl_274xb_rev_f.patch diff --git a/target/linux/bcm63xx/patches-5.4/525-board_96348w3.patch b/target/linux/bcm63xx/patches-5.4/523-board_96348w3.patch similarity index 100% rename from target/linux/bcm63xx/patches-5.4/525-board_96348w3.patch rename to target/linux/bcm63xx/patches-5.4/523-board_96348w3.patch diff --git a/target/linux/bcm63xx/patches-5.4/526-board_CT6373-1.patch b/target/linux/bcm63xx/patches-5.4/524-board_CT6373-1.patch similarity index 100% rename from target/linux/bcm63xx/patches-5.4/526-board_CT6373-1.patch rename to target/linux/bcm63xx/patches-5.4/524-board_CT6373-1.patch diff --git a/target/linux/bcm63xx/patches-5.4/527-board_dva-g3810bn-tl-1.patch b/target/linux/bcm63xx/patches-5.4/525-board_dva-g3810bn-tl-1.patch similarity index 100% rename from target/linux/bcm63xx/patches-5.4/527-board_dva-g3810bn-tl-1.patch rename to target/linux/bcm63xx/patches-5.4/525-board_dva-g3810bn-tl-1.patch diff --git a/target/linux/bcm63xx/patches-5.4/528-board_nb6.patch b/target/linux/bcm63xx/patches-5.4/526-board_nb6.patch similarity index 100% rename from target/linux/bcm63xx/patches-5.4/528-board_nb6.patch rename to target/linux/bcm63xx/patches-5.4/526-board_nb6.patch diff --git a/target/linux/bcm63xx/patches-5.4/529-board_fast2604.patch b/target/linux/bcm63xx/patches-5.4/527-board_fast2604.patch similarity index 100% rename from target/linux/bcm63xx/patches-5.4/529-board_fast2604.patch rename to target/linux/bcm63xx/patches-5.4/527-board_fast2604.patch diff --git a/target/linux/bcm63xx/patches-5.4/530-board_A4001N1.patch b/target/linux/bcm63xx/patches-5.4/528-board_A4001N1.patch similarity index 100% rename from target/linux/bcm63xx/patches-5.4/530-board_A4001N1.patch rename to target/linux/bcm63xx/patches-5.4/528-board_A4001N1.patch diff --git a/target/linux/bcm63xx/patches-5.4/531-board_AR-5387un.patch b/target/linux/bcm63xx/patches-5.4/529-board_AR-5387un.patch similarity index 100% rename from target/linux/bcm63xx/patches-5.4/531-board_AR-5387un.patch rename to target/linux/bcm63xx/patches-5.4/529-board_AR-5387un.patch diff --git a/target/linux/bcm63xx/patches-5.4/532-board_AR-5381u.patch b/target/linux/bcm63xx/patches-5.4/530-board_AR-5381u.patch similarity index 100% rename from target/linux/bcm63xx/patches-5.4/532-board_AR-5381u.patch rename to target/linux/bcm63xx/patches-5.4/530-board_AR-5381u.patch diff --git a/target/linux/bcm63xx/patches-5.4/533-board_rta770bw.patch b/target/linux/bcm63xx/patches-5.4/531-board_rta770bw.patch similarity index 100% rename from target/linux/bcm63xx/patches-5.4/533-board_rta770bw.patch rename to target/linux/bcm63xx/patches-5.4/531-board_rta770bw.patch diff --git a/target/linux/bcm63xx/patches-5.4/534-board_hw556.patch b/target/linux/bcm63xx/patches-5.4/532-board_hw556.patch similarity index 100% rename from target/linux/bcm63xx/patches-5.4/534-board_hw556.patch rename to target/linux/bcm63xx/patches-5.4/532-board_hw556.patch diff --git a/target/linux/bcm63xx/patches-5.4/535-board_rta770w.patch b/target/linux/bcm63xx/patches-5.4/533-board_rta770w.patch similarity index 100% rename from target/linux/bcm63xx/patches-5.4/535-board_rta770w.patch rename to target/linux/bcm63xx/patches-5.4/533-board_rta770w.patch diff --git a/target/linux/bcm63xx/patches-5.4/536-board_fast2704.patch b/target/linux/bcm63xx/patches-5.4/534-board_fast2704.patch similarity index 100% rename from target/linux/bcm63xx/patches-5.4/536-board_fast2704.patch rename to target/linux/bcm63xx/patches-5.4/534-board_fast2704.patch diff --git a/target/linux/bcm63xx/patches-5.4/537-board_fast2504n.patch b/target/linux/bcm63xx/patches-5.4/535-board_fast2504n.patch similarity index 100% rename from target/linux/bcm63xx/patches-5.4/537-board_fast2504n.patch rename to target/linux/bcm63xx/patches-5.4/535-board_fast2504n.patch diff --git a/target/linux/bcm63xx/patches-5.4/555-board_96318ref.patch b/target/linux/bcm63xx/patches-5.4/536-board_96318ref.patch similarity index 100% rename from target/linux/bcm63xx/patches-5.4/555-board_96318ref.patch rename to target/linux/bcm63xx/patches-5.4/536-board_96318ref.patch diff --git a/target/linux/bcm63xx/patches-5.4/556-board_96318ref_p300.patch b/target/linux/bcm63xx/patches-5.4/537-board_96318ref_p300.patch similarity index 100% rename from target/linux/bcm63xx/patches-5.4/556-board_96318ref_p300.patch rename to target/linux/bcm63xx/patches-5.4/537-board_96318ref_p300.patch diff --git a/target/linux/bcm63xx/patches-5.4/557-board_bcm963269bhr.patch b/target/linux/bcm63xx/patches-5.4/538-board_bcm963269bhr.patch similarity index 100% rename from target/linux/bcm63xx/patches-5.4/557-board_bcm963269bhr.patch rename to target/linux/bcm63xx/patches-5.4/538-board_bcm963269bhr.patch diff --git a/target/linux/bcm63xx/patches-5.4/558-board_AR1004G.patch b/target/linux/bcm63xx/patches-5.4/539-board_AR1004G.patch similarity index 100% rename from target/linux/bcm63xx/patches-5.4/558-board_AR1004G.patch rename to target/linux/bcm63xx/patches-5.4/539-board_AR1004G.patch diff --git a/target/linux/bcm63xx/patches-5.4/559-board_vw6339gu.patch b/target/linux/bcm63xx/patches-5.4/540-board_vw6339gu.patch similarity index 100% rename from target/linux/bcm63xx/patches-5.4/559-board_vw6339gu.patch rename to target/linux/bcm63xx/patches-5.4/540-board_vw6339gu.patch diff --git a/target/linux/bcm63xx/patches-5.4/560-board_963268gu_p300.patch b/target/linux/bcm63xx/patches-5.4/541-board_963268gu_p300.patch similarity index 100% rename from target/linux/bcm63xx/patches-5.4/560-board_963268gu_p300.patch rename to target/linux/bcm63xx/patches-5.4/541-board_963268gu_p300.patch diff --git a/target/linux/bcm63xx/patches-5.4/561-board_WAP-5813n.patch b/target/linux/bcm63xx/patches-5.4/542-board_WAP-5813n.patch similarity index 100% rename from target/linux/bcm63xx/patches-5.4/561-board_WAP-5813n.patch rename to target/linux/bcm63xx/patches-5.4/542-board_WAP-5813n.patch diff --git a/target/linux/bcm63xx/patches-5.4/562-board_VR-3025u.patch b/target/linux/bcm63xx/patches-5.4/543-board_VR-3025u.patch similarity index 100% rename from target/linux/bcm63xx/patches-5.4/562-board_VR-3025u.patch rename to target/linux/bcm63xx/patches-5.4/543-board_VR-3025u.patch diff --git a/target/linux/bcm63xx/patches-5.4/563-board_VR-3025un.patch b/target/linux/bcm63xx/patches-5.4/544-board_VR-3025un.patch similarity index 100% rename from target/linux/bcm63xx/patches-5.4/563-board_VR-3025un.patch rename to target/linux/bcm63xx/patches-5.4/544-board_VR-3025un.patch diff --git a/target/linux/bcm63xx/patches-5.4/564-board_P870HW-51a_v2.patch b/target/linux/bcm63xx/patches-5.4/545-board_P870HW-51a_v2.patch similarity index 100% rename from target/linux/bcm63xx/patches-5.4/564-board_P870HW-51a_v2.patch rename to target/linux/bcm63xx/patches-5.4/545-board_P870HW-51a_v2.patch diff --git a/target/linux/bcm63xx/patches-5.4/565-board_hw520.patch b/target/linux/bcm63xx/patches-5.4/546-board_hw520.patch similarity index 100% rename from target/linux/bcm63xx/patches-5.4/565-board_hw520.patch rename to target/linux/bcm63xx/patches-5.4/546-board_hw520.patch diff --git a/target/linux/bcm63xx/patches-5.4/566-board_A4001N.patch b/target/linux/bcm63xx/patches-5.4/547-board_A4001N.patch similarity index 100% rename from target/linux/bcm63xx/patches-5.4/566-board_A4001N.patch rename to target/linux/bcm63xx/patches-5.4/547-board_A4001N.patch diff --git a/target/linux/bcm63xx/patches-5.4/567-board_dsl-2751b_e1.patch b/target/linux/bcm63xx/patches-5.4/548-board_dsl-2751b_e1.patch similarity index 100% rename from target/linux/bcm63xx/patches-5.4/567-board_dsl-2751b_e1.patch rename to target/linux/bcm63xx/patches-5.4/548-board_dsl-2751b_e1.patch diff --git a/target/linux/bcm63xx/patches-5.4/568-board_DGND3700v1_3800B.patch b/target/linux/bcm63xx/patches-5.4/549-board_DGND3700v1_3800B.patch similarity index 100% rename from target/linux/bcm63xx/patches-5.4/568-board_DGND3700v1_3800B.patch rename to target/linux/bcm63xx/patches-5.4/549-board_DGND3700v1_3800B.patch diff --git a/target/linux/bcm63xx/patches-5.4/569-board_homehub2a.patch b/target/linux/bcm63xx/patches-5.4/550-board_homehub2a.patch similarity index 100% rename from target/linux/bcm63xx/patches-5.4/569-board_homehub2a.patch rename to target/linux/bcm63xx/patches-5.4/550-board_homehub2a.patch diff --git a/target/linux/bcm63xx/patches-5.4/570-board_HG655b.patch b/target/linux/bcm63xx/patches-5.4/551-board_HG655b.patch similarity index 100% rename from target/linux/bcm63xx/patches-5.4/570-board_HG655b.patch rename to target/linux/bcm63xx/patches-5.4/551-board_HG655b.patch diff --git a/target/linux/bcm63xx/patches-5.4/571-board_fast2704n.patch b/target/linux/bcm63xx/patches-5.4/552-board_fast2704n.patch similarity index 100% rename from target/linux/bcm63xx/patches-5.4/571-board_fast2704n.patch rename to target/linux/bcm63xx/patches-5.4/552-board_fast2704n.patch diff --git a/target/linux/bcm63xx/patches-5.4/572-board_VR-3026e.patch b/target/linux/bcm63xx/patches-5.4/553-board_VR-3026e.patch similarity index 100% rename from target/linux/bcm63xx/patches-5.4/572-board_VR-3026e.patch rename to target/linux/bcm63xx/patches-5.4/553-board_VR-3026e.patch diff --git a/target/linux/bcm63xx/patches-5.4/573-board_R5010UNv2.patch b/target/linux/bcm63xx/patches-5.4/554-board_R5010UNv2.patch similarity index 100% rename from target/linux/bcm63xx/patches-5.4/573-board_R5010UNv2.patch rename to target/linux/bcm63xx/patches-5.4/554-board_R5010UNv2.patch diff --git a/target/linux/bcm63xx/patches-5.4/574-board_HG622.patch b/target/linux/bcm63xx/patches-5.4/555-board_HG622.patch similarity index 100% rename from target/linux/bcm63xx/patches-5.4/574-board_HG622.patch rename to target/linux/bcm63xx/patches-5.4/555-board_HG622.patch diff --git a/target/linux/bcm63xx/patches-5.4/575-board_EVG2000.patch b/target/linux/bcm63xx/patches-5.4/556-board_EVG2000.patch similarity index 100% rename from target/linux/bcm63xx/patches-5.4/575-board_EVG2000.patch rename to target/linux/bcm63xx/patches-5.4/556-board_EVG2000.patch diff --git a/target/linux/bcm63xx/patches-5.4/576-board_AV4202N.patch b/target/linux/bcm63xx/patches-5.4/557-board_AV4202N.patch similarity index 100% rename from target/linux/bcm63xx/patches-5.4/576-board_AV4202N.patch rename to target/linux/bcm63xx/patches-5.4/557-board_AV4202N.patch diff --git a/target/linux/bcm63xx/patches-5.4/577-board_VH4032N.patch b/target/linux/bcm63xx/patches-5.4/558-board_VH4032N.patch similarity index 100% rename from target/linux/bcm63xx/patches-5.4/577-board_VH4032N.patch rename to target/linux/bcm63xx/patches-5.4/558-board_VH4032N.patch diff --git a/target/linux/bcm63xx/patches-5.4/578-board_R1000H.patch b/target/linux/bcm63xx/patches-5.4/559-board_R1000H.patch similarity index 100% rename from target/linux/bcm63xx/patches-5.4/578-board_R1000H.patch rename to target/linux/bcm63xx/patches-5.4/559-board_R1000H.patch diff --git a/target/linux/bcm63xx/patches-5.4/579-board_AR-5315u.patch b/target/linux/bcm63xx/patches-5.4/560-board_AR-5315u.patch similarity index 100% rename from target/linux/bcm63xx/patches-5.4/579-board_AR-5315u.patch rename to target/linux/bcm63xx/patches-5.4/560-board_AR-5315u.patch diff --git a/target/linux/bcm63xx/patches-5.4/580-board_AD1018.patch b/target/linux/bcm63xx/patches-5.4/561-board_AD1018.patch similarity index 95% rename from target/linux/bcm63xx/patches-5.4/580-board_AD1018.patch rename to target/linux/bcm63xx/patches-5.4/561-board_AD1018.patch index a48ecf961c..f0c450de38 100644 --- a/target/linux/bcm63xx/patches-5.4/580-board_AD1018.patch +++ b/target/linux/bcm63xx/patches-5.4/561-board_AD1018.patch @@ -82,10 +82,11 @@ &board_AR5381u, &board_AR5387un, &board_963281TAN, -@@ -2719,6 +2787,7 @@ static struct of_device_id const bcm963x +@@ -2719,6 +2787,8 @@ static struct of_device_id const bcm963x { .compatible = "d-link,dsl-274xb-f1", .data = &board_dsl_274xb_f1, }, { .compatible = "nucom,r5010un-v2", .data = &board_R5010UNV2, }, { .compatible = "sagem,fast-2704-v2", .data = &board_FAST2704V2, }, ++ { .compatible = "sercomm,ad1018", .data = &board_AD1018, }, + { .compatible = "sercomm,ad1018-nor", .data = &board_AD1018, }, #endif #ifdef CONFIG_BCM63XX_CPU_6338 diff --git a/target/linux/bcm63xx/patches-5.4/598-board_sr102.patch b/target/linux/bcm63xx/patches-5.4/562-board_sr102.patch similarity index 95% rename from target/linux/bcm63xx/patches-5.4/598-board_sr102.patch rename to target/linux/bcm63xx/patches-5.4/562-board_sr102.patch index c8db6c1366..d6af1e56b6 100644 --- a/target/linux/bcm63xx/patches-5.4/598-board_sr102.patch +++ b/target/linux/bcm63xx/patches-5.4/562-board_sr102.patch @@ -58,7 +58,7 @@ #endif }; -@@ -2874,6 +2918,7 @@ static struct of_device_id const bcm963x +@@ -2875,6 +2919,7 @@ static struct of_device_id const bcm963x { .compatible = "brcm,bcm963268bu-p300", .data = &board_963268bu_p300, }, { .compatible = "brcm,bcm963269bhr", .data = &board_963269bhr, }, { .compatible = "inteno,vg50", .data = &board_vw6339gu, }, diff --git a/target/linux/bcm63xx/patches-5.4/599-board-VR-3032u.patch b/target/linux/bcm63xx/patches-5.4/563-board-VR-3032u.patch similarity index 95% rename from target/linux/bcm63xx/patches-5.4/599-board-VR-3032u.patch rename to target/linux/bcm63xx/patches-5.4/563-board-VR-3032u.patch index fa63150a1d..a7e297d70e 100644 --- a/target/linux/bcm63xx/patches-5.4/599-board-VR-3032u.patch +++ b/target/linux/bcm63xx/patches-5.4/563-board-VR-3032u.patch @@ -53,7 +53,7 @@ &board_vw6339gu, &board_BSKYB_63168, #endif -@@ -2917,6 +2956,7 @@ static struct of_device_id const bcm963x +@@ -2918,6 +2957,7 @@ static struct of_device_id const bcm963x #ifdef CONFIG_BCM63XX_CPU_63268 { .compatible = "brcm,bcm963268bu-p300", .data = &board_963268bu_p300, }, { .compatible = "brcm,bcm963269bhr", .data = &board_963269bhr, }, diff --git a/target/linux/bcm63xx/patches-5.4/564-board-DGND3700v2.patch b/target/linux/bcm63xx/patches-5.4/564-board-DGND3700v2.patch new file mode 100644 index 0000000000..f17c7a843b --- /dev/null +++ b/target/linux/bcm63xx/patches-5.4/564-board-DGND3700v2.patch @@ -0,0 +1,50 @@ +--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c ++++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c +@@ -1820,6 +1820,31 @@ static struct board_info __initdata boar + }, + }; + ++static struct board_info __initdata board_dgnd3700v2 = { ++ .name = "96362ADVN2xh", ++ .expected_cpu_id = 0x6362, ++ ++ .has_pci = 1, ++ ++ .has_ohci0 = 1, ++ .has_ehci0 = 1, ++ .num_usbh_ports = 2, ++ ++ .has_enetsw = 1, ++ .enetsw = { ++ .used_ports = { ++ [4] = { ++ .used = 1, ++ .phy_id = 0xff, ++ .bypass_link = 1, ++ .force_speed = 1000, ++ .force_duplex_full = 1, ++ .name = "RGMII", ++ }, ++ }, ++ }, ++}; ++ + static struct board_info __initdata board_fast2504n = { + .name = "F@ST2504n", + .expected_cpu_id = 0x6362, +@@ -2820,6 +2845,7 @@ static const struct board_info __initcon + + #ifdef CONFIG_BCM63XX_CPU_6362 + &board_nb6, ++ &board_dgnd3700v2, + &board_fast2504n, + #endif + +@@ -2935,6 +2961,7 @@ static struct of_device_id const bcm963x + { .compatible = "bt,home-hub-2-a", .data = &board_homehub2a, }, + #endif + #ifdef CONFIG_BCM63XX_CPU_6362 ++ { .compatible = "netgear,dgnd3700-v2", .data = &board_dgnd3700v2, }, + { .compatible = "sagem,fast-2504n", .data = &board_fast2504n, }, + { .compatible = "sfr,neufbox-6-sercomm-r0", .data = &board_nb6, }, + #endif diff --git a/target/linux/bcm63xx/patches-5.4/565-board-VG-8050.patch b/target/linux/bcm63xx/patches-5.4/565-board-VG-8050.patch new file mode 100644 index 0000000000..ceca653ac6 --- /dev/null +++ b/target/linux/bcm63xx/patches-5.4/565-board-VG-8050.patch @@ -0,0 +1,48 @@ +--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c ++++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c +@@ -2635,6 +2635,29 @@ static struct board_info __initdata boar + }, + }; + ++static struct board_info __initdata board_VG8050 = { ++ .name = "963169P-1861N5", ++ .expected_cpu_id = 0x63268, ++ ++ .has_ehci0 = 1, ++ .has_ohci0 = 1, ++ .num_usbh_ports = 2, ++ ++ .has_enetsw = 1, ++ .enetsw = { ++ .used_ports = { ++ [6] = { ++ .used = 1, ++ .phy_id = 0xff, ++ .bypass_link = 1, ++ .force_speed = 1000, ++ .force_duplex_full = 1, ++ .name = "RGMII", ++ }, ++ }, ++ }, ++}; ++ + static struct board_info __initdata board_VR3032u = { + .name = "963168M-1841N1", + .expected_cpu_id = 0x63268, +@@ -2868,6 +2891,7 @@ static const struct board_info __initcon + #ifdef CONFIG_BCM63XX_CPU_63268 + &board_963268bu_p300, + &board_963269bhr, ++ &board_VG8050, + &board_VR3032u, + &board_vw6339gu, + &board_BSKYB_63168, +@@ -2984,6 +3008,7 @@ static struct of_device_id const bcm963x + #ifdef CONFIG_BCM63XX_CPU_63268 + { .compatible = "brcm,bcm963268bu-p300", .data = &board_963268bu_p300, }, + { .compatible = "brcm,bcm963269bhr", .data = &board_963269bhr, }, ++ { .compatible = "comtrend,vg-8050", .data = &board_VG8050, }, + { .compatible = "comtrend,vr-3032u", .data = &board_VR3032u, }, + { .compatible = "inteno,vg50", .data = &board_vw6339gu, }, + { .compatible = "sky,sr102", .data = &board_BSKYB_63168, }, diff --git a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_bcm_wfi.c b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_bcm_wfi.c index 9fc3c8ac50..0298de7a2f 100644 --- a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_bcm_wfi.c +++ b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_bcm_wfi.c @@ -24,7 +24,7 @@ #include "mtdsplit.h" -#define BCM_WFI_PARTS 4 +#define BCM_WFI_PARTS 3 #define CFERAM_NAME "cferam" #define CFERAM_NAME_LEN (sizeof(CFERAM_NAME) - 1) @@ -126,7 +126,10 @@ static int mtdsplit_parse_bcm_wfi(struct mtd_info *master, struct mtd_part_parser_data *data) { struct mtd_partition *parts; + struct device_node *mtd_node; loff_t cfe_off, kernel_off, rootfs_off; + bool cfe_part = true; + unsigned int num_parts = BCM_WFI_PARTS, cur_part = 0; uint8_t *buf; int ret; @@ -134,15 +137,29 @@ static int mtdsplit_parse_bcm_wfi(struct mtd_info *master, if (!buf) return -ENOMEM; - cfe_off = 0; - ret = jffs2_find_file(master, buf, CFERAM_NAME, CFERAM_NAME_LEN, - &cfe_off); - if (ret) { - kfree(buf); - return ret; + mtd_node = mtd_get_of_node(master); + if (!mtd_node) + return -EINVAL; + + if (of_device_is_compatible(mtd_node, "brcm,wfi-sercomm")) + cfe_part = false; + + if (cfe_part) { + num_parts++; + cfe_off = 0; + + ret = jffs2_find_file(master, buf, CFERAM_NAME, + CFERAM_NAME_LEN, &cfe_off); + if (ret) { + kfree(buf); + return ret; + } + + kernel_off = cfe_off + master->erasesize; + } else { + kernel_off = 0; } - kernel_off = cfe_off + master->erasesize; ret = jffs2_find_file(master, buf, KERNEL_NAME, KERNEL_NAME_LEN, &kernel_off); kfree(buf); @@ -154,34 +171,41 @@ static int mtdsplit_parse_bcm_wfi(struct mtd_info *master, if (ret) return ret; - parts = kzalloc(BCM_WFI_PARTS * sizeof(*parts), GFP_KERNEL); + parts = kzalloc(num_parts * sizeof(*parts), GFP_KERNEL); if (!parts) return -ENOMEM; - parts[0].name = "cferam"; - parts[0].mask_flags = MTD_WRITEABLE; - parts[0].offset = 0; - parts[0].size = kernel_off; + if (cfe_part) { + parts[cur_part].name = "cferam"; + parts[cur_part].mask_flags = MTD_WRITEABLE; + parts[cur_part].offset = 0; + parts[cur_part].size = kernel_off; + cur_part++; + } - parts[1].name = "firmware"; - parts[1].offset = kernel_off; - parts[1].size = master->size - kernel_off; + parts[cur_part].name = "firmware"; + parts[cur_part].offset = kernel_off; + parts[cur_part].size = master->size - kernel_off; + cur_part++; - parts[2].name = KERNEL_PART_NAME; - parts[2].offset = kernel_off; - parts[2].size = rootfs_off - kernel_off; + parts[cur_part].name = KERNEL_PART_NAME; + parts[cur_part].offset = kernel_off; + parts[cur_part].size = rootfs_off - kernel_off; + cur_part++; - parts[3].name = UBI_PART_NAME; - parts[3].offset = rootfs_off; - parts[3].size = master->size - rootfs_off; + parts[cur_part].name = UBI_PART_NAME; + parts[cur_part].offset = rootfs_off; + parts[cur_part].size = master->size - rootfs_off; + cur_part++; *pparts = parts; - return BCM_WFI_PARTS; + return num_parts; } static const struct of_device_id mtdsplit_fit_of_match_table[] = { { .compatible = "brcm,wfi" }, + { .compatible = "brcm,wfi-sercomm" }, { }, }; diff --git a/target/linux/ramips/files/drivers/net/ethernet/ralink/mtk_eth_soc.c b/target/linux/ramips/files/drivers/net/ethernet/ralink/mtk_eth_soc.c index 7191a7a382..358a8fc16d 100644 --- a/target/linux/ramips/files/drivers/net/ethernet/ralink/mtk_eth_soc.c +++ b/target/linux/ramips/files/drivers/net/ethernet/ralink/mtk_eth_soc.c @@ -1401,7 +1401,7 @@ static int __init fe_init(struct net_device *dev) fe_reset_phy(priv); mac_addr = of_get_mac_address(priv->dev->of_node); - if (mac_addr) + if (!IS_ERR_OR_NULL(mac_addr)) ether_addr_copy(dev->dev_addr, mac_addr); /* If the mac address is invalid, use random mac address */ diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index 7dbc69167c..80cd1899f5 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -380,8 +380,8 @@ define Device/iodata_wn-ax1167gr2 $(Device/iodata_nand) UIMAGE_MAGIC := 0x434f4d42 DEVICE_MODEL := WN-AX1167GR2 - KERNEL_INITRAMFS := $(KERNEL_DTB) | custom-initramfs-uimage 3.10(XBC.1)b10 | \ - iodata-mstc-header + KERNEL_INITRAMFS := $(KERNEL_DTB) | loader-kernel | lzma | \ + custom-initramfs-uimage 3.10(XBC.1)b10 | iodata-mstc-header DEVICE_PACKAGES := kmod-mt7615e wpad-openssl endef TARGET_DEVICES += iodata_wn-ax1167gr2 @@ -390,8 +390,8 @@ define Device/iodata_wn-ax2033gr $(Device/iodata_nand) UIMAGE_MAGIC := 0x434f4d42 DEVICE_MODEL := WN-AX2033GR - KERNEL_INITRAMFS := $(KERNEL_DTB) | custom-initramfs-uimage 3.10(VST.1)C10 | \ - iodata-mstc-header + KERNEL_INITRAMFS := $(KERNEL_DTB) | loader-kernel | lzma | \ + custom-initramfs-uimage 3.10(VST.1)C10 | iodata-mstc-header DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e wpad-openssl endef TARGET_DEVICES += iodata_wn-ax2033gr @@ -400,8 +400,8 @@ define Device/iodata_wn-dx1167r $(Device/iodata_nand) UIMAGE_MAGIC := 0x434f4d43 DEVICE_MODEL := WN-DX1167R - KERNEL_INITRAMFS := $(KERNEL_DTB) | custom-initramfs-uimage 3.10(XIK.1)b10 | \ - iodata-mstc-header + KERNEL_INITRAMFS := $(KERNEL_DTB) | loader-kernel | lzma | \ + custom-initramfs-uimage 3.10(XIK.1)b10 | iodata-mstc-header DEVICE_PACKAGES := kmod-mt7615e wpad-openssl endef TARGET_DEVICES += iodata_wn-dx1167r 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 b780d48179..d024674c10 100755 --- a/target/linux/ramips/mt7620/base-files/etc/board.d/02_network +++ b/target/linux/ramips/mt7620/base-files/etc/board.d/02_network @@ -16,11 +16,15 @@ ramips_setup_interfaces() dlink,dwr-116-a1|\ dlink,dwr-921-c1|\ dlink,dwr-922-e2|\ + dovado,tiny-ac|\ ohyeah,oy-0001|\ phicomm,psg1208|\ phicomm,psg1218a|\ planex,db-wrt01|\ planex,mzk-750dhp|\ + ralink,mt7620a-evb|\ + ralink,mt7620a-mt7610e-evb|\ + ralink,mt7620a-v22sg-evb|\ sanlinking,d240|\ youku,yk1|\ zbtlink,zbt-ape522ii|\ @@ -71,18 +75,17 @@ ramips_setup_interfaces() "1:lan" "2:lan" "3:lan" "4:lan" "6t@eth0" ;; asus,rt-ac51u|\ - asus,rt-ac54u) - ucidef_add_switch "switch0" \ - "0:wan" "1:lan" "2:lan" "3:lan" "4:lan" "6t@eth0" - ;; + asus,rt-ac54u|\ asus,rt-n14u|\ bdcom,wap2100-sk|\ + edimax,ew-7478apc|\ glinet,gl-mt300a|\ glinet,gl-mt300n|\ glinet,gl-mt750|\ hiwifi,hc5661|\ wrtnode,wrtnode|\ - zbtlink,zbt-wa05) + zbtlink,zbt-wa05|\ + zyxel,keenetic-omni-ii) ucidef_add_switch "switch0" \ "1:lan" "2:lan" "3:lan" "4:lan" "0:wan" "6@eth0" ;; @@ -213,17 +216,10 @@ ramips_setup_interfaces() ucidef_add_switch "switch0" \ "0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "4:wan:5" "6@eth0" ;; - zyxel,keenetic-omni-ii) - ucidef_add_switch "switch0" \ - "0:wan" "1:lan" "2:lan" "3:lan" "4:lan" "6@eth0" - ;; zyxel,keenetic-viva) ucidef_add_switch "switch1" \ "0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "7t@eth0" ;; - *) - ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2" - ;; esac } diff --git a/target/linux/ramips/mt76x8/base-files/etc/board.d/02_network b/target/linux/ramips/mt76x8/base-files/etc/board.d/02_network index a6543fd38f..d758fe5543 100755 --- a/target/linux/ramips/mt76x8/base-files/etc/board.d/02_network +++ b/target/linux/ramips/mt76x8/base-files/etc/board.d/02_network @@ -122,9 +122,6 @@ ramips_setup_interfaces() ucidef_add_switch "switch0" \ "0:lan:2" "1:lan:1" "4:wan" "6@eth0" ;; - *) - ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2" - ;; esac } diff --git a/target/linux/ramips/rt288x/base-files/etc/board.d/02_network b/target/linux/ramips/rt288x/base-files/etc/board.d/02_network index 0cc0e0b28b..134ac879cd 100755 --- a/target/linux/ramips/rt288x/base-files/etc/board.d/02_network +++ b/target/linux/ramips/rt288x/base-files/etc/board.d/02_network @@ -28,9 +28,6 @@ ramips_setup_interfaces() dlink,dap-1522-a1) ucidef_set_interface_lan "eth0" ;; - *) - ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2" - ;; esac } diff --git a/target/linux/ramips/rt305x/base-files/etc/board.d/02_network b/target/linux/ramips/rt305x/base-files/etc/board.d/02_network index 5f18aa98f5..f34ade8f68 100755 --- a/target/linux/ramips/rt305x/base-files/etc/board.d/02_network +++ b/target/linux/ramips/rt305x/base-files/etc/board.d/02_network @@ -4,47 +4,22 @@ . /lib/functions/uci-defaults.sh . /lib/functions/system.sh -ramips_setup_rt3x5x_vlans() -{ - if [ ! -x /sbin/swconfig ]; then - # legacy default - ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2" - return - fi - local wanports="" - local lanports="" - for port in 5 4 3 2 1 0; do - if [ "$(swconfig dev rt305x port $port get disable)" = "1" ]; then - continue - fi - if [ "$(swconfig dev rt305x port $port get lan)" = "0" ]; then - wanports="$port:wan $wanports" - else - lanports="$port:lan $lanports" - fi - done - ucidef_add_switch "rt305x" $lanports $wanports "6t@eth0" -} - ramips_setup_interfaces() { local board="$1" case $board in - accton,wr6202|\ - alfa-network,w502u|\ - netcore,nw718|\ - petatel,psr-680w|\ - skyline,sl-r7205|\ - upvel,ur-336un) - ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2" - ;; + 7links,px-4885-4m|\ + 7links,px-4885-8m|\ allnet,all0256n-4m|\ allnet,all0256n-8m|\ allnet,all5002|\ allnet,all5003|\ + belkin,f7c027|\ dlink,dcs-930l-b1|\ dlink,dcs-930|\ + edimax,3g-6200nl|\ + hame,mpr-a1|\ hame,mpr-a2|\ hauppauge,broadway|\ hootoo,ht-tm02|\ @@ -54,6 +29,7 @@ ramips_setup_interfaces() tenda,3g150b|\ tenda,3g300m|\ tenda,w150m|\ + trendnet,tew-714tru|\ unbranded,a5-v11|\ wansview,ncs601w|\ zorlik,zl5900v2) @@ -61,51 +37,102 @@ ramips_setup_interfaces() ucidef_add_switch_attr "switch0" "enable" "false" ucidef_set_interface_lan "eth0" ;; + 8devices,carambola) + ucidef_add_switch "switch0" \ + "0:lan" "1:lan" "6@eth0" + ;; + accton,wr6202|\ + alfa-network,w502u|\ + argus,atp-52b|\ + asiarf,awm002-evb-4m|\ + asiarf,awm002-evb-8m|\ + asus,rt-n10-plus|\ + asus,wl-330n|\ + asus,wl-330n3g|\ + aztech,hw550-3g|\ + engenius,esr-9753|\ + jcg,jhr-n805r|\ + jcg,jhr-n825r|\ + jcg,jhr-n926r|\ + petatel,psr-680w|\ + planex,mzk-wdpr|\ + skyline,sl-r7205|\ + teltonika,rut5xx|\ + tenda,w306r-v2|\ + unbranded,xdx-rn502j|\ + upvel,ur-326n4g) + ucidef_add_switch "switch0" \ + "1:lan" "2:lan" "3:lan" "4:lan" "0:wan" "6@eth0" + ;; + airlive,air3gii|\ + asus,rt-g32-b1|\ + asus,rt-n13u|\ + aximcom,mr-102n|\ + buffalo,whr-g300n|\ + dlink,dap-1350|\ + dlink,dir-300-b1|\ + dlink,dir-300-b7|\ + dlink,dir-320-b1|\ + dlink,dir-600-b1|\ + dlink,dir-610-a1|\ + dlink,dir-615-d|\ + dlink,dir-620-a1|\ + dlink,dir-620-d1|\ + dlink,dwr-512-b|\ + easyacc,wizard-8800|\ + edimax,3g-6200n|\ + fon,fonera-20n|\ + hilink,hlk-rm04|\ + mofinetwork,mofi3500-3gn|\ + netcore,nw718|\ + nexaira,bc2|\ + nixcore,x1-16m|\ + nixcore,x1-8m|\ + olimex,rt5350f-olinuxino|\ + olimex,rt5350f-olinuxino-evb|\ + omnima,miniembplug|\ + omnima,miniembwifi|\ + planex,mzk-w300nh2|\ + poray,ip2202|\ + poray,m3|\ + poray,m4-4m|\ + poray,m4-8m|\ + poray,x5|\ + poray,x8|\ + prolink,pwh2004|\ + ralink,v22rw-2x2|\ + unbranded,wr512-3gn-4m|\ + unbranded,wr512-3gn-8m|\ + upvel,ur-336un|\ + zyxel,keenetic|\ + zyxel,nbg-419n|\ + zyxel,nbg-419n-v2) + ucidef_add_switch "switch0" \ + "0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "6@eth0" + ;; alphanetworks,asl26555-8m|\ alphanetworks,asl26555-16m) ucidef_add_switch "switch0" \ "1:lan" "2:lan" "3:lan" "4:lan" "6t@eth0" ;; - argus,atp-52b|\ - asiarf,awm002-evb-4m|\ - asiarf,awm002-evb-8m|\ - jcg,jhr-n805r|\ - jcg,jhr-n825r|\ - jcg,jhr-n926r|\ - planex,mzk-wdpr|\ - upvel,ur-326n4g) + arcwireless,freestation5) + # FIXME: Which is the actual wan port? ucidef_add_switch "switch0" \ - "1:lan" "2:lan" "3:lan" "4:lan" "0:wan" "6@eth0" + "0:lan" "1:wan" "2:wan" "3:wan" "4:wan" "6@eth0" ;; asiarf,awapn2403) ucidef_add_switch "switch0" \ "0:lan" "1:wan" "6@eth0" ;; - asus,wl-330n|\ - easyacc,wizard-8800) - ucidef_set_interface_lan "eth0.1" + aximcom,mr-102n|\ + trendnet,tew-638apb-v2) + ucidef_add_switch "switch0" \ + "4:lan" "6@eth0" ;; - aximcom,mr-102n) - ucidef_set_interface_lan "eth0.2" - ;; - belkin,f5d8235-v2|\ - trendnet,tew-714tru) + belkin,f5d8235-v2) ucidef_add_switch "switch0" \ "1:lan" "2:lan" "3:lan" "4:lan" "0:wan" "5@eth0" ;; - buffalo,whr-g300n|\ - dlink,dir-300-b7|\ - dlink,dir-320-b1|\ - dlink,dir-610-a1|\ - edimax,3g-6200n|\ - hilink,hlk-rm04|\ - nixcore,x1-16m|\ - nixcore,x1-8m|\ - planex,mzk-w300nh2|\ - zyxel,keenetic) - ucidef_add_switch "switch0" \ - "0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "6@eth0" - ;; dlink,dir-615-h1) ucidef_add_switch "switch0" \ "0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "4:wan:5" "6@eth0" @@ -133,10 +160,6 @@ ramips_setup_interfaces() ucidef_add_switch "switch0" \ "0:lan" "6t@eth0" ;; - trendnet,tew-638apb-v2) - ucidef_add_switch "switch0" \ - "4:lan" "6@eth0" - ;; wiznet,wizfi630a) ucidef_add_switch "switch0" \ "0:lan" "1:lan" "2:wan" "6@eth0" @@ -145,14 +168,6 @@ ramips_setup_interfaces() ucidef_add_switch "switch0" \ "0:lan:3" "1:lan:2" "2:lan:1" "3:lan:0" "4:wan" "6@eth0" ;; - *) - RT3X5X=$(grep -E "(RT3.5|RT5350)" /proc/cpuinfo) - if [ -n "${RT3X5X}" ]; then - ramips_setup_rt3x5x_vlans - else - ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2" - fi - ;; esac } @@ -202,8 +217,6 @@ ramips_setup_macs() nexx,wt1520-8m|\ nixcore,x1-16m|\ nixcore,x1-8m|\ - olimex,rt5350f-olinuxino|\ - olimex,rt5350f-olinuxino-evb|\ omnima,miniembplug|\ planex,mzk-w300nh2|\ sitecom,wl-351|\ @@ -226,6 +239,8 @@ ramips_setup_macs() huawei,d105|\ hilink,hlk-rm04|\ nexaira,bc2|\ + olimex,rt5350f-olinuxino|\ + olimex,rt5350f-olinuxino-evb|\ petatel,psr-680w|\ skyline,sl-r7205) lan_mac=$(macaddr_setbit_la "$(cat /sys/class/net/eth0/address)") diff --git a/target/linux/ramips/rt3883/base-files/etc/board.d/02_network b/target/linux/ramips/rt3883/base-files/etc/board.d/02_network index 873c72cea3..7b73f93944 100755 --- a/target/linux/ramips/rt3883/base-files/etc/board.d/02_network +++ b/target/linux/ramips/rt3883/base-files/etc/board.d/02_network @@ -39,9 +39,6 @@ ramips_setup_interfaces() ucidef_add_switch "switch0" \ "1:lan" "2:lan" "3:lan" "4:lan" "5:wan" "0@eth0" ;; - *) - ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2" - ;; esac }