All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Warren <swarren@wwwdotorg.org>
To: Laxman Dewangan <ldewangan@nvidia.com>
Cc: "linux@arm.linux.org.uk" <linux@arm.linux.org.uk>,
	"linux-tegra@vger.kernel.org" <linux-tegra@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH RFT 3/3] ARM: tegra: dts: seaboard: enable keyboard
Date: Mon, 14 Jan 2013 15:09:16 -0700	[thread overview]
Message-ID: <50F4820C.2050806@wwwdotorg.org> (raw)
In-Reply-To: <50F134C9.1040203@nvidia.com>

On 01/12/2013 03:02 AM, Laxman Dewangan wrote:
> On Saturday 12 January 2013 04:39 AM, Stephen Warren wrote:
>> On 01/11/2013 06:33 AM, Laxman Dewangan wrote:
>>> Enable tegra based keyboard controller and populate the key matrix for
>>> seaboard. The key matrix was originally on driver code which is removed
>>> to have clean driver. The key mapping is now passed through dts file.
>>>
>>> Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
>>> ---
>>> Requesting for testing on seaboard.
>>> I generated this patch as Stephen suggested to have one patch for dt
>>> file
>>> entry for keys on seaboard.
> 
> Thanks for testing.

>> Oh, and the KBC clock is marked TEGRA_PERIPH_NO_RESET for Tegra30, and
>> also for Tegra20 in the ChromeOS kernel; why is the driver trying to
>> assert reset on a clock that doesn't support it?
>
> This is something our kbc controller reset and clock design.
> KBC controller is on Always Power ON domain so that it can work even
> when system is in sleep.
> The KBC clock is enabled through two places, PMC control register and
> CAR register set.
> KBC controller is only reset through PMC control register.
> This is not well implemented either on our downstream or in mainline.
> Sometime back I tried to implement it in downstream but was having lots
> of comment and not able to complete this. Possibly we will talk
> internally that how can we implement this.

I guess there's little point in the KBC driver calling the Tegra clock
reset APIs then. Still, since the code is already there and it's not
doing any harm, I guess it's fine to leave it there; if we ever enhance
the clock driver to implement reset for those clocks via the PMC, it
will all just magically work.

>> Once I hacked around the above issues, the driver doesn't work very well
>> at all. There is a *long* delay between when I press a key and when it
>> shows up (e.g. echo'd to the HDMI console). When I release the key the
>> same keypress is generated twice. Or perhaps it's a repeat, but since
>> it's *always* 2 extra keypresses and I doubt I always hold my finger on
>> the key the exact same amount of time, I think it's key release that
>> does this not repeat. I assume this would repro on any board, so you
>> won't need Seaboard to debug it. Harmony is able to read the keyboard
>> using the KBC.
>>
>> Even with the above, I was able to validate that the keymap in the
>> Seaboard .dts file looks reasonable.
>>
>> However, please fix the KBC driver...
> 
> I did not see any issue with the 3x3 matrix. I think all these about is
> to tuning debaunce and other parameter also. Another thing is that to
> make sure that all pinmuxes are properly configured.

OK, I'll go look at some downstream kernels for Seaboard and see if the
debounce etc. parameters all match up.

> However, again I will try to enable kbc on harmony and run it.

That would be extremely useful; I worry that if you tested it on
Tegra114, that means using a downstream kernel only, and also whether
there are any HW differences between SoC versions. That's quite a lot of
variables that could explain the issues I'm seeing.

WARNING: multiple messages have this Message-ID (diff)
From: swarren@wwwdotorg.org (Stephen Warren)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH RFT 3/3] ARM: tegra: dts: seaboard: enable keyboard
Date: Mon, 14 Jan 2013 15:09:16 -0700	[thread overview]
Message-ID: <50F4820C.2050806@wwwdotorg.org> (raw)
In-Reply-To: <50F134C9.1040203@nvidia.com>

On 01/12/2013 03:02 AM, Laxman Dewangan wrote:
> On Saturday 12 January 2013 04:39 AM, Stephen Warren wrote:
>> On 01/11/2013 06:33 AM, Laxman Dewangan wrote:
>>> Enable tegra based keyboard controller and populate the key matrix for
>>> seaboard. The key matrix was originally on driver code which is removed
>>> to have clean driver. The key mapping is now passed through dts file.
>>>
>>> Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
>>> ---
>>> Requesting for testing on seaboard.
>>> I generated this patch as Stephen suggested to have one patch for dt
>>> file
>>> entry for keys on seaboard.
> 
> Thanks for testing.

>> Oh, and the KBC clock is marked TEGRA_PERIPH_NO_RESET for Tegra30, and
>> also for Tegra20 in the ChromeOS kernel; why is the driver trying to
>> assert reset on a clock that doesn't support it?
>
> This is something our kbc controller reset and clock design.
> KBC controller is on Always Power ON domain so that it can work even
> when system is in sleep.
> The KBC clock is enabled through two places, PMC control register and
> CAR register set.
> KBC controller is only reset through PMC control register.
> This is not well implemented either on our downstream or in mainline.
> Sometime back I tried to implement it in downstream but was having lots
> of comment and not able to complete this. Possibly we will talk
> internally that how can we implement this.

I guess there's little point in the KBC driver calling the Tegra clock
reset APIs then. Still, since the code is already there and it's not
doing any harm, I guess it's fine to leave it there; if we ever enhance
the clock driver to implement reset for those clocks via the PMC, it
will all just magically work.

>> Once I hacked around the above issues, the driver doesn't work very well
>> at all. There is a *long* delay between when I press a key and when it
>> shows up (e.g. echo'd to the HDMI console). When I release the key the
>> same keypress is generated twice. Or perhaps it's a repeat, but since
>> it's *always* 2 extra keypresses and I doubt I always hold my finger on
>> the key the exact same amount of time, I think it's key release that
>> does this not repeat. I assume this would repro on any board, so you
>> won't need Seaboard to debug it. Harmony is able to read the keyboard
>> using the KBC.
>>
>> Even with the above, I was able to validate that the keymap in the
>> Seaboard .dts file looks reasonable.
>>
>> However, please fix the KBC driver...
> 
> I did not see any issue with the 3x3 matrix. I think all these about is
> to tuning debaunce and other parameter also. Another thing is that to
> make sure that all pinmuxes are properly configured.

OK, I'll go look at some downstream kernels for Seaboard and see if the
debounce etc. parameters all match up.

> However, again I will try to enable kbc on harmony and run it.

That would be extremely useful; I worry that if you tested it on
Tegra114, that means using a downstream kernel only, and also whether
there are any HW differences between SoC versions. That's quite a lot of
variables that could explain the issues I'm seeing.

  reply	other threads:[~2013-01-14 22:09 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-11 13:33 [PATCH 1/3] ARM: DT: tegra: add DT entry for KBC controller Laxman Dewangan
2013-01-11 13:33 ` Laxman Dewangan
2013-01-11 13:33 ` Laxman Dewangan
2013-01-11 13:33 ` [PATCH 2/3] ARM: tegra: config: enable KEYBOARD_TEGRA Laxman Dewangan
2013-01-11 13:33   ` Laxman Dewangan
2013-01-11 13:33   ` Laxman Dewangan
2013-01-15 18:59   ` Stephen Warren
2013-01-15 18:59     ` Stephen Warren
2013-01-11 13:33 ` [PATCH RFT 3/3] ARM: tegra: dts: seaboard: enable keyboard Laxman Dewangan
2013-01-11 13:33   ` Laxman Dewangan
2013-01-11 13:33   ` Laxman Dewangan
     [not found]   ` <1357911185-11048-3-git-send-email-ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-01-11 23:09     ` Stephen Warren
2013-01-11 23:09       ` Stephen Warren
2013-01-11 23:09       ` Stephen Warren
     [not found]       ` <50F09BC7.90607-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-01-11 23:24         ` Russell King - ARM Linux
2013-01-11 23:24           ` Russell King - ARM Linux
2013-01-11 23:24           ` Russell King - ARM Linux
     [not found]           ` <20130111232438.GN23505-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2013-01-11 23:27             ` Stephen Warren
2013-01-11 23:27               ` Stephen Warren
2013-01-11 23:27               ` Stephen Warren
     [not found]               ` <50F09FCB.70809-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-01-11 23:36                 ` Russell King - ARM Linux
2013-01-11 23:36                   ` Russell King - ARM Linux
2013-01-11 23:36                   ` Russell King - ARM Linux
     [not found]                   ` <20130111233615.GO23505-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2013-01-11 23:39                     ` Stephen Warren
2013-01-11 23:39                       ` Stephen Warren
2013-01-11 23:39                       ` Stephen Warren
     [not found]                       ` <50F0A2A8.3080401-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-01-12 10:34                         ` Laxman Dewangan
2013-01-12 10:34                           ` Laxman Dewangan
2013-01-12 10:34                           ` Laxman Dewangan
     [not found]                           ` <50F13C34.3020808-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-01-12 10:47                             ` Russell King - ARM Linux
2013-01-12 10:47                               ` Russell King - ARM Linux
2013-01-12 10:47                               ` Russell King - ARM Linux
2013-01-12 11:06                               ` Laxman Dewangan
2013-01-12 11:06                                 ` Laxman Dewangan
2013-01-14 16:45                             ` Stephen Warren
2013-01-14 16:45                               ` Stephen Warren
2013-01-14 16:45                               ` Stephen Warren
     [not found]                               ` <50F43640.7060308-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-01-14 16:55                                 ` Russell King - ARM Linux
2013-01-14 16:55                                   ` Russell King - ARM Linux
2013-01-14 16:55                                   ` Russell King - ARM Linux
2013-01-12 10:02         ` Laxman Dewangan
2013-01-12 10:02           ` Laxman Dewangan
2013-01-12 10:02           ` Laxman Dewangan
2013-01-14 22:09           ` Stephen Warren [this message]
2013-01-14 22:09             ` Stephen Warren
     [not found]             ` <50F4820C.2050806-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-01-14 22:32               ` Stephen Warren
2013-01-14 22:32                 ` Stephen Warren
2013-01-14 22:32                 ` Stephen Warren
2013-01-15 18:59 ` [PATCH 1/3] ARM: DT: tegra: add DT entry for KBC controller Stephen Warren
2013-01-15 18:59   ` Stephen Warren
2013-01-15 18:59   ` Stephen Warren

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=50F4820C.2050806@wwwdotorg.org \
    --to=swarren@wwwdotorg.org \
    --cc=ldewangan@nvidia.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    /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.