roadmap BUILT

592. radon's cold reboot dies in OpenSBI's PMIC write, and the kernel sets that write up

(Number provisional until the merge queue lands it.) Promoted from the proposal radons-reboot-dies-in-opensbis-pmic-write, filed 2026-09-24 by the lane that brought milestone 249 (the boot lottery is sampled by a person walking to the board)'s reboot to aarch64 and x86_64. Option A was built on 2026-09-25 on milestone/592-radon-pmic-bus and merged (#1299): before the rebooting soak's SBI SRST call, a JH7110 kernel ungates I2C5's clock and releases I2C5's reset. The bench story below is three evenings long and ends with option B built and proven: the kernel writes the AXP15060 itself, and the reset is deterministic. BUILT by calef's ruling, 2026-10-10.

One bench boot of radon decides the firmware route, and it needed three:

What happens

On radon, SBI SRST reset and shutdown are both a single I2C write to the AXP15060 PMIC at 0x36 on I2C5: register 0x32, bit 6 for a reset and bit 7 for a power-off. OpenSBI's pm_system_reset has no other route. When the read that comes before the write fails ten times, it prints cannot read pmic power register and waits for an interrupt forever. radon's 2026-09-04 log (target/board/radon-2026-09-04-srst-reset-pmic.log) shows exactly that: ten i2c read: write daddr 36 to lines, the message, and no second boot.

The cause, read rather than inferred, and a correction to the proposal

The proposal read the vendor OpenSBI's current JH7110_VisionFive2_devel branch. radon does not run that code. Its banner says U-Boot SPL 2021.10 (Feb 12 2023) and OpenSBI v1.2, and its messages (i2c read: write daddr 36 to, cannot read pmic power register with no function-name prefix) appear in neither the current branch nor upstream. They do appear, word for word, in the OpenSBI commit the VisionFive 2 SDK tag VF2_v2.10.4 pins, starfive-tech/opensbi ced60104df4f, in lib/utils/i2c/fdt_i2c_starfive.c and platform/generic/starfive/jh7110.c. That tag's U-Boot is starfive-tech/u-boot 1539c1fb5a49. All four files were fetched 2026-09-25. This is the code on radon's flash, by string match; the binary itself is not published.

Three facts in those files, and the one this lane found that the proposal did not:

  1. U-Boot asserts I2C5's reset before it hands over. At Starting kernel, U-Boot removes every device flagged DM_FLAG_OS_PREPARE, the DesignWare I2C driver among them. designware_i2c_remove (drivers/i2c/designware_i2c.c line 811) disables the clocks and then calls reset_release_bulk, and reset_release_all (drivers/reset/reset-uclass.c line 236) asserts each reset before freeing it. That removal is what prints the two clk ... already disabled lines.
  2. radon's OpenSBI never releases a reset. Its I2C driver re-enables a clock before each transfer and does nothing else. A DesignWare controller held in reset reads IC_STATUS as zero, so the transmit-FIFO-empty poll can never succeed. That is the write daddr message, ten times.
  3. The clock it re-enables is the wrong one. It computes the gate as 0x13020228 + index * 4, with index = name[3] - '0' from the bus node's name. radon's U-Boot tree names the node i2c@12050000, not i2c5@..., so index is '@' - '0' = 16 and the word is 0x13020268: clock 154, JH7110_SYSCLK_UART4_CORE. I2C5's own gate is never touched. Upstream OpenSBI commit 4d8569df7bd7 (2024-02-22) fixes this lookup, which is the proposal's option C.
  4. There is no "core clock" to enable (the correction). The proposal took U-Boot's u5_dw_i2c_clk_core to be a second gate. at VF2_v2.10.4 radon's U-Boot registers it with starfive_clk_gate(..., "u5_dw_i2c_clk_core", "osc", SYS_OFFSET(JH7110_I2C5_CLK_CORE)) (drivers/clk/starfive/clk-jh7110.c lines 698 to 701), and the vendor branch head (c4c67bb66ae6) registers none; no register backs it. Its id, 298, is above the vendor's JH7110_CLK_SYS_REG_END (190), and mainline's DesignWare node names only JH7110_SYSCLK_I2C5_APB. I2C5 has one gate and one reset line, and the reset line is the one nothing on radon ever releases.

What was built

where what
the device_tree_blob package parent_prop_compatible: a property of the parent of the first node matching a compatible, because the PMIC is the node with a binding and the bus's clocks/resets are one level up. Name provisional.
crates/jh7110_clock_and_reset The SYS domain (SYS, SYS_BASE, discover_sys), I2C5's ids, the constant fallback PMIC_BUS_BRING_UP, and pmic_bus, which reads the plan out of the tree. Names provisional.
kernel/src/memory.rs, kernel/src/arch/riscv64/mmu.rs The SYS window and the plan are recorded and mapped only under milestone 220 (this kernel drives no clock or reset controller, and the first real device will need one)'s JH7110 guard, so every other machine gets neither.
kernel/src/soak.rs prepare_the_reset_route, called just before arch::reboot, walks the plan through the existing drivers::jh7110_clock_and_reset::bring_up and prints every word it read.

The registers, and the source for each:

what register (SYS CRG at 0x1302_0000) sources that agree
I2C5 APB clock, id 143 word 0x23c, bit 31 set mainline JH7110_SYSCLK_I2C5_APB 143 and JH71X0_CLK_ENABLE BIT(31) at base + 4 * idx; vendor JH7110_I2C5_CLK_APB 143; radon's own OpenSBI's 0x13020228 + 5 * 4
I2C5 APB reset, id 81 assert word 0x300, bit 17 cleared; status word 0x310, bit 17 polled until set mainline JH7110_SYSRST_I2C5_APB 81, jh7110_sys_info .assert_offset = 0x2F8, .status_offset = 0x308, jh71x0_reset_update's id / 32, BIT(id % 32) and inverted status; vendor RSTN_U5_DW_I2C_APB 81

Clock first, then reset, for milestone 220's reason: Linux's reset driver warns that a deassert against a gated clock "might otherwise hang forever".

Driven by the tree. pmic_bus finds the AXP15060 by compatible (x-powers,axp15060, then radon's stf,axp15060-regulator) and reads its parent bus's clocks and resets. It keeps a specifier only when its provider is a SYS-domain controller this crate knows, that provider has one cell per specifier, and the id is inside the SYS domain's bounds. On radon's tree that yields clock 143 and reset 81 and skips 298. A tree with no PMIC, or none usable, gets the constant plan with from_tree: false, and the console line says which. Host tests hold all three against fixtures transcribed from radon's U-Boot, mainline, and a hostile tree.

No effect anywhere else. QEMU's virt board names no JH7110, so nothing is recorded, mapped, or printed, and the soak's reboot is unchanged. script/soak-test --reboot --arch riscv64 passed on 2026-09-25 on this branch (see Evidence).

The bench: one reset, watched

What calef does: build and boot the rebooting soak exactly as notes/soak.md already says (script/board-image --soak --reboot, netboot, script/board-console), let it reach t=120s, and watch one reset through. Nothing else is new. If the board ends up hung or dark, one plug-2 cycle recovers it (plug 3 is garcia and must never be switched off).

Just before rebooting now, the new lines look like this on radon:

soak-test-reboot: JH7110: bringing the PMIC's I2C bus back up first, ... SYS CRG at 0x13020000
                  (named by this machine's device tree); plan from the tree's own clocks and
                  resets of the PMIC's bus (1 specifier(s) skipped).
soak-test-reboot: JH7110: clock 143 0x........ -> 0x8....... (running)
soak-test-reboot: JH7110: reset 81 assert 0x........ -> 0x........, status 0x........ (released, N polls)

What each outcome means, decided before it runs:

what the console shows after rebooting now what it means what to do
a second U-Boot SPL banner, a netboot, and soak-test: started Built and proven. The reset line was the cause. Mark this milestone BUILT with the transcript, and milestone 249's series is available on radon. Press a key once to see DISARMED (notes/soak.md's escape check), then leave it running.
the board goes dark and stays dark The PMIC write worked, and radon's OpenSBI sets the power-off bit (bit 7) unconditionally before the reset bit, so the PMIC powered the board off rather than resetting it. The bus is fixed; the firmware's choice of bits is not. One plug-2 cycle. Then the route is a nife AXP15060 write that sets bit 6 alone (option B) or firmware (option C).
U-Boot SPL, then it stops before netboot The reset happened; something on the way back failed. Different bug, new record. One plug-2 cycle; keep the transcript.
i2c read: write daddr 36 to ten times and cannot read pmic power register, with the three JH7110 lines above reading running and released The bus was up when the kernel let go and the read still failed. Either OpenSBI's own poll timing against a controller at reset defaults, or pinmux. Option B is the next step. One plug-2 cycle.
the same failure, with a JH7110 line reading NOT running or STILL HELD The kernel's writes did not take: wrong window or wrong bit. A bug here, not in the firmware. One plug-2 cycle; the before/after words in the transcript say which.
the same failure, and the bus was already up on the reset line U-Boot's handover is not the cause; this milestone's premise is wrong for radon. One plug-2 cycle; option B.
no JH7110: lines at all memory::init did not recognize radon as a JH7110, so nothing was attempted. One plug-2 cycle; the boot tour's hw clock line says why.

Options, as the proposal priced them

what status
A before the ecall, bring I2C5 back up from the kernel built and merged (#1299); necessary and, alone, intermittent: row 1 on 2026-10-09, row 4 on 2026-10-10
B nife writes the AXP15060 itself: a minimal DesignWare I2C master, and bit 6 alone built here and proven four times in a row, 2026-10-10; the machine's first route, SBI SRST the fallback
C update radon's SPL and OpenSBI to a build with the upstream fixes calef's call: writes the SPI flash of the only board of its kind; unneeded while B holds

BUGS

Evidence

Follow-on

Index row

radon's cold reboot is the kernel's own now: a polled DesignWare I2C master with its timing computed from the machine's clock words writes the AXP15060's reset bit directly. It was proven deterministic over four consecutive self-reboots (2026-10-10). SBI SRST, which hung on the same bus a day earlier, is the fallback route