clearfog: implement I2C bus recovery
Some devices ended up getting stuck in the lab. Since the I2C bus is
pretty critical (the OSC SFP is there, and so is a ton of hwmon chips),
getting that one working is absolutely critical in avoiding a reboot
loop (or a mandatory power cycle).
Change-Id: I02de89b195988d5308103749bad480aae343552f
diff --git a/board/czechlight/clearfog/sdn-roadm-clearfog.dtsi b/board/czechlight/clearfog/sdn-roadm-clearfog.dtsi
index 6a8715a..c502435 100644
--- a/board/czechlight/clearfog/sdn-roadm-clearfog.dtsi
+++ b/board/czechlight/clearfog/sdn-roadm-clearfog.dtsi
@@ -46,6 +46,11 @@
marvell,pins = "mpp24", "mpp25";
marvell,function = "gpio";
};
+
+ clearfog_i2c1_recovery_pins: clearfog-i2c1-recovery-pins {
+ marvell,pins = "mpp26", "mpp27";
+ marvell,function = "gpio";
+ };
};
&mikro_uart_pins {
@@ -224,6 +229,12 @@
};
&i2c1 {
+ pinctrl-names = "default", "gpio";
+ pinctrl-1 = <&clearfog_i2c1_recovery_pins>;
+ single-master;
+ scl-gpios = <&gpio0 26 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+ sda-gpios = <&gpio0 27 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+
#ifdef CLEARFOG_REV1
eeprom@53 {
compatible = "atmel,24c128";