Skip to contentSkip to conversation

Add basic SoC support for mediatek mt8195

PATCH Superseded Tinghan Shen 4 participants 10 messages Jan 12, 2022 – Feb 22, 2022

Subsystems (4)

v9 of 14 Superseded Latest is v14 →

lore
Share & tools
lore
#0 lore raw

v9 cover Add basic SoC support for mediatek mt8195

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

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

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

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

 .../arm/mediatek/mediatek,pericfg.yaml        |    1 +
 .../bindings/pinctrl/pinctrl-mt8195.yaml      |   35 +
 arch/arm64/boot/dts/mediatek/Makefile         |    1 +
 arch/arm64/boot/dts/mediatek/mt8195-evb.dts   |  161 +++
 arch/arm64/boot/dts/mediatek/mt8195.dtsi      | 1049 +++++++++++++++++
 5 files changed, 1247 insertions(+)
 create mode 100644 arch/arm64/boot/dts/mediatek/mt8195-evb.dts
 create mode 100644 arch/arm64/boot/dts/mediatek/mt8195.dtsi
Signature · 1 line
2.18.0
#1 lore raw

PATCH v9 1/3 dt-bindings: arm: mediatek: Add mt8195 pericfg compatible

Add mt8195 pericfg compatible to binding document.

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

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

In reply to Tinghan Shen

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

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

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

[dopping Maciej, Paolo and Sean Christopherson]

Quoted 5 lines · Tinghan Shen

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

Looks good to me. Linus please let me know when you are queuing this patch and I'll take the rest of the series. Another option is, that you provide an Acked-by and I can take the whole set through my branch.

Regards,
Matthias

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

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

Quoted 9 lines · Matthias Brugger

[dopping Maciej, Paolo and Sean Christopherson]

Quoted 5 lines · Tinghan Shen

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

Quoted 6 lines

Looks good to me. Linus please let me know when you are queuing this patch and I'll take the rest of the series. Another option is, that you provide an Acked-by and I can take the whole set through my branch.

Regards,
Matthias

Hi Matthias,

I want to send next version to update the CC list of this series, but I'm not sure whether this will break the conversation between you and Linus.

Is it ok to send next version? or waiting the response?

Best regards,
TingHan

Quoted 50 lines
Quoted 50 lines
---
  .../bindings/pinctrl/pinctrl-mt8195.yaml      | 35 +++++++++++++++++++
  1 file changed, 35 insertions(+)
Documentation/devicetree/bindings/pinctrl/pinctrl-mt8195.yaml +29 -0
index 328ea59c5466..4db4899af6b1 100644
@@ -98,6 +98,32 @@ patternProperties:
            drive-strength:
              enum: [2, 4, 6, 8, 10, 12, 14, 16]
 
+          mediatek,drive-strength-adv:
+            description: |
+              Describe the specific driving setup property.
+              For I2C pins, the existing generic driving setup can only support
+              2/4/6/8/10/12/14/16mA driving. But in specific driving setup, they
+              can support 0.125/0.25/0.5/1mA adjustment. If we enable specific
+              driving setup, the existing generic setup will be disabled.
+              The specific driving setup is controlled by E1E0EN.
+              When E1=0/E0=0, the strength is 0.125mA.
+              When E1=0/E0=1, the strength is 0.25mA.
+              When E1=1/E0=0, the strength is 0.5mA.
+              When E1=1/E0=1, the strength is 1mA.
+              EN is used to enable or disable the specific driving setup.
+              Valid arguments are described as below:
+              0: (E1, E0, EN) = (0, 0, 0)
+              1: (E1, E0, EN) = (0, 0, 1)
+              2: (E1, E0, EN) = (0, 1, 0)
+              3: (E1, E0, EN) = (0, 1, 1)
+              4: (E1, E0, EN) = (1, 0, 0)
+              5: (E1, E0, EN) = (1, 0, 1)
+              6: (E1, E0, EN) = (1, 1, 0)
+              7: (E1, E0, EN) = (1, 1, 1)
+              So the valid arguments are from 0 to 7.
+            $ref: /schemas/types.yaml#/definitions/uint32
+            enum: [0, 1, 2, 3, 4, 5, 6, 7]
+
            bias-pull-down:
              description: |
                For pull down type is normal, it don't need add RSEL & R1R0 define
@@ -268,4 +294,13 @@ examples:
            bias-pull-down;
          };
        };
+
+      i2c0-pins {
+        pins {
Quoted 8 lines

Documentation/devicetree/bindings/pinctrl/pinctrl-mt8195.yaml examples: · line 306

Quoted 8 lines
Documentation/devicetree/bindings/pinctrl/pinctrl-mt8195.yaml +6 -0
+          pinmux = <PINMUX_GPIO8__FUNC_SDA0>,
+                   <PINMUX_GPIO9__FUNC_SCL0>;
+          bias-disable;
+          mediatek,drive-strength-adv = <7>;
+        };
+      };
      };

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

#5 lore raw

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

Quoted 4 lines · Tinghan Shen

I want to send next version to update the CC list of this series, but I'm not sure whether this will break the conversation between you and Linus.

Is it ok to send next version? or waiting the response?

Send a new version, I'll apply the v10 version!

Yours,
Linus Walleij

#6 lore raw

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

Quoted 11 lines · Linus Walleij
Quoted 4 lines · Tinghan Shen

I want to send next version to update the CC list of this series, but I'm not sure whether this will break the conversation between you and Linus.

Is it ok to send next version? or waiting the response?

Send a new version, I'll apply the v10 version!

Yours,
Linus Walleij

Hi Linus,

The new version is available.

https://patchwork.kernel.org/project/linux-mediatek/patch/[email protected]/

v11 is rebased on 5.17-rc4 and it's the same as v10.

Best regards,
Tinghan

#7 lore raw

PATCH v9 3/3 arm64: dts: Add mediatek SoC mt8195 and evaluation board

In reply to Tinghan Shen

Add basic chip support for mediatek mt8195.

---
 arch/arm64/boot/dts/mediatek/Makefile       |    1 +
 arch/arm64/boot/dts/mediatek/mt8195-evb.dts |  161 +++
 arch/arm64/boot/dts/mediatek/mt8195.dtsi    | 1049 +++++++++++++++++++
 3 files changed, 1211 insertions(+)
 create mode 100644 arch/arm64/boot/dts/mediatek/mt8195-evb.dts
 create mode 100644 arch/arm64/boot/dts/mediatek/mt8195.dtsi
arch/arm64/boot/dts/mediatek/Makefile +1 -0
index 8c1e18032f9f..5da29e7223e4 100644
@@ -38,4 +38,5 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-kukui-krane-sku0.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-kukui-krane-sku176.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-pumpkin.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt8192-evb.dtb
+dtb-$(CONFIG_ARCH_MEDIATEK) += mt8195-evb.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt8516-pumpkin.dtb
arch/arm64/boot/dts/mediatek/mt8195-evb.dts new file +161 -0

161 lines not on this page · raw message

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

1,049 lines not on this page · raw message

Signature · 1 line
2.18.0
#8 lore raw
In reply to Tinghan Shen
Quoted 1 line · Tinghan Shen

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

Nice patchset Tinghan, however I can't stop wondering why I was CCed on it (and Paolo and Sean, too) - this isn't KVM related at all.

scripts/get_maintainer.pl going wild?

Thanks,
Maciej

#9 lore raw

Hi Maciej,

Quoted 9 lines · Maciej S. Szmigiero
Quoted 1 line · Tinghan Shen

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

Nice patchset Tinghan, however I can't stop wondering why I was CCed on
it (and Paolo and Sean, too) - this isn't KVM related at all.

scripts/get_maintainer.pl going wild?

Thanks,
Maciej

I'm sorry. I just find out that the file pattern I used includes unrelated files to this series.

I'll clean up the CC list at next version.

Best regards,
TingHan