All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] pinctrl: meson: add g12a drive strength support
@ 2019-03-14 16:37 ` Jerome Brunet
  0 siblings, 0 replies; 21+ messages in thread
From: Jerome Brunet @ 2019-03-14 16:37 UTC (permalink / raw)
  To: Linus Walleij, Kevin Hilman
  Cc: Jerome Brunet, devicetree, linux-amlogic, linux-kernel,
	linux-gpio, Guillaume La Roque

The purpose of this patchset is to add drive-strength support in meson pinconf
driver. This is a new feature that was added on the g12a. It is critical for us
to support this since many functions are failing with default pad drive-strength.

Now the slightly annoying part :(
The value achievable by the SoC are 0.5mA, 2.5mA, 3mA and 4mA and the DT property
'drive-strength' is expressed in mA.

1) Rounding down the value, we could be requesting a 0mA drive strength.
   That would look weird.
2) Rounding up, we can't distinguish between 2.5mA and 3mA

To solve this issue in this in this v1, we chose to document that, on Amlogic,
drive-strength is expressed in uA instead of mA.
It works well and there is no impact on the other platforms but I'm not sure this
is really OK with the DT rules ?

Linus, if this is not OK with you, here are 2 other options we are
considering. We would be very interested to get your opinion on the matter:

1) instead the generic 'drive-strength' property, we could add an amlogic
specific property, 'amlogic,drive-strength'. It would be expressed in uA
and parsed in amlogic specific code.
I think this option is kind of overkill. Expressing drive strength in uA is
not really amlogic specific so it does not make much sense, but it would
work ...

2) Add another generic property "drive-strength-uA". The change to do so
would be minimal and could be benefit to other platforms later on.

Cheers
Jerome

Guillaume La Roque (2):
  dt-bindings: pinctrl: meson: Add drive-strength property
  pinctrl: meson: add support of drive-strength

 .../bindings/pinctrl/meson,pinctrl.txt        |   3 +
 drivers/pinctrl/meson/pinctrl-meson-g12a.c    |  36 ++--
 drivers/pinctrl/meson/pinctrl-meson.c         | 166 +++++++++++++-----
 drivers/pinctrl/meson/pinctrl-meson.h         |  20 ++-
 4 files changed, 165 insertions(+), 60 deletions(-)

-- 
2.20.1

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2019-04-04  3:42 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-14 16:37 [PATCH 0/2] pinctrl: meson: add g12a drive strength support Jerome Brunet
2019-03-14 16:37 ` Jerome Brunet
2019-03-14 16:37 ` [PATCH 1/2] dt-bindings: pinctrl: meson: Add drive-strength property Jerome Brunet
2019-03-14 16:37   ` Jerome Brunet
2019-03-31  6:40   ` Rob Herring
2019-03-31  6:40     ` Rob Herring
2019-03-31  7:04     ` Jerome Brunet
2019-03-31  7:04       ` Jerome Brunet
2019-04-04  3:42       ` Linus Walleij
2019-04-04  3:42         ` Linus Walleij
2019-04-04  3:42         ` Linus Walleij
2019-03-14 16:37 ` [PATCH 2/2] pinctrl: meson: add support of drive-strength Jerome Brunet
2019-03-14 16:37   ` Jerome Brunet
2019-03-18 13:12   ` Neil Armstrong
2019-03-18 13:12     ` Neil Armstrong
2019-03-25  9:44 ` [PATCH 0/2] pinctrl: meson: add g12a drive strength support Jerome Brunet
2019-03-25  9:44   ` Jerome Brunet
2019-03-25  9:44   ` Jerome Brunet
2019-04-04  3:41 ` Linus Walleij
2019-04-04  3:41   ` Linus Walleij
2019-04-04  3:41   ` Linus Walleij

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.