[PATCH v1 03/14] dt-bindings: arm: mediatek: mmsys: Add assigned-clocks/rates properties

Ariel D'Alessandro posted 14 patches 1 month, 2 weeks ago
There is a newer version of this series
[PATCH v1 03/14] dt-bindings: arm: mediatek: mmsys: Add assigned-clocks/rates properties
Posted by Ariel D'Alessandro 1 month, 2 weeks ago
Current, the DT bindings for MediaTek mmsys controller is missing the
assigned-clocks and assigned-clocks-rates properties. Add these and
update the example as well.

Signed-off-by: Ariel D'Alessandro <ariel.dalessandro@collabora.com>
---
 .../devicetree/bindings/arm/mediatek/mediatek,mmsys.yaml | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,mmsys.yaml b/Documentation/devicetree/bindings/arm/mediatek/mediatek,mmsys.yaml
index 3f4262e93c789..d045d366eb8e2 100644
--- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,mmsys.yaml
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,mmsys.yaml
@@ -68,6 +68,12 @@ properties:
       of the power controller specified by phandle. See
       Documentation/devicetree/bindings/power/power-domain.yaml for details.
 
+  assigned-clocks:
+    maxItems: 1
+
+  assigned-clock-rates:
+    maxItems: 1
+
   mboxes:
     description:
       Using mailbox to communicate with GCE, it should have this
@@ -130,6 +136,7 @@ additionalProperties: false
 
 examples:
   - |
+    #include <dt-bindings/clock/mt8173-clk.h>
     #include <dt-bindings/power/mt8173-power.h>
     #include <dt-bindings/gce/mt8173-gce.h>
 
@@ -137,6 +144,8 @@ examples:
         compatible = "mediatek,mt8173-mmsys", "syscon";
         reg = <0x14000000 0x1000>;
         power-domains = <&spm MT8173_POWER_DOMAIN_MM>;
+        assigned-clocks = <&topckgen CLK_TOP_MM_SEL>;
+        assigned-clock-rates = <400000000>;
         #clock-cells = <1>;
         #reset-cells = <1>;
         mboxes = <&gce 0 CMDQ_THR_PRIO_HIGHEST>,
-- 
2.50.1
Re: [PATCH v1 03/14] dt-bindings: arm: mediatek: mmsys: Add assigned-clocks/rates properties
Posted by Krzysztof Kozlowski 1 month, 1 week ago
On Wed, Aug 20, 2025 at 02:12:51PM -0300, Ariel D'Alessandro wrote:
> Current, the DT bindings for MediaTek mmsys controller is missing the
> assigned-clocks and assigned-clocks-rates properties. Add these and

No, they do not miss them. I don't understand why you are adding these.

> update the example as well.
> 
> Signed-off-by: Ariel D'Alessandro <ariel.dalessandro@collabora.com>
> ---
>  .../devicetree/bindings/arm/mediatek/mediatek,mmsys.yaml | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,mmsys.yaml b/Documentation/devicetree/bindings/arm/mediatek/mediatek,mmsys.yaml
> index 3f4262e93c789..d045d366eb8e2 100644
> --- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,mmsys.yaml
> +++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,mmsys.yaml
> @@ -68,6 +68,12 @@ properties:
>        of the power controller specified by phandle. See
>        Documentation/devicetree/bindings/power/power-domain.yaml for details.
>  
> +  assigned-clocks:
> +    maxItems: 1
> +
> +  assigned-clock-rates:
> +    maxItems: 1
> +

Drop both, completely redundant and not actually in the scope of the binding.

Best regards,
Krzysztof
Re: [PATCH v1 03/14] dt-bindings: arm: mediatek: mmsys: Add assigned-clocks/rates properties
Posted by Ariel D'Alessandro 3 weeks, 4 days ago
Krzysztof,

On 8/21/25 3:43 AM, Krzysztof Kozlowski wrote:
> On Wed, Aug 20, 2025 at 02:12:51PM -0300, Ariel D'Alessandro wrote:
>> Current, the DT bindings for MediaTek mmsys controller is missing the
>> assigned-clocks and assigned-clocks-rates properties. Add these and
> 
> No, they do not miss them. I don't understand why you are adding these.

The reason I added these is due to the following check error:

$ make -j$(nproc) CHECK_DTBS=y mediatek/mt8173-elm.dtb
   DTC [C] arch/arm64/boot/dts/mediatek/mt8173-elm.dtb
[...]
arch/arm64/boot/dts/mediatek/mt8173-elm.dtb: syscon@14000000 
(mediatek,mt8173-mmsys): 'assigned-clock-rates', 'assigned-clocks' do 
not match any of the regexes: '^pinctrl-[0-9]+$'
	from schema $id: 
http://devicetree.org/schemas/arm/mediatek/mediatek,mmsys.yaml#

> 
>> update the example as well.
>>
>> Signed-off-by: Ariel D'Alessandro <ariel.dalessandro@collabora.com>
>> ---
>>   .../devicetree/bindings/arm/mediatek/mediatek,mmsys.yaml | 9 +++++++++
>>   1 file changed, 9 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,mmsys.yaml b/Documentation/devicetree/bindings/arm/mediatek/mediatek,mmsys.yaml
>> index 3f4262e93c789..d045d366eb8e2 100644
>> --- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,mmsys.yaml
>> +++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,mmsys.yaml
>> @@ -68,6 +68,12 @@ properties:
>>         of the power controller specified by phandle. See
>>         Documentation/devicetree/bindings/power/power-domain.yaml for details.
>>   
>> +  assigned-clocks:
>> +    maxItems: 1
>> +
>> +  assigned-clock-rates:
>> +    maxItems: 1
>> +
> 
> Drop both, completely redundant and not actually in the scope of the binding.

Ack. Will fix accordingly in v2 based on the discussion above.

Thanks!

-- 
Ariel D'Alessandro
Software Engineer

Collabora Ltd.
Platinum Building, St John's Innovation Park, Cambridge CB4 0DS, UK 
Registered in England & Wales, no. 5513718
Re: [PATCH v1 03/14] dt-bindings: arm: mediatek: mmsys: Add assigned-clocks/rates properties
Posted by Krzysztof Kozlowski 3 weeks, 3 days ago
On 08/09/2025 21:19, Ariel D'Alessandro wrote:
> Krzysztof,
> 
> On 8/21/25 3:43 AM, Krzysztof Kozlowski wrote:
>> On Wed, Aug 20, 2025 at 02:12:51PM -0300, Ariel D'Alessandro wrote:
>>> Current, the DT bindings for MediaTek mmsys controller is missing the
>>> assigned-clocks and assigned-clocks-rates properties. Add these and
>>
>> No, they do not miss them. I don't understand why you are adding these.
> 
> The reason I added these is due to the following check error:
> 
> $ make -j$(nproc) CHECK_DTBS=y mediatek/mt8173-elm.dtb
>    DTC [C] arch/arm64/boot/dts/mediatek/mt8173-elm.dtb
> [...]
> arch/arm64/boot/dts/mediatek/mt8173-elm.dtb: syscon@14000000 
> (mediatek,mt8173-mmsys): 'assigned-clock-rates', 'assigned-clocks' do 
> not match any of the regexes: '^pinctrl-[0-9]+$'
> 	from schema $id: 
> http://devicetree.org/schemas/arm/mediatek/mediatek,mmsys.yaml#

This is looking like missing clocks or other unevaluated property by the
binding.


Best regards,
Krzysztof
Re: [PATCH v1 03/14] dt-bindings: arm: mediatek: mmsys: Add assigned-clocks/rates properties
Posted by Ariel D'Alessandro 3 weeks, 1 day ago
Krzysztof,

On 9/9/25 3:29 AM, Krzysztof Kozlowski wrote:
> On 08/09/2025 21:19, Ariel D'Alessandro wrote:
>> Krzysztof,
>>
>> On 8/21/25 3:43 AM, Krzysztof Kozlowski wrote:
>>> On Wed, Aug 20, 2025 at 02:12:51PM -0300, Ariel D'Alessandro wrote:
>>>> Current, the DT bindings for MediaTek mmsys controller is missing the
>>>> assigned-clocks and assigned-clocks-rates properties. Add these and
>>>
>>> No, they do not miss them. I don't understand why you are adding these.
>>
>> The reason I added these is due to the following check error:
>>
>> $ make -j$(nproc) CHECK_DTBS=y mediatek/mt8173-elm.dtb
>>     DTC [C] arch/arm64/boot/dts/mediatek/mt8173-elm.dtb
>> [...]
>> arch/arm64/boot/dts/mediatek/mt8173-elm.dtb: syscon@14000000
>> (mediatek,mt8173-mmsys): 'assigned-clock-rates', 'assigned-clocks' do
>> not match any of the regexes: '^pinctrl-[0-9]+$'
>> 	from schema $id:
>> http://devicetree.org/schemas/arm/mediatek/mediatek,mmsys.yaml#
> 
> This is looking like missing clocks or other unevaluated property by the
> binding.

Agreed, the rate assignment has to be moved in other DT nodes, it's not 
a binding issue.

Thanks,

-- 
Ariel D'Alessandro
Software Engineer

Collabora Ltd.
Platinum Building, St John's Innovation Park, Cambridge CB4 0DS, UK 
Registered in England & Wales, no. 5513718