ramips: add preliminary support for WIO ONE
[openwrt/staging/jow.git] / target / linux / ramips / dts / WIO-ONE.dts
1 /dts-v1/;
2
3 #include "mt7621.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "wio,wio-one", "mediatek,mt7621-soc";
10 model = "WIO ONE";
11
12 aliases {
13 led-boot = &led_power;
14 led-failsafe = &led_power;
15 led-running = &led_power;
16 led-upgrade = &led_power;
17 };
18
19 chosen {
20 bootargs = "console=ttyS0,57600";
21 };
22
23 gpio-leds {
24 compatible = "gpio-leds";
25
26 led_power: power {
27 label = "wio-one:green:power";
28 gpios = <&gpio0 4 GPIO_ACTIVE_LOW>;
29 };
30
31 alarm {
32 label = "wio-one:red:alarm";
33 gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
34 };
35 };
36
37 gpio_export {
38 compatible = "gpio-export";
39 #size-cells = <0>;
40
41 usb_power {
42 gpio-export,name = "usb";
43 gpio-export,output = <1>;
44 gpios = <&gpio0 17 GPIO_ACTIVE_HIGH>;
45 };
46 };
47 };
48
49 &spi0 {
50 status = "okay";
51
52 m25p80@0 {
53 compatible = "jedec,spi-nor";
54 reg = <0>;
55 spi-max-frequency = <104000000>;
56 m25p,fast-read;
57 m25p,chunked-io = <32>;
58
59 partitions {
60 compatible = "fixed-partitions";
61 #address-cells = <1>;
62 #size-cells = <1>;
63
64 partition@0 {
65 label = "u-boot";
66 reg = <0x0 0x30000>;
67 read-only;
68 };
69
70 partition@30000 {
71 label = "u-boot-env";
72 reg = <0x30000 0x10000>;
73 read-only;
74 };
75
76 factory: partition@40000 {
77 label = "factory";
78 reg = <0x40000 0x10000>;
79 read-only;
80 };
81
82 partition@50000 {
83 label = "firmware";
84 reg = <0x50000 0xfb0000>;
85 compatible = "denx,uimage";
86 };
87 };
88 };
89 };
90
91 &ethernet {
92 mtd-mac-address = <&factory 4>;
93 mtd-mac-address-increment = <(-2)>;
94 };
95
96 &pinctrl {
97 state_default: pinctrl0 {
98 gpio {
99 ralink,group = "i2c", "uart2", "uart3", "rgmii2", "sdhci", "jtag";
100 ralink,function = "gpio";
101 };
102 };
103 };
104
105 &pcie {
106 status = "okay";
107 };
108
109 &pcie0 {
110 mt76@0,0 {
111 reg = <0x0000 0 0 0 0>;
112 mediatek,mtd-eeprom = <&factory 0x8000>;
113 ieee80211-freq-limit = <5000000 6000000>;
114 adant,sas-devid = <1>;
115 adant,sas-gpio = <45 46 47 48>;
116 };
117 };
118
119 &pcie1 {
120 mt76@0,0 {
121 reg = <0x0000 0 0 0 0>;
122 mediatek,mtd-eeprom = <&factory 0x0000>;
123 adant,sas-devid = <0>;
124 adant,sas-gpio = <41 42 43 44>;
125 };
126 };
127
128 &xhci {
129 status = "disabled";
130 };