ramips: clean and improve MAC address setup in 02_network
[oweals/openwrt.git] / target / linux / ramips / dts / mt7621_phicomm_k2p.dts
1 /dts-v1/;
2
3 #include "mt7621.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9         compatible = "phicomm,k2p", "mediatek,mt7621-soc";
10         model = "Phicomm K2P";
11
12         aliases {
13                 led-boot = &led_blue;
14                 led-failsafe = &led_blue;
15                 led-running = &led_blue;
16                 led-upgrade = &led_blue;
17         };
18
19         chosen {
20                 bootargs = "console=ttyS0,57600";
21         };
22
23         leds {
24                 compatible = "gpio-leds";
25
26                 stat_r {
27                         label = "k2p:red:status";
28                         gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
29                 };
30
31                 stat_y {
32                         label = "k2p:yellow:status";
33                         gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
34                 };
35
36                 led_blue: stat_b {
37                         label = "k2p:blue:status";
38                         gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
39                 };
40         };
41
42         keys {
43                 compatible = "gpio-keys-polled";
44                 poll-interval = <20>;
45
46                 reset {
47                         label = "reset";
48                         gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
49                         linux,code = <KEY_RESTART>;
50                 };
51         };
52 };
53
54 &spi0 {
55         status = "okay";
56
57         m25p80@0 {
58                 compatible = "jedec,spi-nor";
59                 reg = <0>;
60                 spi-max-frequency = <10000000>;
61
62                 partitions {
63                         compatible = "fixed-partitions";
64                         #address-cells = <1>;
65                         #size-cells = <1>;
66
67                         partition@0 {
68                                 label = "u-boot";
69                                 reg = <0x0 0x30000>;
70                                 read-only;
71                         };
72
73                         partition@30000 {
74                                 label = "u-boot-env";
75                                 reg = <0x30000 0x10000>;
76                                 read-only;
77                         };
78
79                         factory: partition@40000 {
80                                 label = "factory";
81                                 reg = <0x40000 0x10000>;
82                                 read-only;
83                         };
84
85                         partition@50000 {
86                                 label = "permanent_config";
87                                 reg = <0x50000 0x50000>;
88                                 read-only;
89                         };
90
91                         partition@a0000 {
92                                 compatible = "denx,uimage";
93                                 label = "firmware";
94                                 reg = <0xa0000 0xf60000>;
95                         };
96                 };
97         };
98 };
99
100 &pcie {
101         status = "okay";
102 };
103
104 &pcie0 {
105         mt76@0,0 {
106                 reg = <0x0000 0 0 0 0>;
107                 mediatek,mtd-eeprom = <&factory 0x0>;
108         };
109 };
110
111 &ethernet {
112         mtd-mac-address = <&factory 0xe000>;
113 };
114
115 &pinctrl {
116         state_default: pinctrl0 {
117                 gpio {
118                         ralink,group = "i2c", "jtag";
119                         ralink,function = "gpio";
120                 };
121         };
122 };