It appears that in some cases, the order of pinMode calls affects the pin configuration.
For example, a test program containing the following two lines
pinMode(GPIO0_2, OUTPUT, 0)
pinMode(GPIO0_20, INPUT, 0)
works as expected. Specifically, in the pins file we find
pin 84 (44e10950) 00000007 pinctrl-single
pin 109 (44e109b4) 0000002f pinctrl-single
pin number 84 corresponds to GPIO0_2 and 109 corresponds to GPIO0_20.
However, if you reverse the order of the two pinMode calls, you get
pin 84 (44e10950) 00000007 pinctrl-single
pin 109 (44e109b4) 00000007 pinctrl-single
That is, both signals are configured as outputs.
It appears that in some cases, the order of pinMode calls affects the pin configuration.
For example, a test program containing the following two lines
pinMode(GPIO0_2, OUTPUT, 0)
pinMode(GPIO0_20, INPUT, 0)
works as expected. Specifically, in the pins file we find
pin 84 (44e10950) 00000007 pinctrl-single
pin 109 (44e109b4) 0000002f pinctrl-single
pin number 84 corresponds to GPIO0_2 and 109 corresponds to GPIO0_20.
However, if you reverse the order of the two pinMode calls, you get
pin 84 (44e10950) 00000007 pinctrl-single
pin 109 (44e109b4) 00000007 pinctrl-single
That is, both signals are configured as outputs.