This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

tps65910 connected to AM3352 on EXTINTn, using the 65910 RTC, interrupt problem

Other Parts Discussed in Thread: TPS65910, AM3352, TPS65910A

Hi,

we just finished a new custom design with AM3352 and the tps65910 PMIC controller (mostly based on beaglebone black HW), using the Yocto YP Core - Dizzy (1.7.1) Build System.

We were able to iron out most of the issues, there is one issue that remains unresolved; there is an interrupt problem with the tps65910 and the tps65910 RTC kernel driver.

Please find below a brief description of our custom board and some log snippets from the kernel boot process that will show the problem:

CPU: AM3352, DDR3, two ethernet ports used, mmc, emmc, i2c...

Software Stack: Linux version 3.14.19-yocto-standard, Yocto dizzy 1.7.1, modified beaglebone branch

PMIC tps65910, connected to AM3352 more or less as per the

"TPS65910Ax User's Guide For AM335x Processors"

Most important: the INT1 Pin of the 65910 is connected to the EXTINTn Port of the Am3352 (like on beaglebone  black).

During bootup of the kernel there is a long delay (~20 sec.) after the console log entry:

"random: nonblocking pool is initialized"

and before the log entry:

"irq 23: nobody cared (try booting with the "irqpoll" option)"

(full kernel log and device tree see below)

Measuring on the INT1 Pin of the PMIC reveals that it is permanently low, so an IRQ is pending. The kernel tries to service, doesn't find a driver...

After the delay the kernel disables the interrupt, and the system continues booting. The interrupt remains disabled.

The RTC driver then loads and the RTC seems to be working (probably without alarm capability)

Any help, on how we can fix that situation is highly appreciated.

best regards

Chris

-- 
acurana GmbH, Bahnhofstr. 28,
83043 Bad Aibling, Germany

Tel.: +49 8061 / 93 98 386
Fax: +49 8061 / 93 98 385

http://www.acurana.de/

Below you will find the relevant device tree entries and some snippets of the kernel log. The full kernel log can be found here:

---www.acurana.de/typo3temp/kernel-log-cu4xx-rtc-issue.txt---(please copy to browser url line)

 

Device Tree:

&i2c0 {
    pinctrl-names = "default";
    pinctrl-0 = <&i2c0_pins>;

    status = "okay";
    clock-frequency = <400000>;

    tps: tps@2d {
        reg = <0x2d>;
    };
};

&tps {
    pinctrl-names = "default";
    pinctrl-0 = <&tps_pins>;

    interrupts = <7>;
    interrupt-parent = <&intc>;

    ti,en-ck32k-xtal;
   
    vcc1-supply = <&vmmcsd_fixed>;
    vcc2-supply = <&vmmcsd_fixed>;
    vcc3-supply = <&vmmcsd_fixed>;
...

#include "tps65910.dtsi"
...

 

Kernel log snippet

...

random: nonblocking pool is initialized

< approx. 20 sec. delay >


irq 23: nobody cared (try booting with the "irqpoll" option)
CPU: 0 PID: 48 Comm: irq/23-tps65910 Tainted: G        W    3.14.19-yocto-standard #2
[<c0015674>] (unwind_backtrace) from [<c00124a0>] (show_stack+0x20/0x24)
[<c00124a0>] (show_stack) from [<c06e4348>] (dump_stack+0x20/0x28)
[<c06e4348>] (dump_stack) from [<c007a32c>] (__report_bad_irq.isra.7+0x34/0xf0)
[<c007a32c>] (__report_bad_irq.isra.7) from [<c007a648>] (note_interrupt+0x1dc/0x284)
[<c007a648>] (note_interrupt) from [<c0078708>] (handle_irq_event_percpu+0x270/0x2c4)
[<c0078708>] (handle_irq_event_percpu) from [<c00787cc>] (handle_irq_event+0x70/0x90)
[<c00787cc>] (handle_irq_event) from [<c007b294>] (handle_level_irq+0xe8/0x128)
[<c007b294>] (handle_level_irq) from [<c0077ce0>] (generic_handle_irq+0x30/0x40)
[<c0077ce0>] (generic_handle_irq) from [<c000f30c>] (handle_IRQ+0x70/0x90)
[<c000f30c>] (handle_IRQ) from [<c00086cc>] (omap3_intc_handle_irq+0x74/0x9c)
[<c00086cc>] (omap3_intc_handle_irq) from [<c06e9cc0>] (__irq_svc+0x40/0x70)
Exception stack(0xde43feb0 to 0xde43fef8)
fea0:                                     00000088 00015050 de00b00c 00000000
fec0: de004b80 de43e000 de428400 de43e000 c0078fec 00000001 00000000 de43ff14
fee0: de43fee0 de43fef8 c007b160 c0078fac a0000113 ffffffff
[<c06e9cc0>] (__irq_svc) from [<c0078fac>] (irq_finalize_oneshot+0xec/0x12c)
[<c0078fac>] (irq_finalize_oneshot) from [<c0079028>] (irq_thread_fn+0x3c/0x44)
[<c0079028>] (irq_thread_fn) from [<c007925c>] (irq_thread+0xc4/0x13c)
[<c007925c>] (irq_thread) from [<c005985c>] (kthread+0xd0/0xe4)
[<c005985c>] (kthread) from [<c000e398>] (ret_from_fork+0x14/0x20)
handlers:
[<c00787ec>] irq_default_primary_handler threaded [<c0458774>] regmap_irq_thread
Disabling IRQ #23
vrtc: 1800 mV
vrtc: supplied by vmmcsd_fixed
vio: 1500 mV
vio: supplied by vmmcsd_fixed
vdd_core: 1075 <--> 1125 mV at 1100 mV
vdd_core: supplied by vmmcsd_fixed
vdd_shv: 1075 <--> 1125 mV at 1100 mV
vdd_shv: supplied by vmmcsd_fixed
vdd3: 5000 mV
vdig1: 1800 mV
vdig1: supplied by vmmcsd_fixed
vdig2: 1800 mV
vdig2: supplied by vmmcsd_fixed
vpll: 1800 mV
vpll: supplied by vmmcsd_fixed
vdac: 1800 mV
vdac: supplied by vmmcsd_fixed
vaux1: 1800 mV
vaux1: supplied by vmmcsd_fixed
vaux2: 3300 mV
vaux2: supplied by vmmcsd_fixed
vaux33: 3300 mV
vaux33: supplied by vmmcsd_fixed
vmmc: 3300 mV
vmmc: supplied by vmmcsd_fixed
tps65910-rtc tps65910-rtc: rtc core: registered tps65910-rtc as rtc0

  • Hi Christopher,

    Regarding hardware, the TPS65910A INT1 pin is left unconnected on all AM335X reference designs. I will ask the SW team to take a look at this.

  • Hi Biser,

    many thanks for the quick reply. We also keep researching this issue and there are a few more bits of information that might be helpful:

    We tried without an IRQ setting in the device tree (without     interrupts = <7>;
        interrupt-parent = <&intc>;).

    The driver initialisation then fails with:

    tps65910-rtc tps65910-rtc: IRQ is not free.
    tps65910-rtc: probe of tps65910-rtc failed with error -22

    We looked at the driver source Code of  rtc-tps65910.c. The driver works, as long as  the call to "devm_request_threaded_irq" goes through. That means in order to have that driver working an interrupt assignment in the device tree is mandatory.

    We also looked at the documentation "TPS65910Ax User's Guide For AM335x Processors". There is says that IT_POL in EEPROM Mode is "Active High" by default. That would explain the low signal on INT1 that we see.

    Contrary to that in "TPS65910x Integrated Power-Management Unit Top Specification" (Data Sheet) IT_POL in EEPROM Mode is specified with default "Active Low". That is what we based our design on.

    I think in order to fix that issue properly we need to understand the correct default value of IT_POL in DEVCTRL2_REG of tps65910.
    (BOOT0 = low, BOOT1=VRTC in our Design, "EEPROM Mode")

    many thanks

    Chris

  • I think I can see now what's the problem. AM335X Silicon Revision 1.0 had the nNMI input wrong, with active high polarity. This is explained in Errata Advisory 1.0.6. I think that this can be adjusted by changing the DEVCTRL2_REG bit IT_POL value to 0 in u-boot.

  • Hi Biser,
    thanks, this sounds like a solution. I'll report back as soon as I have the u-boot patch done and working.
    best regards
    Chris
  • Hi Biser,

    sorry, it took me some time to reply.

    We fixed the issue by changing the INT1 polarity as soon as MLO/u-boot has the pinmux for i2c up and running:
    ...
    +#define PMIC_REG_DEVCTRL2 0x40
    +uint8_t devctrl = 0x34; // INT1 low active // default 0x35

    + if (i2c_write(CONFIG_SYS_I2C_PMIC_ADDR, PMIC_REG_DEVCTRL2, 1, (uchar *)&devctrl,
    + 1)) {
    + puts("Could not write the PMIC; something fundamentally"
    + " wrong on the I2C bus.\n");
    + return -EIO;
    + }
    + printf("PMIC set reg: 0x%02x to 0x%02x\n", PMIC_REG_DEVCTRL2, devctrl);

    thanks again & best regards
    Chris
  • Thanks for the update Chris!