ramips: simplify palmbus/{i2c,spi} in device DTS files
[oweals/openwrt.git] / target / linux / ramips / dts / mt7621_zbtlink_zbt-wg2626.dts
1 /dts-v1/;
2
3 #include "mt7621.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9         compatible = "zbtlink,zbt-wg2626", "mediatek,mt7621-soc";
10         model = "Zbtlink ZBT-WG2626";
11
12         aliases {
13                 led-boot = &led_status;
14                 led-failsafe = &led_status;
15                 led-running = &led_status;
16                 led-upgrade = &led_status;
17         };
18
19         chosen {
20                 bootargs = "console=ttyS0,115200";
21         };
22
23         keys {
24                 compatible = "gpio-keys";
25
26                 reset {
27                         label = "reset";
28                         gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
29                         linux,code = <KEY_RESTART>;
30                 };
31         };
32
33         leds {
34                 compatible = "gpio-leds";
35
36                 led_status: status {
37                         label = "zbt-wg2626:green:status";
38                         gpios = <&gpio 24 GPIO_ACTIVE_LOW>;
39                 };
40         };
41 };
42
43 &i2c {
44         status = "okay";
45 };
46
47 &sdhci {
48         status = "okay";
49 };
50
51 &spi0 {
52         status = "okay";
53
54         m25p80@0 {
55                 compatible = "jedec,spi-nor";
56                 reg = <0>;
57                 spi-max-frequency = <10000000>;
58
59                 partitions {
60                         compatible = "fixed-partitions";
61                         #address-cells = <1>;
62                         #size-cells = <1>;
63
64                         partition@0 {
65                                 label = "u-boot";
66                                 reg = <0x0 0x30000>;
67                                 read-only;
68                         };
69
70                         partition@30000 {
71                                 label = "u-boot-env";
72                                 reg = <0x30000 0x10000>;
73                                 read-only;
74                         };
75
76                         factory: partition@40000 {
77                                 label = "factory";
78                                 reg = <0x40000 0x10000>;
79                                 read-only;
80                         };
81
82                         partition@50000 {
83                                 compatible = "denx,uimage";
84                                 label = "firmware";
85                                 reg = <0x50000 0xfb0000>;
86                         };
87                 };
88         };
89 };
90
91 &pcie {
92         status = "okay";
93 };
94
95 &pcie0 {
96         mt76@0,0 {
97                 reg = <0x0000 0 0 0 0>;
98                 mediatek,mtd-eeprom = <&factory 0x8000>;
99                 ieee80211-freq-limit = <5000000 6000000>;
100         };
101 };
102
103 &pcie1 {
104         mt76@0,0 {
105                 reg = <0x0000 0 0 0 0>;
106                 mediatek,mtd-eeprom = <&factory 0x0000>;
107                 ieee80211-freq-limit = <2400000 2500000>;
108         };
109 };
110
111 &gmac0 {
112         mtd-mac-address = <&factory 0xe000>;
113 };
114
115 &switch0 {
116         ports {
117                 port@0 {
118                         status = "okay";
119                         label = "lan1";
120                 };
121
122                 port@1 {
123                         status = "okay";
124                         label = "lan2";
125                 };
126
127                 port@2 {
128                         status = "okay";
129                         label = "lan3";
130                 };
131
132                 port@3 {
133                         status = "okay";
134                         label = "lan4";
135                 };
136
137                 port@4 {
138                         status = "okay";
139                         label = "wan";
140                         mtd-mac-address = <&factory 0xe000>;
141                         mtd-mac-address-increment = <1>;
142                 };
143         };
144 };
145
146 &state_default {
147         gpio {
148                 groups = "wdt", "rgmii2";
149                 function = "gpio";
150         };
151 };