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

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

Pull pin control updates from Linus Walleij:
"This is the bulk of the pin control changes for the v5.9 kernel
series:

Core changes:

- The GPIO patch "gpiolib: Introduce for_each_requested_gpio_in_range()
macro" was put in an immutable branch and merged into the pinctrl
tree as well. We see these changes also here.

- Improved debug output for pins used as GPIO.

New drivers:

- Ocelot Sparx5 SoC driver.

- Intel Emmitsburg SoC subdriver.

- Intel Tiger Lake-H SoC subdriver.

- Qualcomm PM660 SoC subdriver.

- Renesas SH-PFC R8A774E1 subdriver.

Driver improvements:

- Linear improvement and cleanups of the Intel drivers for
Cherryview, Lynxpoint, Baytrail etc. Improved locking among other
things.

- Renesas SH-PFC has added support for RPC pins, groups, and
functions to r8a77970 and r8a77980.

- The newere Freescale (now NXP) i.MX8 pin controllers have been
modularized. This is driven by the Google Android GKI initiative I
think.

- Open drain support for pins on the Qualcomm IPQ4019.

- The Ingenic driver can handle both edges IRQ detection.

- A big slew of documentation fixes all over the place.

- A few irqchip template conversions by yours truly.

* tag 'pinctrl-v5.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: (107 commits)
dt-bindings: pinctrl: add bindings for MediaTek MT6779 SoC
pinctrl: stmfx: Use irqchip template
pinctrl: amd: Use irqchip template
pinctrl: mediatek: fix build for tristate changes
pinctrl: samsung: Use bank name as irqchip name
pinctrl: core: print gpio in pins debugfs file
pinctrl: mediatek: add mt6779 eint support
pinctrl: mediatek: add pinctrl support for MT6779 SoC
pinctrl: mediatek: avoid virtual gpio trying to set reg
pinctrl: mediatek: update pinmux definitions for mt6779
pinctrl: stm32: use the hwspin_lock_timeout_in_atomic() API
pinctrl: mcp23s08: Use irqchip template
pinctrl: sx150x: Use irqchip template
dt-bindings: ingenic,pinctrl: Support pinmux/pinconf nodes
pinctrl: intel: Add Intel Emmitsburg pin controller support
pinctl: ti: iodelay: Replace HTTP links with HTTPS ones
Revert "gpio: omap: handle pin config bias flags"
pinctrl: single: Use fallthrough pseudo-keyword
pinctrl: qcom: spmi-gpio: Use fallthrough pseudo-keyword
pinctrl: baytrail: Use fallthrough pseudo-keyword
...

+7303 -1198
-81
Documentation/devicetree/bindings/pinctrl/ingenic,pinctrl.txt
··· 1 - Ingenic XBurst pin controller 2 - 3 - Please refer to pinctrl-bindings.txt in this directory for details of the 4 - common pinctrl bindings used by client devices, including the meaning of the 5 - phrase "pin configuration node". 6 - 7 - For the XBurst SoCs, pin control is tightly bound with GPIO ports. All pins may 8 - be used as GPIOs, multiplexed device functions are configured within the 9 - GPIO port configuration registers and it is typical to refer to pins using the 10 - naming scheme "PxN" where x is a character identifying the GPIO port with 11 - which the pin is associated and N is an integer from 0 to 31 identifying the 12 - pin within that GPIO port. For example PA0 is the first pin in GPIO port A, and 13 - PB31 is the last pin in GPIO port B. The jz4740, the x1000 and the x1830 14 - contains 4 GPIO ports, PA to PD, for a total of 128 pins. The jz4760, the 15 - jz4770 and the jz4780 contains 6 GPIO ports, PA to PF, for a total of 192 pins. 16 - 17 - 18 - Required properties: 19 - -------------------- 20 - 21 - - compatible: One of: 22 - - "ingenic,jz4740-pinctrl" 23 - - "ingenic,jz4725b-pinctrl" 24 - - "ingenic,jz4760-pinctrl" 25 - - "ingenic,jz4760b-pinctrl" 26 - - "ingenic,jz4770-pinctrl" 27 - - "ingenic,jz4780-pinctrl" 28 - - "ingenic,x1000-pinctrl" 29 - - "ingenic,x1000e-pinctrl" 30 - - "ingenic,x1500-pinctrl" 31 - - "ingenic,x1830-pinctrl" 32 - - reg: Address range of the pinctrl registers. 33 - 34 - 35 - Required properties for sub-nodes (GPIO chips): 36 - ----------------------------------------------- 37 - 38 - - compatible: Must contain one of: 39 - - "ingenic,jz4740-gpio" 40 - - "ingenic,jz4760-gpio" 41 - - "ingenic,jz4770-gpio" 42 - - "ingenic,jz4780-gpio" 43 - - "ingenic,x1000-gpio" 44 - - "ingenic,x1830-gpio" 45 - - reg: The GPIO bank number. 46 - - interrupt-controller: Marks the device node as an interrupt controller. 47 - - interrupts: Interrupt specifier for the controllers interrupt. 48 - - #interrupt-cells: Should be 2. Refer to 49 - ../interrupt-controller/interrupts.txt for more details. 50 - - gpio-controller: Marks the device node as a GPIO controller. 51 - - #gpio-cells: Should be 2. The first cell is the GPIO number and the second 52 - cell specifies GPIO flags, as defined in <dt-bindings/gpio/gpio.h>. Only the 53 - GPIO_ACTIVE_HIGH and GPIO_ACTIVE_LOW flags are supported. 54 - - gpio-ranges: Range of pins managed by the GPIO controller. Refer to 55 - ../gpio/gpio.txt for more details. 56 - 57 - 58 - Example: 59 - -------- 60 - 61 - pinctrl: pin-controller@10010000 { 62 - compatible = "ingenic,jz4740-pinctrl"; 63 - reg = <0x10010000 0x400>; 64 - #address-cells = <1>; 65 - #size-cells = <0>; 66 - 67 - gpa: gpio@0 { 68 - compatible = "ingenic,jz4740-gpio"; 69 - reg = <0>; 70 - 71 - gpio-controller; 72 - gpio-ranges = <&pinctrl 0 0 32>; 73 - #gpio-cells = <2>; 74 - 75 - interrupt-controller; 76 - #interrupt-cells = <2>; 77 - 78 - interrupt-parent = <&intc>; 79 - interrupts = <28>; 80 - }; 81 - };
+176
Documentation/devicetree/bindings/pinctrl/ingenic,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/ingenic,pinctrl.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Ingenic SoCs pin controller devicetree bindings 8 + 9 + description: > 10 + Please refer to pinctrl-bindings.txt in this directory for details of the 11 + common pinctrl bindings used by client devices, including the meaning of the 12 + phrase "pin configuration node". 13 + 14 + For the Ingenic SoCs, pin control is tightly bound with GPIO ports. All pins 15 + may be used as GPIOs, multiplexed device functions are configured within the 16 + GPIO port configuration registers and it is typical to refer to pins using the 17 + naming scheme "PxN" where x is a character identifying the GPIO port with 18 + which the pin is associated and N is an integer from 0 to 31 identifying the 19 + pin within that GPIO port. For example PA0 is the first pin in GPIO port A, 20 + and PB31 is the last pin in GPIO port B. The JZ4740, the X1000 and the X1830 21 + contains 4 GPIO ports, PA to PD, for a total of 128 pins. The JZ4760, the 22 + JZ4770 and the JZ4780 contains 6 GPIO ports, PA to PF, for a total of 192 23 + pins. 24 + 25 + maintainers: 26 + - Paul Cercueil <paul@crapouillou.net> 27 + 28 + properties: 29 + nodename: 30 + pattern: "^pinctrl@[0-9a-f]+$" 31 + 32 + compatible: 33 + oneOf: 34 + - enum: 35 + - ingenic,jz4740-pinctrl 36 + - ingenic,jz4725b-pinctrl 37 + - ingenic,jz4760-pinctrl 38 + - ingenic,jz4770-pinctrl 39 + - ingenic,jz4780-pinctrl 40 + - ingenic,x1000-pinctrl 41 + - ingenic,x1500-pinctrl 42 + - ingenic,x1830-pinctrl 43 + - items: 44 + - const: ingenic,jz4760b-pinctrl 45 + - const: ingenic,jz4760-pinctrl 46 + - items: 47 + - const: ingenic,x1000e-pinctrl 48 + - const: ingenic,x1000-pinctrl 49 + 50 + reg: 51 + maxItems: 1 52 + 53 + "#address-cells": 54 + const: 1 55 + 56 + "#size-cells": 57 + const: 0 58 + 59 + patternProperties: 60 + "^gpio@[0-9]$": 61 + type: object 62 + properties: 63 + compatible: 64 + enum: 65 + - ingenic,jz4740-gpio 66 + - ingenic,jz4725b-gpio 67 + - ingenic,jz4760-gpio 68 + - ingenic,jz4770-gpio 69 + - ingenic,jz4780-gpio 70 + - ingenic,x1000-gpio 71 + - ingenic,x1500-gpio 72 + - ingenic,x1830-gpio 73 + 74 + reg: 75 + items: 76 + - description: The GPIO bank number 77 + 78 + gpio-controller: true 79 + 80 + "#gpio-cells": 81 + const: 2 82 + 83 + gpio-ranges: 84 + maxItems: 1 85 + 86 + interrupt-controller: true 87 + 88 + "#interrupt-cells": 89 + const: 2 90 + description: 91 + Refer to ../interrupt-controller/interrupts.txt for more details. 92 + 93 + interrupts: 94 + maxItems: 1 95 + 96 + required: 97 + - compatible 98 + - reg 99 + - gpio-controller 100 + - "#gpio-cells" 101 + - interrupts 102 + - interrupt-controller 103 + - "#interrupt-cells" 104 + 105 + additionalProperties: false 106 + 107 + required: 108 + - compatible 109 + - reg 110 + - "#address-cells" 111 + - "#size-cells" 112 + 113 + additionalProperties: 114 + anyOf: 115 + - type: object 116 + allOf: 117 + - $ref: pincfg-node.yaml# 118 + - $ref: pinmux-node.yaml# 119 + 120 + properties: 121 + phandle: true 122 + function: true 123 + groups: true 124 + pins: true 125 + bias-disable: true 126 + bias-pull-up: true 127 + bias-pull-down: true 128 + output-low: true 129 + output-high: true 130 + additionalProperties: false 131 + 132 + - type: object 133 + properties: 134 + phandle: true 135 + additionalProperties: 136 + type: object 137 + allOf: 138 + - $ref: pincfg-node.yaml# 139 + - $ref: pinmux-node.yaml# 140 + 141 + properties: 142 + phandle: true 143 + function: true 144 + groups: true 145 + pins: true 146 + bias-disable: true 147 + bias-pull-up: true 148 + bias-pull-down: true 149 + output-low: true 150 + output-high: true 151 + additionalProperties: false 152 + 153 + examples: 154 + - | 155 + pin-controller@10010000 { 156 + compatible = "ingenic,jz4770-pinctrl"; 157 + reg = <0x10010000 0x600>; 158 + 159 + #address-cells = <1>; 160 + #size-cells = <0>; 161 + 162 + gpio@0 { 163 + compatible = "ingenic,jz4770-gpio"; 164 + reg = <0>; 165 + 166 + gpio-controller; 167 + gpio-ranges = <&pinctrl 0 0 32>; 168 + #gpio-cells = <2>; 169 + 170 + interrupt-controller; 171 + #interrupt-cells = <2>; 172 + 173 + interrupt-parent = <&intc>; 174 + interrupts = <17>; 175 + }; 176 + };
+202
Documentation/devicetree/bindings/pinctrl/mediatek,mt6779-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,mt6779-pinctrl.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Mediatek MT6779 Pin Controller Device Tree Bindings 8 + 9 + maintainers: 10 + - Andy Teng <andy.teng@mediatek.com> 11 + 12 + description: |+ 13 + The pin controller node should be the child of a syscon node with the 14 + required property: 15 + - compatible: "syscon" 16 + 17 + properties: 18 + compatible: 19 + const: mediatek,mt6779-pinctrl 20 + 21 + reg: 22 + minItems: 9 23 + maxItems: 9 24 + 25 + reg-names: 26 + items: 27 + - const: "gpio" 28 + - const: "iocfg_rm" 29 + - const: "iocfg_br" 30 + - const: "iocfg_lm" 31 + - const: "iocfg_lb" 32 + - const: "iocfg_rt" 33 + - const: "iocfg_lt" 34 + - const: "iocfg_tl" 35 + - const: "eint" 36 + 37 + gpio-controller: true 38 + 39 + "#gpio-cells": 40 + const: 2 41 + description: | 42 + Number of cells in GPIO specifier. Since the generic GPIO 43 + binding is used, the amount of cells must be specified as 2. See the below 44 + mentioned gpio binding representation for description of particular cells. 45 + 46 + gpio-ranges: 47 + minItems: 1 48 + maxItems: 5 49 + description: | 50 + GPIO valid number range. 51 + 52 + interrupt-controller: true 53 + 54 + interrupts: 55 + maxItems: 1 56 + description: | 57 + Specifies the summary IRQ. 58 + 59 + "#interrupt-cells": 60 + const: 2 61 + 62 + required: 63 + - compatible 64 + - reg 65 + - reg-names 66 + - gpio-controller 67 + - "#gpio-cells" 68 + - gpio-ranges 69 + - interrupt-controller 70 + - interrupts 71 + - "#interrupt-cells" 72 + 73 + patternProperties: 74 + '-[0-9]*$': 75 + type: object 76 + patternProperties: 77 + '-pins*$': 78 + type: object 79 + description: | 80 + A pinctrl node should contain at least one subnodes representing the 81 + pinctrl groups available on the machine. Each subnode will list the 82 + pins it needs, and how they should be configured, with regard to muxer 83 + configuration, pullups, drive strength, input enable/disable and input schmitt. 84 + $ref: "/schemas/pinctrl/pincfg-node.yaml" 85 + 86 + properties: 87 + pinmux: 88 + description: 89 + integer array, represents gpio pin number and mux setting. 90 + Supported pin number and mux varies for different SoCs, and are defined 91 + as macros in boot/dts/<soc>-pinfunc.h directly. 92 + 93 + bias-disable: true 94 + 95 + bias-pull-up: true 96 + 97 + bias-pull-down: true 98 + 99 + input-enable: true 100 + 101 + input-disable: true 102 + 103 + output-low: true 104 + 105 + output-high: true 106 + 107 + input-schmitt-enable: true 108 + 109 + input-schmitt-disable: true 110 + 111 + mediatek,pull-up-adv: 112 + description: | 113 + Pull up setings for 2 pull resistors, R0 and R1. User can 114 + configure those special pins. Valid arguments are described as below: 115 + 0: (R1, R0) = (0, 0) which means R1 disabled and R0 disabled. 116 + 1: (R1, R0) = (0, 1) which means R1 disabled and R0 enabled. 117 + 2: (R1, R0) = (1, 0) which means R1 enabled and R0 disabled. 118 + 3: (R1, R0) = (1, 1) which means R1 enabled and R0 enabled. 119 + $ref: /schemas/types.yaml#/definitions/uint32 120 + enum: [0, 1, 2, 3] 121 + 122 + mediatek,pull-down-adv: 123 + description: | 124 + Pull down settings for 2 pull resistors, R0 and R1. User can 125 + configure those special pins. Valid arguments are described as below: 126 + 0: (R1, R0) = (0, 0) which means R1 disabled and R0 disabled. 127 + 1: (R1, R0) = (0, 1) which means R1 disabled and R0 enabled. 128 + 2: (R1, R0) = (1, 0) which means R1 enabled and R0 disabled. 129 + 3: (R1, R0) = (1, 1) which means R1 enabled and R0 enabled. 130 + $ref: /schemas/types.yaml#/definitions/uint32 131 + enum: [0, 1, 2, 3] 132 + 133 + required: 134 + - pinmux 135 + 136 + additionalProperties: false 137 + 138 + additionalProperties: false 139 + 140 + examples: 141 + - | 142 + #include <dt-bindings/interrupt-controller/irq.h> 143 + #include <dt-bindings/interrupt-controller/arm-gic.h> 144 + #include <dt-bindings/pinctrl/mt6779-pinfunc.h> 145 + 146 + soc { 147 + #address-cells = <2>; 148 + #size-cells = <2>; 149 + 150 + pio: pinctrl@10005000 { 151 + compatible = "mediatek,mt6779-pinctrl"; 152 + reg = <0 0x10005000 0 0x1000>, 153 + <0 0x11c20000 0 0x1000>, 154 + <0 0x11d10000 0 0x1000>, 155 + <0 0x11e20000 0 0x1000>, 156 + <0 0x11e70000 0 0x1000>, 157 + <0 0x11ea0000 0 0x1000>, 158 + <0 0x11f20000 0 0x1000>, 159 + <0 0x11f30000 0 0x1000>, 160 + <0 0x1000b000 0 0x1000>; 161 + reg-names = "gpio", "iocfg_rm", 162 + "iocfg_br", "iocfg_lm", 163 + "iocfg_lb", "iocfg_rt", 164 + "iocfg_lt", "iocfg_tl", 165 + "eint"; 166 + gpio-controller; 167 + #gpio-cells = <2>; 168 + gpio-ranges = <&pio 0 0 210>; 169 + interrupt-controller; 170 + #interrupt-cells = <2>; 171 + interrupts = <GIC_SPI 204 IRQ_TYPE_LEVEL_HIGH>; 172 + 173 + mmc0_pins_default: mmc0-0 { 174 + cmd-dat-pins { 175 + pinmux = <PINMUX_GPIO168__FUNC_MSDC0_DAT0>, 176 + <PINMUX_GPIO172__FUNC_MSDC0_DAT1>, 177 + <PINMUX_GPIO169__FUNC_MSDC0_DAT2>, 178 + <PINMUX_GPIO177__FUNC_MSDC0_DAT3>, 179 + <PINMUX_GPIO170__FUNC_MSDC0_DAT4>, 180 + <PINMUX_GPIO173__FUNC_MSDC0_DAT5>, 181 + <PINMUX_GPIO171__FUNC_MSDC0_DAT6>, 182 + <PINMUX_GPIO174__FUNC_MSDC0_DAT7>, 183 + <PINMUX_GPIO167__FUNC_MSDC0_CMD>; 184 + input-enable; 185 + mediatek,pull-up-adv = <1>; 186 + }; 187 + clk-pins { 188 + pinmux = <PINMUX_GPIO176__FUNC_MSDC0_CLK>; 189 + mediatek,pull-down-adv = <2>; 190 + }; 191 + rst-pins { 192 + pinmux = <PINMUX_GPIO178__FUNC_MSDC0_RSTB>; 193 + mediatek,pull-up-adv = <0>; 194 + }; 195 + }; 196 + }; 197 + 198 + mmc0 { 199 + pinctrl-0 = <&mmc0_pins_default>; 200 + pinctrl-names = "default"; 201 + }; 202 + };
+2 -1
Documentation/devicetree/bindings/pinctrl/qcom,ipq4019-pinctrl.txt
··· 44 44 45 45 The following generic properties as defined in pinctrl-bindings.txt are valid 46 46 to specify in a pin configuration subnode: 47 - pins, function, bias-disable, bias-pull-down, bias-pull-up, drive-strength. 47 + pins, function, bias-disable, bias-pull-down, bias-pull-up, drive-open-drain, 48 + drive-strength. 48 49 49 50 Non-empty subnodes must specify the 'pins' property. 50 51 Note that not all properties are valid for all pins.
+2
Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.txt
··· 23 23 "qcom,pmi8994-gpio" 24 24 "qcom,pmi8998-gpio" 25 25 "qcom,pms405-gpio" 26 + "qcom,pm660-gpio" 27 + "qcom,pm660l-gpio" 26 28 "qcom,pm8150-gpio" 27 29 "qcom,pm8150b-gpio" 28 30 "qcom,pm6150-gpio"
+1
Documentation/devicetree/bindings/pinctrl/renesas,pfc-pinctrl.txt
··· 21 21 - "renesas,pfc-r8a774a1": for R8A774A1 (RZ/G2M) compatible pin-controller. 22 22 - "renesas,pfc-r8a774b1": for R8A774B1 (RZ/G2N) compatible pin-controller. 23 23 - "renesas,pfc-r8a774c0": for R8A774C0 (RZ/G2E) compatible pin-controller. 24 + - "renesas,pfc-r8a774e1": for R8A774E1 (RZ/G2H) compatible pin-controller. 24 25 - "renesas,pfc-r8a7778": for R8A7778 (R-Car M1) compatible pin-controller. 25 26 - "renesas,pfc-r8a7779": for R8A7779 (R-Car H1) compatible pin-controller. 26 27 - "renesas,pfc-r8a7790": for R8A7790 (R-Car H2) compatible pin-controller.
-87
Documentation/devicetree/bindings/pinctrl/renesas,rza2-pinctrl.txt
··· 1 - Renesas RZ/A2 combined Pin and GPIO controller 2 - 3 - The Renesas SoCs of the RZ/A2 series feature a combined Pin and GPIO controller. 4 - Pin multiplexing and GPIO configuration is performed on a per-pin basis. 5 - Each port features up to 8 pins, each of them configurable for GPIO 6 - function (port mode) or in alternate function mode. 7 - Up to 8 different alternate function modes exist for each single pin. 8 - 9 - Pin controller node 10 - ------------------- 11 - 12 - Required properties: 13 - - compatible: shall be: 14 - - "renesas,r7s9210-pinctrl": for RZ/A2M 15 - - reg 16 - Address base and length of the memory area where the pin controller 17 - hardware is mapped to. 18 - - gpio-controller 19 - This pin controller also controls pins as GPIO 20 - - #gpio-cells 21 - Must be 2 22 - - gpio-ranges 23 - Expresses the total number of GPIO ports/pins in this SoC 24 - 25 - Example: Pin controller node for RZ/A2M SoC (r7s9210) 26 - 27 - pinctrl: pin-controller@fcffe000 { 28 - compatible = "renesas,r7s9210-pinctrl"; 29 - reg = <0xfcffe000 0x1000>; 30 - 31 - gpio-controller; 32 - #gpio-cells = <2>; 33 - gpio-ranges = <&pinctrl 0 0 176>; 34 - }; 35 - 36 - Sub-nodes 37 - --------- 38 - 39 - The child nodes of the pin controller designate pins to be used for 40 - specific peripheral functions or as GPIO. 41 - 42 - - Pin multiplexing sub-nodes: 43 - A pin multiplexing sub-node describes how to configure a set of 44 - (or a single) pin in some desired alternate function mode. 45 - The values for the pinmux properties are a combination of port name, pin 46 - number and the desired function index. Use the RZA2_PINMUX macro located 47 - in include/dt-bindings/pinctrl/r7s9210-pinctrl.h to easily define these. 48 - For assigning GPIO pins, use the macro RZA2_PIN also in r7s9210-pinctrl.h 49 - to express the desired port pin. 50 - 51 - Required properties: 52 - - pinmux: 53 - integer array representing pin number and pin multiplexing configuration. 54 - When a pin has to be configured in alternate function mode, use this 55 - property to identify the pin by its global index, and provide its 56 - alternate function configuration number along with it. 57 - When multiple pins are required to be configured as part of the same 58 - alternate function they shall be specified as members of the same 59 - argument list of a single "pinmux" property. 60 - Helper macros to ease assembling the pin index from its position 61 - (port where it sits on and pin number) and alternate function identifier 62 - are provided by the pin controller header file at: 63 - <dt-bindings/pinctrl/r7s9210-pinctrl.h> 64 - Integers values in "pinmux" argument list are assembled as: 65 - ((PORT * 8 + PIN) | MUX_FUNC << 16) 66 - 67 - Example: Board specific pins configuration 68 - 69 - &pinctrl { 70 - /* Serial Console */ 71 - scif4_pins: serial4 { 72 - pinmux = <RZA2_PINMUX(PORT9, 0, 4)>, /* TxD4 */ 73 - <RZA2_PINMUX(PORT9, 1, 4)>; /* RxD4 */ 74 - }; 75 - }; 76 - 77 - Example: Assigning a GPIO: 78 - 79 - leds { 80 - status = "okay"; 81 - compatible = "gpio-leds"; 82 - 83 - led0 { 84 - /* P6_0 */ 85 - gpios = <&pinctrl RZA2_PIN(PORT6, 0) GPIO_ACTIVE_HIGH>; 86 - }; 87 - };
+100
Documentation/devicetree/bindings/pinctrl/renesas,rza2-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/renesas,rza2-pinctrl.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Renesas RZ/A2 combined Pin and GPIO controller 8 + 9 + maintainers: 10 + - Chris Brandt <chris.brandt@renesas.com> 11 + - Geert Uytterhoeven <geert+renesas@glider.be> 12 + 13 + description: 14 + The Renesas SoCs of the RZ/A2 series feature a combined Pin and GPIO 15 + controller. 16 + Pin multiplexing and GPIO configuration is performed on a per-pin basis. 17 + Each port features up to 8 pins, each of them configurable for GPIO function 18 + (port mode) or in alternate function mode. 19 + Up to 8 different alternate function modes exist for each single pin. 20 + 21 + properties: 22 + compatible: 23 + const: "renesas,r7s9210-pinctrl" # RZ/A2M 24 + 25 + reg: 26 + maxItems: 1 27 + 28 + gpio-controller: true 29 + 30 + '#gpio-cells': 31 + const: 2 32 + description: 33 + The first cell contains the global GPIO port index, constructed using the 34 + RZA2_PIN() helper macro in r7s9210-pinctrl.h. 35 + E.g. "RZA2_PIN(PORT6, 0)" for P6_0. 36 + 37 + gpio-ranges: 38 + maxItems: 1 39 + 40 + patternProperties: 41 + "^.*$": 42 + if: 43 + type: object 44 + then: 45 + allOf: 46 + - $ref: pincfg-node.yaml# 47 + - $ref: pinmux-node.yaml# 48 + description: 49 + The child nodes of the pin controller designate pins to be used for 50 + specific peripheral functions or as GPIO. 51 + 52 + A pin multiplexing sub-node describes how to configure a set of 53 + (or a single) pin in some desired alternate function mode. 54 + The values for the pinmux properties are a combination of port name, 55 + pin number and the desired function index. Use the RZA2_PINMUX macro 56 + located in include/dt-bindings/pinctrl/r7s9210-pinctrl.h to easily 57 + define these. 58 + For assigning GPIO pins, use the macro RZA2_PIN also in 59 + to express the desired port pin. 60 + 61 + properties: 62 + phandle: true 63 + 64 + pinmux: 65 + description: 66 + Values are constructed from GPIO port number, pin number, and 67 + alternate function configuration number using the RZA2_PINMUX() 68 + helper macro in r7s9210-pinctrl.h. 69 + 70 + required: 71 + - pinmux 72 + 73 + additionalProperties: false 74 + 75 + required: 76 + - compatible 77 + - reg 78 + - gpio-controller 79 + - '#gpio-cells' 80 + - gpio-ranges 81 + 82 + additionalProperties: false 83 + 84 + examples: 85 + - | 86 + #include <dt-bindings/pinctrl/r7s9210-pinctrl.h> 87 + pinctrl: pin-controller@fcffe000 { 88 + compatible = "renesas,r7s9210-pinctrl"; 89 + reg = <0xfcffe000 0x1000>; 90 + 91 + gpio-controller; 92 + #gpio-cells = <2>; 93 + gpio-ranges = <&pinctrl 0 0 176>; 94 + 95 + /* Serial Console */ 96 + scif4_pins: serial4 { 97 + pinmux = <RZA2_PINMUX(PORT9, 0, 4)>, /* TxD4 */ 98 + <RZA2_PINMUX(PORT9, 1, 4)>; /* RxD4 */ 99 + }; 100 + };
+1 -1
arch/arm/boot/dts/am33xx-l4.dtsi
··· 290 290 am33xx_pinmux: pinmux@800 { 291 291 compatible = "pinctrl-single"; 292 292 reg = <0x800 0x238>; 293 - #pinctrl-cells = <1>; 293 + #pinctrl-cells = <2>; 294 294 pinctrl-single,register-width = <32>; 295 295 pinctrl-single,function-mask = <0x7f>; 296 296 };
+4
drivers/pinctrl/actions/pinctrl-owl.c
··· 35 35 * @pctrldev: pinctrl handle 36 36 * @chip: gpio chip 37 37 * @lock: spinlock to protect registers 38 + * @clk: clock control 38 39 * @soc: reference to soc_data 39 40 * @base: pinctrl register base address 41 + * @irq_chip: IRQ chip information 42 + * @num_irq: number of possible interrupts 43 + * @irq: interrupt numbers 40 44 */ 41 45 struct owl_pinctrl { 42 46 struct device *dev;
+6 -1
drivers/pinctrl/aspeed/pinctrl-aspeed-g6.c
··· 46 46 #define SCU634 0x634 /* Disable GPIO Internal Pull-Down #5 */ 47 47 #define SCU638 0x638 /* Disable GPIO Internal Pull-Down #6 */ 48 48 #define SCU694 0x694 /* Multi-function Pin Control #25 */ 49 + #define SCU69C 0x69C /* Multi-function Pin Control #27 */ 49 50 #define SCUC20 0xC20 /* PCIE configuration Setting Control */ 50 51 51 52 #define ASPEED_G6_NR_PINS 256 ··· 820 819 #define Y23 127 821 820 SIG_EXPR_LIST_DECL_SEMG(Y23, PWM15, PWM15G1, PWM15, SIG_DESC_SET(SCU41C, 31)); 822 821 SIG_EXPR_LIST_DECL_SESG(Y23, THRUOUT3, THRU3, SIG_DESC_SET(SCU4BC, 31)); 823 - PIN_DECL_2(Y23, GPIOP7, PWM15, THRUOUT3); 822 + SIG_EXPR_LIST_DECL_SESG(Y23, HEARTBEAT, HEARTBEAT, SIG_DESC_SET(SCU69C, 31)); 823 + PIN_DECL_3(Y23, GPIOP7, PWM15, THRUOUT3, HEARTBEAT); 824 824 GROUP_DECL(PWM15G1, Y23); 825 825 FUNC_DECL_2(PWM15, PWM15G0, PWM15G1); 826 826 827 827 FUNC_GROUP_DECL(THRU3, AB24, Y23); 828 + FUNC_GROUP_DECL(HEARTBEAT, Y23); 828 829 829 830 #define AA25 128 830 831 SSSF_PIN_DECL(AA25, GPIOQ0, TACH0, SIG_DESC_SET(SCU430, 0)); ··· 1923 1920 ASPEED_PINCTRL_GROUP(GPIU5), 1924 1921 ASPEED_PINCTRL_GROUP(GPIU6), 1925 1922 ASPEED_PINCTRL_GROUP(GPIU7), 1923 + ASPEED_PINCTRL_GROUP(HEARTBEAT), 1926 1924 ASPEED_PINCTRL_GROUP(HVI3C3), 1927 1925 ASPEED_PINCTRL_GROUP(HVI3C4), 1928 1926 ASPEED_PINCTRL_GROUP(I2C1), ··· 2162 2158 ASPEED_PINCTRL_FUNC(GPIU5), 2163 2159 ASPEED_PINCTRL_FUNC(GPIU6), 2164 2160 ASPEED_PINCTRL_FUNC(GPIU7), 2161 + ASPEED_PINCTRL_FUNC(HEARTBEAT), 2165 2162 ASPEED_PINCTRL_FUNC(I2C1), 2166 2163 ASPEED_PINCTRL_FUNC(I2C10), 2167 2164 ASPEED_PINCTRL_FUNC(I2C11),
+22 -3
drivers/pinctrl/aspeed/pinctrl-aspeed.c
··· 76 76 { 77 77 int ret; 78 78 79 + pr_debug("Enabling signal %s for %s\n", expr->signal, 80 + expr->function); 81 + 79 82 ret = aspeed_sig_expr_eval(ctx, expr, true); 80 83 if (ret < 0) 81 84 return ret; ··· 93 90 const struct aspeed_sig_expr *expr) 94 91 { 95 92 int ret; 93 + 94 + pr_debug("Disabling signal %s for %s\n", expr->signal, 95 + expr->function); 96 96 97 97 ret = aspeed_sig_expr_eval(ctx, expr, true); 98 98 if (ret < 0) ··· 235 229 const struct aspeed_sig_expr **funcs; 236 230 const struct aspeed_sig_expr ***prios; 237 231 238 - pr_debug("Muxing pin %d for %s\n", pin, pfunc->name); 232 + pr_debug("Muxing pin %s for %s\n", pdesc->name, pfunc->name); 239 233 240 234 if (!pdesc) 241 235 return -EINVAL; ··· 275 269 ret = aspeed_sig_expr_enable(&pdata->pinmux, expr); 276 270 if (ret) 277 271 return ret; 272 + 273 + pr_debug("Muxed pin %s as %s for %s\n", pdesc->name, expr->signal, 274 + expr->function); 278 275 } 279 276 280 277 return 0; ··· 326 317 if (!prios) 327 318 return -ENXIO; 328 319 320 + pr_debug("Muxing pin %s for GPIO\n", pdesc->name); 321 + 329 322 /* Disable any functions of higher priority than GPIO */ 330 323 while ((funcs = *prios)) { 331 324 if (aspeed_gpio_in_exprs(funcs)) ··· 357 346 * lowest-priority signal type. As such it has no associated 358 347 * expression. 359 348 */ 360 - if (!expr) 349 + if (!expr) { 350 + pr_debug("Muxed pin %s as GPIO\n", pdesc->name); 361 351 return 0; 352 + } 362 353 363 354 /* 364 355 * If GPIO is not the lowest priority signal type, assume there is only 365 356 * one expression defined to enable the GPIO function 366 357 */ 367 - return aspeed_sig_expr_enable(&pdata->pinmux, expr); 358 + ret = aspeed_sig_expr_enable(&pdata->pinmux, expr); 359 + if (ret) 360 + return ret; 361 + 362 + pr_debug("Muxed pin %s as %s\n", pdesc->name, expr->signal); 363 + 364 + return 0; 368 365 } 369 366 370 367 int aspeed_pinctrl_probe(struct platform_device *pdev,
+3 -3
drivers/pinctrl/bcm/pinctrl-bcm281xx.c
··· 59 59 #define BCM281XX_HDMI_PIN_REG_MODE_MASK 0x0010 60 60 #define BCM281XX_HDMI_PIN_REG_MODE_SHIFT 4 61 61 62 - /** 62 + /* 63 63 * bcm281xx_pin_type - types of pin register 64 64 */ 65 65 enum bcm281xx_pin_type { ··· 73 73 static enum bcm281xx_pin_type i2c_pin = BCM281XX_PIN_TYPE_I2C; 74 74 static enum bcm281xx_pin_type hdmi_pin = BCM281XX_PIN_TYPE_HDMI; 75 75 76 - /** 76 + /* 77 77 * bcm281xx_pin_function- define pin function 78 78 */ 79 79 struct bcm281xx_pin_function { ··· 82 82 const unsigned ngroups; 83 83 }; 84 84 85 - /** 85 + /* 86 86 * bcm281xx_pinctrl_data - Broadcom-specific pinctrl data 87 87 * @reg_base - base of pinctrl registers 88 88 */
+1 -1
drivers/pinctrl/bcm/pinctrl-iproc-gpio.c
··· 131 131 * iproc_set_bit - set or clear one bit (corresponding to the GPIO pin) in a 132 132 * Iproc GPIO register 133 133 * 134 - * @iproc_gpio: Iproc GPIO device 134 + * @chip: Iproc GPIO device 135 135 * @reg: register offset 136 136 * @gpio: GPIO pin 137 137 * @set: set or clear
+9 -9
drivers/pinctrl/bcm/pinctrl-nsp-gpio.c
··· 154 154 level &= readl(chip->base + NSP_GPIO_INT_MASK); 155 155 int_bits = level | event; 156 156 157 - for_each_set_bit(bit, &int_bits, gc->ngpio) { 158 - /* 159 - * Clear the interrupt before invoking the 160 - * handler, so we do not leave any window 161 - */ 162 - writel(BIT(bit), chip->base + NSP_GPIO_EVENT); 157 + for_each_set_bit(bit, &int_bits, gc->ngpio) 163 158 generic_handle_irq( 164 159 irq_linear_revmap(gc->irq.domain, bit)); 165 - } 166 160 } 167 161 168 162 return int_bits ? IRQ_HANDLED : IRQ_NONE; ··· 172 178 173 179 trigger_type = irq_get_trigger_type(d->irq); 174 180 if (trigger_type & (IRQ_TYPE_EDGE_FALLING | IRQ_TYPE_EDGE_RISING)) 175 - nsp_set_bit(chip, REG, NSP_GPIO_EVENT, gpio, val); 181 + writel(val, chip->base + NSP_GPIO_EVENT); 176 182 } 177 183 178 184 /* ··· 256 262 257 263 nsp_set_bit(chip, REG, NSP_GPIO_EVENT_INT_POLARITY, gpio, falling); 258 264 nsp_set_bit(chip, REG, NSP_GPIO_INT_POLARITY, gpio, level_low); 265 + 266 + if (type & IRQ_TYPE_EDGE_BOTH) 267 + irq_set_handler_locked(d, handle_edge_irq); 268 + else 269 + irq_set_handler_locked(d, handle_level_irq); 270 + 259 271 raw_spin_unlock_irqrestore(&chip->lock, flags); 260 272 261 273 dev_dbg(chip->dev, "gpio:%u level_low:%s falling:%s\n", gpio, ··· 691 691 girq->num_parents = 0; 692 692 girq->parents = NULL; 693 693 girq->default_type = IRQ_TYPE_NONE; 694 - girq->handler = handle_simple_irq; 694 + girq->handler = handle_bad_irq; 695 695 } 696 696 697 697 ret = devm_gpiochip_add_data(dev, gc, chip);
+27 -6
drivers/pinctrl/core.c
··· 27 27 #include <linux/pinctrl/machine.h> 28 28 29 29 #ifdef CONFIG_GPIOLIB 30 + #include "../gpio/gpiolib.h" 30 31 #include <asm-generic/gpio.h> 31 32 #endif 32 33 ··· 162 161 /** 163 162 * pin_get_name_from_id() - look up a pin name from a pin id 164 163 * @pctldev: the pin control device to lookup the pin on 165 - * @name: the name of the pin to look up 164 + * @pin: pin number/id to look up 166 165 */ 167 166 const char *pin_get_name(struct pinctrl_dev *pctldev, const unsigned pin) 168 167 { ··· 578 577 /** 579 578 * pinctrl_generic_get_group() - returns a pin group based on the number 580 579 * @pctldev: pin controller device 581 - * @gselector: group number 580 + * @selector: group number 582 581 */ 583 582 struct group_desc *pinctrl_generic_get_group(struct pinctrl_dev *pctldev, 584 583 unsigned int selector) ··· 1330 1329 } 1331 1330 1332 1331 /** 1333 - * struct devm_pinctrl_get() - Resource managed pinctrl_get() 1332 + * devm_pinctrl_get() - Resource managed pinctrl_get() 1334 1333 * @dev: the device to obtain the handle for 1335 1334 * 1336 1335 * If there is a need to explicitly destroy the returned struct pinctrl, ··· 1452 1451 1453 1452 /** 1454 1453 * pinctrl_unregister_mappings() - unregister a set of pin controller mappings 1455 - * @maps: the pincontrol mappings table passed to pinctrl_register_mappings() 1454 + * @map: the pincontrol mappings table passed to pinctrl_register_mappings() 1456 1455 * when registering the mappings. 1457 1456 */ 1458 1457 void pinctrl_unregister_mappings(const struct pinctrl_map *map) ··· 1602 1601 struct pinctrl_dev *pctldev = s->private; 1603 1602 const struct pinctrl_ops *ops = pctldev->desc->pctlops; 1604 1603 unsigned i, pin; 1604 + struct pinctrl_gpio_range *range; 1605 + unsigned int gpio_num; 1606 + struct gpio_chip *chip; 1605 1607 1606 1608 seq_printf(s, "registered pins: %d\n", pctldev->desc->npins); 1607 1609 ··· 1621 1617 continue; 1622 1618 1623 1619 seq_printf(s, "pin %d (%s) ", pin, desc->name); 1620 + 1621 + #ifdef CONFIG_GPIOLIB 1622 + gpio_num = 0; 1623 + list_for_each_entry(range, &pctldev->gpio_ranges, node) { 1624 + if ((pin >= range->pin_base) && 1625 + (pin < (range->pin_base + range->npins))) { 1626 + gpio_num = range->base + (pin - range->pin_base); 1627 + break; 1628 + } 1629 + } 1630 + chip = gpio_to_chip(gpio_num); 1631 + if (chip && chip->gpiodev && chip->gpiodev->base) 1632 + seq_printf(s, "%u:%s ", gpio_num - 1633 + chip->gpiodev->base, chip->label); 1634 + else 1635 + seq_puts(s, "0:? "); 1636 + #endif 1624 1637 1625 1638 /* Driver-specific info per pin */ 1626 1639 if (ops->pin_dbg_show) ··· 2247 2226 * @dev: parent device for this pin controller 2248 2227 * @pctldesc: descriptor for this pin controller 2249 2228 * @driver_data: private pin controller data for this pin controller 2229 + * @pctldev: pin controller device 2250 2230 * 2251 - * Returns an error pointer if pincontrol register failed. Otherwise 2252 - * it returns valid pinctrl handle. 2231 + * Returns zero on success or an error number on failure. 2253 2232 * 2254 2233 * The pinctrl device will be automatically released when the device is unbound. 2255 2234 */
+3 -2
drivers/pinctrl/devicetree.c
··· 17 17 * struct pinctrl_dt_map - mapping table chunk parsed from device tree 18 18 * @node: list node for struct pinctrl's @dt_maps field 19 19 * @pctldev: the pin controller that allocated this struct, and will free it 20 - * @maps: the mapping table entries 20 + * @map: the mapping table entries 21 + * @num_maps: number of mapping table entries 21 22 */ 22 23 struct pinctrl_dt_map { 23 24 struct list_head node; ··· 398 397 * @np: pointer to device node with the property 399 398 * @list_name: property that contains the list 400 399 * @index: index within the list 401 - * @out_arts: entries in the list pointed by index 400 + * @out_args: entries in the list pointed by index 402 401 * 403 402 * Finds the selected element in a pinctrl array consisting of an index 404 403 * within the controller and a number of u32 entries specified for each
+7 -7
drivers/pinctrl/freescale/Kconfig
··· 124 124 Say Y here to enable the imx7ulp pinctrl driver 125 125 126 126 config PINCTRL_IMX8MM 127 - bool "IMX8MM pinctrl driver" 127 + tristate "IMX8MM pinctrl driver" 128 128 depends on ARCH_MXC 129 129 select PINCTRL_IMX 130 130 help 131 131 Say Y here to enable the imx8mm pinctrl driver 132 132 133 133 config PINCTRL_IMX8MN 134 - bool "IMX8MN pinctrl driver" 134 + tristate "IMX8MN pinctrl driver" 135 135 depends on ARCH_MXC 136 136 select PINCTRL_IMX 137 137 help 138 138 Say Y here to enable the imx8mn pinctrl driver 139 139 140 140 config PINCTRL_IMX8MP 141 - bool "IMX8MP pinctrl driver" 141 + tristate "IMX8MP pinctrl driver" 142 142 depends on ARCH_MXC 143 143 select PINCTRL_IMX 144 144 help 145 145 Say Y here to enable the imx8mp pinctrl driver 146 146 147 147 config PINCTRL_IMX8MQ 148 - bool "IMX8MQ pinctrl driver" 148 + tristate "IMX8MQ pinctrl driver" 149 149 depends on ARCH_MXC 150 150 select PINCTRL_IMX 151 151 help 152 152 Say Y here to enable the imx8mq pinctrl driver 153 153 154 154 config PINCTRL_IMX8QM 155 - bool "IMX8QM pinctrl driver" 155 + tristate "IMX8QM pinctrl driver" 156 156 depends on IMX_SCU && ARCH_MXC && ARM64 157 157 select PINCTRL_IMX_SCU 158 158 help 159 159 Say Y here to enable the imx8qm pinctrl driver 160 160 161 161 config PINCTRL_IMX8QXP 162 - bool "IMX8QXP pinctrl driver" 162 + tristate "IMX8QXP pinctrl driver" 163 163 depends on IMX_SCU && ARCH_MXC && ARM64 164 164 select PINCTRL_IMX_SCU 165 165 help 166 166 Say Y here to enable the imx8qxp pinctrl driver 167 167 168 168 config PINCTRL_IMX8DXL 169 - bool "IMX8DXL pinctrl driver" 169 + tristate "IMX8DXL pinctrl driver" 170 170 depends on IMX_SCU && ARCH_MXC && ARM64 171 171 select PINCTRL_IMX_SCU 172 172 help
+2
drivers/pinctrl/freescale/pinctrl-imx.c
··· 877 877 878 878 return pinctrl_enable(ipctl->pctl); 879 879 } 880 + EXPORT_SYMBOL_GPL(imx_pinctrl_probe); 880 881 881 882 static int __maybe_unused imx_pinctrl_suspend(struct device *dev) 882 883 { ··· 897 896 SET_LATE_SYSTEM_SLEEP_PM_OPS(imx_pinctrl_suspend, 898 897 imx_pinctrl_resume) 899 898 }; 899 + EXPORT_SYMBOL_GPL(imx_pinctrl_pm_ops);
+5
drivers/pinctrl/freescale/pinctrl-imx8dxl.c
··· 165 165 { .compatible = "fsl,imx8dxl-iomuxc", }, 166 166 { /* sentinel */ } 167 167 }; 168 + MODULE_DEVICE_TABLE(of, imx8dxl_pinctrl_of_match); 168 169 169 170 static int imx8dxl_pinctrl_probe(struct platform_device *pdev) 170 171 { ··· 192 191 return platform_driver_register(&imx8dxl_pinctrl_driver); 193 192 } 194 193 arch_initcall(imx8dxl_pinctrl_init); 194 + 195 + MODULE_AUTHOR("Anson Huang <Anson.Huang@nxp.com>"); 196 + MODULE_DESCRIPTION("NXP i.MX8DXL pinctrl driver"); 197 + MODULE_LICENSE("GPL v2");
+6
drivers/pinctrl/freescale/pinctrl-imx8mm.c
··· 5 5 6 6 #include <linux/err.h> 7 7 #include <linux/init.h> 8 + #include <linux/module.h> 8 9 #include <linux/of_device.h> 9 10 #include <linux/pinctrl/pinctrl.h> 10 11 #include <linux/platform_device.h> ··· 327 326 { .compatible = "fsl,imx8mm-iomuxc", .data = &imx8mm_pinctrl_info, }, 328 327 { /* sentinel */ } 329 328 }; 329 + MODULE_DEVICE_TABLE(of, imx8mm_pinctrl_of_match); 330 330 331 331 static int imx8mm_pinctrl_probe(struct platform_device *pdev) 332 332 { ··· 348 346 return platform_driver_register(&imx8mm_pinctrl_driver); 349 347 } 350 348 arch_initcall(imx8mm_pinctrl_init); 349 + 350 + MODULE_AUTHOR("Bai Ping <ping.bai@nxp.com>"); 351 + MODULE_DESCRIPTION("NXP i.MX8MM pinctrl driver"); 352 + MODULE_LICENSE("GPL v2");
+6
drivers/pinctrl/freescale/pinctrl-imx8mn.c
··· 5 5 6 6 #include <linux/err.h> 7 7 #include <linux/init.h> 8 + #include <linux/module.h> 8 9 #include <linux/of.h> 9 10 #include <linux/pinctrl/pinctrl.h> 10 11 #include <linux/platform_device.h> ··· 327 326 { .compatible = "fsl,imx8mn-iomuxc", .data = &imx8mn_pinctrl_info, }, 328 327 { /* sentinel */ } 329 328 }; 329 + MODULE_DEVICE_TABLE(of, imx8mn_pinctrl_of_match); 330 330 331 331 static int imx8mn_pinctrl_probe(struct platform_device *pdev) 332 332 { ··· 348 346 return platform_driver_register(&imx8mn_pinctrl_driver); 349 347 } 350 348 arch_initcall(imx8mn_pinctrl_init); 349 + 350 + MODULE_AUTHOR("Anson Huang <Anson.Huang@nxp.com>"); 351 + MODULE_DESCRIPTION("NXP i.MX8MN pinctrl driver"); 352 + MODULE_LICENSE("GPL v2");
+6
drivers/pinctrl/freescale/pinctrl-imx8mp.c
··· 5 5 6 6 #include <linux/err.h> 7 7 #include <linux/init.h> 8 + #include <linux/module.h> 8 9 #include <linux/of.h> 9 10 #include <linux/pinctrl/pinctrl.h> 10 11 #include <linux/platform_device.h> ··· 325 324 { .compatible = "fsl,imx8mp-iomuxc", .data = &imx8mp_pinctrl_info, }, 326 325 { /* sentinel */ } 327 326 }; 327 + MODULE_DEVICE_TABLE(of, imx8mp_pinctrl_of_match); 328 328 329 329 static int imx8mp_pinctrl_probe(struct platform_device *pdev) 330 330 { ··· 345 343 return platform_driver_register(&imx8mp_pinctrl_driver); 346 344 } 347 345 arch_initcall(imx8mp_pinctrl_init); 346 + 347 + MODULE_AUTHOR("Anson Huang <Anson.Huang@nxp.com>"); 348 + MODULE_DESCRIPTION("NXP i.MX8MP pinctrl driver"); 349 + MODULE_LICENSE("GPL v2");
+6
drivers/pinctrl/freescale/pinctrl-imx8mq.c
··· 8 8 #include <linux/err.h> 9 9 #include <linux/init.h> 10 10 #include <linux/io.h> 11 + #include <linux/module.h> 11 12 #include <linux/of.h> 12 13 #include <linux/of_device.h> 13 14 #include <linux/pinctrl/pinctrl.h> ··· 330 329 { .compatible = "fsl,imx8mq-iomuxc", .data = &imx8mq_pinctrl_info, }, 331 330 { /* sentinel */ } 332 331 }; 332 + MODULE_DEVICE_TABLE(of, imx8mq_pinctrl_of_match); 333 333 334 334 static int imx8mq_pinctrl_probe(struct platform_device *pdev) 335 335 { ··· 352 350 return platform_driver_register(&imx8mq_pinctrl_driver); 353 351 } 354 352 arch_initcall(imx8mq_pinctrl_init); 353 + 354 + MODULE_AUTHOR("Lucas Stach <l.stach@pengutronix.de>"); 355 + MODULE_DESCRIPTION("NXP i.MX8MQ pinctrl driver"); 356 + MODULE_LICENSE("GPL v2");
+5
drivers/pinctrl/freescale/pinctrl-imx8qm.c
··· 298 298 { .compatible = "fsl,imx8qm-iomuxc", }, 299 299 { /* sentinel */ } 300 300 }; 301 + MODULE_DEVICE_TABLE(of, imx8qm_pinctrl_of_match); 301 302 302 303 static int imx8qm_pinctrl_probe(struct platform_device *pdev) 303 304 { ··· 325 324 return platform_driver_register(&imx8qm_pinctrl_driver); 326 325 } 327 326 arch_initcall(imx8qm_pinctrl_init); 327 + 328 + MODULE_AUTHOR("Aisheng Dong <aisheng.dong@nxp.com>"); 329 + MODULE_DESCRIPTION("NXP i.MX8QM pinctrl driver"); 330 + MODULE_LICENSE("GPL v2");
+5
drivers/pinctrl/freescale/pinctrl-imx8qxp.c
··· 204 204 { .compatible = "fsl,imx8qxp-iomuxc", }, 205 205 { /* sentinel */ } 206 206 }; 207 + MODULE_DEVICE_TABLE(of, imx8qxp_pinctrl_of_match); 207 208 208 209 static int imx8qxp_pinctrl_probe(struct platform_device *pdev) 209 210 { ··· 231 230 return platform_driver_register(&imx8qxp_pinctrl_driver); 232 231 } 233 232 arch_initcall(imx8qxp_pinctrl_init); 233 + 234 + MODULE_AUTHOR("Aisheng Dong <aisheng.dong@nxp.com>"); 235 + MODULE_DESCRIPTION("NXP i.MX8QXP pinctrl driver"); 236 + MODULE_LICENSE("GPL v2");
+4
drivers/pinctrl/freescale/pinctrl-scu.c
··· 41 41 { 42 42 return imx_scu_get_handle(&pinctrl_ipc_handle); 43 43 } 44 + EXPORT_SYMBOL_GPL(imx_pinctrl_sc_ipc_init); 44 45 45 46 int imx_pinconf_get_scu(struct pinctrl_dev *pctldev, unsigned pin_id, 46 47 unsigned long *config) ··· 67 66 68 67 return 0; 69 68 } 69 + EXPORT_SYMBOL_GPL(imx_pinconf_get_scu); 70 70 71 71 int imx_pinconf_set_scu(struct pinctrl_dev *pctldev, unsigned pin_id, 72 72 unsigned long *configs, unsigned num_configs) ··· 103 101 104 102 return ret; 105 103 } 104 + EXPORT_SYMBOL_GPL(imx_pinconf_set_scu); 106 105 107 106 void imx_pinctrl_parse_pin_scu(struct imx_pinctrl *ipctl, 108 107 unsigned int *pin_id, struct imx_pin *pin, ··· 122 119 dev_dbg(ipctl->dev, "%s: 0x%x 0x%08lx", info->pins[pin->pin].name, 123 120 pin_scu->mux_mode, pin_scu->config); 124 121 } 122 + EXPORT_SYMBOL_GPL(imx_pinctrl_parse_pin_scu);
+8
drivers/pinctrl/intel/Kconfig
··· 95 95 This pinctrl driver provides an interface that allows configuring 96 96 of Intel Denverton SoC pins and using them as GPIOs. 97 97 98 + config PINCTRL_EMMITSBURG 99 + tristate "Intel Emmitsburg pinctrl and GPIO driver" 100 + depends on ACPI 101 + select PINCTRL_INTEL 102 + help 103 + This pinctrl driver provides an interface that allows configuring 104 + of Intel Emmitsburg pins and using them as GPIOs. 105 + 98 106 config PINCTRL_GEMINILAKE 99 107 tristate "Intel Gemini Lake SoC pinctrl and GPIO driver" 100 108 depends on ACPI
+1
drivers/pinctrl/intel/Makefile
··· 10 10 obj-$(CONFIG_PINCTRL_CANNONLAKE) += pinctrl-cannonlake.o 11 11 obj-$(CONFIG_PINCTRL_CEDARFORK) += pinctrl-cedarfork.o 12 12 obj-$(CONFIG_PINCTRL_DENVERTON) += pinctrl-denverton.o 13 + obj-$(CONFIG_PINCTRL_EMMITSBURG) += pinctrl-emmitsburg.o 13 14 obj-$(CONFIG_PINCTRL_GEMINILAKE) += pinctrl-geminilake.o 14 15 obj-$(CONFIG_PINCTRL_ICELAKE) += pinctrl-icelake.o 15 16 obj-$(CONFIG_PINCTRL_JASPERLAKE) += pinctrl-jasperlake.o
+3 -4
drivers/pinctrl/intel/pinctrl-baytrail.c
··· 1372 1372 switch (irqd_get_trigger_type(d)) { 1373 1373 case IRQ_TYPE_LEVEL_HIGH: 1374 1374 value |= BYT_TRIG_LVL; 1375 - /* fall through */ 1375 + fallthrough; 1376 1376 case IRQ_TYPE_EDGE_RISING: 1377 1377 value |= BYT_TRIG_POS; 1378 1378 break; 1379 1379 case IRQ_TYPE_LEVEL_LOW: 1380 1380 value |= BYT_TRIG_LVL; 1381 - /* fall through */ 1381 + fallthrough; 1382 1382 case IRQ_TYPE_EDGE_FALLING: 1383 1383 value |= BYT_TRIG_NEG; 1384 1384 break; ··· 1796 1796 .driver = { 1797 1797 .name = "byt_gpio", 1798 1798 .pm = &byt_gpio_pm_ops, 1799 + .acpi_match_table = byt_gpio_acpi_match, 1799 1800 .suppress_bind_attrs = true, 1800 - 1801 - .acpi_match_table = ACPI_PTR(byt_gpio_acpi_match), 1802 1801 }, 1803 1802 }; 1804 1803
+213 -207
drivers/pinctrl/intel/pinctrl-cherryview.c
··· 2 2 /* 3 3 * Cherryview/Braswell pinctrl driver 4 4 * 5 - * Copyright (C) 2014, Intel Corporation 5 + * Copyright (C) 2014, 2020 Intel Corporation 6 6 * Author: Mika Westerberg <mika.westerberg@linux.intel.com> 7 7 * 8 8 * This driver is based on the original Cherryview GPIO driver by ··· 67 67 #define CHV_PADCTRL1_INTWAKECFG_BOTH 3 68 68 #define CHV_PADCTRL1_INTWAKECFG_LEVEL 4 69 69 70 - /** 71 - * struct chv_community - A community specific configuration 72 - * @uid: ACPI _UID used to match the community 73 - * @pins: All pins in this community 74 - * @npins: Number of pins 75 - * @groups: All groups in this community 76 - * @ngroups: Number of groups 77 - * @functions: All functions in this community 78 - * @nfunctions: Number of functions 79 - * @gpps: Pad groups 80 - * @ngpps: Number of pad groups in this community 81 - * @nirqs: Total number of IRQs this community can generate 82 - * @acpi_space_id: An address space ID for ACPI OpRegion handler 83 - */ 84 - struct chv_community { 85 - const char *uid; 86 - const struct pinctrl_pin_desc *pins; 87 - size_t npins; 88 - const struct intel_pingroup *groups; 89 - size_t ngroups; 90 - const struct intel_function *functions; 91 - size_t nfunctions; 92 - const struct intel_padgroup *gpps; 93 - size_t ngpps; 94 - size_t nirqs; 95 - acpi_adr_space_type acpi_space_id; 96 - }; 97 - 98 - struct chv_pin_context { 70 + struct intel_pad_context { 99 71 u32 padctrl0; 100 72 u32 padctrl1; 101 73 }; ··· 79 107 * @pctldev: Pointer to the pin controller device 80 108 * @chip: GPIO chip in this pin controller 81 109 * @irqchip: IRQ chip in this pin controller 82 - * @regs: MMIO registers 110 + * @soc: Community specific pin configuration data 111 + * @communities: All communities in this pin controller 112 + * @ncommunities: Number of communities in this pin controller 113 + * @context: Configuration saved over system sleep 83 114 * @irq: Our parent irq 84 - * @intr_lines: Stores mapping between 16 HW interrupt wires and GPIO 85 - * offset (in GPIO number space) 86 - * @community: Community this pinctrl instance represents 115 + * @intr_lines: Mapping between 16 HW interrupt wires and GPIO offset (in GPIO number space) 87 116 * @saved_intmask: Interrupt mask saved for system sleep 88 - * @saved_pin_context: Pointer to a context of the pins saved for system sleep 89 117 * 90 118 * The first group in @groups is expected to contain all pins that can be 91 119 * used as GPIOs. ··· 96 124 struct pinctrl_dev *pctldev; 97 125 struct gpio_chip chip; 98 126 struct irq_chip irqchip; 99 - void __iomem *regs; 100 - unsigned int irq; 127 + const struct intel_pinctrl_soc_data *soc; 128 + struct intel_community *communities; 129 + size_t ncommunities; 130 + struct intel_pinctrl_context context; 131 + int irq; 132 + 101 133 unsigned int intr_lines[16]; 102 - const struct chv_community *community; 103 134 u32 saved_intmask; 104 - struct chv_pin_context *saved_pin_context; 105 135 }; 106 136 107 137 #define PINMODE_INVERT_OE BIT(15) 108 138 109 139 #define PINMODE(m, i) ((m) | ((i) * PINMODE_INVERT_OE)) 110 140 111 - #define CHV_GPP(start, end) \ 141 + #define CHV_GPP(start, end) \ 112 142 { \ 113 143 .base = (start), \ 114 144 .size = (end) - (start) + 1, \ 145 + } 146 + 147 + #define CHV_COMMUNITY(g, i, a) \ 148 + { \ 149 + .gpps = (g), \ 150 + .ngpps = ARRAY_SIZE(g), \ 151 + .nirqs = (i), \ 152 + .acpi_space_id = (a), \ 115 153 } 116 154 117 155 static const struct pinctrl_pin_desc southwest_pins[] = { ··· 285 303 CHV_GPP(90, 97), 286 304 }; 287 305 288 - static const struct chv_community southwest_community = { 306 + /* 307 + * Southwest community can generate GPIO interrupts only for the first 8 308 + * interrupts. The upper half (8-15) can only be used to trigger GPEs. 309 + */ 310 + static const struct intel_community southwest_communities[] = { 311 + CHV_COMMUNITY(southwest_gpps, 8, 0x91), 312 + }; 313 + 314 + static const struct intel_pinctrl_soc_data southwest_soc_data = { 289 315 .uid = "1", 290 316 .pins = southwest_pins, 291 317 .npins = ARRAY_SIZE(southwest_pins), ··· 301 311 .ngroups = ARRAY_SIZE(southwest_groups), 302 312 .functions = southwest_functions, 303 313 .nfunctions = ARRAY_SIZE(southwest_functions), 304 - .gpps = southwest_gpps, 305 - .ngpps = ARRAY_SIZE(southwest_gpps), 306 - /* 307 - * Southwest community can generate GPIO interrupts only for the 308 - * first 8 interrupts. The upper half (8-15) can only be used to 309 - * trigger GPEs. 310 - */ 311 - .nirqs = 8, 312 - .acpi_space_id = 0x91, 314 + .communities = southwest_communities, 315 + .ncommunities = ARRAY_SIZE(southwest_communities), 313 316 }; 314 317 315 318 static const struct pinctrl_pin_desc north_pins[] = { ··· 379 396 CHV_GPP(60, 72), 380 397 }; 381 398 382 - static const struct chv_community north_community = { 399 + /* 400 + * North community can generate GPIO interrupts only for the first 8 401 + * interrupts. The upper half (8-15) can only be used to trigger GPEs. 402 + */ 403 + static const struct intel_community north_communities[] = { 404 + CHV_COMMUNITY(north_gpps, 8, 0x92), 405 + }; 406 + 407 + static const struct intel_pinctrl_soc_data north_soc_data = { 383 408 .uid = "2", 384 409 .pins = north_pins, 385 410 .npins = ARRAY_SIZE(north_pins), 386 - .gpps = north_gpps, 387 - .ngpps = ARRAY_SIZE(north_gpps), 388 - /* 389 - * North community can generate GPIO interrupts only for the first 390 - * 8 interrupts. The upper half (8-15) can only be used to trigger 391 - * GPEs. 392 - */ 393 - .nirqs = 8, 394 - .acpi_space_id = 0x92, 411 + .communities = north_communities, 412 + .ncommunities = ARRAY_SIZE(north_communities), 395 413 }; 396 414 397 415 static const struct pinctrl_pin_desc east_pins[] = { ··· 428 444 CHV_GPP(15, 26), 429 445 }; 430 446 431 - static const struct chv_community east_community = { 447 + static const struct intel_community east_communities[] = { 448 + CHV_COMMUNITY(east_gpps, 16, 0x93), 449 + }; 450 + 451 + static const struct intel_pinctrl_soc_data east_soc_data = { 432 452 .uid = "3", 433 453 .pins = east_pins, 434 454 .npins = ARRAY_SIZE(east_pins), 435 - .gpps = east_gpps, 436 - .ngpps = ARRAY_SIZE(east_gpps), 437 - .nirqs = 16, 438 - .acpi_space_id = 0x93, 455 + .communities = east_communities, 456 + .ncommunities = ARRAY_SIZE(east_communities), 439 457 }; 440 458 441 459 static const struct pinctrl_pin_desc southeast_pins[] = { ··· 552 566 CHV_GPP(75, 85), 553 567 }; 554 568 555 - static const struct chv_community southeast_community = { 569 + static const struct intel_community southeast_communities[] = { 570 + CHV_COMMUNITY(southeast_gpps, 16, 0x94), 571 + }; 572 + 573 + static const struct intel_pinctrl_soc_data southeast_soc_data = { 556 574 .uid = "4", 557 575 .pins = southeast_pins, 558 576 .npins = ARRAY_SIZE(southeast_pins), ··· 564 574 .ngroups = ARRAY_SIZE(southeast_groups), 565 575 .functions = southeast_functions, 566 576 .nfunctions = ARRAY_SIZE(southeast_functions), 567 - .gpps = southeast_gpps, 568 - .ngpps = ARRAY_SIZE(southeast_gpps), 569 - .nirqs = 16, 570 - .acpi_space_id = 0x94, 577 + .communities = southeast_communities, 578 + .ncommunities = ARRAY_SIZE(southeast_communities), 571 579 }; 572 580 573 - static const struct chv_community *chv_communities[] = { 574 - &southwest_community, 575 - &north_community, 576 - &east_community, 577 - &southeast_community, 581 + static const struct intel_pinctrl_soc_data *chv_soc_data[] = { 582 + &southwest_soc_data, 583 + &north_soc_data, 584 + &east_soc_data, 585 + &southeast_soc_data, 586 + NULL 578 587 }; 579 588 580 589 /* ··· 587 598 */ 588 599 static DEFINE_RAW_SPINLOCK(chv_lock); 589 600 601 + static u32 chv_pctrl_readl(struct chv_pinctrl *pctrl, unsigned int offset) 602 + { 603 + const struct intel_community *community = &pctrl->communities[0]; 604 + 605 + return readl(community->regs + offset); 606 + } 607 + 608 + static void chv_pctrl_writel(struct chv_pinctrl *pctrl, unsigned int offset, u32 value) 609 + { 610 + const struct intel_community *community = &pctrl->communities[0]; 611 + void __iomem *reg = community->regs + offset; 612 + 613 + /* Write and simple read back to confirm the bus transferring done */ 614 + writel(value, reg); 615 + readl(reg); 616 + } 617 + 590 618 static void __iomem *chv_padreg(struct chv_pinctrl *pctrl, unsigned int offset, 591 619 unsigned int reg) 592 620 { 621 + const struct intel_community *community = &pctrl->communities[0]; 593 622 unsigned int family_no = offset / MAX_FAMILY_PAD_GPIO_NO; 594 623 unsigned int pad_no = offset % MAX_FAMILY_PAD_GPIO_NO; 595 624 596 - offset = FAMILY_PAD_REGS_OFF + FAMILY_PAD_REGS_SIZE * family_no + 597 - GPIO_REGS_SIZE * pad_no; 625 + offset = FAMILY_PAD_REGS_SIZE * family_no + GPIO_REGS_SIZE * pad_no; 598 626 599 - return pctrl->regs + offset + reg; 627 + return community->pad_regs + offset + reg; 600 628 } 601 629 602 - static void chv_writel(u32 value, void __iomem *reg) 630 + static u32 chv_readl(struct chv_pinctrl *pctrl, unsigned int pin, unsigned int offset) 603 631 { 632 + return readl(chv_padreg(pctrl, pin, offset)); 633 + } 634 + 635 + static void chv_writel(struct chv_pinctrl *pctrl, unsigned int pin, unsigned int offset, u32 value) 636 + { 637 + void __iomem *reg = chv_padreg(pctrl, pin, offset); 638 + 639 + /* Write and simple read back to confirm the bus transferring done */ 604 640 writel(value, reg); 605 - /* simple readback to confirm the bus transferring done */ 606 641 readl(reg); 607 642 } 608 643 609 644 /* When Pad Cfg is locked, driver can only change GPIOTXState or GPIORXState */ 610 645 static bool chv_pad_locked(struct chv_pinctrl *pctrl, unsigned int offset) 611 646 { 612 - void __iomem *reg; 613 - 614 - reg = chv_padreg(pctrl, offset, CHV_PADCTRL1); 615 - return readl(reg) & CHV_PADCTRL1_CFGLOCK; 647 + return chv_readl(pctrl, offset, CHV_PADCTRL1) & CHV_PADCTRL1_CFGLOCK; 616 648 } 617 649 618 650 static int chv_get_groups_count(struct pinctrl_dev *pctldev) 619 651 { 620 652 struct chv_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); 621 653 622 - return pctrl->community->ngroups; 654 + return pctrl->soc->ngroups; 623 655 } 624 656 625 657 static const char *chv_get_group_name(struct pinctrl_dev *pctldev, ··· 648 638 { 649 639 struct chv_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); 650 640 651 - return pctrl->community->groups[group].name; 641 + return pctrl->soc->groups[group].name; 652 642 } 653 643 654 644 static int chv_get_group_pins(struct pinctrl_dev *pctldev, unsigned int group, ··· 656 646 { 657 647 struct chv_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); 658 648 659 - *pins = pctrl->community->groups[group].pins; 660 - *npins = pctrl->community->groups[group].npins; 649 + *pins = pctrl->soc->groups[group].pins; 650 + *npins = pctrl->soc->groups[group].npins; 661 651 return 0; 662 652 } 663 653 ··· 671 661 672 662 raw_spin_lock_irqsave(&chv_lock, flags); 673 663 674 - ctrl0 = readl(chv_padreg(pctrl, offset, CHV_PADCTRL0)); 675 - ctrl1 = readl(chv_padreg(pctrl, offset, CHV_PADCTRL1)); 664 + ctrl0 = chv_readl(pctrl, offset, CHV_PADCTRL0); 665 + ctrl1 = chv_readl(pctrl, offset, CHV_PADCTRL1); 676 666 locked = chv_pad_locked(pctrl, offset); 677 667 678 668 raw_spin_unlock_irqrestore(&chv_lock, flags); ··· 705 695 { 706 696 struct chv_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); 707 697 708 - return pctrl->community->nfunctions; 698 + return pctrl->soc->nfunctions; 709 699 } 710 700 711 701 static const char *chv_get_function_name(struct pinctrl_dev *pctldev, ··· 713 703 { 714 704 struct chv_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); 715 705 716 - return pctrl->community->functions[function].name; 706 + return pctrl->soc->functions[function].name; 717 707 } 718 708 719 709 static int chv_get_function_groups(struct pinctrl_dev *pctldev, ··· 723 713 { 724 714 struct chv_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); 725 715 726 - *groups = pctrl->community->functions[function].groups; 727 - *ngroups = pctrl->community->functions[function].ngroups; 716 + *groups = pctrl->soc->functions[function].groups; 717 + *ngroups = pctrl->soc->functions[function].ngroups; 728 718 return 0; 729 719 } 730 720 ··· 736 726 unsigned long flags; 737 727 int i; 738 728 739 - grp = &pctrl->community->groups[group]; 729 + grp = &pctrl->soc->groups[group]; 740 730 741 731 raw_spin_lock_irqsave(&chv_lock, flags); 742 732 ··· 752 742 753 743 for (i = 0; i < grp->npins; i++) { 754 744 int pin = grp->pins[i]; 755 - void __iomem *reg; 756 745 unsigned int mode; 757 746 bool invert_oe; 758 747 u32 value; ··· 766 757 invert_oe = mode & PINMODE_INVERT_OE; 767 758 mode &= ~PINMODE_INVERT_OE; 768 759 769 - reg = chv_padreg(pctrl, pin, CHV_PADCTRL0); 770 - value = readl(reg); 760 + value = chv_readl(pctrl, pin, CHV_PADCTRL0); 771 761 /* Disable GPIO mode */ 772 762 value &= ~CHV_PADCTRL0_GPIOEN; 773 763 /* Set to desired mode */ 774 764 value &= ~CHV_PADCTRL0_PMODE_MASK; 775 765 value |= mode << CHV_PADCTRL0_PMODE_SHIFT; 776 - chv_writel(value, reg); 766 + chv_writel(pctrl, pin, CHV_PADCTRL0, value); 777 767 778 768 /* Update for invert_oe */ 779 - reg = chv_padreg(pctrl, pin, CHV_PADCTRL1); 780 - value = readl(reg) & ~CHV_PADCTRL1_INVRXTX_MASK; 769 + value = chv_readl(pctrl, pin, CHV_PADCTRL1) & ~CHV_PADCTRL1_INVRXTX_MASK; 781 770 if (invert_oe) 782 771 value |= CHV_PADCTRL1_INVRXTX_TXENABLE; 783 - chv_writel(value, reg); 772 + chv_writel(pctrl, pin, CHV_PADCTRL1, value); 784 773 785 774 dev_dbg(pctrl->dev, "configured pin %u mode %u OE %sinverted\n", 786 775 pin, mode, invert_oe ? "" : "not "); ··· 792 785 static void chv_gpio_clear_triggering(struct chv_pinctrl *pctrl, 793 786 unsigned int offset) 794 787 { 795 - void __iomem *reg; 796 788 u32 value; 797 789 798 - reg = chv_padreg(pctrl, offset, CHV_PADCTRL1); 799 - value = readl(reg); 790 + value = chv_readl(pctrl, offset, CHV_PADCTRL1); 800 791 value &= ~CHV_PADCTRL1_INTWAKECFG_MASK; 801 792 value &= ~CHV_PADCTRL1_INVRXTX_MASK; 802 - chv_writel(value, reg); 793 + chv_writel(pctrl, offset, CHV_PADCTRL1, value); 803 794 } 804 795 805 796 static int chv_gpio_request_enable(struct pinctrl_dev *pctldev, ··· 806 801 { 807 802 struct chv_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); 808 803 unsigned long flags; 809 - void __iomem *reg; 810 804 u32 value; 811 805 812 806 raw_spin_lock_irqsave(&chv_lock, flags); 813 807 814 808 if (chv_pad_locked(pctrl, offset)) { 815 - value = readl(chv_padreg(pctrl, offset, CHV_PADCTRL0)); 809 + value = chv_readl(pctrl, offset, CHV_PADCTRL0); 816 810 if (!(value & CHV_PADCTRL0_GPIOEN)) { 817 811 /* Locked so cannot enable */ 818 812 raw_spin_unlock_irqrestore(&chv_lock, flags); ··· 831 827 /* Disable interrupt generation */ 832 828 chv_gpio_clear_triggering(pctrl, offset); 833 829 834 - reg = chv_padreg(pctrl, offset, CHV_PADCTRL0); 835 - value = readl(reg); 830 + value = chv_readl(pctrl, offset, CHV_PADCTRL0); 836 831 837 832 /* 838 833 * If the pin is in HiZ mode (both TX and RX buffers are ··· 840 837 if ((value & CHV_PADCTRL0_GPIOCFG_MASK) == 841 838 (CHV_PADCTRL0_GPIOCFG_HIZ << CHV_PADCTRL0_GPIOCFG_SHIFT)) { 842 839 value &= ~CHV_PADCTRL0_GPIOCFG_MASK; 843 - value |= CHV_PADCTRL0_GPIOCFG_GPI << 844 - CHV_PADCTRL0_GPIOCFG_SHIFT; 840 + value |= CHV_PADCTRL0_GPIOCFG_GPI << CHV_PADCTRL0_GPIOCFG_SHIFT; 845 841 } 846 842 847 843 /* Switch to a GPIO mode */ 848 844 value |= CHV_PADCTRL0_GPIOEN; 849 - chv_writel(value, reg); 845 + chv_writel(pctrl, offset, CHV_PADCTRL0, value); 850 846 } 851 847 852 848 raw_spin_unlock_irqrestore(&chv_lock, flags); ··· 873 871 unsigned int offset, bool input) 874 872 { 875 873 struct chv_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); 876 - void __iomem *reg = chv_padreg(pctrl, offset, CHV_PADCTRL0); 877 874 unsigned long flags; 878 875 u32 ctrl0; 879 876 880 877 raw_spin_lock_irqsave(&chv_lock, flags); 881 878 882 - ctrl0 = readl(reg) & ~CHV_PADCTRL0_GPIOCFG_MASK; 879 + ctrl0 = chv_readl(pctrl, offset, CHV_PADCTRL0) & ~CHV_PADCTRL0_GPIOCFG_MASK; 883 880 if (input) 884 881 ctrl0 |= CHV_PADCTRL0_GPIOCFG_GPI << CHV_PADCTRL0_GPIOCFG_SHIFT; 885 882 else 886 883 ctrl0 |= CHV_PADCTRL0_GPIOCFG_GPO << CHV_PADCTRL0_GPIOCFG_SHIFT; 887 - chv_writel(ctrl0, reg); 884 + chv_writel(pctrl, offset, CHV_PADCTRL0, ctrl0); 888 885 889 886 raw_spin_unlock_irqrestore(&chv_lock, flags); 890 887 ··· 911 910 u32 term; 912 911 913 912 raw_spin_lock_irqsave(&chv_lock, flags); 914 - ctrl0 = readl(chv_padreg(pctrl, pin, CHV_PADCTRL0)); 915 - ctrl1 = readl(chv_padreg(pctrl, pin, CHV_PADCTRL1)); 913 + ctrl0 = chv_readl(pctrl, pin, CHV_PADCTRL0); 914 + ctrl1 = chv_readl(pctrl, pin, CHV_PADCTRL1); 916 915 raw_spin_unlock_irqrestore(&chv_lock, flags); 917 916 918 917 term = (ctrl0 & CHV_PADCTRL0_TERM_MASK) >> CHV_PADCTRL0_TERM_SHIFT; ··· 983 982 static int chv_config_set_pull(struct chv_pinctrl *pctrl, unsigned int pin, 984 983 enum pin_config_param param, u32 arg) 985 984 { 986 - void __iomem *reg = chv_padreg(pctrl, pin, CHV_PADCTRL0); 987 985 unsigned long flags; 988 986 u32 ctrl0, pull; 989 987 990 988 raw_spin_lock_irqsave(&chv_lock, flags); 991 - ctrl0 = readl(reg); 989 + ctrl0 = chv_readl(pctrl, pin, CHV_PADCTRL0); 992 990 993 991 switch (param) { 994 992 case PIN_CONFIG_BIAS_DISABLE: ··· 1039 1039 return -EINVAL; 1040 1040 } 1041 1041 1042 - chv_writel(ctrl0, reg); 1042 + chv_writel(pctrl, pin, CHV_PADCTRL0, ctrl0); 1043 1043 raw_spin_unlock_irqrestore(&chv_lock, flags); 1044 1044 1045 1045 return 0; ··· 1048 1048 static int chv_config_set_oden(struct chv_pinctrl *pctrl, unsigned int pin, 1049 1049 bool enable) 1050 1050 { 1051 - void __iomem *reg = chv_padreg(pctrl, pin, CHV_PADCTRL1); 1052 1051 unsigned long flags; 1053 1052 u32 ctrl1; 1054 1053 1055 1054 raw_spin_lock_irqsave(&chv_lock, flags); 1056 - ctrl1 = readl(reg); 1055 + ctrl1 = chv_readl(pctrl, pin, CHV_PADCTRL1); 1057 1056 1058 1057 if (enable) 1059 1058 ctrl1 |= CHV_PADCTRL1_ODEN; 1060 1059 else 1061 1060 ctrl1 &= ~CHV_PADCTRL1_ODEN; 1062 1061 1063 - chv_writel(ctrl1, reg); 1062 + chv_writel(pctrl, pin, CHV_PADCTRL1, ctrl1); 1064 1063 raw_spin_unlock_irqrestore(&chv_lock, flags); 1065 1064 1066 1065 return 0; ··· 1174 1175 u32 ctrl0, cfg; 1175 1176 1176 1177 raw_spin_lock_irqsave(&chv_lock, flags); 1177 - ctrl0 = readl(chv_padreg(pctrl, offset, CHV_PADCTRL0)); 1178 + ctrl0 = chv_readl(pctrl, offset, CHV_PADCTRL0); 1178 1179 raw_spin_unlock_irqrestore(&chv_lock, flags); 1179 1180 1180 1181 cfg = ctrl0 & CHV_PADCTRL0_GPIOCFG_MASK; ··· 1189 1190 { 1190 1191 struct chv_pinctrl *pctrl = gpiochip_get_data(chip); 1191 1192 unsigned long flags; 1192 - void __iomem *reg; 1193 1193 u32 ctrl0; 1194 1194 1195 1195 raw_spin_lock_irqsave(&chv_lock, flags); 1196 1196 1197 - reg = chv_padreg(pctrl, offset, CHV_PADCTRL0); 1198 - ctrl0 = readl(reg); 1197 + ctrl0 = chv_readl(pctrl, offset, CHV_PADCTRL0); 1199 1198 1200 1199 if (value) 1201 1200 ctrl0 |= CHV_PADCTRL0_GPIOTXSTATE; 1202 1201 else 1203 1202 ctrl0 &= ~CHV_PADCTRL0_GPIOTXSTATE; 1204 1203 1205 - chv_writel(ctrl0, reg); 1204 + chv_writel(pctrl, offset, CHV_PADCTRL0, ctrl0); 1206 1205 1207 1206 raw_spin_unlock_irqrestore(&chv_lock, flags); 1208 1207 } ··· 1212 1215 unsigned long flags; 1213 1216 1214 1217 raw_spin_lock_irqsave(&chv_lock, flags); 1215 - ctrl0 = readl(chv_padreg(pctrl, offset, CHV_PADCTRL0)); 1218 + ctrl0 = chv_readl(pctrl, offset, CHV_PADCTRL0); 1216 1219 raw_spin_unlock_irqrestore(&chv_lock, flags); 1217 1220 1218 1221 direction = ctrl0 & CHV_PADCTRL0_GPIOCFG_MASK; ··· 1256 1259 1257 1260 raw_spin_lock(&chv_lock); 1258 1261 1259 - intr_line = readl(chv_padreg(pctrl, pin, CHV_PADCTRL0)); 1262 + intr_line = chv_readl(pctrl, pin, CHV_PADCTRL0); 1260 1263 intr_line &= CHV_PADCTRL0_INTSEL_MASK; 1261 1264 intr_line >>= CHV_PADCTRL0_INTSEL_SHIFT; 1262 - chv_writel(BIT(intr_line), pctrl->regs + CHV_INTSTAT); 1265 + chv_pctrl_writel(pctrl, CHV_INTSTAT, BIT(intr_line)); 1263 1266 1264 1267 raw_spin_unlock(&chv_lock); 1265 1268 } ··· 1274 1277 1275 1278 raw_spin_lock_irqsave(&chv_lock, flags); 1276 1279 1277 - intr_line = readl(chv_padreg(pctrl, pin, CHV_PADCTRL0)); 1280 + intr_line = chv_readl(pctrl, pin, CHV_PADCTRL0); 1278 1281 intr_line &= CHV_PADCTRL0_INTSEL_MASK; 1279 1282 intr_line >>= CHV_PADCTRL0_INTSEL_SHIFT; 1280 1283 1281 - value = readl(pctrl->regs + CHV_INTMASK); 1284 + value = chv_pctrl_readl(pctrl, CHV_INTMASK); 1282 1285 if (mask) 1283 1286 value &= ~BIT(intr_line); 1284 1287 else 1285 1288 value |= BIT(intr_line); 1286 - chv_writel(value, pctrl->regs + CHV_INTMASK); 1289 + chv_pctrl_writel(pctrl, CHV_INTMASK, value); 1287 1290 1288 1291 raw_spin_unlock_irqrestore(&chv_lock, flags); 1289 1292 } ··· 1319 1322 u32 intsel, value; 1320 1323 1321 1324 raw_spin_lock_irqsave(&chv_lock, flags); 1322 - intsel = readl(chv_padreg(pctrl, pin, CHV_PADCTRL0)); 1325 + intsel = chv_readl(pctrl, pin, CHV_PADCTRL0); 1323 1326 intsel &= CHV_PADCTRL0_INTSEL_MASK; 1324 1327 intsel >>= CHV_PADCTRL0_INTSEL_SHIFT; 1325 1328 1326 - value = readl(chv_padreg(pctrl, pin, CHV_PADCTRL1)); 1329 + value = chv_readl(pctrl, pin, CHV_PADCTRL1); 1327 1330 if (value & CHV_PADCTRL1_INTWAKECFG_LEVEL) 1328 1331 handler = handle_level_irq; 1329 1332 else ··· 1364 1367 * Driver programs the IntWakeCfg bits and save the mapping. 1365 1368 */ 1366 1369 if (!chv_pad_locked(pctrl, pin)) { 1367 - void __iomem *reg = chv_padreg(pctrl, pin, CHV_PADCTRL1); 1368 - 1369 - value = readl(reg); 1370 + value = chv_readl(pctrl, pin, CHV_PADCTRL1); 1370 1371 value &= ~CHV_PADCTRL1_INTWAKECFG_MASK; 1371 1372 value &= ~CHV_PADCTRL1_INVRXTX_MASK; 1372 1373 ··· 1381 1386 value |= CHV_PADCTRL1_INVRXTX_RXDATA; 1382 1387 } 1383 1388 1384 - chv_writel(value, reg); 1389 + chv_writel(pctrl, pin, CHV_PADCTRL1, value); 1385 1390 } 1386 1391 1387 - value = readl(chv_padreg(pctrl, pin, CHV_PADCTRL0)); 1392 + value = chv_readl(pctrl, pin, CHV_PADCTRL0); 1388 1393 value &= CHV_PADCTRL0_INTSEL_MASK; 1389 1394 value >>= CHV_PADCTRL0_INTSEL_SHIFT; 1390 1395 ··· 1404 1409 { 1405 1410 struct gpio_chip *gc = irq_desc_get_handler_data(desc); 1406 1411 struct chv_pinctrl *pctrl = gpiochip_get_data(gc); 1412 + const struct intel_community *community = &pctrl->communities[0]; 1407 1413 struct irq_chip *chip = irq_desc_get_chip(desc); 1408 1414 unsigned long pending; 1409 1415 unsigned long flags; ··· 1413 1417 chained_irq_enter(chip, desc); 1414 1418 1415 1419 raw_spin_lock_irqsave(&chv_lock, flags); 1416 - pending = readl(pctrl->regs + CHV_INTSTAT); 1420 + pending = chv_pctrl_readl(pctrl, CHV_INTSTAT); 1417 1421 raw_spin_unlock_irqrestore(&chv_lock, flags); 1418 1422 1419 - for_each_set_bit(intr_line, &pending, pctrl->community->nirqs) { 1423 + for_each_set_bit(intr_line, &pending, community->nirqs) { 1420 1424 unsigned int irq, offset; 1421 1425 1422 1426 offset = pctrl->intr_lines[intr_line]; ··· 1473 1477 unsigned int ngpios) 1474 1478 { 1475 1479 struct chv_pinctrl *pctrl = gpiochip_get_data(chip); 1476 - const struct chv_community *community = pctrl->community; 1480 + const struct intel_community *community = &pctrl->communities[0]; 1477 1481 int i; 1478 1482 1479 1483 /* Do not add GPIOs that can only generate GPEs to the IRQ domain */ 1480 - for (i = 0; i < community->npins; i++) { 1484 + for (i = 0; i < pctrl->soc->npins; i++) { 1481 1485 const struct pinctrl_pin_desc *desc; 1482 1486 u32 intsel; 1483 1487 1484 - desc = &community->pins[i]; 1488 + desc = &pctrl->soc->pins[i]; 1485 1489 1486 - intsel = readl(chv_padreg(pctrl, desc->number, CHV_PADCTRL0)); 1490 + intsel = chv_readl(pctrl, desc->number, CHV_PADCTRL0); 1487 1491 intsel &= CHV_PADCTRL0_INTSEL_MASK; 1488 1492 intsel >>= CHV_PADCTRL0_INTSEL_SHIFT; 1489 1493 ··· 1495 1499 static int chv_gpio_irq_init_hw(struct gpio_chip *chip) 1496 1500 { 1497 1501 struct chv_pinctrl *pctrl = gpiochip_get_data(chip); 1502 + const struct intel_community *community = &pctrl->communities[0]; 1498 1503 1499 1504 /* 1500 1505 * The same set of machines in chv_no_valid_mask[] have incorrectly ··· 1509 1512 * Mask all interrupts the community is able to generate 1510 1513 * but leave the ones that can only generate GPEs unmasked. 1511 1514 */ 1512 - chv_writel(GENMASK(31, pctrl->community->nirqs), 1513 - pctrl->regs + CHV_INTMASK); 1515 + chv_pctrl_writel(pctrl, CHV_INTMASK, GENMASK(31, community->nirqs)); 1514 1516 } 1515 1517 1516 1518 /* Clear all interrupts */ 1517 - chv_writel(0xffff, pctrl->regs + CHV_INTSTAT); 1519 + chv_pctrl_writel(pctrl, CHV_INTSTAT, 0xffff); 1518 1520 1519 1521 return 0; 1520 1522 } ··· 1521 1525 static int chv_gpio_add_pin_ranges(struct gpio_chip *chip) 1522 1526 { 1523 1527 struct chv_pinctrl *pctrl = gpiochip_get_data(chip); 1524 - const struct chv_community *community = pctrl->community; 1528 + const struct intel_community *community = &pctrl->communities[0]; 1525 1529 const struct intel_padgroup *gpp; 1526 1530 int ret, i; 1527 1531 ··· 1541 1545 1542 1546 static int chv_gpio_probe(struct chv_pinctrl *pctrl, int irq) 1543 1547 { 1548 + const struct intel_community *community = &pctrl->communities[0]; 1544 1549 const struct intel_padgroup *gpp; 1545 1550 struct gpio_chip *chip = &pctrl->chip; 1546 1551 bool need_valid_mask = !dmi_check_system(chv_no_valid_mask); 1547 - const struct chv_community *community = pctrl->community; 1548 1552 int ret, i, irq_base; 1549 1553 1550 1554 *chip = chv_gpio_chip; 1551 1555 1552 - chip->ngpio = community->pins[community->npins - 1].number + 1; 1556 + chip->ngpio = pctrl->soc->pins[pctrl->soc->npins - 1].number + 1; 1553 1557 chip->label = dev_name(pctrl->dev); 1554 1558 chip->add_pin_ranges = chv_gpio_add_pin_ranges; 1555 1559 chip->parent = pctrl->dev; ··· 1575 1579 chip->irq.init_valid_mask = chv_init_irq_valid_mask; 1576 1580 } else { 1577 1581 irq_base = devm_irq_alloc_descs(pctrl->dev, -1, 0, 1578 - community->npins, NUMA_NO_NODE); 1582 + pctrl->soc->npins, NUMA_NO_NODE); 1579 1583 if (irq_base < 0) { 1580 1584 dev_err(pctrl->dev, "Failed to allocate IRQ numbers\n"); 1581 1585 return irq_base; ··· 1612 1616 raw_spin_lock_irqsave(&chv_lock, flags); 1613 1617 1614 1618 if (function == ACPI_WRITE) 1615 - chv_writel((u32)(*value), pctrl->regs + (u32)address); 1619 + chv_pctrl_writel(pctrl, address, *value); 1616 1620 else if (function == ACPI_READ) 1617 - *value = readl(pctrl->regs + (u32)address); 1621 + *value = chv_pctrl_readl(pctrl, address); 1618 1622 else 1619 1623 ret = AE_BAD_PARAMETER; 1620 1624 ··· 1625 1629 1626 1630 static int chv_pinctrl_probe(struct platform_device *pdev) 1627 1631 { 1632 + const struct intel_pinctrl_soc_data *soc_data = NULL; 1633 + const struct intel_pinctrl_soc_data **soc_table; 1634 + struct intel_community *community; 1635 + struct device *dev = &pdev->dev; 1628 1636 struct chv_pinctrl *pctrl; 1629 1637 struct acpi_device *adev; 1630 1638 acpi_status status; ··· 1638 1638 if (!adev) 1639 1639 return -ENODEV; 1640 1640 1641 - pctrl = devm_kzalloc(&pdev->dev, sizeof(*pctrl), GFP_KERNEL); 1641 + soc_table = (const struct intel_pinctrl_soc_data **)device_get_match_data(dev); 1642 + for (i = 0; soc_table[i]; i++) { 1643 + if (!strcmp(adev->pnp.unique_id, soc_table[i]->uid)) { 1644 + soc_data = soc_table[i]; 1645 + break; 1646 + } 1647 + } 1648 + if (!soc_data) 1649 + return -ENODEV; 1650 + 1651 + pctrl = devm_kzalloc(dev, sizeof(*pctrl), GFP_KERNEL); 1642 1652 if (!pctrl) 1643 1653 return -ENOMEM; 1644 1654 1645 - for (i = 0; i < ARRAY_SIZE(chv_communities); i++) 1646 - if (!strcmp(adev->pnp.unique_id, chv_communities[i]->uid)) { 1647 - pctrl->community = chv_communities[i]; 1648 - break; 1649 - } 1650 - if (i == ARRAY_SIZE(chv_communities)) 1651 - return -ENODEV; 1652 - 1653 1655 pctrl->dev = &pdev->dev; 1656 + pctrl->soc = soc_data; 1657 + 1658 + pctrl->ncommunities = pctrl->soc->ncommunities; 1659 + pctrl->communities = devm_kmemdup(dev, pctrl->soc->communities, 1660 + pctrl->ncommunities * sizeof(*pctrl->communities), 1661 + GFP_KERNEL); 1662 + if (!pctrl->communities) 1663 + return -ENOMEM; 1664 + 1665 + community = &pctrl->communities[0]; 1666 + community->regs = devm_platform_ioremap_resource(pdev, 0); 1667 + if (IS_ERR(community->regs)) 1668 + return PTR_ERR(community->regs); 1669 + 1670 + community->pad_regs = community->regs + FAMILY_PAD_REGS_OFF; 1654 1671 1655 1672 #ifdef CONFIG_PM_SLEEP 1656 - pctrl->saved_pin_context = devm_kcalloc(pctrl->dev, 1657 - pctrl->community->npins, sizeof(*pctrl->saved_pin_context), 1658 - GFP_KERNEL); 1659 - if (!pctrl->saved_pin_context) 1673 + pctrl->context.pads = devm_kcalloc(dev, pctrl->soc->npins, 1674 + sizeof(*pctrl->context.pads), 1675 + GFP_KERNEL); 1676 + if (!pctrl->context.pads) 1660 1677 return -ENOMEM; 1661 1678 #endif 1662 - 1663 - pctrl->regs = devm_platform_ioremap_resource(pdev, 0); 1664 - if (IS_ERR(pctrl->regs)) 1665 - return PTR_ERR(pctrl->regs); 1666 1679 1667 1680 irq = platform_get_irq(pdev, 0); 1668 1681 if (irq < 0) ··· 1683 1670 1684 1671 pctrl->pctldesc = chv_pinctrl_desc; 1685 1672 pctrl->pctldesc.name = dev_name(&pdev->dev); 1686 - pctrl->pctldesc.pins = pctrl->community->pins; 1687 - pctrl->pctldesc.npins = pctrl->community->npins; 1673 + pctrl->pctldesc.pins = pctrl->soc->pins; 1674 + pctrl->pctldesc.npins = pctrl->soc->npins; 1688 1675 1689 1676 pctrl->pctldev = devm_pinctrl_register(&pdev->dev, &pctrl->pctldesc, 1690 1677 pctrl); ··· 1698 1685 return ret; 1699 1686 1700 1687 status = acpi_install_address_space_handler(adev->handle, 1701 - pctrl->community->acpi_space_id, 1688 + community->acpi_space_id, 1702 1689 chv_pinctrl_mmio_access_handler, 1703 1690 NULL, pctrl); 1704 1691 if (ACPI_FAILURE(status)) ··· 1712 1699 static int chv_pinctrl_remove(struct platform_device *pdev) 1713 1700 { 1714 1701 struct chv_pinctrl *pctrl = platform_get_drvdata(pdev); 1702 + const struct intel_community *community = &pctrl->communities[0]; 1715 1703 1716 1704 acpi_remove_address_space_handler(ACPI_COMPANION(&pdev->dev), 1717 - pctrl->community->acpi_space_id, 1705 + community->acpi_space_id, 1718 1706 chv_pinctrl_mmio_access_handler); 1719 1707 1720 1708 return 0; ··· 1730 1716 1731 1717 raw_spin_lock_irqsave(&chv_lock, flags); 1732 1718 1733 - pctrl->saved_intmask = readl(pctrl->regs + CHV_INTMASK); 1719 + pctrl->saved_intmask = chv_pctrl_readl(pctrl, CHV_INTMASK); 1734 1720 1735 - for (i = 0; i < pctrl->community->npins; i++) { 1721 + for (i = 0; i < pctrl->soc->npins; i++) { 1736 1722 const struct pinctrl_pin_desc *desc; 1737 - struct chv_pin_context *ctx; 1738 - void __iomem *reg; 1723 + struct intel_pad_context *ctx = &pctrl->context.pads[i]; 1739 1724 1740 - desc = &pctrl->community->pins[i]; 1725 + desc = &pctrl->soc->pins[i]; 1741 1726 if (chv_pad_locked(pctrl, desc->number)) 1742 1727 continue; 1743 1728 1744 - ctx = &pctrl->saved_pin_context[i]; 1729 + ctx->padctrl0 = chv_readl(pctrl, desc->number, CHV_PADCTRL0); 1730 + ctx->padctrl0 &= ~CHV_PADCTRL0_GPIORXSTATE; 1745 1731 1746 - reg = chv_padreg(pctrl, desc->number, CHV_PADCTRL0); 1747 - ctx->padctrl0 = readl(reg) & ~CHV_PADCTRL0_GPIORXSTATE; 1748 - 1749 - reg = chv_padreg(pctrl, desc->number, CHV_PADCTRL1); 1750 - ctx->padctrl1 = readl(reg); 1732 + ctx->padctrl1 = chv_readl(pctrl, desc->number, CHV_PADCTRL1); 1751 1733 } 1752 1734 1753 1735 raw_spin_unlock_irqrestore(&chv_lock, flags); ··· 1764 1754 * registers because we don't know in which state BIOS left them 1765 1755 * upon exiting suspend. 1766 1756 */ 1767 - chv_writel(0, pctrl->regs + CHV_INTMASK); 1757 + chv_pctrl_writel(pctrl, CHV_INTMASK, 0x0000); 1768 1758 1769 - for (i = 0; i < pctrl->community->npins; i++) { 1759 + for (i = 0; i < pctrl->soc->npins; i++) { 1770 1760 const struct pinctrl_pin_desc *desc; 1771 - const struct chv_pin_context *ctx; 1772 - void __iomem *reg; 1761 + struct intel_pad_context *ctx = &pctrl->context.pads[i]; 1773 1762 u32 val; 1774 1763 1775 - desc = &pctrl->community->pins[i]; 1764 + desc = &pctrl->soc->pins[i]; 1776 1765 if (chv_pad_locked(pctrl, desc->number)) 1777 1766 continue; 1778 1767 1779 - ctx = &pctrl->saved_pin_context[i]; 1780 - 1781 1768 /* Only restore if our saved state differs from the current */ 1782 - reg = chv_padreg(pctrl, desc->number, CHV_PADCTRL0); 1783 - val = readl(reg) & ~CHV_PADCTRL0_GPIORXSTATE; 1769 + val = chv_readl(pctrl, desc->number, CHV_PADCTRL0); 1770 + val &= ~CHV_PADCTRL0_GPIORXSTATE; 1784 1771 if (ctx->padctrl0 != val) { 1785 - chv_writel(ctx->padctrl0, reg); 1772 + chv_writel(pctrl, desc->number, CHV_PADCTRL0, ctx->padctrl0); 1786 1773 dev_dbg(pctrl->dev, "restored pin %2u ctrl0 0x%08x\n", 1787 - desc->number, readl(reg)); 1774 + desc->number, chv_readl(pctrl, desc->number, CHV_PADCTRL0)); 1788 1775 } 1789 1776 1790 - reg = chv_padreg(pctrl, desc->number, CHV_PADCTRL1); 1791 - val = readl(reg); 1777 + val = chv_readl(pctrl, desc->number, CHV_PADCTRL1); 1792 1778 if (ctx->padctrl1 != val) { 1793 - chv_writel(ctx->padctrl1, reg); 1779 + chv_writel(pctrl, desc->number, CHV_PADCTRL1, ctx->padctrl1); 1794 1780 dev_dbg(pctrl->dev, "restored pin %2u ctrl1 0x%08x\n", 1795 - desc->number, readl(reg)); 1781 + desc->number, chv_readl(pctrl, desc->number, CHV_PADCTRL1)); 1796 1782 } 1797 1783 } 1798 1784 ··· 1796 1790 * Now that all pins are restored to known state, we can restore 1797 1791 * the interrupt mask register as well. 1798 1792 */ 1799 - chv_writel(0xffff, pctrl->regs + CHV_INTSTAT); 1800 - chv_writel(pctrl->saved_intmask, pctrl->regs + CHV_INTMASK); 1793 + chv_pctrl_writel(pctrl, CHV_INTSTAT, 0xffff); 1794 + chv_pctrl_writel(pctrl, CHV_INTMASK, pctrl->saved_intmask); 1801 1795 1802 1796 raw_spin_unlock_irqrestore(&chv_lock, flags); 1803 1797 ··· 1811 1805 }; 1812 1806 1813 1807 static const struct acpi_device_id chv_pinctrl_acpi_match[] = { 1814 - { "INT33FF" }, 1808 + { "INT33FF", (kernel_ulong_t)chv_soc_data }, 1815 1809 { } 1816 1810 }; 1817 1811 MODULE_DEVICE_TABLE(acpi, chv_pinctrl_acpi_match);
+387
drivers/pinctrl/intel/pinctrl-emmitsburg.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 2 + /* 3 + * Intel Emmitsburg PCH pinctrl/GPIO driver 4 + * 5 + * Copyright (C) 2020, Intel Corporation 6 + * Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com> 7 + */ 8 + 9 + #include <linux/mod_devicetable.h> 10 + #include <linux/module.h> 11 + #include <linux/platform_device.h> 12 + 13 + #include <linux/pinctrl/pinctrl.h> 14 + 15 + #include "pinctrl-intel.h" 16 + 17 + #define EBG_PAD_OWN 0x0a0 18 + #define EBG_PADCFGLOCK 0x100 19 + #define EBG_HOSTSW_OWN 0x130 20 + #define EBG_GPI_IS 0x200 21 + #define EBG_GPI_IE 0x210 22 + 23 + #define EBG_GPP(r, s, e) \ 24 + { \ 25 + .reg_num = (r), \ 26 + .base = (s), \ 27 + .size = ((e) - (s) + 1), \ 28 + } 29 + 30 + #define EBG_COMMUNITY(b, s, e, g) \ 31 + { \ 32 + .barno = (b), \ 33 + .padown_offset = EBG_PAD_OWN, \ 34 + .padcfglock_offset = EBG_PADCFGLOCK, \ 35 + .hostown_offset = EBG_HOSTSW_OWN, \ 36 + .is_offset = EBG_GPI_IS, \ 37 + .ie_offset = EBG_GPI_IE, \ 38 + .pin_base = (s), \ 39 + .npins = ((e) - (s) + 1), \ 40 + .gpps = (g), \ 41 + .ngpps = ARRAY_SIZE(g), \ 42 + } 43 + 44 + /* Emmitsburg */ 45 + static const struct pinctrl_pin_desc ebg_pins[] = { 46 + /* GPP_A */ 47 + PINCTRL_PIN(0, "ESPI_ALERT0B"), 48 + PINCTRL_PIN(1, "ESPI_ALERT1B"), 49 + PINCTRL_PIN(2, "ESPI_IO_0"), 50 + PINCTRL_PIN(3, "ESPI_IO_1"), 51 + PINCTRL_PIN(4, "ESPI_IO_2"), 52 + PINCTRL_PIN(5, "ESPI_IO_3"), 53 + PINCTRL_PIN(6, "ESPI_CS0B"), 54 + PINCTRL_PIN(7, "ESPI_CS1B"), 55 + PINCTRL_PIN(8, "ESPI_RESETB"), 56 + PINCTRL_PIN(9, "ESPI_CLK"), 57 + PINCTRL_PIN(10, "SRCCLKREQB_0"), 58 + PINCTRL_PIN(11, "SRCCLKREQB_1"), 59 + PINCTRL_PIN(12, "SRCCLKREQB_2"), 60 + PINCTRL_PIN(13, "SRCCLKREQB_3"), 61 + PINCTRL_PIN(14, "SRCCLKREQB_4"), 62 + PINCTRL_PIN(15, "SRCCLKREQB_5"), 63 + PINCTRL_PIN(16, "SRCCLKREQB_6"), 64 + PINCTRL_PIN(17, "SRCCLKREQB_7"), 65 + PINCTRL_PIN(18, "SRCCLKREQB_8"), 66 + PINCTRL_PIN(19, "SRCCLKREQB_9"), 67 + PINCTRL_PIN(20, "ESPI_CLK_LOOPBK"), 68 + /* GPP_B */ 69 + PINCTRL_PIN(21, "GSXDOUT"), 70 + PINCTRL_PIN(22, "GSXSLOAD"), 71 + PINCTRL_PIN(23, "GSXDIN"), 72 + PINCTRL_PIN(24, "GSXSRESETB"), 73 + PINCTRL_PIN(25, "GSXCLK"), 74 + PINCTRL_PIN(26, "USB2_OCB_0"), 75 + PINCTRL_PIN(27, "USB2_OCB_1"), 76 + PINCTRL_PIN(28, "USB2_OCB_2"), 77 + PINCTRL_PIN(29, "USB2_OCB_3"), 78 + PINCTRL_PIN(30, "USB2_OCB_4"), 79 + PINCTRL_PIN(31, "USB2_OCB_5"), 80 + PINCTRL_PIN(32, "USB2_OCB_6"), 81 + PINCTRL_PIN(33, "HS_UART0_RXD"), 82 + PINCTRL_PIN(34, "HS_UART0_TXD"), 83 + PINCTRL_PIN(35, "HS_UART0_RTSB"), 84 + PINCTRL_PIN(36, "HS_UART0_CTSB"), 85 + PINCTRL_PIN(37, "HS_UART1_RXD"), 86 + PINCTRL_PIN(38, "HS_UART1_TXD"), 87 + PINCTRL_PIN(39, "HS_UART1_RTSB"), 88 + PINCTRL_PIN(40, "HS_UART1_CTSB"), 89 + PINCTRL_PIN(41, "GPPC_B_20"), 90 + PINCTRL_PIN(42, "GPPC_B_21"), 91 + PINCTRL_PIN(43, "GPPC_B_22"), 92 + PINCTRL_PIN(44, "PS_ONB"), 93 + /* SPI */ 94 + PINCTRL_PIN(45, "SPI0_IO_2"), 95 + PINCTRL_PIN(46, "SPI0_IO_3"), 96 + PINCTRL_PIN(47, "SPI0_MOSI_IO_0"), 97 + PINCTRL_PIN(48, "SPI0_MISO_IO_1"), 98 + PINCTRL_PIN(49, "SPI0_TPM_CSB"), 99 + PINCTRL_PIN(50, "SPI0_FLASH_0_CSB"), 100 + PINCTRL_PIN(51, "SPI0_FLASH_1_CSB"), 101 + PINCTRL_PIN(52, "SPI0_CLK"), 102 + PINCTRL_PIN(53, "TIME_SYNC_0"), 103 + PINCTRL_PIN(54, "SPKR"), 104 + PINCTRL_PIN(55, "CPU_GP_0"), 105 + PINCTRL_PIN(56, "CPU_GP_1"), 106 + PINCTRL_PIN(57, "CPU_GP_2"), 107 + PINCTRL_PIN(58, "CPU_GP_3"), 108 + PINCTRL_PIN(59, "SUSWARNB_SUSPWRDNACK"), 109 + PINCTRL_PIN(60, "SUSACKB"), 110 + PINCTRL_PIN(61, "NMIB"), 111 + PINCTRL_PIN(62, "SMIB"), 112 + PINCTRL_PIN(63, "GPPC_S_10"), 113 + PINCTRL_PIN(64, "GPPC_S_11"), 114 + PINCTRL_PIN(65, "SPI_CLK_LOOPBK"), 115 + /* GPP_C */ 116 + PINCTRL_PIN(66, "ME_SML0CLK"), 117 + PINCTRL_PIN(67, "ME_SML0DATA"), 118 + PINCTRL_PIN(68, "ME_SML0ALERTB"), 119 + PINCTRL_PIN(69, "ME_SML0BDATA"), 120 + PINCTRL_PIN(70, "ME_SML0BCLK"), 121 + PINCTRL_PIN(71, "ME_SML0BALERTB"), 122 + PINCTRL_PIN(72, "ME_SML1CLK"), 123 + PINCTRL_PIN(73, "ME_SML1DATA"), 124 + PINCTRL_PIN(74, "ME_SML1ALERTB"), 125 + PINCTRL_PIN(75, "ME_SML2CLK"), 126 + PINCTRL_PIN(76, "ME_SML2DATA"), 127 + PINCTRL_PIN(77, "ME_SML2ALERTB"), 128 + PINCTRL_PIN(78, "ME_SML3CLK"), 129 + PINCTRL_PIN(79, "ME_SML3DATA"), 130 + PINCTRL_PIN(80, "ME_SML3ALERTB"), 131 + PINCTRL_PIN(81, "ME_SML4CLK"), 132 + PINCTRL_PIN(82, "ME_SML4DATA"), 133 + PINCTRL_PIN(83, "ME_SML4ALERTB"), 134 + PINCTRL_PIN(84, "GPPC_C_18"), 135 + PINCTRL_PIN(85, "MC_SMBCLK"), 136 + PINCTRL_PIN(86, "MC_SMBDATA"), 137 + PINCTRL_PIN(87, "MC_SMBALERTB"), 138 + /* GPP_D */ 139 + PINCTRL_PIN(88, "HS_SMBCLK"), 140 + PINCTRL_PIN(89, "HS_SMBDATA"), 141 + PINCTRL_PIN(90, "HS_SMBALERTB"), 142 + PINCTRL_PIN(91, "GBE_SMB_ALRT_N"), 143 + PINCTRL_PIN(92, "GBE_SMB_CLK"), 144 + PINCTRL_PIN(93, "GBE_SMB_DATA"), 145 + PINCTRL_PIN(94, "GBE_GPIO10"), 146 + PINCTRL_PIN(95, "GBE_GPIO11"), 147 + PINCTRL_PIN(96, "CRASHLOG_TRIG_N"), 148 + PINCTRL_PIN(97, "PMEB"), 149 + PINCTRL_PIN(98, "BM_BUSYB"), 150 + PINCTRL_PIN(99, "PLTRSTB"), 151 + PINCTRL_PIN(100, "PCHHOTB"), 152 + PINCTRL_PIN(101, "ADR_COMPLETE"), 153 + PINCTRL_PIN(102, "ADR_TRIGGER_N"), 154 + PINCTRL_PIN(103, "VRALERTB"), 155 + PINCTRL_PIN(104, "ADR_ACK"), 156 + PINCTRL_PIN(105, "THERMTRIP_N"), 157 + PINCTRL_PIN(106, "MEMTRIP_N"), 158 + PINCTRL_PIN(107, "MSMI_N"), 159 + PINCTRL_PIN(108, "CATERR_N"), 160 + PINCTRL_PIN(109, "GLB_RST_WARN_B"), 161 + PINCTRL_PIN(110, "USB2_OCB_7"), 162 + PINCTRL_PIN(111, "GPP_D_23"), 163 + /* GPP_E */ 164 + PINCTRL_PIN(112, "SATA1_XPCIE_0"), 165 + PINCTRL_PIN(113, "SATA1_XPCIE_1"), 166 + PINCTRL_PIN(114, "SATA1_XPCIE_2"), 167 + PINCTRL_PIN(115, "SATA1_XPCIE_3"), 168 + PINCTRL_PIN(116, "SATA0_XPCIE_2"), 169 + PINCTRL_PIN(117, "SATA0_XPCIE_3"), 170 + PINCTRL_PIN(118, "SATA0_USB3_XPCIE_0"), 171 + PINCTRL_PIN(119, "SATA0_USB3_XPCIE_1"), 172 + PINCTRL_PIN(120, "SATA0_SCLOCK"), 173 + PINCTRL_PIN(121, "SATA0_SLOAD"), 174 + PINCTRL_PIN(122, "SATA0_SDATAOUT"), 175 + PINCTRL_PIN(123, "SATA1_SCLOCK"), 176 + PINCTRL_PIN(124, "SATA1_SLOAD"), 177 + PINCTRL_PIN(125, "SATA1_SDATAOUT"), 178 + PINCTRL_PIN(126, "SATA2_SCLOCK"), 179 + PINCTRL_PIN(127, "SATA2_SLOAD"), 180 + PINCTRL_PIN(128, "SATA2_SDATAOUT"), 181 + PINCTRL_PIN(129, "ERR0_N"), 182 + PINCTRL_PIN(130, "ERR1_N"), 183 + PINCTRL_PIN(131, "ERR2_N"), 184 + PINCTRL_PIN(132, "GBE_UART_RXD"), 185 + PINCTRL_PIN(133, "GBE_UART_TXD"), 186 + PINCTRL_PIN(134, "GBE_UART_RTSB"), 187 + PINCTRL_PIN(135, "GBE_UART_CTSB"), 188 + /* JTAG */ 189 + PINCTRL_PIN(136, "JTAG_TDO"), 190 + PINCTRL_PIN(137, "JTAG_TDI"), 191 + PINCTRL_PIN(138, "JTAG_TCK"), 192 + PINCTRL_PIN(139, "JTAG_TMS"), 193 + PINCTRL_PIN(140, "JTAGX"), 194 + PINCTRL_PIN(141, "PRDYB"), 195 + PINCTRL_PIN(142, "PREQB"), 196 + PINCTRL_PIN(143, "GLB_PC_DISABLE"), 197 + PINCTRL_PIN(144, "DBG_PMODE"), 198 + PINCTRL_PIN(145, "GLB_EXT_ACC_DISABLE"), 199 + /* GPP_H */ 200 + PINCTRL_PIN(146, "GBE_GPIO12"), 201 + PINCTRL_PIN(147, "GBE_GPIO13"), 202 + PINCTRL_PIN(148, "GBE_SDP_TIMESYNC0_S2N"), 203 + PINCTRL_PIN(149, "GBE_SDP_TIMESYNC1_S2N"), 204 + PINCTRL_PIN(150, "GBE_SDP_TIMESYNC2_S2N"), 205 + PINCTRL_PIN(151, "GBE_SDP_TIMESYNC3_S2N"), 206 + PINCTRL_PIN(152, "GPPC_H_6"), 207 + PINCTRL_PIN(153, "GPPC_H_7"), 208 + PINCTRL_PIN(154, "NCSI_CLK_IN"), 209 + PINCTRL_PIN(155, "NCSI_CRS_DV"), 210 + PINCTRL_PIN(156, "NCSI_RXD0"), 211 + PINCTRL_PIN(157, "NCSI_RXD1"), 212 + PINCTRL_PIN(158, "NCSI_TX_EN"), 213 + PINCTRL_PIN(159, "NCSI_TXD0"), 214 + PINCTRL_PIN(160, "NCSI_TXD1"), 215 + PINCTRL_PIN(161, "NAC_NCSI_CLK_OUT_0"), 216 + PINCTRL_PIN(162, "NAC_NCSI_CLK_OUT_1"), 217 + PINCTRL_PIN(163, "NAC_NCSI_CLK_OUT_2"), 218 + PINCTRL_PIN(164, "PMCALERTB"), 219 + PINCTRL_PIN(165, "GPPC_H_19"), 220 + /* GPP_J */ 221 + PINCTRL_PIN(166, "CPUPWRGD"), 222 + PINCTRL_PIN(167, "CPU_THRMTRIP_N"), 223 + PINCTRL_PIN(168, "PLTRST_CPUB"), 224 + PINCTRL_PIN(169, "TRIGGER0_N"), 225 + PINCTRL_PIN(170, "TRIGGER1_N"), 226 + PINCTRL_PIN(171, "CPU_PWR_DEBUG_N"), 227 + PINCTRL_PIN(172, "CPU_MEMTRIP_N"), 228 + PINCTRL_PIN(173, "CPU_MSMI_N"), 229 + PINCTRL_PIN(174, "ME_PECI"), 230 + PINCTRL_PIN(175, "NAC_SPARE0"), 231 + PINCTRL_PIN(176, "NAC_SPARE1"), 232 + PINCTRL_PIN(177, "NAC_SPARE2"), 233 + PINCTRL_PIN(178, "CPU_ERR0_N"), 234 + PINCTRL_PIN(179, "CPU_CATERR_N"), 235 + PINCTRL_PIN(180, "CPU_ERR1_N"), 236 + PINCTRL_PIN(181, "CPU_ERR2_N"), 237 + PINCTRL_PIN(182, "GPP_J_16"), 238 + PINCTRL_PIN(183, "GPP_J_17"), 239 + /* GPP_I */ 240 + PINCTRL_PIN(184, "GBE_GPIO4"), 241 + PINCTRL_PIN(185, "GBE_GPIO5"), 242 + PINCTRL_PIN(186, "GBE_GPIO6"), 243 + PINCTRL_PIN(187, "GBE_GPIO7"), 244 + PINCTRL_PIN(188, "GBE1_LED1"), 245 + PINCTRL_PIN(189, "GBE1_LED2"), 246 + PINCTRL_PIN(190, "GBE2_LED0"), 247 + PINCTRL_PIN(191, "GBE2_LED1"), 248 + PINCTRL_PIN(192, "GBE2_LED2"), 249 + PINCTRL_PIN(193, "GBE3_LED0"), 250 + PINCTRL_PIN(194, "GBE3_LED1"), 251 + PINCTRL_PIN(195, "GBE3_LED2"), 252 + PINCTRL_PIN(196, "GBE0_I2C_CLK"), 253 + PINCTRL_PIN(197, "GBE0_I2C_DATA"), 254 + PINCTRL_PIN(198, "GBE1_I2C_CLK"), 255 + PINCTRL_PIN(199, "GBE1_I2C_DATA"), 256 + PINCTRL_PIN(200, "GBE2_I2C_CLK"), 257 + PINCTRL_PIN(201, "GBE2_I2C_DATA"), 258 + PINCTRL_PIN(202, "GBE3_I2C_CLK"), 259 + PINCTRL_PIN(203, "GBE3_I2C_DATA"), 260 + PINCTRL_PIN(204, "GBE4_I2C_CLK"), 261 + PINCTRL_PIN(205, "GBE4_I2C_DATA"), 262 + PINCTRL_PIN(206, "GBE_GPIO8"), 263 + PINCTRL_PIN(207, "GBE_GPIO9"), 264 + /* GPP_L */ 265 + PINCTRL_PIN(208, "PM_SYNC_0"), 266 + PINCTRL_PIN(209, "PM_DOWN_0"), 267 + PINCTRL_PIN(210, "PM_SYNC_CLK_0"), 268 + PINCTRL_PIN(211, "GPP_L_3"), 269 + PINCTRL_PIN(212, "GPP_L_4"), 270 + PINCTRL_PIN(213, "GPP_L_5"), 271 + PINCTRL_PIN(214, "GPP_L_6"), 272 + PINCTRL_PIN(215, "GPP_L_7"), 273 + PINCTRL_PIN(216, "GPP_L_8"), 274 + PINCTRL_PIN(217, "NAC_GBE_GPIO0_S2N"), 275 + PINCTRL_PIN(218, "NAC_GBE_GPIO1_S2N"), 276 + PINCTRL_PIN(219, "NAC_GBE_GPIO2_S2N"), 277 + PINCTRL_PIN(220, "NAC_GBE_GPIO3_S2N"), 278 + PINCTRL_PIN(221, "NAC_GBE_SMB_DATA_IN"), 279 + PINCTRL_PIN(222, "NAC_GBE_SMB_DATA_OUT"), 280 + PINCTRL_PIN(223, "NAC_GBE_SMB_ALRT_N"), 281 + PINCTRL_PIN(224, "NAC_GBE_SMB_CLK_IN"), 282 + PINCTRL_PIN(225, "NAC_GBE_SMB_CLK_OUT"), 283 + /* GPP_M */ 284 + PINCTRL_PIN(226, "GPP_M_0"), 285 + PINCTRL_PIN(227, "GPP_M_1"), 286 + PINCTRL_PIN(228, "GPP_M_2"), 287 + PINCTRL_PIN(229, "GPP_M_3"), 288 + PINCTRL_PIN(230, "NAC_WAKE_N"), 289 + PINCTRL_PIN(231, "GPP_M_5"), 290 + PINCTRL_PIN(232, "GPP_M_6"), 291 + PINCTRL_PIN(233, "GPP_M_7"), 292 + PINCTRL_PIN(234, "GPP_M_8"), 293 + PINCTRL_PIN(235, "NAC_SBLINK_S2N"), 294 + PINCTRL_PIN(236, "NAC_SBLINK_N2S"), 295 + PINCTRL_PIN(237, "NAC_SBLINK_CLK_N2S"), 296 + PINCTRL_PIN(238, "NAC_SBLINK_CLK_S2N"), 297 + PINCTRL_PIN(239, "NAC_XTAL_VALID"), 298 + PINCTRL_PIN(240, "NAC_RESET_NAC_N"), 299 + PINCTRL_PIN(241, "GPP_M_15"), 300 + PINCTRL_PIN(242, "GPP_M_16"), 301 + PINCTRL_PIN(243, "GPP_M_17"), 302 + /* GPP_N */ 303 + PINCTRL_PIN(244, "GPP_N_0"), 304 + PINCTRL_PIN(245, "NAC_NCSI_TXD0"), 305 + PINCTRL_PIN(246, "GPP_N_2"), 306 + PINCTRL_PIN(247, "GPP_N_3"), 307 + PINCTRL_PIN(248, "NAC_NCSI_REFCLK_IN"), 308 + PINCTRL_PIN(249, "GPP_N_5"), 309 + PINCTRL_PIN(250, "GPP_N_6"), 310 + PINCTRL_PIN(251, "GPP_N_7"), 311 + PINCTRL_PIN(252, "NAC_NCSI_RXD0"), 312 + PINCTRL_PIN(253, "NAC_NCSI_RXD1"), 313 + PINCTRL_PIN(254, "NAC_NCSI_CRS_DV"), 314 + PINCTRL_PIN(255, "NAC_NCSI_CLK_IN"), 315 + PINCTRL_PIN(256, "NAC_NCSI_REFCLK_OUT"), 316 + PINCTRL_PIN(257, "NAC_NCSI_TX_EN"), 317 + PINCTRL_PIN(258, "NAC_NCSI_TXD1"), 318 + PINCTRL_PIN(259, "NAC_NCSI_OE_N"), 319 + PINCTRL_PIN(260, "NAC_GR_N"), 320 + PINCTRL_PIN(261, "NAC_INIT_SX_WAKE_N"), 321 + }; 322 + 323 + static const struct intel_padgroup ebg_community0_gpps[] = { 324 + EBG_GPP(0, 0, 20), /* GPP_A */ 325 + EBG_GPP(1, 21, 44), /* GPP_B */ 326 + EBG_GPP(2, 45, 65), /* SPI */ 327 + }; 328 + 329 + static const struct intel_padgroup ebg_community1_gpps[] = { 330 + EBG_GPP(0, 66, 87), /* GPP_C */ 331 + EBG_GPP(1, 88, 111), /* GPP_D */ 332 + }; 333 + 334 + static const struct intel_padgroup ebg_community3_gpps[] = { 335 + EBG_GPP(0, 112, 135), /* GPP_E */ 336 + EBG_GPP(1, 136, 145), /* JTAG */ 337 + }; 338 + 339 + static const struct intel_padgroup ebg_community4_gpps[] = { 340 + EBG_GPP(0, 146, 165), /* GPP_H */ 341 + EBG_GPP(1, 166, 183), /* GPP_J */ 342 + }; 343 + 344 + static const struct intel_padgroup ebg_community5_gpps[] = { 345 + EBG_GPP(0, 184, 207), /* GPP_I */ 346 + EBG_GPP(1, 208, 225), /* GPP_L */ 347 + EBG_GPP(2, 226, 243), /* GPP_M */ 348 + EBG_GPP(3, 244, 261), /* GPP_N */ 349 + }; 350 + 351 + static const struct intel_community ebg_communities[] = { 352 + EBG_COMMUNITY(0, 0, 65, ebg_community0_gpps), 353 + EBG_COMMUNITY(1, 66, 111, ebg_community1_gpps), 354 + EBG_COMMUNITY(2, 112, 145, ebg_community3_gpps), 355 + EBG_COMMUNITY(3, 146, 183, ebg_community4_gpps), 356 + EBG_COMMUNITY(4, 184, 261, ebg_community5_gpps), 357 + }; 358 + 359 + static const struct intel_pinctrl_soc_data ebg_soc_data = { 360 + .pins = ebg_pins, 361 + .npins = ARRAY_SIZE(ebg_pins), 362 + .communities = ebg_communities, 363 + .ncommunities = ARRAY_SIZE(ebg_communities), 364 + }; 365 + 366 + static const struct acpi_device_id ebg_pinctrl_acpi_match[] = { 367 + { "INTC1071", (kernel_ulong_t)&ebg_soc_data }, 368 + { } 369 + }; 370 + MODULE_DEVICE_TABLE(acpi, ebg_pinctrl_acpi_match); 371 + 372 + static INTEL_PINCTRL_PM_OPS(ebg_pinctrl_pm_ops); 373 + 374 + static struct platform_driver ebg_pinctrl_driver = { 375 + .probe = intel_pinctrl_probe_by_hid, 376 + .driver = { 377 + .name = "emmitsburg-pinctrl", 378 + .acpi_match_table = ebg_pinctrl_acpi_match, 379 + .pm = &ebg_pinctrl_pm_ops, 380 + }, 381 + }; 382 + 383 + module_platform_driver(ebg_pinctrl_driver); 384 + 385 + MODULE_AUTHOR("Andy Shevchenko <andriy.shevchenko@linux.intel.com>"); 386 + MODULE_DESCRIPTION("Intel Emmitsburg PCH pinctrl/GPIO driver"); 387 + MODULE_LICENSE("GPL v2");
+124 -76
drivers/pinctrl/intel/pinctrl-intel.c
··· 435 435 { 436 436 u32 value; 437 437 438 + value = readl(padcfg0); 439 + 438 440 /* Put the pad into GPIO mode */ 439 - value = readl(padcfg0) & ~PADCFG0_PMODE_MASK; 441 + value &= ~PADCFG0_PMODE_MASK; 442 + value |= PADCFG0_PMODE_GPIO; 443 + 444 + /* Disable input and output buffers */ 445 + value &= ~PADCFG0_GPIORXDIS; 446 + value &= ~PADCFG0_GPIOTXDIS; 447 + 440 448 /* Disable SCI/SMI/NMI generation */ 441 449 value &= ~(PADCFG0_GPIROUTIOXAPIC | PADCFG0_GPIROUTSCI); 442 450 value &= ~(PADCFG0_GPIROUTSMI | PADCFG0_GPIROUTNMI); 451 + 443 452 writel(value, padcfg0); 444 453 } 445 454 ··· 459 450 struct intel_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); 460 451 void __iomem *padcfg0; 461 452 unsigned long flags; 453 + 454 + padcfg0 = intel_get_padcfg(pctrl, pin, PADCFG0); 462 455 463 456 raw_spin_lock_irqsave(&pctrl->lock, flags); 464 457 ··· 473 462 raw_spin_unlock_irqrestore(&pctrl->lock, flags); 474 463 return 0; 475 464 } 476 - 477 - padcfg0 = intel_get_padcfg(pctrl, pin, PADCFG0); 478 465 479 466 /* 480 467 * If pin is already configured in GPIO mode, we assume that ··· 503 494 void __iomem *padcfg0; 504 495 unsigned long flags; 505 496 506 - raw_spin_lock_irqsave(&pctrl->lock, flags); 507 - 508 497 padcfg0 = intel_get_padcfg(pctrl, pin, PADCFG0); 509 - __intel_gpio_set_direction(padcfg0, input); 510 498 499 + raw_spin_lock_irqsave(&pctrl->lock, flags); 500 + __intel_gpio_set_direction(padcfg0, input); 511 501 raw_spin_unlock_irqrestore(&pctrl->lock, flags); 512 502 513 503 return 0; ··· 521 513 .gpio_set_direction = intel_gpio_set_direction, 522 514 }; 523 515 524 - static int intel_config_get(struct pinctrl_dev *pctldev, unsigned int pin, 525 - unsigned long *config) 516 + static int intel_config_get_pull(struct intel_pinctrl *pctrl, unsigned int pin, 517 + enum pin_config_param param, u32 *arg) 526 518 { 527 - struct intel_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); 528 - enum pin_config_param param = pinconf_to_config_param(*config); 529 519 const struct intel_community *community; 520 + void __iomem *padcfg1; 521 + unsigned long flags; 530 522 u32 value, term; 531 - u32 arg = 0; 532 - 533 - if (!intel_pad_owned_by_host(pctrl, pin)) 534 - return -ENOTSUPP; 535 523 536 524 community = intel_get_community(pctrl, pin); 537 - value = readl(intel_get_padcfg(pctrl, pin, PADCFG1)); 525 + padcfg1 = intel_get_padcfg(pctrl, pin, PADCFG1); 526 + 527 + raw_spin_lock_irqsave(&pctrl->lock, flags); 528 + value = readl(padcfg1); 529 + raw_spin_unlock_irqrestore(&pctrl->lock, flags); 530 + 538 531 term = (value & PADCFG1_TERM_MASK) >> PADCFG1_TERM_SHIFT; 539 532 540 533 switch (param) { ··· 550 541 551 542 switch (term) { 552 543 case PADCFG1_TERM_1K: 553 - arg = 1000; 544 + *arg = 1000; 554 545 break; 555 546 case PADCFG1_TERM_2K: 556 - arg = 2000; 547 + *arg = 2000; 557 548 break; 558 549 case PADCFG1_TERM_5K: 559 - arg = 5000; 550 + *arg = 5000; 560 551 break; 561 552 case PADCFG1_TERM_20K: 562 - arg = 20000; 553 + *arg = 20000; 563 554 break; 564 555 } 565 556 ··· 573 564 case PADCFG1_TERM_1K: 574 565 if (!(community->features & PINCTRL_FEATURE_1K_PD)) 575 566 return -EINVAL; 576 - arg = 1000; 567 + *arg = 1000; 577 568 break; 578 569 case PADCFG1_TERM_5K: 579 - arg = 5000; 570 + *arg = 5000; 580 571 break; 581 572 case PADCFG1_TERM_20K: 582 - arg = 20000; 573 + *arg = 20000; 583 574 break; 584 575 } 585 576 586 577 break; 587 578 588 - case PIN_CONFIG_INPUT_DEBOUNCE: { 589 - void __iomem *padcfg2; 590 - u32 v; 591 - 592 - padcfg2 = intel_get_padcfg(pctrl, pin, PADCFG2); 593 - if (!padcfg2) 594 - return -ENOTSUPP; 595 - 596 - v = readl(padcfg2); 597 - if (!(v & PADCFG2_DEBEN)) 598 - return -EINVAL; 599 - 600 - v = (v & PADCFG2_DEBOUNCE_MASK) >> PADCFG2_DEBOUNCE_SHIFT; 601 - arg = BIT(v) * DEBOUNCE_PERIOD_NSEC / NSEC_PER_USEC; 602 - 603 - break; 579 + default: 580 + return -EINVAL; 604 581 } 582 + 583 + return 0; 584 + } 585 + 586 + static int intel_config_get_debounce(struct intel_pinctrl *pctrl, unsigned int pin, 587 + enum pin_config_param param, u32 *arg) 588 + { 589 + void __iomem *padcfg2; 590 + unsigned long flags; 591 + unsigned long v; 592 + u32 value2; 593 + 594 + padcfg2 = intel_get_padcfg(pctrl, pin, PADCFG2); 595 + if (!padcfg2) 596 + return -ENOTSUPP; 597 + 598 + raw_spin_lock_irqsave(&pctrl->lock, flags); 599 + value2 = readl(padcfg2); 600 + raw_spin_unlock_irqrestore(&pctrl->lock, flags); 601 + if (!(value2 & PADCFG2_DEBEN)) 602 + return -EINVAL; 603 + 604 + v = (value2 & PADCFG2_DEBOUNCE_MASK) >> PADCFG2_DEBOUNCE_SHIFT; 605 + *arg = BIT(v) * DEBOUNCE_PERIOD_NSEC / NSEC_PER_USEC; 606 + 607 + return 0; 608 + } 609 + 610 + static int intel_config_get(struct pinctrl_dev *pctldev, unsigned int pin, 611 + unsigned long *config) 612 + { 613 + struct intel_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); 614 + enum pin_config_param param = pinconf_to_config_param(*config); 615 + u32 arg = 0; 616 + int ret; 617 + 618 + if (!intel_pad_owned_by_host(pctrl, pin)) 619 + return -ENOTSUPP; 620 + 621 + switch (param) { 622 + case PIN_CONFIG_BIAS_DISABLE: 623 + case PIN_CONFIG_BIAS_PULL_UP: 624 + case PIN_CONFIG_BIAS_PULL_DOWN: 625 + ret = intel_config_get_pull(pctrl, pin, param, &arg); 626 + if (ret) 627 + return ret; 628 + break; 629 + 630 + case PIN_CONFIG_INPUT_DEBOUNCE: 631 + ret = intel_config_get_debounce(pctrl, pin, param, &arg); 632 + if (ret) 633 + return ret; 634 + break; 605 635 606 636 default: 607 637 return -ENOTSUPP; ··· 661 613 int ret = 0; 662 614 u32 value; 663 615 664 - raw_spin_lock_irqsave(&pctrl->lock, flags); 665 - 666 616 community = intel_get_community(pctrl, pin); 667 617 padcfg1 = intel_get_padcfg(pctrl, pin, PADCFG1); 618 + 619 + raw_spin_lock_irqsave(&pctrl->lock, flags); 620 + 668 621 value = readl(padcfg1); 669 622 670 623 switch (param) { ··· 735 686 void __iomem *padcfg0, *padcfg2; 736 687 unsigned long flags; 737 688 u32 value0, value2; 738 - int ret = 0; 739 689 740 690 padcfg2 = intel_get_padcfg(pctrl, pin, PADCFG2); 741 691 if (!padcfg2) ··· 756 708 757 709 v = order_base_2(debounce * NSEC_PER_USEC / DEBOUNCE_PERIOD_NSEC); 758 710 if (v < 3 || v > 15) { 759 - ret = -EINVAL; 760 - goto exit_unlock; 761 - } else { 762 - /* Enable glitch filter and debouncer */ 763 - value0 |= PADCFG0_PREGFRXSEL; 764 - value2 |= v << PADCFG2_DEBOUNCE_SHIFT; 765 - value2 |= PADCFG2_DEBEN; 711 + raw_spin_unlock_irqrestore(&pctrl->lock, flags); 712 + return -EINVAL; 766 713 } 714 + 715 + /* Enable glitch filter and debouncer */ 716 + value0 |= PADCFG0_PREGFRXSEL; 717 + value2 |= v << PADCFG2_DEBOUNCE_SHIFT; 718 + value2 |= PADCFG2_DEBEN; 767 719 } 768 720 769 721 writel(value0, padcfg0); 770 722 writel(value2, padcfg2); 771 723 772 - exit_unlock: 773 724 raw_spin_unlock_irqrestore(&pctrl->lock, flags); 774 725 775 - return ret; 726 + return 0; 776 727 } 777 728 778 729 static int intel_config_set(struct pinctrl_dev *pctldev, unsigned int pin, ··· 941 894 static int intel_gpio_get_direction(struct gpio_chip *chip, unsigned int offset) 942 895 { 943 896 struct intel_pinctrl *pctrl = gpiochip_get_data(chip); 897 + unsigned long flags; 944 898 void __iomem *reg; 945 899 u32 padcfg0; 946 900 int pin; ··· 954 906 if (!reg) 955 907 return -EINVAL; 956 908 909 + raw_spin_lock_irqsave(&pctrl->lock, flags); 957 910 padcfg0 = readl(reg); 958 - 911 + raw_spin_unlock_irqrestore(&pctrl->lock, flags); 959 912 if (padcfg0 & PADCFG0_PMODE_MASK) 960 913 return -EINVAL; 961 914 ··· 1085 1036 1086 1037 intel_gpio_set_gpio_mode(reg); 1087 1038 1039 + /* Disable TX buffer and enable RX (this will be input) */ 1040 + __intel_gpio_set_direction(reg, true); 1041 + 1088 1042 value = readl(reg); 1089 1043 1090 1044 value &= ~(PADCFG0_RXEVCFG_MASK | PADCFG0_RXINV); ··· 1133 1081 return 0; 1134 1082 } 1135 1083 1136 - static irqreturn_t intel_gpio_community_irq_handler(struct intel_pinctrl *pctrl, 1137 - const struct intel_community *community) 1084 + static int intel_gpio_community_irq_handler(struct intel_pinctrl *pctrl, 1085 + const struct intel_community *community) 1138 1086 { 1139 1087 struct gpio_chip *gc = &pctrl->chip; 1140 - irqreturn_t ret = IRQ_NONE; 1141 - int gpp; 1088 + unsigned int gpp; 1089 + int ret = 0; 1142 1090 1143 1091 for (gpp = 0; gpp < community->ngpps; gpp++) { 1144 1092 const struct intel_padgroup *padgrp = &community->gpps[gpp]; 1145 1093 unsigned long pending, enabled, gpp_offset; 1094 + unsigned long flags; 1095 + 1096 + raw_spin_lock_irqsave(&pctrl->lock, flags); 1146 1097 1147 1098 pending = readl(community->regs + community->is_offset + 1148 1099 padgrp->reg_num * 4); 1149 1100 enabled = readl(community->regs + community->ie_offset + 1150 1101 padgrp->reg_num * 4); 1102 + 1103 + raw_spin_unlock_irqrestore(&pctrl->lock, flags); 1151 1104 1152 1105 /* Only interrupts that are enabled */ 1153 1106 pending &= enabled; ··· 1163 1106 irq = irq_find_mapping(gc->irq.domain, 1164 1107 padgrp->gpio_base + gpp_offset); 1165 1108 generic_handle_irq(irq); 1166 - 1167 - ret |= IRQ_HANDLED; 1168 1109 } 1110 + 1111 + ret += pending ? 1 : 0; 1169 1112 } 1170 1113 1171 1114 return ret; ··· 1175 1118 { 1176 1119 const struct intel_community *community; 1177 1120 struct intel_pinctrl *pctrl = data; 1178 - irqreturn_t ret = IRQ_NONE; 1179 - int i; 1121 + unsigned int i; 1122 + int ret = 0; 1180 1123 1181 1124 /* Need to check all communities for pending interrupts */ 1182 1125 for (i = 0; i < pctrl->ncommunities; i++) { 1183 1126 community = &pctrl->communities[i]; 1184 - ret |= intel_gpio_community_irq_handler(pctrl, community); 1127 + ret += intel_gpio_community_irq_handler(pctrl, community); 1185 1128 } 1186 1129 1187 - return ret; 1130 + return IRQ_RETVAL(ret); 1188 1131 } 1189 1132 1190 1133 static int intel_gpio_add_community_ranges(struct intel_pinctrl *pctrl, ··· 1628 1571 } 1629 1572 } 1630 1573 1631 - static u32 1632 - intel_gpio_is_requested(struct gpio_chip *chip, int base, unsigned int size) 1633 - { 1634 - u32 requested = 0; 1635 - unsigned int i; 1636 - 1637 - for (i = 0; i < size; i++) 1638 - if (gpiochip_is_requested(chip, base + i)) 1639 - requested |= BIT(i); 1640 - 1641 - return requested; 1642 - } 1643 - 1644 1574 static bool intel_gpio_update_reg(void __iomem *reg, u32 mask, u32 value) 1645 1575 { 1646 1576 u32 curr, updated; ··· 1648 1604 const struct intel_community *community = &pctrl->communities[c]; 1649 1605 const struct intel_padgroup *padgrp = &community->gpps[gpp]; 1650 1606 struct device *dev = pctrl->dev; 1651 - u32 requested; 1607 + const char *dummy; 1608 + u32 requested = 0; 1609 + unsigned int i; 1652 1610 1653 1611 if (padgrp->gpio_base == INTEL_GPIO_BASE_NOMAP) 1654 1612 return; 1655 1613 1656 - requested = intel_gpio_is_requested(&pctrl->chip, padgrp->gpio_base, padgrp->size); 1614 + for_each_requested_gpio_in_range(&pctrl->chip, i, padgrp->gpio_base, padgrp->size, dummy) 1615 + requested |= BIT(i); 1616 + 1657 1617 if (!intel_gpio_update_reg(base + gpp * 4, requested, saved)) 1658 1618 return; 1659 1619
+4
drivers/pinctrl/intel/pinctrl-intel.h
··· 103 103 * @gpps: Pad groups if the controller has variable size pad groups 104 104 * @ngpps: Number of pad groups in this community 105 105 * @pad_map: Optional non-linear mapping of the pads 106 + * @nirqs: Optional total number of IRQs this community can generate 107 + * @acpi_space_id: Optional address space ID for ACPI OpRegion handler 106 108 * @regs: Community specific common registers (reserved for core driver) 107 109 * @pad_regs: Community specific pad registers (reserved for core driver) 108 110 * ··· 129 127 const struct intel_padgroup *gpps; 130 128 size_t ngpps; 131 129 const unsigned int *pad_map; 130 + unsigned short nirqs; 131 + unsigned short acpi_space_id; 132 132 133 133 /* Reserved for the core driver */ 134 134 void __iomem *regs;
+18 -10
drivers/pinctrl/intel/pinctrl-lynxpoint.c
··· 386 386 return 0; 387 387 } 388 388 389 + static void lp_gpio_enable_input(void __iomem *reg) 390 + { 391 + iowrite32(ioread32(reg) & ~GPINDIS_BIT, reg); 392 + } 393 + 394 + static void lp_gpio_disable_input(void __iomem *reg) 395 + { 396 + iowrite32(ioread32(reg) | GPINDIS_BIT, reg); 397 + } 398 + 389 399 static int lp_gpio_request_enable(struct pinctrl_dev *pctldev, 390 400 struct pinctrl_gpio_range *range, 391 401 unsigned int pin) ··· 421 411 } 422 412 423 413 /* Enable input sensing */ 424 - iowrite32(ioread32(conf2) & ~GPINDIS_BIT, conf2); 414 + lp_gpio_enable_input(conf2); 425 415 426 416 raw_spin_unlock_irqrestore(&lg->lock, flags); 427 417 ··· 439 429 raw_spin_lock_irqsave(&lg->lock, flags); 440 430 441 431 /* Disable input sensing */ 442 - iowrite32(ioread32(conf2) | GPINDIS_BIT, conf2); 432 + lp_gpio_disable_input(conf2); 443 433 444 434 raw_spin_unlock_irqrestore(&lg->lock, flags); 445 435 ··· 929 919 static int lp_gpio_resume(struct device *dev) 930 920 { 931 921 struct intel_pinctrl *lg = dev_get_drvdata(dev); 932 - void __iomem *reg; 922 + struct gpio_chip *chip = &lg->chip; 923 + const char *dummy; 933 924 int i; 934 925 935 926 /* on some hardware suspend clears input sensing, re-enable it here */ 936 - for (i = 0; i < lg->chip.ngpio; i++) { 937 - if (gpiochip_is_requested(&lg->chip, i) != NULL) { 938 - reg = lp_gpio_reg(&lg->chip, i, LP_CONFIG2); 939 - iowrite32(ioread32(reg) & ~GPINDIS_BIT, reg); 940 - } 941 - } 927 + for_each_requested_gpio(chip, i, dummy) 928 + lp_gpio_enable_input(lp_gpio_reg(chip, i, LP_CONFIG2)); 929 + 942 930 return 0; 943 931 } 944 932 ··· 959 951 .driver = { 960 952 .name = "lp_gpio", 961 953 .pm = &lp_gpio_pm_ops, 962 - .acpi_match_table = ACPI_PTR(lynxpoint_gpio_acpi_match), 954 + .acpi_match_table = lynxpoint_gpio_acpi_match, 963 955 }, 964 956 }; 965 957
+27 -23
drivers/pinctrl/intel/pinctrl-merrifield.c
··· 135 135 PINCTRL_PIN(43, "GP83_SD_D3"), 136 136 PINCTRL_PIN(44, "GP84_SD_LS_CLK_FB"), 137 137 PINCTRL_PIN(45, "GP85_SD_LS_CMD_DIR"), 138 - PINCTRL_PIN(46, "GP86_SD_LVL_D_DIR"), 138 + PINCTRL_PIN(46, "GP86_SD_LS_D_DIR"), 139 139 PINCTRL_PIN(47, "GP88_SD_LS_SEL"), 140 140 PINCTRL_PIN(48, "GP87_SD_PD"), 141 141 PINCTRL_PIN(49, "GP89_SD_WP"), ··· 171 171 PINCTRL_PIN(77, "GP42_I2S_2_RXD"), 172 172 PINCTRL_PIN(78, "GP43_I2S_2_TXD"), 173 173 /* Family 6: GP SSP (22 pins) */ 174 - PINCTRL_PIN(79, "GP120_SPI_3_CLK"), 175 - PINCTRL_PIN(80, "GP121_SPI_3_SS"), 176 - PINCTRL_PIN(81, "GP122_SPI_3_RXD"), 177 - PINCTRL_PIN(82, "GP123_SPI_3_TXD"), 178 - PINCTRL_PIN(83, "GP102_SPI_4_CLK"), 179 - PINCTRL_PIN(84, "GP103_SPI_4_SS_0"), 180 - PINCTRL_PIN(85, "GP104_SPI_4_SS_1"), 181 - PINCTRL_PIN(86, "GP105_SPI_4_SS_2"), 182 - PINCTRL_PIN(87, "GP106_SPI_4_SS_3"), 183 - PINCTRL_PIN(88, "GP107_SPI_4_RXD"), 184 - PINCTRL_PIN(89, "GP108_SPI_4_TXD"), 185 - PINCTRL_PIN(90, "GP109_SPI_5_CLK"), 186 - PINCTRL_PIN(91, "GP110_SPI_5_SS_0"), 187 - PINCTRL_PIN(92, "GP111_SPI_5_SS_1"), 188 - PINCTRL_PIN(93, "GP112_SPI_5_SS_2"), 189 - PINCTRL_PIN(94, "GP113_SPI_5_SS_3"), 190 - PINCTRL_PIN(95, "GP114_SPI_5_RXD"), 191 - PINCTRL_PIN(96, "GP115_SPI_5_TXD"), 192 - PINCTRL_PIN(97, "GP116_SPI_6_CLK"), 193 - PINCTRL_PIN(98, "GP117_SPI_6_SS"), 194 - PINCTRL_PIN(99, "GP118_SPI_6_RXD"), 195 - PINCTRL_PIN(100, "GP119_SPI_6_TXD"), 174 + PINCTRL_PIN(79, "GP120_SPI_0_CLK"), 175 + PINCTRL_PIN(80, "GP121_SPI_0_SS"), 176 + PINCTRL_PIN(81, "GP122_SPI_0_RXD"), 177 + PINCTRL_PIN(82, "GP123_SPI_0_TXD"), 178 + PINCTRL_PIN(83, "GP102_SPI_1_CLK"), 179 + PINCTRL_PIN(84, "GP103_SPI_1_SS0"), 180 + PINCTRL_PIN(85, "GP104_SPI_1_SS1"), 181 + PINCTRL_PIN(86, "GP105_SPI_1_SS2"), 182 + PINCTRL_PIN(87, "GP106_SPI_1_SS3"), 183 + PINCTRL_PIN(88, "GP107_SPI_1_RXD"), 184 + PINCTRL_PIN(89, "GP108_SPI_1_TXD"), 185 + PINCTRL_PIN(90, "GP109_SPI_2_CLK"), 186 + PINCTRL_PIN(91, "GP110_SPI_2_SS0"), 187 + PINCTRL_PIN(92, "GP111_SPI_2_SS1"), 188 + PINCTRL_PIN(93, "GP112_SPI_2_SS2"), 189 + PINCTRL_PIN(94, "GP113_SPI_2_SS3"), 190 + PINCTRL_PIN(95, "GP114_SPI_2_RXD"), 191 + PINCTRL_PIN(96, "GP115_SPI_2_TXD"), 192 + PINCTRL_PIN(97, "GP116_SPI_3_CLK"), 193 + PINCTRL_PIN(98, "GP117_SPI_3_SS"), 194 + PINCTRL_PIN(99, "GP118_SPI_3_RXD"), 195 + PINCTRL_PIN(100, "GP119_SPI_3_TXD"), 196 196 /* Family 7: I2C (14 pins) */ 197 197 PINCTRL_PIN(101, "GP19_I2C_1_SCL"), 198 198 PINCTRL_PIN(102, "GP20_I2C_1_SDA"), ··· 340 340 }; 341 341 342 342 static const unsigned int mrfld_sdio_pins[] = { 50, 51, 52, 53, 54, 55, 56 }; 343 + static const unsigned int mrfld_i2s2_pins[] = { 75, 76, 77, 78 }; 343 344 static const unsigned int mrfld_spi5_pins[] = { 90, 91, 92, 93, 94, 95, 96 }; 344 345 static const unsigned int mrfld_uart0_pins[] = { 115, 116, 117, 118 }; 345 346 static const unsigned int mrfld_uart1_pins[] = { 119, 120, 121, 122 }; ··· 352 351 353 352 static const struct intel_pingroup mrfld_groups[] = { 354 353 PIN_GROUP("sdio_grp", mrfld_sdio_pins, 1), 354 + PIN_GROUP("i2s2_grp", mrfld_i2s2_pins, 1), 355 355 PIN_GROUP("spi5_grp", mrfld_spi5_pins, 1), 356 356 PIN_GROUP("uart0_grp", mrfld_uart0_pins, 1), 357 357 PIN_GROUP("uart1_grp", mrfld_uart1_pins, 1), ··· 364 362 }; 365 363 366 364 static const char * const mrfld_sdio_groups[] = { "sdio_grp" }; 365 + static const char * const mrfld_i2s2_groups[] = { "i2s2_grp" }; 367 366 static const char * const mrfld_spi5_groups[] = { "spi5_grp" }; 368 367 static const char * const mrfld_uart0_groups[] = { "uart0_grp" }; 369 368 static const char * const mrfld_uart1_groups[] = { "uart1_grp" }; ··· 376 373 377 374 static const struct intel_function mrfld_functions[] = { 378 375 FUNCTION("sdio", mrfld_sdio_groups), 376 + FUNCTION("i2s2", mrfld_i2s2_groups), 379 377 FUNCTION("spi5", mrfld_spi5_groups), 380 378 FUNCTION("uart0", mrfld_uart0_groups), 381 379 FUNCTION("uart1", mrfld_uart1_groups),
+358
drivers/pinctrl/intel/pinctrl-tigerlake.c
··· 380 380 .ncommunities = ARRAY_SIZE(tgllp_communities), 381 381 }; 382 382 383 + /* Tiger Lake-H */ 384 + static const struct pinctrl_pin_desc tglh_pins[] = { 385 + /* GPP_A */ 386 + PINCTRL_PIN(0, "SPI0_IO_2"), 387 + PINCTRL_PIN(1, "SPI0_IO_3"), 388 + PINCTRL_PIN(2, "SPI0_MOSI_IO_0"), 389 + PINCTRL_PIN(3, "SPI0_MISO_IO_1"), 390 + PINCTRL_PIN(4, "SPI0_TPM_CSB"), 391 + PINCTRL_PIN(5, "SPI0_FLASH_0_CSB"), 392 + PINCTRL_PIN(6, "SPI0_FLASH_1_CSB"), 393 + PINCTRL_PIN(7, "SPI0_CLK"), 394 + PINCTRL_PIN(8, "ESPI_IO_0"), 395 + PINCTRL_PIN(9, "ESPI_IO_1"), 396 + PINCTRL_PIN(10, "ESPI_IO_2"), 397 + PINCTRL_PIN(11, "ESPI_IO_3"), 398 + PINCTRL_PIN(12, "ESPI_CS0B"), 399 + PINCTRL_PIN(13, "ESPI_CLK"), 400 + PINCTRL_PIN(14, "ESPI_RESETB"), 401 + PINCTRL_PIN(15, "ESPI_CS1B"), 402 + PINCTRL_PIN(16, "ESPI_CS2B"), 403 + PINCTRL_PIN(17, "ESPI_CS3B"), 404 + PINCTRL_PIN(18, "ESPI_ALERT0B"), 405 + PINCTRL_PIN(19, "ESPI_ALERT1B"), 406 + PINCTRL_PIN(20, "ESPI_ALERT2B"), 407 + PINCTRL_PIN(21, "ESPI_ALERT3B"), 408 + PINCTRL_PIN(22, "GPPC_A_14"), 409 + PINCTRL_PIN(23, "SPI0_CLK_LOOPBK"), 410 + PINCTRL_PIN(24, "ESPI_CLK_LOOPBK"), 411 + /* GPP_R */ 412 + PINCTRL_PIN(25, "HDA_BCLK"), 413 + PINCTRL_PIN(26, "HDA_SYNC"), 414 + PINCTRL_PIN(27, "HDA_SDO"), 415 + PINCTRL_PIN(28, "HDA_SDI_0"), 416 + PINCTRL_PIN(29, "HDA_RSTB"), 417 + PINCTRL_PIN(30, "HDA_SDI_1"), 418 + PINCTRL_PIN(31, "GPP_R_6"), 419 + PINCTRL_PIN(32, "GPP_R_7"), 420 + PINCTRL_PIN(33, "GPP_R_8"), 421 + PINCTRL_PIN(34, "PCIE_LNK_DOWN"), 422 + PINCTRL_PIN(35, "ISH_UART0_RTSB"), 423 + PINCTRL_PIN(36, "SX_EXIT_HOLDOFFB"), 424 + PINCTRL_PIN(37, "CLKOUT_48"), 425 + PINCTRL_PIN(38, "ISH_GP_7"), 426 + PINCTRL_PIN(39, "ISH_GP_0"), 427 + PINCTRL_PIN(40, "ISH_GP_1"), 428 + PINCTRL_PIN(41, "ISH_GP_2"), 429 + PINCTRL_PIN(42, "ISH_GP_3"), 430 + PINCTRL_PIN(43, "ISH_GP_4"), 431 + PINCTRL_PIN(44, "ISH_GP_5"), 432 + /* GPP_B */ 433 + PINCTRL_PIN(45, "GSPI0_CS1B"), 434 + PINCTRL_PIN(46, "GSPI1_CS1B"), 435 + PINCTRL_PIN(47, "VRALERTB"), 436 + PINCTRL_PIN(48, "CPU_GP_2"), 437 + PINCTRL_PIN(49, "CPU_GP_3"), 438 + PINCTRL_PIN(50, "SRCCLKREQB_0"), 439 + PINCTRL_PIN(51, "SRCCLKREQB_1"), 440 + PINCTRL_PIN(52, "SRCCLKREQB_2"), 441 + PINCTRL_PIN(53, "SRCCLKREQB_3"), 442 + PINCTRL_PIN(54, "SRCCLKREQB_4"), 443 + PINCTRL_PIN(55, "SRCCLKREQB_5"), 444 + PINCTRL_PIN(56, "I2S_MCLK"), 445 + PINCTRL_PIN(57, "SLP_S0B"), 446 + PINCTRL_PIN(58, "PLTRSTB"), 447 + PINCTRL_PIN(59, "SPKR"), 448 + PINCTRL_PIN(60, "GSPI0_CS0B"), 449 + PINCTRL_PIN(61, "GSPI0_CLK"), 450 + PINCTRL_PIN(62, "GSPI0_MISO"), 451 + PINCTRL_PIN(63, "GSPI0_MOSI"), 452 + PINCTRL_PIN(64, "GSPI1_CS0B"), 453 + PINCTRL_PIN(65, "GSPI1_CLK"), 454 + PINCTRL_PIN(66, "GSPI1_MISO"), 455 + PINCTRL_PIN(67, "GSPI1_MOSI"), 456 + PINCTRL_PIN(68, "SML1ALERTB"), 457 + PINCTRL_PIN(69, "GSPI0_CLK_LOOPBK"), 458 + PINCTRL_PIN(70, "GSPI1_CLK_LOOPBK"), 459 + /* vGPIO_0 */ 460 + PINCTRL_PIN(71, "ESPI_USB_OCB_0"), 461 + PINCTRL_PIN(72, "ESPI_USB_OCB_1"), 462 + PINCTRL_PIN(73, "ESPI_USB_OCB_2"), 463 + PINCTRL_PIN(74, "ESPI_USB_OCB_3"), 464 + PINCTRL_PIN(75, "USB_CPU_OCB_0"), 465 + PINCTRL_PIN(76, "USB_CPU_OCB_1"), 466 + PINCTRL_PIN(77, "USB_CPU_OCB_2"), 467 + PINCTRL_PIN(78, "USB_CPU_OCB_3"), 468 + /* GPP_D */ 469 + PINCTRL_PIN(79, "SPI1_CSB"), 470 + PINCTRL_PIN(80, "SPI1_CLK"), 471 + PINCTRL_PIN(81, "SPI1_MISO_IO_1"), 472 + PINCTRL_PIN(82, "SPI1_MOSI_IO_0"), 473 + PINCTRL_PIN(83, "SML1CLK"), 474 + PINCTRL_PIN(84, "I2S2_SFRM"), 475 + PINCTRL_PIN(85, "I2S2_TXD"), 476 + PINCTRL_PIN(86, "I2S2_RXD"), 477 + PINCTRL_PIN(87, "I2S2_SCLK"), 478 + PINCTRL_PIN(88, "SML0CLK"), 479 + PINCTRL_PIN(89, "SML0DATA"), 480 + PINCTRL_PIN(90, "GPP_D_11"), 481 + PINCTRL_PIN(91, "ISH_UART0_CTSB"), 482 + PINCTRL_PIN(92, "SPI1_IO_2"), 483 + PINCTRL_PIN(93, "SPI1_IO_3"), 484 + PINCTRL_PIN(94, "SML1DATA"), 485 + PINCTRL_PIN(95, "GSPI3_CS0B"), 486 + PINCTRL_PIN(96, "GSPI3_CLK"), 487 + PINCTRL_PIN(97, "GSPI3_MISO"), 488 + PINCTRL_PIN(98, "GSPI3_MOSI"), 489 + PINCTRL_PIN(99, "UART3_RXD"), 490 + PINCTRL_PIN(100, "UART3_TXD"), 491 + PINCTRL_PIN(101, "UART3_RTSB"), 492 + PINCTRL_PIN(102, "UART3_CTSB"), 493 + PINCTRL_PIN(103, "SPI1_CLK_LOOPBK"), 494 + PINCTRL_PIN(104, "GSPI3_CLK_LOOPBK"), 495 + /* GPP_C */ 496 + PINCTRL_PIN(105, "SMBCLK"), 497 + PINCTRL_PIN(106, "SMBDATA"), 498 + PINCTRL_PIN(107, "SMBALERTB"), 499 + PINCTRL_PIN(108, "ISH_UART0_RXD"), 500 + PINCTRL_PIN(109, "ISH_UART0_TXD"), 501 + PINCTRL_PIN(110, "SML0ALERTB"), 502 + PINCTRL_PIN(111, "ISH_I2C2_SDA"), 503 + PINCTRL_PIN(112, "ISH_I2C2_SCL"), 504 + PINCTRL_PIN(113, "UART0_RXD"), 505 + PINCTRL_PIN(114, "UART0_TXD"), 506 + PINCTRL_PIN(115, "UART0_RTSB"), 507 + PINCTRL_PIN(116, "UART0_CTSB"), 508 + PINCTRL_PIN(117, "UART1_RXD"), 509 + PINCTRL_PIN(118, "UART1_TXD"), 510 + PINCTRL_PIN(119, "UART1_RTSB"), 511 + PINCTRL_PIN(120, "UART1_CTSB"), 512 + PINCTRL_PIN(121, "I2C0_SDA"), 513 + PINCTRL_PIN(122, "I2C0_SCL"), 514 + PINCTRL_PIN(123, "I2C1_SDA"), 515 + PINCTRL_PIN(124, "I2C1_SCL"), 516 + PINCTRL_PIN(125, "UART2_RXD"), 517 + PINCTRL_PIN(126, "UART2_TXD"), 518 + PINCTRL_PIN(127, "UART2_RTSB"), 519 + PINCTRL_PIN(128, "UART2_CTSB"), 520 + /* GPP_S */ 521 + PINCTRL_PIN(129, "SNDW1_CLK"), 522 + PINCTRL_PIN(130, "SNDW1_DATA"), 523 + PINCTRL_PIN(131, "SNDW2_CLK"), 524 + PINCTRL_PIN(132, "SNDW2_DATA"), 525 + PINCTRL_PIN(133, "SNDW3_CLK"), 526 + PINCTRL_PIN(134, "SNDW3_DATA"), 527 + PINCTRL_PIN(135, "SNDW4_CLK"), 528 + PINCTRL_PIN(136, "SNDW4_DATA"), 529 + /* GPP_G */ 530 + PINCTRL_PIN(137, "DDPA_CTRLCLK"), 531 + PINCTRL_PIN(138, "DDPA_CTRLDATA"), 532 + PINCTRL_PIN(139, "DNX_FORCE_RELOAD"), 533 + PINCTRL_PIN(140, "GMII_MDC_0"), 534 + PINCTRL_PIN(141, "GMII_MDIO_0"), 535 + PINCTRL_PIN(142, "SLP_DRAMB"), 536 + PINCTRL_PIN(143, "GPPC_G_6"), 537 + PINCTRL_PIN(144, "GPPC_G_7"), 538 + PINCTRL_PIN(145, "ISH_SPI_CSB"), 539 + PINCTRL_PIN(146, "ISH_SPI_CLK"), 540 + PINCTRL_PIN(147, "ISH_SPI_MISO"), 541 + PINCTRL_PIN(148, "ISH_SPI_MOSI"), 542 + PINCTRL_PIN(149, "DDP1_CTRLCLK"), 543 + PINCTRL_PIN(150, "DDP1_CTRLDATA"), 544 + PINCTRL_PIN(151, "DDP2_CTRLCLK"), 545 + PINCTRL_PIN(152, "DDP2_CTRLDATA"), 546 + PINCTRL_PIN(153, "GSPI2_CLK_LOOPBK"), 547 + /* vGPIO */ 548 + PINCTRL_PIN(154, "CNV_BTEN"), 549 + PINCTRL_PIN(155, "CNV_BT_HOST_WAKEB"), 550 + PINCTRL_PIN(156, "CNV_BT_IF_SELECT"), 551 + PINCTRL_PIN(157, "vCNV_BT_UART_TXD"), 552 + PINCTRL_PIN(158, "vCNV_BT_UART_RXD"), 553 + PINCTRL_PIN(159, "vCNV_BT_UART_CTS_B"), 554 + PINCTRL_PIN(160, "vCNV_BT_UART_RTS_B"), 555 + PINCTRL_PIN(161, "vCNV_MFUART1_TXD"), 556 + PINCTRL_PIN(162, "vCNV_MFUART1_RXD"), 557 + PINCTRL_PIN(163, "vCNV_MFUART1_CTS_B"), 558 + PINCTRL_PIN(164, "vCNV_MFUART1_RTS_B"), 559 + PINCTRL_PIN(165, "vUART0_TXD"), 560 + PINCTRL_PIN(166, "vUART0_RXD"), 561 + PINCTRL_PIN(167, "vUART0_CTS_B"), 562 + PINCTRL_PIN(168, "vUART0_RTS_B"), 563 + PINCTRL_PIN(169, "vISH_UART0_TXD"), 564 + PINCTRL_PIN(170, "vISH_UART0_RXD"), 565 + PINCTRL_PIN(171, "vISH_UART0_CTS_B"), 566 + PINCTRL_PIN(172, "vISH_UART0_RTS_B"), 567 + PINCTRL_PIN(173, "vCNV_BT_I2S_BCLK"), 568 + PINCTRL_PIN(174, "vCNV_BT_I2S_WS_SYNC"), 569 + PINCTRL_PIN(175, "vCNV_BT_I2S_SDO"), 570 + PINCTRL_PIN(176, "vCNV_BT_I2S_SDI"), 571 + PINCTRL_PIN(177, "vI2S2_SCLK"), 572 + PINCTRL_PIN(178, "vI2S2_SFRM"), 573 + PINCTRL_PIN(179, "vI2S2_TXD"), 574 + PINCTRL_PIN(180, "vI2S2_RXD"), 575 + /* GPP_E */ 576 + PINCTRL_PIN(181, "SATAXPCIE_0"), 577 + PINCTRL_PIN(182, "SATAXPCIE_1"), 578 + PINCTRL_PIN(183, "SATAXPCIE_2"), 579 + PINCTRL_PIN(184, "CPU_GP_0"), 580 + PINCTRL_PIN(185, "SATA_DEVSLP_0"), 581 + PINCTRL_PIN(186, "SATA_DEVSLP_1"), 582 + PINCTRL_PIN(187, "SATA_DEVSLP_2"), 583 + PINCTRL_PIN(188, "CPU_GP_1"), 584 + PINCTRL_PIN(189, "SATA_LEDB"), 585 + PINCTRL_PIN(190, "USB2_OCB_0"), 586 + PINCTRL_PIN(191, "USB2_OCB_1"), 587 + PINCTRL_PIN(192, "USB2_OCB_2"), 588 + PINCTRL_PIN(193, "USB2_OCB_3"), 589 + /* GPP_F */ 590 + PINCTRL_PIN(194, "SATAXPCIE_3"), 591 + PINCTRL_PIN(195, "SATAXPCIE_4"), 592 + PINCTRL_PIN(196, "SATAXPCIE_5"), 593 + PINCTRL_PIN(197, "SATAXPCIE_6"), 594 + PINCTRL_PIN(198, "SATAXPCIE_7"), 595 + PINCTRL_PIN(199, "SATA_DEVSLP_3"), 596 + PINCTRL_PIN(200, "SATA_DEVSLP_4"), 597 + PINCTRL_PIN(201, "SATA_DEVSLP_5"), 598 + PINCTRL_PIN(202, "SATA_DEVSLP_6"), 599 + PINCTRL_PIN(203, "SATA_DEVSLP_7"), 600 + PINCTRL_PIN(204, "SATA_SCLOCK"), 601 + PINCTRL_PIN(205, "SATA_SLOAD"), 602 + PINCTRL_PIN(206, "SATA_SDATAOUT1"), 603 + PINCTRL_PIN(207, "SATA_SDATAOUT0"), 604 + PINCTRL_PIN(208, "PS_ONB"), 605 + PINCTRL_PIN(209, "M2_SKT2_CFG_0"), 606 + PINCTRL_PIN(210, "M2_SKT2_CFG_1"), 607 + PINCTRL_PIN(211, "M2_SKT2_CFG_2"), 608 + PINCTRL_PIN(212, "M2_SKT2_CFG_3"), 609 + PINCTRL_PIN(213, "L_VDDEN"), 610 + PINCTRL_PIN(214, "L_BKLTEN"), 611 + PINCTRL_PIN(215, "L_BKLTCTL"), 612 + PINCTRL_PIN(216, "VNN_CTRL"), 613 + PINCTRL_PIN(217, "GPP_F_23"), 614 + /* GPP_H */ 615 + PINCTRL_PIN(218, "SRCCLKREQB_6"), 616 + PINCTRL_PIN(219, "SRCCLKREQB_7"), 617 + PINCTRL_PIN(220, "SRCCLKREQB_8"), 618 + PINCTRL_PIN(221, "SRCCLKREQB_9"), 619 + PINCTRL_PIN(222, "SRCCLKREQB_10"), 620 + PINCTRL_PIN(223, "SRCCLKREQB_11"), 621 + PINCTRL_PIN(224, "SRCCLKREQB_12"), 622 + PINCTRL_PIN(225, "SRCCLKREQB_13"), 623 + PINCTRL_PIN(226, "SRCCLKREQB_14"), 624 + PINCTRL_PIN(227, "SRCCLKREQB_15"), 625 + PINCTRL_PIN(228, "SML2CLK"), 626 + PINCTRL_PIN(229, "SML2DATA"), 627 + PINCTRL_PIN(230, "SML2ALERTB"), 628 + PINCTRL_PIN(231, "SML3CLK"), 629 + PINCTRL_PIN(232, "SML3DATA"), 630 + PINCTRL_PIN(233, "SML3ALERTB"), 631 + PINCTRL_PIN(234, "SML4CLK"), 632 + PINCTRL_PIN(235, "SML4DATA"), 633 + PINCTRL_PIN(236, "SML4ALERTB"), 634 + PINCTRL_PIN(237, "ISH_I2C0_SDA"), 635 + PINCTRL_PIN(238, "ISH_I2C0_SCL"), 636 + PINCTRL_PIN(239, "ISH_I2C1_SDA"), 637 + PINCTRL_PIN(240, "ISH_I2C1_SCL"), 638 + PINCTRL_PIN(241, "TIME_SYNC_0"), 639 + /* GPP_J */ 640 + PINCTRL_PIN(242, "CNV_PA_BLANKING"), 641 + PINCTRL_PIN(243, "CPU_C10_GATEB"), 642 + PINCTRL_PIN(244, "CNV_BRI_DT"), 643 + PINCTRL_PIN(245, "CNV_BRI_RSP"), 644 + PINCTRL_PIN(246, "CNV_RGI_DT"), 645 + PINCTRL_PIN(247, "CNV_RGI_RSP"), 646 + PINCTRL_PIN(248, "CNV_MFUART2_RXD"), 647 + PINCTRL_PIN(249, "CNV_MFUART2_TXD"), 648 + PINCTRL_PIN(250, "GPP_J_8"), 649 + PINCTRL_PIN(251, "GPP_J_9"), 650 + /* GPP_K */ 651 + PINCTRL_PIN(252, "GSXDOUT"), 652 + PINCTRL_PIN(253, "GSXSLOAD"), 653 + PINCTRL_PIN(254, "GSXDIN"), 654 + PINCTRL_PIN(255, "GSXSRESETB"), 655 + PINCTRL_PIN(256, "GSXCLK"), 656 + PINCTRL_PIN(257, "ADR_COMPLETE"), 657 + PINCTRL_PIN(258, "DDSP_HPD_A"), 658 + PINCTRL_PIN(259, "DDSP_HPD_B"), 659 + PINCTRL_PIN(260, "CORE_VID_0"), 660 + PINCTRL_PIN(261, "CORE_VID_1"), 661 + PINCTRL_PIN(262, "DDSP_HPD_C"), 662 + PINCTRL_PIN(263, "GPP_K_11"), 663 + PINCTRL_PIN(264, "SYS_PWROK"), 664 + PINCTRL_PIN(265, "SYS_RESETB"), 665 + PINCTRL_PIN(266, "MLK_RSTB"), 666 + /* GPP_I */ 667 + PINCTRL_PIN(267, "PMCALERTB"), 668 + PINCTRL_PIN(268, "DDSP_HPD_1"), 669 + PINCTRL_PIN(269, "DDSP_HPD_2"), 670 + PINCTRL_PIN(270, "DDSP_HPD_3"), 671 + PINCTRL_PIN(271, "DDSP_HPD_4"), 672 + PINCTRL_PIN(272, "DDPB_CTRLCLK"), 673 + PINCTRL_PIN(273, "DDPB_CTRLDATA"), 674 + PINCTRL_PIN(274, "DDPC_CTRLCLK"), 675 + PINCTRL_PIN(275, "DDPC_CTRLDATA"), 676 + PINCTRL_PIN(276, "FUSA_DIAGTEST_EN"), 677 + PINCTRL_PIN(277, "FUSA_DIAGTEST_MODE"), 678 + PINCTRL_PIN(278, "USB2_OCB_4"), 679 + PINCTRL_PIN(279, "USB2_OCB_5"), 680 + PINCTRL_PIN(280, "USB2_OCB_6"), 681 + PINCTRL_PIN(281, "USB2_OCB_7"), 682 + /* JTAG */ 683 + PINCTRL_PIN(282, "JTAG_TDO"), 684 + PINCTRL_PIN(283, "JTAGX"), 685 + PINCTRL_PIN(284, "PRDYB"), 686 + PINCTRL_PIN(285, "PREQB"), 687 + PINCTRL_PIN(286, "JTAG_TDI"), 688 + PINCTRL_PIN(287, "JTAG_TMS"), 689 + PINCTRL_PIN(288, "JTAG_TCK"), 690 + PINCTRL_PIN(289, "DBG_PMODE"), 691 + PINCTRL_PIN(290, "CPU_TRSTB"), 692 + }; 693 + 694 + static const struct intel_padgroup tglh_community0_gpps[] = { 695 + TGL_GPP(0, 0, 24, 0), /* GPP_A */ 696 + TGL_GPP(1, 25, 44, 128), /* GPP_R */ 697 + TGL_GPP(2, 45, 70, 32), /* GPP_B */ 698 + TGL_GPP(3, 71, 78, INTEL_GPIO_BASE_NOMAP), /* vGPIO_0 */ 699 + }; 700 + 701 + static const struct intel_padgroup tglh_community1_gpps[] = { 702 + TGL_GPP(0, 79, 104, 96), /* GPP_D */ 703 + TGL_GPP(1, 105, 128, 64), /* GPP_C */ 704 + TGL_GPP(2, 129, 136, 160), /* GPP_S */ 705 + TGL_GPP(3, 137, 153, 192), /* GPP_G */ 706 + TGL_GPP(4, 154, 180, 224), /* vGPIO */ 707 + }; 708 + 709 + static const struct intel_padgroup tglh_community3_gpps[] = { 710 + TGL_GPP(0, 181, 193, 256), /* GPP_E */ 711 + TGL_GPP(1, 194, 217, 288), /* GPP_F */ 712 + }; 713 + 714 + static const struct intel_padgroup tglh_community4_gpps[] = { 715 + TGL_GPP(0, 218, 241, 320), /* GPP_H */ 716 + TGL_GPP(1, 242, 251, 384), /* GPP_J */ 717 + TGL_GPP(2, 252, 266, 352), /* GPP_K */ 718 + }; 719 + 720 + static const struct intel_padgroup tglh_community5_gpps[] = { 721 + TGL_GPP(0, 267, 281, 416), /* GPP_I */ 722 + TGL_GPP(1, 282, 290, INTEL_GPIO_BASE_NOMAP), /* JTAG */ 723 + }; 724 + 725 + static const struct intel_community tglh_communities[] = { 726 + TGL_COMMUNITY(0, 0, 78, tglh_community0_gpps), 727 + TGL_COMMUNITY(1, 79, 180, tglh_community1_gpps), 728 + TGL_COMMUNITY(2, 181, 217, tglh_community3_gpps), 729 + TGL_COMMUNITY(3, 218, 266, tglh_community4_gpps), 730 + TGL_COMMUNITY(4, 267, 290, tglh_community5_gpps), 731 + }; 732 + 733 + static const struct intel_pinctrl_soc_data tglh_soc_data = { 734 + .pins = tglh_pins, 735 + .npins = ARRAY_SIZE(tglh_pins), 736 + .communities = tglh_communities, 737 + .ncommunities = ARRAY_SIZE(tglh_communities), 738 + }; 739 + 383 740 static const struct acpi_device_id tgl_pinctrl_acpi_match[] = { 384 741 { "INT34C5", (kernel_ulong_t)&tgllp_soc_data }, 742 + { "INT34C6", (kernel_ulong_t)&tglh_soc_data }, 385 743 { } 386 744 }; 387 745 MODULE_DEVICE_TABLE(acpi, tgl_pinctrl_acpi_match);
+12
drivers/pinctrl/mediatek/Kconfig
··· 93 93 default ARM64 && ARCH_MEDIATEK 94 94 select PINCTRL_MTK_PARIS 95 95 96 + config PINCTRL_MT6779 97 + tristate "Mediatek MT6779 pin control" 98 + depends on OF 99 + depends on ARM64 || COMPILE_TEST 100 + default ARM64 && ARCH_MEDIATEK 101 + select PINCTRL_MTK_PARIS 102 + help 103 + Say yes here to support pin controller and gpio driver 104 + on Mediatek MT6779 SoC. 105 + In MTK platform, we support virtual gpio and use it to 106 + map specific eint which doesn't have real gpio pin. 107 + 96 108 config PINCTRL_MT6797 97 109 bool "Mediatek MT6797 pin control" 98 110 depends on OF
+1
drivers/pinctrl/mediatek/Makefile
··· 12 12 obj-$(CONFIG_PINCTRL_MT8135) += pinctrl-mt8135.o 13 13 obj-$(CONFIG_PINCTRL_MT8127) += pinctrl-mt8127.o 14 14 obj-$(CONFIG_PINCTRL_MT6765) += pinctrl-mt6765.o 15 + obj-$(CONFIG_PINCTRL_MT6779) += pinctrl-mt6779.o 15 16 obj-$(CONFIG_PINCTRL_MT6797) += pinctrl-mt6797.o 16 17 obj-$(CONFIG_PINCTRL_MT7622) += pinctrl-mt7622.o 17 18 obj-$(CONFIG_PINCTRL_MT7623) += pinctrl-mt7623.o
+785
drivers/pinctrl/mediatek/pinctrl-mt6779.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 2 + /* 3 + * Copyright (C) 2019 MediaTek Inc. 4 + * Author: Andy Teng <andy.teng@mediatek.com> 5 + * 6 + */ 7 + 8 + #include <linux/module.h> 9 + #include "pinctrl-mtk-mt6779.h" 10 + #include "pinctrl-paris.h" 11 + 12 + /* MT6779 have multiple bases to program pin configuration listed as the below: 13 + * gpio:0x10005000, iocfg_rm:0x11C20000, iocfg_br:0x11D10000, 14 + * iocfg_lm:0x11E20000, iocfg_lb:0x11E70000, iocfg_rt:0x11EA0000, 15 + * iocfg_lt:0x11F20000, iocfg_tl:0x11F30000 16 + * _i_based could be used to indicate what base the pin should be mapped into. 17 + */ 18 + 19 + #define PIN_FIELD_BASE(s_pin, e_pin, i_base, s_addr, x_addrs, s_bit, x_bits) \ 20 + PIN_FIELD_CALC(s_pin, e_pin, i_base, s_addr, x_addrs, s_bit, x_bits, \ 21 + 32, 0) 22 + 23 + #define PINS_FIELD_BASE(s_pin, e_pin, i_base, s_addr, x_addrs, s_bit, x_bits) \ 24 + PIN_FIELD_CALC(s_pin, e_pin, i_base, s_addr, x_addrs, s_bit, x_bits, \ 25 + 32, 1) 26 + 27 + static const struct mtk_pin_field_calc mt6779_pin_mode_range[] = { 28 + PIN_FIELD_BASE(0, 7, 0, 0x0300, 0x10, 0, 4), 29 + PIN_FIELD_BASE(8, 15, 0, 0x0310, 0x10, 0, 4), 30 + PIN_FIELD_BASE(16, 23, 0, 0x0320, 0x10, 0, 4), 31 + PIN_FIELD_BASE(24, 31, 0, 0x0330, 0x10, 0, 4), 32 + PIN_FIELD_BASE(32, 39, 0, 0x0340, 0x10, 0, 4), 33 + PIN_FIELD_BASE(40, 47, 0, 0x0350, 0x10, 0, 4), 34 + PIN_FIELD_BASE(48, 55, 0, 0x0360, 0x10, 0, 4), 35 + PIN_FIELD_BASE(56, 63, 0, 0x0370, 0x10, 0, 4), 36 + PIN_FIELD_BASE(64, 71, 0, 0x0380, 0x10, 0, 4), 37 + PIN_FIELD_BASE(72, 79, 0, 0x0390, 0x10, 0, 4), 38 + PIN_FIELD_BASE(80, 87, 0, 0x03A0, 0x10, 0, 4), 39 + PIN_FIELD_BASE(88, 95, 0, 0x03B0, 0x10, 0, 4), 40 + PIN_FIELD_BASE(96, 103, 0, 0x03C0, 0x10, 0, 4), 41 + PIN_FIELD_BASE(104, 111, 0, 0x03D0, 0x10, 0, 4), 42 + PIN_FIELD_BASE(112, 119, 0, 0x03E0, 0x10, 0, 4), 43 + PIN_FIELD_BASE(120, 127, 0, 0x03F0, 0x10, 0, 4), 44 + PIN_FIELD_BASE(128, 135, 0, 0x0400, 0x10, 0, 4), 45 + PIN_FIELD_BASE(136, 143, 0, 0x0410, 0x10, 0, 4), 46 + PIN_FIELD_BASE(144, 151, 0, 0x0420, 0x10, 0, 4), 47 + PIN_FIELD_BASE(152, 159, 0, 0x0430, 0x10, 0, 4), 48 + PIN_FIELD_BASE(160, 167, 0, 0x0440, 0x10, 0, 4), 49 + PIN_FIELD_BASE(168, 175, 0, 0x0450, 0x10, 0, 4), 50 + PIN_FIELD_BASE(176, 183, 0, 0x0460, 0x10, 0, 4), 51 + PIN_FIELD_BASE(184, 191, 0, 0x0470, 0x10, 0, 4), 52 + PIN_FIELD_BASE(192, 199, 0, 0x0480, 0x10, 0, 4), 53 + PIN_FIELD_BASE(200, 202, 0, 0x0490, 0x10, 0, 4), 54 + }; 55 + 56 + static const struct mtk_pin_field_calc mt6779_pin_dir_range[] = { 57 + PIN_FIELD_BASE(0, 31, 0, 0x0000, 0x10, 0, 1), 58 + PIN_FIELD_BASE(32, 63, 0, 0x0010, 0x10, 0, 1), 59 + PIN_FIELD_BASE(64, 95, 0, 0x0020, 0x10, 0, 1), 60 + PIN_FIELD_BASE(96, 127, 0, 0x0030, 0x10, 0, 1), 61 + PIN_FIELD_BASE(128, 159, 0, 0x0040, 0x10, 0, 1), 62 + PIN_FIELD_BASE(160, 191, 0, 0x0050, 0x10, 0, 1), 63 + PIN_FIELD_BASE(192, 202, 0, 0x0060, 0x10, 0, 1), 64 + }; 65 + 66 + static const struct mtk_pin_field_calc mt6779_pin_di_range[] = { 67 + PIN_FIELD_BASE(0, 31, 0, 0x0200, 0x10, 0, 1), 68 + PIN_FIELD_BASE(32, 63, 0, 0x0210, 0x10, 0, 1), 69 + PIN_FIELD_BASE(64, 95, 0, 0x0220, 0x10, 0, 1), 70 + PIN_FIELD_BASE(96, 127, 0, 0x0230, 0x10, 0, 1), 71 + PIN_FIELD_BASE(128, 159, 0, 0x0240, 0x10, 0, 1), 72 + PIN_FIELD_BASE(160, 191, 0, 0x0250, 0x10, 0, 1), 73 + PIN_FIELD_BASE(192, 202, 0, 0x0260, 0x10, 0, 1), 74 + }; 75 + 76 + static const struct mtk_pin_field_calc mt6779_pin_do_range[] = { 77 + PIN_FIELD_BASE(0, 31, 0, 0x0100, 0x10, 0, 1), 78 + PIN_FIELD_BASE(32, 63, 0, 0x0110, 0x10, 0, 1), 79 + PIN_FIELD_BASE(64, 95, 0, 0x0120, 0x10, 0, 1), 80 + PIN_FIELD_BASE(96, 127, 0, 0x0130, 0x10, 0, 1), 81 + PIN_FIELD_BASE(128, 159, 0, 0x0140, 0x10, 0, 1), 82 + PIN_FIELD_BASE(160, 191, 0, 0x0150, 0x10, 0, 1), 83 + PIN_FIELD_BASE(192, 202, 0, 0x0160, 0x10, 0, 1), 84 + }; 85 + 86 + static const struct mtk_pin_field_calc mt6779_pin_ies_range[] = { 87 + PIN_FIELD_BASE(0, 9, 6, 0x0030, 0x10, 3, 1), 88 + PIN_FIELD_BASE(10, 16, 3, 0x0050, 0x10, 0, 1), 89 + PIN_FIELD_BASE(17, 18, 6, 0x0030, 0x10, 28, 1), 90 + PIN_FIELD_BASE(19, 19, 6, 0x0030, 0x10, 27, 1), 91 + PIN_FIELD_BASE(20, 20, 6, 0x0030, 0x10, 26, 1), 92 + PIN_FIELD_BASE(21, 24, 6, 0x0030, 0x10, 19, 1), 93 + PIN_FIELD_BASE(25, 25, 6, 0x0030, 0x10, 30, 1), 94 + PIN_FIELD_BASE(26, 26, 6, 0x0030, 0x10, 23, 1), 95 + PIN_FIELD_BASE(27, 27, 6, 0x0030, 0x10, 0, 1), 96 + PIN_FIELD_BASE(28, 29, 6, 0x0030, 0x10, 24, 1), 97 + PIN_FIELD_BASE(30, 30, 6, 0x0030, 0x10, 16, 1), 98 + PIN_FIELD_BASE(31, 31, 6, 0x0030, 0x10, 13, 1), 99 + PIN_FIELD_BASE(32, 32, 6, 0x0030, 0x10, 15, 1), 100 + PIN_FIELD_BASE(33, 33, 6, 0x0030, 0x10, 17, 1), 101 + PIN_FIELD_BASE(34, 34, 6, 0x0030, 0x10, 14, 1), 102 + PIN_FIELD_BASE(35, 35, 6, 0x0040, 0x10, 4, 1), 103 + PIN_FIELD_BASE(36, 36, 6, 0x0030, 0x10, 31, 1), 104 + PIN_FIELD_BASE(37, 37, 6, 0x0040, 0x10, 5, 1), 105 + PIN_FIELD_BASE(38, 41, 6, 0x0040, 0x10, 0, 1), 106 + PIN_FIELD_BASE(42, 43, 6, 0x0030, 0x10, 1, 1), 107 + PIN_FIELD_BASE(44, 44, 6, 0x0030, 0x10, 18, 1), 108 + PIN_FIELD_BASE(45, 45, 3, 0x0050, 0x10, 14, 1), 109 + PIN_FIELD_BASE(46, 46, 3, 0x0050, 0x10, 22, 1), 110 + PIN_FIELD_BASE(47, 47, 3, 0x0050, 0x10, 25, 1), 111 + PIN_FIELD_BASE(48, 48, 3, 0x0050, 0x10, 24, 1), 112 + PIN_FIELD_BASE(49, 49, 3, 0x0050, 0x10, 26, 1), 113 + PIN_FIELD_BASE(50, 50, 3, 0x0050, 0x10, 23, 1), 114 + PIN_FIELD_BASE(51, 51, 3, 0x0050, 0x10, 11, 1), 115 + PIN_FIELD_BASE(52, 52, 3, 0x0050, 0x10, 19, 1), 116 + PIN_FIELD_BASE(53, 54, 3, 0x0050, 0x10, 27, 1), 117 + PIN_FIELD_BASE(55, 55, 3, 0x0050, 0x10, 13, 1), 118 + PIN_FIELD_BASE(56, 56, 3, 0x0050, 0x10, 21, 1), 119 + PIN_FIELD_BASE(57, 57, 3, 0x0050, 0x10, 10, 1), 120 + PIN_FIELD_BASE(58, 58, 3, 0x0050, 0x10, 9, 1), 121 + PIN_FIELD_BASE(59, 60, 3, 0x0050, 0x10, 7, 1), 122 + PIN_FIELD_BASE(61, 61, 3, 0x0050, 0x10, 12, 1), 123 + PIN_FIELD_BASE(62, 62, 3, 0x0050, 0x10, 20, 1), 124 + PIN_FIELD_BASE(63, 63, 3, 0x0050, 0x10, 17, 1), 125 + PIN_FIELD_BASE(64, 64, 3, 0x0050, 0x10, 16, 1), 126 + PIN_FIELD_BASE(65, 65, 3, 0x0050, 0x10, 18, 1), 127 + PIN_FIELD_BASE(66, 66, 3, 0x0050, 0x10, 15, 1), 128 + PIN_FIELD_BASE(67, 67, 2, 0x0060, 0x10, 7, 1), 129 + PIN_FIELD_BASE(68, 68, 2, 0x0060, 0x10, 6, 1), 130 + PIN_FIELD_BASE(69, 69, 2, 0x0060, 0x10, 8, 1), 131 + PIN_FIELD_BASE(70, 71, 2, 0x0060, 0x10, 4, 1), 132 + PIN_FIELD_BASE(72, 72, 4, 0x0020, 0x10, 3, 1), 133 + PIN_FIELD_BASE(73, 73, 4, 0x0020, 0x10, 2, 1), 134 + PIN_FIELD_BASE(74, 74, 4, 0x0020, 0x10, 1, 1), 135 + PIN_FIELD_BASE(75, 75, 4, 0x0020, 0x10, 4, 1), 136 + PIN_FIELD_BASE(76, 76, 4, 0x0020, 0x10, 12, 1), 137 + PIN_FIELD_BASE(77, 77, 4, 0x0020, 0x10, 11, 1), 138 + PIN_FIELD_BASE(78, 78, 2, 0x0050, 0x10, 18, 1), 139 + PIN_FIELD_BASE(79, 79, 2, 0x0050, 0x10, 17, 1), 140 + PIN_FIELD_BASE(80, 81, 2, 0x0050, 0x10, 19, 1), 141 + PIN_FIELD_BASE(82, 88, 2, 0x0050, 0x10, 1, 1), 142 + PIN_FIELD_BASE(89, 89, 2, 0x0050, 0x10, 16, 1), 143 + PIN_FIELD_BASE(90, 90, 2, 0x0050, 0x10, 15, 1), 144 + PIN_FIELD_BASE(91, 91, 2, 0x0050, 0x10, 14, 1), 145 + PIN_FIELD_BASE(92, 92, 2, 0x0050, 0x10, 8, 1), 146 + PIN_FIELD_BASE(93, 93, 4, 0x0020, 0x10, 0, 1), 147 + PIN_FIELD_BASE(94, 94, 2, 0x0050, 0x10, 0, 1), 148 + PIN_FIELD_BASE(95, 95, 4, 0x0020, 0x10, 7, 1), 149 + PIN_FIELD_BASE(96, 96, 4, 0x0020, 0x10, 5, 1), 150 + PIN_FIELD_BASE(97, 97, 4, 0x0020, 0x10, 8, 1), 151 + PIN_FIELD_BASE(98, 98, 4, 0x0020, 0x10, 6, 1), 152 + PIN_FIELD_BASE(99, 99, 2, 0x0060, 0x10, 9, 1), 153 + PIN_FIELD_BASE(100, 100, 2, 0x0060, 0x10, 12, 1), 154 + PIN_FIELD_BASE(101, 101, 2, 0x0060, 0x10, 10, 1), 155 + PIN_FIELD_BASE(102, 102, 2, 0x0060, 0x10, 13, 1), 156 + PIN_FIELD_BASE(103, 103, 2, 0x0060, 0x10, 11, 1), 157 + PIN_FIELD_BASE(104, 104, 2, 0x0060, 0x10, 14, 1), 158 + PIN_FIELD_BASE(105, 105, 2, 0x0050, 0x10, 10, 1), 159 + PIN_FIELD_BASE(106, 106, 2, 0x0050, 0x10, 9, 1), 160 + PIN_FIELD_BASE(107, 108, 2, 0x0050, 0x10, 12, 1), 161 + PIN_FIELD_BASE(109, 109, 2, 0x0050, 0x10, 11, 1), 162 + PIN_FIELD_BASE(110, 110, 2, 0x0060, 0x10, 16, 1), 163 + PIN_FIELD_BASE(111, 111, 2, 0x0060, 0x10, 18, 1), 164 + PIN_FIELD_BASE(112, 112, 2, 0x0060, 0x10, 15, 1), 165 + PIN_FIELD_BASE(113, 113, 2, 0x0060, 0x10, 17, 1), 166 + PIN_FIELD_BASE(114, 115, 2, 0x0050, 0x10, 26, 1), 167 + PIN_FIELD_BASE(116, 117, 2, 0x0050, 0x10, 21, 1), 168 + PIN_FIELD_BASE(118, 118, 2, 0x0050, 0x10, 31, 1), 169 + PIN_FIELD_BASE(119, 119, 2, 0x0060, 0x10, 0, 1), 170 + PIN_FIELD_BASE(120, 121, 2, 0x0050, 0x10, 23, 1), 171 + PIN_FIELD_BASE(122, 123, 2, 0x0050, 0x10, 28, 1), 172 + PIN_FIELD_BASE(124, 125, 2, 0x0060, 0x10, 1, 1), 173 + PIN_FIELD_BASE(126, 127, 1, 0x0030, 0x10, 8, 1), 174 + PIN_FIELD_BASE(128, 129, 1, 0x0030, 0x10, 17, 1), 175 + PIN_FIELD_BASE(130, 130, 1, 0x0030, 0x10, 16, 1), 176 + PIN_FIELD_BASE(131, 131, 1, 0x0030, 0x10, 19, 1), 177 + PIN_FIELD_BASE(132, 132, 1, 0x0030, 0x10, 21, 1), 178 + PIN_FIELD_BASE(133, 133, 1, 0x0030, 0x10, 20, 1), 179 + PIN_FIELD_BASE(134, 135, 1, 0x0030, 0x10, 2, 1), 180 + PIN_FIELD_BASE(136, 136, 1, 0x0030, 0x10, 7, 1), 181 + PIN_FIELD_BASE(137, 137, 1, 0x0030, 0x10, 4, 1), 182 + PIN_FIELD_BASE(138, 138, 1, 0x0030, 0x10, 6, 1), 183 + PIN_FIELD_BASE(139, 139, 1, 0x0030, 0x10, 5, 1), 184 + PIN_FIELD_BASE(140, 141, 1, 0x0030, 0x10, 0, 1), 185 + PIN_FIELD_BASE(142, 142, 1, 0x0030, 0x10, 15, 1), 186 + PIN_FIELD_BASE(143, 143, 5, 0x0020, 0x10, 15, 1), 187 + PIN_FIELD_BASE(144, 144, 5, 0x0020, 0x10, 17, 1), 188 + PIN_FIELD_BASE(145, 145, 5, 0x0020, 0x10, 16, 1), 189 + PIN_FIELD_BASE(146, 146, 5, 0x0020, 0x10, 12, 1), 190 + PIN_FIELD_BASE(147, 155, 5, 0x0020, 0x10, 0, 1), 191 + PIN_FIELD_BASE(156, 157, 5, 0x0020, 0x10, 22, 1), 192 + PIN_FIELD_BASE(158, 158, 5, 0x0020, 0x10, 21, 1), 193 + PIN_FIELD_BASE(159, 159, 5, 0x0020, 0x10, 24, 1), 194 + PIN_FIELD_BASE(160, 161, 5, 0x0020, 0x10, 19, 1), 195 + PIN_FIELD_BASE(162, 166, 5, 0x0020, 0x10, 25, 1), 196 + PIN_FIELD_BASE(167, 168, 7, 0x0010, 0x10, 1, 1), 197 + PIN_FIELD_BASE(169, 169, 7, 0x0010, 0x10, 4, 1), 198 + PIN_FIELD_BASE(170, 170, 7, 0x0010, 0x10, 6, 1), 199 + PIN_FIELD_BASE(171, 171, 7, 0x0010, 0x10, 8, 1), 200 + PIN_FIELD_BASE(172, 172, 7, 0x0010, 0x10, 3, 1), 201 + PIN_FIELD_BASE(173, 173, 7, 0x0010, 0x10, 7, 1), 202 + PIN_FIELD_BASE(174, 175, 7, 0x0010, 0x10, 9, 1), 203 + PIN_FIELD_BASE(176, 176, 7, 0x0010, 0x10, 0, 1), 204 + PIN_FIELD_BASE(177, 177, 7, 0x0010, 0x10, 5, 1), 205 + PIN_FIELD_BASE(178, 178, 7, 0x0010, 0x10, 11, 1), 206 + PIN_FIELD_BASE(179, 179, 4, 0x0020, 0x10, 13, 1), 207 + PIN_FIELD_BASE(180, 180, 4, 0x0020, 0x10, 10, 1), 208 + PIN_FIELD_BASE(181, 183, 1, 0x0030, 0x10, 22, 1), 209 + PIN_FIELD_BASE(184, 184, 1, 0x0030, 0x10, 12, 1), 210 + PIN_FIELD_BASE(185, 185, 1, 0x0030, 0x10, 11, 1), 211 + PIN_FIELD_BASE(186, 186, 1, 0x0030, 0x10, 13, 1), 212 + PIN_FIELD_BASE(187, 187, 1, 0x0030, 0x10, 10, 1), 213 + PIN_FIELD_BASE(188, 188, 1, 0x0030, 0x10, 14, 1), 214 + PIN_FIELD_BASE(189, 189, 5, 0x0020, 0x10, 9, 1), 215 + PIN_FIELD_BASE(190, 190, 5, 0x0020, 0x10, 18, 1), 216 + PIN_FIELD_BASE(191, 192, 5, 0x0020, 0x10, 13, 1), 217 + PIN_FIELD_BASE(193, 194, 5, 0x0020, 0x10, 10, 1), 218 + PIN_FIELD_BASE(195, 195, 2, 0x0050, 0x10, 30, 1), 219 + PIN_FIELD_BASE(196, 196, 2, 0x0050, 0x10, 25, 1), 220 + PIN_FIELD_BASE(197, 197, 2, 0x0060, 0x10, 3, 1), 221 + PIN_FIELD_BASE(198, 199, 4, 0x0020, 0x10, 14, 1), 222 + PIN_FIELD_BASE(200, 201, 6, 0x0040, 0x10, 6, 1), 223 + PIN_FIELD_BASE(202, 202, 4, 0x0020, 0x10, 9, 1), 224 + }; 225 + 226 + static const struct mtk_pin_field_calc mt6779_pin_smt_range[] = { 227 + PINS_FIELD_BASE(0, 9, 6, 0x00c0, 0x10, 3, 1), 228 + PIN_FIELD_BASE(10, 11, 3, 0x00e0, 0x10, 0, 1), 229 + PINS_FIELD_BASE(12, 15, 3, 0x00e0, 0x10, 2, 1), 230 + PIN_FIELD_BASE(16, 16, 3, 0x00e0, 0x10, 3, 1), 231 + PINS_FIELD_BASE(17, 20, 6, 0x00c0, 0x10, 11, 1), 232 + PINS_FIELD_BASE(21, 24, 6, 0x00c0, 0x10, 7, 1), 233 + PIN_FIELD_BASE(25, 25, 6, 0x00c0, 0x10, 12, 1), 234 + PIN_FIELD_BASE(26, 26, 6, 0x00c0, 0x10, 8, 1), 235 + PIN_FIELD_BASE(27, 27, 6, 0x00c0, 0x10, 0, 1), 236 + PIN_FIELD_BASE(28, 29, 6, 0x00c0, 0x10, 9, 1), 237 + PINS_FIELD_BASE(30, 32, 6, 0x00c0, 0x10, 4, 1), 238 + PIN_FIELD_BASE(33, 33, 6, 0x00c0, 0x10, 5, 1), 239 + PIN_FIELD_BASE(34, 34, 6, 0x00c0, 0x10, 4, 1), 240 + PINS_FIELD_BASE(35, 41, 6, 0x00c0, 0x10, 13, 1), 241 + PIN_FIELD_BASE(42, 43, 6, 0x00c0, 0x10, 1, 1), 242 + PIN_FIELD_BASE(44, 44, 6, 0x00c0, 0x10, 6, 1), 243 + PIN_FIELD_BASE(45, 45, 3, 0x00e0, 0x10, 8, 1), 244 + PIN_FIELD_BASE(46, 46, 3, 0x00e0, 0x10, 13, 1), 245 + PINS_FIELD_BASE(47, 50, 3, 0x00e0, 0x10, 14, 1), 246 + PIN_FIELD_BASE(51, 51, 3, 0x00e0, 0x10, 5, 1), 247 + PIN_FIELD_BASE(52, 52, 3, 0x00e0, 0x10, 10, 1), 248 + PIN_FIELD_BASE(53, 54, 3, 0x00e0, 0x10, 15, 1), 249 + PIN_FIELD_BASE(55, 55, 3, 0x00e0, 0x10, 7, 1), 250 + PIN_FIELD_BASE(56, 56, 3, 0x00e0, 0x10, 12, 1), 251 + PINS_FIELD_BASE(57, 60, 3, 0x00e0, 0x10, 4, 1), 252 + PIN_FIELD_BASE(61, 61, 3, 0x00e0, 0x10, 6, 1), 253 + PIN_FIELD_BASE(62, 62, 3, 0x00e0, 0x10, 11, 1), 254 + PINS_FIELD_BASE(63, 66, 3, 0x00e0, 0x10, 9, 1), 255 + PINS_FIELD_BASE(67, 69, 2, 0x00e0, 0x10, 11, 1), 256 + PIN_FIELD_BASE(70, 71, 2, 0x00e0, 0x10, 10, 1), 257 + PINS_FIELD_BASE(72, 75, 4, 0x0070, 0x10, 1, 1), 258 + PINS_FIELD_BASE(76, 77, 4, 0x0070, 0x10, 4, 1), 259 + PINS_FIELD_BASE(78, 86, 2, 0x00e0, 0x10, 1, 1), 260 + PINS_FIELD_BASE(87, 92, 2, 0x00e0, 0x10, 2, 1), 261 + PIN_FIELD_BASE(93, 93, 4, 0x0070, 0x10, 0, 1), 262 + PIN_FIELD_BASE(94, 94, 2, 0x00e0, 0x10, 2, 1), 263 + PINS_FIELD_BASE(95, 98, 4, 0x0070, 0x10, 2, 1), 264 + PINS_FIELD_BASE(99, 104, 2, 0x00e0, 0x10, 12, 1), 265 + PINS_FIELD_BASE(105, 109, 2, 0x00e0, 0x10, 0, 1), 266 + PIN_FIELD_BASE(110, 110, 2, 0x00e0, 0x10, 14, 1), 267 + PIN_FIELD_BASE(111, 111, 2, 0x00e0, 0x10, 16, 1), 268 + PIN_FIELD_BASE(112, 112, 2, 0x00e0, 0x10, 13, 1), 269 + PIN_FIELD_BASE(113, 113, 2, 0x00e0, 0x10, 15, 1), 270 + PINS_FIELD_BASE(114, 115, 2, 0x00e0, 0x10, 4, 1), 271 + PIN_FIELD_BASE(116, 117, 2, 0x00e0, 0x10, 5, 1), 272 + PINS_FIELD_BASE(118, 119, 2, 0x00e0, 0x10, 4, 1), 273 + PIN_FIELD_BASE(120, 121, 2, 0x00e0, 0x10, 7, 1), 274 + PINS_FIELD_BASE(122, 125, 2, 0x00e0, 0x10, 3, 1), 275 + PINS_FIELD_BASE(126, 127, 1, 0x00c0, 0x10, 5, 1), 276 + PINS_FIELD_BASE(128, 130, 1, 0x00c0, 0x10, 9, 1), 277 + PINS_FIELD_BASE(131, 133, 1, 0x00c0, 0x10, 10, 1), 278 + PIN_FIELD_BASE(134, 135, 1, 0x00c0, 0x10, 2, 1), 279 + PINS_FIELD_BASE(136, 139, 1, 0x00c0, 0x10, 4, 1), 280 + PIN_FIELD_BASE(140, 141, 1, 0x00c0, 0x10, 0, 1), 281 + PIN_FIELD_BASE(142, 142, 1, 0x00c0, 0x10, 8, 1), 282 + PINS_FIELD_BASE(143, 146, 5, 0x0060, 0x10, 1, 1), 283 + PINS_FIELD_BASE(147, 155, 5, 0x0060, 0x10, 0, 1), 284 + PIN_FIELD_BASE(156, 157, 5, 0x0060, 0x10, 6, 1), 285 + PIN_FIELD_BASE(158, 158, 5, 0x0060, 0x10, 5, 1), 286 + PIN_FIELD_BASE(159, 159, 5, 0x0060, 0x10, 8, 1), 287 + PIN_FIELD_BASE(160, 161, 5, 0x0060, 0x10, 3, 1), 288 + PINS_FIELD_BASE(162, 166, 5, 0x0060, 0x10, 2, 1), 289 + PIN_FIELD_BASE(167, 167, 7, 0x0060, 0x10, 1, 1), 290 + PINS_FIELD_BASE(168, 174, 7, 0x0060, 0x10, 2, 1), 291 + PIN_FIELD_BASE(175, 175, 7, 0x0060, 0x10, 3, 1), 292 + PIN_FIELD_BASE(176, 176, 7, 0x0060, 0x10, 0, 1), 293 + PINS_FIELD_BASE(177, 178, 7, 0x0060, 0x10, 2, 1), 294 + PINS_FIELD_BASE(179, 180, 4, 0x0070, 0x10, 4, 1), 295 + PIN_FIELD_BASE(181, 183, 1, 0x00c0, 0x10, 11, 1), 296 + PINS_FIELD_BASE(184, 187, 1, 0x00c0, 0x10, 6, 1), 297 + PIN_FIELD_BASE(188, 188, 1, 0x00c0, 0x10, 7, 1), 298 + PINS_FIELD_BASE(189, 194, 5, 0x0060, 0x10, 1, 1), 299 + PIN_FIELD_BASE(195, 195, 2, 0x00e0, 0x10, 3, 1), 300 + PIN_FIELD_BASE(196, 196, 2, 0x00e0, 0x10, 9, 1), 301 + PIN_FIELD_BASE(197, 197, 2, 0x00e0, 0x10, 3, 1), 302 + PIN_FIELD_BASE(198, 199, 4, 0x0070, 0x10, 5, 1), 303 + PIN_FIELD_BASE(200, 201, 6, 0x00c0, 0x10, 14, 1), 304 + PIN_FIELD_BASE(202, 202, 4, 0x0070, 0x10, 3, 1), 305 + }; 306 + 307 + static const struct mtk_pin_field_calc mt6779_pin_pu_range[] = { 308 + PIN_FIELD_BASE(0, 9, 6, 0x0070, 0x10, 3, 1), 309 + PIN_FIELD_BASE(16, 16, 3, 0x0080, 0x10, 0, 1), 310 + PIN_FIELD_BASE(17, 18, 6, 0x0070, 0x10, 28, 1), 311 + PIN_FIELD_BASE(19, 19, 6, 0x0070, 0x10, 27, 1), 312 + PIN_FIELD_BASE(20, 20, 6, 0x0070, 0x10, 26, 1), 313 + PIN_FIELD_BASE(21, 24, 6, 0x0070, 0x10, 19, 1), 314 + PIN_FIELD_BASE(25, 25, 6, 0x0070, 0x10, 30, 1), 315 + PIN_FIELD_BASE(26, 26, 6, 0x0070, 0x10, 23, 1), 316 + PIN_FIELD_BASE(27, 27, 6, 0x0070, 0x10, 0, 1), 317 + PIN_FIELD_BASE(28, 29, 6, 0x0070, 0x10, 24, 1), 318 + PIN_FIELD_BASE(30, 30, 6, 0x0070, 0x10, 16, 1), 319 + PIN_FIELD_BASE(31, 31, 6, 0x0070, 0x10, 13, 1), 320 + PIN_FIELD_BASE(32, 32, 6, 0x0070, 0x10, 15, 1), 321 + PIN_FIELD_BASE(33, 33, 6, 0x0070, 0x10, 17, 1), 322 + PIN_FIELD_BASE(34, 34, 6, 0x0070, 0x10, 14, 1), 323 + PIN_FIELD_BASE(35, 35, 6, 0x0080, 0x10, 5, 1), 324 + PIN_FIELD_BASE(36, 36, 6, 0x0080, 0x10, 0, 1), 325 + PIN_FIELD_BASE(37, 37, 6, 0x0080, 0x10, 6, 1), 326 + PIN_FIELD_BASE(38, 41, 6, 0x0080, 0x10, 1, 1), 327 + PIN_FIELD_BASE(42, 43, 6, 0x0070, 0x10, 1, 1), 328 + PIN_FIELD_BASE(44, 44, 6, 0x0070, 0x10, 18, 1), 329 + PIN_FIELD_BASE(45, 45, 3, 0x0080, 0x10, 4, 1), 330 + PIN_FIELD_BASE(46, 46, 3, 0x0080, 0x10, 12, 1), 331 + PIN_FIELD_BASE(47, 47, 3, 0x0080, 0x10, 15, 1), 332 + PIN_FIELD_BASE(48, 48, 3, 0x0080, 0x10, 14, 1), 333 + PIN_FIELD_BASE(49, 49, 3, 0x0080, 0x10, 16, 1), 334 + PIN_FIELD_BASE(50, 50, 3, 0x0080, 0x10, 13, 1), 335 + PIN_FIELD_BASE(51, 51, 3, 0x0080, 0x10, 1, 1), 336 + PIN_FIELD_BASE(52, 52, 3, 0x0080, 0x10, 9, 1), 337 + PIN_FIELD_BASE(53, 54, 3, 0x0080, 0x10, 18, 1), 338 + PIN_FIELD_BASE(55, 55, 3, 0x0080, 0x10, 3, 1), 339 + PIN_FIELD_BASE(56, 56, 3, 0x0080, 0x10, 11, 1), 340 + PIN_FIELD_BASE(61, 61, 3, 0x0080, 0x10, 2, 1), 341 + PIN_FIELD_BASE(62, 62, 3, 0x0080, 0x10, 10, 1), 342 + PIN_FIELD_BASE(63, 63, 3, 0x0080, 0x10, 7, 1), 343 + PIN_FIELD_BASE(64, 64, 3, 0x0080, 0x10, 6, 1), 344 + PIN_FIELD_BASE(65, 65, 3, 0x0080, 0x10, 8, 1), 345 + PIN_FIELD_BASE(66, 66, 3, 0x0080, 0x10, 5, 1), 346 + PIN_FIELD_BASE(67, 67, 2, 0x00a0, 0x10, 7, 1), 347 + PIN_FIELD_BASE(68, 68, 2, 0x00a0, 0x10, 6, 1), 348 + PIN_FIELD_BASE(69, 69, 2, 0x00a0, 0x10, 8, 1), 349 + PIN_FIELD_BASE(70, 71, 2, 0x00a0, 0x10, 4, 1), 350 + PIN_FIELD_BASE(72, 72, 4, 0x0040, 0x10, 3, 1), 351 + PIN_FIELD_BASE(73, 73, 4, 0x0040, 0x10, 2, 1), 352 + PIN_FIELD_BASE(74, 74, 4, 0x0040, 0x10, 1, 1), 353 + PIN_FIELD_BASE(75, 75, 4, 0x0040, 0x10, 4, 1), 354 + PIN_FIELD_BASE(76, 76, 4, 0x0040, 0x10, 12, 1), 355 + PIN_FIELD_BASE(77, 77, 4, 0x0040, 0x10, 11, 1), 356 + PIN_FIELD_BASE(78, 78, 2, 0x0090, 0x10, 18, 1), 357 + PIN_FIELD_BASE(79, 79, 2, 0x0090, 0x10, 17, 1), 358 + PIN_FIELD_BASE(80, 81, 2, 0x0090, 0x10, 19, 1), 359 + PIN_FIELD_BASE(82, 88, 2, 0x0090, 0x10, 1, 1), 360 + PIN_FIELD_BASE(89, 89, 2, 0x0090, 0x10, 16, 1), 361 + PIN_FIELD_BASE(90, 90, 2, 0x0090, 0x10, 15, 1), 362 + PIN_FIELD_BASE(91, 91, 2, 0x0090, 0x10, 14, 1), 363 + PIN_FIELD_BASE(92, 92, 2, 0x0090, 0x10, 8, 1), 364 + PIN_FIELD_BASE(93, 93, 4, 0x0040, 0x10, 0, 1), 365 + PIN_FIELD_BASE(94, 94, 2, 0x0090, 0x10, 0, 1), 366 + PIN_FIELD_BASE(95, 95, 4, 0x0040, 0x10, 7, 1), 367 + PIN_FIELD_BASE(96, 96, 4, 0x0040, 0x10, 5, 1), 368 + PIN_FIELD_BASE(97, 97, 4, 0x0040, 0x10, 8, 1), 369 + PIN_FIELD_BASE(98, 98, 4, 0x0040, 0x10, 6, 1), 370 + PIN_FIELD_BASE(99, 99, 2, 0x00a0, 0x10, 9, 1), 371 + PIN_FIELD_BASE(100, 100, 2, 0x00a0, 0x10, 12, 1), 372 + PIN_FIELD_BASE(101, 101, 2, 0x00a0, 0x10, 10, 1), 373 + PIN_FIELD_BASE(102, 102, 2, 0x00a0, 0x10, 13, 1), 374 + PIN_FIELD_BASE(103, 103, 2, 0x00a0, 0x10, 11, 1), 375 + PIN_FIELD_BASE(104, 104, 2, 0x00a0, 0x10, 14, 1), 376 + PIN_FIELD_BASE(105, 105, 2, 0x0090, 0x10, 10, 1), 377 + PIN_FIELD_BASE(106, 106, 2, 0x0090, 0x10, 9, 1), 378 + PIN_FIELD_BASE(107, 108, 2, 0x0090, 0x10, 12, 1), 379 + PIN_FIELD_BASE(109, 109, 2, 0x0090, 0x10, 11, 1), 380 + PIN_FIELD_BASE(110, 110, 2, 0x00a0, 0x10, 16, 1), 381 + PIN_FIELD_BASE(111, 111, 2, 0x00a0, 0x10, 18, 1), 382 + PIN_FIELD_BASE(112, 112, 2, 0x00a0, 0x10, 15, 1), 383 + PIN_FIELD_BASE(113, 113, 2, 0x00a0, 0x10, 17, 1), 384 + PIN_FIELD_BASE(114, 115, 2, 0x0090, 0x10, 26, 1), 385 + PIN_FIELD_BASE(116, 117, 2, 0x0090, 0x10, 21, 1), 386 + PIN_FIELD_BASE(118, 118, 2, 0x0090, 0x10, 31, 1), 387 + PIN_FIELD_BASE(119, 119, 2, 0x00a0, 0x10, 0, 1), 388 + PIN_FIELD_BASE(120, 121, 2, 0x0090, 0x10, 23, 1), 389 + PIN_FIELD_BASE(122, 123, 2, 0x0090, 0x10, 28, 1), 390 + PIN_FIELD_BASE(124, 125, 2, 0x00a0, 0x10, 1, 1), 391 + PIN_FIELD_BASE(126, 127, 1, 0x0070, 0x10, 2, 1), 392 + PIN_FIELD_BASE(140, 141, 1, 0x0070, 0x10, 0, 1), 393 + PIN_FIELD_BASE(142, 142, 1, 0x0070, 0x10, 9, 1), 394 + PIN_FIELD_BASE(143, 143, 5, 0x0040, 0x10, 15, 1), 395 + PIN_FIELD_BASE(144, 144, 5, 0x0040, 0x10, 17, 1), 396 + PIN_FIELD_BASE(145, 145, 5, 0x0040, 0x10, 16, 1), 397 + PIN_FIELD_BASE(146, 146, 5, 0x0040, 0x10, 12, 1), 398 + PIN_FIELD_BASE(147, 155, 5, 0x0040, 0x10, 0, 1), 399 + PIN_FIELD_BASE(156, 157, 5, 0x0040, 0x10, 22, 1), 400 + PIN_FIELD_BASE(158, 158, 5, 0x0040, 0x10, 21, 1), 401 + PIN_FIELD_BASE(159, 159, 5, 0x0040, 0x10, 24, 1), 402 + PIN_FIELD_BASE(160, 161, 5, 0x0040, 0x10, 19, 1), 403 + PIN_FIELD_BASE(162, 166, 5, 0x0040, 0x10, 25, 1), 404 + PIN_FIELD_BASE(179, 179, 4, 0x0040, 0x10, 13, 1), 405 + PIN_FIELD_BASE(180, 180, 4, 0x0040, 0x10, 10, 1), 406 + PIN_FIELD_BASE(181, 183, 1, 0x0070, 0x10, 10, 1), 407 + PIN_FIELD_BASE(184, 184, 1, 0x0070, 0x10, 6, 1), 408 + PIN_FIELD_BASE(185, 185, 1, 0x0070, 0x10, 5, 1), 409 + PIN_FIELD_BASE(186, 186, 1, 0x0070, 0x10, 7, 1), 410 + PIN_FIELD_BASE(187, 187, 1, 0x0070, 0x10, 4, 1), 411 + PIN_FIELD_BASE(188, 188, 1, 0x0070, 0x10, 8, 1), 412 + PIN_FIELD_BASE(189, 189, 5, 0x0040, 0x10, 9, 1), 413 + PIN_FIELD_BASE(190, 190, 5, 0x0040, 0x10, 18, 1), 414 + PIN_FIELD_BASE(191, 192, 5, 0x0040, 0x10, 13, 1), 415 + PIN_FIELD_BASE(193, 194, 5, 0x0040, 0x10, 10, 1), 416 + PIN_FIELD_BASE(195, 195, 2, 0x0090, 0x10, 30, 1), 417 + PIN_FIELD_BASE(196, 196, 2, 0x0090, 0x10, 25, 1), 418 + PIN_FIELD_BASE(197, 197, 2, 0x00a0, 0x10, 3, 1), 419 + PIN_FIELD_BASE(198, 199, 4, 0x0040, 0x10, 14, 1), 420 + PIN_FIELD_BASE(200, 201, 6, 0x0080, 0x10, 7, 1), 421 + PIN_FIELD_BASE(202, 202, 4, 0x0040, 0x10, 9, 1), 422 + }; 423 + 424 + static const struct mtk_pin_field_calc mt6779_pin_pd_range[] = { 425 + PIN_FIELD_BASE(0, 9, 6, 0x0050, 0x10, 3, 1), 426 + PIN_FIELD_BASE(16, 16, 3, 0x0060, 0x10, 0, 1), 427 + PIN_FIELD_BASE(17, 18, 6, 0x0050, 0x10, 28, 1), 428 + PIN_FIELD_BASE(19, 19, 6, 0x0050, 0x10, 27, 1), 429 + PIN_FIELD_BASE(20, 20, 6, 0x0050, 0x10, 26, 1), 430 + PIN_FIELD_BASE(21, 24, 6, 0x0050, 0x10, 19, 1), 431 + PIN_FIELD_BASE(25, 25, 6, 0x0050, 0x10, 30, 1), 432 + PIN_FIELD_BASE(26, 26, 6, 0x0050, 0x10, 23, 1), 433 + PIN_FIELD_BASE(27, 27, 6, 0x0050, 0x10, 0, 1), 434 + PIN_FIELD_BASE(28, 29, 6, 0x0050, 0x10, 24, 1), 435 + PIN_FIELD_BASE(30, 30, 6, 0x0050, 0x10, 16, 1), 436 + PIN_FIELD_BASE(31, 31, 6, 0x0050, 0x10, 13, 1), 437 + PIN_FIELD_BASE(32, 32, 6, 0x0050, 0x10, 15, 1), 438 + PIN_FIELD_BASE(33, 33, 6, 0x0050, 0x10, 17, 1), 439 + PIN_FIELD_BASE(34, 34, 6, 0x0050, 0x10, 14, 1), 440 + PIN_FIELD_BASE(35, 35, 6, 0x0060, 0x10, 5, 1), 441 + PIN_FIELD_BASE(36, 36, 6, 0x0060, 0x10, 0, 1), 442 + PIN_FIELD_BASE(37, 37, 6, 0x0060, 0x10, 6, 1), 443 + PIN_FIELD_BASE(38, 41, 6, 0x0060, 0x10, 1, 1), 444 + PIN_FIELD_BASE(42, 43, 6, 0x0050, 0x10, 1, 1), 445 + PIN_FIELD_BASE(44, 44, 6, 0x0050, 0x10, 18, 1), 446 + PIN_FIELD_BASE(45, 45, 3, 0x0060, 0x10, 4, 1), 447 + PIN_FIELD_BASE(46, 46, 3, 0x0060, 0x10, 12, 1), 448 + PIN_FIELD_BASE(47, 47, 3, 0x0060, 0x10, 15, 1), 449 + PIN_FIELD_BASE(48, 48, 3, 0x0060, 0x10, 14, 1), 450 + PIN_FIELD_BASE(49, 49, 3, 0x0060, 0x10, 16, 1), 451 + PIN_FIELD_BASE(50, 50, 3, 0x0060, 0x10, 13, 1), 452 + PIN_FIELD_BASE(51, 51, 3, 0x0060, 0x10, 1, 1), 453 + PIN_FIELD_BASE(52, 52, 3, 0x0060, 0x10, 9, 1), 454 + PIN_FIELD_BASE(53, 54, 3, 0x0060, 0x10, 18, 1), 455 + PIN_FIELD_BASE(55, 55, 3, 0x0060, 0x10, 3, 1), 456 + PIN_FIELD_BASE(56, 56, 3, 0x0060, 0x10, 11, 1), 457 + PIN_FIELD_BASE(61, 61, 3, 0x0060, 0x10, 2, 1), 458 + PIN_FIELD_BASE(62, 62, 3, 0x0060, 0x10, 10, 1), 459 + PIN_FIELD_BASE(63, 63, 3, 0x0060, 0x10, 7, 1), 460 + PIN_FIELD_BASE(64, 64, 3, 0x0060, 0x10, 6, 1), 461 + PIN_FIELD_BASE(65, 65, 3, 0x0060, 0x10, 8, 1), 462 + PIN_FIELD_BASE(66, 66, 3, 0x0060, 0x10, 5, 1), 463 + PIN_FIELD_BASE(67, 67, 2, 0x0080, 0x10, 7, 1), 464 + PIN_FIELD_BASE(68, 68, 2, 0x0080, 0x10, 6, 1), 465 + PIN_FIELD_BASE(69, 69, 2, 0x0080, 0x10, 8, 1), 466 + PIN_FIELD_BASE(70, 71, 2, 0x0080, 0x10, 4, 1), 467 + PIN_FIELD_BASE(72, 72, 4, 0x0030, 0x10, 3, 1), 468 + PIN_FIELD_BASE(73, 73, 4, 0x0030, 0x10, 2, 1), 469 + PIN_FIELD_BASE(74, 74, 4, 0x0030, 0x10, 1, 1), 470 + PIN_FIELD_BASE(75, 75, 4, 0x0030, 0x10, 4, 1), 471 + PIN_FIELD_BASE(76, 76, 4, 0x0030, 0x10, 12, 1), 472 + PIN_FIELD_BASE(77, 77, 4, 0x0030, 0x10, 11, 1), 473 + PIN_FIELD_BASE(78, 78, 2, 0x0070, 0x10, 18, 1), 474 + PIN_FIELD_BASE(79, 79, 2, 0x0070, 0x10, 17, 1), 475 + PIN_FIELD_BASE(80, 81, 2, 0x0070, 0x10, 19, 1), 476 + PIN_FIELD_BASE(82, 88, 2, 0x0070, 0x10, 1, 1), 477 + PIN_FIELD_BASE(89, 89, 2, 0x0070, 0x10, 16, 1), 478 + PIN_FIELD_BASE(90, 90, 2, 0x0070, 0x10, 15, 1), 479 + PIN_FIELD_BASE(91, 91, 2, 0x0070, 0x10, 14, 1), 480 + PIN_FIELD_BASE(92, 92, 2, 0x0070, 0x10, 8, 1), 481 + PIN_FIELD_BASE(93, 93, 4, 0x0030, 0x10, 0, 1), 482 + PIN_FIELD_BASE(94, 94, 2, 0x0070, 0x10, 0, 1), 483 + PIN_FIELD_BASE(95, 95, 4, 0x0030, 0x10, 7, 1), 484 + PIN_FIELD_BASE(96, 96, 4, 0x0030, 0x10, 5, 1), 485 + PIN_FIELD_BASE(97, 97, 4, 0x0030, 0x10, 8, 1), 486 + PIN_FIELD_BASE(98, 98, 4, 0x0030, 0x10, 6, 1), 487 + PIN_FIELD_BASE(99, 99, 2, 0x0080, 0x10, 9, 1), 488 + PIN_FIELD_BASE(100, 100, 2, 0x0080, 0x10, 12, 1), 489 + PIN_FIELD_BASE(101, 101, 2, 0x0080, 0x10, 10, 1), 490 + PIN_FIELD_BASE(102, 102, 2, 0x0080, 0x10, 13, 1), 491 + PIN_FIELD_BASE(103, 103, 2, 0x0080, 0x10, 11, 1), 492 + PIN_FIELD_BASE(104, 104, 2, 0x0080, 0x10, 14, 1), 493 + PIN_FIELD_BASE(105, 105, 2, 0x0070, 0x10, 10, 1), 494 + PIN_FIELD_BASE(106, 106, 2, 0x0070, 0x10, 9, 1), 495 + PIN_FIELD_BASE(107, 108, 2, 0x0070, 0x10, 12, 1), 496 + PIN_FIELD_BASE(109, 109, 2, 0x0070, 0x10, 11, 1), 497 + PIN_FIELD_BASE(110, 110, 2, 0x0080, 0x10, 16, 1), 498 + PIN_FIELD_BASE(111, 111, 2, 0x0080, 0x10, 18, 1), 499 + PIN_FIELD_BASE(112, 112, 2, 0x0080, 0x10, 15, 1), 500 + PIN_FIELD_BASE(113, 113, 2, 0x0080, 0x10, 17, 1), 501 + PIN_FIELD_BASE(114, 115, 2, 0x0070, 0x10, 26, 1), 502 + PIN_FIELD_BASE(116, 117, 2, 0x0070, 0x10, 21, 1), 503 + PIN_FIELD_BASE(118, 118, 2, 0x0070, 0x10, 31, 1), 504 + PIN_FIELD_BASE(119, 119, 2, 0x0080, 0x10, 0, 1), 505 + PIN_FIELD_BASE(120, 121, 2, 0x0070, 0x10, 23, 1), 506 + PIN_FIELD_BASE(122, 123, 2, 0x0070, 0x10, 28, 1), 507 + PIN_FIELD_BASE(124, 125, 2, 0x0080, 0x10, 1, 1), 508 + PIN_FIELD_BASE(126, 127, 1, 0x0050, 0x10, 2, 1), 509 + PIN_FIELD_BASE(140, 141, 1, 0x0050, 0x10, 0, 1), 510 + PIN_FIELD_BASE(142, 142, 1, 0x0050, 0x10, 9, 1), 511 + PIN_FIELD_BASE(143, 143, 5, 0x0030, 0x10, 15, 1), 512 + PIN_FIELD_BASE(144, 144, 5, 0x0030, 0x10, 17, 1), 513 + PIN_FIELD_BASE(145, 145, 5, 0x0030, 0x10, 16, 1), 514 + PIN_FIELD_BASE(146, 146, 5, 0x0030, 0x10, 12, 1), 515 + PIN_FIELD_BASE(147, 155, 5, 0x0030, 0x10, 0, 1), 516 + PIN_FIELD_BASE(156, 157, 5, 0x0030, 0x10, 22, 1), 517 + PIN_FIELD_BASE(158, 158, 5, 0x0030, 0x10, 21, 1), 518 + PIN_FIELD_BASE(159, 159, 5, 0x0030, 0x10, 24, 1), 519 + PIN_FIELD_BASE(160, 161, 5, 0x0030, 0x10, 19, 1), 520 + PIN_FIELD_BASE(162, 166, 5, 0x0030, 0x10, 25, 1), 521 + PIN_FIELD_BASE(179, 179, 4, 0x0030, 0x10, 13, 1), 522 + PIN_FIELD_BASE(180, 180, 4, 0x0030, 0x10, 10, 1), 523 + PIN_FIELD_BASE(181, 183, 1, 0x0050, 0x10, 10, 1), 524 + PIN_FIELD_BASE(184, 184, 1, 0x0050, 0x10, 6, 1), 525 + PIN_FIELD_BASE(185, 185, 1, 0x0050, 0x10, 5, 1), 526 + PIN_FIELD_BASE(186, 186, 1, 0x0050, 0x10, 7, 1), 527 + PIN_FIELD_BASE(187, 187, 1, 0x0050, 0x10, 4, 1), 528 + PIN_FIELD_BASE(188, 188, 1, 0x0050, 0x10, 8, 1), 529 + PIN_FIELD_BASE(189, 189, 5, 0x0030, 0x10, 9, 1), 530 + PIN_FIELD_BASE(190, 190, 5, 0x0030, 0x10, 18, 1), 531 + PIN_FIELD_BASE(191, 192, 5, 0x0030, 0x10, 13, 1), 532 + PIN_FIELD_BASE(193, 194, 5, 0x0030, 0x10, 10, 1), 533 + PIN_FIELD_BASE(195, 195, 2, 0x0070, 0x10, 30, 1), 534 + PIN_FIELD_BASE(196, 196, 2, 0x0070, 0x10, 25, 1), 535 + PIN_FIELD_BASE(197, 197, 2, 0x0080, 0x10, 3, 1), 536 + PIN_FIELD_BASE(198, 199, 4, 0x0030, 0x10, 14, 1), 537 + PIN_FIELD_BASE(200, 201, 6, 0x0060, 0x10, 7, 1), 538 + PIN_FIELD_BASE(202, 202, 4, 0x0030, 0x10, 9, 1), 539 + }; 540 + 541 + static const struct mtk_pin_field_calc mt6779_pin_drv_range[] = { 542 + PINS_FIELD_BASE(0, 9, 6, 0x0000, 0x10, 9, 3), 543 + PIN_FIELD_BASE(10, 16, 3, 0x0000, 0x10, 0, 3), 544 + PINS_FIELD_BASE(17, 19, 6, 0x0010, 0x10, 3, 3), 545 + PIN_FIELD_BASE(20, 20, 6, 0x0010, 0x10, 6, 3), 546 + PINS_FIELD_BASE(21, 24, 6, 0x0000, 0x10, 21, 3), 547 + PIN_FIELD_BASE(25, 25, 6, 0x0010, 0x10, 9, 3), 548 + PIN_FIELD_BASE(26, 26, 6, 0x0000, 0x10, 24, 3), 549 + PIN_FIELD_BASE(27, 27, 6, 0x0000, 0x10, 0, 3), 550 + PIN_FIELD_BASE(28, 28, 6, 0x0000, 0x10, 27, 3), 551 + PIN_FIELD_BASE(29, 29, 6, 0x0010, 0x10, 0, 3), 552 + PINS_FIELD_BASE(30, 32, 6, 0x0000, 0x10, 12, 3), 553 + PIN_FIELD_BASE(33, 33, 6, 0x0000, 0x10, 15, 3), 554 + PIN_FIELD_BASE(34, 34, 6, 0x0000, 0x10, 12, 3), 555 + PINS_FIELD_BASE(35, 41, 6, 0x0010, 0x10, 12, 3), 556 + PIN_FIELD_BASE(42, 43, 6, 0x0000, 0x10, 3, 3), 557 + PIN_FIELD_BASE(44, 44, 6, 0x0000, 0x10, 18, 3), 558 + PIN_FIELD_BASE(45, 45, 3, 0x0010, 0x10, 12, 3), 559 + PIN_FIELD_BASE(46, 46, 3, 0x0020, 0x10, 0, 3), 560 + PINS_FIELD_BASE(47, 49, 3, 0x0020, 0x10, 3, 3), 561 + PIN_FIELD_BASE(50, 50, 3, 0x0020, 0x10, 6, 3), 562 + PIN_FIELD_BASE(51, 51, 3, 0x0010, 0x10, 3, 3), 563 + PIN_FIELD_BASE(52, 52, 3, 0x0010, 0x10, 21, 3), 564 + PINS_FIELD_BASE(53, 54, 3, 0x0020, 0x10, 9, 3), 565 + PIN_FIELD_BASE(55, 55, 3, 0x0010, 0x10, 9, 3), 566 + PIN_FIELD_BASE(56, 56, 3, 0x0010, 0x10, 27, 3), 567 + PIN_FIELD_BASE(57, 57, 3, 0x0010, 0x10, 0, 3), 568 + PIN_FIELD_BASE(58, 58, 3, 0x0000, 0x10, 27, 3), 569 + PIN_FIELD_BASE(59, 60, 3, 0x0000, 0x10, 21, 3), 570 + PIN_FIELD_BASE(61, 61, 3, 0x0010, 0x10, 6, 3), 571 + PIN_FIELD_BASE(62, 62, 3, 0x0010, 0x10, 24, 3), 572 + PINS_FIELD_BASE(63, 65, 3, 0x0010, 0x10, 15, 3), 573 + PIN_FIELD_BASE(66, 66, 3, 0x0010, 0x10, 18, 3), 574 + PINS_FIELD_BASE(67, 69, 2, 0x0010, 0x10, 3, 3), 575 + PIN_FIELD_BASE(70, 71, 2, 0x0010, 0x10, 0, 3), 576 + PINS_FIELD_BASE(72, 75, 4, 0x0000, 0x10, 0, 3), 577 + PINS_FIELD_BASE(76, 77, 4, 0x0000, 0x10, 15, 3), 578 + PINS_FIELD_BASE(78, 86, 2, 0x0000, 0x10, 3, 3), 579 + PINS_FIELD_BASE(87, 92, 2, 0x0000, 0x10, 6, 3), 580 + PIN_FIELD_BASE(93, 93, 4, 0x0000, 0x10, 3, 3), 581 + PIN_FIELD_BASE(94, 94, 2, 0x0000, 0x10, 6, 3), 582 + PINS_FIELD_BASE(95, 96, 4, 0x0000, 0x10, 6, 3), 583 + PINS_FIELD_BASE(97, 98, 4, 0x0000, 0x10, 9, 3), 584 + PINS_FIELD_BASE(99, 100, 2, 0x0010, 0x10, 6, 3), 585 + PINS_FIELD_BASE(101, 102, 2, 0x0010, 0x10, 9, 3), 586 + PINS_FIELD_BASE(103, 104, 2, 0x0010, 0x10, 12, 3), 587 + PINS_FIELD_BASE(105, 109, 2, 0x0000, 0x10, 0, 3), 588 + PIN_FIELD_BASE(110, 110, 2, 0x0010, 0x10, 18, 3), 589 + PIN_FIELD_BASE(111, 111, 2, 0x0010, 0x10, 24, 3), 590 + PIN_FIELD_BASE(112, 112, 2, 0x0010, 0x10, 15, 3), 591 + PIN_FIELD_BASE(113, 113, 2, 0x0010, 0x10, 21, 3), 592 + PINS_FIELD_BASE(114, 115, 2, 0x0000, 0x10, 12, 3), 593 + PIN_FIELD_BASE(116, 117, 2, 0x0000, 0x10, 15, 3), 594 + PINS_FIELD_BASE(118, 119, 2, 0x0000, 0x10, 12, 3), 595 + PIN_FIELD_BASE(120, 121, 2, 0x0000, 0x10, 21, 3), 596 + PINS_FIELD_BASE(122, 125, 2, 0x0000, 0x10, 9, 3), 597 + PINS_FIELD_BASE(126, 127, 1, 0x0000, 0x10, 12, 3), 598 + PIN_FIELD_BASE(128, 128, 1, 0x0000, 0x10, 29, 2), 599 + PIN_FIELD_BASE(129, 129, 1, 0x0010, 0x10, 0, 2), 600 + PIN_FIELD_BASE(130, 130, 1, 0x0000, 0x10, 27, 2), 601 + PIN_FIELD_BASE(131, 131, 1, 0x0010, 0x10, 2, 2), 602 + PIN_FIELD_BASE(132, 132, 1, 0x0010, 0x10, 6, 2), 603 + PIN_FIELD_BASE(133, 133, 1, 0x0010, 0x10, 4, 2), 604 + PIN_FIELD_BASE(134, 135, 1, 0x0000, 0x10, 3, 3), 605 + PINS_FIELD_BASE(136, 139, 1, 0x0000, 0x10, 9, 3), 606 + PINS_FIELD_BASE(140, 141, 1, 0x0000, 0x10, 0, 3), 607 + PIN_FIELD_BASE(142, 142, 1, 0x0000, 0x10, 24, 3), 608 + PINS_FIELD_BASE(143, 146, 5, 0x0000, 0x10, 3, 3), 609 + PINS_FIELD_BASE(147, 155, 5, 0x0000, 0x10, 0, 3), 610 + PIN_FIELD_BASE(156, 157, 5, 0x0000, 0x10, 21, 3), 611 + PIN_FIELD_BASE(158, 158, 5, 0x0000, 0x10, 15, 3), 612 + PIN_FIELD_BASE(159, 159, 5, 0x0000, 0x10, 27, 3), 613 + PIN_FIELD_BASE(160, 161, 5, 0x0000, 0x10, 9, 3), 614 + PINS_FIELD_BASE(162, 166, 5, 0x0000, 0x10, 18, 3), 615 + PIN_FIELD_BASE(167, 167, 7, 0x0000, 0x10, 3, 3), 616 + PINS_FIELD_BASE(168, 174, 7, 0x0000, 0x10, 6, 3), 617 + PIN_FIELD_BASE(175, 175, 7, 0x0000, 0x10, 9, 3), 618 + PIN_FIELD_BASE(176, 176, 7, 0x0000, 0x10, 0, 3), 619 + PINS_FIELD_BASE(177, 178, 7, 0x0000, 0x10, 6, 3), 620 + PIN_FIELD_BASE(179, 180, 4, 0x0000, 0x10, 15, 3), 621 + PIN_FIELD_BASE(181, 183, 1, 0x0010, 0x10, 8, 3), 622 + PINS_FIELD_BASE(184, 186, 1, 0x0000, 0x10, 15, 3), 623 + PIN_FIELD_BASE(187, 188, 1, 0x0000, 0x10, 18, 3), 624 + PIN_FIELD_BASE(189, 189, 5, 0x0000, 0x10, 6, 3), 625 + PINS_FIELD_BASE(190, 194, 5, 0x0000, 0x10, 3, 3), 626 + PIN_FIELD_BASE(195, 195, 2, 0x0000, 0x10, 9, 3), 627 + PIN_FIELD_BASE(196, 196, 2, 0x0000, 0x10, 27, 3), 628 + PIN_FIELD_BASE(197, 197, 2, 0x0000, 0x10, 9, 3), 629 + PIN_FIELD_BASE(198, 199, 4, 0x0000, 0x10, 21, 3), 630 + PINS_FIELD_BASE(200, 201, 6, 0x0010, 0x10, 15, 3), 631 + PIN_FIELD_BASE(202, 202, 4, 0x0000, 0x10, 12, 3), 632 + }; 633 + 634 + static const struct mtk_pin_field_calc mt6779_pin_pupd_range[] = { 635 + PIN_FIELD_BASE(10, 15, 3, 0x0070, 0x10, 0, 1), 636 + PIN_FIELD_BASE(57, 57, 3, 0x0070, 0x10, 9, 1), 637 + PIN_FIELD_BASE(58, 58, 3, 0x0070, 0x10, 8, 1), 638 + PIN_FIELD_BASE(59, 60, 3, 0x0070, 0x10, 6, 1), 639 + PIN_FIELD_BASE(128, 129, 1, 0x0060, 0x10, 7, 1), 640 + PIN_FIELD_BASE(130, 130, 1, 0x0060, 0x10, 6, 1), 641 + PIN_FIELD_BASE(131, 131, 1, 0x0060, 0x10, 9, 1), 642 + PIN_FIELD_BASE(132, 132, 1, 0x0060, 0x10, 11, 1), 643 + PIN_FIELD_BASE(133, 133, 1, 0x0060, 0x10, 10, 1), 644 + PIN_FIELD_BASE(134, 135, 1, 0x0060, 0x10, 0, 1), 645 + PIN_FIELD_BASE(136, 136, 1, 0x0060, 0x10, 5, 1), 646 + PIN_FIELD_BASE(137, 137, 1, 0x0060, 0x10, 2, 1), 647 + PIN_FIELD_BASE(138, 138, 1, 0x0060, 0x10, 4, 1), 648 + PIN_FIELD_BASE(139, 139, 1, 0x0060, 0x10, 3, 1), 649 + PIN_FIELD_BASE(167, 168, 7, 0x0020, 0x10, 1, 1), 650 + PIN_FIELD_BASE(169, 169, 7, 0x0020, 0x10, 4, 1), 651 + PIN_FIELD_BASE(170, 170, 7, 0x0020, 0x10, 6, 1), 652 + PIN_FIELD_BASE(171, 171, 7, 0x0020, 0x10, 8, 1), 653 + PIN_FIELD_BASE(172, 172, 7, 0x0020, 0x10, 3, 1), 654 + PIN_FIELD_BASE(173, 173, 7, 0x0020, 0x10, 7, 1), 655 + PIN_FIELD_BASE(174, 175, 7, 0x0020, 0x10, 9, 1), 656 + PIN_FIELD_BASE(176, 176, 7, 0x0020, 0x10, 0, 1), 657 + PIN_FIELD_BASE(177, 177, 7, 0x0020, 0x10, 5, 1), 658 + PIN_FIELD_BASE(178, 178, 7, 0x0020, 0x10, 11, 1), 659 + }; 660 + 661 + static const struct mtk_pin_field_calc mt6779_pin_r0_range[] = { 662 + PIN_FIELD_BASE(10, 15, 3, 0x0090, 0x10, 0, 1), 663 + PIN_FIELD_BASE(57, 57, 3, 0x0090, 0x10, 9, 1), 664 + PIN_FIELD_BASE(58, 58, 3, 0x0090, 0x10, 8, 1), 665 + PIN_FIELD_BASE(59, 60, 3, 0x0090, 0x10, 6, 1), 666 + PIN_FIELD_BASE(128, 129, 1, 0x0080, 0x10, 7, 1), 667 + PIN_FIELD_BASE(130, 130, 1, 0x0080, 0x10, 6, 1), 668 + PIN_FIELD_BASE(131, 131, 1, 0x0080, 0x10, 9, 1), 669 + PIN_FIELD_BASE(132, 132, 1, 0x0080, 0x10, 11, 1), 670 + PIN_FIELD_BASE(133, 133, 1, 0x0080, 0x10, 10, 1), 671 + PIN_FIELD_BASE(134, 135, 1, 0x0080, 0x10, 0, 1), 672 + PIN_FIELD_BASE(136, 136, 1, 0x0080, 0x10, 5, 1), 673 + PIN_FIELD_BASE(137, 137, 1, 0x0080, 0x10, 2, 1), 674 + PIN_FIELD_BASE(138, 138, 1, 0x0080, 0x10, 4, 1), 675 + PIN_FIELD_BASE(139, 139, 1, 0x0080, 0x10, 3, 1), 676 + PIN_FIELD_BASE(167, 168, 7, 0x0030, 0x10, 1, 1), 677 + PIN_FIELD_BASE(169, 169, 7, 0x0030, 0x10, 4, 1), 678 + PIN_FIELD_BASE(170, 170, 7, 0x0030, 0x10, 6, 1), 679 + PIN_FIELD_BASE(171, 171, 7, 0x0030, 0x10, 8, 1), 680 + PIN_FIELD_BASE(172, 172, 7, 0x0030, 0x10, 3, 1), 681 + PIN_FIELD_BASE(173, 173, 7, 0x0030, 0x10, 7, 1), 682 + PIN_FIELD_BASE(174, 175, 7, 0x0030, 0x10, 9, 1), 683 + PIN_FIELD_BASE(176, 176, 7, 0x0030, 0x10, 0, 1), 684 + PIN_FIELD_BASE(177, 177, 7, 0x0030, 0x10, 5, 1), 685 + PIN_FIELD_BASE(178, 178, 7, 0x0030, 0x10, 11, 1), 686 + }; 687 + 688 + static const struct mtk_pin_field_calc mt6779_pin_r1_range[] = { 689 + PIN_FIELD_BASE(10, 15, 3, 0x00a0, 0x10, 0, 1), 690 + PIN_FIELD_BASE(57, 57, 3, 0x00a0, 0x10, 9, 1), 691 + PIN_FIELD_BASE(58, 58, 3, 0x00a0, 0x10, 8, 1), 692 + PIN_FIELD_BASE(59, 60, 3, 0x00a0, 0x10, 6, 1), 693 + PIN_FIELD_BASE(128, 129, 1, 0x0090, 0x10, 7, 1), 694 + PIN_FIELD_BASE(130, 130, 1, 0x0090, 0x10, 6, 1), 695 + PIN_FIELD_BASE(131, 131, 1, 0x0090, 0x10, 9, 1), 696 + PIN_FIELD_BASE(132, 132, 1, 0x0090, 0x10, 11, 1), 697 + PIN_FIELD_BASE(133, 133, 1, 0x0090, 0x10, 10, 1), 698 + PIN_FIELD_BASE(134, 135, 1, 0x0090, 0x10, 0, 1), 699 + PIN_FIELD_BASE(136, 136, 1, 0x0090, 0x10, 5, 1), 700 + PIN_FIELD_BASE(137, 137, 1, 0x0090, 0x10, 2, 1), 701 + PIN_FIELD_BASE(138, 138, 1, 0x0090, 0x10, 4, 1), 702 + PIN_FIELD_BASE(139, 139, 1, 0x0090, 0x10, 3, 1), 703 + PIN_FIELD_BASE(167, 168, 7, 0x0040, 0x10, 1, 1), 704 + PIN_FIELD_BASE(169, 169, 7, 0x0040, 0x10, 4, 1), 705 + PIN_FIELD_BASE(170, 170, 7, 0x0040, 0x10, 6, 1), 706 + PIN_FIELD_BASE(171, 171, 7, 0x0040, 0x10, 8, 1), 707 + PIN_FIELD_BASE(172, 172, 7, 0x0040, 0x10, 3, 1), 708 + PIN_FIELD_BASE(173, 173, 7, 0x0040, 0x10, 7, 1), 709 + PIN_FIELD_BASE(174, 175, 7, 0x0040, 0x10, 9, 1), 710 + PIN_FIELD_BASE(176, 176, 7, 0x0040, 0x10, 0, 1), 711 + PIN_FIELD_BASE(177, 177, 7, 0x0040, 0x10, 5, 1), 712 + PIN_FIELD_BASE(178, 178, 7, 0x0040, 0x10, 11, 1), 713 + }; 714 + 715 + static const struct mtk_pin_reg_calc mt6779_reg_cals[PINCTRL_PIN_REG_MAX] = { 716 + [PINCTRL_PIN_REG_MODE] = MTK_RANGE(mt6779_pin_mode_range), 717 + [PINCTRL_PIN_REG_DIR] = MTK_RANGE(mt6779_pin_dir_range), 718 + [PINCTRL_PIN_REG_DI] = MTK_RANGE(mt6779_pin_di_range), 719 + [PINCTRL_PIN_REG_DO] = MTK_RANGE(mt6779_pin_do_range), 720 + [PINCTRL_PIN_REG_SMT] = MTK_RANGE(mt6779_pin_smt_range), 721 + [PINCTRL_PIN_REG_IES] = MTK_RANGE(mt6779_pin_ies_range), 722 + [PINCTRL_PIN_REG_PU] = MTK_RANGE(mt6779_pin_pu_range), 723 + [PINCTRL_PIN_REG_PD] = MTK_RANGE(mt6779_pin_pd_range), 724 + [PINCTRL_PIN_REG_DRV] = MTK_RANGE(mt6779_pin_drv_range), 725 + [PINCTRL_PIN_REG_PUPD] = MTK_RANGE(mt6779_pin_pupd_range), 726 + [PINCTRL_PIN_REG_R0] = MTK_RANGE(mt6779_pin_r0_range), 727 + [PINCTRL_PIN_REG_R1] = MTK_RANGE(mt6779_pin_r1_range), 728 + }; 729 + 730 + static const char * const mt6779_pinctrl_register_base_names[] = { 731 + "gpio", "iocfg_rm", "iocfg_br", "iocfg_lm", "iocfg_lb", 732 + "iocfg_rt", "iocfg_lt", "iocfg_tl", 733 + }; 734 + 735 + static const struct mtk_eint_hw mt6779_eint_hw = { 736 + .port_mask = 7, 737 + .ports = 6, 738 + .ap_num = 195, 739 + .db_cnt = 13, 740 + }; 741 + 742 + static const struct mtk_pin_soc mt6779_data = { 743 + .reg_cal = mt6779_reg_cals, 744 + .pins = mtk_pins_mt6779, 745 + .npins = ARRAY_SIZE(mtk_pins_mt6779), 746 + .ngrps = ARRAY_SIZE(mtk_pins_mt6779), 747 + .eint_hw = &mt6779_eint_hw, 748 + .gpio_m = 0, 749 + .ies_present = true, 750 + .base_names = mt6779_pinctrl_register_base_names, 751 + .nbase_names = ARRAY_SIZE(mt6779_pinctrl_register_base_names), 752 + .bias_set_combo = mtk_pinconf_bias_set_combo, 753 + .bias_get_combo = mtk_pinconf_bias_get_combo, 754 + .drive_set = mtk_pinconf_drive_set_raw, 755 + .drive_get = mtk_pinconf_drive_get_raw, 756 + .adv_pull_get = mtk_pinconf_adv_pull_get, 757 + .adv_pull_set = mtk_pinconf_adv_pull_set, 758 + }; 759 + 760 + static const struct of_device_id mt6779_pinctrl_of_match[] = { 761 + { .compatible = "mediatek,mt6779-pinctrl", }, 762 + { } 763 + }; 764 + 765 + static int mt6779_pinctrl_probe(struct platform_device *pdev) 766 + { 767 + return mtk_paris_pinctrl_probe(pdev, &mt6779_data); 768 + } 769 + 770 + static struct platform_driver mt6779_pinctrl_driver = { 771 + .driver = { 772 + .name = "mt6779-pinctrl", 773 + .of_match_table = mt6779_pinctrl_of_match, 774 + }, 775 + .probe = mt6779_pinctrl_probe, 776 + }; 777 + 778 + static int __init mt6779_pinctrl_init(void) 779 + { 780 + return platform_driver_register(&mt6779_pinctrl_driver); 781 + } 782 + arch_initcall(mt6779_pinctrl_init); 783 + 784 + MODULE_LICENSE("GPL v2"); 785 + MODULE_DESCRIPTION("MediaTek MT6779 Pinctrl Driver");
+26
drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c
··· 243 243 return EINT_NA; 244 244 } 245 245 246 + /* 247 + * Virtual GPIO only used inside SOC and not being exported to outside SOC. 248 + * Some modules use virtual GPIO as eint (e.g. pmif or usb). 249 + * In MTK platform, external interrupt (EINT) and GPIO is 1-1 mapping 250 + * and we can set GPIO as eint. 251 + * But some modules use specific eint which doesn't have real GPIO pin. 252 + * So we use virtual GPIO to map it. 253 + */ 254 + 255 + bool mtk_is_virt_gpio(struct mtk_pinctrl *hw, unsigned int gpio_n) 256 + { 257 + const struct mtk_pin_desc *desc; 258 + bool virt_gpio = false; 259 + 260 + desc = (const struct mtk_pin_desc *)&hw->soc->pins[gpio_n]; 261 + 262 + if (desc->funcs && !desc->funcs[desc->eint.eint_m].name) 263 + virt_gpio = true; 264 + 265 + return virt_gpio; 266 + } 267 + EXPORT_SYMBOL_GPL(mtk_is_virt_gpio); 268 + 246 269 static int mtk_xt_get_gpio_n(void *data, unsigned long eint_n, 247 270 unsigned int *gpio_n, 248 271 struct gpio_chip **gpio_chip) ··· 317 294 err = mtk_xt_get_gpio_n(hw, eint_n, &gpio_n, &gpio_chip); 318 295 if (err) 319 296 return err; 297 + 298 + if (mtk_is_virt_gpio(hw, gpio_n)) 299 + return 0; 320 300 321 301 desc = (const struct mtk_pin_desc *)&hw->soc->pins[gpio_n]; 322 302
+2 -1
drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.h
··· 80 80 DRV_GRP_MAX, 81 81 }; 82 82 83 - static const char * const mtk_default_register_base_names[] = { 83 + static const char * const mtk_default_register_base_names[] __maybe_unused = { 84 84 "base", 85 85 }; 86 86 ··· 315 315 int mtk_pinconf_adv_drive_get(struct mtk_pinctrl *hw, 316 316 const struct mtk_pin_desc *desc, u32 *val); 317 317 318 + bool mtk_is_virt_gpio(struct mtk_pinctrl *hw, unsigned int gpio_n); 318 319 #endif /* __PINCTRL_MTK_COMMON_V2_H */
+2085
drivers/pinctrl/mediatek/pinctrl-mtk-mt6779.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 */ 2 + /* 3 + * Copyright (C) 2019 MediaTek Inc. 4 + * Author: Andy Teng <andy.teng@mediatek.com> 5 + * 6 + */ 7 + 8 + #ifndef __PINCTRL_MTK_MT6779_H 9 + #define __PINCTRL_MTK_MT6779_H 10 + 11 + #include "pinctrl-paris.h" 12 + 13 + static const struct mtk_pin_desc mtk_pins_mt6779[] = { 14 + MTK_PIN( 15 + 0, "GPIO0", 16 + MTK_EINT_FUNCTION(0, 0), 17 + DRV_GRP4, 18 + MTK_FUNCTION(0, "GPIO0"), 19 + MTK_FUNCTION(1, "SPI6_MI"), 20 + MTK_FUNCTION(2, "I2S5_LRCK"), 21 + MTK_FUNCTION(3, "TDM_LRCK_2ND"), 22 + MTK_FUNCTION(4, "PCM1_SYNC"), 23 + MTK_FUNCTION(5, "SCL_6306"), 24 + MTK_FUNCTION(6, "TP_GPIO0_AO"), 25 + MTK_FUNCTION(7, "PTA_RXD") 26 + ), 27 + MTK_PIN( 28 + 1, "GPIO1", 29 + MTK_EINT_FUNCTION(0, 1), 30 + DRV_GRP4, 31 + MTK_FUNCTION(0, "GPIO1"), 32 + MTK_FUNCTION(1, "SPI6_CSB"), 33 + MTK_FUNCTION(2, "I2S5_DO"), 34 + MTK_FUNCTION(3, "TDM_DATA0_2ND"), 35 + MTK_FUNCTION(4, "PCM1_DO0"), 36 + MTK_FUNCTION(5, "SDA_6306"), 37 + MTK_FUNCTION(6, "TP_GPIO1_AO"), 38 + MTK_FUNCTION(7, "PTA_TXD") 39 + ), 40 + MTK_PIN( 41 + 2, "GPIO2", 42 + MTK_EINT_FUNCTION(0, 2), 43 + DRV_GRP4, 44 + MTK_FUNCTION(0, "GPIO2"), 45 + MTK_FUNCTION(1, "SPI6_MO"), 46 + MTK_FUNCTION(2, "I2S5_BCK"), 47 + MTK_FUNCTION(3, "TDM_BCK_2ND"), 48 + MTK_FUNCTION(4, "PCM1_CLK"), 49 + MTK_FUNCTION(5, "MD_INT1_C2K_UIM0_HOT_PLUG"), 50 + MTK_FUNCTION(6, "TP_GPIO2_AO") 51 + ), 52 + MTK_PIN( 53 + 3, "GPIO3", 54 + MTK_EINT_FUNCTION(0, 3), 55 + DRV_GRP4, 56 + MTK_FUNCTION(0, "GPIO3"), 57 + MTK_FUNCTION(1, "SPI6_CLK"), 58 + MTK_FUNCTION(2, "I2S5_MCK"), 59 + MTK_FUNCTION(3, "TDM_MCK_2ND"), 60 + MTK_FUNCTION(4, "EXT_FRAME_SYNC"), 61 + MTK_FUNCTION(5, "MD_INT2_C2K_UIM1_HOT_PLUG"), 62 + MTK_FUNCTION(6, "TP_GPIO3_AO") 63 + ), 64 + MTK_PIN( 65 + 4, "GPIO4", 66 + MTK_EINT_FUNCTION(0, 4), 67 + DRV_GRP4, 68 + MTK_FUNCTION(0, "GPIO4"), 69 + MTK_FUNCTION(1, "SPI7_MI"), 70 + MTK_FUNCTION(2, "I2S0_MCK"), 71 + MTK_FUNCTION(3, "TDM_DATA1_2ND"), 72 + MTK_FUNCTION(4, "PCM1_DO1"), 73 + MTK_FUNCTION(5, "DMIC1_CLK"), 74 + MTK_FUNCTION(6, "TP_GPIO4_AO"), 75 + MTK_FUNCTION(7, "SCL8") 76 + ), 77 + MTK_PIN( 78 + 5, "GPIO5", 79 + MTK_EINT_FUNCTION(0, 5), 80 + DRV_GRP4, 81 + MTK_FUNCTION(0, "GPIO5"), 82 + MTK_FUNCTION(1, "SPI7_CSB"), 83 + MTK_FUNCTION(2, "I2S0_BCK"), 84 + MTK_FUNCTION(3, "TDM_DATA2_2ND"), 85 + MTK_FUNCTION(4, "PCM1_DO2"), 86 + MTK_FUNCTION(5, "DMIC1_DAT"), 87 + MTK_FUNCTION(6, "TP_GPIO5_AO"), 88 + MTK_FUNCTION(7, "SDA8") 89 + ), 90 + MTK_PIN( 91 + 6, "GPIO6", 92 + MTK_EINT_FUNCTION(0, 6), 93 + DRV_GRP4, 94 + MTK_FUNCTION(0, "GPIO6"), 95 + MTK_FUNCTION(1, "SPI7_MO"), 96 + MTK_FUNCTION(2, "I2S0_LRCK"), 97 + MTK_FUNCTION(3, "TDM_DATA3_2ND"), 98 + MTK_FUNCTION(4, "PCM1_DI"), 99 + MTK_FUNCTION(5, "DMIC_CLK"), 100 + MTK_FUNCTION(6, "TP_GPIO6_AO"), 101 + MTK_FUNCTION(7, "SCL9") 102 + ), 103 + MTK_PIN( 104 + 7, "GPIO7", 105 + MTK_EINT_FUNCTION(0, 7), 106 + DRV_GRP4, 107 + MTK_FUNCTION(0, "GPIO7"), 108 + MTK_FUNCTION(1, "SPI7_CLK"), 109 + MTK_FUNCTION(2, "I2S0_DI"), 110 + MTK_FUNCTION(3, "SRCLKENAI1"), 111 + MTK_FUNCTION(4, "DVFSRC_EXT_REQ"), 112 + MTK_FUNCTION(5, "DMIC_DAT"), 113 + MTK_FUNCTION(6, "TP_GPIO7_AO"), 114 + MTK_FUNCTION(7, "SDA9") 115 + ), 116 + MTK_PIN( 117 + 8, "GPIO8", 118 + MTK_EINT_FUNCTION(0, 8), 119 + DRV_GRP4, 120 + MTK_FUNCTION(0, "GPIO8"), 121 + MTK_FUNCTION(1, "PWM_0"), 122 + MTK_FUNCTION(2, "I2S2_DI2"), 123 + MTK_FUNCTION(3, "SRCLKENAI0"), 124 + MTK_FUNCTION(4, "URXD1"), 125 + MTK_FUNCTION(5, "I2S0_MCK"), 126 + MTK_FUNCTION(6, "CONN_MCU_DBGACK_N"), 127 + MTK_FUNCTION(7, "IDDIG") 128 + ), 129 + MTK_PIN( 130 + 9, "GPIO9", 131 + MTK_EINT_FUNCTION(0, 9), 132 + DRV_GRP4, 133 + MTK_FUNCTION(0, "GPIO9"), 134 + MTK_FUNCTION(1, "PWM_3"), 135 + MTK_FUNCTION(2, "MD_INT0"), 136 + MTK_FUNCTION(3, "SRCLKENAI1"), 137 + MTK_FUNCTION(4, "UTXD1"), 138 + MTK_FUNCTION(5, "I2S0_BCK"), 139 + MTK_FUNCTION(6, "CONN_MCU_TRST_B"), 140 + MTK_FUNCTION(7, "USB_DRVVBUS") 141 + ), 142 + MTK_PIN( 143 + 10, "GPIO10", 144 + MTK_EINT_FUNCTION(0, 10), 145 + DRV_GRP4, 146 + MTK_FUNCTION(0, "GPIO10"), 147 + MTK_FUNCTION(1, "MSDC1_CLK_A"), 148 + MTK_FUNCTION(2, "TP_URXD1_AO"), 149 + MTK_FUNCTION(3, "I2S1_LRCK"), 150 + MTK_FUNCTION(4, "UCTS0"), 151 + MTK_FUNCTION(5, "DMIC1_CLK"), 152 + MTK_FUNCTION(6, "KPCOL2"), 153 + MTK_FUNCTION(7, "SCL8") 154 + ), 155 + MTK_PIN( 156 + 11, "GPIO11", 157 + MTK_EINT_FUNCTION(0, 11), 158 + DRV_GRP4, 159 + MTK_FUNCTION(0, "GPIO11"), 160 + MTK_FUNCTION(1, "MSDC1_CMD_A"), 161 + MTK_FUNCTION(2, "TP_UTXD1_AO"), 162 + MTK_FUNCTION(3, "I2S1_DO"), 163 + MTK_FUNCTION(4, "URTS0"), 164 + MTK_FUNCTION(5, "DMIC1_DAT"), 165 + MTK_FUNCTION(6, "KPROW2"), 166 + MTK_FUNCTION(7, "SDA8") 167 + ), 168 + MTK_PIN( 169 + 12, "GPIO12", 170 + MTK_EINT_FUNCTION(0, 12), 171 + DRV_GRP4, 172 + MTK_FUNCTION(0, "GPIO12"), 173 + MTK_FUNCTION(1, "MSDC1_DAT3_A"), 174 + MTK_FUNCTION(2, "TP_URXD2_AO"), 175 + MTK_FUNCTION(3, "I2S1_MCK"), 176 + MTK_FUNCTION(4, "UCTS1"), 177 + MTK_FUNCTION(5, "DMIC_CLK"), 178 + MTK_FUNCTION(6, "ANT_SEL9"), 179 + MTK_FUNCTION(7, "SCL9") 180 + ), 181 + MTK_PIN( 182 + 13, "GPIO13", 183 + MTK_EINT_FUNCTION(0, 13), 184 + DRV_GRP4, 185 + MTK_FUNCTION(0, "GPIO13"), 186 + MTK_FUNCTION(1, "MSDC1_DAT0_A"), 187 + MTK_FUNCTION(2, "TP_UTXD2_AO"), 188 + MTK_FUNCTION(3, "I2S1_BCK"), 189 + MTK_FUNCTION(4, "URTS1"), 190 + MTK_FUNCTION(5, "DMIC_DAT"), 191 + MTK_FUNCTION(6, "ANT_SEL10"), 192 + MTK_FUNCTION(7, "SDA9") 193 + ), 194 + MTK_PIN( 195 + 14, "GPIO14", 196 + MTK_EINT_FUNCTION(0, 14), 197 + DRV_GRP4, 198 + MTK_FUNCTION(0, "GPIO14"), 199 + MTK_FUNCTION(1, "MSDC1_DAT2_A"), 200 + MTK_FUNCTION(2, "PWM_3"), 201 + MTK_FUNCTION(3, "IDDIG"), 202 + MTK_FUNCTION(4, "MD_INT0"), 203 + MTK_FUNCTION(5, "PTA_RXD"), 204 + MTK_FUNCTION(6, "ANT_SEL11") 205 + ), 206 + MTK_PIN( 207 + 15, "GPIO15", 208 + MTK_EINT_FUNCTION(0, 15), 209 + DRV_GRP4, 210 + MTK_FUNCTION(0, "GPIO15"), 211 + MTK_FUNCTION(1, "MSDC1_DAT1_A"), 212 + MTK_FUNCTION(2, "DVFSRC_EXT_REQ"), 213 + MTK_FUNCTION(3, "USB_DRVVBUS"), 214 + MTK_FUNCTION(4, "MD_INT1_C2K_UIM0_HOT_PLUG"), 215 + MTK_FUNCTION(5, "PTA_TXD"), 216 + MTK_FUNCTION(6, "ANT_SEL12") 217 + ), 218 + MTK_PIN( 219 + 16, "GPIO16", 220 + MTK_EINT_FUNCTION(0, 16), 221 + DRV_GRP4, 222 + MTK_FUNCTION(0, "GPIO16"), 223 + MTK_FUNCTION(1, "SRCLKENAI0"), 224 + MTK_FUNCTION(2, "EXT_FRAME_SYNC"), 225 + MTK_FUNCTION(3, "MFG_EJTAG_TRSTN"), 226 + MTK_FUNCTION(4, "MD_INT2_C2K_UIM1_HOT_PLUG"), 227 + MTK_FUNCTION(5, "CONN_TCXOENA_REQ"), 228 + MTK_FUNCTION(6, "PWM_2"), 229 + MTK_FUNCTION(7, "JTRSTN_SEL1") 230 + ), 231 + MTK_PIN( 232 + 17, "GPIO17", 233 + MTK_EINT_FUNCTION(0, 17), 234 + DRV_GRP4, 235 + MTK_FUNCTION(0, "GPIO17"), 236 + MTK_FUNCTION(1, "SPI0_A_MI"), 237 + MTK_FUNCTION(2, "SCP_SPI0_MI"), 238 + MTK_FUNCTION(3, "MFG_EJTAG_TDO"), 239 + MTK_FUNCTION(4, "DPI_HSYNC"), 240 + MTK_FUNCTION(5, "MFG_DFD_JTAG_TDO"), 241 + MTK_FUNCTION(6, "DFD_TDO"), 242 + MTK_FUNCTION(7, "JTDO_SEL1") 243 + ), 244 + MTK_PIN( 245 + 18, "GPIO18", 246 + MTK_EINT_FUNCTION(0, 18), 247 + DRV_GRP4, 248 + MTK_FUNCTION(0, "GPIO18"), 249 + MTK_FUNCTION(1, "SPI0_A_MO"), 250 + MTK_FUNCTION(2, "SCP_SPI0_MO"), 251 + MTK_FUNCTION(3, "MFG_EJTAG_TDI"), 252 + MTK_FUNCTION(4, "DPI_VSYNC"), 253 + MTK_FUNCTION(5, "MFG_DFD_JTAG_TDI"), 254 + MTK_FUNCTION(6, "DFD_TDI"), 255 + MTK_FUNCTION(7, "JTDI_SEL1") 256 + ), 257 + MTK_PIN( 258 + 19, "GPIO19", 259 + MTK_EINT_FUNCTION(0, 19), 260 + DRV_GRP4, 261 + MTK_FUNCTION(0, "GPIO19"), 262 + MTK_FUNCTION(1, "SPI0_A_CSB"), 263 + MTK_FUNCTION(2, "SCP_SPI0_CS"), 264 + MTK_FUNCTION(3, "MFG_EJTAG_TMS"), 265 + MTK_FUNCTION(4, "DPI_DE"), 266 + MTK_FUNCTION(5, "MFG_DFD_JTAG_TMS"), 267 + MTK_FUNCTION(6, "DFD_TMS"), 268 + MTK_FUNCTION(7, "JTMS_SEL1") 269 + ), 270 + MTK_PIN( 271 + 20, "GPIO20", 272 + MTK_EINT_FUNCTION(0, 20), 273 + DRV_GRP4, 274 + MTK_FUNCTION(0, "GPIO20"), 275 + MTK_FUNCTION(1, "SPI0_A_CLK"), 276 + MTK_FUNCTION(2, "SCP_SPI0_CK"), 277 + MTK_FUNCTION(3, "MFG_EJTAG_TCK"), 278 + MTK_FUNCTION(4, "DPI_CK"), 279 + MTK_FUNCTION(5, "MFG_DFD_JTAG_TCK"), 280 + MTK_FUNCTION(6, "DFD_TCK_XI"), 281 + MTK_FUNCTION(7, "JTCK_SEL1") 282 + ), 283 + MTK_PIN( 284 + 21, "GPIO21", 285 + MTK_EINT_FUNCTION(0, 21), 286 + DRV_GRP4, 287 + MTK_FUNCTION(0, "GPIO21"), 288 + MTK_FUNCTION(1, "PWM_0"), 289 + MTK_FUNCTION(2, "CMFLASH0"), 290 + MTK_FUNCTION(3, "CMVREF2"), 291 + MTK_FUNCTION(4, "CLKM0"), 292 + MTK_FUNCTION(5, "ANT_SEL9"), 293 + MTK_FUNCTION(6, "CONN_TCXOENA_REQ"), 294 + MTK_FUNCTION(7, "DBG_MON_A27") 295 + ), 296 + MTK_PIN( 297 + 22, "GPIO22", 298 + MTK_EINT_FUNCTION(0, 22), 299 + DRV_GRP4, 300 + MTK_FUNCTION(0, "GPIO22"), 301 + MTK_FUNCTION(1, "PWM_1"), 302 + MTK_FUNCTION(2, "CMFLASH1"), 303 + MTK_FUNCTION(3, "CMVREF3"), 304 + MTK_FUNCTION(4, "CLKM1"), 305 + MTK_FUNCTION(5, "ANT_SEL10"), 306 + MTK_FUNCTION(7, "DBG_MON_A28") 307 + ), 308 + MTK_PIN( 309 + 23, "GPIO23", 310 + MTK_EINT_FUNCTION(0, 23), 311 + DRV_GRP4, 312 + MTK_FUNCTION(0, "GPIO23"), 313 + MTK_FUNCTION(1, "PWM_2"), 314 + MTK_FUNCTION(2, "CMFLASH2"), 315 + MTK_FUNCTION(3, "CMVREF0"), 316 + MTK_FUNCTION(4, "CLKM2"), 317 + MTK_FUNCTION(5, "ANT_SEL11"), 318 + MTK_FUNCTION(7, "DBG_MON_A29") 319 + ), 320 + MTK_PIN( 321 + 24, "GPIO24", 322 + MTK_EINT_FUNCTION(0, 24), 323 + DRV_GRP4, 324 + MTK_FUNCTION(0, "GPIO24"), 325 + MTK_FUNCTION(1, "PWM_0"), 326 + MTK_FUNCTION(2, "CMFLASH3"), 327 + MTK_FUNCTION(3, "CMVREF1"), 328 + MTK_FUNCTION(4, "CLKM3"), 329 + MTK_FUNCTION(5, "ANT_SEL12"), 330 + MTK_FUNCTION(7, "DBG_MON_A30") 331 + ), 332 + MTK_PIN( 333 + 25, "GPIO25", 334 + MTK_EINT_FUNCTION(0, 25), 335 + DRV_GRP4, 336 + MTK_FUNCTION(0, "GPIO25"), 337 + MTK_FUNCTION(1, "SRCLKENAI0"), 338 + MTK_FUNCTION(2, "UCTS0"), 339 + MTK_FUNCTION(3, "SCL8"), 340 + MTK_FUNCTION(4, "CMVREF4"), 341 + MTK_FUNCTION(5, "I2S0_LRCK"), 342 + MTK_FUNCTION(6, "CONN_TCXOENA_REQ"), 343 + MTK_FUNCTION(7, "DBG_MON_A31") 344 + ), 345 + MTK_PIN( 346 + 26, "GPIO26", 347 + MTK_EINT_FUNCTION(0, 26), 348 + DRV_GRP4, 349 + MTK_FUNCTION(0, "GPIO26"), 350 + MTK_FUNCTION(1, "PWM_0"), 351 + MTK_FUNCTION(2, "URTS0"), 352 + MTK_FUNCTION(3, "SDA8"), 353 + MTK_FUNCTION(4, "CLKM0"), 354 + MTK_FUNCTION(5, "I2S0_DI"), 355 + MTK_FUNCTION(6, "AGPS_SYNC"), 356 + MTK_FUNCTION(7, "DBG_MON_A32") 357 + ), 358 + MTK_PIN( 359 + 27, "GPIO27", 360 + MTK_EINT_FUNCTION(0, 27), 361 + DRV_GRP4, 362 + MTK_FUNCTION(0, "GPIO27"), 363 + MTK_FUNCTION(1, "AP_GOOD") 364 + ), 365 + MTK_PIN( 366 + 28, "GPIO28", 367 + MTK_EINT_FUNCTION(0, 28), 368 + DRV_GRP4, 369 + MTK_FUNCTION(0, "GPIO28"), 370 + MTK_FUNCTION(1, "SCL5") 371 + ), 372 + MTK_PIN( 373 + 29, "GPIO29", 374 + MTK_EINT_FUNCTION(0, 29), 375 + DRV_GRP4, 376 + MTK_FUNCTION(0, "GPIO29"), 377 + MTK_FUNCTION(1, "SDA5") 378 + ), 379 + MTK_PIN( 380 + 30, "GPIO30", 381 + MTK_EINT_FUNCTION(0, 30), 382 + DRV_GRP4, 383 + MTK_FUNCTION(0, "GPIO30"), 384 + MTK_FUNCTION(1, "I2S1_MCK"), 385 + MTK_FUNCTION(2, "I2S3_MCK"), 386 + MTK_FUNCTION(3, "I2S2_MCK"), 387 + MTK_FUNCTION(4, "DPI_D0"), 388 + MTK_FUNCTION(5, "SPI4_MI"), 389 + MTK_FUNCTION(6, "CONN_MCU_DBGI_N") 390 + ), 391 + MTK_PIN( 392 + 31, "GPIO31", 393 + MTK_EINT_FUNCTION(0, 31), 394 + DRV_GRP4, 395 + MTK_FUNCTION(0, "GPIO31"), 396 + MTK_FUNCTION(1, "I2S1_BCK"), 397 + MTK_FUNCTION(2, "I2S3_BCK"), 398 + MTK_FUNCTION(3, "I2S2_BCK"), 399 + MTK_FUNCTION(4, "DPI_D1"), 400 + MTK_FUNCTION(5, "SPI4_CSB"), 401 + MTK_FUNCTION(6, "CONN_MCU_TDO") 402 + ), 403 + MTK_PIN( 404 + 32, "GPIO32", 405 + MTK_EINT_FUNCTION(0, 32), 406 + DRV_GRP4, 407 + MTK_FUNCTION(0, "GPIO32"), 408 + MTK_FUNCTION(1, "I2S1_LRCK"), 409 + MTK_FUNCTION(2, "I2S3_LRCK"), 410 + MTK_FUNCTION(3, "I2S2_LRCK"), 411 + MTK_FUNCTION(4, "DPI_D2"), 412 + MTK_FUNCTION(5, "SPI4_MO"), 413 + MTK_FUNCTION(6, "CONN_MCU_TDI") 414 + ), 415 + MTK_PIN( 416 + 33, "GPIO33", 417 + MTK_EINT_FUNCTION(0, 33), 418 + DRV_GRP4, 419 + MTK_FUNCTION(0, "GPIO33"), 420 + MTK_FUNCTION(1, "I2S2_DI"), 421 + MTK_FUNCTION(2, "I2S0_DI"), 422 + MTK_FUNCTION(3, "I2S5_DO"), 423 + MTK_FUNCTION(4, "DPI_D3"), 424 + MTK_FUNCTION(5, "SPI4_CLK"), 425 + MTK_FUNCTION(6, "CONN_MCU_TMS") 426 + ), 427 + MTK_PIN( 428 + 34, "GPIO34", 429 + MTK_EINT_FUNCTION(0, 34), 430 + DRV_GRP4, 431 + MTK_FUNCTION(0, "GPIO34"), 432 + MTK_FUNCTION(1, "I2S1_DO"), 433 + MTK_FUNCTION(2, "I2S3_DO"), 434 + MTK_FUNCTION(3, "I2S2_DI2"), 435 + MTK_FUNCTION(4, "DPI_D4"), 436 + MTK_FUNCTION(5, "AGPS_SYNC"), 437 + MTK_FUNCTION(6, "CONN_MCU_TCK") 438 + ), 439 + MTK_PIN( 440 + 35, "GPIO35", 441 + MTK_EINT_FUNCTION(0, 35), 442 + DRV_GRP4, 443 + MTK_FUNCTION(0, "GPIO35"), 444 + MTK_FUNCTION(1, "TDM_LRCK"), 445 + MTK_FUNCTION(2, "I2S1_LRCK"), 446 + MTK_FUNCTION(3, "I2S5_LRCK"), 447 + MTK_FUNCTION(4, "DPI_D5"), 448 + MTK_FUNCTION(5, "SPI5_A_MO"), 449 + MTK_FUNCTION(6, "IO_JTAG_TDI"), 450 + MTK_FUNCTION(7, "PWM_2") 451 + ), 452 + MTK_PIN( 453 + 36, "GPIO36", 454 + MTK_EINT_FUNCTION(0, 36), 455 + DRV_GRP4, 456 + MTK_FUNCTION(0, "GPIO36"), 457 + MTK_FUNCTION(1, "TDM_BCK"), 458 + MTK_FUNCTION(2, "I2S1_BCK"), 459 + MTK_FUNCTION(3, "I2S5_BCK"), 460 + MTK_FUNCTION(4, "DPI_D6"), 461 + MTK_FUNCTION(5, "SPI5_A_CSB"), 462 + MTK_FUNCTION(6, "IO_JTAG_TRSTN"), 463 + MTK_FUNCTION(7, "SRCLKENAI1") 464 + ), 465 + MTK_PIN( 466 + 37, "GPIO37", 467 + MTK_EINT_FUNCTION(0, 37), 468 + DRV_GRP4, 469 + MTK_FUNCTION(0, "GPIO37"), 470 + MTK_FUNCTION(1, "TDM_MCK"), 471 + MTK_FUNCTION(2, "I2S1_MCK"), 472 + MTK_FUNCTION(3, "I2S5_MCK"), 473 + MTK_FUNCTION(4, "DPI_D7"), 474 + MTK_FUNCTION(5, "SPI5_A_MI"), 475 + MTK_FUNCTION(6, "IO_JTAG_TCK"), 476 + MTK_FUNCTION(7, "SRCLKENAI0") 477 + ), 478 + MTK_PIN( 479 + 38, "GPIO38", 480 + MTK_EINT_FUNCTION(0, 38), 481 + DRV_GRP4, 482 + MTK_FUNCTION(0, "GPIO38"), 483 + MTK_FUNCTION(1, "TDM_DATA0"), 484 + MTK_FUNCTION(2, "I2S2_DI"), 485 + MTK_FUNCTION(3, "I2S5_DO"), 486 + MTK_FUNCTION(4, "DPI_D8"), 487 + MTK_FUNCTION(5, "SPI5_A_CLK"), 488 + MTK_FUNCTION(6, "IO_JTAG_TDO"), 489 + MTK_FUNCTION(7, "CONN_TCXOENA_REQ") 490 + ), 491 + MTK_PIN( 492 + 39, "GPIO39", 493 + MTK_EINT_FUNCTION(0, 39), 494 + DRV_GRP4, 495 + MTK_FUNCTION(0, "GPIO39"), 496 + MTK_FUNCTION(1, "TDM_DATA1"), 497 + MTK_FUNCTION(2, "I2S1_DO"), 498 + MTK_FUNCTION(3, "I2S2_DI2"), 499 + MTK_FUNCTION(4, "DPI_D9"), 500 + MTK_FUNCTION(5, "DVFSRC_EXT_REQ"), 501 + MTK_FUNCTION(6, "IO_JTAG_TMS"), 502 + MTK_FUNCTION(7, "IDDIG") 503 + ), 504 + MTK_PIN( 505 + 40, "GPIO40", 506 + MTK_EINT_FUNCTION(0, 40), 507 + DRV_GRP4, 508 + MTK_FUNCTION(0, "GPIO40"), 509 + MTK_FUNCTION(1, "TDM_DATA2"), 510 + MTK_FUNCTION(2, "SCL9"), 511 + MTK_FUNCTION(3, "PWM_3"), 512 + MTK_FUNCTION(4, "DPI_D10"), 513 + MTK_FUNCTION(5, "SRCLKENAI0"), 514 + MTK_FUNCTION(6, "DAP_MD32_SWD"), 515 + MTK_FUNCTION(7, "USB_DRVVBUS") 516 + ), 517 + MTK_PIN( 518 + 41, "GPIO41", 519 + MTK_EINT_FUNCTION(0, 41), 520 + DRV_GRP4, 521 + MTK_FUNCTION(0, "GPIO41"), 522 + MTK_FUNCTION(1, "TDM_DATA3"), 523 + MTK_FUNCTION(2, "SDA9"), 524 + MTK_FUNCTION(3, "PWM_1"), 525 + MTK_FUNCTION(4, "DPI_D11"), 526 + MTK_FUNCTION(5, "CLKM1"), 527 + MTK_FUNCTION(6, "DAP_MD32_SWCK") 528 + ), 529 + MTK_PIN( 530 + 42, "GPIO42", 531 + MTK_EINT_FUNCTION(0, 42), 532 + DRV_GRP4, 533 + MTK_FUNCTION(0, "GPIO42"), 534 + MTK_FUNCTION(1, "DISP_PWM") 535 + ), 536 + MTK_PIN( 537 + 43, "GPIO43", 538 + MTK_EINT_FUNCTION(0, 43), 539 + DRV_GRP4, 540 + MTK_FUNCTION(0, "GPIO43"), 541 + MTK_FUNCTION(1, "DSI_TE") 542 + ), 543 + MTK_PIN( 544 + 44, "GPIO44", 545 + MTK_EINT_FUNCTION(0, 44), 546 + DRV_GRP4, 547 + MTK_FUNCTION(0, "GPIO44"), 548 + MTK_FUNCTION(1, "LCM_RST") 549 + ), 550 + MTK_PIN( 551 + 45, "GPIO45", 552 + MTK_EINT_FUNCTION(0, 45), 553 + DRV_GRP4, 554 + MTK_FUNCTION(0, "GPIO45"), 555 + MTK_FUNCTION(1, "SCL6"), 556 + MTK_FUNCTION(2, "SCP_SCL0"), 557 + MTK_FUNCTION(3, "SCP_SCL1"), 558 + MTK_FUNCTION(4, "SCL_6306") 559 + ), 560 + MTK_PIN( 561 + 46, "GPIO46", 562 + MTK_EINT_FUNCTION(0, 46), 563 + DRV_GRP4, 564 + MTK_FUNCTION(0, "GPIO46"), 565 + MTK_FUNCTION(1, "SDA6"), 566 + MTK_FUNCTION(2, "SCP_SDA0"), 567 + MTK_FUNCTION(3, "SCP_SDA1"), 568 + MTK_FUNCTION(4, "SDA_6306") 569 + ), 570 + MTK_PIN( 571 + 47, "GPIO47", 572 + MTK_EINT_FUNCTION(0, 47), 573 + DRV_GRP4, 574 + MTK_FUNCTION(0, "GPIO47"), 575 + MTK_FUNCTION(1, "SPI1_A_MI"), 576 + MTK_FUNCTION(2, "SCP_SPI1_A_MI"), 577 + MTK_FUNCTION(3, "KPCOL2"), 578 + MTK_FUNCTION(4, "MD_URXD0"), 579 + MTK_FUNCTION(5, "CONN_UART0_RXD"), 580 + MTK_FUNCTION(6, "SSPM_URXD_AO"), 581 + MTK_FUNCTION(7, "DBG_MON_B32") 582 + ), 583 + MTK_PIN( 584 + 48, "GPIO48", 585 + MTK_EINT_FUNCTION(0, 48), 586 + DRV_GRP4, 587 + MTK_FUNCTION(0, "GPIO48"), 588 + MTK_FUNCTION(1, "SPI1_A_CSB"), 589 + MTK_FUNCTION(2, "SCP_SPI1_A_CS"), 590 + MTK_FUNCTION(3, "KPROW2"), 591 + MTK_FUNCTION(4, "MD_UTXD0"), 592 + MTK_FUNCTION(5, "CONN_UART0_TXD"), 593 + MTK_FUNCTION(6, "SSPM_UTXD_AO"), 594 + MTK_FUNCTION(7, "DBG_MON_B31") 595 + ), 596 + MTK_PIN( 597 + 49, "GPIO49", 598 + MTK_EINT_FUNCTION(0, 49), 599 + DRV_GRP4, 600 + MTK_FUNCTION(0, "GPIO49"), 601 + MTK_FUNCTION(1, "SPI1_A_MO"), 602 + MTK_FUNCTION(2, "SCP_SPI1_A_MO"), 603 + MTK_FUNCTION(3, "UCTS0"), 604 + MTK_FUNCTION(4, "MD_URXD1"), 605 + MTK_FUNCTION(5, "PWM_1"), 606 + MTK_FUNCTION(6, "TP_URXD2_AO"), 607 + MTK_FUNCTION(7, "DBG_MON_B30") 608 + ), 609 + MTK_PIN( 610 + 50, "GPIO50", 611 + MTK_EINT_FUNCTION(0, 50), 612 + DRV_GRP4, 613 + MTK_FUNCTION(0, "GPIO50"), 614 + MTK_FUNCTION(1, "SPI1_A_CLK"), 615 + MTK_FUNCTION(2, "SCP_SPI1_A_CK"), 616 + MTK_FUNCTION(3, "URTS0"), 617 + MTK_FUNCTION(4, "MD_UTXD1"), 618 + MTK_FUNCTION(5, "WIFI_TXD"), 619 + MTK_FUNCTION(6, "TP_UTXD2_AO"), 620 + MTK_FUNCTION(7, "DBG_MON_B29") 621 + ), 622 + MTK_PIN( 623 + 51, "GPIO51", 624 + MTK_EINT_FUNCTION(0, 51), 625 + DRV_GRP4, 626 + MTK_FUNCTION(0, "GPIO51"), 627 + MTK_FUNCTION(1, "SCL0") 628 + ), 629 + MTK_PIN( 630 + 52, "GPIO52", 631 + MTK_EINT_FUNCTION(0, 52), 632 + DRV_GRP4, 633 + MTK_FUNCTION(0, "GPIO52"), 634 + MTK_FUNCTION(1, "SDA0") 635 + ), 636 + MTK_PIN( 637 + 53, "GPIO53", 638 + MTK_EINT_FUNCTION(0, 53), 639 + DRV_GRP4, 640 + MTK_FUNCTION(0, "GPIO53"), 641 + MTK_FUNCTION(1, "URXD0"), 642 + MTK_FUNCTION(2, "UTXD0"), 643 + MTK_FUNCTION(3, "MD_URXD0"), 644 + MTK_FUNCTION(4, "MD_URXD1"), 645 + MTK_FUNCTION(5, "SSPM_URXD_AO"), 646 + MTK_FUNCTION(7, "CONN_UART0_RXD") 647 + ), 648 + MTK_PIN( 649 + 54, "GPIO54", 650 + MTK_EINT_FUNCTION(0, 54), 651 + DRV_GRP4, 652 + MTK_FUNCTION(0, "GPIO54"), 653 + MTK_FUNCTION(1, "UTXD0"), 654 + MTK_FUNCTION(2, "URXD0"), 655 + MTK_FUNCTION(3, "MD_UTXD0"), 656 + MTK_FUNCTION(4, "MD_UTXD1"), 657 + MTK_FUNCTION(5, "SSPM_UTXD_AO"), 658 + MTK_FUNCTION(6, "WIFI_TXD"), 659 + MTK_FUNCTION(7, "CONN_UART0_TXD") 660 + ), 661 + MTK_PIN( 662 + 55, "GPIO55", 663 + MTK_EINT_FUNCTION(0, 55), 664 + DRV_GRP4, 665 + MTK_FUNCTION(0, "GPIO55"), 666 + MTK_FUNCTION(1, "SCL3"), 667 + MTK_FUNCTION(2, "SCP_SCL0"), 668 + MTK_FUNCTION(3, "SCP_SCL1"), 669 + MTK_FUNCTION(4, "SCL_6306") 670 + ), 671 + MTK_PIN( 672 + 56, "GPIO56", 673 + MTK_EINT_FUNCTION(0, 56), 674 + DRV_GRP4, 675 + MTK_FUNCTION(0, "GPIO56"), 676 + MTK_FUNCTION(1, "SDA3"), 677 + MTK_FUNCTION(2, "SCP_SDA0"), 678 + MTK_FUNCTION(3, "SCP_SDA1"), 679 + MTK_FUNCTION(4, "SDA_6306") 680 + ), 681 + MTK_PIN( 682 + 57, "GPIO57", 683 + MTK_EINT_FUNCTION(0, 57), 684 + DRV_GRP4, 685 + MTK_FUNCTION(0, "GPIO57"), 686 + MTK_FUNCTION(1, "KPROW1"), 687 + MTK_FUNCTION(2, "PWM_1"), 688 + MTK_FUNCTION(3, "DVFSRC_EXT_REQ"), 689 + MTK_FUNCTION(4, "CLKM1"), 690 + MTK_FUNCTION(5, "IDDIG"), 691 + MTK_FUNCTION(6, "CONN_TCXOENA_REQ"), 692 + MTK_FUNCTION(7, "MBISTREADEN_TRIGGER") 693 + ), 694 + MTK_PIN( 695 + 58, "GPIO58", 696 + MTK_EINT_FUNCTION(0, 58), 697 + DRV_GRP4, 698 + MTK_FUNCTION(0, "GPIO58"), 699 + MTK_FUNCTION(1, "KPROW0"), 700 + MTK_FUNCTION(7, "DBG_MON_B28") 701 + ), 702 + MTK_PIN( 703 + 59, "GPIO59", 704 + MTK_EINT_FUNCTION(0, 59), 705 + DRV_GRP4, 706 + MTK_FUNCTION(0, "GPIO59"), 707 + MTK_FUNCTION(1, "KPCOL0"), 708 + MTK_FUNCTION(7, "DBG_MON_B27") 709 + ), 710 + MTK_PIN( 711 + 60, "GPIO60", 712 + MTK_EINT_FUNCTION(0, 60), 713 + DRV_GRP4, 714 + MTK_FUNCTION(0, "GPIO60"), 715 + MTK_FUNCTION(1, "KPCOL1"), 716 + MTK_FUNCTION(2, "PWM_2"), 717 + MTK_FUNCTION(3, "UCTS1"), 718 + MTK_FUNCTION(4, "CLKM2"), 719 + MTK_FUNCTION(5, "USB_DRVVBUS"), 720 + MTK_FUNCTION(7, "MBISTWRITEEN_TRIGGER") 721 + ), 722 + MTK_PIN( 723 + 61, "GPIO61", 724 + MTK_EINT_FUNCTION(0, 61), 725 + DRV_GRP4, 726 + MTK_FUNCTION(0, "GPIO61"), 727 + MTK_FUNCTION(1, "SCL1"), 728 + MTK_FUNCTION(2, "SCP_SCL0"), 729 + MTK_FUNCTION(3, "SCP_SCL1") 730 + ), 731 + MTK_PIN( 732 + 62, "GPIO62", 733 + MTK_EINT_FUNCTION(0, 62), 734 + DRV_GRP4, 735 + MTK_FUNCTION(0, "GPIO62"), 736 + MTK_FUNCTION(1, "SDA1"), 737 + MTK_FUNCTION(2, "SCP_SDA0"), 738 + MTK_FUNCTION(3, "SCP_SDA1") 739 + ), 740 + MTK_PIN( 741 + 63, "GPIO63", 742 + MTK_EINT_FUNCTION(0, 63), 743 + DRV_GRP4, 744 + MTK_FUNCTION(0, "GPIO63"), 745 + MTK_FUNCTION(1, "SPI2_MI"), 746 + MTK_FUNCTION(2, "SCP_SPI2_MI"), 747 + MTK_FUNCTION(3, "KPCOL2"), 748 + MTK_FUNCTION(4, "MRG_DI"), 749 + MTK_FUNCTION(5, "MD_URXD0"), 750 + MTK_FUNCTION(6, "CONN_UART0_RXD"), 751 + MTK_FUNCTION(7, "DBG_MON_B26") 752 + ), 753 + MTK_PIN( 754 + 64, "GPIO64", 755 + MTK_EINT_FUNCTION(0, 64), 756 + DRV_GRP4, 757 + MTK_FUNCTION(0, "GPIO64"), 758 + MTK_FUNCTION(1, "SPI2_CSB"), 759 + MTK_FUNCTION(2, "SCP_SPI2_CS"), 760 + MTK_FUNCTION(3, "KPROW2"), 761 + MTK_FUNCTION(4, "MRG_SYNC"), 762 + MTK_FUNCTION(5, "MD_UTXD0"), 763 + MTK_FUNCTION(6, "CONN_UART0_TXD"), 764 + MTK_FUNCTION(7, "DBG_MON_B25") 765 + ), 766 + MTK_PIN( 767 + 65, "GPIO65", 768 + MTK_EINT_FUNCTION(0, 65), 769 + DRV_GRP4, 770 + MTK_FUNCTION(0, "GPIO65"), 771 + MTK_FUNCTION(1, "SPI2_MO"), 772 + MTK_FUNCTION(2, "SCP_SPI2_MO"), 773 + MTK_FUNCTION(3, "SCP_SDA1"), 774 + MTK_FUNCTION(4, "MRG_DO"), 775 + MTK_FUNCTION(5, "MD_URXD1"), 776 + MTK_FUNCTION(6, "PWM_3") 777 + ), 778 + MTK_PIN( 779 + 66, "GPIO66", 780 + MTK_EINT_FUNCTION(0, 66), 781 + DRV_GRP4, 782 + MTK_FUNCTION(0, "GPIO66"), 783 + MTK_FUNCTION(1, "SPI2_CLK"), 784 + MTK_FUNCTION(2, "SCP_SPI2_CK"), 785 + MTK_FUNCTION(3, "SCP_SCL1"), 786 + MTK_FUNCTION(4, "MRG_CLK"), 787 + MTK_FUNCTION(5, "MD_UTXD1"), 788 + MTK_FUNCTION(6, "WIFI_TXD") 789 + ), 790 + MTK_PIN( 791 + 67, "GPIO67", 792 + MTK_EINT_FUNCTION(0, 67), 793 + DRV_GRP4, 794 + MTK_FUNCTION(0, "GPIO67"), 795 + MTK_FUNCTION(1, "I2S3_LRCK"), 796 + MTK_FUNCTION(2, "I2S1_LRCK"), 797 + MTK_FUNCTION(3, "URXD1"), 798 + MTK_FUNCTION(4, "PCM0_SYNC"), 799 + MTK_FUNCTION(5, "I2S5_LRCK"), 800 + MTK_FUNCTION(6, "ANT_SEL9"), 801 + MTK_FUNCTION(7, "DBG_MON_B10") 802 + ), 803 + MTK_PIN( 804 + 68, "GPIO68", 805 + MTK_EINT_FUNCTION(0, 68), 806 + DRV_GRP4, 807 + MTK_FUNCTION(0, "GPIO68"), 808 + MTK_FUNCTION(1, "I2S3_DO"), 809 + MTK_FUNCTION(2, "I2S1_DO"), 810 + MTK_FUNCTION(3, "UTXD1"), 811 + MTK_FUNCTION(4, "PCM0_DO"), 812 + MTK_FUNCTION(5, "I2S5_DO"), 813 + MTK_FUNCTION(6, "ANT_SEL10"), 814 + MTK_FUNCTION(7, "DBG_MON_B9") 815 + ), 816 + MTK_PIN( 817 + 69, "GPIO69", 818 + MTK_EINT_FUNCTION(0, 69), 819 + DRV_GRP4, 820 + MTK_FUNCTION(0, "GPIO69"), 821 + MTK_FUNCTION(1, "I2S3_MCK"), 822 + MTK_FUNCTION(2, "I2S1_MCK"), 823 + MTK_FUNCTION(3, "URTS1"), 824 + MTK_FUNCTION(4, "AGPS_SYNC"), 825 + MTK_FUNCTION(5, "I2S5_MCK"), 826 + MTK_FUNCTION(6, "DVFSRC_EXT_REQ"), 827 + MTK_FUNCTION(7, "DBG_MON_B8") 828 + ), 829 + MTK_PIN( 830 + 70, "GPIO70", 831 + MTK_EINT_FUNCTION(0, 70), 832 + DRV_GRP4, 833 + MTK_FUNCTION(0, "GPIO70"), 834 + MTK_FUNCTION(1, "I2S0_DI"), 835 + MTK_FUNCTION(2, "I2S2_DI"), 836 + MTK_FUNCTION(3, "KPCOL2"), 837 + MTK_FUNCTION(4, "PCM0_DI"), 838 + MTK_FUNCTION(5, "I2S2_DI2"), 839 + MTK_FUNCTION(6, "ANT_SEL11"), 840 + MTK_FUNCTION(7, "DBG_MON_B7") 841 + ), 842 + MTK_PIN( 843 + 71, "GPIO71", 844 + MTK_EINT_FUNCTION(0, 71), 845 + DRV_GRP4, 846 + MTK_FUNCTION(0, "GPIO71"), 847 + MTK_FUNCTION(1, "I2S3_BCK"), 848 + MTK_FUNCTION(2, "I2S1_BCK"), 849 + MTK_FUNCTION(3, "KPROW2"), 850 + MTK_FUNCTION(4, "PCM0_CLK"), 851 + MTK_FUNCTION(5, "I2S5_BCK"), 852 + MTK_FUNCTION(6, "ANT_SEL12"), 853 + MTK_FUNCTION(7, "DBG_MON_B6") 854 + ), 855 + MTK_PIN( 856 + 72, "GPIO72", 857 + MTK_EINT_FUNCTION(0, 72), 858 + DRV_GRP4, 859 + MTK_FUNCTION(0, "GPIO72"), 860 + MTK_FUNCTION(1, "BPI_BUS19_OLAT0"), 861 + MTK_FUNCTION(2, "CONN_BPI_BUS19_OLAT0") 862 + ), 863 + MTK_PIN( 864 + 73, "GPIO73", 865 + MTK_EINT_FUNCTION(0, 73), 866 + DRV_GRP4, 867 + MTK_FUNCTION(0, "GPIO73"), 868 + MTK_FUNCTION(1, "BPI_BUS18_PA_VM1"), 869 + MTK_FUNCTION(2, "CONN_MIPI5_SCLK"), 870 + MTK_FUNCTION(3, "MIPI5_SCLK") 871 + ), 872 + MTK_PIN( 873 + 74, "GPIO74", 874 + MTK_EINT_FUNCTION(0, 74), 875 + DRV_GRP4, 876 + MTK_FUNCTION(0, "GPIO74"), 877 + MTK_FUNCTION(1, "BPI_BUS17_PA_VM0"), 878 + MTK_FUNCTION(2, "CONN_MIPI5_SDATA"), 879 + MTK_FUNCTION(3, "MIPI5_SDATA") 880 + ), 881 + MTK_PIN( 882 + 75, "GPIO75", 883 + MTK_EINT_FUNCTION(0, 75), 884 + DRV_GRP4, 885 + MTK_FUNCTION(0, "GPIO75"), 886 + MTK_FUNCTION(1, "BPI_BUS20_OLAT1"), 887 + MTK_FUNCTION(2, "CONN_BPI_BUS20_OLAT1"), 888 + MTK_FUNCTION(3, "RFIC0_BSI_D2") 889 + ), 890 + MTK_PIN( 891 + 76, "GPIO76", 892 + MTK_EINT_FUNCTION(0, 76), 893 + DRV_GRP4, 894 + MTK_FUNCTION(0, "GPIO76"), 895 + MTK_FUNCTION(1, "RFIC0_BSI_D1") 896 + ), 897 + MTK_PIN( 898 + 77, "GPIO77", 899 + MTK_EINT_FUNCTION(0, 77), 900 + DRV_GRP4, 901 + MTK_FUNCTION(0, "GPIO77"), 902 + MTK_FUNCTION(1, "RFIC0_BSI_D0") 903 + ), 904 + MTK_PIN( 905 + 78, "GPIO78", 906 + MTK_EINT_FUNCTION(0, 78), 907 + DRV_GRP4, 908 + MTK_FUNCTION(0, "GPIO78"), 909 + MTK_FUNCTION(1, "BPI_BUS7"), 910 + MTK_FUNCTION(7, "DBG_MON_B24") 911 + ), 912 + MTK_PIN( 913 + 79, "GPIO79", 914 + MTK_EINT_FUNCTION(0, 79), 915 + DRV_GRP4, 916 + MTK_FUNCTION(0, "GPIO79"), 917 + MTK_FUNCTION(1, "BPI_BUS6"), 918 + MTK_FUNCTION(7, "DBG_MON_B23") 919 + ), 920 + MTK_PIN( 921 + 80, "GPIO80", 922 + MTK_EINT_FUNCTION(0, 80), 923 + DRV_GRP4, 924 + MTK_FUNCTION(0, "GPIO80"), 925 + MTK_FUNCTION(1, "BPI_BUS8"), 926 + MTK_FUNCTION(7, "DBG_MON_B22") 927 + ), 928 + MTK_PIN( 929 + 81, "GPIO81", 930 + MTK_EINT_FUNCTION(0, 81), 931 + DRV_GRP4, 932 + MTK_FUNCTION(0, "GPIO81"), 933 + MTK_FUNCTION(1, "BPI_BUS9"), 934 + MTK_FUNCTION(7, "DBG_MON_B21") 935 + ), 936 + MTK_PIN( 937 + 82, "GPIO82", 938 + MTK_EINT_FUNCTION(0, 82), 939 + DRV_GRP4, 940 + MTK_FUNCTION(0, "GPIO82"), 941 + MTK_FUNCTION(1, "BPI_BUS10"), 942 + MTK_FUNCTION(7, "DBG_MON_B20") 943 + ), 944 + MTK_PIN( 945 + 83, "GPIO83", 946 + MTK_EINT_FUNCTION(0, 83), 947 + DRV_GRP4, 948 + MTK_FUNCTION(0, "GPIO83"), 949 + MTK_FUNCTION(1, "BPI_BUS11"), 950 + MTK_FUNCTION(7, "DBG_MON_B19") 951 + ), 952 + MTK_PIN( 953 + 84, "GPIO84", 954 + MTK_EINT_FUNCTION(0, 84), 955 + DRV_GRP4, 956 + MTK_FUNCTION(0, "GPIO84"), 957 + MTK_FUNCTION(1, "BPI_BUS12"), 958 + MTK_FUNCTION(2, "CONN_BPI_BUS12") 959 + ), 960 + MTK_PIN( 961 + 85, "GPIO85", 962 + MTK_EINT_FUNCTION(0, 85), 963 + DRV_GRP4, 964 + MTK_FUNCTION(0, "GPIO85"), 965 + MTK_FUNCTION(1, "BPI_BUS13"), 966 + MTK_FUNCTION(2, "CONN_BPI_BUS13") 967 + ), 968 + MTK_PIN( 969 + 86, "GPIO86", 970 + MTK_EINT_FUNCTION(0, 86), 971 + DRV_GRP4, 972 + MTK_FUNCTION(0, "GPIO86"), 973 + MTK_FUNCTION(1, "BPI_BUS14"), 974 + MTK_FUNCTION(2, "CONN_BPI_BUS14") 975 + ), 976 + MTK_PIN( 977 + 87, "GPIO87", 978 + MTK_EINT_FUNCTION(0, 87), 979 + DRV_GRP4, 980 + MTK_FUNCTION(0, "GPIO87"), 981 + MTK_FUNCTION(1, "BPI_BUS15"), 982 + MTK_FUNCTION(2, "CONN_BPI_BUS15") 983 + ), 984 + MTK_PIN( 985 + 88, "GPIO88", 986 + MTK_EINT_FUNCTION(0, 88), 987 + DRV_GRP4, 988 + MTK_FUNCTION(0, "GPIO88"), 989 + MTK_FUNCTION(1, "BPI_BUS16"), 990 + MTK_FUNCTION(2, "CONN_BPI_BUS16") 991 + ), 992 + MTK_PIN( 993 + 89, "GPIO89", 994 + MTK_EINT_FUNCTION(0, 89), 995 + DRV_GRP4, 996 + MTK_FUNCTION(0, "GPIO89"), 997 + MTK_FUNCTION(1, "BPI_BUS5"), 998 + MTK_FUNCTION(7, "DBG_MON_B18") 999 + ), 1000 + MTK_PIN( 1001 + 90, "GPIO90", 1002 + MTK_EINT_FUNCTION(0, 90), 1003 + DRV_GRP4, 1004 + MTK_FUNCTION(0, "GPIO90"), 1005 + MTK_FUNCTION(1, "BPI_BUS4"), 1006 + MTK_FUNCTION(7, "DBG_MON_B17") 1007 + ), 1008 + MTK_PIN( 1009 + 91, "GPIO91", 1010 + MTK_EINT_FUNCTION(0, 91), 1011 + DRV_GRP4, 1012 + MTK_FUNCTION(0, "GPIO91"), 1013 + MTK_FUNCTION(1, "BPI_BUS3") 1014 + ), 1015 + MTK_PIN( 1016 + 92, "GPIO92", 1017 + MTK_EINT_FUNCTION(0, 92), 1018 + DRV_GRP4, 1019 + MTK_FUNCTION(0, "GPIO92"), 1020 + MTK_FUNCTION(1, "BPI_BUS2"), 1021 + MTK_FUNCTION(7, "DBG_MON_B16") 1022 + ), 1023 + MTK_PIN( 1024 + 93, "GPIO93", 1025 + MTK_EINT_FUNCTION(0, 93), 1026 + DRV_GRP4, 1027 + MTK_FUNCTION(0, "GPIO93"), 1028 + MTK_FUNCTION(1, "BPI_BUS1") 1029 + ), 1030 + MTK_PIN( 1031 + 94, "GPIO94", 1032 + MTK_EINT_FUNCTION(0, 94), 1033 + DRV_GRP4, 1034 + MTK_FUNCTION(0, "GPIO94"), 1035 + MTK_FUNCTION(1, "BPI_BUS0"), 1036 + MTK_FUNCTION(7, "DBG_MON_B15") 1037 + ), 1038 + MTK_PIN( 1039 + 95, "GPIO95", 1040 + MTK_EINT_FUNCTION(0, 95), 1041 + DRV_GRP4, 1042 + MTK_FUNCTION(0, "GPIO95"), 1043 + MTK_FUNCTION(1, "MIPI0_SDATA") 1044 + ), 1045 + MTK_PIN( 1046 + 96, "GPIO96", 1047 + MTK_EINT_FUNCTION(0, 96), 1048 + DRV_GRP4, 1049 + MTK_FUNCTION(0, "GPIO96"), 1050 + MTK_FUNCTION(1, "MIPI0_SCLK") 1051 + ), 1052 + MTK_PIN( 1053 + 97, "GPIO97", 1054 + MTK_EINT_FUNCTION(0, 97), 1055 + DRV_GRP4, 1056 + MTK_FUNCTION(0, "GPIO97"), 1057 + MTK_FUNCTION(1, "MIPI1_SDATA") 1058 + ), 1059 + MTK_PIN( 1060 + 98, "GPIO98", 1061 + MTK_EINT_FUNCTION(0, 98), 1062 + DRV_GRP4, 1063 + MTK_FUNCTION(0, "GPIO98"), 1064 + MTK_FUNCTION(1, "MIPI1_SCLK") 1065 + ), 1066 + MTK_PIN( 1067 + 99, "GPIO99", 1068 + MTK_EINT_FUNCTION(0, 99), 1069 + DRV_GRP4, 1070 + MTK_FUNCTION(0, "GPIO99"), 1071 + MTK_FUNCTION(1, "MIPI2_SCLK"), 1072 + MTK_FUNCTION(7, "DBG_MON_B14") 1073 + ), 1074 + MTK_PIN( 1075 + 100, "GPIO100", 1076 + MTK_EINT_FUNCTION(0, 100), 1077 + DRV_GRP4, 1078 + MTK_FUNCTION(0, "GPIO100"), 1079 + MTK_FUNCTION(1, "MIPI2_SDATA"), 1080 + MTK_FUNCTION(7, "DBG_MON_B13") 1081 + ), 1082 + MTK_PIN( 1083 + 101, "GPIO101", 1084 + MTK_EINT_FUNCTION(0, 101), 1085 + DRV_GRP4, 1086 + MTK_FUNCTION(0, "GPIO101"), 1087 + MTK_FUNCTION(1, "MIPI3_SCLK"), 1088 + MTK_FUNCTION(7, "DBG_MON_B12") 1089 + ), 1090 + MTK_PIN( 1091 + 102, "GPIO102", 1092 + MTK_EINT_FUNCTION(0, 102), 1093 + DRV_GRP4, 1094 + MTK_FUNCTION(0, "GPIO102"), 1095 + MTK_FUNCTION(1, "MIPI3_SDATA"), 1096 + MTK_FUNCTION(7, "DBG_MON_B11") 1097 + ), 1098 + MTK_PIN( 1099 + 103, "GPIO103", 1100 + MTK_EINT_FUNCTION(0, 103), 1101 + DRV_GRP4, 1102 + MTK_FUNCTION(0, "GPIO103"), 1103 + MTK_FUNCTION(1, "MIPI4_SCLK"), 1104 + MTK_FUNCTION(2, "CONN_MIPI4_SCLK") 1105 + ), 1106 + MTK_PIN( 1107 + 104, "GPIO104", 1108 + MTK_EINT_FUNCTION(0, 104), 1109 + DRV_GRP4, 1110 + MTK_FUNCTION(0, "GPIO104"), 1111 + MTK_FUNCTION(1, "MIPI4_SDATA"), 1112 + MTK_FUNCTION(2, "CONN_MIPI4_SDATA") 1113 + ), 1114 + MTK_PIN( 1115 + 105, "GPIO105", 1116 + MTK_EINT_FUNCTION(0, 105), 1117 + DRV_GRP4, 1118 + MTK_FUNCTION(0, "GPIO105"), 1119 + MTK_FUNCTION(1, "BPI_BUS22_OLAT3"), 1120 + MTK_FUNCTION(2, "CONN_BPI_BUS22_OLAT3") 1121 + ), 1122 + MTK_PIN( 1123 + 106, "GPIO106", 1124 + MTK_EINT_FUNCTION(0, 106), 1125 + DRV_GRP4, 1126 + MTK_FUNCTION(0, "GPIO106"), 1127 + MTK_FUNCTION(1, "BPI_BUS21_OLAT2"), 1128 + MTK_FUNCTION(2, "CONN_BPI_BUS21_OLAT2") 1129 + ), 1130 + MTK_PIN( 1131 + 107, "GPIO107", 1132 + MTK_EINT_FUNCTION(0, 107), 1133 + DRV_GRP4, 1134 + MTK_FUNCTION(0, "GPIO107"), 1135 + MTK_FUNCTION(1, "BPI_BUS24_ANT1"), 1136 + MTK_FUNCTION(2, "CONN_BPI_BUS24_ANT1") 1137 + ), 1138 + MTK_PIN( 1139 + 108, "GPIO108", 1140 + MTK_EINT_FUNCTION(0, 108), 1141 + DRV_GRP4, 1142 + MTK_FUNCTION(0, "GPIO108"), 1143 + MTK_FUNCTION(1, "BPI_BUS25_ANT2"), 1144 + MTK_FUNCTION(2, "CONN_BPI_BUS25_ANT2") 1145 + ), 1146 + MTK_PIN( 1147 + 109, "GPIO109", 1148 + MTK_EINT_FUNCTION(0, 109), 1149 + DRV_GRP4, 1150 + MTK_FUNCTION(0, "GPIO109"), 1151 + MTK_FUNCTION(1, "BPI_BUS23_ANT0"), 1152 + MTK_FUNCTION(2, "CONN_BPI_BUS23_ANT0") 1153 + ), 1154 + MTK_PIN( 1155 + 110, "GPIO110", 1156 + MTK_EINT_FUNCTION(0, 110), 1157 + DRV_GRP4, 1158 + MTK_FUNCTION(0, "GPIO110"), 1159 + MTK_FUNCTION(1, "SCL4") 1160 + ), 1161 + MTK_PIN( 1162 + 111, "GPIO111", 1163 + MTK_EINT_FUNCTION(0, 111), 1164 + DRV_GRP4, 1165 + MTK_FUNCTION(0, "GPIO111"), 1166 + MTK_FUNCTION(1, "SDA4") 1167 + ), 1168 + MTK_PIN( 1169 + 112, "GPIO112", 1170 + MTK_EINT_FUNCTION(0, 112), 1171 + DRV_GRP4, 1172 + MTK_FUNCTION(0, "GPIO112"), 1173 + MTK_FUNCTION(1, "SCL2") 1174 + ), 1175 + MTK_PIN( 1176 + 113, "GPIO113", 1177 + MTK_EINT_FUNCTION(0, 113), 1178 + DRV_GRP4, 1179 + MTK_FUNCTION(0, "GPIO113"), 1180 + MTK_FUNCTION(1, "SDA2") 1181 + ), 1182 + MTK_PIN( 1183 + 114, "GPIO114", 1184 + MTK_EINT_FUNCTION(0, 114), 1185 + DRV_GRP4, 1186 + MTK_FUNCTION(0, "GPIO114"), 1187 + MTK_FUNCTION(1, "CLKM0"), 1188 + MTK_FUNCTION(2, "SPI3_MI"), 1189 + MTK_FUNCTION(7, "DBG_MON_B5") 1190 + ), 1191 + MTK_PIN( 1192 + 115, "GPIO115", 1193 + MTK_EINT_FUNCTION(0, 115), 1194 + DRV_GRP4, 1195 + MTK_FUNCTION(0, "GPIO115"), 1196 + MTK_FUNCTION(1, "CLKM1"), 1197 + MTK_FUNCTION(2, "SPI3_CSB"), 1198 + MTK_FUNCTION(7, "DBG_MON_B4") 1199 + ), 1200 + MTK_PIN( 1201 + 116, "GPIO116", 1202 + MTK_EINT_FUNCTION(0, 116), 1203 + DRV_GRP4, 1204 + MTK_FUNCTION(0, "GPIO116"), 1205 + MTK_FUNCTION(1, "CMMCLK0"), 1206 + MTK_FUNCTION(7, "DBG_MON_B3") 1207 + ), 1208 + MTK_PIN( 1209 + 117, "GPIO117", 1210 + MTK_EINT_FUNCTION(0, 117), 1211 + DRV_GRP4, 1212 + MTK_FUNCTION(0, "GPIO117"), 1213 + MTK_FUNCTION(1, "CMMCLK1"), 1214 + MTK_FUNCTION(2, "DVFSRC_EXT_REQ"), 1215 + MTK_FUNCTION(7, "DBG_MON_B2") 1216 + ), 1217 + MTK_PIN( 1218 + 118, "GPIO118", 1219 + MTK_EINT_FUNCTION(0, 118), 1220 + DRV_GRP4, 1221 + MTK_FUNCTION(0, "GPIO118"), 1222 + MTK_FUNCTION(1, "CLKM2"), 1223 + MTK_FUNCTION(2, "SPI3_MO"), 1224 + MTK_FUNCTION(7, "DBG_MON_B1") 1225 + ), 1226 + MTK_PIN( 1227 + 119, "GPIO119", 1228 + MTK_EINT_FUNCTION(0, 119), 1229 + DRV_GRP4, 1230 + MTK_FUNCTION(0, "GPIO119"), 1231 + MTK_FUNCTION(1, "CLKM3"), 1232 + MTK_FUNCTION(2, "SPI3_CLK"), 1233 + MTK_FUNCTION(7, "DBG_MON_B0") 1234 + ), 1235 + MTK_PIN( 1236 + 120, "GPIO120", 1237 + MTK_EINT_FUNCTION(0, 120), 1238 + DRV_GRP4, 1239 + MTK_FUNCTION(0, "GPIO120"), 1240 + MTK_FUNCTION(1, "CMMCLK2"), 1241 + MTK_FUNCTION(2, "CLKM2"), 1242 + MTK_FUNCTION(6, "ANT_SEL12"), 1243 + MTK_FUNCTION(7, "TP_UCTS2_AO") 1244 + ), 1245 + MTK_PIN( 1246 + 121, "GPIO121", 1247 + MTK_EINT_FUNCTION(0, 121), 1248 + DRV_GRP4, 1249 + MTK_FUNCTION(0, "GPIO121"), 1250 + MTK_FUNCTION(1, "CMMCLK3"), 1251 + MTK_FUNCTION(2, "CLKM3"), 1252 + MTK_FUNCTION(3, "DVFSRC_EXT_REQ"), 1253 + MTK_FUNCTION(6, "ANT_SEL11"), 1254 + MTK_FUNCTION(7, "TP_URTS2_AO") 1255 + ), 1256 + MTK_PIN( 1257 + 122, "GPIO122", 1258 + MTK_EINT_FUNCTION(0, 122), 1259 + DRV_GRP4, 1260 + MTK_FUNCTION(0, "GPIO122"), 1261 + MTK_FUNCTION(1, "CMVREF1"), 1262 + MTK_FUNCTION(2, "PCM0_SYNC"), 1263 + MTK_FUNCTION(3, "SRCLKENAI1"), 1264 + MTK_FUNCTION(4, "AGPS_SYNC"), 1265 + MTK_FUNCTION(5, "PWM_1"), 1266 + MTK_FUNCTION(6, "ANT_SEL9"), 1267 + MTK_FUNCTION(7, "TP_UCTS1_AO") 1268 + ), 1269 + MTK_PIN( 1270 + 123, "GPIO123", 1271 + MTK_EINT_FUNCTION(0, 123), 1272 + DRV_GRP4, 1273 + MTK_FUNCTION(0, "GPIO123"), 1274 + MTK_FUNCTION(2, "PCM0_DI"), 1275 + MTK_FUNCTION(3, "ADSP_JTAG_TRSTN"), 1276 + MTK_FUNCTION(4, "VPU_UDI_NTRST"), 1277 + MTK_FUNCTION(5, "SPM_JTAG_TRSTN"), 1278 + MTK_FUNCTION(6, "SSPM_JTAG_TRSTN") 1279 + ), 1280 + MTK_PIN( 1281 + 124, "GPIO124", 1282 + MTK_EINT_FUNCTION(0, 124), 1283 + DRV_GRP4, 1284 + MTK_FUNCTION(0, "GPIO124"), 1285 + MTK_FUNCTION(1, "CMVREF2"), 1286 + MTK_FUNCTION(2, "PCM0_CLK"), 1287 + MTK_FUNCTION(3, "MD_INT0"), 1288 + MTK_FUNCTION(4, "EXT_FRAME_SYNC"), 1289 + MTK_FUNCTION(5, "PWM_2"), 1290 + MTK_FUNCTION(6, "ANT_SEL10"), 1291 + MTK_FUNCTION(7, "TP_URTS1_AO") 1292 + ), 1293 + MTK_PIN( 1294 + 125, "GPIO125", 1295 + MTK_EINT_FUNCTION(0, 125), 1296 + DRV_GRP4, 1297 + MTK_FUNCTION(0, "GPIO125"), 1298 + MTK_FUNCTION(1, "CMVREF3"), 1299 + MTK_FUNCTION(2, "PCM0_DO"), 1300 + MTK_FUNCTION(3, "ADSP_JTAG_TMS"), 1301 + MTK_FUNCTION(4, "VPU_UDI_TMS"), 1302 + MTK_FUNCTION(5, "SPM_JTAG_TMS"), 1303 + MTK_FUNCTION(6, "SSPM_JTAG_TMS") 1304 + ), 1305 + MTK_PIN( 1306 + 126, "GPIO126", 1307 + MTK_EINT_FUNCTION(0, 126), 1308 + DRV_GRP4, 1309 + MTK_FUNCTION(0, "GPIO126"), 1310 + MTK_FUNCTION(1, "CMVREF4"), 1311 + MTK_FUNCTION(2, "CMFLASH0"), 1312 + MTK_FUNCTION(6, "CONN_MCU_AICE_TMSC") 1313 + ), 1314 + MTK_PIN( 1315 + 127, "GPIO127", 1316 + MTK_EINT_FUNCTION(0, 127), 1317 + DRV_GRP4, 1318 + MTK_FUNCTION(0, "GPIO127"), 1319 + MTK_FUNCTION(1, "CMVREF0"), 1320 + MTK_FUNCTION(2, "CMFLASH1"), 1321 + MTK_FUNCTION(6, "CONN_MCU_AICE_TCKC") 1322 + ), 1323 + MTK_PIN( 1324 + 128, "GPIO128", 1325 + MTK_EINT_FUNCTION(0, 128), 1326 + DRV_GRP0, 1327 + MTK_FUNCTION(0, "GPIO128"), 1328 + MTK_FUNCTION(1, "MD1_SIM1_SIO"), 1329 + MTK_FUNCTION(2, "MD1_SIM2_SIO"), 1330 + MTK_FUNCTION(3, "CCU_JTAG_TRST"), 1331 + MTK_FUNCTION(4, "CONN_DSP_JINTP"), 1332 + MTK_FUNCTION(5, "SCP_JTAG_TRSTN"), 1333 + MTK_FUNCTION(6, "LVTS_FOUT"), 1334 + MTK_FUNCTION(7, "DBG_MON_A3") 1335 + ), 1336 + MTK_PIN( 1337 + 129, "GPIO129", 1338 + MTK_EINT_FUNCTION(0, 129), 1339 + DRV_GRP0, 1340 + MTK_FUNCTION(0, "GPIO129"), 1341 + MTK_FUNCTION(1, "MD1_SIM1_SRST"), 1342 + MTK_FUNCTION(2, "MD1_SIM2_SRST"), 1343 + MTK_FUNCTION(3, "CCU_JTAG_TCK"), 1344 + MTK_FUNCTION(4, "CONN_DSP_JCK"), 1345 + MTK_FUNCTION(5, "SCP_JTAG_TCK"), 1346 + MTK_FUNCTION(6, "LVTS_SDO"), 1347 + MTK_FUNCTION(7, "DBG_MON_A4") 1348 + ), 1349 + MTK_PIN( 1350 + 130, "GPIO130", 1351 + MTK_EINT_FUNCTION(0, 130), 1352 + DRV_GRP0, 1353 + MTK_FUNCTION(0, "GPIO130"), 1354 + MTK_FUNCTION(1, "MD1_SIM1_SCLK"), 1355 + MTK_FUNCTION(2, "MD1_SIM2_SCLK"), 1356 + MTK_FUNCTION(6, "LVTS_26M"), 1357 + MTK_FUNCTION(7, "DBG_MON_A5") 1358 + ), 1359 + MTK_PIN( 1360 + 131, "GPIO131", 1361 + MTK_EINT_FUNCTION(0, 131), 1362 + DRV_GRP0, 1363 + MTK_FUNCTION(0, "GPIO131"), 1364 + MTK_FUNCTION(1, "MD1_SIM2_SCLK"), 1365 + MTK_FUNCTION(2, "MD1_SIM1_SCLK"), 1366 + MTK_FUNCTION(3, "CCU_JTAG_TDI"), 1367 + MTK_FUNCTION(4, "CONN_DSP_JDI"), 1368 + MTK_FUNCTION(5, "SCP_JTAG_TDI"), 1369 + MTK_FUNCTION(6, "LVTS_SCK"), 1370 + MTK_FUNCTION(7, "DBG_MON_A0") 1371 + ), 1372 + MTK_PIN( 1373 + 132, "GPIO132", 1374 + MTK_EINT_FUNCTION(0, 132), 1375 + DRV_GRP0, 1376 + MTK_FUNCTION(0, "GPIO132"), 1377 + MTK_FUNCTION(1, "MD1_SIM2_SRST"), 1378 + MTK_FUNCTION(2, "MD1_SIM1_SRST"), 1379 + MTK_FUNCTION(3, "CCU_JTAG_TMS"), 1380 + MTK_FUNCTION(4, "CONN_DSP_JMS"), 1381 + MTK_FUNCTION(5, "SCP_JTAG_TMS"), 1382 + MTK_FUNCTION(6, "LVTS_SDI"), 1383 + MTK_FUNCTION(7, "DBG_MON_A1") 1384 + ), 1385 + MTK_PIN( 1386 + 133, "GPIO133", 1387 + MTK_EINT_FUNCTION(0, 133), 1388 + DRV_GRP0, 1389 + MTK_FUNCTION(0, "GPIO133"), 1390 + MTK_FUNCTION(1, "MD1_SIM2_SIO"), 1391 + MTK_FUNCTION(2, "MD1_SIM1_SIO"), 1392 + MTK_FUNCTION(3, "CCU_JTAG_TDO"), 1393 + MTK_FUNCTION(4, "CONN_DSP_JDO"), 1394 + MTK_FUNCTION(5, "SCP_JTAG_TDO"), 1395 + MTK_FUNCTION(6, "LVTS_SCF"), 1396 + MTK_FUNCTION(7, "DBG_MON_A2") 1397 + ), 1398 + MTK_PIN( 1399 + 134, "GPIO134", 1400 + MTK_EINT_FUNCTION(0, 134), 1401 + DRV_GRP4, 1402 + MTK_FUNCTION(0, "GPIO134"), 1403 + MTK_FUNCTION(1, "MSDC1_CLK"), 1404 + MTK_FUNCTION(2, "PCM1_CLK"), 1405 + MTK_FUNCTION(3, "SPI5_B_MI"), 1406 + MTK_FUNCTION(4, "UDI_TCK"), 1407 + MTK_FUNCTION(5, "CONN_DSP_JCK"), 1408 + MTK_FUNCTION(6, "IPU_JTAG_TCK"), 1409 + MTK_FUNCTION(7, "JTCK_SEL3") 1410 + ), 1411 + MTK_PIN( 1412 + 135, "GPIO135", 1413 + MTK_EINT_FUNCTION(0, 135), 1414 + DRV_GRP4, 1415 + MTK_FUNCTION(0, "GPIO135"), 1416 + MTK_FUNCTION(1, "MSDC1_CMD"), 1417 + MTK_FUNCTION(2, "PCM1_SYNC"), 1418 + MTK_FUNCTION(3, "SPI5_B_CSB"), 1419 + MTK_FUNCTION(4, "UDI_TMS"), 1420 + MTK_FUNCTION(5, "CONN_DSP_JMS"), 1421 + MTK_FUNCTION(6, "IPU_JTAG_TMS"), 1422 + MTK_FUNCTION(7, "JTMS_SEL3") 1423 + ), 1424 + MTK_PIN( 1425 + 136, "GPIO136", 1426 + MTK_EINT_FUNCTION(0, 136), 1427 + DRV_GRP4, 1428 + MTK_FUNCTION(0, "GPIO136"), 1429 + MTK_FUNCTION(1, "MSDC1_DAT3"), 1430 + MTK_FUNCTION(2, "PCM1_DI"), 1431 + MTK_FUNCTION(3, "SPI5_B_MO"), 1432 + MTK_FUNCTION(4, "CONN_TCXOENA_REQ"), 1433 + MTK_FUNCTION(5, "CONN_DSP_JINTP"), 1434 + MTK_FUNCTION(6, "CONN_MCU_AICE_TMSC") 1435 + ), 1436 + MTK_PIN( 1437 + 137, "GPIO137", 1438 + MTK_EINT_FUNCTION(0, 137), 1439 + DRV_GRP4, 1440 + MTK_FUNCTION(0, "GPIO137"), 1441 + MTK_FUNCTION(1, "MSDC1_DAT0"), 1442 + MTK_FUNCTION(2, "PCM1_DO0"), 1443 + MTK_FUNCTION(3, "SPI5_B_CLK"), 1444 + MTK_FUNCTION(4, "UDI_TDI"), 1445 + MTK_FUNCTION(5, "CONN_DSP_JDI"), 1446 + MTK_FUNCTION(6, "IPU_JTAG_TDI"), 1447 + MTK_FUNCTION(7, "JTDI_SEL3") 1448 + ), 1449 + MTK_PIN( 1450 + 138, "GPIO138", 1451 + MTK_EINT_FUNCTION(0, 138), 1452 + DRV_GRP4, 1453 + MTK_FUNCTION(0, "GPIO138"), 1454 + MTK_FUNCTION(1, "MSDC1_DAT2"), 1455 + MTK_FUNCTION(2, "PCM1_DO2"), 1456 + MTK_FUNCTION(3, "ANT_SEL11"), 1457 + MTK_FUNCTION(4, "UDI_NTRST"), 1458 + MTK_FUNCTION(5, "CONN_MCU_AICE_TCKC"), 1459 + MTK_FUNCTION(6, "IPU_JTAG_TRST"), 1460 + MTK_FUNCTION(7, "JTRSTN_SEL3") 1461 + ), 1462 + MTK_PIN( 1463 + 139, "GPIO139", 1464 + MTK_EINT_FUNCTION(0, 139), 1465 + DRV_GRP4, 1466 + MTK_FUNCTION(0, "GPIO139"), 1467 + MTK_FUNCTION(1, "MSDC1_DAT1"), 1468 + MTK_FUNCTION(2, "PCM1_DO1"), 1469 + MTK_FUNCTION(3, "ANT_SEL12"), 1470 + MTK_FUNCTION(4, "UDI_TDO"), 1471 + MTK_FUNCTION(5, "CONN_DSP_JDO"), 1472 + MTK_FUNCTION(6, "IPU_JTAG_TDO"), 1473 + MTK_FUNCTION(7, "JTDO_SEL3") 1474 + ), 1475 + MTK_PIN( 1476 + 140, "GPIO140", 1477 + MTK_EINT_FUNCTION(0, 140), 1478 + DRV_GRP4, 1479 + MTK_FUNCTION(0, "GPIO140"), 1480 + MTK_FUNCTION(1, "MD_INT1_C2K_UIM0_HOT_PLUG"), 1481 + MTK_FUNCTION(2, "MD_INT2_C2K_UIM1_HOT_PLUG"), 1482 + MTK_FUNCTION(3, "ADSP_URXD0"), 1483 + MTK_FUNCTION(4, "SCL_6306"), 1484 + MTK_FUNCTION(5, "PTA_RXD"), 1485 + MTK_FUNCTION(6, "SSPM_URXD_AO") 1486 + ), 1487 + MTK_PIN( 1488 + 141, "GPIO141", 1489 + MTK_EINT_FUNCTION(0, 141), 1490 + DRV_GRP4, 1491 + MTK_FUNCTION(0, "GPIO141"), 1492 + MTK_FUNCTION(1, "MD_INT2_C2K_UIM1_HOT_PLUG"), 1493 + MTK_FUNCTION(2, "MD_INT1_C2K_UIM0_HOT_PLUG"), 1494 + MTK_FUNCTION(3, "ADSP_UTXD0"), 1495 + MTK_FUNCTION(4, "SDA_6306"), 1496 + MTK_FUNCTION(5, "PTA_TXD"), 1497 + MTK_FUNCTION(6, "SSPM_UTXD_AO") 1498 + ), 1499 + MTK_PIN( 1500 + 142, "GPIO142", 1501 + MTK_EINT_FUNCTION(0, 142), 1502 + DRV_GRP4, 1503 + MTK_FUNCTION(0, "GPIO142"), 1504 + MTK_FUNCTION(1, "SCP_VREQ_VAO"), 1505 + MTK_FUNCTION(2, "DVFSRC_EXT_REQ") 1506 + ), 1507 + MTK_PIN( 1508 + 143, "GPIO143", 1509 + MTK_EINT_FUNCTION(0, 143), 1510 + DRV_GRP4, 1511 + MTK_FUNCTION(0, "GPIO143"), 1512 + MTK_FUNCTION(1, "AUD_DAT_MOSI2"), 1513 + MTK_FUNCTION(7, "DBG_MON_A9") 1514 + ), 1515 + MTK_PIN( 1516 + 144, "GPIO144", 1517 + MTK_EINT_FUNCTION(0, 144), 1518 + DRV_GRP4, 1519 + MTK_FUNCTION(0, "GPIO144"), 1520 + MTK_FUNCTION(1, "AUD_NLE_MOSI1"), 1521 + MTK_FUNCTION(2, "AUD_CLK_MISO"), 1522 + MTK_FUNCTION(3, "I2S2_MCK"), 1523 + MTK_FUNCTION(5, "UDI_TCK"), 1524 + MTK_FUNCTION(6, "UFS_UNIPRO_SDA"), 1525 + MTK_FUNCTION(7, "DBG_MON_A10") 1526 + ), 1527 + MTK_PIN( 1528 + 145, "GPIO145", 1529 + MTK_EINT_FUNCTION(0, 145), 1530 + DRV_GRP4, 1531 + MTK_FUNCTION(0, "GPIO145"), 1532 + MTK_FUNCTION(1, "AUD_NLE_MOSI0"), 1533 + MTK_FUNCTION(2, "AUD_SYNC_MISO"), 1534 + MTK_FUNCTION(3, "I2S2_BCK"), 1535 + MTK_FUNCTION(5, "UDI_TMS"), 1536 + MTK_FUNCTION(7, "DBG_MON_A11") 1537 + ), 1538 + MTK_PIN( 1539 + 146, "GPIO146", 1540 + MTK_EINT_FUNCTION(0, 146), 1541 + DRV_GRP4, 1542 + MTK_FUNCTION(0, "GPIO146"), 1543 + MTK_FUNCTION(1, "AUD_DAT_MISO2"), 1544 + MTK_FUNCTION(3, "I2S2_DI2"), 1545 + MTK_FUNCTION(5, "UDI_TDO"), 1546 + MTK_FUNCTION(7, "DBG_MON_A14") 1547 + ), 1548 + MTK_PIN( 1549 + 147, "GPIO147", 1550 + MTK_EINT_FUNCTION(0, 147), 1551 + DRV_GRP4, 1552 + MTK_FUNCTION(0, "GPIO147"), 1553 + MTK_FUNCTION(1, "ANT_SEL0"), 1554 + MTK_FUNCTION(2, "PWM_3") 1555 + ), 1556 + MTK_PIN( 1557 + 148, "GPIO148", 1558 + MTK_EINT_FUNCTION(0, 148), 1559 + DRV_GRP4, 1560 + MTK_FUNCTION(0, "GPIO148"), 1561 + MTK_FUNCTION(1, "ANT_SEL1"), 1562 + MTK_FUNCTION(2, "SPI0_B_MI"), 1563 + MTK_FUNCTION(3, "SSPM_URXD_AO"), 1564 + MTK_FUNCTION(5, "TP_UCTS2_AO"), 1565 + MTK_FUNCTION(6, "CLKM0") 1566 + ), 1567 + MTK_PIN( 1568 + 149, "GPIO149", 1569 + MTK_EINT_FUNCTION(0, 149), 1570 + DRV_GRP4, 1571 + MTK_FUNCTION(0, "GPIO149"), 1572 + MTK_FUNCTION(1, "ANT_SEL2"), 1573 + MTK_FUNCTION(2, "SPI0_B_CSB"), 1574 + MTK_FUNCTION(3, "SSPM_UTXD_AO"), 1575 + MTK_FUNCTION(5, "TP_URTS2_AO"), 1576 + MTK_FUNCTION(6, "CONN_TCXOENA_REQ") 1577 + ), 1578 + MTK_PIN( 1579 + 150, "GPIO150", 1580 + MTK_EINT_FUNCTION(0, 150), 1581 + DRV_GRP4, 1582 + MTK_FUNCTION(0, "GPIO150"), 1583 + MTK_FUNCTION(1, "ANT_SEL3"), 1584 + MTK_FUNCTION(2, "SPI0_B_MO"), 1585 + MTK_FUNCTION(3, "UCTS1"), 1586 + MTK_FUNCTION(5, "TP_UCTS1_AO"), 1587 + MTK_FUNCTION(6, "IDDIG"), 1588 + MTK_FUNCTION(7, "SCL9") 1589 + ), 1590 + MTK_PIN( 1591 + 151, "GPIO151", 1592 + MTK_EINT_FUNCTION(0, 151), 1593 + DRV_GRP4, 1594 + MTK_FUNCTION(0, "GPIO151"), 1595 + MTK_FUNCTION(1, "ANT_SEL4"), 1596 + MTK_FUNCTION(2, "SPI0_B_CLK"), 1597 + MTK_FUNCTION(3, "URTS1"), 1598 + MTK_FUNCTION(5, "TP_URTS1_AO"), 1599 + MTK_FUNCTION(6, "USB_DRVVBUS"), 1600 + MTK_FUNCTION(7, "SDA9") 1601 + ), 1602 + MTK_PIN( 1603 + 152, "GPIO152", 1604 + MTK_EINT_FUNCTION(0, 152), 1605 + DRV_GRP4, 1606 + MTK_FUNCTION(0, "GPIO152"), 1607 + MTK_FUNCTION(1, "ANT_SEL5"), 1608 + MTK_FUNCTION(2, "SPI1_B_MI"), 1609 + MTK_FUNCTION(3, "CLKM3"), 1610 + MTK_FUNCTION(5, "TP_URXD1_AO"), 1611 + MTK_FUNCTION(6, "SCP_SPI1_B_MI"), 1612 + MTK_FUNCTION(7, "SCL8") 1613 + ), 1614 + MTK_PIN( 1615 + 153, "GPIO153", 1616 + MTK_EINT_FUNCTION(0, 153), 1617 + DRV_GRP4, 1618 + MTK_FUNCTION(0, "GPIO153"), 1619 + MTK_FUNCTION(1, "ANT_SEL6"), 1620 + MTK_FUNCTION(2, "SPI1_B_CSB"), 1621 + MTK_FUNCTION(3, "SRCLKENAI0"), 1622 + MTK_FUNCTION(4, "PWM_0"), 1623 + MTK_FUNCTION(5, "TP_UTXD1_AO"), 1624 + MTK_FUNCTION(6, "SCP_SPI1_B_CS"), 1625 + MTK_FUNCTION(7, "SDA8") 1626 + ), 1627 + MTK_PIN( 1628 + 154, "GPIO154", 1629 + MTK_EINT_FUNCTION(0, 154), 1630 + DRV_GRP4, 1631 + MTK_FUNCTION(0, "GPIO154"), 1632 + MTK_FUNCTION(1, "ANT_SEL7"), 1633 + MTK_FUNCTION(2, "SPI1_B_MO"), 1634 + MTK_FUNCTION(3, "SRCLKENAI1"), 1635 + MTK_FUNCTION(5, "TP_URXD2_AO"), 1636 + MTK_FUNCTION(6, "SCP_SPI1_B_MO") 1637 + ), 1638 + MTK_PIN( 1639 + 155, "GPIO155", 1640 + MTK_EINT_FUNCTION(0, 155), 1641 + DRV_GRP4, 1642 + MTK_FUNCTION(0, "GPIO155"), 1643 + MTK_FUNCTION(1, "ANT_SEL8"), 1644 + MTK_FUNCTION(2, "SPI1_B_CLK"), 1645 + MTK_FUNCTION(3, "MD_INT0"), 1646 + MTK_FUNCTION(5, "TP_UTXD2_AO"), 1647 + MTK_FUNCTION(6, "SCP_SPI1_B_CK"), 1648 + MTK_FUNCTION(7, "DBG_MON_A15") 1649 + ), 1650 + MTK_PIN( 1651 + 156, "GPIO156", 1652 + MTK_EINT_FUNCTION(0, 156), 1653 + DRV_GRP4, 1654 + MTK_FUNCTION(0, "GPIO156"), 1655 + MTK_FUNCTION(1, "CONN_TOP_CLK"), 1656 + MTK_FUNCTION(2, "AUXIF_CLK0"), 1657 + MTK_FUNCTION(7, "DBG_MON_A16") 1658 + ), 1659 + MTK_PIN( 1660 + 157, "GPIO157", 1661 + MTK_EINT_FUNCTION(0, 157), 1662 + DRV_GRP4, 1663 + MTK_FUNCTION(0, "GPIO157"), 1664 + MTK_FUNCTION(1, "CONN_TOP_DATA"), 1665 + MTK_FUNCTION(2, "AUXIF_ST0"), 1666 + MTK_FUNCTION(7, "DBG_MON_A17") 1667 + ), 1668 + MTK_PIN( 1669 + 158, "GPIO158", 1670 + MTK_EINT_FUNCTION(0, 158), 1671 + DRV_GRP4, 1672 + MTK_FUNCTION(0, "GPIO158"), 1673 + MTK_FUNCTION(1, "CONN_HRST_B"), 1674 + MTK_FUNCTION(7, "DBG_MON_A18") 1675 + ), 1676 + MTK_PIN( 1677 + 159, "GPIO159", 1678 + MTK_EINT_FUNCTION(0, 159), 1679 + DRV_GRP4, 1680 + MTK_FUNCTION(0, "GPIO159"), 1681 + MTK_FUNCTION(1, "CONN_WB_PTA"), 1682 + MTK_FUNCTION(7, "DBG_MON_A19") 1683 + ), 1684 + MTK_PIN( 1685 + 160, "GPIO160", 1686 + MTK_EINT_FUNCTION(0, 160), 1687 + DRV_GRP4, 1688 + MTK_FUNCTION(0, "GPIO160"), 1689 + MTK_FUNCTION(1, "CONN_BT_CLK"), 1690 + MTK_FUNCTION(2, "AUXIF_CLK1"), 1691 + MTK_FUNCTION(7, "DBG_MON_A20") 1692 + ), 1693 + MTK_PIN( 1694 + 161, "GPIO161", 1695 + MTK_EINT_FUNCTION(0, 161), 1696 + DRV_GRP4, 1697 + MTK_FUNCTION(0, "GPIO161"), 1698 + MTK_FUNCTION(1, "CONN_BT_DATA"), 1699 + MTK_FUNCTION(2, "AUXIF_ST1"), 1700 + MTK_FUNCTION(7, "DBG_MON_A21") 1701 + ), 1702 + MTK_PIN( 1703 + 162, "GPIO162", 1704 + MTK_EINT_FUNCTION(0, 162), 1705 + DRV_GRP4, 1706 + MTK_FUNCTION(0, "GPIO162"), 1707 + MTK_FUNCTION(1, "CONN_WF_CTRL0"), 1708 + MTK_FUNCTION(7, "DBG_MON_A22") 1709 + ), 1710 + MTK_PIN( 1711 + 163, "GPIO163", 1712 + MTK_EINT_FUNCTION(0, 163), 1713 + DRV_GRP4, 1714 + MTK_FUNCTION(0, "GPIO163"), 1715 + MTK_FUNCTION(1, "CONN_WF_CTRL1"), 1716 + MTK_FUNCTION(2, "UFS_MPHY_SCL"), 1717 + MTK_FUNCTION(7, "DBG_MON_A23") 1718 + ), 1719 + MTK_PIN( 1720 + 164, "GPIO164", 1721 + MTK_EINT_FUNCTION(0, 164), 1722 + DRV_GRP4, 1723 + MTK_FUNCTION(0, "GPIO164"), 1724 + MTK_FUNCTION(1, "CONN_WF_CTRL2"), 1725 + MTK_FUNCTION(2, "UFS_MPHY_SDA"), 1726 + MTK_FUNCTION(7, "DBG_MON_A24") 1727 + ), 1728 + MTK_PIN( 1729 + 165, "GPIO165", 1730 + MTK_EINT_FUNCTION(0, 165), 1731 + DRV_GRP4, 1732 + MTK_FUNCTION(0, "GPIO165"), 1733 + MTK_FUNCTION(1, "CONN_WF_CTRL3"), 1734 + MTK_FUNCTION(2, "UFS_UNIPRO_SDA"), 1735 + MTK_FUNCTION(7, "DBG_MON_A25") 1736 + ), 1737 + MTK_PIN( 1738 + 166, "GPIO166", 1739 + MTK_EINT_FUNCTION(0, 166), 1740 + DRV_GRP4, 1741 + MTK_FUNCTION(0, "GPIO166"), 1742 + MTK_FUNCTION(1, "CONN_WF_CTRL4"), 1743 + MTK_FUNCTION(2, "UFS_UNIPRO_SCL"), 1744 + MTK_FUNCTION(7, "DBG_MON_A26") 1745 + ), 1746 + MTK_PIN( 1747 + 167, "GPIO167", 1748 + MTK_EINT_FUNCTION(0, 167), 1749 + DRV_GRP4, 1750 + MTK_FUNCTION(0, "GPIO167"), 1751 + MTK_FUNCTION(1, "MSDC0_CMD") 1752 + ), 1753 + MTK_PIN( 1754 + 168, "GPIO168", 1755 + MTK_EINT_FUNCTION(0, 168), 1756 + DRV_GRP4, 1757 + MTK_FUNCTION(0, "GPIO168"), 1758 + MTK_FUNCTION(1, "MSDC0_DAT0") 1759 + ), 1760 + MTK_PIN( 1761 + 169, "GPIO169", 1762 + MTK_EINT_FUNCTION(0, 169), 1763 + DRV_GRP4, 1764 + MTK_FUNCTION(0, "GPIO169"), 1765 + MTK_FUNCTION(1, "MSDC0_DAT2") 1766 + ), 1767 + MTK_PIN( 1768 + 170, "GPIO170", 1769 + MTK_EINT_FUNCTION(0, 170), 1770 + DRV_GRP4, 1771 + MTK_FUNCTION(0, "GPIO170"), 1772 + MTK_FUNCTION(1, "MSDC0_DAT4") 1773 + ), 1774 + MTK_PIN( 1775 + 171, "GPIO171", 1776 + MTK_EINT_FUNCTION(0, 171), 1777 + DRV_GRP4, 1778 + MTK_FUNCTION(0, "GPIO171"), 1779 + MTK_FUNCTION(1, "MSDC0_DAT6") 1780 + ), 1781 + MTK_PIN( 1782 + 172, "GPIO172", 1783 + MTK_EINT_FUNCTION(0, 172), 1784 + DRV_GRP4, 1785 + MTK_FUNCTION(0, "GPIO172"), 1786 + MTK_FUNCTION(1, "MSDC0_DAT1") 1787 + ), 1788 + MTK_PIN( 1789 + 173, "GPIO173", 1790 + MTK_EINT_FUNCTION(0, 173), 1791 + DRV_GRP4, 1792 + MTK_FUNCTION(0, "GPIO173"), 1793 + MTK_FUNCTION(1, "MSDC0_DAT5") 1794 + ), 1795 + MTK_PIN( 1796 + 174, "GPIO174", 1797 + MTK_EINT_FUNCTION(0, 174), 1798 + DRV_GRP4, 1799 + MTK_FUNCTION(0, "GPIO174"), 1800 + MTK_FUNCTION(1, "MSDC0_DAT7") 1801 + ), 1802 + MTK_PIN( 1803 + 175, "GPIO175", 1804 + MTK_EINT_FUNCTION(0, 175), 1805 + DRV_GRP4, 1806 + MTK_FUNCTION(0, "GPIO175"), 1807 + MTK_FUNCTION(1, "MSDC0_DSL"), 1808 + MTK_FUNCTION(2, "ANT_SEL9") 1809 + ), 1810 + MTK_PIN( 1811 + 176, "GPIO176", 1812 + MTK_EINT_FUNCTION(0, 176), 1813 + DRV_GRP4, 1814 + MTK_FUNCTION(0, "GPIO176"), 1815 + MTK_FUNCTION(1, "MSDC0_CLK"), 1816 + MTK_FUNCTION(2, "ANT_SEL10") 1817 + ), 1818 + MTK_PIN( 1819 + 177, "GPIO177", 1820 + MTK_EINT_FUNCTION(0, 177), 1821 + DRV_GRP4, 1822 + MTK_FUNCTION(0, "GPIO177"), 1823 + MTK_FUNCTION(1, "MSDC0_DAT3") 1824 + ), 1825 + MTK_PIN( 1826 + 178, "GPIO178", 1827 + MTK_EINT_FUNCTION(0, 178), 1828 + DRV_GRP4, 1829 + MTK_FUNCTION(0, "GPIO178"), 1830 + MTK_FUNCTION(1, "MSDC0_RSTB") 1831 + ), 1832 + MTK_PIN( 1833 + 179, "GPIO179", 1834 + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 1835 + DRV_GRP4, 1836 + MTK_FUNCTION(0, "GPIO179"), 1837 + MTK_FUNCTION(1, "RFIC0_BSI_EN") 1838 + ), 1839 + MTK_PIN( 1840 + 180, "GPIO180", 1841 + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 1842 + DRV_GRP4, 1843 + MTK_FUNCTION(0, "GPIO180"), 1844 + MTK_FUNCTION(1, "RFIC0_BSI_CK") 1845 + ), 1846 + MTK_PIN( 1847 + 181, "GPIO181", 1848 + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 1849 + DRV_GRP4, 1850 + MTK_FUNCTION(0, "GPIO181"), 1851 + MTK_FUNCTION(1, "SRCLKENA0") 1852 + ), 1853 + MTK_PIN( 1854 + 182, "GPIO182", 1855 + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 1856 + DRV_GRP4, 1857 + MTK_FUNCTION(0, "GPIO182"), 1858 + MTK_FUNCTION(1, "SRCLKENA1") 1859 + ), 1860 + MTK_PIN( 1861 + 183, "GPIO183", 1862 + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 1863 + DRV_GRP4, 1864 + MTK_FUNCTION(0, "GPIO183"), 1865 + MTK_FUNCTION(1, "WATCHDOG") 1866 + ), 1867 + MTK_PIN( 1868 + 184, "GPIO184", 1869 + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 1870 + DRV_GRP4, 1871 + MTK_FUNCTION(0, "GPIO184"), 1872 + MTK_FUNCTION(1, "PWRAP_SPI0_MI"), 1873 + MTK_FUNCTION(2, "PWRAP_SPI0_MO") 1874 + ), 1875 + MTK_PIN( 1876 + 185, "GPIO185", 1877 + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 1878 + DRV_GRP4, 1879 + MTK_FUNCTION(0, "GPIO185"), 1880 + MTK_FUNCTION(1, "PWRAP_SPI0_CSN") 1881 + ), 1882 + MTK_PIN( 1883 + 186, "GPIO186", 1884 + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 1885 + DRV_GRP4, 1886 + MTK_FUNCTION(0, "GPIO186"), 1887 + MTK_FUNCTION(1, "PWRAP_SPI0_MO"), 1888 + MTK_FUNCTION(2, "PWRAP_SPI0_MI") 1889 + ), 1890 + MTK_PIN( 1891 + 187, "GPIO187", 1892 + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 1893 + DRV_GRP4, 1894 + MTK_FUNCTION(0, "GPIO187"), 1895 + MTK_FUNCTION(1, "PWRAP_SPI0_CK") 1896 + ), 1897 + MTK_PIN( 1898 + 188, "GPIO188", 1899 + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 1900 + DRV_GRP4, 1901 + MTK_FUNCTION(0, "GPIO188"), 1902 + MTK_FUNCTION(1, "RTC32K_CK") 1903 + ), 1904 + MTK_PIN( 1905 + 189, "GPIO189", 1906 + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 1907 + DRV_GRP4, 1908 + MTK_FUNCTION(0, "GPIO189"), 1909 + MTK_FUNCTION(1, "AUD_CLK_MOSI"), 1910 + MTK_FUNCTION(3, "I2S1_MCK"), 1911 + MTK_FUNCTION(6, "UFS_UNIPRO_SCL") 1912 + ), 1913 + MTK_PIN( 1914 + 190, "GPIO190", 1915 + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 1916 + DRV_GRP4, 1917 + MTK_FUNCTION(0, "GPIO190"), 1918 + MTK_FUNCTION(1, "AUD_SYNC_MOSI"), 1919 + MTK_FUNCTION(3, "I2S1_BCK"), 1920 + MTK_FUNCTION(7, "DBG_MON_A6") 1921 + ), 1922 + MTK_PIN( 1923 + 191, "GPIO191", 1924 + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 1925 + DRV_GRP4, 1926 + MTK_FUNCTION(0, "GPIO191"), 1927 + MTK_FUNCTION(1, "AUD_DAT_MOSI0"), 1928 + MTK_FUNCTION(3, "I2S1_LRCK"), 1929 + MTK_FUNCTION(7, "DBG_MON_A7") 1930 + ), 1931 + MTK_PIN( 1932 + 192, "GPIO192", 1933 + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 1934 + DRV_GRP4, 1935 + MTK_FUNCTION(0, "GPIO192"), 1936 + MTK_FUNCTION(1, "AUD_DAT_MOSI1"), 1937 + MTK_FUNCTION(3, "I2S1_DO"), 1938 + MTK_FUNCTION(6, "UFS_MPHY_SDA"), 1939 + MTK_FUNCTION(7, "DBG_MON_A8") 1940 + ), 1941 + MTK_PIN( 1942 + 193, "GPIO193", 1943 + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 1944 + DRV_GRP4, 1945 + MTK_FUNCTION(0, "GPIO193"), 1946 + MTK_FUNCTION(1, "AUD_DAT_MISO0"), 1947 + MTK_FUNCTION(2, "VOW_DAT_MISO"), 1948 + MTK_FUNCTION(3, "I2S2_LRCK"), 1949 + MTK_FUNCTION(5, "UDI_TDI"), 1950 + MTK_FUNCTION(7, "DBG_MON_A12") 1951 + ), 1952 + MTK_PIN( 1953 + 194, "GPIO194", 1954 + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 1955 + DRV_GRP4, 1956 + MTK_FUNCTION(0, "GPIO194"), 1957 + MTK_FUNCTION(1, "AUD_DAT_MISO1"), 1958 + MTK_FUNCTION(2, "VOW_CLK_MISO"), 1959 + MTK_FUNCTION(3, "I2S2_DI"), 1960 + MTK_FUNCTION(5, "UDI_NTRST"), 1961 + MTK_FUNCTION(6, "UFS_MPHY_SCL"), 1962 + MTK_FUNCTION(7, "DBG_MON_A13") 1963 + ), 1964 + MTK_PIN( 1965 + 195, "GPIO195", 1966 + MTK_EINT_FUNCTION(0, 179), 1967 + DRV_GRP4, 1968 + MTK_FUNCTION(0, "GPIO195"), 1969 + MTK_FUNCTION(3, "ADSP_JTAG_TCK"), 1970 + MTK_FUNCTION(4, "VPU_UDI_TCK"), 1971 + MTK_FUNCTION(5, "SPM_JTAG_TCK"), 1972 + MTK_FUNCTION(6, "SSPM_JTAG_TCK") 1973 + ), 1974 + MTK_PIN( 1975 + 196, "GPIO196", 1976 + MTK_EINT_FUNCTION(0, 180), 1977 + DRV_GRP4, 1978 + MTK_FUNCTION(0, "GPIO196"), 1979 + MTK_FUNCTION(1, "CMMCLK4"), 1980 + MTK_FUNCTION(3, "ADSP_JTAG_TDI"), 1981 + MTK_FUNCTION(4, "VPU_UDI_TDI"), 1982 + MTK_FUNCTION(5, "SPM_JTAG_TDI"), 1983 + MTK_FUNCTION(6, "SSPM_JTAG_TDI") 1984 + ), 1985 + MTK_PIN( 1986 + 197, "GPIO197", 1987 + MTK_EINT_FUNCTION(0, 181), 1988 + DRV_GRP4, 1989 + MTK_FUNCTION(0, "GPIO197"), 1990 + MTK_FUNCTION(3, "ADSP_JTAG_TDO"), 1991 + MTK_FUNCTION(4, "VPU_UDI_TDO"), 1992 + MTK_FUNCTION(5, "SPM_JTAG_TDO"), 1993 + MTK_FUNCTION(6, "SSPM_JTAG_TDO") 1994 + ), 1995 + MTK_PIN( 1996 + 198, "GPIO198", 1997 + MTK_EINT_FUNCTION(0, 182), 1998 + DRV_GRP4, 1999 + MTK_FUNCTION(0, "GPIO198"), 2000 + MTK_FUNCTION(1, "SCL7") 2001 + ), 2002 + MTK_PIN( 2003 + 199, "GPIO199", 2004 + MTK_EINT_FUNCTION(0, 183), 2005 + DRV_GRP4, 2006 + MTK_FUNCTION(0, "GPIO199"), 2007 + MTK_FUNCTION(1, "SDA7") 2008 + ), 2009 + MTK_PIN( 2010 + 200, "GPIO200", 2011 + MTK_EINT_FUNCTION(0, 184), 2012 + DRV_GRP4, 2013 + MTK_FUNCTION(0, "GPIO200"), 2014 + MTK_FUNCTION(1, "URXD1"), 2015 + MTK_FUNCTION(2, "ADSP_URXD0"), 2016 + MTK_FUNCTION(3, "TP_URXD1_AO"), 2017 + MTK_FUNCTION(4, "SSPM_URXD_AO"), 2018 + MTK_FUNCTION(5, "TP_URXD2_AO"), 2019 + MTK_FUNCTION(6, "MBISTREADEN_TRIGGER") 2020 + ), 2021 + MTK_PIN( 2022 + 201, "GPIO201", 2023 + MTK_EINT_FUNCTION(0, 185), 2024 + DRV_GRP4, 2025 + MTK_FUNCTION(0, "GPIO201"), 2026 + MTK_FUNCTION(1, "UTXD1"), 2027 + MTK_FUNCTION(2, "ADSP_UTXD0"), 2028 + MTK_FUNCTION(3, "TP_UTXD1_AO"), 2029 + MTK_FUNCTION(4, "SSPM_UTXD_AO"), 2030 + MTK_FUNCTION(5, "TP_UTXD2_AO"), 2031 + MTK_FUNCTION(6, "MBISTWRITEEN_TRIGGER") 2032 + ), 2033 + MTK_PIN( 2034 + 202, "GPIO202", 2035 + MTK_EINT_FUNCTION(0, 186), 2036 + DRV_GRP4, 2037 + MTK_FUNCTION(0, "GPIO202"), 2038 + MTK_FUNCTION(1, "PWM_3"), 2039 + MTK_FUNCTION(2, "CLKM3") 2040 + ), 2041 + MTK_PIN( 2042 + 203, "GPIO203", 2043 + MTK_EINT_FUNCTION(0, 187), 2044 + DRV_GRP4, 2045 + MTK_FUNCTION(0, NULL) 2046 + ), 2047 + MTK_PIN( 2048 + 204, "GPIO204", 2049 + MTK_EINT_FUNCTION(0, 188), 2050 + DRV_GRP4, 2051 + MTK_FUNCTION(0, NULL) 2052 + ), 2053 + MTK_PIN( 2054 + 205, "GPIO205", 2055 + MTK_EINT_FUNCTION(0, 189), 2056 + DRV_GRP4, 2057 + MTK_FUNCTION(0, NULL) 2058 + ), 2059 + MTK_PIN( 2060 + 206, "GPIO206", 2061 + MTK_EINT_FUNCTION(0, 190), 2062 + DRV_GRP4, 2063 + MTK_FUNCTION(0, NULL) 2064 + ), 2065 + MTK_PIN( 2066 + 207, "GPIO207", 2067 + MTK_EINT_FUNCTION(0, 191), 2068 + DRV_GRP4, 2069 + MTK_FUNCTION(0, NULL) 2070 + ), 2071 + MTK_PIN( 2072 + 208, "GPIO208", 2073 + MTK_EINT_FUNCTION(0, 193), 2074 + DRV_GRP4, 2075 + MTK_FUNCTION(0, NULL) 2076 + ), 2077 + MTK_PIN( 2078 + 209, "GPIO209", 2079 + MTK_EINT_FUNCTION(0, 194), 2080 + DRV_GRP4, 2081 + MTK_FUNCTION(0, NULL) 2082 + ), 2083 + }; 2084 + 2085 + #endif /* __PINCTRL-MTK-MT6779_H */
+7
drivers/pinctrl/mediatek/pinctrl-paris.c
··· 769 769 if (gpio >= hw->soc->npins) 770 770 return -EINVAL; 771 771 772 + /* 773 + * "Virtual" GPIOs are always and only used for interrupts 774 + * Since they are only used for interrupts, they are always inputs 775 + */ 776 + if (mtk_is_virt_gpio(hw, gpio)) 777 + return 1; 778 + 772 779 desc = (const struct mtk_pin_desc *)&hw->soc->pins[gpio]; 773 780 774 781 err = mtk_hw_get_value(hw, desc, PINCTRL_PIN_REG_DIR, &value);
-5
drivers/pinctrl/meson/pinctrl-meson-a1.c
··· 746 746 "i2c3_sck_x", "i2c3_sda_x", "i2c3_sck_f", "i2c3_sda_f", 747 747 }; 748 748 749 - static const char * const i2c_slave_groups[] = { 750 - "i2c_slave_sda_a", "i2c_slave_sck_a", 751 - "i2c_slave_sda_f", "i2c_slave_sck_f", 752 - }; 753 - 754 749 static const char * const spi_a_groups[] = { 755 750 "spi_a_mosi_x2", "spi_a_ss0_x3", "spi_a_sclk_x4", "spi_a_miso_x5", 756 751 "spi_a_mosi_x7", "spi_a_miso_x8", "spi_a_ss0_x9", "spi_a_sclk_x10",
+7 -4
drivers/pinctrl/meson/pinctrl-meson.c
··· 56 56 #include "../pinctrl-utils.h" 57 57 #include "pinctrl-meson.h" 58 58 59 + static const unsigned int meson_bit_strides[] = { 60 + 1, 1, 1, 1, 1, 2, 1 61 + }; 62 + 59 63 /** 60 64 * meson_get_bank() - find the bank containing a given pin 61 65 * ··· 100 96 { 101 97 struct meson_reg_desc *desc = &bank->regs[reg_type]; 102 98 103 - *reg = desc->reg * 4; 104 - *bit = desc->bit + pin - bank->first; 99 + *bit = (desc->bit + pin - bank->first) * meson_bit_strides[reg_type]; 100 + *reg = (desc->reg + (*bit / 32)) * 4; 101 + *bit &= 0x1f; 105 102 } 106 103 107 104 static int meson_get_groups_count(struct pinctrl_dev *pcdev) ··· 319 314 return ret; 320 315 321 316 meson_calc_reg_and_bit(bank, pin, REG_DS, &reg, &bit); 322 - bit = bit << 1; 323 317 324 318 if (drive_strength_ua <= 500) { 325 319 ds_val = MESON_PINCONF_DRV_500UA; ··· 445 441 return ret; 446 442 447 443 meson_calc_reg_and_bit(bank, pin, REG_DS, &reg, &bit); 448 - bit = bit << 1; 449 444 450 445 ret = regmap_read(pc->reg_ds, reg, &val); 451 446 if (ret)
+4 -3
drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
··· 45 45 * The pins of a pinmux groups are composed of one or two groups of contiguous 46 46 * pins. 47 47 * @name: Name of the pin group, used to lookup the group. 48 - * @start_pins: Index of the first pin of the main range of pins belonging to 48 + * @start_pin: Index of the first pin of the main range of pins belonging to 49 49 * the group 50 50 * @npins: Number of pins included in the first range 51 51 * @reg_mask: Bit mask matching the group in the selection register 52 - * @extra_pins: Index of the first pin of the optional second range of pins 52 + * @val: Value to write to the registers for a given function 53 + * @extra_pin: Index of the first pin of the optional second range of pins 53 54 * belonging to the group 54 - * @npins: Number of pins included in the second optional range 55 + * @extra_npins:Number of pins included in the second optional range 55 56 * @funcs: A list of pinmux functions that can be selected for this group. 56 57 * @pins: List of the pins included in the group 57 58 */
+2 -1
drivers/pinctrl/pinconf-generic.c
··· 231 231 * pinconf_generic_parse_dt_config() 232 232 * parse the config properties into generic pinconfig values. 233 233 * @np: node containing the pinconfig properties 234 + * @pctldev: pincontrol device 234 235 * @configs: array with nconfigs entries containing the generic pinconf values 235 236 * must be freed when no longer necessary. 236 - * @nconfigs: umber of configurations 237 + * @nconfigs: number of configurations 237 238 */ 238 239 int pinconf_generic_parse_dt_config(struct device_node *np, 239 240 struct pinctrl_dev *pctldev,
+13 -21
drivers/pinctrl/pinctrl-amd.c
··· 417 417 { 418 418 int ret = 0; 419 419 u32 pin_reg, pin_reg_irq_en, mask; 420 - unsigned long flags, irq_flags; 420 + unsigned long flags; 421 421 struct gpio_chip *gc = irq_data_get_irq_chip_data(d); 422 422 struct amd_gpio *gpio_dev = gpiochip_get_data(gc); 423 423 424 424 raw_spin_lock_irqsave(&gpio_dev->lock, flags); 425 425 pin_reg = readl(gpio_dev->base + (d->hwirq)*4); 426 - 427 - /* Ignore the settings coming from the client and 428 - * read the values from the ACPI tables 429 - * while setting the trigger type 430 - */ 431 - 432 - irq_flags = irq_get_trigger_type(d->irq); 433 - if (irq_flags != IRQ_TYPE_NONE) 434 - type = irq_flags; 435 426 436 427 switch (type & IRQ_TYPE_SENSE_MASK) { 437 428 case IRQ_TYPE_EDGE_RISING: ··· 846 855 int irq_base; 847 856 struct resource *res; 848 857 struct amd_gpio *gpio_dev; 858 + struct gpio_irq_chip *girq; 849 859 850 860 gpio_dev = devm_kzalloc(&pdev->dev, 851 861 sizeof(struct amd_gpio), GFP_KERNEL); ··· 908 916 return PTR_ERR(gpio_dev->pctrl); 909 917 } 910 918 919 + girq = &gpio_dev->gc.irq; 920 + girq->chip = &amd_gpio_irqchip; 921 + /* This will let us handle the parent IRQ in the driver */ 922 + girq->parent_handler = NULL; 923 + girq->num_parents = 0; 924 + girq->parents = NULL; 925 + girq->default_type = IRQ_TYPE_NONE; 926 + girq->handler = handle_simple_irq; 927 + 911 928 ret = gpiochip_add_data(&gpio_dev->gc, gpio_dev); 912 929 if (ret) 913 930 return ret; ··· 925 924 0, 0, gpio_dev->gc.ngpio); 926 925 if (ret) { 927 926 dev_err(&pdev->dev, "Failed to add pin range\n"); 928 - goto out2; 929 - } 930 - 931 - ret = gpiochip_irqchip_add(&gpio_dev->gc, 932 - &amd_gpio_irqchip, 933 - 0, 934 - handle_simple_irq, 935 - IRQ_TYPE_NONE); 936 - if (ret) { 937 - dev_err(&pdev->dev, "could not add irqchip\n"); 938 - ret = -ENODEV; 939 927 goto out2; 940 928 } 941 929 ··· 955 965 return 0; 956 966 } 957 967 968 + #ifdef CONFIG_ACPI 958 969 static const struct acpi_device_id amd_gpio_acpi_match[] = { 959 970 { "AMD0030", 0 }, 960 971 { "AMDI0030", 0}, 961 972 { }, 962 973 }; 963 974 MODULE_DEVICE_TABLE(acpi, amd_gpio_acpi_match); 975 + #endif 964 976 965 977 static struct platform_driver amd_gpio_driver = { 966 978 .driver = {
+2
drivers/pinctrl/pinctrl-at91-pio4.c
··· 106 106 * @irq_domain: irq domain for the gpio controller. 107 107 * @irqs: table containing the hw irq number of the bank. The index of the 108 108 * table is the bank id. 109 + * @pm_wakeup_sources: bitmap of wakeup sources (lines) 110 + * @pm_suspend_backup: backup/restore register values on suspend/resume 109 111 * @dev: device entry for the Atmel PIO controller. 110 112 * @node: node of the Atmel PIO controller. 111 113 */
+5 -1
drivers/pinctrl/pinctrl-at91.c
··· 65 65 #define DEBOUNCE_VAL_SHIFT 17 66 66 #define DEBOUNCE_VAL (0x3fff << DEBOUNCE_VAL_SHIFT) 67 67 68 - /** 68 + /* 69 69 * These defines will translated the dt binding settings to our internal 70 70 * settings. They are not necessarily the same value as the register setting. 71 71 * The actual drive strength current of low, medium and high must be looked up ··· 161 161 * @set_pulldown: enable/disable pulldown 162 162 * @get_schmitt_trig: get schmitt trigger status 163 163 * @disable_schmitt_trig: disable schmitt trigger 164 + * @get_drivestrength: get driver strength 165 + * @set_drivestrength: set driver strength 166 + * @get_slewrate: get slew rate 167 + * @set_slewrate: set slew rate 164 168 * @irq_type: return irq type 165 169 */ 166 170 struct at91_pinctrl_mux_ops {
+2 -2
drivers/pinctrl/pinctrl-bm1880.c
··· 22 22 /** 23 23 * struct bm1880_pinctrl - driver data 24 24 * @base: Pinctrl base address 25 - * @pctrl: Pinctrl device 25 + * @pctrldev: Pinctrl device 26 26 * @groups: Pingroups 27 27 * @ngroups: Number of @groups 28 28 * @funcs: Pinmux functions 29 29 * @nfuncs: Number of @funcs 30 - * @pconf: Pinconf data 30 + * @pinconf: Pinconf data 31 31 */ 32 32 struct bm1880_pinctrl { 33 33 void __iomem *base;
+10 -5
drivers/pinctrl/pinctrl-ingenic.c
··· 124 124 static int jz4740_nand_cs2_pins[] = { 0x3a, }; 125 125 static int jz4740_nand_cs3_pins[] = { 0x3b, }; 126 126 static int jz4740_nand_cs4_pins[] = { 0x3c, }; 127 + static int jz4740_nand_fre_fwe_pins[] = { 0x5c, 0x5d, }; 127 128 static int jz4740_pwm_pwm0_pins[] = { 0x77, }; 128 129 static int jz4740_pwm_pwm1_pins[] = { 0x78, }; 129 130 static int jz4740_pwm_pwm2_pins[] = { 0x79, }; ··· 147 146 static int jz4740_nand_cs2_funcs[] = { 0, }; 148 147 static int jz4740_nand_cs3_funcs[] = { 0, }; 149 148 static int jz4740_nand_cs4_funcs[] = { 0, }; 149 + static int jz4740_nand_fre_fwe_funcs[] = { 0, 0, }; 150 150 static int jz4740_pwm_pwm0_funcs[] = { 0, }; 151 151 static int jz4740_pwm_pwm1_funcs[] = { 0, }; 152 152 static int jz4740_pwm_pwm2_funcs[] = { 0, }; ··· 180 178 INGENIC_PIN_GROUP("nand-cs2", jz4740_nand_cs2), 181 179 INGENIC_PIN_GROUP("nand-cs3", jz4740_nand_cs3), 182 180 INGENIC_PIN_GROUP("nand-cs4", jz4740_nand_cs4), 181 + INGENIC_PIN_GROUP("nand-fre-fwe", jz4740_nand_fre_fwe), 183 182 INGENIC_PIN_GROUP("pwm0", jz4740_pwm_pwm0), 184 183 INGENIC_PIN_GROUP("pwm1", jz4740_pwm_pwm1), 185 184 INGENIC_PIN_GROUP("pwm2", jz4740_pwm_pwm2), ··· 198 195 "lcd-8bit", "lcd-16bit", "lcd-18bit", "lcd-18bit-tft", "lcd-no-pins", 199 196 }; 200 197 static const char *jz4740_nand_groups[] = { 201 - "nand-cs1", "nand-cs2", "nand-cs3", "nand-cs4", 198 + "nand-cs1", "nand-cs2", "nand-cs3", "nand-cs4", "nand-fre-fwe", 202 199 }; 203 200 static const char *jz4740_pwm0_groups[] = { "pwm0", }; 204 201 static const char *jz4740_pwm1_groups[] = { "pwm1", }; ··· 1813 1810 */ 1814 1811 high = ingenic_gpio_get_value(jzgc, irq); 1815 1812 if (high) 1816 - irq_set_type(jzgc, irq, IRQ_TYPE_EDGE_FALLING); 1813 + irq_set_type(jzgc, irq, IRQ_TYPE_LEVEL_LOW); 1817 1814 else 1818 - irq_set_type(jzgc, irq, IRQ_TYPE_EDGE_RISING); 1815 + irq_set_type(jzgc, irq, IRQ_TYPE_LEVEL_HIGH); 1819 1816 } 1820 1817 1821 1818 if (jzgc->jzpc->info->version >= ID_JZ4760) ··· 1851 1848 */ 1852 1849 bool high = ingenic_gpio_get_value(jzgc, irqd->hwirq); 1853 1850 1854 - type = high ? IRQ_TYPE_EDGE_FALLING : IRQ_TYPE_EDGE_RISING; 1851 + type = high ? IRQ_TYPE_LEVEL_LOW : IRQ_TYPE_LEVEL_HIGH; 1855 1852 } 1856 1853 1857 1854 irq_set_type(jzgc, irqd->hwirq, type); ··· 1958 1955 unsigned int pin = gc->base + offset; 1959 1956 1960 1957 if (jzpc->info->version >= ID_JZ4760) { 1961 - if (ingenic_get_pin_config(jzpc, pin, JZ4760_GPIO_PAT1)) 1958 + if (ingenic_get_pin_config(jzpc, pin, JZ4760_GPIO_INT) || 1959 + ingenic_get_pin_config(jzpc, pin, JZ4760_GPIO_PAT1)) 1962 1960 return GPIO_LINE_DIRECTION_IN; 1963 1961 return GPIO_LINE_DIRECTION_OUT; 1964 1962 } ··· 2296 2292 2297 2293 static const struct of_device_id ingenic_gpio_of_match[] __initconst = { 2298 2294 { .compatible = "ingenic,jz4740-gpio", }, 2295 + { .compatible = "ingenic,jz4725b-gpio", }, 2299 2296 { .compatible = "ingenic,jz4760-gpio", }, 2300 2297 { .compatible = "ingenic,jz4770-gpio", }, 2301 2298 { .compatible = "ingenic,jz4780-gpio", },
+6 -6
drivers/pinctrl/pinctrl-lpc18xx.c
··· 838 838 *arg = (reg & LPC18XX_SCU_PIN_EHD_MASK) >> LPC18XX_SCU_PIN_EHD_POS; 839 839 switch (*arg) { 840 840 case 3: *arg += 5; 841 - /* fall through */ 841 + fallthrough; 842 842 case 2: *arg += 5; 843 - /* fall through */ 843 + fallthrough; 844 844 case 1: *arg += 3; 845 - /* fall through */ 845 + fallthrough; 846 846 case 0: *arg += 4; 847 847 } 848 848 break; ··· 1057 1057 1058 1058 switch (param_val) { 1059 1059 case 20: param_val -= 5; 1060 - /* fall through */ 1060 + fallthrough; 1061 1061 case 14: param_val -= 5; 1062 - /* fall through */ 1062 + fallthrough; 1063 1063 case 8: param_val -= 3; 1064 - /* fall through */ 1064 + fallthrough; 1065 1065 case 4: param_val -= 4; 1066 1066 break; 1067 1067 default:
+14 -30
drivers/pinctrl/pinctrl-mcp23s08.c
··· 522 522 return 0; 523 523 } 524 524 525 - static int mcp23s08_irqchip_setup(struct mcp23s08 *mcp) 526 - { 527 - struct gpio_chip *chip = &mcp->chip; 528 - int err; 529 - 530 - err = gpiochip_irqchip_add_nested(chip, 531 - &mcp->irq_chip, 532 - 0, 533 - handle_simple_irq, 534 - IRQ_TYPE_NONE); 535 - if (err) { 536 - dev_err(chip->parent, 537 - "could not connect irqchip to gpiochip: %d\n", err); 538 - return err; 539 - } 540 - 541 - gpiochip_set_nested_irqchip(chip, 542 - &mcp->irq_chip, 543 - mcp->irq); 544 - 545 - return 0; 546 - } 547 - 548 525 /*----------------------------------------------------------------------*/ 549 526 550 527 int mcp23s08_probe_one(struct mcp23s08 *mcp, struct device *dev, ··· 566 589 if (ret < 0) 567 590 goto fail; 568 591 569 - ret = devm_gpiochip_add_data(dev, &mcp->chip, mcp); 570 - if (ret < 0) 571 - goto fail; 572 - 573 592 mcp->irq_controller = 574 593 device_property_read_bool(dev, "interrupt-controller"); 575 594 if (mcp->irq && mcp->irq_controller) { ··· 602 629 } 603 630 604 631 if (mcp->irq && mcp->irq_controller) { 605 - ret = mcp23s08_irqchip_setup(mcp); 606 - if (ret) 607 - goto fail; 632 + struct gpio_irq_chip *girq = &mcp->chip.irq; 633 + 634 + girq->chip = &mcp->irq_chip; 635 + /* This will let us handle the parent IRQ in the driver */ 636 + girq->parent_handler = NULL; 637 + girq->num_parents = 0; 638 + girq->parents = NULL; 639 + girq->default_type = IRQ_TYPE_NONE; 640 + girq->handler = handle_simple_irq; 641 + girq->threaded = true; 608 642 } 643 + 644 + ret = devm_gpiochip_add_data(dev, &mcp->chip, mcp); 645 + if (ret < 0) 646 + goto fail; 609 647 610 648 mcp->pinctrl_desc.pctlops = &mcp_pinctrl_ops; 611 649 mcp->pinctrl_desc.confops = &mcp_pinconf_ops;
+429 -1
drivers/pinctrl/pinctrl-ocelot.c
··· 25 25 #include "pinconf.h" 26 26 #include "pinmux.h" 27 27 28 + #define ocelot_clrsetbits(addr, clear, set) \ 29 + writel((readl(addr) & ~(clear)) | (set), (addr)) 30 + 31 + /* PINCONFIG bits (sparx5 only) */ 32 + enum { 33 + PINCONF_BIAS, 34 + PINCONF_SCHMITT, 35 + PINCONF_DRIVE_STRENGTH, 36 + }; 37 + 38 + #define BIAS_PD_BIT BIT(4) 39 + #define BIAS_PU_BIT BIT(3) 40 + #define BIAS_BITS (BIAS_PD_BIT|BIAS_PU_BIT) 41 + #define SCHMITT_BIT BIT(2) 42 + #define DRIVE_BITS GENMASK(1, 0) 43 + 44 + /* GPIO standard registers */ 28 45 #define OCELOT_GPIO_OUT_SET 0x0 29 46 #define OCELOT_GPIO_OUT_CLR 0x4 30 47 #define OCELOT_GPIO_OUT 0x8 ··· 59 42 enum { 60 43 FUNC_NONE, 61 44 FUNC_GPIO, 45 + FUNC_IRQ0, 62 46 FUNC_IRQ0_IN, 63 47 FUNC_IRQ0_OUT, 48 + FUNC_IRQ1, 64 49 FUNC_IRQ1_IN, 65 50 FUNC_IRQ1_OUT, 51 + FUNC_EXT_IRQ, 66 52 FUNC_MIIM, 53 + FUNC_PHY_LED, 67 54 FUNC_PCI_WAKE, 55 + FUNC_MD, 68 56 FUNC_PTP0, 69 57 FUNC_PTP1, 70 58 FUNC_PTP2, ··· 81 59 FUNC_SG1, 82 60 FUNC_SG2, 83 61 FUNC_SI, 62 + FUNC_SI2, 84 63 FUNC_TACHO, 85 64 FUNC_TWI, 86 65 FUNC_TWI2, 66 + FUNC_TWI3, 87 67 FUNC_TWI_SCL_M, 88 68 FUNC_UART, 89 69 FUNC_UART2, 70 + FUNC_UART3, 71 + FUNC_PLL_STAT, 72 + FUNC_EMMC, 73 + FUNC_REF_CLK, 74 + FUNC_RCVRD_CLK, 90 75 FUNC_MAX 91 76 }; 92 77 93 78 static const char *const ocelot_function_names[] = { 94 79 [FUNC_NONE] = "none", 95 80 [FUNC_GPIO] = "gpio", 81 + [FUNC_IRQ0] = "irq0", 96 82 [FUNC_IRQ0_IN] = "irq0_in", 97 83 [FUNC_IRQ0_OUT] = "irq0_out", 84 + [FUNC_IRQ1] = "irq1", 98 85 [FUNC_IRQ1_IN] = "irq1_in", 99 86 [FUNC_IRQ1_OUT] = "irq1_out", 87 + [FUNC_EXT_IRQ] = "ext_irq", 100 88 [FUNC_MIIM] = "miim", 89 + [FUNC_PHY_LED] = "phy_led", 101 90 [FUNC_PCI_WAKE] = "pci_wake", 91 + [FUNC_MD] = "md", 102 92 [FUNC_PTP0] = "ptp0", 103 93 [FUNC_PTP1] = "ptp1", 104 94 [FUNC_PTP2] = "ptp2", ··· 122 88 [FUNC_SG1] = "sg1", 123 89 [FUNC_SG2] = "sg2", 124 90 [FUNC_SI] = "si", 91 + [FUNC_SI2] = "si2", 125 92 [FUNC_TACHO] = "tacho", 126 93 [FUNC_TWI] = "twi", 127 94 [FUNC_TWI2] = "twi2", 95 + [FUNC_TWI3] = "twi3", 128 96 [FUNC_TWI_SCL_M] = "twi_scl_m", 129 97 [FUNC_UART] = "uart", 130 98 [FUNC_UART2] = "uart2", 99 + [FUNC_UART3] = "uart3", 100 + [FUNC_PLL_STAT] = "pll_stat", 101 + [FUNC_EMMC] = "emmc", 102 + [FUNC_REF_CLK] = "ref_clk", 103 + [FUNC_RCVRD_CLK] = "rcvrd_clk", 131 104 }; 132 105 133 106 struct ocelot_pmx_func { ··· 152 111 struct pinctrl_dev *pctl; 153 112 struct gpio_chip gpio_chip; 154 113 struct regmap *map; 114 + void __iomem *pincfg; 155 115 struct pinctrl_desc *desc; 156 116 struct ocelot_pmx_func func[FUNC_MAX]; 157 117 u8 stride; ··· 366 324 JAGUAR2_PIN(63), 367 325 }; 368 326 327 + #define SPARX5_P(p, f0, f1, f2) \ 328 + static struct ocelot_pin_caps sparx5_pin_##p = { \ 329 + .pin = p, \ 330 + .functions = { \ 331 + FUNC_GPIO, FUNC_##f0, FUNC_##f1, FUNC_##f2 \ 332 + }, \ 333 + } 334 + 335 + SPARX5_P(0, SG0, PLL_STAT, NONE); 336 + SPARX5_P(1, SG0, NONE, NONE); 337 + SPARX5_P(2, SG0, NONE, NONE); 338 + SPARX5_P(3, SG0, NONE, NONE); 339 + SPARX5_P(4, SG1, NONE, NONE); 340 + SPARX5_P(5, SG1, NONE, NONE); 341 + SPARX5_P(6, IRQ0_IN, IRQ0_OUT, SFP); 342 + SPARX5_P(7, IRQ1_IN, IRQ1_OUT, SFP); 343 + SPARX5_P(8, PTP0, NONE, SFP); 344 + SPARX5_P(9, PTP1, SFP, TWI_SCL_M); 345 + SPARX5_P(10, UART, NONE, NONE); 346 + SPARX5_P(11, UART, NONE, NONE); 347 + SPARX5_P(12, SG1, NONE, NONE); 348 + SPARX5_P(13, SG1, NONE, NONE); 349 + SPARX5_P(14, TWI, TWI_SCL_M, NONE); 350 + SPARX5_P(15, TWI, NONE, NONE); 351 + SPARX5_P(16, SI, TWI_SCL_M, SFP); 352 + SPARX5_P(17, SI, TWI_SCL_M, SFP); 353 + SPARX5_P(18, SI, TWI_SCL_M, SFP); 354 + SPARX5_P(19, PCI_WAKE, TWI_SCL_M, SFP); 355 + SPARX5_P(20, IRQ0_OUT, TWI_SCL_M, SFP); 356 + SPARX5_P(21, IRQ1_OUT, TACHO, SFP); 357 + SPARX5_P(22, TACHO, IRQ0_OUT, TWI_SCL_M); 358 + SPARX5_P(23, PWM, UART3, TWI_SCL_M); 359 + SPARX5_P(24, PTP2, UART3, TWI_SCL_M); 360 + SPARX5_P(25, PTP3, SI, TWI_SCL_M); 361 + SPARX5_P(26, UART2, SI, TWI_SCL_M); 362 + SPARX5_P(27, UART2, SI, TWI_SCL_M); 363 + SPARX5_P(28, TWI2, SI, SFP); 364 + SPARX5_P(29, TWI2, SI, SFP); 365 + SPARX5_P(30, SG2, SI, PWM); 366 + SPARX5_P(31, SG2, SI, TWI_SCL_M); 367 + SPARX5_P(32, SG2, SI, TWI_SCL_M); 368 + SPARX5_P(33, SG2, SI, SFP); 369 + SPARX5_P(34, NONE, TWI_SCL_M, EMMC); 370 + SPARX5_P(35, SFP, TWI_SCL_M, EMMC); 371 + SPARX5_P(36, SFP, TWI_SCL_M, EMMC); 372 + SPARX5_P(37, SFP, NONE, EMMC); 373 + SPARX5_P(38, NONE, TWI_SCL_M, EMMC); 374 + SPARX5_P(39, SI2, TWI_SCL_M, EMMC); 375 + SPARX5_P(40, SI2, TWI_SCL_M, EMMC); 376 + SPARX5_P(41, SI2, TWI_SCL_M, EMMC); 377 + SPARX5_P(42, SI2, TWI_SCL_M, EMMC); 378 + SPARX5_P(43, SI2, TWI_SCL_M, EMMC); 379 + SPARX5_P(44, SI, SFP, EMMC); 380 + SPARX5_P(45, SI, SFP, EMMC); 381 + SPARX5_P(46, NONE, SFP, EMMC); 382 + SPARX5_P(47, NONE, SFP, EMMC); 383 + SPARX5_P(48, TWI3, SI, SFP); 384 + SPARX5_P(49, TWI3, NONE, SFP); 385 + SPARX5_P(50, SFP, NONE, TWI_SCL_M); 386 + SPARX5_P(51, SFP, SI, TWI_SCL_M); 387 + SPARX5_P(52, SFP, MIIM, TWI_SCL_M); 388 + SPARX5_P(53, SFP, MIIM, TWI_SCL_M); 389 + SPARX5_P(54, SFP, PTP2, TWI_SCL_M); 390 + SPARX5_P(55, SFP, PTP3, PCI_WAKE); 391 + SPARX5_P(56, MIIM, SFP, TWI_SCL_M); 392 + SPARX5_P(57, MIIM, SFP, TWI_SCL_M); 393 + SPARX5_P(58, MIIM, SFP, TWI_SCL_M); 394 + SPARX5_P(59, MIIM, SFP, NONE); 395 + SPARX5_P(60, RECO_CLK, NONE, NONE); 396 + SPARX5_P(61, RECO_CLK, NONE, NONE); 397 + SPARX5_P(62, RECO_CLK, PLL_STAT, NONE); 398 + SPARX5_P(63, RECO_CLK, NONE, NONE); 399 + 400 + #define SPARX5_PIN(n) { \ 401 + .number = n, \ 402 + .name = "GPIO_"#n, \ 403 + .drv_data = &sparx5_pin_##n \ 404 + } 405 + 406 + static const struct pinctrl_pin_desc sparx5_pins[] = { 407 + SPARX5_PIN(0), 408 + SPARX5_PIN(1), 409 + SPARX5_PIN(2), 410 + SPARX5_PIN(3), 411 + SPARX5_PIN(4), 412 + SPARX5_PIN(5), 413 + SPARX5_PIN(6), 414 + SPARX5_PIN(7), 415 + SPARX5_PIN(8), 416 + SPARX5_PIN(9), 417 + SPARX5_PIN(10), 418 + SPARX5_PIN(11), 419 + SPARX5_PIN(12), 420 + SPARX5_PIN(13), 421 + SPARX5_PIN(14), 422 + SPARX5_PIN(15), 423 + SPARX5_PIN(16), 424 + SPARX5_PIN(17), 425 + SPARX5_PIN(18), 426 + SPARX5_PIN(19), 427 + SPARX5_PIN(20), 428 + SPARX5_PIN(21), 429 + SPARX5_PIN(22), 430 + SPARX5_PIN(23), 431 + SPARX5_PIN(24), 432 + SPARX5_PIN(25), 433 + SPARX5_PIN(26), 434 + SPARX5_PIN(27), 435 + SPARX5_PIN(28), 436 + SPARX5_PIN(29), 437 + SPARX5_PIN(30), 438 + SPARX5_PIN(31), 439 + SPARX5_PIN(32), 440 + SPARX5_PIN(33), 441 + SPARX5_PIN(34), 442 + SPARX5_PIN(35), 443 + SPARX5_PIN(36), 444 + SPARX5_PIN(37), 445 + SPARX5_PIN(38), 446 + SPARX5_PIN(39), 447 + SPARX5_PIN(40), 448 + SPARX5_PIN(41), 449 + SPARX5_PIN(42), 450 + SPARX5_PIN(43), 451 + SPARX5_PIN(44), 452 + SPARX5_PIN(45), 453 + SPARX5_PIN(46), 454 + SPARX5_PIN(47), 455 + SPARX5_PIN(48), 456 + SPARX5_PIN(49), 457 + SPARX5_PIN(50), 458 + SPARX5_PIN(51), 459 + SPARX5_PIN(52), 460 + SPARX5_PIN(53), 461 + SPARX5_PIN(54), 462 + SPARX5_PIN(55), 463 + SPARX5_PIN(56), 464 + SPARX5_PIN(57), 465 + SPARX5_PIN(58), 466 + SPARX5_PIN(59), 467 + SPARX5_PIN(60), 468 + SPARX5_PIN(61), 469 + SPARX5_PIN(62), 470 + SPARX5_PIN(63), 471 + }; 472 + 369 473 static int ocelot_get_functions_count(struct pinctrl_dev *pctldev) 370 474 { 371 475 return ARRAY_SIZE(ocelot_function_names); ··· 570 382 * ALT[1] 571 383 * This is racy because both registers can't be updated at the same time 572 384 * but it doesn't matter much for now. 385 + * Note: ALT0/ALT1 are organized specially for 64 gpio targets 573 386 */ 574 387 regmap_update_bits(info->map, REG_ALT(0, info, pin->pin), 575 388 BIT(p), f << p); ··· 647 458 return 0; 648 459 } 649 460 461 + static int ocelot_hw_get_value(struct ocelot_pinctrl *info, 462 + unsigned int pin, 463 + unsigned int reg, 464 + int *val) 465 + { 466 + int ret = -EOPNOTSUPP; 467 + 468 + if (info->pincfg) { 469 + u32 regcfg = readl(info->pincfg + (pin * sizeof(u32))); 470 + 471 + ret = 0; 472 + switch (reg) { 473 + case PINCONF_BIAS: 474 + *val = regcfg & BIAS_BITS; 475 + break; 476 + 477 + case PINCONF_SCHMITT: 478 + *val = regcfg & SCHMITT_BIT; 479 + break; 480 + 481 + case PINCONF_DRIVE_STRENGTH: 482 + *val = regcfg & DRIVE_BITS; 483 + break; 484 + 485 + default: 486 + ret = -EOPNOTSUPP; 487 + break; 488 + } 489 + } 490 + return ret; 491 + } 492 + 493 + static int ocelot_hw_set_value(struct ocelot_pinctrl *info, 494 + unsigned int pin, 495 + unsigned int reg, 496 + int val) 497 + { 498 + int ret = -EOPNOTSUPP; 499 + 500 + if (info->pincfg) { 501 + void __iomem *regaddr = info->pincfg + (pin * sizeof(u32)); 502 + 503 + ret = 0; 504 + switch (reg) { 505 + case PINCONF_BIAS: 506 + ocelot_clrsetbits(regaddr, BIAS_BITS, val); 507 + break; 508 + 509 + case PINCONF_SCHMITT: 510 + ocelot_clrsetbits(regaddr, SCHMITT_BIT, val); 511 + break; 512 + 513 + case PINCONF_DRIVE_STRENGTH: 514 + if (val <= 3) 515 + ocelot_clrsetbits(regaddr, DRIVE_BITS, val); 516 + else 517 + ret = -EINVAL; 518 + break; 519 + 520 + default: 521 + ret = -EOPNOTSUPP; 522 + break; 523 + } 524 + } 525 + return ret; 526 + } 527 + 528 + static int ocelot_pinconf_get(struct pinctrl_dev *pctldev, 529 + unsigned int pin, unsigned long *config) 530 + { 531 + struct ocelot_pinctrl *info = pinctrl_dev_get_drvdata(pctldev); 532 + u32 param = pinconf_to_config_param(*config); 533 + int val, err; 534 + 535 + switch (param) { 536 + case PIN_CONFIG_BIAS_DISABLE: 537 + case PIN_CONFIG_BIAS_PULL_UP: 538 + case PIN_CONFIG_BIAS_PULL_DOWN: 539 + err = ocelot_hw_get_value(info, pin, PINCONF_BIAS, &val); 540 + if (err) 541 + return err; 542 + if (param == PIN_CONFIG_BIAS_DISABLE) 543 + val = (val == 0 ? true : false); 544 + else if (param == PIN_CONFIG_BIAS_PULL_DOWN) 545 + val = (val & BIAS_PD_BIT ? true : false); 546 + else /* PIN_CONFIG_BIAS_PULL_UP */ 547 + val = (val & BIAS_PU_BIT ? true : false); 548 + break; 549 + 550 + case PIN_CONFIG_INPUT_SCHMITT_ENABLE: 551 + err = ocelot_hw_get_value(info, pin, PINCONF_SCHMITT, &val); 552 + if (err) 553 + return err; 554 + 555 + val = (val & SCHMITT_BIT ? true : false); 556 + break; 557 + 558 + case PIN_CONFIG_DRIVE_STRENGTH: 559 + err = ocelot_hw_get_value(info, pin, PINCONF_DRIVE_STRENGTH, 560 + &val); 561 + if (err) 562 + return err; 563 + break; 564 + 565 + case PIN_CONFIG_OUTPUT: 566 + err = regmap_read(info->map, REG(OCELOT_GPIO_OUT, info, pin), 567 + &val); 568 + if (err) 569 + return err; 570 + val = !!(val & BIT(pin % 32)); 571 + break; 572 + 573 + case PIN_CONFIG_INPUT_ENABLE: 574 + case PIN_CONFIG_OUTPUT_ENABLE: 575 + err = regmap_read(info->map, REG(OCELOT_GPIO_OE, info, pin), 576 + &val); 577 + if (err) 578 + return err; 579 + val = val & BIT(pin % 32); 580 + if (param == PIN_CONFIG_OUTPUT_ENABLE) 581 + val = !!val; 582 + else 583 + val = !val; 584 + break; 585 + 586 + default: 587 + return -EOPNOTSUPP; 588 + } 589 + 590 + *config = pinconf_to_config_packed(param, val); 591 + 592 + return 0; 593 + } 594 + 595 + static int ocelot_pinconf_set(struct pinctrl_dev *pctldev, unsigned int pin, 596 + unsigned long *configs, unsigned int num_configs) 597 + { 598 + struct ocelot_pinctrl *info = pinctrl_dev_get_drvdata(pctldev); 599 + u32 param, arg, p; 600 + int cfg, err = 0; 601 + 602 + for (cfg = 0; cfg < num_configs; cfg++) { 603 + param = pinconf_to_config_param(configs[cfg]); 604 + arg = pinconf_to_config_argument(configs[cfg]); 605 + 606 + switch (param) { 607 + case PIN_CONFIG_BIAS_DISABLE: 608 + case PIN_CONFIG_BIAS_PULL_UP: 609 + case PIN_CONFIG_BIAS_PULL_DOWN: 610 + arg = (param == PIN_CONFIG_BIAS_DISABLE) ? 0 : 611 + (param == PIN_CONFIG_BIAS_PULL_UP) ? BIAS_PU_BIT : 612 + BIAS_PD_BIT; 613 + 614 + err = ocelot_hw_set_value(info, pin, PINCONF_BIAS, arg); 615 + if (err) 616 + goto err; 617 + 618 + break; 619 + 620 + case PIN_CONFIG_INPUT_SCHMITT_ENABLE: 621 + arg = arg ? SCHMITT_BIT : 0; 622 + err = ocelot_hw_set_value(info, pin, PINCONF_SCHMITT, 623 + arg); 624 + if (err) 625 + goto err; 626 + 627 + break; 628 + 629 + case PIN_CONFIG_DRIVE_STRENGTH: 630 + err = ocelot_hw_set_value(info, pin, 631 + PINCONF_DRIVE_STRENGTH, 632 + arg); 633 + if (err) 634 + goto err; 635 + 636 + break; 637 + 638 + case PIN_CONFIG_OUTPUT_ENABLE: 639 + case PIN_CONFIG_INPUT_ENABLE: 640 + case PIN_CONFIG_OUTPUT: 641 + p = pin % 32; 642 + if (arg) 643 + regmap_write(info->map, 644 + REG(OCELOT_GPIO_OUT_SET, info, 645 + pin), 646 + BIT(p)); 647 + else 648 + regmap_write(info->map, 649 + REG(OCELOT_GPIO_OUT_CLR, info, 650 + pin), 651 + BIT(p)); 652 + regmap_update_bits(info->map, 653 + REG(OCELOT_GPIO_OE, info, pin), 654 + BIT(p), 655 + param == PIN_CONFIG_INPUT_ENABLE ? 656 + 0 : BIT(p)); 657 + break; 658 + 659 + default: 660 + err = -EOPNOTSUPP; 661 + } 662 + } 663 + err: 664 + return err; 665 + } 666 + 667 + static const struct pinconf_ops ocelot_confops = { 668 + .is_generic = true, 669 + .pin_config_get = ocelot_pinconf_get, 670 + .pin_config_set = ocelot_pinconf_set, 671 + .pin_config_config_dbg_show = pinconf_generic_dump_config, 672 + }; 673 + 650 674 static const struct pinctrl_ops ocelot_pctl_ops = { 651 675 .get_groups_count = ocelot_pctl_get_groups_count, 652 676 .get_group_name = ocelot_pctl_get_group_name, ··· 883 481 .npins = ARRAY_SIZE(jaguar2_pins), 884 482 .pctlops = &ocelot_pctl_ops, 885 483 .pmxops = &ocelot_pmx_ops, 484 + .owner = THIS_MODULE, 485 + }; 486 + 487 + static struct pinctrl_desc sparx5_desc = { 488 + .name = "sparx5-pinctrl", 489 + .pins = sparx5_pins, 490 + .npins = ARRAY_SIZE(sparx5_pins), 491 + .pctlops = &ocelot_pctl_ops, 492 + .pmxops = &ocelot_pmx_ops, 493 + .confops = &ocelot_confops, 886 494 .owner = THIS_MODULE, 887 495 }; 888 496 ··· 923 511 } 924 512 925 513 for (i = 0; i < npins; i++) 926 - info->func[f].groups[i] = info->desc->pins[pins[i]].name; 514 + info->func[f].groups[i] = 515 + info->desc->pins[pins[i]].name; 927 516 } 928 517 929 518 kfree(pins); ··· 1157 744 static const struct of_device_id ocelot_pinctrl_of_match[] = { 1158 745 { .compatible = "mscc,ocelot-pinctrl", .data = &ocelot_desc }, 1159 746 { .compatible = "mscc,jaguar2-pinctrl", .data = &jaguar2_desc }, 747 + { .compatible = "microchip,sparx5-pinctrl", .data = &sparx5_desc }, 1160 748 {}, 1161 749 }; 1162 750 ··· 1166 752 struct device *dev = &pdev->dev; 1167 753 struct ocelot_pinctrl *info; 1168 754 void __iomem *base; 755 + struct resource *res; 1169 756 int ret; 1170 757 struct regmap_config regmap_config = { 1171 758 .reg_bits = 32, ··· 1188 773 } 1189 774 1190 775 info->stride = 1 + (info->desc->npins - 1) / 32; 776 + 1191 777 regmap_config.max_register = OCELOT_GPIO_SD_MAP * info->stride + 15 * 4; 1192 778 1193 779 info->map = devm_regmap_init_mmio(dev, base, &regmap_config); ··· 1199 783 dev_set_drvdata(dev, info->map); 1200 784 info->dev = dev; 1201 785 786 + /* Pinconf registers */ 787 + if (info->desc->confops) { 788 + res = platform_get_resource(pdev, IORESOURCE_MEM, 1); 789 + base = devm_ioremap_resource(dev, res); 790 + if (IS_ERR(base)) 791 + dev_dbg(dev, "Failed to ioremap config registers (no extended pinconf)\n"); 792 + else 793 + info->pincfg = base; 794 + } 795 + 1202 796 ret = ocelot_pinctrl_register(pdev, info); 1203 797 if (ret) 1204 798 return ret; ··· 1216 790 ret = ocelot_gpiochip_register(pdev, info); 1217 791 if (ret) 1218 792 return ret; 793 + 794 + dev_info(dev, "driver registered\n"); 1219 795 1220 796 return 0; 1221 797 }
+13 -11
drivers/pinctrl/pinctrl-rockchip.c
··· 9 9 * Copyright (c) 2012 Samsung Electronics Co., Ltd. 10 10 * http://www.samsung.com 11 11 * Copyright (c) 2012 Linaro Ltd 12 - * http://www.linaro.org 12 + * https://www.linaro.org 13 13 * 14 14 * and pinctrl-at91: 15 15 * Copyright (C) 2011-2012 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> ··· 63 63 RK3399, 64 64 }; 65 65 66 - /** 66 + /* 67 67 * Encode variants of iomux registers into a type variable 68 68 */ 69 69 #define IOMUX_GPIO_ONLY BIT(0) ··· 74 74 #define IOMUX_WIDTH_2BIT BIT(5) 75 75 76 76 /** 77 + * struct rockchip_iomux 77 78 * @type: iomux variant using IOMUX_* constants 78 79 * @offset: if initialized to -1 it will be autocalculated, by specifying 79 80 * an initial offset value the relevant source offset can be reset ··· 85 84 int offset; 86 85 }; 87 86 88 - /** 87 + /* 89 88 * enum type index corresponding to rockchip_perpin_drv_list arrays index. 90 89 */ 91 90 enum rockchip_pin_drv_type { ··· 97 96 DRV_TYPE_MAX 98 97 }; 99 98 100 - /** 99 + /* 101 100 * enum type index corresponding to rockchip_pull_list arrays index. 102 101 */ 103 102 enum rockchip_pin_pull_type { ··· 107 106 }; 108 107 109 108 /** 109 + * struct rockchip_drv 110 110 * @drv_type: drive strength variant using rockchip_perpin_drv_type 111 111 * @offset: if initialized to -1 it will be autocalculated, by specifying 112 112 * an initial offset value the relevant source offset can be reset ··· 121 119 }; 122 120 123 121 /** 122 + * struct rockchip_pin_bank 124 123 * @reg_base: register base of the gpio bank 125 - * @reg_pull: optional separate register for additional pull settings 124 + * @regmap_pull: optional separate register for additional pull settings 126 125 * @clk: clock of the gpio bank 127 126 * @irq: interrupt of the gpio bank 128 127 * @saved_masks: Saved content of GPIO_INTEN at suspend time. ··· 141 138 * @gpio_chip: gpiolib chip 142 139 * @grange: gpio range 143 140 * @slock: spinlock for the gpio bank 141 + * @toggle_edge_mode: bit mask to toggle (falling/rising) edge mode 142 + * @recalced_mask: bit mask to indicate a need to recalulate the mask 144 143 * @route_mask: bits describing the routing pins of per bank 145 144 */ 146 145 struct rockchip_pin_bank { ··· 317 312 * @bank_num: bank number. 318 313 * @pin: index at register or used to calc index. 319 314 * @func: the min pin. 315 + * @route_location: the mux route location (same, pmu, grf). 320 316 * @route_offset: the max pin. 321 317 * @route_val: the register offset. 322 318 */ ··· 330 324 u32 route_val; 331 325 }; 332 326 333 - /** 334 - */ 335 327 struct rockchip_pin_ctrl { 336 328 struct rockchip_pin_bank *pin_banks; 337 329 u32 nr_banks; ··· 367 363 * @name: name of the pin group, used to lookup the group. 368 364 * @pins: the pins included in this group. 369 365 * @npins: number of pins included in this group. 370 - * @func: the mux function number to be programmed when selected. 371 - * @configs: the config values to be set for each pin 372 - * @nconfigs: number of configs for each pin 366 + * @data: local pin configuration 373 367 */ 374 368 struct rockchip_pin_group { 375 369 const char *name; ··· 380 378 * struct rockchip_pmx_func: represent a pin function. 381 379 * @name: name of the pin function, used to lookup the function. 382 380 * @groups: one or more names of pin groups that provide this function. 383 - * @num_groups: number of groups included in @groups. 381 + * @ngroups: number of groups included in @groups. 384 382 */ 385 383 struct rockchip_pmx_func { 386 384 const char *name;
+12 -12
drivers/pinctrl/pinctrl-rza1.c
··· 75 75 * RZ/A1 pinmux flags 76 76 */ 77 77 78 - /** 78 + /* 79 79 * rza1_bidir_pin - describe a single pin that needs bidir flag applied. 80 80 */ 81 81 struct rza1_bidir_pin { ··· 83 83 u8 func: 4; 84 84 }; 85 85 86 - /** 86 + /* 87 87 * rza1_bidir_entry - describe a list of pins that needs bidir flag applied. 88 88 * Each struct rza1_bidir_entry describes a port. 89 89 */ ··· 92 92 const struct rza1_bidir_pin *pins; 93 93 }; 94 94 95 - /** 95 + /* 96 96 * rza1_swio_pin - describe a single pin that needs swio flag applied. 97 97 */ 98 98 struct rza1_swio_pin { ··· 102 102 u16 input: 1; 103 103 }; 104 104 105 - /** 105 + /* 106 106 * rza1_swio_entry - describe a list of pins that needs swio flag applied 107 107 */ 108 108 struct rza1_swio_entry { ··· 110 110 const struct rza1_swio_pin *pins; 111 111 }; 112 112 113 - /** 113 + /* 114 114 * rza1_pinmux_conf - group together bidir and swio pinmux flag tables 115 115 */ 116 116 struct rza1_pinmux_conf { ··· 431 431 * RZ/A1 types 432 432 */ 433 433 /** 434 - * rza1_mux_conf - describes a pin multiplexing operation 434 + * struct rza1_mux_conf - describes a pin multiplexing operation 435 435 * 436 436 * @id: the pin identifier from 0 to RZA1_NPINS 437 437 * @port: the port where pin sits on ··· 450 450 }; 451 451 452 452 /** 453 - * rza1_port - describes a pin port 453 + * struct rza1_port - describes a pin port 454 454 * 455 455 * This is mostly useful to lock register writes per-bank and not globally. 456 456 * ··· 467 467 }; 468 468 469 469 /** 470 - * rza1_pinctrl - RZ pincontroller device 470 + * struct rza1_pinctrl - RZ pincontroller device 471 471 * 472 472 * @dev: parent device structure 473 473 * @mutex: protect [pinctrl|pinmux]_generic functions 474 474 * @base: logical address base 475 - * @nports: number of pin controller ports 475 + * @nport: number of pin controller ports 476 476 * @ports: pin controller banks 477 477 * @pins: pin array for pinctrl core 478 478 * @desc: pincontroller desc for pinctrl core ··· 536 536 return -ENOENT; 537 537 } 538 538 539 - /** 539 + /* 540 540 * rza1_pinmux_get_flags() - return pinmux flags associated to a pin 541 541 */ 542 542 static unsigned int rza1_pinmux_get_flags(unsigned int port, unsigned int pin, ··· 566 566 * RZ/A1 SoC operations 567 567 */ 568 568 569 - /** 569 + /* 570 570 * rza1_set_bit() - un-locked set/clear a single bit in pin configuration 571 571 * registers 572 572 */ ··· 664 664 /** 665 665 * rza1_pin_mux_single() - configure pin multiplexing on a single pin 666 666 * 667 - * @pinctrl: RZ/A1 pin controller device 667 + * @rza1_pctl: RZ/A1 pin controller device 668 668 * @mux_conf: pin multiplexing descriptor 669 669 */ 670 670 static int rza1_pin_mux_single(struct rza1_pinctrl *rza1_pctl,
+27 -10
drivers/pinctrl/pinctrl-single.c
··· 42 42 * struct pcs_func_vals - mux function register offset and value pair 43 43 * @reg: register virtual address 44 44 * @val: register value 45 + * @mask: mask 45 46 */ 46 47 struct pcs_func_vals { 47 48 void __iomem *reg; ··· 84 83 * @nvals: number of entries in vals array 85 84 * @pgnames: array of pingroup names the function uses 86 85 * @npgnames: number of pingroup names the function uses 86 + * @conf: array of pin configurations 87 + * @nconfs: number of pin configurations available 87 88 * @node: list node 88 89 */ 89 90 struct pcs_function { ··· 563 560 case PIN_CONFIG_BIAS_PULL_UP: 564 561 if (arg) 565 562 pcs_pinconf_clear_bias(pctldev, pin); 566 - /* fall through */ 563 + fallthrough; 567 564 case PIN_CONFIG_INPUT_SCHMITT_ENABLE: 568 565 data &= ~func->conf[i].mask; 569 566 if (arg) ··· 656 653 * pcs_add_pin() - add a pin to the static per controller pin array 657 654 * @pcs: pcs driver instance 658 655 * @offset: register offset from base 656 + * @pin_pos: unused 659 657 */ 660 658 static int pcs_add_pin(struct pcs_device *pcs, unsigned offset, 661 659 unsigned pin_pos) ··· 920 916 921 917 /* If pinconf isn't supported, don't parse properties in below. */ 922 918 if (!PCS_HAS_PINCONF) 923 - return 0; 919 + return -ENOTSUPP; 924 920 925 921 /* cacluate how much properties are supported in current node */ 926 922 for (i = 0; i < ARRAY_SIZE(prop2); i++) { ··· 932 928 nconfs++; 933 929 } 934 930 if (!nconfs) 935 - return 0; 931 + return -ENOTSUPP; 936 932 937 933 func->conf = devm_kcalloc(pcs->dev, 938 934 nconfs, sizeof(struct pcs_conf_vals), ··· 963 959 964 960 /** 965 961 * pcs_parse_one_pinctrl_entry() - parses a device tree mux entry 966 - * @pctldev: pin controller device 967 962 * @pcs: pinctrl driver instance 968 963 * @np: device node of the mux entry 969 964 * @map: map entry ··· 1020 1017 break; 1021 1018 } 1022 1019 1023 - /* Index plus one value cell */ 1024 1020 offset = pinctrl_spec.args[0]; 1025 1021 vals[found].reg = pcs->base + offset; 1026 - vals[found].val = pinctrl_spec.args[1]; 1022 + 1023 + switch (pinctrl_spec.args_count) { 1024 + case 2: 1025 + vals[found].val = pinctrl_spec.args[1]; 1026 + break; 1027 + case 3: 1028 + vals[found].val = (pinctrl_spec.args[1] | pinctrl_spec.args[2]); 1029 + break; 1030 + } 1027 1031 1028 1032 dev_dbg(pcs->dev, "%pOFn index: 0x%x value: 0x%x\n", 1029 1033 pinctrl_spec.np, offset, pinctrl_spec.args[1]); ··· 1066 1056 1067 1057 if (PCS_HAS_PINCONF && function) { 1068 1058 res = pcs_parse_pinconf(pcs, np, function, map); 1069 - if (res) 1059 + if (res == 0) 1060 + *num_maps = 2; 1061 + else if (res == -ENOTSUPP) 1062 + *num_maps = 1; 1063 + else 1070 1064 goto free_pingroups; 1071 - *num_maps = 2; 1072 1065 } else { 1073 1066 *num_maps = 1; 1074 1067 } ··· 1356 1343 } 1357 1344 return ret; 1358 1345 } 1346 + 1359 1347 /** 1348 + * struct pcs_interrupt 1360 1349 * @reg: virtual address of interrupt register 1361 1350 * @hwirq: hardware irq number 1362 1351 * @irq: virtual irq number ··· 1373 1358 1374 1359 /** 1375 1360 * pcs_irq_set() - enables or disables an interrupt 1361 + * @pcs_soc: SoC specific settings 1362 + * @irq: interrupt 1363 + * @enable: enable or disable the interrupt 1376 1364 * 1377 1365 * Note that this currently assumes one interrupt per pinctrl 1378 1366 * register that is typically used for wake-up events. ··· 1456 1438 1457 1439 /** 1458 1440 * pcs_irq_handle() - common interrupt handler 1459 - * @pcs_irq: interrupt data 1441 + * @pcs_soc: SoC specific settings 1460 1442 * 1461 1443 * Note that this currently assumes we have one interrupt bit per 1462 1444 * mux register. This interrupt is typically used for wake-up events. ··· 1504 1486 1505 1487 /** 1506 1488 * pcs_irq_handle() - handler for the dedicated chained interrupt case 1507 - * @irq: interrupt 1508 1489 * @desc: interrupt descriptor 1509 1490 * 1510 1491 * Use this if you have a separate interrupt for each
+20 -18
drivers/pinctrl/pinctrl-stmfx.c
··· 616 616 struct stmfx *stmfx = dev_get_drvdata(pdev->dev.parent); 617 617 struct device_node *np = pdev->dev.of_node; 618 618 struct stmfx_pinctrl *pctl; 619 + struct gpio_irq_chip *girq; 619 620 int irq, ret; 620 621 621 622 pctl = devm_kzalloc(stmfx->dev, sizeof(*pctl), GFP_KERNEL); ··· 675 674 pctl->gpio_chip.can_sleep = true; 676 675 pctl->gpio_chip.of_node = np; 677 676 677 + pctl->irq_chip.name = dev_name(pctl->dev); 678 + pctl->irq_chip.irq_mask = stmfx_pinctrl_irq_mask; 679 + pctl->irq_chip.irq_unmask = stmfx_pinctrl_irq_unmask; 680 + pctl->irq_chip.irq_set_type = stmfx_pinctrl_irq_set_type; 681 + pctl->irq_chip.irq_bus_lock = stmfx_pinctrl_irq_bus_lock; 682 + pctl->irq_chip.irq_bus_sync_unlock = stmfx_pinctrl_irq_bus_sync_unlock; 683 + pctl->irq_chip.irq_request_resources = stmfx_gpio_irq_request_resources; 684 + pctl->irq_chip.irq_release_resources = stmfx_gpio_irq_release_resources; 685 + 686 + girq = &pctl->gpio_chip.irq; 687 + girq->chip = &pctl->irq_chip; 688 + /* This will let us handle the parent IRQ in the driver */ 689 + girq->parent_handler = NULL; 690 + girq->num_parents = 0; 691 + girq->parents = NULL; 692 + girq->default_type = IRQ_TYPE_NONE; 693 + girq->handler = handle_bad_irq; 694 + girq->threaded = true; 695 + 678 696 ret = devm_gpiochip_add_data(pctl->dev, &pctl->gpio_chip, pctl); 679 697 if (ret) { 680 698 dev_err(pctl->dev, "gpio_chip registration failed\n"); ··· 704 684 if (ret) 705 685 return ret; 706 686 707 - pctl->irq_chip.name = dev_name(pctl->dev); 708 - pctl->irq_chip.irq_mask = stmfx_pinctrl_irq_mask; 709 - pctl->irq_chip.irq_unmask = stmfx_pinctrl_irq_unmask; 710 - pctl->irq_chip.irq_set_type = stmfx_pinctrl_irq_set_type; 711 - pctl->irq_chip.irq_bus_lock = stmfx_pinctrl_irq_bus_lock; 712 - pctl->irq_chip.irq_bus_sync_unlock = stmfx_pinctrl_irq_bus_sync_unlock; 713 - pctl->irq_chip.irq_request_resources = stmfx_gpio_irq_request_resources; 714 - pctl->irq_chip.irq_release_resources = stmfx_gpio_irq_release_resources; 715 - 716 - ret = gpiochip_irqchip_add_nested(&pctl->gpio_chip, &pctl->irq_chip, 717 - 0, handle_bad_irq, IRQ_TYPE_NONE); 718 - if (ret) { 719 - dev_err(pctl->dev, "cannot add irqchip to gpiochip\n"); 720 - return ret; 721 - } 722 - 723 687 ret = devm_request_threaded_irq(pctl->dev, irq, NULL, 724 688 stmfx_pinctrl_irq_thread_fn, 725 689 IRQF_ONESHOT, ··· 712 708 dev_err(pctl->dev, "cannot request irq%d\n", irq); 713 709 return ret; 714 710 } 715 - 716 - gpiochip_set_nested_irqchip(&pctl->gpio_chip, &pctl->irq_chip, irq); 717 711 718 712 dev_info(pctl->dev, 719 713 "%ld GPIOs available\n", hweight_long(pctl->gpio_valid_mask));
+22 -22
drivers/pinctrl/pinctrl-sx150x.c
··· 1187 1187 if (pctl->data->model != SX150X_789) 1188 1188 pctl->gpio.set_multiple = sx150x_gpio_set_multiple; 1189 1189 1190 - ret = devm_gpiochip_add_data(dev, &pctl->gpio, pctl); 1191 - if (ret) 1192 - return ret; 1193 - 1194 - ret = gpiochip_add_pin_range(&pctl->gpio, dev_name(dev), 1195 - 0, 0, pctl->data->npins); 1196 - if (ret) 1197 - return ret; 1198 - 1199 1190 /* Add Interrupt support if an irq is specified */ 1200 1191 if (client->irq > 0) { 1192 + struct gpio_irq_chip *girq; 1193 + 1201 1194 pctl->irq_chip.irq_mask = sx150x_irq_mask; 1202 1195 pctl->irq_chip.irq_unmask = sx150x_irq_unmask; 1203 1196 pctl->irq_chip.irq_set_type = sx150x_irq_set_type; ··· 1206 1213 1207 1214 /* 1208 1215 * Because sx150x_irq_threaded_fn invokes all of the 1209 - * nested interrrupt handlers via handle_nested_irq, 1210 - * any "handler" passed to gpiochip_irqchip_add() 1216 + * nested interrupt handlers via handle_nested_irq, 1217 + * any "handler" assigned to struct gpio_irq_chip 1211 1218 * below is going to be ignored, so the choice of the 1212 1219 * function does not matter that much. 1213 1220 * ··· 1215 1222 * plus it will be instantly noticeable if it is ever 1216 1223 * called (should not happen) 1217 1224 */ 1218 - ret = gpiochip_irqchip_add_nested(&pctl->gpio, 1219 - &pctl->irq_chip, 0, 1220 - handle_bad_irq, IRQ_TYPE_NONE); 1221 - if (ret) { 1222 - dev_err(dev, "could not connect irqchip to gpiochip\n"); 1223 - return ret; 1224 - } 1225 + girq = &pctl->gpio.irq; 1226 + girq->chip = &pctl->irq_chip; 1227 + /* This will let us handle the parent IRQ in the driver */ 1228 + girq->parent_handler = NULL; 1229 + girq->num_parents = 0; 1230 + girq->parents = NULL; 1231 + girq->default_type = IRQ_TYPE_NONE; 1232 + girq->handler = handle_bad_irq; 1233 + girq->threaded = true; 1225 1234 1226 1235 ret = devm_request_threaded_irq(dev, client->irq, NULL, 1227 1236 sx150x_irq_thread_fn, ··· 1232 1237 pctl->irq_chip.name, pctl); 1233 1238 if (ret < 0) 1234 1239 return ret; 1235 - 1236 - gpiochip_set_nested_irqchip(&pctl->gpio, 1237 - &pctl->irq_chip, 1238 - client->irq); 1239 1240 } 1241 + 1242 + ret = devm_gpiochip_add_data(dev, &pctl->gpio, pctl); 1243 + if (ret) 1244 + return ret; 1245 + 1246 + ret = gpiochip_add_pin_range(&pctl->gpio, dev_name(dev), 1247 + 0, 0, pctl->data->npins); 1248 + if (ret) 1249 + return ret; 1240 1250 1241 1251 return 0; 1242 1252 }
+4 -1
drivers/pinctrl/pinmux.c
··· 74 74 * pinmux_can_be_used_for_gpio() - check if a specific pin 75 75 * is either muxed to a different function or used as gpio. 76 76 * 77 + * @pctldev: the associated pin controller device 77 78 * @pin: the pin number in the global pin space 78 79 * 79 80 * Controllers not defined as strict will always return true, ··· 97 96 98 97 /** 99 98 * pin_request() - request a single pin to be muxed in, typically for GPIO 99 + * @pctldev: the associated pin controller device 100 100 * @pin: the pin number in the global pin space 101 101 * @owner: a representation of the owner of this pin; typically the device 102 102 * name that controls its mux function, or the requested GPIO name ··· 256 254 * @pctldev: pin controller device affected 257 255 * @pin: the pin to mux in for GPIO 258 256 * @range: the applicable GPIO range 257 + * @gpio: number of requested GPIO 259 258 */ 260 259 int pinmux_request_gpio(struct pinctrl_dev *pctldev, 261 260 struct pinctrl_gpio_range *range, ··· 747 744 /** 748 745 * pinmux_generic_get_function() - returns a function based on the number 749 746 * @pctldev: pin controller device 750 - * @group_selector: function number 747 + * @selector: function number 751 748 */ 752 749 struct function_desc *pinmux_generic_get_function(struct pinctrl_dev *pctldev, 753 750 unsigned int selector)
+1
drivers/pinctrl/qcom/pinctrl-ipq4019.c
··· 254 254 .mux_bit = 2, \ 255 255 .pull_bit = 0, \ 256 256 .drv_bit = 6, \ 257 + .od_bit = 12, \ 257 258 .oe_bit = 9, \ 258 259 .in_bit = 0, \ 259 260 .out_bit = 1, \
+1
drivers/pinctrl/qcom/pinctrl-ipq8074.c
··· 50 50 .intr_enable_bit = 0, \ 51 51 .intr_status_bit = 0, \ 52 52 .intr_target_bit = 5, \ 53 + .intr_target_kpss_val = 3, \ 53 54 .intr_raw_status_bit = 4, \ 54 55 .intr_polarity_bit = 1, \ 55 56 .intr_detection_bit = 2, \
+18 -1
drivers/pinctrl/qcom/pinctrl-msm.c
··· 40 40 * @dev: device handle. 41 41 * @pctrl: pinctrl handle. 42 42 * @chip: gpiochip handle. 43 + * @desc: pin controller descriptor 43 44 * @restart_nb: restart notifier block. 45 + * @irq_chip: irq chip information 44 46 * @irq: parent irq for the TLMM irq_chip. 47 + * @intr_target_use_scm: route irq to application cpu using scm calls 45 48 * @lock: Spinlock to protect register resources as well 46 49 * as msm_pinctrl data structures. 47 50 * @enabled_irqs: Bitmap of currently enabled irqs. 48 51 * @dual_edge_irqs: Bitmap of irqs that need sw emulated dual edge 49 52 * detection. 50 53 * @skip_wake_irqs: Skip IRQs that are handled by wakeup interrupt controller 51 - * @soc; Reference to soc_data of platform specific data. 54 + * @soc: Reference to soc_data of platform specific data. 52 55 * @regs: Base addresses for the TLMM tiles. 56 + * @phys_base: Physical base address 53 57 */ 54 58 struct msm_pinctrl { 55 59 struct device *dev; ··· 237 233 *bit = g->pull_bit; 238 234 *mask = 3; 239 235 break; 236 + case PIN_CONFIG_DRIVE_OPEN_DRAIN: 237 + *bit = g->od_bit; 238 + *mask = 1; 239 + break; 240 240 case PIN_CONFIG_DRIVE_STRENGTH: 241 241 *bit = g->drv_bit; 242 242 *mask = 7; ··· 318 310 if (!arg) 319 311 return -EINVAL; 320 312 break; 313 + case PIN_CONFIG_DRIVE_OPEN_DRAIN: 314 + /* Pin is not open-drain */ 315 + if (!arg) 316 + return -EINVAL; 317 + arg = 1; 318 + break; 321 319 case PIN_CONFIG_DRIVE_STRENGTH: 322 320 arg = msm_regval_to_drive(arg); 323 321 break; ··· 395 381 arg = MSM_PULL_UP_NO_KEEPER; 396 382 else 397 383 arg = MSM_PULL_UP; 384 + break; 385 + case PIN_CONFIG_DRIVE_OPEN_DRAIN: 386 + arg = 1; 398 387 break; 399 388 case PIN_CONFIG_DRIVE_STRENGTH: 400 389 /* Check for invalid values */
+2
drivers/pinctrl/qcom/pinctrl-msm.h
··· 38 38 * @mux_bit: Offset in @ctl_reg for the pinmux function selection. 39 39 * @pull_bit: Offset in @ctl_reg for the bias configuration. 40 40 * @drv_bit: Offset in @ctl_reg for the drive strength configuration. 41 + * @od_bit: Offset in @ctl_reg for controlling open drain. 41 42 * @oe_bit: Offset in @ctl_reg for controlling output enable. 42 43 * @in_bit: Offset in @io_reg for the input bit value. 43 44 * @out_bit: Offset in @io_reg for the output bit value. ··· 76 75 unsigned pull_bit:5; 77 76 unsigned drv_bit:5; 78 77 78 + unsigned od_bit:5; 79 79 unsigned oe_bit:5; 80 80 unsigned in_bit:5; 81 81 unsigned out_bit:5;
-3
drivers/pinctrl/qcom/pinctrl-msm8976.c
··· 799 799 static const char * const modem_tsync_groups[] = { 800 800 "gpio93", 801 801 }; 802 - static const char * const nav_tsync_groups[] = { 803 - "gpio93", 804 - }; 805 802 static const char * const ssbi_wtr1_groups[] = { 806 803 "gpio79", "gpio94", 807 804 };
+6 -2
drivers/pinctrl/qcom/pinctrl-spmi-gpio.c
··· 794 794 switch (subtype) { 795 795 case PMIC_GPIO_SUBTYPE_GPIO_4CH: 796 796 pad->have_buffer = true; 797 - /* Fall through */ 797 + fallthrough; 798 798 case PMIC_GPIO_SUBTYPE_GPIOC_4CH: 799 799 pad->num_sources = 4; 800 800 break; 801 801 case PMIC_GPIO_SUBTYPE_GPIO_8CH: 802 802 pad->have_buffer = true; 803 - /* Fall through */ 803 + fallthrough; 804 804 case PMIC_GPIO_SUBTYPE_GPIOC_8CH: 805 805 pad->num_sources = 8; 806 806 break; ··· 1117 1117 { .compatible = "qcom,pma8084-gpio", .data = (void *) 22 }, 1118 1118 /* pms405 has 12 GPIOs with holes on 1, 9, and 10 */ 1119 1119 { .compatible = "qcom,pms405-gpio", .data = (void *) 12 }, 1120 + /* pm660 has 13 GPIOs with holes on 1, 5, 6, 7, 8 and 10 */ 1121 + { .compatible = "qcom,pm660-gpio", .data = (void *) 13 }, 1122 + /* pm660l has 12 GPIOs with holes on 1, 2, 10, 11 and 12 */ 1123 + { .compatible = "qcom,pm660l-gpio", .data = (void *) 12 }, 1120 1124 /* pm8150 has 10 GPIOs with holes on 2, 5, 7 and 8 */ 1121 1125 { .compatible = "qcom,pm8150-gpio", .data = (void *) 10 }, 1122 1126 /* pm8150b has 12 GPIOs with holes on 3, r and 7 */
+1 -1
drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c
··· 346 346 return -EINVAL; 347 347 } 348 348 pin->pull_up_strength = arg; 349 - /* FALLTHROUGH */ 349 + fallthrough; 350 350 case PIN_CONFIG_BIAS_PULL_UP: 351 351 pin->bias = pin->pull_up_strength; 352 352 banks |= BIT(2);
+32 -26
drivers/pinctrl/samsung/pinctrl-exynos.c
··· 38 38 u32 eint_con; 39 39 u32 eint_mask; 40 40 u32 eint_pend; 41 - u32 eint_wake_mask_value; 41 + u32 *eint_wake_mask_value; 42 42 u32 eint_wake_mask_reg; 43 43 void (*set_eint_wakeup_mask)(struct samsung_pinctrl_drv_data *drvdata, 44 44 struct exynos_irq_chip *irq_chip); ··· 207 207 /* 208 208 * irq_chip for gpio interrupts. 209 209 */ 210 - static struct exynos_irq_chip exynos_gpio_irq_chip = { 210 + static const struct exynos_irq_chip exynos_gpio_irq_chip __initconst = { 211 211 .chip = { 212 212 .name = "exynos_gpio_irq_chip", 213 213 .irq_unmask = exynos_irq_unmask, ··· 274 274 * exynos_eint_gpio_init() - setup handling of external gpio interrupts. 275 275 * @d: driver data of samsung pinctrl driver. 276 276 */ 277 - int exynos_eint_gpio_init(struct samsung_pinctrl_drv_data *d) 277 + __init int exynos_eint_gpio_init(struct samsung_pinctrl_drv_data *d) 278 278 { 279 279 struct samsung_pin_bank *bank; 280 280 struct device *dev = d->dev; ··· 297 297 for (i = 0; i < d->nr_banks; ++i, ++bank) { 298 298 if (bank->eint_type != EINT_TYPE_GPIO) 299 299 continue; 300 + 301 + bank->irq_chip = devm_kmemdup(dev, &exynos_gpio_irq_chip, 302 + sizeof(*bank->irq_chip), GFP_KERNEL); 303 + if (!bank->irq_chip) { 304 + ret = -ENOMEM; 305 + goto err_domains; 306 + } 307 + bank->irq_chip->chip.name = bank->name; 308 + 300 309 bank->irq_domain = irq_domain_add_linear(bank->of_node, 301 310 bank->nr_pins, &exynos_eint_irqd_ops, bank); 302 311 if (!bank->irq_domain) { ··· 322 313 goto err_domains; 323 314 } 324 315 325 - bank->irq_chip = &exynos_gpio_irq_chip; 326 316 } 327 317 328 318 return 0; ··· 346 338 pr_info("wake %s for irq %d\n", on ? "enabled" : "disabled", irqd->irq); 347 339 348 340 if (!on) 349 - our_chip->eint_wake_mask_value |= bit; 341 + *our_chip->eint_wake_mask_value |= bit; 350 342 else 351 - our_chip->eint_wake_mask_value &= ~bit; 343 + *our_chip->eint_wake_mask_value &= ~bit; 352 344 353 345 return 0; 354 346 } ··· 368 360 pmu_regs = drvdata->retention_ctrl->priv; 369 361 dev_info(drvdata->dev, 370 362 "Setting external wakeup interrupt mask: 0x%x\n", 371 - irq_chip->eint_wake_mask_value); 363 + *irq_chip->eint_wake_mask_value); 372 364 373 365 regmap_write(pmu_regs, irq_chip->eint_wake_mask_reg, 374 - irq_chip->eint_wake_mask_value); 366 + *irq_chip->eint_wake_mask_value); 375 367 } 376 368 377 369 static void ··· 390 382 391 383 clk_base = (void __iomem *) drvdata->retention_ctrl->priv; 392 384 393 - __raw_writel(irq_chip->eint_wake_mask_value, 385 + __raw_writel(*irq_chip->eint_wake_mask_value, 394 386 clk_base + irq_chip->eint_wake_mask_reg); 395 387 } 396 388 389 + static u32 eint_wake_mask_value = EXYNOS_EINT_WAKEUP_MASK_DISABLED; 397 390 /* 398 391 * irq_chip for wakeup interrupts 399 392 */ ··· 412 403 .eint_con = EXYNOS_WKUP_ECON_OFFSET, 413 404 .eint_mask = EXYNOS_WKUP_EMASK_OFFSET, 414 405 .eint_pend = EXYNOS_WKUP_EPEND_OFFSET, 415 - .eint_wake_mask_value = EXYNOS_EINT_WAKEUP_MASK_DISABLED, 406 + .eint_wake_mask_value = &eint_wake_mask_value, 416 407 /* Only differences with exynos4210_wkup_irq_chip: */ 417 408 .eint_wake_mask_reg = S5PV210_EINT_WAKEUP_MASK, 418 409 .set_eint_wakeup_mask = s5pv210_pinctrl_set_eint_wakeup_mask, ··· 432 423 .eint_con = EXYNOS_WKUP_ECON_OFFSET, 433 424 .eint_mask = EXYNOS_WKUP_EMASK_OFFSET, 434 425 .eint_pend = EXYNOS_WKUP_EPEND_OFFSET, 435 - .eint_wake_mask_value = EXYNOS_EINT_WAKEUP_MASK_DISABLED, 426 + .eint_wake_mask_value = &eint_wake_mask_value, 436 427 .eint_wake_mask_reg = EXYNOS_EINT_WAKEUP_MASK, 437 428 .set_eint_wakeup_mask = exynos_pinctrl_set_eint_wakeup_mask, 438 429 }; ··· 451 442 .eint_con = EXYNOS7_WKUP_ECON_OFFSET, 452 443 .eint_mask = EXYNOS7_WKUP_EMASK_OFFSET, 453 444 .eint_pend = EXYNOS7_WKUP_EPEND_OFFSET, 454 - .eint_wake_mask_value = EXYNOS_EINT_WAKEUP_MASK_DISABLED, 445 + .eint_wake_mask_value = &eint_wake_mask_value, 455 446 .eint_wake_mask_reg = EXYNOS5433_EINT_WAKEUP_MASK, 456 447 .set_eint_wakeup_mask = exynos_pinctrl_set_eint_wakeup_mask, 457 448 }; ··· 522 513 * exynos_eint_wkup_init() - setup handling of external wakeup interrupts. 523 514 * @d: driver data of samsung pinctrl driver. 524 515 */ 525 - int exynos_eint_wkup_init(struct samsung_pinctrl_drv_data *d) 516 + __init int exynos_eint_wkup_init(struct samsung_pinctrl_drv_data *d) 526 517 { 527 518 struct device *dev = d->dev; 528 519 struct device_node *wkup_np = NULL; ··· 530 521 struct samsung_pin_bank *bank; 531 522 struct exynos_weint_data *weint_data; 532 523 struct exynos_muxed_weint_data *muxed_data; 533 - struct exynos_irq_chip *irq_chip; 524 + const struct exynos_irq_chip *irq_chip; 534 525 unsigned int muxed_banks = 0; 535 526 unsigned int i; 536 527 int idx, irq; ··· 540 531 541 532 match = of_match_node(exynos_wkup_irq_ids, np); 542 533 if (match) { 543 - irq_chip = kmemdup(match->data, 544 - sizeof(*irq_chip), GFP_KERNEL); 545 - if (!irq_chip) { 546 - of_node_put(np); 547 - return -ENOMEM; 548 - } 534 + irq_chip = match->data; 549 535 wkup_np = np; 550 536 break; 551 537 } ··· 553 549 if (bank->eint_type != EINT_TYPE_WKUP) 554 550 continue; 555 551 552 + bank->irq_chip = devm_kmemdup(dev, irq_chip, sizeof(*irq_chip), 553 + GFP_KERNEL); 554 + if (!bank->irq_chip) { 555 + of_node_put(wkup_np); 556 + return -ENOMEM; 557 + } 558 + bank->irq_chip->chip.name = bank->name; 559 + 556 560 bank->irq_domain = irq_domain_add_linear(bank->of_node, 557 561 bank->nr_pins, &exynos_eint_irqd_ops, bank); 558 562 if (!bank->irq_domain) { ··· 568 556 of_node_put(wkup_np); 569 557 return -ENXIO; 570 558 } 571 - 572 - bank->irq_chip = irq_chip; 573 559 574 560 if (!of_find_property(bank->of_node, "interrupts", NULL)) { 575 561 bank->eint_type = EINT_TYPE_WKUP_MUX; ··· 667 657 irq_chip = bank->irq_chip; 668 658 irq_chip->set_eint_wakeup_mask(drvdata, 669 659 irq_chip); 670 - } else if (bank->irq_chip != irq_chip) { 671 - dev_warn(drvdata->dev, 672 - "More than one external wakeup interrupt chip configured (bank: %s). This is not supported by hardware nor by driver.\n", 673 - bank->name); 674 660 } 675 661 } 676 662 }
+3 -3
drivers/pinctrl/samsung/pinctrl-s3c24xx.c
··· 80 80 } 81 81 82 82 /** 83 - * struct s3c24xx_eint_data: EINT common data 83 + * struct s3c24xx_eint_data - EINT common data 84 84 * @drvdata: pin controller driver data 85 85 * @domains: IRQ domains of particular EINT interrupts 86 86 * @parents: mapped parent irqs in the main interrupt controller ··· 92 92 }; 93 93 94 94 /** 95 - * struct s3c24xx_eint_domain_data: per irq-domain data 95 + * struct s3c24xx_eint_domain_data - per irq-domain data 96 96 * @bank: pin bank related to the domain 97 97 * @eint_data: common data 98 - * eint0_3_parent_only: live eints 0-3 only in the main intc 98 + * @eint0_3_parent_only: live eints 0-3 only in the main intc 99 99 */ 100 100 struct s3c24xx_eint_domain_data { 101 101 struct samsung_pin_bank *bank;
+3 -3
drivers/pinctrl/samsung/pinctrl-s3c64xx.c
··· 193 193 } 194 194 195 195 /** 196 - * struct s3c64xx_eint0_data: EINT0 common data 196 + * struct s3c64xx_eint0_data - EINT0 common data 197 197 * @drvdata: pin controller driver data 198 198 * @domains: IRQ domains of particular EINT0 interrupts 199 199 * @pins: pin offsets inside of banks of particular EINT0 interrupts ··· 205 205 }; 206 206 207 207 /** 208 - * struct s3c64xx_eint0_domain_data: EINT0 per-domain data 208 + * struct s3c64xx_eint0_domain_data - EINT0 per-domain data 209 209 * @bank: pin bank related to the domain 210 210 * @eints: EINT0 interrupts related to the domain 211 211 */ ··· 215 215 }; 216 216 217 217 /** 218 - * struct s3c64xx_eint_gpio_data: GPIO EINT data 218 + * struct s3c64xx_eint_gpio_data - GPIO EINT data 219 219 * @drvdata: pin controller driver data 220 220 * @domains: array of domains related to EINT interrupt groups 221 221 */
+2 -2
drivers/pinctrl/samsung/pinctrl-samsung.c
··· 1140 1140 return 0; 1141 1141 } 1142 1142 1143 - /** 1143 + /* 1144 1144 * samsung_pinctrl_suspend - save pinctrl state for suspend 1145 1145 * 1146 1146 * Save data for all banks handled by this device. ··· 1187 1187 return 0; 1188 1188 } 1189 1189 1190 - /** 1190 + /* 1191 1191 * samsung_pinctrl_resume - restore pinctrl state from suspend 1192 1192 * 1193 1193 * Restore one of the banks that was saved during suspend.
+4
drivers/pinctrl/sh-pfc/Kconfig
··· 20 20 select PINCTRL_PFC_R8A774A1 if ARCH_R8A774A1 21 21 select PINCTRL_PFC_R8A774B1 if ARCH_R8A774B1 22 22 select PINCTRL_PFC_R8A774C0 if ARCH_R8A774C0 23 + select PINCTRL_PFC_R8A774E1 if ARCH_R8A774E1 23 24 select PINCTRL_PFC_R8A7778 if ARCH_R8A7778 24 25 select PINCTRL_PFC_R8A7779 if ARCH_R8A7779 25 26 select PINCTRL_PFC_R8A7790 if ARCH_R8A7790 ··· 99 98 100 99 config PINCTRL_PFC_R8A774C0 101 100 bool "RZ/G2E pin control support" if COMPILE_TEST 101 + 102 + config PINCTRL_PFC_R8A774E1 103 + bool "RZ/G2H pin control support" if COMPILE_TEST 102 104 103 105 config PINCTRL_PFC_R8A7778 104 106 bool "R-Car M1A pin control support" if COMPILE_TEST
+1
drivers/pinctrl/sh-pfc/Makefile
··· 12 12 obj-$(CONFIG_PINCTRL_PFC_R8A774A1) += pfc-r8a7796.o 13 13 obj-$(CONFIG_PINCTRL_PFC_R8A774B1) += pfc-r8a77965.o 14 14 obj-$(CONFIG_PINCTRL_PFC_R8A774C0) += pfc-r8a77990.o 15 + obj-$(CONFIG_PINCTRL_PFC_R8A774E1) += pfc-r8a77951.o 15 16 obj-$(CONFIG_PINCTRL_PFC_R8A7778) += pfc-r8a7778.o 16 17 obj-$(CONFIG_PINCTRL_PFC_R8A7779) += pfc-r8a7779.o 17 18 obj-$(CONFIG_PINCTRL_PFC_R8A7790) += pfc-r8a7790.o
+6
drivers/pinctrl/sh-pfc/core.c
··· 533 533 .data = &r8a774c0_pinmux_info, 534 534 }, 535 535 #endif 536 + #ifdef CONFIG_PINCTRL_PFC_R8A774E1 537 + { 538 + .compatible = "renesas,pfc-r8a774e1", 539 + .data = &r8a774e1_pinmux_info, 540 + }, 541 + #endif 536 542 #ifdef CONFIG_PINCTRL_PFC_R8A7778 537 543 { 538 544 .compatible = "renesas,pfc-r8a7778",
+464 -417
drivers/pinctrl/sh-pfc/pfc-r8a77951.c
··· 4157 4157 VI5_CLK_MARK, 4158 4158 }; 4159 4159 4160 - static const struct sh_pfc_pin_group pinmux_groups[] = { 4161 - SH_PFC_PIN_GROUP(audio_clk_a_a), 4162 - SH_PFC_PIN_GROUP(audio_clk_a_b), 4163 - SH_PFC_PIN_GROUP(audio_clk_a_c), 4164 - SH_PFC_PIN_GROUP(audio_clk_b_a), 4165 - SH_PFC_PIN_GROUP(audio_clk_b_b), 4166 - SH_PFC_PIN_GROUP(audio_clk_c_a), 4167 - SH_PFC_PIN_GROUP(audio_clk_c_b), 4168 - SH_PFC_PIN_GROUP(audio_clkout_a), 4169 - SH_PFC_PIN_GROUP(audio_clkout_b), 4170 - SH_PFC_PIN_GROUP(audio_clkout_c), 4171 - SH_PFC_PIN_GROUP(audio_clkout_d), 4172 - SH_PFC_PIN_GROUP(audio_clkout1_a), 4173 - SH_PFC_PIN_GROUP(audio_clkout1_b), 4174 - SH_PFC_PIN_GROUP(audio_clkout2_a), 4175 - SH_PFC_PIN_GROUP(audio_clkout2_b), 4176 - SH_PFC_PIN_GROUP(audio_clkout3_a), 4177 - SH_PFC_PIN_GROUP(audio_clkout3_b), 4178 - SH_PFC_PIN_GROUP(avb_link), 4179 - SH_PFC_PIN_GROUP(avb_magic), 4180 - SH_PFC_PIN_GROUP(avb_phy_int), 4181 - SH_PFC_PIN_GROUP_ALIAS(avb_mdc, avb_mdio), /* Deprecated */ 4182 - SH_PFC_PIN_GROUP(avb_mdio), 4183 - SH_PFC_PIN_GROUP(avb_mii), 4184 - SH_PFC_PIN_GROUP(avb_avtp_pps), 4185 - SH_PFC_PIN_GROUP(avb_avtp_match_a), 4186 - SH_PFC_PIN_GROUP(avb_avtp_capture_a), 4187 - SH_PFC_PIN_GROUP(avb_avtp_match_b), 4188 - SH_PFC_PIN_GROUP(avb_avtp_capture_b), 4189 - SH_PFC_PIN_GROUP(can0_data_a), 4190 - SH_PFC_PIN_GROUP(can0_data_b), 4191 - SH_PFC_PIN_GROUP(can1_data), 4192 - SH_PFC_PIN_GROUP(can_clk), 4193 - SH_PFC_PIN_GROUP(canfd0_data_a), 4194 - SH_PFC_PIN_GROUP(canfd0_data_b), 4195 - SH_PFC_PIN_GROUP(canfd1_data), 4196 - SH_PFC_PIN_GROUP(drif0_ctrl_a), 4197 - SH_PFC_PIN_GROUP(drif0_data0_a), 4198 - SH_PFC_PIN_GROUP(drif0_data1_a), 4199 - SH_PFC_PIN_GROUP(drif0_ctrl_b), 4200 - SH_PFC_PIN_GROUP(drif0_data0_b), 4201 - SH_PFC_PIN_GROUP(drif0_data1_b), 4202 - SH_PFC_PIN_GROUP(drif0_ctrl_c), 4203 - SH_PFC_PIN_GROUP(drif0_data0_c), 4204 - SH_PFC_PIN_GROUP(drif0_data1_c), 4205 - SH_PFC_PIN_GROUP(drif1_ctrl_a), 4206 - SH_PFC_PIN_GROUP(drif1_data0_a), 4207 - SH_PFC_PIN_GROUP(drif1_data1_a), 4208 - SH_PFC_PIN_GROUP(drif1_ctrl_b), 4209 - SH_PFC_PIN_GROUP(drif1_data0_b), 4210 - SH_PFC_PIN_GROUP(drif1_data1_b), 4211 - SH_PFC_PIN_GROUP(drif1_ctrl_c), 4212 - SH_PFC_PIN_GROUP(drif1_data0_c), 4213 - SH_PFC_PIN_GROUP(drif1_data1_c), 4214 - SH_PFC_PIN_GROUP(drif2_ctrl_a), 4215 - SH_PFC_PIN_GROUP(drif2_data0_a), 4216 - SH_PFC_PIN_GROUP(drif2_data1_a), 4217 - SH_PFC_PIN_GROUP(drif2_ctrl_b), 4218 - SH_PFC_PIN_GROUP(drif2_data0_b), 4219 - SH_PFC_PIN_GROUP(drif2_data1_b), 4220 - SH_PFC_PIN_GROUP(drif3_ctrl_a), 4221 - SH_PFC_PIN_GROUP(drif3_data0_a), 4222 - SH_PFC_PIN_GROUP(drif3_data1_a), 4223 - SH_PFC_PIN_GROUP(drif3_ctrl_b), 4224 - SH_PFC_PIN_GROUP(drif3_data0_b), 4225 - SH_PFC_PIN_GROUP(drif3_data1_b), 4226 - SH_PFC_PIN_GROUP(du_rgb666), 4227 - SH_PFC_PIN_GROUP(du_rgb888), 4228 - SH_PFC_PIN_GROUP(du_clk_out_0), 4229 - SH_PFC_PIN_GROUP(du_clk_out_1), 4230 - SH_PFC_PIN_GROUP(du_sync), 4231 - SH_PFC_PIN_GROUP(du_oddf), 4232 - SH_PFC_PIN_GROUP(du_cde), 4233 - SH_PFC_PIN_GROUP(du_disp), 4234 - SH_PFC_PIN_GROUP(hscif0_data), 4235 - SH_PFC_PIN_GROUP(hscif0_clk), 4236 - SH_PFC_PIN_GROUP(hscif0_ctrl), 4237 - SH_PFC_PIN_GROUP(hscif1_data_a), 4238 - SH_PFC_PIN_GROUP(hscif1_clk_a), 4239 - SH_PFC_PIN_GROUP(hscif1_ctrl_a), 4240 - SH_PFC_PIN_GROUP(hscif1_data_b), 4241 - SH_PFC_PIN_GROUP(hscif1_clk_b), 4242 - SH_PFC_PIN_GROUP(hscif1_ctrl_b), 4243 - SH_PFC_PIN_GROUP(hscif2_data_a), 4244 - SH_PFC_PIN_GROUP(hscif2_clk_a), 4245 - SH_PFC_PIN_GROUP(hscif2_ctrl_a), 4246 - SH_PFC_PIN_GROUP(hscif2_data_b), 4247 - SH_PFC_PIN_GROUP(hscif2_clk_b), 4248 - SH_PFC_PIN_GROUP(hscif2_ctrl_b), 4249 - SH_PFC_PIN_GROUP(hscif2_data_c), 4250 - SH_PFC_PIN_GROUP(hscif2_clk_c), 4251 - SH_PFC_PIN_GROUP(hscif2_ctrl_c), 4252 - SH_PFC_PIN_GROUP(hscif3_data_a), 4253 - SH_PFC_PIN_GROUP(hscif3_clk), 4254 - SH_PFC_PIN_GROUP(hscif3_ctrl), 4255 - SH_PFC_PIN_GROUP(hscif3_data_b), 4256 - SH_PFC_PIN_GROUP(hscif3_data_c), 4257 - SH_PFC_PIN_GROUP(hscif3_data_d), 4258 - SH_PFC_PIN_GROUP(hscif4_data_a), 4259 - SH_PFC_PIN_GROUP(hscif4_clk), 4260 - SH_PFC_PIN_GROUP(hscif4_ctrl), 4261 - SH_PFC_PIN_GROUP(hscif4_data_b), 4262 - SH_PFC_PIN_GROUP(i2c0), 4263 - SH_PFC_PIN_GROUP(i2c1_a), 4264 - SH_PFC_PIN_GROUP(i2c1_b), 4265 - SH_PFC_PIN_GROUP(i2c2_a), 4266 - SH_PFC_PIN_GROUP(i2c2_b), 4267 - SH_PFC_PIN_GROUP(i2c3), 4268 - SH_PFC_PIN_GROUP(i2c5), 4269 - SH_PFC_PIN_GROUP(i2c6_a), 4270 - SH_PFC_PIN_GROUP(i2c6_b), 4271 - SH_PFC_PIN_GROUP(i2c6_c), 4272 - SH_PFC_PIN_GROUP(intc_ex_irq0), 4273 - SH_PFC_PIN_GROUP(intc_ex_irq1), 4274 - SH_PFC_PIN_GROUP(intc_ex_irq2), 4275 - SH_PFC_PIN_GROUP(intc_ex_irq3), 4276 - SH_PFC_PIN_GROUP(intc_ex_irq4), 4277 - SH_PFC_PIN_GROUP(intc_ex_irq5), 4278 - SH_PFC_PIN_GROUP(msiof0_clk), 4279 - SH_PFC_PIN_GROUP(msiof0_sync), 4280 - SH_PFC_PIN_GROUP(msiof0_ss1), 4281 - SH_PFC_PIN_GROUP(msiof0_ss2), 4282 - SH_PFC_PIN_GROUP(msiof0_txd), 4283 - SH_PFC_PIN_GROUP(msiof0_rxd), 4284 - SH_PFC_PIN_GROUP(msiof1_clk_a), 4285 - SH_PFC_PIN_GROUP(msiof1_sync_a), 4286 - SH_PFC_PIN_GROUP(msiof1_ss1_a), 4287 - SH_PFC_PIN_GROUP(msiof1_ss2_a), 4288 - SH_PFC_PIN_GROUP(msiof1_txd_a), 4289 - SH_PFC_PIN_GROUP(msiof1_rxd_a), 4290 - SH_PFC_PIN_GROUP(msiof1_clk_b), 4291 - SH_PFC_PIN_GROUP(msiof1_sync_b), 4292 - SH_PFC_PIN_GROUP(msiof1_ss1_b), 4293 - SH_PFC_PIN_GROUP(msiof1_ss2_b), 4294 - SH_PFC_PIN_GROUP(msiof1_txd_b), 4295 - SH_PFC_PIN_GROUP(msiof1_rxd_b), 4296 - SH_PFC_PIN_GROUP(msiof1_clk_c), 4297 - SH_PFC_PIN_GROUP(msiof1_sync_c), 4298 - SH_PFC_PIN_GROUP(msiof1_ss1_c), 4299 - SH_PFC_PIN_GROUP(msiof1_ss2_c), 4300 - SH_PFC_PIN_GROUP(msiof1_txd_c), 4301 - SH_PFC_PIN_GROUP(msiof1_rxd_c), 4302 - SH_PFC_PIN_GROUP(msiof1_clk_d), 4303 - SH_PFC_PIN_GROUP(msiof1_sync_d), 4304 - SH_PFC_PIN_GROUP(msiof1_ss1_d), 4305 - SH_PFC_PIN_GROUP(msiof1_ss2_d), 4306 - SH_PFC_PIN_GROUP(msiof1_txd_d), 4307 - SH_PFC_PIN_GROUP(msiof1_rxd_d), 4308 - SH_PFC_PIN_GROUP(msiof1_clk_e), 4309 - SH_PFC_PIN_GROUP(msiof1_sync_e), 4310 - SH_PFC_PIN_GROUP(msiof1_ss1_e), 4311 - SH_PFC_PIN_GROUP(msiof1_ss2_e), 4312 - SH_PFC_PIN_GROUP(msiof1_txd_e), 4313 - SH_PFC_PIN_GROUP(msiof1_rxd_e), 4314 - SH_PFC_PIN_GROUP(msiof1_clk_f), 4315 - SH_PFC_PIN_GROUP(msiof1_sync_f), 4316 - SH_PFC_PIN_GROUP(msiof1_ss1_f), 4317 - SH_PFC_PIN_GROUP(msiof1_ss2_f), 4318 - SH_PFC_PIN_GROUP(msiof1_txd_f), 4319 - SH_PFC_PIN_GROUP(msiof1_rxd_f), 4320 - SH_PFC_PIN_GROUP(msiof1_clk_g), 4321 - SH_PFC_PIN_GROUP(msiof1_sync_g), 4322 - SH_PFC_PIN_GROUP(msiof1_ss1_g), 4323 - SH_PFC_PIN_GROUP(msiof1_ss2_g), 4324 - SH_PFC_PIN_GROUP(msiof1_txd_g), 4325 - SH_PFC_PIN_GROUP(msiof1_rxd_g), 4326 - SH_PFC_PIN_GROUP(msiof2_clk_a), 4327 - SH_PFC_PIN_GROUP(msiof2_sync_a), 4328 - SH_PFC_PIN_GROUP(msiof2_ss1_a), 4329 - SH_PFC_PIN_GROUP(msiof2_ss2_a), 4330 - SH_PFC_PIN_GROUP(msiof2_txd_a), 4331 - SH_PFC_PIN_GROUP(msiof2_rxd_a), 4332 - SH_PFC_PIN_GROUP(msiof2_clk_b), 4333 - SH_PFC_PIN_GROUP(msiof2_sync_b), 4334 - SH_PFC_PIN_GROUP(msiof2_ss1_b), 4335 - SH_PFC_PIN_GROUP(msiof2_ss2_b), 4336 - SH_PFC_PIN_GROUP(msiof2_txd_b), 4337 - SH_PFC_PIN_GROUP(msiof2_rxd_b), 4338 - SH_PFC_PIN_GROUP(msiof2_clk_c), 4339 - SH_PFC_PIN_GROUP(msiof2_sync_c), 4340 - SH_PFC_PIN_GROUP(msiof2_ss1_c), 4341 - SH_PFC_PIN_GROUP(msiof2_ss2_c), 4342 - SH_PFC_PIN_GROUP(msiof2_txd_c), 4343 - SH_PFC_PIN_GROUP(msiof2_rxd_c), 4344 - SH_PFC_PIN_GROUP(msiof2_clk_d), 4345 - SH_PFC_PIN_GROUP(msiof2_sync_d), 4346 - SH_PFC_PIN_GROUP(msiof2_ss1_d), 4347 - SH_PFC_PIN_GROUP(msiof2_ss2_d), 4348 - SH_PFC_PIN_GROUP(msiof2_txd_d), 4349 - SH_PFC_PIN_GROUP(msiof2_rxd_d), 4350 - SH_PFC_PIN_GROUP(msiof3_clk_a), 4351 - SH_PFC_PIN_GROUP(msiof3_sync_a), 4352 - SH_PFC_PIN_GROUP(msiof3_ss1_a), 4353 - SH_PFC_PIN_GROUP(msiof3_ss2_a), 4354 - SH_PFC_PIN_GROUP(msiof3_txd_a), 4355 - SH_PFC_PIN_GROUP(msiof3_rxd_a), 4356 - SH_PFC_PIN_GROUP(msiof3_clk_b), 4357 - SH_PFC_PIN_GROUP(msiof3_sync_b), 4358 - SH_PFC_PIN_GROUP(msiof3_ss1_b), 4359 - SH_PFC_PIN_GROUP(msiof3_ss2_b), 4360 - SH_PFC_PIN_GROUP(msiof3_txd_b), 4361 - SH_PFC_PIN_GROUP(msiof3_rxd_b), 4362 - SH_PFC_PIN_GROUP(msiof3_clk_c), 4363 - SH_PFC_PIN_GROUP(msiof3_sync_c), 4364 - SH_PFC_PIN_GROUP(msiof3_txd_c), 4365 - SH_PFC_PIN_GROUP(msiof3_rxd_c), 4366 - SH_PFC_PIN_GROUP(msiof3_clk_d), 4367 - SH_PFC_PIN_GROUP(msiof3_sync_d), 4368 - SH_PFC_PIN_GROUP(msiof3_ss1_d), 4369 - SH_PFC_PIN_GROUP(msiof3_txd_d), 4370 - SH_PFC_PIN_GROUP(msiof3_rxd_d), 4371 - SH_PFC_PIN_GROUP(msiof3_clk_e), 4372 - SH_PFC_PIN_GROUP(msiof3_sync_e), 4373 - SH_PFC_PIN_GROUP(msiof3_ss1_e), 4374 - SH_PFC_PIN_GROUP(msiof3_ss2_e), 4375 - SH_PFC_PIN_GROUP(msiof3_txd_e), 4376 - SH_PFC_PIN_GROUP(msiof3_rxd_e), 4377 - SH_PFC_PIN_GROUP(pwm0), 4378 - SH_PFC_PIN_GROUP(pwm1_a), 4379 - SH_PFC_PIN_GROUP(pwm1_b), 4380 - SH_PFC_PIN_GROUP(pwm2_a), 4381 - SH_PFC_PIN_GROUP(pwm2_b), 4382 - SH_PFC_PIN_GROUP(pwm3_a), 4383 - SH_PFC_PIN_GROUP(pwm3_b), 4384 - SH_PFC_PIN_GROUP(pwm4_a), 4385 - SH_PFC_PIN_GROUP(pwm4_b), 4386 - SH_PFC_PIN_GROUP(pwm5_a), 4387 - SH_PFC_PIN_GROUP(pwm5_b), 4388 - SH_PFC_PIN_GROUP(pwm6_a), 4389 - SH_PFC_PIN_GROUP(pwm6_b), 4390 - SH_PFC_PIN_GROUP(sata0_devslp_a), 4391 - SH_PFC_PIN_GROUP(sata0_devslp_b), 4392 - SH_PFC_PIN_GROUP(scif0_data), 4393 - SH_PFC_PIN_GROUP(scif0_clk), 4394 - SH_PFC_PIN_GROUP(scif0_ctrl), 4395 - SH_PFC_PIN_GROUP(scif1_data_a), 4396 - SH_PFC_PIN_GROUP(scif1_clk), 4397 - SH_PFC_PIN_GROUP(scif1_ctrl), 4398 - SH_PFC_PIN_GROUP(scif1_data_b), 4399 - SH_PFC_PIN_GROUP(scif2_data_a), 4400 - SH_PFC_PIN_GROUP(scif2_clk), 4401 - SH_PFC_PIN_GROUP(scif2_data_b), 4402 - SH_PFC_PIN_GROUP(scif3_data_a), 4403 - SH_PFC_PIN_GROUP(scif3_clk), 4404 - SH_PFC_PIN_GROUP(scif3_ctrl), 4405 - SH_PFC_PIN_GROUP(scif3_data_b), 4406 - SH_PFC_PIN_GROUP(scif4_data_a), 4407 - SH_PFC_PIN_GROUP(scif4_clk_a), 4408 - SH_PFC_PIN_GROUP(scif4_ctrl_a), 4409 - SH_PFC_PIN_GROUP(scif4_data_b), 4410 - SH_PFC_PIN_GROUP(scif4_clk_b), 4411 - SH_PFC_PIN_GROUP(scif4_ctrl_b), 4412 - SH_PFC_PIN_GROUP(scif4_data_c), 4413 - SH_PFC_PIN_GROUP(scif4_clk_c), 4414 - SH_PFC_PIN_GROUP(scif4_ctrl_c), 4415 - SH_PFC_PIN_GROUP(scif5_data_a), 4416 - SH_PFC_PIN_GROUP(scif5_clk_a), 4417 - SH_PFC_PIN_GROUP(scif5_data_b), 4418 - SH_PFC_PIN_GROUP(scif5_clk_b), 4419 - SH_PFC_PIN_GROUP(scif_clk_a), 4420 - SH_PFC_PIN_GROUP(scif_clk_b), 4421 - SH_PFC_PIN_GROUP(sdhi0_data1), 4422 - SH_PFC_PIN_GROUP(sdhi0_data4), 4423 - SH_PFC_PIN_GROUP(sdhi0_ctrl), 4424 - SH_PFC_PIN_GROUP(sdhi0_cd), 4425 - SH_PFC_PIN_GROUP(sdhi0_wp), 4426 - SH_PFC_PIN_GROUP(sdhi1_data1), 4427 - SH_PFC_PIN_GROUP(sdhi1_data4), 4428 - SH_PFC_PIN_GROUP(sdhi1_ctrl), 4429 - SH_PFC_PIN_GROUP(sdhi1_cd), 4430 - SH_PFC_PIN_GROUP(sdhi1_wp), 4431 - SH_PFC_PIN_GROUP(sdhi2_data1), 4432 - SH_PFC_PIN_GROUP(sdhi2_data4), 4433 - SH_PFC_PIN_GROUP(sdhi2_data8), 4434 - SH_PFC_PIN_GROUP(sdhi2_ctrl), 4435 - SH_PFC_PIN_GROUP(sdhi2_cd_a), 4436 - SH_PFC_PIN_GROUP(sdhi2_wp_a), 4437 - SH_PFC_PIN_GROUP(sdhi2_cd_b), 4438 - SH_PFC_PIN_GROUP(sdhi2_wp_b), 4439 - SH_PFC_PIN_GROUP(sdhi2_ds), 4440 - SH_PFC_PIN_GROUP(sdhi3_data1), 4441 - SH_PFC_PIN_GROUP(sdhi3_data4), 4442 - SH_PFC_PIN_GROUP(sdhi3_data8), 4443 - SH_PFC_PIN_GROUP(sdhi3_ctrl), 4444 - SH_PFC_PIN_GROUP(sdhi3_cd), 4445 - SH_PFC_PIN_GROUP(sdhi3_wp), 4446 - SH_PFC_PIN_GROUP(sdhi3_ds), 4447 - SH_PFC_PIN_GROUP(ssi0_data), 4448 - SH_PFC_PIN_GROUP(ssi01239_ctrl), 4449 - SH_PFC_PIN_GROUP(ssi1_data_a), 4450 - SH_PFC_PIN_GROUP(ssi1_data_b), 4451 - SH_PFC_PIN_GROUP(ssi1_ctrl_a), 4452 - SH_PFC_PIN_GROUP(ssi1_ctrl_b), 4453 - SH_PFC_PIN_GROUP(ssi2_data_a), 4454 - SH_PFC_PIN_GROUP(ssi2_data_b), 4455 - SH_PFC_PIN_GROUP(ssi2_ctrl_a), 4456 - SH_PFC_PIN_GROUP(ssi2_ctrl_b), 4457 - SH_PFC_PIN_GROUP(ssi3_data), 4458 - SH_PFC_PIN_GROUP(ssi349_ctrl), 4459 - SH_PFC_PIN_GROUP(ssi4_data), 4460 - SH_PFC_PIN_GROUP(ssi4_ctrl), 4461 - SH_PFC_PIN_GROUP(ssi5_data), 4462 - SH_PFC_PIN_GROUP(ssi5_ctrl), 4463 - SH_PFC_PIN_GROUP(ssi6_data), 4464 - SH_PFC_PIN_GROUP(ssi6_ctrl), 4465 - SH_PFC_PIN_GROUP(ssi7_data), 4466 - SH_PFC_PIN_GROUP(ssi78_ctrl), 4467 - SH_PFC_PIN_GROUP(ssi8_data), 4468 - SH_PFC_PIN_GROUP(ssi9_data_a), 4469 - SH_PFC_PIN_GROUP(ssi9_data_b), 4470 - SH_PFC_PIN_GROUP(ssi9_ctrl_a), 4471 - SH_PFC_PIN_GROUP(ssi9_ctrl_b), 4472 - SH_PFC_PIN_GROUP(tmu_tclk1_a), 4473 - SH_PFC_PIN_GROUP(tmu_tclk1_b), 4474 - SH_PFC_PIN_GROUP(tmu_tclk2_a), 4475 - SH_PFC_PIN_GROUP(tmu_tclk2_b), 4476 - SH_PFC_PIN_GROUP(tpu_to0), 4477 - SH_PFC_PIN_GROUP(tpu_to1), 4478 - SH_PFC_PIN_GROUP(tpu_to2), 4479 - SH_PFC_PIN_GROUP(tpu_to3), 4480 - SH_PFC_PIN_GROUP(usb0), 4481 - SH_PFC_PIN_GROUP(usb1), 4482 - SH_PFC_PIN_GROUP(usb2), 4483 - SH_PFC_PIN_GROUP(usb2_ch3), 4484 - SH_PFC_PIN_GROUP(usb30), 4485 - VIN_DATA_PIN_GROUP(vin4_data, 8, _a), 4486 - VIN_DATA_PIN_GROUP(vin4_data, 10, _a), 4487 - VIN_DATA_PIN_GROUP(vin4_data, 12, _a), 4488 - VIN_DATA_PIN_GROUP(vin4_data, 16, _a), 4489 - SH_PFC_PIN_GROUP(vin4_data18_a), 4490 - VIN_DATA_PIN_GROUP(vin4_data, 20, _a), 4491 - VIN_DATA_PIN_GROUP(vin4_data, 24, _a), 4492 - VIN_DATA_PIN_GROUP(vin4_data, 8, _b), 4493 - VIN_DATA_PIN_GROUP(vin4_data, 10, _b), 4494 - VIN_DATA_PIN_GROUP(vin4_data, 12, _b), 4495 - VIN_DATA_PIN_GROUP(vin4_data, 16, _b), 4496 - SH_PFC_PIN_GROUP(vin4_data18_b), 4497 - VIN_DATA_PIN_GROUP(vin4_data, 20, _b), 4498 - VIN_DATA_PIN_GROUP(vin4_data, 24, _b), 4499 - SH_PFC_PIN_GROUP(vin4_sync), 4500 - SH_PFC_PIN_GROUP(vin4_field), 4501 - SH_PFC_PIN_GROUP(vin4_clkenb), 4502 - SH_PFC_PIN_GROUP(vin4_clk), 4503 - VIN_DATA_PIN_GROUP(vin5_data, 8), 4504 - VIN_DATA_PIN_GROUP(vin5_data, 10), 4505 - VIN_DATA_PIN_GROUP(vin5_data, 12), 4506 - VIN_DATA_PIN_GROUP(vin5_data, 16), 4507 - SH_PFC_PIN_GROUP(vin5_sync), 4508 - SH_PFC_PIN_GROUP(vin5_field), 4509 - SH_PFC_PIN_GROUP(vin5_clkenb), 4510 - SH_PFC_PIN_GROUP(vin5_clk), 4160 + static const struct { 4161 + struct sh_pfc_pin_group common[320]; 4162 + struct sh_pfc_pin_group automotive[30]; 4163 + } pinmux_groups = { 4164 + .common = { 4165 + SH_PFC_PIN_GROUP(audio_clk_a_a), 4166 + SH_PFC_PIN_GROUP(audio_clk_a_b), 4167 + SH_PFC_PIN_GROUP(audio_clk_a_c), 4168 + SH_PFC_PIN_GROUP(audio_clk_b_a), 4169 + SH_PFC_PIN_GROUP(audio_clk_b_b), 4170 + SH_PFC_PIN_GROUP(audio_clk_c_a), 4171 + SH_PFC_PIN_GROUP(audio_clk_c_b), 4172 + SH_PFC_PIN_GROUP(audio_clkout_a), 4173 + SH_PFC_PIN_GROUP(audio_clkout_b), 4174 + SH_PFC_PIN_GROUP(audio_clkout_c), 4175 + SH_PFC_PIN_GROUP(audio_clkout_d), 4176 + SH_PFC_PIN_GROUP(audio_clkout1_a), 4177 + SH_PFC_PIN_GROUP(audio_clkout1_b), 4178 + SH_PFC_PIN_GROUP(audio_clkout2_a), 4179 + SH_PFC_PIN_GROUP(audio_clkout2_b), 4180 + SH_PFC_PIN_GROUP(audio_clkout3_a), 4181 + SH_PFC_PIN_GROUP(audio_clkout3_b), 4182 + SH_PFC_PIN_GROUP(avb_link), 4183 + SH_PFC_PIN_GROUP(avb_magic), 4184 + SH_PFC_PIN_GROUP(avb_phy_int), 4185 + SH_PFC_PIN_GROUP_ALIAS(avb_mdc, avb_mdio), /* Deprecated */ 4186 + SH_PFC_PIN_GROUP(avb_mdio), 4187 + SH_PFC_PIN_GROUP(avb_mii), 4188 + SH_PFC_PIN_GROUP(avb_avtp_pps), 4189 + SH_PFC_PIN_GROUP(avb_avtp_match_a), 4190 + SH_PFC_PIN_GROUP(avb_avtp_capture_a), 4191 + SH_PFC_PIN_GROUP(avb_avtp_match_b), 4192 + SH_PFC_PIN_GROUP(avb_avtp_capture_b), 4193 + SH_PFC_PIN_GROUP(can0_data_a), 4194 + SH_PFC_PIN_GROUP(can0_data_b), 4195 + SH_PFC_PIN_GROUP(can1_data), 4196 + SH_PFC_PIN_GROUP(can_clk), 4197 + SH_PFC_PIN_GROUP(canfd0_data_a), 4198 + SH_PFC_PIN_GROUP(canfd0_data_b), 4199 + SH_PFC_PIN_GROUP(canfd1_data), 4200 + SH_PFC_PIN_GROUP(du_rgb666), 4201 + SH_PFC_PIN_GROUP(du_rgb888), 4202 + SH_PFC_PIN_GROUP(du_clk_out_0), 4203 + SH_PFC_PIN_GROUP(du_clk_out_1), 4204 + SH_PFC_PIN_GROUP(du_sync), 4205 + SH_PFC_PIN_GROUP(du_oddf), 4206 + SH_PFC_PIN_GROUP(du_cde), 4207 + SH_PFC_PIN_GROUP(du_disp), 4208 + SH_PFC_PIN_GROUP(hscif0_data), 4209 + SH_PFC_PIN_GROUP(hscif0_clk), 4210 + SH_PFC_PIN_GROUP(hscif0_ctrl), 4211 + SH_PFC_PIN_GROUP(hscif1_data_a), 4212 + SH_PFC_PIN_GROUP(hscif1_clk_a), 4213 + SH_PFC_PIN_GROUP(hscif1_ctrl_a), 4214 + SH_PFC_PIN_GROUP(hscif1_data_b), 4215 + SH_PFC_PIN_GROUP(hscif1_clk_b), 4216 + SH_PFC_PIN_GROUP(hscif1_ctrl_b), 4217 + SH_PFC_PIN_GROUP(hscif2_data_a), 4218 + SH_PFC_PIN_GROUP(hscif2_clk_a), 4219 + SH_PFC_PIN_GROUP(hscif2_ctrl_a), 4220 + SH_PFC_PIN_GROUP(hscif2_data_b), 4221 + SH_PFC_PIN_GROUP(hscif2_clk_b), 4222 + SH_PFC_PIN_GROUP(hscif2_ctrl_b), 4223 + SH_PFC_PIN_GROUP(hscif2_data_c), 4224 + SH_PFC_PIN_GROUP(hscif2_clk_c), 4225 + SH_PFC_PIN_GROUP(hscif2_ctrl_c), 4226 + SH_PFC_PIN_GROUP(hscif3_data_a), 4227 + SH_PFC_PIN_GROUP(hscif3_clk), 4228 + SH_PFC_PIN_GROUP(hscif3_ctrl), 4229 + SH_PFC_PIN_GROUP(hscif3_data_b), 4230 + SH_PFC_PIN_GROUP(hscif3_data_c), 4231 + SH_PFC_PIN_GROUP(hscif3_data_d), 4232 + SH_PFC_PIN_GROUP(hscif4_data_a), 4233 + SH_PFC_PIN_GROUP(hscif4_clk), 4234 + SH_PFC_PIN_GROUP(hscif4_ctrl), 4235 + SH_PFC_PIN_GROUP(hscif4_data_b), 4236 + SH_PFC_PIN_GROUP(i2c0), 4237 + SH_PFC_PIN_GROUP(i2c1_a), 4238 + SH_PFC_PIN_GROUP(i2c1_b), 4239 + SH_PFC_PIN_GROUP(i2c2_a), 4240 + SH_PFC_PIN_GROUP(i2c2_b), 4241 + SH_PFC_PIN_GROUP(i2c3), 4242 + SH_PFC_PIN_GROUP(i2c5), 4243 + SH_PFC_PIN_GROUP(i2c6_a), 4244 + SH_PFC_PIN_GROUP(i2c6_b), 4245 + SH_PFC_PIN_GROUP(i2c6_c), 4246 + SH_PFC_PIN_GROUP(intc_ex_irq0), 4247 + SH_PFC_PIN_GROUP(intc_ex_irq1), 4248 + SH_PFC_PIN_GROUP(intc_ex_irq2), 4249 + SH_PFC_PIN_GROUP(intc_ex_irq3), 4250 + SH_PFC_PIN_GROUP(intc_ex_irq4), 4251 + SH_PFC_PIN_GROUP(intc_ex_irq5), 4252 + SH_PFC_PIN_GROUP(msiof0_clk), 4253 + SH_PFC_PIN_GROUP(msiof0_sync), 4254 + SH_PFC_PIN_GROUP(msiof0_ss1), 4255 + SH_PFC_PIN_GROUP(msiof0_ss2), 4256 + SH_PFC_PIN_GROUP(msiof0_txd), 4257 + SH_PFC_PIN_GROUP(msiof0_rxd), 4258 + SH_PFC_PIN_GROUP(msiof1_clk_a), 4259 + SH_PFC_PIN_GROUP(msiof1_sync_a), 4260 + SH_PFC_PIN_GROUP(msiof1_ss1_a), 4261 + SH_PFC_PIN_GROUP(msiof1_ss2_a), 4262 + SH_PFC_PIN_GROUP(msiof1_txd_a), 4263 + SH_PFC_PIN_GROUP(msiof1_rxd_a), 4264 + SH_PFC_PIN_GROUP(msiof1_clk_b), 4265 + SH_PFC_PIN_GROUP(msiof1_sync_b), 4266 + SH_PFC_PIN_GROUP(msiof1_ss1_b), 4267 + SH_PFC_PIN_GROUP(msiof1_ss2_b), 4268 + SH_PFC_PIN_GROUP(msiof1_txd_b), 4269 + SH_PFC_PIN_GROUP(msiof1_rxd_b), 4270 + SH_PFC_PIN_GROUP(msiof1_clk_c), 4271 + SH_PFC_PIN_GROUP(msiof1_sync_c), 4272 + SH_PFC_PIN_GROUP(msiof1_ss1_c), 4273 + SH_PFC_PIN_GROUP(msiof1_ss2_c), 4274 + SH_PFC_PIN_GROUP(msiof1_txd_c), 4275 + SH_PFC_PIN_GROUP(msiof1_rxd_c), 4276 + SH_PFC_PIN_GROUP(msiof1_clk_d), 4277 + SH_PFC_PIN_GROUP(msiof1_sync_d), 4278 + SH_PFC_PIN_GROUP(msiof1_ss1_d), 4279 + SH_PFC_PIN_GROUP(msiof1_ss2_d), 4280 + SH_PFC_PIN_GROUP(msiof1_txd_d), 4281 + SH_PFC_PIN_GROUP(msiof1_rxd_d), 4282 + SH_PFC_PIN_GROUP(msiof1_clk_e), 4283 + SH_PFC_PIN_GROUP(msiof1_sync_e), 4284 + SH_PFC_PIN_GROUP(msiof1_ss1_e), 4285 + SH_PFC_PIN_GROUP(msiof1_ss2_e), 4286 + SH_PFC_PIN_GROUP(msiof1_txd_e), 4287 + SH_PFC_PIN_GROUP(msiof1_rxd_e), 4288 + SH_PFC_PIN_GROUP(msiof1_clk_f), 4289 + SH_PFC_PIN_GROUP(msiof1_sync_f), 4290 + SH_PFC_PIN_GROUP(msiof1_ss1_f), 4291 + SH_PFC_PIN_GROUP(msiof1_ss2_f), 4292 + SH_PFC_PIN_GROUP(msiof1_txd_f), 4293 + SH_PFC_PIN_GROUP(msiof1_rxd_f), 4294 + SH_PFC_PIN_GROUP(msiof1_clk_g), 4295 + SH_PFC_PIN_GROUP(msiof1_sync_g), 4296 + SH_PFC_PIN_GROUP(msiof1_ss1_g), 4297 + SH_PFC_PIN_GROUP(msiof1_ss2_g), 4298 + SH_PFC_PIN_GROUP(msiof1_txd_g), 4299 + SH_PFC_PIN_GROUP(msiof1_rxd_g), 4300 + SH_PFC_PIN_GROUP(msiof2_clk_a), 4301 + SH_PFC_PIN_GROUP(msiof2_sync_a), 4302 + SH_PFC_PIN_GROUP(msiof2_ss1_a), 4303 + SH_PFC_PIN_GROUP(msiof2_ss2_a), 4304 + SH_PFC_PIN_GROUP(msiof2_txd_a), 4305 + SH_PFC_PIN_GROUP(msiof2_rxd_a), 4306 + SH_PFC_PIN_GROUP(msiof2_clk_b), 4307 + SH_PFC_PIN_GROUP(msiof2_sync_b), 4308 + SH_PFC_PIN_GROUP(msiof2_ss1_b), 4309 + SH_PFC_PIN_GROUP(msiof2_ss2_b), 4310 + SH_PFC_PIN_GROUP(msiof2_txd_b), 4311 + SH_PFC_PIN_GROUP(msiof2_rxd_b), 4312 + SH_PFC_PIN_GROUP(msiof2_clk_c), 4313 + SH_PFC_PIN_GROUP(msiof2_sync_c), 4314 + SH_PFC_PIN_GROUP(msiof2_ss1_c), 4315 + SH_PFC_PIN_GROUP(msiof2_ss2_c), 4316 + SH_PFC_PIN_GROUP(msiof2_txd_c), 4317 + SH_PFC_PIN_GROUP(msiof2_rxd_c), 4318 + SH_PFC_PIN_GROUP(msiof2_clk_d), 4319 + SH_PFC_PIN_GROUP(msiof2_sync_d), 4320 + SH_PFC_PIN_GROUP(msiof2_ss1_d), 4321 + SH_PFC_PIN_GROUP(msiof2_ss2_d), 4322 + SH_PFC_PIN_GROUP(msiof2_txd_d), 4323 + SH_PFC_PIN_GROUP(msiof2_rxd_d), 4324 + SH_PFC_PIN_GROUP(msiof3_clk_a), 4325 + SH_PFC_PIN_GROUP(msiof3_sync_a), 4326 + SH_PFC_PIN_GROUP(msiof3_ss1_a), 4327 + SH_PFC_PIN_GROUP(msiof3_ss2_a), 4328 + SH_PFC_PIN_GROUP(msiof3_txd_a), 4329 + SH_PFC_PIN_GROUP(msiof3_rxd_a), 4330 + SH_PFC_PIN_GROUP(msiof3_clk_b), 4331 + SH_PFC_PIN_GROUP(msiof3_sync_b), 4332 + SH_PFC_PIN_GROUP(msiof3_ss1_b), 4333 + SH_PFC_PIN_GROUP(msiof3_ss2_b), 4334 + SH_PFC_PIN_GROUP(msiof3_txd_b), 4335 + SH_PFC_PIN_GROUP(msiof3_rxd_b), 4336 + SH_PFC_PIN_GROUP(msiof3_clk_c), 4337 + SH_PFC_PIN_GROUP(msiof3_sync_c), 4338 + SH_PFC_PIN_GROUP(msiof3_txd_c), 4339 + SH_PFC_PIN_GROUP(msiof3_rxd_c), 4340 + SH_PFC_PIN_GROUP(msiof3_clk_d), 4341 + SH_PFC_PIN_GROUP(msiof3_sync_d), 4342 + SH_PFC_PIN_GROUP(msiof3_ss1_d), 4343 + SH_PFC_PIN_GROUP(msiof3_txd_d), 4344 + SH_PFC_PIN_GROUP(msiof3_rxd_d), 4345 + SH_PFC_PIN_GROUP(msiof3_clk_e), 4346 + SH_PFC_PIN_GROUP(msiof3_sync_e), 4347 + SH_PFC_PIN_GROUP(msiof3_ss1_e), 4348 + SH_PFC_PIN_GROUP(msiof3_ss2_e), 4349 + SH_PFC_PIN_GROUP(msiof3_txd_e), 4350 + SH_PFC_PIN_GROUP(msiof3_rxd_e), 4351 + SH_PFC_PIN_GROUP(pwm0), 4352 + SH_PFC_PIN_GROUP(pwm1_a), 4353 + SH_PFC_PIN_GROUP(pwm1_b), 4354 + SH_PFC_PIN_GROUP(pwm2_a), 4355 + SH_PFC_PIN_GROUP(pwm2_b), 4356 + SH_PFC_PIN_GROUP(pwm3_a), 4357 + SH_PFC_PIN_GROUP(pwm3_b), 4358 + SH_PFC_PIN_GROUP(pwm4_a), 4359 + SH_PFC_PIN_GROUP(pwm4_b), 4360 + SH_PFC_PIN_GROUP(pwm5_a), 4361 + SH_PFC_PIN_GROUP(pwm5_b), 4362 + SH_PFC_PIN_GROUP(pwm6_a), 4363 + SH_PFC_PIN_GROUP(pwm6_b), 4364 + SH_PFC_PIN_GROUP(sata0_devslp_a), 4365 + SH_PFC_PIN_GROUP(sata0_devslp_b), 4366 + SH_PFC_PIN_GROUP(scif0_data), 4367 + SH_PFC_PIN_GROUP(scif0_clk), 4368 + SH_PFC_PIN_GROUP(scif0_ctrl), 4369 + SH_PFC_PIN_GROUP(scif1_data_a), 4370 + SH_PFC_PIN_GROUP(scif1_clk), 4371 + SH_PFC_PIN_GROUP(scif1_ctrl), 4372 + SH_PFC_PIN_GROUP(scif1_data_b), 4373 + SH_PFC_PIN_GROUP(scif2_data_a), 4374 + SH_PFC_PIN_GROUP(scif2_clk), 4375 + SH_PFC_PIN_GROUP(scif2_data_b), 4376 + SH_PFC_PIN_GROUP(scif3_data_a), 4377 + SH_PFC_PIN_GROUP(scif3_clk), 4378 + SH_PFC_PIN_GROUP(scif3_ctrl), 4379 + SH_PFC_PIN_GROUP(scif3_data_b), 4380 + SH_PFC_PIN_GROUP(scif4_data_a), 4381 + SH_PFC_PIN_GROUP(scif4_clk_a), 4382 + SH_PFC_PIN_GROUP(scif4_ctrl_a), 4383 + SH_PFC_PIN_GROUP(scif4_data_b), 4384 + SH_PFC_PIN_GROUP(scif4_clk_b), 4385 + SH_PFC_PIN_GROUP(scif4_ctrl_b), 4386 + SH_PFC_PIN_GROUP(scif4_data_c), 4387 + SH_PFC_PIN_GROUP(scif4_clk_c), 4388 + SH_PFC_PIN_GROUP(scif4_ctrl_c), 4389 + SH_PFC_PIN_GROUP(scif5_data_a), 4390 + SH_PFC_PIN_GROUP(scif5_clk_a), 4391 + SH_PFC_PIN_GROUP(scif5_data_b), 4392 + SH_PFC_PIN_GROUP(scif5_clk_b), 4393 + SH_PFC_PIN_GROUP(scif_clk_a), 4394 + SH_PFC_PIN_GROUP(scif_clk_b), 4395 + SH_PFC_PIN_GROUP(sdhi0_data1), 4396 + SH_PFC_PIN_GROUP(sdhi0_data4), 4397 + SH_PFC_PIN_GROUP(sdhi0_ctrl), 4398 + SH_PFC_PIN_GROUP(sdhi0_cd), 4399 + SH_PFC_PIN_GROUP(sdhi0_wp), 4400 + SH_PFC_PIN_GROUP(sdhi1_data1), 4401 + SH_PFC_PIN_GROUP(sdhi1_data4), 4402 + SH_PFC_PIN_GROUP(sdhi1_ctrl), 4403 + SH_PFC_PIN_GROUP(sdhi1_cd), 4404 + SH_PFC_PIN_GROUP(sdhi1_wp), 4405 + SH_PFC_PIN_GROUP(sdhi2_data1), 4406 + SH_PFC_PIN_GROUP(sdhi2_data4), 4407 + SH_PFC_PIN_GROUP(sdhi2_data8), 4408 + SH_PFC_PIN_GROUP(sdhi2_ctrl), 4409 + SH_PFC_PIN_GROUP(sdhi2_cd_a), 4410 + SH_PFC_PIN_GROUP(sdhi2_wp_a), 4411 + SH_PFC_PIN_GROUP(sdhi2_cd_b), 4412 + SH_PFC_PIN_GROUP(sdhi2_wp_b), 4413 + SH_PFC_PIN_GROUP(sdhi2_ds), 4414 + SH_PFC_PIN_GROUP(sdhi3_data1), 4415 + SH_PFC_PIN_GROUP(sdhi3_data4), 4416 + SH_PFC_PIN_GROUP(sdhi3_data8), 4417 + SH_PFC_PIN_GROUP(sdhi3_ctrl), 4418 + SH_PFC_PIN_GROUP(sdhi3_cd), 4419 + SH_PFC_PIN_GROUP(sdhi3_wp), 4420 + SH_PFC_PIN_GROUP(sdhi3_ds), 4421 + SH_PFC_PIN_GROUP(ssi0_data), 4422 + SH_PFC_PIN_GROUP(ssi01239_ctrl), 4423 + SH_PFC_PIN_GROUP(ssi1_data_a), 4424 + SH_PFC_PIN_GROUP(ssi1_data_b), 4425 + SH_PFC_PIN_GROUP(ssi1_ctrl_a), 4426 + SH_PFC_PIN_GROUP(ssi1_ctrl_b), 4427 + SH_PFC_PIN_GROUP(ssi2_data_a), 4428 + SH_PFC_PIN_GROUP(ssi2_data_b), 4429 + SH_PFC_PIN_GROUP(ssi2_ctrl_a), 4430 + SH_PFC_PIN_GROUP(ssi2_ctrl_b), 4431 + SH_PFC_PIN_GROUP(ssi3_data), 4432 + SH_PFC_PIN_GROUP(ssi349_ctrl), 4433 + SH_PFC_PIN_GROUP(ssi4_data), 4434 + SH_PFC_PIN_GROUP(ssi4_ctrl), 4435 + SH_PFC_PIN_GROUP(ssi5_data), 4436 + SH_PFC_PIN_GROUP(ssi5_ctrl), 4437 + SH_PFC_PIN_GROUP(ssi6_data), 4438 + SH_PFC_PIN_GROUP(ssi6_ctrl), 4439 + SH_PFC_PIN_GROUP(ssi7_data), 4440 + SH_PFC_PIN_GROUP(ssi78_ctrl), 4441 + SH_PFC_PIN_GROUP(ssi8_data), 4442 + SH_PFC_PIN_GROUP(ssi9_data_a), 4443 + SH_PFC_PIN_GROUP(ssi9_data_b), 4444 + SH_PFC_PIN_GROUP(ssi9_ctrl_a), 4445 + SH_PFC_PIN_GROUP(ssi9_ctrl_b), 4446 + SH_PFC_PIN_GROUP(tmu_tclk1_a), 4447 + SH_PFC_PIN_GROUP(tmu_tclk1_b), 4448 + SH_PFC_PIN_GROUP(tmu_tclk2_a), 4449 + SH_PFC_PIN_GROUP(tmu_tclk2_b), 4450 + SH_PFC_PIN_GROUP(tpu_to0), 4451 + SH_PFC_PIN_GROUP(tpu_to1), 4452 + SH_PFC_PIN_GROUP(tpu_to2), 4453 + SH_PFC_PIN_GROUP(tpu_to3), 4454 + SH_PFC_PIN_GROUP(usb0), 4455 + SH_PFC_PIN_GROUP(usb1), 4456 + SH_PFC_PIN_GROUP(usb2), 4457 + SH_PFC_PIN_GROUP(usb2_ch3), 4458 + SH_PFC_PIN_GROUP(usb30), 4459 + VIN_DATA_PIN_GROUP(vin4_data, 8, _a), 4460 + VIN_DATA_PIN_GROUP(vin4_data, 10, _a), 4461 + VIN_DATA_PIN_GROUP(vin4_data, 12, _a), 4462 + VIN_DATA_PIN_GROUP(vin4_data, 16, _a), 4463 + SH_PFC_PIN_GROUP(vin4_data18_a), 4464 + VIN_DATA_PIN_GROUP(vin4_data, 20, _a), 4465 + VIN_DATA_PIN_GROUP(vin4_data, 24, _a), 4466 + VIN_DATA_PIN_GROUP(vin4_data, 8, _b), 4467 + VIN_DATA_PIN_GROUP(vin4_data, 10, _b), 4468 + VIN_DATA_PIN_GROUP(vin4_data, 12, _b), 4469 + VIN_DATA_PIN_GROUP(vin4_data, 16, _b), 4470 + SH_PFC_PIN_GROUP(vin4_data18_b), 4471 + VIN_DATA_PIN_GROUP(vin4_data, 20, _b), 4472 + VIN_DATA_PIN_GROUP(vin4_data, 24, _b), 4473 + SH_PFC_PIN_GROUP(vin4_sync), 4474 + SH_PFC_PIN_GROUP(vin4_field), 4475 + SH_PFC_PIN_GROUP(vin4_clkenb), 4476 + SH_PFC_PIN_GROUP(vin4_clk), 4477 + VIN_DATA_PIN_GROUP(vin5_data, 8), 4478 + VIN_DATA_PIN_GROUP(vin5_data, 10), 4479 + VIN_DATA_PIN_GROUP(vin5_data, 12), 4480 + VIN_DATA_PIN_GROUP(vin5_data, 16), 4481 + SH_PFC_PIN_GROUP(vin5_sync), 4482 + SH_PFC_PIN_GROUP(vin5_field), 4483 + SH_PFC_PIN_GROUP(vin5_clkenb), 4484 + SH_PFC_PIN_GROUP(vin5_clk), 4485 + }, 4486 + .automotive = { 4487 + SH_PFC_PIN_GROUP(drif0_ctrl_a), 4488 + SH_PFC_PIN_GROUP(drif0_data0_a), 4489 + SH_PFC_PIN_GROUP(drif0_data1_a), 4490 + SH_PFC_PIN_GROUP(drif0_ctrl_b), 4491 + SH_PFC_PIN_GROUP(drif0_data0_b), 4492 + SH_PFC_PIN_GROUP(drif0_data1_b), 4493 + SH_PFC_PIN_GROUP(drif0_ctrl_c), 4494 + SH_PFC_PIN_GROUP(drif0_data0_c), 4495 + SH_PFC_PIN_GROUP(drif0_data1_c), 4496 + SH_PFC_PIN_GROUP(drif1_ctrl_a), 4497 + SH_PFC_PIN_GROUP(drif1_data0_a), 4498 + SH_PFC_PIN_GROUP(drif1_data1_a), 4499 + SH_PFC_PIN_GROUP(drif1_ctrl_b), 4500 + SH_PFC_PIN_GROUP(drif1_data0_b), 4501 + SH_PFC_PIN_GROUP(drif1_data1_b), 4502 + SH_PFC_PIN_GROUP(drif1_ctrl_c), 4503 + SH_PFC_PIN_GROUP(drif1_data0_c), 4504 + SH_PFC_PIN_GROUP(drif1_data1_c), 4505 + SH_PFC_PIN_GROUP(drif2_ctrl_a), 4506 + SH_PFC_PIN_GROUP(drif2_data0_a), 4507 + SH_PFC_PIN_GROUP(drif2_data1_a), 4508 + SH_PFC_PIN_GROUP(drif2_ctrl_b), 4509 + SH_PFC_PIN_GROUP(drif2_data0_b), 4510 + SH_PFC_PIN_GROUP(drif2_data1_b), 4511 + SH_PFC_PIN_GROUP(drif3_ctrl_a), 4512 + SH_PFC_PIN_GROUP(drif3_data0_a), 4513 + SH_PFC_PIN_GROUP(drif3_data1_a), 4514 + SH_PFC_PIN_GROUP(drif3_ctrl_b), 4515 + SH_PFC_PIN_GROUP(drif3_data0_b), 4516 + SH_PFC_PIN_GROUP(drif3_data1_b), 4517 + } 4518 + 4511 4519 }; 4512 4520 4513 4521 static const char * const audio_clk_groups[] = { ··· 5039 5031 "vin5_clk", 5040 5032 }; 5041 5033 5042 - static const struct sh_pfc_function pinmux_functions[] = { 5043 - SH_PFC_FUNCTION(audio_clk), 5044 - SH_PFC_FUNCTION(avb), 5045 - SH_PFC_FUNCTION(can0), 5046 - SH_PFC_FUNCTION(can1), 5047 - SH_PFC_FUNCTION(can_clk), 5048 - SH_PFC_FUNCTION(canfd0), 5049 - SH_PFC_FUNCTION(canfd1), 5050 - SH_PFC_FUNCTION(drif0), 5051 - SH_PFC_FUNCTION(drif1), 5052 - SH_PFC_FUNCTION(drif2), 5053 - SH_PFC_FUNCTION(drif3), 5054 - SH_PFC_FUNCTION(du), 5055 - SH_PFC_FUNCTION(hscif0), 5056 - SH_PFC_FUNCTION(hscif1), 5057 - SH_PFC_FUNCTION(hscif2), 5058 - SH_PFC_FUNCTION(hscif3), 5059 - SH_PFC_FUNCTION(hscif4), 5060 - SH_PFC_FUNCTION(i2c0), 5061 - SH_PFC_FUNCTION(i2c1), 5062 - SH_PFC_FUNCTION(i2c2), 5063 - SH_PFC_FUNCTION(i2c3), 5064 - SH_PFC_FUNCTION(i2c5), 5065 - SH_PFC_FUNCTION(i2c6), 5066 - SH_PFC_FUNCTION(intc_ex), 5067 - SH_PFC_FUNCTION(msiof0), 5068 - SH_PFC_FUNCTION(msiof1), 5069 - SH_PFC_FUNCTION(msiof2), 5070 - SH_PFC_FUNCTION(msiof3), 5071 - SH_PFC_FUNCTION(pwm0), 5072 - SH_PFC_FUNCTION(pwm1), 5073 - SH_PFC_FUNCTION(pwm2), 5074 - SH_PFC_FUNCTION(pwm3), 5075 - SH_PFC_FUNCTION(pwm4), 5076 - SH_PFC_FUNCTION(pwm5), 5077 - SH_PFC_FUNCTION(pwm6), 5078 - SH_PFC_FUNCTION(sata0), 5079 - SH_PFC_FUNCTION(scif0), 5080 - SH_PFC_FUNCTION(scif1), 5081 - SH_PFC_FUNCTION(scif2), 5082 - SH_PFC_FUNCTION(scif3), 5083 - SH_PFC_FUNCTION(scif4), 5084 - SH_PFC_FUNCTION(scif5), 5085 - SH_PFC_FUNCTION(scif_clk), 5086 - SH_PFC_FUNCTION(sdhi0), 5087 - SH_PFC_FUNCTION(sdhi1), 5088 - SH_PFC_FUNCTION(sdhi2), 5089 - SH_PFC_FUNCTION(sdhi3), 5090 - SH_PFC_FUNCTION(ssi), 5091 - SH_PFC_FUNCTION(tmu), 5092 - SH_PFC_FUNCTION(tpu), 5093 - SH_PFC_FUNCTION(usb0), 5094 - SH_PFC_FUNCTION(usb1), 5095 - SH_PFC_FUNCTION(usb2), 5096 - SH_PFC_FUNCTION(usb2_ch3), 5097 - SH_PFC_FUNCTION(usb30), 5098 - SH_PFC_FUNCTION(vin4), 5099 - SH_PFC_FUNCTION(vin5), 5034 + static const struct { 5035 + struct sh_pfc_function common[53]; 5036 + struct sh_pfc_function automotive[4]; 5037 + } pinmux_functions = { 5038 + .common = { 5039 + SH_PFC_FUNCTION(audio_clk), 5040 + SH_PFC_FUNCTION(avb), 5041 + SH_PFC_FUNCTION(can0), 5042 + SH_PFC_FUNCTION(can1), 5043 + SH_PFC_FUNCTION(can_clk), 5044 + SH_PFC_FUNCTION(canfd0), 5045 + SH_PFC_FUNCTION(canfd1), 5046 + SH_PFC_FUNCTION(du), 5047 + SH_PFC_FUNCTION(hscif0), 5048 + SH_PFC_FUNCTION(hscif1), 5049 + SH_PFC_FUNCTION(hscif2), 5050 + SH_PFC_FUNCTION(hscif3), 5051 + SH_PFC_FUNCTION(hscif4), 5052 + SH_PFC_FUNCTION(i2c0), 5053 + SH_PFC_FUNCTION(i2c1), 5054 + SH_PFC_FUNCTION(i2c2), 5055 + SH_PFC_FUNCTION(i2c3), 5056 + SH_PFC_FUNCTION(i2c5), 5057 + SH_PFC_FUNCTION(i2c6), 5058 + SH_PFC_FUNCTION(intc_ex), 5059 + SH_PFC_FUNCTION(msiof0), 5060 + SH_PFC_FUNCTION(msiof1), 5061 + SH_PFC_FUNCTION(msiof2), 5062 + SH_PFC_FUNCTION(msiof3), 5063 + SH_PFC_FUNCTION(pwm0), 5064 + SH_PFC_FUNCTION(pwm1), 5065 + SH_PFC_FUNCTION(pwm2), 5066 + SH_PFC_FUNCTION(pwm3), 5067 + SH_PFC_FUNCTION(pwm4), 5068 + SH_PFC_FUNCTION(pwm5), 5069 + SH_PFC_FUNCTION(pwm6), 5070 + SH_PFC_FUNCTION(sata0), 5071 + SH_PFC_FUNCTION(scif0), 5072 + SH_PFC_FUNCTION(scif1), 5073 + SH_PFC_FUNCTION(scif2), 5074 + SH_PFC_FUNCTION(scif3), 5075 + SH_PFC_FUNCTION(scif4), 5076 + SH_PFC_FUNCTION(scif5), 5077 + SH_PFC_FUNCTION(scif_clk), 5078 + SH_PFC_FUNCTION(sdhi0), 5079 + SH_PFC_FUNCTION(sdhi1), 5080 + SH_PFC_FUNCTION(sdhi2), 5081 + SH_PFC_FUNCTION(sdhi3), 5082 + SH_PFC_FUNCTION(ssi), 5083 + SH_PFC_FUNCTION(tmu), 5084 + SH_PFC_FUNCTION(tpu), 5085 + SH_PFC_FUNCTION(usb0), 5086 + SH_PFC_FUNCTION(usb1), 5087 + SH_PFC_FUNCTION(usb2), 5088 + SH_PFC_FUNCTION(usb2_ch3), 5089 + SH_PFC_FUNCTION(usb30), 5090 + SH_PFC_FUNCTION(vin4), 5091 + SH_PFC_FUNCTION(vin5), 5092 + }, 5093 + .automotive = { 5094 + SH_PFC_FUNCTION(drif0), 5095 + SH_PFC_FUNCTION(drif1), 5096 + SH_PFC_FUNCTION(drif2), 5097 + SH_PFC_FUNCTION(drif3), 5098 + } 5099 + 5100 5100 }; 5101 5101 5102 5102 static const struct pinmux_cfg_reg pinmux_config_regs[] = { ··· 5793 5777 { PIN_DU_DOTCLKIN1, 0, 2 }, /* DU_DOTCLKIN1 */ 5794 5778 } }, 5795 5779 { PINMUX_DRIVE_REG("DRVCTRL12", 0xe6060330) { 5780 + #ifdef CONFIG_PINCTRL_PFC_R8A77951 5796 5781 { PIN_DU_DOTCLKIN2, 28, 2 }, /* DU_DOTCLKIN2 */ 5782 + #endif 5797 5783 { PIN_DU_DOTCLKIN3, 24, 2 }, /* DU_DOTCLKIN3 */ 5798 5784 { PIN_FSCLKST_N, 20, 2 }, /* FSCLKST# */ 5799 5785 { PIN_TMS, 4, 2 }, /* TMS */ ··· 5916 5898 { RCAR_GP_PIN(6, 27), 20, 3 }, /* USB1_OVC */ 5917 5899 { RCAR_GP_PIN(6, 28), 16, 3 }, /* USB30_PWEN */ 5918 5900 { RCAR_GP_PIN(6, 29), 12, 3 }, /* USB30_OVC */ 5919 - { RCAR_GP_PIN(6, 30), 8, 3 }, /* USB2_CH3_PWEN */ 5920 - { RCAR_GP_PIN(6, 31), 4, 3 }, /* USB2_CH3_OVC */ 5901 + { RCAR_GP_PIN(6, 30), 8, 3 }, /* GP6_30/USB2_CH3_PWEN */ 5902 + { RCAR_GP_PIN(6, 31), 4, 3 }, /* GP6_31/USB2_CH3_OVC */ 5921 5903 } }, 5922 5904 { }, 5923 5905 }; ··· 6238 6220 .set_bias = r8a77951_pinmux_set_bias, 6239 6221 }; 6240 6222 6241 - const struct sh_pfc_soc_info r8a77951_pinmux_info = { 6242 - .name = "r8a77951_pfc", 6223 + #ifdef CONFIG_PINCTRL_PFC_R8A774E1 6224 + const struct sh_pfc_soc_info r8a774e1_pinmux_info = { 6225 + .name = "r8a774e1_pfc", 6243 6226 .ops = &r8a77951_pinmux_ops, 6244 6227 .unlock_reg = 0xe6060000, /* PMMR */ 6245 6228 ··· 6248 6229 6249 6230 .pins = pinmux_pins, 6250 6231 .nr_pins = ARRAY_SIZE(pinmux_pins), 6251 - .groups = pinmux_groups, 6252 - .nr_groups = ARRAY_SIZE(pinmux_groups), 6253 - .functions = pinmux_functions, 6254 - .nr_functions = ARRAY_SIZE(pinmux_functions), 6232 + .groups = pinmux_groups.common, 6233 + .nr_groups = ARRAY_SIZE(pinmux_groups.common), 6234 + .functions = pinmux_functions.common, 6235 + .nr_functions = ARRAY_SIZE(pinmux_functions.common), 6255 6236 6256 6237 .cfg_regs = pinmux_config_regs, 6257 6238 .drive_regs = pinmux_drive_regs, ··· 6261 6242 .pinmux_data = pinmux_data, 6262 6243 .pinmux_data_size = ARRAY_SIZE(pinmux_data), 6263 6244 }; 6245 + #endif 6246 + 6247 + #ifdef CONFIG_PINCTRL_PFC_R8A77951 6248 + const struct sh_pfc_soc_info r8a77951_pinmux_info = { 6249 + .name = "r8a77951_pfc", 6250 + .ops = &r8a77951_pinmux_ops, 6251 + .unlock_reg = 0xe6060000, /* PMMR */ 6252 + 6253 + .function = { PINMUX_FUNCTION_BEGIN, PINMUX_FUNCTION_END }, 6254 + 6255 + .pins = pinmux_pins, 6256 + .nr_pins = ARRAY_SIZE(pinmux_pins), 6257 + .groups = pinmux_groups.common, 6258 + .nr_groups = ARRAY_SIZE(pinmux_groups.common) + 6259 + ARRAY_SIZE(pinmux_groups.automotive), 6260 + .functions = pinmux_functions.common, 6261 + .nr_functions = ARRAY_SIZE(pinmux_functions.common) + 6262 + ARRAY_SIZE(pinmux_functions.automotive), 6263 + 6264 + .cfg_regs = pinmux_config_regs, 6265 + .drive_regs = pinmux_drive_regs, 6266 + .bias_regs = pinmux_bias_regs, 6267 + .ioctrl_regs = pinmux_ioctrl_regs, 6268 + 6269 + .pinmux_data = pinmux_data, 6270 + .pinmux_data_size = ARRAY_SIZE(pinmux_data), 6271 + }; 6272 + #endif
+76
drivers/pinctrl/sh-pfc/pfc-r8a77970.c
··· 1416 1416 QSPI1_IO2_MARK, QSPI1_IO3_MARK 1417 1417 }; 1418 1418 1419 + /* - RPC -------------------------------------------------------------------- */ 1420 + static const unsigned int rpc_clk1_pins[] = { 1421 + /* Octal-SPI flash: C/SCLK */ 1422 + RCAR_GP_PIN(5, 0), 1423 + }; 1424 + static const unsigned int rpc_clk1_mux[] = { 1425 + QSPI0_SPCLK_MARK, 1426 + }; 1427 + static const unsigned int rpc_clk2_pins[] = { 1428 + /* HyperFlash: CK, CK# */ 1429 + RCAR_GP_PIN(5, 0), RCAR_GP_PIN(5, 6), 1430 + }; 1431 + static const unsigned int rpc_clk2_mux[] = { 1432 + QSPI0_SPCLK_MARK, QSPI1_SPCLK_MARK, 1433 + }; 1434 + static const unsigned int rpc_ctrl_pins[] = { 1435 + /* Octal-SPI flash: S#/CS, DQS */ 1436 + /* HyperFlash: CS#, RDS */ 1437 + RCAR_GP_PIN(5, 5), RCAR_GP_PIN(5, 11), 1438 + }; 1439 + static const unsigned int rpc_ctrl_mux[] = { 1440 + QSPI0_SSL_MARK, QSPI1_SSL_MARK, 1441 + }; 1442 + static const unsigned int rpc_data_pins[] = { 1443 + /* DQ[0:7] */ 1444 + RCAR_GP_PIN(5, 1), RCAR_GP_PIN(5, 2), 1445 + RCAR_GP_PIN(5, 3), RCAR_GP_PIN(5, 4), 1446 + RCAR_GP_PIN(5, 7), RCAR_GP_PIN(5, 8), 1447 + RCAR_GP_PIN(5, 9), RCAR_GP_PIN(5, 10), 1448 + }; 1449 + static const unsigned int rpc_data_mux[] = { 1450 + QSPI0_MOSI_IO0_MARK, QSPI0_MISO_IO1_MARK, 1451 + QSPI0_IO2_MARK, QSPI0_IO3_MARK, 1452 + QSPI1_MOSI_IO0_MARK, QSPI1_MISO_IO1_MARK, 1453 + QSPI1_IO2_MARK, QSPI1_IO3_MARK, 1454 + }; 1455 + static const unsigned int rpc_reset_pins[] = { 1456 + /* RPC_RESET# */ 1457 + RCAR_GP_PIN(5, 12), 1458 + }; 1459 + static const unsigned int rpc_reset_mux[] = { 1460 + RPC_RESET_N_MARK, 1461 + }; 1462 + static const unsigned int rpc_int_pins[] = { 1463 + /* RPC_INT# */ 1464 + RCAR_GP_PIN(5, 14), 1465 + }; 1466 + static const unsigned int rpc_int_mux[] = { 1467 + RPC_INT_N_MARK, 1468 + }; 1469 + static const unsigned int rpc_wp_pins[] = { 1470 + /* RPC_WP# */ 1471 + RCAR_GP_PIN(5, 13), 1472 + }; 1473 + static const unsigned int rpc_wp_mux[] = { 1474 + RPC_WP_N_MARK, 1475 + }; 1476 + 1419 1477 /* - SCIF Clock ------------------------------------------------------------- */ 1420 1478 static const unsigned int scif_clk_a_pins[] = { 1421 1479 /* SCIF_CLK */ ··· 1808 1750 SH_PFC_PIN_GROUP(qspi1_ctrl), 1809 1751 SH_PFC_PIN_GROUP(qspi1_data2), 1810 1752 SH_PFC_PIN_GROUP(qspi1_data4), 1753 + SH_PFC_PIN_GROUP(rpc_clk1), 1754 + SH_PFC_PIN_GROUP(rpc_clk2), 1755 + SH_PFC_PIN_GROUP(rpc_ctrl), 1756 + SH_PFC_PIN_GROUP(rpc_data), 1757 + SH_PFC_PIN_GROUP(rpc_reset), 1758 + SH_PFC_PIN_GROUP(rpc_int), 1759 + SH_PFC_PIN_GROUP(rpc_wp), 1811 1760 SH_PFC_PIN_GROUP(scif_clk_a), 1812 1761 SH_PFC_PIN_GROUP(scif_clk_b), 1813 1762 SH_PFC_PIN_GROUP(scif0_data), ··· 2019 1954 "qspi1_data4", 2020 1955 }; 2021 1956 1957 + static const char * const rpc_groups[] = { 1958 + "rpc_clk1", 1959 + "rpc_clk2", 1960 + "rpc_ctrl", 1961 + "rpc_data", 1962 + "rpc_reset", 1963 + "rpc_int", 1964 + "rpc_wp", 1965 + }; 1966 + 2022 1967 static const char * const scif_clk_groups[] = { 2023 1968 "scif_clk_a", 2024 1969 "scif_clk_b", ··· 2114 2039 SH_PFC_FUNCTION(pwm4), 2115 2040 SH_PFC_FUNCTION(qspi0), 2116 2041 SH_PFC_FUNCTION(qspi1), 2042 + SH_PFC_FUNCTION(rpc), 2117 2043 SH_PFC_FUNCTION(scif_clk), 2118 2044 SH_PFC_FUNCTION(scif0), 2119 2045 SH_PFC_FUNCTION(scif1),
+76
drivers/pinctrl/sh-pfc/pfc-r8a77980.c
··· 1710 1710 QSPI1_IO2_MARK, QSPI1_IO3_MARK 1711 1711 }; 1712 1712 1713 + /* - RPC -------------------------------------------------------------------- */ 1714 + static const unsigned int rpc_clk1_pins[] = { 1715 + /* Octal-SPI flash: C/SCLK */ 1716 + RCAR_GP_PIN(5, 0), 1717 + }; 1718 + static const unsigned int rpc_clk1_mux[] = { 1719 + QSPI0_SPCLK_MARK, 1720 + }; 1721 + static const unsigned int rpc_clk2_pins[] = { 1722 + /* HyperFlash: CK, CK# */ 1723 + RCAR_GP_PIN(5, 0), RCAR_GP_PIN(5, 6), 1724 + }; 1725 + static const unsigned int rpc_clk2_mux[] = { 1726 + QSPI0_SPCLK_MARK, QSPI1_SPCLK_MARK, 1727 + }; 1728 + static const unsigned int rpc_ctrl_pins[] = { 1729 + /* Octal-SPI flash: S#/CS, DQS */ 1730 + /* HyperFlash: CS#, RDS */ 1731 + RCAR_GP_PIN(5, 5), RCAR_GP_PIN(5, 11), 1732 + }; 1733 + static const unsigned int rpc_ctrl_mux[] = { 1734 + QSPI0_SSL_MARK, QSPI1_SSL_MARK, 1735 + }; 1736 + static const unsigned int rpc_data_pins[] = { 1737 + /* DQ[0:7] */ 1738 + RCAR_GP_PIN(5, 1), RCAR_GP_PIN(5, 2), 1739 + RCAR_GP_PIN(5, 3), RCAR_GP_PIN(5, 4), 1740 + RCAR_GP_PIN(5, 7), RCAR_GP_PIN(5, 8), 1741 + RCAR_GP_PIN(5, 9), RCAR_GP_PIN(5, 10), 1742 + }; 1743 + static const unsigned int rpc_data_mux[] = { 1744 + QSPI0_MOSI_IO0_MARK, QSPI0_MISO_IO1_MARK, 1745 + QSPI0_IO2_MARK, QSPI0_IO3_MARK, 1746 + QSPI1_MOSI_IO0_MARK, QSPI1_MISO_IO1_MARK, 1747 + QSPI1_IO2_MARK, QSPI1_IO3_MARK, 1748 + }; 1749 + static const unsigned int rpc_reset_pins[] = { 1750 + /* RPC_RESET# */ 1751 + RCAR_GP_PIN(5, 12), 1752 + }; 1753 + static const unsigned int rpc_reset_mux[] = { 1754 + RPC_RESET_N_MARK, 1755 + }; 1756 + static const unsigned int rpc_int_pins[] = { 1757 + /* RPC_INT# */ 1758 + RCAR_GP_PIN(5, 14), 1759 + }; 1760 + static const unsigned int rpc_int_mux[] = { 1761 + RPC_INT_N_MARK, 1762 + }; 1763 + static const unsigned int rpc_wp_pins[] = { 1764 + /* RPC_WP# */ 1765 + RCAR_GP_PIN(5, 13), 1766 + }; 1767 + static const unsigned int rpc_wp_mux[] = { 1768 + RPC_WP_N_MARK, 1769 + }; 1770 + 1713 1771 /* - SCIF0 ------------------------------------------------------------------ */ 1714 1772 static const unsigned int scif0_data_pins[] = { 1715 1773 /* RX0, TX0 */ ··· 2184 2126 SH_PFC_PIN_GROUP(qspi1_ctrl), 2185 2127 SH_PFC_PIN_GROUP(qspi1_data2), 2186 2128 SH_PFC_PIN_GROUP(qspi1_data4), 2129 + SH_PFC_PIN_GROUP(rpc_clk1), 2130 + SH_PFC_PIN_GROUP(rpc_clk2), 2131 + SH_PFC_PIN_GROUP(rpc_ctrl), 2132 + SH_PFC_PIN_GROUP(rpc_data), 2133 + SH_PFC_PIN_GROUP(rpc_reset), 2134 + SH_PFC_PIN_GROUP(rpc_int), 2135 + SH_PFC_PIN_GROUP(rpc_wp), 2187 2136 SH_PFC_PIN_GROUP(scif0_data), 2188 2137 SH_PFC_PIN_GROUP(scif0_clk), 2189 2138 SH_PFC_PIN_GROUP(scif0_ctrl), ··· 2427 2362 "qspi1_data4", 2428 2363 }; 2429 2364 2365 + static const char * const rpc_groups[] = { 2366 + "rpc_clk1", 2367 + "rpc_clk2", 2368 + "rpc_ctrl", 2369 + "rpc_data", 2370 + "rpc_reset", 2371 + "rpc_int", 2372 + "rpc_wp", 2373 + }; 2374 + 2430 2375 static const char * const scif0_groups[] = { 2431 2376 "scif0_data", 2432 2377 "scif0_clk", ··· 2535 2460 SH_PFC_FUNCTION(pwm4), 2536 2461 SH_PFC_FUNCTION(qspi0), 2537 2462 SH_PFC_FUNCTION(qspi1), 2463 + SH_PFC_FUNCTION(rpc), 2538 2464 SH_PFC_FUNCTION(scif0), 2539 2465 SH_PFC_FUNCTION(scif1), 2540 2466 SH_PFC_FUNCTION(scif3),
+1
drivers/pinctrl/sh-pfc/sh_pfc.h
··· 312 312 extern const struct sh_pfc_soc_info r8a774a1_pinmux_info; 313 313 extern const struct sh_pfc_soc_info r8a774b1_pinmux_info; 314 314 extern const struct sh_pfc_soc_info r8a774c0_pinmux_info; 315 + extern const struct sh_pfc_soc_info r8a774e1_pinmux_info; 315 316 extern const struct sh_pfc_soc_info r8a7778_pinmux_info; 316 317 extern const struct sh_pfc_soc_info r8a7779_pinmux_info; 317 318 extern const struct sh_pfc_soc_info r8a7790_pinmux_info;
+9 -12
drivers/pinctrl/sirf/pinctrl-atlas7.c
··· 169 169 170 170 /** 171 171 * struct atlas7_pad_conf - Atlas7 Pad Configuration 172 - * @id The ID of this Pad. 172 + * @id: The ID of this Pad. 173 173 * @type: The type of this Pad. 174 174 * @mux_reg: The mux register offset. 175 175 * This register contains the mux. ··· 210 210 .ad_ctrl_bit = adb, \ 211 211 } 212 212 213 - /** 213 + /* 214 214 * struct atlas7_pad_status - Atlas7 Pad status 215 215 */ 216 216 struct atlas7_pad_status { ··· 355 355 struct atlas7_gpio_bank banks[]; 356 356 }; 357 357 358 - /** 359 - * @dev: a pointer back to containing device 360 - * @virtbase: the offset to the controller in virtual memory 361 - */ 362 358 struct atlas7_pmx { 363 359 struct device *dev; 364 360 struct pinctrl_dev *pctl; ··· 372 376 * refer to A7DA IO Summary - CS-314158-DD-4E.xls 373 377 */ 374 378 375 - /*Pads in IOC RTC & TOP */ 379 + /* Pads in IOC RTC & TOP */ 376 380 static const struct pinctrl_pin_desc atlas7_ioc_pads[] = { 377 381 /* RTC PADs */ 378 382 PINCTRL_PIN(0, "rtc_gpio_0"), ··· 4777 4781 4778 4782 /** 4779 4783 * struct atlas7_pull_info - Atlas7 Pad pull info 4780 - * @type:The type of this Pad. 4781 - * @mask:The mas value of this pin's pull bits. 4782 - * @v2s: The map of pull register value to pull status. 4783 - * @s2v: The map of pull status to pull register value. 4784 + * @pad_type: The type of this Pad. 4785 + * @mask: The mas value of this pin's pull bits. 4786 + * @v2s: The map of pull register value to pull status. 4787 + * @s2v: The map of pull status to pull register value. 4784 4788 */ 4785 4789 struct atlas7_pull_info { 4786 4790 u8 pad_type; ··· 4904 4908 * @type: The type of this Pad. 4905 4909 * @mask: The mask value of this pin's pull bits. 4906 4910 * @imval: The immediate value of drives trength register. 4911 + * @reserved: Reserved space 4907 4912 */ 4908 4913 struct atlas7_ds_info { 4909 4914 u8 type; ··· 5606 5609 arch_initcall(atlas7_pinmux_init); 5607 5610 5608 5611 5609 - /** 5612 + /* 5610 5613 * The Following is GPIO Code 5611 5614 */ 5612 5615 static inline struct
+89 -49
drivers/pinctrl/stm32/pinctrl-stm32.c
··· 64 64 #define gpio_range_to_bank(chip) \ 65 65 container_of(chip, struct stm32_gpio_bank, range) 66 66 67 - #define HWSPINLOCK_TIMEOUT 5 /* msec */ 67 + #define HWSPNLCK_TIMEOUT 1000 /* usec */ 68 68 69 69 static const char * const stm32_gpio_functions[] = { 70 70 "gpio", "af0", "af1", ··· 84 84 struct stm32_gpio_bank { 85 85 void __iomem *base; 86 86 struct clk *clk; 87 + struct reset_control *rstc; 87 88 spinlock_t lock; 88 89 struct gpio_chip gpio_chip; 89 90 struct pinctrl_gpio_range range; ··· 303 302 .direction_output = stm32_gpio_direction_output, 304 303 .to_irq = stm32_gpio_to_irq, 305 304 .get_direction = stm32_gpio_get_direction, 305 + .set_config = gpiochip_generic_config, 306 306 }; 307 307 308 308 static void stm32_gpio_irq_trigger(struct irq_data *d) ··· 422 420 * to avoid overriding. 423 421 */ 424 422 spin_lock_irqsave(&pctl->irqmux_lock, flags); 425 - if (pctl->hwlock) 426 - ret = hwspin_lock_timeout(pctl->hwlock, HWSPINLOCK_TIMEOUT); 427 423 428 - if (ret) { 429 - dev_err(pctl->dev, "Can't get hwspinlock\n"); 430 - goto unlock; 424 + if (pctl->hwlock) { 425 + ret = hwspin_lock_timeout_in_atomic(pctl->hwlock, 426 + HWSPNLCK_TIMEOUT); 427 + if (ret) { 428 + dev_err(pctl->dev, "Can't get hwspinlock\n"); 429 + goto unlock; 430 + } 431 431 } 432 432 433 433 if (pctl->irqmux_map & BIT(irq_data->hwirq)) { ··· 437 433 irq_data->hwirq); 438 434 ret = -EBUSY; 439 435 if (pctl->hwlock) 440 - hwspin_unlock(pctl->hwlock); 436 + hwspin_unlock_in_atomic(pctl->hwlock); 441 437 goto unlock; 442 438 } else { 443 439 pctl->irqmux_map |= BIT(irq_data->hwirq); ··· 446 442 regmap_field_write(pctl->irqmux[irq_data->hwirq], bank->bank_ioport_nr); 447 443 448 444 if (pctl->hwlock) 449 - hwspin_unlock(pctl->hwlock); 445 + hwspin_unlock_in_atomic(pctl->hwlock); 450 446 451 447 unlock: 452 448 spin_unlock_irqrestore(&pctl->irqmux_lock, flags); ··· 754 750 clk_enable(bank->clk); 755 751 spin_lock_irqsave(&bank->lock, flags); 756 752 757 - if (pctl->hwlock) 758 - err = hwspin_lock_timeout(pctl->hwlock, HWSPINLOCK_TIMEOUT); 759 - 760 - if (err) { 761 - dev_err(pctl->dev, "Can't get hwspinlock\n"); 762 - goto unlock; 753 + if (pctl->hwlock) { 754 + err = hwspin_lock_timeout_in_atomic(pctl->hwlock, 755 + HWSPNLCK_TIMEOUT); 756 + if (err) { 757 + dev_err(pctl->dev, "Can't get hwspinlock\n"); 758 + goto unlock; 759 + } 763 760 } 764 761 765 762 val = readl_relaxed(bank->base + alt_offset); ··· 774 769 writel_relaxed(val, bank->base + STM32_GPIO_MODER); 775 770 776 771 if (pctl->hwlock) 777 - hwspin_unlock(pctl->hwlock); 772 + hwspin_unlock_in_atomic(pctl->hwlock); 778 773 779 774 stm32_gpio_backup_mode(bank, pin, mode, alt); 780 775 ··· 874 869 clk_enable(bank->clk); 875 870 spin_lock_irqsave(&bank->lock, flags); 876 871 877 - if (pctl->hwlock) 878 - err = hwspin_lock_timeout(pctl->hwlock, HWSPINLOCK_TIMEOUT); 879 - 880 - if (err) { 881 - dev_err(pctl->dev, "Can't get hwspinlock\n"); 882 - goto unlock; 872 + if (pctl->hwlock) { 873 + err = hwspin_lock_timeout_in_atomic(pctl->hwlock, 874 + HWSPNLCK_TIMEOUT); 875 + if (err) { 876 + dev_err(pctl->dev, "Can't get hwspinlock\n"); 877 + goto unlock; 878 + } 883 879 } 884 880 885 881 val = readl_relaxed(bank->base + STM32_GPIO_TYPER); ··· 889 883 writel_relaxed(val, bank->base + STM32_GPIO_TYPER); 890 884 891 885 if (pctl->hwlock) 892 - hwspin_unlock(pctl->hwlock); 886 + hwspin_unlock_in_atomic(pctl->hwlock); 893 887 894 888 stm32_gpio_backup_driving(bank, offset, drive); 895 889 ··· 929 923 clk_enable(bank->clk); 930 924 spin_lock_irqsave(&bank->lock, flags); 931 925 932 - if (pctl->hwlock) 933 - err = hwspin_lock_timeout(pctl->hwlock, HWSPINLOCK_TIMEOUT); 934 - 935 - if (err) { 936 - dev_err(pctl->dev, "Can't get hwspinlock\n"); 937 - goto unlock; 926 + if (pctl->hwlock) { 927 + err = hwspin_lock_timeout_in_atomic(pctl->hwlock, 928 + HWSPNLCK_TIMEOUT); 929 + if (err) { 930 + dev_err(pctl->dev, "Can't get hwspinlock\n"); 931 + goto unlock; 932 + } 938 933 } 939 934 940 935 val = readl_relaxed(bank->base + STM32_GPIO_SPEEDR); ··· 944 937 writel_relaxed(val, bank->base + STM32_GPIO_SPEEDR); 945 938 946 939 if (pctl->hwlock) 947 - hwspin_unlock(pctl->hwlock); 940 + hwspin_unlock_in_atomic(pctl->hwlock); 948 941 949 942 stm32_gpio_backup_speed(bank, offset, speed); 950 943 ··· 984 977 clk_enable(bank->clk); 985 978 spin_lock_irqsave(&bank->lock, flags); 986 979 987 - if (pctl->hwlock) 988 - err = hwspin_lock_timeout(pctl->hwlock, HWSPINLOCK_TIMEOUT); 989 - 990 - if (err) { 991 - dev_err(pctl->dev, "Can't get hwspinlock\n"); 992 - goto unlock; 980 + if (pctl->hwlock) { 981 + err = hwspin_lock_timeout_in_atomic(pctl->hwlock, 982 + HWSPNLCK_TIMEOUT); 983 + if (err) { 984 + dev_err(pctl->dev, "Can't get hwspinlock\n"); 985 + goto unlock; 986 + } 993 987 } 994 988 995 989 val = readl_relaxed(bank->base + STM32_GPIO_PUPDR); ··· 999 991 writel_relaxed(val, bank->base + STM32_GPIO_PUPDR); 1000 992 1001 993 if (pctl->hwlock) 1002 - hwspin_unlock(pctl->hwlock); 994 + hwspin_unlock_in_atomic(pctl->hwlock); 1003 995 1004 996 stm32_gpio_backup_bias(bank, offset, bias); 1005 997 ··· 1059 1051 struct stm32_gpio_bank *bank; 1060 1052 int offset, ret = 0; 1061 1053 1062 - range = pinctrl_find_gpio_range_from_pin(pctldev, pin); 1054 + range = pinctrl_find_gpio_range_from_pin_nolock(pctldev, pin); 1063 1055 if (!range) { 1064 1056 dev_err(pctl->dev, "No gpio range defined.\n"); 1065 1057 return -EINVAL; ··· 1092 1084 ret = stm32_pmx_gpio_set_direction(pctldev, range, pin, false); 1093 1085 break; 1094 1086 default: 1095 - ret = -EINVAL; 1087 + ret = -ENOTSUPP; 1096 1088 } 1097 1089 1098 1090 return ret; ··· 1117 1109 int i, ret; 1118 1110 1119 1111 for (i = 0; i < num_configs; i++) { 1112 + mutex_lock(&pctldev->mutex); 1120 1113 ret = stm32_pconf_parse_conf(pctldev, g->pin, 1121 1114 pinconf_to_config_param(configs[i]), 1122 1115 pinconf_to_config_argument(configs[i])); 1116 + mutex_unlock(&pctldev->mutex); 1123 1117 if (ret < 0) 1124 1118 return ret; 1125 1119 1126 1120 g->config = configs[i]; 1121 + } 1122 + 1123 + return 0; 1124 + } 1125 + 1126 + static int stm32_pconf_set(struct pinctrl_dev *pctldev, unsigned int pin, 1127 + unsigned long *configs, unsigned int num_configs) 1128 + { 1129 + int i, ret; 1130 + 1131 + for (i = 0; i < num_configs; i++) { 1132 + ret = stm32_pconf_parse_conf(pctldev, pin, 1133 + pinconf_to_config_param(configs[i]), 1134 + pinconf_to_config_argument(configs[i])); 1135 + if (ret < 0) 1136 + return ret; 1127 1137 } 1128 1138 1129 1139 return 0; ··· 1212 1186 } 1213 1187 } 1214 1188 1215 - 1216 1189 static const struct pinconf_ops stm32_pconf_ops = { 1217 1190 .pin_config_group_get = stm32_pconf_group_get, 1218 1191 .pin_config_group_set = stm32_pconf_group_set, 1192 + .pin_config_set = stm32_pconf_set, 1219 1193 .pin_config_dbg_show = stm32_pconf_dbg_show, 1220 1194 }; 1221 1195 ··· 1228 1202 struct of_phandle_args args; 1229 1203 struct device *dev = pctl->dev; 1230 1204 struct resource res; 1231 - struct reset_control *rstc; 1232 1205 int npins = STM32_GPIO_PINS_PER_BANK; 1233 1206 int bank_nr, err; 1234 1207 1235 - rstc = of_reset_control_get_exclusive(np, NULL); 1236 - if (!IS_ERR(rstc)) 1237 - reset_control_deassert(rstc); 1208 + if (!IS_ERR(bank->rstc)) 1209 + reset_control_deassert(bank->rstc); 1238 1210 1239 1211 if (of_address_to_resource(np, 0, &res)) 1240 1212 return -ENODEV; ··· 1240 1216 bank->base = devm_ioremap_resource(dev, &res); 1241 1217 if (IS_ERR(bank->base)) 1242 1218 return PTR_ERR(bank->base); 1243 - 1244 - bank->clk = of_clk_get_by_name(np, NULL); 1245 - if (IS_ERR(bank->clk)) { 1246 - dev_err(dev, "failed to get clk (%ld)\n", PTR_ERR(bank->clk)); 1247 - return PTR_ERR(bank->clk); 1248 - } 1249 1219 1250 1220 err = clk_prepare(bank->clk); 1251 1221 if (err) { ··· 1534 1516 GFP_KERNEL); 1535 1517 if (!pctl->banks) 1536 1518 return -ENOMEM; 1519 + 1520 + i = 0; 1521 + for_each_available_child_of_node(np, child) { 1522 + struct stm32_gpio_bank *bank = &pctl->banks[i]; 1523 + 1524 + if (of_property_read_bool(child, "gpio-controller")) { 1525 + bank->rstc = of_reset_control_get_exclusive(child, 1526 + NULL); 1527 + if (PTR_ERR(bank->rstc) == -EPROBE_DEFER) 1528 + return -EPROBE_DEFER; 1529 + 1530 + bank->clk = of_clk_get_by_name(child, NULL); 1531 + if (IS_ERR(bank->clk)) { 1532 + if (PTR_ERR(bank->clk) != -EPROBE_DEFER) 1533 + dev_err(dev, 1534 + "failed to get clk (%ld)\n", 1535 + PTR_ERR(bank->clk)); 1536 + return PTR_ERR(bank->clk); 1537 + } 1538 + i++; 1539 + } 1540 + } 1537 1541 1538 1542 for_each_available_child_of_node(np, child) { 1539 1543 if (of_property_read_bool(child, "gpio-controller")) {
-1
drivers/pinctrl/tegra/pinctrl-tegra194.c
··· 98 98 .sfsel_bit = 10, \ 99 99 .schmitt_bit = schmitt_b, \ 100 100 .drvtype_bit = 13, \ 101 - .drv_reg = -1, \ 102 101 .parked_bitmask = 0 103 102 104 103 #define drive_pex_l5_clkreq_n_pgg0 \
+1 -1
drivers/pinctrl/ti/pinctrl-ti-iodelay.c
··· 2 2 * Support for configuration of IO Delay module found on Texas Instruments SoCs 3 3 * such as DRA7 4 4 * 5 - * Copyright (C) 2015-2017 Texas Instruments Incorporated - http://www.ti.com/ 5 + * Copyright (C) 2015-2017 Texas Instruments Incorporated - https://www.ti.com/ 6 6 * 7 7 * This file is licensed under the terms of the GNU General Public 8 8 * License version 2. This program is licensed "as is" without any
+1242
include/dt-bindings/pinctrl/mt6779-pinfunc.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 */ 2 + /* 3 + * Copyright (C) 2019 MediaTek Inc. 4 + * Author: Andy Teng <andy.teng@mediatek.com> 5 + * 6 + */ 7 + 8 + #ifndef __MT6779_PINFUNC_H 9 + #define __MT6779_PINFUNC_H 10 + 11 + #include <dt-bindings/pinctrl/mt65xx.h> 12 + 13 + #define PINMUX_GPIO0__FUNC_GPIO0 (MTK_PIN_NO(0) | 0) 14 + #define PINMUX_GPIO0__FUNC_SPI6_MI (MTK_PIN_NO(0) | 1) 15 + #define PINMUX_GPIO0__FUNC_I2S5_LRCK (MTK_PIN_NO(0) | 2) 16 + #define PINMUX_GPIO0__FUNC_TDM_LRCK_2ND (MTK_PIN_NO(0) | 3) 17 + #define PINMUX_GPIO0__FUNC_PCM1_SYNC (MTK_PIN_NO(0) | 4) 18 + #define PINMUX_GPIO0__FUNC_SCL_6306 (MTK_PIN_NO(0) | 5) 19 + #define PINMUX_GPIO0__FUNC_TP_GPIO0_AO (MTK_PIN_NO(0) | 6) 20 + #define PINMUX_GPIO0__FUNC_PTA_RXD (MTK_PIN_NO(0) | 7) 21 + 22 + #define PINMUX_GPIO1__FUNC_GPIO1 (MTK_PIN_NO(1) | 0) 23 + #define PINMUX_GPIO1__FUNC_SPI6_CSB (MTK_PIN_NO(1) | 1) 24 + #define PINMUX_GPIO1__FUNC_I2S5_DO (MTK_PIN_NO(1) | 2) 25 + #define PINMUX_GPIO1__FUNC_TDM_DATA0_2ND (MTK_PIN_NO(1) | 3) 26 + #define PINMUX_GPIO1__FUNC_PCM1_DO0 (MTK_PIN_NO(1) | 4) 27 + #define PINMUX_GPIO1__FUNC_SDA_6306 (MTK_PIN_NO(1) | 5) 28 + #define PINMUX_GPIO1__FUNC_TP_GPIO1_AO (MTK_PIN_NO(1) | 6) 29 + #define PINMUX_GPIO1__FUNC_PTA_TXD (MTK_PIN_NO(1) | 7) 30 + 31 + #define PINMUX_GPIO2__FUNC_GPIO2 (MTK_PIN_NO(2) | 0) 32 + #define PINMUX_GPIO2__FUNC_SPI6_MO (MTK_PIN_NO(2) | 1) 33 + #define PINMUX_GPIO2__FUNC_I2S5_BCK (MTK_PIN_NO(2) | 2) 34 + #define PINMUX_GPIO2__FUNC_TDM_BCK_2ND (MTK_PIN_NO(2) | 3) 35 + #define PINMUX_GPIO2__FUNC_PCM1_CLK (MTK_PIN_NO(2) | 4) 36 + #define PINMUX_GPIO2__FUNC_MD_INT1_C2K_UIM0_HOT_PLUG (MTK_PIN_NO(2) | 5) 37 + #define PINMUX_GPIO2__FUNC_TP_GPIO2_AO (MTK_PIN_NO(2) | 6) 38 + 39 + #define PINMUX_GPIO3__FUNC_GPIO3 (MTK_PIN_NO(3) | 0) 40 + #define PINMUX_GPIO3__FUNC_SPI6_CLK (MTK_PIN_NO(3) | 1) 41 + #define PINMUX_GPIO3__FUNC_I2S5_MCK (MTK_PIN_NO(3) | 2) 42 + #define PINMUX_GPIO3__FUNC_TDM_MCK_2ND (MTK_PIN_NO(3) | 3) 43 + #define PINMUX_GPIO3__FUNC_EXT_FRAME_SYNC (MTK_PIN_NO(3) | 4) 44 + #define PINMUX_GPIO3__FUNC_MD_INT2_C2K_UIM1_HOT_PLUG (MTK_PIN_NO(3) | 5) 45 + #define PINMUX_GPIO3__FUNC_TP_GPIO3_AO (MTK_PIN_NO(3) | 6) 46 + 47 + #define PINMUX_GPIO4__FUNC_GPIO4 (MTK_PIN_NO(4) | 0) 48 + #define PINMUX_GPIO4__FUNC_SPI7_MI (MTK_PIN_NO(4) | 1) 49 + #define PINMUX_GPIO4__FUNC_I2S0_MCK (MTK_PIN_NO(4) | 2) 50 + #define PINMUX_GPIO4__FUNC_TDM_DATA1_2ND (MTK_PIN_NO(4) | 3) 51 + #define PINMUX_GPIO4__FUNC_PCM1_DO1 (MTK_PIN_NO(4) | 4) 52 + #define PINMUX_GPIO4__FUNC_DMIC1_CLK (MTK_PIN_NO(4) | 5) 53 + #define PINMUX_GPIO4__FUNC_TP_GPIO4_AO (MTK_PIN_NO(4) | 6) 54 + #define PINMUX_GPIO4__FUNC_SCL8 (MTK_PIN_NO(4) | 7) 55 + 56 + #define PINMUX_GPIO5__FUNC_GPIO5 (MTK_PIN_NO(5) | 0) 57 + #define PINMUX_GPIO5__FUNC_SPI7_CSB (MTK_PIN_NO(5) | 1) 58 + #define PINMUX_GPIO5__FUNC_I2S0_BCK (MTK_PIN_NO(5) | 2) 59 + #define PINMUX_GPIO5__FUNC_TDM_DATA2_2ND (MTK_PIN_NO(5) | 3) 60 + #define PINMUX_GPIO5__FUNC_PCM1_DO2 (MTK_PIN_NO(5) | 4) 61 + #define PINMUX_GPIO5__FUNC_DMIC1_DAT (MTK_PIN_NO(5) | 5) 62 + #define PINMUX_GPIO5__FUNC_TP_GPIO5_AO (MTK_PIN_NO(5) | 6) 63 + #define PINMUX_GPIO5__FUNC_SDA8 (MTK_PIN_NO(5) | 7) 64 + 65 + #define PINMUX_GPIO6__FUNC_GPIO6 (MTK_PIN_NO(6) | 0) 66 + #define PINMUX_GPIO6__FUNC_SPI7_MO (MTK_PIN_NO(6) | 1) 67 + #define PINMUX_GPIO6__FUNC_I2S0_LRCK (MTK_PIN_NO(6) | 2) 68 + #define PINMUX_GPIO6__FUNC_TDM_DATA3_2ND (MTK_PIN_NO(6) | 3) 69 + #define PINMUX_GPIO6__FUNC_PCM1_DI (MTK_PIN_NO(6) | 4) 70 + #define PINMUX_GPIO6__FUNC_DMIC_CLK (MTK_PIN_NO(6) | 5) 71 + #define PINMUX_GPIO6__FUNC_TP_GPIO6_AO (MTK_PIN_NO(6) | 6) 72 + #define PINMUX_GPIO6__FUNC_SCL9 (MTK_PIN_NO(6) | 7) 73 + 74 + #define PINMUX_GPIO7__FUNC_GPIO7 (MTK_PIN_NO(7) | 0) 75 + #define PINMUX_GPIO7__FUNC_SPI7_CLK (MTK_PIN_NO(7) | 1) 76 + #define PINMUX_GPIO7__FUNC_I2S0_DI (MTK_PIN_NO(7) | 2) 77 + #define PINMUX_GPIO7__FUNC_SRCLKENAI1 (MTK_PIN_NO(7) | 3) 78 + #define PINMUX_GPIO7__FUNC_DVFSRC_EXT_REQ (MTK_PIN_NO(7) | 4) 79 + #define PINMUX_GPIO7__FUNC_DMIC_DAT (MTK_PIN_NO(7) | 5) 80 + #define PINMUX_GPIO7__FUNC_TP_GPIO7_AO (MTK_PIN_NO(7) | 6) 81 + #define PINMUX_GPIO7__FUNC_SDA9 (MTK_PIN_NO(7) | 7) 82 + 83 + #define PINMUX_GPIO8__FUNC_GPIO8 (MTK_PIN_NO(8) | 0) 84 + #define PINMUX_GPIO8__FUNC_PWM_0 (MTK_PIN_NO(8) | 1) 85 + #define PINMUX_GPIO8__FUNC_I2S2_DI2 (MTK_PIN_NO(8) | 2) 86 + #define PINMUX_GPIO8__FUNC_SRCLKENAI0 (MTK_PIN_NO(8) | 3) 87 + #define PINMUX_GPIO8__FUNC_URXD1 (MTK_PIN_NO(8) | 4) 88 + #define PINMUX_GPIO8__FUNC_I2S0_MCK (MTK_PIN_NO(8) | 5) 89 + #define PINMUX_GPIO8__FUNC_CONN_MCU_DBGACK_N (MTK_PIN_NO(8) | 6) 90 + #define PINMUX_GPIO8__FUNC_IDDIG (MTK_PIN_NO(8) | 7) 91 + 92 + #define PINMUX_GPIO9__FUNC_GPIO9 (MTK_PIN_NO(9) | 0) 93 + #define PINMUX_GPIO9__FUNC_PWM_3 (MTK_PIN_NO(9) | 1) 94 + #define PINMUX_GPIO9__FUNC_MD_INT0 (MTK_PIN_NO(9) | 2) 95 + #define PINMUX_GPIO9__FUNC_SRCLKENAI1 (MTK_PIN_NO(9) | 3) 96 + #define PINMUX_GPIO9__FUNC_UTXD1 (MTK_PIN_NO(9) | 4) 97 + #define PINMUX_GPIO9__FUNC_I2S0_BCK (MTK_PIN_NO(9) | 5) 98 + #define PINMUX_GPIO9__FUNC_CONN_MCU_TRST_B (MTK_PIN_NO(9) | 6) 99 + #define PINMUX_GPIO9__FUNC_USB_DRVVBUS (MTK_PIN_NO(9) | 7) 100 + 101 + #define PINMUX_GPIO10__FUNC_GPIO10 (MTK_PIN_NO(10) | 0) 102 + #define PINMUX_GPIO10__FUNC_MSDC1_CLK_A (MTK_PIN_NO(10) | 1) 103 + #define PINMUX_GPIO10__FUNC_TP_URXD1_AO (MTK_PIN_NO(10) | 2) 104 + #define PINMUX_GPIO10__FUNC_I2S1_LRCK (MTK_PIN_NO(10) | 3) 105 + #define PINMUX_GPIO10__FUNC_UCTS0 (MTK_PIN_NO(10) | 4) 106 + #define PINMUX_GPIO10__FUNC_DMIC1_CLK (MTK_PIN_NO(10) | 5) 107 + #define PINMUX_GPIO10__FUNC_KPCOL2 (MTK_PIN_NO(10) | 6) 108 + #define PINMUX_GPIO10__FUNC_SCL8 (MTK_PIN_NO(10) | 7) 109 + 110 + #define PINMUX_GPIO11__FUNC_GPIO11 (MTK_PIN_NO(11) | 0) 111 + #define PINMUX_GPIO11__FUNC_MSDC1_CMD_A (MTK_PIN_NO(11) | 1) 112 + #define PINMUX_GPIO11__FUNC_TP_UTXD1_AO (MTK_PIN_NO(11) | 2) 113 + #define PINMUX_GPIO11__FUNC_I2S1_DO (MTK_PIN_NO(11) | 3) 114 + #define PINMUX_GPIO11__FUNC_URTS0 (MTK_PIN_NO(11) | 4) 115 + #define PINMUX_GPIO11__FUNC_DMIC1_DAT (MTK_PIN_NO(11) | 5) 116 + #define PINMUX_GPIO11__FUNC_KPROW2 (MTK_PIN_NO(11) | 6) 117 + #define PINMUX_GPIO11__FUNC_SDA8 (MTK_PIN_NO(11) | 7) 118 + 119 + #define PINMUX_GPIO12__FUNC_GPIO12 (MTK_PIN_NO(12) | 0) 120 + #define PINMUX_GPIO12__FUNC_MSDC1_DAT3_A (MTK_PIN_NO(12) | 1) 121 + #define PINMUX_GPIO12__FUNC_TP_URXD2_AO (MTK_PIN_NO(12) | 2) 122 + #define PINMUX_GPIO12__FUNC_I2S1_MCK (MTK_PIN_NO(12) | 3) 123 + #define PINMUX_GPIO12__FUNC_UCTS1 (MTK_PIN_NO(12) | 4) 124 + #define PINMUX_GPIO12__FUNC_DMIC_CLK (MTK_PIN_NO(12) | 5) 125 + #define PINMUX_GPIO12__FUNC_ANT_SEL9 (MTK_PIN_NO(12) | 6) 126 + #define PINMUX_GPIO12__FUNC_SCL9 (MTK_PIN_NO(12) | 7) 127 + 128 + #define PINMUX_GPIO13__FUNC_GPIO13 (MTK_PIN_NO(13) | 0) 129 + #define PINMUX_GPIO13__FUNC_MSDC1_DAT0_A (MTK_PIN_NO(13) | 1) 130 + #define PINMUX_GPIO13__FUNC_TP_UTXD2_AO (MTK_PIN_NO(13) | 2) 131 + #define PINMUX_GPIO13__FUNC_I2S1_BCK (MTK_PIN_NO(13) | 3) 132 + #define PINMUX_GPIO13__FUNC_URTS1 (MTK_PIN_NO(13) | 4) 133 + #define PINMUX_GPIO13__FUNC_DMIC_DAT (MTK_PIN_NO(13) | 5) 134 + #define PINMUX_GPIO13__FUNC_ANT_SEL10 (MTK_PIN_NO(13) | 6) 135 + #define PINMUX_GPIO13__FUNC_SDA9 (MTK_PIN_NO(13) | 7) 136 + 137 + #define PINMUX_GPIO14__FUNC_GPIO14 (MTK_PIN_NO(14) | 0) 138 + #define PINMUX_GPIO14__FUNC_MSDC1_DAT2_A (MTK_PIN_NO(14) | 1) 139 + #define PINMUX_GPIO14__FUNC_PWM_3 (MTK_PIN_NO(14) | 2) 140 + #define PINMUX_GPIO14__FUNC_IDDIG (MTK_PIN_NO(14) | 3) 141 + #define PINMUX_GPIO14__FUNC_MD_INT0 (MTK_PIN_NO(14) | 4) 142 + #define PINMUX_GPIO14__FUNC_PTA_RXD (MTK_PIN_NO(14) | 5) 143 + #define PINMUX_GPIO14__FUNC_ANT_SEL11 (MTK_PIN_NO(14) | 6) 144 + 145 + #define PINMUX_GPIO15__FUNC_GPIO15 (MTK_PIN_NO(15) | 0) 146 + #define PINMUX_GPIO15__FUNC_MSDC1_DAT1_A (MTK_PIN_NO(15) | 1) 147 + #define PINMUX_GPIO15__FUNC_DVFSRC_EXT_REQ (MTK_PIN_NO(15) | 2) 148 + #define PINMUX_GPIO15__FUNC_USB_DRVVBUS (MTK_PIN_NO(15) | 3) 149 + #define PINMUX_GPIO15__FUNC_MD_INT1_C2K_UIM0_HOT_PLUG (MTK_PIN_NO(15) | 4) 150 + #define PINMUX_GPIO15__FUNC_PTA_TXD (MTK_PIN_NO(15) | 5) 151 + #define PINMUX_GPIO15__FUNC_ANT_SEL12 (MTK_PIN_NO(15) | 6) 152 + 153 + #define PINMUX_GPIO16__FUNC_GPIO16 (MTK_PIN_NO(16) | 0) 154 + #define PINMUX_GPIO16__FUNC_SRCLKENAI0 (MTK_PIN_NO(16) | 1) 155 + #define PINMUX_GPIO16__FUNC_EXT_FRAME_SYNC (MTK_PIN_NO(16) | 2) 156 + #define PINMUX_GPIO16__FUNC_MFG_EJTAG_TRSTN (MTK_PIN_NO(16) | 3) 157 + #define PINMUX_GPIO16__FUNC_MD_INT2_C2K_UIM1_HOT_PLUG (MTK_PIN_NO(16) | 4) 158 + #define PINMUX_GPIO16__FUNC_CONN_TCXOENA_REQ (MTK_PIN_NO(16) | 5) 159 + #define PINMUX_GPIO16__FUNC_PWM_2 (MTK_PIN_NO(16) | 6) 160 + #define PINMUX_GPIO16__FUNC_JTRSTN_SEL1 (MTK_PIN_NO(16) | 7) 161 + 162 + #define PINMUX_GPIO17__FUNC_GPIO17 (MTK_PIN_NO(17) | 0) 163 + #define PINMUX_GPIO17__FUNC_SPI0_A_MI (MTK_PIN_NO(17) | 1) 164 + #define PINMUX_GPIO17__FUNC_SCP_SPI0_MI (MTK_PIN_NO(17) | 2) 165 + #define PINMUX_GPIO17__FUNC_MFG_EJTAG_TDO (MTK_PIN_NO(17) | 3) 166 + #define PINMUX_GPIO17__FUNC_DPI_HSYNC (MTK_PIN_NO(17) | 4) 167 + #define PINMUX_GPIO17__FUNC_MFG_DFD_JTAG_TDO (MTK_PIN_NO(17) | 5) 168 + #define PINMUX_GPIO17__FUNC_DFD_TDO (MTK_PIN_NO(17) | 6) 169 + #define PINMUX_GPIO17__FUNC_JTDO_SEL1 (MTK_PIN_NO(17) | 7) 170 + 171 + #define PINMUX_GPIO18__FUNC_GPIO18 (MTK_PIN_NO(18) | 0) 172 + #define PINMUX_GPIO18__FUNC_SPI0_A_MO (MTK_PIN_NO(18) | 1) 173 + #define PINMUX_GPIO18__FUNC_SCP_SPI0_MO (MTK_PIN_NO(18) | 2) 174 + #define PINMUX_GPIO18__FUNC_MFG_EJTAG_TDI (MTK_PIN_NO(18) | 3) 175 + #define PINMUX_GPIO18__FUNC_DPI_VSYNC (MTK_PIN_NO(18) | 4) 176 + #define PINMUX_GPIO18__FUNC_MFG_DFD_JTAG_TDI (MTK_PIN_NO(18) | 5) 177 + #define PINMUX_GPIO18__FUNC_DFD_TDI (MTK_PIN_NO(18) | 6) 178 + #define PINMUX_GPIO18__FUNC_JTDI_SEL1 (MTK_PIN_NO(18) | 7) 179 + 180 + #define PINMUX_GPIO19__FUNC_GPIO19 (MTK_PIN_NO(19) | 0) 181 + #define PINMUX_GPIO19__FUNC_SPI0_A_CSB (MTK_PIN_NO(19) | 1) 182 + #define PINMUX_GPIO19__FUNC_SCP_SPI0_CS (MTK_PIN_NO(19) | 2) 183 + #define PINMUX_GPIO19__FUNC_MFG_EJTAG_TMS (MTK_PIN_NO(19) | 3) 184 + #define PINMUX_GPIO19__FUNC_DPI_DE (MTK_PIN_NO(19) | 4) 185 + #define PINMUX_GPIO19__FUNC_MFG_DFD_JTAG_TMS (MTK_PIN_NO(19) | 5) 186 + #define PINMUX_GPIO19__FUNC_DFD_TMS (MTK_PIN_NO(19) | 6) 187 + #define PINMUX_GPIO19__FUNC_JTMS_SEL1 (MTK_PIN_NO(19) | 7) 188 + 189 + #define PINMUX_GPIO20__FUNC_GPIO20 (MTK_PIN_NO(20) | 0) 190 + #define PINMUX_GPIO20__FUNC_SPI0_A_CLK (MTK_PIN_NO(20) | 1) 191 + #define PINMUX_GPIO20__FUNC_SCP_SPI0_CK (MTK_PIN_NO(20) | 2) 192 + #define PINMUX_GPIO20__FUNC_MFG_EJTAG_TCK (MTK_PIN_NO(20) | 3) 193 + #define PINMUX_GPIO20__FUNC_DPI_CK (MTK_PIN_NO(20) | 4) 194 + #define PINMUX_GPIO20__FUNC_MFG_DFD_JTAG_TCK (MTK_PIN_NO(20) | 5) 195 + #define PINMUX_GPIO20__FUNC_DFD_TCK_XI (MTK_PIN_NO(20) | 6) 196 + #define PINMUX_GPIO20__FUNC_JTCK_SEL1 (MTK_PIN_NO(20) | 7) 197 + 198 + #define PINMUX_GPIO21__FUNC_GPIO21 (MTK_PIN_NO(21) | 0) 199 + #define PINMUX_GPIO21__FUNC_PWM_0 (MTK_PIN_NO(21) | 1) 200 + #define PINMUX_GPIO21__FUNC_CMFLASH0 (MTK_PIN_NO(21) | 2) 201 + #define PINMUX_GPIO21__FUNC_CMVREF2 (MTK_PIN_NO(21) | 3) 202 + #define PINMUX_GPIO21__FUNC_CLKM0 (MTK_PIN_NO(21) | 4) 203 + #define PINMUX_GPIO21__FUNC_ANT_SEL9 (MTK_PIN_NO(21) | 5) 204 + #define PINMUX_GPIO21__FUNC_CONN_TCXOENA_REQ (MTK_PIN_NO(21) | 6) 205 + #define PINMUX_GPIO21__FUNC_DBG_MON_A27 (MTK_PIN_NO(21) | 7) 206 + 207 + #define PINMUX_GPIO22__FUNC_GPIO22 (MTK_PIN_NO(22) | 0) 208 + #define PINMUX_GPIO22__FUNC_PWM_1 (MTK_PIN_NO(22) | 1) 209 + #define PINMUX_GPIO22__FUNC_CMFLASH1 (MTK_PIN_NO(22) | 2) 210 + #define PINMUX_GPIO22__FUNC_CMVREF3 (MTK_PIN_NO(22) | 3) 211 + #define PINMUX_GPIO22__FUNC_CLKM1 (MTK_PIN_NO(22) | 4) 212 + #define PINMUX_GPIO22__FUNC_ANT_SEL10 (MTK_PIN_NO(22) | 5) 213 + #define PINMUX_GPIO22__FUNC_DBG_MON_A28 (MTK_PIN_NO(22) | 7) 214 + 215 + #define PINMUX_GPIO23__FUNC_GPIO23 (MTK_PIN_NO(23) | 0) 216 + #define PINMUX_GPIO23__FUNC_PWM_2 (MTK_PIN_NO(23) | 1) 217 + #define PINMUX_GPIO23__FUNC_CMFLASH2 (MTK_PIN_NO(23) | 2) 218 + #define PINMUX_GPIO23__FUNC_CMVREF0 (MTK_PIN_NO(23) | 3) 219 + #define PINMUX_GPIO23__FUNC_CLKM2 (MTK_PIN_NO(23) | 4) 220 + #define PINMUX_GPIO23__FUNC_ANT_SEL11 (MTK_PIN_NO(23) | 5) 221 + #define PINMUX_GPIO23__FUNC_DBG_MON_A29 (MTK_PIN_NO(23) | 7) 222 + 223 + #define PINMUX_GPIO24__FUNC_GPIO24 (MTK_PIN_NO(24) | 0) 224 + #define PINMUX_GPIO24__FUNC_PWM_0 (MTK_PIN_NO(24) | 1) 225 + #define PINMUX_GPIO24__FUNC_CMFLASH3 (MTK_PIN_NO(24) | 2) 226 + #define PINMUX_GPIO24__FUNC_CMVREF1 (MTK_PIN_NO(24) | 3) 227 + #define PINMUX_GPIO24__FUNC_CLKM3 (MTK_PIN_NO(24) | 4) 228 + #define PINMUX_GPIO24__FUNC_ANT_SEL12 (MTK_PIN_NO(24) | 5) 229 + #define PINMUX_GPIO24__FUNC_DBG_MON_A30 (MTK_PIN_NO(24) | 7) 230 + 231 + #define PINMUX_GPIO25__FUNC_GPIO25 (MTK_PIN_NO(25) | 0) 232 + #define PINMUX_GPIO25__FUNC_SRCLKENAI0 (MTK_PIN_NO(25) | 1) 233 + #define PINMUX_GPIO25__FUNC_UCTS0 (MTK_PIN_NO(25) | 2) 234 + #define PINMUX_GPIO25__FUNC_SCL8 (MTK_PIN_NO(25) | 3) 235 + #define PINMUX_GPIO25__FUNC_CMVREF4 (MTK_PIN_NO(25) | 4) 236 + #define PINMUX_GPIO25__FUNC_I2S0_LRCK (MTK_PIN_NO(25) | 5) 237 + #define PINMUX_GPIO25__FUNC_CONN_TCXOENA_REQ (MTK_PIN_NO(25) | 6) 238 + #define PINMUX_GPIO25__FUNC_DBG_MON_A31 (MTK_PIN_NO(25) | 7) 239 + 240 + #define PINMUX_GPIO26__FUNC_GPIO26 (MTK_PIN_NO(26) | 0) 241 + #define PINMUX_GPIO26__FUNC_PWM_0 (MTK_PIN_NO(26) | 1) 242 + #define PINMUX_GPIO26__FUNC_URTS0 (MTK_PIN_NO(26) | 2) 243 + #define PINMUX_GPIO26__FUNC_SDA8 (MTK_PIN_NO(26) | 3) 244 + #define PINMUX_GPIO26__FUNC_CLKM0 (MTK_PIN_NO(26) | 4) 245 + #define PINMUX_GPIO26__FUNC_I2S0_DI (MTK_PIN_NO(26) | 5) 246 + #define PINMUX_GPIO26__FUNC_AGPS_SYNC (MTK_PIN_NO(26) | 6) 247 + #define PINMUX_GPIO26__FUNC_DBG_MON_A32 (MTK_PIN_NO(26) | 7) 248 + 249 + #define PINMUX_GPIO27__FUNC_GPIO27 (MTK_PIN_NO(27) | 0) 250 + #define PINMUX_GPIO27__FUNC_AP_GOOD (MTK_PIN_NO(27) | 1) 251 + 252 + #define PINMUX_GPIO28__FUNC_GPIO28 (MTK_PIN_NO(28) | 0) 253 + #define PINMUX_GPIO28__FUNC_SCL5 (MTK_PIN_NO(28) | 1) 254 + 255 + #define PINMUX_GPIO29__FUNC_GPIO29 (MTK_PIN_NO(29) | 0) 256 + #define PINMUX_GPIO29__FUNC_SDA5 (MTK_PIN_NO(29) | 1) 257 + 258 + #define PINMUX_GPIO30__FUNC_GPIO30 (MTK_PIN_NO(30) | 0) 259 + #define PINMUX_GPIO30__FUNC_I2S1_MCK (MTK_PIN_NO(30) | 1) 260 + #define PINMUX_GPIO30__FUNC_I2S3_MCK (MTK_PIN_NO(30) | 2) 261 + #define PINMUX_GPIO30__FUNC_I2S2_MCK (MTK_PIN_NO(30) | 3) 262 + #define PINMUX_GPIO30__FUNC_DPI_D0 (MTK_PIN_NO(30) | 4) 263 + #define PINMUX_GPIO30__FUNC_SPI4_MI (MTK_PIN_NO(30) | 5) 264 + #define PINMUX_GPIO30__FUNC_CONN_MCU_DBGI_N (MTK_PIN_NO(30) | 6) 265 + 266 + #define PINMUX_GPIO31__FUNC_GPIO31 (MTK_PIN_NO(31) | 0) 267 + #define PINMUX_GPIO31__FUNC_I2S1_BCK (MTK_PIN_NO(31) | 1) 268 + #define PINMUX_GPIO31__FUNC_I2S3_BCK (MTK_PIN_NO(31) | 2) 269 + #define PINMUX_GPIO31__FUNC_I2S2_BCK (MTK_PIN_NO(31) | 3) 270 + #define PINMUX_GPIO31__FUNC_DPI_D1 (MTK_PIN_NO(31) | 4) 271 + #define PINMUX_GPIO31__FUNC_SPI4_CSB (MTK_PIN_NO(31) | 5) 272 + #define PINMUX_GPIO31__FUNC_CONN_MCU_TDO (MTK_PIN_NO(31) | 6) 273 + 274 + #define PINMUX_GPIO32__FUNC_GPIO32 (MTK_PIN_NO(32) | 0) 275 + #define PINMUX_GPIO32__FUNC_I2S1_LRCK (MTK_PIN_NO(32) | 1) 276 + #define PINMUX_GPIO32__FUNC_I2S3_LRCK (MTK_PIN_NO(32) | 2) 277 + #define PINMUX_GPIO32__FUNC_I2S2_LRCK (MTK_PIN_NO(32) | 3) 278 + #define PINMUX_GPIO32__FUNC_DPI_D2 (MTK_PIN_NO(32) | 4) 279 + #define PINMUX_GPIO32__FUNC_SPI4_MO (MTK_PIN_NO(32) | 5) 280 + #define PINMUX_GPIO32__FUNC_CONN_MCU_TDI (MTK_PIN_NO(32) | 6) 281 + 282 + #define PINMUX_GPIO33__FUNC_GPIO33 (MTK_PIN_NO(33) | 0) 283 + #define PINMUX_GPIO33__FUNC_I2S2_DI (MTK_PIN_NO(33) | 1) 284 + #define PINMUX_GPIO33__FUNC_I2S0_DI (MTK_PIN_NO(33) | 2) 285 + #define PINMUX_GPIO33__FUNC_I2S5_DO (MTK_PIN_NO(33) | 3) 286 + #define PINMUX_GPIO33__FUNC_DPI_D3 (MTK_PIN_NO(33) | 4) 287 + #define PINMUX_GPIO33__FUNC_SPI4_CLK (MTK_PIN_NO(33) | 5) 288 + #define PINMUX_GPIO33__FUNC_CONN_MCU_TMS (MTK_PIN_NO(33) | 6) 289 + 290 + #define PINMUX_GPIO34__FUNC_GPIO34 (MTK_PIN_NO(34) | 0) 291 + #define PINMUX_GPIO34__FUNC_I2S1_DO (MTK_PIN_NO(34) | 1) 292 + #define PINMUX_GPIO34__FUNC_I2S3_DO (MTK_PIN_NO(34) | 2) 293 + #define PINMUX_GPIO34__FUNC_I2S2_DI2 (MTK_PIN_NO(34) | 3) 294 + #define PINMUX_GPIO34__FUNC_DPI_D4 (MTK_PIN_NO(34) | 4) 295 + #define PINMUX_GPIO34__FUNC_AGPS_SYNC (MTK_PIN_NO(34) | 5) 296 + #define PINMUX_GPIO34__FUNC_CONN_MCU_TCK (MTK_PIN_NO(34) | 6) 297 + 298 + #define PINMUX_GPIO35__FUNC_GPIO35 (MTK_PIN_NO(35) | 0) 299 + #define PINMUX_GPIO35__FUNC_TDM_LRCK (MTK_PIN_NO(35) | 1) 300 + #define PINMUX_GPIO35__FUNC_I2S1_LRCK (MTK_PIN_NO(35) | 2) 301 + #define PINMUX_GPIO35__FUNC_I2S5_LRCK (MTK_PIN_NO(35) | 3) 302 + #define PINMUX_GPIO35__FUNC_DPI_D5 (MTK_PIN_NO(35) | 4) 303 + #define PINMUX_GPIO35__FUNC_SPI5_A_MO (MTK_PIN_NO(35) | 5) 304 + #define PINMUX_GPIO35__FUNC_IO_JTAG_TDI (MTK_PIN_NO(35) | 6) 305 + #define PINMUX_GPIO35__FUNC_PWM_2 (MTK_PIN_NO(35) | 7) 306 + 307 + #define PINMUX_GPIO36__FUNC_GPIO36 (MTK_PIN_NO(36) | 0) 308 + #define PINMUX_GPIO36__FUNC_TDM_BCK (MTK_PIN_NO(36) | 1) 309 + #define PINMUX_GPIO36__FUNC_I2S1_BCK (MTK_PIN_NO(36) | 2) 310 + #define PINMUX_GPIO36__FUNC_I2S5_BCK (MTK_PIN_NO(36) | 3) 311 + #define PINMUX_GPIO36__FUNC_DPI_D6 (MTK_PIN_NO(36) | 4) 312 + #define PINMUX_GPIO36__FUNC_SPI5_A_CSB (MTK_PIN_NO(36) | 5) 313 + #define PINMUX_GPIO36__FUNC_IO_JTAG_TRSTN (MTK_PIN_NO(36) | 6) 314 + #define PINMUX_GPIO36__FUNC_SRCLKENAI1 (MTK_PIN_NO(36) | 7) 315 + 316 + #define PINMUX_GPIO37__FUNC_GPIO37 (MTK_PIN_NO(37) | 0) 317 + #define PINMUX_GPIO37__FUNC_TDM_MCK (MTK_PIN_NO(37) | 1) 318 + #define PINMUX_GPIO37__FUNC_I2S1_MCK (MTK_PIN_NO(37) | 2) 319 + #define PINMUX_GPIO37__FUNC_I2S5_MCK (MTK_PIN_NO(37) | 3) 320 + #define PINMUX_GPIO37__FUNC_DPI_D7 (MTK_PIN_NO(37) | 4) 321 + #define PINMUX_GPIO37__FUNC_SPI5_A_MI (MTK_PIN_NO(37) | 5) 322 + #define PINMUX_GPIO37__FUNC_IO_JTAG_TCK (MTK_PIN_NO(37) | 6) 323 + #define PINMUX_GPIO37__FUNC_SRCLKENAI0 (MTK_PIN_NO(37) | 7) 324 + 325 + #define PINMUX_GPIO38__FUNC_GPIO38 (MTK_PIN_NO(38) | 0) 326 + #define PINMUX_GPIO38__FUNC_TDM_DATA0 (MTK_PIN_NO(38) | 1) 327 + #define PINMUX_GPIO38__FUNC_I2S2_DI (MTK_PIN_NO(38) | 2) 328 + #define PINMUX_GPIO38__FUNC_I2S5_DO (MTK_PIN_NO(38) | 3) 329 + #define PINMUX_GPIO38__FUNC_DPI_D8 (MTK_PIN_NO(38) | 4) 330 + #define PINMUX_GPIO38__FUNC_SPI5_A_CLK (MTK_PIN_NO(38) | 5) 331 + #define PINMUX_GPIO38__FUNC_IO_JTAG_TDO (MTK_PIN_NO(38) | 6) 332 + #define PINMUX_GPIO38__FUNC_CONN_TCXOENA_REQ (MTK_PIN_NO(38) | 7) 333 + 334 + #define PINMUX_GPIO39__FUNC_GPIO39 (MTK_PIN_NO(39) | 0) 335 + #define PINMUX_GPIO39__FUNC_TDM_DATA1 (MTK_PIN_NO(39) | 1) 336 + #define PINMUX_GPIO39__FUNC_I2S1_DO (MTK_PIN_NO(39) | 2) 337 + #define PINMUX_GPIO39__FUNC_I2S2_DI2 (MTK_PIN_NO(39) | 3) 338 + #define PINMUX_GPIO39__FUNC_DPI_D9 (MTK_PIN_NO(39) | 4) 339 + #define PINMUX_GPIO39__FUNC_DVFSRC_EXT_REQ (MTK_PIN_NO(39) | 5) 340 + #define PINMUX_GPIO39__FUNC_IO_JTAG_TMS (MTK_PIN_NO(39) | 6) 341 + #define PINMUX_GPIO39__FUNC_IDDIG (MTK_PIN_NO(39) | 7) 342 + 343 + #define PINMUX_GPIO40__FUNC_GPIO40 (MTK_PIN_NO(40) | 0) 344 + #define PINMUX_GPIO40__FUNC_TDM_DATA2 (MTK_PIN_NO(40) | 1) 345 + #define PINMUX_GPIO40__FUNC_SCL9 (MTK_PIN_NO(40) | 2) 346 + #define PINMUX_GPIO40__FUNC_PWM_3 (MTK_PIN_NO(40) | 3) 347 + #define PINMUX_GPIO40__FUNC_DPI_D10 (MTK_PIN_NO(40) | 4) 348 + #define PINMUX_GPIO40__FUNC_SRCLKENAI0 (MTK_PIN_NO(40) | 5) 349 + #define PINMUX_GPIO40__FUNC_DAP_MD32_SWD (MTK_PIN_NO(40) | 6) 350 + #define PINMUX_GPIO40__FUNC_USB_DRVVBUS (MTK_PIN_NO(40) | 7) 351 + 352 + #define PINMUX_GPIO41__FUNC_GPIO41 (MTK_PIN_NO(41) | 0) 353 + #define PINMUX_GPIO41__FUNC_TDM_DATA3 (MTK_PIN_NO(41) | 1) 354 + #define PINMUX_GPIO41__FUNC_SDA9 (MTK_PIN_NO(41) | 2) 355 + #define PINMUX_GPIO41__FUNC_PWM_1 (MTK_PIN_NO(41) | 3) 356 + #define PINMUX_GPIO41__FUNC_DPI_D11 (MTK_PIN_NO(41) | 4) 357 + #define PINMUX_GPIO41__FUNC_CLKM1 (MTK_PIN_NO(41) | 5) 358 + #define PINMUX_GPIO41__FUNC_DAP_MD32_SWCK (MTK_PIN_NO(41) | 6) 359 + 360 + #define PINMUX_GPIO42__FUNC_GPIO42 (MTK_PIN_NO(42) | 0) 361 + #define PINMUX_GPIO42__FUNC_DISP_PWM (MTK_PIN_NO(42) | 1) 362 + 363 + #define PINMUX_GPIO43__FUNC_GPIO43 (MTK_PIN_NO(43) | 0) 364 + #define PINMUX_GPIO43__FUNC_DSI_TE (MTK_PIN_NO(43) | 1) 365 + 366 + #define PINMUX_GPIO44__FUNC_GPIO44 (MTK_PIN_NO(44) | 0) 367 + #define PINMUX_GPIO44__FUNC_LCM_RST (MTK_PIN_NO(44) | 1) 368 + 369 + #define PINMUX_GPIO45__FUNC_GPIO45 (MTK_PIN_NO(45) | 0) 370 + #define PINMUX_GPIO45__FUNC_SCL6 (MTK_PIN_NO(45) | 1) 371 + #define PINMUX_GPIO45__FUNC_SCP_SCL0 (MTK_PIN_NO(45) | 2) 372 + #define PINMUX_GPIO45__FUNC_SCP_SCL1 (MTK_PIN_NO(45) | 3) 373 + #define PINMUX_GPIO45__FUNC_SCL_6306 (MTK_PIN_NO(45) | 4) 374 + 375 + #define PINMUX_GPIO46__FUNC_GPIO46 (MTK_PIN_NO(46) | 0) 376 + #define PINMUX_GPIO46__FUNC_SDA6 (MTK_PIN_NO(46) | 1) 377 + #define PINMUX_GPIO46__FUNC_SCP_SDA0 (MTK_PIN_NO(46) | 2) 378 + #define PINMUX_GPIO46__FUNC_SCP_SDA1 (MTK_PIN_NO(46) | 3) 379 + #define PINMUX_GPIO46__FUNC_SDA_6306 (MTK_PIN_NO(46) | 4) 380 + 381 + #define PINMUX_GPIO47__FUNC_GPIO47 (MTK_PIN_NO(47) | 0) 382 + #define PINMUX_GPIO47__FUNC_SPI1_A_MI (MTK_PIN_NO(47) | 1) 383 + #define PINMUX_GPIO47__FUNC_SCP_SPI1_A_MI (MTK_PIN_NO(47) | 2) 384 + #define PINMUX_GPIO47__FUNC_KPCOL2 (MTK_PIN_NO(47) | 3) 385 + #define PINMUX_GPIO47__FUNC_MD_URXD0 (MTK_PIN_NO(47) | 4) 386 + #define PINMUX_GPIO47__FUNC_CONN_UART0_RXD (MTK_PIN_NO(47) | 5) 387 + #define PINMUX_GPIO47__FUNC_SSPM_URXD_AO (MTK_PIN_NO(47) | 6) 388 + #define PINMUX_GPIO47__FUNC_DBG_MON_B32 (MTK_PIN_NO(47) | 7) 389 + 390 + #define PINMUX_GPIO48__FUNC_GPIO48 (MTK_PIN_NO(48) | 0) 391 + #define PINMUX_GPIO48__FUNC_SPI1_A_CSB (MTK_PIN_NO(48) | 1) 392 + #define PINMUX_GPIO48__FUNC_SCP_SPI1_A_CS (MTK_PIN_NO(48) | 2) 393 + #define PINMUX_GPIO48__FUNC_KPROW2 (MTK_PIN_NO(48) | 3) 394 + #define PINMUX_GPIO48__FUNC_MD_UTXD0 (MTK_PIN_NO(48) | 4) 395 + #define PINMUX_GPIO48__FUNC_CONN_UART0_TXD (MTK_PIN_NO(48) | 5) 396 + #define PINMUX_GPIO48__FUNC_SSPM_UTXD_AO (MTK_PIN_NO(48) | 6) 397 + #define PINMUX_GPIO48__FUNC_DBG_MON_B31 (MTK_PIN_NO(48) | 7) 398 + 399 + #define PINMUX_GPIO49__FUNC_GPIO49 (MTK_PIN_NO(49) | 0) 400 + #define PINMUX_GPIO49__FUNC_SPI1_A_MO (MTK_PIN_NO(49) | 1) 401 + #define PINMUX_GPIO49__FUNC_SCP_SPI1_A_MO (MTK_PIN_NO(49) | 2) 402 + #define PINMUX_GPIO49__FUNC_UCTS0 (MTK_PIN_NO(49) | 3) 403 + #define PINMUX_GPIO49__FUNC_MD_URXD1 (MTK_PIN_NO(49) | 4) 404 + #define PINMUX_GPIO49__FUNC_PWM_1 (MTK_PIN_NO(49) | 5) 405 + #define PINMUX_GPIO49__FUNC_TP_URXD2_AO (MTK_PIN_NO(49) | 6) 406 + #define PINMUX_GPIO49__FUNC_DBG_MON_B30 (MTK_PIN_NO(49) | 7) 407 + 408 + #define PINMUX_GPIO50__FUNC_GPIO50 (MTK_PIN_NO(50) | 0) 409 + #define PINMUX_GPIO50__FUNC_SPI1_A_CLK (MTK_PIN_NO(50) | 1) 410 + #define PINMUX_GPIO50__FUNC_SCP_SPI1_A_CK (MTK_PIN_NO(50) | 2) 411 + #define PINMUX_GPIO50__FUNC_URTS0 (MTK_PIN_NO(50) | 3) 412 + #define PINMUX_GPIO50__FUNC_MD_UTXD1 (MTK_PIN_NO(50) | 4) 413 + #define PINMUX_GPIO50__FUNC_WIFI_TXD (MTK_PIN_NO(50) | 5) 414 + #define PINMUX_GPIO50__FUNC_TP_UTXD2_AO (MTK_PIN_NO(50) | 6) 415 + #define PINMUX_GPIO50__FUNC_DBG_MON_B29 (MTK_PIN_NO(50) | 7) 416 + 417 + #define PINMUX_GPIO51__FUNC_GPIO51 (MTK_PIN_NO(51) | 0) 418 + #define PINMUX_GPIO51__FUNC_SCL0 (MTK_PIN_NO(51) | 1) 419 + 420 + #define PINMUX_GPIO52__FUNC_GPIO52 (MTK_PIN_NO(52) | 0) 421 + #define PINMUX_GPIO52__FUNC_SDA0 (MTK_PIN_NO(52) | 1) 422 + 423 + #define PINMUX_GPIO53__FUNC_GPIO53 (MTK_PIN_NO(53) | 0) 424 + #define PINMUX_GPIO53__FUNC_URXD0 (MTK_PIN_NO(53) | 1) 425 + #define PINMUX_GPIO53__FUNC_UTXD0 (MTK_PIN_NO(53) | 2) 426 + #define PINMUX_GPIO53__FUNC_MD_URXD0 (MTK_PIN_NO(53) | 3) 427 + #define PINMUX_GPIO53__FUNC_MD_URXD1 (MTK_PIN_NO(53) | 4) 428 + #define PINMUX_GPIO53__FUNC_SSPM_URXD_AO (MTK_PIN_NO(53) | 5) 429 + #define PINMUX_GPIO53__FUNC_CONN_UART0_RXD (MTK_PIN_NO(53) | 7) 430 + 431 + #define PINMUX_GPIO54__FUNC_GPIO54 (MTK_PIN_NO(54) | 0) 432 + #define PINMUX_GPIO54__FUNC_UTXD0 (MTK_PIN_NO(54) | 1) 433 + #define PINMUX_GPIO54__FUNC_URXD0 (MTK_PIN_NO(54) | 2) 434 + #define PINMUX_GPIO54__FUNC_MD_UTXD0 (MTK_PIN_NO(54) | 3) 435 + #define PINMUX_GPIO54__FUNC_MD_UTXD1 (MTK_PIN_NO(54) | 4) 436 + #define PINMUX_GPIO54__FUNC_SSPM_UTXD_AO (MTK_PIN_NO(54) | 5) 437 + #define PINMUX_GPIO54__FUNC_WIFI_TXD (MTK_PIN_NO(54) | 6) 438 + #define PINMUX_GPIO54__FUNC_CONN_UART0_TXD (MTK_PIN_NO(54) | 7) 439 + 440 + #define PINMUX_GPIO55__FUNC_GPIO55 (MTK_PIN_NO(55) | 0) 441 + #define PINMUX_GPIO55__FUNC_SCL3 (MTK_PIN_NO(55) | 1) 442 + #define PINMUX_GPIO55__FUNC_SCP_SCL0 (MTK_PIN_NO(55) | 2) 443 + #define PINMUX_GPIO55__FUNC_SCP_SCL1 (MTK_PIN_NO(55) | 3) 444 + #define PINMUX_GPIO55__FUNC_SCL_6306 (MTK_PIN_NO(55) | 4) 445 + 446 + #define PINMUX_GPIO56__FUNC_GPIO56 (MTK_PIN_NO(56) | 0) 447 + #define PINMUX_GPIO56__FUNC_SDA3 (MTK_PIN_NO(56) | 1) 448 + #define PINMUX_GPIO56__FUNC_SCP_SDA0 (MTK_PIN_NO(56) | 2) 449 + #define PINMUX_GPIO56__FUNC_SCP_SDA1 (MTK_PIN_NO(56) | 3) 450 + #define PINMUX_GPIO56__FUNC_SDA_6306 (MTK_PIN_NO(56) | 4) 451 + 452 + #define PINMUX_GPIO57__FUNC_GPIO57 (MTK_PIN_NO(57) | 0) 453 + #define PINMUX_GPIO57__FUNC_KPROW1 (MTK_PIN_NO(57) | 1) 454 + #define PINMUX_GPIO57__FUNC_PWM_1 (MTK_PIN_NO(57) | 2) 455 + #define PINMUX_GPIO57__FUNC_DVFSRC_EXT_REQ (MTK_PIN_NO(57) | 3) 456 + #define PINMUX_GPIO57__FUNC_CLKM1 (MTK_PIN_NO(57) | 4) 457 + #define PINMUX_GPIO57__FUNC_IDDIG (MTK_PIN_NO(57) | 5) 458 + #define PINMUX_GPIO57__FUNC_CONN_TCXOENA_REQ (MTK_PIN_NO(57) | 6) 459 + #define PINMUX_GPIO57__FUNC_MBISTREADEN_TRIGGER (MTK_PIN_NO(57) | 7) 460 + 461 + #define PINMUX_GPIO58__FUNC_GPIO58 (MTK_PIN_NO(58) | 0) 462 + #define PINMUX_GPIO58__FUNC_KPROW0 (MTK_PIN_NO(58) | 1) 463 + #define PINMUX_GPIO58__FUNC_DBG_MON_B28 (MTK_PIN_NO(58) | 7) 464 + 465 + #define PINMUX_GPIO59__FUNC_GPIO59 (MTK_PIN_NO(59) | 0) 466 + #define PINMUX_GPIO59__FUNC_KPCOL0 (MTK_PIN_NO(59) | 1) 467 + #define PINMUX_GPIO59__FUNC_DBG_MON_B27 (MTK_PIN_NO(59) | 7) 468 + 469 + #define PINMUX_GPIO60__FUNC_GPIO60 (MTK_PIN_NO(60) | 0) 470 + #define PINMUX_GPIO60__FUNC_KPCOL1 (MTK_PIN_NO(60) | 1) 471 + #define PINMUX_GPIO60__FUNC_PWM_2 (MTK_PIN_NO(60) | 2) 472 + #define PINMUX_GPIO60__FUNC_UCTS1 (MTK_PIN_NO(60) | 3) 473 + #define PINMUX_GPIO60__FUNC_CLKM2 (MTK_PIN_NO(60) | 4) 474 + #define PINMUX_GPIO60__FUNC_USB_DRVVBUS (MTK_PIN_NO(60) | 5) 475 + #define PINMUX_GPIO60__FUNC_MBISTWRITEEN_TRIGGER (MTK_PIN_NO(60) | 7) 476 + 477 + #define PINMUX_GPIO61__FUNC_GPIO61 (MTK_PIN_NO(61) | 0) 478 + #define PINMUX_GPIO61__FUNC_SCL1 (MTK_PIN_NO(61) | 1) 479 + #define PINMUX_GPIO61__FUNC_SCP_SCL0 (MTK_PIN_NO(61) | 2) 480 + #define PINMUX_GPIO61__FUNC_SCP_SCL1 (MTK_PIN_NO(61) | 3) 481 + 482 + #define PINMUX_GPIO62__FUNC_GPIO62 (MTK_PIN_NO(62) | 0) 483 + #define PINMUX_GPIO62__FUNC_SDA1 (MTK_PIN_NO(62) | 1) 484 + #define PINMUX_GPIO62__FUNC_SCP_SDA0 (MTK_PIN_NO(62) | 2) 485 + #define PINMUX_GPIO62__FUNC_SCP_SDA1 (MTK_PIN_NO(62) | 3) 486 + 487 + #define PINMUX_GPIO63__FUNC_GPIO63 (MTK_PIN_NO(63) | 0) 488 + #define PINMUX_GPIO63__FUNC_SPI2_MI (MTK_PIN_NO(63) | 1) 489 + #define PINMUX_GPIO63__FUNC_SCP_SPI2_MI (MTK_PIN_NO(63) | 2) 490 + #define PINMUX_GPIO63__FUNC_KPCOL2 (MTK_PIN_NO(63) | 3) 491 + #define PINMUX_GPIO63__FUNC_MRG_DI (MTK_PIN_NO(63) | 4) 492 + #define PINMUX_GPIO63__FUNC_MD_URXD0 (MTK_PIN_NO(63) | 5) 493 + #define PINMUX_GPIO63__FUNC_CONN_UART0_RXD (MTK_PIN_NO(63) | 6) 494 + #define PINMUX_GPIO63__FUNC_DBG_MON_B26 (MTK_PIN_NO(63) | 7) 495 + 496 + #define PINMUX_GPIO64__FUNC_GPIO64 (MTK_PIN_NO(64) | 0) 497 + #define PINMUX_GPIO64__FUNC_SPI2_CSB (MTK_PIN_NO(64) | 1) 498 + #define PINMUX_GPIO64__FUNC_SCP_SPI2_CS (MTK_PIN_NO(64) | 2) 499 + #define PINMUX_GPIO64__FUNC_KPROW2 (MTK_PIN_NO(64) | 3) 500 + #define PINMUX_GPIO64__FUNC_MRG_SYNC (MTK_PIN_NO(64) | 4) 501 + #define PINMUX_GPIO64__FUNC_MD_UTXD0 (MTK_PIN_NO(64) | 5) 502 + #define PINMUX_GPIO64__FUNC_CONN_UART0_TXD (MTK_PIN_NO(64) | 6) 503 + #define PINMUX_GPIO64__FUNC_DBG_MON_B25 (MTK_PIN_NO(64) | 7) 504 + 505 + #define PINMUX_GPIO65__FUNC_GPIO65 (MTK_PIN_NO(65) | 0) 506 + #define PINMUX_GPIO65__FUNC_SPI2_MO (MTK_PIN_NO(65) | 1) 507 + #define PINMUX_GPIO65__FUNC_SCP_SPI2_MO (MTK_PIN_NO(65) | 2) 508 + #define PINMUX_GPIO65__FUNC_SCP_SDA1 (MTK_PIN_NO(65) | 3) 509 + #define PINMUX_GPIO65__FUNC_MRG_DO (MTK_PIN_NO(65) | 4) 510 + #define PINMUX_GPIO65__FUNC_MD_URXD1 (MTK_PIN_NO(65) | 5) 511 + #define PINMUX_GPIO65__FUNC_PWM_3 (MTK_PIN_NO(65) | 6) 512 + 513 + #define PINMUX_GPIO66__FUNC_GPIO66 (MTK_PIN_NO(66) | 0) 514 + #define PINMUX_GPIO66__FUNC_SPI2_CLK (MTK_PIN_NO(66) | 1) 515 + #define PINMUX_GPIO66__FUNC_SCP_SPI2_CK (MTK_PIN_NO(66) | 2) 516 + #define PINMUX_GPIO66__FUNC_SCP_SCL1 (MTK_PIN_NO(66) | 3) 517 + #define PINMUX_GPIO66__FUNC_MRG_CLK (MTK_PIN_NO(66) | 4) 518 + #define PINMUX_GPIO66__FUNC_MD_UTXD1 (MTK_PIN_NO(66) | 5) 519 + #define PINMUX_GPIO66__FUNC_WIFI_TXD (MTK_PIN_NO(66) | 6) 520 + 521 + #define PINMUX_GPIO67__FUNC_GPIO67 (MTK_PIN_NO(67) | 0) 522 + #define PINMUX_GPIO67__FUNC_I2S3_LRCK (MTK_PIN_NO(67) | 1) 523 + #define PINMUX_GPIO67__FUNC_I2S1_LRCK (MTK_PIN_NO(67) | 2) 524 + #define PINMUX_GPIO67__FUNC_URXD1 (MTK_PIN_NO(67) | 3) 525 + #define PINMUX_GPIO67__FUNC_PCM0_SYNC (MTK_PIN_NO(67) | 4) 526 + #define PINMUX_GPIO67__FUNC_I2S5_LRCK (MTK_PIN_NO(67) | 5) 527 + #define PINMUX_GPIO67__FUNC_ANT_SEL9 (MTK_PIN_NO(67) | 6) 528 + #define PINMUX_GPIO67__FUNC_DBG_MON_B10 (MTK_PIN_NO(67) | 7) 529 + 530 + #define PINMUX_GPIO68__FUNC_GPIO68 (MTK_PIN_NO(68) | 0) 531 + #define PINMUX_GPIO68__FUNC_I2S3_DO (MTK_PIN_NO(68) | 1) 532 + #define PINMUX_GPIO68__FUNC_I2S1_DO (MTK_PIN_NO(68) | 2) 533 + #define PINMUX_GPIO68__FUNC_UTXD1 (MTK_PIN_NO(68) | 3) 534 + #define PINMUX_GPIO68__FUNC_PCM0_DO (MTK_PIN_NO(68) | 4) 535 + #define PINMUX_GPIO68__FUNC_I2S5_DO (MTK_PIN_NO(68) | 5) 536 + #define PINMUX_GPIO68__FUNC_ANT_SEL10 (MTK_PIN_NO(68) | 6) 537 + #define PINMUX_GPIO68__FUNC_DBG_MON_B9 (MTK_PIN_NO(68) | 7) 538 + 539 + #define PINMUX_GPIO69__FUNC_GPIO69 (MTK_PIN_NO(69) | 0) 540 + #define PINMUX_GPIO69__FUNC_I2S3_MCK (MTK_PIN_NO(69) | 1) 541 + #define PINMUX_GPIO69__FUNC_I2S1_MCK (MTK_PIN_NO(69) | 2) 542 + #define PINMUX_GPIO69__FUNC_URTS1 (MTK_PIN_NO(69) | 3) 543 + #define PINMUX_GPIO69__FUNC_AGPS_SYNC (MTK_PIN_NO(69) | 4) 544 + #define PINMUX_GPIO69__FUNC_I2S5_MCK (MTK_PIN_NO(69) | 5) 545 + #define PINMUX_GPIO69__FUNC_DVFSRC_EXT_REQ (MTK_PIN_NO(69) | 6) 546 + #define PINMUX_GPIO69__FUNC_DBG_MON_B8 (MTK_PIN_NO(69) | 7) 547 + 548 + #define PINMUX_GPIO70__FUNC_GPIO70 (MTK_PIN_NO(70) | 0) 549 + #define PINMUX_GPIO70__FUNC_I2S0_DI (MTK_PIN_NO(70) | 1) 550 + #define PINMUX_GPIO70__FUNC_I2S2_DI (MTK_PIN_NO(70) | 2) 551 + #define PINMUX_GPIO70__FUNC_KPCOL2 (MTK_PIN_NO(70) | 3) 552 + #define PINMUX_GPIO70__FUNC_PCM0_DI (MTK_PIN_NO(70) | 4) 553 + #define PINMUX_GPIO70__FUNC_I2S2_DI2 (MTK_PIN_NO(70) | 5) 554 + #define PINMUX_GPIO70__FUNC_ANT_SEL11 (MTK_PIN_NO(70) | 6) 555 + #define PINMUX_GPIO70__FUNC_DBG_MON_B7 (MTK_PIN_NO(70) | 7) 556 + 557 + #define PINMUX_GPIO71__FUNC_GPIO71 (MTK_PIN_NO(71) | 0) 558 + #define PINMUX_GPIO71__FUNC_I2S3_BCK (MTK_PIN_NO(71) | 1) 559 + #define PINMUX_GPIO71__FUNC_I2S1_BCK (MTK_PIN_NO(71) | 2) 560 + #define PINMUX_GPIO71__FUNC_KPROW2 (MTK_PIN_NO(71) | 3) 561 + #define PINMUX_GPIO71__FUNC_PCM0_CLK (MTK_PIN_NO(71) | 4) 562 + #define PINMUX_GPIO71__FUNC_I2S5_BCK (MTK_PIN_NO(71) | 5) 563 + #define PINMUX_GPIO71__FUNC_ANT_SEL12 (MTK_PIN_NO(71) | 6) 564 + #define PINMUX_GPIO71__FUNC_DBG_MON_B6 (MTK_PIN_NO(71) | 7) 565 + 566 + #define PINMUX_GPIO72__FUNC_GPIO72 (MTK_PIN_NO(72) | 0) 567 + #define PINMUX_GPIO72__FUNC_BPI_BUS19_OLAT0 (MTK_PIN_NO(72) | 1) 568 + #define PINMUX_GPIO72__FUNC_CONN_BPI_BUS19_OLAT0 (MTK_PIN_NO(72) | 2) 569 + 570 + #define PINMUX_GPIO73__FUNC_GPIO73 (MTK_PIN_NO(73) | 0) 571 + #define PINMUX_GPIO73__FUNC_BPI_BUS18_PA_VM1 (MTK_PIN_NO(73) | 1) 572 + #define PINMUX_GPIO73__FUNC_CONN_MIPI5_SCLK (MTK_PIN_NO(73) | 2) 573 + #define PINMUX_GPIO73__FUNC_MIPI5_SCLK (MTK_PIN_NO(73) | 3) 574 + 575 + #define PINMUX_GPIO74__FUNC_GPIO74 (MTK_PIN_NO(74) | 0) 576 + #define PINMUX_GPIO74__FUNC_BPI_BUS17_PA_VM0 (MTK_PIN_NO(74) | 1) 577 + #define PINMUX_GPIO74__FUNC_CONN_MIPI5_SDATA (MTK_PIN_NO(74) | 2) 578 + #define PINMUX_GPIO74__FUNC_MIPI5_SDATA (MTK_PIN_NO(74) | 3) 579 + 580 + #define PINMUX_GPIO75__FUNC_GPIO75 (MTK_PIN_NO(75) | 0) 581 + #define PINMUX_GPIO75__FUNC_BPI_BUS20_OLAT1 (MTK_PIN_NO(75) | 1) 582 + #define PINMUX_GPIO75__FUNC_CONN_BPI_BUS20_OLAT1 (MTK_PIN_NO(75) | 2) 583 + #define PINMUX_GPIO75__FUNC_RFIC0_BSI_D2 (MTK_PIN_NO(75) | 3) 584 + 585 + #define PINMUX_GPIO76__FUNC_GPIO76 (MTK_PIN_NO(76) | 0) 586 + #define PINMUX_GPIO76__FUNC_RFIC0_BSI_D1 (MTK_PIN_NO(76) | 1) 587 + 588 + #define PINMUX_GPIO77__FUNC_GPIO77 (MTK_PIN_NO(77) | 0) 589 + #define PINMUX_GPIO77__FUNC_RFIC0_BSI_D0 (MTK_PIN_NO(77) | 1) 590 + 591 + #define PINMUX_GPIO78__FUNC_GPIO78 (MTK_PIN_NO(78) | 0) 592 + #define PINMUX_GPIO78__FUNC_BPI_BUS7 (MTK_PIN_NO(78) | 1) 593 + #define PINMUX_GPIO78__FUNC_DBG_MON_B24 (MTK_PIN_NO(78) | 7) 594 + 595 + #define PINMUX_GPIO79__FUNC_GPIO79 (MTK_PIN_NO(79) | 0) 596 + #define PINMUX_GPIO79__FUNC_BPI_BUS6 (MTK_PIN_NO(79) | 1) 597 + #define PINMUX_GPIO79__FUNC_DBG_MON_B23 (MTK_PIN_NO(79) | 7) 598 + 599 + #define PINMUX_GPIO80__FUNC_GPIO80 (MTK_PIN_NO(80) | 0) 600 + #define PINMUX_GPIO80__FUNC_BPI_BUS8 (MTK_PIN_NO(80) | 1) 601 + #define PINMUX_GPIO80__FUNC_DBG_MON_B22 (MTK_PIN_NO(80) | 7) 602 + 603 + #define PINMUX_GPIO81__FUNC_GPIO81 (MTK_PIN_NO(81) | 0) 604 + #define PINMUX_GPIO81__FUNC_BPI_BUS9 (MTK_PIN_NO(81) | 1) 605 + #define PINMUX_GPIO81__FUNC_DBG_MON_B21 (MTK_PIN_NO(81) | 7) 606 + 607 + #define PINMUX_GPIO82__FUNC_GPIO82 (MTK_PIN_NO(82) | 0) 608 + #define PINMUX_GPIO82__FUNC_BPI_BUS10 (MTK_PIN_NO(82) | 1) 609 + #define PINMUX_GPIO82__FUNC_DBG_MON_B20 (MTK_PIN_NO(82) | 7) 610 + 611 + #define PINMUX_GPIO83__FUNC_GPIO83 (MTK_PIN_NO(83) | 0) 612 + #define PINMUX_GPIO83__FUNC_BPI_BUS11 (MTK_PIN_NO(83) | 1) 613 + #define PINMUX_GPIO83__FUNC_DBG_MON_B19 (MTK_PIN_NO(83) | 7) 614 + 615 + #define PINMUX_GPIO84__FUNC_GPIO84 (MTK_PIN_NO(84) | 0) 616 + #define PINMUX_GPIO84__FUNC_BPI_BUS12 (MTK_PIN_NO(84) | 1) 617 + #define PINMUX_GPIO84__FUNC_CONN_BPI_BUS12 (MTK_PIN_NO(84) | 2) 618 + 619 + #define PINMUX_GPIO85__FUNC_GPIO85 (MTK_PIN_NO(85) | 0) 620 + #define PINMUX_GPIO85__FUNC_BPI_BUS13 (MTK_PIN_NO(85) | 1) 621 + #define PINMUX_GPIO85__FUNC_CONN_BPI_BUS13 (MTK_PIN_NO(85) | 2) 622 + 623 + #define PINMUX_GPIO86__FUNC_GPIO86 (MTK_PIN_NO(86) | 0) 624 + #define PINMUX_GPIO86__FUNC_BPI_BUS14 (MTK_PIN_NO(86) | 1) 625 + #define PINMUX_GPIO86__FUNC_CONN_BPI_BUS14 (MTK_PIN_NO(86) | 2) 626 + 627 + #define PINMUX_GPIO87__FUNC_GPIO87 (MTK_PIN_NO(87) | 0) 628 + #define PINMUX_GPIO87__FUNC_BPI_BUS15 (MTK_PIN_NO(87) | 1) 629 + #define PINMUX_GPIO87__FUNC_CONN_BPI_BUS15 (MTK_PIN_NO(87) | 2) 630 + 631 + #define PINMUX_GPIO88__FUNC_GPIO88 (MTK_PIN_NO(88) | 0) 632 + #define PINMUX_GPIO88__FUNC_BPI_BUS16 (MTK_PIN_NO(88) | 1) 633 + #define PINMUX_GPIO88__FUNC_CONN_BPI_BUS16 (MTK_PIN_NO(88) | 2) 634 + 635 + #define PINMUX_GPIO89__FUNC_GPIO89 (MTK_PIN_NO(89) | 0) 636 + #define PINMUX_GPIO89__FUNC_BPI_BUS5 (MTK_PIN_NO(89) | 1) 637 + #define PINMUX_GPIO89__FUNC_DBG_MON_B18 (MTK_PIN_NO(89) | 7) 638 + 639 + #define PINMUX_GPIO90__FUNC_GPIO90 (MTK_PIN_NO(90) | 0) 640 + #define PINMUX_GPIO90__FUNC_BPI_BUS4 (MTK_PIN_NO(90) | 1) 641 + #define PINMUX_GPIO90__FUNC_DBG_MON_B17 (MTK_PIN_NO(90) | 7) 642 + 643 + #define PINMUX_GPIO91__FUNC_GPIO91 (MTK_PIN_NO(91) | 0) 644 + #define PINMUX_GPIO91__FUNC_BPI_BUS3 (MTK_PIN_NO(91) | 1) 645 + 646 + #define PINMUX_GPIO92__FUNC_GPIO92 (MTK_PIN_NO(92) | 0) 647 + #define PINMUX_GPIO92__FUNC_BPI_BUS2 (MTK_PIN_NO(92) | 1) 648 + #define PINMUX_GPIO92__FUNC_DBG_MON_B16 (MTK_PIN_NO(92) | 7) 649 + 650 + #define PINMUX_GPIO93__FUNC_GPIO93 (MTK_PIN_NO(93) | 0) 651 + #define PINMUX_GPIO93__FUNC_BPI_BUS1 (MTK_PIN_NO(93) | 1) 652 + 653 + #define PINMUX_GPIO94__FUNC_GPIO94 (MTK_PIN_NO(94) | 0) 654 + #define PINMUX_GPIO94__FUNC_BPI_BUS0 (MTK_PIN_NO(94) | 1) 655 + #define PINMUX_GPIO94__FUNC_DBG_MON_B15 (MTK_PIN_NO(94) | 7) 656 + 657 + #define PINMUX_GPIO95__FUNC_GPIO95 (MTK_PIN_NO(95) | 0) 658 + #define PINMUX_GPIO95__FUNC_MIPI0_SDATA (MTK_PIN_NO(95) | 1) 659 + 660 + #define PINMUX_GPIO96__FUNC_GPIO96 (MTK_PIN_NO(96) | 0) 661 + #define PINMUX_GPIO96__FUNC_MIPI0_SCLK (MTK_PIN_NO(96) | 1) 662 + 663 + #define PINMUX_GPIO97__FUNC_GPIO97 (MTK_PIN_NO(97) | 0) 664 + #define PINMUX_GPIO97__FUNC_MIPI1_SDATA (MTK_PIN_NO(97) | 1) 665 + 666 + #define PINMUX_GPIO98__FUNC_GPIO98 (MTK_PIN_NO(98) | 0) 667 + #define PINMUX_GPIO98__FUNC_MIPI1_SCLK (MTK_PIN_NO(98) | 1) 668 + 669 + #define PINMUX_GPIO99__FUNC_GPIO99 (MTK_PIN_NO(99) | 0) 670 + #define PINMUX_GPIO99__FUNC_MIPI2_SCLK (MTK_PIN_NO(99) | 1) 671 + #define PINMUX_GPIO99__FUNC_DBG_MON_B14 (MTK_PIN_NO(99) | 7) 672 + 673 + #define PINMUX_GPIO100__FUNC_GPIO100 (MTK_PIN_NO(100) | 0) 674 + #define PINMUX_GPIO100__FUNC_MIPI2_SDATA (MTK_PIN_NO(100) | 1) 675 + #define PINMUX_GPIO100__FUNC_DBG_MON_B13 (MTK_PIN_NO(100) | 7) 676 + 677 + #define PINMUX_GPIO101__FUNC_GPIO101 (MTK_PIN_NO(101) | 0) 678 + #define PINMUX_GPIO101__FUNC_MIPI3_SCLK (MTK_PIN_NO(101) | 1) 679 + #define PINMUX_GPIO101__FUNC_DBG_MON_B12 (MTK_PIN_NO(101) | 7) 680 + 681 + #define PINMUX_GPIO102__FUNC_GPIO102 (MTK_PIN_NO(102) | 0) 682 + #define PINMUX_GPIO102__FUNC_MIPI3_SDATA (MTK_PIN_NO(102) | 1) 683 + #define PINMUX_GPIO102__FUNC_DBG_MON_B11 (MTK_PIN_NO(102) | 7) 684 + 685 + #define PINMUX_GPIO103__FUNC_GPIO103 (MTK_PIN_NO(103) | 0) 686 + #define PINMUX_GPIO103__FUNC_MIPI4_SCLK (MTK_PIN_NO(103) | 1) 687 + #define PINMUX_GPIO103__FUNC_CONN_MIPI4_SCLK (MTK_PIN_NO(103) | 2) 688 + 689 + #define PINMUX_GPIO104__FUNC_GPIO104 (MTK_PIN_NO(104) | 0) 690 + #define PINMUX_GPIO104__FUNC_MIPI4_SDATA (MTK_PIN_NO(104) | 1) 691 + #define PINMUX_GPIO104__FUNC_CONN_MIPI4_SDATA (MTK_PIN_NO(104) | 2) 692 + 693 + #define PINMUX_GPIO105__FUNC_GPIO105 (MTK_PIN_NO(105) | 0) 694 + #define PINMUX_GPIO105__FUNC_BPI_BUS22_OLAT3 (MTK_PIN_NO(105) | 1) 695 + #define PINMUX_GPIO105__FUNC_CONN_BPI_BUS22_OLAT3 (MTK_PIN_NO(105) | 2) 696 + 697 + #define PINMUX_GPIO106__FUNC_GPIO106 (MTK_PIN_NO(106) | 0) 698 + #define PINMUX_GPIO106__FUNC_BPI_BUS21_OLAT2 (MTK_PIN_NO(106) | 1) 699 + #define PINMUX_GPIO106__FUNC_CONN_BPI_BUS21_OLAT2 (MTK_PIN_NO(106) | 2) 700 + 701 + #define PINMUX_GPIO107__FUNC_GPIO107 (MTK_PIN_NO(107) | 0) 702 + #define PINMUX_GPIO107__FUNC_BPI_BUS24_ANT1 (MTK_PIN_NO(107) | 1) 703 + #define PINMUX_GPIO107__FUNC_CONN_BPI_BUS24_ANT1 (MTK_PIN_NO(107) | 2) 704 + 705 + #define PINMUX_GPIO108__FUNC_GPIO108 (MTK_PIN_NO(108) | 0) 706 + #define PINMUX_GPIO108__FUNC_BPI_BUS25_ANT2 (MTK_PIN_NO(108) | 1) 707 + #define PINMUX_GPIO108__FUNC_CONN_BPI_BUS25_ANT2 (MTK_PIN_NO(108) | 2) 708 + 709 + #define PINMUX_GPIO109__FUNC_GPIO109 (MTK_PIN_NO(109) | 0) 710 + #define PINMUX_GPIO109__FUNC_BPI_BUS23_ANT0 (MTK_PIN_NO(109) | 1) 711 + #define PINMUX_GPIO109__FUNC_CONN_BPI_BUS23_ANT0 (MTK_PIN_NO(109) | 2) 712 + 713 + #define PINMUX_GPIO110__FUNC_GPIO110 (MTK_PIN_NO(110) | 0) 714 + #define PINMUX_GPIO110__FUNC_SCL4 (MTK_PIN_NO(110) | 1) 715 + 716 + #define PINMUX_GPIO111__FUNC_GPIO111 (MTK_PIN_NO(111) | 0) 717 + #define PINMUX_GPIO111__FUNC_SDA4 (MTK_PIN_NO(111) | 1) 718 + 719 + #define PINMUX_GPIO112__FUNC_GPIO112 (MTK_PIN_NO(112) | 0) 720 + #define PINMUX_GPIO112__FUNC_SCL2 (MTK_PIN_NO(112) | 1) 721 + 722 + #define PINMUX_GPIO113__FUNC_GPIO113 (MTK_PIN_NO(113) | 0) 723 + #define PINMUX_GPIO113__FUNC_SDA2 (MTK_PIN_NO(113) | 1) 724 + 725 + #define PINMUX_GPIO114__FUNC_GPIO114 (MTK_PIN_NO(114) | 0) 726 + #define PINMUX_GPIO114__FUNC_CLKM0 (MTK_PIN_NO(114) | 1) 727 + #define PINMUX_GPIO114__FUNC_SPI3_MI (MTK_PIN_NO(114) | 2) 728 + #define PINMUX_GPIO114__FUNC_DBG_MON_B5 (MTK_PIN_NO(114) | 7) 729 + 730 + #define PINMUX_GPIO115__FUNC_GPIO115 (MTK_PIN_NO(115) | 0) 731 + #define PINMUX_GPIO115__FUNC_CLKM1 (MTK_PIN_NO(115) | 1) 732 + #define PINMUX_GPIO115__FUNC_SPI3_CSB (MTK_PIN_NO(115) | 2) 733 + #define PINMUX_GPIO115__FUNC_DBG_MON_B4 (MTK_PIN_NO(115) | 7) 734 + 735 + #define PINMUX_GPIO116__FUNC_GPIO116 (MTK_PIN_NO(116) | 0) 736 + #define PINMUX_GPIO116__FUNC_CMMCLK0 (MTK_PIN_NO(116) | 1) 737 + #define PINMUX_GPIO116__FUNC_DBG_MON_B3 (MTK_PIN_NO(116) | 7) 738 + 739 + #define PINMUX_GPIO117__FUNC_GPIO117 (MTK_PIN_NO(117) | 0) 740 + #define PINMUX_GPIO117__FUNC_CMMCLK1 (MTK_PIN_NO(117) | 1) 741 + #define PINMUX_GPIO117__FUNC_DVFSRC_EXT_REQ (MTK_PIN_NO(117) | 2) 742 + #define PINMUX_GPIO117__FUNC_DBG_MON_B2 (MTK_PIN_NO(117) | 7) 743 + 744 + #define PINMUX_GPIO118__FUNC_GPIO118 (MTK_PIN_NO(118) | 0) 745 + #define PINMUX_GPIO118__FUNC_CLKM2 (MTK_PIN_NO(118) | 1) 746 + #define PINMUX_GPIO118__FUNC_SPI3_MO (MTK_PIN_NO(118) | 2) 747 + #define PINMUX_GPIO118__FUNC_DBG_MON_B1 (MTK_PIN_NO(118) | 7) 748 + 749 + #define PINMUX_GPIO119__FUNC_GPIO119 (MTK_PIN_NO(119) | 0) 750 + #define PINMUX_GPIO119__FUNC_CLKM3 (MTK_PIN_NO(119) | 1) 751 + #define PINMUX_GPIO119__FUNC_SPI3_CLK (MTK_PIN_NO(119) | 2) 752 + #define PINMUX_GPIO119__FUNC_DBG_MON_B0 (MTK_PIN_NO(119) | 7) 753 + 754 + #define PINMUX_GPIO120__FUNC_GPIO120 (MTK_PIN_NO(120) | 0) 755 + #define PINMUX_GPIO120__FUNC_CMMCLK2 (MTK_PIN_NO(120) | 1) 756 + #define PINMUX_GPIO120__FUNC_CLKM2 (MTK_PIN_NO(120) | 2) 757 + #define PINMUX_GPIO120__FUNC_ANT_SEL12 (MTK_PIN_NO(120) | 6) 758 + #define PINMUX_GPIO120__FUNC_TP_UCTS2_AO (MTK_PIN_NO(120) | 7) 759 + 760 + #define PINMUX_GPIO121__FUNC_GPIO121 (MTK_PIN_NO(121) | 0) 761 + #define PINMUX_GPIO121__FUNC_CMMCLK3 (MTK_PIN_NO(121) | 1) 762 + #define PINMUX_GPIO121__FUNC_CLKM3 (MTK_PIN_NO(121) | 2) 763 + #define PINMUX_GPIO121__FUNC_DVFSRC_EXT_REQ (MTK_PIN_NO(121) | 3) 764 + #define PINMUX_GPIO121__FUNC_ANT_SEL11 (MTK_PIN_NO(121) | 6) 765 + #define PINMUX_GPIO121__FUNC_TP_URTS2_AO (MTK_PIN_NO(121) | 7) 766 + 767 + #define PINMUX_GPIO122__FUNC_GPIO122 (MTK_PIN_NO(122) | 0) 768 + #define PINMUX_GPIO122__FUNC_CMVREF1 (MTK_PIN_NO(122) | 1) 769 + #define PINMUX_GPIO122__FUNC_PCM0_SYNC (MTK_PIN_NO(122) | 2) 770 + #define PINMUX_GPIO122__FUNC_SRCLKENAI1 (MTK_PIN_NO(122) | 3) 771 + #define PINMUX_GPIO122__FUNC_AGPS_SYNC (MTK_PIN_NO(122) | 4) 772 + #define PINMUX_GPIO122__FUNC_PWM_1 (MTK_PIN_NO(122) | 5) 773 + #define PINMUX_GPIO122__FUNC_ANT_SEL9 (MTK_PIN_NO(122) | 6) 774 + #define PINMUX_GPIO122__FUNC_TP_UCTS1_AO (MTK_PIN_NO(122) | 7) 775 + 776 + #define PINMUX_GPIO123__FUNC_GPIO123 (MTK_PIN_NO(123) | 0) 777 + #define PINMUX_GPIO123__FUNC_PCM0_DI (MTK_PIN_NO(123) | 2) 778 + #define PINMUX_GPIO123__FUNC_ADSP_JTAG_TRSTN (MTK_PIN_NO(123) | 3) 779 + #define PINMUX_GPIO123__FUNC_VPU_UDI_NTRST (MTK_PIN_NO(123) | 4) 780 + #define PINMUX_GPIO123__FUNC_SPM_JTAG_TRSTN (MTK_PIN_NO(123) | 5) 781 + #define PINMUX_GPIO123__FUNC_SSPM_JTAG_TRSTN (MTK_PIN_NO(123) | 6) 782 + 783 + #define PINMUX_GPIO124__FUNC_GPIO124 (MTK_PIN_NO(124) | 0) 784 + #define PINMUX_GPIO124__FUNC_CMVREF2 (MTK_PIN_NO(124) | 1) 785 + #define PINMUX_GPIO124__FUNC_PCM0_CLK (MTK_PIN_NO(124) | 2) 786 + #define PINMUX_GPIO124__FUNC_MD_INT0 (MTK_PIN_NO(124) | 3) 787 + #define PINMUX_GPIO124__FUNC_EXT_FRAME_SYNC (MTK_PIN_NO(124) | 4) 788 + #define PINMUX_GPIO124__FUNC_PWM_2 (MTK_PIN_NO(124) | 5) 789 + #define PINMUX_GPIO124__FUNC_ANT_SEL10 (MTK_PIN_NO(124) | 6) 790 + #define PINMUX_GPIO124__FUNC_TP_URTS1_AO (MTK_PIN_NO(124) | 7) 791 + 792 + #define PINMUX_GPIO125__FUNC_GPIO125 (MTK_PIN_NO(125) | 0) 793 + #define PINMUX_GPIO125__FUNC_CMVREF3 (MTK_PIN_NO(125) | 1) 794 + #define PINMUX_GPIO125__FUNC_PCM0_DO (MTK_PIN_NO(125) | 2) 795 + #define PINMUX_GPIO125__FUNC_ADSP_JTAG_TMS (MTK_PIN_NO(125) | 3) 796 + #define PINMUX_GPIO125__FUNC_VPU_UDI_TMS (MTK_PIN_NO(125) | 4) 797 + #define PINMUX_GPIO125__FUNC_SPM_JTAG_TMS (MTK_PIN_NO(125) | 5) 798 + #define PINMUX_GPIO125__FUNC_SSPM_JTAG_TMS (MTK_PIN_NO(125) | 6) 799 + 800 + #define PINMUX_GPIO126__FUNC_GPIO126 (MTK_PIN_NO(126) | 0) 801 + #define PINMUX_GPIO126__FUNC_CMVREF4 (MTK_PIN_NO(126) | 1) 802 + #define PINMUX_GPIO126__FUNC_CMFLASH0 (MTK_PIN_NO(126) | 2) 803 + #define PINMUX_GPIO126__FUNC_CONN_MCU_AICE_TMSC (MTK_PIN_NO(126) | 6) 804 + 805 + #define PINMUX_GPIO127__FUNC_GPIO127 (MTK_PIN_NO(127) | 0) 806 + #define PINMUX_GPIO127__FUNC_CMVREF0 (MTK_PIN_NO(127) | 1) 807 + #define PINMUX_GPIO127__FUNC_CMFLASH1 (MTK_PIN_NO(127) | 2) 808 + #define PINMUX_GPIO127__FUNC_CONN_MCU_AICE_TCKC (MTK_PIN_NO(127) | 6) 809 + 810 + #define PINMUX_GPIO128__FUNC_GPIO128 (MTK_PIN_NO(128) | 0) 811 + #define PINMUX_GPIO128__FUNC_MD1_SIM1_SIO (MTK_PIN_NO(128) | 1) 812 + #define PINMUX_GPIO128__FUNC_MD1_SIM2_SIO (MTK_PIN_NO(128) | 2) 813 + #define PINMUX_GPIO128__FUNC_CCU_JTAG_TRST (MTK_PIN_NO(128) | 3) 814 + #define PINMUX_GPIO128__FUNC_CONN_DSP_JINTP (MTK_PIN_NO(128) | 4) 815 + #define PINMUX_GPIO128__FUNC_SCP_JTAG_TRSTN (MTK_PIN_NO(128) | 5) 816 + #define PINMUX_GPIO128__FUNC_LVTS_FOUT (MTK_PIN_NO(128) | 6) 817 + #define PINMUX_GPIO128__FUNC_DBG_MON_A3 (MTK_PIN_NO(128) | 7) 818 + 819 + #define PINMUX_GPIO129__FUNC_GPIO129 (MTK_PIN_NO(129) | 0) 820 + #define PINMUX_GPIO129__FUNC_MD1_SIM1_SRST (MTK_PIN_NO(129) | 1) 821 + #define PINMUX_GPIO129__FUNC_MD1_SIM2_SRST (MTK_PIN_NO(129) | 2) 822 + #define PINMUX_GPIO129__FUNC_CCU_JTAG_TCK (MTK_PIN_NO(129) | 3) 823 + #define PINMUX_GPIO129__FUNC_CONN_DSP_JCK (MTK_PIN_NO(129) | 4) 824 + #define PINMUX_GPIO129__FUNC_SCP_JTAG_TCK (MTK_PIN_NO(129) | 5) 825 + #define PINMUX_GPIO129__FUNC_LVTS_SDO (MTK_PIN_NO(129) | 6) 826 + #define PINMUX_GPIO129__FUNC_DBG_MON_A4 (MTK_PIN_NO(129) | 7) 827 + 828 + #define PINMUX_GPIO130__FUNC_GPIO130 (MTK_PIN_NO(130) | 0) 829 + #define PINMUX_GPIO130__FUNC_MD1_SIM1_SCLK (MTK_PIN_NO(130) | 1) 830 + #define PINMUX_GPIO130__FUNC_MD1_SIM2_SCLK (MTK_PIN_NO(130) | 2) 831 + #define PINMUX_GPIO130__FUNC_LVTS_26M (MTK_PIN_NO(130) | 6) 832 + #define PINMUX_GPIO130__FUNC_DBG_MON_A5 (MTK_PIN_NO(130) | 7) 833 + 834 + #define PINMUX_GPIO131__FUNC_GPIO131 (MTK_PIN_NO(131) | 0) 835 + #define PINMUX_GPIO131__FUNC_MD1_SIM2_SCLK (MTK_PIN_NO(131) | 1) 836 + #define PINMUX_GPIO131__FUNC_MD1_SIM1_SCLK (MTK_PIN_NO(131) | 2) 837 + #define PINMUX_GPIO131__FUNC_CCU_JTAG_TDI (MTK_PIN_NO(131) | 3) 838 + #define PINMUX_GPIO131__FUNC_CONN_DSP_JDI (MTK_PIN_NO(131) | 4) 839 + #define PINMUX_GPIO131__FUNC_SCP_JTAG_TDI (MTK_PIN_NO(131) | 5) 840 + #define PINMUX_GPIO131__FUNC_LVTS_SCK (MTK_PIN_NO(131) | 6) 841 + #define PINMUX_GPIO131__FUNC_DBG_MON_A0 (MTK_PIN_NO(131) | 7) 842 + 843 + #define PINMUX_GPIO132__FUNC_GPIO132 (MTK_PIN_NO(132) | 0) 844 + #define PINMUX_GPIO132__FUNC_MD1_SIM2_SRST (MTK_PIN_NO(132) | 1) 845 + #define PINMUX_GPIO132__FUNC_MD1_SIM1_SRST (MTK_PIN_NO(132) | 2) 846 + #define PINMUX_GPIO132__FUNC_CCU_JTAG_TMS (MTK_PIN_NO(132) | 3) 847 + #define PINMUX_GPIO132__FUNC_CONN_DSP_JMS (MTK_PIN_NO(132) | 4) 848 + #define PINMUX_GPIO132__FUNC_SCP_JTAG_TMS (MTK_PIN_NO(132) | 5) 849 + #define PINMUX_GPIO132__FUNC_LVTS_SDI (MTK_PIN_NO(132) | 6) 850 + #define PINMUX_GPIO132__FUNC_DBG_MON_A1 (MTK_PIN_NO(132) | 7) 851 + 852 + #define PINMUX_GPIO133__FUNC_GPIO133 (MTK_PIN_NO(133) | 0) 853 + #define PINMUX_GPIO133__FUNC_MD1_SIM2_SIO (MTK_PIN_NO(133) | 1) 854 + #define PINMUX_GPIO133__FUNC_MD1_SIM1_SIO (MTK_PIN_NO(133) | 2) 855 + #define PINMUX_GPIO133__FUNC_CCU_JTAG_TDO (MTK_PIN_NO(133) | 3) 856 + #define PINMUX_GPIO133__FUNC_CONN_DSP_JDO (MTK_PIN_NO(133) | 4) 857 + #define PINMUX_GPIO133__FUNC_SCP_JTAG_TDO (MTK_PIN_NO(133) | 5) 858 + #define PINMUX_GPIO133__FUNC_LVTS_SCF (MTK_PIN_NO(133) | 6) 859 + #define PINMUX_GPIO133__FUNC_DBG_MON_A2 (MTK_PIN_NO(133) | 7) 860 + 861 + #define PINMUX_GPIO134__FUNC_GPIO134 (MTK_PIN_NO(134) | 0) 862 + #define PINMUX_GPIO134__FUNC_MSDC1_CLK (MTK_PIN_NO(134) | 1) 863 + #define PINMUX_GPIO134__FUNC_PCM1_CLK (MTK_PIN_NO(134) | 2) 864 + #define PINMUX_GPIO134__FUNC_SPI5_B_MI (MTK_PIN_NO(134) | 3) 865 + #define PINMUX_GPIO134__FUNC_UDI_TCK (MTK_PIN_NO(134) | 4) 866 + #define PINMUX_GPIO134__FUNC_CONN_DSP_JCK (MTK_PIN_NO(134) | 5) 867 + #define PINMUX_GPIO134__FUNC_IPU_JTAG_TCK (MTK_PIN_NO(134) | 6) 868 + #define PINMUX_GPIO134__FUNC_JTCK_SEL3 (MTK_PIN_NO(134) | 7) 869 + 870 + #define PINMUX_GPIO135__FUNC_GPIO135 (MTK_PIN_NO(135) | 0) 871 + #define PINMUX_GPIO135__FUNC_MSDC1_CMD (MTK_PIN_NO(135) | 1) 872 + #define PINMUX_GPIO135__FUNC_PCM1_SYNC (MTK_PIN_NO(135) | 2) 873 + #define PINMUX_GPIO135__FUNC_SPI5_B_CSB (MTK_PIN_NO(135) | 3) 874 + #define PINMUX_GPIO135__FUNC_UDI_TMS (MTK_PIN_NO(135) | 4) 875 + #define PINMUX_GPIO135__FUNC_CONN_DSP_JMS (MTK_PIN_NO(135) | 5) 876 + #define PINMUX_GPIO135__FUNC_IPU_JTAG_TMS (MTK_PIN_NO(135) | 6) 877 + #define PINMUX_GPIO135__FUNC_JTMS_SEL3 (MTK_PIN_NO(135) | 7) 878 + 879 + #define PINMUX_GPIO136__FUNC_GPIO136 (MTK_PIN_NO(136) | 0) 880 + #define PINMUX_GPIO136__FUNC_MSDC1_DAT3 (MTK_PIN_NO(136) | 1) 881 + #define PINMUX_GPIO136__FUNC_PCM1_DI (MTK_PIN_NO(136) | 2) 882 + #define PINMUX_GPIO136__FUNC_SPI5_B_MO (MTK_PIN_NO(136) | 3) 883 + #define PINMUX_GPIO136__FUNC_CONN_TCXOENA_REQ (MTK_PIN_NO(136) | 4) 884 + #define PINMUX_GPIO136__FUNC_CONN_DSP_JINTP (MTK_PIN_NO(136) | 5) 885 + #define PINMUX_GPIO136__FUNC_CONN_MCU_AICE_TMSC (MTK_PIN_NO(136) | 6) 886 + 887 + #define PINMUX_GPIO137__FUNC_GPIO137 (MTK_PIN_NO(137) | 0) 888 + #define PINMUX_GPIO137__FUNC_MSDC1_DAT0 (MTK_PIN_NO(137) | 1) 889 + #define PINMUX_GPIO137__FUNC_PCM1_DO0 (MTK_PIN_NO(137) | 2) 890 + #define PINMUX_GPIO137__FUNC_SPI5_B_CLK (MTK_PIN_NO(137) | 3) 891 + #define PINMUX_GPIO137__FUNC_UDI_TDI (MTK_PIN_NO(137) | 4) 892 + #define PINMUX_GPIO137__FUNC_CONN_DSP_JDI (MTK_PIN_NO(137) | 5) 893 + #define PINMUX_GPIO137__FUNC_IPU_JTAG_TDI (MTK_PIN_NO(137) | 6) 894 + #define PINMUX_GPIO137__FUNC_JTDI_SEL3 (MTK_PIN_NO(137) | 7) 895 + 896 + #define PINMUX_GPIO138__FUNC_GPIO138 (MTK_PIN_NO(138) | 0) 897 + #define PINMUX_GPIO138__FUNC_MSDC1_DAT2 (MTK_PIN_NO(138) | 1) 898 + #define PINMUX_GPIO138__FUNC_PCM1_DO2 (MTK_PIN_NO(138) | 2) 899 + #define PINMUX_GPIO138__FUNC_ANT_SEL11 (MTK_PIN_NO(138) | 3) 900 + #define PINMUX_GPIO138__FUNC_UDI_NTRST (MTK_PIN_NO(138) | 4) 901 + #define PINMUX_GPIO138__FUNC_CONN_MCU_AICE_TCKC (MTK_PIN_NO(138) | 5) 902 + #define PINMUX_GPIO138__FUNC_IPU_JTAG_TRST (MTK_PIN_NO(138) | 6) 903 + #define PINMUX_GPIO138__FUNC_JTRSTN_SEL3 (MTK_PIN_NO(138) | 7) 904 + 905 + #define PINMUX_GPIO139__FUNC_GPIO139 (MTK_PIN_NO(139) | 0) 906 + #define PINMUX_GPIO139__FUNC_MSDC1_DAT1 (MTK_PIN_NO(139) | 1) 907 + #define PINMUX_GPIO139__FUNC_PCM1_DO1 (MTK_PIN_NO(139) | 2) 908 + #define PINMUX_GPIO139__FUNC_ANT_SEL12 (MTK_PIN_NO(139) | 3) 909 + #define PINMUX_GPIO139__FUNC_UDI_TDO (MTK_PIN_NO(139) | 4) 910 + #define PINMUX_GPIO139__FUNC_CONN_DSP_JDO (MTK_PIN_NO(139) | 5) 911 + #define PINMUX_GPIO139__FUNC_IPU_JTAG_TDO (MTK_PIN_NO(139) | 6) 912 + #define PINMUX_GPIO139__FUNC_JTDO_SEL3 (MTK_PIN_NO(139) | 7) 913 + 914 + #define PINMUX_GPIO140__FUNC_GPIO140 (MTK_PIN_NO(140) | 0) 915 + #define PINMUX_GPIO140__FUNC_MD_INT1_C2K_UIM0_HOT_PLUG (MTK_PIN_NO(140) | 1) 916 + #define PINMUX_GPIO140__FUNC_MD_INT2_C2K_UIM1_HOT_PLUG (MTK_PIN_NO(140) | 2) 917 + #define PINMUX_GPIO140__FUNC_ADSP_URXD0 (MTK_PIN_NO(140) | 3) 918 + #define PINMUX_GPIO140__FUNC_SCL_6306 (MTK_PIN_NO(140) | 4) 919 + #define PINMUX_GPIO140__FUNC_PTA_RXD (MTK_PIN_NO(140) | 5) 920 + #define PINMUX_GPIO140__FUNC_SSPM_URXD_AO (MTK_PIN_NO(140) | 6) 921 + 922 + #define PINMUX_GPIO141__FUNC_GPIO141 (MTK_PIN_NO(141) | 0) 923 + #define PINMUX_GPIO141__FUNC_MD_INT2_C2K_UIM1_HOT_PLUG (MTK_PIN_NO(141) | 1) 924 + #define PINMUX_GPIO141__FUNC_MD_INT1_C2K_UIM0_HOT_PLUG (MTK_PIN_NO(141) | 2) 925 + #define PINMUX_GPIO141__FUNC_ADSP_UTXD0 (MTK_PIN_NO(141) | 3) 926 + #define PINMUX_GPIO141__FUNC_SDA_6306 (MTK_PIN_NO(141) | 4) 927 + #define PINMUX_GPIO141__FUNC_PTA_TXD (MTK_PIN_NO(141) | 5) 928 + #define PINMUX_GPIO141__FUNC_SSPM_UTXD_AO (MTK_PIN_NO(141) | 6) 929 + 930 + #define PINMUX_GPIO142__FUNC_GPIO142 (MTK_PIN_NO(142) | 0) 931 + #define PINMUX_GPIO142__FUNC_SCP_VREQ_VAO (MTK_PIN_NO(142) | 1) 932 + #define PINMUX_GPIO142__FUNC_DVFSRC_EXT_REQ (MTK_PIN_NO(142) | 2) 933 + 934 + #define PINMUX_GPIO143__FUNC_GPIO143 (MTK_PIN_NO(143) | 0) 935 + #define PINMUX_GPIO143__FUNC_AUD_DAT_MOSI2 (MTK_PIN_NO(143) | 1) 936 + #define PINMUX_GPIO143__FUNC_DBG_MON_A9 (MTK_PIN_NO(143) | 7) 937 + 938 + #define PINMUX_GPIO144__FUNC_GPIO144 (MTK_PIN_NO(144) | 0) 939 + #define PINMUX_GPIO144__FUNC_AUD_NLE_MOSI1 (MTK_PIN_NO(144) | 1) 940 + #define PINMUX_GPIO144__FUNC_AUD_CLK_MISO (MTK_PIN_NO(144) | 2) 941 + #define PINMUX_GPIO144__FUNC_I2S2_MCK (MTK_PIN_NO(144) | 3) 942 + #define PINMUX_GPIO144__FUNC_UDI_TCK (MTK_PIN_NO(144) | 5) 943 + #define PINMUX_GPIO144__FUNC_UFS_UNIPRO_SDA (MTK_PIN_NO(144) | 6) 944 + #define PINMUX_GPIO144__FUNC_DBG_MON_A10 (MTK_PIN_NO(144) | 7) 945 + 946 + #define PINMUX_GPIO145__FUNC_GPIO145 (MTK_PIN_NO(145) | 0) 947 + #define PINMUX_GPIO145__FUNC_AUD_NLE_MOSI0 (MTK_PIN_NO(145) | 1) 948 + #define PINMUX_GPIO145__FUNC_AUD_SYNC_MISO (MTK_PIN_NO(145) | 2) 949 + #define PINMUX_GPIO145__FUNC_I2S2_BCK (MTK_PIN_NO(145) | 3) 950 + #define PINMUX_GPIO145__FUNC_UDI_TMS (MTK_PIN_NO(145) | 5) 951 + #define PINMUX_GPIO145__FUNC_DBG_MON_A11 (MTK_PIN_NO(145) | 7) 952 + 953 + #define PINMUX_GPIO146__FUNC_GPIO146 (MTK_PIN_NO(146) | 0) 954 + #define PINMUX_GPIO146__FUNC_AUD_DAT_MISO2 (MTK_PIN_NO(146) | 1) 955 + #define PINMUX_GPIO146__FUNC_I2S2_DI2 (MTK_PIN_NO(146) | 3) 956 + #define PINMUX_GPIO146__FUNC_UDI_TDO (MTK_PIN_NO(146) | 5) 957 + #define PINMUX_GPIO146__FUNC_DBG_MON_A14 (MTK_PIN_NO(146) | 7) 958 + 959 + #define PINMUX_GPIO147__FUNC_GPIO147 (MTK_PIN_NO(147) | 0) 960 + #define PINMUX_GPIO147__FUNC_ANT_SEL0 (MTK_PIN_NO(147) | 1) 961 + #define PINMUX_GPIO147__FUNC_PWM_3 (MTK_PIN_NO(147) | 2) 962 + 963 + #define PINMUX_GPIO148__FUNC_GPIO148 (MTK_PIN_NO(148) | 0) 964 + #define PINMUX_GPIO148__FUNC_ANT_SEL1 (MTK_PIN_NO(148) | 1) 965 + #define PINMUX_GPIO148__FUNC_SPI0_B_MI (MTK_PIN_NO(148) | 2) 966 + #define PINMUX_GPIO148__FUNC_SSPM_URXD_AO (MTK_PIN_NO(148) | 3) 967 + #define PINMUX_GPIO148__FUNC_TP_UCTS2_AO (MTK_PIN_NO(148) | 5) 968 + #define PINMUX_GPIO148__FUNC_CLKM0 (MTK_PIN_NO(148) | 6) 969 + 970 + #define PINMUX_GPIO149__FUNC_GPIO149 (MTK_PIN_NO(149) | 0) 971 + #define PINMUX_GPIO149__FUNC_ANT_SEL2 (MTK_PIN_NO(149) | 1) 972 + #define PINMUX_GPIO149__FUNC_SPI0_B_CSB (MTK_PIN_NO(149) | 2) 973 + #define PINMUX_GPIO149__FUNC_SSPM_UTXD_AO (MTK_PIN_NO(149) | 3) 974 + #define PINMUX_GPIO149__FUNC_TP_URTS2_AO (MTK_PIN_NO(149) | 5) 975 + #define PINMUX_GPIO149__FUNC_CONN_TCXOENA_REQ (MTK_PIN_NO(149) | 6) 976 + 977 + #define PINMUX_GPIO150__FUNC_GPIO150 (MTK_PIN_NO(150) | 0) 978 + #define PINMUX_GPIO150__FUNC_ANT_SEL3 (MTK_PIN_NO(150) | 1) 979 + #define PINMUX_GPIO150__FUNC_SPI0_B_MO (MTK_PIN_NO(150) | 2) 980 + #define PINMUX_GPIO150__FUNC_UCTS1 (MTK_PIN_NO(150) | 3) 981 + #define PINMUX_GPIO150__FUNC_TP_UCTS1_AO (MTK_PIN_NO(150) | 5) 982 + #define PINMUX_GPIO150__FUNC_IDDIG (MTK_PIN_NO(150) | 6) 983 + #define PINMUX_GPIO150__FUNC_SCL9 (MTK_PIN_NO(150) | 7) 984 + 985 + #define PINMUX_GPIO151__FUNC_GPIO151 (MTK_PIN_NO(151) | 0) 986 + #define PINMUX_GPIO151__FUNC_ANT_SEL4 (MTK_PIN_NO(151) | 1) 987 + #define PINMUX_GPIO151__FUNC_SPI0_B_CLK (MTK_PIN_NO(151) | 2) 988 + #define PINMUX_GPIO151__FUNC_URTS1 (MTK_PIN_NO(151) | 3) 989 + #define PINMUX_GPIO151__FUNC_TP_URTS1_AO (MTK_PIN_NO(151) | 5) 990 + #define PINMUX_GPIO151__FUNC_USB_DRVVBUS (MTK_PIN_NO(151) | 6) 991 + #define PINMUX_GPIO151__FUNC_SDA9 (MTK_PIN_NO(151) | 7) 992 + 993 + #define PINMUX_GPIO152__FUNC_GPIO152 (MTK_PIN_NO(152) | 0) 994 + #define PINMUX_GPIO152__FUNC_ANT_SEL5 (MTK_PIN_NO(152) | 1) 995 + #define PINMUX_GPIO152__FUNC_SPI1_B_MI (MTK_PIN_NO(152) | 2) 996 + #define PINMUX_GPIO152__FUNC_CLKM3 (MTK_PIN_NO(152) | 3) 997 + #define PINMUX_GPIO152__FUNC_TP_URXD1_AO (MTK_PIN_NO(152) | 5) 998 + #define PINMUX_GPIO152__FUNC_SCP_SPI1_B_MI (MTK_PIN_NO(152) | 6) 999 + #define PINMUX_GPIO152__FUNC_SCL8 (MTK_PIN_NO(152) | 7) 1000 + 1001 + #define PINMUX_GPIO153__FUNC_GPIO153 (MTK_PIN_NO(153) | 0) 1002 + #define PINMUX_GPIO153__FUNC_ANT_SEL6 (MTK_PIN_NO(153) | 1) 1003 + #define PINMUX_GPIO153__FUNC_SPI1_B_CSB (MTK_PIN_NO(153) | 2) 1004 + #define PINMUX_GPIO153__FUNC_SRCLKENAI0 (MTK_PIN_NO(153) | 3) 1005 + #define PINMUX_GPIO153__FUNC_PWM_0 (MTK_PIN_NO(153) | 4) 1006 + #define PINMUX_GPIO153__FUNC_TP_UTXD1_AO (MTK_PIN_NO(153) | 5) 1007 + #define PINMUX_GPIO153__FUNC_SCP_SPI1_B_CS (MTK_PIN_NO(153) | 6) 1008 + #define PINMUX_GPIO153__FUNC_SDA8 (MTK_PIN_NO(153) | 7) 1009 + 1010 + #define PINMUX_GPIO154__FUNC_GPIO154 (MTK_PIN_NO(154) | 0) 1011 + #define PINMUX_GPIO154__FUNC_ANT_SEL7 (MTK_PIN_NO(154) | 1) 1012 + #define PINMUX_GPIO154__FUNC_SPI1_B_MO (MTK_PIN_NO(154) | 2) 1013 + #define PINMUX_GPIO154__FUNC_SRCLKENAI1 (MTK_PIN_NO(154) | 3) 1014 + #define PINMUX_GPIO154__FUNC_TP_URXD2_AO (MTK_PIN_NO(154) | 5) 1015 + #define PINMUX_GPIO154__FUNC_SCP_SPI1_B_MO (MTK_PIN_NO(154) | 6) 1016 + 1017 + #define PINMUX_GPIO155__FUNC_GPIO155 (MTK_PIN_NO(155) | 0) 1018 + #define PINMUX_GPIO155__FUNC_ANT_SEL8 (MTK_PIN_NO(155) | 1) 1019 + #define PINMUX_GPIO155__FUNC_SPI1_B_CLK (MTK_PIN_NO(155) | 2) 1020 + #define PINMUX_GPIO155__FUNC_MD_INT0 (MTK_PIN_NO(155) | 3) 1021 + #define PINMUX_GPIO155__FUNC_TP_UTXD2_AO (MTK_PIN_NO(155) | 5) 1022 + #define PINMUX_GPIO155__FUNC_SCP_SPI1_B_CK (MTK_PIN_NO(155) | 6) 1023 + #define PINMUX_GPIO155__FUNC_DBG_MON_A15 (MTK_PIN_NO(155) | 7) 1024 + 1025 + #define PINMUX_GPIO156__FUNC_GPIO156 (MTK_PIN_NO(156) | 0) 1026 + #define PINMUX_GPIO156__FUNC_CONN_TOP_CLK (MTK_PIN_NO(156) | 1) 1027 + #define PINMUX_GPIO156__FUNC_AUXIF_CLK0 (MTK_PIN_NO(156) | 2) 1028 + #define PINMUX_GPIO156__FUNC_DBG_MON_A16 (MTK_PIN_NO(156) | 7) 1029 + 1030 + #define PINMUX_GPIO157__FUNC_GPIO157 (MTK_PIN_NO(157) | 0) 1031 + #define PINMUX_GPIO157__FUNC_CONN_TOP_DATA (MTK_PIN_NO(157) | 1) 1032 + #define PINMUX_GPIO157__FUNC_AUXIF_ST0 (MTK_PIN_NO(157) | 2) 1033 + #define PINMUX_GPIO157__FUNC_DBG_MON_A17 (MTK_PIN_NO(157) | 7) 1034 + 1035 + #define PINMUX_GPIO158__FUNC_GPIO158 (MTK_PIN_NO(158) | 0) 1036 + #define PINMUX_GPIO158__FUNC_CONN_HRST_B (MTK_PIN_NO(158) | 1) 1037 + #define PINMUX_GPIO158__FUNC_DBG_MON_A18 (MTK_PIN_NO(158) | 7) 1038 + 1039 + #define PINMUX_GPIO159__FUNC_GPIO159 (MTK_PIN_NO(159) | 0) 1040 + #define PINMUX_GPIO159__FUNC_CONN_WB_PTA (MTK_PIN_NO(159) | 1) 1041 + #define PINMUX_GPIO159__FUNC_DBG_MON_A19 (MTK_PIN_NO(159) | 7) 1042 + 1043 + #define PINMUX_GPIO160__FUNC_GPIO160 (MTK_PIN_NO(160) | 0) 1044 + #define PINMUX_GPIO160__FUNC_CONN_BT_CLK (MTK_PIN_NO(160) | 1) 1045 + #define PINMUX_GPIO160__FUNC_AUXIF_CLK1 (MTK_PIN_NO(160) | 2) 1046 + #define PINMUX_GPIO160__FUNC_DBG_MON_A20 (MTK_PIN_NO(160) | 7) 1047 + 1048 + #define PINMUX_GPIO161__FUNC_GPIO161 (MTK_PIN_NO(161) | 0) 1049 + #define PINMUX_GPIO161__FUNC_CONN_BT_DATA (MTK_PIN_NO(161) | 1) 1050 + #define PINMUX_GPIO161__FUNC_AUXIF_ST1 (MTK_PIN_NO(161) | 2) 1051 + #define PINMUX_GPIO161__FUNC_DBG_MON_A21 (MTK_PIN_NO(161) | 7) 1052 + 1053 + #define PINMUX_GPIO162__FUNC_GPIO162 (MTK_PIN_NO(162) | 0) 1054 + #define PINMUX_GPIO162__FUNC_CONN_WF_CTRL0 (MTK_PIN_NO(162) | 1) 1055 + #define PINMUX_GPIO162__FUNC_DBG_MON_A22 (MTK_PIN_NO(162) | 7) 1056 + 1057 + #define PINMUX_GPIO163__FUNC_GPIO163 (MTK_PIN_NO(163) | 0) 1058 + #define PINMUX_GPIO163__FUNC_CONN_WF_CTRL1 (MTK_PIN_NO(163) | 1) 1059 + #define PINMUX_GPIO163__FUNC_UFS_MPHY_SCL (MTK_PIN_NO(163) | 2) 1060 + #define PINMUX_GPIO163__FUNC_DBG_MON_A23 (MTK_PIN_NO(163) | 7) 1061 + 1062 + #define PINMUX_GPIO164__FUNC_GPIO164 (MTK_PIN_NO(164) | 0) 1063 + #define PINMUX_GPIO164__FUNC_CONN_WF_CTRL2 (MTK_PIN_NO(164) | 1) 1064 + #define PINMUX_GPIO164__FUNC_UFS_MPHY_SDA (MTK_PIN_NO(164) | 2) 1065 + #define PINMUX_GPIO164__FUNC_DBG_MON_A24 (MTK_PIN_NO(164) | 7) 1066 + 1067 + #define PINMUX_GPIO165__FUNC_GPIO165 (MTK_PIN_NO(165) | 0) 1068 + #define PINMUX_GPIO165__FUNC_CONN_WF_CTRL3 (MTK_PIN_NO(165) | 1) 1069 + #define PINMUX_GPIO165__FUNC_UFS_UNIPRO_SDA (MTK_PIN_NO(165) | 2) 1070 + #define PINMUX_GPIO165__FUNC_DBG_MON_A25 (MTK_PIN_NO(165) | 7) 1071 + 1072 + #define PINMUX_GPIO166__FUNC_GPIO166 (MTK_PIN_NO(166) | 0) 1073 + #define PINMUX_GPIO166__FUNC_CONN_WF_CTRL4 (MTK_PIN_NO(166) | 1) 1074 + #define PINMUX_GPIO166__FUNC_UFS_UNIPRO_SCL (MTK_PIN_NO(166) | 2) 1075 + #define PINMUX_GPIO166__FUNC_DBG_MON_A26 (MTK_PIN_NO(166) | 7) 1076 + 1077 + #define PINMUX_GPIO167__FUNC_GPIO167 (MTK_PIN_NO(167) | 0) 1078 + #define PINMUX_GPIO167__FUNC_MSDC0_CMD (MTK_PIN_NO(167) | 1) 1079 + 1080 + #define PINMUX_GPIO168__FUNC_GPIO168 (MTK_PIN_NO(168) | 0) 1081 + #define PINMUX_GPIO168__FUNC_MSDC0_DAT0 (MTK_PIN_NO(168) | 1) 1082 + 1083 + #define PINMUX_GPIO169__FUNC_GPIO169 (MTK_PIN_NO(169) | 0) 1084 + #define PINMUX_GPIO169__FUNC_MSDC0_DAT2 (MTK_PIN_NO(169) | 1) 1085 + 1086 + #define PINMUX_GPIO170__FUNC_GPIO170 (MTK_PIN_NO(170) | 0) 1087 + #define PINMUX_GPIO170__FUNC_MSDC0_DAT4 (MTK_PIN_NO(170) | 1) 1088 + 1089 + #define PINMUX_GPIO171__FUNC_GPIO171 (MTK_PIN_NO(171) | 0) 1090 + #define PINMUX_GPIO171__FUNC_MSDC0_DAT6 (MTK_PIN_NO(171) | 1) 1091 + 1092 + #define PINMUX_GPIO172__FUNC_GPIO172 (MTK_PIN_NO(172) | 0) 1093 + #define PINMUX_GPIO172__FUNC_MSDC0_DAT1 (MTK_PIN_NO(172) | 1) 1094 + 1095 + #define PINMUX_GPIO173__FUNC_GPIO173 (MTK_PIN_NO(173) | 0) 1096 + #define PINMUX_GPIO173__FUNC_MSDC0_DAT5 (MTK_PIN_NO(173) | 1) 1097 + 1098 + #define PINMUX_GPIO174__FUNC_GPIO174 (MTK_PIN_NO(174) | 0) 1099 + #define PINMUX_GPIO174__FUNC_MSDC0_DAT7 (MTK_PIN_NO(174) | 1) 1100 + 1101 + #define PINMUX_GPIO175__FUNC_GPIO175 (MTK_PIN_NO(175) | 0) 1102 + #define PINMUX_GPIO175__FUNC_MSDC0_DSL (MTK_PIN_NO(175) | 1) 1103 + #define PINMUX_GPIO175__FUNC_ANT_SEL9 (MTK_PIN_NO(175) | 2) 1104 + 1105 + #define PINMUX_GPIO176__FUNC_GPIO176 (MTK_PIN_NO(176) | 0) 1106 + #define PINMUX_GPIO176__FUNC_MSDC0_CLK (MTK_PIN_NO(176) | 1) 1107 + #define PINMUX_GPIO176__FUNC_ANT_SEL10 (MTK_PIN_NO(176) | 2) 1108 + 1109 + #define PINMUX_GPIO177__FUNC_GPIO177 (MTK_PIN_NO(177) | 0) 1110 + #define PINMUX_GPIO177__FUNC_MSDC0_DAT3 (MTK_PIN_NO(177) | 1) 1111 + 1112 + #define PINMUX_GPIO178__FUNC_GPIO178 (MTK_PIN_NO(178) | 0) 1113 + #define PINMUX_GPIO178__FUNC_MSDC0_RSTB (MTK_PIN_NO(178) | 1) 1114 + 1115 + #define PINMUX_GPIO179__FUNC_GPIO179 (MTK_PIN_NO(179) | 0) 1116 + #define PINMUX_GPIO179__FUNC_RFIC0_BSI_EN (MTK_PIN_NO(179) | 1) 1117 + 1118 + #define PINMUX_GPIO180__FUNC_GPIO180 (MTK_PIN_NO(180) | 0) 1119 + #define PINMUX_GPIO180__FUNC_RFIC0_BSI_CK (MTK_PIN_NO(180) | 1) 1120 + 1121 + #define PINMUX_GPIO181__FUNC_GPIO181 (MTK_PIN_NO(181) | 0) 1122 + #define PINMUX_GPIO181__FUNC_SRCLKENA0 (MTK_PIN_NO(181) | 1) 1123 + 1124 + #define PINMUX_GPIO182__FUNC_GPIO182 (MTK_PIN_NO(182) | 0) 1125 + #define PINMUX_GPIO182__FUNC_SRCLKENA1 (MTK_PIN_NO(182) | 1) 1126 + 1127 + #define PINMUX_GPIO183__FUNC_GPIO183 (MTK_PIN_NO(183) | 0) 1128 + #define PINMUX_GPIO183__FUNC_WATCHDOG (MTK_PIN_NO(183) | 1) 1129 + 1130 + #define PINMUX_GPIO184__FUNC_GPIO184 (MTK_PIN_NO(184) | 0) 1131 + #define PINMUX_GPIO184__FUNC_PWRAP_SPI0_MI (MTK_PIN_NO(184) | 1) 1132 + #define PINMUX_GPIO184__FUNC_PWRAP_SPI0_MO (MTK_PIN_NO(184) | 2) 1133 + 1134 + #define PINMUX_GPIO185__FUNC_GPIO185 (MTK_PIN_NO(185) | 0) 1135 + #define PINMUX_GPIO185__FUNC_PWRAP_SPI0_CSN (MTK_PIN_NO(185) | 1) 1136 + 1137 + #define PINMUX_GPIO186__FUNC_GPIO186 (MTK_PIN_NO(186) | 0) 1138 + #define PINMUX_GPIO186__FUNC_PWRAP_SPI0_MO (MTK_PIN_NO(186) | 1) 1139 + #define PINMUX_GPIO186__FUNC_PWRAP_SPI0_MI (MTK_PIN_NO(186) | 2) 1140 + 1141 + #define PINMUX_GPIO187__FUNC_GPIO187 (MTK_PIN_NO(187) | 0) 1142 + #define PINMUX_GPIO187__FUNC_PWRAP_SPI0_CK (MTK_PIN_NO(187) | 1) 1143 + 1144 + #define PINMUX_GPIO188__FUNC_GPIO188 (MTK_PIN_NO(188) | 0) 1145 + #define PINMUX_GPIO188__FUNC_RTC32K_CK (MTK_PIN_NO(188) | 1) 1146 + 1147 + #define PINMUX_GPIO189__FUNC_GPIO189 (MTK_PIN_NO(189) | 0) 1148 + #define PINMUX_GPIO189__FUNC_AUD_CLK_MOSI (MTK_PIN_NO(189) | 1) 1149 + #define PINMUX_GPIO189__FUNC_I2S1_MCK (MTK_PIN_NO(189) | 3) 1150 + #define PINMUX_GPIO189__FUNC_UFS_UNIPRO_SCL (MTK_PIN_NO(189) | 6) 1151 + 1152 + #define PINMUX_GPIO190__FUNC_GPIO190 (MTK_PIN_NO(190) | 0) 1153 + #define PINMUX_GPIO190__FUNC_AUD_SYNC_MOSI (MTK_PIN_NO(190) | 1) 1154 + #define PINMUX_GPIO190__FUNC_I2S1_BCK (MTK_PIN_NO(190) | 3) 1155 + #define PINMUX_GPIO190__FUNC_DBG_MON_A6 (MTK_PIN_NO(190) | 7) 1156 + 1157 + #define PINMUX_GPIO191__FUNC_GPIO191 (MTK_PIN_NO(191) | 0) 1158 + #define PINMUX_GPIO191__FUNC_AUD_DAT_MOSI0 (MTK_PIN_NO(191) | 1) 1159 + #define PINMUX_GPIO191__FUNC_I2S1_LRCK (MTK_PIN_NO(191) | 3) 1160 + #define PINMUX_GPIO191__FUNC_DBG_MON_A7 (MTK_PIN_NO(191) | 7) 1161 + 1162 + #define PINMUX_GPIO192__FUNC_GPIO192 (MTK_PIN_NO(192) | 0) 1163 + #define PINMUX_GPIO192__FUNC_AUD_DAT_MOSI1 (MTK_PIN_NO(192) | 1) 1164 + #define PINMUX_GPIO192__FUNC_I2S1_DO (MTK_PIN_NO(192) | 3) 1165 + #define PINMUX_GPIO192__FUNC_UFS_MPHY_SDA (MTK_PIN_NO(192) | 6) 1166 + #define PINMUX_GPIO192__FUNC_DBG_MON_A8 (MTK_PIN_NO(192) | 7) 1167 + 1168 + #define PINMUX_GPIO193__FUNC_GPIO193 (MTK_PIN_NO(193) | 0) 1169 + #define PINMUX_GPIO193__FUNC_AUD_DAT_MISO0 (MTK_PIN_NO(193) | 1) 1170 + #define PINMUX_GPIO193__FUNC_VOW_DAT_MISO (MTK_PIN_NO(193) | 2) 1171 + #define PINMUX_GPIO193__FUNC_I2S2_LRCK (MTK_PIN_NO(193) | 3) 1172 + #define PINMUX_GPIO193__FUNC_UDI_TDI (MTK_PIN_NO(193) | 5) 1173 + #define PINMUX_GPIO193__FUNC_DBG_MON_A12 (MTK_PIN_NO(193) | 7) 1174 + 1175 + #define PINMUX_GPIO194__FUNC_GPIO194 (MTK_PIN_NO(194) | 0) 1176 + #define PINMUX_GPIO194__FUNC_AUD_DAT_MISO1 (MTK_PIN_NO(194) | 1) 1177 + #define PINMUX_GPIO194__FUNC_VOW_CLK_MISO (MTK_PIN_NO(194) | 2) 1178 + #define PINMUX_GPIO194__FUNC_I2S2_DI (MTK_PIN_NO(194) | 3) 1179 + #define PINMUX_GPIO194__FUNC_UDI_NTRST (MTK_PIN_NO(194) | 5) 1180 + #define PINMUX_GPIO194__FUNC_UFS_MPHY_SCL (MTK_PIN_NO(194) | 6) 1181 + #define PINMUX_GPIO194__FUNC_DBG_MON_A13 (MTK_PIN_NO(194) | 7) 1182 + 1183 + #define PINMUX_GPIO195__FUNC_GPIO195 (MTK_PIN_NO(195) | 0) 1184 + #define PINMUX_GPIO195__FUNC_ADSP_JTAG_TCK (MTK_PIN_NO(195) | 3) 1185 + #define PINMUX_GPIO195__FUNC_VPU_UDI_TCK (MTK_PIN_NO(195) | 4) 1186 + #define PINMUX_GPIO195__FUNC_SPM_JTAG_TCK (MTK_PIN_NO(195) | 5) 1187 + #define PINMUX_GPIO195__FUNC_SSPM_JTAG_TCK (MTK_PIN_NO(195) | 6) 1188 + 1189 + #define PINMUX_GPIO196__FUNC_GPIO196 (MTK_PIN_NO(196) | 0) 1190 + #define PINMUX_GPIO196__FUNC_CMMCLK4 (MTK_PIN_NO(196) | 1) 1191 + #define PINMUX_GPIO196__FUNC_ADSP_JTAG_TDI (MTK_PIN_NO(196) | 3) 1192 + #define PINMUX_GPIO196__FUNC_VPU_UDI_TDI (MTK_PIN_NO(196) | 4) 1193 + #define PINMUX_GPIO196__FUNC_SPM_JTAG_TDI (MTK_PIN_NO(196) | 5) 1194 + #define PINMUX_GPIO196__FUNC_SSPM_JTAG_TDI (MTK_PIN_NO(196) | 6) 1195 + 1196 + #define PINMUX_GPIO197__FUNC_GPIO197 (MTK_PIN_NO(197) | 0) 1197 + #define PINMUX_GPIO197__FUNC_ADSP_JTAG_TDO (MTK_PIN_NO(197) | 3) 1198 + #define PINMUX_GPIO197__FUNC_VPU_UDI_TDO (MTK_PIN_NO(197) | 4) 1199 + #define PINMUX_GPIO197__FUNC_SPM_JTAG_TDO (MTK_PIN_NO(197) | 5) 1200 + #define PINMUX_GPIO197__FUNC_SSPM_JTAG_TDO (MTK_PIN_NO(197) | 6) 1201 + 1202 + #define PINMUX_GPIO198__FUNC_GPIO198 (MTK_PIN_NO(198) | 0) 1203 + #define PINMUX_GPIO198__FUNC_SCL7 (MTK_PIN_NO(198) | 1) 1204 + 1205 + #define PINMUX_GPIO199__FUNC_GPIO199 (MTK_PIN_NO(199) | 0) 1206 + #define PINMUX_GPIO199__FUNC_SDA7 (MTK_PIN_NO(199) | 1) 1207 + 1208 + #define PINMUX_GPIO200__FUNC_GPIO200 (MTK_PIN_NO(200) | 0) 1209 + #define PINMUX_GPIO200__FUNC_URXD1 (MTK_PIN_NO(200) | 1) 1210 + #define PINMUX_GPIO200__FUNC_ADSP_URXD0 (MTK_PIN_NO(200) | 2) 1211 + #define PINMUX_GPIO200__FUNC_TP_URXD1_AO (MTK_PIN_NO(200) | 3) 1212 + #define PINMUX_GPIO200__FUNC_SSPM_URXD_AO (MTK_PIN_NO(200) | 4) 1213 + #define PINMUX_GPIO200__FUNC_TP_URXD2_AO (MTK_PIN_NO(200) | 5) 1214 + #define PINMUX_GPIO200__FUNC_MBISTREADEN_TRIGGER (MTK_PIN_NO(200) | 6) 1215 + 1216 + #define PINMUX_GPIO201__FUNC_GPIO201 (MTK_PIN_NO(201) | 0) 1217 + #define PINMUX_GPIO201__FUNC_UTXD1 (MTK_PIN_NO(201) | 1) 1218 + #define PINMUX_GPIO201__FUNC_ADSP_UTXD0 (MTK_PIN_NO(201) | 2) 1219 + #define PINMUX_GPIO201__FUNC_TP_UTXD1_AO (MTK_PIN_NO(201) | 3) 1220 + #define PINMUX_GPIO201__FUNC_SSPM_UTXD_AO (MTK_PIN_NO(201) | 4) 1221 + #define PINMUX_GPIO201__FUNC_TP_UTXD2_AO (MTK_PIN_NO(201) | 5) 1222 + #define PINMUX_GPIO201__FUNC_MBISTWRITEEN_TRIGGER (MTK_PIN_NO(201) | 6) 1223 + 1224 + #define PINMUX_GPIO202__FUNC_GPIO202 (MTK_PIN_NO(202) | 0) 1225 + #define PINMUX_GPIO202__FUNC_PWM_3 (MTK_PIN_NO(202) | 1) 1226 + #define PINMUX_GPIO202__FUNC_CLKM3 (MTK_PIN_NO(202) | 2) 1227 + 1228 + #define PINMUX_GPIO203__FUNC_GPIO203 (MTK_PIN_NO(203) | 0) 1229 + 1230 + #define PINMUX_GPIO204__FUNC_GPIO204 (MTK_PIN_NO(204) | 0) 1231 + 1232 + #define PINMUX_GPIO205__FUNC_GPIO205 (MTK_PIN_NO(205) | 0) 1233 + 1234 + #define PINMUX_GPIO206__FUNC_GPIO206 (MTK_PIN_NO(206) | 0) 1235 + 1236 + #define PINMUX_GPIO207__FUNC_GPIO207 (MTK_PIN_NO(207) | 0) 1237 + 1238 + #define PINMUX_GPIO208__FUNC_GPIO208 (MTK_PIN_NO(208) | 0) 1239 + 1240 + #define PINMUX_GPIO209__FUNC_GPIO209 (MTK_PIN_NO(209) | 0) 1241 + 1242 + #endif /* __MT6779-PINFUNC_H */
+1 -1
include/dt-bindings/pinctrl/omap.h
··· 65 65 #define DM814X_IOPAD(pa, val) OMAP_IOPAD_OFFSET((pa), 0x0800) (val) 66 66 #define DM816X_IOPAD(pa, val) OMAP_IOPAD_OFFSET((pa), 0x0800) (val) 67 67 #define AM33XX_IOPAD(pa, val) OMAP_IOPAD_OFFSET((pa), 0x0800) (val) 68 - #define AM33XX_PADCONF(pa, dir, mux) OMAP_IOPAD_OFFSET((pa), 0x0800) ((dir) | (mux)) 68 + #define AM33XX_PADCONF(pa, conf, mux) OMAP_IOPAD_OFFSET((pa), 0x0800) (conf) (mux) 69 69 70 70 /* 71 71 * Macros to allow using the offset from the padconf physical address