[PATCH 2/3] iommu: mtk_iommu: add support for 6-bit encoded port IDs

2022-05-30 Thread Fabien Parent
Until now the port ID was always encoded as a 5-bit data. On MT8365, the port ID is encoded as a 6-bit data. This requires to rework the macros F_MMU_INT_ID_LARB_ID, and F_MMU_INT_ID_PORT_ID in order to support 5-bit and 6-bit encoded port IDs. Signed-off-by: Fabien Parent --- drivers/iommu

[PATCH 3/3] iommu: mtk_iommu: add support for MT8365 SoC

2022-05-30 Thread Fabien Parent
Add IOMMU support for MT8365 SoC. Signed-off-by: Fabien Parent --- drivers/iommu/mtk_iommu.c | 11 +++ drivers/iommu/mtk_iommu.h | 1 + 2 files changed, 12 insertions(+) diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c index b692347d8d56..039b8f9d5022 100644

[PATCH 1/3] dt-bindings: iommu: mediatek: add binding documentation for MT8365 SoC

2022-05-30 Thread Fabien Parent
Add IOMMU binding documentation for the MT8365 SoC. Signed-off-by: Fabien Parent --- .../bindings/iommu/mediatek,iommu.yaml| 2 + include/dt-bindings/memory/mt8365-larb-port.h | 96 +++ 2 files changed, 98 insertions(+) create mode 100644 include/dt-bindings/memory

[PATCH v4 1/3] dt-bindings: iommu: Add binding for MediaTek MT8167 IOMMU

2020-09-07 Thread Fabien Parent
This commit adds IOMMU binding documentation and larb port definitions for the MT8167 SoC. Signed-off-by: Fabien Parent Acked-by: Rob Herring --- V4: * Added path to mt8167 larb header file * Added Honghui Zhang in copyright header V3: Added mt8167-larb-port.h file for iommu

[PATCH v4 2/3] iommu/mediatek: add flag for legacy ivrp paddr

2020-09-07 Thread Fabien Parent
Add a new flag in order to select which IVRP_PADDR format is used by an SoC. Signed-off-by: Fabien Parent Reviewed-by: Yong Wu --- v4: no change v3: set LEGACY_IVRP_PADDR as a flag instead of platform data v2: new patch --- drivers/iommu/mtk_iommu.c | 6 -- 1 file changed, 4 insertions

[PATCH v4 3/3] iommu/mediatek: add support for MT8167

2020-09-07 Thread Fabien Parent
Add support for the IOMMU on MT8167 Signed-off-by: Fabien Parent --- V4; * Removed HAS_4GB_MODE flag since this SoC does not seem to support it V3: * use LEGACY_IVRP_PADDR flag instead of using a platform data member V2: * removed if based on m4u_plat, and using instead

Re: [PATCH v3 3/3] iommu/mediatek: add support for MT8167

2020-09-07 Thread Fabien Parent
> > +static const struct mtk_iommu_plat_data mt8167_data = { > > + .m4u_plat = M4U_MT8167, > > + .flags= HAS_4GB_MODE | RESET_AXI | HAS_LEGACY_IVRP_PADDR, > > The 4GB mode flow was improved at[1] which has just been applied. > > If you add 4gb_mode flag but don't have

Re: [PATCH v3 3/3] iommu/mediatek: add support for MT8167

2020-09-06 Thread Fabien Parent
On Sun, Sep 6, 2020 at 5:19 PM Fabien Parent wrote: > > Add support for the IOMMU on MT8167 > > Signed-off-by: Fabien Parent > --- > > V3: > * use LEGACY_IVRP_PADDR flag instead of using a platform data member Forgot to mention a change here: .larbid_remap has be

[PATCH v3 1/3] dt-bindings: iommu: Add binding for MediaTek MT8167 IOMMU

2020-09-06 Thread Fabien Parent
This commit adds IOMMU binding documentation and larb port definitions for the MT8167 SoC. Signed-off-by: Fabien Parent Acked-by: Rob Herring --- V3: Added mt8167-larb-port.h file for iommu port definitions V2: no change --- .../bindings/iommu/mediatek,iommu.txt | 1 + include/dt

[PATCH v3 2/3] iommu/mediatek: add flag for legacy ivrp paddr

2020-09-06 Thread Fabien Parent
Add a new flag in order to select which IVRP_PADDR format is used by an SoC. Signed-off-by: Fabien Parent --- v3: set LEGACY_IVRP_PADDR as a flag instead of platform data v2: new patch --- drivers/iommu/mtk_iommu.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git

[PATCH v3 3/3] iommu/mediatek: add support for MT8167

2020-09-06 Thread Fabien Parent
Add support for the IOMMU on MT8167 Signed-off-by: Fabien Parent --- V3: * use LEGACY_IVRP_PADDR flag instead of using a platform data member V2: * removed if based on m4u_plat, and using instead the new has_legacy_ivrp_paddr member that was introduced in patch 2

[PATCH v2 2/3] iommu/mediatek: add pdata member for legacy ivrp paddr

2020-03-02 Thread Fabien Parent
Add a new platform data member in order to select which IVRP_PADDR format is used by an SoC. Signed-off-by: Fabien Parent --- v2: new patch --- drivers/iommu/mtk_iommu.c | 3 ++- drivers/iommu/mtk_iommu.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/iommu

[PATCH v2 3/3] iommu/mediatek: add support for MT8167

2020-03-02 Thread Fabien Parent
Add support for the IOMMU on MT8167 Signed-off-by: Fabien Parent --- V2: * removed if based on m4u_plat, and using instead the new has_legacy_ivrp_paddr member that was introduced in patch 2. --- drivers/iommu/mtk_iommu.c | 9 + drivers/iommu/mtk_iommu.h | 1 + 2 files

[PATCH v2 1/3] dt-bindings: iommu: Add binding for MediaTek MT8167 IOMMU

2020-03-02 Thread Fabien Parent
This commit adds IOMMU binding documentation for the MT8167 SoC. Signed-off-by: Fabien Parent Acked-by: Rob Herring --- V2: no change --- Documentation/devicetree/bindings/iommu/mediatek,iommu.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/iommu

[PATCH 2/2] iommu/mediatek: add support for MT8167

2020-01-05 Thread Fabien Parent
Add support for the IOMMU on MT8167 Signed-off-by: Fabien Parent --- drivers/iommu/mtk_iommu.c | 11 ++- drivers/iommu/mtk_iommu.h | 1 + 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c index 6fc1f5ecf91e

[PATCH 1/2] dt-bindings: iommu: Add binding for MediaTek MT8167 IOMMU

2020-01-05 Thread Fabien Parent
This commit adds IOMMU binding documentation for the MT8167 SoC. Signed-off-by: Fabien Parent --- Documentation/devicetree/bindings/iommu/mediatek,iommu.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/iommu/mediatek,iommu.txt b/Documentation/devicetree