
On 17:13-20230706, Roger Quadros wrote:
Hi Nishanth,
On 06/07/2023 15:38, Nishanth Menon wrote:
On 21:10-20230704, Roger Quadros wrote:
main_i2c0 and pinmux should be in k3-am642-evm.dts. Also add the I2C EEPROM.
Signed-off-by: Roger Quadros rogerq@kernel.org
arch/arm/dts/k3-am642-evm-u-boot.dtsi | 11 ----------- arch/arm/dts/k3-am642-evm.dts | 20 ++++++++++++++++++++ 2 files changed, 20 insertions(+), 11 deletions(-)
diff --git a/arch/arm/dts/k3-am642-evm-u-boot.dtsi b/arch/arm/dts/k3-am642-evm-u-boot.dtsi index 64857b0909..80c04d0117 100644 --- a/arch/arm/dts/k3-am642-evm-u-boot.dtsi +++ b/arch/arm/dts/k3-am642-evm-u-boot.dtsi @@ -34,21 +34,10 @@
&main_pmx0 { bootph-pre-ram;
- main_i2c0_pins_default: main-i2c0-pins-default {
bootph-pre-ram;
pinctrl-single,pins = <
AM64X_IOPAD(0x0260, PIN_INPUT_PULLUP, 0) /* (A18) I2C0_SCL */
AM64X_IOPAD(0x0264, PIN_INPUT_PULLUP, 0) /* (B18) I2C0_SDA */
>;
- };
};
&main_i2c0 {
- status = "okay"; bootph-pre-ram;
- pinctrl-names = "default";
- pinctrl-0 = <&main_i2c0_pins_default>;
- clock-frequency = <400000>;
};
&main_uart0 { diff --git a/arch/arm/dts/k3-am642-evm.dts b/arch/arm/dts/k3-am642-evm.dts index 39feea78a0..529eb81538 100644 --- a/arch/arm/dts/k3-am642-evm.dts +++ b/arch/arm/dts/k3-am642-evm.dts @@ -233,6 +233,13 @@ >; };
- main_i2c0_pins_default: main-i2c0-default-pins {
pinctrl-single,pins = <
AM64X_IOPAD(0x0260, PIN_INPUT_PULLUP, 0) /* (A18) I2C0_SCL */
AM64X_IOPAD(0x0264, PIN_INPUT_PULLUP, 0) /* (B18) I2C0_SDA */
>;
- };
- main_i2c1_pins_default: main-i2c1-pins-default { pinctrl-single,pins = < AM64X_IOPAD(0x0268, PIN_INPUT_PULLUP, 0) /* (C18) I2C1_SCL */
@@ -335,6 +342,19 @@ status = "reserved"; };
+&main_i2c0 {
- status = "okay";
- pinctrl-names = "default";
- pinctrl-0 = <&main_i2c0_pins_default>;
- clock-frequency = <400000>;
- eeprom@50 {
/* AT24CM01 */
compatible = "atmel,24c1024";
reg = <0x50>;
- };
+};
&main_i2c1 { status = "okay"; pinctrl-names = "default"; -- 2.34.1
We should be getting this change again as part of sync back from kernel.
Got it.
Adding the EEPROM node causes I2C timeout error prints like below. Any clue why that would be the case?
Timed out in wait_for_event: status=0000 Check if pads/pull-ups of bus are properly configured EEPROM not available at 0x50, trying to read at 0x51 Timed out in wait_for_event: status=0000 Check if pads/pull-ups of bus are properly configured Reading on-board EEPROM at 0x51 failed -121
https://lore.kernel.org/all/20230414073328.381336-7-nm@ti.com/ https://gist.github.com/nmenon/6b09f55251225d3f3cce076c32a33bba#file-am64-ev...
Seems to work for me in kernel - u-boot we will need to debug a bit. it has been a massive pain in the backend to deal with the mix of mis-behaving eeproms so far (whack-a-mole).. :(