From: David Lechner <david@lechnology.com> To: linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: David Lechner <david@lechnology.com>, Sebastian Reichel <sre@kernel.org>, Sekhar Nori <nsekhar@ti.com>, Kevin Hilman <khilman@kernel.org>, linux-kernel@vger.kernel.org Subject: [PATCH v2 3/3] ARM: dts: da850: Add node for LEGO MINDSTORMS EV3 Battery Date: Tue, 11 Apr 2017 16:05:23 -0500 [thread overview] Message-ID: <1491944723-32174-4-git-send-email-david@lechnology.com> (raw) In-Reply-To: <1491944723-32174-1-git-send-email-david@lechnology.com> 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
WARNING: multiple messages have this Message-ID (diff)
From: david@lechnology.com (David Lechner) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 3/3] ARM: dts: da850: Add node for LEGO MINDSTORMS EV3 Battery Date: Tue, 11 Apr 2017 16:05:23 -0500 [thread overview] Message-ID: <1491944723-32174-4-git-send-email-david@lechnology.com> (raw) In-Reply-To: <1491944723-32174-1-git-send-email-david@lechnology.com> 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
next prev parent reply other threads:[~2017-04-11 21:06 UTC|newest] Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top 2017-04-11 21:05 [PATCH v2 0/3] LEGO MINDSTORMS EV3 Battery David Lechner 2017-04-11 21:05 ` David Lechner 2017-04-11 21:05 ` [PATCH v2 1/3] dt-bindings: power: supply: New bindings for LEGO MINDSTORMS EV3 battery David Lechner 2017-04-11 21:05 ` David Lechner 2017-04-12 14:53 ` Sebastian Reichel 2017-04-12 14:53 ` Sebastian Reichel 2017-04-11 21:05 ` [PATCH v2 2/3] power: supply: New driver " David Lechner 2017-04-11 21:05 ` David Lechner 2017-04-12 14:53 ` Sebastian Reichel 2017-04-12 14:53 ` Sebastian Reichel 2017-04-11 21:05 ` David Lechner [this message] 2017-04-11 21:05 ` [PATCH v2 3/3] ARM: dts: da850: Add node for LEGO MINDSTORMS EV3 Battery David Lechner 2017-04-14 12:12 ` Sekhar Nori 2017-04-14 12:12 ` Sekhar Nori 2017-04-14 12:12 ` Sekhar Nori
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1491944723-32174-4-git-send-email-david@lechnology.com \ --to=david@lechnology.com \ --cc=khilman@kernel.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-pm@vger.kernel.org \ --cc=nsekhar@ti.com \ --cc=sre@kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.