From: Igor Sakulin <is@nsa.green>
To: Jia Wang <wangjia@ultrarisc.com>
Cc: Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Paul Walmsley <pjw@kernel.org>,
Palmer Dabbelt <palmer@dabbelt.com>,
Albert Ou <aou@eecs.berkeley.edu>,
Alexandre Ghiti <alex@ghiti.fr>,
Linus Walleij <linusw@kernel.org>,
Bartosz Golaszewski <brgl@kernel.org>,
Samuel Holland <samuel.holland@sifive.com>,
devicetree@vger.kernel.org, linux-riscv@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org,
Igor Sakulin <is@nsa.green>
Subject: Re: [PATCH 0/9] riscv: ultrarisc: add DP1000 SoC DT and pinctrl support
Date: Mon, 3 Aug 2026 13:05:26 +0300 [thread overview]
Message-ID: <20260803100534.25017-1-is@nsa.green> (raw)
In-Reply-To: <20260515-ultrarisc-pinctrl-v1-0-bf559589ea8a@ultrarisc.com>
Hi Jia,
I have a Milk-V Titan V1.2 (UltraRISC DP1000) and rebased this series onto
v7.2-rc5 to get the board running on a mainline kernel. It works, and the
board now boots mainline with the upstream devicetree - but not with the
series exactly as posted. Three things needed fixing, and two of them come
from the series having been split during merge. Details below, and I am
happy to give a Tested-by on a v2.
Context for anyone reading this later: patches 4/9 (pinctrl binding), 6/9
(pinctrl driver) and 9/9 (defconfig) were taken and are in v7.2-rc5, while
every DTS patch was left behind. So mainline can currently drive this SoC
but cannot describe any board that uses it.
1. The DTS speaks a pinctrl dialect the merged driver rejects
=============================================================
The driver was revised in review; the DTS was not updated to match, and it
is the DTS that was dropped. Two independent skews:
a) "pins" is a string list in the DTS:
i2c0_pins: i2c0-pins {
pins = "PA12", "PA13";
function = "func0";
};
but the merged binding declares it as an integer array
(items: minimum/maximum) and the merged driver registers pins by
number - UR_DP1000_PIN(12, "PA12", ...).
b) "function" uses the legacy generic names "func0"/"func1", while the
merged driver only knows the semantic ones: gpio, i2c, uart, spi,
pwm, lpc, espi. This is the point Krzysztof and Linus both raised on
4/9 and 6/9; the driver was cleaned up in response, the DTS was not.
Booting v7.2-rc5 with the unmodified DTB gives, in order:
OF: size of pins in node /soc/pinmux@11081000/i2c0-pins is not a multiple of 4
dw-apb-uart 20300000.serial: error -EINVAL: Error applying setting, reverse things back
(the same for all four UARTs and all four I2Cs)
Warning: unable to open an initial console.
...
Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000100
The panic points nowhere near the cause. The chain is: string "pins" are
parsed as a u32 array, so every pinmux group fails, so all four UARTs fail
to apply their pinctrl, so there is no console device, so init cannot open
one and exits. Storage and networking are fine throughout - the machine
dies over a devicetree property format.
Worth noting for anyone bisecting this: fixing "pins" alone is not enough.
The "not a multiple of 4" messages go away and "Error applying setting"
remains, because func0 is still not a function the driver knows. Both
changes are required, which is why this needed hardware rather than review
to find - each fix on its own still produces an unbootable board.
The fix is mechanical. Pin numbering taken from the merged driver rather
than typed by hand: PA0..PA15 = 0-15, PB0..PB7 = 16-23, PC0..PC7 = 24-31,
PD0..PD7 = 32-39, LPC0..LPC12 = 40-52. Functions by group: i2c*-pins ->
"i2c", uart*-pins -> "uart", spi*-pins -> "spi", the rest are already
"gpio". So the example above becomes:
i2c0_pins: i2c0-pins {
pins = <12 13>;
function = "i2c";
bias-pull-up;
drive-strength = <33>;
};
Both dp1000-milkv-titan-pinctrl.dtsi and dp1000-rongda-m0-pinctrl.dtsi
need this. I can only test the Titan.
2. riscv,cbop-block-size is missing
===================================
This one is independent of the merge split - it is in the series as posted
and also in the vendor's own devicetree, so it looks like an omission
rather than something the rebase introduced.
The CPU nodes advertise "zicbop" in riscv,isa-extensions but never state
the prefetch block size, so the kernel refuses the extension, once per
hart:
Zicbop detected in ISA string, disabling as no cbop-block-size found
Every other cache block size on this SoC reads 64 - riscv,cbom-block-size,
riscv,cboz-block-size, i-cache-block-size, d-cache-block-size and the
L2/L3/LLC cache-block-size properties - so 64 is not a guess. Adding
riscv,cbop-block-size = <64>;
to all eight CPU nodes in dp1000.dtsi silences it and Zicbop then appears
in /proc/cpuinfo:
rv64imafdch_zicbom_zicbop_zicboz_ziccrse_zicntr_...
^^^^^^ absent before
Verified on hardware: message count 8 -> 0.
3. cpu@4..cpu@7 unit-addresses do not match reg
===============================================
In dp1000.dtsi the second cluster is:
cpu4: cpu@4 { reg = <0x10>; ... }
cpu5: cpu@5 { reg = <0x11>; ... }
cpu6: cpu@6 { reg = <0x12>; ... }
cpu7: cpu@7 { reg = <0x13>; ... }
The reg values are right - OpenSBI on this board reports
"Domain0 HARTs 0*,1*,2*,3*,16*,17*,18*,19*", so hart IDs really are 0-3
and 16-19 - but the unit-addresses should follow reg, i.e. cpu@10..cpu@13.
Harmless at runtime, but it is a dtc/dtbs_check complaint waiting to
happen.
What I would suggest
====================
This is your series and you are active upstream, so I would rather hand you
the fixes than post a competing v2. Happy to do either:
- send you the three diffs off-list or as a reply here, or
- post a v2 with you as author and the fixes folded in, if you prefer.
Either way, on a v2 that carries fixes 1 and 2 you can add:
Tested-by: Igor Sakulin <is@nsa.green>
Tested on Milk-V Titan V1.2 (UltraRISC DP1000, 8 harts, 62 GiB), Linux
v7.2-rc5 with the upstream DTB: boots to userspace, NVMe root, eth0 up,
all four i2c controllers present (all four failed before), RTC bound
(rtc-ds1307 on i2c2 as the DTS declares), and a Mellanox card on RC0
training at Gen3 x16 with 17 MSI-X vectors. Zero "Error applying setting",
zero "unable to open an initial console", no panic.
The other review comments on the v1 thread (shenrongda vendor prefix on
1/9, fixed-clock node naming on 5/9, the disabled gpio-poweroff/gpio-restart
nodes on 7/9) I have not touched - they are yours to resolve and none of
them affect booting.
Thanks,
Igor
prev parent reply other threads:[~2026-08-03 10:11 UTC|newest]
Thread overview: 59+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-15 1:17 [PATCH 0/9] riscv: ultrarisc: add DP1000 SoC DT and pinctrl support Jia Wang via B4 Relay
2026-05-15 1:17 ` [PATCH 1/9] dt-bindings: vendor-prefixes: add Rongda Jia Wang via B4 Relay
2026-05-15 1:20 ` sashiko-bot
2026-05-15 1:25 ` Jia Wang
2026-05-21 20:51 ` Krzysztof Kozlowski
2026-05-26 7:12 ` Jia Wang
2026-05-15 1:17 ` [PATCH 2/9] dt-bindings: riscv: cpus: Add UltraRISC CP100 compatible Jia Wang via B4 Relay
2026-05-15 10:06 ` Conor Dooley
2026-05-15 1:17 ` [PATCH 3/9] dt-bindings: riscv: Add UltraRISC DP1000 bindings Jia Wang via B4 Relay
2026-05-15 10:08 ` Conor Dooley
2026-05-18 3:06 ` Jia Wang
2026-05-15 1:18 ` [PATCH 4/9] dt-bindings: pinctrl: Add UltraRISC DP1000 pinctrl bindings Jia Wang via B4 Relay
2026-05-15 1:49 ` sashiko-bot
2026-05-15 8:43 ` Jia Wang
2026-05-15 10:12 ` Conor Dooley
2026-05-18 6:03 ` Jia Wang
2026-05-21 20:56 ` Krzysztof Kozlowski
2026-05-27 1:34 ` Jia Wang
2026-05-25 9:23 ` Linus Walleij
2026-05-27 1:37 ` Jia Wang
2026-05-15 1:18 ` [PATCH 5/9] riscv: dts: ultrarisc: Add initial device tree for UltraRISC DP1000 Jia Wang via B4 Relay
2026-05-15 2:02 ` sashiko-bot
2026-05-19 6:55 ` Jia Wang
2026-05-15 10:26 ` Conor Dooley
2026-05-20 2:51 ` Jia Wang
2026-05-21 21:05 ` Krzysztof Kozlowski
2026-05-27 7:04 ` Jia Wang
2026-05-15 1:18 ` [PATCH 6/9] pinctrl: ultrarisc: Add UltraRISC DP1000 pinctrl driver Jia Wang via B4 Relay
2026-05-15 2:28 ` sashiko-bot
2026-05-20 7:15 ` Jia Wang
2026-05-21 21:09 ` Krzysztof Kozlowski
2026-05-27 7:07 ` Jia Wang
2026-05-25 9:28 ` Linus Walleij
2026-05-25 10:10 ` Conor Dooley
2026-05-28 7:46 ` Jia Wang
2026-05-28 8:55 ` Conor Dooley
2026-05-29 5:43 ` Jia Wang
2026-05-27 7:28 ` Jia Wang
2026-05-15 1:18 ` [PATCH 7/9] riscv: dts: ultrarisc: add Rongda M0 board device tree Jia Wang via B4 Relay
2026-05-15 2:37 ` sashiko-bot
2026-05-20 8:26 ` Jia Wang
2026-05-15 10:28 ` Conor Dooley
2026-05-20 8:40 ` Jia Wang
2026-05-21 20:59 ` Krzysztof Kozlowski
2026-05-28 8:02 ` Jia Wang
2026-05-15 1:18 ` [PATCH 8/9] riscv: dts: ultrarisc: add Milk-V Titan " Jia Wang via B4 Relay
2026-05-15 2:50 ` sashiko-bot
2026-05-20 9:39 ` Jia Wang
2026-05-15 1:18 ` [PATCH 9/9] riscv: defconfig: enable ARCH_ULTRARISC Jia Wang via B4 Relay
2026-05-15 2:59 ` sashiko-bot
2026-05-20 9:49 ` Jia Wang
2026-05-21 20:57 ` Krzysztof Kozlowski
2026-05-28 8:05 ` Jia Wang
2026-07-08 17:38 ` Paul Walmsley
2026-05-15 10:05 ` [PATCH 0/9] riscv: ultrarisc: add DP1000 SoC DT and pinctrl support Conor Dooley
2026-05-21 9:52 ` Jia Wang
2026-05-21 10:23 ` Conor Dooley
2026-05-22 1:41 ` Jia Wang
2026-08-03 10:05 ` Igor Sakulin [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260803100534.25017-1-is@nsa.green \
--to=is@nsa.green \
--cc=alex@ghiti.fr \
--cc=aou@eecs.berkeley.edu \
--cc=brgl@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linusw@kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=palmer@dabbelt.com \
--cc=pjw@kernel.org \
--cc=robh@kernel.org \
--cc=samuel.holland@sifive.com \
--cc=wangjia@ultrarisc.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox