ramips: mt7628: use nvmem-layout
[openwrt/staging/hauke.git] / target / linux / ramips / dts / mt7628an_zbtlink_zbt-we1226.dts
1 #include "mt7628an.dtsi"
2
3 #include <dt-bindings/input/input.h>
4 #include <dt-bindings/gpio/gpio.h>
5
6 / {
7 compatible = "zbtlink,zbt-we1226", "mediatek,mt7628an-soc";
8 model = "Zbtlink ZBT-WE1226";
9
10 aliases {
11 led-boot = &led_wlan;
12 led-failsafe = &led_wlan;
13 led-running = &led_wlan;
14 led-upgrade = &led_wlan;
15 };
16
17 chosen {
18 bootargs = "console=ttyS0,115200";
19 };
20
21 keys {
22 compatible = "gpio-keys";
23
24 reset {
25 label = "reset";
26 gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
27 linux,code = <KEY_RESTART>;
28 };
29 };
30
31 leds {
32 compatible = "gpio-leds";
33
34 wan {
35 label = "green:wan";
36 gpios = <&gpio 39 GPIO_ACTIVE_LOW>;
37 };
38
39 lan1 {
40 label = "green:lan1";
41 gpios = <&gpio 43 GPIO_ACTIVE_LOW>;
42 };
43
44 lan2 {
45 label = "green:lan2";
46 gpios = <&gpio 42 GPIO_ACTIVE_LOW>;
47 };
48
49 led_wlan: wlan {
50 label = "green:wlan";
51 gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
52 };
53 };
54 };
55
56 &state_default {
57 gpio {
58 groups = "p0led_an", "p1led_an", "p4led_an", "wdt", "wled_an";
59 function = "gpio";
60 };
61 };
62
63 &spi0 {
64 status = "okay";
65
66 flash@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 nvmem-layout {
94 compatible = "fixed-layout";
95 #address-cells = <1>;
96 #size-cells = <1>;
97
98 eeprom_factory_0: eeprom@0 {
99 reg = <0x0 0x400>;
100 };
101
102 macaddr_factory_2e: macaddr@2e {
103 reg = <0x2e 0x6>;
104 };
105 };
106 };
107
108 partition@50000 {
109 compatible = "denx,uimage";
110 label = "firmware";
111 reg = <0x50000 0x7b0000>;
112 };
113 };
114 };
115 };
116
117 &wmac {
118 status = "okay";
119
120 nvmem-cells = <&eeprom_factory_0>;
121 nvmem-cell-names = "eeprom";
122 };
123
124 &ethernet {
125 nvmem-cells = <&macaddr_factory_2e>;
126 nvmem-cell-names = "mac-address";
127 };
128
129 &esw {
130 mediatek,portmap = <0x2f>;
131 };