ramips: mt7620: power up ephy port 4
[openwrt/staging/mkresin.git] / target / linux / ramips / dts / X5.dts
1 /dts-v1/;
2
3 #include "rt5350.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "poray,x5", "ralink,rt5350-soc";
10 model = "Poray X5";
11
12 gpio-leds {
13 compatible = "gpio-leds";
14
15 power {
16 label = "x5:green:power";
17 gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
18 };
19
20 20 {
21 label = "x5:green:20";
22 gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
23 };
24
25 50 {
26 label = "x5:green:50";
27 gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
28 };
29
30 80 {
31 label = "x5:green:80";
32 gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
33 };
34 };
35
36 gpio-keys-polled {
37 compatible = "gpio-keys-polled";
38 #address-cells = <1>;
39 #size-cells = <0>;
40 poll-interval = <20>;
41
42 bat {
43 label = "bat";
44 gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
45 linux,code = <KEY_WPS_BUTTON>;
46 };
47
48 reset {
49 label = "reset";
50 gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
51 linux,code = <KEY_RESTART>;
52 };
53
54 mode {
55 label = "mode";
56 gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
57 linux,code = <BTN_0>;
58 linux,input-type = <EV_SW>;
59 };
60 };
61
62 gpio_export {
63 compatible = "gpio-export";
64 #size-cells = <0>;
65
66 usb-mode {
67 gpio-export,name = "usb-mode";
68 gpio-export,output = <0>;
69 gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
70 };
71 };
72 };
73
74 &spi0 {
75 status = "okay";
76
77 m25p80@0 {
78 #address-cells = <1>;
79 #size-cells = <1>;
80 compatible = "jedec,spi-nor";
81 reg = <0>;
82 spi-max-frequency = <10000000>;
83
84 partition@0 {
85 label = "u-boot";
86 reg = <0x0 0x30000>;
87 read-only;
88 };
89
90 partition@30000 {
91 label = "u-boot-env";
92 reg = <0x30000 0x10000>;
93 read-only;
94 };
95
96 factory: partition@40000 {
97 label = "factory";
98 reg = <0x40000 0x10000>;
99 read-only;
100 };
101
102 partition@50000 {
103 label = "firmware";
104 reg = <0x50000 0x7b0000>;
105 };
106 };
107 };
108
109 &pinctrl {
110 state_default: pinctrl0 {
111 gpio {
112 ralink,group = "i2c", "jtag", "uartf";
113 ralink,function = "gpio";
114 };
115 };
116 };
117
118 &ethernet {
119 mtd-mac-address = <&factory 0x4>;
120 };
121
122 &esw {
123 mediatek,portmap = <0x2f>;
124 mediatek,led_polarity = <1>;
125 };
126
127 &wmac {
128 ralink,mtd-eeprom = <&factory 0>;
129 ralink,led-polarity = <1>;
130 };
131
132 &ehci {
133 status = "okay";
134 };
135
136 &ohci {
137 status = "okay";
138 };