* [PATCH 2/4] pinctrl: Add skew-delay pin config and bindings
[not found] <20171028133719.27528-1-linus.walleij@linaro.org>
@ 2017-10-28 13:37 ` Linus Walleij
[not found] ` <20171028133719.27528-2-linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2017-11-01 21:26 ` Rob Herring
0 siblings, 2 replies; 5+ messages in thread
From: Linus Walleij @ 2017-10-28 13:37 UTC (permalink / raw)
To: linux-gpio, Hans Ulli Kroll, Florian Fainelli
Cc: Janos Laube, Paulius Zaleckas, linux-arm-kernel, Linus Walleij,
devicetree
Some pin controllers (such as the Gemini) can control the
expected clock skew and output delay on certain pins with a
sub-nanosecond granularity. This is typically done by shunting
in a number of double inverters in front of or behind the pin.
Make it possible to configure this with a generic binding.
Cc: devicetree@vger.kernel.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt | 4 ++++
drivers/pinctrl/pinconf-generic.c | 2 ++
include/linux/pinctrl/pinconf-generic.h | 5 +++++
3 files changed, 11 insertions(+)
diff --git a/Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt b/Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt
index 4483cc31e531..ad9bbbba36e9 100644
--- a/Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt
+++ b/Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt
@@ -271,6 +271,10 @@ output-high - set the pin to output mode with high level
sleep-hardware-state - indicate this is sleep related state which will be programmed
into the registers for the sleep state.
slew-rate - set the slew rate
+skew-delay - this affects the expected clock skew on input pins
+ and the delay before latching a value to an output
+ pin. Typically indicates how many double-inverters are
+ used to delay the signal.
For example:
diff --git a/drivers/pinctrl/pinconf-generic.c b/drivers/pinctrl/pinconf-generic.c
index 8eaa25c3384f..b4f7f8a458ea 100644
--- a/drivers/pinctrl/pinconf-generic.c
+++ b/drivers/pinctrl/pinconf-generic.c
@@ -49,6 +49,7 @@ static const struct pin_config_item conf_items[] = {
PCONFDUMP(PIN_CONFIG_POWER_SOURCE, "pin power source", "selector", true),
PCONFDUMP(PIN_CONFIG_SLEEP_HARDWARE_STATE, "sleep hardware state", NULL, false),
PCONFDUMP(PIN_CONFIG_SLEW_RATE, "slew rate", NULL, true),
+ PCONFDUMP(PIN_CONFIG_SKEW_DELAY, "skew delay", NULL, true),
};
static void pinconf_generic_dump_one(struct pinctrl_dev *pctldev,
@@ -181,6 +182,7 @@ static const struct pinconf_generic_params dt_params[] = {
{ "power-source", PIN_CONFIG_POWER_SOURCE, 0 },
{ "sleep-hardware-state", PIN_CONFIG_SLEEP_HARDWARE_STATE, 0 },
{ "slew-rate", PIN_CONFIG_SLEW_RATE, 0 },
+ { "skew-delay", PIN_CONFIG_SKEW_DELAY, 0 },
};
/**
diff --git a/include/linux/pinctrl/pinconf-generic.h b/include/linux/pinctrl/pinconf-generic.h
index 5d8bc7f21c2a..ec6dadcc1fde 100644
--- a/include/linux/pinctrl/pinconf-generic.h
+++ b/include/linux/pinctrl/pinconf-generic.h
@@ -90,6 +90,10 @@
* @PIN_CONFIG_SLEW_RATE: if the pin can select slew rate, the argument to
* this parameter (on a custom format) tells the driver which alternative
* slew rate to use.
+ * @PIN_CONFIG_SKEW_DELAY: if the pin has programmable skew rate (on inputs)
+ * or latch delay (on outputs) this parameter (in a custom format)
+ * specifies the clock skew or latch delay. It typically controls how
+ * many double inverters are put in front of the line.
* @PIN_CONFIG_END: this is the last enumerator for pin configurations, if
* you need to pass in custom configurations to the pin controller, use
* PIN_CONFIG_END+1 as the base offset.
@@ -117,6 +121,7 @@ enum pin_config_param {
PIN_CONFIG_POWER_SOURCE,
PIN_CONFIG_SLEEP_HARDWARE_STATE,
PIN_CONFIG_SLEW_RATE,
+ PIN_CONFIG_SKEW_DELAY,
PIN_CONFIG_END = 0x7F,
PIN_CONFIG_MAX = 0xFF,
};
--
2.13.6
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 2/4] pinctrl: Add skew-delay pin config and bindings
[not found] ` <20171028133719.27528-2-linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
@ 2017-11-01 5:56 ` Hans Ulli Kroll
0 siblings, 0 replies; 5+ messages in thread
From: Hans Ulli Kroll @ 2017-11-01 5:56 UTC (permalink / raw)
To: Linus Walleij
Cc: linux-gpio-u79uwXL29TY76Z2rM5mHXA, Hans Ulli Kroll,
Florian Fainelli, Janos Laube, Paulius Zaleckas,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
devicetree-u79uwXL29TY76Z2rM5mHXA
Hi Linus,
On Sat, 28 Oct 2017, Linus Walleij wrote:
> Some pin controllers (such as the Gemini) can control the
> expected clock skew and output delay on certain pins with a
> sub-nanosecond granularity. This is typically done by shunting
> in a number of double inverters in front of or behind the pin.
> Make it possible to configure this with a generic binding.
>
> Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> Signed-off-by: Linus Walleij <linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
> ---
Acked-by: Hans Ulli Kroll <ulli.kroll-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/4] pinctrl: Add skew-delay pin config and bindings
2017-10-28 13:37 ` [PATCH 2/4] pinctrl: Add skew-delay pin config and bindings Linus Walleij
[not found] ` <20171028133719.27528-2-linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
@ 2017-11-01 21:26 ` Rob Herring
2017-11-02 14:32 ` Linus Walleij
1 sibling, 1 reply; 5+ messages in thread
From: Rob Herring @ 2017-11-01 21:26 UTC (permalink / raw)
To: Linus Walleij
Cc: linux-gpio, Hans Ulli Kroll, Florian Fainelli, Janos Laube,
Paulius Zaleckas, linux-arm-kernel, devicetree
On Sat, Oct 28, 2017 at 03:37:17PM +0200, Linus Walleij wrote:
> Some pin controllers (such as the Gemini) can control the
> expected clock skew and output delay on certain pins with a
> sub-nanosecond granularity. This is typically done by shunting
> in a number of double inverters in front of or behind the pin.
> Make it possible to configure this with a generic binding.
>
> Cc: devicetree@vger.kernel.org
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
> Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt | 4 ++++
> drivers/pinctrl/pinconf-generic.c | 2 ++
> include/linux/pinctrl/pinconf-generic.h | 5 +++++
> 3 files changed, 11 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt b/Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt
> index 4483cc31e531..ad9bbbba36e9 100644
> --- a/Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt
> +++ b/Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt
> @@ -271,6 +271,10 @@ output-high - set the pin to output mode with high level
> sleep-hardware-state - indicate this is sleep related state which will be programmed
> into the registers for the sleep state.
> slew-rate - set the slew rate
> +skew-delay - this affects the expected clock skew on input pins
> + and the delay before latching a value to an output
> + pin. Typically indicates how many double-inverters are
> + used to delay the signal.
Units?
>
> For example:
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/4] pinctrl: Add skew-delay pin config and bindings
2017-11-01 21:26 ` Rob Herring
@ 2017-11-02 14:32 ` Linus Walleij
2017-11-08 0:38 ` Rob Herring
0 siblings, 1 reply; 5+ messages in thread
From: Linus Walleij @ 2017-11-02 14:32 UTC (permalink / raw)
To: Rob Herring
Cc: linux-gpio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Hans Ulli Kroll, Florian Fainelli, Janos Laube, Paulius Zaleckas,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
On Wed, Nov 1, 2017 at 10:26 PM, Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> wrote:
> On Sat, Oct 28, 2017 at 03:37:17PM +0200, Linus Walleij wrote:
>> Some pin controllers (such as the Gemini) can control the
>> expected clock skew and output delay on certain pins with a
>> sub-nanosecond granularity. This is typically done by shunting
>> in a number of double inverters in front of or behind the pin.
>> Make it possible to configure this with a generic binding.
>>
>> Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
>> Signed-off-by: Linus Walleij <linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
>> ---
>> Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt | 4 ++++
>> drivers/pinctrl/pinconf-generic.c | 2 ++
>> include/linux/pinctrl/pinconf-generic.h | 5 +++++
>> 3 files changed, 11 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt b/Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt
>> index 4483cc31e531..ad9bbbba36e9 100644
>> --- a/Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt
>> +++ b/Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt
>> @@ -271,6 +271,10 @@ output-high - set the pin to output mode with high level
>> sleep-hardware-state - indicate this is sleep related state which will be programmed
>> into the registers for the sleep state.
>> slew-rate - set the slew rate
>> +skew-delay - this affects the expected clock skew on input pins
>> + and the delay before latching a value to an output
>> + pin. Typically indicates how many double-inverters are
>> + used to delay the signal.
>
> Units?
Number of double-inverters I guess, just as it says.
skew-delay = <1>; // number of inverter pairs
Like with other bindings of this type they are custom.
The Gemini datasheet says "every unit represents about 0.2 ns".
So if you set it to 1, that means (as far as I can guess) this
is shunted in:
|\ |\
--+ >o--+ >o---
|/ |/
The signal will take ~0.2 ns to propagate through this.
For 2, there will be four inverters etc.
It is dependent of production technology, and I do not know
if everyone is using something like double-inverters.
We could try to define a value in picoseconds instead so I
would need to set this to 200 in that case if you think that is better:
skew-delay = <200>; // picoseconds
I think it would be kludgy since with increasing clock speeds
maybe picoseconds would be too big even. Nanoseconds is
apparently already a to coarse unit.
Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/4] pinctrl: Add skew-delay pin config and bindings
2017-11-02 14:32 ` Linus Walleij
@ 2017-11-08 0:38 ` Rob Herring
0 siblings, 0 replies; 5+ messages in thread
From: Rob Herring @ 2017-11-08 0:38 UTC (permalink / raw)
To: Linus Walleij
Cc: linux-gpio@vger.kernel.org, Hans Ulli Kroll, Florian Fainelli,
Janos Laube, Paulius Zaleckas,
linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org
On Thu, Nov 2, 2017 at 9:32 AM, Linus Walleij <linus.walleij@linaro.org> wrote:
> On Wed, Nov 1, 2017 at 10:26 PM, Rob Herring <robh@kernel.org> wrote:
>> On Sat, Oct 28, 2017 at 03:37:17PM +0200, Linus Walleij wrote:
>>> Some pin controllers (such as the Gemini) can control the
>>> expected clock skew and output delay on certain pins with a
>>> sub-nanosecond granularity. This is typically done by shunting
>>> in a number of double inverters in front of or behind the pin.
>>> Make it possible to configure this with a generic binding.
>>>
>>> Cc: devicetree@vger.kernel.org
>>> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
>>> ---
>>> Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt | 4 ++++
>>> drivers/pinctrl/pinconf-generic.c | 2 ++
>>> include/linux/pinctrl/pinconf-generic.h | 5 +++++
>>> 3 files changed, 11 insertions(+)
>>>
>>> diff --git a/Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt b/Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt
>>> index 4483cc31e531..ad9bbbba36e9 100644
>>> --- a/Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt
>>> +++ b/Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt
>>> @@ -271,6 +271,10 @@ output-high - set the pin to output mode with high level
>>> sleep-hardware-state - indicate this is sleep related state which will be programmed
>>> into the registers for the sleep state.
>>> slew-rate - set the slew rate
>>> +skew-delay - this affects the expected clock skew on input pins
>>> + and the delay before latching a value to an output
>>> + pin. Typically indicates how many double-inverters are
>>> + used to delay the signal.
>>
>> Units?
>
> Number of double-inverters I guess, just as it says.
>
> skew-delay = <1>; // number of inverter pairs
>
> Like with other bindings of this type they are custom.
>
> The Gemini datasheet says "every unit represents about 0.2 ns".
>
> So if you set it to 1, that means (as far as I can guess) this
> is shunted in:
>
> |\ |\
> --+ >o--+ >o---
> |/ |/
>
> The signal will take ~0.2 ns to propagate through this.
> For 2, there will be four inverters etc.
>
> It is dependent of production technology, and I do not know
> if everyone is using something like double-inverters.
>
> We could try to define a value in picoseconds instead so I
> would need to set this to 200 in that case if you think that is better:
>
> skew-delay = <200>; // picoseconds
>
> I think it would be kludgy since with increasing clock speeds
> maybe picoseconds would be too big even. Nanoseconds is
> apparently already a to coarse unit.
Okay, it is fine.
Acked-by: Rob Herring <robh@kernel.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-11-08 0:38 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20171028133719.27528-1-linus.walleij@linaro.org>
2017-10-28 13:37 ` [PATCH 2/4] pinctrl: Add skew-delay pin config and bindings Linus Walleij
[not found] ` <20171028133719.27528-2-linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2017-11-01 5:56 ` Hans Ulli Kroll
2017-11-01 21:26 ` Rob Herring
2017-11-02 14:32 ` Linus Walleij
2017-11-08 0:38 ` Rob Herring
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).