52 lines
1.1 KiB
Plaintext
52 lines
1.1 KiB
Plaintext
--- scripts/dtc/include-prefixes/arm/da850-lego-ev3.dts 2017-08-30 04:32:30.000000000 -0400
|
|
+++ scripts/dtc/include-prefixes/arm/da850-lego-ev3.dts 2017-09-03 16:56:17.000000000 -0400
|
|
@@ -172,6 +172,18 @@
|
|
gpio = <&gpio 111 GPIO_ACTIVE_HIGH>;
|
|
enable-active-high;
|
|
};
|
|
+
|
|
+ /*
|
|
+ * The EV3 can use 6-AA batteries or a rechargeable Li-ion battery pack.
|
|
+ */
|
|
+ battery {
|
|
+ pinctrl-names = "default";
|
|
+ pintctrl-0 = <&battery_pins>;
|
|
+ compatible = "lego,ev3-battery";
|
|
+ io-channels = <&adc 4>, <&adc 3>;
|
|
+ io-channel-names = "voltage", "current";
|
|
+ rechargeable-gpios = <&gpio 136 GPIO_ACTIVE_LOW>;
|
|
+ };
|
|
};
|
|
|
|
&pmx_core {
|
|
@@ -228,6 +240,15 @@
|
|
0x34 0x00000008 0x0000000f
|
|
>;
|
|
};
|
|
+
|
|
+ battery_pins: pinmux_battery_pins {
|
|
+ pinctrl-single,bits = <
|
|
+ /* GP0[6] */
|
|
+ 0x04 0x00000080 0x000000f0
|
|
+ /* GP8[8] */
|
|
+ 0x4c 0x00000080 0x000000f0
|
|
+ >;
|
|
+ };
|
|
};
|
|
|
|
&pinconf {
|
|
@@ -342,6 +363,13 @@
|
|
|
|
&gpio {
|
|
status = "okay";
|
|
+
|
|
+ /* Don't pull down battery voltage adc io channel */
|
|
+ batt_volt_en {
|
|
+ gpio-hog;
|
|
+ gpios = <6 GPIO_ACTIVE_HIGH>;
|
|
+ output-low;
|
|
+ };
|
|
};
|
|
|
|
&usb_phy {
|