ramips: move common parts into dtsi
[oweals/openwrt.git] / target / linux / ramips / dts / M4.dtsi
1 #include "rt5350.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7         compatible = "poray,m4", "ralink,rt5350-soc";
8
9         gpio-leds {
10                 compatible = "gpio-leds";
11
12                 status {
13                         label = "m4:blue:status";
14                         gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
15                 };
16         };
17
18         gpio-keys-polled {
19                 compatible = "gpio-keys-polled";
20                 #address-cells = <1>;
21                 #size-cells = <0>;
22                 poll-interval = <20>;
23
24                 reset {
25                         label = "reset";
26                         gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
27                         linux,code = <KEY_RESTART>;
28                 };
29         };
30 };
31
32 &pinctrl {
33         state_default: pinctrl0 {
34                 gpio {
35                         ralink,group = "i2c", "jtag", "uartf";
36                         ralink,function = "gpio";
37                 };
38         };
39 };
40
41 &ethernet {
42         mtd-mac-address = <&factory 0x4>;
43 };
44
45 &esw {
46         mediatek,portmap = <0x2f>;
47         mediatek,led_polarity = <1>;
48 };
49
50 &wmac {
51         ralink,mtd-eeprom = <&factory 0>;
52         ralink,led-polarity = <1>;
53 };
54
55 &ehci {
56         status = "okay";
57 };
58
59 &ohci {
60         status = "okay";
61 };