* [PATCH v2 0/2] iommu/rockchip: Add support for multiple interface clocks
@ 2025-11-28 7:13 Chaoyi Chen
2025-11-28 7:13 ` [PATCH v2 1/2] dt-bindings: iommu: rockchip: " Chaoyi Chen
2025-11-28 7:13 ` [PATCH v2 2/2] iommu/rockchip: Use devm_clk_bulk_get_all() to get multiple iface clock Chaoyi Chen
0 siblings, 2 replies; 9+ messages in thread
From: Chaoyi Chen @ 2025-11-28 7:13 UTC (permalink / raw)
To: Joerg Roedel, Will Deacon, Robin Murphy, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner
Cc: iommu, devicetree, linux-arm-kernel, linux-rockchip, linux-kernel,
Chaoyi Chen
From: Chaoyi Chen <chaoyi.chen@rock-chips.com>
Hi,
Some rockchip iommus require extra clocks besides aclk and interface
clock, such as the iommus for NPU and RKVENC in RK3576.
Changes in v2:
- Link to v1: https://lore.kernel.org/all/20251126083345.88-1-kernel@airkyi.com/
- Rewrite dt binding.
Chaoyi Chen (2):
dt-bindings: iommu: rockchip: Add support for multiple interface
clocks
iommu/rockchip: Use devm_clk_bulk_get_all() to get multiple iface
clock
.../bindings/iommu/rockchip,iommu.yaml | 52 ++++++++++++++++---
drivers/iommu/rockchip-iommu.c | 20 ++-----
2 files changed, 50 insertions(+), 22 deletions(-)
--
2.51.1
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v2 1/2] dt-bindings: iommu: rockchip: Add support for multiple interface clocks
2025-11-28 7:13 [PATCH v2 0/2] iommu/rockchip: Add support for multiple interface clocks Chaoyi Chen
@ 2025-11-28 7:13 ` Chaoyi Chen
2025-11-28 8:18 ` Rob Herring (Arm)
2025-12-01 7:55 ` Krzysztof Kozlowski
2025-11-28 7:13 ` [PATCH v2 2/2] iommu/rockchip: Use devm_clk_bulk_get_all() to get multiple iface clock Chaoyi Chen
1 sibling, 2 replies; 9+ messages in thread
From: Chaoyi Chen @ 2025-11-28 7:13 UTC (permalink / raw)
To: Joerg Roedel, Will Deacon, Robin Murphy, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner
Cc: iommu, devicetree, linux-arm-kernel, linux-rockchip, linux-kernel,
Chaoyi Chen
From: Chaoyi Chen <chaoyi.chen@rock-chips.com>
The iommu found on RK3576 NPU and RK3576 RKVDEC have 4 clock instead of
2 clock. Their clock names might differ, but I don't think that matters
much.
Add support for them.
Signed-off-by: Chaoyi Chen <chaoyi.chen@rock-chips.com>
---
Changes in v2:
- Rewrite dt binding.
.../bindings/iommu/rockchip,iommu.yaml | 52 ++++++++++++++++---
1 file changed, 46 insertions(+), 6 deletions(-)
diff --git a/Documentation/devicetree/bindings/iommu/rockchip,iommu.yaml b/Documentation/devicetree/bindings/iommu/rockchip,iommu.yaml
index 6ce41d11ff5e..dfa5e25476d9 100644
--- a/Documentation/devicetree/bindings/iommu/rockchip,iommu.yaml
+++ b/Documentation/devicetree/bindings/iommu/rockchip,iommu.yaml
@@ -27,6 +27,8 @@ properties:
- enum:
- rockchip,rk3576-iommu
- rockchip,rk3588-iommu
+ - rockchip,rk3576-npu-iommu
+ - rockchip,rk3576-rkvdec-iommu
- const: rockchip,rk3568-iommu
reg:
@@ -42,14 +44,12 @@ properties:
minItems: 1
clocks:
- items:
- - description: Core clock
- - description: Interface clock
+ minItems: 2
+ maxItems: 4
clock-names:
- items:
- - const: aclk
- - const: iface
+ minItems: 2
+ maxItems: 4
"#iommu-cells":
const: 0
@@ -64,6 +64,46 @@ properties:
Some mmu instances may produce unexpected results
when the reset operation is used.
+allOf:
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - rockchip,rk3576-npu-iommu
+ - rockchip,rk3576-rkvdec-iommu
+ then:
+ properties:
+ clocks:
+ minItems: 4
+ clock-names:
+ minItems: 4
+ - if:
+ properties:
+ compatible:
+ items:
+ - const: rockchip,iommu
+ - const: rockchip,rk3568-iommu
+ then:
+ properties:
+ clocks:
+ maxItems: 2
+ clock-names:
+ maxItems: 2
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - rockchip,rk3576-iommu
+ - rockchip,rk3588-iommu
+ then:
+ properties:
+ clocks:
+ maxItems: 2
+ clock-names:
+ maxItems: 2
+
required:
- compatible
- reg
--
2.51.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v2 2/2] iommu/rockchip: Use devm_clk_bulk_get_all() to get multiple iface clock
2025-11-28 7:13 [PATCH v2 0/2] iommu/rockchip: Add support for multiple interface clocks Chaoyi Chen
2025-11-28 7:13 ` [PATCH v2 1/2] dt-bindings: iommu: rockchip: " Chaoyi Chen
@ 2025-11-28 7:13 ` Chaoyi Chen
2025-11-28 7:31 ` Shawn Lin
1 sibling, 1 reply; 9+ messages in thread
From: Chaoyi Chen @ 2025-11-28 7:13 UTC (permalink / raw)
To: Joerg Roedel, Will Deacon, Robin Murphy, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner
Cc: iommu, devicetree, linux-arm-kernel, linux-rockchip, linux-kernel,
Chaoyi Chen
From: Chaoyi Chen <chaoyi.chen@rock-chips.com>
The iommu found on RK3576 NPU and RK3576 RKVDEC contain 4 clock.
Just use devm_clk_bulk_get_all() to get all the clocks and use them.
Signed-off-by: Chaoyi Chen <chaoyi.chen@rock-chips.com>
---
Changes in v2:
- Change comment.
drivers/iommu/rockchip-iommu.c | 20 ++++----------------
1 file changed, 4 insertions(+), 16 deletions(-)
diff --git a/drivers/iommu/rockchip-iommu.c b/drivers/iommu/rockchip-iommu.c
index 0861dd469bd8..76f71fb679f8 100644
--- a/drivers/iommu/rockchip-iommu.c
+++ b/drivers/iommu/rockchip-iommu.c
@@ -93,11 +93,6 @@ struct rk_iommu_domain {
struct iommu_domain domain;
};
-/* list of clocks required by IOMMU */
-static const char * const rk_iommu_clocks[] = {
- "aclk", "iface",
-};
-
struct rk_iommu_ops {
phys_addr_t (*pt_address)(u32 dte);
u32 (*mk_dtentries)(dma_addr_t pt_dma);
@@ -1236,25 +1231,18 @@ static int rk_iommu_probe(struct platform_device *pdev)
iommu->reset_disabled = device_property_read_bool(dev,
"rockchip,disable-mmu-reset");
- iommu->num_clocks = ARRAY_SIZE(rk_iommu_clocks);
- iommu->clocks = devm_kcalloc(iommu->dev, iommu->num_clocks,
- sizeof(*iommu->clocks), GFP_KERNEL);
- if (!iommu->clocks)
- return -ENOMEM;
-
- for (i = 0; i < iommu->num_clocks; ++i)
- iommu->clocks[i].id = rk_iommu_clocks[i];
-
/*
* iommu clocks should be present for all new devices and devicetrees
* but there are older devicetrees without clocks out in the wild.
* So clocks as optional for the time being.
*/
- err = devm_clk_bulk_get(iommu->dev, iommu->num_clocks, iommu->clocks);
+ err = devm_clk_bulk_get_all(dev, &iommu->clocks);
if (err == -ENOENT)
iommu->num_clocks = 0;
- else if (err)
+ else if (err < 0)
return err;
+ else
+ iommu->num_clocks = err;
err = clk_bulk_prepare(iommu->num_clocks, iommu->clocks);
if (err)
--
2.51.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH v2 2/2] iommu/rockchip: Use devm_clk_bulk_get_all() to get multiple iface clock
2025-11-28 7:13 ` [PATCH v2 2/2] iommu/rockchip: Use devm_clk_bulk_get_all() to get multiple iface clock Chaoyi Chen
@ 2025-11-28 7:31 ` Shawn Lin
0 siblings, 0 replies; 9+ messages in thread
From: Shawn Lin @ 2025-11-28 7:31 UTC (permalink / raw)
To: Chaoyi Chen
Cc: shawn.lin, iommu, devicetree, linux-arm-kernel, linux-rockchip,
linux-kernel, Chaoyi Chen, Joerg Roedel, Will Deacon,
Robin Murphy, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Heiko Stuebner
在 2025/11/28 星期五 15:13, Chaoyi Chen 写道:
> From: Chaoyi Chen <chaoyi.chen@rock-chips.com>
>
> The iommu found on RK3576 NPU and RK3576 RKVDEC contain 4 clock.
>
> Just use devm_clk_bulk_get_all() to get all the clocks and use them.
>
Reviewed-by: Shawn Lin <shawn.lin@rock-chips.com>
> Signed-off-by: Chaoyi Chen <chaoyi.chen@rock-chips.com>
> ---
>
> Changes in v2:
> - Change comment.
>
> drivers/iommu/rockchip-iommu.c | 20 ++++----------------
> 1 file changed, 4 insertions(+), 16 deletions(-)
>
> diff --git a/drivers/iommu/rockchip-iommu.c b/drivers/iommu/rockchip-iommu.c
> index 0861dd469bd8..76f71fb679f8 100644
> --- a/drivers/iommu/rockchip-iommu.c
> +++ b/drivers/iommu/rockchip-iommu.c
> @@ -93,11 +93,6 @@ struct rk_iommu_domain {
> struct iommu_domain domain;
> };
>
> -/* list of clocks required by IOMMU */
> -static const char * const rk_iommu_clocks[] = {
> - "aclk", "iface",
> -};
> -
> struct rk_iommu_ops {
> phys_addr_t (*pt_address)(u32 dte);
> u32 (*mk_dtentries)(dma_addr_t pt_dma);
> @@ -1236,25 +1231,18 @@ static int rk_iommu_probe(struct platform_device *pdev)
> iommu->reset_disabled = device_property_read_bool(dev,
> "rockchip,disable-mmu-reset");
>
> - iommu->num_clocks = ARRAY_SIZE(rk_iommu_clocks);
> - iommu->clocks = devm_kcalloc(iommu->dev, iommu->num_clocks,
> - sizeof(*iommu->clocks), GFP_KERNEL);
> - if (!iommu->clocks)
> - return -ENOMEM;
> -
> - for (i = 0; i < iommu->num_clocks; ++i)
> - iommu->clocks[i].id = rk_iommu_clocks[i];
> -
> /*
> * iommu clocks should be present for all new devices and devicetrees
> * but there are older devicetrees without clocks out in the wild.
> * So clocks as optional for the time being.
> */
> - err = devm_clk_bulk_get(iommu->dev, iommu->num_clocks, iommu->clocks);
> + err = devm_clk_bulk_get_all(dev, &iommu->clocks);
> if (err == -ENOENT)
> iommu->num_clocks = 0;
> - else if (err)
> + else if (err < 0)
> return err;
> + else
> + iommu->num_clocks = err;
>
> err = clk_bulk_prepare(iommu->num_clocks, iommu->clocks);
> if (err)
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 1/2] dt-bindings: iommu: rockchip: Add support for multiple interface clocks
2025-11-28 7:13 ` [PATCH v2 1/2] dt-bindings: iommu: rockchip: " Chaoyi Chen
@ 2025-11-28 8:18 ` Rob Herring (Arm)
2025-12-01 7:55 ` Krzysztof Kozlowski
1 sibling, 0 replies; 9+ messages in thread
From: Rob Herring (Arm) @ 2025-11-28 8:18 UTC (permalink / raw)
To: Chaoyi Chen
Cc: Conor Dooley, devicetree, Heiko Stuebner, linux-kernel,
Will Deacon, linux-rockchip, iommu, Chaoyi Chen, Joerg Roedel,
Krzysztof Kozlowski, linux-arm-kernel, Robin Murphy
On Fri, 28 Nov 2025 15:13:21 +0800, Chaoyi Chen wrote:
> From: Chaoyi Chen <chaoyi.chen@rock-chips.com>
>
> The iommu found on RK3576 NPU and RK3576 RKVDEC have 4 clock instead of
> 2 clock. Their clock names might differ, but I don't think that matters
> much.
>
> Add support for them.
>
> Signed-off-by: Chaoyi Chen <chaoyi.chen@rock-chips.com>
> ---
>
> Changes in v2:
> - Rewrite dt binding.
>
> .../bindings/iommu/rockchip,iommu.yaml | 52 ++++++++++++++++---
> 1 file changed, 46 insertions(+), 6 deletions(-)
>
My bot found errors running 'make dt_binding_check' on your patch:
yamllint warnings/errors:
dtschema/dtc warnings/errors:
Documentation/devicetree/bindings/thermal/thermal-sensor.example.dtb: /example-0/soc/thermal-sensor@c263000: failed to match any schema with compatible: ['qcom,sdm845-tsens', 'qcom,tsens-v2']
Documentation/devicetree/bindings/thermal/thermal-sensor.example.dtb: /example-0/soc/thermal-sensor@c263000: failed to match any schema with compatible: ['qcom,sdm845-tsens', 'qcom,tsens-v2']
Documentation/devicetree/bindings/thermal/thermal-sensor.example.dtb: /example-0/soc/thermal-sensor@c265000: failed to match any schema with compatible: ['qcom,sdm845-tsens', 'qcom,tsens-v2']
Documentation/devicetree/bindings/thermal/thermal-sensor.example.dtb: /example-0/soc/thermal-sensor@c265000: failed to match any schema with compatible: ['qcom,sdm845-tsens', 'qcom,tsens-v2']
doc reference errors (make refcheckdocs):
See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20251128071322.92-2-kernel@airkyi.com
The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.
If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:
pip3 install dtschema --upgrade
Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 1/2] dt-bindings: iommu: rockchip: Add support for multiple interface clocks
2025-11-28 7:13 ` [PATCH v2 1/2] dt-bindings: iommu: rockchip: " Chaoyi Chen
2025-11-28 8:18 ` Rob Herring (Arm)
@ 2025-12-01 7:55 ` Krzysztof Kozlowski
2025-12-01 8:10 ` Chaoyi Chen
1 sibling, 1 reply; 9+ messages in thread
From: Krzysztof Kozlowski @ 2025-12-01 7:55 UTC (permalink / raw)
To: Chaoyi Chen, Joerg Roedel, Will Deacon, Robin Murphy, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner
Cc: iommu, devicetree, linux-arm-kernel, linux-rockchip, linux-kernel,
Chaoyi Chen
On 28/11/2025 08:13, Chaoyi Chen wrote:
> From: Chaoyi Chen <chaoyi.chen@rock-chips.com>
>
> The iommu found on RK3576 NPU and RK3576 RKVDEC have 4 clock instead of
> 2 clock. Their clock names might differ, but I don't think that matters
> much.
>
> Add support for them.
>
> Signed-off-by: Chaoyi Chen <chaoyi.chen@rock-chips.com>
> ---
>
> Changes in v2:
> - Rewrite dt binding.
>
> .../bindings/iommu/rockchip,iommu.yaml | 52 ++++++++++++++++---
> 1 file changed, 46 insertions(+), 6 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/iommu/rockchip,iommu.yaml b/Documentation/devicetree/bindings/iommu/rockchip,iommu.yaml
> index 6ce41d11ff5e..dfa5e25476d9 100644
> --- a/Documentation/devicetree/bindings/iommu/rockchip,iommu.yaml
> +++ b/Documentation/devicetree/bindings/iommu/rockchip,iommu.yaml
> @@ -27,6 +27,8 @@ properties:
> - enum:
> - rockchip,rk3576-iommu
> - rockchip,rk3588-iommu
> + - rockchip,rk3576-npu-iommu
> + - rockchip,rk3576-rkvdec-iommu
> - const: rockchip,rk3568-iommu
>
> reg:
> @@ -42,14 +44,12 @@ properties:
> minItems: 1
>
> clocks:
> - items:
> - - description: Core clock
> - - description: Interface clock
These go to specific variant if:then.
> + minItems: 2
> + maxItems: 4
>
> clock-names:
> - items:
> - - const: aclk
> - - const: iface
> + minItems: 2
> + maxItems: 4
So you just allow any names, like pink-pony.
No, define common list here. Actually same for clocks.
>
> "#iommu-cells":
> const: 0
> @@ -64,6 +64,46 @@ properties:
> Some mmu instances may produce unexpected results
> when the reset operation is used.
>
> +allOf:
> + - if:
> + properties:
> + compatible:
> + contains:
> + enum:
> + - rockchip,rk3576-npu-iommu
> + - rockchip,rk3576-rkvdec-iommu
> + then:
> + properties:
> + clocks:
> + minItems: 4
> + clock-names:
> + minItems: 4
> + - if:
> + properties:
> + compatible:
> + items:
> + - const: rockchip,iommu
> + - const: rockchip,rk3568-iommu
> + then:
> + properties:
> + clocks:
> + maxItems: 2
Why this is unspecific now? Please look at other examples how it is
done, e.g. Samsung clocks.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 1/2] dt-bindings: iommu: rockchip: Add support for multiple interface clocks
2025-12-01 7:55 ` Krzysztof Kozlowski
@ 2025-12-01 8:10 ` Chaoyi Chen
2025-12-01 8:39 ` Krzysztof Kozlowski
0 siblings, 1 reply; 9+ messages in thread
From: Chaoyi Chen @ 2025-12-01 8:10 UTC (permalink / raw)
To: Krzysztof Kozlowski, Chaoyi Chen, Joerg Roedel, Will Deacon,
Robin Murphy, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Heiko Stuebner
Cc: iommu, devicetree, linux-arm-kernel, linux-rockchip, linux-kernel
Hi Krzysztof,
On 12/1/2025 3:55 PM, Krzysztof Kozlowski wrote:
> On 28/11/2025 08:13, Chaoyi Chen wrote:
>> From: Chaoyi Chen <chaoyi.chen@rock-chips.com>
>>
>> The iommu found on RK3576 NPU and RK3576 RKVDEC have 4 clock instead of
>> 2 clock. Their clock names might differ, but I don't think that matters
>> much.
>>
>> Add support for them.
>>
>> Signed-off-by: Chaoyi Chen <chaoyi.chen@rock-chips.com>
>> ---
>>
>> Changes in v2:
>> - Rewrite dt binding.
>>
>> .../bindings/iommu/rockchip,iommu.yaml | 52 ++++++++++++++++---
>> 1 file changed, 46 insertions(+), 6 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/iommu/rockchip,iommu.yaml b/Documentation/devicetree/bindings/iommu/rockchip,iommu.yaml
>> index 6ce41d11ff5e..dfa5e25476d9 100644
>> --- a/Documentation/devicetree/bindings/iommu/rockchip,iommu.yaml
>> +++ b/Documentation/devicetree/bindings/iommu/rockchip,iommu.yaml
>> @@ -27,6 +27,8 @@ properties:
>> - enum:
>> - rockchip,rk3576-iommu
>> - rockchip,rk3588-iommu
>> + - rockchip,rk3576-npu-iommu
>> + - rockchip,rk3576-rkvdec-iommu
>> - const: rockchip,rk3568-iommu
>>
>> reg:
>> @@ -42,14 +44,12 @@ properties:
>> minItems: 1
>>
>> clocks:
>> - items:
>> - - description: Core clock
>> - - description: Interface clock
>
> These go to specific variant if:then.
>
>> + minItems: 2
>> + maxItems: 4
>>
>> clock-names:
>> - items:
>> - - const: aclk
>> - - const: iface
>> + minItems: 2
>> + maxItems: 4
>
> So you just allow any names, like pink-pony.
>
> No, define common list here. Actually same for clocks.
Will fix in v3.
>
>>
>> "#iommu-cells":
>> const: 0
>> @@ -64,6 +64,46 @@ properties:
>> Some mmu instances may produce unexpected results
>> when the reset operation is used.
>>
>> +allOf:
>> + - if:
>> + properties:
>> + compatible:
>> + contains:
>> + enum:
>> + - rockchip,rk3576-npu-iommu
>> + - rockchip,rk3576-rkvdec-iommu
>> + then:
>> + properties:
>> + clocks:
>> + minItems: 4
>> + clock-names:
>> + minItems: 4
>> + - if:
>> + properties:
>> + compatible:
>> + items:
>> + - const: rockchip,iommu
>> + - const: rockchip,rk3568-iommu
>> + then:
>> + properties:
>> + clocks:
>> + maxItems: 2
>
> Why this is unspecific now? Please look at other examples how it is
> done, e.g. Samsung clocks.
I looked at some examples. Maybe it need to set both minItems and
maxItems here? I'm not sure I understood your point.
>
>
> Best regards,
> Krzysztof
>
>
--
Best,
Chaoyi
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 1/2] dt-bindings: iommu: rockchip: Add support for multiple interface clocks
2025-12-01 8:10 ` Chaoyi Chen
@ 2025-12-01 8:39 ` Krzysztof Kozlowski
2025-12-01 8:54 ` Chaoyi Chen
0 siblings, 1 reply; 9+ messages in thread
From: Krzysztof Kozlowski @ 2025-12-01 8:39 UTC (permalink / raw)
To: Chaoyi Chen, Chaoyi Chen, Joerg Roedel, Will Deacon, Robin Murphy,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner
Cc: iommu, devicetree, linux-arm-kernel, linux-rockchip, linux-kernel
On 01/12/2025 09:10, Chaoyi Chen wrote:
>>> + - if:
>>> + properties:
>>> + compatible:
>>> + items:
>>> + - const: rockchip,iommu
>>> + - const: rockchip,rk3568-iommu
>>> + then:
>>> + properties:
>>> + clocks:
>>> + maxItems: 2
>>
>> Why this is unspecific now? Please look at other examples how it is
>> done, e.g. Samsung clocks.
>
> I looked at some examples. Maybe it need to set both minItems and
> maxItems here? I'm not sure I understood your point.
Individual items were described before. Now they are not, so first item
can be anything.
You need to define the list. If the devices have completely different
clocks, then you would go with Samsung approach. But devices should not
have completely different clocks, so you should define common parts in
top-level and just narrow number of items here. maxItems is enough in
such case.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 1/2] dt-bindings: iommu: rockchip: Add support for multiple interface clocks
2025-12-01 8:39 ` Krzysztof Kozlowski
@ 2025-12-01 8:54 ` Chaoyi Chen
0 siblings, 0 replies; 9+ messages in thread
From: Chaoyi Chen @ 2025-12-01 8:54 UTC (permalink / raw)
To: Krzysztof Kozlowski, Chaoyi Chen, Joerg Roedel, Will Deacon,
Robin Murphy, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Heiko Stuebner
Cc: iommu, devicetree, linux-arm-kernel, linux-rockchip, linux-kernel
On 12/1/2025 4:39 PM, Krzysztof Kozlowski wrote:
> On 01/12/2025 09:10, Chaoyi Chen wrote:
>>>> + - if:
>>>> + properties:
>>>> + compatible:
>>>> + items:
>>>> + - const: rockchip,iommu
>>>> + - const: rockchip,rk3568-iommu
>>>> + then:
>>>> + properties:
>>>> + clocks:
>>>> + maxItems: 2
>>>
>>> Why this is unspecific now? Please look at other examples how it is
>>> done, e.g. Samsung clocks.
>>
>> I looked at some examples. Maybe it need to set both minItems and
>> maxItems here? I'm not sure I understood your point.
>
> Individual items were described before. Now they are not, so first item
> can be anything.
>
> You need to define the list. If the devices have completely different
> clocks, then you would go with Samsung approach. But devices should not
> have completely different clocks, so you should define common parts in
> top-level and just narrow number of items here. maxItems is enough in
> such case.
Ah, it looks like Samsung's clock bindings rarely have common parts.
At present, there are indeed some common parts for the IOMMU clock,
but I'm not sure how other variants will change.
I'll give this a try, thank you!
--
Best,
Chaoyi
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2025-12-01 8:54 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-28 7:13 [PATCH v2 0/2] iommu/rockchip: Add support for multiple interface clocks Chaoyi Chen
2025-11-28 7:13 ` [PATCH v2 1/2] dt-bindings: iommu: rockchip: " Chaoyi Chen
2025-11-28 8:18 ` Rob Herring (Arm)
2025-12-01 7:55 ` Krzysztof Kozlowski
2025-12-01 8:10 ` Chaoyi Chen
2025-12-01 8:39 ` Krzysztof Kozlowski
2025-12-01 8:54 ` Chaoyi Chen
2025-11-28 7:13 ` [PATCH v2 2/2] iommu/rockchip: Use devm_clk_bulk_get_all() to get multiple iface clock Chaoyi Chen
2025-11-28 7:31 ` Shawn Lin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).