6062a76f76f4e748ab84651a949da9daf833312e
[oweals/openwrt.git] / target / linux / ramips / dts / mt7620a_planex_mzk-750dhp.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 = "planex,mzk-750dhp", "ralink,mt7620a-soc";
10         model = "Planex MZK-750DHP";
11
12         aliases {
13                 led-boot = &led_power;
14                 led-failsafe = &led_power;
15                 led-running = &led_power;
16                 led-upgrade = &led_power;
17         };
18
19         leds {
20                 compatible = "gpio-leds";
21
22                 wps {
23                         label = "mzk-750dhp:green:wps";
24                         gpios = <&gpio2 15 GPIO_ACTIVE_LOW>;
25                 };
26
27                 led_power: power {
28                         label = "mzk-750dhp:green:power";
29                         gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
30                 };
31
32                 wlan5g {
33                         label = "mzk-750dhp:green:wlan5g";
34                         gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
35                 };
36         };
37
38         keys {
39                 compatible = "gpio-keys";
40
41                 s1 {
42                         label = "reset";
43                         gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
44                         linux,code = <KEY_RESTART>;
45                 };
46
47                 s2 {
48                         label = "wps";
49                         gpios = <&gpio2 19 GPIO_ACTIVE_LOW>;
50                         linux,code = <KEY_WPS_BUTTON>;
51                 };
52         };
53 };
54
55 &gpio1 {
56         status = "okay";
57 };
58
59 &gpio2 {
60         status = "okay";
61 };
62
63 &spi0 {
64         status = "okay";
65
66         m25p80@0 {
67                 compatible = "jedec,spi-nor";
68                 reg = <0>;
69                 spi-max-frequency = <10000000>;
70
71                 partitions {
72                         compatible = "fixed-partitions";
73                         #address-cells = <1>;
74                         #size-cells = <1>;
75
76                         partition@0 {
77                                 label = "u-boot";
78                                 reg = <0x0 0x30000>;
79                                 read-only;
80                         };
81
82                         partition@30000 {
83                                 label = "u-boot-env";
84                                 reg = <0x30000 0x10000>;
85                                 read-only;
86                         };
87
88                         factory: partition@40000 {
89                                 label = "factory";
90                                 reg = <0x40000 0x10000>;
91                                 read-only;
92                         };
93
94                         partition@50000 {
95                                 compatible = "denx,uimage";
96                                 label = "firmware";
97                                 reg = <0x50000 0x7b0000>;
98                         };
99                 };
100         };
101 };
102
103 &state_default {
104         gpio {
105                 ralink,group = "i2c", "spi refclk", "rgmii1", "nd_sd";
106                 ralink,function = "gpio";
107         };
108 };
109
110 &ethernet {
111         pinctrl-names = "default";
112         pinctrl-0 = <&ephy_pins>;
113         mtd-mac-address = <&factory 0x4>;
114         mediatek,portmap = "llllw";
115 };
116
117 &gsw {
118         mediatek,port4 = "ephy";
119 };
120
121 &wmac {
122         ralink,mtd-eeprom = <&factory 0>;
123 };
124
125 &pcie {
126         status = "okay";
127 };
128
129 &pcie0 {
130         mt76@0,0 {
131                 reg = <0x0000 0 0 0 0>;
132                 mediatek,mtd-eeprom = <&factory 0x8000>;
133         };
134 };