mirror of
https://github.com/hanwckf/immortalwrt-mt798x.git
synced 2025-01-08 10:23:47 +08:00
Merge Official Source
This commit is contained in:
commit
dff3cef3b6
@ -1,4 +1,4 @@
|
||||
#!/bin/env python3
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import argparse
|
||||
import os
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/env python3
|
||||
#!/usr/bin/env python3
|
||||
|
||||
"""
|
||||
Whole Flash Image Tag
|
||||
|
@ -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"
|
||||
;;
|
||||
|
@ -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"
|
||||
|
@ -40,4 +40,7 @@ case "$(board_name)" in
|
||||
zyxel,p870hw-51a-v2)
|
||||
do_fixcrc
|
||||
;;
|
||||
sercomm,ad1018)
|
||||
mtd erase bootflag2
|
||||
;;
|
||||
esac
|
||||
|
@ -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"
|
||||
;;
|
||||
|
198
target/linux/bcm63xx/dts/bcm63169-comtrend-vg-8050.dts
Normal file
198
target/linux/bcm63xx/dts/bcm63169-comtrend-vg-8050.dts
Normal file
@ -0,0 +1,198 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
/dts-v1/;
|
||||
|
||||
#include "bcm63268.dtsi"
|
||||
|
||||
#include <dt-bindings/input/input.h>
|
||||
|
||||
/ {
|
||||
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 = <KEY_RESTART>;
|
||||
debounce-interval = <60>;
|
||||
};
|
||||
|
||||
wps {
|
||||
label = "wps";
|
||||
gpios = <&pinctrl 34 1>;
|
||||
linux,code = <KEY_WPS_BUTTON>;
|
||||
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";
|
||||
};
|
210
target/linux/bcm63xx/dts/bcm6328-sercomm-ad1018.dts
Normal file
210
target/linux/bcm63xx/dts/bcm6328-sercomm-ad1018.dts
Normal file
@ -0,0 +1,210 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
/dts-v1/;
|
||||
|
||||
#include "bcm6328.dtsi"
|
||||
|
||||
#include <dt-bindings/input/input.h>
|
||||
|
||||
/ {
|
||||
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 = <KEY_WPS_BUTTON>;
|
||||
debounce-interval = <60>;
|
||||
};
|
||||
|
||||
wifi {
|
||||
label = "wifi";
|
||||
gpios = <&pinctrl 25 1>;
|
||||
linux,code = <KEY_WLAN>;
|
||||
debounce-interval = <60>;
|
||||
};
|
||||
|
||||
reset {
|
||||
label = "reset";
|
||||
gpios = <&pinctrl 31 1>;
|
||||
linux,code = <KEY_RESTART>;
|
||||
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";
|
||||
};
|
216
target/linux/bcm63xx/dts/bcm6362-netgear-dgnd3700-v2.dts
Normal file
216
target/linux/bcm63xx/dts/bcm6362-netgear-dgnd3700-v2.dts
Normal file
@ -0,0 +1,216 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
/dts-v1/;
|
||||
|
||||
#include "bcm6362.dtsi"
|
||||
|
||||
#include <dt-bindings/input/input.h>
|
||||
|
||||
/ {
|
||||
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 = <KEY_RESTART>;
|
||||
debounce-interval = <60>;
|
||||
};
|
||||
|
||||
wlan {
|
||||
label = "wlan";
|
||||
gpios = <&pinctrl 25 1>;
|
||||
linux,code = <KEY_WLAN>;
|
||||
debounce-interval = <60>;
|
||||
};
|
||||
|
||||
wps {
|
||||
label = "wps";
|
||||
gpios = <&pinctrl 26 1>;
|
||||
linux,code = <KEY_WPS_BUTTON>;
|
||||
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";
|
||||
};
|
@ -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) \
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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
|
@ -153,4 +153,4 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
|
||||
+#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)
|
||||
|
@ -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
|
@ -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, },
|
@ -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, },
|
50
target/linux/bcm63xx/patches-5.4/564-board-DGND3700v2.patch
Normal file
50
target/linux/bcm63xx/patches-5.4/564-board-DGND3700v2.patch
Normal file
@ -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
|
48
target/linux/bcm63xx/patches-5.4/565-board-VG-8050.patch
Normal file
48
target/linux/bcm63xx/patches-5.4/565-board-VG-8050.patch
Normal file
@ -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, },
|
@ -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" },
|
||||
{ },
|
||||
};
|
||||
|
||||
|
@ -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 */
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
@ -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)")
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user