d87c7951cadc2a884925e0f1584a2199ba9589b5
[openwrt/staging/jow.git] / target / linux / ramips / dts / mt7620a_ohyeah_oy-0001.dts
1 #include "mt7620a.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5 #include <dt-bindings/leds/common.h>
6
7 / {
8 compatible = "ohyeah,oy-0001", "ralink,mt7620a-soc";
9 model = "OY-0001";
10
11 aliases {
12 led-boot = &led_power;
13 led-failsafe = &led_power;
14 led-running = &led_power;
15 led-upgrade = &led_power;
16 };
17
18 chosen {
19 bootargs = "console=ttyS0,115200";
20 };
21
22 leds {
23 compatible = "gpio-leds";
24
25 led_power: powerled {
26 function = LED_FUNCTION_POWER;
27 color = <LED_COLOR_ID_GREEN>;
28 gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
29 };
30
31 wifiled {
32 label = "green:wifi";
33 gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
34 };
35 };
36
37 keys {
38 compatible = "gpio-keys";
39
40 s1 {
41 label = "reset";
42 gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
43 linux,code = <KEY_RESTART>;
44 };
45 };
46 };
47
48 &gpio3 {
49 status = "okay";
50 };
51
52 &spi0 {
53 status = "okay";
54
55 flash@0 {
56 compatible = "jedec,spi-nor";
57 reg = <0>;
58 spi-max-frequency = <10000000>;
59
60 partitions {
61 compatible = "fixed-partitions";
62 #address-cells = <1>;
63 #size-cells = <1>;
64
65 partition@0 {
66 label = "u-boot";
67 reg = <0x0 0x30000>;
68 read-only;
69 };
70
71 partition@30000 {
72 label = "u-boot-env";
73 reg = <0x30000 0x10000>;
74 read-only;
75 };
76
77 factory: partition@40000 {
78 label = "factory";
79 reg = <0x40000 0x10000>;
80 read-only;
81
82 nvmem-layout {
83 compatible = "fixed-layout";
84 #address-cells = <1>;
85 #size-cells = <1>;
86
87 eeprom_factory_0: eeprom@0 {
88 reg = <0x0 0x200>;
89 };
90
91 macaddr_factory_28: macaddr@28 {
92 reg = <0x28 0x6>;
93 };
94 };
95 };
96
97 partition@50000 {
98 compatible = "denx,uimage";
99 label = "firmware";
100 reg = <0x50000 0xfb0000>;
101 };
102 };
103 };
104 };
105
106 &state_default {
107 gpio {
108 groups = "i2c", "uartf", "rgmii1", "rgmii2", "wled";
109 function = "gpio";
110 };
111 };
112
113 &ethernet {
114 pinctrl-names = "default";
115 pinctrl-0 = <&ephy_pins>;
116
117 nvmem-cells = <&macaddr_factory_28>;
118 nvmem-cell-names = "mac-address";
119
120 mediatek,portmap = "llllw";
121 };
122
123 &wmac {
124 nvmem-cells = <&eeprom_factory_0>;
125 nvmem-cell-names = "eeprom";
126 };
127
128 &sdhci {
129 status = "okay";
130 };
131
132 &ehci {
133 status = "okay";
134 };
135
136 &ohci {
137 status = "okay";
138 };