Skip to content
Permalink
Browse files

ramips: add support for ELECOM WRC-733GHBK

  • Loading branch information...
musashino205 committed Oct 5, 2018
1 parent 5169536 commit 765f1464ce2e996c8bf4f2a09c80874bb4397595
@@ -145,6 +145,10 @@ dir-860l-b1)
edimax,br-6478ac-v2)
set_wifi_led "$boardname:blue:wlan"
;;
elecom,wrc-733ghbk)
ucidef_set_led_wlan "wlan2g" "wlan2g" "$boardname:blue:wlan2g" "phy1radio"
ucidef_set_led_wlan "wlan5g" "wlan5g" "$boardname:blue:wlan5g" "phy0radio"
;;
ex2700|\
wn3000rpv3)
set_wifi_led "$boardname:green:router"
@@ -270,6 +270,10 @@ ramips_setup_interfaces()
ucidef_add_switch "switch0" \
"1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "0:wan" "6@eth0"
;;
elecom,wrc-733ghbk)
ucidef_add_switch "switch1" \
"1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "0:wan" "6@eth0"
;;
gnubee,gb-pc1|\
gnubee,gb-pc2)
ucidef_add_switch "switch0" \
@@ -538,6 +542,10 @@ ramips_setup_macs()
sk-wb8)
wan_mac=$(mtd_get_mac_binary factory 57350)
;;
elecom,wrc-733ghbk)
lan_mac=$(mtd_get_mac_ascii hwconfig HW.LAN.MAC.Address)
wan_mac=$(mtd_get_mac_ascii hwconfig HW.WAN.MAC.Address)
;;
gl-mt300n-v2|\
whr-g300n)
wan_mac=$(mtd_get_mac_binary factory 4)
@@ -65,6 +65,11 @@ case "$FIRMWARE" in
jboot_eeprom_extract "config" 0xE000
rt2x00_eeprom_set_macaddr $wifi_mac
;;
elecom,wrc-733ghbk)
wifi_mac=$(mtd_get_mac_ascii hwconfig HW.LAN.2G.0.MAC.Address)
rt2x00_eeprom_extract "Factory" 0 512
rt2x00_eeprom_set_macaddr $wifi_mac
;;
tiny-ac)
wifi_mac=$(mtd_get_mac_ascii u-boot-env INIC_MAC_ADDR)
rt2x00_eeprom_extract "factory" 0 512
@@ -0,0 +1,174 @@
/dts-v1/;

#include "mt7620a.dtsi"

#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>

/ {
compatible = "elecom,wrc-733ghbk", "ralink,mt7620a-soc";
model = "ELECOM WRC-733GHBK";

aliases {
led-boot = &led_power;
led-failsafe = &led_power;
led-running = &led_power;
led-upgrade = &led_power;
};

memory@0 {
device_type = "memory";
reg = <0x0 0x4000000>;
};

leds {
compatible = "gpio-leds";

wps {
label = "wrc-733ghbk:red:wps";
gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
};

led_power: power {
label = "wrc-733ghbk:blue:power";
gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
default-state = "on";
};

wlan2g {
label = "wrc-733ghbk:blue:wlan2g";
gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
};

wlan5g {
label = "wrc-733ghbk:blue:wlan5g";
gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
};
};

keys {
compatible = "gpio-keys-polled";
poll-interval = <20>;

reset {
label = "reset";
gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};

wps {
label = "wps";
gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
linux,code = <KEY_WPS_BUTTON>;
};

router {
label = "router";
gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
linux,code = <BTN_0>;
linux,input-type = <EV_SW>;
};
};

regulator {
compatible = "regulator-fixed";
regulator-name = "rtl8367rb-reset";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
gpio = <&gpio0 0 GPIO_ACTIVE_LOW>;
enable-active-high;
regulator-always-on;
};

rtl8367rb {
compatible = "realtek,rtl8367b";
gpio-sda = <&gpio0 22 GPIO_ACTIVE_HIGH>;
gpio-sck = <&gpio0 23 GPIO_ACTIVE_HIGH>;
realtek,extif1 = <1 0 1 1 1 1 1 1 2>;
};
};

&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 = <0x0 0x30000>;
read-only;
};

partition@30000 {
label = "u-boot-env";
reg = <0x30000 0x10000>;
read-only;
};

Factory: partition@40000 {
label = "Factory";
reg = <0x40000 0x10000>;
read-only;
};

partition@50000 {
label = "nvram";
reg = <0x50000 0x20000>;
read-only;
};

partition@70000 {
compatible = "edimax,uimage";
label = "firmware";
reg = <0x70000 0x780000>;
};

partition@7f0000 {
label = "hwconfig";
reg = <0x7f0000 0x10000>;
read-only;
};
};
};
};

&pinctrl {
state_default: pinctrl0 {
gpio {
ralink,group = "i2c", "uartf", "mdio";
ralink,function = "gpio";
};
};
};

&ethernet {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&rgmii1_pins>;

port@5 {
status = "okay";
mediatek,fixed-link = <1000 1 1 1>;
phy-mode = "rgmii";
};
};

&pcie {
status = "okay";
};

&pcie0 {
wifi@0,0 {
reg = <0x0000 0 0 0 0>;
mediatek,mtd-eeprom = <&Factory 0x8000>;
ieee80211-freq-limit = <5000000 6000000>;
};
};
@@ -272,6 +272,17 @@ define Device/e1700
endef
TARGET_DEVICES += e1700

define Device/elecom_wrc-733ghbk
DTS := WRC-733GHBK
DEVICE_TITLE := ELECOM WRC-733GHBK
IMAGE_SIZE := 7680k
IMAGE/sysupgrade.bin := append-kernel | append-rootfs | \
edimax-header -s CSYS -m RN62 -f 0x70000 -S 0x01100000 | pad-rootfs | \
append-metadata | check-size $$$$(IMAGE_SIZE)
DEVICE_PACKAGES := kmod-mt76x0e kmod-switch-rtl8366-smi kmod-switch-rtl8367b
endef
TARGET_DEVICES += elecom_wrc-733ghbk

define Device/ex2700
NETGEAR_HW_ID := 29764623+4+0+32+2x2+0
NETGEAR_BOARD_ID := EX2700
@@ -200,6 +200,8 @@ CONFIG_RALINK_WDT=y
# CONFIG_RCU_STALL_COMMON is not set
CONFIG_REGMAP=y
CONFIG_REGMAP_MMIO=y
CONFIG_REGULATOR=y
CONFIG_REGULATOR_FIXED_VOLTAGE=y
CONFIG_RESET_CONTROLLER=y
# CONFIG_SCHED_INFO is not set
# CONFIG_SCSI_DMA is not set

0 comments on commit 765f146

Please sign in to comment.
You can’t perform that action at this time.