From: sashiko-bot@kernel.org
To: dongxuyang@eswincomputing.com
Cc: robh@kernel.org, devicetree@vger.kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v13 4/5] dt-bindings: timer: dwc: Update resets property items
Date: Fri, 24 Jul 2026 08:55:53 +0000 [thread overview]
Message-ID: <20260724085553.BD3971F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260724084419.1795-1-dongxuyang@eswincomputing.com>
Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:
New issues:
- [High] The timer driver is not updated to deassert the newly allowed second reset line, which can lead to system hangs.
- [Medium] Missing `reset-names` property prevents accurate hardware representation for partial reset implementations.
Pre-existing issues:
- [High] This problem wasn't introduced by this patch, but the driver asserts and deasserts the hardware reset before the corresponding clocks are enabled.
--
--- Patch [4]: [PATCH v13 4/5] dt-bindings: timer: dwc: Update resets property items ---
commit 10dcd30e56947333e8bfdc5270bc95e60b327052
Author: Xuyang Dong <dongxuyang@eswincomputing.com>
dt-bindings: timer: dwc: Update resets property items
The DesignWare DW_apb_timers IP has two active-low reset inputs:
presetn resets the register interface logic in the pclk (bus) domain,
and timer_N_resetn resets the counter/timer logic in the timer_N_clk
domain. The existing snps,dw-apb-timer binding only describes one.
Update snps,dw-apb-timer binding to allow up to two reset lines,
matching the hardware capabilities of the DesignWare IP family.
> diff --git a/Documentation/devicetree/bindings/timer/snps,dw-apb-timer.yaml b/Documentation/devicetree/bindings/timer/snps,dw-apb-timer.yaml
> index d33c9205a9093..4d30cd01ac65f 100644
> --- a/Documentation/devicetree/bindings/timer/snps,dw-apb-timer.yaml
> +++ b/Documentation/devicetree/bindings/timer/snps,dw-apb-timer.yaml
> @@ -25,7 +25,10 @@ properties:
> maxItems: 1
>
> resets:
> - maxItems: 1
> + minItems: 1
> + items:
> + - description: Timer ticks reference (timer_N_resetn) reset
> + - description: APB interface (presetn) reset
[Severity: Medium]
Since the resets array was expanded to allow multiple items, should a
reset-names property be added to allow disambiguation?
Because the schema enforces additionalProperties: false, device trees cannot
currently add names. If a platform only has software control over the APB
reset (presetn) and not the timer reset, it cannot correctly represent the
hardware because array bindings without names require index 0 to be populated
first.
[Severity: High]
Does the driver need to be updated to handle this new reset line?
If a device tree is updated to specify both resets, the timer driver only
fetches and deasserts the first one (index 0):
drivers/clocksource/dw_apb_timer_of.c:timer_get_base_and_rate() {
...
rstc = of_reset_control_get(np, NULL);
if (!IS_ERR(rstc)) {
reset_control_assert(rstc);
reset_control_deassert(rstc);
}
...
}
If a platform requires the second reset (presetn) to be deasserted by the
kernel to access the APB interface, the timer registers will remain
inaccessible. Can this lead to a bus hang or external abort?
[Severity: High]
This is a pre-existing issue, but the driver asserts and deasserts the
hardware reset before the corresponding clocks are enabled:
drivers/clocksource/dw_apb_timer_of.c:timer_get_base_and_rate() {
...
rstc = of_reset_control_get(np, NULL);
if (!IS_ERR(rstc)) {
reset_control_assert(rstc);
reset_control_deassert(rstc);
}
/* ... */
pclk = of_clk_get_by_name(np, "pclk");
...
}
The DW APB timer reset signals operate in their respective clock domains.
Toggling a synchronous reset while the associated clock is disabled means
the target flip-flops never receive the clock edges necessary to process
the reset.
Could this leave the timer in an undefined state if the bootloader left
it corrupted with clocks disabled?
>
> clocks:
> minItems: 1
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260724084153.1473-1-dongxuyang@eswincomputing.com?part=4
next prev parent reply other threads:[~2026-07-24 8:55 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-24 8:41 [PATCH v13 0/5] Update designware pwm driver dongxuyang
2026-07-24 8:43 ` [PATCH v13 1/5] dt-bindings: pwm: dwc: Document optional resets property dongxuyang
2026-07-24 8:53 ` sashiko-bot
2026-07-24 8:43 ` [PATCH v13 2/5] dt-bindings: pwm: dwc: Add eswin compatible dongxuyang
2026-07-24 8:56 ` sashiko-bot
2026-07-24 8:43 ` [PATCH v13 3/5] pwm: dwc: add of/platform support dongxuyang
2026-07-24 8:57 ` sashiko-bot
2026-07-24 8:44 ` [PATCH v13 4/5] dt-bindings: timer: dwc: Update resets property items dongxuyang
2026-07-24 8:55 ` sashiko-bot [this message]
2026-07-24 13:55 ` Rob Herring
2026-07-24 8:44 ` [PATCH v13 5/5] clocksource: dw_apb_timer: Use reset array API to handle all resets dongxuyang
2026-07-24 8:55 ` sashiko-bot
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=20260724085553.BD3971F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dongxuyang@eswincomputing.com \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.