Skip to contentSkip to conversation

Add basic node support for Mediatek MT8192 SoC

PATCH Superseded Seiya Wang 3 participants 7 messages Jul 29, 2020 – Jul 31, 2020

Subsystems (4)

v3 of 6 Superseded Latest is v6 →

lore
Share & tools
lore

Seiya Wang

author
#0 lore raw

v3 cover Add basic node support for Mediatek MT8192 SoC

MT8192 is a SoC based on 64bit ARMv8 architecture.
It contains 4 CA55 and 4 CA76 cores.
MT8192 share many HW IP with MT65xx series.
This patchset was tested on MT8192 evaluation board and use correct clock to she ll.

Based on v5.8-rc1

Change in v3:
Fix typo in binding document of timer

Change in v2:
1. Remove mt8192-power.h from mt8192.dtsi which is not used yet
2. Add timer binding document and device tree node in mt8192.dtsi
3. Remove watchdog driver modification

Seiya Wang (3):
arm64: dts: Add Mediatek SoC MT8192 and evaluation board dts and
Makefile
dt-bindings: serial: Add compatible for Mediatek MT8192
dt-bindings: timer: Add compatible for Mediatek MT8192
---
This patch depends on
[PATCH 1/3] dt-bindings: pinctrl: mt8192: add pinctrl file [PATCH 2/3] dt-bindings: pinctrl: mt8192: add binding document [PATCH v2 3/4] dt-bindings: mediatek: add compatible for MT6873/8192 pwrap [PATCH v2 1/2] dt-bindings: spi: update bindings for MT8192 SoC [PATCH 2/4] clk: mediatek: Add dt-bindings for MT8192 clocks [PATCH 1/4] dt-bindings: ARM: Mediatek: Document bindings for MT8192

Please also accept this patch together with [1][2][3][4][5][6] to avoid build and dt binding check error.

[1] http://lists.infradead.org/pipermail/linux-mediatek/2020-July/014042.html
[2] http://lists.infradead.org/pipermail/linux-mediatek/2020-July/014043.html
[3] http://lists.infradead.org/pipermail/linux-mediatek/2020-July/014546.html
[4] http://lists.infradead.org/pipermail/linux-mediatek/2020-July/014406.html
[5] http://lists.infradead.org/pipermail/linux-mediatek/2020-July/014450.html
[6] http://lists.infradead.org/pipermail/linux-mediatek/2020-July/014451.html

---
 .../devicetree/bindings/serial/mtk-uart.txt        |   1 +
 .../bindings/timer/mediatek,mtk-timer.txt          |   1 +
 arch/arm64/boot/dts/mediatek/Makefile              |   1 +
 arch/arm64/boot/dts/mediatek/mt8192-evb.dts        |  29 +
 arch/arm64/boot/dts/mediatek/mt8192.dtsi           | 671 +++++++++++++++++++++
 5 files changed, 703 insertions(+)
 create mode 100644 arch/arm64/boot/dts/mediatek/mt8192-evb.dts
 create mode 100644 arch/arm64/boot/dts/mediatek/mt8192.dtsi

--
2.14.1

author
#1 lore raw

PATCH v3 1/3 arm64: dts: Add Mediatek SoC MT8192 and evaluation board dts and Makefile

Add basic chip support for Mediatek MT8192

---
 arch/arm64/boot/dts/mediatek/Makefile       |   1 +
 arch/arm64/boot/dts/mediatek/mt8192-evb.dts |  29 ++
 arch/arm64/boot/dts/mediatek/mt8192.dtsi    | 671 ++++++++++++++++++++++++++++
 3 files changed, 701 insertions(+)
 create mode 100644 arch/arm64/boot/dts/mediatek/mt8192-evb.dts
 create mode 100644 arch/arm64/boot/dts/mediatek/mt8192.dtsi
arch/arm64/boot/dts/mediatek/Makefile +1 -0
index a57af9da9f5c..80320ed2d82c 100644
@@ -11,4 +11,5 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += mt8173-elm-hana.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt8173-elm-hana-rev7.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt8173-evb.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-evb.dtb
+dtb-$(CONFIG_ARCH_MEDIATEK) += mt8192-evb.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt8516-pumpkin.dtb
arch/arm64/boot/dts/mediatek/mt8192-evb.dts new file +29 -0
new file mode 100644
index 000000000000..0205837fa698
@@ -0,0 +1,29 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright (C) 2020 MediaTek Inc.
+ * Author: Seiya Wang <[email protected]>
+ */
+/dts-v1/;
+#include "mt8192.dtsi"
+
+/ {
+	model = "MediaTek MT8192 evaluation board";
+	compatible = "mediatek,mt8192-evb", "mediatek,mt8192";
+
+	aliases {
+		serial0 = &uart0;
+	};
+
+	chosen {
+		stdout-path = "serial0:921600n8";
+	};
+
+	memory@40000000 {
+		device_type = "memory";
+		reg = <0 0x40000000 0 0x80000000>;
+	};
+};
+
+&uart0 {
+	status = "okay";
+};
arch/arm64/boot/dts/mediatek/mt8192.dtsi new file +671 -0

671 lines not on this page · raw message

Signature · 1 line
2.14.1
#2 lore raw

Re: [PATCH v3 1/3] arm64: dts: Add Mediatek SoC MT8192 and evaluation board dts and Makefile

Hi, Seiya:

Quoted 11 lines · Seiya Wang

Add basic chip support for Mediatek MT8192

---
 arch/arm64/boot/dts/mediatek/Makefile       |   1 +
 arch/arm64/boot/dts/mediatek/mt8192-evb.dts |  29 ++
 arch/arm64/boot/dts/mediatek/mt8192.dtsi    | 671 ++++++++++++++++++++++++++++
 3 files changed, 701 insertions(+)
 create mode 100644 arch/arm64/boot/dts/mediatek/mt8192-evb.dts
 create mode 100644 arch/arm64/boot/dts/mediatek/mt8192.dtsi

[snip]

arch/arm64/boot/dts/mediatek/mt8192.dtsi line 318

Quoted 3 lines
arch/arm64/boot/dts/mediatek/mt8192.dtsi new file +3 -0
+
+		watchdog: watchdog@10007000 {
+			compatible = "mediatek,mt6589-wdt";

According to [1] and [2], compatible string for mt8192 watch dog should be "mediatek,mt6873-wdt","mediatek,mt8192-wdt".

[1]
https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/2287090/12
[2]
https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/2131598/18

Quoted 4 lines
arch/arm64/boot/dts/mediatek/mt8192.dtsi new file +4 -0
+			reg = <0 0x10007000 0 0x100>;
+			#reset-cells = <1>;
+		};
+

[snip]

arch/arm64/boot/dts/mediatek/mt8192.dtsi line 570

Quoted 3 lines
arch/arm64/boot/dts/mediatek/mt8192.dtsi new file +3 -0
+
+		mmsys: mmsys@14000000 {
+			compatible = "mediatek,mt8192-mmsys", "syscon";

You should define "mediatek,mt8192-mmsys" first, then you could use it in this patch.

Regards,
CK

Quoted 4 lines
arch/arm64/boot/dts/mediatek/mt8192.dtsi new file +4 -0
+			reg = <0 0x14000000 0 0x1000>;
+			#clock-cells = <1>;
+		};
+
#3 lore raw

Re: [PATCH v3 1/3] arm64: dts: Add Mediatek SoC MT8192 and evaluation board dts and Makefile

Hi, Seiya:

Quoted 37 lines · CK Hu

Hi, Seiya:

Quoted 11 lines · Seiya Wang

Add basic chip support for Mediatek MT8192

---
 arch/arm64/boot/dts/mediatek/Makefile       |   1 +
 arch/arm64/boot/dts/mediatek/mt8192-evb.dts |  29 ++
 arch/arm64/boot/dts/mediatek/mt8192.dtsi    | 671 ++++++++++++++++++++++++++++
 3 files changed, 701 insertions(+)
 create mode 100644 arch/arm64/boot/dts/mediatek/mt8192-evb.dts
 create mode 100644 arch/arm64/boot/dts/mediatek/mt8192.dtsi

[snip]

arch/arm64/boot/dts/mediatek/mt8192.dtsi line 318

Quoted 3 lines
arch/arm64/boot/dts/mediatek/mt8192.dtsi new file +3 -0
+
+		watchdog: watchdog@10007000 {
+			compatible = "mediatek,mt6589-wdt";

According to [1] and [2], compatible string for mt8192 watch dog should be "mediatek,mt6873-wdt","mediatek,mt8192-wdt".

[1]
https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/2287090/12
[2]
https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/2131598/18

Quoted 4 lines
arch/arm64/boot/dts/mediatek/mt8192.dtsi new file +4 -0
+			reg = <0 0x10007000 0 0x100>;
+			#reset-cells = <1>;
+		};
+

[snip]

Quoted 6 lines

arch/arm64/boot/dts/mediatek/mt8192.dtsi line 570

Quoted 3 lines
arch/arm64/boot/dts/mediatek/mt8192.dtsi new file +3 -0
+
+		mmsys: mmsys@14000000 {
+			compatible = "mediatek,mt8192-mmsys", "syscon";

You should define "mediatek,mt8192-mmsys" first, then you could use it in this patch

Sorry, this series depend on [1], but mmsys is a syscon, so this should be

mmsys: syscon@14000000 {

[1]
http://lists.infradead.org/pipermail/linux-mediatek/2020-July/014451.html

Regards,
CK

Quoted 10 lines

.

Regards,
CK

Quoted 4 lines
arch/arm64/boot/dts/mediatek/mt8192.dtsi new file +4 -0
+			reg = <0 0x14000000 0 0x1000>;
+			#clock-cells = <1>;
+		};
+
author
#4 lore raw

PATCH v3 2/3 dt-bindings: serial: Add compatible for Mediatek MT8192

In reply to Seiya Wang

This commit adds dt-binding documentation of uart for Mediatek MT8192 SoC Platform.

---
 Documentation/devicetree/bindings/serial/mtk-uart.txt | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/serial/mtk-uart.txt +1 -0
index 3a3b57079f0d..647b5aee86f3 100644
@@ -19,6 +19,7 @@ Required properties:
   * "mediatek,mt8135-uart" for MT8135 compatible UARTS
   * "mediatek,mt8173-uart" for MT8173 compatible UARTS
   * "mediatek,mt8183-uart", "mediatek,mt6577-uart" for MT8183 compatible UARTS
+  * "mediatek,mt8192-uart", "mediatek,mt6577-uart" for MT8192 compatible UARTS
   * "mediatek,mt8516-uart" for MT8516 compatible UARTS
   * "mediatek,mt6577-uart" for MT6577 and all of the above
 
Signature · 1 line
2.14.1
author
#5 lore raw

PATCH v3 3/3 dt-bindings: timer: Add compatible for Mediatek MT8192

In reply to Seiya Wang

This commit adds dt-binding documentation of timer for Mediatek MT8192 SoC Platform.

---
 Documentation/devicetree/bindings/timer/mediatek,mtk-timer.txt | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/timer/mediatek,mtk-timer.txt +1 -0
index 0d256486f886..690a9c0966ac 100644
@@ -22,6 +22,7 @@ Required properties:
 
 	For those SoCs that use SYST
 	* "mediatek,mt8183-timer" for MT8183 compatible timers (SYST)
+	* "mediatek,mt8192-timer" for MT8192 compatible timers (SYST)
 	* "mediatek,mt7629-timer" for MT7629 compatible timers (SYST)
 	* "mediatek,mt6765-timer" for MT6765 and all above compatible timers (SYST)
 
Signature · 1 line
2.14.1
maintainer Acked-by on v3 3/3
#6 lore raw

Re: [PATCH v3 3/3] dt-bindings: timer: Add compatible for Mediatek MT8192

Quoted 8 lines · Seiya Wang

This commit adds dt-binding documentation of timer for Mediatek MT8192 SoC Platform.

---
 Documentation/devicetree/bindings/timer/mediatek,mtk-timer.txt | 1 +
 1 file changed, 1 insertion(+)