linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: tomasz.figa@gmail.com (Tomasz Figa)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: dts: Add mask-tpm-reset to the device tree
Date: Fri, 27 Jun 2014 17:14:38 +0200	[thread overview]
Message-ID: <53AD8A5E.9090904@gmail.com> (raw)
In-Reply-To: <CAD=FV=Wz5nB=fe-snzdNC-Tb50wXz9h3S5z4jAHzKxH3N66UVw@mail.gmail.com>

On 27.06.2014 17:10, Doug Anderson wrote:
> Tomasz and Vikas,
> 
> On Fri, Jun 27, 2014 at 5:17 AM, Tomasz Figa <tomasz.figa@gmail.com> wrote:
>> Hi Doug,
>>
>> On 26.06.2014 17:25, Doug Anderson wrote:
>>> Tomasz,
>>>
>>> On Thu, Jun 26, 2014 at 2:52 AM, Tomasz Figa <t.figa@samsung.com> wrote:
>>>> Hi Vikas, Doug,
>>>>
>>>> On 26.06.2014 11:15, Vikas Sajjan wrote:
>>>>> From: Doug Anderson <dianders@chromium.org>
>>>>>
>>>>> The mask-tpm-reset GPIO is used by the kernel to prevent the TPM from
>>>>> being reset across sleep/wake.  If we don't set it to anything then
>>>>> the TPM will be reset.  U-Boot will detect this as invalid
>>>>> and will reset the system on resume time. This GPIO can always be low
>>>>> and not hurt anything.  It will get pulled back high again during a
>>>>> normal warm reset when it will default back to an input.
>>>>>
>>>>> To properly preserve the TPM state across suspend/resume and to make
>>>>> the chrome U-Boot happy, properly set the GPIO to mask the
>>>>> reset to the TPM.
>>>>>
>>>>> Signed-off-by: Doug Anderson <dianders@chromium.org>
>>>>> Signed-off-by: Vikas Sajjan <vikas.sajjan@samsung.com>
>>>>> ---
>>>>>  arch/arm/boot/dts/exynos5420-peach-pit.dts |   20 ++++++++++++++++++++
>>>>>  1 file changed, 20 insertions(+)
>>>>>
>>>>> diff --git a/arch/arm/boot/dts/exynos5420-peach-pit.dts b/arch/arm/boot/dts/exynos5420-peach-pit.dts
>>>>> index 7649982..8fd990a 100644
>>>>> --- a/arch/arm/boot/dts/exynos5420-peach-pit.dts
>>>>> +++ b/arch/arm/boot/dts/exynos5420-peach-pit.dts
>>>>> @@ -87,6 +87,18 @@
>>>>>               pinctrl-0 = <&usb301_vbus_en>;
>>>>>               enable-active-high;
>>>>>       };
>>>>> +
>>>>> +     /* We need GPX0_6 to be low at sleep time; just keep it low always */
>>>>> +     mask_tpm_reset_regulator: mask-tpm-reset-regulator {
>>>>> +     compatible = "regulator-fixed";
>>>>> +     regulator-name = "mask-tpm-reset ";
>>>>> +             gpio = <&gpx0 6 0>;
>>>>> +             enable-active-low;
>>>>> +             regulator-boot-on;
>>>>> +             regulator-always-on;
>>>>> +             pinctrl-names = "default";
>>>>> +             pinctrl-0 = <&mask_tpm_reset>;
>>>>> +     };
>>>>
>>>> I don't think this pin is supposed to be a real regulator. If I'm right,
>>>> you should just add a hog for it, if you don't have a proper driver to
>>>> handle it.
>>>
>>> Yes, I agree that it shouldn't really be a regulator, but there's not
>>> a whole lot of choice.  The pin needs to actually be driven low, not
>>> just pulled low.  Without your proposed patch (pinctrl: samsung: Allow
>>> pin value to be initialized using pinfunc) I don't think it's possible
>>> to actually drive a pin low with a hog.  I could be wrong, though.
>>>
>>
>> Uhm, I was convinced that this patch was already in. So I think your use
>> case is definitely a good reason to get back to this patch and use the
>> facility it provides to solve your problem.
> 
> Thanks, that seems very reasonable to me, too.
> 
> Are you going to pick up revitalizing this patch series or are you
> hoping Vikas will?  IIRC I was in favor of your patch but it generated
> a whole bunch of discussion and never actually landed.

I will respin it along with few other patches for pinctrl-samsung, but
obviously not before Monday.

Best regards,
Tomasz

  reply	other threads:[~2014-06-27 15:14 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-26  9:15 [PATCH] ARM: dts: Add mask-tpm-reset to the device tree Vikas Sajjan
2014-06-26  9:52 ` Tomasz Figa
2014-06-26 15:25   ` Doug Anderson
2014-06-27 12:17     ` Tomasz Figa
2014-06-27 15:10       ` Doug Anderson
2014-06-27 15:14         ` Tomasz Figa [this message]
2014-06-27 15:22           ` Doug Anderson
2014-06-27 15:49             ` Vikas Sajjan
2014-06-27 16:10       ` Stephen Warren
2014-06-27 16:45         ` Doug Anderson
2014-06-27 18:20           ` Stephen Warren
2014-06-27 18:30             ` Doug Anderson
2014-06-27 19:56               ` Stephen Warren
2014-06-27 19:58                 ` Doug Anderson
2014-07-08  7:46 ` Linus Walleij
2014-07-08 15:27   ` Doug Anderson
2014-07-08 16:20     ` Tomasz Figa
2014-07-09 15:22       ` Doug Anderson
2014-07-10  4:35         ` Vikas Sajjan
2014-07-10 15:25           ` Doug Anderson

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=53AD8A5E.9090904@gmail.com \
    --to=tomasz.figa@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.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: 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;
as well as URLs for NNTP newsgroup(s).