mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-15 18:03:30 +00:00
ramips: add JD-Cloud router support
This commit is contained in:
parent
85220a12d3
commit
6bc640d84d
153
target/linux/ramips/dts/mt7621_jdcloud_re-sp-01b.dts
Normal file
153
target/linux/ramips/dts/mt7621_jdcloud_re-sp-01b.dts
Normal file
@ -0,0 +1,153 @@
|
|||||||
|
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||||
|
|
||||||
|
#include "mt7621.dtsi"
|
||||||
|
|
||||||
|
#include <dt-bindings/gpio/gpio.h>
|
||||||
|
#include <dt-bindings/input/input.h>
|
||||||
|
|
||||||
|
/ {
|
||||||
|
compatible = "jdcloud,re-sp-01b", "mediatek,mt7621-soc";
|
||||||
|
model = "JDCloud RE-SP-01B";
|
||||||
|
|
||||||
|
aliases {
|
||||||
|
led-boot = &led_red;
|
||||||
|
led-failsafe = &led_red;
|
||||||
|
led-running = &led_green;
|
||||||
|
led-upgrade = &led_blue;
|
||||||
|
};
|
||||||
|
|
||||||
|
chosen {
|
||||||
|
bootargs = "console=ttyS0,115200";
|
||||||
|
};
|
||||||
|
|
||||||
|
keys {
|
||||||
|
compatible = "gpio-keys";
|
||||||
|
|
||||||
|
reset {
|
||||||
|
label = "reset";
|
||||||
|
gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
|
||||||
|
linux,code = <KEY_RESTART>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
leds {
|
||||||
|
compatible = "gpio-leds";
|
||||||
|
|
||||||
|
led_red: red {
|
||||||
|
label = "red:sys";
|
||||||
|
gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
|
||||||
|
panic-indicator;
|
||||||
|
};
|
||||||
|
|
||||||
|
led_green: green {
|
||||||
|
label = "green:sys";
|
||||||
|
gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
|
||||||
|
};
|
||||||
|
|
||||||
|
led_blue: blue {
|
||||||
|
label = "blue:sys";
|
||||||
|
gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&sdhci {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&spi0 {
|
||||||
|
status = "okay";
|
||||||
|
|
||||||
|
flash@0 {
|
||||||
|
compatible = "jedec,spi-nor";
|
||||||
|
reg = <0>;
|
||||||
|
spi-max-frequency = <50000000>;
|
||||||
|
|
||||||
|
partitions {
|
||||||
|
compatible = "fixed-partitions";
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <1>;
|
||||||
|
|
||||||
|
partition@0 {
|
||||||
|
label = "u-boot";
|
||||||
|
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 0x1ab0000>;
|
||||||
|
};
|
||||||
|
|
||||||
|
partition@1b00000 {
|
||||||
|
label = "mini";
|
||||||
|
reg = <0x1b00000 0x400000>;
|
||||||
|
read-only;
|
||||||
|
};
|
||||||
|
|
||||||
|
partition@1f00000 {
|
||||||
|
label = "oem";
|
||||||
|
reg = <0x1f00000 0x100000>;
|
||||||
|
read-only;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&switch0 {
|
||||||
|
ports {
|
||||||
|
port@0 {
|
||||||
|
status = "okay";
|
||||||
|
label = "wan";
|
||||||
|
};
|
||||||
|
|
||||||
|
port@1 {
|
||||||
|
status = "okay";
|
||||||
|
label = "lan1";
|
||||||
|
};
|
||||||
|
|
||||||
|
port@2 {
|
||||||
|
status = "okay";
|
||||||
|
label = "lan2";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&pcie {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&pcie0 {
|
||||||
|
wifi@0,0 {
|
||||||
|
reg = <0x0000 0 0 0 0>;
|
||||||
|
mediatek,mtd-eeprom = <&factory 0x0>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&pcie1 {
|
||||||
|
wifi@0,0 {
|
||||||
|
reg = <0x0000 0 0 0 0>;
|
||||||
|
mediatek,mtd-eeprom = <&factory 0x8000>;
|
||||||
|
ieee80211-freq-limit = <5000000 6000000>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&state_default {
|
||||||
|
gpio {
|
||||||
|
groups = "uart2", "uart3", "wdt";
|
||||||
|
function = "gpio";
|
||||||
|
};
|
||||||
|
};
|
@ -970,6 +970,16 @@ define Device/jcg_y2
|
|||||||
endef
|
endef
|
||||||
TARGET_DEVICES += jcg_y2
|
TARGET_DEVICES += jcg_y2
|
||||||
|
|
||||||
|
define Device/jdcloud_re-sp-01b
|
||||||
|
$(Device/dsa-migration)
|
||||||
|
IMAGE_SIZE := 27328k
|
||||||
|
DEVICE_VENDOR := JDCloud
|
||||||
|
DEVICE_MODEL := RE-SP-01B
|
||||||
|
DEVICE_PACKAGES := kmod-fs-ext4 kmod-mt7603 kmod-mt7615e \
|
||||||
|
kmod-mt7615-firmware kmod-sdhci-mt7620 kmod-usb3
|
||||||
|
endef
|
||||||
|
TARGET_DEVICES += jdcloud_re-sp-01b
|
||||||
|
|
||||||
define Device/lenovo_newifi-d1
|
define Device/lenovo_newifi-d1
|
||||||
$(Device/dsa-migration)
|
$(Device/dsa-migration)
|
||||||
$(Device/uimage-lzma-loader)
|
$(Device/uimage-lzma-loader)
|
||||||
|
@ -33,6 +33,7 @@ ramips_setup_interfaces()
|
|||||||
asiarf,ap7621-nv1|\
|
asiarf,ap7621-nv1|\
|
||||||
glinet,gl-mt1300|\
|
glinet,gl-mt1300|\
|
||||||
jcg,q20|\
|
jcg,q20|\
|
||||||
|
jdcloud,re-sp-01b|\
|
||||||
lenovo,newifi-d1|\
|
lenovo,newifi-d1|\
|
||||||
mikrotik,routerboard-m33g|\
|
mikrotik,routerboard-m33g|\
|
||||||
oraybox,x3a|\
|
oraybox,x3a|\
|
||||||
@ -188,6 +189,12 @@ ramips_setup_macs()
|
|||||||
zbtlink,zbt-wg3526-32m)
|
zbtlink,zbt-wg3526-32m)
|
||||||
label_mac=$(mtd_get_mac_binary factory 0x4)
|
label_mac=$(mtd_get_mac_binary factory 0x4)
|
||||||
;;
|
;;
|
||||||
|
jdcloud,re-sp-01b)
|
||||||
|
local index="$(find_mtd_index "config")"
|
||||||
|
label_mac=$(macaddr_canonicalize $(dd if="/dev/mtd${index}" bs=12 skip=17449 iflag=skip_bytes count=1 2>/dev/null))
|
||||||
|
lan_mac=$label_mac
|
||||||
|
wan_mac=$label_mac
|
||||||
|
;;
|
||||||
linksys,e5600|\
|
linksys,e5600|\
|
||||||
linksys,ea7300-v1|\
|
linksys,ea7300-v1|\
|
||||||
linksys,ea7300-v2|\
|
linksys,ea7300-v2|\
|
||||||
|
@ -35,6 +35,12 @@ case "$board" in
|
|||||||
[ "$PHYNBR" = "1" ] && \
|
[ "$PHYNBR" = "1" ] && \
|
||||||
macaddr_setbit_la "$(mtd_get_mac_binary Factory 0x4)" > /sys${DEVPATH}/macaddress
|
macaddr_setbit_la "$(mtd_get_mac_binary Factory 0x4)" > /sys${DEVPATH}/macaddress
|
||||||
;;
|
;;
|
||||||
|
jdcloud,re-sp-01b)
|
||||||
|
local index="$(find_mtd_index "config")"
|
||||||
|
local label_mac=$(macaddr_canonicalize $(dd if="/dev/mtd${index}" bs=12 skip=17449 iflag=skip_bytes count=1 2>/dev/null))
|
||||||
|
[ "$PHYNBR" -eq 0 ] && echo $label_mac > /sys${DEVPATH}/macaddress
|
||||||
|
[ "$PHYNBR" -eq 1 ] && macaddr_add $label_mac 0x800000 > /sys${DEVPATH}/macaddress
|
||||||
|
;;
|
||||||
linksys,e5600|\
|
linksys,e5600|\
|
||||||
linksys,ea7300-v1|\
|
linksys,ea7300-v1|\
|
||||||
linksys,ea7300-v2|\
|
linksys,ea7300-v2|\
|
||||||
|
Loading…
Reference in New Issue
Block a user