ramips: Use dts alias based status led
[openwrt/openwrt.git] / target / linux / ramips / dts / JHR-N805R.dts
1 /dts-v1/;
2
3 #include "rt3050.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "jcg,jhr-n805r", "ralink,rt3050-soc";
10 model = "JCG JHR-N805R";
11
12 aliases {
13 led-status = &led_system;
14 };
15
16 gpio-leds {
17 compatible = "gpio-leds";
18
19 led_system: system {
20 label = "jhr-n805r:blue:system";
21 gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
22 };
23 };
24
25 gpio-keys-polled {
26 compatible = "gpio-keys-polled";
27 #address-cells = <1>;
28 #size-cells = <0>;
29 poll-interval = <20>;
30
31 reset {
32 label = "reset";
33 gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
34 linux,code = <KEY_RESTART>;
35 };
36 };
37 };
38
39 &pinctrl {
40 state_default: pinctrl0 {
41 gpio {
42 ralink,group = "i2c", "jtag", "rgmii", "mdio", "uartf";
43 ralink,function = "gpio";
44 };
45 };
46 };
47
48 &spi0 {
49 status = "okay";
50
51 m25p80@0 {
52 #address-cells = <1>;
53 #size-cells = <1>;
54 compatible = "jedec,spi-nor";
55 reg = <0>;
56 spi-max-frequency = <10000000>;
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 label = "firmware";
78 reg = <0x50000 0x3b0000>;
79 };
80 };
81 };
82
83 &ethernet {
84 mtd-mac-address = <&factory 0x2e>;
85 };
86
87 &esw {
88 mediatek,portmap = <0x3e>;
89 };
90
91 &wmac {
92 ralink,mtd-eeprom = <&factory 0>;
93 };