Skip to contentSkip to conversation

Add basic SoC support for mediatek mt8195

PATCH Superseded Tinghan Shen 9 participants 19 messages Dec 20, 2021 – Jan 7, 2022

Subsystems (5)

v7 of 14 Superseded Latest is v14 →

lore
Share & tools
lore
#0 lore raw

v7 cover Add basic SoC support for mediatek mt8195

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

---
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 (4):
dt-bindings: arm: mediatek: add mt8195 pericfg compatible
dt-bindings: spi: spi-mtk-nor: add new clock name 'axi' for spi nor
dt-bindings: pinctrl: mt8195: add wrapping node of pin configurations
arm64: dts: Add mediatek SoC mt8195 and evaluation board

 .../arm/mediatek/mediatek,pericfg.yaml        |    1 +
 .../bindings/pinctrl/pinctrl-mt8195.yaml      |  336 +++---
 .../bindings/spi/mediatek,spi-mtk-nor.yaml    |    6 +-
 arch/arm64/boot/dts/mediatek/Makefile         |    1 +
 arch/arm64/boot/dts/mediatek/mt8195-evb.dts   |  209 ++++
 arch/arm64/boot/dts/mediatek/mt8195.dtsi      | 1034 +++++++++++++++++
 6 files changed, 1437 insertions(+), 150 deletions(-)
 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 v7 1/4 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
#3 lore raw

PATCH v7 2/4 dt-bindings: spi: spi-mtk-nor: add new clock name 'axi' for spi nor

In reply to Tinghan Shen

Some mtk spi nor has dedicated dma(s) inside. Add a new clock name, axi, for spi nor dma bus clock.

---
 .../devicetree/bindings/spi/mediatek,spi-mtk-nor.yaml       | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/spi/mediatek,spi-mtk-nor.yaml +5 -1
index 7393f30535df..478afebfec9c 100644
@@ -43,14 +43,19 @@ properties:
     maxItems: 1
 
   clocks:
+    minItems: 2
     items:
       - description: clock used for spi bus
       - description: clock used for controller
+      - description: clock used for nor dma bus. this depends on hardware
+                     design, so this is optional.
 
   clock-names:
+    minItems: 2
     items:
       - const: spi
       - const: sf
+      - const: axi
 
 required:
   - compatible
@@ -84,4 +89,3 @@ examples:
         };
       };
     };
-
Signature · 1 line
2.18.0
maintainer
#4 lore raw

Re: [PATCH v7 2/4] dt-bindings: spi: spi-mtk-nor: add new clock name 'axi' for spi nor

Quoted 2 lines · Tinghan Shen

Some mtk spi nor has dedicated dma(s) inside. Add a new clock name, axi, for spi nor dma bus clock.

Please submit patches using subject lines reflecting the style for the subsystem, this makes it easier for people to identify relevant patches. Look at what existing commits in the area you're changing are doing and make sure your subject lines visually resemble what they're doing. There's no need to resubmit to fix this alone.

maintainer
#5 lore raw

Re: [PATCH v7 2/4] dt-bindings: spi: spi-mtk-nor: add new clock name 'axi' for spi nor

In reply to Tinghan Shen
Quoted 2 lines · Tinghan Shen

Some mtk spi nor has dedicated dma(s) inside. Add a new clock name, axi, for spi nor dma bus clock.

Please submit patches using subject lines reflecting the style for the subsystem, this makes it easier for people to identify relevant patches. Look at what existing commits in the area you're changing are doing and make sure your subject lines visually resemble what they're doing. There's no need to resubmit to fix this alone.

maintainer Reviewed-by on v7 2/4
#6 lore raw

Re: [PATCH v7 2/4] dt-bindings: spi: spi-mtk-nor: add new clock name 'axi' for spi nor

In reply to Tinghan Shen
Quoted 4 lines · Tinghan Shen

Some mtk spi nor has dedicated dma(s) inside. Add a new clock name, axi, for spi nor dma bus clock.

Quoted 34 lines
---
  .../devicetree/bindings/spi/mediatek,spi-mtk-nor.yaml       | 6 +++++-
  1 file changed, 5 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/spi/mediatek,spi-mtk-nor.yaml +5 -1
index 7393f30535df..478afebfec9c 100644
@@ -43,14 +43,19 @@ properties:
      maxItems: 1
 
    clocks:
+    minItems: 2
      items:
        - description: clock used for spi bus
        - description: clock used for controller
+      - description: clock used for nor dma bus. this depends on hardware
+                     design, so this is optional.
 
    clock-names:
+    minItems: 2
      items:
        - const: spi
        - const: sf
+      - const: axi
 
  required:
    - compatible
@@ -84,4 +89,3 @@ examples:
          };
        };
      };
-
#7 lore raw

PATCH v7 3/4 dt-bindings: pinctrl: mt8195: add wrapping node of pin configurations

In reply to Tinghan Shen

On mt8195, the pinctrl node has pinctrl groups to group pin configurations by users' need. In each pinctrl group, it has subnode(s) to list pins needed and pin configurations. By supporting multiple subnodes, we can configure different pin characteristics (driving/pull-up/pull-down/etc.) in a pinctrl group.

Update pinctrl-mt8195.yaml to add subnode in pinctrl groups and an example to illustrate the usage.

---
 .../bindings/pinctrl/pinctrl-mt8195.yaml      | 338 ++++++++++--------
 1 file changed, 188 insertions(+), 150 deletions(-)
Documentation/devicetree/bindings/pinctrl/pinctrl-mt8195.yaml +188 -150
index 5e2bb2bf3a55..567f71cab7b4 100644
@@ -55,137 +55,159 @@ properties:
       Identifying i2c pins pull up/down type which is RSEL. It can support
       RSEL define or si unit value(ohm) to set different resistance.
 
-#PIN CONFIGURATION NODES
+# PIN CONFIGURATION NODES
 patternProperties:
   '-pins$':
     type: object
-    description: |
-      A pinctrl node should contain at least one subnodes representing the
-      pinctrl groups available on the machine. Each subnode will list the
-      pins it needs, and how they should be configured, with regard to muxer
-      configuration, pullups, drive strength, input enable/disable and
-      input schmitt.
-      An example of using macro:
-      pincontroller {
-        /* GPIO0 set as multifunction GPIO0 */
-        gpio_pin {
-          pinmux = <PINMUX_GPIO0__FUNC_GPIO0>;
-        };
-        /* GPIO8 set as multifunction SDA0 */
-        i2c0_pin {
-          pinmux = <PINMUX_GPIO8__FUNC_SDA0>;
-        };
-      };
-    $ref: "pinmux-node.yaml"
-
-    properties:
-      pinmux:
-        description: |
-          Integer array, represents gpio pin number and mux setting.
-          Supported pin number and mux varies for different SoCs, and are defined
-          as macros in dt-bindings/pinctrl/<soc>-pinfunc.h directly.
-
-      drive-strength:
-        enum: [2, 4, 6, 8, 10, 12, 14, 16]
-
-      bias-pull-down:
-        description: |
-          For pull down type is normal, it don't need add RSEL & R1R0 define
-          and resistance value.
-          For pull down type is PUPD/R0/R1 type, it can add R1R0 define to
-          set different resistance. It can support "MTK_PUPD_SET_R1R0_00" &
-          "MTK_PUPD_SET_R1R0_01" & "MTK_PUPD_SET_R1R0_10" & "MTK_PUPD_SET_R1R0_11"
-          define in mt8195.
-          For pull down type is RSEL, it can add RSEL define & resistance value(ohm)
-          to set different resistance by identifying property "mediatek,rsel_resistance_in_si_unit".
-          It can support "MTK_PULL_SET_RSEL_000" & "MTK_PULL_SET_RSEL_001"
-          & "MTK_PULL_SET_RSEL_010" & "MTK_PULL_SET_RSEL_011" & "MTK_PULL_SET_RSEL_100"
-          & "MTK_PULL_SET_RSEL_101" & "MTK_PULL_SET_RSEL_110" & "MTK_PULL_SET_RSEL_111"
-          define in mt8195. It can also support resistance value(ohm) "75000" & "5000" in mt8195.
-          oneOf:
-            - enum: [100, 101, 102, 103]
-            - description: mt8195 pull down PUPD/R0/R1 type define value.
-            - enum: [200, 201, 202, 203, 204, 205, 206, 207]
-            - description: mt8195 pull down RSEL type define value.
-            - enum: [75000, 5000]
-            - description: mt8195 pull down RSEL type si unit value(ohm).
-
-          An example of using RSEL define:
-          pincontroller {
-            i2c0_pin {
-              pinmux = <PINMUX_GPIO8__FUNC_SDA0>;
-              bias-pull-down = <MTK_PULL_SET_RSEL_001>;
-            };
-          };
-          An example of using si unit resistance value(ohm):
-          &pio {
-            mediatek,rsel_resistance_in_si_unit;
-          }
-          pincontroller {
-            i2c0_pin {
-              pinmux = <PINMUX_GPIO8__FUNC_SDA0>;
-              bias-pull-down = <75000>;
-            };
-          };
-
-      bias-pull-up:
+    additionalProperties: false
+    patternProperties:
+      '^pins':
+        type: object
+        additionalProperties: false
         description: |
-          For pull up type is normal, it don't need add RSEL & R1R0 define
-          and resistance value.
-          For pull up type is PUPD/R0/R1 type, it can add R1R0 define to
-          set different resistance. It can support "MTK_PUPD_SET_R1R0_00" &
-          "MTK_PUPD_SET_R1R0_01" & "MTK_PUPD_SET_R1R0_10" & "MTK_PUPD_SET_R1R0_11"
-          define in mt8195.
-          For pull up type is RSEL, it can add RSEL define & resistance value(ohm)
-          to set different resistance by identifying property "mediatek,rsel_resistance_in_si_unit".
-          It can support "MTK_PULL_SET_RSEL_000" & "MTK_PULL_SET_RSEL_001"
-          & "MTK_PULL_SET_RSEL_010" & "MTK_PULL_SET_RSEL_011" & "MTK_PULL_SET_RSEL_100"
-          & "MTK_PULL_SET_RSEL_101" & "MTK_PULL_SET_RSEL_110" & "MTK_PULL_SET_RSEL_111"
-          define in mt8195. It can also support resistance value(ohm)
-          "1000" & "1500" & "2000" & "3000" & "4000" & "5000" & "10000" & "75000" in mt8195.
-          oneOf:
-            - enum: [100, 101, 102, 103]
-            - description: mt8195 pull up PUPD/R0/R1 type define value.
-            - enum: [200, 201, 202, 203, 204, 205, 206, 207]
-            - description: mt8195 pull up RSEL type define value.
-            - enum: [1000, 1500, 2000, 3000, 4000, 5000, 10000, 75000]
-            - description: mt8195 pull up RSEL type si unit value(ohm).
-          An example of using RSEL define:
+          A pinctrl node should contain at least one subnodes representing the
+          pinctrl groups available on the machine. Each subnode will list the
+          pins it needs, and how they should be configured, with regard to muxer
+          configuration, pullups, drive strength, input enable/disable and
+          input schmitt.
+          An example of using macro:
           pincontroller {
-            i2c0_pin {
-              pinmux = <PINMUX_GPIO8__FUNC_SDA0>;
-              bias-pull-up = <MTK_PULL_SET_RSEL_001>;
+            /* GPIO0 set as multifunction GPIO0 */
+            gpio-pins {
+              pins {
+                pinmux = <PINMUX_GPIO0__FUNC_GPIO0>;
+              }
             };
-          };
-          An example of using si unit resistance value(ohm):
-          &pio {
-            mediatek,rsel_resistance_in_si_unit;
-          }
-          pincontroller {
-            i2c0_pin {
-              pinmux = <PINMUX_GPIO8__FUNC_SDA0>;
-              bias-pull-up = <1000>;
+            /* GPIO8 set as multifunction SDA0 */
+            i2c0-pins {
+              pins {
+                pinmux = <PINMUX_GPIO8__FUNC_SDA0>;
+              }
             };
           };
-
-      bias-disable: true
-
-      output-high: true
-
-      output-low: true
-
-      input-enable: true
-
-      input-disable: true
-
-      input-schmitt-enable: true
-
-      input-schmitt-disable: true
-
-    required:
-      - pinmux
-
-    additionalProperties: false
+        $ref: "pinmux-node.yaml"
+
+        properties:
+          pinmux:
+            description: |
+              Integer array, represents gpio pin number and mux setting.
+              Supported pin number and mux varies for different SoCs, and are
+              defined as macros in dt-bindings/pinctrl/<soc>-pinfunc.h
+              directly.
+
+          drive-strength:
+            enum: [2, 4, 6, 8, 10, 12, 14, 16]
+
+          bias-pull-down:
+            description: |
+              For pull down type is normal, it don't need add RSEL & R1R0 define
+              and resistance value.
+              For pull down type is PUPD/R0/R1 type, it can add R1R0 define to
+              set different resistance. It can support "MTK_PUPD_SET_R1R0_00" &
+              "MTK_PUPD_SET_R1R0_01" & "MTK_PUPD_SET_R1R0_10" &
+              "MTK_PUPD_SET_R1R0_11" define in mt8195.
+              For pull down type is RSEL, it can add RSEL define & resistance
+              value(ohm) to set different resistance by identifying property
+              "mediatek,rsel_resistance_in_si_unit".
+              It can support "MTK_PULL_SET_RSEL_000" & "MTK_PULL_SET_RSEL_001"
+              & "MTK_PULL_SET_RSEL_010" & "MTK_PULL_SET_RSEL_011"
+              & "MTK_PULL_SET_RSEL_100" & "MTK_PULL_SET_RSEL_101"
+              & "MTK_PULL_SET_RSEL_110" & "MTK_PULL_SET_RSEL_111"
+              define in mt8195. It can also support resistance value(ohm)
+              "75000" & "5000" in mt8195.
+              oneOf:
+                - enum: [100, 101, 102, 103]
+                - description: mt8195 pull down PUPD/R0/R1 type define value.
+                - enum: [200, 201, 202, 203, 204, 205, 206, 207]
+                - description: mt8195 pull down RSEL type define value.
+                - enum: [75000, 5000]
+                - description: mt8195 pull down RSEL type si unit value(ohm).
+
+              An example of using RSEL define:
+              pincontroller {
+                i2c0_pin {
+                  pins {
+                    pinmux = <PINMUX_GPIO8__FUNC_SDA0>;
+                    bias-pull-down = <MTK_PULL_SET_RSEL_001>;
+                  }
+                };
+              };
+              An example of using si unit resistance value(ohm):
+              &pio {
+                mediatek,rsel_resistance_in_si_unit;
+              }
+              pincontroller {
+                i2c0_pin {
+                  pins {
+                    pinmux = <PINMUX_GPIO8__FUNC_SDA0>;
+                    bias-pull-down = <75000>;
+                  }
+                };
+              };
+
+          bias-pull-up:
+            description: |
+              For pull up type is normal, it don't need add RSEL & R1R0 define
+              and resistance value.
+              For pull up type is PUPD/R0/R1 type, it can add R1R0 define to
+              set different resistance. It can support "MTK_PUPD_SET_R1R0_00" &
+              "MTK_PUPD_SET_R1R0_01" & "MTK_PUPD_SET_R1R0_10" &
+              "MTK_PUPD_SET_R1R0_11" define in mt8195.
+              For pull up type is RSEL, it can add RSEL define & resistance
+              value(ohm) to set different resistance by identifying property
+              "mediatek,rsel_resistance_in_si_unit".
+              It can support "MTK_PULL_SET_RSEL_000" & "MTK_PULL_SET_RSEL_001"
+              & "MTK_PULL_SET_RSEL_010" & "MTK_PULL_SET_RSEL_011"
+              & "MTK_PULL_SET_RSEL_100" & "MTK_PULL_SET_RSEL_101"
+              & "MTK_PULL_SET_RSEL_110" & "MTK_PULL_SET_RSEL_111"
+              define in mt8195. It can also support resistance value(ohm)
+              "1000" & "1500" & "2000" & "3000" & "4000" & "5000" & "10000" &
+              "75000" in mt8195.
+              oneOf:
+                - enum: [100, 101, 102, 103]
+                - description: mt8195 pull up PUPD/R0/R1 type define value.
+                - enum: [200, 201, 202, 203, 204, 205, 206, 207]
+                - description: mt8195 pull up RSEL type define value.
+                - enum: [1000, 1500, 2000, 3000, 4000, 5000, 10000, 75000]
+                - description: mt8195 pull up RSEL type si unit value(ohm).
+              An example of using RSEL define:
+              pincontroller {
+                i2c0-pins {
+                  pins {
+                    pinmux = <PINMUX_GPIO8__FUNC_SDA0>;
+                    bias-pull-up = <MTK_PULL_SET_RSEL_001>;
+                  }
+                };
+              };
+              An example of using si unit resistance value(ohm):
+              &pio {
+                mediatek,rsel_resistance_in_si_unit;
+              }
+              pincontroller {
+                i2c0-pins {
+                  pins {
+                    pinmux = <PINMUX_GPIO8__FUNC_SDA0>;
+                    bias-pull-up = <1000>;
+                  }
+                };
+              };
+
+          bias-disable: true
+
+          output-high: true
+
+          output-low: true
+
+          input-enable: true
+
+          input-disable: true
+
+          input-schmitt-enable: true
+
+          input-schmitt-disable: true
+
+        required:
+          - pinmux
 
 required:
   - compatible
@@ -201,30 +223,46 @@ additionalProperties: false
 
 examples:
   - |
-            #include <dt-bindings/pinctrl/mt8195-pinfunc.h>
-            #include <dt-bindings/interrupt-controller/arm-gic.h>
-            pio: pinctrl@10005000 {
-                    compatible = "mediatek,mt8195-pinctrl";
-                    reg = <0x10005000 0x1000>,
-                          <0x11d10000 0x1000>,
-                          <0x11d30000 0x1000>,
-                          <0x11d40000 0x1000>,
-                          <0x11e20000 0x1000>,
-                          <0x11eb0000 0x1000>,
-                          <0x11f40000 0x1000>,
-                          <0x1000b000 0x1000>;
-                    reg-names = "iocfg0", "iocfg_bm", "iocfg_bl",
-                          "iocfg_br", "iocfg_lm", "iocfg_rb",
-                          "iocfg_tl", "eint";
-                    gpio-controller;
-                    #gpio-cells = <2>;
-                    gpio-ranges = <&pio 0 0 144>;
-                    interrupt-controller;
-                    interrupts = <GIC_SPI 225 IRQ_TYPE_LEVEL_HIGH 0>;
-                    #interrupt-cells = <2>;
-
-                    pio-pins {
-                      pinmux = <PINMUX_GPIO0__FUNC_GPIO0>;
-                      output-low;
-                    };
-            };
+    #include <dt-bindings/pinctrl/mt8195-pinfunc.h>
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+    #
+    pio: pinctrl@10005000 {
+      compatible = "mediatek,mt8195-pinctrl";
+      reg = <0x10005000 0x1000>,
+            <0x11d10000 0x1000>,
+            <0x11d30000 0x1000>,
+            <0x11d40000 0x1000>,
+            <0x11e20000 0x1000>,
+            <0x11eb0000 0x1000>,
+            <0x11f40000 0x1000>,
+            <0x1000b000 0x1000>;
+      reg-names = "iocfg0", "iocfg_bm", "iocfg_bl",
+                  "iocfg_br", "iocfg_lm", "iocfg_rb",
+                  "iocfg_tl", "eint";
+      gpio-controller;
+      #gpio-cells = <2>;
+      gpio-ranges = <&pio 0 0 144>;
+      interrupt-controller;
+      interrupts = <GIC_SPI 225 IRQ_TYPE_LEVEL_HIGH 0>;
+      #interrupt-cells = <2>;
+
+      pio-pins {
+        pins {
+          pinmux = <PINMUX_GPIO0__FUNC_GPIO0>;
+          output-low;
+        };
+      };
+
+      spi0-pins {
+        pins-spi {
+          pinmux = <PINMUX_GPIO132__FUNC_SPIM0_CSB>,
+                   <PINMUX_GPIO134__FUNC_SPIM0_MO>,
+                   <PINMUX_GPIO133__FUNC_SPIM0_CLK>;
+          bias-disable;
+        };
+        pins-spi-mi {
+          pinmux = <PINMUX_GPIO135__FUNC_SPIM0_MI>;
+          bias-pull-down;
+        };
+      };
+    };
Signature · 1 line
2.18.0
maintainer Reviewed-by on v7 3/4
#8 lore raw

Re: [PATCH v7 3/4] dt-bindings: pinctrl: mt8195: add wrapping node of pin configurations

Quoted 6 lines · Tinghan Shen

On mt8195, the pinctrl node has pinctrl groups to group pin configurations by users' need. In each pinctrl group, it has subnode(s) to list pins needed and pin configurations. By supporting multiple subnodes, we can configure different pin characteristics (driving/pull-up/pull-down/etc.) in a pinctrl group.

Quoted 8 lines

Update pinctrl-mt8195.yaml to add subnode in pinctrl groups and an example to illustrate the usage.

---
 .../bindings/pinctrl/pinctrl-mt8195.yaml      | 338 ++++++++++--------
 1 file changed, 188 insertions(+), 150 deletions(-)
Acked-by on v7 3/4
#9 lore raw

Re: [PATCH v7 3/4] dt-bindings: pinctrl: mt8195: add wrapping node of pin configurations

In reply to Tinghan Shen

Il 20/12/21 13:18, Tinghan Shen ha scritto:

Quoted 11 lines

On mt8195, the pinctrl node has pinctrl groups to group pin configurations by users' need. In each pinctrl group, it has subnode(s) to list pins needed and pin configurations. By supporting multiple subnodes, we can configure different pin characteristics (driving/pull-up/pull-down/etc.) in a pinctrl group.

Update pinctrl-mt8195.yaml to add subnode in pinctrl groups and an example to illustrate the usage.

#10 lore raw

Re: [PATCH v7 3/4] dt-bindings: pinctrl: mt8195: add wrapping node of pin configurations

In reply to Tinghan Shen
Quoted 10 lines · Tinghan Shen

On mt8195, the pinctrl node has pinctrl groups to group pin configurations by users' need. In each pinctrl group, it has subnode(s) to list pins needed and pin configurations. By supporting multiple subnodes, we can configure different pin characteristics (driving/pull-up/pull-down/etc.) in a pinctrl group.

Update pinctrl-mt8195.yaml to add subnode in pinctrl groups and an example to illustrate the usage.

This patch applied.

Yours,
Linus Walleij

#11 lore raw

PATCH v7 4/4 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 |  209 ++++
 arch/arm64/boot/dts/mediatek/mt8195.dtsi    | 1034 +++++++++++++++++++
 3 files changed, 1244 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 4f68ebed2e31..7aa08bb4c078 100644
@@ -32,4 +32,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 +209 -0

209 lines not on this page · raw message

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

1,034 lines not on this page · raw message

Signature · 1 line
2.18.0
#12 lore raw

Re: [PATCH v7 4/4] arm64: dts: Add mediatek SoC mt8195 and evaluation board

Hi,

Quoted 74 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 |  209 ++++
 arch/arm64/boot/dts/mediatek/mt8195.dtsi    | 1034 +++++++++++++++++++
 3 files changed, 1244 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 4f68ebed2e31..7aa08bb4c078 100644
@@ -32,4 +32,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 +45 -0
new file mode 100644
index 000000000000..e581c6bbead6
@@ -0,0 +1,209 @@
+// 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";
+};
+
+&i2c2 {

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

Quoted 10 lines
arch/arm64/boot/dts/mediatek/mt8195-evb.dts new file +10 -0
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c2_pin>;
+       status = "disabled";
+};
+
+&i2c3 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c3_pin>;
+       status = "disabled";
+};

Is there any reason in particular to list "disabled" devices here? Are they part of some GPIO header? If they are not accessible, then it's better to not list them. If they are, please leave a comment about it.

Quoted 10 lines
arch/arm64/boot/dts/mediatek/mt8195-evb.dts new file +10 -0
+
+&i2c4 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c4_pin>;
+       clock-frequency = <400000>;
+       status = "okay";
+};
+
+&i2c5 {
+       pinctrl-names = "default";

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

Quoted 10 lines
arch/arm64/boot/dts/mediatek/mt8195-evb.dts new file +10 -0
+       pinctrl-0 = <&i2c5_pin>;
+       status = "disabled";
+};
+
+&i2c6 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c6_pin>;
+       clock-frequency = <400000>;
+       status = "disabled";
+};

Same here.

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

Quoted 5 lines
arch/arm64/boot/dts/mediatek/mt8195-evb.dts new file +5 -0
+
+&nor_flash {
+       status = "okay";
+       pinctrl-names = "default";
+       pinctrl-0 = <&nor_pins_default>;

Please add an empty line between properties and child device nodes. It helps with readability and also fits the style of other parts and other DT files.

Quoted 4 lines
arch/arm64/boot/dts/mediatek/mt8195-evb.dts new file +4 -0
+       flash@0 {
+               compatible = "jedec,spi-nor";
+               reg = <0>;
+               spi-max-frequency = <50000000>;

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

Quoted 10 lines
arch/arm64/boot/dts/mediatek/mt8195-evb.dts new file +10 -0
+       };
+};
+
+&pio {
+       i2c0_pin: i2c0-pins {
+               pins {
+                       pinmux = <PINMUX_GPIO8__FUNC_SDA0>,
+                                <PINMUX_GPIO9__FUNC_SCL0>;
+                       bias-pull-up = <1>;
+                       mediatek,rsel = <7>;

Please use the MTK_PULL_SET_RSEL_* macros with the bias-pull-* properties. We spent a lot of time defining those.

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

Quoted 1 line
arch/arm64/boot/dts/mediatek/mt8195-evb.dts new file +1 -0
+                       mediatek,drive-strength-adv = <0>;

This property is not part of the DT binding.

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

Quoted 1 line
arch/arm64/boot/dts/mediatek/mt8195-evb.dts new file +1 -0
+                       drive-strength = <MTK_DRIVE_6mA>;

Please just use raw numbers here. MTK_DRIVE_6mA just translates to 6. The binding already specifies mA as the unit for "drive-strength".

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

Quoted 2 lines
arch/arm64/boot/dts/mediatek/mt8195-evb.dts new file +2 -0
+               };
+       };

Above comments apply to all the other "pins" nodes.

Please add an empty line between different child device nodes. It helps with readability and also fits the style of other parts and other DT files.

Quoted 128 lines
arch/arm64/boot/dts/mediatek/mt8195-evb.dts new file +111 -0
+       i2c1_pin: i2c1-pins {
+               pins {
+                       pinmux = <PINMUX_GPIO10__FUNC_SDA1>,
+                                <PINMUX_GPIO11__FUNC_SCL1>;
+                       bias-pull-up = <1>;
+                       mediatek,rsel = <7>;
+                       mediatek,drive-strength-adv = <0>;
+                       drive-strength = <MTK_DRIVE_6mA>;
+               };
+       };
+       i2c2_pin: i2c2-pins {
+               pins {
+                       pinmux = <PINMUX_GPIO12__FUNC_SDA2>,
+                                <PINMUX_GPIO13__FUNC_SCL2>;
+                       bias-pull-up = <1>;
+                       mediatek,rsel = <7>;
+                       mediatek,drive-strength-adv = <7>;
+               };
+       };
+       i2c3_pin: i2c3-pins {
+               pins {
+                       pinmux = <PINMUX_GPIO14__FUNC_SDA3>,
+                                <PINMUX_GPIO15__FUNC_SCL3>;
+                       bias-pull-up = <1>;
+                       mediatek,rsel = <7>;
+                       mediatek,drive-strength-adv = <7>;
+               };
+       };
+       i2c4_pin: i2c4-pins {
+               pins {
+                       pinmux = <PINMUX_GPIO16__FUNC_SDA4>,
+                                <PINMUX_GPIO17__FUNC_SCL4>;
+                       bias-pull-up = <1>;
+                       mediatek,rsel = <7>;
+                       mediatek,drive-strength-adv = <7>;
+               };
+       };
+       i2c5_pin: i2c5-pins {
+               pins {
+                       pinmux = <PINMUX_GPIO29__FUNC_SCL5>,
+                                <PINMUX_GPIO30__FUNC_SDA5>;
+                       bias-pull-up = <1>;
+                       mediatek,rsel = <7>;
+                       mediatek,drive-strength-adv = <7>;
+               };
+       };
+       i2c6_pin: i2c6-pins {
+               pins {
+                       pinmux = <PINMUX_GPIO25__FUNC_SDA6>,
+                                <PINMUX_GPIO26__FUNC_SCL6>;
+                       bias-pull-up = <1>;
+               };
+       };
+       i2c7_pin: i2c7-pins {
+               pins {
+                       pinmux = <PINMUX_GPIO27__FUNC_SCL7>,
+                                <PINMUX_GPIO28__FUNC_SDA7>;
+                       bias-pull-up = <1>;
+               };
+       };
+       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>;
+               };
+       };
+};
+
+&u2port0 {
+       status = "okay";
+};
+
+&u2port1 {
+       status = "okay";
+};
+
+&u3phy0 {
+       status="okay";
+};
+
+&u3phy1 {
+       status="okay";
+};
+
+&u3port0 {
+       status = "okay";
+};
+
+&u3port1 {
+       status = "okay";
+};
+
+&uart0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart0_pin>;
+       status = "okay";
+};
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +11 -0
new file mode 100644
index 000000000000..057a8492edec
@@ -0,0 +1,1034 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright (c) 2021 MediaTek Inc.
+ * Author: Seiya Wang <[email protected]>
+ */
+
+/dts-v1/;
+#include <dt-bindings/clock/mt8195-clk.h>
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/phy/phy.h>

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

Quoted 10 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +10 -0
+#include <dt-bindings/pinctrl/mt8195-pinfunc.h>
+#include <dt-bindings/reset/ti-syscon.h>
+
+/ {
+       compatible = "mediatek,mt8195";
+       interrupt-parent = <&gic>;
+       #address-cells = <2>;
+       #size-cells = <2>;
+
+       clk26m: oscillator0 {

Please order device nodes based on the node name ("oscillator0"), not the label. An exception to this would be the "soc" node, which most tend to keep as the last node in the list.

Also, naming them "oscillator-26m" and "oscillator-32k" would make more sense than "oscillatorN".

Quoted 108 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +108 -0
+               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";
+       };
+
+       cpus {
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               cpu0: cpu@0 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a55";
+                       reg = <0x000>;
+                       enable-method = "psci";
+                       clock-frequency = <1701000000>;
+                       capacity-dmips-mhz = <578>;
+                       cpu-idle-states = <&cpuoff_l &clusteroff_l>;
+                       next-level-cache = <&l2_0>;
+                       #cooling-cells = <2>;
+               };
+
+               cpu1: cpu@100 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a55";
+                       reg = <0x100>;
+                       enable-method = "psci";
+                       clock-frequency = <1701000000>;
+                       capacity-dmips-mhz = <578>;
+                       cpu-idle-states = <&cpuoff_l &clusteroff_l>;
+                       next-level-cache = <&l2_0>;
+                       #cooling-cells = <2>;
+               };
+
+               cpu2: cpu@200 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a55";
+                       reg = <0x200>;
+                       enable-method = "psci";
+                       clock-frequency = <1701000000>;
+                       capacity-dmips-mhz = <578>;
+                       cpu-idle-states = <&cpuoff_l &clusteroff_l>;
+                       next-level-cache = <&l2_0>;
+                       #cooling-cells = <2>;
+               };
+
+               cpu3: cpu@300 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a55";
+                       reg = <0x300>;
+                       enable-method = "psci";
+                       clock-frequency = <1701000000>;
+                       capacity-dmips-mhz = <578>;
+                       cpu-idle-states = <&cpuoff_l &clusteroff_l>;
+                       next-level-cache = <&l2_0>;
+                       #cooling-cells = <2>;
+               };
+
+               cpu4: cpu@400 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a78";
+                       reg = <0x400>;
+                       enable-method = "psci";
+                       clock-frequency = <2171000000>;
+                       capacity-dmips-mhz = <1024>;
+                       cpu-idle-states = <&cpuoff_b &clusteroff_b>;
+                       next-level-cache = <&l2_1>;
+                       #cooling-cells = <2>;
+               };
+
+               cpu5: cpu@500 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a78";
+                       reg = <0x500>;
+                       enable-method = "psci";
+                       clock-frequency = <2171000000>;
+                       capacity-dmips-mhz = <1024>;
+                       cpu-idle-states = <&cpuoff_b &clusteroff_b>;
+                       next-level-cache = <&l2_1>;
+                       #cooling-cells = <2>;
+               };
+
+               cpu6: cpu@600 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a78";
+                       reg = <0x600>;
+                       enable-method = "psci";
+                       clock-frequency = <2171000000>;
+                       capacity-dmips-mhz = <1024>;
+                       cpu-idle-states = <&cpuoff_b &clusteroff_b>;
+                       next-level-cache = <&l2_1>;
+                       #cooling-cells = <2>;
+               };
+
+               cpu7: cpu@700 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a78";
+                       reg = <0x700>;
+                       enable-method = "psci";
+                       clock-frequency = <2171000000>;
+                       capacity-dmips-mhz = <1024>;

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

Quoted 10 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +10 -0
+                       cpu-idle-states = <&cpuoff_b &clusteroff_b>;
+                       next-level-cache = <&l2_1>;
+                       #cooling-cells = <2>;
+               };
+
+               cpu-map {
+                       cluster0 {
+                               core0 {
+                                       cpu = <&cpu0>;
+                               };

Please add an empty line between child nodes. This aids in readability.

Quoted 18 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +18 -0
+                               core1 {
+                                       cpu = <&cpu1>;
+                               };
+                               core2 {
+                                       cpu = <&cpu2>;
+                               };
+                               core3 {
+                                       cpu = <&cpu3>;
+                               };
+                       };
+                       cluster1 {
+                               core0 {
+                                       cpu = <&cpu4>;
+                               };
+                               core1 {
+                                       cpu = <&cpu5>;
+                               };
+                               core2 {

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

Quoted 10 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +10 -0
+                                       cpu = <&cpu6>;
+                               };
+                               core3 {
+                                       cpu = <&cpu7>;
+                               };
+                       };
+               };
+
+               idle-states {
+                       entry-method = "arm,psci";

This should be just "psci".

Please add empty lines between properties and child device nodes, and in between device nodes.

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

Quoted 1 line
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +1 -0
+                       cpuoff_l: cpuoff_l {

Please do not use underscores in device node names. Also, for the idle states, the binding requires the nodes to be named as "cpu-*" or "cluster-*". So {cpu,cluster}-off-{l,b} would work.

Quoted 70 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +70 -0
+                               compatible = "arm,idle-state";
+                               arm,psci-suspend-param = <0x00010001>;
+                               local-timer-stop;
+                               entry-latency-us = <50>;
+                               exit-latency-us = <95>;
+                               min-residency-us = <580>;
+                       };
+                       cpuoff_b: cpuoff_b {
+                               compatible = "arm,idle-state";
+                               arm,psci-suspend-param = <0x00010001>;
+                               local-timer-stop;
+                               entry-latency-us = <45>;
+                               exit-latency-us = <140>;
+                               min-residency-us = <740>;
+                       };
+                       clusteroff_l: clusteroff_l {
+                               compatible = "arm,idle-state";
+                               arm,psci-suspend-param = <0x01010002>;
+                               local-timer-stop;
+                               entry-latency-us = <55>;
+                               exit-latency-us = <155>;
+                               min-residency-us = <840>;
+                       };
+                       clusteroff_b: clusteroff_b {
+                               compatible = "arm,idle-state";
+                               arm,psci-suspend-param = <0x01010002>;
+                               local-timer-stop;
+                               entry-latency-us = <50>;
+                               exit-latency-us = <200>;
+                               min-residency-us = <1000>;
+                       };
+               };
+
+               l2_0: l2-cache0 {
+                       compatible = "cache";
+                       next-level-cache = <&l3_0>;
+               };
+
+               l2_1: l2-cache1 {
+                       compatible = "cache";
+                       next-level-cache = <&l3_0>;
+               };
+
+               l3_0: l3-cache {
+                       compatible = "cache";
+               };
+       };
+
+       dsu-pmu {
+               compatible = "arm,dsu-pmu";
+               interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH 0>;
+               cpus = <&cpu0>, <&cpu1>, <&cpu2>, <&cpu3>,
+                      <&cpu4>, <&cpu5>, <&cpu6>, <&cpu7>;
+       };
+
+       pmu-a55 {
+               compatible = "arm,cortex-a55-pmu";
+               interrupt-parent = <&gic>;
+               interrupts = <GIC_PPI 7 IRQ_TYPE_LEVEL_HIGH &ppi_cluster0>;
+       };
+
+       pmu-a78 {
+               compatible = "arm,cortex-a78-pmu";
+               interrupt-parent = <&gic>;
+               interrupts = <GIC_PPI 7 IRQ_TYPE_LEVEL_HIGH &ppi_cluster1>;
+       };
+
+       psci {
+               compatible = "arm,psci-1.0";
+               method = "smc";

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

Quoted 10 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +10 -0
+       };
+
+       timer: timer {
+               compatible = "arm,armv8-timer";
+               interrupt-parent = <&gic>;
+               interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_HIGH 0>,
+                            <GIC_PPI 14 IRQ_TYPE_LEVEL_HIGH 0>,
+                            <GIC_PPI 11 IRQ_TYPE_LEVEL_HIGH 0>,
+                            <GIC_PPI 10 IRQ_TYPE_LEVEL_HIGH 0>;
+               clock-frequency = <13000000>;

IIRC Marc already mentioned before that this should not be specified in the device tree. The firmware should have filled in the CNTFRQ register.

Quoted 12 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +12 -0
+       };
+
+       soc {
+               #address-cells = <2>;
+               #size-cells = <2>;
+               compatible = "simple-bus";
+               ranges;
+
+               gic: interrupt-controller@c000000 {
+                       compatible = "arm,gic-v3";
+                       #interrupt-cells = <4>;
+                       #redistributor-regions = <1>;

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

Quoted 10 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +10 -0
+                       interrupt-parent = <&gic>;
+                       interrupt-controller;
+                       reg = <0 0x0c000000 0 0x40000>,
+                             <0 0x0c040000 0 0x200000>;
+                       interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH 0>;
+
+                       ppi-partitions {
+                               ppi_cluster0: interrupt-partition-0 {
+                                       affinity = <&cpu0 &cpu1 &cpu2 &cpu3>;
+                               };

Please add an extra line for readability.

Quoted 6 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +6 -0
+                               ppi_cluster1: interrupt-partition-1 {
+                                       affinity = <&cpu4 &cpu5 &cpu6 &cpu7>;
+                               };
+                       };
+               };
+

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

Quoted 10 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +10 -0
+               topckgen: syscon@10000000 {
+                       compatible = "mediatek,mt8195-topckgen", "syscon";
+                       reg = <0 0x10000000 0 0x1000>;
+                       #clock-cells = <1>;
+               };
+
+               infracfg_ao: syscon@10001000 {
+                       compatible = "mediatek,mt8195-infracfg_ao", "syscon", "simple-mfd";
+                       reg = <0 0x10001000 0 0x1000>;
+                       #clock-cells = <1>;

Please add an extra line for readability.

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

Quoted 8 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +8 -0
+                       infracfg_rst: reset-controller {
+                               compatible = "ti,syscon-reset";
+                               #reset-cells = <1>;
+                               ti,reset-bits = <
+                                       0x140 18 0x144 18 0 0 (ASSERT_SET | DEASSERT_SET | STATUS_NONE)
+                                       0x120 0 0x124 0 0 0     (ASSERT_SET | DEASSERT_SET | STATUS_NONE)
+                                       0x730 10 0x734 10 0 0     (ASSERT_SET | DEASSERT_SET | STATUS_NONE)
+                                       0x150 5 0x154 5 0 0     (ASSERT_SET | DEASSERT_SET | STATUS_NONE)

This should be 7 cells per entry:

    ti,reset-bits =
        <0x140 18 0x144 18 0 0 (ASSERT_SET | DEASSERT_SET | STATUS_NONE>,
        <0x120 0 0x124 0 0 0 (ASSERT_SET | DEASSERT_SET | STATUS_NONE)>,
        <...>,
        <...>;

Also, please remove the extra spaces in each line. They aren't helping with formatting.

Quoted 13 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +12 -0
+                               >;
+                       };
+               };
+
 
+               pio: pinctrl@10005000 {
+                       compatible = "mediatek,mt8195-pinctrl";
+                       reg = <0 0x10005000 0 0x1000>,
+                             <0 0x11d10000 0 0x1000>,
+                             <0 0x11d30000 0 0x1000>,
+                             <0 0x11d40000 0 0x1000>,
+                             <0 0x11e20000 0 0x1000>,
+                             <0 0x11eb0000 0 0x1000>,

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

Quoted 10 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +10 -0
+                             <0 0x11f40000 0 0x1000>,
+                             <0 0x1000b000 0 0x1000>;
+                       reg-names = "iocfg0", "iocfg_bm", "iocfg_bl",
+                                   "iocfg_br", "iocfg_lm", "iocfg_rb",
+                                   "iocfg_tl", "eint";
+                       gpio-controller;
+                       #gpio-cells = <2>;
+                       gpio-ranges = <&pio 0 0 144>;
+                       interrupt-controller;
+                       interrupts = <GIC_SPI 235 IRQ_TYPE_LEVEL_HIGH 0>;

This looks correct now (a comment I raised in v4). Thanks.

Quoted 2 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +2 -0
+                       #interrupt-cells = <2>;
+               };

[...]

Quoted 8 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +8 -0
+               xhci0: usb@11200000 {
+                       compatible = "mediatek,mt8195-xhci",
+                                    "mediatek,mtk-xhci";
+                       reg = <0 0x11200000 0 0x1000>,
+                             <0 0x11203e00 0 0x0100>;
+                       reg-names = "mac", "ippc";
+                       interrupts = <GIC_SPI 129 IRQ_TYPE_LEVEL_HIGH 0>;
+                       phys = <&u2port0 PHY_TYPE_USB2>,

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

Quoted 10 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +10 -0
+                              <&u3port0 PHY_TYPE_USB3>;
+                       assigned-clocks = <&topckgen CLK_TOP_USB_TOP>,
+                                         <&topckgen CLK_TOP_SSUSB_XHCI>;
+                       assigned-clock-parents = <&topckgen CLK_TOP_UNIVPLL_D5_D4>,
+                                                <&topckgen CLK_TOP_UNIVPLL_D5_D4>;
+                       clocks = <&infracfg_ao CLK_INFRA_AO_SSUSB>,
+                                <&infracfg_ao CLK_INFRA_AO_SSUSB_XHCI>,
+                                <&topckgen CLK_TOP_SSUSB_REF>,
+                                <&apmixedsys CLK_APMIXED_USB1PLL>;
+                       clock-names = "sys_ck", "xhci_ck", "ref_ck", "mcu_ck";

The binding for this needs to be fixed. It expects clocks in the order specified in the binding, and this doesn't match. Also, "dma_ck" is missing and will likely cause warnings to be generated.

This goes for all the xhci device nodes.

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

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

The binding only allows one entry. Please fix the binding first. This was added with MT8183, and the fix should list the relavent commit.

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";
+               };
+

[...]

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

Quoted 9 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +9 -0
+
+               xhci1: usb@11290000 {
+                       compatible = "mediatek,mt8195-xhci",
+                                    "mediatek,mtk-xhci";
+                       reg = <0 0x11290000 0 0x1000>,
+                             <0 0x11293e00 0 0x0100>;
+                       reg-names = "mac", "ippc";
+                       interrupts = <GIC_SPI 530 IRQ_TYPE_LEVEL_HIGH 0>;
+                       phys = <&u2port1 PHY_TYPE_USB2>;

Shouldn't there be a USB3 phy?

Quoted 38 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +38 -0
+                       assigned-clocks = <&topckgen CLK_TOP_USB_TOP_1P>,
+                                         <&topckgen CLK_TOP_SSUSB_XHCI_1P>;
+                       assigned-clock-parents = <&topckgen CLK_TOP_UNIVPLL_D5_D4>,
+                                                <&topckgen CLK_TOP_UNIVPLL_D5_D4>;
+                       clocks = <&pericfg_ao CLK_PERI_AO_SSUSB_1P_BUS>,
+                                <&topckgen CLK_TOP_SSUSB_P1_REF>,
+                                <&pericfg_ao CLK_PERI_AO_SSUSB_1P_XHCI>,
+                                <&apmixedsys CLK_APMIXED_USB1PLL>;
+                       clock-names = "sys_ck", "ref_ck", "xhci_ck", "mcu_ck";
+                       status = "disabled";
+               };
+
+               xhci2: usb@112a0000 {
+                       compatible = "mediatek,mt8195-xhci",
+                                    "mediatek,mtk-xhci";
+                       reg = <0 0x112a0000 0 0x1000>,
+                             <0 0x112a3e00 0 0x0100>;
+                       reg-names = "mac", "ippc";
+                       interrupts = <GIC_SPI 533 IRQ_TYPE_LEVEL_HIGH 0>;
+                       phys = <&u2port2 PHY_TYPE_USB2>;
+                       assigned-clocks = <&topckgen CLK_TOP_USB_TOP_2P>,
+                                         <&topckgen CLK_TOP_SSUSB_XHCI_2P>;
+                       assigned-clock-parents = <&topckgen CLK_TOP_UNIVPLL_D5_D4>,
+                                                <&topckgen CLK_TOP_UNIVPLL_D5_D4>;
+                       clocks = <&pericfg_ao CLK_PERI_AO_SSUSB_2P_BUS>,
+                                <&topckgen CLK_TOP_SSUSB_P2_REF>,
+                                <&pericfg_ao CLK_PERI_AO_SSUSB_2P_XHCI>;
+                       clock-names = "sys_ck", "ref_ck", "xhci_ck";
+                       status = "disabled";
+               };
+
+               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>;

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

Quoted 10 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +10 -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>,
+                                <&pericfg_ao CLK_PERI_AO_SSUSB_3P_XHCI>,
+                                <&topckgen CLK_TOP_SSUSB_P3_REF>;
+                       clock-names = "sys_ck", "xhci_ck", "ref_ck";
+                       usb2-lpm-disable;

Could you explain why this is needed only for this controller?

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

Quoted 5 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +4 -0
+                       status = "disabled";
+               };
+
 
+               u3phy2: t-phy@11c40000 {

Just "phy" for the node name. (Or maybe "serdes".) t-phy is not generic.

Quoted 14 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +14 -0
+                       compatible = "mediatek,mt8195-tphy", "mediatek,generic-tphy-v3";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       ranges = <0 0 0x11c40000 0x700>;
+                       status = "disabled";
+
+                       u2port2: usb-phy@0 {
+                               reg = <0x0 0x700>;
+                               clocks = <&topckgen CLK_TOP_SSUSB_PHY_P2_REF>;
+                               clock-names = "ref";
+                               #phy-cells = <1>;
+                       };
+               };
+

[...]

Quoted 1 line

+ ufsphy: ufs-phy@11fa0000 {

I would have preferred "phy" for the device node, but this seems already defined in the binding.

This IP block is not listed in the datasheet I have, so I am unable to verify the properties listed here.

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

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

Most of the issues I raised in this version were issues with things not matching the bindings. Please apply your patches on -next and run make dtbs_check.

ChenYu

#13 lore raw

Re: [PATCH v7 4/4] arm64: dts: Add mediatek SoC mt8195 and evaluation board

Quoted 721 lines · Chen-Yu Tsai

Hi,

Quoted 78 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 |  209 ++++
 arch/arm64/boot/dts/mediatek/mt8195.dtsi    | 1034
+++++++++++++++++++
 3 files changed, 1244 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 4f68ebed2e31..7aa08bb4c078 100644
@@ -32,4 +32,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 +45 -0
new file mode 100644
index 000000000000..e581c6bbead6
@@ -0,0 +1,209 @@
+// 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";
+};
+
+&i2c2 {

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

Quoted 10 lines
arch/arm64/boot/dts/mediatek/mt8195-evb.dts new file +10 -0
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c2_pin>;
+       status = "disabled";
+};
+
+&i2c3 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c3_pin>;
+       status = "disabled";
+};

Is there any reason in particular to list "disabled" devices here? Are they part of some GPIO header? If they are not accessible, then it's better to not list them. If they are, please leave a comment about it.

Quoted 10 lines
arch/arm64/boot/dts/mediatek/mt8195-evb.dts new file +10 -0
+
+&i2c4 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c4_pin>;
+       clock-frequency = <400000>;
+       status = "okay";
+};
+
+&i2c5 {
+       pinctrl-names = "default";

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

Quoted 10 lines
arch/arm64/boot/dts/mediatek/mt8195-evb.dts new file +10 -0
+       pinctrl-0 = <&i2c5_pin>;
+       status = "disabled";
+};
+
+&i2c6 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c6_pin>;
+       clock-frequency = <400000>;
+       status = "disabled";
+};

Same here.

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

Quoted 5 lines
arch/arm64/boot/dts/mediatek/mt8195-evb.dts new file +5 -0
+
+&nor_flash {
+       status = "okay";
+       pinctrl-names = "default";
+       pinctrl-0 = <&nor_pins_default>;

Please add an empty line between properties and child device nodes. It helps
with readability and also fits the style of other parts and other DT files.

Quoted 4 lines
arch/arm64/boot/dts/mediatek/mt8195-evb.dts new file +4 -0
+       flash@0 {
+               compatible = "jedec,spi-nor";
+               reg = <0>;
+               spi-max-frequency = <50000000>;

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

Quoted 10 lines
arch/arm64/boot/dts/mediatek/mt8195-evb.dts new file +10 -0
+       };
+};
+
+&pio {
+       i2c0_pin: i2c0-pins {
+               pins {
+                       pinmux = <PINMUX_GPIO8__FUNC_SDA0>,
+                                <PINMUX_GPIO9__FUNC_SCL0>;
+                       bias-pull-up = <1>;
+                       mediatek,rsel = <7>;

Please use the MTK_PULL_SET_RSEL_* macros with the bias-pull-* properties.
We spent a lot of time defining those.

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

Quoted 1 line
arch/arm64/boot/dts/mediatek/mt8195-evb.dts new file +1 -0
+                       mediatek,drive-strength-adv = <0>;

This property is not part of the DT binding.

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

Quoted 1 line
arch/arm64/boot/dts/mediatek/mt8195-evb.dts new file +1 -0
+                       drive-strength = <MTK_DRIVE_6mA>;

Please just use raw numbers here. MTK_DRIVE_6mA just translates to 6. The binding already specifies mA as the unit for "drive-strength".

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

Quoted 2 lines
arch/arm64/boot/dts/mediatek/mt8195-evb.dts new file +2 -0
+               };
+       };

Above comments apply to all the other "pins" nodes.

Please add an empty line between different child device nodes. It helps
with readability and also fits the style of other parts and other DT files.

Quoted 133 lines
arch/arm64/boot/dts/mediatek/mt8195-evb.dts new file +64 -0
+       i2c1_pin: i2c1-pins {
+               pins {
+                       pinmux = <PINMUX_GPIO10__FUNC_SDA1>,
+                                <PINMUX_GPIO11__FUNC_SCL1>;
+                       bias-pull-up = <1>;
+                       mediatek,rsel = <7>;
+                       mediatek,drive-strength-adv = <0>;
+                       drive-strength = <MTK_DRIVE_6mA>;
+               };
+       };
+       i2c2_pin: i2c2-pins {
+               pins {
+                       pinmux = <PINMUX_GPIO12__FUNC_SDA2>,
+                                <PINMUX_GPIO13__FUNC_SCL2>;
+                       bias-pull-up = <1>;
+                       mediatek,rsel = <7>;
+                       mediatek,drive-strength-adv = <7>;
+               };
+       };
+       i2c3_pin: i2c3-pins {
+               pins {
+                       pinmux = <PINMUX_GPIO14__FUNC_SDA3>,
+                                <PINMUX_GPIO15__FUNC_SCL3>;
+                       bias-pull-up = <1>;
+                       mediatek,rsel = <7>;
+                       mediatek,drive-strength-adv = <7>;
+               };
+       };
+       i2c4_pin: i2c4-pins {
+               pins {
+                       pinmux = <PINMUX_GPIO16__FUNC_SDA4>,
+                                <PINMUX_GPIO17__FUNC_SCL4>;
+                       bias-pull-up = <1>;
+                       mediatek,rsel = <7>;
+                       mediatek,drive-strength-adv = <7>;
+               };
+       };
+       i2c5_pin: i2c5-pins {
+               pins {
+                       pinmux = <PINMUX_GPIO29__FUNC_SCL5>,
+                                <PINMUX_GPIO30__FUNC_SDA5>;
+                       bias-pull-up = <1>;
+                       mediatek,rsel = <7>;
+                       mediatek,drive-strength-adv = <7>;
+               };
+       };
+       i2c6_pin: i2c6-pins {
+               pins {
+                       pinmux = <PINMUX_GPIO25__FUNC_SDA6>,
+                                <PINMUX_GPIO26__FUNC_SCL6>;
+                       bias-pull-up = <1>;
+               };
+       };
+       i2c7_pin: i2c7-pins {
+               pins {
+                       pinmux = <PINMUX_GPIO27__FUNC_SCL7>,
+                                <PINMUX_GPIO28__FUNC_SDA7>;
+                       bias-pull-up = <1>;
+               };
+       };
+       nor_pins_default: nor-pins {
+               pins0 {
+                       pinmux = <PINMUX_GPIO142__FUNC_SPINOR_IO0>,
+                                        <PINMUX_GPIO141__FUNC_SPIN

OR_CK>,
+ <PINMUX_GPIO143__FUNC_SPIN
OR_IO1>;

arch/arm64/boot/dts/mediatek/mt8195-evb.dts new file +5 -0
+                       bias-pull-down;
+               };
+               pins1 {
+                       pinmux = <PINMUX_GPIO140__FUNC_SPINOR_CS>,
+                                    <PINMUX_GPIO130__FUNC_SPINOR_I

O2>,
+ <PINMUX_GPIO131__FUNC_SPINOR_I
O3>;

arch/arm64/boot/dts/mediatek/mt8195-evb.dts new file +40 -0
+                       bias-pull-up;
+               };
+       };
+       uart0_pin: uart0-pins {
+               pins {
+                       pinmux = <PINMUX_GPIO98__FUNC_UTXD0>,
+                               <PINMUX_GPIO99__FUNC_URXD0>;
+               };
+       };
+};
+
+&u2port0 {
+       status = "okay";
+};
+
+&u2port1 {
+       status = "okay";
+};
+
+&u3phy0 {
+       status="okay";
+};
+
+&u3phy1 {
+       status="okay";
+};
+
+&u3port0 {
+       status = "okay";
+};
+
+&u3port1 {
+       status = "okay";
+};
+
+&uart0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart0_pin>;
+       status = "okay";
+};
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +11 -0
new file mode 100644
index 000000000000..057a8492edec
@@ -0,0 +1,1034 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright (c) 2021 MediaTek Inc.
+ * Author: Seiya Wang <[email protected]>
+ */
+
+/dts-v1/;
+#include <dt-bindings/clock/mt8195-clk.h>
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/phy/phy.h>

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

Quoted 10 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +10 -0
+#include <dt-bindings/pinctrl/mt8195-pinfunc.h>
+#include <dt-bindings/reset/ti-syscon.h>
+
+/ {
+       compatible = "mediatek,mt8195";
+       interrupt-parent = <&gic>;
+       #address-cells = <2>;
+       #size-cells = <2>;
+
+       clk26m: oscillator0 {

Please order device nodes based on the node name ("oscillator0"), not the label. An exception to this would be the "soc" node, which most tend to keep as the last node in the list.

Also, naming them "oscillator-26m" and "oscillator-32k" would make more sense than "oscillatorN".

Quoted 117 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +25 -0
+               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";
+       };
+
+       cpus {
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               cpu0: cpu@0 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a55";
+                       reg = <0x000>;
+                       enable-method = "psci";
+                       clock-frequency = <1701000000>;
+                       capacity-dmips-mhz = <578>;
+                       cpu-idle-states = <&cpuoff_l

&clusteroff_l>;

arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +12 -0
+                       next-level-cache = <&l2_0>;
+                       #cooling-cells = <2>;
+               };
+
+               cpu1: cpu@100 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a55";
+                       reg = <0x100>;
+                       enable-method = "psci";
+                       clock-frequency = <1701000000>;
+                       capacity-dmips-mhz = <578>;
+                       cpu-idle-states = <&cpuoff_l

&clusteroff_l>;

arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +12 -0
+                       next-level-cache = <&l2_0>;
+                       #cooling-cells = <2>;
+               };
+
+               cpu2: cpu@200 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a55";
+                       reg = <0x200>;
+                       enable-method = "psci";
+                       clock-frequency = <1701000000>;
+                       capacity-dmips-mhz = <578>;
+                       cpu-idle-states = <&cpuoff_l

&clusteroff_l>;

arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +12 -0
+                       next-level-cache = <&l2_0>;
+                       #cooling-cells = <2>;
+               };
+
+               cpu3: cpu@300 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a55";
+                       reg = <0x300>;
+                       enable-method = "psci";
+                       clock-frequency = <1701000000>;
+                       capacity-dmips-mhz = <578>;
+                       cpu-idle-states = <&cpuoff_l

&clusteroff_l>;

arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +12 -0
+                       next-level-cache = <&l2_0>;
+                       #cooling-cells = <2>;
+               };
+
+               cpu4: cpu@400 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a78";
+                       reg = <0x400>;
+                       enable-method = "psci";
+                       clock-frequency = <2171000000>;
+                       capacity-dmips-mhz = <1024>;
+                       cpu-idle-states = <&cpuoff_b

&clusteroff_b>;

arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +12 -0
+                       next-level-cache = <&l2_1>;
+                       #cooling-cells = <2>;
+               };
+
+               cpu5: cpu@500 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a78";
+                       reg = <0x500>;
+                       enable-method = "psci";
+                       clock-frequency = <2171000000>;
+                       capacity-dmips-mhz = <1024>;
+                       cpu-idle-states = <&cpuoff_b

&clusteroff_b>;

arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +12 -0
+                       next-level-cache = <&l2_1>;
+                       #cooling-cells = <2>;
+               };
+
+               cpu6: cpu@600 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a78";
+                       reg = <0x600>;
+                       enable-method = "psci";
+                       clock-frequency = <2171000000>;
+                       capacity-dmips-mhz = <1024>;
+                       cpu-idle-states = <&cpuoff_b

&clusteroff_b>;

arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +12 -0
+                       next-level-cache = <&l2_1>;
+                       #cooling-cells = <2>;
+               };
+
+               cpu7: cpu@700 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a78";
+                       reg = <0x700>;
+                       enable-method = "psci";
+                       clock-frequency = <2171000000>;
+                       capacity-dmips-mhz = <1024>;
+                       cpu-idle-states = <&cpuoff_b

&clusteroff_b>;

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

Quoted 9 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +9 -0
+                       next-level-cache = <&l2_1>;
+                       #cooling-cells = <2>;
+               };
+
+               cpu-map {
+                       cluster0 {
+                               core0 {
+                                       cpu = <&cpu0>;
+                               };

Please add an empty line between child nodes. This aids in readability.

Quoted 18 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +18 -0
+                               core1 {
+                                       cpu = <&cpu1>;
+                               };
+                               core2 {
+                                       cpu = <&cpu2>;
+                               };
+                               core3 {
+                                       cpu = <&cpu3>;
+                               };
+                       };
+                       cluster1 {
+                               core0 {
+                                       cpu = <&cpu4>;
+                               };
+                               core1 {
+                                       cpu = <&cpu5>;
+                               };
+                               core2 {

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

Quoted 10 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +10 -0
+                                       cpu = <&cpu6>;
+                               };
+                               core3 {
+                                       cpu = <&cpu7>;
+                               };
+                       };
+               };
+
+               idle-states {
+                       entry-method = "arm,psci";

This should be just "psci".

Please add empty lines between properties and child device nodes, and in between device nodes.

Quoted 1 line

+ cpuoff_l: cpuoff_l {

Please do not use underscores in device node names. Also, for the idle
states, the binding requires the nodes to be named as "cpu-*" or "cluster-*". So {cpu,cluster}-off-{l,b} would work.

Quoted 76 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +2 -0
+                               compatible = "arm,idle-state";
+                               arm,psci-suspend-param =

<0x00010001>;

arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +8 -0
+                               local-timer-stop;
+                               entry-latency-us = <50>;
+                               exit-latency-us = <95>;
+                               min-residency-us = <580>;
+                       };
+                       cpuoff_b: cpuoff_b {
+                               compatible = "arm,idle-state";
+                               arm,psci-suspend-param =

<0x00010001>;

arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +8 -0
+                               local-timer-stop;
+                               entry-latency-us = <45>;
+                               exit-latency-us = <140>;
+                               min-residency-us = <740>;
+                       };
+                       clusteroff_l: clusteroff_l {
+                               compatible = "arm,idle-state";
+                               arm,psci-suspend-param =

<0x01010002>;

arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +8 -0
+                               local-timer-stop;
+                               entry-latency-us = <55>;
+                               exit-latency-us = <155>;
+                               min-residency-us = <840>;
+                       };
+                       clusteroff_b: clusteroff_b {
+                               compatible = "arm,idle-state";
+                               arm,psci-suspend-param =

<0x01010002>;

arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +33 -0
+                               local-timer-stop;
+                               entry-latency-us = <50>;
+                               exit-latency-us = <200>;
+                               min-residency-us = <1000>;
+                       };
+               };
+
+               l2_0: l2-cache0 {
+                       compatible = "cache";
+                       next-level-cache = <&l3_0>;
+               };
+
+               l2_1: l2-cache1 {
+                       compatible = "cache";
+                       next-level-cache = <&l3_0>;
+               };
+
+               l3_0: l3-cache {
+                       compatible = "cache";
+               };
+       };
+
+       dsu-pmu {
+               compatible = "arm,dsu-pmu";
+               interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH 0>;
+               cpus = <&cpu0>, <&cpu1>, <&cpu2>, <&cpu3>,
+                      <&cpu4>, <&cpu5>, <&cpu6>, <&cpu7>;
+       };
+
+       pmu-a55 {
+               compatible = "arm,cortex-a55-pmu";
+               interrupt-parent = <&gic>;
+               interrupts = <GIC_PPI 7 IRQ_TYPE_LEVEL_HIGH

&ppi_cluster0>;

arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +6 -0
+       };
+
+       pmu-a78 {
+               compatible = "arm,cortex-a78-pmu";
+               interrupt-parent = <&gic>;
+               interrupts = <GIC_PPI 7 IRQ_TYPE_LEVEL_HIGH

&ppi_cluster1>;

arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +5 -0
+       };
+
+       psci {
+               compatible = "arm,psci-1.0";
+               method = "smc";

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

Quoted 10 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +10 -0
+       };
+
+       timer: timer {
+               compatible = "arm,armv8-timer";
+               interrupt-parent = <&gic>;
+               interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_HIGH 0>,
+                            <GIC_PPI 14 IRQ_TYPE_LEVEL_HIGH 0>,
+                            <GIC_PPI 11 IRQ_TYPE_LEVEL_HIGH 0>,
+                            <GIC_PPI 10 IRQ_TYPE_LEVEL_HIGH 0>;
+               clock-frequency = <13000000>;

IIRC Marc already mentioned before that this should not be specified in
the device tree. The firmware should have filled in the CNTFRQ register.

Quoted 21 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +17 -0
+       };
+
+       soc {
+               #address-cells = <2>;
+               #size-cells = <2>;
+               compatible = "simple-bus";
+               ranges;
+
+               gic: interrupt-controller@c000000 {
+                       compatible = "arm,gic-v3";
+                       #interrupt-cells = <4>;
+                       #redistributor-regions = <1>;
+                       interrupt-parent = <&gic>;
+                       interrupt-controller;
+                       reg = <0 0x0c000000 0 0x40000>,
+                             <0 0x0c040000 0 0x200000>;
+                       interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH

0>;

arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +3 -0
+
+                       ppi-partitions {
+                               ppi_cluster0: interrupt-partition-0 
Quoted 4 lines

{
+ affinity = <&cpu0 &cpu1
&cpu2 &cpu3>;
+ };

Please add an extra line for readability.

Quoted 18 lines

+ ppi_cluster1: interrupt-partition-1
{
+ affinity = <&cpu4 &cpu5
&cpu6 &cpu7>;

arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +6 -0
+                               };
+                       };
+               };
+
+               topckgen: syscon@10000000 {
+                       compatible = "mediatek,mt8195-topckgen",

"syscon";

arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +6 -0
+                       reg = <0 0x10000000 0 0x1000>;
+                       #clock-cells = <1>;
+               };
+
+               infracfg_ao: syscon@10001000 {
+                       compatible = "mediatek,mt8195-infracfg_ao", 

"syscon", "simple-mfd";

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

Quoted 2 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +2 -0
+                       reg = <0 0x10001000 0 0x1000>;
+                       #clock-cells = <1>;

Please add an extra line for readability.

Quoted 5 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +5 -0
+                       infracfg_rst: reset-controller {
+                               compatible = "ti,syscon-reset";
+                               #reset-cells = <1>;
+                               ti,reset-bits = <
+                                       0x140 18 0x144 18 0 0
Quoted 7 lines

(ASSERT_SET | DEASSERT_SET | STATUS_NONE)
+ 0x120 0 0x124 0 0
0 (ASSERT_SET | DEASSERT_SET | STATUS_NONE)
+ 0x730 10 0x734 10 0
0 (ASSERT_SET | DEASSERT_SET | STATUS_NONE)
+ 0x150 5 0x154 5 0
0 (ASSERT_SET | DEASSERT_SET | STATUS_NONE)

This should be 7 cells per entry:

    ti,reset-bits =
        <0x140 18 0x144 18 0 0 (ASSERT_SET | DEASSERT_SET |
STATUS_NONE>,
        <0x120 0 0x124 0 0 0 (ASSERT_SET | DEASSERT_SET |
STATUS_NONE)>,
        <...>,
        <...>;

Also, please remove the extra spaces in each line. They aren't helping
with formatting.

Quoted 24 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +15 -0
+                               >;
+                       };
+               };
+
+               pio: pinctrl@10005000 {
+                       compatible = "mediatek,mt8195-pinctrl";
+                       reg = <0 0x10005000 0 0x1000>,
+                             <0 0x11d10000 0 0x1000>,
+                             <0 0x11d30000 0 0x1000>,
+                             <0 0x11d40000 0 0x1000>,
+                             <0 0x11e20000 0 0x1000>,
+                             <0 0x11eb0000 0 0x1000>,
+                             <0 0x11f40000 0 0x1000>,
+                             <0 0x1000b000 0 0x1000>;
+                       reg-names = "iocfg0", "iocfg_bm",

"iocfg_bl",
+ "iocfg_br", "iocfg_lm",
"iocfg_rb",

arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +6 -0
+                                   "iocfg_tl", "eint";
+                       gpio-controller;
+                       #gpio-cells = <2>;
+                       gpio-ranges = <&pio 0 0 144>;
+                       interrupt-controller;
+                       interrupts = <GIC_SPI 235
Quoted 1 line

IRQ_TYPE_LEVEL_HIGH 0>;

This looks correct now (a comment I raised in v4). Thanks.

Quoted 2 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +2 -0
+                       #interrupt-cells = <2>;
+               };

[...]

Quoted 24 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +7 -0
+               xhci0: usb@11200000 {
+                       compatible = "mediatek,mt8195-xhci",
+                                    "mediatek,mtk-xhci";
+                       reg = <0 0x11200000 0 0x1000>,
+                             <0 0x11203e00 0 0x0100>;
+                       reg-names = "mac", "ippc";
+                       interrupts = <GIC_SPI 129

IRQ_TYPE_LEVEL_HIGH 0>;

arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +3 -0
+                       phys = <&u2port0 PHY_TYPE_USB2>,
+                              <&u3port0 PHY_TYPE_USB3>;
+                       assigned-clocks = <&topckgen

CLK_TOP_USB_TOP>,
+ <&topckgen
CLK_TOP_SSUSB_XHCI>;
+ assigned-clock-parents = <&topckgen
CLK_TOP_UNIVPLL_D5_D4>,
+ <&topckgen
CLK_TOP_UNIVPLL_D5_D4>;

arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +2 -0
+                       clocks = <&infracfg_ao CLK_INFRA_AO_SSUSB>,
+                                <&infracfg_ao

CLK_INFRA_AO_SSUSB_XHCI>,

arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +3 -0
+                                <&topckgen CLK_TOP_SSUSB_REF>,
+                                <&apmixedsys CLK_APMIXED_USB1PLL>;
+                       clock-names = "sys_ck", "xhci_ck",
Quoted 1 line

"ref_ck", "mcu_ck";

Quoted 3 lines

The binding for this needs to be fixed. It expects clocks in the order
specified in the binding, and this doesn't match.

ok

Quoted 2 lines

Also, "dma_ck" is missing
and will likely cause warnings to be generated.

only sys_ck is required, others are optional as described in binding

Quoted 41 lines

This goes for all the xhci device nodes.

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

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

The binding only allows one entry. Please fix the binding first. This was added with MT8183, and the fix should list the relavent commit.

Quoted 11 lines

+ interrupts = <GIC_SPI 131
IRQ_TYPE_LEVEL_HIGH 0>;

arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +3 -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";

arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +3 -0
+                       status = "disabled";
+               };
+

[...]

Quoted 10 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +8 -0
+
+               xhci1: usb@11290000 {
+                       compatible = "mediatek,mt8195-xhci",
+                                    "mediatek,mtk-xhci";
+                       reg = <0 0x11290000 0 0x1000>,
+                             <0 0x11293e00 0 0x0100>;
+                       reg-names = "mac", "ippc";
+                       interrupts = <GIC_SPI 530

IRQ_TYPE_LEVEL_HIGH 0>;
+ phys = <&u2port1 PHY_TYPE_USB2>;

Quoted 1 line

Shouldn't there be a USB3 phy?

currently only enable usb2, usb3 phy is used by pcie.

Quoted 66 lines
Quoted 66 lines

+ assigned-clocks = <&topckgen
CLK_TOP_USB_TOP_1P>,
+ <&topckgen
CLK_TOP_SSUSB_XHCI_1P>;
+ assigned-clock-parents = <&topckgen
CLK_TOP_UNIVPLL_D5_D4>,
+ <&topckgen
CLK_TOP_UNIVPLL_D5_D4>;
+ clocks = <&pericfg_ao
CLK_PERI_AO_SSUSB_1P_BUS>,

arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +2 -0
+                                <&topckgen CLK_TOP_SSUSB_P1_REF>,
+                                <&pericfg_ao

CLK_PERI_AO_SSUSB_1P_XHCI>,

arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +2 -0
+                                <&apmixedsys CLK_APMIXED_USB1PLL>;
+                       clock-names = "sys_ck", "ref_ck",

"xhci_ck", "mcu_ck";

arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +10 -0
+                       status = "disabled";
+               };
+
+               xhci2: usb@112a0000 {
+                       compatible = "mediatek,mt8195-xhci",
+                                    "mediatek,mtk-xhci";
+                       reg = <0 0x112a0000 0 0x1000>,
+                             <0 0x112a3e00 0 0x0100>;
+                       reg-names = "mac", "ippc";
+                       interrupts = <GIC_SPI 533

IRQ_TYPE_LEVEL_HIGH 0>;

arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +2 -0
+                       phys = <&u2port2 PHY_TYPE_USB2>;
+                       assigned-clocks = <&topckgen

CLK_TOP_USB_TOP_2P>,
+ <&topckgen
CLK_TOP_SSUSB_XHCI_2P>;
+ assigned-clock-parents = <&topckgen
CLK_TOP_UNIVPLL_D5_D4>,
+ <&topckgen
CLK_TOP_UNIVPLL_D5_D4>;
+ clocks = <&pericfg_ao
CLK_PERI_AO_SSUSB_2P_BUS>,

arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +2 -0
+                                <&topckgen CLK_TOP_SSUSB_P2_REF>,
+                                <&pericfg_ao

CLK_PERI_AO_SSUSB_2P_XHCI>;
+ clock-names = "sys_ck", "ref_ck",
"xhci_ck";

arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +10 -0
+                       status = "disabled";
+               };
+
+               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>;

arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +2 -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>,

Quoted 8 lines
Quoted 6 lines

+ <&pericfg_ao
CLK_PERI_AO_SSUSB_3P_XHCI>,

arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +2 -0
+                                <&topckgen CLK_TOP_SSUSB_P3_REF>;
+                       clock-names = "sys_ck", "xhci_ck",

"ref_ck";
+ usb2-lpm-disable;

Could you explain why this is needed only for this controller?

This controller is fixed with a BT, there is something issue when enable usb2 lpm, so just disabled tmp.

Quoted 8 lines

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

Quoted 5 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +4 -0
+                       status = "disabled";
+               };
+
+               u3phy2: t-phy@11c40000 {

Just "phy" for the node name. (Or maybe "serdes".) t-phy is not generic.

following t-phy’s dt-binding.
here using t-phy is to avoid dt-check warning, because it has some sub- phys.

Quoted 39 lines
Quoted 16 lines

+ compatible = "mediatek,mt8195-tphy",
"mediatek,generic-tphy-v3";

arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +8 -0
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       ranges = <0 0 0x11c40000 0x700>;
+                       status = "disabled";
+
+                       u2port2: usb-phy@0 {
+                               reg = <0x0 0x700>;
+                               clocks = <&topckgen

CLK_TOP_SSUSB_PHY_P2_REF>;

arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +5 -0
+                               clock-names = "ref";
+                               #phy-cells = <1>;
+                       };
+               };
+

[...]

Quoted 1 line

+ ufsphy: ufs-phy@11fa0000 {

I would have preferred "phy" for the device node, but this seems already
defined in the binding.

This IP block is not listed in the datasheet I have, so I am unable to
verify the properties listed here.

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

Quoted 9 lines

+ compatible = "mediatek,mt8195-ufsphy",
"mediatek,mt8183-ufsphy";

arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +7 -0
+                       reg = <0 0x11fa0000 0 0xc000>;
+                       clocks = <&clk26m>, <&clk26m>;
+                       clock-names = "unipro", "mp";
+                       #phy-cells = <0>;
+                       status = "disabled";
+               };
+
Quoted 4 lines

Most of the issues I raised in this version were issues with things not
matching the bindings. Please apply your patches on -next and run make dtbs_check.

ok. I'll apply comments at next version. Thank you.

Quoted 3 lines

ChenYu

#14 lore raw

Re: [PATCH v7 4/4] arm64: dts: Add mediatek SoC mt8195 and evaluation board

Quoted 281 lines · Tinghan Shen
Quoted 280 lines · Chen-Yu Tsai

Hi,

Quoted 78 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 |  209 ++++
 arch/arm64/boot/dts/mediatek/mt8195.dtsi    | 1034
+++++++++++++++++++
 3 files changed, 1244 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 4f68ebed2e31..7aa08bb4c078 100644
@@ -32,4 +32,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 +45 -0
new file mode 100644
index 000000000000..e581c6bbead6
@@ -0,0 +1,209 @@
+// 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";
+};
+
+&i2c2 {

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

Quoted 10 lines
arch/arm64/boot/dts/mediatek/mt8195-evb.dts new file +10 -0
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c2_pin>;
+       status = "disabled";
+};
+
+&i2c3 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c3_pin>;
+       status = "disabled";
+};

Is there any reason in particular to list "disabled" devices here? Are they part of some GPIO header? If they are not accessible, then it's better to not list them. If they are, please leave a comment about it.

Quoted 10 lines
arch/arm64/boot/dts/mediatek/mt8195-evb.dts new file +10 -0
+
+&i2c4 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c4_pin>;
+       clock-frequency = <400000>;
+       status = "okay";
+};
+
+&i2c5 {
+       pinctrl-names = "default";

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

Quoted 10 lines
arch/arm64/boot/dts/mediatek/mt8195-evb.dts new file +10 -0
+       pinctrl-0 = <&i2c5_pin>;
+       status = "disabled";
+};
+
+&i2c6 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c6_pin>;
+       clock-frequency = <400000>;
+       status = "disabled";
+};

Same here.

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

Quoted 5 lines
arch/arm64/boot/dts/mediatek/mt8195-evb.dts new file +5 -0
+
+&nor_flash {
+       status = "okay";
+       pinctrl-names = "default";
+       pinctrl-0 = <&nor_pins_default>;

Please add an empty line between properties and child device nodes. It helps
with readability and also fits the style of other parts and other DT
files.

Quoted 4 lines
arch/arm64/boot/dts/mediatek/mt8195-evb.dts new file +4 -0
+       flash@0 {
+               compatible = "jedec,spi-nor";
+               reg = <0>;
+               spi-max-frequency = <50000000>;

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

Quoted 10 lines
arch/arm64/boot/dts/mediatek/mt8195-evb.dts new file +10 -0
+       };
+};
+
+&pio {
+       i2c0_pin: i2c0-pins {
+               pins {
+                       pinmux = <PINMUX_GPIO8__FUNC_SDA0>,
+                                <PINMUX_GPIO9__FUNC_SCL0>;
+                       bias-pull-up = <1>;
+                       mediatek,rsel = <7>;

Please use the MTK_PULL_SET_RSEL_* macros with the bias-pull-* properties.
We spent a lot of time defining those.

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

Quoted 1 line
arch/arm64/boot/dts/mediatek/mt8195-evb.dts new file +1 -0
+                       mediatek,drive-strength-adv = <0>;

This property is not part of the DT binding.

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

Quoted 1 line
arch/arm64/boot/dts/mediatek/mt8195-evb.dts new file +1 -0
+                       drive-strength = <MTK_DRIVE_6mA>;

Please just use raw numbers here. MTK_DRIVE_6mA just translates to 6.
The binding already specifies mA as the unit for "drive-strength".

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

Quoted 2 lines
arch/arm64/boot/dts/mediatek/mt8195-evb.dts new file +2 -0
+               };
+       };

Above comments apply to all the other "pins" nodes.

Please add an empty line between different child device nodes. It helps
with readability and also fits the style of other parts and other DT
files.

Quoted 107 lines
arch/arm64/boot/dts/mediatek/mt8195-evb.dts new file +63 -0
+       i2c1_pin: i2c1-pins {
+               pins {
+                       pinmux = <PINMUX_GPIO10__FUNC_SDA1>,
+                                <PINMUX_GPIO11__FUNC_SCL1>;
+                       bias-pull-up = <1>;
+                       mediatek,rsel = <7>;
+                       mediatek,drive-strength-adv = <0>;
+                       drive-strength = <MTK_DRIVE_6mA>;
+               };
+       };
+       i2c2_pin: i2c2-pins {
+               pins {
+                       pinmux = <PINMUX_GPIO12__FUNC_SDA2>,
+                                <PINMUX_GPIO13__FUNC_SCL2>;
+                       bias-pull-up = <1>;
+                       mediatek,rsel = <7>;
+                       mediatek,drive-strength-adv = <7>;
+               };
+       };
+       i2c3_pin: i2c3-pins {
+               pins {
+                       pinmux = <PINMUX_GPIO14__FUNC_SDA3>,
+                                <PINMUX_GPIO15__FUNC_SCL3>;
+                       bias-pull-up = <1>;
+                       mediatek,rsel = <7>;
+                       mediatek,drive-strength-adv = <7>;
+               };
+       };
+       i2c4_pin: i2c4-pins {
+               pins {
+                       pinmux = <PINMUX_GPIO16__FUNC_SDA4>,
+                                <PINMUX_GPIO17__FUNC_SCL4>;
+                       bias-pull-up = <1>;
+                       mediatek,rsel = <7>;
+                       mediatek,drive-strength-adv = <7>;
+               };
+       };
+       i2c5_pin: i2c5-pins {
+               pins {
+                       pinmux = <PINMUX_GPIO29__FUNC_SCL5>,
+                                <PINMUX_GPIO30__FUNC_SDA5>;
+                       bias-pull-up = <1>;
+                       mediatek,rsel = <7>;
+                       mediatek,drive-strength-adv = <7>;
+               };
+       };
+       i2c6_pin: i2c6-pins {
+               pins {
+                       pinmux = <PINMUX_GPIO25__FUNC_SDA6>,
+                                <PINMUX_GPIO26__FUNC_SCL6>;
+                       bias-pull-up = <1>;
+               };
+       };
+       i2c7_pin: i2c7-pins {
+               pins {
+                       pinmux = <PINMUX_GPIO27__FUNC_SCL7>,
+                                <PINMUX_GPIO28__FUNC_SDA7>;
+                       bias-pull-up = <1>;
+               };
+       };
+       nor_pins_default: nor-pins {
+               pins0 {
+                       pinmux =

<PINMUX_GPIO142__FUNC_SPINOR_IO0>,
+ <PINMUX_GPIO141__FUNC_SP
IN
OR_CK>,
+ <PINMUX_GPIO143__FUNC_SP
IN
OR_IO1>;

arch/arm64/boot/dts/mediatek/mt8195-evb.dts new file +4 -0
+                       bias-pull-down;
+               };
+               pins1 {
+                       pinmux =

<PINMUX_GPIO140__FUNC_SPINOR_CS>,
+ <PINMUX_GPIO130__FUNC_SPINOR
_I
O2>,
+ <PINMUX_GPIO131__FUNC_SPINOR
_I
O3>;

arch/arm64/boot/dts/mediatek/mt8195-evb.dts new file +26 -0
+                       bias-pull-up;
+               };
+       };
+       uart0_pin: uart0-pins {
+               pins {
+                       pinmux = <PINMUX_GPIO98__FUNC_UTXD0>,
+                               <PINMUX_GPIO99__FUNC_URXD0>;
+               };
+       };
+};
+
+&u2port0 {
+       status = "okay";
+};
+
+&u2port1 {
+       status = "okay";
+};
+
+&u3phy0 {
+       status="okay";
+};
+
+&u3phy1 {
+       status="okay";
+};
Quoted 8 lines
Quoted 8 lines

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

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

No need add status property for those u*port* subnodes, add it in parent node u*phy* is enough.

Thanks

Quoted 10 lines
Quoted 8 lines
Quoted 7 lines
arch/arm64/boot/dts/mediatek/mt8195-evb.dts new file +6 -0
+
+&uart0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart0_pin>;
+       status = "okay";
+};
#15 lore raw

Re: [PATCH v7 4/4] arm64: dts: Add mediatek SoC mt8195 and evaluation board

In reply to Tinghan Shen
Quoted 2 lines · Tinghan Shen
Quoted 1 line · Chen-Yu Tsai

On Mon, Dec 20, 2021 at 8:20 PM Tinghan Shen <[email protected]> wrote:

[...]

Quoted 32 lines
Quoted 28 lines

[...]

Quoted 24 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +7 -0
+               xhci0: usb@11200000 {
+                       compatible = "mediatek,mt8195-xhci",
+                                    "mediatek,mtk-xhci";
+                       reg = <0 0x11200000 0 0x1000>,
+                             <0 0x11203e00 0 0x0100>;
+                       reg-names = "mac", "ippc";
+                       interrupts = <GIC_SPI 129

IRQ_TYPE_LEVEL_HIGH 0>;

arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +3 -0
+                       phys = <&u2port0 PHY_TYPE_USB2>,
+                              <&u3port0 PHY_TYPE_USB3>;
+                       assigned-clocks = <&topckgen

CLK_TOP_USB_TOP>,
+ <&topckgen
CLK_TOP_SSUSB_XHCI>;
+ assigned-clock-parents = <&topckgen
CLK_TOP_UNIVPLL_D5_D4>,
+ <&topckgen
CLK_TOP_UNIVPLL_D5_D4>;

(quoted diff) +2 -0
+                       clocks = <&infracfg_ao CLK_INFRA_AO_SSUSB>,
+                                <&infracfg_ao

CLK_INFRA_AO_SSUSB_XHCI>,

arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +3 -0
+                                <&topckgen CLK_TOP_SSUSB_REF>,
+                                <&apmixedsys CLK_APMIXED_USB1PLL>;
+                       clock-names = "sys_ck", "xhci_ck",
Quoted 1 line

"ref_ck", "mcu_ck";

Quoted 3 lines

The binding for this needs to be fixed. It expects clocks in the order
specified in the binding, and this doesn't match.

Quoted 6 lines

ok

Quoted 2 lines

Also, "dma_ck" is missing
and will likely cause warnings to be generated.

only sys_ck is required, others are optional as described in binding

I understand, but the bindings language is somewhat limited and right now is written in a way that if "dma_ck" is missing it would fail the DT bindings check.

Quoted 41 lines
Quoted 41 lines

This goes for all the xhci device nodes.

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

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

The binding only allows one entry. Please fix the binding first. This was added with MT8183, and the fix should list the relavent commit.

Quoted 11 lines

+ interrupts = <GIC_SPI 131
IRQ_TYPE_LEVEL_HIGH 0>;

arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +3 -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";

arch/arm64/boot/dts/mediatek/mt8195-evb.dts new file +3 -0
+                       status = "disabled";
+               };
+

[...]

Quoted 10 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +8 -0
+
+               xhci1: usb@11290000 {
+                       compatible = "mediatek,mt8195-xhci",
+                                    "mediatek,mtk-xhci";
+                       reg = <0 0x11290000 0 0x1000>,
+                             <0 0x11293e00 0 0x0100>;
+                       reg-names = "mac", "ippc";
+                       interrupts = <GIC_SPI 530

IRQ_TYPE_LEVEL_HIGH 0>;
+ phys = <&u2port1 PHY_TYPE_USB2>;

Quoted 3 lines
Quoted 1 line

Shouldn't there be a USB3 phy?

currently only enable usb2, usb3 phy is used by pcie.

Got it.

Quoted 75 lines
Quoted 66 lines
Quoted 66 lines

+ assigned-clocks = <&topckgen
CLK_TOP_USB_TOP_1P>,
+ <&topckgen
CLK_TOP_SSUSB_XHCI_1P>;
+ assigned-clock-parents = <&topckgen
CLK_TOP_UNIVPLL_D5_D4>,
+ <&topckgen
CLK_TOP_UNIVPLL_D5_D4>;
+ clocks = <&pericfg_ao
CLK_PERI_AO_SSUSB_1P_BUS>,

(quoted diff) +2 -0
+                                <&topckgen CLK_TOP_SSUSB_P1_REF>,
+                                <&pericfg_ao

CLK_PERI_AO_SSUSB_1P_XHCI>,

(quoted diff) +2 -0
+                                <&apmixedsys CLK_APMIXED_USB1PLL>;
+                       clock-names = "sys_ck", "ref_ck",

"xhci_ck", "mcu_ck";

arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +10 -0
+                       status = "disabled";
+               };
+
+               xhci2: usb@112a0000 {
+                       compatible = "mediatek,mt8195-xhci",
+                                    "mediatek,mtk-xhci";
+                       reg = <0 0x112a0000 0 0x1000>,
+                             <0 0x112a3e00 0 0x0100>;
+                       reg-names = "mac", "ippc";
+                       interrupts = <GIC_SPI 533

IRQ_TYPE_LEVEL_HIGH 0>;

(quoted diff) +2 -0
+                       phys = <&u2port2 PHY_TYPE_USB2>;
+                       assigned-clocks = <&topckgen

CLK_TOP_USB_TOP_2P>,
+ <&topckgen
CLK_TOP_SSUSB_XHCI_2P>;
+ assigned-clock-parents = <&topckgen
CLK_TOP_UNIVPLL_D5_D4>,
+ <&topckgen
CLK_TOP_UNIVPLL_D5_D4>;
+ clocks = <&pericfg_ao
CLK_PERI_AO_SSUSB_2P_BUS>,

(quoted diff) +2 -0
+                                <&topckgen CLK_TOP_SSUSB_P2_REF>,
+                                <&pericfg_ao

CLK_PERI_AO_SSUSB_2P_XHCI>;
+ clock-names = "sys_ck", "ref_ck",
"xhci_ck";

arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +10 -0
+                       status = "disabled";
+               };
+
+               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>;

(quoted diff) +2 -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>,

Quoted 8 lines
Quoted 6 lines

+ <&pericfg_ao
CLK_PERI_AO_SSUSB_3P_XHCI>,

(quoted diff) +2 -0
+                                <&topckgen CLK_TOP_SSUSB_P3_REF>;
+                       clock-names = "sys_ck", "xhci_ck",

"ref_ck";
+ usb2-lpm-disable;

Could you explain why this is needed only for this controller?

Quoted 2 lines

This controller is fixed with a BT, there is something issue when enable usb2 lpm, so just disabled tmp.

Please add a comment explaining things.

Quoted 11 lines
Quoted 7 lines

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

Quoted 4 lines
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +4 -0
+                       status = "disabled";
+               };
+
+               u3phy2: t-phy@11c40000 {

Just "phy" for the node name. (Or maybe "serdes".) t-phy is not generic.

following t-phy’s dt-binding.
here using t-phy is to avoid dt-check warning, because it has some sub- phys.

I see. t-phy it is, then.

Quoted 50 lines
Quoted 39 lines
Quoted 16 lines

+ compatible = "mediatek,mt8195-tphy",
"mediatek,generic-tphy-v3";

arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +8 -0
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       ranges = <0 0 0x11c40000 0x700>;
+                       status = "disabled";
+
+                       u2port2: usb-phy@0 {
+                               reg = <0x0 0x700>;
+                               clocks = <&topckgen

CLK_TOP_SSUSB_PHY_P2_REF>;

arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +5 -0
+                               clock-names = "ref";
+                               #phy-cells = <1>;
+                       };
+               };
+

[...]

Quoted 1 line

+ ufsphy: ufs-phy@11fa0000 {

I would have preferred "phy" for the device node, but this seems already
defined in the binding.

This IP block is not listed in the datasheet I have, so I am unable to
verify the properties listed here.

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

Quoted 9 lines

+ compatible = "mediatek,mt8195-ufsphy",
"mediatek,mt8183-ufsphy";

arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +7 -0
+                       reg = <0 0x11fa0000 0 0xc000>;
+                       clocks = <&clk26m>, <&clk26m>;
+                       clock-names = "unipro", "mp";
+                       #phy-cells = <0>;
+                       status = "disabled";
+               };
+
Quoted 4 lines

Most of the issues I raised in this version were issues with things not
matching the bindings. Please apply your patches on -next and run make dtbs_check.

ok. I'll apply comments at next version. Thank you.

Quoted 3 lines

ChenYu

#16 lore raw

Re: [PATCH v7 4/4] arm64: dts: Add mediatek SoC mt8195 and evaluation board

In reply to Chen-Yu Tsai
Quoted 11 lines · Chen-Yu Tsai

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

Quoted 8 lines · Tinghan Shen
arch/arm64/boot/dts/mediatek/mt8195.dtsi new file +8 -0
+                       infracfg_rst: reset-controller {
+                               compatible = "ti,syscon-reset";
+                               #reset-cells = <1>;
+                               ti,reset-bits = <
+                                       0x140 18 0x144 18 0 0 (ASSERT_SET | DEASSERT_SET | STATUS_NONE)
+                                       0x120 0 0x124 0 0 0     (ASSERT_SET | DEASSERT_SET | STATUS_NONE)
+                                       0x730 10 0x734 10 0 0     (ASSERT_SET | DEASSERT_SET | STATUS_NONE)
+                                       0x150 5 0x154 5 0 0     (ASSERT_SET | DEASSERT_SET | STATUS_NONE)
Quoted 7 lines

This should be 7 cells per entry:

    ti,reset-bits =
        <0x140 18 0x144 18 0 0 (ASSERT_SET | DEASSERT_SET | STATUS_NONE>,
        <0x120 0 0x124 0 0 0 (ASSERT_SET | DEASSERT_SET | STATUS_NONE)>,
        <...>,
        <...>;

Please ignore this comment. It looks like I misread the binding, and your version is correct. However please format the columns so they align.

ChenYu

maintainer
#18 lore raw

Re: (subset) [PATCH v7 0/4] Add basic SoC support for mediatek mt8195

In reply to Tinghan Shen
Quoted 2 lines · Tinghan Shen

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

Applied to

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

Thanks!

[2/4] dt-bindings: spi: spi-mtk-nor: add new clock name 'axi' for spi nor

      commit: 6008cb4c98d935a844edf2f3c13639104f533e30

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