36cbf20f32845e731dec2f1e2f446535fb4220b3
[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 compatible = "nvmem-cells";
73 label = "factory";
74 reg = <0x40000 0x10000>;
75 #address-cells = <1>;
76 #size-cells = <1>;
77 read-only;
78
79 eeprom_factory_0: eeprom@0 {
80 reg = <0x0 0x200>;
81 };
82
83 eeprom_factory_8000: eeprom@8000 {
84 reg = <0x8000 0x200>;
85 };
86
87 macaddr_factory_28: macaddr@28 {
88 reg = <0x28 0x6>;
89 };
90 };
91 };
92 };
93 };
94
95 &state_default {
96 gpio {
97 groups = "i2c", "uartf";
98 function = "gpio";
99 };
100 };
101
102 &pcie {
103 status = "okay";
104 };
105
106 &pcie0 {
107 mt76@0,0 {
108 reg = <0x0000 0 0 0 0>;
109 nvmem-cells = <&eeprom_factory_8000>;
110 nvmem-cell-names = "eeprom";
111 ieee80211-freq-limit = <5000000 6000000>;
112 };
113 };
114
115 &ethernet {
116 nvmem-cells = <&macaddr_factory_28>;
117 nvmem-cell-names = "mac-address";
118 };
119
120 &wmac {
121 nvmem-cells = <&eeprom_factory_0>;
122 nvmem-cell-names = "eeprom";
123 };