Support for sysmoOCTSIM NCN8025/SX1503 control

This adds an I2C bit-banging layer, defines the four busses on the
sysmoOCTSIM and adds some high-level functions to control the NCN8025
for each SIM slot.

Change-Id: Ic5287cf80d2be2070c504e9d40f7c6fc0d37d8b9
diff --git a/sysmoOCTSIM/octsim_i2c.c b/sysmoOCTSIM/octsim_i2c.c
new file mode 100644
index 0000000..5b8a30a
--- /dev/null
+++ b/sysmoOCTSIM/octsim_i2c.c
@@ -0,0 +1,43 @@
+#include "atmel_start_pins.h"
+#include "i2c_bitbang.h"
+
+/* FIXME: This somehow ends up with measured 125 kHz SCL speed ?!?  We should probably
+ * switch away from using delay_us() and instead use some hardware timer? */
+#define I2C_DELAY_US	1
+
+#ifndef SDA1
+/* We should define those pins in Atmel START. Until they are, define them here */
+#define SDA1 GPIO(GPIO_PORTB, 15)
+#define SCL1 GPIO(GPIO_PORTB, 14)
+#define SDA2 GPIO(GPIO_PORTB, 3)
+#define SCL2 GPIO(GPIO_PORTB, 2)
+#define SDA3 GPIO(GPIO_PORTB, 7)
+#define SCL3 GPIO(GPIO_PORTB, 6)
+#define SDA4 GPIO(GPIO_PORTC, 28)
+#define SCL4 GPIO(GPIO_PORTC, 27)
+#endif
+
+/* Unfortunately the schematics count I2C busses from '1', not from '0' :(
+ * In software, we [obviously] count from '0' upwards. */
+const struct i2c_adapter i2c[4] = {
+	[0] = {
+		.pin_sda = SDA1,
+		.pin_scl = SCL1,
+		.udelay = I2C_DELAY_US,
+	},
+	[1] = {
+		.pin_sda = SDA2,
+		.pin_scl = SCL2,
+		.udelay = I2C_DELAY_US,
+	},
+	[2] = {
+		.pin_sda = SDA3,
+		.pin_scl = SCL3,
+		.udelay = I2C_DELAY_US,
+	},
+	[3] = {
+		.pin_sda = SDA4,
+		.pin_scl = SCL4,
+		.udelay = I2C_DELAY_US,
+	}
+};