I’m wondering what the correct way of setting a gpio’s boot state.
I’m having issues with with a reset pin which needs to be high on boot. I added this to mdm9607-pinctrl.dtsi
:
&soc{
tlmm_pinmux: pinctrl@1000000 {
enc28j60_rst_default: enc28j60_rst_default {
mux {
pins = "gpio58";
function = "gpio";
};
config {
pins = "gpio58";
drive-strength = <16>; /* in mA */
output-high;
};
};
};
};
This did not change boot state at all.
Then i read in the AT command reference manual about at+wiocfg
command:
bla bla
<dir> (GPIO direction)
• 0—Input
• 1—Output
<state> (Power-up state for external GPIO configured as an output)
• 0—Output low level
• 1—Output high level
bla bla
So i set the pin config as dir=Output, state=1
which seems to work. Anyone can answer how this all works. Does the WP76XX module override kernel configuration for gpios somehow? And what is the appropriate way of setting the state as this is important to know when going into production.
pin58 = pin8 on the wpXX module, see this for reference : Add ENC28J60 to custom WP7607 board