tcpci module in Kernel 5.15.74 with PTN5110 not working correctly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello

For a few weeks now I am trying to make the PTN5110 chip work with the new Kernel 5.15.74. The same hardware setup was working with the 4.19.72 Kernel. The steps I took so far are as follows:
1. Study the Documentation and look at example Device Tree's in the Kernel
2. Try out different Device Tree configurations derived from the Documentation and examples
3. I did look on Stackoverflow, the NXP and other forums for any similar issue but could not find any
4. Updating the Kernel to the newest Version I was able to find: 5.15.74 (Hash: f0bee94053065c7cb8eacadfdd6bf739a2042b35 in Repo: git://git.yoctoproject.org/linux-yocto.git;branch=v5.15/standard/base)
5. Downgrade to the earliest Kernel possible: v5.10-rc1 (Hash: 3650b228f83adda7e5ee532e2b90429c03f7b9ec in Repo: git://git.yoctoproject.org/linux-yocto.git;branch=v5.15/standard/base)

None of those steps had any effect. Every time I plug in a USB-A to USB-C cable the Kernel gets stuck in the ISR until I unplug the cable. (Attaching a full USB-PD capable Power Source over a USB-C cable works fine)
This results in an unreasonable high CPU usage (most of the times the CPU gets blocked completely).

I did analyze the I2C bus and found that the old Kernel did change many configurations after the A-C cable got attached while the new Kernel does nothing (please see logs below).
I also did compare what happens on the I2C bus during chip initialization but did not find any mentionable differences.

My HW setup is an i.mx6ul with the PTN5110 attached on I2C4.

=================================================
My device tree looks like this:
/ {
         regulators {
                 compatible = "simple-bus";
                 #address-cells = <1>;
                 #size-cells = <0>;

                 reg_usb_otg1_vbus: regulator@2 {
                          compatible = "regulator-fixed";
                          reg = <2>;
                          regulator-name = "usb_otg1_vbus";
                          pinctrl-names = "default";
                          pinctrl-0 = <&pinctrl_usb_otg1_vbus>;
                          regulator-min-microvolt = <5000000>;
                          regulator-max-microvolt = <5000000>;
                          gpio = <&gpio2 8 GPIO_ACTIVE_HIGH>;
                          enable-active-high;
                          status = "okay";
                 };
         };
};

&usbotg1 {
         /*pinctrl-names = "default";
         pinctrl-0 = <&pinctrl_usbotg1>;*/
         dr_mode = "otg";
         status = "okay";
         disable-over-current;
         vbus-supply = <&reg_usb_otg1_vbus>;
};

&i2c4 {
         clock-frequency = <100000>;
         pinctrl-names = "default";
         pinctrl-0 = <&pinctrl_i2c4>;
         status = "okay";

         usb_pd: ptn5110@50 {
                 compatible = "nxp,ptn5110";
                 reg = <0x50>;
                 pinctrl-names = "default";
                 pinctrl-0 = <&pinctrl_usb_pd>;
                 interrupt-parent = <&gpio2>;
                 interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
                 wakeup-source;

                 usb_con: connector {
                          compatible = "usb-c-connector";
                          label = "USB-C";
                          data-role = "dual";
                          power-role = "dual";
                          try-power-role = "sink";
                          source-pdos = <PDO_FIXED(VSAFE5V, 2000, PDO_FIXED_USB_COMM | PDO_FIXED_DUAL_ROLE)>;
                          sink-pdos = <PDO_FIXED(VSAFE5V, 2000, PDO_FIXED_USB_COMM | PDO_FIXED_DUAL_ROLE)
                                     //PDO_FIXED(VSAFE5V, 3000, 0)
                                     //PDO_FIXED(9000, 3000, 0)
                                     PDO_FIXED(12000, 3000, 0)
                                     PDO_FIXED(20000, 3000, 0)>;
                                     //PDO_FIXED(20000, 5000, 0)>;
                          op-sink-microwatt = <10000000>;

                 };
         };
};

&iomuxc {
         pinctrl_i2c4: i2c4grp {
                 fsl,pins = <
                          MX6UL_PAD_UART2_TX_DATA__I2C4_SCL 0x4001b8b0
                          MX6UL_PAD_UART2_RX_DATA__I2C4_SDA 0x4001b8b0
                 >;
         };

         pinctrl_usb_pd: usbpdgrp {
                 fsl,pins = <
                          MX6UL_PAD_ENET2_TX_DATA0__GPIO2_IO11      0x0001b020 /* Alert Interrupt */
                          MX6UL_PAD_ENET2_TX_CLK__GPIO2_IO14        0x0001b020 /* Fault Interrupt */
                 >;
         };

         pinctrl_usb_otg1_vbus: usbotg1 {
                 fsl,pins = <
                          MX6UL_PAD_ENET2_RX_DATA0__GPIO2_IO08      0x000000b9
                          MX6UL_PAD_ENET2_RX_DATA1__USB_OTG1_OC     0x000010b0
                 >;
         };
};

=================================================
I2C Log on plug in event of Kernel 5.15.68:
Direction  | Address  | Data
-------------------------------
Read       | 10       | 02 22
Write      | 10       | 02 22
Read       | 14       | 04
Read       | 10       | 02 02
Write      | 10       | 02 02
Read       | 1E       | 0C
Read       | 14       | 04
Read       | 10       | 03 02
Write      | 10       | 03 02
Read       | 1E       | 0C
Read       | 1A       | 4A
Read       | 14       | 04
Read       | 1D       | 11
Read       | 1E       | 0C

Pause for 200ms

Read       | 1A       | 4A
Read       | 1A       | 4A
Read       | 1D       | 11
Write      | 1A       | 0E
Write      | 19       | 00
Write      | 2E       | 02
Write      | 23       | 66
Write      | 23       | 55
Write      | 2F       | 21

Pause for 300ms

Write      | 51       | 02
Write      | 52       | 00 00
Write      | 50       | 25
Read       | 10       | 50 02
Write      | 10       | 50 02
Read       | 10       | 00 02
Write      | 10       | 00 02
Write      | 72       | 8C 00
Read       | 1C       | 60
Read       | 10       | 00 02
Write      | 10       | 00 02
Write      | 2F       | 00
Read       | 1C       | 60
Read       | 10       | 00 02
Write      | 10       | 00 02
Write      | 2E       | 02
Read       | 10       | 00 02
Write      | 10       | 00 02
Read       | 10       | 00 02
Write      | 10       | 00 02
Read       | 10       | 00 02
Write      | 10       | 00 02
Read       | 10       | 00 02
Write      | 10       | 00 02
(It will loop like this until the cable gets detached)


I2C Log on plug in event of Kernel 5.15.68:
Direction  | Address  | Data
-------------------------------
Read       | 10       | 02 22
Write      | 10       | 02 22
Read       | 14       | 04
Read       | 10       | 02 02
Write      | 10       | 02 02
Read       | 1E       | 0C
Read       | 14       | 04
Read       | 10       | 02 02
Write      | 10       | 02 02
Read       | 1E       | 0C
Read       | 14       | 04
Read       | 1E       | 0C

Pause for 200ms

Read       | 10       | 01 02
Write      | 10       | 01 02
Read       | 1D       | 11

Pause for 250ms

Read       | 1A       | 4A
Write      | 1A       | 4E
Write      | 19       | 00
Write      | 2E       | 02
Write      | 23       | 66
Write      | 23       | 55
Write      | 2F       | 21

Pause for 4ms

Write      | 51       | 02
Write      | 52       | 00 00
Write      | 50       | 35
Read       | 10       | 50 02
Write      | 10       | 50 02
Read       | 10       | 00 02
Write      | 10       | 00 02
Write      | 2F       | 00
Read       | 10       | 00 02
Write      | 10       | 00 02
Read       | 1C       | 60
Read       | 10       | 00 02
Write      | 10       | 00 02
Write      | 23       | 66
Read       | 10       | 02 02
Write      | 10       | 02 02
Write      | 23       | 44
Read       | 14       | FF
Write      | 2E       | 02
Read       | 1E       | 0C
Write      | 10       | FF FF
Write      | 14       | 04
Write      | 23       | 33
Write      | 12       | 7F 00
Write      | 2F       | 00
Write      | 23       | 66
Write      | 23       | 44
Read       | 1C       | 60
Read       | 1A       | 4E
Write      | 1A       | 4E
Write      | 19       | 00
Write      | 2E       | 02
Read       | 1E       | 0C
Read       | 1D       | 11
Write      | 2F       | 00
Write      | 23       | 66
Write      | 23       | 44
Read       | 1C       | 60
Read       | 1A       | 4E
Write      | 1A       | 4E
Write      | 19       | 00
Write      | 2E       | 02
Write      | 1A       | 0F
Read       | 10       | 01 02
Write      | 10       | 01 02
Read       | 1D       | 00
Write      | 1A       | 4A
Write      | 23       | 99
Read       | 10       | 01 02
Write      | 10       | 01 02
Read       | 1D       | 11
(no more communication after this point)

-- 
Dipl. El-Ing. FH Christian Bach, Projektleiter
Direct +41 43 456 16 96  .  http://www.scs.ch
Supercomputing Systems AG  .  Technoparkstrasse 1  .  CH-8005 Zürich 





[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux