* [PATCH v3 1/7] arm64: dts: mediatek: add mmsys support for mt8365 SoC
2023-04-07 9:34 [PATCH v3 0/7] Add IOMMU support to MT8365 SoC Alexandre Mergnat
@ 2023-04-07 9:34 ` Alexandre Mergnat
2023-04-11 8:26 ` AngeloGioacchino Del Regno
2023-04-07 9:34 ` [PATCH v3 2/7] arm64: dts: mediatek: add camsys " Alexandre Mergnat
` (5 subsequent siblings)
6 siblings, 1 reply; 12+ messages in thread
From: Alexandre Mergnat @ 2023-04-07 9:34 UTC (permalink / raw)
To: Yong Wu, Krzysztof Kozlowski, Rob Herring, Matthias Brugger,
AngeloGioacchino Del Regno, Krzysztof Kozlowski
Cc: linux-mediatek, linux-kernel, devicetree, linux-arm-kernel,
Alexandre Mergnat
Multimedia subsystem (MMsys) contains multimedia controller, Multimedia
Data Path v2.0 (MDP 2.0) and Display (DISP). The multimedia controller
includes bus fabric control, Smart Memory Interface (SMI) control,
memory access second-level arbiter, and multimedia configuration. It
plays the key role in handling different handshakings between infra
subsystem, video subsystem, image subsystem and G3D subsystem.
For more detail, ask Mediatek for the MT8365 AIoT application processor
functional specification.
Signed-off-by: Alexandre Mergnat <amergnat@baylibre.com>
---
arch/arm64/boot/dts/mediatek/mt8365.dtsi | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/arch/arm64/boot/dts/mediatek/mt8365.dtsi b/arch/arm64/boot/dts/mediatek/mt8365.dtsi
index b5f5c77f7f84..db9ab538c34d 100644
--- a/arch/arm64/boot/dts/mediatek/mt8365.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8365.dtsi
@@ -592,6 +592,12 @@ u2port1: usb-phy@1000 {
#phy-cells = <1>;
};
};
+
+ mmsys: syscon@14000000 {
+ compatible = "mediatek,mt8365-mmsys", "syscon";
+ reg = <0 0x14000000 0 0x1000>;
+ #clock-cells = <1>;
+ };
};
timer {
--
2.25.1
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: [PATCH v3 1/7] arm64: dts: mediatek: add mmsys support for mt8365 SoC
2023-04-07 9:34 ` [PATCH v3 1/7] arm64: dts: mediatek: add mmsys support for mt8365 SoC Alexandre Mergnat
@ 2023-04-11 8:26 ` AngeloGioacchino Del Regno
0 siblings, 0 replies; 12+ messages in thread
From: AngeloGioacchino Del Regno @ 2023-04-11 8:26 UTC (permalink / raw)
To: Alexandre Mergnat, Yong Wu, Krzysztof Kozlowski, Rob Herring,
Matthias Brugger, Krzysztof Kozlowski
Cc: linux-mediatek, linux-kernel, devicetree, linux-arm-kernel
Il 07/04/23 11:34, Alexandre Mergnat ha scritto:
> Multimedia subsystem (MMsys) contains multimedia controller, Multimedia
> Data Path v2.0 (MDP 2.0) and Display (DISP). The multimedia controller
> includes bus fabric control, Smart Memory Interface (SMI) control,
> memory access second-level arbiter, and multimedia configuration. It
> plays the key role in handling different handshakings between infra
> subsystem, video subsystem, image subsystem and G3D subsystem.
>
> For more detail, ask Mediatek for the MT8365 AIoT application processor
> functional specification.
>
> Signed-off-by: Alexandre Mergnat <amergnat@baylibre.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v3 2/7] arm64: dts: mediatek: add camsys support for mt8365 SoC
2023-04-07 9:34 [PATCH v3 0/7] Add IOMMU support to MT8365 SoC Alexandre Mergnat
2023-04-07 9:34 ` [PATCH v3 1/7] arm64: dts: mediatek: add mmsys support for mt8365 SoC Alexandre Mergnat
@ 2023-04-07 9:34 ` Alexandre Mergnat
2023-04-11 8:26 ` AngeloGioacchino Del Regno
2023-04-07 9:34 ` [PATCH v3 3/7] arm64: dts: mediatek: add apu " Alexandre Mergnat
` (4 subsequent siblings)
6 siblings, 1 reply; 12+ messages in thread
From: Alexandre Mergnat @ 2023-04-07 9:34 UTC (permalink / raw)
To: Yong Wu, Krzysztof Kozlowski, Rob Herring, Matthias Brugger,
AngeloGioacchino Del Regno, Krzysztof Kozlowski
Cc: linux-mediatek, linux-kernel, devicetree, linux-arm-kernel,
Alexandre Mergnat
Camera System (CamSys) incorporates an enhanced feature based image
signal processor to connect a variety of image sensor components. This
processor consists of timing generated unit (TG), lens/sensor
compensation unit and image process unit.
For more detail, ask Mediatek for the MT8365 AIoT application processor
functional specification.
Signed-off-by: Alexandre Mergnat <amergnat@baylibre.com>
---
arch/arm64/boot/dts/mediatek/mt8365.dtsi | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/arch/arm64/boot/dts/mediatek/mt8365.dtsi b/arch/arm64/boot/dts/mediatek/mt8365.dtsi
index db9ab538c34d..73cb10d296fa 100644
--- a/arch/arm64/boot/dts/mediatek/mt8365.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8365.dtsi
@@ -598,6 +598,12 @@ mmsys: syscon@14000000 {
reg = <0 0x14000000 0 0x1000>;
#clock-cells = <1>;
};
+
+ camsys: syscon@15000000 {
+ compatible = "mediatek,mt8365-imgsys", "syscon";
+ reg = <0 0x15000000 0 0x1000>;
+ #clock-cells = <1>;
+ };
};
timer {
--
2.25.1
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: [PATCH v3 2/7] arm64: dts: mediatek: add camsys support for mt8365 SoC
2023-04-07 9:34 ` [PATCH v3 2/7] arm64: dts: mediatek: add camsys " Alexandre Mergnat
@ 2023-04-11 8:26 ` AngeloGioacchino Del Regno
0 siblings, 0 replies; 12+ messages in thread
From: AngeloGioacchino Del Regno @ 2023-04-11 8:26 UTC (permalink / raw)
To: Alexandre Mergnat, Yong Wu, Krzysztof Kozlowski, Rob Herring,
Matthias Brugger, Krzysztof Kozlowski
Cc: linux-mediatek, linux-kernel, devicetree, linux-arm-kernel
Il 07/04/23 11:34, Alexandre Mergnat ha scritto:
> Camera System (CamSys) incorporates an enhanced feature based image
> signal processor to connect a variety of image sensor components. This
> processor consists of timing generated unit (TG), lens/sensor
> compensation unit and image process unit.
>
> For more detail, ask Mediatek for the MT8365 AIoT application processor
> functional specification.
>
> Signed-off-by: Alexandre Mergnat <amergnat@baylibre.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v3 3/7] arm64: dts: mediatek: add apu support for mt8365 SoC
2023-04-07 9:34 [PATCH v3 0/7] Add IOMMU support to MT8365 SoC Alexandre Mergnat
2023-04-07 9:34 ` [PATCH v3 1/7] arm64: dts: mediatek: add mmsys support for mt8365 SoC Alexandre Mergnat
2023-04-07 9:34 ` [PATCH v3 2/7] arm64: dts: mediatek: add camsys " Alexandre Mergnat
@ 2023-04-07 9:34 ` Alexandre Mergnat
2023-04-11 8:26 ` AngeloGioacchino Del Regno
2023-04-07 9:34 ` [PATCH v3 4/7] arm64: dts: mediatek: add power domain " Alexandre Mergnat
` (3 subsequent siblings)
6 siblings, 1 reply; 12+ messages in thread
From: Alexandre Mergnat @ 2023-04-07 9:34 UTC (permalink / raw)
To: Yong Wu, Krzysztof Kozlowski, Rob Herring, Matthias Brugger,
AngeloGioacchino Del Regno, Krzysztof Kozlowski
Cc: linux-mediatek, linux-kernel, devicetree, linux-arm-kernel,
Alexandre Mergnat
AI Processor Unit System (APUSYS) is a highly efficient computing unit
system which is most suitable for AI/CV algorithms. It includes one
programmable AI processor (Cadence VP6) for both AI and CV algorithms,
and an eDMA engine for data movement between external DRAM and VP6
internal memory.
For more detail, ask Mediatek for the MT8365 AIoT application processor
functional specification.
Signed-off-by: Alexandre Mergnat <amergnat@baylibre.com>
---
arch/arm64/boot/dts/mediatek/mt8365.dtsi | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/arch/arm64/boot/dts/mediatek/mt8365.dtsi b/arch/arm64/boot/dts/mediatek/mt8365.dtsi
index 73cb10d296fa..386ab8902b55 100644
--- a/arch/arm64/boot/dts/mediatek/mt8365.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8365.dtsi
@@ -604,6 +604,12 @@ camsys: syscon@15000000 {
reg = <0 0x15000000 0 0x1000>;
#clock-cells = <1>;
};
+
+ apu: syscon@19020000 {
+ compatible = "mediatek,mt8365-apu", "syscon";
+ reg = <0 0x19020000 0 0x1000>;
+ #clock-cells = <1>;
+ };
};
timer {
--
2.25.1
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: [PATCH v3 3/7] arm64: dts: mediatek: add apu support for mt8365 SoC
2023-04-07 9:34 ` [PATCH v3 3/7] arm64: dts: mediatek: add apu " Alexandre Mergnat
@ 2023-04-11 8:26 ` AngeloGioacchino Del Regno
0 siblings, 0 replies; 12+ messages in thread
From: AngeloGioacchino Del Regno @ 2023-04-11 8:26 UTC (permalink / raw)
To: Alexandre Mergnat, Yong Wu, Krzysztof Kozlowski, Rob Herring,
Matthias Brugger, Krzysztof Kozlowski
Cc: linux-mediatek, linux-kernel, devicetree, linux-arm-kernel
Il 07/04/23 11:34, Alexandre Mergnat ha scritto:
> AI Processor Unit System (APUSYS) is a highly efficient computing unit
> system which is most suitable for AI/CV algorithms. It includes one
> programmable AI processor (Cadence VP6) for both AI and CV algorithms,
> and an eDMA engine for data movement between external DRAM and VP6
> internal memory.
>
> For more detail, ask Mediatek for the MT8365 AIoT application processor
> functional specification.
>
> Signed-off-by: Alexandre Mergnat <amergnat@baylibre.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v3 4/7] arm64: dts: mediatek: add power domain support for mt8365 SoC
2023-04-07 9:34 [PATCH v3 0/7] Add IOMMU support to MT8365 SoC Alexandre Mergnat
` (2 preceding siblings ...)
2023-04-07 9:34 ` [PATCH v3 3/7] arm64: dts: mediatek: add apu " Alexandre Mergnat
@ 2023-04-07 9:34 ` Alexandre Mergnat
2023-04-11 8:26 ` AngeloGioacchino Del Regno
2023-04-07 9:34 ` [PATCH v3 5/7] arm64: dts: mediatek: add smi " Alexandre Mergnat
` (2 subsequent siblings)
6 siblings, 1 reply; 12+ messages in thread
From: Alexandre Mergnat @ 2023-04-07 9:34 UTC (permalink / raw)
To: Yong Wu, Krzysztof Kozlowski, Rob Herring, Matthias Brugger,
AngeloGioacchino Del Regno, Krzysztof Kozlowski
Cc: linux-mediatek, linux-kernel, devicetree, linux-arm-kernel,
Alexandre Mergnat
The following power domain are added to the SoC dts:
- MM (MultiMedia)
- CONN (Connectivity)
- MFG (MFlexGraphics)
- Audio
- Cam (Camera)
- DSP (Digital Signal Processor)
- Vdec (Video decoder)
- Venc (Video encoder)
- APU (AI Processor Unit)
Signed-off-by: Alexandre Mergnat <amergnat@baylibre.com>
---
arch/arm64/boot/dts/mediatek/mt8365.dtsi | 110 +++++++++++++++++++++++++++++++
1 file changed, 110 insertions(+)
diff --git a/arch/arm64/boot/dts/mediatek/mt8365.dtsi b/arch/arm64/boot/dts/mediatek/mt8365.dtsi
index 386ab8902b55..0e4fa69a2415 100644
--- a/arch/arm64/boot/dts/mediatek/mt8365.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8365.dtsi
@@ -9,6 +9,7 @@
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/phy/phy.h>
+#include <dt-bindings/power/mediatek,mt8365-power.h>
/ {
compatible = "mediatek,mt8365";
@@ -282,6 +283,115 @@ syscfg_pctl: syscfg-pctl@10005000 {
reg = <0 0x10005000 0 0x1000>;
};
+ scpsys: syscon@10006000 {
+ compatible = "mediatek,mt8365-syscfg", "syscon", "simple-mfd";
+ reg = <0 0x10006000 0 0x1000>;
+ #power-domain-cells = <1>;
+
+ /* System Power Manager */
+ spm: power-controller {
+ compatible = "mediatek,mt8365-power-controller";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ #power-domain-cells = <1>;
+
+ /* power domains of the SoC */
+ power-domain@MT8365_POWER_DOMAIN_MM {
+ reg = <MT8365_POWER_DOMAIN_MM>;
+ clocks = <&topckgen CLK_TOP_MM_SEL>,
+ <&mmsys CLK_MM_MM_SMI_COMMON>,
+ <&mmsys CLK_MM_MM_SMI_COMM0>,
+ <&mmsys CLK_MM_MM_SMI_COMM1>,
+ <&mmsys CLK_MM_MM_SMI_LARB0>;
+ clock-names = "mm", "mm-0", "mm-1",
+ "mm-2", "mm-3";
+ #power-domain-cells = <0>;
+ mediatek,infracfg = <&infracfg>;
+ mediatek,infracfg-nao = <&infracfg_nao>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ power-domain@MT8365_POWER_DOMAIN_CAM {
+ reg = <MT8365_POWER_DOMAIN_CAM>;
+ clocks = <&camsys CLK_CAM_LARB2>,
+ <&camsys CLK_CAM_SENIF>,
+ <&camsys CLK_CAMSV0>,
+ <&camsys CLK_CAMSV1>,
+ <&camsys CLK_CAM_FDVT>,
+ <&camsys CLK_CAM_WPE>;
+ clock-names = "cam-0", "cam-1",
+ "cam-2", "cam-3",
+ "cam-4", "cam-5";
+ #power-domain-cells = <0>;
+ mediatek,infracfg = <&infracfg>;
+ };
+
+ power-domain@MT8365_POWER_DOMAIN_VDEC {
+ reg = <MT8365_POWER_DOMAIN_VDEC>;
+ #power-domain-cells = <0>;
+ };
+
+ power-domain@MT8365_POWER_DOMAIN_VENC {
+ reg = <MT8365_POWER_DOMAIN_VENC>;
+ #power-domain-cells = <0>;
+ };
+
+ power-domain@MT8365_POWER_DOMAIN_APU {
+ reg = <MT8365_POWER_DOMAIN_APU>;
+ clocks = <&infracfg CLK_IFR_APU_AXI>,
+ <&apu CLK_APU_IPU_CK>,
+ <&apu CLK_APU_AXI>,
+ <&apu CLK_APU_JTAG>,
+ <&apu CLK_APU_IF_CK>,
+ <&apu CLK_APU_EDMA>,
+ <&apu CLK_APU_AHB>;
+ clock-names = "apu", "apu-0",
+ "apu-1", "apu-2",
+ "apu-3", "apu-4",
+ "apu-5";
+ #power-domain-cells = <0>;
+ mediatek,infracfg = <&infracfg>;
+ };
+ };
+
+ power-domain@MT8365_POWER_DOMAIN_CONN {
+ reg = <MT8365_POWER_DOMAIN_CONN>;
+ clocks = <&topckgen CLK_TOP_CONN_32K>,
+ <&topckgen CLK_TOP_CONN_26M>;
+ clock-names = "conn", "conn1";
+ #power-domain-cells = <0>;
+ mediatek,infracfg = <&infracfg>;
+ };
+
+ power-domain@MT8365_POWER_DOMAIN_MFG {
+ reg = <MT8365_POWER_DOMAIN_MFG>;
+ clocks = <&topckgen CLK_TOP_MFG_SEL>;
+ clock-names = "mfg";
+ #power-domain-cells = <0>;
+ mediatek,infracfg = <&infracfg>;
+ };
+
+ power-domain@MT8365_POWER_DOMAIN_AUDIO {
+ reg = <MT8365_POWER_DOMAIN_AUDIO>;
+ clocks = <&topckgen CLK_TOP_AUD_INTBUS_SEL>,
+ <&infracfg CLK_IFR_AUDIO>,
+ <&infracfg CLK_IFR_AUD_26M_BK>;
+ clock-names = "audio", "audio1", "audio2";
+ #power-domain-cells = <0>;
+ mediatek,infracfg = <&infracfg>;
+ };
+
+ power-domain@MT8365_POWER_DOMAIN_DSP {
+ reg = <MT8365_POWER_DOMAIN_DSP>;
+ clocks = <&topckgen CLK_TOP_DSP_SEL>,
+ <&topckgen CLK_TOP_DSP_26M>;
+ clock-names = "dsp", "dsp1";
+ #power-domain-cells = <0>;
+ mediatek,infracfg = <&infracfg>;
+ };
+ };
+ };
+
watchdog: watchdog@10007000 {
compatible = "mediatek,mt8365-wdt",
"mediatek,mt6589-wdt";
--
2.25.1
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: [PATCH v3 4/7] arm64: dts: mediatek: add power domain support for mt8365 SoC
2023-04-07 9:34 ` [PATCH v3 4/7] arm64: dts: mediatek: add power domain " Alexandre Mergnat
@ 2023-04-11 8:26 ` AngeloGioacchino Del Regno
0 siblings, 0 replies; 12+ messages in thread
From: AngeloGioacchino Del Regno @ 2023-04-11 8:26 UTC (permalink / raw)
To: Alexandre Mergnat, Yong Wu, Krzysztof Kozlowski, Rob Herring,
Matthias Brugger, Krzysztof Kozlowski
Cc: linux-mediatek, linux-kernel, devicetree, linux-arm-kernel
Il 07/04/23 11:34, Alexandre Mergnat ha scritto:
> The following power domain are added to the SoC dts:
> - MM (MultiMedia)
> - CONN (Connectivity)
> - MFG (MFlexGraphics)
> - Audio
> - Cam (Camera)
> - DSP (Digital Signal Processor)
> - Vdec (Video decoder)
> - Venc (Video encoder)
> - APU (AI Processor Unit)
>
> Signed-off-by: Alexandre Mergnat <amergnat@baylibre.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v3 5/7] arm64: dts: mediatek: add smi support for mt8365 SoC
2023-04-07 9:34 [PATCH v3 0/7] Add IOMMU support to MT8365 SoC Alexandre Mergnat
` (3 preceding siblings ...)
2023-04-07 9:34 ` [PATCH v3 4/7] arm64: dts: mediatek: add power domain " Alexandre Mergnat
@ 2023-04-07 9:34 ` Alexandre Mergnat
2023-04-07 9:34 ` [PATCH v3 6/7] arm64: dts: mediatek: add larb " Alexandre Mergnat
2023-04-07 9:34 ` [PATCH v3 7/7] arm64: dts: mediatek: add iommu " Alexandre Mergnat
6 siblings, 0 replies; 12+ messages in thread
From: Alexandre Mergnat @ 2023-04-07 9:34 UTC (permalink / raw)
To: Yong Wu, Krzysztof Kozlowski, Rob Herring, Matthias Brugger,
AngeloGioacchino Del Regno, Krzysztof Kozlowski
Cc: linux-mediatek, linux-kernel, devicetree, linux-arm-kernel,
Alexandre Mergnat
Smart Multimedia Interface (SMI) local arbiter does the arbitration for
memory requests from multi-media engines. Add SMI in the MT8365 DTS will
allow to add local ARBiter (LARB), use by IOMMU.
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Alexandre Mergnat <amergnat@baylibre.com>
---
arch/arm64/boot/dts/mediatek/mt8365.dtsi | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/arch/arm64/boot/dts/mediatek/mt8365.dtsi b/arch/arm64/boot/dts/mediatek/mt8365.dtsi
index 0e4fa69a2415..70915beb513c 100644
--- a/arch/arm64/boot/dts/mediatek/mt8365.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8365.dtsi
@@ -324,16 +324,19 @@ power-domain@MT8365_POWER_DOMAIN_CAM {
"cam-4", "cam-5";
#power-domain-cells = <0>;
mediatek,infracfg = <&infracfg>;
+ mediatek,smi = <&smi_common>;
};
power-domain@MT8365_POWER_DOMAIN_VDEC {
reg = <MT8365_POWER_DOMAIN_VDEC>;
#power-domain-cells = <0>;
+ mediatek,smi = <&smi_common>;
};
power-domain@MT8365_POWER_DOMAIN_VENC {
reg = <MT8365_POWER_DOMAIN_VENC>;
#power-domain-cells = <0>;
+ mediatek,smi = <&smi_common>;
};
power-domain@MT8365_POWER_DOMAIN_APU {
@@ -351,6 +354,7 @@ power-domain@MT8365_POWER_DOMAIN_APU {
"apu-5";
#power-domain-cells = <0>;
mediatek,infracfg = <&infracfg>;
+ mediatek,smi = <&smi_common>;
};
};
@@ -709,6 +713,17 @@ mmsys: syscon@14000000 {
#clock-cells = <1>;
};
+ smi_common: smi@14002000 {
+ compatible = "mediatek,mt8365-smi-common";
+ reg = <0 0x14002000 0 0x1000>;
+ clocks = <&mmsys CLK_MM_MM_SMI_COMMON>,
+ <&mmsys CLK_MM_MM_SMI_COMMON>,
+ <&mmsys CLK_MM_MM_SMI_COMM0>,
+ <&mmsys CLK_MM_MM_SMI_COMM1>;
+ clock-names = "apb", "smi", "gals0", "gals1";
+ power-domains = <&spm MT8365_POWER_DOMAIN_MM>;
+ };
+
camsys: syscon@15000000 {
compatible = "mediatek,mt8365-imgsys", "syscon";
reg = <0 0x15000000 0 0x1000>;
--
2.25.1
^ permalink raw reply [flat|nested] 12+ messages in thread* [PATCH v3 6/7] arm64: dts: mediatek: add larb support for mt8365 SoC
2023-04-07 9:34 [PATCH v3 0/7] Add IOMMU support to MT8365 SoC Alexandre Mergnat
` (4 preceding siblings ...)
2023-04-07 9:34 ` [PATCH v3 5/7] arm64: dts: mediatek: add smi " Alexandre Mergnat
@ 2023-04-07 9:34 ` Alexandre Mergnat
2023-04-07 9:34 ` [PATCH v3 7/7] arm64: dts: mediatek: add iommu " Alexandre Mergnat
6 siblings, 0 replies; 12+ messages in thread
From: Alexandre Mergnat @ 2023-04-07 9:34 UTC (permalink / raw)
To: Yong Wu, Krzysztof Kozlowski, Rob Herring, Matthias Brugger,
AngeloGioacchino Del Regno, Krzysztof Kozlowski
Cc: linux-mediatek, linux-kernel, devicetree, linux-arm-kernel,
Alexandre Mergnat
Local arbiter (LARB) is a component of Smart Multimedia Interface (SMI),
used to help the memory management (IOMMU).
This patch add 4 LARBs and 2 clocks for the larb1 and larb3 support.
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Alexandre Mergnat <amergnat@baylibre.com>
---
arch/arm64/boot/dts/mediatek/mt8365.dtsi | 59 ++++++++++++++++++++++++++++++++
1 file changed, 59 insertions(+)
diff --git a/arch/arm64/boot/dts/mediatek/mt8365.dtsi b/arch/arm64/boot/dts/mediatek/mt8365.dtsi
index 70915beb513c..07a7267f338e 100644
--- a/arch/arm64/boot/dts/mediatek/mt8365.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8365.dtsi
@@ -724,12 +724,71 @@ smi_common: smi@14002000 {
power-domains = <&spm MT8365_POWER_DOMAIN_MM>;
};
+ larb0: larb@14003000 {
+ compatible = "mediatek,mt8365-smi-larb",
+ "mediatek,mt8186-smi-larb";
+ reg = <0 0x14003000 0 0x1000>;
+ mediatek,smi = <&smi_common>;
+ clocks = <&mmsys CLK_MM_MM_SMI_LARB0>,
+ <&mmsys CLK_MM_MM_SMI_LARB0>;
+ clock-names = "apb", "smi";
+ power-domains = <&spm MT8365_POWER_DOMAIN_MM>;
+ mediatek,larb-id = <0>;
+ };
+
camsys: syscon@15000000 {
compatible = "mediatek,mt8365-imgsys", "syscon";
reg = <0 0x15000000 0 0x1000>;
#clock-cells = <1>;
};
+ larb2: larb@15001000 {
+ compatible = "mediatek,mt8365-smi-larb",
+ "mediatek,mt8186-smi-larb";
+ reg = <0 0x15001000 0 0x1000>;
+ mediatek,smi = <&smi_common>;
+ clocks = <&mmsys CLK_MM_MM_SMI_IMG>,
+ <&camsys CLK_CAM_LARB2>;
+ clock-names = "apb", "smi";
+ power-domains = <&spm MT8365_POWER_DOMAIN_CAM>;
+ mediatek,larb-id = <2>;
+ };
+
+ vdecsys: syscon@16000000 {
+ compatible = "mediatek,mt8365-vdecsys", "syscon";
+ reg = <0 0x16000000 0 0x1000>;
+ #clock-cells = <1>;
+ };
+
+ larb3: larb@16010000 {
+ compatible = "mediatek,mt8365-smi-larb",
+ "mediatek,mt8186-smi-larb";
+ reg = <0 0x16010000 0 0x1000>;
+ mediatek,smi = <&smi_common>;
+ clocks = <&vdecsys CLK_VDEC_LARB1>,
+ <&vdecsys CLK_VDEC_LARB1>;
+ clock-names = "apb", "smi";
+ power-domains = <&spm MT8365_POWER_DOMAIN_VDEC>;
+ mediatek,larb-id = <3>;
+ };
+
+ vencsys: syscon@17000000 {
+ compatible = "mediatek,mt8365-vencsys", "syscon";
+ reg = <0 0x17000000 0 0x1000>;
+ #clock-cells = <1>;
+ };
+
+ larb1: larb@17010000 {
+ compatible = "mediatek,mt8365-smi-larb",
+ "mediatek,mt8186-smi-larb";
+ reg = <0 0x17010000 0 0x1000>;
+ mediatek,smi = <&smi_common>;
+ clocks = <&vencsys CLK_VENC>, <&vencsys CLK_VENC>;
+ clock-names = "apb", "smi";
+ power-domains = <&spm MT8365_POWER_DOMAIN_VENC>;
+ mediatek,larb-id = <1>;
+ };
+
apu: syscon@19020000 {
compatible = "mediatek,mt8365-apu", "syscon";
reg = <0 0x19020000 0 0x1000>;
--
2.25.1
^ permalink raw reply [flat|nested] 12+ messages in thread* [PATCH v3 7/7] arm64: dts: mediatek: add iommu support for mt8365 SoC
2023-04-07 9:34 [PATCH v3 0/7] Add IOMMU support to MT8365 SoC Alexandre Mergnat
` (5 preceding siblings ...)
2023-04-07 9:34 ` [PATCH v3 6/7] arm64: dts: mediatek: add larb " Alexandre Mergnat
@ 2023-04-07 9:34 ` Alexandre Mergnat
6 siblings, 0 replies; 12+ messages in thread
From: Alexandre Mergnat @ 2023-04-07 9:34 UTC (permalink / raw)
To: Yong Wu, Krzysztof Kozlowski, Rob Herring, Matthias Brugger,
AngeloGioacchino Del Regno, Krzysztof Kozlowski
Cc: linux-mediatek, linux-kernel, devicetree, linux-arm-kernel,
Alexandre Mergnat
Add iommu support in the SoC DTS using the 4 local arbiters (LARBs)
Reviewed-by: Yong Wu <yong.wu@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Alexandre Mergnat <amergnat@baylibre.com>
---
arch/arm64/boot/dts/mediatek/mt8365.dtsi | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/arch/arm64/boot/dts/mediatek/mt8365.dtsi b/arch/arm64/boot/dts/mediatek/mt8365.dtsi
index 07a7267f338e..6260744f4be5 100644
--- a/arch/arm64/boot/dts/mediatek/mt8365.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8365.dtsi
@@ -456,6 +456,14 @@ sysirq: interrupt-controller@10200a80 {
reg = <0 0x10200a80 0 0x20>;
};
+ iommu: iommu@10205000 {
+ compatible = "mediatek,mt8365-m4u";
+ reg = <0 0x10205000 0 0x1000>;
+ interrupts = <GIC_SPI 102 IRQ_TYPE_LEVEL_LOW>;
+ mediatek,larbs = <&larb0>, <&larb1>, <&larb2>, <&larb3>;
+ #iommu-cells = <1>;
+ };
+
infracfg_nao: infracfg@1020e000 {
compatible = "mediatek,mt8365-infracfg", "syscon";
reg = <0 0x1020e000 0 0x1000>;
--
2.25.1
^ permalink raw reply [flat|nested] 12+ messages in thread