From: Tomasz Figa <t.figa@samsung.com>
To: Doug Anderson <dianders@chromium.org>,
Vikas Sajjan <vikas.sajjan@samsung.com>,
Linus Walleij <linus.walleij@linaro.org>
Cc: Vikas Sajjan <sajjan.linux@gmail.com>,
Kukjin Kim <kgene.kim@samsung.com>,
Tomasz Figa <tomasz.figa@gmail.com>,
Houcheng Lin <houcheng@gmail.com>,
sunil joshi <joshi@samsung.com>,
linux-samsung-soc <linux-samsung-soc@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH] ARM: dts: Add mask-tpm-reset to the device tree
Date: Tue, 08 Jul 2014 18:20:51 +0200 [thread overview]
Message-ID: <53BC1A63.80900@samsung.com> (raw)
In-Reply-To: <CAD=FV=WQWBkq5JKttikLkyKEDX-YydQJLr9=bFWifpy2Lf0mSg@mail.gmail.com>
On 08.07.2014 17:27, Doug Anderson wrote:
> Hi,
>
> On Tue, Jul 8, 2014 at 12:46 AM, Linus Walleij <linus.walleij@linaro.org> wrote:
>> On Thu, Jun 26, 2014 at 11:15 AM, Vikas Sajjan <vikas.sajjan@samsung.com> 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>
>> (...)
>>> + /* 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";
>>
>> No matter how the discussion ends up, regulator-fixed is wrong.
>
> OK, fair enough.
>
>
>> Either folding it into the TPM driver or using a separate reset driver
>> is fine with me.
>
> OK, Vikas: do you want to code up the driver?
>
>
>> So what about the generic delayed reset GPIO thing?
>> http://marc.info/?l=linux-kernel&m=140309916607115&w=2
>
> That's a neat concept and could be useful in other cases, but I think
> it's just as much of a hack as using a regulator. This is not a reset
> signal for the TPM. This is a signal that will mask the CPU's reset
> signal (using a special bit of board-specific logic).
>
>
> Personally I think Tomasz's idea of using hogs (after his patches
> allowing a default output level) is the cleanest, but I think Stephen
> didn't like that.
I don't see any benefits of using complex interfaces over simply
initializing the pin to the right value once at boot-up or at
suspend/resume. As far as I understand Doug's explanation of the
problem, nothing else is expected from the OS with respect to this pin.
Moreover it doesn't affect operation of any drivers.
So I'm still for the simplest and effective solution, i.e. hogs.
Best regards,
Tomasz
WARNING: multiple messages have this Message-ID (diff)
From: t.figa@samsung.com (Tomasz Figa)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: dts: Add mask-tpm-reset to the device tree
Date: Tue, 08 Jul 2014 18:20:51 +0200 [thread overview]
Message-ID: <53BC1A63.80900@samsung.com> (raw)
In-Reply-To: <CAD=FV=WQWBkq5JKttikLkyKEDX-YydQJLr9=bFWifpy2Lf0mSg@mail.gmail.com>
On 08.07.2014 17:27, Doug Anderson wrote:
> Hi,
>
> On Tue, Jul 8, 2014 at 12:46 AM, Linus Walleij <linus.walleij@linaro.org> wrote:
>> On Thu, Jun 26, 2014 at 11:15 AM, Vikas Sajjan <vikas.sajjan@samsung.com> 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>
>> (...)
>>> + /* 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";
>>
>> No matter how the discussion ends up, regulator-fixed is wrong.
>
> OK, fair enough.
>
>
>> Either folding it into the TPM driver or using a separate reset driver
>> is fine with me.
>
> OK, Vikas: do you want to code up the driver?
>
>
>> So what about the generic delayed reset GPIO thing?
>> http://marc.info/?l=linux-kernel&m=140309916607115&w=2
>
> That's a neat concept and could be useful in other cases, but I think
> it's just as much of a hack as using a regulator. This is not a reset
> signal for the TPM. This is a signal that will mask the CPU's reset
> signal (using a special bit of board-specific logic).
>
>
> Personally I think Tomasz's idea of using hogs (after his patches
> allowing a default output level) is the cleanest, but I think Stephen
> didn't like that.
I don't see any benefits of using complex interfaces over simply
initializing the pin to the right value once at boot-up or at
suspend/resume. As far as I understand Doug's explanation of the
problem, nothing else is expected from the OS with respect to this pin.
Moreover it doesn't affect operation of any drivers.
So I'm still for the simplest and effective solution, i.e. hogs.
Best regards,
Tomasz
next prev parent reply other threads:[~2014-07-08 16:20 UTC|newest]
Thread overview: 40+ 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:15 ` Vikas Sajjan
2014-06-26 9:52 ` Tomasz Figa
2014-06-26 9:52 ` Tomasz Figa
2014-06-26 15:25 ` Doug Anderson
2014-06-26 15:25 ` Doug Anderson
2014-06-27 12:17 ` Tomasz Figa
2014-06-27 12:17 ` Tomasz Figa
2014-06-27 15:10 ` Doug Anderson
2014-06-27 15:10 ` Doug Anderson
2014-06-27 15:14 ` Tomasz Figa
2014-06-27 15:14 ` Tomasz Figa
2014-06-27 15:22 ` Doug Anderson
2014-06-27 15:22 ` Doug Anderson
2014-06-27 15:49 ` Vikas Sajjan
2014-06-27 15:49 ` Vikas Sajjan
2014-06-27 16:10 ` Stephen Warren
2014-06-27 16:10 ` Stephen Warren
2014-06-27 16:45 ` Doug Anderson
2014-06-27 16:45 ` Doug Anderson
2014-06-27 18:20 ` Stephen Warren
2014-06-27 18:20 ` Stephen Warren
2014-06-27 18:30 ` Doug Anderson
2014-06-27 18:30 ` Doug Anderson
2014-06-27 19:56 ` Stephen Warren
2014-06-27 19:56 ` Stephen Warren
2014-06-27 19:58 ` Doug Anderson
2014-06-27 19:58 ` Doug Anderson
2014-07-08 7:46 ` Linus Walleij
2014-07-08 7:46 ` Linus Walleij
2014-07-08 15:27 ` Doug Anderson
2014-07-08 15:27 ` Doug Anderson
2014-07-08 16:20 ` Tomasz Figa [this message]
2014-07-08 16:20 ` Tomasz Figa
2014-07-09 15:22 ` Doug Anderson
2014-07-09 15:22 ` Doug Anderson
2014-07-10 4:35 ` Vikas Sajjan
2014-07-10 4:35 ` Vikas Sajjan
2014-07-10 15:25 ` Doug Anderson
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=53BC1A63.80900@samsung.com \
--to=t.figa@samsung.com \
--cc=dianders@chromium.org \
--cc=houcheng@gmail.com \
--cc=joshi@samsung.com \
--cc=kgene.kim@samsung.com \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=sajjan.linux@gmail.com \
--cc=tomasz.figa@gmail.com \
--cc=vikas.sajjan@samsung.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 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.