xref: /freebsd/sys/contrib/device-tree/Bindings/pinctrl/mediatek,mt7981-pinctrl.yaml (revision aa1a8ff2d6dbc51ef058f46f3db5a8bb77967145)
1cb7aa33aSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2cb7aa33aSEmmanuel Vadot%YAML 1.2
3cb7aa33aSEmmanuel Vadot---
4cb7aa33aSEmmanuel Vadot$id: http://devicetree.org/schemas/pinctrl/mediatek,mt7981-pinctrl.yaml#
5cb7aa33aSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6cb7aa33aSEmmanuel Vadot
7fac71e4eSEmmanuel Vadottitle: MediaTek MT7981 Pin Controller
8cb7aa33aSEmmanuel Vadot
9cb7aa33aSEmmanuel Vadotmaintainers:
10cb7aa33aSEmmanuel Vadot  - Daniel Golle <daniel@makrotopia.org>
11cb7aa33aSEmmanuel Vadot
12cb7aa33aSEmmanuel Vadotdescription:
13cb7aa33aSEmmanuel Vadot  The MediaTek's MT7981 Pin controller is used to control SoC pins.
14cb7aa33aSEmmanuel Vadot
15cb7aa33aSEmmanuel Vadotproperties:
16cb7aa33aSEmmanuel Vadot  compatible:
17cb7aa33aSEmmanuel Vadot    enum:
18cb7aa33aSEmmanuel Vadot      - mediatek,mt7981-pinctrl
19cb7aa33aSEmmanuel Vadot
20cb7aa33aSEmmanuel Vadot  reg:
21cb7aa33aSEmmanuel Vadot    minItems: 9
22cb7aa33aSEmmanuel Vadot    maxItems: 9
23cb7aa33aSEmmanuel Vadot
24cb7aa33aSEmmanuel Vadot  reg-names:
25cb7aa33aSEmmanuel Vadot    items:
26cb7aa33aSEmmanuel Vadot      - const: gpio
27cb7aa33aSEmmanuel Vadot      - const: iocfg_rt
28cb7aa33aSEmmanuel Vadot      - const: iocfg_rm
29cb7aa33aSEmmanuel Vadot      - const: iocfg_rb
30cb7aa33aSEmmanuel Vadot      - const: iocfg_lb
31cb7aa33aSEmmanuel Vadot      - const: iocfg_bl
32cb7aa33aSEmmanuel Vadot      - const: iocfg_tm
33cb7aa33aSEmmanuel Vadot      - const: iocfg_tl
34cb7aa33aSEmmanuel Vadot      - const: eint
35cb7aa33aSEmmanuel Vadot
36cb7aa33aSEmmanuel Vadot  gpio-controller: true
37cb7aa33aSEmmanuel Vadot
38cb7aa33aSEmmanuel Vadot  "#gpio-cells":
39cb7aa33aSEmmanuel Vadot    const: 2
40fac71e4eSEmmanuel Vadot    description:
41cb7aa33aSEmmanuel Vadot      Number of cells in GPIO specifier. Since the generic GPIO binding is used,
42cb7aa33aSEmmanuel Vadot      the amount of cells must be specified as 2. See the below mentioned gpio
43cb7aa33aSEmmanuel Vadot      binding representation for description of particular cells.
44cb7aa33aSEmmanuel Vadot
45cb7aa33aSEmmanuel Vadot  gpio-ranges:
46cb7aa33aSEmmanuel Vadot    minItems: 1
47cb7aa33aSEmmanuel Vadot    maxItems: 5
48cb7aa33aSEmmanuel Vadot    description: GPIO valid number range.
49cb7aa33aSEmmanuel Vadot
50cb7aa33aSEmmanuel Vadot  interrupt-controller: true
51cb7aa33aSEmmanuel Vadot
52cb7aa33aSEmmanuel Vadot  interrupts:
53cb7aa33aSEmmanuel Vadot    maxItems: 1
54cb7aa33aSEmmanuel Vadot
55cb7aa33aSEmmanuel Vadot  "#interrupt-cells":
56cb7aa33aSEmmanuel Vadot    const: 2
57cb7aa33aSEmmanuel Vadot
58cb7aa33aSEmmanuel VadotallOf:
59cb7aa33aSEmmanuel Vadot  - $ref: pinctrl.yaml#
60cb7aa33aSEmmanuel Vadot
61cb7aa33aSEmmanuel Vadotrequired:
62cb7aa33aSEmmanuel Vadot  - compatible
63cb7aa33aSEmmanuel Vadot  - reg
64cb7aa33aSEmmanuel Vadot  - reg-names
65cb7aa33aSEmmanuel Vadot  - gpio-controller
66cb7aa33aSEmmanuel Vadot  - "#gpio-cells"
67cb7aa33aSEmmanuel Vadot
68cb7aa33aSEmmanuel VadotpatternProperties:
69cb7aa33aSEmmanuel Vadot  '-pins$':
70cb7aa33aSEmmanuel Vadot    type: object
71cb7aa33aSEmmanuel Vadot    additionalProperties: false
72cb7aa33aSEmmanuel Vadot
73cb7aa33aSEmmanuel Vadot    patternProperties:
74cb7aa33aSEmmanuel Vadot      '^.*mux.*$':
75cb7aa33aSEmmanuel Vadot        type: object
76cb7aa33aSEmmanuel Vadot        additionalProperties: false
77cb7aa33aSEmmanuel Vadot        description: |
78cb7aa33aSEmmanuel Vadot          pinmux configuration nodes.
79cb7aa33aSEmmanuel Vadot
80cb7aa33aSEmmanuel Vadot          The following table shows the effective values of "group", "function"
81cb7aa33aSEmmanuel Vadot          properties and chip pinout pins
82cb7aa33aSEmmanuel Vadot
83cb7aa33aSEmmanuel Vadot          groups                 function    pins (in pin#)
84cb7aa33aSEmmanuel Vadot          ---------------------------------------------------------------------
85cb7aa33aSEmmanuel Vadot          "wa_aice1"             "wa_aice"   0, 1
86cb7aa33aSEmmanuel Vadot          "wa_aice2"             "wa_aice"   0, 1
87cb7aa33aSEmmanuel Vadot          "wm_uart_0"            "uart"      0, 1
88cb7aa33aSEmmanuel Vadot          "dfd"                  "dfd"       0, 1, 4, 5
89cb7aa33aSEmmanuel Vadot          "watchdog"             "watchdog"  2
90cb7aa33aSEmmanuel Vadot          "pcie_pereset"         "pcie"      3
91cb7aa33aSEmmanuel Vadot          "jtag"                 "jtag"      4, 5, 6, 7, 8
92cb7aa33aSEmmanuel Vadot          "wm_jtag_0"            "jtag"      4, 5, 6, 7, 8
93cb7aa33aSEmmanuel Vadot          "wo0_jtag_0"           "jtag"      9, 10, 11, 12, 13
94cb7aa33aSEmmanuel Vadot          "uart2_0"              "uart"      4, 5, 6, 7
95cb7aa33aSEmmanuel Vadot          "gbe_led0"             "led"       8
96cb7aa33aSEmmanuel Vadot          "pta_ext_0"            "pta"       4, 5, 6
97cb7aa33aSEmmanuel Vadot          "pwm2"                 "pwm"       7
98cb7aa33aSEmmanuel Vadot          "net_wo0_uart_txd_0"   "uart"      8
99cb7aa33aSEmmanuel Vadot          "spi1_0"               "spi"       4, 5, 6, 7
100cb7aa33aSEmmanuel Vadot          "i2c0_0"               "i2c"       6, 7
101cb7aa33aSEmmanuel Vadot          "dfd_ntrst"            "dfd"       8
102cb7aa33aSEmmanuel Vadot          "wm_aice1"             "wa_aice"   9, 10
103cb7aa33aSEmmanuel Vadot          "pwm0_0"               "pwm"       13
104cb7aa33aSEmmanuel Vadot          "pwm0_1"               "pwm"       15
105cb7aa33aSEmmanuel Vadot          "pwm1_0"               "pwm"       14
106cb7aa33aSEmmanuel Vadot          "pwm1_1"               "pwm"       15
107cb7aa33aSEmmanuel Vadot          "net_wo0_uart_txd_1"   "uart"      14
108cb7aa33aSEmmanuel Vadot          "net_wo0_uart_txd_2"   "uart"      15
109cb7aa33aSEmmanuel Vadot          "gbe_led1"             "led"       13
110cb7aa33aSEmmanuel Vadot          "pcm"                  "pcm"       9, 10, 11, 12, 13, 25
111cb7aa33aSEmmanuel Vadot          "watchdog1"            "watchdog"  13
112cb7aa33aSEmmanuel Vadot          "udi"                  "udi"       9, 10, 11, 12, 13
113cb7aa33aSEmmanuel Vadot          "drv_vbus"             "usb"       14
114fac71e4eSEmmanuel Vadot          "emmc_45"              "flash"     15, 16, 17, 18, 19, 20, 21, 22, 23,
115fac71e4eSEmmanuel Vadot                                             24, 25
116fac71e4eSEmmanuel Vadot
117cb7aa33aSEmmanuel Vadot          "snfi"                 "flash"     16, 17, 18, 19, 20, 21
118cb7aa33aSEmmanuel Vadot          "spi0"                 "spi"       16, 17, 18, 19
119cb7aa33aSEmmanuel Vadot          "spi0_wp_hold"         "spi"       20, 21
120cb7aa33aSEmmanuel Vadot          "spi1_1"               "spi"       22, 23, 24, 25
121cb7aa33aSEmmanuel Vadot          "spi2"                 "spi"       26, 27, 28, 29
122cb7aa33aSEmmanuel Vadot          "spi2_wp_hold"         "spi"       30, 31
123cb7aa33aSEmmanuel Vadot          "uart1_0"              "uart"      16, 17, 18, 19
124cb7aa33aSEmmanuel Vadot          "uart1_1"              "uart"      26, 27, 28, 29
125cb7aa33aSEmmanuel Vadot          "uart2_1"              "uart"      22, 23, 24, 25
126cb7aa33aSEmmanuel Vadot          "pta_ext_1"            "pta"       22, 23, 24
127cb7aa33aSEmmanuel Vadot          "wm_aurt_1"            "uart"      20, 21
128cb7aa33aSEmmanuel Vadot          "wm_aurt_2"            "uart"      30, 31
129cb7aa33aSEmmanuel Vadot          "wm_jtag_1"            "jtag"      20, 21, 22, 23, 24
130cb7aa33aSEmmanuel Vadot          "wo0_jtag_1"           "jtag"      25, 26, 27, 28, 29
131cb7aa33aSEmmanuel Vadot          "wa_aice3"             "wa_aice"   28, 20
132cb7aa33aSEmmanuel Vadot          "wm_aice2"             "wa_aice"   30, 31
133cb7aa33aSEmmanuel Vadot          "i2c0_1"               "i2c"       30, 31
134cb7aa33aSEmmanuel Vadot          "u2_phy_i2c"           "i2c"       30, 31
135cb7aa33aSEmmanuel Vadot          "uart0"                "uart"      32, 33
136cb7aa33aSEmmanuel Vadot          "sgmii1_phy_i2c"       "i2c"       32, 33
137cb7aa33aSEmmanuel Vadot          "u3_phy_i2c"           "i2c"       32, 33
138cb7aa33aSEmmanuel Vadot          "sgmii0_phy_i2c"       "i2c"       32, 33
139cb7aa33aSEmmanuel Vadot          "pcie_clk"             "pcie"      34
140cb7aa33aSEmmanuel Vadot          "pcie_wake"            "pcie"      35
141cb7aa33aSEmmanuel Vadot          "i2c0_2"               "i2c"       36, 37
142cb7aa33aSEmmanuel Vadot          "smi_mdc_mdio"         "eth"       36, 37
143cb7aa33aSEmmanuel Vadot          "gbe_ext_mdc_mdio"     "eth"       36, 37
144cb7aa33aSEmmanuel Vadot          "wf0_mode1"            "eth"       40, 41, 42, 43, 44, 45, 46, 47, 48,
145cb7aa33aSEmmanuel Vadot                                             49, 50, 51, 52, 53, 54, 55, 56
146cb7aa33aSEmmanuel Vadot
147cb7aa33aSEmmanuel Vadot          "wf0_mode3"            "eth"       45, 46, 47, 48, 49, 51
148cb7aa33aSEmmanuel Vadot          "wf2g_led0"            "led"       30
149cb7aa33aSEmmanuel Vadot          "wf2g_led1"            "led"       34
150cb7aa33aSEmmanuel Vadot          "wf5g_led0"            "led"       31
151cb7aa33aSEmmanuel Vadot          "wf5g_led1"            "led"       35
152cb7aa33aSEmmanuel Vadot          "mt7531_int"           "eth"       38
153fac71e4eSEmmanuel Vadot          "ant_sel"              "ant"       14, 15, 16, 17, 18, 19, 20, 21, 22,
154cb7aa33aSEmmanuel Vadot                                             23, 24, 25, 34, 35
155cb7aa33aSEmmanuel Vadot
156cb7aa33aSEmmanuel Vadot        $ref: /schemas/pinctrl/pinmux-node.yaml
157cb7aa33aSEmmanuel Vadot        properties:
158cb7aa33aSEmmanuel Vadot          function:
159cb7aa33aSEmmanuel Vadot            description:
160cb7aa33aSEmmanuel Vadot              A string containing the name of the function to mux to the group.
161cb7aa33aSEmmanuel Vadot            enum: [wa_aice, dfd, jtag, pta, pcm, udi, usb, ant, eth, i2c, led,
162cb7aa33aSEmmanuel Vadot                   pwm, spi, uart, watchdog, flash, pcie]
163cb7aa33aSEmmanuel Vadot          groups:
164cb7aa33aSEmmanuel Vadot            description:
165cb7aa33aSEmmanuel Vadot              An array of strings. Each string contains the name of a group.
166cb7aa33aSEmmanuel Vadot
167cb7aa33aSEmmanuel Vadot        required:
168cb7aa33aSEmmanuel Vadot          - function
169cb7aa33aSEmmanuel Vadot          - groups
170cb7aa33aSEmmanuel Vadot
171cb7aa33aSEmmanuel Vadot        allOf:
172cb7aa33aSEmmanuel Vadot          - if:
173cb7aa33aSEmmanuel Vadot              properties:
174cb7aa33aSEmmanuel Vadot                function:
175cb7aa33aSEmmanuel Vadot                  const: wa_aice
176cb7aa33aSEmmanuel Vadot            then:
177cb7aa33aSEmmanuel Vadot              properties:
178cb7aa33aSEmmanuel Vadot                groups:
179cb7aa33aSEmmanuel Vadot                  enum: [wa_aice1, wa_aice2, wm_aice1_1, wa_aice3, wm_aice1_2]
180cb7aa33aSEmmanuel Vadot          - if:
181cb7aa33aSEmmanuel Vadot              properties:
182cb7aa33aSEmmanuel Vadot                function:
183cb7aa33aSEmmanuel Vadot                  const: dfd
184cb7aa33aSEmmanuel Vadot            then:
185cb7aa33aSEmmanuel Vadot              properties:
186cb7aa33aSEmmanuel Vadot                groups:
187cb7aa33aSEmmanuel Vadot                  enum: [dfd, dfd_ntrst]
188cb7aa33aSEmmanuel Vadot          - if:
189cb7aa33aSEmmanuel Vadot              properties:
190cb7aa33aSEmmanuel Vadot                function:
191cb7aa33aSEmmanuel Vadot                  const: jtag
192cb7aa33aSEmmanuel Vadot            then:
193cb7aa33aSEmmanuel Vadot              properties:
194cb7aa33aSEmmanuel Vadot                groups:
195cb7aa33aSEmmanuel Vadot                  enum: [jtag, wm_jtag_0, wo0_jtag_0, wo0_jtag_1, wm_jtag_1]
196cb7aa33aSEmmanuel Vadot          - if:
197cb7aa33aSEmmanuel Vadot              properties:
198cb7aa33aSEmmanuel Vadot                function:
199cb7aa33aSEmmanuel Vadot                  const: pta
200cb7aa33aSEmmanuel Vadot            then:
201cb7aa33aSEmmanuel Vadot              properties:
202cb7aa33aSEmmanuel Vadot                groups:
203cb7aa33aSEmmanuel Vadot                  enum: [pta_ext_0, pta_ext_1]
204cb7aa33aSEmmanuel Vadot          - if:
205cb7aa33aSEmmanuel Vadot              properties:
206cb7aa33aSEmmanuel Vadot                function:
207cb7aa33aSEmmanuel Vadot                  const: pcm
208cb7aa33aSEmmanuel Vadot            then:
209cb7aa33aSEmmanuel Vadot              properties:
210cb7aa33aSEmmanuel Vadot                groups:
211cb7aa33aSEmmanuel Vadot                  enum: [pcm]
212cb7aa33aSEmmanuel Vadot          - if:
213cb7aa33aSEmmanuel Vadot              properties:
214cb7aa33aSEmmanuel Vadot                function:
215cb7aa33aSEmmanuel Vadot                  const: udi
216cb7aa33aSEmmanuel Vadot            then:
217cb7aa33aSEmmanuel Vadot              properties:
218cb7aa33aSEmmanuel Vadot                groups:
219cb7aa33aSEmmanuel Vadot                  enum: [udi]
220cb7aa33aSEmmanuel Vadot          - if:
221cb7aa33aSEmmanuel Vadot              properties:
222cb7aa33aSEmmanuel Vadot                function:
223cb7aa33aSEmmanuel Vadot                  const: usb
224cb7aa33aSEmmanuel Vadot            then:
225cb7aa33aSEmmanuel Vadot              properties:
226cb7aa33aSEmmanuel Vadot                groups:
227cb7aa33aSEmmanuel Vadot                  enum: [drv_vbus]
228cb7aa33aSEmmanuel Vadot          - if:
229cb7aa33aSEmmanuel Vadot              properties:
230cb7aa33aSEmmanuel Vadot                function:
231cb7aa33aSEmmanuel Vadot                  const: ant
232cb7aa33aSEmmanuel Vadot            then:
233cb7aa33aSEmmanuel Vadot              properties:
234cb7aa33aSEmmanuel Vadot                groups:
235cb7aa33aSEmmanuel Vadot                  enum: [ant_sel]
236cb7aa33aSEmmanuel Vadot          - if:
237cb7aa33aSEmmanuel Vadot              properties:
238cb7aa33aSEmmanuel Vadot                function:
239cb7aa33aSEmmanuel Vadot                  const: eth
240cb7aa33aSEmmanuel Vadot            then:
241cb7aa33aSEmmanuel Vadot              properties:
242cb7aa33aSEmmanuel Vadot                groups:
243cb7aa33aSEmmanuel Vadot                  enum: [smi_mdc_mdio, gbe_ext_mdc_mdio, wf0_mode1, wf0_mode3,
244cb7aa33aSEmmanuel Vadot                         mt7531_int]
245cb7aa33aSEmmanuel Vadot          - if:
246cb7aa33aSEmmanuel Vadot              properties:
247cb7aa33aSEmmanuel Vadot                function:
248cb7aa33aSEmmanuel Vadot                  const: i2c
249cb7aa33aSEmmanuel Vadot            then:
250cb7aa33aSEmmanuel Vadot              properties:
251cb7aa33aSEmmanuel Vadot                groups:
252cb7aa33aSEmmanuel Vadot                  enum: [i2c0_0, i2c0_1, u2_phy_i2c, sgmii1_phy_i2c, u3_phy_i2c,
253cb7aa33aSEmmanuel Vadot                         sgmii0_phy_i2c, i2c0_2]
254cb7aa33aSEmmanuel Vadot          - if:
255cb7aa33aSEmmanuel Vadot              properties:
256cb7aa33aSEmmanuel Vadot                function:
257cb7aa33aSEmmanuel Vadot                  const: led
258cb7aa33aSEmmanuel Vadot            then:
259cb7aa33aSEmmanuel Vadot              properties:
260cb7aa33aSEmmanuel Vadot                groups:
261fac71e4eSEmmanuel Vadot                  enum: [gbe_led0, gbe_led1, wf2g_led0, wf2g_led1, wf5g_led0,
262fac71e4eSEmmanuel Vadot                         wf5g_led1]
263cb7aa33aSEmmanuel Vadot          - if:
264cb7aa33aSEmmanuel Vadot              properties:
265cb7aa33aSEmmanuel Vadot                function:
266cb7aa33aSEmmanuel Vadot                  const: pwm
267cb7aa33aSEmmanuel Vadot            then:
268cb7aa33aSEmmanuel Vadot              properties:
269cb7aa33aSEmmanuel Vadot                groups:
270cb7aa33aSEmmanuel Vadot                  items:
271cb7aa33aSEmmanuel Vadot                    enum: [pwm2, pwm0_0, pwm0_1, pwm1_0, pwm1_1]
272cb7aa33aSEmmanuel Vadot                  maxItems: 3
273cb7aa33aSEmmanuel Vadot          - if:
274cb7aa33aSEmmanuel Vadot              properties:
275cb7aa33aSEmmanuel Vadot                function:
276cb7aa33aSEmmanuel Vadot                  const: spi
277cb7aa33aSEmmanuel Vadot            then:
278cb7aa33aSEmmanuel Vadot              properties:
279cb7aa33aSEmmanuel Vadot                groups:
280cb7aa33aSEmmanuel Vadot                  items:
281fac71e4eSEmmanuel Vadot                    enum: [spi1_0, spi0, spi0_wp_hold, spi1_1, spi2,
282fac71e4eSEmmanuel Vadot                           spi2_wp_hold]
283cb7aa33aSEmmanuel Vadot                  maxItems: 4
284cb7aa33aSEmmanuel Vadot          - if:
285cb7aa33aSEmmanuel Vadot              properties:
286cb7aa33aSEmmanuel Vadot                function:
287cb7aa33aSEmmanuel Vadot                  const: uart
288cb7aa33aSEmmanuel Vadot            then:
289cb7aa33aSEmmanuel Vadot              properties:
290cb7aa33aSEmmanuel Vadot                groups:
291cb7aa33aSEmmanuel Vadot                  items:
292cb7aa33aSEmmanuel Vadot                    enum: [wm_uart_0, uart2_0, net_wo0_uart_txd_0,
293cb7aa33aSEmmanuel Vadot                           net_wo0_uart_txd_1, net_wo0_uart_txd_2, uart1_0,
294cb7aa33aSEmmanuel Vadot                           uart1_1, uart2_1, wm_aurt_1, wm_aurt_2, uart0]
295cb7aa33aSEmmanuel Vadot          - if:
296cb7aa33aSEmmanuel Vadot              properties:
297cb7aa33aSEmmanuel Vadot                function:
298cb7aa33aSEmmanuel Vadot                  const: watchdog
299cb7aa33aSEmmanuel Vadot            then:
300cb7aa33aSEmmanuel Vadot              properties:
301cb7aa33aSEmmanuel Vadot                groups:
302cb7aa33aSEmmanuel Vadot                  enum: [watchdog]
303cb7aa33aSEmmanuel Vadot          - if:
304cb7aa33aSEmmanuel Vadot              properties:
305cb7aa33aSEmmanuel Vadot                function:
306cb7aa33aSEmmanuel Vadot                  const: flash
307cb7aa33aSEmmanuel Vadot            then:
308cb7aa33aSEmmanuel Vadot              properties:
309cb7aa33aSEmmanuel Vadot                groups:
310cb7aa33aSEmmanuel Vadot                  items:
311cb7aa33aSEmmanuel Vadot                    enum: [emmc_45, snfi]
312cb7aa33aSEmmanuel Vadot                  maxItems: 1
313cb7aa33aSEmmanuel Vadot          - if:
314cb7aa33aSEmmanuel Vadot              properties:
315cb7aa33aSEmmanuel Vadot                function:
316cb7aa33aSEmmanuel Vadot                  const: pcie
317cb7aa33aSEmmanuel Vadot            then:
318cb7aa33aSEmmanuel Vadot              properties:
319cb7aa33aSEmmanuel Vadot                groups:
320cb7aa33aSEmmanuel Vadot                  items:
321cb7aa33aSEmmanuel Vadot                    enum: [pcie_clk, pcie_wake, pcie_pereset]
322cb7aa33aSEmmanuel Vadot                  maxItems: 3
323cb7aa33aSEmmanuel Vadot
324cb7aa33aSEmmanuel Vadot      '^.*conf.*$':
325cb7aa33aSEmmanuel Vadot        type: object
326cb7aa33aSEmmanuel Vadot        additionalProperties: false
327cb7aa33aSEmmanuel Vadot        description: pinconf configuration nodes.
328cb7aa33aSEmmanuel Vadot        $ref: /schemas/pinctrl/pincfg-node.yaml
329cb7aa33aSEmmanuel Vadot
330cb7aa33aSEmmanuel Vadot        properties:
331cb7aa33aSEmmanuel Vadot          pins:
332cb7aa33aSEmmanuel Vadot            description:
333cb7aa33aSEmmanuel Vadot              An array of strings. Each string contains the name of a pin.
334cb7aa33aSEmmanuel Vadot            items:
335cb7aa33aSEmmanuel Vadot              enum: [GPIO_WPS, GPIO_RESET, SYS_WATCHDOG, PCIE_PERESET_N,
336cb7aa33aSEmmanuel Vadot                     JTAG_JTDO, JTAG_JTDI, JTAG_JTMS, JTAG_JTCLK, JTAG_JTRST_N,
337cb7aa33aSEmmanuel Vadot                     WO_JTAG_JTDO, WO_JTAG_JTDI, WO_JTAG_JTMS, WO_JTAG_JTCLK,
338cb7aa33aSEmmanuel Vadot                     WO_JTAG_JTRST_N, USB_VBUS, PWM0, SPI0_CLK, SPI0_MOSI,
339fac71e4eSEmmanuel Vadot                     SPI0_MISO, SPI0_CS, SPI0_HOLD, SPI0_WP, SPI1_CLK,
340fac71e4eSEmmanuel Vadot                     SPI1_MOSI, SPI1_MISO, SPI1_CS, SPI2_CLK, SPI2_MOSI,
341fac71e4eSEmmanuel Vadot                     SPI2_MISO, SPI2_CS, SPI2_HOLD, SPI2_WP, UART0_RXD,
342fac71e4eSEmmanuel Vadot                     UART0_TXD, PCIE_CLK_REQ, PCIE_WAKE_N, SMI_MDC, SMI_MDIO,
343fac71e4eSEmmanuel Vadot                     GBE_INT, GBE_RESET, WF_DIG_RESETB, WF_CBA_RESETB,
344fac71e4eSEmmanuel Vadot                     WF_XO_REQ, WF_TOP_CLK, WF_TOP_DATA, WF_HB1, WF_HB2, WF_HB3,
345fac71e4eSEmmanuel Vadot                     WF_HB4, WF_HB0, WF_HB0_B, WF_HB5, WF_HB6, WF_HB7, WF_HB8,
346fac71e4eSEmmanuel Vadot                     WF_HB9, WF_HB10]
347cb7aa33aSEmmanuel Vadot            maxItems: 57
348cb7aa33aSEmmanuel Vadot
349cb7aa33aSEmmanuel Vadot          bias-disable: true
350cb7aa33aSEmmanuel Vadot
351cb7aa33aSEmmanuel Vadot          bias-pull-up:
352cb7aa33aSEmmanuel Vadot            oneOf:
353cb7aa33aSEmmanuel Vadot              - type: boolean
354cb7aa33aSEmmanuel Vadot                description: normal pull up.
355cb7aa33aSEmmanuel Vadot              - enum: [100, 101, 102, 103]
356fac71e4eSEmmanuel Vadot                description:
357cb7aa33aSEmmanuel Vadot                  PUPD/R1/R0 pull down type. See MTK_PUPD_SET_R1R0 defines in
358cb7aa33aSEmmanuel Vadot                  dt-bindings/pinctrl/mt65xx.h.
359cb7aa33aSEmmanuel Vadot
360cb7aa33aSEmmanuel Vadot          bias-pull-down:
361cb7aa33aSEmmanuel Vadot            oneOf:
362cb7aa33aSEmmanuel Vadot              - type: boolean
363cb7aa33aSEmmanuel Vadot                description: normal pull down.
364cb7aa33aSEmmanuel Vadot              - enum: [100, 101, 102, 103]
365fac71e4eSEmmanuel Vadot                description:
366cb7aa33aSEmmanuel Vadot                  PUPD/R1/R0 pull down type. See MTK_PUPD_SET_R1R0 defines in
367cb7aa33aSEmmanuel Vadot                  dt-bindings/pinctrl/mt65xx.h.
368cb7aa33aSEmmanuel Vadot
369cb7aa33aSEmmanuel Vadot          input-enable: true
370cb7aa33aSEmmanuel Vadot
371cb7aa33aSEmmanuel Vadot          input-disable: true
372cb7aa33aSEmmanuel Vadot
373cb7aa33aSEmmanuel Vadot          output-enable: true
374cb7aa33aSEmmanuel Vadot
375cb7aa33aSEmmanuel Vadot          output-low: true
376cb7aa33aSEmmanuel Vadot
377cb7aa33aSEmmanuel Vadot          output-high: true
378cb7aa33aSEmmanuel Vadot
379cb7aa33aSEmmanuel Vadot          input-schmitt-enable: true
380cb7aa33aSEmmanuel Vadot
381cb7aa33aSEmmanuel Vadot          input-schmitt-disable: true
382cb7aa33aSEmmanuel Vadot
383cb7aa33aSEmmanuel Vadot          drive-strength:
384cb7aa33aSEmmanuel Vadot            enum: [2, 4, 6, 8, 10, 12, 14, 16]
385cb7aa33aSEmmanuel Vadot
386cb7aa33aSEmmanuel Vadot          mediatek,pull-up-adv:
387cb7aa33aSEmmanuel Vadot            description: |
388cb7aa33aSEmmanuel Vadot              Valid arguments for 'mediatek,pull-up-adv' are '0', '1', '2', '3'
389*aa1a8ff2SEmmanuel Vadot              Pull up settings for 2 pull resistors, R0 and R1. Valid arguments
390cb7aa33aSEmmanuel Vadot              are described as below:
391cb7aa33aSEmmanuel Vadot              0: (R1, R0) = (0, 0) which means R1 disabled and R0 disabled.
392cb7aa33aSEmmanuel Vadot              1: (R1, R0) = (0, 1) which means R1 disabled and R0 enabled.
393cb7aa33aSEmmanuel Vadot              2: (R1, R0) = (1, 0) which means R1 enabled and R0 disabled.
394cb7aa33aSEmmanuel Vadot              3: (R1, R0) = (1, 1) which means R1 enabled and R0 enabled.
395cb7aa33aSEmmanuel Vadot            $ref: /schemas/types.yaml#/definitions/uint32
396cb7aa33aSEmmanuel Vadot            enum: [0, 1, 2, 3]
397cb7aa33aSEmmanuel Vadot
398cb7aa33aSEmmanuel Vadot          mediatek,pull-down-adv:
399cb7aa33aSEmmanuel Vadot            description: |
400cb7aa33aSEmmanuel Vadot              Valid arguments for 'mediatek,pull-up-adv' are '0', '1', '2', '3'
401*aa1a8ff2SEmmanuel Vadot              Pull down settings for 2 pull resistors, R0 and R1. Valid arguments
402cb7aa33aSEmmanuel Vadot              are described as below:
403cb7aa33aSEmmanuel Vadot              0: (R1, R0) = (0, 0) which means R1 disabled and R0 disabled.
404cb7aa33aSEmmanuel Vadot              1: (R1, R0) = (0, 1) which means R1 disabled and R0 enabled.
405cb7aa33aSEmmanuel Vadot              2: (R1, R0) = (1, 0) which means R1 enabled and R0 disabled.
406cb7aa33aSEmmanuel Vadot              3: (R1, R0) = (1, 1) which means R1 enabled and R0 enabled.
407cb7aa33aSEmmanuel Vadot            $ref: /schemas/types.yaml#/definitions/uint32
408cb7aa33aSEmmanuel Vadot            enum: [0, 1, 2, 3]
409cb7aa33aSEmmanuel Vadot
410cb7aa33aSEmmanuel Vadot        required:
411cb7aa33aSEmmanuel Vadot          - pins
412cb7aa33aSEmmanuel Vadot
413cb7aa33aSEmmanuel VadotadditionalProperties: false
414cb7aa33aSEmmanuel Vadot
415cb7aa33aSEmmanuel Vadotexamples:
416cb7aa33aSEmmanuel Vadot  - |
417cb7aa33aSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/irq.h>
418cb7aa33aSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
419cb7aa33aSEmmanuel Vadot    #include <dt-bindings/pinctrl/mt65xx.h>
420cb7aa33aSEmmanuel Vadot
421cb7aa33aSEmmanuel Vadot    soc {
422cb7aa33aSEmmanuel Vadot      #address-cells = <2>;
423cb7aa33aSEmmanuel Vadot      #size-cells = <2>;
424cb7aa33aSEmmanuel Vadot      pio: pinctrl@11d00000 {
425cb7aa33aSEmmanuel Vadot        compatible = "mediatek,mt7981-pinctrl";
426cb7aa33aSEmmanuel Vadot        reg = <0 0x11d00000 0 0x1000>,
427cb7aa33aSEmmanuel Vadot              <0 0x11c00000 0 0x1000>,
428cb7aa33aSEmmanuel Vadot              <0 0x11c10000 0 0x1000>,
429cb7aa33aSEmmanuel Vadot              <0 0x11d20000 0 0x1000>,
430cb7aa33aSEmmanuel Vadot              <0 0x11e00000 0 0x1000>,
431cb7aa33aSEmmanuel Vadot              <0 0x11e20000 0 0x1000>,
432cb7aa33aSEmmanuel Vadot              <0 0x11f00000 0 0x1000>,
433cb7aa33aSEmmanuel Vadot              <0 0x11f10000 0 0x1000>,
434cb7aa33aSEmmanuel Vadot              <0 0x1000b000 0 0x1000>;
435cb7aa33aSEmmanuel Vadot        reg-names = "gpio", "iocfg_rt", "iocfg_rm",
436cb7aa33aSEmmanuel Vadot                    "iocfg_rb", "iocfg_lb", "iocfg_bl",
437cb7aa33aSEmmanuel Vadot                    "iocfg_tm", "iocfg_tl", "eint";
438cb7aa33aSEmmanuel Vadot        gpio-controller;
439cb7aa33aSEmmanuel Vadot        #gpio-cells = <2>;
440cb7aa33aSEmmanuel Vadot        gpio-ranges = <&pio 0 0 56>;
441cb7aa33aSEmmanuel Vadot        interrupt-controller;
442cb7aa33aSEmmanuel Vadot        interrupts = <GIC_SPI 225 IRQ_TYPE_LEVEL_HIGH>;
443cb7aa33aSEmmanuel Vadot        interrupt-parent = <&gic>;
444cb7aa33aSEmmanuel Vadot        #interrupt-cells = <2>;
445cb7aa33aSEmmanuel Vadot
446cb7aa33aSEmmanuel Vadot        mdio_pins: mdio-pins {
447cb7aa33aSEmmanuel Vadot          mux {
448cb7aa33aSEmmanuel Vadot            function = "eth";
449cb7aa33aSEmmanuel Vadot            groups = "smi_mdc_mdio";
450cb7aa33aSEmmanuel Vadot          };
451cb7aa33aSEmmanuel Vadot        };
452cb7aa33aSEmmanuel Vadot
453cb7aa33aSEmmanuel Vadot        spi0_flash_pins: spi0-pins {
454cb7aa33aSEmmanuel Vadot          mux {
455cb7aa33aSEmmanuel Vadot            function = "spi";
456cb7aa33aSEmmanuel Vadot            groups = "spi0", "spi0_wp_hold";
457cb7aa33aSEmmanuel Vadot          };
458cb7aa33aSEmmanuel Vadot
459cb7aa33aSEmmanuel Vadot          conf-pu {
460cb7aa33aSEmmanuel Vadot            pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP";
461cb7aa33aSEmmanuel Vadot            drive-strength = <MTK_DRIVE_8mA>;
462cb7aa33aSEmmanuel Vadot            bias-pull-up = <MTK_PUPD_SET_R1R0_11>;
463cb7aa33aSEmmanuel Vadot          };
464cb7aa33aSEmmanuel Vadot
465cb7aa33aSEmmanuel Vadot          conf-pd {
466cb7aa33aSEmmanuel Vadot            pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO";
467cb7aa33aSEmmanuel Vadot            drive-strength = <MTK_DRIVE_8mA>;
468cb7aa33aSEmmanuel Vadot            bias-pull-down = <MTK_PUPD_SET_R1R0_11>;
469cb7aa33aSEmmanuel Vadot          };
470cb7aa33aSEmmanuel Vadot        };
471cb7aa33aSEmmanuel Vadot
472cb7aa33aSEmmanuel Vadot        pcie_pins: pcie-pins {
473cb7aa33aSEmmanuel Vadot          mux {
474cb7aa33aSEmmanuel Vadot            function = "pcie";
475cb7aa33aSEmmanuel Vadot            groups = "pcie_clk", "pcie_wake", "pcie_pereset";
476cb7aa33aSEmmanuel Vadot          };
477cb7aa33aSEmmanuel Vadot        };
478cb7aa33aSEmmanuel Vadot
479cb7aa33aSEmmanuel Vadot      };
480cb7aa33aSEmmanuel Vadot    };
481