aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2018-10-15 12:52:34 +0200
committerFelix Fietkau <nbd@nbd.name>2019-08-12 11:43:39 +0200
commit085141dc5ba5e763e1bf4c1a2fd6957160810ccc (patch)
tree8b9cb303d93ccfd72551bdb0bf73569b80c5b183
parentb1db6d0539511f60bf65fbde28b16afa31180e34 (diff)
downloadupstream-085141dc5ba5e763e1bf4c1a2fd6957160810ccc.tar.gz
upstream-085141dc5ba5e763e1bf4c1a2fd6957160810ccc.tar.bz2
upstream-085141dc5ba5e763e1bf4c1a2fd6957160810ccc.zip
ramips: add preliminary support for WIO ONE
Signed-off-by: Felix Fietkau <nbd@nbd.name>
-rwxr-xr-xtarget/linux/ramips/base-files/etc/board.d/02_network4
-rw-r--r--target/linux/ramips/dts/WIO-ONE.dts130
-rw-r--r--target/linux/ramips/image/mt7621.mk10
3 files changed, 144 insertions, 0 deletions
diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network
index f7ef126b0d..be0accda89 100755
--- a/target/linux/ramips/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/base-files/etc/board.d/02_network
@@ -453,6 +453,10 @@ ramips_setup_interfaces()
ucidef_add_switch "switch0" \
"0:lan" "2:lan" "6t@eth0"
;;
+ wio,wio-one)
+ ucidef_add_switch "switch0" \
+ "0:lan:1" "1:lan:2" "2:lan:3" "3:lan:4" "4:wan" "6@eth0"
+ ;;
wiznet,wizfi630a)
ucidef_add_switch "switch0" \
"0:lan" "1:lan" "2:wan" "6@eth0"
diff --git a/target/linux/ramips/dts/WIO-ONE.dts b/target/linux/ramips/dts/WIO-ONE.dts
new file mode 100644
index 0000000000..e470535b38
--- /dev/null
+++ b/target/linux/ramips/dts/WIO-ONE.dts
@@ -0,0 +1,130 @@
+/dts-v1/;
+
+#include "mt7621.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "wio,wio-one", "mediatek,mt7621-soc";
+ model = "WIO ONE";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,57600";
+ };
+
+ gpio-leds {
+ compatible = "gpio-leds";
+
+ led_power: power {
+ label = "wio-one:green:power";
+ gpios = <&gpio0 4 GPIO_ACTIVE_LOW>;
+ };
+
+ alarm {
+ label = "wio-one:red:alarm";
+ gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ gpio_export {
+ compatible = "gpio-export";
+ #size-cells = <0>;
+
+ usb_power {
+ gpio-export,name = "usb";
+ gpio-export,output = <1>;
+ gpios = <&gpio0 17 GPIO_ACTIVE_HIGH>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ m25p80@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <104000000>;
+ m25p,fast-read;
+ m25p,chunked-io = <32>;
+
+ 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 = "firmware";
+ reg = <0x50000 0xfb0000>;
+ compatible = "denx,uimage";
+ };
+ };
+ };
+};
+
+&ethernet {
+ mtd-mac-address = <&factory 4>;
+ mtd-mac-address-increment = <(-2)>;
+};
+
+&pinctrl {
+ state_default: pinctrl0 {
+ gpio {
+ ralink,group = "i2c", "uart2", "uart3", "rgmii2", "sdhci", "jtag";
+ ralink,function = "gpio";
+ };
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&pcie0 {
+ mt76@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ adant,sas-devid = <1>;
+ adant,sas-gpio = <45 46 47 48>;
+ };
+};
+
+&pcie1 {
+ mt76@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x0000>;
+ adant,sas-devid = <0>;
+ adant,sas-gpio = <41 42 43 44>;
+ };
+};
+
+&xhci {
+ status = "disabled";
+};
diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk
index eeda908c44..15fdcbde05 100644
--- a/target/linux/ramips/image/mt7621.mk
+++ b/target/linux/ramips/image/mt7621.mk
@@ -696,6 +696,16 @@ define Device/ap-mtkh7-0006
endef
TARGET_DEVICES += ap-mtkh7-0006
+define Device/wio-one
+ DTS := WIO-ONE
+ IMAGE_SIZE := $(ralink_default_fw_size_16M)
+ SUPPORTED_DEVICES := wio,wio-one
+ DEVICE_TITLE := WIO ONE
+ DEVICE_PACKAGES := \
+ kmod-mt7603 kmod-mt76x2 kmod-usb3 wpad-mini
+endef
+TARGET_DEVICES += wio-one
+
define Device/youhua_wr1200js
MTK_SOC := mt7621
IMAGE_SIZE := 16064k