clearfog: SPI: Add a hack for reset during boot
We have three external chips whose "lifetime" does not necessarily match
the boot-up state of the main SoC. We also don't have access to the
power-up-reset lanes of the main SoC. Still, it would be nice to
automatically reset both peripherals (one MAX14830 and two MCP23S17)
during bootup so that they are in a "known good" state.
This patch is a hack because there's no dependency saying "create the
hog at first" and only after that "probe the drivers".
FIXME: Check the `regulator-gpio`.
Change-Id: I89b2cba2e912f7aefff9b08dbc9d759cdaa36954
diff --git a/board/czechlight/clearfog/czechlight-clearfog.dts b/board/czechlight/clearfog/czechlight-clearfog.dts
index c791104..211d348 100644
--- a/board/czechlight/clearfog/czechlight-clearfog.dts
+++ b/board/czechlight/clearfog/czechlight-clearfog.dts
@@ -44,6 +44,16 @@
status = "disabled";
};
+&gpio0 {
+ spi_reset {
+ /* MPP29: defaults to 0 at boot time */
+ gpio-hog;
+ gpios = <29 GPIO_ACTIVE_LOW>;
+ output-low;
+ line-name = "SPI-reset";
+ };
+};
+
&gpio1 {
spi_int {
/* MPP54: this needs an external pull-up */