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

Merge tag 'pinctrl-v5.15-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 pin control changes for the v5.15 kernel cycle, no
core changes at all this time, just driver work!

New drivers:

- New subdriver for Intel Keem Bay (an ARM-based SoC)

- New subdriver for Qualcomm MDM9607 and SM6115

- New subdriver for ST Microelectronics STM32MP135

- New subdriver for Freescale i.MX8ULP ("Ultra Low Power")

- New subdriver for Ingenic X2100

- Support for Qualcomm PMC8180, PMC8180C, SA8155p-adp PMIC GPIO

- Support Samsung Exynos850

- Support Renesas RZ/G2L

Enhancements:

- A major refactoring of the Rockchip driver, breaking part of it out
to a separate GPIO driver in drivers/gpio

- Pin bias support on Renesas r8a77995

- Add SCI pins support to Ingenic JZ4755 and JZ4760

- Mediatek device tree bindings converted to YAML"

* tag 'pinctrl-v5.15-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: (53 commits)
pinctrl: renesas: Add RZ/G2L pin and gpio controller driver
pinctrl: samsung: Add Exynos850 SoC specific data
dt-bindings: pinctrl: samsung: Add Exynos850 doc
MAINTAINERS: Add maintainers for amd-pinctrl driver
pinctrl: Add Intel Keem Bay pinctrl driver
dt-bindings: pinctrl: Add bindings for Intel Keembay pinctrl driver
pinctrl: zynqmp: Drop pinctrl_unregister for devm_ registered device
dt-bindings: pinctrl: qcom-pmic-gpio: Remove the interrupts property
dt-bindings: pinctrl: qcom-pmic-gpio: Convert qcom pmic gpio bindings to YAML
dt-bindings: pinctrl: mt8195: Use real world values for drive-strength arguments
dt-bindings: mediatek: convert pinctrl to yaml
arm: dts: mt8183: Move pinfunc to include/dt-bindings/pinctrl
arm: dts: mt8135: Move pinfunc to include/dt-bindings/pinctrl
pinctrl: ingenic: Add .max_register in regmap_config
pinctrl: ingenic: Fix bias config for X2000(E)
pinctrl: ingenic: Fix incorrect pull up/down info
pinctrl: Ingenic: Add pinctrl driver for X2100.
dt-bindings: pinctrl: Add bindings for Ingenic X2100.
pinctrl: Ingenic: Add SSI pins support for JZ4755 and JZ4760.
pinctrl: Ingenic: Improve the code.
...

+10136 -1442
+79
Documentation/devicetree/bindings/pinctrl/fsl,imx8ulp-pinctrl.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/pinctrl/fsl,imx8ulp-pinctrl.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Freescale IMX8ULP IOMUX Controller 8 + 9 + maintainers: 10 + - Jacky Bai <ping.bai@nxp.com> 11 + 12 + description: 13 + Please refer to fsl,imx-pinctrl.txt and pinctrl-bindings.txt in this directory 14 + for common binding part and usage. 15 + 16 + properties: 17 + compatible: 18 + const: fsl,imx8ulp-iomuxc1 19 + 20 + reg: 21 + maxItems: 1 22 + 23 + # Client device subnode's properties 24 + patternProperties: 25 + 'grp$': 26 + type: object 27 + description: 28 + Pinctrl node's client devices use subnodes for desired pin configuration. 29 + Client device subnodes use below standard properties. 30 + 31 + properties: 32 + fsl,pins: 33 + description: 34 + each entry consists of 5 integers and represents the mux and config 35 + setting for one pin. The first 4 integers <mux_config_reg input_reg 36 + mux_mode input_val> are specified using a PIN_FUNC_ID macro, which can 37 + be found in <arch/arm64/boot/dts/freescale/imx8ulp-pinfunc.h>. The last 38 + integer CONFIG is the pad setting value like pull-up on this pin. Please 39 + refer to i.MX8ULP Reference Manual for detailed CONFIG settings. 40 + $ref: /schemas/types.yaml#/definitions/uint32-matrix 41 + items: 42 + items: 43 + - description: | 44 + "mux_config_reg" indicates the offset of mux register. 45 + - description: | 46 + "input_reg" indicates the offset of select input register. 47 + - description: | 48 + "mux_mode" indicates the mux value to be applied. 49 + - description: | 50 + "input_val" indicates the select input value to be applied. 51 + - description: | 52 + "pad_setting" indicates the pad configuration value to be applied. 53 + 54 + required: 55 + - fsl,pins 56 + 57 + additionalProperties: false 58 + 59 + required: 60 + - compatible 61 + - reg 62 + 63 + additionalProperties: false 64 + 65 + examples: 66 + # Pinmux controller node 67 + - | 68 + iomuxc: pinctrl@298c0000 { 69 + compatible = "fsl,imx8ulp-iomuxc1"; 70 + reg = <0x298c0000 0x10000>; 71 + 72 + pinctrl_lpuart5: lpuart5grp { 73 + fsl,pins = 74 + <0x0138 0x08F0 0x4 0x3 0x3>, 75 + <0x013C 0x08EC 0x4 0x3 0x3>; 76 + }; 77 + }; 78 + 79 + ...
+6 -4
Documentation/devicetree/bindings/pinctrl/ingenic,pinctrl.yaml
··· 19 19 pin within that GPIO port. For example PA0 is the first pin in GPIO port A, 20 20 and PB31 is the last pin in GPIO port B. The JZ4730, the JZ4740, the JZ4725B, 21 21 the X1000 and the X1830 contains 4 GPIO ports, PA to PD, for a total of 128 22 - pins. The X2000 contains 5 GPIO ports, PA to PE, for a total of 160 pins. 23 - The JZ4750, the JZ4755 the JZ4760, the JZ4770 and the JZ4780 contains 6 GPIO 24 - ports, PA to PF, for a total of 192 pins. The JZ4775 contains 7 GPIO ports, 25 - PA to PG, for a total of 224 pins. 22 + pins. The X2000 and the X2100 contains 5 GPIO ports, PA to PE, for a total of 23 + 160 pins. The JZ4750, the JZ4755 the JZ4760, the JZ4770 and the JZ4780 contains 24 + 6 GPIO ports, PA to PF, for a total of 192 pins. The JZ4775 contains 7 GPIO 25 + ports, PA to PG, for a total of 224 pins. 26 26 27 27 maintainers: 28 28 - Paul Cercueil <paul@crapouillou.net> ··· 47 47 - ingenic,x1500-pinctrl 48 48 - ingenic,x1830-pinctrl 49 49 - ingenic,x2000-pinctrl 50 + - ingenic,x2100-pinctrl 50 51 - items: 51 52 - const: ingenic,jz4760b-pinctrl 52 53 - const: ingenic,jz4760-pinctrl ··· 86 85 - ingenic,x1500-gpio 87 86 - ingenic,x1830-gpio 88 87 - ingenic,x2000-gpio 88 + - ingenic,x2100-gpio 89 89 90 90 reg: 91 91 items:
+135
Documentation/devicetree/bindings/pinctrl/intel,pinctrl-keembay.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/pinctrl/intel,pinctrl-keembay.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Intel Keem Bay pin controller Device Tree Bindings 8 + 9 + maintainers: 10 + - Lakshmi Sowjanya D <lakshmi.sowjanya.d@intel.com> 11 + 12 + description: | 13 + Intel Keem Bay SoC integrates a pin controller which enables control 14 + of pin directions, input/output values and configuration 15 + for a total of 80 pins. 16 + 17 + properties: 18 + compatible: 19 + const: intel,keembay-pinctrl 20 + 21 + reg: 22 + maxItems: 2 23 + 24 + gpio-controller: true 25 + 26 + '#gpio-cells': 27 + const: 2 28 + 29 + ngpios: 30 + description: The number of GPIOs exposed. 31 + const: 80 32 + 33 + interrupts: 34 + description: 35 + Specifies the interrupt lines to be used by the controller. 36 + Each interrupt line is shared by upto 4 GPIO lines. 37 + maxItems: 8 38 + 39 + interrupt-controller: true 40 + 41 + '#interrupt-cells': 42 + const: 2 43 + 44 + patternProperties: 45 + '^gpio@[0-9a-f]*$': 46 + type: object 47 + 48 + description: 49 + Child nodes can be specified to contain pin configuration information, 50 + which can then be utilized by pinctrl client devices. 51 + The following properties are supported. 52 + 53 + properties: 54 + pins: 55 + description: | 56 + The name(s) of the pins to be configured in the child node. 57 + Supported pin names are "GPIO0" up to "GPIO79". 58 + 59 + bias-disable: true 60 + 61 + bias-pull-down: true 62 + 63 + bias-pull-up: true 64 + 65 + drive-strength: 66 + description: IO pads drive strength in milli Ampere. 67 + enum: [2, 4, 8, 12] 68 + 69 + bias-bus-hold: 70 + type: boolean 71 + 72 + input-schmitt-enable: 73 + type: boolean 74 + 75 + slew-rate: 76 + description: GPIO slew rate control. 77 + 0 - Fast(~100MHz) 78 + 1 - Slow(~50MHz) 79 + enum: [0, 1] 80 + 81 + additionalProperties: false 82 + 83 + required: 84 + - compatible 85 + - reg 86 + - gpio-controller 87 + - ngpios 88 + - '#gpio-cells' 89 + - interrupts 90 + - interrupt-controller 91 + - '#interrupt-cells' 92 + 93 + examples: 94 + - | 95 + #include <dt-bindings/interrupt-controller/arm-gic.h> 96 + #include <dt-bindings/interrupt-controller/irq.h> 97 + // Example 1 98 + gpio@0 { 99 + compatible = "intel,keembay-pinctrl"; 100 + reg = <0x600b0000 0x88>, 101 + <0x600b0190 0x1ac>; 102 + gpio-controller; 103 + ngpios = <0x50>; 104 + #gpio-cells = <0x2>; 105 + interrupts = <GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH>, 106 + <GIC_SPI 95 IRQ_TYPE_LEVEL_HIGH>, 107 + <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>, 108 + <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>, 109 + <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>, 110 + <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>, 111 + <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>, 112 + <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>; 113 + interrupt-controller; 114 + #interrupt-cells = <2>; 115 + }; 116 + 117 + // Example 2 118 + gpio@1 { 119 + compatible = "intel,keembay-pinctrl"; 120 + reg = <0x600c0000 0x88>, 121 + <0x600c0190 0x1ac>; 122 + gpio-controller; 123 + ngpios = <0x50>; 124 + #gpio-cells = <0x2>; 125 + interrupts = <GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH>, 126 + <GIC_SPI 95 IRQ_TYPE_LEVEL_HIGH>, 127 + <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>, 128 + <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>, 129 + <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>, 130 + <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>, 131 + <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>, 132 + <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>; 133 + interrupt-controller; 134 + #interrupt-cells = <2>; 135 + };
+4 -4
Documentation/devicetree/bindings/pinctrl/marvell,armada-37xx-pinctrl.txt
··· 43 43 44 44 group pwm0 45 45 - pin 11 (GPIO1-11) 46 - - functions pwm, gpio 46 + - functions pwm, led, gpio 47 47 48 48 group pwm1 49 49 - pin 12 50 - - functions pwm, gpio 50 + - functions pwm, led, gpio 51 51 52 52 group pwm2 53 53 - pin 13 54 - - functions pwm, gpio 54 + - functions pwm, led, gpio 55 55 56 56 group pwm3 57 57 - pin 14 58 - - functions pwm, gpio 58 + - functions pwm, led, gpio 59 59 60 60 group pmic1 61 61 - pin 7
+206
Documentation/devicetree/bindings/pinctrl/mediatek,mt65xx-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,mt65xx-pinctrl.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Mediatek MT65xx Pin Controller Device Tree Bindings 8 + 9 + maintainers: 10 + - Sean Wang <sean.wang@kernel.org> 11 + 12 + description: |+ 13 + The Mediatek's Pin controller is used to control SoC pins. 14 + 15 + properties: 16 + compatible: 17 + enum: 18 + - mediatek,mt2701-pinctrl 19 + - mediatek,mt2712-pinctrl 20 + - mediatek,mt6397-pinctrl 21 + - mediatek,mt7623-pinctrl 22 + - mediatek,mt8127-pinctrl 23 + - mediatek,mt8135-pinctrl 24 + - mediatek,mt8167-pinctrl 25 + - mediatek,mt8173-pinctrl 26 + - mediatek,mt8516-pinctrl 27 + 28 + reg: 29 + maxItems: 1 30 + 31 + pins-are-numbered: 32 + $ref: /schemas/types.yaml#/definitions/flag 33 + description: | 34 + Specify the subnodes are using numbered pinmux to specify pins. 35 + 36 + gpio-controller: true 37 + 38 + "#gpio-cells": 39 + const: 2 40 + description: | 41 + Number of cells in GPIO specifier. Since the generic GPIO 42 + binding is used, the amount of cells must be specified as 2. See the below 43 + mentioned gpio binding representation for description of particular cells. 44 + 45 + mediatek,pctl-regmap: 46 + $ref: /schemas/types.yaml#/definitions/phandle-array 47 + minItems: 1 48 + maxItems: 2 49 + description: | 50 + Should be phandles of the syscfg node. 51 + 52 + interrupt-controller: true 53 + 54 + interrupts: 55 + minItems: 1 56 + maxItems: 3 57 + 58 + "#interrupt-cells": 59 + const: 2 60 + 61 + required: 62 + - compatible 63 + - pins-are-numbered 64 + - gpio-controller 65 + - "#gpio-cells" 66 + 67 + patternProperties: 68 + '-[0-9]+$': 69 + type: object 70 + additionalProperties: false 71 + patternProperties: 72 + 'pins': 73 + type: object 74 + additionalProperties: false 75 + description: | 76 + A pinctrl node should contain at least one subnodes representing the 77 + pinctrl groups available on the machine. Each subnode will list the 78 + pins it needs, and how they should be configured, with regard to muxer 79 + configuration, pullups, drive strength, input enable/disable and input 80 + schmitt. 81 + $ref: "/schemas/pinctrl/pincfg-node.yaml" 82 + 83 + properties: 84 + pinmux: 85 + description: 86 + integer array, represents gpio pin number and mux setting. 87 + Supported pin number and mux varies for different SoCs, and are 88 + defined as macros in <soc>-pinfunc.h directly. 89 + 90 + bias-disable: true 91 + 92 + bias-pull-up: 93 + description: | 94 + Besides generic pinconfig options, it can be used as the pull up 95 + settings for 2 pull resistors, R0 and R1. User can configure those 96 + special pins. Some macros have been defined for this usage, such 97 + as MTK_PUPD_SET_R1R0_00. See dt-bindings/pinctrl/mt65xx.h for 98 + valid arguments. 99 + 100 + bias-pull-down: true 101 + 102 + input-enable: true 103 + 104 + input-disable: true 105 + 106 + output-low: true 107 + 108 + output-high: true 109 + 110 + input-schmitt-enable: true 111 + 112 + input-schmitt-disable: true 113 + 114 + drive-strength: 115 + description: | 116 + Can support some arguments, such as MTK_DRIVE_4mA, MTK_DRIVE_6mA, 117 + etc. See dt-bindings/pinctrl/mt65xx.h for valid arguments. 118 + 119 + required: 120 + - pinmux 121 + 122 + additionalProperties: false 123 + 124 + examples: 125 + - | 126 + #include <dt-bindings/interrupt-controller/irq.h> 127 + #include <dt-bindings/interrupt-controller/arm-gic.h> 128 + #include <dt-bindings/pinctrl/mt8135-pinfunc.h> 129 + 130 + soc { 131 + #address-cells = <2>; 132 + #size-cells = <2>; 133 + 134 + syscfg_pctl_a: syscfg-pctl-a@10005000 { 135 + compatible = "mediatek,mt8135-pctl-a-syscfg", "syscon"; 136 + reg = <0 0x10005000 0 0x1000>; 137 + }; 138 + 139 + syscfg_pctl_b: syscfg-pctl-b@1020c020 { 140 + compatible = "mediatek,mt8135-pctl-b-syscfg", "syscon"; 141 + reg = <0 0x1020C020 0 0x1000>; 142 + }; 143 + 144 + pinctrl@1c20800 { 145 + compatible = "mediatek,mt8135-pinctrl"; 146 + reg = <0 0x1000B000 0 0x1000>; 147 + mediatek,pctl-regmap = <&syscfg_pctl_a>, <&syscfg_pctl_b>; 148 + pins-are-numbered; 149 + gpio-controller; 150 + #gpio-cells = <2>; 151 + interrupt-controller; 152 + #interrupt-cells = <2>; 153 + interrupts = <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>, 154 + <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>, 155 + <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>; 156 + 157 + i2c0_pins_a: i2c0-0 { 158 + pins1 { 159 + pinmux = <MT8135_PIN_100_SDA0__FUNC_SDA0>, 160 + <MT8135_PIN_101_SCL0__FUNC_SCL0>; 161 + bias-disable; 162 + }; 163 + }; 164 + 165 + i2c1_pins_a: i2c1-0 { 166 + pins { 167 + pinmux = <MT8135_PIN_195_SDA1__FUNC_SDA1>, 168 + <MT8135_PIN_196_SCL1__FUNC_SCL1>; 169 + bias-pull-up = <MTK_PUPD_SET_R1R0_01>; 170 + }; 171 + }; 172 + 173 + i2c2_pins_a: i2c2-0 { 174 + pins1 { 175 + pinmux = <MT8135_PIN_193_SDA2__FUNC_SDA2>; 176 + bias-pull-down; 177 + }; 178 + 179 + pins2 { 180 + pinmux = <MT8135_PIN_49_WATCHDOG__FUNC_GPIO49>; 181 + bias-pull-up; 182 + }; 183 + }; 184 + 185 + i2c3_pins_a: i2c3-0 { 186 + pins1 { 187 + pinmux = <MT8135_PIN_40_DAC_CLK__FUNC_GPIO40>, 188 + <MT8135_PIN_41_DAC_WS__FUNC_GPIO41>; 189 + bias-pull-up = <MTK_PUPD_SET_R1R0_01>; 190 + }; 191 + 192 + pins2 { 193 + pinmux = <MT8135_PIN_35_SCL3__FUNC_SCL3>, 194 + <MT8135_PIN_36_SDA3__FUNC_SDA3>; 195 + output-low; 196 + bias-pull-up = <MTK_PUPD_SET_R1R0_01>; 197 + }; 198 + 199 + pins3 { 200 + pinmux = <MT8135_PIN_57_JTCK__FUNC_GPIO57>, 201 + <MT8135_PIN_60_JTDI__FUNC_JTDI>; 202 + drive-strength = <32>; 203 + }; 204 + }; 205 + }; 206 + };
+173
Documentation/devicetree/bindings/pinctrl/mediatek,mt6797-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,mt6797-pinctrl.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Mediatek MT6797 Pin Controller Device Tree Bindings 8 + 9 + maintainers: 10 + - Sean Wang <sean.wang@kernel.org> 11 + 12 + description: |+ 13 + The MediaTek's MT6797 Pin controller is used to control SoC pins. 14 + 15 + properties: 16 + compatible: 17 + const: mediatek,mt6797-pinctrl 18 + 19 + reg: 20 + minItems: 5 21 + maxItems: 5 22 + 23 + reg-names: 24 + items: 25 + - const: gpio 26 + - const: iocfgl 27 + - const: iocfgb 28 + - const: iocfgr 29 + - const: iocfgt 30 + 31 + gpio-controller: true 32 + 33 + "#gpio-cells": 34 + const: 2 35 + description: | 36 + Number of cells in GPIO specifier. Since the generic GPIO 37 + binding is used, the amount of cells must be specified as 2. See the below 38 + mentioned gpio binding representation for description of particular cells. 39 + 40 + interrupt-controller: true 41 + 42 + interrupts: 43 + maxItems: 1 44 + 45 + "#interrupt-cells": 46 + const: 2 47 + 48 + required: 49 + - compatible 50 + - reg 51 + - reg-names 52 + - gpio-controller 53 + - "#gpio-cells" 54 + 55 + patternProperties: 56 + '-[0-9]+$': 57 + type: object 58 + additionalProperties: false 59 + patternProperties: 60 + 'pins': 61 + type: object 62 + additionalProperties: false 63 + description: | 64 + A pinctrl node should contain at least one subnodes representing the 65 + pinctrl groups available on the machine. Each subnode will list the 66 + pins it needs, and how they should be configured, with regard to muxer 67 + configuration, pullups, drive strength, input enable/disable and input 68 + schmitt. 69 + $ref: "/schemas/pinctrl/pincfg-node.yaml" 70 + 71 + properties: 72 + pinmux: 73 + description: 74 + integer array, represents gpio pin number and mux setting. 75 + Supported pin number and mux varies for different SoCs, and are 76 + defined as macros in <soc>-pinfunc.h directly. 77 + 78 + bias-disable: true 79 + 80 + bias-pull-up: true 81 + 82 + bias-pull-down: true 83 + 84 + input-enable: true 85 + 86 + input-disable: true 87 + 88 + output-enable: true 89 + 90 + output-low: true 91 + 92 + output-high: true 93 + 94 + input-schmitt-enable: true 95 + 96 + input-schmitt-disable: true 97 + 98 + drive-strength: 99 + enum: [2, 4, 8, 12, 16] 100 + 101 + slew-rate: 102 + enum: [0, 1] 103 + 104 + mediatek,pull-up-adv: 105 + description: | 106 + Pull up setings for 2 pull resistors, R0 and R1. User can 107 + configure those special pins. Valid arguments are described as below: 108 + 0: (R1, R0) = (0, 0) which means R1 disabled and R0 disabled. 109 + 1: (R1, R0) = (0, 1) which means R1 disabled and R0 enabled. 110 + 2: (R1, R0) = (1, 0) which means R1 enabled and R0 disabled. 111 + 3: (R1, R0) = (1, 1) which means R1 enabled and R0 enabled. 112 + $ref: /schemas/types.yaml#/definitions/uint32 113 + enum: [0, 1, 2, 3] 114 + 115 + mediatek,pull-down-adv: 116 + description: | 117 + Pull down settings for 2 pull resistors, R0 and R1. User can 118 + configure those special pins. Valid arguments are described as below: 119 + 0: (R1, R0) = (0, 0) which means R1 disabled and R0 disabled. 120 + 1: (R1, R0) = (0, 1) which means R1 disabled and R0 enabled. 121 + 2: (R1, R0) = (1, 0) which means R1 enabled and R0 disabled. 122 + 3: (R1, R0) = (1, 1) which means R1 enabled and R0 enabled. 123 + $ref: /schemas/types.yaml#/definitions/uint32 124 + enum: [0, 1, 2, 3] 125 + 126 + mediatek,tdsel: 127 + description: | 128 + An integer describing the steps for output level shifter duty 129 + cycle when asserted (high pulse width adjustment). Valid arguments 130 + are from 0 to 15. 131 + $ref: /schemas/types.yaml#/definitions/uint32 132 + 133 + mediatek,rdsel: 134 + description: | 135 + An integer describing the steps for input level shifter duty cycle 136 + when asserted (high pulse width adjustment). Valid arguments are 137 + from 0 to 63. 138 + $ref: /schemas/types.yaml#/definitions/uint32 139 + 140 + required: 141 + - pinmux 142 + 143 + additionalProperties: false 144 + 145 + examples: 146 + - | 147 + #include <dt-bindings/interrupt-controller/irq.h> 148 + #include <dt-bindings/interrupt-controller/arm-gic.h> 149 + #include <dt-bindings/pinctrl/mt6797-pinfunc.h> 150 + 151 + soc { 152 + #address-cells = <2>; 153 + #size-cells = <2>; 154 + 155 + pio: pinctrl@10005000 { 156 + compatible = "mediatek,mt6797-pinctrl"; 157 + reg = <0 0x10005000 0 0x1000>, 158 + <0 0x10002000 0 0x400>, 159 + <0 0x10002400 0 0x400>, 160 + <0 0x10002800 0 0x400>, 161 + <0 0x10002C00 0 0x400>; 162 + reg-names = "gpio", "iocfgl", "iocfgb", "iocfgr", "iocfgt"; 163 + gpio-controller; 164 + #gpio-cells = <2>; 165 + 166 + uart_pins_a: uart-0 { 167 + pins1 { 168 + pinmux = <MT6797_GPIO232__FUNC_URXD1>, 169 + <MT6797_GPIO233__FUNC_UTXD1>; 170 + }; 171 + }; 172 + }; 173 + };
+373
Documentation/devicetree/bindings/pinctrl/mediatek,mt7622-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,mt7622-pinctrl.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Mediatek MT7622 Pin Controller Device Tree Bindings 8 + 9 + maintainers: 10 + - Sean Wang <sean.wang@kernel.org> 11 + 12 + description: |+ 13 + The MediaTek's MT7622 Pin controller is used to control SoC pins. 14 + 15 + properties: 16 + compatible: 17 + enum: 18 + - mediatek,mt7622-pinctrl 19 + - mediatek,mt7629-pinctrl 20 + 21 + reg: 22 + maxItems: 1 23 + 24 + reg-names: 25 + items: 26 + - const: eint 27 + 28 + gpio-controller: true 29 + 30 + "#gpio-cells": 31 + const: 2 32 + description: | 33 + Number of cells in GPIO specifier. Since the generic GPIO 34 + binding is used, the amount of cells must be specified as 2. See the below 35 + mentioned gpio binding representation for description of particular cells. 36 + 37 + interrupt-controller: true 38 + 39 + interrupts: 40 + maxItems: 1 41 + 42 + "#interrupt-cells": 43 + const: 2 44 + 45 + required: 46 + - compatible 47 + - reg 48 + - gpio-controller 49 + - "#gpio-cells" 50 + 51 + if: 52 + required: 53 + - interrupt-controller 54 + then: 55 + required: 56 + - reg-names 57 + - interrupts 58 + - "#interrupt-cells" 59 + 60 + patternProperties: 61 + '-[0-9]+$': 62 + type: object 63 + additionalProperties: false 64 + patternProperties: 65 + 'mux': 66 + type: object 67 + additionalProperties: false 68 + description: | 69 + pinmux configuration nodes. 70 + $ref: "/schemas/pinctrl/pinmux-node.yaml" 71 + properties: 72 + function: 73 + description: | 74 + A string containing the name of the function to mux to the group. 75 + enum: [emmc, eth, i2c, i2s, ir, led, flash, pcie, pmic, pwm, sd, 76 + spi, tdm, uart, watchdog, wifi] 77 + 78 + groups: 79 + description: | 80 + An array of strings. Each string contains the name of a group. 81 + 82 + drive-strength: 83 + enum: [4, 8, 12, 16] 84 + 85 + required: 86 + - groups 87 + - function 88 + 89 + allOf: 90 + - if: 91 + properties: 92 + function: 93 + const: emmc 94 + then: 95 + properties: 96 + groups: 97 + enum: [emmc, emmc_rst] 98 + - if: 99 + properties: 100 + function: 101 + const: eth 102 + then: 103 + properties: 104 + groups: 105 + enum: [esw, esw_p0_p1, esw_p2_p3_p4, rgmii_via_esw, 106 + rgmii_via_gmac1, rgmii_via_gmac2, mdc_mdio] 107 + - if: 108 + properties: 109 + function: 110 + const: i2c 111 + then: 112 + properties: 113 + groups: 114 + enum: [i2c0, i2c_0, i2c_1, i2c1_0, i2c1_1, i2c1_2, i2c2_0, 115 + i2c2_1, i2c2_2] 116 + - if: 117 + properties: 118 + function: 119 + const: i2s 120 + then: 121 + properties: 122 + groups: 123 + enum: [i2s_in_mclk_bclk_ws, i2s1_in_data, i2s2_in_data, 124 + i2s3_in_data, i2s4_in_data, i2s_out_mclk_bclk_ws, 125 + i2s1_out_data, i2s2_out_data, i2s3_out_data, 126 + i2s4_out_data] 127 + - if: 128 + properties: 129 + function: 130 + const: ir 131 + then: 132 + properties: 133 + groups: 134 + enum: [ir_0_tx, ir_1_tx, ir_2_tx, ir_0_rx, ir_1_rx, ir_2_rx] 135 + - if: 136 + properties: 137 + function: 138 + const: led 139 + then: 140 + properties: 141 + groups: 142 + enum: [ephy_leds, ephy0_led, ephy1_led, ephy2_led, ephy3_led, 143 + ephy4_led, wled, wf2g_led, wf5g_led] 144 + - if: 145 + properties: 146 + function: 147 + const: flash 148 + then: 149 + properties: 150 + groups: 151 + enum: [par_nand, snfi, spi_nor] 152 + - if: 153 + properties: 154 + function: 155 + const: pcie 156 + then: 157 + properties: 158 + groups: 159 + enum: [pcie0_0_waken, pcie0_1_waken, pcie1_0_waken, 160 + pcie0_0_clkreq, pcie0_1_clkreq, pcie1_0_clkreq, 161 + pcie0_pad_perst, pcie1_pad_perst, pcie_pereset, 162 + pcie_wake, pcie_clkreq] 163 + - if: 164 + properties: 165 + function: 166 + const: pmic 167 + then: 168 + properties: 169 + groups: 170 + enum: [pmic_bus] 171 + - if: 172 + properties: 173 + function: 174 + const: pwm 175 + then: 176 + properties: 177 + groups: 178 + enum: [pwm_ch1_0, pwm_ch1_1, pwm_ch1_2, pwm_ch2_0, pwm_ch2_1, 179 + pwm_ch2_2, pwm_ch3_0, pwm_ch3_1, pwm_ch3_2, pwm_ch4_0, 180 + pwm_ch4_1, pwm_ch4_2, pwm_ch4_3, pwm_ch5_0, pwm_ch5_1, 181 + pwm_ch5_2, pwm_ch6_0, pwm_ch6_1, pwm_ch6_2, pwm_ch6_3, 182 + pwm_ch7_0, pwm_0, pwm_1] 183 + - if: 184 + properties: 185 + function: 186 + const: sd 187 + then: 188 + properties: 189 + groups: 190 + enum: [sd_0, sd_1] 191 + - if: 192 + properties: 193 + function: 194 + const: spi 195 + then: 196 + properties: 197 + groups: 198 + enum: [spic0_0, spic0_1, spic1_0, spic1_1, spic2_0_wp_hold, 199 + spic2_0, spi_0, spi_1, spi_wp, spi_hold] 200 + - if: 201 + properties: 202 + function: 203 + const: tdm 204 + then: 205 + properties: 206 + groups: 207 + enum: [tdm_0_out_mclk_bclk_ws, tdm_0_in_mclk_bclk_ws, 208 + tdm_0_out_data, tdm_0_in_data, tdm_1_out_mclk_bclk_ws, 209 + tdm_1_in_mclk_bclk_ws, tdm_1_out_data, tdm_1_in_data] 210 + - if: 211 + properties: 212 + function: 213 + const: uart 214 + then: 215 + properties: 216 + groups: 217 + enum: [uart0_0_tx_rx, uart1_0_tx_rx, uart1_0_rts_cts, 218 + uart1_1_tx_rx, uart1_1_rts_cts, uart2_0_tx_rx, 219 + uart2_0_rts_cts, uart2_1_tx_rx, uart2_1_rts_cts, 220 + uart2_2_tx_rx, uart2_2_rts_cts, uart2_3_tx_rx, 221 + uart3_0_tx_rx, uart3_1_tx_rx, uart3_1_rts_cts, 222 + uart4_0_tx_rx, uart4_1_tx_rx, uart4_1_rts_cts, 223 + uart4_2_tx_rx, uart4_2_rts_cts, uart0_txd_rxd, 224 + uart1_0_txd_rxd, uart1_0_cts_rts, uart1_1_txd_rxd, 225 + uart1_1_cts_rts, uart2_0_txd_rxd, uart2_0_cts_rts, 226 + uart2_1_txd_rxd, uart2_1_cts_rts] 227 + - if: 228 + properties: 229 + function: 230 + const: watchdog 231 + then: 232 + properties: 233 + groups: 234 + enum: [watchdog] 235 + - if: 236 + properties: 237 + function: 238 + const: wifi 239 + then: 240 + properties: 241 + groups: 242 + enum: [wf0_2g, wf0_5g] 243 + 244 + 'conf': 245 + type: object 246 + additionalProperties: false 247 + description: | 248 + pinconf configuration nodes. 249 + $ref: "/schemas/pinctrl/pincfg-node.yaml" 250 + 251 + properties: 252 + groups: 253 + description: | 254 + An array of strings. Each string contains the name of a group. 255 + Valid values are the same as the pinmux node. 256 + 257 + pins: 258 + description: | 259 + An array of strings. Each string contains the name of a pin. 260 + enum: [GPIO_A, I2S1_IN, I2S1_OUT, I2S_BCLK, I2S_WS, I2S_MCLK, TXD0, 261 + RXD0, SPI_WP, SPI_HOLD, SPI_CLK, SPI_MOSI, SPI_MISO, SPI_CS, 262 + I2C_SDA, I2C_SCL, I2S2_IN, I2S3_IN, I2S4_IN, I2S2_OUT, 263 + I2S3_OUT, I2S4_OUT, GPIO_B, MDC, MDIO, G2_TXD0, G2_TXD1, 264 + G2_TXD2, G2_TXD3, G2_TXEN, G2_TXC, G2_RXD0, G2_RXD1, G2_RXD2, 265 + G2_RXD3, G2_RXDV, G2_RXC, NCEB, NWEB, NREB, NDL4, NDL5, NDL6, 266 + NDL7, NRB, NCLE, NALE, NDL0, NDL1, NDL2, NDL3, MDI_TP_P0, 267 + MDI_TN_P0, MDI_RP_P0, MDI_RN_P0, MDI_TP_P1, MDI_TN_P1, 268 + MDI_RP_P1, MDI_RN_P1, MDI_RP_P2, MDI_RN_P2, MDI_TP_P2, 269 + MDI_TN_P2, MDI_TP_P3, MDI_TN_P3, MDI_RP_P3, MDI_RN_P3, 270 + MDI_RP_P4, MDI_RN_P4, MDI_TP_P4, MDI_TN_P4, PMIC_SCL, 271 + PMIC_SDA, SPIC1_CLK, SPIC1_MOSI, SPIC1_MISO, SPIC1_CS, 272 + GPIO_D, WATCHDOG, RTS3_N, CTS3_N, TXD3, RXD3, PERST0_N, 273 + PERST1_N, WLED_N, EPHY_LED0_N, AUXIN0, AUXIN1, AUXIN2, 274 + AUXIN3, TXD4, RXD4, RTS4_N, CST4_N, PWM1, PWM2, PWM3, PWM4, 275 + PWM5, PWM6, PWM7, GPIO_E, TOP_5G_CLK, TOP_5G_DATA, 276 + WF0_5G_HB0, WF0_5G_HB1, WF0_5G_HB2, WF0_5G_HB3, WF0_5G_HB4, 277 + WF0_5G_HB5, WF0_5G_HB6, XO_REQ, TOP_RST_N, SYS_WATCHDOG, 278 + EPHY_LED0_N_JTDO, EPHY_LED1_N_JTDI, EPHY_LED2_N_JTMS, 279 + EPHY_LED3_N_JTCLK, EPHY_LED4_N_JTRST_N, WF2G_LED_N, 280 + WF5G_LED_N, GPIO_9, GPIO_10, GPIO_11, GPIO_12, UART1_TXD, 281 + UART1_RXD, UART1_CTS, UART1_RTS, UART2_TXD, UART2_RXD, 282 + UART2_CTS, UART2_RTS, SMI_MDC, SMI_MDIO, PCIE_PERESET_N, 283 + PWM_0, GPIO_0, GPIO_1, GPIO_2, GPIO_3, GPIO_4, GPIO_5, 284 + GPIO_6, GPIO_7, GPIO_8, UART0_TXD, UART0_RXD, TOP_2G_CLK, 285 + TOP_2G_DATA, WF0_2G_HB0, WF0_2G_HB1, WF0_2G_HB2, WF0_2G_HB3, 286 + WF0_2G_HB4, WF0_2G_HB5, WF0_2G_HB6] 287 + 288 + bias-disable: true 289 + 290 + bias-pull-up: true 291 + 292 + bias-pull-down: true 293 + 294 + input-enable: true 295 + 296 + input-disable: true 297 + 298 + output-enable: true 299 + 300 + output-low: true 301 + 302 + output-high: true 303 + 304 + input-schmitt-enable: true 305 + 306 + input-schmitt-disable: true 307 + 308 + drive-strength: 309 + enum: [4, 8, 12, 16] 310 + 311 + slew-rate: 312 + enum: [0, 1] 313 + 314 + mediatek,tdsel: 315 + description: | 316 + An integer describing the steps for output level shifter duty 317 + cycle when asserted (high pulse width adjustment). Valid arguments 318 + are from 0 to 15. 319 + $ref: /schemas/types.yaml#/definitions/uint32 320 + 321 + mediatek,rdsel: 322 + description: | 323 + An integer describing the steps for input level shifter duty cycle 324 + when asserted (high pulse width adjustment). Valid arguments are 325 + from 0 to 63. 326 + $ref: /schemas/types.yaml#/definitions/uint32 327 + 328 + required: 329 + - pins 330 + 331 + additionalProperties: false 332 + 333 + examples: 334 + - | 335 + #include <dt-bindings/interrupt-controller/irq.h> 336 + #include <dt-bindings/interrupt-controller/arm-gic.h> 337 + 338 + soc { 339 + #address-cells = <2>; 340 + #size-cells = <2>; 341 + 342 + pio: pinctrl@10211000 { 343 + compatible = "mediatek,mt7622-pinctrl"; 344 + reg = <0 0x10211000 0 0x1000>; 345 + gpio-controller; 346 + #gpio-cells = <2>; 347 + 348 + pinctrl_eth_default: eth-0 { 349 + mux-mdio { 350 + groups = "mdc_mdio"; 351 + function = "eth"; 352 + drive-strength = <12>; 353 + }; 354 + 355 + mux-gmac2 { 356 + groups = "rgmii_via_gmac2"; 357 + function = "eth"; 358 + drive-strength = <12>; 359 + }; 360 + 361 + mux-esw { 362 + groups = "esw"; 363 + function = "eth"; 364 + drive-strength = <8>; 365 + }; 366 + 367 + conf-mdio { 368 + pins = "MDC"; 369 + bias-pull-up; 370 + }; 371 + }; 372 + }; 373 + };
+228
Documentation/devicetree/bindings/pinctrl/mediatek,mt8183-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,mt8183-pinctrl.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Mediatek MT8183 Pin Controller Device Tree Bindings 8 + 9 + maintainers: 10 + - Sean Wang <sean.wang@kernel.org> 11 + 12 + description: |+ 13 + The MediaTek's MT8183 Pin controller is used to control SoC pins. 14 + 15 + properties: 16 + compatible: 17 + const: mediatek,mt8183-pinctrl 18 + 19 + reg: 20 + minItems: 10 21 + maxItems: 10 22 + 23 + reg-names: 24 + items: 25 + - const: iocfg0 26 + - const: iocfg1 27 + - const: iocfg2 28 + - const: iocfg3 29 + - const: iocfg4 30 + - const: iocfg5 31 + - const: iocfg6 32 + - const: iocfg7 33 + - const: iocfg8 34 + - const: eint 35 + 36 + gpio-controller: true 37 + 38 + "#gpio-cells": 39 + const: 2 40 + description: | 41 + Number of cells in GPIO specifier. Since the generic GPIO 42 + binding is used, the amount of cells must be specified as 2. See the below 43 + mentioned gpio binding representation for description of particular cells. 44 + 45 + gpio-ranges: 46 + minItems: 1 47 + maxItems: 5 48 + description: | 49 + GPIO valid number range. 50 + 51 + interrupt-controller: true 52 + 53 + interrupts: 54 + maxItems: 1 55 + 56 + "#interrupt-cells": 57 + const: 2 58 + 59 + required: 60 + - compatible 61 + - reg 62 + - gpio-controller 63 + - "#gpio-cells" 64 + - gpio-ranges 65 + 66 + patternProperties: 67 + '-[0-9]+$': 68 + type: object 69 + additionalProperties: false 70 + patternProperties: 71 + 'pins': 72 + type: object 73 + additionalProperties: false 74 + description: | 75 + A pinctrl node should contain at least one subnodes representing the 76 + pinctrl groups available on the machine. Each subnode will list the 77 + pins it needs, and how they should be configured, with regard to muxer 78 + configuration, pullups, drive strength, input enable/disable and input 79 + schmitt. 80 + $ref: "/schemas/pinctrl/pincfg-node.yaml" 81 + 82 + properties: 83 + pinmux: 84 + description: 85 + integer array, represents gpio pin number and mux setting. 86 + Supported pin number and mux varies for different SoCs, and are 87 + defined as macros in <soc>-pinfunc.h directly. 88 + 89 + bias-disable: true 90 + 91 + bias-pull-up: true 92 + 93 + bias-pull-down: true 94 + 95 + input-enable: true 96 + 97 + input-disable: true 98 + 99 + output-low: true 100 + 101 + output-high: true 102 + 103 + input-schmitt-enable: true 104 + 105 + input-schmitt-disable: true 106 + 107 + drive-strength: 108 + enum: [2, 4, 6, 8, 10, 12, 14, 16] 109 + 110 + mediatek,drive-strength-adv: 111 + description: | 112 + Describe the specific driving setup property. 113 + For I2C pins, the existing generic driving setup can only support 114 + 2/4/6/8/10/12/14/16mA driving. But in specific driving setup, they 115 + can support 0.125/0.25/0.5/1mA adjustment. If we enable specific 116 + driving setup, the existing generic setup will be disabled. 117 + The specific driving setup is controlled by E1E0EN. 118 + When E1=0/E0=0, the strength is 0.125mA. 119 + When E1=0/E0=1, the strength is 0.25mA. 120 + When E1=1/E0=0, the strength is 0.5mA. 121 + When E1=1/E0=1, the strength is 1mA. 122 + EN is used to enable or disable the specific driving setup. 123 + Valid arguments are described as below: 124 + 0: (E1, E0, EN) = (0, 0, 0) 125 + 1: (E1, E0, EN) = (0, 0, 1) 126 + 2: (E1, E0, EN) = (0, 1, 0) 127 + 3: (E1, E0, EN) = (0, 1, 1) 128 + 4: (E1, E0, EN) = (1, 0, 0) 129 + 5: (E1, E0, EN) = (1, 0, 1) 130 + 6: (E1, E0, EN) = (1, 1, 0) 131 + 7: (E1, E0, EN) = (1, 1, 1) 132 + So the valid arguments are from 0 to 7. 133 + $ref: /schemas/types.yaml#/definitions/uint32 134 + enum: [0, 1, 2, 3, 4, 5, 6, 7] 135 + 136 + mediatek,pull-up-adv: 137 + description: | 138 + Pull up setings for 2 pull resistors, R0 and R1. User can 139 + configure those special pins. Valid arguments are described as below: 140 + 0: (R1, R0) = (0, 0) which means R1 disabled and R0 disabled. 141 + 1: (R1, R0) = (0, 1) which means R1 disabled and R0 enabled. 142 + 2: (R1, R0) = (1, 0) which means R1 enabled and R0 disabled. 143 + 3: (R1, R0) = (1, 1) which means R1 enabled and R0 enabled. 144 + $ref: /schemas/types.yaml#/definitions/uint32 145 + enum: [0, 1, 2, 3] 146 + 147 + mediatek,pull-down-adv: 148 + description: | 149 + Pull down settings for 2 pull resistors, R0 and R1. User can 150 + configure those special pins. Valid arguments are described as below: 151 + 0: (R1, R0) = (0, 0) which means R1 disabled and R0 disabled. 152 + 1: (R1, R0) = (0, 1) which means R1 disabled and R0 enabled. 153 + 2: (R1, R0) = (1, 0) which means R1 enabled and R0 disabled. 154 + 3: (R1, R0) = (1, 1) which means R1 enabled and R0 enabled. 155 + $ref: /schemas/types.yaml#/definitions/uint32 156 + enum: [0, 1, 2, 3] 157 + 158 + mediatek,tdsel: 159 + description: | 160 + An integer describing the steps for output level shifter duty 161 + cycle when asserted (high pulse width adjustment). Valid arguments 162 + are from 0 to 15. 163 + $ref: /schemas/types.yaml#/definitions/uint32 164 + 165 + mediatek,rdsel: 166 + description: | 167 + An integer describing the steps for input level shifter duty cycle 168 + when asserted (high pulse width adjustment). Valid arguments are 169 + from 0 to 63. 170 + $ref: /schemas/types.yaml#/definitions/uint32 171 + 172 + required: 173 + - pinmux 174 + 175 + additionalProperties: false 176 + 177 + examples: 178 + - | 179 + #include <dt-bindings/interrupt-controller/irq.h> 180 + #include <dt-bindings/interrupt-controller/arm-gic.h> 181 + #include <dt-bindings/pinctrl/mt8183-pinfunc.h> 182 + 183 + soc { 184 + #address-cells = <2>; 185 + #size-cells = <2>; 186 + 187 + pio: pinctrl@10005000 { 188 + compatible = "mediatek,mt8183-pinctrl"; 189 + reg = <0 0x10005000 0 0x1000>, 190 + <0 0x11f20000 0 0x1000>, 191 + <0 0x11e80000 0 0x1000>, 192 + <0 0x11e70000 0 0x1000>, 193 + <0 0x11e90000 0 0x1000>, 194 + <0 0x11d30000 0 0x1000>, 195 + <0 0x11d20000 0 0x1000>, 196 + <0 0x11c50000 0 0x1000>, 197 + <0 0x11f30000 0 0x1000>, 198 + <0 0x1000b000 0 0x1000>; 199 + reg-names = "iocfg0", "iocfg1", "iocfg2", 200 + "iocfg3", "iocfg4", "iocfg5", 201 + "iocfg6", "iocfg7", "iocfg8", 202 + "eint"; 203 + gpio-controller; 204 + #gpio-cells = <2>; 205 + gpio-ranges = <&pio 0 0 192>; 206 + interrupt-controller; 207 + interrupts = <GIC_SPI 177 IRQ_TYPE_LEVEL_HIGH>; 208 + #interrupt-cells = <2>; 209 + 210 + i2c0_pins_a: i2c-0 { 211 + pins1 { 212 + pinmux = <PINMUX_GPIO48__FUNC_SCL5>, 213 + <PINMUX_GPIO49__FUNC_SDA5>; 214 + mediatek,pull-up-adv = <3>; 215 + mediatek,drive-strength-adv = <7>; 216 + }; 217 + }; 218 + 219 + i2c1_pins_a: i2c-1 { 220 + pins { 221 + pinmux = <PINMUX_GPIO50__FUNC_SCL3>, 222 + <PINMUX_GPIO51__FUNC_SDA3>; 223 + mediatek,pull-down-adv = <2>; 224 + mediatek,drive-strength-adv = <4>; 225 + }; 226 + }; 227 + }; 228 + };
-156
Documentation/devicetree/bindings/pinctrl/pinctrl-mt65xx.txt
··· 1 - * Mediatek MT65XX Pin Controller 2 - 3 - The Mediatek's Pin controller is used to control SoC pins. 4 - 5 - Required properties: 6 - - compatible: value should be one of the following. 7 - "mediatek,mt2701-pinctrl", compatible with mt2701 pinctrl. 8 - "mediatek,mt2712-pinctrl", compatible with mt2712 pinctrl. 9 - "mediatek,mt6397-pinctrl", compatible with mt6397 pinctrl. 10 - "mediatek,mt7623-pinctrl", compatible with mt7623 pinctrl. 11 - "mediatek,mt8127-pinctrl", compatible with mt8127 pinctrl. 12 - "mediatek,mt8135-pinctrl", compatible with mt8135 pinctrl. 13 - "mediatek,mt8167-pinctrl", compatible with mt8167 pinctrl. 14 - "mediatek,mt8173-pinctrl", compatible with mt8173 pinctrl. 15 - "mediatek,mt8365-pinctrl", compatible with mt8365 pinctrl. 16 - "mediatek,mt8516-pinctrl", compatible with mt8516 pinctrl. 17 - - pins-are-numbered: Specify the subnodes are using numbered pinmux to 18 - specify pins. 19 - - gpio-controller : Marks the device node as a gpio controller. 20 - - #gpio-cells: number of cells in GPIO specifier. Since the generic GPIO 21 - binding is used, the amount of cells must be specified as 2. See the below 22 - mentioned gpio binding representation for description of particular cells. 23 - 24 - Eg: <&pio 6 0> 25 - <[phandle of the gpio controller node] 26 - [line number within the gpio controller] 27 - [flags]> 28 - 29 - Values for gpio specifier: 30 - - Line number: is a value between 0 to 202. 31 - - Flags: bit field of flags, as defined in <dt-bindings/gpio/gpio.h>. 32 - Only the following flags are supported: 33 - 0 - GPIO_ACTIVE_HIGH 34 - 1 - GPIO_ACTIVE_LOW 35 - 36 - Optional properties: 37 - - mediatek,pctl-regmap: Should be a phandle of the syscfg node. 38 - - reg: physicall address base for EINT registers 39 - - interrupt-controller: Marks the device node as an interrupt controller 40 - - #interrupt-cells: Should be two. 41 - - interrupts : The interrupt outputs from the controller. 42 - 43 - Please refer to pinctrl-bindings.txt in this directory for details of the 44 - common pinctrl bindings used by client devices. 45 - 46 - Subnode format 47 - A pinctrl node should contain at least one subnodes representing the 48 - pinctrl groups available on the machine. Each subnode will list the 49 - pins it needs, and how they should be configured, with regard to muxer 50 - configuration, pullups, drive strength, input enable/disable and input schmitt. 51 - 52 - node { 53 - pinmux = <PIN_NUMBER_PINMUX>; 54 - GENERIC_PINCONFIG; 55 - }; 56 - 57 - Required properties: 58 - - pinmux: integer array, represents gpio pin number and mux setting. 59 - Supported pin number and mux varies for different SoCs, and are defined 60 - as macros in boot/dts/<soc>-pinfunc.h directly. 61 - 62 - Optional properties: 63 - - GENERIC_PINCONFIG: is the generic pinconfig options to use, bias-disable, 64 - bias-pull-down, bias-pull-up, input-enable, input-disable, output-low, output-high, 65 - input-schmitt-enable, input-schmitt-disable and drive-strength are valid. 66 - 67 - Some special pins have extra pull up strength, there are R0 and R1 pull-up 68 - resistors available, but for user, it's only need to set R1R0 as 00, 01, 10 or 11. 69 - So when config bias-pull-up, it support arguments for those special pins. 70 - Some macros have been defined for this usage, such as MTK_PUPD_SET_R1R0_00. 71 - See dt-bindings/pinctrl/mt65xx.h. 72 - 73 - When config drive-strength, it can support some arguments, such as 74 - MTK_DRIVE_4mA, MTK_DRIVE_6mA, etc. See dt-bindings/pinctrl/mt65xx.h. 75 - 76 - Examples: 77 - 78 - #include "mt8135-pinfunc.h" 79 - 80 - ... 81 - { 82 - syscfg_pctl_a: syscfg-pctl-a@10005000 { 83 - compatible = "mediatek,mt8135-pctl-a-syscfg", "syscon"; 84 - reg = <0 0x10005000 0 0x1000>; 85 - }; 86 - 87 - syscfg_pctl_b: syscfg-pctl-b@1020c020 { 88 - compatible = "mediatek,mt8135-pctl-b-syscfg", "syscon"; 89 - reg = <0 0x1020C020 0 0x1000>; 90 - }; 91 - 92 - pinctrl@1c20800 { 93 - compatible = "mediatek,mt8135-pinctrl"; 94 - reg = <0 0x1000B000 0 0x1000>; 95 - mediatek,pctl-regmap = <&syscfg_pctl_a>, <&syscfg_pctl_b>; 96 - pins-are-numbered; 97 - gpio-controller; 98 - #gpio-cells = <2>; 99 - interrupt-controller; 100 - #interrupt-cells = <2>; 101 - interrupts = <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>, 102 - <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>, 103 - <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>; 104 - 105 - i2c0_pins_a: i2c0@0 { 106 - pins1 { 107 - pinmux = <MT8135_PIN_100_SDA0__FUNC_SDA0>, 108 - <MT8135_PIN_101_SCL0__FUNC_SCL0>; 109 - bias-disable; 110 - }; 111 - }; 112 - 113 - i2c1_pins_a: i2c1@0 { 114 - pins { 115 - pinmux = <MT8135_PIN_195_SDA1__FUNC_SDA1>, 116 - <MT8135_PIN_196_SCL1__FUNC_SCL1>; 117 - bias-pull-up = <55>; 118 - }; 119 - }; 120 - 121 - i2c2_pins_a: i2c2@0 { 122 - pins1 { 123 - pinmux = <MT8135_PIN_193_SDA2__FUNC_SDA2>; 124 - bias-pull-down; 125 - }; 126 - 127 - pins2 { 128 - pinmux = <MT8135_PIN_49_WATCHDOG__FUNC_GPIO49>; 129 - bias-pull-up; 130 - }; 131 - }; 132 - 133 - i2c3_pins_a: i2c3@0 { 134 - pins1 { 135 - pinmux = <MT8135_PIN_40_DAC_CLK__FUNC_GPIO40>, 136 - <MT8135_PIN_41_DAC_WS__FUNC_GPIO41>; 137 - bias-pull-up = <55>; 138 - }; 139 - 140 - pins2 { 141 - pinmux = <MT8135_PIN_35_SCL3__FUNC_SCL3>, 142 - <MT8135_PIN_36_SDA3__FUNC_SDA3>; 143 - output-low; 144 - bias-pull-up = <55>; 145 - }; 146 - 147 - pins3 { 148 - pinmux = <MT8135_PIN_57_JTCK__FUNC_GPIO57>, 149 - <MT8135_PIN_60_JTDI__FUNC_JTDI>; 150 - drive-strength = <32>; 151 - }; 152 - }; 153 - 154 - ... 155 - } 156 - };
-83
Documentation/devicetree/bindings/pinctrl/pinctrl-mt6797.txt
··· 1 - * MediaTek MT6797 Pin Controller 2 - 3 - The MediaTek's MT6797 Pin controller is used to control SoC pins. 4 - 5 - Required properties: 6 - - compatible: Value should be one of the following. 7 - "mediatek,mt6797-pinctrl", compatible with mt6797 pinctrl. 8 - - reg: Should contain address and size for gpio, iocfgl, iocfgb, 9 - iocfgr and iocfgt register bases. 10 - - reg-names: An array of strings describing the "reg" entries. Must 11 - contain "gpio", "iocfgl", "iocfgb", "iocfgr", "iocfgt". 12 - - gpio-controller: Marks the device node as a gpio controller. 13 - - #gpio-cells: Should be two. The first cell is the gpio pin number 14 - and the second cell is used for optional parameters. 15 - 16 - Optional properties: 17 - - interrupt-controller: Marks the device node as an interrupt controller. 18 - - #interrupt-cells: Should be two. 19 - - interrupts : The interrupt outputs from the controller. 20 - 21 - Please refer to pinctrl-bindings.txt in this directory for details of the 22 - common pinctrl bindings used by client devices. 23 - 24 - Subnode format 25 - A pinctrl node should contain at least one subnodes representing the 26 - pinctrl groups available on the machine. Each subnode will list the 27 - pins it needs, and how they should be configured, with regard to muxer 28 - configuration, pullups, drive strength, input enable/disable and input schmitt. 29 - 30 - node { 31 - pinmux = <PIN_NUMBER_PINMUX>; 32 - GENERIC_PINCONFIG; 33 - }; 34 - 35 - Required properties: 36 - - pinmux: Integer array, represents gpio pin number and mux setting. 37 - Supported pin number and mux varies for different SoCs, and are defined 38 - as macros in dt-bindings/pinctrl/<soc>-pinfunc.h directly. 39 - 40 - Optional properties: 41 - - GENERIC_PINCONFIG: is the generic pinconfig options to use, bias-disable, 42 - bias-pull, bias-pull-down, input-enable, input-schmitt-enable, 43 - input-schmitt-disable, output-enable output-low, output-high, 44 - drive-strength, and slew-rate are valid. 45 - 46 - Valid arguments for 'slew-rate' are '0' for no slew rate controlled and 47 - '1' for slower slew rate respectively. Valid arguments for 'drive-strength' 48 - is limited, such as 2, 4, 8, 12, or 16 in mA. 49 - 50 - Some optional vendor properties as defined are valid to specify in a 51 - pinconf subnode: 52 - - mediatek,tdsel: An integer describing the steps for output level shifter 53 - duty cycle when asserted (high pulse width adjustment). Valid arguments 54 - are from 0 to 15. 55 - - mediatek,rdsel: An integer describing the steps for input level shifter 56 - duty cycle when asserted (high pulse width adjustment). Valid arguments 57 - are from 0 to 63. 58 - - mediatek,pull-up-adv: An integer describing the code R1R0 as 0, 1, 2 59 - or 3 for the advanced pull-up resistors. 60 - - mediatek,pull-down-adv: An integer describing the code R1R0 as 0, 1, 2, 61 - or 3 for the advanced pull-down resistors. 62 - 63 - Examples: 64 - 65 - pio: pinctrl@10005000 { 66 - compatible = "mediatek,mt6797-pinctrl"; 67 - reg = <0 0x10005000 0 0x1000>, 68 - <0 0x10002000 0 0x400>, 69 - <0 0x10002400 0 0x400>, 70 - <0 0x10002800 0 0x400>, 71 - <0 0x10002C00 0 0x400>; 72 - reg-names = "gpio", "iocfgl", "iocfgb", 73 - "iocfgr", "iocfgt"; 74 - gpio-controller; 75 - #gpio-cells = <2>; 76 - 77 - uart1_pins_a: uart1 { 78 - pins1 { 79 - pinmux = <MT6797_GPIO232__FUNC_URXD1>, 80 - <MT6797_GPIO233__FUNC_UTXD1>; 81 - }; 82 - }; 83 - };
-490
Documentation/devicetree/bindings/pinctrl/pinctrl-mt7622.txt
··· 1 - == MediaTek MT7622 pinctrl controller == 2 - 3 - Required properties for the root node: 4 - - compatible: Should be one of the following 5 - "mediatek,mt7622-pinctrl" for MT7622 SoC 6 - "mediatek,mt7629-pinctrl" for MT7629 SoC 7 - - reg: offset and length of the pinctrl space 8 - 9 - - gpio-controller: Marks the device node as a GPIO controller. 10 - - #gpio-cells: Should be two. The first cell is the pin number and the 11 - second is the GPIO flags. 12 - 13 - Optional properties: 14 - - interrupt-controller : Marks the device node as an interrupt controller 15 - 16 - If the property interrupt-controller is defined, following property is required 17 - - reg-names: A string describing the "reg" entries. Must contain "eint". 18 - - interrupts : The interrupt output from the controller. 19 - - #interrupt-cells: Should be two. 20 - 21 - Please refer to pinctrl-bindings.txt in this directory for details of the 22 - common pinctrl bindings used by client devices, including the meaning of the 23 - phrase "pin configuration node". 24 - 25 - MT7622 pin configuration nodes act as a container for an arbitrary number of 26 - subnodes. Each of these subnodes represents some desired configuration for a 27 - pin, a group, or a list of pins or groups. This configuration can include the 28 - mux function to select on those pin(s)/group(s), and various pin configuration 29 - parameters, such as pull-up, slew rate, etc. 30 - 31 - We support 2 types of configuration nodes. Those nodes can be either pinmux 32 - nodes or pinconf nodes. Each configuration node can consist of multiple nodes 33 - describing the pinmux and pinconf options. 34 - 35 - The name of each subnode doesn't matter as long as it is unique; all subnodes 36 - should be enumerated and processed purely based on their content. 37 - 38 - == pinmux nodes content == 39 - 40 - The following generic properties as defined in pinctrl-bindings.txt are valid 41 - to specify in a pinmux subnode: 42 - 43 - Required properties are: 44 - - groups: An array of strings. Each string contains the name of a group. 45 - Valid values for these names are listed below. 46 - - function: A string containing the name of the function to mux to the 47 - group. Valid values for function names are listed below. 48 - 49 - == pinconf nodes content == 50 - 51 - The following generic properties as defined in pinctrl-bindings.txt are valid 52 - to specify in a pinconf subnode: 53 - 54 - Required properties are: 55 - - pins: An array of strings. Each string contains the name of a pin. 56 - Valid values for these names are listed below. 57 - - groups: An array of strings. Each string contains the name of a group. 58 - Valid values for these names are listed below. 59 - 60 - Optional properies are: 61 - bias-disable, bias-pull, bias-pull-down, input-enable, 62 - input-schmitt-enable, input-schmitt-disable, output-enable 63 - output-low, output-high, drive-strength, slew-rate 64 - 65 - Valid arguments for 'slew-rate' are '0' for no slew rate controlled and '1' for 66 - slower slew rate respectively. 67 - Valid arguments for 'drive-strength', 4, 8, 12, or 16 in mA. 68 - 69 - The following specific properties as defined are valid to specify in a pinconf 70 - subnode: 71 - 72 - Optional properties are: 73 - - mediatek,tdsel: An integer describing the steps for output level shifter duty 74 - cycle when asserted (high pulse width adjustment). Valid arguments are from 0 75 - to 15. 76 - - mediatek,rdsel: An integer describing the steps for input level shifter duty 77 - cycle when asserted (high pulse width adjustment). Valid arguments are from 0 78 - to 63. 79 - 80 - == Valid values for pins, function and groups on MT7622 == 81 - 82 - Valid values for pins are: 83 - pins can be referenced via the pin names as the below table shown and the 84 - related physical number is also put ahead of those names which helps cross 85 - references to pins between groups to know whether pins assignment conflict 86 - happens among devices try to acquire those available pins. 87 - 88 - Pin #: Valid values for pins 89 - ----------------------------- 90 - PIN 0: "GPIO_A" 91 - PIN 1: "I2S1_IN" 92 - PIN 2: "I2S1_OUT" 93 - PIN 3: "I2S_BCLK" 94 - PIN 4: "I2S_WS" 95 - PIN 5: "I2S_MCLK" 96 - PIN 6: "TXD0" 97 - PIN 7: "RXD0" 98 - PIN 8: "SPI_WP" 99 - PIN 9: "SPI_HOLD" 100 - PIN 10: "SPI_CLK" 101 - PIN 11: "SPI_MOSI" 102 - PIN 12: "SPI_MISO" 103 - PIN 13: "SPI_CS" 104 - PIN 14: "I2C_SDA" 105 - PIN 15: "I2C_SCL" 106 - PIN 16: "I2S2_IN" 107 - PIN 17: "I2S3_IN" 108 - PIN 18: "I2S4_IN" 109 - PIN 19: "I2S2_OUT" 110 - PIN 20: "I2S3_OUT" 111 - PIN 21: "I2S4_OUT" 112 - PIN 22: "GPIO_B" 113 - PIN 23: "MDC" 114 - PIN 24: "MDIO" 115 - PIN 25: "G2_TXD0" 116 - PIN 26: "G2_TXD1" 117 - PIN 27: "G2_TXD2" 118 - PIN 28: "G2_TXD3" 119 - PIN 29: "G2_TXEN" 120 - PIN 30: "G2_TXC" 121 - PIN 31: "G2_RXD0" 122 - PIN 32: "G2_RXD1" 123 - PIN 33: "G2_RXD2" 124 - PIN 34: "G2_RXD3" 125 - PIN 35: "G2_RXDV" 126 - PIN 36: "G2_RXC" 127 - PIN 37: "NCEB" 128 - PIN 38: "NWEB" 129 - PIN 39: "NREB" 130 - PIN 40: "NDL4" 131 - PIN 41: "NDL5" 132 - PIN 42: "NDL6" 133 - PIN 43: "NDL7" 134 - PIN 44: "NRB" 135 - PIN 45: "NCLE" 136 - PIN 46: "NALE" 137 - PIN 47: "NDL0" 138 - PIN 48: "NDL1" 139 - PIN 49: "NDL2" 140 - PIN 50: "NDL3" 141 - PIN 51: "MDI_TP_P0" 142 - PIN 52: "MDI_TN_P0" 143 - PIN 53: "MDI_RP_P0" 144 - PIN 54: "MDI_RN_P0" 145 - PIN 55: "MDI_TP_P1" 146 - PIN 56: "MDI_TN_P1" 147 - PIN 57: "MDI_RP_P1" 148 - PIN 58: "MDI_RN_P1" 149 - PIN 59: "MDI_RP_P2" 150 - PIN 60: "MDI_RN_P2" 151 - PIN 61: "MDI_TP_P2" 152 - PIN 62: "MDI_TN_P2" 153 - PIN 63: "MDI_TP_P3" 154 - PIN 64: "MDI_TN_P3" 155 - PIN 65: "MDI_RP_P3" 156 - PIN 66: "MDI_RN_P3" 157 - PIN 67: "MDI_RP_P4" 158 - PIN 68: "MDI_RN_P4" 159 - PIN 69: "MDI_TP_P4" 160 - PIN 70: "MDI_TN_P4" 161 - PIN 71: "PMIC_SCL" 162 - PIN 72: "PMIC_SDA" 163 - PIN 73: "SPIC1_CLK" 164 - PIN 74: "SPIC1_MOSI" 165 - PIN 75: "SPIC1_MISO" 166 - PIN 76: "SPIC1_CS" 167 - PIN 77: "GPIO_D" 168 - PIN 78: "WATCHDOG" 169 - PIN 79: "RTS3_N" 170 - PIN 80: "CTS3_N" 171 - PIN 81: "TXD3" 172 - PIN 82: "RXD3" 173 - PIN 83: "PERST0_N" 174 - PIN 84: "PERST1_N" 175 - PIN 85: "WLED_N" 176 - PIN 86: "EPHY_LED0_N" 177 - PIN 87: "AUXIN0" 178 - PIN 88: "AUXIN1" 179 - PIN 89: "AUXIN2" 180 - PIN 90: "AUXIN3" 181 - PIN 91: "TXD4" 182 - PIN 92: "RXD4" 183 - PIN 93: "RTS4_N" 184 - PIN 94: "CST4_N" 185 - PIN 95: "PWM1" 186 - PIN 96: "PWM2" 187 - PIN 97: "PWM3" 188 - PIN 98: "PWM4" 189 - PIN 99: "PWM5" 190 - PIN 100: "PWM6" 191 - PIN 101: "PWM7" 192 - PIN 102: "GPIO_E" 193 - 194 - Valid values for function are: 195 - "emmc", "eth", "i2c", "i2s", "ir", "led", "flash", "pcie", 196 - "pmic", "pwm", "sd", "spi", "tdm", "uart", "watchdog" 197 - 198 - Valid values for groups are: 199 - additional data is put followingly with valid value allowing us to know which 200 - applicable function and which relevant pins (in pin#) are able applied for that 201 - group. 202 - 203 - Valid value function pins (in pin#) 204 - ------------------------------------------------------------------------- 205 - "emmc" "emmc" 40, 41, 42, 43, 44, 45, 206 - 47, 48, 49, 50 207 - "emmc_rst" "emmc" 37 208 - "esw" "eth" 51, 52, 53, 54, 55, 56, 209 - 57, 58, 59, 60, 61, 62, 210 - 63, 64, 65, 66, 67, 68, 211 - 69, 70 212 - "esw_p0_p1" "eth" 51, 52, 53, 54, 55, 56, 213 - 57, 58 214 - "esw_p2_p3_p4" "eth" 59, 60, 61, 62, 63, 64, 215 - 65, 66, 67, 68, 69, 70 216 - "rgmii_via_esw" "eth" 59, 60, 61, 62, 63, 64, 217 - 65, 66, 67, 68, 69, 70 218 - "rgmii_via_gmac1" "eth" 59, 60, 61, 62, 63, 64, 219 - 65, 66, 67, 68, 69, 70 220 - "rgmii_via_gmac2" "eth" 25, 26, 27, 28, 29, 30, 221 - 31, 32, 33, 34, 35, 36 222 - "mdc_mdio" "eth" 23, 24 223 - "i2c0" "i2c" 14, 15 224 - "i2c1_0" "i2c" 55, 56 225 - "i2c1_1" "i2c" 73, 74 226 - "i2c1_2" "i2c" 87, 88 227 - "i2c2_0" "i2c" 57, 58 228 - "i2c2_1" "i2c" 75, 76 229 - "i2c2_2" "i2c" 89, 90 230 - "i2s_in_mclk_bclk_ws" "i2s" 3, 4, 5 231 - "i2s1_in_data" "i2s" 1 232 - "i2s2_in_data" "i2s" 16 233 - "i2s3_in_data" "i2s" 17 234 - "i2s4_in_data" "i2s" 18 235 - "i2s_out_mclk_bclk_ws" "i2s" 3, 4, 5 236 - "i2s1_out_data" "i2s" 2 237 - "i2s2_out_data" "i2s" 19 238 - "i2s3_out_data" "i2s" 20 239 - "i2s4_out_data" "i2s" 21 240 - "ir_0_tx" "ir" 16 241 - "ir_1_tx" "ir" 59 242 - "ir_2_tx" "ir" 99 243 - "ir_0_rx" "ir" 17 244 - "ir_1_rx" "ir" 60 245 - "ir_2_rx" "ir" 100 246 - "ephy_leds" "led" 86, 91, 92, 93, 94 247 - "ephy0_led" "led" 86 248 - "ephy1_led" "led" 91 249 - "ephy2_led" "led" 92 250 - "ephy3_led" "led" 93 251 - "ephy4_led" "led" 94 252 - "wled" "led" 85 253 - "par_nand" "flash" 37, 38, 39, 40, 41, 42, 254 - 43, 44, 45, 46, 47, 48, 255 - 49, 50 256 - "snfi" "flash" 8, 9, 10, 11, 12, 13 257 - "spi_nor" "flash" 8, 9, 10, 11, 12, 13 258 - "pcie0_0_waken" "pcie" 14 259 - "pcie0_1_waken" "pcie" 79 260 - "pcie1_0_waken" "pcie" 14 261 - "pcie0_0_clkreq" "pcie" 15 262 - "pcie0_1_clkreq" "pcie" 80 263 - "pcie1_0_clkreq" "pcie" 15 264 - "pcie0_pad_perst" "pcie" 83 265 - "pcie1_pad_perst" "pcie" 84 266 - "pmic_bus" "pmic" 71, 72 267 - "pwm_ch1_0" "pwm" 51 268 - "pwm_ch1_1" "pwm" 73 269 - "pwm_ch1_2" "pwm" 95 270 - "pwm_ch2_0" "pwm" 52 271 - "pwm_ch2_1" "pwm" 74 272 - "pwm_ch2_2" "pwm" 96 273 - "pwm_ch3_0" "pwm" 53 274 - "pwm_ch3_1" "pwm" 75 275 - "pwm_ch3_2" "pwm" 97 276 - "pwm_ch4_0" "pwm" 54 277 - "pwm_ch4_1" "pwm" 67 278 - "pwm_ch4_2" "pwm" 76 279 - "pwm_ch4_3" "pwm" 98 280 - "pwm_ch5_0" "pwm" 68 281 - "pwm_ch5_1" "pwm" 77 282 - "pwm_ch5_2" "pwm" 99 283 - "pwm_ch6_0" "pwm" 69 284 - "pwm_ch6_1" "pwm" 78 285 - "pwm_ch6_2" "pwm" 81 286 - "pwm_ch6_3" "pwm" 100 287 - "pwm_ch7_0" "pwm" 70 288 - "pwm_ch7_1" "pwm" 82 289 - "pwm_ch7_2" "pwm" 101 290 - "sd_0" "sd" 16, 17, 18, 19, 20, 21 291 - "sd_1" "sd" 25, 26, 27, 28, 29, 30 292 - "spic0_0" "spi" 63, 64, 65, 66 293 - "spic0_1" "spi" 79, 80, 81, 82 294 - "spic1_0" "spi" 67, 68, 69, 70 295 - "spic1_1" "spi" 73, 74, 75, 76 296 - "spic2_0_wp_hold" "spi" 8, 9 297 - "spic2_0" "spi" 10, 11, 12, 13 298 - "tdm_0_out_mclk_bclk_ws" "tdm" 8, 9, 10 299 - "tdm_0_in_mclk_bclk_ws" "tdm" 11, 12, 13 300 - "tdm_0_out_data" "tdm" 20 301 - "tdm_0_in_data" "tdm" 21 302 - "tdm_1_out_mclk_bclk_ws" "tdm" 57, 58, 59 303 - "tdm_1_in_mclk_bclk_ws" "tdm" 60, 61, 62 304 - "tdm_1_out_data" "tdm" 55 305 - "tdm_1_in_data" "tdm" 56 306 - "uart0_0_tx_rx" "uart" 6, 7 307 - "uart1_0_tx_rx" "uart" 55, 56 308 - "uart1_0_rts_cts" "uart" 57, 58 309 - "uart1_1_tx_rx" "uart" 73, 74 310 - "uart1_1_rts_cts" "uart" 75, 76 311 - "uart2_0_tx_rx" "uart" 3, 4 312 - "uart2_0_rts_cts" "uart" 1, 2 313 - "uart2_1_tx_rx" "uart" 51, 52 314 - "uart2_1_rts_cts" "uart" 53, 54 315 - "uart2_2_tx_rx" "uart" 59, 60 316 - "uart2_2_rts_cts" "uart" 61, 62 317 - "uart2_3_tx_rx" "uart" 95, 96 318 - "uart3_0_tx_rx" "uart" 57, 58 319 - "uart3_1_tx_rx" "uart" 81, 82 320 - "uart3_1_rts_cts" "uart" 79, 80 321 - "uart4_0_tx_rx" "uart" 61, 62 322 - "uart4_1_tx_rx" "uart" 91, 92 323 - "uart4_1_rts_cts" "uart" 93, 94 324 - "uart4_2_tx_rx" "uart" 97, 98 325 - "uart4_2_rts_cts" "uart" 95, 96 326 - "watchdog" "watchdog" 78 327 - 328 - 329 - == Valid values for pins, function and groups on MT7629 == 330 - 331 - Pin #: Valid values for pins 332 - ----------------------------- 333 - PIN 0: "TOP_5G_CLK" 334 - PIN 1: "TOP_5G_DATA" 335 - PIN 2: "WF0_5G_HB0" 336 - PIN 3: "WF0_5G_HB1" 337 - PIN 4: "WF0_5G_HB2" 338 - PIN 5: "WF0_5G_HB3" 339 - PIN 6: "WF0_5G_HB4" 340 - PIN 7: "WF0_5G_HB5" 341 - PIN 8: "WF0_5G_HB6" 342 - PIN 9: "XO_REQ" 343 - PIN 10: "TOP_RST_N" 344 - PIN 11: "SYS_WATCHDOG" 345 - PIN 12: "EPHY_LED0_N_JTDO" 346 - PIN 13: "EPHY_LED1_N_JTDI" 347 - PIN 14: "EPHY_LED2_N_JTMS" 348 - PIN 15: "EPHY_LED3_N_JTCLK" 349 - PIN 16: "EPHY_LED4_N_JTRST_N" 350 - PIN 17: "WF2G_LED_N" 351 - PIN 18: "WF5G_LED_N" 352 - PIN 19: "I2C_SDA" 353 - PIN 20: "I2C_SCL" 354 - PIN 21: "GPIO_9" 355 - PIN 22: "GPIO_10" 356 - PIN 23: "GPIO_11" 357 - PIN 24: "GPIO_12" 358 - PIN 25: "UART1_TXD" 359 - PIN 26: "UART1_RXD" 360 - PIN 27: "UART1_CTS" 361 - PIN 28: "UART1_RTS" 362 - PIN 29: "UART2_TXD" 363 - PIN 30: "UART2_RXD" 364 - PIN 31: "UART2_CTS" 365 - PIN 32: "UART2_RTS" 366 - PIN 33: "MDI_TP_P1" 367 - PIN 34: "MDI_TN_P1" 368 - PIN 35: "MDI_RP_P1" 369 - PIN 36: "MDI_RN_P1" 370 - PIN 37: "MDI_RP_P2" 371 - PIN 38: "MDI_RN_P2" 372 - PIN 39: "MDI_TP_P2" 373 - PIN 40: "MDI_TN_P2" 374 - PIN 41: "MDI_TP_P3" 375 - PIN 42: "MDI_TN_P3" 376 - PIN 43: "MDI_RP_P3" 377 - PIN 44: "MDI_RN_P3" 378 - PIN 45: "MDI_RP_P4" 379 - PIN 46: "MDI_RN_P4" 380 - PIN 47: "MDI_TP_P4" 381 - PIN 48: "MDI_TN_P4" 382 - PIN 49: "SMI_MDC" 383 - PIN 50: "SMI_MDIO" 384 - PIN 51: "PCIE_PERESET_N" 385 - PIN 52: "PWM_0" 386 - PIN 53: "GPIO_0" 387 - PIN 54: "GPIO_1" 388 - PIN 55: "GPIO_2" 389 - PIN 56: "GPIO_3" 390 - PIN 57: "GPIO_4" 391 - PIN 58: "GPIO_5" 392 - PIN 59: "GPIO_6" 393 - PIN 60: "GPIO_7" 394 - PIN 61: "GPIO_8" 395 - PIN 62: "SPI_CLK" 396 - PIN 63: "SPI_CS" 397 - PIN 64: "SPI_MOSI" 398 - PIN 65: "SPI_MISO" 399 - PIN 66: "SPI_WP" 400 - PIN 67: "SPI_HOLD" 401 - PIN 68: "UART0_TXD" 402 - PIN 69: "UART0_RXD" 403 - PIN 70: "TOP_2G_CLK" 404 - PIN 71: "TOP_2G_DATA" 405 - PIN 72: "WF0_2G_HB0" 406 - PIN 73: "WF0_2G_HB1" 407 - PIN 74: "WF0_2G_HB2" 408 - PIN 75: "WF0_2G_HB3" 409 - PIN 76: "WF0_2G_HB4" 410 - PIN 77: "WF0_2G_HB5" 411 - PIN 78: "WF0_2G_HB6" 412 - 413 - Valid values for function are: 414 - "eth", "i2c", "led", "flash", "pcie", "pwm", "spi", "uart", 415 - "watchdog", "wifi" 416 - 417 - Valid values for groups are: 418 - Valid value function pins (in pin#) 419 - ---------------------------------------------------------------- 420 - "mdc_mdio" "eth" 23, 24 421 - "i2c_0" "i2c" 19, 20 422 - "i2c_1" "i2c" 53, 54 423 - "ephy_leds" "led" 12, 13, 14, 15, 16, 424 - 17, 18 425 - "ephy0_led" "led" 12 426 - "ephy1_led" "led" 13 427 - "ephy2_led" "led" 14 428 - "ephy3_led" "led" 15 429 - "ephy4_led" "led" 16 430 - "wf2g_led" "led" 17 431 - "wf5g_led" "led" 18 432 - "snfi" "flash" 62, 63, 64, 65, 66, 67 433 - "spi_nor" "flash" 62, 63, 64, 65, 66, 67 434 - "pcie_pereset" "pcie" 51 435 - "pcie_wake" "pcie" 55 436 - "pcie_clkreq" "pcie" 56 437 - "pwm_0" "pwm" 52 438 - "pwm_1" "pwm" 61 439 - "spi_0" "spi" 21, 22, 23, 24 440 - "spi_1" "spi" 62, 63, 64, 65 441 - "spi_wp" "spi" 66 442 - "spi_hold" "spi" 67 443 - "uart0_txd_rxd" "uart" 68, 69 444 - "uart1_0_txd_rxd" "uart" 25, 26 445 - "uart1_0_cts_rts" "uart" 27, 28 446 - "uart1_1_txd_rxd" "uart" 53, 54 447 - "uart1_1_cts_rts" "uart" 55, 56 448 - "uart2_0_txd_rxd" "uart" 29, 30 449 - "uart2_0_cts_rts" "uart" 31, 32 450 - "uart2_1_txd_rxd" "uart" 57, 58 451 - "uart2_1_cts_rts" "uart" 59, 60 452 - "watchdog" "watchdog" 11 453 - "wf0_2g" "wifi" 70, 71, 72, 73, 74, 454 - 75, 76, 77, 78 455 - "wf0_5g" "wifi" 0, 1, 2, 3, 4, 5, 6, 456 - 7, 8, 9, 10 457 - 458 - Example: 459 - 460 - pio: pinctrl@10211000 { 461 - compatible = "mediatek,mt7622-pinctrl"; 462 - reg = <0 0x10211000 0 0x1000>; 463 - gpio-controller; 464 - #gpio-cells = <2>; 465 - 466 - pinctrl_eth_default: eth-default { 467 - mux-mdio { 468 - groups = "mdc_mdio"; 469 - function = "eth"; 470 - drive-strength = <12>; 471 - }; 472 - 473 - mux-gmac2 { 474 - groups = "gmac2"; 475 - function = "eth"; 476 - drive-strength = <12>; 477 - }; 478 - 479 - mux-esw { 480 - groups = "esw"; 481 - function = "eth"; 482 - drive-strength = <8>; 483 - }; 484 - 485 - conf-mdio { 486 - pins = "MDC"; 487 - bias-pull-up; 488 - }; 489 - }; 490 - };
-132
Documentation/devicetree/bindings/pinctrl/pinctrl-mt8183.txt
··· 1 - * Mediatek MT8183 Pin Controller 2 - 3 - The Mediatek's Pin controller is used to control SoC pins. 4 - 5 - Required properties: 6 - - compatible: value should be one of the following. 7 - "mediatek,mt8183-pinctrl", compatible with mt8183 pinctrl. 8 - - gpio-controller : Marks the device node as a gpio controller. 9 - - #gpio-cells: number of cells in GPIO specifier. Since the generic GPIO 10 - binding is used, the amount of cells must be specified as 2. See the below 11 - mentioned gpio binding representation for description of particular cells. 12 - - gpio-ranges : gpio valid number range. 13 - - reg: physical address base for gpio base registers. There are 10 GPIO 14 - physical address base in mt8183. 15 - 16 - Optional properties: 17 - - reg-names: gpio base register names. There are 10 gpio base register 18 - names in mt8183. They are "iocfg0", "iocfg1", "iocfg2", "iocfg3", "iocfg4", 19 - "iocfg5", "iocfg6", "iocfg7", "iocfg8", "eint". 20 - - interrupt-controller: Marks the device node as an interrupt controller 21 - - #interrupt-cells: Should be two. 22 - - interrupts : The interrupt outputs to sysirq. 23 - 24 - Please refer to pinctrl-bindings.txt in this directory for details of the 25 - common pinctrl bindings used by client devices. 26 - 27 - Subnode format 28 - A pinctrl node should contain at least one subnodes representing the 29 - pinctrl groups available on the machine. Each subnode will list the 30 - pins it needs, and how they should be configured, with regard to muxer 31 - configuration, pullups, drive strength, input enable/disable and input schmitt. 32 - 33 - node { 34 - pinmux = <PIN_NUMBER_PINMUX>; 35 - GENERIC_PINCONFIG; 36 - }; 37 - 38 - Required properties: 39 - - pinmux: integer array, represents gpio pin number and mux setting. 40 - Supported pin number and mux varies for different SoCs, and are defined 41 - as macros in boot/dts/<soc>-pinfunc.h directly. 42 - 43 - Optional properties: 44 - - GENERIC_PINCONFIG: is the generic pinconfig options to use, bias-disable, 45 - bias-pull-down, bias-pull-up, input-enable, input-disable, output-low, 46 - output-high, input-schmitt-enable, input-schmitt-disable 47 - and drive-strength are valid. 48 - 49 - Some special pins have extra pull up strength, there are R0 and R1 pull-up 50 - resistors available, but for user, it's only need to set R1R0 as 00, 01, 51 - 10 or 11. So It needs config "mediatek,pull-up-adv" or 52 - "mediatek,pull-down-adv" to support arguments for those special pins. 53 - Valid arguments are from 0 to 3. 54 - 55 - mediatek,tdsel: An integer describing the steps for output level shifter 56 - duty cycle when asserted (high pulse width adjustment). Valid arguments 57 - are from 0 to 15. 58 - mediatek,rdsel: An integer describing the steps for input level shifter 59 - duty cycle when asserted (high pulse width adjustment). Valid arguments 60 - are from 0 to 63. 61 - 62 - When config drive-strength, it can support some arguments, such as 63 - MTK_DRIVE_4mA, MTK_DRIVE_6mA, etc. See dt-bindings/pinctrl/mt65xx.h. 64 - It can only support 2/4/6/8/10/12/14/16mA in mt8183. 65 - For I2C pins, there are existing generic driving setup and the specific 66 - driving setup. I2C pins can only support 2/4/6/8/10/12/14/16mA driving 67 - adjustment in generic driving setup. But in specific driving setup, 68 - they can support 0.125/0.25/0.5/1mA adjustment. If we enable specific 69 - driving setup for I2C pins, the existing generic driving setup will be 70 - disabled. For some special features, we need the I2C pins specific 71 - driving setup. The specific driving setup is controlled by E1E0EN. 72 - So we need add extra vendor driving preperty instead of 73 - the generic driving property. 74 - We can add "mediatek,drive-strength-adv = <XXX>;" to describe the specific 75 - driving setup property. "XXX" means the value of E1E0EN. EN is 0 or 1. 76 - It is used to enable or disable the specific driving setup. 77 - E1E0 is used to describe the detail strength specification of the I2C pin. 78 - When E1=0/E0=0, the strength is 0.125mA. 79 - When E1=0/E0=1, the strength is 0.25mA. 80 - When E1=1/E0=0, the strength is 0.5mA. 81 - When E1=1/E0=1, the strength is 1mA. 82 - So the valid arguments of "mediatek,drive-strength-adv" are from 0 to 7. 83 - 84 - Examples: 85 - 86 - #include "mt8183-pinfunc.h" 87 - 88 - ... 89 - { 90 - pio: pinctrl@10005000 { 91 - compatible = "mediatek,mt8183-pinctrl"; 92 - reg = <0 0x10005000 0 0x1000>, 93 - <0 0x11f20000 0 0x1000>, 94 - <0 0x11e80000 0 0x1000>, 95 - <0 0x11e70000 0 0x1000>, 96 - <0 0x11e90000 0 0x1000>, 97 - <0 0x11d30000 0 0x1000>, 98 - <0 0x11d20000 0 0x1000>, 99 - <0 0x11c50000 0 0x1000>, 100 - <0 0x11f30000 0 0x1000>, 101 - <0 0x1000b000 0 0x1000>; 102 - reg-names = "iocfg0", "iocfg1", "iocfg2", 103 - "iocfg3", "iocfg4", "iocfg5", 104 - "iocfg6", "iocfg7", "iocfg8", 105 - "eint"; 106 - gpio-controller; 107 - #gpio-cells = <2>; 108 - gpio-ranges = <&pio 0 0 192>; 109 - interrupt-controller; 110 - interrupts = <GIC_SPI 177 IRQ_TYPE_LEVEL_HIGH>; 111 - #interrupt-cells = <2>; 112 - 113 - i2c0_pins_a: i2c0 { 114 - pins1 { 115 - pinmux = <PINMUX_GPIO48__FUNC_SCL5>, 116 - <PINMUX_GPIO49__FUNC_SDA5>; 117 - mediatek,pull-up-adv = <3>; 118 - mediatek,drive-strength-adv = <7>; 119 - }; 120 - }; 121 - 122 - i2c1_pins_a: i2c1 { 123 - pins { 124 - pinmux = <PINMUX_GPIO50__FUNC_SCL3>, 125 - <PINMUX_GPIO51__FUNC_SDA3>; 126 - mediatek,pull-down-adv = <2>; 127 - mediatek,drive-strength-adv = <4>; 128 - }; 129 - }; 130 - ... 131 - }; 132 - };
+1 -4
Documentation/devicetree/bindings/pinctrl/pinctrl-mt8195.yaml
··· 80 80 as macros in dt-bindings/pinctrl/<soc>-pinfunc.h directly. 81 81 82 82 drive-strength: 83 - description: | 84 - It can support some arguments which is from 0 to 7. It can only support 85 - 2/4/6/8/10/12/14/16mA in mt8195. 86 - enum: [0, 1, 2, 3, 4, 5, 6, 7] 83 + enum: [2, 4, 6, 8, 10, 12, 14, 16] 87 84 88 85 bias-pull-down: true 89 86
+133
Documentation/devicetree/bindings/pinctrl/qcom,mdm9607-pinctrl.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/pinctrl/qcom,mdm9607-pinctrl.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Qualcomm Technologies, Inc. MDM9607 TLMM block 8 + 9 + maintainers: 10 + - Konrad Dybcio <konrad.dybcio@somainline.org> 11 + 12 + description: | 13 + This binding describes the Top Level Mode Multiplexer block found in the 14 + MDM9607 platform. 15 + 16 + allOf: 17 + - $ref: /schemas/pinctrl/qcom,tlmm-common.yaml# 18 + 19 + properties: 20 + compatible: 21 + const: qcom,mdm9607-tlmm 22 + 23 + reg: 24 + maxItems: 1 25 + 26 + interrupts: true 27 + interrupt-controller: true 28 + '#interrupt-cells': true 29 + gpio-controller: true 30 + gpio-reserved-ranges: true 31 + '#gpio-cells': true 32 + gpio-ranges: true 33 + wakeup-parent: true 34 + 35 + required: 36 + - compatible 37 + - reg 38 + 39 + additionalProperties: false 40 + 41 + patternProperties: 42 + '-state$': 43 + oneOf: 44 + - $ref: "#/$defs/qcom-mdm9607-tlmm-state" 45 + - patternProperties: 46 + ".*": 47 + $ref: "#/$defs/qcom-mdm9607-tlmm-state" 48 + 49 + '$defs': 50 + qcom-mdm9607-tlmm-state: 51 + type: object 52 + description: 53 + Pinctrl node's client devices use subnodes for desired pin configuration. 54 + Client device subnodes use below standard properties. 55 + $ref: "qcom,tlmm-common.yaml#/$defs/qcom-tlmm-state" 56 + 57 + properties: 58 + pins: 59 + description: 60 + List of gpio pins affected by the properties specified in this 61 + subnode. 62 + items: 63 + oneOf: 64 + - pattern: "^gpio([1-9]|[1-7][0-9]|80)$" 65 + - enum: [ sdc1_clk, sdc1_cmd, sdc1_data, sdc2_clk, sdc2_cmd, 66 + sdc2_data, qdsd_cmd, qdsd_data0, qdsd_data1, qdsd_data2, 67 + qdsd_data3 ] 68 + minItems: 1 69 + maxItems: 16 70 + 71 + function: 72 + description: 73 + Specify the alternative function to be configured for the specified 74 + pins. 75 + 76 + enum: [ adsp_ext, atest_bbrx0, atest_bbrx1, atest_char, atest_char0, 77 + atest_char1, atest_char2, atest_char3, 78 + atest_combodac_to_gpio_native, atest_gpsadc_dtest0_native, 79 + atest_gpsadc_dtest1_native, atest_tsens, backlight_en_b, 80 + bimc_dte0, bimc_dte1, blsp1_spi, blsp2_spi, blsp3_spi, 81 + blsp_i2c1, blsp_i2c2, blsp_i2c3, blsp_i2c4, blsp_i2c5, 82 + blsp_i2c6, blsp_spi1, blsp_spi2, blsp_spi3, blsp_spi4, 83 + blsp_spi5, blsp_spi6, blsp_uart1, blsp_uart2, blsp_uart3, 84 + blsp_uart4, blsp_uart5, blsp_uart6, blsp_uim1, blsp_uim2, 85 + codec_int, codec_rst, coex_uart, cri_trng, cri_trng0, 86 + cri_trng1, dbg_out, ebi0_wrcdc, ebi2_a, ebi2_a_d_8_b, 87 + ebi2_lcd, ebi2_lcd_cs_n_b, ebi2_lcd_te_b, eth_irq, eth_rst, 88 + gcc_gp1_clk_a, gcc_gp1_clk_b, gcc_gp2_clk_a, gcc_gp2_clk_b, 89 + gcc_gp3_clk_a, gcc_gp3_clk_b, gcc_plltest, gcc_tlmm, gmac_mdio, 90 + gpio, gsm0_tx, lcd_rst, ldo_en, ldo_update, m_voc, modem_tsync, 91 + nav_ptp_pps_in_a, nav_ptp_pps_in_b, nav_tsync_out_a, 92 + nav_tsync_out_b, pa_indicator, pbs0, pbs1, pbs2, 93 + pri_mi2s_data0_a, pri_mi2s_data1_a, pri_mi2s_mclk_a, 94 + pri_mi2s_sck_a, pri_mi2s_ws_a, prng_rosc, ptp_pps_out_a, 95 + ptp_pps_out_b, pwr_crypto_enabled_a, pwr_crypto_enabled_b, 96 + pwr_modem_enabled_a, pwr_modem_enabled_b, pwr_nav_enabled_a, 97 + pwr_nav_enabled_b, qdss_cti_trig_in_a0, qdss_cti_trig_in_a1, 98 + qdss_cti_trig_in_b0, qdss_cti_trig_in_b1, qdss_cti_trig_out_a0, 99 + qdss_cti_trig_out_a1, qdss_cti_trig_out_b0, qdss_cti_trig_out_b1, 100 + qdss_traceclk_a, qdss_traceclk_b, qdss_tracectl_a, 101 + qdss_tracectl_b, qdss_tracedata_a, qdss_tracedata_b, rcm_marker1, 102 + rcm_marker2, sd_write, sec_mi2s, sensor_en, sensor_int2, 103 + sensor_int3, sensor_rst, ssbi1, ssbi2, touch_rst, ts_int, 104 + uim1_clk, uim1_data, uim1_present, uim1_reset, uim2_clk, 105 + uim2_data, uim2_present, uim2_reset, uim_batt, wlan_en1, ] 106 + 107 + bias-disable: true 108 + bias-pull-down: true 109 + bias-pull-up: true 110 + drive-strength: true 111 + input-enable: true 112 + output-high: true 113 + output-low: true 114 + 115 + required: 116 + - pins 117 + - function 118 + 119 + additionalProperties: false 120 + 121 + examples: 122 + - | 123 + #include <dt-bindings/interrupt-controller/arm-gic.h> 124 + tlmm: pinctrl@1000000 { 125 + compatible = "qcom,mdm9607-tlmm"; 126 + reg = <0x01000000 0x300000>; 127 + interrupts = <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>; 128 + gpio-controller; 129 + gpio-ranges = <&msmgpio 0 0 80>; 130 + #gpio-cells = <2>; 131 + interrupt-controller; 132 + #interrupt-cells = <2>; 133 + };
-288
Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.txt
··· 1 - Qualcomm PMIC GPIO block 2 - 3 - This binding describes the GPIO block(s) found in the 8xxx series of 4 - PMIC's from Qualcomm. 5 - 6 - - compatible: 7 - Usage: required 8 - Value type: <string> 9 - Definition: must be one of: 10 - "qcom,pm8005-gpio" 11 - "qcom,pm8018-gpio" 12 - "qcom,pm8038-gpio" 13 - "qcom,pm8058-gpio" 14 - "qcom,pm8916-gpio" 15 - "qcom,pm8917-gpio" 16 - "qcom,pm8921-gpio" 17 - "qcom,pm8941-gpio" 18 - "qcom,pm8950-gpio" 19 - "qcom,pm8994-gpio" 20 - "qcom,pm8998-gpio" 21 - "qcom,pma8084-gpio" 22 - "qcom,pmi8950-gpio" 23 - "qcom,pmi8994-gpio" 24 - "qcom,pmi8998-gpio" 25 - "qcom,pms405-gpio" 26 - "qcom,pm660-gpio" 27 - "qcom,pm660l-gpio" 28 - "qcom,pm8150-gpio" 29 - "qcom,pm8150b-gpio" 30 - "qcom,pm8350-gpio" 31 - "qcom,pm8350b-gpio" 32 - "qcom,pm8350c-gpio" 33 - "qcom,pmk8350-gpio" 34 - "qcom,pm7325-gpio" 35 - "qcom,pmr735a-gpio" 36 - "qcom,pmr735b-gpio" 37 - "qcom,pm6150-gpio" 38 - "qcom,pm6150l-gpio" 39 - "qcom,pm8008-gpio" 40 - "qcom,pmx55-gpio" 41 - 42 - And must contain either "qcom,spmi-gpio" or "qcom,ssbi-gpio" 43 - if the device is on an spmi bus or an ssbi bus respectively 44 - 45 - - reg: 46 - Usage: required 47 - Value type: <prop-encoded-array> 48 - Definition: Register base of the GPIO block and length. 49 - 50 - - interrupts: 51 - Usage: required 52 - Value type: <prop-encoded-array> 53 - Definition: Must contain an array of encoded interrupt specifiers for 54 - each available GPIO 55 - 56 - - gpio-controller: 57 - Usage: required 58 - Value type: <none> 59 - Definition: Mark the device node as a GPIO controller 60 - 61 - - #gpio-cells: 62 - Usage: required 63 - Value type: <u32> 64 - Definition: Must be 2; 65 - the first cell will be used to define gpio number and the 66 - second denotes the flags for this gpio 67 - 68 - Please refer to ../gpio/gpio.txt and ../interrupt-controller/interrupts.txt for 69 - a general description of GPIO and interrupt bindings. 70 - 71 - Please refer to pinctrl-bindings.txt in this directory for details of the 72 - common pinctrl bindings used by client devices, including the meaning of the 73 - phrase "pin configuration node". 74 - 75 - The pin configuration nodes act as a container for an arbitrary number of 76 - subnodes. Each of these subnodes represents some desired configuration for a 77 - pin or a list of pins. This configuration can include the 78 - mux function to select on those pin(s), and various pin configuration 79 - parameters, as listed below. 80 - 81 - 82 - SUBNODES: 83 - 84 - The name of each subnode is not important; all subnodes should be enumerated 85 - and processed purely based on their content. 86 - 87 - Each subnode only affects those parameters that are explicitly listed. In 88 - other words, a subnode that lists a mux function but no pin configuration 89 - parameters implies no information about any pin configuration parameters. 90 - Similarly, a pin subnode that describes a pullup parameter implies no 91 - information about e.g. the mux function. 92 - 93 - The following generic properties as defined in pinctrl-bindings.txt are valid 94 - to specify in a pin configuration subnode: 95 - 96 - - pins: 97 - Usage: required 98 - Value type: <string-array> 99 - Definition: List of gpio pins affected by the properties specified in 100 - this subnode. Valid pins are: 101 - gpio1-gpio4 for pm8005 102 - gpio1-gpio6 for pm8018 103 - gpio1-gpio12 for pm8038 104 - gpio1-gpio40 for pm8058 105 - gpio1-gpio4 for pm8916 106 - gpio1-gpio38 for pm8917 107 - gpio1-gpio44 for pm8921 108 - gpio1-gpio36 for pm8941 109 - gpio1-gpio8 for pm8950 (hole on gpio3) 110 - gpio1-gpio22 for pm8994 111 - gpio1-gpio26 for pm8998 112 - gpio1-gpio22 for pma8084 113 - gpio1-gpio2 for pmi8950 114 - gpio1-gpio10 for pmi8994 115 - gpio1-gpio12 for pms405 (holes on gpio1, gpio9 and gpio10) 116 - gpio1-gpio10 for pm8150 (holes on gpio2, gpio5, gpio7 117 - and gpio8) 118 - gpio1-gpio12 for pm8150b (holes on gpio3, gpio4, gpio7) 119 - gpio1-gpio12 for pm8150l (hole on gpio7) 120 - gpio1-gpio10 for pm8350 121 - gpio1-gpio8 for pm8350b 122 - gpio1-gpio9 for pm8350c 123 - gpio1-gpio4 for pmk8350 124 - gpio1-gpio10 for pm7325 125 - gpio1-gpio4 for pmr735a 126 - gpio1-gpio4 for pmr735b 127 - gpio1-gpio10 for pm6150 128 - gpio1-gpio12 for pm6150l 129 - gpio1-gpio2 for pm8008 130 - gpio1-gpio11 for pmx55 (holes on gpio3, gpio7, gpio10 131 - and gpio11) 132 - 133 - - function: 134 - Usage: required 135 - Value type: <string> 136 - Definition: Specify the alternative function to be configured for the 137 - specified pins. Valid values are: 138 - "normal", 139 - "paired", 140 - "func1", 141 - "func2", 142 - "dtest1", 143 - "dtest2", 144 - "dtest3", 145 - "dtest4", 146 - And following values are supported by LV/MV GPIO subtypes: 147 - "func3", 148 - "func4" 149 - 150 - - bias-disable: 151 - Usage: optional 152 - Value type: <none> 153 - Definition: The specified pins should be configured as no pull. 154 - 155 - - bias-pull-down: 156 - Usage: optional 157 - Value type: <none> 158 - Definition: The specified pins should be configured as pull down. 159 - 160 - - bias-pull-up: 161 - Usage: optional 162 - Value type: <empty> 163 - Definition: The specified pins should be configured as pull up. 164 - 165 - - qcom,pull-up-strength: 166 - Usage: optional 167 - Value type: <u32> 168 - Definition: Specifies the strength to use for pull up, if selected. 169 - Valid values are; as defined in 170 - <dt-bindings/pinctrl/qcom,pmic-gpio.h>: 171 - 1: 30uA (PMIC_GPIO_PULL_UP_30) 172 - 2: 1.5uA (PMIC_GPIO_PULL_UP_1P5) 173 - 3: 31.5uA (PMIC_GPIO_PULL_UP_31P5) 174 - 4: 1.5uA + 30uA boost (PMIC_GPIO_PULL_UP_1P5_30) 175 - If this property is omitted 30uA strength will be used if 176 - pull up is selected 177 - 178 - - bias-high-impedance: 179 - Usage: optional 180 - Value type: <none> 181 - Definition: The specified pins will put in high-Z mode and disabled. 182 - 183 - - input-enable: 184 - Usage: optional 185 - Value type: <none> 186 - Definition: The specified pins are put in input mode. 187 - 188 - - output-high: 189 - Usage: optional 190 - Value type: <none> 191 - Definition: The specified pins are configured in output mode, driven 192 - high. 193 - 194 - - output-low: 195 - Usage: optional 196 - Value type: <none> 197 - Definition: The specified pins are configured in output mode, driven 198 - low. 199 - 200 - - power-source: 201 - Usage: optional 202 - Value type: <u32> 203 - Definition: Selects the power source for the specified pins. Valid 204 - power sources are defined per chip in 205 - <dt-bindings/pinctrl/qcom,pmic-gpio.h> 206 - 207 - - qcom,drive-strength: 208 - Usage: optional 209 - Value type: <u32> 210 - Definition: Selects the drive strength for the specified pins. Value 211 - drive strengths are: 212 - 0: no (PMIC_GPIO_STRENGTH_NO) 213 - 1: high (PMIC_GPIO_STRENGTH_HIGH) 0.9mA @ 1.8V - 1.9mA @ 2.6V 214 - 2: medium (PMIC_GPIO_STRENGTH_MED) 0.6mA @ 1.8V - 1.25mA @ 2.6V 215 - 3: low (PMIC_GPIO_STRENGTH_LOW) 0.15mA @ 1.8V - 0.3mA @ 2.6V 216 - as defined in <dt-bindings/pinctrl/qcom,pmic-gpio.h> 217 - 218 - - drive-push-pull: 219 - Usage: optional 220 - Value type: <none> 221 - Definition: The specified pins are configured in push-pull mode. 222 - 223 - - drive-open-drain: 224 - Usage: optional 225 - Value type: <none> 226 - Definition: The specified pins are configured in open-drain mode. 227 - 228 - - drive-open-source: 229 - Usage: optional 230 - Value type: <none> 231 - Definition: The specified pins are configured in open-source mode. 232 - 233 - - qcom,analog-pass: 234 - Usage: optional 235 - Value type: <none> 236 - Definition: The specified pins are configured in analog-pass-through mode. 237 - 238 - - qcom,atest: 239 - Usage: optional 240 - Value type: <u32> 241 - Definition: Selects ATEST rail to route to GPIO when it's configured 242 - in analog-pass-through mode. 243 - Valid values are 1-4 corresponding to ATEST1 to ATEST4. 244 - 245 - - qcom,dtest-buffer: 246 - Usage: optional 247 - Value type: <u32> 248 - Definition: Selects DTEST rail to route to GPIO when it's configured 249 - as digital input. 250 - Valid values are 1-4 corresponding to DTEST1 to DTEST4. 251 - 252 - Example: 253 - 254 - pm8921_gpio: gpio@150 { 255 - compatible = "qcom,pm8921-gpio", "qcom,ssbi-gpio"; 256 - reg = <0x150 0x160>; 257 - interrupts = <192 1>, <193 1>, <194 1>, 258 - <195 1>, <196 1>, <197 1>, 259 - <198 1>, <199 1>, <200 1>, 260 - <201 1>, <202 1>, <203 1>, 261 - <204 1>, <205 1>, <206 1>, 262 - <207 1>, <208 1>, <209 1>, 263 - <210 1>, <211 1>, <212 1>, 264 - <213 1>, <214 1>, <215 1>, 265 - <216 1>, <217 1>, <218 1>, 266 - <219 1>, <220 1>, <221 1>, 267 - <222 1>, <223 1>, <224 1>, 268 - <225 1>, <226 1>, <227 1>, 269 - <228 1>, <229 1>, <230 1>, 270 - <231 1>, <232 1>, <233 1>, 271 - <234 1>, <235 1>; 272 - 273 - gpio-controller; 274 - #gpio-cells = <2>; 275 - 276 - pm8921_gpio_keys: gpio-keys { 277 - volume-keys { 278 - pins = "gpio20", "gpio21"; 279 - function = "normal"; 280 - 281 - input-enable; 282 - bias-pull-up; 283 - drive-push-pull; 284 - qcom,drive-strength = <PMIC_GPIO_STRENGTH_NO>; 285 - power-source = <PM8921_GPIO_S4>; 286 - }; 287 - }; 288 - };
+239
Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/pinctrl/qcom,pmic-gpio.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Qualcomm PMIC GPIO block 8 + 9 + maintainers: 10 + - Bjorn Andersson <bjorn.andersson@linaro.org> 11 + 12 + description: 13 + This binding describes the GPIO block(s) found in the 8xxx series of 14 + PMIC's from Qualcomm. 15 + 16 + properties: 17 + compatible: 18 + items: 19 + - enum: 20 + - qcom,pm660-gpio 21 + - qcom,pm660l-gpio 22 + - qcom,pm6150-gpio 23 + - qcom,pm6150l-gpio 24 + - qcom,pm7325-gpio 25 + - qcom,pm8005-gpio 26 + - qcom,pm8008-gpio 27 + - qcom,pm8018-gpio 28 + - qcom,pm8038-gpio 29 + - qcom,pm8058-gpio 30 + - qcom,pm8150-gpio 31 + - qcom,pm8150b-gpio 32 + - qcom,pm8350-gpio 33 + - qcom,pm8350b-gpio 34 + - qcom,pm8350c-gpio 35 + - qcom,pm8916-gpio 36 + - qcom,pm8917-gpio 37 + - qcom,pm8921-gpio 38 + - qcom,pm8941-gpio 39 + - qcom,pm8950-gpio 40 + - qcom,pm8994-gpio 41 + - qcom,pm8998-gpio 42 + - qcom,pma8084-gpio 43 + - qcom,pmi8950-gpio 44 + - qcom,pmi8994-gpio 45 + - qcom,pmi8998-gpio 46 + - qcom,pmk8350-gpio 47 + - qcom,pmr735a-gpio 48 + - qcom,pmr735b-gpio 49 + - qcom,pms405-gpio 50 + - qcom,pmx55-gpio 51 + 52 + - enum: 53 + - qcom,spmi-gpio 54 + - qcom,ssbi-gpio 55 + 56 + reg: 57 + maxItems: 1 58 + 59 + interrupt-controller: true 60 + 61 + '#interrupt-cells': 62 + const: 2 63 + 64 + gpio-controller: true 65 + 66 + gpio-ranges: 67 + maxItems: 1 68 + 69 + '#gpio-cells': 70 + const: 2 71 + description: 72 + The first cell will be used to define gpio number and the 73 + second denotes the flags for this gpio 74 + 75 + additionalProperties: false 76 + 77 + required: 78 + - compatible 79 + - reg 80 + - gpio-controller 81 + - '#gpio-cells' 82 + - gpio-ranges 83 + - interrupt-controller 84 + 85 + patternProperties: 86 + '-state$': 87 + oneOf: 88 + - $ref: "#/$defs/qcom-pmic-gpio-state" 89 + - patternProperties: 90 + ".*": 91 + $ref: "#/$defs/qcom-pmic-gpio-state" 92 + 93 + $defs: 94 + qcom-pmic-gpio-state: 95 + type: object 96 + allOf: 97 + - $ref: "pinmux-node.yaml" 98 + - $ref: "pincfg-node.yaml" 99 + properties: 100 + pins: 101 + description: 102 + List of gpio pins affected by the properties specified in 103 + this subnode. Valid pins are 104 + - gpio1-gpio10 for pm6150 105 + - gpio1-gpio12 for pm6150l 106 + - gpio1-gpio10 for pm7325 107 + - gpio1-gpio4 for pm8005 108 + - gpio1-gpio2 for pm8008 109 + - gpio1-gpio6 for pm8018 110 + - gpio1-gpio12 for pm8038 111 + - gpio1-gpio40 for pm8058 112 + - gpio1-gpio10 for pm8150 (holes on gpio2, gpio5, 113 + gpio7 and gpio8) 114 + - gpio1-gpio12 for pm8150b (holes on gpio3, gpio4 115 + and gpio7) 116 + - gpio1-gpio12 for pm8150l (hole on gpio7) 117 + - gpio1-gpio4 for pm8916 118 + - gpio1-gpio10 for pm8350 119 + - gpio1-gpio8 for pm8350b 120 + - gpio1-gpio9 for pm8350c 121 + - gpio1-gpio38 for pm8917 122 + - gpio1-gpio44 for pm8921 123 + - gpio1-gpio36 for pm8941 124 + - gpio1-gpio8 for pm8950 (hole on gpio3) 125 + - gpio1-gpio22 for pm8994 126 + - gpio1-gpio26 for pm8998 127 + - gpio1-gpio22 for pma8084 128 + - gpio1-gpio2 for pmi8950 129 + - gpio1-gpio10 for pmi8994 130 + - gpio1-gpio4 for pmk8350 131 + - gpio1-gpio4 for pmr735a 132 + - gpio1-gpio4 for pmr735b 133 + - gpio1-gpio12 for pms405 (holes on gpio1, gpio9 134 + and gpio10) 135 + - gpio1-gpio11 for pmx55 (holes on gpio3, gpio7, gpio10 136 + and gpio11) 137 + 138 + items: 139 + pattern: "^gpio([0-9]+)$" 140 + 141 + function: 142 + items: 143 + - enum: 144 + - normal 145 + - paired 146 + - func1 147 + - func2 148 + - dtest1 149 + - dtest2 150 + - dtest3 151 + - dtest4 152 + - func3 # supported by LV/MV GPIO subtypes 153 + - func4 # supported by LV/MV GPIO subtypes 154 + 155 + bias-disable: true 156 + bias-pull-down: true 157 + bias-pull-up: true 158 + 159 + qcom,pull-up-strength: 160 + $ref: /schemas/types.yaml#/definitions/uint32 161 + description: 162 + Specifies the strength to use for pull up, if selected. 163 + Valid values are defined in 164 + <dt-bindings/pinctrl/qcom,pmic-gpio.h> 165 + If this property is omitted 30uA strength will be used 166 + if pull up is selected 167 + enum: [0, 1, 2, 3] 168 + 169 + bias-high-impedance: true 170 + input-enable: true 171 + output-high: true 172 + output-low: true 173 + power-source: true 174 + 175 + qcom,drive-strength: 176 + $ref: /schemas/types.yaml#/definitions/uint32 177 + description: 178 + Selects the drive strength for the specified pins 179 + Valid drive strength values are defined in 180 + <dt-bindings/pinctrl/qcom,pmic-gpio.h> 181 + enum: [0, 1, 2, 3] 182 + 183 + drive-push-pull: true 184 + drive-open-drain: true 185 + drive-open-source: true 186 + 187 + qcom,analog-pass: 188 + $ref: /schemas/types.yaml#/definitions/flag 189 + description: 190 + The specified pins are configured in 191 + analog-pass-through mode. 192 + 193 + qcom,atest: 194 + $ref: /schemas/types.yaml#/definitions/uint32 195 + description: 196 + Selects ATEST rail to route to GPIO when it's 197 + configured in analog-pass-through mode. 198 + enum: [1, 2, 3, 4] 199 + 200 + qcom,dtest-buffer: 201 + $ref: /schemas/types.yaml#/definitions/uint32 202 + description: 203 + Selects DTEST rail to route to GPIO when it's 204 + configured as digital input. 205 + enum: [1, 2, 3, 4] 206 + 207 + required: 208 + - pins 209 + - function 210 + 211 + additionalProperties: false 212 + 213 + examples: 214 + - | 215 + #include <dt-bindings/pinctrl/qcom,pmic-gpio.h> 216 + 217 + pm8921_gpio: gpio@150 { 218 + compatible = "qcom,pm8921-gpio", "qcom,ssbi-gpio"; 219 + reg = <0x150 0x160>; 220 + interrupt-controller; 221 + #interrupt-cells = <2>; 222 + gpio-controller; 223 + gpio-ranges = <&pm8921_gpio 0 0 44>; 224 + #gpio-cells = <2>; 225 + 226 + pm8921_gpio_keys: gpio-keys-state { 227 + volume-keys { 228 + pins = "gpio20", "gpio21"; 229 + function = "normal"; 230 + 231 + input-enable; 232 + bias-pull-up; 233 + drive-push-pull; 234 + qcom,drive-strength = <PMIC_GPIO_STRENGTH_NO>; 235 + power-source = <PM8921_GPIO_S4>; 236 + }; 237 + }; 238 + }; 239 + ...
+179
Documentation/devicetree/bindings/pinctrl/qcom,sm6115-pinctrl.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/pinctrl/qcom,sm6115-pinctrl.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Qualcomm Technologies, Inc. SM6115, SM4250 TLMM block 8 + 9 + maintainers: 10 + - Iskren Chernev <iskren.chernev@gmail.com> 11 + 12 + description: 13 + This binding describes the Top Level Mode Multiplexer block found in the 14 + SM4250/6115 platforms. 15 + 16 + properties: 17 + compatible: 18 + const: qcom,sm6115-tlmm 19 + 20 + reg: 21 + minItems: 3 22 + maxItems: 3 23 + 24 + reg-names: 25 + items: 26 + - const: west 27 + - const: south 28 + - const: east 29 + 30 + interrupts: 31 + description: Specifies the TLMM summary IRQ 32 + maxItems: 1 33 + 34 + interrupt-controller: true 35 + 36 + '#interrupt-cells': 37 + description: 38 + Specifies the PIN numbers and Flags, as defined in defined in 39 + include/dt-bindings/interrupt-controller/irq.h 40 + const: 2 41 + 42 + gpio-controller: true 43 + 44 + '#gpio-cells': 45 + description: Specifying the pin number and flags, as defined in 46 + include/dt-bindings/gpio/gpio.h 47 + const: 2 48 + 49 + gpio-ranges: 50 + maxItems: 1 51 + 52 + wakeup-parent: 53 + maxItems: 1 54 + 55 + #PIN CONFIGURATION NODES 56 + patternProperties: 57 + '-state$': 58 + oneOf: 59 + - $ref: "#/$defs/qcom-sm6115-tlmm-state" 60 + - patternProperties: 61 + ".*": 62 + $ref: "#/$defs/qcom-sm6115-tlmm-state" 63 + 64 + '$defs': 65 + qcom-sm6115-tlmm-state: 66 + type: object 67 + description: 68 + Pinctrl node's client devices use subnodes for desired pin configuration. 69 + Client device subnodes use below standard properties. 70 + $ref: "qcom,tlmm-common.yaml#/$defs/qcom-tlmm-state" 71 + 72 + properties: 73 + pins: 74 + description: 75 + List of gpio pins affected by the properties specified in this 76 + subnode. 77 + items: 78 + oneOf: 79 + - pattern: "^gpio([0-9]|[1-9][0-9]|10[0-9]|11[0-2])$" 80 + - enum: [ sdc1_rclk, sdc1_clk, sdc1_cmd, sdc1_data, 81 + sdc2_clk, sdc2_cmd, sdc2_data, ufs_reset ] 82 + minItems: 1 83 + maxItems: 36 84 + 85 + function: 86 + description: 87 + Specify the alternative function to be configured for the specified 88 + pins. 89 + 90 + enum: [ adsp_ext, agera_pll, atest, cam_mclk, cci_async, cci_i2c, 91 + cci_timer, cri_trng, dac_calib, dbg_out, ddr_bist, ddr_pxi0, 92 + ddr_pxi1, ddr_pxi2, ddr_pxi3, gcc_gp1, gcc_gp2, gcc_gp3, gpio, 93 + gp_pdm0, gp_pdm1, gp_pdm2, gsm0_tx, gsm1_tx, jitter_bist, 94 + mdp_vsync, mdp_vsync_out_0, mdp_vsync_out_1, mpm_pwr, mss_lte, 95 + m_voc, nav_gpio, pa_indicator, pbs, pbs_out, phase_flag, 96 + pll_bist, pll_bypassnl, pll_reset, prng_rosc, qdss_cti, 97 + qdss_gpio, qup0, qup1, qup2, qup3, qup4, qup5, sdc1_tb, 98 + sdc2_tb, sd_write, ssbi_wtr1, tgu, tsense_pwm, uim1_clk, 99 + uim1_data, uim1_present, uim1_reset, uim2_clk, uim2_data, 100 + uim2_present, uim2_reset, usb_phy, vfr_1, vsense_trigger, 101 + wlan1_adc0, elan1_adc1 ] 102 + 103 + drive-strength: 104 + enum: [2, 4, 6, 8, 10, 12, 14, 16] 105 + default: 2 106 + description: 107 + Selects the drive strength for the specified pins, in mA. 108 + 109 + bias-pull-down: true 110 + 111 + bias-pull-up: true 112 + 113 + bias-disable: true 114 + 115 + output-high: true 116 + 117 + output-low: true 118 + 119 + required: 120 + - pins 121 + 122 + additionalProperties: false 123 + 124 + required: 125 + - compatible 126 + - reg 127 + - reg-names 128 + - interrupts 129 + - interrupt-controller 130 + - '#interrupt-cells' 131 + - gpio-controller 132 + - '#gpio-cells' 133 + - gpio-ranges 134 + 135 + additionalProperties: false 136 + 137 + examples: 138 + - | 139 + #include <dt-bindings/interrupt-controller/arm-gic.h> 140 + tlmm: pinctrl@500000 { 141 + compatible = "qcom,sm6115-tlmm"; 142 + reg = <0x500000 0x400000>, 143 + <0x900000 0x400000>, 144 + <0xd00000 0x400000>; 145 + reg-names = "west", "south", "east"; 146 + interrupts = <GIC_SPI 227 IRQ_TYPE_LEVEL_HIGH>; 147 + gpio-controller; 148 + #gpio-cells = <2>; 149 + interrupt-controller; 150 + #interrupt-cells = <2>; 151 + gpio-ranges = <&tlmm 0 0 114>; 152 + 153 + sdc2_on_state: sdc2-on-state { 154 + clk { 155 + pins = "sdc2_clk"; 156 + bias-disable; 157 + drive-strength = <16>; 158 + }; 159 + 160 + cmd { 161 + pins = "sdc2_cmd"; 162 + bias-pull-up; 163 + drive-strength = <10>; 164 + }; 165 + 166 + data { 167 + pins = "sdc2_data"; 168 + bias-pull-up; 169 + drive-strength = <10>; 170 + }; 171 + 172 + sd-cd { 173 + pins = "gpio88"; 174 + function = "gpio"; 175 + bias-pull-up; 176 + drive-strength = <2>; 177 + }; 178 + }; 179 + };
+155
Documentation/devicetree/bindings/pinctrl/renesas,rzg2l-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,rzg2l-pinctrl.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Renesas RZ/G2L combined Pin and GPIO controller 8 + 9 + maintainers: 10 + - Geert Uytterhoeven <geert+renesas@glider.be> 11 + - Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> 12 + 13 + description: 14 + The Renesas SoCs of the RZ/G2L 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 + enum: 24 + - renesas,r9a07g044-pinctrl # RZ/G2{L,LC} 25 + 26 + reg: 27 + maxItems: 1 28 + 29 + gpio-controller: true 30 + 31 + '#gpio-cells': 32 + const: 2 33 + description: 34 + The first cell contains the global GPIO port index, constructed using the 35 + RZG2L_GPIO() helper macro in <dt-bindings/pinctrl/rzg2l-pinctrl.h> and the 36 + second cell represents consumer flag as mentioned in ../gpio/gpio.txt 37 + E.g. "RZG2L_GPIO(39, 1)" for P39_1. 38 + 39 + gpio-ranges: 40 + maxItems: 1 41 + 42 + clocks: 43 + maxItems: 1 44 + 45 + power-domains: 46 + maxItems: 1 47 + 48 + resets: 49 + items: 50 + - description: GPIO_RSTN signal 51 + - description: GPIO_PORT_RESETN signal 52 + - description: GPIO_SPARE_RESETN signal 53 + 54 + additionalProperties: 55 + anyOf: 56 + - type: object 57 + allOf: 58 + - $ref: pincfg-node.yaml# 59 + - $ref: pinmux-node.yaml# 60 + 61 + description: 62 + Pin controller client devices use pin configuration subnodes (children 63 + and grandchildren) for desired pin configuration. 64 + Client device subnodes use below standard properties. 65 + 66 + properties: 67 + phandle: true 68 + pinmux: 69 + description: 70 + Values are constructed from GPIO port number, pin number, and 71 + alternate function configuration number using the RZG2L_PORT_PINMUX() 72 + helper macro in <dt-bindings/pinctrl/rzg2l-pinctrl.h>. 73 + pins: true 74 + drive-strength: 75 + enum: [ 2, 4, 8, 12 ] 76 + power-source: 77 + enum: [ 1800, 2500, 3300 ] 78 + slew-rate: true 79 + gpio-hog: true 80 + gpios: true 81 + input-enable: true 82 + output-high: true 83 + output-low: true 84 + line-name: true 85 + 86 + - type: object 87 + properties: 88 + phandle: true 89 + 90 + additionalProperties: 91 + $ref: "#/additionalProperties/anyOf/0" 92 + 93 + required: 94 + - compatible 95 + - reg 96 + - gpio-controller 97 + - '#gpio-cells' 98 + - gpio-ranges 99 + - clocks 100 + - power-domains 101 + - resets 102 + 103 + examples: 104 + - | 105 + #include <dt-bindings/pinctrl/rzg2l-pinctrl.h> 106 + #include <dt-bindings/clock/r9a07g044-cpg.h> 107 + 108 + pinctrl: pinctrl@11030000 { 109 + compatible = "renesas,r9a07g044-pinctrl"; 110 + reg = <0x11030000 0x10000>; 111 + 112 + gpio-controller; 113 + #gpio-cells = <2>; 114 + gpio-ranges = <&pinctrl 0 0 392>; 115 + clocks = <&cpg CPG_MOD R9A07G044_GPIO_HCLK>; 116 + resets = <&cpg R9A07G044_GPIO_RSTN>, 117 + <&cpg R9A07G044_GPIO_PORT_RESETN>, 118 + <&cpg R9A07G044_GPIO_SPARE_RESETN>; 119 + power-domains = <&cpg>; 120 + 121 + scif0_pins: serial0 { 122 + pinmux = <RZG2L_PORT_PINMUX(38, 0, 1)>, /* Tx */ 123 + <RZG2L_PORT_PINMUX(38, 1, 1)>; /* Rx */ 124 + }; 125 + 126 + i2c1_pins: i2c1 { 127 + pins = "RIIC1_SDA", "RIIC1_SCL"; 128 + input-enable; 129 + }; 130 + 131 + sd1-pwr-en-hog { 132 + gpio-hog; 133 + gpios = <RZG2L_GPIO(39, 2) 0>; 134 + output-high; 135 + line-name = "sd1_pwr_en"; 136 + }; 137 + 138 + sdhi1_pins: sd1 { 139 + sd1_mux { 140 + pinmux = <RZG2L_PORT_PINMUX(19, 0, 1)>, /* CD */ 141 + <RZG2L_PORT_PINMUX(19, 1, 1)>; /* WP */ 142 + power-source = <3300>; 143 + }; 144 + 145 + sd1_data { 146 + pins = "SD1_DATA0", "SD1_DATA1", "SD1_DATA2", "SD1_DATA3"; 147 + power-source = <3300>; 148 + }; 149 + 150 + sd1_ctrl { 151 + pins = "SD1_CLK", "SD1_CMD"; 152 + power-source = <3300>; 153 + }; 154 + }; 155 + };
+1
Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt
··· 22 22 - "samsung,exynos5420-pinctrl": for Exynos5420 compatible pin-controller. 23 23 - "samsung,exynos5433-pinctrl": for Exynos5433 compatible pin-controller. 24 24 - "samsung,exynos7-pinctrl": for Exynos7 compatible pin-controller. 25 + - "samsung,exynos850-pinctrl": for Exynos850 compatible pin-controller. 25 26 26 27 - reg: Base address of the pin controller hardware module and length of 27 28 the address space it occupies.
+1
Documentation/devicetree/bindings/pinctrl/st,stm32-pinctrl.yaml
··· 24 24 - st,stm32f746-pinctrl 25 25 - st,stm32f769-pinctrl 26 26 - st,stm32h743-pinctrl 27 + - st,stm32mp135-pinctrl 27 28 - st,stm32mp157-pinctrl 28 29 - st,stm32mp157-z-pinctrl 29 30
-105
Documentation/devicetree/bindings/pinctrl/xlnx,zynq-pinctrl.txt
··· 1 - Binding for Xilinx Zynq Pinctrl 2 - 3 - Required properties: 4 - - compatible: "xlnx,zynq-pinctrl" 5 - - syscon: phandle to SLCR 6 - - reg: Offset and length of pinctrl space in SLCR 7 - 8 - Please refer to pinctrl-bindings.txt in this directory for details of the 9 - common pinctrl bindings used by client devices, including the meaning of the 10 - phrase "pin configuration node". 11 - 12 - Zynq's pin configuration nodes act as a container for an arbitrary number of 13 - subnodes. Each of these subnodes represents some desired configuration for a 14 - pin, a group, or a list of pins or groups. This configuration can include the 15 - mux function to select on those pin(s)/group(s), and various pin configuration 16 - parameters, such as pull-up, slew rate, etc. 17 - 18 - Each configuration node can consist of multiple nodes describing the pinmux and 19 - pinconf options. Those nodes can be pinmux nodes or pinconf nodes. 20 - 21 - The name of each subnode is not important; all subnodes should be enumerated 22 - and processed purely based on their content. 23 - 24 - Required properties for pinmux nodes are: 25 - - groups: A list of pinmux groups. 26 - - function: The name of a pinmux function to activate for the specified set 27 - of groups. 28 - 29 - Required properties for configuration nodes: 30 - One of: 31 - - pins: a list of pin names 32 - - groups: A list of pinmux groups. 33 - 34 - The following generic properties as defined in pinctrl-bindings.txt are valid 35 - to specify in a pinmux subnode: 36 - groups, function 37 - 38 - The following generic properties as defined in pinctrl-bindings.txt are valid 39 - to specify in a pinconf subnode: 40 - groups, pins, bias-disable, bias-high-impedance, bias-pull-up, slew-rate, 41 - low-power-disable, low-power-enable 42 - 43 - Valid arguments for 'slew-rate' are '0' and '1' to select between slow and fast 44 - respectively. 45 - 46 - Valid values for groups are: 47 - ethernet0_0_grp, ethernet1_0_grp, mdio0_0_grp, mdio1_0_grp, 48 - qspi0_0_grp, qspi1_0_grp, qspi_fbclk, qspi_cs1_grp, spi0_0_grp - spi0_2_grp, 49 - spi0_X_ssY (X=0..2, Y=0..2), spi1_0_grp - spi1_3_grp, 50 - spi1_X_ssY (X=0..3, Y=0..2), sdio0_0_grp - sdio0_2_grp, 51 - sdio1_0_grp - sdio1_3_grp, sdio0_emio_wp, sdio0_emio_cd, sdio1_emio_wp, 52 - sdio1_emio_cd, smc0_nor, smc0_nor_cs1_grp, smc0_nor_addr25_grp, smc0_nand, 53 - can0_0_grp - can0_10_grp, can1_0_grp - can1_11_grp, uart0_0_grp - uart0_10_grp, 54 - uart1_0_grp - uart1_11_grp, i2c0_0_grp - i2c0_10_grp, i2c1_0_grp - i2c1_10_grp, 55 - ttc0_0_grp - ttc0_2_grp, ttc1_0_grp - ttc1_2_grp, swdt0_0_grp - swdt0_4_grp, 56 - gpio0_0_grp - gpio0_53_grp, usb0_0_grp, usb1_0_grp 57 - 58 - Valid values for pins are: 59 - MIO0 - MIO53 60 - 61 - Valid values for function are: 62 - ethernet0, ethernet1, mdio0, mdio1, qspi0, qspi1, qspi_fbclk, qspi_cs1, 63 - spi0, spi0_ss, spi1, spi1_ss, sdio0, sdio0_pc, sdio0_cd, sdio0_wp, 64 - sdio1, sdio1_pc, sdio1_cd, sdio1_wp, 65 - smc0_nor, smc0_nor_cs1, smc0_nor_addr25, smc0_nand, can0, can1, uart0, uart1, 66 - i2c0, i2c1, ttc0, ttc1, swdt0, gpio0, usb0, usb1 67 - 68 - The following driver-specific properties as defined here are valid to specify in 69 - a pin configuration subnode: 70 - - io-standard: Configure the pin to use the selected IO standard according to 71 - this mapping: 72 - 1: LVCMOS18 73 - 2: LVCMOS25 74 - 3: LVCMOS33 75 - 4: HSTL 76 - 77 - Example: 78 - pinctrl0: pinctrl@700 { 79 - compatible = "xlnx,pinctrl-zynq"; 80 - reg = <0x700 0x200>; 81 - syscon = <&slcr>; 82 - 83 - pinctrl_uart1_default: uart1-default { 84 - mux { 85 - groups = "uart1_10_grp"; 86 - function = "uart1"; 87 - }; 88 - 89 - conf { 90 - groups = "uart1_10_grp"; 91 - slew-rate = <0>; 92 - io-standard = <1>; 93 - }; 94 - 95 - conf-rx { 96 - pins = "MIO49"; 97 - bias-high-impedance; 98 - }; 99 - 100 - conf-tx { 101 - pins = "MIO48"; 102 - bias-disable; 103 - }; 104 - }; 105 - };
+214
Documentation/devicetree/bindings/pinctrl/xlnx,zynq-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/xlnx,zynq-pinctrl.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Xilinx Zynq Pinctrl 8 + 9 + maintainers: 10 + - Sai Krishna Potthuri <lakshmi.sai.krishna.potthuri@xilinx.com> 11 + 12 + description: | 13 + Please refer to pinctrl-bindings.txt in this directory for details of the 14 + common pinctrl bindings used by client devices, including the meaning of the 15 + phrase "pin configuration node". 16 + 17 + Zynq's pin configuration nodes act as a container for an arbitrary number of 18 + subnodes. Each of these subnodes represents some desired configuration for a 19 + pin, a group, or a list of pins or groups. This configuration can include the 20 + mux function to select on those pin(s)/group(s), and various pin configuration 21 + parameters, such as pull-up, slew rate, etc. 22 + 23 + Each configuration node can consist of multiple nodes describing the pinmux and 24 + pinconf options. Those nodes can be pinmux nodes or pinconf nodes. 25 + 26 + The name of each subnode is not important; all subnodes should be enumerated 27 + and processed purely based on their content. 28 + 29 + properties: 30 + compatible: 31 + const: xlnx,zynq-pinctrl 32 + 33 + reg: 34 + description: Specifies the base address and size of the SLCR space. 35 + maxItems: 1 36 + 37 + syscon: 38 + description: 39 + phandle to the SLCR. 40 + 41 + patternProperties: 42 + '^(.*-)?(default|gpio)$': 43 + type: object 44 + patternProperties: 45 + '^mux': 46 + type: object 47 + description: 48 + Pinctrl node's client devices use subnodes for pin muxes, 49 + which in turn use below standard properties. 50 + $ref: pinmux-node.yaml# 51 + 52 + properties: 53 + groups: 54 + description: 55 + List of groups to select (either this or "pins" must be 56 + specified), available groups for this subnode. 57 + items: 58 + enum: [ethernet0_0_grp, ethernet1_0_grp, mdio0_0_grp, 59 + mdio1_0_grp, qspi0_0_grp, qspi1_0_grp, qspi_fbclk, 60 + qspi_cs1_grp, spi0_0_grp, spi0_1_grp, spi0_2_grp, 61 + spi0_0_ss0, spi0_0_ss1, spi0_0_ss2, spi0_1_ss0, 62 + spi0_1_ss1, spi0_1_ss2, spi0_2_ss0, spi0_2_ss1, 63 + spi0_2_ss2, spi1_0_grp, spi1_1_grp, spi1_2_grp, 64 + spi1_3_grp, spi1_0_ss0, spi1_0_ss1, spi1_0_ss2, 65 + spi1_1_ss0, spi1_1_ss1, spi1_1_ss2, spi1_2_ss0, 66 + spi1_2_ss1, spi1_2_ss2, spi1_3_ss0, spi1_3_ss1, 67 + spi1_3_ss2, sdio0_0_grp, sdio0_1_grp, sdio0_2_grp, 68 + sdio1_0_grp, sdio1_1_grp, sdio1_2_grp, sdio1_3_grp, 69 + sdio0_emio_wp, sdio0_emio_cd, sdio1_emio_wp, 70 + sdio1_emio_cd, smc0_nor, smc0_nor_cs1_grp, 71 + smc0_nor_addr25_grp, smc0_nand, can0_0_grp, can0_1_grp, 72 + can0_2_grp, can0_3_grp, can0_4_grp, can0_5_grp, 73 + can0_6_grp, can0_7_grp, can0_8_grp, can0_9_grp, 74 + can0_10_grp, can1_0_grp, can1_1_grp, can1_2_grp, 75 + can1_3_grp, can1_4_grp, can1_5_grp, can1_6_grp, 76 + can1_7_grp, can1_8_grp, can1_9_grp, can1_10_grp, 77 + can1_11_grp, uart0_0_grp, uart0_1_grp, uart0_2_grp, 78 + uart0_3_grp, uart0_4_grp, uart0_5_grp, uart0_6_grp, 79 + uart0_7_grp, uart0_8_grp, uart0_9_grp, uart0_10_grp, 80 + uart1_0_grp, uart1_1_grp, uart1_2_grp, uart1_3_grp, 81 + uart1_4_grp, uart1_5_grp, uart1_6_grp, uart1_7_grp, 82 + uart1_8_grp, uart1_9_grp, uart1_10_grp, uart1_11_grp, 83 + i2c0_0_grp, i2c0_1_grp, i2c0_2_grp, i2c0_3_grp, 84 + i2c0_4_grp, i2c0_5_grp, i2c0_6_grp, i2c0_7_grp, 85 + i2c0_8_grp, i2c0_9_grp, i2c0_10_grp, i2c1_0_grp, 86 + i2c1_1_grp, i2c1_2_grp, i2c1_3_grp, i2c1_4_grp, 87 + i2c1_5_grp, i2c1_6_grp, i2c1_7_grp, i2c1_8_grp, 88 + i2c1_9_grp, i2c1_10_grp, ttc0_0_grp, ttc0_1_grp, 89 + ttc0_2_grp, ttc1_0_grp, ttc1_1_grp, ttc1_2_grp, 90 + swdt0_0_grp, swdt0_1_grp, swdt0_2_grp, swdt0_3_grp, 91 + swdt0_4_grp, gpio0_0_grp, gpio0_1_grp, gpio0_2_grp, 92 + gpio0_3_grp, gpio0_4_grp, gpio0_5_grp, gpio0_6_grp, 93 + gpio0_7_grp, gpio0_8_grp, gpio0_9_grp, gpio0_10_grp, 94 + gpio0_11_grp, gpio0_12_grp, gpio0_13_grp, gpio0_14_grp, 95 + gpio0_15_grp, gpio0_16_grp, gpio0_17_grp, gpio0_18_grp, 96 + gpio0_19_grp, gpio0_20_grp, gpio0_21_grp, gpio0_22_grp, 97 + gpio0_23_grp, gpio0_24_grp, gpio0_25_grp, gpio0_26_grp, 98 + gpio0_27_grp, gpio0_28_grp, gpio0_29_grp, gpio0_30_grp, 99 + gpio0_31_grp, gpio0_32_grp, gpio0_33_grp, gpio0_34_grp, 100 + gpio0_35_grp, gpio0_36_grp, gpio0_37_grp, gpio0_38_grp, 101 + gpio0_39_grp, gpio0_40_grp, gpio0_41_grp, gpio0_42_grp, 102 + gpio0_43_grp, gpio0_44_grp, gpio0_45_grp, gpio0_46_grp, 103 + gpio0_47_grp, gpio0_48_grp, gpio0_49_grp, gpio0_50_grp, 104 + gpio0_51_grp, gpio0_52_grp, gpio0_53_grp, usb0_0_grp, 105 + usb1_0_grp] 106 + maxItems: 54 107 + 108 + function: 109 + description: 110 + Specify the alternative function to be configured for the 111 + given pin groups. 112 + enum: [ethernet0, ethernet1, mdio0, mdio1, qspi0, qspi1, qspi_fbclk, 113 + qspi_cs1, spi0, spi0_ss, spi1, spi1_ss, sdio0, sdio0_pc, 114 + sdio0_cd, sdio0_wp, sdio1, sdio1_pc, sdio1_cd, sdio1_wp, 115 + smc0_nor, smc0_nor_cs1, smc0_nor_addr25, smc0_nand, can0, 116 + can1, uart0, uart1, i2c0, i2c1, ttc0, ttc1, swdt0, gpio0, 117 + usb0, usb1] 118 + 119 + required: 120 + - groups 121 + - function 122 + 123 + additionalProperties: false 124 + 125 + '^conf': 126 + type: object 127 + description: 128 + Pinctrl node's client devices use subnodes for pin configurations, 129 + which in turn use the standard properties below. 130 + $ref: pincfg-node.yaml# 131 + 132 + properties: 133 + groups: 134 + description: 135 + List of pin groups as mentioned above. 136 + 137 + pins: 138 + description: 139 + List of pin names to select in this subnode. 140 + items: 141 + pattern: '^MIO([0-9]|[1-4][0-9]|5[0-3])$' 142 + maxItems: 54 143 + 144 + bias-pull-up: true 145 + 146 + bias-pull-down: true 147 + 148 + bias-disable: true 149 + 150 + bias-high-impedance: true 151 + 152 + low-power-enable: true 153 + 154 + low-power-disable: true 155 + 156 + slew-rate: 157 + enum: [0, 1] 158 + 159 + power-source: 160 + enum: [1, 2, 3, 4] 161 + 162 + oneOf: 163 + - required: [ groups ] 164 + - required: [ pins ] 165 + 166 + additionalProperties: false 167 + 168 + additionalProperties: false 169 + 170 + required: 171 + - compatible 172 + - reg 173 + - syscon 174 + 175 + additionalProperties: false 176 + 177 + examples: 178 + - | 179 + #include <dt-bindings/pinctrl/pinctrl-zynq.h> 180 + pinctrl0: pinctrl@700 { 181 + compatible = "xlnx,zynq-pinctrl"; 182 + reg = <0x700 0x200>; 183 + syscon = <&slcr>; 184 + 185 + pinctrl_uart1_default: uart1-default { 186 + mux { 187 + groups = "uart1_10_grp"; 188 + function = "uart1"; 189 + }; 190 + 191 + conf { 192 + groups = "uart1_10_grp"; 193 + slew-rate = <0>; 194 + power-source = <IO_STANDARD_LVCMOS18>; 195 + }; 196 + 197 + conf-rx { 198 + pins = "MIO49"; 199 + bias-high-impedance; 200 + }; 201 + 202 + conf-tx { 203 + pins = "MIO48"; 204 + bias-disable; 205 + }; 206 + }; 207 + }; 208 + 209 + uart1 { 210 + pinctrl-names = "default"; 211 + pinctrl-0 = <&pinctrl_uart1_default>; 212 + }; 213 + 214 + ...
+15 -2
MAINTAINERS
··· 14727 14727 F: drivers/pinctrl/ 14728 14728 F: include/linux/pinctrl/ 14729 14729 14730 + PIN CONTROLLER - AMD 14731 + M: Basavaraj Natikar <Basavaraj.Natikar@amd.com> 14732 + M: Shyam Sundar S K <Shyam-sundar.S-k@amd.com> 14733 + S: Maintained 14734 + F: drivers/pinctrl/pinctrl-amd.c 14735 + 14730 14736 PIN CONTROLLER - FREESCALE 14731 14737 M: Dong Aisheng <aisheng.dong@nxp.com> 14732 14738 M: Fabio Estevam <festevam@gmail.com> ··· 14751 14745 T: git git://git.kernel.org/pub/scm/linux/kernel/git/pinctrl/intel.git 14752 14746 F: drivers/pinctrl/intel/ 14753 14747 14748 + PIN CONTROLLER - KEEMBAY 14749 + M: Lakshmi Sowjanya D <lakshmi.sowjanya.d@intel.com> 14750 + S: Supported 14751 + F: drivers/pinctrl/pinctrl-keembay* 14752 + 14754 14753 PIN CONTROLLER - MEDIATEK 14755 14754 M: Sean Wang <sean.wang@kernel.org> 14756 14755 L: linux-mediatek@lists.infradead.org (moderated for non-subscribers) 14757 14756 S: Maintained 14758 - F: Documentation/devicetree/bindings/pinctrl/pinctrl-mt65xx.txt 14759 - F: Documentation/devicetree/bindings/pinctrl/pinctrl-mt7622.txt 14757 + F: Documentation/devicetree/bindings/pinctrl/mediatek,mt65xx-pinctrl.yaml 14758 + F: Documentation/devicetree/bindings/pinctrl/mediatek,mt6797-pinctrl.yaml 14759 + F: Documentation/devicetree/bindings/pinctrl/mediatek,mt7622-pinctrl.yaml 14760 + F: Documentation/devicetree/bindings/pinctrl/mediatek,mt8183-pinctrl.yaml 14760 14761 F: drivers/pinctrl/mediatek/ 14761 14762 14762 14763 PIN CONTROLLER - MICROCHIP AT91
arch/arm/boot/dts/mt8135-pinfunc.h include/dt-bindings/pinctrl/mt8135-pinfunc.h
+1 -1
arch/arm/boot/dts/mt8135.dtsi
··· 9 9 #include <dt-bindings/interrupt-controller/irq.h> 10 10 #include <dt-bindings/interrupt-controller/arm-gic.h> 11 11 #include <dt-bindings/reset/mt8135-resets.h> 12 - #include "mt8135-pinfunc.h" 12 + #include <dt-bindings/pinctrl/mt8135-pinfunc.h> 13 13 14 14 / { 15 15 #address-cells = <2>;
arch/arm64/boot/dts/mediatek/mt8183-pinfunc.h include/dt-bindings/pinctrl/mt8183-pinfunc.h
+1 -1
arch/arm64/boot/dts/mediatek/mt8183.dtsi
··· 14 14 #include <dt-bindings/reset-controller/mt8183-resets.h> 15 15 #include <dt-bindings/phy/phy.h> 16 16 #include <dt-bindings/thermal/thermal.h> 17 - #include "mt8183-pinfunc.h" 17 + #include <dt-bindings/pinctrl/mt8183-pinfunc.h> 18 18 19 19 / { 20 20 compatible = "mediatek,mt8183";
+23 -1
drivers/pinctrl/Kconfig
··· 248 248 - 16 bits: sx1509q, sx1506q 249 249 250 250 config PINCTRL_PISTACHIO 251 - def_bool y if MACH_PISTACHIO 251 + bool "IMG Pistachio SoC pinctrl driver" 252 + depends on OF && (MIPS || COMPILE_TEST) 252 253 depends on GPIOLIB 253 254 select PINMUX 254 255 select GENERIC_PINCONF 255 256 select GPIOLIB_IRQCHIP 256 257 select OF_GPIO 258 + help 259 + This support pinctrl and gpio driver for IMG Pistachio SoC. 257 260 258 261 config PINCTRL_ST 259 262 bool ··· 406 403 help 407 404 Add support for the Canaan Kendryte K210 RISC-V SOC Field 408 405 Programmable IO Array (FPIOA) controller. 406 + 407 + config PINCTRL_KEEMBAY 408 + tristate "Pinctrl driver for Intel Keem Bay SoC" 409 + depends on ARCH_KEEMBAY || (ARM64 && COMPILE_TEST) 410 + depends on HAS_IOMEM 411 + select PINMUX 412 + select PINCONF 413 + select GENERIC_PINCONF 414 + select GENERIC_PINCTRL_GROUPS 415 + select GENERIC_PINMUX_FUNCTIONS 416 + select GPIOLIB 417 + select GPIOLIB_IRQCHIP 418 + select GPIO_GENERIC 419 + help 420 + This selects pin control driver for the Intel Keembay SoC. 421 + It provides pin config functions such as pullup, pulldown, 422 + interrupt, drive strength, sec lock, schmitt trigger, slew 423 + rate control and direction control. This module will be 424 + called as pinctrl-keembay. 409 425 410 426 source "drivers/pinctrl/actions/Kconfig" 411 427 source "drivers/pinctrl/aspeed/Kconfig"
+1
drivers/pinctrl/Makefile
··· 47 47 obj-$(CONFIG_PINCTRL_MICROCHIP_SGPIO) += pinctrl-microchip-sgpio.o 48 48 obj-$(CONFIG_PINCTRL_EQUILIBRIUM) += pinctrl-equilibrium.o 49 49 obj-$(CONFIG_PINCTRL_K210) += pinctrl-k210.o 50 + obj-$(CONFIG_PINCTRL_KEEMBAY) += pinctrl-keembay.o 50 51 51 52 obj-y += actions/ 52 53 obj-$(CONFIG_ARCH_ASPEED) += aspeed/
+2 -2
drivers/pinctrl/aspeed/pinctrl-aspeed.c
··· 133 133 } 134 134 135 135 /** 136 - * Search for the signal expression needed to enable the pin's signal for the 137 - * requested function. 136 + * aspeed_find_expr_by_name - Search for the signal expression needed to 137 + * enable the pin's signal for the requested function. 138 138 * 139 139 * @exprs: List of signal expressions (haystack) 140 140 * @name: The name of the requested function (needle)
+2 -1
drivers/pinctrl/aspeed/pinmux-aspeed.c
··· 59 59 } 60 60 61 61 /** 62 - * Query the enabled or disabled state for a mux function's signal on a pin 62 + * aspeed_sig_expr_eval - Query the enabled or disabled state for a 63 + * mux function's signal on a pin 63 64 * 64 65 * @ctx: The driver context for the pinctrl IP 65 66 * @expr: An expression controlling the signal for a mux function on a pin
+1 -2
drivers/pinctrl/bcm/pinctrl-bcm2835.c
··· 416 416 } 417 417 } 418 418 /* This should not happen, every IRQ has a bank */ 419 - if (i == BCM2835_NUM_IRQS) 420 - BUG(); 419 + BUG_ON(i == BCM2835_NUM_IRQS); 421 420 422 421 chained_irq_enter(host_chip, desc); 423 422
+7
drivers/pinctrl/freescale/Kconfig
··· 166 166 help 167 167 Say Y here to enable the imx8dxl pinctrl driver 168 168 169 + config PINCTRL_IMX8ULP 170 + tristate "IMX8ULP pinctrl driver" 171 + depends on ARCH_MXC 172 + select PINCTRL_IMX 173 + help 174 + Say Y here to enable the imx8ulp pinctrl driver 175 + 169 176 config PINCTRL_VF610 170 177 bool "Freescale Vybrid VF610 pinctrl driver" 171 178 depends on SOC_VF610
+1
drivers/pinctrl/freescale/Makefile
··· 24 24 obj-$(CONFIG_PINCTRL_IMX8QM) += pinctrl-imx8qm.o 25 25 obj-$(CONFIG_PINCTRL_IMX8QXP) += pinctrl-imx8qxp.o 26 26 obj-$(CONFIG_PINCTRL_IMX8DXL) += pinctrl-imx8dxl.o 27 + obj-$(CONFIG_PINCTRL_IMX8ULP) += pinctrl-imx8ulp.o 27 28 obj-$(CONFIG_PINCTRL_VF610) += pinctrl-vf610.o 28 29 obj-$(CONFIG_PINCTRL_MXS) += pinctrl-mxs.o 29 30 obj-$(CONFIG_PINCTRL_IMX23) += pinctrl-imx23.o
+1 -1
drivers/pinctrl/freescale/pinctrl-imx8dxl.c
··· 155 155 }; 156 156 157 157 158 - static struct imx_pinctrl_soc_info imx8dxl_pinctrl_info = { 158 + static const struct imx_pinctrl_soc_info imx8dxl_pinctrl_info = { 159 159 .pins = imx8dxl_pinctrl_pads, 160 160 .npins = ARRAY_SIZE(imx8dxl_pinctrl_pads), 161 161 .flags = IMX_USE_SCU,
+1 -1
drivers/pinctrl/freescale/pinctrl-imx8mn.c
··· 317 317 IMX_PINCTRL_PIN(MX8MN_IOMUXC_UART4_TXD), 318 318 }; 319 319 320 - static struct imx_pinctrl_soc_info imx8mn_pinctrl_info = { 320 + static const struct imx_pinctrl_soc_info imx8mn_pinctrl_info = { 321 321 .pins = imx8mn_pinctrl_pads, 322 322 .npins = ARRAY_SIZE(imx8mn_pinctrl_pads), 323 323 .gpr_compatible = "fsl,imx8mn-iomuxc-gpr",
+1 -1
drivers/pinctrl/freescale/pinctrl-imx8qxp.c
··· 194 194 IMX_PINCTRL_PIN(IMX8QXP_COMP_CTL_GPIO_1V8_3V3_QSPI0B), 195 195 }; 196 196 197 - static struct imx_pinctrl_soc_info imx8qxp_pinctrl_info = { 197 + static const struct imx_pinctrl_soc_info imx8qxp_pinctrl_info = { 198 198 .pins = imx8qxp_pinctrl_pads, 199 199 .npins = ARRAY_SIZE(imx8qxp_pinctrl_pads), 200 200 .flags = IMX_USE_SCU,
+278
drivers/pinctrl/freescale/pinctrl-imx8ulp.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 2 + /* 3 + * Copyright 2021 NXP 4 + */ 5 + 6 + #include <linux/err.h> 7 + #include <linux/init.h> 8 + #include <linux/io.h> 9 + #include <linux/module.h> 10 + #include <linux/of.h> 11 + #include <linux/of_device.h> 12 + #include <linux/pinctrl/pinctrl.h> 13 + 14 + #include "pinctrl-imx.h" 15 + 16 + enum imx8ulp_pads { 17 + IMX8ULP_PAD_PTD0 = 0, 18 + IMX8ULP_PAD_PTD1, 19 + IMX8ULP_PAD_PTD2, 20 + IMX8ULP_PAD_PTD3, 21 + IMX8ULP_PAD_PTD4, 22 + IMX8ULP_PAD_PTD5, 23 + IMX8ULP_PAD_PTD6, 24 + IMX8ULP_PAD_PTD7, 25 + IMX8ULP_PAD_PTD8, 26 + IMX8ULP_PAD_PTD9, 27 + IMX8ULP_PAD_PTD10, 28 + IMX8ULP_PAD_PTD11, 29 + IMX8ULP_PAD_PTD12, 30 + IMX8ULP_PAD_PTD13, 31 + IMX8ULP_PAD_PTD14, 32 + IMX8ULP_PAD_PTD15, 33 + IMX8ULP_PAD_PTD16, 34 + IMX8ULP_PAD_PTD17, 35 + IMX8ULP_PAD_PTD18, 36 + IMX8ULP_PAD_PTD19, 37 + IMX8ULP_PAD_PTD20, 38 + IMX8ULP_PAD_PTD21, 39 + IMX8ULP_PAD_PTD22, 40 + IMX8ULP_PAD_PTD23, 41 + IMX8ULP_PAD_RESERVE0, 42 + IMX8ULP_PAD_RESERVE1, 43 + IMX8ULP_PAD_RESERVE2, 44 + IMX8ULP_PAD_RESERVE3, 45 + IMX8ULP_PAD_RESERVE4, 46 + IMX8ULP_PAD_RESERVE5, 47 + IMX8ULP_PAD_RESERVE6, 48 + IMX8ULP_PAD_RESERVE7, 49 + IMX8ULP_PAD_PTE0, 50 + IMX8ULP_PAD_PTE1, 51 + IMX8ULP_PAD_PTE2, 52 + IMX8ULP_PAD_PTE3, 53 + IMX8ULP_PAD_PTE4, 54 + IMX8ULP_PAD_PTE5, 55 + IMX8ULP_PAD_PTE6, 56 + IMX8ULP_PAD_PTE7, 57 + IMX8ULP_PAD_PTE8, 58 + IMX8ULP_PAD_PTE9, 59 + IMX8ULP_PAD_PTE10, 60 + IMX8ULP_PAD_PTE11, 61 + IMX8ULP_PAD_PTE12, 62 + IMX8ULP_PAD_PTE13, 63 + IMX8ULP_PAD_PTE14, 64 + IMX8ULP_PAD_PTE15, 65 + IMX8ULP_PAD_PTE16, 66 + IMX8ULP_PAD_PTE17, 67 + IMX8ULP_PAD_PTE18, 68 + IMX8ULP_PAD_PTE19, 69 + IMX8ULP_PAD_PTE20, 70 + IMX8ULP_PAD_PTE21, 71 + IMX8ULP_PAD_PTE22, 72 + IMX8ULP_PAD_PTE23, 73 + IMX8ULP_PAD_RESERVE8, 74 + IMX8ULP_PAD_RESERVE9, 75 + IMX8ULP_PAD_RESERVE10, 76 + IMX8ULP_PAD_RESERVE11, 77 + IMX8ULP_PAD_RESERVE12, 78 + IMX8ULP_PAD_RESERVE13, 79 + IMX8ULP_PAD_RESERVE14, 80 + IMX8ULP_PAD_RESERVE15, 81 + IMX8ULP_PAD_PTF0, 82 + IMX8ULP_PAD_PTF1, 83 + IMX8ULP_PAD_PTF2, 84 + IMX8ULP_PAD_PTF3, 85 + IMX8ULP_PAD_PTF4, 86 + IMX8ULP_PAD_PTF5, 87 + IMX8ULP_PAD_PTF6, 88 + IMX8ULP_PAD_PTF7, 89 + IMX8ULP_PAD_PTF8, 90 + IMX8ULP_PAD_PTF9, 91 + IMX8ULP_PAD_PTF10, 92 + IMX8ULP_PAD_PTF11, 93 + IMX8ULP_PAD_PTF12, 94 + IMX8ULP_PAD_PTF13, 95 + IMX8ULP_PAD_PTF14, 96 + IMX8ULP_PAD_PTF15, 97 + IMX8ULP_PAD_PTF16, 98 + IMX8ULP_PAD_PTF17, 99 + IMX8ULP_PAD_PTF18, 100 + IMX8ULP_PAD_PTF19, 101 + IMX8ULP_PAD_PTF20, 102 + IMX8ULP_PAD_PTF21, 103 + IMX8ULP_PAD_PTF22, 104 + IMX8ULP_PAD_PTF23, 105 + IMX8ULP_PAD_PTF24, 106 + IMX8ULP_PAD_PTF25, 107 + IMX8ULP_PAD_PTF26, 108 + IMX8ULP_PAD_PTF27, 109 + IMX8ULP_PAD_PTF28, 110 + IMX8ULP_PAD_PTF29, 111 + IMX8ULP_PAD_PTF30, 112 + IMX8ULP_PAD_PTF31, 113 + }; 114 + 115 + /* Pad names for the pinmux subsystem */ 116 + static const struct pinctrl_pin_desc imx8ulp_pinctrl_pads[] = { 117 + IMX_PINCTRL_PIN(IMX8ULP_PAD_PTD0), 118 + IMX_PINCTRL_PIN(IMX8ULP_PAD_PTD1), 119 + IMX_PINCTRL_PIN(IMX8ULP_PAD_PTD2), 120 + IMX_PINCTRL_PIN(IMX8ULP_PAD_PTD3), 121 + IMX_PINCTRL_PIN(IMX8ULP_PAD_PTD4), 122 + IMX_PINCTRL_PIN(IMX8ULP_PAD_PTD5), 123 + IMX_PINCTRL_PIN(IMX8ULP_PAD_PTD6), 124 + IMX_PINCTRL_PIN(IMX8ULP_PAD_PTD7), 125 + IMX_PINCTRL_PIN(IMX8ULP_PAD_PTD8), 126 + IMX_PINCTRL_PIN(IMX8ULP_PAD_PTD9), 127 + IMX_PINCTRL_PIN(IMX8ULP_PAD_PTD10), 128 + IMX_PINCTRL_PIN(IMX8ULP_PAD_PTD11), 129 + IMX_PINCTRL_PIN(IMX8ULP_PAD_PTD12), 130 + IMX_PINCTRL_PIN(IMX8ULP_PAD_PTD13), 131 + IMX_PINCTRL_PIN(IMX8ULP_PAD_PTD14), 132 + IMX_PINCTRL_PIN(IMX8ULP_PAD_PTD15), 133 + IMX_PINCTRL_PIN(IMX8ULP_PAD_PTD16), 134 + IMX_PINCTRL_PIN(IMX8ULP_PAD_PTD17), 135 + IMX_PINCTRL_PIN(IMX8ULP_PAD_PTD18), 136 + IMX_PINCTRL_PIN(IMX8ULP_PAD_PTD19), 137 + IMX_PINCTRL_PIN(IMX8ULP_PAD_PTD20), 138 + IMX_PINCTRL_PIN(IMX8ULP_PAD_PTD21), 139 + IMX_PINCTRL_PIN(IMX8ULP_PAD_PTD22), 140 + IMX_PINCTRL_PIN(IMX8ULP_PAD_PTD23), 141 + IMX_PINCTRL_PIN(IMX8ULP_PAD_RESERVE0), 142 + IMX_PINCTRL_PIN(IMX8ULP_PAD_RESERVE1), 143 + IMX_PINCTRL_PIN(IMX8ULP_PAD_RESERVE2), 144 + IMX_PINCTRL_PIN(IMX8ULP_PAD_RESERVE3), 145 + IMX_PINCTRL_PIN(IMX8ULP_PAD_RESERVE4), 146 + IMX_PINCTRL_PIN(IMX8ULP_PAD_RESERVE5), 147 + IMX_PINCTRL_PIN(IMX8ULP_PAD_RESERVE6), 148 + IMX_PINCTRL_PIN(IMX8ULP_PAD_RESERVE7), 149 + IMX_PINCTRL_PIN(IMX8ULP_PAD_PTE0), 150 + IMX_PINCTRL_PIN(IMX8ULP_PAD_PTE1), 151 + IMX_PINCTRL_PIN(IMX8ULP_PAD_PTE2), 152 + IMX_PINCTRL_PIN(IMX8ULP_PAD_PTE3), 153 + IMX_PINCTRL_PIN(IMX8ULP_PAD_PTE4), 154 + IMX_PINCTRL_PIN(IMX8ULP_PAD_PTE5), 155 + IMX_PINCTRL_PIN(IMX8ULP_PAD_PTE6), 156 + IMX_PINCTRL_PIN(IMX8ULP_PAD_PTE7), 157 + IMX_PINCTRL_PIN(IMX8ULP_PAD_PTE8), 158 + IMX_PINCTRL_PIN(IMX8ULP_PAD_PTE9), 159 + IMX_PINCTRL_PIN(IMX8ULP_PAD_PTE10), 160 + IMX_PINCTRL_PIN(IMX8ULP_PAD_PTE11), 161 + IMX_PINCTRL_PIN(IMX8ULP_PAD_PTE12), 162 + IMX_PINCTRL_PIN(IMX8ULP_PAD_PTE13), 163 + IMX_PINCTRL_PIN(IMX8ULP_PAD_PTE14), 164 + IMX_PINCTRL_PIN(IMX8ULP_PAD_PTE15), 165 + IMX_PINCTRL_PIN(IMX8ULP_PAD_PTE16), 166 + IMX_PINCTRL_PIN(IMX8ULP_PAD_PTE17), 167 + IMX_PINCTRL_PIN(IMX8ULP_PAD_PTE18), 168 + IMX_PINCTRL_PIN(IMX8ULP_PAD_PTE19), 169 + IMX_PINCTRL_PIN(IMX8ULP_PAD_PTE20), 170 + IMX_PINCTRL_PIN(IMX8ULP_PAD_PTE21), 171 + IMX_PINCTRL_PIN(IMX8ULP_PAD_PTE22), 172 + IMX_PINCTRL_PIN(IMX8ULP_PAD_PTE23), 173 + IMX_PINCTRL_PIN(IMX8ULP_PAD_RESERVE8), 174 + IMX_PINCTRL_PIN(IMX8ULP_PAD_RESERVE9), 175 + IMX_PINCTRL_PIN(IMX8ULP_PAD_RESERVE10), 176 + IMX_PINCTRL_PIN(IMX8ULP_PAD_RESERVE11), 177 + IMX_PINCTRL_PIN(IMX8ULP_PAD_RESERVE12), 178 + IMX_PINCTRL_PIN(IMX8ULP_PAD_RESERVE13), 179 + IMX_PINCTRL_PIN(IMX8ULP_PAD_RESERVE14), 180 + IMX_PINCTRL_PIN(IMX8ULP_PAD_RESERVE15), 181 + IMX_PINCTRL_PIN(IMX8ULP_PAD_PTF0), 182 + IMX_PINCTRL_PIN(IMX8ULP_PAD_PTF1), 183 + IMX_PINCTRL_PIN(IMX8ULP_PAD_PTF2), 184 + IMX_PINCTRL_PIN(IMX8ULP_PAD_PTF3), 185 + IMX_PINCTRL_PIN(IMX8ULP_PAD_PTF4), 186 + IMX_PINCTRL_PIN(IMX8ULP_PAD_PTF5), 187 + IMX_PINCTRL_PIN(IMX8ULP_PAD_PTF6), 188 + IMX_PINCTRL_PIN(IMX8ULP_PAD_PTF7), 189 + IMX_PINCTRL_PIN(IMX8ULP_PAD_PTF8), 190 + IMX_PINCTRL_PIN(IMX8ULP_PAD_PTF9), 191 + IMX_PINCTRL_PIN(IMX8ULP_PAD_PTF10), 192 + IMX_PINCTRL_PIN(IMX8ULP_PAD_PTF11), 193 + IMX_PINCTRL_PIN(IMX8ULP_PAD_PTF12), 194 + IMX_PINCTRL_PIN(IMX8ULP_PAD_PTF13), 195 + IMX_PINCTRL_PIN(IMX8ULP_PAD_PTF14), 196 + IMX_PINCTRL_PIN(IMX8ULP_PAD_PTF15), 197 + IMX_PINCTRL_PIN(IMX8ULP_PAD_PTF16), 198 + IMX_PINCTRL_PIN(IMX8ULP_PAD_PTF17), 199 + IMX_PINCTRL_PIN(IMX8ULP_PAD_PTF18), 200 + IMX_PINCTRL_PIN(IMX8ULP_PAD_PTF19), 201 + IMX_PINCTRL_PIN(IMX8ULP_PAD_PTF20), 202 + IMX_PINCTRL_PIN(IMX8ULP_PAD_PTF21), 203 + IMX_PINCTRL_PIN(IMX8ULP_PAD_PTF22), 204 + IMX_PINCTRL_PIN(IMX8ULP_PAD_PTF23), 205 + IMX_PINCTRL_PIN(IMX8ULP_PAD_PTF24), 206 + IMX_PINCTRL_PIN(IMX8ULP_PAD_PTF25), 207 + IMX_PINCTRL_PIN(IMX8ULP_PAD_PTF26), 208 + IMX_PINCTRL_PIN(IMX8ULP_PAD_PTF27), 209 + IMX_PINCTRL_PIN(IMX8ULP_PAD_PTF28), 210 + IMX_PINCTRL_PIN(IMX8ULP_PAD_PTF29), 211 + IMX_PINCTRL_PIN(IMX8ULP_PAD_PTF30), 212 + IMX_PINCTRL_PIN(IMX8ULP_PAD_PTF31), 213 + }; 214 + 215 + #define BM_OBE_ENABLED BIT(17) 216 + #define BM_IBE_ENABLED BIT(16) 217 + #define BM_MUX_MODE 0xf00 218 + #define BP_MUX_MODE 8 219 + 220 + static int imx8ulp_pmx_gpio_set_direction(struct pinctrl_dev *pctldev, 221 + struct pinctrl_gpio_range *range, 222 + unsigned offset, bool input) 223 + { 224 + struct imx_pinctrl *ipctl = pinctrl_dev_get_drvdata(pctldev); 225 + const struct imx_pin_reg *pin_reg; 226 + u32 reg; 227 + 228 + pin_reg = &ipctl->pin_regs[offset]; 229 + if (pin_reg->mux_reg == -1) 230 + return -EINVAL; 231 + 232 + reg = readl(ipctl->base + pin_reg->mux_reg); 233 + if (input) 234 + reg = (reg & ~BM_OBE_ENABLED) | BM_IBE_ENABLED; 235 + else 236 + reg = (reg & ~BM_IBE_ENABLED) | BM_OBE_ENABLED; 237 + writel(reg, ipctl->base + pin_reg->mux_reg); 238 + 239 + return 0; 240 + } 241 + 242 + static const struct imx_pinctrl_soc_info imx8ulp_pinctrl_info = { 243 + .pins = imx8ulp_pinctrl_pads, 244 + .npins = ARRAY_SIZE(imx8ulp_pinctrl_pads), 245 + .flags = ZERO_OFFSET_VALID | SHARE_MUX_CONF_REG, 246 + .gpio_set_direction = imx8ulp_pmx_gpio_set_direction, 247 + .mux_mask = BM_MUX_MODE, 248 + .mux_shift = BP_MUX_MODE, 249 + }; 250 + 251 + static const struct of_device_id imx8ulp_pinctrl_of_match[] = { 252 + { .compatible = "fsl,imx8ulp-iomuxc1", }, 253 + { /* sentinel */ } 254 + }; 255 + 256 + static int imx8ulp_pinctrl_probe(struct platform_device *pdev) 257 + { 258 + return imx_pinctrl_probe(pdev, &imx8ulp_pinctrl_info); 259 + } 260 + 261 + static struct platform_driver imx8ulp_pinctrl_driver = { 262 + .driver = { 263 + .name = "imx8ulp-pinctrl", 264 + .of_match_table = imx8ulp_pinctrl_of_match, 265 + .suppress_bind_attrs = true, 266 + }, 267 + .probe = imx8ulp_pinctrl_probe, 268 + }; 269 + 270 + static int __init imx8ulp_pinctrl_init(void) 271 + { 272 + return platform_driver_register(&imx8ulp_pinctrl_driver); 273 + } 274 + arch_initcall(imx8ulp_pinctrl_init); 275 + 276 + MODULE_AUTHOR("Jacky Bai <ping.bai@nxp.com>"); 277 + MODULE_DESCRIPTION("NXP i.MX8ULP pinctrl driver"); 278 + MODULE_LICENSE("GPL v2");
-1
drivers/pinctrl/mediatek/pinctrl-mt8365.c
··· 485 485 .probe = mtk_pinctrl_probe, 486 486 .driver = { 487 487 .name = "mediatek-mt8365-pinctrl", 488 - .owner = THIS_MODULE, 489 488 .of_match_table = mt8365_pctrl_match, 490 489 .pm = &mtk_eint_pm_ops, 491 490 },
+8 -8
drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
··· 167 167 PIN_GRP_GPIO("jtag", 20, 5, BIT(0), "jtag"), 168 168 PIN_GRP_GPIO("sdio0", 8, 3, BIT(1), "sdio"), 169 169 PIN_GRP_GPIO("emmc_nb", 27, 9, BIT(2), "emmc"), 170 - PIN_GRP_GPIO("pwm0", 11, 1, BIT(3), "pwm"), 171 - PIN_GRP_GPIO("pwm1", 12, 1, BIT(4), "pwm"), 172 - PIN_GRP_GPIO("pwm2", 13, 1, BIT(5), "pwm"), 173 - PIN_GRP_GPIO("pwm3", 14, 1, BIT(6), "pwm"), 170 + PIN_GRP_GPIO_3("pwm0", 11, 1, BIT(3) | BIT(20), 0, BIT(20), BIT(3), 171 + "pwm", "led"), 172 + PIN_GRP_GPIO_3("pwm1", 12, 1, BIT(4) | BIT(21), 0, BIT(21), BIT(4), 173 + "pwm", "led"), 174 + PIN_GRP_GPIO_3("pwm2", 13, 1, BIT(5) | BIT(22), 0, BIT(22), BIT(5), 175 + "pwm", "led"), 176 + PIN_GRP_GPIO_3("pwm3", 14, 1, BIT(6) | BIT(23), 0, BIT(23), BIT(6), 177 + "pwm", "led"), 174 178 PIN_GRP_GPIO("pmic1", 7, 1, BIT(7), "pmic"), 175 179 PIN_GRP_GPIO("pmic0", 6, 1, BIT(8), "pmic"), 176 180 PIN_GRP_GPIO("i2c2", 2, 2, BIT(9), "i2c"), ··· 188 184 PIN_GRP_EXTRA("uart2", 9, 2, BIT(1) | BIT(13) | BIT(14) | BIT(19), 189 185 BIT(1) | BIT(13) | BIT(14), BIT(1) | BIT(19), 190 186 18, 2, "gpio", "uart"), 191 - PIN_GRP_GPIO_2("led0_od", 11, 1, BIT(20), BIT(20), 0, "led"), 192 - PIN_GRP_GPIO_2("led1_od", 12, 1, BIT(21), BIT(21), 0, "led"), 193 - PIN_GRP_GPIO_2("led2_od", 13, 1, BIT(22), BIT(22), 0, "led"), 194 - PIN_GRP_GPIO_2("led3_od", 14, 1, BIT(23), BIT(23), 0, "led"), 195 187 }; 196 188 197 189 static struct armada_37xx_pin_group armada_37xx_sb_groups[] = {
+471 -74
drivers/pinctrl/pinctrl-ingenic.c
··· 104 104 ID_X1500, 105 105 ID_X1830, 106 106 ID_X2000, 107 + ID_X2100, 107 108 }; 108 109 109 110 struct ingenic_chip_info { ··· 590 589 static int jz4755_uart0_hwflow_pins[] = { 0x7e, 0x7f, }; 591 590 static int jz4755_uart1_data_pins[] = { 0x97, 0x99, }; 592 591 static int jz4755_uart2_data_pins[] = { 0x9f, }; 592 + static int jz4755_ssi_dt_b_pins[] = { 0x3b, }; 593 + static int jz4755_ssi_dt_f_pins[] = { 0xa1, }; 594 + static int jz4755_ssi_dr_b_pins[] = { 0x3c, }; 595 + static int jz4755_ssi_dr_f_pins[] = { 0xa2, }; 596 + static int jz4755_ssi_clk_b_pins[] = { 0x3a, }; 597 + static int jz4755_ssi_clk_f_pins[] = { 0xa0, }; 598 + static int jz4755_ssi_gpc_b_pins[] = { 0x3e, }; 599 + static int jz4755_ssi_gpc_f_pins[] = { 0xa4, }; 600 + static int jz4755_ssi_ce0_b_pins[] = { 0x3d, }; 601 + static int jz4755_ssi_ce0_f_pins[] = { 0xa3, }; 602 + static int jz4755_ssi_ce1_b_pins[] = { 0x3f, }; 603 + static int jz4755_ssi_ce1_f_pins[] = { 0xa5, }; 593 604 static int jz4755_mmc0_1bit_pins[] = { 0x2f, 0x50, 0x5c, }; 594 605 static int jz4755_mmc0_4bit_pins[] = { 0x5d, 0x5b, 0x51, }; 595 606 static int jz4755_mmc1_1bit_pins[] = { 0x3a, 0x3d, 0x3c, }; ··· 643 630 INGENIC_PIN_GROUP("uart0-hwflow", jz4755_uart0_hwflow, 0), 644 631 INGENIC_PIN_GROUP("uart1-data", jz4755_uart1_data, 0), 645 632 INGENIC_PIN_GROUP("uart2-data", jz4755_uart2_data, 1), 633 + INGENIC_PIN_GROUP("ssi-dt-b", jz4755_ssi_dt_b, 0), 634 + INGENIC_PIN_GROUP("ssi-dt-f", jz4755_ssi_dt_f, 0), 635 + INGENIC_PIN_GROUP("ssi-dr-b", jz4755_ssi_dr_b, 0), 636 + INGENIC_PIN_GROUP("ssi-dr-f", jz4755_ssi_dr_f, 0), 637 + INGENIC_PIN_GROUP("ssi-clk-b", jz4755_ssi_clk_b, 0), 638 + INGENIC_PIN_GROUP("ssi-clk-f", jz4755_ssi_clk_f, 0), 639 + INGENIC_PIN_GROUP("ssi-gpc-b", jz4755_ssi_gpc_b, 0), 640 + INGENIC_PIN_GROUP("ssi-gpc-f", jz4755_ssi_gpc_f, 0), 641 + INGENIC_PIN_GROUP("ssi-ce0-b", jz4755_ssi_ce0_b, 0), 642 + INGENIC_PIN_GROUP("ssi-ce0-f", jz4755_ssi_ce0_f, 0), 643 + INGENIC_PIN_GROUP("ssi-ce1-b", jz4755_ssi_ce1_b, 0), 644 + INGENIC_PIN_GROUP("ssi-ce1-f", jz4755_ssi_ce1_f, 0), 646 645 INGENIC_PIN_GROUP_FUNCS("mmc0-1bit", jz4755_mmc0_1bit, 647 646 jz4755_mmc0_1bit_funcs), 648 647 INGENIC_PIN_GROUP_FUNCS("mmc0-4bit", jz4755_mmc0_4bit, ··· 686 661 static const char *jz4755_uart0_groups[] = { "uart0-data", "uart0-hwflow", }; 687 662 static const char *jz4755_uart1_groups[] = { "uart1-data", }; 688 663 static const char *jz4755_uart2_groups[] = { "uart2-data", }; 664 + static const char *jz4755_ssi_groups[] = { 665 + "ssi-dt-b", "ssi-dt-f", 666 + "ssi-dr-b", "ssi-dr-f", 667 + "ssi-clk-b", "ssi-clk-f", 668 + "ssi-gpc-b", "ssi-gpc-f", 669 + "ssi-ce0-b", "ssi-ce0-f", 670 + "ssi-ce1-b", "ssi-ce1-f", 671 + }; 689 672 static const char *jz4755_mmc0_groups[] = { "mmc0-1bit", "mmc0-4bit", }; 690 673 static const char *jz4755_mmc1_groups[] = { "mmc0-1bit", "mmc0-4bit", }; 691 674 static const char *jz4755_i2c_groups[] = { "i2c-data", }; ··· 716 683 { "uart0", jz4755_uart0_groups, ARRAY_SIZE(jz4755_uart0_groups), }, 717 684 { "uart1", jz4755_uart1_groups, ARRAY_SIZE(jz4755_uart1_groups), }, 718 685 { "uart2", jz4755_uart2_groups, ARRAY_SIZE(jz4755_uart2_groups), }, 686 + { "ssi", jz4755_ssi_groups, ARRAY_SIZE(jz4755_ssi_groups), }, 719 687 { "mmc0", jz4755_mmc0_groups, ARRAY_SIZE(jz4755_mmc0_groups), }, 720 688 { "mmc1", jz4755_mmc1_groups, ARRAY_SIZE(jz4755_mmc1_groups), }, 721 689 { "i2c", jz4755_i2c_groups, ARRAY_SIZE(jz4755_i2c_groups), }, ··· 744 710 }; 745 711 746 712 static const u32 jz4760_pull_ups[6] = { 747 - 0xffffffff, 0xfffcf3ff, 0xffffffff, 0xffffcfff, 0xfffffb7c, 0xfffff00f, 713 + 0xffffffff, 0xfffcf3ff, 0xffffffff, 0xffffcfff, 0xfffffb7c, 0x0000000f, 748 714 }; 749 715 750 716 static const u32 jz4760_pull_downs[6] = { ··· 759 725 static int jz4760_uart2_hwflow_pins[] = { 0x5d, 0x5f, }; 760 726 static int jz4760_uart3_data_pins[] = { 0x6c, 0x85, }; 761 727 static int jz4760_uart3_hwflow_pins[] = { 0x88, 0x89, }; 728 + static int jz4760_ssi0_dt_a_pins[] = { 0x15, }; 729 + static int jz4760_ssi0_dt_b_pins[] = { 0x35, }; 730 + static int jz4760_ssi0_dt_d_pins[] = { 0x75, }; 731 + static int jz4760_ssi0_dt_e_pins[] = { 0x91, }; 732 + static int jz4760_ssi0_dr_a_pins[] = { 0x14, }; 733 + static int jz4760_ssi0_dr_b_pins[] = { 0x34, }; 734 + static int jz4760_ssi0_dr_d_pins[] = { 0x74, }; 735 + static int jz4760_ssi0_dr_e_pins[] = { 0x8e, }; 736 + static int jz4760_ssi0_clk_a_pins[] = { 0x12, }; 737 + static int jz4760_ssi0_clk_b_pins[] = { 0x3c, }; 738 + static int jz4760_ssi0_clk_d_pins[] = { 0x78, }; 739 + static int jz4760_ssi0_clk_e_pins[] = { 0x8f, }; 740 + static int jz4760_ssi0_gpc_b_pins[] = { 0x3e, }; 741 + static int jz4760_ssi0_gpc_d_pins[] = { 0x76, }; 742 + static int jz4760_ssi0_gpc_e_pins[] = { 0x93, }; 743 + static int jz4760_ssi0_ce0_a_pins[] = { 0x13, }; 744 + static int jz4760_ssi0_ce0_b_pins[] = { 0x3d, }; 745 + static int jz4760_ssi0_ce0_d_pins[] = { 0x79, }; 746 + static int jz4760_ssi0_ce0_e_pins[] = { 0x90, }; 747 + static int jz4760_ssi0_ce1_b_pins[] = { 0x3f, }; 748 + static int jz4760_ssi0_ce1_d_pins[] = { 0x77, }; 749 + static int jz4760_ssi0_ce1_e_pins[] = { 0x92, }; 750 + static int jz4760_ssi1_dt_b_9_pins[] = { 0x29, }; 751 + static int jz4760_ssi1_dt_b_21_pins[] = { 0x35, }; 752 + static int jz4760_ssi1_dt_d_12_pins[] = { 0x6c, }; 753 + static int jz4760_ssi1_dt_d_21_pins[] = { 0x75, }; 754 + static int jz4760_ssi1_dt_e_pins[] = { 0x91, }; 755 + static int jz4760_ssi1_dt_f_pins[] = { 0xa3, }; 756 + static int jz4760_ssi1_dr_b_6_pins[] = { 0x26, }; 757 + static int jz4760_ssi1_dr_b_20_pins[] = { 0x34, }; 758 + static int jz4760_ssi1_dr_d_13_pins[] = { 0x6d, }; 759 + static int jz4760_ssi1_dr_d_20_pins[] = { 0x74, }; 760 + static int jz4760_ssi1_dr_e_pins[] = { 0x8e, }; 761 + static int jz4760_ssi1_dr_f_pins[] = { 0xa0, }; 762 + static int jz4760_ssi1_clk_b_7_pins[] = { 0x27, }; 763 + static int jz4760_ssi1_clk_b_28_pins[] = { 0x3c, }; 764 + static int jz4760_ssi1_clk_d_pins[] = { 0x78, }; 765 + static int jz4760_ssi1_clk_e_7_pins[] = { 0x87, }; 766 + static int jz4760_ssi1_clk_e_15_pins[] = { 0x8f, }; 767 + static int jz4760_ssi1_clk_f_pins[] = { 0xa2, }; 768 + static int jz4760_ssi1_gpc_b_pins[] = { 0x3e, }; 769 + static int jz4760_ssi1_gpc_d_pins[] = { 0x76, }; 770 + static int jz4760_ssi1_gpc_e_pins[] = { 0x93, }; 771 + static int jz4760_ssi1_ce0_b_8_pins[] = { 0x28, }; 772 + static int jz4760_ssi1_ce0_b_29_pins[] = { 0x3d, }; 773 + static int jz4760_ssi1_ce0_d_pins[] = { 0x79, }; 774 + static int jz4760_ssi1_ce0_e_6_pins[] = { 0x86, }; 775 + static int jz4760_ssi1_ce0_e_16_pins[] = { 0x90, }; 776 + static int jz4760_ssi1_ce0_f_pins[] = { 0xa1, }; 777 + static int jz4760_ssi1_ce1_b_pins[] = { 0x3f, }; 778 + static int jz4760_ssi1_ce1_d_pins[] = { 0x77, }; 779 + static int jz4760_ssi1_ce1_e_pins[] = { 0x92, }; 762 780 static int jz4760_mmc0_1bit_a_pins[] = { 0x12, 0x13, 0x14, }; 763 781 static int jz4760_mmc0_4bit_a_pins[] = { 0x15, 0x16, 0x17, }; 764 782 static int jz4760_mmc0_1bit_e_pins[] = { 0x9c, 0x9d, 0x94, }; ··· 887 801 INGENIC_PIN_GROUP_FUNCS("uart3-data", jz4760_uart3_data, 888 802 jz4760_uart3_data_funcs), 889 803 INGENIC_PIN_GROUP("uart3-hwflow", jz4760_uart3_hwflow, 0), 804 + INGENIC_PIN_GROUP("ssi0-dt-a", jz4760_ssi0_dt_a, 2), 805 + INGENIC_PIN_GROUP("ssi0-dt-b", jz4760_ssi0_dt_b, 1), 806 + INGENIC_PIN_GROUP("ssi0-dt-d", jz4760_ssi0_dt_d, 1), 807 + INGENIC_PIN_GROUP("ssi0-dt-e", jz4760_ssi0_dt_e, 0), 808 + INGENIC_PIN_GROUP("ssi0-dr-a", jz4760_ssi0_dr_a, 1), 809 + INGENIC_PIN_GROUP("ssi0-dr-b", jz4760_ssi0_dr_b, 1), 810 + INGENIC_PIN_GROUP("ssi0-dr-d", jz4760_ssi0_dr_d, 1), 811 + INGENIC_PIN_GROUP("ssi0-dr-e", jz4760_ssi0_dr_e, 0), 812 + INGENIC_PIN_GROUP("ssi0-clk-a", jz4760_ssi0_clk_a, 2), 813 + INGENIC_PIN_GROUP("ssi0-clk-b", jz4760_ssi0_clk_b, 1), 814 + INGENIC_PIN_GROUP("ssi0-clk-d", jz4760_ssi0_clk_d, 1), 815 + INGENIC_PIN_GROUP("ssi0-clk-e", jz4760_ssi0_clk_e, 0), 816 + INGENIC_PIN_GROUP("ssi0-gpc-b", jz4760_ssi0_gpc_b, 1), 817 + INGENIC_PIN_GROUP("ssi0-gpc-d", jz4760_ssi0_gpc_d, 1), 818 + INGENIC_PIN_GROUP("ssi0-gpc-e", jz4760_ssi0_gpc_e, 0), 819 + INGENIC_PIN_GROUP("ssi0-ce0-a", jz4760_ssi0_ce0_a, 2), 820 + INGENIC_PIN_GROUP("ssi0-ce0-b", jz4760_ssi0_ce0_b, 1), 821 + INGENIC_PIN_GROUP("ssi0-ce0-d", jz4760_ssi0_ce0_d, 1), 822 + INGENIC_PIN_GROUP("ssi0-ce0-e", jz4760_ssi0_ce0_e, 0), 823 + INGENIC_PIN_GROUP("ssi0-ce1-b", jz4760_ssi0_ce1_b, 1), 824 + INGENIC_PIN_GROUP("ssi0-ce1-d", jz4760_ssi0_ce1_d, 1), 825 + INGENIC_PIN_GROUP("ssi0-ce1-e", jz4760_ssi0_ce1_e, 0), 826 + INGENIC_PIN_GROUP("ssi1-dt-b-9", jz4760_ssi1_dt_b_9, 2), 827 + INGENIC_PIN_GROUP("ssi1-dt-b-21", jz4760_ssi1_dt_b_21, 2), 828 + INGENIC_PIN_GROUP("ssi1-dt-d-12", jz4760_ssi1_dt_d_12, 2), 829 + INGENIC_PIN_GROUP("ssi1-dt-d-21", jz4760_ssi1_dt_d_21, 2), 830 + INGENIC_PIN_GROUP("ssi1-dt-e", jz4760_ssi1_dt_e, 1), 831 + INGENIC_PIN_GROUP("ssi1-dt-f", jz4760_ssi1_dt_f, 2), 832 + INGENIC_PIN_GROUP("ssi1-dr-b-6", jz4760_ssi1_dr_b_6, 2), 833 + INGENIC_PIN_GROUP("ssi1-dr-b-20", jz4760_ssi1_dr_b_20, 2), 834 + INGENIC_PIN_GROUP("ssi1-dr-d-13", jz4760_ssi1_dr_d_13, 2), 835 + INGENIC_PIN_GROUP("ssi1-dr-d-20", jz4760_ssi1_dr_d_20, 2), 836 + INGENIC_PIN_GROUP("ssi1-dr-e", jz4760_ssi1_dr_e, 1), 837 + INGENIC_PIN_GROUP("ssi1-dr-f", jz4760_ssi1_dr_f, 2), 838 + INGENIC_PIN_GROUP("ssi1-clk-b-7", jz4760_ssi1_clk_b_7, 2), 839 + INGENIC_PIN_GROUP("ssi1-clk-b-28", jz4760_ssi1_clk_b_28, 2), 840 + INGENIC_PIN_GROUP("ssi1-clk-d", jz4760_ssi1_clk_d, 2), 841 + INGENIC_PIN_GROUP("ssi1-clk-e-7", jz4760_ssi1_clk_e_7, 2), 842 + INGENIC_PIN_GROUP("ssi1-clk-e-15", jz4760_ssi1_clk_e_15, 1), 843 + INGENIC_PIN_GROUP("ssi1-clk-f", jz4760_ssi1_clk_f, 2), 844 + INGENIC_PIN_GROUP("ssi1-gpc-b", jz4760_ssi1_gpc_b, 2), 845 + INGENIC_PIN_GROUP("ssi1-gpc-d", jz4760_ssi1_gpc_d, 2), 846 + INGENIC_PIN_GROUP("ssi1-gpc-e", jz4760_ssi1_gpc_e, 1), 847 + INGENIC_PIN_GROUP("ssi1-ce0-b-8", jz4760_ssi1_ce0_b_8, 2), 848 + INGENIC_PIN_GROUP("ssi1-ce0-b-29", jz4760_ssi1_ce0_b_29, 2), 849 + INGENIC_PIN_GROUP("ssi1-ce0-d", jz4760_ssi1_ce0_d, 2), 850 + INGENIC_PIN_GROUP("ssi1-ce0-e-6", jz4760_ssi1_ce0_e_6, 2), 851 + INGENIC_PIN_GROUP("ssi1-ce0-e-16", jz4760_ssi1_ce0_e_16, 1), 852 + INGENIC_PIN_GROUP("ssi1-ce0-f", jz4760_ssi1_ce0_f, 2), 853 + INGENIC_PIN_GROUP("ssi1-ce1-b", jz4760_ssi1_ce1_b, 2), 854 + INGENIC_PIN_GROUP("ssi1-ce1-d", jz4760_ssi1_ce1_d, 2), 855 + INGENIC_PIN_GROUP("ssi1-ce1-e", jz4760_ssi1_ce1_e, 1), 890 856 INGENIC_PIN_GROUP_FUNCS("mmc0-1bit-a", jz4760_mmc0_1bit_a, 891 857 jz4760_mmc0_1bit_a_funcs), 892 858 INGENIC_PIN_GROUP("mmc0-4bit-a", jz4760_mmc0_4bit_a, 1), ··· 992 854 static const char *jz4760_uart1_groups[] = { "uart1-data", "uart1-hwflow", }; 993 855 static const char *jz4760_uart2_groups[] = { "uart2-data", "uart2-hwflow", }; 994 856 static const char *jz4760_uart3_groups[] = { "uart3-data", "uart3-hwflow", }; 857 + static const char *jz4760_ssi0_groups[] = { 858 + "ssi0-dt-a", "ssi0-dt-b", "ssi0-dt-d", "ssi0-dt-e", 859 + "ssi0-dr-a", "ssi0-dr-b", "ssi0-dr-d", "ssi0-dr-e", 860 + "ssi0-clk-a", "ssi0-clk-b", "ssi0-clk-d", "ssi0-clk-e", 861 + "ssi0-gpc-b", "ssi0-gpc-d", "ssi0-gpc-e", 862 + "ssi0-ce0-a", "ssi0-ce0-b", "ssi0-ce0-d", "ssi0-ce0-e", 863 + "ssi0-ce1-b", "ssi0-ce1-d", "ssi0-ce1-e", 864 + }; 865 + static const char *jz4760_ssi1_groups[] = { 866 + "ssi1-dt-b-9", "ssi1-dt-b-21", "ssi1-dt-d-12", "ssi1-dt-d-21", "ssi1-dt-e", "ssi1-dt-f", 867 + "ssi1-dr-b-6", "ssi1-dr-b-20", "ssi1-dr-d-13", "ssi1-dr-d-20", "ssi1-dr-e", "ssi1-dr-f", 868 + "ssi1-clk-b-7", "ssi1-clk-b-28", "ssi1-clk-d", "ssi1-clk-e-7", "ssi1-clk-e-15", "ssi1-clk-f", 869 + "ssi1-gpc-b", "ssi1-gpc-d", "ssi1-gpc-e", 870 + "ssi1-ce0-b-8", "ssi1-ce0-b-29", "ssi1-ce0-d", "ssi1-ce0-e-6", "ssi1-ce0-e-16", "ssi1-ce0-f", 871 + "ssi1-ce1-b", "ssi1-ce1-d", "ssi1-ce1-e", 872 + }; 995 873 static const char *jz4760_mmc0_groups[] = { 996 874 "mmc0-1bit-a", "mmc0-4bit-a", 997 875 "mmc0-1bit-e", "mmc0-4bit-e", "mmc0-8bit-e", ··· 1052 898 { "uart1", jz4760_uart1_groups, ARRAY_SIZE(jz4760_uart1_groups), }, 1053 899 { "uart2", jz4760_uart2_groups, ARRAY_SIZE(jz4760_uart2_groups), }, 1054 900 { "uart3", jz4760_uart3_groups, ARRAY_SIZE(jz4760_uart3_groups), }, 901 + { "ssi0", jz4760_ssi0_groups, ARRAY_SIZE(jz4760_ssi0_groups), }, 902 + { "ssi1", jz4760_ssi1_groups, ARRAY_SIZE(jz4760_ssi1_groups), }, 1055 903 { "mmc0", jz4760_mmc0_groups, ARRAY_SIZE(jz4760_mmc0_groups), }, 1056 904 { "mmc1", jz4760_mmc1_groups, ARRAY_SIZE(jz4760_mmc1_groups), }, 1057 905 { "mmc2", jz4760_mmc2_groups, ARRAY_SIZE(jz4760_mmc2_groups), }, ··· 1092 936 }; 1093 937 1094 938 static const u32 jz4770_pull_ups[6] = { 1095 - 0x3fffffff, 0xfff0030c, 0xffffffff, 0xffff4fff, 0xfffffb7c, 0xffa7f00f, 939 + 0x3fffffff, 0xfff0f3fc, 0xffffffff, 0xffff4fff, 0xfffffb7c, 0x0024f00f, 1096 940 }; 1097 941 1098 942 static const u32 jz4770_pull_downs[6] = { 1099 - 0x00000000, 0x000f0c03, 0x00000000, 0x0000b000, 0x00000483, 0x00580ff0, 943 + 0x00000000, 0x000f0c03, 0x00000000, 0x0000b000, 0x00000483, 0x005b0ff0, 1100 944 }; 1101 945 1102 946 static int jz4770_uart0_data_pins[] = { 0xa0, 0xa3, }; ··· 1983 1827 static int x1000_uart1_hwflow_pins[] = { 0x64, 0x65, }; 1984 1828 static int x1000_uart2_data_a_pins[] = { 0x02, 0x03, }; 1985 1829 static int x1000_uart2_data_d_pins[] = { 0x65, 0x64, }; 1986 - static int x1000_sfc_pins[] = { 0x1d, 0x1c, 0x1e, 0x1f, 0x1a, 0x1b, }; 1830 + static int x1000_sfc_data_pins[] = { 0x1d, 0x1c, 0x1e, 0x1f, }; 1831 + static int x1000_sfc_clk_pins[] = { 0x1a, }; 1832 + static int x1000_sfc_ce_pins[] = { 0x1b, }; 1987 1833 static int x1000_ssi_dt_a_22_pins[] = { 0x16, }; 1988 1834 static int x1000_ssi_dt_a_29_pins[] = { 0x1d, }; 1989 1835 static int x1000_ssi_dt_d_pins[] = { 0x62, }; ··· 2029 1871 static int x1000_i2s_data_rx_pins[] = { 0x23, }; 2030 1872 static int x1000_i2s_clk_txrx_pins[] = { 0x21, 0x22, }; 2031 1873 static int x1000_i2s_sysclk_pins[] = { 0x20, }; 2032 - static int x1000_dmic0_pins[] = { 0x35, 0x36, }; 2033 - static int x1000_dmic1_pins[] = { 0x25, }; 1874 + static int x1000_dmic_if0_pins[] = { 0x35, 0x36, }; 1875 + static int x1000_dmic_if1_pins[] = { 0x25, }; 2034 1876 static int x1000_cim_pins[] = { 2035 1877 0x08, 0x09, 0x0a, 0x0b, 2036 1878 0x13, 0x12, 0x11, 0x10, 0x0f, 0x0e, 0x0d, 0x0c, ··· 2059 1901 INGENIC_PIN_GROUP("uart1-hwflow", x1000_uart1_hwflow, 1), 2060 1902 INGENIC_PIN_GROUP("uart2-data-a", x1000_uart2_data_a, 2), 2061 1903 INGENIC_PIN_GROUP("uart2-data-d", x1000_uart2_data_d, 0), 2062 - INGENIC_PIN_GROUP("sfc", x1000_sfc, 1), 1904 + INGENIC_PIN_GROUP("sfc-data", x1000_sfc_data, 1), 1905 + INGENIC_PIN_GROUP("sfc-clk", x1000_sfc_clk, 1), 1906 + INGENIC_PIN_GROUP("sfc-ce", x1000_sfc_ce, 1), 2063 1907 INGENIC_PIN_GROUP("ssi-dt-a-22", x1000_ssi_dt_a_22, 2), 2064 1908 INGENIC_PIN_GROUP("ssi-dt-a-29", x1000_ssi_dt_a_29, 2), 2065 1909 INGENIC_PIN_GROUP("ssi-dt-d", x1000_ssi_dt_d, 0), ··· 2098 1938 INGENIC_PIN_GROUP("i2s-data-rx", x1000_i2s_data_rx, 1), 2099 1939 INGENIC_PIN_GROUP("i2s-clk-txrx", x1000_i2s_clk_txrx, 1), 2100 1940 INGENIC_PIN_GROUP("i2s-sysclk", x1000_i2s_sysclk, 1), 2101 - INGENIC_PIN_GROUP("dmic0", x1000_dmic0, 0), 2102 - INGENIC_PIN_GROUP("dmic1", x1000_dmic1, 1), 1941 + INGENIC_PIN_GROUP("dmic-if0", x1000_dmic_if0, 0), 1942 + INGENIC_PIN_GROUP("dmic-if1", x1000_dmic_if1, 1), 2103 1943 INGENIC_PIN_GROUP("cim-data", x1000_cim, 2), 2104 1944 INGENIC_PIN_GROUP("lcd-8bit", x1000_lcd_8bit, 1), 2105 1945 INGENIC_PIN_GROUP("lcd-16bit", x1000_lcd_16bit, 1), ··· 2116 1956 "uart1-data-a", "uart1-data-d", "uart1-hwflow", 2117 1957 }; 2118 1958 static const char *x1000_uart2_groups[] = { "uart2-data-a", "uart2-data-d", }; 2119 - static const char *x1000_sfc_groups[] = { "sfc", }; 1959 + static const char *x1000_sfc_groups[] = { "sfc-data", "sfc-clk", "sfc-ce", }; 2120 1960 static const char *x1000_ssi_groups[] = { 2121 1961 "ssi-dt-a-22", "ssi-dt-a-29", "ssi-dt-d", 2122 1962 "ssi-dr-a-23", "ssi-dr-a-28", "ssi-dr-d", ··· 2143 1983 static const char *x1000_i2s_groups[] = { 2144 1984 "i2s-data-tx", "i2s-data-rx", "i2s-clk-txrx", "i2s-sysclk", 2145 1985 }; 2146 - static const char *x1000_dmic_groups[] = { "dmic0", "dmic1", }; 1986 + static const char *x1000_dmic_groups[] = { "dmic-if0", "dmic-if1", }; 2147 1987 static const char *x1000_cim_groups[] = { "cim-data", }; 2148 1988 static const char *x1000_lcd_groups[] = { "lcd-8bit", "lcd-16bit", }; 2149 1989 static const char *x1000_pwm0_groups[] = { "pwm0", }; ··· 2208 2048 static int x1500_i2s_data_rx_pins[] = { 0x23, }; 2209 2049 static int x1500_i2s_clk_txrx_pins[] = { 0x21, 0x22, }; 2210 2050 static int x1500_i2s_sysclk_pins[] = { 0x20, }; 2211 - static int x1500_dmic0_pins[] = { 0x35, 0x36, }; 2212 - static int x1500_dmic1_pins[] = { 0x25, }; 2051 + static int x1500_dmic_if0_pins[] = { 0x35, 0x36, }; 2052 + static int x1500_dmic_if1_pins[] = { 0x25, }; 2213 2053 static int x1500_cim_pins[] = { 2214 2054 0x08, 0x09, 0x0a, 0x0b, 2215 2055 0x13, 0x12, 0x11, 0x10, 0x0f, 0x0e, 0x0d, 0x0c, ··· 2228 2068 INGENIC_PIN_GROUP("uart1-hwflow", x1500_uart1_hwflow, 1), 2229 2069 INGENIC_PIN_GROUP("uart2-data-a", x1500_uart2_data_a, 2), 2230 2070 INGENIC_PIN_GROUP("uart2-data-d", x1500_uart2_data_d, 0), 2231 - INGENIC_PIN_GROUP("sfc", x1000_sfc, 1), 2071 + INGENIC_PIN_GROUP("sfc-data", x1000_sfc_data, 1), 2072 + INGENIC_PIN_GROUP("sfc-clk", x1000_sfc_clk, 1), 2073 + INGENIC_PIN_GROUP("sfc-ce", x1000_sfc_ce, 1), 2232 2074 INGENIC_PIN_GROUP("mmc-1bit", x1500_mmc_1bit, 1), 2233 2075 INGENIC_PIN_GROUP("mmc-4bit", x1500_mmc_4bit, 1), 2234 2076 INGENIC_PIN_GROUP("i2c0-data", x1500_i2c0, 0), ··· 2241 2079 INGENIC_PIN_GROUP("i2s-data-rx", x1500_i2s_data_rx, 1), 2242 2080 INGENIC_PIN_GROUP("i2s-clk-txrx", x1500_i2s_clk_txrx, 1), 2243 2081 INGENIC_PIN_GROUP("i2s-sysclk", x1500_i2s_sysclk, 1), 2244 - INGENIC_PIN_GROUP("dmic0", x1500_dmic0, 0), 2245 - INGENIC_PIN_GROUP("dmic1", x1500_dmic1, 1), 2082 + INGENIC_PIN_GROUP("dmic-if0", x1500_dmic_if0, 0), 2083 + INGENIC_PIN_GROUP("dmic-if1", x1500_dmic_if1, 1), 2246 2084 INGENIC_PIN_GROUP("cim-data", x1500_cim, 2), 2247 2085 INGENIC_PIN_GROUP("pwm0", x1500_pwm_pwm0, 0), 2248 2086 INGENIC_PIN_GROUP("pwm1", x1500_pwm_pwm1, 1), ··· 2263 2101 static const char *x1500_i2s_groups[] = { 2264 2102 "i2s-data-tx", "i2s-data-rx", "i2s-clk-txrx", "i2s-sysclk", 2265 2103 }; 2266 - static const char *x1500_dmic_groups[] = { "dmic0", "dmic1", }; 2104 + static const char *x1500_dmic_groups[] = { "dmic-if0", "dmic-if1", }; 2267 2105 static const char *x1500_cim_groups[] = { "cim-data", }; 2268 2106 static const char *x1500_pwm0_groups[] = { "pwm0", }; 2269 2107 static const char *x1500_pwm1_groups[] = { "pwm1", }; ··· 2313 2151 static int x1830_uart0_data_pins[] = { 0x33, 0x36, }; 2314 2152 static int x1830_uart0_hwflow_pins[] = { 0x34, 0x35, }; 2315 2153 static int x1830_uart1_data_pins[] = { 0x38, 0x37, }; 2316 - static int x1830_sfc_pins[] = { 0x17, 0x18, 0x1a, 0x19, 0x1b, 0x1c, }; 2154 + static int x1830_sfc_data_pins[] = { 0x17, 0x18, 0x1a, 0x19, }; 2155 + static int x1830_sfc_clk_pins[] = { 0x1b, }; 2156 + static int x1830_sfc_ce_pins[] = { 0x1c, }; 2317 2157 static int x1830_ssi0_dt_pins[] = { 0x4c, }; 2318 2158 static int x1830_ssi0_dr_pins[] = { 0x4b, }; 2319 2159 static int x1830_ssi0_clk_pins[] = { 0x4f, }; ··· 2346 2182 static int x1830_i2s_clk_txrx_pins[] = { 0x58, 0x52, }; 2347 2183 static int x1830_i2s_clk_rx_pins[] = { 0x56, 0x55, }; 2348 2184 static int x1830_i2s_sysclk_pins[] = { 0x57, }; 2349 - static int x1830_dmic0_pins[] = { 0x48, 0x59, }; 2350 - static int x1830_dmic1_pins[] = { 0x5a, }; 2185 + static int x1830_dmic_if0_pins[] = { 0x48, 0x59, }; 2186 + static int x1830_dmic_if1_pins[] = { 0x5a, }; 2351 2187 static int x1830_lcd_tft_8bit_pins[] = { 2352 2188 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 2353 2189 0x68, 0x73, 0x72, 0x69, ··· 2387 2223 INGENIC_PIN_GROUP("uart0-data", x1830_uart0_data, 0), 2388 2224 INGENIC_PIN_GROUP("uart0-hwflow", x1830_uart0_hwflow, 0), 2389 2225 INGENIC_PIN_GROUP("uart1-data", x1830_uart1_data, 0), 2390 - INGENIC_PIN_GROUP("sfc", x1830_sfc, 1), 2226 + INGENIC_PIN_GROUP("sfc-data", x1830_sfc_data, 1), 2227 + INGENIC_PIN_GROUP("sfc-clk", x1830_sfc_clk, 1), 2228 + INGENIC_PIN_GROUP("sfc-ce", x1830_sfc_ce, 1), 2391 2229 INGENIC_PIN_GROUP("ssi0-dt", x1830_ssi0_dt, 0), 2392 2230 INGENIC_PIN_GROUP("ssi0-dr", x1830_ssi0_dr, 0), 2393 2231 INGENIC_PIN_GROUP("ssi0-clk", x1830_ssi0_clk, 0), ··· 2420 2254 INGENIC_PIN_GROUP("i2s-clk-txrx", x1830_i2s_clk_txrx, 0), 2421 2255 INGENIC_PIN_GROUP("i2s-clk-rx", x1830_i2s_clk_rx, 0), 2422 2256 INGENIC_PIN_GROUP("i2s-sysclk", x1830_i2s_sysclk, 0), 2423 - INGENIC_PIN_GROUP("dmic0", x1830_dmic0, 2), 2424 - INGENIC_PIN_GROUP("dmic1", x1830_dmic1, 2), 2257 + INGENIC_PIN_GROUP("dmic-if0", x1830_dmic_if0, 2), 2258 + INGENIC_PIN_GROUP("dmic-if1", x1830_dmic_if1, 2), 2425 2259 INGENIC_PIN_GROUP("lcd-tft-8bit", x1830_lcd_tft_8bit, 0), 2426 2260 INGENIC_PIN_GROUP("lcd-tft-24bit", x1830_lcd_tft_24bit, 0), 2427 2261 INGENIC_PIN_GROUP("lcd-slcd-8bit", x1830_lcd_slcd_8bit, 1), ··· 2447 2281 2448 2282 static const char *x1830_uart0_groups[] = { "uart0-data", "uart0-hwflow", }; 2449 2283 static const char *x1830_uart1_groups[] = { "uart1-data", }; 2450 - static const char *x1830_sfc_groups[] = { "sfc", }; 2284 + static const char *x1830_sfc_groups[] = { "sfc-data", "sfc-clk", "sfc-ce", }; 2451 2285 static const char *x1830_ssi0_groups[] = { 2452 2286 "ssi0-dt", "ssi0-dr", "ssi0-clk", "ssi0-gpc", "ssi0-ce0", "ssi0-ce1", 2453 2287 }; ··· 2467 2301 static const char *x1830_i2s_groups[] = { 2468 2302 "i2s-data-tx", "i2s-data-rx", "i2s-clk-txrx", "i2s-clk-rx", "i2s-sysclk", 2469 2303 }; 2470 - static const char *x1830_dmic_groups[] = { "dmic0", "dmic1", }; 2304 + static const char *x1830_dmic_groups[] = { "dmic-if0", "dmic-if1", }; 2471 2305 static const char *x1830_lcd_groups[] = { 2472 2306 "lcd-tft-8bit", "lcd-tft-24bit", "lcd-slcd-8bit", "lcd-slcd-16bit", 2473 2307 }; ··· 2547 2381 static int x2000_uart7_data_c_pins[] = { 0x41, 0x42, }; 2548 2382 static int x2000_uart8_data_pins[] = { 0x3c, 0x3d, }; 2549 2383 static int x2000_uart9_data_pins[] = { 0x3e, 0x3f, }; 2550 - static int x2000_sfc0_d_pins[] = { 0x73, 0x74, 0x75, 0x76, 0x71, 0x72, }; 2551 - static int x2000_sfc0_e_pins[] = { 0x92, 0x93, 0x94, 0x95, 0x90, 0x91, }; 2552 - static int x2000_sfc1_pins[] = { 0x77, 0x78, 0x79, 0x7a, }; 2384 + static int x2000_sfc_data_if0_d_pins[] = { 0x73, 0x74, 0x75, 0x76, }; 2385 + static int x2000_sfc_data_if0_e_pins[] = { 0x92, 0x93, 0x94, 0x95, }; 2386 + static int x2000_sfc_data_if1_pins[] = { 0x77, 0x78, 0x79, 0x7a, }; 2387 + static int x2000_sfc_clk_d_pins[] = { 0x71, }; 2388 + static int x2000_sfc_clk_e_pins[] = { 0x90, }; 2389 + static int x2000_sfc_ce_d_pins[] = { 0x72, }; 2390 + static int x2000_sfc_ce_e_pins[] = { 0x91, }; 2553 2391 static int x2000_ssi0_dt_b_pins[] = { 0x3e, }; 2554 2392 static int x2000_ssi0_dt_d_pins[] = { 0x69, }; 2555 2393 static int x2000_ssi0_dr_b_pins[] = { 0x3d, }; 2556 2394 static int x2000_ssi0_dr_d_pins[] = { 0x6a, }; 2557 2395 static int x2000_ssi0_clk_b_pins[] = { 0x3f, }; 2558 2396 static int x2000_ssi0_clk_d_pins[] = { 0x68, }; 2559 - static int x2000_ssi0_ce0_b_pins[] = { 0x3c, }; 2560 - static int x2000_ssi0_ce0_d_pins[] = { 0x6d, }; 2397 + static int x2000_ssi0_ce_b_pins[] = { 0x3c, }; 2398 + static int x2000_ssi0_ce_d_pins[] = { 0x6d, }; 2561 2399 static int x2000_ssi1_dt_c_pins[] = { 0x4b, }; 2562 2400 static int x2000_ssi1_dt_d_pins[] = { 0x72, }; 2563 2401 static int x2000_ssi1_dt_e_pins[] = { 0x91, }; ··· 2571 2401 static int x2000_ssi1_clk_c_pins[] = { 0x4c, }; 2572 2402 static int x2000_ssi1_clk_d_pins[] = { 0x71, }; 2573 2403 static int x2000_ssi1_clk_e_pins[] = { 0x90, }; 2574 - static int x2000_ssi1_ce0_c_pins[] = { 0x49, }; 2575 - static int x2000_ssi1_ce0_d_pins[] = { 0x76, }; 2576 - static int x2000_ssi1_ce0_e_pins[] = { 0x95, }; 2404 + static int x2000_ssi1_ce_c_pins[] = { 0x49, }; 2405 + static int x2000_ssi1_ce_d_pins[] = { 0x76, }; 2406 + static int x2000_ssi1_ce_e_pins[] = { 0x95, }; 2577 2407 static int x2000_mmc0_1bit_pins[] = { 0x71, 0x72, 0x73, }; 2578 2408 static int x2000_mmc0_4bit_pins[] = { 0x74, 0x75, 0x75, }; 2579 2409 static int x2000_mmc0_8bit_pins[] = { 0x77, 0x78, 0x79, 0x7a, }; ··· 2625 2455 static int x2000_i2s3_data_tx3_pins[] = { 0x06, }; 2626 2456 static int x2000_i2s3_clk_tx_pins[] = { 0x10, 0x02, }; 2627 2457 static int x2000_i2s3_sysclk_tx_pins[] = { 0x00, }; 2628 - static int x2000_dmic0_pins[] = { 0x54, 0x55, }; 2629 - static int x2000_dmic1_pins[] = { 0x56, }; 2630 - static int x2000_dmic2_pins[] = { 0x57, }; 2631 - static int x2000_dmic3_pins[] = { 0x58, }; 2458 + static int x2000_dmic_if0_pins[] = { 0x54, 0x55, }; 2459 + static int x2000_dmic_if1_pins[] = { 0x56, }; 2460 + static int x2000_dmic_if2_pins[] = { 0x57, }; 2461 + static int x2000_dmic_if3_pins[] = { 0x58, }; 2632 2462 static int x2000_cim_8bit_pins[] = { 2633 2463 0x0e, 0x0c, 0x0d, 0x4f, 2634 2464 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, ··· 2715 2545 INGENIC_PIN_GROUP("uart7-data-c", x2000_uart7_data_c, 3), 2716 2546 INGENIC_PIN_GROUP("uart8-data", x2000_uart8_data, 3), 2717 2547 INGENIC_PIN_GROUP("uart9-data", x2000_uart9_data, 3), 2718 - INGENIC_PIN_GROUP("sfc0-d", x2000_sfc0_d, 1), 2719 - INGENIC_PIN_GROUP("sfc0-e", x2000_sfc0_e, 0), 2720 - INGENIC_PIN_GROUP("sfc1", x2000_sfc1, 1), 2548 + INGENIC_PIN_GROUP("sfc-data-if0-d", x2000_sfc_data_if0_d, 1), 2549 + INGENIC_PIN_GROUP("sfc-data-if0-e", x2000_sfc_data_if0_e, 0), 2550 + INGENIC_PIN_GROUP("sfc-data-if1", x2000_sfc_data_if1, 1), 2551 + INGENIC_PIN_GROUP("sfc-clk-d", x2000_sfc_clk_d, 1), 2552 + INGENIC_PIN_GROUP("sfc-clk-e", x2000_sfc_clk_e, 0), 2553 + INGENIC_PIN_GROUP("sfc-ce-d", x2000_sfc_ce_d, 1), 2554 + INGENIC_PIN_GROUP("sfc-ce-e", x2000_sfc_ce_e, 0), 2721 2555 INGENIC_PIN_GROUP("ssi0-dt-b", x2000_ssi0_dt_b, 1), 2722 2556 INGENIC_PIN_GROUP("ssi0-dt-d", x2000_ssi0_dt_d, 1), 2723 2557 INGENIC_PIN_GROUP("ssi0-dr-b", x2000_ssi0_dr_b, 1), 2724 2558 INGENIC_PIN_GROUP("ssi0-dr-d", x2000_ssi0_dr_d, 1), 2725 2559 INGENIC_PIN_GROUP("ssi0-clk-b", x2000_ssi0_clk_b, 1), 2726 2560 INGENIC_PIN_GROUP("ssi0-clk-d", x2000_ssi0_clk_d, 1), 2727 - INGENIC_PIN_GROUP("ssi0-ce0-b", x2000_ssi0_ce0_b, 1), 2728 - INGENIC_PIN_GROUP("ssi0-ce0-d", x2000_ssi0_ce0_d, 1), 2561 + INGENIC_PIN_GROUP("ssi0-ce-b", x2000_ssi0_ce_b, 1), 2562 + INGENIC_PIN_GROUP("ssi0-ce-d", x2000_ssi0_ce_d, 1), 2729 2563 INGENIC_PIN_GROUP("ssi1-dt-c", x2000_ssi1_dt_c, 2), 2730 2564 INGENIC_PIN_GROUP("ssi1-dt-d", x2000_ssi1_dt_d, 2), 2731 2565 INGENIC_PIN_GROUP("ssi1-dt-e", x2000_ssi1_dt_e, 1), ··· 2739 2565 INGENIC_PIN_GROUP("ssi1-clk-c", x2000_ssi1_clk_c, 2), 2740 2566 INGENIC_PIN_GROUP("ssi1-clk-d", x2000_ssi1_clk_d, 2), 2741 2567 INGENIC_PIN_GROUP("ssi1-clk-e", x2000_ssi1_clk_e, 1), 2742 - INGENIC_PIN_GROUP("ssi1-ce0-c", x2000_ssi1_ce0_c, 2), 2743 - INGENIC_PIN_GROUP("ssi1-ce0-d", x2000_ssi1_ce0_d, 2), 2744 - INGENIC_PIN_GROUP("ssi1-ce0-e", x2000_ssi1_ce0_e, 1), 2568 + INGENIC_PIN_GROUP("ssi1-ce-c", x2000_ssi1_ce_c, 2), 2569 + INGENIC_PIN_GROUP("ssi1-ce-d", x2000_ssi1_ce_d, 2), 2570 + INGENIC_PIN_GROUP("ssi1-ce-e", x2000_ssi1_ce_e, 1), 2745 2571 INGENIC_PIN_GROUP("mmc0-1bit", x2000_mmc0_1bit, 0), 2746 2572 INGENIC_PIN_GROUP("mmc0-4bit", x2000_mmc0_4bit, 0), 2747 2573 INGENIC_PIN_GROUP("mmc0-8bit", x2000_mmc0_8bit, 0), ··· 2786 2612 INGENIC_PIN_GROUP("i2s3-data-tx3", x2000_i2s3_data_tx3, 2), 2787 2613 INGENIC_PIN_GROUP("i2s3-clk-tx", x2000_i2s3_clk_tx, 2), 2788 2614 INGENIC_PIN_GROUP("i2s3-sysclk-tx", x2000_i2s3_sysclk_tx, 2), 2789 - INGENIC_PIN_GROUP("dmic0", x2000_dmic0, 0), 2790 - INGENIC_PIN_GROUP("dmic1", x2000_dmic1, 0), 2791 - INGENIC_PIN_GROUP("dmic2", x2000_dmic2, 0), 2792 - INGENIC_PIN_GROUP("dmic3", x2000_dmic3, 0), 2615 + INGENIC_PIN_GROUP("dmic-if0", x2000_dmic_if0, 0), 2616 + INGENIC_PIN_GROUP("dmic-if1", x2000_dmic_if1, 0), 2617 + INGENIC_PIN_GROUP("dmic-if2", x2000_dmic_if2, 0), 2618 + INGENIC_PIN_GROUP("dmic-if3", x2000_dmic_if3, 0), 2793 2619 INGENIC_PIN_GROUP_FUNCS("cim-data-8bit", x2000_cim_8bit, 2794 2620 x2000_cim_8bit_funcs), 2795 2621 INGENIC_PIN_GROUP("cim-data-12bit", x2000_cim_12bit, 0), ··· 2844 2670 static const char *x2000_uart7_groups[] = { "uart7-data-a", "uart7-data-c", }; 2845 2671 static const char *x2000_uart8_groups[] = { "uart8-data", }; 2846 2672 static const char *x2000_uart9_groups[] = { "uart9-data", }; 2847 - static const char *x2000_sfc_groups[] = { "sfc0-d", "sfc0-e", "sfc1", }; 2673 + static const char *x2000_sfc_groups[] = { 2674 + "sfc-data-if0-d", "sfc-data-if0-e", "sfc-data-if1", 2675 + "sfc-clk-d", "sfc-clk-e", "sfc-ce-d", "sfc-ce-e", 2676 + }; 2848 2677 static const char *x2000_ssi0_groups[] = { 2849 2678 "ssi0-dt-b", "ssi0-dt-d", 2850 2679 "ssi0-dr-b", "ssi0-dr-d", 2851 2680 "ssi0-clk-b", "ssi0-clk-d", 2852 - "ssi0-ce0-b", "ssi0-ce0-d", 2681 + "ssi0-ce-b", "ssi0-ce-d", 2853 2682 }; 2854 2683 static const char *x2000_ssi1_groups[] = { 2855 2684 "ssi1-dt-c", "ssi1-dt-d", "ssi1-dt-e", 2856 2685 "ssi1-dr-c", "ssi1-dr-d", "ssi1-dr-e", 2857 2686 "ssi1-clk-c", "ssi1-clk-d", "ssi1-clk-e", 2858 - "ssi1-ce0-c", "ssi1-ce0-d", "ssi1-ce0-e", 2687 + "ssi1-ce-c", "ssi1-ce-d", "ssi1-ce-e", 2859 2688 }; 2860 2689 static const char *x2000_mmc0_groups[] = { "mmc0-1bit", "mmc0-4bit", "mmc0-8bit", }; 2861 2690 static const char *x2000_mmc1_groups[] = { "mmc1-1bit", "mmc1-4bit", }; ··· 2888 2711 "i2s3-data-tx0", "i2s3-data-tx1", "i2s3-data-tx2", "i2s3-data-tx3", 2889 2712 "i2s3-clk-tx", "i2s3-sysclk-tx", 2890 2713 }; 2891 - static const char *x2000_dmic_groups[] = { "dmic0", "dmic1", "dmic2", "dmic3", }; 2714 + static const char *x2000_dmic_groups[] = { 2715 + "dmic-if0", "dmic-if1", "dmic-if2", "dmic-if3", 2716 + }; 2892 2717 static const char *x2000_cim_groups[] = { "cim-data-8bit", "cim-data-12bit", }; 2893 2718 static const char *x2000_lcd_groups[] = { 2894 2719 "lcd-tft-8bit", "lcd-tft-16bit", "lcd-tft-18bit", "lcd-tft-24bit", ··· 2979 2800 .num_functions = ARRAY_SIZE(x2000_functions), 2980 2801 .pull_ups = x2000_pull_ups, 2981 2802 .pull_downs = x2000_pull_downs, 2803 + }; 2804 + 2805 + static const u32 x2100_pull_ups[5] = { 2806 + 0x0003ffff, 0xffffffff, 0x1ff0ffff, 0xc7fe3f3f, 0x0fbf003f, 2807 + }; 2808 + 2809 + static const u32 x2100_pull_downs[5] = { 2810 + 0x0003ffff, 0xffffffff, 0x1ff0ffff, 0x00000000, 0x0fbf003f, 2811 + }; 2812 + 2813 + static int x2100_mac_pins[] = { 2814 + 0x4b, 0x47, 0x46, 0x4a, 0x43, 0x42, 0x4c, 0x4d, 0x4f, 0x41, 2815 + }; 2816 + 2817 + static const struct group_desc x2100_groups[] = { 2818 + INGENIC_PIN_GROUP("uart0-data", x2000_uart0_data, 2), 2819 + INGENIC_PIN_GROUP("uart0-hwflow", x2000_uart0_hwflow, 2), 2820 + INGENIC_PIN_GROUP("uart1-data", x2000_uart1_data, 1), 2821 + INGENIC_PIN_GROUP("uart1-hwflow", x2000_uart1_hwflow, 1), 2822 + INGENIC_PIN_GROUP("uart2-data", x2000_uart2_data, 0), 2823 + INGENIC_PIN_GROUP("uart3-data-c", x2000_uart3_data_c, 0), 2824 + INGENIC_PIN_GROUP("uart3-data-d", x2000_uart3_data_d, 1), 2825 + INGENIC_PIN_GROUP("uart3-hwflow-c", x2000_uart3_hwflow_c, 0), 2826 + INGENIC_PIN_GROUP("uart3-hwflow-d", x2000_uart3_hwflow_d, 1), 2827 + INGENIC_PIN_GROUP("uart4-data-a", x2000_uart4_data_a, 1), 2828 + INGENIC_PIN_GROUP("uart4-data-c", x2000_uart4_data_c, 3), 2829 + INGENIC_PIN_GROUP("uart4-hwflow-a", x2000_uart4_hwflow_a, 1), 2830 + INGENIC_PIN_GROUP("uart4-hwflow-c", x2000_uart4_hwflow_c, 3), 2831 + INGENIC_PIN_GROUP("uart5-data-a", x2000_uart5_data_a, 1), 2832 + INGENIC_PIN_GROUP("uart5-data-c", x2000_uart5_data_c, 3), 2833 + INGENIC_PIN_GROUP("uart6-data-a", x2000_uart6_data_a, 1), 2834 + INGENIC_PIN_GROUP("uart6-data-c", x2000_uart6_data_c, 3), 2835 + INGENIC_PIN_GROUP("uart7-data-a", x2000_uart7_data_a, 1), 2836 + INGENIC_PIN_GROUP("uart7-data-c", x2000_uart7_data_c, 3), 2837 + INGENIC_PIN_GROUP("uart8-data", x2000_uart8_data, 3), 2838 + INGENIC_PIN_GROUP("uart9-data", x2000_uart9_data, 3), 2839 + INGENIC_PIN_GROUP("sfc-data-if0-d", x2000_sfc_data_if0_d, 1), 2840 + INGENIC_PIN_GROUP("sfc-data-if0-e", x2000_sfc_data_if0_e, 0), 2841 + INGENIC_PIN_GROUP("sfc-data-if1", x2000_sfc_data_if1, 1), 2842 + INGENIC_PIN_GROUP("sfc-clk-d", x2000_sfc_clk_d, 1), 2843 + INGENIC_PIN_GROUP("sfc-clk-e", x2000_sfc_clk_e, 0), 2844 + INGENIC_PIN_GROUP("sfc-ce-d", x2000_sfc_ce_d, 1), 2845 + INGENIC_PIN_GROUP("sfc-ce-e", x2000_sfc_ce_e, 0), 2846 + INGENIC_PIN_GROUP("ssi0-dt-b", x2000_ssi0_dt_b, 1), 2847 + INGENIC_PIN_GROUP("ssi0-dt-d", x2000_ssi0_dt_d, 1), 2848 + INGENIC_PIN_GROUP("ssi0-dr-b", x2000_ssi0_dr_b, 1), 2849 + INGENIC_PIN_GROUP("ssi0-dr-d", x2000_ssi0_dr_d, 1), 2850 + INGENIC_PIN_GROUP("ssi0-clk-b", x2000_ssi0_clk_b, 1), 2851 + INGENIC_PIN_GROUP("ssi0-clk-d", x2000_ssi0_clk_d, 1), 2852 + INGENIC_PIN_GROUP("ssi0-ce-b", x2000_ssi0_ce_b, 1), 2853 + INGENIC_PIN_GROUP("ssi0-ce-d", x2000_ssi0_ce_d, 1), 2854 + INGENIC_PIN_GROUP("ssi1-dt-c", x2000_ssi1_dt_c, 2), 2855 + INGENIC_PIN_GROUP("ssi1-dt-d", x2000_ssi1_dt_d, 2), 2856 + INGENIC_PIN_GROUP("ssi1-dt-e", x2000_ssi1_dt_e, 1), 2857 + INGENIC_PIN_GROUP("ssi1-dr-c", x2000_ssi1_dr_c, 2), 2858 + INGENIC_PIN_GROUP("ssi1-dr-d", x2000_ssi1_dr_d, 2), 2859 + INGENIC_PIN_GROUP("ssi1-dr-e", x2000_ssi1_dr_e, 1), 2860 + INGENIC_PIN_GROUP("ssi1-clk-c", x2000_ssi1_clk_c, 2), 2861 + INGENIC_PIN_GROUP("ssi1-clk-d", x2000_ssi1_clk_d, 2), 2862 + INGENIC_PIN_GROUP("ssi1-clk-e", x2000_ssi1_clk_e, 1), 2863 + INGENIC_PIN_GROUP("ssi1-ce-c", x2000_ssi1_ce_c, 2), 2864 + INGENIC_PIN_GROUP("ssi1-ce-d", x2000_ssi1_ce_d, 2), 2865 + INGENIC_PIN_GROUP("ssi1-ce-e", x2000_ssi1_ce_e, 1), 2866 + INGENIC_PIN_GROUP("mmc0-1bit", x2000_mmc0_1bit, 0), 2867 + INGENIC_PIN_GROUP("mmc0-4bit", x2000_mmc0_4bit, 0), 2868 + INGENIC_PIN_GROUP("mmc0-8bit", x2000_mmc0_8bit, 0), 2869 + INGENIC_PIN_GROUP("mmc1-1bit", x2000_mmc1_1bit, 0), 2870 + INGENIC_PIN_GROUP("mmc1-4bit", x2000_mmc1_4bit, 0), 2871 + INGENIC_PIN_GROUP("mmc2-1bit", x2000_mmc2_1bit, 0), 2872 + INGENIC_PIN_GROUP("mmc2-4bit", x2000_mmc2_4bit, 0), 2873 + INGENIC_PIN_GROUP("emc-8bit-data", x2000_emc_8bit_data, 0), 2874 + INGENIC_PIN_GROUP("emc-16bit-data", x2000_emc_16bit_data, 0), 2875 + INGENIC_PIN_GROUP("emc-addr", x2000_emc_addr, 0), 2876 + INGENIC_PIN_GROUP("emc-rd-we", x2000_emc_rd_we, 0), 2877 + INGENIC_PIN_GROUP("emc-wait", x2000_emc_wait, 0), 2878 + INGENIC_PIN_GROUP("emc-cs1", x2000_emc_cs1, 3), 2879 + INGENIC_PIN_GROUP("emc-cs2", x2000_emc_cs2, 3), 2880 + INGENIC_PIN_GROUP("i2c0-data", x2000_i2c0, 3), 2881 + INGENIC_PIN_GROUP("i2c1-data-c", x2000_i2c1_c, 2), 2882 + INGENIC_PIN_GROUP("i2c1-data-d", x2000_i2c1_d, 1), 2883 + INGENIC_PIN_GROUP("i2c2-data-b", x2000_i2c2_b, 2), 2884 + INGENIC_PIN_GROUP("i2c2-data-d", x2000_i2c2_d, 2), 2885 + INGENIC_PIN_GROUP("i2c2-data-e", x2000_i2c2_e, 1), 2886 + INGENIC_PIN_GROUP("i2c3-data-a", x2000_i2c3_a, 0), 2887 + INGENIC_PIN_GROUP("i2c3-data-d", x2000_i2c3_d, 1), 2888 + INGENIC_PIN_GROUP("i2c4-data-c", x2000_i2c4_c, 1), 2889 + INGENIC_PIN_GROUP("i2c4-data-d", x2000_i2c4_d, 2), 2890 + INGENIC_PIN_GROUP("i2c5-data-c", x2000_i2c5_c, 1), 2891 + INGENIC_PIN_GROUP("i2c5-data-d", x2000_i2c5_d, 1), 2892 + INGENIC_PIN_GROUP("i2s1-data-tx", x2000_i2s1_data_tx, 2), 2893 + INGENIC_PIN_GROUP("i2s1-data-rx", x2000_i2s1_data_rx, 2), 2894 + INGENIC_PIN_GROUP("i2s1-clk-tx", x2000_i2s1_clk_tx, 2), 2895 + INGENIC_PIN_GROUP("i2s1-clk-rx", x2000_i2s1_clk_rx, 2), 2896 + INGENIC_PIN_GROUP("i2s1-sysclk-tx", x2000_i2s1_sysclk_tx, 2), 2897 + INGENIC_PIN_GROUP("i2s1-sysclk-rx", x2000_i2s1_sysclk_rx, 2), 2898 + INGENIC_PIN_GROUP("i2s2-data-rx0", x2000_i2s2_data_rx0, 2), 2899 + INGENIC_PIN_GROUP("i2s2-data-rx1", x2000_i2s2_data_rx1, 2), 2900 + INGENIC_PIN_GROUP("i2s2-data-rx2", x2000_i2s2_data_rx2, 2), 2901 + INGENIC_PIN_GROUP("i2s2-data-rx3", x2000_i2s2_data_rx3, 2), 2902 + INGENIC_PIN_GROUP("i2s2-clk-rx", x2000_i2s2_clk_rx, 2), 2903 + INGENIC_PIN_GROUP("i2s2-sysclk-rx", x2000_i2s2_sysclk_rx, 2), 2904 + INGENIC_PIN_GROUP("i2s3-data-tx0", x2000_i2s3_data_tx0, 2), 2905 + INGENIC_PIN_GROUP("i2s3-data-tx1", x2000_i2s3_data_tx1, 2), 2906 + INGENIC_PIN_GROUP("i2s3-data-tx2", x2000_i2s3_data_tx2, 2), 2907 + INGENIC_PIN_GROUP("i2s3-data-tx3", x2000_i2s3_data_tx3, 2), 2908 + INGENIC_PIN_GROUP("i2s3-clk-tx", x2000_i2s3_clk_tx, 2), 2909 + INGENIC_PIN_GROUP("i2s3-sysclk-tx", x2000_i2s3_sysclk_tx, 2), 2910 + INGENIC_PIN_GROUP("dmic-if0", x2000_dmic_if0, 0), 2911 + INGENIC_PIN_GROUP("dmic-if1", x2000_dmic_if1, 0), 2912 + INGENIC_PIN_GROUP("dmic-if2", x2000_dmic_if2, 0), 2913 + INGENIC_PIN_GROUP("dmic-if3", x2000_dmic_if3, 0), 2914 + INGENIC_PIN_GROUP_FUNCS("cim-data-8bit", x2000_cim_8bit, 2915 + x2000_cim_8bit_funcs), 2916 + INGENIC_PIN_GROUP("cim-data-12bit", x2000_cim_12bit, 0), 2917 + INGENIC_PIN_GROUP("lcd-tft-8bit", x2000_lcd_tft_8bit, 1), 2918 + INGENIC_PIN_GROUP("lcd-tft-16bit", x2000_lcd_tft_16bit, 1), 2919 + INGENIC_PIN_GROUP("lcd-tft-18bit", x2000_lcd_tft_18bit, 1), 2920 + INGENIC_PIN_GROUP("lcd-tft-24bit", x2000_lcd_tft_24bit, 1), 2921 + INGENIC_PIN_GROUP("lcd-slcd-8bit", x2000_lcd_slcd_8bit, 2), 2922 + INGENIC_PIN_GROUP("lcd-slcd-16bit", x2000_lcd_tft_16bit, 2), 2923 + INGENIC_PIN_GROUP("pwm0-c", x2000_pwm_pwm0_c, 0), 2924 + INGENIC_PIN_GROUP("pwm0-d", x2000_pwm_pwm0_d, 2), 2925 + INGENIC_PIN_GROUP("pwm1-c", x2000_pwm_pwm1_c, 0), 2926 + INGENIC_PIN_GROUP("pwm1-d", x2000_pwm_pwm1_d, 2), 2927 + INGENIC_PIN_GROUP("pwm2-c", x2000_pwm_pwm2_c, 0), 2928 + INGENIC_PIN_GROUP("pwm2-e", x2000_pwm_pwm2_e, 1), 2929 + INGENIC_PIN_GROUP("pwm3-c", x2000_pwm_pwm3_c, 0), 2930 + INGENIC_PIN_GROUP("pwm3-e", x2000_pwm_pwm3_e, 1), 2931 + INGENIC_PIN_GROUP("pwm4-c", x2000_pwm_pwm4_c, 0), 2932 + INGENIC_PIN_GROUP("pwm4-e", x2000_pwm_pwm4_e, 1), 2933 + INGENIC_PIN_GROUP("pwm5-c", x2000_pwm_pwm5_c, 0), 2934 + INGENIC_PIN_GROUP("pwm5-e", x2000_pwm_pwm5_e, 1), 2935 + INGENIC_PIN_GROUP("pwm6-c", x2000_pwm_pwm6_c, 0), 2936 + INGENIC_PIN_GROUP("pwm6-e", x2000_pwm_pwm6_e, 1), 2937 + INGENIC_PIN_GROUP("pwm7-c", x2000_pwm_pwm7_c, 0), 2938 + INGENIC_PIN_GROUP("pwm7-e", x2000_pwm_pwm7_e, 1), 2939 + INGENIC_PIN_GROUP("pwm8", x2000_pwm_pwm8, 0), 2940 + INGENIC_PIN_GROUP("pwm9", x2000_pwm_pwm9, 0), 2941 + INGENIC_PIN_GROUP("pwm10", x2000_pwm_pwm10, 0), 2942 + INGENIC_PIN_GROUP("pwm11", x2000_pwm_pwm11, 0), 2943 + INGENIC_PIN_GROUP("pwm12", x2000_pwm_pwm12, 0), 2944 + INGENIC_PIN_GROUP("pwm13", x2000_pwm_pwm13, 0), 2945 + INGENIC_PIN_GROUP("pwm14", x2000_pwm_pwm14, 0), 2946 + INGENIC_PIN_GROUP("pwm15", x2000_pwm_pwm15, 0), 2947 + INGENIC_PIN_GROUP("mac", x2100_mac, 1), 2948 + }; 2949 + 2950 + static const char *x2100_mac_groups[] = { "mac", }; 2951 + 2952 + static const struct function_desc x2100_functions[] = { 2953 + { "uart0", x2000_uart0_groups, ARRAY_SIZE(x2000_uart0_groups), }, 2954 + { "uart1", x2000_uart1_groups, ARRAY_SIZE(x2000_uart1_groups), }, 2955 + { "uart2", x2000_uart2_groups, ARRAY_SIZE(x2000_uart2_groups), }, 2956 + { "uart3", x2000_uart3_groups, ARRAY_SIZE(x2000_uart3_groups), }, 2957 + { "uart4", x2000_uart4_groups, ARRAY_SIZE(x2000_uart4_groups), }, 2958 + { "uart5", x2000_uart5_groups, ARRAY_SIZE(x2000_uart5_groups), }, 2959 + { "uart6", x2000_uart6_groups, ARRAY_SIZE(x2000_uart6_groups), }, 2960 + { "uart7", x2000_uart7_groups, ARRAY_SIZE(x2000_uart7_groups), }, 2961 + { "uart8", x2000_uart8_groups, ARRAY_SIZE(x2000_uart8_groups), }, 2962 + { "uart9", x2000_uart9_groups, ARRAY_SIZE(x2000_uart9_groups), }, 2963 + { "sfc", x2000_sfc_groups, ARRAY_SIZE(x2000_sfc_groups), }, 2964 + { "ssi0", x2000_ssi0_groups, ARRAY_SIZE(x2000_ssi0_groups), }, 2965 + { "ssi1", x2000_ssi1_groups, ARRAY_SIZE(x2000_ssi1_groups), }, 2966 + { "mmc0", x2000_mmc0_groups, ARRAY_SIZE(x2000_mmc0_groups), }, 2967 + { "mmc1", x2000_mmc1_groups, ARRAY_SIZE(x2000_mmc1_groups), }, 2968 + { "mmc2", x2000_mmc2_groups, ARRAY_SIZE(x2000_mmc2_groups), }, 2969 + { "emc", x2000_emc_groups, ARRAY_SIZE(x2000_emc_groups), }, 2970 + { "emc-cs1", x2000_cs1_groups, ARRAY_SIZE(x2000_cs1_groups), }, 2971 + { "emc-cs2", x2000_cs2_groups, ARRAY_SIZE(x2000_cs2_groups), }, 2972 + { "i2c0", x2000_i2c0_groups, ARRAY_SIZE(x2000_i2c0_groups), }, 2973 + { "i2c1", x2000_i2c1_groups, ARRAY_SIZE(x2000_i2c1_groups), }, 2974 + { "i2c2", x2000_i2c2_groups, ARRAY_SIZE(x2000_i2c2_groups), }, 2975 + { "i2c3", x2000_i2c3_groups, ARRAY_SIZE(x2000_i2c3_groups), }, 2976 + { "i2c4", x2000_i2c4_groups, ARRAY_SIZE(x2000_i2c4_groups), }, 2977 + { "i2c5", x2000_i2c5_groups, ARRAY_SIZE(x2000_i2c5_groups), }, 2978 + { "i2s1", x2000_i2s1_groups, ARRAY_SIZE(x2000_i2s1_groups), }, 2979 + { "i2s2", x2000_i2s2_groups, ARRAY_SIZE(x2000_i2s2_groups), }, 2980 + { "i2s3", x2000_i2s3_groups, ARRAY_SIZE(x2000_i2s3_groups), }, 2981 + { "dmic", x2000_dmic_groups, ARRAY_SIZE(x2000_dmic_groups), }, 2982 + { "cim", x2000_cim_groups, ARRAY_SIZE(x2000_cim_groups), }, 2983 + { "lcd", x2000_lcd_groups, ARRAY_SIZE(x2000_lcd_groups), }, 2984 + { "pwm0", x2000_pwm0_groups, ARRAY_SIZE(x2000_pwm0_groups), }, 2985 + { "pwm1", x2000_pwm1_groups, ARRAY_SIZE(x2000_pwm1_groups), }, 2986 + { "pwm2", x2000_pwm2_groups, ARRAY_SIZE(x2000_pwm2_groups), }, 2987 + { "pwm3", x2000_pwm3_groups, ARRAY_SIZE(x2000_pwm3_groups), }, 2988 + { "pwm4", x2000_pwm4_groups, ARRAY_SIZE(x2000_pwm4_groups), }, 2989 + { "pwm5", x2000_pwm5_groups, ARRAY_SIZE(x2000_pwm5_groups), }, 2990 + { "pwm6", x2000_pwm6_groups, ARRAY_SIZE(x2000_pwm6_groups), }, 2991 + { "pwm7", x2000_pwm7_groups, ARRAY_SIZE(x2000_pwm7_groups), }, 2992 + { "pwm8", x2000_pwm8_groups, ARRAY_SIZE(x2000_pwm8_groups), }, 2993 + { "pwm9", x2000_pwm9_groups, ARRAY_SIZE(x2000_pwm9_groups), }, 2994 + { "pwm10", x2000_pwm10_groups, ARRAY_SIZE(x2000_pwm10_groups), }, 2995 + { "pwm11", x2000_pwm11_groups, ARRAY_SIZE(x2000_pwm11_groups), }, 2996 + { "pwm12", x2000_pwm12_groups, ARRAY_SIZE(x2000_pwm12_groups), }, 2997 + { "pwm13", x2000_pwm13_groups, ARRAY_SIZE(x2000_pwm13_groups), }, 2998 + { "pwm14", x2000_pwm14_groups, ARRAY_SIZE(x2000_pwm14_groups), }, 2999 + { "pwm15", x2000_pwm15_groups, ARRAY_SIZE(x2000_pwm15_groups), }, 3000 + { "mac", x2100_mac_groups, ARRAY_SIZE(x2100_mac_groups), }, 3001 + }; 3002 + 3003 + static const struct ingenic_chip_info x2100_chip_info = { 3004 + .num_chips = 5, 3005 + .reg_offset = 0x100, 3006 + .version = ID_X2100, 3007 + .groups = x2100_groups, 3008 + .num_groups = ARRAY_SIZE(x2100_groups), 3009 + .functions = x2100_functions, 3010 + .num_functions = ARRAY_SIZE(x2100_functions), 3011 + .pull_ups = x2100_pull_ups, 3012 + .pull_downs = x2100_pull_downs, 2982 3013 }; 2983 3014 2984 3015 static u32 ingenic_gpio_read_reg(struct ingenic_gpio_chip *jzgc, u8 reg) ··· 3830 3441 { 3831 3442 if (jzpc->info->version >= ID_X2000) { 3832 3443 switch (bias) { 3833 - case PIN_CONFIG_BIAS_PULL_UP: 3444 + case GPIO_PULL_UP: 3834 3445 ingenic_config_pin(jzpc, pin, X2000_GPIO_PEPD, false); 3835 3446 ingenic_config_pin(jzpc, pin, X2000_GPIO_PEPU, true); 3836 3447 break; 3837 3448 3838 - case PIN_CONFIG_BIAS_PULL_DOWN: 3449 + case GPIO_PULL_DOWN: 3839 3450 ingenic_config_pin(jzpc, pin, X2000_GPIO_PEPU, false); 3840 3451 ingenic_config_pin(jzpc, pin, X2000_GPIO_PEPD, true); 3841 3452 break; 3842 3453 3843 - case PIN_CONFIG_BIAS_DISABLE: 3454 + case GPIO_PULL_DIS: 3844 3455 default: 3845 3456 ingenic_config_pin(jzpc, pin, X2000_GPIO_PEPU, false); 3846 3457 ingenic_config_pin(jzpc, pin, X2000_GPIO_PEPD, false); ··· 4043 3654 .reg_stride = 4, 4044 3655 }; 4045 3656 4046 - static const struct of_device_id ingenic_gpio_of_match[] __initconst = { 4047 - { .compatible = "ingenic,jz4730-gpio", }, 4048 - { .compatible = "ingenic,jz4740-gpio", }, 4049 - { .compatible = "ingenic,jz4725b-gpio", }, 4050 - { .compatible = "ingenic,jz4750-gpio", }, 4051 - { .compatible = "ingenic,jz4755-gpio", }, 4052 - { .compatible = "ingenic,jz4760-gpio", }, 4053 - { .compatible = "ingenic,jz4770-gpio", }, 4054 - { .compatible = "ingenic,jz4775-gpio", }, 4055 - { .compatible = "ingenic,jz4780-gpio", }, 4056 - { .compatible = "ingenic,x1000-gpio", }, 4057 - { .compatible = "ingenic,x1830-gpio", }, 4058 - { .compatible = "ingenic,x2000-gpio", }, 3657 + static const struct of_device_id ingenic_gpio_of_matches[] __initconst = { 3658 + { .compatible = "ingenic,jz4730-gpio" }, 3659 + { .compatible = "ingenic,jz4740-gpio" }, 3660 + { .compatible = "ingenic,jz4725b-gpio" }, 3661 + { .compatible = "ingenic,jz4750-gpio" }, 3662 + { .compatible = "ingenic,jz4755-gpio" }, 3663 + { .compatible = "ingenic,jz4760-gpio" }, 3664 + { .compatible = "ingenic,jz4770-gpio" }, 3665 + { .compatible = "ingenic,jz4775-gpio" }, 3666 + { .compatible = "ingenic,jz4780-gpio" }, 3667 + { .compatible = "ingenic,x1000-gpio" }, 3668 + { .compatible = "ingenic,x1830-gpio" }, 3669 + { .compatible = "ingenic,x2000-gpio" }, 3670 + { .compatible = "ingenic,x2100-gpio" }, 4059 3671 {}, 4060 3672 }; 4061 3673 ··· 4149 3759 void __iomem *base; 4150 3760 const struct ingenic_chip_info *chip_info; 4151 3761 struct device_node *node; 3762 + struct regmap_config regmap_config; 4152 3763 unsigned int i; 4153 3764 int err; 4154 3765 ··· 4167 3776 if (IS_ERR(base)) 4168 3777 return PTR_ERR(base); 4169 3778 4170 - jzpc->map = devm_regmap_init_mmio(dev, base, 4171 - &ingenic_pinctrl_regmap_config); 3779 + regmap_config = ingenic_pinctrl_regmap_config; 3780 + regmap_config.max_register = chip_info->num_chips * chip_info->reg_offset; 3781 + 3782 + jzpc->map = devm_regmap_init_mmio(dev, base, &regmap_config); 4172 3783 if (IS_ERR(jzpc->map)) { 4173 3784 dev_err(dev, "Failed to create regmap\n"); 4174 3785 return PTR_ERR(jzpc->map); ··· 4236 3843 dev_set_drvdata(dev, jzpc->map); 4237 3844 4238 3845 for_each_child_of_node(dev->of_node, node) { 4239 - if (of_match_node(ingenic_gpio_of_match, node)) { 3846 + if (of_match_node(ingenic_gpio_of_matches, node)) { 4240 3847 err = ingenic_gpio_probe(jzpc, node); 4241 3848 if (err) { 4242 3849 of_node_put(node); ··· 4250 3857 4251 3858 #define IF_ENABLED(cfg, ptr) PTR_IF(IS_ENABLED(cfg), (ptr)) 4252 3859 4253 - static const struct of_device_id ingenic_pinctrl_of_match[] = { 3860 + static const struct of_device_id ingenic_pinctrl_of_matches[] = { 4254 3861 { 4255 3862 .compatible = "ingenic,jz4730-pinctrl", 4256 3863 .data = IF_ENABLED(CONFIG_MACH_JZ4730, &jz4730_chip_info) ··· 4315 3922 .compatible = "ingenic,x2000e-pinctrl", 4316 3923 .data = IF_ENABLED(CONFIG_MACH_X2000, &x2000_chip_info) 4317 3924 }, 3925 + { 3926 + .compatible = "ingenic,x2100-pinctrl", 3927 + .data = IF_ENABLED(CONFIG_MACH_X2100, &x2100_chip_info) 3928 + }, 4318 3929 { /* sentinel */ }, 4319 3930 }; 4320 3931 4321 3932 static struct platform_driver ingenic_pinctrl_driver = { 4322 3933 .driver = { 4323 3934 .name = "pinctrl-ingenic", 4324 - .of_match_table = ingenic_pinctrl_of_match, 3935 + .of_match_table = ingenic_pinctrl_of_matches, 4325 3936 }, 4326 3937 }; 4327 3938
+1731
drivers/pinctrl/pinctrl-keembay.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 2 + /* Copyright (C) 2020 Intel Corporation */ 3 + 4 + #include <linux/bitfield.h> 5 + #include <linux/bitops.h> 6 + #include <linux/gpio/driver.h> 7 + #include <linux/interrupt.h> 8 + #include <linux/io.h> 9 + #include <linux/module.h> 10 + 11 + #include <linux/pinctrl/pinconf.h> 12 + #include <linux/pinctrl/pinconf-generic.h> 13 + #include <linux/pinctrl/pinctrl.h> 14 + #include <linux/pinctrl/pinmux.h> 15 + 16 + #include <linux/platform_device.h> 17 + 18 + #include "core.h" 19 + #include "pinmux.h" 20 + 21 + /* GPIO data registers' offsets */ 22 + #define KEEMBAY_GPIO_DATA_OUT 0x000 23 + #define KEEMBAY_GPIO_DATA_IN 0x020 24 + #define KEEMBAY_GPIO_DATA_IN_RAW 0x040 25 + #define KEEMBAY_GPIO_DATA_HIGH 0x060 26 + #define KEEMBAY_GPIO_DATA_LOW 0x080 27 + 28 + /* GPIO Interrupt and mode registers' offsets */ 29 + #define KEEMBAY_GPIO_INT_CFG 0x000 30 + #define KEEMBAY_GPIO_MODE 0x070 31 + 32 + /* GPIO mode register bit fields */ 33 + #define KEEMBAY_GPIO_MODE_PULLUP_MASK GENMASK(13, 12) 34 + #define KEEMBAY_GPIO_MODE_DRIVE_MASK GENMASK(8, 7) 35 + #define KEEMBAY_GPIO_MODE_INV_MASK GENMASK(5, 4) 36 + #define KEEMBAY_GPIO_MODE_SELECT_MASK GENMASK(2, 0) 37 + #define KEEMBAY_GPIO_MODE_DIR_OVR BIT(15) 38 + #define KEEMBAY_GPIO_MODE_REN BIT(11) 39 + #define KEEMBAY_GPIO_MODE_SCHMITT_EN BIT(10) 40 + #define KEEMBAY_GPIO_MODE_SLEW_RATE BIT(9) 41 + #define KEEMBAY_GPIO_IRQ_ENABLE BIT(7) 42 + #define KEEMBAY_GPIO_MODE_DIR BIT(3) 43 + #define KEEMBAY_GPIO_MODE_DEFAULT 0x7 44 + #define KEEMBAY_GPIO_MODE_INV_VAL 0x3 45 + 46 + #define KEEMBAY_GPIO_DISABLE 0 47 + #define KEEMBAY_GPIO_PULL_UP 1 48 + #define KEEMBAY_GPIO_PULL_DOWN 2 49 + #define KEEMBAY_GPIO_BUS_HOLD 3 50 + #define KEEMBAY_GPIO_NUM_IRQ 8 51 + #define KEEMBAY_GPIO_MAX_PER_IRQ 4 52 + #define KEEMBAY_GPIO_MAX_PER_REG 32 53 + #define KEEMBAY_GPIO_MIN_STRENGTH 2 54 + #define KEEMBAY_GPIO_MAX_STRENGTH 12 55 + #define KEEMBAY_GPIO_SENSE_LOW (IRQ_TYPE_LEVEL_LOW | IRQ_TYPE_EDGE_FALLING) 56 + 57 + /* GPIO reg address calculation */ 58 + #define KEEMBAY_GPIO_REG_OFFSET(pin) ((pin) * 4) 59 + 60 + /** 61 + * struct keembay_mux_desc - Mux properties of each GPIO pin 62 + * @mode: Pin mode when operating in this function 63 + * @name: Pin function name 64 + */ 65 + struct keembay_mux_desc { 66 + u8 mode; 67 + const char *name; 68 + }; 69 + 70 + #define KEEMBAY_PIN_DESC(pin_number, pin_name, ...) { \ 71 + .number = pin_number, \ 72 + .name = pin_name, \ 73 + .drv_data = &(struct keembay_mux_desc[]) { \ 74 + __VA_ARGS__, { } }, \ 75 + } \ 76 + 77 + #define KEEMBAY_MUX(pin_mode, pin_function) { \ 78 + .mode = pin_mode, \ 79 + .name = pin_function, \ 80 + } \ 81 + 82 + /** 83 + * struct keembay_gpio_irq - Config of each GPIO Interrupt sources 84 + * @source: Interrupt source number (0 - 7) 85 + * @line: Actual Interrupt line number 86 + * @pins: Array of GPIO pins using this Interrupt line 87 + * @trigger: Interrupt trigger type for this line 88 + * @num_share: Number of pins currently using this Interrupt line 89 + */ 90 + struct keembay_gpio_irq { 91 + unsigned int source; 92 + unsigned int line; 93 + unsigned int pins[KEEMBAY_GPIO_MAX_PER_IRQ]; 94 + unsigned int trigger; 95 + unsigned int num_share; 96 + }; 97 + 98 + /** 99 + * struct keembay_pinctrl - Intel Keembay pinctrl structure 100 + * @pctrl: Pointer to the pin controller device 101 + * @base0: First register base address 102 + * @base1: Second register base address 103 + * @dev: Pointer to the device structure 104 + * @chip: GPIO chip used by this pin controller 105 + * @soc: Pin control configuration data based on SoC 106 + * @lock: Spinlock to protect various gpio config register access 107 + * @ngroups: Number of pin groups available 108 + * @nfuncs: Number of pin functions available 109 + * @npins: Number of GPIO pins available 110 + * @irq: Store Interrupt source 111 + * @max_gpios_level_type: Store max level trigger type 112 + * @max_gpios_edge_type: Store max edge trigger type 113 + */ 114 + struct keembay_pinctrl { 115 + struct pinctrl_dev *pctrl; 116 + void __iomem *base0; 117 + void __iomem *base1; 118 + struct device *dev; 119 + struct gpio_chip chip; 120 + const struct keembay_pin_soc *soc; 121 + raw_spinlock_t lock; 122 + unsigned int ngroups; 123 + unsigned int nfuncs; 124 + unsigned int npins; 125 + struct keembay_gpio_irq irq[KEEMBAY_GPIO_NUM_IRQ]; 126 + int max_gpios_level_type; 127 + int max_gpios_edge_type; 128 + }; 129 + 130 + /** 131 + * struct keembay_pin_soc - Pin control config data based on SoC 132 + * @pins: Pin description structure 133 + */ 134 + struct keembay_pin_soc { 135 + const struct pinctrl_pin_desc *pins; 136 + }; 137 + 138 + static const struct pinctrl_pin_desc keembay_pins[] = { 139 + KEEMBAY_PIN_DESC(0, "GPIO0", 140 + KEEMBAY_MUX(0x0, "I2S0_M0"), 141 + KEEMBAY_MUX(0x1, "SD0_M1"), 142 + KEEMBAY_MUX(0x2, "SLVDS0_M2"), 143 + KEEMBAY_MUX(0x3, "I2C0_M3"), 144 + KEEMBAY_MUX(0x4, "CAM_M4"), 145 + KEEMBAY_MUX(0x5, "ETH_M5"), 146 + KEEMBAY_MUX(0x6, "LCD_M6"), 147 + KEEMBAY_MUX(0x7, "GPIO_M7")), 148 + KEEMBAY_PIN_DESC(1, "GPIO1", 149 + KEEMBAY_MUX(0x0, "I2S0_M0"), 150 + KEEMBAY_MUX(0x1, "SD0_M1"), 151 + KEEMBAY_MUX(0x2, "SLVDS0_M2"), 152 + KEEMBAY_MUX(0x3, "I2C0_M3"), 153 + KEEMBAY_MUX(0x4, "CAM_M4"), 154 + KEEMBAY_MUX(0x5, "ETH_M5"), 155 + KEEMBAY_MUX(0x6, "LCD_M6"), 156 + KEEMBAY_MUX(0x7, "GPIO_M7")), 157 + KEEMBAY_PIN_DESC(2, "GPIO2", 158 + KEEMBAY_MUX(0x0, "I2S0_M0"), 159 + KEEMBAY_MUX(0x1, "I2S0_M1"), 160 + KEEMBAY_MUX(0x2, "SLVDS0_M2"), 161 + KEEMBAY_MUX(0x3, "I2C1_M3"), 162 + KEEMBAY_MUX(0x4, "CAM_M4"), 163 + KEEMBAY_MUX(0x5, "ETH_M5"), 164 + KEEMBAY_MUX(0x6, "LCD_M6"), 165 + KEEMBAY_MUX(0x7, "GPIO_M7")), 166 + KEEMBAY_PIN_DESC(3, "GPIO3", 167 + KEEMBAY_MUX(0x0, "I2S0_M0"), 168 + KEEMBAY_MUX(0x1, "I2S0_M1"), 169 + KEEMBAY_MUX(0x2, "SLVDS0_M2"), 170 + KEEMBAY_MUX(0x3, "I2C1_M3"), 171 + KEEMBAY_MUX(0x4, "CAM_M4"), 172 + KEEMBAY_MUX(0x5, "ETH_M5"), 173 + KEEMBAY_MUX(0x6, "LCD_M6"), 174 + KEEMBAY_MUX(0x7, "GPIO_M7")), 175 + KEEMBAY_PIN_DESC(4, "GPIO4", 176 + KEEMBAY_MUX(0x0, "I2S0_M0"), 177 + KEEMBAY_MUX(0x1, "I2S0_M1"), 178 + KEEMBAY_MUX(0x2, "SLVDS0_M2"), 179 + KEEMBAY_MUX(0x3, "I2C2_M3"), 180 + KEEMBAY_MUX(0x4, "CAM_M4"), 181 + KEEMBAY_MUX(0x5, "ETH_M5"), 182 + KEEMBAY_MUX(0x6, "LCD_M6"), 183 + KEEMBAY_MUX(0x7, "GPIO_M7")), 184 + KEEMBAY_PIN_DESC(5, "GPIO5", 185 + KEEMBAY_MUX(0x0, "I2S0_M0"), 186 + KEEMBAY_MUX(0x1, "I2S0_M1"), 187 + KEEMBAY_MUX(0x2, "SLVDS0_M2"), 188 + KEEMBAY_MUX(0x3, "I2C2_M3"), 189 + KEEMBAY_MUX(0x4, "CAM_M4"), 190 + KEEMBAY_MUX(0x5, "ETH_M5"), 191 + KEEMBAY_MUX(0x6, "LCD_M6"), 192 + KEEMBAY_MUX(0x7, "GPIO_M7")), 193 + KEEMBAY_PIN_DESC(6, "GPIO6", 194 + KEEMBAY_MUX(0x0, "I2S1_M0"), 195 + KEEMBAY_MUX(0x1, "SD0_M1"), 196 + KEEMBAY_MUX(0x2, "SLVDS0_M2"), 197 + KEEMBAY_MUX(0x3, "I2C3_M3"), 198 + KEEMBAY_MUX(0x4, "CAM_M4"), 199 + KEEMBAY_MUX(0x5, "ETH_M5"), 200 + KEEMBAY_MUX(0x6, "LCD_M6"), 201 + KEEMBAY_MUX(0x7, "GPIO_M7")), 202 + KEEMBAY_PIN_DESC(7, "GPIO7", 203 + KEEMBAY_MUX(0x0, "I2S1_M0"), 204 + KEEMBAY_MUX(0x1, "SD0_M1"), 205 + KEEMBAY_MUX(0x2, "SLVDS0_M2"), 206 + KEEMBAY_MUX(0x3, "I2C3_M3"), 207 + KEEMBAY_MUX(0x4, "CAM_M4"), 208 + KEEMBAY_MUX(0x5, "ETH_M5"), 209 + KEEMBAY_MUX(0x6, "LCD_M6"), 210 + KEEMBAY_MUX(0x7, "GPIO_M7")), 211 + KEEMBAY_PIN_DESC(8, "GPIO8", 212 + KEEMBAY_MUX(0x0, "I2S1_M0"), 213 + KEEMBAY_MUX(0x1, "I2S1_M1"), 214 + KEEMBAY_MUX(0x2, "SLVDS0_M2"), 215 + KEEMBAY_MUX(0x3, "UART0_M3"), 216 + KEEMBAY_MUX(0x4, "CAM_M4"), 217 + KEEMBAY_MUX(0x5, "ETH_M5"), 218 + KEEMBAY_MUX(0x6, "LCD_M6"), 219 + KEEMBAY_MUX(0x7, "GPIO_M7")), 220 + KEEMBAY_PIN_DESC(9, "GPIO9", 221 + KEEMBAY_MUX(0x0, "I2S1_M0"), 222 + KEEMBAY_MUX(0x1, "I2S1_M1"), 223 + KEEMBAY_MUX(0x2, "PWM_M2"), 224 + KEEMBAY_MUX(0x3, "UART0_M3"), 225 + KEEMBAY_MUX(0x4, "CAM_M4"), 226 + KEEMBAY_MUX(0x5, "ETH_M5"), 227 + KEEMBAY_MUX(0x6, "LCD_M6"), 228 + KEEMBAY_MUX(0x7, "GPIO_M7")), 229 + KEEMBAY_PIN_DESC(10, "GPIO10", 230 + KEEMBAY_MUX(0x0, "I2S2_M0"), 231 + KEEMBAY_MUX(0x1, "SD0_M1"), 232 + KEEMBAY_MUX(0x2, "PWM_M2"), 233 + KEEMBAY_MUX(0x3, "UART0_M3"), 234 + KEEMBAY_MUX(0x4, "CAM_M4"), 235 + KEEMBAY_MUX(0x5, "ETH_M5"), 236 + KEEMBAY_MUX(0x6, "LCD_M6"), 237 + KEEMBAY_MUX(0x7, "GPIO_M7")), 238 + KEEMBAY_PIN_DESC(11, "GPIO11", 239 + KEEMBAY_MUX(0x0, "I2S2_M0"), 240 + KEEMBAY_MUX(0x1, "SD0_M1"), 241 + KEEMBAY_MUX(0x2, "PWM_M2"), 242 + KEEMBAY_MUX(0x3, "UART0_M3"), 243 + KEEMBAY_MUX(0x4, "CAM_M4"), 244 + KEEMBAY_MUX(0x5, "ETH_M5"), 245 + KEEMBAY_MUX(0x6, "LCD_M6"), 246 + KEEMBAY_MUX(0x7, "GPIO_M7")), 247 + KEEMBAY_PIN_DESC(12, "GPIO12", 248 + KEEMBAY_MUX(0x0, "I2S2_M0"), 249 + KEEMBAY_MUX(0x1, "I2S2_M1"), 250 + KEEMBAY_MUX(0x2, "PWM_M2"), 251 + KEEMBAY_MUX(0x3, "SPI0_M3"), 252 + KEEMBAY_MUX(0x4, "CAM_M4"), 253 + KEEMBAY_MUX(0x5, "ETH_M5"), 254 + KEEMBAY_MUX(0x6, "LCD_M6"), 255 + KEEMBAY_MUX(0x7, "GPIO_M7")), 256 + KEEMBAY_PIN_DESC(13, "GPIO13", 257 + KEEMBAY_MUX(0x0, "I2S2_M0"), 258 + KEEMBAY_MUX(0x1, "I2S2_M1"), 259 + KEEMBAY_MUX(0x2, "PWM_M2"), 260 + KEEMBAY_MUX(0x3, "SPI0_M3"), 261 + KEEMBAY_MUX(0x4, "CAM_M4"), 262 + KEEMBAY_MUX(0x5, "ETH_M5"), 263 + KEEMBAY_MUX(0x6, "LCD_M6"), 264 + KEEMBAY_MUX(0x7, "GPIO_M7")), 265 + KEEMBAY_PIN_DESC(14, "GPIO14", 266 + KEEMBAY_MUX(0x0, "UART0_M0"), 267 + KEEMBAY_MUX(0x1, "I2S3_M1"), 268 + KEEMBAY_MUX(0x2, "PWM_M2"), 269 + KEEMBAY_MUX(0x3, "SD1_M3"), 270 + KEEMBAY_MUX(0x4, "CAM_M4"), 271 + KEEMBAY_MUX(0x5, "ETH_M5"), 272 + KEEMBAY_MUX(0x6, "LCD_M6"), 273 + KEEMBAY_MUX(0x7, "GPIO_M7")), 274 + KEEMBAY_PIN_DESC(15, "GPIO15", 275 + KEEMBAY_MUX(0x0, "UART0_M0"), 276 + KEEMBAY_MUX(0x1, "I2S3_M1"), 277 + KEEMBAY_MUX(0x2, "UART0_M2"), 278 + KEEMBAY_MUX(0x3, "SD1_M3"), 279 + KEEMBAY_MUX(0x4, "CAM_M4"), 280 + KEEMBAY_MUX(0x5, "SPI1_M5"), 281 + KEEMBAY_MUX(0x6, "LCD_M6"), 282 + KEEMBAY_MUX(0x7, "GPIO_M7")), 283 + KEEMBAY_PIN_DESC(16, "GPIO16", 284 + KEEMBAY_MUX(0x0, "UART0_M0"), 285 + KEEMBAY_MUX(0x1, "I2S3_M1"), 286 + KEEMBAY_MUX(0x2, "UART0_M2"), 287 + KEEMBAY_MUX(0x3, "SD1_M3"), 288 + KEEMBAY_MUX(0x4, "CAM_M4"), 289 + KEEMBAY_MUX(0x5, "SPI1_M5"), 290 + KEEMBAY_MUX(0x6, "LCD_M6"), 291 + KEEMBAY_MUX(0x7, "GPIO_M7")), 292 + KEEMBAY_PIN_DESC(17, "GPIO17", 293 + KEEMBAY_MUX(0x0, "UART0_M0"), 294 + KEEMBAY_MUX(0x1, "I2S3_M1"), 295 + KEEMBAY_MUX(0x2, "I2S3_M2"), 296 + KEEMBAY_MUX(0x3, "SD1_M3"), 297 + KEEMBAY_MUX(0x4, "CAM_M4"), 298 + KEEMBAY_MUX(0x5, "SPI1_M5"), 299 + KEEMBAY_MUX(0x6, "LCD_M6"), 300 + KEEMBAY_MUX(0x7, "GPIO_M7")), 301 + KEEMBAY_PIN_DESC(18, "GPIO18", 302 + KEEMBAY_MUX(0x0, "UART1_M0"), 303 + KEEMBAY_MUX(0x1, "SPI0_M1"), 304 + KEEMBAY_MUX(0x2, "I2S3_M2"), 305 + KEEMBAY_MUX(0x3, "SD1_M3"), 306 + KEEMBAY_MUX(0x4, "CAM_M4"), 307 + KEEMBAY_MUX(0x5, "SPI1_M5"), 308 + KEEMBAY_MUX(0x6, "LCD_M6"), 309 + KEEMBAY_MUX(0x7, "GPIO_M7")), 310 + KEEMBAY_PIN_DESC(19, "GPIO19", 311 + KEEMBAY_MUX(0x0, "UART1_M0"), 312 + KEEMBAY_MUX(0x1, "LCD_M1"), 313 + KEEMBAY_MUX(0x2, "DEBUG_M2"), 314 + KEEMBAY_MUX(0x3, "SD1_M3"), 315 + KEEMBAY_MUX(0x4, "CAM_M4"), 316 + KEEMBAY_MUX(0x5, "SPI1_M5"), 317 + KEEMBAY_MUX(0x6, "LCD_M6"), 318 + KEEMBAY_MUX(0x7, "GPIO_M7")), 319 + KEEMBAY_PIN_DESC(20, "GPIO20", 320 + KEEMBAY_MUX(0x0, "UART1_M0"), 321 + KEEMBAY_MUX(0x1, "LCD_M1"), 322 + KEEMBAY_MUX(0x2, "DEBUG_M2"), 323 + KEEMBAY_MUX(0x3, "CPR_M3"), 324 + KEEMBAY_MUX(0x4, "CAM_M4"), 325 + KEEMBAY_MUX(0x5, "SPI1_M5"), 326 + KEEMBAY_MUX(0x6, "SLVDS0_M6"), 327 + KEEMBAY_MUX(0x7, "GPIO_M7")), 328 + KEEMBAY_PIN_DESC(21, "GPIO21", 329 + KEEMBAY_MUX(0x0, "UART1_M0"), 330 + KEEMBAY_MUX(0x1, "LCD_M1"), 331 + KEEMBAY_MUX(0x2, "DEBUG_M2"), 332 + KEEMBAY_MUX(0x3, "CPR_M3"), 333 + KEEMBAY_MUX(0x4, "CAM_M4"), 334 + KEEMBAY_MUX(0x5, "I3C0_M5"), 335 + KEEMBAY_MUX(0x6, "SLVDS0_M6"), 336 + KEEMBAY_MUX(0x7, "GPIO_M7")), 337 + KEEMBAY_PIN_DESC(22, "GPIO22", 338 + KEEMBAY_MUX(0x0, "I2C0_M0"), 339 + KEEMBAY_MUX(0x1, "UART2_M1"), 340 + KEEMBAY_MUX(0x2, "DEBUG_M2"), 341 + KEEMBAY_MUX(0x3, "CPR_M3"), 342 + KEEMBAY_MUX(0x4, "CAM_M4"), 343 + KEEMBAY_MUX(0x5, "I3C0_M5"), 344 + KEEMBAY_MUX(0x6, "SLVDS0_M6"), 345 + KEEMBAY_MUX(0x7, "GPIO_M7")), 346 + KEEMBAY_PIN_DESC(23, "GPIO23", 347 + KEEMBAY_MUX(0x0, "I2C0_M0"), 348 + KEEMBAY_MUX(0x1, "UART2_M1"), 349 + KEEMBAY_MUX(0x2, "DEBUG_M2"), 350 + KEEMBAY_MUX(0x3, "CPR_M3"), 351 + KEEMBAY_MUX(0x4, "CAM_M4"), 352 + KEEMBAY_MUX(0x5, "I3C1_M5"), 353 + KEEMBAY_MUX(0x6, "SLVDS0_M6"), 354 + KEEMBAY_MUX(0x7, "GPIO_M7")), 355 + KEEMBAY_PIN_DESC(24, "GPIO24", 356 + KEEMBAY_MUX(0x0, "I2C1_M0"), 357 + KEEMBAY_MUX(0x1, "UART2_M1"), 358 + KEEMBAY_MUX(0x2, "DEBUG_M2"), 359 + KEEMBAY_MUX(0x3, "CPR_M3"), 360 + KEEMBAY_MUX(0x4, "CAM_M4"), 361 + KEEMBAY_MUX(0x5, "I3C1_M5"), 362 + KEEMBAY_MUX(0x6, "SLVDS0_M6"), 363 + KEEMBAY_MUX(0x7, "GPIO_M7")), 364 + KEEMBAY_PIN_DESC(25, "GPIO25", 365 + KEEMBAY_MUX(0x0, "I2C1_M0"), 366 + KEEMBAY_MUX(0x1, "UART2_M1"), 367 + KEEMBAY_MUX(0x2, "SPI0_M2"), 368 + KEEMBAY_MUX(0x3, "CPR_M3"), 369 + KEEMBAY_MUX(0x4, "CAM_M4"), 370 + KEEMBAY_MUX(0x5, "I3C2_M5"), 371 + KEEMBAY_MUX(0x6, "SLVDS0_M6"), 372 + KEEMBAY_MUX(0x7, "GPIO_M7")), 373 + KEEMBAY_PIN_DESC(26, "GPIO26", 374 + KEEMBAY_MUX(0x0, "SPI0_M0"), 375 + KEEMBAY_MUX(0x1, "I2C2_M1"), 376 + KEEMBAY_MUX(0x2, "UART0_M2"), 377 + KEEMBAY_MUX(0x3, "DSU_M3"), 378 + KEEMBAY_MUX(0x4, "CAM_M4"), 379 + KEEMBAY_MUX(0x5, "I3C2_M5"), 380 + KEEMBAY_MUX(0x6, "SLVDS0_M6"), 381 + KEEMBAY_MUX(0x7, "GPIO_M7")), 382 + KEEMBAY_PIN_DESC(27, "GPIO27", 383 + KEEMBAY_MUX(0x0, "SPI0_M0"), 384 + KEEMBAY_MUX(0x1, "I2C2_M1"), 385 + KEEMBAY_MUX(0x2, "UART0_M2"), 386 + KEEMBAY_MUX(0x3, "DSU_M3"), 387 + KEEMBAY_MUX(0x4, "CAM_M4"), 388 + KEEMBAY_MUX(0x5, "I3C0_M5"), 389 + KEEMBAY_MUX(0x6, "SLVDS0_M6"), 390 + KEEMBAY_MUX(0x7, "GPIO_M7")), 391 + KEEMBAY_PIN_DESC(28, "GPIO28", 392 + KEEMBAY_MUX(0x0, "SPI0_M0"), 393 + KEEMBAY_MUX(0x1, "I2C3_M1"), 394 + KEEMBAY_MUX(0x2, "UART0_M2"), 395 + KEEMBAY_MUX(0x3, "PWM_M3"), 396 + KEEMBAY_MUX(0x4, "CAM_M4"), 397 + KEEMBAY_MUX(0x5, "I3C1_M5"), 398 + KEEMBAY_MUX(0x6, "SLVDS0_M6"), 399 + KEEMBAY_MUX(0x7, "GPIO_M7")), 400 + KEEMBAY_PIN_DESC(29, "GPIO29", 401 + KEEMBAY_MUX(0x0, "SPI0_M0"), 402 + KEEMBAY_MUX(0x1, "I2C3_M1"), 403 + KEEMBAY_MUX(0x2, "UART0_M2"), 404 + KEEMBAY_MUX(0x3, "PWM_M3"), 405 + KEEMBAY_MUX(0x4, "CAM_M4"), 406 + KEEMBAY_MUX(0x5, "I3C2_M5"), 407 + KEEMBAY_MUX(0x6, "SLVDS1_M6"), 408 + KEEMBAY_MUX(0x7, "GPIO_M7")), 409 + KEEMBAY_PIN_DESC(30, "GPIO30", 410 + KEEMBAY_MUX(0x0, "SPI0_M0"), 411 + KEEMBAY_MUX(0x1, "I2S0_M1"), 412 + KEEMBAY_MUX(0x2, "I2C4_M2"), 413 + KEEMBAY_MUX(0x3, "PWM_M3"), 414 + KEEMBAY_MUX(0x4, "CAM_M4"), 415 + KEEMBAY_MUX(0x5, "LCD_M5"), 416 + KEEMBAY_MUX(0x6, "SLVDS1_M6"), 417 + KEEMBAY_MUX(0x7, "GPIO_M7")), 418 + KEEMBAY_PIN_DESC(31, "GPIO31", 419 + KEEMBAY_MUX(0x0, "SPI0_M0"), 420 + KEEMBAY_MUX(0x1, "I2S0_M1"), 421 + KEEMBAY_MUX(0x2, "I2C4_M2"), 422 + KEEMBAY_MUX(0x3, "PWM_M3"), 423 + KEEMBAY_MUX(0x4, "CAM_M4"), 424 + KEEMBAY_MUX(0x5, "UART1_M5"), 425 + KEEMBAY_MUX(0x6, "SLVDS1_M6"), 426 + KEEMBAY_MUX(0x7, "GPIO_M7")), 427 + KEEMBAY_PIN_DESC(32, "GPIO32", 428 + KEEMBAY_MUX(0x0, "SD0_M0"), 429 + KEEMBAY_MUX(0x1, "SPI0_M1"), 430 + KEEMBAY_MUX(0x2, "UART1_M2"), 431 + KEEMBAY_MUX(0x3, "PWM_M3"), 432 + KEEMBAY_MUX(0x4, "CAM_M4"), 433 + KEEMBAY_MUX(0x5, "PCIE_M5"), 434 + KEEMBAY_MUX(0x6, "SLVDS1_M6"), 435 + KEEMBAY_MUX(0x7, "GPIO_M7")), 436 + KEEMBAY_PIN_DESC(33, "GPIO33", 437 + KEEMBAY_MUX(0x0, "SD0_M0"), 438 + KEEMBAY_MUX(0x1, "SPI0_M1"), 439 + KEEMBAY_MUX(0x2, "UART1_M2"), 440 + KEEMBAY_MUX(0x3, "PWM_M3"), 441 + KEEMBAY_MUX(0x4, "CAM_M4"), 442 + KEEMBAY_MUX(0x5, "PCIE_M5"), 443 + KEEMBAY_MUX(0x6, "SLVDS1_M6"), 444 + KEEMBAY_MUX(0x7, "GPIO_M7")), 445 + KEEMBAY_PIN_DESC(34, "GPIO34", 446 + KEEMBAY_MUX(0x0, "SD0_M0"), 447 + KEEMBAY_MUX(0x1, "SPI0_M1"), 448 + KEEMBAY_MUX(0x2, "I2C0_M2"), 449 + KEEMBAY_MUX(0x3, "UART1_M3"), 450 + KEEMBAY_MUX(0x4, "CAM_M4"), 451 + KEEMBAY_MUX(0x5, "I2S0_M5"), 452 + KEEMBAY_MUX(0x6, "SLVDS1_M6"), 453 + KEEMBAY_MUX(0x7, "GPIO_M7")), 454 + KEEMBAY_PIN_DESC(35, "GPIO35", 455 + KEEMBAY_MUX(0x0, "SD0_M0"), 456 + KEEMBAY_MUX(0x1, "PCIE_M1"), 457 + KEEMBAY_MUX(0x2, "I2C0_M2"), 458 + KEEMBAY_MUX(0x3, "UART1_M3"), 459 + KEEMBAY_MUX(0x4, "CAM_M4"), 460 + KEEMBAY_MUX(0x5, "I2S0_M5"), 461 + KEEMBAY_MUX(0x6, "SLVDS1_M6"), 462 + KEEMBAY_MUX(0x7, "GPIO_M7")), 463 + KEEMBAY_PIN_DESC(36, "GPIO36", 464 + KEEMBAY_MUX(0x0, "SD0_M0"), 465 + KEEMBAY_MUX(0x1, "SPI3_M1"), 466 + KEEMBAY_MUX(0x2, "I2C1_M2"), 467 + KEEMBAY_MUX(0x3, "DEBUG_M3"), 468 + KEEMBAY_MUX(0x4, "CAM_M4"), 469 + KEEMBAY_MUX(0x5, "I2S0_M5"), 470 + KEEMBAY_MUX(0x6, "SLVDS1_M6"), 471 + KEEMBAY_MUX(0x7, "GPIO_M7")), 472 + KEEMBAY_PIN_DESC(37, "GPIO37", 473 + KEEMBAY_MUX(0x0, "SD0_M0"), 474 + KEEMBAY_MUX(0x1, "SPI3_M1"), 475 + KEEMBAY_MUX(0x2, "I2C1_M2"), 476 + KEEMBAY_MUX(0x3, "DEBUG_M3"), 477 + KEEMBAY_MUX(0x4, "CAM_M4"), 478 + KEEMBAY_MUX(0x5, "I2S0_M5"), 479 + KEEMBAY_MUX(0x6, "SLVDS1_M6"), 480 + KEEMBAY_MUX(0x7, "GPIO_M7")), 481 + KEEMBAY_PIN_DESC(38, "GPIO38", 482 + KEEMBAY_MUX(0x0, "I3C1_M0"), 483 + KEEMBAY_MUX(0x1, "SPI3_M1"), 484 + KEEMBAY_MUX(0x2, "UART3_M2"), 485 + KEEMBAY_MUX(0x3, "DEBUG_M3"), 486 + KEEMBAY_MUX(0x4, "CAM_M4"), 487 + KEEMBAY_MUX(0x5, "LCD_M5"), 488 + KEEMBAY_MUX(0x6, "I2C2_M6"), 489 + KEEMBAY_MUX(0x7, "GPIO_M7")), 490 + KEEMBAY_PIN_DESC(39, "GPIO39", 491 + KEEMBAY_MUX(0x0, "I3C1_M0"), 492 + KEEMBAY_MUX(0x1, "SPI3_M1"), 493 + KEEMBAY_MUX(0x2, "UART3_M2"), 494 + KEEMBAY_MUX(0x3, "DEBUG_M3"), 495 + KEEMBAY_MUX(0x4, "CAM_M4"), 496 + KEEMBAY_MUX(0x5, "LCD_M5"), 497 + KEEMBAY_MUX(0x6, "I2C2_M6"), 498 + KEEMBAY_MUX(0x7, "GPIO_M7")), 499 + KEEMBAY_PIN_DESC(40, "GPIO40", 500 + KEEMBAY_MUX(0x0, "I2S2_M0"), 501 + KEEMBAY_MUX(0x1, "SPI3_M1"), 502 + KEEMBAY_MUX(0x2, "UART3_M2"), 503 + KEEMBAY_MUX(0x3, "DEBUG_M3"), 504 + KEEMBAY_MUX(0x4, "CAM_M4"), 505 + KEEMBAY_MUX(0x5, "LCD_M5"), 506 + KEEMBAY_MUX(0x6, "I2C3_M6"), 507 + KEEMBAY_MUX(0x7, "GPIO_M7")), 508 + KEEMBAY_PIN_DESC(41, "GPIO41", 509 + KEEMBAY_MUX(0x0, "ETH_M0"), 510 + KEEMBAY_MUX(0x1, "SPI3_M1"), 511 + KEEMBAY_MUX(0x2, "SPI3_M2"), 512 + KEEMBAY_MUX(0x3, "DEBUG_M3"), 513 + KEEMBAY_MUX(0x4, "CAM_M4"), 514 + KEEMBAY_MUX(0x5, "LCD_M5"), 515 + KEEMBAY_MUX(0x6, "I2C3_M6"), 516 + KEEMBAY_MUX(0x7, "GPIO_M7")), 517 + KEEMBAY_PIN_DESC(42, "GPIO42", 518 + KEEMBAY_MUX(0x0, "ETH_M0"), 519 + KEEMBAY_MUX(0x1, "SD1_M1"), 520 + KEEMBAY_MUX(0x2, "SPI3_M2"), 521 + KEEMBAY_MUX(0x3, "CPR_M3"), 522 + KEEMBAY_MUX(0x4, "CAM_M4"), 523 + KEEMBAY_MUX(0x5, "LCD_M5"), 524 + KEEMBAY_MUX(0x6, "I2C4_M6"), 525 + KEEMBAY_MUX(0x7, "GPIO_M7")), 526 + KEEMBAY_PIN_DESC(43, "GPIO43", 527 + KEEMBAY_MUX(0x0, "ETH_M0"), 528 + KEEMBAY_MUX(0x1, "SD1_M1"), 529 + KEEMBAY_MUX(0x2, "SPI3_M2"), 530 + KEEMBAY_MUX(0x3, "CPR_M3"), 531 + KEEMBAY_MUX(0x4, "I2S0_M4"), 532 + KEEMBAY_MUX(0x5, "LCD_M5"), 533 + KEEMBAY_MUX(0x6, "I2C4_M6"), 534 + KEEMBAY_MUX(0x7, "GPIO_M7")), 535 + KEEMBAY_PIN_DESC(44, "GPIO44", 536 + KEEMBAY_MUX(0x0, "ETH_M0"), 537 + KEEMBAY_MUX(0x1, "SD1_M1"), 538 + KEEMBAY_MUX(0x2, "SPI0_M2"), 539 + KEEMBAY_MUX(0x3, "CPR_M3"), 540 + KEEMBAY_MUX(0x4, "I2S0_M4"), 541 + KEEMBAY_MUX(0x5, "LCD_M5"), 542 + KEEMBAY_MUX(0x6, "CAM_M6"), 543 + KEEMBAY_MUX(0x7, "GPIO_M7")), 544 + KEEMBAY_PIN_DESC(45, "GPIO45", 545 + KEEMBAY_MUX(0x0, "ETH_M0"), 546 + KEEMBAY_MUX(0x1, "SD1_M1"), 547 + KEEMBAY_MUX(0x2, "SPI0_M2"), 548 + KEEMBAY_MUX(0x3, "CPR_M3"), 549 + KEEMBAY_MUX(0x4, "I2S0_M4"), 550 + KEEMBAY_MUX(0x5, "LCD_M5"), 551 + KEEMBAY_MUX(0x6, "CAM_M6"), 552 + KEEMBAY_MUX(0x7, "GPIO_M7")), 553 + KEEMBAY_PIN_DESC(46, "GPIO46", 554 + KEEMBAY_MUX(0x0, "ETH_M0"), 555 + KEEMBAY_MUX(0x1, "SD1_M1"), 556 + KEEMBAY_MUX(0x2, "SPI0_M2"), 557 + KEEMBAY_MUX(0x3, "TPIU_M3"), 558 + KEEMBAY_MUX(0x4, "I2S0_M4"), 559 + KEEMBAY_MUX(0x5, "LCD_M5"), 560 + KEEMBAY_MUX(0x6, "CAM_M6"), 561 + KEEMBAY_MUX(0x7, "GPIO_M7")), 562 + KEEMBAY_PIN_DESC(47, "GPIO47", 563 + KEEMBAY_MUX(0x0, "ETH_M0"), 564 + KEEMBAY_MUX(0x1, "SD1_M1"), 565 + KEEMBAY_MUX(0x2, "SPI0_M2"), 566 + KEEMBAY_MUX(0x3, "TPIU_M3"), 567 + KEEMBAY_MUX(0x4, "I2S0_M4"), 568 + KEEMBAY_MUX(0x5, "LCD_M5"), 569 + KEEMBAY_MUX(0x6, "CAM_M6"), 570 + KEEMBAY_MUX(0x7, "GPIO_M7")), 571 + KEEMBAY_PIN_DESC(48, "GPIO48", 572 + KEEMBAY_MUX(0x0, "ETH_M0"), 573 + KEEMBAY_MUX(0x1, "SPI2_M1"), 574 + KEEMBAY_MUX(0x2, "UART2_M2"), 575 + KEEMBAY_MUX(0x3, "TPIU_M3"), 576 + KEEMBAY_MUX(0x4, "I2S0_M4"), 577 + KEEMBAY_MUX(0x5, "LCD_M5"), 578 + KEEMBAY_MUX(0x6, "CAM_M6"), 579 + KEEMBAY_MUX(0x7, "GPIO_M7")), 580 + KEEMBAY_PIN_DESC(49, "GPIO49", 581 + KEEMBAY_MUX(0x0, "ETH_M0"), 582 + KEEMBAY_MUX(0x1, "SPI2_M1"), 583 + KEEMBAY_MUX(0x2, "UART2_M2"), 584 + KEEMBAY_MUX(0x3, "TPIU_M3"), 585 + KEEMBAY_MUX(0x4, "I2S1_M4"), 586 + KEEMBAY_MUX(0x5, "LCD_M5"), 587 + KEEMBAY_MUX(0x6, "CAM_M6"), 588 + KEEMBAY_MUX(0x7, "GPIO_M7")), 589 + KEEMBAY_PIN_DESC(50, "GPIO50", 590 + KEEMBAY_MUX(0x0, "ETH_M0"), 591 + KEEMBAY_MUX(0x1, "SPI2_M1"), 592 + KEEMBAY_MUX(0x2, "UART2_M2"), 593 + KEEMBAY_MUX(0x3, "TPIU_M3"), 594 + KEEMBAY_MUX(0x4, "I2S1_M4"), 595 + KEEMBAY_MUX(0x5, "LCD_M5"), 596 + KEEMBAY_MUX(0x6, "CAM_M6"), 597 + KEEMBAY_MUX(0x7, "GPIO_M7")), 598 + KEEMBAY_PIN_DESC(51, "GPIO51", 599 + KEEMBAY_MUX(0x0, "ETH_M0"), 600 + KEEMBAY_MUX(0x1, "SPI2_M1"), 601 + KEEMBAY_MUX(0x2, "UART2_M2"), 602 + KEEMBAY_MUX(0x3, "TPIU_M3"), 603 + KEEMBAY_MUX(0x4, "I2S1_M4"), 604 + KEEMBAY_MUX(0x5, "LCD_M5"), 605 + KEEMBAY_MUX(0x6, "CAM_M6"), 606 + KEEMBAY_MUX(0x7, "GPIO_M7")), 607 + KEEMBAY_PIN_DESC(52, "GPIO52", 608 + KEEMBAY_MUX(0x0, "ETH_M0"), 609 + KEEMBAY_MUX(0x1, "SPI2_M1"), 610 + KEEMBAY_MUX(0x2, "SD0_M2"), 611 + KEEMBAY_MUX(0x3, "TPIU_M3"), 612 + KEEMBAY_MUX(0x4, "I2S1_M4"), 613 + KEEMBAY_MUX(0x5, "LCD_M5"), 614 + KEEMBAY_MUX(0x6, "CAM_M6"), 615 + KEEMBAY_MUX(0x7, "GPIO_M7")), 616 + KEEMBAY_PIN_DESC(53, "GPIO53", 617 + KEEMBAY_MUX(0x0, "ETH_M0"), 618 + KEEMBAY_MUX(0x1, "SPI2_M1"), 619 + KEEMBAY_MUX(0x2, "SD0_M2"), 620 + KEEMBAY_MUX(0x3, "TPIU_M3"), 621 + KEEMBAY_MUX(0x4, "I2S2_M4"), 622 + KEEMBAY_MUX(0x5, "LCD_M5"), 623 + KEEMBAY_MUX(0x6, "CAM_M6"), 624 + KEEMBAY_MUX(0x7, "GPIO_M7")), 625 + KEEMBAY_PIN_DESC(54, "GPIO54", 626 + KEEMBAY_MUX(0x0, "ETH_M0"), 627 + KEEMBAY_MUX(0x1, "SPI2_M1"), 628 + KEEMBAY_MUX(0x2, "SD0_M2"), 629 + KEEMBAY_MUX(0x3, "TPIU_M3"), 630 + KEEMBAY_MUX(0x4, "I2S2_M4"), 631 + KEEMBAY_MUX(0x5, "LCD_M5"), 632 + KEEMBAY_MUX(0x6, "CAM_M6"), 633 + KEEMBAY_MUX(0x7, "GPIO_M7")), 634 + KEEMBAY_PIN_DESC(55, "GPIO55", 635 + KEEMBAY_MUX(0x0, "ETH_M0"), 636 + KEEMBAY_MUX(0x1, "SPI2_M1"), 637 + KEEMBAY_MUX(0x2, "SD1_M2"), 638 + KEEMBAY_MUX(0x3, "TPIU_M3"), 639 + KEEMBAY_MUX(0x4, "I2S2_M4"), 640 + KEEMBAY_MUX(0x5, "LCD_M5"), 641 + KEEMBAY_MUX(0x6, "CAM_M6"), 642 + KEEMBAY_MUX(0x7, "GPIO_M7")), 643 + KEEMBAY_PIN_DESC(56, "GPIO56", 644 + KEEMBAY_MUX(0x0, "ETH_M0"), 645 + KEEMBAY_MUX(0x1, "SPI2_M1"), 646 + KEEMBAY_MUX(0x2, "SD1_M2"), 647 + KEEMBAY_MUX(0x3, "TPIU_M3"), 648 + KEEMBAY_MUX(0x4, "I2S2_M4"), 649 + KEEMBAY_MUX(0x5, "LCD_M5"), 650 + KEEMBAY_MUX(0x6, "CAM_M6"), 651 + KEEMBAY_MUX(0x7, "GPIO_M7")), 652 + KEEMBAY_PIN_DESC(57, "GPIO57", 653 + KEEMBAY_MUX(0x0, "SPI1_M0"), 654 + KEEMBAY_MUX(0x1, "I2S1_M1"), 655 + KEEMBAY_MUX(0x2, "SD1_M2"), 656 + KEEMBAY_MUX(0x3, "TPIU_M3"), 657 + KEEMBAY_MUX(0x4, "UART0_M4"), 658 + KEEMBAY_MUX(0x5, "LCD_M5"), 659 + KEEMBAY_MUX(0x6, "CAM_M6"), 660 + KEEMBAY_MUX(0x7, "GPIO_M7")), 661 + KEEMBAY_PIN_DESC(58, "GPIO58", 662 + KEEMBAY_MUX(0x0, "SPI1_M0"), 663 + KEEMBAY_MUX(0x1, "ETH_M1"), 664 + KEEMBAY_MUX(0x2, "SD0_M2"), 665 + KEEMBAY_MUX(0x3, "TPIU_M3"), 666 + KEEMBAY_MUX(0x4, "UART0_M4"), 667 + KEEMBAY_MUX(0x5, "LCD_M5"), 668 + KEEMBAY_MUX(0x6, "CAM_M6"), 669 + KEEMBAY_MUX(0x7, "GPIO_M7")), 670 + KEEMBAY_PIN_DESC(59, "GPIO59", 671 + KEEMBAY_MUX(0x0, "SPI1_M0"), 672 + KEEMBAY_MUX(0x1, "ETH_M1"), 673 + KEEMBAY_MUX(0x2, "SD0_M2"), 674 + KEEMBAY_MUX(0x3, "TPIU_M3"), 675 + KEEMBAY_MUX(0x4, "UART0_M4"), 676 + KEEMBAY_MUX(0x5, "LCD_M5"), 677 + KEEMBAY_MUX(0x6, "CAM_M6"), 678 + KEEMBAY_MUX(0x7, "GPIO_M7")), 679 + KEEMBAY_PIN_DESC(60, "GPIO60", 680 + KEEMBAY_MUX(0x0, "SPI1_M0"), 681 + KEEMBAY_MUX(0x1, "ETH_M1"), 682 + KEEMBAY_MUX(0x2, "I3C1_M2"), 683 + KEEMBAY_MUX(0x3, "TPIU_M3"), 684 + KEEMBAY_MUX(0x4, "UART0_M4"), 685 + KEEMBAY_MUX(0x5, "LCD_M5"), 686 + KEEMBAY_MUX(0x6, "CAM_M6"), 687 + KEEMBAY_MUX(0x7, "GPIO_M7")), 688 + KEEMBAY_PIN_DESC(61, "GPIO61", 689 + KEEMBAY_MUX(0x0, "SPI1_M0"), 690 + KEEMBAY_MUX(0x1, "ETH_M1"), 691 + KEEMBAY_MUX(0x2, "SD0_M2"), 692 + KEEMBAY_MUX(0x3, "TPIU_M3"), 693 + KEEMBAY_MUX(0x4, "UART1_M4"), 694 + KEEMBAY_MUX(0x5, "LCD_M5"), 695 + KEEMBAY_MUX(0x6, "CAM_M6"), 696 + KEEMBAY_MUX(0x7, "GPIO_M7")), 697 + KEEMBAY_PIN_DESC(62, "GPIO62", 698 + KEEMBAY_MUX(0x0, "SPI1_M0"), 699 + KEEMBAY_MUX(0x1, "ETH_M1"), 700 + KEEMBAY_MUX(0x2, "SD1_M2"), 701 + KEEMBAY_MUX(0x3, "TPIU_M3"), 702 + KEEMBAY_MUX(0x4, "UART1_M4"), 703 + KEEMBAY_MUX(0x5, "LCD_M5"), 704 + KEEMBAY_MUX(0x6, "CAM_M6"), 705 + KEEMBAY_MUX(0x7, "GPIO_M7")), 706 + KEEMBAY_PIN_DESC(63, "GPIO63", 707 + KEEMBAY_MUX(0x0, "I2S1_M0"), 708 + KEEMBAY_MUX(0x1, "SPI1_M1"), 709 + KEEMBAY_MUX(0x2, "SD1_M2"), 710 + KEEMBAY_MUX(0x3, "TPIU_M3"), 711 + KEEMBAY_MUX(0x4, "UART1_M4"), 712 + KEEMBAY_MUX(0x5, "LCD_M5"), 713 + KEEMBAY_MUX(0x6, "CAM_M6"), 714 + KEEMBAY_MUX(0x7, "GPIO_M7")), 715 + KEEMBAY_PIN_DESC(64, "GPIO64", 716 + KEEMBAY_MUX(0x0, "I2S2_M0"), 717 + KEEMBAY_MUX(0x1, "SPI1_M1"), 718 + KEEMBAY_MUX(0x2, "ETH_M2"), 719 + KEEMBAY_MUX(0x3, "TPIU_M3"), 720 + KEEMBAY_MUX(0x4, "UART1_M4"), 721 + KEEMBAY_MUX(0x5, "LCD_M5"), 722 + KEEMBAY_MUX(0x6, "CAM_M6"), 723 + KEEMBAY_MUX(0x7, "GPIO_M7")), 724 + KEEMBAY_PIN_DESC(65, "GPIO65", 725 + KEEMBAY_MUX(0x0, "I3C0_M0"), 726 + KEEMBAY_MUX(0x1, "SPI1_M1"), 727 + KEEMBAY_MUX(0x2, "SD1_M2"), 728 + KEEMBAY_MUX(0x3, "TPIU_M3"), 729 + KEEMBAY_MUX(0x4, "SPI0_M4"), 730 + KEEMBAY_MUX(0x5, "LCD_M5"), 731 + KEEMBAY_MUX(0x6, "CAM_M6"), 732 + KEEMBAY_MUX(0x7, "GPIO_M7")), 733 + KEEMBAY_PIN_DESC(66, "GPIO66", 734 + KEEMBAY_MUX(0x0, "I3C0_M0"), 735 + KEEMBAY_MUX(0x1, "ETH_M1"), 736 + KEEMBAY_MUX(0x2, "I2C0_M2"), 737 + KEEMBAY_MUX(0x3, "TPIU_M3"), 738 + KEEMBAY_MUX(0x4, "SPI0_M4"), 739 + KEEMBAY_MUX(0x5, "LCD_M5"), 740 + KEEMBAY_MUX(0x6, "CAM_M6"), 741 + KEEMBAY_MUX(0x7, "GPIO_M7")), 742 + KEEMBAY_PIN_DESC(67, "GPIO67", 743 + KEEMBAY_MUX(0x0, "I3C1_M0"), 744 + KEEMBAY_MUX(0x1, "ETH_M1"), 745 + KEEMBAY_MUX(0x2, "I2C0_M2"), 746 + KEEMBAY_MUX(0x3, "TPIU_M3"), 747 + KEEMBAY_MUX(0x4, "SPI0_M4"), 748 + KEEMBAY_MUX(0x5, "LCD_M5"), 749 + KEEMBAY_MUX(0x6, "I2S3_M6"), 750 + KEEMBAY_MUX(0x7, "GPIO_M7")), 751 + KEEMBAY_PIN_DESC(68, "GPIO68", 752 + KEEMBAY_MUX(0x0, "I3C1_M0"), 753 + KEEMBAY_MUX(0x1, "ETH_M1"), 754 + KEEMBAY_MUX(0x2, "I2C1_M2"), 755 + KEEMBAY_MUX(0x3, "TPIU_M3"), 756 + KEEMBAY_MUX(0x4, "SPI0_M4"), 757 + KEEMBAY_MUX(0x5, "LCD_M5"), 758 + KEEMBAY_MUX(0x6, "I2S3_M6"), 759 + KEEMBAY_MUX(0x7, "GPIO_M7")), 760 + KEEMBAY_PIN_DESC(69, "GPIO69", 761 + KEEMBAY_MUX(0x0, "I3C2_M0"), 762 + KEEMBAY_MUX(0x1, "ETH_M1"), 763 + KEEMBAY_MUX(0x2, "I2C1_M2"), 764 + KEEMBAY_MUX(0x3, "TPIU_M3"), 765 + KEEMBAY_MUX(0x4, "SPI0_M4"), 766 + KEEMBAY_MUX(0x5, "LCD_M5"), 767 + KEEMBAY_MUX(0x6, "I2S3_M6"), 768 + KEEMBAY_MUX(0x7, "GPIO_M7")), 769 + KEEMBAY_PIN_DESC(70, "GPIO70", 770 + KEEMBAY_MUX(0x0, "I3C2_M0"), 771 + KEEMBAY_MUX(0x1, "ETH_M1"), 772 + KEEMBAY_MUX(0x2, "SPI0_M2"), 773 + KEEMBAY_MUX(0x3, "TPIU_M3"), 774 + KEEMBAY_MUX(0x4, "SD0_M4"), 775 + KEEMBAY_MUX(0x5, "LCD_M5"), 776 + KEEMBAY_MUX(0x6, "I2S3_M6"), 777 + KEEMBAY_MUX(0x7, "GPIO_M7")), 778 + KEEMBAY_PIN_DESC(71, "GPIO71", 779 + KEEMBAY_MUX(0x0, "I3C0_M0"), 780 + KEEMBAY_MUX(0x1, "ETH_M1"), 781 + KEEMBAY_MUX(0x2, "SLVDS1_M2"), 782 + KEEMBAY_MUX(0x3, "TPIU_M3"), 783 + KEEMBAY_MUX(0x4, "SD0_M4"), 784 + KEEMBAY_MUX(0x5, "LCD_M5"), 785 + KEEMBAY_MUX(0x6, "I2S3_M6"), 786 + KEEMBAY_MUX(0x7, "GPIO_M7")), 787 + KEEMBAY_PIN_DESC(72, "GPIO72", 788 + KEEMBAY_MUX(0x0, "I3C1_M0"), 789 + KEEMBAY_MUX(0x1, "ETH_M1"), 790 + KEEMBAY_MUX(0x2, "SLVDS1_M2"), 791 + KEEMBAY_MUX(0x3, "TPIU_M3"), 792 + KEEMBAY_MUX(0x4, "SD0_M4"), 793 + KEEMBAY_MUX(0x5, "LCD_M5"), 794 + KEEMBAY_MUX(0x6, "UART2_M6"), 795 + KEEMBAY_MUX(0x7, "GPIO_M7")), 796 + KEEMBAY_PIN_DESC(73, "GPIO73", 797 + KEEMBAY_MUX(0x0, "I3C2_M0"), 798 + KEEMBAY_MUX(0x1, "ETH_M1"), 799 + KEEMBAY_MUX(0x2, "SLVDS1_M2"), 800 + KEEMBAY_MUX(0x3, "TPIU_M3"), 801 + KEEMBAY_MUX(0x4, "SD0_M4"), 802 + KEEMBAY_MUX(0x5, "LCD_M5"), 803 + KEEMBAY_MUX(0x6, "UART2_M6"), 804 + KEEMBAY_MUX(0x7, "GPIO_M7")), 805 + KEEMBAY_PIN_DESC(74, "GPIO74", 806 + KEEMBAY_MUX(0x0, "I3C0_M0"), 807 + KEEMBAY_MUX(0x1, "ETH_M1"), 808 + KEEMBAY_MUX(0x2, "SLVDS1_M2"), 809 + KEEMBAY_MUX(0x3, "TPIU_M3"), 810 + KEEMBAY_MUX(0x4, "SD0_M4"), 811 + KEEMBAY_MUX(0x5, "LCD_M5"), 812 + KEEMBAY_MUX(0x6, "UART2_M6"), 813 + KEEMBAY_MUX(0x7, "GPIO_M7")), 814 + KEEMBAY_PIN_DESC(75, "GPIO75", 815 + KEEMBAY_MUX(0x0, "I3C0_M0"), 816 + KEEMBAY_MUX(0x1, "ETH_M1"), 817 + KEEMBAY_MUX(0x2, "SLVDS1_M2"), 818 + KEEMBAY_MUX(0x3, "TPIU_M3"), 819 + KEEMBAY_MUX(0x4, "SD0_M4"), 820 + KEEMBAY_MUX(0x5, "LCD_M5"), 821 + KEEMBAY_MUX(0x6, "UART2_M6"), 822 + KEEMBAY_MUX(0x7, "GPIO_M7")), 823 + KEEMBAY_PIN_DESC(76, "GPIO76", 824 + KEEMBAY_MUX(0x0, "I2C2_M0"), 825 + KEEMBAY_MUX(0x1, "I3C0_M1"), 826 + KEEMBAY_MUX(0x2, "SLVDS1_M2"), 827 + KEEMBAY_MUX(0x3, "TPIU_M3"), 828 + KEEMBAY_MUX(0x4, "ETH_M4"), 829 + KEEMBAY_MUX(0x5, "LCD_M5"), 830 + KEEMBAY_MUX(0x6, "UART3_M6"), 831 + KEEMBAY_MUX(0x7, "GPIO_M7")), 832 + KEEMBAY_PIN_DESC(77, "GPIO77", 833 + KEEMBAY_MUX(0x0, "PCIE_M0"), 834 + KEEMBAY_MUX(0x1, "I3C1_M1"), 835 + KEEMBAY_MUX(0x2, "SLVDS1_M2"), 836 + KEEMBAY_MUX(0x3, "TPIU_M3"), 837 + KEEMBAY_MUX(0x4, "I3C2_M4"), 838 + KEEMBAY_MUX(0x5, "LCD_M5"), 839 + KEEMBAY_MUX(0x6, "UART3_M6"), 840 + KEEMBAY_MUX(0x7, "GPIO_M7")), 841 + KEEMBAY_PIN_DESC(78, "GPIO78", 842 + KEEMBAY_MUX(0x0, "PCIE_M0"), 843 + KEEMBAY_MUX(0x1, "I3C2_M1"), 844 + KEEMBAY_MUX(0x2, "SLVDS1_M2"), 845 + KEEMBAY_MUX(0x3, "TPIU_M3"), 846 + KEEMBAY_MUX(0x4, "I3C2_M4"), 847 + KEEMBAY_MUX(0x5, "LCD_M5"), 848 + KEEMBAY_MUX(0x6, "UART3_M6"), 849 + KEEMBAY_MUX(0x7, "GPIO_M7")), 850 + KEEMBAY_PIN_DESC(79, "GPIO79", 851 + KEEMBAY_MUX(0x0, "PCIE_M0"), 852 + KEEMBAY_MUX(0x1, "I2C2_M1"), 853 + KEEMBAY_MUX(0x2, "SLVDS1_M2"), 854 + KEEMBAY_MUX(0x3, "TPIU_M3"), 855 + KEEMBAY_MUX(0x4, "I3C2_M4"), 856 + KEEMBAY_MUX(0x5, "LCD_M5"), 857 + KEEMBAY_MUX(0x6, "UART3_M6"), 858 + KEEMBAY_MUX(0x7, "GPIO_M7")), 859 + }; 860 + 861 + static inline u32 keembay_read_reg(void __iomem *base, unsigned int pin) 862 + { 863 + return readl(base + KEEMBAY_GPIO_REG_OFFSET(pin)); 864 + } 865 + 866 + static inline u32 keembay_read_gpio_reg(void __iomem *base, unsigned int pin) 867 + { 868 + return keembay_read_reg(base, pin / KEEMBAY_GPIO_MAX_PER_REG); 869 + } 870 + 871 + static inline u32 keembay_read_pin(void __iomem *base, unsigned int pin) 872 + { 873 + u32 val = keembay_read_gpio_reg(base, pin); 874 + 875 + return !!(val & BIT(pin % KEEMBAY_GPIO_MAX_PER_REG)); 876 + } 877 + 878 + static inline void keembay_write_reg(u32 val, void __iomem *base, unsigned int pin) 879 + { 880 + writel(val, base + KEEMBAY_GPIO_REG_OFFSET(pin)); 881 + } 882 + 883 + static inline void keembay_write_gpio_reg(u32 val, void __iomem *base, unsigned int pin) 884 + { 885 + keembay_write_reg(val, base, pin / KEEMBAY_GPIO_MAX_PER_REG); 886 + } 887 + 888 + static void keembay_gpio_invert(struct keembay_pinctrl *kpc, unsigned int pin) 889 + { 890 + unsigned int val = keembay_read_reg(kpc->base1 + KEEMBAY_GPIO_MODE, pin); 891 + 892 + /* 893 + * This IP doesn't support the falling edge and low level interrupt 894 + * trigger. Invert API is used to mimic the falling edge and low 895 + * level support 896 + */ 897 + 898 + val |= FIELD_PREP(KEEMBAY_GPIO_MODE_INV_MASK, KEEMBAY_GPIO_MODE_INV_VAL); 899 + keembay_write_reg(val, kpc->base1 + KEEMBAY_GPIO_MODE, pin); 900 + } 901 + 902 + static void keembay_gpio_restore_default(struct keembay_pinctrl *kpc, unsigned int pin) 903 + { 904 + unsigned int val = keembay_read_reg(kpc->base1 + KEEMBAY_GPIO_MODE, pin); 905 + 906 + val &= FIELD_PREP(KEEMBAY_GPIO_MODE_INV_MASK, 0); 907 + keembay_write_reg(val, kpc->base1 + KEEMBAY_GPIO_MODE, pin); 908 + } 909 + 910 + static int keembay_request_gpio(struct pinctrl_dev *pctldev, 911 + struct pinctrl_gpio_range *range, unsigned int pin) 912 + { 913 + struct keembay_pinctrl *kpc = pinctrl_dev_get_drvdata(pctldev); 914 + unsigned int val; 915 + 916 + if (pin >= kpc->npins) 917 + return -EINVAL; 918 + 919 + val = keembay_read_reg(kpc->base1 + KEEMBAY_GPIO_MODE, pin); 920 + val = FIELD_GET(KEEMBAY_GPIO_MODE_SELECT_MASK, val); 921 + 922 + /* As per Pin Mux Map, Modes 0 to 6 are for peripherals */ 923 + if (val != KEEMBAY_GPIO_MODE_DEFAULT) 924 + return -EBUSY; 925 + 926 + return 0; 927 + } 928 + 929 + static int keembay_set_mux(struct pinctrl_dev *pctldev, unsigned int fun_sel, 930 + unsigned int grp_sel) 931 + { 932 + struct keembay_pinctrl *kpc = pinctrl_dev_get_drvdata(pctldev); 933 + struct function_desc *func; 934 + struct group_desc *grp; 935 + unsigned int val; 936 + u8 pin_mode; 937 + int pin; 938 + 939 + grp = pinctrl_generic_get_group(pctldev, grp_sel); 940 + if (!grp) 941 + return -EINVAL; 942 + 943 + func = pinmux_generic_get_function(pctldev, fun_sel); 944 + if (!func) 945 + return -EINVAL; 946 + 947 + /* Change modes for pins in the selected group */ 948 + pin = *grp->pins; 949 + pin_mode = *(u8 *)(func->data); 950 + 951 + val = keembay_read_reg(kpc->base1 + KEEMBAY_GPIO_MODE, pin); 952 + val = u32_replace_bits(val, pin_mode, KEEMBAY_GPIO_MODE_SELECT_MASK); 953 + keembay_write_reg(val, kpc->base1 + KEEMBAY_GPIO_MODE, pin); 954 + 955 + return 0; 956 + } 957 + 958 + static u32 keembay_pinconf_get_pull(struct keembay_pinctrl *kpc, unsigned int pin) 959 + { 960 + unsigned int val = keembay_read_reg(kpc->base1 + KEEMBAY_GPIO_MODE, pin); 961 + 962 + return FIELD_GET(KEEMBAY_GPIO_MODE_PULLUP_MASK, val); 963 + } 964 + 965 + static int keembay_pinconf_set_pull(struct keembay_pinctrl *kpc, unsigned int pin, 966 + unsigned int pull) 967 + { 968 + unsigned int val = keembay_read_reg(kpc->base1 + KEEMBAY_GPIO_MODE, pin); 969 + 970 + val = u32_replace_bits(val, pull, KEEMBAY_GPIO_MODE_PULLUP_MASK); 971 + keembay_write_reg(val, kpc->base1 + KEEMBAY_GPIO_MODE, pin); 972 + 973 + return 0; 974 + } 975 + 976 + static int keembay_pinconf_get_drive(struct keembay_pinctrl *kpc, unsigned int pin) 977 + { 978 + unsigned int val = keembay_read_reg(kpc->base1 + KEEMBAY_GPIO_MODE, pin); 979 + 980 + val = FIELD_GET(KEEMBAY_GPIO_MODE_DRIVE_MASK, val) * 4; 981 + if (val) 982 + return val; 983 + 984 + return KEEMBAY_GPIO_MIN_STRENGTH; 985 + } 986 + 987 + static int keembay_pinconf_set_drive(struct keembay_pinctrl *kpc, unsigned int pin, 988 + unsigned int drive) 989 + { 990 + unsigned int val = keembay_read_reg(kpc->base1 + KEEMBAY_GPIO_MODE, pin); 991 + unsigned int strength = clamp_val(drive, KEEMBAY_GPIO_MIN_STRENGTH, 992 + KEEMBAY_GPIO_MAX_STRENGTH) / 4; 993 + 994 + val = u32_replace_bits(val, strength, KEEMBAY_GPIO_MODE_DRIVE_MASK); 995 + keembay_write_reg(val, kpc->base1 + KEEMBAY_GPIO_MODE, pin); 996 + 997 + return 0; 998 + } 999 + 1000 + static int keembay_pinconf_get_slew_rate(struct keembay_pinctrl *kpc, unsigned int pin) 1001 + { 1002 + unsigned int val = keembay_read_reg(kpc->base1 + KEEMBAY_GPIO_MODE, pin); 1003 + 1004 + return !!(val & KEEMBAY_GPIO_MODE_SLEW_RATE); 1005 + } 1006 + 1007 + static int keembay_pinconf_set_slew_rate(struct keembay_pinctrl *kpc, unsigned int pin, 1008 + unsigned int slew_rate) 1009 + { 1010 + unsigned int val = keembay_read_reg(kpc->base1 + KEEMBAY_GPIO_MODE, pin); 1011 + 1012 + if (slew_rate) 1013 + val |= KEEMBAY_GPIO_MODE_SLEW_RATE; 1014 + else 1015 + val &= ~KEEMBAY_GPIO_MODE_SLEW_RATE; 1016 + 1017 + keembay_write_reg(val, kpc->base1 + KEEMBAY_GPIO_MODE, pin); 1018 + 1019 + return 0; 1020 + } 1021 + 1022 + static int keembay_pinconf_get_schmitt(struct keembay_pinctrl *kpc, unsigned int pin) 1023 + { 1024 + unsigned int val = keembay_read_reg(kpc->base1 + KEEMBAY_GPIO_MODE, pin); 1025 + 1026 + return !!(val & KEEMBAY_GPIO_MODE_SCHMITT_EN); 1027 + } 1028 + 1029 + static int keembay_pinconf_set_schmitt(struct keembay_pinctrl *kpc, unsigned int pin, 1030 + unsigned int schmitt_en) 1031 + { 1032 + unsigned int val = keembay_read_reg(kpc->base1 + KEEMBAY_GPIO_MODE, pin); 1033 + 1034 + if (schmitt_en) 1035 + val |= KEEMBAY_GPIO_MODE_SCHMITT_EN; 1036 + else 1037 + val &= ~KEEMBAY_GPIO_MODE_SCHMITT_EN; 1038 + 1039 + keembay_write_reg(val, kpc->base1 + KEEMBAY_GPIO_MODE, pin); 1040 + 1041 + return 0; 1042 + } 1043 + 1044 + static int keembay_pinconf_get(struct pinctrl_dev *pctldev, unsigned int pin, 1045 + unsigned long *cfg) 1046 + { 1047 + struct keembay_pinctrl *kpc = pinctrl_dev_get_drvdata(pctldev); 1048 + unsigned int param = pinconf_to_config_param(*cfg); 1049 + unsigned int val; 1050 + 1051 + if (pin >= kpc->npins) 1052 + return -EINVAL; 1053 + 1054 + switch (param) { 1055 + case PIN_CONFIG_BIAS_DISABLE: 1056 + if (keembay_pinconf_get_pull(kpc, pin) != KEEMBAY_GPIO_DISABLE) 1057 + return -EINVAL; 1058 + break; 1059 + 1060 + case PIN_CONFIG_BIAS_PULL_UP: 1061 + if (keembay_pinconf_get_pull(kpc, pin) != KEEMBAY_GPIO_PULL_UP) 1062 + return -EINVAL; 1063 + break; 1064 + 1065 + case PIN_CONFIG_BIAS_PULL_DOWN: 1066 + if (keembay_pinconf_get_pull(kpc, pin) != KEEMBAY_GPIO_PULL_DOWN) 1067 + return -EINVAL; 1068 + break; 1069 + 1070 + case PIN_CONFIG_BIAS_BUS_HOLD: 1071 + if (keembay_pinconf_get_pull(kpc, pin) != KEEMBAY_GPIO_BUS_HOLD) 1072 + return -EINVAL; 1073 + break; 1074 + 1075 + case PIN_CONFIG_INPUT_SCHMITT_ENABLE: 1076 + if (!keembay_pinconf_get_schmitt(kpc, pin)) 1077 + return -EINVAL; 1078 + break; 1079 + 1080 + case PIN_CONFIG_SLEW_RATE: 1081 + val = keembay_pinconf_get_slew_rate(kpc, pin); 1082 + *cfg = pinconf_to_config_packed(param, val); 1083 + break; 1084 + 1085 + case PIN_CONFIG_DRIVE_STRENGTH: 1086 + val = keembay_pinconf_get_drive(kpc, pin); 1087 + *cfg = pinconf_to_config_packed(param, val); 1088 + break; 1089 + 1090 + default: 1091 + return -ENOTSUPP; 1092 + } 1093 + 1094 + return 0; 1095 + } 1096 + 1097 + static int keembay_pinconf_set(struct pinctrl_dev *pctldev, unsigned int pin, 1098 + unsigned long *cfg, unsigned int num_configs) 1099 + { 1100 + struct keembay_pinctrl *kpc = pinctrl_dev_get_drvdata(pctldev); 1101 + enum pin_config_param param; 1102 + unsigned int arg, i; 1103 + int ret = 0; 1104 + 1105 + if (pin >= kpc->npins) 1106 + return -EINVAL; 1107 + 1108 + for (i = 0; i < num_configs; i++) { 1109 + param = pinconf_to_config_param(cfg[i]); 1110 + arg = pinconf_to_config_argument(cfg[i]); 1111 + 1112 + switch (param) { 1113 + case PIN_CONFIG_BIAS_DISABLE: 1114 + ret = keembay_pinconf_set_pull(kpc, pin, KEEMBAY_GPIO_DISABLE); 1115 + break; 1116 + 1117 + case PIN_CONFIG_BIAS_PULL_UP: 1118 + ret = keembay_pinconf_set_pull(kpc, pin, KEEMBAY_GPIO_PULL_UP); 1119 + break; 1120 + 1121 + case PIN_CONFIG_BIAS_PULL_DOWN: 1122 + ret = keembay_pinconf_set_pull(kpc, pin, KEEMBAY_GPIO_PULL_DOWN); 1123 + break; 1124 + 1125 + case PIN_CONFIG_BIAS_BUS_HOLD: 1126 + ret = keembay_pinconf_set_pull(kpc, pin, KEEMBAY_GPIO_BUS_HOLD); 1127 + break; 1128 + 1129 + case PIN_CONFIG_INPUT_SCHMITT_ENABLE: 1130 + ret = keembay_pinconf_set_schmitt(kpc, pin, arg); 1131 + break; 1132 + 1133 + case PIN_CONFIG_SLEW_RATE: 1134 + ret = keembay_pinconf_set_slew_rate(kpc, pin, arg); 1135 + break; 1136 + 1137 + case PIN_CONFIG_DRIVE_STRENGTH: 1138 + ret = keembay_pinconf_set_drive(kpc, pin, arg); 1139 + break; 1140 + 1141 + default: 1142 + return -ENOTSUPP; 1143 + } 1144 + if (ret) 1145 + return ret; 1146 + } 1147 + return ret; 1148 + } 1149 + 1150 + static const struct pinctrl_ops keembay_pctlops = { 1151 + .get_groups_count = pinctrl_generic_get_group_count, 1152 + .get_group_name = pinctrl_generic_get_group_name, 1153 + .get_group_pins = pinctrl_generic_get_group_pins, 1154 + .dt_node_to_map = pinconf_generic_dt_node_to_map_all, 1155 + .dt_free_map = pinconf_generic_dt_free_map, 1156 + }; 1157 + 1158 + static const struct pinmux_ops keembay_pmxops = { 1159 + .get_functions_count = pinmux_generic_get_function_count, 1160 + .get_function_name = pinmux_generic_get_function_name, 1161 + .get_function_groups = pinmux_generic_get_function_groups, 1162 + .gpio_request_enable = keembay_request_gpio, 1163 + .set_mux = keembay_set_mux, 1164 + }; 1165 + 1166 + static const struct pinconf_ops keembay_confops = { 1167 + .is_generic = true, 1168 + .pin_config_get = keembay_pinconf_get, 1169 + .pin_config_set = keembay_pinconf_set, 1170 + }; 1171 + 1172 + static struct pinctrl_desc keembay_pinctrl_desc = { 1173 + .name = "keembay-pinmux", 1174 + .pctlops = &keembay_pctlops, 1175 + .pmxops = &keembay_pmxops, 1176 + .confops = &keembay_confops, 1177 + .owner = THIS_MODULE, 1178 + }; 1179 + 1180 + static int keembay_gpio_get(struct gpio_chip *gc, unsigned int pin) 1181 + { 1182 + struct keembay_pinctrl *kpc = gpiochip_get_data(gc); 1183 + unsigned int val, offset; 1184 + 1185 + val = keembay_read_reg(kpc->base1 + KEEMBAY_GPIO_MODE, pin); 1186 + offset = (val & KEEMBAY_GPIO_MODE_DIR) ? KEEMBAY_GPIO_DATA_IN : KEEMBAY_GPIO_DATA_OUT; 1187 + 1188 + return keembay_read_pin(kpc->base0 + offset, pin); 1189 + } 1190 + 1191 + static void keembay_gpio_set(struct gpio_chip *gc, unsigned int pin, int val) 1192 + { 1193 + struct keembay_pinctrl *kpc = gpiochip_get_data(gc); 1194 + unsigned int reg_val; 1195 + 1196 + reg_val = keembay_read_gpio_reg(kpc->base0 + KEEMBAY_GPIO_DATA_OUT, pin); 1197 + if (val) 1198 + keembay_write_gpio_reg(reg_val | BIT(pin % KEEMBAY_GPIO_MAX_PER_REG), 1199 + kpc->base0 + KEEMBAY_GPIO_DATA_HIGH, pin); 1200 + else 1201 + keembay_write_gpio_reg(~reg_val | BIT(pin % KEEMBAY_GPIO_MAX_PER_REG), 1202 + kpc->base0 + KEEMBAY_GPIO_DATA_LOW, pin); 1203 + } 1204 + 1205 + static int keembay_gpio_get_direction(struct gpio_chip *gc, unsigned int pin) 1206 + { 1207 + struct keembay_pinctrl *kpc = gpiochip_get_data(gc); 1208 + unsigned int val = keembay_read_reg(kpc->base1 + KEEMBAY_GPIO_MODE, pin); 1209 + 1210 + return !!(val & KEEMBAY_GPIO_MODE_DIR); 1211 + } 1212 + 1213 + static int keembay_gpio_set_direction_in(struct gpio_chip *gc, unsigned int pin) 1214 + { 1215 + struct keembay_pinctrl *kpc = gpiochip_get_data(gc); 1216 + unsigned int val; 1217 + 1218 + val = keembay_read_reg(kpc->base1 + KEEMBAY_GPIO_MODE, pin); 1219 + val |= KEEMBAY_GPIO_MODE_DIR; 1220 + keembay_write_reg(val, kpc->base1 + KEEMBAY_GPIO_MODE, pin); 1221 + 1222 + return 0; 1223 + } 1224 + 1225 + static int keembay_gpio_set_direction_out(struct gpio_chip *gc, 1226 + unsigned int pin, int value) 1227 + { 1228 + struct keembay_pinctrl *kpc = gpiochip_get_data(gc); 1229 + unsigned int val; 1230 + 1231 + val = keembay_read_reg(kpc->base1 + KEEMBAY_GPIO_MODE, pin); 1232 + val &= ~KEEMBAY_GPIO_MODE_DIR; 1233 + keembay_write_reg(val, kpc->base1 + KEEMBAY_GPIO_MODE, pin); 1234 + keembay_gpio_set(gc, pin, value); 1235 + 1236 + return 0; 1237 + } 1238 + 1239 + static void keembay_gpio_irq_handler(struct irq_desc *desc) 1240 + { 1241 + struct gpio_chip *gc = irq_desc_get_handler_data(desc); 1242 + unsigned int kmb_irq = irq_desc_get_irq(desc); 1243 + unsigned long reg, clump = 0, bit = 0; 1244 + struct irq_chip *parent_chip; 1245 + struct keembay_pinctrl *kpc; 1246 + unsigned int src, pin, val; 1247 + 1248 + /* Identify GPIO interrupt number from GIC interrupt number */ 1249 + for (src = 0; src < KEEMBAY_GPIO_NUM_IRQ; src++) { 1250 + if (kmb_irq == gc->irq.parents[src]) 1251 + break; 1252 + } 1253 + 1254 + if (src == KEEMBAY_GPIO_NUM_IRQ) 1255 + return; 1256 + 1257 + parent_chip = irq_desc_get_chip(desc); 1258 + kpc = gpiochip_get_data(gc); 1259 + 1260 + chained_irq_enter(parent_chip, desc); 1261 + reg = keembay_read_reg(kpc->base1 + KEEMBAY_GPIO_INT_CFG, src); 1262 + 1263 + /* 1264 + * Each Interrupt line can be shared by up to 4 GPIO pins. Enable bit 1265 + * and input values were checked to identify the source of the 1266 + * Interrupt. The checked enable bit positions are 7, 15, 23 and 31. 1267 + */ 1268 + for_each_set_clump8(bit, clump, &reg, BITS_PER_TYPE(typeof(reg))) { 1269 + pin = clump & ~KEEMBAY_GPIO_IRQ_ENABLE; 1270 + val = keembay_read_pin(kpc->base0 + KEEMBAY_GPIO_DATA_IN, pin); 1271 + kmb_irq = irq_linear_revmap(gc->irq.domain, pin); 1272 + 1273 + /* Checks if the interrupt is enabled */ 1274 + if (val && (clump & KEEMBAY_GPIO_IRQ_ENABLE)) 1275 + generic_handle_irq(kmb_irq); 1276 + } 1277 + chained_irq_exit(parent_chip, desc); 1278 + } 1279 + 1280 + static void keembay_gpio_clear_irq(struct irq_data *data, unsigned long pos, 1281 + u32 src, irq_hw_number_t pin) 1282 + { 1283 + struct gpio_chip *gc = irq_data_get_irq_chip_data(data); 1284 + struct keembay_pinctrl *kpc = gpiochip_get_data(gc); 1285 + unsigned long trig = irqd_get_trigger_type(data); 1286 + struct keembay_gpio_irq *irq = &kpc->irq[src]; 1287 + unsigned long val; 1288 + 1289 + /* Check if the value of pos/KEEMBAY_GPIO_NUM_IRQ is in valid range. */ 1290 + if ((pos / KEEMBAY_GPIO_NUM_IRQ) >= KEEMBAY_GPIO_MAX_PER_IRQ) 1291 + return; 1292 + 1293 + /* Retains val register as it handles other interrupts as well. */ 1294 + val = keembay_read_reg(kpc->base1 + KEEMBAY_GPIO_INT_CFG, src); 1295 + 1296 + bitmap_set_value8(&val, 0, pos); 1297 + keembay_write_reg(val, kpc->base1 + KEEMBAY_GPIO_INT_CFG, src); 1298 + 1299 + irq->num_share--; 1300 + irq->pins[pos / KEEMBAY_GPIO_NUM_IRQ] = 0; 1301 + 1302 + if (trig & IRQ_TYPE_LEVEL_MASK) 1303 + keembay_gpio_restore_default(kpc, pin); 1304 + 1305 + if (irq->trigger == IRQ_TYPE_LEVEL_HIGH) 1306 + kpc->max_gpios_level_type++; 1307 + else if (irq->trigger == IRQ_TYPE_EDGE_RISING) 1308 + kpc->max_gpios_edge_type++; 1309 + } 1310 + 1311 + static int keembay_find_free_slot(struct keembay_pinctrl *kpc, unsigned int src) 1312 + { 1313 + unsigned long val = keembay_read_reg(kpc->base1 + KEEMBAY_GPIO_INT_CFG, src); 1314 + 1315 + return bitmap_find_free_region(&val, KEEMBAY_GPIO_MAX_PER_REG, 3) / KEEMBAY_GPIO_NUM_IRQ; 1316 + } 1317 + 1318 + static int keembay_find_free_src(struct keembay_pinctrl *kpc, unsigned int trig) 1319 + { 1320 + int src, type = 0; 1321 + 1322 + if (trig & IRQ_TYPE_LEVEL_MASK) 1323 + type = IRQ_TYPE_LEVEL_HIGH; 1324 + else if (trig & IRQ_TYPE_EDGE_BOTH) 1325 + type = IRQ_TYPE_EDGE_RISING; 1326 + 1327 + for (src = 0; src < KEEMBAY_GPIO_NUM_IRQ; src++) { 1328 + if (kpc->irq[src].trigger != type) 1329 + continue; 1330 + 1331 + if (!keembay_read_reg(kpc->base1 + KEEMBAY_GPIO_INT_CFG, src) || 1332 + kpc->irq[src].num_share < KEEMBAY_GPIO_MAX_PER_IRQ) 1333 + return src; 1334 + } 1335 + 1336 + return -EBUSY; 1337 + } 1338 + 1339 + static void keembay_gpio_set_irq(struct keembay_pinctrl *kpc, int src, 1340 + int slot, irq_hw_number_t pin) 1341 + { 1342 + unsigned long val = pin | KEEMBAY_GPIO_IRQ_ENABLE; 1343 + struct keembay_gpio_irq *irq = &kpc->irq[src]; 1344 + unsigned long flags, reg; 1345 + 1346 + raw_spin_lock_irqsave(&kpc->lock, flags); 1347 + reg = keembay_read_reg(kpc->base1 + KEEMBAY_GPIO_INT_CFG, src); 1348 + bitmap_set_value8(&reg, val, slot * 8); 1349 + keembay_write_reg(reg, kpc->base1 + KEEMBAY_GPIO_INT_CFG, src); 1350 + raw_spin_unlock_irqrestore(&kpc->lock, flags); 1351 + 1352 + if (irq->trigger == IRQ_TYPE_LEVEL_HIGH) 1353 + kpc->max_gpios_level_type--; 1354 + else if (irq->trigger == IRQ_TYPE_EDGE_RISING) 1355 + kpc->max_gpios_edge_type--; 1356 + 1357 + irq->source = src; 1358 + irq->pins[slot] = pin; 1359 + irq->num_share++; 1360 + } 1361 + 1362 + static void keembay_gpio_irq_enable(struct irq_data *data) 1363 + { 1364 + struct gpio_chip *gc = irq_data_get_irq_chip_data(data); 1365 + struct keembay_pinctrl *kpc = gpiochip_get_data(gc); 1366 + unsigned int trig = irqd_get_trigger_type(data); 1367 + irq_hw_number_t pin = irqd_to_hwirq(data); 1368 + int src, slot; 1369 + 1370 + /* Check which Interrupt source and slot is available */ 1371 + src = keembay_find_free_src(kpc, trig); 1372 + slot = keembay_find_free_slot(kpc, src); 1373 + 1374 + if (src < 0 || slot < 0) 1375 + return; 1376 + 1377 + if (trig & KEEMBAY_GPIO_SENSE_LOW) 1378 + keembay_gpio_invert(kpc, pin); 1379 + 1380 + keembay_gpio_set_irq(kpc, src, slot, pin); 1381 + } 1382 + 1383 + static void keembay_gpio_irq_ack(struct irq_data *data) 1384 + { 1385 + /* 1386 + * The keembay_gpio_irq_ack function is needed to handle_edge_irq. 1387 + * IRQ ack is not possible from the SOC perspective. The IP by itself 1388 + * is used for handling interrupts which do not come in short-time and 1389 + * not used as protocol or communication interrupts. All the interrupts 1390 + * are threaded IRQ interrupts. But this function is expected to be 1391 + * present as the gpio IP is registered with irq framework. Otherwise 1392 + * handle_edge_irq() fails. 1393 + */ 1394 + } 1395 + 1396 + static void keembay_gpio_irq_disable(struct irq_data *data) 1397 + { 1398 + struct gpio_chip *gc = irq_data_get_irq_chip_data(data); 1399 + struct keembay_pinctrl *kpc = gpiochip_get_data(gc); 1400 + irq_hw_number_t pin = irqd_to_hwirq(data); 1401 + unsigned long reg, clump = 0, pos = 0; 1402 + unsigned int src; 1403 + 1404 + for (src = 0; src < KEEMBAY_GPIO_NUM_IRQ; src++) { 1405 + reg = keembay_read_reg(kpc->base1 + KEEMBAY_GPIO_INT_CFG, src); 1406 + for_each_set_clump8(pos, clump, &reg, BITS_PER_TYPE(typeof(reg))) { 1407 + if ((clump & ~KEEMBAY_GPIO_IRQ_ENABLE) == pin) { 1408 + keembay_gpio_clear_irq(data, pos, src, pin); 1409 + return; 1410 + } 1411 + } 1412 + } 1413 + } 1414 + 1415 + static int keembay_gpio_irq_set_type(struct irq_data *data, unsigned int type) 1416 + { 1417 + struct gpio_chip *gc = irq_data_get_irq_chip_data(data); 1418 + struct keembay_pinctrl *kpc = gpiochip_get_data(gc); 1419 + 1420 + /* Change EDGE_BOTH as EDGE_RISING in order to claim the IRQ for power button */ 1421 + if (!kpc->max_gpios_edge_type && (type & IRQ_TYPE_EDGE_BOTH)) 1422 + type = IRQ_TYPE_EDGE_RISING; 1423 + 1424 + if (!kpc->max_gpios_level_type && (type & IRQ_TYPE_LEVEL_MASK)) 1425 + type = IRQ_TYPE_NONE; 1426 + 1427 + if (type & IRQ_TYPE_EDGE_BOTH) 1428 + irq_set_handler_locked(data, handle_edge_irq); 1429 + else if (type & IRQ_TYPE_LEVEL_MASK) 1430 + irq_set_handler_locked(data, handle_level_irq); 1431 + else 1432 + return -EINVAL; 1433 + 1434 + return 0; 1435 + } 1436 + 1437 + static int keembay_gpio_add_pin_ranges(struct gpio_chip *chip) 1438 + { 1439 + struct keembay_pinctrl *kpc = gpiochip_get_data(chip); 1440 + int ret; 1441 + 1442 + ret = gpiochip_add_pin_range(chip, dev_name(kpc->dev), 0, 0, chip->ngpio); 1443 + if (ret) 1444 + dev_err_probe(kpc->dev, ret, "failed to add GPIO pin range\n"); 1445 + return ret; 1446 + } 1447 + 1448 + static struct irq_chip keembay_gpio_irqchip = { 1449 + .name = "keembay-gpio", 1450 + .irq_enable = keembay_gpio_irq_enable, 1451 + .irq_disable = keembay_gpio_irq_disable, 1452 + .irq_set_type = keembay_gpio_irq_set_type, 1453 + .irq_ack = keembay_gpio_irq_ack, 1454 + }; 1455 + 1456 + static int keembay_gpiochip_probe(struct keembay_pinctrl *kpc, 1457 + struct platform_device *pdev) 1458 + { 1459 + unsigned int i, level_line = 0, edge_line = 0; 1460 + struct gpio_chip *gc = &kpc->chip; 1461 + struct gpio_irq_chip *girq; 1462 + 1463 + /* Setup GPIO IRQ chip */ 1464 + girq = &kpc->chip.irq; 1465 + girq->chip = &keembay_gpio_irqchip; 1466 + girq->parent_handler = keembay_gpio_irq_handler; 1467 + girq->num_parents = KEEMBAY_GPIO_NUM_IRQ; 1468 + girq->parents = devm_kcalloc(kpc->dev, girq->num_parents, 1469 + sizeof(*girq->parents), GFP_KERNEL); 1470 + 1471 + if (!girq->parents) 1472 + return -ENOMEM; 1473 + 1474 + /* Setup GPIO chip */ 1475 + gc->label = dev_name(kpc->dev); 1476 + gc->parent = kpc->dev; 1477 + gc->request = gpiochip_generic_request; 1478 + gc->free = gpiochip_generic_free; 1479 + gc->get_direction = keembay_gpio_get_direction; 1480 + gc->direction_input = keembay_gpio_set_direction_in; 1481 + gc->direction_output = keembay_gpio_set_direction_out; 1482 + gc->get = keembay_gpio_get; 1483 + gc->set = keembay_gpio_set; 1484 + gc->set_config = gpiochip_generic_config; 1485 + gc->base = -1; 1486 + gc->ngpio = kpc->npins; 1487 + gc->add_pin_ranges = keembay_gpio_add_pin_ranges; 1488 + 1489 + for (i = 0; i < KEEMBAY_GPIO_NUM_IRQ; i++) { 1490 + struct keembay_gpio_irq *kmb_irq = &kpc->irq[i]; 1491 + int irq; 1492 + 1493 + irq = platform_get_irq_optional(pdev, i); 1494 + if (irq <= 0) 1495 + continue; 1496 + 1497 + girq->parents[i] = irq; 1498 + kmb_irq->line = girq->parents[i]; 1499 + kmb_irq->source = i; 1500 + kmb_irq->trigger = irq_get_trigger_type(girq->parents[i]); 1501 + kmb_irq->num_share = 0; 1502 + 1503 + if (kmb_irq->trigger == IRQ_TYPE_LEVEL_HIGH) 1504 + level_line++; 1505 + else 1506 + edge_line++; 1507 + } 1508 + 1509 + kpc->max_gpios_level_type = level_line * KEEMBAY_GPIO_MAX_PER_IRQ; 1510 + kpc->max_gpios_edge_type = edge_line * KEEMBAY_GPIO_MAX_PER_IRQ; 1511 + 1512 + girq->default_type = IRQ_TYPE_NONE; 1513 + girq->handler = handle_bad_irq; 1514 + 1515 + return devm_gpiochip_add_data(kpc->dev, gc, kpc); 1516 + } 1517 + 1518 + static int keembay_build_groups(struct keembay_pinctrl *kpc) 1519 + { 1520 + struct group_desc *grp; 1521 + unsigned int i; 1522 + 1523 + kpc->ngroups = kpc->npins; 1524 + grp = devm_kcalloc(kpc->dev, kpc->ngroups, sizeof(*grp), GFP_KERNEL); 1525 + if (!grp) 1526 + return -ENOMEM; 1527 + 1528 + /* Each pin is categorised as one group */ 1529 + for (i = 0; i < kpc->ngroups; i++) { 1530 + const struct pinctrl_pin_desc *pdesc = keembay_pins + i; 1531 + struct group_desc *kmb_grp = grp + i; 1532 + 1533 + kmb_grp->name = pdesc->name; 1534 + kmb_grp->pins = (int *)&pdesc->number; 1535 + pinctrl_generic_add_group(kpc->pctrl, kmb_grp->name, 1536 + kmb_grp->pins, 1, NULL); 1537 + } 1538 + 1539 + return 0; 1540 + } 1541 + 1542 + static int keembay_pinctrl_reg(struct keembay_pinctrl *kpc, struct device *dev) 1543 + { 1544 + int ret; 1545 + 1546 + keembay_pinctrl_desc.pins = keembay_pins; 1547 + ret = of_property_read_u32(dev->of_node, "ngpios", &kpc->npins); 1548 + if (ret < 0) 1549 + return ret; 1550 + keembay_pinctrl_desc.npins = kpc->npins; 1551 + 1552 + kpc->pctrl = devm_pinctrl_register(kpc->dev, &keembay_pinctrl_desc, kpc); 1553 + 1554 + return PTR_ERR_OR_ZERO(kpc->pctrl); 1555 + } 1556 + 1557 + static int keembay_add_functions(struct keembay_pinctrl *kpc, 1558 + struct function_desc *function) 1559 + { 1560 + unsigned int i; 1561 + 1562 + /* Assign the groups for each function */ 1563 + for (i = 0; i < kpc->npins; i++) { 1564 + const struct pinctrl_pin_desc *pdesc = keembay_pins + i; 1565 + struct keembay_mux_desc *mux = pdesc->drv_data; 1566 + 1567 + while (mux->name) { 1568 + struct function_desc *func; 1569 + const char **grp; 1570 + size_t grp_size; 1571 + u32 j, grp_num; 1572 + 1573 + for (j = 0; j < kpc->nfuncs; j++) { 1574 + if (!strcmp(mux->name, function[j].name)) 1575 + break; 1576 + } 1577 + 1578 + if (j == kpc->nfuncs) 1579 + return -EINVAL; 1580 + 1581 + func = function + j; 1582 + grp_num = func->num_group_names; 1583 + grp_size = sizeof(*func->group_names); 1584 + 1585 + if (!func->group_names) { 1586 + func->group_names = devm_kcalloc(kpc->dev, 1587 + grp_num, 1588 + grp_size, 1589 + GFP_KERNEL); 1590 + if (!func->group_names) 1591 + return -ENOMEM; 1592 + } 1593 + 1594 + grp = func->group_names; 1595 + while (*grp) 1596 + grp++; 1597 + 1598 + *grp = pdesc->name; 1599 + mux++; 1600 + } 1601 + } 1602 + 1603 + /* Add all functions */ 1604 + for (i = 0; i < kpc->nfuncs; i++) { 1605 + pinmux_generic_add_function(kpc->pctrl, 1606 + function[i].name, 1607 + function[i].group_names, 1608 + function[i].num_group_names, 1609 + function[i].data); 1610 + } 1611 + 1612 + return 0; 1613 + } 1614 + 1615 + static int keembay_build_functions(struct keembay_pinctrl *kpc) 1616 + { 1617 + struct function_desc *keembay_funcs, *new_funcs; 1618 + int i; 1619 + 1620 + /* Allocate total number of functions */ 1621 + kpc->nfuncs = 0; 1622 + keembay_funcs = kcalloc(kpc->npins * 8, sizeof(*keembay_funcs), GFP_KERNEL); 1623 + if (!keembay_funcs) 1624 + return -ENOMEM; 1625 + 1626 + /* Find total number of functions and each's properties */ 1627 + for (i = 0; i < kpc->npins; i++) { 1628 + const struct pinctrl_pin_desc *pdesc = keembay_pins + i; 1629 + struct keembay_mux_desc *mux = pdesc->drv_data; 1630 + 1631 + while (mux->name) { 1632 + struct function_desc *fdesc = keembay_funcs; 1633 + 1634 + while (fdesc->name) { 1635 + if (!strcmp(mux->name, fdesc->name)) { 1636 + fdesc->num_group_names++; 1637 + break; 1638 + } 1639 + 1640 + fdesc++; 1641 + } 1642 + 1643 + if (!fdesc->name) { 1644 + fdesc->name = mux->name; 1645 + fdesc->num_group_names = 1; 1646 + fdesc->data = &mux->mode; 1647 + kpc->nfuncs++; 1648 + } 1649 + 1650 + mux++; 1651 + } 1652 + } 1653 + 1654 + /* Reallocate memory based on actual number of functions */ 1655 + new_funcs = krealloc(keembay_funcs, kpc->nfuncs * sizeof(*new_funcs), GFP_KERNEL); 1656 + if (!new_funcs) { 1657 + kfree(keembay_funcs); 1658 + return -ENOMEM; 1659 + } 1660 + 1661 + return keembay_add_functions(kpc, new_funcs); 1662 + } 1663 + 1664 + static const struct keembay_pin_soc keembay_data = { 1665 + .pins = keembay_pins, 1666 + }; 1667 + 1668 + static const struct of_device_id keembay_pinctrl_match[] = { 1669 + { .compatible = "intel,keembay-pinctrl", .data = &keembay_data }, 1670 + { } 1671 + }; 1672 + MODULE_DEVICE_TABLE(of, keembay_pinctrl_match); 1673 + 1674 + static int keembay_pinctrl_probe(struct platform_device *pdev) 1675 + { 1676 + struct device *dev = &pdev->dev; 1677 + struct keembay_pinctrl *kpc; 1678 + int ret; 1679 + 1680 + kpc = devm_kzalloc(dev, sizeof(*kpc), GFP_KERNEL); 1681 + if (!kpc) 1682 + return -ENOMEM; 1683 + 1684 + kpc->dev = dev; 1685 + kpc->soc = device_get_match_data(dev); 1686 + 1687 + kpc->base0 = devm_platform_ioremap_resource(pdev, 0); 1688 + if (IS_ERR(kpc->base0)) 1689 + return PTR_ERR(kpc->base0); 1690 + 1691 + kpc->base1 = devm_platform_ioremap_resource(pdev, 1); 1692 + if (IS_ERR(kpc->base1)) 1693 + return PTR_ERR(kpc->base1); 1694 + 1695 + raw_spin_lock_init(&kpc->lock); 1696 + 1697 + ret = keembay_pinctrl_reg(kpc, dev); 1698 + if (ret) 1699 + return ret; 1700 + 1701 + ret = keembay_build_groups(kpc); 1702 + if (ret) 1703 + return ret; 1704 + 1705 + ret = keembay_build_functions(kpc); 1706 + if (ret) 1707 + return ret; 1708 + 1709 + ret = keembay_gpiochip_probe(kpc, pdev); 1710 + if (ret) 1711 + return ret; 1712 + 1713 + platform_set_drvdata(pdev, kpc); 1714 + 1715 + return 0; 1716 + } 1717 + 1718 + static struct platform_driver keembay_pinctrl_driver = { 1719 + .probe = keembay_pinctrl_probe, 1720 + .driver = { 1721 + .name = "keembay-pinctrl", 1722 + .of_match_table = keembay_pinctrl_match, 1723 + }, 1724 + }; 1725 + module_platform_driver(keembay_pinctrl_driver); 1726 + 1727 + MODULE_AUTHOR("Muhammad Husaini Zulkifli <muhammad.husaini.zulkifli@intel.com>"); 1728 + MODULE_AUTHOR("Vijayakannan Ayyathurai <vijayakannan.ayyathurai@intel.com>"); 1729 + MODULE_AUTHOR("Lakshmi Sowjanya D <lakshmi.sowjanya.d@intel.com>"); 1730 + MODULE_DESCRIPTION("Intel Keem Bay SoC pinctrl/GPIO driver"); 1731 + MODULE_LICENSE("GPL");
+8 -13
drivers/pinctrl/pinctrl-single.c
··· 1115 1115 { 1116 1116 const char *name = "pinctrl-single,bits"; 1117 1117 struct pcs_func_vals *vals; 1118 - int rows, *pins, found = 0, res = -ENOMEM, i, fsel, gsel; 1118 + int rows, *pins, found = 0, res = -ENOMEM, i, fsel; 1119 1119 int npins_in_row; 1120 1120 struct pcs_function *function = NULL; 1121 1121 ··· 1123 1123 if (rows <= 0) { 1124 1124 dev_err(pcs->dev, "Invalid number of rows: %d\n", rows); 1125 1125 return -EINVAL; 1126 + } 1127 + 1128 + if (PCS_HAS_PINCONF) { 1129 + dev_err(pcs->dev, "pinconf not supported\n"); 1130 + return -ENOTSUPP; 1126 1131 } 1127 1132 1128 1133 npins_in_row = pcs->width / pcs->bits_per_pin; ··· 1217 1212 goto free_pins; 1218 1213 } 1219 1214 1220 - gsel = pinctrl_generic_add_group(pcs->pctl, np->name, pins, found, pcs); 1221 - if (gsel < 0) { 1222 - res = gsel; 1215 + res = pinctrl_generic_add_group(pcs->pctl, np->name, pins, found, pcs); 1216 + if (res < 0) 1223 1217 goto free_function; 1224 - } 1225 1218 1226 1219 (*map)->type = PIN_MAP_TYPE_MUX_GROUP; 1227 1220 (*map)->data.mux.group = np->name; 1228 1221 (*map)->data.mux.function = np->name; 1229 - 1230 - if (PCS_HAS_PINCONF) { 1231 - dev_err(pcs->dev, "pinconf not supported\n"); 1232 - goto free_pingroups; 1233 - } 1234 1222 1235 1223 *num_maps = 1; 1236 1224 mutex_unlock(&pcs->mutex); 1237 1225 1238 1226 return 0; 1239 1227 1240 - free_pingroups: 1241 - pinctrl_generic_remove_group(pcs->pctl, gsel); 1242 - *num_maps = 1; 1243 1228 free_function: 1244 1229 pinmux_generic_remove_function(pcs->pctl, fsel); 1245 1230 free_pins:
+4 -2
drivers/pinctrl/pinctrl-stmfx.c
··· 566 566 u8 pending[NR_GPIO_REGS]; 567 567 u8 src[NR_GPIO_REGS] = {0, 0, 0}; 568 568 unsigned long n, status; 569 - int ret; 569 + int i, ret; 570 570 571 571 ret = regmap_bulk_read(pctl->stmfx->map, STMFX_REG_IRQ_GPI_PENDING, 572 572 &pending, NR_GPIO_REGS); ··· 576 576 regmap_bulk_write(pctl->stmfx->map, STMFX_REG_IRQ_GPI_SRC, 577 577 src, NR_GPIO_REGS); 578 578 579 - status = *(unsigned long *)pending; 579 + BUILD_BUG_ON(NR_GPIO_REGS > sizeof(status)); 580 + for (i = 0, status = 0; i < NR_GPIO_REGS; i++) 581 + status |= (unsigned long)pending[i] << (i * 8); 580 582 for_each_set_bit(n, &status, gc->ngpio) { 581 583 handle_nested_irq(irq_find_mapping(gc->irq.domain, n)); 582 584 stmfx_pinctrl_irq_toggle_trigger(pctl, n);
+2
drivers/pinctrl/pinctrl-zynq.c
··· 1028 1028 break; 1029 1029 } 1030 1030 case PIN_CONFIG_IOSTANDARD: 1031 + case PIN_CONFIG_POWER_SOURCE: 1031 1032 arg = zynq_pinconf_iostd_get(reg); 1032 1033 break; 1033 1034 default: ··· 1079 1078 1080 1079 break; 1081 1080 case PIN_CONFIG_IOSTANDARD: 1081 + case PIN_CONFIG_POWER_SOURCE: 1082 1082 if (arg <= zynq_iostd_min || arg >= zynq_iostd_max) { 1083 1083 dev_warn(pctldev->dev, 1084 1084 "unsupported IO standard '%u'\n",
-10
drivers/pinctrl/pinctrl-zynqmp.c
··· 866 866 return ret; 867 867 } 868 868 869 - static int zynqmp_pinctrl_remove(struct platform_device *pdev) 870 - { 871 - struct zynqmp_pinctrl *pctrl = platform_get_drvdata(pdev); 872 - 873 - pinctrl_unregister(pctrl->pctrl); 874 - 875 - return 0; 876 - } 877 - 878 869 static const struct of_device_id zynqmp_pinctrl_of_match[] = { 879 870 { .compatible = "xlnx,zynqmp-pinctrl" }, 880 871 { } ··· 878 887 .of_match_table = zynqmp_pinctrl_of_match, 879 888 }, 880 889 .probe = zynqmp_pinctrl_probe, 881 - .remove = zynqmp_pinctrl_remove, 882 890 }; 883 891 module_platform_driver(zynqmp_pinctrl_driver); 884 892
+17
drivers/pinctrl/qcom/Kconfig
··· 88 88 This is the pinctrl, pinmux, pinconf and gpiolib driver for the 89 89 Qualcomm TLMM block found in the Qualcomm 8960 platform. 90 90 91 + config PINCTRL_MDM9607 92 + tristate "Qualcomm 9607 pin controller driver" 93 + depends on GPIOLIB && OF 94 + depends on PINCTRL_MSM 95 + help 96 + This is the pinctrl, pinmux, pinconf and gpiolib driver for the 97 + Qualcomm TLMM block found in the Qualcomm 9607 platform. 98 + 91 99 config PINCTRL_MDM9615 92 100 tristate "Qualcomm 9615 pin controller driver" 93 101 depends on OF ··· 263 255 This is the pinctrl, pinmux, pinconf and gpiolib driver for the 264 256 Qualcomm Technologies Inc TLMM block found on the Qualcomm 265 257 Technologies Inc SDX55 platform. 258 + 259 + config PINCTRL_SM6115 260 + tristate "Qualcomm Technologies Inc SM6115,SM4250 pin controller driver" 261 + depends on GPIOLIB && OF 262 + depends on PINCTRL_MSM 263 + help 264 + This is the pinctrl, pinmux, pinconf and gpiolib driver for the 265 + Qualcomm Technologies Inc TLMM block found on the Qualcomm 266 + Technologies Inc SM6115 and SM4250 platforms. 266 267 267 268 config PINCTRL_SM6125 268 269 tristate "Qualcomm Technologies Inc SM6125 pin controller driver"
+2
drivers/pinctrl/qcom/Makefile
··· 19 19 obj-$(CONFIG_PINCTRL_MSM8998) += pinctrl-msm8998.o 20 20 obj-$(CONFIG_PINCTRL_QCS404) += pinctrl-qcs404.o 21 21 obj-$(CONFIG_PINCTRL_QDF2XXX) += pinctrl-qdf2xxx.o 22 + obj-$(CONFIG_PINCTRL_MDM9607) += pinctrl-mdm9607.o 22 23 obj-$(CONFIG_PINCTRL_MDM9615) += pinctrl-mdm9615.o 23 24 obj-$(CONFIG_PINCTRL_QCOM_SPMI_PMIC) += pinctrl-spmi-gpio.o 24 25 obj-$(CONFIG_PINCTRL_QCOM_SPMI_PMIC) += pinctrl-spmi-mpp.o ··· 31 30 obj-$(CONFIG_PINCTRL_SDM660) += pinctrl-sdm660.o 32 31 obj-$(CONFIG_PINCTRL_SDM845) += pinctrl-sdm845.o 33 32 obj-$(CONFIG_PINCTRL_SDX55) += pinctrl-sdx55.o 33 + obj-$(CONFIG_PINCTRL_SM6115) += pinctrl-sm6115.o 34 34 obj-$(CONFIG_PINCTRL_SM6125) += pinctrl-sm6125.o 35 35 obj-$(CONFIG_PINCTRL_SM8150) += pinctrl-sm8150.o 36 36 obj-$(CONFIG_PINCTRL_SM8250) += pinctrl-sm8250.o
+1087
drivers/pinctrl/qcom/pinctrl-mdm9607.c
··· 1 + // SPDX-License-Identifier: GPL-2.0-only 2 + /* 3 + * Copyright (c) 2021, Konrad Dybcio <konrad.dybcio@somainline.org> 4 + * 5 + * based on pinctrl-msm8916.c 6 + */ 7 + 8 + #include <linux/module.h> 9 + #include <linux/of.h> 10 + #include <linux/platform_device.h> 11 + #include <linux/pinctrl/pinctrl.h> 12 + 13 + #include "pinctrl-msm.h" 14 + 15 + static const struct pinctrl_pin_desc mdm9607_pins[] = { 16 + PINCTRL_PIN(0, "GPIO_0"), 17 + PINCTRL_PIN(1, "GPIO_1"), 18 + PINCTRL_PIN(2, "GPIO_2"), 19 + PINCTRL_PIN(3, "GPIO_3"), 20 + PINCTRL_PIN(4, "GPIO_4"), 21 + PINCTRL_PIN(5, "GPIO_5"), 22 + PINCTRL_PIN(6, "GPIO_6"), 23 + PINCTRL_PIN(7, "GPIO_7"), 24 + PINCTRL_PIN(8, "GPIO_8"), 25 + PINCTRL_PIN(9, "GPIO_9"), 26 + PINCTRL_PIN(10, "GPIO_10"), 27 + PINCTRL_PIN(11, "GPIO_11"), 28 + PINCTRL_PIN(12, "GPIO_12"), 29 + PINCTRL_PIN(13, "GPIO_13"), 30 + PINCTRL_PIN(14, "GPIO_14"), 31 + PINCTRL_PIN(15, "GPIO_15"), 32 + PINCTRL_PIN(16, "GPIO_16"), 33 + PINCTRL_PIN(17, "GPIO_17"), 34 + PINCTRL_PIN(18, "GPIO_18"), 35 + PINCTRL_PIN(19, "GPIO_19"), 36 + PINCTRL_PIN(20, "GPIO_20"), 37 + PINCTRL_PIN(21, "GPIO_21"), 38 + PINCTRL_PIN(22, "GPIO_22"), 39 + PINCTRL_PIN(23, "GPIO_23"), 40 + PINCTRL_PIN(24, "GPIO_24"), 41 + PINCTRL_PIN(25, "GPIO_25"), 42 + PINCTRL_PIN(26, "GPIO_26"), 43 + PINCTRL_PIN(27, "GPIO_27"), 44 + PINCTRL_PIN(28, "GPIO_28"), 45 + PINCTRL_PIN(29, "GPIO_29"), 46 + PINCTRL_PIN(30, "GPIO_30"), 47 + PINCTRL_PIN(31, "GPIO_31"), 48 + PINCTRL_PIN(32, "GPIO_32"), 49 + PINCTRL_PIN(33, "GPIO_33"), 50 + PINCTRL_PIN(34, "GPIO_34"), 51 + PINCTRL_PIN(35, "GPIO_35"), 52 + PINCTRL_PIN(36, "GPIO_36"), 53 + PINCTRL_PIN(37, "GPIO_37"), 54 + PINCTRL_PIN(38, "GPIO_38"), 55 + PINCTRL_PIN(39, "GPIO_39"), 56 + PINCTRL_PIN(40, "GPIO_40"), 57 + PINCTRL_PIN(41, "GPIO_41"), 58 + PINCTRL_PIN(42, "GPIO_42"), 59 + PINCTRL_PIN(43, "GPIO_43"), 60 + PINCTRL_PIN(44, "GPIO_44"), 61 + PINCTRL_PIN(45, "GPIO_45"), 62 + PINCTRL_PIN(46, "GPIO_46"), 63 + PINCTRL_PIN(47, "GPIO_47"), 64 + PINCTRL_PIN(48, "GPIO_48"), 65 + PINCTRL_PIN(49, "GPIO_49"), 66 + PINCTRL_PIN(50, "GPIO_50"), 67 + PINCTRL_PIN(51, "GPIO_51"), 68 + PINCTRL_PIN(52, "GPIO_52"), 69 + PINCTRL_PIN(53, "GPIO_53"), 70 + PINCTRL_PIN(54, "GPIO_54"), 71 + PINCTRL_PIN(55, "GPIO_55"), 72 + PINCTRL_PIN(56, "GPIO_56"), 73 + PINCTRL_PIN(57, "GPIO_57"), 74 + PINCTRL_PIN(58, "GPIO_58"), 75 + PINCTRL_PIN(59, "GPIO_59"), 76 + PINCTRL_PIN(60, "GPIO_60"), 77 + PINCTRL_PIN(61, "GPIO_61"), 78 + PINCTRL_PIN(62, "GPIO_62"), 79 + PINCTRL_PIN(63, "GPIO_63"), 80 + PINCTRL_PIN(64, "GPIO_64"), 81 + PINCTRL_PIN(65, "GPIO_65"), 82 + PINCTRL_PIN(66, "GPIO_66"), 83 + PINCTRL_PIN(67, "GPIO_67"), 84 + PINCTRL_PIN(68, "GPIO_68"), 85 + PINCTRL_PIN(69, "GPIO_69"), 86 + PINCTRL_PIN(70, "GPIO_70"), 87 + PINCTRL_PIN(71, "GPIO_71"), 88 + PINCTRL_PIN(72, "GPIO_72"), 89 + PINCTRL_PIN(73, "GPIO_73"), 90 + PINCTRL_PIN(74, "GPIO_74"), 91 + PINCTRL_PIN(75, "GPIO_75"), 92 + PINCTRL_PIN(76, "GPIO_76"), 93 + PINCTRL_PIN(77, "GPIO_77"), 94 + PINCTRL_PIN(78, "GPIO_78"), 95 + PINCTRL_PIN(79, "GPIO_79"), 96 + PINCTRL_PIN(80, "SDC1_CLK"), 97 + PINCTRL_PIN(81, "SDC1_CMD"), 98 + PINCTRL_PIN(82, "SDC1_DATA"), 99 + PINCTRL_PIN(83, "SDC2_CLK"), 100 + PINCTRL_PIN(84, "SDC2_CMD"), 101 + PINCTRL_PIN(85, "SDC2_DATA"), 102 + PINCTRL_PIN(86, "QDSD_CLK"), 103 + PINCTRL_PIN(87, "QDSD_CMD"), 104 + PINCTRL_PIN(88, "QDSD_DATA0"), 105 + PINCTRL_PIN(89, "QDSD_DATA1"), 106 + PINCTRL_PIN(90, "QDSD_DATA2"), 107 + PINCTRL_PIN(91, "QDSD_DATA3"), 108 + }; 109 + 110 + #define DECLARE_MSM_GPIO_PINS(pin) \ 111 + static const unsigned int gpio##pin##_pins[] = { pin } 112 + 113 + DECLARE_MSM_GPIO_PINS(0); 114 + DECLARE_MSM_GPIO_PINS(1); 115 + DECLARE_MSM_GPIO_PINS(2); 116 + DECLARE_MSM_GPIO_PINS(3); 117 + DECLARE_MSM_GPIO_PINS(4); 118 + DECLARE_MSM_GPIO_PINS(5); 119 + DECLARE_MSM_GPIO_PINS(6); 120 + DECLARE_MSM_GPIO_PINS(7); 121 + DECLARE_MSM_GPIO_PINS(8); 122 + DECLARE_MSM_GPIO_PINS(9); 123 + DECLARE_MSM_GPIO_PINS(10); 124 + DECLARE_MSM_GPIO_PINS(11); 125 + DECLARE_MSM_GPIO_PINS(12); 126 + DECLARE_MSM_GPIO_PINS(13); 127 + DECLARE_MSM_GPIO_PINS(14); 128 + DECLARE_MSM_GPIO_PINS(15); 129 + DECLARE_MSM_GPIO_PINS(16); 130 + DECLARE_MSM_GPIO_PINS(17); 131 + DECLARE_MSM_GPIO_PINS(18); 132 + DECLARE_MSM_GPIO_PINS(19); 133 + DECLARE_MSM_GPIO_PINS(20); 134 + DECLARE_MSM_GPIO_PINS(21); 135 + DECLARE_MSM_GPIO_PINS(22); 136 + DECLARE_MSM_GPIO_PINS(23); 137 + DECLARE_MSM_GPIO_PINS(24); 138 + DECLARE_MSM_GPIO_PINS(25); 139 + DECLARE_MSM_GPIO_PINS(26); 140 + DECLARE_MSM_GPIO_PINS(27); 141 + DECLARE_MSM_GPIO_PINS(28); 142 + DECLARE_MSM_GPIO_PINS(29); 143 + DECLARE_MSM_GPIO_PINS(30); 144 + DECLARE_MSM_GPIO_PINS(31); 145 + DECLARE_MSM_GPIO_PINS(32); 146 + DECLARE_MSM_GPIO_PINS(33); 147 + DECLARE_MSM_GPIO_PINS(34); 148 + DECLARE_MSM_GPIO_PINS(35); 149 + DECLARE_MSM_GPIO_PINS(36); 150 + DECLARE_MSM_GPIO_PINS(37); 151 + DECLARE_MSM_GPIO_PINS(38); 152 + DECLARE_MSM_GPIO_PINS(39); 153 + DECLARE_MSM_GPIO_PINS(40); 154 + DECLARE_MSM_GPIO_PINS(41); 155 + DECLARE_MSM_GPIO_PINS(42); 156 + DECLARE_MSM_GPIO_PINS(43); 157 + DECLARE_MSM_GPIO_PINS(44); 158 + DECLARE_MSM_GPIO_PINS(45); 159 + DECLARE_MSM_GPIO_PINS(46); 160 + DECLARE_MSM_GPIO_PINS(47); 161 + DECLARE_MSM_GPIO_PINS(48); 162 + DECLARE_MSM_GPIO_PINS(49); 163 + DECLARE_MSM_GPIO_PINS(50); 164 + DECLARE_MSM_GPIO_PINS(51); 165 + DECLARE_MSM_GPIO_PINS(52); 166 + DECLARE_MSM_GPIO_PINS(53); 167 + DECLARE_MSM_GPIO_PINS(54); 168 + DECLARE_MSM_GPIO_PINS(55); 169 + DECLARE_MSM_GPIO_PINS(56); 170 + DECLARE_MSM_GPIO_PINS(57); 171 + DECLARE_MSM_GPIO_PINS(58); 172 + DECLARE_MSM_GPIO_PINS(59); 173 + DECLARE_MSM_GPIO_PINS(60); 174 + DECLARE_MSM_GPIO_PINS(61); 175 + DECLARE_MSM_GPIO_PINS(62); 176 + DECLARE_MSM_GPIO_PINS(63); 177 + DECLARE_MSM_GPIO_PINS(64); 178 + DECLARE_MSM_GPIO_PINS(65); 179 + DECLARE_MSM_GPIO_PINS(66); 180 + DECLARE_MSM_GPIO_PINS(67); 181 + DECLARE_MSM_GPIO_PINS(68); 182 + DECLARE_MSM_GPIO_PINS(69); 183 + DECLARE_MSM_GPIO_PINS(70); 184 + DECLARE_MSM_GPIO_PINS(71); 185 + DECLARE_MSM_GPIO_PINS(72); 186 + DECLARE_MSM_GPIO_PINS(73); 187 + DECLARE_MSM_GPIO_PINS(74); 188 + DECLARE_MSM_GPIO_PINS(75); 189 + DECLARE_MSM_GPIO_PINS(76); 190 + DECLARE_MSM_GPIO_PINS(77); 191 + DECLARE_MSM_GPIO_PINS(78); 192 + DECLARE_MSM_GPIO_PINS(79); 193 + 194 + static const unsigned int sdc1_clk_pins[] = { 80 }; 195 + static const unsigned int sdc1_cmd_pins[] = { 81 }; 196 + static const unsigned int sdc1_data_pins[] = { 82 }; 197 + static const unsigned int sdc2_clk_pins[] = { 83 }; 198 + static const unsigned int sdc2_cmd_pins[] = { 84 }; 199 + static const unsigned int sdc2_data_pins[] = { 85 }; 200 + static const unsigned int qdsd_clk_pins[] = { 86 }; 201 + static const unsigned int qdsd_cmd_pins[] = { 87 }; 202 + static const unsigned int qdsd_data0_pins[] = { 88 }; 203 + static const unsigned int qdsd_data1_pins[] = { 89 }; 204 + static const unsigned int qdsd_data2_pins[] = { 90 }; 205 + static const unsigned int qdsd_data3_pins[] = { 91 }; 206 + 207 + #define FUNCTION(fname) \ 208 + [msm_mux_##fname] = { \ 209 + .name = #fname, \ 210 + .groups = fname##_groups, \ 211 + .ngroups = ARRAY_SIZE(fname##_groups), \ 212 + } 213 + 214 + #define PINGROUP(id, f1, f2, f3, f4, f5, f6, f7, f8, f9) \ 215 + { \ 216 + .name = "gpio" #id, \ 217 + .pins = gpio##id##_pins, \ 218 + .npins = ARRAY_SIZE(gpio##id##_pins), \ 219 + .funcs = (int[]){ \ 220 + msm_mux_gpio, \ 221 + msm_mux_##f1, \ 222 + msm_mux_##f2, \ 223 + msm_mux_##f3, \ 224 + msm_mux_##f4, \ 225 + msm_mux_##f5, \ 226 + msm_mux_##f6, \ 227 + msm_mux_##f7, \ 228 + msm_mux_##f8, \ 229 + msm_mux_##f9 \ 230 + }, \ 231 + .nfuncs = 10, \ 232 + .ctl_reg = 0x1000 * id, \ 233 + .io_reg = 0x4 + 0x1000 * id, \ 234 + .intr_cfg_reg = 0x8 + 0x1000 * id, \ 235 + .intr_status_reg = 0xc + 0x1000 * id, \ 236 + .intr_target_reg = 0x8 + 0x1000 * id, \ 237 + .mux_bit = 2, \ 238 + .pull_bit = 0, \ 239 + .drv_bit = 6, \ 240 + .oe_bit = 9, \ 241 + .in_bit = 0, \ 242 + .out_bit = 1, \ 243 + .intr_enable_bit = 0, \ 244 + .intr_status_bit = 0, \ 245 + .intr_target_bit = 5, \ 246 + .intr_target_kpss_val = 4, \ 247 + .intr_raw_status_bit = 4, \ 248 + .intr_polarity_bit = 1, \ 249 + .intr_detection_bit = 2, \ 250 + .intr_detection_width = 2, \ 251 + } 252 + 253 + #define SDC_PINGROUP(pg_name, ctl, pull, drv) \ 254 + { \ 255 + .name = #pg_name, \ 256 + .pins = pg_name##_pins, \ 257 + .npins = ARRAY_SIZE(pg_name##_pins), \ 258 + .ctl_reg = ctl, \ 259 + .io_reg = 0, \ 260 + .intr_cfg_reg = 0, \ 261 + .intr_status_reg = 0, \ 262 + .intr_target_reg = 0, \ 263 + .mux_bit = -1, \ 264 + .pull_bit = pull, \ 265 + .drv_bit = drv, \ 266 + .oe_bit = -1, \ 267 + .in_bit = -1, \ 268 + .out_bit = -1, \ 269 + .intr_enable_bit = -1, \ 270 + .intr_status_bit = -1, \ 271 + .intr_target_bit = -1, \ 272 + .intr_target_kpss_val = -1, \ 273 + .intr_raw_status_bit = -1, \ 274 + .intr_polarity_bit = -1, \ 275 + .intr_detection_bit = -1, \ 276 + .intr_detection_width = -1, \ 277 + } 278 + 279 + enum mdm9607_functions { 280 + msm_mux_adsp_ext, 281 + msm_mux_atest_bbrx0, 282 + msm_mux_atest_bbrx1, 283 + msm_mux_atest_char, 284 + msm_mux_atest_char0, 285 + msm_mux_atest_char1, 286 + msm_mux_atest_char2, 287 + msm_mux_atest_char3, 288 + msm_mux_atest_combodac_to_gpio_native, 289 + msm_mux_atest_gpsadc_dtest0_native, 290 + msm_mux_atest_gpsadc_dtest1_native, 291 + msm_mux_atest_tsens, 292 + msm_mux_backlight_en_b, 293 + msm_mux_bimc_dte0, 294 + msm_mux_bimc_dte1, 295 + msm_mux_blsp1_spi, 296 + msm_mux_blsp2_spi, 297 + msm_mux_blsp3_spi, 298 + msm_mux_blsp_i2c1, 299 + msm_mux_blsp_i2c2, 300 + msm_mux_blsp_i2c3, 301 + msm_mux_blsp_i2c4, 302 + msm_mux_blsp_i2c5, 303 + msm_mux_blsp_i2c6, 304 + msm_mux_blsp_spi1, 305 + msm_mux_blsp_spi2, 306 + msm_mux_blsp_spi3, 307 + msm_mux_blsp_spi4, 308 + msm_mux_blsp_spi5, 309 + msm_mux_blsp_spi6, 310 + msm_mux_blsp_uart1, 311 + msm_mux_blsp_uart2, 312 + msm_mux_blsp_uart3, 313 + msm_mux_blsp_uart4, 314 + msm_mux_blsp_uart5, 315 + msm_mux_blsp_uart6, 316 + msm_mux_blsp_uim1, 317 + msm_mux_blsp_uim2, 318 + msm_mux_codec_int, 319 + msm_mux_codec_rst, 320 + msm_mux_coex_uart, 321 + msm_mux_cri_trng, 322 + msm_mux_cri_trng0, 323 + msm_mux_cri_trng1, 324 + msm_mux_dbg_out, 325 + msm_mux_ebi0_wrcdc, 326 + msm_mux_ebi2_a, 327 + msm_mux_ebi2_a_d_8_b, 328 + msm_mux_ebi2_lcd, 329 + msm_mux_ebi2_lcd_cs_n_b, 330 + msm_mux_ebi2_lcd_te_b, 331 + msm_mux_eth_irq, 332 + msm_mux_eth_rst, 333 + msm_mux_gcc_gp1_clk_a, 334 + msm_mux_gcc_gp1_clk_b, 335 + msm_mux_gcc_gp2_clk_a, 336 + msm_mux_gcc_gp2_clk_b, 337 + msm_mux_gcc_gp3_clk_a, 338 + msm_mux_gcc_gp3_clk_b, 339 + msm_mux_gcc_plltest, 340 + msm_mux_gcc_tlmm, 341 + msm_mux_gmac_mdio, 342 + msm_mux_gpio, 343 + msm_mux_gsm0_tx, 344 + msm_mux_lcd_rst, 345 + msm_mux_ldo_en, 346 + msm_mux_ldo_update, 347 + msm_mux_m_voc, 348 + msm_mux_modem_tsync, 349 + msm_mux_nav_ptp_pps_in_a, 350 + msm_mux_nav_ptp_pps_in_b, 351 + msm_mux_nav_tsync_out_a, 352 + msm_mux_nav_tsync_out_b, 353 + msm_mux_pa_indicator, 354 + msm_mux_pbs0, 355 + msm_mux_pbs1, 356 + msm_mux_pbs2, 357 + msm_mux_pri_mi2s_data0_a, 358 + msm_mux_pri_mi2s_data1_a, 359 + msm_mux_pri_mi2s_mclk_a, 360 + msm_mux_pri_mi2s_sck_a, 361 + msm_mux_pri_mi2s_ws_a, 362 + msm_mux_prng_rosc, 363 + msm_mux_ptp_pps_out_a, 364 + msm_mux_ptp_pps_out_b, 365 + msm_mux_pwr_crypto_enabled_a, 366 + msm_mux_pwr_crypto_enabled_b, 367 + msm_mux_pwr_modem_enabled_a, 368 + msm_mux_pwr_modem_enabled_b, 369 + msm_mux_pwr_nav_enabled_a, 370 + msm_mux_pwr_nav_enabled_b, 371 + msm_mux_qdss_cti_trig_in_a0, 372 + msm_mux_qdss_cti_trig_in_a1, 373 + msm_mux_qdss_cti_trig_in_b0, 374 + msm_mux_qdss_cti_trig_in_b1, 375 + msm_mux_qdss_cti_trig_out_a0, 376 + msm_mux_qdss_cti_trig_out_a1, 377 + msm_mux_qdss_cti_trig_out_b0, 378 + msm_mux_qdss_cti_trig_out_b1, 379 + msm_mux_qdss_traceclk_a, 380 + msm_mux_qdss_traceclk_b, 381 + msm_mux_qdss_tracectl_a, 382 + msm_mux_qdss_tracectl_b, 383 + msm_mux_qdss_tracedata_a, 384 + msm_mux_qdss_tracedata_b, 385 + msm_mux_rcm_marker1, 386 + msm_mux_rcm_marker2, 387 + msm_mux_sd_write, 388 + msm_mux_sec_mi2s, 389 + msm_mux_sensor_en, 390 + msm_mux_sensor_int2, 391 + msm_mux_sensor_int3, 392 + msm_mux_sensor_rst, 393 + msm_mux_ssbi1, 394 + msm_mux_ssbi2, 395 + msm_mux_touch_rst, 396 + msm_mux_ts_int, 397 + msm_mux_uim1_clk, 398 + msm_mux_uim1_data, 399 + msm_mux_uim1_present, 400 + msm_mux_uim1_reset, 401 + msm_mux_uim2_clk, 402 + msm_mux_uim2_data, 403 + msm_mux_uim2_present, 404 + msm_mux_uim2_reset, 405 + msm_mux_uim_batt, 406 + msm_mux_wlan_en1, 407 + msm_mux__, 408 + }; 409 + 410 + static const char * const gpio_groups[] = { 411 + "gpio0", "gpio1", "gpio2", "gpio3", "gpio4", "gpio5", "gpio6", "gpio7", 412 + "gpio8", "gpio9", "gpio10", "gpio11", "gpio12", "gpio13", "gpio14", 413 + "gpio15", "gpio16", "gpio17", "gpio18", "gpio19", "gpio20", "gpio21", 414 + "gpio22", "gpio23", "gpio24", "gpio25", "gpio26", "gpio27", "gpio28", 415 + "gpio29", "gpio30", "gpio31", "gpio32", "gpio33", "gpio34", "gpio35", 416 + "gpio36", "gpio37", "gpio38", "gpio39", "gpio40", "gpio41", "gpio42", 417 + "gpio43", "gpio44", "gpio45", "gpio46", "gpio47", "gpio48", "gpio49", 418 + "gpio50", "gpio51", "gpio52", "gpio53", "gpio54", "gpio55", "gpio56", 419 + "gpio57", "gpio58", "gpio59", "gpio60", "gpio61", "gpio62", "gpio63", 420 + "gpio64", "gpio65", "gpio66", "gpio67", "gpio68", "gpio69", "gpio70", 421 + "gpio71", "gpio72", "gpio73", "gpio74", "gpio75", "gpio76", "gpio77", 422 + "gpio78", "gpio79", 423 + }; 424 + static const char * const blsp_spi3_groups[] = { 425 + "gpio0", "gpio1", "gpio2", "gpio3", 426 + }; 427 + static const char * const blsp_uart3_groups[] = { 428 + "gpio0", "gpio1", "gpio2", "gpio3", 429 + }; 430 + static const char * const qdss_tracedata_a_groups[] = { 431 + "gpio0", "gpio1", "gpio4", "gpio5", "gpio20", "gpio21", "gpio22", 432 + "gpio23", "gpio24", "gpio25", "gpio26", "gpio75", "gpio76", "gpio77", 433 + "gpio78", "gpio79", 434 + }; 435 + static const char * const bimc_dte1_groups[] = { 436 + "gpio1", "gpio24", 437 + }; 438 + static const char * const blsp_i2c3_groups[] = { 439 + "gpio2", "gpio3", 440 + }; 441 + static const char * const qdss_traceclk_a_groups[] = { 442 + "gpio2", 443 + }; 444 + static const char * const bimc_dte0_groups[] = { 445 + "gpio2", "gpio15", 446 + }; 447 + static const char * const qdss_cti_trig_in_a1_groups[] = { 448 + "gpio3", 449 + }; 450 + static const char * const blsp_spi2_groups[] = { 451 + "gpio4", "gpio5", "gpio6", "gpio7", 452 + }; 453 + static const char * const blsp_uart2_groups[] = { 454 + "gpio4", "gpio5", "gpio6", "gpio7", 455 + }; 456 + static const char * const blsp_uim2_groups[] = { 457 + "gpio4", "gpio5", 458 + }; 459 + static const char * const blsp_i2c2_groups[] = { 460 + "gpio6", "gpio7", 461 + }; 462 + static const char * const qdss_tracectl_a_groups[] = { 463 + "gpio6", 464 + }; 465 + static const char * const sensor_int2_groups[] = { 466 + "gpio8", 467 + }; 468 + static const char * const blsp_spi5_groups[] = { 469 + "gpio8", "gpio9", "gpio10", "gpio11", 470 + }; 471 + static const char * const blsp_uart5_groups[] = { 472 + "gpio8", "gpio9", "gpio10", "gpio11", 473 + }; 474 + static const char * const ebi2_lcd_groups[] = { 475 + "gpio8", "gpio11", "gpio74", "gpio78", 476 + }; 477 + static const char * const m_voc_groups[] = { 478 + "gpio8", "gpio78", 479 + }; 480 + static const char * const sensor_int3_groups[] = { 481 + "gpio9", 482 + }; 483 + static const char * const sensor_en_groups[] = { 484 + "gpio10", 485 + }; 486 + static const char * const blsp_i2c5_groups[] = { 487 + "gpio10", "gpio11", 488 + }; 489 + static const char * const ebi2_a_groups[] = { 490 + "gpio10", 491 + }; 492 + static const char * const qdss_tracedata_b_groups[] = { 493 + "gpio10", "gpio39", "gpio40", "gpio41", "gpio42", "gpio43", "gpio46", 494 + "gpio47", "gpio48", "gpio51", "gpio52", "gpio53", "gpio54", "gpio55", 495 + "gpio58", "gpio59", 496 + }; 497 + static const char * const sensor_rst_groups[] = { 498 + "gpio11", 499 + }; 500 + static const char * const blsp2_spi_groups[] = { 501 + "gpio11", "gpio13", "gpio77", 502 + }; 503 + static const char * const blsp_spi1_groups[] = { 504 + "gpio12", "gpio13", "gpio14", "gpio15", 505 + }; 506 + static const char * const blsp_uart1_groups[] = { 507 + "gpio12", "gpio13", "gpio14", "gpio15", 508 + }; 509 + static const char * const blsp_uim1_groups[] = { 510 + "gpio12", "gpio13", 511 + }; 512 + static const char * const blsp3_spi_groups[] = { 513 + "gpio12", "gpio26", "gpio76", 514 + }; 515 + static const char * const gcc_gp2_clk_b_groups[] = { 516 + "gpio12", 517 + }; 518 + static const char * const gcc_gp3_clk_b_groups[] = { 519 + "gpio13", 520 + }; 521 + static const char * const blsp_i2c1_groups[] = { 522 + "gpio14", "gpio15", 523 + }; 524 + static const char * const gcc_gp1_clk_b_groups[] = { 525 + "gpio14", 526 + }; 527 + static const char * const blsp_spi4_groups[] = { 528 + "gpio16", "gpio17", "gpio18", "gpio19", 529 + }; 530 + static const char * const blsp_uart4_groups[] = { 531 + "gpio16", "gpio17", "gpio18", "gpio19", 532 + }; 533 + static const char * const rcm_marker1_groups[] = { 534 + "gpio18", 535 + }; 536 + static const char * const blsp_i2c4_groups[] = { 537 + "gpio18", "gpio19", 538 + }; 539 + static const char * const qdss_cti_trig_out_a1_groups[] = { 540 + "gpio18", 541 + }; 542 + static const char * const rcm_marker2_groups[] = { 543 + "gpio19", 544 + }; 545 + static const char * const qdss_cti_trig_out_a0_groups[] = { 546 + "gpio19", 547 + }; 548 + static const char * const blsp_spi6_groups[] = { 549 + "gpio20", "gpio21", "gpio22", "gpio23", 550 + }; 551 + static const char * const blsp_uart6_groups[] = { 552 + "gpio20", "gpio21", "gpio22", "gpio23", 553 + }; 554 + static const char * const pri_mi2s_ws_a_groups[] = { 555 + "gpio20", 556 + }; 557 + static const char * const ebi2_lcd_te_b_groups[] = { 558 + "gpio20", 559 + }; 560 + static const char * const blsp1_spi_groups[] = { 561 + "gpio20", "gpio21", "gpio78", 562 + }; 563 + static const char * const backlight_en_b_groups[] = { 564 + "gpio21", 565 + }; 566 + static const char * const pri_mi2s_data0_a_groups[] = { 567 + "gpio21", 568 + }; 569 + static const char * const pri_mi2s_data1_a_groups[] = { 570 + "gpio22", 571 + }; 572 + static const char * const blsp_i2c6_groups[] = { 573 + "gpio22", "gpio23", 574 + }; 575 + static const char * const ebi2_a_d_8_b_groups[] = { 576 + "gpio22", 577 + }; 578 + static const char * const pri_mi2s_sck_a_groups[] = { 579 + "gpio23", 580 + }; 581 + static const char * const ebi2_lcd_cs_n_b_groups[] = { 582 + "gpio23", 583 + }; 584 + static const char * const touch_rst_groups[] = { 585 + "gpio24", 586 + }; 587 + static const char * const pri_mi2s_mclk_a_groups[] = { 588 + "gpio24", 589 + }; 590 + static const char * const pwr_nav_enabled_a_groups[] = { 591 + "gpio24", 592 + }; 593 + static const char * const ts_int_groups[] = { 594 + "gpio25", 595 + }; 596 + static const char * const sd_write_groups[] = { 597 + "gpio25", 598 + }; 599 + static const char * const pwr_crypto_enabled_a_groups[] = { 600 + "gpio25", 601 + }; 602 + static const char * const codec_rst_groups[] = { 603 + "gpio26", 604 + }; 605 + static const char * const adsp_ext_groups[] = { 606 + "gpio26", 607 + }; 608 + static const char * const atest_combodac_to_gpio_native_groups[] = { 609 + "gpio26", "gpio27", "gpio28", "gpio29", "gpio30", "gpio31", "gpio32", 610 + "gpio33", "gpio34", "gpio35", "gpio41", "gpio45", "gpio49", "gpio50", 611 + "gpio51", "gpio52", "gpio54", "gpio55", "gpio57", "gpio59", 612 + }; 613 + static const char * const uim2_data_groups[] = { 614 + "gpio27", 615 + }; 616 + static const char * const gmac_mdio_groups[] = { 617 + "gpio27", "gpio28", 618 + }; 619 + static const char * const gcc_gp1_clk_a_groups[] = { 620 + "gpio27", 621 + }; 622 + static const char * const uim2_clk_groups[] = { 623 + "gpio28", 624 + }; 625 + static const char * const gcc_gp2_clk_a_groups[] = { 626 + "gpio28", 627 + }; 628 + static const char * const eth_irq_groups[] = { 629 + "gpio29", 630 + }; 631 + static const char * const uim2_reset_groups[] = { 632 + "gpio29", 633 + }; 634 + static const char * const gcc_gp3_clk_a_groups[] = { 635 + "gpio29", 636 + }; 637 + static const char * const eth_rst_groups[] = { 638 + "gpio30", 639 + }; 640 + static const char * const uim2_present_groups[] = { 641 + "gpio30", 642 + }; 643 + static const char * const prng_rosc_groups[] = { 644 + "gpio30", 645 + }; 646 + static const char * const uim1_data_groups[] = { 647 + "gpio31", 648 + }; 649 + static const char * const uim1_clk_groups[] = { 650 + "gpio32", 651 + }; 652 + static const char * const uim1_reset_groups[] = { 653 + "gpio33", 654 + }; 655 + static const char * const uim1_present_groups[] = { 656 + "gpio34", 657 + }; 658 + static const char * const gcc_plltest_groups[] = { 659 + "gpio34", "gpio35", 660 + }; 661 + static const char * const uim_batt_groups[] = { 662 + "gpio35", 663 + }; 664 + static const char * const coex_uart_groups[] = { 665 + "gpio36", "gpio37", 666 + }; 667 + static const char * const codec_int_groups[] = { 668 + "gpio38", 669 + }; 670 + static const char * const qdss_cti_trig_in_a0_groups[] = { 671 + "gpio38", 672 + }; 673 + static const char * const atest_bbrx1_groups[] = { 674 + "gpio39", 675 + }; 676 + static const char * const cri_trng0_groups[] = { 677 + "gpio40", 678 + }; 679 + static const char * const atest_bbrx0_groups[] = { 680 + "gpio40", 681 + }; 682 + static const char * const cri_trng_groups[] = { 683 + "gpio42", 684 + }; 685 + static const char * const qdss_cti_trig_in_b0_groups[] = { 686 + "gpio44", 687 + }; 688 + static const char * const atest_gpsadc_dtest0_native_groups[] = { 689 + "gpio44", 690 + }; 691 + static const char * const qdss_cti_trig_out_b0_groups[] = { 692 + "gpio45", 693 + }; 694 + static const char * const qdss_tracectl_b_groups[] = { 695 + "gpio49", 696 + }; 697 + static const char * const qdss_traceclk_b_groups[] = { 698 + "gpio50", 699 + }; 700 + static const char * const pa_indicator_groups[] = { 701 + "gpio51", 702 + }; 703 + static const char * const modem_tsync_groups[] = { 704 + "gpio53", 705 + }; 706 + static const char * const nav_tsync_out_a_groups[] = { 707 + "gpio53", 708 + }; 709 + static const char * const nav_ptp_pps_in_a_groups[] = { 710 + "gpio53", 711 + }; 712 + static const char * const ptp_pps_out_a_groups[] = { 713 + "gpio53", 714 + }; 715 + static const char * const gsm0_tx_groups[] = { 716 + "gpio55", 717 + }; 718 + static const char * const qdss_cti_trig_in_b1_groups[] = { 719 + "gpio56", 720 + }; 721 + static const char * const cri_trng1_groups[] = { 722 + "gpio57", 723 + }; 724 + static const char * const qdss_cti_trig_out_b1_groups[] = { 725 + "gpio57", 726 + }; 727 + static const char * const ssbi1_groups[] = { 728 + "gpio58", 729 + }; 730 + static const char * const atest_gpsadc_dtest1_native_groups[] = { 731 + "gpio58", 732 + }; 733 + static const char * const ssbi2_groups[] = { 734 + "gpio59", 735 + }; 736 + static const char * const atest_char3_groups[] = { 737 + "gpio60", 738 + }; 739 + static const char * const atest_char2_groups[] = { 740 + "gpio61", 741 + }; 742 + static const char * const atest_char1_groups[] = { 743 + "gpio62", 744 + }; 745 + static const char * const atest_char0_groups[] = { 746 + "gpio63", 747 + }; 748 + static const char * const atest_char_groups[] = { 749 + "gpio64", 750 + }; 751 + static const char * const ebi0_wrcdc_groups[] = { 752 + "gpio70", 753 + }; 754 + static const char * const ldo_update_groups[] = { 755 + "gpio72", 756 + }; 757 + static const char * const gcc_tlmm_groups[] = { 758 + "gpio72", 759 + }; 760 + static const char * const ldo_en_groups[] = { 761 + "gpio73", 762 + }; 763 + static const char * const dbg_out_groups[] = { 764 + "gpio73", 765 + }; 766 + static const char * const atest_tsens_groups[] = { 767 + "gpio73", 768 + }; 769 + static const char * const lcd_rst_groups[] = { 770 + "gpio74", 771 + }; 772 + static const char * const wlan_en1_groups[] = { 773 + "gpio75", 774 + }; 775 + static const char * const nav_tsync_out_b_groups[] = { 776 + "gpio75", 777 + }; 778 + static const char * const nav_ptp_pps_in_b_groups[] = { 779 + "gpio75", 780 + }; 781 + static const char * const ptp_pps_out_b_groups[] = { 782 + "gpio75", 783 + }; 784 + static const char * const pbs0_groups[] = { 785 + "gpio76", 786 + }; 787 + static const char * const sec_mi2s_groups[] = { 788 + "gpio76", "gpio77", "gpio78", "gpio79", 789 + }; 790 + static const char * const pwr_modem_enabled_a_groups[] = { 791 + "gpio76", 792 + }; 793 + static const char * const pbs1_groups[] = { 794 + "gpio77", 795 + }; 796 + static const char * const pwr_modem_enabled_b_groups[] = { 797 + "gpio77", 798 + }; 799 + static const char * const pbs2_groups[] = { 800 + "gpio78", 801 + }; 802 + static const char * const pwr_nav_enabled_b_groups[] = { 803 + "gpio78", 804 + }; 805 + static const char * const pwr_crypto_enabled_b_groups[] = { 806 + "gpio79", 807 + }; 808 + 809 + static const struct msm_function mdm9607_functions[] = { 810 + FUNCTION(adsp_ext), 811 + FUNCTION(atest_bbrx0), 812 + FUNCTION(atest_bbrx1), 813 + FUNCTION(atest_char), 814 + FUNCTION(atest_char0), 815 + FUNCTION(atest_char1), 816 + FUNCTION(atest_char2), 817 + FUNCTION(atest_char3), 818 + FUNCTION(atest_combodac_to_gpio_native), 819 + FUNCTION(atest_gpsadc_dtest0_native), 820 + FUNCTION(atest_gpsadc_dtest1_native), 821 + FUNCTION(atest_tsens), 822 + FUNCTION(backlight_en_b), 823 + FUNCTION(bimc_dte0), 824 + FUNCTION(bimc_dte1), 825 + FUNCTION(blsp1_spi), 826 + FUNCTION(blsp2_spi), 827 + FUNCTION(blsp3_spi), 828 + FUNCTION(blsp_i2c1), 829 + FUNCTION(blsp_i2c2), 830 + FUNCTION(blsp_i2c3), 831 + FUNCTION(blsp_i2c4), 832 + FUNCTION(blsp_i2c5), 833 + FUNCTION(blsp_i2c6), 834 + FUNCTION(blsp_spi1), 835 + FUNCTION(blsp_spi2), 836 + FUNCTION(blsp_spi3), 837 + FUNCTION(blsp_spi4), 838 + FUNCTION(blsp_spi5), 839 + FUNCTION(blsp_spi6), 840 + FUNCTION(blsp_uart1), 841 + FUNCTION(blsp_uart2), 842 + FUNCTION(blsp_uart3), 843 + FUNCTION(blsp_uart4), 844 + FUNCTION(blsp_uart5), 845 + FUNCTION(blsp_uart6), 846 + FUNCTION(blsp_uim1), 847 + FUNCTION(blsp_uim2), 848 + FUNCTION(codec_int), 849 + FUNCTION(codec_rst), 850 + FUNCTION(coex_uart), 851 + FUNCTION(cri_trng), 852 + FUNCTION(cri_trng0), 853 + FUNCTION(cri_trng1), 854 + FUNCTION(dbg_out), 855 + FUNCTION(ebi0_wrcdc), 856 + FUNCTION(ebi2_a), 857 + FUNCTION(ebi2_a_d_8_b), 858 + FUNCTION(ebi2_lcd), 859 + FUNCTION(ebi2_lcd_cs_n_b), 860 + FUNCTION(ebi2_lcd_te_b), 861 + FUNCTION(eth_irq), 862 + FUNCTION(eth_rst), 863 + FUNCTION(gcc_gp1_clk_a), 864 + FUNCTION(gcc_gp1_clk_b), 865 + FUNCTION(gcc_gp2_clk_a), 866 + FUNCTION(gcc_gp2_clk_b), 867 + FUNCTION(gcc_gp3_clk_a), 868 + FUNCTION(gcc_gp3_clk_b), 869 + FUNCTION(gcc_plltest), 870 + FUNCTION(gcc_tlmm), 871 + FUNCTION(gmac_mdio), 872 + FUNCTION(gpio), 873 + FUNCTION(gsm0_tx), 874 + FUNCTION(lcd_rst), 875 + FUNCTION(ldo_en), 876 + FUNCTION(ldo_update), 877 + FUNCTION(m_voc), 878 + FUNCTION(modem_tsync), 879 + FUNCTION(nav_ptp_pps_in_a), 880 + FUNCTION(nav_ptp_pps_in_b), 881 + FUNCTION(nav_tsync_out_a), 882 + FUNCTION(nav_tsync_out_b), 883 + FUNCTION(pa_indicator), 884 + FUNCTION(pbs0), 885 + FUNCTION(pbs1), 886 + FUNCTION(pbs2), 887 + FUNCTION(pri_mi2s_data0_a), 888 + FUNCTION(pri_mi2s_data1_a), 889 + FUNCTION(pri_mi2s_mclk_a), 890 + FUNCTION(pri_mi2s_sck_a), 891 + FUNCTION(pri_mi2s_ws_a), 892 + FUNCTION(prng_rosc), 893 + FUNCTION(ptp_pps_out_a), 894 + FUNCTION(ptp_pps_out_b), 895 + FUNCTION(pwr_crypto_enabled_a), 896 + FUNCTION(pwr_crypto_enabled_b), 897 + FUNCTION(pwr_modem_enabled_a), 898 + FUNCTION(pwr_modem_enabled_b), 899 + FUNCTION(pwr_nav_enabled_a), 900 + FUNCTION(pwr_nav_enabled_b), 901 + FUNCTION(qdss_cti_trig_in_a0), 902 + FUNCTION(qdss_cti_trig_in_a1), 903 + FUNCTION(qdss_cti_trig_in_b0), 904 + FUNCTION(qdss_cti_trig_in_b1), 905 + FUNCTION(qdss_cti_trig_out_a0), 906 + FUNCTION(qdss_cti_trig_out_a1), 907 + FUNCTION(qdss_cti_trig_out_b0), 908 + FUNCTION(qdss_cti_trig_out_b1), 909 + FUNCTION(qdss_traceclk_a), 910 + FUNCTION(qdss_traceclk_b), 911 + FUNCTION(qdss_tracectl_a), 912 + FUNCTION(qdss_tracectl_b), 913 + FUNCTION(qdss_tracedata_a), 914 + FUNCTION(qdss_tracedata_b), 915 + FUNCTION(rcm_marker1), 916 + FUNCTION(rcm_marker2), 917 + FUNCTION(sd_write), 918 + FUNCTION(sec_mi2s), 919 + FUNCTION(sensor_en), 920 + FUNCTION(sensor_int2), 921 + FUNCTION(sensor_int3), 922 + FUNCTION(sensor_rst), 923 + FUNCTION(ssbi1), 924 + FUNCTION(ssbi2), 925 + FUNCTION(touch_rst), 926 + FUNCTION(ts_int), 927 + FUNCTION(uim1_clk), 928 + FUNCTION(uim1_data), 929 + FUNCTION(uim1_present), 930 + FUNCTION(uim1_reset), 931 + FUNCTION(uim2_clk), 932 + FUNCTION(uim2_data), 933 + FUNCTION(uim2_present), 934 + FUNCTION(uim2_reset), 935 + FUNCTION(uim_batt), 936 + FUNCTION(wlan_en1) 937 + }; 938 + 939 + static const struct msm_pingroup mdm9607_groups[] = { 940 + PINGROUP(0, blsp_uart3, blsp_spi3, _, _, _, _, _, qdss_tracedata_a, _), 941 + PINGROUP(1, blsp_uart3, blsp_spi3, _, _, _, _, _, qdss_tracedata_a, bimc_dte1), 942 + PINGROUP(2, blsp_uart3, blsp_i2c3, blsp_spi3, _, _, _, _, _, qdss_traceclk_a), 943 + PINGROUP(3, blsp_uart3, blsp_i2c3, blsp_spi3, _, _, _, _, _, _), 944 + PINGROUP(4, blsp_spi2, blsp_uart2, blsp_uim2, _, _, _, _, qdss_tracedata_a, _), 945 + PINGROUP(5, blsp_spi2, blsp_uart2, blsp_uim2, _, _, _, _, qdss_tracedata_a, _), 946 + PINGROUP(6, blsp_spi2, blsp_uart2, blsp_i2c2, _, _, _, _, _, _), 947 + PINGROUP(7, blsp_spi2, blsp_uart2, blsp_i2c2, _, _, _, _, _, _), 948 + PINGROUP(8, blsp_spi5, blsp_uart5, ebi2_lcd, m_voc, _, _, _, _, _), 949 + PINGROUP(9, blsp_spi5, blsp_uart5, _, _, _, _, _, _, _), 950 + PINGROUP(10, blsp_spi5, blsp_i2c5, blsp_uart5, ebi2_a, _, _, qdss_tracedata_b, _, _), 951 + PINGROUP(11, blsp_spi5, blsp_i2c5, blsp_uart5, blsp2_spi, ebi2_lcd, _, _, _, _), 952 + PINGROUP(12, blsp_spi1, blsp_uart1, blsp_uim1, blsp3_spi, gcc_gp2_clk_b, _, _, _, _), 953 + PINGROUP(13, blsp_spi1, blsp_uart1, blsp_uim1, blsp2_spi, gcc_gp3_clk_b, _, _, _, _), 954 + PINGROUP(14, blsp_spi1, blsp_uart1, blsp_i2c1, gcc_gp1_clk_b, _, _, _, _, _), 955 + PINGROUP(15, blsp_spi1, blsp_uart1, blsp_i2c1, _, _, _, _, _, _), 956 + PINGROUP(16, blsp_spi4, blsp_uart4, _, _, _, _, _, _, _), 957 + PINGROUP(17, blsp_spi4, blsp_uart4, _, _, _, _, _, _, _), 958 + PINGROUP(18, blsp_spi4, blsp_uart4, blsp_i2c4, _, _, _, _, _, _), 959 + PINGROUP(19, blsp_spi4, blsp_uart4, blsp_i2c4, _, _, _, _, _, _), 960 + PINGROUP(20, blsp_spi6, blsp_uart6, pri_mi2s_ws_a, ebi2_lcd_te_b, blsp1_spi, _, _, _, 961 + qdss_tracedata_a), 962 + PINGROUP(21, blsp_spi6, blsp_uart6, pri_mi2s_data0_a, blsp1_spi, _, _, _, _, _), 963 + PINGROUP(22, blsp_spi6, blsp_uart6, pri_mi2s_data1_a, blsp_i2c6, ebi2_a_d_8_b, _, _, _, _), 964 + PINGROUP(23, blsp_spi6, blsp_uart6, pri_mi2s_sck_a, blsp_i2c6, ebi2_lcd_cs_n_b, _, _, _, _), 965 + PINGROUP(24, pri_mi2s_mclk_a, _, pwr_nav_enabled_a, _, _, _, _, qdss_tracedata_a, 966 + bimc_dte1), 967 + PINGROUP(25, sd_write, _, pwr_crypto_enabled_a, _, _, _, _, qdss_tracedata_a, _), 968 + PINGROUP(26, blsp3_spi, adsp_ext, _, qdss_tracedata_a, _, atest_combodac_to_gpio_native, _, 969 + _, _), 970 + PINGROUP(27, uim2_data, gmac_mdio, gcc_gp1_clk_a, _, _, atest_combodac_to_gpio_native, _, _, 971 + _), 972 + PINGROUP(28, uim2_clk, gmac_mdio, gcc_gp2_clk_a, _, _, atest_combodac_to_gpio_native, _, _, 973 + _), 974 + PINGROUP(29, uim2_reset, gcc_gp3_clk_a, _, _, atest_combodac_to_gpio_native, _, _, _, _), 975 + PINGROUP(30, uim2_present, prng_rosc, _, _, atest_combodac_to_gpio_native, _, _, _, _), 976 + PINGROUP(31, uim1_data, _, _, atest_combodac_to_gpio_native, _, _, _, _, _), 977 + PINGROUP(32, uim1_clk, _, _, atest_combodac_to_gpio_native, _, _, _, _, _), 978 + PINGROUP(33, uim1_reset, _, _, atest_combodac_to_gpio_native, _, _, _, _, _), 979 + PINGROUP(34, uim1_present, gcc_plltest, _, _, atest_combodac_to_gpio_native, _, _, _, _), 980 + PINGROUP(35, uim_batt, gcc_plltest, _, atest_combodac_to_gpio_native, _, _, _, _, _), 981 + PINGROUP(36, coex_uart, _, _, _, _, _, _, _, _), 982 + PINGROUP(37, coex_uart, _, _, _, _, _, _, _, _), 983 + PINGROUP(38, _, _, _, qdss_cti_trig_in_a0, _, _, _, _, _), 984 + PINGROUP(39, _, _, _, qdss_tracedata_b, _, atest_bbrx1, _, _, _), 985 + PINGROUP(40, _, cri_trng0, _, _, _, _, qdss_tracedata_b, _, atest_bbrx0), 986 + PINGROUP(41, _, _, _, _, _, qdss_tracedata_b, _, atest_combodac_to_gpio_native, _), 987 + PINGROUP(42, _, cri_trng, _, _, qdss_tracedata_b, _, _, _, _), 988 + PINGROUP(43, _, _, _, _, qdss_tracedata_b, _, _, _, _), 989 + PINGROUP(44, _, _, qdss_cti_trig_in_b0, _, atest_gpsadc_dtest0_native, _, _, _, _), 990 + PINGROUP(45, _, _, qdss_cti_trig_out_b0, _, atest_combodac_to_gpio_native, _, _, _, _), 991 + PINGROUP(46, _, _, qdss_tracedata_b, _, _, _, _, _, _), 992 + PINGROUP(47, _, _, qdss_tracedata_b, _, _, _, _, _, _), 993 + PINGROUP(48, _, _, qdss_tracedata_b, _, _, _, _, _, _), 994 + PINGROUP(49, _, _, qdss_tracectl_b, _, atest_combodac_to_gpio_native, _, _, _, _), 995 + PINGROUP(50, _, _, qdss_traceclk_b, _, atest_combodac_to_gpio_native, _, _, _, _), 996 + PINGROUP(51, _, pa_indicator, _, qdss_tracedata_b, _, atest_combodac_to_gpio_native, _, _, 997 + _), 998 + PINGROUP(52, _, _, _, qdss_tracedata_b, _, atest_combodac_to_gpio_native, _, _, _), 999 + PINGROUP(53, _, modem_tsync, nav_tsync_out_a, nav_ptp_pps_in_a, ptp_pps_out_a, 1000 + qdss_tracedata_b, _, _, _), 1001 + PINGROUP(54, _, qdss_tracedata_b, _, atest_combodac_to_gpio_native, _, _, _, _, _), 1002 + PINGROUP(55, gsm0_tx, _, qdss_tracedata_b, _, atest_combodac_to_gpio_native, _, _, _, _), 1003 + PINGROUP(56, _, _, qdss_cti_trig_in_b1, _, _, _, _, _, _), 1004 + PINGROUP(57, _, cri_trng1, _, qdss_cti_trig_out_b1, _, atest_combodac_to_gpio_native, _, _, 1005 + _), 1006 + PINGROUP(58, _, ssbi1, _, qdss_tracedata_b, _, atest_gpsadc_dtest1_native, _, _, _), 1007 + PINGROUP(59, _, ssbi2, _, qdss_tracedata_b, _, atest_combodac_to_gpio_native, _, _, _), 1008 + PINGROUP(60, atest_char3, _, _, _, _, _, _, _, _), 1009 + PINGROUP(61, atest_char2, _, _, _, _, _, _, _, _), 1010 + PINGROUP(62, atest_char1, _, _, _, _, _, _, _, _), 1011 + PINGROUP(63, atest_char0, _, _, _, _, _, _, _, _), 1012 + PINGROUP(64, atest_char, _, _, _, _, _, _, _, _), 1013 + PINGROUP(65, _, _, _, _, _, _, _, _, _), 1014 + PINGROUP(66, _, _, _, _, _, _, _, _, _), 1015 + PINGROUP(67, _, _, _, _, _, _, _, _, _), 1016 + PINGROUP(68, _, _, _, _, _, _, _, _, _), 1017 + PINGROUP(69, _, _, _, _, _, _, _, _, _), 1018 + PINGROUP(70, _, _, ebi0_wrcdc, _, _, _, _, _, _), 1019 + PINGROUP(71, _, _, _, _, _, _, _, _, _), 1020 + PINGROUP(72, ldo_update, _, gcc_tlmm, _, _, _, _, _, _), 1021 + PINGROUP(73, ldo_en, dbg_out, _, _, _, atest_tsens, _, _, _), 1022 + PINGROUP(74, ebi2_lcd, _, _, _, _, _, _, _, _), 1023 + PINGROUP(75, nav_tsync_out_b, nav_ptp_pps_in_b, ptp_pps_out_b, _, qdss_tracedata_a, _, _, _, 1024 + _), 1025 + PINGROUP(76, pbs0, sec_mi2s, blsp3_spi, pwr_modem_enabled_a, _, qdss_tracedata_a, _, _, _), 1026 + PINGROUP(77, pbs1, sec_mi2s, blsp2_spi, pwr_modem_enabled_b, _, qdss_tracedata_a, _, _, _), 1027 + PINGROUP(78, pbs2, sec_mi2s, blsp1_spi, ebi2_lcd, m_voc, pwr_nav_enabled_b, _, 1028 + qdss_tracedata_a, _), 1029 + PINGROUP(79, sec_mi2s, _, pwr_crypto_enabled_b, _, qdss_tracedata_a, _, _, _, _), 1030 + SDC_PINGROUP(sdc1_clk, 0x10a000, 13, 6), 1031 + SDC_PINGROUP(sdc1_cmd, 0x10a000, 11, 3), 1032 + SDC_PINGROUP(sdc1_data, 0x10a000, 9, 0), 1033 + SDC_PINGROUP(sdc2_clk, 0x109000, 14, 6), 1034 + SDC_PINGROUP(sdc2_cmd, 0x109000, 11, 3), 1035 + SDC_PINGROUP(sdc2_data, 0x109000, 9, 0), 1036 + SDC_PINGROUP(qdsd_clk, 0x19c000, 3, 0), 1037 + SDC_PINGROUP(qdsd_cmd, 0x19c000, 8, 5), 1038 + SDC_PINGROUP(qdsd_data0, 0x19c000, 13, 10), 1039 + SDC_PINGROUP(qdsd_data1, 0x19c000, 18, 15), 1040 + SDC_PINGROUP(qdsd_data2, 0x19c000, 23, 20), 1041 + SDC_PINGROUP(qdsd_data3, 0x19c000, 28, 25), 1042 + }; 1043 + 1044 + static const struct msm_pinctrl_soc_data mdm9607_pinctrl = { 1045 + .pins = mdm9607_pins, 1046 + .npins = ARRAY_SIZE(mdm9607_pins), 1047 + .functions = mdm9607_functions, 1048 + .nfunctions = ARRAY_SIZE(mdm9607_functions), 1049 + .groups = mdm9607_groups, 1050 + .ngroups = ARRAY_SIZE(mdm9607_groups), 1051 + .ngpios = 80, 1052 + }; 1053 + 1054 + static int mdm9607_pinctrl_probe(struct platform_device *pdev) 1055 + { 1056 + return msm_pinctrl_probe(pdev, &mdm9607_pinctrl); 1057 + } 1058 + 1059 + static const struct of_device_id mdm9607_pinctrl_of_match[] = { 1060 + { .compatible = "qcom,mdm9607-tlmm", }, 1061 + { } 1062 + }; 1063 + 1064 + static struct platform_driver mdm9607_pinctrl_driver = { 1065 + .driver = { 1066 + .name = "mdm9607-pinctrl", 1067 + .of_match_table = mdm9607_pinctrl_of_match, 1068 + }, 1069 + .probe = mdm9607_pinctrl_probe, 1070 + .remove = msm_pinctrl_remove, 1071 + }; 1072 + 1073 + static int __init mdm9607_pinctrl_init(void) 1074 + { 1075 + return platform_driver_register(&mdm9607_pinctrl_driver); 1076 + } 1077 + arch_initcall(mdm9607_pinctrl_init); 1078 + 1079 + static void __exit mdm9607_pinctrl_exit(void) 1080 + { 1081 + platform_driver_unregister(&mdm9607_pinctrl_driver); 1082 + } 1083 + module_exit(mdm9607_pinctrl_exit); 1084 + 1085 + MODULE_DESCRIPTION("Qualcomm mdm9607 pinctrl driver"); 1086 + MODULE_LICENSE("GPL v2"); 1087 + MODULE_DEVICE_TABLE(of, mdm9607_pinctrl_of_match);
+923
drivers/pinctrl/qcom/pinctrl-sm6115.c
··· 1 + // SPDX-License-Identifier: GPL-2.0-only 2 + /* 3 + * Copyright (c) 2019, The Linux Foundation. All rights reserved. 4 + */ 5 + 6 + #include <linux/module.h> 7 + #include <linux/of.h> 8 + #include <linux/platform_device.h> 9 + #include <linux/pinctrl/pinctrl.h> 10 + 11 + #include "pinctrl-msm.h" 12 + 13 + static const char * const sm6115_tiles[] = { 14 + "south", 15 + "east", 16 + "west" 17 + }; 18 + 19 + enum { 20 + SOUTH, 21 + EAST, 22 + WEST 23 + }; 24 + 25 + #define FUNCTION(fname) \ 26 + [msm_mux_##fname] = { \ 27 + .name = #fname, \ 28 + .groups = fname##_groups, \ 29 + .ngroups = ARRAY_SIZE(fname##_groups), \ 30 + } 31 + 32 + #define PINGROUP(id, _tile, f1, f2, f3, f4, f5, f6, f7, f8, f9) \ 33 + { \ 34 + .name = "gpio" #id, \ 35 + .pins = gpio##id##_pins, \ 36 + .npins = (unsigned int)ARRAY_SIZE(gpio##id##_pins), \ 37 + .funcs = (int[]){ \ 38 + msm_mux_gpio, /* gpio mode */ \ 39 + msm_mux_##f1, \ 40 + msm_mux_##f2, \ 41 + msm_mux_##f3, \ 42 + msm_mux_##f4, \ 43 + msm_mux_##f5, \ 44 + msm_mux_##f6, \ 45 + msm_mux_##f7, \ 46 + msm_mux_##f8, \ 47 + msm_mux_##f9 \ 48 + }, \ 49 + .nfuncs = 10, \ 50 + .ctl_reg = 0x1000 * id, \ 51 + .io_reg = 0x4 + 0x1000 * id, \ 52 + .intr_cfg_reg = 0x8 + 0x1000 * id, \ 53 + .intr_status_reg = 0xc + 0x1000 * id, \ 54 + .intr_target_reg = 0x8 + 0x1000 * id, \ 55 + .tile = _tile, \ 56 + .mux_bit = 2, \ 57 + .pull_bit = 0, \ 58 + .drv_bit = 6, \ 59 + .oe_bit = 9, \ 60 + .in_bit = 0, \ 61 + .out_bit = 1, \ 62 + .intr_enable_bit = 0, \ 63 + .intr_status_bit = 0, \ 64 + .intr_target_bit = 5, \ 65 + .intr_target_kpss_val = 3, \ 66 + .intr_raw_status_bit = 4, \ 67 + .intr_polarity_bit = 1, \ 68 + .intr_detection_bit = 2, \ 69 + .intr_detection_width = 2, \ 70 + } 71 + 72 + #define SDC_QDSD_PINGROUP(pg_name, _tile, ctl, pull, drv) \ 73 + { \ 74 + .name = #pg_name, \ 75 + .pins = pg_name##_pins, \ 76 + .npins = (unsigned int)ARRAY_SIZE(pg_name##_pins), \ 77 + .ctl_reg = ctl, \ 78 + .io_reg = 0, \ 79 + .intr_cfg_reg = 0, \ 80 + .intr_status_reg = 0, \ 81 + .intr_target_reg = 0, \ 82 + .tile = _tile, \ 83 + .mux_bit = -1, \ 84 + .pull_bit = pull, \ 85 + .drv_bit = drv, \ 86 + .oe_bit = -1, \ 87 + .in_bit = -1, \ 88 + .out_bit = -1, \ 89 + .intr_enable_bit = -1, \ 90 + .intr_status_bit = -1, \ 91 + .intr_target_bit = -1, \ 92 + .intr_raw_status_bit = -1, \ 93 + .intr_polarity_bit = -1, \ 94 + .intr_detection_bit = -1, \ 95 + .intr_detection_width = -1, \ 96 + } 97 + 98 + #define UFS_RESET(pg_name, offset) \ 99 + { \ 100 + .name = #pg_name, \ 101 + .pins = pg_name##_pins, \ 102 + .npins = (unsigned int)ARRAY_SIZE(pg_name##_pins), \ 103 + .ctl_reg = offset, \ 104 + .io_reg = offset + 0x4, \ 105 + .intr_cfg_reg = 0, \ 106 + .intr_status_reg = 0, \ 107 + .intr_target_reg = 0, \ 108 + .tile = WEST, \ 109 + .mux_bit = -1, \ 110 + .pull_bit = 3, \ 111 + .drv_bit = 0, \ 112 + .oe_bit = -1, \ 113 + .in_bit = -1, \ 114 + .out_bit = 0, \ 115 + .intr_enable_bit = -1, \ 116 + .intr_status_bit = -1, \ 117 + .intr_target_bit = -1, \ 118 + .intr_raw_status_bit = -1, \ 119 + .intr_polarity_bit = -1, \ 120 + .intr_detection_bit = -1, \ 121 + .intr_detection_width = -1, \ 122 + } 123 + static const struct pinctrl_pin_desc sm6115_pins[] = { 124 + PINCTRL_PIN(0, "GPIO_0"), 125 + PINCTRL_PIN(1, "GPIO_1"), 126 + PINCTRL_PIN(2, "GPIO_2"), 127 + PINCTRL_PIN(3, "GPIO_3"), 128 + PINCTRL_PIN(4, "GPIO_4"), 129 + PINCTRL_PIN(5, "GPIO_5"), 130 + PINCTRL_PIN(6, "GPIO_6"), 131 + PINCTRL_PIN(7, "GPIO_7"), 132 + PINCTRL_PIN(8, "GPIO_8"), 133 + PINCTRL_PIN(9, "GPIO_9"), 134 + PINCTRL_PIN(10, "GPIO_10"), 135 + PINCTRL_PIN(11, "GPIO_11"), 136 + PINCTRL_PIN(12, "GPIO_12"), 137 + PINCTRL_PIN(13, "GPIO_13"), 138 + PINCTRL_PIN(14, "GPIO_14"), 139 + PINCTRL_PIN(15, "GPIO_15"), 140 + PINCTRL_PIN(16, "GPIO_16"), 141 + PINCTRL_PIN(17, "GPIO_17"), 142 + PINCTRL_PIN(18, "GPIO_18"), 143 + PINCTRL_PIN(19, "GPIO_19"), 144 + PINCTRL_PIN(20, "GPIO_20"), 145 + PINCTRL_PIN(21, "GPIO_21"), 146 + PINCTRL_PIN(22, "GPIO_22"), 147 + PINCTRL_PIN(23, "GPIO_23"), 148 + PINCTRL_PIN(24, "GPIO_24"), 149 + PINCTRL_PIN(25, "GPIO_25"), 150 + PINCTRL_PIN(26, "GPIO_26"), 151 + PINCTRL_PIN(27, "GPIO_27"), 152 + PINCTRL_PIN(28, "GPIO_28"), 153 + PINCTRL_PIN(29, "GPIO_29"), 154 + PINCTRL_PIN(30, "GPIO_30"), 155 + PINCTRL_PIN(31, "GPIO_31"), 156 + PINCTRL_PIN(32, "GPIO_32"), 157 + PINCTRL_PIN(33, "GPIO_33"), 158 + PINCTRL_PIN(34, "GPIO_34"), 159 + PINCTRL_PIN(35, "GPIO_35"), 160 + PINCTRL_PIN(36, "GPIO_36"), 161 + PINCTRL_PIN(37, "GPIO_37"), 162 + PINCTRL_PIN(38, "GPIO_38"), 163 + PINCTRL_PIN(39, "GPIO_39"), 164 + PINCTRL_PIN(40, "GPIO_40"), 165 + PINCTRL_PIN(41, "GPIO_41"), 166 + PINCTRL_PIN(42, "GPIO_42"), 167 + PINCTRL_PIN(43, "GPIO_43"), 168 + PINCTRL_PIN(44, "GPIO_44"), 169 + PINCTRL_PIN(45, "GPIO_45"), 170 + PINCTRL_PIN(46, "GPIO_46"), 171 + PINCTRL_PIN(47, "GPIO_47"), 172 + PINCTRL_PIN(48, "GPIO_48"), 173 + PINCTRL_PIN(49, "GPIO_49"), 174 + PINCTRL_PIN(50, "GPIO_50"), 175 + PINCTRL_PIN(51, "GPIO_51"), 176 + PINCTRL_PIN(52, "GPIO_52"), 177 + PINCTRL_PIN(53, "GPIO_53"), 178 + PINCTRL_PIN(54, "GPIO_54"), 179 + PINCTRL_PIN(55, "GPIO_55"), 180 + PINCTRL_PIN(56, "GPIO_56"), 181 + PINCTRL_PIN(57, "GPIO_57"), 182 + PINCTRL_PIN(58, "GPIO_58"), 183 + PINCTRL_PIN(59, "GPIO_59"), 184 + PINCTRL_PIN(60, "GPIO_60"), 185 + PINCTRL_PIN(61, "GPIO_61"), 186 + PINCTRL_PIN(62, "GPIO_62"), 187 + PINCTRL_PIN(63, "GPIO_63"), 188 + PINCTRL_PIN(64, "GPIO_64"), 189 + PINCTRL_PIN(65, "GPIO_65"), 190 + PINCTRL_PIN(66, "GPIO_66"), 191 + PINCTRL_PIN(67, "GPIO_67"), 192 + PINCTRL_PIN(68, "GPIO_68"), 193 + PINCTRL_PIN(69, "GPIO_69"), 194 + PINCTRL_PIN(70, "GPIO_70"), 195 + PINCTRL_PIN(71, "GPIO_71"), 196 + PINCTRL_PIN(72, "GPIO_72"), 197 + PINCTRL_PIN(73, "GPIO_73"), 198 + PINCTRL_PIN(74, "GPIO_74"), 199 + PINCTRL_PIN(75, "GPIO_75"), 200 + PINCTRL_PIN(76, "GPIO_76"), 201 + PINCTRL_PIN(77, "GPIO_77"), 202 + PINCTRL_PIN(78, "GPIO_78"), 203 + PINCTRL_PIN(79, "GPIO_79"), 204 + PINCTRL_PIN(80, "GPIO_80"), 205 + PINCTRL_PIN(81, "GPIO_81"), 206 + PINCTRL_PIN(82, "GPIO_82"), 207 + PINCTRL_PIN(83, "GPIO_83"), 208 + PINCTRL_PIN(84, "GPIO_84"), 209 + PINCTRL_PIN(85, "GPIO_85"), 210 + PINCTRL_PIN(86, "GPIO_86"), 211 + PINCTRL_PIN(87, "GPIO_87"), 212 + PINCTRL_PIN(88, "GPIO_88"), 213 + PINCTRL_PIN(89, "GPIO_89"), 214 + PINCTRL_PIN(90, "GPIO_90"), 215 + PINCTRL_PIN(91, "GPIO_91"), 216 + PINCTRL_PIN(92, "GPIO_92"), 217 + PINCTRL_PIN(93, "GPIO_93"), 218 + PINCTRL_PIN(94, "GPIO_94"), 219 + PINCTRL_PIN(95, "GPIO_95"), 220 + PINCTRL_PIN(96, "GPIO_96"), 221 + PINCTRL_PIN(97, "GPIO_97"), 222 + PINCTRL_PIN(98, "GPIO_98"), 223 + PINCTRL_PIN(99, "GPIO_99"), 224 + PINCTRL_PIN(100, "GPIO_100"), 225 + PINCTRL_PIN(101, "GPIO_101"), 226 + PINCTRL_PIN(102, "GPIO_102"), 227 + PINCTRL_PIN(103, "GPIO_103"), 228 + PINCTRL_PIN(104, "GPIO_104"), 229 + PINCTRL_PIN(105, "GPIO_105"), 230 + PINCTRL_PIN(106, "GPIO_106"), 231 + PINCTRL_PIN(107, "GPIO_107"), 232 + PINCTRL_PIN(108, "GPIO_108"), 233 + PINCTRL_PIN(109, "GPIO_109"), 234 + PINCTRL_PIN(110, "GPIO_110"), 235 + PINCTRL_PIN(111, "GPIO_111"), 236 + PINCTRL_PIN(112, "GPIO_112"), 237 + PINCTRL_PIN(113, "UFS_RESET"), 238 + PINCTRL_PIN(114, "SDC1_RCLK"), 239 + PINCTRL_PIN(115, "SDC1_CLK"), 240 + PINCTRL_PIN(116, "SDC1_CMD"), 241 + PINCTRL_PIN(117, "SDC1_DATA"), 242 + PINCTRL_PIN(118, "SDC2_CLK"), 243 + PINCTRL_PIN(119, "SDC2_CMD"), 244 + PINCTRL_PIN(120, "SDC2_DATA"), 245 + }; 246 + 247 + #define DECLARE_MSM_GPIO_PINS(pin) \ 248 + static const unsigned int gpio##pin##_pins[] = { pin } 249 + DECLARE_MSM_GPIO_PINS(0); 250 + DECLARE_MSM_GPIO_PINS(1); 251 + DECLARE_MSM_GPIO_PINS(2); 252 + DECLARE_MSM_GPIO_PINS(3); 253 + DECLARE_MSM_GPIO_PINS(4); 254 + DECLARE_MSM_GPIO_PINS(5); 255 + DECLARE_MSM_GPIO_PINS(6); 256 + DECLARE_MSM_GPIO_PINS(7); 257 + DECLARE_MSM_GPIO_PINS(8); 258 + DECLARE_MSM_GPIO_PINS(9); 259 + DECLARE_MSM_GPIO_PINS(10); 260 + DECLARE_MSM_GPIO_PINS(11); 261 + DECLARE_MSM_GPIO_PINS(12); 262 + DECLARE_MSM_GPIO_PINS(13); 263 + DECLARE_MSM_GPIO_PINS(14); 264 + DECLARE_MSM_GPIO_PINS(15); 265 + DECLARE_MSM_GPIO_PINS(16); 266 + DECLARE_MSM_GPIO_PINS(17); 267 + DECLARE_MSM_GPIO_PINS(18); 268 + DECLARE_MSM_GPIO_PINS(19); 269 + DECLARE_MSM_GPIO_PINS(20); 270 + DECLARE_MSM_GPIO_PINS(21); 271 + DECLARE_MSM_GPIO_PINS(22); 272 + DECLARE_MSM_GPIO_PINS(23); 273 + DECLARE_MSM_GPIO_PINS(24); 274 + DECLARE_MSM_GPIO_PINS(25); 275 + DECLARE_MSM_GPIO_PINS(26); 276 + DECLARE_MSM_GPIO_PINS(27); 277 + DECLARE_MSM_GPIO_PINS(28); 278 + DECLARE_MSM_GPIO_PINS(29); 279 + DECLARE_MSM_GPIO_PINS(30); 280 + DECLARE_MSM_GPIO_PINS(31); 281 + DECLARE_MSM_GPIO_PINS(32); 282 + DECLARE_MSM_GPIO_PINS(33); 283 + DECLARE_MSM_GPIO_PINS(34); 284 + DECLARE_MSM_GPIO_PINS(35); 285 + DECLARE_MSM_GPIO_PINS(36); 286 + DECLARE_MSM_GPIO_PINS(37); 287 + DECLARE_MSM_GPIO_PINS(38); 288 + DECLARE_MSM_GPIO_PINS(39); 289 + DECLARE_MSM_GPIO_PINS(40); 290 + DECLARE_MSM_GPIO_PINS(41); 291 + DECLARE_MSM_GPIO_PINS(42); 292 + DECLARE_MSM_GPIO_PINS(43); 293 + DECLARE_MSM_GPIO_PINS(44); 294 + DECLARE_MSM_GPIO_PINS(45); 295 + DECLARE_MSM_GPIO_PINS(46); 296 + DECLARE_MSM_GPIO_PINS(47); 297 + DECLARE_MSM_GPIO_PINS(48); 298 + DECLARE_MSM_GPIO_PINS(49); 299 + DECLARE_MSM_GPIO_PINS(50); 300 + DECLARE_MSM_GPIO_PINS(51); 301 + DECLARE_MSM_GPIO_PINS(52); 302 + DECLARE_MSM_GPIO_PINS(53); 303 + DECLARE_MSM_GPIO_PINS(54); 304 + DECLARE_MSM_GPIO_PINS(55); 305 + DECLARE_MSM_GPIO_PINS(56); 306 + DECLARE_MSM_GPIO_PINS(57); 307 + DECLARE_MSM_GPIO_PINS(58); 308 + DECLARE_MSM_GPIO_PINS(59); 309 + DECLARE_MSM_GPIO_PINS(60); 310 + DECLARE_MSM_GPIO_PINS(61); 311 + DECLARE_MSM_GPIO_PINS(62); 312 + DECLARE_MSM_GPIO_PINS(63); 313 + DECLARE_MSM_GPIO_PINS(64); 314 + DECLARE_MSM_GPIO_PINS(65); 315 + DECLARE_MSM_GPIO_PINS(66); 316 + DECLARE_MSM_GPIO_PINS(67); 317 + DECLARE_MSM_GPIO_PINS(68); 318 + DECLARE_MSM_GPIO_PINS(69); 319 + DECLARE_MSM_GPIO_PINS(70); 320 + DECLARE_MSM_GPIO_PINS(71); 321 + DECLARE_MSM_GPIO_PINS(72); 322 + DECLARE_MSM_GPIO_PINS(73); 323 + DECLARE_MSM_GPIO_PINS(74); 324 + DECLARE_MSM_GPIO_PINS(75); 325 + DECLARE_MSM_GPIO_PINS(76); 326 + DECLARE_MSM_GPIO_PINS(77); 327 + DECLARE_MSM_GPIO_PINS(78); 328 + DECLARE_MSM_GPIO_PINS(79); 329 + DECLARE_MSM_GPIO_PINS(80); 330 + DECLARE_MSM_GPIO_PINS(81); 331 + DECLARE_MSM_GPIO_PINS(82); 332 + DECLARE_MSM_GPIO_PINS(83); 333 + DECLARE_MSM_GPIO_PINS(84); 334 + DECLARE_MSM_GPIO_PINS(85); 335 + DECLARE_MSM_GPIO_PINS(86); 336 + DECLARE_MSM_GPIO_PINS(87); 337 + DECLARE_MSM_GPIO_PINS(88); 338 + DECLARE_MSM_GPIO_PINS(89); 339 + DECLARE_MSM_GPIO_PINS(90); 340 + DECLARE_MSM_GPIO_PINS(91); 341 + DECLARE_MSM_GPIO_PINS(92); 342 + DECLARE_MSM_GPIO_PINS(93); 343 + DECLARE_MSM_GPIO_PINS(94); 344 + DECLARE_MSM_GPIO_PINS(95); 345 + DECLARE_MSM_GPIO_PINS(96); 346 + DECLARE_MSM_GPIO_PINS(97); 347 + DECLARE_MSM_GPIO_PINS(98); 348 + DECLARE_MSM_GPIO_PINS(99); 349 + DECLARE_MSM_GPIO_PINS(100); 350 + DECLARE_MSM_GPIO_PINS(101); 351 + DECLARE_MSM_GPIO_PINS(102); 352 + DECLARE_MSM_GPIO_PINS(103); 353 + DECLARE_MSM_GPIO_PINS(104); 354 + DECLARE_MSM_GPIO_PINS(105); 355 + DECLARE_MSM_GPIO_PINS(106); 356 + DECLARE_MSM_GPIO_PINS(107); 357 + DECLARE_MSM_GPIO_PINS(108); 358 + DECLARE_MSM_GPIO_PINS(109); 359 + DECLARE_MSM_GPIO_PINS(110); 360 + DECLARE_MSM_GPIO_PINS(111); 361 + DECLARE_MSM_GPIO_PINS(112); 362 + 363 + static const unsigned int ufs_reset_pins[] = { 113 }; 364 + static const unsigned int sdc1_rclk_pins[] = { 114 }; 365 + static const unsigned int sdc1_clk_pins[] = { 115 }; 366 + static const unsigned int sdc1_cmd_pins[] = { 116 }; 367 + static const unsigned int sdc1_data_pins[] = { 117 }; 368 + static const unsigned int sdc2_clk_pins[] = { 118 }; 369 + static const unsigned int sdc2_cmd_pins[] = { 119 }; 370 + static const unsigned int sdc2_data_pins[] = { 120 }; 371 + 372 + enum sm6115_functions { 373 + msm_mux_adsp_ext, 374 + msm_mux_agera_pll, 375 + msm_mux_atest, 376 + msm_mux_cam_mclk, 377 + msm_mux_cci_async, 378 + msm_mux_cci_i2c, 379 + msm_mux_cci_timer, 380 + msm_mux_cri_trng, 381 + msm_mux_dac_calib, 382 + msm_mux_dbg_out, 383 + msm_mux_ddr_bist, 384 + msm_mux_ddr_pxi0, 385 + msm_mux_ddr_pxi1, 386 + msm_mux_ddr_pxi2, 387 + msm_mux_ddr_pxi3, 388 + msm_mux_gcc_gp1, 389 + msm_mux_gcc_gp2, 390 + msm_mux_gcc_gp3, 391 + msm_mux_gpio, 392 + msm_mux_gp_pdm0, 393 + msm_mux_gp_pdm1, 394 + msm_mux_gp_pdm2, 395 + msm_mux_gsm0_tx, 396 + msm_mux_gsm1_tx, 397 + msm_mux_jitter_bist, 398 + msm_mux_mdp_vsync, 399 + msm_mux_mdp_vsync_out_0, 400 + msm_mux_mdp_vsync_out_1, 401 + msm_mux_mpm_pwr, 402 + msm_mux_mss_lte, 403 + msm_mux_m_voc, 404 + msm_mux_nav_gpio, 405 + msm_mux_pa_indicator, 406 + msm_mux_pbs, 407 + msm_mux_pbs_out, 408 + msm_mux_phase_flag, 409 + msm_mux_pll_bist, 410 + msm_mux_pll_bypassnl, 411 + msm_mux_pll_reset, 412 + msm_mux_prng_rosc, 413 + msm_mux_qdss_cti, 414 + msm_mux_qdss_gpio, 415 + msm_mux_qup0, 416 + msm_mux_qup1, 417 + msm_mux_qup2, 418 + msm_mux_qup3, 419 + msm_mux_qup4, 420 + msm_mux_qup5, 421 + msm_mux_sdc1_tb, 422 + msm_mux_sdc2_tb, 423 + msm_mux_sd_write, 424 + msm_mux_ssbi_wtr1, 425 + msm_mux_tgu, 426 + msm_mux_tsense_pwm, 427 + msm_mux_uim1_clk, 428 + msm_mux_uim1_data, 429 + msm_mux_uim1_present, 430 + msm_mux_uim1_reset, 431 + msm_mux_uim2_clk, 432 + msm_mux_uim2_data, 433 + msm_mux_uim2_present, 434 + msm_mux_uim2_reset, 435 + msm_mux_usb_phy, 436 + msm_mux_vfr_1, 437 + msm_mux_vsense_trigger, 438 + msm_mux_wlan1_adc0, 439 + msm_mux_wlan1_adc1, 440 + msm_mux__, 441 + }; 442 + 443 + static const char * const qup0_groups[] = { 444 + "gpio0", "gpio1", "gpio2", "gpio3", "gpio82", "gpio86", 445 + }; 446 + static const char * const gpio_groups[] = { 447 + "gpio0", "gpio1", "gpio2", "gpio3", "gpio4", "gpio5", "gpio6", "gpio7", 448 + "gpio8", "gpio9", "gpio10", "gpio11", "gpio12", "gpio13", "gpio14", 449 + "gpio15", "gpio16", "gpio17", "gpio18", "gpio19", "gpio20", "gpio21", 450 + "gpio22", "gpio23", "gpio24", "gpio25", "gpio26", "gpio27", "gpio28", 451 + "gpio29", "gpio30", "gpio31", "gpio32", "gpio33", "gpio34", "gpio35", 452 + "gpio36", "gpio37", "gpio38", "gpio39", "gpio40", "gpio41", "gpio42", 453 + "gpio43", "gpio44", "gpio45", "gpio46", "gpio47", "gpio48", "gpio49", 454 + "gpio50", "gpio51", "gpio52", "gpio53", "gpio54", "gpio55", "gpio56", 455 + "gpio57", "gpio58", "gpio59", "gpio60", "gpio61", "gpio62", "gpio63", 456 + "gpio64", "gpio65", "gpio66", "gpio67", "gpio68", "gpio69", "gpio70", 457 + "gpio71", "gpio72", "gpio73", "gpio74", "gpio75", "gpio76", "gpio77", 458 + "gpio78", "gpio79", "gpio80", "gpio81", "gpio82", "gpio83", "gpio84", 459 + "gpio85", "gpio86", "gpio87", "gpio88", "gpio89", "gpio90", "gpio91", 460 + "gpio92", "gpio93", "gpio94", "gpio95", "gpio96", "gpio97", "gpio98", 461 + "gpio99", "gpio100", "gpio101", "gpio102", "gpio103", "gpio104", 462 + "gpio105", "gpio106", "gpio107", "gpio108", "gpio109", "gpio110", 463 + "gpio111", "gpio112", 464 + }; 465 + static const char * const ddr_bist_groups[] = { 466 + "gpio0", "gpio1", "gpio2", "gpio3", 467 + }; 468 + static const char * const phase_flag_groups[] = { 469 + "gpio0", "gpio1", "gpio2", "gpio3", "gpio4", "gpio5", "gpio6", 470 + "gpio14", "gpio15", "gpio16", "gpio17", "gpio22", "gpio23", "gpio24", 471 + "gpio25", "gpio26", "gpio29", "gpio30", "gpio31", "gpio32", "gpio33", 472 + "gpio35", "gpio36", "gpio43", "gpio44", "gpio45", "gpio63", "gpio64", 473 + "gpio102", "gpio103", "gpio104", "gpio105", 474 + }; 475 + static const char * const qdss_gpio_groups[] = { 476 + "gpio0", "gpio1", "gpio2", "gpio3", "gpio8", "gpio9", "gpio10", 477 + "gpio11", "gpio14", "gpio15", "gpio16", "gpio17", "gpio18", "gpio19", 478 + "gpio20", "gpio21", "gpio22", "gpio23", "gpio24", "gpio25", "gpio26", 479 + "gpio47", "gpio48", "gpio69", "gpio70", "gpio87", "gpio90", "gpio91", 480 + "gpio94", "gpio95", "gpio104", "gpio105", "gpio106", "gpio107", 481 + "gpio109", "gpio110", 482 + }; 483 + static const char * const atest_groups[] = { 484 + "gpio0", "gpio1", "gpio2", "gpio3", "gpio4", "gpio5", "gpio6", 485 + "gpio22", "gpio23", "gpio24", "gpio25", "gpio26", "gpio29", "gpio30", 486 + "gpio31", "gpio32", "gpio33", "gpio86", "gpio87", "gpio88", "gpio89", 487 + "gpio100", "gpio101", 488 + }; 489 + static const char * const mpm_pwr_groups[] = { 490 + "gpio1", 491 + }; 492 + static const char * const m_voc_groups[] = { 493 + "gpio0", 494 + }; 495 + static const char * const dac_calib_groups[] = { 496 + "gpio2", "gpio3", "gpio4", "gpio5", "gpio6", "gpio14", "gpio15", 497 + "gpio16", "gpio17", "gpio22", "gpio23", "gpio24", "gpio25", "gpio26", 498 + "gpio29", "gpio30", "gpio31", "gpio32", "gpio33", "gpio80", "gpio81", 499 + "gpio82", "gpio102", "gpio103", "gpio104", "gpio105" 500 + }; 501 + static const char * const qup1_groups[] = { 502 + "gpio4", "gpio5", "gpio69", "gpio70", 503 + }; 504 + static const char * const cri_trng_groups[] = { 505 + "gpio4", "gpio5", "gpio18", 506 + }; 507 + static const char * const qup2_groups[] = { 508 + "gpio6", "gpio7", "gpio71", "gpio80", 509 + }; 510 + static const char * const qup3_groups[] = { 511 + "gpio8", "gpio9", "gpio10", "gpio11", 512 + }; 513 + static const char * const pbs_out_groups[] = { 514 + "gpio8", "gpio9", "gpio52", 515 + }; 516 + static const char * const pll_bist_groups[] = { 517 + "gpio8", "gpio9", 518 + }; 519 + static const char * const tsense_pwm_groups[] = { 520 + "gpio8", 521 + }; 522 + static const char * const agera_pll_groups[] = { 523 + "gpio10", "gpio11", 524 + }; 525 + static const char * const pbs_groups[] = { 526 + "gpio10", "gpio11", "gpio18", "gpio19", "gpio20", "gpio21", "gpio22", 527 + "gpio23", "gpio24", "gpio25", "gpio26", "gpio47", "gpio48", "gpio87", 528 + "gpio90", "gpio91", 529 + }; 530 + static const char * const qup4_groups[] = { 531 + "gpio12", "gpio13", "gpio96", "gpio97", 532 + }; 533 + static const char * const tgu_groups[] = { 534 + "gpio12", "gpio13", "gpio14", "gpio15", 535 + }; 536 + static const char * const qup5_groups[] = { 537 + "gpio14", "gpio15", "gpio16", "gpio17", 538 + }; 539 + static const char * const sdc2_tb_groups[] = { 540 + "gpio18", 541 + }; 542 + static const char * const sdc1_tb_groups[] = { 543 + "gpio19", 544 + }; 545 + static const char * const cam_mclk_groups[] = { 546 + "gpio20", "gpio21", "gpio27", "gpio28", 547 + }; 548 + static const char * const adsp_ext_groups[] = { 549 + "gpio21", 550 + }; 551 + static const char * const cci_i2c_groups[] = { 552 + "gpio22", "gpio23", "gpio29", "gpio30", 553 + }; 554 + static const char * const prng_rosc_groups[] = { 555 + "gpio22", "gpio23", 556 + }; 557 + static const char * const cci_timer_groups[] = { 558 + "gpio24", "gpio25", "gpio28", "gpio32", 559 + }; 560 + static const char * const gcc_gp1_groups[] = { 561 + "gpio24", "gpio86", 562 + }; 563 + static const char * const cci_async_groups[] = { 564 + "gpio25", 565 + }; 566 + static const char * const vsense_trigger_groups[] = { 567 + "gpio26", 568 + }; 569 + static const char * const qdss_cti_groups[] = { 570 + "gpio27", "gpio28", "gpio72", "gpio73", "gpio96", "gpio97", 571 + }; 572 + static const char * const gp_pdm0_groups[] = { 573 + "gpio31", "gpio95", 574 + }; 575 + static const char * const gp_pdm1_groups[] = { 576 + "gpio32", "gpio96", 577 + }; 578 + static const char * const gp_pdm2_groups[] = { 579 + "gpio33", "gpio97", 580 + }; 581 + static const char * const nav_gpio_groups[] = { 582 + "gpio42", "gpio47", "gpio52", "gpio95", "gpio96", "gpio97", "gpio106", 583 + "gpio107", "gpio108", 584 + }; 585 + static const char * const vfr_1_groups[] = { 586 + "gpio48", 587 + }; 588 + static const char * const pa_indicator_groups[] = { 589 + "gpio49", 590 + }; 591 + static const char * const gsm1_tx_groups[] = { 592 + "gpio53", 593 + }; 594 + static const char * const ssbi_wtr1_groups[] = { 595 + "gpio59", "gpio60", 596 + }; 597 + static const char * const pll_bypassnl_groups[] = { 598 + "gpio62", 599 + }; 600 + static const char * const pll_reset_groups[] = { 601 + "gpio63", 602 + }; 603 + static const char * const ddr_pxi0_groups[] = { 604 + "gpio63", "gpio64", 605 + }; 606 + static const char * const gsm0_tx_groups[] = { 607 + "gpio64", 608 + }; 609 + static const char * const gcc_gp2_groups[] = { 610 + "gpio69", "gpio107", 611 + }; 612 + static const char * const ddr_pxi1_groups[] = { 613 + "gpio69", "gpio70", 614 + }; 615 + static const char * const gcc_gp3_groups[] = { 616 + "gpio70", "gpio106", 617 + }; 618 + static const char * const dbg_out_groups[] = { 619 + "gpio71", 620 + }; 621 + static const char * const uim2_data_groups[] = { 622 + "gpio72", 623 + }; 624 + static const char * const uim2_clk_groups[] = { 625 + "gpio73", 626 + }; 627 + static const char * const uim2_reset_groups[] = { 628 + "gpio74", 629 + }; 630 + static const char * const uim2_present_groups[] = { 631 + "gpio75", 632 + }; 633 + static const char * const uim1_data_groups[] = { 634 + "gpio76", 635 + }; 636 + static const char * const uim1_clk_groups[] = { 637 + "gpio77", 638 + }; 639 + static const char * const uim1_reset_groups[] = { 640 + "gpio78", 641 + }; 642 + static const char * const uim1_present_groups[] = { 643 + "gpio79", 644 + }; 645 + static const char * const mdp_vsync_groups[] = { 646 + "gpio81", "gpio96", "gpio97", 647 + }; 648 + static const char * const mdp_vsync_out_0_groups[] = { 649 + "gpio81", 650 + }; 651 + static const char * const mdp_vsync_out_1_groups[] = { 652 + "gpio81", 653 + }; 654 + static const char * const usb_phy_groups[] = { 655 + "gpio89", 656 + }; 657 + static const char * const mss_lte_groups[] = { 658 + "gpio90", "gpio91", 659 + }; 660 + static const char * const wlan1_adc0_groups[] = { 661 + "gpio94", 662 + }; 663 + static const char * const wlan1_adc1_groups[] = { 664 + "gpio95", 665 + }; 666 + static const char * const sd_write_groups[] = { 667 + "gpio96", 668 + }; 669 + static const char * const jitter_bist_groups[] = { 670 + "gpio96", "gpio97", 671 + }; 672 + static const char * const ddr_pxi2_groups[] = { 673 + "gpio102", "gpio103", 674 + }; 675 + static const char * const ddr_pxi3_groups[] = { 676 + "gpio104", "gpio105", 677 + }; 678 + 679 + static const struct msm_function sm6115_functions[] = { 680 + FUNCTION(adsp_ext), 681 + FUNCTION(agera_pll), 682 + FUNCTION(atest), 683 + FUNCTION(cam_mclk), 684 + FUNCTION(cci_async), 685 + FUNCTION(cci_i2c), 686 + FUNCTION(cci_timer), 687 + FUNCTION(cri_trng), 688 + FUNCTION(dac_calib), 689 + FUNCTION(dbg_out), 690 + FUNCTION(ddr_bist), 691 + FUNCTION(ddr_pxi0), 692 + FUNCTION(ddr_pxi1), 693 + FUNCTION(ddr_pxi2), 694 + FUNCTION(ddr_pxi3), 695 + FUNCTION(gcc_gp1), 696 + FUNCTION(gcc_gp2), 697 + FUNCTION(gcc_gp3), 698 + FUNCTION(gpio), 699 + FUNCTION(gp_pdm0), 700 + FUNCTION(gp_pdm1), 701 + FUNCTION(gp_pdm2), 702 + FUNCTION(gsm0_tx), 703 + FUNCTION(gsm1_tx), 704 + FUNCTION(jitter_bist), 705 + FUNCTION(mdp_vsync), 706 + FUNCTION(mdp_vsync_out_0), 707 + FUNCTION(mdp_vsync_out_1), 708 + FUNCTION(mpm_pwr), 709 + FUNCTION(mss_lte), 710 + FUNCTION(m_voc), 711 + FUNCTION(nav_gpio), 712 + FUNCTION(pa_indicator), 713 + FUNCTION(pbs), 714 + FUNCTION(pbs_out), 715 + FUNCTION(phase_flag), 716 + FUNCTION(pll_bist), 717 + FUNCTION(pll_bypassnl), 718 + FUNCTION(pll_reset), 719 + FUNCTION(prng_rosc), 720 + FUNCTION(qdss_cti), 721 + FUNCTION(qdss_gpio), 722 + FUNCTION(qup0), 723 + FUNCTION(qup1), 724 + FUNCTION(qup2), 725 + FUNCTION(qup3), 726 + FUNCTION(qup4), 727 + FUNCTION(qup5), 728 + FUNCTION(sdc1_tb), 729 + FUNCTION(sdc2_tb), 730 + FUNCTION(sd_write), 731 + FUNCTION(ssbi_wtr1), 732 + FUNCTION(tgu), 733 + FUNCTION(tsense_pwm), 734 + FUNCTION(uim1_clk), 735 + FUNCTION(uim1_data), 736 + FUNCTION(uim1_present), 737 + FUNCTION(uim1_reset), 738 + FUNCTION(uim2_clk), 739 + FUNCTION(uim2_data), 740 + FUNCTION(uim2_present), 741 + FUNCTION(uim2_reset), 742 + FUNCTION(usb_phy), 743 + FUNCTION(vfr_1), 744 + FUNCTION(vsense_trigger), 745 + FUNCTION(wlan1_adc0), 746 + FUNCTION(wlan1_adc1), 747 + }; 748 + 749 + /* Every pin is maintained as a single group, and missing or non-existing pin 750 + * would be maintained as dummy group to synchronize pin group index with 751 + * pin descriptor registered with pinctrl core. 752 + * Clients would not be able to request these dummy pin groups. 753 + */ 754 + static const struct msm_pingroup sm6115_groups[] = { 755 + [0] = PINGROUP(0, WEST, qup0, m_voc, ddr_bist, _, phase_flag, qdss_gpio, atest, _, _), 756 + [1] = PINGROUP(1, WEST, qup0, mpm_pwr, ddr_bist, _, phase_flag, qdss_gpio, atest, _, _), 757 + [2] = PINGROUP(2, WEST, qup0, ddr_bist, _, phase_flag, qdss_gpio, dac_calib, atest, _, _), 758 + [3] = PINGROUP(3, WEST, qup0, ddr_bist, _, phase_flag, qdss_gpio, dac_calib, atest, _, _), 759 + [4] = PINGROUP(4, WEST, qup1, cri_trng, _, phase_flag, dac_calib, atest, _, _, _), 760 + [5] = PINGROUP(5, WEST, qup1, cri_trng, _, phase_flag, dac_calib, atest, _, _, _), 761 + [6] = PINGROUP(6, WEST, qup2, _, phase_flag, dac_calib, atest, _, _, _, _), 762 + [7] = PINGROUP(7, WEST, qup2, _, _, _, _, _, _, _, _), 763 + [8] = PINGROUP(8, EAST, qup3, pbs_out, pll_bist, _, qdss_gpio, _, tsense_pwm, _, _), 764 + [9] = PINGROUP(9, EAST, qup3, pbs_out, pll_bist, _, qdss_gpio, _, _, _, _), 765 + [10] = PINGROUP(10, EAST, qup3, agera_pll, _, pbs, qdss_gpio, _, _, _, _), 766 + [11] = PINGROUP(11, EAST, qup3, agera_pll, _, pbs, qdss_gpio, _, _, _, _), 767 + [12] = PINGROUP(12, WEST, qup4, tgu, _, _, _, _, _, _, _), 768 + [13] = PINGROUP(13, WEST, qup4, tgu, _, _, _, _, _, _, _), 769 + [14] = PINGROUP(14, WEST, qup5, tgu, _, phase_flag, qdss_gpio, dac_calib, _, _, _), 770 + [15] = PINGROUP(15, WEST, qup5, tgu, _, phase_flag, qdss_gpio, dac_calib, _, _, _), 771 + [16] = PINGROUP(16, WEST, qup5, _, phase_flag, qdss_gpio, dac_calib, _, _, _, _), 772 + [17] = PINGROUP(17, WEST, qup5, _, phase_flag, qdss_gpio, dac_calib, _, _, _, _), 773 + [18] = PINGROUP(18, EAST, sdc2_tb, cri_trng, pbs, qdss_gpio, _, _, _, _, _), 774 + [19] = PINGROUP(19, EAST, sdc1_tb, pbs, qdss_gpio, _, _, _, _, _, _), 775 + [20] = PINGROUP(20, EAST, cam_mclk, pbs, qdss_gpio, _, _, _, _, _, _), 776 + [21] = PINGROUP(21, EAST, cam_mclk, adsp_ext, pbs, qdss_gpio, _, _, _, _, _), 777 + [22] = PINGROUP(22, EAST, cci_i2c, prng_rosc, _, pbs, phase_flag, qdss_gpio, dac_calib, atest, _), 778 + [23] = PINGROUP(23, EAST, cci_i2c, prng_rosc, _, pbs, phase_flag, qdss_gpio, dac_calib, atest, _), 779 + [24] = PINGROUP(24, EAST, cci_timer, gcc_gp1, _, pbs, phase_flag, qdss_gpio, dac_calib, atest, _), 780 + [25] = PINGROUP(25, EAST, cci_async, cci_timer, _, pbs, phase_flag, qdss_gpio, dac_calib, atest, _), 781 + [26] = PINGROUP(26, EAST, _, pbs, phase_flag, qdss_gpio, dac_calib, atest, vsense_trigger, _, _), 782 + [27] = PINGROUP(27, EAST, cam_mclk, qdss_cti, _, _, _, _, _, _, _), 783 + [28] = PINGROUP(28, EAST, cam_mclk, cci_timer, qdss_cti, _, _, _, _, _, _), 784 + [29] = PINGROUP(29, EAST, cci_i2c, _, phase_flag, dac_calib, atest, _, _, _, _), 785 + [30] = PINGROUP(30, EAST, cci_i2c, _, phase_flag, dac_calib, atest, _, _, _, _), 786 + [31] = PINGROUP(31, EAST, gp_pdm0, _, phase_flag, dac_calib, atest, _, _, _, _), 787 + [32] = PINGROUP(32, EAST, cci_timer, gp_pdm1, _, phase_flag, dac_calib, atest, _, _, _), 788 + [33] = PINGROUP(33, EAST, gp_pdm2, _, phase_flag, dac_calib, atest, _, _, _, _), 789 + [34] = PINGROUP(34, EAST, _, _, _, _, _, _, _, _, _), 790 + [35] = PINGROUP(35, EAST, _, phase_flag, _, _, _, _, _, _, _), 791 + [36] = PINGROUP(36, EAST, _, phase_flag, _, _, _, _, _, _, _), 792 + [37] = PINGROUP(37, EAST, _, _, _, _, _, _, _, _, _), 793 + [38] = PINGROUP(38, EAST, _, _, _, _, _, _, _, _, _), 794 + [39] = PINGROUP(39, EAST, _, _, _, _, _, _, _, _, _), 795 + [40] = PINGROUP(40, EAST, _, _, _, _, _, _, _, _, _), 796 + [41] = PINGROUP(41, EAST, _, _, _, _, _, _, _, _, _), 797 + [42] = PINGROUP(42, EAST, _, nav_gpio, _, _, _, _, _, _, _), 798 + [43] = PINGROUP(43, EAST, _, _, phase_flag, _, _, _, _, _, _), 799 + [44] = PINGROUP(44, EAST, _, _, phase_flag, _, _, _, _, _, _), 800 + [45] = PINGROUP(45, EAST, _, _, phase_flag, _, _, _, _, _, _), 801 + [46] = PINGROUP(46, EAST, _, _, _, _, _, _, _, _, _), 802 + [47] = PINGROUP(47, EAST, _, nav_gpio, pbs, qdss_gpio, _, _, _, _, _), 803 + [48] = PINGROUP(48, EAST, _, vfr_1, _, pbs, qdss_gpio, _, _, _, _), 804 + [49] = PINGROUP(49, EAST, _, pa_indicator, _, _, _, _, _, _, _), 805 + [50] = PINGROUP(50, EAST, _, _, _, _, _, _, _, _, _), 806 + [51] = PINGROUP(51, EAST, _, _, _, _, _, _, _, _, _), 807 + [52] = PINGROUP(52, EAST, _, nav_gpio, pbs_out, _, _, _, _, _, _), 808 + [53] = PINGROUP(53, EAST, _, gsm1_tx, _, _, _, _, _, _, _), 809 + [54] = PINGROUP(54, EAST, _, _, _, _, _, _, _, _, _), 810 + [55] = PINGROUP(55, EAST, _, _, _, _, _, _, _, _, _), 811 + [56] = PINGROUP(56, EAST, _, _, _, _, _, _, _, _, _), 812 + [57] = PINGROUP(57, EAST, _, _, _, _, _, _, _, _, _), 813 + [58] = PINGROUP(58, EAST, _, _, _, _, _, _, _, _, _), 814 + [59] = PINGROUP(59, EAST, _, ssbi_wtr1, _, _, _, _, _, _, _), 815 + [60] = PINGROUP(60, EAST, _, ssbi_wtr1, _, _, _, _, _, _, _), 816 + [61] = PINGROUP(61, EAST, _, _, _, _, _, _, _, _, _), 817 + [62] = PINGROUP(62, EAST, _, pll_bypassnl, _, _, _, _, _, _, _), 818 + [63] = PINGROUP(63, EAST, pll_reset, _, phase_flag, ddr_pxi0, _, _, _, _, _), 819 + [64] = PINGROUP(64, EAST, gsm0_tx, _, phase_flag, ddr_pxi0, _, _, _, _, _), 820 + [65] = PINGROUP(65, WEST, _, _, _, _, _, _, _, _, _), 821 + [66] = PINGROUP(66, WEST, _, _, _, _, _, _, _, _, _), 822 + [67] = PINGROUP(67, WEST, _, _, _, _, _, _, _, _, _), 823 + [68] = PINGROUP(68, WEST, _, _, _, _, _, _, _, _, _), 824 + [69] = PINGROUP(69, WEST, qup1, gcc_gp2, qdss_gpio, ddr_pxi1, _, _, _, _, _), 825 + [70] = PINGROUP(70, WEST, qup1, gcc_gp3, qdss_gpio, ddr_pxi1, _, _, _, _, _), 826 + [71] = PINGROUP(71, WEST, qup2, dbg_out, _, _, _, _, _, _, _), 827 + [72] = PINGROUP(72, SOUTH, uim2_data, qdss_cti, _, _, _, _, _, _, _), 828 + [73] = PINGROUP(73, SOUTH, uim2_clk, _, qdss_cti, _, _, _, _, _, _), 829 + [74] = PINGROUP(74, SOUTH, uim2_reset, _, _, _, _, _, _, _, _), 830 + [75] = PINGROUP(75, SOUTH, uim2_present, _, _, _, _, _, _, _, _), 831 + [76] = PINGROUP(76, SOUTH, uim1_data, _, _, _, _, _, _, _, _), 832 + [77] = PINGROUP(77, SOUTH, uim1_clk, _, _, _, _, _, _, _, _), 833 + [78] = PINGROUP(78, SOUTH, uim1_reset, _, _, _, _, _, _, _, _), 834 + [79] = PINGROUP(79, SOUTH, uim1_present, _, _, _, _, _, _, _, _), 835 + [80] = PINGROUP(80, WEST, qup2, dac_calib, _, _, _, _, _, _, _), 836 + [81] = PINGROUP(81, WEST, mdp_vsync_out_0, mdp_vsync_out_1, mdp_vsync, dac_calib, _, _, _, _, _), 837 + [82] = PINGROUP(82, WEST, qup0, dac_calib, _, _, _, _, _, _, _), 838 + [83] = PINGROUP(83, WEST, _, _, _, _, _, _, _, _, _), 839 + [84] = PINGROUP(84, WEST, _, _, _, _, _, _, _, _, _), 840 + [85] = PINGROUP(85, WEST, _, _, _, _, _, _, _, _, _), 841 + [86] = PINGROUP(86, WEST, qup0, gcc_gp1, atest, _, _, _, _, _, _), 842 + [87] = PINGROUP(87, EAST, pbs, qdss_gpio, _, _, _, _, _, _, _), 843 + [88] = PINGROUP(88, EAST, _, _, _, _, _, _, _, _, _), 844 + [89] = PINGROUP(89, WEST, usb_phy, atest, _, _, _, _, _, _, _), 845 + [90] = PINGROUP(90, EAST, mss_lte, pbs, qdss_gpio, _, _, _, _, _, _), 846 + [91] = PINGROUP(91, EAST, mss_lte, pbs, qdss_gpio, _, _, _, _, _, _), 847 + [92] = PINGROUP(92, WEST, _, _, _, _, _, _, _, _, _), 848 + [93] = PINGROUP(93, WEST, _, _, _, _, _, _, _, _, _), 849 + [94] = PINGROUP(94, WEST, _, qdss_gpio, wlan1_adc0, _, _, _, _, _, _), 850 + [95] = PINGROUP(95, WEST, nav_gpio, gp_pdm0, qdss_gpio, wlan1_adc1, _, _, _, _, _), 851 + [96] = PINGROUP(96, WEST, qup4, nav_gpio, mdp_vsync, gp_pdm1, sd_write, jitter_bist, qdss_cti, qdss_cti, _), 852 + [97] = PINGROUP(97, WEST, qup4, nav_gpio, mdp_vsync, gp_pdm2, jitter_bist, qdss_cti, qdss_cti, _, _), 853 + [98] = PINGROUP(98, SOUTH, _, _, _, _, _, _, _, _, _), 854 + [99] = PINGROUP(99, SOUTH, _, _, _, _, _, _, _, _, _), 855 + [100] = PINGROUP(100, SOUTH, atest, _, _, _, _, _, _, _, _), 856 + [101] = PINGROUP(101, SOUTH, atest, _, _, _, _, _, _, _, _), 857 + [102] = PINGROUP(102, SOUTH, _, phase_flag, dac_calib, ddr_pxi2, _, _, _, _, _), 858 + [103] = PINGROUP(103, SOUTH, _, phase_flag, dac_calib, ddr_pxi2, _, _, _, _, _), 859 + [104] = PINGROUP(104, SOUTH, _, phase_flag, qdss_gpio, dac_calib, ddr_pxi3, _, _, _, _), 860 + [105] = PINGROUP(105, SOUTH, _, phase_flag, qdss_gpio, dac_calib, ddr_pxi3, _, _, _, _), 861 + [106] = PINGROUP(106, SOUTH, nav_gpio, gcc_gp3, qdss_gpio, _, _, _, _, _, _), 862 + [107] = PINGROUP(107, SOUTH, nav_gpio, gcc_gp2, qdss_gpio, _, _, _, _, _, _), 863 + [108] = PINGROUP(108, SOUTH, nav_gpio, _, _, _, _, _, _, _, _), 864 + [109] = PINGROUP(109, SOUTH, _, qdss_gpio, _, _, _, _, _, _, _), 865 + [110] = PINGROUP(110, SOUTH, _, qdss_gpio, _, _, _, _, _, _, _), 866 + [111] = PINGROUP(111, SOUTH, _, _, _, _, _, _, _, _, _), 867 + [112] = PINGROUP(112, SOUTH, _, _, _, _, _, _, _, _, _), 868 + [113] = UFS_RESET(ufs_reset, 0x78000), 869 + [114] = SDC_QDSD_PINGROUP(sdc1_rclk, WEST, 0x75000, 15, 0), 870 + [115] = SDC_QDSD_PINGROUP(sdc1_clk, WEST, 0x75000, 13, 6), 871 + [116] = SDC_QDSD_PINGROUP(sdc1_cmd, WEST, 0x75000, 11, 3), 872 + [117] = SDC_QDSD_PINGROUP(sdc1_data, WEST, 0x75000, 9, 0), 873 + [118] = SDC_QDSD_PINGROUP(sdc2_clk, SOUTH, 0x73000, 14, 6), 874 + [119] = SDC_QDSD_PINGROUP(sdc2_cmd, SOUTH, 0x73000, 11, 3), 875 + [120] = SDC_QDSD_PINGROUP(sdc2_data, SOUTH, 0x73000, 9, 0), 876 + }; 877 + 878 + static const struct msm_pinctrl_soc_data sm6115_tlmm = { 879 + .pins = sm6115_pins, 880 + .npins = ARRAY_SIZE(sm6115_pins), 881 + .functions = sm6115_functions, 882 + .nfunctions = ARRAY_SIZE(sm6115_functions), 883 + .groups = sm6115_groups, 884 + .ngroups = ARRAY_SIZE(sm6115_groups), 885 + .ngpios = 114, 886 + .tiles = sm6115_tiles, 887 + .ntiles = ARRAY_SIZE(sm6115_tiles), 888 + }; 889 + 890 + static int sm6115_tlmm_probe(struct platform_device *pdev) 891 + { 892 + return msm_pinctrl_probe(pdev, &sm6115_tlmm); 893 + } 894 + 895 + static const struct of_device_id sm6115_tlmm_of_match[] = { 896 + { .compatible = "qcom,sm6115-tlmm", }, 897 + { } 898 + }; 899 + 900 + static struct platform_driver sm6115_tlmm_driver = { 901 + .driver = { 902 + .name = "sm6115-tlmm", 903 + .of_match_table = sm6115_tlmm_of_match, 904 + }, 905 + .probe = sm6115_tlmm_probe, 906 + .remove = msm_pinctrl_remove, 907 + }; 908 + 909 + static int __init sm6115_tlmm_init(void) 910 + { 911 + return platform_driver_register(&sm6115_tlmm_driver); 912 + } 913 + arch_initcall(sm6115_tlmm_init); 914 + 915 + static void __exit sm6115_tlmm_exit(void) 916 + { 917 + platform_driver_unregister(&sm6115_tlmm_driver); 918 + } 919 + module_exit(sm6115_tlmm_exit); 920 + 921 + MODULE_DESCRIPTION("QTI sm6115 tlmm driver"); 922 + MODULE_LICENSE("GPL v2"); 923 + MODULE_DEVICE_TABLE(of, sm6115_tlmm_of_match);
+20 -17
drivers/pinctrl/qcom/pinctrl-spmi-gpio.c
··· 1104 1104 } 1105 1105 1106 1106 static const struct of_device_id pmic_gpio_of_match[] = { 1107 - { .compatible = "qcom,pm8005-gpio", .data = (void *) 4 }, 1108 - { .compatible = "qcom,pm8916-gpio", .data = (void *) 4 }, 1109 - { .compatible = "qcom,pm8941-gpio", .data = (void *) 36 }, 1110 - /* pm8950 has 8 GPIOs with holes on 3 */ 1111 - { .compatible = "qcom,pm8950-gpio", .data = (void *) 8 }, 1112 - { .compatible = "qcom,pmi8950-gpio", .data = (void *) 2 }, 1113 - { .compatible = "qcom,pm8994-gpio", .data = (void *) 22 }, 1114 - { .compatible = "qcom,pmi8994-gpio", .data = (void *) 10 }, 1115 - { .compatible = "qcom,pm8998-gpio", .data = (void *) 26 }, 1116 - { .compatible = "qcom,pmi8998-gpio", .data = (void *) 14 }, 1117 - { .compatible = "qcom,pma8084-gpio", .data = (void *) 22 }, 1118 - /* pms405 has 12 GPIOs with holes on 1, 9, and 10 */ 1119 - { .compatible = "qcom,pms405-gpio", .data = (void *) 12 }, 1120 1107 /* pm660 has 13 GPIOs with holes on 1, 5, 6, 7, 8 and 10 */ 1121 1108 { .compatible = "qcom,pm660-gpio", .data = (void *) 13 }, 1122 1109 /* pm660l has 12 GPIOs with holes on 1, 2, 10, 11 and 12 */ 1123 1110 { .compatible = "qcom,pm660l-gpio", .data = (void *) 12 }, 1111 + { .compatible = "qcom,pm6150-gpio", .data = (void *) 10 }, 1112 + { .compatible = "qcom,pm6150l-gpio", .data = (void *) 12 }, 1113 + { .compatible = "qcom,pm7325-gpio", .data = (void *) 10 }, 1114 + { .compatible = "qcom,pm8005-gpio", .data = (void *) 4 }, 1115 + { .compatible = "qcom,pm8008-gpio", .data = (void *) 2 }, 1124 1116 /* pm8150 has 10 GPIOs with holes on 2, 5, 7 and 8 */ 1125 1117 { .compatible = "qcom,pm8150-gpio", .data = (void *) 10 }, 1118 + { .compatible = "qcom,pmc8180-gpio", .data = (void *) 10 }, 1126 1119 /* pm8150b has 12 GPIOs with holes on 3, r and 7 */ 1127 1120 { .compatible = "qcom,pm8150b-gpio", .data = (void *) 12 }, 1128 1121 /* pm8150l has 12 GPIOs with holes on 7 */ 1129 1122 { .compatible = "qcom,pm8150l-gpio", .data = (void *) 12 }, 1123 + { .compatible = "qcom,pmc8180c-gpio", .data = (void *) 12 }, 1130 1124 { .compatible = "qcom,pm8350-gpio", .data = (void *) 10 }, 1131 1125 { .compatible = "qcom,pm8350b-gpio", .data = (void *) 8 }, 1132 1126 { .compatible = "qcom,pm8350c-gpio", .data = (void *) 9 }, 1127 + { .compatible = "qcom,pm8916-gpio", .data = (void *) 4 }, 1128 + { .compatible = "qcom,pm8941-gpio", .data = (void *) 36 }, 1129 + /* pm8950 has 8 GPIOs with holes on 3 */ 1130 + { .compatible = "qcom,pm8950-gpio", .data = (void *) 8 }, 1131 + { .compatible = "qcom,pm8994-gpio", .data = (void *) 22 }, 1132 + { .compatible = "qcom,pm8998-gpio", .data = (void *) 26 }, 1133 + { .compatible = "qcom,pma8084-gpio", .data = (void *) 22 }, 1134 + { .compatible = "qcom,pmi8950-gpio", .data = (void *) 2 }, 1135 + { .compatible = "qcom,pmi8994-gpio", .data = (void *) 10 }, 1136 + { .compatible = "qcom,pmi8998-gpio", .data = (void *) 14 }, 1133 1137 { .compatible = "qcom,pmk8350-gpio", .data = (void *) 4 }, 1134 - { .compatible = "qcom,pm7325-gpio", .data = (void *) 10 }, 1138 + { .compatible = "qcom,pmm8155au-gpio", .data = (void *) 10 }, 1135 1139 { .compatible = "qcom,pmr735a-gpio", .data = (void *) 4 }, 1136 1140 { .compatible = "qcom,pmr735b-gpio", .data = (void *) 4 }, 1137 - { .compatible = "qcom,pm6150-gpio", .data = (void *) 10 }, 1138 - { .compatible = "qcom,pm6150l-gpio", .data = (void *) 12 }, 1139 - { .compatible = "qcom,pm8008-gpio", .data = (void *) 2 }, 1141 + /* pms405 has 12 GPIOs with holes on 1, 9, and 10 */ 1142 + { .compatible = "qcom,pms405-gpio", .data = (void *) 12 }, 1140 1143 /* pmx55 has 11 GPIOs with holes on 3, 7, 10, 11 */ 1141 1144 { .compatible = "qcom,pmx55-gpio", .data = (void *) 11 }, 1142 1145 { },
+11
drivers/pinctrl/renesas/Kconfig
··· 37 37 select PINCTRL_PFC_R8A77990 if ARCH_R8A77990 38 38 select PINCTRL_PFC_R8A77995 if ARCH_R8A77995 39 39 select PINCTRL_PFC_R8A779A0 if ARCH_R8A779A0 40 + select PINCTRL_RZG2L if ARCH_R9A07G044 40 41 select PINCTRL_PFC_SH7203 if CPU_SUBTYPE_SH7203 41 42 select PINCTRL_PFC_SH7264 if CPU_SUBTYPE_SH7264 42 43 select PINCTRL_PFC_SH7269 if CPU_SUBTYPE_SH7269 ··· 176 175 select GPIOLIB 177 176 help 178 177 This selects GPIO and pinctrl driver for Renesas RZ/A2 platforms. 178 + 179 + config PINCTRL_RZG2L 180 + bool "pin control support for RZ/G2L" if COMPILE_TEST 181 + depends on OF 182 + select GPIOLIB 183 + select GENERIC_PINCTRL_GROUPS 184 + select GENERIC_PINMUX_FUNCTIONS 185 + select GENERIC_PINCONF 186 + help 187 + This selects GPIO and pinctrl driver for Renesas RZ/G2L platforms. 179 188 180 189 config PINCTRL_PFC_R8A77470 181 190 bool "pin control support for RZ/G1C" if COMPILE_TEST
+1
drivers/pinctrl/renesas/Makefile
··· 46 46 47 47 obj-$(CONFIG_PINCTRL_RZA1) += pinctrl-rza1.o 48 48 obj-$(CONFIG_PINCTRL_RZA2) += pinctrl-rza2.o 49 + obj-$(CONFIG_PINCTRL_RZG2L) += pinctrl-rzg2l.o 49 50 obj-$(CONFIG_PINCTRL_RZN1) += pinctrl-rzn1.o 50 51 51 52 ifeq ($(CONFIG_COMPILE_TEST),y)
+14 -19
drivers/pinctrl/renesas/core.c
··· 571 571 .data = &r8a7794_pinmux_info, 572 572 }, 573 573 #endif 574 - /* Both r8a7795 entries must be present to make sanity checks work */ 575 - #ifdef CONFIG_PINCTRL_PFC_R8A77950 576 - { 577 - .compatible = "renesas,pfc-r8a7795", 578 - .data = &r8a77950_pinmux_info, 579 - }, 580 - #endif 574 + /* 575 + * Both r8a7795 entries must be present to make sanity checks work, but only 576 + * the first entry is actually used. 577 + * R-Car H3 ES1.x is matched using soc_device_match() instead. 578 + */ 581 579 #ifdef CONFIG_PINCTRL_PFC_R8A77951 582 580 { 583 581 .compatible = "renesas,pfc-r8a7795", 584 582 .data = &r8a77951_pinmux_info, 583 + }, 584 + #endif 585 + #ifdef CONFIG_PINCTRL_PFC_R8A77950 586 + { 587 + .compatible = "renesas,pfc-r8a7795", 588 + .data = &r8a77950_pinmux_info, 585 589 }, 586 590 #endif 587 591 #ifdef CONFIG_PINCTRL_PFC_R8A77960 ··· 1089 1085 #ifdef CONFIG_OF 1090 1086 static const void *sh_pfc_quirk_match(void) 1091 1087 { 1092 - #if defined(CONFIG_PINCTRL_PFC_R8A77950) || \ 1093 - defined(CONFIG_PINCTRL_PFC_R8A77951) 1088 + #ifdef CONFIG_PINCTRL_PFC_R8A77950 1094 1089 const struct soc_device_attribute *match; 1095 1090 static const struct soc_device_attribute quirks[] = { 1096 1091 { 1097 1092 .soc_id = "r8a7795", .revision = "ES1.*", 1098 1093 .data = &r8a77950_pinmux_info, 1099 1094 }, 1100 - { 1101 - .soc_id = "r8a7795", 1102 - .data = &r8a77951_pinmux_info, 1103 - }, 1104 - 1105 1095 { /* sentinel */ } 1106 1096 }; 1107 1097 1108 1098 match = soc_device_match(quirks); 1109 1099 if (match) 1110 - return match->data ?: ERR_PTR(-ENODEV); 1111 - #endif /* CONFIG_PINCTRL_PFC_R8A77950 || CONFIG_PINCTRL_PFC_R8A77951 */ 1100 + return match->data; 1101 + #endif /* CONFIG_PINCTRL_PFC_R8A77950 */ 1112 1102 1113 1103 return NULL; 1114 1104 } ··· 1117 1119 #ifdef CONFIG_OF 1118 1120 if (pdev->dev.of_node) { 1119 1121 info = sh_pfc_quirk_match(); 1120 - if (IS_ERR(info)) 1121 - return PTR_ERR(info); 1122 - 1123 1122 if (!info) 1124 1123 info = of_device_get_match_data(&pdev->dev); 1125 1124 } else
+312 -8
drivers/pinctrl/renesas/pfc-r8a77995.c
··· 14 14 #include <linux/errno.h> 15 15 #include <linux/kernel.h> 16 16 17 + #include "core.h" 17 18 #include "sh_pfc.h" 18 19 19 - #define CPU_ALL_GP(fn, sfx) \ 20 - PORT_GP_9(0, fn, sfx), \ 21 - PORT_GP_32(1, fn, sfx), \ 22 - PORT_GP_32(2, fn, sfx), \ 23 - PORT_GP_CFG_10(3, fn, sfx, SH_PFC_PIN_CFG_IO_VOLTAGE), \ 24 - PORT_GP_32(4, fn, sfx), \ 25 - PORT_GP_21(5, fn, sfx), \ 26 - PORT_GP_14(6, fn, sfx) 20 + #define CPU_ALL_GP(fn, sfx) \ 21 + PORT_GP_CFG_9(0, fn, sfx, SH_PFC_PIN_CFG_PULL_UP_DOWN), \ 22 + PORT_GP_CFG_32(1, fn, sfx, SH_PFC_PIN_CFG_PULL_UP_DOWN), \ 23 + PORT_GP_CFG_32(2, fn, sfx, SH_PFC_PIN_CFG_PULL_UP_DOWN), \ 24 + PORT_GP_CFG_10(3, fn, sfx, SH_PFC_PIN_CFG_IO_VOLTAGE | SH_PFC_PIN_CFG_PULL_UP_DOWN), \ 25 + PORT_GP_CFG_32(4, fn, sfx, SH_PFC_PIN_CFG_PULL_UP_DOWN), \ 26 + PORT_GP_CFG_21(5, fn, sfx, SH_PFC_PIN_CFG_PULL_UP_DOWN), \ 27 + PORT_GP_CFG_14(6, fn, sfx, SH_PFC_PIN_CFG_PULL_UP_DOWN) 28 + 29 + #define CPU_ALL_NOGP(fn) \ 30 + PIN_NOGP_CFG(DU_DOTCLKIN0, "DU_DOTCLKIN0", fn, SH_PFC_PIN_CFG_PULL_DOWN), \ 31 + PIN_NOGP_CFG(FSCLKST_N, "FSCLKST#", fn, SH_PFC_PIN_CFG_PULL_UP_DOWN), \ 32 + PIN_NOGP_CFG(MLB_REF, "MLB_REF", fn, SH_PFC_PIN_CFG_PULL_UP_DOWN), \ 33 + PIN_NOGP_CFG(PRESETOUT_N, "PRESETOUT#", fn, SH_PFC_PIN_CFG_PULL_UP_DOWN), \ 34 + PIN_NOGP_CFG(TCK, "TCK", fn, SH_PFC_PIN_CFG_PULL_UP), \ 35 + PIN_NOGP_CFG(TDI, "TDI", fn, SH_PFC_PIN_CFG_PULL_UP), \ 36 + PIN_NOGP_CFG(TMS, "TMS", fn, SH_PFC_PIN_CFG_PULL_UP), \ 37 + PIN_NOGP_CFG(TRST_N, "TRST#", fn, SH_PFC_PIN_CFG_PULL_UP) 27 38 28 39 /* 29 40 * F_() : just information ··· 941 930 PINMUX_IPSR_GPSR(IP13_7_4, TPU0TO3_A), 942 931 }; 943 932 933 + /* 934 + * Pins not associated with a GPIO port. 935 + */ 936 + enum { 937 + GP_ASSIGN_LAST(), 938 + NOGP_ALL(), 939 + }; 940 + 944 941 static const struct sh_pfc_pin pinmux_pins[] = { 945 942 PINMUX_GPIO_GP_ALL(), 943 + PINMUX_NOGP_ALL(), 946 944 }; 947 945 948 946 /* - AUDIO CLOCK ------------------------------------------------------------- */ ··· 2854 2834 return bit; 2855 2835 } 2856 2836 2837 + static const struct pinmux_bias_reg pinmux_bias_regs[] = { 2838 + { PINMUX_BIAS_REG("PUEN0", 0xe6060400, "PUD0", 0xe6060440) { 2839 + [ 0] = RCAR_GP_PIN(1, 9), /* DU_DG1 */ 2840 + [ 1] = RCAR_GP_PIN(1, 8), /* DU_DG0 */ 2841 + [ 2] = RCAR_GP_PIN(1, 7), /* DU_DB7 */ 2842 + [ 3] = RCAR_GP_PIN(1, 6), /* DU_DB6 */ 2843 + [ 4] = RCAR_GP_PIN(1, 5), /* DU_DB5 */ 2844 + [ 5] = RCAR_GP_PIN(1, 4), /* DU_DB4 */ 2845 + [ 6] = RCAR_GP_PIN(1, 3), /* DU_DB3 */ 2846 + [ 7] = RCAR_GP_PIN(1, 2), /* DU_DB2 */ 2847 + [ 8] = RCAR_GP_PIN(1, 1), /* DU_DB1 */ 2848 + [ 9] = RCAR_GP_PIN(1, 0), /* DU_DB0 */ 2849 + [10] = PIN_MLB_REF, /* MLB_REF */ 2850 + [11] = RCAR_GP_PIN(0, 8), /* MLB_SIG */ 2851 + [12] = RCAR_GP_PIN(0, 7), /* MLB_DAT */ 2852 + [13] = RCAR_GP_PIN(0, 6), /* MLB_CLK */ 2853 + [14] = RCAR_GP_PIN(0, 5), /* MSIOF2_RXD */ 2854 + [15] = RCAR_GP_PIN(0, 4), /* MSIOF2_TXD */ 2855 + [16] = RCAR_GP_PIN(0, 3), /* MSIOF2_SCK */ 2856 + [17] = RCAR_GP_PIN(0, 2), /* IRQ0_A */ 2857 + [18] = RCAR_GP_PIN(0, 1), /* USB0_OVC */ 2858 + [19] = RCAR_GP_PIN(0, 0), /* USB0_PWEN */ 2859 + [20] = PIN_PRESETOUT_N, /* PRESETOUT# */ 2860 + [21] = PIN_DU_DOTCLKIN0, /* DU_DOTCLKIN0 */ 2861 + [22] = PIN_FSCLKST_N, /* FSCLKST# */ 2862 + [23] = SH_PFC_PIN_NONE, 2863 + [24] = SH_PFC_PIN_NONE, 2864 + [25] = SH_PFC_PIN_NONE, 2865 + [26] = SH_PFC_PIN_NONE, 2866 + [27] = SH_PFC_PIN_NONE, 2867 + [28] = PIN_TDI, /* TDI */ 2868 + [29] = PIN_TMS, /* TMS */ 2869 + [30] = PIN_TCK, /* TCK */ 2870 + [31] = PIN_TRST_N, /* TRST# */ 2871 + } }, 2872 + { PINMUX_BIAS_REG("PUEN1", 0xe6060404, "PUD1", 0xe6060444) { 2873 + [ 0] = RCAR_GP_PIN(2, 9), /* VI4_DATA8 */ 2874 + [ 1] = RCAR_GP_PIN(2, 8), /* VI4_DATA7 */ 2875 + [ 2] = RCAR_GP_PIN(2, 7), /* VI4_DATA6 */ 2876 + [ 3] = RCAR_GP_PIN(2, 6), /* VI4_DATA5 */ 2877 + [ 4] = RCAR_GP_PIN(2, 5), /* VI4_DATA4 */ 2878 + [ 5] = RCAR_GP_PIN(2, 4), /* VI4_DATA3 */ 2879 + [ 6] = RCAR_GP_PIN(2, 3), /* VI4_DATA2 */ 2880 + [ 7] = RCAR_GP_PIN(2, 2), /* VI4_DATA1 */ 2881 + [ 8] = RCAR_GP_PIN(2, 1), /* VI4_DATA0 */ 2882 + [ 9] = RCAR_GP_PIN(2, 0), /* VI4_CLK */ 2883 + [10] = RCAR_GP_PIN(1, 31), /* QPOLB */ 2884 + [11] = RCAR_GP_PIN(1, 30), /* QPOLA */ 2885 + [12] = RCAR_GP_PIN(1, 29), /* DU_CDE */ 2886 + [13] = RCAR_GP_PIN(1, 28), /* DU_DISP/CDE */ 2887 + [14] = RCAR_GP_PIN(1, 27), /* DU_DISP */ 2888 + [15] = RCAR_GP_PIN(1, 26), /* DU_VSYNC */ 2889 + [16] = RCAR_GP_PIN(1, 25), /* DU_HSYNC */ 2890 + [17] = RCAR_GP_PIN(1, 24), /* DU_DOTCLKOUT0 */ 2891 + [18] = RCAR_GP_PIN(1, 23), /* DU_DR7 */ 2892 + [19] = RCAR_GP_PIN(1, 22), /* DU_DR6 */ 2893 + [20] = RCAR_GP_PIN(1, 21), /* DU_DR5 */ 2894 + [21] = RCAR_GP_PIN(1, 20), /* DU_DR4 */ 2895 + [22] = RCAR_GP_PIN(1, 19), /* DU_DR3 */ 2896 + [23] = RCAR_GP_PIN(1, 18), /* DU_DR2 */ 2897 + [24] = RCAR_GP_PIN(1, 17), /* DU_DR1 */ 2898 + [25] = RCAR_GP_PIN(1, 16), /* DU_DR0 */ 2899 + [26] = RCAR_GP_PIN(1, 15), /* DU_DG7 */ 2900 + [27] = RCAR_GP_PIN(1, 14), /* DU_DG6 */ 2901 + [28] = RCAR_GP_PIN(1, 13), /* DU_DG5 */ 2902 + [29] = RCAR_GP_PIN(1, 12), /* DU_DG4 */ 2903 + [30] = RCAR_GP_PIN(1, 11), /* DU_DG3 */ 2904 + [31] = RCAR_GP_PIN(1, 10), /* DU_DG2 */ 2905 + } }, 2906 + { PINMUX_BIAS_REG("PUEN2", 0xe6060408, "PUD2", 0xe6060448) { 2907 + [ 0] = RCAR_GP_PIN(3, 8), /* NFDATA6 */ 2908 + [ 1] = RCAR_GP_PIN(3, 7), /* NFDATA5 */ 2909 + [ 2] = RCAR_GP_PIN(3, 6), /* NFDATA4 */ 2910 + [ 3] = RCAR_GP_PIN(3, 5), /* NFDATA3 */ 2911 + [ 4] = RCAR_GP_PIN(3, 4), /* NFDATA2 */ 2912 + [ 5] = RCAR_GP_PIN(3, 3), /* NFDATA1 */ 2913 + [ 6] = RCAR_GP_PIN(3, 2), /* NFDATA0 */ 2914 + [ 7] = RCAR_GP_PIN(3, 1), /* NFWE# (PUEN) / NFRE# (PUD) */ 2915 + [ 8] = RCAR_GP_PIN(3, 0), /* NFRE# (PUEN) / NFWE# (PUD) */ 2916 + [ 9] = RCAR_GP_PIN(4, 0), /* NFRB# */ 2917 + [10] = RCAR_GP_PIN(2, 31), /* NFCE# */ 2918 + [11] = RCAR_GP_PIN(2, 30), /* NFCLE */ 2919 + [12] = RCAR_GP_PIN(2, 29), /* NFALE */ 2920 + [13] = RCAR_GP_PIN(2, 28), /* VI4_CLKENB */ 2921 + [14] = RCAR_GP_PIN(2, 27), /* VI4_FIELD */ 2922 + [15] = RCAR_GP_PIN(2, 26), /* VI4_HSYNC# */ 2923 + [16] = RCAR_GP_PIN(2, 25), /* VI4_VSYNC# */ 2924 + [17] = RCAR_GP_PIN(2, 24), /* VI4_DATA23 */ 2925 + [18] = RCAR_GP_PIN(2, 23), /* VI4_DATA22 */ 2926 + [19] = RCAR_GP_PIN(2, 22), /* VI4_DATA21 */ 2927 + [20] = RCAR_GP_PIN(2, 21), /* VI4_DATA20 */ 2928 + [21] = RCAR_GP_PIN(2, 20), /* VI4_DATA19 */ 2929 + [22] = RCAR_GP_PIN(2, 19), /* VI4_DATA18 */ 2930 + [23] = RCAR_GP_PIN(2, 18), /* VI4_DATA17 */ 2931 + [24] = RCAR_GP_PIN(2, 17), /* VI4_DATA16 */ 2932 + [25] = RCAR_GP_PIN(2, 16), /* VI4_DATA15 */ 2933 + [26] = RCAR_GP_PIN(2, 15), /* VI4_DATA14 */ 2934 + [27] = RCAR_GP_PIN(2, 14), /* VI4_DATA13 */ 2935 + [28] = RCAR_GP_PIN(2, 13), /* VI4_DATA12 */ 2936 + [29] = RCAR_GP_PIN(2, 12), /* VI4_DATA11 */ 2937 + [30] = RCAR_GP_PIN(2, 11), /* VI4_DATA10 */ 2938 + [31] = RCAR_GP_PIN(2, 10), /* VI4_DATA9 */ 2939 + } }, 2940 + { PINMUX_BIAS_REG("PUEN3", 0xe606040c, "PUD3", 0xe606044c) { 2941 + [ 0] = RCAR_GP_PIN(4, 31), /* CAN0_RX_A */ 2942 + [ 1] = RCAR_GP_PIN(5, 2), /* CAN_CLK */ 2943 + [ 2] = RCAR_GP_PIN(5, 1), /* TPU0TO1_A */ 2944 + [ 3] = RCAR_GP_PIN(5, 0), /* TPU0TO0_A */ 2945 + [ 4] = RCAR_GP_PIN(4, 27), /* TX2 */ 2946 + [ 5] = RCAR_GP_PIN(4, 26), /* RX2 */ 2947 + [ 6] = RCAR_GP_PIN(4, 25), /* SCK2 */ 2948 + [ 7] = RCAR_GP_PIN(4, 24), /* TX1_A */ 2949 + [ 8] = RCAR_GP_PIN(4, 23), /* RX1_A */ 2950 + [ 9] = RCAR_GP_PIN(4, 22), /* SCK1_A */ 2951 + [10] = RCAR_GP_PIN(4, 21), /* TX0_A */ 2952 + [11] = RCAR_GP_PIN(4, 20), /* RX0_A */ 2953 + [12] = RCAR_GP_PIN(4, 19), /* SCK0_A */ 2954 + [13] = RCAR_GP_PIN(4, 18), /* MSIOF1_RXD */ 2955 + [14] = RCAR_GP_PIN(4, 17), /* MSIOF1_TXD */ 2956 + [15] = RCAR_GP_PIN(4, 16), /* MSIOF1_SCK */ 2957 + [16] = RCAR_GP_PIN(4, 15), /* MSIOF0_RXD */ 2958 + [17] = RCAR_GP_PIN(4, 14), /* MSIOF0_TXD */ 2959 + [18] = RCAR_GP_PIN(4, 13), /* MSIOF0_SYNC */ 2960 + [19] = RCAR_GP_PIN(4, 12), /* MSIOF0_SCK */ 2961 + [20] = RCAR_GP_PIN(4, 11), /* SDA1 */ 2962 + [21] = RCAR_GP_PIN(4, 10), /* SCL1 */ 2963 + [22] = RCAR_GP_PIN(4, 9), /* SDA0 */ 2964 + [23] = RCAR_GP_PIN(4, 8), /* SCL0 */ 2965 + [24] = RCAR_GP_PIN(4, 7), /* SSI_WS4_A */ 2966 + [25] = RCAR_GP_PIN(4, 6), /* SSI_SDATA4_A */ 2967 + [26] = RCAR_GP_PIN(4, 5), /* SSI_SCK4_A */ 2968 + [27] = RCAR_GP_PIN(4, 4), /* SSI_WS34 */ 2969 + [28] = RCAR_GP_PIN(4, 3), /* SSI_SDATA3 */ 2970 + [29] = RCAR_GP_PIN(4, 2), /* SSI_SCK34 */ 2971 + [30] = RCAR_GP_PIN(4, 1), /* AUDIO_CLKA */ 2972 + [31] = RCAR_GP_PIN(3, 9), /* NFDATA7 */ 2973 + } }, 2974 + { PINMUX_BIAS_REG("PUEN4", 0xe6060410, "PUD4", 0xe6060450) { 2975 + [ 0] = RCAR_GP_PIN(6, 10), /* QSPI1_IO3 */ 2976 + [ 1] = RCAR_GP_PIN(6, 9), /* QSPI1_IO2 */ 2977 + [ 2] = RCAR_GP_PIN(6, 8), /* QSPI1_MISO_IO1 */ 2978 + [ 3] = RCAR_GP_PIN(6, 7), /* QSPI1_MOSI_IO0 */ 2979 + [ 4] = RCAR_GP_PIN(6, 6), /* QSPI1_SPCLK */ 2980 + [ 5] = RCAR_GP_PIN(6, 5), /* QSPI0_SSL */ 2981 + [ 6] = RCAR_GP_PIN(6, 4), /* QSPI0_IO3 */ 2982 + [ 7] = RCAR_GP_PIN(6, 3), /* QSPI0_IO2 */ 2983 + [ 8] = RCAR_GP_PIN(6, 2), /* QSPI0_MISO_IO1 */ 2984 + [ 9] = RCAR_GP_PIN(6, 1), /* QSPI0_MOSI_IO0 */ 2985 + [10] = RCAR_GP_PIN(6, 0), /* QSPI0_SPCLK */ 2986 + [11] = RCAR_GP_PIN(5, 20), /* AVB0_LINK */ 2987 + [12] = RCAR_GP_PIN(5, 19), /* AVB0_PHY_INT */ 2988 + [13] = RCAR_GP_PIN(5, 18), /* AVB0_MAGIC */ 2989 + [14] = RCAR_GP_PIN(5, 17), /* AVB0_MDC */ 2990 + [15] = RCAR_GP_PIN(5, 16), /* AVB0_MDIO */ 2991 + [16] = RCAR_GP_PIN(5, 15), /* AVB0_TXCREFCLK */ 2992 + [17] = RCAR_GP_PIN(5, 14), /* AVB0_TD3 */ 2993 + [18] = RCAR_GP_PIN(5, 13), /* AVB0_TD2 */ 2994 + [19] = RCAR_GP_PIN(5, 12), /* AVB0_TD1 */ 2995 + [20] = RCAR_GP_PIN(5, 11), /* AVB0_TD0 */ 2996 + [21] = RCAR_GP_PIN(5, 10), /* AVB0_TXC */ 2997 + [22] = RCAR_GP_PIN(5, 9), /* AVB0_TX_CTL */ 2998 + [23] = RCAR_GP_PIN(5, 8), /* AVB0_RD3 */ 2999 + [24] = RCAR_GP_PIN(5, 7), /* AVB0_RD2 */ 3000 + [25] = RCAR_GP_PIN(5, 6), /* AVB0_RD1 */ 3001 + [26] = RCAR_GP_PIN(5, 5), /* AVB0_RD0 */ 3002 + [27] = RCAR_GP_PIN(5, 4), /* AVB0_RXC */ 3003 + [28] = RCAR_GP_PIN(5, 3), /* AVB0_RX_CTL */ 3004 + [29] = RCAR_GP_PIN(4, 30), /* CAN1_TX_A */ 3005 + [30] = RCAR_GP_PIN(4, 29), /* CAN1_RX_A */ 3006 + [31] = RCAR_GP_PIN(4, 28), /* CAN0_TX_A */ 3007 + } }, 3008 + { PINMUX_BIAS_REG("PUEN5", 0xe6060414, "PUD4", 0xe6060454) { 3009 + [ 0] = SH_PFC_PIN_NONE, 3010 + [ 1] = SH_PFC_PIN_NONE, 3011 + [ 2] = SH_PFC_PIN_NONE, 3012 + [ 3] = SH_PFC_PIN_NONE, 3013 + [ 4] = SH_PFC_PIN_NONE, 3014 + [ 5] = SH_PFC_PIN_NONE, 3015 + [ 6] = SH_PFC_PIN_NONE, 3016 + [ 7] = SH_PFC_PIN_NONE, 3017 + [ 8] = SH_PFC_PIN_NONE, 3018 + [ 9] = SH_PFC_PIN_NONE, 3019 + [10] = SH_PFC_PIN_NONE, 3020 + [11] = SH_PFC_PIN_NONE, 3021 + [12] = SH_PFC_PIN_NONE, 3022 + [13] = SH_PFC_PIN_NONE, 3023 + [14] = SH_PFC_PIN_NONE, 3024 + [15] = SH_PFC_PIN_NONE, 3025 + [16] = SH_PFC_PIN_NONE, 3026 + [17] = SH_PFC_PIN_NONE, 3027 + [18] = SH_PFC_PIN_NONE, 3028 + [19] = SH_PFC_PIN_NONE, 3029 + [20] = SH_PFC_PIN_NONE, 3030 + [21] = SH_PFC_PIN_NONE, 3031 + [22] = SH_PFC_PIN_NONE, 3032 + [23] = SH_PFC_PIN_NONE, 3033 + [24] = SH_PFC_PIN_NONE, 3034 + [25] = SH_PFC_PIN_NONE, 3035 + [26] = SH_PFC_PIN_NONE, 3036 + [27] = SH_PFC_PIN_NONE, 3037 + [28] = SH_PFC_PIN_NONE, 3038 + [29] = RCAR_GP_PIN(6, 13), /* RPC_INT# */ 3039 + [30] = RCAR_GP_PIN(6, 12), /* RPC_RESET# */ 3040 + [31] = RCAR_GP_PIN(6, 11), /* QSPI1_SSL */ 3041 + } }, 3042 + { /* sentinel */ } 3043 + }; 3044 + 2857 3045 enum ioctrl_regs { 2858 3046 TDSELCTRL, 2859 3047 }; ··· 3071 2843 { /* sentinel */ }, 3072 2844 }; 3073 2845 2846 + static const struct pinmux_bias_reg * 2847 + r8a77995_pin_to_bias_reg(const struct sh_pfc *pfc, unsigned int pin, 2848 + unsigned int *puen_bit, unsigned int *pud_bit) 2849 + { 2850 + const struct pinmux_bias_reg *reg; 2851 + unsigned int bit; 2852 + 2853 + reg = rcar_pin_to_bias_reg(pfc, pin, &bit); 2854 + if (!reg) 2855 + return reg; 2856 + 2857 + *puen_bit = bit; 2858 + 2859 + /* NFWE# and NFRE# use different bit positions in PUD2 */ 2860 + switch (pin) { 2861 + case RCAR_GP_PIN(3, 0): /* NFRE# */ 2862 + *pud_bit = 7; 2863 + break; 2864 + 2865 + case RCAR_GP_PIN(3, 1): /* NFWE# */ 2866 + *pud_bit = 8; 2867 + break; 2868 + 2869 + default: 2870 + *pud_bit = bit; 2871 + break; 2872 + } 2873 + 2874 + return reg; 2875 + } 2876 + 2877 + static unsigned int r8a77995_pinmux_get_bias(struct sh_pfc *pfc, 2878 + unsigned int pin) 2879 + { 2880 + const struct pinmux_bias_reg *reg; 2881 + unsigned int puen_bit, pud_bit; 2882 + 2883 + reg = r8a77995_pin_to_bias_reg(pfc, pin, &puen_bit, &pud_bit); 2884 + if (!reg) 2885 + return PIN_CONFIG_BIAS_DISABLE; 2886 + 2887 + if (!(sh_pfc_read(pfc, reg->puen) & BIT(puen_bit))) 2888 + return PIN_CONFIG_BIAS_DISABLE; 2889 + else if (sh_pfc_read(pfc, reg->pud) & BIT(pud_bit)) 2890 + return PIN_CONFIG_BIAS_PULL_UP; 2891 + else 2892 + return PIN_CONFIG_BIAS_PULL_DOWN; 2893 + } 2894 + 2895 + static void r8a77995_pinmux_set_bias(struct sh_pfc *pfc, unsigned int pin, 2896 + unsigned int bias) 2897 + { 2898 + const struct pinmux_bias_reg *reg; 2899 + unsigned int puen_bit, pud_bit; 2900 + u32 enable, updown; 2901 + 2902 + reg = r8a77995_pin_to_bias_reg(pfc, pin, &puen_bit, &pud_bit); 2903 + if (!reg) 2904 + return; 2905 + 2906 + enable = sh_pfc_read(pfc, reg->puen) & ~BIT(puen_bit); 2907 + if (bias != PIN_CONFIG_BIAS_DISABLE) { 2908 + enable |= BIT(puen_bit); 2909 + 2910 + updown = sh_pfc_read(pfc, reg->pud) & ~BIT(pud_bit); 2911 + if (bias == PIN_CONFIG_BIAS_PULL_UP) 2912 + updown |= BIT(pud_bit); 2913 + 2914 + sh_pfc_write(pfc, reg->pud, updown); 2915 + } 2916 + sh_pfc_write(pfc, reg->puen, enable); 2917 + } 2918 + 3074 2919 static const struct sh_pfc_soc_operations r8a77995_pinmux_ops = { 3075 2920 .pin_to_pocctrl = r8a77995_pin_to_pocctrl, 2921 + .get_bias = r8a77995_pinmux_get_bias, 2922 + .set_bias = r8a77995_pinmux_set_bias, 3076 2923 }; 3077 2924 3078 2925 const struct sh_pfc_soc_info r8a77995_pinmux_info = { ··· 3165 2862 .nr_functions = ARRAY_SIZE(pinmux_functions), 3166 2863 3167 2864 .cfg_regs = pinmux_config_regs, 2865 + .bias_regs = pinmux_bias_regs, 3168 2866 .ioctrl_regs = pinmux_ioctrl_regs, 3169 2867 3170 2868 .pinmux_data = pinmux_data,
+1175
drivers/pinctrl/renesas/pinctrl-rzg2l.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 2 + /* 3 + * Renesas RZ/G2L Pin Control and GPIO driver core 4 + * 5 + * Copyright (C) 2021 Renesas Electronics Corporation. 6 + */ 7 + 8 + #include <linux/bitops.h> 9 + #include <linux/clk.h> 10 + #include <linux/gpio/driver.h> 11 + #include <linux/io.h> 12 + #include <linux/module.h> 13 + #include <linux/of_device.h> 14 + #include <linux/pinctrl/pinconf-generic.h> 15 + #include <linux/pinctrl/pinconf.h> 16 + #include <linux/pinctrl/pinctrl.h> 17 + #include <linux/pinctrl/pinmux.h> 18 + #include <linux/spinlock.h> 19 + 20 + #include <dt-bindings/pinctrl/rzg2l-pinctrl.h> 21 + 22 + #include "../core.h" 23 + #include "../pinconf.h" 24 + #include "../pinmux.h" 25 + 26 + #define DRV_NAME "pinctrl-rzg2l" 27 + 28 + /* 29 + * Use 16 lower bits [15:0] for pin identifier 30 + * Use 16 higher bits [31:16] for pin mux function 31 + */ 32 + #define MUX_PIN_ID_MASK GENMASK(15, 0) 33 + #define MUX_FUNC_MASK GENMASK(31, 16) 34 + #define MUX_FUNC_OFFS 16 35 + #define MUX_FUNC(pinconf) (((pinconf) & MUX_FUNC_MASK) >> MUX_FUNC_OFFS) 36 + 37 + /* PIN capabilities */ 38 + #define PIN_CFG_IOLH BIT(0) 39 + #define PIN_CFG_SR BIT(1) 40 + #define PIN_CFG_IEN BIT(2) 41 + #define PIN_CFG_PUPD BIT(3) 42 + #define PIN_CFG_IOLH_SD0 BIT(4) 43 + #define PIN_CFG_IOLH_SD1 BIT(5) 44 + #define PIN_CFG_IOLH_QSPI BIT(6) 45 + #define PIN_CFG_IOLH_ETH0 BIT(7) 46 + #define PIN_CFG_IOLH_ETH1 BIT(8) 47 + #define PIN_CFG_FILONOFF BIT(9) 48 + #define PIN_CFG_FILNUM BIT(10) 49 + #define PIN_CFG_FILCLKSEL BIT(11) 50 + 51 + #define RZG2L_MPXED_PIN_FUNCS (PIN_CFG_IOLH | \ 52 + PIN_CFG_SR | \ 53 + PIN_CFG_PUPD | \ 54 + PIN_CFG_FILONOFF | \ 55 + PIN_CFG_FILNUM | \ 56 + PIN_CFG_FILCLKSEL) 57 + 58 + #define RZG2L_MPXED_ETH_PIN_FUNCS(x) ((x) | \ 59 + PIN_CFG_FILONOFF | \ 60 + PIN_CFG_FILNUM | \ 61 + PIN_CFG_FILCLKSEL) 62 + 63 + /* 64 + * n indicates number of pins in the port, a is the register index 65 + * and f is pin configuration capabilities supported. 66 + */ 67 + #define RZG2L_GPIO_PORT_PACK(n, a, f) (((n) << 28) | ((a) << 20) | (f)) 68 + #define RZG2L_GPIO_PORT_GET_PINCNT(x) (((x) & GENMASK(30, 28)) >> 28) 69 + #define RZG2L_GPIO_PORT_GET_INDEX(x) (((x) & GENMASK(26, 20)) >> 20) 70 + #define RZG2L_GPIO_PORT_GET_CFGS(x) ((x) & GENMASK(19, 0)) 71 + 72 + /* 73 + * BIT(31) indicates dedicated pin, p is the register index while 74 + * referencing to SR/IEN/IOLH/FILxx registers, b is the register bits 75 + * (b * 8) and f is the pin configuration capabilities supported. 76 + */ 77 + #define RZG2L_SINGLE_PIN BIT(31) 78 + #define RZG2L_SINGLE_PIN_PACK(p, b, f) (RZG2L_SINGLE_PIN | \ 79 + ((p) << 24) | ((b) << 20) | (f)) 80 + #define RZG2L_SINGLE_PIN_GET_PORT(x) (((x) & GENMASK(30, 24)) >> 24) 81 + #define RZG2L_SINGLE_PIN_GET_BIT(x) (((x) & GENMASK(22, 20)) >> 20) 82 + #define RZG2L_SINGLE_PIN_GET_CFGS(x) ((x) & GENMASK(19, 0)) 83 + 84 + #define P(n) (0x0000 + 0x10 + (n)) 85 + #define PM(n) (0x0100 + 0x20 + (n) * 2) 86 + #define PMC(n) (0x0200 + 0x10 + (n)) 87 + #define PFC(n) (0x0400 + 0x40 + (n) * 4) 88 + #define PIN(n) (0x0800 + 0x10 + (n)) 89 + #define IEN(n) (0x1800 + (n) * 8) 90 + #define PWPR (0x3014) 91 + #define SD_CH(n) (0x3000 + (n) * 4) 92 + #define QSPI (0x3008) 93 + 94 + #define PVDD_1800 1 /* I/O domain voltage <= 1.8V */ 95 + #define PVDD_3300 0 /* I/O domain voltage >= 3.3V */ 96 + 97 + #define PWPR_B0WI BIT(7) /* Bit Write Disable */ 98 + #define PWPR_PFCWE BIT(6) /* PFC Register Write Enable */ 99 + 100 + #define PM_MASK 0x03 101 + #define PVDD_MASK 0x01 102 + #define PFC_MASK 0x07 103 + #define IEN_MASK 0x01 104 + 105 + #define PM_INPUT 0x1 106 + #define PM_OUTPUT 0x2 107 + 108 + #define RZG2L_PIN_ID_TO_PORT(id) ((id) / RZG2L_PINS_PER_PORT) 109 + #define RZG2L_PIN_ID_TO_PIN(id) ((id) % RZG2L_PINS_PER_PORT) 110 + 111 + struct rzg2l_dedicated_configs { 112 + const char *name; 113 + u32 config; 114 + }; 115 + 116 + struct rzg2l_pinctrl_data { 117 + const char * const *port_pins; 118 + const u32 *port_pin_configs; 119 + struct rzg2l_dedicated_configs *dedicated_pins; 120 + unsigned int n_port_pins; 121 + unsigned int n_dedicated_pins; 122 + }; 123 + 124 + struct rzg2l_pinctrl { 125 + struct pinctrl_dev *pctl; 126 + struct pinctrl_desc desc; 127 + struct pinctrl_pin_desc *pins; 128 + 129 + const struct rzg2l_pinctrl_data *data; 130 + void __iomem *base; 131 + struct device *dev; 132 + struct clk *clk; 133 + 134 + struct gpio_chip gpio_chip; 135 + struct pinctrl_gpio_range gpio_range; 136 + 137 + spinlock_t lock; 138 + }; 139 + 140 + static void rzg2l_pinctrl_set_pfc_mode(struct rzg2l_pinctrl *pctrl, 141 + u8 port, u8 pin, u8 func) 142 + { 143 + unsigned long flags; 144 + u32 reg; 145 + 146 + spin_lock_irqsave(&pctrl->lock, flags); 147 + 148 + /* Set pin to 'Non-use (Hi-Z input protection)' */ 149 + reg = readw(pctrl->base + PM(port)); 150 + reg &= ~(PM_MASK << (pin * 2)); 151 + writew(reg, pctrl->base + PM(port)); 152 + 153 + /* Temporarily switch to GPIO mode with PMC register */ 154 + reg = readb(pctrl->base + PMC(port)); 155 + writeb(reg & ~BIT(pin), pctrl->base + PMC(port)); 156 + 157 + /* Set the PWPR register to allow PFC register to write */ 158 + writel(0x0, pctrl->base + PWPR); /* B0WI=0, PFCWE=0 */ 159 + writel(PWPR_PFCWE, pctrl->base + PWPR); /* B0WI=0, PFCWE=1 */ 160 + 161 + /* Select Pin function mode with PFC register */ 162 + reg = readl(pctrl->base + PFC(port)); 163 + reg &= ~(PFC_MASK << (pin * 4)); 164 + writel(reg | (func << (pin * 4)), pctrl->base + PFC(port)); 165 + 166 + /* Set the PWPR register to be write-protected */ 167 + writel(0x0, pctrl->base + PWPR); /* B0WI=0, PFCWE=0 */ 168 + writel(PWPR_B0WI, pctrl->base + PWPR); /* B0WI=1, PFCWE=0 */ 169 + 170 + /* Switch to Peripheral pin function with PMC register */ 171 + reg = readb(pctrl->base + PMC(port)); 172 + writeb(reg | BIT(pin), pctrl->base + PMC(port)); 173 + 174 + spin_unlock_irqrestore(&pctrl->lock, flags); 175 + }; 176 + 177 + static int rzg2l_pinctrl_set_mux(struct pinctrl_dev *pctldev, 178 + unsigned int func_selector, 179 + unsigned int group_selector) 180 + { 181 + struct rzg2l_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); 182 + struct function_desc *func; 183 + unsigned int i, *psel_val; 184 + struct group_desc *group; 185 + int *pins; 186 + 187 + func = pinmux_generic_get_function(pctldev, func_selector); 188 + if (!func) 189 + return -EINVAL; 190 + group = pinctrl_generic_get_group(pctldev, group_selector); 191 + if (!group) 192 + return -EINVAL; 193 + 194 + psel_val = func->data; 195 + pins = group->pins; 196 + 197 + for (i = 0; i < group->num_pins; i++) { 198 + dev_dbg(pctrl->dev, "port:%u pin: %u PSEL:%u\n", 199 + RZG2L_PIN_ID_TO_PORT(pins[i]), RZG2L_PIN_ID_TO_PIN(pins[i]), 200 + psel_val[i]); 201 + rzg2l_pinctrl_set_pfc_mode(pctrl, RZG2L_PIN_ID_TO_PORT(pins[i]), 202 + RZG2L_PIN_ID_TO_PIN(pins[i]), psel_val[i]); 203 + } 204 + 205 + return 0; 206 + }; 207 + 208 + static int rzg2l_map_add_config(struct pinctrl_map *map, 209 + const char *group_or_pin, 210 + enum pinctrl_map_type type, 211 + unsigned long *configs, 212 + unsigned int num_configs) 213 + { 214 + unsigned long *cfgs; 215 + 216 + cfgs = kmemdup(configs, num_configs * sizeof(*cfgs), 217 + GFP_KERNEL); 218 + if (!cfgs) 219 + return -ENOMEM; 220 + 221 + map->type = type; 222 + map->data.configs.group_or_pin = group_or_pin; 223 + map->data.configs.configs = cfgs; 224 + map->data.configs.num_configs = num_configs; 225 + 226 + return 0; 227 + } 228 + 229 + static int rzg2l_dt_subnode_to_map(struct pinctrl_dev *pctldev, 230 + struct device_node *np, 231 + struct pinctrl_map **map, 232 + unsigned int *num_maps, 233 + unsigned int *index) 234 + { 235 + struct rzg2l_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); 236 + struct pinctrl_map *maps = *map; 237 + unsigned int nmaps = *num_maps; 238 + unsigned long *configs = NULL; 239 + unsigned int *pins, *psel_val; 240 + unsigned int num_pinmux = 0; 241 + unsigned int idx = *index; 242 + unsigned int num_pins, i; 243 + unsigned int num_configs; 244 + struct property *pinmux; 245 + struct property *prop; 246 + int ret, gsel, fsel; 247 + const char **pin_fn; 248 + const char *pin; 249 + 250 + pinmux = of_find_property(np, "pinmux", NULL); 251 + if (pinmux) 252 + num_pinmux = pinmux->length / sizeof(u32); 253 + 254 + ret = of_property_count_strings(np, "pins"); 255 + if (ret == -EINVAL) { 256 + num_pins = 0; 257 + } else if (ret < 0) { 258 + dev_err(pctrl->dev, "Invalid pins list in DT\n"); 259 + return ret; 260 + } else { 261 + num_pins = ret; 262 + } 263 + 264 + if (!num_pinmux && !num_pins) 265 + return 0; 266 + 267 + if (num_pinmux && num_pins) { 268 + dev_err(pctrl->dev, 269 + "DT node must contain either a pinmux or pins and not both\n"); 270 + return -EINVAL; 271 + } 272 + 273 + ret = pinconf_generic_parse_dt_config(np, NULL, &configs, &num_configs); 274 + if (ret < 0) 275 + return ret; 276 + 277 + if (num_pins && !num_configs) { 278 + dev_err(pctrl->dev, "DT node must contain a config\n"); 279 + ret = -ENODEV; 280 + goto done; 281 + } 282 + 283 + if (num_pinmux) 284 + nmaps += 1; 285 + 286 + if (num_pins) 287 + nmaps += num_pins; 288 + 289 + maps = krealloc_array(maps, nmaps, sizeof(*maps), GFP_KERNEL); 290 + if (!maps) { 291 + ret = -ENOMEM; 292 + goto done; 293 + } 294 + 295 + *map = maps; 296 + *num_maps = nmaps; 297 + if (num_pins) { 298 + of_property_for_each_string(np, "pins", prop, pin) { 299 + ret = rzg2l_map_add_config(&maps[idx], pin, 300 + PIN_MAP_TYPE_CONFIGS_PIN, 301 + configs, num_configs); 302 + if (ret < 0) 303 + goto done; 304 + 305 + idx++; 306 + } 307 + ret = 0; 308 + goto done; 309 + } 310 + 311 + pins = devm_kcalloc(pctrl->dev, num_pinmux, sizeof(*pins), GFP_KERNEL); 312 + psel_val = devm_kcalloc(pctrl->dev, num_pinmux, sizeof(*psel_val), 313 + GFP_KERNEL); 314 + pin_fn = devm_kzalloc(pctrl->dev, sizeof(*pin_fn), GFP_KERNEL); 315 + if (!pins || !psel_val || !pin_fn) { 316 + ret = -ENOMEM; 317 + goto done; 318 + } 319 + 320 + /* Collect pin locations and mux settings from DT properties */ 321 + for (i = 0; i < num_pinmux; ++i) { 322 + u32 value; 323 + 324 + ret = of_property_read_u32_index(np, "pinmux", i, &value); 325 + if (ret) 326 + goto done; 327 + pins[i] = value & MUX_PIN_ID_MASK; 328 + psel_val[i] = MUX_FUNC(value); 329 + } 330 + 331 + /* Register a single pin group listing all the pins we read from DT */ 332 + gsel = pinctrl_generic_add_group(pctldev, np->name, pins, num_pinmux, NULL); 333 + if (gsel < 0) { 334 + ret = gsel; 335 + goto done; 336 + } 337 + 338 + /* 339 + * Register a single group function where the 'data' is an array PSEL 340 + * register values read from DT. 341 + */ 342 + pin_fn[0] = np->name; 343 + fsel = pinmux_generic_add_function(pctldev, np->name, pin_fn, 1, 344 + psel_val); 345 + if (fsel < 0) { 346 + ret = fsel; 347 + goto remove_group; 348 + } 349 + 350 + maps[idx].type = PIN_MAP_TYPE_MUX_GROUP; 351 + maps[idx].data.mux.group = np->name; 352 + maps[idx].data.mux.function = np->name; 353 + idx++; 354 + 355 + dev_dbg(pctrl->dev, "Parsed %pOF with %d pins\n", np, num_pinmux); 356 + ret = 0; 357 + goto done; 358 + 359 + remove_group: 360 + pinctrl_generic_remove_group(pctldev, gsel); 361 + done: 362 + *index = idx; 363 + kfree(configs); 364 + return ret; 365 + } 366 + 367 + static void rzg2l_dt_free_map(struct pinctrl_dev *pctldev, 368 + struct pinctrl_map *map, 369 + unsigned int num_maps) 370 + { 371 + unsigned int i; 372 + 373 + if (!map) 374 + return; 375 + 376 + for (i = 0; i < num_maps; ++i) { 377 + if (map[i].type == PIN_MAP_TYPE_CONFIGS_GROUP || 378 + map[i].type == PIN_MAP_TYPE_CONFIGS_PIN) 379 + kfree(map[i].data.configs.configs); 380 + } 381 + kfree(map); 382 + } 383 + 384 + static int rzg2l_dt_node_to_map(struct pinctrl_dev *pctldev, 385 + struct device_node *np, 386 + struct pinctrl_map **map, 387 + unsigned int *num_maps) 388 + { 389 + struct rzg2l_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); 390 + struct device_node *child; 391 + unsigned int index; 392 + int ret; 393 + 394 + *map = NULL; 395 + *num_maps = 0; 396 + index = 0; 397 + 398 + for_each_child_of_node(np, child) { 399 + ret = rzg2l_dt_subnode_to_map(pctldev, child, map, 400 + num_maps, &index); 401 + if (ret < 0) { 402 + of_node_put(child); 403 + goto done; 404 + } 405 + } 406 + 407 + if (*num_maps == 0) { 408 + ret = rzg2l_dt_subnode_to_map(pctldev, np, map, 409 + num_maps, &index); 410 + if (ret < 0) 411 + goto done; 412 + } 413 + 414 + if (*num_maps) 415 + return 0; 416 + 417 + dev_err(pctrl->dev, "no mapping found in node %pOF\n", np); 418 + ret = -EINVAL; 419 + 420 + done: 421 + if (ret < 0) 422 + rzg2l_dt_free_map(pctldev, *map, *num_maps); 423 + 424 + return ret; 425 + } 426 + 427 + static int rzg2l_pinctrl_pinconf_get(struct pinctrl_dev *pctldev, 428 + unsigned int _pin, 429 + unsigned long *config) 430 + { 431 + struct rzg2l_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); 432 + enum pin_config_param param = pinconf_to_config_param(*config); 433 + const struct pinctrl_pin_desc *pin = &pctrl->desc.pins[_pin]; 434 + unsigned int *pin_data = pin->drv_data; 435 + unsigned int arg = 0; 436 + unsigned long flags; 437 + void __iomem *addr; 438 + u32 port = 0, reg; 439 + u32 cfg = 0; 440 + u8 bit = 0; 441 + 442 + if (!pin_data) 443 + return -EINVAL; 444 + 445 + if (*pin_data & RZG2L_SINGLE_PIN) { 446 + port = RZG2L_SINGLE_PIN_GET_PORT(*pin_data); 447 + cfg = RZG2L_SINGLE_PIN_GET_CFGS(*pin_data); 448 + bit = RZG2L_SINGLE_PIN_GET_BIT(*pin_data); 449 + } 450 + 451 + switch (param) { 452 + case PIN_CONFIG_INPUT_ENABLE: 453 + if (!(cfg & PIN_CFG_IEN)) 454 + return -EINVAL; 455 + spin_lock_irqsave(&pctrl->lock, flags); 456 + /* handle _L/_H for 32-bit register read/write */ 457 + addr = pctrl->base + IEN(port); 458 + if (bit >= 4) { 459 + bit -= 4; 460 + addr += 4; 461 + } 462 + 463 + reg = readl(addr) & (IEN_MASK << (bit * 8)); 464 + arg = (reg >> (bit * 8)) & 0x1; 465 + spin_unlock_irqrestore(&pctrl->lock, flags); 466 + break; 467 + 468 + case PIN_CONFIG_POWER_SOURCE: { 469 + u32 pwr_reg = 0x0; 470 + 471 + if (cfg & PIN_CFG_IOLH_SD0) 472 + pwr_reg = SD_CH(0); 473 + else if (cfg & PIN_CFG_IOLH_SD1) 474 + pwr_reg = SD_CH(1); 475 + else if (cfg & PIN_CFG_IOLH_QSPI) 476 + pwr_reg = QSPI; 477 + else 478 + return -EINVAL; 479 + 480 + spin_lock_irqsave(&pctrl->lock, flags); 481 + addr = pctrl->base + pwr_reg; 482 + arg = (readl(addr) & PVDD_MASK) ? 1800 : 3300; 483 + spin_unlock_irqrestore(&pctrl->lock, flags); 484 + break; 485 + } 486 + 487 + default: 488 + return -ENOTSUPP; 489 + } 490 + 491 + *config = pinconf_to_config_packed(param, arg); 492 + 493 + return 0; 494 + }; 495 + 496 + static int rzg2l_pinctrl_pinconf_set(struct pinctrl_dev *pctldev, 497 + unsigned int _pin, 498 + unsigned long *_configs, 499 + unsigned int num_configs) 500 + { 501 + struct rzg2l_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); 502 + const struct pinctrl_pin_desc *pin = &pctrl->desc.pins[_pin]; 503 + unsigned int *pin_data = pin->drv_data; 504 + enum pin_config_param param; 505 + unsigned long flags; 506 + void __iomem *addr; 507 + u32 port = 0, reg; 508 + unsigned int i; 509 + u32 cfg = 0; 510 + u8 bit = 0; 511 + 512 + if (!pin_data) 513 + return -EINVAL; 514 + 515 + if (*pin_data & RZG2L_SINGLE_PIN) { 516 + port = RZG2L_SINGLE_PIN_GET_PORT(*pin_data); 517 + cfg = RZG2L_SINGLE_PIN_GET_CFGS(*pin_data); 518 + bit = RZG2L_SINGLE_PIN_GET_BIT(*pin_data); 519 + } 520 + 521 + for (i = 0; i < num_configs; i++) { 522 + param = pinconf_to_config_param(_configs[i]); 523 + switch (param) { 524 + case PIN_CONFIG_INPUT_ENABLE: { 525 + unsigned int arg = 526 + pinconf_to_config_argument(_configs[i]); 527 + 528 + if (!(cfg & PIN_CFG_IEN)) 529 + return -EINVAL; 530 + 531 + /* handle _L/_H for 32-bit register read/write */ 532 + addr = pctrl->base + IEN(port); 533 + if (bit >= 4) { 534 + bit -= 4; 535 + addr += 4; 536 + } 537 + 538 + spin_lock_irqsave(&pctrl->lock, flags); 539 + reg = readl(addr) & ~(IEN_MASK << (bit * 8)); 540 + writel(reg | (arg << (bit * 8)), addr); 541 + spin_unlock_irqrestore(&pctrl->lock, flags); 542 + break; 543 + } 544 + 545 + case PIN_CONFIG_POWER_SOURCE: { 546 + unsigned int mV = pinconf_to_config_argument(_configs[i]); 547 + u32 pwr_reg = 0x0; 548 + 549 + if (mV != 1800 && mV != 3300) 550 + return -EINVAL; 551 + 552 + if (cfg & PIN_CFG_IOLH_SD0) 553 + pwr_reg = SD_CH(0); 554 + else if (cfg & PIN_CFG_IOLH_SD1) 555 + pwr_reg = SD_CH(1); 556 + else if (cfg & PIN_CFG_IOLH_QSPI) 557 + pwr_reg = QSPI; 558 + else 559 + return -EINVAL; 560 + 561 + addr = pctrl->base + pwr_reg; 562 + spin_lock_irqsave(&pctrl->lock, flags); 563 + writel((mV == 1800) ? PVDD_1800 : PVDD_3300, addr); 564 + spin_unlock_irqrestore(&pctrl->lock, flags); 565 + break; 566 + } 567 + default: 568 + return -EOPNOTSUPP; 569 + } 570 + } 571 + 572 + return 0; 573 + } 574 + 575 + static int rzg2l_pinctrl_pinconf_group_set(struct pinctrl_dev *pctldev, 576 + unsigned int group, 577 + unsigned long *configs, 578 + unsigned int num_configs) 579 + { 580 + const unsigned int *pins; 581 + unsigned int i, npins; 582 + int ret; 583 + 584 + ret = pinctrl_generic_get_group_pins(pctldev, group, &pins, &npins); 585 + if (ret) 586 + return ret; 587 + 588 + for (i = 0; i < npins; i++) { 589 + ret = rzg2l_pinctrl_pinconf_set(pctldev, pins[i], configs, 590 + num_configs); 591 + if (ret) 592 + return ret; 593 + } 594 + 595 + return 0; 596 + }; 597 + 598 + static int rzg2l_pinctrl_pinconf_group_get(struct pinctrl_dev *pctldev, 599 + unsigned int group, 600 + unsigned long *config) 601 + { 602 + const unsigned int *pins; 603 + unsigned int i, npins, prev_config = 0; 604 + int ret; 605 + 606 + ret = pinctrl_generic_get_group_pins(pctldev, group, &pins, &npins); 607 + if (ret) 608 + return ret; 609 + 610 + for (i = 0; i < npins; i++) { 611 + ret = rzg2l_pinctrl_pinconf_get(pctldev, pins[i], config); 612 + if (ret) 613 + return ret; 614 + 615 + /* Check config matching between to pin */ 616 + if (i && prev_config != *config) 617 + return -EOPNOTSUPP; 618 + 619 + prev_config = *config; 620 + } 621 + 622 + return 0; 623 + }; 624 + 625 + static const struct pinctrl_ops rzg2l_pinctrl_pctlops = { 626 + .get_groups_count = pinctrl_generic_get_group_count, 627 + .get_group_name = pinctrl_generic_get_group_name, 628 + .get_group_pins = pinctrl_generic_get_group_pins, 629 + .dt_node_to_map = rzg2l_dt_node_to_map, 630 + .dt_free_map = rzg2l_dt_free_map, 631 + }; 632 + 633 + static const struct pinmux_ops rzg2l_pinctrl_pmxops = { 634 + .get_functions_count = pinmux_generic_get_function_count, 635 + .get_function_name = pinmux_generic_get_function_name, 636 + .get_function_groups = pinmux_generic_get_function_groups, 637 + .set_mux = rzg2l_pinctrl_set_mux, 638 + .strict = true, 639 + }; 640 + 641 + static const struct pinconf_ops rzg2l_pinctrl_confops = { 642 + .is_generic = true, 643 + .pin_config_get = rzg2l_pinctrl_pinconf_get, 644 + .pin_config_set = rzg2l_pinctrl_pinconf_set, 645 + .pin_config_group_set = rzg2l_pinctrl_pinconf_group_set, 646 + .pin_config_group_get = rzg2l_pinctrl_pinconf_group_get, 647 + .pin_config_config_dbg_show = pinconf_generic_dump_config, 648 + }; 649 + 650 + static int rzg2l_gpio_request(struct gpio_chip *chip, unsigned int offset) 651 + { 652 + struct rzg2l_pinctrl *pctrl = gpiochip_get_data(chip); 653 + u32 port = RZG2L_PIN_ID_TO_PORT(offset); 654 + u8 bit = RZG2L_PIN_ID_TO_PIN(offset); 655 + unsigned long flags; 656 + u8 reg8; 657 + int ret; 658 + 659 + ret = pinctrl_gpio_request(chip->base + offset); 660 + if (ret) 661 + return ret; 662 + 663 + spin_lock_irqsave(&pctrl->lock, flags); 664 + 665 + /* Select GPIO mode in PMC Register */ 666 + reg8 = readb(pctrl->base + PMC(port)); 667 + reg8 &= ~BIT(bit); 668 + writeb(reg8, pctrl->base + PMC(port)); 669 + 670 + spin_unlock_irqrestore(&pctrl->lock, flags); 671 + 672 + return 0; 673 + } 674 + 675 + static void rzg2l_gpio_set_direction(struct rzg2l_pinctrl *pctrl, u32 port, 676 + u8 bit, bool output) 677 + { 678 + unsigned long flags; 679 + u16 reg16; 680 + 681 + spin_lock_irqsave(&pctrl->lock, flags); 682 + 683 + reg16 = readw(pctrl->base + PM(port)); 684 + reg16 &= ~(PM_MASK << (bit * 2)); 685 + 686 + reg16 |= (output ? PM_OUTPUT : PM_INPUT) << (bit * 2); 687 + writew(reg16, pctrl->base + PM(port)); 688 + 689 + spin_unlock_irqrestore(&pctrl->lock, flags); 690 + } 691 + 692 + static int rzg2l_gpio_get_direction(struct gpio_chip *chip, unsigned int offset) 693 + { 694 + struct rzg2l_pinctrl *pctrl = gpiochip_get_data(chip); 695 + u32 port = RZG2L_PIN_ID_TO_PORT(offset); 696 + u8 bit = RZG2L_PIN_ID_TO_PIN(offset); 697 + 698 + if (!(readb(pctrl->base + PMC(port)) & BIT(bit))) { 699 + u16 reg16; 700 + 701 + reg16 = readw(pctrl->base + PM(port)); 702 + reg16 = (reg16 >> (bit * 2)) & PM_MASK; 703 + if (reg16 == PM_OUTPUT) 704 + return GPIO_LINE_DIRECTION_OUT; 705 + } 706 + 707 + return GPIO_LINE_DIRECTION_IN; 708 + } 709 + 710 + static int rzg2l_gpio_direction_input(struct gpio_chip *chip, 711 + unsigned int offset) 712 + { 713 + struct rzg2l_pinctrl *pctrl = gpiochip_get_data(chip); 714 + u32 port = RZG2L_PIN_ID_TO_PORT(offset); 715 + u8 bit = RZG2L_PIN_ID_TO_PIN(offset); 716 + 717 + rzg2l_gpio_set_direction(pctrl, port, bit, false); 718 + 719 + return 0; 720 + } 721 + 722 + static void rzg2l_gpio_set(struct gpio_chip *chip, unsigned int offset, 723 + int value) 724 + { 725 + struct rzg2l_pinctrl *pctrl = gpiochip_get_data(chip); 726 + u32 port = RZG2L_PIN_ID_TO_PORT(offset); 727 + u8 bit = RZG2L_PIN_ID_TO_PIN(offset); 728 + unsigned long flags; 729 + u8 reg8; 730 + 731 + spin_lock_irqsave(&pctrl->lock, flags); 732 + 733 + reg8 = readb(pctrl->base + P(port)); 734 + 735 + if (value) 736 + writeb(reg8 | BIT(bit), pctrl->base + P(port)); 737 + else 738 + writeb(reg8 & ~BIT(bit), pctrl->base + P(port)); 739 + 740 + spin_unlock_irqrestore(&pctrl->lock, flags); 741 + } 742 + 743 + static int rzg2l_gpio_direction_output(struct gpio_chip *chip, 744 + unsigned int offset, int value) 745 + { 746 + struct rzg2l_pinctrl *pctrl = gpiochip_get_data(chip); 747 + u32 port = RZG2L_PIN_ID_TO_PORT(offset); 748 + u8 bit = RZG2L_PIN_ID_TO_PIN(offset); 749 + 750 + rzg2l_gpio_set(chip, offset, value); 751 + rzg2l_gpio_set_direction(pctrl, port, bit, true); 752 + 753 + return 0; 754 + } 755 + 756 + static int rzg2l_gpio_get(struct gpio_chip *chip, unsigned int offset) 757 + { 758 + struct rzg2l_pinctrl *pctrl = gpiochip_get_data(chip); 759 + u32 port = RZG2L_PIN_ID_TO_PORT(offset); 760 + u8 bit = RZG2L_PIN_ID_TO_PIN(offset); 761 + u16 reg16; 762 + 763 + reg16 = readw(pctrl->base + PM(port)); 764 + reg16 = (reg16 >> (bit * 2)) & PM_MASK; 765 + 766 + if (reg16 == PM_INPUT) 767 + return !!(readb(pctrl->base + PIN(port)) & BIT(bit)); 768 + else if (reg16 == PM_OUTPUT) 769 + return !!(readb(pctrl->base + P(port)) & BIT(bit)); 770 + else 771 + return -EINVAL; 772 + } 773 + 774 + static void rzg2l_gpio_free(struct gpio_chip *chip, unsigned int offset) 775 + { 776 + pinctrl_gpio_free(chip->base + offset); 777 + 778 + /* 779 + * Set the GPIO as an input to ensure that the next GPIO request won't 780 + * drive the GPIO pin as an output. 781 + */ 782 + rzg2l_gpio_direction_input(chip, offset); 783 + } 784 + 785 + static const char * const rzg2l_gpio_names[] = { 786 + "P0_0", "P0_1", "P0_2", "P0_3", "P0_4", "P0_5", "P0_6", "P0_7", 787 + "P1_0", "P1_1", "P1_2", "P1_3", "P1_4", "P1_5", "P1_6", "P1_7", 788 + "P2_0", "P2_1", "P2_2", "P2_3", "P2_4", "P2_5", "P2_6", "P2_7", 789 + "P3_0", "P3_1", "P3_2", "P3_3", "P3_4", "P3_5", "P3_6", "P3_7", 790 + "P4_0", "P4_1", "P4_2", "P4_3", "P4_4", "P4_5", "P4_6", "P4_7", 791 + "P5_0", "P5_1", "P5_2", "P5_3", "P5_4", "P5_5", "P5_6", "P5_7", 792 + "P6_0", "P6_1", "P6_2", "P6_3", "P6_4", "P6_5", "P6_6", "P6_7", 793 + "P7_0", "P7_1", "P7_2", "P7_3", "P7_4", "P7_5", "P7_6", "P7_7", 794 + "P8_0", "P8_1", "P8_2", "P8_3", "P8_4", "P8_5", "P8_6", "P8_7", 795 + "P9_0", "P9_1", "P9_2", "P9_3", "P9_4", "P9_5", "P9_6", "P9_7", 796 + "P10_0", "P10_1", "P10_2", "P10_3", "P10_4", "P10_5", "P10_6", "P10_7", 797 + "P11_0", "P11_1", "P11_2", "P11_3", "P11_4", "P11_5", "P11_6", "P11_7", 798 + "P12_0", "P12_1", "P12_2", "P12_3", "P12_4", "P12_5", "P12_6", "P12_7", 799 + "P13_0", "P13_1", "P13_2", "P13_3", "P13_4", "P13_5", "P13_6", "P13_7", 800 + "P14_0", "P14_1", "P14_2", "P14_3", "P14_4", "P14_5", "P14_6", "P14_7", 801 + "P15_0", "P15_1", "P15_2", "P15_3", "P15_4", "P15_5", "P15_6", "P15_7", 802 + "P16_0", "P16_1", "P16_2", "P16_3", "P16_4", "P16_5", "P16_6", "P16_7", 803 + "P17_0", "P17_1", "P17_2", "P17_3", "P17_4", "P17_5", "P17_6", "P17_7", 804 + "P18_0", "P18_1", "P18_2", "P18_3", "P18_4", "P18_5", "P18_6", "P18_7", 805 + "P19_0", "P19_1", "P19_2", "P19_3", "P19_4", "P19_5", "P19_6", "P19_7", 806 + "P20_0", "P20_1", "P20_2", "P20_3", "P20_4", "P20_5", "P20_6", "P20_7", 807 + "P21_0", "P21_1", "P21_2", "P21_3", "P21_4", "P21_5", "P21_6", "P21_7", 808 + "P22_0", "P22_1", "P22_2", "P22_3", "P22_4", "P22_5", "P22_6", "P22_7", 809 + "P23_0", "P23_1", "P23_2", "P23_3", "P23_4", "P23_5", "P23_6", "P23_7", 810 + "P24_0", "P24_1", "P24_2", "P24_3", "P24_4", "P24_5", "P24_6", "P24_7", 811 + "P25_0", "P25_1", "P25_2", "P25_3", "P25_4", "P25_5", "P25_6", "P25_7", 812 + "P26_0", "P26_1", "P26_2", "P26_3", "P26_4", "P26_5", "P26_6", "P26_7", 813 + "P27_0", "P27_1", "P27_2", "P27_3", "P27_4", "P27_5", "P27_6", "P27_7", 814 + "P28_0", "P28_1", "P28_2", "P28_3", "P28_4", "P28_5", "P28_6", "P28_7", 815 + "P29_0", "P29_1", "P29_2", "P29_3", "P29_4", "P29_5", "P29_6", "P29_7", 816 + "P30_0", "P30_1", "P30_2", "P30_3", "P30_4", "P30_5", "P30_6", "P30_7", 817 + "P31_0", "P31_1", "P31_2", "P31_3", "P31_4", "P31_5", "P31_6", "P31_7", 818 + "P32_0", "P32_1", "P32_2", "P32_3", "P32_4", "P32_5", "P32_6", "P32_7", 819 + "P33_0", "P33_1", "P33_2", "P33_3", "P33_4", "P33_5", "P33_6", "P33_7", 820 + "P34_0", "P34_1", "P34_2", "P34_3", "P34_4", "P34_5", "P34_6", "P34_7", 821 + "P35_0", "P35_1", "P35_2", "P35_3", "P35_4", "P35_5", "P35_6", "P35_7", 822 + "P36_0", "P36_1", "P36_2", "P36_3", "P36_4", "P36_5", "P36_6", "P36_7", 823 + "P37_0", "P37_1", "P37_2", "P37_3", "P37_4", "P37_5", "P37_6", "P37_7", 824 + "P38_0", "P38_1", "P38_2", "P38_3", "P38_4", "P38_5", "P38_6", "P38_7", 825 + "P39_0", "P39_1", "P39_2", "P39_3", "P39_4", "P39_5", "P39_6", "P39_7", 826 + "P40_0", "P40_1", "P40_2", "P40_3", "P40_4", "P40_5", "P40_6", "P40_7", 827 + "P41_0", "P41_1", "P41_2", "P41_3", "P41_4", "P41_5", "P41_6", "P41_7", 828 + "P42_0", "P42_1", "P42_2", "P42_3", "P42_4", "P42_5", "P42_6", "P42_7", 829 + "P43_0", "P43_1", "P43_2", "P43_3", "P43_4", "P43_5", "P43_6", "P43_7", 830 + "P44_0", "P44_1", "P44_2", "P44_3", "P44_4", "P44_5", "P44_6", "P44_7", 831 + "P45_0", "P45_1", "P45_2", "P45_3", "P45_4", "P45_5", "P45_6", "P45_7", 832 + "P46_0", "P46_1", "P46_2", "P46_3", "P46_4", "P46_5", "P46_6", "P46_7", 833 + "P47_0", "P47_1", "P47_2", "P47_3", "P47_4", "P47_5", "P47_6", "P47_7", 834 + "P48_0", "P48_1", "P48_2", "P48_3", "P48_4", "P48_5", "P48_6", "P48_7", 835 + }; 836 + 837 + static const u32 rzg2l_gpio_configs[] = { 838 + RZG2L_GPIO_PORT_PACK(2, 0x10, RZG2L_MPXED_PIN_FUNCS), 839 + RZG2L_GPIO_PORT_PACK(2, 0x11, RZG2L_MPXED_PIN_FUNCS), 840 + RZG2L_GPIO_PORT_PACK(2, 0x12, RZG2L_MPXED_PIN_FUNCS), 841 + RZG2L_GPIO_PORT_PACK(2, 0x13, RZG2L_MPXED_PIN_FUNCS), 842 + RZG2L_GPIO_PORT_PACK(2, 0x14, RZG2L_MPXED_PIN_FUNCS), 843 + RZG2L_GPIO_PORT_PACK(3, 0x15, RZG2L_MPXED_PIN_FUNCS), 844 + RZG2L_GPIO_PORT_PACK(2, 0x16, RZG2L_MPXED_PIN_FUNCS), 845 + RZG2L_GPIO_PORT_PACK(3, 0x17, RZG2L_MPXED_PIN_FUNCS), 846 + RZG2L_GPIO_PORT_PACK(3, 0x18, RZG2L_MPXED_PIN_FUNCS), 847 + RZG2L_GPIO_PORT_PACK(2, 0x19, RZG2L_MPXED_PIN_FUNCS), 848 + RZG2L_GPIO_PORT_PACK(2, 0x1a, RZG2L_MPXED_PIN_FUNCS), 849 + RZG2L_GPIO_PORT_PACK(2, 0x1b, RZG2L_MPXED_PIN_FUNCS), 850 + RZG2L_GPIO_PORT_PACK(2, 0x1c, RZG2L_MPXED_PIN_FUNCS), 851 + RZG2L_GPIO_PORT_PACK(3, 0x1d, RZG2L_MPXED_PIN_FUNCS), 852 + RZG2L_GPIO_PORT_PACK(2, 0x1e, RZG2L_MPXED_PIN_FUNCS), 853 + RZG2L_GPIO_PORT_PACK(2, 0x1f, RZG2L_MPXED_PIN_FUNCS), 854 + RZG2L_GPIO_PORT_PACK(2, 0x20, RZG2L_MPXED_PIN_FUNCS), 855 + RZG2L_GPIO_PORT_PACK(3, 0x22, RZG2L_MPXED_PIN_FUNCS), 856 + RZG2L_GPIO_PORT_PACK(2, 0x22, RZG2L_MPXED_PIN_FUNCS), 857 + RZG2L_GPIO_PORT_PACK(2, 0x23, RZG2L_MPXED_PIN_FUNCS), 858 + RZG2L_GPIO_PORT_PACK(3, 0x24, RZG2L_MPXED_ETH_PIN_FUNCS(PIN_CFG_IOLH_ETH0)), 859 + RZG2L_GPIO_PORT_PACK(2, 0x25, RZG2L_MPXED_ETH_PIN_FUNCS(PIN_CFG_IOLH_ETH0)), 860 + RZG2L_GPIO_PORT_PACK(2, 0x26, RZG2L_MPXED_ETH_PIN_FUNCS(PIN_CFG_IOLH_ETH0)), 861 + RZG2L_GPIO_PORT_PACK(2, 0x27, RZG2L_MPXED_ETH_PIN_FUNCS(PIN_CFG_IOLH_ETH0)), 862 + RZG2L_GPIO_PORT_PACK(2, 0x28, RZG2L_MPXED_ETH_PIN_FUNCS(PIN_CFG_IOLH_ETH0)), 863 + RZG2L_GPIO_PORT_PACK(2, 0x29, RZG2L_MPXED_ETH_PIN_FUNCS(PIN_CFG_IOLH_ETH0)), 864 + RZG2L_GPIO_PORT_PACK(2, 0x2a, RZG2L_MPXED_ETH_PIN_FUNCS(PIN_CFG_IOLH_ETH0)), 865 + RZG2L_GPIO_PORT_PACK(2, 0x2b, RZG2L_MPXED_ETH_PIN_FUNCS(PIN_CFG_IOLH_ETH0)), 866 + RZG2L_GPIO_PORT_PACK(2, 0x2c, RZG2L_MPXED_ETH_PIN_FUNCS(PIN_CFG_IOLH_ETH0)), 867 + RZG2L_GPIO_PORT_PACK(2, 0x2d, RZG2L_MPXED_ETH_PIN_FUNCS(PIN_CFG_IOLH_ETH1)), 868 + RZG2L_GPIO_PORT_PACK(2, 0x2e, RZG2L_MPXED_ETH_PIN_FUNCS(PIN_CFG_IOLH_ETH1)), 869 + RZG2L_GPIO_PORT_PACK(2, 0x2f, RZG2L_MPXED_ETH_PIN_FUNCS(PIN_CFG_IOLH_ETH1)), 870 + RZG2L_GPIO_PORT_PACK(2, 0x30, RZG2L_MPXED_ETH_PIN_FUNCS(PIN_CFG_IOLH_ETH1)), 871 + RZG2L_GPIO_PORT_PACK(2, 0x31, RZG2L_MPXED_ETH_PIN_FUNCS(PIN_CFG_IOLH_ETH1)), 872 + RZG2L_GPIO_PORT_PACK(2, 0x32, RZG2L_MPXED_ETH_PIN_FUNCS(PIN_CFG_IOLH_ETH1)), 873 + RZG2L_GPIO_PORT_PACK(2, 0x33, RZG2L_MPXED_ETH_PIN_FUNCS(PIN_CFG_IOLH_ETH1)), 874 + RZG2L_GPIO_PORT_PACK(2, 0x34, RZG2L_MPXED_ETH_PIN_FUNCS(PIN_CFG_IOLH_ETH1)), 875 + RZG2L_GPIO_PORT_PACK(3, 0x35, RZG2L_MPXED_ETH_PIN_FUNCS(PIN_CFG_IOLH_ETH1)), 876 + RZG2L_GPIO_PORT_PACK(2, 0x36, RZG2L_MPXED_PIN_FUNCS), 877 + RZG2L_GPIO_PORT_PACK(3, 0x37, RZG2L_MPXED_PIN_FUNCS), 878 + RZG2L_GPIO_PORT_PACK(3, 0x38, RZG2L_MPXED_PIN_FUNCS), 879 + RZG2L_GPIO_PORT_PACK(2, 0x39, RZG2L_MPXED_PIN_FUNCS), 880 + RZG2L_GPIO_PORT_PACK(5, 0x3a, RZG2L_MPXED_PIN_FUNCS), 881 + RZG2L_GPIO_PORT_PACK(4, 0x3b, RZG2L_MPXED_PIN_FUNCS), 882 + RZG2L_GPIO_PORT_PACK(4, 0x3c, RZG2L_MPXED_PIN_FUNCS), 883 + RZG2L_GPIO_PORT_PACK(4, 0x3d, RZG2L_MPXED_PIN_FUNCS), 884 + RZG2L_GPIO_PORT_PACK(4, 0x3e, RZG2L_MPXED_PIN_FUNCS), 885 + RZG2L_GPIO_PORT_PACK(4, 0x3f, RZG2L_MPXED_PIN_FUNCS), 886 + RZG2L_GPIO_PORT_PACK(5, 0x40, RZG2L_MPXED_PIN_FUNCS), 887 + }; 888 + 889 + static struct rzg2l_dedicated_configs rzg2l_dedicated_pins[] = { 890 + { "NMI", RZG2L_SINGLE_PIN_PACK(0x1, 0, 891 + (PIN_CFG_FILONOFF | PIN_CFG_FILNUM | PIN_CFG_FILCLKSEL)) }, 892 + { "TMS/SWDIO", RZG2L_SINGLE_PIN_PACK(0x2, 0, 893 + (PIN_CFG_SR | PIN_CFG_IOLH | PIN_CFG_IEN)) }, 894 + { "TDO", RZG2L_SINGLE_PIN_PACK(0x3, 0, 895 + (PIN_CFG_IOLH | PIN_CFG_SR | PIN_CFG_IEN)) }, 896 + { "AUDIO_CLK1", RZG2L_SINGLE_PIN_PACK(0x4, 0, PIN_CFG_IEN) }, 897 + { "AUDIO_CLK2", RZG2L_SINGLE_PIN_PACK(0x4, 1, PIN_CFG_IEN) }, 898 + { "SD0_CLK", RZG2L_SINGLE_PIN_PACK(0x6, 0, 899 + (PIN_CFG_IOLH | PIN_CFG_SR | PIN_CFG_IOLH_SD0)) }, 900 + { "SD0_CMD", RZG2L_SINGLE_PIN_PACK(0x6, 1, 901 + (PIN_CFG_IOLH | PIN_CFG_SR | PIN_CFG_IEN | PIN_CFG_IOLH_SD0)) }, 902 + { "SD0_RST#", RZG2L_SINGLE_PIN_PACK(0x6, 2, 903 + (PIN_CFG_IOLH | PIN_CFG_SR | PIN_CFG_IOLH_SD0)) }, 904 + { "SD0_DATA0", RZG2L_SINGLE_PIN_PACK(0x7, 0, 905 + (PIN_CFG_IOLH | PIN_CFG_SR | PIN_CFG_IEN | PIN_CFG_IOLH_SD0)) }, 906 + { "SD0_DATA1", RZG2L_SINGLE_PIN_PACK(0x7, 1, 907 + (PIN_CFG_IOLH | PIN_CFG_SR | PIN_CFG_IEN | PIN_CFG_IOLH_SD0)) }, 908 + { "SD0_DATA2", RZG2L_SINGLE_PIN_PACK(0x7, 2, 909 + (PIN_CFG_IOLH | PIN_CFG_SR | PIN_CFG_IEN | PIN_CFG_IOLH_SD0)) }, 910 + { "SD0_DATA3", RZG2L_SINGLE_PIN_PACK(0x7, 3, 911 + (PIN_CFG_IOLH | PIN_CFG_SR | PIN_CFG_IEN | PIN_CFG_IOLH_SD0)) }, 912 + { "SD0_DATA4", RZG2L_SINGLE_PIN_PACK(0x7, 4, 913 + (PIN_CFG_IOLH | PIN_CFG_SR | PIN_CFG_IEN | PIN_CFG_IOLH_SD0)) }, 914 + { "SD0_DATA5", RZG2L_SINGLE_PIN_PACK(0x7, 5, 915 + (PIN_CFG_IOLH | PIN_CFG_SR | PIN_CFG_IEN | PIN_CFG_IOLH_SD0)) }, 916 + { "SD0_DATA6", RZG2L_SINGLE_PIN_PACK(0x7, 6, 917 + (PIN_CFG_IOLH | PIN_CFG_SR | PIN_CFG_IEN | PIN_CFG_IOLH_SD0)) }, 918 + { "SD0_DATA7", RZG2L_SINGLE_PIN_PACK(0x7, 7, 919 + (PIN_CFG_IOLH | PIN_CFG_SR | PIN_CFG_IEN | PIN_CFG_IOLH_SD0)) }, 920 + { "SD1_CLK", RZG2L_SINGLE_PIN_PACK(0x8, 0, 921 + (PIN_CFG_IOLH | PIN_CFG_SR | PIN_CFG_IOLH_SD1))}, 922 + { "SD1_CMD", RZG2L_SINGLE_PIN_PACK(0x8, 1, 923 + (PIN_CFG_IOLH | PIN_CFG_SR | PIN_CFG_IEN | PIN_CFG_IOLH_SD1)) }, 924 + { "SD1_DATA0", RZG2L_SINGLE_PIN_PACK(0x9, 0, 925 + (PIN_CFG_IOLH | PIN_CFG_SR | PIN_CFG_IEN | PIN_CFG_IOLH_SD1)) }, 926 + { "SD1_DATA1", RZG2L_SINGLE_PIN_PACK(0x9, 1, 927 + (PIN_CFG_IOLH | PIN_CFG_SR | PIN_CFG_IEN | PIN_CFG_IOLH_SD1)) }, 928 + { "SD1_DATA2", RZG2L_SINGLE_PIN_PACK(0x9, 2, 929 + (PIN_CFG_IOLH | PIN_CFG_SR | PIN_CFG_IEN | PIN_CFG_IOLH_SD1)) }, 930 + { "SD1_DATA3", RZG2L_SINGLE_PIN_PACK(0x9, 3, 931 + (PIN_CFG_IOLH | PIN_CFG_SR | PIN_CFG_IEN | PIN_CFG_IOLH_SD1)) }, 932 + { "QSPI0_SPCLK", RZG2L_SINGLE_PIN_PACK(0xa, 0, 933 + (PIN_CFG_IOLH | PIN_CFG_SR | PIN_CFG_IOLH_QSPI)) }, 934 + { "QSPI0_IO0", RZG2L_SINGLE_PIN_PACK(0xa, 1, 935 + (PIN_CFG_IOLH | PIN_CFG_SR | PIN_CFG_IOLH_QSPI)) }, 936 + { "QSPI0_IO1", RZG2L_SINGLE_PIN_PACK(0xa, 2, 937 + (PIN_CFG_IOLH | PIN_CFG_SR | PIN_CFG_IOLH_QSPI)) }, 938 + { "QSPI0_IO2", RZG2L_SINGLE_PIN_PACK(0xa, 3, 939 + (PIN_CFG_IOLH | PIN_CFG_SR | PIN_CFG_IOLH_QSPI)) }, 940 + { "QSPI0_IO3", RZG2L_SINGLE_PIN_PACK(0xa, 4, 941 + (PIN_CFG_IOLH | PIN_CFG_SR | PIN_CFG_IOLH_QSPI)) }, 942 + { "QSPI0_SSL", RZG2L_SINGLE_PIN_PACK(0xa, 5, 943 + (PIN_CFG_IOLH | PIN_CFG_SR | PIN_CFG_IOLH_QSPI)) }, 944 + { "QSPI1_SPCLK", RZG2L_SINGLE_PIN_PACK(0xb, 0, 945 + (PIN_CFG_IOLH | PIN_CFG_SR | PIN_CFG_IOLH_QSPI)) }, 946 + { "QSPI1_IO0", RZG2L_SINGLE_PIN_PACK(0xb, 1, 947 + (PIN_CFG_IOLH | PIN_CFG_SR | PIN_CFG_IOLH_QSPI)) }, 948 + { "QSPI1_IO1", RZG2L_SINGLE_PIN_PACK(0xb, 2, 949 + (PIN_CFG_IOLH | PIN_CFG_SR | PIN_CFG_IOLH_QSPI)) }, 950 + { "QSPI1_IO2", RZG2L_SINGLE_PIN_PACK(0xb, 3, 951 + (PIN_CFG_IOLH | PIN_CFG_SR | PIN_CFG_IOLH_QSPI)) }, 952 + { "QSPI1_IO3", RZG2L_SINGLE_PIN_PACK(0xb, 4, 953 + (PIN_CFG_IOLH | PIN_CFG_SR | PIN_CFG_IOLH_QSPI)) }, 954 + { "QSPI1_SSL", RZG2L_SINGLE_PIN_PACK(0xb, 5, 955 + (PIN_CFG_IOLH | PIN_CFG_SR | PIN_CFG_IOLH_QSPI)) }, 956 + { "QSPI_RESET#", RZG2L_SINGLE_PIN_PACK(0xc, 0, 957 + (PIN_CFG_IOLH | PIN_CFG_SR | PIN_CFG_IOLH_QSPI)) }, 958 + { "QSPI_WP#", RZG2L_SINGLE_PIN_PACK(0xc, 1, 959 + (PIN_CFG_IOLH | PIN_CFG_SR | PIN_CFG_IOLH_QSPI)) }, 960 + { "QSPI_INT#", RZG2L_SINGLE_PIN_PACK(0xc, 2, (PIN_CFG_SR | PIN_CFG_IOLH_QSPI)) }, 961 + { "WDTOVF_PERROUT#", RZG2L_SINGLE_PIN_PACK(0xd, 0, (PIN_CFG_IOLH | PIN_CFG_SR)) }, 962 + { "RIIC0_SDA", RZG2L_SINGLE_PIN_PACK(0xe, 0, PIN_CFG_IEN) }, 963 + { "RIIC0_SCL", RZG2L_SINGLE_PIN_PACK(0xe, 1, PIN_CFG_IEN) }, 964 + { "RIIC1_SDA", RZG2L_SINGLE_PIN_PACK(0xe, 2, PIN_CFG_IEN) }, 965 + { "RIIC1_SCL", RZG2L_SINGLE_PIN_PACK(0xe, 3, PIN_CFG_IEN) }, 966 + }; 967 + 968 + static int rzg2l_gpio_register(struct rzg2l_pinctrl *pctrl) 969 + { 970 + struct device_node *np = pctrl->dev->of_node; 971 + struct gpio_chip *chip = &pctrl->gpio_chip; 972 + const char *name = dev_name(pctrl->dev); 973 + struct of_phandle_args of_args; 974 + int ret; 975 + 976 + ret = of_parse_phandle_with_fixed_args(np, "gpio-ranges", 3, 0, &of_args); 977 + if (ret) { 978 + dev_err(pctrl->dev, "Unable to parse gpio-ranges\n"); 979 + return ret; 980 + } 981 + 982 + if (of_args.args[0] != 0 || of_args.args[1] != 0 || 983 + of_args.args[2] != ARRAY_SIZE(rzg2l_gpio_names)) { 984 + dev_err(pctrl->dev, "gpio-ranges does not match selected SOC\n"); 985 + return -EINVAL; 986 + } 987 + 988 + chip->names = rzg2l_gpio_names; 989 + chip->request = rzg2l_gpio_request; 990 + chip->free = rzg2l_gpio_free; 991 + chip->get_direction = rzg2l_gpio_get_direction; 992 + chip->direction_input = rzg2l_gpio_direction_input; 993 + chip->direction_output = rzg2l_gpio_direction_output; 994 + chip->get = rzg2l_gpio_get; 995 + chip->set = rzg2l_gpio_set; 996 + chip->label = name; 997 + chip->parent = pctrl->dev; 998 + chip->owner = THIS_MODULE; 999 + chip->base = -1; 1000 + chip->ngpio = of_args.args[2]; 1001 + 1002 + pctrl->gpio_range.id = 0; 1003 + pctrl->gpio_range.pin_base = 0; 1004 + pctrl->gpio_range.base = 0; 1005 + pctrl->gpio_range.npins = chip->ngpio; 1006 + pctrl->gpio_range.name = chip->label; 1007 + pctrl->gpio_range.gc = chip; 1008 + ret = devm_gpiochip_add_data(pctrl->dev, chip, pctrl); 1009 + if (ret) { 1010 + dev_err(pctrl->dev, "failed to add GPIO controller\n"); 1011 + return ret; 1012 + } 1013 + 1014 + dev_dbg(pctrl->dev, "Registered gpio controller\n"); 1015 + 1016 + return 0; 1017 + } 1018 + 1019 + static int rzg2l_pinctrl_register(struct rzg2l_pinctrl *pctrl) 1020 + { 1021 + struct pinctrl_pin_desc *pins; 1022 + unsigned int i, j; 1023 + u32 *pin_data; 1024 + int ret; 1025 + 1026 + pctrl->desc.name = DRV_NAME; 1027 + pctrl->desc.npins = pctrl->data->n_port_pins + pctrl->data->n_dedicated_pins; 1028 + pctrl->desc.pctlops = &rzg2l_pinctrl_pctlops; 1029 + pctrl->desc.pmxops = &rzg2l_pinctrl_pmxops; 1030 + pctrl->desc.confops = &rzg2l_pinctrl_confops; 1031 + pctrl->desc.owner = THIS_MODULE; 1032 + 1033 + pins = devm_kcalloc(pctrl->dev, pctrl->desc.npins, sizeof(*pins), GFP_KERNEL); 1034 + if (!pins) 1035 + return -ENOMEM; 1036 + 1037 + pin_data = devm_kcalloc(pctrl->dev, pctrl->desc.npins, 1038 + sizeof(*pin_data), GFP_KERNEL); 1039 + if (!pin_data) 1040 + return -ENOMEM; 1041 + 1042 + pctrl->pins = pins; 1043 + pctrl->desc.pins = pins; 1044 + 1045 + for (i = 0, j = 0; i < pctrl->data->n_port_pins; i++) { 1046 + pins[i].number = i; 1047 + pins[i].name = pctrl->data->port_pins[i]; 1048 + if (i && !(i % RZG2L_PINS_PER_PORT)) 1049 + j++; 1050 + pin_data[i] = pctrl->data->port_pin_configs[j]; 1051 + pins[i].drv_data = &pin_data[i]; 1052 + } 1053 + 1054 + for (i = 0; i < pctrl->data->n_dedicated_pins; i++) { 1055 + unsigned int index = pctrl->data->n_port_pins + i; 1056 + 1057 + pins[index].number = index; 1058 + pins[index].name = pctrl->data->dedicated_pins[i].name; 1059 + pin_data[index] = pctrl->data->dedicated_pins[i].config; 1060 + pins[index].drv_data = &pin_data[index]; 1061 + } 1062 + 1063 + ret = devm_pinctrl_register_and_init(pctrl->dev, &pctrl->desc, pctrl, 1064 + &pctrl->pctl); 1065 + if (ret) { 1066 + dev_err(pctrl->dev, "pinctrl registration failed\n"); 1067 + return ret; 1068 + } 1069 + 1070 + ret = pinctrl_enable(pctrl->pctl); 1071 + if (ret) { 1072 + dev_err(pctrl->dev, "pinctrl enable failed\n"); 1073 + return ret; 1074 + } 1075 + 1076 + ret = rzg2l_gpio_register(pctrl); 1077 + if (ret) { 1078 + dev_err(pctrl->dev, "failed to add GPIO chip: %i\n", ret); 1079 + return ret; 1080 + } 1081 + 1082 + return 0; 1083 + } 1084 + 1085 + static void rzg2l_pinctrl_clk_disable(void *data) 1086 + { 1087 + clk_disable_unprepare(data); 1088 + } 1089 + 1090 + static int rzg2l_pinctrl_probe(struct platform_device *pdev) 1091 + { 1092 + struct rzg2l_pinctrl *pctrl; 1093 + int ret; 1094 + 1095 + pctrl = devm_kzalloc(&pdev->dev, sizeof(*pctrl), GFP_KERNEL); 1096 + if (!pctrl) 1097 + return -ENOMEM; 1098 + 1099 + pctrl->dev = &pdev->dev; 1100 + 1101 + pctrl->data = of_device_get_match_data(&pdev->dev); 1102 + if (!pctrl->data) 1103 + return -EINVAL; 1104 + 1105 + pctrl->base = devm_platform_ioremap_resource(pdev, 0); 1106 + if (IS_ERR(pctrl->base)) 1107 + return PTR_ERR(pctrl->base); 1108 + 1109 + pctrl->clk = devm_clk_get(pctrl->dev, NULL); 1110 + if (IS_ERR(pctrl->clk)) { 1111 + ret = PTR_ERR(pctrl->clk); 1112 + dev_err(pctrl->dev, "failed to get GPIO clk : %i\n", ret); 1113 + return ret; 1114 + } 1115 + 1116 + spin_lock_init(&pctrl->lock); 1117 + 1118 + platform_set_drvdata(pdev, pctrl); 1119 + 1120 + ret = clk_prepare_enable(pctrl->clk); 1121 + if (ret) { 1122 + dev_err(pctrl->dev, "failed to enable GPIO clk: %i\n", ret); 1123 + return ret; 1124 + } 1125 + 1126 + ret = devm_add_action_or_reset(&pdev->dev, rzg2l_pinctrl_clk_disable, 1127 + pctrl->clk); 1128 + if (ret) { 1129 + dev_err(pctrl->dev, 1130 + "failed to register GPIO clk disable action, %i\n", 1131 + ret); 1132 + return ret; 1133 + } 1134 + 1135 + ret = rzg2l_pinctrl_register(pctrl); 1136 + if (ret) 1137 + return ret; 1138 + 1139 + dev_info(pctrl->dev, "%s support registered\n", DRV_NAME); 1140 + return 0; 1141 + } 1142 + 1143 + static struct rzg2l_pinctrl_data r9a07g044_data = { 1144 + .port_pins = rzg2l_gpio_names, 1145 + .port_pin_configs = rzg2l_gpio_configs, 1146 + .dedicated_pins = rzg2l_dedicated_pins, 1147 + .n_port_pins = ARRAY_SIZE(rzg2l_gpio_names), 1148 + .n_dedicated_pins = ARRAY_SIZE(rzg2l_dedicated_pins), 1149 + }; 1150 + 1151 + static const struct of_device_id rzg2l_pinctrl_of_table[] = { 1152 + { 1153 + .compatible = "renesas,r9a07g044-pinctrl", 1154 + .data = &r9a07g044_data, 1155 + }, 1156 + { /* sentinel */ } 1157 + }; 1158 + 1159 + static struct platform_driver rzg2l_pinctrl_driver = { 1160 + .driver = { 1161 + .name = DRV_NAME, 1162 + .of_match_table = of_match_ptr(rzg2l_pinctrl_of_table), 1163 + }, 1164 + .probe = rzg2l_pinctrl_probe, 1165 + }; 1166 + 1167 + static int __init rzg2l_pinctrl_init(void) 1168 + { 1169 + return platform_driver_register(&rzg2l_pinctrl_driver); 1170 + } 1171 + core_initcall(rzg2l_pinctrl_init); 1172 + 1173 + MODULE_AUTHOR("Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>"); 1174 + MODULE_DESCRIPTION("Pin and gpio controller driver for RZ/G2L family"); 1175 + MODULE_LICENSE("GPL v2");
+8 -8
drivers/pinctrl/renesas/pinctrl.c
··· 841 841 return pinctrl_enable(pmx->pctl); 842 842 } 843 843 844 - static const struct pinmux_bias_reg * 844 + const struct pinmux_bias_reg * 845 845 rcar_pin_to_bias_reg(const struct sh_pfc *pfc, unsigned int pin, 846 846 unsigned int *bit) 847 847 { ··· 898 898 899 899 if (reg->puen) { 900 900 enable = sh_pfc_read(pfc, reg->puen) & ~BIT(bit); 901 - if (bias != PIN_CONFIG_BIAS_DISABLE) 901 + if (bias != PIN_CONFIG_BIAS_DISABLE) { 902 902 enable |= BIT(bit); 903 903 904 - if (reg->pud) { 905 - updown = sh_pfc_read(pfc, reg->pud) & ~BIT(bit); 906 - if (bias == PIN_CONFIG_BIAS_PULL_UP) 907 - updown |= BIT(bit); 904 + if (reg->pud) { 905 + updown = sh_pfc_read(pfc, reg->pud) & ~BIT(bit); 906 + if (bias == PIN_CONFIG_BIAS_PULL_UP) 907 + updown |= BIT(bit); 908 908 909 - sh_pfc_write(pfc, reg->pud, updown); 909 + sh_pfc_write(pfc, reg->pud, updown); 910 + } 910 911 } 911 - 912 912 sh_pfc_write(pfc, reg->puen, enable); 913 913 } else { 914 914 enable = sh_pfc_read(pfc, reg->pud) & ~BIT(bit);
+5 -2
drivers/pinctrl/renesas/sh_pfc.h
··· 332 332 extern const struct sh_pfc_soc_info r8a7792_pinmux_info; 333 333 extern const struct sh_pfc_soc_info r8a7793_pinmux_info; 334 334 extern const struct sh_pfc_soc_info r8a7794_pinmux_info; 335 - extern const struct sh_pfc_soc_info r8a77950_pinmux_info __weak; 336 - extern const struct sh_pfc_soc_info r8a77951_pinmux_info __weak; 335 + extern const struct sh_pfc_soc_info r8a77950_pinmux_info; 336 + extern const struct sh_pfc_soc_info r8a77951_pinmux_info; 337 337 extern const struct sh_pfc_soc_info r8a77960_pinmux_info; 338 338 extern const struct sh_pfc_soc_info r8a77961_pinmux_info; 339 339 extern const struct sh_pfc_soc_info r8a77965_pinmux_info; ··· 781 781 /* 782 782 * Bias helpers 783 783 */ 784 + const struct pinmux_bias_reg * 785 + rcar_pin_to_bias_reg(const struct sh_pfc *pfc, unsigned int pin, 786 + unsigned int *bit); 784 787 unsigned int rcar_pinmux_get_bias(struct sh_pfc *pfc, unsigned int pin); 785 788 void rcar_pinmux_set_bias(struct sh_pfc *pfc, unsigned int pin, 786 789 unsigned int bias);
+116
drivers/pinctrl/samsung/pinctrl-exynos-arm64.c
··· 40 40 .reg_offset = { 0x00, 0x04, 0x08, 0x0c, }, 41 41 }; 42 42 43 + /* 44 + * Bank type for non-alive type. Bit fields: 45 + * CON: 4, DAT: 1, PUD: 4, DRV: 4, CONPDN: 2, PUDPDN: 4 46 + */ 47 + static const struct samsung_pin_bank_type exynos850_bank_type_off = { 48 + .fld_width = { 4, 1, 4, 4, 2, 4, }, 49 + .reg_offset = { 0x00, 0x04, 0x08, 0x0c, 0x10, 0x14, }, 50 + }; 51 + 52 + /* 53 + * Bank type for alive type. Bit fields: 54 + * CON: 4, DAT: 1, PUD: 4, DRV: 4 55 + */ 56 + static const struct samsung_pin_bank_type exynos850_bank_type_alive = { 57 + .fld_width = { 4, 1, 4, 4, }, 58 + .reg_offset = { 0x00, 0x04, 0x08, 0x0c, }, 59 + }; 60 + 43 61 /* Pad retention control code for accessing PMU regmap */ 44 62 static atomic_t exynos_shared_retention_refcnt; 45 63 ··· 439 421 const struct samsung_pinctrl_of_match_data exynos7_of_data __initconst = { 440 422 .ctrl = exynos7_pin_ctrl, 441 423 .num_ctrl = ARRAY_SIZE(exynos7_pin_ctrl), 424 + }; 425 + 426 + /* pin banks of exynos850 pin-controller 0 (ALIVE) */ 427 + static const struct samsung_pin_bank_data exynos850_pin_banks0[] __initconst = { 428 + /* Must start with EINTG banks, ordered by EINT group number. */ 429 + EXYNOS850_PIN_BANK_EINTW(8, 0x000, "gpa0", 0x00), 430 + EXYNOS850_PIN_BANK_EINTW(8, 0x020, "gpa1", 0x04), 431 + EXYNOS850_PIN_BANK_EINTW(8, 0x040, "gpa2", 0x08), 432 + EXYNOS850_PIN_BANK_EINTW(8, 0x060, "gpa3", 0x0c), 433 + EXYNOS850_PIN_BANK_EINTW(4, 0x080, "gpa4", 0x10), 434 + EXYNOS850_PIN_BANK_EINTN(3, 0x0a0, "gpq0"), 435 + }; 436 + 437 + /* pin banks of exynos850 pin-controller 1 (CMGP) */ 438 + static const struct samsung_pin_bank_data exynos850_pin_banks1[] __initconst = { 439 + /* Must start with EINTG banks, ordered by EINT group number. */ 440 + EXYNOS850_PIN_BANK_EINTW(1, 0x000, "gpm0", 0x00), 441 + EXYNOS850_PIN_BANK_EINTW(1, 0x020, "gpm1", 0x04), 442 + EXYNOS850_PIN_BANK_EINTW(1, 0x040, "gpm2", 0x08), 443 + EXYNOS850_PIN_BANK_EINTW(1, 0x060, "gpm3", 0x0c), 444 + EXYNOS850_PIN_BANK_EINTW(1, 0x080, "gpm4", 0x10), 445 + EXYNOS850_PIN_BANK_EINTW(1, 0x0a0, "gpm5", 0x14), 446 + EXYNOS850_PIN_BANK_EINTW(1, 0x0c0, "gpm6", 0x18), 447 + EXYNOS850_PIN_BANK_EINTW(1, 0x0e0, "gpm7", 0x1c), 448 + }; 449 + 450 + /* pin banks of exynos850 pin-controller 2 (AUD) */ 451 + static const struct samsung_pin_bank_data exynos850_pin_banks2[] __initconst = { 452 + /* Must start with EINTG banks, ordered by EINT group number. */ 453 + EXYNOS850_PIN_BANK_EINTG(5, 0x000, "gpb0", 0x00), 454 + EXYNOS850_PIN_BANK_EINTG(5, 0x020, "gpb1", 0x04), 455 + }; 456 + 457 + /* pin banks of exynos850 pin-controller 3 (HSI) */ 458 + static const struct samsung_pin_bank_data exynos850_pin_banks3[] __initconst = { 459 + /* Must start with EINTG banks, ordered by EINT group number. */ 460 + EXYNOS850_PIN_BANK_EINTG(6, 0x000, "gpf2", 0x00), 461 + }; 462 + 463 + /* pin banks of exynos850 pin-controller 4 (CORE) */ 464 + static const struct samsung_pin_bank_data exynos850_pin_banks4[] __initconst = { 465 + /* Must start with EINTG banks, ordered by EINT group number. */ 466 + EXYNOS850_PIN_BANK_EINTG(4, 0x000, "gpf0", 0x00), 467 + EXYNOS850_PIN_BANK_EINTG(8, 0x020, "gpf1", 0x04), 468 + }; 469 + 470 + /* pin banks of exynos850 pin-controller 5 (PERI) */ 471 + static const struct samsung_pin_bank_data exynos850_pin_banks5[] __initconst = { 472 + /* Must start with EINTG banks, ordered by EINT group number. */ 473 + EXYNOS850_PIN_BANK_EINTG(2, 0x000, "gpg0", 0x00), 474 + EXYNOS850_PIN_BANK_EINTG(6, 0x020, "gpp0", 0x04), 475 + EXYNOS850_PIN_BANK_EINTG(4, 0x040, "gpp1", 0x08), 476 + EXYNOS850_PIN_BANK_EINTG(4, 0x060, "gpp2", 0x0c), 477 + EXYNOS850_PIN_BANK_EINTG(8, 0x080, "gpg1", 0x10), 478 + EXYNOS850_PIN_BANK_EINTG(8, 0x0a0, "gpg2", 0x14), 479 + EXYNOS850_PIN_BANK_EINTG(1, 0x0c0, "gpg3", 0x18), 480 + EXYNOS850_PIN_BANK_EINTG(3, 0x0e0, "gpc0", 0x1c), 481 + EXYNOS850_PIN_BANK_EINTG(6, 0x100, "gpc1", 0x20), 482 + }; 483 + 484 + static const struct samsung_pin_ctrl exynos850_pin_ctrl[] __initconst = { 485 + { 486 + /* pin-controller instance 0 ALIVE data */ 487 + .pin_banks = exynos850_pin_banks0, 488 + .nr_banks = ARRAY_SIZE(exynos850_pin_banks0), 489 + .eint_gpio_init = exynos_eint_gpio_init, 490 + .eint_wkup_init = exynos_eint_wkup_init, 491 + }, { 492 + /* pin-controller instance 1 CMGP data */ 493 + .pin_banks = exynos850_pin_banks1, 494 + .nr_banks = ARRAY_SIZE(exynos850_pin_banks1), 495 + .eint_gpio_init = exynos_eint_gpio_init, 496 + .eint_wkup_init = exynos_eint_wkup_init, 497 + }, { 498 + /* pin-controller instance 2 AUD data */ 499 + .pin_banks = exynos850_pin_banks2, 500 + .nr_banks = ARRAY_SIZE(exynos850_pin_banks2), 501 + }, { 502 + /* pin-controller instance 3 HSI data */ 503 + .pin_banks = exynos850_pin_banks3, 504 + .nr_banks = ARRAY_SIZE(exynos850_pin_banks3), 505 + .eint_gpio_init = exynos_eint_gpio_init, 506 + }, { 507 + /* pin-controller instance 4 CORE data */ 508 + .pin_banks = exynos850_pin_banks4, 509 + .nr_banks = ARRAY_SIZE(exynos850_pin_banks4), 510 + .eint_gpio_init = exynos_eint_gpio_init, 511 + }, { 512 + /* pin-controller instance 5 PERI data */ 513 + .pin_banks = exynos850_pin_banks5, 514 + .nr_banks = ARRAY_SIZE(exynos850_pin_banks5), 515 + .eint_gpio_init = exynos_eint_gpio_init, 516 + }, 517 + }; 518 + 519 + const struct samsung_pinctrl_of_match_data exynos850_of_data __initconst = { 520 + .ctrl = exynos850_pin_ctrl, 521 + .num_ctrl = ARRAY_SIZE(exynos850_pin_ctrl), 442 522 };
+29
drivers/pinctrl/samsung/pinctrl-exynos.h
··· 108 108 .pctl_res_idx = pctl_idx, \ 109 109 } \ 110 110 111 + #define EXYNOS850_PIN_BANK_EINTN(pins, reg, id) \ 112 + { \ 113 + .type = &exynos850_bank_type_alive, \ 114 + .pctl_offset = reg, \ 115 + .nr_pins = pins, \ 116 + .eint_type = EINT_TYPE_NONE, \ 117 + .name = id \ 118 + } 119 + 120 + #define EXYNOS850_PIN_BANK_EINTG(pins, reg, id, offs) \ 121 + { \ 122 + .type = &exynos850_bank_type_off, \ 123 + .pctl_offset = reg, \ 124 + .nr_pins = pins, \ 125 + .eint_type = EINT_TYPE_GPIO, \ 126 + .eint_offset = offs, \ 127 + .name = id \ 128 + } 129 + 130 + #define EXYNOS850_PIN_BANK_EINTW(pins, reg, id, offs) \ 131 + { \ 132 + .type = &exynos850_bank_type_alive, \ 133 + .pctl_offset = reg, \ 134 + .nr_pins = pins, \ 135 + .eint_type = EINT_TYPE_WKUP, \ 136 + .eint_offset = offs, \ 137 + .name = id \ 138 + } 139 + 111 140 /** 112 141 * struct exynos_weint_data: irq specific data for all the wakeup interrupts 113 142 * generated by the external wakeup interrupt controller.
+3 -1
drivers/pinctrl/samsung/pinctrl-samsung.c
··· 918 918 pin_bank->grange.pin_base = drvdata->pin_base 919 919 + pin_bank->pin_base; 920 920 pin_bank->grange.base = pin_bank->grange.pin_base; 921 - pin_bank->grange.npins = pin_bank->gpio_chip.ngpio; 921 + pin_bank->grange.npins = pin_bank->nr_pins; 922 922 pin_bank->grange.gc = &pin_bank->gpio_chip; 923 923 pinctrl_add_gpio_range(drvdata->pctl_dev, &pin_bank->grange); 924 924 } ··· 1264 1264 .data = &exynos5433_of_data }, 1265 1265 { .compatible = "samsung,exynos7-pinctrl", 1266 1266 .data = &exynos7_of_data }, 1267 + { .compatible = "samsung,exynos850-pinctrl", 1268 + .data = &exynos850_of_data }, 1267 1269 #endif 1268 1270 #ifdef CONFIG_PINCTRL_S3C64XX 1269 1271 { .compatible = "samsung,s3c64xx-pinctrl",
+1
drivers/pinctrl/samsung/pinctrl-samsung.h
··· 339 339 extern const struct samsung_pinctrl_of_match_data exynos5420_of_data; 340 340 extern const struct samsung_pinctrl_of_match_data exynos5433_of_data; 341 341 extern const struct samsung_pinctrl_of_match_data exynos7_of_data; 342 + extern const struct samsung_pinctrl_of_match_data exynos850_of_data; 342 343 extern const struct samsung_pinctrl_of_match_data s3c64xx_of_data; 343 344 extern const struct samsung_pinctrl_of_match_data s3c2412_of_data; 344 345 extern const struct samsung_pinctrl_of_match_data s3c2416_of_data;
+6
drivers/pinctrl/stm32/Kconfig
··· 40 40 default MACH_STM32H743 41 41 select PINCTRL_STM32 42 42 43 + config PINCTRL_STM32MP135 44 + bool "STMicroelectronics STM32MP135 pin control" if COMPILE_TEST && !MACH_STM32MP13 45 + depends on OF && HAS_IOMEM 46 + default MACH_STM32MP13 47 + select PINCTRL_STM32 48 + 43 49 config PINCTRL_STM32MP157 44 50 bool "STMicroelectronics STM32MP157 pin control" if COMPILE_TEST && !MACH_STM32MP157 45 51 depends on OF && HAS_IOMEM
+1
drivers/pinctrl/stm32/Makefile
··· 8 8 obj-$(CONFIG_PINCTRL_STM32F746) += pinctrl-stm32f746.o 9 9 obj-$(CONFIG_PINCTRL_STM32F769) += pinctrl-stm32f769.o 10 10 obj-$(CONFIG_PINCTRL_STM32H743) += pinctrl-stm32h743.o 11 + obj-$(CONFIG_PINCTRL_STM32MP135) += pinctrl-stm32mp135.o 11 12 obj-$(CONFIG_PINCTRL_STM32MP157) += pinctrl-stm32mp157.o
+1679
drivers/pinctrl/stm32/pinctrl-stm32mp135.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 2 + /* 3 + * Copyright (C) STMicroelectronics 2021 - All Rights Reserved 4 + * Author: Alexandre Torgue <alexandre.torgue@foss.st.com> for STMicroelectronics. 5 + */ 6 + #include <linux/init.h> 7 + #include <linux/of.h> 8 + #include <linux/platform_device.h> 9 + 10 + #include "pinctrl-stm32.h" 11 + 12 + static const struct stm32_desc_pin stm32mp135_pins[] = { 13 + STM32_PIN( 14 + PINCTRL_PIN(0, "PA0"), 15 + STM32_FUNCTION(0, "GPIOA0"), 16 + STM32_FUNCTION(2, "TIM2_CH1"), 17 + STM32_FUNCTION(3, "TIM5_CH1"), 18 + STM32_FUNCTION(4, "TIM8_ETR"), 19 + STM32_FUNCTION(5, "TIM15_BKIN"), 20 + STM32_FUNCTION(7, "SAI1_SD_B"), 21 + STM32_FUNCTION(9, "UART5_TX"), 22 + STM32_FUNCTION(12, "ETH1_MII_CRS"), 23 + STM32_FUNCTION(13, "ETH2_MII_CRS"), 24 + STM32_FUNCTION(17, "ANALOG") 25 + ), 26 + STM32_PIN( 27 + PINCTRL_PIN(1, "PA1"), 28 + STM32_FUNCTION(0, "GPIOA1"), 29 + STM32_FUNCTION(2, "TIM2_CH2"), 30 + STM32_FUNCTION(3, "TIM5_CH2"), 31 + STM32_FUNCTION(4, "LPTIM3_OUT"), 32 + STM32_FUNCTION(5, "TIM15_CH1N"), 33 + STM32_FUNCTION(7, "DFSDM1_CKIN0"), 34 + STM32_FUNCTION(8, "USART2_RTS USART2_DE"), 35 + STM32_FUNCTION(12, "ETH1_MII_RX_CLK ETH1_RGMII_RX_CLK ETH1_RMII_REF_CLK"), 36 + STM32_FUNCTION(17, "ANALOG") 37 + ), 38 + STM32_PIN( 39 + PINCTRL_PIN(2, "PA2"), 40 + STM32_FUNCTION(0, "GPIOA2"), 41 + STM32_FUNCTION(2, "TIM2_CH3"), 42 + STM32_FUNCTION(3, "TIM5_CH3"), 43 + STM32_FUNCTION(4, "LPTIM4_OUT"), 44 + STM32_FUNCTION(5, "TIM15_CH1"), 45 + STM32_FUNCTION(8, "USART2_TX"), 46 + STM32_FUNCTION(12, "ETH1_MDIO"), 47 + STM32_FUNCTION(17, "ANALOG") 48 + ), 49 + STM32_PIN( 50 + PINCTRL_PIN(3, "PA3"), 51 + STM32_FUNCTION(0, "GPIOA3"), 52 + STM32_FUNCTION(2, "TIM2_CH4"), 53 + STM32_FUNCTION(3, "TIM5_CH4"), 54 + STM32_FUNCTION(4, "LPTIM5_OUT"), 55 + STM32_FUNCTION(5, "TIM15_CH2"), 56 + STM32_FUNCTION(6, "SPI1_MOSI I2S1_SDO"), 57 + STM32_FUNCTION(7, "SAI1_FS_B"), 58 + STM32_FUNCTION(8, "USART2_RX"), 59 + STM32_FUNCTION(12, "ETH1_MII_COL"), 60 + STM32_FUNCTION(13, "ETH2_MII_COL"), 61 + STM32_FUNCTION(17, "ANALOG") 62 + ), 63 + STM32_PIN( 64 + PINCTRL_PIN(4, "PA4"), 65 + STM32_FUNCTION(0, "GPIOA4"), 66 + STM32_FUNCTION(3, "TIM5_ETR"), 67 + STM32_FUNCTION(4, "USART2_CK"), 68 + STM32_FUNCTION(5, "SAI1_SCK_B"), 69 + STM32_FUNCTION(6, "SPI1_NSS I2S1_WS"), 70 + STM32_FUNCTION(7, "DFSDM1_CKIN1"), 71 + STM32_FUNCTION(11, "ETH1_PPS_OUT"), 72 + STM32_FUNCTION(12, "ETH2_PPS_OUT"), 73 + STM32_FUNCTION(13, "SAI1_SCK_A"), 74 + STM32_FUNCTION(17, "ANALOG") 75 + ), 76 + STM32_PIN( 77 + PINCTRL_PIN(5, "PA5"), 78 + STM32_FUNCTION(0, "GPIOA5"), 79 + STM32_FUNCTION(2, "TIM2_CH1 TIM2_ETR"), 80 + STM32_FUNCTION(3, "USART2_CK"), 81 + STM32_FUNCTION(4, "TIM8_CH1N"), 82 + STM32_FUNCTION(5, "SAI1_D1"), 83 + STM32_FUNCTION(6, "SPI1_NSS I2S1_WS"), 84 + STM32_FUNCTION(7, "SAI1_SD_A"), 85 + STM32_FUNCTION(11, "ETH1_PPS_OUT"), 86 + STM32_FUNCTION(12, "ETH2_PPS_OUT"), 87 + STM32_FUNCTION(17, "ANALOG") 88 + ), 89 + STM32_PIN( 90 + PINCTRL_PIN(6, "PA6"), 91 + STM32_FUNCTION(0, "GPIOA6"), 92 + STM32_FUNCTION(2, "TIM1_BKIN"), 93 + STM32_FUNCTION(3, "TIM3_CH1"), 94 + STM32_FUNCTION(4, "TIM8_BKIN"), 95 + STM32_FUNCTION(5, "SAI2_CK2"), 96 + STM32_FUNCTION(6, "SPI1_MISO I2S1_SDI"), 97 + STM32_FUNCTION(8, "USART1_CK"), 98 + STM32_FUNCTION(9, "UART4_RTS UART4_DE"), 99 + STM32_FUNCTION(10, "TIM13_CH1"), 100 + STM32_FUNCTION(13, "SAI2_SCK_A"), 101 + STM32_FUNCTION(17, "ANALOG") 102 + ), 103 + STM32_PIN( 104 + PINCTRL_PIN(7, "PA7"), 105 + STM32_FUNCTION(0, "GPIOA7"), 106 + STM32_FUNCTION(2, "TIM1_CH1N"), 107 + STM32_FUNCTION(3, "TIM3_CH2"), 108 + STM32_FUNCTION(4, "TIM8_CH1N"), 109 + STM32_FUNCTION(5, "SAI2_D1"), 110 + STM32_FUNCTION(6, "SPI1_SCK I2S1_CK"), 111 + STM32_FUNCTION(8, "USART1_CTS USART1_NSS"), 112 + STM32_FUNCTION(10, "TIM14_CH1"), 113 + STM32_FUNCTION(12, "ETH1_MII_RX_DV ETH1_RGMII_RX_CTL ETH1_RMII_CRS_DV"), 114 + STM32_FUNCTION(13, "SAI2_SD_A"), 115 + STM32_FUNCTION(17, "ANALOG") 116 + ), 117 + STM32_PIN( 118 + PINCTRL_PIN(8, "PA8"), 119 + STM32_FUNCTION(0, "GPIOA8"), 120 + STM32_FUNCTION(1, "MCO1"), 121 + STM32_FUNCTION(3, "SAI2_MCLK_A"), 122 + STM32_FUNCTION(4, "TIM8_BKIN2"), 123 + STM32_FUNCTION(5, "I2C4_SDA"), 124 + STM32_FUNCTION(6, "SPI5_MISO"), 125 + STM32_FUNCTION(7, "SAI2_CK1"), 126 + STM32_FUNCTION(8, "USART1_CK"), 127 + STM32_FUNCTION(9, "SPI2_MOSI I2S2_SDO"), 128 + STM32_FUNCTION(11, "OTG_HS_SOF"), 129 + STM32_FUNCTION(12, "ETH2_MII_RXD3 ETH2_RGMII_RXD3"), 130 + STM32_FUNCTION(13, "FMC_A21"), 131 + STM32_FUNCTION(15, "LCD_B7"), 132 + STM32_FUNCTION(17, "ANALOG") 133 + ), 134 + STM32_PIN( 135 + PINCTRL_PIN(9, "PA9"), 136 + STM32_FUNCTION(0, "GPIOA9"), 137 + STM32_FUNCTION(2, "TIM1_CH2"), 138 + STM32_FUNCTION(5, "I2C3_SMBA"), 139 + STM32_FUNCTION(7, "DFSDM1_DATIN0"), 140 + STM32_FUNCTION(8, "USART1_TX"), 141 + STM32_FUNCTION(9, "UART4_TX"), 142 + STM32_FUNCTION(11, "FMC_NWAIT"), 143 + STM32_FUNCTION(14, "DCMIPP_D0"), 144 + STM32_FUNCTION(15, "LCD_R6"), 145 + STM32_FUNCTION(17, "ANALOG") 146 + ), 147 + STM32_PIN( 148 + PINCTRL_PIN(10, "PA10"), 149 + STM32_FUNCTION(0, "GPIOA10"), 150 + STM32_FUNCTION(2, "TIM1_CH3"), 151 + STM32_FUNCTION(17, "ANALOG") 152 + ), 153 + STM32_PIN( 154 + PINCTRL_PIN(11, "PA11"), 155 + STM32_FUNCTION(0, "GPIOA11"), 156 + STM32_FUNCTION(2, "TIM1_CH4"), 157 + STM32_FUNCTION(5, "I2C5_SCL"), 158 + STM32_FUNCTION(6, "SPI2_NSS I2S2_WS"), 159 + STM32_FUNCTION(8, "USART1_CTS USART1_NSS"), 160 + STM32_FUNCTION(11, "ETH2_MII_RXD1 ETH2_RGMII_RXD1 ETH2_RMII_RXD1"), 161 + STM32_FUNCTION(12, "ETH1_CLK"), 162 + STM32_FUNCTION(14, "ETH2_CLK"), 163 + STM32_FUNCTION(17, "ANALOG") 164 + ), 165 + STM32_PIN( 166 + PINCTRL_PIN(12, "PA12"), 167 + STM32_FUNCTION(0, "GPIOA12"), 168 + STM32_FUNCTION(2, "TIM1_ETR"), 169 + STM32_FUNCTION(3, "SAI2_MCLK_A"), 170 + STM32_FUNCTION(8, "USART1_RTS USART1_DE"), 171 + STM32_FUNCTION(11, "TSC_G1_IO2"), 172 + STM32_FUNCTION(12, "ETH2_MII_RX_DV ETH2_RGMII_RX_CTL ETH2_RMII_CRS_DV"), 173 + STM32_FUNCTION(13, "FMC_A7"), 174 + STM32_FUNCTION(14, "DCMIPP_D1"), 175 + STM32_FUNCTION(15, "LCD_G6"), 176 + STM32_FUNCTION(17, "ANALOG") 177 + ), 178 + STM32_PIN( 179 + PINCTRL_PIN(13, "PA13"), 180 + STM32_FUNCTION(0, "GPIOA13"), 181 + STM32_FUNCTION(1, "DBTRGO"), 182 + STM32_FUNCTION(2, "DBTRGI"), 183 + STM32_FUNCTION(3, "MCO1"), 184 + STM32_FUNCTION(9, "UART4_TX"), 185 + STM32_FUNCTION(17, "ANALOG") 186 + ), 187 + STM32_PIN( 188 + PINCTRL_PIN(14, "PA14"), 189 + STM32_FUNCTION(0, "GPIOA14"), 190 + STM32_FUNCTION(1, "DBTRGO"), 191 + STM32_FUNCTION(2, "DBTRGI"), 192 + STM32_FUNCTION(3, "MCO2"), 193 + STM32_FUNCTION(11, "OTG_HS_SOF"), 194 + STM32_FUNCTION(17, "ANALOG") 195 + ), 196 + STM32_PIN( 197 + PINCTRL_PIN(15, "PA15"), 198 + STM32_FUNCTION(0, "GPIOA15"), 199 + STM32_FUNCTION(1, "TRACED5"), 200 + STM32_FUNCTION(2, "TIM2_CH1"), 201 + STM32_FUNCTION(6, "I2S4_MCK"), 202 + STM32_FUNCTION(8, "UART4_RTS UART4_DE"), 203 + STM32_FUNCTION(9, "UART4_RX"), 204 + STM32_FUNCTION(10, "LCD_R0"), 205 + STM32_FUNCTION(11, "TSC_G3_IO1"), 206 + STM32_FUNCTION(12, "LCD_G7"), 207 + STM32_FUNCTION(13, "FMC_A9"), 208 + STM32_FUNCTION(14, "DCMIPP_D14"), 209 + STM32_FUNCTION(15, "DCMIPP_D5"), 210 + STM32_FUNCTION(16, "HDP5"), 211 + STM32_FUNCTION(17, "ANALOG") 212 + ), 213 + STM32_PIN( 214 + PINCTRL_PIN(16, "PB0"), 215 + STM32_FUNCTION(0, "GPIOB0"), 216 + STM32_FUNCTION(1, "DBTRGI"), 217 + STM32_FUNCTION(2, "TIM1_CH2N"), 218 + STM32_FUNCTION(3, "TIM3_CH3"), 219 + STM32_FUNCTION(4, "TIM8_CH2N"), 220 + STM32_FUNCTION(5, "USART1_RX"), 221 + STM32_FUNCTION(6, "I2S1_MCK"), 222 + STM32_FUNCTION(7, "SAI2_FS_A"), 223 + STM32_FUNCTION(8, "USART1_CK"), 224 + STM32_FUNCTION(9, "UART4_CTS"), 225 + STM32_FUNCTION(11, "SAI2_D2"), 226 + STM32_FUNCTION(12, "ETH1_MII_RXD2 ETH1_RGMII_RXD2"), 227 + STM32_FUNCTION(17, "ANALOG") 228 + ), 229 + STM32_PIN( 230 + PINCTRL_PIN(17, "PB1"), 231 + STM32_FUNCTION(0, "GPIOB1"), 232 + STM32_FUNCTION(2, "TIM1_CH3N"), 233 + STM32_FUNCTION(3, "TIM3_CH4"), 234 + STM32_FUNCTION(4, "TIM8_CH3N"), 235 + STM32_FUNCTION(6, "SPI1_SCK I2S1_CK"), 236 + STM32_FUNCTION(7, "DFSDM1_DATIN1"), 237 + STM32_FUNCTION(8, "UART4_RX"), 238 + STM32_FUNCTION(12, "ETH1_MII_RXD3 ETH1_RGMII_RXD3"), 239 + STM32_FUNCTION(17, "ANALOG") 240 + ), 241 + STM32_PIN( 242 + PINCTRL_PIN(18, "PB2"), 243 + STM32_FUNCTION(0, "GPIOB2"), 244 + STM32_FUNCTION(2, "RTC_OUT2"), 245 + STM32_FUNCTION(3, "SAI1_D1"), 246 + STM32_FUNCTION(6, "I2S_CKIN"), 247 + STM32_FUNCTION(7, "SAI1_SD_A"), 248 + STM32_FUNCTION(9, "UART4_RX"), 249 + STM32_FUNCTION(10, "QUADSPI_BK1_NCS"), 250 + STM32_FUNCTION(12, "ETH2_MDIO"), 251 + STM32_FUNCTION(13, "FMC_A6"), 252 + STM32_FUNCTION(15, "LCD_B4"), 253 + STM32_FUNCTION(17, "ANALOG") 254 + ), 255 + STM32_PIN( 256 + PINCTRL_PIN(19, "PB3"), 257 + STM32_FUNCTION(0, "GPIOB3"), 258 + STM32_FUNCTION(1, "TRACED2"), 259 + STM32_FUNCTION(2, "TIM2_CH2"), 260 + STM32_FUNCTION(5, "SAI2_CK1"), 261 + STM32_FUNCTION(6, "SPI4_NSS I2S4_WS"), 262 + STM32_FUNCTION(9, "SDMMC1_D123DIR"), 263 + STM32_FUNCTION(11, "SDMMC2_D2"), 264 + STM32_FUNCTION(12, "LCD_R6"), 265 + STM32_FUNCTION(13, "SAI2_MCLK_A"), 266 + STM32_FUNCTION(14, "UART7_RX"), 267 + STM32_FUNCTION(15, "LCD_B2"), 268 + STM32_FUNCTION(17, "ANALOG") 269 + ), 270 + STM32_PIN( 271 + PINCTRL_PIN(20, "PB4"), 272 + STM32_FUNCTION(0, "GPIOB4"), 273 + STM32_FUNCTION(1, "TRACED14"), 274 + STM32_FUNCTION(2, "TIM16_BKIN"), 275 + STM32_FUNCTION(3, "TIM3_CH1"), 276 + STM32_FUNCTION(5, "SAI2_CK2"), 277 + STM32_FUNCTION(6, "SPI4_SCK I2S4_CK"), 278 + STM32_FUNCTION(8, "USART3_CK"), 279 + STM32_FUNCTION(11, "SDMMC2_D3"), 280 + STM32_FUNCTION(12, "LCD_G1"), 281 + STM32_FUNCTION(13, "SAI2_SCK_A"), 282 + STM32_FUNCTION(14, "LCD_B6"), 283 + STM32_FUNCTION(15, "LCD_R0"), 284 + STM32_FUNCTION(17, "ANALOG") 285 + ), 286 + STM32_PIN( 287 + PINCTRL_PIN(21, "PB5"), 288 + STM32_FUNCTION(0, "GPIOB5"), 289 + STM32_FUNCTION(1, "TRACED4"), 290 + STM32_FUNCTION(2, "TIM17_BKIN"), 291 + STM32_FUNCTION(3, "TIM3_CH2"), 292 + STM32_FUNCTION(6, "SPI2_MISO I2S2_SDI"), 293 + STM32_FUNCTION(7, "I2C4_SMBA"), 294 + STM32_FUNCTION(9, "SDMMC1_CKIN"), 295 + STM32_FUNCTION(10, "FDCAN2_RX"), 296 + STM32_FUNCTION(12, "UART5_RX"), 297 + STM32_FUNCTION(14, "LCD_B6"), 298 + STM32_FUNCTION(15, "LCD_DE"), 299 + STM32_FUNCTION(17, "ANALOG") 300 + ), 301 + STM32_PIN( 302 + PINCTRL_PIN(22, "PB6"), 303 + STM32_FUNCTION(0, "GPIOB6"), 304 + STM32_FUNCTION(1, "TRACED6"), 305 + STM32_FUNCTION(2, "TIM16_CH1N"), 306 + STM32_FUNCTION(3, "TIM4_CH1"), 307 + STM32_FUNCTION(4, "TIM8_CH1"), 308 + STM32_FUNCTION(5, "USART1_TX"), 309 + STM32_FUNCTION(7, "SAI1_CK2"), 310 + STM32_FUNCTION(8, "LCD_B6"), 311 + STM32_FUNCTION(10, "QUADSPI_BK1_NCS"), 312 + STM32_FUNCTION(11, "TSC_G1_IO4"), 313 + STM32_FUNCTION(12, "ETH2_MDIO"), 314 + STM32_FUNCTION(13, "FMC_NE3"), 315 + STM32_FUNCTION(14, "DCMIPP_D5"), 316 + STM32_FUNCTION(15, "LCD_B7"), 317 + STM32_FUNCTION(16, "HDP6"), 318 + STM32_FUNCTION(17, "ANALOG") 319 + ), 320 + STM32_PIN( 321 + PINCTRL_PIN(23, "PB7"), 322 + STM32_FUNCTION(0, "GPIOB7"), 323 + STM32_FUNCTION(2, "TIM17_CH1N"), 324 + STM32_FUNCTION(3, "TIM4_CH2"), 325 + STM32_FUNCTION(4, "TSC_SYNC"), 326 + STM32_FUNCTION(6, "I2S4_CK"), 327 + STM32_FUNCTION(7, "I2C4_SDA"), 328 + STM32_FUNCTION(11, "FMC_NCE2"), 329 + STM32_FUNCTION(13, "FMC_NL"), 330 + STM32_FUNCTION(14, "DCMIPP_D13"), 331 + STM32_FUNCTION(15, "DCMIPP_PIXCLK"), 332 + STM32_FUNCTION(17, "ANALOG") 333 + ), 334 + STM32_PIN( 335 + PINCTRL_PIN(24, "PB8"), 336 + STM32_FUNCTION(0, "GPIOB8"), 337 + STM32_FUNCTION(2, "TIM16_CH1"), 338 + STM32_FUNCTION(3, "TIM4_CH3"), 339 + STM32_FUNCTION(5, "I2C1_SCL"), 340 + STM32_FUNCTION(6, "I2C3_SCL"), 341 + STM32_FUNCTION(7, "DFSDM1_DATIN1"), 342 + STM32_FUNCTION(9, "UART4_RX"), 343 + STM32_FUNCTION(11, "SAI1_D1"), 344 + STM32_FUNCTION(13, "FMC_D13 FMC_AD13"), 345 + STM32_FUNCTION(14, "DCMIPP_D6"), 346 + STM32_FUNCTION(17, "ANALOG") 347 + ), 348 + STM32_PIN( 349 + PINCTRL_PIN(25, "PB9"), 350 + STM32_FUNCTION(0, "GPIOB9"), 351 + STM32_FUNCTION(1, "TRACED3"), 352 + STM32_FUNCTION(3, "TIM4_CH4"), 353 + STM32_FUNCTION(7, "I2C4_SDA"), 354 + STM32_FUNCTION(10, "FDCAN1_TX"), 355 + STM32_FUNCTION(11, "SDMMC2_D5"), 356 + STM32_FUNCTION(12, "UART5_TX"), 357 + STM32_FUNCTION(13, "SDMMC1_CDIR"), 358 + STM32_FUNCTION(14, "LCD_DE"), 359 + STM32_FUNCTION(15, "LCD_B1"), 360 + STM32_FUNCTION(17, "ANALOG") 361 + ), 362 + STM32_PIN( 363 + PINCTRL_PIN(26, "PB10"), 364 + STM32_FUNCTION(0, "GPIOB10"), 365 + STM32_FUNCTION(2, "TIM2_CH3"), 366 + STM32_FUNCTION(4, "LPTIM2_IN1"), 367 + STM32_FUNCTION(5, "I2C5_SMBA"), 368 + STM32_FUNCTION(6, "SPI4_NSS I2S4_WS"), 369 + STM32_FUNCTION(7, "SPI2_SCK I2S2_CK"), 370 + STM32_FUNCTION(8, "USART3_TX"), 371 + STM32_FUNCTION(15, "LCD_R3"), 372 + STM32_FUNCTION(17, "ANALOG") 373 + ), 374 + STM32_PIN( 375 + PINCTRL_PIN(27, "PB11"), 376 + STM32_FUNCTION(0, "GPIOB11"), 377 + STM32_FUNCTION(2, "TIM2_CH4"), 378 + STM32_FUNCTION(4, "LPTIM1_OUT"), 379 + STM32_FUNCTION(5, "I2C5_SMBA"), 380 + STM32_FUNCTION(8, "USART3_RX"), 381 + STM32_FUNCTION(12, "ETH1_MII_TX_EN ETH1_RGMII_TX_CTL ETH1_RMII_TX_EN"), 382 + STM32_FUNCTION(17, "ANALOG") 383 + ), 384 + STM32_PIN( 385 + PINCTRL_PIN(28, "PB12"), 386 + STM32_FUNCTION(0, "GPIOB12"), 387 + STM32_FUNCTION(1, "TRACED10"), 388 + STM32_FUNCTION(5, "I2C2_SMBA"), 389 + STM32_FUNCTION(7, "DFSDM1_DATIN1"), 390 + STM32_FUNCTION(8, "UART7_RTS UART7_DE"), 391 + STM32_FUNCTION(9, "USART3_RX"), 392 + STM32_FUNCTION(12, "UART5_RX"), 393 + STM32_FUNCTION(13, "SDMMC1_D5"), 394 + STM32_FUNCTION(14, "LCD_R3"), 395 + STM32_FUNCTION(15, "LCD_VSYNC"), 396 + STM32_FUNCTION(17, "ANALOG") 397 + ), 398 + STM32_PIN( 399 + PINCTRL_PIN(29, "PB13"), 400 + STM32_FUNCTION(0, "GPIOB13"), 401 + STM32_FUNCTION(1, "TRACECLK"), 402 + STM32_FUNCTION(2, "TIM1_CH1N"), 403 + STM32_FUNCTION(5, "LPTIM2_OUT"), 404 + STM32_FUNCTION(6, "SPI2_NSS I2S2_WS"), 405 + STM32_FUNCTION(7, "I2C4_SCL"), 406 + STM32_FUNCTION(9, "SDMMC1_D123DIR"), 407 + STM32_FUNCTION(10, "FDCAN2_TX"), 408 + STM32_FUNCTION(12, "UART5_TX"), 409 + STM32_FUNCTION(14, "LCD_CLK"), 410 + STM32_FUNCTION(17, "ANALOG") 411 + ), 412 + STM32_PIN( 413 + PINCTRL_PIN(30, "PB14"), 414 + STM32_FUNCTION(0, "GPIOB14"), 415 + STM32_FUNCTION(1, "TRACED0"), 416 + STM32_FUNCTION(2, "TIM1_CH2N"), 417 + STM32_FUNCTION(3, "TIM12_CH1"), 418 + STM32_FUNCTION(4, "TIM8_CH2N"), 419 + STM32_FUNCTION(5, "USART1_TX"), 420 + STM32_FUNCTION(11, "SDMMC2_D0"), 421 + STM32_FUNCTION(12, "SDMMC1_D4"), 422 + STM32_FUNCTION(14, "LCD_R0"), 423 + STM32_FUNCTION(15, "LCD_G5"), 424 + STM32_FUNCTION(17, "ANALOG") 425 + ), 426 + STM32_PIN( 427 + PINCTRL_PIN(31, "PB15"), 428 + STM32_FUNCTION(0, "GPIOB15"), 429 + STM32_FUNCTION(1, "RTC_REFIN"), 430 + STM32_FUNCTION(2, "TIM1_CH3N"), 431 + STM32_FUNCTION(3, "TIM12_CH2"), 432 + STM32_FUNCTION(4, "TIM8_CH3N"), 433 + STM32_FUNCTION(5, "SAI2_D2"), 434 + STM32_FUNCTION(6, "SPI4_MOSI I2S4_SDO"), 435 + STM32_FUNCTION(7, "DFSDM1_CKIN2"), 436 + STM32_FUNCTION(8, "UART7_CTS"), 437 + STM32_FUNCTION(9, "SDMMC1_CKIN"), 438 + STM32_FUNCTION(11, "SDMMC2_D1"), 439 + STM32_FUNCTION(13, "SAI2_FS_A"), 440 + STM32_FUNCTION(14, "LCD_CLK"), 441 + STM32_FUNCTION(15, "LCD_B0"), 442 + STM32_FUNCTION(17, "ANALOG") 443 + ), 444 + STM32_PIN( 445 + PINCTRL_PIN(32, "PC0"), 446 + STM32_FUNCTION(0, "GPIOC0"), 447 + STM32_FUNCTION(3, "SAI1_SCK_A"), 448 + STM32_FUNCTION(5, "SAI1_CK2"), 449 + STM32_FUNCTION(6, "I2S1_MCK"), 450 + STM32_FUNCTION(7, "SPI1_MOSI I2S1_SDO"), 451 + STM32_FUNCTION(8, "USART1_TX"), 452 + STM32_FUNCTION(17, "ANALOG") 453 + ), 454 + STM32_PIN( 455 + PINCTRL_PIN(33, "PC1"), 456 + STM32_FUNCTION(0, "GPIOC1"), 457 + STM32_FUNCTION(4, "DFSDM1_DATIN0"), 458 + STM32_FUNCTION(7, "SAI1_D3"), 459 + STM32_FUNCTION(11, "ETH1_MII_RX_DV ETH1_RMII_CRS_DV"), 460 + STM32_FUNCTION(12, "ETH1_RGMII_GTX_CLK"), 461 + STM32_FUNCTION(17, "ANALOG") 462 + ), 463 + STM32_PIN( 464 + PINCTRL_PIN(34, "PC2"), 465 + STM32_FUNCTION(0, "GPIOC2"), 466 + STM32_FUNCTION(2, "SPI5_NSS"), 467 + STM32_FUNCTION(6, "SPI1_NSS I2S1_WS"), 468 + STM32_FUNCTION(7, "SAI2_MCLK_A"), 469 + STM32_FUNCTION(8, "USART1_RTS USART1_DE"), 470 + STM32_FUNCTION(11, "SAI2_CK1"), 471 + STM32_FUNCTION(12, "ETH1_MII_TXD2 ETH1_RGMII_TXD2"), 472 + STM32_FUNCTION(17, "ANALOG") 473 + ), 474 + STM32_PIN( 475 + PINCTRL_PIN(35, "PC3"), 476 + STM32_FUNCTION(0, "GPIOC3"), 477 + STM32_FUNCTION(3, "SAI1_CK1"), 478 + STM32_FUNCTION(4, "DFSDM1_CKOUT"), 479 + STM32_FUNCTION(6, "SPI1_MISO I2S1_SDI"), 480 + STM32_FUNCTION(7, "SPI1_SCK I2S1_CK"), 481 + STM32_FUNCTION(9, "UART5_CTS"), 482 + STM32_FUNCTION(11, "SAI1_MCLK_A"), 483 + STM32_FUNCTION(12, "ETH1_MII_TX_CLK"), 484 + STM32_FUNCTION(13, "ETH2_MII_TX_CLK"), 485 + STM32_FUNCTION(17, "ANALOG") 486 + ), 487 + STM32_PIN( 488 + PINCTRL_PIN(36, "PC4"), 489 + STM32_FUNCTION(0, "GPIOC4"), 490 + STM32_FUNCTION(3, "TIM3_ETR"), 491 + STM32_FUNCTION(4, "DFSDM1_CKIN2"), 492 + STM32_FUNCTION(5, "SAI1_D3"), 493 + STM32_FUNCTION(6, "I2S1_MCK"), 494 + STM32_FUNCTION(9, "UART5_RTS UART5_DE"), 495 + STM32_FUNCTION(10, "SPDIFRX_IN2"), 496 + STM32_FUNCTION(12, "ETH1_MII_RXD0 ETH1_RGMII_RXD0 ETH1_RMII_RXD0"), 497 + STM32_FUNCTION(13, "SAI2_D3"), 498 + STM32_FUNCTION(17, "ANALOG") 499 + ), 500 + STM32_PIN( 501 + PINCTRL_PIN(37, "PC5"), 502 + STM32_FUNCTION(0, "GPIOC5"), 503 + STM32_FUNCTION(4, "DFSDM1_DATIN2"), 504 + STM32_FUNCTION(5, "SAI2_D4"), 505 + STM32_FUNCTION(6, "I2S_CKIN"), 506 + STM32_FUNCTION(7, "SAI1_D4"), 507 + STM32_FUNCTION(8, "USART2_CTS USART2_NSS"), 508 + STM32_FUNCTION(10, "SPDIFRX_IN3"), 509 + STM32_FUNCTION(12, "ETH1_MII_RXD1 ETH1_RGMII_RXD1 ETH1_RMII_RXD1"), 510 + STM32_FUNCTION(17, "ANALOG") 511 + ), 512 + STM32_PIN( 513 + PINCTRL_PIN(38, "PC6"), 514 + STM32_FUNCTION(0, "GPIOC6"), 515 + STM32_FUNCTION(1, "TRACED2"), 516 + STM32_FUNCTION(3, "TIM3_CH1"), 517 + STM32_FUNCTION(4, "TIM8_CH1"), 518 + STM32_FUNCTION(5, "DFSDM1_DATIN0"), 519 + STM32_FUNCTION(6, "I2S3_MCK"), 520 + STM32_FUNCTION(8, "USART6_TX"), 521 + STM32_FUNCTION(9, "SDMMC1_D6"), 522 + STM32_FUNCTION(10, "SDMMC2_D0DIR"), 523 + STM32_FUNCTION(11, "SDMMC2_D6"), 524 + STM32_FUNCTION(12, "LCD_B1"), 525 + STM32_FUNCTION(13, "FMC_A19"), 526 + STM32_FUNCTION(14, "LCD_R6"), 527 + STM32_FUNCTION(15, "LCD_HSYNC"), 528 + STM32_FUNCTION(16, "HDP2"), 529 + STM32_FUNCTION(17, "ANALOG") 530 + ), 531 + STM32_PIN( 532 + PINCTRL_PIN(39, "PC7"), 533 + STM32_FUNCTION(0, "GPIOC7"), 534 + STM32_FUNCTION(1, "TRACED4"), 535 + STM32_FUNCTION(3, "TIM3_CH2"), 536 + STM32_FUNCTION(4, "TIM8_CH2"), 537 + STM32_FUNCTION(7, "I2S2_MCK"), 538 + STM32_FUNCTION(8, "USART6_RX"), 539 + STM32_FUNCTION(9, "USART3_CTS"), 540 + STM32_FUNCTION(10, "SDMMC2_CDIR"), 541 + STM32_FUNCTION(11, "SDMMC2_D7"), 542 + STM32_FUNCTION(12, "LCD_R1"), 543 + STM32_FUNCTION(13, "SDMMC1_D7"), 544 + STM32_FUNCTION(15, "LCD_G6"), 545 + STM32_FUNCTION(16, "HDP4"), 546 + STM32_FUNCTION(17, "ANALOG") 547 + ), 548 + STM32_PIN( 549 + PINCTRL_PIN(40, "PC8"), 550 + STM32_FUNCTION(0, "GPIOC8"), 551 + STM32_FUNCTION(1, "TRACED0"), 552 + STM32_FUNCTION(3, "TIM3_CH3"), 553 + STM32_FUNCTION(4, "TIM8_CH3"), 554 + STM32_FUNCTION(6, "SPI3_MISO I2S3_SDI"), 555 + STM32_FUNCTION(8, "USART6_CK"), 556 + STM32_FUNCTION(9, "USART3_CTS"), 557 + STM32_FUNCTION(11, "SAI2_FS_B"), 558 + STM32_FUNCTION(12, "UART5_RTS UART5_DE"), 559 + STM32_FUNCTION(13, "SDMMC1_D0"), 560 + STM32_FUNCTION(15, "LCD_G7"), 561 + STM32_FUNCTION(17, "ANALOG") 562 + ), 563 + STM32_PIN( 564 + PINCTRL_PIN(41, "PC9"), 565 + STM32_FUNCTION(0, "GPIOC9"), 566 + STM32_FUNCTION(1, "TRACED1"), 567 + STM32_FUNCTION(3, "TIM3_CH4"), 568 + STM32_FUNCTION(4, "TIM8_CH4"), 569 + STM32_FUNCTION(8, "USART3_RTS"), 570 + STM32_FUNCTION(9, "UART5_CTS"), 571 + STM32_FUNCTION(10, "FDCAN1_TX"), 572 + STM32_FUNCTION(13, "SDMMC1_D1"), 573 + STM32_FUNCTION(15, "LCD_B4"), 574 + STM32_FUNCTION(17, "ANALOG") 575 + ), 576 + STM32_PIN( 577 + PINCTRL_PIN(42, "PC10"), 578 + STM32_FUNCTION(0, "GPIOC10"), 579 + STM32_FUNCTION(1, "TRACED2"), 580 + STM32_FUNCTION(6, "I2C1_SCL"), 581 + STM32_FUNCTION(7, "SPI3_SCK I2S3_CK"), 582 + STM32_FUNCTION(8, "USART3_TX"), 583 + STM32_FUNCTION(11, "SAI2_MCLK_B"), 584 + STM32_FUNCTION(13, "SDMMC1_D2"), 585 + STM32_FUNCTION(17, "ANALOG") 586 + ), 587 + STM32_PIN( 588 + PINCTRL_PIN(43, "PC11"), 589 + STM32_FUNCTION(0, "GPIOC11"), 590 + STM32_FUNCTION(1, "TRACED3"), 591 + STM32_FUNCTION(5, "I2C1_SDA"), 592 + STM32_FUNCTION(7, "SPI3_MOSI I2S3_SDO"), 593 + STM32_FUNCTION(8, "USART3_CK"), 594 + STM32_FUNCTION(9, "UART5_RX"), 595 + STM32_FUNCTION(11, "SAI2_SCK_B"), 596 + STM32_FUNCTION(13, "SDMMC1_D3"), 597 + STM32_FUNCTION(17, "ANALOG") 598 + ), 599 + STM32_PIN( 600 + PINCTRL_PIN(44, "PC12"), 601 + STM32_FUNCTION(0, "GPIOC12"), 602 + STM32_FUNCTION(1, "TRACECLK"), 603 + STM32_FUNCTION(9, "UART7_TX"), 604 + STM32_FUNCTION(11, "SAI2_SD_B"), 605 + STM32_FUNCTION(13, "SDMMC1_CK"), 606 + STM32_FUNCTION(15, "LCD_DE"), 607 + STM32_FUNCTION(17, "ANALOG") 608 + ), 609 + STM32_PIN( 610 + PINCTRL_PIN(45, "PC13"), 611 + STM32_FUNCTION(0, "GPIOC13"), 612 + STM32_FUNCTION(17, "ANALOG") 613 + ), 614 + STM32_PIN( 615 + PINCTRL_PIN(46, "PC14"), 616 + STM32_FUNCTION(0, "GPIOC14"), 617 + STM32_FUNCTION(17, "ANALOG") 618 + ), 619 + STM32_PIN( 620 + PINCTRL_PIN(47, "PC15"), 621 + STM32_FUNCTION(0, "GPIOC15"), 622 + STM32_FUNCTION(17, "ANALOG") 623 + ), 624 + STM32_PIN( 625 + PINCTRL_PIN(48, "PD0"), 626 + STM32_FUNCTION(0, "GPIOD0"), 627 + STM32_FUNCTION(3, "SAI1_MCLK_A"), 628 + STM32_FUNCTION(7, "SAI1_CK1"), 629 + STM32_FUNCTION(10, "FDCAN1_RX"), 630 + STM32_FUNCTION(13, "FMC_D2 FMC_AD2"), 631 + STM32_FUNCTION(14, "DCMIPP_D1"), 632 + STM32_FUNCTION(17, "ANALOG") 633 + ), 634 + STM32_PIN( 635 + PINCTRL_PIN(49, "PD1"), 636 + STM32_FUNCTION(0, "GPIOD1"), 637 + STM32_FUNCTION(5, "I2C5_SCL"), 638 + STM32_FUNCTION(6, "SPI4_MOSI I2S4_SDO"), 639 + STM32_FUNCTION(9, "UART4_TX"), 640 + STM32_FUNCTION(10, "QUADSPI_BK1_NCS"), 641 + STM32_FUNCTION(12, "LCD_B6"), 642 + STM32_FUNCTION(13, "FMC_D3 FMC_AD3"), 643 + STM32_FUNCTION(14, "DCMIPP_D13"), 644 + STM32_FUNCTION(15, "LCD_G2"), 645 + STM32_FUNCTION(17, "ANALOG") 646 + ), 647 + STM32_PIN( 648 + PINCTRL_PIN(50, "PD2"), 649 + STM32_FUNCTION(0, "GPIOD2"), 650 + STM32_FUNCTION(1, "TRACED4"), 651 + STM32_FUNCTION(3, "TIM3_ETR"), 652 + STM32_FUNCTION(5, "I2C1_SMBA"), 653 + STM32_FUNCTION(6, "SPI3_NSS I2S3_WS"), 654 + STM32_FUNCTION(7, "SAI2_D1"), 655 + STM32_FUNCTION(8, "USART3_RX"), 656 + STM32_FUNCTION(13, "SDMMC1_CMD"), 657 + STM32_FUNCTION(17, "ANALOG") 658 + ), 659 + STM32_PIN( 660 + PINCTRL_PIN(51, "PD3"), 661 + STM32_FUNCTION(0, "GPIOD3"), 662 + STM32_FUNCTION(3, "TIM2_CH1"), 663 + STM32_FUNCTION(4, "USART2_CTS USART2_NSS"), 664 + STM32_FUNCTION(5, "DFSDM1_CKOUT"), 665 + STM32_FUNCTION(6, "I2C1_SDA"), 666 + STM32_FUNCTION(7, "SAI1_D3"), 667 + STM32_FUNCTION(13, "FMC_CLK"), 668 + STM32_FUNCTION(14, "DCMIPP_D5"), 669 + STM32_FUNCTION(17, "ANALOG") 670 + ), 671 + STM32_PIN( 672 + PINCTRL_PIN(52, "PD4"), 673 + STM32_FUNCTION(0, "GPIOD4"), 674 + STM32_FUNCTION(4, "USART2_RTS USART2_DE"), 675 + STM32_FUNCTION(6, "SPI3_MISO I2S3_SDI"), 676 + STM32_FUNCTION(7, "DFSDM1_CKIN0"), 677 + STM32_FUNCTION(10, "QUADSPI_CLK"), 678 + STM32_FUNCTION(12, "LCD_R1"), 679 + STM32_FUNCTION(13, "FMC_NOE"), 680 + STM32_FUNCTION(14, "LCD_R4"), 681 + STM32_FUNCTION(15, "LCD_R6"), 682 + STM32_FUNCTION(17, "ANALOG") 683 + ), 684 + STM32_PIN( 685 + PINCTRL_PIN(53, "PD5"), 686 + STM32_FUNCTION(0, "GPIOD5"), 687 + STM32_FUNCTION(10, "QUADSPI_BK1_IO0"), 688 + STM32_FUNCTION(13, "FMC_NWE"), 689 + STM32_FUNCTION(14, "LCD_B0"), 690 + STM32_FUNCTION(15, "LCD_G4"), 691 + STM32_FUNCTION(17, "ANALOG") 692 + ), 693 + STM32_PIN( 694 + PINCTRL_PIN(54, "PD6"), 695 + STM32_FUNCTION(0, "GPIOD6"), 696 + STM32_FUNCTION(2, "TIM16_CH1N"), 697 + STM32_FUNCTION(3, "SAI1_D1"), 698 + STM32_FUNCTION(7, "SAI1_SD_A"), 699 + STM32_FUNCTION(9, "UART4_TX"), 700 + STM32_FUNCTION(12, "TSC_G2_IO1"), 701 + STM32_FUNCTION(14, "DCMIPP_D4"), 702 + STM32_FUNCTION(15, "DCMIPP_D0"), 703 + STM32_FUNCTION(17, "ANALOG") 704 + ), 705 + STM32_PIN( 706 + PINCTRL_PIN(55, "PD7"), 707 + STM32_FUNCTION(0, "GPIOD7"), 708 + STM32_FUNCTION(1, "MCO1"), 709 + STM32_FUNCTION(4, "USART2_CK"), 710 + STM32_FUNCTION(5, "I2C2_SCL"), 711 + STM32_FUNCTION(6, "I2C3_SDA"), 712 + STM32_FUNCTION(10, "SPDIFRX_IN0"), 713 + STM32_FUNCTION(11, "ETH1_MII_RX_CLK ETH1_RGMII_RX_CLK ETH1_RMII_REF_CLK"), 714 + STM32_FUNCTION(12, "QUADSPI_BK1_IO2"), 715 + STM32_FUNCTION(13, "FMC_NE1"), 716 + STM32_FUNCTION(17, "ANALOG") 717 + ), 718 + STM32_PIN( 719 + PINCTRL_PIN(56, "PD8"), 720 + STM32_FUNCTION(0, "GPIOD8"), 721 + STM32_FUNCTION(4, "USART2_TX"), 722 + STM32_FUNCTION(6, "I2S4_WS"), 723 + STM32_FUNCTION(8, "USART3_TX"), 724 + STM32_FUNCTION(9, "UART4_RX"), 725 + STM32_FUNCTION(11, "TSC_G1_IO3"), 726 + STM32_FUNCTION(14, "DCMIPP_D9"), 727 + STM32_FUNCTION(15, "DCMIPP_D3"), 728 + STM32_FUNCTION(17, "ANALOG") 729 + ), 730 + STM32_PIN( 731 + PINCTRL_PIN(57, "PD9"), 732 + STM32_FUNCTION(0, "GPIOD9"), 733 + STM32_FUNCTION(1, "TRACECLK"), 734 + STM32_FUNCTION(4, "DFSDM1_DATIN3"), 735 + STM32_FUNCTION(11, "SDMMC2_CDIR"), 736 + STM32_FUNCTION(12, "LCD_B5"), 737 + STM32_FUNCTION(13, "FMC_D14 FMC_AD14"), 738 + STM32_FUNCTION(14, "LCD_CLK"), 739 + STM32_FUNCTION(15, "LCD_B0"), 740 + STM32_FUNCTION(17, "ANALOG") 741 + ), 742 + STM32_PIN( 743 + PINCTRL_PIN(58, "PD10"), 744 + STM32_FUNCTION(0, "GPIOD10"), 745 + STM32_FUNCTION(1, "RTC_REFIN"), 746 + STM32_FUNCTION(5, "I2C5_SMBA"), 747 + STM32_FUNCTION(6, "SPI4_NSS I2S4_WS"), 748 + STM32_FUNCTION(8, "USART3_CK"), 749 + STM32_FUNCTION(10, "LCD_G5"), 750 + STM32_FUNCTION(11, "TSC_G2_IO2"), 751 + STM32_FUNCTION(12, "LCD_B7"), 752 + STM32_FUNCTION(13, "FMC_D15 FMC_AD15"), 753 + STM32_FUNCTION(14, "DCMIPP_VSYNC"), 754 + STM32_FUNCTION(15, "LCD_B2"), 755 + STM32_FUNCTION(17, "ANALOG") 756 + ), 757 + STM32_PIN( 758 + PINCTRL_PIN(59, "PD11"), 759 + STM32_FUNCTION(0, "GPIOD11"), 760 + STM32_FUNCTION(4, "LPTIM2_IN2"), 761 + STM32_FUNCTION(5, "I2C4_SMBA"), 762 + STM32_FUNCTION(8, "USART3_CTS USART3_NSS"), 763 + STM32_FUNCTION(9, "SPDIFRX_IN0"), 764 + STM32_FUNCTION(10, "QUADSPI_BK1_IO2"), 765 + STM32_FUNCTION(11, "ETH2_RGMII_CLK125"), 766 + STM32_FUNCTION(12, "LCD_R7"), 767 + STM32_FUNCTION(13, "FMC_CLE FMC_A16"), 768 + STM32_FUNCTION(14, "UART7_RX"), 769 + STM32_FUNCTION(15, "DCMIPP_D4"), 770 + STM32_FUNCTION(17, "ANALOG") 771 + ), 772 + STM32_PIN( 773 + PINCTRL_PIN(60, "PD12"), 774 + STM32_FUNCTION(0, "GPIOD12"), 775 + STM32_FUNCTION(2, "LPTIM1_IN1"), 776 + STM32_FUNCTION(3, "TIM4_CH1"), 777 + STM32_FUNCTION(6, "I2C1_SCL"), 778 + STM32_FUNCTION(8, "USART3_RTS USART3_DE"), 779 + STM32_FUNCTION(13, "FMC_ALE FMC_A17"), 780 + STM32_FUNCTION(14, "DCMIPP_D6"), 781 + STM32_FUNCTION(17, "ANALOG") 782 + ), 783 + STM32_PIN( 784 + PINCTRL_PIN(61, "PD13"), 785 + STM32_FUNCTION(0, "GPIOD13"), 786 + STM32_FUNCTION(2, "LPTIM2_ETR"), 787 + STM32_FUNCTION(3, "TIM4_CH2"), 788 + STM32_FUNCTION(4, "TIM8_CH2"), 789 + STM32_FUNCTION(5, "SAI1_CK1"), 790 + STM32_FUNCTION(7, "SAI1_MCLK_A"), 791 + STM32_FUNCTION(8, "USART1_RX"), 792 + STM32_FUNCTION(10, "QUADSPI_BK1_IO3"), 793 + STM32_FUNCTION(11, "TSC_G2_IO4"), 794 + STM32_FUNCTION(12, "QUADSPI_BK2_IO2"), 795 + STM32_FUNCTION(13, "FMC_A18"), 796 + STM32_FUNCTION(15, "LCD_G4"), 797 + STM32_FUNCTION(17, "ANALOG") 798 + ), 799 + STM32_PIN( 800 + PINCTRL_PIN(62, "PD14"), 801 + STM32_FUNCTION(0, "GPIOD14"), 802 + STM32_FUNCTION(3, "TIM4_CH3"), 803 + STM32_FUNCTION(5, "I2C3_SDA"), 804 + STM32_FUNCTION(8, "USART1_RX"), 805 + STM32_FUNCTION(9, "UART8_CTS"), 806 + STM32_FUNCTION(13, "FMC_D0 FMC_AD0"), 807 + STM32_FUNCTION(14, "DCMIPP_D8"), 808 + STM32_FUNCTION(15, "LCD_R4"), 809 + STM32_FUNCTION(17, "ANALOG") 810 + ), 811 + STM32_PIN( 812 + PINCTRL_PIN(63, "PD15"), 813 + STM32_FUNCTION(0, "GPIOD15"), 814 + STM32_FUNCTION(2, "USART2_RX"), 815 + STM32_FUNCTION(3, "TIM4_CH4"), 816 + STM32_FUNCTION(4, "DFSDM1_DATIN2"), 817 + STM32_FUNCTION(10, "QUADSPI_BK1_IO3"), 818 + STM32_FUNCTION(13, "FMC_D1 FMC_AD1"), 819 + STM32_FUNCTION(15, "LCD_B5"), 820 + STM32_FUNCTION(17, "ANALOG") 821 + ), 822 + STM32_PIN( 823 + PINCTRL_PIN(64, "PE0"), 824 + STM32_FUNCTION(0, "GPIOE0"), 825 + STM32_FUNCTION(7, "DCMIPP_D12"), 826 + STM32_FUNCTION(9, "UART8_RX"), 827 + STM32_FUNCTION(10, "FDCAN2_RX"), 828 + STM32_FUNCTION(11, "TSC_G4_IO1"), 829 + STM32_FUNCTION(12, "LCD_B1"), 830 + STM32_FUNCTION(13, "FMC_A11"), 831 + STM32_FUNCTION(14, "DCMIPP_D1"), 832 + STM32_FUNCTION(15, "LCD_B5"), 833 + STM32_FUNCTION(17, "ANALOG") 834 + ), 835 + STM32_PIN( 836 + PINCTRL_PIN(65, "PE1"), 837 + STM32_FUNCTION(0, "GPIOE1"), 838 + STM32_FUNCTION(2, "LPTIM1_IN2"), 839 + STM32_FUNCTION(4, "TSC_G2_IO3"), 840 + STM32_FUNCTION(9, "UART8_TX"), 841 + STM32_FUNCTION(10, "LCD_HSYNC"), 842 + STM32_FUNCTION(12, "LCD_R4"), 843 + STM32_FUNCTION(13, "FMC_NBL1"), 844 + STM32_FUNCTION(14, "DCMIPP_D3"), 845 + STM32_FUNCTION(15, "DCMIPP_D12"), 846 + STM32_FUNCTION(17, "ANALOG") 847 + ), 848 + STM32_PIN( 849 + PINCTRL_PIN(66, "PE2"), 850 + STM32_FUNCTION(0, "GPIOE2"), 851 + STM32_FUNCTION(1, "TRACECLK"), 852 + STM32_FUNCTION(2, "TIM2_ETR"), 853 + STM32_FUNCTION(4, "TSC_G5_IO1"), 854 + STM32_FUNCTION(5, "I2C4_SCL"), 855 + STM32_FUNCTION(6, "SPI5_MOSI"), 856 + STM32_FUNCTION(7, "SAI1_FS_B"), 857 + STM32_FUNCTION(8, "USART6_RTS USART6_DE"), 858 + STM32_FUNCTION(10, "SPDIFRX_IN1"), 859 + STM32_FUNCTION(11, "ETH2_MII_RXD1 ETH2_RGMII_RXD1 ETH2_RMII_RXD1"), 860 + STM32_FUNCTION(13, "FMC_A23"), 861 + STM32_FUNCTION(15, "LCD_R1"), 862 + STM32_FUNCTION(17, "ANALOG") 863 + ), 864 + STM32_PIN( 865 + PINCTRL_PIN(67, "PE3"), 866 + STM32_FUNCTION(0, "GPIOE3"), 867 + STM32_FUNCTION(1, "TRACED11"), 868 + STM32_FUNCTION(3, "SAI2_D4"), 869 + STM32_FUNCTION(5, "TIM15_BKIN"), 870 + STM32_FUNCTION(6, "SPI4_MISO I2S4_SDI"), 871 + STM32_FUNCTION(9, "USART3_RTS USART3_DE"), 872 + STM32_FUNCTION(10, "FDCAN1_RX"), 873 + STM32_FUNCTION(11, "SDMMC2_CK"), 874 + STM32_FUNCTION(14, "LCD_R4"), 875 + STM32_FUNCTION(17, "ANALOG") 876 + ), 877 + STM32_PIN( 878 + PINCTRL_PIN(68, "PE4"), 879 + STM32_FUNCTION(0, "GPIOE4"), 880 + STM32_FUNCTION(2, "SPI5_MISO"), 881 + STM32_FUNCTION(3, "SAI1_D2"), 882 + STM32_FUNCTION(4, "DFSDM1_DATIN3"), 883 + STM32_FUNCTION(5, "TIM15_CH1N"), 884 + STM32_FUNCTION(6, "I2S_CKIN"), 885 + STM32_FUNCTION(7, "SAI1_FS_A"), 886 + STM32_FUNCTION(8, "UART7_RTS UART7_DE"), 887 + STM32_FUNCTION(9, "UART8_TX"), 888 + STM32_FUNCTION(10, "QUADSPI_BK2_NCS"), 889 + STM32_FUNCTION(11, "FMC_NCE2"), 890 + STM32_FUNCTION(12, "TSC_G1_IO1"), 891 + STM32_FUNCTION(13, "FMC_A25"), 892 + STM32_FUNCTION(14, "DCMIPP_D3"), 893 + STM32_FUNCTION(15, "LCD_G7"), 894 + STM32_FUNCTION(17, "ANALOG") 895 + ), 896 + STM32_PIN( 897 + PINCTRL_PIN(69, "PE5"), 898 + STM32_FUNCTION(0, "GPIOE5"), 899 + STM32_FUNCTION(3, "SAI2_SCK_B"), 900 + STM32_FUNCTION(4, "TIM8_CH3"), 901 + STM32_FUNCTION(5, "TIM15_CH1"), 902 + STM32_FUNCTION(9, "UART4_RX"), 903 + STM32_FUNCTION(11, "ETH1_MII_TXD3 ETH1_RGMII_TXD3"), 904 + STM32_FUNCTION(13, "FMC_NE1"), 905 + STM32_FUNCTION(17, "ANALOG") 906 + ), 907 + STM32_PIN( 908 + PINCTRL_PIN(70, "PE6"), 909 + STM32_FUNCTION(0, "GPIOE6"), 910 + STM32_FUNCTION(1, "MCO2"), 911 + STM32_FUNCTION(2, "TIM1_BKIN2"), 912 + STM32_FUNCTION(3, "SAI2_SCK_B"), 913 + STM32_FUNCTION(5, "TIM15_CH2"), 914 + STM32_FUNCTION(6, "I2C3_SMBA"), 915 + STM32_FUNCTION(7, "SAI1_SCK_B"), 916 + STM32_FUNCTION(9, "UART4_RTS UART4_DE"), 917 + STM32_FUNCTION(12, "ETH2_MII_TXD3 ETH2_RGMII_TXD3"), 918 + STM32_FUNCTION(13, "FMC_A22"), 919 + STM32_FUNCTION(14, "DCMIPP_D7"), 920 + STM32_FUNCTION(15, "LCD_G3"), 921 + STM32_FUNCTION(17, "ANALOG") 922 + ), 923 + STM32_PIN( 924 + PINCTRL_PIN(71, "PE7"), 925 + STM32_FUNCTION(0, "GPIOE7"), 926 + STM32_FUNCTION(2, "TIM1_ETR"), 927 + STM32_FUNCTION(5, "LPTIM2_IN1"), 928 + STM32_FUNCTION(9, "UART5_TX"), 929 + STM32_FUNCTION(13, "FMC_D4 FMC_AD4"), 930 + STM32_FUNCTION(14, "LCD_B3"), 931 + STM32_FUNCTION(15, "LCD_R5"), 932 + STM32_FUNCTION(17, "ANALOG") 933 + ), 934 + STM32_PIN( 935 + PINCTRL_PIN(72, "PE8"), 936 + STM32_FUNCTION(0, "GPIOE8"), 937 + STM32_FUNCTION(2, "TIM1_CH1N"), 938 + STM32_FUNCTION(4, "DFSDM1_CKIN2"), 939 + STM32_FUNCTION(6, "I2C1_SDA"), 940 + STM32_FUNCTION(8, "UART7_TX"), 941 + STM32_FUNCTION(13, "FMC_D5 FMC_AD5"), 942 + STM32_FUNCTION(17, "ANALOG") 943 + ), 944 + STM32_PIN( 945 + PINCTRL_PIN(73, "PE9"), 946 + STM32_FUNCTION(0, "GPIOE9"), 947 + STM32_FUNCTION(2, "TIM1_CH1"), 948 + STM32_FUNCTION(10, "QUADSPI_BK1_IO1"), 949 + STM32_FUNCTION(12, "LCD_HSYNC"), 950 + STM32_FUNCTION(13, "FMC_D6 FMC_AD6"), 951 + STM32_FUNCTION(14, "DCMIPP_D7"), 952 + STM32_FUNCTION(15, "LCD_R7"), 953 + STM32_FUNCTION(16, "HDP3"), 954 + STM32_FUNCTION(17, "ANALOG") 955 + ), 956 + STM32_PIN( 957 + PINCTRL_PIN(74, "PE10"), 958 + STM32_FUNCTION(0, "GPIOE10"), 959 + STM32_FUNCTION(2, "TIM1_CH2N"), 960 + STM32_FUNCTION(8, "UART7_RX"), 961 + STM32_FUNCTION(10, "FDCAN1_TX"), 962 + STM32_FUNCTION(13, "FMC_D7 FMC_AD7"), 963 + STM32_FUNCTION(17, "ANALOG") 964 + ), 965 + STM32_PIN( 966 + PINCTRL_PIN(75, "PE11"), 967 + STM32_FUNCTION(0, "GPIOE11"), 968 + STM32_FUNCTION(2, "TIM1_CH2"), 969 + STM32_FUNCTION(3, "USART2_CTS USART2_NSS"), 970 + STM32_FUNCTION(5, "SAI1_D2"), 971 + STM32_FUNCTION(6, "SPI4_MOSI I2S4_SDO"), 972 + STM32_FUNCTION(7, "SAI1_FS_A"), 973 + STM32_FUNCTION(8, "USART6_CK"), 974 + STM32_FUNCTION(10, "LCD_R0"), 975 + STM32_FUNCTION(11, "ETH2_MII_TX_ER"), 976 + STM32_FUNCTION(12, "ETH1_MII_TX_ER"), 977 + STM32_FUNCTION(13, "FMC_D8 FMC_AD8"), 978 + STM32_FUNCTION(14, "DCMIPP_D10"), 979 + STM32_FUNCTION(15, "LCD_R5"), 980 + STM32_FUNCTION(17, "ANALOG") 981 + ), 982 + STM32_PIN( 983 + PINCTRL_PIN(76, "PE12"), 984 + STM32_FUNCTION(0, "GPIOE12"), 985 + STM32_FUNCTION(2, "TIM1_CH3N"), 986 + STM32_FUNCTION(6, "SPI4_SCK I2S4_CK"), 987 + STM32_FUNCTION(9, "UART8_RTS UART8_DE"), 988 + STM32_FUNCTION(10, "LCD_VSYNC"), 989 + STM32_FUNCTION(11, "TSC_G3_IO2"), 990 + STM32_FUNCTION(12, "LCD_G4"), 991 + STM32_FUNCTION(13, "FMC_D9 FMC_AD9"), 992 + STM32_FUNCTION(14, "DCMIPP_D11"), 993 + STM32_FUNCTION(15, "LCD_G6"), 994 + STM32_FUNCTION(16, "HDP4"), 995 + STM32_FUNCTION(17, "ANALOG") 996 + ), 997 + STM32_PIN( 998 + PINCTRL_PIN(77, "PE13"), 999 + STM32_FUNCTION(0, "GPIOE13"), 1000 + STM32_FUNCTION(2, "TIM1_CH3"), 1001 + STM32_FUNCTION(5, "I2C5_SDA"), 1002 + STM32_FUNCTION(6, "SPI4_MISO I2S4_SDI"), 1003 + STM32_FUNCTION(12, "LCD_B1"), 1004 + STM32_FUNCTION(13, "FMC_D10 FMC_AD10"), 1005 + STM32_FUNCTION(14, "DCMIPP_D4"), 1006 + STM32_FUNCTION(15, "LCD_R6"), 1007 + STM32_FUNCTION(17, "ANALOG") 1008 + ), 1009 + STM32_PIN( 1010 + PINCTRL_PIN(78, "PE14"), 1011 + STM32_FUNCTION(0, "GPIOE14"), 1012 + STM32_FUNCTION(2, "TIM1_BKIN"), 1013 + STM32_FUNCTION(5, "SAI1_D4"), 1014 + STM32_FUNCTION(9, "UART8_RTS UART8_DE"), 1015 + STM32_FUNCTION(10, "QUADSPI_BK1_NCS"), 1016 + STM32_FUNCTION(11, "QUADSPI_BK2_IO2"), 1017 + STM32_FUNCTION(13, "FMC_D11 FMC_AD11"), 1018 + STM32_FUNCTION(14, "DCMIPP_D7"), 1019 + STM32_FUNCTION(15, "LCD_G0"), 1020 + STM32_FUNCTION(17, "ANALOG") 1021 + ), 1022 + STM32_PIN( 1023 + PINCTRL_PIN(79, "PE15"), 1024 + STM32_FUNCTION(0, "GPIOE15"), 1025 + STM32_FUNCTION(2, "TIM2_ETR"), 1026 + STM32_FUNCTION(3, "TIM1_BKIN"), 1027 + STM32_FUNCTION(4, "USART2_CTS USART2_NSS"), 1028 + STM32_FUNCTION(7, "I2C4_SCL"), 1029 + STM32_FUNCTION(13, "FMC_D12 FMC_AD12"), 1030 + STM32_FUNCTION(14, "DCMIPP_D10"), 1031 + STM32_FUNCTION(15, "LCD_B7"), 1032 + STM32_FUNCTION(16, "HDP7"), 1033 + STM32_FUNCTION(17, "ANALOG") 1034 + ), 1035 + STM32_PIN( 1036 + PINCTRL_PIN(80, "PF0"), 1037 + STM32_FUNCTION(0, "GPIOF0"), 1038 + STM32_FUNCTION(1, "TRACED13"), 1039 + STM32_FUNCTION(4, "DFSDM1_CKOUT"), 1040 + STM32_FUNCTION(8, "USART3_CK"), 1041 + STM32_FUNCTION(11, "SDMMC2_D4"), 1042 + STM32_FUNCTION(13, "FMC_A0"), 1043 + STM32_FUNCTION(14, "LCD_R6"), 1044 + STM32_FUNCTION(15, "LCD_G0"), 1045 + STM32_FUNCTION(17, "ANALOG") 1046 + ), 1047 + STM32_PIN( 1048 + PINCTRL_PIN(81, "PF1"), 1049 + STM32_FUNCTION(0, "GPIOF1"), 1050 + STM32_FUNCTION(1, "TRACED7"), 1051 + STM32_FUNCTION(5, "I2C2_SDA"), 1052 + STM32_FUNCTION(6, "SPI3_MOSI I2S3_SDO"), 1053 + STM32_FUNCTION(13, "FMC_A1"), 1054 + STM32_FUNCTION(14, "LCD_B7"), 1055 + STM32_FUNCTION(15, "LCD_G1"), 1056 + STM32_FUNCTION(16, "HDP7"), 1057 + STM32_FUNCTION(17, "ANALOG") 1058 + ), 1059 + STM32_PIN( 1060 + PINCTRL_PIN(82, "PF2"), 1061 + STM32_FUNCTION(0, "GPIOF2"), 1062 + STM32_FUNCTION(1, "TRACED1"), 1063 + STM32_FUNCTION(5, "I2C2_SCL"), 1064 + STM32_FUNCTION(7, "DFSDM1_CKIN1"), 1065 + STM32_FUNCTION(8, "USART6_CK"), 1066 + STM32_FUNCTION(10, "SDMMC2_D0DIR"), 1067 + STM32_FUNCTION(12, "SDMMC1_D0DIR"), 1068 + STM32_FUNCTION(13, "FMC_A2"), 1069 + STM32_FUNCTION(14, "LCD_G4"), 1070 + STM32_FUNCTION(15, "LCD_B3"), 1071 + STM32_FUNCTION(17, "ANALOG") 1072 + ), 1073 + STM32_PIN( 1074 + PINCTRL_PIN(83, "PF3"), 1075 + STM32_FUNCTION(0, "GPIOF3"), 1076 + STM32_FUNCTION(4, "LPTIM2_IN2"), 1077 + STM32_FUNCTION(5, "I2C5_SDA"), 1078 + STM32_FUNCTION(6, "SPI4_MISO I2S4_SDI"), 1079 + STM32_FUNCTION(7, "SPI3_NSS I2S3_WS"), 1080 + STM32_FUNCTION(13, "FMC_A3"), 1081 + STM32_FUNCTION(15, "LCD_G3"), 1082 + STM32_FUNCTION(17, "ANALOG") 1083 + ), 1084 + STM32_PIN( 1085 + PINCTRL_PIN(84, "PF4"), 1086 + STM32_FUNCTION(0, "GPIOF4"), 1087 + STM32_FUNCTION(4, "USART2_RX"), 1088 + STM32_FUNCTION(11, "TSC_G3_IO3"), 1089 + STM32_FUNCTION(12, "ETH2_MII_RXD0 ETH2_RGMII_RXD0 ETH2_RMII_RXD0"), 1090 + STM32_FUNCTION(13, "FMC_A4"), 1091 + STM32_FUNCTION(14, "DCMIPP_D4"), 1092 + STM32_FUNCTION(15, "LCD_B6"), 1093 + STM32_FUNCTION(17, "ANALOG") 1094 + ), 1095 + STM32_PIN( 1096 + PINCTRL_PIN(85, "PF5"), 1097 + STM32_FUNCTION(0, "GPIOF5"), 1098 + STM32_FUNCTION(1, "TRACED12"), 1099 + STM32_FUNCTION(5, "DFSDM1_CKIN0"), 1100 + STM32_FUNCTION(6, "I2C1_SMBA"), 1101 + STM32_FUNCTION(10, "LCD_G0"), 1102 + STM32_FUNCTION(13, "FMC_A5"), 1103 + STM32_FUNCTION(14, "DCMIPP_D11"), 1104 + STM32_FUNCTION(15, "LCD_R5"), 1105 + STM32_FUNCTION(17, "ANALOG") 1106 + ), 1107 + STM32_PIN( 1108 + PINCTRL_PIN(86, "PF6"), 1109 + STM32_FUNCTION(0, "GPIOF6"), 1110 + STM32_FUNCTION(2, "TIM16_CH1"), 1111 + STM32_FUNCTION(6, "SPI5_NSS"), 1112 + STM32_FUNCTION(8, "UART7_RX"), 1113 + STM32_FUNCTION(10, "QUADSPI_BK1_IO2"), 1114 + STM32_FUNCTION(12, "ETH2_MII_TX_EN ETH2_RGMII_TX_CTL ETH2_RMII_TX_EN"), 1115 + STM32_FUNCTION(14, "LCD_R7"), 1116 + STM32_FUNCTION(15, "LCD_G4"), 1117 + STM32_FUNCTION(17, "ANALOG") 1118 + ), 1119 + STM32_PIN( 1120 + PINCTRL_PIN(87, "PF7"), 1121 + STM32_FUNCTION(0, "GPIOF7"), 1122 + STM32_FUNCTION(2, "TIM17_CH1"), 1123 + STM32_FUNCTION(8, "UART7_TX"), 1124 + STM32_FUNCTION(9, "UART4_CTS"), 1125 + STM32_FUNCTION(11, "ETH1_RGMII_CLK125"), 1126 + STM32_FUNCTION(12, "ETH2_MII_TXD0 ETH2_RGMII_TXD0 ETH2_RMII_TXD0"), 1127 + STM32_FUNCTION(13, "FMC_A18"), 1128 + STM32_FUNCTION(15, "LCD_G2"), 1129 + STM32_FUNCTION(17, "ANALOG") 1130 + ), 1131 + STM32_PIN( 1132 + PINCTRL_PIN(88, "PF8"), 1133 + STM32_FUNCTION(0, "GPIOF8"), 1134 + STM32_FUNCTION(2, "TIM16_CH1N"), 1135 + STM32_FUNCTION(3, "TIM4_CH3"), 1136 + STM32_FUNCTION(4, "TIM8_CH3"), 1137 + STM32_FUNCTION(7, "SAI1_SCK_B"), 1138 + STM32_FUNCTION(8, "USART6_TX"), 1139 + STM32_FUNCTION(10, "TIM13_CH1"), 1140 + STM32_FUNCTION(11, "QUADSPI_BK1_IO0"), 1141 + STM32_FUNCTION(14, "DCMIPP_D15"), 1142 + STM32_FUNCTION(15, "LCD_B3"), 1143 + STM32_FUNCTION(17, "ANALOG") 1144 + ), 1145 + STM32_PIN( 1146 + PINCTRL_PIN(89, "PF9"), 1147 + STM32_FUNCTION(0, "GPIOF9"), 1148 + STM32_FUNCTION(2, "TIM17_CH1N"), 1149 + STM32_FUNCTION(3, "TIM1_CH1"), 1150 + STM32_FUNCTION(4, "DFSDM1_CKIN3"), 1151 + STM32_FUNCTION(7, "SAI1_D4"), 1152 + STM32_FUNCTION(8, "UART7_CTS"), 1153 + STM32_FUNCTION(9, "UART8_RX"), 1154 + STM32_FUNCTION(10, "TIM14_CH1"), 1155 + STM32_FUNCTION(11, "QUADSPI_BK1_IO1"), 1156 + STM32_FUNCTION(12, "QUADSPI_BK2_IO3"), 1157 + STM32_FUNCTION(13, "FMC_A9"), 1158 + STM32_FUNCTION(15, "LCD_B6"), 1159 + STM32_FUNCTION(17, "ANALOG") 1160 + ), 1161 + STM32_PIN( 1162 + PINCTRL_PIN(90, "PF10"), 1163 + STM32_FUNCTION(0, "GPIOF10"), 1164 + STM32_FUNCTION(2, "TIM16_BKIN"), 1165 + STM32_FUNCTION(3, "SAI1_D3"), 1166 + STM32_FUNCTION(4, "TIM8_BKIN"), 1167 + STM32_FUNCTION(6, "SPI5_NSS"), 1168 + STM32_FUNCTION(8, "USART6_RTS USART6_DE"), 1169 + STM32_FUNCTION(9, "UART7_RTS UART7_DE"), 1170 + STM32_FUNCTION(10, "QUADSPI_CLK"), 1171 + STM32_FUNCTION(14, "DCMIPP_HSYNC"), 1172 + STM32_FUNCTION(15, "LCD_B5"), 1173 + STM32_FUNCTION(17, "ANALOG") 1174 + ), 1175 + STM32_PIN( 1176 + PINCTRL_PIN(91, "PF11"), 1177 + STM32_FUNCTION(0, "GPIOF11"), 1178 + STM32_FUNCTION(2, "USART2_TX"), 1179 + STM32_FUNCTION(3, "SAI1_D2"), 1180 + STM32_FUNCTION(4, "DFSDM1_CKIN3"), 1181 + STM32_FUNCTION(7, "SAI1_FS_A"), 1182 + STM32_FUNCTION(13, "ETH2_MII_RX_ER"), 1183 + STM32_FUNCTION(17, "ANALOG") 1184 + ), 1185 + STM32_PIN( 1186 + PINCTRL_PIN(92, "PF12"), 1187 + STM32_FUNCTION(0, "GPIOF12"), 1188 + STM32_FUNCTION(6, "SPI1_NSS I2S1_WS"), 1189 + STM32_FUNCTION(7, "SAI1_SD_A"), 1190 + STM32_FUNCTION(9, "UART4_TX"), 1191 + STM32_FUNCTION(11, "ETH1_MII_TX_ER"), 1192 + STM32_FUNCTION(12, "ETH1_RGMII_CLK125"), 1193 + STM32_FUNCTION(17, "ANALOG") 1194 + ), 1195 + STM32_PIN( 1196 + PINCTRL_PIN(93, "PF13"), 1197 + STM32_FUNCTION(0, "GPIOF13"), 1198 + STM32_FUNCTION(2, "TIM2_ETR"), 1199 + STM32_FUNCTION(3, "SAI1_MCLK_B"), 1200 + STM32_FUNCTION(7, "DFSDM1_DATIN3"), 1201 + STM32_FUNCTION(8, "USART2_TX"), 1202 + STM32_FUNCTION(9, "UART5_RX"), 1203 + STM32_FUNCTION(17, "ANALOG") 1204 + ), 1205 + STM32_PIN( 1206 + PINCTRL_PIN(94, "PF14"), 1207 + STM32_FUNCTION(0, "GPIOF14"), 1208 + STM32_FUNCTION(1, "JTCK SWCLK"), 1209 + STM32_FUNCTION(17, "ANALOG") 1210 + ), 1211 + STM32_PIN( 1212 + PINCTRL_PIN(95, "PF15"), 1213 + STM32_FUNCTION(0, "GPIOF15"), 1214 + STM32_FUNCTION(1, "JTMS SWDIO"), 1215 + STM32_FUNCTION(17, "ANALOG") 1216 + ), 1217 + STM32_PIN( 1218 + PINCTRL_PIN(96, "PG0"), 1219 + STM32_FUNCTION(0, "GPIOG0"), 1220 + STM32_FUNCTION(10, "FDCAN2_TX"), 1221 + STM32_FUNCTION(11, "TSC_G4_IO2"), 1222 + STM32_FUNCTION(13, "FMC_A10"), 1223 + STM32_FUNCTION(14, "DCMIPP_PIXCLK"), 1224 + STM32_FUNCTION(15, "LCD_G5"), 1225 + STM32_FUNCTION(17, "ANALOG") 1226 + ), 1227 + STM32_PIN( 1228 + PINCTRL_PIN(97, "PG1"), 1229 + STM32_FUNCTION(0, "GPIOG1"), 1230 + STM32_FUNCTION(2, "LPTIM1_ETR"), 1231 + STM32_FUNCTION(3, "TIM4_ETR"), 1232 + STM32_FUNCTION(4, "SAI2_FS_A"), 1233 + STM32_FUNCTION(5, "I2C2_SMBA"), 1234 + STM32_FUNCTION(6, "SPI2_MISO I2S2_SDI"), 1235 + STM32_FUNCTION(7, "SAI2_D2"), 1236 + STM32_FUNCTION(10, "FDCAN2_TX"), 1237 + STM32_FUNCTION(11, "ETH2_MII_TXD2 ETH2_RGMII_TXD2"), 1238 + STM32_FUNCTION(13, "FMC_NBL0"), 1239 + STM32_FUNCTION(15, "LCD_G7"), 1240 + STM32_FUNCTION(17, "ANALOG") 1241 + ), 1242 + STM32_PIN( 1243 + PINCTRL_PIN(98, "PG2"), 1244 + STM32_FUNCTION(0, "GPIOG2"), 1245 + STM32_FUNCTION(2, "MCO2"), 1246 + STM32_FUNCTION(4, "TIM8_BKIN"), 1247 + STM32_FUNCTION(11, "SAI2_MCLK_B"), 1248 + STM32_FUNCTION(12, "ETH1_MDC"), 1249 + STM32_FUNCTION(14, "DCMIPP_D1"), 1250 + STM32_FUNCTION(17, "ANALOG") 1251 + ), 1252 + STM32_PIN( 1253 + PINCTRL_PIN(99, "PG3"), 1254 + STM32_FUNCTION(0, "GPIOG3"), 1255 + STM32_FUNCTION(4, "TIM8_BKIN2"), 1256 + STM32_FUNCTION(5, "I2C2_SDA"), 1257 + STM32_FUNCTION(7, "SAI2_SD_B"), 1258 + STM32_FUNCTION(10, "FDCAN2_RX"), 1259 + STM32_FUNCTION(11, "ETH2_RGMII_GTX_CLK"), 1260 + STM32_FUNCTION(12, "ETH1_MDIO"), 1261 + STM32_FUNCTION(13, "FMC_A13"), 1262 + STM32_FUNCTION(14, "DCMIPP_D15"), 1263 + STM32_FUNCTION(15, "DCMIPP_D12"), 1264 + STM32_FUNCTION(17, "ANALOG") 1265 + ), 1266 + STM32_PIN( 1267 + PINCTRL_PIN(100, "PG4"), 1268 + STM32_FUNCTION(0, "GPIOG4"), 1269 + STM32_FUNCTION(1, "TRACED1"), 1270 + STM32_FUNCTION(2, "TIM1_BKIN2"), 1271 + STM32_FUNCTION(5, "DFSDM1_CKIN3"), 1272 + STM32_FUNCTION(9, "USART3_RX"), 1273 + STM32_FUNCTION(11, "SDMMC2_D123DIR"), 1274 + STM32_FUNCTION(12, "LCD_VSYNC"), 1275 + STM32_FUNCTION(13, "FMC_A14"), 1276 + STM32_FUNCTION(14, "DCMIPP_D8"), 1277 + STM32_FUNCTION(15, "DCMIPP_D13"), 1278 + STM32_FUNCTION(16, "HDP1"), 1279 + STM32_FUNCTION(17, "ANALOG") 1280 + ), 1281 + STM32_PIN( 1282 + PINCTRL_PIN(101, "PG5"), 1283 + STM32_FUNCTION(0, "GPIOG5"), 1284 + STM32_FUNCTION(2, "TIM17_CH1"), 1285 + STM32_FUNCTION(11, "ETH2_MDC"), 1286 + STM32_FUNCTION(12, "LCD_G4"), 1287 + STM32_FUNCTION(13, "FMC_A15"), 1288 + STM32_FUNCTION(14, "DCMIPP_VSYNC"), 1289 + STM32_FUNCTION(15, "DCMIPP_D3"), 1290 + STM32_FUNCTION(17, "ANALOG") 1291 + ), 1292 + STM32_PIN( 1293 + PINCTRL_PIN(102, "PG6"), 1294 + STM32_FUNCTION(0, "GPIOG6"), 1295 + STM32_FUNCTION(1, "TRACED3"), 1296 + STM32_FUNCTION(2, "TIM17_BKIN"), 1297 + STM32_FUNCTION(3, "TIM5_CH4"), 1298 + STM32_FUNCTION(4, "SAI2_D1"), 1299 + STM32_FUNCTION(5, "USART1_RX"), 1300 + STM32_FUNCTION(7, "SAI2_SD_A"), 1301 + STM32_FUNCTION(11, "SDMMC2_CMD"), 1302 + STM32_FUNCTION(12, "LCD_G0"), 1303 + STM32_FUNCTION(14, "LCD_DE"), 1304 + STM32_FUNCTION(15, "LCD_R7"), 1305 + STM32_FUNCTION(16, "HDP3"), 1306 + STM32_FUNCTION(17, "ANALOG") 1307 + ), 1308 + STM32_PIN( 1309 + PINCTRL_PIN(103, "PG7"), 1310 + STM32_FUNCTION(0, "GPIOG7"), 1311 + STM32_FUNCTION(1, "TRACED8"), 1312 + STM32_FUNCTION(2, "TIM1_ETR"), 1313 + STM32_FUNCTION(6, "SPI3_MISO I2S3_SDI"), 1314 + STM32_FUNCTION(9, "UART7_CTS"), 1315 + STM32_FUNCTION(11, "SDMMC2_CKIN"), 1316 + STM32_FUNCTION(12, "LCD_R1"), 1317 + STM32_FUNCTION(14, "LCD_R5"), 1318 + STM32_FUNCTION(15, "LCD_R2"), 1319 + STM32_FUNCTION(17, "ANALOG") 1320 + ), 1321 + STM32_PIN( 1322 + PINCTRL_PIN(104, "PG8"), 1323 + STM32_FUNCTION(0, "GPIOG8"), 1324 + STM32_FUNCTION(2, "TIM2_CH1"), 1325 + STM32_FUNCTION(4, "TIM8_ETR"), 1326 + STM32_FUNCTION(6, "SPI5_MISO"), 1327 + STM32_FUNCTION(7, "SAI1_MCLK_B"), 1328 + STM32_FUNCTION(8, "LCD_B1"), 1329 + STM32_FUNCTION(9, "USART3_RTS USART3_DE"), 1330 + STM32_FUNCTION(10, "SPDIFRX_IN2"), 1331 + STM32_FUNCTION(11, "QUADSPI_BK2_IO2"), 1332 + STM32_FUNCTION(12, "QUADSPI_BK1_IO3"), 1333 + STM32_FUNCTION(13, "FMC_NE2"), 1334 + STM32_FUNCTION(14, "ETH2_CLK"), 1335 + STM32_FUNCTION(15, "DCMIPP_D6"), 1336 + STM32_FUNCTION(17, "ANALOG") 1337 + ), 1338 + STM32_PIN( 1339 + PINCTRL_PIN(105, "PG9"), 1340 + STM32_FUNCTION(0, "GPIOG9"), 1341 + STM32_FUNCTION(1, "DBTRGO"), 1342 + STM32_FUNCTION(5, "I2C2_SDA"), 1343 + STM32_FUNCTION(8, "USART6_RX"), 1344 + STM32_FUNCTION(9, "SPDIFRX_IN3"), 1345 + STM32_FUNCTION(10, "FDCAN1_RX"), 1346 + STM32_FUNCTION(11, "FMC_NE2"), 1347 + STM32_FUNCTION(13, "FMC_NCE"), 1348 + STM32_FUNCTION(14, "DCMIPP_VSYNC"), 1349 + STM32_FUNCTION(17, "ANALOG") 1350 + ), 1351 + STM32_PIN( 1352 + PINCTRL_PIN(106, "PG10"), 1353 + STM32_FUNCTION(0, "GPIOG10"), 1354 + STM32_FUNCTION(6, "SPI5_SCK"), 1355 + STM32_FUNCTION(7, "SAI1_SD_B"), 1356 + STM32_FUNCTION(9, "UART8_CTS"), 1357 + STM32_FUNCTION(10, "FDCAN1_TX"), 1358 + STM32_FUNCTION(11, "QUADSPI_BK2_IO1"), 1359 + STM32_FUNCTION(13, "FMC_NE3"), 1360 + STM32_FUNCTION(14, "DCMIPP_D2"), 1361 + STM32_FUNCTION(17, "ANALOG") 1362 + ), 1363 + STM32_PIN( 1364 + PINCTRL_PIN(107, "PG11"), 1365 + STM32_FUNCTION(0, "GPIOG11"), 1366 + STM32_FUNCTION(5, "SAI2_D3"), 1367 + STM32_FUNCTION(6, "I2S2_MCK"), 1368 + STM32_FUNCTION(8, "USART3_TX"), 1369 + STM32_FUNCTION(9, "UART4_TX"), 1370 + STM32_FUNCTION(11, "ETH2_MII_TXD1 ETH2_RGMII_TXD1 ETH2_RMII_TXD1"), 1371 + STM32_FUNCTION(13, "FMC_A24"), 1372 + STM32_FUNCTION(14, "DCMIPP_D14"), 1373 + STM32_FUNCTION(15, "LCD_B2"), 1374 + STM32_FUNCTION(17, "ANALOG") 1375 + ), 1376 + STM32_PIN( 1377 + PINCTRL_PIN(108, "PG12"), 1378 + STM32_FUNCTION(0, "GPIOG12"), 1379 + STM32_FUNCTION(2, "LPTIM1_IN1"), 1380 + STM32_FUNCTION(4, "TSC_G5_IO2"), 1381 + STM32_FUNCTION(5, "SAI2_SCK_A"), 1382 + STM32_FUNCTION(7, "SAI2_CK2"), 1383 + STM32_FUNCTION(8, "USART6_RTS USART6_DE"), 1384 + STM32_FUNCTION(9, "USART3_CTS"), 1385 + STM32_FUNCTION(11, "ETH2_PHY_INTN"), 1386 + STM32_FUNCTION(12, "ETH1_PHY_INTN"), 1387 + STM32_FUNCTION(13, "ETH2_MII_RX_DV ETH2_RGMII_RX_CTL ETH2_RMII_CRS_DV"), 1388 + STM32_FUNCTION(17, "ANALOG") 1389 + ), 1390 + STM32_PIN( 1391 + PINCTRL_PIN(109, "PG13"), 1392 + STM32_FUNCTION(0, "GPIOG13"), 1393 + STM32_FUNCTION(2, "LPTIM1_OUT"), 1394 + STM32_FUNCTION(8, "USART6_CTS USART6_NSS"), 1395 + STM32_FUNCTION(12, "ETH1_MII_TXD0 ETH1_RGMII_TXD0 ETH1_RMII_TXD0"), 1396 + STM32_FUNCTION(17, "ANALOG") 1397 + ), 1398 + STM32_PIN( 1399 + PINCTRL_PIN(110, "PG14"), 1400 + STM32_FUNCTION(0, "GPIOG14"), 1401 + STM32_FUNCTION(2, "LPTIM1_ETR"), 1402 + STM32_FUNCTION(7, "SAI2_D1"), 1403 + STM32_FUNCTION(8, "USART6_TX"), 1404 + STM32_FUNCTION(11, "SAI2_SD_A"), 1405 + STM32_FUNCTION(12, "ETH1_MII_TXD1 ETH1_RGMII_TXD1 ETH1_RMII_TXD1"), 1406 + STM32_FUNCTION(17, "ANALOG") 1407 + ), 1408 + STM32_PIN( 1409 + PINCTRL_PIN(111, "PG15"), 1410 + STM32_FUNCTION(0, "GPIOG15"), 1411 + STM32_FUNCTION(8, "USART6_CTS USART6_NSS"), 1412 + STM32_FUNCTION(9, "UART7_CTS"), 1413 + STM32_FUNCTION(10, "QUADSPI_BK1_IO1"), 1414 + STM32_FUNCTION(11, "ETH2_PHY_INTN"), 1415 + STM32_FUNCTION(12, "LCD_B4"), 1416 + STM32_FUNCTION(14, "DCMIPP_D10"), 1417 + STM32_FUNCTION(15, "LCD_B3"), 1418 + STM32_FUNCTION(17, "ANALOG") 1419 + ), 1420 + STM32_PIN( 1421 + PINCTRL_PIN(112, "PH0"), 1422 + STM32_FUNCTION(0, "GPIOH0"), 1423 + STM32_FUNCTION(17, "ANALOG") 1424 + ), 1425 + STM32_PIN( 1426 + PINCTRL_PIN(113, "PH1"), 1427 + STM32_FUNCTION(0, "GPIOH1"), 1428 + STM32_FUNCTION(17, "ANALOG") 1429 + ), 1430 + STM32_PIN( 1431 + PINCTRL_PIN(114, "PH2"), 1432 + STM32_FUNCTION(0, "GPIOH2"), 1433 + STM32_FUNCTION(2, "LPTIM1_IN2"), 1434 + STM32_FUNCTION(4, "TSC_G4_IO3"), 1435 + STM32_FUNCTION(7, "DCMIPP_D9"), 1436 + STM32_FUNCTION(8, "LCD_G1"), 1437 + STM32_FUNCTION(9, "UART7_TX"), 1438 + STM32_FUNCTION(10, "QUADSPI_BK2_IO0"), 1439 + STM32_FUNCTION(11, "ETH2_MII_CRS"), 1440 + STM32_FUNCTION(12, "ETH1_MII_CRS"), 1441 + STM32_FUNCTION(13, "FMC_NE4"), 1442 + STM32_FUNCTION(14, "ETH2_RGMII_CLK125"), 1443 + STM32_FUNCTION(15, "LCD_B0"), 1444 + STM32_FUNCTION(17, "ANALOG") 1445 + ), 1446 + STM32_PIN( 1447 + PINCTRL_PIN(115, "PH3"), 1448 + STM32_FUNCTION(0, "GPIOH3"), 1449 + STM32_FUNCTION(5, "I2C3_SCL"), 1450 + STM32_FUNCTION(6, "SPI5_MOSI"), 1451 + STM32_FUNCTION(10, "QUADSPI_BK2_IO1"), 1452 + STM32_FUNCTION(11, "ETH1_MII_COL"), 1453 + STM32_FUNCTION(12, "LCD_R5"), 1454 + STM32_FUNCTION(13, "ETH2_MII_COL"), 1455 + STM32_FUNCTION(14, "QUADSPI_BK1_IO0"), 1456 + STM32_FUNCTION(15, "LCD_B4"), 1457 + STM32_FUNCTION(17, "ANALOG") 1458 + ), 1459 + STM32_PIN( 1460 + PINCTRL_PIN(116, "PH4"), 1461 + STM32_FUNCTION(0, "GPIOH4"), 1462 + STM32_FUNCTION(1, "JTDI"), 1463 + STM32_FUNCTION(17, "ANALOG") 1464 + ), 1465 + STM32_PIN( 1466 + PINCTRL_PIN(117, "PH5"), 1467 + STM32_FUNCTION(0, "GPIOH5"), 1468 + STM32_FUNCTION(1, "JTDO"), 1469 + STM32_FUNCTION(17, "ANALOG") 1470 + ), 1471 + STM32_PIN( 1472 + PINCTRL_PIN(118, "PH6"), 1473 + STM32_FUNCTION(0, "GPIOH6"), 1474 + STM32_FUNCTION(3, "TIM12_CH1"), 1475 + STM32_FUNCTION(4, "USART2_CK"), 1476 + STM32_FUNCTION(5, "I2C5_SDA"), 1477 + STM32_FUNCTION(6, "SPI2_SCK I2S2_CK"), 1478 + STM32_FUNCTION(10, "QUADSPI_BK1_IO2"), 1479 + STM32_FUNCTION(11, "ETH1_PHY_INTN"), 1480 + STM32_FUNCTION(12, "ETH1_MII_RX_ER"), 1481 + STM32_FUNCTION(13, "ETH2_MII_RXD2 ETH2_RGMII_RXD2"), 1482 + STM32_FUNCTION(14, "QUADSPI_BK1_NCS"), 1483 + STM32_FUNCTION(17, "ANALOG") 1484 + ), 1485 + STM32_PIN( 1486 + PINCTRL_PIN(119, "PH7"), 1487 + STM32_FUNCTION(0, "GPIOH7"), 1488 + STM32_FUNCTION(3, "SAI2_FS_B"), 1489 + STM32_FUNCTION(6, "I2C3_SDA"), 1490 + STM32_FUNCTION(7, "SPI5_SCK"), 1491 + STM32_FUNCTION(10, "QUADSPI_BK2_IO3"), 1492 + STM32_FUNCTION(11, "ETH2_MII_TX_CLK"), 1493 + STM32_FUNCTION(12, "ETH1_MII_TX_CLK"), 1494 + STM32_FUNCTION(14, "QUADSPI_BK1_IO3"), 1495 + STM32_FUNCTION(15, "LCD_B2"), 1496 + STM32_FUNCTION(17, "ANALOG") 1497 + ), 1498 + STM32_PIN( 1499 + PINCTRL_PIN(120, "PH8"), 1500 + STM32_FUNCTION(0, "GPIOH8"), 1501 + STM32_FUNCTION(1, "TRACED9"), 1502 + STM32_FUNCTION(3, "TIM5_ETR"), 1503 + STM32_FUNCTION(4, "USART2_RX"), 1504 + STM32_FUNCTION(5, "I2C3_SDA"), 1505 + STM32_FUNCTION(12, "LCD_R6"), 1506 + STM32_FUNCTION(13, "FMC_A8"), 1507 + STM32_FUNCTION(14, "DCMIPP_HSYNC"), 1508 + STM32_FUNCTION(15, "LCD_R2"), 1509 + STM32_FUNCTION(16, "HDP2"), 1510 + STM32_FUNCTION(17, "ANALOG") 1511 + ), 1512 + STM32_PIN( 1513 + PINCTRL_PIN(121, "PH9"), 1514 + STM32_FUNCTION(0, "GPIOH9"), 1515 + STM32_FUNCTION(2, "TIM1_CH4"), 1516 + STM32_FUNCTION(3, "TIM12_CH2"), 1517 + STM32_FUNCTION(4, "TSC_SYNC"), 1518 + STM32_FUNCTION(6, "SPI4_SCK I2S4_CK"), 1519 + STM32_FUNCTION(7, "DCMIPP_D13"), 1520 + STM32_FUNCTION(10, "LCD_B5"), 1521 + STM32_FUNCTION(12, "LCD_DE"), 1522 + STM32_FUNCTION(13, "FMC_A20"), 1523 + STM32_FUNCTION(14, "DCMIPP_D9"), 1524 + STM32_FUNCTION(15, "DCMIPP_D8"), 1525 + STM32_FUNCTION(17, "ANALOG") 1526 + ), 1527 + STM32_PIN( 1528 + PINCTRL_PIN(122, "PH10"), 1529 + STM32_FUNCTION(0, "GPIOH10"), 1530 + STM32_FUNCTION(1, "TRACED0"), 1531 + STM32_FUNCTION(3, "TIM5_CH1"), 1532 + STM32_FUNCTION(4, "SAI2_D3"), 1533 + STM32_FUNCTION(5, "DFSDM1_DATIN2"), 1534 + STM32_FUNCTION(6, "I2S3_MCK"), 1535 + STM32_FUNCTION(7, "SPI2_MOSI I2S2_SDO"), 1536 + STM32_FUNCTION(8, "USART3_CTS USART3_NSS"), 1537 + STM32_FUNCTION(9, "SDMMC1_D4"), 1538 + STM32_FUNCTION(14, "LCD_HSYNC"), 1539 + STM32_FUNCTION(15, "LCD_R2"), 1540 + STM32_FUNCTION(16, "HDP0"), 1541 + STM32_FUNCTION(17, "ANALOG") 1542 + ), 1543 + STM32_PIN( 1544 + PINCTRL_PIN(123, "PH11"), 1545 + STM32_FUNCTION(0, "GPIOH11"), 1546 + STM32_FUNCTION(2, "SPI5_NSS"), 1547 + STM32_FUNCTION(3, "TIM5_CH2"), 1548 + STM32_FUNCTION(4, "SAI2_SD_A"), 1549 + STM32_FUNCTION(6, "SPI2_NSS I2S2_WS"), 1550 + STM32_FUNCTION(7, "I2C4_SCL"), 1551 + STM32_FUNCTION(8, "USART6_RX"), 1552 + STM32_FUNCTION(10, "QUADSPI_BK2_IO0"), 1553 + STM32_FUNCTION(12, "ETH2_MII_RX_CLK ETH2_RGMII_RX_CLK ETH2_RMII_REF_CLK"), 1554 + STM32_FUNCTION(13, "FMC_A12"), 1555 + STM32_FUNCTION(15, "LCD_G6"), 1556 + STM32_FUNCTION(17, "ANALOG") 1557 + ), 1558 + STM32_PIN( 1559 + PINCTRL_PIN(124, "PH12"), 1560 + STM32_FUNCTION(0, "GPIOH12"), 1561 + STM32_FUNCTION(2, "USART2_TX"), 1562 + STM32_FUNCTION(3, "TIM5_CH3"), 1563 + STM32_FUNCTION(4, "DFSDM1_CKIN1"), 1564 + STM32_FUNCTION(5, "I2C3_SCL"), 1565 + STM32_FUNCTION(6, "SPI5_MOSI"), 1566 + STM32_FUNCTION(7, "SAI1_SCK_A"), 1567 + STM32_FUNCTION(10, "QUADSPI_BK2_IO2"), 1568 + STM32_FUNCTION(11, "SAI1_CK2"), 1569 + STM32_FUNCTION(12, "ETH1_MII_CRS"), 1570 + STM32_FUNCTION(13, "FMC_A6"), 1571 + STM32_FUNCTION(14, "DCMIPP_D3"), 1572 + STM32_FUNCTION(17, "ANALOG") 1573 + ), 1574 + STM32_PIN( 1575 + PINCTRL_PIN(125, "PH13"), 1576 + STM32_FUNCTION(0, "GPIOH13"), 1577 + STM32_FUNCTION(1, "TRACED15"), 1578 + STM32_FUNCTION(3, "USART2_CK"), 1579 + STM32_FUNCTION(4, "TIM8_CH1N"), 1580 + STM32_FUNCTION(5, "I2C5_SCL"), 1581 + STM32_FUNCTION(7, "SPI3_SCK I2S3_CK"), 1582 + STM32_FUNCTION(9, "UART4_TX"), 1583 + STM32_FUNCTION(14, "LCD_G3"), 1584 + STM32_FUNCTION(15, "LCD_G2"), 1585 + STM32_FUNCTION(17, "ANALOG") 1586 + ), 1587 + STM32_PIN( 1588 + PINCTRL_PIN(126, "PH14"), 1589 + STM32_FUNCTION(0, "GPIOH14"), 1590 + STM32_FUNCTION(4, "DFSDM1_DATIN2"), 1591 + STM32_FUNCTION(5, "I2C3_SDA"), 1592 + STM32_FUNCTION(7, "DCMIPP_D8"), 1593 + STM32_FUNCTION(9, "UART4_RX"), 1594 + STM32_FUNCTION(12, "LCD_B4"), 1595 + STM32_FUNCTION(14, "DCMIPP_D2"), 1596 + STM32_FUNCTION(15, "DCMIPP_PIXCLK"), 1597 + STM32_FUNCTION(17, "ANALOG") 1598 + ), 1599 + STM32_PIN( 1600 + PINCTRL_PIN(128, "PI0"), 1601 + STM32_FUNCTION(0, "GPIOI0"), 1602 + STM32_FUNCTION(9, "SPDIFRX_IN0"), 1603 + STM32_FUNCTION(17, "ANALOG") 1604 + ), 1605 + STM32_PIN( 1606 + PINCTRL_PIN(129, "PI1"), 1607 + STM32_FUNCTION(0, "GPIOI1"), 1608 + STM32_FUNCTION(9, "SPDIFRX_IN1"), 1609 + STM32_FUNCTION(17, "ANALOG") 1610 + ), 1611 + STM32_PIN( 1612 + PINCTRL_PIN(130, "PI2"), 1613 + STM32_FUNCTION(0, "GPIOI2"), 1614 + STM32_FUNCTION(9, "SPDIFRX_IN2"), 1615 + STM32_FUNCTION(17, "ANALOG") 1616 + ), 1617 + STM32_PIN( 1618 + PINCTRL_PIN(131, "PI3"), 1619 + STM32_FUNCTION(0, "GPIOI3"), 1620 + STM32_FUNCTION(9, "SPDIFRX_IN3"), 1621 + STM32_FUNCTION(12, "ETH1_MII_RX_ER"), 1622 + STM32_FUNCTION(17, "ANALOG") 1623 + ), 1624 + STM32_PIN( 1625 + PINCTRL_PIN(132, "PI4"), 1626 + STM32_FUNCTION(0, "GPIOI4"), 1627 + STM32_FUNCTION(1, "BOOT0"), 1628 + STM32_FUNCTION(17, "ANALOG") 1629 + ), 1630 + STM32_PIN( 1631 + PINCTRL_PIN(133, "PI5"), 1632 + STM32_FUNCTION(0, "GPIOI5"), 1633 + STM32_FUNCTION(1, "BOOT1"), 1634 + STM32_FUNCTION(17, "ANALOG") 1635 + ), 1636 + STM32_PIN( 1637 + PINCTRL_PIN(134, "PI6"), 1638 + STM32_FUNCTION(0, "GPIOI6"), 1639 + STM32_FUNCTION(1, "BOOT2"), 1640 + STM32_FUNCTION(17, "ANALOG") 1641 + ), 1642 + STM32_PIN( 1643 + PINCTRL_PIN(135, "PI7"), 1644 + STM32_FUNCTION(0, "GPIOI7"), 1645 + STM32_FUNCTION(17, "ANALOG") 1646 + ), 1647 + }; 1648 + 1649 + static struct stm32_pinctrl_match_data stm32mp135_match_data = { 1650 + .pins = stm32mp135_pins, 1651 + .npins = ARRAY_SIZE(stm32mp135_pins), 1652 + }; 1653 + 1654 + static const struct of_device_id stm32mp135_pctrl_match[] = { 1655 + { 1656 + .compatible = "st,stm32mp135-pinctrl", 1657 + .data = &stm32mp135_match_data, 1658 + }, 1659 + { } 1660 + }; 1661 + 1662 + static const struct dev_pm_ops stm32_pinctrl_dev_pm_ops = { 1663 + SET_LATE_SYSTEM_SLEEP_PM_OPS(NULL, stm32_pinctrl_resume) 1664 + }; 1665 + 1666 + static struct platform_driver stm32mp135_pinctrl_driver = { 1667 + .probe = stm32_pctl_probe, 1668 + .driver = { 1669 + .name = "stm32mp135-pinctrl", 1670 + .of_match_table = stm32mp135_pctrl_match, 1671 + .pm = &stm32_pinctrl_dev_pm_ops, 1672 + }, 1673 + }; 1674 + 1675 + static int __init stm32mp135_pinctrl_init(void) 1676 + { 1677 + return platform_driver_register(&stm32mp135_pinctrl_driver); 1678 + } 1679 + arch_initcall(stm32mp135_pinctrl_init);
+17
include/dt-bindings/pinctrl/pinctrl-zynq.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 */ 2 + /* 3 + * MIO pin configuration defines for Xilinx Zynq 4 + * 5 + * Copyright (C) 2021 Xilinx, Inc. 6 + */ 7 + 8 + #ifndef _DT_BINDINGS_PINCTRL_ZYNQ_H 9 + #define _DT_BINDINGS_PINCTRL_ZYNQ_H 10 + 11 + /* Configuration options for different power supplies */ 12 + #define IO_STANDARD_LVCMOS18 1 13 + #define IO_STANDARD_LVCMOS25 2 14 + #define IO_STANDARD_LVCMOS33 3 15 + #define IO_STANDARD_HSTL 4 16 + 17 + #endif /* _DT_BINDINGS_PINCTRL_ZYNQ_H */
+23
include/dt-bindings/pinctrl/rzg2l-pinctrl.h
··· 1 + /* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */ 2 + /* 3 + * This header provides constants for Renesas RZ/G2L family pinctrl bindings. 4 + * 5 + * Copyright (C) 2021 Renesas Electronics Corp. 6 + * 7 + */ 8 + 9 + #ifndef __DT_BINDINGS_RZG2L_PINCTRL_H 10 + #define __DT_BINDINGS_RZG2L_PINCTRL_H 11 + 12 + #define RZG2L_PINS_PER_PORT 8 13 + 14 + /* 15 + * Create the pin index from its bank and position numbers and store in 16 + * the upper 16 bits the alternate function identifier 17 + */ 18 + #define RZG2L_PORT_PINMUX(b, p, f) ((b) * RZG2L_PINS_PER_PORT + (p) | ((f) << 16)) 19 + 20 + /* Convert a port and pin label to its global pin index */ 21 + #define RZG2L_GPIO(port, pin) ((port) * RZG2L_PINS_PER_PORT + (pin)) 22 + 23 + #endif /* __DT_BINDINGS_RZG2L_PINCTRL_H */