How to set default GPIO pin ?
Hi Morimoto-san,
(Moving this thread to linux-sh and linux-arm and CC'ing Linus Walleij)
Quoted 8 lines · On Sunday 31 August 2014 22:08:52 Kuninori Morimoto wrote:
I know we can use "defalt" PFC settings on DT. But, how to use "defalt" GPIO pin settings on DT ?
We would like to use GPIO 7-17 as Low output,
and do nothing after boot.From a DT point of view I believe this is supposed to be done by specifying
the output-low or output-high properties in the pinctrl configuration node. However, these properties are not supported by the PFC driver, and there's no easy way for the PFC driver to configure GPIOs handled by a different driver such as the gpio-rcar driver for instance.
Linus, do you have any hindsight on how this should be implemented ?
Signature · 3 lines
Regards, Laurent Pinchart
Hi Laurent, Linus (Walleij)
Thank you for your help
Quoted 10 lines
(Moving this thread to linux-sh and linux-arm and CC'ing Linus Walleij)
Quoted 6 lines · On Sunday 31 August 2014 22:08:52 Kuninori Morimoto wrote:
I know we can use "defalt" PFC settings on DT. But, how to use "defalt" GPIO pin settings on DT ?
We would like to use GPIO 7-17 as Low output,
and do nothing after boot.
Quoted 7 lines
From a DT point of view I believe this is supposed to be done by specifying the output-low or output-high properties in the pinctrl configuration node. However, these properties are not supported by the PFC driver, and there's no easy way for the PFC driver to configure GPIOs handled by a different driver such as the gpio-rcar driver for instance.
Linus, do you have any hindsight on how this should be implemented ?
I'm happy if we can use this "defalt" GPIO on DT.
Linus, we need your opinion
Best regards
---
Kuninori Morimoto
Quoted 8 lines · Laurent Pinchart
Quoted 6 lines · On Sunday 31 August 2014 22:08:52 Kuninori Morimoto wrote:
I know we can use "defalt" PFC settings on DT. But, how to use "defalt" GPIO pin settings on DT ?
We would like to use GPIO 7-17 as Low output,
and do nothing after boot.
Quoted 7 lines
From a DT point of view I believe this is supposed to be done by specifying the output-low or output-high properties in the pinctrl configuration node. However, these properties are not supported by the PFC driver, and there's no easy way for the PFC driver to configure GPIOs handled by a different driver such as the gpio-rcar driver for instance.
Linus, do you have any hindsight on how this should be implemented ?
I have suggested adding GPIO hogs, so that a GPIO node can specify that some GPIO's specified on the local ship be hogged high or low at probe. Generic DT bindings and generic code in gpiolib.c.
gpios-hog-high = <....>;
gpios-hog-low = <....>;
Yours,
Linus Walleij
Hi Linus and Morimoto-san,
Quoted 14 lines · On Tuesday 23 September 2014 17:06:28 Linus Walleij wrote:
Quoted 13 lines · Laurent Pinchart
Quoted 5 lines · On Sunday 31 August 2014 22:08:52 Kuninori Morimoto wrote:
I know we can use "defalt" PFC settings on DT. But, how to use "defalt" GPIO pin settings on DT ?
We would like to use GPIO 7-17 as Low output,
and do nothing after boot.From a DT point of view I believe this is supposed to be done by specifying the output-low or output-high properties in the pinctrl configuration node. However, these properties are not supported by the PFC driver, and there's no easy way for the PFC driver to configure GPIOs handled by a different driver such as the gpio-rcar driver for instance.
Quoted 8 lines
Quoted 1 line
Linus, do you have any hindsight on how this should be implemented ?
I have suggested adding GPIO hogs, so that a GPIO node can specify that some GPIO's specified on the local ship be hogged high or low at probe. Generic DT bindings and generic code in
gpiolib.c.gpios-hog-high = <....>;
gpios-hog-low = <....>;
How about just a gpios-hog property, with a list of gpio specifiers + flags ? That's bikeshedding I suppose.
Morimoto-san, would you like to implement that ? :-)
Signature · 3 lines
Regards, Laurent Pinchart
Hi Laurent, Linus
Quoted 11 lines
Quoted 6 lines
I have suggested adding GPIO hogs, so that a GPIO node can specify that some GPIO's specified on the local ship be hogged high or low at probe. Generic DT bindings and generic code in
gpiolib.c.gpios-hog-high = <....>;
gpios-hog-low = <....>;How about just a gpios-hog property, with a list of gpio specifiers + flags ? That's bikeshedding I suppose.
Morimoto-san, would you like to implement that ? :-)
Thank you for your help
OK, I try to implement this method (when I have time :) Thank you
Best regards
---
Kuninori Morimoto
Quoted 23 lines · Laurent Pinchart
Hi Linus and Morimoto-san,
Quoted 20 lines · On Tuesday 23 September 2014 17:06:28 Linus Walleij wrote:
Quoted 7 lines · Laurent Pinchart
Quoted 5 lines · On Sunday 31 August 2014 22:08:52 Kuninori Morimoto wrote:
I know we can use "defalt" PFC settings on DT. But, how to use "defalt" GPIO pin settings on DT ?
We would like to use GPIO 7-17 as Low output,
and do nothing after boot.Quoted 7 lines
From a DT point of view I believe this is supposed to be done by specifying the output-low or output-high properties in the pinctrl configuration node. However, these properties are not supported by the PFC driver, and there's no easy way for the PFC driver to configure GPIOs handled by a different driver such as the gpio-rcar driver for instance.
Linus, do you have any hindsight on how this should be implemented ?
I have suggested adding GPIO hogs, so that a GPIO node can specify that some GPIO's specified on the local ship be hogged high or low at probe. Generic DT bindings and generic code in
gpiolib.c.
Quoted 7 lines
Quoted 2 lines
gpios-hog-high = <....>;
gpios-hog-low = <....>;How about just a gpios-hog property, with a list of gpio specifiers + flags ? That's bikeshedding I suppose.
Morimoto-san, would you like to implement that ? :-)
There was a proposed implementation from Boris BREZILLON, but I was unhappy with parts of it, however check it and see my comments on the patch set:
"[RFC PATCH] gpio: add GPIO hogging mechanism"
Yours,
Linus Walleij