[RFC 12/13] arm64: dts: mt8192: Add apu tinysys

Flora Fu posted 13 patches 2 years, 11 months ago
[RFC 12/13] arm64: dts: mt8192: Add apu tinysys
Posted by Flora Fu 2 years, 11 months ago
Add node for APU tinysys.

Signed-off-by: Flora Fu <flora.fu@mediatek.com>
---
 arch/arm64/boot/dts/mediatek/mt8192.dtsi | 36 ++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/arch/arm64/boot/dts/mediatek/mt8192.dtsi b/arch/arm64/boot/dts/mediatek/mt8192.dtsi
index c505c6926839..8108084a3f6f 100644
--- a/arch/arm64/boot/dts/mediatek/mt8192.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8192.dtsi
@@ -925,6 +925,42 @@
 			#iommu-cells = <1>;
 		};
 
+		apusys_rv@19001000 {
+			compatible = "mediatek,mt8192-apusys-rv";
+			reg = <0 0x19000000 0 0x1000>,
+			      <0 0x19001000 0 0x1000>,
+			      <0 0x19002000 0 0x10>;
+			reg-names = "apu_mbox",
+				    "md32_sysctrl",
+				    "apu_wdt";
+			mediatek,apusys-power = <&apusys_power>;
+			power-domains = <&apuspm 0>;
+			iommus = <&iommu_apu IOMMU_PORT_APU_DATA>;
+			interrupts = <GIC_SPI 393 IRQ_TYPE_LEVEL_HIGH 0>,
+				     <GIC_SPI 404 IRQ_TYPE_LEVEL_HIGH 0>;
+			interrupt-names = "apu_wdt",
+					  "mbox0_irq";
+			apu_ctrl {
+				compatible = "mediatek,apu-ctrl-rpmsg";
+				mtk,rpmsg-name = "apu-ctrl-rpmsg";
+			};
+
+			apu_pwr_tx {
+				compatible = "mediatek,apupwr-tx-rpmsg";
+				mtk,rpmsg-name = "apupwr-tx-rpmsg";
+			};
+
+			apu_pwr_rx {
+				compatible = "mediatek,apupwr-rx-rpmsg";
+				mtk,rpmsg-name = "apupwr-rx-rpmsg";
+			};
+
+			apu_mdw_rpmsg {
+				compatible = "mediatek,apu-mdw-rpmsg";
+				mtk,rpmsg-name = "apu-mdw-rpmsg";
+			};
+		};
+
 		apu_conn: apu_conn@19020000 {
 			compatible = "mediatek,mt8192-apu-conn", "syscon";
 			reg = <0 0x19020000 0 0x1000>;
-- 
2.18.0

Re: [RFC 12/13] arm64: dts: mt8192: Add apu tinysys
Posted by AngeloGioacchino Del Regno 2 years, 11 months ago
Il 23/10/21 13:14, Flora Fu ha scritto:
> Add node for APU tinysys.
> 
> Signed-off-by: Flora Fu <flora.fu@mediatek.com>
> ---
>   arch/arm64/boot/dts/mediatek/mt8192.dtsi | 36 ++++++++++++++++++++++++
>   1 file changed, 36 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/mediatek/mt8192.dtsi b/arch/arm64/boot/dts/mediatek/mt8192.dtsi
> index c505c6926839..8108084a3f6f 100644
> --- a/arch/arm64/boot/dts/mediatek/mt8192.dtsi
> +++ b/arch/arm64/boot/dts/mediatek/mt8192.dtsi
> @@ -925,6 +925,42 @@
>   			#iommu-cells = <1>;
>   		};
>   
> +		apusys_rv@19001000 {
> +			compatible = "mediatek,mt8192-apusys-rv";
> +			reg = <0 0x19000000 0 0x1000>,
> +			      <0 0x19001000 0 0x1000>,
> +			      <0 0x19002000 0 0x10>;
> +			reg-names = "apu_mbox",
> +				    "md32_sysctrl",
> +				    "apu_wdt";
> +			mediatek,apusys-power = <&apusys_power>;

As said on the IOMMU commit, I think that apusys-power can be passed as a
power domain here as well... also keeping in mind that the apuspm power
domain is being used in both the IOMMU and in apusys-power already, so you
could even pass only the apusys-power pd here, because apuspm would be
already being turned on by the former...

...unless there's any possibility to have some functionality with apuspm up
but apusys-power down? From how it looks right now, that's not a thing.

> +			power-domains = <&apuspm 0>;
> +			iommus = <&iommu_apu IOMMU_PORT_APU_DATA>;
> +			interrupts = <GIC_SPI 393 IRQ_TYPE_LEVEL_HIGH 0>,
> +				     <GIC_SPI 404 IRQ_TYPE_LEVEL_HIGH 0>;
> +			interrupt-names = "apu_wdt",
> +					  "mbox0_irq";
> +			apu_ctrl {
> +				compatible = "mediatek,apu-ctrl-rpmsg";
> +				mtk,rpmsg-name = "apu-ctrl-rpmsg";

This is supposed to be "mediatek,rpmsg-name" instead... or it won't work.

> +			};
> +
> +			apu_pwr_tx {
> +				compatible = "mediatek,apupwr-tx-rpmsg";
> +				mtk,rpmsg-name = "apupwr-tx-rpmsg";
> +			};
> +
> +			apu_pwr_rx {
> +				compatible = "mediatek,apupwr-rx-rpmsg";
> +				mtk,rpmsg-name = "apupwr-rx-rpmsg";
> +			};
> +
> +			apu_mdw_rpmsg {
> +				compatible = "mediatek,apu-mdw-rpmsg";
> +				mtk,rpmsg-name = "apu-mdw-rpmsg";
> +			};
> +		};
> +
>   		apu_conn: apu_conn@19020000 {
>   			compatible = "mediatek,mt8192-apu-conn", "syscon";
>   			reg = <0 0x19020000 0 0x1000>;
>