Fresh pull from upstream
[librecmc/librecmc.git] / target / linux / ramips / dts / FIREWRT.dts
1 /dts-v1/;
2
3 #include "mt7621.dtsi"
4
5 #include <dt-bindings/input/input.h>
6
7 / {
8         model = "Firefly FireWRT";
9
10         memory@0 {
11                 device_type = "memory";
12                 reg = <0x0 0x1c000000>, <0x20000000 0x4000000>;
13         };
14
15         chosen {
16                 bootargs = "console=ttyS0,57600";
17         };
18
19         gpio-leds {
20                 compatible = "gpio-leds";
21
22                 power {
23                         label = "firewrt:green:power";
24                         gpios = <&gpio0 22 1>;
25                 };
26         };
27
28         gpio-keys-polled {
29                 compatible = "gpio-keys-polled";
30                 #address-cells = <1>;
31                 #size-cells = <0>;
32                 poll-interval = <20>;
33
34                 wps {
35                         label = "wps";
36                         gpios = <&gpio0 18 1>;
37                         linux,code = <KEY_WPS_BUTTON>;
38                 };
39
40                 power {
41                         label = "power";
42                         gpios = <&gpio0 23 1>;
43                         linux,code = <KEY_POWER>;
44                 };
45         };
46 };
47
48 &sdhci {
49         status = "okay";
50 };
51
52 &spi0 {
53         status = "okay";
54
55         m25p80@0 {
56                 #address-cells = <1>;
57                 #size-cells = <1>;
58                 compatible = "jedec,spi-nor";
59                 reg = <0>;
60                 spi-max-frequency = <10000000>;
61                 m25p,chunked-io = <32>;
62
63                 partition@0 {
64                         label = "u-boot";
65                         reg = <0x0 0x30000>;
66                         read-only;
67                 };
68
69                 partition@30000 {
70                         label = "u-boot-env";
71                         reg = <0x30000 0x10000>;
72                         read-only;
73                 };
74
75                 factory: partition@40000 {
76                         label = "factory";
77                         reg = <0x40000 0x10000>;
78                         read-only;
79                 };
80
81                 partition@50000 {
82                         label = "firmware";
83                         reg = <0x50000 0xfb0000>;
84                 };
85         };
86 };
87
88 &pcie {
89         status = "okay";
90
91         pcie0 {
92                 mt76@0,0 {
93                         reg = <0x0000 0 0 0 0>;
94                         device_type = "pci";
95                         mediatek,mtd-eeprom = <&factory 0x8000>;
96                         mediatek,2ghz = <0>;
97                 };
98         };
99
100         pcie1 {
101                 mt76@1,0 {
102                         reg = <0x0000 0 0 0 0>;
103                         device_type = "pci";
104                         mediatek,mtd-eeprom = <&factory 0x0000>;
105                         mediatek,5ghz = <0>;
106                 };
107         };
108 };
109
110 &ethernet {
111         mtd-mac-address = <&factory 0xe000>;
112 };
113
114 &pinctrl {
115         state_default: pinctrl0 {
116                 gpio {
117                         ralink,group = "wdt", "rgmii2";
118                         ralink,function = "gpio";
119                 };
120         };
121 };