diff --git a/target/linux/apm821xx/image/Makefile b/target/linux/apm821xx/image/Makefile index f4701e9f26..03799bcc10 100644 --- a/target/linux/apm821xx/image/Makefile +++ b/target/linux/apm821xx/image/Makefile @@ -3,14 +3,12 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/image.mk -DEVICE_VARS += DTB_SIZE - define Build/boot-img $(RM) -rf $@.bootdir mkdir -p $@.bootdir/boot $(CP) $@.scr $@.bootdir/boot/boot.scr - $(CP) $(IMAGE_KERNEL).dtb $@.bootdir/boot/$(DEVICE_DTB) + $(CP) $(KDIR)/image-$(firstword $(DEVICE_DTS)).dtb $@.bootdir/boot/$(DEVICE_DTB) $(CP) $(IMAGE_KERNEL) $@.bootdir/boot/uImage genext2fs --block-size $(BLOCKSIZE:%k=%Ki) \ @@ -28,12 +26,8 @@ define Build/boot-script $@.scr endef -define Build/dtb - $(call Image/BuildDTB,../dts/$(DEVICE_DTS).dts,$@.dtb,,--space $(DTB_SIZE)) -endef - define Build/export-dtb - cp $(IMAGE_KERNEL).dtb $@ + cp $(KDIR)/image-$(firstword $(DEVICE_DTS)).dtb $@ endef define Build/MuImage-initramfs @@ -58,15 +52,15 @@ define Build/MuImage-initramfs # part of the legacy multi image. Since we need to put the # device tree stuff into part 3. - -$(STAGING_DIR_HOST)/bin/mkimage -A $(LINUX_KARCH) -O linux -T multi \ - -C $(1) -a $(KERNEL_LOADADDR) -e $(KERNEL_ENTRY) \ - -n '$(BOARD_NAME) initramfs' -d $@:$@.fakerd:$@.dtb $@.new + -$(STAGING_DIR_HOST)/bin/mkimage -A $(LINUX_KARCH) -O linux -T multi -C $(1) \ + -a $(KERNEL_LOADADDR) -e $(KERNEL_ENTRY) -n '$(BOARD_NAME) initramfs' \ + -d $@:$@.fakerd:$(KDIR)/image-$(firstword $(DEVICE_DTS)).dtb $@.new mv $@.new $@ rm -rf $@.fakerd endef define Build/prepend-dtb - cat "$@.dtb.uimage" "$@" > "$@.new" + cat "$(KDIR)/image-$(firstword $(DEVICE_DTS)).dtb" "$@" > "$@.new" mv "$@.new" "$@" endef diff --git a/target/linux/apm821xx/image/nand.mk b/target/linux/apm821xx/image/nand.mk index 2848b87719..bbc429c45d 100644 --- a/target/linux/apm821xx/image/nand.mk +++ b/target/linux/apm821xx/image/nand.mk @@ -6,15 +6,6 @@ define Build/create-uImage-dtb -d "$@.dtb" "$@.dtb.uimage" endef -define Build/MerakiAdd-dtb - $(call Image/BuildDTB,../dts/$(DEVICE_DTS).dts,$@.dtb) - ( \ - dd if=$@.dtb bs=$(DTB_SIZE) conv=sync; \ - cat $@ ; \ - ) > $@.new - @mv $@.new $@ -endef - define Build/meraki-header -$(STAGING_DIR_HOST)/bin/mkmerakifw \ -B $(BOARD_NAME) -s \ @@ -30,10 +21,10 @@ define Device/meraki_mr24 DEVICE_PACKAGES := kmod-spi-gpio -swconfig BOARD_NAME := mr24 IMAGES := sysupgrade.bin - DTB_SIZE := 64512 + DEVICE_DTC_FLAGS := --space 64512 IMAGE_SIZE := 8191k - KERNEL := kernel-bin | lzma | uImage lzma | MerakiAdd-dtb | meraki-header - KERNEL_INITRAMFS := kernel-bin | lzma | dtb | MuImage-initramfs lzma + KERNEL := kernel-bin | lzma | uImage lzma | prepend-dtb | meraki-header + KERNEL_INITRAMFS := kernel-bin | lzma | MuImage-initramfs lzma IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata UBINIZE_OPTS := -E 5 SUPPORTED_DEVICES += mr24 @@ -49,9 +40,9 @@ define Device/meraki_mx60 kmod-usb-storage block-mount BLOCKSIZE := 128k IMAGES := sysupgrade.bin - DTB_SIZE := 20480 + DEVICE_DTC_FLAGS := --space 20480 IMAGE_SIZE := 1021m - KERNEL := kernel-bin | libdeflate-gzip | dtb | MuImage-initramfs gzip + KERNEL := kernel-bin | libdeflate-gzip | MuImage-initramfs gzip IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata UBINIZE_OPTS := -E 5 DEVICE_COMPAT_VERSION := 2.0 @@ -66,11 +57,11 @@ define Device/netgear_wndap6x0 SUBPAGESIZE := 256 PAGESIZE := 512 BLOCKSIZE := 16k - DTB_SIZE := 32768 + DEVICE_DTC_FLAGS := --space 32768 IMAGE_SIZE := 27392k IMAGES := sysupgrade.bin factory.img KERNEL_SIZE := 6080k - KERNEL := dtb | kernel-bin | libdeflate-gzip | MuImage-initramfs gzip + KERNEL := kernel-bin | libdeflate-gzip | MuImage-initramfs gzip IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata IMAGE/factory.img := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi UBINIZE_OPTS := -E 5 @@ -105,7 +96,7 @@ define Device/netgear_wndr4700 PAGESIZE := 2048 SUBPAGESIZE := 512 BLOCKSIZE := 128k - DTB_SIZE := 131008 + DEVICE_DTC_FLAGS := --space 131008 IMAGE_SIZE := 24960k IMAGES := factory.img sysupgrade.bin ARTIFACTS := device-tree.dtb @@ -113,8 +104,8 @@ define Device/netgear_wndr4700 # append a fake/empty rootfs to fool netgear's uboot # CHECK_DNI_FIRMWARE_ROOTFS_INTEGRITY in do_chk_dniimg() KERNEL := kernel-bin | lzma -d16 | uImage lzma | pad-offset $$(BLOCKSIZE) 64 | \ - append-uImage-fakehdr filesystem | dtb | create-uImage-dtb | prepend-dtb - KERNEL_INITRAMFS := kernel-bin | libdeflate-gzip | dtb | MuImage-initramfs gzip + append-uImage-fakehdr filesystem | create-uImage-dtb | prepend-dtb + KERNEL_INITRAMFS := kernel-bin | libdeflate-gzip | MuImage-initramfs gzip IMAGE/factory.img := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi | \ netgear-dni | check-size IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata diff --git a/target/linux/apm821xx/image/sata.mk b/target/linux/apm821xx/image/sata.mk index 18a1229d34..d28a96b726 100644 --- a/target/linux/apm821xx/image/sata.mk +++ b/target/linux/apm821xx/image/sata.mk @@ -11,9 +11,9 @@ define Device/wd_mybooklive DEVICE_PACKAGES := kmod-usb-dwc2 kmod-usb-ledtrig-usbport kmod-usb-storage kmod-fs-vfat wpad-basic-openssl SUPPORTED_DEVICES += mbl wd,mybooklive-duo BLOCKSIZE := 1k - DTB_SIZE := 16384 - KERNEL := kernel-bin | dtb | libdeflate-gzip | uImage gzip - KERNEL_INITRAMFS := kernel-bin | libdeflate-gzip | dtb | MuImage-initramfs gzip + DEVICE_DTC_FLAGS := --pad 4096 + KERNEL := kernel-bin | libdeflate-gzip | uImage gzip + KERNEL_INITRAMFS := kernel-bin | libdeflate-gzip | MuImage-initramfs gzip IMAGES := factory.img.gz sysupgrade.img.gz ARTIFACTS := apollo3g.dtb DEVICE_DTB := apollo3g.dtb diff --git a/target/linux/bmips/bcm6368/base-files/etc/board.d/01_leds b/target/linux/bmips/bcm6368/base-files/etc/board.d/01_leds new file mode 100644 index 0000000000..e68a4e947b --- /dev/null +++ b/target/linux/bmips/bcm6368/base-files/etc/board.d/01_leds @@ -0,0 +1,26 @@ +# SPDX-License-Identifier: GPL-2.0-or-later + +. /lib/functions/leds.sh +. /lib/functions/uci-defaults.sh + +board_config_update + +case "$(board_name)" in +netgear,dgnd3700-v1 |\ +netgear,dgnd3800b) + ucidef_set_led_netdev "lan" "LAN" "green:lan" "switch.1" + ucidef_set_led_netdev "wan" "WAN" "green:wan" "wan" + ucidef_set_led_netdev "wlan0" "WIFI2G" "green:wifi2g" "phy0-ap0" + ucidef_set_led_netdev "wlan1" "WIFI5G" "blue:wifi5g" "phy1-ap0" + ucidef_set_led_usbport "usb1" "USB1" "green:usb1" "usb1-port1" "usb2-port1" + ucidef_set_led_usbport "usb2" "USB2" "green:usb2" "usb1-port2" "usb2-port2" + ;; +observa,vh4032n) + ucidef_set_led_usbport "usb1" "USB1" "blue:hspa" "usb1-port1" "usb2-port1" + ucidef_set_led_usbport "usb2" "USB2" "red:hspa" "1-2-port1" "1-2-port2" + ;; +esac + +board_config_flush + +exit 0 diff --git a/target/linux/bmips/bcm6368/base-files/etc/board.d/02_network b/target/linux/bmips/bcm6368/base-files/etc/board.d/02_network index 14d6e56dd1..f99005acd7 100644 --- a/target/linux/bmips/bcm6368/base-files/etc/board.d/02_network +++ b/target/linux/bmips/bcm6368/base-files/etc/board.d/02_network @@ -5,10 +5,16 @@ board_config_update case "$(board_name)" in -comtrend,vr-3025u) +comtrend,vr-3025u |\ +observa,vh4032n) ucidef_set_bridge_device switch ucidef_set_interface_lan "lan1 lan2 lan3 lan4" ;; +netgear,dgnd3700-v1 |\ +netgear,dgnd3800b) + ucidef_set_bridge_device switch + ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "wan" + ;; esac board_config_flush diff --git a/target/linux/bmips/bcm6368/base-files/etc/uci-defaults/09_fix_crc b/target/linux/bmips/bcm6368/base-files/etc/uci-defaults/09_fix_crc index c66e4169fd..d4ff723d14 100644 --- a/target/linux/bmips/bcm6368/base-files/etc/uci-defaults/09_fix_crc +++ b/target/linux/bmips/bcm6368/base-files/etc/uci-defaults/09_fix_crc @@ -3,7 +3,8 @@ . /lib/functions.sh case "$(board_name)" in -comtrend,vr-3025u) +comtrend,vr-3025u |\ +observa,vh4032n) mtd fixtrx firmware ;; esac diff --git a/target/linux/bmips/dts/bcm6368-netgear-dgnd3700-v1.dts b/target/linux/bmips/dts/bcm6368-netgear-dgnd3700-v1.dts new file mode 100644 index 0000000000..4ec6c48083 --- /dev/null +++ b/target/linux/bmips/dts/bcm6368-netgear-dgnd3700-v1.dts @@ -0,0 +1,8 @@ +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "bcm6368-netgear-dgnd3700.dtsi" + +/ { + model = "Netgear DGND3700 v1"; + compatible = "netgear,dgnd3700-v1", "brcm,bcm6368"; +}; diff --git a/target/linux/bmips/dts/bcm6368-netgear-dgnd3700.dtsi b/target/linux/bmips/dts/bcm6368-netgear-dgnd3700.dtsi new file mode 100644 index 0000000000..2299611d55 --- /dev/null +++ b/target/linux/bmips/dts/bcm6368-netgear-dgnd3700.dtsi @@ -0,0 +1,266 @@ +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "bcm6368.dtsi" + +/ { + aliases { + led-boot = &led_power_green; + led-failsafe = &led_power_red; + led-running = &led_power_green; + led-upgrade = &led_power_green; + }; + + keys { + compatible = "gpio-keys-polled"; + poll-interval = <100>; + + rfkill { + label = "rfkill"; + gpios = <&gpio 10 GPIO_ACTIVE_LOW>; + linux,code = ; + debounce-interval = <60>; + }; + + reset { + label = "reset"; + gpios = <&gpio 12 GPIO_ACTIVE_LOW>; + linux,code = ; + debounce-interval = <60>; + }; + + wps { + label = "wps"; + gpios = <&gpio 35 GPIO_ACTIVE_LOW>; + linux,code = ; + debounce-interval = <60>; + }; + }; + + leds { + compatible = "gpio-leds"; + + led@2 { + label = "green:dsl"; + gpios = <&gpio 2 GPIO_ACTIVE_LOW>; + }; + + led@4 { + label = "red:wan"; + gpios = <&gpio 4 GPIO_ACTIVE_LOW>; + }; + + led@5 { + label = "green:wan"; + gpios = <&gpio 5 GPIO_ACTIVE_LOW>; + }; + + led@11 { + label = "green:wps"; + gpios = <&gpio 11 GPIO_ACTIVE_LOW>; + }; + + /* usb front */ + led@13 { + label = "green:usb2"; + gpios = <&gpio 13 GPIO_ACTIVE_LOW>; + }; + + /* usb back */ + led@14 { + label = "green:usb1"; + gpios = <&gpio 14 GPIO_ACTIVE_LOW>; + }; + + led_power_red: led@22 { + label = "red:power"; + gpios = <&gpio 22 GPIO_ACTIVE_LOW>; + panic-indicator; + }; + + led@23 { + label = "green:lan"; + gpios = <&gpio 23 GPIO_ACTIVE_LOW>; + }; + + led_power_green: led@24 { + label = "green:power"; + gpios = <&gpio 24 GPIO_ACTIVE_LOW>; + default-state = "on"; + }; + + led@26 { + label = "green:wifi2g"; + gpios = <&gpio 26 GPIO_ACTIVE_LOW>; + }; + + led@27 { + label = "blue:wifi5g"; + gpios = <&gpio 27 GPIO_ACTIVE_LOW>; + }; + }; +}; + +&ehci { + status = "okay"; +}; + +ðernet { + status = "okay"; + + nvmem-cells = <&macaddr_cfe_6a0>; + nvmem-cell-names = "mac-address"; +}; + +&lsspi { + status = "okay"; + + switch@1 { + compatible = "brcm,bcm53115"; + reg = <1>; + spi-max-frequency = <781000>; + dsa,member = <1 0>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + wan@0 { + reg = <0>; + label = "wan"; + }; + + port@1 { + reg = <1>; + label = "lan4"; + }; + + port@2 { + reg = <2>; + label = "lan3"; + }; + + port@3 { + reg = <3>; + label = "lan2"; + }; + + port@4 { + reg = <4>; + label = "lan1"; + }; + + port@8 { + reg = <8>; + + phy-mode = "rgmii"; + ethernet = <&switch0port5>; + + fixed-link { + speed = <1000>; + full-duplex; + }; + }; + }; + }; +}; + +&nflash { + status = "okay"; + + nandcs@0 { + compatible = "brcm,nandcs"; + 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 = "storage"; + reg = <0 0>; /* autodetected size */ + }; + }; + }; +}; + +&ohci { + status = "okay"; +}; + +&pci { + status = "okay"; +}; + +&pflash { + status = "okay"; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + cfe: partition@0 { + label = "CFE"; + reg = <0x0000000 0x0020000>; + read-only; + }; + + partition@20000 { + compatible = "brcm,bcm963xx-imagetag"; + label = "firmware"; + reg = <0x0020000 0x1e20000>; + }; + + partition@1e40000 { + label = "board_data"; + reg = <0x1e40000 0x1a0000>; + read-only; + }; + + partition@1fe0000 { + label = "nvram"; + reg = <0x1fe0000 0x020000>; + }; + }; +}; + +&switch0 { + dsa,member = <0 0>; + + ports { + switch0port5: port@5 { + reg = <5>; + label = "extsw"; + + phy-mode = "rgmii"; + + fixed-link { + speed = <1000>; + full-duplex; + }; + }; + }; +}; + +&uart0 { + status = "okay"; +}; + +&usbh { + status = "okay"; +}; + +&cfe { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_cfe_6a0: macaddr@6a0 { + reg = <0x6a0 0x6>; + }; +}; diff --git a/target/linux/bmips/dts/bcm6368-netgear-dgnd3800b.dts b/target/linux/bmips/dts/bcm6368-netgear-dgnd3800b.dts new file mode 100644 index 0000000000..350d3619c0 --- /dev/null +++ b/target/linux/bmips/dts/bcm6368-netgear-dgnd3800b.dts @@ -0,0 +1,8 @@ +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "bcm6368-netgear-dgnd3700.dtsi" + +/ { + model = "Netgear DGND3800B"; + compatible = "netgear,dgnd3800b", "brcm,bcm6368"; +}; diff --git a/target/linux/bmips/dts/bcm6368-observa-vh4032n.dts b/target/linux/bmips/dts/bcm6368-observa-vh4032n.dts new file mode 100644 index 0000000000..4a4cca0982 --- /dev/null +++ b/target/linux/bmips/dts/bcm6368-observa-vh4032n.dts @@ -0,0 +1,233 @@ +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "bcm6368.dtsi" + +/ { + model = "Observa VH4032N"; + compatible = "observa,vh4032n", "brcm,bcm6368"; + + aliases { + led-boot = &led_power_blue; + led-failsafe = &led_power_red; + led-running = &led_power_blue; + led-upgrade = &led_power_blue; + }; + + keys { + compatible = "gpio-keys-polled"; + poll-interval = <100>; + + reset { + label = "reset"; + gpios = <&gpio 34 GPIO_ACTIVE_LOW>; + linux,code = ; + debounce-interval = <60>; + }; + + rfkill { + label = "rfkill"; + gpios = <&gpio 35 GPIO_ACTIVE_LOW>; + linux,code = ; + debounce-interval = <60>; + }; + }; + + leds { + compatible = "gpio-leds"; + + led@2 { + label = "blue:dsl"; + gpios = <&gpio 2 GPIO_ACTIVE_LOW>; + }; + + led@5 { + label = "red:dsl"; + gpios = <&gpio 5 GPIO_ACTIVE_LOW>; + }; + + led@11 { + label = "blue:hspa"; + gpios = <&gpio 11 GPIO_ACTIVE_LOW>; + }; + + led@12 { + label = "red:hspa"; + gpios = <&gpio 12 GPIO_ACTIVE_LOW>; + }; + + led_power_blue: led@22 { + label = "blue:power"; + gpios = <&gpio 22 GPIO_ACTIVE_HIGH>; + default-state = "on"; + }; + + led_power_red: led@24 { + label = "red:power"; + gpios = <&gpio 24 GPIO_ACTIVE_HIGH>; + }; + + led@25 { + label = "blue:voice"; + gpios = <&gpio 25 GPIO_ACTIVE_LOW>; + }; + + led@26 { + label = "red:voice"; + gpios = <&gpio 26 GPIO_ACTIVE_LOW>; + }; + }; + + bcm43222-sprom { + compatible = "brcm,ssb-sprom"; + + pci-bus = <0>; + pci-dev = <1>; + + nvmem-cells = <&macaddr_cfe_6a0>; + nvmem-cell-names = "mac-address"; + mac-address-increment = <1>; + + brcm,sprom = "brcm/bcm43222-sprom.bin"; + brcm,sprom-fixups = <2 0x04d2>, <4 0x4350>, + <65 0x1300>, <68 0x0402>, + <70 0x0090>, <71 0x4c19>, + <72 0x2345>, <87 0x0315>, + <88 0x0315>, <96 0x2048>, + <97 0xfed7>, <98 0x15a6>, + <99 0xfaee>, <100 0x3e3a>, + <101 0x3a36>, <102 0xff7f>, + <103 0x11b9>, <104 0xfc53>, + <105 0xffe6>, <106 0xfdd2>, + <107 0xfe49>, <108 0xff6a>, + <109 0x136e>, <110 0xfbed>, + <111 0x0000>, <112 0x2048>, + <113 0xfee2>, <114 0x15e5>, + <115 0xfaed>, <116 0x3e3a>, + <117 0x3a36>, <118 0xffc8>, + <119 0x12b8>, <120 0xfca1>, + <121 0xff9b>, <122 0x122a>, + <123 0xfcc8>, <124 0xff95>, + <125 0x146b>, <126 0xfbba>, + <127 0x0000>, <161 0x0000>, + <162 0x0000>, <169 0x0000>, + <170 0x0000>, <171 0x0000>, + <172 0x0000>, <173 0x0000>, + <174 0x0000>, <175 0x0000>, + <176 0x0000>, <219 0x1108>; + }; +}; + +&ehci { + status = "okay"; +}; + +ðernet { + status = "okay"; + + nvmem-cells = <&macaddr_cfe_6a0>; + nvmem-cell-names = "mac-address"; +}; + +&gpio { + usb_hub_reset { + gpio-hog; + gpios = <27 GPIO_ACTIVE_HIGH>; + output-high; + line-name = "usb-hub-reset-gpio"; + }; +}; + +&ohci { + status = "okay"; +}; + +&pci { + status = "okay"; +}; + +&pflash { + status = "okay"; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + cfe: partition@0 { + label = "CFE"; + reg = <0x0000000 0x0020000>; + read-only; + }; + + partition@20000 { + compatible = "brcm,bcm963xx-imagetag"; + label = "firmware"; + reg = <0x0020000 0x1fc0000>; + }; + + partition@1fe0000 { + label = "nvram"; + reg = <0x1fe0000 0x020000>; + }; + }; +}; + +&pinctrl { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_ephy0_led &pinctrl_ephy1_led + &pinctrl_ephy2_led &pinctrl_ephy3_led>; +}; + +&switch0 { + ports { + port@0 { + reg = <0>; + label = "lan4"; + + phy-handle = <&phy1>; + phy-mode = "mii"; + }; + + port@1 { + reg = <1>; + label = "lan3"; + + phy-handle = <&phy2>; + phy-mode = "mii"; + }; + + port@2 { + reg = <2>; + label = "lan2"; + + phy-handle = <&phy3>; + phy-mode = "mii"; + }; + + port@3 { + reg = <3>; + label = "lan1"; + + phy-handle = <&phy4>; + phy-mode = "mii"; + }; + }; +}; + +&uart0 { + status = "okay"; +}; + +&usbh { + status = "okay"; +}; + +&cfe { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_cfe_6a0: macaddr@6a0 { + reg = <0x6a0 0x6>; + }; +}; diff --git a/target/linux/bmips/image/Makefile b/target/linux/bmips/image/Makefile index 6beea9e9f4..9063daa3dc 100644 --- a/target/linux/bmips/image/Makefile +++ b/target/linux/bmips/image/Makefile @@ -5,7 +5,7 @@ include $(INCLUDE_DIR)/image.mk KERNEL_LOADADDR := 0x80010000 # RAM start + 64K LOADER_ENTRY := 0x80a00000 # RAM start + 10M, for relocate -LZMA_TEXT_START := 0x81800000 # RAM start + 24M +LZMA_TEXT_START := 0x82000000 # RAM start + 32M DEVICE_VARS += CFE_BOARD_ID CFE_EXTRAS DEVICE_VARS += CFE_PART_FLAGS CFE_PART_ID @@ -313,6 +313,15 @@ define Device/bcm63xx-nand DEVICE_PACKAGES += nand-utils endef +define Device/bcm63xx_netgear + $(Device/bcm63xx-cfe) + DEVICE_VENDOR := NETGEAR + IMAGES := factory.chk sysupgrade.bin + IMAGE/factory.chk := cfe-bin | netgear-chk + NETGEAR_BOARD_ID := + NETGEAR_REGION := +endef + define Device/sercomm-nand $(Device/bcm63xx-nand) IMAGES := factory.img sysupgrade.bin diff --git a/target/linux/bmips/image/bcm6368.mk b/target/linux/bmips/image/bcm6368.mk index 268b68dd7c..41bce9e938 100644 --- a/target/linux/bmips/image/bcm6368.mk +++ b/target/linux/bmips/image/bcm6368.mk @@ -13,3 +13,47 @@ define Device/comtrend_vr-3025u kmod-leds-gpio endef TARGET_DEVICES += comtrend_vr-3025u + +define Device/netgear_dgnd3700-v1 + $(Device/bcm63xx_netgear) + DEVICE_VENDOR := NETGEAR + DEVICE_MODEL := DGND3700 + DEVICE_VARIANT := v1 + CFE_BOARD_ID := 96368MVWG + CHIP_ID := 6368 + BLOCKSIZE := 0x20000 + NETGEAR_BOARD_ID := U12L144T01_NETGEAR_NEWLED + NETGEAR_REGION := 1 + DEVICE_PACKAGES += $(USB2_PACKAGES) \ + $(B43_PACKAGES) +endef +TARGET_DEVICES += netgear_dgnd3700-v1 + +define Device/netgear_dgnd3800b + $(Device/bcm63xx_netgear) + DEVICE_VENDOR := NETGEAR + DEVICE_MODEL := DGND3800B + CFE_BOARD_ID := 96368MVWG + CHIP_ID := 6368 + BLOCKSIZE := 0x20000 + NETGEAR_BOARD_ID := U12L144T11_NETGEAR_NEWLED + NETGEAR_REGION := 1 + DEVICE_PACKAGES += $(USB2_PACKAGES) \ + $(B43_PACKAGES) +endef +TARGET_DEVICES += netgear_dgnd3800b + +define Device/observa_vh4032n + $(Device/bcm63xx-cfe) + DEVICE_VENDOR := Observa + DEVICE_MODEL := VH4032N + IMAGES += sysupgrade.bin + CFE_BOARD_ID := 96368VVW + CHIP_ID := 6368 + BLOCKSIZE := 0x20000 + FLASH_MB := 32 + DEVICE_PACKAGES += $(USB2_PACKAGES) \ + $(B43_PACKAGES) broadcom-43222-sprom \ + kmod-leds-gpio +endef +TARGET_DEVICES += observa_vh4032n diff --git a/target/linux/generic/files/drivers/net/phy/psb6970.c b/target/linux/generic/files/drivers/net/phy/psb6970.c index af64704b16..2587b99913 100644 --- a/target/linux/generic/files/drivers/net/phy/psb6970.c +++ b/target/linux/generic/files/drivers/net/phy/psb6970.c @@ -60,11 +60,13 @@ struct psb6970_priv { struct mutex reg_mutex; /* all fields below are cleared on reset */ - bool vlan; - u16 vlan_id[PSB6970_MAX_VLANS]; - u8 vlan_table[PSB6970_MAX_VLANS]; - u8 vlan_tagged; - u16 pvid[PSB6970_NUM_PORTS]; + struct_group(psb6970_priv_volatile, + bool vlan; + u16 vlan_id[PSB6970_MAX_VLANS]; + u8 vlan_table[PSB6970_MAX_VLANS]; + u8 vlan_tagged; + u16 pvid[PSB6970_NUM_PORTS]; + ); }; #define to_psb6970(_dev) container_of(_dev, struct psb6970_priv, dev) @@ -272,8 +274,8 @@ static int psb6970_reset_switch(struct switch_dev *dev) mutex_lock(&priv->reg_mutex); - memset(&priv->vlan, 0, sizeof(struct psb6970_priv) - - offsetof(struct psb6970_priv, vlan)); + memset(&priv->psb6970_priv_volatile, 0, + sizeof(priv->psb6970_priv_volatile)); for (i = 0; i < PSB6970_MAX_VLANS; i++) priv->vlan_id[i] = i; diff --git a/target/linux/ramips/dts/mt7621_zyxel_wsm20.dts b/target/linux/ramips/dts/mt7621_zyxel_wsm20.dts index 315e2e1d79..299d982dc1 100644 --- a/target/linux/ramips/dts/mt7621_zyxel_wsm20.dts +++ b/target/linux/ramips/dts/mt7621_zyxel_wsm20.dts @@ -66,7 +66,7 @@ led { label = "led"; gpios = <&gpio 16 GPIO_ACTIVE_LOW>; - linux,code = ; + linux,code = ; }; reset { @@ -78,7 +78,7 @@ wps { label = "wps"; gpios = <&gpio 18 GPIO_ACTIVE_LOW>; - linux,code = ; + linux,code = ; }; }; }; diff --git a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network index bd6ec91fb5..0b45d562be 100644 --- a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network +++ b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network @@ -111,6 +111,7 @@ ramips_setup_interfaces() ucidef_set_interfaces_lan_wan "lan2 lan3 lan4 lan5" "wan sfp" ;; tozed,zlt-s12-pro) + ucidef_set_interface_lan "lan1 lan2 lan3 wan" ucidef_set_interface "wwan" device "/dev/ttyUSB0" protocol "ncm" uci add_list firewall.@zone[1].network='wwan' ;;