Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dt-bindings: pinctrl: mediatek: mt7620: split binding

The MT7628 and MT7688 SoCs contain different pin muxing information,
therefore, should be split. This can be done now that there are compatible
strings to distinguish them from other SoCs.

Split the schema out to mediatek,mt76x8-pinctrl.yaml.

Remove mediatek,mt76x8-pinctrl from mt7620.

Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20230317213011.13656-21-arinc.unal@arinc9.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

authored by

Arınç ÜNAL and committed by
Linus Walleij
565afac7 5c7daf4a

+459 -370
+9 -370
Documentation/devicetree/bindings/pinctrl/mediatek,mt7620-pinctrl.yaml
··· 11 11 - Sergio Paracuellos <sergio.paracuellos@gmail.com> 12 12 13 13 description: | 14 - MediaTek MT7620 pin controller for MT7620, MT7628 and MT7688 SoCs. 14 + MediaTek MT7620 pin controller for MT7620 SoC. 15 15 The pin controller can only set the muxing of pin groups. Muxing individual 16 16 pins is not supported. There is no pinconf support. 17 17 18 18 properties: 19 19 compatible: 20 - enum: 21 - - ralink,mt7620-pinctrl 22 - - ralink,mt76x8-pinctrl 20 + const: ralink,mt7620-pinctrl 23 21 24 22 patternProperties: 25 23 '-pins$': ··· 35 37 function: 36 38 description: 37 39 A string containing the name of the function to mux to the group. 38 - anyOf: 39 - - description: For MT7620 SoC 40 - enum: [ephy, gpio, gpio i2s, gpio uartf, i2c, i2s uartf, mdio, nand, pa, 41 - pcie refclk, pcie rst, pcm gpio, pcm i2s, pcm uartf, refclk, 42 - rgmii1, rgmii2, sd, spi, spi refclk, uartf, uartlite, wdt refclk, 43 - wdt rst, wled] 44 - 45 - - description: For MT7628 and MT7688 SoCs 46 - enum: [antenna, debug, gpio, i2c, i2s, jtag, p0led_an, p0led_kn, 47 - p1led_an, p1led_kn, p2led_an, p2led_kn, p3led_an, p3led_kn, 48 - p4led_an, p4led_kn, pcie, pcm, perst, pwm, pwm0, pwm1, pwm_uart2, 49 - refclk, rsvd, sdxc, sdxc d5 d4, sdxc d6, sdxc d7, spi, spi cs1, 50 - spis, sw_r, uart0, uart1, uart2, utif, wdt, wled_an, wled_kn, -] 40 + enum: [ephy, gpio, gpio i2s, gpio uartf, i2c, i2s uartf, mdio, nand, 41 + pa, pcie refclk, pcie rst, pcm gpio, pcm i2s, pcm uartf, 42 + refclk, rgmii1, rgmii2, sd, spi, spi refclk, uartf, uartlite, 43 + wdt refclk, wdt rst, wled] 51 44 52 45 groups: 53 46 description: ··· 50 61 - function 51 62 52 63 allOf: 53 - - if: 54 - properties: 55 - function: 56 - const: antenna 57 - then: 58 - properties: 59 - groups: 60 - enum: [i2s] 61 - 62 - - if: 63 - properties: 64 - function: 65 - const: debug 66 - then: 67 - properties: 68 - groups: 69 - enum: [i2c] 70 - 71 64 - if: 72 65 properties: 73 66 function: ··· 66 95 then: 67 96 properties: 68 97 groups: 69 - anyOf: 70 - - description: For MT7620 SoC 71 - enum: [ephy, i2c, mdio, nd_sd, pa, pcie, rgmii1, rgmii2, 72 - spi, spi refclk, uartf, uartlite, wdt, wled] 73 - 74 - - description: For MT7628 and MT7688 SoCs 75 - enum: [gpio, i2c, i2s, p0led_an, p0led_kn, p1led_an, 76 - p1led_kn, p2led_an, p2led_kn, p3led_an, p3led_kn, 77 - p4led_an, p4led_kn, perst, pwm0, pwm1, refclk, 78 - sdmode, spi, spi cs1, spis, uart0, uart1, uart2, 79 - wdt, wled_an, wled_kn] 98 + enum: [ephy, i2c, mdio, nd_sd, pa, pcie, rgmii1, rgmii2, spi, 99 + spi refclk, uartf, uartlite, wdt, wled] 80 100 81 101 - if: 82 102 properties: ··· 99 137 - if: 100 138 properties: 101 139 function: 102 - const: i2s 103 - then: 104 - properties: 105 - groups: 106 - enum: [i2s] 107 - 108 - - if: 109 - properties: 110 - function: 111 140 const: i2s uartf 112 141 then: 113 142 properties: 114 143 groups: 115 144 enum: [uartf] 116 - 117 - - if: 118 - properties: 119 - function: 120 - const: jtag 121 - then: 122 - properties: 123 - groups: 124 - enum: [p0led_an, p0led_kn, p1led_an, p1led_kn, p2led_an, 125 - p2led_kn, p3led_an, p3led_kn, p4led_an, p4led_kn, 126 - sdmode] 127 145 128 146 - if: 129 147 properties: ··· 126 184 - if: 127 185 properties: 128 186 function: 129 - const: p0led_an 130 - then: 131 - properties: 132 - groups: 133 - enum: [p0led_an] 134 - 135 - - if: 136 - properties: 137 - function: 138 - const: p0led_kn 139 - then: 140 - properties: 141 - groups: 142 - enum: [p0led_kn] 143 - 144 - - if: 145 - properties: 146 - function: 147 - const: p1led_an 148 - then: 149 - properties: 150 - groups: 151 - enum: [p1led_an] 152 - 153 - - if: 154 - properties: 155 - function: 156 - const: p1led_kn 157 - then: 158 - properties: 159 - groups: 160 - enum: [p1led_kn] 161 - 162 - - if: 163 - properties: 164 - function: 165 - const: p2led_an 166 - then: 167 - properties: 168 - groups: 169 - enum: [p2led_an] 170 - 171 - - if: 172 - properties: 173 - function: 174 - const: p2led_kn 175 - then: 176 - properties: 177 - groups: 178 - enum: [p2led_kn] 179 - 180 - - if: 181 - properties: 182 - function: 183 - const: p3led_an 184 - then: 185 - properties: 186 - groups: 187 - enum: [p3led_an] 188 - 189 - - if: 190 - properties: 191 - function: 192 - const: p3led_kn 193 - then: 194 - properties: 195 - groups: 196 - enum: [p3led_kn] 197 - 198 - - if: 199 - properties: 200 - function: 201 - const: p4led_an 202 - then: 203 - properties: 204 - groups: 205 - enum: [p4led_an] 206 - 207 - - if: 208 - properties: 209 - function: 210 - const: p4led_kn 211 - then: 212 - properties: 213 - groups: 214 - enum: [p4led_kn] 215 - 216 - - if: 217 - properties: 218 - function: 219 187 const: pa 220 188 then: 221 189 properties: 222 190 groups: 223 191 enum: [pa] 224 - 225 - - if: 226 - properties: 227 - function: 228 - const: pcie 229 - then: 230 - properties: 231 - groups: 232 - enum: [gpio] 233 192 234 193 - if: 235 194 properties: ··· 149 306 properties: 150 307 groups: 151 308 enum: [pcie] 152 - 153 - - if: 154 - properties: 155 - function: 156 - const: pcm 157 - then: 158 - properties: 159 - groups: 160 - enum: [i2s] 161 309 162 310 - if: 163 311 properties: ··· 180 346 - if: 181 347 properties: 182 348 function: 183 - const: perst 184 - then: 185 - properties: 186 - groups: 187 - enum: [perst] 188 - 189 - - if: 190 - properties: 191 - function: 192 - const: pwm 193 - then: 194 - properties: 195 - groups: 196 - enum: [uart1, uart2] 197 - 198 - - if: 199 - properties: 200 - function: 201 - const: pwm0 202 - then: 203 - properties: 204 - groups: 205 - enum: [pwm0] 206 - 207 - - if: 208 - properties: 209 - function: 210 - const: pwm1 211 - then: 212 - properties: 213 - groups: 214 - enum: [pwm1] 215 - 216 - - if: 217 - properties: 218 - function: 219 - const: pwm_uart2 220 - then: 221 - properties: 222 - groups: 223 - enum: [spis] 224 - 225 - - if: 226 - properties: 227 - function: 228 349 const: refclk 229 350 then: 230 351 properties: 231 352 groups: 232 - anyOf: 233 - - description: For MT7620 SoC 234 - enum: [mdio] 235 - 236 - - description: For MT7628 and MT7688 SoCs 237 - enum: [gpio, refclk, spi cs1] 353 + enum: [mdio] 238 354 239 355 - if: 240 356 properties: ··· 207 423 - if: 208 424 properties: 209 425 function: 210 - const: rsvd 211 - then: 212 - properties: 213 - groups: 214 - enum: [p0led_an, p0led_kn, wled_an, wled_kn] 215 - 216 - - if: 217 - properties: 218 - function: 219 426 const: sd 220 427 then: 221 428 properties: 222 429 groups: 223 430 enum: [nd_sd] 224 - 225 - - if: 226 - properties: 227 - function: 228 - const: sdxc 229 - then: 230 - properties: 231 - groups: 232 - enum: [sdmode] 233 - 234 - - if: 235 - properties: 236 - function: 237 - const: sdxc d5 d4 238 - then: 239 - properties: 240 - groups: 241 - enum: [uart2] 242 - 243 - - if: 244 - properties: 245 - function: 246 - const: sdxc d6 247 - then: 248 - properties: 249 - groups: 250 - enum: [pwm1] 251 - 252 - - if: 253 - properties: 254 - function: 255 - const: sdxc d7 256 - then: 257 - properties: 258 - groups: 259 - enum: [pwm0] 260 431 261 432 - if: 262 433 properties: ··· 225 486 - if: 226 487 properties: 227 488 function: 228 - const: spi cs1 229 - then: 230 - properties: 231 - groups: 232 - enum: [spi cs1] 233 - 234 - - if: 235 - properties: 236 - function: 237 489 const: spi refclk 238 490 then: 239 491 properties: 240 492 groups: 241 493 enum: [spi refclk] 242 - 243 - - if: 244 - properties: 245 - function: 246 - const: spis 247 - then: 248 - properties: 249 - groups: 250 - enum: [spis] 251 - 252 - - if: 253 - properties: 254 - function: 255 - const: sw_r 256 - then: 257 - properties: 258 - groups: 259 - enum: [uart1] 260 - 261 - - if: 262 - properties: 263 - function: 264 - const: uart0 265 - then: 266 - properties: 267 - groups: 268 - enum: [uart0] 269 - 270 - - if: 271 - properties: 272 - function: 273 - const: uart1 274 - then: 275 - properties: 276 - groups: 277 - enum: [uart1] 278 - 279 - - if: 280 - properties: 281 - function: 282 - const: uart2 283 - then: 284 - properties: 285 - groups: 286 - enum: [uart2] 287 494 288 495 - if: 289 496 properties: ··· 248 563 properties: 249 564 groups: 250 565 enum: [uartlite] 251 - 252 - - if: 253 - properties: 254 - function: 255 - const: utif 256 - then: 257 - properties: 258 - groups: 259 - enum: [p1led_an, p1led_kn, p2led_an, p2led_kn, p3led_an, 260 - p3led_kn, p4led_an, p4led_kn, pwm0, pwm1, sdmode, spis] 261 - 262 - - if: 263 - properties: 264 - function: 265 - const: wdt 266 - then: 267 - properties: 268 - groups: 269 - enum: [wdt] 270 566 271 567 - if: 272 568 properties: ··· 275 609 properties: 276 610 groups: 277 611 enum: [wled] 278 - 279 - - if: 280 - properties: 281 - function: 282 - const: wled_an 283 - then: 284 - properties: 285 - groups: 286 - enum: [wled_an] 287 - 288 - - if: 289 - properties: 290 - function: 291 - const: wled_kn 292 - then: 293 - properties: 294 - groups: 295 - enum: [wled_kn] 296 - 297 - - if: 298 - properties: 299 - function: 300 - const: "-" 301 - then: 302 - properties: 303 - groups: 304 - enum: [i2c, spi cs1, uart0] 305 612 306 613 allOf: 307 614 - $ref: pinctrl.yaml#
+450
Documentation/devicetree/bindings/pinctrl/mediatek,mt76x8-pinctrl.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/pinctrl/mediatek,mt76x8-pinctrl.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: MediaTek MT76X8 Pin Controller 8 + 9 + maintainers: 10 + - Arınç ÜNAL <arinc.unal@arinc9.com> 11 + - Sergio Paracuellos <sergio.paracuellos@gmail.com> 12 + 13 + description: | 14 + MediaTek MT76X8 pin controller for MT7628 and MT7688 SoCs. 15 + The pin controller can only set the muxing of pin groups. Muxing individual 16 + pins is not supported. There is no pinconf support. 17 + 18 + properties: 19 + compatible: 20 + const: ralink,mt76x8-pinctrl 21 + 22 + patternProperties: 23 + '-pins$': 24 + type: object 25 + additionalProperties: false 26 + 27 + patternProperties: 28 + '^(.*-)?pinmux$': 29 + type: object 30 + description: node for pinctrl. 31 + $ref: pinmux-node.yaml# 32 + additionalProperties: false 33 + 34 + properties: 35 + function: 36 + description: 37 + A string containing the name of the function to mux to the group. 38 + enum: [antenna, debug, gpio, i2c, i2s, jtag, p0led_an, p0led_kn, 39 + p1led_an, p1led_kn, p2led_an, p2led_kn, p3led_an, p3led_kn, 40 + p4led_an, p4led_kn, pcie, pcm, perst, pwm, pwm0, pwm1, 41 + pwm_uart2, refclk, rsvd, sdxc, sdxc d5 d4, sdxc d6, sdxc d7, 42 + spi, spi cs1, spis, sw_r, uart0, uart1, uart2, utif, wdt, 43 + wled_an, wled_kn, -] 44 + 45 + groups: 46 + description: 47 + An array of strings. Each string contains the name of a group. 48 + maxItems: 1 49 + 50 + required: 51 + - groups 52 + - function 53 + 54 + allOf: 55 + - if: 56 + properties: 57 + function: 58 + const: antenna 59 + then: 60 + properties: 61 + groups: 62 + enum: [i2s] 63 + 64 + - if: 65 + properties: 66 + function: 67 + const: debug 68 + then: 69 + properties: 70 + groups: 71 + enum: [i2c] 72 + 73 + - if: 74 + properties: 75 + function: 76 + const: gpio 77 + then: 78 + properties: 79 + groups: 80 + enum: [gpio, i2c, i2s, p0led_an, p0led_kn, p1led_an, p1led_kn, 81 + p2led_an, p2led_kn, p3led_an, p3led_kn, p4led_an, 82 + p4led_kn, perst, pwm0, pwm1, refclk, sdmode, spi, 83 + spi cs1, spis, uart0, uart1, uart2, wdt, wled_an, 84 + wled_kn] 85 + 86 + - if: 87 + properties: 88 + function: 89 + const: i2c 90 + then: 91 + properties: 92 + groups: 93 + enum: [i2c] 94 + 95 + - if: 96 + properties: 97 + function: 98 + const: i2s 99 + then: 100 + properties: 101 + groups: 102 + enum: [i2s] 103 + 104 + - if: 105 + properties: 106 + function: 107 + const: jtag 108 + then: 109 + properties: 110 + groups: 111 + enum: [p0led_an, p0led_kn, p1led_an, p1led_kn, p2led_an, 112 + p2led_kn, p3led_an, p3led_kn, p4led_an, p4led_kn, 113 + sdmode] 114 + 115 + - if: 116 + properties: 117 + function: 118 + const: p0led_an 119 + then: 120 + properties: 121 + groups: 122 + enum: [p0led_an] 123 + 124 + - if: 125 + properties: 126 + function: 127 + const: p0led_kn 128 + then: 129 + properties: 130 + groups: 131 + enum: [p0led_kn] 132 + 133 + - if: 134 + properties: 135 + function: 136 + const: p1led_an 137 + then: 138 + properties: 139 + groups: 140 + enum: [p1led_an] 141 + 142 + - if: 143 + properties: 144 + function: 145 + const: p1led_kn 146 + then: 147 + properties: 148 + groups: 149 + enum: [p1led_kn] 150 + 151 + - if: 152 + properties: 153 + function: 154 + const: p2led_an 155 + then: 156 + properties: 157 + groups: 158 + enum: [p2led_an] 159 + 160 + - if: 161 + properties: 162 + function: 163 + const: p2led_kn 164 + then: 165 + properties: 166 + groups: 167 + enum: [p2led_kn] 168 + 169 + - if: 170 + properties: 171 + function: 172 + const: p3led_an 173 + then: 174 + properties: 175 + groups: 176 + enum: [p3led_an] 177 + 178 + - if: 179 + properties: 180 + function: 181 + const: p3led_kn 182 + then: 183 + properties: 184 + groups: 185 + enum: [p3led_kn] 186 + 187 + - if: 188 + properties: 189 + function: 190 + const: p4led_an 191 + then: 192 + properties: 193 + groups: 194 + enum: [p4led_an] 195 + 196 + - if: 197 + properties: 198 + function: 199 + const: p4led_kn 200 + then: 201 + properties: 202 + groups: 203 + enum: [p4led_kn] 204 + 205 + - if: 206 + properties: 207 + function: 208 + const: pcie 209 + then: 210 + properties: 211 + groups: 212 + enum: [gpio] 213 + 214 + - if: 215 + properties: 216 + function: 217 + const: pcm 218 + then: 219 + properties: 220 + groups: 221 + enum: [i2s] 222 + 223 + - if: 224 + properties: 225 + function: 226 + const: perst 227 + then: 228 + properties: 229 + groups: 230 + enum: [perst] 231 + 232 + - if: 233 + properties: 234 + function: 235 + const: pwm 236 + then: 237 + properties: 238 + groups: 239 + enum: [uart1, uart2] 240 + 241 + - if: 242 + properties: 243 + function: 244 + const: pwm0 245 + then: 246 + properties: 247 + groups: 248 + enum: [pwm0] 249 + 250 + - if: 251 + properties: 252 + function: 253 + const: pwm1 254 + then: 255 + properties: 256 + groups: 257 + enum: [pwm1] 258 + 259 + - if: 260 + properties: 261 + function: 262 + const: pwm_uart2 263 + then: 264 + properties: 265 + groups: 266 + enum: [spis] 267 + 268 + - if: 269 + properties: 270 + function: 271 + const: refclk 272 + then: 273 + properties: 274 + groups: 275 + enum: [gpio, refclk, spi cs1] 276 + 277 + - if: 278 + properties: 279 + function: 280 + const: rsvd 281 + then: 282 + properties: 283 + groups: 284 + enum: [p0led_an, p0led_kn, wled_an, wled_kn] 285 + 286 + - if: 287 + properties: 288 + function: 289 + const: sdxc 290 + then: 291 + properties: 292 + groups: 293 + enum: [sdmode] 294 + 295 + - if: 296 + properties: 297 + function: 298 + const: sdxc d5 d4 299 + then: 300 + properties: 301 + groups: 302 + enum: [uart2] 303 + 304 + - if: 305 + properties: 306 + function: 307 + const: sdxc d6 308 + then: 309 + properties: 310 + groups: 311 + enum: [pwm1] 312 + 313 + - if: 314 + properties: 315 + function: 316 + const: sdxc d7 317 + then: 318 + properties: 319 + groups: 320 + enum: [pwm0] 321 + 322 + - if: 323 + properties: 324 + function: 325 + const: spi 326 + then: 327 + properties: 328 + groups: 329 + enum: [spi] 330 + 331 + - if: 332 + properties: 333 + function: 334 + const: spi cs1 335 + then: 336 + properties: 337 + groups: 338 + enum: [spi cs1] 339 + 340 + - if: 341 + properties: 342 + function: 343 + const: spis 344 + then: 345 + properties: 346 + groups: 347 + enum: [spis] 348 + 349 + - if: 350 + properties: 351 + function: 352 + const: sw_r 353 + then: 354 + properties: 355 + groups: 356 + enum: [uart1] 357 + 358 + - if: 359 + properties: 360 + function: 361 + const: uart0 362 + then: 363 + properties: 364 + groups: 365 + enum: [uart0] 366 + 367 + - if: 368 + properties: 369 + function: 370 + const: uart1 371 + then: 372 + properties: 373 + groups: 374 + enum: [uart1] 375 + 376 + - if: 377 + properties: 378 + function: 379 + const: uart2 380 + then: 381 + properties: 382 + groups: 383 + enum: [uart2] 384 + 385 + - if: 386 + properties: 387 + function: 388 + const: utif 389 + then: 390 + properties: 391 + groups: 392 + enum: [p1led_an, p1led_kn, p2led_an, p2led_kn, p3led_an, 393 + p3led_kn, p4led_an, p4led_kn, pwm0, pwm1, sdmode, spis] 394 + 395 + - if: 396 + properties: 397 + function: 398 + const: wdt 399 + then: 400 + properties: 401 + groups: 402 + enum: [wdt] 403 + 404 + - if: 405 + properties: 406 + function: 407 + const: wled_an 408 + then: 409 + properties: 410 + groups: 411 + enum: [wled_an] 412 + 413 + - if: 414 + properties: 415 + function: 416 + const: wled_kn 417 + then: 418 + properties: 419 + groups: 420 + enum: [wled_kn] 421 + 422 + - if: 423 + properties: 424 + function: 425 + const: "-" 426 + then: 427 + properties: 428 + groups: 429 + enum: [i2c, spi cs1, uart0] 430 + 431 + allOf: 432 + - $ref: pinctrl.yaml# 433 + 434 + required: 435 + - compatible 436 + 437 + additionalProperties: false 438 + 439 + examples: 440 + - | 441 + pinctrl { 442 + compatible = "ralink,mt76x8-pinctrl"; 443 + 444 + i2c_pins: i2c0-pins { 445 + pinmux { 446 + groups = "i2c"; 447 + function = "i2c"; 448 + }; 449 + }; 450 + };