clk: eswin: eic7700: EIC7702X hangs when disabling unused D2D/PVT gates

Pinkesh Vaghela pinkesh.vaghela at einfochips.com
Tue Nov 24 04:41:41 PST 2026


Hi Xuyang Dong,

> >
> > On a DeepComputing FML13V03 board (ESWIN EIC7702X, i.e. two EIC7700X
> > dies, 32 GiB), mainline hangs during or shortly after
> > clk_disable_unused() unless clk_ignore_unused is given. Marking
> > gate_d2d_aclk (and, as a precaution, gate_lsp_pvt_pclk) as
> > CLK_IS_CRITICAL in drivers/clk/eswin/clk-eic7700.c fixes it here; I'd
> > like to know whether that is the right fix or whether something else
> > should claim these clocks.
> >
> > Setup:
> > - v7.4-rc3 (4843f6873f7c) + "riscv: eswin: eic7700: Add support for
> >   clocks, resets, pinctrl, HSP bus, I2C and watchdog" v5
> >
> (https://lore.k/
> ernel.org%2Fr%2F20261015125454.1381941-1-
> pinkesh.vaghela%40einfochips.com&data=05%7C02%7Cpinkesh.vaghela%40e
> infochips.com%7C9f6219599d3d4f295c1208df4930f49f%7C0beb0c359cbb4fe
> b99e5589e415c7944%7C1%7C0%7C639310146764444639%7CUnknown%7CT
> WFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXa
> W4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=puM
> LCt0JpVLM4WJSQfDc4WJoL8FA6Rt%2BB%2BmfMJccjfk%3D&reserved=0)
> >   + a minimal local board dts: die 0 only (4 of the 8 harts, uart0,
> >   the firmware reserved-memory regions).
> > - defconfig + PINCTRL_EIC7700, DW_WATCHDOG, RISCV_SBI_V01.
> > - OpenSBI v1.3, U-Boot 2024.01, D2D firmware 1.51, GRUB (EFI). Under
> >   EFI the kernel takes RAM from the EFI memory map, so it also uses the
> >   second die's 16 GiB although the dts only describes die 0.
> > - Plain command line: earlycon=sbi console=ttyS0,115200n8 rdinit=/init
> >   (initramfs only). To find the clocks I used a local debug-only option
> >   that keeps named clocks on in clk_disable_unused_subtree() (not meant
> >   for merging); some of those boots also had keep_bootcon and
> >   trace_event=clk:clk_disable tp_printk, called "traced" below.
> >
> > What I see on the serial console:
> >
> > - gate_d2d_aclk: every boot that disabled it failed to reach init: 1
> >   traced boot that left only this gate out of a larger kept set, 3
> >   plain boots that kept only gate_lsp_pvt_pclk on (2 with all 32 GiB,
> >   1 with mem=16G), and the stock boots with nothing kept (32 GiB and
> >   mem=16G). With 32 GiB the traced boot stops right at
> >   this gate. With mem=16G (Linux on die 0 RAM only) the boot stalls
> >   before init; ~21 s later RCU reports a stall, and CPU 2 then does not
> >   respond to the NMI ("After 10 seconds, these CPUS still haven't
> >   responded to the NMI: 2"). Keeping only this gate on, with every
> >   other unused gate disabled, boots to an initramfs shell with 32 GiB
> >   (2 boots) and with mem=16G (1 boot).
> >
> > - gate_lsp_pvt_pclk: intermittent. I have 10 boots that disabled it
> >   while gate_d2d_aclk stayed on. In 4 of the 7 traced ones (which make
> >   the disable pass much slower; 5 of the 7 were earlier mem=16G boots
> >   with other clocks kept on as well), the D2D firmware printed, within
> >   tens of milliseconds, the following (from one of them; colour codes
> >   removed, and the first line's "D2D NOTI" prefix was interleaved with
> >   kernel output):
> >
> >     D2D NOTICE: ΔT 60.691°C (prev 46.329, curr 107.020)
> >     D2D FAIL: T:107.020 sts:00000007 rx:00e60001 rx2:00e60001 [RX ERR
> > ALL|RX LOCAL LINKUP|RX REMOTE LINKUP]
> >
> >   and Linux hung. In the other 3 traced boots and in all 3 plain boots,
> >   disabling it caused no visible problem. I don't know why it is
> >   intermittent. A jump from 46 to 107 °C between two firmware samples
> >   looks like an invalid sensor read once this clock is off, but I
> >   can't see the firmware side.
> >
> > - With both gates marked CLK_IS_CRITICAL (diff below; no other change,
> >   no debug option, no clk_ignore_unused) and the plain command line,
> >   the board boots with all 32 GiB, and 92 previously enabled unused
> >   gates are disabled (113 unclaimed gates were on in a clk_ignore_unused
> >   boot; the 21 left on are the 19 flagged CLK_IGNORE_UNUSED plus these
> >   two). Writing and reading back 27 x 1 GiB in tmpfs (so the second
> >   die's RAM is in use) gives identical checksums, and reboot -f returns
> >   to the firmware.
> >
> > - gate_pvt0_clk and gate_pvt1_clk were disabled in all of the boots
> >   above that kept only one or both of the two gates, without preventing
> >   boot. I have not checked whether the PVT sensors still give live
> >   readings with them off.
> >
> > Not tested: single-die EIC7700X, suspend/poweroff, the second die's
> > harts, anything beyond an initramfs shell.
> >
> > Questions:
> > 1. Is CLK_IS_CRITICAL right for gate_d2d_aclk (at least on EIC7702X,
> >    where the D2D link is in use), and for gate_lsp_pvt_pclk? Or should
> >    DT consumers (a D2D node, the PVT node) claim them instead?
> > 2. Does the D2D firmware read the PVT sensor through gate_lsp_pvt_pclk,
> >    and are gate_pvt0_clk/gate_pvt1_clk needed for live readings?
> >
>
> Hi Mervyn and Pinkesh,
>
> Thanks for testing and for raising these questions about the EIC7702X.
>
> On question 1: for the EIC7702X (dual-die), gate_d2d_aclk should be marked
> CLK_IGNORE_UNUSED/CLK_IS_CRITICAL. That clock needs to stay enabled in
> the dual-die case.
>
> On question 2: you can add a PVT node and let the PVT driver manage
> gate_lsp_pvt_pclk as well as gate_pvt0_clk/gate_pvt1_clk. The PVT driver is
> already in 7.4-rc3 (with compatible = "eswin,eic7700-pvt"), but the dts in the
> [1] series does not include a PVT node.
>
> Pinkesh, could you check whether a PVT node should be added in the [1]
> series?

We are planning to add PVT node in separate patch series once [1] series gets
merged.
[1] https://lore.kernel.org/all/20261015125454.1381941-1-pinkesh.vaghela@einfochips.com/

Regards,
Pinkesh

>
> We haven't submitted dual-die support upstream yet. For dual-die support,
> you can refer to the patches below:
> https://github/
> .com%2FDC-DeepComputing%2FDC-linux%2Ftree%2Feic770x-v7.2-
> rc4&data=05%7C02%7Cpinkesh.vaghela%40einfochips.com%7C9f6219599d3d
> 4f295c1208df4930f49f%7C0beb0c359cbb4feb99e5589e415c7944%7C1%7C0%
> 7C639310146764474657%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGki
> OnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoy
> fQ%3D%3D%7C0%7C%7C%7C&sdata=AM0pvGSH%2FOJnUcF30RnTQ6kWBYX
> qdX1KkQtXtZyQajw%3D&reserved=0
>
> Thanks again for your work on this.
>
> [1]
> https://lore.k/
> ernel.org%2Fall%2F20261015125454.1381941-1-
> pinkesh.vaghela%40einfochips.com%2F&data=05%7C02%7Cpinkesh.vaghela%
> 40einfochips.com%7C9f6219599d3d4f295c1208df4930f49f%7C0beb0c359cbb
> 4feb99e5589e415c7944%7C1%7C0%7C639310146764496253%7CUnknown%7
> CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJ
> XaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=7a
> ubF9Jz%2BHXHAO2ZByp5YkUhYivHNsUZniA956OR8lQ%3D&reserved=0
>
> Best regards,
> Xuyang Dong



More information about the linux-riscv mailing list