Re: Reading GPIOs with DM_GPIO before device tree is loaded

2022-07-22 Thread Simon Glass
Hi Hugo, On Thu, 21 Jul 2022 at 11:14, Hugo Villeneuve wrote: > > On Wed, 20 Jul 2022 09:01:01 -0600 > Simon Glass wrote: > > > Hi Hugo, > > > > On Wed, 20 Jul 2022 at 04:54, Hugo Villeneuve wrote: > > > > > > Hi, > > > in board_early_init_f(), i call a custom function get_som_revision() to >

Re: Reading GPIOs with DM_GPIO before device tree is loaded

2022-07-21 Thread Hugo Villeneuve
On Wed, 20 Jul 2022 09:01:01 -0600 Simon Glass wrote: > Hi Hugo, > > On Wed, 20 Jul 2022 at 04:54, Hugo Villeneuve wrote: > > > > Hi, > > in board_early_init_f(), i call a custom function get_som_revision() to > > read some GPIOs that are used to determine the SOM revision. This function > >

Re: Reading GPIOs with DM_GPIO before device tree is loaded

2022-07-20 Thread Simon Glass
Hi Hugo, On Wed, 20 Jul 2022 at 04:54, Hugo Villeneuve wrote: > > Hi, > in board_early_init_f(), i call a custom function get_som_revision() to read > some GPIOs that are used to determine the SOM revision. This function > basically sets the iomux, and then uses > gpio_request/gpio_direction_i

Reading GPIOs with DM_GPIO before device tree is loaded

2022-07-20 Thread Hugo Villeneuve
Hi, in board_early_init_f(), i call a custom function get_som_revision() to read some GPIOs that are used to determine the SOM revision. This function basically sets the iomux, and then uses gpio_request/gpio_direction_input/gpio_get_value functions to read the GPIOs. Then, this SOM revision inf