ramips: dts: fix incorrect flash reg property
[oweals/openwrt.git] / target / linux / ramips / dts / rt3352_zyxel_nbg-419n-v2.dts
1 /dts-v1/;
2
3 #include "rt3352.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9         compatible = "zyxel,nbg-419n-v2", "ralink,rt3352-soc";
10         model = "ZyXEL NBG-419N v2";
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                 led_power: power {
23                         label = "nbg-419n2:green:power";
24                         gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
25                 };
26
27                 wps {
28                         label = "nbg-419n2:green:wps";
29                         gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
30                 };
31
32                 usb {
33                         label = "nbg-419n2:green:usb";
34                         gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
35                         trigger-sources = <&ohci_port1>, <&ehci_port1>;
36                         linux,default-trigger = "usbport";
37                 };
38         };
39
40         keys {
41                 compatible = "gpio-keys-polled";
42                 poll-interval = <20>;
43                 reset {
44                         label = "reset";
45                         gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
46                         linux,code = <KEY_RESTART>;
47                 };
48                 wps {
49                         label = "wps";
50                         gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
51                         linux,code = <KEY_WPS_BUTTON>;
52                 };
53                 rfkill {
54                         label = "rfkill";
55                         linux,input-type = <EV_SW>;
56                         gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
57                         linux,code = <KEY_RFKILL>;
58                 };
59         };
60 };
61
62 &spi0 {
63         status = "okay";
64
65         flash@0 {
66                 compatible = "jedec,spi-nor";
67                 reg = <0>;
68                 spi-max-frequency = <10000000>;
69
70                 partitions {
71                         compatible = "fixed-partitions";
72                         #address-cells = <1>;
73                         #size-cells = <1>;
74
75                         partition@0 {
76                                 label = "u-boot";
77                                 reg = <0x0 0x30000>;
78                                 read-only;
79                         };
80
81                         partition@30000 {
82                                 label = "u-boot-env";
83                                 reg = <0x30000 0x10000>;
84                                 read-only;
85                         };
86
87                         factory: partition@40000 {
88                                 label = "factory";
89                                 reg = <0x40000 0x10000>;
90                                 read-only;
91                         };
92
93                         partition@50000 {
94                                 compatible = "denx,uimage";
95                                 label = "firmware";
96                                 reg = <0x50000 0x7b0000>;
97                         };
98                 };
99         };
100 };
101
102 &state_default {
103         gpio {
104                 groups = "i2c", "jtag", "rgmii", "mdio", "uartf";
105                 function = "gpio";
106         };
107 };
108
109 &ethernet {
110         mtd-mac-address = <&factory 0x28>;
111 };
112
113 &esw {
114         mediatek,portmap = <0x2f>;
115 };
116
117 &wmac {
118         ralink,mtd-eeprom = <&factory 0x0>;
119 };
120
121 &ehci {
122         status = "okay";
123 };
124
125 &ohci {
126         status = "okay";
127 };