ramips: add support for SNR-CPE-ME2-SFP
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7620n_zbtlink_zbt-wa05.dts
1 #include "mt7620n.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7 compatible = "zbtlink,zbt-wa05", "ralink,mt7620n-soc";
8 model = "Zbtlink ZBT-WA05";
9
10 aliases {
11 led-boot = &led_power;
12 led-failsafe = &led_power;
13 led-running = &led_power;
14 led-upgrade = &led_power;
15 };
16
17 chosen {
18 bootargs = "console=ttyS0,115200";
19 };
20
21 leds {
22 compatible = "gpio-leds";
23
24 led_power: power {
25 label = "blue:power";
26 gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
27 };
28
29 usb {
30 label = "blue:usb";
31 gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>;
32 trigger-sources = <&ohci_port1>, <&ehci_port1>;
33 linux,default-trigger = "usbport";
34 };
35
36 air {
37 label = "blue:air";
38 gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
39 };
40 };
41
42 keys {
43 compatible = "gpio-keys";
44
45 reset {
46 label = "reset";
47 gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
48 linux,code = <KEY_RESTART>;
49 };
50 };
51 };
52
53 &gpio1 {
54 status = "okay";
55 };
56
57 &gpio3 {
58 status = "okay";
59 };
60
61 &spi0 {
62 status = "okay";
63
64 flash@0 {
65 compatible = "jedec,spi-nor";
66 reg = <0>;
67 spi-max-frequency = <10000000>;
68
69 partitions {
70 compatible = "fixed-partitions";
71 #address-cells = <1>;
72 #size-cells = <1>;
73
74 partition@0 {
75 label = "u-boot";
76 reg = <0x0 0x30000>;
77 read-only;
78 };
79
80 partition@30000 {
81 label = "u-boot-env";
82 reg = <0x30000 0x10000>;
83 read-only;
84 };
85
86 factory: partition@40000 {
87 label = "factory";
88 reg = <0x40000 0x10000>;
89 read-only;
90 };
91
92 partition@50000 {
93 compatible = "denx,uimage";
94 label = "firmware";
95 reg = <0x50000 0x760000>;
96 };
97 };
98 };
99 };
100
101 &ehci {
102 status = "okay";
103 };
104
105 &ohci {
106 status = "okay";
107 };
108
109 &ethernet {
110 nvmem-cells = <&macaddr_factory_4>;
111 nvmem-cell-names = "mac-address";
112
113 mediatek,portmap = "wllll";
114 };
115
116 &wmac {
117 ralink,mtd-eeprom = <&factory 0x0>;
118 };
119
120 &state_default {
121 default {
122 groups = "i2c", "spi refclk", "wled";
123 function = "gpio";
124 };
125 };
126
127 &factory {
128 compatible = "nvmem-cells";
129 #address-cells = <1>;
130 #size-cells = <1>;
131
132 macaddr_factory_4: macaddr@4 {
133 reg = <0x4 0x6>;
134 };
135 };