mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Grygorii Strashko <grygorii.strashko@ti.com>
To: Tony Lindgren <tony@atomide.com>
Cc: "Nishanth Menon" <nm@ti.com>,
	"H. Nikolaus Schaller" <hns@goldelico.com>,
	"Laxman Dewangan" <ldewangan@nvidia.com>,
	"Benoît Cousson" <bcousson@baylibre.com>,
	"Rob Herring" <robh+dt@kernel.org>,
	"Pawel Moll" <pawel.moll@arm.com>,
	"Mark Rutland" <mark.rutland@arm.com>,
	"Ian Campbell" <ijc+devicetree@hellion.org.uk>,
	"Kumar Gala" <galak@codeaurora.org>,
	"Russell King" <linux@arm.linux.org.uk>,
	linux-omap <linux-omap@vger.kernel.org>,
	devicetree@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
	"Marek Belisko" <marek@goldelico.com>,
	"Gražvydas Ignotas" <notasas@gmail.com>,
	Keerthy <j-keerthy@ti.com>
Subject: Re: [PATCH 1/3] ARM: dts: omap5-board-common: enable rtc and charging of backup battery
Date: Wed, 13 Jan 2016 19:12:54 +0200	[thread overview]
Message-ID: <56968596.2070105@ti.com> (raw)
In-Reply-To: <20160113164856.GF12777@atomide.com>

On 01/13/2016 06:48 PM, Tony Lindgren wrote:
> * Grygorii Strashko <grygorii.strashko@ti.com> [160113 07:15]:
>> On 01/13/2016 04:55 PM, Nishanth Menon wrote:
>>> On 01/13/2016 04:25 AM, H. Nikolaus Schaller wrote:
>>>>
>>>> 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?
> 
> The 5430 data manual I listed in the commit states mode 1 is for
> msecure. It is unlikely it got changed for 5432 as the mux registers
> tend to stay the same for most part across a SoC generation with just
> devices being enabled or disabled.
> 
> For beagle-x15, the msecure is now called "powerhold" and seems to
> have some additional or different functionality in the PMIC. So
> that's a separate issue from this one.
> 
>>>> 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).
>>>http://omapzoom.org/?p=kernel/omap.git;a=commitdiff;h=a7a516be9338eabc9a7682e7433fa34d86c1f208
>>> 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.
> 
> Well we do have the data manual saying it's the msecure pin, and
> we are muxing it to msecure for omap4 in twl6030_omap4.dtsi. And a
> TI commit has used msecure mode for GP omap5 evm at least here:
> 
> https://gitlab.com/ubuntu-omap/u-boot-omap5/commit/dcc5279ffe880e874abb4d7f95302a34ab4968ca
> 
> I've added Keerthy to Cc, maybe he knows how this should be handled
> in the long run?
> 
> So if we start changing things to GPIO mode, we really need some
> further explanations and neeed to handle the GPIO pin properly in
> the TWL driver. And it should be done in a separate patch for all
> of the TWL SoCs.
> 
>>> 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.
> 
> Right, probably the msecure pin has been set reserved in the public TRM
> because of whatever NDA reasons there might be to not allow writes to RTC.
> 
>>> 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.
> 
> Care to dig up some more information on that?

i can't find this report, sry - as i remember there was difference
between some OMAP4 HS and GP SoCs. 

But links on commits for old 3.4 kernel below:
http://omapzoom.org/?p=kernel/omap.git;a=commitdiff;h=a7a516be9338eabc9a7682e7433fa34d86c1f208
http://omapzoom.org/?p=kernel/omap.git;a=commitdiff;h=262669aebf4af4044a25e8292f0e27986e18445a

> 
> I don't have anything against adding GPIO handling to the TWL driver
> so it can be optionally specified. But that's clearly a separate patch
> and should be done by somebody who knows more about the issue and has
> a test case needing the GPIO logic for this pin.
> 


-- 
regards,
-grygorii

  reply	other threads:[~2016-01-13 17:13 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-05 12:01 [PATCH 0/3] Enable twl603x-GPADC for some OMAP4/OMAP5 boards and Palmas-RTC for OMAP5 H. Nikolaus Schaller
2016-01-05 12:01 ` [PATCH 1/3] ARM: dts: omap5-board-common: enable rtc and charging of backup battery H. Nikolaus Schaller
2016-01-05 23:40   ` Nishanth Menon
2016-01-06  1:00     ` Tony Lindgren
2016-01-06  8:11       ` H. Nikolaus Schaller
2016-01-06 16:41         ` Tony Lindgren
2016-01-06 16:47           ` H. Nikolaus Schaller
2016-01-06 17:09             ` Tony Lindgren
2016-01-08 17:49               ` H. Nikolaus Schaller
2016-01-08 18:15                 ` Tony Lindgren
2016-01-08 18:32                   ` H. Nikolaus Schaller
2016-01-08 19:04                     ` Tony Lindgren
2016-01-08 19:31                       ` H. Nikolaus Schaller
2016-01-11 20:24                         ` Tony Lindgren
2016-01-12  0:09                           ` Tony Lindgren
2016-01-12 13:30                             ` H. Nikolaus Schaller
2016-01-12 21:27                               ` H. Nikolaus Schaller
2016-01-12 21:37                                 ` Nishanth Menon
2016-01-12 22:13                                   ` Tony Lindgren
2016-01-13 10:25                                 ` H. Nikolaus Schaller
2016-01-13 14:55                                   ` Nishanth Menon
2016-01-13 15:14                                     ` Grygorii Strashko
2016-01-13 16:48                                       ` Tony Lindgren
2016-01-13 17:12                                         ` Grygorii Strashko [this message]
2016-01-13 17:38                                           ` Nishanth Menon
2016-01-13 18:00                                             ` H. Nikolaus Schaller
2016-01-13 18:23                                               ` Nishanth Menon
2016-01-13 17:29                                         ` Nishanth Menon
2016-01-13 18:00                                           ` Tony Lindgren
2016-01-13 18:08                                             ` H. Nikolaus Schaller
2016-01-13 18:31                                               ` Nishanth Menon
2016-01-13 18:44                                                 ` H. Nikolaus Schaller
2016-01-13 19:05                                                   ` Nishanth Menon
2016-01-13 19:22                                                     ` Grygorii Strashko
2016-01-13 19:40                                                     ` Tony Lindgren
2016-01-13 22:32                                                       ` Nishanth Menon
2016-01-14 10:01                                                         ` Keerthy
2016-01-14 17:39                                                           ` Nishanth Menon
2016-01-14 18:35                                                             ` Tony Lindgren
2016-01-15 14:33                                                               ` H. Nikolaus Schaller
2016-01-15 15:47                                                                 ` Tony Lindgren
2016-01-15 17:10                                                                   ` Tony Lindgren
2016-01-15 18:11                                                                   ` H. Nikolaus Schaller
2016-08-25  2:43                                                     ` Matthijs van Duin
2016-01-13 18:18                                             ` Nishanth Menon
2016-01-06  7:42     ` H. Nikolaus Schaller
2016-01-06  8:13       ` Laxman Dewangan
2016-01-06 14:36         ` Nishanth Menon
2016-01-06 19:34           ` Rob Herring
2016-01-06 19:53             ` Nishanth Menon
2016-01-05 12:01 ` [PATCH 2/3] ARM: dts: omap5-board-common: enable iio gpadc for Palmas H. Nikolaus Schaller
2016-01-05 12:01 ` [PATCH 3/3] ARM: dts: twl6030: add gpadc H. Nikolaus Schaller

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=56968596.2070105@ti.com \
    --to=grygorii.strashko@ti.com \
    --cc=bcousson@baylibre.com \
    --cc=devicetree@vger.kernel.org \
    --cc=galak@codeaurora.org \
    --cc=hns@goldelico.com \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=j-keerthy@ti.com \
    --cc=ldewangan@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=marek@goldelico.com \
    --cc=mark.rutland@arm.com \
    --cc=nm@ti.com \
    --cc=notasas@gmail.com \
    --cc=pawel.moll@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=tony@atomide.com \
    /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: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome