dt-bindings: iommu: add bindings for sprd iommu
Subsystems (3)
Chunyan Zhang
reviewerRFC PATCH 1/2 dt-bindings: iommu: add bindings for sprd iommu
From: Chunyan Zhang <[email protected]>
This patch only adds bindings to support display iommu, support for others would be added once finished tests with those devices, such as Image codec(jpeg) processor, a few signal processors, including VSP(video), GSP(graphic), ISP(image), and camera CPP, etc.
--- .../devicetree/bindings/iommu/sprd,iommu.yaml | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 Documentation/devicetree/bindings/iommu/sprd,iommu.yaml
Documentation/devicetree/bindings/iommu/sprd,iommu.yaml new file +44 -0
@@ -0,0 +1,44 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +# Copyright 2020 Unisoc Inc. +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iommu/sprd,iommu.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Unisoc IOMMU and Multi-media MMU + +maintainers: + - Chunyan Zhang <[email protected]> + +properties: + compatible: + enum: + - sprd,iommu-disp + + reg: + maxItems: 1 + + "#iommu-cells": + const: 0 + description: + Unisoc IOMMUs are all single-master IOMMU devices, therefore no + additional information needs to associate with its master device. + Please refer to the generic bindings document for more details, + Documentation/devicetree/bindings/iommu/iommu.txt + +required: + - compatible + - reg + - "#iommu-cells" + +additionalProperties: false + +examples: + - | + iommu_disp: iommu@63000000 { + compatible = "sprd,iommu-disp"; + reg = <0x63000000 0x880>; + #iommu-cells = <0>; + }; + +...
Signature · 1 line
2.25.1
Chunyan Zhang
reviewerRFC PATCH 2/2 iommu: add Unisoc iommu basic driver
From: Chunyan Zhang <[email protected]>
This patch only adds display iommu support, the driver was tested with sprd dpu.
The iommu support for others would be added once finished tests with those devices, such as Image codec(jpeg) processor, a few signal processors, including VSP(video), GSP(graphic), ISP(image), and camera CPP, etc.
--- drivers/iommu/Kconfig | 14 ++ drivers/iommu/Makefile | 1 + drivers/iommu/sprd-iommu.c | 485 +++++++++++++++++++++++++++++++++++++ 3 files changed, 500 insertions(+) create mode 100644 drivers/iommu/sprd-iommu.c
drivers/iommu/Kconfig +14 -0
@@ -401,4 +401,18 @@ config VIRTIO_IOMMU Say Y here if you intend to run this kernel as a guest. +config SPRD_IOMMU + bool "Unisoc IOMMU Support" + depends on ARCH_SPRD + select ARM_DMA_USE_IOMMU + select IOMMU_API + select MEMORY + help + Support for IOMMU on Unisoc's SoCs on which multi-media subsystems + need IOMMU, such as DPU, Image codec(jpeg) processor, and a few + signal processors, including VSP(video), GSP(graphic), ISP(image), and + CPP, etc. + + Say Y here if you want multi-media functions. + endif # IOMMU_SUPPORT
drivers/iommu/Makefile +1 -0
@@ -27,3 +27,4 @@ obj-$(CONFIG_FSL_PAMU) += fsl_pamu.o fsl_pamu_domain.o obj-$(CONFIG_S390_IOMMU) += s390-iommu.o obj-$(CONFIG_HYPERV_IOMMU) += hyperv-iommu.o obj-$(CONFIG_VIRTIO_IOMMU) += virtio-iommu.o +obj-$(CONFIG_SPRD_IOMMU) += sprd-iommu.o
drivers/iommu/sprd-iommu.c new file +485 -0
485 lines not on this page · raw message
Signature · 1 line
2.25.1
Rob Herring
maintainerQuoted 25 lines · Chunyan Zhang
From: Chunyan Zhang <[email protected]>
This patch only adds bindings to support display iommu, support for others would be added once finished tests with those devices, such as Image codec(jpeg) processor, a few signal processors, including VSP(video), GSP(graphic), ISP(image), and camera CPP, etc.
Signed-off-by Chunyan Zhang <[email protected]>--- .../devicetree/bindings/iommu/sprd,iommu.yaml | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 Documentation/devicetree/bindings/iommu/sprd,iommu.yamlDocumentation/devicetree/bindings/iommu/sprd,iommu.yaml new file +6
-0@@ -0,0 +1,44 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +# Copyright 2020 Unisoc Inc. +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iommu/sprd,iommu.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml#
Documentation/devicetree/bindings/iommu/sprd,iommu.yaml line 16
Quoted 10 lines
Documentation/devicetree/bindings/iommu/sprd,iommu.yaml new file +10
-0+ +title: Unisoc IOMMU and Multi-media MMU + +maintainers: + - Chunyan Zhang <[email protected]> + +properties: + compatible: + enum: + - sprd,iommu-disp
Needs to be Soc specific. Is this block specific to display subsys or that just happens to be where the instance is?
Quoted 31 lines
Documentation/devicetree/bindings/iommu/sprd,iommu.yaml new file +28
-0+ + reg: + maxItems: 1 + + "#iommu-cells": + const: 0 + description: + Unisoc IOMMUs are all single-master IOMMU devices, therefore no + additional information needs to associate with its master device. + Please refer to the generic bindings document for more details, + Documentation/devicetree/bindings/iommu/iommu.txt + +required: + - compatible + - reg + - "#iommu-cells" + +additionalProperties: false + +examples: + - | + iommu_disp: iommu@63000000 { + compatible = "sprd,iommu-disp"; + reg = <0x63000000 0x880>; + #iommu-cells = <0>; + }; + +...Signature · 1 line
2.25.1
_______________________________________________
iommu mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu
Chunyan Zhang
reviewerQuoted 31 lines · Rob Herring
Quoted 29 lines · Chunyan Zhang
From: Chunyan Zhang <[email protected]>
This patch only adds bindings to support display iommu, support for others would be added once finished tests with those devices, such as Image codec(jpeg) processor, a few signal processors, including VSP(video), GSP(graphic), ISP(image), and camera CPP, etc.
Signed-off-by Chunyan Zhang <[email protected]>--- .../devicetree/bindings/iommu/sprd,iommu.yaml | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 Documentation/devicetree/bindings/iommu/sprd,iommu.yamlDocumentation/devicetree/bindings/iommu/sprd,iommu.yaml new file +10
-0@@ -0,0 +1,44 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +# Copyright 2020 Unisoc Inc. +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iommu/sprd,iommu.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Unisoc IOMMU and Multi-media MMU + +maintainers:
Quoted 8 lines
Documentation/devicetree/bindings/iommu/sprd,iommu.yaml line 16
Quoted 6 lines
Documentation/devicetree/bindings/iommu/sprd,iommu.yaml new file +6
-0+ - Chunyan Zhang <[email protected]> + +properties: + compatible: + enum: + - sprd,iommu-dispNeeds to be Soc specific.
All SoCs so far use the same iommu IP, there's a little different among different iommu users.
Quoted 2 lines
Is this block specific to display subsys or
that just happens to be where the instance is?
This iommu driver can serve many subsystem devices, such as Video, Camera, Image, etc., but they have their own iommu module which looks like a subdevice embedded in the master devices.
I will add more compatible strings for those devices when needed. For now, only this one was listed here because I just tested this iommu driver with DPU only.
Thanks for the review.
Chunyan
Quoted 24 lines
Quoted 24 lines
Documentation/devicetree/bindings/iommu/sprd,iommu.yaml new file +23
-0+ + reg: + maxItems: 1 + + "#iommu-cells": + const: 0 + description: + Unisoc IOMMUs are all single-master IOMMU devices, therefore no + additional information needs to associate with its master device. + Please refer to the generic bindings document for more details, + Documentation/devicetree/bindings/iommu/iommu.txt + +required: + - compatible + - reg + - "#iommu-cells" + +additionalProperties: false + +examples: + - | + iommu_disp: iommu@63000000 { + compatible = "sprd,iommu-disp";
Quoted 8 lines
Quoted 8 lines
Documentation/devicetree/bindings/iommu/sprd,iommu.yaml new file +5
-1+ reg = <0x63000000 0x880>; + #iommu-cells = <0>; + }; + +... --2.25.1
_______________________________________________
iommu mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu
Rob Herring
maintainerQuoted 42 lines · Chunyan Zhang
Quoted 31 lines · Rob Herring
Quoted 29 lines · Chunyan Zhang
From: Chunyan Zhang <[email protected]>
This patch only adds bindings to support display iommu, support for others would be added once finished tests with those devices, such as Image codec(jpeg) processor, a few signal processors, including VSP(video), GSP(graphic), ISP(image), and camera CPP, etc.
Signed-off-by Chunyan Zhang <[email protected]>--- .../devicetree/bindings/iommu/sprd,iommu.yaml | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 Documentation/devicetree/bindings/iommu/sprd,iommu.yamlDocumentation/devicetree/bindings/iommu/sprd,iommu.yaml new file +10
-0@@ -0,0 +1,44 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +# Copyright 2020 Unisoc Inc. +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iommu/sprd,iommu.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Unisoc IOMMU and Multi-media MMU + +maintainers:Quoted 8 lines
Documentation/devicetree/bindings/iommu/sprd,iommu.yaml line 16
Quoted 6 lines
Documentation/devicetree/bindings/iommu/sprd,iommu.yaml new file +6
-0+ - Chunyan Zhang <[email protected]> + +properties: + compatible: + enum: + - sprd,iommu-dispNeeds to be Soc specific.
Quoted 2 lines
All SoCs so far use the same iommu IP, there's a little different among different iommu users.
That's what everyone says. Be warned that you cannot add properties for any differences that come up whether features or errata.
Quoted 9 lines
Quoted 2 lines
Is this block specific to display subsys or
that just happens to be where the instance is?This iommu driver can serve many subsystem devices, such as Video, Camera, Image, etc., but they have their own iommu module which looks like a subdevice embedded in the master devices.
I will add more compatible strings for those devices when needed. For now, only this one was listed here because I just tested this iommu driver with DPU only.
The iommu binding takes care of what each one is connected to. Is each instance different in terms of features or programming model? If not, then you shouldn't have different compatible strings for each instance.
Rob
_______________________________________________
iommu mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu
Chunyan Zhang
reviewerQuoted 44 lines · Rob Herring
Quoted 42 lines · Chunyan Zhang
Quoted 39 lines · Rob Herring
Quoted 25 lines · Chunyan Zhang
From: Chunyan Zhang <[email protected]>
This patch only adds bindings to support display iommu, support for others would be added once finished tests with those devices, such as Image codec(jpeg) processor, a few signal processors, including VSP(video), GSP(graphic), ISP(image), and camera CPP, etc.
Signed-off-by Chunyan Zhang <[email protected]>--- .../devicetree/bindings/iommu/sprd,iommu.yaml | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 Documentation/devicetree/bindings/iommu/sprd,iommu.yamlDocumentation/devicetree/bindings/iommu/sprd,iommu.yaml new file +6
-0@@ -0,0 +1,44 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +# Copyright 2020 Unisoc Inc. +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iommu/sprd,iommu.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml#Documentation/devicetree/bindings/iommu/sprd,iommu.yaml line 16
Quoted 10 lines
Documentation/devicetree/bindings/iommu/sprd,iommu.yaml new file +10
-0+ +title: Unisoc IOMMU and Multi-media MMU + +maintainers: + - Chunyan Zhang <[email protected]> + +properties: + compatible: + enum: + - sprd,iommu-dispNeeds to be Soc specific.
Quoted 5 lines
Quoted 2 lines
All SoCs so far use the same iommu IP, there's a little different among different iommu users.
That's what everyone says. Be warned that you cannot add properties for any differences that come up whether features or errata.
Ok, I will use a version specific compatible string.
Quoted 11 lines
Quoted 10 lines
Quoted 3 lines
Is this block specific to display subsys or
that just happens to be where the instance is?This iommu driver can serve many subsystem devices, such as Video, Camera, Image, etc., but they have their own iommu module which looks like a subdevice embedded in the master devices.
I will add more compatible strings for those devices when needed. For now, only this one was listed here because I just tested this iommu driver with DPU only.
Quoted 2 lines
The iommu binding takes care of what each one is connected to. Is each instance different in terms of features or programming model? If not,
The one difference so far is the register offset which is not the same for different instances.
Thanks for the review.
Chunyan
Quoted 4 lines
then you shouldn't have different compatible strings for each instance.
Rob
_______________________________________________
iommu mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu