ramips: add support for SNR-CPE-ME2-SFP
[openwrt/openwrt.git] / target / linux / ramips / dts / rt5350_7links_px-4885.dtsi
1 #include "rt5350.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7 compatible = "7links,px-4885", "ralink,rt5350-soc";
8
9 aliases {
10 led-boot = &led_wifi;
11 led-failsafe = &led_wifi;
12 led-running = &led_wifi;
13 led-upgrade = &led_wifi;
14 };
15
16 keys {
17 compatible = "gpio-keys-polled";
18 poll-interval = <20>;
19
20 reset {
21 label = "reset";
22 gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
23 linux,code = <KEY_RESTART>;
24 };
25 };
26
27 leds {
28 compatible = "gpio-leds";
29
30 led_wifi: wifi {
31 label = "orange:wifi";
32 gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
33 };
34
35 storage {
36 label = "blue:storage";
37 gpios = <&gpio0 19 GPIO_ACTIVE_LOW>;
38 trigger-sources = <&ohci_port1>, <&ehci_port1>;
39 linux,default-trigger = "usbport";
40 };
41 };
42 };
43
44 &spi0 {
45 status = "okay";
46
47 flash@0 {
48 compatible = "jedec,spi-nor";
49 reg = <0>;
50 spi-max-frequency = <10000000>;
51
52 partitions {
53 compatible = "fixed-partitions";
54 #address-cells = <1>;
55 #size-cells = <1>;
56
57 partition@0 {
58 label = "u-boot";
59 reg = <0x0 0x20000>;
60 read-only;
61 };
62
63 partition@20000 {
64 label = "devdata";
65 reg = <0x20000 0x20000>;
66 read-only;
67 };
68
69 devconf: partition@40000 {
70 label = "devconf";
71 reg = <0x40000 0x10000>;
72 read-only;
73 };
74
75 firmware: partition@50000 {
76 compatible = "denx,uimage";
77 label = "firmware";
78 /* reg property is set based on flash size in DTS files */
79 };
80 };
81 };
82 };
83
84 &state_default {
85 gpio {
86 groups = "i2c", "jtag", "uartf";
87 function = "gpio";
88 };
89 };
90
91 &ethernet {
92 nvmem-cells = <&macaddr_devconf_28>;
93 nvmem-cell-names = "mac-address";
94 };
95
96 &esw {
97 mediatek,portmap = <0x3f>;
98 };
99
100 &wmac {
101 ralink,mtd-eeprom = <&devconf 0x0>;
102 };
103
104 &devconf {
105 compatible = "nvmem-cells";
106 #address-cells = <1>;
107 #size-cells = <1>;
108
109 macaddr_devconf_28: macaddr@28 {
110 reg = <0x28 0x6>;
111 };
112 };