Skip to contentSkip to conversation

Add basic SoC support for mediatek mt8195

PATCH Applied Tinghan Shen 5 participants 16 messages Feb 16, 2022 – Mar 30, 2022

Subsystems (4)

v11 of 14 Applied Latest is v14 →

lore
Share & tools
lore
#0 lore raw

v11 cover Add basic SoC support for mediatek mt8195

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

---
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 (3):
dt-bindings: arm: mediatek: Add mt8195 pericfg compatible
dt-bindings: pinctrl: mt8195: Add mediatek,drive-strength-adv property
arm64: dts: Add mediatek SoC mt8195 and evaluation board

 .../arm/mediatek/mediatek,pericfg.yaml        |    1 +
 .../bindings/pinctrl/pinctrl-mt8195.yaml      |   35 +
 arch/arm64/boot/dts/mediatek/Makefile         |    1 +
 arch/arm64/boot/dts/mediatek/mt8195-evb.dts   |  161 +++
 arch/arm64/boot/dts/mediatek/mt8195.dtsi      | 1049 +++++++++++++++++
 5 files changed, 1247 insertions(+)
 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 v11 1/3 dt-bindings: arm: mediatek: Add mt8195 pericfg compatible

Add mt8195 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 8723dfe34bab..611f666f359d 100644
@@ -26,6 +26,7 @@ properties:
               - mediatek,mt8135-pericfg
               - mediatek,mt8173-pericfg
               - mediatek,mt8183-pericfg
+              - mediatek,mt8195-pericfg
               - mediatek,mt8516-pericfg
           - const: syscon
       - items:
Signature · 1 line
2.18.0
maintainer Applied
#2 lore raw

Re: [PATCH v11 1/3] dt-bindings: arm: mediatek: Add mt8195 pericfg compatible

Quoted 5 lines · Tinghan Shen

Add mt8195 pericfg compatible to binding document.

Applied, thanks!

Quoted 16 lines
---
  .../devicetree/bindings/arm/mediatek/mediatek,pericfg.yaml       | 1 +
  1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/arm/mediatek/mediatek,pericfg.yaml +1 -0
index 8723dfe34bab..611f666f359d 100644
@@ -26,6 +26,7 @@ properties:
                - mediatek,mt8135-pericfg
                - mediatek,mt8173-pericfg
                - mediatek,mt8183-pericfg
+              - mediatek,mt8195-pericfg
                - mediatek,mt8516-pericfg
            - const: syscon
        - items:
#3 lore raw

PATCH v11 2/3 dt-bindings: pinctrl: mt8195: Add mediatek,drive-strength-adv property

In reply to Tinghan Shen

Extend driving support for I2C pins on SoC mt8195.
This property is already documented in mediatek,mt8183-pinctrl.yaml.

---
 .../bindings/pinctrl/pinctrl-mt8195.yaml      | 35 +++++++++++++++++++
 1 file changed, 35 insertions(+)
Documentation/devicetree/bindings/pinctrl/pinctrl-mt8195.yaml +35 -0
index 8299662c2c09..c5b755514c46 100644
@@ -98,6 +98,32 @@ patternProperties:
           drive-strength:
             enum: [2, 4, 6, 8, 10, 12, 14, 16]
 
+          mediatek,drive-strength-adv:
+            description: |
+              Describe the specific driving setup property.
+              For I2C pins, the existing generic driving setup can only support
+              2/4/6/8/10/12/14/16mA driving. But in specific driving setup, they
+              can support 0.125/0.25/0.5/1mA adjustment. If we enable specific
+              driving setup, the existing generic setup will be disabled.
+              The specific driving setup is controlled by E1E0EN.
+              When E1=0/E0=0, the strength is 0.125mA.
+              When E1=0/E0=1, the strength is 0.25mA.
+              When E1=1/E0=0, the strength is 0.5mA.
+              When E1=1/E0=1, the strength is 1mA.
+              EN is used to enable or disable the specific driving setup.
+              Valid arguments are described as below:
+              0: (E1, E0, EN) = (0, 0, 0)
+              1: (E1, E0, EN) = (0, 0, 1)
+              2: (E1, E0, EN) = (0, 1, 0)
+              3: (E1, E0, EN) = (0, 1, 1)
+              4: (E1, E0, EN) = (1, 0, 0)
+              5: (E1, E0, EN) = (1, 0, 1)
+              6: (E1, E0, EN) = (1, 1, 0)
+              7: (E1, E0, EN) = (1, 1, 1)
+              So the valid arguments are from 0 to 7.
+            $ref: /schemas/types.yaml#/definitions/uint32
+            enum: [0, 1, 2, 3, 4, 5, 6, 7]
+
           bias-pull-down:
             oneOf:
               - type: boolean
@@ -270,4 +296,13 @@ examples:
           bias-pull-down;
         };
       };
+
+      i2c0-pins {
+        pins {
+          pinmux = <PINMUX_GPIO8__FUNC_SDA0>,
+                   <PINMUX_GPIO9__FUNC_SCL0>;
+          bias-disable;
+          mediatek,drive-strength-adv = <7>;
+        };
+      };
     };
Signature · 1 line
2.18.0
maintainer Reviewed-by on v11 2/3
#4 lore raw

Re: [PATCH v11 2/3] dt-bindings: pinctrl: mt8195: Add mediatek,drive-strength-adv property

Il 16/02/22 12:31, Tinghan Shen ha scritto:

Quoted 5 lines

Extend driving support for I2C pins on SoC mt8195.
This property is already documented in mediatek,mt8183-pinctrl.yaml.

Quoted 55 lines
---
  .../bindings/pinctrl/pinctrl-mt8195.yaml      | 35 +++++++++++++++++++
  1 file changed, 35 insertions(+)
Documentation/devicetree/bindings/pinctrl/pinctrl-mt8195.yaml +35 -0
index 8299662c2c09..c5b755514c46 100644
@@ -98,6 +98,32 @@ patternProperties:
            drive-strength:
              enum: [2, 4, 6, 8, 10, 12, 14, 16]
 
+          mediatek,drive-strength-adv:
+            description: |
+              Describe the specific driving setup property.
+              For I2C pins, the existing generic driving setup can only support
+              2/4/6/8/10/12/14/16mA driving. But in specific driving setup, they
+              can support 0.125/0.25/0.5/1mA adjustment. If we enable specific
+              driving setup, the existing generic setup will be disabled.
+              The specific driving setup is controlled by E1E0EN.
+              When E1=0/E0=0, the strength is 0.125mA.
+              When E1=0/E0=1, the strength is 0.25mA.
+              When E1=1/E0=0, the strength is 0.5mA.
+              When E1=1/E0=1, the strength is 1mA.
+              EN is used to enable or disable the specific driving setup.
+              Valid arguments are described as below:
+              0: (E1, E0, EN) = (0, 0, 0)
+              1: (E1, E0, EN) = (0, 0, 1)
+              2: (E1, E0, EN) = (0, 1, 0)
+              3: (E1, E0, EN) = (0, 1, 1)
+              4: (E1, E0, EN) = (1, 0, 0)
+              5: (E1, E0, EN) = (1, 0, 1)
+              6: (E1, E0, EN) = (1, 1, 0)
+              7: (E1, E0, EN) = (1, 1, 1)
+              So the valid arguments are from 0 to 7.
+            $ref: /schemas/types.yaml#/definitions/uint32
+            enum: [0, 1, 2, 3, 4, 5, 6, 7]
+
            bias-pull-down:
              oneOf:
                - type: boolean
@@ -270,4 +296,13 @@ examples:
            bias-pull-down;
          };
        };
+
+      i2c0-pins {
+        pins {
+          pinmux = <PINMUX_GPIO8__FUNC_SDA0>,
+                   <PINMUX_GPIO9__FUNC_SCL0>;
+          bias-disable;
+          mediatek,drive-strength-adv = <7>;
+        };
+      };
      };
maintainer
#5 lore raw

Re: [PATCH v11 2/3] dt-bindings: pinctrl: mt8195: Add mediatek,drive-strength-adv property

In reply to Tinghan Shen

Hi Linus,

Quoted 5 lines · Tinghan Shen

Extend driving support for I2C pins on SoC mt8195.
This property is already documented in mediatek,mt8183-pinctrl.yaml.

Will you take this one through your tree or shall I take it. In the latter case I'd need an Acked-by from you.

Regards,
Matthias

Quoted 55 lines
---
  .../bindings/pinctrl/pinctrl-mt8195.yaml      | 35 +++++++++++++++++++
  1 file changed, 35 insertions(+)
Documentation/devicetree/bindings/pinctrl/pinctrl-mt8195.yaml +35 -0
index 8299662c2c09..c5b755514c46 100644
@@ -98,6 +98,32 @@ patternProperties:
            drive-strength:
              enum: [2, 4, 6, 8, 10, 12, 14, 16]
 
+          mediatek,drive-strength-adv:
+            description: |
+              Describe the specific driving setup property.
+              For I2C pins, the existing generic driving setup can only support
+              2/4/6/8/10/12/14/16mA driving. But in specific driving setup, they
+              can support 0.125/0.25/0.5/1mA adjustment. If we enable specific
+              driving setup, the existing generic setup will be disabled.
+              The specific driving setup is controlled by E1E0EN.
+              When E1=0/E0=0, the strength is 0.125mA.
+              When E1=0/E0=1, the strength is 0.25mA.
+              When E1=1/E0=0, the strength is 0.5mA.
+              When E1=1/E0=1, the strength is 1mA.
+              EN is used to enable or disable the specific driving setup.
+              Valid arguments are described as below:
+              0: (E1, E0, EN) = (0, 0, 0)
+              1: (E1, E0, EN) = (0, 0, 1)
+              2: (E1, E0, EN) = (0, 1, 0)
+              3: (E1, E0, EN) = (0, 1, 1)
+              4: (E1, E0, EN) = (1, 0, 0)
+              5: (E1, E0, EN) = (1, 0, 1)
+              6: (E1, E0, EN) = (1, 1, 0)
+              7: (E1, E0, EN) = (1, 1, 1)
+              So the valid arguments are from 0 to 7.
+            $ref: /schemas/types.yaml#/definitions/uint32
+            enum: [0, 1, 2, 3, 4, 5, 6, 7]
+
            bias-pull-down:
              oneOf:
                - type: boolean
@@ -270,4 +296,13 @@ examples:
            bias-pull-down;
          };
        };
+
+      i2c0-pins {
+        pins {
+          pinmux = <PINMUX_GPIO8__FUNC_SDA0>,
+                   <PINMUX_GPIO9__FUNC_SCL0>;
+          bias-disable;
+          mediatek,drive-strength-adv = <7>;
+        };
+      };
      };
#6 lore raw

Re: [PATCH v11 2/3] dt-bindings: pinctrl: mt8195: Add mediatek,drive-strength-adv property

Quoted 11 lines · Matthias Brugger

Hi Linus,

Quoted 5 lines · Tinghan Shen

Extend driving support for I2C pins on SoC mt8195.
This property is already documented in mediatek,mt8183-pinctrl.yaml.

Will you take this one through your tree or shall I take it. In the latter case I'd need an Acked-by from you.

I applied it sorry for being slow.

As it is a DT binding I don't mind if its applied elsewhere as long as it has Rob's or Mark's ACK.

Yours,
Linus Walleij

#8 lore raw

PATCH v11 3/3 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 |  161 +++
 arch/arm64/boot/dts/mediatek/mt8195.dtsi    | 1049 +++++++++++++++++++
 3 files changed, 1211 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 +161 -0

161 lines not on this page · raw message

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

1,049 lines not on this page · raw message

Signature · 1 line
2.18.0
maintainer
#9 lore raw

Re: [PATCH v11 3/3] arm64: dts: Add mediatek SoC mt8195 and evaluation board

Quoted 29 lines · Tinghan Shen

Add basic chip support for mediatek mt8195.

---
  arch/arm64/boot/dts/mediatek/Makefile       |    1 +
  arch/arm64/boot/dts/mediatek/mt8195-evb.dts |  161 +++
  arch/arm64/boot/dts/mediatek/mt8195.dtsi    | 1049 +++++++++++++++++++
  3 files changed, 1211 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 +0 -0
new file mode 100644
index 000000000000..51633d91d984
@@ -0,0 +1,161 @@

[...]

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

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

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

So we enable phys for xhci but not the device. Are we missing anything to enable them on the EVB?

Quoted 11 lines

+&uart0 {

arch/arm64/boot/dts/mediatek/mt8195-evb.dts new file +4 -0
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart0_pin>;
+	status = "okay";
+};
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +0 -0
new file mode 100644
index 000000000000..a363e82f6988
@@ -0,0 +1,1049 @@

[...]

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

Quoted 6 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +6 -0
+
+	clk32k: oscillator-32k {
+		compatible = "fixed-clock";
+		#clock-cells = <0>;
+		clock-frequency = <32768>;
+		clock-output-names = "clk32k";

I suppose the 32KHz oscillator is really present on the board also not used by any device (up to now?).

[...]

Quoted 7 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +7 -0
+
+	soc {
+		#address-cells = <2>;
+		#size-cells = <2>;
+		compatible = "simple-bus";
+		ranges;
+

[...]

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

Quoted 9 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +9 -0
+
+		pwrap: pwrap@10024000 {
+			compatible = "mediatek,mt8195-pwrap", "syscon";
+			reg = <0 0x10024000 0 0x1000>;
+			reg-names = "pwrap";
+			interrupts = <GIC_SPI 243 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&infracfg_ao CLK_INFRA_AO_PMIC_AP>,
+				 <&infracfg_ao CLK_INFRA_AO_PMIC_TMR>;
+			clock-names = "spi", "wrap";

Binding mandates resets but not present here. It also mandates two register regions, but only one is given here.

Quoted 10 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +10 -0
+			assigned-clocks = <&topckgen CLK_TOP_PWRAP_ULPOSC>;
+			assigned-clock-parents = <&topckgen CLK_TOP_ULPOSC1_D10>;
+		};
+
+		scp_adsp: clock-controller@10720000 {
+			compatible = "mediatek,mt8195-scp_adsp";
+			reg = <0 0x10720000 0 0x1000>;
+			#clock-cells = <1>;
+		};
+

[...]

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

Quoted 6 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +6 -0
+
+		mmc0: mmc@11230000 {
+			compatible = "mediatek,mt8195-mmc",
+				     "mediatek,mt8183-mmc";
+			reg = <0 0x11230000 0 0x10000>,
+			      <0 0x11f50000 0 0x1000>;

Seems to be an oversight when adding support for mt8183-mmc support to the driver. The binding description is missing the optional host top register base. Chaotian can you please help to fix this in the binding description.

Quoted 8 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +8 -0
+			interrupts = <GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&topckgen CLK_TOP_MSDC50_0>,
+				 <&infracfg_ao CLK_INFRA_AO_MSDC0>,
+				 <&infracfg_ao CLK_INFRA_AO_MSDC0_SRC>;
+			clock-names = "source", "hclk", "source_cg";
+			status = "disabled";
+		};
+

[...]

Quoted 11 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +11 -0
+
+		xhci3: usb@112b0000 {
+			compatible = "mediatek,mt8195-xhci",
+				     "mediatek,mtk-xhci";
+			reg = <0 0x112b0000 0 0x1000>,
+			      <0 0x112b3e00 0 0x0100>;
+			reg-names = "mac", "ippc";
+			interrupts = <GIC_SPI 536 IRQ_TYPE_LEVEL_HIGH 0>;
+			phys = <&u2port3 PHY_TYPE_USB2>;
+			assigned-clocks = <&topckgen CLK_TOP_USB_TOP_3P>,
+					  <&topckgen CLK_TOP_SSUSB_XHCI_3P>;

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

Quoted 10 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +10 -0
+			assigned-clock-parents = <&topckgen CLK_TOP_UNIVPLL_D5_D4>,
+						 <&topckgen CLK_TOP_UNIVPLL_D5_D4>;
+			clocks = <&pericfg_ao CLK_PERI_AO_SSUSB_3P_BUS>,
+				 <&topckgen CLK_TOP_SSUSB_P3_REF>,
+				 <&pericfg_ao CLK_PERI_AO_SSUSB_3P_XHCI>;
+			clock-names = "sys_ck", "ref_ck", "xhci_ck";
+			/* This controller is connected with a BT device.
+			 * Disable usb2 lpm to prevent konwn issues.
+			 */
+			usb2-lpm-disable;

My understanding is, that this depends on the board and not the SoC. Which means usb2-lpm-disable should go into any board that has a BT device connected to the xhci device (I don't see any active xhci node in mt8195-evb so far).

Regards,
Matthias

#10 lore raw

Re: [PATCH v11 3/3] arm64: dts: Add mediatek SoC mt8195 and evaluation board

Hi Matthias,

Thanks for your comment.

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

Add basic chip support for mediatek mt8195.

---
  arch/arm64/boot/dts/mediatek/Makefile       |    1 +
  arch/arm64/boot/dts/mediatek/mt8195-evb.dts |  161 +++
  arch/arm64/boot/dts/mediatek/mt8195.dtsi    | 1049 +++++++++++++++++++
  3 files changed, 1211 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- renamed from arch/arm64/boot/dts/mediatek/mt8195-evb.dts +0 -0

evb.dts
new file mode 100644
index 000000000000..51633d91d984

arch/arm64/boot/dts/mediatek/mt8195-evb.dts new file +0 -0
@@ -0,0 +1,161 @@

[...]

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

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

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

So we enable phys for xhci but not the device. Are we missing anything to enable them on the EVB?

after discussed with usb expert, we think that we're missing the xhci nodes. I'll add xhci nodes at next version.

Quoted 14 lines
Quoted 12 lines

+&uart0 {

arch/arm64/boot/dts/mediatek/mt8195-evb.dts new file +4 -0
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart0_pin>;
+	status = "okay";
+};
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +0 -0
new file mode 100644
index 000000000000..a363e82f6988
@@ -0,0 +1,1049 @@

[...]

Quoted 9 lines

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

Quoted 6 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +6 -0
+
+	clk32k: oscillator-32k {
+		compatible = "fixed-clock";
+		#clock-cells = <0>;
+		clock-frequency = <32768>;
+		clock-output-names = "clk32k";

I suppose the 32KHz oscillator is really present on the board also not used by any device (up to now?).

Yes. 32KHz clock is still available on MT8195.
Some modules can choose 32K as clock source depending on requirements.

Quoted 11 lines

[...]

Quoted 7 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +7 -0
+
+	soc {
+		#address-cells = <2>;
+		#size-cells = <2>;
+		compatible = "simple-bus";
+		ranges;
+

[...]

Quoted 12 lines

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

Quoted 9 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +9 -0
+
+		pwrap: pwrap@10024000 {
+			compatible = "mediatek,mt8195-pwrap", "syscon";
+			reg = <0 0x10024000 0 0x1000>;
+			reg-names = "pwrap";
+			interrupts = <GIC_SPI 243 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&infracfg_ao CLK_INFRA_AO_PMIC_AP>,
+				 <&infracfg_ao CLK_INFRA_AO_PMIC_TMR>;
+			clock-names = "spi", "wrap";

Binding mandates resets but not present here. It also mandates two register regions, but only one is given here.

After discussed with pwrap experts, the pwrap binding is out-of-date for mt8195. They will send a patch to fix pwrap binding.

Quoted 14 lines
Quoted 11 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +10 -0
+			assigned-clocks = <&topckgen CLK_TOP_PWRAP_ULPOSC>;
+			assigned-clock-parents = <&topckgen CLK_TOP_ULPOSC1_D10>;
+		};
+
+		scp_adsp: clock-controller@10720000 {
+			compatible = "mediatek,mt8195-scp_adsp";
+			reg = <0 0x10720000 0 0x1000>;
+			#clock-cells = <1>;
+		};
+

[...]

Quoted 10 lines

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

Quoted 6 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +6 -0
+
+		mmc0: mmc@11230000 {
+			compatible = "mediatek,mt8195-mmc",
+				     "mediatek,mt8183-mmc";
+			reg = <0 0x11230000 0 0x10000>,
+			      <0 0x11f50000 0 0x1000>;

Seems to be an oversight when adding support for mt8183-mmc support to the driver. The binding description is missing the optional host top register base. Chaotian can you please help to fix this in the binding description.

Ok. I'll fix it at next version.

Quoted 28 lines
Quoted 9 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +8 -0
+			interrupts = <GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&topckgen CLK_TOP_MSDC50_0>,
+				 <&infracfg_ao CLK_INFRA_AO_MSDC0>,
+				 <&infracfg_ao CLK_INFRA_AO_MSDC0_SRC>;
+			clock-names = "source", "hclk", "source_cg";
+			status = "disabled";
+		};
+

[...]

Quoted 17 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +17 -0
+
+		xhci3: usb@112b0000 {
+			compatible = "mediatek,mt8195-xhci",
+				     "mediatek,mtk-xhci";
+			reg = <0 0x112b0000 0 0x1000>,
+			      <0 0x112b3e00 0 0x0100>;
+			reg-names = "mac", "ippc";
+			interrupts = <GIC_SPI 536 IRQ_TYPE_LEVEL_HIGH 0>;
+			phys = <&u2port3 PHY_TYPE_USB2>;
+			assigned-clocks = <&topckgen CLK_TOP_USB_TOP_3P>,
+					  <&topckgen CLK_TOP_SSUSB_XHCI_3P>;
+			assigned-clock-parents = <&topckgen CLK_TOP_UNIVPLL_D5_D4>,
+						 <&topckgen CLK_TOP_UNIVPLL_D5_D4>;
+			clocks = <&pericfg_ao CLK_PERI_AO_SSUSB_3P_BUS>,
+				 <&topckgen CLK_TOP_SSUSB_P3_REF>,
+				 <&pericfg_ao CLK_PERI_AO_SSUSB_3P_XHCI>;
+			clock-names = "sys_ck", "ref_ck", "xhci_ck";
Quoted 8 lines

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

Quoted 4 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +4 -0
+			/* This controller is connected with a BT device.
+			 * Disable usb2 lpm to prevent konwn issues.
+			 */
+			usb2-lpm-disable;

My understanding is, that this depends on the board and not the SoC. Which means usb2-lpm-disable should go into any board that has a BT device connected to the xhci device (I don't see any active xhci node in mt8195-evb so far).

Ok. I'll move this property to evb board in a xhci node.

Best regards,
TingHan

Quoted 3 lines

Regards,
Matthias

maintainer
#11 lore raw

Re: [PATCH v11 3/3] arm64: dts: Add mediatek SoC mt8195 and evaluation board

Quoted 87 lines · Tinghan Shen

Hi Matthias,

Thanks for your comment.

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

Add basic chip support for mediatek mt8195.

---
   arch/arm64/boot/dts/mediatek/Makefile       |    1 +
   arch/arm64/boot/dts/mediatek/mt8195-evb.dts |  161 +++
   arch/arm64/boot/dts/mediatek/mt8195.dtsi    | 1049 +++++++++++++++++++
   3 files changed, 1211 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- renamed from arch/arm64/boot/dts/mediatek/mt8195-evb.dts +0 -0

evb.dts
new file mode 100644
index 000000000000..51633d91d984

arch/arm64/boot/dts/mediatek/mt8195-evb.dts new file +0 -0
@@ -0,0 +1,161 @@

[...]

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

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

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

So we enable phys for xhci but not the device. Are we missing anything to enable them on the EVB?

after discussed with usb expert, we think that we're missing the xhci nodes. I'll add xhci nodes at next version.

Quoted 14 lines
Quoted 12 lines

+&uart0 {

arch/arm64/boot/dts/mediatek/mt8195-evb.dts new file +4 -0
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart0_pin>;
+	status = "okay";
+};
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +0 -0
new file mode 100644
index 000000000000..a363e82f6988
@@ -0,0 +1,1049 @@

[...]

Quoted 9 lines

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

Quoted 6 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +6 -0
+
+	clk32k: oscillator-32k {
+		compatible = "fixed-clock";
+		#clock-cells = <0>;
+		clock-frequency = <32768>;
+		clock-output-names = "clk32k";

I suppose the 32KHz oscillator is really present on the board also not used by any device (up to now?).

Quoted 3 lines

Yes. 32KHz clock is still available on MT8195.
Some modules can choose 32K as clock source depending on requirements.

Thanks for the confirmation.

Quoted 24 lines
Quoted 11 lines

[...]

Quoted 7 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +7 -0
+
+	soc {
+		#address-cells = <2>;
+		#size-cells = <2>;
+		compatible = "simple-bus";
+		ranges;
+

[...]

Quoted 12 lines

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

Quoted 9 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +9 -0
+
+		pwrap: pwrap@10024000 {
+			compatible = "mediatek,mt8195-pwrap", "syscon";
+			reg = <0 0x10024000 0 0x1000>;
+			reg-names = "pwrap";
+			interrupts = <GIC_SPI 243 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&infracfg_ao CLK_INFRA_AO_PMIC_AP>,
+				 <&infracfg_ao CLK_INFRA_AO_PMIC_TMR>;
+			clock-names = "spi", "wrap";

Binding mandates resets but not present here. It also mandates two register regions, but only one is given here.

Quoted 3 lines

After discussed with pwrap experts, the pwrap binding is out-of-date for mt8195. They will send a patch to fix pwrap binding.

If possible can you add the patch fixing the pwrap binding in this series, then I don't have to search for the dependencies in my inbox. That would be of great help.

Quoted 25 lines
Quoted 14 lines
Quoted 11 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +10 -0
+			assigned-clocks = <&topckgen CLK_TOP_PWRAP_ULPOSC>;
+			assigned-clock-parents = <&topckgen CLK_TOP_ULPOSC1_D10>;
+		};
+
+		scp_adsp: clock-controller@10720000 {
+			compatible = "mediatek,mt8195-scp_adsp";
+			reg = <0 0x10720000 0 0x1000>;
+			#clock-cells = <1>;
+		};
+

[...]

Quoted 10 lines

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

Quoted 6 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +6 -0
+
+		mmc0: mmc@11230000 {
+			compatible = "mediatek,mt8195-mmc",
+				     "mediatek,mt8183-mmc";
+			reg = <0 0x11230000 0 0x10000>,
+			      <0 0x11f50000 0 0x1000>;

Seems to be an oversight when adding support for mt8183-mmc support to the driver. The binding description is missing the optional host top register base. Chaotian can you please help to fix this in the binding description.

Quoted 2 lines

Ok. I'll fix it at next version.

I'm not sure what you mean. I suppose the way forward is to fix the binding description, correct?

Thanks,
Matthias

Quoted 46 lines
Quoted 28 lines
Quoted 9 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +8 -0
+			interrupts = <GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&topckgen CLK_TOP_MSDC50_0>,
+				 <&infracfg_ao CLK_INFRA_AO_MSDC0>,
+				 <&infracfg_ao CLK_INFRA_AO_MSDC0_SRC>;
+			clock-names = "source", "hclk", "source_cg";
+			status = "disabled";
+		};
+

[...]

Quoted 17 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +17 -0
+
+		xhci3: usb@112b0000 {
+			compatible = "mediatek,mt8195-xhci",
+				     "mediatek,mtk-xhci";
+			reg = <0 0x112b0000 0 0x1000>,
+			      <0 0x112b3e00 0 0x0100>;
+			reg-names = "mac", "ippc";
+			interrupts = <GIC_SPI 536 IRQ_TYPE_LEVEL_HIGH 0>;
+			phys = <&u2port3 PHY_TYPE_USB2>;
+			assigned-clocks = <&topckgen CLK_TOP_USB_TOP_3P>,
+					  <&topckgen CLK_TOP_SSUSB_XHCI_3P>;
+			assigned-clock-parents = <&topckgen CLK_TOP_UNIVPLL_D5_D4>,
+						 <&topckgen CLK_TOP_UNIVPLL_D5_D4>;
+			clocks = <&pericfg_ao CLK_PERI_AO_SSUSB_3P_BUS>,
+				 <&topckgen CLK_TOP_SSUSB_P3_REF>,
+				 <&pericfg_ao CLK_PERI_AO_SSUSB_3P_XHCI>;
+			clock-names = "sys_ck", "ref_ck", "xhci_ck";
Quoted 8 lines

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

Quoted 4 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +4 -0
+			/* This controller is connected with a BT device.
+			 * Disable usb2 lpm to prevent konwn issues.
+			 */
+			usb2-lpm-disable;

My understanding is, that this depends on the board and not the SoC. Which means usb2-lpm-disable should go into any board that has a BT device connected to the xhci device (I don't see any active xhci node in mt8195-evb so far).

Ok. I'll move this property to evb board in a xhci node.

Best regards,
TingHan

Quoted 3 lines

Regards,
Matthias

#12 lore raw

Re: [PATCH v11 3/3] arm64: dts: Add mediatek SoC mt8195 and evaluation board

Quoted 121 lines · Matthias Brugger
Quoted 89 lines · Tinghan Shen

Hi Matthias,

Thanks for your comment.

Quoted 47 lines · Matthias Brugger
Quoted 31 lines · Tinghan Shen

Add basic chip support for mediatek mt8195.

---
   arch/arm64/boot/dts/mediatek/Makefile       |    1 +
   arch/arm64/boot/dts/mediatek/mt8195-evb.dts |  161 +++
   arch/arm64/boot/dts/mediatek/mt8195.dtsi    | 1049 +++++++++++++++++++
   3 files changed, 1211 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- renamed from arch/arm64/boot/dts/mediatek/mt8195-evb.dts +0 -0

evb.dts
new file mode 100644
index 000000000000..51633d91d984

arch/arm64/boot/dts/mediatek/mt8195-evb.dts new file +0 -0
@@ -0,0 +1,161 @@

[...]

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

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

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

So we enable phys for xhci but not the device. Are we missing anything to enable them on the EVB?

after discussed with usb expert, we think that we're missing the xhci nodes. I'll add xhci nodes at next version.

Quoted 15 lines
Quoted 13 lines

+&uart0 {

arch/arm64/boot/dts/mediatek/mt8195-evb.dts new file +4 -0
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart0_pin>;
+	status = "okay";
+};
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +0 -0
new file mode 100644
index 000000000000..a363e82f6988
@@ -0,0 +1,1049 @@

[...]

Quoted 9 lines

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

Quoted 6 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +6 -0
+
+	clk32k: oscillator-32k {
+		compatible = "fixed-clock";
+		#clock-cells = <0>;
+		clock-frequency = <32768>;
+		clock-output-names = "clk32k";

I suppose the 32KHz oscillator is really present on the board also not used by any device (up to now?).

Quoted 3 lines

Yes. 32KHz clock is still available on MT8195.
Some modules can choose 32K as clock source depending on requirements.

Thanks for the confirmation.

Quoted 24 lines
Quoted 23 lines

[...]

Quoted 7 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +7 -0
+
+	soc {
+		#address-cells = <2>;
+		#size-cells = <2>;
+		compatible = "simple-bus";
+		ranges;
+

[...]

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

Quoted 9 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +9 -0
+
+		pwrap: pwrap@10024000 {
+			compatible = "mediatek,mt8195-pwrap", "syscon";
+			reg = <0 0x10024000 0 0x1000>;
+			reg-names = "pwrap";
+			interrupts = <GIC_SPI 243 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&infracfg_ao CLK_INFRA_AO_PMIC_AP>,
+				 <&infracfg_ao CLK_INFRA_AO_PMIC_TMR>;
+			clock-names = "spi", "wrap";

Binding mandates resets but not present here. It also mandates two register regions, but only one is given here.

Quoted 7 lines
Quoted 3 lines

After discussed with pwrap experts, the pwrap binding is out-of-date for mt8195. They will send a patch to fix pwrap binding.

If possible can you add the patch fixing the pwrap binding in this series, then I don't have to search for the dependencies in my inbox. That would be of great help.

No problem. I'll add it to this series when the patch is ready.

Best regards,
Tinghan

Quoted 80 lines
Quoted 26 lines
Quoted 15 lines
Quoted 12 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +10 -0
+			assigned-clocks = <&topckgen CLK_TOP_PWRAP_ULPOSC>;
+			assigned-clock-parents = <&topckgen CLK_TOP_ULPOSC1_D10>;
+		};
+
+		scp_adsp: clock-controller@10720000 {
+			compatible = "mediatek,mt8195-scp_adsp";
+			reg = <0 0x10720000 0 0x1000>;
+			#clock-cells = <1>;
+		};
+

[...]

Quoted 10 lines

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

Quoted 6 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +6 -0
+
+		mmc0: mmc@11230000 {
+			compatible = "mediatek,mt8195-mmc",
+				     "mediatek,mt8183-mmc";
+			reg = <0 0x11230000 0 0x10000>,
+			      <0 0x11f50000 0 0x1000>;

Seems to be an oversight when adding support for mt8183-mmc support to the driver. The binding description is missing the optional host top register base. Chaotian can you please help to fix this in the binding description.

Quoted 2 lines

Ok. I'll fix it at next version.

I'm not sure what you mean. I suppose the way forward is to fix the binding description, correct?

Thanks,
Matthias

Quoted 45 lines
Quoted 28 lines
Quoted 9 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +8 -0
+			interrupts = <GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&topckgen CLK_TOP_MSDC50_0>,
+				 <&infracfg_ao CLK_INFRA_AO_MSDC0>,
+				 <&infracfg_ao CLK_INFRA_AO_MSDC0_SRC>;
+			clock-names = "source", "hclk", "source_cg";
+			status = "disabled";
+		};
+

[...]

Quoted 17 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +17 -0
+
+		xhci3: usb@112b0000 {
+			compatible = "mediatek,mt8195-xhci",
+				     "mediatek,mtk-xhci";
+			reg = <0 0x112b0000 0 0x1000>,
+			      <0 0x112b3e00 0 0x0100>;
+			reg-names = "mac", "ippc";
+			interrupts = <GIC_SPI 536 IRQ_TYPE_LEVEL_HIGH 0>;
+			phys = <&u2port3 PHY_TYPE_USB2>;
+			assigned-clocks = <&topckgen CLK_TOP_USB_TOP_3P>,
+					  <&topckgen CLK_TOP_SSUSB_XHCI_3P>;
+			assigned-clock-parents = <&topckgen CLK_TOP_UNIVPLL_D5_D4>,
+						 <&topckgen CLK_TOP_UNIVPLL_D5_D4>;
+			clocks = <&pericfg_ao CLK_PERI_AO_SSUSB_3P_BUS>,
+				 <&topckgen CLK_TOP_SSUSB_P3_REF>,
+				 <&pericfg_ao CLK_PERI_AO_SSUSB_3P_XHCI>;
+			clock-names = "sys_ck", "ref_ck", "xhci_ck";
Quoted 8 lines

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

Quoted 4 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +4 -0
+			/* This controller is connected with a BT device.
+			 * Disable usb2 lpm to prevent konwn issues.
+			 */
+			usb2-lpm-disable;

My understanding is, that this depends on the board and not the SoC. Which means usb2-lpm-disable should go into any board that has a BT device connected to the xhci device (I don't see any active xhci node in mt8195-evb so far).

Ok. I'll move this property to evb board in a xhci node.

Best regards,
TingHan

Quoted 3 lines

Regards,
Matthias

#13 lore raw
In reply to Tinghan Shen
Quoted 70 lines · Tinghan Shen

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

---
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://urldefense.com/v3/__https://lore.kernel.org/all/[email protected]/__;!!CTRNKA9wMg0ARbw!xv2H7ZXYIUG7YY1R5OuFgbvDxyfaE6dkkD5H_PciKAZAb5jk-uThgSgItGuvt2d6gCs$
v3 thread:
https://urldefense.com/v3/__https://lore.kernel.org/all/[email protected]/__;!!CTRNKA9wMg0ARbw!xv2H7ZXYIUG7YY1R5OuFgbvDxyfaE6dkkD5H_PciKAZAb5jk-uThgSgItGuvgIQSNYo$
v2 thread:
https://urldefense.com/v3/__https://lore.kernel.org/all/[email protected]/__;!!CTRNKA9wMg0ARbw!xv2H7ZXYIUG7YY1R5OuFgbvDxyfaE6dkkD5H_PciKAZAb5jk-uThgSgItGuvBx50AeU$
v1 thread:
https://urldefense.com/v3/__https://lore.kernel.org/all/[email protected]/__;!!CTRNKA9wMg0ARbw!xv2H7ZXYIUG7YY1R5OuFgbvDxyfaE6dkkD5H_PciKAZAb5jk-uThgSgItGuvpH_NtEY$
---

Tinghan Shen (3):
dt-bindings: arm: mediatek: Add mt8195 pericfg compatible
dt-bindings: pinctrl: mt8195: Add mediatek,drive-strength-adv property
arm64: dts: Add mediatek SoC mt8195 and evaluation board

Quoted 9 lines
  .../arm/mediatek/mediatek,pericfg.yaml        |    1 +
  .../bindings/pinctrl/pinctrl-mt8195.yaml      |   35 +
  arch/arm64/boot/dts/mediatek/Makefile         |    1 +
  arch/arm64/boot/dts/mediatek/mt8195-evb.dts   |  161 +++
  arch/arm64/boot/dts/mediatek/mt8195.dtsi      | 1049 +++++++++++++++++
  5 files changed, 1247 insertions(+)

create mode 100644 arch/arm64/boot/dts/mediatek/mt8195-evb.dts create mode 100644 arch/arm64/boot/dts/mediatek/mt8195.dtsi

Just trying to clarify something.
Dear Tinghan, is there any "lines of code" changed between v10 and v11 due to the rebase? Is that you just updated the parent commit hash for rebasing this patchset to 5.17-rc4? I've just get confused if v10 and v11 are duplicated then should we need to review the patch again in detail?

Thanks.
Macpaul Lin

#14 lore raw

Hi Macpaul,

Quoted 56 lines · Macpaul Lin
Quoted 55 lines · Tinghan Shen

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

---
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

Quoted 2 lines
Quoted 2 lines

v4 thread:

https://urldefense.com/v3/__https://lore.kernel.org/all/[email protected]/__;!!CTRNKA9wMg0ARbw!xv2H7ZXYIUG7YY1R5OuFgbvDxyfaE6dkkD5H_PciKAZAb5jk-uThgSgItGuvt2d6gCs$

Quoted 2 lines
Quoted 2 lines

v3 thread:

https://urldefense.com/v3/__https://lore.kernel.org/all/[email protected]/__;!!CTRNKA9wMg0ARbw!xv2H7ZXYIUG7YY1R5OuFgbvDxyfaE6dkkD5H_PciKAZAb5jk-uThgSgItGuvgIQSNYo$

Quoted 2 lines
Quoted 2 lines

v2 thread:

https://urldefense.com/v3/__https://lore.kernel.org/all/[email protected]/__;!!CTRNKA9wMg0ARbw!xv2H7ZXYIUG7YY1R5OuFgbvDxyfaE6dkkD5H_PciKAZAb5jk-uThgSgItGuvBx50AeU$

Quoted 2 lines
Quoted 2 lines

v1 thread:

https://urldefense.com/v3/__https://lore.kernel.org/all/[email protected]/__;!!CTRNKA9wMg0ARbw!xv2H7ZXYIUG7YY1R5OuFgbvDxyfaE6dkkD5H_PciKAZAb5jk-uThgSgItGuvpH_NtEY$

Quoted 17 lines
Quoted 7 lines

---

Tinghan Shen (3):
dt-bindings: arm: mediatek: Add mt8195 pericfg compatible
dt-bindings: pinctrl: mt8195: Add mediatek,drive-strength-adv property
arm64: dts: Add mediatek SoC mt8195 and evaluation board

Quoted 9 lines
  .../arm/mediatek/mediatek,pericfg.yaml        |    1 +
  .../bindings/pinctrl/pinctrl-mt8195.yaml      |   35 +
  arch/arm64/boot/dts/mediatek/Makefile         |    1 +
  arch/arm64/boot/dts/mediatek/mt8195-evb.dts   |  161 +++
  arch/arm64/boot/dts/mediatek/mt8195.dtsi      | 1049 +++++++++++++++++
  5 files changed, 1247 insertions(+)

create mode 100644 arch/arm64/boot/dts/mediatek/mt8195-evb.dts create mode 100644 arch/arm64/boot/dts/mediatek/mt8195.dtsi

Quoted 8 lines

Just trying to clarify something.
Dear Tinghan, is there any "lines of code" changed between v10 and v11 due to the rebase? Is that you just updated the parent commit hash for rebasing this patchset to 5.17-rc4? I've just get confused if v10 and v11 are duplicated then should we need to review the patch again in detail?

Thanks.
Macpaul Lin

Thanks for your review.

There's no change introduced after rebase v10 to 5.17-rc4.

v11 and v10 are the same.

Best regards,
TingHan

#15 lore raw
In reply to Tinghan Shen

Il 16/02/22 12:31, Tinghan Shen ha scritto:

Quoted 4 lines

This series adds basic SoC support for Mediatek's SoC MT8195.
---
Changes in v11:
- rebase on 5.17-rc4

..snip...

Hello Matthias,

this series introducing very basic support for this new SoC is definitely ready to be merged and well tested.

Can you please pick it?

P.S.: Patch 2/3 (pinctrl binding) was already picked by Linux Walleij, and it's already upstream.

Thank you,
Angelo

Quoted 15 lines

Tinghan Shen (3):
dt-bindings: arm: mediatek: Add mt8195 pericfg compatible
dt-bindings: pinctrl: mt8195: Add mediatek,drive-strength-adv property
arm64: dts: Add mediatek SoC mt8195 and evaluation board

  .../arm/mediatek/mediatek,pericfg.yaml        |    1 +
  .../bindings/pinctrl/pinctrl-mt8195.yaml      |   35 +
  arch/arm64/boot/dts/mediatek/Makefile         |    1 +
  arch/arm64/boot/dts/mediatek/mt8195-evb.dts   |  161 +++
  arch/arm64/boot/dts/mediatek/mt8195.dtsi      | 1049 +++++++++++++++++
  5 files changed, 1247 insertions(+)

create mode 100644 arch/arm64/boot/dts/mediatek/mt8195-evb.dts create mode 100644 arch/arm64/boot/dts/mediatek/mt8195.dtsi