hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/arch/arm/boot/dts/sun4i-a10-inet9f-rev03.dts
....@@ -61,8 +61,6 @@
6161
6262 gpio-keys {
6363 compatible = "gpio-keys-polled";
64
- pinctrl-names = "default";
65
- pinctrl-0 = <&key_pins_inet9f>;
6664 poll-interval = <20>;
6765
6866 left-joystick-left {
....@@ -70,7 +68,7 @@
7068 linux,code = <ABS_X>;
7169 linux,input-type = <EV_ABS>;
7270 linux,input-value = <0xffffffff>; /* -1 */
73
- gpios = <&pio 0 6 GPIO_ACTIVE_LOW>; /* PA6 */
71
+ gpios = <&pio 0 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PA6 */
7472 };
7573
7674 left-joystick-right {
....@@ -78,7 +76,7 @@
7876 linux,code = <ABS_X>;
7977 linux,input-type = <EV_ABS>;
8078 linux,input-value = <1>;
81
- gpios = <&pio 0 5 GPIO_ACTIVE_LOW>; /* PA5 */
79
+ gpios = <&pio 0 5 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PA5 */
8280 };
8381
8482 left-joystick-up {
....@@ -86,7 +84,7 @@
8684 linux,code = <ABS_Y>;
8785 linux,input-type = <EV_ABS>;
8886 linux,input-value = <0xffffffff>; /* -1 */
89
- gpios = <&pio 0 8 GPIO_ACTIVE_LOW>; /* PA8 */
87
+ gpios = <&pio 0 8 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PA8 */
9088 };
9189
9290 left-joystick-down {
....@@ -94,7 +92,7 @@
9492 linux,code = <ABS_Y>;
9593 linux,input-type = <EV_ABS>;
9694 linux,input-value = <1>;
97
- gpios = <&pio 0 9 GPIO_ACTIVE_LOW>; /* PA9 */
95
+ gpios = <&pio 0 9 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PA9 */
9896 };
9997
10098 right-joystick-left {
....@@ -102,7 +100,7 @@
102100 linux,code = <ABS_Z>;
103101 linux,input-type = <EV_ABS>;
104102 linux,input-value = <0xffffffff>; /* -1 */
105
- gpios = <&pio 0 1 GPIO_ACTIVE_LOW>; /* PA1 */
103
+ gpios = <&pio 0 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PA1 */
106104 };
107105
108106 right-joystick-right {
....@@ -110,7 +108,7 @@
110108 linux,code = <ABS_Z>;
111109 linux,input-type = <EV_ABS>;
112110 linux,input-value = <1>;
113
- gpios = <&pio 0 0 GPIO_ACTIVE_LOW>; /* PA0 */
111
+ gpios = <&pio 0 0 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PA0 */
114112 };
115113
116114 right-joystick-up {
....@@ -118,7 +116,7 @@
118116 linux,code = <ABS_RZ>;
119117 linux,input-type = <EV_ABS>;
120118 linux,input-value = <0xffffffff>; /* -1 */
121
- gpios = <&pio 0 3 GPIO_ACTIVE_LOW>; /* PA3 */
119
+ gpios = <&pio 0 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PA3 */
122120 };
123121
124122 right-joystick-down {
....@@ -126,7 +124,7 @@
126124 linux,code = <ABS_RZ>;
127125 linux,input-type = <EV_ABS>;
128126 linux,input-value = <1>;
129
- gpios = <&pio 0 4 GPIO_ACTIVE_LOW>; /* PA4 */
127
+ gpios = <&pio 0 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PA4 */
130128 };
131129
132130 dpad-left {
....@@ -134,7 +132,7 @@
134132 linux,code = <ABS_HAT0X>;
135133 linux,input-type = <EV_ABS>;
136134 linux,input-value = <0xffffffff>; /* -1 */
137
- gpios = <&pio 7 23 GPIO_ACTIVE_LOW>; /* PH23 */
135
+ gpios = <&pio 7 23 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PH23 */
138136 };
139137
140138 dpad-right {
....@@ -142,7 +140,7 @@
142140 linux,code = <ABS_HAT0X>;
143141 linux,input-type = <EV_ABS>;
144142 linux,input-value = <1>;
145
- gpios = <&pio 7 24 GPIO_ACTIVE_LOW>; /* PH24 */
143
+ gpios = <&pio 7 24 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PH24 */
146144 };
147145
148146 dpad-up {
....@@ -150,7 +148,7 @@
150148 linux,code = <ABS_HAT0Y>;
151149 linux,input-type = <EV_ABS>;
152150 linux,input-value = <0xffffffff>; /* -1 */
153
- gpios = <&pio 7 25 GPIO_ACTIVE_LOW>; /* PH25 */
151
+ gpios = <&pio 7 25 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PH25 */
154152 };
155153
156154 dpad-down {
....@@ -158,55 +156,55 @@
158156 linux,code = <ABS_HAT0Y>;
159157 linux,input-type = <EV_ABS>;
160158 linux,input-value = <1>;
161
- gpios = <&pio 7 26 GPIO_ACTIVE_LOW>; /* PH26 */
159
+ gpios = <&pio 7 26 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PH26 */
162160 };
163161
164162 x {
165163 label = "Button X";
166164 linux,code = <BTN_X>;
167
- gpios = <&pio 0 16 GPIO_ACTIVE_LOW>; /* PA16 */
165
+ gpios = <&pio 0 16 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PA16 */
168166 };
169167
170168 y {
171169 label = "Button Y";
172170 linux,code = <BTN_Y>;
173
- gpios = <&pio 0 14 GPIO_ACTIVE_LOW>; /* PA14 */
171
+ gpios = <&pio 0 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PA14 */
174172 };
175173
176174 a {
177175 label = "Button A";
178176 linux,code = <BTN_A>;
179
- gpios = <&pio 0 17 GPIO_ACTIVE_LOW>; /* PA17 */
177
+ gpios = <&pio 0 17 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PA17 */
180178 };
181179
182180 b {
183181 label = "Button B";
184182 linux,code = <BTN_B>;
185
- gpios = <&pio 0 15 GPIO_ACTIVE_LOW>; /* PA15 */
183
+ gpios = <&pio 0 15 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PA15 */
186184 };
187185
188186 select {
189187 label = "Select Button";
190188 linux,code = <BTN_SELECT>;
191
- gpios = <&pio 0 11 GPIO_ACTIVE_LOW>; /* PA11 */
189
+ gpios = <&pio 0 11 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PA11 */
192190 };
193191
194192 start {
195193 label = "Start Button";
196194 linux,code = <BTN_START>;
197
- gpios = <&pio 0 12 GPIO_ACTIVE_LOW>; /* PA12 */
195
+ gpios = <&pio 0 12 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PA12 */
198196 };
199197
200198 top-left {
201199 label = "Top Left Button";
202200 linux,code = <BTN_TL>;
203
- gpios = <&pio 7 22 GPIO_ACTIVE_LOW>; /* PH22 */
201
+ gpios = <&pio 7 22 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PH22 */
204202 };
205203
206204 top-right {
207205 label = "Top Right Button";
208206 linux,code = <BTN_TR>;
209
- gpios = <&pio 0 13 GPIO_ACTIVE_LOW>; /* PA13 */
207
+ gpios = <&pio 0 13 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PA13 */
210208 };
211209 };
212210 };
....@@ -306,30 +304,6 @@
306304 status = "okay";
307305 };
308306
309
-&pio {
310
- key_pins_inet9f: key-pins {
311
- pins = "PA0", "PA1", "PA3", "PA4",
312
- "PA5", "PA6", "PA8", "PA9",
313
- "PA11", "PA12", "PA13",
314
- "PA14", "PA15", "PA16", "PA17",
315
- "PH22", "PH23", "PH24", "PH25", "PH26";
316
- function = "gpio_in";
317
- bias-pull-up;
318
- };
319
-
320
- usb0_id_detect_pin: usb0-id-detect-pin {
321
- pins = "PH4";
322
- function = "gpio_in";
323
- bias-pull-up;
324
- };
325
-
326
- usb0_vbus_detect_pin: usb0-vbus-detect-pin {
327
- pins = "PH5";
328
- function = "gpio_in";
329
- bias-pull-down;
330
- };
331
-};
332
-
333307 &reg_dcdc2 {
334308 regulator-always-on;
335309 regulator-min-microvolt = <1000000>;
....@@ -375,10 +349,8 @@
375349 };
376350
377351 &usbphy {
378
- pinctrl-names = "default";
379
- pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
380
- usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
381
- usb0_vbus_det-gpio = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */
352
+ usb0_id_det-gpios = <&pio 7 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PH4 */
353
+ usb0_vbus_det-gpios = <&pio 7 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>; /* PH5 */
382354 usb0_vbus-supply = <&reg_usb0_vbus>;
383355 usb2_vbus-supply = <&reg_usb2_vbus>;
384356 status = "okay";