ramips: mt7620a: convert to nvmem-layout
[openwrt/staging/hauke.git] / target / linux / ramips / dts / mt7620a_phicomm_k2x.dtsi
1 #include "mt7620a.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7 aliases {
8 led-boot = &led_blue;
9 led-failsafe = &led_blue;
10 led-running = &led_blue;
11 led-upgrade = &led_blue;
12 };
13
14 keys {
15 compatible = "gpio-keys";
16
17 reset {
18 label = "reset";
19 gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
20 linux,code = <KEY_RESTART>;
21 };
22 };
23
24 leds {
25 compatible = "gpio-leds";
26
27 led_blue: blue {
28 label = "blue:status";
29 gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
30 default-state = "on";
31 };
32
33 yellow {
34 label = "yellow:status";
35 gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
36 };
37
38 red {
39 label = "red:status";
40 gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>;
41 };
42 };
43 };
44
45 &spi0 {
46 status = "okay";
47
48 flash@0 {
49 compatible = "jedec,spi-nor";
50 reg = <0>;
51 spi-max-frequency = <80000000>;
52 m25p,fast-read;
53
54 partitions: partitions {
55 compatible = "fixed-partitions";
56 #address-cells = <1>;
57 #size-cells = <1>;
58
59 partition@0 {
60 label = "u-boot";
61 reg = <0x0 0x30000>;
62 read-only;
63 };
64
65 partition@30000 {
66 label = "u-boot-env";
67 reg = <0x30000 0x10000>;
68 read-only;
69 };
70
71 factory: partition@40000 {
72 label = "factory";
73 reg = <0x40000 0x10000>;
74 read-only;
75
76 nvmem-layout {
77 compatible = "fixed-layout";
78 #address-cells = <1>;
79 #size-cells = <1>;
80
81 eeprom_factory_0: eeprom@0 {
82 reg = <0x0 0x200>;
83 };
84
85 eeprom_factory_8000: eeprom@8000 {
86 reg = <0x8000 0x200>;
87 };
88
89 macaddr_factory_28: macaddr@28 {
90 reg = <0x28 0x6>;
91 };
92 };
93 };
94 };
95 };
96 };
97
98 &state_default {
99 gpio {
100 groups = "i2c", "uartf";
101 function = "gpio";
102 };
103 };
104
105 &pcie {
106 status = "okay";
107 };
108
109 &pcie0 {
110 mt76@0,0 {
111 reg = <0x0000 0 0 0 0>;
112 nvmem-cells = <&eeprom_factory_8000>;
113 nvmem-cell-names = "eeprom";
114 ieee80211-freq-limit = <5000000 6000000>;
115 };
116 };
117
118 &ethernet {
119 nvmem-cells = <&macaddr_factory_28>;
120 nvmem-cell-names = "mac-address";
121 };
122
123 &wmac {
124 nvmem-cells = <&eeprom_factory_0>;
125 nvmem-cell-names = "eeprom";
126 };