summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@armlinux.org.uk>2016-12-08 00:00:49 +0000
committerRussell King (Oracle) <rmk+kernel@armlinux.org.uk>2024-04-16 16:52:31 +0100
commitff7afcf99f4c03d4e62e0ae4544005a39b6914ef (patch)
tree3614941241006297ad0b5c11991f19c30151ee3e /arch
parent7b3f9645f7d3f4e9b4b061fc351dd8859550ba04 (diff)
arm64: dts: marvell: mcbin: workaround wrongly wired i2c1 bus
The I2C1 bus on early mcbin hardware is mis-wired, swapping SCL and SDA. Work around this by using the i2c-gpio driver instead. XXX Caught early and this commit should be removed for mainline. XXX Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm64/boot/dts/marvell/Makefile1
-rw-r--r--arch/arm64/boot/dts/marvell/armada-8040-mcbin-es.dts9
-rw-r--r--arch/arm64/boot/dts/marvell/armada-8040-mcbin.dtsi21
3 files changed, 29 insertions, 2 deletions
diff --git a/arch/arm64/boot/dts/marvell/Makefile b/arch/arm64/boot/dts/marvell/Makefile
index 99b8cb3c49e1..090d2da6999e 100644
--- a/arch/arm64/boot/dts/marvell/Makefile
+++ b/arch/arm64/boot/dts/marvell/Makefile
@@ -15,6 +15,7 @@ dtb-$(CONFIG_ARCH_MVEBU) += armada-7040-mochabin.dtb
dtb-$(CONFIG_ARCH_MVEBU) += armada-8040-clearfog-gt-8k.dtb
dtb-$(CONFIG_ARCH_MVEBU) += armada-8040-db.dtb
dtb-$(CONFIG_ARCH_MVEBU) += armada-8040-mcbin.dtb
+dtb-$(CONFIG_ARCH_MVEBU) += armada-8040-mcbin-es.dtb
dtb-$(CONFIG_ARCH_MVEBU) += armada-8040-mcbin-singleshot.dtb
dtb-$(CONFIG_ARCH_MVEBU) += armada-8040-puzzle-m801.dtb
dtb-$(CONFIG_ARCH_MVEBU) += armada-8080-db.dtb
diff --git a/arch/arm64/boot/dts/marvell/armada-8040-mcbin-es.dts b/arch/arm64/boot/dts/marvell/armada-8040-mcbin-es.dts
new file mode 100644
index 000000000000..2bc49b60cd06
--- /dev/null
+++ b/arch/arm64/boot/dts/marvell/armada-8040-mcbin-es.dts
@@ -0,0 +1,9 @@
+#define MCBIN_BROKEN_I2C1
+#include "armada-8040-mcbin.dts"
+
+/ {
+ model = "Marvell 8040 MACCHIATOBin Double shot (engineering sample)";
+ compatible = "marvell,armada8040-mcbin-doubleshot",
+ "marvell,armada8040-mcbin", "marvell,armada8040",
+ "marvell,armada-ap806-quad", "marvell,armada-ap806";
+};
diff --git a/arch/arm64/boot/dts/marvell/armada-8040-mcbin.dtsi b/arch/arm64/boot/dts/marvell/armada-8040-mcbin.dtsi
index 077f4a41063b..446e3f15b2a0 100644
--- a/arch/arm64/boot/dts/marvell/armada-8040-mcbin.dtsi
+++ b/arch/arm64/boot/dts/marvell/armada-8040-mcbin.dtsi
@@ -106,6 +106,23 @@
pinctrl-0 = <&cp0_sfp_1g_pins &cp1_sfp_1g_pins>;
maximum-power-milliwatt = <2000>;
};
+
+#ifdef MCBIN_BROKEN_I2C1
+ /* work-around the wrongly wired I2C bus on Rev 1.1 boards */
+ broken_i2c1: i2c-controller@0 {
+ compatible = "i2c-gpio";
+ gpios = <&cp0_gpio2 4 GPIO_ACTIVE_HIGH>,
+ <&cp0_gpio2 3 GPIO_ACTIVE_HIGH>;
+ i2c-gpio,delay-us = <2>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+#define I2C1 broken_i2c1
+#define I2C1_PINMUX "gpio"
+#else
+#define I2C1 cp0_i2c1
+#define I2C1_PINMUX "i2c1"
+#endif
};
&uart0 {
@@ -136,7 +153,7 @@
status = "okay";
};
-&cp0_i2c1 {
+&I2C1 {
clock-frequency = <100000>;
pinctrl-names = "default";
pinctrl-0 = <&cp0_i2c1_pins>;
@@ -205,7 +222,7 @@
/* mpp33 - mss? */
cp0_i2c1_pins: i2c1-pins {
marvell,pins = "mpp35", "mpp36";
- marvell,function = "i2c1";
+ marvell,function = I2C1_PINMUX;
};
cp0_i2c0_pins: i2c0-pins {
marvell,pins = "mpp37", "mpp38";