Has anyone successfully used a SAMA5D2 Flexcom interface in I2C mode under Linux? The situation I have is that, under Linux4SAM tag "sama5d27wlsom1ek_1.0" (4.14.88), a "/dev/i2c-2" node is created when I do
insmod /lib/modules/4.14.88/kernel/drivers/i2c/busses/i2c-at91.ko,
but then i2cdetect -y 2 returns
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: at91_i2c f8034600.i2c: controller timed out
-- at91_i2c f8034600.i2c: controller timed out
-- at91_i2c f8034600.i2c: controller timed out
(etc.)
and I can see that the SDA and SCL pins are not toggling at all, just sitting at logic-1. This is the relevant section of my .DTS file:
Code: Select all
flx0: flexcom@f8034000 {
atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_TWI>;
status = "okay";
i2c2: i2c@600 {
compatible = "atmel,sama5d2-i2c";
reg = <0x600 0x100>;
interrupts = <19 IRQ_TYPE_LEVEL_HIGH 7>;
dmas = < &dma0 (AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1) | AT91_XDMAC_DT_PERID(11)) >,
< &dma0 (AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1) | AT91_XDMAC_DT_PERID(12)) >;
dma-names = "tx", "rx";
#address-cells = <1>;
#size-cells = <0>;
clocks = <&flx0_clk>;
clock-names = "i2c2_clk";
clock-frequency = <400000>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_flx0_i2c>;
atmel,fifo-size = <16>;
status = "okay";
};
};
pinctrl_flx0_i2c: flx0_i2c {
pinmux = <PIN_PB28__FLEXCOM0_IO0>, <PIN_PB29__FLEXCOM0_IO1>;
bias-disable;
};
I've tried building i2c-at91.ko into the kernel and as a loadable module (after reading https://archlinuxarm.org/forum/viewtopi ... 47&p=55799)
I've read and re-read Documentation/devicetree/bindings/mfd/atmel-flexcom.txt and ...bindings/i2c/i2c-at91.txt, Googled and grep'd and tried many small alterations to the DTS file.
And now I'm ready to admit I'm stuck!
Any suggestions please?
Thansk, Mike H.