Part Number: AM5718
Tool/software: Linux
Dear Sir or Madame
We have a custom board and own custom .dts and .dtsi files (based on TI's evm and idk files)
Our PMIC (we use TPS6590379ZWSR) is connected to i2c4 (and not to i2c1 as in the original code)
Our problem is that when the palmas code try to find i2c4 it only find the first i2c and do not find the other i2c in it's device tree.
in function "palmas_i2c_write_u8" in file palmas.c we have changed the line from
ret = i2c_get_chip_for_busnum(0, chip_no, 1, &dev);
into
ret = i2c_get_chip_for_busnum(3, chip_no, 1, &dev);
and we get the following messages in the terminal (I have added some extra debug prints)
uclass_get_device_by_seq: id 31 seq 3 uclass_find_device_by_seq: id 31 seq_or_req_seq 3 find_req_seq 0 uclass_find_device_by_seq: 0 3 uclass_find_device_by_seq: name i2c - 0 -1 'i2c@48070000' uclass_find_device_by_seq: - not found uclass_find_device_by_seq: id 31 seq_or_req_seq 3 find_req_seq 1 uclass_find_device_by_seq: 1 3 uclass_find_device_by_seq: name i2c - 0 -1 'i2c@48070000' uclass_find_device_by_seq: - not found i2c_get_chip_for_busnum: Cannot find I2C bus 3 palmas_i2c_write_u8: unable to get I2C bus. ret -19 tps65903x: 3 could not set LDO1 voltage.
Why does it not find the other three i2c's when searching for the class UCLASS_I2C?
Do they need to be probed in the code somehow ?
Our .dtsi file look like this
&i2c1 {
status = "okay";
pinctrl-names = "default";
};
&i2c2 {
status = "okay";
pinctrl-names = "default";
};
&i2c3 {
status = "okay";
pinctrl-names = "default";
clock-frequency = <400000>;
mcp_rtc: rtc@Df {
compatible = "microchip,mcp7941x";
reg = <0xDf>;
interrupts-extended = <&crossbar_mpu GIC_SPI 2 IRQ_TYPE_EDGE_RISING>,
<&dra7_pmx_core 0x424>;
interrupt-names = "irq", "wakeup";
wakeup-source;
};
eeprom@a0{
compatible = "atmel,24c256";
reg = <0xA0>;
};
};
&i2c4 {
status = "okay";
pinctrl-names = "default";
clock-frequency = <400000>;
tps659038: tps659038@48 {
compatible = "ti,tps659038";
reg = <0x48>;
interrupts-extended = <&gpio2 19 IRQ_TYPE_LEVEL_HIGH
&dra7_pmx_core 0x418>;
#interrupt-cells = <2>;
interrupt-controller;
ti,system-power-controller;
ti,palmas-override-powerhold;
tps659038_rtc: tps659038_rtc {
compatible = "ti,palmas-rtc";
interrupt-parent = <&tps659038>;
interrupts = <8 IRQ_TYPE_EDGE_FALLING>;
wakeup-source;
};
};
};
