How to enable a GPIO very early in boot on Apalis TK1 with Ixora (less then 512ms after power on)

Hello,

I have a Apalis TK1 on a Ixora Board. The Board gets power (jumper for always-on is set) from a external board, and this board has a LTC2954 chip to controller the power and the !Kill pin is connected to a gpio of the Apalis TK1 Board.
To keep the power on, this gpio needs to be pulled high no later then 512ms after power on, or the LTC2954 chip will switch off again.

I found the place to enable the gpio in the linux device tree, which works, but is ofcourse to late.
Then i tried to set it in u-boot in board/toradex/apalis-tk1/apalis-tk1.c at the end of arch_misc_init. But that is still too late for the LTC2954 controller…
Is there a place in u-boot where i could enable that gpio even earlier ? Or is there an inherent boot delay on the apalis TK1 or the Ixora Board ?

Can someone tell me how this feature is done on the Ixora board ? As far as i know, it also has such a LTC2954 Power controller…

I have a Apalis TK1 on a Ixora Board. The Board gets power (jumper for always-on is set) from a external board, and this board has a LTC2954 chip to controller the power and the !Kill pin is connected to a GPIO of the Apalis TK1 Board. To keep the power on, this GPIO needs to be pulled high no later then 512ms after power on, or the LTC2954 chip will switch off again.

I guess you are referring to the LTC2954’s FORCE_OFF# pin, right?

Usually one would use a GPIO which is guaranteed to be either high-z or pulled-up upon power-on reset e.g. as all but the Apalis GPIO3 and GPIO4 on Apalis TK1.

I found the place to enable the GPIO in the Linux device tree, which works, but is of course to late. Then I tried to set it in u-boot in board/toradex/apalis-tk1/apalis-tk1.c at the end of arch_misc_init. But that is still too late for the LTC2954 controller… Is there a place in u-boot where I could enable that GPIO even earlier ? Or is there an inherent boot delay on the Apalis TK1 or the Ixora Board ?

I doubt one can meet such a tight timing at all as e.g. even the eMMC NAND flash part may take up to one second to be ready for booting. As mentioned above one most possibly does not get around using a GPIO which is guaranteed to be either high-z or pulled-up upon power-on reset.

Can someone tell me how this feature is done on the Ixora board ? As far as I know, it also has such a LTC2954 Power controller…

You may find some more information about this in the following article on our developer website.

Please note that I don’t think we actually tried this on Apalis TK1 as of yet. However generally whatever is written there should apply as well.

Hi

The TK1 boots in 3 stages, a SoC internal boot loader, the SPL which runs on the AVP and then finally U-Boot proper.

Moving your initialisation to the SPL stage could save you a few milliseconds.
e.g. you could initialize the GPIO you use in board/toradex/apalis-tk1/as3722_init.c pmic_enable_cpu_vdd() to try this out.

However I don’t know if you can reach your 512ms deadline. Even if you can, the time likely will depend on temperature and component tolerances.

On the Ixora the !Kill pin is pulled up in HW. Have a look at the schematic. I’d recommend to implement a similar HW solution to pull the pin up until the software can take over control of the pin.

Max