
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
Hi Simon,
On 13.01.2016 21:32, Simon Glass wrote: [...]
On 11 January 2016 at 15:01, Mateusz Kulikowski mateusz.kulikowski@gmail.com wrote:
[...]
&pm8916_gpios {
usb_hub_reset_pm: usb_hub_reset_pm { pinconf { pins = "gpio3"; function = PMIC_GPIO_FUNC_NORMAL; output-low; }; };
(https://github.com/torvalds/linux/blob/master/arch/arm64/boot/dts/qcom/apq80...)
I decided to move them away from PMIC, as they only use specific gpios.
To be honest they are just a references so I don't have to hardcode gpio names/numbers in board sources.
Is it ok if I keep it that way? Could you suggest better approach?
We should avoid forking the device tree and making up bindings.
Really it looks like qcom,qpnp-pin should be a pinctrl driver. Then pinctrl-0 in your device node will automatically pick up the correct function.
I gave it a bit thought played a bit (perhaps small bit) with pinctl, did Phone-a-Friend, looked at rockchip @ your tree and:
1. I agree that it's good idea to have the same bindings in U-Boot & Linux.
2. Perhaps in "generic" solution (say for all qcom pmics) it would be nice to have possibility to configure some functions of this pins, but all I need for now is to change value of 2 gpio pins to 1/0.
3. Learning/writing "proper" pinctrl driver will take me some time (and probably few patch versions).
4. In my (very) humble opinion, there are few improvements that I consider more important and would like to do first (for example usb device controller or ADMA support for sdhci). Also Syed would probably like to have support for his Dragonboard 810 that is similar (and kind-of blocked by this release).
My proposal is to use mainline Linux entries for hub/switch pins and then do addition as in (for example) exynos 4210: add dragonboard410c-uboot.dtsi that will have u-boot specific extension. In this case - gpio handle so I can query gpio the same way I did in the past.
Of course I will upgrade dt bindings documentation.
And in future I will have to master pinmux/pinctrl as I will need it to get rid of Little Kernel (and do pin configuration for UART, MMC etc.) - I can then "upgrade" this code.
Just FYI: I don't plan to abandon board the day it gets to mainline ;)
Regards, Mateusz