* [PATCH linux dev-4.17] ARM: dts: aspeed: romulus: Enable iio-hwmon-battery
@ 2018-07-27 5:29 Lei YU
2018-07-30 2:29 ` Lei YU
0 siblings, 1 reply; 2+ messages in thread
From: Lei YU @ 2018-07-27 5:29 UTC (permalink / raw)
To: openbmc
Add iio-hwmon-battery using adc channel 12;
Pull GPIOR3 high to enable RTC_ADC;
Enable adc to make adc running.
Signed-off-by: Lei YU <mine260309@gmail.com>
---
arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts b/arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts
index 852b552..461564c 100644
--- a/arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts
+++ b/arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts
@@ -83,6 +83,11 @@
linux,code = <ASPEED_GPIO(Q, 7)>;
};
};
+
+ iio-hwmon-battery {
+ compatible = "iio-hwmon";
+ io-channels = <&adc 12>;
+ };
};
#include "ibm-power9-cfam.dtsi"
@@ -236,6 +241,12 @@
output-low;
line-name = "seq_cont";
};
+ rtc_adc_en {
+ gpio-hog;
+ gpios = <ASPEED_GPIO(R, 3) GPIO_ACTIVE_HIGH>;
+ output-high;
+ line-name = "rtc_adc_en";
+ };
};
&vuart {
@@ -304,3 +315,7 @@
status = "okay";
};
+&adc {
+ status = "okay";
+};
+
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH linux dev-4.17] ARM: dts: aspeed: romulus: Enable iio-hwmon-battery
2018-07-27 5:29 [PATCH linux dev-4.17] ARM: dts: aspeed: romulus: Enable iio-hwmon-battery Lei YU
@ 2018-07-30 2:29 ` Lei YU
0 siblings, 0 replies; 2+ messages in thread
From: Lei YU @ 2018-07-30 2:29 UTC (permalink / raw)
To: OpenBMC Maillist
Please do NOT merge this patch, as toggling GPIOR3 drains the battery.
On Fri, Jul 27, 2018 at 1:29 PM Lei YU <mine260309@gmail.com> wrote:
>
> Add iio-hwmon-battery using adc channel 12;
> Pull GPIOR3 high to enable RTC_ADC;
> Enable adc to make adc running.
>
> Signed-off-by: Lei YU <mine260309@gmail.com>
> ---
> arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts | 15 +++++++++++++++
> 1 file changed, 15 insertions(+)
>
> diff --git a/arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts b/arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts
> index 852b552..461564c 100644
> --- a/arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts
> +++ b/arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts
> @@ -83,6 +83,11 @@
> linux,code = <ASPEED_GPIO(Q, 7)>;
> };
> };
> +
> + iio-hwmon-battery {
> + compatible = "iio-hwmon";
> + io-channels = <&adc 12>;
> + };
> };
>
> #include "ibm-power9-cfam.dtsi"
> @@ -236,6 +241,12 @@
> output-low;
> line-name = "seq_cont";
> };
> + rtc_adc_en {
> + gpio-hog;
> + gpios = <ASPEED_GPIO(R, 3) GPIO_ACTIVE_HIGH>;
> + output-high;
> + line-name = "rtc_adc_en";
> + };
> };
>
> &vuart {
> @@ -304,3 +315,7 @@
> status = "okay";
> };
>
> +&adc {
> + status = "okay";
> +};
> +
> --
> 2.7.4
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-07-30 2:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-27 5:29 [PATCH linux dev-4.17] ARM: dts: aspeed: romulus: Enable iio-hwmon-battery Lei YU
2018-07-30 2:29 ` Lei YU
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.