treewide: dts: use keycode defines from input dt-binding
[oweals/openwrt.git] / target / linux / ramips / dts / SAP-G3200U3.dts
1 /dts-v1/;
2
3 #include "mt7621.dtsi"
4
5 #include <dt-bindings/input/input.h>
6
7 / {
8         compatible = "mediatek,mt7621-eval-board", "mediatek,mt7621-soc";
9         model = "STORYLiNK SAP-G3200U3";
10
11         memory@0 {
12                 device_type = "memory";
13                 reg = <0x0 0x8000000>;
14         };
15
16         chosen {
17                 bootargs = "console=ttyS0,57600";
18         };
19
20         gpio-leds {
21                 compatible = "gpio-leds";
22
23                 usb {
24                         label = "sap-g3200u3:green:usb";
25                         gpios = <&gpio0 13 1>;
26                 };
27         };
28
29         gpio-keys-polled {
30                 compatible = "gpio-keys-polled";
31                 #address-cells = <1>;
32                 #size-cells = <0>;
33                 poll-interval = <20>;
34
35                 reset {
36                         label = "reset";
37                         gpios = <&gpio0 16 1>;
38                         linux,code = <KEY_RESTART>;
39                 };
40
41                 rfkill {
42                         label = "rfkill";
43                         gpios = <&gpio0 14 1>;
44                         linux,code = <KEY_RFKILL>;
45                 };
46         };
47 };
48
49 &spi0 {
50         status = "okay";
51
52         m25p80@0 {
53                 #address-cells = <1>;
54                 #size-cells = <1>;
55                 compatible = "jedec,spi-nor";
56                 reg = <0>;
57                 linux,modalias = "m25p80", "en25q64";
58                 spi-max-frequency = <10000000>;
59
60                 partition@0 {
61                         label = "u-boot";
62                         reg = <0x0 0x30000>;
63                         read-only;
64                 };
65
66                 partition@30000 {
67                         label = "u-boot-env";
68                         reg = <0x30000 0x1000>;
69                         read-only;
70                 };
71
72                 partition@31000 {
73                         label = "config";
74                         reg = <0x31000 0xf000>;
75                         read-only;
76                 };
77
78                 factory: partition@40000 {
79                         label = "factory";
80                         reg = <0x40000 0x10000>;
81                         read-only;
82                 };
83
84                 partition@50000 {
85                         label = "firmware";
86                         reg = <0x50000 0x7b0000>;
87                 };
88         };
89 };
90
91 &pcie {
92         status = "okay";
93
94         pcie0 {
95                 mt76@0,0 {
96                         reg = <0x0000 0 0 0 0>;
97                         device_type = "pci";
98                         mediatek,mtd-eeprom = <&factory 0x8000>;
99                         mediatek,2ghz = <0>;
100                 };
101         };
102
103         pcie1 {
104                 mt76@1,0 {
105                         reg = <0x0000 0 0 0 0>;
106                         device_type = "pci";
107                         mediatek,mtd-eeprom = <&factory 0x0000>;
108                         mediatek,5ghz = <0>;
109                 };
110         };
111 };
112
113 &ethernet {
114         mtd-mac-address = <&factory 0xe006>;
115 };
116
117 &pinctrl {
118         state_default: pinctrl0 {
119                 gpio {
120                         ralink,group = "uart3", "jtag";
121                         ralink,function = "gpio";
122                 };
123         };
124 };