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

Merge tag 'pinctrl-v6.1-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl

Pull pin control updates from Linus Walleij:
"There is nothing exciting going on, no core changes, just a few
drivers and cleanups.

New drivers:

- Cypress CY8C95x0 chip pin control support, along with an immediate
cleanup

- Mediatek MT8188 SoC pin control support

- Qualcomm SM8450 and SC8280XP LPASS (low power audio subsystem) pin
control support

- Qualcomm PM7250, PM8450

- Rockchip RV1126 SoC pin control support

Improvements:

- Fix some missing pins in the Armada 37xx driver

- Convert Broadcom and Nomadik drivers to use PINCTRL_PINGROUP()
macro

- Fix some GPIO irq_chips to be immutable

- Massive Qualcomm device tree binding cleanup, with more to come"

* tag 'pinctrl-v6.1-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: (119 commits)
MAINTAINERS: adjust STARFIVE JH7100 PINCTRL DRIVER after file movement
pinctrl: starfive: Rename "pinctrl-starfive" to "pinctrl-starfive-jh7100"
pinctrl: Create subdirectory for StarFive drivers
dt-bindings: pinctrl: st,stm32: Document interrupt-controller property
dt-bindings: pinctrl: st,stm32: Document gpio-hog pattern property
dt-bindings: pinctrl: st,stm32: Document gpio-line-names
pinctrl: st: stop abusing of_get_named_gpio()
pinctrl: wpcm450: Correct the fwnode_irq_get() return value check
pinctrl: bcm: Remove unused struct bcm6328_pingroup
pinctrl: qcom: restrict drivers per ARM/ARM64
pinctrl: bcm: ns: Remove redundant dev_err call
gpio: rockchip: request GPIO mux to pinctrl when setting direction
pinctrl: rockchip: add pinmux_ops.gpio_set_direction callback
pinctrl: cy8c95x0: Align function names in cy8c95x0_pmxops
pinctrl: cy8c95x0: Drop atomicity on operations on push_pull
pinctrl: cy8c95x0: Lock register accesses in cy8c95x0_set_mux()
pinctrl: sunxi: sun50i-h5: Switch to use dev_err_probe() helper
pinctrl: stm32: Switch to use dev_err_probe() helper
dt-bindings: qcom-pmic-gpio: Add PM7250B and PM8450 bindings
pinctrl: qcom: spmi-gpio: Add compatible for PM7250B
...

+9445 -1147
+6
Documentation/devicetree/bindings/pinctrl/aspeed,ast2400-pinctrl.yaml
··· 63 63 syscon: scu@1e6e2000 { 64 64 compatible = "aspeed,ast2400-scu", "syscon", "simple-mfd"; 65 65 reg = <0x1e6e2000 0x1a8>; 66 + #clock-cells = <1>; 67 + #reset-cells = <1>; 68 + 69 + #address-cells = <1>; 70 + #size-cells = <1>; 71 + ranges = <0x0 0x1e6e2000 0x1000>; 66 72 67 73 pinctrl: pinctrl { 68 74 compatible = "aspeed,ast2400-pinctrl";
+4
Documentation/devicetree/bindings/pinctrl/aspeed,ast2500-pinctrl.yaml
··· 82 82 #clock-cells = <1>; 83 83 #reset-cells = <1>; 84 84 85 + #address-cells = <1>; 86 + #size-cells = <1>; 87 + ranges = <0x0 0x1e6e2000 0x1000>; 88 + 85 89 pinctrl: pinctrl { 86 90 compatible = "aspeed,ast2500-pinctrl"; 87 91 aspeed,external-nodes = <&gfx>, <&lhc>;
+6
Documentation/devicetree/bindings/pinctrl/aspeed,ast2600-pinctrl.yaml
··· 96 96 syscon: scu@1e6e2000 { 97 97 compatible = "aspeed,ast2600-scu", "syscon", "simple-mfd"; 98 98 reg = <0x1e6e2000 0xf6c>; 99 + #clock-cells = <1>; 100 + #reset-cells = <1>; 101 + 102 + #address-cells = <1>; 103 + #size-cells = <1>; 104 + ranges = <0x0 0x1e6e2000 0x1000>; 99 105 100 106 pinctrl: pinctrl { 101 107 compatible = "aspeed,ast2600-pinctrl";
+1
Documentation/devicetree/bindings/pinctrl/brcm,bcm4908-pinctrl.yaml
··· 23 23 '-pins$': 24 24 type: object 25 25 $ref: pinmux-node.yaml# 26 + additionalProperties: false 26 27 27 28 properties: 28 29 function:
+134
Documentation/devicetree/bindings/pinctrl/cypress,cy8c95x0.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/cypress,cy8c95x0.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Cypress CY8C95X0 I2C GPIO expander 8 + 9 + maintainers: 10 + - Patrick Rudolph <patrick.rudolph@9elements.com> 11 + 12 + description: | 13 + This supports the 20/40/60 pin Cypress CYC95x0 GPIO I2C expanders. 14 + Pin function configuration is performed on a per-pin basis. 15 + 16 + properties: 17 + compatible: 18 + enum: 19 + - cypress,cy8c9520 20 + - cypress,cy8c9540 21 + - cypress,cy8c9560 22 + 23 + reg: 24 + maxItems: 1 25 + 26 + gpio-controller: true 27 + 28 + '#gpio-cells': 29 + description: 30 + The first cell is the GPIO number and the second cell specifies GPIO 31 + flags, as defined in <dt-bindings/gpio/gpio.h>. 32 + const: 2 33 + 34 + interrupts: 35 + maxItems: 1 36 + 37 + interrupt-controller: true 38 + 39 + '#interrupt-cells': 40 + const: 2 41 + 42 + gpio-line-names: true 43 + 44 + gpio-ranges: 45 + maxItems: 1 46 + 47 + gpio-reserved-ranges: 48 + maxItems: 1 49 + 50 + vdd-supply: 51 + description: 52 + Optional power supply. 53 + 54 + patternProperties: 55 + '-pins$': 56 + type: object 57 + description: 58 + Pinctrl node's client devices use subnodes for desired pin configuration. 59 + Client device subnodes use below standard properties. 60 + $ref: pincfg-node.yaml# 61 + 62 + properties: 63 + pins: 64 + description: 65 + List of gpio pins affected by the properties specified in this 66 + subnode. 67 + items: 68 + pattern: '^gp([0-7][0-7])$' 69 + minItems: 1 70 + maxItems: 60 71 + 72 + function: 73 + description: 74 + Specify the alternative function to be configured for the specified 75 + pins. 76 + enum: [ gpio, pwm ] 77 + 78 + bias-pull-down: true 79 + 80 + bias-pull-up: true 81 + 82 + bias-disable: true 83 + 84 + output-high: true 85 + 86 + output-low: true 87 + 88 + drive-push-pull: true 89 + 90 + drive-open-drain: true 91 + 92 + drive-open-source: true 93 + 94 + required: 95 + - pins 96 + - function 97 + 98 + additionalProperties: false 99 + 100 + required: 101 + - compatible 102 + - reg 103 + - interrupts 104 + - interrupt-controller 105 + - '#interrupt-cells' 106 + - gpio-controller 107 + - '#gpio-cells' 108 + 109 + additionalProperties: false 110 + 111 + allOf: 112 + - $ref: "pinctrl.yaml#" 113 + 114 + examples: 115 + - | 116 + #include <dt-bindings/interrupt-controller/arm-gic.h> 117 + #include <dt-bindings/interrupt-controller/irq.h> 118 + 119 + i2c { 120 + #address-cells = <1>; 121 + #size-cells = <0>; 122 + 123 + pinctrl@20 { 124 + compatible = "cypress,cy8c9520"; 125 + reg = <0x20>; 126 + gpio-controller; 127 + #gpio-cells = <2>; 128 + #interrupt-cells = <2>; 129 + interrupts = <GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH>; 130 + interrupt-controller; 131 + vdd-supply = <&p3v3>; 132 + gpio-reserved-ranges = <5 1>; 133 + }; 134 + };
+1
Documentation/devicetree/bindings/pinctrl/intel,pinctrl-keembay.yaml
··· 44 44 patternProperties: 45 45 '^gpio@[0-9a-f]*$': 46 46 type: object 47 + additionalProperties: false 47 48 48 49 description: 49 50 Child nodes can be specified to contain pin configuration information,
+1
Documentation/devicetree/bindings/pinctrl/intel,pinctrl-thunderbay.yaml
··· 42 42 patternProperties: 43 43 '^gpio@[0-9a-f]*$': 44 44 type: object 45 + additionalProperties: false 45 46 46 47 description: 47 48 Child nodes can be specified to contain pin configuration information,
+1
Documentation/devicetree/bindings/pinctrl/marvell,ac5-pinctrl.yaml
··· 24 24 '-pins$': 25 25 type: object 26 26 $ref: pinmux-node.yaml# 27 + additionalProperties: false 27 28 28 29 properties: 29 30 marvell,function:
+2
Documentation/devicetree/bindings/pinctrl/mediatek,mt6779-pinctrl.yaml
··· 76 76 patternProperties: 77 77 '-[0-9]*$': 78 78 type: object 79 + additionalProperties: false 80 + 79 81 patternProperties: 80 82 '-pins*$': 81 83 type: object
+28 -20
Documentation/devicetree/bindings/pinctrl/mediatek,mt7986-pinctrl.yaml
··· 117 117 "i2s" "audio" 62, 63, 64, 65 118 118 "switch_int" "eth" 66 119 119 "mdc_mdio" "eth" 67 120 + "wf_2g" "wifi" 74, 75, 76, 77, 78, 79, 80, 81, 82, 83 121 + "wf_5g" "wifi" 91, 92, 93, 94, 95, 96, 97, 98, 99, 100 122 + "wf_dbdc" "wifi" 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 123 + 84, 85 120 124 121 125 $ref: "/schemas/pinctrl/pinmux-node.yaml" 122 126 properties: ··· 238 234 then: 239 235 properties: 240 236 groups: 241 - enum: [wf_2g, wf_5g, wf_dbdc] 237 + items: 238 + enum: [wf_2g, wf_5g, wf_dbdc] 239 + maxItems: 3 242 240 '.*conf.*': 243 241 type: object 244 242 additionalProperties: false ··· 254 248 An array of strings. Each string contains the name of a pin. 255 249 There is no PIN 41 to PIN 65 above on mt7686b, you can only use 256 250 those pins on mt7986a. 257 - enum: [SYS_WATCHDOG, WF2G_LED, WF5G_LED, I2C_SCL, I2C_SDA, GPIO_0, 258 - GPIO_1, GPIO_2, GPIO_3, GPIO_4, GPIO_5, GPIO_6, GPIO_7, 259 - GPIO_8, GPIO_9, GPIO_10, GPIO_11, GPIO_12, GPIO_13, GPIO_14, 260 - GPIO_15, PWM0, PWM1, SPI0_CLK, SPI0_MOSI, SPI0_MISO, SPI0_CS, 261 - SPI0_HOLD, SPI0_WP, SPI1_CLK, SPI1_MOSI, SPI1_MISO, SPI1_CS, 262 - SPI2_CLK, SPI2_MOSI, SPI2_MISO, SPI2_CS, SPI2_HOLD, SPI2_WP, 263 - UART0_RXD, UART0_TXD, PCIE_PERESET_N, UART1_RXD, UART1_TXD, 264 - UART1_CTS, UART1_RTS, UART2_RXD, UART2_TXD, UART2_CTS, 265 - UART2_RTS, EMMC_DATA_0, EMMC_DATA_1, EMMC_DATA_2, 266 - EMMC_DATA_3, EMMC_DATA_4, EMMC_DATA_5, EMMC_DATA_6, 267 - EMMC_DATA_7, EMMC_CMD, EMMC_CK, EMMC_DSL, EMMC_RSTB, PCM_DTX, 268 - PCM_DRX, PCM_CLK, PCM_FS, MT7531_INT, SMI_MDC, SMI_MDIO, 269 - WF0_DIG_RESETB, WF0_CBA_RESETB, WF0_XO_REQ, WF0_TOP_CLK, 270 - WF0_TOP_DATA, WF0_HB1, WF0_HB2, WF0_HB3, WF0_HB4, WF0_HB0, 271 - WF0_HB0_B, WF0_HB5, WF0_HB6, WF0_HB7, WF0_HB8, WF0_HB9, 272 - WF0_HB10, WF1_DIG_RESETB, WF1_CBA_RESETB, WF1_XO_REQ, 273 - WF1_TOP_CLK, WF1_TOP_DATA, WF1_HB1, WF1_HB2, WF1_HB3, 274 - WF1_HB4, WF1_HB0, WF1_HB0_B, WF1_HB5, WF1_HB6, WF1_HB7, 275 - WF1_HB8] 251 + items: 252 + enum: [SYS_WATCHDOG, WF2G_LED, WF5G_LED, I2C_SCL, I2C_SDA, GPIO_0, 253 + GPIO_1, GPIO_2, GPIO_3, GPIO_4, GPIO_5, GPIO_6, GPIO_7, 254 + GPIO_8, GPIO_9, GPIO_10, GPIO_11, GPIO_12, GPIO_13, GPIO_14, 255 + GPIO_15, PWM0, PWM1, SPI0_CLK, SPI0_MOSI, SPI0_MISO, SPI0_CS, 256 + SPI0_HOLD, SPI0_WP, SPI1_CLK, SPI1_MOSI, SPI1_MISO, SPI1_CS, 257 + SPI2_CLK, SPI2_MOSI, SPI2_MISO, SPI2_CS, SPI2_HOLD, SPI2_WP, 258 + UART0_RXD, UART0_TXD, PCIE_PERESET_N, UART1_RXD, UART1_TXD, 259 + UART1_CTS, UART1_RTS, UART2_RXD, UART2_TXD, UART2_CTS, 260 + UART2_RTS, EMMC_DATA_0, EMMC_DATA_1, EMMC_DATA_2, 261 + EMMC_DATA_3, EMMC_DATA_4, EMMC_DATA_5, EMMC_DATA_6, 262 + EMMC_DATA_7, EMMC_CMD, EMMC_CK, EMMC_DSL, EMMC_RSTB, PCM_DTX, 263 + PCM_DRX, PCM_CLK, PCM_FS, MT7531_INT, SMI_MDC, SMI_MDIO, 264 + WF0_DIG_RESETB, WF0_CBA_RESETB, WF0_XO_REQ, WF0_TOP_CLK, 265 + WF0_TOP_DATA, WF0_HB1, WF0_HB2, WF0_HB3, WF0_HB4, WF0_HB0, 266 + WF0_HB0_B, WF0_HB5, WF0_HB6, WF0_HB7, WF0_HB8, WF0_HB9, 267 + WF0_HB10, WF1_DIG_RESETB, WF1_CBA_RESETB, WF1_XO_REQ, 268 + WF1_TOP_CLK, WF1_TOP_DATA, WF1_HB1, WF1_HB2, WF1_HB3, 269 + WF1_HB4, WF1_HB0, WF1_HB0_B, WF1_HB5, WF1_HB6, WF1_HB7, 270 + WF1_HB8] 271 + maxItems: 101 276 272 277 273 bias-disable: true 278 274
+226
Documentation/devicetree/bindings/pinctrl/mediatek,mt8188-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,mt8188-pinctrl.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: MediaTek MT8188 Pin Controller 8 + 9 + maintainers: 10 + - Hui Liu <hui.liu@mediatek.com> 11 + 12 + description: | 13 + The MediaTek's MT8188 Pin controller is used to control SoC pins. 14 + 15 + properties: 16 + compatible: 17 + const: mediatek,mt8188-pinctrl 18 + 19 + gpio-controller: true 20 + 21 + '#gpio-cells': 22 + description: | 23 + Number of cells in GPIO specifier, should be two. The first cell 24 + is the pin number, the second cell is used to specify optional 25 + parameters which are defined in <dt-bindings/gpio/gpio.h>. 26 + const: 2 27 + 28 + gpio-ranges: 29 + maxItems: 1 30 + 31 + gpio-line-names: true 32 + 33 + reg: 34 + items: 35 + - description: gpio registers base address 36 + - description: rm group io configuration registers base address 37 + - description: lt group io configuration registers base address 38 + - description: lm group io configuration registers base address 39 + - description: rt group io configuration registers base address 40 + - description: eint registers base address 41 + 42 + reg-names: 43 + items: 44 + - const: iocfg0 45 + - const: iocfg_rm 46 + - const: iocfg_lt 47 + - const: iocfg_lm 48 + - const: iocfg_rt 49 + - const: eint 50 + 51 + interrupt-controller: true 52 + 53 + '#interrupt-cells': 54 + const: 2 55 + 56 + interrupts: 57 + description: The interrupt outputs to sysirq. 58 + maxItems: 1 59 + 60 + mediatek,rsel-resistance-in-si-unit: 61 + type: boolean 62 + description: | 63 + We provide two methods to select the resistance for I2C when pull up or pull down. 64 + The first is by RSEL definition value, another one is by resistance value(ohm). 65 + This flag is used to identify if the method is resistance(si unit) value. 66 + 67 + # PIN CONFIGURATION NODES 68 + patternProperties: 69 + '-pins$': 70 + type: object 71 + additionalProperties: false 72 + 73 + patternProperties: 74 + '^pins': 75 + type: object 76 + $ref: "/schemas/pinctrl/pincfg-node.yaml" 77 + additionalProperties: false 78 + description: | 79 + A pinctrl node should contain at least one subnode representing the 80 + pinctrl groups available on the machine. Each subnode will list the 81 + pins it needs, and how they should be configured, with regard to muxer 82 + configuration, pullups, drive strength, input enable/disable and 83 + input schmitt. 84 + 85 + properties: 86 + pinmux: 87 + description: | 88 + Integer array, represents gpio pin number and mux setting. 89 + Supported pin number and mux varies for different SoCs, and are 90 + defined as macros in dt-bindings/pinctrl/mediatek,<soc>-pinfunc.h 91 + directly. 92 + 93 + drive-strength: 94 + enum: [2, 4, 6, 8, 10, 12, 14, 16] 95 + 96 + drive-strength-microamp: 97 + enum: [125, 250, 500, 1000] 98 + 99 + bias-pull-down: 100 + oneOf: 101 + - type: boolean 102 + - enum: [100, 101, 102, 103] 103 + description: mt8188 pull down PUPD/R0/R1 type define value. 104 + - enum: [200, 201, 202, 203, 204, 205, 206, 207] 105 + description: mt8188 pull down RSEL type define value. 106 + - enum: [75000, 5000] 107 + description: mt8188 pull down RSEL type si unit value(ohm). 108 + description: | 109 + For pull down type is normal, it doesn't need add RSEL & R1R0 define 110 + and resistance value. 111 + For pull down type is PUPD/R0/R1 type, it can add R1R0 define to 112 + set different resistance. It can support "MTK_PUPD_SET_R1R0_00" & 113 + "MTK_PUPD_SET_R1R0_01" & "MTK_PUPD_SET_R1R0_10" & "MTK_PUPD_SET_R1R0_11" 114 + define in mt8188. 115 + For pull down type is RSEL, it can add RSEL define & resistance value(ohm) 116 + to set different resistance by identifying property "mediatek,rsel-resistance-in-si-unit". 117 + It can support "MTK_PULL_SET_RSEL_000" & "MTK_PULL_SET_RSEL_001" 118 + & "MTK_PULL_SET_RSEL_010" & "MTK_PULL_SET_RSEL_011" & "MTK_PULL_SET_RSEL_100" 119 + & "MTK_PULL_SET_RSEL_101" & "MTK_PULL_SET_RSEL_110" & "MTK_PULL_SET_RSEL_111" 120 + define in mt8188. It can also support resistance value(ohm) "75000" & "5000" in mt8188. 121 + 122 + bias-pull-up: 123 + oneOf: 124 + - type: boolean 125 + - enum: [100, 101, 102, 103] 126 + description: mt8188 pull up PUPD/R0/R1 type define value. 127 + - enum: [200, 201, 202, 203, 204, 205, 206, 207] 128 + description: mt8188 pull up RSEL type define value. 129 + - enum: [1000, 1500, 2000, 3000, 4000, 5000, 10000, 75000] 130 + description: mt8188 pull up RSEL type si unit value(ohm). 131 + description: | 132 + For pull up type is normal, it don't need add RSEL & R1R0 define 133 + and resistance value. 134 + For pull up type is PUPD/R0/R1 type, it can add R1R0 define to 135 + set different resistance. It can support "MTK_PUPD_SET_R1R0_00" & 136 + "MTK_PUPD_SET_R1R0_01" & "MTK_PUPD_SET_R1R0_10" & "MTK_PUPD_SET_R1R0_11" 137 + define in mt8188. 138 + For pull up type is RSEL, it can add RSEL define & resistance value(ohm) 139 + to set different resistance by identifying property "mediatek,rsel-resistance-in-si-unit". 140 + It can support "MTK_PULL_SET_RSEL_000" & "MTK_PULL_SET_RSEL_001" 141 + & "MTK_PULL_SET_RSEL_010" & "MTK_PULL_SET_RSEL_011" & "MTK_PULL_SET_RSEL_100" 142 + & "MTK_PULL_SET_RSEL_101" & "MTK_PULL_SET_RSEL_110" & "MTK_PULL_SET_RSEL_111" 143 + define in mt8188. It can also support resistance value(ohm) 144 + "1000" & "1500" & "2000" & "3000" & "4000" & "5000" & "10000" & "75000" in mt8188. 145 + 146 + bias-disable: true 147 + 148 + output-high: true 149 + 150 + output-low: true 151 + 152 + input-enable: true 153 + 154 + input-disable: true 155 + 156 + input-schmitt-enable: true 157 + 158 + input-schmitt-disable: true 159 + 160 + required: 161 + - pinmux 162 + 163 + required: 164 + - compatible 165 + - reg 166 + - interrupts 167 + - interrupt-controller 168 + - '#interrupt-cells' 169 + - gpio-controller 170 + - '#gpio-cells' 171 + - gpio-ranges 172 + 173 + additionalProperties: false 174 + 175 + examples: 176 + - | 177 + #include <dt-bindings/pinctrl/mediatek,mt8188-pinfunc.h> 178 + #include <dt-bindings/interrupt-controller/arm-gic.h> 179 + 180 + pio: pinctrl@10005000 { 181 + compatible = "mediatek,mt8188-pinctrl"; 182 + reg = <0x10005000 0x1000>, 183 + <0x11c00000 0x1000>, 184 + <0x11e10000 0x1000>, 185 + <0x11e20000 0x1000>, 186 + <0x11ea0000 0x1000>, 187 + <0x1000b000 0x1000>; 188 + reg-names = "iocfg0", "iocfg_rm", 189 + "iocfg_lt", "iocfg_lm", "iocfg_rt", 190 + "eint"; 191 + gpio-controller; 192 + #gpio-cells = <2>; 193 + gpio-ranges = <&pio 0 0 176>; 194 + interrupt-controller; 195 + interrupts = <GIC_SPI 225 IRQ_TYPE_LEVEL_HIGH 0>; 196 + #interrupt-cells = <2>; 197 + 198 + pio-pins { 199 + pins { 200 + pinmux = <PINMUX_GPIO0__FUNC_B_GPIO0>; 201 + output-low; 202 + }; 203 + }; 204 + 205 + spi0-pins { 206 + pins-spi { 207 + pinmux = <PINMUX_GPIO75__FUNC_O_SPIM1_CSB>, 208 + <PINMUX_GPIO76__FUNC_O_SPIM1_CLK>, 209 + <PINMUX_GPIO77__FUNC_B0_SPIM1_MOSI>; 210 + drive-strength = <6>; 211 + }; 212 + pins-spi-mi { 213 + pinmux = <PINMUX_GPIO78__FUNC_B0_SPIM1_MISO>; 214 + bias-pull-down = <MTK_PUPD_SET_R1R0_10>; 215 + }; 216 + }; 217 + 218 + i2c0-pins { 219 + pins { 220 + pinmux = <PINMUX_GPIO55__FUNC_B1_SCL0>, 221 + <PINMUX_GPIO56__FUNC_B1_SDA0>; 222 + bias-disable; 223 + drive-strength-microamp = <1000>; 224 + }; 225 + }; 226 + };
+1
Documentation/devicetree/bindings/pinctrl/nuvoton,wpcm450-pinctrl.yaml
··· 30 30 31 31 "^gpio@[0-7]$": 32 32 type: object 33 + additionalProperties: false 33 34 34 35 description: 35 36 Eight GPIO banks (gpio@0 to gpio@7), that each contain between 14 and 18
+7 -7
Documentation/devicetree/bindings/pinctrl/pinctrl-mt8186.yaml
··· 41 41 Gpio base register names. 42 42 items: 43 43 - const: iocfg0 44 - - const: iocfg_bm 45 - - const: iocfg_bl 46 - - const: iocfg_br 44 + - const: iocfg_lt 47 45 - const: iocfg_lm 46 + - const: iocfg_lb 47 + - const: iocfg_bl 48 48 - const: iocfg_rb 49 - - const: iocfg_tl 49 + - const: iocfg_rt 50 50 - const: eint 51 51 52 52 interrupt-controller: true ··· 235 235 <0x10002A00 0x0200>, 236 236 <0x10002c00 0x0200>, 237 237 <0x1000b000 0x1000>; 238 - reg-names = "iocfg0", "iocfg_bm", "iocfg_bl", 239 - "iocfg_br", "iocfg_lm", "iocfg_rb", 240 - "iocfg_tl", "eint"; 238 + reg-names = "iocfg0", "iocfg_lt", "iocfg_lm", 239 + "iocfg_lb", "iocfg_bl", "iocfg_rb", 240 + "iocfg_rt", "eint"; 241 241 gpio-controller; 242 242 #gpio-cells = <2>; 243 243 gpio-ranges = <&pio 0 0 185>;
+4
Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.yaml
··· 24 24 - qcom,pm6150-gpio 25 25 - qcom,pm6150l-gpio 26 26 - qcom,pm6350-gpio 27 + - qcom,pm7250b-gpio 27 28 - qcom,pm7325-gpio 28 29 - qcom,pm8005-gpio 29 30 - qcom,pm8008-gpio ··· 232 231 enum: 233 232 - qcom,pm660l-gpio 234 233 - qcom,pm6150l-gpio 234 + - qcom,pm7250b-gpio 235 235 - qcom,pm8038-gpio 236 236 - qcom,pm8150b-gpio 237 237 - qcom,pm8150l-gpio ··· 394 392 - gpio1-gpio10 for pm6150 395 393 - gpio1-gpio12 for pm6150l 396 394 - gpio1-gpio9 for pm6350 395 + - gpio1-gpio12 for pm7250b 397 396 - gpio1-gpio10 for pm7325 398 397 - gpio1-gpio4 for pm8005 399 398 - gpio1-gpio2 for pm8008 ··· 410 407 - gpio1-gpio10 for pm8350 411 408 - gpio1-gpio8 for pm8350b 412 409 - gpio1-gpio9 for pm8350c 410 + - gpio1-gpio4 for pm8450 413 411 - gpio1-gpio38 for pm8917 414 412 - gpio1-gpio44 for pm8921 415 413 - gpio1-gpio36 for pm8941
+32 -21
Documentation/devicetree/bindings/pinctrl/qcom,sc7280-pinctrl.yaml
··· 42 42 gpio-ranges: 43 43 maxItems: 1 44 44 45 + gpio-line-names: 46 + maxItems: 174 47 + 45 48 wakeup-parent: true 46 49 47 50 #PIN CONFIGURATION NODES ··· 54 51 description: 55 52 Pinctrl node's client devices use subnodes for desired pin configuration. 56 53 Client device subnodes use below standard properties. 57 - $ref: "/schemas/pinctrl/pincfg-node.yaml" 58 54 59 55 properties: 60 56 pins: ··· 62 60 subnode. 63 61 items: 64 62 oneOf: 65 - - pattern: "^gpio([0-9]|[1-9][0-9]|1[0-7][0-4])$" 63 + - pattern: "^gpio([0-9]|[1-9][0-9]|1[0-7][0-9]|18[0-2])$" 66 64 - enum: [ sdc1_rclk, sdc1_clk, sdc1_cmd, sdc1_data, sdc2_clk, 67 65 sdc2_cmd, sdc2_data, ufs_reset ] 68 66 minItems: 1 ··· 120 118 121 119 required: 122 120 - pins 123 - - function 121 + 122 + allOf: 123 + - $ref: /schemas/pinctrl/pincfg-node.yaml 124 + - if: 125 + properties: 126 + pins: 127 + pattern: "^gpio([0-9]|[1-9][0-9]|1[0-7][0-9]|18[0-2])$" 128 + then: 129 + required: 130 + - function 124 131 125 132 additionalProperties: false 126 133 127 134 allOf: 128 - - $ref: "pinctrl.yaml#" 135 + - $ref: /schemas/pinctrl/qcom,tlmm-common.yaml# 129 136 130 137 required: 131 138 - compatible ··· 150 139 151 140 examples: 152 141 - | 153 - #include <dt-bindings/interrupt-controller/arm-gic.h> 154 - tlmm: pinctrl@f000000 { 155 - compatible = "qcom,sc7280-pinctrl"; 156 - reg = <0xf000000 0x1000000>; 157 - interrupts = <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>; 158 - gpio-controller; 159 - #gpio-cells = <2>; 160 - interrupt-controller; 161 - #interrupt-cells = <2>; 162 - gpio-ranges = <&tlmm 0 0 175>; 163 - wakeup-parent = <&pdc>; 142 + #include <dt-bindings/interrupt-controller/arm-gic.h> 143 + tlmm: pinctrl@f000000 { 144 + compatible = "qcom,sc7280-pinctrl"; 145 + reg = <0xf000000 0x1000000>; 146 + interrupts = <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>; 147 + gpio-controller; 148 + #gpio-cells = <2>; 149 + interrupt-controller; 150 + #interrupt-cells = <2>; 151 + gpio-ranges = <&tlmm 0 0 175>; 152 + wakeup-parent = <&pdc>; 164 153 165 - qup_uart5_default: qup-uart5-pins { 166 - pins = "gpio46", "gpio47"; 167 - function = "qup13"; 168 - drive-strength = <2>; 169 - bias-disable; 170 - }; 154 + qup_uart5_default: qup-uart5-pins { 155 + pins = "gpio46", "gpio47"; 156 + function = "qup13"; 157 + drive-strength = <2>; 158 + bias-disable; 171 159 }; 160 + };
+43 -34
Documentation/devicetree/bindings/pinctrl/qcom,sc8180x-pinctrl.yaml
··· 51 51 oneOf: 52 52 - $ref: "#/$defs/qcom-sc8180x-tlmm-state" 53 53 - patternProperties: 54 - ".*": 54 + "-pins$": 55 55 $ref: "#/$defs/qcom-sc8180x-tlmm-state" 56 + additionalProperties: false 56 57 57 58 '$defs': 58 59 qcom-sc8180x-tlmm-state: ··· 61 60 description: 62 61 Pinctrl node's client devices use subnodes for desired pin configuration. 63 62 Client device subnodes use below standard properties. 64 - $ref: "qcom,tlmm-common.yaml#/$defs/qcom-tlmm-state" 65 63 66 64 properties: 67 65 pins: ··· 111 111 112 112 required: 113 113 - pins 114 - - function 114 + 115 + allOf: 116 + - $ref: "qcom,tlmm-common.yaml#/$defs/qcom-tlmm-state" 117 + - if: 118 + properties: 119 + pins: 120 + pattern: "^gpio([0-9]|[1-9][0-9]|1[0-8][0-9])$" 121 + then: 122 + required: 123 + - function 115 124 116 125 additionalProperties: false 117 126 118 127 examples: 119 128 - | 120 - #include <dt-bindings/interrupt-controller/arm-gic.h> 121 - pinctrl@3100000 { 122 - compatible = "qcom,sc8180x-tlmm"; 123 - reg = <0x03100000 0x300000>, 124 - <0x03500000 0x700000>, 125 - <0x03d00000 0x300000>; 126 - reg-names = "west", "east", "south"; 127 - interrupts = <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>; 128 - gpio-controller; 129 - #gpio-cells = <2>; 130 - interrupt-controller; 131 - #interrupt-cells = <2>; 132 - gpio-ranges = <&tlmm 0 0 190>; 129 + #include <dt-bindings/interrupt-controller/arm-gic.h> 130 + pinctrl@3100000 { 131 + compatible = "qcom,sc8180x-tlmm"; 132 + reg = <0x03100000 0x300000>, 133 + <0x03500000 0x700000>, 134 + <0x03d00000 0x300000>; 135 + reg-names = "west", "east", "south"; 136 + interrupts = <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>; 137 + gpio-controller; 138 + #gpio-cells = <2>; 139 + interrupt-controller; 140 + #interrupt-cells = <2>; 141 + gpio-ranges = <&tlmm 0 0 190>; 133 142 134 - gpio-wo-subnode-state { 135 - pins = "gpio1"; 136 - function = "gpio"; 137 - }; 138 - 139 - uart-w-subnodes-state { 140 - rx { 141 - pins = "gpio4"; 142 - function = "qup6"; 143 - bias-pull-up; 144 - }; 145 - 146 - tx { 147 - pins = "gpio5"; 148 - function = "qup6"; 149 - bias-disable; 150 - }; 151 - }; 143 + gpio-wo-subnode-state { 144 + pins = "gpio1"; 145 + function = "gpio"; 152 146 }; 147 + 148 + uart-w-subnodes-state { 149 + rx-pins { 150 + pins = "gpio4"; 151 + function = "qup6"; 152 + bias-pull-up; 153 + }; 154 + 155 + tx-pins { 156 + pins = "gpio5"; 157 + function = "qup6"; 158 + bias-disable; 159 + }; 160 + }; 161 + }; 153 162 ...
+133
Documentation/devicetree/bindings/pinctrl/qcom,sc8280xp-lpass-lpi-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/qcom,sc8280xp-lpass-lpi-pinctrl.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Qualcomm Technologies, Inc. Low Power Audio SubSystem (LPASS) 8 + Low Power Island (LPI) TLMM block 9 + 10 + maintainers: 11 + - Srinivas Kandagatla <srinivas.kandagatla@linaro.org> 12 + 13 + description: | 14 + This binding describes the Top Level Mode Multiplexer block found in the 15 + LPASS LPI IP on most Qualcomm SoCs 16 + 17 + properties: 18 + compatible: 19 + const: qcom,sc8280xp-lpass-lpi-pinctrl 20 + 21 + reg: 22 + items: 23 + - description: LPASS LPI TLMM Control and Status registers 24 + - description: LPASS LPI pins SLEW registers 25 + 26 + clocks: 27 + items: 28 + - description: LPASS Core voting clock 29 + - description: LPASS Audio voting clock 30 + 31 + clock-names: 32 + items: 33 + - const: core 34 + - const: audio 35 + 36 + gpio-controller: true 37 + 38 + '#gpio-cells': 39 + description: Specifying the pin number and flags, as defined in 40 + include/dt-bindings/gpio/gpio.h 41 + const: 2 42 + 43 + gpio-ranges: 44 + maxItems: 1 45 + 46 + #PIN CONFIGURATION NODES 47 + patternProperties: 48 + '-pins$': 49 + type: object 50 + description: 51 + Pinctrl node's client devices use subnodes for desired pin configuration. 52 + Client device subnodes use below standard properties. 53 + $ref: /schemas/pinctrl/pincfg-node.yaml 54 + 55 + properties: 56 + pins: 57 + description: 58 + List of gpio pins affected by the properties specified in this 59 + subnode. 60 + items: 61 + pattern: "^gpio([0-1]|1[0-8]])$" 62 + 63 + function: 64 + enum: [ swr_tx_clk, swr_tx_data, swr_rx_clk, swr_rx_data, 65 + dmic1_clk, dmic1_data, dmic2_clk, dmic2_data, dmic4_clk, 66 + dmic4_data, i2s2_clk, i2s2_ws, dmic3_clk, dmic3_data, 67 + qua_mi2s_sclk, qua_mi2s_ws, qua_mi2s_data, i2s1_clk, i2s1_ws, 68 + i2s1_data, wsa_swr_clk, wsa_swr_data, wsa2_swr_clk, 69 + wsa2_swr_data, i2s2_data, i2s3_clk, i2s3_ws, i2s3_data, 70 + ext_mclk1_c, ext_mclk1_b, ext_mclk1_a ] 71 + description: 72 + Specify the alternative function to be configured for the specified 73 + pins. 74 + 75 + drive-strength: 76 + enum: [2, 4, 6, 8, 10, 12, 14, 16] 77 + default: 2 78 + description: 79 + Selects the drive strength for the specified pins, in mA. 80 + 81 + slew-rate: 82 + enum: [0, 1, 2, 3] 83 + default: 0 84 + description: | 85 + 0: No adjustments 86 + 1: Higher Slew rate (faster edges) 87 + 2: Lower Slew rate (slower edges) 88 + 3: Reserved (No adjustments) 89 + 90 + bias-pull-down: true 91 + 92 + bias-pull-up: true 93 + 94 + bias-disable: true 95 + 96 + output-high: true 97 + 98 + output-low: true 99 + 100 + required: 101 + - pins 102 + - function 103 + 104 + additionalProperties: false 105 + 106 + allOf: 107 + - $ref: pinctrl.yaml# 108 + 109 + required: 110 + - compatible 111 + - reg 112 + - clocks 113 + - clock-names 114 + - gpio-controller 115 + - '#gpio-cells' 116 + - gpio-ranges 117 + 118 + additionalProperties: false 119 + 120 + examples: 121 + - | 122 + #include <dt-bindings/sound/qcom,q6afe.h> 123 + pinctrl@33c0000 { 124 + compatible = "qcom,sc8280xp-lpass-lpi-pinctrl"; 125 + reg = <0x33c0000 0x20000>, 126 + <0x3550000 0x10000>; 127 + clocks = <&q6afecc LPASS_HW_MACRO_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>, 128 + <&q6afecc LPASS_HW_DCODEC_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>; 129 + clock-names = "core", "audio"; 130 + gpio-controller; 131 + #gpio-cells = <2>; 132 + gpio-ranges = <&lpi_tlmm 0 0 18>; 133 + };
+40 -31
Documentation/devicetree/bindings/pinctrl/qcom,sc8280xp-pinctrl.yaml
··· 43 43 oneOf: 44 44 - $ref: "#/$defs/qcom-sc8280xp-tlmm-state" 45 45 - patternProperties: 46 - ".*": 46 + "-pins$": 47 47 $ref: "#/$defs/qcom-sc8280xp-tlmm-state" 48 + additionalProperties: false 48 49 49 50 '$defs': 50 51 qcom-sc8280xp-tlmm-state: ··· 53 52 description: 54 53 Pinctrl node's client devices use subnodes for desired pin configuration. 55 54 Client device subnodes use below standard properties. 56 - $ref: "qcom,tlmm-common.yaml#/$defs/qcom-tlmm-state" 57 55 58 56 properties: 59 57 pins: ··· 112 112 113 113 required: 114 114 - pins 115 - - function 115 + 116 + allOf: 117 + - $ref: "qcom,tlmm-common.yaml#/$defs/qcom-tlmm-state" 118 + - if: 119 + properties: 120 + pins: 121 + pattern: "^gpio([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-1][0-9]|22[0-7])$" 122 + then: 123 + required: 124 + - function 116 125 117 126 additionalProperties: false 118 127 119 128 examples: 120 129 - | 121 - #include <dt-bindings/interrupt-controller/arm-gic.h> 122 - pinctrl@f100000 { 123 - compatible = "qcom,sc8280xp-tlmm"; 124 - reg = <0x0f100000 0x300000>; 125 - interrupts = <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>; 126 - gpio-controller; 127 - #gpio-cells = <2>; 128 - interrupt-controller; 129 - #interrupt-cells = <2>; 130 - gpio-ranges = <&tlmm 0 0 230>; 130 + #include <dt-bindings/interrupt-controller/arm-gic.h> 131 + pinctrl@f100000 { 132 + compatible = "qcom,sc8280xp-tlmm"; 133 + reg = <0x0f100000 0x300000>; 134 + interrupts = <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>; 135 + gpio-controller; 136 + #gpio-cells = <2>; 137 + interrupt-controller; 138 + #interrupt-cells = <2>; 139 + gpio-ranges = <&tlmm 0 0 230>; 131 140 132 - gpio-wo-subnode-state { 133 - pins = "gpio1"; 134 - function = "gpio"; 135 - }; 136 - 137 - uart-w-subnodes-state { 138 - rx { 139 - pins = "gpio4"; 140 - function = "qup14"; 141 - bias-pull-up; 142 - }; 143 - 144 - tx { 145 - pins = "gpio5"; 146 - function = "qup14"; 147 - bias-disable; 148 - }; 149 - }; 141 + gpio-wo-subnode-state { 142 + pins = "gpio1"; 143 + function = "gpio"; 150 144 }; 145 + 146 + uart-w-subnodes-state { 147 + rx-pins { 148 + pins = "gpio4"; 149 + function = "qup14"; 150 + bias-pull-up; 151 + }; 152 + 153 + tx-pins { 154 + pins = "gpio5"; 155 + function = "qup14"; 156 + bias-disable; 157 + }; 158 + }; 159 + }; 151 160 ...
+50 -38
Documentation/devicetree/bindings/pinctrl/qcom,sm6115-pinctrl.yaml
··· 49 49 gpio-ranges: 50 50 maxItems: 1 51 51 52 + gpio-reserved-ranges: true 53 + 52 54 wakeup-parent: true 53 55 54 56 #PIN CONFIGURATION NODES ··· 59 57 oneOf: 60 58 - $ref: "#/$defs/qcom-sm6115-tlmm-state" 61 59 - patternProperties: 62 - ".*": 60 + "-pins$": 63 61 $ref: "#/$defs/qcom-sm6115-tlmm-state" 62 + additionalProperties: false 64 63 65 64 '$defs': 66 65 qcom-sm6115-tlmm-state: ··· 69 66 description: 70 67 Pinctrl node's client devices use subnodes for desired pin configuration. 71 68 Client device subnodes use below standard properties. 72 - $ref: "qcom,tlmm-common.yaml#/$defs/qcom-tlmm-state" 73 69 74 70 properties: 75 71 pins: ··· 120 118 required: 121 119 - pins 122 120 121 + allOf: 122 + - $ref: "qcom,tlmm-common.yaml#/$defs/qcom-tlmm-state" 123 + - if: 124 + properties: 125 + pins: 126 + pattern: "^gpio([0-9]|[1-9][0-9]|10[0-9]|11[0-2])$" 127 + then: 128 + required: 129 + - function 130 + 123 131 additionalProperties: false 124 132 125 133 allOf: ··· 150 138 151 139 examples: 152 140 - | 153 - #include <dt-bindings/interrupt-controller/arm-gic.h> 154 - tlmm: pinctrl@500000 { 155 - compatible = "qcom,sm6115-tlmm"; 156 - reg = <0x500000 0x400000>, 157 - <0x900000 0x400000>, 158 - <0xd00000 0x400000>; 159 - reg-names = "west", "south", "east"; 160 - interrupts = <GIC_SPI 227 IRQ_TYPE_LEVEL_HIGH>; 161 - gpio-controller; 162 - #gpio-cells = <2>; 163 - interrupt-controller; 164 - #interrupt-cells = <2>; 165 - gpio-ranges = <&tlmm 0 0 114>; 141 + #include <dt-bindings/interrupt-controller/arm-gic.h> 142 + tlmm: pinctrl@500000 { 143 + compatible = "qcom,sm6115-tlmm"; 144 + reg = <0x500000 0x400000>, 145 + <0x900000 0x400000>, 146 + <0xd00000 0x400000>; 147 + reg-names = "west", "south", "east"; 148 + interrupts = <GIC_SPI 227 IRQ_TYPE_LEVEL_HIGH>; 149 + gpio-controller; 150 + #gpio-cells = <2>; 151 + interrupt-controller; 152 + #interrupt-cells = <2>; 153 + gpio-ranges = <&tlmm 0 0 114>; 166 154 167 - sdc2_on_state: sdc2-on-state { 168 - clk { 169 - pins = "sdc2_clk"; 170 - bias-disable; 171 - drive-strength = <16>; 172 - }; 155 + sdc2_on_state: sdc2-on-state { 156 + clk-pins { 157 + pins = "sdc2_clk"; 158 + bias-disable; 159 + drive-strength = <16>; 160 + }; 173 161 174 - cmd { 175 - pins = "sdc2_cmd"; 176 - bias-pull-up; 177 - drive-strength = <10>; 178 - }; 162 + cmd-pins { 163 + pins = "sdc2_cmd"; 164 + bias-pull-up; 165 + drive-strength = <10>; 166 + }; 179 167 180 - data { 181 - pins = "sdc2_data"; 182 - bias-pull-up; 183 - drive-strength = <10>; 184 - }; 168 + data-pins { 169 + pins = "sdc2_data"; 170 + bias-pull-up; 171 + drive-strength = <10>; 172 + }; 185 173 186 - sd-cd { 187 - pins = "gpio88"; 188 - function = "gpio"; 189 - bias-pull-up; 190 - drive-strength = <2>; 191 - }; 192 - }; 174 + sd-cd-pins { 175 + pins = "gpio88"; 176 + function = "gpio"; 177 + bias-pull-up; 178 + drive-strength = <2>; 179 + }; 193 180 }; 181 + };
+45 -16
Documentation/devicetree/bindings/pinctrl/qcom,sm6125-pinctrl.yaml
··· 51 51 oneOf: 52 52 - $ref: "#/$defs/qcom-sm6125-tlmm-state" 53 53 - patternProperties: 54 - ".*": 54 + "-pins$": 55 55 $ref: "#/$defs/qcom-sm6125-tlmm-state" 56 + additionalProperties: false 56 57 57 58 $defs: 58 59 qcom-sm6125-tlmm-state: ··· 61 60 description: 62 61 Pinctrl node's client devices use subnodes for desired pin configuration. 63 62 Client device subnodes use below standard properties. 64 - $ref: "qcom,tlmm-common.yaml#/$defs/qcom-tlmm-state" 65 63 66 64 properties: 67 65 pins: ··· 111 111 112 112 required: 113 113 - pins 114 - - function 114 + 115 + allOf: 116 + - $ref: "qcom,tlmm-common.yaml#/$defs/qcom-tlmm-state" 117 + - if: 118 + properties: 119 + pins: 120 + pattern: "^gpio[0-9]|[1-9][0-9]|1[0-2][0-9]|13[0-2]$" 121 + then: 122 + required: 123 + - function 115 124 116 125 additionalProperties: false 117 126 118 127 examples: 119 128 - | 120 - #include <dt-bindings/interrupt-controller/arm-gic.h> 121 - pinctrl@500000 { 122 - compatible = "qcom,sm6125-tlmm"; 123 - reg = <0x00500000 0x400000>, 124 - <0x00900000 0x400000>, 125 - <0x00d00000 0x400000>; 126 - reg-names = "west", "south", "east"; 127 - interrupts = <GIC_SPI 227 IRQ_TYPE_LEVEL_HIGH>; 128 - gpio-controller; 129 - gpio-ranges = <&tlmm 0 0 134>; 130 - #gpio-cells = <2>; 131 - interrupt-controller; 132 - #interrupt-cells = <2>; 129 + #include <dt-bindings/interrupt-controller/arm-gic.h> 130 + pinctrl@500000 { 131 + compatible = "qcom,sm6125-tlmm"; 132 + reg = <0x00500000 0x400000>, 133 + <0x00900000 0x400000>, 134 + <0x00d00000 0x400000>; 135 + reg-names = "west", "south", "east"; 136 + interrupts = <GIC_SPI 227 IRQ_TYPE_LEVEL_HIGH>; 137 + gpio-controller; 138 + gpio-ranges = <&tlmm 0 0 134>; 139 + #gpio-cells = <2>; 140 + interrupt-controller; 141 + #interrupt-cells = <2>; 142 + 143 + sdc2-off-state { 144 + clk-pins { 145 + pins = "sdc2_clk"; 146 + drive-strength = <2>; 147 + bias-disable; 148 + }; 149 + 150 + cmd-pins { 151 + pins = "sdc2_cmd"; 152 + drive-strength = <2>; 153 + bias-pull-up; 154 + }; 155 + 156 + data-pins { 157 + pins = "sdc2_data"; 158 + drive-strength = <2>; 159 + bias-pull-up; 160 + }; 133 161 }; 162 + };
+40 -31
Documentation/devicetree/bindings/pinctrl/qcom,sm6350-pinctrl.yaml
··· 44 44 oneOf: 45 45 - $ref: "#/$defs/qcom-sm6350-tlmm-state" 46 46 - patternProperties: 47 - ".*": 47 + "-pins$": 48 48 $ref: "#/$defs/qcom-sm6350-tlmm-state" 49 + additionalProperties: false 49 50 50 51 $defs: 51 52 qcom-sm6350-tlmm-state: ··· 54 53 description: 55 54 Pinctrl node's client devices use subnodes for desired pin configuration. 56 55 Client device subnodes use below standard properties. 57 - $ref: "qcom,tlmm-common.yaml#/$defs/qcom-tlmm-state" 58 56 59 57 properties: 60 58 pins: ··· 110 110 111 111 required: 112 112 - pins 113 - - function 113 + 114 + allOf: 115 + - $ref: "qcom,tlmm-common.yaml#/$defs/qcom-tlmm-state" 116 + - if: 117 + properties: 118 + pins: 119 + pattern: "^gpio([0-9]|[1-9][0-9]|1[0-4][0-9]|15[0-7])$" 120 + then: 121 + required: 122 + - function 114 123 115 124 additionalProperties: false 116 125 117 126 examples: 118 127 - | 119 - #include <dt-bindings/interrupt-controller/arm-gic.h> 120 - pinctrl@f100000 { 121 - compatible = "qcom,sm6350-tlmm"; 122 - reg = <0x0f100000 0x300000>; 123 - interrupts = <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>; 124 - gpio-controller; 125 - #gpio-cells = <2>; 126 - interrupt-controller; 127 - #interrupt-cells = <2>; 128 - gpio-ranges = <&tlmm 0 0 157>; 128 + #include <dt-bindings/interrupt-controller/arm-gic.h> 129 + pinctrl@f100000 { 130 + compatible = "qcom,sm6350-tlmm"; 131 + reg = <0x0f100000 0x300000>; 132 + interrupts = <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>; 133 + gpio-controller; 134 + #gpio-cells = <2>; 135 + interrupt-controller; 136 + #interrupt-cells = <2>; 137 + gpio-ranges = <&tlmm 0 0 157>; 129 138 130 - gpio-wo-subnode-state { 131 - pins = "gpio1"; 132 - function = "gpio"; 133 - }; 134 - 135 - uart-w-subnodes-state { 136 - rx { 137 - pins = "gpio25"; 138 - function = "qup13_f2"; 139 - bias-disable; 140 - }; 141 - 142 - tx { 143 - pins = "gpio26"; 144 - function = "qup13_f2"; 145 - bias-disable; 146 - }; 147 - }; 139 + gpio-wo-subnode-state { 140 + pins = "gpio1"; 141 + function = "gpio"; 148 142 }; 143 + 144 + uart-w-subnodes-state { 145 + rx-pins { 146 + pins = "gpio25"; 147 + function = "qup13_f2"; 148 + bias-disable; 149 + }; 150 + 151 + tx-pins { 152 + pins = "gpio26"; 153 + function = "qup13_f2"; 154 + bias-disable; 155 + }; 156 + }; 157 + }; 149 158 ...
+40 -31
Documentation/devicetree/bindings/pinctrl/qcom,sm6375-tlmm.yaml
··· 44 44 oneOf: 45 45 - $ref: "#/$defs/qcom-sm6375-tlmm-state" 46 46 - patternProperties: 47 - ".*": 47 + "-pins$": 48 48 $ref: "#/$defs/qcom-sm6375-tlmm-state" 49 + additionalProperties: false 49 50 50 51 $defs: 51 52 qcom-sm6375-tlmm-state: ··· 54 53 description: 55 54 Pinctrl node's client devices use subnodes for desired pin configuration. 56 55 Client device subnodes use below standard properties. 57 - $ref: "qcom,tlmm-common.yaml#/$defs/qcom-tlmm-state" 58 56 59 57 properties: 60 58 pins: ··· 119 119 120 120 required: 121 121 - pins 122 - - function 122 + 123 + allOf: 124 + - $ref: "qcom,tlmm-common.yaml#/$defs/qcom-tlmm-state" 125 + - if: 126 + properties: 127 + pins: 128 + pattern: "^gpio([0-9]|[1-9][0-9]|1[0-4][0-9]|15[0-6])$" 129 + then: 130 + required: 131 + - function 123 132 124 133 additionalProperties: false 125 134 126 135 examples: 127 136 - | 128 - #include <dt-bindings/interrupt-controller/arm-gic.h> 129 - pinctrl@500000 { 130 - compatible = "qcom,sm6375-tlmm"; 131 - reg = <0x00500000 0x800000>; 132 - interrupts = <GIC_SPI 227 IRQ_TYPE_LEVEL_HIGH>; 133 - gpio-controller; 134 - #gpio-cells = <2>; 135 - interrupt-controller; 136 - #interrupt-cells = <2>; 137 - gpio-ranges = <&tlmm 0 0 157>; 137 + #include <dt-bindings/interrupt-controller/arm-gic.h> 138 + pinctrl@500000 { 139 + compatible = "qcom,sm6375-tlmm"; 140 + reg = <0x00500000 0x800000>; 141 + interrupts = <GIC_SPI 227 IRQ_TYPE_LEVEL_HIGH>; 142 + gpio-controller; 143 + #gpio-cells = <2>; 144 + interrupt-controller; 145 + #interrupt-cells = <2>; 146 + gpio-ranges = <&tlmm 0 0 157>; 138 147 139 - gpio-wo-subnode-state { 140 - pins = "gpio1"; 141 - function = "gpio"; 142 - }; 143 - 144 - uart-w-subnodes-state { 145 - rx { 146 - pins = "gpio18"; 147 - function = "qup13_f2"; 148 - bias-pull-up; 149 - }; 150 - 151 - tx { 152 - pins = "gpio19"; 153 - function = "qup13_f2"; 154 - bias-disable; 155 - }; 156 - }; 148 + gpio-wo-subnode-state { 149 + pins = "gpio1"; 150 + function = "gpio"; 157 151 }; 152 + 153 + uart-w-subnodes-state { 154 + rx-pins { 155 + pins = "gpio18"; 156 + function = "qup13_f2"; 157 + bias-pull-up; 158 + }; 159 + 160 + tx-pins { 161 + pins = "gpio19"; 162 + function = "qup13_f2"; 163 + bias-disable; 164 + }; 165 + }; 166 + }; 158 167 ...
+25 -16
Documentation/devicetree/bindings/pinctrl/qcom,sm8250-pinctrl.yaml
··· 110 110 111 111 required: 112 112 - pins 113 - - function 113 + 114 + allOf: 115 + - $ref: "qcom,tlmm-common.yaml#/$defs/qcom-tlmm-state" 116 + - if: 117 + properties: 118 + pins: 119 + pattern: "^gpio([0-9]|[1-9][0-9]|1[0-7][0-9])$" 120 + then: 121 + required: 122 + - function 114 123 115 124 additionalProperties: false 116 125 ··· 141 132 142 133 examples: 143 134 - | 144 - #include <dt-bindings/interrupt-controller/arm-gic.h> 145 - pinctrl@1f00000 { 146 - compatible = "qcom,sm8250-pinctrl"; 147 - reg = <0x0f100000 0x300000>, 148 - <0x0f500000 0x300000>, 149 - <0x0f900000 0x300000>; 150 - reg-names = "west", "south", "north"; 151 - interrupts = <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>; 152 - gpio-controller; 153 - #gpio-cells = <2>; 154 - interrupt-controller; 155 - #interrupt-cells = <2>; 156 - gpio-ranges = <&tlmm 0 0 180>; 157 - wakeup-parent = <&pdc>; 158 - }; 135 + #include <dt-bindings/interrupt-controller/arm-gic.h> 136 + pinctrl@1f00000 { 137 + compatible = "qcom,sm8250-pinctrl"; 138 + reg = <0x0f100000 0x300000>, 139 + <0x0f500000 0x300000>, 140 + <0x0f900000 0x300000>; 141 + reg-names = "west", "south", "north"; 142 + interrupts = <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>; 143 + gpio-controller; 144 + #gpio-cells = <2>; 145 + interrupt-controller; 146 + #interrupt-cells = <2>; 147 + gpio-ranges = <&tlmm 0 0 180>; 148 + wakeup-parent = <&pdc>; 149 + };
+40 -31
Documentation/devicetree/bindings/pinctrl/qcom,sm8350-pinctrl.yaml
··· 44 44 oneOf: 45 45 - $ref: "#/$defs/qcom-sm8350-tlmm-state" 46 46 - patternProperties: 47 - ".*": 47 + "-pins$": 48 48 $ref: "#/$defs/qcom-sm8350-tlmm-state" 49 + additionalProperties: false 49 50 50 51 $defs: 51 52 qcom-sm8350-tlmm-state: ··· 54 53 description: 55 54 Pinctrl node's client devices use subnodes for desired pin configuration. 56 55 Client device subnodes use below standard properties. 57 - $ref: "qcom,tlmm-common.yaml#/$defs/qcom-tlmm-state" 58 56 59 57 properties: 60 58 pins: ··· 107 107 108 108 required: 109 109 - pins 110 - - function 110 + 111 + allOf: 112 + - $ref: "qcom,tlmm-common.yaml#/$defs/qcom-tlmm-state" 113 + - if: 114 + properties: 115 + pins: 116 + pattern: "^gpio([0-9]|[1-9][0-9]|1[0-9][0-9]|20[0-3])$" 117 + then: 118 + required: 119 + - function 111 120 112 121 additionalProperties: false 113 122 114 123 examples: 115 124 - | 116 - #include <dt-bindings/interrupt-controller/arm-gic.h> 117 - pinctrl@f100000 { 118 - compatible = "qcom,sm8350-tlmm"; 119 - reg = <0x0f100000 0x300000>; 120 - interrupts = <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>; 121 - gpio-controller; 122 - #gpio-cells = <2>; 123 - interrupt-controller; 124 - #interrupt-cells = <2>; 125 - gpio-ranges = <&tlmm 0 0 203>; 125 + #include <dt-bindings/interrupt-controller/arm-gic.h> 126 + pinctrl@f100000 { 127 + compatible = "qcom,sm8350-tlmm"; 128 + reg = <0x0f100000 0x300000>; 129 + interrupts = <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>; 130 + gpio-controller; 131 + #gpio-cells = <2>; 132 + interrupt-controller; 133 + #interrupt-cells = <2>; 134 + gpio-ranges = <&tlmm 0 0 203>; 126 135 127 - gpio-wo-subnode-state { 128 - pins = "gpio1"; 129 - function = "gpio"; 130 - }; 131 - 132 - uart-w-subnodes-state { 133 - rx { 134 - pins = "gpio18"; 135 - function = "qup3"; 136 - bias-pull-up; 137 - }; 138 - 139 - tx { 140 - pins = "gpio19"; 141 - function = "qup3"; 142 - bias-disable; 143 - }; 144 - }; 136 + gpio-wo-subnode-state { 137 + pins = "gpio1"; 138 + function = "gpio"; 145 139 }; 140 + 141 + uart-w-subnodes-state { 142 + rx-pins { 143 + pins = "gpio18"; 144 + function = "qup3"; 145 + bias-pull-up; 146 + }; 147 + 148 + tx-pins { 149 + pins = "gpio19"; 150 + function = "qup3"; 151 + bias-disable; 152 + }; 153 + }; 154 + }; 146 155 ...
+135
Documentation/devicetree/bindings/pinctrl/qcom,sm8450-lpass-lpi-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/qcom,sm8450-lpass-lpi-pinctrl.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Qualcomm Technologies, Inc. Low Power Audio SubSystem (LPASS) 8 + Low Power Island (LPI) TLMM block 9 + 10 + maintainers: 11 + - Srinivas Kandagatla <srinivas.kandagatla@linaro.org> 12 + 13 + description: | 14 + This binding describes the Top Level Mode Multiplexer block found in the 15 + LPASS LPI IP on most Qualcomm SoCs 16 + 17 + properties: 18 + compatible: 19 + const: qcom,sm8450-lpass-lpi-pinctrl 20 + 21 + reg: 22 + items: 23 + - description: LPASS LPI TLMM Control and Status registers 24 + - description: LPASS LPI pins SLEW registers 25 + 26 + clocks: 27 + items: 28 + - description: LPASS Core voting clock 29 + - description: LPASS Audio voting clock 30 + 31 + clock-names: 32 + items: 33 + - const: core 34 + - const: audio 35 + 36 + gpio-controller: true 37 + 38 + '#gpio-cells': 39 + description: Specifying the pin number and flags, as defined in 40 + include/dt-bindings/gpio/gpio.h 41 + const: 2 42 + 43 + gpio-ranges: 44 + maxItems: 1 45 + 46 + #PIN CONFIGURATION NODES 47 + patternProperties: 48 + '-pins$': 49 + type: object 50 + description: 51 + Pinctrl node's client devices use subnodes for desired pin configuration. 52 + Client device subnodes use below standard properties. 53 + $ref: /schemas/pinctrl/pincfg-node.yaml 54 + 55 + properties: 56 + pins: 57 + description: 58 + List of gpio pins affected by the properties specified in this 59 + subnode. 60 + items: 61 + pattern: "^gpio([0-9]|[1-2][0-9]])$" 62 + 63 + function: 64 + enum: [ swr_tx_clk, swr_tx_data, swr_rx_clk, swr_rx_data, 65 + dmic1_clk, dmic1_data, dmic2_clk, dmic2_data, dmic4_clk, 66 + dmic4_data, i2s2_clk, i2s2_ws, dmic3_clk, dmic3_data, 67 + qua_mi2s_sclk, qua_mi2s_ws, qua_mi2s_data, i2s1_clk, i2s1_ws, 68 + i2s1_data, wsa_swr_clk, wsa_swr_data, wsa2_swr_clk, 69 + wsa2_swr_data, i2s2_data, i2s4_ws, i2s4_clk, i2s4_data, 70 + slimbus_clk, i2s3_clk, i2s3_ws, i2s3_data, slimbus_data, 71 + ext_mclk1_c, ext_mclk1_b, ext_mclk1_a, ext_mclk1_d, 72 + ext_mclk1_e ] 73 + description: 74 + Specify the alternative function to be configured for the specified 75 + pins. 76 + 77 + drive-strength: 78 + enum: [2, 4, 6, 8, 10, 12, 14, 16] 79 + default: 2 80 + description: 81 + Selects the drive strength for the specified pins, in mA. 82 + 83 + slew-rate: 84 + enum: [0, 1, 2, 3] 85 + default: 0 86 + description: | 87 + 0: No adjustments 88 + 1: Higher Slew rate (faster edges) 89 + 2: Lower Slew rate (slower edges) 90 + 3: Reserved (No adjustments) 91 + 92 + bias-pull-down: true 93 + 94 + bias-pull-up: true 95 + 96 + bias-disable: true 97 + 98 + output-high: true 99 + 100 + output-low: true 101 + 102 + required: 103 + - pins 104 + - function 105 + 106 + additionalProperties: false 107 + 108 + allOf: 109 + - $ref: pinctrl.yaml# 110 + 111 + required: 112 + - compatible 113 + - reg 114 + - clocks 115 + - clock-names 116 + - gpio-controller 117 + - '#gpio-cells' 118 + - gpio-ranges 119 + 120 + additionalProperties: false 121 + 122 + examples: 123 + - | 124 + #include <dt-bindings/sound/qcom,q6afe.h> 125 + pinctrl@3440000 { 126 + compatible = "qcom,sm8450-lpass-lpi-pinctrl"; 127 + reg = <0x3440000 0x20000>, 128 + <0x34d0000 0x10000>; 129 + clocks = <&q6afecc LPASS_HW_MACRO_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>, 130 + <&q6afecc LPASS_HW_DCODEC_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>; 131 + clock-names = "core", "audio"; 132 + gpio-controller; 133 + #gpio-cells = <2>; 134 + gpio-ranges = <&lpi_tlmm 0 0 23>; 135 + };
+48 -32
Documentation/devicetree/bindings/pinctrl/qcom,sm8450-pinctrl.yaml
··· 27 27 interrupt-controller: true 28 28 '#interrupt-cells': true 29 29 gpio-controller: true 30 - gpio-reserved-ranges: true 30 + 31 + gpio-reserved-ranges: 32 + minItems: 1 33 + maxItems: 105 34 + 35 + gpio-line-names: 36 + maxItems: 209 37 + 31 38 '#gpio-cells': true 32 39 gpio-ranges: true 33 40 wakeup-parent: true ··· 50 43 oneOf: 51 44 - $ref: "#/$defs/qcom-sm8450-tlmm-state" 52 45 - patternProperties: 53 - ".*": 46 + "-pins$": 54 47 $ref: "#/$defs/qcom-sm8450-tlmm-state" 48 + additionalProperties: false 55 49 56 50 $defs: 57 51 qcom-sm8450-tlmm-state: ··· 60 52 description: 61 53 Pinctrl node's client devices use subnodes for desired pin configuration. 62 54 Client device subnodes use below standard properties. 63 - $ref: "qcom,tlmm-common.yaml#/$defs/qcom-tlmm-state" 64 55 65 56 properties: 66 57 pins: ··· 111 104 112 105 required: 113 106 - pins 114 - - function 107 + 108 + allOf: 109 + - $ref: "qcom,tlmm-common.yaml#/$defs/qcom-tlmm-state" 110 + - if: 111 + properties: 112 + pins: 113 + pattern: "^gpio([0-9]|[1-9][0-9]|1[0-9][0-9]|20[0-9])$" 114 + then: 115 + required: 116 + - function 115 117 116 118 additionalProperties: false 117 119 118 120 examples: 119 121 - | 120 - #include <dt-bindings/interrupt-controller/arm-gic.h> 121 - pinctrl@f100000 { 122 - compatible = "qcom,sm8450-tlmm"; 123 - reg = <0x0f100000 0x300000>; 124 - gpio-controller; 125 - #gpio-cells = <2>; 126 - gpio-ranges = <&tlmm 0 0 211>; 127 - interrupt-controller; 128 - #interrupt-cells = <2>; 129 - interrupts = <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>; 122 + #include <dt-bindings/interrupt-controller/arm-gic.h> 123 + pinctrl@f100000 { 124 + compatible = "qcom,sm8450-tlmm"; 125 + reg = <0x0f100000 0x300000>; 126 + gpio-controller; 127 + #gpio-cells = <2>; 128 + gpio-ranges = <&tlmm 0 0 211>; 129 + interrupt-controller; 130 + #interrupt-cells = <2>; 131 + interrupts = <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>; 130 132 131 - gpio-wo-subnode-state { 132 - pins = "gpio1"; 133 - function = "gpio"; 134 - }; 135 - 136 - uart-w-subnodes-state { 137 - rx { 138 - pins = "gpio26"; 139 - function = "qup7"; 140 - bias-pull-up; 141 - }; 142 - 143 - tx { 144 - pins = "gpio27"; 145 - function = "qup7"; 146 - bias-disable; 147 - }; 148 - }; 133 + gpio-wo-state { 134 + pins = "gpio1"; 135 + function = "gpio"; 149 136 }; 137 + 138 + uart-w-state { 139 + rx-pins { 140 + pins = "gpio26"; 141 + function = "qup7"; 142 + bias-pull-up; 143 + }; 144 + 145 + tx-pins { 146 + pins = "gpio27"; 147 + function = "qup7"; 148 + bias-disable; 149 + }; 150 + }; 151 + }; 150 152 ...
+1
Documentation/devicetree/bindings/pinctrl/renesas,rza1-ports.yaml
··· 41 41 patternProperties: 42 42 "^gpio-[0-9]*$": 43 43 type: object 44 + additionalProperties: false 44 45 45 46 description: 46 47 Each port of the r7s72100 pin controller hardware is itself a GPIO
+1 -1
Documentation/devicetree/bindings/pinctrl/renesas,rzg2l-pinctrl.yaml
··· 23 23 oneOf: 24 24 - items: 25 25 - enum: 26 - - renesas,r9a07g043-pinctrl # RZ/G2UL{Type-1,Type-2} 26 + - renesas,r9a07g043-pinctrl # RZ/G2UL{Type-1,Type-2} and RZ/Five 27 27 - renesas,r9a07g044-pinctrl # RZ/G2{L,LC} 28 28 29 29 - items:
+1
Documentation/devicetree/bindings/pinctrl/rockchip,pinctrl.yaml
··· 47 47 - rockchip,rk3568-pinctrl 48 48 - rockchip,rk3588-pinctrl 49 49 - rockchip,rv1108-pinctrl 50 + - rockchip,rv1126-pinctrl 50 51 51 52 rockchip,grf: 52 53 $ref: "/schemas/types.yaml#/definitions/phandle"
-1
Documentation/devicetree/bindings/pinctrl/samsung,pinctrl-pins-cfg.yaml
··· 20 20 The values used for config properties should be derived from the hardware 21 21 manual and these values are programmed as-is into the pin pull up/down and 22 22 driver strength register of the pin-controller. 23 - See also include/dt-bindings/pinctrl/samsung.h with useful constants. 24 23 25 24 See also Documentation/devicetree/bindings/pinctrl/samsung,pinctrl.yaml for 26 25 additional information and example.
+30 -36
Documentation/devicetree/bindings/pinctrl/samsung,pinctrl.yaml
··· 15 15 This is a part of device tree bindings for Samsung S3C/S5P/Exynos SoC pin 16 16 controller. 17 17 18 - Pin group settings (like drive strength, pull up/down) are available as 19 - macros in include/dt-bindings/pinctrl/samsung.h. 20 - 21 18 All the pin controller nodes should be represented in the aliases node using 22 19 the following format 'pinctrl{n}' where n is a unique number for the alias. 23 20 ··· 94 97 additionalProperties: false 95 98 96 99 "^(initial|sleep)-state$": 100 + type: object 101 + additionalProperties: false 102 + 97 103 patternProperties: 98 104 "^(pin-[a-z0-9-]+|[a-z0-9-]+-pin)$": 99 105 $ref: samsung,pinctrl-pins-cfg.yaml ··· 138 138 139 139 examples: 140 140 - | 141 - #include <dt-bindings/pinctrl/samsung.h> 142 - 143 141 pinctrl@7f008000 { 144 142 compatible = "samsung,s3c64xx-pinctrl"; 145 143 reg = <0x7f008000 0x1000>; ··· 164 166 165 167 uart0-data-pins { 166 168 samsung,pins = "gpa-0", "gpa-1"; 167 - samsung,pin-function = <EXYNOS_PIN_FUNC_2>; 168 - samsung,pin-pud = <S3C64XX_PIN_PULL_NONE>; 169 + samsung,pin-function = <2>; 170 + samsung,pin-pud = <0>; 169 171 }; 170 172 171 173 // ... ··· 173 175 174 176 - | 175 177 #include <dt-bindings/interrupt-controller/arm-gic.h> 176 - #include <dt-bindings/pinctrl/samsung.h> 177 178 178 179 pinctrl@11400000 { 179 180 compatible = "samsung,exynos4210-pinctrl"; ··· 194 197 195 198 uart0-data-pins { 196 199 samsung,pins = "gpa0-0", "gpa0-1"; 197 - samsung,pin-function = <EXYNOS_PIN_FUNC_2>; 198 - samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>; 199 - samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>; 200 + samsung,pin-function = <2>; 201 + samsung,pin-pud = <0>; 202 + samsung,pin-drv = <0>; 200 203 }; 201 204 202 205 // ... ··· 204 207 sleep0: sleep-state { 205 208 gpa0-0-pin { 206 209 samsung,pins = "gpa0-0"; 207 - samsung,pin-con-pdn = <EXYNOS_PIN_PDN_INPUT>; 208 - samsung,pin-pud-pdn = <EXYNOS_PIN_PULL_NONE>; 210 + samsung,pin-con-pdn = <2>; 211 + samsung,pin-pud-pdn = <0>; 209 212 }; 210 213 211 214 gpa0-1-pin { 212 215 samsung,pins = "gpa0-1"; 213 - samsung,pin-con-pdn = <EXYNOS_PIN_PDN_OUT0>; 214 - samsung,pin-pud-pdn = <EXYNOS_PIN_PULL_NONE>; 216 + samsung,pin-con-pdn = <0>; 217 + samsung,pin-pud-pdn = <0>; 215 218 }; 216 219 217 220 // ... ··· 220 223 221 224 - | 222 225 #include <dt-bindings/interrupt-controller/arm-gic.h> 223 - #include <dt-bindings/pinctrl/samsung.h> 224 226 225 227 pinctrl@11000000 { 226 228 compatible = "samsung,exynos4210-pinctrl"; ··· 268 272 269 273 sd0-clk-pins { 270 274 samsung,pins = "gpk0-0"; 271 - samsung,pin-function = <EXYNOS_PIN_FUNC_2>; 272 - samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>; 273 - samsung,pin-drv = <EXYNOS4_PIN_DRV_LV4>; 275 + samsung,pin-function = <2>; 276 + samsung,pin-pud = <0>; 277 + samsung,pin-drv = <3>; 274 278 }; 275 279 276 280 sd4-bus-width8-pins { 277 281 part-1-pins { 278 282 samsung,pins = "gpk0-3", "gpk0-4", 279 283 "gpk0-5", "gpk0-6"; 280 - samsung,pin-function = <EXYNOS_PIN_FUNC_3>; 281 - samsung,pin-pud = <EXYNOS_PIN_PULL_UP>; 282 - samsung,pin-drv = <EXYNOS4_PIN_DRV_LV4>; 284 + samsung,pin-function = <3>; 285 + samsung,pin-pud = <3>; 286 + samsung,pin-drv = <3>; 283 287 }; 284 288 285 289 part-2-pins { 286 290 samsung,pins = "gpk1-3", "gpk1-4", 287 291 "gpk1-5", "gpk1-6"; 288 - samsung,pin-function = <EXYNOS_PIN_FUNC_4>; 289 - samsung,pin-pud = <EXYNOS_PIN_PULL_UP>; 290 - samsung,pin-drv = <EXYNOS4_PIN_DRV_LV4>; 292 + samsung,pin-function = <4>; 293 + samsung,pin-pud = <3>; 294 + samsung,pin-drv = <3>; 291 295 }; 292 296 }; 293 297 ··· 295 299 296 300 otg-gp-pins { 297 301 samsung,pins = "gpx3-3"; 298 - samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>; 299 - samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>; 300 - samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>; 302 + samsung,pin-function = <1>; 303 + samsung,pin-pud = <0>; 304 + samsung,pin-drv = <0>; 301 305 samsung,pin-val = <0>; 302 306 }; 303 307 }; 304 308 305 309 - | 306 310 #include <dt-bindings/interrupt-controller/arm-gic.h> 307 - #include <dt-bindings/pinctrl/samsung.h> 308 311 309 312 pinctrl@10580000 { 310 313 compatible = "samsung,exynos5433-pinctrl"; ··· 347 352 initial_alive: initial-state { 348 353 gpa0-0-pin { 349 354 samsung,pins = "gpa0-0"; 350 - samsung,pin-function = <EXYNOS_PIN_FUNC_INPUT>; 351 - samsung,pin-pud = <EXYNOS_PIN_PULL_DOWN>; 352 - samsung,pin-drv = <EXYNOS5433_PIN_DRV_FAST_SR1>; 355 + samsung,pin-function = <0>; 356 + samsung,pin-pud = <1>; 357 + samsung,pin-drv = <0>; 353 358 }; 354 359 355 360 // ... ··· 358 363 359 364 - | 360 365 #include <dt-bindings/interrupt-controller/arm-gic.h> 361 - #include <dt-bindings/pinctrl/samsung.h> 362 366 363 367 pinctrl@114b0000 { 364 368 compatible = "samsung,exynos5433-pinctrl"; ··· 378 384 i2s0-bus-pins { 379 385 samsung,pins = "gpz0-0", "gpz0-1", "gpz0-2", "gpz0-3", 380 386 "gpz0-4", "gpz0-5", "gpz0-6"; 381 - samsung,pin-function = <EXYNOS_PIN_FUNC_2>; 382 - samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>; 383 - samsung,pin-drv = <EXYNOS5433_PIN_DRV_FAST_SR1>; 387 + samsung,pin-function = <2>; 388 + samsung,pin-pud = <0>; 389 + samsung,pin-drv = <0>; 384 390 }; 385 391 386 392 // ...
+13
Documentation/devicetree/bindings/pinctrl/st,stm32-pinctrl.yaml
··· 64 64 gpio-controller: true 65 65 '#gpio-cells': 66 66 const: 2 67 + interrupt-controller: true 68 + '#interrupt-cells': 69 + const: 2 67 70 68 71 reg: 69 72 maxItems: 1 ··· 74 71 maxItems: 1 75 72 resets: 76 73 maxItems: 1 74 + gpio-line-names: true 77 75 gpio-ranges: 78 76 minItems: 1 79 77 maxItems: 16 ··· 110 106 minimum: 0 111 107 maximum: 11 112 108 109 + patternProperties: 110 + "^(.+-hog(-[0-9]+)?)$": 111 + type: object 112 + required: 113 + - gpio-hog 114 + 113 115 required: 114 116 - gpio-controller 115 117 - '#gpio-cells' ··· 125 115 126 116 '-[0-9]*$': 127 117 type: object 118 + additionalProperties: false 119 + 128 120 patternProperties: 129 121 '^pins': 130 122 type: object 123 + additionalProperties: false 131 124 description: | 132 125 A pinctrl node should contain at least one subnode representing the 133 126 pinctrl group available on the machine. Each subnode will list the
+1 -1
Documentation/devicetree/bindings/pinctrl/starfive,jh7100-pinctrl.yaml
··· 165 165 - | 166 166 #include <dt-bindings/clock/starfive-jh7100.h> 167 167 #include <dt-bindings/reset/starfive-jh7100.h> 168 - #include <dt-bindings/pinctrl/pinctrl-starfive.h> 168 + #include <dt-bindings/pinctrl/pinctrl-starfive-jh7100.h> 169 169 170 170 soc { 171 171 #address-cells = <2>;
+1
Documentation/devicetree/bindings/pinctrl/toshiba,visconti-pinctrl.yaml
··· 36 36 pins it needs, and how they should be configured, with regard to muxer 37 37 configuration, pullups, drive strength. 38 38 $ref: "pinmux-node.yaml" 39 + additionalProperties: false 39 40 40 41 properties: 41 42 function:
+8 -2
MAINTAINERS
··· 5665 5665 T: git git://linuxtv.org/anttip/media_tree.git 5666 5666 F: drivers/media/common/cypress_firmware* 5667 5667 5668 + CYPRESS CY8C95X0 PINCTRL DRIVER 5669 + M: Patrick Rudolph <patrick.rudolph@9elements.com> 5670 + L: linux-gpio@vger.kernel.org 5671 + S: Maintained 5672 + F: drivers/pinctrl/pinctrl-cy8c95x0.c 5673 + 5668 5674 CYPRESS CY8CTMA140 TOUCHSCREEN DRIVER 5669 5675 M: Linus Walleij <linus.walleij@linaro.org> 5670 5676 L: linux-input@vger.kernel.org ··· 19612 19606 L: linux-gpio@vger.kernel.org 19613 19607 S: Maintained 19614 19608 F: Documentation/devicetree/bindings/pinctrl/starfive,jh7100-pinctrl.yaml 19615 - F: drivers/pinctrl/pinctrl-starfive.c 19616 - F: include/dt-bindings/pinctrl/pinctrl-starfive.h 19609 + F: drivers/pinctrl/starfive/ 19610 + F: include/dt-bindings/pinctrl/pinctrl-starfive-jh7100.h 19617 19611 19618 19612 STARFIVE JH7100 RESET CONTROLLER DRIVER 19619 19613 M: Emil Renner Berthing <kernel@esmil.dk>
-15
arch/arm/mach-at91/pm.c
··· 19 19 #include <linux/clk/at91_pmc.h> 20 20 #include <linux/platform_data/atmel.h> 21 21 22 - #include <soc/at91/pm.h> 23 - 24 22 #include <asm/cacheflush.h> 25 23 #include <asm/fncpy.h> 26 24 #include <asm/system_misc.h> ··· 654 656 if (ret) 655 657 return ret; 656 658 657 - #ifdef CONFIG_PINCTRL_AT91 658 - /* 659 - * FIXME: this is needed to communicate between the pinctrl driver and 660 - * the PM implementation in the machine. Possibly part of the PM 661 - * implementation should be moved down into the pinctrl driver and get 662 - * called as part of the generic suspend/resume path. 663 - */ 664 - at91_pinctrl_gpio_suspend(); 665 - #endif 666 - 667 659 switch (state) { 668 660 case PM_SUSPEND_MEM: 669 661 case PM_SUSPEND_STANDBY: ··· 678 690 } 679 691 680 692 error: 681 - #ifdef CONFIG_PINCTRL_AT91 682 - at91_pinctrl_gpio_resume(); 683 - #endif 684 693 at91_pm_config_quirks(false); 685 694 return 0; 686 695 }
+1 -1
arch/riscv/boot/dts/starfive/jh7100-beaglev-starlight.dts
··· 8 8 #include "jh7100.dtsi" 9 9 #include <dt-bindings/gpio/gpio.h> 10 10 #include <dt-bindings/leds/common.h> 11 - #include <dt-bindings/pinctrl/pinctrl-starfive.h> 11 + #include <dt-bindings/pinctrl/pinctrl-starfive-jh7100.h> 12 12 13 13 / { 14 14 model = "BeagleV Starlight Beta";
+7
drivers/gpio/gpio-rockchip.c
··· 19 19 #include <linux/of_address.h> 20 20 #include <linux/of_device.h> 21 21 #include <linux/of_irq.h> 22 + #include <linux/pinctrl/consumer.h> 22 23 #include <linux/pinctrl/pinconf-generic.h> 23 24 #include <linux/regmap.h> 24 25 ··· 156 155 struct rockchip_pin_bank *bank = gpiochip_get_data(chip); 157 156 unsigned long flags; 158 157 u32 data = input ? 0 : 1; 158 + 159 + 160 + if (input) 161 + pinctrl_gpio_direction_input(bank->pin_base + offset); 162 + else 163 + pinctrl_gpio_direction_output(bank->pin_base + offset); 159 164 160 165 raw_spin_lock_irqsave(&bank->slock, flags); 161 166 rockchip_gpio_writel_bit(bank, offset, data, bank->gpio_regs->port_ddr);
+20 -17
drivers/pinctrl/Kconfig
··· 135 135 help 136 136 Pinctrl driver for Bitmain BM1880 SoC. 137 137 138 + config PINCTRL_CY8C95X0 139 + tristate "Cypress CY8C95X0 I2C pinctrl and GPIO driver" 140 + depends on I2C 141 + select GPIOLIB 142 + select GPIOLIB_IRQCHIP 143 + select PINMUX 144 + select PINCONF 145 + select GENERIC_PINCONF 146 + select REGMAP_I2C 147 + help 148 + Support for 20/40/60 pin Cypress Cy8C95x0 pinctrl/gpio I2C expander. 149 + This driver can also be built as a module. If so, the module will be 150 + called pinctrl-cy8c95x0. 151 + 138 152 config PINCTRL_DA850_PUPD 139 153 tristate "TI DA850/OMAP-L138/AM18XX pull-up and pull-down groups" 140 154 depends on OF && (ARCH_DAVINCI_DA850 || COMPILE_TEST) ··· 338 324 select GENERIC_PINMUX_FUNCTIONS 339 325 select OF_GPIO 340 326 select REGMAP_MMIO 327 + help 328 + Support for the internal GPIO interfaces on Microsemi Ocelot and 329 + Jaguar2 SoCs. 330 + 331 + If conpiled as a module, the module name will be pinctrl-ocelot. 341 332 342 333 config PINCTRL_OXNAS 343 334 bool ··· 433 414 select PINMUX 434 415 select PINCONF 435 416 select GPIOLIB_IRQCHIP 436 - 437 - config PINCTRL_STARFIVE 438 - tristate "Pinctrl and GPIO driver for the StarFive JH7100 SoC" 439 - depends on SOC_STARFIVE || COMPILE_TEST 440 - depends on OF 441 - default SOC_STARFIVE 442 - select GENERIC_PINCTRL_GROUPS 443 - select GENERIC_PINMUX_FUNCTIONS 444 - select GENERIC_PINCONF 445 - select GPIOLIB 446 - select GPIOLIB_IRQCHIP 447 - select OF_GPIO 448 - help 449 - Say yes here to support pin control on the StarFive JH7100 SoC. 450 - This also provides an interface to the GPIO pins not used by other 451 - peripherals supporting inputs, outputs, configuring pull-up/pull-down 452 - and interrupts on input changes. 453 417 454 418 config PINCTRL_STMFX 455 419 tristate "STMicroelectronics STMFX GPIO expander pinctrl driver" ··· 531 529 source "drivers/pinctrl/samsung/Kconfig" 532 530 source "drivers/pinctrl/spear/Kconfig" 533 531 source "drivers/pinctrl/sprd/Kconfig" 532 + source "drivers/pinctrl/starfive/Kconfig" 534 533 source "drivers/pinctrl/stm32/Kconfig" 535 534 source "drivers/pinctrl/sunplus/Kconfig" 536 535 source "drivers/pinctrl/sunxi/Kconfig"
+2 -1
drivers/pinctrl/Makefile
··· 17 17 obj-$(CONFIG_PINCTRL_AT91PIO4) += pinctrl-at91-pio4.o 18 18 obj-$(CONFIG_PINCTRL_AXP209) += pinctrl-axp209.o 19 19 obj-$(CONFIG_PINCTRL_BM1880) += pinctrl-bm1880.o 20 + obj-$(CONFIG_PINCTRL_CY8C95X0) += pinctrl-cy8c95x0.o 20 21 obj-$(CONFIG_PINCTRL_DA850_PUPD) += pinctrl-da850-pupd.o 21 22 obj-$(CONFIG_PINCTRL_DA9062) += pinctrl-da9062.o 22 23 obj-$(CONFIG_PINCTRL_DIGICOLOR) += pinctrl-digicolor.o ··· 44 43 obj-$(CONFIG_PINCTRL_ROCKCHIP) += pinctrl-rockchip.o 45 44 obj-$(CONFIG_PINCTRL_SINGLE) += pinctrl-single.o 46 45 obj-$(CONFIG_PINCTRL_ST) += pinctrl-st.o 47 - obj-$(CONFIG_PINCTRL_STARFIVE) += pinctrl-starfive.o 48 46 obj-$(CONFIG_PINCTRL_STMFX) += pinctrl-stmfx.o 49 47 obj-$(CONFIG_PINCTRL_SX150X) += pinctrl-sx150x.o 50 48 obj-$(CONFIG_PINCTRL_TB10X) += pinctrl-tb10x.o ··· 70 70 obj-$(CONFIG_PINCTRL_SAMSUNG) += samsung/ 71 71 obj-$(CONFIG_PINCTRL_SPEAR) += spear/ 72 72 obj-y += sprd/ 73 + obj-$(CONFIG_SOC_STARFIVE) += starfive/ 73 74 obj-$(CONFIG_PINCTRL_STM32) += stm32/ 74 75 obj-y += sunplus/ 75 76 obj-$(CONFIG_PINCTRL_SUNXI) += sunxi/
+1 -10
drivers/pinctrl/aspeed/pinctrl-aspeed.c
··· 92 92 static int aspeed_sig_expr_disable(struct aspeed_pinmux_data *ctx, 93 93 const struct aspeed_sig_expr *expr) 94 94 { 95 - int ret; 96 - 97 95 pr_debug("Disabling signal %s for %s\n", expr->signal, 98 96 expr->function); 99 97 100 - ret = aspeed_sig_expr_eval(ctx, expr, true); 101 - if (ret < 0) 102 - return ret; 103 - 104 - if (ret) 105 - return aspeed_sig_expr_set(ctx, expr, false); 106 - 107 - return 0; 98 + return aspeed_sig_expr_set(ctx, expr, false); 108 99 } 109 100 110 101 /**
+54 -67
drivers/pinctrl/bcm/pinctrl-bcm6318.c
··· 27 27 #define BCM6318_PAD_REG 0x54 28 28 #define BCM6328_PAD_MASK GENMASK(3, 0) 29 29 30 - struct bcm6318_pingroup { 31 - const char *name; 32 - const unsigned * const pins; 33 - const unsigned num_pins; 34 - }; 35 - 36 30 struct bcm6318_function { 37 31 const char *name; 38 32 const char * const *groups; ··· 140 146 static unsigned gpio48_pins[] = { 48 }; 141 147 static unsigned gpio49_pins[] = { 49 }; 142 148 143 - #define BCM6318_GROUP(n) \ 144 - { \ 145 - .name = #n, \ 146 - .pins = n##_pins, \ 147 - .num_pins = ARRAY_SIZE(n##_pins), \ 148 - } 149 - 150 - static struct bcm6318_pingroup bcm6318_groups[] = { 151 - BCM6318_GROUP(gpio0), 152 - BCM6318_GROUP(gpio1), 153 - BCM6318_GROUP(gpio2), 154 - BCM6318_GROUP(gpio3), 155 - BCM6318_GROUP(gpio4), 156 - BCM6318_GROUP(gpio5), 157 - BCM6318_GROUP(gpio6), 158 - BCM6318_GROUP(gpio7), 159 - BCM6318_GROUP(gpio8), 160 - BCM6318_GROUP(gpio9), 161 - BCM6318_GROUP(gpio10), 162 - BCM6318_GROUP(gpio11), 163 - BCM6318_GROUP(gpio12), 164 - BCM6318_GROUP(gpio13), 165 - BCM6318_GROUP(gpio14), 166 - BCM6318_GROUP(gpio15), 167 - BCM6318_GROUP(gpio16), 168 - BCM6318_GROUP(gpio17), 169 - BCM6318_GROUP(gpio18), 170 - BCM6318_GROUP(gpio19), 171 - BCM6318_GROUP(gpio20), 172 - BCM6318_GROUP(gpio21), 173 - BCM6318_GROUP(gpio22), 174 - BCM6318_GROUP(gpio23), 175 - BCM6318_GROUP(gpio24), 176 - BCM6318_GROUP(gpio25), 177 - BCM6318_GROUP(gpio26), 178 - BCM6318_GROUP(gpio27), 179 - BCM6318_GROUP(gpio28), 180 - BCM6318_GROUP(gpio29), 181 - BCM6318_GROUP(gpio30), 182 - BCM6318_GROUP(gpio31), 183 - BCM6318_GROUP(gpio32), 184 - BCM6318_GROUP(gpio33), 185 - BCM6318_GROUP(gpio34), 186 - BCM6318_GROUP(gpio35), 187 - BCM6318_GROUP(gpio36), 188 - BCM6318_GROUP(gpio37), 189 - BCM6318_GROUP(gpio38), 190 - BCM6318_GROUP(gpio39), 191 - BCM6318_GROUP(gpio40), 192 - BCM6318_GROUP(gpio41), 193 - BCM6318_GROUP(gpio42), 194 - BCM6318_GROUP(gpio43), 195 - BCM6318_GROUP(gpio44), 196 - BCM6318_GROUP(gpio45), 197 - BCM6318_GROUP(gpio46), 198 - BCM6318_GROUP(gpio47), 199 - BCM6318_GROUP(gpio48), 200 - BCM6318_GROUP(gpio49), 149 + static struct pingroup bcm6318_groups[] = { 150 + BCM_PIN_GROUP(gpio0), 151 + BCM_PIN_GROUP(gpio1), 152 + BCM_PIN_GROUP(gpio2), 153 + BCM_PIN_GROUP(gpio3), 154 + BCM_PIN_GROUP(gpio4), 155 + BCM_PIN_GROUP(gpio5), 156 + BCM_PIN_GROUP(gpio6), 157 + BCM_PIN_GROUP(gpio7), 158 + BCM_PIN_GROUP(gpio8), 159 + BCM_PIN_GROUP(gpio9), 160 + BCM_PIN_GROUP(gpio10), 161 + BCM_PIN_GROUP(gpio11), 162 + BCM_PIN_GROUP(gpio12), 163 + BCM_PIN_GROUP(gpio13), 164 + BCM_PIN_GROUP(gpio14), 165 + BCM_PIN_GROUP(gpio15), 166 + BCM_PIN_GROUP(gpio16), 167 + BCM_PIN_GROUP(gpio17), 168 + BCM_PIN_GROUP(gpio18), 169 + BCM_PIN_GROUP(gpio19), 170 + BCM_PIN_GROUP(gpio20), 171 + BCM_PIN_GROUP(gpio21), 172 + BCM_PIN_GROUP(gpio22), 173 + BCM_PIN_GROUP(gpio23), 174 + BCM_PIN_GROUP(gpio24), 175 + BCM_PIN_GROUP(gpio25), 176 + BCM_PIN_GROUP(gpio26), 177 + BCM_PIN_GROUP(gpio27), 178 + BCM_PIN_GROUP(gpio28), 179 + BCM_PIN_GROUP(gpio29), 180 + BCM_PIN_GROUP(gpio30), 181 + BCM_PIN_GROUP(gpio31), 182 + BCM_PIN_GROUP(gpio32), 183 + BCM_PIN_GROUP(gpio33), 184 + BCM_PIN_GROUP(gpio34), 185 + BCM_PIN_GROUP(gpio35), 186 + BCM_PIN_GROUP(gpio36), 187 + BCM_PIN_GROUP(gpio37), 188 + BCM_PIN_GROUP(gpio38), 189 + BCM_PIN_GROUP(gpio39), 190 + BCM_PIN_GROUP(gpio40), 191 + BCM_PIN_GROUP(gpio41), 192 + BCM_PIN_GROUP(gpio42), 193 + BCM_PIN_GROUP(gpio43), 194 + BCM_PIN_GROUP(gpio44), 195 + BCM_PIN_GROUP(gpio45), 196 + BCM_PIN_GROUP(gpio46), 197 + BCM_PIN_GROUP(gpio47), 198 + BCM_PIN_GROUP(gpio48), 199 + BCM_PIN_GROUP(gpio49), 201 200 }; 202 201 203 202 /* GPIO_MODE */ ··· 355 368 356 369 static int bcm6318_pinctrl_get_group_pins(struct pinctrl_dev *pctldev, 357 370 unsigned group, const unsigned **pins, 358 - unsigned *num_pins) 371 + unsigned *npins) 359 372 { 360 373 *pins = bcm6318_groups[group].pins; 361 - *num_pins = bcm6318_groups[group].num_pins; 374 + *npins = bcm6318_groups[group].npins; 362 375 363 376 return 0; 364 377 } ··· 411 424 unsigned selector, unsigned group) 412 425 { 413 426 struct bcm63xx_pinctrl *pc = pinctrl_dev_get_drvdata(pctldev); 414 - const struct bcm6318_pingroup *pg = &bcm6318_groups[group]; 427 + const struct pingroup *pg = &bcm6318_groups[group]; 415 428 const struct bcm6318_function *f = &bcm6318_funcs[selector]; 416 429 417 430 bcm6318_rmw_mux(pc, pg->pins[0], f->mode_val, f->mux_val);
+63 -76
drivers/pinctrl/bcm/pinctrl-bcm63268.c
··· 40 40 BCM63268_BASEMODE, 41 41 }; 42 42 43 - struct bcm63268_pingroup { 44 - const char *name; 45 - const unsigned * const pins; 46 - const unsigned num_pins; 47 - }; 48 - 49 43 struct bcm63268_function { 50 44 const char *name; 51 45 const char * const *groups; ··· 179 185 static unsigned vdsl_phy2_grp_pins[] = { 24, 25 }; 180 186 static unsigned vdsl_phy3_grp_pins[] = { 26, 27 }; 181 187 182 - #define BCM63268_GROUP(n) \ 183 - { \ 184 - .name = #n, \ 185 - .pins = n##_pins, \ 186 - .num_pins = ARRAY_SIZE(n##_pins), \ 187 - } 188 - 189 - static struct bcm63268_pingroup bcm63268_groups[] = { 190 - BCM63268_GROUP(gpio0), 191 - BCM63268_GROUP(gpio1), 192 - BCM63268_GROUP(gpio2), 193 - BCM63268_GROUP(gpio3), 194 - BCM63268_GROUP(gpio4), 195 - BCM63268_GROUP(gpio5), 196 - BCM63268_GROUP(gpio6), 197 - BCM63268_GROUP(gpio7), 198 - BCM63268_GROUP(gpio8), 199 - BCM63268_GROUP(gpio9), 200 - BCM63268_GROUP(gpio10), 201 - BCM63268_GROUP(gpio11), 202 - BCM63268_GROUP(gpio12), 203 - BCM63268_GROUP(gpio13), 204 - BCM63268_GROUP(gpio14), 205 - BCM63268_GROUP(gpio15), 206 - BCM63268_GROUP(gpio16), 207 - BCM63268_GROUP(gpio17), 208 - BCM63268_GROUP(gpio18), 209 - BCM63268_GROUP(gpio19), 210 - BCM63268_GROUP(gpio20), 211 - BCM63268_GROUP(gpio21), 212 - BCM63268_GROUP(gpio22), 213 - BCM63268_GROUP(gpio23), 214 - BCM63268_GROUP(gpio24), 215 - BCM63268_GROUP(gpio25), 216 - BCM63268_GROUP(gpio26), 217 - BCM63268_GROUP(gpio27), 218 - BCM63268_GROUP(gpio28), 219 - BCM63268_GROUP(gpio29), 220 - BCM63268_GROUP(gpio30), 221 - BCM63268_GROUP(gpio31), 222 - BCM63268_GROUP(gpio32), 223 - BCM63268_GROUP(gpio33), 224 - BCM63268_GROUP(gpio34), 225 - BCM63268_GROUP(gpio35), 226 - BCM63268_GROUP(gpio36), 227 - BCM63268_GROUP(gpio37), 228 - BCM63268_GROUP(gpio38), 229 - BCM63268_GROUP(gpio39), 230 - BCM63268_GROUP(gpio40), 231 - BCM63268_GROUP(gpio41), 232 - BCM63268_GROUP(gpio42), 233 - BCM63268_GROUP(gpio43), 234 - BCM63268_GROUP(gpio44), 235 - BCM63268_GROUP(gpio45), 236 - BCM63268_GROUP(gpio46), 237 - BCM63268_GROUP(gpio47), 238 - BCM63268_GROUP(gpio48), 239 - BCM63268_GROUP(gpio49), 240 - BCM63268_GROUP(gpio50), 241 - BCM63268_GROUP(gpio51), 188 + static struct pingroup bcm63268_groups[] = { 189 + BCM_PIN_GROUP(gpio0), 190 + BCM_PIN_GROUP(gpio1), 191 + BCM_PIN_GROUP(gpio2), 192 + BCM_PIN_GROUP(gpio3), 193 + BCM_PIN_GROUP(gpio4), 194 + BCM_PIN_GROUP(gpio5), 195 + BCM_PIN_GROUP(gpio6), 196 + BCM_PIN_GROUP(gpio7), 197 + BCM_PIN_GROUP(gpio8), 198 + BCM_PIN_GROUP(gpio9), 199 + BCM_PIN_GROUP(gpio10), 200 + BCM_PIN_GROUP(gpio11), 201 + BCM_PIN_GROUP(gpio12), 202 + BCM_PIN_GROUP(gpio13), 203 + BCM_PIN_GROUP(gpio14), 204 + BCM_PIN_GROUP(gpio15), 205 + BCM_PIN_GROUP(gpio16), 206 + BCM_PIN_GROUP(gpio17), 207 + BCM_PIN_GROUP(gpio18), 208 + BCM_PIN_GROUP(gpio19), 209 + BCM_PIN_GROUP(gpio20), 210 + BCM_PIN_GROUP(gpio21), 211 + BCM_PIN_GROUP(gpio22), 212 + BCM_PIN_GROUP(gpio23), 213 + BCM_PIN_GROUP(gpio24), 214 + BCM_PIN_GROUP(gpio25), 215 + BCM_PIN_GROUP(gpio26), 216 + BCM_PIN_GROUP(gpio27), 217 + BCM_PIN_GROUP(gpio28), 218 + BCM_PIN_GROUP(gpio29), 219 + BCM_PIN_GROUP(gpio30), 220 + BCM_PIN_GROUP(gpio31), 221 + BCM_PIN_GROUP(gpio32), 222 + BCM_PIN_GROUP(gpio33), 223 + BCM_PIN_GROUP(gpio34), 224 + BCM_PIN_GROUP(gpio35), 225 + BCM_PIN_GROUP(gpio36), 226 + BCM_PIN_GROUP(gpio37), 227 + BCM_PIN_GROUP(gpio38), 228 + BCM_PIN_GROUP(gpio39), 229 + BCM_PIN_GROUP(gpio40), 230 + BCM_PIN_GROUP(gpio41), 231 + BCM_PIN_GROUP(gpio42), 232 + BCM_PIN_GROUP(gpio43), 233 + BCM_PIN_GROUP(gpio44), 234 + BCM_PIN_GROUP(gpio45), 235 + BCM_PIN_GROUP(gpio46), 236 + BCM_PIN_GROUP(gpio47), 237 + BCM_PIN_GROUP(gpio48), 238 + BCM_PIN_GROUP(gpio49), 239 + BCM_PIN_GROUP(gpio50), 240 + BCM_PIN_GROUP(gpio51), 242 241 243 242 /* multi pin groups */ 244 - BCM63268_GROUP(nand_grp), 245 - BCM63268_GROUP(dectpd_grp), 246 - BCM63268_GROUP(vdsl_phy0_grp), 247 - BCM63268_GROUP(vdsl_phy1_grp), 248 - BCM63268_GROUP(vdsl_phy2_grp), 249 - BCM63268_GROUP(vdsl_phy3_grp), 243 + BCM_PIN_GROUP(nand_grp), 244 + BCM_PIN_GROUP(dectpd_grp), 245 + BCM_PIN_GROUP(vdsl_phy0_grp), 246 + BCM_PIN_GROUP(vdsl_phy1_grp), 247 + BCM_PIN_GROUP(vdsl_phy2_grp), 248 + BCM_PIN_GROUP(vdsl_phy3_grp), 250 249 }; 251 250 252 251 static const char * const led_groups[] = { ··· 474 487 static int bcm63268_pinctrl_get_group_pins(struct pinctrl_dev *pctldev, 475 488 unsigned group, 476 489 const unsigned **pins, 477 - unsigned *num_pins) 490 + unsigned *npins) 478 491 { 479 492 *pins = bcm63268_groups[group].pins; 480 - *num_pins = bcm63268_groups[group].num_pins; 493 + *npins = bcm63268_groups[group].npins; 481 494 482 495 return 0; 483 496 } ··· 532 545 unsigned selector, unsigned group) 533 546 { 534 547 struct bcm63xx_pinctrl *pc = pinctrl_dev_get_drvdata(pctldev); 535 - const struct bcm63268_pingroup *pg = &bcm63268_groups[group]; 548 + const struct pingroup *pg = &bcm63268_groups[group]; 536 549 const struct bcm63268_function *f = &bcm63268_funcs[selector]; 537 550 unsigned i; 538 551 unsigned int reg; 539 552 unsigned int val, mask; 540 553 541 - for (i = 0; i < pg->num_pins; i++) 554 + for (i = 0; i < pg->npins; i++) 542 555 bcm63268_set_gpio(pc, pg->pins[i]); 543 556 544 557 switch (f->reg) {
+38 -51
drivers/pinctrl/bcm/pinctrl-bcm6328.c
··· 26 26 #define BCM6328_MUX_OTHER_REG 0x24 27 27 #define BCM6328_MUX_MASK GENMASK(1, 0) 28 28 29 - struct bcm6328_pingroup { 30 - const char *name; 31 - const unsigned * const pins; 32 - const unsigned num_pins; 33 - }; 34 - 35 29 struct bcm6328_function { 36 30 const char *name; 37 31 const char * const *groups; ··· 119 125 static unsigned hsspi_cs1_pins[] = { 36 }; 120 126 static unsigned usb_port1_pins[] = { 38 }; 121 127 122 - #define BCM6328_GROUP(n) \ 123 - { \ 124 - .name = #n, \ 125 - .pins = n##_pins, \ 126 - .num_pins = ARRAY_SIZE(n##_pins), \ 127 - } 128 + static struct pingroup bcm6328_groups[] = { 129 + BCM_PIN_GROUP(gpio0), 130 + BCM_PIN_GROUP(gpio1), 131 + BCM_PIN_GROUP(gpio2), 132 + BCM_PIN_GROUP(gpio3), 133 + BCM_PIN_GROUP(gpio4), 134 + BCM_PIN_GROUP(gpio5), 135 + BCM_PIN_GROUP(gpio6), 136 + BCM_PIN_GROUP(gpio7), 137 + BCM_PIN_GROUP(gpio8), 138 + BCM_PIN_GROUP(gpio9), 139 + BCM_PIN_GROUP(gpio10), 140 + BCM_PIN_GROUP(gpio11), 141 + BCM_PIN_GROUP(gpio12), 142 + BCM_PIN_GROUP(gpio13), 143 + BCM_PIN_GROUP(gpio14), 144 + BCM_PIN_GROUP(gpio15), 145 + BCM_PIN_GROUP(gpio16), 146 + BCM_PIN_GROUP(gpio17), 147 + BCM_PIN_GROUP(gpio18), 148 + BCM_PIN_GROUP(gpio19), 149 + BCM_PIN_GROUP(gpio20), 150 + BCM_PIN_GROUP(gpio21), 151 + BCM_PIN_GROUP(gpio22), 152 + BCM_PIN_GROUP(gpio23), 153 + BCM_PIN_GROUP(gpio24), 154 + BCM_PIN_GROUP(gpio25), 155 + BCM_PIN_GROUP(gpio26), 156 + BCM_PIN_GROUP(gpio27), 157 + BCM_PIN_GROUP(gpio28), 158 + BCM_PIN_GROUP(gpio29), 159 + BCM_PIN_GROUP(gpio30), 160 + BCM_PIN_GROUP(gpio31), 128 161 129 - static struct bcm6328_pingroup bcm6328_groups[] = { 130 - BCM6328_GROUP(gpio0), 131 - BCM6328_GROUP(gpio1), 132 - BCM6328_GROUP(gpio2), 133 - BCM6328_GROUP(gpio3), 134 - BCM6328_GROUP(gpio4), 135 - BCM6328_GROUP(gpio5), 136 - BCM6328_GROUP(gpio6), 137 - BCM6328_GROUP(gpio7), 138 - BCM6328_GROUP(gpio8), 139 - BCM6328_GROUP(gpio9), 140 - BCM6328_GROUP(gpio10), 141 - BCM6328_GROUP(gpio11), 142 - BCM6328_GROUP(gpio12), 143 - BCM6328_GROUP(gpio13), 144 - BCM6328_GROUP(gpio14), 145 - BCM6328_GROUP(gpio15), 146 - BCM6328_GROUP(gpio16), 147 - BCM6328_GROUP(gpio17), 148 - BCM6328_GROUP(gpio18), 149 - BCM6328_GROUP(gpio19), 150 - BCM6328_GROUP(gpio20), 151 - BCM6328_GROUP(gpio21), 152 - BCM6328_GROUP(gpio22), 153 - BCM6328_GROUP(gpio23), 154 - BCM6328_GROUP(gpio24), 155 - BCM6328_GROUP(gpio25), 156 - BCM6328_GROUP(gpio26), 157 - BCM6328_GROUP(gpio27), 158 - BCM6328_GROUP(gpio28), 159 - BCM6328_GROUP(gpio29), 160 - BCM6328_GROUP(gpio30), 161 - BCM6328_GROUP(gpio31), 162 - 163 - BCM6328_GROUP(hsspi_cs1), 164 - BCM6328_GROUP(usb_port1), 162 + BCM_PIN_GROUP(hsspi_cs1), 163 + BCM_PIN_GROUP(usb_port1), 165 164 }; 166 165 167 166 /* GPIO_MODE */ ··· 279 292 280 293 static int bcm6328_pinctrl_get_group_pins(struct pinctrl_dev *pctldev, 281 294 unsigned group, const unsigned **pins, 282 - unsigned *num_pins) 295 + unsigned *npins) 283 296 { 284 297 *pins = bcm6328_groups[group].pins; 285 - *num_pins = bcm6328_groups[group].num_pins; 298 + *npins = bcm6328_groups[group].npins; 286 299 287 300 return 0; 288 301 } ··· 325 338 unsigned selector, unsigned group) 326 339 { 327 340 struct bcm63xx_pinctrl *pc = pinctrl_dev_get_drvdata(pctldev); 328 - const struct bcm6328_pingroup *pg = &bcm6328_groups[group]; 341 + const struct pingroup *pg = &bcm6328_groups[group]; 329 342 const struct bcm6328_function *f = &bcm6328_funcs[selector]; 330 343 331 344 bcm6328_rmw_mux(pc, pg->pins[0], f->mode_val, f->mux_val);
+8 -12
drivers/pinctrl/bcm/pinctrl-bcm6358.c
··· 35 35 #define BCM6358_MODE_MUX_SYS_IRQ BIT(15) 36 36 37 37 struct bcm6358_pingroup { 38 - const char *name; 39 - const unsigned * const pins; 40 - const unsigned num_pins; 38 + struct pingroup grp; 41 39 42 40 const uint16_t mode_val; 43 41 ··· 129 131 130 132 #define BCM6358_GPIO_MUX_GROUP(n, bit, dir) \ 131 133 { \ 132 - .name = #n, \ 133 - .pins = n##_pins, \ 134 - .num_pins = ARRAY_SIZE(n##_pins), \ 134 + .grp = BCM_PIN_GROUP(n), \ 135 135 .mode_val = BCM6358_MODE_MUX_##bit, \ 136 136 .direction = dir, \ 137 137 } ··· 215 219 static const char *bcm6358_pinctrl_get_group_name(struct pinctrl_dev *pctldev, 216 220 unsigned group) 217 221 { 218 - return bcm6358_groups[group].name; 222 + return bcm6358_groups[group].grp.name; 219 223 } 220 224 221 225 static int bcm6358_pinctrl_get_group_pins(struct pinctrl_dev *pctldev, 222 226 unsigned group, const unsigned **pins, 223 - unsigned *num_pins) 227 + unsigned *npins) 224 228 { 225 - *pins = bcm6358_groups[group].pins; 226 - *num_pins = bcm6358_groups[group].num_pins; 229 + *pins = bcm6358_groups[group].grp.pins; 230 + *npins = bcm6358_groups[group].grp.npins; 227 231 228 232 return 0; 229 233 } ··· 260 264 unsigned int mask = val; 261 265 unsigned pin; 262 266 263 - for (pin = 0; pin < pg->num_pins; pin++) 267 + for (pin = 0; pin < pg->grp.npins; pin++) 264 268 mask |= (unsigned long)bcm6358_pins[pin].drv_data; 265 269 266 270 regmap_field_update_bits(priv->overlays, mask, val); 267 271 268 - for (pin = 0; pin < pg->num_pins; pin++) { 272 + for (pin = 0; pin < pg->grp.npins; pin++) { 269 273 struct pinctrl_gpio_range *range; 270 274 unsigned int hw_gpio = bcm6358_pins[pin].number; 271 275
+54 -67
drivers/pinctrl/bcm/pinctrl-bcm6362.c
··· 35 35 BCM6362_BASEMODE, 36 36 }; 37 37 38 - struct bcm6362_pingroup { 39 - const char *name; 40 - const unsigned * const pins; 41 - const unsigned num_pins; 42 - }; 43 - 44 38 struct bcm6362_function { 45 39 const char *name; 46 40 const char * const *groups; ··· 156 162 18, 19, 20, 21, 22, 23, 27, 157 163 }; 158 164 159 - #define BCM6362_GROUP(n) \ 160 - { \ 161 - .name = #n, \ 162 - .pins = n##_pins, \ 163 - .num_pins = ARRAY_SIZE(n##_pins), \ 164 - } 165 - 166 - static struct bcm6362_pingroup bcm6362_groups[] = { 167 - BCM6362_GROUP(gpio0), 168 - BCM6362_GROUP(gpio1), 169 - BCM6362_GROUP(gpio2), 170 - BCM6362_GROUP(gpio3), 171 - BCM6362_GROUP(gpio4), 172 - BCM6362_GROUP(gpio5), 173 - BCM6362_GROUP(gpio6), 174 - BCM6362_GROUP(gpio7), 175 - BCM6362_GROUP(gpio8), 176 - BCM6362_GROUP(gpio9), 177 - BCM6362_GROUP(gpio10), 178 - BCM6362_GROUP(gpio11), 179 - BCM6362_GROUP(gpio12), 180 - BCM6362_GROUP(gpio13), 181 - BCM6362_GROUP(gpio14), 182 - BCM6362_GROUP(gpio15), 183 - BCM6362_GROUP(gpio16), 184 - BCM6362_GROUP(gpio17), 185 - BCM6362_GROUP(gpio18), 186 - BCM6362_GROUP(gpio19), 187 - BCM6362_GROUP(gpio20), 188 - BCM6362_GROUP(gpio21), 189 - BCM6362_GROUP(gpio22), 190 - BCM6362_GROUP(gpio23), 191 - BCM6362_GROUP(gpio24), 192 - BCM6362_GROUP(gpio25), 193 - BCM6362_GROUP(gpio26), 194 - BCM6362_GROUP(gpio27), 195 - BCM6362_GROUP(gpio28), 196 - BCM6362_GROUP(gpio29), 197 - BCM6362_GROUP(gpio30), 198 - BCM6362_GROUP(gpio31), 199 - BCM6362_GROUP(gpio32), 200 - BCM6362_GROUP(gpio33), 201 - BCM6362_GROUP(gpio34), 202 - BCM6362_GROUP(gpio35), 203 - BCM6362_GROUP(gpio36), 204 - BCM6362_GROUP(gpio37), 205 - BCM6362_GROUP(gpio38), 206 - BCM6362_GROUP(gpio39), 207 - BCM6362_GROUP(gpio40), 208 - BCM6362_GROUP(gpio41), 209 - BCM6362_GROUP(gpio42), 210 - BCM6362_GROUP(gpio43), 211 - BCM6362_GROUP(gpio44), 212 - BCM6362_GROUP(gpio45), 213 - BCM6362_GROUP(gpio46), 214 - BCM6362_GROUP(gpio47), 215 - BCM6362_GROUP(nand_grp), 165 + static struct pingroup bcm6362_groups[] = { 166 + BCM_PIN_GROUP(gpio0), 167 + BCM_PIN_GROUP(gpio1), 168 + BCM_PIN_GROUP(gpio2), 169 + BCM_PIN_GROUP(gpio3), 170 + BCM_PIN_GROUP(gpio4), 171 + BCM_PIN_GROUP(gpio5), 172 + BCM_PIN_GROUP(gpio6), 173 + BCM_PIN_GROUP(gpio7), 174 + BCM_PIN_GROUP(gpio8), 175 + BCM_PIN_GROUP(gpio9), 176 + BCM_PIN_GROUP(gpio10), 177 + BCM_PIN_GROUP(gpio11), 178 + BCM_PIN_GROUP(gpio12), 179 + BCM_PIN_GROUP(gpio13), 180 + BCM_PIN_GROUP(gpio14), 181 + BCM_PIN_GROUP(gpio15), 182 + BCM_PIN_GROUP(gpio16), 183 + BCM_PIN_GROUP(gpio17), 184 + BCM_PIN_GROUP(gpio18), 185 + BCM_PIN_GROUP(gpio19), 186 + BCM_PIN_GROUP(gpio20), 187 + BCM_PIN_GROUP(gpio21), 188 + BCM_PIN_GROUP(gpio22), 189 + BCM_PIN_GROUP(gpio23), 190 + BCM_PIN_GROUP(gpio24), 191 + BCM_PIN_GROUP(gpio25), 192 + BCM_PIN_GROUP(gpio26), 193 + BCM_PIN_GROUP(gpio27), 194 + BCM_PIN_GROUP(gpio28), 195 + BCM_PIN_GROUP(gpio29), 196 + BCM_PIN_GROUP(gpio30), 197 + BCM_PIN_GROUP(gpio31), 198 + BCM_PIN_GROUP(gpio32), 199 + BCM_PIN_GROUP(gpio33), 200 + BCM_PIN_GROUP(gpio34), 201 + BCM_PIN_GROUP(gpio35), 202 + BCM_PIN_GROUP(gpio36), 203 + BCM_PIN_GROUP(gpio37), 204 + BCM_PIN_GROUP(gpio38), 205 + BCM_PIN_GROUP(gpio39), 206 + BCM_PIN_GROUP(gpio40), 207 + BCM_PIN_GROUP(gpio41), 208 + BCM_PIN_GROUP(gpio42), 209 + BCM_PIN_GROUP(gpio43), 210 + BCM_PIN_GROUP(gpio44), 211 + BCM_PIN_GROUP(gpio45), 212 + BCM_PIN_GROUP(gpio46), 213 + BCM_PIN_GROUP(gpio47), 214 + BCM_PIN_GROUP(nand_grp), 216 215 }; 217 216 218 217 static const char * const led_groups[] = { ··· 450 463 451 464 static int bcm6362_pinctrl_get_group_pins(struct pinctrl_dev *pctldev, 452 465 unsigned group, const unsigned **pins, 453 - unsigned *num_pins) 466 + unsigned *npins) 454 467 { 455 468 *pins = bcm6362_groups[group].pins; 456 - *num_pins = bcm6362_groups[group].num_pins; 469 + *npins = bcm6362_groups[group].npins; 457 470 458 471 return 0; 459 472 } ··· 506 519 unsigned selector, unsigned group) 507 520 { 508 521 struct bcm63xx_pinctrl *pc = pinctrl_dev_get_drvdata(pctldev); 509 - const struct bcm6362_pingroup *pg = &bcm6362_groups[group]; 522 + const struct pingroup *pg = &bcm6362_groups[group]; 510 523 const struct bcm6362_function *f = &bcm6362_funcs[selector]; 511 524 unsigned i; 512 525 unsigned int reg; 513 526 unsigned int val, mask; 514 527 515 - for (i = 0; i < pg->num_pins; i++) 528 + for (i = 0; i < pg->npins; i++) 516 529 bcm6362_set_gpio(pc, pg->pins[i]); 517 530 518 531 switch (f->reg) {
+39 -52
drivers/pinctrl/bcm/pinctrl-bcm6368.c
··· 26 26 #define BCM6368_BASEMODE_GPIO 0x0 27 27 #define BCM6368_BASEMODE_UART1 0x1 28 28 29 - struct bcm6368_pingroup { 30 - const char *name; 31 - const unsigned * const pins; 32 - const unsigned num_pins; 33 - }; 34 - 35 29 struct bcm6368_function { 36 30 const char *name; 37 31 const char * const *groups; ··· 121 127 static unsigned gpio31_pins[] = { 31 }; 122 128 static unsigned uart1_grp_pins[] = { 30, 31, 32, 33 }; 123 129 124 - #define BCM6368_GROUP(n) \ 125 - { \ 126 - .name = #n, \ 127 - .pins = n##_pins, \ 128 - .num_pins = ARRAY_SIZE(n##_pins), \ 129 - } 130 - 131 - static struct bcm6368_pingroup bcm6368_groups[] = { 132 - BCM6368_GROUP(gpio0), 133 - BCM6368_GROUP(gpio1), 134 - BCM6368_GROUP(gpio2), 135 - BCM6368_GROUP(gpio3), 136 - BCM6368_GROUP(gpio4), 137 - BCM6368_GROUP(gpio5), 138 - BCM6368_GROUP(gpio6), 139 - BCM6368_GROUP(gpio7), 140 - BCM6368_GROUP(gpio8), 141 - BCM6368_GROUP(gpio9), 142 - BCM6368_GROUP(gpio10), 143 - BCM6368_GROUP(gpio11), 144 - BCM6368_GROUP(gpio12), 145 - BCM6368_GROUP(gpio13), 146 - BCM6368_GROUP(gpio14), 147 - BCM6368_GROUP(gpio15), 148 - BCM6368_GROUP(gpio16), 149 - BCM6368_GROUP(gpio17), 150 - BCM6368_GROUP(gpio18), 151 - BCM6368_GROUP(gpio19), 152 - BCM6368_GROUP(gpio20), 153 - BCM6368_GROUP(gpio21), 154 - BCM6368_GROUP(gpio22), 155 - BCM6368_GROUP(gpio23), 156 - BCM6368_GROUP(gpio24), 157 - BCM6368_GROUP(gpio25), 158 - BCM6368_GROUP(gpio26), 159 - BCM6368_GROUP(gpio27), 160 - BCM6368_GROUP(gpio28), 161 - BCM6368_GROUP(gpio29), 162 - BCM6368_GROUP(gpio30), 163 - BCM6368_GROUP(gpio31), 164 - BCM6368_GROUP(uart1_grp), 130 + static struct pingroup bcm6368_groups[] = { 131 + BCM_PIN_GROUP(gpio0), 132 + BCM_PIN_GROUP(gpio1), 133 + BCM_PIN_GROUP(gpio2), 134 + BCM_PIN_GROUP(gpio3), 135 + BCM_PIN_GROUP(gpio4), 136 + BCM_PIN_GROUP(gpio5), 137 + BCM_PIN_GROUP(gpio6), 138 + BCM_PIN_GROUP(gpio7), 139 + BCM_PIN_GROUP(gpio8), 140 + BCM_PIN_GROUP(gpio9), 141 + BCM_PIN_GROUP(gpio10), 142 + BCM_PIN_GROUP(gpio11), 143 + BCM_PIN_GROUP(gpio12), 144 + BCM_PIN_GROUP(gpio13), 145 + BCM_PIN_GROUP(gpio14), 146 + BCM_PIN_GROUP(gpio15), 147 + BCM_PIN_GROUP(gpio16), 148 + BCM_PIN_GROUP(gpio17), 149 + BCM_PIN_GROUP(gpio18), 150 + BCM_PIN_GROUP(gpio19), 151 + BCM_PIN_GROUP(gpio20), 152 + BCM_PIN_GROUP(gpio21), 153 + BCM_PIN_GROUP(gpio22), 154 + BCM_PIN_GROUP(gpio23), 155 + BCM_PIN_GROUP(gpio24), 156 + BCM_PIN_GROUP(gpio25), 157 + BCM_PIN_GROUP(gpio26), 158 + BCM_PIN_GROUP(gpio27), 159 + BCM_PIN_GROUP(gpio28), 160 + BCM_PIN_GROUP(gpio29), 161 + BCM_PIN_GROUP(gpio30), 162 + BCM_PIN_GROUP(gpio31), 163 + BCM_PIN_GROUP(uart1_grp), 165 164 }; 166 165 167 166 static const char * const analog_afe_0_groups[] = { ··· 345 358 346 359 static int bcm6368_pinctrl_get_group_pins(struct pinctrl_dev *pctldev, 347 360 unsigned group, const unsigned **pins, 348 - unsigned *num_pins) 361 + unsigned *npins) 349 362 { 350 363 *pins = bcm6368_groups[group].pins; 351 - *num_pins = bcm6368_groups[group].num_pins; 364 + *npins = bcm6368_groups[group].npins; 352 365 353 366 return 0; 354 367 } ··· 380 393 { 381 394 struct bcm63xx_pinctrl *pc = pinctrl_dev_get_drvdata(pctldev); 382 395 struct bcm6368_priv *priv = pc->driver_data; 383 - const struct bcm6368_pingroup *pg = &bcm6368_groups[group]; 396 + const struct pingroup *pg = &bcm6368_groups[group]; 384 397 const struct bcm6368_function *fun = &bcm6368_funcs[selector]; 385 398 int i, pin; 386 399 387 400 if (fun->basemode) { 388 401 unsigned int mask = 0; 389 402 390 - for (i = 0; i < pg->num_pins; i++) { 403 + for (i = 0; i < pg->npins; i++) { 391 404 pin = pg->pins[i]; 392 405 if (pin < BCM63XX_BANK_GPIOS) 393 406 mask |= BIT(pin); ··· 406 419 BIT(pin)); 407 420 } 408 421 409 - for (pin = 0; pin < pg->num_pins; pin++) { 422 + for (pin = 0; pin < pg->npins; pin++) { 410 423 struct pinctrl_gpio_range *range; 411 424 int hw_gpio = bcm6368_pins[pin].number; 412 425
+2
drivers/pinctrl/bcm/pinctrl-bcm63xx.h
··· 21 21 unsigned int ngpios; 22 22 }; 23 23 24 + #define BCM_PIN_GROUP(n) PINCTRL_PINGROUP(#n, n##_pins, ARRAY_SIZE(n##_pins)) 25 + 24 26 struct bcm63xx_pinctrl { 25 27 struct device *dev; 26 28 struct regmap *regs;
+1 -3
drivers/pinctrl/bcm/pinctrl-ns.c
··· 233 233 res = platform_get_resource_byname(pdev, IORESOURCE_MEM, 234 234 "cru_gpio_control"); 235 235 ns_pinctrl->base = devm_ioremap_resource(dev, res); 236 - if (IS_ERR(ns_pinctrl->base)) { 237 - dev_err(dev, "Failed to map pinctrl regs\n"); 236 + if (IS_ERR(ns_pinctrl->base)) 238 237 return PTR_ERR(ns_pinctrl->base); 239 - } 240 238 241 239 memcpy(pctldesc, &ns_pinctrl_desc, sizeof(*pctldesc)); 242 240
+1 -1
drivers/pinctrl/berlin/berlin.c
··· 209 209 210 210 for (i = 0; i < pctrl->desc->ngroups; i++) { 211 211 desc_group = pctrl->desc->groups + i; 212 - /* compute the maxiumum number of functions a group can have */ 212 + /* compute the maximum number of functions a group can have */ 213 213 max_functions += 1 << (desc_group->bit_width + 1); 214 214 } 215 215
+8 -4
drivers/pinctrl/freescale/Kconfig
··· 119 119 120 120 config PINCTRL_IMX8MM 121 121 tristate "IMX8MM pinctrl driver" 122 - depends on ARCH_MXC 122 + depends on OF 123 + depends on SOC_IMX8M 123 124 select PINCTRL_IMX 124 125 help 125 126 Say Y here to enable the imx8mm pinctrl driver 126 127 127 128 config PINCTRL_IMX8MN 128 129 tristate "IMX8MN pinctrl driver" 129 - depends on ARCH_MXC 130 + depends on OF 131 + depends on SOC_IMX8M 130 132 select PINCTRL_IMX 131 133 help 132 134 Say Y here to enable the imx8mn pinctrl driver 133 135 134 136 config PINCTRL_IMX8MP 135 137 tristate "IMX8MP pinctrl driver" 136 - depends on ARCH_MXC 138 + depends on OF 139 + depends on SOC_IMX8M 137 140 select PINCTRL_IMX 138 141 help 139 142 Say Y here to enable the imx8mp pinctrl driver 140 143 141 144 config PINCTRL_IMX8MQ 142 145 tristate "IMX8MQ pinctrl driver" 143 - depends on ARCH_MXC 146 + depends on OF 147 + depends on SOC_IMX8M 144 148 select PINCTRL_IMX 145 149 help 146 150 Say Y here to enable the imx8mq pinctrl driver
+12
drivers/pinctrl/mediatek/Kconfig
··· 162 162 default ARM64 && ARCH_MEDIATEK 163 163 select PINCTRL_MTK_PARIS 164 164 165 + config PINCTRL_MT8188 166 + bool "MediaTek MT8188 pin control" 167 + depends on OF 168 + depends on ARM64 || COMPILE_TEST 169 + default ARM64 && ARCH_MEDIATEK 170 + select PINCTRL_MTK_PARIS 171 + help 172 + Say yes here to support pin controller and gpio driver 173 + on MediaTek MT8188 SoC. 174 + In MTK platform, we support virtual gpio and use it to 175 + map specific eint which doesn't have real gpio pin. 176 + 165 177 config PINCTRL_MT8192 166 178 bool "Mediatek MT8192 pin control" 167 179 depends on OF
+1
drivers/pinctrl/mediatek/Makefile
··· 23 23 obj-$(CONFIG_PINCTRL_MT8173) += pinctrl-mt8173.o 24 24 obj-$(CONFIG_PINCTRL_MT8183) += pinctrl-mt8183.o 25 25 obj-$(CONFIG_PINCTRL_MT8186) += pinctrl-mt8186.o 26 + obj-$(CONFIG_PINCTRL_MT8188) += pinctrl-mt8188.o 26 27 obj-$(CONFIG_PINCTRL_MT8192) += pinctrl-mt8192.o 27 28 obj-$(CONFIG_PINCTRL_MT8195) += pinctrl-mt8195.o 28 29 obj-$(CONFIG_PINCTRL_MT8365) += pinctrl-mt8365.o
+1673
drivers/pinctrl/mediatek/pinctrl-mt8188.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 2 + /* 3 + * Copyright (C) 2022 MediaTek Inc. 4 + * Author: Hui Liu <hui.liu@mediatek.com> 5 + * 6 + */ 7 + 8 + #include <linux/module.h> 9 + #include "pinctrl-mtk-mt8188.h" 10 + #include "pinctrl-paris.h" 11 + 12 + /* MT8188 have multiple bases to program pin configuration listed as the below: 13 + * iocfg[0]:0x10005000, iocfg[1]:0x11c00000, iocfg[2]:0x11e10000, 14 + * iocfg[3]:0x11e20000, iocfg[4]:0x11ea0000 15 + * _i_based could be used to indicate what base the pin should be mapped into. 16 + */ 17 + 18 + #define PIN_FIELD_BASE(s_pin, e_pin, i_base, s_addr, x_addrs, s_bit, x_bits) \ 19 + PIN_FIELD_CALC(s_pin, e_pin, i_base, s_addr, x_addrs, s_bit, x_bits, \ 20 + 32, 0) 21 + 22 + #define PINS_FIELD_BASE(s_pin, e_pin, i_base, s_addr, x_addrs, s_bit, x_bits) \ 23 + PIN_FIELD_CALC(s_pin, e_pin, i_base, s_addr, x_addrs, s_bit, x_bits, \ 24 + 32, 1) 25 + 26 + static const struct mtk_pin_field_calc mt8188_pin_mode_range[] = { 27 + PIN_FIELD(0, 177, 0x0300, 0x10, 0, 4), 28 + }; 29 + 30 + static const struct mtk_pin_field_calc mt8188_pin_dir_range[] = { 31 + PIN_FIELD(0, 177, 0x0000, 0x10, 0, 1), 32 + }; 33 + 34 + static const struct mtk_pin_field_calc mt8188_pin_di_range[] = { 35 + PIN_FIELD(0, 177, 0x0200, 0x10, 0, 1), 36 + }; 37 + 38 + static const struct mtk_pin_field_calc mt8188_pin_do_range[] = { 39 + PIN_FIELD(0, 177, 0x0100, 0x10, 0, 1), 40 + }; 41 + 42 + static const struct mtk_pin_field_calc mt8188_pin_smt_range[] = { 43 + PIN_FIELD_BASE(0, 0, 1, 0x0170, 0x10, 8, 1), 44 + PIN_FIELD_BASE(1, 1, 1, 0x0170, 0x10, 9, 1), 45 + PIN_FIELD_BASE(2, 2, 1, 0x0170, 0x10, 10, 1), 46 + PIN_FIELD_BASE(3, 3, 1, 0x0170, 0x10, 11, 1), 47 + PIN_FIELD_BASE(4, 4, 1, 0x0170, 0x10, 18, 1), 48 + PIN_FIELD_BASE(5, 5, 1, 0x0170, 0x10, 18, 1), 49 + PIN_FIELD_BASE(6, 6, 1, 0x0170, 0x10, 18, 1), 50 + PIN_FIELD_BASE(7, 7, 1, 0x0170, 0x10, 12, 1), 51 + PIN_FIELD_BASE(8, 8, 1, 0x0170, 0x10, 13, 1), 52 + PIN_FIELD_BASE(9, 9, 1, 0x0170, 0x10, 14, 1), 53 + PIN_FIELD_BASE(10, 10, 1, 0x0170, 0x10, 15, 1), 54 + PIN_FIELD_BASE(11, 11, 1, 0x0170, 0x10, 19, 1), 55 + PIN_FIELD_BASE(12, 12, 2, 0x0160, 0x10, 12, 1), 56 + PIN_FIELD_BASE(13, 13, 2, 0x0160, 0x10, 13, 1), 57 + PIN_FIELD_BASE(14, 14, 2, 0x0160, 0x10, 14, 1), 58 + PIN_FIELD_BASE(15, 15, 2, 0x0160, 0x10, 15, 1), 59 + PIN_FIELD_BASE(16, 16, 3, 0x00d0, 0x10, 10, 1), 60 + PIN_FIELD_BASE(17, 17, 3, 0x00d0, 0x10, 10, 1), 61 + PIN_FIELD_BASE(18, 18, 4, 0x00e0, 0x10, 9, 1), 62 + PIN_FIELD_BASE(19, 19, 4, 0x00e0, 0x10, 9, 1), 63 + PIN_FIELD_BASE(20, 20, 4, 0x00e0, 0x10, 9, 1), 64 + PIN_FIELD_BASE(21, 21, 4, 0x00e0, 0x10, 9, 1), 65 + PIN_FIELD_BASE(22, 22, 4, 0x00e0, 0x10, 0, 1), 66 + PIN_FIELD_BASE(23, 23, 4, 0x00e0, 0x10, 1, 1), 67 + PIN_FIELD_BASE(24, 24, 4, 0x00e0, 0x10, 2, 1), 68 + PIN_FIELD_BASE(25, 25, 1, 0x0170, 0x10, 17, 1), 69 + PIN_FIELD_BASE(26, 26, 1, 0x0170, 0x10, 17, 1), 70 + PIN_FIELD_BASE(27, 27, 1, 0x0170, 0x10, 17, 1), 71 + PIN_FIELD_BASE(28, 28, 1, 0x0170, 0x10, 18, 1), 72 + PIN_FIELD_BASE(29, 29, 1, 0x0170, 0x10, 16, 1), 73 + PIN_FIELD_BASE(30, 30, 1, 0x0170, 0x10, 17, 1), 74 + PIN_FIELD_BASE(31, 31, 1, 0x0170, 0x10, 19, 1), 75 + PIN_FIELD_BASE(32, 32, 1, 0x0170, 0x10, 19, 1), 76 + PIN_FIELD_BASE(33, 33, 1, 0x0170, 0x10, 20, 1), 77 + PIN_FIELD_BASE(34, 34, 1, 0x0170, 0x10, 20, 1), 78 + PIN_FIELD_BASE(35, 35, 1, 0x0170, 0x10, 19, 1), 79 + PIN_FIELD_BASE(36, 36, 1, 0x0170, 0x10, 20, 1), 80 + PIN_FIELD_BASE(37, 37, 1, 0x0170, 0x10, 21, 1), 81 + PIN_FIELD_BASE(38, 38, 1, 0x0170, 0x10, 20, 1), 82 + PIN_FIELD_BASE(39, 39, 1, 0x0170, 0x10, 21, 1), 83 + PIN_FIELD_BASE(40, 40, 1, 0x0170, 0x10, 21, 1), 84 + PIN_FIELD_BASE(41, 41, 1, 0x0170, 0x10, 21, 1), 85 + PIN_FIELD_BASE(42, 42, 2, 0x0160, 0x10, 21, 1), 86 + PIN_FIELD_BASE(43, 43, 2, 0x0160, 0x10, 22, 1), 87 + PIN_FIELD_BASE(44, 44, 2, 0x0160, 0x10, 21, 1), 88 + PIN_FIELD_BASE(45, 45, 2, 0x0160, 0x10, 22, 1), 89 + PIN_FIELD_BASE(46, 46, 3, 0x00d0, 0x10, 10, 1), 90 + PIN_FIELD_BASE(47, 47, 1, 0x0170, 0x10, 16, 1), 91 + PIN_FIELD_BASE(48, 48, 1, 0x0170, 0x10, 16, 1), 92 + PIN_FIELD_BASE(49, 49, 1, 0x0170, 0x10, 16, 1), 93 + PIN_FIELD_BASE(50, 50, 3, 0x00d0, 0x10, 10, 1), 94 + PIN_FIELD_BASE(51, 51, 3, 0x00d0, 0x10, 11, 1), 95 + PIN_FIELD_BASE(52, 52, 3, 0x00d0, 0x10, 11, 1), 96 + PIN_FIELD_BASE(53, 53, 3, 0x00d0, 0x10, 11, 1), 97 + PIN_FIELD_BASE(54, 54, 3, 0x00d0, 0x10, 11, 1), 98 + PIN_FIELD_BASE(55, 55, 1, 0x0170, 0x10, 25, 1), 99 + PIN_FIELD_BASE(56, 56, 1, 0x0170, 0x10, 28, 1), 100 + PIN_FIELD_BASE(57, 57, 2, 0x0160, 0x10, 29, 1), 101 + PIN_FIELD_BASE(58, 58, 2, 0x0160, 0x10, 31, 1), 102 + PIN_FIELD_BASE(59, 59, 1, 0x0170, 0x10, 26, 1), 103 + PIN_FIELD_BASE(60, 60, 1, 0x0170, 0x10, 29, 1), 104 + PIN_FIELD_BASE(61, 61, 1, 0x0170, 0x10, 27, 1), 105 + PIN_FIELD_BASE(62, 62, 1, 0x0170, 0x10, 30, 1), 106 + PIN_FIELD_BASE(63, 63, 2, 0x0160, 0x10, 30, 1), 107 + PIN_FIELD_BASE(64, 64, 2, 0x0170, 0x10, 0, 1), 108 + PIN_FIELD_BASE(65, 65, 4, 0x00e0, 0x10, 10, 1), 109 + PIN_FIELD_BASE(66, 66, 4, 0x00e0, 0x10, 12, 1), 110 + PIN_FIELD_BASE(67, 67, 4, 0x00e0, 0x10, 11, 1), 111 + PIN_FIELD_BASE(68, 68, 4, 0x00e0, 0x10, 13, 1), 112 + PIN_FIELD_BASE(69, 69, 1, 0x0180, 0x10, 0, 1), 113 + PIN_FIELD_BASE(70, 70, 1, 0x0170, 0x10, 31, 1), 114 + PIN_FIELD_BASE(71, 71, 1, 0x0180, 0x10, 4, 1), 115 + PIN_FIELD_BASE(72, 72, 1, 0x0180, 0x10, 3, 1), 116 + PIN_FIELD_BASE(73, 73, 1, 0x0180, 0x10, 1, 1), 117 + PIN_FIELD_BASE(74, 74, 1, 0x0180, 0x10, 2, 1), 118 + PIN_FIELD_BASE(75, 75, 1, 0x0180, 0x10, 6, 1), 119 + PIN_FIELD_BASE(76, 76, 1, 0x0180, 0x10, 5, 1), 120 + PIN_FIELD_BASE(77, 77, 1, 0x0180, 0x10, 8, 1), 121 + PIN_FIELD_BASE(78, 78, 1, 0x0180, 0x10, 7, 1), 122 + PIN_FIELD_BASE(79, 79, 4, 0x00e0, 0x10, 15, 1), 123 + PIN_FIELD_BASE(80, 80, 4, 0x00e0, 0x10, 14, 1), 124 + PIN_FIELD_BASE(81, 81, 4, 0x00e0, 0x10, 17, 1), 125 + PIN_FIELD_BASE(82, 82, 4, 0x00e0, 0x10, 16, 1), 126 + PIN_FIELD_BASE(83, 83, 2, 0x0160, 0x10, 26, 1), 127 + PIN_FIELD_BASE(84, 84, 2, 0x0160, 0x10, 26, 1), 128 + PIN_FIELD_BASE(85, 85, 2, 0x0160, 0x10, 27, 1), 129 + PIN_FIELD_BASE(86, 86, 2, 0x0160, 0x10, 17, 1), 130 + PIN_FIELD_BASE(87, 87, 2, 0x0160, 0x10, 17, 1), 131 + PIN_FIELD_BASE(88, 88, 2, 0x0160, 0x10, 17, 1), 132 + PIN_FIELD_BASE(89, 89, 2, 0x0160, 0x10, 17, 1), 133 + PIN_FIELD_BASE(90, 90, 2, 0x0160, 0x10, 27, 1), 134 + PIN_FIELD_BASE(91, 91, 2, 0x0160, 0x10, 27, 1), 135 + PIN_FIELD_BASE(92, 92, 2, 0x0160, 0x10, 18, 1), 136 + PIN_FIELD_BASE(93, 93, 2, 0x0160, 0x10, 18, 1), 137 + PIN_FIELD_BASE(94, 94, 2, 0x0160, 0x10, 18, 1), 138 + PIN_FIELD_BASE(95, 95, 2, 0x0160, 0x10, 18, 1), 139 + PIN_FIELD_BASE(96, 96, 2, 0x0160, 0x10, 22, 1), 140 + PIN_FIELD_BASE(97, 97, 2, 0x0160, 0x10, 23, 1), 141 + PIN_FIELD_BASE(98, 98, 2, 0x0160, 0x10, 24, 1), 142 + PIN_FIELD_BASE(99, 99, 2, 0x0160, 0x10, 22, 1), 143 + PIN_FIELD_BASE(100, 100, 2, 0x0160, 0x10, 16, 1), 144 + PIN_FIELD_BASE(101, 101, 2, 0x0160, 0x10, 23, 1), 145 + PIN_FIELD_BASE(102, 102, 2, 0x0160, 0x10, 23, 1), 146 + PIN_FIELD_BASE(103, 103, 2, 0x0160, 0x10, 23, 1), 147 + PIN_FIELD_BASE(104, 104, 2, 0x0160, 0x10, 24, 1), 148 + PIN_FIELD_BASE(105, 105, 2, 0x0160, 0x10, 24, 1), 149 + PIN_FIELD_BASE(106, 106, 2, 0x0160, 0x10, 24, 1), 150 + PIN_FIELD_BASE(107, 107, 2, 0x0160, 0x10, 17, 1), 151 + PIN_FIELD_BASE(108, 108, 2, 0x0160, 0x10, 17, 1), 152 + PIN_FIELD_BASE(109, 109, 2, 0x0160, 0x10, 17, 1), 153 + PIN_FIELD_BASE(110, 110, 2, 0x0160, 0x10, 17, 1), 154 + PIN_FIELD_BASE(111, 111, 2, 0x0160, 0x10, 19, 1), 155 + PIN_FIELD_BASE(112, 112, 2, 0x0160, 0x10, 19, 1), 156 + PIN_FIELD_BASE(113, 113, 2, 0x0160, 0x10, 19, 1), 157 + PIN_FIELD_BASE(114, 114, 2, 0x0160, 0x10, 19, 1), 158 + PIN_FIELD_BASE(115, 115, 2, 0x0160, 0x10, 20, 1), 159 + PIN_FIELD_BASE(116, 116, 2, 0x0160, 0x10, 20, 1), 160 + PIN_FIELD_BASE(117, 117, 2, 0x0160, 0x10, 20, 1), 161 + PIN_FIELD_BASE(118, 118, 2, 0x0160, 0x10, 20, 1), 162 + PIN_FIELD_BASE(119, 119, 2, 0x0160, 0x10, 21, 1), 163 + PIN_FIELD_BASE(120, 120, 2, 0x0160, 0x10, 21, 1), 164 + PIN_FIELD_BASE(121, 121, 3, 0x00d0, 0x10, 6, 1), 165 + PIN_FIELD_BASE(122, 122, 3, 0x00d0, 0x10, 9, 1), 166 + PIN_FIELD_BASE(123, 123, 3, 0x00d0, 0x10, 8, 1), 167 + PIN_FIELD_BASE(124, 124, 3, 0x00d0, 0x10, 7, 1), 168 + PIN_FIELD_BASE(125, 125, 2, 0x0160, 0x10, 25, 1), 169 + PIN_FIELD_BASE(126, 126, 2, 0x0160, 0x10, 25, 1), 170 + PIN_FIELD_BASE(127, 127, 2, 0x0160, 0x10, 25, 1), 171 + PIN_FIELD_BASE(128, 128, 2, 0x0160, 0x10, 25, 1), 172 + PIN_FIELD_BASE(129, 129, 2, 0x0160, 0x10, 26, 1), 173 + PIN_FIELD_BASE(130, 130, 2, 0x0160, 0x10, 26, 1), 174 + PIN_FIELD_BASE(131, 131, 1, 0x0170, 0x10, 0, 1), 175 + PIN_FIELD_BASE(132, 132, 1, 0x0170, 0x10, 1, 1), 176 + PIN_FIELD_BASE(133, 133, 1, 0x0170, 0x10, 6, 1), 177 + PIN_FIELD_BASE(134, 134, 1, 0x0170, 0x10, 7, 1), 178 + PIN_FIELD_BASE(135, 135, 1, 0x0170, 0x10, 22, 1), 179 + PIN_FIELD_BASE(136, 136, 1, 0x0170, 0x10, 22, 1), 180 + PIN_FIELD_BASE(137, 137, 1, 0x0170, 0x10, 22, 1), 181 + PIN_FIELD_BASE(138, 138, 1, 0x0170, 0x10, 22, 1), 182 + PIN_FIELD_BASE(139, 139, 1, 0x0170, 0x10, 23, 1), 183 + PIN_FIELD_BASE(140, 140, 1, 0x0170, 0x10, 23, 1), 184 + PIN_FIELD_BASE(141, 141, 1, 0x0170, 0x10, 23, 1), 185 + PIN_FIELD_BASE(142, 142, 1, 0x0170, 0x10, 23, 1), 186 + PIN_FIELD_BASE(143, 143, 1, 0x0170, 0x10, 2, 1), 187 + PIN_FIELD_BASE(144, 144, 1, 0x0170, 0x10, 3, 1), 188 + PIN_FIELD_BASE(145, 145, 1, 0x0170, 0x10, 4, 1), 189 + PIN_FIELD_BASE(146, 146, 1, 0x0170, 0x10, 5, 1), 190 + PIN_FIELD_BASE(147, 147, 1, 0x0170, 0x10, 24, 1), 191 + PIN_FIELD_BASE(148, 148, 1, 0x0170, 0x10, 24, 1), 192 + PIN_FIELD_BASE(149, 149, 1, 0x0170, 0x10, 24, 1), 193 + PIN_FIELD_BASE(150, 150, 1, 0x0170, 0x10, 24, 1), 194 + PIN_FIELD_BASE(151, 151, 2, 0x0160, 0x10, 9, 1), 195 + PIN_FIELD_BASE(152, 152, 2, 0x0160, 0x10, 8, 1), 196 + PIN_FIELD_BASE(153, 153, 2, 0x0160, 0x10, 7, 1), 197 + PIN_FIELD_BASE(154, 154, 2, 0x0160, 0x10, 6, 1), 198 + PIN_FIELD_BASE(155, 155, 2, 0x0160, 0x10, 11, 1), 199 + PIN_FIELD_BASE(156, 156, 2, 0x0160, 0x10, 1, 1), 200 + PIN_FIELD_BASE(157, 157, 2, 0x0160, 0x10, 0, 1), 201 + PIN_FIELD_BASE(158, 158, 2, 0x0160, 0x10, 5, 1), 202 + PIN_FIELD_BASE(159, 159, 2, 0x0160, 0x10, 4, 1), 203 + PIN_FIELD_BASE(160, 160, 2, 0x0160, 0x10, 3, 1), 204 + PIN_FIELD_BASE(161, 161, 2, 0x0160, 0x10, 2, 1), 205 + PIN_FIELD_BASE(162, 162, 2, 0x0160, 0x10, 10, 1), 206 + PIN_FIELD_BASE(163, 163, 4, 0x00e0, 0x10, 4, 1), 207 + PIN_FIELD_BASE(164, 164, 4, 0x00e0, 0x10, 3, 1), 208 + PIN_FIELD_BASE(165, 165, 4, 0x00e0, 0x10, 5, 1), 209 + PIN_FIELD_BASE(166, 166, 4, 0x00e0, 0x10, 6, 1), 210 + PIN_FIELD_BASE(167, 167, 4, 0x00e0, 0x10, 7, 1), 211 + PIN_FIELD_BASE(168, 168, 4, 0x00e0, 0x10, 8, 1), 212 + PIN_FIELD_BASE(169, 169, 3, 0x00d0, 0x10, 1, 1), 213 + PIN_FIELD_BASE(170, 170, 3, 0x00d0, 0x10, 0, 1), 214 + PIN_FIELD_BASE(171, 171, 3, 0x00d0, 0x10, 2, 1), 215 + PIN_FIELD_BASE(172, 172, 3, 0x00d0, 0x10, 3, 1), 216 + PIN_FIELD_BASE(173, 173, 3, 0x00d0, 0x10, 4, 1), 217 + PIN_FIELD_BASE(174, 174, 3, 0x00d0, 0x10, 5, 1), 218 + PIN_FIELD_BASE(175, 175, 2, 0x0160, 0x10, 28, 1), 219 + PIN_FIELD_BASE(176, 176, 2, 0x0160, 0x10, 28, 1), 220 + }; 221 + 222 + static const struct mtk_pin_field_calc mt8188_pin_ies_range[] = { 223 + PIN_FIELD_BASE(0, 0, 1, 0x0080, 0x10, 26, 1), 224 + PIN_FIELD_BASE(1, 1, 1, 0x0080, 0x10, 27, 1), 225 + PIN_FIELD_BASE(2, 2, 1, 0x0080, 0x10, 28, 1), 226 + PIN_FIELD_BASE(3, 3, 1, 0x0080, 0x10, 29, 1), 227 + PIN_FIELD_BASE(4, 4, 1, 0x0080, 0x10, 30, 1), 228 + PIN_FIELD_BASE(5, 5, 1, 0x0080, 0x10, 31, 1), 229 + PIN_FIELD_BASE(6, 6, 1, 0x0090, 0x10, 0, 1), 230 + PIN_FIELD_BASE(7, 7, 1, 0x0090, 0x10, 1, 1), 231 + PIN_FIELD_BASE(8, 8, 1, 0x0090, 0x10, 2, 1), 232 + PIN_FIELD_BASE(9, 9, 1, 0x0090, 0x10, 3, 1), 233 + PIN_FIELD_BASE(10, 10, 1, 0x0090, 0x10, 4, 1), 234 + PIN_FIELD_BASE(11, 11, 1, 0x0090, 0x10, 5, 1), 235 + PIN_FIELD_BASE(12, 12, 2, 0x0070, 0x10, 24, 1), 236 + PIN_FIELD_BASE(13, 13, 2, 0x0070, 0x10, 25, 1), 237 + PIN_FIELD_BASE(14, 14, 2, 0x0070, 0x10, 26, 1), 238 + PIN_FIELD_BASE(15, 15, 2, 0x0070, 0x10, 27, 1), 239 + PIN_FIELD_BASE(16, 16, 3, 0x0040, 0x10, 1, 1), 240 + PIN_FIELD_BASE(17, 17, 3, 0x0040, 0x10, 2, 1), 241 + PIN_FIELD_BASE(18, 18, 4, 0x0050, 0x10, 3, 1), 242 + PIN_FIELD_BASE(19, 19, 4, 0x0050, 0x10, 5, 1), 243 + PIN_FIELD_BASE(20, 20, 4, 0x0050, 0x10, 4, 1), 244 + PIN_FIELD_BASE(21, 21, 4, 0x0050, 0x10, 6, 1), 245 + PIN_FIELD_BASE(22, 22, 4, 0x0050, 0x10, 0, 1), 246 + PIN_FIELD_BASE(23, 23, 4, 0x0050, 0x10, 1, 1), 247 + PIN_FIELD_BASE(24, 24, 4, 0x0050, 0x10, 2, 1), 248 + PIN_FIELD_BASE(25, 25, 1, 0x0080, 0x10, 23, 1), 249 + PIN_FIELD_BASE(26, 26, 1, 0x0080, 0x10, 22, 1), 250 + PIN_FIELD_BASE(27, 27, 1, 0x0080, 0x10, 25, 1), 251 + PIN_FIELD_BASE(28, 28, 1, 0x0080, 0x10, 24, 1), 252 + PIN_FIELD_BASE(29, 29, 1, 0x0080, 0x10, 0, 1), 253 + PIN_FIELD_BASE(30, 30, 1, 0x0080, 0x10, 1, 1), 254 + PIN_FIELD_BASE(31, 31, 1, 0x0090, 0x10, 31, 1), 255 + PIN_FIELD_BASE(32, 32, 1, 0x0090, 0x10, 30, 1), 256 + PIN_FIELD_BASE(33, 33, 1, 0x00a0, 0x10, 1, 1), 257 + PIN_FIELD_BASE(34, 34, 1, 0x00a0, 0x10, 0, 1), 258 + PIN_FIELD_BASE(35, 35, 1, 0x00a0, 0x10, 3, 1), 259 + PIN_FIELD_BASE(36, 36, 1, 0x00a0, 0x10, 2, 1), 260 + PIN_FIELD_BASE(37, 37, 1, 0x0090, 0x10, 9, 1), 261 + PIN_FIELD_BASE(38, 38, 1, 0x0090, 0x10, 6, 1), 262 + PIN_FIELD_BASE(39, 39, 1, 0x0090, 0x10, 7, 1), 263 + PIN_FIELD_BASE(40, 40, 1, 0x0090, 0x10, 8, 1), 264 + PIN_FIELD_BASE(41, 41, 1, 0x0090, 0x10, 10, 1), 265 + PIN_FIELD_BASE(42, 42, 2, 0x0080, 0x10, 10, 1), 266 + PIN_FIELD_BASE(43, 43, 2, 0x0080, 0x10, 11, 1), 267 + PIN_FIELD_BASE(44, 44, 2, 0x0080, 0x10, 12, 1), 268 + PIN_FIELD_BASE(45, 45, 2, 0x0080, 0x10, 13, 1), 269 + PIN_FIELD_BASE(46, 46, 3, 0x0040, 0x10, 0, 1), 270 + PIN_FIELD_BASE(47, 47, 1, 0x0090, 0x10, 13, 1), 271 + PIN_FIELD_BASE(48, 48, 1, 0x0090, 0x10, 12, 1), 272 + PIN_FIELD_BASE(49, 49, 1, 0x0090, 0x10, 11, 1), 273 + PIN_FIELD_BASE(50, 50, 3, 0x0040, 0x10, 5, 1), 274 + PIN_FIELD_BASE(51, 51, 3, 0x0040, 0x10, 4, 1), 275 + PIN_FIELD_BASE(52, 52, 3, 0x0040, 0x10, 3, 1), 276 + PIN_FIELD_BASE(53, 53, 3, 0x0040, 0x10, 6, 1), 277 + PIN_FIELD_BASE(54, 54, 3, 0x0040, 0x10, 7, 1), 278 + PIN_FIELD_BASE(55, 55, 1, 0x0090, 0x10, 14, 1), 279 + PIN_FIELD_BASE(56, 56, 1, 0x0090, 0x10, 17, 1), 280 + PIN_FIELD_BASE(57, 57, 2, 0x0080, 0x10, 22, 1), 281 + PIN_FIELD_BASE(58, 58, 2, 0x0080, 0x10, 25, 1), 282 + PIN_FIELD_BASE(59, 59, 1, 0x0090, 0x10, 15, 1), 283 + PIN_FIELD_BASE(60, 60, 1, 0x0090, 0x10, 18, 1), 284 + PIN_FIELD_BASE(61, 61, 1, 0x0090, 0x10, 16, 1), 285 + PIN_FIELD_BASE(62, 62, 1, 0x0090, 0x10, 19, 1), 286 + PIN_FIELD_BASE(63, 63, 2, 0x0080, 0x10, 23, 1), 287 + PIN_FIELD_BASE(64, 64, 2, 0x0080, 0x10, 26, 1), 288 + PIN_FIELD_BASE(65, 65, 4, 0x0050, 0x10, 13, 1), 289 + PIN_FIELD_BASE(66, 66, 4, 0x0050, 0x10, 15, 1), 290 + PIN_FIELD_BASE(67, 67, 4, 0x0050, 0x10, 14, 1), 291 + PIN_FIELD_BASE(68, 68, 4, 0x0050, 0x10, 16, 1), 292 + PIN_FIELD_BASE(69, 69, 1, 0x0090, 0x10, 21, 1), 293 + PIN_FIELD_BASE(70, 70, 1, 0x0090, 0x10, 20, 1), 294 + PIN_FIELD_BASE(71, 71, 1, 0x0090, 0x10, 25, 1), 295 + PIN_FIELD_BASE(72, 72, 1, 0x0090, 0x10, 24, 1), 296 + PIN_FIELD_BASE(73, 73, 1, 0x0090, 0x10, 22, 1), 297 + PIN_FIELD_BASE(74, 74, 1, 0x0090, 0x10, 23, 1), 298 + PIN_FIELD_BASE(75, 75, 1, 0x0090, 0x10, 27, 1), 299 + PIN_FIELD_BASE(76, 76, 1, 0x0090, 0x10, 26, 1), 300 + PIN_FIELD_BASE(77, 77, 1, 0x0090, 0x10, 29, 1), 301 + PIN_FIELD_BASE(78, 78, 1, 0x0090, 0x10, 28, 1), 302 + PIN_FIELD_BASE(79, 79, 4, 0x0050, 0x10, 18, 1), 303 + PIN_FIELD_BASE(80, 80, 4, 0x0050, 0x10, 17, 1), 304 + PIN_FIELD_BASE(81, 81, 4, 0x0050, 0x10, 20, 1), 305 + PIN_FIELD_BASE(82, 82, 4, 0x0050, 0x10, 19, 1), 306 + PIN_FIELD_BASE(83, 83, 2, 0x0080, 0x10, 30, 1), 307 + PIN_FIELD_BASE(84, 84, 2, 0x0080, 0x10, 29, 1), 308 + PIN_FIELD_BASE(85, 85, 2, 0x0080, 0x10, 31, 1), 309 + PIN_FIELD_BASE(86, 86, 2, 0x0090, 0x10, 1, 1), 310 + PIN_FIELD_BASE(87, 87, 2, 0x0090, 0x10, 0, 1), 311 + PIN_FIELD_BASE(88, 88, 2, 0x0090, 0x10, 2, 1), 312 + PIN_FIELD_BASE(89, 89, 2, 0x0090, 0x10, 4, 1), 313 + PIN_FIELD_BASE(90, 90, 2, 0x0090, 0x10, 3, 1), 314 + PIN_FIELD_BASE(91, 91, 2, 0x0090, 0x10, 5, 1), 315 + PIN_FIELD_BASE(92, 92, 2, 0x0080, 0x10, 19, 1), 316 + PIN_FIELD_BASE(93, 93, 2, 0x0080, 0x10, 18, 1), 317 + PIN_FIELD_BASE(94, 94, 2, 0x0080, 0x10, 21, 1), 318 + PIN_FIELD_BASE(95, 95, 2, 0x0080, 0x10, 20, 1), 319 + PIN_FIELD_BASE(96, 96, 2, 0x0080, 0x10, 15, 1), 320 + PIN_FIELD_BASE(97, 97, 2, 0x0080, 0x10, 16, 1), 321 + PIN_FIELD_BASE(98, 98, 2, 0x0080, 0x10, 24, 1), 322 + PIN_FIELD_BASE(99, 99, 2, 0x0080, 0x10, 14, 1), 323 + PIN_FIELD_BASE(100, 100, 2, 0x0080, 0x10, 17, 1), 324 + PIN_FIELD_BASE(101, 101, 2, 0x0070, 0x10, 0, 1), 325 + PIN_FIELD_BASE(102, 102, 2, 0x0070, 0x10, 5, 1), 326 + PIN_FIELD_BASE(103, 103, 2, 0x0070, 0x10, 3, 1), 327 + PIN_FIELD_BASE(104, 104, 2, 0x0070, 0x10, 4, 1), 328 + PIN_FIELD_BASE(105, 105, 2, 0x0070, 0x10, 1, 1), 329 + PIN_FIELD_BASE(106, 106, 2, 0x0070, 0x10, 2, 1), 330 + PIN_FIELD_BASE(107, 107, 2, 0x0080, 0x10, 1, 1), 331 + PIN_FIELD_BASE(108, 108, 2, 0x0070, 0x10, 28, 1), 332 + PIN_FIELD_BASE(109, 109, 2, 0x0080, 0x10, 2, 1), 333 + PIN_FIELD_BASE(110, 110, 2, 0x0070, 0x10, 29, 1), 334 + PIN_FIELD_BASE(111, 111, 2, 0x0070, 0x10, 30, 1), 335 + PIN_FIELD_BASE(112, 112, 2, 0x0070, 0x10, 31, 1), 336 + PIN_FIELD_BASE(113, 113, 2, 0x0080, 0x10, 0, 1), 337 + PIN_FIELD_BASE(114, 114, 2, 0x0080, 0x10, 8, 1), 338 + PIN_FIELD_BASE(115, 115, 2, 0x0080, 0x10, 3, 1), 339 + PIN_FIELD_BASE(116, 116, 2, 0x0080, 0x10, 9, 1), 340 + PIN_FIELD_BASE(117, 117, 2, 0x0080, 0x10, 4, 1), 341 + PIN_FIELD_BASE(118, 118, 2, 0x0080, 0x10, 5, 1), 342 + PIN_FIELD_BASE(119, 119, 2, 0x0080, 0x10, 6, 1), 343 + PIN_FIELD_BASE(120, 120, 2, 0x0080, 0x10, 7, 1), 344 + PIN_FIELD_BASE(121, 121, 3, 0x0040, 0x10, 14, 1), 345 + PIN_FIELD_BASE(122, 122, 3, 0x0040, 0x10, 17, 1), 346 + PIN_FIELD_BASE(123, 123, 3, 0x0040, 0x10, 16, 1), 347 + PIN_FIELD_BASE(124, 124, 3, 0x0040, 0x10, 15, 1), 348 + PIN_FIELD_BASE(125, 125, 2, 0x0070, 0x10, 6, 1), 349 + PIN_FIELD_BASE(126, 126, 2, 0x0070, 0x10, 7, 1), 350 + PIN_FIELD_BASE(127, 127, 2, 0x0070, 0x10, 8, 1), 351 + PIN_FIELD_BASE(128, 128, 2, 0x0070, 0x10, 9, 1), 352 + PIN_FIELD_BASE(129, 129, 2, 0x0070, 0x10, 10, 1), 353 + PIN_FIELD_BASE(130, 130, 2, 0x0070, 0x10, 11, 1), 354 + PIN_FIELD_BASE(131, 131, 1, 0x0080, 0x10, 3, 1), 355 + PIN_FIELD_BASE(132, 132, 1, 0x0080, 0x10, 4, 1), 356 + PIN_FIELD_BASE(133, 133, 1, 0x0080, 0x10, 11, 1), 357 + PIN_FIELD_BASE(134, 134, 1, 0x0080, 0x10, 12, 1), 358 + PIN_FIELD_BASE(135, 135, 1, 0x0080, 0x10, 13, 1), 359 + PIN_FIELD_BASE(136, 136, 1, 0x0080, 0x10, 14, 1), 360 + PIN_FIELD_BASE(137, 137, 1, 0x0080, 0x10, 15, 1), 361 + PIN_FIELD_BASE(138, 138, 1, 0x0080, 0x10, 16, 1), 362 + PIN_FIELD_BASE(139, 139, 1, 0x0080, 0x10, 17, 1), 363 + PIN_FIELD_BASE(140, 140, 1, 0x0080, 0x10, 18, 1), 364 + PIN_FIELD_BASE(141, 141, 1, 0x0080, 0x10, 5, 1), 365 + PIN_FIELD_BASE(142, 142, 1, 0x0080, 0x10, 6, 1), 366 + PIN_FIELD_BASE(143, 143, 1, 0x0080, 0x10, 7, 1), 367 + PIN_FIELD_BASE(144, 144, 1, 0x0080, 0x10, 8, 1), 368 + PIN_FIELD_BASE(145, 145, 1, 0x0080, 0x10, 9, 1), 369 + PIN_FIELD_BASE(146, 146, 1, 0x0080, 0x10, 10, 1), 370 + PIN_FIELD_BASE(147, 147, 1, 0x0080, 0x10, 20, 1), 371 + PIN_FIELD_BASE(148, 148, 1, 0x0080, 0x10, 21, 1), 372 + PIN_FIELD_BASE(149, 149, 1, 0x0080, 0x10, 19, 1), 373 + PIN_FIELD_BASE(150, 150, 1, 0x0080, 0x10, 2, 1), 374 + PIN_FIELD_BASE(151, 151, 2, 0x0070, 0x10, 21, 1), 375 + PIN_FIELD_BASE(152, 152, 2, 0x0070, 0x10, 20, 1), 376 + PIN_FIELD_BASE(153, 153, 2, 0x0070, 0x10, 19, 1), 377 + PIN_FIELD_BASE(154, 154, 2, 0x0070, 0x10, 18, 1), 378 + PIN_FIELD_BASE(155, 155, 2, 0x0070, 0x10, 23, 1), 379 + PIN_FIELD_BASE(156, 156, 2, 0x0070, 0x10, 13, 1), 380 + PIN_FIELD_BASE(157, 157, 2, 0x0070, 0x10, 12, 1), 381 + PIN_FIELD_BASE(158, 158, 2, 0x0070, 0x10, 17, 1), 382 + PIN_FIELD_BASE(159, 159, 2, 0x0070, 0x10, 16, 1), 383 + PIN_FIELD_BASE(160, 160, 2, 0x0070, 0x10, 15, 1), 384 + PIN_FIELD_BASE(161, 161, 2, 0x0070, 0x10, 14, 1), 385 + PIN_FIELD_BASE(162, 162, 2, 0x0070, 0x10, 22, 1), 386 + PIN_FIELD_BASE(163, 163, 4, 0x0050, 0x10, 8, 1), 387 + PIN_FIELD_BASE(164, 164, 4, 0x0050, 0x10, 7, 1), 388 + PIN_FIELD_BASE(165, 165, 4, 0x0050, 0x10, 9, 1), 389 + PIN_FIELD_BASE(166, 166, 4, 0x0050, 0x10, 10, 1), 390 + PIN_FIELD_BASE(167, 167, 4, 0x0050, 0x10, 11, 1), 391 + PIN_FIELD_BASE(168, 168, 4, 0x0050, 0x10, 12, 1), 392 + PIN_FIELD_BASE(169, 169, 3, 0x0040, 0x10, 9, 1), 393 + PIN_FIELD_BASE(170, 170, 3, 0x0040, 0x10, 8, 1), 394 + PIN_FIELD_BASE(171, 171, 3, 0x0040, 0x10, 10, 1), 395 + PIN_FIELD_BASE(172, 172, 3, 0x0040, 0x10, 11, 1), 396 + PIN_FIELD_BASE(173, 173, 3, 0x0040, 0x10, 12, 1), 397 + PIN_FIELD_BASE(174, 174, 3, 0x0040, 0x10, 13, 1), 398 + PIN_FIELD_BASE(175, 175, 2, 0x0080, 0x10, 27, 1), 399 + PIN_FIELD_BASE(176, 176, 2, 0x0080, 0x10, 28, 1), 400 + }; 401 + 402 + static const struct mtk_pin_field_calc mt8188_pin_tdsel_range[] = { 403 + PIN_FIELD_BASE(0, 0, 1, 0x01b0, 0x10, 0, 4), 404 + PIN_FIELD_BASE(1, 1, 1, 0x01b0, 0x10, 4, 4), 405 + PIN_FIELD_BASE(2, 2, 1, 0x01b0, 0x10, 8, 4), 406 + PIN_FIELD_BASE(3, 3, 1, 0x01b0, 0x10, 12, 4), 407 + PIN_FIELD_BASE(4, 4, 1, 0x01c0, 0x10, 16, 4), 408 + PIN_FIELD_BASE(5, 5, 1, 0x01c0, 0x10, 20, 4), 409 + PIN_FIELD_BASE(6, 6, 1, 0x01c0, 0x10, 20, 4), 410 + PIN_FIELD_BASE(7, 7, 1, 0x01b0, 0x10, 16, 4), 411 + PIN_FIELD_BASE(8, 8, 1, 0x01b0, 0x10, 20, 4), 412 + PIN_FIELD_BASE(9, 9, 1, 0x01b0, 0x10, 24, 4), 413 + PIN_FIELD_BASE(10, 10, 1, 0x01b0, 0x10, 28, 4), 414 + PIN_FIELD_BASE(11, 11, 1, 0x01c0, 0x10, 20, 4), 415 + PIN_FIELD_BASE(12, 12, 2, 0x0190, 0x10, 16, 4), 416 + PIN_FIELD_BASE(13, 13, 2, 0x0190, 0x10, 20, 4), 417 + PIN_FIELD_BASE(14, 14, 2, 0x0190, 0x10, 24, 4), 418 + PIN_FIELD_BASE(15, 15, 2, 0x0190, 0x10, 28, 4), 419 + PIN_FIELD_BASE(16, 16, 3, 0x0100, 0x10, 8, 4), 420 + PIN_FIELD_BASE(17, 17, 3, 0x0100, 0x10, 8, 4), 421 + PIN_FIELD_BASE(18, 18, 4, 0x0110, 0x10, 4, 4), 422 + PIN_FIELD_BASE(19, 19, 4, 0x0110, 0x10, 8, 4), 423 + PIN_FIELD_BASE(20, 20, 4, 0x0110, 0x10, 8, 4), 424 + PIN_FIELD_BASE(21, 21, 4, 0x0110, 0x10, 8, 4), 425 + PIN_FIELD_BASE(22, 22, 4, 0x0100, 0x10, 0, 4), 426 + PIN_FIELD_BASE(23, 23, 4, 0x0100, 0x10, 4, 4), 427 + PIN_FIELD_BASE(24, 24, 4, 0x0100, 0x10, 8, 4), 428 + PIN_FIELD_BASE(25, 25, 1, 0x01c0, 0x10, 8, 4), 429 + PIN_FIELD_BASE(26, 26, 1, 0x01c0, 0x10, 8, 4), 430 + PIN_FIELD_BASE(27, 27, 1, 0x01c0, 0x10, 8, 4), 431 + PIN_FIELD_BASE(28, 28, 1, 0x01c0, 0x10, 12, 4), 432 + PIN_FIELD_BASE(29, 29, 1, 0x01c0, 0x10, 0, 4), 433 + PIN_FIELD_BASE(30, 30, 1, 0x01c0, 0x10, 8, 4), 434 + PIN_FIELD_BASE(31, 31, 1, 0x01c0, 0x10, 20, 4), 435 + PIN_FIELD_BASE(32, 32, 1, 0x01c0, 0x10, 24, 4), 436 + PIN_FIELD_BASE(33, 33, 1, 0x01c0, 0x10, 24, 4), 437 + PIN_FIELD_BASE(34, 34, 1, 0x01c0, 0x10, 28, 4), 438 + PIN_FIELD_BASE(35, 35, 1, 0x01c0, 0x10, 24, 4), 439 + PIN_FIELD_BASE(36, 36, 1, 0x01c0, 0x10, 24, 4), 440 + PIN_FIELD_BASE(37, 37, 1, 0x01c0, 0x10, 28, 4), 441 + PIN_FIELD_BASE(38, 38, 1, 0x01c0, 0x10, 28, 4), 442 + PIN_FIELD_BASE(39, 39, 1, 0x01c0, 0x10, 28, 4), 443 + PIN_FIELD_BASE(40, 40, 1, 0x01d0, 0x10, 0, 4), 444 + PIN_FIELD_BASE(41, 41, 1, 0x01d0, 0x10, 0, 4), 445 + PIN_FIELD_BASE(42, 42, 2, 0x01a0, 0x10, 16, 4), 446 + PIN_FIELD_BASE(43, 43, 2, 0x01a0, 0x10, 20, 4), 447 + PIN_FIELD_BASE(44, 44, 2, 0x01a0, 0x10, 16, 4), 448 + PIN_FIELD_BASE(45, 45, 2, 0x01a0, 0x10, 20, 4), 449 + PIN_FIELD_BASE(46, 46, 3, 0x0100, 0x10, 8, 4), 450 + PIN_FIELD_BASE(47, 47, 1, 0x01c0, 0x10, 0, 4), 451 + PIN_FIELD_BASE(48, 48, 1, 0x01c0, 0x10, 0, 4), 452 + PIN_FIELD_BASE(49, 49, 1, 0x01c0, 0x10, 0, 4), 453 + PIN_FIELD_BASE(50, 50, 3, 0x0100, 0x10, 8, 4), 454 + PIN_FIELD_BASE(51, 51, 3, 0x0100, 0x10, 12, 4), 455 + PIN_FIELD_BASE(52, 52, 3, 0x0100, 0x10, 12, 4), 456 + PIN_FIELD_BASE(53, 53, 3, 0x0100, 0x10, 12, 4), 457 + PIN_FIELD_BASE(54, 54, 3, 0x0100, 0x10, 12, 4), 458 + PIN_FIELD_BASE(55, 55, 1, 0x01c0, 0x10, 12, 4), 459 + PIN_FIELD_BASE(56, 56, 1, 0x01c0, 0x10, 12, 4), 460 + PIN_FIELD_BASE(57, 57, 2, 0x01a0, 0x10, 24, 4), 461 + PIN_FIELD_BASE(58, 58, 2, 0x01a0, 0x10, 24, 4), 462 + PIN_FIELD_BASE(59, 59, 1, 0x01c0, 0x10, 16, 4), 463 + PIN_FIELD_BASE(60, 60, 1, 0x01c0, 0x10, 12, 4), 464 + PIN_FIELD_BASE(61, 61, 1, 0x01c0, 0x10, 16, 4), 465 + PIN_FIELD_BASE(62, 62, 1, 0x01c0, 0x10, 16, 4), 466 + PIN_FIELD_BASE(63, 63, 2, 0x01a0, 0x10, 20, 4), 467 + PIN_FIELD_BASE(64, 64, 2, 0x01a0, 0x10, 20, 4), 468 + PIN_FIELD_BASE(65, 65, 4, 0x0110, 0x10, 12, 4), 469 + PIN_FIELD_BASE(66, 66, 4, 0x0110, 0x10, 8, 4), 470 + PIN_FIELD_BASE(67, 67, 4, 0x0110, 0x10, 12, 4), 471 + PIN_FIELD_BASE(68, 68, 4, 0x0110, 0x10, 12, 4), 472 + PIN_FIELD_BASE(69, 69, 1, 0x01d0, 0x10, 16, 4), 473 + PIN_FIELD_BASE(70, 70, 1, 0x01d0, 0x10, 12, 4), 474 + PIN_FIELD_BASE(71, 71, 1, 0x01e0, 0x10, 0, 4), 475 + PIN_FIELD_BASE(72, 72, 1, 0x01d0, 0x10, 28, 4), 476 + PIN_FIELD_BASE(73, 73, 1, 0x01d0, 0x10, 20, 4), 477 + PIN_FIELD_BASE(74, 74, 1, 0x01d0, 0x10, 24, 4), 478 + PIN_FIELD_BASE(75, 75, 1, 0x01e0, 0x10, 8, 4), 479 + PIN_FIELD_BASE(76, 76, 1, 0x01e0, 0x10, 4, 4), 480 + PIN_FIELD_BASE(77, 77, 1, 0x01e0, 0x10, 16, 4), 481 + PIN_FIELD_BASE(78, 78, 1, 0x01e0, 0x10, 12, 4), 482 + PIN_FIELD_BASE(79, 79, 4, 0x0110, 0x10, 20, 4), 483 + PIN_FIELD_BASE(80, 80, 4, 0x0110, 0x10, 16, 4), 484 + PIN_FIELD_BASE(81, 81, 4, 0x0110, 0x10, 28, 4), 485 + PIN_FIELD_BASE(82, 82, 4, 0x0110, 0x10, 24, 4), 486 + PIN_FIELD_BASE(83, 83, 2, 0x01b0, 0x10, 8, 4), 487 + PIN_FIELD_BASE(84, 84, 2, 0x01b0, 0x10, 8, 4), 488 + PIN_FIELD_BASE(85, 85, 2, 0x01b0, 0x10, 12, 4), 489 + PIN_FIELD_BASE(86, 86, 2, 0x01a0, 0x10, 0, 4), 490 + PIN_FIELD_BASE(87, 87, 2, 0x01a0, 0x10, 0, 4), 491 + PIN_FIELD_BASE(88, 88, 2, 0x01a0, 0x10, 0, 4), 492 + PIN_FIELD_BASE(89, 89, 2, 0x01a0, 0x10, 0, 4), 493 + PIN_FIELD_BASE(90, 90, 2, 0x01b0, 0x10, 12, 4), 494 + PIN_FIELD_BASE(91, 91, 2, 0x01b0, 0x10, 12, 4), 495 + PIN_FIELD_BASE(92, 92, 2, 0x01a0, 0x10, 4, 4), 496 + PIN_FIELD_BASE(93, 93, 2, 0x01a0, 0x10, 4, 4), 497 + PIN_FIELD_BASE(94, 94, 2, 0x01a0, 0x10, 4, 4), 498 + PIN_FIELD_BASE(95, 95, 2, 0x01a0, 0x10, 4, 4), 499 + PIN_FIELD_BASE(96, 96, 2, 0x01a0, 0x10, 24, 4), 500 + PIN_FIELD_BASE(97, 97, 2, 0x01a0, 0x10, 28, 4), 501 + PIN_FIELD_BASE(98, 98, 2, 0x01b0, 0x10, 0, 4), 502 + PIN_FIELD_BASE(99, 99, 2, 0x01a0, 0x10, 24, 4), 503 + PIN_FIELD_BASE(100, 100, 2, 0x01b0, 0x10, 20, 4), 504 + PIN_FIELD_BASE(101, 101, 2, 0x01a0, 0x10, 28, 4), 505 + PIN_FIELD_BASE(102, 102, 2, 0x01a0, 0x10, 28, 4), 506 + PIN_FIELD_BASE(103, 103, 2, 0x01a0, 0x10, 28, 4), 507 + PIN_FIELD_BASE(104, 104, 2, 0x01b0, 0x10, 0, 4), 508 + PIN_FIELD_BASE(105, 105, 2, 0x01b0, 0x10, 0, 4), 509 + PIN_FIELD_BASE(106, 106, 2, 0x01b0, 0x10, 0, 4), 510 + PIN_FIELD_BASE(107, 107, 2, 0x01a0, 0x10, 0, 4), 511 + PIN_FIELD_BASE(108, 108, 2, 0x01a0, 0x10, 0, 4), 512 + PIN_FIELD_BASE(109, 109, 2, 0x01a0, 0x10, 0, 4), 513 + PIN_FIELD_BASE(110, 110, 2, 0x01a0, 0x10, 0, 4), 514 + PIN_FIELD_BASE(111, 111, 2, 0x01a0, 0x10, 8, 4), 515 + PIN_FIELD_BASE(112, 112, 2, 0x01a0, 0x10, 8, 4), 516 + PIN_FIELD_BASE(113, 113, 2, 0x01a0, 0x10, 8, 4), 517 + PIN_FIELD_BASE(114, 114, 2, 0x01a0, 0x10, 8, 4), 518 + PIN_FIELD_BASE(115, 115, 2, 0x01a0, 0x10, 12, 4), 519 + PIN_FIELD_BASE(116, 116, 2, 0x01a0, 0x10, 12, 4), 520 + PIN_FIELD_BASE(117, 117, 2, 0x01a0, 0x10, 12, 4), 521 + PIN_FIELD_BASE(118, 118, 2, 0x01a0, 0x10, 12, 4), 522 + PIN_FIELD_BASE(119, 119, 2, 0x01a0, 0x10, 16, 4), 523 + PIN_FIELD_BASE(120, 120, 2, 0x01a0, 0x10, 16, 4), 524 + PIN_FIELD_BASE(121, 121, 3, 0x00f0, 0x10, 24, 4), 525 + PIN_FIELD_BASE(122, 122, 3, 0x0100, 0x10, 4, 4), 526 + PIN_FIELD_BASE(123, 123, 3, 0x0100, 0x10, 0, 4), 527 + PIN_FIELD_BASE(124, 124, 3, 0x00f0, 0x10, 28, 4), 528 + PIN_FIELD_BASE(125, 125, 2, 0x01b0, 0x10, 4, 4), 529 + PIN_FIELD_BASE(126, 126, 2, 0x01b0, 0x10, 4, 4), 530 + PIN_FIELD_BASE(127, 127, 2, 0x01b0, 0x10, 4, 4), 531 + PIN_FIELD_BASE(128, 128, 2, 0x01b0, 0x10, 4, 4), 532 + PIN_FIELD_BASE(129, 129, 2, 0x01b0, 0x10, 8, 4), 533 + PIN_FIELD_BASE(130, 130, 2, 0x01b0, 0x10, 8, 4), 534 + PIN_FIELD_BASE(131, 131, 1, 0x01a0, 0x10, 0, 4), 535 + PIN_FIELD_BASE(132, 132, 1, 0x01a0, 0x10, 20, 4), 536 + PIN_FIELD_BASE(133, 133, 1, 0x01a0, 0x10, 24, 4), 537 + PIN_FIELD_BASE(134, 134, 1, 0x01a0, 0x10, 28, 4), 538 + PIN_FIELD_BASE(135, 135, 1, 0x01d0, 0x10, 0, 4), 539 + PIN_FIELD_BASE(136, 136, 1, 0x01d0, 0x10, 0, 4), 540 + PIN_FIELD_BASE(137, 137, 1, 0x01d0, 0x10, 4, 4), 541 + PIN_FIELD_BASE(138, 138, 1, 0x01d0, 0x10, 4, 4), 542 + PIN_FIELD_BASE(139, 139, 1, 0x01d0, 0x10, 4, 4), 543 + PIN_FIELD_BASE(140, 140, 1, 0x01d0, 0x10, 4, 4), 544 + PIN_FIELD_BASE(141, 141, 1, 0x01d0, 0x10, 8, 4), 545 + PIN_FIELD_BASE(142, 142, 1, 0x01d0, 0x10, 8, 4), 546 + PIN_FIELD_BASE(143, 143, 1, 0x01a0, 0x10, 4, 4), 547 + PIN_FIELD_BASE(144, 144, 1, 0x01a0, 0x10, 8, 4), 548 + PIN_FIELD_BASE(145, 145, 1, 0x01a0, 0x10, 12, 4), 549 + PIN_FIELD_BASE(146, 146, 1, 0x01a0, 0x10, 16, 4), 550 + PIN_FIELD_BASE(147, 147, 1, 0x01d0, 0x10, 8, 4), 551 + PIN_FIELD_BASE(148, 148, 1, 0x01d0, 0x10, 8, 4), 552 + PIN_FIELD_BASE(149, 149, 1, 0x01c0, 0x10, 4, 4), 553 + PIN_FIELD_BASE(150, 150, 1, 0x01c0, 0x10, 4, 4), 554 + PIN_FIELD_BASE(151, 151, 2, 0x0190, 0x10, 4, 4), 555 + PIN_FIELD_BASE(152, 152, 2, 0x0190, 0x10, 0, 4), 556 + PIN_FIELD_BASE(153, 153, 2, 0x0180, 0x10, 28, 4), 557 + PIN_FIELD_BASE(154, 154, 2, 0x0180, 0x10, 24, 4), 558 + PIN_FIELD_BASE(155, 155, 2, 0x0190, 0x10, 12, 4), 559 + PIN_FIELD_BASE(156, 156, 2, 0x0180, 0x10, 4, 4), 560 + PIN_FIELD_BASE(157, 157, 2, 0x0180, 0x10, 0, 4), 561 + PIN_FIELD_BASE(158, 158, 2, 0x0180, 0x10, 20, 4), 562 + PIN_FIELD_BASE(159, 159, 2, 0x0180, 0x10, 16, 4), 563 + PIN_FIELD_BASE(160, 160, 2, 0x0180, 0x10, 12, 4), 564 + PIN_FIELD_BASE(161, 161, 2, 0x0180, 0x10, 8, 4), 565 + PIN_FIELD_BASE(162, 162, 2, 0x0190, 0x10, 8, 4), 566 + PIN_FIELD_BASE(163, 163, 4, 0x0100, 0x10, 16, 4), 567 + PIN_FIELD_BASE(164, 164, 4, 0x0100, 0x10, 12, 4), 568 + PIN_FIELD_BASE(165, 165, 4, 0x0100, 0x10, 20, 4), 569 + PIN_FIELD_BASE(166, 166, 4, 0x0100, 0x10, 24, 4), 570 + PIN_FIELD_BASE(167, 167, 4, 0x0100, 0x10, 28, 4), 571 + PIN_FIELD_BASE(168, 168, 4, 0x0110, 0x10, 0, 4), 572 + PIN_FIELD_BASE(169, 169, 3, 0x00f0, 0x10, 4, 4), 573 + PIN_FIELD_BASE(170, 170, 3, 0x00f0, 0x10, 0, 4), 574 + PIN_FIELD_BASE(171, 171, 3, 0x00f0, 0x10, 8, 4), 575 + PIN_FIELD_BASE(172, 172, 3, 0x00f0, 0x10, 12, 4), 576 + PIN_FIELD_BASE(173, 173, 3, 0x00f0, 0x10, 16, 4), 577 + PIN_FIELD_BASE(174, 174, 3, 0x00f0, 0x10, 20, 4), 578 + PIN_FIELD_BASE(175, 175, 2, 0x01b0, 0x10, 16, 4), 579 + PIN_FIELD_BASE(176, 176, 2, 0x01b0, 0x10, 16, 4), 580 + }; 581 + 582 + static const struct mtk_pin_field_calc mt8188_pin_rdsel_range[] = { 583 + PIN_FIELD_BASE(0, 0, 1, 0x0130, 0x10, 18, 2), 584 + PIN_FIELD_BASE(1, 1, 1, 0x0130, 0x10, 20, 2), 585 + PIN_FIELD_BASE(2, 2, 1, 0x0130, 0x10, 22, 2), 586 + PIN_FIELD_BASE(3, 3, 1, 0x0130, 0x10, 24, 2), 587 + PIN_FIELD_BASE(4, 4, 1, 0x0140, 0x10, 14, 2), 588 + PIN_FIELD_BASE(5, 5, 1, 0x0140, 0x10, 16, 2), 589 + PIN_FIELD_BASE(6, 6, 1, 0x0140, 0x10, 16, 2), 590 + PIN_FIELD_BASE(7, 7, 1, 0x0130, 0x10, 26, 2), 591 + PIN_FIELD_BASE(8, 8, 1, 0x0130, 0x10, 28, 2), 592 + PIN_FIELD_BASE(9, 9, 1, 0x0130, 0x10, 30, 2), 593 + PIN_FIELD_BASE(10, 10, 1, 0x0140, 0x10, 0, 2), 594 + PIN_FIELD_BASE(11, 11, 1, 0x0140, 0x10, 16, 2), 595 + PIN_FIELD_BASE(12, 12, 2, 0x0130, 0x10, 12, 2), 596 + PIN_FIELD_BASE(13, 13, 2, 0x0130, 0x10, 14, 2), 597 + PIN_FIELD_BASE(14, 14, 2, 0x0130, 0x10, 16, 2), 598 + PIN_FIELD_BASE(15, 15, 2, 0x0130, 0x10, 18, 2), 599 + PIN_FIELD_BASE(16, 16, 3, 0x00b0, 0x10, 14, 2), 600 + PIN_FIELD_BASE(17, 17, 3, 0x00b0, 0x10, 14, 2), 601 + PIN_FIELD_BASE(18, 18, 4, 0x00c0, 0x10, 12, 2), 602 + PIN_FIELD_BASE(19, 19, 4, 0x00c0, 0x10, 12, 2), 603 + PIN_FIELD_BASE(20, 20, 4, 0x00c0, 0x10, 12, 2), 604 + PIN_FIELD_BASE(21, 21, 4, 0x00c0, 0x10, 12, 2), 605 + PIN_FIELD_BASE(22, 22, 4, 0x00b0, 0x10, 0, 2), 606 + PIN_FIELD_BASE(23, 23, 4, 0x00b0, 0x10, 2, 2), 607 + PIN_FIELD_BASE(24, 24, 4, 0x00b0, 0x10, 4, 2), 608 + PIN_FIELD_BASE(25, 25, 1, 0x0140, 0x10, 10, 2), 609 + PIN_FIELD_BASE(26, 26, 1, 0x0140, 0x10, 10, 2), 610 + PIN_FIELD_BASE(27, 27, 1, 0x0140, 0x10, 10, 2), 611 + PIN_FIELD_BASE(28, 28, 1, 0x0140, 0x10, 12, 2), 612 + PIN_FIELD_BASE(29, 29, 1, 0x0140, 0x10, 2, 2), 613 + PIN_FIELD_BASE(30, 30, 1, 0x0140, 0x10, 10, 2), 614 + PIN_FIELD_BASE(31, 31, 1, 0x0140, 0x10, 16, 2), 615 + PIN_FIELD_BASE(32, 32, 1, 0x0140, 0x10, 18, 2), 616 + PIN_FIELD_BASE(33, 33, 1, 0x0140, 0x10, 18, 2), 617 + PIN_FIELD_BASE(34, 34, 1, 0x0140, 0x10, 20, 2), 618 + PIN_FIELD_BASE(35, 35, 1, 0x0140, 0x10, 18, 2), 619 + PIN_FIELD_BASE(36, 36, 1, 0x0140, 0x10, 18, 2), 620 + PIN_FIELD_BASE(37, 37, 1, 0x0140, 0x10, 20, 2), 621 + PIN_FIELD_BASE(38, 38, 1, 0x0140, 0x10, 20, 2), 622 + PIN_FIELD_BASE(39, 39, 1, 0x0140, 0x10, 20, 2), 623 + PIN_FIELD_BASE(40, 40, 1, 0x0140, 0x10, 22, 2), 624 + PIN_FIELD_BASE(41, 41, 1, 0x0140, 0x10, 22, 2), 625 + PIN_FIELD_BASE(42, 42, 2, 0x0130, 0x10, 30, 2), 626 + PIN_FIELD_BASE(43, 43, 2, 0x0140, 0x10, 0, 2), 627 + PIN_FIELD_BASE(44, 44, 2, 0x0130, 0x10, 30, 2), 628 + PIN_FIELD_BASE(45, 45, 2, 0x0140, 0x10, 0, 2), 629 + PIN_FIELD_BASE(46, 46, 3, 0x00b0, 0x10, 14, 2), 630 + PIN_FIELD_BASE(47, 47, 1, 0x0140, 0x10, 2, 2), 631 + PIN_FIELD_BASE(48, 48, 1, 0x0140, 0x10, 2, 2), 632 + PIN_FIELD_BASE(49, 49, 1, 0x0140, 0x10, 2, 2), 633 + PIN_FIELD_BASE(50, 50, 3, 0x00b0, 0x10, 14, 2), 634 + PIN_FIELD_BASE(51, 51, 3, 0x00b0, 0x10, 16, 2), 635 + PIN_FIELD_BASE(52, 52, 3, 0x00b0, 0x10, 16, 2), 636 + PIN_FIELD_BASE(53, 53, 3, 0x00b0, 0x10, 16, 2), 637 + PIN_FIELD_BASE(54, 54, 3, 0x00b0, 0x10, 16, 2), 638 + PIN_FIELD_BASE(55, 55, 1, 0x0140, 0x10, 12, 2), 639 + PIN_FIELD_BASE(56, 56, 1, 0x0140, 0x10, 12, 2), 640 + PIN_FIELD_BASE(57, 57, 2, 0x0140, 0x10, 2, 2), 641 + PIN_FIELD_BASE(58, 58, 2, 0x0140, 0x10, 2, 2), 642 + PIN_FIELD_BASE(59, 59, 1, 0x0140, 0x10, 14, 2), 643 + PIN_FIELD_BASE(60, 60, 1, 0x0140, 0x10, 12, 2), 644 + PIN_FIELD_BASE(61, 61, 1, 0x0140, 0x10, 14, 2), 645 + PIN_FIELD_BASE(62, 62, 1, 0x0140, 0x10, 14, 2), 646 + PIN_FIELD_BASE(63, 63, 2, 0x0140, 0x10, 0, 2), 647 + PIN_FIELD_BASE(64, 64, 2, 0x0140, 0x10, 0, 2), 648 + PIN_FIELD_BASE(65, 65, 4, 0x00c0, 0x10, 14, 2), 649 + PIN_FIELD_BASE(66, 66, 4, 0x00c0, 0x10, 14, 2), 650 + PIN_FIELD_BASE(67, 67, 4, 0x00c0, 0x10, 14, 2), 651 + PIN_FIELD_BASE(68, 68, 4, 0x00c0, 0x10, 14, 2), 652 + PIN_FIELD_BASE(69, 69, 1, 0x0150, 0x10, 14, 2), 653 + PIN_FIELD_BASE(70, 70, 1, 0x0150, 0x10, 12, 2), 654 + PIN_FIELD_BASE(71, 71, 1, 0x0150, 0x10, 22, 2), 655 + PIN_FIELD_BASE(72, 72, 1, 0x0150, 0x10, 20, 2), 656 + PIN_FIELD_BASE(73, 73, 1, 0x0150, 0x10, 16, 2), 657 + PIN_FIELD_BASE(74, 74, 1, 0x0150, 0x10, 18, 2), 658 + PIN_FIELD_BASE(75, 75, 1, 0x0150, 0x10, 26, 2), 659 + PIN_FIELD_BASE(76, 76, 1, 0x0150, 0x10, 24, 2), 660 + PIN_FIELD_BASE(77, 77, 1, 0x0150, 0x10, 30, 2), 661 + PIN_FIELD_BASE(78, 78, 1, 0x0150, 0x10, 28, 2), 662 + PIN_FIELD_BASE(79, 79, 4, 0x00c0, 0x10, 18, 2), 663 + PIN_FIELD_BASE(80, 80, 4, 0x00c0, 0x10, 16, 2), 664 + PIN_FIELD_BASE(81, 81, 4, 0x00c0, 0x10, 22, 2), 665 + PIN_FIELD_BASE(82, 82, 4, 0x00c0, 0x10, 20, 2), 666 + PIN_FIELD_BASE(83, 83, 2, 0x0140, 0x10, 10, 2), 667 + PIN_FIELD_BASE(84, 84, 2, 0x0140, 0x10, 10, 2), 668 + PIN_FIELD_BASE(85, 85, 2, 0x0140, 0x10, 12, 2), 669 + PIN_FIELD_BASE(86, 86, 2, 0x0130, 0x10, 20, 2), 670 + PIN_FIELD_BASE(87, 87, 2, 0x0130, 0x10, 20, 2), 671 + PIN_FIELD_BASE(88, 88, 2, 0x0130, 0x10, 20, 2), 672 + PIN_FIELD_BASE(89, 89, 2, 0x0130, 0x10, 20, 2), 673 + PIN_FIELD_BASE(90, 90, 2, 0x0140, 0x10, 12, 2), 674 + PIN_FIELD_BASE(91, 91, 2, 0x0140, 0x10, 12, 2), 675 + PIN_FIELD_BASE(92, 92, 2, 0x0130, 0x10, 22, 2), 676 + PIN_FIELD_BASE(93, 93, 2, 0x0130, 0x10, 22, 2), 677 + PIN_FIELD_BASE(94, 94, 2, 0x0130, 0x10, 22, 2), 678 + PIN_FIELD_BASE(95, 95, 2, 0x0130, 0x10, 22, 2), 679 + PIN_FIELD_BASE(96, 96, 2, 0x0140, 0x10, 2, 2), 680 + PIN_FIELD_BASE(97, 97, 2, 0x0140, 0x10, 4, 2), 681 + PIN_FIELD_BASE(98, 98, 2, 0x0140, 0x10, 6, 2), 682 + PIN_FIELD_BASE(99, 99, 2, 0x0140, 0x10, 2, 2), 683 + PIN_FIELD_BASE(100, 100, 2, 0x0140, 0x10, 16, 2), 684 + PIN_FIELD_BASE(101, 101, 2, 0x0140, 0x10, 4, 2), 685 + PIN_FIELD_BASE(102, 102, 2, 0x0140, 0x10, 4, 2), 686 + PIN_FIELD_BASE(103, 103, 2, 0x0140, 0x10, 4, 2), 687 + PIN_FIELD_BASE(104, 104, 2, 0x0140, 0x10, 6, 2), 688 + PIN_FIELD_BASE(105, 105, 2, 0x0140, 0x10, 6, 2), 689 + PIN_FIELD_BASE(106, 106, 2, 0x0140, 0x10, 6, 2), 690 + PIN_FIELD_BASE(107, 107, 2, 0x0130, 0x10, 20, 2), 691 + PIN_FIELD_BASE(108, 108, 2, 0x0130, 0x10, 20, 2), 692 + PIN_FIELD_BASE(109, 109, 2, 0x0130, 0x10, 20, 2), 693 + PIN_FIELD_BASE(110, 110, 2, 0x0130, 0x10, 20, 2), 694 + PIN_FIELD_BASE(111, 111, 2, 0x0130, 0x10, 24, 2), 695 + PIN_FIELD_BASE(112, 112, 2, 0x0130, 0x10, 24, 2), 696 + PIN_FIELD_BASE(113, 113, 2, 0x0130, 0x10, 24, 2), 697 + PIN_FIELD_BASE(114, 114, 2, 0x0130, 0x10, 24, 2), 698 + PIN_FIELD_BASE(115, 115, 2, 0x0130, 0x10, 28, 2), 699 + PIN_FIELD_BASE(116, 116, 2, 0x0130, 0x10, 28, 2), 700 + PIN_FIELD_BASE(117, 117, 2, 0x0130, 0x10, 28, 2), 701 + PIN_FIELD_BASE(118, 118, 2, 0x0130, 0x10, 28, 2), 702 + PIN_FIELD_BASE(119, 119, 2, 0x0130, 0x10, 30, 2), 703 + PIN_FIELD_BASE(120, 120, 2, 0x0130, 0x10, 30, 2), 704 + PIN_FIELD_BASE(121, 121, 3, 0x00b0, 0x10, 6, 2), 705 + PIN_FIELD_BASE(122, 122, 3, 0x00b0, 0x10, 12, 2), 706 + PIN_FIELD_BASE(123, 123, 3, 0x00b0, 0x10, 10, 2), 707 + PIN_FIELD_BASE(124, 124, 3, 0x00b0, 0x10, 8, 2), 708 + PIN_FIELD_BASE(125, 125, 2, 0x0140, 0x10, 8, 2), 709 + PIN_FIELD_BASE(126, 126, 2, 0x0140, 0x10, 8, 2), 710 + PIN_FIELD_BASE(127, 127, 2, 0x0140, 0x10, 8, 2), 711 + PIN_FIELD_BASE(128, 128, 2, 0x0140, 0x10, 8, 2), 712 + PIN_FIELD_BASE(129, 129, 2, 0x0140, 0x10, 10, 2), 713 + PIN_FIELD_BASE(130, 130, 2, 0x0140, 0x10, 10, 2), 714 + PIN_FIELD_BASE(131, 131, 1, 0x0120, 0x10, 0, 6), 715 + PIN_FIELD_BASE(132, 132, 1, 0x0130, 0x10, 0, 6), 716 + PIN_FIELD_BASE(133, 133, 1, 0x0130, 0x10, 6, 6), 717 + PIN_FIELD_BASE(134, 134, 1, 0x0130, 0x10, 12, 6), 718 + PIN_FIELD_BASE(135, 135, 1, 0x0140, 0x10, 24, 6), 719 + PIN_FIELD_BASE(136, 136, 1, 0x0140, 0x10, 24, 6), 720 + PIN_FIELD_BASE(137, 137, 1, 0x0150, 0x10, 0, 6), 721 + PIN_FIELD_BASE(138, 138, 1, 0x0150, 0x10, 0, 6), 722 + PIN_FIELD_BASE(139, 139, 1, 0x0150, 0x10, 0, 6), 723 + PIN_FIELD_BASE(140, 140, 1, 0x0150, 0x10, 0, 6), 724 + PIN_FIELD_BASE(141, 141, 1, 0x0150, 0x10, 6, 6), 725 + PIN_FIELD_BASE(142, 142, 1, 0x0150, 0x10, 6, 6), 726 + PIN_FIELD_BASE(143, 143, 1, 0x0120, 0x10, 6, 6), 727 + PIN_FIELD_BASE(144, 144, 1, 0x0120, 0x10, 12, 6), 728 + PIN_FIELD_BASE(145, 145, 1, 0x0120, 0x10, 18, 6), 729 + PIN_FIELD_BASE(146, 146, 1, 0x0120, 0x10, 24, 6), 730 + PIN_FIELD_BASE(147, 147, 1, 0x0150, 0x10, 6, 6), 731 + PIN_FIELD_BASE(148, 148, 1, 0x0150, 0x10, 6, 6), 732 + PIN_FIELD_BASE(149, 149, 1, 0x0140, 0x10, 4, 6), 733 + PIN_FIELD_BASE(150, 150, 1, 0x0140, 0x10, 4, 6), 734 + PIN_FIELD_BASE(151, 151, 2, 0x0120, 0x10, 24, 6), 735 + PIN_FIELD_BASE(152, 152, 2, 0x0120, 0x10, 18, 6), 736 + PIN_FIELD_BASE(153, 153, 2, 0x0120, 0x10, 12, 6), 737 + PIN_FIELD_BASE(154, 154, 2, 0x0120, 0x10, 6, 6), 738 + PIN_FIELD_BASE(155, 155, 2, 0x0130, 0x10, 6, 6), 739 + PIN_FIELD_BASE(156, 156, 2, 0x0110, 0x10, 6, 6), 740 + PIN_FIELD_BASE(157, 157, 2, 0x0110, 0x10, 0, 6), 741 + PIN_FIELD_BASE(158, 158, 2, 0x0120, 0x10, 0, 6), 742 + PIN_FIELD_BASE(159, 159, 2, 0x0110, 0x10, 24, 6), 743 + PIN_FIELD_BASE(160, 160, 2, 0x0110, 0x10, 18, 6), 744 + PIN_FIELD_BASE(161, 161, 2, 0x0110, 0x10, 12, 6), 745 + PIN_FIELD_BASE(162, 162, 2, 0x0130, 0x10, 0, 6), 746 + PIN_FIELD_BASE(163, 163, 4, 0x00b0, 0x10, 12, 6), 747 + PIN_FIELD_BASE(164, 164, 4, 0x00b0, 0x10, 6, 6), 748 + PIN_FIELD_BASE(165, 165, 4, 0x00b0, 0x10, 18, 6), 749 + PIN_FIELD_BASE(166, 166, 4, 0x00b0, 0x10, 24, 6), 750 + PIN_FIELD_BASE(167, 167, 4, 0x00c0, 0x10, 0, 6), 751 + PIN_FIELD_BASE(168, 168, 4, 0x00c0, 0x10, 6, 6), 752 + PIN_FIELD_BASE(169, 169, 3, 0x00a0, 0x10, 6, 6), 753 + PIN_FIELD_BASE(170, 170, 3, 0x00a0, 0x10, 0, 6), 754 + PIN_FIELD_BASE(171, 171, 3, 0x00a0, 0x10, 12, 6), 755 + PIN_FIELD_BASE(172, 172, 3, 0x00a0, 0x10, 18, 6), 756 + PIN_FIELD_BASE(173, 173, 3, 0x00a0, 0x10, 24, 6), 757 + PIN_FIELD_BASE(174, 174, 3, 0x00b0, 0x10, 0, 6), 758 + PIN_FIELD_BASE(175, 175, 2, 0x0140, 0x10, 14, 2), 759 + PIN_FIELD_BASE(176, 176, 2, 0x0140, 0x10, 14, 2), 760 + }; 761 + 762 + static const struct mtk_pin_field_calc mt8188_pin_pupd_range[] = { 763 + PIN_FIELD_BASE(42, 42, 2, 0x00c0, 0x10, 12, 1), 764 + PIN_FIELD_BASE(43, 43, 2, 0x00c0, 0x10, 13, 1), 765 + PIN_FIELD_BASE(44, 44, 2, 0x00c0, 0x10, 14, 1), 766 + PIN_FIELD_BASE(45, 45, 2, 0x00c0, 0x10, 15, 1), 767 + PIN_FIELD_BASE(131, 131, 1, 0x00d0, 0x10, 1, 1), 768 + PIN_FIELD_BASE(132, 132, 1, 0x00d0, 0x10, 2, 1), 769 + PIN_FIELD_BASE(133, 133, 1, 0x00d0, 0x10, 9, 1), 770 + PIN_FIELD_BASE(134, 134, 1, 0x00d0, 0x10, 10, 1), 771 + PIN_FIELD_BASE(135, 135, 1, 0x00d0, 0x10, 11, 1), 772 + PIN_FIELD_BASE(136, 136, 1, 0x00d0, 0x10, 12, 1), 773 + PIN_FIELD_BASE(137, 137, 1, 0x00d0, 0x10, 13, 1), 774 + PIN_FIELD_BASE(138, 138, 1, 0x00d0, 0x10, 14, 1), 775 + PIN_FIELD_BASE(139, 139, 1, 0x00d0, 0x10, 15, 1), 776 + PIN_FIELD_BASE(140, 140, 1, 0x00d0, 0x10, 16, 1), 777 + PIN_FIELD_BASE(141, 141, 1, 0x00d0, 0x10, 3, 1), 778 + PIN_FIELD_BASE(142, 142, 1, 0x00d0, 0x10, 4, 1), 779 + PIN_FIELD_BASE(143, 143, 1, 0x00d0, 0x10, 5, 1), 780 + PIN_FIELD_BASE(144, 144, 1, 0x00d0, 0x10, 6, 1), 781 + PIN_FIELD_BASE(145, 145, 1, 0x00d0, 0x10, 7, 1), 782 + PIN_FIELD_BASE(146, 146, 1, 0x00d0, 0x10, 8, 1), 783 + PIN_FIELD_BASE(147, 147, 1, 0x00d0, 0x10, 18, 1), 784 + PIN_FIELD_BASE(148, 148, 1, 0x00d0, 0x10, 19, 1), 785 + PIN_FIELD_BASE(149, 149, 1, 0x00d0, 0x10, 17, 1), 786 + PIN_FIELD_BASE(150, 150, 1, 0x00d0, 0x10, 0, 1), 787 + PIN_FIELD_BASE(151, 151, 2, 0x00c0, 0x10, 9, 1), 788 + PIN_FIELD_BASE(152, 152, 2, 0x00c0, 0x10, 8, 1), 789 + PIN_FIELD_BASE(153, 153, 2, 0x00c0, 0x10, 7, 1), 790 + PIN_FIELD_BASE(154, 154, 2, 0x00c0, 0x10, 6, 1), 791 + PIN_FIELD_BASE(155, 155, 2, 0x00c0, 0x10, 11, 1), 792 + PIN_FIELD_BASE(156, 156, 2, 0x00c0, 0x10, 1, 1), 793 + PIN_FIELD_BASE(157, 157, 2, 0x00c0, 0x10, 0, 1), 794 + PIN_FIELD_BASE(158, 158, 2, 0x00c0, 0x10, 5, 1), 795 + PIN_FIELD_BASE(159, 159, 2, 0x00c0, 0x10, 4, 1), 796 + PIN_FIELD_BASE(160, 160, 2, 0x00c0, 0x10, 3, 1), 797 + PIN_FIELD_BASE(161, 161, 2, 0x00c0, 0x10, 2, 1), 798 + PIN_FIELD_BASE(162, 162, 2, 0x00c0, 0x10, 10, 1), 799 + PIN_FIELD_BASE(163, 163, 4, 0x0070, 0x10, 1, 1), 800 + PIN_FIELD_BASE(164, 164, 4, 0x0070, 0x10, 0, 1), 801 + PIN_FIELD_BASE(165, 165, 4, 0x0070, 0x10, 2, 1), 802 + PIN_FIELD_BASE(166, 166, 4, 0x0070, 0x10, 3, 1), 803 + PIN_FIELD_BASE(167, 167, 4, 0x0070, 0x10, 4, 1), 804 + PIN_FIELD_BASE(168, 168, 4, 0x0070, 0x10, 5, 1), 805 + PIN_FIELD_BASE(169, 169, 3, 0x0060, 0x10, 1, 1), 806 + PIN_FIELD_BASE(170, 170, 3, 0x0060, 0x10, 0, 1), 807 + PIN_FIELD_BASE(171, 171, 3, 0x0060, 0x10, 2, 1), 808 + PIN_FIELD_BASE(172, 172, 3, 0x0060, 0x10, 3, 1), 809 + PIN_FIELD_BASE(173, 173, 3, 0x0060, 0x10, 4, 1), 810 + PIN_FIELD_BASE(174, 174, 3, 0x0060, 0x10, 5, 1), 811 + }; 812 + 813 + static const struct mtk_pin_field_calc mt8188_pin_r0_range[] = { 814 + PIN_FIELD_BASE(42, 42, 2, 0x00f0, 0x10, 12, 1), 815 + PIN_FIELD_BASE(43, 43, 2, 0x00f0, 0x10, 13, 1), 816 + PIN_FIELD_BASE(44, 44, 2, 0x00f0, 0x10, 14, 1), 817 + PIN_FIELD_BASE(45, 45, 2, 0x00f0, 0x10, 15, 1), 818 + PIN_FIELD_BASE(131, 131, 1, 0x0100, 0x10, 1, 1), 819 + PIN_FIELD_BASE(132, 132, 1, 0x0100, 0x10, 2, 1), 820 + PIN_FIELD_BASE(133, 133, 1, 0x0100, 0x10, 9, 1), 821 + PIN_FIELD_BASE(134, 134, 1, 0x0100, 0x10, 10, 1), 822 + PIN_FIELD_BASE(135, 135, 1, 0x0100, 0x10, 11, 1), 823 + PIN_FIELD_BASE(136, 136, 1, 0x0100, 0x10, 12, 1), 824 + PIN_FIELD_BASE(137, 137, 1, 0x0100, 0x10, 13, 1), 825 + PIN_FIELD_BASE(138, 138, 1, 0x0100, 0x10, 14, 1), 826 + PIN_FIELD_BASE(139, 139, 1, 0x0100, 0x10, 15, 1), 827 + PIN_FIELD_BASE(140, 140, 1, 0x0100, 0x10, 16, 1), 828 + PIN_FIELD_BASE(141, 141, 1, 0x0100, 0x10, 3, 1), 829 + PIN_FIELD_BASE(142, 142, 1, 0x0100, 0x10, 4, 1), 830 + PIN_FIELD_BASE(143, 143, 1, 0x0100, 0x10, 5, 1), 831 + PIN_FIELD_BASE(144, 144, 1, 0x0100, 0x10, 6, 1), 832 + PIN_FIELD_BASE(145, 145, 1, 0x0100, 0x10, 7, 1), 833 + PIN_FIELD_BASE(146, 146, 1, 0x0100, 0x10, 8, 1), 834 + PIN_FIELD_BASE(147, 147, 1, 0x0100, 0x10, 18, 1), 835 + PIN_FIELD_BASE(148, 148, 1, 0x0100, 0x10, 19, 1), 836 + PIN_FIELD_BASE(149, 149, 1, 0x0100, 0x10, 17, 1), 837 + PIN_FIELD_BASE(150, 150, 1, 0x0100, 0x10, 0, 1), 838 + PIN_FIELD_BASE(151, 151, 2, 0x00f0, 0x10, 9, 1), 839 + PIN_FIELD_BASE(152, 152, 2, 0x00f0, 0x10, 8, 1), 840 + PIN_FIELD_BASE(153, 153, 2, 0x00f0, 0x10, 7, 1), 841 + PIN_FIELD_BASE(154, 154, 2, 0x00f0, 0x10, 6, 1), 842 + PIN_FIELD_BASE(155, 155, 2, 0x00f0, 0x10, 11, 1), 843 + PIN_FIELD_BASE(156, 156, 2, 0x00f0, 0x10, 1, 1), 844 + PIN_FIELD_BASE(157, 157, 2, 0x00f0, 0x10, 0, 1), 845 + PIN_FIELD_BASE(158, 158, 2, 0x00f0, 0x10, 5, 1), 846 + PIN_FIELD_BASE(159, 159, 2, 0x00f0, 0x10, 4, 1), 847 + PIN_FIELD_BASE(160, 160, 2, 0x00f0, 0x10, 3, 1), 848 + PIN_FIELD_BASE(161, 161, 2, 0x00f0, 0x10, 2, 1), 849 + PIN_FIELD_BASE(162, 162, 2, 0x00f0, 0x10, 10, 1), 850 + PIN_FIELD_BASE(163, 163, 4, 0x0090, 0x10, 1, 1), 851 + PIN_FIELD_BASE(164, 164, 4, 0x0090, 0x10, 0, 1), 852 + PIN_FIELD_BASE(165, 165, 4, 0x0090, 0x10, 2, 1), 853 + PIN_FIELD_BASE(166, 166, 4, 0x0090, 0x10, 3, 1), 854 + PIN_FIELD_BASE(167, 167, 4, 0x0090, 0x10, 4, 1), 855 + PIN_FIELD_BASE(168, 168, 4, 0x0090, 0x10, 5, 1), 856 + PIN_FIELD_BASE(169, 169, 3, 0x0080, 0x10, 1, 1), 857 + PIN_FIELD_BASE(170, 170, 3, 0x0080, 0x10, 0, 1), 858 + PIN_FIELD_BASE(171, 171, 3, 0x0080, 0x10, 2, 1), 859 + PIN_FIELD_BASE(172, 172, 3, 0x0080, 0x10, 3, 1), 860 + PIN_FIELD_BASE(173, 173, 3, 0x0080, 0x10, 4, 1), 861 + PIN_FIELD_BASE(174, 174, 3, 0x0080, 0x10, 5, 1), 862 + }; 863 + 864 + static const struct mtk_pin_field_calc mt8188_pin_r1_range[] = { 865 + PIN_FIELD_BASE(42, 42, 2, 0x0100, 0x10, 12, 1), 866 + PIN_FIELD_BASE(43, 43, 2, 0x0100, 0x10, 13, 1), 867 + PIN_FIELD_BASE(44, 44, 2, 0x0100, 0x10, 14, 1), 868 + PIN_FIELD_BASE(45, 45, 2, 0x0100, 0x10, 15, 1), 869 + PIN_FIELD_BASE(131, 131, 1, 0x0110, 0x10, 1, 1), 870 + PIN_FIELD_BASE(132, 132, 1, 0x0110, 0x10, 2, 1), 871 + PIN_FIELD_BASE(133, 133, 1, 0x0110, 0x10, 9, 1), 872 + PIN_FIELD_BASE(134, 134, 1, 0x0110, 0x10, 10, 1), 873 + PIN_FIELD_BASE(135, 135, 1, 0x0110, 0x10, 11, 1), 874 + PIN_FIELD_BASE(136, 136, 1, 0x0110, 0x10, 12, 1), 875 + PIN_FIELD_BASE(137, 137, 1, 0x0110, 0x10, 13, 1), 876 + PIN_FIELD_BASE(138, 138, 1, 0x0110, 0x10, 14, 1), 877 + PIN_FIELD_BASE(139, 139, 1, 0x0110, 0x10, 15, 1), 878 + PIN_FIELD_BASE(140, 140, 1, 0x0110, 0x10, 16, 1), 879 + PIN_FIELD_BASE(141, 141, 1, 0x0110, 0x10, 3, 1), 880 + PIN_FIELD_BASE(142, 142, 1, 0x0110, 0x10, 4, 1), 881 + PIN_FIELD_BASE(143, 143, 1, 0x0110, 0x10, 5, 1), 882 + PIN_FIELD_BASE(144, 144, 1, 0x0110, 0x10, 6, 1), 883 + PIN_FIELD_BASE(145, 145, 1, 0x0110, 0x10, 7, 1), 884 + PIN_FIELD_BASE(146, 146, 1, 0x0110, 0x10, 8, 1), 885 + PIN_FIELD_BASE(147, 147, 1, 0x0110, 0x10, 18, 1), 886 + PIN_FIELD_BASE(148, 148, 1, 0x0110, 0x10, 19, 1), 887 + PIN_FIELD_BASE(149, 149, 1, 0x0110, 0x10, 17, 1), 888 + PIN_FIELD_BASE(150, 150, 1, 0x0110, 0x10, 0, 1), 889 + PIN_FIELD_BASE(151, 151, 2, 0x0100, 0x10, 9, 1), 890 + PIN_FIELD_BASE(152, 152, 2, 0x0100, 0x10, 8, 1), 891 + PIN_FIELD_BASE(153, 153, 2, 0x0100, 0x10, 7, 1), 892 + PIN_FIELD_BASE(154, 154, 2, 0x0100, 0x10, 6, 1), 893 + PIN_FIELD_BASE(155, 155, 2, 0x0100, 0x10, 11, 1), 894 + PIN_FIELD_BASE(156, 156, 2, 0x0100, 0x10, 1, 1), 895 + PIN_FIELD_BASE(157, 157, 2, 0x0100, 0x10, 0, 1), 896 + PIN_FIELD_BASE(158, 158, 2, 0x0100, 0x10, 5, 1), 897 + PIN_FIELD_BASE(159, 159, 2, 0x0100, 0x10, 4, 1), 898 + PIN_FIELD_BASE(160, 160, 2, 0x0100, 0x10, 3, 1), 899 + PIN_FIELD_BASE(161, 161, 2, 0x0100, 0x10, 2, 1), 900 + PIN_FIELD_BASE(162, 162, 2, 0x0100, 0x10, 10, 1), 901 + PIN_FIELD_BASE(163, 163, 4, 0x00a0, 0x10, 1, 1), 902 + PIN_FIELD_BASE(164, 164, 4, 0x00a0, 0x10, 0, 1), 903 + PIN_FIELD_BASE(165, 165, 4, 0x00a0, 0x10, 2, 1), 904 + PIN_FIELD_BASE(166, 166, 4, 0x00a0, 0x10, 3, 1), 905 + PIN_FIELD_BASE(167, 167, 4, 0x00a0, 0x10, 4, 1), 906 + PIN_FIELD_BASE(168, 168, 4, 0x00a0, 0x10, 5, 1), 907 + PIN_FIELD_BASE(169, 169, 3, 0x0090, 0x10, 1, 1), 908 + PIN_FIELD_BASE(170, 170, 3, 0x0090, 0x10, 0, 1), 909 + PIN_FIELD_BASE(171, 171, 3, 0x0090, 0x10, 2, 1), 910 + PIN_FIELD_BASE(172, 172, 3, 0x0090, 0x10, 3, 1), 911 + PIN_FIELD_BASE(173, 173, 3, 0x0090, 0x10, 4, 1), 912 + PIN_FIELD_BASE(174, 174, 3, 0x0090, 0x10, 5, 1), 913 + }; 914 + 915 + static const struct mtk_pin_field_calc mt8188_pin_pu_range[] = { 916 + PIN_FIELD_BASE(0, 0, 1, 0x00e0, 0x10, 6, 1), 917 + PIN_FIELD_BASE(1, 1, 1, 0x00e0, 0x10, 7, 1), 918 + PIN_FIELD_BASE(2, 2, 1, 0x00e0, 0x10, 8, 1), 919 + PIN_FIELD_BASE(3, 3, 1, 0x00e0, 0x10, 9, 1), 920 + PIN_FIELD_BASE(4, 4, 1, 0x00e0, 0x10, 10, 1), 921 + PIN_FIELD_BASE(5, 5, 1, 0x00e0, 0x10, 11, 1), 922 + PIN_FIELD_BASE(6, 6, 1, 0x00e0, 0x10, 12, 1), 923 + PIN_FIELD_BASE(7, 7, 1, 0x00e0, 0x10, 13, 1), 924 + PIN_FIELD_BASE(8, 8, 1, 0x00e0, 0x10, 14, 1), 925 + PIN_FIELD_BASE(9, 9, 1, 0x00e0, 0x10, 15, 1), 926 + PIN_FIELD_BASE(10, 10, 1, 0x00e0, 0x10, 16, 1), 927 + PIN_FIELD_BASE(11, 11, 1, 0x00e0, 0x10, 17, 1), 928 + PIN_FIELD_BASE(12, 12, 2, 0x00d0, 0x10, 12, 1), 929 + PIN_FIELD_BASE(13, 13, 2, 0x00d0, 0x10, 13, 1), 930 + PIN_FIELD_BASE(14, 14, 2, 0x00d0, 0x10, 14, 1), 931 + PIN_FIELD_BASE(15, 15, 2, 0x00d0, 0x10, 15, 1), 932 + PIN_FIELD_BASE(16, 16, 3, 0x0070, 0x10, 1, 1), 933 + PIN_FIELD_BASE(17, 17, 3, 0x0070, 0x10, 2, 1), 934 + PIN_FIELD_BASE(18, 18, 4, 0x0080, 0x10, 3, 1), 935 + PIN_FIELD_BASE(19, 19, 4, 0x0080, 0x10, 5, 1), 936 + PIN_FIELD_BASE(20, 20, 4, 0x0080, 0x10, 4, 1), 937 + PIN_FIELD_BASE(21, 21, 4, 0x0080, 0x10, 6, 1), 938 + PIN_FIELD_BASE(22, 22, 4, 0x0080, 0x10, 0, 1), 939 + PIN_FIELD_BASE(23, 23, 4, 0x0080, 0x10, 1, 1), 940 + PIN_FIELD_BASE(24, 24, 4, 0x0080, 0x10, 2, 1), 941 + PIN_FIELD_BASE(25, 25, 1, 0x00e0, 0x10, 3, 1), 942 + PIN_FIELD_BASE(26, 26, 1, 0x00e0, 0x10, 2, 1), 943 + PIN_FIELD_BASE(27, 27, 1, 0x00e0, 0x10, 5, 1), 944 + PIN_FIELD_BASE(28, 28, 1, 0x00e0, 0x10, 4, 1), 945 + PIN_FIELD_BASE(29, 29, 1, 0x00e0, 0x10, 0, 1), 946 + PIN_FIELD_BASE(30, 30, 1, 0x00e0, 0x10, 1, 1), 947 + PIN_FIELD_BASE(31, 31, 1, 0x00f0, 0x10, 11, 1), 948 + PIN_FIELD_BASE(32, 32, 1, 0x00f0, 0x10, 10, 1), 949 + PIN_FIELD_BASE(33, 33, 1, 0x00f0, 0x10, 13, 1), 950 + PIN_FIELD_BASE(34, 34, 1, 0x00f0, 0x10, 12, 1), 951 + PIN_FIELD_BASE(35, 35, 1, 0x00f0, 0x10, 15, 1), 952 + PIN_FIELD_BASE(36, 36, 1, 0x00f0, 0x10, 14, 1), 953 + PIN_FIELD_BASE(37, 37, 1, 0x00e0, 0x10, 21, 1), 954 + PIN_FIELD_BASE(38, 38, 1, 0x00e0, 0x10, 18, 1), 955 + PIN_FIELD_BASE(39, 39, 1, 0x00e0, 0x10, 19, 1), 956 + PIN_FIELD_BASE(40, 40, 1, 0x00e0, 0x10, 20, 1), 957 + PIN_FIELD_BASE(41, 41, 1, 0x00e0, 0x10, 22, 1), 958 + PIN_FIELD_BASE(46, 46, 3, 0x0070, 0x10, 0, 1), 959 + PIN_FIELD_BASE(47, 47, 1, 0x00e0, 0x10, 25, 1), 960 + PIN_FIELD_BASE(48, 48, 1, 0x00e0, 0x10, 24, 1), 961 + PIN_FIELD_BASE(49, 49, 1, 0x00e0, 0x10, 23, 1), 962 + PIN_FIELD_BASE(50, 50, 3, 0x0070, 0x10, 5, 1), 963 + PIN_FIELD_BASE(51, 51, 3, 0x0070, 0x10, 4, 1), 964 + PIN_FIELD_BASE(52, 52, 3, 0x0070, 0x10, 3, 1), 965 + PIN_FIELD_BASE(53, 53, 3, 0x0070, 0x10, 6, 1), 966 + PIN_FIELD_BASE(54, 54, 3, 0x0070, 0x10, 7, 1), 967 + PIN_FIELD_BASE(55, 55, 1, 0x00e0, 0x10, 26, 1), 968 + PIN_FIELD_BASE(56, 56, 1, 0x00e0, 0x10, 29, 1), 969 + PIN_FIELD_BASE(57, 57, 2, 0x00e0, 0x10, 6, 1), 970 + PIN_FIELD_BASE(58, 58, 2, 0x00e0, 0x10, 9, 1), 971 + PIN_FIELD_BASE(59, 59, 1, 0x00e0, 0x10, 27, 1), 972 + PIN_FIELD_BASE(60, 60, 1, 0x00e0, 0x10, 30, 1), 973 + PIN_FIELD_BASE(61, 61, 1, 0x00e0, 0x10, 28, 1), 974 + PIN_FIELD_BASE(62, 62, 1, 0x00e0, 0x10, 31, 1), 975 + PIN_FIELD_BASE(63, 63, 2, 0x00e0, 0x10, 7, 1), 976 + PIN_FIELD_BASE(64, 64, 2, 0x00e0, 0x10, 10, 1), 977 + PIN_FIELD_BASE(65, 65, 4, 0x0080, 0x10, 7, 1), 978 + PIN_FIELD_BASE(66, 66, 4, 0x0080, 0x10, 9, 1), 979 + PIN_FIELD_BASE(67, 67, 4, 0x0080, 0x10, 8, 1), 980 + PIN_FIELD_BASE(68, 68, 4, 0x0080, 0x10, 10, 1), 981 + PIN_FIELD_BASE(69, 69, 1, 0x00f0, 0x10, 1, 1), 982 + PIN_FIELD_BASE(70, 70, 1, 0x00f0, 0x10, 0, 1), 983 + PIN_FIELD_BASE(71, 71, 1, 0x00f0, 0x10, 5, 1), 984 + PIN_FIELD_BASE(72, 72, 1, 0x00f0, 0x10, 4, 1), 985 + PIN_FIELD_BASE(73, 73, 1, 0x00f0, 0x10, 2, 1), 986 + PIN_FIELD_BASE(74, 74, 1, 0x00f0, 0x10, 3, 1), 987 + PIN_FIELD_BASE(75, 75, 1, 0x00f0, 0x10, 7, 1), 988 + PIN_FIELD_BASE(76, 76, 1, 0x00f0, 0x10, 6, 1), 989 + PIN_FIELD_BASE(77, 77, 1, 0x00f0, 0x10, 9, 1), 990 + PIN_FIELD_BASE(78, 78, 1, 0x00f0, 0x10, 8, 1), 991 + PIN_FIELD_BASE(79, 79, 4, 0x0080, 0x10, 12, 1), 992 + PIN_FIELD_BASE(80, 80, 4, 0x0080, 0x10, 11, 1), 993 + PIN_FIELD_BASE(81, 81, 4, 0x0080, 0x10, 14, 1), 994 + PIN_FIELD_BASE(82, 82, 4, 0x0080, 0x10, 13, 1), 995 + PIN_FIELD_BASE(83, 83, 2, 0x00e0, 0x10, 16, 1), 996 + PIN_FIELD_BASE(84, 84, 2, 0x00e0, 0x10, 15, 1), 997 + PIN_FIELD_BASE(85, 85, 2, 0x00e0, 0x10, 17, 1), 998 + PIN_FIELD_BASE(86, 86, 2, 0x00e0, 0x10, 19, 1), 999 + PIN_FIELD_BASE(87, 87, 2, 0x00e0, 0x10, 18, 1), 1000 + PIN_FIELD_BASE(88, 88, 2, 0x00e0, 0x10, 20, 1), 1001 + PIN_FIELD_BASE(89, 89, 2, 0x00e0, 0x10, 22, 1), 1002 + PIN_FIELD_BASE(90, 90, 2, 0x00e0, 0x10, 21, 1), 1003 + PIN_FIELD_BASE(91, 91, 2, 0x00e0, 0x10, 23, 1), 1004 + PIN_FIELD_BASE(92, 92, 2, 0x00e0, 0x10, 3, 1), 1005 + PIN_FIELD_BASE(93, 93, 2, 0x00e0, 0x10, 2, 1), 1006 + PIN_FIELD_BASE(94, 94, 2, 0x00e0, 0x10, 5, 1), 1007 + PIN_FIELD_BASE(95, 95, 2, 0x00e0, 0x10, 4, 1), 1008 + PIN_FIELD_BASE(96, 96, 2, 0x00d0, 0x10, 31, 1), 1009 + PIN_FIELD_BASE(97, 97, 2, 0x00e0, 0x10, 0, 1), 1010 + PIN_FIELD_BASE(98, 98, 2, 0x00e0, 0x10, 8, 1), 1011 + PIN_FIELD_BASE(99, 99, 2, 0x00d0, 0x10, 30, 1), 1012 + PIN_FIELD_BASE(100, 100, 2, 0x00e0, 0x10, 1, 1), 1013 + PIN_FIELD_BASE(101, 101, 2, 0x00d0, 0x10, 0, 1), 1014 + PIN_FIELD_BASE(102, 102, 2, 0x00d0, 0x10, 5, 1), 1015 + PIN_FIELD_BASE(103, 103, 2, 0x00d0, 0x10, 3, 1), 1016 + PIN_FIELD_BASE(104, 104, 2, 0x00d0, 0x10, 4, 1), 1017 + PIN_FIELD_BASE(105, 105, 2, 0x00d0, 0x10, 1, 1), 1018 + PIN_FIELD_BASE(106, 106, 2, 0x00d0, 0x10, 2, 1), 1019 + PIN_FIELD_BASE(107, 107, 2, 0x00d0, 0x10, 21, 1), 1020 + PIN_FIELD_BASE(108, 108, 2, 0x00d0, 0x10, 16, 1), 1021 + PIN_FIELD_BASE(109, 109, 2, 0x00d0, 0x10, 22, 1), 1022 + PIN_FIELD_BASE(110, 110, 2, 0x00d0, 0x10, 17, 1), 1023 + PIN_FIELD_BASE(111, 111, 2, 0x00d0, 0x10, 18, 1), 1024 + PIN_FIELD_BASE(112, 112, 2, 0x00d0, 0x10, 19, 1), 1025 + PIN_FIELD_BASE(113, 113, 2, 0x00d0, 0x10, 20, 1), 1026 + PIN_FIELD_BASE(114, 114, 2, 0x00d0, 0x10, 28, 1), 1027 + PIN_FIELD_BASE(115, 115, 2, 0x00d0, 0x10, 23, 1), 1028 + PIN_FIELD_BASE(116, 116, 2, 0x00d0, 0x10, 29, 1), 1029 + PIN_FIELD_BASE(117, 117, 2, 0x00d0, 0x10, 24, 1), 1030 + PIN_FIELD_BASE(118, 118, 2, 0x00d0, 0x10, 25, 1), 1031 + PIN_FIELD_BASE(119, 119, 2, 0x00d0, 0x10, 26, 1), 1032 + PIN_FIELD_BASE(120, 120, 2, 0x00d0, 0x10, 27, 1), 1033 + PIN_FIELD_BASE(121, 121, 3, 0x0070, 0x10, 8, 1), 1034 + PIN_FIELD_BASE(122, 122, 3, 0x0070, 0x10, 11, 1), 1035 + PIN_FIELD_BASE(123, 123, 3, 0x0070, 0x10, 10, 1), 1036 + PIN_FIELD_BASE(124, 124, 3, 0x0070, 0x10, 9, 1), 1037 + PIN_FIELD_BASE(125, 125, 2, 0x00d0, 0x10, 6, 1), 1038 + PIN_FIELD_BASE(126, 126, 2, 0x00d0, 0x10, 7, 1), 1039 + PIN_FIELD_BASE(127, 127, 2, 0x00d0, 0x10, 8, 1), 1040 + PIN_FIELD_BASE(128, 128, 2, 0x00d0, 0x10, 9, 1), 1041 + PIN_FIELD_BASE(129, 129, 2, 0x00d0, 0x10, 10, 1), 1042 + PIN_FIELD_BASE(130, 130, 2, 0x00d0, 0x10, 11, 1), 1043 + PIN_FIELD_BASE(175, 175, 2, 0x00e0, 0x10, 11, 1), 1044 + PIN_FIELD_BASE(176, 176, 2, 0x00e0, 0x10, 12, 1), 1045 + }; 1046 + 1047 + static const struct mtk_pin_field_calc mt8188_pin_pd_range[] = { 1048 + PIN_FIELD_BASE(0, 0, 1, 0x00b0, 0x10, 6, 1), 1049 + PIN_FIELD_BASE(1, 1, 1, 0x00b0, 0x10, 7, 1), 1050 + PIN_FIELD_BASE(2, 2, 1, 0x00b0, 0x10, 8, 1), 1051 + PIN_FIELD_BASE(3, 3, 1, 0x00b0, 0x10, 9, 1), 1052 + PIN_FIELD_BASE(4, 4, 1, 0x00b0, 0x10, 10, 1), 1053 + PIN_FIELD_BASE(5, 5, 1, 0x00b0, 0x10, 11, 1), 1054 + PIN_FIELD_BASE(6, 6, 1, 0x00b0, 0x10, 12, 1), 1055 + PIN_FIELD_BASE(7, 7, 1, 0x00b0, 0x10, 13, 1), 1056 + PIN_FIELD_BASE(8, 8, 1, 0x00b0, 0x10, 14, 1), 1057 + PIN_FIELD_BASE(9, 9, 1, 0x00b0, 0x10, 15, 1), 1058 + PIN_FIELD_BASE(10, 10, 1, 0x00b0, 0x10, 16, 1), 1059 + PIN_FIELD_BASE(11, 11, 1, 0x00b0, 0x10, 17, 1), 1060 + PIN_FIELD_BASE(12, 12, 2, 0x00a0, 0x10, 12, 1), 1061 + PIN_FIELD_BASE(13, 13, 2, 0x00a0, 0x10, 13, 1), 1062 + PIN_FIELD_BASE(14, 14, 2, 0x00a0, 0x10, 14, 1), 1063 + PIN_FIELD_BASE(15, 15, 2, 0x00a0, 0x10, 15, 1), 1064 + PIN_FIELD_BASE(16, 16, 3, 0x0050, 0x10, 1, 1), 1065 + PIN_FIELD_BASE(17, 17, 3, 0x0050, 0x10, 2, 1), 1066 + PIN_FIELD_BASE(18, 18, 4, 0x0060, 0x10, 3, 1), 1067 + PIN_FIELD_BASE(19, 19, 4, 0x0060, 0x10, 5, 1), 1068 + PIN_FIELD_BASE(20, 20, 4, 0x0060, 0x10, 4, 1), 1069 + PIN_FIELD_BASE(21, 21, 4, 0x0060, 0x10, 6, 1), 1070 + PIN_FIELD_BASE(22, 22, 4, 0x0060, 0x10, 0, 1), 1071 + PIN_FIELD_BASE(23, 23, 4, 0x0060, 0x10, 1, 1), 1072 + PIN_FIELD_BASE(24, 24, 4, 0x0060, 0x10, 2, 1), 1073 + PIN_FIELD_BASE(25, 25, 1, 0x00b0, 0x10, 3, 1), 1074 + PIN_FIELD_BASE(26, 26, 1, 0x00b0, 0x10, 2, 1), 1075 + PIN_FIELD_BASE(27, 27, 1, 0x00b0, 0x10, 5, 1), 1076 + PIN_FIELD_BASE(28, 28, 1, 0x00b0, 0x10, 4, 1), 1077 + PIN_FIELD_BASE(29, 29, 1, 0x00b0, 0x10, 0, 1), 1078 + PIN_FIELD_BASE(30, 30, 1, 0x00b0, 0x10, 1, 1), 1079 + PIN_FIELD_BASE(31, 31, 1, 0x00c0, 0x10, 11, 1), 1080 + PIN_FIELD_BASE(32, 32, 1, 0x00c0, 0x10, 10, 1), 1081 + PIN_FIELD_BASE(33, 33, 1, 0x00c0, 0x10, 13, 1), 1082 + PIN_FIELD_BASE(34, 34, 1, 0x00c0, 0x10, 12, 1), 1083 + PIN_FIELD_BASE(35, 35, 1, 0x00c0, 0x10, 15, 1), 1084 + PIN_FIELD_BASE(36, 36, 1, 0x00c0, 0x10, 14, 1), 1085 + PIN_FIELD_BASE(37, 37, 1, 0x00b0, 0x10, 21, 1), 1086 + PIN_FIELD_BASE(38, 38, 1, 0x00b0, 0x10, 18, 1), 1087 + PIN_FIELD_BASE(39, 39, 1, 0x00b0, 0x10, 19, 1), 1088 + PIN_FIELD_BASE(40, 40, 1, 0x00b0, 0x10, 20, 1), 1089 + PIN_FIELD_BASE(41, 41, 1, 0x00b0, 0x10, 22, 1), 1090 + PIN_FIELD_BASE(46, 46, 3, 0x0050, 0x10, 0, 1), 1091 + PIN_FIELD_BASE(47, 47, 1, 0x00b0, 0x10, 25, 1), 1092 + PIN_FIELD_BASE(48, 48, 1, 0x00b0, 0x10, 24, 1), 1093 + PIN_FIELD_BASE(49, 49, 1, 0x00b0, 0x10, 23, 1), 1094 + PIN_FIELD_BASE(50, 50, 3, 0x0050, 0x10, 5, 1), 1095 + PIN_FIELD_BASE(51, 51, 3, 0x0050, 0x10, 4, 1), 1096 + PIN_FIELD_BASE(52, 52, 3, 0x0050, 0x10, 3, 1), 1097 + PIN_FIELD_BASE(53, 53, 3, 0x0050, 0x10, 6, 1), 1098 + PIN_FIELD_BASE(54, 54, 3, 0x0050, 0x10, 7, 1), 1099 + PIN_FIELD_BASE(55, 55, 1, 0x00b0, 0x10, 26, 1), 1100 + PIN_FIELD_BASE(56, 56, 1, 0x00b0, 0x10, 29, 1), 1101 + PIN_FIELD_BASE(57, 57, 2, 0x00b0, 0x10, 6, 1), 1102 + PIN_FIELD_BASE(58, 58, 2, 0x00b0, 0x10, 9, 1), 1103 + PIN_FIELD_BASE(59, 59, 1, 0x00b0, 0x10, 27, 1), 1104 + PIN_FIELD_BASE(60, 60, 1, 0x00b0, 0x10, 30, 1), 1105 + PIN_FIELD_BASE(61, 61, 1, 0x00b0, 0x10, 28, 1), 1106 + PIN_FIELD_BASE(62, 62, 1, 0x00b0, 0x10, 31, 1), 1107 + PIN_FIELD_BASE(63, 63, 2, 0x00b0, 0x10, 7, 1), 1108 + PIN_FIELD_BASE(64, 64, 2, 0x00b0, 0x10, 10, 1), 1109 + PIN_FIELD_BASE(65, 65, 4, 0x0060, 0x10, 7, 1), 1110 + PIN_FIELD_BASE(66, 66, 4, 0x0060, 0x10, 9, 1), 1111 + PIN_FIELD_BASE(67, 67, 4, 0x0060, 0x10, 8, 1), 1112 + PIN_FIELD_BASE(68, 68, 4, 0x0060, 0x10, 10, 1), 1113 + PIN_FIELD_BASE(69, 69, 1, 0x00c0, 0x10, 1, 1), 1114 + PIN_FIELD_BASE(70, 70, 1, 0x00c0, 0x10, 0, 1), 1115 + PIN_FIELD_BASE(71, 71, 1, 0x00c0, 0x10, 5, 1), 1116 + PIN_FIELD_BASE(72, 72, 1, 0x00c0, 0x10, 4, 1), 1117 + PIN_FIELD_BASE(73, 73, 1, 0x00c0, 0x10, 2, 1), 1118 + PIN_FIELD_BASE(74, 74, 1, 0x00c0, 0x10, 3, 1), 1119 + PIN_FIELD_BASE(75, 75, 1, 0x00c0, 0x10, 7, 1), 1120 + PIN_FIELD_BASE(76, 76, 1, 0x00c0, 0x10, 6, 1), 1121 + PIN_FIELD_BASE(77, 77, 1, 0x00c0, 0x10, 9, 1), 1122 + PIN_FIELD_BASE(78, 78, 1, 0x00c0, 0x10, 8, 1), 1123 + PIN_FIELD_BASE(79, 79, 4, 0x0060, 0x10, 12, 1), 1124 + PIN_FIELD_BASE(80, 80, 4, 0x0060, 0x10, 11, 1), 1125 + PIN_FIELD_BASE(81, 81, 4, 0x0060, 0x10, 14, 1), 1126 + PIN_FIELD_BASE(82, 82, 4, 0x0060, 0x10, 13, 1), 1127 + PIN_FIELD_BASE(83, 83, 2, 0x00b0, 0x10, 16, 1), 1128 + PIN_FIELD_BASE(84, 84, 2, 0x00b0, 0x10, 15, 1), 1129 + PIN_FIELD_BASE(85, 85, 2, 0x00b0, 0x10, 17, 1), 1130 + PIN_FIELD_BASE(86, 86, 2, 0x00b0, 0x10, 19, 1), 1131 + PIN_FIELD_BASE(87, 87, 2, 0x00b0, 0x10, 18, 1), 1132 + PIN_FIELD_BASE(88, 88, 2, 0x00b0, 0x10, 20, 1), 1133 + PIN_FIELD_BASE(89, 89, 2, 0x00b0, 0x10, 22, 1), 1134 + PIN_FIELD_BASE(90, 90, 2, 0x00b0, 0x10, 21, 1), 1135 + PIN_FIELD_BASE(91, 91, 2, 0x00b0, 0x10, 23, 1), 1136 + PIN_FIELD_BASE(92, 92, 2, 0x00b0, 0x10, 3, 1), 1137 + PIN_FIELD_BASE(93, 93, 2, 0x00b0, 0x10, 2, 1), 1138 + PIN_FIELD_BASE(94, 94, 2, 0x00b0, 0x10, 5, 1), 1139 + PIN_FIELD_BASE(95, 95, 2, 0x00b0, 0x10, 4, 1), 1140 + PIN_FIELD_BASE(96, 96, 2, 0x00a0, 0x10, 31, 1), 1141 + PIN_FIELD_BASE(97, 97, 2, 0x00b0, 0x10, 0, 1), 1142 + PIN_FIELD_BASE(98, 98, 2, 0x00b0, 0x10, 8, 1), 1143 + PIN_FIELD_BASE(99, 99, 2, 0x00a0, 0x10, 30, 1), 1144 + PIN_FIELD_BASE(100, 100, 2, 0x00b0, 0x10, 1, 1), 1145 + PIN_FIELD_BASE(101, 101, 2, 0x00a0, 0x10, 0, 1), 1146 + PIN_FIELD_BASE(102, 102, 2, 0x00a0, 0x10, 5, 1), 1147 + PIN_FIELD_BASE(103, 103, 2, 0x00a0, 0x10, 3, 1), 1148 + PIN_FIELD_BASE(104, 104, 2, 0x00a0, 0x10, 4, 1), 1149 + PIN_FIELD_BASE(105, 105, 2, 0x00a0, 0x10, 1, 1), 1150 + PIN_FIELD_BASE(106, 106, 2, 0x00a0, 0x10, 2, 1), 1151 + PIN_FIELD_BASE(107, 107, 2, 0x00a0, 0x10, 21, 1), 1152 + PIN_FIELD_BASE(108, 108, 2, 0x00a0, 0x10, 16, 1), 1153 + PIN_FIELD_BASE(109, 109, 2, 0x00a0, 0x10, 22, 1), 1154 + PIN_FIELD_BASE(110, 110, 2, 0x00a0, 0x10, 17, 1), 1155 + PIN_FIELD_BASE(111, 111, 2, 0x00a0, 0x10, 18, 1), 1156 + PIN_FIELD_BASE(112, 112, 2, 0x00a0, 0x10, 19, 1), 1157 + PIN_FIELD_BASE(113, 113, 2, 0x00a0, 0x10, 20, 1), 1158 + PIN_FIELD_BASE(114, 114, 2, 0x00a0, 0x10, 28, 1), 1159 + PIN_FIELD_BASE(115, 115, 2, 0x00a0, 0x10, 23, 1), 1160 + PIN_FIELD_BASE(116, 116, 2, 0x00a0, 0x10, 29, 1), 1161 + PIN_FIELD_BASE(117, 117, 2, 0x00a0, 0x10, 24, 1), 1162 + PIN_FIELD_BASE(118, 118, 2, 0x00a0, 0x10, 25, 1), 1163 + PIN_FIELD_BASE(119, 119, 2, 0x00a0, 0x10, 26, 1), 1164 + PIN_FIELD_BASE(120, 120, 2, 0x00a0, 0x10, 27, 1), 1165 + PIN_FIELD_BASE(121, 121, 3, 0x0050, 0x10, 8, 1), 1166 + PIN_FIELD_BASE(122, 122, 3, 0x0050, 0x10, 11, 1), 1167 + PIN_FIELD_BASE(123, 123, 3, 0x0050, 0x10, 10, 1), 1168 + PIN_FIELD_BASE(124, 124, 3, 0x0050, 0x10, 9, 1), 1169 + PIN_FIELD_BASE(125, 125, 2, 0x00a0, 0x10, 6, 1), 1170 + PIN_FIELD_BASE(126, 126, 2, 0x00a0, 0x10, 7, 1), 1171 + PIN_FIELD_BASE(127, 127, 2, 0x00a0, 0x10, 8, 1), 1172 + PIN_FIELD_BASE(128, 128, 2, 0x00a0, 0x10, 9, 1), 1173 + PIN_FIELD_BASE(129, 129, 2, 0x00a0, 0x10, 10, 1), 1174 + PIN_FIELD_BASE(130, 130, 2, 0x00a0, 0x10, 11, 1), 1175 + PIN_FIELD_BASE(175, 175, 2, 0x00b0, 0x10, 11, 1), 1176 + PIN_FIELD_BASE(176, 176, 2, 0x00b0, 0x10, 12, 1), 1177 + }; 1178 + 1179 + static const struct mtk_pin_field_calc mt8188_pin_drv_range[] = { 1180 + PIN_FIELD_BASE(0, 0, 1, 0x0000, 0x10, 24, 3), 1181 + PIN_FIELD_BASE(1, 1, 1, 0x0000, 0x10, 27, 3), 1182 + PIN_FIELD_BASE(2, 2, 1, 0x0010, 0x10, 0, 3), 1183 + PIN_FIELD_BASE(3, 3, 1, 0x0010, 0x10, 3, 3), 1184 + PIN_FIELD_BASE(4, 4, 1, 0x0020, 0x10, 9, 3), 1185 + PIN_FIELD_BASE(5, 5, 1, 0x0020, 0x10, 9, 3), 1186 + PIN_FIELD_BASE(6, 6, 1, 0x0020, 0x10, 9, 3), 1187 + PIN_FIELD_BASE(7, 7, 1, 0x0010, 0x10, 6, 3), 1188 + PIN_FIELD_BASE(8, 8, 1, 0x0010, 0x10, 9, 3), 1189 + PIN_FIELD_BASE(9, 9, 1, 0x0010, 0x10, 12, 3), 1190 + PIN_FIELD_BASE(10, 10, 1, 0x0010, 0x10, 15, 3), 1191 + PIN_FIELD_BASE(11, 11, 1, 0x0020, 0x10, 12, 3), 1192 + PIN_FIELD_BASE(12, 12, 2, 0x0010, 0x10, 24, 3), 1193 + PIN_FIELD_BASE(13, 13, 2, 0x0010, 0x10, 27, 3), 1194 + PIN_FIELD_BASE(14, 14, 2, 0x0020, 0x10, 0, 3), 1195 + PIN_FIELD_BASE(15, 15, 2, 0x0020, 0x10, 3, 3), 1196 + PIN_FIELD_BASE(16, 16, 3, 0x0010, 0x10, 15, 3), 1197 + PIN_FIELD_BASE(17, 17, 3, 0x0010, 0x10, 15, 3), 1198 + PIN_FIELD_BASE(18, 18, 4, 0x0000, 0x10, 27, 3), 1199 + PIN_FIELD_BASE(19, 19, 4, 0x0000, 0x10, 27, 3), 1200 + PIN_FIELD_BASE(20, 20, 4, 0x0000, 0x10, 27, 3), 1201 + PIN_FIELD_BASE(21, 21, 4, 0x0000, 0x10, 27, 3), 1202 + PIN_FIELD_BASE(22, 22, 4, 0x0000, 0x10, 0, 3), 1203 + PIN_FIELD_BASE(23, 23, 4, 0x0000, 0x10, 3, 3), 1204 + PIN_FIELD_BASE(24, 24, 4, 0x0000, 0x10, 6, 3), 1205 + PIN_FIELD_BASE(25, 25, 1, 0x0020, 0x10, 6, 3), 1206 + PIN_FIELD_BASE(26, 26, 1, 0x0020, 0x10, 6, 3), 1207 + PIN_FIELD_BASE(27, 27, 1, 0x0020, 0x10, 6, 3), 1208 + PIN_FIELD_BASE(28, 28, 1, 0x0020, 0x10, 9, 3), 1209 + PIN_FIELD_BASE(29, 29, 1, 0x0020, 0x10, 3, 3), 1210 + PIN_FIELD_BASE(30, 30, 1, 0x0020, 0x10, 6, 3), 1211 + PIN_FIELD_BASE(31, 31, 1, 0x0020, 0x10, 12, 3), 1212 + PIN_FIELD_BASE(32, 32, 1, 0x0020, 0x10, 12, 3), 1213 + PIN_FIELD_BASE(33, 33, 1, 0x0020, 0x10, 15, 3), 1214 + PIN_FIELD_BASE(34, 34, 1, 0x0020, 0x10, 15, 3), 1215 + PIN_FIELD_BASE(35, 35, 1, 0x0020, 0x10, 12, 3), 1216 + PIN_FIELD_BASE(36, 36, 1, 0x0020, 0x10, 15, 3), 1217 + PIN_FIELD_BASE(37, 37, 1, 0x0010, 0x10, 27, 3), 1218 + PIN_FIELD_BASE(38, 38, 1, 0x0010, 0x10, 18, 3), 1219 + PIN_FIELD_BASE(39, 39, 1, 0x0010, 0x10, 21, 3), 1220 + PIN_FIELD_BASE(40, 40, 1, 0x0010, 0x10, 24, 3), 1221 + PIN_FIELD_BASE(41, 41, 1, 0x0020, 0x10, 0, 3), 1222 + PIN_FIELD_BASE(42, 42, 2, 0x0020, 0x10, 18, 3), 1223 + PIN_FIELD_BASE(43, 43, 2, 0x0020, 0x10, 18, 3), 1224 + PIN_FIELD_BASE(44, 44, 2, 0x0020, 0x10, 18, 3), 1225 + PIN_FIELD_BASE(45, 45, 2, 0x0020, 0x10, 21, 3), 1226 + PIN_FIELD_BASE(46, 46, 3, 0x0010, 0x10, 15, 3), 1227 + PIN_FIELD_BASE(47, 47, 1, 0x0020, 0x10, 3, 3), 1228 + PIN_FIELD_BASE(48, 48, 1, 0x0020, 0x10, 3, 3), 1229 + PIN_FIELD_BASE(49, 49, 1, 0x0020, 0x10, 3, 3), 1230 + PIN_FIELD_BASE(50, 50, 3, 0x0000, 0x10, 6, 3), 1231 + PIN_FIELD_BASE(51, 51, 3, 0x0000, 0x10, 3, 3), 1232 + PIN_FIELD_BASE(52, 52, 3, 0x0000, 0x10, 0, 3), 1233 + PIN_FIELD_BASE(53, 53, 3, 0x0000, 0x10, 9, 3), 1234 + PIN_FIELD_BASE(54, 54, 3, 0x0000, 0x10, 12, 3), 1235 + PIN_FIELD_BASE(55, 55, 1, 0x0020, 0x10, 27, 3), 1236 + PIN_FIELD_BASE(56, 56, 1, 0x0030, 0x10, 6, 3), 1237 + PIN_FIELD_BASE(57, 57, 2, 0x0030, 0x10, 9, 3), 1238 + PIN_FIELD_BASE(58, 58, 2, 0x0030, 0x10, 15, 3), 1239 + PIN_FIELD_BASE(59, 59, 1, 0x0030, 0x10, 0, 3), 1240 + PIN_FIELD_BASE(60, 60, 1, 0x0030, 0x10, 9, 3), 1241 + PIN_FIELD_BASE(61, 61, 1, 0x0030, 0x10, 3, 3), 1242 + PIN_FIELD_BASE(62, 62, 1, 0x0030, 0x10, 12, 3), 1243 + PIN_FIELD_BASE(63, 63, 2, 0x0030, 0x10, 12, 3), 1244 + PIN_FIELD_BASE(64, 64, 2, 0x0030, 0x10, 18, 3), 1245 + PIN_FIELD_BASE(65, 65, 4, 0x0010, 0x10, 0, 3), 1246 + PIN_FIELD_BASE(66, 66, 4, 0x0010, 0x10, 6, 3), 1247 + PIN_FIELD_BASE(67, 67, 4, 0x0010, 0x10, 3, 3), 1248 + PIN_FIELD_BASE(68, 68, 4, 0x0010, 0x10, 9, 3), 1249 + PIN_FIELD_BASE(69, 69, 1, 0x0030, 0x10, 18, 3), 1250 + PIN_FIELD_BASE(70, 70, 1, 0x0030, 0x10, 15, 3), 1251 + PIN_FIELD_BASE(71, 71, 1, 0x0040, 0x10, 0, 3), 1252 + PIN_FIELD_BASE(72, 72, 1, 0x0030, 0x10, 27, 3), 1253 + PIN_FIELD_BASE(73, 73, 1, 0x0030, 0x10, 21, 3), 1254 + PIN_FIELD_BASE(74, 74, 1, 0x0030, 0x10, 24, 3), 1255 + PIN_FIELD_BASE(75, 75, 1, 0x0040, 0x10, 6, 3), 1256 + PIN_FIELD_BASE(76, 76, 1, 0x0040, 0x10, 3, 3), 1257 + PIN_FIELD_BASE(77, 77, 1, 0x0040, 0x10, 12, 3), 1258 + PIN_FIELD_BASE(78, 78, 1, 0x0040, 0x10, 9, 3), 1259 + PIN_FIELD_BASE(79, 79, 4, 0x0010, 0x10, 15, 3), 1260 + PIN_FIELD_BASE(80, 80, 4, 0x0010, 0x10, 12, 3), 1261 + PIN_FIELD_BASE(81, 81, 4, 0x0010, 0x10, 21, 3), 1262 + PIN_FIELD_BASE(82, 82, 4, 0x0010, 0x10, 18, 3), 1263 + PIN_FIELD_BASE(83, 83, 2, 0x0030, 0x10, 0, 3), 1264 + PIN_FIELD_BASE(84, 84, 2, 0x0020, 0x10, 27, 3), 1265 + PIN_FIELD_BASE(85, 85, 2, 0x0030, 0x10, 0, 3), 1266 + PIN_FIELD_BASE(86, 86, 2, 0x0020, 0x10, 6, 3), 1267 + PIN_FIELD_BASE(87, 87, 2, 0x0020, 0x10, 6, 3), 1268 + PIN_FIELD_BASE(88, 88, 2, 0x0020, 0x10, 6, 3), 1269 + PIN_FIELD_BASE(89, 89, 2, 0x0020, 0x10, 6, 3), 1270 + PIN_FIELD_BASE(90, 90, 2, 0x0030, 0x10, 0, 3), 1271 + PIN_FIELD_BASE(91, 91, 2, 0x0030, 0x10, 0, 3), 1272 + PIN_FIELD_BASE(92, 92, 2, 0x0020, 0x10, 9, 3), 1273 + PIN_FIELD_BASE(93, 93, 2, 0x0020, 0x10, 9, 3), 1274 + PIN_FIELD_BASE(94, 94, 2, 0x0020, 0x10, 9, 3), 1275 + PIN_FIELD_BASE(95, 95, 2, 0x0020, 0x10, 9, 3), 1276 + PIN_FIELD_BASE(96, 96, 2, 0x0020, 0x10, 21, 3), 1277 + PIN_FIELD_BASE(97, 97, 2, 0x0020, 0x10, 21, 3), 1278 + PIN_FIELD_BASE(98, 98, 2, 0x0020, 0x10, 24, 3), 1279 + PIN_FIELD_BASE(99, 99, 2, 0x0020, 0x10, 21, 3), 1280 + PIN_FIELD_BASE(100, 100, 2, 0x0030, 0x10, 6, 3), 1281 + PIN_FIELD_BASE(101, 101, 2, 0x0000, 0x10, 0, 3), 1282 + PIN_FIELD_BASE(102, 102, 2, 0x0000, 0x10, 15, 3), 1283 + PIN_FIELD_BASE(103, 103, 2, 0x0000, 0x10, 9, 3), 1284 + PIN_FIELD_BASE(104, 104, 2, 0x0000, 0x10, 12, 3), 1285 + PIN_FIELD_BASE(105, 105, 2, 0x0000, 0x10, 3, 3), 1286 + PIN_FIELD_BASE(106, 106, 2, 0x0000, 0x10, 6, 3), 1287 + PIN_FIELD_BASE(107, 107, 2, 0x0020, 0x10, 6, 3), 1288 + PIN_FIELD_BASE(108, 108, 2, 0x0020, 0x10, 6, 3), 1289 + PIN_FIELD_BASE(109, 109, 2, 0x0020, 0x10, 6, 3), 1290 + PIN_FIELD_BASE(110, 110, 2, 0x0020, 0x10, 6, 3), 1291 + PIN_FIELD_BASE(111, 111, 2, 0x0020, 0x10, 15, 3), 1292 + PIN_FIELD_BASE(112, 112, 2, 0x0020, 0x10, 15, 3), 1293 + PIN_FIELD_BASE(113, 113, 2, 0x0020, 0x10, 15, 3), 1294 + PIN_FIELD_BASE(114, 114, 2, 0x0020, 0x10, 12, 3), 1295 + PIN_FIELD_BASE(115, 115, 2, 0x0020, 0x10, 12, 3), 1296 + PIN_FIELD_BASE(116, 116, 2, 0x0020, 0x10, 12, 3), 1297 + PIN_FIELD_BASE(117, 117, 2, 0x0020, 0x10, 12, 3), 1298 + PIN_FIELD_BASE(118, 118, 2, 0x0020, 0x10, 12, 3), 1299 + PIN_FIELD_BASE(119, 119, 2, 0x0020, 0x10, 15, 3), 1300 + PIN_FIELD_BASE(120, 120, 2, 0x0020, 0x10, 18, 3), 1301 + PIN_FIELD_BASE(121, 121, 3, 0x0010, 0x10, 3, 3), 1302 + PIN_FIELD_BASE(122, 122, 3, 0x0010, 0x10, 12, 3), 1303 + PIN_FIELD_BASE(123, 123, 3, 0x0010, 0x10, 9, 3), 1304 + PIN_FIELD_BASE(124, 124, 3, 0x0010, 0x10, 6, 3), 1305 + PIN_FIELD_BASE(125, 125, 2, 0x0020, 0x10, 24, 3), 1306 + PIN_FIELD_BASE(126, 126, 2, 0x0020, 0x10, 24, 3), 1307 + PIN_FIELD_BASE(127, 127, 2, 0x0020, 0x10, 24, 3), 1308 + PIN_FIELD_BASE(128, 128, 2, 0x0020, 0x10, 27, 3), 1309 + PIN_FIELD_BASE(129, 129, 2, 0x0020, 0x10, 27, 3), 1310 + PIN_FIELD_BASE(130, 130, 2, 0x0020, 0x10, 27, 3), 1311 + PIN_FIELD_BASE(131, 131, 1, 0x0000, 0x10, 0, 3), 1312 + PIN_FIELD_BASE(132, 132, 1, 0x0000, 0x10, 15, 3), 1313 + PIN_FIELD_BASE(133, 133, 1, 0x0000, 0x10, 18, 3), 1314 + PIN_FIELD_BASE(134, 134, 1, 0x0000, 0x10, 21, 3), 1315 + PIN_FIELD_BASE(135, 135, 1, 0x0020, 0x10, 15, 3), 1316 + PIN_FIELD_BASE(136, 136, 1, 0x0020, 0x10, 18, 3), 1317 + PIN_FIELD_BASE(137, 137, 1, 0x0020, 0x10, 18, 3), 1318 + PIN_FIELD_BASE(138, 138, 1, 0x0020, 0x10, 18, 3), 1319 + PIN_FIELD_BASE(139, 139, 1, 0x0020, 0x10, 18, 3), 1320 + PIN_FIELD_BASE(140, 140, 1, 0x0020, 0x10, 21, 3), 1321 + PIN_FIELD_BASE(141, 141, 1, 0x0020, 0x10, 21, 3), 1322 + PIN_FIELD_BASE(142, 142, 1, 0x0020, 0x10, 21, 3), 1323 + PIN_FIELD_BASE(143, 143, 1, 0x0000, 0x10, 3, 3), 1324 + PIN_FIELD_BASE(144, 144, 1, 0x0000, 0x10, 6, 3), 1325 + PIN_FIELD_BASE(145, 145, 1, 0x0000, 0x10, 9, 3), 1326 + PIN_FIELD_BASE(146, 146, 1, 0x0000, 0x10, 12, 3), 1327 + PIN_FIELD_BASE(147, 147, 1, 0x0020, 0x10, 21, 3), 1328 + PIN_FIELD_BASE(148, 148, 1, 0x0020, 0x10, 24, 3), 1329 + PIN_FIELD_BASE(149, 149, 1, 0x0020, 0x10, 24, 3), 1330 + PIN_FIELD_BASE(150, 150, 1, 0x0020, 0x10, 24, 3), 1331 + PIN_FIELD_BASE(151, 151, 2, 0x0010, 0x10, 15, 3), 1332 + PIN_FIELD_BASE(152, 152, 2, 0x0010, 0x10, 12, 3), 1333 + PIN_FIELD_BASE(153, 153, 2, 0x0010, 0x10, 9, 3), 1334 + PIN_FIELD_BASE(154, 154, 2, 0x0010, 0x10, 6, 3), 1335 + PIN_FIELD_BASE(155, 155, 2, 0x0010, 0x10, 21, 3), 1336 + PIN_FIELD_BASE(156, 156, 2, 0x0000, 0x10, 21, 3), 1337 + PIN_FIELD_BASE(157, 157, 2, 0x0000, 0x10, 18, 3), 1338 + PIN_FIELD_BASE(158, 158, 2, 0x0010, 0x10, 3, 3), 1339 + PIN_FIELD_BASE(159, 159, 2, 0x0010, 0x10, 0, 3), 1340 + PIN_FIELD_BASE(160, 160, 2, 0x0000, 0x10, 27, 3), 1341 + PIN_FIELD_BASE(161, 161, 2, 0x0000, 0x10, 24, 3), 1342 + PIN_FIELD_BASE(162, 162, 2, 0x0010, 0x10, 18, 3), 1343 + PIN_FIELD_BASE(163, 163, 4, 0x0000, 0x10, 12, 3), 1344 + PIN_FIELD_BASE(164, 164, 4, 0x0000, 0x10, 9, 3), 1345 + PIN_FIELD_BASE(165, 165, 4, 0x0000, 0x10, 15, 3), 1346 + PIN_FIELD_BASE(166, 166, 4, 0x0000, 0x10, 18, 3), 1347 + PIN_FIELD_BASE(167, 167, 4, 0x0000, 0x10, 21, 3), 1348 + PIN_FIELD_BASE(168, 168, 4, 0x0000, 0x10, 24, 3), 1349 + PIN_FIELD_BASE(169, 169, 3, 0x0000, 0x10, 18, 3), 1350 + PIN_FIELD_BASE(170, 170, 3, 0x0000, 0x10, 15, 3), 1351 + PIN_FIELD_BASE(171, 171, 3, 0x0000, 0x10, 21, 3), 1352 + PIN_FIELD_BASE(172, 172, 3, 0x0000, 0x10, 24, 3), 1353 + PIN_FIELD_BASE(173, 173, 3, 0x0000, 0x10, 27, 3), 1354 + PIN_FIELD_BASE(174, 174, 3, 0x0010, 0x10, 0, 3), 1355 + PIN_FIELD_BASE(175, 175, 2, 0x0030, 0x10, 3, 3), 1356 + PIN_FIELD_BASE(176, 176, 2, 0x0030, 0x10, 3, 3), 1357 + }; 1358 + 1359 + static const struct mtk_pin_field_calc mt8188_pin_drv_adv_range[] = { 1360 + PIN_FIELD_BASE(53, 53, 3, 0x0020, 0x10, 0, 3), 1361 + PIN_FIELD_BASE(54, 54, 3, 0x0020, 0x10, 3, 3), 1362 + PIN_FIELD_BASE(55, 55, 1, 0x0060, 0x10, 0, 3), 1363 + PIN_FIELD_BASE(56, 56, 1, 0x0060, 0x10, 9, 3), 1364 + PIN_FIELD_BASE(57, 57, 2, 0x0050, 0x10, 0, 3), 1365 + PIN_FIELD_BASE(58, 58, 2, 0x0050, 0x10, 6, 3), 1366 + PIN_FIELD_BASE(59, 59, 1, 0x0060, 0x10, 3, 3), 1367 + PIN_FIELD_BASE(60, 60, 1, 0x0060, 0x10, 12, 3), 1368 + PIN_FIELD_BASE(61, 61, 1, 0x0060, 0x10, 6, 3), 1369 + PIN_FIELD_BASE(62, 62, 1, 0x0060, 0x10, 15, 3), 1370 + PIN_FIELD_BASE(63, 63, 2, 0x0050, 0x10, 3, 3), 1371 + PIN_FIELD_BASE(64, 64, 2, 0x0050, 0x10, 9, 3), 1372 + PIN_FIELD_BASE(65, 65, 4, 0x0030, 0x10, 0, 3), 1373 + PIN_FIELD_BASE(66, 66, 4, 0x0030, 0x10, 6, 3), 1374 + PIN_FIELD_BASE(67, 67, 4, 0x0030, 0x10, 3, 3), 1375 + PIN_FIELD_BASE(68, 68, 4, 0x0030, 0x10, 9, 3), 1376 + PIN_FIELD_BASE(175, 175, 2, 0x0050, 0x10, 12, 3), 1377 + PIN_FIELD_BASE(176, 176, 2, 0x0050, 0x10, 15, 3), 1378 + }; 1379 + 1380 + static const struct mtk_pin_field_calc mt8188_pin_rsel_range[] = { 1381 + PIN_FIELD_BASE(53, 53, 3, 0x00c0, 0x10, 0, 3), 1382 + PIN_FIELD_BASE(54, 54, 3, 0x00c0, 0x10, 3, 3), 1383 + PIN_FIELD_BASE(55, 55, 1, 0x0160, 0x10, 0, 3), 1384 + PIN_FIELD_BASE(56, 56, 1, 0x0160, 0x10, 9, 3), 1385 + PIN_FIELD_BASE(57, 57, 2, 0x0150, 0x10, 0, 3), 1386 + PIN_FIELD_BASE(58, 58, 2, 0x0150, 0x10, 6, 3), 1387 + PIN_FIELD_BASE(59, 59, 1, 0x0160, 0x10, 3, 3), 1388 + PIN_FIELD_BASE(60, 60, 1, 0x0160, 0x10, 12, 3), 1389 + PIN_FIELD_BASE(61, 61, 1, 0x0160, 0x10, 6, 3), 1390 + PIN_FIELD_BASE(62, 62, 1, 0x0160, 0x10, 15, 3), 1391 + PIN_FIELD_BASE(63, 63, 2, 0x0150, 0x10, 3, 3), 1392 + PIN_FIELD_BASE(64, 64, 2, 0x0150, 0x10, 9, 3), 1393 + PIN_FIELD_BASE(65, 65, 4, 0x00d0, 0x10, 0, 3), 1394 + PIN_FIELD_BASE(66, 66, 4, 0x00d0, 0x10, 6, 3), 1395 + PIN_FIELD_BASE(67, 67, 4, 0x00d0, 0x10, 3, 3), 1396 + PIN_FIELD_BASE(68, 68, 4, 0x00d0, 0x10, 9, 3), 1397 + PIN_FIELD_BASE(175, 175, 2, 0x0150, 0x10, 12, 3), 1398 + PIN_FIELD_BASE(176, 176, 2, 0x0150, 0x10, 15, 3), 1399 + }; 1400 + 1401 + static const struct mtk_pin_rsel mt8188_pin_rsel_val_range[] = { 1402 + PIN_RSEL(53, 68, 0x0, 75000, 75000), 1403 + PIN_RSEL(53, 68, 0x1, 10000, 5000), 1404 + PIN_RSEL(53, 68, 0x2, 5000, 75000), 1405 + PIN_RSEL(53, 68, 0x3, 4000, 5000), 1406 + PIN_RSEL(53, 68, 0x4, 3000, 75000), 1407 + PIN_RSEL(53, 68, 0x5, 2000, 5000), 1408 + PIN_RSEL(53, 68, 0x6, 1500, 75000), 1409 + PIN_RSEL(53, 68, 0x7, 1000, 5000), 1410 + PIN_RSEL(175, 176, 0x0, 75000, 75000), 1411 + PIN_RSEL(175, 176, 0x1, 10000, 5000), 1412 + PIN_RSEL(175, 176, 0x2, 5000, 75000), 1413 + PIN_RSEL(175, 176, 0x3, 4000, 5000), 1414 + PIN_RSEL(175, 176, 0x4, 3000, 75000), 1415 + PIN_RSEL(175, 176, 0x5, 2000, 5000), 1416 + PIN_RSEL(175, 176, 0x6, 1500, 75000), 1417 + PIN_RSEL(175, 176, 0x7, 1000, 5000), 1418 + }; 1419 + 1420 + static const unsigned int mt8188_pull_type[] = { 1421 + MTK_PULL_PU_PD_TYPE, /*0*/ 1422 + MTK_PULL_PU_PD_TYPE, /*1*/ 1423 + MTK_PULL_PU_PD_TYPE, /*2*/ 1424 + MTK_PULL_PU_PD_TYPE, /*3*/ 1425 + MTK_PULL_PU_PD_TYPE, /*4*/ 1426 + MTK_PULL_PU_PD_TYPE, /*5*/ 1427 + MTK_PULL_PU_PD_TYPE, /*6*/ 1428 + MTK_PULL_PU_PD_TYPE, /*7*/ 1429 + MTK_PULL_PU_PD_TYPE, /*8*/ 1430 + MTK_PULL_PU_PD_TYPE, /*9*/ 1431 + MTK_PULL_PU_PD_TYPE, /*10*/ 1432 + MTK_PULL_PU_PD_TYPE, /*11*/ 1433 + MTK_PULL_PU_PD_TYPE, /*12*/ 1434 + MTK_PULL_PU_PD_TYPE, /*13*/ 1435 + MTK_PULL_PU_PD_TYPE, /*14*/ 1436 + MTK_PULL_PU_PD_TYPE, /*15*/ 1437 + MTK_PULL_PU_PD_TYPE, /*16*/ 1438 + MTK_PULL_PU_PD_TYPE, /*17*/ 1439 + MTK_PULL_PU_PD_TYPE, /*18*/ 1440 + MTK_PULL_PU_PD_TYPE, /*19*/ 1441 + MTK_PULL_PU_PD_TYPE, /*20*/ 1442 + MTK_PULL_PU_PD_TYPE, /*21*/ 1443 + MTK_PULL_PU_PD_TYPE, /*22*/ 1444 + MTK_PULL_PU_PD_TYPE, /*23*/ 1445 + MTK_PULL_PU_PD_TYPE, /*24*/ 1446 + MTK_PULL_PU_PD_TYPE, /*25*/ 1447 + MTK_PULL_PU_PD_TYPE, /*26*/ 1448 + MTK_PULL_PU_PD_TYPE, /*27*/ 1449 + MTK_PULL_PU_PD_TYPE, /*28*/ 1450 + MTK_PULL_PU_PD_TYPE, /*29*/ 1451 + MTK_PULL_PU_PD_TYPE, /*30*/ 1452 + MTK_PULL_PU_PD_TYPE, /*31*/ 1453 + MTK_PULL_PU_PD_TYPE, /*32*/ 1454 + MTK_PULL_PU_PD_TYPE, /*33*/ 1455 + MTK_PULL_PU_PD_TYPE, /*34*/ 1456 + MTK_PULL_PU_PD_TYPE, /*35*/ 1457 + MTK_PULL_PU_PD_TYPE, /*36*/ 1458 + MTK_PULL_PU_PD_TYPE, /*37*/ 1459 + MTK_PULL_PU_PD_TYPE, /*38*/ 1460 + MTK_PULL_PU_PD_TYPE, /*39*/ 1461 + MTK_PULL_PU_PD_TYPE, /*40*/ 1462 + MTK_PULL_PU_PD_TYPE, /*41*/ 1463 + MTK_PULL_PUPD_R1R0_TYPE, /*42*/ 1464 + MTK_PULL_PUPD_R1R0_TYPE, /*43*/ 1465 + MTK_PULL_PUPD_R1R0_TYPE, /*44*/ 1466 + MTK_PULL_PUPD_R1R0_TYPE, /*45*/ 1467 + MTK_PULL_PU_PD_TYPE, /*46*/ 1468 + MTK_PULL_PU_PD_TYPE, /*47*/ 1469 + MTK_PULL_PU_PD_TYPE, /*48*/ 1470 + MTK_PULL_PU_PD_TYPE, /*49*/ 1471 + MTK_PULL_PU_PD_TYPE, /*50*/ 1472 + MTK_PULL_PU_PD_TYPE, /*51*/ 1473 + MTK_PULL_PU_PD_TYPE, /*52*/ 1474 + MTK_PULL_PU_PD_RSEL_TYPE, /*53*/ 1475 + MTK_PULL_PU_PD_RSEL_TYPE, /*54*/ 1476 + MTK_PULL_PU_PD_RSEL_TYPE, /*55*/ 1477 + MTK_PULL_PU_PD_RSEL_TYPE, /*56*/ 1478 + MTK_PULL_PU_PD_RSEL_TYPE, /*57*/ 1479 + MTK_PULL_PU_PD_RSEL_TYPE, /*58*/ 1480 + MTK_PULL_PU_PD_RSEL_TYPE, /*59*/ 1481 + MTK_PULL_PU_PD_RSEL_TYPE, /*60*/ 1482 + MTK_PULL_PU_PD_RSEL_TYPE, /*61*/ 1483 + MTK_PULL_PU_PD_RSEL_TYPE, /*62*/ 1484 + MTK_PULL_PU_PD_RSEL_TYPE, /*63*/ 1485 + MTK_PULL_PU_PD_RSEL_TYPE, /*64*/ 1486 + MTK_PULL_PU_PD_RSEL_TYPE, /*65*/ 1487 + MTK_PULL_PU_PD_RSEL_TYPE, /*66*/ 1488 + MTK_PULL_PU_PD_RSEL_TYPE, /*67*/ 1489 + MTK_PULL_PU_PD_RSEL_TYPE, /*68*/ 1490 + MTK_PULL_PU_PD_TYPE, /*69*/ 1491 + MTK_PULL_PU_PD_TYPE, /*70*/ 1492 + MTK_PULL_PU_PD_TYPE, /*71*/ 1493 + MTK_PULL_PU_PD_TYPE, /*72*/ 1494 + MTK_PULL_PU_PD_TYPE, /*73*/ 1495 + MTK_PULL_PU_PD_TYPE, /*74*/ 1496 + MTK_PULL_PU_PD_TYPE, /*75*/ 1497 + MTK_PULL_PU_PD_TYPE, /*76*/ 1498 + MTK_PULL_PU_PD_TYPE, /*77*/ 1499 + MTK_PULL_PU_PD_TYPE, /*78*/ 1500 + MTK_PULL_PU_PD_TYPE, /*79*/ 1501 + MTK_PULL_PU_PD_TYPE, /*80*/ 1502 + MTK_PULL_PU_PD_TYPE, /*81*/ 1503 + MTK_PULL_PU_PD_TYPE, /*82*/ 1504 + MTK_PULL_PU_PD_TYPE, /*83*/ 1505 + MTK_PULL_PU_PD_TYPE, /*84*/ 1506 + MTK_PULL_PU_PD_TYPE, /*85*/ 1507 + MTK_PULL_PU_PD_TYPE, /*86*/ 1508 + MTK_PULL_PU_PD_TYPE, /*87*/ 1509 + MTK_PULL_PU_PD_TYPE, /*88*/ 1510 + MTK_PULL_PU_PD_TYPE, /*89*/ 1511 + MTK_PULL_PU_PD_TYPE, /*90*/ 1512 + MTK_PULL_PU_PD_TYPE, /*91*/ 1513 + MTK_PULL_PU_PD_TYPE, /*92*/ 1514 + MTK_PULL_PU_PD_TYPE, /*93*/ 1515 + MTK_PULL_PU_PD_TYPE, /*94*/ 1516 + MTK_PULL_PU_PD_TYPE, /*95*/ 1517 + MTK_PULL_PU_PD_TYPE, /*96*/ 1518 + MTK_PULL_PU_PD_TYPE, /*97*/ 1519 + MTK_PULL_PU_PD_TYPE, /*98*/ 1520 + MTK_PULL_PU_PD_TYPE, /*99*/ 1521 + MTK_PULL_PU_PD_TYPE, /*100*/ 1522 + MTK_PULL_PU_PD_TYPE, /*101*/ 1523 + MTK_PULL_PU_PD_TYPE, /*102*/ 1524 + MTK_PULL_PU_PD_TYPE, /*103*/ 1525 + MTK_PULL_PU_PD_TYPE, /*104*/ 1526 + MTK_PULL_PU_PD_TYPE, /*105*/ 1527 + MTK_PULL_PU_PD_TYPE, /*106*/ 1528 + MTK_PULL_PU_PD_TYPE, /*107*/ 1529 + MTK_PULL_PU_PD_TYPE, /*108*/ 1530 + MTK_PULL_PU_PD_TYPE, /*109*/ 1531 + MTK_PULL_PU_PD_TYPE, /*110*/ 1532 + MTK_PULL_PU_PD_TYPE, /*111*/ 1533 + MTK_PULL_PU_PD_TYPE, /*112*/ 1534 + MTK_PULL_PU_PD_TYPE, /*113*/ 1535 + MTK_PULL_PU_PD_TYPE, /*114*/ 1536 + MTK_PULL_PU_PD_TYPE, /*115*/ 1537 + MTK_PULL_PU_PD_TYPE, /*116*/ 1538 + MTK_PULL_PU_PD_TYPE, /*117*/ 1539 + MTK_PULL_PU_PD_TYPE, /*118*/ 1540 + MTK_PULL_PU_PD_TYPE, /*119*/ 1541 + MTK_PULL_PU_PD_TYPE, /*120*/ 1542 + MTK_PULL_PU_PD_TYPE, /*121*/ 1543 + MTK_PULL_PU_PD_TYPE, /*122*/ 1544 + MTK_PULL_PU_PD_TYPE, /*123*/ 1545 + MTK_PULL_PU_PD_TYPE, /*124*/ 1546 + MTK_PULL_PU_PD_TYPE, /*125*/ 1547 + MTK_PULL_PU_PD_TYPE, /*126*/ 1548 + MTK_PULL_PU_PD_TYPE, /*127*/ 1549 + MTK_PULL_PU_PD_TYPE, /*128*/ 1550 + MTK_PULL_PU_PD_TYPE, /*129*/ 1551 + MTK_PULL_PU_PD_TYPE, /*130*/ 1552 + MTK_PULL_PUPD_R1R0_TYPE, /*131*/ 1553 + MTK_PULL_PUPD_R1R0_TYPE, /*132*/ 1554 + MTK_PULL_PUPD_R1R0_TYPE, /*133*/ 1555 + MTK_PULL_PUPD_R1R0_TYPE, /*134*/ 1556 + MTK_PULL_PUPD_R1R0_TYPE, /*135*/ 1557 + MTK_PULL_PUPD_R1R0_TYPE, /*136*/ 1558 + MTK_PULL_PUPD_R1R0_TYPE, /*137*/ 1559 + MTK_PULL_PUPD_R1R0_TYPE, /*138*/ 1560 + MTK_PULL_PUPD_R1R0_TYPE, /*139*/ 1561 + MTK_PULL_PUPD_R1R0_TYPE, /*140*/ 1562 + MTK_PULL_PUPD_R1R0_TYPE, /*141*/ 1563 + MTK_PULL_PUPD_R1R0_TYPE, /*142*/ 1564 + MTK_PULL_PUPD_R1R0_TYPE, /*143*/ 1565 + MTK_PULL_PUPD_R1R0_TYPE, /*144*/ 1566 + MTK_PULL_PUPD_R1R0_TYPE, /*145*/ 1567 + MTK_PULL_PUPD_R1R0_TYPE, /*146*/ 1568 + MTK_PULL_PUPD_R1R0_TYPE, /*147*/ 1569 + MTK_PULL_PUPD_R1R0_TYPE, /*148*/ 1570 + MTK_PULL_PUPD_R1R0_TYPE, /*149*/ 1571 + MTK_PULL_PUPD_R1R0_TYPE, /*150*/ 1572 + MTK_PULL_PUPD_R1R0_TYPE, /*151*/ 1573 + MTK_PULL_PUPD_R1R0_TYPE, /*152*/ 1574 + MTK_PULL_PUPD_R1R0_TYPE, /*153*/ 1575 + MTK_PULL_PUPD_R1R0_TYPE, /*154*/ 1576 + MTK_PULL_PUPD_R1R0_TYPE, /*155*/ 1577 + MTK_PULL_PUPD_R1R0_TYPE, /*156*/ 1578 + MTK_PULL_PUPD_R1R0_TYPE, /*157*/ 1579 + MTK_PULL_PUPD_R1R0_TYPE, /*158*/ 1580 + MTK_PULL_PUPD_R1R0_TYPE, /*159*/ 1581 + MTK_PULL_PUPD_R1R0_TYPE, /*160*/ 1582 + MTK_PULL_PUPD_R1R0_TYPE, /*161*/ 1583 + MTK_PULL_PUPD_R1R0_TYPE, /*162*/ 1584 + MTK_PULL_PUPD_R1R0_TYPE, /*163*/ 1585 + MTK_PULL_PUPD_R1R0_TYPE, /*164*/ 1586 + MTK_PULL_PUPD_R1R0_TYPE, /*165*/ 1587 + MTK_PULL_PUPD_R1R0_TYPE, /*166*/ 1588 + MTK_PULL_PUPD_R1R0_TYPE, /*167*/ 1589 + MTK_PULL_PUPD_R1R0_TYPE, /*168*/ 1590 + MTK_PULL_PUPD_R1R0_TYPE, /*169*/ 1591 + MTK_PULL_PUPD_R1R0_TYPE, /*170*/ 1592 + MTK_PULL_PUPD_R1R0_TYPE, /*171*/ 1593 + MTK_PULL_PUPD_R1R0_TYPE, /*172*/ 1594 + MTK_PULL_PUPD_R1R0_TYPE, /*173*/ 1595 + MTK_PULL_PUPD_R1R0_TYPE, /*174*/ 1596 + MTK_PULL_PU_PD_RSEL_TYPE, /*175*/ 1597 + MTK_PULL_PU_PD_RSEL_TYPE, /*176*/ 1598 + }; 1599 + 1600 + static const struct mtk_pin_reg_calc mt8188_reg_cals[PINCTRL_PIN_REG_MAX] = { 1601 + [PINCTRL_PIN_REG_MODE] = MTK_RANGE(mt8188_pin_mode_range), 1602 + [PINCTRL_PIN_REG_DIR] = MTK_RANGE(mt8188_pin_dir_range), 1603 + [PINCTRL_PIN_REG_DI] = MTK_RANGE(mt8188_pin_di_range), 1604 + [PINCTRL_PIN_REG_DO] = MTK_RANGE(mt8188_pin_do_range), 1605 + [PINCTRL_PIN_REG_SMT] = MTK_RANGE(mt8188_pin_smt_range), 1606 + [PINCTRL_PIN_REG_IES] = MTK_RANGE(mt8188_pin_ies_range), 1607 + [PINCTRL_PIN_REG_TDSEL] = MTK_RANGE(mt8188_pin_tdsel_range), 1608 + [PINCTRL_PIN_REG_RDSEL] = MTK_RANGE(mt8188_pin_rdsel_range), 1609 + [PINCTRL_PIN_REG_PUPD] = MTK_RANGE(mt8188_pin_pupd_range), 1610 + [PINCTRL_PIN_REG_R0] = MTK_RANGE(mt8188_pin_r0_range), 1611 + [PINCTRL_PIN_REG_R1] = MTK_RANGE(mt8188_pin_r1_range), 1612 + [PINCTRL_PIN_REG_PU] = MTK_RANGE(mt8188_pin_pu_range), 1613 + [PINCTRL_PIN_REG_PD] = MTK_RANGE(mt8188_pin_pd_range), 1614 + [PINCTRL_PIN_REG_DRV] = MTK_RANGE(mt8188_pin_drv_range), 1615 + [PINCTRL_PIN_REG_DRV_ADV] = MTK_RANGE(mt8188_pin_drv_adv_range), 1616 + [PINCTRL_PIN_REG_RSEL] = MTK_RANGE(mt8188_pin_rsel_range), 1617 + }; 1618 + 1619 + static const char * const mt8188_pinctrl_register_base_name[] = { 1620 + "iocfg0", "iocfg_rm", "iocfg_lt", "iocfg_lm", "iocfg_rt", 1621 + }; 1622 + 1623 + static const struct mtk_eint_hw mt8188_eint_hw = { 1624 + .port_mask = 0xf, 1625 + .ports = 7, 1626 + .ap_num = 225, 1627 + .db_cnt = 32, 1628 + }; 1629 + 1630 + static const struct mtk_pin_soc mt8188_data = { 1631 + .reg_cal = mt8188_reg_cals, 1632 + .pins = mtk_pins_mt8188, 1633 + .npins = ARRAY_SIZE(mtk_pins_mt8188), 1634 + .ngrps = ARRAY_SIZE(mtk_pins_mt8188), 1635 + .eint_hw = &mt8188_eint_hw, 1636 + .nfuncs = 8, 1637 + .gpio_m = 0, 1638 + .base_names = mt8188_pinctrl_register_base_name, 1639 + .nbase_names = ARRAY_SIZE(mt8188_pinctrl_register_base_name), 1640 + .pull_type = mt8188_pull_type, 1641 + .pin_rsel = mt8188_pin_rsel_val_range, 1642 + .npin_rsel = ARRAY_SIZE(mt8188_pin_rsel_val_range), 1643 + .bias_set_combo = mtk_pinconf_bias_set_combo, 1644 + .bias_get_combo = mtk_pinconf_bias_get_combo, 1645 + .drive_set = mtk_pinconf_drive_set_rev1, 1646 + .drive_get = mtk_pinconf_drive_get_rev1, 1647 + .adv_drive_set = mtk_pinconf_adv_drive_set_raw, 1648 + .adv_drive_get = mtk_pinconf_adv_drive_get_raw, 1649 + }; 1650 + 1651 + static const struct of_device_id mt8188_pinctrl_of_match[] = { 1652 + { .compatible = "mediatek,mt8188-pinctrl", .data = &mt8188_data }, 1653 + { } 1654 + }; 1655 + 1656 + static struct platform_driver mt8188_pinctrl_driver = { 1657 + .driver = { 1658 + .name = "mt8188-pinctrl", 1659 + .of_match_table = mt8188_pinctrl_of_match, 1660 + .pm = &mtk_paris_pinctrl_pm_ops 1661 + }, 1662 + .probe = mtk_paris_pinctrl_probe, 1663 + }; 1664 + 1665 + static int __init mt8188_pinctrl_init(void) 1666 + { 1667 + return platform_driver_register(&mt8188_pinctrl_driver); 1668 + } 1669 + 1670 + arch_initcall(mt8188_pinctrl_init); 1671 + 1672 + MODULE_LICENSE("GPL"); 1673 + MODULE_DESCRIPTION("MediaTek MT8188 Pinctrl Driver");
+2259
drivers/pinctrl/mediatek/pinctrl-mtk-mt8188.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 */ 2 + /* 3 + * Copyright (C) 2022 MediaTek Inc. 4 + * Author: Hui Liu <hui.liu@mediatek.com> 5 + * 6 + */ 7 + 8 + #ifndef __PINCTRL_MTK_MT8188_H 9 + #define __PINCTRL_MTK_MT8188_H 10 + 11 + #include "pinctrl-paris.h" 12 + 13 + static const struct mtk_pin_desc mtk_pins_mt8188[] = { 14 + MTK_PIN( 15 + 0, "GPIO0", 16 + MTK_EINT_FUNCTION(0, 0), 17 + DRV_GRP4, 18 + MTK_FUNCTION(0, "B_GPIO0"), 19 + MTK_FUNCTION(1, "B0_TP_GPIO0_AO"), 20 + MTK_FUNCTION(2, "O_SPIM5_CSB"), 21 + MTK_FUNCTION(3, "O_UTXD1"), 22 + MTK_FUNCTION(4, "O_DMIC3_CLK"), 23 + MTK_FUNCTION(5, "B0_I2SIN_MCK"), 24 + MTK_FUNCTION(6, "O_I2SO2_MCK"), 25 + MTK_FUNCTION(7, "B0_DBG_MON_A0") 26 + ), 27 + 28 + MTK_PIN( 29 + 1, "GPIO1", 30 + MTK_EINT_FUNCTION(0, 1), 31 + DRV_GRP4, 32 + MTK_FUNCTION(0, "B_GPIO1"), 33 + MTK_FUNCTION(1, "B0_TP_GPIO1_AO"), 34 + MTK_FUNCTION(2, "O_SPIM5_CLK"), 35 + MTK_FUNCTION(3, "I1_URXD1"), 36 + MTK_FUNCTION(4, "I0_DMIC3_DAT"), 37 + MTK_FUNCTION(5, "B0_I2SIN_BCK"), 38 + MTK_FUNCTION(6, "B0_I2SO2_BCK"), 39 + MTK_FUNCTION(7, "B0_DBG_MON_A1") 40 + ), 41 + 42 + MTK_PIN( 43 + 2, "GPIO2", 44 + MTK_EINT_FUNCTION(0, 2), 45 + DRV_GRP4, 46 + MTK_FUNCTION(0, "B_GPIO2"), 47 + MTK_FUNCTION(1, "B0_TP_GPIO2_AO"), 48 + MTK_FUNCTION(2, "B0_SPIM5_MOSI"), 49 + MTK_FUNCTION(3, "O_URTS1"), 50 + MTK_FUNCTION(4, "I0_DMIC3_DAT_R"), 51 + MTK_FUNCTION(5, "B0_I2SIN_WS"), 52 + MTK_FUNCTION(6, "B0_I2SO2_WS"), 53 + MTK_FUNCTION(7, "B0_DBG_MON_A2") 54 + ), 55 + 56 + MTK_PIN( 57 + 3, "GPIO3", 58 + MTK_EINT_FUNCTION(0, 3), 59 + DRV_GRP4, 60 + MTK_FUNCTION(0, "B_GPIO3"), 61 + MTK_FUNCTION(1, "B0_TP_GPIO3_AO"), 62 + MTK_FUNCTION(2, "B0_SPIM5_MISO"), 63 + MTK_FUNCTION(3, "I1_UCTS1"), 64 + MTK_FUNCTION(4, "O_DMIC4_CLK"), 65 + MTK_FUNCTION(5, "I0_I2SIN_D0"), 66 + MTK_FUNCTION(6, "O_I2SO2_D0"), 67 + MTK_FUNCTION(7, "B0_DBG_MON_A3") 68 + ), 69 + 70 + MTK_PIN( 71 + 4, "GPIO4", 72 + MTK_EINT_FUNCTION(0, 4), 73 + DRV_GRP4, 74 + MTK_FUNCTION(0, "B_GPIO4"), 75 + MTK_FUNCTION(1, "B0_TP_GPIO4_AO"), 76 + MTK_FUNCTION(2, "I0_SPDIF_IN2"), 77 + MTK_FUNCTION(3, "O_I2SO1_MCK"), 78 + MTK_FUNCTION(4, "I0_DMIC4_DAT"), 79 + MTK_FUNCTION(5, "I0_I2SIN_D1"), 80 + MTK_FUNCTION(6, "O_I2SO2_D1"), 81 + MTK_FUNCTION(7, "B0_DBG_MON_A4") 82 + ), 83 + 84 + MTK_PIN( 85 + 5, "GPIO5", 86 + MTK_EINT_FUNCTION(0, 5), 87 + DRV_GRP4, 88 + MTK_FUNCTION(0, "B_GPIO5"), 89 + MTK_FUNCTION(1, "B0_TP_GPIO5_AO"), 90 + MTK_FUNCTION(2, "I0_SPDIF_IN1"), 91 + MTK_FUNCTION(3, "O_I2SO1_BCK"), 92 + MTK_FUNCTION(4, "I0_DMIC4_DAT_R"), 93 + MTK_FUNCTION(5, "I0_I2SIN_D2"), 94 + MTK_FUNCTION(6, "O_I2SO2_D2"), 95 + MTK_FUNCTION(7, "B0_DBG_MON_A5") 96 + ), 97 + 98 + MTK_PIN( 99 + 6, "GPIO6", 100 + MTK_EINT_FUNCTION(0, 6), 101 + DRV_GRP4, 102 + MTK_FUNCTION(0, "B_GPIO6"), 103 + MTK_FUNCTION(1, "B0_TP_GPIO6_AO"), 104 + MTK_FUNCTION(2, "I0_SPDIF_IN0"), 105 + MTK_FUNCTION(3, "O_I2SO1_WS"), 106 + MTK_FUNCTION(4, "O_DMIC1_CLK"), 107 + MTK_FUNCTION(5, "I0_I2SIN_D3"), 108 + MTK_FUNCTION(6, "O_I2SO2_D3"), 109 + MTK_FUNCTION(7, "B0_MD32_0_GPIO0") 110 + ), 111 + 112 + MTK_PIN( 113 + 7, "GPIO7", 114 + MTK_EINT_FUNCTION(0, 7), 115 + DRV_GRP4, 116 + MTK_FUNCTION(0, "B_GPIO7"), 117 + MTK_FUNCTION(1, "B0_TP_GPIO7_AO"), 118 + MTK_FUNCTION(2, "O_SPIM3_CSB"), 119 + MTK_FUNCTION(3, "B0_TDMIN_MCK"), 120 + MTK_FUNCTION(4, "I0_DMIC1_DAT"), 121 + MTK_FUNCTION(5, "O_CMVREF0"), 122 + MTK_FUNCTION(6, "O_CLKM0"), 123 + MTK_FUNCTION(7, "B0_DBG_MON_A6") 124 + ), 125 + 126 + MTK_PIN( 127 + 8, "GPIO8", 128 + MTK_EINT_FUNCTION(0, 8), 129 + DRV_GRP4, 130 + MTK_FUNCTION(0, "B_GPIO8"), 131 + MTK_FUNCTION(1, "B0_TP_GPIO0_AO"), 132 + MTK_FUNCTION(2, "O_SPIM3_CLK"), 133 + MTK_FUNCTION(3, "B0_TDMIN_BCK"), 134 + MTK_FUNCTION(4, "I0_DMIC1_DAT_R"), 135 + MTK_FUNCTION(5, "O_CMVREF1"), 136 + MTK_FUNCTION(6, "O_CLKM1"), 137 + MTK_FUNCTION(7, "B0_DBG_MON_A7") 138 + ), 139 + 140 + MTK_PIN( 141 + 9, "GPIO9", 142 + MTK_EINT_FUNCTION(0, 9), 143 + DRV_GRP4, 144 + MTK_FUNCTION(0, "B_GPIO9"), 145 + MTK_FUNCTION(1, "B0_TP_GPIO1_AO"), 146 + MTK_FUNCTION(2, "B0_SPIM3_MOSI"), 147 + MTK_FUNCTION(3, "B0_TDMIN_LRCK"), 148 + MTK_FUNCTION(4, "O_DMIC2_CLK"), 149 + MTK_FUNCTION(5, "O_CMFLASH0"), 150 + MTK_FUNCTION(6, "O_PWM_0"), 151 + MTK_FUNCTION(7, "B0_DBG_MON_A8") 152 + ), 153 + 154 + MTK_PIN( 155 + 10, "GPIO10", 156 + MTK_EINT_FUNCTION(0, 10), 157 + DRV_GRP4, 158 + MTK_FUNCTION(0, "B_GPIO10"), 159 + MTK_FUNCTION(1, "B0_TP_GPIO2_AO"), 160 + MTK_FUNCTION(2, "B0_SPIM3_MISO"), 161 + MTK_FUNCTION(3, "I0_TDMIN_DI"), 162 + MTK_FUNCTION(4, "I0_DMIC2_DAT"), 163 + MTK_FUNCTION(5, "O_CMFLASH1"), 164 + MTK_FUNCTION(6, "O_PWM_1"), 165 + MTK_FUNCTION(7, "B0_DBG_MON_A9") 166 + ), 167 + 168 + MTK_PIN( 169 + 11, "GPIO11", 170 + MTK_EINT_FUNCTION(0, 11), 171 + DRV_GRP4, 172 + MTK_FUNCTION(0, "B_GPIO11"), 173 + MTK_FUNCTION(1, "B0_TP_GPIO3_AO"), 174 + MTK_FUNCTION(2, "O_SPDIF_OUT"), 175 + MTK_FUNCTION(3, "O_I2SO1_D0"), 176 + MTK_FUNCTION(4, "I0_DMIC2_DAT_R"), 177 + MTK_FUNCTION(5, "I0_DVFSRC_EXT_REQ"), 178 + MTK_FUNCTION(6, "O_CMVREF6"), 179 + MTK_FUNCTION(7, "B0_DBG_MON_A10") 180 + ), 181 + 182 + MTK_PIN( 183 + 12, "GPIO12", 184 + MTK_EINT_FUNCTION(0, 12), 185 + DRV_GRP4, 186 + MTK_FUNCTION(0, "B_GPIO12"), 187 + MTK_FUNCTION(1, "B0_TP_GPIO4_AO"), 188 + MTK_FUNCTION(2, "O_SPIM4_CSB"), 189 + MTK_FUNCTION(3, "B1_JTMS_SEL3"), 190 + MTK_FUNCTION(4, "B1_APU_JTAG_TMS"), 191 + MTK_FUNCTION(5, "I0_VPU_UDI_TMS"), 192 + MTK_FUNCTION(6, "I0_IPU_JTAG_TMS"), 193 + MTK_FUNCTION(7, "I0_HDMITX20_HTPLG") 194 + ), 195 + 196 + MTK_PIN( 197 + 13, "GPIO13", 198 + MTK_EINT_FUNCTION(0, 13), 199 + DRV_GRP4, 200 + MTK_FUNCTION(0, "B_GPIO13"), 201 + MTK_FUNCTION(1, "B0_TP_GPIO5_AO"), 202 + MTK_FUNCTION(2, "O_SPIM4_CLK"), 203 + MTK_FUNCTION(3, "I0_JTCK_SEL3"), 204 + MTK_FUNCTION(4, "I0_APU_JTAG_TCK"), 205 + MTK_FUNCTION(5, "I0_VPU_UDI_TCK"), 206 + MTK_FUNCTION(6, "I0_IPU_JTAG_TCK"), 207 + MTK_FUNCTION(7, "B1_HDMITX20_CEC") 208 + ), 209 + 210 + MTK_PIN( 211 + 14, "GPIO14", 212 + MTK_EINT_FUNCTION(0, 14), 213 + DRV_GRP4, 214 + MTK_FUNCTION(0, "B_GPIO14"), 215 + MTK_FUNCTION(1, "B0_TP_GPIO6_AO"), 216 + MTK_FUNCTION(2, "B0_SPIM4_MOSI"), 217 + MTK_FUNCTION(3, "I1_JTDI_SEL3"), 218 + MTK_FUNCTION(4, "I1_APU_JTAG_TDI"), 219 + MTK_FUNCTION(5, "I0_VPU_UDI_TDI"), 220 + MTK_FUNCTION(6, "I0_IPU_JTAG_TDI"), 221 + MTK_FUNCTION(7, "B1_HDMITX20_SCL") 222 + ), 223 + 224 + MTK_PIN( 225 + 15, "GPIO15", 226 + MTK_EINT_FUNCTION(0, 15), 227 + DRV_GRP4, 228 + MTK_FUNCTION(0, "B_GPIO15"), 229 + MTK_FUNCTION(1, "B0_TP_GPIO7_AO"), 230 + MTK_FUNCTION(2, "B0_SPIM4_MISO"), 231 + MTK_FUNCTION(3, "O_JTDO_SEL3"), 232 + MTK_FUNCTION(4, "O_APU_JTAG_TDO"), 233 + MTK_FUNCTION(5, "O_VPU_UDI_TDO"), 234 + MTK_FUNCTION(6, "O_IPU_JTAG_TDO"), 235 + MTK_FUNCTION(7, "B1_HDMITX20_SDA") 236 + ), 237 + 238 + MTK_PIN( 239 + 16, "GPIO16", 240 + MTK_EINT_FUNCTION(0, 16), 241 + DRV_GRP4, 242 + MTK_FUNCTION(0, "B_GPIO16"), 243 + MTK_FUNCTION(1, "B0_TP_GPIO0_AO"), 244 + MTK_FUNCTION(2, "O_UTXD3"), 245 + MTK_FUNCTION(3, "I1_JTRSTn_SEL3"), 246 + MTK_FUNCTION(4, "I0_APU_JTAG_TRST"), 247 + MTK_FUNCTION(5, "I0_VPU_UDI_NTRST"), 248 + MTK_FUNCTION(6, "I0_IPU_JTAG_TRST"), 249 + MTK_FUNCTION(7, "O_HDMITX20_PWR5V") 250 + ), 251 + 252 + MTK_PIN( 253 + 17, "GPIO17", 254 + MTK_EINT_FUNCTION(0, 17), 255 + DRV_GRP4, 256 + MTK_FUNCTION(0, "B_GPIO17"), 257 + MTK_FUNCTION(1, "B0_TP_GPIO1_AO"), 258 + MTK_FUNCTION(2, "I1_URXD3"), 259 + MTK_FUNCTION(3, "O_CMFLASH2"), 260 + MTK_FUNCTION(4, "I0_EDP_TX_HPD"), 261 + MTK_FUNCTION(5, "I0_DVFSRC_EXT_REQ"), 262 + MTK_FUNCTION(6, "O_CMVREF7"), 263 + MTK_FUNCTION(7, "B0_MD32_0_GPIO1") 264 + ), 265 + 266 + MTK_PIN( 267 + 18, "GPIO18", 268 + MTK_EINT_FUNCTION(0, 18), 269 + DRV_GRP4, 270 + MTK_FUNCTION(0, "B_GPIO18"), 271 + MTK_FUNCTION(1, "B0_TP_GPIO2_AO"), 272 + MTK_FUNCTION(2, "O_CMFLASH0"), 273 + MTK_FUNCTION(3, "O_CMVREF4"), 274 + MTK_FUNCTION(4, "B0_TDMIN_MCK"), 275 + MTK_FUNCTION(5, "O_UTXD1"), 276 + MTK_FUNCTION(6, "O_TP_UTXD1_AO"), 277 + MTK_FUNCTION(7, "B0_DBG_MON_A11") 278 + ), 279 + 280 + MTK_PIN( 281 + 19, "GPIO19", 282 + MTK_EINT_FUNCTION(0, 19), 283 + DRV_GRP4, 284 + MTK_FUNCTION(0, "B_GPIO19"), 285 + MTK_FUNCTION(1, "B0_TP_GPIO3_AO"), 286 + MTK_FUNCTION(2, "O_CMFLASH1"), 287 + MTK_FUNCTION(3, "O_CMVREF5"), 288 + MTK_FUNCTION(4, "B0_TDMIN_BCK"), 289 + MTK_FUNCTION(5, "I1_URXD1"), 290 + MTK_FUNCTION(6, "I1_TP_URXD1_AO"), 291 + MTK_FUNCTION(7, "B0_DBG_MON_A12") 292 + ), 293 + 294 + MTK_PIN( 295 + 20, "GPIO20", 296 + MTK_EINT_FUNCTION(0, 20), 297 + DRV_GRP4, 298 + MTK_FUNCTION(0, "B_GPIO20"), 299 + MTK_FUNCTION(1, "B0_TP_GPIO4_AO"), 300 + MTK_FUNCTION(2, "O_CMFLASH2"), 301 + MTK_FUNCTION(3, "O_CLKM2"), 302 + MTK_FUNCTION(4, "B0_TDMIN_LRCK"), 303 + MTK_FUNCTION(5, "O_URTS1"), 304 + MTK_FUNCTION(6, "O_TP_URTS1_AO"), 305 + MTK_FUNCTION(7, "B0_DBG_MON_A13") 306 + ), 307 + 308 + MTK_PIN( 309 + 21, "GPIO21", 310 + MTK_EINT_FUNCTION(0, 21), 311 + DRV_GRP4, 312 + MTK_FUNCTION(0, "B_GPIO21"), 313 + MTK_FUNCTION(1, "B0_TP_GPIO5_AO"), 314 + MTK_FUNCTION(2, "O_CMFLASH3"), 315 + MTK_FUNCTION(3, "O_CLKM3"), 316 + MTK_FUNCTION(4, "I0_TDMIN_DI"), 317 + MTK_FUNCTION(5, "I1_UCTS1"), 318 + MTK_FUNCTION(6, "I1_TP_UCTS1_AO"), 319 + MTK_FUNCTION(7, "B0_DBG_MON_A14") 320 + ), 321 + 322 + MTK_PIN( 323 + 22, "GPIO22", 324 + MTK_EINT_FUNCTION(0, 22), 325 + DRV_GRP4, 326 + MTK_FUNCTION(0, "B_GPIO22"), 327 + MTK_FUNCTION(1, "O_CMMCLK0"), 328 + MTK_FUNCTION(5, "B0_TP_GPIO6_AO"), 329 + MTK_FUNCTION(7, "B0_DBG_MON_A15") 330 + ), 331 + 332 + MTK_PIN( 333 + 23, "GPIO23", 334 + MTK_EINT_FUNCTION(0, 23), 335 + DRV_GRP4, 336 + MTK_FUNCTION(0, "B_GPIO23"), 337 + MTK_FUNCTION(1, "O_CMMCLK1"), 338 + MTK_FUNCTION(3, "O_PWM_2"), 339 + MTK_FUNCTION(4, "B1_PCIE_PHY_I2C_SCL"), 340 + MTK_FUNCTION(5, "B0_TP_GPIO7_AO"), 341 + MTK_FUNCTION(6, "I0_DP_TX_HPD"), 342 + MTK_FUNCTION(7, "B0_DBG_MON_A16") 343 + ), 344 + 345 + MTK_PIN( 346 + 24, "GPIO24", 347 + MTK_EINT_FUNCTION(0, 24), 348 + DRV_GRP4, 349 + MTK_FUNCTION(0, "B_GPIO24"), 350 + MTK_FUNCTION(1, "O_CMMCLK2"), 351 + MTK_FUNCTION(3, "O_PWM_3"), 352 + MTK_FUNCTION(4, "B1_PCIE_PHY_I2C_SDA"), 353 + MTK_FUNCTION(5, "I0_DVFSRC_EXT_REQ"), 354 + MTK_FUNCTION(6, "I0_EDP_TX_HPD"), 355 + MTK_FUNCTION(7, "B0_MD32_0_GPIO2") 356 + ), 357 + 358 + MTK_PIN( 359 + 25, "GPIO25", 360 + MTK_EINT_FUNCTION(0, 25), 361 + DRV_GRP4, 362 + MTK_FUNCTION(0, "B_GPIO25"), 363 + MTK_FUNCTION(1, "O_LCM_RST"), 364 + MTK_FUNCTION(2, "O_LCM1_RST"), 365 + MTK_FUNCTION(3, "I0_DP_TX_HPD") 366 + ), 367 + 368 + MTK_PIN( 369 + 26, "GPIO26", 370 + MTK_EINT_FUNCTION(0, 26), 371 + DRV_GRP4, 372 + MTK_FUNCTION(0, "B_GPIO26"), 373 + MTK_FUNCTION(1, "I0_DSI_TE"), 374 + MTK_FUNCTION(2, "I0_DSI1_TE"), 375 + MTK_FUNCTION(3, "I0_EDP_TX_HPD") 376 + ), 377 + 378 + MTK_PIN( 379 + 27, "GPIO27", 380 + MTK_EINT_FUNCTION(0, 27), 381 + DRV_GRP4, 382 + MTK_FUNCTION(0, "B_GPIO27"), 383 + MTK_FUNCTION(1, "O_LCM1_RST"), 384 + MTK_FUNCTION(2, "O_LCM_RST"), 385 + MTK_FUNCTION(3, "I0_DP_TX_HPD"), 386 + MTK_FUNCTION(4, "O_CMVREF2"), 387 + MTK_FUNCTION(5, "O_mbistwriteen_trigger"), 388 + MTK_FUNCTION(6, "O_PWM_2"), 389 + MTK_FUNCTION(7, "B0_DBG_MON_A17") 390 + ), 391 + 392 + MTK_PIN( 393 + 28, "GPIO28", 394 + MTK_EINT_FUNCTION(0, 28), 395 + DRV_GRP4, 396 + MTK_FUNCTION(0, "B_GPIO28"), 397 + MTK_FUNCTION(1, "I0_DSI1_TE"), 398 + MTK_FUNCTION(2, "I0_DSI_TE"), 399 + MTK_FUNCTION(3, "I0_EDP_TX_HPD"), 400 + MTK_FUNCTION(4, "O_CMVREF3"), 401 + MTK_FUNCTION(5, "O_mbistreaden_trigger"), 402 + MTK_FUNCTION(6, "O_PWM_3"), 403 + MTK_FUNCTION(7, "B0_DBG_MON_A18") 404 + ), 405 + 406 + MTK_PIN( 407 + 29, "GPIO29", 408 + MTK_EINT_FUNCTION(0, 29), 409 + DRV_GRP4, 410 + MTK_FUNCTION(0, "B_GPIO29"), 411 + MTK_FUNCTION(1, "O_DISP_PWM0"), 412 + MTK_FUNCTION(2, "O_DISP_PWM1") 413 + ), 414 + 415 + MTK_PIN( 416 + 30, "GPIO30", 417 + MTK_EINT_FUNCTION(0, 30), 418 + DRV_GRP4, 419 + MTK_FUNCTION(0, "B_GPIO30"), 420 + MTK_FUNCTION(1, "O_DISP_PWM1"), 421 + MTK_FUNCTION(2, "O_DISP_PWM0"), 422 + MTK_FUNCTION(3, "O_CMFLASH3"), 423 + MTK_FUNCTION(4, "O_PWM_1"), 424 + MTK_FUNCTION(7, "B0_DBG_MON_A19") 425 + ), 426 + 427 + MTK_PIN( 428 + 31, "GPIO31", 429 + MTK_EINT_FUNCTION(0, 31), 430 + DRV_GRP4, 431 + MTK_FUNCTION(0, "B_GPIO31"), 432 + MTK_FUNCTION(1, "O_UTXD0"), 433 + MTK_FUNCTION(2, "O_TP_UTXD1_AO"), 434 + MTK_FUNCTION(3, "O_ADSP_UTXD0"), 435 + MTK_FUNCTION(4, "O_TP_UTXD2_AO"), 436 + MTK_FUNCTION(5, "O_MD32_0_TXD"), 437 + MTK_FUNCTION(6, "O_MD32_1_TXD"), 438 + MTK_FUNCTION(7, "O_SSPM_UTXD_AO") 439 + ), 440 + 441 + MTK_PIN( 442 + 32, "GPIO32", 443 + MTK_EINT_FUNCTION(0, 32), 444 + DRV_GRP4, 445 + MTK_FUNCTION(0, "B_GPIO32"), 446 + MTK_FUNCTION(1, "I1_URXD0"), 447 + MTK_FUNCTION(2, "I1_TP_URXD1_AO"), 448 + MTK_FUNCTION(3, "I1_ADSP_URXD0"), 449 + MTK_FUNCTION(4, "I1_TP_URXD2_AO"), 450 + MTK_FUNCTION(5, "I1_MD32_0_RXD"), 451 + MTK_FUNCTION(6, "I1_MD32_1_RXD"), 452 + MTK_FUNCTION(7, "I1_SSPM_URXD_AO") 453 + ), 454 + 455 + MTK_PIN( 456 + 33, "GPIO33", 457 + MTK_EINT_FUNCTION(0, 33), 458 + DRV_GRP4, 459 + MTK_FUNCTION(0, "B_GPIO33"), 460 + MTK_FUNCTION(1, "O_UTXD1"), 461 + MTK_FUNCTION(2, "O_URTS2"), 462 + MTK_FUNCTION(3, "O_ADSP_UTXD0"), 463 + MTK_FUNCTION(4, "O_TP_UTXD1_AO"), 464 + MTK_FUNCTION(5, "O_mbistwriteen_trigger"), 465 + MTK_FUNCTION(6, "O_MD32_0_TXD"), 466 + MTK_FUNCTION(7, "O_SSPM_UTXD_AO") 467 + ), 468 + 469 + MTK_PIN( 470 + 34, "GPIO34", 471 + MTK_EINT_FUNCTION(0, 34), 472 + DRV_GRP4, 473 + MTK_FUNCTION(0, "B_GPIO34"), 474 + MTK_FUNCTION(1, "I1_URXD1"), 475 + MTK_FUNCTION(2, "I1_UCTS2"), 476 + MTK_FUNCTION(3, "I1_ADSP_URXD0"), 477 + MTK_FUNCTION(4, "I1_TP_URXD1_AO"), 478 + MTK_FUNCTION(5, "O_mbistreaden_trigger"), 479 + MTK_FUNCTION(6, "I1_MD32_0_RXD"), 480 + MTK_FUNCTION(7, "I1_SSPM_URXD_AO") 481 + ), 482 + 483 + MTK_PIN( 484 + 35, "GPIO35", 485 + MTK_EINT_FUNCTION(0, 35), 486 + DRV_GRP4, 487 + MTK_FUNCTION(0, "B_GPIO35"), 488 + MTK_FUNCTION(1, "O_UTXD2"), 489 + MTK_FUNCTION(2, "O_URTS1"), 490 + MTK_FUNCTION(3, "O_ADSP_UTXD0"), 491 + MTK_FUNCTION(4, "O_TP_URTS1_AO"), 492 + MTK_FUNCTION(5, "O_TP_UTXD2_AO"), 493 + MTK_FUNCTION(6, "O_MD32_1_TXD"), 494 + MTK_FUNCTION(7, "B0_DBG_MON_A20") 495 + ), 496 + 497 + MTK_PIN( 498 + 36, "GPIO36", 499 + MTK_EINT_FUNCTION(0, 36), 500 + DRV_GRP4, 501 + MTK_FUNCTION(0, "B_GPIO36"), 502 + MTK_FUNCTION(1, "I1_URXD2"), 503 + MTK_FUNCTION(2, "I1_UCTS1"), 504 + MTK_FUNCTION(3, "I1_ADSP_URXD0"), 505 + MTK_FUNCTION(4, "I1_TP_UCTS1_AO"), 506 + MTK_FUNCTION(5, "I1_TP_URXD2_AO"), 507 + MTK_FUNCTION(6, "I1_MD32_1_RXD"), 508 + MTK_FUNCTION(7, "B0_DBG_MON_A21") 509 + ), 510 + 511 + MTK_PIN( 512 + 37, "GPIO37", 513 + MTK_EINT_FUNCTION(0, 37), 514 + DRV_GRP4, 515 + MTK_FUNCTION(0, "B_GPIO37"), 516 + MTK_FUNCTION(1, "B1_JTMS_SEL1"), 517 + MTK_FUNCTION(2, "I0_UDI_TMS"), 518 + MTK_FUNCTION(3, "I1_SPM_JTAG_TMS"), 519 + MTK_FUNCTION(4, "I1_ADSP_JTAG0_TMS"), 520 + MTK_FUNCTION(5, "I1_SCP_JTAG0_TMS"), 521 + MTK_FUNCTION(6, "I1_CCU0_JTAG_TMS"), 522 + MTK_FUNCTION(7, "I1_MCUPM_JTAG_TMS") 523 + ), 524 + 525 + MTK_PIN( 526 + 38, "GPIO38", 527 + MTK_EINT_FUNCTION(0, 38), 528 + DRV_GRP4, 529 + MTK_FUNCTION(0, "B_GPIO38"), 530 + MTK_FUNCTION(1, "I0_JTCK_SEL1"), 531 + MTK_FUNCTION(2, "I0_UDI_TCK"), 532 + MTK_FUNCTION(3, "I1_SPM_JTAG_TCK"), 533 + MTK_FUNCTION(4, "I0_ADSP_JTAG0_TCK"), 534 + MTK_FUNCTION(5, "I1_SCP_JTAG0_TCK"), 535 + MTK_FUNCTION(6, "I1_CCU0_JTAG_TCK"), 536 + MTK_FUNCTION(7, "I1_MCUPM_JTAG_TCK") 537 + ), 538 + 539 + MTK_PIN( 540 + 39, "GPIO39", 541 + MTK_EINT_FUNCTION(0, 39), 542 + DRV_GRP4, 543 + MTK_FUNCTION(0, "B_GPIO39"), 544 + MTK_FUNCTION(1, "I1_JTDI_SEL1"), 545 + MTK_FUNCTION(2, "I0_UDI_TDI"), 546 + MTK_FUNCTION(3, "I1_SPM_JTAG_TDI"), 547 + MTK_FUNCTION(4, "I1_ADSP_JTAG0_TDI"), 548 + MTK_FUNCTION(5, "I1_SCP_JTAG0_TDI"), 549 + MTK_FUNCTION(6, "I1_CCU0_JTAG_TDI"), 550 + MTK_FUNCTION(7, "I1_MCUPM_JTAG_TDI") 551 + ), 552 + 553 + MTK_PIN( 554 + 40, "GPIO40", 555 + MTK_EINT_FUNCTION(0, 40), 556 + DRV_GRP4, 557 + MTK_FUNCTION(0, "B_GPIO40"), 558 + MTK_FUNCTION(1, "O_JTDO_SEL1"), 559 + MTK_FUNCTION(2, "O_UDI_TDO"), 560 + MTK_FUNCTION(3, "O_SPM_JTAG_TDO"), 561 + MTK_FUNCTION(4, "O_ADSP_JTAG0_TDO"), 562 + MTK_FUNCTION(5, "O_SCP_JTAG0_TDO"), 563 + MTK_FUNCTION(6, "O_CCU0_JTAG_TDO"), 564 + MTK_FUNCTION(7, "O_MCUPM_JTAG_TDO") 565 + ), 566 + 567 + MTK_PIN( 568 + 41, "GPIO41", 569 + MTK_EINT_FUNCTION(0, 41), 570 + DRV_GRP4, 571 + MTK_FUNCTION(0, "B_GPIO41"), 572 + MTK_FUNCTION(1, "I1_JTRSTn_SEL1"), 573 + MTK_FUNCTION(2, "I0_UDI_NTRST"), 574 + MTK_FUNCTION(3, "I0_SPM_JTAG_TRSTN"), 575 + MTK_FUNCTION(4, "I1_ADSP_JTAG0_TRSTN"), 576 + MTK_FUNCTION(5, "I0_SCP_JTAG0_TRSTN"), 577 + MTK_FUNCTION(6, "I1_CCU0_JTAG_TRST"), 578 + MTK_FUNCTION(7, "I0_MCUPM_JTAG_TRSTN") 579 + ), 580 + 581 + MTK_PIN( 582 + 42, "GPIO42", 583 + MTK_EINT_FUNCTION(0, 42), 584 + DRV_GRP4, 585 + MTK_FUNCTION(0, "B_GPIO42"), 586 + MTK_FUNCTION(1, "B1_KPCOL0") 587 + ), 588 + 589 + MTK_PIN( 590 + 43, "GPIO43", 591 + MTK_EINT_FUNCTION(0, 43), 592 + DRV_GRP4, 593 + MTK_FUNCTION(0, "B_GPIO43"), 594 + MTK_FUNCTION(1, "B1_KPCOL1"), 595 + MTK_FUNCTION(2, "I0_DP_TX_HPD"), 596 + MTK_FUNCTION(3, "O_CMFLASH2"), 597 + MTK_FUNCTION(4, "I0_DVFSRC_EXT_REQ"), 598 + MTK_FUNCTION(7, "O_mbistwriteen_trigger") 599 + ), 600 + 601 + MTK_PIN( 602 + 44, "GPIO44", 603 + MTK_EINT_FUNCTION(0, 44), 604 + DRV_GRP4, 605 + MTK_FUNCTION(0, "B_GPIO44"), 606 + MTK_FUNCTION(1, "B1_KPROW0") 607 + ), 608 + 609 + MTK_PIN( 610 + 45, "GPIO45", 611 + MTK_EINT_FUNCTION(0, 45), 612 + DRV_GRP4, 613 + MTK_FUNCTION(0, "B_GPIO45"), 614 + MTK_FUNCTION(1, "B1_KPROW1"), 615 + MTK_FUNCTION(2, "I0_EDP_TX_HPD"), 616 + MTK_FUNCTION(3, "O_CMFLASH3"), 617 + MTK_FUNCTION(4, "B0_I2SIN_MCK"), 618 + MTK_FUNCTION(7, "O_mbistreaden_trigger") 619 + ), 620 + 621 + MTK_PIN( 622 + 46, "GPIO46", 623 + MTK_EINT_FUNCTION(0, 46), 624 + DRV_GRP4, 625 + MTK_FUNCTION(0, "B_GPIO46"), 626 + MTK_FUNCTION(1, "I0_DP_TX_HPD"), 627 + MTK_FUNCTION(2, "O_PWM_0"), 628 + MTK_FUNCTION(3, "I0_VBUSVALID_2P"), 629 + MTK_FUNCTION(7, "B0_DBG_MON_A22") 630 + ), 631 + 632 + MTK_PIN( 633 + 47, "GPIO47", 634 + MTK_EINT_FUNCTION(0, 47), 635 + DRV_GRP4, 636 + MTK_FUNCTION(0, "B_GPIO47"), 637 + MTK_FUNCTION(1, "I1_WAKEN"), 638 + MTK_FUNCTION(6, "O_GDU_TROOPS_DET0") 639 + ), 640 + 641 + MTK_PIN( 642 + 48, "GPIO48", 643 + MTK_EINT_FUNCTION(0, 48), 644 + DRV_GRP4, 645 + MTK_FUNCTION(0, "B_GPIO48"), 646 + MTK_FUNCTION(1, "O_PERSTN"), 647 + MTK_FUNCTION(6, "O_GDU_TROOPS_DET1") 648 + ), 649 + 650 + MTK_PIN( 651 + 49, "GPIO49", 652 + MTK_EINT_FUNCTION(0, 49), 653 + DRV_GRP4, 654 + MTK_FUNCTION(0, "B_GPIO49"), 655 + MTK_FUNCTION(1, "B1_CLKREQN"), 656 + MTK_FUNCTION(6, "O_GDU_TROOPS_DET2") 657 + ), 658 + 659 + MTK_PIN( 660 + 50, "GPIO50", 661 + MTK_EINT_FUNCTION(0, 50), 662 + DRV_GRP4, 663 + MTK_FUNCTION(0, "B_GPIO50"), 664 + MTK_FUNCTION(1, "O_HDMITX20_PWR5V"), 665 + MTK_FUNCTION(3, "I1_IDDIG_1P"), 666 + MTK_FUNCTION(4, "I1_SCP_JTAG1_TMS"), 667 + MTK_FUNCTION(5, "I1_SSPM_JTAG_TMS"), 668 + MTK_FUNCTION(6, "I1_MD32_0_JTAG_TMS"), 669 + MTK_FUNCTION(7, "I1_MD32_1_JTAG_TMS") 670 + ), 671 + 672 + MTK_PIN( 673 + 51, "GPIO51", 674 + MTK_EINT_FUNCTION(0, 51), 675 + DRV_GRP4, 676 + MTK_FUNCTION(0, "B_GPIO51"), 677 + MTK_FUNCTION(1, "I0_HDMITX20_HTPLG"), 678 + MTK_FUNCTION(2, "I0_EDP_TX_HPD"), 679 + MTK_FUNCTION(3, "O_USB_DRVVBUS_1P"), 680 + MTK_FUNCTION(4, "I1_SCP_JTAG1_TCK"), 681 + MTK_FUNCTION(5, "I1_SSPM_JTAG_TCK"), 682 + MTK_FUNCTION(6, "I1_MD32_0_JTAG_TCK"), 683 + MTK_FUNCTION(7, "I1_MD32_1_JTAG_TCK") 684 + ), 685 + 686 + MTK_PIN( 687 + 52, "GPIO52", 688 + MTK_EINT_FUNCTION(0, 52), 689 + DRV_GRP4, 690 + MTK_FUNCTION(0, "B_GPIO52"), 691 + MTK_FUNCTION(1, "B1_HDMITX20_CEC"), 692 + MTK_FUNCTION(3, "I0_VBUSVALID_1P"), 693 + MTK_FUNCTION(4, "I1_SCP_JTAG1_TDI"), 694 + MTK_FUNCTION(5, "I1_SSPM_JTAG_TDI"), 695 + MTK_FUNCTION(6, "I1_MD32_0_JTAG_TDI"), 696 + MTK_FUNCTION(7, "I1_MD32_1_JTAG_TDI") 697 + ), 698 + 699 + MTK_PIN( 700 + 53, "GPIO53", 701 + MTK_EINT_FUNCTION(0, 53), 702 + DRV_GRP4, 703 + MTK_FUNCTION(0, "B_GPIO53"), 704 + MTK_FUNCTION(1, "B1_HDMITX20_SCL"), 705 + MTK_FUNCTION(3, "I1_IDDIG_2P"), 706 + MTK_FUNCTION(4, "O_SCP_JTAG1_TDO"), 707 + MTK_FUNCTION(5, "O_SSPM_JTAG_TDO"), 708 + MTK_FUNCTION(6, "O_MD32_0_JTAG_TDO"), 709 + MTK_FUNCTION(7, "O_MD32_1_JTAG_TDO") 710 + ), 711 + 712 + MTK_PIN( 713 + 54, "GPIO54", 714 + MTK_EINT_FUNCTION(0, 54), 715 + DRV_GRP4, 716 + MTK_FUNCTION(0, "B_GPIO54"), 717 + MTK_FUNCTION(1, "B1_HDMITX20_SDA"), 718 + MTK_FUNCTION(3, "O_USB_DRVVBUS_2P"), 719 + MTK_FUNCTION(4, "I0_SCP_JTAG1_TRSTN"), 720 + MTK_FUNCTION(5, "I0_SSPM_JTAG_TRSTN"), 721 + MTK_FUNCTION(6, "I1_MD32_0_JTAG_TRST"), 722 + MTK_FUNCTION(7, "I1_MD32_1_JTAG_TRST") 723 + ), 724 + 725 + MTK_PIN( 726 + 55, "GPIO55", 727 + MTK_EINT_FUNCTION(0, 55), 728 + DRV_GRP4, 729 + MTK_FUNCTION(0, "B_GPIO55"), 730 + MTK_FUNCTION(1, "B1_SCL0"), 731 + MTK_FUNCTION(2, "B1_SCP_SCL0"), 732 + MTK_FUNCTION(3, "B1_SCP_SCL1"), 733 + MTK_FUNCTION(4, "B1_PCIE_PHY_I2C_SCL") 734 + ), 735 + 736 + MTK_PIN( 737 + 56, "GPIO56", 738 + MTK_EINT_FUNCTION(0, 56), 739 + DRV_GRP4, 740 + MTK_FUNCTION(0, "B_GPIO56"), 741 + MTK_FUNCTION(1, "B1_SDA0"), 742 + MTK_FUNCTION(2, "B1_SCP_SDA0"), 743 + MTK_FUNCTION(3, "B1_SCP_SDA1"), 744 + MTK_FUNCTION(4, "B1_PCIE_PHY_I2C_SDA") 745 + ), 746 + 747 + MTK_PIN( 748 + 57, "GPIO57", 749 + MTK_EINT_FUNCTION(0, 57), 750 + DRV_GRP4, 751 + MTK_FUNCTION(0, "B_GPIO57"), 752 + MTK_FUNCTION(1, "B1_SCL1") 753 + ), 754 + 755 + MTK_PIN( 756 + 58, "GPIO58", 757 + MTK_EINT_FUNCTION(0, 58), 758 + DRV_GRP4, 759 + MTK_FUNCTION(0, "B_GPIO58"), 760 + MTK_FUNCTION(1, "B1_SDA1") 761 + ), 762 + 763 + MTK_PIN( 764 + 59, "GPIO59", 765 + MTK_EINT_FUNCTION(0, 59), 766 + DRV_GRP4, 767 + MTK_FUNCTION(0, "B_GPIO59"), 768 + MTK_FUNCTION(1, "B1_SCL2"), 769 + MTK_FUNCTION(2, "B1_SCP_SCL0"), 770 + MTK_FUNCTION(3, "B1_SCP_SCL1") 771 + ), 772 + 773 + MTK_PIN( 774 + 60, "GPIO60", 775 + MTK_EINT_FUNCTION(0, 60), 776 + DRV_GRP4, 777 + MTK_FUNCTION(0, "B_GPIO60"), 778 + MTK_FUNCTION(1, "B1_SDA2"), 779 + MTK_FUNCTION(2, "B1_SCP_SDA0"), 780 + MTK_FUNCTION(3, "B1_SCP_SDA1") 781 + ), 782 + 783 + MTK_PIN( 784 + 61, "GPIO61", 785 + MTK_EINT_FUNCTION(0, 61), 786 + DRV_GRP4, 787 + MTK_FUNCTION(0, "B_GPIO61"), 788 + MTK_FUNCTION(1, "B1_SCL3"), 789 + MTK_FUNCTION(2, "B1_SCP_SCL0"), 790 + MTK_FUNCTION(3, "B1_SCP_SCL1"), 791 + MTK_FUNCTION(4, "B1_PCIE_PHY_I2C_SCL") 792 + ), 793 + 794 + MTK_PIN( 795 + 62, "GPIO62", 796 + MTK_EINT_FUNCTION(0, 62), 797 + DRV_GRP4, 798 + MTK_FUNCTION(0, "B_GPIO62"), 799 + MTK_FUNCTION(1, "B1_SDA3"), 800 + MTK_FUNCTION(2, "B1_SCP_SDA0"), 801 + MTK_FUNCTION(3, "B1_SCP_SDA1"), 802 + MTK_FUNCTION(4, "B1_PCIE_PHY_I2C_SDA") 803 + ), 804 + 805 + MTK_PIN( 806 + 63, "GPIO63", 807 + MTK_EINT_FUNCTION(0, 63), 808 + DRV_GRP4, 809 + MTK_FUNCTION(0, "B_GPIO63"), 810 + MTK_FUNCTION(1, "B1_SCL4") 811 + ), 812 + 813 + MTK_PIN( 814 + 64, "GPIO64", 815 + MTK_EINT_FUNCTION(0, 64), 816 + DRV_GRP4, 817 + MTK_FUNCTION(0, "B_GPIO64"), 818 + MTK_FUNCTION(1, "B1_SDA4") 819 + ), 820 + 821 + MTK_PIN( 822 + 65, "GPIO65", 823 + MTK_EINT_FUNCTION(0, 65), 824 + DRV_GRP4, 825 + MTK_FUNCTION(0, "B_GPIO65"), 826 + MTK_FUNCTION(1, "B1_SCL5"), 827 + MTK_FUNCTION(2, "B1_SCP_SCL0"), 828 + MTK_FUNCTION(3, "B1_SCP_SCL1") 829 + ), 830 + 831 + MTK_PIN( 832 + 66, "GPIO66", 833 + MTK_EINT_FUNCTION(0, 66), 834 + DRV_GRP4, 835 + MTK_FUNCTION(0, "B_GPIO66"), 836 + MTK_FUNCTION(1, "B1_SDA5"), 837 + MTK_FUNCTION(2, "B1_SCP_SDA0"), 838 + MTK_FUNCTION(3, "B1_SCP_SDA1") 839 + ), 840 + 841 + MTK_PIN( 842 + 67, "GPIO67", 843 + MTK_EINT_FUNCTION(0, 67), 844 + DRV_GRP4, 845 + MTK_FUNCTION(0, "B_GPIO67"), 846 + MTK_FUNCTION(1, "B1_SCL6"), 847 + MTK_FUNCTION(2, "B1_SCP_SCL0"), 848 + MTK_FUNCTION(3, "B1_SCP_SCL1"), 849 + MTK_FUNCTION(4, "B1_PCIE_PHY_I2C_SCL") 850 + ), 851 + 852 + MTK_PIN( 853 + 68, "GPIO68", 854 + MTK_EINT_FUNCTION(0, 68), 855 + DRV_GRP4, 856 + MTK_FUNCTION(0, "B_GPIO68"), 857 + MTK_FUNCTION(1, "B1_SDA6"), 858 + MTK_FUNCTION(2, "B1_SCP_SDA0"), 859 + MTK_FUNCTION(3, "B1_SCP_SDA1"), 860 + MTK_FUNCTION(4, "B1_PCIE_PHY_I2C_SDA") 861 + ), 862 + 863 + MTK_PIN( 864 + 69, "GPIO69", 865 + MTK_EINT_FUNCTION(0, 69), 866 + DRV_GRP4, 867 + MTK_FUNCTION(0, "B_GPIO69"), 868 + MTK_FUNCTION(1, "O_SPIM0_CSB"), 869 + MTK_FUNCTION(2, "O_SCP_SPI0_CS"), 870 + MTK_FUNCTION(3, "O_DMIC3_CLK"), 871 + MTK_FUNCTION(4, "B0_MD32_1_GPIO0"), 872 + MTK_FUNCTION(5, "O_CMVREF0"), 873 + MTK_FUNCTION(6, "O_GDU_SUM_TROOP0_0"), 874 + MTK_FUNCTION(7, "B0_DBG_MON_A23") 875 + ), 876 + 877 + MTK_PIN( 878 + 70, "GPIO70", 879 + MTK_EINT_FUNCTION(0, 70), 880 + DRV_GRP4, 881 + MTK_FUNCTION(0, "B_GPIO70"), 882 + MTK_FUNCTION(1, "O_SPIM0_CLK"), 883 + MTK_FUNCTION(2, "O_SCP_SPI0_CK"), 884 + MTK_FUNCTION(3, "I0_DMIC3_DAT"), 885 + MTK_FUNCTION(4, "B0_MD32_1_GPIO1"), 886 + MTK_FUNCTION(5, "O_CMVREF1"), 887 + MTK_FUNCTION(6, "O_GDU_SUM_TROOP0_1"), 888 + MTK_FUNCTION(7, "B0_DBG_MON_A24") 889 + ), 890 + 891 + MTK_PIN( 892 + 71, "GPIO71", 893 + MTK_EINT_FUNCTION(0, 71), 894 + DRV_GRP4, 895 + MTK_FUNCTION(0, "B_GPIO71"), 896 + MTK_FUNCTION(1, "B0_SPIM0_MOSI"), 897 + MTK_FUNCTION(2, "O_SCP_SPI0_MO"), 898 + MTK_FUNCTION(3, "I0_DMIC3_DAT_R"), 899 + MTK_FUNCTION(4, "B0_MD32_1_GPIO2"), 900 + MTK_FUNCTION(5, "O_CMVREF2"), 901 + MTK_FUNCTION(6, "O_GDU_SUM_TROOP0_2"), 902 + MTK_FUNCTION(7, "B0_DBG_MON_A25") 903 + ), 904 + 905 + MTK_PIN( 906 + 72, "GPIO72", 907 + MTK_EINT_FUNCTION(0, 72), 908 + DRV_GRP4, 909 + MTK_FUNCTION(0, "B_GPIO72"), 910 + MTK_FUNCTION(1, "B0_SPIM0_MISO"), 911 + MTK_FUNCTION(2, "I0_SCP_SPI0_MI"), 912 + MTK_FUNCTION(3, "O_DMIC4_CLK"), 913 + MTK_FUNCTION(5, "O_CMVREF3"), 914 + MTK_FUNCTION(6, "O_GDU_SUM_TROOP1_0"), 915 + MTK_FUNCTION(7, "B0_DBG_MON_A26") 916 + ), 917 + 918 + MTK_PIN( 919 + 73, "GPIO73", 920 + MTK_EINT_FUNCTION(0, 73), 921 + DRV_GRP4, 922 + MTK_FUNCTION(0, "B_GPIO73"), 923 + MTK_FUNCTION(1, "B0_SPIM0_MIO2"), 924 + MTK_FUNCTION(2, "O_UTXD3"), 925 + MTK_FUNCTION(3, "I0_DMIC4_DAT"), 926 + MTK_FUNCTION(4, "O_CLKM0"), 927 + MTK_FUNCTION(5, "O_CMVREF4"), 928 + MTK_FUNCTION(6, "O_GDU_SUM_TROOP1_1"), 929 + MTK_FUNCTION(7, "B0_DBG_MON_A27") 930 + ), 931 + 932 + MTK_PIN( 933 + 74, "GPIO74", 934 + MTK_EINT_FUNCTION(0, 74), 935 + DRV_GRP4, 936 + MTK_FUNCTION(0, "B_GPIO74"), 937 + MTK_FUNCTION(1, "B0_SPIM0_MIO3"), 938 + MTK_FUNCTION(2, "I1_URXD3"), 939 + MTK_FUNCTION(3, "I0_DMIC4_DAT_R"), 940 + MTK_FUNCTION(4, "O_CLKM1"), 941 + MTK_FUNCTION(5, "O_CMVREF5"), 942 + MTK_FUNCTION(6, "O_GDU_SUM_TROOP1_2"), 943 + MTK_FUNCTION(7, "B0_DBG_MON_A28") 944 + ), 945 + 946 + MTK_PIN( 947 + 75, "GPIO75", 948 + MTK_EINT_FUNCTION(0, 75), 949 + DRV_GRP4, 950 + MTK_FUNCTION(0, "B_GPIO75"), 951 + MTK_FUNCTION(1, "O_SPIM1_CSB"), 952 + MTK_FUNCTION(2, "O_SCP_SPI1_A_CS"), 953 + MTK_FUNCTION(3, "B0_TDMIN_MCK"), 954 + MTK_FUNCTION(4, "B1_SCP_SCL0"), 955 + MTK_FUNCTION(5, "O_CMVREF6"), 956 + MTK_FUNCTION(6, "O_GDU_SUM_TROOP2_0"), 957 + MTK_FUNCTION(7, "B0_DBG_MON_A29") 958 + ), 959 + 960 + MTK_PIN( 961 + 76, "GPIO76", 962 + MTK_EINT_FUNCTION(0, 76), 963 + DRV_GRP4, 964 + MTK_FUNCTION(0, "B_GPIO76"), 965 + MTK_FUNCTION(1, "O_SPIM1_CLK"), 966 + MTK_FUNCTION(2, "O_SCP_SPI1_A_CK"), 967 + MTK_FUNCTION(3, "B0_TDMIN_BCK"), 968 + MTK_FUNCTION(4, "B1_SCP_SDA0"), 969 + MTK_FUNCTION(5, "O_CMVREF7"), 970 + MTK_FUNCTION(6, "O_GDU_SUM_TROOP2_1"), 971 + MTK_FUNCTION(7, "B0_DBG_MON_A30") 972 + ), 973 + 974 + MTK_PIN( 975 + 77, "GPIO77", 976 + MTK_EINT_FUNCTION(0, 77), 977 + DRV_GRP4, 978 + MTK_FUNCTION(0, "B_GPIO77"), 979 + MTK_FUNCTION(1, "B0_SPIM1_MOSI"), 980 + MTK_FUNCTION(2, "O_SCP_SPI1_A_MO"), 981 + MTK_FUNCTION(3, "B0_TDMIN_LRCK"), 982 + MTK_FUNCTION(4, "B1_SCP_SCL1"), 983 + MTK_FUNCTION(6, "O_GDU_SUM_TROOP2_2"), 984 + MTK_FUNCTION(7, "B0_DBG_MON_A31") 985 + ), 986 + 987 + MTK_PIN( 988 + 78, "GPIO78", 989 + MTK_EINT_FUNCTION(0, 78), 990 + DRV_GRP4, 991 + MTK_FUNCTION(0, "B_GPIO78"), 992 + MTK_FUNCTION(1, "B0_SPIM1_MISO"), 993 + MTK_FUNCTION(2, "I0_SCP_SPI1_A_MI"), 994 + MTK_FUNCTION(3, "I0_TDMIN_DI"), 995 + MTK_FUNCTION(4, "B1_SCP_SDA1"), 996 + MTK_FUNCTION(7, "B0_DBG_MON_A32") 997 + ), 998 + 999 + MTK_PIN( 1000 + 79, "GPIO79", 1001 + MTK_EINT_FUNCTION(0, 79), 1002 + DRV_GRP4, 1003 + MTK_FUNCTION(0, "B_GPIO79"), 1004 + MTK_FUNCTION(1, "O_SPIM2_CSB"), 1005 + MTK_FUNCTION(2, "O_SCP_SPI2_CS"), 1006 + MTK_FUNCTION(3, "O_I2SO1_MCK"), 1007 + MTK_FUNCTION(4, "O_UTXD2"), 1008 + MTK_FUNCTION(5, "O_TP_UTXD2_AO"), 1009 + MTK_FUNCTION(6, "B0_PCM_SYNC"), 1010 + MTK_FUNCTION(7, "B0_DBG_MON_B0") 1011 + ), 1012 + 1013 + MTK_PIN( 1014 + 80, "GPIO80", 1015 + MTK_EINT_FUNCTION(0, 80), 1016 + DRV_GRP4, 1017 + MTK_FUNCTION(0, "B_GPIO80"), 1018 + MTK_FUNCTION(1, "O_SPIM2_CLK"), 1019 + MTK_FUNCTION(2, "O_SCP_SPI2_CK"), 1020 + MTK_FUNCTION(3, "O_I2SO1_BCK"), 1021 + MTK_FUNCTION(4, "I1_URXD2"), 1022 + MTK_FUNCTION(5, "I1_TP_URXD2_AO"), 1023 + MTK_FUNCTION(6, "B0_PCM_CLK"), 1024 + MTK_FUNCTION(7, "B0_DBG_MON_B1") 1025 + ), 1026 + 1027 + MTK_PIN( 1028 + 81, "GPIO81", 1029 + MTK_EINT_FUNCTION(0, 81), 1030 + DRV_GRP4, 1031 + MTK_FUNCTION(0, "B_GPIO81"), 1032 + MTK_FUNCTION(1, "B0_SPIM2_MOSI"), 1033 + MTK_FUNCTION(2, "O_SCP_SPI2_MO"), 1034 + MTK_FUNCTION(3, "O_I2SO1_WS"), 1035 + MTK_FUNCTION(4, "O_URTS2"), 1036 + MTK_FUNCTION(5, "O_TP_URTS2_AO"), 1037 + MTK_FUNCTION(6, "O_PCM_DO"), 1038 + MTK_FUNCTION(7, "B0_DBG_MON_B2") 1039 + ), 1040 + 1041 + MTK_PIN( 1042 + 82, "GPIO82", 1043 + MTK_EINT_FUNCTION(0, 82), 1044 + DRV_GRP4, 1045 + MTK_FUNCTION(0, "B_GPIO82"), 1046 + MTK_FUNCTION(1, "B0_SPIM2_MISO"), 1047 + MTK_FUNCTION(2, "I0_SCP_SPI2_MI"), 1048 + MTK_FUNCTION(3, "O_I2SO1_D0"), 1049 + MTK_FUNCTION(4, "I1_UCTS2"), 1050 + MTK_FUNCTION(5, "I1_TP_UCTS2_AO"), 1051 + MTK_FUNCTION(6, "I0_PCM_DI"), 1052 + MTK_FUNCTION(7, "B0_DBG_MON_B3") 1053 + ), 1054 + 1055 + MTK_PIN( 1056 + 83, "GPIO83", 1057 + MTK_EINT_FUNCTION(0, 83), 1058 + DRV_GRP4, 1059 + MTK_FUNCTION(0, "B_GPIO83"), 1060 + MTK_FUNCTION(1, "I1_IDDIG") 1061 + ), 1062 + 1063 + MTK_PIN( 1064 + 84, "GPIO84", 1065 + MTK_EINT_FUNCTION(0, 84), 1066 + DRV_GRP4, 1067 + MTK_FUNCTION(0, "B_GPIO84"), 1068 + MTK_FUNCTION(1, "O_USB_DRVVBUS") 1069 + ), 1070 + 1071 + MTK_PIN( 1072 + 85, "GPIO85", 1073 + MTK_EINT_FUNCTION(0, 85), 1074 + DRV_GRP4, 1075 + MTK_FUNCTION(0, "B_GPIO85"), 1076 + MTK_FUNCTION(1, "I0_VBUSVALID") 1077 + ), 1078 + 1079 + MTK_PIN( 1080 + 86, "GPIO86", 1081 + MTK_EINT_FUNCTION(0, 86), 1082 + DRV_GRP4, 1083 + MTK_FUNCTION(0, "B_GPIO86"), 1084 + MTK_FUNCTION(1, "I1_IDDIG_1P"), 1085 + MTK_FUNCTION(2, "O_UTXD1"), 1086 + MTK_FUNCTION(3, "O_URTS2"), 1087 + MTK_FUNCTION(4, "O_PWM_2"), 1088 + MTK_FUNCTION(5, "B0_TP_GPIO4_AO"), 1089 + MTK_FUNCTION(6, "O_AUXIF_ST0"), 1090 + MTK_FUNCTION(7, "B0_DBG_MON_B4") 1091 + ), 1092 + 1093 + MTK_PIN( 1094 + 87, "GPIO87", 1095 + MTK_EINT_FUNCTION(0, 87), 1096 + DRV_GRP4, 1097 + MTK_FUNCTION(0, "B_GPIO87"), 1098 + MTK_FUNCTION(1, "O_USB_DRVVBUS_1P"), 1099 + MTK_FUNCTION(2, "I1_URXD1"), 1100 + MTK_FUNCTION(3, "I1_UCTS2"), 1101 + MTK_FUNCTION(4, "O_PWM_3"), 1102 + MTK_FUNCTION(5, "B0_TP_GPIO5_AO"), 1103 + MTK_FUNCTION(6, "O_AUXIF_CLK0"), 1104 + MTK_FUNCTION(7, "B0_DBG_MON_B5") 1105 + ), 1106 + 1107 + MTK_PIN( 1108 + 88, "GPIO88", 1109 + MTK_EINT_FUNCTION(0, 88), 1110 + DRV_GRP4, 1111 + MTK_FUNCTION(0, "B_GPIO88"), 1112 + MTK_FUNCTION(1, "I0_VBUSVALID_1P"), 1113 + MTK_FUNCTION(2, "O_UTXD2"), 1114 + MTK_FUNCTION(3, "O_URTS1"), 1115 + MTK_FUNCTION(4, "O_CLKM2"), 1116 + MTK_FUNCTION(5, "B0_TP_GPIO6_AO"), 1117 + MTK_FUNCTION(6, "O_AUXIF_ST1"), 1118 + MTK_FUNCTION(7, "B0_DBG_MON_B6") 1119 + ), 1120 + 1121 + MTK_PIN( 1122 + 89, "GPIO89", 1123 + MTK_EINT_FUNCTION(0, 89), 1124 + DRV_GRP4, 1125 + MTK_FUNCTION(0, "B_GPIO89"), 1126 + MTK_FUNCTION(1, "I1_IDDIG_2P"), 1127 + MTK_FUNCTION(2, "I1_URXD2"), 1128 + MTK_FUNCTION(3, "I1_UCTS1"), 1129 + MTK_FUNCTION(4, "O_CLKM3"), 1130 + MTK_FUNCTION(5, "B0_TP_GPIO7_AO"), 1131 + MTK_FUNCTION(6, "O_AUXIF_CLK1"), 1132 + MTK_FUNCTION(7, "B0_DBG_MON_B7") 1133 + ), 1134 + 1135 + MTK_PIN( 1136 + 90, "GPIO90", 1137 + MTK_EINT_FUNCTION(0, 90), 1138 + DRV_GRP4, 1139 + MTK_FUNCTION(0, "B_GPIO90"), 1140 + MTK_FUNCTION(1, "O_USB_DRVVBUS_2P"), 1141 + MTK_FUNCTION(2, "O_UTXD3"), 1142 + MTK_FUNCTION(3, "O_ADSP_UTXD0"), 1143 + MTK_FUNCTION(4, "O_SSPM_UTXD_AO"), 1144 + MTK_FUNCTION(5, "O_MD32_0_TXD"), 1145 + MTK_FUNCTION(6, "O_MD32_1_TXD"), 1146 + MTK_FUNCTION(7, "B0_DBG_MON_B8") 1147 + ), 1148 + 1149 + MTK_PIN( 1150 + 91, "GPIO91", 1151 + MTK_EINT_FUNCTION(0, 91), 1152 + DRV_GRP4, 1153 + MTK_FUNCTION(0, "B_GPIO91"), 1154 + MTK_FUNCTION(1, "I0_VBUSVALID_2P"), 1155 + MTK_FUNCTION(2, "I1_URXD3"), 1156 + MTK_FUNCTION(3, "I1_ADSP_URXD0"), 1157 + MTK_FUNCTION(4, "I1_SSPM_URXD_AO"), 1158 + MTK_FUNCTION(5, "I1_MD32_0_RXD"), 1159 + MTK_FUNCTION(6, "I1_MD32_1_RXD"), 1160 + MTK_FUNCTION(7, "B0_DBG_MON_B9") 1161 + ), 1162 + 1163 + MTK_PIN( 1164 + 92, "GPIO92", 1165 + MTK_EINT_FUNCTION(0, 92), 1166 + DRV_GRP4, 1167 + MTK_FUNCTION(0, "B_GPIO92"), 1168 + MTK_FUNCTION(1, "O_PWRAP_SPI0_CSN") 1169 + ), 1170 + 1171 + MTK_PIN( 1172 + 93, "GPIO93", 1173 + MTK_EINT_FUNCTION(0, 93), 1174 + DRV_GRP4, 1175 + MTK_FUNCTION(0, "B_GPIO93"), 1176 + MTK_FUNCTION(1, "O_PWRAP_SPI0_CK") 1177 + ), 1178 + 1179 + MTK_PIN( 1180 + 94, "GPIO94", 1181 + MTK_EINT_FUNCTION(0, 94), 1182 + DRV_GRP4, 1183 + MTK_FUNCTION(0, "B_GPIO94"), 1184 + MTK_FUNCTION(1, "B0_PWRAP_SPI0_MO"), 1185 + MTK_FUNCTION(2, "B0_PWRAP_SPI0_MI") 1186 + ), 1187 + 1188 + MTK_PIN( 1189 + 95, "GPIO95", 1190 + MTK_EINT_FUNCTION(0, 95), 1191 + DRV_GRP4, 1192 + MTK_FUNCTION(0, "B_GPIO95"), 1193 + MTK_FUNCTION(1, "B0_PWRAP_SPI0_MI"), 1194 + MTK_FUNCTION(2, "B0_PWRAP_SPI0_MO") 1195 + ), 1196 + 1197 + MTK_PIN( 1198 + 96, "GPIO96", 1199 + MTK_EINT_FUNCTION(0, 96), 1200 + DRV_GRP4, 1201 + MTK_FUNCTION(0, "B_GPIO96"), 1202 + MTK_FUNCTION(1, "O_SRCLKENA0") 1203 + ), 1204 + 1205 + MTK_PIN( 1206 + 97, "GPIO97", 1207 + MTK_EINT_FUNCTION(0, 97), 1208 + DRV_GRP4, 1209 + MTK_FUNCTION(0, "B_GPIO97"), 1210 + MTK_FUNCTION(1, "O_SRCLKENA1") 1211 + ), 1212 + 1213 + MTK_PIN( 1214 + 98, "GPIO98", 1215 + MTK_EINT_FUNCTION(0, 98), 1216 + DRV_GRP4, 1217 + MTK_FUNCTION(0, "B_GPIO98"), 1218 + MTK_FUNCTION(1, "O_SCP_VREQ_VAO"), 1219 + MTK_FUNCTION(2, "I0_DVFSRC_EXT_REQ") 1220 + ), 1221 + 1222 + MTK_PIN( 1223 + 99, "GPIO99", 1224 + MTK_EINT_FUNCTION(0, 99), 1225 + DRV_GRP4, 1226 + MTK_FUNCTION(0, "B_GPIO99"), 1227 + MTK_FUNCTION(1, "I0_RTC32K_CK") 1228 + ), 1229 + 1230 + MTK_PIN( 1231 + 100, "GPIO100", 1232 + MTK_EINT_FUNCTION(0, 100), 1233 + DRV_GRP4, 1234 + MTK_FUNCTION(0, "B_GPIO100"), 1235 + MTK_FUNCTION(1, "O_WATCHDOG") 1236 + ), 1237 + 1238 + MTK_PIN( 1239 + 101, "GPIO101", 1240 + MTK_EINT_FUNCTION(0, 101), 1241 + DRV_GRP4, 1242 + MTK_FUNCTION(0, "B_GPIO101"), 1243 + MTK_FUNCTION(1, "O_AUD_CLK_MOSI"), 1244 + MTK_FUNCTION(2, "O_I2SO1_MCK"), 1245 + MTK_FUNCTION(3, "B0_I2SIN_BCK") 1246 + ), 1247 + 1248 + MTK_PIN( 1249 + 102, "GPIO102", 1250 + MTK_EINT_FUNCTION(0, 102), 1251 + DRV_GRP4, 1252 + MTK_FUNCTION(0, "B_GPIO102"), 1253 + MTK_FUNCTION(1, "O_AUD_SYNC_MOSI"), 1254 + MTK_FUNCTION(2, "O_I2SO1_BCK"), 1255 + MTK_FUNCTION(3, "B0_I2SIN_WS") 1256 + ), 1257 + 1258 + MTK_PIN( 1259 + 103, "GPIO103", 1260 + MTK_EINT_FUNCTION(0, 103), 1261 + DRV_GRP4, 1262 + MTK_FUNCTION(0, "B_GPIO103"), 1263 + MTK_FUNCTION(1, "O_AUD_DAT_MOSI0"), 1264 + MTK_FUNCTION(2, "O_I2SO1_WS"), 1265 + MTK_FUNCTION(3, "I0_I2SIN_D0") 1266 + ), 1267 + 1268 + MTK_PIN( 1269 + 104, "GPIO104", 1270 + MTK_EINT_FUNCTION(0, 104), 1271 + DRV_GRP4, 1272 + MTK_FUNCTION(0, "B_GPIO104"), 1273 + MTK_FUNCTION(1, "O_AUD_DAT_MOSI1"), 1274 + MTK_FUNCTION(2, "O_I2SO1_D0"), 1275 + MTK_FUNCTION(3, "I0_I2SIN_D1") 1276 + ), 1277 + 1278 + MTK_PIN( 1279 + 105, "GPIO105", 1280 + MTK_EINT_FUNCTION(0, 105), 1281 + DRV_GRP4, 1282 + MTK_FUNCTION(0, "B_GPIO105"), 1283 + MTK_FUNCTION(1, "I0_AUD_DAT_MISO0"), 1284 + MTK_FUNCTION(2, "I0_VOW_DAT_MISO"), 1285 + MTK_FUNCTION(3, "I0_I2SIN_D2") 1286 + ), 1287 + 1288 + MTK_PIN( 1289 + 106, "GPIO106", 1290 + MTK_EINT_FUNCTION(0, 106), 1291 + DRV_GRP4, 1292 + MTK_FUNCTION(0, "B_GPIO106"), 1293 + MTK_FUNCTION(1, "I0_AUD_DAT_MISO1"), 1294 + MTK_FUNCTION(2, "I0_VOW_CLK_MISO"), 1295 + MTK_FUNCTION(3, "I0_I2SIN_D3") 1296 + ), 1297 + 1298 + MTK_PIN( 1299 + 107, "GPIO107", 1300 + MTK_EINT_FUNCTION(0, 107), 1301 + DRV_GRP4, 1302 + MTK_FUNCTION(0, "B_GPIO107"), 1303 + MTK_FUNCTION(1, "B0_I2SIN_MCK"), 1304 + MTK_FUNCTION(2, "I0_SPLIN_MCK"), 1305 + MTK_FUNCTION(3, "I0_SPDIF_IN0"), 1306 + MTK_FUNCTION(4, "O_CMVREF4"), 1307 + MTK_FUNCTION(5, "O_AUXIF_ST0"), 1308 + MTK_FUNCTION(6, "O_PGD_LV_LSC_PWR0") 1309 + ), 1310 + 1311 + MTK_PIN( 1312 + 108, "GPIO108", 1313 + MTK_EINT_FUNCTION(0, 108), 1314 + DRV_GRP4, 1315 + MTK_FUNCTION(0, "B_GPIO108"), 1316 + MTK_FUNCTION(1, "B0_I2SIN_BCK"), 1317 + MTK_FUNCTION(2, "I0_SPLIN_LRCK"), 1318 + MTK_FUNCTION(3, "O_DMIC4_CLK"), 1319 + MTK_FUNCTION(4, "O_CMVREF5"), 1320 + MTK_FUNCTION(5, "O_AUXIF_CLK0"), 1321 + MTK_FUNCTION(6, "O_PGD_LV_LSC_PWR1"), 1322 + MTK_FUNCTION(7, "B0_DBG_MON_B10") 1323 + ), 1324 + 1325 + MTK_PIN( 1326 + 109, "GPIO109", 1327 + MTK_EINT_FUNCTION(0, 109), 1328 + DRV_GRP4, 1329 + MTK_FUNCTION(0, "B_GPIO109"), 1330 + MTK_FUNCTION(1, "B0_I2SIN_WS"), 1331 + MTK_FUNCTION(2, "I0_SPLIN_BCK"), 1332 + MTK_FUNCTION(3, "I0_DMIC4_DAT"), 1333 + MTK_FUNCTION(4, "O_CMVREF6"), 1334 + MTK_FUNCTION(5, "O_AUXIF_ST1"), 1335 + MTK_FUNCTION(6, "O_PGD_LV_LSC_PWR2"), 1336 + MTK_FUNCTION(7, "B0_DBG_MON_B11") 1337 + ), 1338 + 1339 + MTK_PIN( 1340 + 110, "GPIO110", 1341 + MTK_EINT_FUNCTION(0, 110), 1342 + DRV_GRP4, 1343 + MTK_FUNCTION(0, "B_GPIO110"), 1344 + MTK_FUNCTION(1, "I0_I2SIN_D0"), 1345 + MTK_FUNCTION(2, "I0_SPLIN_D0"), 1346 + MTK_FUNCTION(3, "I0_DMIC4_DAT_R"), 1347 + MTK_FUNCTION(4, "O_CMVREF7"), 1348 + MTK_FUNCTION(5, "O_AUXIF_CLK1"), 1349 + MTK_FUNCTION(6, "O_PGD_LV_LSC_PWR3"), 1350 + MTK_FUNCTION(7, "B0_DBG_MON_B12") 1351 + ), 1352 + 1353 + MTK_PIN( 1354 + 111, "GPIO111", 1355 + MTK_EINT_FUNCTION(0, 111), 1356 + DRV_GRP4, 1357 + MTK_FUNCTION(0, "B_GPIO111"), 1358 + MTK_FUNCTION(1, "I0_I2SIN_D1"), 1359 + MTK_FUNCTION(2, "I0_SPLIN_D1"), 1360 + MTK_FUNCTION(3, "O_DMIC3_CLK"), 1361 + MTK_FUNCTION(4, "O_SPDIF_OUT"), 1362 + MTK_FUNCTION(6, "O_PGD_LV_LSC_PWR4"), 1363 + MTK_FUNCTION(7, "B0_DBG_MON_B13") 1364 + ), 1365 + 1366 + MTK_PIN( 1367 + 112, "GPIO112", 1368 + MTK_EINT_FUNCTION(0, 112), 1369 + DRV_GRP4, 1370 + MTK_FUNCTION(0, "B_GPIO112"), 1371 + MTK_FUNCTION(1, "I0_I2SIN_D2"), 1372 + MTK_FUNCTION(2, "I0_SPLIN_D2"), 1373 + MTK_FUNCTION(3, "I0_DMIC3_DAT"), 1374 + MTK_FUNCTION(4, "B0_TDMIN_MCK"), 1375 + MTK_FUNCTION(5, "O_I2SO1_WS"), 1376 + MTK_FUNCTION(6, "O_PGD_LV_LSC_PWR5"), 1377 + MTK_FUNCTION(7, "B0_DBG_MON_B14") 1378 + ), 1379 + 1380 + MTK_PIN( 1381 + 113, "GPIO113", 1382 + MTK_EINT_FUNCTION(0, 113), 1383 + DRV_GRP4, 1384 + MTK_FUNCTION(0, "B_GPIO113"), 1385 + MTK_FUNCTION(1, "I0_I2SIN_D3"), 1386 + MTK_FUNCTION(2, "I0_SPLIN_D3"), 1387 + MTK_FUNCTION(3, "I0_DMIC3_DAT_R"), 1388 + MTK_FUNCTION(4, "B0_TDMIN_BCK"), 1389 + MTK_FUNCTION(5, "O_I2SO1_D0"), 1390 + MTK_FUNCTION(7, "B0_DBG_MON_B15") 1391 + ), 1392 + 1393 + MTK_PIN( 1394 + 114, "GPIO114", 1395 + MTK_EINT_FUNCTION(0, 114), 1396 + DRV_GRP4, 1397 + MTK_FUNCTION(0, "B_GPIO114"), 1398 + MTK_FUNCTION(1, "O_I2SO2_MCK"), 1399 + MTK_FUNCTION(2, "B0_I2SIN_MCK"), 1400 + MTK_FUNCTION(3, "I1_MCUPM_JTAG_TMS"), 1401 + MTK_FUNCTION(4, "B1_APU_JTAG_TMS"), 1402 + MTK_FUNCTION(5, "I1_SCP_JTAG1_TMS"), 1403 + MTK_FUNCTION(6, "I1_SPM_JTAG_TMS"), 1404 + MTK_FUNCTION(7, "B0_DBG_MON_B16") 1405 + ), 1406 + 1407 + MTK_PIN( 1408 + 115, "GPIO115", 1409 + MTK_EINT_FUNCTION(0, 115), 1410 + DRV_GRP4, 1411 + MTK_FUNCTION(0, "B_GPIO115"), 1412 + MTK_FUNCTION(1, "B0_I2SO2_BCK"), 1413 + MTK_FUNCTION(2, "B0_I2SIN_BCK"), 1414 + MTK_FUNCTION(3, "I1_MCUPM_JTAG_TCK"), 1415 + MTK_FUNCTION(4, "I0_APU_JTAG_TCK"), 1416 + MTK_FUNCTION(5, "I1_SCP_JTAG1_TCK"), 1417 + MTK_FUNCTION(6, "I1_SPM_JTAG_TCK"), 1418 + MTK_FUNCTION(7, "B0_DBG_MON_B17") 1419 + ), 1420 + 1421 + MTK_PIN( 1422 + 116, "GPIO116", 1423 + MTK_EINT_FUNCTION(0, 116), 1424 + DRV_GRP4, 1425 + MTK_FUNCTION(0, "B_GPIO116"), 1426 + MTK_FUNCTION(1, "B0_I2SO2_WS"), 1427 + MTK_FUNCTION(2, "B0_I2SIN_WS"), 1428 + MTK_FUNCTION(3, "I1_MCUPM_JTAG_TDI"), 1429 + MTK_FUNCTION(4, "I1_APU_JTAG_TDI"), 1430 + MTK_FUNCTION(5, "I1_SCP_JTAG1_TDI"), 1431 + MTK_FUNCTION(6, "I1_SPM_JTAG_TDI"), 1432 + MTK_FUNCTION(7, "B0_DBG_MON_B18") 1433 + ), 1434 + 1435 + MTK_PIN( 1436 + 117, "GPIO117", 1437 + MTK_EINT_FUNCTION(0, 117), 1438 + DRV_GRP4, 1439 + MTK_FUNCTION(0, "B_GPIO117"), 1440 + MTK_FUNCTION(1, "O_I2SO2_D0"), 1441 + MTK_FUNCTION(2, "I0_I2SIN_D0"), 1442 + MTK_FUNCTION(3, "O_MCUPM_JTAG_TDO"), 1443 + MTK_FUNCTION(4, "O_APU_JTAG_TDO"), 1444 + MTK_FUNCTION(5, "O_SCP_JTAG1_TDO"), 1445 + MTK_FUNCTION(6, "O_SPM_JTAG_TDO"), 1446 + MTK_FUNCTION(7, "B0_DBG_MON_B19") 1447 + ), 1448 + 1449 + MTK_PIN( 1450 + 118, "GPIO118", 1451 + MTK_EINT_FUNCTION(0, 118), 1452 + DRV_GRP4, 1453 + MTK_FUNCTION(0, "B_GPIO118"), 1454 + MTK_FUNCTION(1, "O_I2SO2_D1"), 1455 + MTK_FUNCTION(2, "I0_I2SIN_D1"), 1456 + MTK_FUNCTION(3, "I0_MCUPM_JTAG_TRSTN"), 1457 + MTK_FUNCTION(4, "I0_APU_JTAG_TRST"), 1458 + MTK_FUNCTION(5, "I0_SCP_JTAG1_TRSTN"), 1459 + MTK_FUNCTION(6, "I0_SPM_JTAG_TRSTN"), 1460 + MTK_FUNCTION(7, "B0_DBG_MON_B20") 1461 + ), 1462 + 1463 + MTK_PIN( 1464 + 119, "GPIO119", 1465 + MTK_EINT_FUNCTION(0, 119), 1466 + DRV_GRP4, 1467 + MTK_FUNCTION(0, "B_GPIO119"), 1468 + MTK_FUNCTION(1, "O_I2SO2_D2"), 1469 + MTK_FUNCTION(2, "I0_I2SIN_D2"), 1470 + MTK_FUNCTION(3, "O_UTXD3"), 1471 + MTK_FUNCTION(4, "B0_TDMIN_LRCK"), 1472 + MTK_FUNCTION(5, "O_I2SO1_MCK"), 1473 + MTK_FUNCTION(6, "O_SSPM_UTXD_AO"), 1474 + MTK_FUNCTION(7, "B0_DBG_MON_B21") 1475 + ), 1476 + 1477 + MTK_PIN( 1478 + 120, "GPIO120", 1479 + MTK_EINT_FUNCTION(0, 120), 1480 + DRV_GRP4, 1481 + MTK_FUNCTION(0, "B_GPIO120"), 1482 + MTK_FUNCTION(1, "O_I2SO2_D3"), 1483 + MTK_FUNCTION(2, "I0_I2SIN_D3"), 1484 + MTK_FUNCTION(3, "I1_URXD3"), 1485 + MTK_FUNCTION(4, "I0_TDMIN_DI"), 1486 + MTK_FUNCTION(5, "O_I2SO1_BCK"), 1487 + MTK_FUNCTION(6, "I1_SSPM_URXD_AO"), 1488 + MTK_FUNCTION(7, "B0_DBG_MON_B22") 1489 + ), 1490 + 1491 + MTK_PIN( 1492 + 121, "GPIO121", 1493 + MTK_EINT_FUNCTION(0, 121), 1494 + DRV_GRP4, 1495 + MTK_FUNCTION(0, "B_GPIO121"), 1496 + MTK_FUNCTION(1, "B0_PCM_CLK"), 1497 + MTK_FUNCTION(2, "O_SPIM4_CSB"), 1498 + MTK_FUNCTION(3, "O_SCP_SPI1_B_CS"), 1499 + MTK_FUNCTION(4, "O_TP_UTXD2_AO"), 1500 + MTK_FUNCTION(5, "O_AUXIF_ST0"), 1501 + MTK_FUNCTION(6, "O_PGD_DA_EFUSE_RDY"), 1502 + MTK_FUNCTION(7, "B0_DBG_MON_B23") 1503 + ), 1504 + 1505 + MTK_PIN( 1506 + 122, "GPIO122", 1507 + MTK_EINT_FUNCTION(0, 122), 1508 + DRV_GRP4, 1509 + MTK_FUNCTION(0, "B_GPIO122"), 1510 + MTK_FUNCTION(1, "B0_PCM_SYNC"), 1511 + MTK_FUNCTION(2, "O_SPIM4_CLK"), 1512 + MTK_FUNCTION(3, "O_SCP_SPI1_B_CK"), 1513 + MTK_FUNCTION(4, "I1_TP_URXD2_AO"), 1514 + MTK_FUNCTION(5, "O_AUXIF_CLK0"), 1515 + MTK_FUNCTION(6, "O_PGD_DA_EFUSE_RDY_PRE"), 1516 + MTK_FUNCTION(7, "B0_DBG_MON_B24") 1517 + ), 1518 + 1519 + MTK_PIN( 1520 + 123, "GPIO123", 1521 + MTK_EINT_FUNCTION(0, 123), 1522 + DRV_GRP4, 1523 + MTK_FUNCTION(0, "B_GPIO123"), 1524 + MTK_FUNCTION(1, "O_PCM_DO"), 1525 + MTK_FUNCTION(2, "B0_SPIM4_MOSI"), 1526 + MTK_FUNCTION(3, "O_SCP_SPI1_B_MO"), 1527 + MTK_FUNCTION(4, "O_TP_URTS2_AO"), 1528 + MTK_FUNCTION(5, "O_AUXIF_ST1"), 1529 + MTK_FUNCTION(6, "O_PGD_DA_PWRGD_RESET"), 1530 + MTK_FUNCTION(7, "B0_DBG_MON_B25") 1531 + ), 1532 + 1533 + MTK_PIN( 1534 + 124, "GPIO124", 1535 + MTK_EINT_FUNCTION(0, 124), 1536 + DRV_GRP4, 1537 + MTK_FUNCTION(0, "B_GPIO124"), 1538 + MTK_FUNCTION(1, "I0_PCM_DI"), 1539 + MTK_FUNCTION(2, "B0_SPIM4_MISO"), 1540 + MTK_FUNCTION(3, "I0_SCP_SPI1_B_MI"), 1541 + MTK_FUNCTION(4, "I1_TP_UCTS2_AO"), 1542 + MTK_FUNCTION(5, "O_AUXIF_CLK1"), 1543 + MTK_FUNCTION(6, "O_PGD_DA_PWRGD_ENB"), 1544 + MTK_FUNCTION(7, "B0_DBG_MON_B26") 1545 + ), 1546 + 1547 + MTK_PIN( 1548 + 125, "GPIO125", 1549 + MTK_EINT_FUNCTION(0, 125), 1550 + DRV_GRP4, 1551 + MTK_FUNCTION(0, "B_GPIO125"), 1552 + MTK_FUNCTION(1, "O_DMIC1_CLK"), 1553 + MTK_FUNCTION(2, "O_SPINOR_CK"), 1554 + MTK_FUNCTION(3, "B0_TDMIN_MCK"), 1555 + MTK_FUNCTION(6, "O_LVTS_FOUT"), 1556 + MTK_FUNCTION(7, "B0_DBG_MON_B27") 1557 + ), 1558 + 1559 + MTK_PIN( 1560 + 126, "GPIO126", 1561 + MTK_EINT_FUNCTION(0, 126), 1562 + DRV_GRP4, 1563 + MTK_FUNCTION(0, "B_GPIO126"), 1564 + MTK_FUNCTION(1, "I0_DMIC1_DAT"), 1565 + MTK_FUNCTION(2, "O_SPINOR_CS"), 1566 + MTK_FUNCTION(3, "B0_TDMIN_BCK"), 1567 + MTK_FUNCTION(6, "O_LVTS_SDO"), 1568 + MTK_FUNCTION(7, "B0_DBG_MON_B28") 1569 + ), 1570 + 1571 + MTK_PIN( 1572 + 127, "GPIO127", 1573 + MTK_EINT_FUNCTION(0, 127), 1574 + DRV_GRP4, 1575 + MTK_FUNCTION(0, "B_GPIO127"), 1576 + MTK_FUNCTION(1, "I0_DMIC1_DAT_R"), 1577 + MTK_FUNCTION(2, "B0_SPINOR_IO0"), 1578 + MTK_FUNCTION(3, "B0_TDMIN_LRCK"), 1579 + MTK_FUNCTION(6, "I0_LVTS_26M"), 1580 + MTK_FUNCTION(7, "B0_DBG_MON_B29") 1581 + ), 1582 + 1583 + MTK_PIN( 1584 + 128, "GPIO128", 1585 + MTK_EINT_FUNCTION(0, 128), 1586 + DRV_GRP4, 1587 + MTK_FUNCTION(0, "B_GPIO128"), 1588 + MTK_FUNCTION(1, "O_DMIC2_CLK"), 1589 + MTK_FUNCTION(2, "B0_SPINOR_IO1"), 1590 + MTK_FUNCTION(3, "I0_TDMIN_DI"), 1591 + MTK_FUNCTION(6, "I0_LVTS_SCF"), 1592 + MTK_FUNCTION(7, "B0_DBG_MON_B30") 1593 + ), 1594 + 1595 + MTK_PIN( 1596 + 129, "GPIO129", 1597 + MTK_EINT_FUNCTION(0, 129), 1598 + DRV_GRP4, 1599 + MTK_FUNCTION(0, "B_GPIO129"), 1600 + MTK_FUNCTION(1, "I0_DMIC2_DAT"), 1601 + MTK_FUNCTION(2, "B0_SPINOR_IO2"), 1602 + MTK_FUNCTION(3, "I0_SPDIF_IN1"), 1603 + MTK_FUNCTION(6, "I0_LVTS_SCK"), 1604 + MTK_FUNCTION(7, "B0_DBG_MON_B31") 1605 + ), 1606 + 1607 + MTK_PIN( 1608 + 130, "GPIO130", 1609 + MTK_EINT_FUNCTION(0, 130), 1610 + DRV_GRP4, 1611 + MTK_FUNCTION(0, "B_GPIO130"), 1612 + MTK_FUNCTION(1, "I0_DMIC2_DAT_R"), 1613 + MTK_FUNCTION(2, "B0_SPINOR_IO3"), 1614 + MTK_FUNCTION(3, "I0_SPDIF_IN2"), 1615 + MTK_FUNCTION(6, "I0_LVTS_SDI"), 1616 + MTK_FUNCTION(7, "B0_DBG_MON_B32") 1617 + ), 1618 + 1619 + MTK_PIN( 1620 + 131, "GPIO131", 1621 + MTK_EINT_FUNCTION(0, 131), 1622 + DRV_GRP4, 1623 + MTK_FUNCTION(0, "B_GPIO131"), 1624 + MTK_FUNCTION(1, "O_DPI_D0"), 1625 + MTK_FUNCTION(2, "O_GBE_TXD3"), 1626 + MTK_FUNCTION(3, "O_DMIC1_CLK"), 1627 + MTK_FUNCTION(4, "O_I2SO2_MCK"), 1628 + MTK_FUNCTION(5, "B0_TP_GPIO0_AO"), 1629 + MTK_FUNCTION(6, "O_SPIM5_CSB"), 1630 + MTK_FUNCTION(7, "O_PGD_LV_HSC_PWR0") 1631 + ), 1632 + 1633 + MTK_PIN( 1634 + 132, "GPIO132", 1635 + MTK_EINT_FUNCTION(0, 132), 1636 + DRV_GRP4, 1637 + MTK_FUNCTION(0, "B_GPIO132"), 1638 + MTK_FUNCTION(1, "O_DPI_D1"), 1639 + MTK_FUNCTION(2, "O_GBE_TXD2"), 1640 + MTK_FUNCTION(3, "I0_DMIC1_DAT"), 1641 + MTK_FUNCTION(4, "B0_I2SO2_BCK"), 1642 + MTK_FUNCTION(5, "B0_TP_GPIO1_AO"), 1643 + MTK_FUNCTION(6, "O_SPIM5_CLK"), 1644 + MTK_FUNCTION(7, "O_PGD_LV_HSC_PWR1") 1645 + ), 1646 + 1647 + MTK_PIN( 1648 + 133, "GPIO133", 1649 + MTK_EINT_FUNCTION(0, 133), 1650 + DRV_GRP4, 1651 + MTK_FUNCTION(0, "B_GPIO133"), 1652 + MTK_FUNCTION(1, "O_DPI_D2"), 1653 + MTK_FUNCTION(2, "O_GBE_TXD1"), 1654 + MTK_FUNCTION(3, "I0_DMIC1_DAT_R"), 1655 + MTK_FUNCTION(4, "B0_I2SO2_WS"), 1656 + MTK_FUNCTION(5, "B0_TP_GPIO2_AO"), 1657 + MTK_FUNCTION(6, "B0_SPIM5_MOSI"), 1658 + MTK_FUNCTION(7, "O_PGD_LV_HSC_PWR2") 1659 + ), 1660 + 1661 + MTK_PIN( 1662 + 134, "GPIO134", 1663 + MTK_EINT_FUNCTION(0, 134), 1664 + DRV_GRP4, 1665 + MTK_FUNCTION(0, "B_GPIO134"), 1666 + MTK_FUNCTION(1, "O_DPI_D3"), 1667 + MTK_FUNCTION(2, "O_GBE_TXD0"), 1668 + MTK_FUNCTION(3, "O_DMIC2_CLK"), 1669 + MTK_FUNCTION(4, "O_I2SO2_D0"), 1670 + MTK_FUNCTION(5, "B0_TP_GPIO3_AO"), 1671 + MTK_FUNCTION(6, "B0_SPIM5_MISO"), 1672 + MTK_FUNCTION(7, "O_PGD_LV_HSC_PWR3") 1673 + ), 1674 + 1675 + MTK_PIN( 1676 + 135, "GPIO135", 1677 + MTK_EINT_FUNCTION(0, 135), 1678 + DRV_GRP4, 1679 + MTK_FUNCTION(0, "B_GPIO135"), 1680 + MTK_FUNCTION(1, "O_DPI_D4"), 1681 + MTK_FUNCTION(2, "I0_GBE_RXD3"), 1682 + MTK_FUNCTION(3, "I0_DMIC2_DAT"), 1683 + MTK_FUNCTION(4, "O_I2SO2_D1"), 1684 + MTK_FUNCTION(5, "B0_TP_GPIO4_AO"), 1685 + MTK_FUNCTION(6, "I1_WAKEN"), 1686 + MTK_FUNCTION(7, "O_PGD_LV_HSC_PWR4") 1687 + ), 1688 + 1689 + MTK_PIN( 1690 + 136, "GPIO136", 1691 + MTK_EINT_FUNCTION(0, 136), 1692 + DRV_GRP4, 1693 + MTK_FUNCTION(0, "B_GPIO136"), 1694 + MTK_FUNCTION(1, "O_DPI_D5"), 1695 + MTK_FUNCTION(2, "I0_GBE_RXD2"), 1696 + MTK_FUNCTION(3, "I0_DMIC2_DAT_R"), 1697 + MTK_FUNCTION(4, "O_I2SO2_D2"), 1698 + MTK_FUNCTION(5, "B0_TP_GPIO5_AO"), 1699 + MTK_FUNCTION(6, "O_PERSTN"), 1700 + MTK_FUNCTION(7, "O_PGD_LV_HSC_PWR5") 1701 + ), 1702 + 1703 + MTK_PIN( 1704 + 137, "GPIO137", 1705 + MTK_EINT_FUNCTION(0, 137), 1706 + DRV_GRP4, 1707 + MTK_FUNCTION(0, "B_GPIO137"), 1708 + MTK_FUNCTION(1, "O_DPI_D6"), 1709 + MTK_FUNCTION(2, "I0_GBE_RXD1"), 1710 + MTK_FUNCTION(3, "O_DMIC3_CLK"), 1711 + MTK_FUNCTION(4, "O_I2SO2_D3"), 1712 + MTK_FUNCTION(5, "B0_TP_GPIO6_AO"), 1713 + MTK_FUNCTION(6, "B1_CLKREQN"), 1714 + MTK_FUNCTION(7, "O_PWM_0") 1715 + ), 1716 + 1717 + MTK_PIN( 1718 + 138, "GPIO138", 1719 + MTK_EINT_FUNCTION(0, 138), 1720 + DRV_GRP4, 1721 + MTK_FUNCTION(0, "B_GPIO138"), 1722 + MTK_FUNCTION(1, "O_DPI_D7"), 1723 + MTK_FUNCTION(2, "I0_GBE_RXD0"), 1724 + MTK_FUNCTION(3, "I0_DMIC3_DAT"), 1725 + MTK_FUNCTION(4, "O_CLKM2"), 1726 + MTK_FUNCTION(5, "B0_TP_GPIO7_AO"), 1727 + MTK_FUNCTION(7, "B0_MD32_0_GPIO0") 1728 + ), 1729 + 1730 + MTK_PIN( 1731 + 139, "GPIO139", 1732 + MTK_EINT_FUNCTION(0, 139), 1733 + DRV_GRP4, 1734 + MTK_FUNCTION(0, "B_GPIO139"), 1735 + MTK_FUNCTION(1, "O_DPI_D8"), 1736 + MTK_FUNCTION(2, "B0_GBE_TXC"), 1737 + MTK_FUNCTION(3, "I0_DMIC3_DAT_R"), 1738 + MTK_FUNCTION(4, "O_CLKM3"), 1739 + MTK_FUNCTION(5, "O_TP_UTXD2_AO"), 1740 + MTK_FUNCTION(6, "O_UTXD2"), 1741 + MTK_FUNCTION(7, "B0_MD32_0_GPIO1") 1742 + ), 1743 + 1744 + MTK_PIN( 1745 + 140, "GPIO140", 1746 + MTK_EINT_FUNCTION(0, 140), 1747 + DRV_GRP4, 1748 + MTK_FUNCTION(0, "B_GPIO140"), 1749 + MTK_FUNCTION(1, "O_DPI_D9"), 1750 + MTK_FUNCTION(2, "I0_GBE_RXC"), 1751 + MTK_FUNCTION(3, "O_DMIC4_CLK"), 1752 + MTK_FUNCTION(4, "O_PWM_2"), 1753 + MTK_FUNCTION(5, "I1_TP_URXD2_AO"), 1754 + MTK_FUNCTION(6, "I1_URXD2"), 1755 + MTK_FUNCTION(7, "B0_MD32_0_GPIO2") 1756 + ), 1757 + 1758 + MTK_PIN( 1759 + 141, "GPIO141", 1760 + MTK_EINT_FUNCTION(0, 141), 1761 + DRV_GRP4, 1762 + MTK_FUNCTION(0, "B_GPIO141"), 1763 + MTK_FUNCTION(1, "O_DPI_D10"), 1764 + MTK_FUNCTION(2, "I0_GBE_RXDV"), 1765 + MTK_FUNCTION(3, "I0_DMIC4_DAT"), 1766 + MTK_FUNCTION(4, "O_PWM_3"), 1767 + MTK_FUNCTION(5, "O_TP_URTS2_AO"), 1768 + MTK_FUNCTION(6, "O_URTS2"), 1769 + MTK_FUNCTION(7, "B0_MD32_1_GPIO0") 1770 + ), 1771 + 1772 + MTK_PIN( 1773 + 142, "GPIO142", 1774 + MTK_EINT_FUNCTION(0, 142), 1775 + DRV_GRP4, 1776 + MTK_FUNCTION(0, "B_GPIO142"), 1777 + MTK_FUNCTION(1, "O_DPI_D11"), 1778 + MTK_FUNCTION(2, "O_GBE_TXEN"), 1779 + MTK_FUNCTION(3, "I0_DMIC4_DAT_R"), 1780 + MTK_FUNCTION(4, "O_PWM_1"), 1781 + MTK_FUNCTION(5, "I1_TP_UCTS2_AO"), 1782 + MTK_FUNCTION(6, "I1_UCTS2"), 1783 + MTK_FUNCTION(7, "B0_MD32_1_GPIO1") 1784 + ), 1785 + 1786 + MTK_PIN( 1787 + 143, "GPIO143", 1788 + MTK_EINT_FUNCTION(0, 143), 1789 + DRV_GRP4, 1790 + MTK_FUNCTION(0, "B_GPIO143"), 1791 + MTK_FUNCTION(1, "O_DPI_D12"), 1792 + MTK_FUNCTION(2, "O_GBE_MDC"), 1793 + MTK_FUNCTION(3, "B0_MD32_0_GPIO0"), 1794 + MTK_FUNCTION(4, "O_CLKM0"), 1795 + MTK_FUNCTION(5, "O_SPIM3_CSB"), 1796 + MTK_FUNCTION(6, "O_UTXD1"), 1797 + MTK_FUNCTION(7, "B0_MD32_1_GPIO2") 1798 + ), 1799 + 1800 + MTK_PIN( 1801 + 144, "GPIO144", 1802 + MTK_EINT_FUNCTION(0, 144), 1803 + DRV_GRP4, 1804 + MTK_FUNCTION(0, "B_GPIO144"), 1805 + MTK_FUNCTION(1, "O_DPI_D13"), 1806 + MTK_FUNCTION(2, "B1_GBE_MDIO"), 1807 + MTK_FUNCTION(3, "B0_MD32_0_GPIO1"), 1808 + MTK_FUNCTION(4, "O_CLKM1"), 1809 + MTK_FUNCTION(5, "O_SPIM3_CLK"), 1810 + MTK_FUNCTION(6, "I1_URXD1"), 1811 + MTK_FUNCTION(7, "O_PGD_HV_HSC_PWR0") 1812 + ), 1813 + 1814 + MTK_PIN( 1815 + 145, "GPIO145", 1816 + MTK_EINT_FUNCTION(0, 145), 1817 + DRV_GRP4, 1818 + MTK_FUNCTION(0, "B_GPIO145"), 1819 + MTK_FUNCTION(1, "O_DPI_D14"), 1820 + MTK_FUNCTION(2, "O_GBE_TXER"), 1821 + MTK_FUNCTION(3, "B0_MD32_1_GPIO0"), 1822 + MTK_FUNCTION(4, "O_CMFLASH0"), 1823 + MTK_FUNCTION(5, "B0_SPIM3_MOSI"), 1824 + MTK_FUNCTION(6, "B0_GBE_AUX_PPS2"), 1825 + MTK_FUNCTION(7, "O_PGD_HV_HSC_PWR1") 1826 + ), 1827 + 1828 + MTK_PIN( 1829 + 146, "GPIO146", 1830 + MTK_EINT_FUNCTION(0, 146), 1831 + DRV_GRP4, 1832 + MTK_FUNCTION(0, "B_GPIO146"), 1833 + MTK_FUNCTION(1, "O_DPI_D15"), 1834 + MTK_FUNCTION(2, "I0_GBE_RXER"), 1835 + MTK_FUNCTION(3, "B0_MD32_1_GPIO1"), 1836 + MTK_FUNCTION(4, "O_CMFLASH1"), 1837 + MTK_FUNCTION(5, "B0_SPIM3_MISO"), 1838 + MTK_FUNCTION(6, "B0_GBE_AUX_PPS3"), 1839 + MTK_FUNCTION(7, "O_PGD_HV_HSC_PWR2") 1840 + ), 1841 + 1842 + MTK_PIN( 1843 + 147, "GPIO147", 1844 + MTK_EINT_FUNCTION(0, 147), 1845 + DRV_GRP4, 1846 + MTK_FUNCTION(0, "B_GPIO147"), 1847 + MTK_FUNCTION(1, "O_DPI_HSYNC"), 1848 + MTK_FUNCTION(2, "I0_GBE_COL"), 1849 + MTK_FUNCTION(3, "O_I2SO1_MCK"), 1850 + MTK_FUNCTION(4, "O_CMVREF0"), 1851 + MTK_FUNCTION(5, "O_SPDIF_OUT"), 1852 + MTK_FUNCTION(6, "O_URTS1"), 1853 + MTK_FUNCTION(7, "O_PGD_HV_HSC_PWR3") 1854 + ), 1855 + 1856 + MTK_PIN( 1857 + 148, "GPIO148", 1858 + MTK_EINT_FUNCTION(0, 148), 1859 + DRV_GRP4, 1860 + MTK_FUNCTION(0, "B_GPIO148"), 1861 + MTK_FUNCTION(1, "O_DPI_VSYNC"), 1862 + MTK_FUNCTION(2, "I0_GBE_INTR"), 1863 + MTK_FUNCTION(3, "O_I2SO1_BCK"), 1864 + MTK_FUNCTION(4, "O_CMVREF1"), 1865 + MTK_FUNCTION(5, "I0_SPDIF_IN0"), 1866 + MTK_FUNCTION(6, "I1_UCTS1"), 1867 + MTK_FUNCTION(7, "O_PGD_HV_HSC_PWR4") 1868 + ), 1869 + 1870 + MTK_PIN( 1871 + 149, "GPIO149", 1872 + MTK_EINT_FUNCTION(0, 149), 1873 + DRV_GRP4, 1874 + MTK_FUNCTION(0, "B_GPIO149"), 1875 + MTK_FUNCTION(1, "O_DPI_DE"), 1876 + MTK_FUNCTION(2, "B0_GBE_AUX_PPS0"), 1877 + MTK_FUNCTION(3, "O_I2SO1_WS"), 1878 + MTK_FUNCTION(4, "O_CMVREF2"), 1879 + MTK_FUNCTION(5, "I0_SPDIF_IN1"), 1880 + MTK_FUNCTION(6, "O_UTXD3"), 1881 + MTK_FUNCTION(7, "O_PGD_HV_HSC_PWR5") 1882 + ), 1883 + 1884 + MTK_PIN( 1885 + 150, "GPIO150", 1886 + MTK_EINT_FUNCTION(0, 150), 1887 + DRV_GRP4, 1888 + MTK_FUNCTION(0, "B_GPIO150"), 1889 + MTK_FUNCTION(1, "O_DPI_CK"), 1890 + MTK_FUNCTION(2, "B0_GBE_AUX_PPS1"), 1891 + MTK_FUNCTION(3, "O_I2SO1_D0"), 1892 + MTK_FUNCTION(4, "O_CMVREF3"), 1893 + MTK_FUNCTION(5, "I0_SPDIF_IN2"), 1894 + MTK_FUNCTION(6, "I1_URXD3") 1895 + ), 1896 + 1897 + MTK_PIN( 1898 + 151, "GPIO151", 1899 + MTK_EINT_FUNCTION(0, 151), 1900 + DRV_GRP4, 1901 + MTK_FUNCTION(0, "B_GPIO151"), 1902 + MTK_FUNCTION(1, "B1_MSDC0_DAT7") 1903 + ), 1904 + 1905 + MTK_PIN( 1906 + 152, "GPIO152", 1907 + MTK_EINT_FUNCTION(0, 152), 1908 + DRV_GRP4, 1909 + MTK_FUNCTION(0, "B_GPIO152"), 1910 + MTK_FUNCTION(1, "B1_MSDC0_DAT6") 1911 + ), 1912 + 1913 + MTK_PIN( 1914 + 153, "GPIO153", 1915 + MTK_EINT_FUNCTION(0, 153), 1916 + DRV_GRP4, 1917 + MTK_FUNCTION(0, "B_GPIO153"), 1918 + MTK_FUNCTION(1, "B1_MSDC0_DAT5") 1919 + ), 1920 + 1921 + MTK_PIN( 1922 + 154, "GPIO154", 1923 + MTK_EINT_FUNCTION(0, 154), 1924 + DRV_GRP4, 1925 + MTK_FUNCTION(0, "B_GPIO154"), 1926 + MTK_FUNCTION(1, "B1_MSDC0_DAT4") 1927 + ), 1928 + 1929 + MTK_PIN( 1930 + 155, "GPIO155", 1931 + MTK_EINT_FUNCTION(0, 155), 1932 + DRV_GRP4, 1933 + MTK_FUNCTION(0, "B_GPIO155"), 1934 + MTK_FUNCTION(1, "O_MSDC0_RSTB") 1935 + ), 1936 + 1937 + MTK_PIN( 1938 + 156, "GPIO156", 1939 + MTK_EINT_FUNCTION(0, 156), 1940 + DRV_GRP4, 1941 + MTK_FUNCTION(0, "B_GPIO156"), 1942 + MTK_FUNCTION(1, "B1_MSDC0_CMD") 1943 + ), 1944 + 1945 + MTK_PIN( 1946 + 157, "GPIO157", 1947 + MTK_EINT_FUNCTION(0, 157), 1948 + DRV_GRP4, 1949 + MTK_FUNCTION(0, "B_GPIO157"), 1950 + MTK_FUNCTION(1, "B1_MSDC0_CLK") 1951 + ), 1952 + 1953 + MTK_PIN( 1954 + 158, "GPIO158", 1955 + MTK_EINT_FUNCTION(0, 158), 1956 + DRV_GRP4, 1957 + MTK_FUNCTION(0, "B_GPIO158"), 1958 + MTK_FUNCTION(1, "B1_MSDC0_DAT3") 1959 + ), 1960 + 1961 + MTK_PIN( 1962 + 159, "GPIO159", 1963 + MTK_EINT_FUNCTION(0, 159), 1964 + DRV_GRP4, 1965 + MTK_FUNCTION(0, "B_GPIO159"), 1966 + MTK_FUNCTION(1, "B1_MSDC0_DAT2") 1967 + ), 1968 + 1969 + MTK_PIN( 1970 + 160, "GPIO160", 1971 + MTK_EINT_FUNCTION(0, 160), 1972 + DRV_GRP4, 1973 + MTK_FUNCTION(0, "B_GPIO160"), 1974 + MTK_FUNCTION(1, "B1_MSDC0_DAT1") 1975 + ), 1976 + 1977 + MTK_PIN( 1978 + 161, "GPIO161", 1979 + MTK_EINT_FUNCTION(0, 161), 1980 + DRV_GRP4, 1981 + MTK_FUNCTION(0, "B_GPIO161"), 1982 + MTK_FUNCTION(1, "B1_MSDC0_DAT0") 1983 + ), 1984 + 1985 + MTK_PIN( 1986 + 162, "GPIO162", 1987 + MTK_EINT_FUNCTION(0, 162), 1988 + DRV_GRP4, 1989 + MTK_FUNCTION(0, "B_GPIO162"), 1990 + MTK_FUNCTION(1, "B0_MSDC0_DSL") 1991 + ), 1992 + 1993 + MTK_PIN( 1994 + 163, "GPIO163", 1995 + MTK_EINT_FUNCTION(0, 163), 1996 + DRV_GRP4, 1997 + MTK_FUNCTION(0, "B_GPIO163"), 1998 + MTK_FUNCTION(1, "B1_MSDC1_CMD"), 1999 + MTK_FUNCTION(2, "O_SPDIF_OUT"), 2000 + MTK_FUNCTION(3, "I1_MD32_0_JTAG_TMS"), 2001 + MTK_FUNCTION(4, "I1_ADSP_JTAG0_TMS"), 2002 + MTK_FUNCTION(5, "I1_SCP_JTAG0_TMS"), 2003 + MTK_FUNCTION(6, "I1_CCU0_JTAG_TMS"), 2004 + MTK_FUNCTION(7, "I0_IPU_JTAG_TMS") 2005 + ), 2006 + 2007 + MTK_PIN( 2008 + 164, "GPIO164", 2009 + MTK_EINT_FUNCTION(0, 164), 2010 + DRV_GRP4, 2011 + MTK_FUNCTION(0, "B_GPIO164"), 2012 + MTK_FUNCTION(1, "B1_MSDC1_CLK"), 2013 + MTK_FUNCTION(2, "I0_SPDIF_IN0"), 2014 + MTK_FUNCTION(3, "I1_MD32_0_JTAG_TCK"), 2015 + MTK_FUNCTION(4, "I0_ADSP_JTAG0_TCK"), 2016 + MTK_FUNCTION(5, "I1_SCP_JTAG0_TCK"), 2017 + MTK_FUNCTION(6, "I1_CCU0_JTAG_TCK"), 2018 + MTK_FUNCTION(7, "I0_IPU_JTAG_TCK") 2019 + ), 2020 + 2021 + MTK_PIN( 2022 + 165, "GPIO165", 2023 + MTK_EINT_FUNCTION(0, 165), 2024 + DRV_GRP4, 2025 + MTK_FUNCTION(0, "B_GPIO165"), 2026 + MTK_FUNCTION(1, "B1_MSDC1_DAT0"), 2027 + MTK_FUNCTION(2, "I0_SPDIF_IN1"), 2028 + MTK_FUNCTION(3, "I1_MD32_0_JTAG_TDI"), 2029 + MTK_FUNCTION(4, "I1_ADSP_JTAG0_TDI"), 2030 + MTK_FUNCTION(5, "I1_SCP_JTAG0_TDI"), 2031 + MTK_FUNCTION(6, "I1_CCU0_JTAG_TDI"), 2032 + MTK_FUNCTION(7, "I0_IPU_JTAG_TDI") 2033 + ), 2034 + 2035 + MTK_PIN( 2036 + 166, "GPIO166", 2037 + MTK_EINT_FUNCTION(0, 166), 2038 + DRV_GRP4, 2039 + MTK_FUNCTION(0, "B_GPIO166"), 2040 + MTK_FUNCTION(1, "B1_MSDC1_DAT1"), 2041 + MTK_FUNCTION(2, "I0_SPDIF_IN2"), 2042 + MTK_FUNCTION(3, "O_MD32_0_JTAG_TDO"), 2043 + MTK_FUNCTION(4, "O_ADSP_JTAG0_TDO"), 2044 + MTK_FUNCTION(5, "O_SCP_JTAG0_TDO"), 2045 + MTK_FUNCTION(6, "O_CCU0_JTAG_TDO"), 2046 + MTK_FUNCTION(7, "O_IPU_JTAG_TDO") 2047 + ), 2048 + 2049 + MTK_PIN( 2050 + 167, "GPIO167", 2051 + MTK_EINT_FUNCTION(0, 167), 2052 + DRV_GRP4, 2053 + MTK_FUNCTION(0, "B_GPIO167"), 2054 + MTK_FUNCTION(1, "B1_MSDC1_DAT2"), 2055 + MTK_FUNCTION(2, "O_PWM_0"), 2056 + MTK_FUNCTION(3, "I1_MD32_0_JTAG_TRST"), 2057 + MTK_FUNCTION(4, "I1_ADSP_JTAG0_TRSTN"), 2058 + MTK_FUNCTION(5, "I0_SCP_JTAG0_TRSTN"), 2059 + MTK_FUNCTION(6, "I1_CCU0_JTAG_TRST"), 2060 + MTK_FUNCTION(7, "I0_IPU_JTAG_TRST") 2061 + ), 2062 + 2063 + MTK_PIN( 2064 + 168, "GPIO168", 2065 + MTK_EINT_FUNCTION(0, 168), 2066 + DRV_GRP4, 2067 + MTK_FUNCTION(0, "B_GPIO168"), 2068 + MTK_FUNCTION(1, "B1_MSDC1_DAT3"), 2069 + MTK_FUNCTION(2, "O_PWM_1"), 2070 + MTK_FUNCTION(3, "O_CLKM0") 2071 + ), 2072 + 2073 + MTK_PIN( 2074 + 169, "GPIO169", 2075 + MTK_EINT_FUNCTION(0, 169), 2076 + DRV_GRP4, 2077 + MTK_FUNCTION(0, "B_GPIO169"), 2078 + MTK_FUNCTION(1, "B1_MSDC2_CMD"), 2079 + MTK_FUNCTION(2, "O_LVTS_FOUT"), 2080 + MTK_FUNCTION(3, "I1_MD32_1_JTAG_TMS"), 2081 + MTK_FUNCTION(4, "I0_UDI_TMS"), 2082 + MTK_FUNCTION(5, "I0_VPU_UDI_TMS"), 2083 + MTK_FUNCTION(6, "B0_TDMIN_MCK"), 2084 + MTK_FUNCTION(7, "I1_SSPM_JTAG_TMS") 2085 + ), 2086 + 2087 + MTK_PIN( 2088 + 170, "GPIO170", 2089 + MTK_EINT_FUNCTION(0, 170), 2090 + DRV_GRP4, 2091 + MTK_FUNCTION(0, "B_GPIO170"), 2092 + MTK_FUNCTION(1, "B1_MSDC2_CLK"), 2093 + MTK_FUNCTION(2, "O_LVTS_SDO"), 2094 + MTK_FUNCTION(3, "I1_MD32_1_JTAG_TCK"), 2095 + MTK_FUNCTION(4, "I0_UDI_TCK"), 2096 + MTK_FUNCTION(5, "I0_VPU_UDI_TCK"), 2097 + MTK_FUNCTION(6, "B0_TDMIN_BCK"), 2098 + MTK_FUNCTION(7, "I1_SSPM_JTAG_TCK") 2099 + ), 2100 + 2101 + MTK_PIN( 2102 + 171, "GPIO171", 2103 + MTK_EINT_FUNCTION(0, 171), 2104 + DRV_GRP4, 2105 + MTK_FUNCTION(0, "B_GPIO171"), 2106 + MTK_FUNCTION(1, "B1_MSDC2_DAT0"), 2107 + MTK_FUNCTION(2, "I0_LVTS_26M"), 2108 + MTK_FUNCTION(3, "I1_MD32_1_JTAG_TDI"), 2109 + MTK_FUNCTION(4, "I0_UDI_TDI"), 2110 + MTK_FUNCTION(5, "I0_VPU_UDI_TDI"), 2111 + MTK_FUNCTION(6, "B0_TDMIN_LRCK"), 2112 + MTK_FUNCTION(7, "I1_SSPM_JTAG_TDI") 2113 + ), 2114 + 2115 + MTK_PIN( 2116 + 172, "GPIO172", 2117 + MTK_EINT_FUNCTION(0, 172), 2118 + DRV_GRP4, 2119 + MTK_FUNCTION(0, "B_GPIO172"), 2120 + MTK_FUNCTION(1, "B1_MSDC2_DAT1"), 2121 + MTK_FUNCTION(2, "I0_LVTS_SCF"), 2122 + MTK_FUNCTION(3, "O_MD32_1_JTAG_TDO"), 2123 + MTK_FUNCTION(4, "O_UDI_TDO"), 2124 + MTK_FUNCTION(5, "O_VPU_UDI_TDO"), 2125 + MTK_FUNCTION(6, "I0_TDMIN_DI"), 2126 + MTK_FUNCTION(7, "O_SSPM_JTAG_TDO") 2127 + ), 2128 + 2129 + MTK_PIN( 2130 + 173, "GPIO173", 2131 + MTK_EINT_FUNCTION(0, 173), 2132 + DRV_GRP4, 2133 + MTK_FUNCTION(0, "B_GPIO173"), 2134 + MTK_FUNCTION(1, "B1_MSDC2_DAT2"), 2135 + MTK_FUNCTION(2, "I0_LVTS_SCK"), 2136 + MTK_FUNCTION(3, "I1_MD32_1_JTAG_TRST"), 2137 + MTK_FUNCTION(4, "I0_UDI_NTRST"), 2138 + MTK_FUNCTION(5, "I0_VPU_UDI_NTRST"), 2139 + MTK_FUNCTION(7, "I0_SSPM_JTAG_TRSTN") 2140 + ), 2141 + 2142 + MTK_PIN( 2143 + 174, "GPIO174", 2144 + MTK_EINT_FUNCTION(0, 174), 2145 + DRV_GRP4, 2146 + MTK_FUNCTION(0, "B_GPIO174"), 2147 + MTK_FUNCTION(1, "B1_MSDC2_DAT3"), 2148 + MTK_FUNCTION(2, "I0_LVTS_SDI") 2149 + ), 2150 + 2151 + MTK_PIN( 2152 + 175, "GPIO175", 2153 + MTK_EINT_FUNCTION(0, 175), 2154 + DRV_GRP4, 2155 + MTK_FUNCTION(0, "B_GPIO175"), 2156 + MTK_FUNCTION(1, "B0_SPMI_M_SCL") 2157 + ), 2158 + 2159 + MTK_PIN( 2160 + 176, "GPIO176", 2161 + MTK_EINT_FUNCTION(0, 176), 2162 + DRV_GRP4, 2163 + MTK_FUNCTION(0, "B_GPIO176"), 2164 + MTK_FUNCTION(1, "B0_SPMI_M_SDA") 2165 + ), 2166 + 2167 + MTK_PIN( 2168 + 177, "GPIO177", 2169 + MTK_EINT_FUNCTION(0, 212), 2170 + DRV_FIXED, 2171 + MTK_FUNCTION(0, NULL) 2172 + ), 2173 + 2174 + MTK_PIN( 2175 + 178, "GPIO178", 2176 + MTK_EINT_FUNCTION(0, 213), 2177 + DRV_FIXED, 2178 + MTK_FUNCTION(0, NULL) 2179 + ), 2180 + 2181 + MTK_PIN( 2182 + 179, "GPIO179", 2183 + MTK_EINT_FUNCTION(0, 214), 2184 + DRV_FIXED, 2185 + MTK_FUNCTION(0, NULL) 2186 + ), 2187 + 2188 + MTK_PIN( 2189 + 180, "GPIO180", 2190 + MTK_EINT_FUNCTION(0, 215), 2191 + DRV_FIXED, 2192 + MTK_FUNCTION(0, NULL) 2193 + ), 2194 + 2195 + MTK_PIN( 2196 + 181, "GPIO181", 2197 + MTK_EINT_FUNCTION(0, 216), 2198 + DRV_FIXED, 2199 + MTK_FUNCTION(0, NULL) 2200 + ), 2201 + 2202 + MTK_PIN( 2203 + 182, "GPIO182", 2204 + MTK_EINT_FUNCTION(0, 217), 2205 + DRV_FIXED, 2206 + MTK_FUNCTION(0, NULL) 2207 + ), 2208 + 2209 + MTK_PIN( 2210 + 183, "GPIO183", 2211 + MTK_EINT_FUNCTION(0, 218), 2212 + DRV_FIXED, 2213 + MTK_FUNCTION(0, NULL) 2214 + ), 2215 + 2216 + MTK_PIN( 2217 + 184, "GPIO184", 2218 + MTK_EINT_FUNCTION(0, 219), 2219 + DRV_FIXED, 2220 + MTK_FUNCTION(0, NULL) 2221 + ), 2222 + 2223 + MTK_PIN( 2224 + 185, "GPIO185", 2225 + MTK_EINT_FUNCTION(0, 220), 2226 + DRV_FIXED, 2227 + MTK_FUNCTION(0, NULL) 2228 + ), 2229 + 2230 + MTK_PIN( 2231 + 186, "GPIO186", 2232 + MTK_EINT_FUNCTION(0, 221), 2233 + DRV_FIXED, 2234 + MTK_FUNCTION(0, NULL) 2235 + ), 2236 + 2237 + MTK_PIN( 2238 + 187, "GPIO187", 2239 + MTK_EINT_FUNCTION(0, 222), 2240 + DRV_FIXED, 2241 + MTK_FUNCTION(0, NULL) 2242 + ), 2243 + 2244 + MTK_PIN( 2245 + 188, "GPIO188", 2246 + MTK_EINT_FUNCTION(0, 223), 2247 + DRV_FIXED, 2248 + MTK_FUNCTION(0, NULL) 2249 + ), 2250 + 2251 + MTK_PIN( 2252 + 189, "GPIO189", 2253 + MTK_EINT_FUNCTION(0, 224), 2254 + DRV_FIXED, 2255 + MTK_FUNCTION(0, NULL) 2256 + ) 2257 + }; 2258 + 2259 + #endif /* __PINCTRL__MTK_MT8188_H */
+3 -4
drivers/pinctrl/meson/pinctrl-meson.c
··· 608 608 609 609 pc->chip.label = pc->data->name; 610 610 pc->chip.parent = pc->dev; 611 + pc->chip.fwnode = pc->fwnode; 611 612 pc->chip.request = gpiochip_generic_request; 612 613 pc->chip.free = gpiochip_generic_free; 613 614 pc->chip.set_config = gpiochip_generic_config; ··· 620 619 pc->chip.base = -1; 621 620 pc->chip.ngpio = pc->data->num_pins; 622 621 pc->chip.can_sleep = false; 623 - pc->chip.of_node = pc->of_node; 624 - pc->chip.of_gpio_n_cells = 2; 625 622 626 623 ret = gpiochip_add_data(&pc->chip, pc); 627 624 if (ret) { ··· 677 678 return -EINVAL; 678 679 } 679 680 680 - gpio_np = to_of_node(gpiochip_node_get_first(pc->dev)); 681 - pc->of_node = gpio_np; 681 + pc->fwnode = gpiochip_node_get_first(pc->dev); 682 + gpio_np = to_of_node(pc->fwnode); 682 683 683 684 pc->reg_mux = meson_map_resource(pc, gpio_np, "mux"); 684 685 if (IS_ERR_OR_NULL(pc->reg_mux)) {
+3 -1
drivers/pinctrl/meson/pinctrl-meson.h
··· 12 12 #include <linux/types.h> 13 13 #include <linux/module.h> 14 14 15 + struct fwnode_handle; 16 + 15 17 struct meson_pinctrl; 16 18 17 19 /** ··· 133 131 struct regmap *reg_gpio; 134 132 struct regmap *reg_ds; 135 133 struct gpio_chip chip; 136 - struct device_node *of_node; 134 + struct fwnode_handle *fwnode; 137 135 }; 138 136 139 137 #define FUNCTION(fn) \
+17 -9
drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
··· 112 112 struct armada_37xx_pm_state pm; 113 113 }; 114 114 115 - #define PIN_GRP(_name, _start, _nr, _mask, _func1, _func2) \ 115 + #define PIN_GRP_GPIO_0(_name, _start, _nr) \ 116 116 { \ 117 117 .name = _name, \ 118 118 .start_pin = _start, \ 119 119 .npins = _nr, \ 120 - .reg_mask = _mask, \ 121 - .val = {0, _mask}, \ 122 - .funcs = {_func1, _func2} \ 120 + .reg_mask = 0, \ 121 + .val = {0}, \ 122 + .funcs = {"gpio"} \ 123 123 } 124 124 125 125 #define PIN_GRP_GPIO(_name, _start, _nr, _mask, _func1) \ ··· 179 179 "pwm", "led"), 180 180 PIN_GRP_GPIO("pmic1", 7, 1, BIT(7), "pmic"), 181 181 PIN_GRP_GPIO("pmic0", 6, 1, BIT(8), "pmic"), 182 + PIN_GRP_GPIO_0("gpio1_5", 5, 1), 182 183 PIN_GRP_GPIO("i2c2", 2, 2, BIT(9), "i2c"), 183 184 PIN_GRP_GPIO("i2c1", 0, 2, BIT(10), "i2c"), 184 185 PIN_GRP_GPIO("spi_cs1", 17, 1, BIT(12), "spi"), ··· 196 195 static struct armada_37xx_pin_group armada_37xx_sb_groups[] = { 197 196 PIN_GRP_GPIO("usb32_drvvbus0", 0, 1, BIT(0), "drvbus"), 198 197 PIN_GRP_GPIO("usb2_drvvbus1", 1, 1, BIT(1), "drvbus"), 198 + PIN_GRP_GPIO_0("gpio2_2", 2, 1), 199 199 PIN_GRP_GPIO("sdio_sb", 24, 6, BIT(2), "sdio"), 200 200 PIN_GRP_GPIO("rgmii", 6, 12, BIT(3), "mii"), 201 201 PIN_GRP_GPIO("smi", 18, 2, BIT(4), "smi"), 202 202 PIN_GRP_GPIO("pcie1", 3, 1, BIT(5), "pcie"), /* this actually controls "pcie1_reset" */ 203 203 PIN_GRP_GPIO("pcie1_clkreq", 4, 1, BIT(9), "pcie"), 204 204 PIN_GRP_GPIO("pcie1_wakeup", 5, 1, BIT(10), "pcie"), 205 - PIN_GRP_GPIO("ptp", 20, 3, BIT(11) | BIT(12) | BIT(13), "ptp"), 206 - PIN_GRP("ptp_clk", 21, 1, BIT(6), "ptp", "mii"), 207 - PIN_GRP("ptp_trig", 22, 1, BIT(7), "ptp", "mii"), 205 + PIN_GRP_GPIO("ptp", 20, 1, BIT(11), "ptp"), 206 + PIN_GRP_GPIO_3("ptp_clk", 21, 1, BIT(6) | BIT(12), 0, BIT(6), BIT(12), 207 + "ptp", "mii"), 208 + PIN_GRP_GPIO_3("ptp_trig", 22, 1, BIT(7) | BIT(13), 0, BIT(7), BIT(13), 209 + "ptp", "mii"), 208 210 PIN_GRP_GPIO_3("mii_col", 23, 1, BIT(8) | BIT(14), 0, BIT(8), BIT(14), 209 211 "mii", "mii_err"), 210 212 }; ··· 490 486 struct armada_37xx_pinctrl *info = pinctrl_dev_get_drvdata(pctldev); 491 487 struct armada_37xx_pin_group *group; 492 488 int grp = 0; 489 + int ret; 493 490 494 491 dev_dbg(info->dev, "requesting gpio %d\n", offset); 495 492 496 - while ((group = armada_37xx_find_next_grp_by_pin(info, offset, &grp))) 497 - armada_37xx_pmx_set_by_name(pctldev, "gpio", group); 493 + while ((group = armada_37xx_find_next_grp_by_pin(info, offset, &grp))) { 494 + ret = armada_37xx_pmx_set_by_name(pctldev, "gpio", group); 495 + if (ret) 496 + return ret; 497 + } 498 498 499 499 return 0; 500 500 }
+146 -149
drivers/pinctrl/nomadik/pinctrl-nomadik-db8500.c
··· 674 674 DB8500_PIN_D21, DB8500_PIN_D20, DB8500_PIN_C20, DB8500_PIN_B21, 675 675 DB8500_PIN_C21, DB8500_PIN_A22, DB8500_PIN_B24, DB8500_PIN_C22 }; 676 676 677 - #define DB8500_PIN_GROUP(a, b) { .name = #a, .pins = a##_pins, \ 678 - .npins = ARRAY_SIZE(a##_pins), .altsetting = b } 679 - 680 677 static const struct nmk_pingroup nmk_db8500_groups[] = { 681 678 /* Altfunction A column */ 682 - DB8500_PIN_GROUP(u0_a_1, NMK_GPIO_ALT_A), 683 - DB8500_PIN_GROUP(u1rxtx_a_1, NMK_GPIO_ALT_A), 684 - DB8500_PIN_GROUP(u1ctsrts_a_1, NMK_GPIO_ALT_A), 685 - DB8500_PIN_GROUP(ipi2c_a_1, NMK_GPIO_ALT_A), 686 - DB8500_PIN_GROUP(ipi2c_a_2, NMK_GPIO_ALT_A), 687 - DB8500_PIN_GROUP(msp0txrx_a_1, NMK_GPIO_ALT_A), 688 - DB8500_PIN_GROUP(msp0tfstck_a_1, NMK_GPIO_ALT_A), 689 - DB8500_PIN_GROUP(msp0rfsrck_a_1, NMK_GPIO_ALT_A), 690 - DB8500_PIN_GROUP(mc0_a_1, NMK_GPIO_ALT_A), 691 - DB8500_PIN_GROUP(mc0_a_2, NMK_GPIO_ALT_A), 692 - DB8500_PIN_GROUP(mc0_dat47_a_1, NMK_GPIO_ALT_A), 693 - DB8500_PIN_GROUP(mc0dat31dir_a_1, NMK_GPIO_ALT_A), 694 - DB8500_PIN_GROUP(msp1txrx_a_1, NMK_GPIO_ALT_A), 695 - DB8500_PIN_GROUP(msp1_a_1, NMK_GPIO_ALT_A), 696 - DB8500_PIN_GROUP(lcdb_a_1, NMK_GPIO_ALT_A), 697 - DB8500_PIN_GROUP(lcdvsi0_a_1, NMK_GPIO_ALT_A), 698 - DB8500_PIN_GROUP(lcdvsi1_a_1, NMK_GPIO_ALT_A), 699 - DB8500_PIN_GROUP(lcd_d0_d7_a_1, NMK_GPIO_ALT_A), 700 - DB8500_PIN_GROUP(lcd_d8_d11_a_1, NMK_GPIO_ALT_A), 701 - DB8500_PIN_GROUP(lcd_d12_d15_a_1, NMK_GPIO_ALT_A), 702 - DB8500_PIN_GROUP(lcd_d12_d23_a_1, NMK_GPIO_ALT_A), 703 - DB8500_PIN_GROUP(kp_a_1, NMK_GPIO_ALT_A), 704 - DB8500_PIN_GROUP(kpskaskb_a_1, NMK_GPIO_ALT_A), 705 - DB8500_PIN_GROUP(mc2_a_1, NMK_GPIO_ALT_A), 706 - DB8500_PIN_GROUP(mc2_a_2, NMK_GPIO_ALT_A), 707 - DB8500_PIN_GROUP(ssp1_a_1, NMK_GPIO_ALT_A), 708 - DB8500_PIN_GROUP(ssp0_a_1, NMK_GPIO_ALT_A), 709 - DB8500_PIN_GROUP(i2c0_a_1, NMK_GPIO_ALT_A), 710 - DB8500_PIN_GROUP(ipgpio0_a_1, NMK_GPIO_ALT_A), 711 - DB8500_PIN_GROUP(ipgpio1_a_1, NMK_GPIO_ALT_A), 712 - DB8500_PIN_GROUP(modem_a_1, NMK_GPIO_ALT_A), 713 - DB8500_PIN_GROUP(kp_a_2, NMK_GPIO_ALT_A), 714 - DB8500_PIN_GROUP(msp2sck_a_1, NMK_GPIO_ALT_A), 715 - DB8500_PIN_GROUP(msp2_a_1, NMK_GPIO_ALT_A), 716 - DB8500_PIN_GROUP(mc4_a_1, NMK_GPIO_ALT_A), 717 - DB8500_PIN_GROUP(mc1_a_1, NMK_GPIO_ALT_A), 718 - DB8500_PIN_GROUP(mc1_a_2, NMK_GPIO_ALT_A), 719 - DB8500_PIN_GROUP(mc1dir_a_1, NMK_GPIO_ALT_A), 720 - DB8500_PIN_GROUP(hsir_a_1, NMK_GPIO_ALT_A), 721 - DB8500_PIN_GROUP(hsit_a_1, NMK_GPIO_ALT_A), 722 - DB8500_PIN_GROUP(hsit_a_2, NMK_GPIO_ALT_A), 723 - DB8500_PIN_GROUP(clkout1_a_1, NMK_GPIO_ALT_A), 724 - DB8500_PIN_GROUP(clkout1_a_2, NMK_GPIO_ALT_A), 725 - DB8500_PIN_GROUP(clkout2_a_1, NMK_GPIO_ALT_A), 726 - DB8500_PIN_GROUP(clkout2_a_2, NMK_GPIO_ALT_A), 727 - DB8500_PIN_GROUP(usb_a_1, NMK_GPIO_ALT_A), 679 + NMK_PIN_GROUP(u0_a_1, NMK_GPIO_ALT_A), 680 + NMK_PIN_GROUP(u1rxtx_a_1, NMK_GPIO_ALT_A), 681 + NMK_PIN_GROUP(u1ctsrts_a_1, NMK_GPIO_ALT_A), 682 + NMK_PIN_GROUP(ipi2c_a_1, NMK_GPIO_ALT_A), 683 + NMK_PIN_GROUP(ipi2c_a_2, NMK_GPIO_ALT_A), 684 + NMK_PIN_GROUP(msp0txrx_a_1, NMK_GPIO_ALT_A), 685 + NMK_PIN_GROUP(msp0tfstck_a_1, NMK_GPIO_ALT_A), 686 + NMK_PIN_GROUP(msp0rfsrck_a_1, NMK_GPIO_ALT_A), 687 + NMK_PIN_GROUP(mc0_a_1, NMK_GPIO_ALT_A), 688 + NMK_PIN_GROUP(mc0_a_2, NMK_GPIO_ALT_A), 689 + NMK_PIN_GROUP(mc0_dat47_a_1, NMK_GPIO_ALT_A), 690 + NMK_PIN_GROUP(mc0dat31dir_a_1, NMK_GPIO_ALT_A), 691 + NMK_PIN_GROUP(msp1txrx_a_1, NMK_GPIO_ALT_A), 692 + NMK_PIN_GROUP(msp1_a_1, NMK_GPIO_ALT_A), 693 + NMK_PIN_GROUP(lcdb_a_1, NMK_GPIO_ALT_A), 694 + NMK_PIN_GROUP(lcdvsi0_a_1, NMK_GPIO_ALT_A), 695 + NMK_PIN_GROUP(lcdvsi1_a_1, NMK_GPIO_ALT_A), 696 + NMK_PIN_GROUP(lcd_d0_d7_a_1, NMK_GPIO_ALT_A), 697 + NMK_PIN_GROUP(lcd_d8_d11_a_1, NMK_GPIO_ALT_A), 698 + NMK_PIN_GROUP(lcd_d12_d15_a_1, NMK_GPIO_ALT_A), 699 + NMK_PIN_GROUP(lcd_d12_d23_a_1, NMK_GPIO_ALT_A), 700 + NMK_PIN_GROUP(kp_a_1, NMK_GPIO_ALT_A), 701 + NMK_PIN_GROUP(kpskaskb_a_1, NMK_GPIO_ALT_A), 702 + NMK_PIN_GROUP(mc2_a_1, NMK_GPIO_ALT_A), 703 + NMK_PIN_GROUP(mc2_a_2, NMK_GPIO_ALT_A), 704 + NMK_PIN_GROUP(ssp1_a_1, NMK_GPIO_ALT_A), 705 + NMK_PIN_GROUP(ssp0_a_1, NMK_GPIO_ALT_A), 706 + NMK_PIN_GROUP(i2c0_a_1, NMK_GPIO_ALT_A), 707 + NMK_PIN_GROUP(ipgpio0_a_1, NMK_GPIO_ALT_A), 708 + NMK_PIN_GROUP(ipgpio1_a_1, NMK_GPIO_ALT_A), 709 + NMK_PIN_GROUP(modem_a_1, NMK_GPIO_ALT_A), 710 + NMK_PIN_GROUP(kp_a_2, NMK_GPIO_ALT_A), 711 + NMK_PIN_GROUP(msp2sck_a_1, NMK_GPIO_ALT_A), 712 + NMK_PIN_GROUP(msp2_a_1, NMK_GPIO_ALT_A), 713 + NMK_PIN_GROUP(mc4_a_1, NMK_GPIO_ALT_A), 714 + NMK_PIN_GROUP(mc1_a_1, NMK_GPIO_ALT_A), 715 + NMK_PIN_GROUP(mc1_a_2, NMK_GPIO_ALT_A), 716 + NMK_PIN_GROUP(mc1dir_a_1, NMK_GPIO_ALT_A), 717 + NMK_PIN_GROUP(hsir_a_1, NMK_GPIO_ALT_A), 718 + NMK_PIN_GROUP(hsit_a_1, NMK_GPIO_ALT_A), 719 + NMK_PIN_GROUP(hsit_a_2, NMK_GPIO_ALT_A), 720 + NMK_PIN_GROUP(clkout1_a_1, NMK_GPIO_ALT_A), 721 + NMK_PIN_GROUP(clkout1_a_2, NMK_GPIO_ALT_A), 722 + NMK_PIN_GROUP(clkout2_a_1, NMK_GPIO_ALT_A), 723 + NMK_PIN_GROUP(clkout2_a_2, NMK_GPIO_ALT_A), 724 + NMK_PIN_GROUP(usb_a_1, NMK_GPIO_ALT_A), 728 725 /* Altfunction B column */ 729 - DB8500_PIN_GROUP(trig_b_1, NMK_GPIO_ALT_B), 730 - DB8500_PIN_GROUP(i2c4_b_1, NMK_GPIO_ALT_B), 731 - DB8500_PIN_GROUP(i2c1_b_1, NMK_GPIO_ALT_B), 732 - DB8500_PIN_GROUP(i2c2_b_1, NMK_GPIO_ALT_B), 733 - DB8500_PIN_GROUP(i2c2_b_2, NMK_GPIO_ALT_B), 734 - DB8500_PIN_GROUP(msp0txrx_b_1, NMK_GPIO_ALT_B), 735 - DB8500_PIN_GROUP(i2c1_b_2, NMK_GPIO_ALT_B), 736 - DB8500_PIN_GROUP(u2rxtx_b_1, NMK_GPIO_ALT_B), 737 - DB8500_PIN_GROUP(uartmodtx_b_1, NMK_GPIO_ALT_B), 738 - DB8500_PIN_GROUP(msp0sck_b_1, NMK_GPIO_ALT_B), 739 - DB8500_PIN_GROUP(uartmodrx_b_1, NMK_GPIO_ALT_B), 740 - DB8500_PIN_GROUP(stmmod_b_1, NMK_GPIO_ALT_B), 741 - DB8500_PIN_GROUP(uartmodrx_b_2, NMK_GPIO_ALT_B), 742 - DB8500_PIN_GROUP(spi3_b_1, NMK_GPIO_ALT_B), 743 - DB8500_PIN_GROUP(msp1txrx_b_1, NMK_GPIO_ALT_B), 744 - DB8500_PIN_GROUP(kp_b_1, NMK_GPIO_ALT_B), 745 - DB8500_PIN_GROUP(kp_b_2, NMK_GPIO_ALT_B), 746 - DB8500_PIN_GROUP(sm_b_1, NMK_GPIO_ALT_B), 747 - DB8500_PIN_GROUP(smcs0_b_1, NMK_GPIO_ALT_B), 748 - DB8500_PIN_GROUP(smcs1_b_1, NMK_GPIO_ALT_B), 749 - DB8500_PIN_GROUP(ipgpio7_b_1, NMK_GPIO_ALT_B), 750 - DB8500_PIN_GROUP(ipgpio2_b_1, NMK_GPIO_ALT_B), 751 - DB8500_PIN_GROUP(ipgpio3_b_1, NMK_GPIO_ALT_B), 752 - DB8500_PIN_GROUP(lcdaclk_b_1, NMK_GPIO_ALT_B), 753 - DB8500_PIN_GROUP(lcda_b_1, NMK_GPIO_ALT_B), 754 - DB8500_PIN_GROUP(lcd_b_1, NMK_GPIO_ALT_B), 755 - DB8500_PIN_GROUP(lcd_d16_d23_b_1, NMK_GPIO_ALT_B), 756 - DB8500_PIN_GROUP(ddrtrig_b_1, NMK_GPIO_ALT_B), 757 - DB8500_PIN_GROUP(pwl_b_1, NMK_GPIO_ALT_B), 758 - DB8500_PIN_GROUP(spi1_b_1, NMK_GPIO_ALT_B), 759 - DB8500_PIN_GROUP(mc3_b_1, NMK_GPIO_ALT_B), 760 - DB8500_PIN_GROUP(pwl_b_2, NMK_GPIO_ALT_B), 761 - DB8500_PIN_GROUP(pwl_b_3, NMK_GPIO_ALT_B), 762 - DB8500_PIN_GROUP(pwl_b_4, NMK_GPIO_ALT_B), 726 + NMK_PIN_GROUP(trig_b_1, NMK_GPIO_ALT_B), 727 + NMK_PIN_GROUP(i2c4_b_1, NMK_GPIO_ALT_B), 728 + NMK_PIN_GROUP(i2c1_b_1, NMK_GPIO_ALT_B), 729 + NMK_PIN_GROUP(i2c2_b_1, NMK_GPIO_ALT_B), 730 + NMK_PIN_GROUP(i2c2_b_2, NMK_GPIO_ALT_B), 731 + NMK_PIN_GROUP(msp0txrx_b_1, NMK_GPIO_ALT_B), 732 + NMK_PIN_GROUP(i2c1_b_2, NMK_GPIO_ALT_B), 733 + NMK_PIN_GROUP(u2rxtx_b_1, NMK_GPIO_ALT_B), 734 + NMK_PIN_GROUP(uartmodtx_b_1, NMK_GPIO_ALT_B), 735 + NMK_PIN_GROUP(msp0sck_b_1, NMK_GPIO_ALT_B), 736 + NMK_PIN_GROUP(uartmodrx_b_1, NMK_GPIO_ALT_B), 737 + NMK_PIN_GROUP(stmmod_b_1, NMK_GPIO_ALT_B), 738 + NMK_PIN_GROUP(uartmodrx_b_2, NMK_GPIO_ALT_B), 739 + NMK_PIN_GROUP(spi3_b_1, NMK_GPIO_ALT_B), 740 + NMK_PIN_GROUP(msp1txrx_b_1, NMK_GPIO_ALT_B), 741 + NMK_PIN_GROUP(kp_b_1, NMK_GPIO_ALT_B), 742 + NMK_PIN_GROUP(kp_b_2, NMK_GPIO_ALT_B), 743 + NMK_PIN_GROUP(sm_b_1, NMK_GPIO_ALT_B), 744 + NMK_PIN_GROUP(smcs0_b_1, NMK_GPIO_ALT_B), 745 + NMK_PIN_GROUP(smcs1_b_1, NMK_GPIO_ALT_B), 746 + NMK_PIN_GROUP(ipgpio7_b_1, NMK_GPIO_ALT_B), 747 + NMK_PIN_GROUP(ipgpio2_b_1, NMK_GPIO_ALT_B), 748 + NMK_PIN_GROUP(ipgpio3_b_1, NMK_GPIO_ALT_B), 749 + NMK_PIN_GROUP(lcdaclk_b_1, NMK_GPIO_ALT_B), 750 + NMK_PIN_GROUP(lcda_b_1, NMK_GPIO_ALT_B), 751 + NMK_PIN_GROUP(lcd_b_1, NMK_GPIO_ALT_B), 752 + NMK_PIN_GROUP(lcd_d16_d23_b_1, NMK_GPIO_ALT_B), 753 + NMK_PIN_GROUP(ddrtrig_b_1, NMK_GPIO_ALT_B), 754 + NMK_PIN_GROUP(pwl_b_1, NMK_GPIO_ALT_B), 755 + NMK_PIN_GROUP(spi1_b_1, NMK_GPIO_ALT_B), 756 + NMK_PIN_GROUP(mc3_b_1, NMK_GPIO_ALT_B), 757 + NMK_PIN_GROUP(pwl_b_2, NMK_GPIO_ALT_B), 758 + NMK_PIN_GROUP(pwl_b_3, NMK_GPIO_ALT_B), 759 + NMK_PIN_GROUP(pwl_b_4, NMK_GPIO_ALT_B), 763 760 /* Altfunction C column */ 764 - DB8500_PIN_GROUP(ipjtag_c_1, NMK_GPIO_ALT_C), 765 - DB8500_PIN_GROUP(ipgpio6_c_1, NMK_GPIO_ALT_C), 766 - DB8500_PIN_GROUP(ipgpio0_c_1, NMK_GPIO_ALT_C), 767 - DB8500_PIN_GROUP(ipgpio1_c_1, NMK_GPIO_ALT_C), 768 - DB8500_PIN_GROUP(ipgpio3_c_1, NMK_GPIO_ALT_C), 769 - DB8500_PIN_GROUP(ipgpio2_c_1, NMK_GPIO_ALT_C), 770 - DB8500_PIN_GROUP(slim0_c_1, NMK_GPIO_ALT_C), 771 - DB8500_PIN_GROUP(ms_c_1, NMK_GPIO_ALT_C), 772 - DB8500_PIN_GROUP(iptrigout_c_1, NMK_GPIO_ALT_C), 773 - DB8500_PIN_GROUP(u2rxtx_c_1, NMK_GPIO_ALT_C), 774 - DB8500_PIN_GROUP(u2ctsrts_c_1, NMK_GPIO_ALT_C), 775 - DB8500_PIN_GROUP(u0_c_1, NMK_GPIO_ALT_C), 776 - DB8500_PIN_GROUP(ipgpio4_c_1, NMK_GPIO_ALT_C), 777 - DB8500_PIN_GROUP(ipgpio5_c_1, NMK_GPIO_ALT_C), 778 - DB8500_PIN_GROUP(ipgpio6_c_2, NMK_GPIO_ALT_C), 779 - DB8500_PIN_GROUP(ipgpio7_c_1, NMK_GPIO_ALT_C), 780 - DB8500_PIN_GROUP(smcleale_c_1, NMK_GPIO_ALT_C), 781 - DB8500_PIN_GROUP(stmape_c_1, NMK_GPIO_ALT_C), 782 - DB8500_PIN_GROUP(u2rxtx_c_2, NMK_GPIO_ALT_C), 783 - DB8500_PIN_GROUP(ipgpio2_c_2, NMK_GPIO_ALT_C), 784 - DB8500_PIN_GROUP(ipgpio3_c_2, NMK_GPIO_ALT_C), 785 - DB8500_PIN_GROUP(ipgpio4_c_2, NMK_GPIO_ALT_C), 786 - DB8500_PIN_GROUP(ipgpio5_c_2, NMK_GPIO_ALT_C), 787 - DB8500_PIN_GROUP(mc5_c_1, NMK_GPIO_ALT_C), 788 - DB8500_PIN_GROUP(mc2rstn_c_1, NMK_GPIO_ALT_C), 789 - DB8500_PIN_GROUP(kp_c_1, NMK_GPIO_ALT_C), 790 - DB8500_PIN_GROUP(smps0_c_1, NMK_GPIO_ALT_C), 791 - DB8500_PIN_GROUP(smps1_c_1, NMK_GPIO_ALT_C), 792 - DB8500_PIN_GROUP(u2rxtx_c_3, NMK_GPIO_ALT_C), 793 - DB8500_PIN_GROUP(stmape_c_2, NMK_GPIO_ALT_C), 794 - DB8500_PIN_GROUP(uartmodrx_c_1, NMK_GPIO_ALT_C), 795 - DB8500_PIN_GROUP(uartmodtx_c_1, NMK_GPIO_ALT_C), 796 - DB8500_PIN_GROUP(stmmod_c_1, NMK_GPIO_ALT_C), 797 - DB8500_PIN_GROUP(usbsim_c_1, NMK_GPIO_ALT_C), 798 - DB8500_PIN_GROUP(mc4rstn_c_1, NMK_GPIO_ALT_C), 799 - DB8500_PIN_GROUP(clkout1_c_1, NMK_GPIO_ALT_C), 800 - DB8500_PIN_GROUP(clkout2_c_1, NMK_GPIO_ALT_C), 801 - DB8500_PIN_GROUP(i2c3_c_1, NMK_GPIO_ALT_C), 802 - DB8500_PIN_GROUP(spi0_c_1, NMK_GPIO_ALT_C), 803 - DB8500_PIN_GROUP(usbsim_c_2, NMK_GPIO_ALT_C), 804 - DB8500_PIN_GROUP(i2c3_c_2, NMK_GPIO_ALT_C), 761 + NMK_PIN_GROUP(ipjtag_c_1, NMK_GPIO_ALT_C), 762 + NMK_PIN_GROUP(ipgpio6_c_1, NMK_GPIO_ALT_C), 763 + NMK_PIN_GROUP(ipgpio0_c_1, NMK_GPIO_ALT_C), 764 + NMK_PIN_GROUP(ipgpio1_c_1, NMK_GPIO_ALT_C), 765 + NMK_PIN_GROUP(ipgpio3_c_1, NMK_GPIO_ALT_C), 766 + NMK_PIN_GROUP(ipgpio2_c_1, NMK_GPIO_ALT_C), 767 + NMK_PIN_GROUP(slim0_c_1, NMK_GPIO_ALT_C), 768 + NMK_PIN_GROUP(ms_c_1, NMK_GPIO_ALT_C), 769 + NMK_PIN_GROUP(iptrigout_c_1, NMK_GPIO_ALT_C), 770 + NMK_PIN_GROUP(u2rxtx_c_1, NMK_GPIO_ALT_C), 771 + NMK_PIN_GROUP(u2ctsrts_c_1, NMK_GPIO_ALT_C), 772 + NMK_PIN_GROUP(u0_c_1, NMK_GPIO_ALT_C), 773 + NMK_PIN_GROUP(ipgpio4_c_1, NMK_GPIO_ALT_C), 774 + NMK_PIN_GROUP(ipgpio5_c_1, NMK_GPIO_ALT_C), 775 + NMK_PIN_GROUP(ipgpio6_c_2, NMK_GPIO_ALT_C), 776 + NMK_PIN_GROUP(ipgpio7_c_1, NMK_GPIO_ALT_C), 777 + NMK_PIN_GROUP(smcleale_c_1, NMK_GPIO_ALT_C), 778 + NMK_PIN_GROUP(stmape_c_1, NMK_GPIO_ALT_C), 779 + NMK_PIN_GROUP(u2rxtx_c_2, NMK_GPIO_ALT_C), 780 + NMK_PIN_GROUP(ipgpio2_c_2, NMK_GPIO_ALT_C), 781 + NMK_PIN_GROUP(ipgpio3_c_2, NMK_GPIO_ALT_C), 782 + NMK_PIN_GROUP(ipgpio4_c_2, NMK_GPIO_ALT_C), 783 + NMK_PIN_GROUP(ipgpio5_c_2, NMK_GPIO_ALT_C), 784 + NMK_PIN_GROUP(mc5_c_1, NMK_GPIO_ALT_C), 785 + NMK_PIN_GROUP(mc2rstn_c_1, NMK_GPIO_ALT_C), 786 + NMK_PIN_GROUP(kp_c_1, NMK_GPIO_ALT_C), 787 + NMK_PIN_GROUP(smps0_c_1, NMK_GPIO_ALT_C), 788 + NMK_PIN_GROUP(smps1_c_1, NMK_GPIO_ALT_C), 789 + NMK_PIN_GROUP(u2rxtx_c_3, NMK_GPIO_ALT_C), 790 + NMK_PIN_GROUP(stmape_c_2, NMK_GPIO_ALT_C), 791 + NMK_PIN_GROUP(uartmodrx_c_1, NMK_GPIO_ALT_C), 792 + NMK_PIN_GROUP(uartmodtx_c_1, NMK_GPIO_ALT_C), 793 + NMK_PIN_GROUP(stmmod_c_1, NMK_GPIO_ALT_C), 794 + NMK_PIN_GROUP(usbsim_c_1, NMK_GPIO_ALT_C), 795 + NMK_PIN_GROUP(mc4rstn_c_1, NMK_GPIO_ALT_C), 796 + NMK_PIN_GROUP(clkout1_c_1, NMK_GPIO_ALT_C), 797 + NMK_PIN_GROUP(clkout2_c_1, NMK_GPIO_ALT_C), 798 + NMK_PIN_GROUP(i2c3_c_1, NMK_GPIO_ALT_C), 799 + NMK_PIN_GROUP(spi0_c_1, NMK_GPIO_ALT_C), 800 + NMK_PIN_GROUP(usbsim_c_2, NMK_GPIO_ALT_C), 801 + NMK_PIN_GROUP(i2c3_c_2, NMK_GPIO_ALT_C), 805 802 /* Other alt C1 column */ 806 - DB8500_PIN_GROUP(u2rx_oc1_1, NMK_GPIO_ALT_C1), 807 - DB8500_PIN_GROUP(stmape_oc1_1, NMK_GPIO_ALT_C1), 808 - DB8500_PIN_GROUP(remap0_oc1_1, NMK_GPIO_ALT_C1), 809 - DB8500_PIN_GROUP(remap1_oc1_1, NMK_GPIO_ALT_C1), 810 - DB8500_PIN_GROUP(ptma9_oc1_1, NMK_GPIO_ALT_C1), 811 - DB8500_PIN_GROUP(kp_oc1_1, NMK_GPIO_ALT_C1), 812 - DB8500_PIN_GROUP(rf_oc1_1, NMK_GPIO_ALT_C1), 813 - DB8500_PIN_GROUP(hxclk_oc1_1, NMK_GPIO_ALT_C1), 814 - DB8500_PIN_GROUP(uartmodrx_oc1_1, NMK_GPIO_ALT_C1), 815 - DB8500_PIN_GROUP(uartmodtx_oc1_1, NMK_GPIO_ALT_C1), 816 - DB8500_PIN_GROUP(stmmod_oc1_1, NMK_GPIO_ALT_C1), 817 - DB8500_PIN_GROUP(hxgpio_oc1_1, NMK_GPIO_ALT_C1), 818 - DB8500_PIN_GROUP(rf_oc1_2, NMK_GPIO_ALT_C1), 819 - DB8500_PIN_GROUP(spi2_oc1_1, NMK_GPIO_ALT_C1), 820 - DB8500_PIN_GROUP(spi2_oc1_2, NMK_GPIO_ALT_C1), 803 + NMK_PIN_GROUP(u2rx_oc1_1, NMK_GPIO_ALT_C1), 804 + NMK_PIN_GROUP(stmape_oc1_1, NMK_GPIO_ALT_C1), 805 + NMK_PIN_GROUP(remap0_oc1_1, NMK_GPIO_ALT_C1), 806 + NMK_PIN_GROUP(remap1_oc1_1, NMK_GPIO_ALT_C1), 807 + NMK_PIN_GROUP(ptma9_oc1_1, NMK_GPIO_ALT_C1), 808 + NMK_PIN_GROUP(kp_oc1_1, NMK_GPIO_ALT_C1), 809 + NMK_PIN_GROUP(rf_oc1_1, NMK_GPIO_ALT_C1), 810 + NMK_PIN_GROUP(hxclk_oc1_1, NMK_GPIO_ALT_C1), 811 + NMK_PIN_GROUP(uartmodrx_oc1_1, NMK_GPIO_ALT_C1), 812 + NMK_PIN_GROUP(uartmodtx_oc1_1, NMK_GPIO_ALT_C1), 813 + NMK_PIN_GROUP(stmmod_oc1_1, NMK_GPIO_ALT_C1), 814 + NMK_PIN_GROUP(hxgpio_oc1_1, NMK_GPIO_ALT_C1), 815 + NMK_PIN_GROUP(rf_oc1_2, NMK_GPIO_ALT_C1), 816 + NMK_PIN_GROUP(spi2_oc1_1, NMK_GPIO_ALT_C1), 817 + NMK_PIN_GROUP(spi2_oc1_2, NMK_GPIO_ALT_C1), 821 818 /* Other alt C2 column */ 822 - DB8500_PIN_GROUP(sbag_oc2_1, NMK_GPIO_ALT_C2), 823 - DB8500_PIN_GROUP(etmr4_oc2_1, NMK_GPIO_ALT_C2), 824 - DB8500_PIN_GROUP(ptma9_oc2_1, NMK_GPIO_ALT_C2), 819 + NMK_PIN_GROUP(sbag_oc2_1, NMK_GPIO_ALT_C2), 820 + NMK_PIN_GROUP(etmr4_oc2_1, NMK_GPIO_ALT_C2), 821 + NMK_PIN_GROUP(ptma9_oc2_1, NMK_GPIO_ALT_C2), 825 822 /* Other alt C3 column */ 826 - DB8500_PIN_GROUP(stmmod_oc3_1, NMK_GPIO_ALT_C3), 827 - DB8500_PIN_GROUP(stmmod_oc3_2, NMK_GPIO_ALT_C3), 828 - DB8500_PIN_GROUP(uartmodrx_oc3_1, NMK_GPIO_ALT_C3), 829 - DB8500_PIN_GROUP(uartmodtx_oc3_1, NMK_GPIO_ALT_C3), 830 - DB8500_PIN_GROUP(etmr4_oc3_1, NMK_GPIO_ALT_C3), 823 + NMK_PIN_GROUP(stmmod_oc3_1, NMK_GPIO_ALT_C3), 824 + NMK_PIN_GROUP(stmmod_oc3_2, NMK_GPIO_ALT_C3), 825 + NMK_PIN_GROUP(uartmodrx_oc3_1, NMK_GPIO_ALT_C3), 826 + NMK_PIN_GROUP(uartmodtx_oc3_1, NMK_GPIO_ALT_C3), 827 + NMK_PIN_GROUP(etmr4_oc3_1, NMK_GPIO_ALT_C3), 831 828 /* Other alt C4 column */ 832 - DB8500_PIN_GROUP(sbag_oc4_1, NMK_GPIO_ALT_C4), 833 - DB8500_PIN_GROUP(hwobs_oc4_1, NMK_GPIO_ALT_C4), 829 + NMK_PIN_GROUP(sbag_oc4_1, NMK_GPIO_ALT_C4), 830 + NMK_PIN_GROUP(hwobs_oc4_1, NMK_GPIO_ALT_C4), 834 831 }; 835 832 836 833 /* We use this macro to define the groups applicable to a function */
+13 -16
drivers/pinctrl/nomadik/pinctrl-nomadik-stn8815.c
··· 303 303 STN8815_PIN_C16, STN8815_PIN_A15, 304 304 STN8815_PIN_D17, STN8815_PIN_C17 }; 305 305 306 - #define STN8815_PIN_GROUP(a, b) { .name = #a, .pins = a##_pins, \ 307 - .npins = ARRAY_SIZE(a##_pins), .altsetting = b } 308 - 309 306 static const struct nmk_pingroup nmk_stn8815_groups[] = { 310 - STN8815_PIN_GROUP(u0txrx_a_1, NMK_GPIO_ALT_A), 311 - STN8815_PIN_GROUP(u0ctsrts_a_1, NMK_GPIO_ALT_A), 312 - STN8815_PIN_GROUP(u0modem_a_1, NMK_GPIO_ALT_A), 313 - STN8815_PIN_GROUP(mmcsd_a_1, NMK_GPIO_ALT_A), 314 - STN8815_PIN_GROUP(mmcsd_b_1, NMK_GPIO_ALT_B), 315 - STN8815_PIN_GROUP(u1_a_1, NMK_GPIO_ALT_A), 316 - STN8815_PIN_GROUP(i2c1_a_1, NMK_GPIO_ALT_A), 317 - STN8815_PIN_GROUP(i2c0_a_1, NMK_GPIO_ALT_A), 318 - STN8815_PIN_GROUP(u1_b_1, NMK_GPIO_ALT_B), 319 - STN8815_PIN_GROUP(i2cusb_b_1, NMK_GPIO_ALT_B), 320 - STN8815_PIN_GROUP(clcd_16_23_b_1, NMK_GPIO_ALT_B), 321 - STN8815_PIN_GROUP(usbfs_b_1, NMK_GPIO_ALT_B), 322 - STN8815_PIN_GROUP(usbhs_c_1, NMK_GPIO_ALT_C), 307 + NMK_PIN_GROUP(u0txrx_a_1, NMK_GPIO_ALT_A), 308 + NMK_PIN_GROUP(u0ctsrts_a_1, NMK_GPIO_ALT_A), 309 + NMK_PIN_GROUP(u0modem_a_1, NMK_GPIO_ALT_A), 310 + NMK_PIN_GROUP(mmcsd_a_1, NMK_GPIO_ALT_A), 311 + NMK_PIN_GROUP(mmcsd_b_1, NMK_GPIO_ALT_B), 312 + NMK_PIN_GROUP(u1_a_1, NMK_GPIO_ALT_A), 313 + NMK_PIN_GROUP(i2c1_a_1, NMK_GPIO_ALT_A), 314 + NMK_PIN_GROUP(i2c0_a_1, NMK_GPIO_ALT_A), 315 + NMK_PIN_GROUP(u1_b_1, NMK_GPIO_ALT_B), 316 + NMK_PIN_GROUP(i2cusb_b_1, NMK_GPIO_ALT_B), 317 + NMK_PIN_GROUP(clcd_16_23_b_1, NMK_GPIO_ALT_B), 318 + NMK_PIN_GROUP(usbfs_b_1, NMK_GPIO_ALT_B), 319 + NMK_PIN_GROUP(usbhs_c_1, NMK_GPIO_ALT_C), 323 320 }; 324 321 325 322 /* We use this macro to define the groups applicable to a function */
+58 -59
drivers/pinctrl/nomadik/pinctrl-nomadik.c
··· 244 244 245 245 struct nmk_gpio_chip { 246 246 struct gpio_chip chip; 247 - struct irq_chip irqchip; 248 247 void __iomem *addr; 249 248 struct clk *clk; 250 249 unsigned int bank; ··· 607 608 608 609 static void nmk_gpio_irq_ack(struct irq_data *d) 609 610 { 610 - struct gpio_chip *chip = irq_data_get_irq_chip_data(d); 611 - struct nmk_gpio_chip *nmk_chip = gpiochip_get_data(chip); 611 + struct gpio_chip *gc = irq_data_get_irq_chip_data(d); 612 + struct nmk_gpio_chip *nmk_chip = gpiochip_get_data(gc); 612 613 613 614 clk_enable(nmk_chip->clk); 614 615 writel(BIT(d->hwirq), nmk_chip->addr + NMK_GPIO_IC); ··· 674 675 __nmk_gpio_irq_modify(nmk_chip, offset, WAKE, on); 675 676 } 676 677 677 - static int nmk_gpio_irq_maskunmask(struct irq_data *d, bool enable) 678 + static void nmk_gpio_irq_maskunmask(struct nmk_gpio_chip *nmk_chip, 679 + struct irq_data *d, bool enable) 678 680 { 679 - struct nmk_gpio_chip *nmk_chip; 680 681 unsigned long flags; 681 - 682 - nmk_chip = irq_data_get_irq_chip_data(d); 683 - if (!nmk_chip) 684 - return -EINVAL; 685 682 686 683 clk_enable(nmk_chip->clk); 687 684 spin_lock_irqsave(&nmk_gpio_slpm_lock, flags); ··· 691 696 spin_unlock(&nmk_chip->lock); 692 697 spin_unlock_irqrestore(&nmk_gpio_slpm_lock, flags); 693 698 clk_disable(nmk_chip->clk); 694 - 695 - return 0; 696 699 } 697 700 698 701 static void nmk_gpio_irq_mask(struct irq_data *d) 699 702 { 700 - nmk_gpio_irq_maskunmask(d, false); 703 + struct gpio_chip *gc = irq_data_get_irq_chip_data(d); 704 + struct nmk_gpio_chip *nmk_chip = gpiochip_get_data(gc); 705 + 706 + nmk_gpio_irq_maskunmask(nmk_chip, d, false); 707 + gpiochip_disable_irq(gc, irqd_to_hwirq(d)); 701 708 } 702 709 703 710 static void nmk_gpio_irq_unmask(struct irq_data *d) 704 711 { 705 - nmk_gpio_irq_maskunmask(d, true); 712 + struct gpio_chip *gc = irq_data_get_irq_chip_data(d); 713 + struct nmk_gpio_chip *nmk_chip = gpiochip_get_data(gc); 714 + 715 + gpiochip_enable_irq(gc, irqd_to_hwirq(d)); 716 + nmk_gpio_irq_maskunmask(nmk_chip, d, true); 706 717 } 707 718 708 719 static int nmk_gpio_irq_set_wake(struct irq_data *d, unsigned int on) 709 720 { 710 - struct nmk_gpio_chip *nmk_chip; 721 + struct gpio_chip *gc = irq_data_get_irq_chip_data(d); 722 + struct nmk_gpio_chip *nmk_chip = gpiochip_get_data(gc); 711 723 unsigned long flags; 712 - 713 - nmk_chip = irq_data_get_irq_chip_data(d); 714 - if (!nmk_chip) 715 - return -EINVAL; 716 724 717 725 clk_enable(nmk_chip->clk); 718 726 spin_lock_irqsave(&nmk_gpio_slpm_lock, flags); ··· 738 740 739 741 static int nmk_gpio_irq_set_type(struct irq_data *d, unsigned int type) 740 742 { 743 + struct gpio_chip *gc = irq_data_get_irq_chip_data(d); 744 + struct nmk_gpio_chip *nmk_chip = gpiochip_get_data(gc); 741 745 bool enabled = !irqd_irq_disabled(d); 742 746 bool wake = irqd_is_wakeup_set(d); 743 - struct nmk_gpio_chip *nmk_chip; 744 747 unsigned long flags; 745 748 746 - nmk_chip = irq_data_get_irq_chip_data(d); 747 - if (!nmk_chip) 748 - return -EINVAL; 749 749 if (type & IRQ_TYPE_LEVEL_HIGH) 750 750 return -EINVAL; 751 751 if (type & IRQ_TYPE_LEVEL_LOW) ··· 780 784 781 785 static unsigned int nmk_gpio_irq_startup(struct irq_data *d) 782 786 { 783 - struct nmk_gpio_chip *nmk_chip = irq_data_get_irq_chip_data(d); 787 + struct gpio_chip *gc = irq_data_get_irq_chip_data(d); 788 + struct nmk_gpio_chip *nmk_chip = gpiochip_get_data(gc); 784 789 785 790 clk_enable(nmk_chip->clk); 786 791 nmk_gpio_irq_unmask(d); ··· 790 793 791 794 static void nmk_gpio_irq_shutdown(struct irq_data *d) 792 795 { 793 - struct nmk_gpio_chip *nmk_chip = irq_data_get_irq_chip_data(d); 796 + struct gpio_chip *gc = irq_data_get_irq_chip_data(d); 797 + struct nmk_gpio_chip *nmk_chip = gpiochip_get_data(gc); 794 798 795 799 nmk_gpio_irq_mask(d); 796 800 clk_disable(nmk_chip->clk); ··· 1076 1078 return nmk_chip; 1077 1079 } 1078 1080 1081 + static void nmk_gpio_irq_print_chip(struct irq_data *d, struct seq_file *p) 1082 + { 1083 + struct gpio_chip *gc = irq_data_get_irq_chip_data(d); 1084 + struct nmk_gpio_chip *nmk_chip = gpiochip_get_data(gc); 1085 + 1086 + seq_printf(p, "nmk%u-%u-%u", nmk_chip->bank, 1087 + gc->base, gc->base + gc->ngpio - 1); 1088 + } 1089 + 1090 + static const struct irq_chip nmk_irq_chip = { 1091 + .irq_ack = nmk_gpio_irq_ack, 1092 + .irq_mask = nmk_gpio_irq_mask, 1093 + .irq_unmask = nmk_gpio_irq_unmask, 1094 + .irq_set_type = nmk_gpio_irq_set_type, 1095 + .irq_set_wake = nmk_gpio_irq_set_wake, 1096 + .irq_startup = nmk_gpio_irq_startup, 1097 + .irq_shutdown = nmk_gpio_irq_shutdown, 1098 + .irq_print_chip = nmk_gpio_irq_print_chip, 1099 + .flags = IRQCHIP_MASK_ON_SUSPEND | IRQCHIP_IMMUTABLE, 1100 + GPIOCHIP_IRQ_RESOURCE_HELPERS, 1101 + }; 1102 + 1079 1103 static int nmk_gpio_probe(struct platform_device *dev) 1080 1104 { 1081 1105 struct device_node *np = dev->dev.of_node; 1082 1106 struct nmk_gpio_chip *nmk_chip; 1083 1107 struct gpio_chip *chip; 1084 1108 struct gpio_irq_chip *girq; 1085 - struct irq_chip *irqchip; 1086 1109 bool supports_sleepmode; 1087 1110 int irq; 1088 1111 int ret; ··· 1144 1125 chip->can_sleep = false; 1145 1126 chip->owner = THIS_MODULE; 1146 1127 1147 - irqchip = &nmk_chip->irqchip; 1148 - irqchip->irq_ack = nmk_gpio_irq_ack; 1149 - irqchip->irq_mask = nmk_gpio_irq_mask; 1150 - irqchip->irq_unmask = nmk_gpio_irq_unmask; 1151 - irqchip->irq_set_type = nmk_gpio_irq_set_type; 1152 - irqchip->irq_set_wake = nmk_gpio_irq_set_wake; 1153 - irqchip->irq_startup = nmk_gpio_irq_startup; 1154 - irqchip->irq_shutdown = nmk_gpio_irq_shutdown; 1155 - irqchip->flags = IRQCHIP_MASK_ON_SUSPEND; 1156 - irqchip->name = kasprintf(GFP_KERNEL, "nmk%u-%u-%u", 1157 - dev->id, 1158 - chip->base, 1159 - chip->base + chip->ngpio - 1); 1160 - 1161 1128 girq = &chip->irq; 1162 - girq->chip = irqchip; 1129 + gpio_irq_chip_set_chip(girq, &nmk_irq_chip); 1163 1130 girq->parent_handler = nmk_gpio_irq_handler; 1164 1131 girq->num_parents = 1; 1165 1132 girq->parents = devm_kcalloc(&dev->dev, 1, ··· 1184 1179 { 1185 1180 struct nmk_pinctrl *npct = pinctrl_dev_get_drvdata(pctldev); 1186 1181 1187 - return npct->soc->groups[selector].name; 1182 + return npct->soc->groups[selector].grp.name; 1188 1183 } 1189 1184 1190 1185 static int nmk_get_group_pins(struct pinctrl_dev *pctldev, unsigned selector, 1191 1186 const unsigned **pins, 1192 - unsigned *num_pins) 1187 + unsigned *npins) 1193 1188 { 1194 1189 struct nmk_pinctrl *npct = pinctrl_dev_get_drvdata(pctldev); 1195 1190 1196 - *pins = npct->soc->groups[selector].pins; 1197 - *num_pins = npct->soc->groups[selector].npins; 1191 + *pins = npct->soc->groups[selector].grp.pins; 1192 + *npins = npct->soc->groups[selector].grp.npins; 1198 1193 return 0; 1199 1194 } 1200 1195 ··· 1536 1531 if (g->altsetting < 0) 1537 1532 return -EINVAL; 1538 1533 1539 - dev_dbg(npct->dev, "enable group %s, %u pins\n", g->name, g->npins); 1534 + dev_dbg(npct->dev, "enable group %s, %u pins\n", g->grp.name, g->grp.npins); 1540 1535 1541 1536 /* 1542 1537 * If we're setting altfunc C by setting both AFSLA and AFSLB to 1, ··· 1571 1566 * Then mask the pins that need to be sleeping now when we're 1572 1567 * switching to the ALT C function. 1573 1568 */ 1574 - for (i = 0; i < g->npins; i++) 1575 - slpm[g->pins[i] / NMK_GPIO_PER_CHIP] &= ~BIT(g->pins[i]); 1569 + for (i = 0; i < g->grp.npins; i++) 1570 + slpm[g->grp.pins[i] / NMK_GPIO_PER_CHIP] &= ~BIT(g->grp.pins[i]); 1576 1571 nmk_gpio_glitch_slpm_init(slpm); 1577 1572 } 1578 1573 1579 - for (i = 0; i < g->npins; i++) { 1574 + for (i = 0; i < g->grp.npins; i++) { 1580 1575 struct nmk_gpio_chip *nmk_chip; 1581 1576 unsigned bit; 1582 1577 1583 - nmk_chip = find_nmk_gpio_from_pin(g->pins[i]); 1578 + nmk_chip = find_nmk_gpio_from_pin(g->grp.pins[i]); 1584 1579 if (!nmk_chip) { 1585 1580 dev_err(npct->dev, 1586 1581 "invalid pin offset %d in group %s at index %d\n", 1587 - g->pins[i], g->name, i); 1582 + g->grp.pins[i], g->grp.name, i); 1588 1583 goto out_glitch; 1589 1584 } 1590 - dev_dbg(npct->dev, "setting pin %d to altsetting %d\n", g->pins[i], g->altsetting); 1585 + dev_dbg(npct->dev, "setting pin %d to altsetting %d\n", g->grp.pins[i], g->altsetting); 1591 1586 1592 1587 clk_enable(nmk_chip->clk); 1593 - bit = g->pins[i] % NMK_GPIO_PER_CHIP; 1588 + bit = g->grp.pins[i] % NMK_GPIO_PER_CHIP; 1594 1589 /* 1595 1590 * If the pin is switching to altfunc, and there was an 1596 1591 * interrupt installed on it which has been lazy disabled, ··· 1613 1608 * then some bits in PRCM GPIOCR registers must be cleared. 1614 1609 */ 1615 1610 if ((g->altsetting & NMK_GPIO_ALT_C) == NMK_GPIO_ALT_C) 1616 - nmk_prcm_altcx_set_mode(npct, g->pins[i], 1611 + nmk_prcm_altcx_set_mode(npct, g->grp.pins[i], 1617 1612 g->altsetting >> NMK_GPIO_ALT_CX_SHIFT); 1618 1613 } 1619 1614 ··· 1807 1802 .compatible = "stericsson,db8500-pinctrl", 1808 1803 .data = (void *)PINCTRL_NMK_DB8500, 1809 1804 }, 1810 - { 1811 - .compatible = "stericsson,db8540-pinctrl", 1812 - .data = (void *)PINCTRL_NMK_DB8540, 1813 - }, 1814 1805 {}, 1815 1806 }; 1816 1807 ··· 1857 1856 nmk_pinctrl_stn8815_init(&npct->soc); 1858 1857 if (version == PINCTRL_NMK_DB8500) 1859 1858 nmk_pinctrl_db8500_init(&npct->soc); 1860 - if (version == PINCTRL_NMK_DB8540) 1861 - nmk_pinctrl_db8540_init(&npct->soc); 1862 1859 1863 1860 /* 1864 1861 * Since we depend on the GPIO chips to provide clock and register base
+8 -22
drivers/pinctrl/nomadik/pinctrl-nomadik.h
··· 5 5 /* Package definitions */ 6 6 #define PINCTRL_NMK_STN8815 0 7 7 #define PINCTRL_NMK_DB8500 1 8 - #define PINCTRL_NMK_DB8540 2 9 8 10 9 /* Alternate functions: function C is set in hw by setting both A and B */ 11 10 #define NMK_GPIO_ALT_GPIO 0 ··· 104 105 105 106 /** 106 107 * struct nmk_pingroup - describes a Nomadik pin group 107 - * @name: the name of this specific pin group 108 - * @pins: an array of discrete physical pins used in this group, taken 109 - * from the driver-local pin enumeration space 110 - * @num_pins: the number of pins in this group array, i.e. the number of 111 - * elements in .pins so we can iterate over that array 108 + * @grp: Generic data of the pin group (name and pins) 112 109 * @altsetting: the altsetting to apply to all pins in this group to 113 110 * configure them to be used by a function 114 111 */ 115 112 struct nmk_pingroup { 116 - const char *name; 117 - const unsigned int *pins; 118 - const unsigned npins; 113 + struct pingroup grp; 119 114 int altsetting; 120 115 }; 116 + 117 + #define NMK_PIN_GROUP(a, b) \ 118 + { \ 119 + .grp = PINCTRL_PINGROUP(#a, a##_pins, ARRAY_SIZE(a##_pins)), \ 120 + .altsetting = b, \ 121 + } 121 122 122 123 /** 123 124 * struct nmk_pinctrl_soc_data - Nomadik pin controller per-SoC configuration ··· 167 168 168 169 static inline void 169 170 nmk_pinctrl_db8500_init(const struct nmk_pinctrl_soc_data **soc) 170 - { 171 - } 172 - 173 - #endif 174 - 175 - #ifdef CONFIG_PINCTRL_DB8540 176 - 177 - void nmk_pinctrl_db8540_init(const struct nmk_pinctrl_soc_data **soc); 178 - 179 - #else 180 - 181 - static inline void 182 - nmk_pinctrl_db8540_init(const struct nmk_pinctrl_soc_data **soc) 183 171 { 184 172 } 185 173
+4 -4
drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c
··· 81 81 int irq; 82 82 struct irq_chip irq_chip; 83 83 u32 pinctrl_id; 84 - int (*direction_input)(struct gpio_chip *chip, unsigned offset); 85 - int (*direction_output)(struct gpio_chip *chip, unsigned offset, 84 + int (*direction_input)(struct gpio_chip *chip, unsigned int offset); 85 + int (*direction_output)(struct gpio_chip *chip, unsigned int offset, 86 86 int value); 87 - int (*request)(struct gpio_chip *chip, unsigned offset); 88 - void (*free)(struct gpio_chip *chip, unsigned offset); 87 + int (*request)(struct gpio_chip *chip, unsigned int offset); 88 + void (*free)(struct gpio_chip *chip, unsigned int offset); 89 89 }; 90 90 91 91 struct npcm7xx_pinctrl {
+4 -1
drivers/pinctrl/nuvoton/pinctrl-wpcm450.c
··· 1081 1081 1082 1082 girq->num_parents = 0; 1083 1083 for (i = 0; i < WPCM450_NUM_GPIO_IRQS; i++) { 1084 - int irq = fwnode_irq_get(child, i); 1084 + int irq; 1085 1085 1086 + irq = fwnode_irq_get(child, i); 1086 1087 if (irq < 0) 1087 1088 break; 1089 + if (!irq) 1090 + continue; 1088 1091 1089 1092 girq->parents[i] = irq; 1090 1093 girq->num_parents++;
+16 -16
drivers/pinctrl/pinctrl-amd.c
··· 246 246 } 247 247 seq_printf(s, "GPIO bank%d\n", bank); 248 248 for (; i < pin_num; i++) { 249 - seq_printf(s, "📌%d\t", i); 249 + seq_printf(s, "#%d\t", i); 250 250 raw_spin_lock_irqsave(&gpio_dev->lock, flags); 251 251 pin_reg = readl(gpio_dev->base + i * 4); 252 252 raw_spin_unlock_irqrestore(&gpio_dev->lock, flags); ··· 278 278 } 279 279 280 280 if (pin_reg & BIT(INTERRUPT_MASK_OFF)) 281 - interrupt_mask = "-"; 281 + interrupt_mask = "😛"; 282 282 else 283 - interrupt_mask = "+"; 284 - seq_printf(s, "int %s (🎭 %s)| active-%s| %s-🔫| ", 283 + interrupt_mask = "😷"; 284 + seq_printf(s, "int %s (%s)| active-%s| %s-⚡| ", 285 285 interrupt_enable, 286 286 interrupt_mask, 287 287 active_level, 288 288 level_trig); 289 289 290 290 if (pin_reg & BIT(WAKE_CNTRL_OFF_S0I3)) 291 - wake_cntrl0 = "+"; 291 + wake_cntrl0 = "⏰"; 292 292 else 293 - wake_cntrl0 = "∅"; 294 - seq_printf(s, "S0i3 🌅 %s| ", wake_cntrl0); 293 + wake_cntrl0 = " ∅"; 294 + seq_printf(s, "S0i3 %s| ", wake_cntrl0); 295 295 296 296 if (pin_reg & BIT(WAKE_CNTRL_OFF_S3)) 297 - wake_cntrl1 = "+"; 297 + wake_cntrl1 = "⏰"; 298 298 else 299 - wake_cntrl1 = "∅"; 300 - seq_printf(s, "S3 🌅 %s| ", wake_cntrl1); 299 + wake_cntrl1 = " ∅"; 300 + seq_printf(s, "S3 %s| ", wake_cntrl1); 301 301 302 302 if (pin_reg & BIT(WAKE_CNTRL_OFF_S4)) 303 - wake_cntrl2 = "+"; 303 + wake_cntrl2 = "⏰"; 304 304 else 305 - wake_cntrl2 = "∅"; 306 - seq_printf(s, "S4/S5 🌅 %s| ", wake_cntrl2); 305 + wake_cntrl2 = " ∅"; 306 + seq_printf(s, "S4/S5 %s| ", wake_cntrl2); 307 307 308 308 if (pin_reg & BIT(PULL_UP_ENABLE_OFF)) { 309 309 pull_up_enable = "+"; ··· 367 367 debounce_enable = " ∅"; 368 368 } 369 369 snprintf(debounce_value, sizeof(debounce_value), "%u", time * unit); 370 - seq_printf(s, "debounce %s (⏰ %sus)| ", debounce_enable, debounce_value); 370 + seq_printf(s, "debounce %s (🕑 %sus)| ", debounce_enable, debounce_value); 371 371 seq_printf(s, " 0x%x\n", pin_reg); 372 372 } 373 373 } ··· 1051 1051 1052 1052 index = device_property_match_string(dev, "pinctrl-resource-names", "iomux"); 1053 1053 if (index < 0) { 1054 - dev_warn(dev, "failed to get iomux index\n"); 1054 + dev_dbg(dev, "iomux not supported\n"); 1055 1055 goto out_no_pinmux; 1056 1056 } 1057 1057 1058 1058 gpio_dev->iomux_base = devm_platform_ioremap_resource(gpio_dev->pdev, index); 1059 1059 if (IS_ERR(gpio_dev->iomux_base)) { 1060 - dev_warn(dev, "Failed to get iomux %d io resource\n", index); 1060 + dev_dbg(dev, "iomux not supported %d io resource\n", index); 1061 1061 goto out_no_pinmux; 1062 1062 } 1063 1063
+55 -50
drivers/pinctrl/pinctrl-at91.c
··· 22 22 #include <linux/pinctrl/pinmux.h> 23 23 /* Since we request GPIOs from ourself */ 24 24 #include <linux/pinctrl/consumer.h> 25 - 26 - #include <soc/at91/pm.h> 25 + #include <linux/pm.h> 27 26 28 27 #include "pinctrl-at91.h" 29 28 #include "core.h" ··· 32 33 33 34 struct at91_pinctrl_mux_ops; 34 35 36 + /** 37 + * struct at91_gpio_chip: at91 gpio chip 38 + * @chip: gpio chip 39 + * @range: gpio range 40 + * @next: bank sharing same clock 41 + * @pioc_hwirq: PIO bank interrupt identifier on AIC 42 + * @pioc_virq: PIO bank Linux virtual interrupt 43 + * @pioc_idx: PIO bank index 44 + * @regbase: PIO bank virtual address 45 + * @clock: associated clock 46 + * @ops: at91 pinctrl mux ops 47 + * @wakeups: wakeup interrupts 48 + * @backups: interrupts disabled in suspend 49 + * @id: gpio chip identifier 50 + */ 35 51 struct at91_gpio_chip { 36 52 struct gpio_chip chip; 37 53 struct pinctrl_gpio_range range; 38 - struct at91_gpio_chip *next; /* Bank sharing same clock */ 39 - int pioc_hwirq; /* PIO bank interrupt identifier on AIC */ 40 - int pioc_virq; /* PIO bank Linux virtual interrupt */ 41 - int pioc_idx; /* PIO bank index */ 42 - void __iomem *regbase; /* PIO bank virtual address */ 43 - struct clk *clock; /* associated clock */ 44 - const struct at91_pinctrl_mux_ops *ops; /* ops */ 54 + struct at91_gpio_chip *next; 55 + int pioc_hwirq; 56 + int pioc_virq; 57 + int pioc_idx; 58 + void __iomem *regbase; 59 + struct clk *clock; 60 + const struct at91_pinctrl_mux_ops *ops; 61 + u32 wakeups; 62 + u32 backups; 63 + u32 id; 45 64 }; 46 65 47 66 static struct at91_gpio_chip *gpio_chips[MAX_GPIO_BANKS]; ··· 1632 1615 /* the interrupt is already cleared before by reading ISR */ 1633 1616 } 1634 1617 1635 - static u32 wakeups[MAX_GPIO_BANKS]; 1636 - static u32 backups[MAX_GPIO_BANKS]; 1637 - 1638 1618 static int gpio_irq_set_wake(struct irq_data *d, unsigned state) 1639 1619 { 1640 1620 struct at91_gpio_chip *at91_gpio = irq_data_get_irq_chip_data(d); 1641 - unsigned bank = at91_gpio->pioc_idx; 1642 1621 unsigned mask = 1 << d->hwirq; 1643 1622 1644 - if (unlikely(bank >= MAX_GPIO_BANKS)) 1645 - return -EINVAL; 1646 - 1647 1623 if (state) 1648 - wakeups[bank] |= mask; 1624 + at91_gpio->wakeups |= mask; 1649 1625 else 1650 - wakeups[bank] &= ~mask; 1626 + at91_gpio->wakeups &= ~mask; 1651 1627 1652 1628 irq_set_irq_wake(at91_gpio->pioc_virq, state); 1653 1629 1654 1630 return 0; 1655 1631 } 1656 1632 1657 - void at91_pinctrl_gpio_suspend(void) 1633 + static int at91_gpio_suspend(struct device *dev) 1658 1634 { 1659 - int i; 1635 + struct at91_gpio_chip *at91_chip = dev_get_drvdata(dev); 1636 + void __iomem *pio = at91_chip->regbase; 1660 1637 1661 - for (i = 0; i < gpio_banks; i++) { 1662 - void __iomem *pio; 1638 + at91_chip->backups = readl_relaxed(pio + PIO_IMR); 1639 + writel_relaxed(at91_chip->backups, pio + PIO_IDR); 1640 + writel_relaxed(at91_chip->wakeups, pio + PIO_IER); 1663 1641 1664 - if (!gpio_chips[i]) 1665 - continue; 1642 + if (!at91_chip->wakeups) 1643 + clk_disable_unprepare(at91_chip->clock); 1644 + else 1645 + dev_dbg(dev, "GPIO-%c may wake for %08x\n", 1646 + 'A' + at91_chip->id, at91_chip->wakeups); 1666 1647 1667 - pio = gpio_chips[i]->regbase; 1668 - 1669 - backups[i] = readl_relaxed(pio + PIO_IMR); 1670 - writel_relaxed(backups[i], pio + PIO_IDR); 1671 - writel_relaxed(wakeups[i], pio + PIO_IER); 1672 - 1673 - if (!wakeups[i]) 1674 - clk_disable_unprepare(gpio_chips[i]->clock); 1675 - else 1676 - printk(KERN_DEBUG "GPIO-%c may wake for %08x\n", 1677 - 'A'+i, wakeups[i]); 1678 - } 1648 + return 0; 1679 1649 } 1680 1650 1681 - void at91_pinctrl_gpio_resume(void) 1651 + static int at91_gpio_resume(struct device *dev) 1682 1652 { 1683 - int i; 1653 + struct at91_gpio_chip *at91_chip = dev_get_drvdata(dev); 1654 + void __iomem *pio = at91_chip->regbase; 1684 1655 1685 - for (i = 0; i < gpio_banks; i++) { 1686 - void __iomem *pio; 1656 + if (!at91_chip->wakeups) 1657 + clk_prepare_enable(at91_chip->clock); 1687 1658 1688 - if (!gpio_chips[i]) 1689 - continue; 1659 + writel_relaxed(at91_chip->wakeups, pio + PIO_IDR); 1660 + writel_relaxed(at91_chip->backups, pio + PIO_IER); 1690 1661 1691 - pio = gpio_chips[i]->regbase; 1692 - 1693 - if (!wakeups[i]) 1694 - clk_prepare_enable(gpio_chips[i]->clock); 1695 - 1696 - writel_relaxed(wakeups[i], pio + PIO_IDR); 1697 - writel_relaxed(backups[i], pio + PIO_IER); 1698 - } 1662 + return 0; 1699 1663 } 1700 1664 1701 1665 static void gpio_irq_handler(struct irq_desc *desc) ··· 1858 1860 } 1859 1861 1860 1862 at91_chip->chip = at91_gpio_template; 1863 + at91_chip->id = alias_idx; 1861 1864 1862 1865 chip = &at91_chip->chip; 1863 1866 chip->label = dev_name(&pdev->dev); ··· 1904 1905 goto gpiochip_add_err; 1905 1906 1906 1907 gpio_chips[alias_idx] = at91_chip; 1908 + platform_set_drvdata(pdev, at91_chip); 1907 1909 gpio_banks = max(gpio_banks, alias_idx + 1); 1908 1910 1909 1911 dev_info(&pdev->dev, "at address %p\n", at91_chip->regbase); ··· 1920 1920 return ret; 1921 1921 } 1922 1922 1923 + static const struct dev_pm_ops at91_gpio_pm_ops = { 1924 + SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(at91_gpio_suspend, at91_gpio_resume) 1925 + }; 1926 + 1923 1927 static struct platform_driver at91_gpio_driver = { 1924 1928 .driver = { 1925 1929 .name = "gpio-at91", 1926 1930 .of_match_table = at91_gpio_of_match, 1931 + .pm = pm_ptr(&at91_gpio_pm_ops), 1927 1932 }, 1928 1933 .probe = at91_gpio_probe, 1929 1934 };
+1419
drivers/pinctrl/pinctrl-cy8c95x0.c
··· 1 + // SPDX-License-Identifier: GPL-2.0-only 2 + /* 3 + * CY8C95X0 20/40/60 pin I2C GPIO port expander with interrupt support 4 + * 5 + * Copyright (C) 2022 9elements GmbH 6 + * Authors: Patrick Rudolph <patrick.rudolph@9elements.com> 7 + * Naresh Solanki <Naresh.Solanki@9elements.com> 8 + */ 9 + 10 + #include <linux/acpi.h> 11 + #include <linux/bitmap.h> 12 + #include <linux/dmi.h> 13 + #include <linux/gpio/driver.h> 14 + #include <linux/gpio/consumer.h> 15 + #include <linux/i2c.h> 16 + #include <linux/init.h> 17 + #include <linux/interrupt.h> 18 + #include <linux/mod_devicetable.h> 19 + #include <linux/module.h> 20 + #include <linux/property.h> 21 + #include <linux/regmap.h> 22 + #include <linux/regulator/consumer.h> 23 + 24 + #include <linux/pinctrl/pinctrl.h> 25 + #include <linux/pinctrl/pinconf.h> 26 + #include <linux/pinctrl/pinconf-generic.h> 27 + #include <linux/pinctrl/pinmux.h> 28 + 29 + /* Fast access registers */ 30 + #define CY8C95X0_INPUT 0x00 31 + #define CY8C95X0_OUTPUT 0x08 32 + #define CY8C95X0_INTSTATUS 0x10 33 + 34 + #define CY8C95X0_INPUT_(x) (CY8C95X0_INPUT + (x)) 35 + #define CY8C95X0_OUTPUT_(x) (CY8C95X0_OUTPUT + (x)) 36 + #define CY8C95X0_INTSTATUS_(x) (CY8C95X0_INTSTATUS + (x)) 37 + 38 + /* Port Select configures the port */ 39 + #define CY8C95X0_PORTSEL 0x18 40 + /* Port settings, write PORTSEL first */ 41 + #define CY8C95X0_INTMASK 0x19 42 + #define CY8C95X0_PWMSEL 0x1A 43 + #define CY8C95X0_INVERT 0x1B 44 + #define CY8C95X0_DIRECTION 0x1C 45 + /* Drive mode register change state on writing '1' */ 46 + #define CY8C95X0_DRV_PU 0x1D 47 + #define CY8C95X0_DRV_PD 0x1E 48 + #define CY8C95X0_DRV_ODH 0x1F 49 + #define CY8C95X0_DRV_ODL 0x20 50 + #define CY8C95X0_DRV_PP_FAST 0x21 51 + #define CY8C95X0_DRV_PP_SLOW 0x22 52 + #define CY8C95X0_DRV_HIZ 0x23 53 + #define CY8C95X0_DEVID 0x2E 54 + #define CY8C95X0_WATCHDOG 0x2F 55 + #define CY8C95X0_COMMAND 0x30 56 + 57 + #define CY8C95X0_PIN_TO_OFFSET(x) (((x) >= 20) ? ((x) + 4) : (x)) 58 + 59 + static const struct i2c_device_id cy8c95x0_id[] = { 60 + { "cy8c9520", 20, }, 61 + { "cy8c9540", 40, }, 62 + { "cy8c9560", 60, }, 63 + { } 64 + }; 65 + MODULE_DEVICE_TABLE(i2c, cy8c95x0_id); 66 + 67 + #define OF_CY8C95X(__nrgpio) ((void *)(__nrgpio)) 68 + 69 + static const struct of_device_id cy8c95x0_dt_ids[] = { 70 + { .compatible = "cypress,cy8c9520", .data = OF_CY8C95X(20), }, 71 + { .compatible = "cypress,cy8c9540", .data = OF_CY8C95X(40), }, 72 + { .compatible = "cypress,cy8c9560", .data = OF_CY8C95X(60), }, 73 + { } 74 + }; 75 + MODULE_DEVICE_TABLE(of, cy8c95x0_dt_ids); 76 + 77 + static const struct acpi_gpio_params cy8c95x0_irq_gpios = { 0, 0, true }; 78 + 79 + static const struct acpi_gpio_mapping cy8c95x0_acpi_irq_gpios[] = { 80 + { "irq-gpios", &cy8c95x0_irq_gpios, 1, ACPI_GPIO_QUIRK_ABSOLUTE_NUMBER }, 81 + { } 82 + }; 83 + 84 + static int cy8c95x0_acpi_get_irq(struct device *dev) 85 + { 86 + int ret; 87 + 88 + ret = devm_acpi_dev_add_driver_gpios(dev, cy8c95x0_acpi_irq_gpios); 89 + if (ret) 90 + dev_warn(dev, "can't add GPIO ACPI mapping\n"); 91 + 92 + ret = acpi_dev_gpio_irq_get_by(ACPI_COMPANION(dev), "irq-gpios", 0); 93 + if (ret < 0) 94 + return ret; 95 + 96 + dev_info(dev, "ACPI interrupt quirk (IRQ %d)\n", ret); 97 + return ret; 98 + } 99 + 100 + static const struct dmi_system_id cy8c95x0_dmi_acpi_irq_info[] = { 101 + { 102 + /* 103 + * On Intel Galileo Gen 1 board the IRQ pin is provided 104 + * as an absolute number instead of being relative. 105 + * Since first controller (gpio-sch.c) and second 106 + * (gpio-dwapb.c) are at the fixed bases, we may safely 107 + * refer to the number in the global space to get an IRQ 108 + * out of it. 109 + */ 110 + .matches = { 111 + DMI_EXACT_MATCH(DMI_BOARD_NAME, "Galileo"), 112 + }, 113 + }, 114 + {} 115 + }; 116 + 117 + #define MAX_BANK 8 118 + #define BANK_SZ 8 119 + #define MAX_LINE (MAX_BANK * BANK_SZ) 120 + 121 + #define CY8C95X0_GPIO_MASK GENMASK(7, 0) 122 + 123 + /** 124 + * struct cy8c95x0_pinctrl - driver data 125 + * @regmap: Device's regmap 126 + * @irq_lock: IRQ bus lock 127 + * @i2c_lock: Mutex for the device internal mux register 128 + * @irq_mask: I/O bits affected by interrupts 129 + * @irq_trig_raise: I/O bits affected by raising voltage level 130 + * @irq_trig_fall: I/O bits affected by falling voltage level 131 + * @irq_trig_low: I/O bits affected by a low voltage level 132 + * @irq_trig_high: I/O bits affected by a high voltage level 133 + * @push_pull: I/O bits configured as push pull driver 134 + * @shiftmask: Mask used to compensate for Gport2 width 135 + * @nport: Number of Gports in this chip 136 + * @gpio_chip: gpiolib chip 137 + * @driver_data: private driver data 138 + * @regulator: Pointer to the regulator for the IC 139 + * @dev: struct device 140 + * @pctldev: pin controller device 141 + * @pinctrl_desc: pin controller description 142 + * @name: Chip controller name 143 + * @tpin: Total number of pins 144 + */ 145 + struct cy8c95x0_pinctrl { 146 + struct regmap *regmap; 147 + struct mutex irq_lock; 148 + struct mutex i2c_lock; 149 + DECLARE_BITMAP(irq_mask, MAX_LINE); 150 + DECLARE_BITMAP(irq_trig_raise, MAX_LINE); 151 + DECLARE_BITMAP(irq_trig_fall, MAX_LINE); 152 + DECLARE_BITMAP(irq_trig_low, MAX_LINE); 153 + DECLARE_BITMAP(irq_trig_high, MAX_LINE); 154 + DECLARE_BITMAP(push_pull, MAX_LINE); 155 + DECLARE_BITMAP(shiftmask, MAX_LINE); 156 + int nport; 157 + struct gpio_chip gpio_chip; 158 + unsigned long driver_data; 159 + struct regulator *regulator; 160 + struct device *dev; 161 + struct pinctrl_dev *pctldev; 162 + struct pinctrl_desc pinctrl_desc; 163 + char name[32]; 164 + unsigned int tpin; 165 + }; 166 + 167 + static const struct pinctrl_pin_desc cy8c9560_pins[] = { 168 + PINCTRL_PIN(0, "gp00"), 169 + PINCTRL_PIN(1, "gp01"), 170 + PINCTRL_PIN(2, "gp02"), 171 + PINCTRL_PIN(3, "gp03"), 172 + PINCTRL_PIN(4, "gp04"), 173 + PINCTRL_PIN(5, "gp05"), 174 + PINCTRL_PIN(6, "gp06"), 175 + PINCTRL_PIN(7, "gp07"), 176 + 177 + PINCTRL_PIN(8, "gp10"), 178 + PINCTRL_PIN(9, "gp11"), 179 + PINCTRL_PIN(10, "gp12"), 180 + PINCTRL_PIN(11, "gp13"), 181 + PINCTRL_PIN(12, "gp14"), 182 + PINCTRL_PIN(13, "gp15"), 183 + PINCTRL_PIN(14, "gp16"), 184 + PINCTRL_PIN(15, "gp17"), 185 + 186 + PINCTRL_PIN(16, "gp20"), 187 + PINCTRL_PIN(17, "gp21"), 188 + PINCTRL_PIN(18, "gp22"), 189 + PINCTRL_PIN(19, "gp23"), 190 + 191 + PINCTRL_PIN(20, "gp30"), 192 + PINCTRL_PIN(21, "gp31"), 193 + PINCTRL_PIN(22, "gp32"), 194 + PINCTRL_PIN(23, "gp33"), 195 + PINCTRL_PIN(24, "gp34"), 196 + PINCTRL_PIN(25, "gp35"), 197 + PINCTRL_PIN(26, "gp36"), 198 + PINCTRL_PIN(27, "gp37"), 199 + 200 + PINCTRL_PIN(28, "gp40"), 201 + PINCTRL_PIN(29, "gp41"), 202 + PINCTRL_PIN(30, "gp42"), 203 + PINCTRL_PIN(31, "gp43"), 204 + PINCTRL_PIN(32, "gp44"), 205 + PINCTRL_PIN(33, "gp45"), 206 + PINCTRL_PIN(34, "gp46"), 207 + PINCTRL_PIN(35, "gp47"), 208 + 209 + PINCTRL_PIN(36, "gp50"), 210 + PINCTRL_PIN(37, "gp51"), 211 + PINCTRL_PIN(38, "gp52"), 212 + PINCTRL_PIN(39, "gp53"), 213 + PINCTRL_PIN(40, "gp54"), 214 + PINCTRL_PIN(41, "gp55"), 215 + PINCTRL_PIN(42, "gp56"), 216 + PINCTRL_PIN(43, "gp57"), 217 + 218 + PINCTRL_PIN(44, "gp60"), 219 + PINCTRL_PIN(45, "gp61"), 220 + PINCTRL_PIN(46, "gp62"), 221 + PINCTRL_PIN(47, "gp63"), 222 + PINCTRL_PIN(48, "gp64"), 223 + PINCTRL_PIN(49, "gp65"), 224 + PINCTRL_PIN(50, "gp66"), 225 + PINCTRL_PIN(51, "gp67"), 226 + 227 + PINCTRL_PIN(52, "gp70"), 228 + PINCTRL_PIN(53, "gp71"), 229 + PINCTRL_PIN(54, "gp72"), 230 + PINCTRL_PIN(55, "gp73"), 231 + PINCTRL_PIN(56, "gp74"), 232 + PINCTRL_PIN(57, "gp75"), 233 + PINCTRL_PIN(58, "gp76"), 234 + PINCTRL_PIN(59, "gp77"), 235 + }; 236 + 237 + static const char * const cy8c95x0_groups[] = { 238 + "gp00", 239 + "gp01", 240 + "gp02", 241 + "gp03", 242 + "gp04", 243 + "gp05", 244 + "gp06", 245 + "gp07", 246 + 247 + "gp10", 248 + "gp11", 249 + "gp12", 250 + "gp13", 251 + "gp14", 252 + "gp15", 253 + "gp16", 254 + "gp17", 255 + 256 + "gp20", 257 + "gp21", 258 + "gp22", 259 + "gp23", 260 + 261 + "gp30", 262 + "gp31", 263 + "gp32", 264 + "gp33", 265 + "gp34", 266 + "gp35", 267 + "gp36", 268 + "gp37", 269 + 270 + "gp40", 271 + "gp41", 272 + "gp42", 273 + "gp43", 274 + "gp44", 275 + "gp45", 276 + "gp46", 277 + "gp47", 278 + 279 + "gp50", 280 + "gp51", 281 + "gp52", 282 + "gp53", 283 + "gp54", 284 + "gp55", 285 + "gp56", 286 + "gp57", 287 + 288 + "gp60", 289 + "gp61", 290 + "gp62", 291 + "gp63", 292 + "gp64", 293 + "gp65", 294 + "gp66", 295 + "gp67", 296 + 297 + "gp70", 298 + "gp71", 299 + "gp72", 300 + "gp73", 301 + "gp74", 302 + "gp75", 303 + "gp76", 304 + "gp77", 305 + }; 306 + 307 + static inline u8 cypress_get_port(struct cy8c95x0_pinctrl *chip, unsigned int pin) 308 + { 309 + /* Account for GPORT2 which only has 4 bits */ 310 + return CY8C95X0_PIN_TO_OFFSET(pin) / BANK_SZ; 311 + } 312 + 313 + static int cypress_get_pin_mask(struct cy8c95x0_pinctrl *chip, unsigned int pin) 314 + { 315 + /* Account for GPORT2 which only has 4 bits */ 316 + return BIT(CY8C95X0_PIN_TO_OFFSET(pin) % BANK_SZ); 317 + } 318 + 319 + static bool cy8c95x0_readable_register(struct device *dev, unsigned int reg) 320 + { 321 + switch (reg) { 322 + case 0x24 ... 0x27: 323 + return false; 324 + default: 325 + return true; 326 + } 327 + } 328 + 329 + static bool cy8c95x0_writeable_register(struct device *dev, unsigned int reg) 330 + { 331 + switch (reg) { 332 + case CY8C95X0_INPUT_(0) ... CY8C95X0_INPUT_(7): 333 + return false; 334 + case CY8C95X0_DEVID: 335 + return false; 336 + case 0x24 ... 0x27: 337 + return false; 338 + default: 339 + return true; 340 + } 341 + } 342 + 343 + static bool cy8c95x0_volatile_register(struct device *dev, unsigned int reg) 344 + { 345 + switch (reg) { 346 + case CY8C95X0_INPUT_(0) ... CY8C95X0_INPUT_(7): 347 + case CY8C95X0_INTSTATUS_(0) ... CY8C95X0_INTSTATUS_(7): 348 + case CY8C95X0_INTMASK: 349 + case CY8C95X0_INVERT: 350 + case CY8C95X0_PWMSEL: 351 + case CY8C95X0_DIRECTION: 352 + case CY8C95X0_DRV_PU: 353 + case CY8C95X0_DRV_PD: 354 + case CY8C95X0_DRV_ODH: 355 + case CY8C95X0_DRV_ODL: 356 + case CY8C95X0_DRV_PP_FAST: 357 + case CY8C95X0_DRV_PP_SLOW: 358 + case CY8C95X0_DRV_HIZ: 359 + return true; 360 + default: 361 + return false; 362 + } 363 + } 364 + 365 + static bool cy8c95x0_precious_register(struct device *dev, unsigned int reg) 366 + { 367 + switch (reg) { 368 + case CY8C95X0_INTSTATUS_(0) ... CY8C95X0_INTSTATUS_(7): 369 + return true; 370 + default: 371 + return false; 372 + } 373 + } 374 + 375 + static const struct reg_default cy8c95x0_reg_defaults[] = { 376 + { CY8C95X0_OUTPUT_(0), GENMASK(7, 0) }, 377 + { CY8C95X0_OUTPUT_(1), GENMASK(7, 0) }, 378 + { CY8C95X0_OUTPUT_(2), GENMASK(7, 0) }, 379 + { CY8C95X0_OUTPUT_(3), GENMASK(7, 0) }, 380 + { CY8C95X0_OUTPUT_(4), GENMASK(7, 0) }, 381 + { CY8C95X0_OUTPUT_(5), GENMASK(7, 0) }, 382 + { CY8C95X0_OUTPUT_(6), GENMASK(7, 0) }, 383 + { CY8C95X0_OUTPUT_(7), GENMASK(7, 0) }, 384 + { CY8C95X0_PORTSEL, 0 }, 385 + { CY8C95X0_PWMSEL, 0 }, 386 + }; 387 + 388 + static const struct regmap_config cy8c95x0_i2c_regmap = { 389 + .reg_bits = 8, 390 + .val_bits = 8, 391 + 392 + .reg_defaults = cy8c95x0_reg_defaults, 393 + .num_reg_defaults = ARRAY_SIZE(cy8c95x0_reg_defaults), 394 + 395 + .readable_reg = cy8c95x0_readable_register, 396 + .writeable_reg = cy8c95x0_writeable_register, 397 + .volatile_reg = cy8c95x0_volatile_register, 398 + .precious_reg = cy8c95x0_precious_register, 399 + 400 + .cache_type = REGCACHE_FLAT, 401 + .max_register = CY8C95X0_COMMAND, 402 + }; 403 + 404 + static int cy8c95x0_write_regs_mask(struct cy8c95x0_pinctrl *chip, int reg, 405 + unsigned long *val, unsigned long *mask) 406 + { 407 + DECLARE_BITMAP(tmask, MAX_LINE); 408 + DECLARE_BITMAP(tval, MAX_LINE); 409 + int write_val; 410 + int ret = 0; 411 + int i, off = 0; 412 + u8 bits; 413 + 414 + /* Add the 4 bit gap of Gport2 */ 415 + bitmap_andnot(tmask, mask, chip->shiftmask, MAX_LINE); 416 + bitmap_shift_left(tmask, tmask, 4, MAX_LINE); 417 + bitmap_replace(tmask, tmask, mask, chip->shiftmask, BANK_SZ * 3); 418 + 419 + bitmap_andnot(tval, val, chip->shiftmask, MAX_LINE); 420 + bitmap_shift_left(tval, tval, 4, MAX_LINE); 421 + bitmap_replace(tval, tval, val, chip->shiftmask, BANK_SZ * 3); 422 + 423 + mutex_lock(&chip->i2c_lock); 424 + for (i = 0; i < chip->nport; i++) { 425 + /* Skip over unused banks */ 426 + bits = bitmap_get_value8(tmask, i * BANK_SZ); 427 + if (!bits) 428 + continue; 429 + 430 + switch (reg) { 431 + /* Muxed registers */ 432 + case CY8C95X0_INTMASK: 433 + case CY8C95X0_PWMSEL: 434 + case CY8C95X0_INVERT: 435 + case CY8C95X0_DIRECTION: 436 + case CY8C95X0_DRV_PU: 437 + case CY8C95X0_DRV_PD: 438 + case CY8C95X0_DRV_ODH: 439 + case CY8C95X0_DRV_ODL: 440 + case CY8C95X0_DRV_PP_FAST: 441 + case CY8C95X0_DRV_PP_SLOW: 442 + case CY8C95X0_DRV_HIZ: 443 + ret = regmap_write(chip->regmap, CY8C95X0_PORTSEL, i); 444 + if (ret < 0) 445 + goto out; 446 + off = reg; 447 + break; 448 + /* Direct access registers */ 449 + case CY8C95X0_INPUT: 450 + case CY8C95X0_OUTPUT: 451 + case CY8C95X0_INTSTATUS: 452 + off = reg + i; 453 + break; 454 + default: 455 + ret = -EINVAL; 456 + goto out; 457 + } 458 + 459 + write_val = bitmap_get_value8(tval, i * BANK_SZ); 460 + 461 + ret = regmap_update_bits(chip->regmap, off, bits, write_val); 462 + if (ret < 0) 463 + goto out; 464 + } 465 + out: 466 + mutex_unlock(&chip->i2c_lock); 467 + 468 + if (ret < 0) 469 + dev_err(chip->dev, "failed writing register %d: err %d\n", off, ret); 470 + 471 + return ret; 472 + } 473 + 474 + static int cy8c95x0_read_regs_mask(struct cy8c95x0_pinctrl *chip, int reg, 475 + unsigned long *val, unsigned long *mask) 476 + { 477 + DECLARE_BITMAP(tmask, MAX_LINE); 478 + DECLARE_BITMAP(tval, MAX_LINE); 479 + DECLARE_BITMAP(tmp, MAX_LINE); 480 + int read_val; 481 + int ret = 0; 482 + int i, off = 0; 483 + u8 bits; 484 + 485 + /* Add the 4 bit gap of Gport2 */ 486 + bitmap_andnot(tmask, mask, chip->shiftmask, MAX_LINE); 487 + bitmap_shift_left(tmask, tmask, 4, MAX_LINE); 488 + bitmap_replace(tmask, tmask, mask, chip->shiftmask, BANK_SZ * 3); 489 + 490 + bitmap_andnot(tval, val, chip->shiftmask, MAX_LINE); 491 + bitmap_shift_left(tval, tval, 4, MAX_LINE); 492 + bitmap_replace(tval, tval, val, chip->shiftmask, BANK_SZ * 3); 493 + 494 + mutex_lock(&chip->i2c_lock); 495 + for (i = 0; i < chip->nport; i++) { 496 + /* Skip over unused banks */ 497 + bits = bitmap_get_value8(tmask, i * BANK_SZ); 498 + if (!bits) 499 + continue; 500 + 501 + switch (reg) { 502 + /* Muxed registers */ 503 + case CY8C95X0_INTMASK: 504 + case CY8C95X0_PWMSEL: 505 + case CY8C95X0_INVERT: 506 + case CY8C95X0_DIRECTION: 507 + case CY8C95X0_DRV_PU: 508 + case CY8C95X0_DRV_PD: 509 + case CY8C95X0_DRV_ODH: 510 + case CY8C95X0_DRV_ODL: 511 + case CY8C95X0_DRV_PP_FAST: 512 + case CY8C95X0_DRV_PP_SLOW: 513 + case CY8C95X0_DRV_HIZ: 514 + ret = regmap_write(chip->regmap, CY8C95X0_PORTSEL, i); 515 + if (ret < 0) 516 + goto out; 517 + off = reg; 518 + break; 519 + /* Direct access registers */ 520 + case CY8C95X0_INPUT: 521 + case CY8C95X0_OUTPUT: 522 + case CY8C95X0_INTSTATUS: 523 + off = reg + i; 524 + break; 525 + default: 526 + ret = -EINVAL; 527 + goto out; 528 + } 529 + 530 + ret = regmap_read(chip->regmap, off, &read_val); 531 + if (ret < 0) 532 + goto out; 533 + 534 + read_val &= bits; 535 + read_val |= bitmap_get_value8(tval, i * BANK_SZ) & ~bits; 536 + bitmap_set_value8(tval, read_val, i * BANK_SZ); 537 + } 538 + 539 + /* Fill the 4 bit gap of Gport2 */ 540 + bitmap_shift_right(tmp, tval, 4, MAX_LINE); 541 + bitmap_replace(val, tmp, tval, chip->shiftmask, MAX_LINE); 542 + 543 + out: 544 + mutex_unlock(&chip->i2c_lock); 545 + 546 + if (ret < 0) 547 + dev_err(chip->dev, "failed reading register %d: err %d\n", off, ret); 548 + 549 + return ret; 550 + } 551 + 552 + static int cy8c95x0_gpio_direction_input(struct gpio_chip *gc, unsigned int off) 553 + { 554 + struct cy8c95x0_pinctrl *chip = gpiochip_get_data(gc); 555 + u8 port = cypress_get_port(chip, off); 556 + u8 bit = cypress_get_pin_mask(chip, off); 557 + int ret; 558 + 559 + mutex_lock(&chip->i2c_lock); 560 + ret = regmap_write(chip->regmap, CY8C95X0_PORTSEL, port); 561 + if (ret) 562 + goto out; 563 + 564 + ret = regmap_write_bits(chip->regmap, CY8C95X0_DIRECTION, bit, bit); 565 + if (ret) 566 + goto out; 567 + 568 + if (test_bit(off, chip->push_pull)) { 569 + /* 570 + * Disable driving the pin by forcing it to HighZ. Only setting the 571 + * direction register isn't sufficient in Push-Pull mode. 572 + */ 573 + ret = regmap_write_bits(chip->regmap, CY8C95X0_DRV_HIZ, bit, bit); 574 + if (ret) 575 + goto out; 576 + 577 + __clear_bit(off, chip->push_pull); 578 + } 579 + 580 + out: 581 + mutex_unlock(&chip->i2c_lock); 582 + 583 + return ret; 584 + } 585 + 586 + static int cy8c95x0_gpio_direction_output(struct gpio_chip *gc, 587 + unsigned int off, int val) 588 + { 589 + struct cy8c95x0_pinctrl *chip = gpiochip_get_data(gc); 590 + u8 port = cypress_get_port(chip, off); 591 + u8 outreg = CY8C95X0_OUTPUT_(port); 592 + u8 bit = cypress_get_pin_mask(chip, off); 593 + int ret; 594 + 595 + /* Set output level */ 596 + ret = regmap_write_bits(chip->regmap, outreg, bit, val ? bit : 0); 597 + if (ret) 598 + return ret; 599 + 600 + mutex_lock(&chip->i2c_lock); 601 + /* Select port... */ 602 + ret = regmap_write(chip->regmap, CY8C95X0_PORTSEL, port); 603 + if (ret) 604 + goto out; 605 + 606 + /* ...then direction */ 607 + ret = regmap_write_bits(chip->regmap, CY8C95X0_DIRECTION, bit, 0); 608 + 609 + out: 610 + mutex_unlock(&chip->i2c_lock); 611 + 612 + return ret; 613 + } 614 + 615 + static int cy8c95x0_gpio_get_value(struct gpio_chip *gc, unsigned int off) 616 + { 617 + struct cy8c95x0_pinctrl *chip = gpiochip_get_data(gc); 618 + u8 inreg = CY8C95X0_INPUT_(cypress_get_port(chip, off)); 619 + u8 bit = cypress_get_pin_mask(chip, off); 620 + u32 reg_val; 621 + int ret; 622 + 623 + ret = regmap_read(chip->regmap, inreg, &reg_val); 624 + if (ret < 0) { 625 + /* 626 + * NOTE: 627 + * Diagnostic already emitted; that's all we should 628 + * do unless gpio_*_value_cansleep() calls become different 629 + * from their nonsleeping siblings (and report faults). 630 + */ 631 + return 0; 632 + } 633 + 634 + return !!(reg_val & bit); 635 + } 636 + 637 + static void cy8c95x0_gpio_set_value(struct gpio_chip *gc, unsigned int off, 638 + int val) 639 + { 640 + struct cy8c95x0_pinctrl *chip = gpiochip_get_data(gc); 641 + u8 outreg = CY8C95X0_OUTPUT_(cypress_get_port(chip, off)); 642 + u8 bit = cypress_get_pin_mask(chip, off); 643 + 644 + regmap_write_bits(chip->regmap, outreg, bit, val ? bit : 0); 645 + } 646 + 647 + static int cy8c95x0_gpio_get_direction(struct gpio_chip *gc, unsigned int off) 648 + { 649 + struct cy8c95x0_pinctrl *chip = gpiochip_get_data(gc); 650 + u8 port = cypress_get_port(chip, off); 651 + u8 bit = cypress_get_pin_mask(chip, off); 652 + u32 reg_val; 653 + int ret; 654 + 655 + mutex_lock(&chip->i2c_lock); 656 + 657 + ret = regmap_write(chip->regmap, CY8C95X0_PORTSEL, port); 658 + if (ret < 0) 659 + goto out; 660 + 661 + ret = regmap_read(chip->regmap, CY8C95X0_DIRECTION, &reg_val); 662 + if (ret < 0) 663 + goto out; 664 + 665 + mutex_unlock(&chip->i2c_lock); 666 + 667 + if (reg_val & bit) 668 + return GPIO_LINE_DIRECTION_IN; 669 + 670 + return GPIO_LINE_DIRECTION_OUT; 671 + out: 672 + mutex_unlock(&chip->i2c_lock); 673 + return ret; 674 + } 675 + 676 + static int cy8c95x0_gpio_get_pincfg(struct cy8c95x0_pinctrl *chip, 677 + unsigned int off, 678 + unsigned long *config) 679 + { 680 + enum pin_config_param param = pinconf_to_config_param(*config); 681 + u8 port = cypress_get_port(chip, off); 682 + u8 bit = cypress_get_pin_mask(chip, off); 683 + unsigned int reg; 684 + u32 reg_val; 685 + u16 arg = 0; 686 + int ret; 687 + 688 + mutex_lock(&chip->i2c_lock); 689 + 690 + /* Select port */ 691 + ret = regmap_write(chip->regmap, CY8C95X0_PORTSEL, port); 692 + if (ret < 0) 693 + goto out; 694 + 695 + switch (param) { 696 + case PIN_CONFIG_BIAS_PULL_UP: 697 + reg = CY8C95X0_DRV_PU; 698 + break; 699 + case PIN_CONFIG_BIAS_PULL_DOWN: 700 + reg = CY8C95X0_DRV_PD; 701 + break; 702 + case PIN_CONFIG_BIAS_DISABLE: 703 + reg = CY8C95X0_DRV_HIZ; 704 + break; 705 + case PIN_CONFIG_DRIVE_OPEN_DRAIN: 706 + reg = CY8C95X0_DRV_ODL; 707 + break; 708 + case PIN_CONFIG_DRIVE_OPEN_SOURCE: 709 + reg = CY8C95X0_DRV_ODH; 710 + break; 711 + case PIN_CONFIG_DRIVE_PUSH_PULL: 712 + reg = CY8C95X0_DRV_PP_FAST; 713 + break; 714 + case PIN_CONFIG_INPUT_ENABLE: 715 + reg = CY8C95X0_DIRECTION; 716 + break; 717 + case PIN_CONFIG_MODE_PWM: 718 + reg = CY8C95X0_PWMSEL; 719 + break; 720 + case PIN_CONFIG_OUTPUT: 721 + reg = CY8C95X0_OUTPUT_(port); 722 + break; 723 + case PIN_CONFIG_OUTPUT_ENABLE: 724 + reg = CY8C95X0_DIRECTION; 725 + break; 726 + 727 + case PIN_CONFIG_BIAS_HIGH_IMPEDANCE: 728 + case PIN_CONFIG_BIAS_BUS_HOLD: 729 + case PIN_CONFIG_BIAS_PULL_PIN_DEFAULT: 730 + case PIN_CONFIG_DRIVE_STRENGTH: 731 + case PIN_CONFIG_DRIVE_STRENGTH_UA: 732 + case PIN_CONFIG_INPUT_DEBOUNCE: 733 + case PIN_CONFIG_INPUT_SCHMITT: 734 + case PIN_CONFIG_INPUT_SCHMITT_ENABLE: 735 + case PIN_CONFIG_MODE_LOW_POWER: 736 + case PIN_CONFIG_PERSIST_STATE: 737 + case PIN_CONFIG_POWER_SOURCE: 738 + case PIN_CONFIG_SKEW_DELAY: 739 + case PIN_CONFIG_SLEEP_HARDWARE_STATE: 740 + case PIN_CONFIG_SLEW_RATE: 741 + default: 742 + ret = -ENOTSUPP; 743 + goto out; 744 + } 745 + /* 746 + * Writing 1 to one of the drive mode registers will automatically 747 + * clear conflicting set bits in the other drive mode registers. 748 + */ 749 + ret = regmap_read(chip->regmap, reg, &reg_val); 750 + if (reg_val & bit) 751 + arg = 1; 752 + 753 + *config = pinconf_to_config_packed(param, (u16)arg); 754 + out: 755 + mutex_unlock(&chip->i2c_lock); 756 + 757 + return ret; 758 + } 759 + 760 + static int cy8c95x0_gpio_set_pincfg(struct cy8c95x0_pinctrl *chip, 761 + unsigned int off, 762 + unsigned long config) 763 + { 764 + u8 port = cypress_get_port(chip, off); 765 + u8 bit = cypress_get_pin_mask(chip, off); 766 + unsigned long param = pinconf_to_config_param(config); 767 + unsigned int reg; 768 + int ret; 769 + 770 + mutex_lock(&chip->i2c_lock); 771 + 772 + /* Select port */ 773 + ret = regmap_write(chip->regmap, CY8C95X0_PORTSEL, port); 774 + if (ret < 0) 775 + goto out; 776 + 777 + switch (param) { 778 + case PIN_CONFIG_BIAS_PULL_UP: 779 + __clear_bit(off, chip->push_pull); 780 + reg = CY8C95X0_DRV_PU; 781 + break; 782 + case PIN_CONFIG_BIAS_PULL_DOWN: 783 + __clear_bit(off, chip->push_pull); 784 + reg = CY8C95X0_DRV_PD; 785 + break; 786 + case PIN_CONFIG_BIAS_DISABLE: 787 + __clear_bit(off, chip->push_pull); 788 + reg = CY8C95X0_DRV_HIZ; 789 + break; 790 + case PIN_CONFIG_DRIVE_OPEN_DRAIN: 791 + __clear_bit(off, chip->push_pull); 792 + reg = CY8C95X0_DRV_ODL; 793 + break; 794 + case PIN_CONFIG_DRIVE_OPEN_SOURCE: 795 + __clear_bit(off, chip->push_pull); 796 + reg = CY8C95X0_DRV_ODH; 797 + break; 798 + case PIN_CONFIG_DRIVE_PUSH_PULL: 799 + __set_bit(off, chip->push_pull); 800 + reg = CY8C95X0_DRV_PP_FAST; 801 + break; 802 + case PIN_CONFIG_MODE_PWM: 803 + reg = CY8C95X0_PWMSEL; 804 + break; 805 + default: 806 + ret = -ENOTSUPP; 807 + goto out; 808 + } 809 + /* 810 + * Writing 1 to one of the drive mode registers will automatically 811 + * clear conflicting set bits in the other drive mode registers. 812 + */ 813 + ret = regmap_write_bits(chip->regmap, reg, bit, bit); 814 + 815 + out: 816 + mutex_unlock(&chip->i2c_lock); 817 + return ret; 818 + } 819 + 820 + static int cy8c95x0_gpio_get_multiple(struct gpio_chip *gc, 821 + unsigned long *mask, unsigned long *bits) 822 + { 823 + struct cy8c95x0_pinctrl *chip = gpiochip_get_data(gc); 824 + 825 + return cy8c95x0_read_regs_mask(chip, CY8C95X0_INPUT, bits, mask); 826 + } 827 + 828 + static void cy8c95x0_gpio_set_multiple(struct gpio_chip *gc, 829 + unsigned long *mask, unsigned long *bits) 830 + { 831 + struct cy8c95x0_pinctrl *chip = gpiochip_get_data(gc); 832 + 833 + cy8c95x0_write_regs_mask(chip, CY8C95X0_OUTPUT, bits, mask); 834 + } 835 + 836 + static int cy8c95x0_add_pin_ranges(struct gpio_chip *gc) 837 + { 838 + struct cy8c95x0_pinctrl *chip = gpiochip_get_data(gc); 839 + struct device *dev = chip->dev; 840 + int ret; 841 + 842 + ret = gpiochip_add_pin_range(gc, dev_name(dev), 0, 0, chip->tpin); 843 + if (ret) 844 + dev_err(dev, "failed to add GPIO pin range\n"); 845 + 846 + return ret; 847 + } 848 + 849 + static int cy8c95x0_setup_gpiochip(struct cy8c95x0_pinctrl *chip) 850 + { 851 + struct gpio_chip *gc = &chip->gpio_chip; 852 + 853 + gc->direction_input = cy8c95x0_gpio_direction_input; 854 + gc->direction_output = cy8c95x0_gpio_direction_output; 855 + gc->get = cy8c95x0_gpio_get_value; 856 + gc->set = cy8c95x0_gpio_set_value; 857 + gc->get_direction = cy8c95x0_gpio_get_direction; 858 + gc->get_multiple = cy8c95x0_gpio_get_multiple; 859 + gc->set_multiple = cy8c95x0_gpio_set_multiple; 860 + gc->set_config = gpiochip_generic_config, 861 + gc->can_sleep = true; 862 + gc->add_pin_ranges = cy8c95x0_add_pin_ranges; 863 + 864 + gc->base = -1; 865 + gc->ngpio = chip->tpin; 866 + 867 + gc->parent = chip->dev; 868 + gc->owner = THIS_MODULE; 869 + gc->names = NULL; 870 + 871 + gc->label = dev_name(chip->dev); 872 + 873 + return devm_gpiochip_add_data(chip->dev, gc, chip); 874 + } 875 + 876 + static void cy8c95x0_irq_mask(struct irq_data *d) 877 + { 878 + struct gpio_chip *gc = irq_data_get_irq_chip_data(d); 879 + struct cy8c95x0_pinctrl *chip = gpiochip_get_data(gc); 880 + irq_hw_number_t hwirq = irqd_to_hwirq(d); 881 + 882 + set_bit(hwirq, chip->irq_mask); 883 + gpiochip_disable_irq(gc, hwirq); 884 + } 885 + 886 + static void cy8c95x0_irq_unmask(struct irq_data *d) 887 + { 888 + struct gpio_chip *gc = irq_data_get_irq_chip_data(d); 889 + struct cy8c95x0_pinctrl *chip = gpiochip_get_data(gc); 890 + irq_hw_number_t hwirq = irqd_to_hwirq(d); 891 + 892 + gpiochip_enable_irq(gc, hwirq); 893 + clear_bit(hwirq, chip->irq_mask); 894 + } 895 + 896 + static void cy8c95x0_irq_bus_lock(struct irq_data *d) 897 + { 898 + struct gpio_chip *gc = irq_data_get_irq_chip_data(d); 899 + struct cy8c95x0_pinctrl *chip = gpiochip_get_data(gc); 900 + 901 + mutex_lock(&chip->irq_lock); 902 + } 903 + 904 + static void cy8c95x0_irq_bus_sync_unlock(struct irq_data *d) 905 + { 906 + struct gpio_chip *gc = irq_data_get_irq_chip_data(d); 907 + struct cy8c95x0_pinctrl *chip = gpiochip_get_data(gc); 908 + DECLARE_BITMAP(ones, MAX_LINE); 909 + DECLARE_BITMAP(irq_mask, MAX_LINE); 910 + DECLARE_BITMAP(reg_direction, MAX_LINE); 911 + 912 + bitmap_fill(ones, MAX_LINE); 913 + 914 + cy8c95x0_write_regs_mask(chip, CY8C95X0_INTMASK, chip->irq_mask, ones); 915 + 916 + /* Switch direction to input if needed */ 917 + cy8c95x0_read_regs_mask(chip, CY8C95X0_DIRECTION, reg_direction, chip->irq_mask); 918 + bitmap_or(irq_mask, chip->irq_mask, reg_direction, MAX_LINE); 919 + bitmap_complement(irq_mask, irq_mask, MAX_LINE); 920 + 921 + /* Look for any newly setup interrupt */ 922 + cy8c95x0_write_regs_mask(chip, CY8C95X0_DIRECTION, ones, irq_mask); 923 + 924 + mutex_unlock(&chip->irq_lock); 925 + } 926 + 927 + static int cy8c95x0_irq_set_type(struct irq_data *d, unsigned int type) 928 + { 929 + struct gpio_chip *gc = irq_data_get_irq_chip_data(d); 930 + struct cy8c95x0_pinctrl *chip = gpiochip_get_data(gc); 931 + irq_hw_number_t hwirq = irqd_to_hwirq(d); 932 + unsigned int trig_type; 933 + 934 + switch (type) { 935 + case IRQ_TYPE_EDGE_RISING: 936 + case IRQ_TYPE_EDGE_FALLING: 937 + case IRQ_TYPE_EDGE_BOTH: 938 + trig_type = type; 939 + break; 940 + case IRQ_TYPE_LEVEL_HIGH: 941 + trig_type = IRQ_TYPE_EDGE_RISING; 942 + break; 943 + case IRQ_TYPE_LEVEL_LOW: 944 + trig_type = IRQ_TYPE_EDGE_FALLING; 945 + break; 946 + default: 947 + dev_err(chip->dev, "irq %d: unsupported type %d\n", d->irq, type); 948 + return -EINVAL; 949 + } 950 + 951 + assign_bit(hwirq, chip->irq_trig_fall, trig_type & IRQ_TYPE_EDGE_FALLING); 952 + assign_bit(hwirq, chip->irq_trig_raise, trig_type & IRQ_TYPE_EDGE_RISING); 953 + assign_bit(hwirq, chip->irq_trig_low, type == IRQ_TYPE_LEVEL_LOW); 954 + assign_bit(hwirq, chip->irq_trig_high, type == IRQ_TYPE_LEVEL_HIGH); 955 + 956 + return 0; 957 + } 958 + 959 + static void cy8c95x0_irq_shutdown(struct irq_data *d) 960 + { 961 + struct gpio_chip *gc = irq_data_get_irq_chip_data(d); 962 + struct cy8c95x0_pinctrl *chip = gpiochip_get_data(gc); 963 + irq_hw_number_t hwirq = irqd_to_hwirq(d); 964 + 965 + clear_bit(hwirq, chip->irq_trig_raise); 966 + clear_bit(hwirq, chip->irq_trig_fall); 967 + clear_bit(hwirq, chip->irq_trig_low); 968 + clear_bit(hwirq, chip->irq_trig_high); 969 + } 970 + 971 + static const struct irq_chip cy8c95x0_irqchip = { 972 + .name = "cy8c95x0-irq", 973 + .irq_mask = cy8c95x0_irq_mask, 974 + .irq_unmask = cy8c95x0_irq_unmask, 975 + .irq_bus_lock = cy8c95x0_irq_bus_lock, 976 + .irq_bus_sync_unlock = cy8c95x0_irq_bus_sync_unlock, 977 + .irq_set_type = cy8c95x0_irq_set_type, 978 + .irq_shutdown = cy8c95x0_irq_shutdown, 979 + .flags = IRQCHIP_IMMUTABLE, 980 + GPIOCHIP_IRQ_RESOURCE_HELPERS, 981 + }; 982 + 983 + static bool cy8c95x0_irq_pending(struct cy8c95x0_pinctrl *chip, unsigned long *pending) 984 + { 985 + DECLARE_BITMAP(ones, MAX_LINE); 986 + DECLARE_BITMAP(cur_stat, MAX_LINE); 987 + DECLARE_BITMAP(new_stat, MAX_LINE); 988 + DECLARE_BITMAP(trigger, MAX_LINE); 989 + 990 + bitmap_fill(ones, MAX_LINE); 991 + 992 + /* Read the current interrupt status from the device */ 993 + if (cy8c95x0_read_regs_mask(chip, CY8C95X0_INTSTATUS, trigger, ones)) 994 + return false; 995 + 996 + /* Check latched inputs */ 997 + if (cy8c95x0_read_regs_mask(chip, CY8C95X0_INPUT, cur_stat, trigger)) 998 + return false; 999 + 1000 + /* Apply filter for rising/falling edge selection */ 1001 + bitmap_replace(new_stat, chip->irq_trig_fall, chip->irq_trig_raise, 1002 + cur_stat, MAX_LINE); 1003 + 1004 + bitmap_and(pending, new_stat, trigger, MAX_LINE); 1005 + 1006 + return !bitmap_empty(pending, MAX_LINE); 1007 + } 1008 + 1009 + static irqreturn_t cy8c95x0_irq_handler(int irq, void *devid) 1010 + { 1011 + struct cy8c95x0_pinctrl *chip = devid; 1012 + struct gpio_chip *gc = &chip->gpio_chip; 1013 + DECLARE_BITMAP(pending, MAX_LINE); 1014 + int nested_irq, level; 1015 + bool ret; 1016 + 1017 + ret = cy8c95x0_irq_pending(chip, pending); 1018 + if (!ret) 1019 + return IRQ_RETVAL(0); 1020 + 1021 + ret = 0; 1022 + for_each_set_bit(level, pending, MAX_LINE) { 1023 + /* Already accounted for 4bit gap in GPort2 */ 1024 + nested_irq = irq_find_mapping(gc->irq.domain, level); 1025 + 1026 + if (unlikely(nested_irq <= 0)) { 1027 + dev_warn_ratelimited(gc->parent, "unmapped interrupt %d\n", level); 1028 + continue; 1029 + } 1030 + 1031 + if (test_bit(level, chip->irq_trig_low)) 1032 + while (!cy8c95x0_gpio_get_value(gc, level)) 1033 + handle_nested_irq(nested_irq); 1034 + else if (test_bit(level, chip->irq_trig_high)) 1035 + while (cy8c95x0_gpio_get_value(gc, level)) 1036 + handle_nested_irq(nested_irq); 1037 + else 1038 + handle_nested_irq(nested_irq); 1039 + 1040 + ret = 1; 1041 + } 1042 + 1043 + return IRQ_RETVAL(ret); 1044 + } 1045 + 1046 + static int cy8c95x0_pinctrl_get_groups_count(struct pinctrl_dev *pctldev) 1047 + { 1048 + struct cy8c95x0_pinctrl *chip = pinctrl_dev_get_drvdata(pctldev); 1049 + 1050 + return chip->tpin; 1051 + } 1052 + 1053 + static const char *cy8c95x0_pinctrl_get_group_name(struct pinctrl_dev *pctldev, 1054 + unsigned int group) 1055 + { 1056 + return cy8c95x0_groups[group]; 1057 + } 1058 + 1059 + static int cy8c95x0_pinctrl_get_group_pins(struct pinctrl_dev *pctldev, 1060 + unsigned int group, 1061 + const unsigned int **pins, 1062 + unsigned int *num_pins) 1063 + { 1064 + *pins = &cy8c9560_pins[group].number; 1065 + *num_pins = 1; 1066 + return 0; 1067 + } 1068 + 1069 + static const char *cy8c95x0_get_fname(unsigned int selector) 1070 + { 1071 + if (selector == 0) 1072 + return "gpio"; 1073 + else 1074 + return "pwm"; 1075 + } 1076 + 1077 + static void cy8c95x0_pin_dbg_show(struct pinctrl_dev *pctldev, struct seq_file *s, 1078 + unsigned int pin) 1079 + { 1080 + struct cy8c95x0_pinctrl *chip = pinctrl_dev_get_drvdata(pctldev); 1081 + DECLARE_BITMAP(mask, MAX_LINE); 1082 + DECLARE_BITMAP(pwm, MAX_LINE); 1083 + 1084 + bitmap_zero(mask, MAX_LINE); 1085 + __set_bit(pin, mask); 1086 + 1087 + if (cy8c95x0_read_regs_mask(chip, CY8C95X0_PWMSEL, pwm, mask)) { 1088 + seq_puts(s, "not available"); 1089 + return; 1090 + } 1091 + 1092 + seq_printf(s, "MODE:%s", cy8c95x0_get_fname(test_bit(pin, pwm))); 1093 + } 1094 + 1095 + static const struct pinctrl_ops cy8c95x0_pinctrl_ops = { 1096 + .get_groups_count = cy8c95x0_pinctrl_get_groups_count, 1097 + .get_group_name = cy8c95x0_pinctrl_get_group_name, 1098 + .get_group_pins = cy8c95x0_pinctrl_get_group_pins, 1099 + #ifdef CONFIG_OF 1100 + .dt_node_to_map = pinconf_generic_dt_node_to_map_pin, 1101 + .dt_free_map = pinconf_generic_dt_free_map, 1102 + #endif 1103 + .pin_dbg_show = cy8c95x0_pin_dbg_show, 1104 + }; 1105 + 1106 + static const char *cy8c95x0_get_function_name(struct pinctrl_dev *pctldev, unsigned int selector) 1107 + { 1108 + return cy8c95x0_get_fname(selector); 1109 + } 1110 + 1111 + static int cy8c95x0_get_functions_count(struct pinctrl_dev *pctldev) 1112 + { 1113 + return 2; 1114 + } 1115 + 1116 + static int cy8c95x0_get_function_groups(struct pinctrl_dev *pctldev, unsigned int selector, 1117 + const char * const **groups, 1118 + unsigned int * const num_groups) 1119 + { 1120 + struct cy8c95x0_pinctrl *chip = pinctrl_dev_get_drvdata(pctldev); 1121 + 1122 + *groups = cy8c95x0_groups; 1123 + *num_groups = chip->tpin; 1124 + return 0; 1125 + } 1126 + 1127 + static int cy8c95x0_pinmux_cfg(struct cy8c95x0_pinctrl *chip, 1128 + unsigned int val, 1129 + unsigned long off) 1130 + { 1131 + u8 port = cypress_get_port(chip, off); 1132 + u8 bit = cypress_get_pin_mask(chip, off); 1133 + int ret; 1134 + 1135 + /* Select port */ 1136 + ret = regmap_write(chip->regmap, CY8C95X0_PORTSEL, port); 1137 + if (ret < 0) 1138 + return ret; 1139 + 1140 + ret = regmap_write_bits(chip->regmap, CY8C95X0_PWMSEL, bit, val ? bit : 0); 1141 + if (ret < 0) 1142 + return ret; 1143 + 1144 + /* Set direction to output & set output to 1 so that PWM can work */ 1145 + ret = regmap_write_bits(chip->regmap, CY8C95X0_DIRECTION, bit, bit); 1146 + if (ret < 0) 1147 + return ret; 1148 + 1149 + return regmap_write_bits(chip->regmap, CY8C95X0_OUTPUT_(port), bit, bit); 1150 + } 1151 + 1152 + static int cy8c95x0_set_mux(struct pinctrl_dev *pctldev, unsigned int selector, 1153 + unsigned int group) 1154 + { 1155 + struct cy8c95x0_pinctrl *chip = pinctrl_dev_get_drvdata(pctldev); 1156 + int ret; 1157 + 1158 + mutex_lock(&chip->i2c_lock); 1159 + ret = cy8c95x0_pinmux_cfg(chip, selector, group); 1160 + mutex_unlock(&chip->i2c_lock); 1161 + 1162 + return ret; 1163 + } 1164 + 1165 + static const struct pinmux_ops cy8c95x0_pmxops = { 1166 + .get_functions_count = cy8c95x0_get_functions_count, 1167 + .get_function_name = cy8c95x0_get_function_name, 1168 + .get_function_groups = cy8c95x0_get_function_groups, 1169 + .set_mux = cy8c95x0_set_mux, 1170 + .strict = true, 1171 + }; 1172 + 1173 + static int cy8c95x0_pinconf_get(struct pinctrl_dev *pctldev, unsigned int pin, 1174 + unsigned long *config) 1175 + { 1176 + struct cy8c95x0_pinctrl *chip = pinctrl_dev_get_drvdata(pctldev); 1177 + 1178 + return cy8c95x0_gpio_get_pincfg(chip, pin, config); 1179 + } 1180 + 1181 + static int cy8c95x0_pinconf_set(struct pinctrl_dev *pctldev, unsigned int pin, 1182 + unsigned long *configs, unsigned int num_configs) 1183 + { 1184 + struct cy8c95x0_pinctrl *chip = pinctrl_dev_get_drvdata(pctldev); 1185 + int ret = 0; 1186 + int i; 1187 + 1188 + for (i = 0; i < num_configs; i++) { 1189 + ret = cy8c95x0_gpio_set_pincfg(chip, pin, configs[i]); 1190 + if (ret) 1191 + return ret; 1192 + } 1193 + 1194 + return ret; 1195 + } 1196 + 1197 + static const struct pinconf_ops cy8c95x0_pinconf_ops = { 1198 + .pin_config_get = cy8c95x0_pinconf_get, 1199 + .pin_config_set = cy8c95x0_pinconf_set, 1200 + .is_generic = true, 1201 + }; 1202 + 1203 + static int cy8c95x0_irq_setup(struct cy8c95x0_pinctrl *chip, int irq) 1204 + { 1205 + struct gpio_irq_chip *girq = &chip->gpio_chip.irq; 1206 + DECLARE_BITMAP(pending_irqs, MAX_LINE); 1207 + int ret; 1208 + 1209 + mutex_init(&chip->irq_lock); 1210 + 1211 + bitmap_zero(pending_irqs, MAX_LINE); 1212 + 1213 + /* Read IRQ status register to clear all pending interrupts */ 1214 + ret = cy8c95x0_irq_pending(chip, pending_irqs); 1215 + if (ret) { 1216 + dev_err(chip->dev, "failed to clear irq status register\n"); 1217 + return ret; 1218 + } 1219 + 1220 + /* Mask all interrupts */ 1221 + bitmap_fill(chip->irq_mask, MAX_LINE); 1222 + 1223 + gpio_irq_chip_set_chip(girq, &cy8c95x0_irqchip); 1224 + 1225 + /* This will let us handle the parent IRQ in the driver */ 1226 + girq->parent_handler = NULL; 1227 + girq->num_parents = 0; 1228 + girq->parents = NULL; 1229 + girq->default_type = IRQ_TYPE_NONE; 1230 + girq->handler = handle_simple_irq; 1231 + girq->threaded = true; 1232 + 1233 + ret = devm_request_threaded_irq(chip->dev, irq, 1234 + NULL, cy8c95x0_irq_handler, 1235 + IRQF_ONESHOT | IRQF_SHARED | IRQF_TRIGGER_HIGH, 1236 + dev_name(chip->dev), chip); 1237 + if (ret) { 1238 + dev_err(chip->dev, "failed to request irq %d\n", irq); 1239 + return ret; 1240 + } 1241 + dev_info(chip->dev, "Registered threaded IRQ\n"); 1242 + 1243 + return 0; 1244 + } 1245 + 1246 + static int cy8c95x0_setup_pinctrl(struct cy8c95x0_pinctrl *chip) 1247 + { 1248 + struct pinctrl_desc *pd = &chip->pinctrl_desc; 1249 + 1250 + pd->pctlops = &cy8c95x0_pinctrl_ops; 1251 + pd->confops = &cy8c95x0_pinconf_ops; 1252 + pd->pmxops = &cy8c95x0_pmxops; 1253 + pd->name = dev_name(chip->dev); 1254 + pd->pins = cy8c9560_pins; 1255 + pd->npins = chip->tpin; 1256 + pd->owner = THIS_MODULE; 1257 + 1258 + chip->pctldev = devm_pinctrl_register(chip->dev, pd, chip); 1259 + if (IS_ERR(chip->pctldev)) 1260 + return dev_err_probe(chip->dev, PTR_ERR(chip->pctldev), 1261 + "can't register controller\n"); 1262 + 1263 + return 0; 1264 + } 1265 + 1266 + static int cy8c95x0_detect(struct i2c_client *client, 1267 + struct i2c_board_info *info) 1268 + { 1269 + struct i2c_adapter *adapter = client->adapter; 1270 + int ret; 1271 + const char *name; 1272 + 1273 + if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA)) 1274 + return -ENODEV; 1275 + 1276 + ret = i2c_smbus_read_byte_data(client, CY8C95X0_DEVID); 1277 + if (ret < 0) 1278 + return ret; 1279 + switch (ret & GENMASK(7, 4)) { 1280 + case 0x20: 1281 + name = cy8c95x0_id[0].name; 1282 + break; 1283 + case 0x40: 1284 + name = cy8c95x0_id[1].name; 1285 + break; 1286 + case 0x60: 1287 + name = cy8c95x0_id[2].name; 1288 + break; 1289 + default: 1290 + return -ENODEV; 1291 + } 1292 + 1293 + dev_info(&client->dev, "Found a %s chip at 0x%02x.\n", name, client->addr); 1294 + strscpy(info->type, name, I2C_NAME_SIZE); 1295 + 1296 + return 0; 1297 + } 1298 + 1299 + static int cy8c95x0_probe(struct i2c_client *client) 1300 + { 1301 + struct cy8c95x0_pinctrl *chip; 1302 + struct regulator *reg; 1303 + int ret; 1304 + 1305 + chip = devm_kzalloc(&client->dev, sizeof(*chip), GFP_KERNEL); 1306 + if (!chip) 1307 + return -ENOMEM; 1308 + 1309 + chip->dev = &client->dev; 1310 + 1311 + /* Set the device type */ 1312 + chip->driver_data = (unsigned long)device_get_match_data(&client->dev); 1313 + if (!chip->driver_data) 1314 + chip->driver_data = i2c_match_id(cy8c95x0_id, client)->driver_data; 1315 + if (!chip->driver_data) 1316 + return -ENODEV; 1317 + 1318 + i2c_set_clientdata(client, chip); 1319 + 1320 + chip->tpin = chip->driver_data & CY8C95X0_GPIO_MASK; 1321 + chip->nport = DIV_ROUND_UP(CY8C95X0_PIN_TO_OFFSET(chip->tpin), BANK_SZ); 1322 + 1323 + switch (chip->tpin) { 1324 + case 20: 1325 + strscpy(chip->name, cy8c95x0_id[0].name, I2C_NAME_SIZE); 1326 + break; 1327 + case 40: 1328 + strscpy(chip->name, cy8c95x0_id[1].name, I2C_NAME_SIZE); 1329 + break; 1330 + case 60: 1331 + strscpy(chip->name, cy8c95x0_id[2].name, I2C_NAME_SIZE); 1332 + break; 1333 + default: 1334 + return -ENODEV; 1335 + } 1336 + 1337 + reg = devm_regulator_get(&client->dev, "vdd"); 1338 + if (IS_ERR(reg)) { 1339 + if (PTR_ERR(reg) == -EPROBE_DEFER) 1340 + return -EPROBE_DEFER; 1341 + } else { 1342 + ret = regulator_enable(reg); 1343 + if (ret) { 1344 + dev_err(&client->dev, "failed to enable regulator vdd: %d\n", ret); 1345 + return ret; 1346 + } 1347 + chip->regulator = reg; 1348 + } 1349 + 1350 + chip->regmap = devm_regmap_init_i2c(client, &cy8c95x0_i2c_regmap); 1351 + if (IS_ERR(chip->regmap)) { 1352 + ret = PTR_ERR(chip->regmap); 1353 + goto err_exit; 1354 + } 1355 + 1356 + bitmap_zero(chip->push_pull, MAX_LINE); 1357 + bitmap_zero(chip->shiftmask, MAX_LINE); 1358 + bitmap_set(chip->shiftmask, 0, 20); 1359 + mutex_init(&chip->i2c_lock); 1360 + 1361 + if (dmi_first_match(cy8c95x0_dmi_acpi_irq_info)) { 1362 + ret = cy8c95x0_acpi_get_irq(&client->dev); 1363 + if (ret > 0) 1364 + client->irq = ret; 1365 + } 1366 + 1367 + if (client->irq) { 1368 + ret = cy8c95x0_irq_setup(chip, client->irq); 1369 + if (ret) 1370 + goto err_exit; 1371 + } 1372 + 1373 + ret = cy8c95x0_setup_pinctrl(chip); 1374 + if (ret) 1375 + goto err_exit; 1376 + 1377 + ret = cy8c95x0_setup_gpiochip(chip); 1378 + if (ret) 1379 + goto err_exit; 1380 + 1381 + return 0; 1382 + 1383 + err_exit: 1384 + if (!IS_ERR_OR_NULL(chip->regulator)) 1385 + regulator_disable(chip->regulator); 1386 + return ret; 1387 + } 1388 + 1389 + static void cy8c95x0_remove(struct i2c_client *client) 1390 + { 1391 + struct cy8c95x0_pinctrl *chip = i2c_get_clientdata(client); 1392 + 1393 + if (!IS_ERR_OR_NULL(chip->regulator)) 1394 + regulator_disable(chip->regulator); 1395 + } 1396 + 1397 + static const struct acpi_device_id cy8c95x0_acpi_ids[] = { 1398 + { "INT3490", 40, }, 1399 + { } 1400 + }; 1401 + MODULE_DEVICE_TABLE(acpi, cy8c95x0_acpi_ids); 1402 + 1403 + static struct i2c_driver cy8c95x0_driver = { 1404 + .driver = { 1405 + .name = "cy8c95x0-pinctrl", 1406 + .of_match_table = cy8c95x0_dt_ids, 1407 + .acpi_match_table = cy8c95x0_acpi_ids, 1408 + }, 1409 + .probe_new = cy8c95x0_probe, 1410 + .remove = cy8c95x0_remove, 1411 + .id_table = cy8c95x0_id, 1412 + .detect = cy8c95x0_detect, 1413 + }; 1414 + module_i2c_driver(cy8c95x0_driver); 1415 + 1416 + MODULE_AUTHOR("Patrick Rudolph <patrick.rudolph@9elements.com>"); 1417 + MODULE_AUTHOR("Naresh Solanki <naresh.solanki@9elements.com>"); 1418 + MODULE_DESCRIPTION("Pinctrl driver for CY8C95X0"); 1419 + MODULE_LICENSE("GPL");
+17 -14
drivers/pinctrl/pinctrl-ingenic.c
··· 12 12 #include <linux/interrupt.h> 13 13 #include <linux/io.h> 14 14 #include <linux/kernel.h> 15 - #include <linux/of_device.h> 16 - #include <linux/of_irq.h> 17 - #include <linux/of_platform.h> 15 + #include <linux/mod_devicetable.h> 16 + #include <linux/of.h> 18 17 #include <linux/pinctrl/pinctrl.h> 19 18 #include <linux/pinctrl/pinmux.h> 20 19 #include <linux/pinctrl/pinconf.h> 21 20 #include <linux/pinctrl/pinconf-generic.h> 22 21 #include <linux/platform_device.h> 22 + #include <linux/property.h> 23 23 #include <linux/regmap.h> 24 24 #include <linux/seq_file.h> 25 25 #include <linux/slab.h> ··· 4152 4152 }; 4153 4153 4154 4154 static int __init ingenic_gpio_probe(struct ingenic_pinctrl *jzpc, 4155 - struct device_node *node) 4155 + struct fwnode_handle *fwnode) 4156 4156 { 4157 4157 struct ingenic_gpio_chip *jzgc; 4158 4158 struct device *dev = jzpc->dev; ··· 4160 4160 unsigned int bank; 4161 4161 int err; 4162 4162 4163 - err = of_property_read_u32(node, "reg", &bank); 4163 + err = fwnode_property_read_u32(fwnode, "reg", &bank); 4164 4164 if (err) { 4165 4165 dev_err(dev, "Cannot read \"reg\" property: %i\n", err); 4166 4166 return err; ··· 4185 4185 4186 4186 jzgc->gc.ngpio = 32; 4187 4187 jzgc->gc.parent = dev; 4188 - jzgc->gc.of_node = node; 4188 + jzgc->gc.fwnode = fwnode; 4189 4189 jzgc->gc.owner = THIS_MODULE; 4190 4190 4191 4191 jzgc->gc.set = ingenic_gpio_set; ··· 4196 4196 jzgc->gc.request = gpiochip_generic_request; 4197 4197 jzgc->gc.free = gpiochip_generic_free; 4198 4198 4199 - jzgc->irq = irq_of_parse_and_map(node, 0); 4200 - if (!jzgc->irq) 4199 + err = fwnode_irq_get(fwnode, 0); 4200 + if (err < 0) 4201 + return err; 4202 + if (!err) 4201 4203 return -EINVAL; 4204 + jzgc->irq = err; 4202 4205 4203 4206 girq = &jzgc->gc.irq; 4204 4207 gpio_irq_chip_set_chip(girq, &ingenic_gpio_irqchip); ··· 4230 4227 struct pinctrl_desc *pctl_desc; 4231 4228 void __iomem *base; 4232 4229 const struct ingenic_chip_info *chip_info; 4233 - struct device_node *node; 4234 4230 struct regmap_config regmap_config; 4231 + struct fwnode_handle *fwnode; 4235 4232 unsigned int i; 4236 4233 int err; 4237 4234 4238 - chip_info = of_device_get_match_data(dev); 4235 + chip_info = device_get_match_data(dev); 4239 4236 if (!chip_info) { 4240 4237 dev_err(dev, "Unsupported SoC\n"); 4241 4238 return -EINVAL; ··· 4322 4319 4323 4320 dev_set_drvdata(dev, jzpc->map); 4324 4321 4325 - for_each_child_of_node(dev->of_node, node) { 4326 - if (of_match_node(ingenic_gpio_of_matches, node)) { 4327 - err = ingenic_gpio_probe(jzpc, node); 4322 + device_for_each_child_node(dev, fwnode) { 4323 + if (of_match_node(ingenic_gpio_of_matches, to_of_node(fwnode))) { 4324 + err = ingenic_gpio_probe(jzpc, fwnode); 4328 4325 if (err) { 4329 - of_node_put(node); 4326 + fwnode_handle_put(fwnode); 4330 4327 return err; 4331 4328 } 4332 4329 }
-3
drivers/pinctrl/pinctrl-mcp23s08.c
··· 549 549 mcp->chip.get = mcp23s08_get; 550 550 mcp->chip.direction_output = mcp23s08_direction_output; 551 551 mcp->chip.set = mcp23s08_set; 552 - #ifdef CONFIG_OF_GPIO 553 - mcp->chip.of_gpio_n_cells = 2; 554 - #endif 555 552 556 553 mcp->chip.base = base; 557 554 mcp->chip.can_sleep = true;
+3 -2
drivers/pinctrl/pinctrl-microchip-sgpio.c
··· 865 865 gc->can_sleep = !bank->is_input; 866 866 867 867 if (bank->is_input && priv->properties->flags & SGPIO_FLAGS_HAS_IRQ) { 868 - int irq = fwnode_irq_get(fwnode, 0); 868 + int irq; 869 869 870 - if (irq) { 870 + irq = fwnode_irq_get(fwnode, 0); 871 + if (irq > 0) { 871 872 struct gpio_irq_chip *girq = &gc->irq; 872 873 873 874 gpio_irq_chip_set_chip(girq, &microchip_sgpio_irqchip);
+2
drivers/pinctrl/pinctrl-ocelot.c
··· 2129 2129 .remove = ocelot_pinctrl_remove, 2130 2130 }; 2131 2131 module_platform_driver(ocelot_pinctrl_driver); 2132 + 2133 + MODULE_DESCRIPTION("Ocelot Chip Pinctrl Driver"); 2132 2134 MODULE_LICENSE("Dual MIT/GPL");
+16 -11
drivers/pinctrl/pinctrl-pistachio.c
··· 10 10 #include <linux/interrupt.h> 11 11 #include <linux/io.h> 12 12 #include <linux/irq.h> 13 - #include <linux/of.h> 14 - #include <linux/of_irq.h> 13 + #include <linux/mod_devicetable.h> 15 14 #include <linux/pinctrl/pinconf.h> 16 15 #include <linux/pinctrl/pinconf-generic.h> 17 16 #include <linux/pinctrl/pinctrl.h> 18 17 #include <linux/pinctrl/pinmux.h> 19 18 #include <linux/platform_device.h> 19 + #include <linux/property.h> 20 20 #include <linux/slab.h> 21 21 #include <linux/spinlock.h> 22 22 ··· 1347 1347 1348 1348 static int pistachio_gpio_register(struct pistachio_pinctrl *pctl) 1349 1349 { 1350 - struct device_node *node = pctl->dev->of_node; 1351 1350 struct pistachio_gpio_bank *bank; 1352 1351 unsigned int i; 1353 1352 int irq, ret = 0; 1354 1353 1355 1354 for (i = 0; i < pctl->nbanks; i++) { 1356 1355 char child_name[sizeof("gpioXX")]; 1357 - struct device_node *child; 1356 + struct fwnode_handle *child; 1358 1357 struct gpio_irq_chip *girq; 1359 1358 1360 1359 snprintf(child_name, sizeof(child_name), "gpio%d", i); 1361 - child = of_get_child_by_name(node, child_name); 1360 + child = device_get_named_child_node(pctl->dev, child_name); 1362 1361 if (!child) { 1363 1362 dev_err(pctl->dev, "No node for bank %u\n", i); 1364 1363 ret = -ENODEV; 1365 1364 goto err; 1366 1365 } 1367 1366 1368 - if (!of_find_property(child, "gpio-controller", NULL)) { 1367 + if (!fwnode_property_present(child, "gpio-controller")) { 1368 + fwnode_handle_put(child); 1369 1369 dev_err(pctl->dev, 1370 1370 "No gpio-controller property for bank %u\n", i); 1371 - of_node_put(child); 1372 1371 ret = -ENODEV; 1373 1372 goto err; 1374 1373 } 1375 1374 1376 - irq = irq_of_parse_and_map(child, 0); 1377 - if (!irq) { 1375 + ret = fwnode_irq_get(child, 0); 1376 + if (ret < 0) { 1377 + fwnode_handle_put(child); 1378 + dev_err(pctl->dev, "Failed to retrieve IRQ for bank %u\n", i); 1379 + goto err; 1380 + } 1381 + if (!ret) { 1382 + fwnode_handle_put(child); 1378 1383 dev_err(pctl->dev, "No IRQ for bank %u\n", i); 1379 - of_node_put(child); 1380 1384 ret = -EINVAL; 1381 1385 goto err; 1382 1386 } 1387 + irq = ret; 1383 1388 1384 1389 bank = &pctl->gpio_banks[i]; 1385 1390 bank->pctl = pctl; 1386 1391 bank->base = pctl->base + GPIO_BANK_BASE(i); 1387 1392 1388 1393 bank->gpio_chip.parent = pctl->dev; 1389 - bank->gpio_chip.of_node = child; 1394 + bank->gpio_chip.fwnode = child; 1390 1395 1391 1396 girq = &bank->gpio_chip.irq; 1392 1397 girq->chip = &bank->irq_chip;
+339 -7
drivers/pinctrl/pinctrl-rockchip.c
··· 57 57 #define IOMUX_UNROUTED BIT(3) 58 58 #define IOMUX_WIDTH_3BIT BIT(4) 59 59 #define IOMUX_WIDTH_2BIT BIT(5) 60 + #define IOMUX_L_SOURCE_PMU BIT(6) 60 61 61 62 #define PIN_BANK(id, pins, label) \ 62 63 { \ ··· 146 145 .pull_type[1] = pull1, \ 147 146 .pull_type[2] = pull2, \ 148 147 .pull_type[3] = pull3, \ 148 + } 149 + 150 + #define PIN_BANK_IOMUX_FLAGS_OFFSET(id, pins, label, iom0, iom1, iom2, \ 151 + iom3, offset0, offset1, offset2, \ 152 + offset3) \ 153 + { \ 154 + .bank_num = id, \ 155 + .nr_pins = pins, \ 156 + .name = label, \ 157 + .iomux = { \ 158 + { .type = iom0, .offset = offset0 }, \ 159 + { .type = iom1, .offset = offset1 }, \ 160 + { .type = iom2, .offset = offset2 }, \ 161 + { .type = iom3, .offset = offset3 }, \ 162 + }, \ 149 163 } 150 164 151 165 #define PIN_BANK_IOMUX_DRV_FLAGS_OFFSET(id, pins, label, iom0, iom1, \ ··· 459 443 }, 460 444 }; 461 445 446 + static struct rockchip_mux_recalced_data rv1126_mux_recalced_data[] = { 447 + { 448 + .num = 0, 449 + .pin = 20, 450 + .reg = 0x10000, 451 + .bit = 0, 452 + .mask = 0xf 453 + }, 454 + { 455 + .num = 0, 456 + .pin = 21, 457 + .reg = 0x10000, 458 + .bit = 4, 459 + .mask = 0xf 460 + }, 461 + { 462 + .num = 0, 463 + .pin = 22, 464 + .reg = 0x10000, 465 + .bit = 8, 466 + .mask = 0xf 467 + }, 468 + { 469 + .num = 0, 470 + .pin = 23, 471 + .reg = 0x10000, 472 + .bit = 12, 473 + .mask = 0xf 474 + }, 475 + }; 476 + 462 477 static struct rockchip_mux_recalced_data rk3128_mux_recalced_data[] = { 463 478 { 464 479 .num = 2, ··· 687 640 RK_MUXROUTE_SAME(2, RK_PB6, 2, 0x184, BIT(16 + 10) | BIT(10)), /* uart2-rxm1 */ 688 641 RK_MUXROUTE_SAME(0, RK_PC1, 2, 0x184, BIT(16 + 9)), /* uart3-rxm0 */ 689 642 RK_MUXROUTE_SAME(1, RK_PB7, 2, 0x184, BIT(16 + 9) | BIT(9)), /* uart3-rxm1 */ 643 + }; 644 + 645 + static struct rockchip_mux_route_data rv1126_mux_route_data[] = { 646 + RK_MUXROUTE_GRF(3, RK_PD2, 1, 0x10260, WRITE_MASK_VAL(0, 0, 0)), /* I2S0_MCLK_M0 */ 647 + RK_MUXROUTE_GRF(3, RK_PB0, 3, 0x10260, WRITE_MASK_VAL(0, 0, 1)), /* I2S0_MCLK_M1 */ 648 + 649 + RK_MUXROUTE_GRF(0, RK_PD4, 4, 0x10260, WRITE_MASK_VAL(3, 2, 0)), /* I2S1_MCLK_M0 */ 650 + RK_MUXROUTE_GRF(1, RK_PD5, 2, 0x10260, WRITE_MASK_VAL(3, 2, 1)), /* I2S1_MCLK_M1 */ 651 + RK_MUXROUTE_GRF(2, RK_PC7, 6, 0x10260, WRITE_MASK_VAL(3, 2, 2)), /* I2S1_MCLK_M2 */ 652 + 653 + RK_MUXROUTE_GRF(1, RK_PD0, 1, 0x10260, WRITE_MASK_VAL(4, 4, 0)), /* I2S2_MCLK_M0 */ 654 + RK_MUXROUTE_GRF(2, RK_PB3, 2, 0x10260, WRITE_MASK_VAL(4, 4, 1)), /* I2S2_MCLK_M1 */ 655 + 656 + RK_MUXROUTE_GRF(3, RK_PD4, 2, 0x10260, WRITE_MASK_VAL(12, 12, 0)), /* PDM_CLK0_M0 */ 657 + RK_MUXROUTE_GRF(3, RK_PC0, 3, 0x10260, WRITE_MASK_VAL(12, 12, 1)), /* PDM_CLK0_M1 */ 658 + 659 + RK_MUXROUTE_GRF(3, RK_PC6, 1, 0x10264, WRITE_MASK_VAL(0, 0, 0)), /* CIF_CLKOUT_M0 */ 660 + RK_MUXROUTE_GRF(2, RK_PD1, 3, 0x10264, WRITE_MASK_VAL(0, 0, 1)), /* CIF_CLKOUT_M1 */ 661 + 662 + RK_MUXROUTE_GRF(3, RK_PA4, 5, 0x10264, WRITE_MASK_VAL(5, 4, 0)), /* I2C3_SCL_M0 */ 663 + RK_MUXROUTE_GRF(2, RK_PD4, 7, 0x10264, WRITE_MASK_VAL(5, 4, 1)), /* I2C3_SCL_M1 */ 664 + RK_MUXROUTE_GRF(1, RK_PD6, 3, 0x10264, WRITE_MASK_VAL(5, 4, 2)), /* I2C3_SCL_M2 */ 665 + 666 + RK_MUXROUTE_GRF(3, RK_PA0, 7, 0x10264, WRITE_MASK_VAL(6, 6, 0)), /* I2C4_SCL_M0 */ 667 + RK_MUXROUTE_GRF(4, RK_PA0, 4, 0x10264, WRITE_MASK_VAL(6, 6, 1)), /* I2C4_SCL_M1 */ 668 + 669 + RK_MUXROUTE_GRF(2, RK_PA5, 7, 0x10264, WRITE_MASK_VAL(9, 8, 0)), /* I2C5_SCL_M0 */ 670 + RK_MUXROUTE_GRF(3, RK_PB0, 5, 0x10264, WRITE_MASK_VAL(9, 8, 1)), /* I2C5_SCL_M1 */ 671 + RK_MUXROUTE_GRF(1, RK_PD0, 4, 0x10264, WRITE_MASK_VAL(9, 8, 2)), /* I2C5_SCL_M2 */ 672 + 673 + RK_MUXROUTE_GRF(3, RK_PC0, 5, 0x10264, WRITE_MASK_VAL(11, 10, 0)), /* SPI1_CLK_M0 */ 674 + RK_MUXROUTE_GRF(1, RK_PC6, 3, 0x10264, WRITE_MASK_VAL(11, 10, 1)), /* SPI1_CLK_M1 */ 675 + RK_MUXROUTE_GRF(2, RK_PD5, 6, 0x10264, WRITE_MASK_VAL(11, 10, 2)), /* SPI1_CLK_M2 */ 676 + 677 + RK_MUXROUTE_GRF(3, RK_PC0, 2, 0x10264, WRITE_MASK_VAL(12, 12, 0)), /* RGMII_CLK_M0 */ 678 + RK_MUXROUTE_GRF(2, RK_PB7, 2, 0x10264, WRITE_MASK_VAL(12, 12, 1)), /* RGMII_CLK_M1 */ 679 + 680 + RK_MUXROUTE_GRF(3, RK_PA1, 3, 0x10264, WRITE_MASK_VAL(13, 13, 0)), /* CAN_TXD_M0 */ 681 + RK_MUXROUTE_GRF(3, RK_PA7, 5, 0x10264, WRITE_MASK_VAL(13, 13, 1)), /* CAN_TXD_M1 */ 682 + 683 + RK_MUXROUTE_GRF(3, RK_PA4, 6, 0x10268, WRITE_MASK_VAL(0, 0, 0)), /* PWM8_M0 */ 684 + RK_MUXROUTE_GRF(2, RK_PD7, 5, 0x10268, WRITE_MASK_VAL(0, 0, 1)), /* PWM8_M1 */ 685 + 686 + RK_MUXROUTE_GRF(3, RK_PA5, 6, 0x10268, WRITE_MASK_VAL(2, 2, 0)), /* PWM9_M0 */ 687 + RK_MUXROUTE_GRF(2, RK_PD6, 5, 0x10268, WRITE_MASK_VAL(2, 2, 1)), /* PWM9_M1 */ 688 + 689 + RK_MUXROUTE_GRF(3, RK_PA6, 6, 0x10268, WRITE_MASK_VAL(4, 4, 0)), /* PWM10_M0 */ 690 + RK_MUXROUTE_GRF(2, RK_PD5, 5, 0x10268, WRITE_MASK_VAL(4, 4, 1)), /* PWM10_M1 */ 691 + 692 + RK_MUXROUTE_GRF(3, RK_PA7, 6, 0x10268, WRITE_MASK_VAL(6, 6, 0)), /* PWM11_IR_M0 */ 693 + RK_MUXROUTE_GRF(3, RK_PA1, 5, 0x10268, WRITE_MASK_VAL(6, 6, 1)), /* PWM11_IR_M1 */ 694 + 695 + RK_MUXROUTE_GRF(1, RK_PA5, 3, 0x10268, WRITE_MASK_VAL(8, 8, 0)), /* UART2_TX_M0 */ 696 + RK_MUXROUTE_GRF(3, RK_PA2, 1, 0x10268, WRITE_MASK_VAL(8, 8, 1)), /* UART2_TX_M1 */ 697 + 698 + RK_MUXROUTE_GRF(3, RK_PC6, 3, 0x10268, WRITE_MASK_VAL(11, 10, 0)), /* UART3_TX_M0 */ 699 + RK_MUXROUTE_GRF(1, RK_PA7, 2, 0x10268, WRITE_MASK_VAL(11, 10, 1)), /* UART3_TX_M1 */ 700 + RK_MUXROUTE_GRF(3, RK_PA0, 4, 0x10268, WRITE_MASK_VAL(11, 10, 2)), /* UART3_TX_M2 */ 701 + 702 + RK_MUXROUTE_GRF(3, RK_PA4, 4, 0x10268, WRITE_MASK_VAL(13, 12, 0)), /* UART4_TX_M0 */ 703 + RK_MUXROUTE_GRF(2, RK_PA6, 4, 0x10268, WRITE_MASK_VAL(13, 12, 1)), /* UART4_TX_M1 */ 704 + RK_MUXROUTE_GRF(1, RK_PD5, 3, 0x10268, WRITE_MASK_VAL(13, 12, 2)), /* UART4_TX_M2 */ 705 + 706 + RK_MUXROUTE_GRF(3, RK_PA6, 4, 0x10268, WRITE_MASK_VAL(15, 14, 0)), /* UART5_TX_M0 */ 707 + RK_MUXROUTE_GRF(2, RK_PB0, 4, 0x10268, WRITE_MASK_VAL(15, 14, 1)), /* UART5_TX_M1 */ 708 + RK_MUXROUTE_GRF(2, RK_PA0, 3, 0x10268, WRITE_MASK_VAL(15, 14, 2)), /* UART5_TX_M2 */ 709 + 710 + RK_MUXROUTE_PMU(0, RK_PB6, 3, 0x0114, WRITE_MASK_VAL(0, 0, 0)), /* PWM0_M0 */ 711 + RK_MUXROUTE_PMU(2, RK_PB3, 5, 0x0114, WRITE_MASK_VAL(0, 0, 1)), /* PWM0_M1 */ 712 + 713 + RK_MUXROUTE_PMU(0, RK_PB7, 3, 0x0114, WRITE_MASK_VAL(2, 2, 0)), /* PWM1_M0 */ 714 + RK_MUXROUTE_PMU(2, RK_PB2, 5, 0x0114, WRITE_MASK_VAL(2, 2, 1)), /* PWM1_M1 */ 715 + 716 + RK_MUXROUTE_PMU(0, RK_PC0, 3, 0x0114, WRITE_MASK_VAL(4, 4, 0)), /* PWM2_M0 */ 717 + RK_MUXROUTE_PMU(2, RK_PB1, 5, 0x0114, WRITE_MASK_VAL(4, 4, 1)), /* PWM2_M1 */ 718 + 719 + RK_MUXROUTE_PMU(0, RK_PC1, 3, 0x0114, WRITE_MASK_VAL(6, 6, 0)), /* PWM3_IR_M0 */ 720 + RK_MUXROUTE_PMU(2, RK_PB0, 5, 0x0114, WRITE_MASK_VAL(6, 6, 1)), /* PWM3_IR_M1 */ 721 + 722 + RK_MUXROUTE_PMU(0, RK_PC2, 3, 0x0114, WRITE_MASK_VAL(8, 8, 0)), /* PWM4_M0 */ 723 + RK_MUXROUTE_PMU(2, RK_PA7, 5, 0x0114, WRITE_MASK_VAL(8, 8, 1)), /* PWM4_M1 */ 724 + 725 + RK_MUXROUTE_PMU(0, RK_PC3, 3, 0x0114, WRITE_MASK_VAL(10, 10, 0)), /* PWM5_M0 */ 726 + RK_MUXROUTE_PMU(2, RK_PA6, 5, 0x0114, WRITE_MASK_VAL(10, 10, 1)), /* PWM5_M1 */ 727 + 728 + RK_MUXROUTE_PMU(0, RK_PB2, 3, 0x0114, WRITE_MASK_VAL(12, 12, 0)), /* PWM6_M0 */ 729 + RK_MUXROUTE_PMU(2, RK_PD4, 5, 0x0114, WRITE_MASK_VAL(12, 12, 1)), /* PWM6_M1 */ 730 + 731 + RK_MUXROUTE_PMU(0, RK_PB1, 3, 0x0114, WRITE_MASK_VAL(14, 14, 0)), /* PWM7_IR_M0 */ 732 + RK_MUXROUTE_PMU(3, RK_PA0, 5, 0x0114, WRITE_MASK_VAL(14, 14, 1)), /* PWM7_IR_M1 */ 733 + 734 + RK_MUXROUTE_PMU(0, RK_PB0, 1, 0x0118, WRITE_MASK_VAL(1, 0, 0)), /* SPI0_CLK_M0 */ 735 + RK_MUXROUTE_PMU(2, RK_PA1, 1, 0x0118, WRITE_MASK_VAL(1, 0, 1)), /* SPI0_CLK_M1 */ 736 + RK_MUXROUTE_PMU(2, RK_PB2, 6, 0x0118, WRITE_MASK_VAL(1, 0, 2)), /* SPI0_CLK_M2 */ 737 + 738 + RK_MUXROUTE_PMU(0, RK_PB6, 2, 0x0118, WRITE_MASK_VAL(2, 2, 0)), /* UART1_TX_M0 */ 739 + RK_MUXROUTE_PMU(1, RK_PD0, 5, 0x0118, WRITE_MASK_VAL(2, 2, 1)), /* UART1_TX_M1 */ 690 740 }; 691 741 692 742 static struct rockchip_mux_route_data rk3128_mux_route_data[] = { ··· 1021 877 if (bank->iomux[iomux_num].type & IOMUX_GPIO_ONLY) 1022 878 return RK_FUNC_GPIO; 1023 879 1024 - regmap = (bank->iomux[iomux_num].type & IOMUX_SOURCE_PMU) 1025 - ? info->regmap_pmu : info->regmap_base; 880 + if (bank->iomux[iomux_num].type & IOMUX_SOURCE_PMU) 881 + regmap = info->regmap_pmu; 882 + else if (bank->iomux[iomux_num].type & IOMUX_L_SOURCE_PMU) 883 + regmap = (pin % 8 < 4) ? info->regmap_pmu : info->regmap_base; 884 + else 885 + regmap = info->regmap_base; 1026 886 1027 887 /* get basic quadrupel of mux registers and the correct reg inside */ 1028 888 mux_type = bank->iomux[iomux_num].type; ··· 1135 987 1136 988 dev_dbg(dev, "setting mux of GPIO%d-%d to %d\n", bank->bank_num, pin, mux); 1137 989 1138 - regmap = (bank->iomux[iomux_num].type & IOMUX_SOURCE_PMU) 1139 - ? info->regmap_pmu : info->regmap_base; 990 + if (bank->iomux[iomux_num].type & IOMUX_SOURCE_PMU) 991 + regmap = info->regmap_pmu; 992 + else if (bank->iomux[iomux_num].type & IOMUX_L_SOURCE_PMU) 993 + regmap = (pin % 8 < 4) ? info->regmap_pmu : info->regmap_base; 994 + else 995 + regmap = info->regmap_base; 1140 996 1141 997 /* get basic quadrupel of mux registers and the correct reg inside */ 1142 998 mux_type = bank->iomux[iomux_num].type; ··· 1413 1261 *reg = RV1108_SCHMITT_GRF_OFFSET; 1414 1262 pins_per_reg = RV1108_SCHMITT_PINS_PER_GRF_REG; 1415 1263 *reg += (bank->bank_num - 1) * RV1108_SCHMITT_BANK_STRIDE; 1264 + } 1265 + *reg += ((pin_num / pins_per_reg) * 4); 1266 + *bit = pin_num % pins_per_reg; 1267 + 1268 + return 0; 1269 + } 1270 + 1271 + #define RV1126_PULL_PMU_OFFSET 0x40 1272 + #define RV1126_PULL_GRF_GPIO1A0_OFFSET 0x10108 1273 + #define RV1126_PULL_PINS_PER_REG 8 1274 + #define RV1126_PULL_BITS_PER_PIN 2 1275 + #define RV1126_PULL_BANK_STRIDE 16 1276 + #define RV1126_GPIO_C4_D7(p) (p >= 20 && p <= 31) /* GPIO0_C4 ~ GPIO0_D7 */ 1277 + 1278 + static int rv1126_calc_pull_reg_and_bit(struct rockchip_pin_bank *bank, 1279 + int pin_num, struct regmap **regmap, 1280 + int *reg, u8 *bit) 1281 + { 1282 + struct rockchip_pinctrl *info = bank->drvdata; 1283 + 1284 + /* The first 24 pins of the first bank are located in PMU */ 1285 + if (bank->bank_num == 0) { 1286 + if (RV1126_GPIO_C4_D7(pin_num)) { 1287 + *regmap = info->regmap_base; 1288 + *reg = RV1126_PULL_GRF_GPIO1A0_OFFSET; 1289 + *reg -= (((31 - pin_num) / RV1126_PULL_PINS_PER_REG + 1) * 4); 1290 + *bit = pin_num % RV1126_PULL_PINS_PER_REG; 1291 + *bit *= RV1126_PULL_BITS_PER_PIN; 1292 + return 0; 1293 + } 1294 + *regmap = info->regmap_pmu; 1295 + *reg = RV1126_PULL_PMU_OFFSET; 1296 + } else { 1297 + *reg = RV1126_PULL_GRF_GPIO1A0_OFFSET; 1298 + *regmap = info->regmap_base; 1299 + *reg += (bank->bank_num - 1) * RV1126_PULL_BANK_STRIDE; 1300 + } 1301 + 1302 + *reg += ((pin_num / RV1126_PULL_PINS_PER_REG) * 4); 1303 + *bit = (pin_num % RV1126_PULL_PINS_PER_REG); 1304 + *bit *= RV1126_PULL_BITS_PER_PIN; 1305 + 1306 + return 0; 1307 + } 1308 + 1309 + #define RV1126_DRV_PMU_OFFSET 0x20 1310 + #define RV1126_DRV_GRF_GPIO1A0_OFFSET 0x10090 1311 + #define RV1126_DRV_BITS_PER_PIN 4 1312 + #define RV1126_DRV_PINS_PER_REG 4 1313 + #define RV1126_DRV_BANK_STRIDE 32 1314 + 1315 + static int rv1126_calc_drv_reg_and_bit(struct rockchip_pin_bank *bank, 1316 + int pin_num, struct regmap **regmap, 1317 + int *reg, u8 *bit) 1318 + { 1319 + struct rockchip_pinctrl *info = bank->drvdata; 1320 + 1321 + /* The first 24 pins of the first bank are located in PMU */ 1322 + if (bank->bank_num == 0) { 1323 + if (RV1126_GPIO_C4_D7(pin_num)) { 1324 + *regmap = info->regmap_base; 1325 + *reg = RV1126_DRV_GRF_GPIO1A0_OFFSET; 1326 + *reg -= (((31 - pin_num) / RV1126_DRV_PINS_PER_REG + 1) * 4); 1327 + *reg -= 0x4; 1328 + *bit = pin_num % RV1126_DRV_PINS_PER_REG; 1329 + *bit *= RV1126_DRV_BITS_PER_PIN; 1330 + return 0; 1331 + } 1332 + *regmap = info->regmap_pmu; 1333 + *reg = RV1126_DRV_PMU_OFFSET; 1334 + } else { 1335 + *regmap = info->regmap_base; 1336 + *reg = RV1126_DRV_GRF_GPIO1A0_OFFSET; 1337 + *reg += (bank->bank_num - 1) * RV1126_DRV_BANK_STRIDE; 1338 + } 1339 + 1340 + *reg += ((pin_num / RV1126_DRV_PINS_PER_REG) * 4); 1341 + *bit = pin_num % RV1126_DRV_PINS_PER_REG; 1342 + *bit *= RV1126_DRV_BITS_PER_PIN; 1343 + 1344 + return 0; 1345 + } 1346 + 1347 + #define RV1126_SCHMITT_PMU_OFFSET 0x60 1348 + #define RV1126_SCHMITT_GRF_GPIO1A0_OFFSET 0x10188 1349 + #define RV1126_SCHMITT_BANK_STRIDE 16 1350 + #define RV1126_SCHMITT_PINS_PER_GRF_REG 8 1351 + #define RV1126_SCHMITT_PINS_PER_PMU_REG 8 1352 + 1353 + static int rv1126_calc_schmitt_reg_and_bit(struct rockchip_pin_bank *bank, 1354 + int pin_num, 1355 + struct regmap **regmap, 1356 + int *reg, u8 *bit) 1357 + { 1358 + struct rockchip_pinctrl *info = bank->drvdata; 1359 + int pins_per_reg; 1360 + 1361 + if (bank->bank_num == 0) { 1362 + if (RV1126_GPIO_C4_D7(pin_num)) { 1363 + *regmap = info->regmap_base; 1364 + *reg = RV1126_SCHMITT_GRF_GPIO1A0_OFFSET; 1365 + *reg -= (((31 - pin_num) / RV1126_SCHMITT_PINS_PER_GRF_REG + 1) * 4); 1366 + *bit = pin_num % RV1126_SCHMITT_PINS_PER_GRF_REG; 1367 + return 0; 1368 + } 1369 + *regmap = info->regmap_pmu; 1370 + *reg = RV1126_SCHMITT_PMU_OFFSET; 1371 + pins_per_reg = RV1126_SCHMITT_PINS_PER_PMU_REG; 1372 + } else { 1373 + *regmap = info->regmap_base; 1374 + *reg = RV1126_SCHMITT_GRF_GPIO1A0_OFFSET; 1375 + pins_per_reg = RV1126_SCHMITT_PINS_PER_GRF_REG; 1376 + *reg += (bank->bank_num - 1) * RV1126_SCHMITT_BANK_STRIDE; 1416 1377 } 1417 1378 *reg += ((pin_num / pins_per_reg) * 4); 1418 1379 *bit = pin_num % pins_per_reg; ··· 2263 1998 goto config; 2264 1999 } 2265 2000 2001 + if (ctrl->type == RV1126) { 2002 + rmask_bits = RV1126_DRV_BITS_PER_PIN; 2003 + ret = strength; 2004 + goto config; 2005 + } 2006 + 2266 2007 ret = -EINVAL; 2267 2008 for (i = 0; i < ARRAY_SIZE(rockchip_perpin_drv_list[drv_type]); i++) { 2268 2009 if (rockchip_perpin_drv_list[drv_type][i] == strength) { ··· 2439 2168 break; 2440 2169 case PX30: 2441 2170 case RV1108: 2171 + case RV1126: 2442 2172 case RK3188: 2443 2173 case RK3288: 2444 2174 case RK3308: ··· 2665 2393 return 0; 2666 2394 } 2667 2395 2396 + static int rockchip_pmx_gpio_set_direction(struct pinctrl_dev *pctldev, 2397 + struct pinctrl_gpio_range *range, 2398 + unsigned offset, 2399 + bool input) 2400 + { 2401 + struct rockchip_pinctrl *info = pinctrl_dev_get_drvdata(pctldev); 2402 + struct rockchip_pin_bank *bank; 2403 + 2404 + bank = pin_to_bank(info, offset); 2405 + return rockchip_set_mux(bank, offset - bank->pin_base, RK_FUNC_GPIO); 2406 + } 2407 + 2668 2408 static const struct pinmux_ops rockchip_pmx_ops = { 2669 2409 .get_functions_count = rockchip_pmx_get_funcs_count, 2670 2410 .get_function_name = rockchip_pmx_get_func_name, 2671 2411 .get_function_groups = rockchip_pmx_get_groups, 2672 2412 .set_mux = rockchip_pmx_set, 2413 + .gpio_set_direction = rockchip_pmx_gpio_set_direction, 2673 2414 }; 2674 2415 2675 2416 /* ··· 2701 2416 return pull ? false : true; 2702 2417 case PX30: 2703 2418 case RV1108: 2419 + case RV1126: 2704 2420 case RK3188: 2705 2421 case RK3288: 2706 2422 case RK3308: ··· 3175 2889 3176 2890 /* preset iomux offset value, set new start value */ 3177 2891 if (iom->offset >= 0) { 3178 - if (iom->type & IOMUX_SOURCE_PMU) 2892 + if ((iom->type & IOMUX_SOURCE_PMU) || 2893 + (iom->type & IOMUX_L_SOURCE_PMU)) 3179 2894 pmu_offs = iom->offset; 3180 2895 else 3181 2896 grf_offs = iom->offset; 3182 2897 } else { /* set current iomux offset */ 3183 - iom->offset = (iom->type & IOMUX_SOURCE_PMU) ? 2898 + iom->offset = ((iom->type & IOMUX_SOURCE_PMU) || 2899 + (iom->type & IOMUX_L_SOURCE_PMU)) ? 3184 2900 pmu_offs : grf_offs; 3185 2901 } 3186 2902 ··· 3207 2919 inc = (iom->type & (IOMUX_WIDTH_4BIT | 3208 2920 IOMUX_WIDTH_3BIT | 3209 2921 IOMUX_WIDTH_2BIT)) ? 8 : 4; 3210 - if (iom->type & IOMUX_SOURCE_PMU) 2922 + if ((iom->type & IOMUX_SOURCE_PMU) || (iom->type & IOMUX_L_SOURCE_PMU)) 3211 2923 pmu_offs += inc; 3212 2924 else 3213 2925 grf_offs += inc; ··· 3464 3176 .pull_calc_reg = rv1108_calc_pull_reg_and_bit, 3465 3177 .drv_calc_reg = rv1108_calc_drv_reg_and_bit, 3466 3178 .schmitt_calc_reg = rv1108_calc_schmitt_reg_and_bit, 3179 + }; 3180 + 3181 + static struct rockchip_pin_bank rv1126_pin_banks[] = { 3182 + PIN_BANK_IOMUX_FLAGS(0, 32, "gpio0", 3183 + IOMUX_WIDTH_4BIT | IOMUX_SOURCE_PMU, 3184 + IOMUX_WIDTH_4BIT | IOMUX_SOURCE_PMU, 3185 + IOMUX_WIDTH_4BIT | IOMUX_L_SOURCE_PMU, 3186 + IOMUX_WIDTH_4BIT), 3187 + PIN_BANK_IOMUX_FLAGS_OFFSET(1, 32, "gpio1", 3188 + IOMUX_WIDTH_4BIT, 3189 + IOMUX_WIDTH_4BIT, 3190 + IOMUX_WIDTH_4BIT, 3191 + IOMUX_WIDTH_4BIT, 3192 + 0x10010, 0x10018, 0x10020, 0x10028), 3193 + PIN_BANK_IOMUX_FLAGS(2, 32, "gpio2", 3194 + IOMUX_WIDTH_4BIT, 3195 + IOMUX_WIDTH_4BIT, 3196 + IOMUX_WIDTH_4BIT, 3197 + IOMUX_WIDTH_4BIT), 3198 + PIN_BANK_IOMUX_FLAGS(3, 32, "gpio3", 3199 + IOMUX_WIDTH_4BIT, 3200 + IOMUX_WIDTH_4BIT, 3201 + IOMUX_WIDTH_4BIT, 3202 + IOMUX_WIDTH_4BIT), 3203 + PIN_BANK_IOMUX_FLAGS(4, 2, "gpio4", 3204 + IOMUX_WIDTH_4BIT, 0, 0, 0), 3205 + }; 3206 + 3207 + static struct rockchip_pin_ctrl rv1126_pin_ctrl = { 3208 + .pin_banks = rv1126_pin_banks, 3209 + .nr_banks = ARRAY_SIZE(rv1126_pin_banks), 3210 + .label = "RV1126-GPIO", 3211 + .type = RV1126, 3212 + .grf_mux_offset = 0x10004, /* mux offset from GPIO0_D0 */ 3213 + .pmu_mux_offset = 0x0, 3214 + .iomux_routes = rv1126_mux_route_data, 3215 + .niomux_routes = ARRAY_SIZE(rv1126_mux_route_data), 3216 + .iomux_recalced = rv1126_mux_recalced_data, 3217 + .niomux_recalced = ARRAY_SIZE(rv1126_mux_recalced_data), 3218 + .pull_calc_reg = rv1126_calc_pull_reg_and_bit, 3219 + .drv_calc_reg = rv1126_calc_drv_reg_and_bit, 3220 + .schmitt_calc_reg = rv1126_calc_schmitt_reg_and_bit, 3467 3221 }; 3468 3222 3469 3223 static struct rockchip_pin_bank rk2928_pin_banks[] = { ··· 3898 3568 .data = &px30_pin_ctrl }, 3899 3569 { .compatible = "rockchip,rv1108-pinctrl", 3900 3570 .data = &rv1108_pin_ctrl }, 3571 + { .compatible = "rockchip,rv1126-pinctrl", 3572 + .data = &rv1126_pin_ctrl }, 3901 3573 { .compatible = "rockchip,rk2928-pinctrl", 3902 3574 .data = &rk2928_pin_ctrl }, 3903 3575 { .compatible = "rockchip,rk3036-pinctrl",
+1
drivers/pinctrl/pinctrl-rockchip.h
··· 186 186 enum rockchip_pinctrl_type { 187 187 PX30, 188 188 RV1108, 189 + RV1126, 189 190 RK2928, 190 191 RK3066B, 191 192 RK3128,
+30 -4
drivers/pinctrl/pinctrl-st.c
··· 12 12 #include <linux/io.h> 13 13 #include <linux/of.h> 14 14 #include <linux/of_irq.h> 15 - #include <linux/of_gpio.h> /* of_get_named_gpio() */ 16 15 #include <linux/of_address.h> 17 16 #include <linux/gpio/driver.h> 18 17 #include <linux/regmap.h> ··· 1161 1162 return; 1162 1163 } 1163 1164 1165 + static int st_pctl_dt_calculate_pin(struct st_pinctrl *info, 1166 + phandle bank, unsigned int offset) 1167 + { 1168 + struct device_node *np; 1169 + struct gpio_chip *chip; 1170 + int retval = -EINVAL; 1171 + int i; 1172 + 1173 + np = of_find_node_by_phandle(bank); 1174 + if (!np) 1175 + return -EINVAL; 1176 + 1177 + for (i = 0; i < info->nbanks; i++) { 1178 + chip = &info->banks[i].gpio_chip; 1179 + if (chip->of_node == np) { 1180 + if (offset < chip->ngpio) 1181 + retval = chip->base + offset; 1182 + break; 1183 + } 1184 + } 1185 + 1186 + of_node_put(np); 1187 + return retval; 1188 + } 1189 + 1164 1190 /* 1165 1191 * Each pin is represented in of the below forms. 1166 1192 * <bank offset mux direction rt_type rt_delay rt_clk> ··· 1199 1175 struct device *dev = info->dev; 1200 1176 struct st_pinconf *conf; 1201 1177 struct device_node *pins; 1178 + phandle bank; 1179 + unsigned int offset; 1202 1180 int i = 0, npins = 0, nr_props, ret = 0; 1203 1181 1204 1182 pins = of_get_child_by_name(np, "st,pins"); ··· 1240 1214 conf = &grp->pin_conf[i]; 1241 1215 1242 1216 /* bank & offset */ 1243 - be32_to_cpup(list++); 1244 - be32_to_cpup(list++); 1245 - conf->pin = of_get_named_gpio(pins, pp->name, 0); 1217 + bank = be32_to_cpup(list++); 1218 + offset = be32_to_cpup(list++); 1219 + conf->pin = st_pctl_dt_calculate_pin(info, bank, offset); 1246 1220 conf->name = pp->name; 1247 1221 grp->pins[i] = conf->pin; 1248 1222 /* mux */
+5 -5
drivers/pinctrl/pinctrl-starfive.c drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c
··· 20 20 #include <linux/pinctrl/pinctrl.h> 21 21 #include <linux/pinctrl/pinmux.h> 22 22 23 - #include <dt-bindings/pinctrl/pinctrl-starfive.h> 23 + #include <dt-bindings/pinctrl/pinctrl-starfive-jh7100.h> 24 24 25 - #include "core.h" 26 - #include "pinctrl-utils.h" 27 - #include "pinmux.h" 28 - #include "pinconf.h" 25 + #include "../core.h" 26 + #include "../pinctrl-utils.h" 27 + #include "../pinmux.h" 28 + #include "../pinconf.h" 29 29 30 30 #define DRIVER_NAME "pinctrl-starfive" 31 31
+57
drivers/pinctrl/qcom/Kconfig
··· 15 15 config PINCTRL_APQ8064 16 16 tristate "Qualcomm APQ8064 pin controller driver" 17 17 depends on OF 18 + depends on ARM || COMPILE_TEST 18 19 depends on PINCTRL_MSM 19 20 help 20 21 This is the pinctrl, pinmux, pinconf and gpiolib driver for the ··· 24 23 config PINCTRL_APQ8084 25 24 tristate "Qualcomm APQ8084 pin controller driver" 26 25 depends on OF 26 + depends on ARM || COMPILE_TEST 27 27 depends on PINCTRL_MSM 28 28 help 29 29 This is the pinctrl, pinmux, pinconf and gpiolib driver for the ··· 33 31 config PINCTRL_IPQ4019 34 32 tristate "Qualcomm IPQ4019 pin controller driver" 35 33 depends on OF 34 + depends on ARM || COMPILE_TEST 36 35 depends on PINCTRL_MSM 37 36 help 38 37 This is the pinctrl, pinmux, pinconf and gpiolib driver for the ··· 42 39 config PINCTRL_IPQ8064 43 40 tristate "Qualcomm IPQ8064 pin controller driver" 44 41 depends on OF 42 + depends on ARM || COMPILE_TEST 45 43 depends on PINCTRL_MSM 46 44 help 47 45 This is the pinctrl, pinmux, pinconf and gpiolib driver for the ··· 51 47 config PINCTRL_IPQ8074 52 48 tristate "Qualcomm Technologies, Inc. IPQ8074 pin controller driver" 53 49 depends on OF 50 + depends on ARM64 || COMPILE_TEST 54 51 depends on PINCTRL_MSM 55 52 help 56 53 This is the pinctrl, pinmux, pinconf and gpiolib driver for ··· 62 57 config PINCTRL_IPQ6018 63 58 tristate "Qualcomm Technologies, Inc. IPQ6018 pin controller driver" 64 59 depends on OF 60 + depends on ARM64 || COMPILE_TEST 65 61 depends on PINCTRL_MSM 66 62 help 67 63 This is the pinctrl, pinmux, pinconf and gpiolib driver for ··· 73 67 config PINCTRL_MSM8226 74 68 tristate "Qualcomm 8226 pin controller driver" 75 69 depends on OF 70 + depends on ARM || COMPILE_TEST 76 71 depends on PINCTRL_MSM 77 72 help 78 73 This is the pinctrl, pinmux, pinconf and gpiolib driver for the ··· 83 76 config PINCTRL_MSM8660 84 77 tristate "Qualcomm 8660 pin controller driver" 85 78 depends on OF 79 + depends on ARM || COMPILE_TEST 86 80 depends on PINCTRL_MSM 87 81 help 88 82 This is the pinctrl, pinmux, pinconf and gpiolib driver for the ··· 92 84 config PINCTRL_MSM8960 93 85 tristate "Qualcomm 8960 pin controller driver" 94 86 depends on OF 87 + depends on ARM || COMPILE_TEST 95 88 depends on PINCTRL_MSM 96 89 help 97 90 This is the pinctrl, pinmux, pinconf and gpiolib driver for the ··· 109 100 config PINCTRL_MDM9615 110 101 tristate "Qualcomm 9615 pin controller driver" 111 102 depends on OF 103 + depends on ARM || COMPILE_TEST 112 104 depends on PINCTRL_MSM 113 105 help 114 106 This is the pinctrl, pinmux, pinconf and gpiolib driver for the ··· 118 108 config PINCTRL_MSM8X74 119 109 tristate "Qualcomm 8x74 pin controller driver" 120 110 depends on OF 111 + depends on ARM || COMPILE_TEST 121 112 depends on PINCTRL_MSM 122 113 help 123 114 This is the pinctrl, pinmux, pinconf and gpiolib driver for the ··· 127 116 config PINCTRL_MSM8909 128 117 tristate "Qualcomm 8909 pin controller driver" 129 118 depends on OF 119 + depends on ARM || COMPILE_TEST 130 120 depends on PINCTRL_MSM 131 121 help 132 122 This is the pinctrl, pinmux, pinconf and gpiolib driver for the ··· 144 132 config PINCTRL_MSM8953 145 133 tristate "Qualcomm 8953 pin controller driver" 146 134 depends on OF 135 + depends on ARM64 || COMPILE_TEST 147 136 depends on PINCTRL_MSM 148 137 help 149 138 This is the pinctrl, pinmux, pinconf and gpiolib driver for the ··· 155 142 config PINCTRL_MSM8976 156 143 tristate "Qualcomm 8976 pin controller driver" 157 144 depends on OF 145 + depends on ARM64 || COMPILE_TEST 158 146 depends on PINCTRL_MSM 159 147 help 160 148 This is the pinctrl, pinmux, pinconf and gpiolib driver for the ··· 166 152 config PINCTRL_MSM8994 167 153 tristate "Qualcomm 8994 pin controller driver" 168 154 depends on OF 155 + depends on ARM64 || COMPILE_TEST 169 156 depends on PINCTRL_MSM 170 157 help 171 158 This is the pinctrl, pinmux, pinconf and gpiolib driver for the ··· 176 161 config PINCTRL_MSM8996 177 162 tristate "Qualcomm MSM8996 pin controller driver" 178 163 depends on OF 164 + depends on ARM64 || COMPILE_TEST 179 165 depends on PINCTRL_MSM 180 166 help 181 167 This is the pinctrl, pinmux, pinconf and gpiolib driver for the ··· 185 169 config PINCTRL_MSM8998 186 170 tristate "Qualcomm MSM8998 pin controller driver" 187 171 depends on OF 172 + depends on ARM64 || COMPILE_TEST 188 173 depends on PINCTRL_MSM 189 174 help 190 175 This is the pinctrl, pinmux, pinconf and gpiolib driver for the ··· 194 177 config PINCTRL_QCM2290 195 178 tristate "Qualcomm QCM2290 pin controller driver" 196 179 depends on OF 180 + depends on ARM64 || COMPILE_TEST 197 181 depends on PINCTRL_MSM 198 182 help 199 183 This is the pinctrl, pinmux, pinconf and gpiolib driver for the ··· 203 185 config PINCTRL_QCS404 204 186 tristate "Qualcomm QCS404 pin controller driver" 205 187 depends on OF 188 + depends on ARM64 || COMPILE_TEST 206 189 depends on PINCTRL_MSM 207 190 help 208 191 This is the pinctrl, pinmux, pinconf and gpiolib driver for the ··· 251 232 config PINCTRL_SC7180 252 233 tristate "Qualcomm Technologies Inc SC7180 pin controller driver" 253 234 depends on OF 235 + depends on ARM64 || COMPILE_TEST 254 236 depends on PINCTRL_MSM 255 237 help 256 238 This is the pinctrl, pinmux, pinconf and gpiolib driver for the ··· 261 241 config PINCTRL_SC7280 262 242 tristate "Qualcomm Technologies Inc SC7280 pin controller driver" 263 243 depends on OF 244 + depends on ARM64 || COMPILE_TEST 264 245 depends on PINCTRL_MSM 265 246 help 266 247 This is the pinctrl, pinmux, pinconf and gpiolib driver for the ··· 271 250 config PINCTRL_SC7280_LPASS_LPI 272 251 tristate "Qualcomm Technologies Inc SC7280 LPASS LPI pin controller driver" 273 252 depends on GPIOLIB 253 + depends on ARM64 || COMPILE_TEST 274 254 depends on PINCTRL_LPASS_LPI 275 255 help 276 256 This is the pinctrl, pinmux, pinconf and gpiolib driver for the ··· 281 259 config PINCTRL_SC8180X 282 260 tristate "Qualcomm Technologies Inc SC8180x pin controller driver" 283 261 depends on (OF || ACPI) 262 + depends on ARM64 || COMPILE_TEST 284 263 depends on PINCTRL_MSM 285 264 help 286 265 This is the pinctrl, pinmux, pinconf and gpiolib driver for the ··· 291 268 config PINCTRL_SC8280XP 292 269 tristate "Qualcomm Technologies Inc SC8280xp pin controller driver" 293 270 depends on OF 271 + depends on ARM64 || COMPILE_TEST 294 272 depends on PINCTRL_MSM 295 273 help 296 274 This is the pinctrl, pinmux, pinconf and gpiolib driver for the ··· 301 277 config PINCTRL_SDM660 302 278 tristate "Qualcomm Technologies Inc SDM660 pin controller driver" 303 279 depends on OF 280 + depends on ARM64 || COMPILE_TEST 304 281 depends on PINCTRL_MSM 305 282 help 306 283 This is the pinctrl, pinmux, pinconf and gpiolib driver for the ··· 311 286 config PINCTRL_SDM845 312 287 tristate "Qualcomm Technologies Inc SDM845 pin controller driver" 313 288 depends on (OF || ACPI) 289 + depends on ARM64 || COMPILE_TEST 314 290 depends on PINCTRL_MSM 315 291 help 316 292 This is the pinctrl, pinmux, pinconf and gpiolib driver for the ··· 321 295 config PINCTRL_SDX55 322 296 tristate "Qualcomm Technologies Inc SDX55 pin controller driver" 323 297 depends on OF 298 + depends on ARM || COMPILE_TEST 324 299 depends on PINCTRL_MSM 325 300 help 326 301 This is the pinctrl, pinmux, pinconf and gpiolib driver for the ··· 331 304 config PINCTRL_SM6115 332 305 tristate "Qualcomm Technologies Inc SM6115,SM4250 pin controller driver" 333 306 depends on GPIOLIB && OF 307 + depends on ARM64 || COMPILE_TEST 334 308 depends on PINCTRL_MSM 335 309 help 336 310 This is the pinctrl, pinmux, pinconf and gpiolib driver for the ··· 341 313 config PINCTRL_SM6125 342 314 tristate "Qualcomm Technologies Inc SM6125 pin controller driver" 343 315 depends on OF 316 + depends on ARM64 || COMPILE_TEST 344 317 depends on PINCTRL_MSM 345 318 help 346 319 This is the pinctrl, pinmux, pinconf and gpiolib driver for the ··· 351 322 config PINCTRL_SM6350 352 323 tristate "Qualcomm Technologies Inc SM6350 pin controller driver" 353 324 depends on GPIOLIB && OF 325 + depends on ARM64 || COMPILE_TEST 354 326 depends on PINCTRL_MSM 355 327 help 356 328 This is the pinctrl, pinmux, pinconf and gpiolib driver for the ··· 361 331 config PINCTRL_SM6375 362 332 tristate "Qualcomm Technologies Inc SM6375 pin controller driver" 363 333 depends on GPIOLIB && OF 334 + depends on ARM64 || COMPILE_TEST 364 335 depends on PINCTRL_MSM 365 336 help 366 337 This is the pinctrl, pinmux, pinconf and gpiolib driver for the ··· 371 340 config PINCTRL_SDX65 372 341 tristate "Qualcomm Technologies Inc SDX65 pin controller driver" 373 342 depends on GPIOLIB && OF 343 + depends on ARM || COMPILE_TEST 374 344 depends on PINCTRL_MSM 375 345 help 376 346 This is the pinctrl, pinmux, pinconf and gpiolib driver for the ··· 381 349 config PINCTRL_SM8150 382 350 tristate "Qualcomm Technologies Inc SM8150 pin controller driver" 383 351 depends on OF 352 + depends on ARM64 || COMPILE_TEST 384 353 depends on PINCTRL_MSM 385 354 help 386 355 This is the pinctrl, pinmux, pinconf and gpiolib driver for the ··· 391 358 config PINCTRL_SM8250 392 359 tristate "Qualcomm Technologies Inc SM8250 pin controller driver" 393 360 depends on OF 361 + depends on ARM64 || COMPILE_TEST 394 362 depends on PINCTRL_MSM 395 363 help 396 364 This is the pinctrl, pinmux, pinconf and gpiolib driver for the ··· 401 367 config PINCTRL_SM8250_LPASS_LPI 402 368 tristate "Qualcomm Technologies Inc SM8250 LPASS LPI pin controller driver" 403 369 depends on GPIOLIB 370 + depends on ARM64 || COMPILE_TEST 404 371 depends on PINCTRL_LPASS_LPI 405 372 help 406 373 This is the pinctrl, pinmux, pinconf and gpiolib driver for the ··· 410 375 411 376 config PINCTRL_SM8350 412 377 tristate "Qualcomm Technologies Inc SM8350 pin controller driver" 378 + depends on ARM64 || COMPILE_TEST 413 379 depends on PINCTRL_MSM 414 380 help 415 381 This is the pinctrl, pinmux, pinconf and gpiolib driver for the ··· 420 384 config PINCTRL_SM8450 421 385 tristate "Qualcomm Technologies Inc SM8450 pin controller driver" 422 386 depends on GPIOLIB && OF 387 + depends on ARM64 || COMPILE_TEST 423 388 depends on PINCTRL_MSM 424 389 help 425 390 This is the pinctrl, pinmux, pinconf and gpiolib driver for the 426 391 Qualcomm Technologies Inc TLMM block found on the Qualcomm 427 392 Technologies Inc SM8450 platform. 393 + 394 + config PINCTRL_SM8450_LPASS_LPI 395 + tristate "Qualcomm Technologies Inc SM8450 LPASS LPI pin controller driver" 396 + depends on GPIOLIB 397 + depends on ARM64 || COMPILE_TEST 398 + depends on PINCTRL_LPASS_LPI 399 + help 400 + This is the pinctrl, pinmux, pinconf and gpiolib driver for the 401 + Qualcomm Technologies Inc LPASS (Low Power Audio SubSystem) LPI 402 + (Low Power Island) found on the Qualcomm Technologies Inc SM8450 platform. 403 + 404 + config PINCTRL_SC8280XP_LPASS_LPI 405 + tristate "Qualcomm Technologies Inc SC8280XP LPASS LPI pin controller driver" 406 + depends on GPIOLIB 407 + depends on ARM64 || COMPILE_TEST 408 + depends on PINCTRL_LPASS_LPI 409 + help 410 + This is the pinctrl, pinmux, pinconf and gpiolib driver for the 411 + Qualcomm Technologies Inc LPASS (Low Power Audio SubSystem) LPI 412 + (Low Power Island) found on the Qualcomm Technologies Inc SC8280XP platform. 428 413 429 414 config PINCTRL_LPASS_LPI 430 415 tristate "Qualcomm Technologies Inc LPASS LPI pin controller driver"
+2
drivers/pinctrl/qcom/Makefile
··· 45 45 obj-$(CONFIG_PINCTRL_SM8250_LPASS_LPI) += pinctrl-sm8250-lpass-lpi.o 46 46 obj-$(CONFIG_PINCTRL_SM8350) += pinctrl-sm8350.o 47 47 obj-$(CONFIG_PINCTRL_SM8450) += pinctrl-sm8450.o 48 + obj-$(CONFIG_PINCTRL_SM8450_LPASS_LPI) += pinctrl-sm8450-lpass-lpi.o 49 + obj-$(CONFIG_PINCTRL_SC8280XP_LPASS_LPI) += pinctrl-sc8280xp-lpass-lpi.o 48 50 obj-$(CONFIG_PINCTRL_LPASS_LPI) += pinctrl-lpass-lpi.o
+207
drivers/pinctrl/qcom/pinctrl-sc8280xp-lpass-lpi.c
··· 1 + // SPDX-License-Identifier: GPL-2.0-only 2 + /* 3 + * Copyright (c) 2022 Linaro Ltd. 4 + */ 5 + 6 + #include <linux/gpio/driver.h> 7 + #include <linux/module.h> 8 + #include <linux/platform_device.h> 9 + 10 + #include "pinctrl-lpass-lpi.h" 11 + 12 + enum lpass_lpi_functions { 13 + LPI_MUX_dmic1_clk, 14 + LPI_MUX_dmic1_data, 15 + LPI_MUX_dmic2_clk, 16 + LPI_MUX_dmic2_data, 17 + LPI_MUX_dmic3_clk, 18 + LPI_MUX_dmic3_data, 19 + LPI_MUX_dmic4_clk, 20 + LPI_MUX_dmic4_data, 21 + LPI_MUX_i2s1_clk, 22 + LPI_MUX_i2s1_data, 23 + LPI_MUX_i2s1_ws, 24 + LPI_MUX_i2s2_clk, 25 + LPI_MUX_i2s2_data, 26 + LPI_MUX_i2s2_ws, 27 + LPI_MUX_i2s3_clk, 28 + LPI_MUX_i2s3_data, 29 + LPI_MUX_i2s3_ws, 30 + LPI_MUX_qua_mi2s_data, 31 + LPI_MUX_qua_mi2s_sclk, 32 + LPI_MUX_qua_mi2s_ws, 33 + LPI_MUX_swr_rx_clk, 34 + LPI_MUX_swr_rx_data, 35 + LPI_MUX_swr_tx_clk, 36 + LPI_MUX_swr_tx_data, 37 + LPI_MUX_wsa_swr_clk, 38 + LPI_MUX_wsa_swr_data, 39 + LPI_MUX_wsa2_swr_clk, 40 + LPI_MUX_wsa2_swr_data, 41 + LPI_MUX_ext_mclk1_a, 42 + LPI_MUX_ext_mclk1_b, 43 + LPI_MUX_ext_mclk1_c, 44 + LPI_MUX_gpio, 45 + LPI_MUX__, 46 + }; 47 + 48 + static int gpio0_pins[] = { 0 }; 49 + static int gpio1_pins[] = { 1 }; 50 + static int gpio2_pins[] = { 2 }; 51 + static int gpio3_pins[] = { 3 }; 52 + static int gpio4_pins[] = { 4 }; 53 + static int gpio5_pins[] = { 5 }; 54 + static int gpio6_pins[] = { 6 }; 55 + static int gpio7_pins[] = { 7 }; 56 + static int gpio8_pins[] = { 8 }; 57 + static int gpio9_pins[] = { 9 }; 58 + static int gpio10_pins[] = { 10 }; 59 + static int gpio11_pins[] = { 11 }; 60 + static int gpio12_pins[] = { 12 }; 61 + static int gpio13_pins[] = { 13 }; 62 + static int gpio14_pins[] = { 14 }; 63 + static int gpio15_pins[] = { 15 }; 64 + static int gpio16_pins[] = { 16 }; 65 + static int gpio17_pins[] = { 17 }; 66 + static int gpio18_pins[] = { 18 }; 67 + 68 + static const struct pinctrl_pin_desc sc8280xp_lpi_pins[] = { 69 + PINCTRL_PIN(0, "gpio0"), 70 + PINCTRL_PIN(1, "gpio1"), 71 + PINCTRL_PIN(2, "gpio2"), 72 + PINCTRL_PIN(3, "gpio3"), 73 + PINCTRL_PIN(4, "gpio4"), 74 + PINCTRL_PIN(5, "gpio5"), 75 + PINCTRL_PIN(6, "gpio6"), 76 + PINCTRL_PIN(7, "gpio7"), 77 + PINCTRL_PIN(8, "gpio8"), 78 + PINCTRL_PIN(9, "gpio9"), 79 + PINCTRL_PIN(10, "gpio10"), 80 + PINCTRL_PIN(11, "gpio11"), 81 + PINCTRL_PIN(12, "gpio12"), 82 + PINCTRL_PIN(13, "gpio13"), 83 + PINCTRL_PIN(14, "gpio14"), 84 + PINCTRL_PIN(15, "gpio15"), 85 + PINCTRL_PIN(16, "gpio16"), 86 + PINCTRL_PIN(17, "gpio17"), 87 + PINCTRL_PIN(18, "gpio18"), 88 + }; 89 + 90 + static const char * const swr_tx_clk_groups[] = { "gpio0" }; 91 + static const char * const swr_tx_data_groups[] = { "gpio1", "gpio2", "gpio14" }; 92 + static const char * const swr_rx_clk_groups[] = { "gpio3" }; 93 + static const char * const swr_rx_data_groups[] = { "gpio4", "gpio5" }; 94 + static const char * const dmic1_clk_groups[] = { "gpio6" }; 95 + static const char * const dmic1_data_groups[] = { "gpio7" }; 96 + static const char * const dmic2_clk_groups[] = { "gpio8" }; 97 + static const char * const dmic2_data_groups[] = { "gpio9" }; 98 + static const char * const dmic4_clk_groups[] = { "gpio17" }; 99 + static const char * const dmic4_data_groups[] = { "gpio18" }; 100 + static const char * const i2s2_clk_groups[] = { "gpio10" }; 101 + static const char * const i2s2_ws_groups[] = { "gpio11" }; 102 + static const char * const dmic3_clk_groups[] = { "gpio12" }; 103 + static const char * const dmic3_data_groups[] = { "gpio13" }; 104 + static const char * const qua_mi2s_sclk_groups[] = { "gpio0" }; 105 + static const char * const qua_mi2s_ws_groups[] = { "gpio1" }; 106 + static const char * const qua_mi2s_data_groups[] = { "gpio2", "gpio3", "gpio4", "gpio5" }; 107 + static const char * const i2s1_clk_groups[] = { "gpio6" }; 108 + static const char * const i2s1_ws_groups[] = { "gpio7" }; 109 + static const char * const i2s1_data_groups[] = { "gpio8", "gpio9" }; 110 + static const char * const wsa_swr_clk_groups[] = { "gpio10" }; 111 + static const char * const wsa_swr_data_groups[] = { "gpio11" }; 112 + static const char * const wsa2_swr_clk_groups[] = { "gpio15" }; 113 + static const char * const wsa2_swr_data_groups[] = { "gpio16" }; 114 + static const char * const i2s2_data_groups[] = { "gpio15", "gpio16" }; 115 + static const char * const i2s3_clk_groups[] = { "gpio12"}; 116 + static const char * const i2s3_ws_groups[] = { "gpio13"}; 117 + static const char * const i2s3_data_groups[] = { "gpio17", "gpio18"}; 118 + static const char * const ext_mclk1_c_groups[] = { "gpio5" }; 119 + static const char * const ext_mclk1_b_groups[] = { "gpio9" }; 120 + static const char * const ext_mclk1_a_groups[] = { "gpio13" }; 121 + 122 + static const struct lpi_pingroup sc8280xp_groups[] = { 123 + LPI_PINGROUP(0, 0, swr_tx_clk, qua_mi2s_sclk, _, _), 124 + LPI_PINGROUP(1, 2, swr_tx_data, qua_mi2s_ws, _, _), 125 + LPI_PINGROUP(2, 4, swr_tx_data, qua_mi2s_data, _, _), 126 + LPI_PINGROUP(3, 8, swr_rx_clk, qua_mi2s_data, _, _), 127 + LPI_PINGROUP(4, 10, swr_rx_data, qua_mi2s_data, _, _), 128 + LPI_PINGROUP(5, 12, swr_rx_data, ext_mclk1_c, qua_mi2s_data, _), 129 + LPI_PINGROUP(6, LPI_NO_SLEW, dmic1_clk, i2s1_clk, _, _), 130 + LPI_PINGROUP(7, LPI_NO_SLEW, dmic1_data, i2s1_ws, _, _), 131 + LPI_PINGROUP(8, LPI_NO_SLEW, dmic2_clk, i2s1_data, _, _), 132 + LPI_PINGROUP(9, LPI_NO_SLEW, dmic2_data, i2s1_data, ext_mclk1_b, _), 133 + LPI_PINGROUP(10, 16, i2s2_clk, wsa_swr_clk, _, _), 134 + LPI_PINGROUP(11, 18, i2s2_ws, wsa_swr_data, _, _), 135 + LPI_PINGROUP(12, LPI_NO_SLEW, dmic3_clk, i2s3_clk, _, _), 136 + LPI_PINGROUP(13, LPI_NO_SLEW, dmic3_data, i2s3_ws, ext_mclk1_a, _), 137 + LPI_PINGROUP(14, 6, swr_tx_data, _, _, _), 138 + LPI_PINGROUP(15, 20, i2s2_data, wsa2_swr_clk, _, _), 139 + LPI_PINGROUP(16, 22, i2s2_data, wsa2_swr_data, _, _), 140 + LPI_PINGROUP(17, LPI_NO_SLEW, dmic4_clk, i2s3_data, _, _), 141 + LPI_PINGROUP(18, LPI_NO_SLEW, dmic4_data, i2s3_data, _, _), 142 + }; 143 + 144 + static const struct lpi_function sc8280xp_functions[] = { 145 + LPI_FUNCTION(dmic1_clk), 146 + LPI_FUNCTION(dmic1_data), 147 + LPI_FUNCTION(dmic2_clk), 148 + LPI_FUNCTION(dmic2_data), 149 + LPI_FUNCTION(dmic3_clk), 150 + LPI_FUNCTION(dmic3_data), 151 + LPI_FUNCTION(dmic4_clk), 152 + LPI_FUNCTION(dmic4_data), 153 + LPI_FUNCTION(i2s1_clk), 154 + LPI_FUNCTION(i2s1_data), 155 + LPI_FUNCTION(i2s1_ws), 156 + LPI_FUNCTION(i2s2_clk), 157 + LPI_FUNCTION(i2s2_data), 158 + LPI_FUNCTION(i2s2_ws), 159 + LPI_FUNCTION(i2s3_clk), 160 + LPI_FUNCTION(i2s3_data), 161 + LPI_FUNCTION(i2s3_ws), 162 + LPI_FUNCTION(qua_mi2s_data), 163 + LPI_FUNCTION(qua_mi2s_sclk), 164 + LPI_FUNCTION(qua_mi2s_ws), 165 + LPI_FUNCTION(swr_rx_clk), 166 + LPI_FUNCTION(swr_rx_data), 167 + LPI_FUNCTION(swr_tx_clk), 168 + LPI_FUNCTION(swr_tx_data), 169 + LPI_FUNCTION(wsa_swr_clk), 170 + LPI_FUNCTION(wsa_swr_data), 171 + LPI_FUNCTION(wsa2_swr_clk), 172 + LPI_FUNCTION(wsa2_swr_data), 173 + LPI_FUNCTION(ext_mclk1_a), 174 + LPI_FUNCTION(ext_mclk1_b), 175 + LPI_FUNCTION(ext_mclk1_c), 176 + }; 177 + 178 + static const struct lpi_pinctrl_variant_data sc8280xp_lpi_data = { 179 + .pins = sc8280xp_lpi_pins, 180 + .npins = ARRAY_SIZE(sc8280xp_lpi_pins), 181 + .groups = sc8280xp_groups, 182 + .ngroups = ARRAY_SIZE(sc8280xp_groups), 183 + .functions = sc8280xp_functions, 184 + .nfunctions = ARRAY_SIZE(sc8280xp_functions), 185 + }; 186 + 187 + static const struct of_device_id lpi_pinctrl_of_match[] = { 188 + { 189 + .compatible = "qcom,sc8280xp-lpass-lpi-pinctrl", 190 + .data = &sc8280xp_lpi_data, 191 + }, 192 + { } 193 + }; 194 + MODULE_DEVICE_TABLE(of, lpi_pinctrl_of_match); 195 + 196 + static struct platform_driver lpi_pinctrl_driver = { 197 + .driver = { 198 + .name = "qcom-sc8280xp-lpass-lpi-pinctrl", 199 + .of_match_table = lpi_pinctrl_of_match, 200 + }, 201 + .probe = lpi_pinctrl_probe, 202 + .remove = lpi_pinctrl_remove, 203 + }; 204 + 205 + module_platform_driver(lpi_pinctrl_driver); 206 + MODULE_DESCRIPTION("QTI SC8280XP LPI GPIO pin control driver"); 207 + MODULE_LICENSE("GPL");
+240
drivers/pinctrl/qcom/pinctrl-sm8450-lpass-lpi.c
··· 1 + // SPDX-License-Identifier: GPL-2.0-only 2 + /* 3 + * Copyright (c) 2022 Linaro Ltd. 4 + */ 5 + 6 + #include <linux/gpio/driver.h> 7 + #include <linux/module.h> 8 + #include <linux/platform_device.h> 9 + 10 + #include "pinctrl-lpass-lpi.h" 11 + 12 + enum lpass_lpi_functions { 13 + LPI_MUX_dmic1_clk, 14 + LPI_MUX_dmic1_data, 15 + LPI_MUX_dmic2_clk, 16 + LPI_MUX_dmic2_data, 17 + LPI_MUX_dmic3_clk, 18 + LPI_MUX_dmic3_data, 19 + LPI_MUX_dmic4_clk, 20 + LPI_MUX_dmic4_data, 21 + LPI_MUX_i2s1_clk, 22 + LPI_MUX_i2s1_data, 23 + LPI_MUX_i2s1_ws, 24 + LPI_MUX_i2s2_clk, 25 + LPI_MUX_i2s2_data, 26 + LPI_MUX_i2s2_ws, 27 + LPI_MUX_i2s3_clk, 28 + LPI_MUX_i2s3_data, 29 + LPI_MUX_i2s3_ws, 30 + LPI_MUX_i2s4_clk, 31 + LPI_MUX_i2s4_data, 32 + LPI_MUX_i2s4_ws, 33 + LPI_MUX_qua_mi2s_data, 34 + LPI_MUX_qua_mi2s_sclk, 35 + LPI_MUX_qua_mi2s_ws, 36 + LPI_MUX_swr_rx_clk, 37 + LPI_MUX_swr_rx_data, 38 + LPI_MUX_swr_tx_clk, 39 + LPI_MUX_swr_tx_data, 40 + LPI_MUX_wsa_swr_clk, 41 + LPI_MUX_wsa_swr_data, 42 + LPI_MUX_wsa2_swr_clk, 43 + LPI_MUX_wsa2_swr_data, 44 + LPI_MUX_slimbus_clk, 45 + LPI_MUX_slimbus_data, 46 + LPI_MUX_ext_mclk1_a, 47 + LPI_MUX_ext_mclk1_b, 48 + LPI_MUX_ext_mclk1_c, 49 + LPI_MUX_ext_mclk1_d, 50 + LPI_MUX_ext_mclk1_e, 51 + LPI_MUX_gpio, 52 + LPI_MUX__, 53 + }; 54 + 55 + static int gpio0_pins[] = { 0 }; 56 + static int gpio1_pins[] = { 1 }; 57 + static int gpio2_pins[] = { 2 }; 58 + static int gpio3_pins[] = { 3 }; 59 + static int gpio4_pins[] = { 4 }; 60 + static int gpio5_pins[] = { 5 }; 61 + static int gpio6_pins[] = { 6 }; 62 + static int gpio7_pins[] = { 7 }; 63 + static int gpio8_pins[] = { 8 }; 64 + static int gpio9_pins[] = { 9 }; 65 + static int gpio10_pins[] = { 10 }; 66 + static int gpio11_pins[] = { 11 }; 67 + static int gpio12_pins[] = { 12 }; 68 + static int gpio13_pins[] = { 13 }; 69 + static int gpio14_pins[] = { 14 }; 70 + static int gpio15_pins[] = { 15 }; 71 + static int gpio16_pins[] = { 16 }; 72 + static int gpio17_pins[] = { 17 }; 73 + static int gpio18_pins[] = { 18 }; 74 + static int gpio19_pins[] = { 19 }; 75 + static int gpio20_pins[] = { 20 }; 76 + static int gpio21_pins[] = { 21 }; 77 + static int gpio22_pins[] = { 22 }; 78 + 79 + static const struct pinctrl_pin_desc sm8450_lpi_pins[] = { 80 + PINCTRL_PIN(0, "gpio0"), 81 + PINCTRL_PIN(1, "gpio1"), 82 + PINCTRL_PIN(2, "gpio2"), 83 + PINCTRL_PIN(3, "gpio3"), 84 + PINCTRL_PIN(4, "gpio4"), 85 + PINCTRL_PIN(5, "gpio5"), 86 + PINCTRL_PIN(6, "gpio6"), 87 + PINCTRL_PIN(7, "gpio7"), 88 + PINCTRL_PIN(8, "gpio8"), 89 + PINCTRL_PIN(9, "gpio9"), 90 + PINCTRL_PIN(10, "gpio10"), 91 + PINCTRL_PIN(11, "gpio11"), 92 + PINCTRL_PIN(12, "gpio12"), 93 + PINCTRL_PIN(13, "gpio13"), 94 + PINCTRL_PIN(14, "gpio14"), 95 + PINCTRL_PIN(15, "gpio15"), 96 + PINCTRL_PIN(16, "gpio16"), 97 + PINCTRL_PIN(17, "gpio17"), 98 + PINCTRL_PIN(18, "gpio18"), 99 + PINCTRL_PIN(19, "gpio19"), 100 + PINCTRL_PIN(20, "gpio20"), 101 + PINCTRL_PIN(21, "gpio21"), 102 + PINCTRL_PIN(22, "gpio22"), 103 + }; 104 + 105 + static const char * const swr_tx_clk_groups[] = { "gpio0" }; 106 + static const char * const swr_tx_data_groups[] = { "gpio1", "gpio2", "gpio14" }; 107 + static const char * const swr_rx_clk_groups[] = { "gpio3" }; 108 + static const char * const swr_rx_data_groups[] = { "gpio4", "gpio5", "gpio15" }; 109 + static const char * const dmic1_clk_groups[] = { "gpio6" }; 110 + static const char * const dmic1_data_groups[] = { "gpio7" }; 111 + static const char * const dmic2_clk_groups[] = { "gpio8" }; 112 + static const char * const dmic2_data_groups[] = { "gpio9" }; 113 + static const char * const dmic4_clk_groups[] = { "gpio17" }; 114 + static const char * const dmic4_data_groups[] = { "gpio18" }; 115 + static const char * const i2s2_clk_groups[] = { "gpio10" }; 116 + static const char * const i2s2_ws_groups[] = { "gpio11" }; 117 + static const char * const dmic3_clk_groups[] = { "gpio12" }; 118 + static const char * const dmic3_data_groups[] = { "gpio13" }; 119 + static const char * const qua_mi2s_sclk_groups[] = { "gpio0" }; 120 + static const char * const qua_mi2s_ws_groups[] = { "gpio1" }; 121 + static const char * const qua_mi2s_data_groups[] = { "gpio2", "gpio3", "gpio4", "gpio5" }; 122 + static const char * const i2s1_clk_groups[] = { "gpio6" }; 123 + static const char * const i2s1_ws_groups[] = { "gpio7" }; 124 + static const char * const i2s1_data_groups[] = { "gpio8", "gpio9" }; 125 + static const char * const wsa_swr_clk_groups[] = { "gpio10" }; 126 + static const char * const wsa_swr_data_groups[] = { "gpio11" }; 127 + static const char * const wsa2_swr_clk_groups[] = { "gpio15" }; 128 + static const char * const wsa2_swr_data_groups[] = { "gpio16" }; 129 + static const char * const i2s2_data_groups[] = { "gpio15", "gpio16" }; 130 + static const char * const i2s4_ws_groups[] = { "gpio13" }; 131 + static const char * const i2s4_clk_groups[] = { "gpio12" }; 132 + static const char * const i2s4_data_groups[] = { "gpio17", "gpio18" }; 133 + static const char * const slimbus_clk_groups[] = { "gpio19"}; 134 + static const char * const i2s3_clk_groups[] = { "gpio19"}; 135 + static const char * const i2s3_ws_groups[] = { "gpio20"}; 136 + static const char * const i2s3_data_groups[] = { "gpio21", "gpio22"}; 137 + static const char * const slimbus_data_groups[] = { "gpio20"}; 138 + static const char * const ext_mclk1_c_groups[] = { "gpio5" }; 139 + static const char * const ext_mclk1_b_groups[] = { "gpio9" }; 140 + static const char * const ext_mclk1_a_groups[] = { "gpio13" }; 141 + static const char * const ext_mclk1_d_groups[] = { "gpio14" }; 142 + static const char * const ext_mclk1_e_groups[] = { "gpio22" }; 143 + 144 + static const struct lpi_pingroup sm8450_groups[] = { 145 + LPI_PINGROUP(0, 0, swr_tx_clk, qua_mi2s_sclk, _, _), 146 + LPI_PINGROUP(1, 2, swr_tx_data, qua_mi2s_ws, _, _), 147 + LPI_PINGROUP(2, 4, swr_tx_data, qua_mi2s_data, _, _), 148 + LPI_PINGROUP(3, 8, swr_rx_clk, qua_mi2s_data, _, _), 149 + LPI_PINGROUP(4, 10, swr_rx_data, qua_mi2s_data, _, _), 150 + LPI_PINGROUP(5, 12, swr_rx_data, ext_mclk1_c, qua_mi2s_data, _), 151 + LPI_PINGROUP(6, LPI_NO_SLEW, dmic1_clk, i2s1_clk, _, _), 152 + LPI_PINGROUP(7, LPI_NO_SLEW, dmic1_data, i2s1_ws, _, _), 153 + LPI_PINGROUP(8, LPI_NO_SLEW, dmic2_clk, i2s1_data, _, _), 154 + LPI_PINGROUP(9, LPI_NO_SLEW, dmic2_data, i2s1_data, ext_mclk1_b, _), 155 + LPI_PINGROUP(10, 16, i2s2_clk, wsa_swr_clk, _, _), 156 + LPI_PINGROUP(11, 18, i2s2_ws, wsa_swr_data, _, _), 157 + LPI_PINGROUP(12, LPI_NO_SLEW, dmic3_clk, i2s4_clk, _, _), 158 + LPI_PINGROUP(13, LPI_NO_SLEW, dmic3_data, i2s4_ws, ext_mclk1_a, _), 159 + LPI_PINGROUP(14, 6, swr_tx_data, ext_mclk1_d, _, _), 160 + LPI_PINGROUP(15, 20, i2s2_data, wsa2_swr_clk, _, _), 161 + LPI_PINGROUP(16, 22, i2s2_data, wsa2_swr_data, _, _), 162 + LPI_PINGROUP(17, LPI_NO_SLEW, dmic4_clk, i2s4_data, _, _), 163 + LPI_PINGROUP(18, LPI_NO_SLEW, dmic4_data, i2s4_data, _, _), 164 + LPI_PINGROUP(19, LPI_NO_SLEW, i2s3_clk, slimbus_clk, _, _), 165 + LPI_PINGROUP(20, LPI_NO_SLEW, i2s3_ws, slimbus_data, _, _), 166 + LPI_PINGROUP(21, LPI_NO_SLEW, i2s3_data, _, _, _), 167 + LPI_PINGROUP(22, LPI_NO_SLEW, i2s3_data, ext_mclk1_e, _, _), 168 + }; 169 + 170 + static const struct lpi_function sm8450_functions[] = { 171 + LPI_FUNCTION(dmic1_clk), 172 + LPI_FUNCTION(dmic1_data), 173 + LPI_FUNCTION(dmic2_clk), 174 + LPI_FUNCTION(dmic2_data), 175 + LPI_FUNCTION(dmic3_clk), 176 + LPI_FUNCTION(dmic3_data), 177 + LPI_FUNCTION(dmic4_clk), 178 + LPI_FUNCTION(dmic4_data), 179 + LPI_FUNCTION(i2s1_clk), 180 + LPI_FUNCTION(i2s1_data), 181 + LPI_FUNCTION(i2s1_ws), 182 + LPI_FUNCTION(i2s2_clk), 183 + LPI_FUNCTION(i2s2_data), 184 + LPI_FUNCTION(i2s2_ws), 185 + LPI_FUNCTION(i2s3_clk), 186 + LPI_FUNCTION(i2s3_data), 187 + LPI_FUNCTION(i2s3_ws), 188 + LPI_FUNCTION(i2s4_clk), 189 + LPI_FUNCTION(i2s4_data), 190 + LPI_FUNCTION(i2s4_ws), 191 + LPI_FUNCTION(qua_mi2s_data), 192 + LPI_FUNCTION(qua_mi2s_sclk), 193 + LPI_FUNCTION(qua_mi2s_ws), 194 + LPI_FUNCTION(swr_rx_clk), 195 + LPI_FUNCTION(swr_rx_data), 196 + LPI_FUNCTION(swr_tx_clk), 197 + LPI_FUNCTION(swr_tx_data), 198 + LPI_FUNCTION(slimbus_clk), 199 + LPI_FUNCTION(slimbus_data), 200 + LPI_FUNCTION(wsa_swr_clk), 201 + LPI_FUNCTION(wsa_swr_data), 202 + LPI_FUNCTION(wsa2_swr_clk), 203 + LPI_FUNCTION(wsa2_swr_data), 204 + LPI_FUNCTION(ext_mclk1_a), 205 + LPI_FUNCTION(ext_mclk1_b), 206 + LPI_FUNCTION(ext_mclk1_c), 207 + LPI_FUNCTION(ext_mclk1_d), 208 + LPI_FUNCTION(ext_mclk1_e), 209 + }; 210 + 211 + static const struct lpi_pinctrl_variant_data sm8450_lpi_data = { 212 + .pins = sm8450_lpi_pins, 213 + .npins = ARRAY_SIZE(sm8450_lpi_pins), 214 + .groups = sm8450_groups, 215 + .ngroups = ARRAY_SIZE(sm8450_groups), 216 + .functions = sm8450_functions, 217 + .nfunctions = ARRAY_SIZE(sm8450_functions), 218 + }; 219 + 220 + static const struct of_device_id lpi_pinctrl_of_match[] = { 221 + { 222 + .compatible = "qcom,sm8450-lpass-lpi-pinctrl", 223 + .data = &sm8450_lpi_data, 224 + }, 225 + { } 226 + }; 227 + MODULE_DEVICE_TABLE(of, lpi_pinctrl_of_match); 228 + 229 + static struct platform_driver lpi_pinctrl_driver = { 230 + .driver = { 231 + .name = "qcom-sm8450-lpass-lpi-pinctrl", 232 + .of_match_table = lpi_pinctrl_of_match, 233 + }, 234 + .probe = lpi_pinctrl_probe, 235 + .remove = lpi_pinctrl_remove, 236 + }; 237 + 238 + module_platform_driver(lpi_pinctrl_driver); 239 + MODULE_DESCRIPTION("QTI SM8450 LPI GPIO pin control driver"); 240 + MODULE_LICENSE("GPL");
+67 -12
drivers/pinctrl/qcom/pinctrl-spmi-gpio.c
··· 1 1 // SPDX-License-Identifier: GPL-2.0-only 2 2 /* 3 3 * Copyright (c) 2012-2014, 2016-2021 The Linux Foundation. All rights reserved. 4 + * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved. 4 5 */ 5 6 6 7 #include <linux/gpio/driver.h> ··· 37 36 #define PMIC_GPIO_SUBTYPE_GPIOC_8CH 0xd 38 37 #define PMIC_GPIO_SUBTYPE_GPIO_LV 0x10 39 38 #define PMIC_GPIO_SUBTYPE_GPIO_MV 0x11 39 + #define PMIC_GPIO_SUBTYPE_GPIO_LV_VIN2 0x12 40 + #define PMIC_GPIO_SUBTYPE_GPIO_MV_VIN3 0x13 40 41 41 42 #define PMIC_MPP_REG_RT_STS 0x10 42 43 #define PMIC_MPP_REG_RT_STS_VAL_MASK 0x1 ··· 100 97 #define PMIC_GPIO_OUT_BUF_CMOS 0 101 98 #define PMIC_GPIO_OUT_BUF_OPEN_DRAIN_NMOS 1 102 99 #define PMIC_GPIO_OUT_BUF_OPEN_DRAIN_PMOS 2 100 + 101 + #define PMIC_GPIO_OUT_STRENGTH_LOW 1 102 + #define PMIC_GPIO_OUT_STRENGTH_HIGH 3 103 103 104 104 /* PMIC_GPIO_REG_EN_CTL */ 105 105 #define PMIC_GPIO_REG_MASTER_EN_SHIFT 7 ··· 177 171 struct regmap *map; 178 172 struct pinctrl_dev *ctrl; 179 173 struct gpio_chip chip; 180 - struct irq_chip irq; 181 174 u8 usid; 182 175 u8 pid_base; 183 176 }; ··· 442 437 arg = pad->pullup; 443 438 break; 444 439 case PMIC_GPIO_CONF_STRENGTH: 445 - arg = pad->strength; 440 + switch (pad->strength) { 441 + case PMIC_GPIO_OUT_STRENGTH_HIGH: 442 + arg = PMIC_GPIO_STRENGTH_HIGH; 443 + break; 444 + case PMIC_GPIO_OUT_STRENGTH_LOW: 445 + arg = PMIC_GPIO_STRENGTH_LOW; 446 + break; 447 + default: 448 + arg = pad->strength; 449 + break; 450 + } 446 451 break; 447 452 case PMIC_GPIO_CONF_ATEST: 448 453 arg = pad->atest; ··· 539 524 case PMIC_GPIO_CONF_STRENGTH: 540 525 if (arg > PMIC_GPIO_STRENGTH_LOW) 541 526 return -EINVAL; 542 - pad->strength = arg; 527 + switch (arg) { 528 + case PMIC_GPIO_STRENGTH_HIGH: 529 + pad->strength = PMIC_GPIO_OUT_STRENGTH_HIGH; 530 + break; 531 + case PMIC_GPIO_STRENGTH_LOW: 532 + pad->strength = PMIC_GPIO_OUT_STRENGTH_LOW; 533 + break; 534 + default: 535 + pad->strength = arg; 536 + break; 537 + } 543 538 break; 544 539 case PMIC_GPIO_CONF_ATEST: 545 540 if (!pad->lv_mv_type || arg > 4) ··· 848 823 pad->have_buffer = true; 849 824 pad->lv_mv_type = true; 850 825 break; 826 + case PMIC_GPIO_SUBTYPE_GPIO_LV_VIN2: 827 + pad->num_sources = 2; 828 + pad->have_buffer = true; 829 + pad->lv_mv_type = true; 830 + break; 831 + case PMIC_GPIO_SUBTYPE_GPIO_MV_VIN3: 832 + pad->num_sources = 3; 833 + pad->have_buffer = true; 834 + pad->lv_mv_type = true; 835 + break; 851 836 default: 852 837 dev_err(state->dev, "unknown GPIO type 0x%x\n", subtype); 853 838 return -ENODEV; ··· 1020 985 return 0; 1021 986 } 1022 987 988 + static void pmic_gpio_irq_mask(struct irq_data *data) 989 + { 990 + struct gpio_chip *gc = irq_data_get_irq_chip_data(data); 991 + 992 + irq_chip_mask_parent(data); 993 + gpiochip_disable_irq(gc, data->hwirq); 994 + } 995 + 996 + static void pmic_gpio_irq_unmask(struct irq_data *data) 997 + { 998 + struct gpio_chip *gc = irq_data_get_irq_chip_data(data); 999 + 1000 + gpiochip_enable_irq(gc, data->hwirq); 1001 + irq_chip_unmask_parent(data); 1002 + } 1003 + 1004 + static const struct irq_chip spmi_gpio_irq_chip = { 1005 + .name = "spmi-gpio", 1006 + .irq_ack = irq_chip_ack_parent, 1007 + .irq_mask = pmic_gpio_irq_mask, 1008 + .irq_unmask = pmic_gpio_irq_unmask, 1009 + .irq_set_type = irq_chip_set_type_parent, 1010 + .irq_set_wake = irq_chip_set_wake_parent, 1011 + .flags = IRQCHIP_IMMUTABLE | IRQCHIP_MASK_ON_SUSPEND, 1012 + GPIOCHIP_IRQ_RESOURCE_HELPERS, 1013 + }; 1014 + 1023 1015 static int pmic_gpio_probe(struct platform_device *pdev) 1024 1016 { 1025 1017 struct irq_domain *parent_domain; ··· 1140 1078 if (!parent_domain) 1141 1079 return -ENXIO; 1142 1080 1143 - state->irq.name = "spmi-gpio", 1144 - state->irq.irq_ack = irq_chip_ack_parent, 1145 - state->irq.irq_mask = irq_chip_mask_parent, 1146 - state->irq.irq_unmask = irq_chip_unmask_parent, 1147 - state->irq.irq_set_type = irq_chip_set_type_parent, 1148 - state->irq.irq_set_wake = irq_chip_set_wake_parent, 1149 - state->irq.flags = IRQCHIP_MASK_ON_SUSPEND, 1150 - 1151 1081 girq = &state->chip.irq; 1152 - girq->chip = &state->irq; 1082 + gpio_irq_chip_set_chip(girq, &spmi_gpio_irq_chip); 1153 1083 girq->default_type = IRQ_TYPE_NONE; 1154 1084 girq->handler = handle_level_irq; 1155 1085 girq->fwnode = of_node_to_fwnode(state->dev->of_node); ··· 1201 1147 { .compatible = "qcom,pm6150-gpio", .data = (void *) 10 }, 1202 1148 { .compatible = "qcom,pm6150l-gpio", .data = (void *) 12 }, 1203 1149 { .compatible = "qcom,pm6350-gpio", .data = (void *) 9 }, 1150 + { .compatible = "qcom,pm7250b-gpio", .data = (void *) 12 }, 1204 1151 { .compatible = "qcom,pm7325-gpio", .data = (void *) 10 }, 1205 1152 { .compatible = "qcom,pm8005-gpio", .data = (void *) 4 }, 1206 1153 { .compatible = "qcom,pm8008-gpio", .data = (void *) 2 },
+4 -4
drivers/pinctrl/samsung/pinctrl-samsung.c
··· 1166 1166 if (ret) 1167 1167 goto err_put_banks; 1168 1168 1169 - ret = samsung_gpiolib_register(pdev, drvdata); 1170 - if (ret) 1171 - goto err_unregister; 1172 - 1173 1169 if (ctrl->eint_gpio_init) 1174 1170 ctrl->eint_gpio_init(drvdata); 1175 1171 if (ctrl->eint_wkup_init) 1176 1172 ctrl->eint_wkup_init(drvdata); 1173 + 1174 + ret = samsung_gpiolib_register(pdev, drvdata); 1175 + if (ret) 1176 + goto err_unregister; 1177 1177 1178 1178 platform_set_drvdata(pdev, drvdata); 1179 1179
+18
drivers/pinctrl/starfive/Kconfig
··· 1 + # SPDX-License-Identifier: GPL-2.0-only 2 + 3 + config PINCTRL_STARFIVE_JH7100 4 + tristate "Pinctrl and GPIO driver for the StarFive JH7100 SoC" 5 + depends on SOC_STARFIVE || COMPILE_TEST 6 + depends on OF 7 + select GENERIC_PINCTRL_GROUPS 8 + select GENERIC_PINMUX_FUNCTIONS 9 + select GENERIC_PINCONF 10 + select GPIOLIB 11 + select GPIOLIB_IRQCHIP 12 + select OF_GPIO 13 + default SOC_STARFIVE 14 + help 15 + Say yes here to support pin control on the StarFive JH7100 SoC. 16 + This also provides an interface to the GPIO pins not used by other 17 + peripherals supporting inputs, outputs, configuring pull-up/pull-down 18 + and interrupts on input changes.
+3
drivers/pinctrl/starfive/Makefile
··· 1 + # SPDX-License-Identifier: GPL-2.0 2 + 3 + obj-$(CONFIG_PINCTRL_STARFIVE_JH7100) += pinctrl-starfive-jh7100.o
+2 -3
drivers/pinctrl/stm32/pinctrl-stm32.c
··· 1603 1603 1604 1604 bank->clk = of_clk_get_by_name(np, NULL); 1605 1605 if (IS_ERR(bank->clk)) { 1606 - if (PTR_ERR(bank->clk) != -EPROBE_DEFER) 1607 - dev_err(dev, "failed to get clk (%ld)\n", PTR_ERR(bank->clk)); 1608 1606 fwnode_handle_put(child); 1609 - return PTR_ERR(bank->clk); 1607 + return dev_err_probe(dev, PTR_ERR(bank->clk), 1608 + "failed to get clk\n"); 1610 1609 } 1611 1610 i++; 1612 1611 }
+3 -6
drivers/pinctrl/sunxi/pinctrl-sun50i-h5.c
··· 551 551 int ret; 552 552 553 553 ret = platform_irq_count(pdev); 554 - if (ret < 0) { 555 - if (ret != -EPROBE_DEFER) 556 - dev_err(&pdev->dev, "Couldn't determine irq count: %pe\n", 557 - ERR_PTR(ret)); 558 - return ret; 559 - } 554 + if (ret < 0) 555 + return dev_err_probe(&pdev->dev, ret, 556 + "Couldn't determine irq count\n"); 560 557 561 558 switch (ret) { 562 559 case 2:
+1280
include/dt-bindings/pinctrl/mediatek,mt8188-pinfunc.h
··· 1 + /* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */ 2 + /* 3 + * Copyright (C) 2022 MediaTek Inc. 4 + * Author: Hui Liu <hui.liu@mediatek.com> 5 + */ 6 + 7 + #ifndef __MEDIATEK_MT8188_PINFUNC_H 8 + #define __MEDIATEK_MT8188_PINFUNC_H 9 + 10 + #include "mt65xx.h" 11 + 12 + #define PINMUX_GPIO0__FUNC_B_GPIO0 (MTK_PIN_NO(0) | 0) 13 + #define PINMUX_GPIO0__FUNC_B0_TP_GPIO0_AO (MTK_PIN_NO(0) | 1) 14 + #define PINMUX_GPIO0__FUNC_O_SPIM5_CSB (MTK_PIN_NO(0) | 2) 15 + #define PINMUX_GPIO0__FUNC_O_UTXD1 (MTK_PIN_NO(0) | 3) 16 + #define PINMUX_GPIO0__FUNC_O_DMIC3_CLK (MTK_PIN_NO(0) | 4) 17 + #define PINMUX_GPIO0__FUNC_B0_I2SIN_MCK (MTK_PIN_NO(0) | 5) 18 + #define PINMUX_GPIO0__FUNC_O_I2SO2_MCK (MTK_PIN_NO(0) | 6) 19 + #define PINMUX_GPIO0__FUNC_B0_DBG_MON_A0 (MTK_PIN_NO(0) | 7) 20 + 21 + #define PINMUX_GPIO1__FUNC_B_GPIO1 (MTK_PIN_NO(1) | 0) 22 + #define PINMUX_GPIO1__FUNC_B0_TP_GPIO1_AO (MTK_PIN_NO(1) | 1) 23 + #define PINMUX_GPIO1__FUNC_O_SPIM5_CLK (MTK_PIN_NO(1) | 2) 24 + #define PINMUX_GPIO1__FUNC_I1_URXD1 (MTK_PIN_NO(1) | 3) 25 + #define PINMUX_GPIO1__FUNC_I0_DMIC3_DAT (MTK_PIN_NO(1) | 4) 26 + #define PINMUX_GPIO1__FUNC_B0_I2SIN_BCK (MTK_PIN_NO(1) | 5) 27 + #define PINMUX_GPIO1__FUNC_B0_I2SO2_BCK (MTK_PIN_NO(1) | 6) 28 + #define PINMUX_GPIO1__FUNC_B0_DBG_MON_A1 (MTK_PIN_NO(1) | 7) 29 + 30 + #define PINMUX_GPIO2__FUNC_B_GPIO2 (MTK_PIN_NO(2) | 0) 31 + #define PINMUX_GPIO2__FUNC_B0_TP_GPIO2_AO (MTK_PIN_NO(2) | 1) 32 + #define PINMUX_GPIO2__FUNC_B0_SPIM5_MOSI (MTK_PIN_NO(2) | 2) 33 + #define PINMUX_GPIO2__FUNC_O_URTS1 (MTK_PIN_NO(2) | 3) 34 + #define PINMUX_GPIO2__FUNC_I0_DMIC3_DAT_R (MTK_PIN_NO(2) | 4) 35 + #define PINMUX_GPIO2__FUNC_B0_I2SIN_WS (MTK_PIN_NO(2) | 5) 36 + #define PINMUX_GPIO2__FUNC_B0_I2SO2_WS (MTK_PIN_NO(2) | 6) 37 + #define PINMUX_GPIO2__FUNC_B0_DBG_MON_A2 (MTK_PIN_NO(2) | 7) 38 + 39 + #define PINMUX_GPIO3__FUNC_B_GPIO3 (MTK_PIN_NO(3) | 0) 40 + #define PINMUX_GPIO3__FUNC_B0_TP_GPIO3_AO (MTK_PIN_NO(3) | 1) 41 + #define PINMUX_GPIO3__FUNC_B0_SPIM5_MISO (MTK_PIN_NO(3) | 2) 42 + #define PINMUX_GPIO3__FUNC_I1_UCTS1 (MTK_PIN_NO(3) | 3) 43 + #define PINMUX_GPIO3__FUNC_O_DMIC4_CLK (MTK_PIN_NO(3) | 4) 44 + #define PINMUX_GPIO3__FUNC_I0_I2SIN_D0 (MTK_PIN_NO(3) | 5) 45 + #define PINMUX_GPIO3__FUNC_O_I2SO2_D0 (MTK_PIN_NO(3) | 6) 46 + #define PINMUX_GPIO3__FUNC_B0_DBG_MON_A3 (MTK_PIN_NO(3) | 7) 47 + 48 + #define PINMUX_GPIO4__FUNC_B_GPIO4 (MTK_PIN_NO(4) | 0) 49 + #define PINMUX_GPIO4__FUNC_B0_TP_GPIO4_AO (MTK_PIN_NO(4) | 1) 50 + #define PINMUX_GPIO4__FUNC_I0_SPDIF_IN2 (MTK_PIN_NO(4) | 2) 51 + #define PINMUX_GPIO4__FUNC_O_I2SO1_MCK (MTK_PIN_NO(4) | 3) 52 + #define PINMUX_GPIO4__FUNC_I0_DMIC4_DAT (MTK_PIN_NO(4) | 4) 53 + #define PINMUX_GPIO4__FUNC_I0_I2SIN_D1 (MTK_PIN_NO(4) | 5) 54 + #define PINMUX_GPIO4__FUNC_O_I2SO2_D1 (MTK_PIN_NO(4) | 6) 55 + #define PINMUX_GPIO4__FUNC_B0_DBG_MON_A4 (MTK_PIN_NO(4) | 7) 56 + 57 + #define PINMUX_GPIO5__FUNC_B_GPIO5 (MTK_PIN_NO(5) | 0) 58 + #define PINMUX_GPIO5__FUNC_B0_TP_GPIO5_AO (MTK_PIN_NO(5) | 1) 59 + #define PINMUX_GPIO5__FUNC_I0_SPDIF_IN1 (MTK_PIN_NO(5) | 2) 60 + #define PINMUX_GPIO5__FUNC_O_I2SO1_BCK (MTK_PIN_NO(5) | 3) 61 + #define PINMUX_GPIO5__FUNC_I0_DMIC4_DAT_R (MTK_PIN_NO(5) | 4) 62 + #define PINMUX_GPIO5__FUNC_I0_I2SIN_D2 (MTK_PIN_NO(5) | 5) 63 + #define PINMUX_GPIO5__FUNC_O_I2SO2_D2 (MTK_PIN_NO(5) | 6) 64 + #define PINMUX_GPIO5__FUNC_B0_DBG_MON_A5 (MTK_PIN_NO(5) | 7) 65 + 66 + #define PINMUX_GPIO6__FUNC_B_GPIO6 (MTK_PIN_NO(6) | 0) 67 + #define PINMUX_GPIO6__FUNC_B0_TP_GPIO6_AO (MTK_PIN_NO(6) | 1) 68 + #define PINMUX_GPIO6__FUNC_I0_SPDIF_IN0 (MTK_PIN_NO(6) | 2) 69 + #define PINMUX_GPIO6__FUNC_O_I2SO1_WS (MTK_PIN_NO(6) | 3) 70 + #define PINMUX_GPIO6__FUNC_O_DMIC1_CLK (MTK_PIN_NO(6) | 4) 71 + #define PINMUX_GPIO6__FUNC_I0_I2SIN_D3 (MTK_PIN_NO(6) | 5) 72 + #define PINMUX_GPIO6__FUNC_O_I2SO2_D3 (MTK_PIN_NO(6) | 6) 73 + #define PINMUX_GPIO6__FUNC_B0_MD32_0_GPIO0 (MTK_PIN_NO(6) | 7) 74 + 75 + #define PINMUX_GPIO7__FUNC_B_GPIO7 (MTK_PIN_NO(7) | 0) 76 + #define PINMUX_GPIO7__FUNC_B0_TP_GPIO7_AO (MTK_PIN_NO(7) | 1) 77 + #define PINMUX_GPIO7__FUNC_O_SPIM3_CSB (MTK_PIN_NO(7) | 2) 78 + #define PINMUX_GPIO7__FUNC_B0_TDMIN_MCK (MTK_PIN_NO(7) | 3) 79 + #define PINMUX_GPIO7__FUNC_I0_DMIC1_DAT (MTK_PIN_NO(7) | 4) 80 + #define PINMUX_GPIO7__FUNC_O_CMVREF0 (MTK_PIN_NO(7) | 5) 81 + #define PINMUX_GPIO7__FUNC_O_CLKM0 (MTK_PIN_NO(7) | 6) 82 + #define PINMUX_GPIO7__FUNC_B0_DBG_MON_A6 (MTK_PIN_NO(7) | 7) 83 + 84 + #define PINMUX_GPIO8__FUNC_B_GPIO8 (MTK_PIN_NO(8) | 0) 85 + #define PINMUX_GPIO8__FUNC_B0_TP_GPIO0_AO (MTK_PIN_NO(8) | 1) 86 + #define PINMUX_GPIO8__FUNC_O_SPIM3_CLK (MTK_PIN_NO(8) | 2) 87 + #define PINMUX_GPIO8__FUNC_B0_TDMIN_BCK (MTK_PIN_NO(8) | 3) 88 + #define PINMUX_GPIO8__FUNC_I0_DMIC1_DAT_R (MTK_PIN_NO(8) | 4) 89 + #define PINMUX_GPIO8__FUNC_O_CMVREF1 (MTK_PIN_NO(8) | 5) 90 + #define PINMUX_GPIO8__FUNC_O_CLKM1 (MTK_PIN_NO(8) | 6) 91 + #define PINMUX_GPIO8__FUNC_B0_DBG_MON_A7 (MTK_PIN_NO(8) | 7) 92 + 93 + #define PINMUX_GPIO9__FUNC_B_GPIO9 (MTK_PIN_NO(9) | 0) 94 + #define PINMUX_GPIO9__FUNC_B0_TP_GPIO1_AO (MTK_PIN_NO(9) | 1) 95 + #define PINMUX_GPIO9__FUNC_B0_SPIM3_MOSI (MTK_PIN_NO(9) | 2) 96 + #define PINMUX_GPIO9__FUNC_B0_TDMIN_LRCK (MTK_PIN_NO(9) | 3) 97 + #define PINMUX_GPIO9__FUNC_O_DMIC2_CLK (MTK_PIN_NO(9) | 4) 98 + #define PINMUX_GPIO9__FUNC_O_CMFLASH0 (MTK_PIN_NO(9) | 5) 99 + #define PINMUX_GPIO9__FUNC_O_PWM_0 (MTK_PIN_NO(9) | 6) 100 + #define PINMUX_GPIO9__FUNC_B0_DBG_MON_A8 (MTK_PIN_NO(9) | 7) 101 + 102 + #define PINMUX_GPIO10__FUNC_B_GPIO10 (MTK_PIN_NO(10) | 0) 103 + #define PINMUX_GPIO10__FUNC_B0_TP_GPIO2_AO (MTK_PIN_NO(10) | 1) 104 + #define PINMUX_GPIO10__FUNC_B0_SPIM3_MISO (MTK_PIN_NO(10) | 2) 105 + #define PINMUX_GPIO10__FUNC_I0_TDMIN_DI (MTK_PIN_NO(10) | 3) 106 + #define PINMUX_GPIO10__FUNC_I0_DMIC2_DAT (MTK_PIN_NO(10) | 4) 107 + #define PINMUX_GPIO10__FUNC_O_CMFLASH1 (MTK_PIN_NO(10) | 5) 108 + #define PINMUX_GPIO10__FUNC_O_PWM_1 (MTK_PIN_NO(10) | 6) 109 + #define PINMUX_GPIO10__FUNC_B0_DBG_MON_A9 (MTK_PIN_NO(10) | 7) 110 + 111 + #define PINMUX_GPIO11__FUNC_B_GPIO11 (MTK_PIN_NO(11) | 0) 112 + #define PINMUX_GPIO11__FUNC_B0_TP_GPIO3_AO (MTK_PIN_NO(11) | 1) 113 + #define PINMUX_GPIO11__FUNC_O_SPDIF_OUT (MTK_PIN_NO(11) | 2) 114 + #define PINMUX_GPIO11__FUNC_O_I2SO1_D0 (MTK_PIN_NO(11) | 3) 115 + #define PINMUX_GPIO11__FUNC_I0_DMIC2_DAT_R (MTK_PIN_NO(11) | 4) 116 + #define PINMUX_GPIO11__FUNC_I0_DVFSRC_EXT_REQ (MTK_PIN_NO(11) | 5) 117 + #define PINMUX_GPIO11__FUNC_O_CMVREF6 (MTK_PIN_NO(11) | 6) 118 + #define PINMUX_GPIO11__FUNC_B0_DBG_MON_A10 (MTK_PIN_NO(11) | 7) 119 + 120 + #define PINMUX_GPIO12__FUNC_B_GPIO12 (MTK_PIN_NO(12) | 0) 121 + #define PINMUX_GPIO12__FUNC_B0_TP_GPIO4_AO (MTK_PIN_NO(12) | 1) 122 + #define PINMUX_GPIO12__FUNC_O_SPIM4_CSB (MTK_PIN_NO(12) | 2) 123 + #define PINMUX_GPIO12__FUNC_B1_JTMS_SEL3 (MTK_PIN_NO(12) | 3) 124 + #define PINMUX_GPIO12__FUNC_B1_APU_JTAG_TMS (MTK_PIN_NO(12) | 4) 125 + #define PINMUX_GPIO12__FUNC_I0_VPU_UDI_TMS (MTK_PIN_NO(12) | 5) 126 + #define PINMUX_GPIO12__FUNC_I0_IPU_JTAG_TMS (MTK_PIN_NO(12) | 6) 127 + #define PINMUX_GPIO12__FUNC_I0_HDMITX20_HTPLG (MTK_PIN_NO(12) | 7) 128 + 129 + #define PINMUX_GPIO13__FUNC_B_GPIO13 (MTK_PIN_NO(13) | 0) 130 + #define PINMUX_GPIO13__FUNC_B0_TP_GPIO5_AO (MTK_PIN_NO(13) | 1) 131 + #define PINMUX_GPIO13__FUNC_O_SPIM4_CLK (MTK_PIN_NO(13) | 2) 132 + #define PINMUX_GPIO13__FUNC_I0_JTCK_SEL3 (MTK_PIN_NO(13) | 3) 133 + #define PINMUX_GPIO13__FUNC_I0_APU_JTAG_TCK (MTK_PIN_NO(13) | 4) 134 + #define PINMUX_GPIO13__FUNC_I0_VPU_UDI_TCK (MTK_PIN_NO(13) | 5) 135 + #define PINMUX_GPIO13__FUNC_I0_IPU_JTAG_TCK (MTK_PIN_NO(13) | 6) 136 + #define PINMUX_GPIO13__FUNC_B1_HDMITX20_CEC (MTK_PIN_NO(13) | 7) 137 + 138 + #define PINMUX_GPIO14__FUNC_B_GPIO14 (MTK_PIN_NO(14) | 0) 139 + #define PINMUX_GPIO14__FUNC_B0_TP_GPIO6_AO (MTK_PIN_NO(14) | 1) 140 + #define PINMUX_GPIO14__FUNC_B0_SPIM4_MOSI (MTK_PIN_NO(14) | 2) 141 + #define PINMUX_GPIO14__FUNC_I1_JTDI_SEL3 (MTK_PIN_NO(14) | 3) 142 + #define PINMUX_GPIO14__FUNC_I1_APU_JTAG_TDI (MTK_PIN_NO(14) | 4) 143 + #define PINMUX_GPIO14__FUNC_I0_VPU_UDI_TDI (MTK_PIN_NO(14) | 5) 144 + #define PINMUX_GPIO14__FUNC_I0_IPU_JTAG_TDI (MTK_PIN_NO(14) | 6) 145 + #define PINMUX_GPIO14__FUNC_B1_HDMITX20_SCL (MTK_PIN_NO(14) | 7) 146 + 147 + #define PINMUX_GPIO15__FUNC_B_GPIO15 (MTK_PIN_NO(15) | 0) 148 + #define PINMUX_GPIO15__FUNC_B0_TP_GPIO7_AO (MTK_PIN_NO(15) | 1) 149 + #define PINMUX_GPIO15__FUNC_B0_SPIM4_MISO (MTK_PIN_NO(15) | 2) 150 + #define PINMUX_GPIO15__FUNC_O_JTDO_SEL3 (MTK_PIN_NO(15) | 3) 151 + #define PINMUX_GPIO15__FUNC_O_APU_JTAG_TDO (MTK_PIN_NO(15) | 4) 152 + #define PINMUX_GPIO15__FUNC_O_VPU_UDI_TDO (MTK_PIN_NO(15) | 5) 153 + #define PINMUX_GPIO15__FUNC_O_IPU_JTAG_TDO (MTK_PIN_NO(15) | 6) 154 + #define PINMUX_GPIO15__FUNC_B1_HDMITX20_SDA (MTK_PIN_NO(15) | 7) 155 + 156 + #define PINMUX_GPIO16__FUNC_B_GPIO16 (MTK_PIN_NO(16) | 0) 157 + #define PINMUX_GPIO16__FUNC_B0_TP_GPIO0_AO (MTK_PIN_NO(16) | 1) 158 + #define PINMUX_GPIO16__FUNC_O_UTXD3 (MTK_PIN_NO(16) | 2) 159 + #define PINMUX_GPIO16__FUNC_I1_JTRSTn_SEL3 (MTK_PIN_NO(16) | 3) 160 + #define PINMUX_GPIO16__FUNC_I0_APU_JTAG_TRST (MTK_PIN_NO(16) | 4) 161 + #define PINMUX_GPIO16__FUNC_I0_VPU_UDI_NTRST (MTK_PIN_NO(16) | 5) 162 + #define PINMUX_GPIO16__FUNC_I0_IPU_JTAG_TRST (MTK_PIN_NO(16) | 6) 163 + #define PINMUX_GPIO16__FUNC_O_HDMITX20_PWR5V (MTK_PIN_NO(16) | 7) 164 + 165 + #define PINMUX_GPIO17__FUNC_B_GPIO17 (MTK_PIN_NO(17) | 0) 166 + #define PINMUX_GPIO17__FUNC_B0_TP_GPIO1_AO (MTK_PIN_NO(17) | 1) 167 + #define PINMUX_GPIO17__FUNC_I1_URXD3 (MTK_PIN_NO(17) | 2) 168 + #define PINMUX_GPIO17__FUNC_O_CMFLASH2 (MTK_PIN_NO(17) | 3) 169 + #define PINMUX_GPIO17__FUNC_I0_EDP_TX_HPD (MTK_PIN_NO(17) | 4) 170 + #define PINMUX_GPIO17__FUNC_I0_DVFSRC_EXT_REQ (MTK_PIN_NO(17) | 5) 171 + #define PINMUX_GPIO17__FUNC_O_CMVREF7 (MTK_PIN_NO(17) | 6) 172 + #define PINMUX_GPIO17__FUNC_B0_MD32_0_GPIO1 (MTK_PIN_NO(17) | 7) 173 + 174 + #define PINMUX_GPIO18__FUNC_B_GPIO18 (MTK_PIN_NO(18) | 0) 175 + #define PINMUX_GPIO18__FUNC_B0_TP_GPIO2_AO (MTK_PIN_NO(18) | 1) 176 + #define PINMUX_GPIO18__FUNC_O_CMFLASH0 (MTK_PIN_NO(18) | 2) 177 + #define PINMUX_GPIO18__FUNC_O_CMVREF4 (MTK_PIN_NO(18) | 3) 178 + #define PINMUX_GPIO18__FUNC_B0_TDMIN_MCK (MTK_PIN_NO(18) | 4) 179 + #define PINMUX_GPIO18__FUNC_O_UTXD1 (MTK_PIN_NO(18) | 5) 180 + #define PINMUX_GPIO18__FUNC_O_TP_UTXD1_AO (MTK_PIN_NO(18) | 6) 181 + #define PINMUX_GPIO18__FUNC_B0_DBG_MON_A11 (MTK_PIN_NO(18) | 7) 182 + 183 + #define PINMUX_GPIO19__FUNC_B_GPIO19 (MTK_PIN_NO(19) | 0) 184 + #define PINMUX_GPIO19__FUNC_B0_TP_GPIO3_AO (MTK_PIN_NO(19) | 1) 185 + #define PINMUX_GPIO19__FUNC_O_CMFLASH1 (MTK_PIN_NO(19) | 2) 186 + #define PINMUX_GPIO19__FUNC_O_CMVREF5 (MTK_PIN_NO(19) | 3) 187 + #define PINMUX_GPIO19__FUNC_B0_TDMIN_BCK (MTK_PIN_NO(19) | 4) 188 + #define PINMUX_GPIO19__FUNC_I1_URXD1 (MTK_PIN_NO(19) | 5) 189 + #define PINMUX_GPIO19__FUNC_I1_TP_URXD1_AO (MTK_PIN_NO(19) | 6) 190 + #define PINMUX_GPIO19__FUNC_B0_DBG_MON_A12 (MTK_PIN_NO(19) | 7) 191 + 192 + #define PINMUX_GPIO20__FUNC_B_GPIO20 (MTK_PIN_NO(20) | 0) 193 + #define PINMUX_GPIO20__FUNC_B0_TP_GPIO4_AO (MTK_PIN_NO(20) | 1) 194 + #define PINMUX_GPIO20__FUNC_O_CMFLASH2 (MTK_PIN_NO(20) | 2) 195 + #define PINMUX_GPIO20__FUNC_O_CLKM2 (MTK_PIN_NO(20) | 3) 196 + #define PINMUX_GPIO20__FUNC_B0_TDMIN_LRCK (MTK_PIN_NO(20) | 4) 197 + #define PINMUX_GPIO20__FUNC_O_URTS1 (MTK_PIN_NO(20) | 5) 198 + #define PINMUX_GPIO20__FUNC_O_TP_URTS1_AO (MTK_PIN_NO(20) | 6) 199 + #define PINMUX_GPIO20__FUNC_B0_DBG_MON_A13 (MTK_PIN_NO(20) | 7) 200 + 201 + #define PINMUX_GPIO21__FUNC_B_GPIO21 (MTK_PIN_NO(21) | 0) 202 + #define PINMUX_GPIO21__FUNC_B0_TP_GPIO5_AO (MTK_PIN_NO(21) | 1) 203 + #define PINMUX_GPIO21__FUNC_O_CMFLASH3 (MTK_PIN_NO(21) | 2) 204 + #define PINMUX_GPIO21__FUNC_O_CLKM3 (MTK_PIN_NO(21) | 3) 205 + #define PINMUX_GPIO21__FUNC_I0_TDMIN_DI (MTK_PIN_NO(21) | 4) 206 + #define PINMUX_GPIO21__FUNC_I1_UCTS1 (MTK_PIN_NO(21) | 5) 207 + #define PINMUX_GPIO21__FUNC_I1_TP_UCTS1_AO (MTK_PIN_NO(21) | 6) 208 + #define PINMUX_GPIO21__FUNC_B0_DBG_MON_A14 (MTK_PIN_NO(21) | 7) 209 + 210 + #define PINMUX_GPIO22__FUNC_B_GPIO22 (MTK_PIN_NO(22) | 0) 211 + #define PINMUX_GPIO22__FUNC_O_CMMCLK0 (MTK_PIN_NO(22) | 1) 212 + #define PINMUX_GPIO22__FUNC_B0_TP_GPIO6_AO (MTK_PIN_NO(22) | 5) 213 + #define PINMUX_GPIO22__FUNC_B0_DBG_MON_A15 (MTK_PIN_NO(22) | 7) 214 + 215 + #define PINMUX_GPIO23__FUNC_B_GPIO23 (MTK_PIN_NO(23) | 0) 216 + #define PINMUX_GPIO23__FUNC_O_CMMCLK1 (MTK_PIN_NO(23) | 1) 217 + #define PINMUX_GPIO23__FUNC_O_PWM_2 (MTK_PIN_NO(23) | 3) 218 + #define PINMUX_GPIO23__FUNC_B1_PCIE_PHY_I2C_SCL (MTK_PIN_NO(23) | 4) 219 + #define PINMUX_GPIO23__FUNC_B0_TP_GPIO7_AO (MTK_PIN_NO(23) | 5) 220 + #define PINMUX_GPIO23__FUNC_I0_DP_TX_HPD (MTK_PIN_NO(23) | 6) 221 + #define PINMUX_GPIO23__FUNC_B0_DBG_MON_A16 (MTK_PIN_NO(23) | 7) 222 + 223 + #define PINMUX_GPIO24__FUNC_B_GPIO24 (MTK_PIN_NO(24) | 0) 224 + #define PINMUX_GPIO24__FUNC_O_CMMCLK2 (MTK_PIN_NO(24) | 1) 225 + #define PINMUX_GPIO24__FUNC_O_PWM_3 (MTK_PIN_NO(24) | 3) 226 + #define PINMUX_GPIO24__FUNC_B1_PCIE_PHY_I2C_SDA (MTK_PIN_NO(24) | 4) 227 + #define PINMUX_GPIO24__FUNC_I0_DVFSRC_EXT_REQ (MTK_PIN_NO(24) | 5) 228 + #define PINMUX_GPIO24__FUNC_I0_EDP_TX_HPD (MTK_PIN_NO(24) | 6) 229 + #define PINMUX_GPIO24__FUNC_B0_MD32_0_GPIO2 (MTK_PIN_NO(24) | 7) 230 + 231 + #define PINMUX_GPIO25__FUNC_B_GPIO25 (MTK_PIN_NO(25) | 0) 232 + #define PINMUX_GPIO25__FUNC_O_LCM_RST (MTK_PIN_NO(25) | 1) 233 + #define PINMUX_GPIO25__FUNC_O_LCM1_RST (MTK_PIN_NO(25) | 2) 234 + #define PINMUX_GPIO25__FUNC_I0_DP_TX_HPD (MTK_PIN_NO(25) | 3) 235 + 236 + #define PINMUX_GPIO26__FUNC_B_GPIO26 (MTK_PIN_NO(26) | 0) 237 + #define PINMUX_GPIO26__FUNC_I0_DSI_TE (MTK_PIN_NO(26) | 1) 238 + #define PINMUX_GPIO26__FUNC_I0_DSI1_TE (MTK_PIN_NO(26) | 2) 239 + #define PINMUX_GPIO26__FUNC_I0_EDP_TX_HPD (MTK_PIN_NO(26) | 3) 240 + 241 + #define PINMUX_GPIO27__FUNC_B_GPIO27 (MTK_PIN_NO(27) | 0) 242 + #define PINMUX_GPIO27__FUNC_O_LCM1_RST (MTK_PIN_NO(27) | 1) 243 + #define PINMUX_GPIO27__FUNC_O_LCM_RST (MTK_PIN_NO(27) | 2) 244 + #define PINMUX_GPIO27__FUNC_I0_DP_TX_HPD (MTK_PIN_NO(27) | 3) 245 + #define PINMUX_GPIO27__FUNC_O_CMVREF2 (MTK_PIN_NO(27) | 4) 246 + #define PINMUX_GPIO27__FUNC_O_mbistwriteen_trigger (MTK_PIN_NO(27) | 5) 247 + #define PINMUX_GPIO27__FUNC_O_PWM_2 (MTK_PIN_NO(27) | 6) 248 + #define PINMUX_GPIO27__FUNC_B0_DBG_MON_A17 (MTK_PIN_NO(27) | 7) 249 + 250 + #define PINMUX_GPIO28__FUNC_B_GPIO28 (MTK_PIN_NO(28) | 0) 251 + #define PINMUX_GPIO28__FUNC_I0_DSI1_TE (MTK_PIN_NO(28) | 1) 252 + #define PINMUX_GPIO28__FUNC_I0_DSI_TE (MTK_PIN_NO(28) | 2) 253 + #define PINMUX_GPIO28__FUNC_I0_EDP_TX_HPD (MTK_PIN_NO(28) | 3) 254 + #define PINMUX_GPIO28__FUNC_O_CMVREF3 (MTK_PIN_NO(28) | 4) 255 + #define PINMUX_GPIO28__FUNC_O_mbistreaden_trigger (MTK_PIN_NO(28) | 5) 256 + #define PINMUX_GPIO28__FUNC_O_PWM_3 (MTK_PIN_NO(28) | 6) 257 + #define PINMUX_GPIO28__FUNC_B0_DBG_MON_A18 (MTK_PIN_NO(28) | 7) 258 + 259 + #define PINMUX_GPIO29__FUNC_B_GPIO29 (MTK_PIN_NO(29) | 0) 260 + #define PINMUX_GPIO29__FUNC_O_DISP_PWM0 (MTK_PIN_NO(29) | 1) 261 + #define PINMUX_GPIO29__FUNC_O_DISP_PWM1 (MTK_PIN_NO(29) | 2) 262 + 263 + #define PINMUX_GPIO30__FUNC_B_GPIO30 (MTK_PIN_NO(30) | 0) 264 + #define PINMUX_GPIO30__FUNC_O_DISP_PWM1 (MTK_PIN_NO(30) | 1) 265 + #define PINMUX_GPIO30__FUNC_O_DISP_PWM0 (MTK_PIN_NO(30) | 2) 266 + #define PINMUX_GPIO30__FUNC_O_CMFLASH3 (MTK_PIN_NO(30) | 3) 267 + #define PINMUX_GPIO30__FUNC_O_PWM_1 (MTK_PIN_NO(30) | 4) 268 + #define PINMUX_GPIO30__FUNC_B0_DBG_MON_A19 (MTK_PIN_NO(30) | 7) 269 + 270 + #define PINMUX_GPIO31__FUNC_B_GPIO31 (MTK_PIN_NO(31) | 0) 271 + #define PINMUX_GPIO31__FUNC_O_UTXD0 (MTK_PIN_NO(31) | 1) 272 + #define PINMUX_GPIO31__FUNC_O_TP_UTXD1_AO (MTK_PIN_NO(31) | 2) 273 + #define PINMUX_GPIO31__FUNC_O_ADSP_UTXD0 (MTK_PIN_NO(31) | 3) 274 + #define PINMUX_GPIO31__FUNC_O_TP_UTXD2_AO (MTK_PIN_NO(31) | 4) 275 + #define PINMUX_GPIO31__FUNC_O_MD32_0_TXD (MTK_PIN_NO(31) | 5) 276 + #define PINMUX_GPIO31__FUNC_O_MD32_1_TXD (MTK_PIN_NO(31) | 6) 277 + #define PINMUX_GPIO31__FUNC_O_SSPM_UTXD_AO (MTK_PIN_NO(31) | 7) 278 + 279 + #define PINMUX_GPIO32__FUNC_B_GPIO32 (MTK_PIN_NO(32) | 0) 280 + #define PINMUX_GPIO32__FUNC_I1_URXD0 (MTK_PIN_NO(32) | 1) 281 + #define PINMUX_GPIO32__FUNC_I1_TP_URXD1_AO (MTK_PIN_NO(32) | 2) 282 + #define PINMUX_GPIO32__FUNC_I1_ADSP_URXD0 (MTK_PIN_NO(32) | 3) 283 + #define PINMUX_GPIO32__FUNC_I1_TP_URXD2_AO (MTK_PIN_NO(32) | 4) 284 + #define PINMUX_GPIO32__FUNC_I1_MD32_0_RXD (MTK_PIN_NO(32) | 5) 285 + #define PINMUX_GPIO32__FUNC_I1_MD32_1_RXD (MTK_PIN_NO(32) | 6) 286 + #define PINMUX_GPIO32__FUNC_I1_SSPM_URXD_AO (MTK_PIN_NO(32) | 7) 287 + 288 + #define PINMUX_GPIO33__FUNC_B_GPIO33 (MTK_PIN_NO(33) | 0) 289 + #define PINMUX_GPIO33__FUNC_O_UTXD1 (MTK_PIN_NO(33) | 1) 290 + #define PINMUX_GPIO33__FUNC_O_URTS2 (MTK_PIN_NO(33) | 2) 291 + #define PINMUX_GPIO33__FUNC_O_ADSP_UTXD0 (MTK_PIN_NO(33) | 3) 292 + #define PINMUX_GPIO33__FUNC_O_TP_UTXD1_AO (MTK_PIN_NO(33) | 4) 293 + #define PINMUX_GPIO33__FUNC_O_mbistwriteen_trigger (MTK_PIN_NO(33) | 5) 294 + #define PINMUX_GPIO33__FUNC_O_MD32_0_TXD (MTK_PIN_NO(33) | 6) 295 + #define PINMUX_GPIO33__FUNC_O_SSPM_UTXD_AO (MTK_PIN_NO(33) | 7) 296 + 297 + #define PINMUX_GPIO34__FUNC_B_GPIO34 (MTK_PIN_NO(34) | 0) 298 + #define PINMUX_GPIO34__FUNC_I1_URXD1 (MTK_PIN_NO(34) | 1) 299 + #define PINMUX_GPIO34__FUNC_I1_UCTS2 (MTK_PIN_NO(34) | 2) 300 + #define PINMUX_GPIO34__FUNC_I1_ADSP_URXD0 (MTK_PIN_NO(34) | 3) 301 + #define PINMUX_GPIO34__FUNC_I1_TP_URXD1_AO (MTK_PIN_NO(34) | 4) 302 + #define PINMUX_GPIO34__FUNC_O_mbistreaden_trigger (MTK_PIN_NO(34) | 5) 303 + #define PINMUX_GPIO34__FUNC_I1_MD32_0_RXD (MTK_PIN_NO(34) | 6) 304 + #define PINMUX_GPIO34__FUNC_I1_SSPM_URXD_AO (MTK_PIN_NO(34) | 7) 305 + 306 + #define PINMUX_GPIO35__FUNC_B_GPIO35 (MTK_PIN_NO(35) | 0) 307 + #define PINMUX_GPIO35__FUNC_O_UTXD2 (MTK_PIN_NO(35) | 1) 308 + #define PINMUX_GPIO35__FUNC_O_URTS1 (MTK_PIN_NO(35) | 2) 309 + #define PINMUX_GPIO35__FUNC_O_ADSP_UTXD0 (MTK_PIN_NO(35) | 3) 310 + #define PINMUX_GPIO35__FUNC_O_TP_URTS1_AO (MTK_PIN_NO(35) | 4) 311 + #define PINMUX_GPIO35__FUNC_O_TP_UTXD2_AO (MTK_PIN_NO(35) | 5) 312 + #define PINMUX_GPIO35__FUNC_O_MD32_1_TXD (MTK_PIN_NO(35) | 6) 313 + #define PINMUX_GPIO35__FUNC_B0_DBG_MON_A20 (MTK_PIN_NO(35) | 7) 314 + 315 + #define PINMUX_GPIO36__FUNC_B_GPIO36 (MTK_PIN_NO(36) | 0) 316 + #define PINMUX_GPIO36__FUNC_I1_URXD2 (MTK_PIN_NO(36) | 1) 317 + #define PINMUX_GPIO36__FUNC_I1_UCTS1 (MTK_PIN_NO(36) | 2) 318 + #define PINMUX_GPIO36__FUNC_I1_ADSP_URXD0 (MTK_PIN_NO(36) | 3) 319 + #define PINMUX_GPIO36__FUNC_I1_TP_UCTS1_AO (MTK_PIN_NO(36) | 4) 320 + #define PINMUX_GPIO36__FUNC_I1_TP_URXD2_AO (MTK_PIN_NO(36) | 5) 321 + #define PINMUX_GPIO36__FUNC_I1_MD32_1_RXD (MTK_PIN_NO(36) | 6) 322 + #define PINMUX_GPIO36__FUNC_B0_DBG_MON_A21 (MTK_PIN_NO(36) | 7) 323 + 324 + #define PINMUX_GPIO37__FUNC_B_GPIO37 (MTK_PIN_NO(37) | 0) 325 + #define PINMUX_GPIO37__FUNC_B1_JTMS_SEL1 (MTK_PIN_NO(37) | 1) 326 + #define PINMUX_GPIO37__FUNC_I0_UDI_TMS (MTK_PIN_NO(37) | 2) 327 + #define PINMUX_GPIO37__FUNC_I1_SPM_JTAG_TMS (MTK_PIN_NO(37) | 3) 328 + #define PINMUX_GPIO37__FUNC_I1_ADSP_JTAG0_TMS (MTK_PIN_NO(37) | 4) 329 + #define PINMUX_GPIO37__FUNC_I1_SCP_JTAG0_TMS (MTK_PIN_NO(37) | 5) 330 + #define PINMUX_GPIO37__FUNC_I1_CCU0_JTAG_TMS (MTK_PIN_NO(37) | 6) 331 + #define PINMUX_GPIO37__FUNC_I1_MCUPM_JTAG_TMS (MTK_PIN_NO(37) | 7) 332 + 333 + #define PINMUX_GPIO38__FUNC_B_GPIO38 (MTK_PIN_NO(38) | 0) 334 + #define PINMUX_GPIO38__FUNC_I0_JTCK_SEL1 (MTK_PIN_NO(38) | 1) 335 + #define PINMUX_GPIO38__FUNC_I0_UDI_TCK (MTK_PIN_NO(38) | 2) 336 + #define PINMUX_GPIO38__FUNC_I1_SPM_JTAG_TCK (MTK_PIN_NO(38) | 3) 337 + #define PINMUX_GPIO38__FUNC_I0_ADSP_JTAG0_TCK (MTK_PIN_NO(38) | 4) 338 + #define PINMUX_GPIO38__FUNC_I1_SCP_JTAG0_TCK (MTK_PIN_NO(38) | 5) 339 + #define PINMUX_GPIO38__FUNC_I1_CCU0_JTAG_TCK (MTK_PIN_NO(38) | 6) 340 + #define PINMUX_GPIO38__FUNC_I1_MCUPM_JTAG_TCK (MTK_PIN_NO(38) | 7) 341 + 342 + #define PINMUX_GPIO39__FUNC_B_GPIO39 (MTK_PIN_NO(39) | 0) 343 + #define PINMUX_GPIO39__FUNC_I1_JTDI_SEL1 (MTK_PIN_NO(39) | 1) 344 + #define PINMUX_GPIO39__FUNC_I0_UDI_TDI (MTK_PIN_NO(39) | 2) 345 + #define PINMUX_GPIO39__FUNC_I1_SPM_JTAG_TDI (MTK_PIN_NO(39) | 3) 346 + #define PINMUX_GPIO39__FUNC_I1_ADSP_JTAG0_TDI (MTK_PIN_NO(39) | 4) 347 + #define PINMUX_GPIO39__FUNC_I1_SCP_JTAG0_TDI (MTK_PIN_NO(39) | 5) 348 + #define PINMUX_GPIO39__FUNC_I1_CCU0_JTAG_TDI (MTK_PIN_NO(39) | 6) 349 + #define PINMUX_GPIO39__FUNC_I1_MCUPM_JTAG_TDI (MTK_PIN_NO(39) | 7) 350 + 351 + #define PINMUX_GPIO40__FUNC_B_GPIO40 (MTK_PIN_NO(40) | 0) 352 + #define PINMUX_GPIO40__FUNC_O_JTDO_SEL1 (MTK_PIN_NO(40) | 1) 353 + #define PINMUX_GPIO40__FUNC_O_UDI_TDO (MTK_PIN_NO(40) | 2) 354 + #define PINMUX_GPIO40__FUNC_O_SPM_JTAG_TDO (MTK_PIN_NO(40) | 3) 355 + #define PINMUX_GPIO40__FUNC_O_ADSP_JTAG0_TDO (MTK_PIN_NO(40) | 4) 356 + #define PINMUX_GPIO40__FUNC_O_SCP_JTAG0_TDO (MTK_PIN_NO(40) | 5) 357 + #define PINMUX_GPIO40__FUNC_O_CCU0_JTAG_TDO (MTK_PIN_NO(40) | 6) 358 + #define PINMUX_GPIO40__FUNC_O_MCUPM_JTAG_TDO (MTK_PIN_NO(40) | 7) 359 + 360 + #define PINMUX_GPIO41__FUNC_B_GPIO41 (MTK_PIN_NO(41) | 0) 361 + #define PINMUX_GPIO41__FUNC_I1_JTRSTn_SEL1 (MTK_PIN_NO(41) | 1) 362 + #define PINMUX_GPIO41__FUNC_I0_UDI_NTRST (MTK_PIN_NO(41) | 2) 363 + #define PINMUX_GPIO41__FUNC_I0_SPM_JTAG_TRSTN (MTK_PIN_NO(41) | 3) 364 + #define PINMUX_GPIO41__FUNC_I1_ADSP_JTAG0_TRSTN (MTK_PIN_NO(41) | 4) 365 + #define PINMUX_GPIO41__FUNC_I0_SCP_JTAG0_TRSTN (MTK_PIN_NO(41) | 5) 366 + #define PINMUX_GPIO41__FUNC_I1_CCU0_JTAG_TRST (MTK_PIN_NO(41) | 6) 367 + #define PINMUX_GPIO41__FUNC_I0_MCUPM_JTAG_TRSTN (MTK_PIN_NO(41) | 7) 368 + 369 + #define PINMUX_GPIO42__FUNC_B_GPIO42 (MTK_PIN_NO(42) | 0) 370 + #define PINMUX_GPIO42__FUNC_B1_KPCOL0 (MTK_PIN_NO(42) | 1) 371 + 372 + #define PINMUX_GPIO43__FUNC_B_GPIO43 (MTK_PIN_NO(43) | 0) 373 + #define PINMUX_GPIO43__FUNC_B1_KPCOL1 (MTK_PIN_NO(43) | 1) 374 + #define PINMUX_GPIO43__FUNC_I0_DP_TX_HPD (MTK_PIN_NO(43) | 2) 375 + #define PINMUX_GPIO43__FUNC_O_CMFLASH2 (MTK_PIN_NO(43) | 3) 376 + #define PINMUX_GPIO43__FUNC_I0_DVFSRC_EXT_REQ (MTK_PIN_NO(43) | 4) 377 + #define PINMUX_GPIO43__FUNC_O_mbistwriteen_trigger (MTK_PIN_NO(43) | 7) 378 + 379 + #define PINMUX_GPIO44__FUNC_B_GPIO44 (MTK_PIN_NO(44) | 0) 380 + #define PINMUX_GPIO44__FUNC_B1_KPROW0 (MTK_PIN_NO(44) | 1) 381 + 382 + #define PINMUX_GPIO45__FUNC_B_GPIO45 (MTK_PIN_NO(45) | 0) 383 + #define PINMUX_GPIO45__FUNC_B1_KPROW1 (MTK_PIN_NO(45) | 1) 384 + #define PINMUX_GPIO45__FUNC_I0_EDP_TX_HPD (MTK_PIN_NO(45) | 2) 385 + #define PINMUX_GPIO45__FUNC_O_CMFLASH3 (MTK_PIN_NO(45) | 3) 386 + #define PINMUX_GPIO45__FUNC_B0_I2SIN_MCK (MTK_PIN_NO(45) | 4) 387 + #define PINMUX_GPIO45__FUNC_O_mbistreaden_trigger (MTK_PIN_NO(45) | 7) 388 + 389 + #define PINMUX_GPIO46__FUNC_B_GPIO46 (MTK_PIN_NO(46) | 0) 390 + #define PINMUX_GPIO46__FUNC_I0_DP_TX_HPD (MTK_PIN_NO(46) | 1) 391 + #define PINMUX_GPIO46__FUNC_O_PWM_0 (MTK_PIN_NO(46) | 2) 392 + #define PINMUX_GPIO46__FUNC_I0_VBUSVALID_2P (MTK_PIN_NO(46) | 3) 393 + #define PINMUX_GPIO46__FUNC_B0_DBG_MON_A22 (MTK_PIN_NO(46) | 7) 394 + 395 + #define PINMUX_GPIO47__FUNC_B_GPIO47 (MTK_PIN_NO(47) | 0) 396 + #define PINMUX_GPIO47__FUNC_I1_WAKEN (MTK_PIN_NO(47) | 1) 397 + #define PINMUX_GPIO47__FUNC_O_GDU_TROOPS_DET0 (MTK_PIN_NO(47) | 6) 398 + 399 + #define PINMUX_GPIO48__FUNC_B_GPIO48 (MTK_PIN_NO(48) | 0) 400 + #define PINMUX_GPIO48__FUNC_O_PERSTN (MTK_PIN_NO(48) | 1) 401 + #define PINMUX_GPIO48__FUNC_O_GDU_TROOPS_DET1 (MTK_PIN_NO(48) | 6) 402 + 403 + #define PINMUX_GPIO49__FUNC_B_GPIO49 (MTK_PIN_NO(49) | 0) 404 + #define PINMUX_GPIO49__FUNC_B1_CLKREQN (MTK_PIN_NO(49) | 1) 405 + #define PINMUX_GPIO49__FUNC_O_GDU_TROOPS_DET2 (MTK_PIN_NO(49) | 6) 406 + 407 + #define PINMUX_GPIO50__FUNC_B_GPIO50 (MTK_PIN_NO(50) | 0) 408 + #define PINMUX_GPIO50__FUNC_O_HDMITX20_PWR5V (MTK_PIN_NO(50) | 1) 409 + #define PINMUX_GPIO50__FUNC_I1_IDDIG_1P (MTK_PIN_NO(50) | 3) 410 + #define PINMUX_GPIO50__FUNC_I1_SCP_JTAG1_TMS (MTK_PIN_NO(50) | 4) 411 + #define PINMUX_GPIO50__FUNC_I1_SSPM_JTAG_TMS (MTK_PIN_NO(50) | 5) 412 + #define PINMUX_GPIO50__FUNC_I1_MD32_0_JTAG_TMS (MTK_PIN_NO(50) | 6) 413 + #define PINMUX_GPIO50__FUNC_I1_MD32_1_JTAG_TMS (MTK_PIN_NO(50) | 7) 414 + 415 + #define PINMUX_GPIO51__FUNC_B_GPIO51 (MTK_PIN_NO(51) | 0) 416 + #define PINMUX_GPIO51__FUNC_I0_HDMITX20_HTPLG (MTK_PIN_NO(51) | 1) 417 + #define PINMUX_GPIO51__FUNC_I0_EDP_TX_HPD (MTK_PIN_NO(51) | 2) 418 + #define PINMUX_GPIO51__FUNC_O_USB_DRVVBUS_1P (MTK_PIN_NO(51) | 3) 419 + #define PINMUX_GPIO51__FUNC_I1_SCP_JTAG1_TCK (MTK_PIN_NO(51) | 4) 420 + #define PINMUX_GPIO51__FUNC_I1_SSPM_JTAG_TCK (MTK_PIN_NO(51) | 5) 421 + #define PINMUX_GPIO51__FUNC_I1_MD32_0_JTAG_TCK (MTK_PIN_NO(51) | 6) 422 + #define PINMUX_GPIO51__FUNC_I1_MD32_1_JTAG_TCK (MTK_PIN_NO(51) | 7) 423 + 424 + #define PINMUX_GPIO52__FUNC_B_GPIO52 (MTK_PIN_NO(52) | 0) 425 + #define PINMUX_GPIO52__FUNC_B1_HDMITX20_CEC (MTK_PIN_NO(52) | 1) 426 + #define PINMUX_GPIO52__FUNC_I0_VBUSVALID_1P (MTK_PIN_NO(52) | 3) 427 + #define PINMUX_GPIO52__FUNC_I1_SCP_JTAG1_TDI (MTK_PIN_NO(52) | 4) 428 + #define PINMUX_GPIO52__FUNC_I1_SSPM_JTAG_TDI (MTK_PIN_NO(52) | 5) 429 + #define PINMUX_GPIO52__FUNC_I1_MD32_0_JTAG_TDI (MTK_PIN_NO(52) | 6) 430 + #define PINMUX_GPIO52__FUNC_I1_MD32_1_JTAG_TDI (MTK_PIN_NO(52) | 7) 431 + 432 + #define PINMUX_GPIO53__FUNC_B_GPIO53 (MTK_PIN_NO(53) | 0) 433 + #define PINMUX_GPIO53__FUNC_B1_HDMITX20_SCL (MTK_PIN_NO(53) | 1) 434 + #define PINMUX_GPIO53__FUNC_I1_IDDIG_2P (MTK_PIN_NO(53) | 3) 435 + #define PINMUX_GPIO53__FUNC_O_SCP_JTAG1_TDO (MTK_PIN_NO(53) | 4) 436 + #define PINMUX_GPIO53__FUNC_O_SSPM_JTAG_TDO (MTK_PIN_NO(53) | 5) 437 + #define PINMUX_GPIO53__FUNC_O_MD32_0_JTAG_TDO (MTK_PIN_NO(53) | 6) 438 + #define PINMUX_GPIO53__FUNC_O_MD32_1_JTAG_TDO (MTK_PIN_NO(53) | 7) 439 + 440 + #define PINMUX_GPIO54__FUNC_B_GPIO54 (MTK_PIN_NO(54) | 0) 441 + #define PINMUX_GPIO54__FUNC_B1_HDMITX20_SDA (MTK_PIN_NO(54) | 1) 442 + #define PINMUX_GPIO54__FUNC_O_USB_DRVVBUS_2P (MTK_PIN_NO(54) | 3) 443 + #define PINMUX_GPIO54__FUNC_I0_SCP_JTAG1_TRSTN (MTK_PIN_NO(54) | 4) 444 + #define PINMUX_GPIO54__FUNC_I0_SSPM_JTAG_TRSTN (MTK_PIN_NO(54) | 5) 445 + #define PINMUX_GPIO54__FUNC_I1_MD32_0_JTAG_TRST (MTK_PIN_NO(54) | 6) 446 + #define PINMUX_GPIO54__FUNC_I1_MD32_1_JTAG_TRST (MTK_PIN_NO(54) | 7) 447 + 448 + #define PINMUX_GPIO55__FUNC_B_GPIO55 (MTK_PIN_NO(55) | 0) 449 + #define PINMUX_GPIO55__FUNC_B1_SCL0 (MTK_PIN_NO(55) | 1) 450 + #define PINMUX_GPIO55__FUNC_B1_SCP_SCL0 (MTK_PIN_NO(55) | 2) 451 + #define PINMUX_GPIO55__FUNC_B1_SCP_SCL1 (MTK_PIN_NO(55) | 3) 452 + #define PINMUX_GPIO55__FUNC_B1_PCIE_PHY_I2C_SCL (MTK_PIN_NO(55) | 4) 453 + 454 + #define PINMUX_GPIO56__FUNC_B_GPIO56 (MTK_PIN_NO(56) | 0) 455 + #define PINMUX_GPIO56__FUNC_B1_SDA0 (MTK_PIN_NO(56) | 1) 456 + #define PINMUX_GPIO56__FUNC_B1_SCP_SDA0 (MTK_PIN_NO(56) | 2) 457 + #define PINMUX_GPIO56__FUNC_B1_SCP_SDA1 (MTK_PIN_NO(56) | 3) 458 + #define PINMUX_GPIO56__FUNC_B1_PCIE_PHY_I2C_SDA (MTK_PIN_NO(56) | 4) 459 + 460 + #define PINMUX_GPIO57__FUNC_B_GPIO57 (MTK_PIN_NO(57) | 0) 461 + #define PINMUX_GPIO57__FUNC_B1_SCL1 (MTK_PIN_NO(57) | 1) 462 + 463 + #define PINMUX_GPIO58__FUNC_B_GPIO58 (MTK_PIN_NO(58) | 0) 464 + #define PINMUX_GPIO58__FUNC_B1_SDA1 (MTK_PIN_NO(58) | 1) 465 + 466 + #define PINMUX_GPIO59__FUNC_B_GPIO59 (MTK_PIN_NO(59) | 0) 467 + #define PINMUX_GPIO59__FUNC_B1_SCL2 (MTK_PIN_NO(59) | 1) 468 + #define PINMUX_GPIO59__FUNC_B1_SCP_SCL0 (MTK_PIN_NO(59) | 2) 469 + #define PINMUX_GPIO59__FUNC_B1_SCP_SCL1 (MTK_PIN_NO(59) | 3) 470 + 471 + #define PINMUX_GPIO60__FUNC_B_GPIO60 (MTK_PIN_NO(60) | 0) 472 + #define PINMUX_GPIO60__FUNC_B1_SDA2 (MTK_PIN_NO(60) | 1) 473 + #define PINMUX_GPIO60__FUNC_B1_SCP_SDA0 (MTK_PIN_NO(60) | 2) 474 + #define PINMUX_GPIO60__FUNC_B1_SCP_SDA1 (MTK_PIN_NO(60) | 3) 475 + 476 + #define PINMUX_GPIO61__FUNC_B_GPIO61 (MTK_PIN_NO(61) | 0) 477 + #define PINMUX_GPIO61__FUNC_B1_SCL3 (MTK_PIN_NO(61) | 1) 478 + #define PINMUX_GPIO61__FUNC_B1_SCP_SCL0 (MTK_PIN_NO(61) | 2) 479 + #define PINMUX_GPIO61__FUNC_B1_SCP_SCL1 (MTK_PIN_NO(61) | 3) 480 + #define PINMUX_GPIO61__FUNC_B1_PCIE_PHY_I2C_SCL (MTK_PIN_NO(61) | 4) 481 + 482 + #define PINMUX_GPIO62__FUNC_B_GPIO62 (MTK_PIN_NO(62) | 0) 483 + #define PINMUX_GPIO62__FUNC_B1_SDA3 (MTK_PIN_NO(62) | 1) 484 + #define PINMUX_GPIO62__FUNC_B1_SCP_SDA0 (MTK_PIN_NO(62) | 2) 485 + #define PINMUX_GPIO62__FUNC_B1_SCP_SDA1 (MTK_PIN_NO(62) | 3) 486 + #define PINMUX_GPIO62__FUNC_B1_PCIE_PHY_I2C_SDA (MTK_PIN_NO(62) | 4) 487 + 488 + #define PINMUX_GPIO63__FUNC_B_GPIO63 (MTK_PIN_NO(63) | 0) 489 + #define PINMUX_GPIO63__FUNC_B1_SCL4 (MTK_PIN_NO(63) | 1) 490 + 491 + #define PINMUX_GPIO64__FUNC_B_GPIO64 (MTK_PIN_NO(64) | 0) 492 + #define PINMUX_GPIO64__FUNC_B1_SDA4 (MTK_PIN_NO(64) | 1) 493 + 494 + #define PINMUX_GPIO65__FUNC_B_GPIO65 (MTK_PIN_NO(65) | 0) 495 + #define PINMUX_GPIO65__FUNC_B1_SCL5 (MTK_PIN_NO(65) | 1) 496 + #define PINMUX_GPIO65__FUNC_B1_SCP_SCL0 (MTK_PIN_NO(65) | 2) 497 + #define PINMUX_GPIO65__FUNC_B1_SCP_SCL1 (MTK_PIN_NO(65) | 3) 498 + 499 + #define PINMUX_GPIO66__FUNC_B_GPIO66 (MTK_PIN_NO(66) | 0) 500 + #define PINMUX_GPIO66__FUNC_B1_SDA5 (MTK_PIN_NO(66) | 1) 501 + #define PINMUX_GPIO66__FUNC_B1_SCP_SDA0 (MTK_PIN_NO(66) | 2) 502 + #define PINMUX_GPIO66__FUNC_B1_SCP_SDA1 (MTK_PIN_NO(66) | 3) 503 + 504 + #define PINMUX_GPIO67__FUNC_B_GPIO67 (MTK_PIN_NO(67) | 0) 505 + #define PINMUX_GPIO67__FUNC_B1_SCL6 (MTK_PIN_NO(67) | 1) 506 + #define PINMUX_GPIO67__FUNC_B1_SCP_SCL0 (MTK_PIN_NO(67) | 2) 507 + #define PINMUX_GPIO67__FUNC_B1_SCP_SCL1 (MTK_PIN_NO(67) | 3) 508 + #define PINMUX_GPIO67__FUNC_B1_PCIE_PHY_I2C_SCL (MTK_PIN_NO(67) | 4) 509 + 510 + #define PINMUX_GPIO68__FUNC_B_GPIO68 (MTK_PIN_NO(68) | 0) 511 + #define PINMUX_GPIO68__FUNC_B1_SDA6 (MTK_PIN_NO(68) | 1) 512 + #define PINMUX_GPIO68__FUNC_B1_SCP_SDA0 (MTK_PIN_NO(68) | 2) 513 + #define PINMUX_GPIO68__FUNC_B1_SCP_SDA1 (MTK_PIN_NO(68) | 3) 514 + #define PINMUX_GPIO68__FUNC_B1_PCIE_PHY_I2C_SDA (MTK_PIN_NO(68) | 4) 515 + 516 + #define PINMUX_GPIO69__FUNC_B_GPIO69 (MTK_PIN_NO(69) | 0) 517 + #define PINMUX_GPIO69__FUNC_O_SPIM0_CSB (MTK_PIN_NO(69) | 1) 518 + #define PINMUX_GPIO69__FUNC_O_SCP_SPI0_CS (MTK_PIN_NO(69) | 2) 519 + #define PINMUX_GPIO69__FUNC_O_DMIC3_CLK (MTK_PIN_NO(69) | 3) 520 + #define PINMUX_GPIO69__FUNC_B0_MD32_1_GPIO0 (MTK_PIN_NO(69) | 4) 521 + #define PINMUX_GPIO69__FUNC_O_CMVREF0 (MTK_PIN_NO(69) | 5) 522 + #define PINMUX_GPIO69__FUNC_O_GDU_SUM_TROOP0_0 (MTK_PIN_NO(69) | 6) 523 + #define PINMUX_GPIO69__FUNC_B0_DBG_MON_A23 (MTK_PIN_NO(69) | 7) 524 + 525 + #define PINMUX_GPIO70__FUNC_B_GPIO70 (MTK_PIN_NO(70) | 0) 526 + #define PINMUX_GPIO70__FUNC_O_SPIM0_CLK (MTK_PIN_NO(70) | 1) 527 + #define PINMUX_GPIO70__FUNC_O_SCP_SPI0_CK (MTK_PIN_NO(70) | 2) 528 + #define PINMUX_GPIO70__FUNC_I0_DMIC3_DAT (MTK_PIN_NO(70) | 3) 529 + #define PINMUX_GPIO70__FUNC_B0_MD32_1_GPIO1 (MTK_PIN_NO(70) | 4) 530 + #define PINMUX_GPIO70__FUNC_O_CMVREF1 (MTK_PIN_NO(70) | 5) 531 + #define PINMUX_GPIO70__FUNC_O_GDU_SUM_TROOP0_1 (MTK_PIN_NO(70) | 6) 532 + #define PINMUX_GPIO70__FUNC_B0_DBG_MON_A24 (MTK_PIN_NO(70) | 7) 533 + 534 + #define PINMUX_GPIO71__FUNC_B_GPIO71 (MTK_PIN_NO(71) | 0) 535 + #define PINMUX_GPIO71__FUNC_B0_SPIM0_MOSI (MTK_PIN_NO(71) | 1) 536 + #define PINMUX_GPIO71__FUNC_O_SCP_SPI0_MO (MTK_PIN_NO(71) | 2) 537 + #define PINMUX_GPIO71__FUNC_I0_DMIC3_DAT_R (MTK_PIN_NO(71) | 3) 538 + #define PINMUX_GPIO71__FUNC_B0_MD32_1_GPIO2 (MTK_PIN_NO(71) | 4) 539 + #define PINMUX_GPIO71__FUNC_O_CMVREF2 (MTK_PIN_NO(71) | 5) 540 + #define PINMUX_GPIO71__FUNC_O_GDU_SUM_TROOP0_2 (MTK_PIN_NO(71) | 6) 541 + #define PINMUX_GPIO71__FUNC_B0_DBG_MON_A25 (MTK_PIN_NO(71) | 7) 542 + 543 + #define PINMUX_GPIO72__FUNC_B_GPIO72 (MTK_PIN_NO(72) | 0) 544 + #define PINMUX_GPIO72__FUNC_B0_SPIM0_MISO (MTK_PIN_NO(72) | 1) 545 + #define PINMUX_GPIO72__FUNC_I0_SCP_SPI0_MI (MTK_PIN_NO(72) | 2) 546 + #define PINMUX_GPIO72__FUNC_O_DMIC4_CLK (MTK_PIN_NO(72) | 3) 547 + #define PINMUX_GPIO72__FUNC_O_CMVREF3 (MTK_PIN_NO(72) | 5) 548 + #define PINMUX_GPIO72__FUNC_O_GDU_SUM_TROOP1_0 (MTK_PIN_NO(72) | 6) 549 + #define PINMUX_GPIO72__FUNC_B0_DBG_MON_A26 (MTK_PIN_NO(72) | 7) 550 + 551 + #define PINMUX_GPIO73__FUNC_B_GPIO73 (MTK_PIN_NO(73) | 0) 552 + #define PINMUX_GPIO73__FUNC_B0_SPIM0_MIO2 (MTK_PIN_NO(73) | 1) 553 + #define PINMUX_GPIO73__FUNC_O_UTXD3 (MTK_PIN_NO(73) | 2) 554 + #define PINMUX_GPIO73__FUNC_I0_DMIC4_DAT (MTK_PIN_NO(73) | 3) 555 + #define PINMUX_GPIO73__FUNC_O_CLKM0 (MTK_PIN_NO(73) | 4) 556 + #define PINMUX_GPIO73__FUNC_O_CMVREF4 (MTK_PIN_NO(73) | 5) 557 + #define PINMUX_GPIO73__FUNC_O_GDU_SUM_TROOP1_1 (MTK_PIN_NO(73) | 6) 558 + #define PINMUX_GPIO73__FUNC_B0_DBG_MON_A27 (MTK_PIN_NO(73) | 7) 559 + 560 + #define PINMUX_GPIO74__FUNC_B_GPIO74 (MTK_PIN_NO(74) | 0) 561 + #define PINMUX_GPIO74__FUNC_B0_SPIM0_MIO3 (MTK_PIN_NO(74) | 1) 562 + #define PINMUX_GPIO74__FUNC_I1_URXD3 (MTK_PIN_NO(74) | 2) 563 + #define PINMUX_GPIO74__FUNC_I0_DMIC4_DAT_R (MTK_PIN_NO(74) | 3) 564 + #define PINMUX_GPIO74__FUNC_O_CLKM1 (MTK_PIN_NO(74) | 4) 565 + #define PINMUX_GPIO74__FUNC_O_CMVREF5 (MTK_PIN_NO(74) | 5) 566 + #define PINMUX_GPIO74__FUNC_O_GDU_SUM_TROOP1_2 (MTK_PIN_NO(74) | 6) 567 + #define PINMUX_GPIO74__FUNC_B0_DBG_MON_A28 (MTK_PIN_NO(74) | 7) 568 + 569 + #define PINMUX_GPIO75__FUNC_B_GPIO75 (MTK_PIN_NO(75) | 0) 570 + #define PINMUX_GPIO75__FUNC_O_SPIM1_CSB (MTK_PIN_NO(75) | 1) 571 + #define PINMUX_GPIO75__FUNC_O_SCP_SPI1_A_CS (MTK_PIN_NO(75) | 2) 572 + #define PINMUX_GPIO75__FUNC_B0_TDMIN_MCK (MTK_PIN_NO(75) | 3) 573 + #define PINMUX_GPIO75__FUNC_B1_SCP_SCL0 (MTK_PIN_NO(75) | 4) 574 + #define PINMUX_GPIO75__FUNC_O_CMVREF6 (MTK_PIN_NO(75) | 5) 575 + #define PINMUX_GPIO75__FUNC_O_GDU_SUM_TROOP2_0 (MTK_PIN_NO(75) | 6) 576 + #define PINMUX_GPIO75__FUNC_B0_DBG_MON_A29 (MTK_PIN_NO(75) | 7) 577 + 578 + #define PINMUX_GPIO76__FUNC_B_GPIO76 (MTK_PIN_NO(76) | 0) 579 + #define PINMUX_GPIO76__FUNC_O_SPIM1_CLK (MTK_PIN_NO(76) | 1) 580 + #define PINMUX_GPIO76__FUNC_O_SCP_SPI1_A_CK (MTK_PIN_NO(76) | 2) 581 + #define PINMUX_GPIO76__FUNC_B0_TDMIN_BCK (MTK_PIN_NO(76) | 3) 582 + #define PINMUX_GPIO76__FUNC_B1_SCP_SDA0 (MTK_PIN_NO(76) | 4) 583 + #define PINMUX_GPIO76__FUNC_O_CMVREF7 (MTK_PIN_NO(76) | 5) 584 + #define PINMUX_GPIO76__FUNC_O_GDU_SUM_TROOP2_1 (MTK_PIN_NO(76) | 6) 585 + #define PINMUX_GPIO76__FUNC_B0_DBG_MON_A30 (MTK_PIN_NO(76) | 7) 586 + 587 + #define PINMUX_GPIO77__FUNC_B_GPIO77 (MTK_PIN_NO(77) | 0) 588 + #define PINMUX_GPIO77__FUNC_B0_SPIM1_MOSI (MTK_PIN_NO(77) | 1) 589 + #define PINMUX_GPIO77__FUNC_O_SCP_SPI1_A_MO (MTK_PIN_NO(77) | 2) 590 + #define PINMUX_GPIO77__FUNC_B0_TDMIN_LRCK (MTK_PIN_NO(77) | 3) 591 + #define PINMUX_GPIO77__FUNC_B1_SCP_SCL1 (MTK_PIN_NO(77) | 4) 592 + #define PINMUX_GPIO77__FUNC_O_GDU_SUM_TROOP2_2 (MTK_PIN_NO(77) | 6) 593 + #define PINMUX_GPIO77__FUNC_B0_DBG_MON_A31 (MTK_PIN_NO(77) | 7) 594 + 595 + #define PINMUX_GPIO78__FUNC_B_GPIO78 (MTK_PIN_NO(78) | 0) 596 + #define PINMUX_GPIO78__FUNC_B0_SPIM1_MISO (MTK_PIN_NO(78) | 1) 597 + #define PINMUX_GPIO78__FUNC_I0_SCP_SPI1_A_MI (MTK_PIN_NO(78) | 2) 598 + #define PINMUX_GPIO78__FUNC_I0_TDMIN_DI (MTK_PIN_NO(78) | 3) 599 + #define PINMUX_GPIO78__FUNC_B1_SCP_SDA1 (MTK_PIN_NO(78) | 4) 600 + #define PINMUX_GPIO78__FUNC_B0_DBG_MON_A32 (MTK_PIN_NO(78) | 7) 601 + 602 + #define PINMUX_GPIO79__FUNC_B_GPIO79 (MTK_PIN_NO(79) | 0) 603 + #define PINMUX_GPIO79__FUNC_O_SPIM2_CSB (MTK_PIN_NO(79) | 1) 604 + #define PINMUX_GPIO79__FUNC_O_SCP_SPI2_CS (MTK_PIN_NO(79) | 2) 605 + #define PINMUX_GPIO79__FUNC_O_I2SO1_MCK (MTK_PIN_NO(79) | 3) 606 + #define PINMUX_GPIO79__FUNC_O_UTXD2 (MTK_PIN_NO(79) | 4) 607 + #define PINMUX_GPIO79__FUNC_O_TP_UTXD2_AO (MTK_PIN_NO(79) | 5) 608 + #define PINMUX_GPIO79__FUNC_B0_PCM_SYNC (MTK_PIN_NO(79) | 6) 609 + #define PINMUX_GPIO79__FUNC_B0_DBG_MON_B0 (MTK_PIN_NO(79) | 7) 610 + 611 + #define PINMUX_GPIO80__FUNC_B_GPIO80 (MTK_PIN_NO(80) | 0) 612 + #define PINMUX_GPIO80__FUNC_O_SPIM2_CLK (MTK_PIN_NO(80) | 1) 613 + #define PINMUX_GPIO80__FUNC_O_SCP_SPI2_CK (MTK_PIN_NO(80) | 2) 614 + #define PINMUX_GPIO80__FUNC_O_I2SO1_BCK (MTK_PIN_NO(80) | 3) 615 + #define PINMUX_GPIO80__FUNC_I1_URXD2 (MTK_PIN_NO(80) | 4) 616 + #define PINMUX_GPIO80__FUNC_I1_TP_URXD2_AO (MTK_PIN_NO(80) | 5) 617 + #define PINMUX_GPIO80__FUNC_B0_PCM_CLK (MTK_PIN_NO(80) | 6) 618 + #define PINMUX_GPIO80__FUNC_B0_DBG_MON_B1 (MTK_PIN_NO(80) | 7) 619 + 620 + #define PINMUX_GPIO81__FUNC_B_GPIO81 (MTK_PIN_NO(81) | 0) 621 + #define PINMUX_GPIO81__FUNC_B0_SPIM2_MOSI (MTK_PIN_NO(81) | 1) 622 + #define PINMUX_GPIO81__FUNC_O_SCP_SPI2_MO (MTK_PIN_NO(81) | 2) 623 + #define PINMUX_GPIO81__FUNC_O_I2SO1_WS (MTK_PIN_NO(81) | 3) 624 + #define PINMUX_GPIO81__FUNC_O_URTS2 (MTK_PIN_NO(81) | 4) 625 + #define PINMUX_GPIO81__FUNC_O_TP_URTS2_AO (MTK_PIN_NO(81) | 5) 626 + #define PINMUX_GPIO81__FUNC_O_PCM_DO (MTK_PIN_NO(81) | 6) 627 + #define PINMUX_GPIO81__FUNC_B0_DBG_MON_B2 (MTK_PIN_NO(81) | 7) 628 + 629 + #define PINMUX_GPIO82__FUNC_B_GPIO82 (MTK_PIN_NO(82) | 0) 630 + #define PINMUX_GPIO82__FUNC_B0_SPIM2_MISO (MTK_PIN_NO(82) | 1) 631 + #define PINMUX_GPIO82__FUNC_I0_SCP_SPI2_MI (MTK_PIN_NO(82) | 2) 632 + #define PINMUX_GPIO82__FUNC_O_I2SO1_D0 (MTK_PIN_NO(82) | 3) 633 + #define PINMUX_GPIO82__FUNC_I1_UCTS2 (MTK_PIN_NO(82) | 4) 634 + #define PINMUX_GPIO82__FUNC_I1_TP_UCTS2_AO (MTK_PIN_NO(82) | 5) 635 + #define PINMUX_GPIO82__FUNC_I0_PCM_DI (MTK_PIN_NO(82) | 6) 636 + #define PINMUX_GPIO82__FUNC_B0_DBG_MON_B3 (MTK_PIN_NO(82) | 7) 637 + 638 + #define PINMUX_GPIO83__FUNC_B_GPIO83 (MTK_PIN_NO(83) | 0) 639 + #define PINMUX_GPIO83__FUNC_I1_IDDIG (MTK_PIN_NO(83) | 1) 640 + 641 + #define PINMUX_GPIO84__FUNC_B_GPIO84 (MTK_PIN_NO(84) | 0) 642 + #define PINMUX_GPIO84__FUNC_O_USB_DRVVBUS (MTK_PIN_NO(84) | 1) 643 + 644 + #define PINMUX_GPIO85__FUNC_B_GPIO85 (MTK_PIN_NO(85) | 0) 645 + #define PINMUX_GPIO85__FUNC_I0_VBUSVALID (MTK_PIN_NO(85) | 1) 646 + 647 + #define PINMUX_GPIO86__FUNC_B_GPIO86 (MTK_PIN_NO(86) | 0) 648 + #define PINMUX_GPIO86__FUNC_I1_IDDIG_1P (MTK_PIN_NO(86) | 1) 649 + #define PINMUX_GPIO86__FUNC_O_UTXD1 (MTK_PIN_NO(86) | 2) 650 + #define PINMUX_GPIO86__FUNC_O_URTS2 (MTK_PIN_NO(86) | 3) 651 + #define PINMUX_GPIO86__FUNC_O_PWM_2 (MTK_PIN_NO(86) | 4) 652 + #define PINMUX_GPIO86__FUNC_B0_TP_GPIO4_AO (MTK_PIN_NO(86) | 5) 653 + #define PINMUX_GPIO86__FUNC_O_AUXIF_ST0 (MTK_PIN_NO(86) | 6) 654 + #define PINMUX_GPIO86__FUNC_B0_DBG_MON_B4 (MTK_PIN_NO(86) | 7) 655 + 656 + #define PINMUX_GPIO87__FUNC_B_GPIO87 (MTK_PIN_NO(87) | 0) 657 + #define PINMUX_GPIO87__FUNC_O_USB_DRVVBUS_1P (MTK_PIN_NO(87) | 1) 658 + #define PINMUX_GPIO87__FUNC_I1_URXD1 (MTK_PIN_NO(87) | 2) 659 + #define PINMUX_GPIO87__FUNC_I1_UCTS2 (MTK_PIN_NO(87) | 3) 660 + #define PINMUX_GPIO87__FUNC_O_PWM_3 (MTK_PIN_NO(87) | 4) 661 + #define PINMUX_GPIO87__FUNC_B0_TP_GPIO5_AO (MTK_PIN_NO(87) | 5) 662 + #define PINMUX_GPIO87__FUNC_O_AUXIF_CLK0 (MTK_PIN_NO(87) | 6) 663 + #define PINMUX_GPIO87__FUNC_B0_DBG_MON_B5 (MTK_PIN_NO(87) | 7) 664 + 665 + #define PINMUX_GPIO88__FUNC_B_GPIO88 (MTK_PIN_NO(88) | 0) 666 + #define PINMUX_GPIO88__FUNC_I0_VBUSVALID_1P (MTK_PIN_NO(88) | 1) 667 + #define PINMUX_GPIO88__FUNC_O_UTXD2 (MTK_PIN_NO(88) | 2) 668 + #define PINMUX_GPIO88__FUNC_O_URTS1 (MTK_PIN_NO(88) | 3) 669 + #define PINMUX_GPIO88__FUNC_O_CLKM2 (MTK_PIN_NO(88) | 4) 670 + #define PINMUX_GPIO88__FUNC_B0_TP_GPIO6_AO (MTK_PIN_NO(88) | 5) 671 + #define PINMUX_GPIO88__FUNC_O_AUXIF_ST1 (MTK_PIN_NO(88) | 6) 672 + #define PINMUX_GPIO88__FUNC_B0_DBG_MON_B6 (MTK_PIN_NO(88) | 7) 673 + 674 + #define PINMUX_GPIO89__FUNC_B_GPIO89 (MTK_PIN_NO(89) | 0) 675 + #define PINMUX_GPIO89__FUNC_I1_IDDIG_2P (MTK_PIN_NO(89) | 1) 676 + #define PINMUX_GPIO89__FUNC_I1_URXD2 (MTK_PIN_NO(89) | 2) 677 + #define PINMUX_GPIO89__FUNC_I1_UCTS1 (MTK_PIN_NO(89) | 3) 678 + #define PINMUX_GPIO89__FUNC_O_CLKM3 (MTK_PIN_NO(89) | 4) 679 + #define PINMUX_GPIO89__FUNC_B0_TP_GPIO7_AO (MTK_PIN_NO(89) | 5) 680 + #define PINMUX_GPIO89__FUNC_O_AUXIF_CLK1 (MTK_PIN_NO(89) | 6) 681 + #define PINMUX_GPIO89__FUNC_B0_DBG_MON_B7 (MTK_PIN_NO(89) | 7) 682 + 683 + #define PINMUX_GPIO90__FUNC_B_GPIO90 (MTK_PIN_NO(90) | 0) 684 + #define PINMUX_GPIO90__FUNC_O_USB_DRVVBUS_2P (MTK_PIN_NO(90) | 1) 685 + #define PINMUX_GPIO90__FUNC_O_UTXD3 (MTK_PIN_NO(90) | 2) 686 + #define PINMUX_GPIO90__FUNC_O_ADSP_UTXD0 (MTK_PIN_NO(90) | 3) 687 + #define PINMUX_GPIO90__FUNC_O_SSPM_UTXD_AO (MTK_PIN_NO(90) | 4) 688 + #define PINMUX_GPIO90__FUNC_O_MD32_0_TXD (MTK_PIN_NO(90) | 5) 689 + #define PINMUX_GPIO90__FUNC_O_MD32_1_TXD (MTK_PIN_NO(90) | 6) 690 + #define PINMUX_GPIO90__FUNC_B0_DBG_MON_B8 (MTK_PIN_NO(90) | 7) 691 + 692 + #define PINMUX_GPIO91__FUNC_B_GPIO91 (MTK_PIN_NO(91) | 0) 693 + #define PINMUX_GPIO91__FUNC_I0_VBUSVALID_2P (MTK_PIN_NO(91) | 1) 694 + #define PINMUX_GPIO91__FUNC_I1_URXD3 (MTK_PIN_NO(91) | 2) 695 + #define PINMUX_GPIO91__FUNC_I1_ADSP_URXD0 (MTK_PIN_NO(91) | 3) 696 + #define PINMUX_GPIO91__FUNC_I1_SSPM_URXD_AO (MTK_PIN_NO(91) | 4) 697 + #define PINMUX_GPIO91__FUNC_I1_MD32_0_RXD (MTK_PIN_NO(91) | 5) 698 + #define PINMUX_GPIO91__FUNC_I1_MD32_1_RXD (MTK_PIN_NO(91) | 6) 699 + #define PINMUX_GPIO91__FUNC_B0_DBG_MON_B9 (MTK_PIN_NO(91) | 7) 700 + 701 + #define PINMUX_GPIO92__FUNC_B_GPIO92 (MTK_PIN_NO(92) | 0) 702 + #define PINMUX_GPIO92__FUNC_O_PWRAP_SPI0_CSN (MTK_PIN_NO(92) | 1) 703 + 704 + #define PINMUX_GPIO93__FUNC_B_GPIO93 (MTK_PIN_NO(93) | 0) 705 + #define PINMUX_GPIO93__FUNC_O_PWRAP_SPI0_CK (MTK_PIN_NO(93) | 1) 706 + 707 + #define PINMUX_GPIO94__FUNC_B_GPIO94 (MTK_PIN_NO(94) | 0) 708 + #define PINMUX_GPIO94__FUNC_B0_PWRAP_SPI0_MO (MTK_PIN_NO(94) | 1) 709 + #define PINMUX_GPIO94__FUNC_B0_PWRAP_SPI0_MI (MTK_PIN_NO(94) | 2) 710 + 711 + #define PINMUX_GPIO95__FUNC_B_GPIO95 (MTK_PIN_NO(95) | 0) 712 + #define PINMUX_GPIO95__FUNC_B0_PWRAP_SPI0_MI (MTK_PIN_NO(95) | 1) 713 + #define PINMUX_GPIO95__FUNC_B0_PWRAP_SPI0_MO (MTK_PIN_NO(95) | 2) 714 + 715 + #define PINMUX_GPIO96__FUNC_B_GPIO96 (MTK_PIN_NO(96) | 0) 716 + #define PINMUX_GPIO96__FUNC_O_SRCLKENA0 (MTK_PIN_NO(96) | 1) 717 + 718 + #define PINMUX_GPIO97__FUNC_B_GPIO97 (MTK_PIN_NO(97) | 0) 719 + #define PINMUX_GPIO97__FUNC_O_SRCLKENA1 (MTK_PIN_NO(97) | 1) 720 + 721 + #define PINMUX_GPIO98__FUNC_B_GPIO98 (MTK_PIN_NO(98) | 0) 722 + #define PINMUX_GPIO98__FUNC_O_SCP_VREQ_VAO (MTK_PIN_NO(98) | 1) 723 + #define PINMUX_GPIO98__FUNC_I0_DVFSRC_EXT_REQ (MTK_PIN_NO(98) | 2) 724 + 725 + #define PINMUX_GPIO99__FUNC_B_GPIO99 (MTK_PIN_NO(99) | 0) 726 + #define PINMUX_GPIO99__FUNC_I0_RTC32K_CK (MTK_PIN_NO(99) | 1) 727 + 728 + #define PINMUX_GPIO100__FUNC_B_GPIO100 (MTK_PIN_NO(100) | 0) 729 + #define PINMUX_GPIO100__FUNC_O_WATCHDOG (MTK_PIN_NO(100) | 1) 730 + 731 + #define PINMUX_GPIO101__FUNC_B_GPIO101 (MTK_PIN_NO(101) | 0) 732 + #define PINMUX_GPIO101__FUNC_O_AUD_CLK_MOSI (MTK_PIN_NO(101) | 1) 733 + #define PINMUX_GPIO101__FUNC_O_I2SO1_MCK (MTK_PIN_NO(101) | 2) 734 + #define PINMUX_GPIO101__FUNC_B0_I2SIN_BCK (MTK_PIN_NO(101) | 3) 735 + 736 + #define PINMUX_GPIO102__FUNC_B_GPIO102 (MTK_PIN_NO(102) | 0) 737 + #define PINMUX_GPIO102__FUNC_O_AUD_SYNC_MOSI (MTK_PIN_NO(102) | 1) 738 + #define PINMUX_GPIO102__FUNC_O_I2SO1_BCK (MTK_PIN_NO(102) | 2) 739 + #define PINMUX_GPIO102__FUNC_B0_I2SIN_WS (MTK_PIN_NO(102) | 3) 740 + 741 + #define PINMUX_GPIO103__FUNC_B_GPIO103 (MTK_PIN_NO(103) | 0) 742 + #define PINMUX_GPIO103__FUNC_O_AUD_DAT_MOSI0 (MTK_PIN_NO(103) | 1) 743 + #define PINMUX_GPIO103__FUNC_O_I2SO1_WS (MTK_PIN_NO(103) | 2) 744 + #define PINMUX_GPIO103__FUNC_I0_I2SIN_D0 (MTK_PIN_NO(103) | 3) 745 + 746 + #define PINMUX_GPIO104__FUNC_B_GPIO104 (MTK_PIN_NO(104) | 0) 747 + #define PINMUX_GPIO104__FUNC_O_AUD_DAT_MOSI1 (MTK_PIN_NO(104) | 1) 748 + #define PINMUX_GPIO104__FUNC_O_I2SO1_D0 (MTK_PIN_NO(104) | 2) 749 + #define PINMUX_GPIO104__FUNC_I0_I2SIN_D1 (MTK_PIN_NO(104) | 3) 750 + 751 + #define PINMUX_GPIO105__FUNC_B_GPIO105 (MTK_PIN_NO(105) | 0) 752 + #define PINMUX_GPIO105__FUNC_I0_AUD_DAT_MISO0 (MTK_PIN_NO(105) | 1) 753 + #define PINMUX_GPIO105__FUNC_I0_VOW_DAT_MISO (MTK_PIN_NO(105) | 2) 754 + #define PINMUX_GPIO105__FUNC_I0_I2SIN_D2 (MTK_PIN_NO(105) | 3) 755 + 756 + #define PINMUX_GPIO106__FUNC_B_GPIO106 (MTK_PIN_NO(106) | 0) 757 + #define PINMUX_GPIO106__FUNC_I0_AUD_DAT_MISO1 (MTK_PIN_NO(106) | 1) 758 + #define PINMUX_GPIO106__FUNC_I0_VOW_CLK_MISO (MTK_PIN_NO(106) | 2) 759 + #define PINMUX_GPIO106__FUNC_I0_I2SIN_D3 (MTK_PIN_NO(106) | 3) 760 + 761 + #define PINMUX_GPIO107__FUNC_B_GPIO107 (MTK_PIN_NO(107) | 0) 762 + #define PINMUX_GPIO107__FUNC_B0_I2SIN_MCK (MTK_PIN_NO(107) | 1) 763 + #define PINMUX_GPIO107__FUNC_I0_SPLIN_MCK (MTK_PIN_NO(107) | 2) 764 + #define PINMUX_GPIO107__FUNC_I0_SPDIF_IN0 (MTK_PIN_NO(107) | 3) 765 + #define PINMUX_GPIO107__FUNC_O_CMVREF4 (MTK_PIN_NO(107) | 4) 766 + #define PINMUX_GPIO107__FUNC_O_AUXIF_ST0 (MTK_PIN_NO(107) | 5) 767 + #define PINMUX_GPIO107__FUNC_O_PGD_LV_LSC_PWR0 (MTK_PIN_NO(107) | 6) 768 + 769 + #define PINMUX_GPIO108__FUNC_B_GPIO108 (MTK_PIN_NO(108) | 0) 770 + #define PINMUX_GPIO108__FUNC_B0_I2SIN_BCK (MTK_PIN_NO(108) | 1) 771 + #define PINMUX_GPIO108__FUNC_I0_SPLIN_LRCK (MTK_PIN_NO(108) | 2) 772 + #define PINMUX_GPIO108__FUNC_O_DMIC4_CLK (MTK_PIN_NO(108) | 3) 773 + #define PINMUX_GPIO108__FUNC_O_CMVREF5 (MTK_PIN_NO(108) | 4) 774 + #define PINMUX_GPIO108__FUNC_O_AUXIF_CLK0 (MTK_PIN_NO(108) | 5) 775 + #define PINMUX_GPIO108__FUNC_O_PGD_LV_LSC_PWR1 (MTK_PIN_NO(108) | 6) 776 + #define PINMUX_GPIO108__FUNC_B0_DBG_MON_B10 (MTK_PIN_NO(108) | 7) 777 + 778 + #define PINMUX_GPIO109__FUNC_B_GPIO109 (MTK_PIN_NO(109) | 0) 779 + #define PINMUX_GPIO109__FUNC_B0_I2SIN_WS (MTK_PIN_NO(109) | 1) 780 + #define PINMUX_GPIO109__FUNC_I0_SPLIN_BCK (MTK_PIN_NO(109) | 2) 781 + #define PINMUX_GPIO109__FUNC_I0_DMIC4_DAT (MTK_PIN_NO(109) | 3) 782 + #define PINMUX_GPIO109__FUNC_O_CMVREF6 (MTK_PIN_NO(109) | 4) 783 + #define PINMUX_GPIO109__FUNC_O_AUXIF_ST1 (MTK_PIN_NO(109) | 5) 784 + #define PINMUX_GPIO109__FUNC_O_PGD_LV_LSC_PWR2 (MTK_PIN_NO(109) | 6) 785 + #define PINMUX_GPIO109__FUNC_B0_DBG_MON_B11 (MTK_PIN_NO(109) | 7) 786 + 787 + #define PINMUX_GPIO110__FUNC_B_GPIO110 (MTK_PIN_NO(110) | 0) 788 + #define PINMUX_GPIO110__FUNC_I0_I2SIN_D0 (MTK_PIN_NO(110) | 1) 789 + #define PINMUX_GPIO110__FUNC_I0_SPLIN_D0 (MTK_PIN_NO(110) | 2) 790 + #define PINMUX_GPIO110__FUNC_I0_DMIC4_DAT_R (MTK_PIN_NO(110) | 3) 791 + #define PINMUX_GPIO110__FUNC_O_CMVREF7 (MTK_PIN_NO(110) | 4) 792 + #define PINMUX_GPIO110__FUNC_O_AUXIF_CLK1 (MTK_PIN_NO(110) | 5) 793 + #define PINMUX_GPIO110__FUNC_O_PGD_LV_LSC_PWR3 (MTK_PIN_NO(110) | 6) 794 + #define PINMUX_GPIO110__FUNC_B0_DBG_MON_B12 (MTK_PIN_NO(110) | 7) 795 + 796 + #define PINMUX_GPIO111__FUNC_B_GPIO111 (MTK_PIN_NO(111) | 0) 797 + #define PINMUX_GPIO111__FUNC_I0_I2SIN_D1 (MTK_PIN_NO(111) | 1) 798 + #define PINMUX_GPIO111__FUNC_I0_SPLIN_D1 (MTK_PIN_NO(111) | 2) 799 + #define PINMUX_GPIO111__FUNC_O_DMIC3_CLK (MTK_PIN_NO(111) | 3) 800 + #define PINMUX_GPIO111__FUNC_O_SPDIF_OUT (MTK_PIN_NO(111) | 4) 801 + #define PINMUX_GPIO111__FUNC_O_PGD_LV_LSC_PWR4 (MTK_PIN_NO(111) | 6) 802 + #define PINMUX_GPIO111__FUNC_B0_DBG_MON_B13 (MTK_PIN_NO(111) | 7) 803 + 804 + #define PINMUX_GPIO112__FUNC_B_GPIO112 (MTK_PIN_NO(112) | 0) 805 + #define PINMUX_GPIO112__FUNC_I0_I2SIN_D2 (MTK_PIN_NO(112) | 1) 806 + #define PINMUX_GPIO112__FUNC_I0_SPLIN_D2 (MTK_PIN_NO(112) | 2) 807 + #define PINMUX_GPIO112__FUNC_I0_DMIC3_DAT (MTK_PIN_NO(112) | 3) 808 + #define PINMUX_GPIO112__FUNC_B0_TDMIN_MCK (MTK_PIN_NO(112) | 4) 809 + #define PINMUX_GPIO112__FUNC_O_I2SO1_WS (MTK_PIN_NO(112) | 5) 810 + #define PINMUX_GPIO112__FUNC_O_PGD_LV_LSC_PWR5 (MTK_PIN_NO(112) | 6) 811 + #define PINMUX_GPIO112__FUNC_B0_DBG_MON_B14 (MTK_PIN_NO(112) | 7) 812 + 813 + #define PINMUX_GPIO113__FUNC_B_GPIO113 (MTK_PIN_NO(113) | 0) 814 + #define PINMUX_GPIO113__FUNC_I0_I2SIN_D3 (MTK_PIN_NO(113) | 1) 815 + #define PINMUX_GPIO113__FUNC_I0_SPLIN_D3 (MTK_PIN_NO(113) | 2) 816 + #define PINMUX_GPIO113__FUNC_I0_DMIC3_DAT_R (MTK_PIN_NO(113) | 3) 817 + #define PINMUX_GPIO113__FUNC_B0_TDMIN_BCK (MTK_PIN_NO(113) | 4) 818 + #define PINMUX_GPIO113__FUNC_O_I2SO1_D0 (MTK_PIN_NO(113) | 5) 819 + #define PINMUX_GPIO113__FUNC_B0_DBG_MON_B15 (MTK_PIN_NO(113) | 7) 820 + 821 + #define PINMUX_GPIO114__FUNC_B_GPIO114 (MTK_PIN_NO(114) | 0) 822 + #define PINMUX_GPIO114__FUNC_O_I2SO2_MCK (MTK_PIN_NO(114) | 1) 823 + #define PINMUX_GPIO114__FUNC_B0_I2SIN_MCK (MTK_PIN_NO(114) | 2) 824 + #define PINMUX_GPIO114__FUNC_I1_MCUPM_JTAG_TMS (MTK_PIN_NO(114) | 3) 825 + #define PINMUX_GPIO114__FUNC_B1_APU_JTAG_TMS (MTK_PIN_NO(114) | 4) 826 + #define PINMUX_GPIO114__FUNC_I1_SCP_JTAG1_TMS (MTK_PIN_NO(114) | 5) 827 + #define PINMUX_GPIO114__FUNC_I1_SPM_JTAG_TMS (MTK_PIN_NO(114) | 6) 828 + #define PINMUX_GPIO114__FUNC_B0_DBG_MON_B16 (MTK_PIN_NO(114) | 7) 829 + 830 + #define PINMUX_GPIO115__FUNC_B_GPIO115 (MTK_PIN_NO(115) | 0) 831 + #define PINMUX_GPIO115__FUNC_B0_I2SO2_BCK (MTK_PIN_NO(115) | 1) 832 + #define PINMUX_GPIO115__FUNC_B0_I2SIN_BCK (MTK_PIN_NO(115) | 2) 833 + #define PINMUX_GPIO115__FUNC_I1_MCUPM_JTAG_TCK (MTK_PIN_NO(115) | 3) 834 + #define PINMUX_GPIO115__FUNC_I0_APU_JTAG_TCK (MTK_PIN_NO(115) | 4) 835 + #define PINMUX_GPIO115__FUNC_I1_SCP_JTAG1_TCK (MTK_PIN_NO(115) | 5) 836 + #define PINMUX_GPIO115__FUNC_I1_SPM_JTAG_TCK (MTK_PIN_NO(115) | 6) 837 + #define PINMUX_GPIO115__FUNC_B0_DBG_MON_B17 (MTK_PIN_NO(115) | 7) 838 + 839 + #define PINMUX_GPIO116__FUNC_B_GPIO116 (MTK_PIN_NO(116) | 0) 840 + #define PINMUX_GPIO116__FUNC_B0_I2SO2_WS (MTK_PIN_NO(116) | 1) 841 + #define PINMUX_GPIO116__FUNC_B0_I2SIN_WS (MTK_PIN_NO(116) | 2) 842 + #define PINMUX_GPIO116__FUNC_I1_MCUPM_JTAG_TDI (MTK_PIN_NO(116) | 3) 843 + #define PINMUX_GPIO116__FUNC_I1_APU_JTAG_TDI (MTK_PIN_NO(116) | 4) 844 + #define PINMUX_GPIO116__FUNC_I1_SCP_JTAG1_TDI (MTK_PIN_NO(116) | 5) 845 + #define PINMUX_GPIO116__FUNC_I1_SPM_JTAG_TDI (MTK_PIN_NO(116) | 6) 846 + #define PINMUX_GPIO116__FUNC_B0_DBG_MON_B18 (MTK_PIN_NO(116) | 7) 847 + 848 + #define PINMUX_GPIO117__FUNC_B_GPIO117 (MTK_PIN_NO(117) | 0) 849 + #define PINMUX_GPIO117__FUNC_O_I2SO2_D0 (MTK_PIN_NO(117) | 1) 850 + #define PINMUX_GPIO117__FUNC_I0_I2SIN_D0 (MTK_PIN_NO(117) | 2) 851 + #define PINMUX_GPIO117__FUNC_O_MCUPM_JTAG_TDO (MTK_PIN_NO(117) | 3) 852 + #define PINMUX_GPIO117__FUNC_O_APU_JTAG_TDO (MTK_PIN_NO(117) | 4) 853 + #define PINMUX_GPIO117__FUNC_O_SCP_JTAG1_TDO (MTK_PIN_NO(117) | 5) 854 + #define PINMUX_GPIO117__FUNC_O_SPM_JTAG_TDO (MTK_PIN_NO(117) | 6) 855 + #define PINMUX_GPIO117__FUNC_B0_DBG_MON_B19 (MTK_PIN_NO(117) | 7) 856 + 857 + #define PINMUX_GPIO118__FUNC_B_GPIO118 (MTK_PIN_NO(118) | 0) 858 + #define PINMUX_GPIO118__FUNC_O_I2SO2_D1 (MTK_PIN_NO(118) | 1) 859 + #define PINMUX_GPIO118__FUNC_I0_I2SIN_D1 (MTK_PIN_NO(118) | 2) 860 + #define PINMUX_GPIO118__FUNC_I0_MCUPM_JTAG_TRSTN (MTK_PIN_NO(118) | 3) 861 + #define PINMUX_GPIO118__FUNC_I0_APU_JTAG_TRST (MTK_PIN_NO(118) | 4) 862 + #define PINMUX_GPIO118__FUNC_I0_SCP_JTAG1_TRSTN (MTK_PIN_NO(118) | 5) 863 + #define PINMUX_GPIO118__FUNC_I0_SPM_JTAG_TRSTN (MTK_PIN_NO(118) | 6) 864 + #define PINMUX_GPIO118__FUNC_B0_DBG_MON_B20 (MTK_PIN_NO(118) | 7) 865 + 866 + #define PINMUX_GPIO119__FUNC_B_GPIO119 (MTK_PIN_NO(119) | 0) 867 + #define PINMUX_GPIO119__FUNC_O_I2SO2_D2 (MTK_PIN_NO(119) | 1) 868 + #define PINMUX_GPIO119__FUNC_I0_I2SIN_D2 (MTK_PIN_NO(119) | 2) 869 + #define PINMUX_GPIO119__FUNC_O_UTXD3 (MTK_PIN_NO(119) | 3) 870 + #define PINMUX_GPIO119__FUNC_B0_TDMIN_LRCK (MTK_PIN_NO(119) | 4) 871 + #define PINMUX_GPIO119__FUNC_O_I2SO1_MCK (MTK_PIN_NO(119) | 5) 872 + #define PINMUX_GPIO119__FUNC_O_SSPM_UTXD_AO (MTK_PIN_NO(119) | 6) 873 + #define PINMUX_GPIO119__FUNC_B0_DBG_MON_B21 (MTK_PIN_NO(119) | 7) 874 + 875 + #define PINMUX_GPIO120__FUNC_B_GPIO120 (MTK_PIN_NO(120) | 0) 876 + #define PINMUX_GPIO120__FUNC_O_I2SO2_D3 (MTK_PIN_NO(120) | 1) 877 + #define PINMUX_GPIO120__FUNC_I0_I2SIN_D3 (MTK_PIN_NO(120) | 2) 878 + #define PINMUX_GPIO120__FUNC_I1_URXD3 (MTK_PIN_NO(120) | 3) 879 + #define PINMUX_GPIO120__FUNC_I0_TDMIN_DI (MTK_PIN_NO(120) | 4) 880 + #define PINMUX_GPIO120__FUNC_O_I2SO1_BCK (MTK_PIN_NO(120) | 5) 881 + #define PINMUX_GPIO120__FUNC_I1_SSPM_URXD_AO (MTK_PIN_NO(120) | 6) 882 + #define PINMUX_GPIO120__FUNC_B0_DBG_MON_B22 (MTK_PIN_NO(120) | 7) 883 + 884 + #define PINMUX_GPIO121__FUNC_B_GPIO121 (MTK_PIN_NO(121) | 0) 885 + #define PINMUX_GPIO121__FUNC_B0_PCM_CLK (MTK_PIN_NO(121) | 1) 886 + #define PINMUX_GPIO121__FUNC_O_SPIM4_CSB (MTK_PIN_NO(121) | 2) 887 + #define PINMUX_GPIO121__FUNC_O_SCP_SPI1_B_CS (MTK_PIN_NO(121) | 3) 888 + #define PINMUX_GPIO121__FUNC_O_TP_UTXD2_AO (MTK_PIN_NO(121) | 4) 889 + #define PINMUX_GPIO121__FUNC_O_AUXIF_ST0 (MTK_PIN_NO(121) | 5) 890 + #define PINMUX_GPIO121__FUNC_O_PGD_DA_EFUSE_RDY (MTK_PIN_NO(121) | 6) 891 + #define PINMUX_GPIO121__FUNC_B0_DBG_MON_B23 (MTK_PIN_NO(121) | 7) 892 + 893 + #define PINMUX_GPIO122__FUNC_B_GPIO122 (MTK_PIN_NO(122) | 0) 894 + #define PINMUX_GPIO122__FUNC_B0_PCM_SYNC (MTK_PIN_NO(122) | 1) 895 + #define PINMUX_GPIO122__FUNC_O_SPIM4_CLK (MTK_PIN_NO(122) | 2) 896 + #define PINMUX_GPIO122__FUNC_O_SCP_SPI1_B_CK (MTK_PIN_NO(122) | 3) 897 + #define PINMUX_GPIO122__FUNC_I1_TP_URXD2_AO (MTK_PIN_NO(122) | 4) 898 + #define PINMUX_GPIO122__FUNC_O_AUXIF_CLK0 (MTK_PIN_NO(122) | 5) 899 + #define PINMUX_GPIO122__FUNC_O_PGD_DA_EFUSE_RDY_PRE (MTK_PIN_NO(122) | 6) 900 + #define PINMUX_GPIO122__FUNC_B0_DBG_MON_B24 (MTK_PIN_NO(122) | 7) 901 + 902 + #define PINMUX_GPIO123__FUNC_B_GPIO123 (MTK_PIN_NO(123) | 0) 903 + #define PINMUX_GPIO123__FUNC_O_PCM_DO (MTK_PIN_NO(123) | 1) 904 + #define PINMUX_GPIO123__FUNC_B0_SPIM4_MOSI (MTK_PIN_NO(123) | 2) 905 + #define PINMUX_GPIO123__FUNC_O_SCP_SPI1_B_MO (MTK_PIN_NO(123) | 3) 906 + #define PINMUX_GPIO123__FUNC_O_TP_URTS2_AO (MTK_PIN_NO(123) | 4) 907 + #define PINMUX_GPIO123__FUNC_O_AUXIF_ST1 (MTK_PIN_NO(123) | 5) 908 + #define PINMUX_GPIO123__FUNC_O_PGD_DA_PWRGD_RESET (MTK_PIN_NO(123) | 6) 909 + #define PINMUX_GPIO123__FUNC_B0_DBG_MON_B25 (MTK_PIN_NO(123) | 7) 910 + 911 + #define PINMUX_GPIO124__FUNC_B_GPIO124 (MTK_PIN_NO(124) | 0) 912 + #define PINMUX_GPIO124__FUNC_I0_PCM_DI (MTK_PIN_NO(124) | 1) 913 + #define PINMUX_GPIO124__FUNC_B0_SPIM4_MISO (MTK_PIN_NO(124) | 2) 914 + #define PINMUX_GPIO124__FUNC_I0_SCP_SPI1_B_MI (MTK_PIN_NO(124) | 3) 915 + #define PINMUX_GPIO124__FUNC_I1_TP_UCTS2_AO (MTK_PIN_NO(124) | 4) 916 + #define PINMUX_GPIO124__FUNC_O_AUXIF_CLK1 (MTK_PIN_NO(124) | 5) 917 + #define PINMUX_GPIO124__FUNC_O_PGD_DA_PWRGD_ENB (MTK_PIN_NO(124) | 6) 918 + #define PINMUX_GPIO124__FUNC_B0_DBG_MON_B26 (MTK_PIN_NO(124) | 7) 919 + 920 + #define PINMUX_GPIO125__FUNC_B_GPIO125 (MTK_PIN_NO(125) | 0) 921 + #define PINMUX_GPIO125__FUNC_O_DMIC1_CLK (MTK_PIN_NO(125) | 1) 922 + #define PINMUX_GPIO125__FUNC_O_SPINOR_CK (MTK_PIN_NO(125) | 2) 923 + #define PINMUX_GPIO125__FUNC_B0_TDMIN_MCK (MTK_PIN_NO(125) | 3) 924 + #define PINMUX_GPIO125__FUNC_O_LVTS_FOUT (MTK_PIN_NO(125) | 6) 925 + #define PINMUX_GPIO125__FUNC_B0_DBG_MON_B27 (MTK_PIN_NO(125) | 7) 926 + 927 + #define PINMUX_GPIO126__FUNC_B_GPIO126 (MTK_PIN_NO(126) | 0) 928 + #define PINMUX_GPIO126__FUNC_I0_DMIC1_DAT (MTK_PIN_NO(126) | 1) 929 + #define PINMUX_GPIO126__FUNC_O_SPINOR_CS (MTK_PIN_NO(126) | 2) 930 + #define PINMUX_GPIO126__FUNC_B0_TDMIN_BCK (MTK_PIN_NO(126) | 3) 931 + #define PINMUX_GPIO126__FUNC_O_LVTS_SDO (MTK_PIN_NO(126) | 6) 932 + #define PINMUX_GPIO126__FUNC_B0_DBG_MON_B28 (MTK_PIN_NO(126) | 7) 933 + 934 + #define PINMUX_GPIO127__FUNC_B_GPIO127 (MTK_PIN_NO(127) | 0) 935 + #define PINMUX_GPIO127__FUNC_I0_DMIC1_DAT_R (MTK_PIN_NO(127) | 1) 936 + #define PINMUX_GPIO127__FUNC_B0_SPINOR_IO0 (MTK_PIN_NO(127) | 2) 937 + #define PINMUX_GPIO127__FUNC_B0_TDMIN_LRCK (MTK_PIN_NO(127) | 3) 938 + #define PINMUX_GPIO127__FUNC_I0_LVTS_26M (MTK_PIN_NO(127) | 6) 939 + #define PINMUX_GPIO127__FUNC_B0_DBG_MON_B29 (MTK_PIN_NO(127) | 7) 940 + 941 + #define PINMUX_GPIO128__FUNC_B_GPIO128 (MTK_PIN_NO(128) | 0) 942 + #define PINMUX_GPIO128__FUNC_O_DMIC2_CLK (MTK_PIN_NO(128) | 1) 943 + #define PINMUX_GPIO128__FUNC_B0_SPINOR_IO1 (MTK_PIN_NO(128) | 2) 944 + #define PINMUX_GPIO128__FUNC_I0_TDMIN_DI (MTK_PIN_NO(128) | 3) 945 + #define PINMUX_GPIO128__FUNC_I0_LVTS_SCF (MTK_PIN_NO(128) | 6) 946 + #define PINMUX_GPIO128__FUNC_B0_DBG_MON_B30 (MTK_PIN_NO(128) | 7) 947 + 948 + #define PINMUX_GPIO129__FUNC_B_GPIO129 (MTK_PIN_NO(129) | 0) 949 + #define PINMUX_GPIO129__FUNC_I0_DMIC2_DAT (MTK_PIN_NO(129) | 1) 950 + #define PINMUX_GPIO129__FUNC_B0_SPINOR_IO2 (MTK_PIN_NO(129) | 2) 951 + #define PINMUX_GPIO129__FUNC_I0_SPDIF_IN1 (MTK_PIN_NO(129) | 3) 952 + #define PINMUX_GPIO129__FUNC_I0_LVTS_SCK (MTK_PIN_NO(129) | 6) 953 + #define PINMUX_GPIO129__FUNC_B0_DBG_MON_B31 (MTK_PIN_NO(129) | 7) 954 + 955 + #define PINMUX_GPIO130__FUNC_B_GPIO130 (MTK_PIN_NO(130) | 0) 956 + #define PINMUX_GPIO130__FUNC_I0_DMIC2_DAT_R (MTK_PIN_NO(130) | 1) 957 + #define PINMUX_GPIO130__FUNC_B0_SPINOR_IO3 (MTK_PIN_NO(130) | 2) 958 + #define PINMUX_GPIO130__FUNC_I0_SPDIF_IN2 (MTK_PIN_NO(130) | 3) 959 + #define PINMUX_GPIO130__FUNC_I0_LVTS_SDI (MTK_PIN_NO(130) | 6) 960 + #define PINMUX_GPIO130__FUNC_B0_DBG_MON_B32 (MTK_PIN_NO(130) | 7) 961 + 962 + #define PINMUX_GPIO131__FUNC_B_GPIO131 (MTK_PIN_NO(131) | 0) 963 + #define PINMUX_GPIO131__FUNC_O_DPI_D0 (MTK_PIN_NO(131) | 1) 964 + #define PINMUX_GPIO131__FUNC_O_GBE_TXD3 (MTK_PIN_NO(131) | 2) 965 + #define PINMUX_GPIO131__FUNC_O_DMIC1_CLK (MTK_PIN_NO(131) | 3) 966 + #define PINMUX_GPIO131__FUNC_O_I2SO2_MCK (MTK_PIN_NO(131) | 4) 967 + #define PINMUX_GPIO131__FUNC_B0_TP_GPIO0_AO (MTK_PIN_NO(131) | 5) 968 + #define PINMUX_GPIO131__FUNC_O_SPIM5_CSB (MTK_PIN_NO(131) | 6) 969 + #define PINMUX_GPIO131__FUNC_O_PGD_LV_HSC_PWR0 (MTK_PIN_NO(131) | 7) 970 + 971 + #define PINMUX_GPIO132__FUNC_B_GPIO132 (MTK_PIN_NO(132) | 0) 972 + #define PINMUX_GPIO132__FUNC_O_DPI_D1 (MTK_PIN_NO(132) | 1) 973 + #define PINMUX_GPIO132__FUNC_O_GBE_TXD2 (MTK_PIN_NO(132) | 2) 974 + #define PINMUX_GPIO132__FUNC_I0_DMIC1_DAT (MTK_PIN_NO(132) | 3) 975 + #define PINMUX_GPIO132__FUNC_B0_I2SO2_BCK (MTK_PIN_NO(132) | 4) 976 + #define PINMUX_GPIO132__FUNC_B0_TP_GPIO1_AO (MTK_PIN_NO(132) | 5) 977 + #define PINMUX_GPIO132__FUNC_O_SPIM5_CLK (MTK_PIN_NO(132) | 6) 978 + #define PINMUX_GPIO132__FUNC_O_PGD_LV_HSC_PWR1 (MTK_PIN_NO(132) | 7) 979 + 980 + #define PINMUX_GPIO133__FUNC_B_GPIO133 (MTK_PIN_NO(133) | 0) 981 + #define PINMUX_GPIO133__FUNC_O_DPI_D2 (MTK_PIN_NO(133) | 1) 982 + #define PINMUX_GPIO133__FUNC_O_GBE_TXD1 (MTK_PIN_NO(133) | 2) 983 + #define PINMUX_GPIO133__FUNC_I0_DMIC1_DAT_R (MTK_PIN_NO(133) | 3) 984 + #define PINMUX_GPIO133__FUNC_B0_I2SO2_WS (MTK_PIN_NO(133) | 4) 985 + #define PINMUX_GPIO133__FUNC_B0_TP_GPIO2_AO (MTK_PIN_NO(133) | 5) 986 + #define PINMUX_GPIO133__FUNC_B0_SPIM5_MOSI (MTK_PIN_NO(133) | 6) 987 + #define PINMUX_GPIO133__FUNC_O_PGD_LV_HSC_PWR2 (MTK_PIN_NO(133) | 7) 988 + 989 + #define PINMUX_GPIO134__FUNC_B_GPIO134 (MTK_PIN_NO(134) | 0) 990 + #define PINMUX_GPIO134__FUNC_O_DPI_D3 (MTK_PIN_NO(134) | 1) 991 + #define PINMUX_GPIO134__FUNC_O_GBE_TXD0 (MTK_PIN_NO(134) | 2) 992 + #define PINMUX_GPIO134__FUNC_O_DMIC2_CLK (MTK_PIN_NO(134) | 3) 993 + #define PINMUX_GPIO134__FUNC_O_I2SO2_D0 (MTK_PIN_NO(134) | 4) 994 + #define PINMUX_GPIO134__FUNC_B0_TP_GPIO3_AO (MTK_PIN_NO(134) | 5) 995 + #define PINMUX_GPIO134__FUNC_B0_SPIM5_MISO (MTK_PIN_NO(134) | 6) 996 + #define PINMUX_GPIO134__FUNC_O_PGD_LV_HSC_PWR3 (MTK_PIN_NO(134) | 7) 997 + 998 + #define PINMUX_GPIO135__FUNC_B_GPIO135 (MTK_PIN_NO(135) | 0) 999 + #define PINMUX_GPIO135__FUNC_O_DPI_D4 (MTK_PIN_NO(135) | 1) 1000 + #define PINMUX_GPIO135__FUNC_I0_GBE_RXD3 (MTK_PIN_NO(135) | 2) 1001 + #define PINMUX_GPIO135__FUNC_I0_DMIC2_DAT (MTK_PIN_NO(135) | 3) 1002 + #define PINMUX_GPIO135__FUNC_O_I2SO2_D1 (MTK_PIN_NO(135) | 4) 1003 + #define PINMUX_GPIO135__FUNC_B0_TP_GPIO4_AO (MTK_PIN_NO(135) | 5) 1004 + #define PINMUX_GPIO135__FUNC_I1_WAKEN (MTK_PIN_NO(135) | 6) 1005 + #define PINMUX_GPIO135__FUNC_O_PGD_LV_HSC_PWR4 (MTK_PIN_NO(135) | 7) 1006 + 1007 + #define PINMUX_GPIO136__FUNC_B_GPIO136 (MTK_PIN_NO(136) | 0) 1008 + #define PINMUX_GPIO136__FUNC_O_DPI_D5 (MTK_PIN_NO(136) | 1) 1009 + #define PINMUX_GPIO136__FUNC_I0_GBE_RXD2 (MTK_PIN_NO(136) | 2) 1010 + #define PINMUX_GPIO136__FUNC_I0_DMIC2_DAT_R (MTK_PIN_NO(136) | 3) 1011 + #define PINMUX_GPIO136__FUNC_O_I2SO2_D2 (MTK_PIN_NO(136) | 4) 1012 + #define PINMUX_GPIO136__FUNC_B0_TP_GPIO5_AO (MTK_PIN_NO(136) | 5) 1013 + #define PINMUX_GPIO136__FUNC_O_PERSTN (MTK_PIN_NO(136) | 6) 1014 + #define PINMUX_GPIO136__FUNC_O_PGD_LV_HSC_PWR5 (MTK_PIN_NO(136) | 7) 1015 + 1016 + #define PINMUX_GPIO137__FUNC_B_GPIO137 (MTK_PIN_NO(137) | 0) 1017 + #define PINMUX_GPIO137__FUNC_O_DPI_D6 (MTK_PIN_NO(137) | 1) 1018 + #define PINMUX_GPIO137__FUNC_I0_GBE_RXD1 (MTK_PIN_NO(137) | 2) 1019 + #define PINMUX_GPIO137__FUNC_O_DMIC3_CLK (MTK_PIN_NO(137) | 3) 1020 + #define PINMUX_GPIO137__FUNC_O_I2SO2_D3 (MTK_PIN_NO(137) | 4) 1021 + #define PINMUX_GPIO137__FUNC_B0_TP_GPIO6_AO (MTK_PIN_NO(137) | 5) 1022 + #define PINMUX_GPIO137__FUNC_B1_CLKREQN (MTK_PIN_NO(137) | 6) 1023 + #define PINMUX_GPIO137__FUNC_O_PWM_0 (MTK_PIN_NO(137) | 7) 1024 + 1025 + #define PINMUX_GPIO138__FUNC_B_GPIO138 (MTK_PIN_NO(138) | 0) 1026 + #define PINMUX_GPIO138__FUNC_O_DPI_D7 (MTK_PIN_NO(138) | 1) 1027 + #define PINMUX_GPIO138__FUNC_I0_GBE_RXD0 (MTK_PIN_NO(138) | 2) 1028 + #define PINMUX_GPIO138__FUNC_I0_DMIC3_DAT (MTK_PIN_NO(138) | 3) 1029 + #define PINMUX_GPIO138__FUNC_O_CLKM2 (MTK_PIN_NO(138) | 4) 1030 + #define PINMUX_GPIO138__FUNC_B0_TP_GPIO7_AO (MTK_PIN_NO(138) | 5) 1031 + #define PINMUX_GPIO138__FUNC_B0_MD32_0_GPIO0 (MTK_PIN_NO(138) | 7) 1032 + 1033 + #define PINMUX_GPIO139__FUNC_B_GPIO139 (MTK_PIN_NO(139) | 0) 1034 + #define PINMUX_GPIO139__FUNC_O_DPI_D8 (MTK_PIN_NO(139) | 1) 1035 + #define PINMUX_GPIO139__FUNC_B0_GBE_TXC (MTK_PIN_NO(139) | 2) 1036 + #define PINMUX_GPIO139__FUNC_I0_DMIC3_DAT_R (MTK_PIN_NO(139) | 3) 1037 + #define PINMUX_GPIO139__FUNC_O_CLKM3 (MTK_PIN_NO(139) | 4) 1038 + #define PINMUX_GPIO139__FUNC_O_TP_UTXD2_AO (MTK_PIN_NO(139) | 5) 1039 + #define PINMUX_GPIO139__FUNC_O_UTXD2 (MTK_PIN_NO(139) | 6) 1040 + #define PINMUX_GPIO139__FUNC_B0_MD32_0_GPIO1 (MTK_PIN_NO(139) | 7) 1041 + 1042 + #define PINMUX_GPIO140__FUNC_B_GPIO140 (MTK_PIN_NO(140) | 0) 1043 + #define PINMUX_GPIO140__FUNC_O_DPI_D9 (MTK_PIN_NO(140) | 1) 1044 + #define PINMUX_GPIO140__FUNC_I0_GBE_RXC (MTK_PIN_NO(140) | 2) 1045 + #define PINMUX_GPIO140__FUNC_O_DMIC4_CLK (MTK_PIN_NO(140) | 3) 1046 + #define PINMUX_GPIO140__FUNC_O_PWM_2 (MTK_PIN_NO(140) | 4) 1047 + #define PINMUX_GPIO140__FUNC_I1_TP_URXD2_AO (MTK_PIN_NO(140) | 5) 1048 + #define PINMUX_GPIO140__FUNC_I1_URXD2 (MTK_PIN_NO(140) | 6) 1049 + #define PINMUX_GPIO140__FUNC_B0_MD32_0_GPIO2 (MTK_PIN_NO(140) | 7) 1050 + 1051 + #define PINMUX_GPIO141__FUNC_B_GPIO141 (MTK_PIN_NO(141) | 0) 1052 + #define PINMUX_GPIO141__FUNC_O_DPI_D10 (MTK_PIN_NO(141) | 1) 1053 + #define PINMUX_GPIO141__FUNC_I0_GBE_RXDV (MTK_PIN_NO(141) | 2) 1054 + #define PINMUX_GPIO141__FUNC_I0_DMIC4_DAT (MTK_PIN_NO(141) | 3) 1055 + #define PINMUX_GPIO141__FUNC_O_PWM_3 (MTK_PIN_NO(141) | 4) 1056 + #define PINMUX_GPIO141__FUNC_O_TP_URTS2_AO (MTK_PIN_NO(141) | 5) 1057 + #define PINMUX_GPIO141__FUNC_O_URTS2 (MTK_PIN_NO(141) | 6) 1058 + #define PINMUX_GPIO141__FUNC_B0_MD32_1_GPIO0 (MTK_PIN_NO(141) | 7) 1059 + 1060 + #define PINMUX_GPIO142__FUNC_B_GPIO142 (MTK_PIN_NO(142) | 0) 1061 + #define PINMUX_GPIO142__FUNC_O_DPI_D11 (MTK_PIN_NO(142) | 1) 1062 + #define PINMUX_GPIO142__FUNC_O_GBE_TXEN (MTK_PIN_NO(142) | 2) 1063 + #define PINMUX_GPIO142__FUNC_I0_DMIC4_DAT_R (MTK_PIN_NO(142) | 3) 1064 + #define PINMUX_GPIO142__FUNC_O_PWM_1 (MTK_PIN_NO(142) | 4) 1065 + #define PINMUX_GPIO142__FUNC_I1_TP_UCTS2_AO (MTK_PIN_NO(142) | 5) 1066 + #define PINMUX_GPIO142__FUNC_I1_UCTS2 (MTK_PIN_NO(142) | 6) 1067 + #define PINMUX_GPIO142__FUNC_B0_MD32_1_GPIO1 (MTK_PIN_NO(142) | 7) 1068 + 1069 + #define PINMUX_GPIO143__FUNC_B_GPIO143 (MTK_PIN_NO(143) | 0) 1070 + #define PINMUX_GPIO143__FUNC_O_DPI_D12 (MTK_PIN_NO(143) | 1) 1071 + #define PINMUX_GPIO143__FUNC_O_GBE_MDC (MTK_PIN_NO(143) | 2) 1072 + #define PINMUX_GPIO143__FUNC_B0_MD32_0_GPIO0 (MTK_PIN_NO(143) | 3) 1073 + #define PINMUX_GPIO143__FUNC_O_CLKM0 (MTK_PIN_NO(143) | 4) 1074 + #define PINMUX_GPIO143__FUNC_O_SPIM3_CSB (MTK_PIN_NO(143) | 5) 1075 + #define PINMUX_GPIO143__FUNC_O_UTXD1 (MTK_PIN_NO(143) | 6) 1076 + #define PINMUX_GPIO143__FUNC_B0_MD32_1_GPIO2 (MTK_PIN_NO(143) | 7) 1077 + 1078 + #define PINMUX_GPIO144__FUNC_B_GPIO144 (MTK_PIN_NO(144) | 0) 1079 + #define PINMUX_GPIO144__FUNC_O_DPI_D13 (MTK_PIN_NO(144) | 1) 1080 + #define PINMUX_GPIO144__FUNC_B1_GBE_MDIO (MTK_PIN_NO(144) | 2) 1081 + #define PINMUX_GPIO144__FUNC_B0_MD32_0_GPIO1 (MTK_PIN_NO(144) | 3) 1082 + #define PINMUX_GPIO144__FUNC_O_CLKM1 (MTK_PIN_NO(144) | 4) 1083 + #define PINMUX_GPIO144__FUNC_O_SPIM3_CLK (MTK_PIN_NO(144) | 5) 1084 + #define PINMUX_GPIO144__FUNC_I1_URXD1 (MTK_PIN_NO(144) | 6) 1085 + #define PINMUX_GPIO144__FUNC_O_PGD_HV_HSC_PWR0 (MTK_PIN_NO(144) | 7) 1086 + 1087 + #define PINMUX_GPIO145__FUNC_B_GPIO145 (MTK_PIN_NO(145) | 0) 1088 + #define PINMUX_GPIO145__FUNC_O_DPI_D14 (MTK_PIN_NO(145) | 1) 1089 + #define PINMUX_GPIO145__FUNC_O_GBE_TXER (MTK_PIN_NO(145) | 2) 1090 + #define PINMUX_GPIO145__FUNC_B0_MD32_1_GPIO0 (MTK_PIN_NO(145) | 3) 1091 + #define PINMUX_GPIO145__FUNC_O_CMFLASH0 (MTK_PIN_NO(145) | 4) 1092 + #define PINMUX_GPIO145__FUNC_B0_SPIM3_MOSI (MTK_PIN_NO(145) | 5) 1093 + #define PINMUX_GPIO145__FUNC_B0_GBE_AUX_PPS2 (MTK_PIN_NO(145) | 6) 1094 + #define PINMUX_GPIO145__FUNC_O_PGD_HV_HSC_PWR1 (MTK_PIN_NO(145) | 7) 1095 + 1096 + #define PINMUX_GPIO146__FUNC_B_GPIO146 (MTK_PIN_NO(146) | 0) 1097 + #define PINMUX_GPIO146__FUNC_O_DPI_D15 (MTK_PIN_NO(146) | 1) 1098 + #define PINMUX_GPIO146__FUNC_I0_GBE_RXER (MTK_PIN_NO(146) | 2) 1099 + #define PINMUX_GPIO146__FUNC_B0_MD32_1_GPIO1 (MTK_PIN_NO(146) | 3) 1100 + #define PINMUX_GPIO146__FUNC_O_CMFLASH1 (MTK_PIN_NO(146) | 4) 1101 + #define PINMUX_GPIO146__FUNC_B0_SPIM3_MISO (MTK_PIN_NO(146) | 5) 1102 + #define PINMUX_GPIO146__FUNC_B0_GBE_AUX_PPS3 (MTK_PIN_NO(146) | 6) 1103 + #define PINMUX_GPIO146__FUNC_O_PGD_HV_HSC_PWR2 (MTK_PIN_NO(146) | 7) 1104 + 1105 + #define PINMUX_GPIO147__FUNC_B_GPIO147 (MTK_PIN_NO(147) | 0) 1106 + #define PINMUX_GPIO147__FUNC_O_DPI_HSYNC (MTK_PIN_NO(147) | 1) 1107 + #define PINMUX_GPIO147__FUNC_I0_GBE_COL (MTK_PIN_NO(147) | 2) 1108 + #define PINMUX_GPIO147__FUNC_O_I2SO1_MCK (MTK_PIN_NO(147) | 3) 1109 + #define PINMUX_GPIO147__FUNC_O_CMVREF0 (MTK_PIN_NO(147) | 4) 1110 + #define PINMUX_GPIO147__FUNC_O_SPDIF_OUT (MTK_PIN_NO(147) | 5) 1111 + #define PINMUX_GPIO147__FUNC_O_URTS1 (MTK_PIN_NO(147) | 6) 1112 + #define PINMUX_GPIO147__FUNC_O_PGD_HV_HSC_PWR3 (MTK_PIN_NO(147) | 7) 1113 + 1114 + #define PINMUX_GPIO148__FUNC_B_GPIO148 (MTK_PIN_NO(148) | 0) 1115 + #define PINMUX_GPIO148__FUNC_O_DPI_VSYNC (MTK_PIN_NO(148) | 1) 1116 + #define PINMUX_GPIO148__FUNC_I0_GBE_INTR (MTK_PIN_NO(148) | 2) 1117 + #define PINMUX_GPIO148__FUNC_O_I2SO1_BCK (MTK_PIN_NO(148) | 3) 1118 + #define PINMUX_GPIO148__FUNC_O_CMVREF1 (MTK_PIN_NO(148) | 4) 1119 + #define PINMUX_GPIO148__FUNC_I0_SPDIF_IN0 (MTK_PIN_NO(148) | 5) 1120 + #define PINMUX_GPIO148__FUNC_I1_UCTS1 (MTK_PIN_NO(148) | 6) 1121 + #define PINMUX_GPIO148__FUNC_O_PGD_HV_HSC_PWR4 (MTK_PIN_NO(148) | 7) 1122 + 1123 + #define PINMUX_GPIO149__FUNC_B_GPIO149 (MTK_PIN_NO(149) | 0) 1124 + #define PINMUX_GPIO149__FUNC_O_DPI_DE (MTK_PIN_NO(149) | 1) 1125 + #define PINMUX_GPIO149__FUNC_B0_GBE_AUX_PPS0 (MTK_PIN_NO(149) | 2) 1126 + #define PINMUX_GPIO149__FUNC_O_I2SO1_WS (MTK_PIN_NO(149) | 3) 1127 + #define PINMUX_GPIO149__FUNC_O_CMVREF2 (MTK_PIN_NO(149) | 4) 1128 + #define PINMUX_GPIO149__FUNC_I0_SPDIF_IN1 (MTK_PIN_NO(149) | 5) 1129 + #define PINMUX_GPIO149__FUNC_O_UTXD3 (MTK_PIN_NO(149) | 6) 1130 + #define PINMUX_GPIO149__FUNC_O_PGD_HV_HSC_PWR5 (MTK_PIN_NO(149) | 7) 1131 + 1132 + #define PINMUX_GPIO150__FUNC_B_GPIO150 (MTK_PIN_NO(150) | 0) 1133 + #define PINMUX_GPIO150__FUNC_O_DPI_CK (MTK_PIN_NO(150) | 1) 1134 + #define PINMUX_GPIO150__FUNC_B0_GBE_AUX_PPS1 (MTK_PIN_NO(150) | 2) 1135 + #define PINMUX_GPIO150__FUNC_O_I2SO1_D0 (MTK_PIN_NO(150) | 3) 1136 + #define PINMUX_GPIO150__FUNC_O_CMVREF3 (MTK_PIN_NO(150) | 4) 1137 + #define PINMUX_GPIO150__FUNC_I0_SPDIF_IN2 (MTK_PIN_NO(150) | 5) 1138 + #define PINMUX_GPIO150__FUNC_I1_URXD3 (MTK_PIN_NO(150) | 6) 1139 + 1140 + #define PINMUX_GPIO151__FUNC_B_GPIO151 (MTK_PIN_NO(151) | 0) 1141 + #define PINMUX_GPIO151__FUNC_B1_MSDC0_DAT7 (MTK_PIN_NO(151) | 1) 1142 + 1143 + #define PINMUX_GPIO152__FUNC_B_GPIO152 (MTK_PIN_NO(152) | 0) 1144 + #define PINMUX_GPIO152__FUNC_B1_MSDC0_DAT6 (MTK_PIN_NO(152) | 1) 1145 + 1146 + #define PINMUX_GPIO153__FUNC_B_GPIO153 (MTK_PIN_NO(153) | 0) 1147 + #define PINMUX_GPIO153__FUNC_B1_MSDC0_DAT5 (MTK_PIN_NO(153) | 1) 1148 + 1149 + #define PINMUX_GPIO154__FUNC_B_GPIO154 (MTK_PIN_NO(154) | 0) 1150 + #define PINMUX_GPIO154__FUNC_B1_MSDC0_DAT4 (MTK_PIN_NO(154) | 1) 1151 + 1152 + #define PINMUX_GPIO155__FUNC_B_GPIO155 (MTK_PIN_NO(155) | 0) 1153 + #define PINMUX_GPIO155__FUNC_O_MSDC0_RSTB (MTK_PIN_NO(155) | 1) 1154 + 1155 + #define PINMUX_GPIO156__FUNC_B_GPIO156 (MTK_PIN_NO(156) | 0) 1156 + #define PINMUX_GPIO156__FUNC_B1_MSDC0_CMD (MTK_PIN_NO(156) | 1) 1157 + 1158 + #define PINMUX_GPIO157__FUNC_B_GPIO157 (MTK_PIN_NO(157) | 0) 1159 + #define PINMUX_GPIO157__FUNC_B1_MSDC0_CLK (MTK_PIN_NO(157) | 1) 1160 + 1161 + #define PINMUX_GPIO158__FUNC_B_GPIO158 (MTK_PIN_NO(158) | 0) 1162 + #define PINMUX_GPIO158__FUNC_B1_MSDC0_DAT3 (MTK_PIN_NO(158) | 1) 1163 + 1164 + #define PINMUX_GPIO159__FUNC_B_GPIO159 (MTK_PIN_NO(159) | 0) 1165 + #define PINMUX_GPIO159__FUNC_B1_MSDC0_DAT2 (MTK_PIN_NO(159) | 1) 1166 + 1167 + #define PINMUX_GPIO160__FUNC_B_GPIO160 (MTK_PIN_NO(160) | 0) 1168 + #define PINMUX_GPIO160__FUNC_B1_MSDC0_DAT1 (MTK_PIN_NO(160) | 1) 1169 + 1170 + #define PINMUX_GPIO161__FUNC_B_GPIO161 (MTK_PIN_NO(161) | 0) 1171 + #define PINMUX_GPIO161__FUNC_B1_MSDC0_DAT0 (MTK_PIN_NO(161) | 1) 1172 + 1173 + #define PINMUX_GPIO162__FUNC_B_GPIO162 (MTK_PIN_NO(162) | 0) 1174 + #define PINMUX_GPIO162__FUNC_B0_MSDC0_DSL (MTK_PIN_NO(162) | 1) 1175 + 1176 + #define PINMUX_GPIO163__FUNC_B_GPIO163 (MTK_PIN_NO(163) | 0) 1177 + #define PINMUX_GPIO163__FUNC_B1_MSDC1_CMD (MTK_PIN_NO(163) | 1) 1178 + #define PINMUX_GPIO163__FUNC_O_SPDIF_OUT (MTK_PIN_NO(163) | 2) 1179 + #define PINMUX_GPIO163__FUNC_I1_MD32_0_JTAG_TMS (MTK_PIN_NO(163) | 3) 1180 + #define PINMUX_GPIO163__FUNC_I1_ADSP_JTAG0_TMS (MTK_PIN_NO(163) | 4) 1181 + #define PINMUX_GPIO163__FUNC_I1_SCP_JTAG0_TMS (MTK_PIN_NO(163) | 5) 1182 + #define PINMUX_GPIO163__FUNC_I1_CCU0_JTAG_TMS (MTK_PIN_NO(163) | 6) 1183 + #define PINMUX_GPIO163__FUNC_I0_IPU_JTAG_TMS (MTK_PIN_NO(163) | 7) 1184 + 1185 + #define PINMUX_GPIO164__FUNC_B_GPIO164 (MTK_PIN_NO(164) | 0) 1186 + #define PINMUX_GPIO164__FUNC_B1_MSDC1_CLK (MTK_PIN_NO(164) | 1) 1187 + #define PINMUX_GPIO164__FUNC_I0_SPDIF_IN0 (MTK_PIN_NO(164) | 2) 1188 + #define PINMUX_GPIO164__FUNC_I1_MD32_0_JTAG_TCK (MTK_PIN_NO(164) | 3) 1189 + #define PINMUX_GPIO164__FUNC_I0_ADSP_JTAG0_TCK (MTK_PIN_NO(164) | 4) 1190 + #define PINMUX_GPIO164__FUNC_I1_SCP_JTAG0_TCK (MTK_PIN_NO(164) | 5) 1191 + #define PINMUX_GPIO164__FUNC_I1_CCU0_JTAG_TCK (MTK_PIN_NO(164) | 6) 1192 + #define PINMUX_GPIO164__FUNC_I0_IPU_JTAG_TCK (MTK_PIN_NO(164) | 7) 1193 + 1194 + #define PINMUX_GPIO165__FUNC_B_GPIO165 (MTK_PIN_NO(165) | 0) 1195 + #define PINMUX_GPIO165__FUNC_B1_MSDC1_DAT0 (MTK_PIN_NO(165) | 1) 1196 + #define PINMUX_GPIO165__FUNC_I0_SPDIF_IN1 (MTK_PIN_NO(165) | 2) 1197 + #define PINMUX_GPIO165__FUNC_I1_MD32_0_JTAG_TDI (MTK_PIN_NO(165) | 3) 1198 + #define PINMUX_GPIO165__FUNC_I1_ADSP_JTAG0_TDI (MTK_PIN_NO(165) | 4) 1199 + #define PINMUX_GPIO165__FUNC_I1_SCP_JTAG0_TDI (MTK_PIN_NO(165) | 5) 1200 + #define PINMUX_GPIO165__FUNC_I1_CCU0_JTAG_TDI (MTK_PIN_NO(165) | 6) 1201 + #define PINMUX_GPIO165__FUNC_I0_IPU_JTAG_TDI (MTK_PIN_NO(165) | 7) 1202 + 1203 + #define PINMUX_GPIO166__FUNC_B_GPIO166 (MTK_PIN_NO(166) | 0) 1204 + #define PINMUX_GPIO166__FUNC_B1_MSDC1_DAT1 (MTK_PIN_NO(166) | 1) 1205 + #define PINMUX_GPIO166__FUNC_I0_SPDIF_IN2 (MTK_PIN_NO(166) | 2) 1206 + #define PINMUX_GPIO166__FUNC_O_MD32_0_JTAG_TDO (MTK_PIN_NO(166) | 3) 1207 + #define PINMUX_GPIO166__FUNC_O_ADSP_JTAG0_TDO (MTK_PIN_NO(166) | 4) 1208 + #define PINMUX_GPIO166__FUNC_O_SCP_JTAG0_TDO (MTK_PIN_NO(166) | 5) 1209 + #define PINMUX_GPIO166__FUNC_O_CCU0_JTAG_TDO (MTK_PIN_NO(166) | 6) 1210 + #define PINMUX_GPIO166__FUNC_O_IPU_JTAG_TDO (MTK_PIN_NO(166) | 7) 1211 + 1212 + #define PINMUX_GPIO167__FUNC_B_GPIO167 (MTK_PIN_NO(167) | 0) 1213 + #define PINMUX_GPIO167__FUNC_B1_MSDC1_DAT2 (MTK_PIN_NO(167) | 1) 1214 + #define PINMUX_GPIO167__FUNC_O_PWM_0 (MTK_PIN_NO(167) | 2) 1215 + #define PINMUX_GPIO167__FUNC_I1_MD32_0_JTAG_TRST (MTK_PIN_NO(167) | 3) 1216 + #define PINMUX_GPIO167__FUNC_I1_ADSP_JTAG0_TRSTN (MTK_PIN_NO(167) | 4) 1217 + #define PINMUX_GPIO167__FUNC_I0_SCP_JTAG0_TRSTN (MTK_PIN_NO(167) | 5) 1218 + #define PINMUX_GPIO167__FUNC_I1_CCU0_JTAG_TRST (MTK_PIN_NO(167) | 6) 1219 + #define PINMUX_GPIO167__FUNC_I0_IPU_JTAG_TRST (MTK_PIN_NO(167) | 7) 1220 + 1221 + #define PINMUX_GPIO168__FUNC_B_GPIO168 (MTK_PIN_NO(168) | 0) 1222 + #define PINMUX_GPIO168__FUNC_B1_MSDC1_DAT3 (MTK_PIN_NO(168) | 1) 1223 + #define PINMUX_GPIO168__FUNC_O_PWM_1 (MTK_PIN_NO(168) | 2) 1224 + #define PINMUX_GPIO168__FUNC_O_CLKM0 (MTK_PIN_NO(168) | 3) 1225 + 1226 + #define PINMUX_GPIO169__FUNC_B_GPIO169 (MTK_PIN_NO(169) | 0) 1227 + #define PINMUX_GPIO169__FUNC_B1_MSDC2_CMD (MTK_PIN_NO(169) | 1) 1228 + #define PINMUX_GPIO169__FUNC_O_LVTS_FOUT (MTK_PIN_NO(169) | 2) 1229 + #define PINMUX_GPIO169__FUNC_I1_MD32_1_JTAG_TMS (MTK_PIN_NO(169) | 3) 1230 + #define PINMUX_GPIO169__FUNC_I0_UDI_TMS (MTK_PIN_NO(169) | 4) 1231 + #define PINMUX_GPIO169__FUNC_I0_VPU_UDI_TMS (MTK_PIN_NO(169) | 5) 1232 + #define PINMUX_GPIO169__FUNC_B0_TDMIN_MCK (MTK_PIN_NO(169) | 6) 1233 + #define PINMUX_GPIO169__FUNC_I1_SSPM_JTAG_TMS (MTK_PIN_NO(169) | 7) 1234 + 1235 + #define PINMUX_GPIO170__FUNC_B_GPIO170 (MTK_PIN_NO(170) | 0) 1236 + #define PINMUX_GPIO170__FUNC_B1_MSDC2_CLK (MTK_PIN_NO(170) | 1) 1237 + #define PINMUX_GPIO170__FUNC_O_LVTS_SDO (MTK_PIN_NO(170) | 2) 1238 + #define PINMUX_GPIO170__FUNC_I1_MD32_1_JTAG_TCK (MTK_PIN_NO(170) | 3) 1239 + #define PINMUX_GPIO170__FUNC_I0_UDI_TCK (MTK_PIN_NO(170) | 4) 1240 + #define PINMUX_GPIO170__FUNC_I0_VPU_UDI_TCK (MTK_PIN_NO(170) | 5) 1241 + #define PINMUX_GPIO170__FUNC_B0_TDMIN_BCK (MTK_PIN_NO(170) | 6) 1242 + #define PINMUX_GPIO170__FUNC_I1_SSPM_JTAG_TCK (MTK_PIN_NO(170) | 7) 1243 + 1244 + #define PINMUX_GPIO171__FUNC_B_GPIO171 (MTK_PIN_NO(171) | 0) 1245 + #define PINMUX_GPIO171__FUNC_B1_MSDC2_DAT0 (MTK_PIN_NO(171) | 1) 1246 + #define PINMUX_GPIO171__FUNC_I0_LVTS_26M (MTK_PIN_NO(171) | 2) 1247 + #define PINMUX_GPIO171__FUNC_I1_MD32_1_JTAG_TDI (MTK_PIN_NO(171) | 3) 1248 + #define PINMUX_GPIO171__FUNC_I0_UDI_TDI (MTK_PIN_NO(171) | 4) 1249 + #define PINMUX_GPIO171__FUNC_I0_VPU_UDI_TDI (MTK_PIN_NO(171) | 5) 1250 + #define PINMUX_GPIO171__FUNC_B0_TDMIN_LRCK (MTK_PIN_NO(171) | 6) 1251 + #define PINMUX_GPIO171__FUNC_I1_SSPM_JTAG_TDI (MTK_PIN_NO(171) | 7) 1252 + 1253 + #define PINMUX_GPIO172__FUNC_B_GPIO172 (MTK_PIN_NO(172) | 0) 1254 + #define PINMUX_GPIO172__FUNC_B1_MSDC2_DAT1 (MTK_PIN_NO(172) | 1) 1255 + #define PINMUX_GPIO172__FUNC_I0_LVTS_SCF (MTK_PIN_NO(172) | 2) 1256 + #define PINMUX_GPIO172__FUNC_O_MD32_1_JTAG_TDO (MTK_PIN_NO(172) | 3) 1257 + #define PINMUX_GPIO172__FUNC_O_UDI_TDO (MTK_PIN_NO(172) | 4) 1258 + #define PINMUX_GPIO172__FUNC_O_VPU_UDI_TDO (MTK_PIN_NO(172) | 5) 1259 + #define PINMUX_GPIO172__FUNC_I0_TDMIN_DI (MTK_PIN_NO(172) | 6) 1260 + #define PINMUX_GPIO172__FUNC_O_SSPM_JTAG_TDO (MTK_PIN_NO(172) | 7) 1261 + 1262 + #define PINMUX_GPIO173__FUNC_B_GPIO173 (MTK_PIN_NO(173) | 0) 1263 + #define PINMUX_GPIO173__FUNC_B1_MSDC2_DAT2 (MTK_PIN_NO(173) | 1) 1264 + #define PINMUX_GPIO173__FUNC_I0_LVTS_SCK (MTK_PIN_NO(173) | 2) 1265 + #define PINMUX_GPIO173__FUNC_I1_MD32_1_JTAG_TRST (MTK_PIN_NO(173) | 3) 1266 + #define PINMUX_GPIO173__FUNC_I0_UDI_NTRST (MTK_PIN_NO(173) | 4) 1267 + #define PINMUX_GPIO173__FUNC_I0_VPU_UDI_NTRST (MTK_PIN_NO(173) | 5) 1268 + #define PINMUX_GPIO173__FUNC_I0_SSPM_JTAG_TRSTN (MTK_PIN_NO(173) | 7) 1269 + 1270 + #define PINMUX_GPIO174__FUNC_B_GPIO174 (MTK_PIN_NO(174) | 0) 1271 + #define PINMUX_GPIO174__FUNC_B1_MSDC2_DAT3 (MTK_PIN_NO(174) | 1) 1272 + #define PINMUX_GPIO174__FUNC_I0_LVTS_SDI (MTK_PIN_NO(174) | 2) 1273 + 1274 + #define PINMUX_GPIO175__FUNC_B_GPIO175 (MTK_PIN_NO(175) | 0) 1275 + #define PINMUX_GPIO175__FUNC_B0_SPMI_M_SCL (MTK_PIN_NO(175) | 1) 1276 + 1277 + #define PINMUX_GPIO176__FUNC_B_GPIO176 (MTK_PIN_NO(176) | 0) 1278 + #define PINMUX_GPIO176__FUNC_B0_SPMI_M_SDA (MTK_PIN_NO(176) | 1) 1279 + 1280 + #endif /* __MEDIATEK_MT8188-PINFUNC_H */
+3 -3
include/dt-bindings/pinctrl/pinctrl-starfive.h include/dt-bindings/pinctrl/pinctrl-starfive-jh7100.h
··· 3 3 * Copyright (C) 2021 Emil Renner Berthing <kernel@esmil.dk> 4 4 */ 5 5 6 - #ifndef __DT_BINDINGS_PINCTRL_STARFIVE_H__ 7 - #define __DT_BINDINGS_PINCTRL_STARFIVE_H__ 6 + #ifndef __DT_BINDINGS_PINCTRL_STARFIVE_JH7100_H__ 7 + #define __DT_BINDINGS_PINCTRL_STARFIVE_JH7100_H__ 8 8 9 9 #define PAD_GPIO_OFFSET 0 10 10 #define PAD_FUNC_SHARE_OFFSET 64 ··· 272 272 273 273 #define GPI_NONE 0xff 274 274 275 - #endif /* __DT_BINDINGS_PINCTRL_STARFIVE_H__ */ 275 + #endif /* __DT_BINDINGS_PINCTRL_STARFIVE_JH7100_H__ */
+7
include/dt-bindings/pinctrl/samsung.h
··· 10 10 #ifndef __DT_BINDINGS_PINCTRL_SAMSUNG_H__ 11 11 #define __DT_BINDINGS_PINCTRL_SAMSUNG_H__ 12 12 13 + /* 14 + * These bindings are deprecated, because they do not match the actual 15 + * concept of bindings but rather contain pure register values. 16 + * Instead include the header in the DTS source directory. 17 + */ 18 + #warning "These bindings are deprecated. Instead use the header in the DTS source directory." 19 + 13 20 #define EXYNOS_PIN_PULL_NONE 0 14 21 #define EXYNOS_PIN_PULL_DOWN 1 15 22 #define EXYNOS_PIN_PULL_UP 3
-16
include/soc/at91/pm.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0-only */ 2 - /* 3 - * Atmel Power Management 4 - * 5 - * Copyright (C) 2020 Atmel 6 - * 7 - * Author: Lee Jones <lee.jones@linaro.org> 8 - */ 9 - 10 - #ifndef __SOC_ATMEL_PM_H 11 - #define __SOC_ATMEL_PM_H 12 - 13 - void at91_pinctrl_gpio_suspend(void); 14 - void at91_pinctrl_gpio_resume(void); 15 - 16 - #endif /* __SOC_ATMEL_PM_H */