forked from openwrt/openwrt
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ramips: add support for jdcloud_re-cp-02
Signed-off-by: lyq1996 <lyq123233@gmail.com>
- Loading branch information
lyq1996
committed
Jan 25, 2022
1 parent
3388306
commit 7ec11db
Showing
4 changed files
with
175 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,162 @@ | ||
// 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-cp-02", "mediatek,mt7621-soc"; | ||
model = "JD-Cloud RE-CP-02"; | ||
|
||
aliases { | ||
led-boot = &led_green; | ||
led-failsafe = &led_red; | ||
led-running = &led_blue; | ||
led-upgrade = &led_red; | ||
label-mac-device = &gmac0; | ||
}; | ||
|
||
chosen { | ||
bootargs = "console=ttyS0,115200"; | ||
}; | ||
|
||
leds { | ||
compatible = "gpio-leds"; | ||
|
||
led_red: red { | ||
label = "red:status"; | ||
gpios = <&gpio 6 GPIO_ACTIVE_LOW>; | ||
}; | ||
|
||
led_green: green { | ||
label = "green:status"; | ||
gpios = <&gpio 8 GPIO_ACTIVE_LOW>; | ||
}; | ||
|
||
led_blue: blue { | ||
label = "blue:status"; | ||
gpios = <&gpio 7 GPIO_ACTIVE_LOW>; | ||
}; | ||
}; | ||
|
||
keys { | ||
compatible = "gpio-keys"; | ||
|
||
reset { | ||
label = "reset"; | ||
gpios = <&gpio 18 GPIO_ACTIVE_LOW>; | ||
linux,code = <KEY_RESTART>; | ||
}; | ||
|
||
wps { | ||
label = "wps"; | ||
gpios = <&gpio 15 GPIO_ACTIVE_LOW>; | ||
linux,code = <KEY_WPS_BUTTON>; | ||
}; | ||
}; | ||
}; | ||
|
||
&spi0 { | ||
status = "okay"; | ||
|
||
flash@0 { | ||
compatible = "jedec,spi-nor"; | ||
reg = <0>; | ||
spi-max-frequency = <10000000>; | ||
|
||
partitions { | ||
compatible = "fixed-partitions"; | ||
#address-cells = <1>; | ||
#size-cells = <1>; | ||
|
||
partition@0 { | ||
label = "u-boot"; | ||
reg = <0x00 0x40000>; | ||
}; | ||
|
||
partition@40000 { | ||
label = "u-boot-env"; | ||
reg = <0x40000 0x10000>; | ||
}; | ||
|
||
factory: partition@50000 { | ||
label = "factory"; | ||
reg = <0x50000 0x40000>; | ||
}; | ||
|
||
partition@90000 { | ||
compatible = "denx,uimage"; | ||
label = "firmware"; | ||
reg = <0x90000 0xf70000>; | ||
}; | ||
}; | ||
}; | ||
}; | ||
|
||
&sdhci { | ||
status = "okay"; | ||
}; | ||
|
||
&pcie { | ||
status = "okay"; | ||
}; | ||
|
||
&pcie1 { | ||
wifi@0,0 { | ||
compatible = "mediatek,mt76"; | ||
reg = <0x0000 0 0 0 0>; | ||
mediatek,mtd-eeprom = <&factory 0x0000>; | ||
}; | ||
}; | ||
|
||
&gmac0 { | ||
nvmem-cells = <&macaddr_factory_3fff4>; | ||
nvmem-cell-names = "mac-address"; | ||
}; | ||
|
||
&switch0 { | ||
ports { | ||
port@1 { | ||
status = "okay"; | ||
label = "lan1"; | ||
}; | ||
|
||
port@2 { | ||
status = "okay"; | ||
label = "lan2"; | ||
}; | ||
|
||
port@3 { | ||
status = "okay"; | ||
label = "lan3"; | ||
}; | ||
|
||
port@4 { | ||
status = "okay"; | ||
label = "wan"; | ||
mtd-mac-address = <&macaddr_factory_3fffa>; | ||
}; | ||
}; | ||
}; | ||
|
||
&state_default { | ||
gpio { | ||
groups = "i2c"; | ||
function = "gpio"; | ||
}; | ||
}; | ||
|
||
&factory { | ||
compatible = "nvmem-cells"; | ||
#address-cells = <1>; | ||
#size-cells = <1>; | ||
|
||
macaddr_factory_3fff4: macaddr@3fff4 { | ||
reg = <0x3fff4 0x6>; | ||
}; | ||
|
||
macaddr_factory_3fffa: macaddr@3fffa { | ||
reg = <0x3fffa 0x6>; | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters