Skip to contentSkip to conversation

Add basic node support for Mediatek MT8195 SoC

PATCH Applied Seiya Wang 5 participants 20 messages Mar 16, 2021 – Mar 18, 2021

Subsystems (11)

v1 of 2 Applied Latest is v2 →

lore
Share & tools
lore

Seiya Wang

author
#0 lore raw

cover Add basic node support for Mediatek MT8195 SoC

MT8195 is a SoC based on 64bit ARMv8 architecture. It contains 4 CA55 and 4 CA78 cores.
MT8195 share many HW IP with MT65xx series.
This patchset was tested on MT8195 evaluation board to shell.

Based on v5.12-rc2

Seiya Wang (10):
dt-bindings: timer: Add compatible for Mediatek MT8195
dt-bindings: serial: Add compatible for Mediatek MT8195
dt-bindings: watchdog: Add compatible for Mediatek MT8195
dt-bindings: mmc: Add compatible for Mediatek MT8195
dt-bindings: spi: Add compatible for Mediatek MT8195
dt-bindings: iio: adc: Add compatible for Mediatek MT8195
dt-bindings: phy: Add compatible for Mediatek MT8195
dt-bindings: phy: Add compatible for Mediatek MT8195
dt-bindings: arm: Add compatible for Mediatek MT8195
arm64: dts: Add Mediatek SoC MT8195 and evaluation board dts and
Makefile

 .../devicetree/bindings/arm/mediatek.yaml          |   4 +
 .../bindings/iio/adc/mediatek,mt2701-auxadc.yaml   |   1 +
 Documentation/devicetree/bindings/mmc/mtk-sd.yaml  |   1 +
 .../devicetree/bindings/phy/mediatek,tphy.yaml     |   1 +
 .../devicetree/bindings/phy/mediatek,ufs-phy.yaml  |   1 +
 .../devicetree/bindings/serial/mtk-uart.txt        |   1 +
 .../bindings/spi/mediatek,spi-mtk-nor.yaml         |   1 +
 .../bindings/timer/mediatek,mtk-timer.txt          |   1 +
 .../devicetree/bindings/watchdog/mtk-wdt.txt       |   1 +
 arch/arm64/boot/dts/mediatek/Makefile              |   1 +
 arch/arm64/boot/dts/mediatek/mt8195-evb.dts        |  29 ++
 arch/arm64/boot/dts/mediatek/mt8195.dtsi           | 477 +++++++++++++++++++++
 12 files changed, 519 insertions(+)
 create mode 100644 arch/arm64/boot/dts/mediatek/mt8195-evb.dts
 create mode 100644 arch/arm64/boot/dts/mediatek/mt8195.dtsi

--
2.14.1

author
#1 lore raw

PATCH 1/10 dt-bindings: timer: Add compatible for Mediatek MT8195

This commit adds dt-binding documentation of timer for Mediatek MT8195 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 690a9c0966ac..e5c57d6e0186 100644
@@ -23,6 +23,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,mt8195-timer" for MT8195 compatible timers (SYST)
 	* "mediatek,mt7629-timer" for MT7629 compatible timers (SYST)
 	* "mediatek,mt6765-timer" for MT6765 and all above compatible timers (SYST)
 
Signature · 5 lines
2.14.1
_______________________________________________
Linux-mediatek mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-mediatek
author
#2 lore raw

PATCH 2/10 dt-bindings: serial: Add compatible for Mediatek MT8195

In reply to Seiya Wang

This commit adds dt-binding documentation of uart for Mediatek MT8195 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 647b5aee86f3..64c4fb59acd1 100644
@@ -20,6 +20,7 @@ Required properties:
   * "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,mt8195-uart", "mediatek,mt6577-uart" for MT8195 compatible UARTS
   * "mediatek,mt8516-uart" for MT8516 compatible UARTS
   * "mediatek,mt6577-uart" for MT6577 and all of the above
 
Signature · 5 lines
2.14.1
_______________________________________________
Linux-mediatek mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-mediatek
author
#3 lore raw

PATCH 3/10 dt-bindings: watchdog: Add compatible for Mediatek MT8195

In reply to Seiya Wang

This commit adds dt-binding documentation of watchdog for Mediatek MT8195 SoC Platform.

---
 Documentation/devicetree/bindings/watchdog/mtk-wdt.txt | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/watchdog/mtk-wdt.txt +1 -0
index e36ba60de829..a658a0b92b9a 100644
@@ -13,6 +13,7 @@ Required properties:
 	"mediatek,mt8183-wdt": for MT8183
 	"mediatek,mt8516-wdt", "mediatek,mt6589-wdt": for MT8516
 	"mediatek,mt8192-wdt": for MT8192
+	"mediatek,mt8195-wdt", "mediatek,mt6589-wdt": for MT8195
 
 - reg : Specifies base physical address and size of the registers.
 
Signature · 1 line
2.14.1
maintainer Reviewed-by on v1 3/10
#4 lore raw

Re: [PATCH 03/10] dt-bindings: watchdog: Add compatible for Mediatek MT8195

Quoted 4 lines · Seiya Wang

This commit adds dt-binding documentation of watchdog for Mediatek MT8195 SoC Platform.

Guenter

Quoted 19 lines
---
 Documentation/devicetree/bindings/watchdog/mtk-wdt.txt | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/watchdog/mtk-wdt.txt +1 -0
index e36ba60de829..a658a0b92b9a 100644
@@ -13,6 +13,7 @@ Required properties:
 	"mediatek,mt8183-wdt": for MT8183
 	"mediatek,mt8516-wdt", "mediatek,mt6589-wdt": for MT8516
 	"mediatek,mt8192-wdt": for MT8192
+	"mediatek,mt8195-wdt", "mediatek,mt6589-wdt": for MT8195
 
 - reg : Specifies base physical address and size of the registers.
 
Signature · 1 line
2.14.1

_______________________________________________
Linux-mediatek mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-mediatek

author
#5 lore raw

PATCH 4/10 dt-bindings: mmc: Add compatible for Mediatek MT8195

In reply to Seiya Wang

This commit adds dt-binding documentation of mmc for Mediatek MT8195 SoC Platform.

---
 Documentation/devicetree/bindings/mmc/mtk-sd.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/mmc/mtk-sd.yaml +1 -0
index 01630b0ecea7..8648d48dbbfd 100644
@@ -31,6 +31,7 @@ properties:
           - const: mediatek,mt2701-mmc
       - items:
           - const: mediatek,mt8192-mmc
+          - const: mediatek,mt8195-mmc
           - const: mediatek,mt8183-mmc
 
   clocks:
Signature · 5 lines
2.14.1
_______________________________________________
Linux-mediatek mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-mediatek
author
#6 lore raw

PATCH 5/10 dt-bindings: spi: Add compatible for Mediatek MT8195

In reply to Seiya Wang

This commit adds dt-binding documentation of spi nor for Mediatek MT8195 SoC Platform.

---
 Documentation/devicetree/bindings/spi/mediatek,spi-mtk-nor.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/spi/mediatek,spi-mtk-nor.yaml +1 -0
index 55c239446a5b..7393f30535df 100644
@@ -31,6 +31,7 @@ properties:
               - mediatek,mt7623-nor
               - mediatek,mt7629-nor
               - mediatek,mt8192-nor
+              - mediatek,mt8195-nor
           - enum:
               - mediatek,mt8173-nor
       - items:
Signature · 1 line
2.14.1
author
#7 lore raw

PATCH 6/10 dt-bindings: iio: adc: Add compatible for Mediatek MT8195

In reply to Seiya Wang

This commit adds dt-binding documentation of auxadc for Mediatek MT8195 SoC Platform.

---
 Documentation/devicetree/bindings/iio/adc/mediatek,mt2701-auxadc.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/iio/adc/mediatek,mt2701-auxadc.yaml +1 -0
index 5b21a9fba5dd..b939f9652e3a 100644
@@ -34,6 +34,7 @@ properties:
       - items:
           - enum:
               - mediatek,mt8183-auxadc
+              - mediatek,mt8195-auxadc
               - mediatek,mt8516-auxadc
           - const: mediatek,mt8173-auxadc
 
Signature · 1 line
2.14.1
author
#8 lore raw

PATCH 7/10 dt-bindings: phy: Add compatible for Mediatek MT8195

In reply to Seiya Wang

This commit adds dt-binding documentation of T-Phy for Mediatek MT8195 SoC Platform.

---
 Documentation/devicetree/bindings/phy/mediatek,tphy.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/phy/mediatek,tphy.yaml +1 -0
index 602e6ff45785..c5b436ad6239 100644
@@ -79,6 +79,7 @@ properties:
               - mediatek,mt2712-tphy
               - mediatek,mt7629-tphy
               - mediatek,mt8183-tphy
+              - mediatek,mt8195-tphy
           - const: mediatek,generic-tphy-v2
       - const: mediatek,mt2701-u3phy
         deprecated: true
Signature · 1 line
2.14.1
maintainer Applied
#9 lore raw

Re: [PATCH 07/10] dt-bindings: phy: Add compatible for Mediatek MT8195

Quoted 2 lines · Seiya Wang

This commit adds dt-binding documentation of T-Phy for Mediatek MT8195 SoC Platform.

Applied, thanks

Signature · 6 lines
~Vinod

_______________________________________________
Linux-mediatek mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-mediatek
author
#10 lore raw

PATCH 8/10 dt-bindings: phy: Add compatible for Mediatek MT8195

In reply to Seiya Wang

This commit adds dt-binding documentation of UFS M-Phy for Mediatek MT8195 SoC Platform.

---
 Documentation/devicetree/bindings/phy/mediatek,ufs-phy.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/phy/mediatek,ufs-phy.yaml +1 -0
index 3a9be82e7f13..5235b1a0d188 100644
@@ -22,6 +22,7 @@ properties:
     pattern: "^ufs-phy@[0-9a-f]+$"
 
   compatible:
+    enum: mediatek,mt8195-ufsphy
     const: mediatek,mt8183-ufsphy
 
   reg:
Signature · 1 line
2.14.1
maintainer Applied
#11 lore raw

Re: [PATCH 08/10] dt-bindings: phy: Add compatible for Mediatek MT8195

Quoted 2 lines · Seiya Wang

This commit adds dt-binding documentation of UFS M-Phy for Mediatek MT8195 SoC Platform.

Applied, thanks

Signature · 6 lines
~Vinod

_______________________________________________
Linux-mediatek mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-mediatek
maintainer
#12 lore raw

Re: [PATCH 08/10] dt-bindings: phy: Add compatible for Mediatek MT8195

Hi Vinod,

Quoted 5 lines · Vinod Koul
Quoted 2 lines · Seiya Wang

This commit adds dt-binding documentation of UFS M-Phy for Mediatek MT8195 SoC Platform.

Applied, thanks

Usually, we expect the dt-binding patch is acked or reviewed by Rob before it's applied?

Thanks a lot

Quoted 1 line

_______________________________________________
Linux-mediatek mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-mediatek

maintainer
#13 lore raw

Re: [PATCH 08/10] dt-bindings: phy: Add compatible for Mediatek MT8195

In reply to Seiya Wang
Quoted 13 lines · Seiya Wang

This commit adds dt-binding documentation of UFS M-Phy for Mediatek MT8195 SoC Platform.

---
 Documentation/devicetree/bindings/phy/mediatek,ufs-phy.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/phy/mediatek,ufs-phy.yaml +0 -0
index 3a9be82e7f13..5235b1a0d188 100644

Documentation/devicetree/bindings/phy/mediatek,ufs-phy.yaml properties: · line 27

Quoted 6 lines
Documentation/devicetree/bindings/phy/mediatek,ufs-phy.yaml +1 -0
@@ -22,6 +22,7 @@ properties:
     pattern: "^ufs-phy@[0-9a-f]+$"
 
   compatible:
+    enum: mediatek,mt8195-ufsphy
     const: mediatek,mt8183-ufsphy
 

There is warning when I make dt_binding_check, if mt8195 is compatible with mt8183, will add it as following:

oneOf:
- items:
- enum:
- mediatek,mt8195-ufsphy
- const: mediatek,mt8183-ufsphy
- const: mediatek,mt8183-ufsphy

Due to Vinod already apply this patch, I'll send out a fix patch later

Thanks

Quoted 1 line
Documentation/devicetree/bindings/phy/mediatek,ufs-phy.yaml +0 -0
   reg:
author
#14 lore raw

Re: [PATCH 08/10] dt-bindings: phy: Add compatible for Mediatek MT8195

Quoted 30 lines · Chunfeng Yun
Quoted 13 lines · Seiya Wang

This commit adds dt-binding documentation of UFS M-Phy for Mediatek MT8195 SoC Platform.

---
 Documentation/devicetree/bindings/phy/mediatek,ufs-phy.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/phy/mediatek,ufs-phy.yaml +0 -0
index 3a9be82e7f13..5235b1a0d188 100644

Documentation/devicetree/bindings/phy/mediatek,ufs-phy.yaml properties: · line 27

Quoted 6 lines
Documentation/devicetree/bindings/phy/mediatek,ufs-phy.yaml +1 -0
@@ -22,6 +22,7 @@ properties:
     pattern: "^ufs-phy@[0-9a-f]+$"
 
   compatible:
+    enum: mediatek,mt8195-ufsphy
     const: mediatek,mt8183-ufsphy
 

There is warning when I make dt_binding_check, if mt8195 is compatible with mt8183, will add it as following:

oneOf:
- items:
- enum:
- mediatek,mt8195-ufsphy
- const: mediatek,mt8183-ufsphy
- const: mediatek,mt8183-ufsphy

Quoted 3 lines

Due to Vinod already apply this patch, I'll send out a fix patch later

Thanks

I will update the patch after a new linux-next tag available. Thank you very much.

Quoted 3 lines
Quoted 1 line
Documentation/devicetree/bindings/phy/mediatek,ufs-phy.yaml +0 -0
   reg:
author
#15 lore raw

PATCH 9/10 dt-bindings: arm: Add compatible for Mediatek MT8195

In reply to Seiya Wang

This commit adds dt-binding documentation for the Mediatek MT8195 reference board.

---
 Documentation/devicetree/bindings/arm/mediatek.yaml | 4 ++++
 1 file changed, 4 insertions(+)
Documentation/devicetree/bindings/arm/mediatek.yaml +4 -0
index 93b3bdf6eaeb..a95224fcff9f 100644
@@ -118,6 +118,10 @@ properties:
           - enum:
               - mediatek,mt8183-evb
           - const: mediatek,mt8183
+      - items:
+          - enum:
+              - mediatek,mt8195-evb
+          - const: mediatek,mt8195
       - description: Google Krane (Lenovo IdeaPad Duet, 10e,...)
         items:
           - enum:
Signature · 1 line
2.14.1
author
#16 lore raw

PATCH 10/10 arm64: dts: Add Mediatek SoC MT8195 and evaluation board dts and Makefile

In reply to Seiya Wang

Add basic chip support for Mediatek MT8195

---
 arch/arm64/boot/dts/mediatek/Makefile       |   1 +
 arch/arm64/boot/dts/mediatek/mt8195-evb.dts |  29 ++
 arch/arm64/boot/dts/mediatek/mt8195.dtsi    | 477 ++++++++++++++++++++++++++++
 3 files changed, 507 insertions(+)
 create mode 100644 arch/arm64/boot/dts/mediatek/mt8195-evb.dts
 create mode 100644 arch/arm64/boot/dts/mediatek/mt8195.dtsi
arch/arm64/boot/dts/mediatek/Makefile +1 -0
index deba27ab7657..aee4b9715d2f 100644
@@ -16,4 +16,5 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-evb.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-kukui-krane-sku0.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-kukui-krane-sku176.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt8192-evb.dtb
+dtb-$(CONFIG_ARCH_MEDIATEK) += mt8195-evb.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt8516-pumpkin.dtb
arch/arm64/boot/dts/mediatek/mt8195-evb.dts new file +29 -0
new file mode 100644
index 000000000000..82bb10e9a531
@@ -0,0 +1,29 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright (C) 2021 MediaTek Inc.
+ * Author: Seiya Wang <[email protected]>
+ */
+/dts-v1/;
+#include "mt8195.dtsi"
+
+/ {
+	model = "MediaTek MT8195 evaluation board";
+	compatible = "mediatek,mt8195-evb", "mediatek,mt8195";
+
+	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/mt8195.dtsi new file +477 -0

477 lines not on this page · raw message

Signature · 1 line
2.14.1
maintainer
#17 lore raw

Re: [PATCH 10/10] arm64: dts: Add Mediatek SoC MT8195 and evaluation board dts and Makefile

Quoted 94 lines · Seiya Wang

Add basic chip support for Mediatek MT8195

---
 arch/arm64/boot/dts/mediatek/Makefile       |   1 +
 arch/arm64/boot/dts/mediatek/mt8195-evb.dts |  29 ++
 arch/arm64/boot/dts/mediatek/mt8195.dtsi    | 477 ++++++++++++++++++++++++++++
 3 files changed, 507 insertions(+)
 create mode 100644 arch/arm64/boot/dts/mediatek/mt8195-evb.dts
 create mode 100644 arch/arm64/boot/dts/mediatek/mt8195.dtsi
arch/arm64/boot/dts/mediatek/Makefile +1 -0
index deba27ab7657..aee4b9715d2f 100644
@@ -16,4 +16,5 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-evb.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-kukui-krane-sku0.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-kukui-krane-sku176.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt8192-evb.dtb
+dtb-$(CONFIG_ARCH_MEDIATEK) += mt8195-evb.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt8516-pumpkin.dtb
arch/arm64/boot/dts/mediatek/mt8195-evb.dts new file +29 -0
new file mode 100644
index 000000000000..82bb10e9a531
@@ -0,0 +1,29 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright (C) 2021 MediaTek Inc.
+ * Author: Seiya Wang <[email protected]>
+ */
+/dts-v1/;
+#include "mt8195.dtsi"
+
+/ {
+	model = "MediaTek MT8195 evaluation board";
+	compatible = "mediatek,mt8195-evb", "mediatek,mt8195";
+
+	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/mt8195.dtsi new file +32 -0
new file mode 100644
index 000000000000..356583fe4f03
@@ -0,0 +1,477 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright (c) 2021 MediaTek Inc.
+ * Author: Seiya Wang <[email protected]>
+ */
+
+/dts-v1/;
+
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+
+/ {
+	compatible = "mediatek,mt8195";
+	interrupt-parent = <&gic>;
+	#address-cells = <2>;
+	#size-cells = <2>;
+
+	clocks {
+		clk26m: oscillator0 {
+			compatible = "fixed-clock";
+			#clock-cells = <0>;
+			clock-frequency = <26000000>;
+			clock-output-names = "clk26m";
+		};
+
+		clk32k: oscillator1 {
+			compatible = "fixed-clock";
+			#clock-cells = <0>;
+			clock-frequency = <32768>;
+			clock-output-names = "clk32k";
+		};
+	};

[...]

arch/arm64/boot/dts/mediatek/mt8195.dtsi line 381

Quoted 13 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +13 -0
+
+		nor_flash: nor@1132c000 {
+			compatible = "mediatek,mt8195-nor", "mediatek,mt8173-nor";
+			reg = <0 0x1132c000 0 0x1000>;
+			interrupts = <GIC_SPI 825 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&clk26m>, <&clk26m>;
+			clock-names = "spi", "sf";
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		u3phy2: usb-phy2@11c40000 {

use t-phy instead of usb-phy2

It's better to run dtbs_check for this patch

arch/arm64/boot/dts/mediatek/mt8195.dtsi line 384

Quoted 3 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +3 -0
+			compatible = "mediatek,mt8195-tphy", "mediatek,generic-tphy-v2";
+			clocks = <&clk26m>;
+			clock-names = "u3phya_ref";

No need clocks for v2

arch/arm64/boot/dts/mediatek/mt8195.dtsi line 390

Quoted 6 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +6 -0
+			#address-cells = <1>;
+			#size-cells = <1>;
+			ranges = <0 0 0x11c40000 0x700>;
+			status = "disabled";
+
+			u2port2: usb2-phy2@0 {

use usb-phy instead of usb2-phy2

arch/arm64/boot/dts/mediatek/mt8195.dtsi line 395

Quoted 5 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +5 -0
+				reg = <0x0 0x700>;
+				clocks = <&clk26m>;
+				clock-names = "ref";
+				#phy-cells = <1>;
+				status = "disabled";

I think no need disable it
it's parent node is already disabled. if enable parent node, we also want to enable all children at the same time.

arch/arm64/boot/dts/mediatek/mt8195.dtsi line 399

Quoted 4 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +4 -0
+			};
+		};
+
+		u3phy3: usb-phy3@11c50000 {

t-phy@...

arch/arm64/boot/dts/mediatek/mt8195.dtsi line 384

Quoted 3 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +3 -0
+			compatible = "mediatek,mt8195-tphy", "mediatek,generic-tphy-v2";
+			clocks = <&clk26m>;
+			clock-names = "u3phya_ref";

No need clocks

arch/arm64/boot/dts/mediatek/mt8195.dtsi line 408

Quoted 6 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +6 -0
+			#address-cells = <1>;
+			#size-cells = <1>;
+			ranges = <0 0 0x11c50000 0x700>;
+			status = "disabled";
+
+			u2port3: usb2-phy3@0 {

use usb-phy

arch/arm64/boot/dts/mediatek/mt8195.dtsi line 395

Quoted 5 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +5 -0
+				reg = <0x0 0x700>;
+				clocks = <&clk26m>;
+				clock-names = "ref";
+				#phy-cells = <1>;
+				status = "disabled";

remove status

arch/arm64/boot/dts/mediatek/mt8195.dtsi line 417

Quoted 4 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +4 -0
+			};
+		};
+
+		u3phy1: usb-phy1@11e30000 {

t-phy

arch/arm64/boot/dts/mediatek/mt8195.dtsi line 384

Quoted 3 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +3 -0
+			compatible = "mediatek,mt8195-tphy", "mediatek,generic-tphy-v2";
+			clocks = <&clk26m>;
+			clock-names = "u3phya_ref";

remove clocks*

arch/arm64/boot/dts/mediatek/mt8195.dtsi line 426

Quoted 6 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +6 -0
+			#address-cells = <1>;
+			#size-cells = <1>;
+			ranges = <0 0 0x11e30000 0xe00>;
+			status = "disabled";
+
+			u2port1: usb2-phy1@0 {

usb-phy

arch/arm64/boot/dts/mediatek/mt8195.dtsi line 395

Quoted 5 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +5 -0
+				reg = <0x0 0x700>;
+				clocks = <&clk26m>;
+				clock-names = "ref";
+				#phy-cells = <1>;
+				status = "disabled";

remove status

arch/arm64/boot/dts/mediatek/mt8195.dtsi line 434

Quoted 3 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +3 -0
+			};
+
+			u3port1: usb3-phy1@700 {

usb-phy

arch/arm64/boot/dts/mediatek/mt8195.dtsi line 439

Quoted 5 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +5 -0
+				reg = <0x700 0x700>;
+				clocks = <&clk26m>;
+				clock-names = "ref";
+				#phy-cells = <1>;
+				status = "disabled";

remove status

arch/arm64/boot/dts/mediatek/mt8195.dtsi line 443

Quoted 4 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +4 -0
+			};
+		};
+
+		u3phy0: usb-phy0@11e40000 {

t-phy

arch/arm64/boot/dts/mediatek/mt8195.dtsi line 384

Quoted 3 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +3 -0
+			compatible = "mediatek,mt8195-tphy", "mediatek,generic-tphy-v2";
+			clocks = <&clk26m>;
+			clock-names = "u3phya_ref";

remove clocks*

arch/arm64/boot/dts/mediatek/mt8195.dtsi line 452

Quoted 6 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +6 -0
+			#address-cells = <1>;
+			#size-cells = <1>;
+			ranges = <0 0 0x11e40000 0xe00>;
+			status = "disabled";
+
+			u2port0: usb2-phy0@0 {

usb-phy

arch/arm64/boot/dts/mediatek/mt8195.dtsi line 395

Quoted 5 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +5 -0
+				reg = <0x0 0x700>;
+				clocks = <&clk26m>;
+				clock-names = "ref";
+				#phy-cells = <1>;
+				status = "disabled";

remove status

arch/arm64/boot/dts/mediatek/mt8195.dtsi line 460

Quoted 3 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +3 -0
+			};
+
+			u3port0: usb3-phy0@700 {

usb-phy

arch/arm64/boot/dts/mediatek/mt8195.dtsi line 439

Quoted 5 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +5 -0
+				reg = <0x700 0x700>;
+				clocks = <&clk26m>;
+				clock-names = "ref";
+				#phy-cells = <1>;
+				status = "disabled";

remove status

arch/arm64/boot/dts/mediatek/mt8195.dtsi line 469

Quoted 4 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +4 -0
+			};
+		};
+
+		ufsphy: phy@11fa0000 {

usf-phy instead of phy

arch/arm64/boot/dts/mediatek/mt8195.dtsi line 474

Quoted 5 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +5 -0
+			compatible = "mediatek,mt8195-ufsphy", "mediatek,mt8183-ufsphy";
+			reg = <0 0x11fa0000 0 0xc000>;
+			clocks = <&clk26m>, <&clk26m>;
+			clock-names = "unipro", "mp";
+			#phy-cells = <0>;

disabled?

Thanks a lot

Quoted 3 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +3 -0
+		};
+	};
+};
author
#18 lore raw

Re: [PATCH 10/10] arm64: dts: Add Mediatek SoC MT8195 and evaluation board dts and Makefile

Quoted 225 lines · Chunfeng Yun
Quoted 94 lines · Seiya Wang

Add basic chip support for Mediatek MT8195

---
 arch/arm64/boot/dts/mediatek/Makefile       |   1 +
 arch/arm64/boot/dts/mediatek/mt8195-evb.dts |  29 ++
 arch/arm64/boot/dts/mediatek/mt8195.dtsi    | 477 ++++++++++++++++++++++++++++
 3 files changed, 507 insertions(+)
 create mode 100644 arch/arm64/boot/dts/mediatek/mt8195-evb.dts
 create mode 100644 arch/arm64/boot/dts/mediatek/mt8195.dtsi
arch/arm64/boot/dts/mediatek/Makefile +1 -0
index deba27ab7657..aee4b9715d2f 100644
@@ -16,4 +16,5 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-evb.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-kukui-krane-sku0.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-kukui-krane-sku176.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt8192-evb.dtb
+dtb-$(CONFIG_ARCH_MEDIATEK) += mt8195-evb.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt8516-pumpkin.dtb
arch/arm64/boot/dts/mediatek/mt8195-evb.dts new file +29 -0
new file mode 100644
index 000000000000..82bb10e9a531
@@ -0,0 +1,29 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright (C) 2021 MediaTek Inc.
+ * Author: Seiya Wang <[email protected]>
+ */
+/dts-v1/;
+#include "mt8195.dtsi"
+
+/ {
+	model = "MediaTek MT8195 evaluation board";
+	compatible = "mediatek,mt8195-evb", "mediatek,mt8195";
+
+	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/mt8195.dtsi new file +32 -0
new file mode 100644
index 000000000000..356583fe4f03
@@ -0,0 +1,477 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright (c) 2021 MediaTek Inc.
+ * Author: Seiya Wang <[email protected]>
+ */
+
+/dts-v1/;
+
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+
+/ {
+	compatible = "mediatek,mt8195";
+	interrupt-parent = <&gic>;
+	#address-cells = <2>;
+	#size-cells = <2>;
+
+	clocks {
+		clk26m: oscillator0 {
+			compatible = "fixed-clock";
+			#clock-cells = <0>;
+			clock-frequency = <26000000>;
+			clock-output-names = "clk26m";
+		};
+
+		clk32k: oscillator1 {
+			compatible = "fixed-clock";
+			#clock-cells = <0>;
+			clock-frequency = <32768>;
+			clock-output-names = "clk32k";
+		};
+	};

[...]

arch/arm64/boot/dts/mediatek/mt8195.dtsi line 381

Quoted 13 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +13 -0
+
+		nor_flash: nor@1132c000 {
+			compatible = "mediatek,mt8195-nor", "mediatek,mt8173-nor";
+			reg = <0 0x1132c000 0 0x1000>;
+			interrupts = <GIC_SPI 825 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&clk26m>, <&clk26m>;
+			clock-names = "spi", "sf";
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		u3phy2: usb-phy2@11c40000 {

use t-phy instead of usb-phy2

It's better to run dtbs_check for this patch

arch/arm64/boot/dts/mediatek/mt8195.dtsi line 384

Quoted 3 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +3 -0
+			compatible = "mediatek,mt8195-tphy", "mediatek,generic-tphy-v2";
+			clocks = <&clk26m>;
+			clock-names = "u3phya_ref";

No need clocks for v2

arch/arm64/boot/dts/mediatek/mt8195.dtsi line 390

Quoted 6 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +6 -0
+			#address-cells = <1>;
+			#size-cells = <1>;
+			ranges = <0 0 0x11c40000 0x700>;
+			status = "disabled";
+
+			u2port2: usb2-phy2@0 {

use usb-phy instead of usb2-phy2

arch/arm64/boot/dts/mediatek/mt8195.dtsi line 395

Quoted 5 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +5 -0
+				reg = <0x0 0x700>;
+				clocks = <&clk26m>;
+				clock-names = "ref";
+				#phy-cells = <1>;
+				status = "disabled";

I think no need disable it
it's parent node is already disabled. if enable parent node, we also want to enable all children at the same time.

arch/arm64/boot/dts/mediatek/mt8195.dtsi line 399

Quoted 4 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +4 -0
+			};
+		};
+
+		u3phy3: usb-phy3@11c50000 {

t-phy@...

arch/arm64/boot/dts/mediatek/mt8195.dtsi line 384

Quoted 3 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +3 -0
+			compatible = "mediatek,mt8195-tphy", "mediatek,generic-tphy-v2";
+			clocks = <&clk26m>;
+			clock-names = "u3phya_ref";

No need clocks

arch/arm64/boot/dts/mediatek/mt8195.dtsi line 408

Quoted 6 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +6 -0
+			#address-cells = <1>;
+			#size-cells = <1>;
+			ranges = <0 0 0x11c50000 0x700>;
+			status = "disabled";
+
+			u2port3: usb2-phy3@0 {

use usb-phy

arch/arm64/boot/dts/mediatek/mt8195.dtsi line 395

Quoted 5 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +5 -0
+				reg = <0x0 0x700>;
+				clocks = <&clk26m>;
+				clock-names = "ref";
+				#phy-cells = <1>;
+				status = "disabled";

remove status

arch/arm64/boot/dts/mediatek/mt8195.dtsi line 417

Quoted 4 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +4 -0
+			};
+		};
+
+		u3phy1: usb-phy1@11e30000 {

t-phy

arch/arm64/boot/dts/mediatek/mt8195.dtsi line 384

Quoted 3 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +3 -0
+			compatible = "mediatek,mt8195-tphy", "mediatek,generic-tphy-v2";
+			clocks = <&clk26m>;
+			clock-names = "u3phya_ref";

remove clocks*

arch/arm64/boot/dts/mediatek/mt8195.dtsi line 426

Quoted 6 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +6 -0
+			#address-cells = <1>;
+			#size-cells = <1>;
+			ranges = <0 0 0x11e30000 0xe00>;
+			status = "disabled";
+
+			u2port1: usb2-phy1@0 {

usb-phy

arch/arm64/boot/dts/mediatek/mt8195.dtsi line 395

Quoted 5 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +5 -0
+				reg = <0x0 0x700>;
+				clocks = <&clk26m>;
+				clock-names = "ref";
+				#phy-cells = <1>;
+				status = "disabled";

remove status

arch/arm64/boot/dts/mediatek/mt8195.dtsi line 434

Quoted 3 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +3 -0
+			};
+
+			u3port1: usb3-phy1@700 {

usb-phy

arch/arm64/boot/dts/mediatek/mt8195.dtsi line 439

Quoted 5 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +5 -0
+				reg = <0x700 0x700>;
+				clocks = <&clk26m>;
+				clock-names = "ref";
+				#phy-cells = <1>;
+				status = "disabled";

remove status

arch/arm64/boot/dts/mediatek/mt8195.dtsi line 443

Quoted 4 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +4 -0
+			};
+		};
+
+		u3phy0: usb-phy0@11e40000 {

t-phy

arch/arm64/boot/dts/mediatek/mt8195.dtsi line 384

Quoted 3 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +3 -0
+			compatible = "mediatek,mt8195-tphy", "mediatek,generic-tphy-v2";
+			clocks = <&clk26m>;
+			clock-names = "u3phya_ref";

remove clocks*

arch/arm64/boot/dts/mediatek/mt8195.dtsi line 452

Quoted 6 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +6 -0
+			#address-cells = <1>;
+			#size-cells = <1>;
+			ranges = <0 0 0x11e40000 0xe00>;
+			status = "disabled";
+
+			u2port0: usb2-phy0@0 {

usb-phy

arch/arm64/boot/dts/mediatek/mt8195.dtsi line 395

Quoted 5 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +5 -0
+				reg = <0x0 0x700>;
+				clocks = <&clk26m>;
+				clock-names = "ref";
+				#phy-cells = <1>;
+				status = "disabled";

remove status

arch/arm64/boot/dts/mediatek/mt8195.dtsi line 460

Quoted 3 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +3 -0
+			};
+
+			u3port0: usb3-phy0@700 {

usb-phy

arch/arm64/boot/dts/mediatek/mt8195.dtsi line 439

Quoted 5 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +5 -0
+				reg = <0x700 0x700>;
+				clocks = <&clk26m>;
+				clock-names = "ref";
+				#phy-cells = <1>;
+				status = "disabled";

remove status

arch/arm64/boot/dts/mediatek/mt8195.dtsi line 469

Quoted 4 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +4 -0
+			};
+		};
+
+		ufsphy: phy@11fa0000 {

usf-phy instead of phy

Quoted 8 lines

arch/arm64/boot/dts/mediatek/mt8195.dtsi line 474

Quoted 5 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +5 -0
+			compatible = "mediatek,mt8195-ufsphy", "mediatek,mt8183-ufsphy";
+			reg = <0 0x11fa0000 0 0xc000>;
+			clocks = <&clk26m>, <&clk26m>;
+			clock-names = "unipro", "mp";
+			#phy-cells = <0>;

disabled?

Thanks a lot

I will update the patch after a new linux-next tag available. Thank you very much.

Quoted 5 lines
Quoted 3 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +3 -0
+		};
+	};
+};
maintainer
#19 lore raw

Re: (subset) [PATCH 00/10] Add basic node support for Mediatek MT8195 SoC

In reply to Seiya Wang
Quoted 8 lines · Seiya Wang

MT8195 is a SoC based on 64bit ARMv8 architecture. It contains 4 CA55 and 4 CA78 cores.
MT8195 share many HW IP with MT65xx series.
This patchset was tested on MT8195 evaluation board to shell.

Based on v5.12-rc2

[...]

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next

Thanks!

[05/10] dt-bindings: spi: Add compatible for Mediatek MT8195

        commit: 5ac1b909e5b60cc2735bd9174f631dc2c7f44c5a

All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying to this mail.

Thanks,
Mark

_______________________________________________
Linux-mediatek mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-mediatek