Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1301472 > unrolled thread

[PATCH 1/3] ARM: dts: omap5-board-common: enable rtc and charging of backup battery

Started by"H. Nikolaus Schaller" <hns@goldelico.com>
First post2016-01-05 13:10 +0100
Last post2016-01-06 21:00 +0100
Articles 20 on this page of 44 — 8 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 1/3] ARM: dts: omap5-board-common: enable rtc and charging of backup battery "H. Nikolaus Schaller" <hns@goldelico.com> - 2016-01-05 13:10 +0100
    Re: [PATCH 1/3] ARM: dts: omap5-board-common: enable rtc and charging  of backup battery Nishanth Menon <nm@ti.com> - 2016-01-06 00:50 +0100
      Re: [PATCH 1/3] ARM: dts: omap5-board-common: enable rtc and  charging of backup battery Tony Lindgren <tony@atomide.com> - 2016-01-06 02:10 +0100
        Re: [PATCH 1/3] ARM: dts: omap5-board-common: enable rtc and charging of backup battery "H. Nikolaus Schaller" <hns@goldelico.com> - 2016-01-06 09:20 +0100
          Re: [PATCH 1/3] ARM: dts: omap5-board-common: enable rtc and charging of backup battery "H. Nikolaus Schaller" <hns@goldelico.com> - 2016-01-06 17:50 +0100
            Re: [PATCH 1/3] ARM: dts: omap5-board-common: enable rtc and  charging of backup battery Tony Lindgren <tony@atomide.com> - 2016-01-06 18:10 +0100
              Re: [PATCH 1/3] ARM: dts: omap5-board-common: enable rtc and charging of backup battery "H. Nikolaus Schaller" <hns@goldelico.com> - 2016-01-08 19:00 +0100
                Re: [PATCH 1/3] ARM: dts: omap5-board-common: enable rtc and  charging of backup battery Tony Lindgren <tony@atomide.com> - 2016-01-08 19:20 +0100
                  Re: [PATCH 1/3] ARM: dts: omap5-board-common: enable rtc and charging of backup battery "H. Nikolaus Schaller" <hns@goldelico.com> - 2016-01-08 19:40 +0100
                    Re: [PATCH 1/3] ARM: dts: omap5-board-common: enable rtc and  charging of backup battery Tony Lindgren <tony@atomide.com> - 2016-01-08 20:10 +0100
                      Re: [PATCH 1/3] ARM: dts: omap5-board-common: enable rtc and charging of backup battery "H. Nikolaus Schaller" <hns@goldelico.com> - 2016-01-08 20:40 +0100
                        Re: [PATCH 1/3] ARM: dts: omap5-board-common: enable rtc and  charging of backup battery Tony Lindgren <tony@atomide.com> - 2016-01-11 21:30 +0100
                          Re: [PATCH 1/3] ARM: dts: omap5-board-common: enable rtc and  charging of backup battery Tony Lindgren <tony@atomide.com> - 2016-01-12 01:10 +0100
                            Re: [PATCH 1/3] ARM: dts: omap5-board-common: enable rtc and charging of backup battery "H. Nikolaus Schaller" <hns@goldelico.com> - 2016-01-12 14:40 +0100
                              Re: [PATCH 1/3] ARM: dts: omap5-board-common: enable rtc and charging of backup battery "H. Nikolaus Schaller" <hns@goldelico.com> - 2016-01-12 22:30 +0100
                                Re: [PATCH 1/3] ARM: dts: omap5-board-common: enable rtc and charging  of backup battery Nishanth Menon <nm@ti.com> - 2016-01-12 22:40 +0100
                                  Re: [PATCH 1/3] ARM: dts: omap5-board-common: enable rtc and  charging of backup battery Tony Lindgren <tony@atomide.com> - 2016-01-12 23:20 +0100
                                Re: [PATCH 1/3] ARM: dts: omap5-board-common: enable rtc and charging of backup battery "H. Nikolaus Schaller" <hns@goldelico.com> - 2016-01-13 11:30 +0100
                                  Re: [PATCH 1/3] ARM: dts: omap5-board-common: enable rtc and charging  of backup battery Nishanth Menon <nm@ti.com> - 2016-01-13 16:00 +0100
                                    Re: [PATCH 1/3] ARM: dts: omap5-board-common: enable rtc and charging  of backup battery Grygorii Strashko <grygorii.strashko@ti.com> - 2016-01-13 16:20 +0100
                                      Re: [PATCH 1/3] ARM: dts: omap5-board-common: enable rtc and  charging of backup battery Tony Lindgren <tony@atomide.com> - 2016-01-13 17:50 +0100
                                        Re: [PATCH 1/3] ARM: dts: omap5-board-common: enable rtc and charging  of backup battery Grygorii Strashko <grygorii.strashko@ti.com> - 2016-01-13 18:20 +0100
                                          Re: [PATCH 1/3] ARM: dts: omap5-board-common: enable rtc and charging  of backup battery Nishanth Menon <nm@ti.com> - 2016-01-13 18:40 +0100
                                            Re: [PATCH 1/3] ARM: dts: omap5-board-common: enable rtc and charging of backup battery "H. Nikolaus Schaller" <hns@goldelico.com> - 2016-01-13 19:10 +0100
                                              Re: [PATCH 1/3] ARM: dts: omap5-board-common: enable rtc and charging  of backup battery Nishanth Menon <nm@ti.com> - 2016-01-13 19:30 +0100
                                        Re: [PATCH 1/3] ARM: dts: omap5-board-common: enable rtc and charging  of backup battery Nishanth Menon <nm@ti.com> - 2016-01-13 18:30 +0100
                                          Re: [PATCH 1/3] ARM: dts: omap5-board-common: enable rtc and charging of backup battery "H. Nikolaus Schaller" <hns@goldelico.com> - 2016-01-13 19:10 +0100
                                            Re: [PATCH 1/3] ARM: dts: omap5-board-common: enable rtc and charging  of backup battery Nishanth Menon <nm@ti.com> - 2016-01-13 19:40 +0100
                                              Re: [PATCH 1/3] ARM: dts: omap5-board-common: enable rtc and charging of backup battery "H. Nikolaus Schaller" <hns@goldelico.com> - 2016-01-13 19:50 +0100
                                                Re: [PATCH 1/3] ARM: dts: omap5-board-common: enable rtc and charging  of backup battery Nishanth Menon <nm@ti.com> - 2016-01-13 20:10 +0100
                                                  Re: [PATCH 1/3] ARM: dts: omap5-board-common: enable rtc and charging  of backup battery Grygorii Strashko <grygorii.strashko@ti.com> - 2016-01-13 20:30 +0100
                                                  Re: [PATCH 1/3] ARM: dts: omap5-board-common: enable rtc and  charging of backup battery Tony Lindgren <tony@atomide.com> - 2016-01-13 20:50 +0100
                                                    Re: [PATCH 1/3] ARM: dts: omap5-board-common: enable rtc and charging  of backup battery Nishanth Menon <menon.nishanth@gmail.com> - 2016-01-13 23:40 +0100
                                                      Re: [PATCH 1/3] ARM: dts: omap5-board-common: enable rtc and charging  of backup battery Keerthy <a0393675@ti.com> - 2016-01-14 11:10 +0100
                                                        Re: [PATCH 1/3] ARM: dts: omap5-board-common: enable rtc and charging  of backup battery Nishanth Menon <nm@ti.com> - 2016-01-14 18:50 +0100
                                                          Re: [PATCH 1/3] ARM: dts: omap5-board-common: enable rtc and  charging of backup battery Tony Lindgren <tony@atomide.com> - 2016-01-14 19:40 +0100
                                          Re: [PATCH 1/3] ARM: dts: omap5-board-common: enable rtc and  charging of backup battery Tony Lindgren <tony@atomide.com> - 2016-01-13 19:10 +0100
                                            Re: [PATCH 1/3] ARM: dts: omap5-board-common: enable rtc and charging  of backup battery Nishanth Menon <nm@ti.com> - 2016-01-13 19:20 +0100
          Re: [PATCH 1/3] ARM: dts: omap5-board-common: enable rtc and  charging of backup battery Tony Lindgren <tony@atomide.com> - 2016-01-06 17:50 +0100
      Re: [PATCH 1/3] ARM: dts: omap5-board-common: enable rtc and charging of backup battery "H. Nikolaus Schaller" <hns@goldelico.com> - 2016-01-06 08:50 +0100
        Re: [PATCH 1/3] ARM: dts: omap5-board-common: enable rtc and charging  of backup battery Laxman Dewangan <ldewangan@nvidia.com> - 2016-01-06 09:30 +0100
          Re: [PATCH 1/3] ARM: dts: omap5-board-common: enable rtc and charging  of backup battery Nishanth Menon <nm@ti.com> - 2016-01-06 15:40 +0100
            Re: [PATCH 1/3] ARM: dts: omap5-board-common: enable rtc and charging  of backup battery Rob Herring <robh+dt@kernel.org> - 2016-01-06 20:40 +0100
              Re: [PATCH 1/3] ARM: dts: omap5-board-common: enable rtc and charging  of backup battery Nishanth Menon <nm@ti.com> - 2016-01-06 21:00 +0100

Page 1 of 3  [1] 2 3  Next page →


#1301472 — [PATCH 1/3] ARM: dts: omap5-board-common: enable rtc and charging of backup battery

From"H. Nikolaus Schaller" <hns@goldelico.com>
Date2016-01-05 13:10 +0100
Subject[PATCH 1/3] ARM: dts: omap5-board-common: enable rtc and charging of backup battery
Message-ID<qNyB4-2yO-9@gated-at.bofh.it>
tested on OMP5432 EVM

Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
---
 arch/arm/boot/dts/omap5-board-common.dtsi | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/arch/arm/boot/dts/omap5-board-common.dtsi b/arch/arm/boot/dts/omap5-board-common.dtsi
index 5cf76a1..30c0d3b 100644
--- a/arch/arm/boot/dts/omap5-board-common.dtsi
+++ b/arch/arm/boot/dts/omap5-board-common.dtsi
@@ -358,6 +358,14 @@
 			#clock-cells = <0>;
 		};
 
+		rtc {
+			compatible = "ti,palmas-rtc";
+			interrupt-parent = <&palmas>;
+			interrupts = <8 IRQ_TYPE_NONE>;
+			ti,backup-battery-chargeable;
+			ti,backup-battery-charge-high-current;
+		};
+
 		palmas_pmic {
 			compatible = "ti,palmas-pmic";
 			interrupt-parent = <&palmas>;
-- 
2.5.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1302275 — Re: [PATCH 1/3] ARM: dts: omap5-board-common: enable rtc and charging of backup battery

FromNishanth Menon <nm@ti.com>
Date2016-01-06 00:50 +0100
SubjectRe: [PATCH 1/3] ARM: dts: omap5-board-common: enable rtc and charging of backup battery
Message-ID<qNJwt-1rW-7@gated-at.bofh.it>
In reply to#1301472
On 01/05/2016 06:01 AM, H. Nikolaus Schaller wrote:
> tested on OMP5432 EVM
> 
> Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
> ---
>  arch/arm/boot/dts/omap5-board-common.dtsi | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/omap5-board-common.dtsi b/arch/arm/boot/dts/omap5-board-common.dtsi
> index 5cf76a1..30c0d3b 100644
> --- a/arch/arm/boot/dts/omap5-board-common.dtsi
> +++ b/arch/arm/boot/dts/omap5-board-common.dtsi
> @@ -358,6 +358,14 @@
>  			#clock-cells = <0>;
>  		};
>  
> +		rtc {
> +			compatible = "ti,palmas-rtc";
> +			interrupt-parent = <&palmas>;
> +			interrupts = <8 IRQ_TYPE_NONE>;

IRQ_TYPE_NONE is not correct here -> it should have some polarity - if
it had none, there'd be no interrupt, right?

> +			ti,backup-battery-chargeable;
> +			ti,backup-battery-charge-high-current;
> +		};
> +
>  		palmas_pmic {
>  			compatible = "ti,palmas-pmic";
>  			interrupt-parent = <&palmas>;
> 


-- 
Regards,
Nishanth Menon
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1302307 — Re: [PATCH 1/3] ARM: dts: omap5-board-common: enable rtc and charging of backup battery

FromTony Lindgren <tony@atomide.com>
Date2016-01-06 02:10 +0100
SubjectRe: [PATCH 1/3] ARM: dts: omap5-board-common: enable rtc and charging of backup battery
Message-ID<qNKLU-2s3-19@gated-at.bofh.it>
In reply to#1302275
* Nishanth Menon <nm@ti.com> [160105 15:40]:
> On 01/05/2016 06:01 AM, H. Nikolaus Schaller wrote:
> > tested on OMP5432 EVM
> > 
> > Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
> > ---
> >  arch/arm/boot/dts/omap5-board-common.dtsi | 8 ++++++++
> >  1 file changed, 8 insertions(+)
> > 
> > diff --git a/arch/arm/boot/dts/omap5-board-common.dtsi b/arch/arm/boot/dts/omap5-board-common.dtsi
> > index 5cf76a1..30c0d3b 100644
> > --- a/arch/arm/boot/dts/omap5-board-common.dtsi
> > +++ b/arch/arm/boot/dts/omap5-board-common.dtsi
> > @@ -358,6 +358,14 @@
> >  			#clock-cells = <0>;
> >  		};
> >  
> > +		rtc {
> > +			compatible = "ti,palmas-rtc";
> > +			interrupt-parent = <&palmas>;
> > +			interrupts = <8 IRQ_TYPE_NONE>;
> 
> IRQ_TYPE_NONE is not correct here -> it should have some polarity - if
> it had none, there'd be no interrupt, right?

Also I'm not seeing just zeroes coming from RTC after typing hwclock
on omap5-uevm. It's working on x15 though.

Nikolaus, is hwclock command working for you on omap5-uevm?

Regards,

Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1302452

From"H. Nikolaus Schaller" <hns@goldelico.com>
Date2016-01-06 09:20 +0100
Message-ID<qNRu3-6Yg-15@gated-at.bofh.it>
In reply to#1302307
Hi Tony,

Am 06.01.2016 um 02:00 schrieb Tony Lindgren <tony@atomide.com>:

> * Nishanth Menon <nm@ti.com> [160105 15:40]:
>> On 01/05/2016 06:01 AM, H. Nikolaus Schaller wrote:
>>> tested on OMP5432 EVM
>>> 
>>> Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
>>> ---
>>> arch/arm/boot/dts/omap5-board-common.dtsi | 8 ++++++++
>>> 1 file changed, 8 insertions(+)
>>> 
>>> diff --git a/arch/arm/boot/dts/omap5-board-common.dtsi b/arch/arm/boot/dts/omap5-board-common.dtsi
>>> index 5cf76a1..30c0d3b 100644
>>> --- a/arch/arm/boot/dts/omap5-board-common.dtsi
>>> +++ b/arch/arm/boot/dts/omap5-board-common.dtsi
>>> @@ -358,6 +358,14 @@
>>> 			#clock-cells = <0>;
>>> 		};
>>> 
>>> +		rtc {
>>> +			compatible = "ti,palmas-rtc";
>>> +			interrupt-parent = <&palmas>;
>>> +			interrupts = <8 IRQ_TYPE_NONE>;
>> 
>> IRQ_TYPE_NONE is not correct here -> it should have some polarity - if
>> it had none, there'd be no interrupt, right?
> 
> Also I'm not seeing just zeroes coming from RTC after typing hwclock
> on omap5-uevm. It's working on x15 though.
> 
> Nikolaus, is hwclock command working for you on omap5-uevm?

Well, yes and no. It appears it *was* working when tested last time
(we sometimes have months of delay for submitting patches upstream).

I have found an SD image with 4.3-rc6 with this patch in the dtb and
there it works. With 4.4-rc8 it does not work. hwclock command hangs for
10 seconds (I guess some timeout).

I have checked the dtb and in both cases it is interrupts = <8 0>;

xxd /sys/firmware/devicetree/base/ocp/i2c@48070000/palmas@48/rtc/interrupts
0000000: 0000 0008 0000 0000

So I think something has changed in the rtc driver or somewhere else.

BR,
Nikolaus

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1302889

From"H. Nikolaus Schaller" <hns@goldelico.com>
Date2016-01-06 17:50 +0100
Message-ID<qNZrB-3H4-7@gated-at.bofh.it>
In reply to#1302452
Hi Tony,

Am 06.01.2016 um 17:41 schrieb Tony Lindgren <tony@atomide.com>:

> Hi,
> 
> * H. Nikolaus Schaller <hns@goldelico.com> [160106 00:12]:
>> Am 06.01.2016 um 02:00 schrieb Tony Lindgren <tony@atomide.com>:
>>> 
>>> Also I'm not seeing just zeroes coming from RTC after typing hwclock
>>> on omap5-uevm. It's working on x15 though.
>>> 
>>> Nikolaus, is hwclock command working for you on omap5-uevm?
>> 
>> Well, yes and no. It appears it *was* working when tested last time
>> (we sometimes have months of delay for submitting patches upstream).
>> 
>> I have found an SD image with 4.3-rc6 with this patch in the dtb and
>> there it works. With 4.4-rc8 it does not work. hwclock command hangs for
>> 10 seconds (I guess some timeout).
>> 
>> I have checked the dtb and in both cases it is interrupts = <8 0>;
>> 
>> xxd /sys/firmware/devicetree/base/ocp/i2c@48070000/palmas@48/rtc/interrupts
>> 0000000: 0000 0008 0000 0000
>> 
>> So I think something has changed in the rtc driver or somewhere else.
> 
> I just gave it a try on v4.3-rc6 with omap5-uevm.dts patched for
> RTC, and I still don't have hwclock working with RTC.
> 
> It seems you have some additional patches there that make it work?

Hm. Not that I am aware of. We just did add the rtc nodes but did not
touch palmas drivers (except adding the gpadc of this patch series).

> 
> I guess it could also be a bootloader change if it's a different
> SD image that works for you.

Yes, it is using a 2 years old U-Boot instead 2015.10 compiled from
source. I will try to find out if it makes a difference.

BR,
Nikolaus

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1302898 — Re: [PATCH 1/3] ARM: dts: omap5-board-common: enable rtc and charging of backup battery

FromTony Lindgren <tony@atomide.com>
Date2016-01-06 18:10 +0100
SubjectRe: [PATCH 1/3] ARM: dts: omap5-board-common: enable rtc and charging of backup battery
Message-ID<qNZKW-43H-3@gated-at.bofh.it>
In reply to#1302889
* H. Nikolaus Schaller <hns@goldelico.com> [160106 08:48]:
> Hi Tony,
> 
> Am 06.01.2016 um 17:41 schrieb Tony Lindgren <tony@atomide.com>:
> 
> > Hi,
> > 
> > * H. Nikolaus Schaller <hns@goldelico.com> [160106 00:12]:
> >> Am 06.01.2016 um 02:00 schrieb Tony Lindgren <tony@atomide.com>:
> >>> 
> >>> Also I'm not seeing just zeroes coming from RTC after typing hwclock
> >>> on omap5-uevm. It's working on x15 though.
> >>> 
> >>> Nikolaus, is hwclock command working for you on omap5-uevm?
> >> 
> >> Well, yes and no. It appears it *was* working when tested last time
> >> (we sometimes have months of delay for submitting patches upstream).
> >> 
> >> I have found an SD image with 4.3-rc6 with this patch in the dtb and
> >> there it works. With 4.4-rc8 it does not work. hwclock command hangs for
> >> 10 seconds (I guess some timeout).
> >> 
> >> I have checked the dtb and in both cases it is interrupts = <8 0>;
> >> 
> >> xxd /sys/firmware/devicetree/base/ocp/i2c@48070000/palmas@48/rtc/interrupts
> >> 0000000: 0000 0008 0000 0000
> >> 
> >> So I think something has changed in the rtc driver or somewhere else.
> > 
> > I just gave it a try on v4.3-rc6 with omap5-uevm.dts patched for
> > RTC, and I still don't have hwclock working with RTC.
> > 
> > It seems you have some additional patches there that make it work?
> 
> Hm. Not that I am aware of. We just did add the rtc nodes but did not
> touch palmas drivers (except adding the gpadc of this patch series).

OK

> > I guess it could also be a bootloader change if it's a different
> > SD image that works for you.
> 
> Yes, it is using a 2 years old U-Boot instead 2015.10 compiled from
> source. I will try to find out if it makes a difference.

OK. It could be also some .config change with something built-in?

Regards,

Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1304779

From"H. Nikolaus Schaller" <hns@goldelico.com>
Date2016-01-08 19:00 +0100
Message-ID<qOJur-1Gl-17@gated-at.bofh.it>
In reply to#1302898
Tony,
it is strange. It now works under unknown conditions - without any obvoius change.

Am 06.01.2016 um 18:09 schrieb Tony Lindgren <tony@atomide.com>:

> * H. Nikolaus Schaller <hns@goldelico.com> [160106 08:48]:
>> Hi Tony,
>> 
>> Am 06.01.2016 um 17:41 schrieb Tony Lindgren <tony@atomide.com>:
>> 
>>> Hi,
>>> 
>>> * H. Nikolaus Schaller <hns@goldelico.com> [160106 00:12]:
>>>> Am 06.01.2016 um 02:00 schrieb Tony Lindgren <tony@atomide.com>:
>>>>> 
>>>>> Also I'm not seeing just zeroes coming from RTC after typing hwclock
>>>>> on omap5-uevm. It's working on x15 though.
>>>>> 
>>>>> Nikolaus, is hwclock command working for you on omap5-uevm?
>>>> 
>>>> Well, yes and no. It appears it *was* working when tested last time
>>>> (we sometimes have months of delay for submitting patches upstream).
>>>> 
>>>> I have found an SD image with 4.3-rc6 with this patch in the dtb and
>>>> there it works. With 4.4-rc8 it does not work. hwclock command hangs for
>>>> 10 seconds (I guess some timeout).
>>>> 
>>>> I have checked the dtb and in both cases it is interrupts = <8 0>;
>>>> 
>>>> xxd /sys/firmware/devicetree/base/ocp/i2c@48070000/palmas@48/rtc/interrupts
>>>> 0000000: 0000 0008 0000 0000
>>>> 
>>>> So I think something has changed in the rtc driver or somewhere else.
>>> 
>>> I just gave it a try on v4.3-rc6 with omap5-uevm.dts patched for
>>> RTC, and I still don't have hwclock working with RTC.
>>> 
>>> It seems you have some additional patches there that make it work?
>> 
>> Hm. Not that I am aware of. We just did add the rtc nodes but did not
>> touch palmas drivers (except adding the gpadc of this patch series).
> 
> OK
> 
>>> I guess it could also be a bootloader change if it's a different
>>> SD image that works for you.
>> 
>> Yes, it is using a 2 years old U-Boot instead 2015.10 compiled from
>> source. I will try to find out if it makes a difference.
> 
> OK. It could be also some .config change with something built-in?

I have compared /proc/config.gz from both systems and /sys/firmware/fdt
with no significant and obvious change.

Then I booted the 4.4-rc8 again and this time it worked.

To verify, I have checked out linux-next this morning, cherry-picked this palmas
rtc patch, compiled with omap2plus defconfig, and used the omap5-uevm.dtb. And
hwclock works after doing a modprobe rtc_palmas.

Then I did the same with official v4.4-rc8 and hwclock hangs. And now our
4.4-rc8 production kernel hangs again as well. Even if I use the
DTB from the 4.3 kernel.

So I think it is something which is unstable in 4.4-rc8 that is (probably) fixed in
linux-next and unrelated to this DT patch.

But I have no hint or idea what it is.

BR,
Nikolaus

[toc] | [prev] | [next] | [standalone]


#1304833 — Re: [PATCH 1/3] ARM: dts: omap5-board-common: enable rtc and charging of backup battery

FromTony Lindgren <tony@atomide.com>
Date2016-01-08 19:20 +0100
SubjectRe: [PATCH 1/3] ARM: dts: omap5-board-common: enable rtc and charging of backup battery
Message-ID<qOJNO-25i-49@gated-at.bofh.it>
In reply to#1304779
* H. Nikolaus Schaller <hns@goldelico.com> [160108 09:50]:
> Tony,
> it is strange. It now works under unknown conditions - without any obvoius change.
> 
> Am 06.01.2016 um 18:09 schrieb Tony Lindgren <tony@atomide.com>:
> > 
> > OK. It could be also some .config change with something built-in?
> 
> I have compared /proc/config.gz from both systems and /sys/firmware/fdt
> with no significant and obvious change.
> 
> Then I booted the 4.4-rc8 again and this time it worked.
> 
> To verify, I have checked out linux-next this morning, cherry-picked this palmas
> rtc patch, compiled with omap2plus defconfig, and used the omap5-uevm.dtb. And
> hwclock works after doing a modprobe rtc_palmas.

Weird. No luck here with current linux next or anything.

> Then I did the same with official v4.4-rc8 and hwclock hangs. And now our
> 4.4-rc8 production kernel hangs again as well. Even if I use the
> DTB from the 4.3 kernel.

I'm not seeing the RTC second increase in u-boot either, this
should show it:

# i2c md 0x48 0x100

Of course the rtc may not be enabled in u-boot unlike for x15.

> So I think it is something which is unstable in 4.4-rc8 that is (probably) fixed in
> linux-next and unrelated to this DT patch.
> 
> But I have no hint or idea what it is.

Or something hangs the RTC? And the back-up battery has to drain to
reset the RTC somehow?

Regards,

Tony

[toc] | [prev] | [next] | [standalone]


#1304884

From"H. Nikolaus Schaller" <hns@goldelico.com>
Date2016-01-08 19:40 +0100
Message-ID<qOK79-2eA-43@gated-at.bofh.it>
In reply to#1304833
Am 08.01.2016 um 19:15 schrieb Tony Lindgren <tony@atomide.com>:

> * H. Nikolaus Schaller <hns@goldelico.com> [160108 09:50]:
>> Tony,
>> it is strange. It now works under unknown conditions - without any obvoius change.
>> 
>> Am 06.01.2016 um 18:09 schrieb Tony Lindgren <tony@atomide.com>:
>>> 
>>> OK. It could be also some .config change with something built-in?
>> 
>> I have compared /proc/config.gz from both systems and /sys/firmware/fdt
>> with no significant and obvious change.
>> 
>> Then I booted the 4.4-rc8 again and this time it worked.
>> 
>> To verify, I have checked out linux-next this morning, cherry-picked this palmas
>> rtc patch, compiled with omap2plus defconfig, and used the omap5-uevm.dtb. And
>> hwclock works after doing a modprobe rtc_palmas.
> 
> Weird. No luck here with current linux next or anything.
> 
>> Then I did the same with official v4.4-rc8 and hwclock hangs. And now our
>> 4.4-rc8 production kernel hangs again as well. Even if I use the
>> DTB from the 4.3 kernel.
> 
> I'm not seeing the RTC second increase in u-boot either, this
> should show it:
> 
> # i2c md 0x48 0x100
> 
> Of course the rtc may not be enabled in u-boot unlike for x15.
> 
>> So I think it is something which is unstable in 4.4-rc8 that is (probably) fixed in
>> linux-next and unrelated to this DT patch.
>> 
>> But I have no hint or idea what it is.
> 
> Or something hangs the RTC? And the back-up battery has to drain to
> reset the RTC somehow?

Indeed it could be something like this. I already suspected that it depends
on boot order of some components.

But you get the /dev/rtc and /sys/class/rtc nodes? This is what this patch
should enable (and not fix potential driver issues).

BR,
Nikolaus

[toc] | [prev] | [next] | [standalone]


#1304940 — Re: [PATCH 1/3] ARM: dts: omap5-board-common: enable rtc and charging of backup battery

FromTony Lindgren <tony@atomide.com>
Date2016-01-08 20:10 +0100
SubjectRe: [PATCH 1/3] ARM: dts: omap5-board-common: enable rtc and charging of backup battery
Message-ID<qOKAa-2GN-43@gated-at.bofh.it>
In reply to#1304884
* H. Nikolaus Schaller <hns@goldelico.com> [160108 10:33]:
> Am 08.01.2016 um 19:15 schrieb Tony Lindgren <tony@atomide.com>:
> > * H. Nikolaus Schaller <hns@goldelico.com> [160108 09:50]:
> > 
> >> So I think it is something which is unstable in 4.4-rc8 that is (probably) fixed in
> >> linux-next and unrelated to this DT patch.
> >> 
> >> But I have no hint or idea what it is.
> > 
> > Or something hangs the RTC? And the back-up battery has to drain to
> > reset the RTC somehow?
> 
> Indeed it could be something like this. I already suspected that it depends
> on boot order of some components.
> 
> But you get the /dev/rtc and /sys/class/rtc nodes? This is what this patch
> should enable (and not fix potential driver issues).

Yes no problems with $subject patch. It's just the we also need
to figure out why RTC does not work :)

Regards,

Tony

[toc] | [prev] | [next] | [standalone]


#1304957

From"H. Nikolaus Schaller" <hns@goldelico.com>
Date2016-01-08 20:40 +0100
Message-ID<qOL3d-2Tb-35@gated-at.bofh.it>
In reply to#1304940
Am 08.01.2016 um 20:04 schrieb Tony Lindgren <tony@atomide.com>:

> * H. Nikolaus Schaller <hns@goldelico.com> [160108 10:33]:
>> Am 08.01.2016 um 19:15 schrieb Tony Lindgren <tony@atomide.com>:
>>> * H. Nikolaus Schaller <hns@goldelico.com> [160108 09:50]:
>>> 
>>>> So I think it is something which is unstable in 4.4-rc8 that is (probably) fixed in
>>>> linux-next and unrelated to this DT patch.
>>>> 
>>>> But I have no hint or idea what it is.
>>> 
>>> Or something hangs the RTC? And the back-up battery has to drain to
>>> reset the RTC somehow?
>> 
>> Indeed it could be something like this. I already suspected that it depends
>> on boot order of some components.
>> 
>> But you get the /dev/rtc and /sys/class/rtc nodes? This is what this patch
>> should enable (and not fix potential driver issues).
> 
> Yes no problems with $subject patch. It's just the we also need
> to figure out why RTC does not work :)

Yes indeed. I can not focus on that at the moment but as soon as we have
the new Pyra handheld devices (with OMAP5+Palmas) running, there will
be more developers to look at it.

BR,
Nikolaus

[toc] | [prev] | [next] | [standalone]


#1306650 — Re: [PATCH 1/3] ARM: dts: omap5-board-common: enable rtc and charging of backup battery

FromTony Lindgren <tony@atomide.com>
Date2016-01-11 21:30 +0100
SubjectRe: [PATCH 1/3] ARM: dts: omap5-board-common: enable rtc and charging of backup battery
Message-ID<qPRgf-7mV-11@gated-at.bofh.it>
In reply to#1304957
* H. Nikolaus Schaller <hns@goldelico.com> [160108 11:32]:
> 
> Am 08.01.2016 um 20:04 schrieb Tony Lindgren <tony@atomide.com>:
> 
> > * H. Nikolaus Schaller <hns@goldelico.com> [160108 10:33]:
> >> Am 08.01.2016 um 19:15 schrieb Tony Lindgren <tony@atomide.com>:
> >>> * H. Nikolaus Schaller <hns@goldelico.com> [160108 09:50]:
> >>> 
> >>>> So I think it is something which is unstable in 4.4-rc8 that is (probably) fixed in
> >>>> linux-next and unrelated to this DT patch.
> >>>> 
> >>>> But I have no hint or idea what it is.
> >>> 
> >>> Or something hangs the RTC? And the back-up battery has to drain to
> >>> reset the RTC somehow?
> >> 
> >> Indeed it could be something like this. I already suspected that it depends
> >> on boot order of some components.
> >> 
> >> But you get the /dev/rtc and /sys/class/rtc nodes? This is what this patch
> >> should enable (and not fix potential driver issues).
> > 
> > Yes no problems with $subject patch. It's just the we also need
> > to figure out why RTC does not work :)
> 
> Yes indeed. I can not focus on that at the moment but as soon as we have
> the new Pyra handheld devices (with OMAP5+Palmas) running, there will
> be more developers to look at it.

OK so the issue is that the twl msecure pin should be high to enable
the RTC registers. We used to have that code with platform_data, but
no longer have it with device tree based booting. I'll send a patch
for that.

Curiously setting jumper j5 on beagle-x15 that controls what used to
be the msecure and now is powerhold, does the opposite.. The
device boots automatically but RTC is stopped?

Regards,

Tony

[toc] | [prev] | [next] | [standalone]


#1306843 — Re: [PATCH 1/3] ARM: dts: omap5-board-common: enable rtc and charging of backup battery

FromTony Lindgren <tony@atomide.com>
Date2016-01-12 01:10 +0100
SubjectRe: [PATCH 1/3] ARM: dts: omap5-board-common: enable rtc and charging of backup battery
Message-ID<qPUH8-1tj-5@gated-at.bofh.it>
In reply to#1306650
* Tony Lindgren <tony@atomide.com> [160111 12:27]:
> 
> OK so the issue is that the twl msecure pin should be high to enable
> the RTC registers. We used to have that code with platform_data, but
> no longer have it with device tree based booting. I'll send a patch
> for that.
> 
> Curiously setting jumper j5 on beagle-x15 that controls what used to
> be the msecure and now is powerhold, does the opposite.. The
> device boots automatically but RTC is stopped?

And here's a fix the issue for omap5. Beagle-x15 needs to be
investigated more.

Care to test it with your RTC enabling patch?

Regards,

Tony

8< ---------------
From: Tony Lindgren <tony@atomide.com>
Date: Mon, 11 Jan 2016 14:35:24 -0800
Subject: [PATCH] ARM: dts: Fix omap5 PMIC control lines for RTC writes

The palmas PMIC has some control lines that need to be muxed properly
for things to work. The sys_nirq pin is used for interrupts, and msecure
pin is used for enabling writes to some PMIC registers.

Without these pins configured properly things can fail in mysterious
ways. For example, we can't update the RTC registers on palmas PMIC
unless the msecure pin is configured. And this is probably the reason
why we had RTC missing from the omap5 dts file.

According to "OMAP5430 ES2.0 Data Manual [Public] VErsion A (Rev. F)"
swps052f.pdf, mux mode 1 is for sys_drm_msecure so there's no need to
configure it as a GPIO pin.

Signed-off-by: Tony Lindgren <tony@atomide.com>

--- a/arch/arm/boot/dts/omap5-board-common.dtsi
+++ b/arch/arm/boot/dts/omap5-board-common.dtsi
@@ -213,6 +213,12 @@
 		>;
 	};
 
+	palmas_msecure_pins: palmas_msecure_pins {
+		pinctrl-single,pins = <
+			OMAP5_IOPAD(0x180, PIN_OUTPUT | MUX_MODE1) /* gpio8_234.sys_drm_msecure */
+		>;
+	};
+
 	usbhost_pins: pinmux_usbhost_pins {
 		pinctrl-single,pins = <
 			0x84 (PIN_INPUT | MUX_MODE0) /* usbb2_hsic_strobe */
@@ -278,6 +284,12 @@
 			&usbhost_wkup_pins
 	>;
 
+	palmas_sys_nirq_pins: pinmux_palmas_sys_nirq_pins {
+		pinctrl-single,pins = <
+			OMAP5_IOPAD(0x068, PIN_INPUT_PULLUP | MUX_MODE0) /* sys_nirq1 */
+		>;
+	};
+
 	usbhost_wkup_pins: pinmux_usbhost_wkup_pins {
 		pinctrl-single,pins = <
 			0x1A (PIN_OUTPUT | MUX_MODE0) /* fref_clk1_out, USB hub clk */
@@ -345,6 +357,8 @@
 		interrupt-controller;
 		#interrupt-cells = <2>;
 		ti,system-power-controller;
+		pinctrl-names = "default";
+		pinctrl-0 = <&palmas_sys_nirq_pins &palmas_msecure_pins>;
 
 		extcon_usb3: palmas_usb {
 			compatible = "ti,palmas-usb-vid";

[toc] | [prev] | [next] | [standalone]


#1307400

From"H. Nikolaus Schaller" <hns@goldelico.com>
Date2016-01-12 14:40 +0100
Message-ID<qQ7kZ-1vx-1@gated-at.bofh.it>
In reply to#1306843
Hi Tony,

Am 12.01.2016 um 01:09 schrieb Tony Lindgren <tony@atomide.com>:

> * Tony Lindgren <tony@atomide.com> [160111 12:27]:
>> 
>> OK so the issue is that the twl msecure pin should be high to enable
>> the RTC registers. We used to have that code with platform_data, but
>> no longer have it with device tree based booting. I'll send a patch
>> for that.
>> 
>> Curiously setting jumper j5 on beagle-x15 that controls what used to
>> be the msecure and now is powerhold, does the opposite.. The
>> device boots automatically but RTC is stopped?
> 
> And here's a fix the issue for omap5. Beagle-x15 needs to be
> investigated more.
> 
> Care to test it with your RTC enabling patch?

yes, I will test asap.

Reminds me on some issues we did have with msecure and twl4030 rtc some years ago.

BR,
Nikolaus

> 
> Regards,
> 
> Tony
> 
> 8< ---------------
> From: Tony Lindgren <tony@atomide.com>
> Date: Mon, 11 Jan 2016 14:35:24 -0800
> Subject: [PATCH] ARM: dts: Fix omap5 PMIC control lines for RTC writes
> 
> The palmas PMIC has some control lines that need to be muxed properly
> for things to work. The sys_nirq pin is used for interrupts, and msecure
> pin is used for enabling writes to some PMIC registers.
> 
> Without these pins configured properly things can fail in mysterious
> ways. For example, we can't update the RTC registers on palmas PMIC
> unless the msecure pin is configured. And this is probably the reason
> why we had RTC missing from the omap5 dts file.
> 
> According to "OMAP5430 ES2.0 Data Manual [Public] VErsion A (Rev. F)"
> swps052f.pdf, mux mode 1 is for sys_drm_msecure so there's no need to
> configure it as a GPIO pin.
> 
> Signed-off-by: Tony Lindgren <tony@atomide.com>
> 
> --- a/arch/arm/boot/dts/omap5-board-common.dtsi
> +++ b/arch/arm/boot/dts/omap5-board-common.dtsi
> @@ -213,6 +213,12 @@
> 		>;
> 	};
> 
> +	palmas_msecure_pins: palmas_msecure_pins {
> +		pinctrl-single,pins = <
> +			OMAP5_IOPAD(0x180, PIN_OUTPUT | MUX_MODE1) /* gpio8_234.sys_drm_msecure */
> +		>;
> +	};
> +
> 	usbhost_pins: pinmux_usbhost_pins {
> 		pinctrl-single,pins = <
> 			0x84 (PIN_INPUT | MUX_MODE0) /* usbb2_hsic_strobe */
> @@ -278,6 +284,12 @@
> 			&usbhost_wkup_pins
> 	>;
> 
> +	palmas_sys_nirq_pins: pinmux_palmas_sys_nirq_pins {
> +		pinctrl-single,pins = <
> +			OMAP5_IOPAD(0x068, PIN_INPUT_PULLUP | MUX_MODE0) /* sys_nirq1 */
> +		>;
> +	};
> +
> 	usbhost_wkup_pins: pinmux_usbhost_wkup_pins {
> 		pinctrl-single,pins = <
> 			0x1A (PIN_OUTPUT | MUX_MODE0) /* fref_clk1_out, USB hub clk */
> @@ -345,6 +357,8 @@
> 		interrupt-controller;
> 		#interrupt-cells = <2>;
> 		ti,system-power-controller;
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&palmas_sys_nirq_pins &palmas_msecure_pins>;
> 
> 		extcon_usb3: palmas_usb {
> 			compatible = "ti,palmas-usb-vid";

[toc] | [prev] | [next] | [standalone]


#1307843

From"H. Nikolaus Schaller" <hns@goldelico.com>
Date2016-01-12 22:30 +0100
Message-ID<qQeFP-6D6-1@gated-at.bofh.it>
In reply to#1307400
Hi Tony,

Am 12.01.2016 um 14:30 schrieb H. Nikolaus Schaller <hns@goldelico.com>:

> Hi Tony,
> 
> Am 12.01.2016 um 01:09 schrieb Tony Lindgren <tony@atomide.com>:
> 
>> * Tony Lindgren <tony@atomide.com> [160111 12:27]:
>>> 
>>> OK so the issue is that the twl msecure pin should be high to enable
>>> the RTC registers. We used to have that code with platform_data, but
>>> no longer have it with device tree based booting. I'll send a patch
>>> for that.
>>> 
>>> Curiously setting jumper j5 on beagle-x15 that controls what used to
>>> be the msecure and now is powerhold, does the opposite.. The
>>> device boots automatically but RTC is stopped?
>> 
>> And here's a fix the issue for omap5. Beagle-x15 needs to be
>> investigated more.
>> 
>> Care to test it with your RTC enabling patch?
> 
> yes, I will test asap.
> 
> Reminds me on some issues we did have with msecure and twl4030 rtc some years ago.

Ok, works for me on OMAP5432EVM.

Thanks for spotting the issue.

> 
> BR,
> Nikolaus
> 
>> 
>> Regards,
>> 
>> Tony
>> 
>> 8< ---------------
>> From: Tony Lindgren <tony@atomide.com>
>> Date: Mon, 11 Jan 2016 14:35:24 -0800
>> Subject: [PATCH] ARM: dts: Fix omap5 PMIC control lines for RTC writes
>> 
>> The palmas PMIC has some control lines that need to be muxed properly
>> for things to work. The sys_nirq pin is used for interrupts, and msecure
>> pin is used for enabling writes to some PMIC registers.
>> 
>> Without these pins configured properly things can fail in mysterious
>> ways. For example, we can't update the RTC registers on palmas PMIC
>> unless the msecure pin is configured. And this is probably the reason
>> why we had RTC missing from the omap5 dts file.
>> 
>> According to "OMAP5430 ES2.0 Data Manual [Public] VErsion A (Rev. F)"
>> swps052f.pdf, mux mode 1 is for sys_drm_msecure so there's no need to
>> configure it as a GPIO pin.
>> 
>> Signed-off-by: Tony Lindgren <tony@atomide.com>
>> 
>> --- a/arch/arm/boot/dts/omap5-board-common.dtsi
>> +++ b/arch/arm/boot/dts/omap5-board-common.dtsi
>> @@ -213,6 +213,12 @@
>> 		>;
>> 	};
>> 
>> +	palmas_msecure_pins: palmas_msecure_pins {
>> +		pinctrl-single,pins = <
>> +			OMAP5_IOPAD(0x180, PIN_OUTPUT | MUX_MODE1) /* gpio8_234.sys_drm_msecure */
>> +		>;
>> +	};
>> +
>> 	usbhost_pins: pinmux_usbhost_pins {
>> 		pinctrl-single,pins = <
>> 			0x84 (PIN_INPUT | MUX_MODE0) /* usbb2_hsic_strobe */
>> @@ -278,6 +284,12 @@
>> 			&usbhost_wkup_pins
>> 	>;
>> 
>> +	palmas_sys_nirq_pins: pinmux_palmas_sys_nirq_pins {
>> +		pinctrl-single,pins = <
>> +			OMAP5_IOPAD(0x068, PIN_INPUT_PULLUP | MUX_MODE0) /* sys_nirq1 */
>> +		>;
>> +	};
>> +
>> 	usbhost_wkup_pins: pinmux_usbhost_wkup_pins {
>> 		pinctrl-single,pins = <
>> 			0x1A (PIN_OUTPUT | MUX_MODE0) /* fref_clk1_out, USB hub clk */
>> @@ -345,6 +357,8 @@
>> 		interrupt-controller;
>> 		#interrupt-cells = <2>;
>> 		ti,system-power-controller;
>> +		pinctrl-names = "default";
>> +		pinctrl-0 = <&palmas_sys_nirq_pins &palmas_msecure_pins>;
>> 
>> 		extcon_usb3: palmas_usb {
>> 			compatible = "ti,palmas-usb-vid";
> 

[toc] | [prev] | [next] | [standalone]


#1307847 — Re: [PATCH 1/3] ARM: dts: omap5-board-common: enable rtc and charging of backup battery

FromNishanth Menon <nm@ti.com>
Date2016-01-12 22:40 +0100
SubjectRe: [PATCH 1/3] ARM: dts: omap5-board-common: enable rtc and charging of backup battery
Message-ID<qQePw-6Hn-9@gated-at.bofh.it>
In reply to#1307843
On 01/12/2016 03:27 PM, H. Nikolaus Schaller wrote:
> Hi Tony,
> 
> Am 12.01.2016 um 14:30 schrieb H. Nikolaus Schaller <hns@goldelico.com>:
> 
>> Hi Tony,
>>
>> Am 12.01.2016 um 01:09 schrieb Tony Lindgren <tony@atomide.com>:
>>
>>> * Tony Lindgren <tony@atomide.com> [160111 12:27]:
>>>>
>>>> OK so the issue is that the twl msecure pin should be high to enable
>>>> the RTC registers. We used to have that code with platform_data, but
>>>> no longer have it with device tree based booting. I'll send a patch
>>>> for that.
>>>>
>>>> Curiously setting jumper j5 on beagle-x15 that controls what used to
>>>> be the msecure and now is powerhold, does the opposite.. The
>>>> device boots automatically but RTC is stopped?
>>>
>>> And here's a fix the issue for omap5. Beagle-x15 needs to be
>>> investigated more.
>>>
>>> Care to test it with your RTC enabling patch?
>>
>> yes, I will test asap.
>>
>> Reminds me on some issues we did have with msecure and twl4030 rtc some years ago.
> 
> Ok, works for me on OMAP5432EVM.
> 
> Thanks for spotting the issue.
> 


http://pastebin.ubuntu.com/14480852/
Works for me as well ( https://patchwork.kernel.org/patch/7954341/ +
http://pastebin.ubuntu.com/14480852/)



-- 
Regards,
Nishanth Menon

[toc] | [prev] | [next] | [standalone]


#1307879 — Re: [PATCH 1/3] ARM: dts: omap5-board-common: enable rtc and charging of backup battery

FromTony Lindgren <tony@atomide.com>
Date2016-01-12 23:20 +0100
SubjectRe: [PATCH 1/3] ARM: dts: omap5-board-common: enable rtc and charging of backup battery
Message-ID<qQfsf-7eN-39@gated-at.bofh.it>
In reply to#1307847
* Nishanth Menon <nm@ti.com> [160112 13:38]:
> On 01/12/2016 03:27 PM, H. Nikolaus Schaller wrote:
> >> Am 12.01.2016 um 01:09 schrieb Tony Lindgren <tony@atomide.com>:
> >>> Care to test it with your RTC enabling patch?
> >>
> >> yes, I will test asap.
> >>
> >> Reminds me on some issues we did have with msecure and twl4030 rtc some years ago.
> > 
> > Ok, works for me on OMAP5432EVM.
> > 
> > Thanks for spotting the issue.

OK thanks.

> http://pastebin.ubuntu.com/14480852/
> Works for me as well ( https://patchwork.kernel.org/patch/7954341/ +
> http://pastebin.ubuntu.com/14480852/)

OK thanks for testing, will apply both to omap-for-v4.5/fixes to get RTC
working on omap5.

Regards,

Tony

[toc] | [prev] | [next] | [standalone]


#1308266

From"H. Nikolaus Schaller" <hns@goldelico.com>
Date2016-01-13 11:30 +0100
Message-ID<qQqQG-6Le-35@gated-at.bofh.it>
In reply to#1307843
Hi Tony,

Am 12.01.2016 um 22:27 schrieb H. Nikolaus Schaller <hns@goldelico.com>:

> Hi Tony,
> 
> Am 12.01.2016 um 14:30 schrieb H. Nikolaus Schaller <hns@goldelico.com>:
> 
>> Hi Tony,
>> 
>> Am 12.01.2016 um 01:09 schrieb Tony Lindgren <tony@atomide.com>:
>> 
>>> * Tony Lindgren <tony@atomide.com> [160111 12:27]:
>>>> 
>>>> OK so the issue is that the twl msecure pin should be high to enable
>>>> the RTC registers. We used to have that code with platform_data, but
>>>> no longer have it with device tree based booting. I'll send a patch
>>>> for that.
>>>> 
>>>> Curiously setting jumper j5 on beagle-x15 that controls what used to
>>>> be the msecure and now is powerhold, does the opposite.. The
>>>> device boots automatically but RTC is stopped?
>>> 
>>> And here's a fix the issue for omap5. Beagle-x15 needs to be
>>> investigated more.
>>> 
>>> Care to test it with your RTC enabling patch?
>> 
>> yes, I will test asap.
>> 
>> Reminds me on some issues we did have with msecure and twl4030 rtc some years ago.
> 
> Ok, works for me on OMAP5432EVM.

Yes, it works, but I didn't look into the code yet.

> 
> Thanks for spotting the issue.
> 
>> 
>> BR,
>> Nikolaus
>> 
>>> 
>>> Regards,
>>> 
>>> Tony
>>> 
>>> 8< ---------------
>>> From: Tony Lindgren <tony@atomide.com>
>>> Date: Mon, 11 Jan 2016 14:35:24 -0800
>>> Subject: [PATCH] ARM: dts: Fix omap5 PMIC control lines for RTC writes
>>> 
>>> The palmas PMIC has some control lines that need to be muxed properly
>>> for things to work. The sys_nirq pin is used for interrupts, and msecure
>>> pin is used for enabling writes to some PMIC registers.
>>> 
>>> Without these pins configured properly things can fail in mysterious
>>> ways. For example, we can't update the RTC registers on palmas PMIC
>>> unless the msecure pin is configured. And this is probably the reason
>>> why we had RTC missing from the omap5 dts file.
>>> 
>>> According to "OMAP5430 ES2.0 Data Manual [Public] VErsion A (Rev. F)"
>>> swps052f.pdf, mux mode 1 is for sys_drm_msecure so there's no need to
>>> configure it as a GPIO pin.
>>> 
>>> Signed-off-by: Tony Lindgren <tony@atomide.com>
>>> 
>>> --- a/arch/arm/boot/dts/omap5-board-common.dtsi
>>> +++ b/arch/arm/boot/dts/omap5-board-common.dtsi
>>> @@ -213,6 +213,12 @@
>>> 		>;
>>> 	};
>>> 
>>> +	palmas_msecure_pins: palmas_msecure_pins {
>>> +		pinctrl-single,pins = <
>>> +			OMAP5_IOPAD(0x180, PIN_OUTPUT | MUX_MODE1) /* gpio8_234.sys_drm_msecure */

I wonder now what MODE1 is.

In my OMAP5 TRM (Version "Y" - may be too old) the MODE1 is tagged as "reserved".

Maybe "reserved" happens to output a "1" on OMAP5 and a "0" on the X15?

And as far as I am aware there is no "driver" for some MSECURE module (but I don't know the details of MSECURE control by software).

This one

>>> 		OMAP5_IOPAD(0x180, PIN_INPUT _PULLUP | MUX_MODE6) /* gpio8_234 used for sys_drm_msecure */


works for me on the OMAP5 EVM as well.

BR,
Nikolaus

>>> +		>;
>>> +	};
>>> +
>>> 	usbhost_pins: pinmux_usbhost_pins {
>>> 		pinctrl-single,pins = <
>>> 			0x84 (PIN_INPUT | MUX_MODE0) /* usbb2_hsic_strobe */
>>> @@ -278,6 +284,12 @@
>>> 			&usbhost_wkup_pins
>>> 	>;
>>> 
>>> +	palmas_sys_nirq_pins: pinmux_palmas_sys_nirq_pins {
>>> +		pinctrl-single,pins = <
>>> +			OMAP5_IOPAD(0x068, PIN_INPUT_PULLUP | MUX_MODE0) /* sys_nirq1 */
>>> +		>;
>>> +	};
>>> +
>>> 	usbhost_wkup_pins: pinmux_usbhost_wkup_pins {
>>> 		pinctrl-single,pins = <
>>> 			0x1A (PIN_OUTPUT | MUX_MODE0) /* fref_clk1_out, USB hub clk */
>>> @@ -345,6 +357,8 @@
>>> 		interrupt-controller;
>>> 		#interrupt-cells = <2>;
>>> 		ti,system-power-controller;
>>> +		pinctrl-names = "default";
>>> +		pinctrl-0 = <&palmas_sys_nirq_pins &palmas_msecure_pins>;
>>> 
>>> 		extcon_usb3: palmas_usb {
>>> 			compatible = "ti,palmas-usb-vid";
>> 
> 

[toc] | [prev] | [next] | [standalone]


#1308478 — Re: [PATCH 1/3] ARM: dts: omap5-board-common: enable rtc and charging of backup battery

FromNishanth Menon <nm@ti.com>
Date2016-01-13 16:00 +0100
SubjectRe: [PATCH 1/3] ARM: dts: omap5-board-common: enable rtc and charging of backup battery
Message-ID<qQv3Y-19C-11@gated-at.bofh.it>
In reply to#1308266
On 01/13/2016 04:25 AM, H. Nikolaus Schaller wrote:
[...]

>>>>
>>>> Signed-off-by: Tony Lindgren <tony@atomide.com>
>>>>
>>>> --- a/arch/arm/boot/dts/omap5-board-common.dtsi
>>>> +++ b/arch/arm/boot/dts/omap5-board-common.dtsi
>>>> @@ -213,6 +213,12 @@
>>>> 		>;
>>>> 	};
>>>>
>>>> +	palmas_msecure_pins: palmas_msecure_pins {
>>>> +		pinctrl-single,pins = <
>>>> +			OMAP5_IOPAD(0x180, PIN_OUTPUT | MUX_MODE1) /* gpio8_234.sys_drm_msecure */
> 
> I wonder now what MODE1 is.
> 
> In my OMAP5 TRM (Version "Y" - may be too old) the MODE1 is tagged as "reserved".
> 
> Maybe "reserved" happens to output a "1" on OMAP5 and a "0" on the X15?
> 
> And as far as I am aware there is no "driver" for some MSECURE module (but I don't know the details of MSECURE control by software).


Good catch. This one is interesting. If my memory serves me right,
MSECURE signal from SoC is triggered in secure mode (trustzone) - the
requirement was that certain PMIC modifications should only be done in
secure mode for certain product applications. What this means is that
certain functions of the PMIC will be unavailable when the SoC is
running in "untrusted" mode.

Instead, the usual mode of operation is to set it up as GPIO (as Nikolas
pointed below) and either use GPIO HOG or default weak pull to keep it
in the required state.

I think it is better to set it as GPIO than as DRM_MSECURE.

This is probably also the reason why this mode is NOT in public TRM -
all security related topics are probably in the NDA only secure TRM
addendum.


I'd suggest setting up a GPIO hog and a mux to GPIO for board-common (we
are not doing any HS OMAP5 at least in public domain :) ).

> 
> This one
> 
>>>> 		OMAP5_IOPAD(0x180, PIN_INPUT _PULLUP | MUX_MODE6) /* gpio8_234 used for sys_drm_msecure */
> 
> 
> works for me on the OMAP5 EVM as well.
> 

[...]


-- 
Regards,
Nishanth Menon

[toc] | [prev] | [next] | [standalone]


#1308495 — Re: [PATCH 1/3] ARM: dts: omap5-board-common: enable rtc and charging of backup battery

FromGrygorii Strashko <grygorii.strashko@ti.com>
Date2016-01-13 16:20 +0100
SubjectRe: [PATCH 1/3] ARM: dts: omap5-board-common: enable rtc and charging of backup battery
Message-ID<qQvnk-1xE-7@gated-at.bofh.it>
In reply to#1308478
On 01/13/2016 04:55 PM, Nishanth Menon wrote:
> On 01/13/2016 04:25 AM, H. Nikolaus Schaller wrote:
> [...]
> 
>>>>>
>>>>> Signed-off-by: Tony Lindgren <tony@atomide.com>
>>>>>
>>>>> --- a/arch/arm/boot/dts/omap5-board-common.dtsi
>>>>> +++ b/arch/arm/boot/dts/omap5-board-common.dtsi
>>>>> @@ -213,6 +213,12 @@
>>>>> 		>;
>>>>> 	};
>>>>>
>>>>> +	palmas_msecure_pins: palmas_msecure_pins {
>>>>> +		pinctrl-single,pins = <
>>>>> +			OMAP5_IOPAD(0x180, PIN_OUTPUT | MUX_MODE1) /* gpio8_234.sys_drm_msecure */
>>
>> I wonder now what MODE1 is.
>>
>> In my OMAP5 TRM (Version "Y" - may be too old) the MODE1 is tagged as "reserved".
>>
>> Maybe "reserved" happens to output a "1" on OMAP5 and a "0" on the X15?
>>
>> And as far as I am aware there is no "driver" for some MSECURE module (but I don't know the details of MSECURE control by software).
> 
> 
> Good catch. This one is interesting. If my memory serves me right,
> MSECURE signal from SoC is triggered in secure mode (trustzone) - the
> requirement was that certain PMIC modifications should only be done in
> secure mode for certain product applications. What this means is that
> certain functions of the PMIC will be unavailable when the SoC is
> running in "untrusted" mode.
> 
> Instead, the usual mode of operation is to set it up as GPIO (as Nikolas
> pointed below) and either use GPIO HOG or default weak pull to keep it
> in the required state.
> 
> I think it is better to set it as GPIO than as DRM_MSECURE.
> 
> This is probably also the reason why this mode is NOT in public TRM -
> all security related topics are probably in the NDA only secure TRM
> addendum.
> 
> 
> I'd suggest setting up a GPIO hog and a mux to GPIO for board-common (we
> are not doing any HS OMAP5 at least in public domain :) ).

Yeah. As I remember the same issue was with OMAP4 (twl6030_omap4.dtsi)
and, again if i remember correctly, someone reported that sys_drm_msecure might have different values
on different SoCs. Also I'd like to note that on Old non-DT kernel such functionality
was always modeled using GPIO.
 

-- 
regards,
-grygorii

[toc] | [prev] | [next] | [standalone]


Page 1 of 3  [1] 2 3  Next page →

Back to top | Article view | linux.kernel


csiph-web