ramips: mt7628: use nvmem-layout
[openwrt/staging/hauke.git] / target / linux / ramips / dts / mt7628an_comfast_cf-wr617ac.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2 /dts-v1/;
3
4 #include "mt7628an.dtsi"
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "comfast,cf-wr617ac", "mediatek,mt7628an-soc";
10 model = "Comfast CF-WR617AC";
11
12 keys {
13 compatible = "gpio-keys";
14 reset {
15 label = "reset";
16 gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
17 linux,code = <KEY_RESTART>;
18 };
19 };
20
21 leds {
22 compatible = "gpio-leds";
23 led_status_blue: status_blue {
24 label = "blue:status";
25 gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
26 };
27 led_status_red: status_red {
28 label = "red:status";
29 gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
30 };
31 };
32
33 aliases {
34 led-boot = &led_status_red;
35 led-failsafe = &led_status_red;
36 led-running = &led_status_blue;
37 led-upgrade = &led_status_red;
38 };
39
40
41 chosen {
42 bootargs = "console=ttyS0,115200";
43 };
44
45 };
46
47 &spi0 {
48 status = "okay";
49
50 flash@0 {
51 compatible = "jedec,spi-nor";
52 reg = <0>;
53 spi-max-frequency = <40000000>;
54
55 partitions {
56 compatible = "fixed-partitions";
57 #address-cells = <1>;
58 #size-cells = <1>;
59
60 partition@0 {
61 label = "u-boot";
62 reg = <0x0 0x30000>;
63 read-only;
64 };
65
66 partition@30000 {
67 label = "u-boot-env";
68 reg = <0x30000 0x10000>;
69 read-only;
70 };
71
72 factory: partition@40000 {
73 label = "factory";
74 reg = <0x40000 0x10000>;
75 read-only;
76
77 nvmem-layout {
78 compatible = "fixed-layout";
79 #address-cells = <1>;
80 #size-cells = <1>;
81
82 eeprom_factory_0: eeprom@0 {
83 reg = <0x0 0x400>;
84 };
85
86 eeprom_factory_8000: eeprom@8000 {
87 reg = <0x8000 0x200>;
88 };
89
90 macaddr_factory_8004: macaddr@8004 {
91 reg = <0x8004 0x6>;
92 };
93
94 macaddr_factory_e000: macaddr@e000 {
95 reg = <0xe000 0x6>;
96 };
97 };
98 };
99
100 partition@50000 {
101 compatible = "denx,uimage";
102 label = "firmware";
103 reg = <0x50000 0x760000>;
104 };
105 };
106 };
107 };
108
109 &pcie {
110 status = "okay";
111 };
112
113 &pcie0 {
114 wifi@0,0 {
115 compatible = "mediatek,mt76";
116 reg = <0x0000 0 0 0 0>;
117 ieee80211-freq-limit = <5000000 6000000>;
118 nvmem-cells = <&eeprom_factory_8000>, <&macaddr_factory_8004>;
119 nvmem-cell-names = "eeprom", "mac-address";
120 mac-address-increment = <2>;
121 };
122 };
123
124 &ethernet {
125 nvmem-cells = <&macaddr_factory_e000>;
126 nvmem-cell-names = "mac-address";
127 };
128
129 &esw {
130 mediatek,portmap = <0x2f>;
131 };
132
133 &wmac {
134 status = "okay";
135 nvmem-cells = <&eeprom_factory_0>;
136 nvmem-cell-names = "eeprom";
137 };