Skip to content

Commit e0e1e39

Browse files
author
Linus Walleij
committed
pinctrl: Add skew-delay pin config and bindings
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 Acked-by: Rob Herring <robh@kernel.org> Acked-by: Hans Ulli Kroll <ulli.kroll@googlemail.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
1 parent 30ac0d3 commit e0e1e39

3 files changed

Lines changed: 11 additions & 0 deletions

File tree

‎Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,10 @@ output-high - set the pin to output mode with high level
271271
sleep-hardware-state - indicate this is sleep related state which will be programmed
272272
into the registers for the sleep state.
273273
slew-rate - set the slew rate
274+
skew-delay - this affects the expected clock skew on input pins
275+
and the delay before latching a value to an output
276+
pin. Typically indicates how many double-inverters are
277+
used to delay the signal.
274278

275279
For example:
276280

‎drivers/pinctrl/pinconf-generic.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ static const struct pin_config_item conf_items[] = {
4949
PCONFDUMP(PIN_CONFIG_POWER_SOURCE, "pin power source", "selector", true),
5050
PCONFDUMP(PIN_CONFIG_SLEEP_HARDWARE_STATE, "sleep hardware state", NULL, false),
5151
PCONFDUMP(PIN_CONFIG_SLEW_RATE, "slew rate", NULL, true),
52+
PCONFDUMP(PIN_CONFIG_SKEW_DELAY, "skew delay", NULL, true),
5253
};
5354

5455
static void pinconf_generic_dump_one(struct pinctrl_dev *pctldev,
@@ -181,6 +182,7 @@ static const struct pinconf_generic_params dt_params[] = {
181182
{ "power-source", PIN_CONFIG_POWER_SOURCE, 0 },
182183
{ "sleep-hardware-state", PIN_CONFIG_SLEEP_HARDWARE_STATE, 0 },
183184
{ "slew-rate", PIN_CONFIG_SLEW_RATE, 0 },
185+
{ "skew-delay", PIN_CONFIG_SKEW_DELAY, 0 },
184186
};
185187

186188
/**

‎include/linux/pinctrl/pinconf-generic.h‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,10 @@
9090
* @PIN_CONFIG_SLEW_RATE: if the pin can select slew rate, the argument to
9191
* this parameter (on a custom format) tells the driver which alternative
9292
* slew rate to use.
93+
* @PIN_CONFIG_SKEW_DELAY: if the pin has programmable skew rate (on inputs)
94+
* or latch delay (on outputs) this parameter (in a custom format)
95+
* specifies the clock skew or latch delay. It typically controls how
96+
* many double inverters are put in front of the line.
9397
* @PIN_CONFIG_END: this is the last enumerator for pin configurations, if
9498
* you need to pass in custom configurations to the pin controller, use
9599
* PIN_CONFIG_END+1 as the base offset.
@@ -117,6 +121,7 @@ enum pin_config_param {
117121
PIN_CONFIG_POWER_SOURCE,
118122
PIN_CONFIG_SLEEP_HARDWARE_STATE,
119123
PIN_CONFIG_SLEW_RATE,
124+
PIN_CONFIG_SKEW_DELAY,
120125
PIN_CONFIG_END = 0x7F,
121126
PIN_CONFIG_MAX = 0xFF,
122127
};

0 commit comments

Comments
 (0)