Re: [PATCH v5 2/3] arm64: dts: ti: k3-am62l: add initial infrastructure

Sascha Hauer
2025-05-16T10:23:45Z

Hi All,

On Wed, May 07, 2025 at 10:09:20PM -0500, Bryan Brattlof wrote:
> + rti0: watchdog@e000000 {
> + compatible = "ti,j7-rti-wdt";
> + reg = <0x00 0x0e000000 0x00 0x100>;
> + clocks = <&scmi_clk 273>;
> + power-domains = <&scmi_pds 60>;
> + assigned-clocks = <&scmi_clk 273>;
> + assigned-clock-parents = <&scmi_clk 1>;
> + };
> +
> + rti1: watchdog@e010000 {
> + compatible = "ti,j7-rti-wdt";
> + reg = <0x00 0x0e010000 0x00 0x100>;
> + clocks = <&scmi_clk 279>;
> + power-domains = <&scmi_pds 61>;
> + assigned-clocks = <&scmi_clk 279>;
> + assigned-clock-parents = <&scmi_clk 1>;
> + };

In the TI downstream TF-A we have this in the readme:

| AM62L Clock SCMI ID List:
| =========================
|
| **Note:** For using the clock parents, the scmi clock ID will not be the actual number itself,
| rather will be starting with 0 for respective parents similar to how it's being done in TI SCI
| Documentation: https://software-dl.ti.com/tisci/esd/09_02_07/5_soc_doc/am62ax/clocks.html
|
| For eg. for AM62LX_DEV_MCASP0_AUX_CLK device, clock ID will be 192, however if we require the parent
| to be AM62LX_DEV_MCASP0_AUX_CLK_PARENT_HSDIV4_16FFT_WKUP_0_HSDIVOUT1_CLK then we would represent in
| the device tree as:
|
| ```
| assigned-clocks = <&scmi_clk 192>;
| assigned-clock-parents = <&scmi_clk 1>;

This doesn't work. It's not conforming to the SCMI specification and it
also doesn't work with the Linux SCMI clk driver which will hang on a
cat /sys/kernel/debug/clk/clk_summary. This is because all clock
parents will be the SCMI clocks with the lowest ids including the clocks
with the lowest ids which will expose themselves as parents.

It also prevents the userspace from being able to make a tree structure
from the clock tree.

The corresponding TF-A code is requested for upstreaming here [1] where
I also commented on with the same issue.

Please stop spreading this further. The parents must be the actual
clk_id, not numbers from 0..n.

Sascha

[1] https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/34834

--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |