537e5f208fe658e3226c5fe52f981195655de794
[openwrt/staging/wigyori.git] / target / linux / ramips / dts / PBR-M1.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 = "d-team,pbr-m1", "mediatek,mt7621-soc";
10 model = "PBR-M1";
11
12 aliases {
13 led-status = &led_sys;
14 };
15
16 memory@0 {
17 device_type = "memory";
18 reg = <0x0 0x10000000>;
19 };
20
21 chosen {
22 bootargs = "console=ttyS0,115200";
23 };
24
25 palmbus: palmbus@1E000000 {
26 i2c: i2c@900 {
27 status = "okay";
28
29 pcf8563: rtc@51 {
30 status = "okay";
31 compatible = "nxp,pcf8563";
32 reg = <0x51>;
33 };
34 };
35 };
36
37 gpio-leds {
38 compatible = "gpio-leds";
39
40 power {
41 label = "pbr-m1:blue:power";
42 gpios = <&gpio0 31 GPIO_ACTIVE_LOW>;
43 default-state = "on";
44 };
45
46 led_sys: sys {
47 label = "pbr-m1:blue:sys";
48 gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
49 };
50
51 internet {
52 label = "pbr-m1:blue:internet";
53 gpios = <&gpio0 29 GPIO_ACTIVE_LOW>;
54 };
55
56 wlan2g {
57 label = "pbr-m1:blue:wlan2g";
58 gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
59 };
60
61 wlan5g {
62 label = "pbr-m1:blue:wlan5g";
63 gpios = <&gpio0 28 GPIO_ACTIVE_LOW>;
64 };
65 };
66
67 gpio-keys-polled {
68 compatible = "gpio-keys-polled";
69 poll-interval = <20>;
70
71 reset {
72 label = "reset";
73 gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
74 linux,code = <KEY_RESTART>;
75 };
76 };
77
78 gpio_export {
79 compatible = "gpio-export";
80 #size-cells = <0>;
81
82 power_usb2 {
83 gpio-export,name = "power_usb2";
84 gpio-export,output = <1>;
85 gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>;
86 };
87
88 power_usb3 {
89 gpio-export,name = "power_usb3";
90 gpio-export,output = <1>;
91 gpios = <&gpio0 25 GPIO_ACTIVE_HIGH>;
92 };
93
94 power_sata {
95 gpio-export,name = "power_sata";
96 gpio-export,output = <1>;
97 gpios = <&gpio0 27 GPIO_ACTIVE_HIGH>;
98 };
99 };
100
101 beeper: beeper {
102 compatible = "gpio-beeper";
103 gpios = <&gpio0 26 GPIO_ACTIVE_LOW>;
104 };
105 };
106
107 &sdhci {
108 status = "okay";
109 pinctrl-names = "default";
110 pinctrl-0 = <&sdhci_pins>;
111 };
112
113 &spi0 {
114 status = "okay";
115
116 m25p80@0 {
117 compatible = "jedec,spi-nor";
118 reg = <0>;
119 spi-max-frequency = <10000000>;
120 m25p,chunked-io = <32>;
121
122 partitions {
123 compatible = "fixed-partitions";
124 #address-cells = <1>;
125 #size-cells = <1>;
126
127 partition@0 {
128 label = "u-boot";
129 reg = <0x0 0x30000>;
130 read-only;
131 };
132
133 partition@30000 {
134 label = "u-boot-env";
135 reg = <0x30000 0x10000>;
136 read-only;
137 };
138
139 factory: partition@40000 {
140 label = "factory";
141 reg = <0x40000 0x10000>;
142 read-only;
143 };
144
145 partition@50000 {
146 label = "firmware";
147 reg = <0x50000 0xfb0000>;
148 };
149 };
150 };
151 };
152
153 &pcie {
154 status = "okay";
155 };
156
157 &pcie0 {
158 mt76@0,0 {
159 reg = <0x0000 0 0 0 0>;
160 mediatek,mtd-eeprom = <&factory 0x8000>;
161 ieee80211-freq-limit = <5000000 6000000>;
162 };
163 };
164
165 &pcie1 {
166 mt76@0,0 {
167 reg = <0x0000 0 0 0 0>;
168 mediatek,mtd-eeprom = <&factory 0x0000>;
169 };
170 };
171
172 &ethernet {
173 mtd-mac-address = <&factory 0xe000>;
174 };
175
176 &pinctrl {
177 state_default: pinctrl0 {
178 gpio {
179 ralink,group = "wdt", "rgmii2", "jtag", "mdio";
180 ralink,function = "gpio";
181 };
182 };
183 };