Tool/software: Linux
Hi,
I have a custom AM5728 based board. We are using a Phytec Phycore 057 SOM. It utilizes the TPS6590375 PMIC.
I recently switched from kernel 4.9 to 4.14 from git.ti.com/ti-linux-kernel/ti-linux-kernel/ti-linux-4.14.y
Since the switch to 4.14. the Poweroff is not working reliably. It seems as if the i2c bus is already disabled when the palmas_power_off is called and tries to talk to the PMIC.
Here are two different error logs. In one case it just hangs, in the other a kernel panic is thrown. I have added some tracing messages.
Starting Power-Off... [ 129.325900] systemd-shutdown[1]: Syncing filesystems and block devices. [ 129.349152] systemd-shutdown[1]: Sending SIGTERM to remaining processes... [ 129.364119] systemd-journald[143]: Received SIGTERM from PID 1 (systemd-shutdow). [ 129.438177] systemd-shutdown[1]: Sending SIGKILL to remaining processes... [ 129.453152] systemd-shutdown[1]: Unmounting file systems. [ 129.488663] EXT4-fs (mmcblk1p2): re-mounted. Opts: data=ordered [ 129.497320] systemd-shutdown[1]: All filesystems unmounted. [ 129.503459] systemd-shutdown[1]: Deactivating swaps. [ 129.508819] systemd-shutdown[1]: All swaps deactivated. [ 129.514306] systemd-shutdown[1]: Detaching loop devices. [ 129.523747] systemd-shutdown[1]: All loop devices detached. [ 129.529640] systemd-shutdown[1]: Detaching DM devices. [ 129.535255] systemd-shutdown[1]: All DM devices detached. [ 129.545822] systemd-shutdown[1]: Syncing filesystems and block devices. [ 129.552919] systemd-shutdown[1]: Powering off. [ 129.587829] reboot: migrate_to_reboot_cpu [ 129.592080] reboot: syscore_shutdown [ 129.595825] syscore_shutdown++ [ 129.599054] PM: Calling ledtrig_cpu_syscore_shutdown+0x0/0x8 [ 129.604990] PM: Calling irq_gc_shutdown+0x0/0x54 [ 129.609846] PM: Calling cpufreq_suspend+0x0/0x110 [ 129.614782] syscore_shutdown-- [ 129.617992] reboot: Power down [ 129.621189] local_irq_disable [ 129.624331] smp_send_stop [ 129.627078] pm_power_off [ 129.629731] palmas_power_off++ [ 129.632935] palmas-override-powerhold [ 129.636776] regmap_update_bits slave: 0 addr: 0xfb
Starting Power-Off... [ 19.719908] systemd-shutdown[1]: Syncing filesystems and block devices. [ 19.742652] systemd-shutdown[1]: Sending SIGTERM to remaining processes... [ 19.757785] systemd-journald[144]: Received SIGTERM from PID 1 (systemd-shutdow). [ 19.827671] systemd-shutdown[1]: Sending SIGKILL to remaining processes... [ 19.842800] systemd-shutdown[1]: Unmounting file systems. [ 19.883415] EXT4-fs (mmcblk1p2): re-mounted. Opts: data=ordered [ 19.892337] systemd-shutdown[1]: All filesystems unmounted. [ 19.898261] systemd-shutdown[1]: Deactivating swaps. [ 19.903584] systemd-shutdown[1]: All swaps deactivated. [ 19.909105] systemd-shutdown[1]: Detaching loop devices. [ 19.918531] systemd-shutdown[1]: All loop devices detached. [ 19.924381] systemd-shutdown[1]: Detaching DM devices. [ 19.930047] systemd-shutdown[1]: All DM devices detached. [ 19.940524] systemd-shutdown[1]: Syncing filesystems and block devices. [ 19.947616] systemd-shutdown[1]: Powering off. [ 19.952277] reboot: kernel_power_off++ [ 19.991093] reboot: migrate_to_reboot_cpu [ 19.995342] reboot: syscore_shutdown [ 19.999112] syscore_shutdown++ [ 20.002326] PM: Calling ledtrig_cpu_syscore_shutdown+0x0/0x8 [ 20.008297] PM: Calling irq_gc_shutdown+0x0/0x54 [ 20.013145] PM: Calling cpufreq_suspend+0x0/0x110 [ 20.018095] syscore_shutdown-- [ 20.021289] reboot: Power down [ 20.024492] machine_power_off++ [ 20.027814] local_irq_disable [ 20.030924] smp_send_stop [ 20.033668] pm_power_off [ 20.036318] palmas_power_off++ [ 20.039521] palmas-override-powerhold [ 20.043362] regmap_update_bits slave: 0 addr: 0xfb [ 21.081850] omap_i2c 48070000.i2c: controller timed out [ 21.111748] palmas 0-0058: Unable to write PRIMARY_SECONDARY_PAD2 -110 [ 21.118599] regmap_update_bits slave: 0 addr: 0xa0 [ 22.197868] omap_i2c 48070000.i2c: controller timed out [ 22.227777] palmas_power_off: Unable to write to DEV_CTRL_DEV_ON: -110 [ 22.234626] palmas_power_off-- [ 22.237856] machine_power_off-- [ 22.241279] reboot: kernel_power_off-- [ 22.251875] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000000 [ 22.251875] [ 22.261462] CPU: 0 PID: 1 Comm: systemd-shutdow Not tainted 4.14.54-02970-g9d1c806-dirty #321 [ 22.270411] Hardware name: Generic DRA74X (Flattened Device Tree) [ 22.276822] [<c0210024>] (unwind_backtrace) from [<c020b840>] (show_stack+0x10/0x14) [ 22.284953] [<c020b840>] (show_stack) from [<c0a1be2c>] (dump_stack+0x7c/0x90) [ 22.292538] [<c0a1be2c>] (dump_stack) from [<c023661c>] (panic+0xdc/0x248) [ 22.299758] [<c023661c>] (panic) from [<c023aa0c>] (complete_and_exit+0x0/0x1c) [ 22.307432] [<c023aa0c>] (complete_and_exit) from [<ee0d9e78>] (0xee0d9e78) [ 22.314754] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000000 [ 22.314754]
Any idea what might be going wrong here?
I know that ti-linux-4.14.y is under development and some features may not work but I'm running 4.14 since ~half a year and everything else is fine. But this problem is there from day one and is not going away or didn't change behaviour. So I'm pretty sure I'm having an, in some way special, case which didn't turn up in any development at TI. Maybe it's my devietree or something like this.
Regards,
Michael