ramips: fix mt7620a ND/SD pins pinmuxes
[oweals/openwrt.git] / target / linux / ramips / dts / HC5X61.dtsi
1 #include "mt7620a.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7         compatible = "hiwifi,hc5x61", "ralink,mt7620a-soc";
8
9         chosen {
10                 bootargs = "console=ttyS0,115200";
11         };
12
13         gpio-keys-polled {
14                 compatible = "gpio-keys-polled";
15                 poll-interval = <20>;
16
17                 reset {
18                         label = "reset";
19                         gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
20                         linux,code = <KEY_RESTART>;
21                 };
22         };
23
24         gpio_export {
25                 compatible = "gpio-export";
26                 #size-cells = <0>;
27
28                 usbpower {
29                         gpio-export,name = "usbpower";
30                         gpio-export,output = <1>;
31                         gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
32                 };
33         };
34 };
35
36 &sysc {
37         ralink,gpiomux = "i2c", "jtag";
38         ralink,uartmux = "gpio";
39         ralink,wdtmux = <1>;
40 };
41
42 &gpio0 {
43         status = "okay";
44 };
45
46 &gpio2 {
47         status = "okay";
48 };
49
50 &gpio3 {
51         status = "okay";
52 };
53
54 &spi0 {
55         status = "okay";
56
57         m25p80@0 {
58                 compatible = "jedec,spi-nor";
59                 reg = <0>;
60                 spi-max-frequency = <10000000>;
61
62                 partitions {
63                         compatible = "fixed-partitions";
64                         #address-cells = <1>;
65                         #size-cells = <1>;
66
67                         partition@0 {
68                                 label = "u-boot";
69                                 reg = <0x0 0x30000>;
70                         };
71
72                         partition@30000 {
73                                 label = "u-boot-env";
74                                 reg = <0x30000 0x10000>;
75                                 read-only;
76                         };
77
78                         factory: partition@40000 {
79                                 label = "factory";
80                                 reg = <0x40000 0x10000>;
81                         };
82
83                         partition@50000 {
84                                 label = "firmware";
85                                 reg = <0x50000 0xf80000>;
86                         };
87
88                         partition@fd0000 {
89                                 label = "hwf_config";
90                                 reg = <0xfd0000 0x10000>;
91                         };
92
93                         bdinfo: partition@fe0000 {
94                                 label = "bdinfo";
95                                 reg = <0xfe0000 0x10000>;
96                         };
97
98                         partition@ff0000 {
99                                 label = "backup";
100                                 reg = <0xff0000 0x10000>;
101                         };
102                 };
103         };
104 };
105
106 &ehci {
107         status = "okay";
108 };
109
110 &ohci {
111         status = "okay";
112 };
113
114 &ethernet {
115         pinctrl-names = "default";
116         pinctrl-0 = <&ephy_pins>;
117         mtd-mac-address = <&factory 0x4>;
118         mediatek,portmap = "wllll";
119 };
120
121 &sdhci {
122         status = "okay";
123 };
124
125 &wmac {
126         ralink,mtd-eeprom = <&factory 0>;
127         pinctrl-names = "default";
128         pinctrl-0 = <&pa_pins>;
129 };
130
131 &pcie {
132         status = "okay";
133 };
134
135 &pinctrl {
136         state_default: pinctrl0 {
137                 gpio {
138                         ralink,group = "uartf", "wled";
139                         ralink,function = "gpio";
140                 };
141         };
142 };