[Letux-kernel] LX20 prototype is booting
H. Nikolaus Schaller
hns at goldelico.com
Fri May 2 12:45:31 CEST 2025
Hi Paul,
> Am 02.05.2025 um 01:32 schrieb Paul Boddie <paul at boddie.org.uk>:
>
> On Thursday, 1 May 2025 22:06:13 CEST H. Nikolaus Schaller wrote:
>>
>> - log time stamps stop - I remember we had something similar on the jz4730
>> and it was some broken clock timer
>
> A brief review of my mail suggested this commit in work-x1600-v6 as a remedy
> for the X1600:
>
> commit fece4ea340931c3f7b09b6a7a0f1f14185b06cf0
> Author: Paul Boddie <paul at boddie.org.uk>
> Date: Sat Feb 24 23:35:55 2024 +0100
>
> Fixed TCU usage and log timestamps.
>
> It's a device tree fix, also mentioned on this list.
Yes, that looks like what we might need! But it seems to be in place for the x2000:
https://github.com/Ingenic-community/linux/blob/v6.1.y/arch/mips/boot/dts/ingenic/x2000.dtsi#L113
tcu: timer at 10002000 {
compatible = "ingenic,x2000-tcu", "ingenic,x1000-tcu", "simple-mfd";
reg = <0x10002000 0x1000>;
#address-cells = <1>;
#size-cells = <1>;
ranges = <0x0 0x10002000 0x1000>;
#clock-cells = <1>;
clocks = <&cgu X2000_CLK_RTCLK>,
<&cgu X2000_CLK_EXCLK>,
<&cgu X2000_CLK_PCLK>;
clock-names = "rtc", "ext", "pclk";
interrupt-controller;
#interrupt-cells = <1>;
interrupt-parent = <&intc>;
interrupts = <27 26 25>;
wdt: watchdog at 0 {
compatible = "ingenic,x2000-watchdog", "ingenic,jz4780-watchdog";
reg = <0x0 0x10>;
clocks = <&tcu TCU_CLK_WDT>;
clock-names = "wdt";
};
};
In the meantime I have analysed further and there is a strange IRQ problem
with the gpio-keys. I had to disable the boot button hookup completely
and the wakeup button stops the LED from blinking while it is pressed.
Seems to be something wrong with the IRQ polarity handling.
In one situation I got this kernel panic:
[ 0.017005] Loading compiled-in X.509 certificates
[ 0.017005] rcu: INFO: rcu_preempt self-detected stall on CPU
[ 0.017005] rcu: 0-...!: (2100 ticks this GP) idle=0004/1/0x40000004 softirq=112/112 fqs=0
[ 0.017005] rcu: (t=2100 jiffies g=-1135 q=1867 ncpus=1)
[ 0.017005] rcu: rcu_preempt kthread timer wakeup didn't happen for 2099 jiffies! g-1135 f0x0 RCU_GP_WAIT_FQS(5) ->state=0x402
[ 0.017005] rcu: Possible timer handling issue on cpu=0 timer-softirq=19
[ 0.017005] rcu: rcu_preempt kthread starved for 2100 jiffies! g-1135 f0x0 RCU_GP_WAIT_FQS(5) ->state=0x402 ->cpu=0
[ 0.017005] rcu: Unless rcu_preempt kthread gets sufficient CPU time, OOM is now expected behavior.
[ 0.017005] rcu: RCU grace-period kthread stack dump:
[ 0.017005] task:rcu_preempt state:I stack:0 pid:15 tgid:15 ppid:2 task_flags:0x208040 flags:0x00100000
[ 0.017005] Stack : 8188de1c 80b20000 00000000 00000001 8188de1c 80b20000 ffff8b04 97365f94
[ 0.017005] 00000004 97365f94 00000001 81856740 80b20000 80b40000 00000001 80b40000
[ 0.017005] 800a14b8 800a1634 80b20000 80938d10 00000001 80b40000 800a14b8 800a1634
[ 0.017005] ffff8b03 8093fef0 81850760 80b20ac0 81856740 00000001 00000000 80b38a18
[ 0.017005] 80b38838 00000000 80b395c4 ffff8b03 800bbeb0 01000000 81856740 97365f94
[ 0.017005] ...
[ 0.017005] Call Trace:
[ 0.017005] [<80938580>] __schedule+0x3ac/0xb0c
[ 0.017005] [<80938d10>] schedule+0x30/0xf0
[ 0.017005] [<8093fef0>] schedule_timeout+0x7c/0x108
[ 0.017005] [<800a5628>] rcu_gp_fqs_loop+0x224/0x42c
[ 0.017005] [<800a6d94>] rcu_gp_kthread+0x12c/0x144
[ 0.017005] [<80063ffc>] kthread+0x150/0x2a8
[ 0.017005] [<8001df44>] ret_from_kernel_thread+0x14/0x1c
[ 0.017005]
[ 0.017005] CPU: 0 UID: 0 PID: 1 Comm: swapper Not tainted 6.15.0-rc4-letux-lx20+ #2450 PREEMPT
[ 0.017005] Hardware name: Letux LX20v0.2
[ 0.017005] $ 0 : 00000000 00000001 80b60000 00000101
[ 0.017005] $ 4 : 81850000 04000140 8181d100 00001dc2
[ 0.017005] $ 8 : 00c49ba6 806ed4c0 ffffffe0 00000000
[ 0.017005] $12 : 80b3afc0 1e660350 00000000 00000000
[ 0.017005] $16 : 80bc3930 80b210b0 00000000 0000000a
[ 0.017005] $20 : 00000000 00000001 80940000 ffff8b03
[ 0.017005] $24 : 00000000 80520cd0
[ 0.017005] $28 : 8184c000 8180df80 00000200 80042514
[ 0.017005] Hi : 00000ee1
[ 0.017005] Lo : 68b664e2
[ 0.017005] epc : 80041bac handle_softirqs+0xa4/0x284
[ 0.017005] ra : 80042514 irq_exit+0xac/0x138
[ 0.017005] Status: 14001403 KERNEL EXL IE
[ 0.017005] Cause : 08801400 (ExcCode 00)
[ 0.017005] PrId : 00132000 (Ingenic XBurst II)
[ 0.017005] CPU: 0 UID: 0 PID: 1 Comm: swapper Not tainted 6.15.0-rc4-letux-lx20+ #2450 PREEMPT
[ 0.017005] Hardware name: Letux LX20v0.2
[ 0.017005] Stack : 00000000 00000002 8180dc54 80bc71b4 01000000 a51eb789 00000000 80b20000
[ 0.017005] 80b57c53 80a62780 00000001 80bc346c 00000000 00000001 8180dc00 a51eb789
[ 0.017005] 00000000 00000000 80a62780 8180da50 00000001 8180da64 00000000 44495020
[ 0.017005] 0000000f 80bc71f3 80bc7236 fffffffc 80b20000 00000000 80a62780 80a57808
[ 0.017005] 80b60000 80b20000 80b38838 80ad0000 00000000 00000000 00000000 80bc0000
[ 0.017005] ...
[ 0.017005] Call Trace:
[ 0.017005] [<80023f60>] show_stack+0x88/0x120
[ 0.017005] [<8001ba20>] dump_stack_lvl+0x44/0x70
[ 0.017005] [<800116b0>] rcu_dump_cpu_stacks+0x1b0/0x244
[ 0.017005] [<800a912c>] rcu_sched_clock_irq+0x538/0x7ac
[ 0.017005] [<800b994c>] update_process_times+0x74/0xd8
[ 0.017005] [<800d0140>] tick_nohz_handler+0xd8/0x1b4
[ 0.017005] [<800ba5dc>] __hrtimer_run_queues.constprop.44+0x140/0x248
[ 0.017005] [<800bb63c>] hrtimer_interrupt+0x148/0x430
[ 0.017005] [<806ed598>] ingenic_ost_cevt_cb+0x64/0x74
[ 0.017005] [<800962cc>] handle_percpu_devid_irq+0x6c/0x124
[ 0.017005] [<800903b0>] handle_irq_desc+0x60/0x9c
[ 0.017005] [<80940964>] do_IRQ+0x18/0x24
[ 0.017005] [<8001e2b4>] handle_int+0x134/0x140
[ 0.017005] [<80042514>] irq_exit+0xac/0x138
[ 0.017005]
So I conclude that there is some detail still wrong with interrupt handling, especially
for gpio keys (maybe the x1600 code for triggering on both edges).
Of course it is difficult to do a remote and theoretical analysis...
Therefore, I should design and build a handful of v0.3 prototypes as soon as possible
and share with interested developers, like you.
What I also have tried is to understand why we have no µSD at all in Linux.
Well, there was no broken-cd property. But with oscilloscope I only could
see the MMC clock (~22 MHz) but no other activity.
The x2000.dtsi requests an ingenic,x2000-sdhci driver. This is only available in the
sudomaker-6.1.28 kernel and missing in our 6.15 - but it is not even confirmed and compiled
for the 6.1.28 kernel (CONFIG_MMC_SDHCI_INGENIC=n). This explains why neither kernel
has µSD... I'll try to fix in 6.1.28 first and then forward-port.
BR,
Nikolaus
More information about the Letux-kernel
mailing list