Skip to contentSkip to conversation

Add basic SoC support for mediatek mt8195

PATCH Superseded Tinghan Shen 6 participants 10 messages Mar 30, 2022 – Apr 6, 2022

Subsystems (4)

v13 of 14 Superseded Latest is v14 →

lore
Share & tools
lore
#0 lore raw

v13 cover Add basic SoC support for mediatek mt8195

This series adds basic SoC support for Mediatek's SoC MT8195.

---
Changes in v13:
- add more description of reg items in mtk-sd.yaml
Changes in v12:
- update mtk-sd.yaml to extend reg property and fix yamllint error
- add xhci nodes and move xhci3 property (usb2-lpm-disable) to evb.dts
Changes in v11:
- rebase on 5.17-rc4
Changes in v10:
- clean CC list
Changes in v9:
- remove duplicated cpus dt-bindings patch in v8
Changes in v8:
- v7 mediatek,spi-mtk-nor.yaml patch is applied in branch for-5.17 at kernel/git/broonie/spi.git
- v7 pinctrl-mt8195.yaml patch is applied in branch for-next at kernel/git/linusw/linux-pinctrl.git
- add cortex-a78 compatible to cpus dt-bindings
- add mediatek,drive-strength-adv property to pinctrl dt-bindings
- fix evb dts
- remove i2c nodes with disabled status from dts
- fix pin properties not match pinctrl dt-bindings
- remove unnecessary u3port*
- fix dtsi
- fix node format
- reorder oscillator* nodes
- fix node name of cpu idle nodes
- remove clock-frequency property in the timer node
- reorder clock and clock names in usb nodes
Changes in v7:
- refine title of spi-nor dt-bindings patch
- refine commit message of pinctrl dt-bindings patch
- update pinctrl-mt8195.yaml
- change property pattern from 'pins' to '^pins'
- update examples with new property in descriptions
- add new example
- drop '_' from node names of pinctrl subnodes in mt8195-evb.dts
Changes in v6:
- rebase on 5.16-rc1
- add new clock name to spi-nor dt-bindings
- add "pins" property in pinctrl dt-bindings
- fix fails of dtbs_checks
- remove "arm,armv8" not matched in yaml from cpu compatile
- fix node name of xhci
- remvoe xhci upstreaming wakeup properties
- remove xhci unused properties address-cells and size-cells
- fix node name of ufs-phy
- fix node name of spi-nor
- fix node name and sub-nodes of pinctrl
- fix mmc compatible
Changes in v5:
- enable basic nodes in mt8195-evb.dts
- remove dedicated clock nodes
- add mmc2 node
- fix interrupt number of pinctrl node
- update clock nodes to apply internal fixes
- add dt-bindings for perficfg node

v4 thread:
https://lore.kernel.org/all/[email protected]/
v3 thread:
https://lore.kernel.org/all/[email protected]/
v2 thread:
https://lore.kernel.org/all/[email protected]/
v1 thread:
https://lore.kernel.org/all/[email protected]/
---

Tinghan Shen (2):
dt-bindings: mmc: mtk-sd: increase reg items
arm64: dts: Add mediatek SoC mt8195 and evaluation board

 .../devicetree/bindings/mmc/mtk-sd.yaml       |   15 +-
 arch/arm64/boot/dts/mediatek/Makefile         |    1 +
 arch/arm64/boot/dts/mediatek/mt8195-evb.dts   |  173 +++
 arch/arm64/boot/dts/mediatek/mt8195.dtsi      | 1045 +++++++++++++++++
 4 files changed, 1233 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm64/boot/dts/mediatek/mt8195-evb.dts
 create mode 100644 arch/arm64/boot/dts/mediatek/mt8195.dtsi
Signature · 1 line
2.18.0
#1 lore raw

PATCH v13 1/2 dt-bindings: mmc: mtk-sd: increase reg items

MediaTek has a new version of mmc IP since mt8183. Some IO registers are moved to top to improve hardware design and named as "host top registers".

Add host top register in the reg binding description for mt8183 and successors.

---
 Documentation/devicetree/bindings/mmc/mtk-sd.yaml | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/mmc/mtk-sd.yaml +14 -1
index 297ada03e3de..2a2e9fa8c188 100644
@@ -40,7 +40,10 @@ properties:
           - const: mediatek,mt8183-mmc
 
   reg:
-    maxItems: 1
+    minItems: 1
+    items:
+      - description: base register (required).
+      - description: top base register (required for MT8183).
 
   clocks:
     description:
@@ -168,6 +171,16 @@ required:
   - vmmc-supply
   - vqmmc-supply
 
+if:
+  properties:
+    compatible:
+      contains:
+        const: mediatek,mt8183-mmc
+then:
+  properties:
+    reg:
+      minItems: 2
+
 unevaluatedProperties: false
 
 examples:
Signature · 1 line
2.18.0
maintainer
#2 lore raw

Re: [PATCH v13 1/2] dt-bindings: mmc: mtk-sd: increase reg items

Quoted 18 lines · Tinghan Shen

MediaTek has a new version of mmc IP since mt8183. Some IO registers are moved to top to improve hardware design and named as "host top registers".

Add host top register in the reg binding description for mt8183 and successors.

---
  Documentation/devicetree/bindings/mmc/mtk-sd.yaml | 15 ++++++++++++++-
  1 file changed, 14 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/mmc/mtk-sd.yaml +0 -0
index 297ada03e3de..2a2e9fa8c188 100644

Documentation/devicetree/bindings/mmc/mtk-sd.yaml properties: · line 43

Quoted 5 lines
Documentation/devicetree/bindings/mmc/mtk-sd.yaml +1 -1
@@ -40,7 +40,10 @@ properties:
            - const: mediatek,mt8183-mmc
 
    reg:
-    maxItems: 1
+    minItems: 1

From my understanding adding minItems is correct, but you need to add also maxItems: 2 as there can't be more then two register entries.

Regards,
Matthias

Quoted 23 lines
Documentation/devicetree/bindings/mmc/mtk-sd.yaml +13 -0
+    items:
+      - description: base register (required).
+      - description: top base register (required for MT8183).
 
    clocks:
      description:
@@ -168,6 +171,16 @@ required:
    - vmmc-supply
    - vqmmc-supply
 
+if:
+  properties:
+    compatible:
+      contains:
+        const: mediatek,mt8183-mmc
+then:
+  properties:
+    reg:
+      minItems: 2
+
  unevaluatedProperties: false
 
  examples:
#3 lore raw

Re: [PATCH v13 1/2] dt-bindings: mmc: mtk-sd: increase reg items

Hi Matthias,

Quoted 30 lines · Matthias Brugger
Quoted 19 lines · Tinghan Shen

MediaTek has a new version of mmc IP since mt8183. Some IO registers are moved to top to improve hardware design and named as "host top registers".

Add host top register in the reg binding description for mt8183 and successors.

---
  Documentation/devicetree/bindings/mmc/mtk-sd.yaml | 15 ++++++++++++++-
  1 file changed, 14 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/mmc/mtk-sd.yaml +0 -0
index 297ada03e3de..2a2e9fa8c188 100644

Documentation/devicetree/bindings/mmc/mtk-sd.yaml properties: · line 43

Quoted 5 lines
Documentation/devicetree/bindings/mmc/mtk-sd.yaml +1 -1
@@ -40,7 +40,10 @@ properties:
            - const: mediatek,mt8183-mmc
 
    reg:
-    maxItems: 1
+    minItems: 1

From my understanding adding minItems is correct, but you need to add also
maxItems: 2 as there can't be more then two register entries.

Quoted 3 lines

Regards,
Matthias

After add "maxItems: 2", I get following message when doing dt_binding_check. from this message, it looks like that maxItems is not necessary.

/proj/mtk15399/2cros/src/third_party/kernel/v5.10/Documentation/devicetree/bindings/mmc/mtk-sd.yaml:
properties:reg: {'minItems': 1, 'maxItems': 2, 'items': [{'description': 'base register (required).'}, {'description': 'top base register (required for MT8183).'}]} should not be valid under {'required': ['maxItems']}
hint: "maxItems" is not needed with an "items" list
from schema $id: http://devicetree.org/meta-schemas/items.yaml#
SCHEMA Documentation/devicetree/bindings/processed-schema.json

Best regards,
Tinghan

Quoted 23 lines
Quoted 23 lines
Documentation/devicetree/bindings/mmc/mtk-sd.yaml +13 -0
+    items:
+      - description: base register (required).
+      - description: top base register (required for MT8183).
 
    clocks:
      description:
@@ -168,6 +171,16 @@ required:
    - vmmc-supply
    - vqmmc-supply
 
+if:
+  properties:
+    compatible:
+      contains:
+        const: mediatek,mt8183-mmc
+then:
+  properties:
+    reg:
+      minItems: 2
+
  unevaluatedProperties: false
 
  examples:
#4 lore raw

Re: [PATCH v13 1/2] dt-bindings: mmc: mtk-sd: increase reg items

Quoted 33 lines · Tinghan Shen

Hi Matthias,

Quoted 30 lines · Matthias Brugger
Quoted 19 lines · Tinghan Shen

MediaTek has a new version of mmc IP since mt8183. Some IO registers are moved to top to improve hardware design and named as "host top registers".

Add host top register in the reg binding description for mt8183 and successors.

---
  Documentation/devicetree/bindings/mmc/mtk-sd.yaml | 15 ++++++++++++++-
  1 file changed, 14 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/mmc/mtk-sd.yaml +0 -0
index 297ada03e3de..2a2e9fa8c188 100644

Documentation/devicetree/bindings/mmc/mtk-sd.yaml properties: · line 43

Quoted 5 lines
Documentation/devicetree/bindings/mmc/mtk-sd.yaml +1 -1
@@ -40,7 +40,10 @@ properties:
            - const: mediatek,mt8183-mmc
 
    reg:
-    maxItems: 1
+    minItems: 1

From my understanding adding minItems is correct, but you need to add also
maxItems: 2 as there can't be more then two register entries.

Quoted 6 lines
Quoted 3 lines

Regards,
Matthias

After add "maxItems: 2", I get following message when doing dt_binding_check. from this message, it looks like that maxItems is not necessary.

That's correct, you don't need them because "items" defines it.

Best regards,
Krzysztof

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

maintainer Reviewed-by on v13 1/2
#5 lore raw

Re: [PATCH v13 1/2] dt-bindings: mmc: mtk-sd: increase reg items

In reply to Tinghan Shen
Quoted 4 lines · Tinghan Shen

MediaTek has a new version of mmc IP since mt8183. Some IO registers are moved to top to improve hardware design and named as "host top registers".

Quoted 9 lines

Add host top register in the reg binding description for mt8183 and successors.

---
 Documentation/devicetree/bindings/mmc/mtk-sd.yaml | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

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

#6 lore raw

Re: [PATCH v13 1/2] dt-bindings: mmc: mtk-sd: increase reg items

In reply to Tinghan Shen
Quoted 10 lines · Tinghan Shen

MediaTek has a new version of mmc IP since mt8183. Some IO registers are moved to top to improve hardware design and named as "host top registers".

Add host top register in the reg binding description for mt8183 and successors.

Applied for next, thanks!

Kind regards
Uffe

Quoted 38 lines
---
 Documentation/devicetree/bindings/mmc/mtk-sd.yaml | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/mmc/mtk-sd.yaml +14 -2
index 297ada03e3de..2a2e9fa8c188 100644
@@ -40,7 +40,10 @@ properties:
           - const: mediatek,mt8183-mmc
 
   reg:
-    maxItems: 1
+    minItems: 1
+    items:
+      - description: base register (required).
+      - description: top base register (required for MT8183).
 
   clocks:
     description:
@@ -168,6 +171,16 @@ required:
   - vmmc-supply
   - vqmmc-supply
 
+if:
+  properties:
+    compatible:
+      contains:
+        const: mediatek,mt8183-mmc
+then:
+  properties:
+    reg:
+      minItems: 2
+
 unevaluatedProperties: false
 
 examples:
--
Quoted 2 lines

2.18.0

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

#7 lore raw

PATCH v13 2/2 arm64: dts: Add mediatek SoC mt8195 and evaluation board

In reply to Tinghan Shen

Add basic chip support for mediatek mt8195.

---
 arch/arm64/boot/dts/mediatek/Makefile       |    1 +
 arch/arm64/boot/dts/mediatek/mt8195-evb.dts |  173 +++
 arch/arm64/boot/dts/mediatek/mt8195.dtsi    | 1045 +++++++++++++++++++
 3 files changed, 1219 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 8c1e18032f9f..5da29e7223e4 100644
@@ -38,4 +38,5 @@ 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) += 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 +173 -0

173 lines not on this page · raw message

arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +1045 -0

1,045 lines not on this page · raw message

Signature · 1 line
2.18.0
#8 lore raw

Re: [PATCH v13 2/2] arm64: dts: Add mediatek SoC mt8195 and evaluation board

Quoted 171 lines · Tinghan Shen

Add basic chip support for mediatek mt8195.

Reviewed-by AngeloGioacchino Del Regno <

[email protected]>

---
 arch/arm64/boot/dts/mediatek/Makefile       |    1 +
 arch/arm64/boot/dts/mediatek/mt8195-evb.dts |  173 +++
 arch/arm64/boot/dts/mediatek/mt8195.dtsi    | 1045
+++++++++++++++++++
 3 files changed, 1219 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 +0 -0
index 8c1e18032f9f..5da29e7223e4 100644
@@ -38,4 +38,5 @@ 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) += mt8192-evb.dtb

arch/arm64/boot/dts/mediatek/Makefile +1 -0
+dtb-$(CONFIG_ARCH_MEDIATEK) += mt8195-evb.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt8516-pumpkin.dtb
arch/arm64/boot/dts/mediatek/mt8195-evb.dts new file +137 -0
new file mode 100644
index 000000000000..76b5aaad7263
@@ -0,0 +1,173 @@
+// 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>;
+	};
+};
+
+&auxadc {
+	status = "okay";
+};
+
+&i2c0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c0_pin>;
+	clock-frequency = <100000>;
+	status = "okay";
+};
+
+&i2c1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c1_pin>;
+	clock-frequency = <400000>;
+	status = "okay";
+};
+
+&i2c4 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c4_pin>;
+	clock-frequency = <400000>;
+	status = "okay";
+};
+
+&i2c6 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c6_pin>;
+	clock-frequency = <400000>;
+	status = "okay";
+};
+
+&nor_flash {
+	status = "okay";
+	pinctrl-names = "default";
+	pinctrl-0 = <&nor_pins_default>;
+
+	flash@0 {
+		compatible = "jedec,spi-nor";
+		reg = <0>;
+		spi-max-frequency = <50000000>;
+	};
+};
+
+&pio {
+	i2c0_pin: i2c0-pins {
+		pins {
+			pinmux = <PINMUX_GPIO8__FUNC_SDA0>,
+				 <PINMUX_GPIO9__FUNC_SCL0>;
+			bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
+			mediatek,drive-strength-adv = <0>;
+			drive-strength = <6>;
+		};
+	};
+
+	i2c1_pin: i2c1-pins {
+		pins {
+			pinmux = <PINMUX_GPIO10__FUNC_SDA1>,
+				 <PINMUX_GPIO11__FUNC_SCL1>;
+			bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
+			mediatek,drive-strength-adv = <0>;
+			drive-strength = <6>;
+		};
+	};
+
+	i2c4_pin: i2c4-pins {
+		pins {
+			pinmux = <PINMUX_GPIO16__FUNC_SDA4>,
+				 <PINMUX_GPIO17__FUNC_SCL4>;
+			bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
+			mediatek,drive-strength-adv = <7>;
+		};
+	};
+
+	i2c6_pin: i2c6-pins {
+		pins {
+			pinmux = <PINMUX_GPIO25__FUNC_SDA6>,
+				 <PINMUX_GPIO26__FUNC_SCL6>;
+			bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
+		};
+	};
+
+	i2c7_pin: i2c7-pins {
+		pins {
+			pinmux = <PINMUX_GPIO27__FUNC_SCL7>,
+				 <PINMUX_GPIO28__FUNC_SDA7>;
+			bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
+		};
+	};
+
+	nor_pins_default: nor-pins {
+		pins0 {
+			pinmux = <PINMUX_GPIO142__FUNC_SPINOR_IO0>,
+				 <PINMUX_GPIO141__FUNC_SPINOR_CK>,
+				 <PINMUX_GPIO143__FUNC_SPINOR_IO1>;
+			bias-pull-down;
+		};
+
+		pins1 {
+			pinmux = <PINMUX_GPIO140__FUNC_SPINOR_CS>,
+				 <PINMUX_GPIO130__FUNC_SPINOR_IO2>,
+				 <PINMUX_GPIO131__FUNC_SPINOR_IO3>;
+			bias-pull-up;
+		};
+	};
+
+	uart0_pin: uart0-pins {
+		pins {
+			pinmux = <PINMUX_GPIO98__FUNC_UTXD0>,
+				 <PINMUX_GPIO99__FUNC_URXD0>;
+		};

arch/arm64/boot/dts/mediatek/mt8195-evb.dts line 147

Quoted 10 lines
arch/arm64/boot/dts/mediatek/mt8195-evb.dts new file +10 -0
+	};
+};
+
+&u3phy0 {
+	status="okay";
+};
+
+&u3phy1 {
+	status="okay";
+};

Seems forget to enable &phy2/3? due to xhci2/3 are enabled below

Quoted 27 lines
arch/arm64/boot/dts/mediatek/mt8195-evb.dts new file +26 -0
+
+&uart0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart0_pin>;
+	status = "okay";
+};
+
+&xhci0 {
+	status = "okay";
+};
+
+&xhci1 {
+	status = "okay";
+};
+
+&xhci2 {
+	status = "okay";
+};
+
+&xhci3 {
+	/* This controller is connected with a BT device.
+	 * Disable usb2 lpm to prevent known issues.
+	 */
+	usb2-lpm-disable;
+	status = "okay";
+};

[skip]

#9 lore raw

Re: [PATCH v13 2/2] arm64: dts: Add mediatek SoC mt8195 and evaluation board

Quoted 176 lines · Chunfeng Yun
Quoted 175 lines · Tinghan Shen

Add basic chip support for mediatek mt8195.

Reviewed-by AngeloGioacchino Del Regno <

[email protected]>

---
 arch/arm64/boot/dts/mediatek/Makefile       |    1 +
 arch/arm64/boot/dts/mediatek/mt8195-evb.dts |  173 +++
 arch/arm64/boot/dts/mediatek/mt8195.dtsi    | 1045
+++++++++++++++++++
 3 files changed, 1219 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 +0 -0
index 8c1e18032f9f..5da29e7223e4 100644
@@ -38,4 +38,5 @@ 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) += mt8192-evb.dtb

arch/arm64/boot/dts/mediatek/Makefile +1 -0
+dtb-$(CONFIG_ARCH_MEDIATEK) += mt8195-evb.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt8516-pumpkin.dtb
arch/arm64/boot/dts/mediatek/mt8195-evb.dts new file +141 -0
new file mode 100644
index 000000000000..76b5aaad7263
@@ -0,0 +1,173 @@
+// 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>;
+	};
+};
+
+&auxadc {
+	status = "okay";
+};
+
+&i2c0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c0_pin>;
+	clock-frequency = <100000>;
+	status = "okay";
+};
+
+&i2c1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c1_pin>;
+	clock-frequency = <400000>;
+	status = "okay";
+};
+
+&i2c4 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c4_pin>;
+	clock-frequency = <400000>;
+	status = "okay";
+};
+
+&i2c6 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c6_pin>;
+	clock-frequency = <400000>;
+	status = "okay";
+};
+
+&nor_flash {
+	status = "okay";
+	pinctrl-names = "default";
+	pinctrl-0 = <&nor_pins_default>;
+
+	flash@0 {
+		compatible = "jedec,spi-nor";
+		reg = <0>;
+		spi-max-frequency = <50000000>;
+	};
+};
+
+&pio {
+	i2c0_pin: i2c0-pins {
+		pins {
+			pinmux = <PINMUX_GPIO8__FUNC_SDA0>,
+				 <PINMUX_GPIO9__FUNC_SCL0>;
+			bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
+			mediatek,drive-strength-adv = <0>;
+			drive-strength = <6>;
+		};
+	};
+
+	i2c1_pin: i2c1-pins {
+		pins {
+			pinmux = <PINMUX_GPIO10__FUNC_SDA1>,
+				 <PINMUX_GPIO11__FUNC_SCL1>;
+			bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
+			mediatek,drive-strength-adv = <0>;
+			drive-strength = <6>;
+		};
+	};
+
+	i2c4_pin: i2c4-pins {
+		pins {
+			pinmux = <PINMUX_GPIO16__FUNC_SDA4>,
+				 <PINMUX_GPIO17__FUNC_SCL4>;
+			bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
+			mediatek,drive-strength-adv = <7>;
+		};
+	};
+
+	i2c6_pin: i2c6-pins {
+		pins {
+			pinmux = <PINMUX_GPIO25__FUNC_SDA6>,
+				 <PINMUX_GPIO26__FUNC_SCL6>;
+			bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
+		};
+	};
+
+	i2c7_pin: i2c7-pins {
+		pins {
+			pinmux = <PINMUX_GPIO27__FUNC_SCL7>,
+				 <PINMUX_GPIO28__FUNC_SDA7>;
+			bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
+		};
+	};
+
+	nor_pins_default: nor-pins {
+		pins0 {
+			pinmux = <PINMUX_GPIO142__FUNC_SPINOR_IO0>,
+				 <PINMUX_GPIO141__FUNC_SPINOR_CK>,
+				 <PINMUX_GPIO143__FUNC_SPINOR_IO1>;
+			bias-pull-down;
+		};
+
+		pins1 {
+			pinmux = <PINMUX_GPIO140__FUNC_SPINOR_CS>,
+				 <PINMUX_GPIO130__FUNC_SPINOR_IO2>,
+				 <PINMUX_GPIO131__FUNC_SPINOR_IO3>;
+			bias-pull-up;
+		};
+	};
+
+	uart0_pin: uart0-pins {
+		pins {
+			pinmux = <PINMUX_GPIO98__FUNC_UTXD0>,
+				 <PINMUX_GPIO99__FUNC_URXD0>;
+		};
+	};
+};
+
+&u3phy0 {
Quoted 8 lines

arch/arm64/boot/dts/mediatek/mt8195-evb.dts line 147

Quoted 6 lines
arch/arm64/boot/dts/mediatek/mt8195-evb.dts new file +6 -0
+	status="okay";
+};
+
+&u3phy1 {
+	status="okay";
+};

Seems forget to enable &phy2/3? due to xhci2/3 are enabled below

Ok, I'll add them at next version.
Thank you.

Best regards,
Tinghan

Quoted 31 lines
Quoted 28 lines
arch/arm64/boot/dts/mediatek/mt8195-evb.dts new file +26 -0
+
+&uart0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart0_pin>;
+	status = "okay";
+};
+
+&xhci0 {
+	status = "okay";
+};
+
+&xhci1 {
+	status = "okay";
+};
+
+&xhci2 {
+	status = "okay";
+};
+
+&xhci3 {
+	/* This controller is connected with a BT device.
+	 * Disable usb2 lpm to prevent known issues.
+	 */
+	usb2-lpm-disable;
+	status = "okay";
+};

[skip]