ramips: convert mtd-mac-address to nvmem implementation
[openwrt/staging/wigyori.git] / target / linux / ramips / dts / rt3050_jcg_jhr-n805r.dts
1 #include "rt3050.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7 compatible = "jcg,jhr-n805r", "ralink,rt3050-soc";
8 model = "JCG JHR-N805R";
9
10 aliases {
11 led-boot = &led_system;
12 led-failsafe = &led_system;
13 led-running = &led_system;
14 led-upgrade = &led_system;
15 };
16
17 leds {
18 compatible = "gpio-leds";
19
20 led_system: system {
21 label = "blue:system";
22 gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
23 };
24 };
25
26 keys {
27 compatible = "gpio-keys-polled";
28 poll-interval = <20>;
29
30 reset {
31 label = "reset";
32 gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
33 linux,code = <KEY_RESTART>;
34 };
35 };
36 };
37
38 &state_default {
39 gpio {
40 groups = "i2c", "jtag", "rgmii", "mdio", "uartf";
41 function = "gpio";
42 };
43 };
44
45 &spi0 {
46 status = "okay";
47
48 flash@0 {
49 compatible = "jedec,spi-nor";
50 reg = <0>;
51 spi-max-frequency = <10000000>;
52
53 partitions {
54 compatible = "fixed-partitions";
55 #address-cells = <1>;
56 #size-cells = <1>;
57
58 partition@0 {
59 label = "u-boot";
60 reg = <0x0 0x30000>;
61 read-only;
62 };
63
64 partition@30000 {
65 label = "u-boot-env";
66 reg = <0x30000 0x10000>;
67 read-only;
68 };
69
70 factory: partition@40000 {
71 label = "factory";
72 reg = <0x40000 0x10000>;
73 read-only;
74 };
75
76 partition@50000 {
77 compatible = "denx,uimage";
78 label = "firmware";
79 reg = <0x50000 0x3b0000>;
80 };
81 };
82 };
83 };
84
85 &ethernet {
86 nvmem-cells = <&macaddr_factory_2e>;
87 nvmem-cell-names = "mac-address";
88 };
89
90 &esw {
91 mediatek,portmap = <0x3e>;
92 };
93
94 &wmac {
95 ralink,mtd-eeprom = <&factory 0x0>;
96 };
97
98 &factory {
99 compatible = "nvmem-cells";
100 #address-cells = <1>;
101 #size-cells = <1>;
102
103 macaddr_factory_2e: macaddr@2e {
104 reg = <0x2e 0x6>;
105 };
106 };