ramips : add support for PandoraBox D1

Signed-off-by: BangLang Huang <banglang.huang@foxmail.com>
This commit is contained in:
BangLang Huang 2016-09-27 14:23:27 +08:00 committed by John Crispin
parent 1bc68e1379
commit 9fe833e1d0
7 changed files with 177 additions and 1 deletions

View file

@ -242,6 +242,9 @@ oy-0001)
ucidef_set_led_default "power" "power" "$board:green:power" "1"
set_wifi_led "$board:green:wifi"
;;
pbr-d1)
set_usb_led "$board:orange:usb"
;;
pbr-m1)
ucidef_set_led_netdev "internet" "internet" "$board:blue:internet" "eth0.2"
ucidef_set_led_default "power" "power" "$board:blue:power" "1"

View file

@ -178,6 +178,7 @@ ramips_setup_interfaces()
mzk-ex300np|\
mzk-ex750np|\
na930|\
pbr-d1|\
wli-tx4-ag300n|\
wmr-300|\
wrh-300cr)

View file

@ -113,7 +113,8 @@ get_status_led() {
status_led="$board:blue:power"
;;
db-wrt01|\
esr-9753)
esr-9753|\
pbr-d1)
status_led="$board:orange:power"
;;
f5d8235-v2)

View file

@ -337,6 +337,9 @@ ramips_board_detect() {
*"OY-0001")
name="oy-0001"
;;
*"PBR-D1")
name="pbr-d1"
;;
*"PBR-M1")
name="pbr-m1"
;;

View file

@ -99,6 +99,7 @@ platform_check_image() {
nixcore|\
nw718|\
oy-0001|\
pbr-d1|\
pbr-m1|\
psg1208|\
psr-680w|\

View file

@ -0,0 +1,159 @@
/dts-v1/;
#include "mt7628an.dtsi"
/ {
compatible = "mediatek,pbr-d1", "mediatek,mt7628an-soc";
model = "PBR-D1";
chosen {
bootargs = "console=ttyS0,115200";
};
aliases {
serial0 = &uart2;
};
memory@0 {
device_type = "memory";
reg = <0x0 0x8000000>;
};
gpio-leds {
compatible = "gpio-leds";
usb {
label = "pbr-d1:orange:usb";
gpios = <&gpio0 0 1>;
default-state = "off";
};
power {
label = "pbr-d1:orange:power";
gpios = <&gpio0 14 1>;
default-state = "on";
};
};
gpio-keys-polled {
compatible = "gpio-keys-polled";
#address-cells = <1>;
#size-cells = <0>;
poll-interval = <20>;
wps {
label = "reset";
gpios = <&gpio1 38 1>;
linux,code = <0x211>;
};
};
wgpio: gpio-wifi {
compatible = "mediatek,gpio-wifi";
#address-cells = <1>;
#size-cells = <0>;
gpio-controller;
#gpio-cells = <2>;
};
};
&pinctrl {
state_default: pinctrl0 {
gpio {
ralink,group = "gpio";
ralink,function = "gpio";
};
i2c {
ralink,group = "i2c";
ralink,function = "gpio";
};
i2s {
ralink,group = "i2s";
ralink,function = "gpio";
};
spis {
ralink,group = "spis";
ralink,function = "gpio";
};
wdt {
ralink,group = "wdt";
ralink,function = "gpio";
};
};
};
&spi0 {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&spi_pins>, <&spi_cs1_pins>;
m25p80@0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "jedec,spi-nor";
reg = <0>;
linux,modalias = "m25p80", "w25q128";
spi-max-frequency = <40000000>;
m25p,chunked-io = <31>;
partition@0 {
label = "u-boot";
reg = <0x0 0x30000>;
read-only;
};
partition@30000 {
label = "u-boot-env";
reg = <0x30000 0x10000>;
};
factory: partition@40000 {
label = "factory";
reg = <0x40000 0x10000>;
read-only;
};
partition@50000 {
label = "firmware";
reg = <0x50000 0x0fb0000>;
};
};
spidev@1 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "linux,spidev";
reg = <1>;
spi-max-frequency = <40000000>;
};
};
&i2c {
status = "okay";
};
&uart1 {
status = "okay";
};
&uart2 {
status = "okay";
};
&pwm {
status = "okay";
};
&ethernet {
mtd-mac-address = <&factory 0x28>;
};
&sdhci {
status = "okay";
mediatek,cd-high;
};

View file

@ -10,6 +10,14 @@ define Device/LinkIt7688
endef
TARGET_DEVICES += LinkIt7688
define Device/pbr-d1
DTS := PBR-D1
IMAGE_SIZE := $(ralink_default_fw_size_16M)
DEVICE_TITLE := PBR-D1
DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci
endef
TARGET_DEVICES += pbr-d1
define Device/wrtnode2r
DTS := WRTNODE2R
IMAGE_SIZE := $(ralink_default_fw_size_16M)