xref: /freebsd/sys/contrib/device-tree/Bindings/pinctrl/mediatek,mt7986-pinctrl.yaml (revision aa1a8ff2d6dbc51ef058f46f3db5a8bb77967145)
18cc087a1SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
28cc087a1SEmmanuel Vadot%YAML 1.2
38cc087a1SEmmanuel Vadot---
48cc087a1SEmmanuel Vadot$id: http://devicetree.org/schemas/pinctrl/mediatek,mt7986-pinctrl.yaml#
58cc087a1SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
68cc087a1SEmmanuel Vadot
7fac71e4eSEmmanuel Vadottitle: MediaTek MT7986 Pin Controller
88cc087a1SEmmanuel Vadot
98cc087a1SEmmanuel Vadotmaintainers:
108cc087a1SEmmanuel Vadot  - Sean Wang <sean.wang@kernel.org>
118cc087a1SEmmanuel Vadot
12fac71e4eSEmmanuel Vadotdescription:
138cc087a1SEmmanuel Vadot  The MediaTek's MT7986 Pin controller is used to control SoC pins.
148cc087a1SEmmanuel Vadot
158cc087a1SEmmanuel Vadotproperties:
168cc087a1SEmmanuel Vadot  compatible:
178cc087a1SEmmanuel Vadot    enum:
188cc087a1SEmmanuel Vadot      - mediatek,mt7986a-pinctrl
198cc087a1SEmmanuel Vadot      - mediatek,mt7986b-pinctrl
208cc087a1SEmmanuel Vadot
218cc087a1SEmmanuel Vadot  reg:
228cc087a1SEmmanuel Vadot    minItems: 8
238cc087a1SEmmanuel Vadot    maxItems: 8
248cc087a1SEmmanuel Vadot
258cc087a1SEmmanuel Vadot  reg-names:
268cc087a1SEmmanuel Vadot    items:
278cc087a1SEmmanuel Vadot      - const: gpio
288cc087a1SEmmanuel Vadot      - const: iocfg_rt
298cc087a1SEmmanuel Vadot      - const: iocfg_rb
308cc087a1SEmmanuel Vadot      - const: iocfg_lt
318cc087a1SEmmanuel Vadot      - const: iocfg_lb
328cc087a1SEmmanuel Vadot      - const: iocfg_tr
338cc087a1SEmmanuel Vadot      - const: iocfg_tl
348cc087a1SEmmanuel Vadot      - const: eint
358cc087a1SEmmanuel Vadot
368cc087a1SEmmanuel Vadot  gpio-controller: true
378cc087a1SEmmanuel Vadot
388cc087a1SEmmanuel Vadot  "#gpio-cells":
398cc087a1SEmmanuel Vadot    const: 2
40fac71e4eSEmmanuel Vadot    description:
41fac71e4eSEmmanuel Vadot      Number of cells in GPIO specifier. Since the generic GPIO binding is used,
42fac71e4eSEmmanuel Vadot      the amount of cells must be specified as 2. See the below mentioned gpio
43fac71e4eSEmmanuel Vadot      binding representation for description of particular cells.
448cc087a1SEmmanuel Vadot
458cc087a1SEmmanuel Vadot  gpio-ranges:
468cc087a1SEmmanuel Vadot    minItems: 1
478cc087a1SEmmanuel Vadot    maxItems: 5
48fac71e4eSEmmanuel Vadot    description:
498cc087a1SEmmanuel Vadot      GPIO valid number range.
508cc087a1SEmmanuel Vadot
518cc087a1SEmmanuel Vadot  interrupt-controller: true
528cc087a1SEmmanuel Vadot
538cc087a1SEmmanuel Vadot  interrupts:
548cc087a1SEmmanuel Vadot    maxItems: 1
558cc087a1SEmmanuel Vadot
568cc087a1SEmmanuel Vadot  "#interrupt-cells":
578cc087a1SEmmanuel Vadot    const: 2
588cc087a1SEmmanuel Vadot
59e67e8565SEmmanuel VadotallOf:
60fac71e4eSEmmanuel Vadot  - $ref: pinctrl.yaml#
61e67e8565SEmmanuel Vadot
628cc087a1SEmmanuel Vadotrequired:
638cc087a1SEmmanuel Vadot  - compatible
648cc087a1SEmmanuel Vadot  - reg
658cc087a1SEmmanuel Vadot  - reg-names
668cc087a1SEmmanuel Vadot  - gpio-controller
678cc087a1SEmmanuel Vadot  - "#gpio-cells"
688cc087a1SEmmanuel Vadot
698cc087a1SEmmanuel VadotpatternProperties:
708cc087a1SEmmanuel Vadot  '-pins$':
718cc087a1SEmmanuel Vadot    type: object
728cc087a1SEmmanuel Vadot    additionalProperties: false
738cc087a1SEmmanuel Vadot
748cc087a1SEmmanuel Vadot    patternProperties:
75fac71e4eSEmmanuel Vadot      '^.*mux.*$':
768cc087a1SEmmanuel Vadot        type: object
778cc087a1SEmmanuel Vadot        additionalProperties: false
788cc087a1SEmmanuel Vadot        description: |
798cc087a1SEmmanuel Vadot          pinmux configuration nodes.
808cc087a1SEmmanuel Vadot
818cc087a1SEmmanuel Vadot          The following table shows the effective values of "group", "function"
828cc087a1SEmmanuel Vadot          properties and chip pinout pins
838cc087a1SEmmanuel Vadot
848cc087a1SEmmanuel Vadot          groups            function    pins (in pin#)
858cc087a1SEmmanuel Vadot          ---------------------------------------------------------------------
868cc087a1SEmmanuel Vadot          "watchdog"        "watchdog"  0
878cc087a1SEmmanuel Vadot          "wifi_led"        "led"       1, 2
888cc087a1SEmmanuel Vadot          "i2c"             "i2c"       3, 4
898cc087a1SEmmanuel Vadot          "uart1_0"         "uart"      7, 8, 9, 10
908bab661aSEmmanuel Vadot          "uart1_rx_tx"     "uart"      42, 43
918bab661aSEmmanuel Vadot          "uart1_cts_rts"   "uart"      44, 45
928cc087a1SEmmanuel Vadot          "pcie_clk"        "pcie"      9
938cc087a1SEmmanuel Vadot          "pcie_wake"       "pcie"      10
948cc087a1SEmmanuel Vadot          "spi1_0"          "spi"       11, 12, 13, 14
958cc087a1SEmmanuel Vadot          "pwm1_1"          "pwm"       20,
968cc087a1SEmmanuel Vadot          "pwm0"            "pwm"       21,
978cc087a1SEmmanuel Vadot          "pwm1_0"          "pwm"       22,
988cc087a1SEmmanuel Vadot          "snfi"            "flash"     23, 24, 25, 26, 27, 28
998cc087a1SEmmanuel Vadot          "spi1_2"          "spi"       29, 30, 31, 32
100fac71e4eSEmmanuel Vadot          "emmc_45"         "emmc"      22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
101fac71e4eSEmmanuel Vadot                                        32
102fac71e4eSEmmanuel Vadot
1038cc087a1SEmmanuel Vadot          "spi1_1"          "spi"       23, 24, 25, 26
1048bab661aSEmmanuel Vadot          "uart1_2_rx_tx"   "uart"      29, 30
1058bab661aSEmmanuel Vadot          "uart1_2_cts_rts" "uart"      31, 32
1068cc087a1SEmmanuel Vadot          "uart1_1"         "uart"      23, 24, 25, 26
1078bab661aSEmmanuel Vadot          "uart2_0_rx_tx"   "uart"      29, 30
1088bab661aSEmmanuel Vadot          "uart2_0_cts_rts" "uart"      31, 32
1098cc087a1SEmmanuel Vadot          "spi0"            "spi"       33, 34, 35, 36
1108cc087a1SEmmanuel Vadot          "spi0_wp_hold"    "spi"       37, 38
1118cc087a1SEmmanuel Vadot          "uart1_3_rx_tx"   "uart"      35, 36
1128cc087a1SEmmanuel Vadot          "uart1_3_cts_rts" "uart"      37, 38
1138cc087a1SEmmanuel Vadot          "uart2_1"         "uart"      33, 34, 35, 36
1148cc087a1SEmmanuel Vadot          "spi1_3"          "spi"       33, 34, 35, 36
1158cc087a1SEmmanuel Vadot          "uart0"           "uart"      39, 40
1168cc087a1SEmmanuel Vadot          "pcie_pereset"    "pcie"      41
1178cc087a1SEmmanuel Vadot          "uart1"           "uart"      42, 43, 44, 45
1188cc087a1SEmmanuel Vadot          "uart2"           "uart"      46, 47, 48, 49
119fac71e4eSEmmanuel Vadot          "emmc_51"         "emmc"      50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
120fac71e4eSEmmanuel Vadot                                        60, 61
121fac71e4eSEmmanuel Vadot
1228cc087a1SEmmanuel Vadot          "pcm"             "audio"     62, 63, 64, 65
1238cc087a1SEmmanuel Vadot          "i2s"             "audio"     62, 63, 64, 65
1248cc087a1SEmmanuel Vadot          "switch_int"      "eth"       66
1258cc087a1SEmmanuel Vadot          "mdc_mdio"        "eth"       67
1267ef62cebSEmmanuel Vadot          "wf_2g"           "wifi"      74, 75, 76, 77, 78, 79, 80, 81, 82, 83
1277ef62cebSEmmanuel Vadot          "wf_5g"           "wifi"      91, 92, 93, 94, 95, 96, 97, 98, 99, 100
1287ef62cebSEmmanuel Vadot          "wf_dbdc"         "wifi"      74, 75, 76, 77, 78, 79, 80, 81, 82, 83,
1297ef62cebSEmmanuel Vadot                                        84, 85
1308cc087a1SEmmanuel Vadot
131fac71e4eSEmmanuel Vadot        $ref: /schemas/pinctrl/pinmux-node.yaml
1328cc087a1SEmmanuel Vadot        properties:
1338cc087a1SEmmanuel Vadot          function:
134fac71e4eSEmmanuel Vadot            description:
1358cc087a1SEmmanuel Vadot              A string containing the name of the function to mux to the group.
1368cc087a1SEmmanuel Vadot              There is no "audio", "pcie" functions on mt7986b, you can only use
1378cc087a1SEmmanuel Vadot              those functions on mt7986a.
1388cc087a1SEmmanuel Vadot            enum: [audio, emmc, eth, i2c, led, flash, pcie, pwm, spi, uart,
1398cc087a1SEmmanuel Vadot                   watchdog, wifi]
1408cc087a1SEmmanuel Vadot          groups:
141fac71e4eSEmmanuel Vadot            description:
1428cc087a1SEmmanuel Vadot              An array of strings. Each string contains the name of a group.
143fac71e4eSEmmanuel Vadot              There is no "pcie_pereset", "uart1", "uart2" "emmc_51", "pcm", and
144fac71e4eSEmmanuel Vadot              "i2s" groups on mt7986b, you can only use those groups on mt7986a.
1458cc087a1SEmmanuel Vadot        required:
1468cc087a1SEmmanuel Vadot          - function
1478cc087a1SEmmanuel Vadot          - groups
1488cc087a1SEmmanuel Vadot
1498cc087a1SEmmanuel Vadot        allOf:
1508cc087a1SEmmanuel Vadot          - if:
1518cc087a1SEmmanuel Vadot              properties:
1528cc087a1SEmmanuel Vadot                function:
1538cc087a1SEmmanuel Vadot                  const: audio
1548cc087a1SEmmanuel Vadot            then:
1558cc087a1SEmmanuel Vadot              properties:
1568cc087a1SEmmanuel Vadot                groups:
1578cc087a1SEmmanuel Vadot                  enum: [pcm, i2s]
1588cc087a1SEmmanuel Vadot          - if:
1598cc087a1SEmmanuel Vadot              properties:
1608cc087a1SEmmanuel Vadot                function:
1618cc087a1SEmmanuel Vadot                  const: emmc
1628cc087a1SEmmanuel Vadot            then:
1638cc087a1SEmmanuel Vadot              properties:
1648cc087a1SEmmanuel Vadot                groups:
1658bab661aSEmmanuel Vadot                  enum: [emmc_45, emmc_51]
1668cc087a1SEmmanuel Vadot          - if:
1678cc087a1SEmmanuel Vadot              properties:
1688cc087a1SEmmanuel Vadot                function:
1698cc087a1SEmmanuel Vadot                  const: eth
1708cc087a1SEmmanuel Vadot            then:
1718cc087a1SEmmanuel Vadot              properties:
1728cc087a1SEmmanuel Vadot                groups:
1738cc087a1SEmmanuel Vadot                  enum: [switch_int, mdc_mdio]
1748cc087a1SEmmanuel Vadot          - if:
1758cc087a1SEmmanuel Vadot              properties:
1768cc087a1SEmmanuel Vadot                function:
1778cc087a1SEmmanuel Vadot                  const: i2c
1788cc087a1SEmmanuel Vadot            then:
1798cc087a1SEmmanuel Vadot              properties:
1808cc087a1SEmmanuel Vadot                groups:
1818cc087a1SEmmanuel Vadot                  enum: [i2c]
1828cc087a1SEmmanuel Vadot          - if:
1838cc087a1SEmmanuel Vadot              properties:
1848cc087a1SEmmanuel Vadot                function:
1858cc087a1SEmmanuel Vadot                  const: led
1868cc087a1SEmmanuel Vadot            then:
1878cc087a1SEmmanuel Vadot              properties:
1888cc087a1SEmmanuel Vadot                groups:
1898cc087a1SEmmanuel Vadot                  enum: [wifi_led]
1908cc087a1SEmmanuel Vadot          - if:
1918cc087a1SEmmanuel Vadot              properties:
1928cc087a1SEmmanuel Vadot                function:
1938cc087a1SEmmanuel Vadot                  const: flash
1948cc087a1SEmmanuel Vadot            then:
1958cc087a1SEmmanuel Vadot              properties:
1968cc087a1SEmmanuel Vadot                groups:
1978cc087a1SEmmanuel Vadot                  enum: [snfi]
1988cc087a1SEmmanuel Vadot          - if:
1998cc087a1SEmmanuel Vadot              properties:
2008cc087a1SEmmanuel Vadot                function:
2018cc087a1SEmmanuel Vadot                  const: pcie
2028cc087a1SEmmanuel Vadot            then:
2038cc087a1SEmmanuel Vadot              properties:
2048cc087a1SEmmanuel Vadot                groups:
2058bab661aSEmmanuel Vadot                  items:
2068cc087a1SEmmanuel Vadot                    enum: [pcie_clk, pcie_wake, pcie_pereset]
2078bab661aSEmmanuel Vadot                  maxItems: 3
2088cc087a1SEmmanuel Vadot          - if:
2098cc087a1SEmmanuel Vadot              properties:
2108cc087a1SEmmanuel Vadot                function:
2118cc087a1SEmmanuel Vadot                  const: pwm
2128cc087a1SEmmanuel Vadot            then:
2138cc087a1SEmmanuel Vadot              properties:
2148cc087a1SEmmanuel Vadot                groups:
2158bab661aSEmmanuel Vadot                  items:
2168cc087a1SEmmanuel Vadot                    enum: [pwm0, pwm1_0, pwm1_1]
2178bab661aSEmmanuel Vadot                  maxItems: 2
2188cc087a1SEmmanuel Vadot          - if:
2198cc087a1SEmmanuel Vadot              properties:
2208cc087a1SEmmanuel Vadot                function:
2218cc087a1SEmmanuel Vadot                  const: spi
2228cc087a1SEmmanuel Vadot            then:
2238cc087a1SEmmanuel Vadot              properties:
2248cc087a1SEmmanuel Vadot                groups:
2258bab661aSEmmanuel Vadot                  items:
2268cc087a1SEmmanuel Vadot                    enum: [spi0, spi0_wp_hold, spi1_0, spi1_1, spi1_2, spi1_3]
2278bab661aSEmmanuel Vadot                  maxItems: 2
2288cc087a1SEmmanuel Vadot          - if:
2298cc087a1SEmmanuel Vadot              properties:
2308cc087a1SEmmanuel Vadot                function:
2318cc087a1SEmmanuel Vadot                  const: uart
2328cc087a1SEmmanuel Vadot            then:
2338cc087a1SEmmanuel Vadot              properties:
2348cc087a1SEmmanuel Vadot                groups:
2358bab661aSEmmanuel Vadot                  items:
2368bab661aSEmmanuel Vadot                    enum: [uart1_0, uart1_rx_tx, uart1_cts_rts, uart1_1,
2378bab661aSEmmanuel Vadot                           uart1_2_rx_tx, uart1_2_cts_rts, uart1_3_rx_tx,
2388bab661aSEmmanuel Vadot                           uart1_3_cts_rts, uart2_0_rx_tx, uart2_0_cts_rts,
2398bab661aSEmmanuel Vadot                           uart2_1, uart0, uart1, uart2]
2408bab661aSEmmanuel Vadot                  maxItems: 2
2418cc087a1SEmmanuel Vadot          - if:
2428cc087a1SEmmanuel Vadot              properties:
2438cc087a1SEmmanuel Vadot                function:
2448cc087a1SEmmanuel Vadot                  const: watchdog
2458cc087a1SEmmanuel Vadot            then:
2468cc087a1SEmmanuel Vadot              properties:
2478cc087a1SEmmanuel Vadot                groups:
2488cc087a1SEmmanuel Vadot                  enum: [watchdog]
2498cc087a1SEmmanuel Vadot          - if:
2508cc087a1SEmmanuel Vadot              properties:
2518cc087a1SEmmanuel Vadot                function:
2528cc087a1SEmmanuel Vadot                  const: wifi
2538cc087a1SEmmanuel Vadot            then:
2548cc087a1SEmmanuel Vadot              properties:
2558cc087a1SEmmanuel Vadot                groups:
2567ef62cebSEmmanuel Vadot                  items:
2578cc087a1SEmmanuel Vadot                    enum: [wf_2g, wf_5g, wf_dbdc]
2587ef62cebSEmmanuel Vadot                  maxItems: 3
259fac71e4eSEmmanuel Vadot      '^.*conf.*$':
2608cc087a1SEmmanuel Vadot        type: object
2618cc087a1SEmmanuel Vadot        additionalProperties: false
262fac71e4eSEmmanuel Vadot        description:
2638cc087a1SEmmanuel Vadot          pinconf configuration nodes.
264fac71e4eSEmmanuel Vadot        $ref: /schemas/pinctrl/pincfg-node.yaml
2658cc087a1SEmmanuel Vadot
2668cc087a1SEmmanuel Vadot        properties:
2678cc087a1SEmmanuel Vadot          pins:
268fac71e4eSEmmanuel Vadot            description:
269fac71e4eSEmmanuel Vadot              An array of strings. Each string contains the name of a pin. There
270fac71e4eSEmmanuel Vadot              is no PIN 41 to PIN 65 above on mt7686b, you can only use those
271fac71e4eSEmmanuel Vadot              pins on mt7986a.
2727ef62cebSEmmanuel Vadot            items:
2738cc087a1SEmmanuel Vadot              enum: [SYS_WATCHDOG, WF2G_LED, WF5G_LED, I2C_SCL, I2C_SDA, GPIO_0,
2748cc087a1SEmmanuel Vadot                     GPIO_1, GPIO_2, GPIO_3, GPIO_4, GPIO_5, GPIO_6, GPIO_7,
275fac71e4eSEmmanuel Vadot                     GPIO_8, GPIO_9, GPIO_10, GPIO_11, GPIO_12, GPIO_13,
276fac71e4eSEmmanuel Vadot                     GPIO_14, GPIO_15, PWM0, PWM1, SPI0_CLK, SPI0_MOSI,
277fac71e4eSEmmanuel Vadot                     SPI0_MISO, SPI0_CS, SPI0_HOLD, SPI0_WP, SPI1_CLK,
278fac71e4eSEmmanuel Vadot                     SPI1_MOSI, SPI1_MISO, SPI1_CS, SPI2_CLK, SPI2_MOSI,
279fac71e4eSEmmanuel Vadot                     SPI2_MISO, SPI2_CS, SPI2_HOLD, SPI2_WP, UART0_RXD,
280fac71e4eSEmmanuel Vadot                     UART0_TXD, PCIE_PERESET_N, UART1_RXD, UART1_TXD, UART1_CTS,
281fac71e4eSEmmanuel Vadot                     UART1_RTS, UART2_RXD, UART2_TXD, UART2_CTS, UART2_RTS,
282fac71e4eSEmmanuel Vadot                     EMMC_DATA_0, EMMC_DATA_1, EMMC_DATA_2, EMMC_DATA_3,
283fac71e4eSEmmanuel Vadot                     EMMC_DATA_4, EMMC_DATA_5, EMMC_DATA_6, EMMC_DATA_7,
284fac71e4eSEmmanuel Vadot                     EMMC_CMD, EMMC_CK, EMMC_DSL, EMMC_RSTB, PCM_DTX, PCM_DRX,
285fac71e4eSEmmanuel Vadot                     PCM_CLK, PCM_FS, MT7531_INT, SMI_MDC, SMI_MDIO,
2868cc087a1SEmmanuel Vadot                     WF0_DIG_RESETB, WF0_CBA_RESETB, WF0_XO_REQ, WF0_TOP_CLK,
2878cc087a1SEmmanuel Vadot                     WF0_TOP_DATA, WF0_HB1, WF0_HB2, WF0_HB3, WF0_HB4, WF0_HB0,
2888cc087a1SEmmanuel Vadot                     WF0_HB0_B, WF0_HB5, WF0_HB6, WF0_HB7, WF0_HB8, WF0_HB9,
2898cc087a1SEmmanuel Vadot                     WF0_HB10, WF1_DIG_RESETB, WF1_CBA_RESETB, WF1_XO_REQ,
2908cc087a1SEmmanuel Vadot                     WF1_TOP_CLK, WF1_TOP_DATA, WF1_HB1, WF1_HB2, WF1_HB3,
2918cc087a1SEmmanuel Vadot                     WF1_HB4, WF1_HB0, WF1_HB0_B, WF1_HB5, WF1_HB6, WF1_HB7,
2928cc087a1SEmmanuel Vadot                     WF1_HB8]
2937ef62cebSEmmanuel Vadot            maxItems: 101
2948cc087a1SEmmanuel Vadot
2958cc087a1SEmmanuel Vadot          bias-disable: true
2968cc087a1SEmmanuel Vadot
2978bab661aSEmmanuel Vadot          bias-pull-up:
2988bab661aSEmmanuel Vadot            oneOf:
2998bab661aSEmmanuel Vadot              - type: boolean
3008bab661aSEmmanuel Vadot                description: normal pull up.
3018bab661aSEmmanuel Vadot              - enum: [100, 101, 102, 103]
302fac71e4eSEmmanuel Vadot                description:
3038bab661aSEmmanuel Vadot                  PUPD/R1/R0 pull down type. See MTK_PUPD_SET_R1R0 defines in
3048bab661aSEmmanuel Vadot                  dt-bindings/pinctrl/mt65xx.h.
3058cc087a1SEmmanuel Vadot
3068bab661aSEmmanuel Vadot          bias-pull-down:
3078bab661aSEmmanuel Vadot            oneOf:
3088bab661aSEmmanuel Vadot              - type: boolean
3098bab661aSEmmanuel Vadot                description: normal pull down.
3108bab661aSEmmanuel Vadot              - enum: [100, 101, 102, 103]
311fac71e4eSEmmanuel Vadot                description:
3128bab661aSEmmanuel Vadot                  PUPD/R1/R0 pull down type. See MTK_PUPD_SET_R1R0 defines in
3138bab661aSEmmanuel Vadot                  dt-bindings/pinctrl/mt65xx.h.
3148cc087a1SEmmanuel Vadot
3158cc087a1SEmmanuel Vadot          input-enable: true
3168cc087a1SEmmanuel Vadot
3178cc087a1SEmmanuel Vadot          input-disable: true
3188cc087a1SEmmanuel Vadot
3198cc087a1SEmmanuel Vadot          output-enable: true
3208cc087a1SEmmanuel Vadot
3218cc087a1SEmmanuel Vadot          output-low: true
3228cc087a1SEmmanuel Vadot
3238cc087a1SEmmanuel Vadot          output-high: true
3248cc087a1SEmmanuel Vadot
3258cc087a1SEmmanuel Vadot          input-schmitt-enable: true
3268cc087a1SEmmanuel Vadot
3278cc087a1SEmmanuel Vadot          input-schmitt-disable: true
3288cc087a1SEmmanuel Vadot
3298cc087a1SEmmanuel Vadot          drive-strength:
3308cc087a1SEmmanuel Vadot            enum: [2, 4, 6, 8, 10, 12, 14, 16]
3318cc087a1SEmmanuel Vadot
3328cc087a1SEmmanuel Vadot          mediatek,pull-up-adv:
3338cc087a1SEmmanuel Vadot            description: |
3348cc087a1SEmmanuel Vadot              Valid arguments for 'mediatek,pull-up-adv' are '0', '1', '2', '3'
335*aa1a8ff2SEmmanuel Vadot              Pull up settings for 2 pull resistors, R0 and R1. Valid arguments
3368cc087a1SEmmanuel Vadot              are described as below:
3378cc087a1SEmmanuel Vadot              0: (R1, R0) = (0, 0) which means R1 disabled and R0 disabled.
3388cc087a1SEmmanuel Vadot              1: (R1, R0) = (0, 1) which means R1 disabled and R0 enabled.
3398cc087a1SEmmanuel Vadot              2: (R1, R0) = (1, 0) which means R1 enabled and R0 disabled.
3408cc087a1SEmmanuel Vadot              3: (R1, R0) = (1, 1) which means R1 enabled and R0 enabled.
3418cc087a1SEmmanuel Vadot            $ref: /schemas/types.yaml#/definitions/uint32
3428cc087a1SEmmanuel Vadot            enum: [0, 1, 2, 3]
3438cc087a1SEmmanuel Vadot
3448cc087a1SEmmanuel Vadot          mediatek,pull-down-adv:
3458cc087a1SEmmanuel Vadot            description: |
3468cc087a1SEmmanuel Vadot              Valid arguments for 'mediatek,pull-up-adv' are '0', '1', '2', '3'
347*aa1a8ff2SEmmanuel Vadot              Pull down settings for 2 pull resistors, R0 and R1. Valid arguments
3488cc087a1SEmmanuel Vadot              are described as below:
3498cc087a1SEmmanuel Vadot              0: (R1, R0) = (0, 0) which means R1 disabled and R0 disabled.
3508cc087a1SEmmanuel Vadot              1: (R1, R0) = (0, 1) which means R1 disabled and R0 enabled.
3518cc087a1SEmmanuel Vadot              2: (R1, R0) = (1, 0) which means R1 enabled and R0 disabled.
3528cc087a1SEmmanuel Vadot              3: (R1, R0) = (1, 1) which means R1 enabled and R0 enabled.
3538cc087a1SEmmanuel Vadot            $ref: /schemas/types.yaml#/definitions/uint32
3548cc087a1SEmmanuel Vadot            enum: [0, 1, 2, 3]
3558cc087a1SEmmanuel Vadot
3568cc087a1SEmmanuel Vadot        required:
3578cc087a1SEmmanuel Vadot          - pins
3588cc087a1SEmmanuel Vadot
3598cc087a1SEmmanuel VadotadditionalProperties: false
3608cc087a1SEmmanuel Vadot
3618cc087a1SEmmanuel Vadotexamples:
3628cc087a1SEmmanuel Vadot  - |
3638cc087a1SEmmanuel Vadot    #include <dt-bindings/interrupt-controller/irq.h>
3648cc087a1SEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
3658bab661aSEmmanuel Vadot    #include <dt-bindings/pinctrl/mt65xx.h>
3668cc087a1SEmmanuel Vadot
3678cc087a1SEmmanuel Vadot    soc {
3688cc087a1SEmmanuel Vadot      #address-cells = <2>;
3698cc087a1SEmmanuel Vadot      #size-cells = <2>;
3708cc087a1SEmmanuel Vadot      pio: pinctrl@1001f000 {
3718cc087a1SEmmanuel Vadot        compatible = "mediatek,mt7986a-pinctrl";
3728cc087a1SEmmanuel Vadot        reg = <0 0x1001f000 0 0x1000>,
3738cc087a1SEmmanuel Vadot              <0 0x11c30000 0 0x1000>,
3748cc087a1SEmmanuel Vadot              <0 0x11c40000 0 0x1000>,
3758cc087a1SEmmanuel Vadot              <0 0x11e20000 0 0x1000>,
3768cc087a1SEmmanuel Vadot              <0 0x11e30000 0 0x1000>,
3778cc087a1SEmmanuel Vadot              <0 0x11f00000 0 0x1000>,
3788cc087a1SEmmanuel Vadot              <0 0x11f10000 0 0x1000>,
3798cc087a1SEmmanuel Vadot              <0 0x1000b000 0 0x1000>;
3808cc087a1SEmmanuel Vadot        reg-names = "gpio", "iocfg_rt", "iocfg_rb", "iocfg_lt",
3818cc087a1SEmmanuel Vadot                    "iocfg_lb", "iocfg_tr", "iocfg_tl", "eint";
3828cc087a1SEmmanuel Vadot        gpio-controller;
3838cc087a1SEmmanuel Vadot        #gpio-cells = <2>;
3848cc087a1SEmmanuel Vadot        gpio-ranges = <&pio 0 0 100>;
3858cc087a1SEmmanuel Vadot        interrupt-controller;
3868cc087a1SEmmanuel Vadot        interrupts = <GIC_SPI 225 IRQ_TYPE_LEVEL_HIGH>;
3878cc087a1SEmmanuel Vadot        interrupt-parent = <&gic>;
3888cc087a1SEmmanuel Vadot        #interrupt-cells = <2>;
3898cc087a1SEmmanuel Vadot
3908bab661aSEmmanuel Vadot        pcie_pins: pcie-pins {
3918bab661aSEmmanuel Vadot          mux {
3928bab661aSEmmanuel Vadot            function = "pcie";
3938bab661aSEmmanuel Vadot            groups = "pcie_clk", "pcie_wake", "pcie_pereset";
3948bab661aSEmmanuel Vadot          };
3958bab661aSEmmanuel Vadot        };
3968bab661aSEmmanuel Vadot
3978bab661aSEmmanuel Vadot        pwm_pins: pwm-pins {
3988bab661aSEmmanuel Vadot          mux {
3998bab661aSEmmanuel Vadot            function = "pwm";
4008bab661aSEmmanuel Vadot            groups = "pwm0", "pwm1_0";
4018bab661aSEmmanuel Vadot          };
4028bab661aSEmmanuel Vadot        };
4038bab661aSEmmanuel Vadot
4048bab661aSEmmanuel Vadot        spi0_pins: spi0-pins {
4058bab661aSEmmanuel Vadot          mux {
4068bab661aSEmmanuel Vadot            function = "spi";
4078bab661aSEmmanuel Vadot            groups = "spi0", "spi0_wp_hold";
4088bab661aSEmmanuel Vadot          };
4098bab661aSEmmanuel Vadot        };
4108bab661aSEmmanuel Vadot
4118cc087a1SEmmanuel Vadot        uart1_pins: uart1-pins {
4128cc087a1SEmmanuel Vadot          mux {
4138cc087a1SEmmanuel Vadot            function = "uart";
4148cc087a1SEmmanuel Vadot            groups = "uart1";
4158cc087a1SEmmanuel Vadot          };
4168cc087a1SEmmanuel Vadot        };
4178cc087a1SEmmanuel Vadot
4188bab661aSEmmanuel Vadot        uart1_3_pins: uart1-3-pins {
4198bab661aSEmmanuel Vadot          mux {
4208bab661aSEmmanuel Vadot            function = "uart";
4218bab661aSEmmanuel Vadot            groups = "uart1_3_rx_tx", "uart1_3_cts_rts";
4228bab661aSEmmanuel Vadot          };
4238bab661aSEmmanuel Vadot        };
4248bab661aSEmmanuel Vadot
4258cc087a1SEmmanuel Vadot        uart2_pins: uart2-pins {
4268cc087a1SEmmanuel Vadot          mux {
4278cc087a1SEmmanuel Vadot            function = "uart";
4288cc087a1SEmmanuel Vadot            groups = "uart2";
4298cc087a1SEmmanuel Vadot          };
4308cc087a1SEmmanuel Vadot        };
4318cc087a1SEmmanuel Vadot
4328bab661aSEmmanuel Vadot        mmc0_pins_default: mmc0-pins {
4338bab661aSEmmanuel Vadot          mux {
4348bab661aSEmmanuel Vadot            function = "emmc";
4358bab661aSEmmanuel Vadot            groups = "emmc_51";
4368bab661aSEmmanuel Vadot          };
4378bab661aSEmmanuel Vadot          conf-cmd-dat {
4388bab661aSEmmanuel Vadot            pins = "EMMC_DATA_0", "EMMC_DATA_1", "EMMC_DATA_2",
4398bab661aSEmmanuel Vadot                   "EMMC_DATA_3", "EMMC_DATA_4", "EMMC_DATA_5",
4408bab661aSEmmanuel Vadot                   "EMMC_DATA_6", "EMMC_DATA_7", "EMMC_CMD";
4418bab661aSEmmanuel Vadot            input-enable;
4428bab661aSEmmanuel Vadot            drive-strength = <4>;
4438bab661aSEmmanuel Vadot            bias-pull-up = <MTK_PUPD_SET_R1R0_01>; /* pull-up 10K */
4448bab661aSEmmanuel Vadot          };
4458bab661aSEmmanuel Vadot          conf-clk {
4468bab661aSEmmanuel Vadot            pins = "EMMC_CK";
4478bab661aSEmmanuel Vadot            drive-strength = <6>;
4488bab661aSEmmanuel Vadot            bias-pull-down = <MTK_PUPD_SET_R1R0_10>; /* pull-down 50K */
4498bab661aSEmmanuel Vadot          };
4508bab661aSEmmanuel Vadot          conf-ds {
4518bab661aSEmmanuel Vadot            pins = "EMMC_DSL";
4528bab661aSEmmanuel Vadot            bias-pull-down = <MTK_PUPD_SET_R1R0_10>; /* pull-down 50K */
4538bab661aSEmmanuel Vadot          };
4548bab661aSEmmanuel Vadot          conf-rst {
4558bab661aSEmmanuel Vadot            pins = "EMMC_RSTB";
4568bab661aSEmmanuel Vadot            drive-strength = <4>;
4578bab661aSEmmanuel Vadot            bias-pull-up = <MTK_PUPD_SET_R1R0_01>; /* pull-up 10K */
4588bab661aSEmmanuel Vadot          };
4598bab661aSEmmanuel Vadot        };
4608bab661aSEmmanuel Vadot
4618cc087a1SEmmanuel Vadot      };
4628cc087a1SEmmanuel Vadot    };
463