Fresh pull from upstream
[librecmc/librecmc.git] / target / linux / ramips / dts / Newifi-D1.dts
1 /dts-v1/;
2
3 #include "mt7621.dtsi"
4
5 #include <dt-bindings/input/input.h>
6
7 / {
8         model = "Newifi-D1";
9
10         memory@0 {
11                 device_type = "memory";
12                 reg = <0x0 0x10000000>;
13         };
14
15         chosen {
16                 bootargs = "console=ttyS0,115200";
17         };
18
19         gpio-leds {
20                 compatible = "gpio-leds";
21
22                 status-red {
23                         label = "newifi-d1:red:status";
24                         gpios = <&gpio0 14 1>;
25                 };
26
27                 status-green {
28                         label = "newifi-d1:green:status";
29                         gpios = <&gpio0 13 1>;
30                 };
31
32                 statys-blue {
33                         label = "newifi-d1:blue:status";
34                         gpios = <&gpio0 16 1>;
35                 };
36         };
37
38         gpio-keys-polled {
39                 compatible = "gpio-keys-polled";
40                 #address-cells = <1>;
41                 #size-cells = <0>;
42                 poll-interval = <20>;
43
44                 reset {
45                         label = "reset";
46                         gpios = <&gpio0 15 1>;
47                         linux,code = <KEY_RESTART>;
48                 };
49         };
50
51         gpio_export {
52                 compatible = "gpio-export";
53                 #size-cells = <0>;
54
55                 usb2power {
56                         gpio-export,name = "usb2power";
57                         gpio-export,output = <1>;
58                         gpios = <&gpio0 9 0>;
59                 };
60
61                 usb3power {
62                         gpio-export,name = "usb3power";
63                         gpio-export,output = <1>;
64                         gpios = <&gpio0 11 0>;
65                 };
66         };
67 };
68
69 &sdhci {
70         status = "okay";
71
72         pinctrl-names = "default";
73         pinctrl-0 = <&sdhci_pins>;
74 };
75
76 &spi0 {
77         status = "okay";
78
79         m25p80@0 {
80                 #address-cells = <1>;
81                 #size-cells = <1>;
82                 compatible = "jedec,spi-nor";
83                 reg = <0>;
84                 spi-max-frequency = <10000000>;
85                 m25p,chunked-io = <32>;
86
87                 partition@0 {
88                         label = "u-boot";
89                         reg = <0x0 0x30000>;
90                         read-only;
91                 };
92
93                 partition@30000 {
94                         label = "u-boot-env";
95                         reg = <0x30000 0x10000>;
96                         read-only;
97                 };
98
99                 factory: partition@40000 {
100                         label = "factory";
101                         reg = <0x40000 0x10000>;
102                         read-only;
103                 };
104
105                 partition@50000 {
106                         label = "firmware";
107                         reg = <0x50000 0x2000000>;
108                 };
109         };
110 };
111
112 &pcie {
113         status = "okay";
114
115         pcie0 {
116                 mt76@0,0 {
117                         reg = <0x0000 0 0 0 0>;
118                         device_type = "pci";
119                         mediatek,mtd-eeprom = <&factory 0x8000>;
120                         mediatek,2ghz = <0>;
121                 };
122         };
123
124         pcie1 {
125                 mt76@1,0 {
126                         reg = <0x0000 0 0 0 0>;
127                         device_type = "pci";
128                         mediatek,mtd-eeprom = <&factory 0x0000>;
129                         mediatek,5ghz = <0>;
130                 };
131         };
132 };
133
134 &ethernet {
135         mtd-mac-address = <&factory 0xe000>;
136 };
137
138 &pinctrl {
139         state_default: pinctrl0 {
140                 gpio {
141                         ralink,group = "wdt", "rgmii2", "jtag", "uart2", "uart3", "i2c";
142                         ralink,function = "gpio";
143                 };
144         };
145 };