[openwrt/openwrt] ipq40xx: fix I2C pin config on Aruba AP-303H

LEDE Commits lede-commits at lists.infradead.org
Tue Apr 30 03:01:08 PDT 2024


robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/47da1786e9554ee68e32287c747fd88bee539d53

commit 47da1786e9554ee68e32287c747fd88bee539d53
Author: Ryan Salsbury <ryanrs at gmail.com>
AuthorDate: Mon Apr 29 18:05:14 2024 -0700

    ipq40xx: fix I2C pin config on Aruba AP-303H
    
    Turn on SoC pull-ups on I2C pins, since there are no discrete pull-up
    resistors on the bus.
    
    Increase clock to 400 kHz. Both chips on the bus support 400 kHz. I
    tested the ISL28022 at 4,000 reads/sec and didn't see any garbled output
    or bus hangs, even with SoC drive strength reduced to 2 for the test.
    
    Signed-off-by: Ryan Salsbury <ryanrs at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/15334
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 .../arm/boot/dts/qcom/qcom-ipq4029-ap-303h.dts     | 43 ++++++++++++----------
 1 file changed, 23 insertions(+), 20 deletions(-)

diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-ap-303h.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-ap-303h.dts
index 0dec567bc4..69d4810277 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-ap-303h.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-ap-303h.dts
@@ -71,25 +71,6 @@
 		watchdog at b017000 {
 			status = "okay";
 		};
-
-		i2c_0: i2c at 78b7000 {
-			pinctrl-0 = <&i2c_0_pins>;
-			pinctrl-names = "default";
-			status = "okay";
-
-			tpm at 29 {
-				/* No Driver */
-				compatible = "atmel,at97sc3203";
-				reg = <0x29>;
-				read-only;
-			};
-
-			power-monitor at 40 {
-				/* No driver */
-				compatible = "isl,isl28022";
-				reg = <0x40>;
-			};
-		};
 	};
 
 	leds {
@@ -214,7 +195,7 @@
 			pins = "gpio20", "gpio21";
 			function = "blsp_i2c0";
 			drive-strength = <4>;
-			bias-disable;
+			bias-pull-up;
 		};
 	};
 
@@ -242,6 +223,28 @@
 	};
 };
 
+&blsp1_i2c3 {
+	pinctrl-0 = <&i2c_0_pins>;
+	pinctrl-names = "default";
+	status = "okay";
+	clock-frequency = <400000>;
+
+	tpm at 29 {
+		/* No Driver */
+		compatible = "atmel,at97sc3203";
+		reg = <0x29>;
+		read-only;
+	};
+
+	power-monitor at 40 {
+		/* No driver */
+		/* Device also replies on address 0x3f, see   */
+		/* ISL28022 datasheet, "Broadcast Addressing" */
+		compatible = "isl,isl28022";
+		reg = <0x40>;
+	};
+};
+
 &blsp1_spi1 {
 	pinctrl-0 = <&spi_0_pins>;
 	pinctrl-names = "default";




More information about the lede-commits mailing list