hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/arch/arm/boot/dts/sun5i-reference-design-tablet.dtsi
....@@ -54,7 +54,7 @@
5454 pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
5555 brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
5656 default-brightness-level = <8>;
57
- /* TODO: backlight uses axp gpio1 as enable pin */
57
+ enable-gpios = <&axp_gpio 1 GPIO_ACTIVE_HIGH>; /* AXP GPIO1 */
5858 };
5959
6060 chosen {
....@@ -63,8 +63,6 @@
6363 };
6464
6565 &codec {
66
- pinctrl-names = "default";
67
- pinctrl-0 = <&codec_pa_pin>;
6866 allwinner,pa-gpios = <&pio 6 10 GPIO_ACTIVE_HIGH>; /* PG10 */
6967 status = "okay";
7068 };
....@@ -96,8 +94,6 @@
9694 reg = <0x40>;
9795 interrupt-parent = <&pio>;
9896 interrupts = <6 11 IRQ_TYPE_EDGE_FALLING>; /* EINT11 (PG11) */
99
- pinctrl-names = "default";
100
- pinctrl-0 = <&ts_power_pin>;
10197 power-gpios = <&pio 1 3 GPIO_ACTIVE_HIGH>; /* PB3 */
10298 /* Tablet dts must provide reg and compatible */
10399 status = "disabled";
....@@ -125,7 +121,7 @@
125121
126122 &mmc0 {
127123 pinctrl-names = "default";
128
- pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>;
124
+ pinctrl-0 = <&mmc0_pins>;
129125 vmmc-supply = <&reg_vcc3v0>;
130126 bus-width = <4>;
131127 cd-gpios = <&pio 6 0 GPIO_ACTIVE_LOW>; /* PG0 */
....@@ -134,43 +130,6 @@
134130
135131 &otg_sram {
136132 status = "okay";
137
-};
138
-
139
-&pio {
140
- codec_pa_pin: codec_pa_pin@0 {
141
- pins = "PG10";
142
- function = "gpio_out";
143
- };
144
-
145
- mmc0_cd_pin: mmc0_cd_pin@0 {
146
- pins = "PG0";
147
- function = "gpio_in";
148
- bias-pull-up;
149
- };
150
-
151
- ts_power_pin: ts_power_pin {
152
- pins = "PB3";
153
- function = "gpio_out";
154
- drive-strength = <10>;
155
- bias-disable;
156
- };
157
-
158
- usb0_vbus_detect_pin: usb0_vbus_detect_pin@0 {
159
- pins = "PG1";
160
- function = "gpio_in";
161
- bias-pull-down;
162
- };
163
-
164
- usb0_id_detect_pin: usb0_id_detect_pin@0 {
165
- pins = "PG2";
166
- function = "gpio_in";
167
- bias-pull-up;
168
- };
169
-
170
- usb0_vbus_pin_a: usb0_vbus_pin@0 {
171
- pins = "PG12";
172
- function = "gpio_out";
173
- };
174133 };
175134
176135 &reg_dcdc2 {
....@@ -211,7 +170,7 @@
211170
212171 &uart1 {
213172 pinctrl-names = "default";
214
- pinctrl-0 = <&uart1_pins_b>;
173
+ pinctrl-0 = <&uart1_pg_pins>;
215174 status = "okay";
216175 };
217176
....@@ -225,10 +184,8 @@
225184 };
226185
227186 &usbphy {
228
- pinctrl-names = "default";
229
- pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
230
- usb0_id_det-gpio = <&pio 6 2 GPIO_ACTIVE_HIGH>; /* PG2 */
231
- usb0_vbus_det-gpio = <&pio 6 1 GPIO_ACTIVE_HIGH>; /* PG1 */
187
+ usb0_id_det-gpios = <&pio 6 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PG2 */
188
+ usb0_vbus_det-gpios = <&pio 6 1 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>; /* PG1 */
232189 usb0_vbus_power-supply = <&usb_power_supply>;
233190 usb0_vbus-supply = <&reg_usb0_vbus>;
234191 usb1_vbus-supply = <&reg_ldo3>;