ramips: use fixed layout cell "mac-base" for Ubiquiti EdgeRouter X
[openwrt/openwrt.git] / target / linux / ramips / dts / rt3050_allnet_all0256n.dtsi
1 #include "rt3050.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7 compatible = "allnet,all0256n", "ralink,rt3050-soc";
8
9 leds {
10 compatible = "gpio-leds";
11
12 rssilow {
13 label = "green:rssilow";
14 gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
15 };
16
17 rssimed {
18 label = "green:rssimed";
19 gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
20 };
21
22 rssihigh {
23 label = "green:rssihigh";
24 gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
25 };
26 };
27
28 keys {
29 compatible = "gpio-keys-polled";
30 poll-interval = <20>;
31
32 reset {
33 label = "reset";
34 gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
35 linux,code = <KEY_RESTART>;
36 };
37 };
38 };
39
40 &spi0 {
41 status = "okay";
42
43 flash@0 {
44 compatible = "jedec,spi-nor";
45 reg = <0>;
46 spi-max-frequency = <10000000>;
47
48 partitions {
49 compatible = "fixed-partitions";
50 #address-cells = <1>;
51 #size-cells = <1>;
52
53 partition@0 {
54 label = "u-boot";
55 reg = <0x0 0x30000>;
56 read-only;
57 };
58
59 partition@30000 {
60 label = "u-boot-env";
61 reg = <0x30000 0x10000>;
62 read-only;
63 };
64
65 factory: partition@40000 {
66 label = "factory";
67 reg = <0x40000 0x10000>;
68 read-only;
69 };
70
71 firmware: partition@50000 {
72 compatible = "denx,uimage";
73 label = "firmware";
74 /* reg property is set based on flash size in DTS files */
75 };
76 };
77 };
78 };
79
80 &state_default {
81 gpio {
82 groups = "i2c", "jtag", "rgmii", "mdio", "uartf";
83 function = "gpio";
84 };
85 };
86
87 &ethernet {
88 nvmem-cells = <&macaddr_factory_28>;
89 nvmem-cell-names = "mac-address";
90 };
91
92 &esw {
93 mediatek,portmap = <0x3f>;
94 };
95
96 &wmac {
97 ralink,mtd-eeprom = <&factory 0x0>;
98 };
99
100 &factory {
101 compatible = "nvmem-cells";
102 #address-cells = <1>;
103 #size-cells = <1>;
104
105 macaddr_factory_28: macaddr@28 {
106 reg = <0x28 0x6>;
107 };
108 };