Subject: [PATCH 0/5] MediaTek: Update MAINTAINERS and dts fixes for v6.7

Hello SoC maintainers,

As suggested by Arnd in [1], I am sending an update to the MAINTAINERS
file, adding myself to the MediaTek SoC maintainers, and some urgent
bugfixes for MediaTek devicetrees.

mt6358 PMIC
- Bogus property dropped

mt7622/mt7986a
- Fix dtbs_check for t-phy nodes

mt8195:
- Fix early boot failure when DSU PMU enabled
- Fix memory layout for demo board

Regards,
Angelo

---
AngeloGioacchino Del Regno (1):
MAINTAINERS: Add Angelo as MediaTek SoC co-maintainer

Eugen Hristev (1):
arm64: dts: mediatek: fix t-phy unit name

Macpaul Lin (2):
arm64: dts: mediatek: mt8195-demo: fix the memory size to 8GB
arm64: dts: mediatek: mt8195-demo: update and reorder reserved memory regions

Nícolas F. R. A. Prado (1):
arm64: dts: mediatek: mt8195: Set DSU PMU status to fail

MAINTAINERS | 2 +-
arch/arm64/boot/dts/mediatek/mt7622.dtsi | 2 +-
arch/arm64/boot/dts/mediatek/mt7986a.dtsi | 2 +-
arch/arm64/boot/dts/mediatek/mt8195-demo.dts | 39 ++++++++++++++++++++++------
arch/arm64/boot/dts/mediatek/mt8195.dtsi | 1 +
5 files changed, 35 insertions(+), 11 deletions(-)
---
base-commit: 0bb80ecc33a8fb5a682236443c1e740d5c917d1d
change-id: 20231003-mediatek-fixes-v6-7-341b5cfdc07a

Best regards,
--
AngeloGioacchino Del Regno <[email protected]>


Subject: [PATCH 2/5] arm64: dts: mediatek: mt8195-demo: fix the memory size to 8GB

From: Macpaul Lin <[email protected]>

The onboard dram of mt8195-demo board is 8GB.

Cc: [email protected] # 6.1, 6.4, 6.5
Fixes: 6147314aeedc ("arm64: dts: mediatek: Add device-tree for MT8195 Demo board")
Signed-off-by: Macpaul Lin <[email protected]>
Reviewed-by: AngeloGioacchino Del Regno <[email protected]>
Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
---
arch/arm64/boot/dts/mediatek/mt8195-demo.dts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/mediatek/mt8195-demo.dts b/arch/arm64/boot/dts/mediatek/mt8195-demo.dts
index b2485ddfd33b..ff363ab925e9 100644
--- a/arch/arm64/boot/dts/mediatek/mt8195-demo.dts
+++ b/arch/arm64/boot/dts/mediatek/mt8195-demo.dts
@@ -48,7 +48,7 @@ key-0 {

memory@40000000 {
device_type = "memory";
- reg = <0 0x40000000 0 0x80000000>;
+ reg = <0 0x40000000 0x2 0x00000000>;
};

reserved-memory {

--
2.42.0

Subject: [PATCH 5/5] arm64: dts: mediatek: mt8195: Set DSU PMU status to fail

From: "Nícolas F. R. A. Prado" <[email protected]>

The DSU PMU allows monitoring performance events in the DSU cluster,
which is done by configuring and reading back values from the DSU PMU
system registers. However, for write-access to be allowed by ELs lower
than EL3, the EL3 firmware needs to update the setting on the ACTLR3_EL3
register, as it is disallowed by default.

That configuration is not done on the firmware used by the MT8195 SoC,
as a consequence, booting a MT8195-based machine like
mt8195-cherry-tomato-r2 with CONFIG_ARM_DSU_PMU enabled hangs the kernel
just as it writes to the CLUSTERPMOVSCLR_EL1 register, since the
instruction faults to EL3, and BL31 apparently just re-runs the
instruction over and over.

Mark the DSU PMU node in the Devicetree with status "fail", as the
machine doesn't have a suitable firmware to make use of it from the
kernel, and allowing its driver to probe would hang the kernel.

Fixes: 37f2582883be ("arm64: dts: Add mediatek SoC mt8195 and evaluation board")
Signed-off-by: Nícolas F. R. A. Prado <[email protected]>
Reviewed-by: AngeloGioacchino Del Regno <[email protected]>
Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
---
arch/arm64/boot/dts/mediatek/mt8195.dtsi | 1 +
1 file changed, 1 insertion(+)

diff --git a/arch/arm64/boot/dts/mediatek/mt8195.dtsi b/arch/arm64/boot/dts/mediatek/mt8195.dtsi
index 4dbbf8fdab75..43011bc41da7 100644
--- a/arch/arm64/boot/dts/mediatek/mt8195.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8195.dtsi
@@ -313,6 +313,7 @@ dsu-pmu {
interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH 0>;
cpus = <&cpu0>, <&cpu1>, <&cpu2>, <&cpu3>,
<&cpu4>, <&cpu5>, <&cpu6>, <&cpu7>;
+ status = "fail";
};

dmic_codec: dmic-codec {

--
2.42.0

Subject: [PATCH 4/5] arm64: dts: mediatek: fix t-phy unit name

From: Eugen Hristev <[email protected]>

dtbs_check throws a warning at t-phy nodes:
Warning (unit_address_vs_reg): /t-phy@1a243000: node has a unit name, but no reg or ranges property
Warning (unit_address_vs_reg): /soc/t-phy@11c00000: node has a unit name, but no reg or ranges property

The ranges is empty thus removing the `@1a243000`, `@11c00000` from
the node name.

Fixes: 6029cae696c8 ("arm64: dts: mediatek: mt7622: harmonize node names and compatibles")
Fixes: 918aed7abd2d ("arm64: dts: mt7986: add pcie related device nodes")
Signed-off-by: Eugen Hristev <[email protected]>
Reviewed-by: AngeloGioacchino Del Regno <[email protected]>
Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
---
arch/arm64/boot/dts/mediatek/mt7622.dtsi | 2 +-
arch/arm64/boot/dts/mediatek/mt7986a.dtsi | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/mediatek/mt7622.dtsi b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
index 36ef2dbe8add..3ee9266fa8e9 100644
--- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
@@ -905,7 +905,7 @@ sata: sata@1a200000 {
status = "disabled";
};

- sata_phy: t-phy@1a243000 {
+ sata_phy: t-phy {
compatible = "mediatek,mt7622-tphy",
"mediatek,generic-tphy-v1";
#address-cells = <2>;
diff --git a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi
index 68539ea788df..24eda00e320d 100644
--- a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi
@@ -434,7 +434,7 @@ pcie_intc: interrupt-controller {
};
};

- pcie_phy: t-phy@11c00000 {
+ pcie_phy: t-phy {
compatible = "mediatek,mt7986-tphy",
"mediatek,generic-tphy-v2";
#address-cells = <2>;

--
2.42.0

Subject: [PATCH 1/5] MAINTAINERS: Add Angelo as MediaTek SoC co-maintainer

I am a top reviewer mainly for MediaTek SoC related patches in most
subsystems and I've also been upstreaming both improvements, fixes
and new drivers and devicetrees when required.

The MediaTek scene saw a generous increase in number of patches that
are sent to the lists every week, increasing the amount of required
efforts to maintain the MTK bits overall, and we will possibly see
even more of that.

For this reason, and also because of suggestions and encouragement
coming from the community, I'm stepping up to be a co-maintainer of
MediaTek SoCs support.

Acked-by: Matthias Brugger <[email protected]>
Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
---
MAINTAINERS | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index 90f13281d297..57f82fcea1e7 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -2327,7 +2327,7 @@ F: drivers/rtc/rtc-mt7622.c

ARM/Mediatek SoC support
M: Matthias Brugger <[email protected]>
-R: AngeloGioacchino Del Regno <[email protected]>
+M: AngeloGioacchino Del Regno <[email protected]>
L: [email protected]
L: [email protected] (moderated for non-subscribers)
L: [email protected] (moderated for non-subscribers)

--
2.42.0

Subject: [PATCH 3/5] arm64: dts: mediatek: mt8195-demo: update and reorder reserved memory regions

From: Macpaul Lin <[email protected]>

The dts file of the MediaTek MT8195 demo board has been updated to include
new reserved memory regions.
These reserved memory regions are:
- SCP
- VPU,
- Sound DMA
- APU.

These regions are defined with the "shared-dma-pool" compatible property.
In addition, the existing reserved memory regions have been reordered by
their addresses to improve readability and maintainability of the DTS
file.

Cc: [email protected] # 6.1, 6.4, 6.5
Fixes: e4a417520101 ("arm64: dts: mediatek: mt8195-demo: fix the memory size of node secmon")
Signed-off-by: Macpaul Lin <[email protected]>
Reviewed-by: AngeloGioacchino Del Regno <[email protected]>
Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
---
arch/arm64/boot/dts/mediatek/mt8195-demo.dts | 37 ++++++++++++++++++++++------
1 file changed, 30 insertions(+), 7 deletions(-)

diff --git a/arch/arm64/boot/dts/mediatek/mt8195-demo.dts b/arch/arm64/boot/dts/mediatek/mt8195-demo.dts
index ff363ab925e9..5d635085fe3f 100644
--- a/arch/arm64/boot/dts/mediatek/mt8195-demo.dts
+++ b/arch/arm64/boot/dts/mediatek/mt8195-demo.dts
@@ -56,13 +56,8 @@ reserved-memory {
#size-cells = <2>;
ranges;

- /* 2 MiB reserved for ARM Trusted Firmware (BL31) */
- bl31_secmon_reserved: secmon@54600000 {
- no-map;
- reg = <0 0x54600000 0x0 0x200000>;
- };
-
- /* 12 MiB reserved for OP-TEE (BL32)
+ /*
+ * 12 MiB reserved for OP-TEE (BL32)
* +-----------------------+ 0x43e0_0000
* | SHMEM 2MiB |
* +-----------------------+ 0x43c0_0000
@@ -75,6 +70,34 @@ optee_reserved: optee@43200000 {
no-map;
reg = <0 0x43200000 0 0x00c00000>;
};
+
+ scp_mem: memory@50000000 {
+ compatible = "shared-dma-pool";
+ reg = <0 0x50000000 0 0x2900000>;
+ no-map;
+ };
+
+ vpu_mem: memory@53000000 {
+ compatible = "shared-dma-pool";
+ reg = <0 0x53000000 0 0x1400000>; /* 20 MB */
+ };
+
+ /* 2 MiB reserved for ARM Trusted Firmware (BL31) */
+ bl31_secmon_mem: memory@54600000 {
+ no-map;
+ reg = <0 0x54600000 0x0 0x200000>;
+ };
+
+ snd_dma_mem: memory@60000000 {
+ compatible = "shared-dma-pool";
+ reg = <0 0x60000000 0 0x1100000>;
+ no-map;
+ };
+
+ apu_mem: memory@62000000 {
+ compatible = "shared-dma-pool";
+ reg = <0 0x62000000 0 0x1400000>; /* 20 MB */
+ };
};
};


--
2.42.0

Subject: Re: [PATCH 0/5] MediaTek: Update MAINTAINERS and dts fixes for v6.7

Il 03/10/23 13:13, AngeloGioacchino Del Regno ha scritto:
> Hello SoC maintainers,
>
> As suggested by Arnd in [1], I am sending an update to the MAINTAINERS
> file, adding myself to the MediaTek SoC maintainers, and some urgent
> bugfixes for MediaTek devicetrees.
>

Forgot to add....

[1]: https://lore.kernel.org/all/[email protected]/

...so doing that as a reply to this cover letter; sorry for the miss.

Cheers!

> mt6358 PMIC
> - Bogus property dropped
>
> mt7622/mt7986a
> - Fix dtbs_check for t-phy nodes
>
> mt8195:
> - Fix early boot failure when DSU PMU enabled
> - Fix memory layout for demo board
>
> Regards,
> Angelo
>
> ---
> AngeloGioacchino Del Regno (1):
> MAINTAINERS: Add Angelo as MediaTek SoC co-maintainer
>
> Eugen Hristev (1):
> arm64: dts: mediatek: fix t-phy unit name
>
> Macpaul Lin (2):
> arm64: dts: mediatek: mt8195-demo: fix the memory size to 8GB
> arm64: dts: mediatek: mt8195-demo: update and reorder reserved memory regions
>
> Nícolas F. R. A. Prado (1):
> arm64: dts: mediatek: mt8195: Set DSU PMU status to fail
>
> MAINTAINERS | 2 +-
> arch/arm64/boot/dts/mediatek/mt7622.dtsi | 2 +-
> arch/arm64/boot/dts/mediatek/mt7986a.dtsi | 2 +-
> arch/arm64/boot/dts/mediatek/mt8195-demo.dts | 39 ++++++++++++++++++++++------
> arch/arm64/boot/dts/mediatek/mt8195.dtsi | 1 +
> 5 files changed, 35 insertions(+), 11 deletions(-)
> ---
> base-commit: 0bb80ecc33a8fb5a682236443c1e740d5c917d1d
> change-id: 20231003-mediatek-fixes-v6-7-341b5cfdc07a
>
> Best regards,

Subject: Re: [PATCH 0/5] MediaTek: Update MAINTAINERS and dts fixes for v6.7

Il 03/10/23 14:45, Sasha Levin ha scritto:
> On Tue, Oct 03, 2023 at 01:13:42PM +0200, AngeloGioacchino Del Regno wrote:
>> Hello SoC maintainers,
>>
>> As suggested by Arnd in [1], I am sending an update to the MAINTAINERS
>> file, adding myself to the MediaTek SoC maintainers, and some urgent
>> bugfixes for MediaTek devicetrees.
>
> Just curious: if it's urgent, and there are patches cc'ed to stable, why
> wait for 6.7 rather than one of the 6.6 -rc cycles?
>

I may have misunderstood what Arnd said - in that case, I'm sorry.
As for the fixes, I would be happier if those could land in v6.6-rcX.

Regards,
Angelo

2023-10-03 15:21:36

by Mathieu Poirier

[permalink] [raw]
Subject: Re: [PATCH 1/5] MAINTAINERS: Add Angelo as MediaTek SoC co-maintainer

On Tue, Oct 03, 2023 at 01:13:43PM +0200, AngeloGioacchino Del Regno wrote:
> I am a top reviewer mainly for MediaTek SoC related patches in most
> subsystems and I've also been upstreaming both improvements, fixes
> and new drivers and devicetrees when required.
>
> The MediaTek scene saw a generous increase in number of patches that
> are sent to the lists every week, increasing the amount of required
> efforts to maintain the MTK bits overall, and we will possibly see
> even more of that.
>
> For this reason, and also because of suggestions and encouragement
> coming from the community, I'm stepping up to be a co-maintainer of
> MediaTek SoCs support.
>
> Acked-by: Matthias Brugger <[email protected]>
> Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
> Link: https://lore.kernel.org/r/[email protected]
> ---
> MAINTAINERS | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 90f13281d297..57f82fcea1e7 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -2327,7 +2327,7 @@ F: drivers/rtc/rtc-mt7622.c
>
> ARM/Mediatek SoC support
> M: Matthias Brugger <[email protected]>
> -R: AngeloGioacchino Del Regno <[email protected]>
> +M: AngeloGioacchino Del Regno <[email protected]>

Acked-by: Mathieu Poirier <[email protected]>

> L: [email protected]
> L: [email protected] (moderated for non-subscribers)
> L: [email protected] (moderated for non-subscribers)
>
> --
> 2.42.0
>
>