The RK3576 NPU IOMMU is compatible with rk3568-iommu but needs four clocks: aclk, iface and the two CBUF clocks.
Measured: with only aclk and iface, the IOMMU reset fails and the NPU does not probe. Without either one of the CBUF clocks it fails as well, and one of those configurations does not even boot. With all four clocks the IOMMU works, and the npu clock is not needed. rk_iommu enables every clock listed in the device tree (841363ebb508), so this list decides whether the IOMMU can reset. Signed-off-by: Jiaxing Hu <[email protected]> Acked-by: Conor Dooley <[email protected]> --- .../bindings/iommu/rockchip,iommu.yaml | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/Documentation/devicetree/bindings/iommu/rockchip,iommu.yaml b/Documentation/devicetree/bindings/iommu/rockchip,iommu.yaml index 6ce41d11ff5e..e40c9ac2b463 100644 --- a/Documentation/devicetree/bindings/iommu/rockchip,iommu.yaml +++ b/Documentation/devicetree/bindings/iommu/rockchip,iommu.yaml @@ -26,6 +26,7 @@ properties: - items: - enum: - rockchip,rk3576-iommu + - rockchip,rk3576-npu-iommu - rockchip,rk3588-iommu - const: rockchip,rk3568-iommu @@ -42,14 +43,20 @@ properties: minItems: 1 clocks: + minItems: 2 items: - description: Core clock - description: Interface clock + - description: Convolution buffer core clock + - description: Convolution buffer interface clock clock-names: + minItems: 2 items: - const: aclk - const: iface + - const: aclk_cbuf + - const: hclk_cbuf "#iommu-cells": const: 0 @@ -72,6 +79,25 @@ required: - clock-names - "#iommu-cells" +allOf: + - if: + properties: + compatible: + contains: + const: rockchip,rk3576-npu-iommu + then: + properties: + clocks: + minItems: 4 + clock-names: + minItems: 4 + else: + properties: + clocks: + maxItems: 2 + clock-names: + maxItems: 2 + additionalProperties: false examples: -- 2.43.0
