rampis: HLK-RM04 - Setup I2C as GPIO
[openwrt/openwrt.git] / target / linux / ramips / dts / HLKRM04.dts
1 /dts-v1/;
2
3 /include/ "rt5350.dtsi"
4
5 / {
6 compatible = "HLKRM04", "ralink,rt5350-soc";
7 model = "HILINK HLK-RM04";
8
9 memory@0 {
10 device_type = "memory";
11 reg = <0x0 0x1000000>;
12 };
13
14 chosen {
15 bootargs = "console=ttyS1,57600";
16 };
17
18 palmbus@10000000 {
19 uart@500 {
20 status = "okay";
21 };
22
23 spi@b00 {
24 status = "okay";
25
26 m25p80@0 {
27 #address-cells = <1>;
28 #size-cells = <1>;
29 compatible = "jedec,spi-nor";
30 reg = <0 0>;
31 linux,modalias = "m25p80", "s25fl064k";
32 spi-max-frequency = <10000000>;
33
34 partition@0 {
35 label = "u-boot";
36 reg = <0x0 0x30000>;
37 read-only;
38 };
39
40 partition@30000 {
41 label = "u-boot-env";
42 reg = <0x30000 0x10000>;
43 read-only;
44 };
45
46 factory: partition@40000 {
47 label = "factory";
48 reg = <0x40000 0x10000>;
49 read-only;
50 };
51
52 partition@50000 {
53 label = "firmware";
54 reg = <0x50000 0x3b0000>;
55 };
56 };
57 };
58 };
59
60 pinctrl {
61 state_default: pinctrl0 {
62 gpio {
63 ralink,group = "i2c", "jtag";
64 ralink,function = "gpio";
65 };
66 };
67 };
68
69 ethernet@10100000 {
70 mtd-mac-address = <&factory 0x4>;
71 };
72
73 wmac@10180000 {
74 ralink,mtd-eeprom = <&factory 0>;
75 };
76
77 ehci@101c0000 {
78 status = "okay";
79 };
80
81 ohci@101c1000 {
82 status = "okay";
83 };
84
85 gpio-export {
86 compatible = "gpio-export";
87 #size-cells = <0>;
88
89 /* I2C */
90 gpio1 {
91 /* I2C_I2C_SD */
92 gpio-export,name = "hlk-rm04:gpio0";
93 gpio-export,direction_may_change = <1>;
94 gpios = <&gpio0 1 0>;
95 };
96 gpio2 {
97 /* I2C_I2C_SCLK */
98 gpio-export,name = "hlk-rm04:gpio1";
99 gpio-export,direction_may_change = <1>;
100 gpios = <&gpio0 2 0>;
101 };
102 };
103
104 gpio-keys-polled {
105 compatible = "gpio-keys-polled";
106 #address-cells = <1>;
107 #size-cells = <0>;
108 poll-interval = <20>;
109 reset {
110 label = "reset";
111 gpios = <&gpio0 0 1>;
112 linux,code = <0x198>;
113 };
114 wps {
115 label = "wps";
116 gpios = <&gpio0 14 1>;
117 linux,code = <0x211>;
118 };
119 };
120 };