Skip to contentSkip to conversation

Add basic node support for MediaTek MT8188 SoC

PATCH Superseded Jason-ch Chen 2 participants 13 messages Jul 17, 2023 – Jul 18, 2023

Subsystems (2)

v3 of 6 Superseded Latest is v6 →

lore
Share & tools
lore
#0 lore raw

v3 cover Add basic node support for MediaTek MT8188 SoC

From: jason-ch chen <[email protected]>

MT8188 is a SoC based on 64bit ARMv8 architecture. It contains 6 CA55 and 2 CA78 cores. MT8188 share many HW IP with MT65xx series.

This patchset was tested on MT8188 evaluation board to shell.

Based on tag: next-20230717, linux-next/master

Changes in v3:
- Remove the duplicated part of mt8188 in the pwrap yaml file
- Fix reviewer's comments about coding style

Changes in v2:
- Add MT8188 PMIC Wrapper compatible to binding document
- Fix reviewer's comments

jason-ch chen (4):
dt-bindings: arm: Add compatible for MediaTek MT8188
dt-bindings: arm: mediatek: Add mt8188 pericfg compatible
dt-bindings: soc: mediatek: pwrap: Add compatible for MT8188
arm64: dts: Add MediaTek MT8188 dts and evaluation board and Makefile

 .../devicetree/bindings/arm/mediatek.yaml     |   4 +
 .../arm/mediatek/mediatek,pericfg.yaml        |   1 +
 .../bindings/soc/mediatek/mediatek,pwrap.yaml |   6 +-
 arch/arm64/boot/dts/mediatek/Makefile         |   1 +
 arch/arm64/boot/dts/mediatek/mt8188-evb.dts   | 401 ++++++++
 arch/arm64/boot/dts/mediatek/mt8188.dtsi      | 951 ++++++++++++++++++
 6 files changed, 1363 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm64/boot/dts/mediatek/mt8188-evb.dts
 create mode 100644 arch/arm64/boot/dts/mediatek/mt8188.dtsi
Signature · 7 lines
2.18.0


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#1 lore raw

PATCH v3 1/4 dt-bindings: arm: Add compatible for MediaTek MT8188

From: jason-ch chen <[email protected]>

This commit adds dt-binding documentation for the MediaTek MT8188 reference board.

---
 Documentation/devicetree/bindings/arm/mediatek.yaml | 4 ++++
 1 file changed, 4 insertions(+)
Documentation/devicetree/bindings/arm/mediatek.yaml +4 -0
index ae12b1cab9fb..4f4910d7a1e9 100644
@@ -163,6 +163,10 @@ properties:
           - enum:
               - mediatek,mt8186-evb
           - const: mediatek,mt8186
+      - items:
+          - enum:
+              - mediatek,mt8188-evb
+          - const: mediatek,mt8188
       - items:
           - enum:
               - mediatek,mt8192-evb
Signature · 7 lines
2.18.0


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#2 lore raw

PATCH v3 2/4 dt-bindings: arm: mediatek: Add mt8188 pericfg compatible

In reply to Jason-ch Chen

From: jason-ch chen <[email protected]>

Add mt8188 pericfg compatible to binding document.

---
 .../devicetree/bindings/arm/mediatek/mediatek,pericfg.yaml       | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/arm/mediatek/mediatek,pericfg.yaml +1 -0
index 26158d0d72f3..33c94c491828 100644
@@ -28,6 +28,7 @@ properties:
               - mediatek,mt8173-pericfg
               - mediatek,mt8183-pericfg
               - mediatek,mt8186-pericfg
+              - mediatek,mt8188-pericfg
               - mediatek,mt8195-pericfg
               - mediatek,mt8516-pericfg
           - const: syscon
Signature · 7 lines
2.18.0


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#3 lore raw

PATCH v3 3/4 dt-bindings: soc: mediatek: pwrap: Add compatible for MT8188

In reply to Jason-ch Chen

From: jason-ch chen <[email protected]>

Add MT8188 PMIC Wrapper compatible to binding document.

---
 .../devicetree/bindings/soc/mediatek/mediatek,pwrap.yaml    | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/soc/mediatek/mediatek,pwrap.yaml +5 -1
index a06ac2177444..4737e5f45d54 100644
@@ -41,7 +41,6 @@ properties:
               - mediatek,mt8173-pwrap
               - mediatek,mt8183-pwrap
               - mediatek,mt8186-pwrap
-              - mediatek,mt8188-pwrap
               - mediatek,mt8195-pwrap
               - mediatek,mt8365-pwrap
               - mediatek,mt8516-pwrap
@@ -50,6 +49,11 @@ properties:
               - mediatek,mt8186-pwrap
               - mediatek,mt8195-pwrap
           - const: syscon
+      - items:
+          - enum:
+              - mediatek,mt8188-pwrap
+          - const: mediatek,mt8195-pwrap
+          - const: syscon
 
   reg:
     minItems: 1
Signature · 7 lines
2.18.0


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#4 lore raw

Re: [PATCH v3 3/4] dt-bindings: soc: mediatek: pwrap: Add compatible for MT8188

Quoted 3 lines · Jason-ch Chen

From: jason-ch chen <[email protected]>

Add MT8188 PMIC Wrapper compatible to binding document.

No improvements here - the compatible is already there. Subject has the same issue. Explain what you are doing and why.

Quoted 11 lines
---
 .../devicetree/bindings/soc/mediatek/mediatek,pwrap.yaml    | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/soc/mediatek/mediatek,pwrap.yaml +0 -0
index a06ac2177444..4737e5f45d54 100644

Documentation/devicetree/bindings/soc/mediatek/mediatek,pwrap.yaml properties: · line 44

Quoted 4 lines
Documentation/devicetree/bindings/soc/mediatek/mediatek,pwrap.yaml +0 -1
@@ -41,7 +41,6 @@ properties:
               - mediatek,mt8173-pwrap
               - mediatek,mt8183-pwrap
               - mediatek,mt8186-pwrap
-              - mediatek,mt8188-pwrap

Look, here ^^^^

Documentation/devicetree/bindings/soc/mediatek/mediatek,pwrap.yaml properties: · line 54

Quoted 10 lines
Documentation/devicetree/bindings/soc/mediatek/mediatek,pwrap.yaml +3 -0
               - mediatek,mt8195-pwrap
               - mediatek,mt8365-pwrap
               - mediatek,mt8516-pwrap
@@ -50,6 +49,11 @@ properties:
               - mediatek,mt8186-pwrap
               - mediatek,mt8195-pwrap
           - const: syscon
+      - items:
+          - enum:
+              - mediatek,mt8188-pwrap

Best regards,
Krzysztof

#5 lore raw

Re: [PATCH v3 3/4] dt-bindings: soc: mediatek: pwrap: Add compatible for MT8188

Hi Krzysztof,

Quoted 11 lines · Krzysztof Kozlowski

External email : Please do not click links or open attachments until you have verified the sender or the content.

Quoted 3 lines · Jason-ch Chen

From: jason-ch chen <[email protected]>

Add MT8188 PMIC Wrapper compatible to binding document.

No improvements here - the compatible is already there. Subject has the
same issue. Explain what you are doing and why.

The reason for changing the patch was that while MT8188 uses the same pwrap as MT8195, the original code was applicable to 'compatible = "mediatek,mt8188-pwrap"'.

To resolve the DTBS check warning that '['mediatek,mt8188-pwrap', 'mediatek,mt8195-pwrap', 'syscon'] is too long', I modified the code as per the current patch.

Quoted 24 lines
Quoted 5 lines
---
 .../devicetree/bindings/soc/mediatek/mediatek,pwrap.yaml    | 6

+++++-

Quoted 3 lines
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git

a/Documentation/devicetree/bindings/soc/mediatek/mediatek,pwrap.yaml b/Documentation/devicetree/bindings/soc/mediatek/mediatek,pwrap.yaml

Quoted 2 lines

index a06ac2177444..4737e5f45d54 100644
---

a/Documentation/devicetree/bindings/soc/mediatek/mediatek,pwrap.yaml

Quoted 1 line

+++

b/Documentation/devicetree/bindings/soc/mediatek/mediatek,pwrap.yaml

Documentation/devicetree/bindings/soc/mediatek/mediatek,pwrap.yaml properties: · line 44

Quoted 5 lines
Documentation/devicetree/bindings/soc/mediatek/mediatek,pwrap.yaml +0 -1
@@ -41,7 +41,6 @@ properties:
               - mediatek,mt8173-pwrap
               - mediatek,mt8183-pwrap
               - mediatek,mt8186-pwrap
-              - mediatek,mt8188-pwrap

Look, here ^^^^

Quoted 14 lines

Documentation/devicetree/bindings/soc/mediatek/mediatek,pwrap.yaml properties: · line 54

Quoted 10 lines
Documentation/devicetree/bindings/soc/mediatek/mediatek,pwrap.yaml +3 -0
               - mediatek,mt8195-pwrap
               - mediatek,mt8365-pwrap
               - mediatek,mt8516-pwrap
@@ -50,6 +49,11 @@ properties:
               - mediatek,mt8186-pwrap
               - mediatek,mt8195-pwrap
           - const: syscon
+      - items:
+          - enum:
+              - mediatek,mt8188-pwrap

Best regards,
Krzysztof

Thanks,
Jason

Quoted 1 line
#6 lore raw

Re: [PATCH v3 3/4] dt-bindings: soc: mediatek: pwrap: Add compatible for MT8188

Quoted 15 lines · Jason-ch Chen (陳建豪)

Hi Krzysztof,

Quoted 11 lines · Krzysztof Kozlowski

External email : Please do not click links or open attachments until you have verified the sender or the content.

Quoted 3 lines · Jason-ch Chen

From: jason-ch chen <[email protected]>

Add MT8188 PMIC Wrapper compatible to binding document.

No improvements here - the compatible is already there. Subject has the
same issue. Explain what you are doing and why.

Quoted 7 lines

The reason for changing the patch was that while MT8188 uses the same pwrap as MT8195, the original code was applicable to 'compatible = "mediatek,mt8188-pwrap"'.

To resolve the DTBS check warning that '['mediatek,mt8188-pwrap', 'mediatek,mt8195-pwrap', 'syscon'] is too long', I modified the code as per the current patch.

Explain it in commit msg. Fix the subject in new patch.

Best regards,
Krzysztof

#7 lore raw

Re: [PATCH v3 3/4] dt-bindings: soc: mediatek: pwrap: Add compatible for MT8188

Hi Krzysztof,

Quoted 26 lines · Krzysztof Kozlowski

External email : Please do not click links or open attachments until you have verified the sender or the content.

Quoted 5 lines · Jason-ch Chen (陳建豪)

Hi Krzysztof,

Quoted 2 lines · Krzysztof Kozlowski

External email : Please do not click links or open attachments

until

Quoted 7 lines
Quoted 7 lines

you have verified the sender or the content.

Quoted 3 lines · Jason-ch Chen

From: jason-ch chen <[email protected]>

Add MT8188 PMIC Wrapper compatible to binding document.

No improvements here - the compatible is already there. Subject

has

Quoted 4 lines
Quoted 2 lines

the
same issue. Explain what you are doing and why.

The reason for changing the patch was that while MT8188 uses the

same

Quoted 3 lines

pwrap as MT8195, the original code was applicable to 'compatible = "mediatek,mt8188-pwrap"'.

Quoted 6 lines
Quoted 2 lines

To resolve the DTBS check warning that '['mediatek,mt8188-pwrap', 'mediatek,mt8195-pwrap', 'syscon'] is too long', I modified the

code as

Quoted 1 line

per the current patch.

Explain it in commit msg. Fix the subject in new patch.

Thank you for your kind response. In the next version, I will explain it and correct the subject accordingly.

Quoted 4 lines

Best regards,
Krzysztof

Regards,
Jason

#8 lore raw

PATCH v3 4/4 arm64: dts: Add MediaTek MT8188 dts and evaluation board and Makefile

In reply to Jason-ch Chen

From: jason-ch chen <[email protected]>

MT8188 is a SoC based on 64bit ARMv8 architecture. It contains 6 CA55 and 2 CA78 cores. MT8188 share many HW IP with MT65xx series.

We add basic chip support for MediaTek MT8188 on evaluation board.

---
 arch/arm64/boot/dts/mediatek/Makefile       |   1 +
 arch/arm64/boot/dts/mediatek/mt8188-evb.dts | 401 +++++++++
 arch/arm64/boot/dts/mediatek/mt8188.dtsi    | 951 ++++++++++++++++++++
 3 files changed, 1353 insertions(+)
 create mode 100644 arch/arm64/boot/dts/mediatek/mt8188-evb.dts
 create mode 100644 arch/arm64/boot/dts/mediatek/mt8188.dtsi
arch/arm64/boot/dts/mediatek/Makefile +1 -0
index c99c3372a4b5..9bd2324259a3 100644
@@ -44,6 +44,7 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-kukui-krane-sku0.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-kukui-krane-sku176.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-pumpkin.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt8186-evb.dtb
+dtb-$(CONFIG_ARCH_MEDIATEK) += mt8188-evb.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt8192-asurada-hayato-r1.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt8192-asurada-spherion-r0.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt8192-evb.dtb
arch/arm64/boot/dts/mediatek/mt8188-evb.dts new file +401 -0

401 lines not on this page · raw message

arch/arm64/boot/dts/mediatek/mt8188.dtsi new file +951 -0

951 lines not on this page · raw message

Signature · 7 lines
2.18.0


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#9 lore raw

Re: [PATCH v3 4/4] arm64: dts: Add MediaTek MT8188 dts and evaluation board and Makefile

Quoted 52 lines · Jason-ch Chen

From: jason-ch chen <[email protected]>

MT8188 is a SoC based on 64bit ARMv8 architecture. It contains 6 CA55 and 2 CA78 cores. MT8188 share many HW IP with MT65xx series.

We add basic chip support for MediaTek MT8188 on evaluation board.

---
 arch/arm64/boot/dts/mediatek/Makefile       |   1 +
 arch/arm64/boot/dts/mediatek/mt8188-evb.dts | 401 +++++++++
 arch/arm64/boot/dts/mediatek/mt8188.dtsi    | 951 ++++++++++++++++++++
 3 files changed, 1353 insertions(+)
 create mode 100644 arch/arm64/boot/dts/mediatek/mt8188-evb.dts
 create mode 100644 arch/arm64/boot/dts/mediatek/mt8188.dtsi
arch/arm64/boot/dts/mediatek/Makefile +1 -0
index c99c3372a4b5..9bd2324259a3 100644
@@ -44,6 +44,7 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-kukui-krane-sku0.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-kukui-krane-sku176.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-pumpkin.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt8186-evb.dtb
+dtb-$(CONFIG_ARCH_MEDIATEK) += mt8188-evb.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt8192-asurada-hayato-r1.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt8192-asurada-spherion-r0.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt8192-evb.dtb
arch/arm64/boot/dts/mediatek/mt8188-evb.dts new file +17 -0
new file mode 100644
index 000000000000..d8906172390e
@@ -0,0 +1,401 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright (C) 2023 MediaTek Inc.
+ */
+/dts-v1/;
+#include "mt8188.dtsi"
+#include "mt6359.dtsi"
+
+/ {
+	model = "MediaTek MT8188 evaluation board";
+	compatible = "mediatek,mt8188-evb", "mediatek,mt8188";
+
+	aliases {
+		serial0 = &uart0;
+		i2c0 = &i2c0;
+		i2c1 = &i2c1;
+		i2c2 = &i2c2;

arch/arm64/boot/dts/mediatek/mt8188-evb.dts line 27

Quoted 10 lines
arch/arm64/boot/dts/mediatek/mt8188-evb.dts new file +10 -0
+		i2c3 = &i2c3;
+		i2c4 = &i2c4;
+		i2c5 = &i2c5;
+		i2c6 = &i2c6;
+		mmc0 = &mmc0;
+	};
+
+	chosen: chosen {
+		stdout-path = "serial0:115200n8";
+		kaslr-seed = <0 0>;

It does not look like you tested the DTS against bindings. Please run make dtbs_check (see Documentation/devicetree/bindings/writing-schema.rst or
https://www.linaro.org/blog/tips-and-tricks-for-validating-devicetree-sources-with-the-devicetree-schema/
for instructions).

arch/arm64/boot/dts/mediatek/mt8188-evb.dts line 40

Quoted 13 lines
arch/arm64/boot/dts/mediatek/mt8188-evb.dts new file +13 -0
+	};
+
+	memory@40000000 {
+		device_type = "memory";
+		reg = <0 0x40000000 0 0x80000000>;
+	};
+
+	reserved_memory: reserved-memory {
+		#address-cells = <2>;
+		#size-cells = <2>;
+		ranges;
+
+		scp_mem_reserved: scp_mem_region {

No underscores in node names.

arch/arm64/boot/dts/mediatek/mt8188-evb.dts line 45

Quoted 5 lines
arch/arm64/boot/dts/mediatek/mt8188-evb.dts new file +5 -0
+			compatible = "shared-dma-pool";
+			reg = <0 0x50000000 0 0x2900000>;
+			no-map;
+		};
+	};

Best regards,
Krzysztof

#10 lore raw

Re: [PATCH v3 4/4] arm64: dts: Add MediaTek MT8188 dts and evaluation board and Makefile

Hi Krzysztof,

Quoted 68 lines · Krzysztof Kozlowski

External email : Please do not click links or open attachments until you have verified the sender or the content.

Quoted 3 lines · Jason-ch Chen

From: jason-ch chen <[email protected]>

MT8188 is a SoC based on 64bit ARMv8 architecture. It contains 6

CA55

Quoted 6 lines

and 2 CA78 cores. MT8188 share many HW IP with MT65xx series.

We add basic chip support for MediaTek MT8188 on evaluation board.

Reviewed-by AngeloGioacchino Del Regno <

[email protected]>

Quoted 4 lines
---
 arch/arm64/boot/dts/mediatek/Makefile       |   1 +
 arch/arm64/boot/dts/mediatek/mt8188-evb.dts | 401 +++++++++
 arch/arm64/boot/dts/mediatek/mt8188.dtsi    | 951

++++++++++++++++++++

Review

Quoted 5 lines
 3 files changed, 1353 insertions(+)
 create mode 100644 arch/arm64/boot/dts/mediatek/mt8188-evb.dts
 create mode 100644 arch/arm64/boot/dts/mediatek/mt8188.dtsi
(quoted diff) +0 -0

b/arch/arm64/boot/dts/mediatek/Makefile

arch/arm64/boot/dts/mediatek/Makefile dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-kukui-

Quoted 4 lines

index c99c3372a4b5..9bd2324259a3 100644

arch/arm64/boot/dts/mediatek/Makefile +0 -0
@@ -44,6 +44,7 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-kukui-

krane-sku0.dtb

Review

Quoted 8 lines
arch/arm64/boot/dts/mediatek/Makefile +1 -0
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-kukui-krane-sku176.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-pumpkin.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt8186-evb.dtb
+dtb-$(CONFIG_ARCH_MEDIATEK) += mt8188-evb.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt8192-asurada-hayato-r1.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt8192-asurada-spherion-r0.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt8192-evb.dtb
(quoted diff) +0 -0

b/arch/arm64/boot/dts/mediatek/mt8188-evb.dts

Quoted 28 lines

new file mode 100644
index 000000000000..d8906172390e

arch/arm64/boot/dts/mediatek/mt8188-evb.dts new file +23 -0
@@ -0,0 +1,401 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright (C) 2023 MediaTek Inc.
+ */
+/dts-v1/;
+#include "mt8188.dtsi"
+#include "mt6359.dtsi"
+
+/ {
+model = "MediaTek MT8188 evaluation board";
+compatible = "mediatek,mt8188-evb", "mediatek,mt8188";
+
+aliases {
+serial0 = &uart0;
+i2c0 = &i2c0;
+i2c1 = &i2c1;
+i2c2 = &i2c2;
+i2c3 = &i2c3;
+i2c4 = &i2c4;
+i2c5 = &i2c5;
+i2c6 = &i2c6;
+mmc0 = &mmc0;
+};
Quoted 9 lines

arch/arm64/boot/dts/mediatek/mt8188-evb.dts line 27

Quoted 4 lines
arch/arm64/boot/dts/mediatek/mt8188-evb.dts new file +4 -0
+
+chosen: chosen {
+stdout-path = "serial0:115200n8";
+kaslr-seed = <0 0>;

It does not look like you tested the DTS against bindings. Please run make dtbs_check (see Documentation/devicetree/bindings/writing-schema.rst or

https://www.linaro.org/blog/tips-and-tricks-for-validating-devicetree-sources-with-the-devicetree-schema/

Quoted 2 lines

for instructions).

Thank you for your review.
I actually ran dtbs_check, but it didn't display any problems here. I will remove it in the next version.

Quoted 7 lines
Quoted 7 lines
arch/arm64/boot/dts/mediatek/mt8188-evb.dts new file +7 -0
+};
+
+memory@40000000 {
+device_type = "memory";
+reg = <0 0x40000000 0 0x80000000>;
+};
+
Quoted 8 lines

arch/arm64/boot/dts/mediatek/mt8188-evb.dts line 40

Quoted 6 lines
arch/arm64/boot/dts/mediatek/mt8188-evb.dts new file +6 -0
+reserved_memory: reserved-memory {
+#address-cells = <2>;
+#size-cells = <2>;
+ranges;
+
+scp_mem_reserved: scp_mem_region {

No underscores in node names.

I will fix it in the next version.

Quoted 10 lines

arch/arm64/boot/dts/mediatek/mt8188-evb.dts line 45

Quoted 6 lines
arch/arm64/boot/dts/mediatek/mt8188-evb.dts new file +5 -0
+compatible = "shared-dma-pool";
+reg = <0 0x50000000 0 0x2900000>;
+no-map;
+};
+};

Best regards,
Krzysztof

Thanks,
Jason

Quoted 1 line
#11 lore raw

Re: [PATCH v3 4/4] arm64: dts: Add MediaTek MT8188 dts and evaluation board and Makefile

Quoted 80 lines · Jason-ch Chen (陳建豪)

Hi Krzysztof,

Quoted 68 lines · Krzysztof Kozlowski

External email : Please do not click links or open attachments until you have verified the sender or the content.

Quoted 3 lines · Jason-ch Chen

From: jason-ch chen <[email protected]>

MT8188 is a SoC based on 64bit ARMv8 architecture. It contains 6

CA55

Quoted 6 lines

and 2 CA78 cores. MT8188 share many HW IP with MT65xx series.

We add basic chip support for MediaTek MT8188 on evaluation board.

Reviewed-by AngeloGioacchino Del Regno <

[email protected]>

Quoted 4 lines
---
 arch/arm64/boot/dts/mediatek/Makefile       |   1 +
 arch/arm64/boot/dts/mediatek/mt8188-evb.dts | 401 +++++++++
 arch/arm64/boot/dts/mediatek/mt8188.dtsi    | 951

++++++++++++++++++++

Review

Quoted 5 lines
 3 files changed, 1353 insertions(+)
 create mode 100644 arch/arm64/boot/dts/mediatek/mt8188-evb.dts
 create mode 100644 arch/arm64/boot/dts/mediatek/mt8188.dtsi
(quoted diff) +0 -0

b/arch/arm64/boot/dts/mediatek/Makefile

arch/arm64/boot/dts/mediatek/Makefile dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-kukui-

Quoted 4 lines

index c99c3372a4b5..9bd2324259a3 100644

arch/arm64/boot/dts/mediatek/Makefile +0 -0
@@ -44,6 +44,7 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-kukui-

krane-sku0.dtb

Review

Quoted 8 lines
arch/arm64/boot/dts/mediatek/Makefile +1 -0
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-kukui-krane-sku176.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-pumpkin.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt8186-evb.dtb
+dtb-$(CONFIG_ARCH_MEDIATEK) += mt8188-evb.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt8192-asurada-hayato-r1.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt8192-asurada-spherion-r0.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt8192-evb.dtb
(quoted diff) +0 -0

b/arch/arm64/boot/dts/mediatek/mt8188-evb.dts

Quoted 28 lines

new file mode 100644
index 000000000000..d8906172390e

arch/arm64/boot/dts/mediatek/mt8188-evb.dts new file +23 -0
@@ -0,0 +1,401 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright (C) 2023 MediaTek Inc.
+ */
+/dts-v1/;
+#include "mt8188.dtsi"
+#include "mt6359.dtsi"
+
+/ {
+model = "MediaTek MT8188 evaluation board";
+compatible = "mediatek,mt8188-evb", "mediatek,mt8188";
+
+aliases {
+serial0 = &uart0;
+i2c0 = &i2c0;
+i2c1 = &i2c1;
+i2c2 = &i2c2;
+i2c3 = &i2c3;
+i2c4 = &i2c4;
+i2c5 = &i2c5;
+i2c6 = &i2c6;
+mmc0 = &mmc0;
+};
Quoted 9 lines

arch/arm64/boot/dts/mediatek/mt8188-evb.dts line 27

Quoted 4 lines
arch/arm64/boot/dts/mediatek/mt8188-evb.dts new file +4 -0
+
+chosen: chosen {
+stdout-path = "serial0:115200n8";
+kaslr-seed = <0 0>;

It does not look like you tested the DTS against bindings. Please run make dtbs_check (see Documentation/devicetree/bindings/writing-schema.rst or

Quoted 7 lines

https://www.linaro.org/blog/tips-and-tricks-for-validating-devicetree-sources-with-the-devicetree-schema/

Quoted 2 lines

for instructions).

Thank you for your review.
I actually ran dtbs_check, but it didn't display any problems here. I will remove it in the next version.

Ah, right, it is coming from dtschema, so the property could stay. I don't understand though why adding 0 as seed. Shouldn't your firmware set it?

Best regards,
Krzysztof

#12 lore raw

Re: [PATCH v3 4/4] arm64: dts: Add MediaTek MT8188 dts and evaluation board and Makefile

Hi Krzysztof,

Quoted 92 lines · Krzysztof Kozlowski

External email : Please do not click links or open attachments until you have verified the sender or the content.

Quoted 5 lines · Jason-ch Chen (陳建豪)

Hi Krzysztof,

Quoted 2 lines · Krzysztof Kozlowski

External email : Please do not click links or open attachments

until

Quoted 9 lines
Quoted 9 lines

you have verified the sender or the content.

Quoted 3 lines · Jason-ch Chen

From: jason-ch chen <[email protected]>

MT8188 is a SoC based on 64bit ARMv8 architecture. It contains 6

CA55

Quoted 3 lines

and 2 CA78 cores. MT8188 share many HW IP with MT65xx series.

We add basic chip support for MediaTek MT8188 on evaluation

board.

Quoted 55 lines
Quoted 55 lines
Quoted 3 lines
Reviewed-by AngeloGioacchino Del Regno <

[email protected]>

Quoted 4 lines
---
 arch/arm64/boot/dts/mediatek/Makefile       |   1 +
 arch/arm64/boot/dts/mediatek/mt8188-evb.dts | 401 +++++++++
 arch/arm64/boot/dts/mediatek/mt8188.dtsi    | 951

++++++++++++++++++++

Review

Quoted 5 lines
 3 files changed, 1353 insertions(+)
 create mode 100644 arch/arm64/boot/dts/mediatek/mt8188-evb.dts
 create mode 100644 arch/arm64/boot/dts/mediatek/mt8188.dtsi
(quoted diff) +0 -0

b/arch/arm64/boot/dts/mediatek/Makefile

arch/arm64/boot/dts/mediatek/Makefile dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-kukui-

Quoted 4 lines

index c99c3372a4b5..9bd2324259a3 100644

arch/arm64/boot/dts/mediatek/Makefile +0 -0
@@ -44,6 +44,7 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-kukui-

krane-sku0.dtb

Review

Quoted 8 lines
arch/arm64/boot/dts/mediatek/Makefile +1 -0
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-kukui-krane-sku176.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-pumpkin.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt8186-evb.dtb
+dtb-$(CONFIG_ARCH_MEDIATEK) += mt8188-evb.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt8192-asurada-hayato-r1.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt8192-asurada-spherion-r0.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt8192-evb.dtb
(quoted diff) +0 -0

b/arch/arm64/boot/dts/mediatek/mt8188-evb.dts

Quoted 26 lines

new file mode 100644
index 000000000000..d8906172390e

arch/arm64/boot/dts/mediatek/mt8188-evb.dts new file +21 -0
@@ -0,0 +1,401 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright (C) 2023 MediaTek Inc.
+ */
+/dts-v1/;
+#include "mt8188.dtsi"
+#include "mt6359.dtsi"
+
+/ {
+model = "MediaTek MT8188 evaluation board";
+compatible = "mediatek,mt8188-evb", "mediatek,mt8188";
+
+aliases {
+serial0 = &uart0;
+i2c0 = &i2c0;
+i2c1 = &i2c1;
+i2c2 = &i2c2;
+i2c3 = &i2c3;
+i2c4 = &i2c4;
+i2c5 = &i2c5;
+i2c6 = &i2c6;
Quoted 8 lines
Quoted 8 lines

arch/arm64/boot/dts/mediatek/mt8188-evb.dts line 27

Quoted 6 lines
arch/arm64/boot/dts/mediatek/mt8188-evb.dts new file +6 -0
+mmc0 = &mmc0;
+};
+
+chosen: chosen {
+stdout-path = "serial0:115200n8";
+kaslr-seed = <0 0>;

It does not look like you tested the DTS against bindings. Please

run

Quoted 4 lines
Quoted 3 lines

make dtbs_check (see Documentation/devicetree/bindings/writing-schema.rst or

https://www.linaro.org/blog/tips-and-tricks-for-validating-devicetree-sources-with-the-devicetree-schema/

Quoted 3 lines
Quoted 2 lines

for instructions).

Quoted 9 lines
Quoted 2 lines

Thank you for your review.
I actually ran dtbs_check, but it didn't display any problems here.

I

Quoted 1 line

will remove it in the next version.

Ah, right, it is coming from dtschema, so the property could stay. I don't understand though why adding 0 as seed. Shouldn't your firmware set it?

This was my negligence. Indeed, it is not necessary to include it in the DTS. I will remove it next time. Thank you.

Quoted 3 lines

Best regards,
Krzysztof

Regards,
Jason