hc
2024-05-13 9d77db3c730780c8ef5ccd4b66403ff5675cfe4e
kernel/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts
....@@ -110,14 +110,10 @@
110110
111111 &gmac {
112112 pinctrl-names = "default";
113
- pinctrl-0 = <&gmac_pins_rgmii_a>;
114
- phy = <&phy1>;
115
- phy-mode = "rgmii";
113
+ pinctrl-0 = <&gmac_rgmii_pins>;
114
+ phy-handle = <&phy1>;
115
+ phy-mode = "rgmii-id";
116116 status = "okay";
117
-
118
- phy1: ethernet-phy@1 {
119
- reg = <1>;
120
- };
121117 };
122118
123119 &hdmi {
....@@ -131,8 +127,6 @@
131127 };
132128
133129 &i2c0 {
134
- pinctrl-names = "default";
135
- pinctrl-0 = <&i2c0_pins_a>;
136130 status = "okay";
137131
138132 axp209: pmic@34 {
....@@ -143,8 +137,6 @@
143137 };
144138
145139 &i2c1 {
146
- pinctrl-names = "default";
147
- pinctrl-0 = <&i2c1_pins_a>;
148140 status = "okay";
149141
150142 eeprom: eeprom@50 {
....@@ -154,9 +146,17 @@
154146 };
155147 };
156148
149
+&lradc {
150
+ vref-supply = <&reg_vcc3v0>;
151
+};
152
+
153
+&gmac_mdio {
154
+ phy1: ethernet-phy@1 {
155
+ reg = <1>;
156
+ };
157
+};
158
+
157159 &mmc0 {
158
- pinctrl-names = "default";
159
- pinctrl-0 = <&mmc0_pins_a>;
160160 vmmc-supply = <&reg_vcc3v3>;
161161 bus-width = <4>;
162162 cd-gpios = <&pio 7 1 GPIO_ACTIVE_LOW>; /* PH1 */
....@@ -176,42 +176,33 @@
176176 };
177177
178178 &pio {
179
- ahci_pwr_pin_olinuxinolime: ahci_pwr_pin@1 {
180
- pins = "PC3";
181
- function = "gpio_out";
182
- };
179
+ vcc-pa-supply = <&reg_vcc3v3>;
180
+ vcc-pc-supply = <&reg_vcc3v3>;
181
+ vcc-pe-supply = <&reg_ldo3>;
182
+ vcc-pf-supply = <&reg_vcc3v3>;
183
+ vcc-pg-supply = <&reg_ldo4>;
183184
184
- led_pins_olinuxinolime: led_pins@0 {
185
+ led_pins_olinuxinolime: led-pins {
185186 pins = "PH2";
186187 function = "gpio_out";
187188 drive-strength = <20>;
188189 };
189
-
190
- usb0_id_detect_pin: usb0_id_detect_pin@0 {
191
- pins = "PH4";
192
- function = "gpio_in";
193
- bias-pull-up;
194
- };
195
-
196
- usb0_vbus_detect_pin: usb0_vbus_detect_pin@0 {
197
- pins = "PH5";
198
- function = "gpio_in";
199
- bias-pull-down;
200
- };
201
-
202
- usb0_vbus_pin_lime2: usb0_vbus_pin@0 {
203
- pins = "PC17";
204
- function = "gpio_out";
205
- };
206190 };
207191
208192 &reg_ahci_5v {
209
- pinctrl-0 = <&ahci_pwr_pin_olinuxinolime>;
210193 gpio = <&pio 2 3 GPIO_ACTIVE_HIGH>;
211194 status = "okay";
212195 };
213196
214197 #include "axp209.dtsi"
198
+
199
+&ac_power_supply {
200
+ status = "okay";
201
+};
202
+
203
+&battery_power_supply {
204
+ status = "okay";
205
+};
215206
216207 &reg_dcdc2 {
217208 regulator-always-on;
....@@ -245,6 +236,8 @@
245236 regulator-min-microvolt = <2800000>;
246237 regulator-max-microvolt = <2800000>;
247238 regulator-name = "vddio-csi0";
239
+ regulator-soft-start;
240
+ regulator-ramp-delay = <1600>;
248241 };
249242
250243 &reg_ldo4 {
....@@ -254,7 +247,6 @@
254247 };
255248
256249 &reg_usb0_vbus {
257
- pinctrl-0 = <&usb0_vbus_pin_lime2>;
258250 gpio = <&pio 2 17 GPIO_ACTIVE_HIGH>;
259251 status = "okay";
260252 };
....@@ -269,7 +261,7 @@
269261
270262 &uart0 {
271263 pinctrl-names = "default";
272
- pinctrl-0 = <&uart0_pins_a>;
264
+ pinctrl-0 = <&uart0_pb_pins>;
273265 status = "okay";
274266 };
275267
....@@ -279,10 +271,8 @@
279271 };
280272
281273 &usbphy {
282
- pinctrl-names = "default";
283
- pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
284
- usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
285
- usb0_vbus_det-gpio = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */
274
+ usb0_id_det-gpios = <&pio 7 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PH4 */
275
+ usb0_vbus_det-gpios = <&pio 7 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>; /* PH5 */
286276 usb0_vbus-supply = <&reg_usb0_vbus>;
287277 usb1_vbus-supply = <&reg_usb1_vbus>;
288278 usb2_vbus-supply = <&reg_usb2_vbus>;