Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1621625
| From | David Lechner <david@lechnology.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v2 3/3] ARM: dts: da850: Add node for LEGO MINDSTORMS EV3 Battery |
| Date | 2017-04-11 23:10 +0200 |
| Message-ID | <tvbd1-3RY-27@gated-at.bofh.it> (permalink) |
| References | <tvbcZ-3RY-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
This adds a new node to the LEGO MINDSTORMS EV3 device tree for the battery.
Signed-off-by: David Lechner <david@lechnology.com>
---
arch/arm/boot/dts/da850-lego-ev3.dts | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/arch/arm/boot/dts/da850-lego-ev3.dts b/arch/arm/boot/dts/da850-lego-ev3.dts
index c20580a..99cd561 100644
--- a/arch/arm/boot/dts/da850-lego-ev3.dts
+++ b/arch/arm/boot/dts/da850-lego-ev3.dts
@@ -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 {
@@ -235,6 +247,15 @@
0x34 0x00000008 0x0000000f
>;
};
+
+ battery_pins: pinmux_battery_pins {
+ pinctrl-single,bits = <
+ /* GP0[6] */
+ 0x04 0x00000080 0x000000f0
+ /* GP8[8] */
+ 0x4c 0x00000080 0x000000f0
+ >;
+ };
};
&pinconf {
@@ -349,6 +370,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 {
--
2.7.4
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2 0/3] LEGO MINDSTORMS EV3 Battery David Lechner <david@lechnology.com> - 2017-04-11 23:10 +0200
[PATCH v2 3/3] ARM: dts: da850: Add node for LEGO MINDSTORMS EV3 Battery David Lechner <david@lechnology.com> - 2017-04-11 23:10 +0200
Re: [PATCH v2 3/3] ARM: dts: da850: Add node for LEGO MINDSTORMS EV3 Battery Sekhar Nori <nsekhar@ti.com> - 2017-04-14 14:20 +0200
[PATCH v2 2/3] power: supply: New driver for LEGO MINDSTORMS EV3 battery David Lechner <david@lechnology.com> - 2017-04-11 23:10 +0200
Re: [PATCH v2 2/3] power: supply: New driver for LEGO MINDSTORMS EV3 battery Sebastian Reichel <sre@kernel.org> - 2017-04-12 17:00 +0200
csiph-web