Add basic SoC support for mediatek mt8195
Subsystems (5)
v6 cover Add basic SoC support for mediatek mt8195
This series adds basic SoC support for Mediatek's SoC MT8195.
---
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: add new clock name 'axi' for spi nor
dt-bindings: pinctrl: mt8195: add 'pins' wrapping node
arm64: dts: Add mediatek SoC mt8195 and evaluation board
.../arm/mediatek/mediatek,pericfg.yaml | 1 + .../bindings/pinctrl/pinctrl-mt8195.yaml | 307 ++--- .../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, 1410 insertions(+), 148 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
PATCH v6 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
@@ -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
PATCH v6 2/4 dt-bindings: spi: add new clock name 'axi' for spi nor
In reply to Tinghan ShenSome 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
@@ -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. clock-names: + minItems: 2 items: - const: spi - const: sf + - const: axi required: - compatible
@@ -84,4 +89,3 @@ examples: }; }; }; -
Signature · 1 line
2.18.0
Mark Brown
maintainerRe: [PATCH v6 2/4] dt-bindings: spi: add new clock name 'axi' for spi nor
Documentation/devicetree/bindings/spi/mediatek,spi-mtk-nor.yaml properties: · line 58
Quoted 9 lines · Tinghan Shen
Some mtk spi nor has dedicated dma(s) inside. Add a new clock name, axi, for spi nor dma bus clock.
clock-names:
Documentation/devicetree/bindings/spi/mediatek,spi-mtk-nor.yaml +2
-0+ minItems: 2 items: - const: spi - const: sf + - const: axi
This will cause any existing DTs that don't have both spi and sf clocks defined to fail to validate which doesn't seem great. Given that your commit message says this is only required for some SoCs shouldn't the minimum clocks requirement depend on which particular SoC/IP version is being used? Not exactly sure how one specifies that in the YAML format.
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.
Rob Herring
maintainerRe: [PATCH v6 2/4] dt-bindings: spi: add new clock name 'axi' for spi nor
Quoted 12 lines · Mark Brown
Documentation/devicetree/bindings/spi/mediatek,spi-mtk-nor.yaml properties: · line 58
Quoted 9 lines · Tinghan Shen
Some mtk spi nor has dedicated dma(s) inside. Add a new clock name, axi, for spi nor dma bus clock.
clock-names:
Documentation/devicetree/bindings/spi/mediatek,spi-mtk-nor.yaml +2
-0+ minItems: 2 items: - const: spi - const: sf + - const: axi
Quoted 2 lines
This will cause any existing DTs that don't have both spi and sf clocks defined to fail to validate which doesn't seem great.
That was true before this. The default for 'minItems' is the number of entries in 'items' (this is not the default for json-schema, but default for DT bindings as that's the common case).
Quoted 4 lines
Given that your
commit message says this is only required for some SoCs shouldn't the minimum clocks requirement depend on which particular SoC/IP version is being used? Not exactly sure how one specifies that in the YAML format.
With an if/then schema adding maxItems/minItems constraints (e.g. 'maxItems: 2' for existing compatibles). There are many examples in the tree.
Rob
Re: [PATCH v6 2/4] dt-bindings: spi: add new clock name 'axi' for spi nor
In reply to Mark BrownHi Mark,
Thanks for the reviews and advice.
Quoted 22 lines · Mark Brown
Documentation/devicetree/bindings/spi/mediatek,spi-mtk-nor.yaml properties: · line 58
Quoted 9 lines · Tinghan Shen
Some mtk spi nor has dedicated dma(s) inside. Add a new clock name, axi,
for spi nor dma bus clock.
clock-names:Documentation/devicetree/bindings/spi/mediatek,spi-mtk-nor.yaml +2
-0+ minItems: 2 items: - const: spi - const: sf + - const: axiThis will cause any existing DTs that don't have both spi and sf clocks
defined to fail to validate which doesn't seem great. Given that your
commit message says this is only required for some SoCs shouldn't the minimum clocks requirement depend on which particular SoC/IP version is
being used? Not exactly sure how one specifies that in the YAML format.
Quoted 8 lines
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.
I'll update the subject at next version.
It'll be "dt-bindings: spi: mtk-spi-nor: ...".
regards,
TingHan
PATCH v6 3/4 dt-bindings: pinctrl: mt8195: add 'pins' wrapping node
In reply to Tinghan ShenThe mt8195 pinctrl driver requires a 'pins' subnode to wrap pin properties.
--- .../bindings/pinctrl/pinctrl-mt8195.yaml | 307 +++++++++--------- 1 file changed, 160 insertions(+), 147 deletions(-)
Documentation/devicetree/bindings/pinctrl/pinctrl-mt8195.yaml +160 -147
@@ -59,133 +59,143 @@ properties: 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_pin { + pinmux = <PINMUX_GPIO0__FUNC_GPIO0>; }; - }; - An example of using si unit resistance value(ohm): - &pio { - mediatek,rsel_resistance_in_si_unit; - } - pincontroller { + /* GPIO8 set as multifunction SDA0 */ i2c0_pin { 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 - - 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 { + 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: + 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_pin { + 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_pin { + 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 +211,33 @@ 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_bus { + pinmux = <PINMUX_GPIO0__FUNC_GPIO0>; + output-low; + }; + }; + };
Signature · 1 line
2.18.0
Rob Herring
maintainerRe: [PATCH v6 3/4] dt-bindings: pinctrl: mt8195: add 'pins' wrapping node
Quoted 1 line · Tinghan Shen
The mt8195 pinctrl driver requires a 'pins' subnode to wrap pin properties.
Why?
Quoted 76 lines
Signed-off-by Tinghan Shen <[email protected]>--- .../bindings/pinctrl/pinctrl-mt8195.yaml | 307 +++++++++--------- 1 file changed, 160 insertions(+), 147 deletions(-)Documentation/devicetree/bindings/pinctrl/pinctrl-mt8195.yaml +0
-63@@ -59,133 +59,143 @@ properties: 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 {
Documentation/devicetree/bindings/pinctrl/pinctrl-mt8195.yaml properties: · line 64
Quoted 10 lines
Documentation/devicetree/bindings/pinctrl/pinctrl-mt8195.yaml +3
-7- i2c0_pin { - pinmux = <PINMUX_GPIO8__FUNC_SDA0>; - bias-pull-down = <75000>; - }; - }; - - bias-pull-up: + additionalProperties: false + patternProperties: + 'pins':
Can we constrain this a bit more.
Quoted 102 lines
Documentation/devicetree/bindings/pinctrl/pinctrl-mt8195.yaml +45
-50+ 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_pin { + pinmux = <PINMUX_GPIO0__FUNC_GPIO0>; }; - }; - An example of using si unit resistance value(ohm): - &pio { - mediatek,rsel_resistance_in_si_unit; - } - pincontroller { + /* GPIO8 set as multifunction SDA0 */ i2c0_pin { 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 - - 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.
Documentation/devicetree/bindings/pinctrl/pinctrl-mt8195.yaml properties: · line 126
Quoted 10 lines
Documentation/devicetree/bindings/pinctrl/pinctrl-mt8195.yaml +10
-0+ - 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>;
Isn't this now out of date?
Quoted 121 lines
Documentation/devicetree/bindings/pinctrl/pinctrl-mt8195.yaml +87
-27+ }; + }; + 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: + 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_pin { + 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_pin { + 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 +211,33 @@ 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",
Documentation/devicetree/bindings/pinctrl/pinctrl-mt8195.yaml additionalProperties: false · line 238
Quoted 10 lines
Documentation/devicetree/bindings/pinctrl/pinctrl-mt8195.yaml +10
-0+ "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_bus {
Don't use '_' in node names.
Quoted 9 lines
Documentation/devicetree/bindings/pinctrl/pinctrl-mt8195.yaml +5
-0+ pinmux = <PINMUX_GPIO0__FUNC_GPIO0>; + output-low; + }; + }; + };Signature · 1 line
2.18.0
Re: [PATCH v6 3/4] dt-bindings: pinctrl: mt8195: add 'pins' wrapping node
Hi Rob,
Quoted 5 lines · Rob Herring
Quoted 2 lines · Tinghan Shen
The mt8195 pinctrl driver requires a 'pins' subnode to wrap pin properties.
Why?
It's because the dtbs_check reports following errors,
/proj/mtk15399/cros/src/third_party/kernel/v5.10/arch/arm64/boot/dts/me diatek/mt8195-evb.dt.yaml: pinctrl@10005000: i2c0-pins: 'pinmux' is a required property
From schema:
/proj/mtk15399/cros/src/third_party/kernel/v5.10/Documentation/devicetr ee/bindings/pinctrl/pinctrl-mt8195.yaml /proj/mtk15399/cros/src/third_party/kernel/v5.10/arch/arm64/boot/dts/me diatek/mt8195-evb.dt.yaml: pinctrl@10005000: i2c0-pins: 'pins_bus' does not match any of the regexes: 'pinctrl-[0-9]+'
From schema:
/proj/mtk15399/cros/src/third_party/kernel/v5.10/Documentation/devicetr ee/bindings/pinctrl/pinctrl-mt8195.yaml
So, I've to add 'pins' to fix this failure.
Quoted 104 lines
Quoted 104 lines
Signed-off-by Tinghan Shen <[email protected]>--- .../bindings/pinctrl/pinctrl-mt8195.yaml | 307 +++++++++----- ---- 1 file changed, 160 insertions(+), 147 deletions(-)(quoted diff) +0
-0
mt8195.yamlb/Documentation/devicetree/bindings/pinctrl/pinctrl-mt8195.yaml
index5e2bb2bf3a55..2035bf164740100644Documentation/devicetree/bindings/pinctrl/pinctrl-mt8195.yaml +0
-2@@ -59,133 +59,143 @@ properties: patternProperties: '-pins$': type: object - description: | - A pinctrl node should contain at least one subnodesrepresenting 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
andDocumentation/devicetree/bindings/pinctrl/pinctrl-mt8195.yaml +0
-18- 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 muxsetting.
- Supported pin number and mux varies for different SoCs,
and are defined
- as macros in dt-bindings/pinctrl/<soc>-pinfunc.h
directly.Documentation/devicetree/bindings/pinctrl/pinctrl-mt8195.yaml +0
-7- - 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
Documentation/devicetree/bindings/pinctrl/pinctrl-mt8195.yaml +0
-2- and resistance value. - For pull down type is PUPD/R0/R1 type, it can add R1R0define 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"Documentation/devicetree/bindings/pinctrl/pinctrl-mt8195.yaml +0
-2- 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.Documentation/devicetree/bindings/pinctrl/pinctrl-mt8195.yaml +0
-3- oneOf: - - enum: [100, 101, 102, 103] - - description: mt8195 pull down PUPD/R0/R1 type definevalue.
Documentation/devicetree/bindings/pinctrl/pinctrl-mt8195.yaml +0
-2- - enum: [200, 201, 202, 203, 204, 205, 206, 207] - - description: mt8195 pull down RSEL type definevalue.
Documentation/devicetree/bindings/pinctrl/pinctrl-mt8195.yaml +0
-2- - enum: [75000, 5000] - - description: mt8195 pull down RSEL type si unitvalue(ohm).
Documentation/devicetree/bindings/pinctrl/pinctrl-mt8195.yaml +0
-17- - 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>; - };
Quoted 8 lines
Documentation/devicetree/bindings/pinctrl/pinctrl-mt8195.yaml properties: · line 64
Quoted 6 lines
Documentation/devicetree/bindings/pinctrl/pinctrl-mt8195.yaml +3
-3- }; - - bias-pull-up: + additionalProperties: false + patternProperties: + 'pins':Can we constrain this a bit more.
After discussed with colleagues working on pinctrl, '^pins' is fine for them. is this acceptable?
Quoted 285 lines
Quoted 138 lines
Documentation/devicetree/bindings/pinctrl/pinctrl-mt8195.yaml +2
-1+ type: object + additionalProperties: false description: | - For pull up type is normal, it don't need add RSEL &R1R0 define
Documentation/devicetree/bindings/pinctrl/pinctrl-mt8195.yaml +0
-2- and resistance value. - For pull up type is PUPD/R0/R1 type, it can add R1R0define 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"Documentation/devicetree/bindings/pinctrl/pinctrl-mt8195.yaml +0
-2- 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.Documentation/devicetree/bindings/pinctrl/pinctrl-mt8195.yaml +0
-3- oneOf: - - enum: [100, 101, 102, 103] - - description: mt8195 pull up PUPD/R0/R1 type definevalue.
Documentation/devicetree/bindings/pinctrl/pinctrl-mt8195.yaml +0
-3- - 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).Documentation/devicetree/bindings/pinctrl/pinctrl-mt8195.yaml +1
-1- An example of using RSEL define: + A pinctrl node should contain at least one subnodesrepresenting 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 andDocumentation/devicetree/bindings/pinctrl/pinctrl-mt8195.yaml +12
-29+ 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_pin { + pinmux = <PINMUX_GPIO0__FUNC_GPIO0>; }; - }; - An example of using si unit resistance value(ohm): - &pio { - mediatek,rsel_resistance_in_si_unit; - } - pincontroller { + /* GPIO8 set as multifunction SDA0 */ i2c0_pin { 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 - - additionalProperties: false + $ref: "pinmux-node.yaml" + + properties: + pinmux: + description: | + Integer array, represents gpio pin number and muxsetting.
+ Supported pin number and mux varies for different
SoCs, and are
+ defined as macros in dt-bindings/pinctrl/<soc>-pinfunc.hDocumentation/devicetree/bindings/pinctrl/pinctrl-mt8195.yaml +8
-0+ 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
Documentation/devicetree/bindings/pinctrl/pinctrl-mt8195.yaml +2
-0+ and resistance value. + For pull down type is PUPD/R0/R1 type, it can addR1R0 define to
+ set different resistance. It can support
"MTK_PUPD_SET_R1R0_00" &Documentation/devicetree/bindings/pinctrl/pinctrl-mt8195.yaml +3
-0+ "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 propertyDocumentation/devicetree/bindings/pinctrl/pinctrl-mt8195.yaml +2
-0+ "mediatek,rsel_resistance_in_si_unit". + It can support "MTK_PULL_SET_RSEL_000" &"
MTK_PULL_SET_RSEL_001"Documentation/devicetree/bindings/pinctrl/pinctrl-mt8195.yaml +4
-0+ & "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 resistancevalue(ohm)
Documentation/devicetree/bindings/pinctrl/pinctrl-mt8195.yaml +4
-0+ "75000" & "5000" in mt8195. + oneOf: + - enum: [100, 101, 102, 103] + - description: mt8195 pull down PUPD/R0/R1 typedefine value.
Documentation/devicetree/bindings/pinctrl/pinctrl-mt8195.yaml +2
-0+ - enum: [200, 201, 202, 203, 204, 205, 206, 207] + - description: mt8195 pull down RSEL type definevalue.
Documentation/devicetree/bindings/pinctrl/pinctrl-mt8195.yaml +2
-0+ - enum: [75000, 5000] + - description: mt8195 pull down RSEL type si unitvalue(ohm).
Documentation/devicetree/bindings/pinctrl/pinctrl-mt8195.yaml properties: · line 126
Quoted 6 lines
Documentation/devicetree/bindings/pinctrl/pinctrl-mt8195.yaml +6
-0+ + An example of using RSEL define: + pincontroller { + i2c0_pin { + pinmux = <PINMUX_GPIO8__FUNC_SDA0>; + bias-pull-down = <MTK_PULL_SET_RSEL_001>;Isn't this now out of date?
Quoted 138 lines
Documentation/devicetree/bindings/pinctrl/pinctrl-mt8195.yaml +16
-0+ }; + }; + 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: + description: | + For pull up type is normal, it don't need add RSEL &R1R0 define
Documentation/devicetree/bindings/pinctrl/pinctrl-mt8195.yaml +2
-0+ and resistance value. + For pull up type is PUPD/R0/R1 type, it can add R1R0define to
+ set different resistance. It can support
"MTK_PUPD_SET_R1R0_00" &Documentation/devicetree/bindings/pinctrl/pinctrl-mt8195.yaml +3
-0+ "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 propertyDocumentation/devicetree/bindings/pinctrl/pinctrl-mt8195.yaml +2
-0+ "mediatek,rsel_resistance_in_si_unit". + It can support "MTK_PULL_SET_RSEL_000" &"
MTK_PULL_SET_RSEL_001"Documentation/devicetree/bindings/pinctrl/pinctrl-mt8195.yaml +4
-0+ & "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 resistancevalue(ohm)
+ "1000" & "1500" & "2000" & "3000" & "4000" & "5000"
& "10000" &Documentation/devicetree/bindings/pinctrl/pinctrl-mt8195.yaml +4
-0+ "75000" in mt8195. + oneOf: + - enum: [100, 101, 102, 103] + - description: mt8195 pull up PUPD/R0/R1 typedefine value.
Documentation/devicetree/bindings/pinctrl/pinctrl-mt8195.yaml +2
-0+ - enum: [200, 201, 202, 203, 204, 205, 206, 207] + - description: mt8195 pull up RSEL type definevalue.
+ - enum: [1000, 1500, 2000, 3000, 4000, 5000,
10000, 75000]
+ - description: mt8195 pull up RSEL type si unit
value(ohm).Documentation/devicetree/bindings/pinctrl/pinctrl-mt8195.yaml +53
-27+ An example of using RSEL define: + pincontroller { + i2c0_pin { + 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_pin { + 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 +211,33 @@ 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>;
Quoted 18 lines
Documentation/devicetree/bindings/pinctrl/pinctrl-mt8195.yaml additionalProperties: false · line 238
Quoted 6 lines
Documentation/devicetree/bindings/pinctrl/pinctrl-mt8195.yaml +6
-0+ interrupt-controller; + interrupts = <GIC_SPI 225 IRQ_TYPE_LEVEL_HIGH 0>; + #interrupt-cells = <2>; + + pio-pins { + pins_bus {Don't use '_' in node names.
Quoted 9 lines
Documentation/devicetree/bindings/pinctrl/pinctrl-mt8195.yaml +5
-0+ pinmux = <PINMUX_GPIO0__FUNC_GPIO0>; + output-low; + }; + }; + };Signature · 1 line
2.18.0
I'll update the examples and node names at next version. Thank you!
Best regards,
TingHan
PATCH v6 4/4 arm64: dts: Add mediatek SoC mt8195 and evaluation board
In reply to Tinghan ShenAdd 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
@@ -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