ramips: rtxxxx: convert to nvmem-layout
[openwrt/staging/hauke.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 nvmem-layout {
76 compatible = "fixed-layout";
77 #address-cells = <1>;
78 #size-cells = <1>;
79
80 eeprom_factory_0: eeprom@0 {
81 reg = <0x0 0x200>;
82 };
83
84 macaddr_factory_2e: macaddr@2e {
85 reg = <0x2e 0x6>;
86 };
87 };
88 };
89
90 partition@50000 {
91 compatible = "denx,uimage";
92 label = "firmware";
93 reg = <0x50000 0x3b0000>;
94 };
95 };
96 };
97 };
98
99 &ethernet {
100 nvmem-cells = <&macaddr_factory_2e>;
101 nvmem-cell-names = "mac-address";
102 };
103
104 &esw {
105 mediatek,portmap = <0x3e>;
106 };
107
108 &wmac {
109 nvmem-cells = <&eeprom_factory_0>;
110 nvmem-cell-names = "eeprom";
111 };