ramips: add support for JCG Y2
Signed-off-by: AmadeusGhost <amadeus@jmu.edu.cn>
(cherry picked from commit 74cda5b01b)
This commit is contained in:
parent
a63b20150d
commit
46c6f33400
105
target/linux/ramips/dts/mt7621_jcg_y2.dts
Normal file
105
target/linux/ramips/dts/mt7621_jcg_y2.dts
Normal file
@ -0,0 +1,105 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
/dts-v1/;
|
||||
|
||||
#include "mt7621.dtsi"
|
||||
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/input/input.h>
|
||||
|
||||
/ {
|
||||
compatible = "jcg,y2", "mediatek,mt7621-soc";
|
||||
model = "JCG Y2";
|
||||
|
||||
aliases {
|
||||
led-boot = &led_internet;
|
||||
led-failsafe = &led_internet;
|
||||
led-upgrade = &led_internet;
|
||||
};
|
||||
|
||||
chosen {
|
||||
bootargs = "console=ttyS0,57600";
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
led_internet: internet {
|
||||
label = "y2:blue:internet";
|
||||
gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
|
||||
keys {
|
||||
compatible = "gpio-keys";
|
||||
|
||||
reset {
|
||||
label = "reset";
|
||||
gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_RESTART>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&spi0 {
|
||||
status = "okay";
|
||||
|
||||
flash@0 {
|
||||
compatible = "jedec,spi-nor";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <80000000>;
|
||||
m25p,fast-read;
|
||||
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
partition@0 {
|
||||
label = "bootloader";
|
||||
reg = <0x0 0x30000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@30000 {
|
||||
label = "config";
|
||||
reg = <0x30000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
factory: partition@40000 {
|
||||
label = "factory";
|
||||
reg = <0x40000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@50000 {
|
||||
compatible = "denx,uimage";
|
||||
label = "firmware";
|
||||
reg = <0x50000 0xfb0000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&pcie {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pcie0 {
|
||||
wifi@0,0 {
|
||||
compatible = "mediatek,mt76";
|
||||
reg = <0x0000 0 0 0 0>;
|
||||
mediatek,mtd-eeprom = <&factory 0x0>;
|
||||
};
|
||||
};
|
||||
|
||||
ðernet {
|
||||
mtd-mac-address = <&factory 0xe000>;
|
||||
};
|
||||
|
||||
&state_default {
|
||||
gpio {
|
||||
ralink,group = "jtag", "wdt";
|
||||
ralink,function = "gpio";
|
||||
};
|
||||
};
|
||||
@ -445,6 +445,18 @@ define Device/jcg_jhr-ac876m
|
||||
endef
|
||||
TARGET_DEVICES += jcg_jhr-ac876m
|
||||
|
||||
define Device/jcg_y2
|
||||
IMAGE_SIZE := 16064k
|
||||
IMAGES += factory.bin
|
||||
IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | \
|
||||
jcg-header 95.1
|
||||
JCG_MAXSIZE := 16064k
|
||||
DEVICE_VENDOR := JCG
|
||||
DEVICE_MODEL := Y2
|
||||
DEVICE_PACKAGES := kmod-usb3 luci-app-mtwifi
|
||||
endef
|
||||
TARGET_DEVICES += jcg_y2
|
||||
|
||||
define Device/jdcloud_re-sp-01b
|
||||
IMAGE_SIZE := 27328k
|
||||
DEVICE_VENDOR := JDCloud
|
||||
|
||||
@ -23,7 +23,8 @@ d-team,newifi-d2)
|
||||
ucidef_set_led_netdev "wlan5g" "WiFi 5GHz" "$boardname:blue:wlan5g" "wlan1"
|
||||
;;
|
||||
d-team,pbr-m1|\
|
||||
gehua,ghl-r-001)
|
||||
gehua,ghl-r-001|\
|
||||
jcg,y2)
|
||||
ucidef_set_led_netdev "internet" "internet" "$boardname:blue:internet" "eth0.2"
|
||||
;;
|
||||
dlink,dir-860l-b1)
|
||||
|
||||
@ -114,6 +114,11 @@ ramips_setup_interfaces()
|
||||
ucidef_add_switch "switch0" \
|
||||
"1:lan" "2:lan" "3:lan" "4:wan" "6@eth0"
|
||||
;;
|
||||
jcg,y2)
|
||||
ucidef_add_switch "switch0" \
|
||||
"0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "4:wan" "6@eth0"
|
||||
ucidef_set_interface_lan "eth0.1 ra0 rax0 apcli0 apclix0"
|
||||
;;
|
||||
lenovo,newifi-d1)
|
||||
ucidef_add_switch "switch0" \
|
||||
"1:lan:2" "2:lan:1" "4:wan" "6@eth0"
|
||||
@ -259,11 +264,6 @@ ramips_setup_macs()
|
||||
wan_mac=$(mtd_get_mac_ascii u-boot-env wanaddr)
|
||||
label_mac=$wan_mac
|
||||
;;
|
||||
linksys,ea7500-v2)
|
||||
lan_mac=$(mtd_get_mac_ascii devinfo hw_mac_addr)
|
||||
wan_mac=$lan_mac
|
||||
label_mac=$lan_mac
|
||||
;;
|
||||
iptime,a6ns-m|\
|
||||
iptime,a8004t)
|
||||
wan_mac=$(mtd_get_mac_binary u-boot 0x1fc40)
|
||||
@ -272,6 +272,16 @@ ramips_setup_macs()
|
||||
label_mac=$(mtd_get_mac_binary factory 0x4)
|
||||
wan_mac=$label_mac
|
||||
;;
|
||||
jcg,y2|\
|
||||
zbtlink,zbt-we1326)
|
||||
wan_mac=$(mtd_get_mac_binary factory 0xe006)
|
||||
label_mac=$(mtd_get_mac_binary factory 0x4)
|
||||
;;
|
||||
linksys,ea7500-v2)
|
||||
lan_mac=$(mtd_get_mac_ascii devinfo hw_mac_addr)
|
||||
wan_mac=$lan_mac
|
||||
label_mac=$lan_mac
|
||||
;;
|
||||
mediatek,ap-mt7621a-v60)
|
||||
wan_mac=$(macaddr_add "$(mtd_get_mac_binary factory 0x5)" 1)
|
||||
;;
|
||||
@ -308,10 +318,6 @@ ramips_setup_macs()
|
||||
lan_mac=$(mtd_get_mac_binary factory 0xe006)
|
||||
label_mac=$lan_mac
|
||||
;;
|
||||
zbtlink,zbt-we1326)
|
||||
wan_mac=$(mtd_get_mac_binary factory 0xe006)
|
||||
label_mac=$(mtd_get_mac_binary factory 0x4)
|
||||
;;
|
||||
zbtlink,zbt-wg3526-16m|\
|
||||
zbtlink,zbt-wg3526-32m)
|
||||
wan_mac=$(macaddr_add "$(mtd_get_mac_binary factory 0xe000)" 1)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user