How to set GPIOs to pre-defined value

Samuel Jiang chyishian.jiang at gmail.com
Tue May 7 18:16:58 AEST 2019


Hi Brad,

You could pre-define GPIOs setting on linux kernel device tree when loading kernel.
I’m not sure which SoC you used. Maybe you could direct apply you wanted on linux/arch/arm/boot/dts folder or custom create once. Hope the information could help you.

Thanks,

Samuel Jiang
On May 7, 2019, 2:47 PM +0800, Brad Chou <chou.brad at gmail.com>, wrote:
> Hi All,
> Is there a way to set ALL GPIOs to a pre-defined initial in/out direction and high/low value ?
> I see there is a gpio_defs.json, but seems only the direction can be set, ie. In or out, not high / low settings.
> Now, I am using a shell script with gpioset utility to do the job.
> But I know using shell to do it is a bad idea.
> Does anyone have better ideas ?
>
> Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20190507/f8880749/attachment.htm>


More information about the openbmc mailing list