aboutsummaryrefslogtreecommitdiff
path: root/src/soc/rockchip/rk3288/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc/rockchip/rk3288/include')
-rw-r--r--src/soc/rockchip/rk3288/include/soc/grf.h7
-rw-r--r--src/soc/rockchip/rk3288/include/soc/i2c.h2
2 files changed, 8 insertions, 1 deletions
diff --git a/src/soc/rockchip/rk3288/include/soc/grf.h b/src/soc/rockchip/rk3288/include/soc/grf.h
index 9126aed834..b8c46b5c01 100644
--- a/src/soc/rockchip/rk3288/include/soc/grf.h
+++ b/src/soc/rockchip/rk3288/include/soc/grf.h
@@ -221,4 +221,9 @@ static struct rk3288_sgrf_regs * const rk3288_sgrf = (void *)GRF_SECURE_BASE;
#define IOMUX_EMMCCMD RK_CLRSETBITS(0x3f, 2 << 4 | 2 << 2 | 2 << 0)
#define IOMUX_PWM1 RK_SETBITS(1 << 2)
#define IOMUX_EDP_HOTPLUG RK_CLRSETBITS(0x3 << 6, 0x2 << 6)
-#endif
+
+/* Use to mux a pin back to GPIO function. Since the selector for that is always
+ * 0, we can just reuse RK mask/value patterns and mask out the "value" part. */
+#define IOMUX_GPIO(iomux_clrsetbits) ((iomux_clrsetbits) & (0xffff << 16))
+
+#endif /* __SOC_ROCKCHIP_RK3288_GRF_H__ */
diff --git a/src/soc/rockchip/rk3288/include/soc/i2c.h b/src/soc/rockchip/rk3288/include/soc/i2c.h
index 84d9b7587b..5472423d3c 100644
--- a/src/soc/rockchip/rk3288/include/soc/i2c.h
+++ b/src/soc/rockchip/rk3288/include/soc/i2c.h
@@ -21,6 +21,8 @@
#define __SOC_ROCKCHIP_RK3288_I2C_H__
void i2c_init(unsigned int bus, unsigned int hz);
+void software_i2c_attach(unsigned bus);
+void software_i2c_detach(unsigned bus);
#endif