From: Alex Elder <elder@riscstar.com>
To: sashiko-reviews@lists.linux.dev
Cc: devicetree@vger.kernel.org, linux-clk@vger.kernel.org,
robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v3 3/3] arm64: dts: qcom: qcs6490-rb3gen2: add TC9564 clock node
Date: Wed, 25 Nov 2026 15:51:47 -0600 [thread overview]
Message-ID: <d5abcbbb-e533-4a44-a26a-1ca17e37d7f6@riscstar.com> (raw)
In-Reply-To: <sashiko-outbox-234134@kernel.org>
On 11/25/26 2:28 PM, sashiko-bot@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 1 potential
> issue to consider:
> - [High] arm64: dts: qcom: clock-25000000 under pcie@0,0 shifts tc9563
> port indexing
> --
This was a great catch on a seemingly unrelated problem.
I will consider how to address it. Off hand I can think
of two options, but I'm sure there are others:
- Move the tc9564_xo_board *after* the downstream ports
(after the end of the pcie@3,0 node). In this case I
would add a clear comment in the DTS file explaining
why this is necessary.
- Make the logic in "pci-pwrctrl-tc9563.c" more robust,
possibly by skipping nodes that aren't of type "pci"
(or possibly "pciex"?).
I think the second option is better, but I'm open to
other suggestions.
However, at the very end of this message there is another
observation that might make the above moot. I think this
clock node should probably be defined closer to the root
of the tree. I'll verify that and will fix it.
> commit c4e2dd0c5c7aea169ea475dfdf59cb2e475d33be
> Author: Alex Elder <elder@kernel.org>
>
> arm64: dts: qcom: qcs6490-rb3gen2: add TC9564 clock node
>
> This commit adds a devicetree node for the Toshiba TC9564 clock and reset
> controller along with a 25 MHz fixed-clock node supplying it.
>
>> diff --git a/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts b/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts
>> index 682bcbc0b466b..b327f64885ef2 100644
>> --- a/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts
>> +++ b/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts
>> @@ -890,6 +890,13 @@ pcie@0,0 {
>> pinctrl-0 = <&tc9563_resx_n>;
>> pinctrl-names = "default";
>>
>> + tc9564_xo_board: clock-25000000 {
>> + compatible = "fixed-clock";
>> + #clock-cells = <0>;
>> + clock-frequency = <25000000>;
>> + clock-output-names = "tc9564_xo_board";
>> + };
>> +
>> pcie1_switch0_dsp1: pcie@1,0 {
>> reg = <0x20800 0x0 0x0 0x0 0x0>;
>> #address-cells = <3>;
>
> [Severity: High]
> Does placing clock-25000000 as the first child of pcie@0,0 shift the
> downstream port indexing in the tc9563 power control driver?
I think it currently does.
> Both tc9563_pwrctrl_probe() and tc9563_pwrctrl_parse_reset_line() map the
> direct children of the pci1179,0623 node positionally to TC9563_DSP1,
> TC9563_DSP2, and TC9563_VDSP:
>
> drivers/pci/pwrctrl/pci-pwrctrl-tc9563.c:tc9563_pwrctrl_probe() {
> ...
> port = TC9563_USP;
> for_each_child_of_node_scoped(node, child) {
> if (++port >= TC9563_MAX)
> break;
If the second option above is chosen, this function
should be updated the same way.
> ret = tc9563_pwrctrl_parse_device_dt(child, &tc9563->cfg[port]);
> ...
> }
>
> With clock-25000000 ahead of pcie@1,0, pcie@2,0, and pcie@3,0, the driver
> treats clock-25000000 as TC9563_DSP1, shifts pcie@1,0 and pcie@2,0 into
> TC9563_DSP2 and TC9563_VDSP (misassociating per-port settings, reset
> GPIOs, and the integrated Ethernet endpoint), and stops before reaching
> pcie@3,0. It also violates Documentation/devicetree/bindings/pci/toshiba,tc9563.yaml,
> which only permits pcie@[1-2],0 and pcie@[3],0 child nodes. Should
> tc9564_xo_board live under the root /clocks node instead?
The 25 MHz oscillator comes from *outside* the TC9564 chip,
not under the upstream PCIe switch port.
For this reason, it should be defined somewhere on the board,
not within the TC9564 chip.
I will investigate the right way to represent this and will
correct it.
-Alex
next prev parent reply other threads:[~2026-11-25 21:51 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-25 20:21 [PATCH v3 0/3] clk: tc9564: introduce a clock and reset driver Alex Elder
2026-11-25 20:21 ` [PATCH v3 1/3] dt-bindings: toshiba: introduce toshiba,tc9564-clock.yaml Alex Elder
2026-11-25 20:21 ` [PATCH v3 2/3] clk: toshiba: introduce a TC9564 clock/reset driver Alex Elder
2026-11-26 9:42 ` Philipp Zabel
2026-11-26 12:59 ` Alex Elder
2026-11-26 9:55 ` Lorenzo Bianconi
2026-11-25 20:21 ` [PATCH v3 3/3] arm64: dts: qcom: qcs6490-rb3gen2: add TC9564 clock node Alex Elder
2026-11-25 20:28 ` sashiko-bot
2026-11-25 21:51 ` Alex Elder [this message]
2026-11-26 10:01 ` Lorenzo Bianconi
2026-11-25 20:33 ` [PATCH v3 0/3] clk: tc9564: introduce a clock and reset driver Alex Elder
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=d5abcbbb-e533-4a44-a26a-1ca17e37d7f6@riscstar.com \
--to=elder@riscstar.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=linux-clk@vger.kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox