ramips/mt762x: convert devices to interrupt-driven gpio-keys
[openwrt/staging/mkresin.git] / target / linux / ramips / dts / mt7620a_ralink_mt7620a-evb.dts
1 /dts-v1/;
2
3 #include "mt7620a.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "ralink,mt7620a-evb", "ralink,mt7620a-soc";
10 model = "Ralink MT7620a + MT7610e evaluation board";
11
12 keys {
13 compatible = "gpio-keys";
14
15 s2 {
16 label = "S2";
17 gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
18 linux,code = <BTN_0>;
19 };
20
21 s3 {
22 label = "S3";
23 gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
24 linux,code = <BTN_1>;
25 };
26 };
27 };
28
29 &spi0 {
30 status = "okay";
31
32 m25p80@0 {
33 compatible = "jedec,spi-nor";
34 reg = <0>;
35 spi-max-frequency = <10000000>;
36
37 partitions {
38 compatible = "fixed-partitions";
39 #address-cells = <1>;
40 #size-cells = <1>;
41
42 partition@0 {
43 label = "u-boot";
44 reg = <0x0 0x30000>;
45 read-only;
46 };
47
48 partition@30000 {
49 label = "u-boot-env";
50 reg = <0x30000 0x10000>;
51 read-only;
52 };
53
54 factory: partition@40000 {
55 label = "factory";
56 reg = <0x40000 0x10000>;
57 read-only;
58 };
59
60 partition@50000 {
61 compatible = "denx,uimage";
62 label = "firmware";
63 reg = <0x50000 0x7b0000>;
64 };
65 };
66 };
67 };
68
69 &pinctrl {
70 state_default: pinctrl0 {
71 gpio {
72 ralink,group = "i2c", "uartf";
73 ralink,function = "gpio";
74 };
75 };
76 };
77
78 &ethernet {
79 status = "okay";
80 pinctrl-names = "default";
81 pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
82 mediatek,portmap = "llllw";
83
84 port@4 {
85 status = "okay";
86 phy-mode = "rgmii";
87 phy-handle = <&phy4>;
88 };
89
90 port@5 {
91 status = "okay";
92 phy-mode = "rgmii";
93 phy-handle = <&phy5>;
94 };
95
96 mdio-bus {
97 status = "okay";
98
99 phy4: ethernet-phy@4 {
100 reg = <4>;
101 phy-mode = "rgmii";
102 };
103
104 phy5: ethernet-phy@5 {
105 reg = <5>;
106 phy-mode = "rgmii";
107 };
108 };
109 };
110
111 &gsw {
112 mediatek,port4 = "gmac";
113 };
114
115 &sdhci {
116 status = "okay";
117 };
118
119 &pcie {
120 status = "okay";
121 };
122
123 &ehci {
124 status = "okay";
125 };
126
127 &ohci {
128 status = "okay";
129 };