ramips: only add spidev node in for WrtNode2R (and not for 2P)
[oweals/openwrt.git] / target / linux / ramips / dts / mt7620n_zbtlink_zbt-wr8305rt.dts
1 /dts-v1/;
2
3 #include "mt7620n.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9         compatible = "zbtlink,zbt-wr8305rt", "ralink,mt7620n-soc";
10         model = "Zbtlink ZBT-WR8305RT";
11
12         aliases {
13                 led-boot = &led_sys;
14                 led-failsafe = &led_sys;
15                 led-running = &led_sys;
16                 led-upgrade = &led_sys;
17         };
18
19         leds {
20                 compatible = "gpio-leds";
21
22                 led_sys: sys {
23                         label = "zbt-wr8305rt:green:sys";
24                         gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
25                 };
26
27                 lan {
28                         label = "zbt-wr8305rt:green:usb";
29                         gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
30                         trigger-sources = <&ohci_port1>, <&ehci_port1>;
31                         linux,default-trigger = "usbport";
32                 };
33
34                 wifi {
35                         label = "zbt-wr8305rt:green:wifi";
36                         gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
37                 };
38         };
39
40         keys {
41                 compatible = "gpio-keys-polled";
42                 poll-interval = <20>;
43
44                 reset {
45                         label = "reset";
46                         gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
47                         linux,code = <KEY_RESTART>;
48                 };
49         };
50 };
51
52 &gpio1 {
53         status = "okay";
54 };
55
56 &gpio3 {
57         status = "okay";
58 };
59
60 &spi0 {
61         status = "okay";
62
63         m25p80@0 {
64                 compatible = "jedec,spi-nor";
65                 reg = <0>;
66                 spi-max-frequency = <10000000>;
67
68                 partitions {
69                         compatible = "fixed-partitions";
70                         #address-cells = <1>;
71                         #size-cells = <1>;
72
73                         partition@0 {
74                                 label = "u-boot";
75                                 reg = <0x0 0x30000>;
76                                 read-only;
77                         };
78
79                         partition@30000 {
80                                 label = "u-boot-env";
81                                 reg = <0x30000 0x10000>;
82                                 read-only;
83                         };
84
85                         factory: partition@40000 {
86                                 label = "factory";
87                                 reg = <0x40000 0x10000>;
88                                 read-only;
89                         };
90
91                         partition@50000 {
92                                 compatible = "denx,uimage";
93                                 label = "firmware";
94                                 reg = <0x50000 0x7b0000>;
95                         };
96                 };
97         };
98 };
99
100 &ehci {
101         status = "okay";
102 };
103
104 &ohci {
105         status = "okay";
106 };
107
108 &ethernet {
109         pinctrl-names = "default";
110         pinctrl-0 = <&ephy_pins>;
111         mtd-mac-address = <&factory 0x4>;
112         mediatek,portmap = "llllw";
113 };
114
115 &wmac {
116         ralink,mtd-eeprom = <&factory 0>;
117 };
118
119 &pinctrl {
120         state_default: pinctrl0 {
121                 default {
122                         ralink,group = "i2c", "uartf", "spi refclk", "wled";
123                         ralink,function = "gpio";
124                 };
125         };
126 };