Trying for a while now, but I cannot find an EEPROM memory with some address bit mapped to a GPIO. Or from a different angle, a GPIO expander with an EEPROM memory to save the config.
Do such devices exist in the market?
EDIT: of course the easier way would be to use an MCU, but that is not an option, as it requires additional dependencies. This is the required functionality:
A CPU can boot from either NOR flash 1 or NOR flash 2. The only way to switch between the flashes is to switch the #CS pin. Before the CPU boots, the #CS pin info (0 or 1) has to be set in hardware. That can be done by the external entity that has a GPIO and an EEPROM. The configuration can change during run time, that's why it has to programable somehow (i.e, via I2C). So I am either looking for an EEPROM that maps one of its addressed values to GPIOs (although I just need 1), or I am looking for a GPIO expanded with (as mentioned) a non volatile memory. This way at power up, the programmed GPIO value is preserved.
There is more logic to that, but this explains it in a nutshell. I simply need to preserve a state of a GPIO (programmed before shutdown) at power up. The gpio state has to be valid for infinity in theory, that's why charging a capacitor or other solution is a no go.