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

Merge tag 'pinctrl-v5.8-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.8 kernel cycle.

It's just really boring this time. Zero core changes. Just linear
development, cleanups and misc noncritical fixes. Some new drivers for
very new Qualcomm and Intel chips.

New drivers:

- Intel Jasper Lake support.

- NXP Freescale i.MX8DXL support.

- Qualcomm SM8250 support.

- Renesas R8A7742 SH-PFC support.

Driver improvements:

- Severe cleanup and modernization of the MCP23s08 driver.

- Mediatek driver modularized.

- Setting config supported in the Meson driver.

- Wakeup support for the Broadcom BCM7211"

* tag 'pinctrl-v5.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: (72 commits)
pinctrl: sprd: Fix the incorrect pull-up definition
pinctrl: pxa: pxa2xx: Remove 'pxa2xx_pinctrl_exit()' which is unused and broken
pinctrl: freescale: imx: Use 'devm_of_iomap()' to avoid a resource leak in case of error in 'imx_pinctrl_probe()'
pinctrl: freescale: imx: Fix an error handling path in 'imx_pinctrl_probe()'
pinctrl: sirf: add missing put_device() call in sirfsoc_gpio_probe()
pinctrl: imxl: Fix an error handling path in 'imx1_pinctrl_core_probe()'
pinctrl: bcm2835: Add support for wake-up interrupts
pinctrl: bcm2835: Match BCM7211 compatible string
dt-bindings: pinctrl: Document optional BCM7211 wake-up interrupts
dt-bindings: pinctrl: Document 7211 compatible for brcm, bcm2835-gpio.txt
dt-bindings: pinctrl: stm32: Add missing interrupts property
pinctrl: at91-pio4: Add COMPILE_TEST support
pinctrl: Fix return value about devm_platform_ioremap_resource()
MAINTAINERS: Renesas Pin Controllers are supported
dt-bindings: pinctrl: ocelot: Add Sparx5 SoC support
pinctrl: ocelot: Fix GPIO interrupt decoding on Jaguar2
pinctrl: ocelot: Remove instance number from pin functions
pinctrl: ocelot: Always register GPIO driver
dt-bindings: pinctrl: rockchip: update example
pinctrl: amd: Add ACPI dependency
...

+4146 -1313
+4 -2
Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt
··· 108 108 Required properties: 109 109 - compatible: Should be one of: 110 110 "fsl,imx8qm-iomuxc", 111 - "fsl,imx8qxp-iomuxc". 111 + "fsl,imx8qxp-iomuxc", 112 + "fsl,imx8dxl-iomuxc". 112 113 113 114 Required properties for Pinctrl sub nodes: 114 115 - fsl,pins: Each entry consists of 3 integers which represents ··· 117 116 integers <pin_id mux_mode> are specified using a 118 117 PIN_FUNC_ID macro, which can be found in 119 118 <dt-bindings/pinctrl/pads-imx8qm.h>, 120 - <dt-bindings/pinctrl/pads-imx8qxp.h>. 119 + <dt-bindings/pinctrl/pads-imx8qxp.h>, 120 + <dt-bindings/pinctrl/pads-imx8dxl.h>. 121 121 The last integer CONFIG is the pad setting value like 122 122 pull-up on this pin. 123 123
+4 -1
Documentation/devicetree/bindings/pinctrl/brcm,bcm2835-gpio.txt
··· 9 9 "brcm,bcm2835-gpio" - BCM2835 compatible pinctrl 10 10 "brcm,bcm7211-gpio" - BCM7211 compatible pinctrl 11 11 "brcm,bcm2711-gpio" - BCM2711 compatible pinctrl 12 + "brcm,bcm7211-gpio" - BCM7211 compatible pinctrl 12 13 - reg: Should contain the physical address of the GPIO module's registers. 13 14 - gpio-controller: Marks the device node as a GPIO controller. 14 15 - #gpio-cells : Should be two. The first cell is the pin number and the 15 16 second cell is used to specify optional parameters: 16 17 - bit 0 specifies polarity (0 for normal, 1 for inverted) 17 18 - interrupts : The interrupt outputs from the controller. One interrupt per 18 - individual bank followed by the "all banks" interrupt. 19 + individual bank followed by the "all banks" interrupt. For BCM7211, an 20 + additional set of per-bank interrupt line and an "all banks" wake-up 21 + interrupt may be specified. 19 22 - interrupt-controller: Marks the device node as an interrupt controller. 20 23 - #interrupt-cells : Should be 2. 21 24 The first cell is the GPIO number.
+2 -2
Documentation/devicetree/bindings/pinctrl/mscc,ocelot-pinctrl.txt
··· 2 2 ---------------------------------------------------- 3 3 4 4 Required properties: 5 - - compatible : Should be "mscc,ocelot-pinctrl" or 6 - "mscc,jaguar2-pinctrl" 5 + - compatible : Should be "mscc,ocelot-pinctrl", 6 + "mscc,jaguar2-pinctrl" or "microchip,sparx5-pinctrl" 7 7 - reg : Address and length of the register set for the device 8 8 - gpio-controller : Indicates this device is a GPIO controller 9 9 - #gpio-cells : Must be 2.
+147
Documentation/devicetree/bindings/pinctrl/qcom,sm8250-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,sm8250-pinctrl.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Qualcomm Technologies, Inc. SM8250 TLMM block 8 + 9 + maintainers: 10 + - Bjorn Andersson <bjorn.andersson@linaro.org> 11 + 12 + description: | 13 + This binding describes the Top Level Mode Multiplexer block found in the 14 + SM8250 platform. 15 + 16 + properties: 17 + compatible: 18 + const: qcom,sm8250-pinctrl 19 + 20 + reg: 21 + minItems: 3 22 + maxItems: 3 23 + 24 + reg-names: 25 + items: 26 + - const: "west" 27 + - const: "south" 28 + - const: "north" 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 + '^.*$': 58 + if: 59 + type: object 60 + then: 61 + properties: 62 + pins: 63 + description: 64 + List of gpio pins affected by the properties specified in this 65 + subnode. 66 + items: 67 + oneOf: 68 + - pattern: "^gpio([0-9]|[1-9][0-9]|1[0-7][0-9])$" 69 + - enum: [ sdc2_clk, sdc2_cmd, sdc2_data, ufs_reset ] 70 + minItems: 1 71 + maxItems: 36 72 + 73 + function: 74 + description: 75 + Specify the alternative function to be configured for the specified 76 + pins. 77 + 78 + enum: [ aoss_cti, atest, audio_ref, cam_mclk, cci_async, cci_i2c, 79 + cci_timer0, cci_timer1, cci_timer2, cci_timer3, cci_timer4, cri_trng, 80 + cri_trng0, cri_trng1, dbg_out, ddr_bist, ddr_pxi0, ddr_pxi1, 81 + ddr_pxi2, ddr_pxi3, dp_hot, dp_lcd, gcc_gp1, gcc_gp2, gcc_gp3, gpio, 82 + ibi_i3c, jitter_bist, lpass_slimbus, mdp_vsync, mdp_vsync0, 83 + mdp_vsync1, mdp_vsync2, mdp_vsync3, mi2s0_data0, mi2s0_data1, 84 + mi2s0_sck, mi2s0_ws, mi2s1_data0, mi2s1_data1, mi2s1_sck, mi2s1_ws, 85 + mi2s2_data0, mi2s2_data1, mi2s2_sck, mi2s2_ws, pci_e0, pci_e1, 86 + pci_e2, phase_flag, pll_bist, pll_bypassnl, pll_clk, pll_reset, 87 + pri_mi2s, prng_rosc, qdss_cti, qdss_gpio, qspi0, qspi1, qspi2, qspi3, 88 + qspi_clk, qspi_cs, qup0, qup1, qup10, qup11, qup12, qup13, qup14, 89 + qup15, qup16, qup17, qup18, qup19, qup2, qup3, qup4, qup5, qup6, 90 + qup7, qup8, qup9, qup_l4, qup_l5, qup_l6, sd_write, sdc40, sdc41, 91 + sdc42, sdc43, sdc4_clk, sdc4_cmd, sec_mi2s, sp_cmu, tgu_ch0, tgu_ch1, 92 + tgu_ch2, tgu_ch3, tsense_pwm1, tsense_pwm2, tsif0_clk, tsif0_data, 93 + tsif0_en, tsif0_error, tsif0_sync, tsif1_clk, tsif1_data, tsif1_en, 94 + tsif1_error, tsif1_sync, usb2phy_ac, usb_phy, vsense_trigger ] 95 + 96 + drive-strength: 97 + enum: [2, 4, 6, 8, 10, 12, 14, 16] 98 + default: 2 99 + description: 100 + Selects the drive strength for the specified pins, in mA. 101 + 102 + bias-pull-down: true 103 + 104 + bias-pull-up: true 105 + 106 + bias-disable: true 107 + 108 + output-high: true 109 + 110 + output-low: true 111 + 112 + required: 113 + - pins 114 + - function 115 + 116 + additionalProperties: false 117 + 118 + required: 119 + - compatible 120 + - reg 121 + - reg-names 122 + - interrupts 123 + - interrupt-controller 124 + - '#interrupt-cells' 125 + - gpio-controller 126 + - '#gpio-cells' 127 + - gpio-ranges 128 + 129 + additionalProperties: false 130 + 131 + examples: 132 + - | 133 + #include <dt-bindings/interrupt-controller/arm-gic.h> 134 + pinctrl@1f00000 { 135 + compatible = "qcom,sm8250-pinctrl"; 136 + reg = <0x0f100000 0x300000>, 137 + <0x0f500000 0x300000>, 138 + <0x0f900000 0x300000>; 139 + reg-names = "west", "south", "north"; 140 + interrupts = <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>; 141 + gpio-controller; 142 + #gpio-cells = <2>; 143 + interrupt-controller; 144 + #interrupt-cells = <2>; 145 + gpio-ranges = <&tlmm 0 0 180>; 146 + wakeup-parent = <&pdc>; 147 + };
+1
Documentation/devicetree/bindings/pinctrl/renesas,pfc-pinctrl.txt
··· 13 13 - "renesas,pfc-emev2": for EMEV2 (EMMA Mobile EV2) compatible pin-controller. 14 14 - "renesas,pfc-r8a73a4": for R8A73A4 (R-Mobile APE6) compatible pin-controller. 15 15 - "renesas,pfc-r8a7740": for R8A7740 (R-Mobile A1) compatible pin-controller. 16 + - "renesas,pfc-r8a7742": for R8A7742 (RZ/G1H) compatible pin-controller. 16 17 - "renesas,pfc-r8a7743": for R8A7743 (RZ/G1M) compatible pin-controller. 17 18 - "renesas,pfc-r8a7744": for R8A7744 (RZ/G1N) compatible pin-controller. 18 19 - "renesas,pfc-r8a7745": for R8A7745 (RZ/G1E) compatible pin-controller.
+2 -2
Documentation/devicetree/bindings/pinctrl/rockchip,pinctrl.txt
··· 110 110 111 111 uart2 { 112 112 uart2_xfer: uart2-xfer { 113 - rockchip,pins = <RK_GPIO1 8 1 &pcfg_pull_default>, 114 - <RK_GPIO1 9 1 &pcfg_pull_default>; 113 + rockchip,pins = <1 RK_PB0 1 &pcfg_pull_default>, 114 + <1 RK_PB1 1 &pcfg_pull_default>; 115 115 }; 116 116 }; 117 117 };
+3
Documentation/devicetree/bindings/pinctrl/st,stm32-pinctrl.yaml
··· 36 36 pins-are-numbered: true 37 37 hwlocks: true 38 38 39 + interrupts: 40 + maxItems: 1 41 + 39 42 st,syscfg: 40 43 description: Should be phandle/offset/mask 41 44 - Phandle to the syscon node which includes IRQ mux selection.
+2 -1
MAINTAINERS
··· 13496 13496 PIN CONTROLLER - RENESAS 13497 13497 M: Geert Uytterhoeven <geert+renesas@glider.be> 13498 13498 L: linux-renesas-soc@vger.kernel.org 13499 - S: Maintained 13499 + S: Supported 13500 13500 T: git git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers.git sh-pfc 13501 + F: Documentation/devicetree/bindings/pinctrl/renesas,* 13501 13502 F: drivers/pinctrl/pinctrl-rz* 13502 13503 F: drivers/pinctrl/sh-pfc/ 13503 13504
+13 -4
drivers/pinctrl/Kconfig
··· 82 82 config PINCTRL_AT91PIO4 83 83 bool "AT91 PIO4 pinctrl driver" 84 84 depends on OF 85 - depends on ARCH_AT91 85 + depends on ARCH_AT91 || COMPILE_TEST 86 86 select PINMUX 87 87 select GENERIC_PINCONF 88 88 select GPIOLIB ··· 95 95 config PINCTRL_AMD 96 96 tristate "AMD GPIO pin control" 97 97 depends on HAS_IOMEM 98 + depends on ACPI || COMPILE_TEST 98 99 select GPIOLIB 99 100 select GPIOLIB_IRQCHIP 100 101 select PINMUX ··· 173 172 select GENERIC_PINCONF 174 173 select MFD_SYSCON 175 174 175 + config PINCTRL_MCP23S08_I2C 176 + tristate 177 + select REGMAP_I2C 178 + 179 + config PINCTRL_MCP23S08_SPI 180 + tristate 181 + select REGMAP_SPI 182 + 176 183 config PINCTRL_MCP23S08 177 184 tristate "Microchip MCP23xxx I/O expander" 178 185 depends on SPI_MASTER || I2C 179 - depends on I2C || I2C=n 180 186 select GPIOLIB 181 187 select GPIOLIB_IRQCHIP 182 - select REGMAP_I2C if I2C 183 - select REGMAP_SPI if SPI_MASTER 184 188 select GENERIC_PINCONF 189 + select PINCTRL_MCP23S08_I2C if I2C 190 + select PINCTRL_MCP23S08_SPI if SPI_MASTER 185 191 help 186 192 SPI/I2C driver for Microchip MCP23S08 / MCP23S17 / MCP23S18 / 187 193 MCP23008 / MCP23017 / MCP23018 I/O expanders. ··· 443 435 config PINCTRL_EQUILIBRIUM 444 436 tristate "Generic pinctrl and GPIO driver for Intel Lightning Mountain SoC" 445 437 depends on OF && HAS_IOMEM 438 + depends on X86 || COMPILE_TEST 446 439 select PINMUX 447 440 select PINCONF 448 441 select GPIOLIB
+2
drivers/pinctrl/Makefile
··· 21 21 obj-$(CONFIG_PINCTRL_FALCON) += pinctrl-falcon.o 22 22 obj-$(CONFIG_PINCTRL_GEMINI) += pinctrl-gemini.o 23 23 obj-$(CONFIG_PINCTRL_MAX77620) += pinctrl-max77620.o 24 + obj-$(CONFIG_PINCTRL_MCP23S08_I2C) += pinctrl-mcp23s08_i2c.o 25 + obj-$(CONFIG_PINCTRL_MCP23S08_SPI) += pinctrl-mcp23s08_spi.o 24 26 obj-$(CONFIG_PINCTRL_MCP23S08) += pinctrl-mcp23s08.o 25 27 obj-$(CONFIG_PINCTRL_MESON) += meson/ 26 28 obj-$(CONFIG_PINCTRL_OXNAS) += pinctrl-oxnas.o
+1 -1
drivers/pinctrl/bcm/pinctrl-bcm281xx.c
··· 1406 1406 pdata->reg_base = devm_platform_ioremap_resource(pdev, 0); 1407 1407 if (IS_ERR(pdata->reg_base)) { 1408 1408 dev_err(&pdev->dev, "Failed to ioremap MEM resource\n"); 1409 - return -ENODEV; 1409 + return PTR_ERR(pdata->reg_base); 1410 1410 } 1411 1411 1412 1412 /* Initialize the dynamic part of pinctrl_desc */
+79 -1
drivers/pinctrl/bcm/pinctrl-bcm2835.c
··· 19 19 #include <linux/irq.h> 20 20 #include <linux/irqdesc.h> 21 21 #include <linux/init.h> 22 + #include <linux/interrupt.h> 22 23 #include <linux/of_address.h> 23 24 #include <linux/of.h> 24 25 #include <linux/of_irq.h> ··· 77 76 struct bcm2835_pinctrl { 78 77 struct device *dev; 79 78 void __iomem *base; 79 + int *wake_irq; 80 80 81 81 /* note: locking assumes each bank will have its own unsigned long */ 82 82 unsigned long enabled_irq_map[BCM2835_NUM_BANKS]; ··· 437 435 chained_irq_exit(host_chip, desc); 438 436 } 439 437 438 + static irqreturn_t bcm2835_gpio_wake_irq_handler(int irq, void *dev_id) 439 + { 440 + return IRQ_HANDLED; 441 + } 442 + 440 443 static inline void __bcm2835_gpio_irq_config(struct bcm2835_pinctrl *pc, 441 444 unsigned reg, unsigned offset, bool enable) 442 445 { ··· 641 634 bcm2835_gpio_set_bit(pc, GPEDS0, gpio); 642 635 } 643 636 637 + static int bcm2835_gpio_irq_set_wake(struct irq_data *data, unsigned int on) 638 + { 639 + struct gpio_chip *chip = irq_data_get_irq_chip_data(data); 640 + struct bcm2835_pinctrl *pc = gpiochip_get_data(chip); 641 + unsigned gpio = irqd_to_hwirq(data); 642 + unsigned int irqgroup; 643 + int ret = -EINVAL; 644 + 645 + if (!pc->wake_irq) 646 + return ret; 647 + 648 + if (gpio <= 27) 649 + irqgroup = 0; 650 + else if (gpio >= 28 && gpio <= 45) 651 + irqgroup = 1; 652 + else if (gpio >= 46 && gpio <= 57) 653 + irqgroup = 2; 654 + else 655 + return ret; 656 + 657 + if (on) 658 + ret = enable_irq_wake(pc->wake_irq[irqgroup]); 659 + else 660 + ret = disable_irq_wake(pc->wake_irq[irqgroup]); 661 + 662 + return ret; 663 + } 664 + 644 665 static struct irq_chip bcm2835_gpio_irq_chip = { 645 666 .name = MODULE_NAME, 646 667 .irq_enable = bcm2835_gpio_irq_enable, ··· 677 642 .irq_ack = bcm2835_gpio_irq_ack, 678 643 .irq_mask = bcm2835_gpio_irq_disable, 679 644 .irq_unmask = bcm2835_gpio_irq_enable, 645 + .irq_set_wake = bcm2835_gpio_irq_set_wake, 646 + .flags = IRQCHIP_MASK_ON_SUSPEND, 680 647 }; 681 648 682 649 static int bcm2835_pctl_get_groups_count(struct pinctrl_dev *pctldev) ··· 1174 1137 .compatible = "brcm,bcm2711-gpio", 1175 1138 .data = &bcm2711_plat_data, 1176 1139 }, 1140 + { 1141 + .compatible = "brcm,bcm7211-gpio", 1142 + .data = &bcm2711_plat_data, 1143 + }, 1177 1144 {} 1178 1145 }; 1179 1146 ··· 1191 1150 struct resource iomem; 1192 1151 int err, i; 1193 1152 const struct of_device_id *match; 1153 + int is_7211 = 0; 1194 1154 1195 1155 BUILD_BUG_ON(ARRAY_SIZE(bcm2835_gpio_pins) != BCM2711_NUM_GPIOS); 1196 1156 BUILD_BUG_ON(ARRAY_SIZE(bcm2835_gpio_groups) != BCM2711_NUM_GPIOS); ··· 1218 1176 return -EINVAL; 1219 1177 1220 1178 pdata = match->data; 1179 + is_7211 = of_device_is_compatible(np, "brcm,bcm7211-gpio"); 1221 1180 1222 1181 pc->gpio_chip = *pdata->gpio_chip; 1223 1182 pc->gpio_chip.parent = dev; ··· 1253 1210 GFP_KERNEL); 1254 1211 if (!girq->parents) 1255 1212 return -ENOMEM; 1213 + 1214 + if (is_7211) { 1215 + pc->wake_irq = devm_kcalloc(dev, BCM2835_NUM_IRQS, 1216 + sizeof(*pc->wake_irq), 1217 + GFP_KERNEL); 1218 + if (!pc->wake_irq) 1219 + return -ENOMEM; 1220 + } 1221 + 1256 1222 /* 1257 1223 * Use the same handler for all groups: this is necessary 1258 1224 * since we use one gpiochip to cover all lines - the ··· 1269 1217 * bank that was firing the IRQ and look up the per-group 1270 1218 * and bank data. 1271 1219 */ 1272 - for (i = 0; i < BCM2835_NUM_IRQS; i++) 1220 + for (i = 0; i < BCM2835_NUM_IRQS; i++) { 1221 + int len; 1222 + char *name; 1223 + 1273 1224 girq->parents[i] = irq_of_parse_and_map(np, i); 1225 + if (!is_7211) 1226 + continue; 1227 + 1228 + /* Skip over the all banks interrupts */ 1229 + pc->wake_irq[i] = irq_of_parse_and_map(np, i + 1230 + BCM2835_NUM_IRQS + 1); 1231 + 1232 + len = strlen(dev_name(pc->dev)) + 16; 1233 + name = devm_kzalloc(pc->dev, len, GFP_KERNEL); 1234 + if (!name) 1235 + return -ENOMEM; 1236 + 1237 + snprintf(name, len, "%s:bank%d", dev_name(pc->dev), i); 1238 + 1239 + /* These are optional interrupts */ 1240 + err = devm_request_irq(dev, pc->wake_irq[i], 1241 + bcm2835_gpio_wake_irq_handler, 1242 + IRQF_SHARED, name, pc); 1243 + if (err) 1244 + dev_warn(dev, "unable to request wake IRQ %d\n", 1245 + pc->wake_irq[i]); 1246 + } 1247 + 1274 1248 girq->default_type = IRQ_TYPE_NONE; 1275 1249 girq->handler = handle_level_irq; 1276 1250
+7
drivers/pinctrl/freescale/Kconfig
··· 165 165 help 166 166 Say Y here to enable the imx8qxp pinctrl driver 167 167 168 + config PINCTRL_IMX8DXL 169 + bool "IMX8DXL pinctrl driver" 170 + depends on IMX_SCU && ARCH_MXC && ARM64 171 + select PINCTRL_IMX_SCU 172 + help 173 + Say Y here to enable the imx8dxl pinctrl driver 174 + 168 175 config PINCTRL_VF610 169 176 bool "Freescale Vybrid VF610 pinctrl driver" 170 177 depends on SOC_VF610
+1
drivers/pinctrl/freescale/Makefile
··· 24 24 obj-$(CONFIG_PINCTRL_IMX8MQ) += pinctrl-imx8mq.o 25 25 obj-$(CONFIG_PINCTRL_IMX8QM) += pinctrl-imx8qm.o 26 26 obj-$(CONFIG_PINCTRL_IMX8QXP) += pinctrl-imx8qxp.o 27 + obj-$(CONFIG_PINCTRL_IMX8DXL) += pinctrl-imx8dxl.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
+6 -20
drivers/pinctrl/freescale/pinctrl-imx.c
··· 774 774 return 0; 775 775 } 776 776 777 - /* 778 - * imx_free_resources() - free memory used by this driver 779 - * @info: info driver instance 780 - */ 781 - static void imx_free_resources(struct imx_pinctrl *ipctl) 782 - { 783 - if (ipctl->pctl) 784 - pinctrl_unregister(ipctl->pctl); 785 - } 786 - 787 777 int imx_pinctrl_probe(struct platform_device *pdev, 788 778 const struct imx_pinctrl_soc_info *info) 789 779 { ··· 824 834 return -EINVAL; 825 835 } 826 836 827 - ipctl->input_sel_base = of_iomap(np, 0); 837 + ipctl->input_sel_base = devm_of_iomap(&pdev->dev, np, 838 + 0, NULL); 828 839 of_node_put(np); 829 - if (!ipctl->input_sel_base) { 840 + if (IS_ERR(ipctl->input_sel_base)) { 830 841 dev_err(&pdev->dev, 831 842 "iomuxc input select base address not found\n"); 832 - return -ENOMEM; 843 + return PTR_ERR(ipctl->input_sel_base); 833 844 } 834 845 } 835 846 } ··· 865 874 &ipctl->pctl); 866 875 if (ret) { 867 876 dev_err(&pdev->dev, "could not register IMX pinctrl driver\n"); 868 - goto free; 877 + return ret; 869 878 } 870 879 871 880 ret = imx_pinctrl_probe_dt(pdev, ipctl); 872 881 if (ret) { 873 882 dev_err(&pdev->dev, "fail to probe dt properties\n"); 874 - goto free; 883 + return ret; 875 884 } 876 885 877 886 dev_info(&pdev->dev, "initialized IMX pinctrl driver\n"); 878 887 879 888 return pinctrl_enable(ipctl->pctl); 880 - 881 - free: 882 - imx_free_resources(ipctl); 883 - 884 - return ret; 885 889 } 886 890 887 891 static int __maybe_unused imx_pinctrl_suspend(struct device *dev)
+1 -2
drivers/pinctrl/freescale/pinctrl-imx1-core.c
··· 60 60 61 61 /* 62 62 * IMX1 IOMUXC manages the pins based on ports. Each port has 32 pins. IOMUX 63 - * control register are seperated into function, output configuration, input 63 + * control registers are separated into function, output configuration, input 64 64 * configuration A, input configuration B, GPIO in use and data direction. 65 65 * 66 66 * Those controls that are represented by 1 bit have a direct mapping between ··· 638 638 639 639 ret = of_platform_populate(pdev->dev.of_node, NULL, NULL, &pdev->dev); 640 640 if (ret) { 641 - pinctrl_unregister(ipctl->pctl); 642 641 dev_err(&pdev->dev, "Failed to populate subdevices\n"); 643 642 return ret; 644 643 }
+193
drivers/pinctrl/freescale/pinctrl-imx8dxl.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 2 + /* 3 + * Copyright 2019~2020 NXP 4 + */ 5 + 6 + #include <dt-bindings/pinctrl/pads-imx8dxl.h> 7 + #include <linux/err.h> 8 + #include <linux/firmware/imx/sci.h> 9 + #include <linux/init.h> 10 + #include <linux/io.h> 11 + #include <linux/module.h> 12 + #include <linux/of.h> 13 + #include <linux/of_device.h> 14 + #include <linux/pinctrl/pinctrl.h> 15 + 16 + #include "pinctrl-imx.h" 17 + 18 + static const struct pinctrl_pin_desc imx8dxl_pinctrl_pads[] = { 19 + IMX_PINCTRL_PIN(IMX8DXL_PCIE_CTRL0_PERST_B), 20 + IMX_PINCTRL_PIN(IMX8DXL_PCIE_CTRL0_CLKREQ_B), 21 + IMX_PINCTRL_PIN(IMX8DXL_PCIE_CTRL0_WAKE_B), 22 + IMX_PINCTRL_PIN(IMX8DXL_COMP_CTL_GPIO_1V8_3V3_PCIESEP), 23 + IMX_PINCTRL_PIN(IMX8DXL_USB_SS3_TC0), 24 + IMX_PINCTRL_PIN(IMX8DXL_USB_SS3_TC1), 25 + IMX_PINCTRL_PIN(IMX8DXL_USB_SS3_TC2), 26 + IMX_PINCTRL_PIN(IMX8DXL_USB_SS3_TC3), 27 + IMX_PINCTRL_PIN(IMX8DXL_COMP_CTL_GPIO_3V3_USB3IO), 28 + IMX_PINCTRL_PIN(IMX8DXL_EMMC0_CLK), 29 + IMX_PINCTRL_PIN(IMX8DXL_EMMC0_CMD), 30 + IMX_PINCTRL_PIN(IMX8DXL_EMMC0_DATA0), 31 + IMX_PINCTRL_PIN(IMX8DXL_EMMC0_DATA1), 32 + IMX_PINCTRL_PIN(IMX8DXL_EMMC0_DATA2), 33 + IMX_PINCTRL_PIN(IMX8DXL_EMMC0_DATA3), 34 + IMX_PINCTRL_PIN(IMX8DXL_EMMC0_DATA4), 35 + IMX_PINCTRL_PIN(IMX8DXL_EMMC0_DATA5), 36 + IMX_PINCTRL_PIN(IMX8DXL_EMMC0_DATA6), 37 + IMX_PINCTRL_PIN(IMX8DXL_EMMC0_DATA7), 38 + IMX_PINCTRL_PIN(IMX8DXL_EMMC0_STROBE), 39 + IMX_PINCTRL_PIN(IMX8DXL_EMMC0_RESET_B), 40 + IMX_PINCTRL_PIN(IMX8DXL_COMP_CTL_GPIO_1V8_3V3_SD1FIX0), 41 + IMX_PINCTRL_PIN(IMX8DXL_USDHC1_RESET_B), 42 + IMX_PINCTRL_PIN(IMX8DXL_USDHC1_VSELECT), 43 + IMX_PINCTRL_PIN(IMX8DXL_CTL_NAND_RE_P_N), 44 + IMX_PINCTRL_PIN(IMX8DXL_USDHC1_WP), 45 + IMX_PINCTRL_PIN(IMX8DXL_USDHC1_CD_B), 46 + IMX_PINCTRL_PIN(IMX8DXL_CTL_NAND_DQS_P_N), 47 + IMX_PINCTRL_PIN(IMX8DXL_COMP_CTL_GPIO_1V8_3V3_VSELSEP), 48 + IMX_PINCTRL_PIN(IMX8DXL_ENET0_RGMII_TXC), 49 + IMX_PINCTRL_PIN(IMX8DXL_ENET0_RGMII_TX_CTL), 50 + IMX_PINCTRL_PIN(IMX8DXL_ENET0_RGMII_TXD0), 51 + IMX_PINCTRL_PIN(IMX8DXL_ENET0_RGMII_TXD1), 52 + IMX_PINCTRL_PIN(IMX8DXL_ENET0_RGMII_TXD2), 53 + IMX_PINCTRL_PIN(IMX8DXL_ENET0_RGMII_TXD3), 54 + IMX_PINCTRL_PIN(IMX8DXL_COMP_CTL_GPIO_1V8_3V3_ENET_ENETB0), 55 + IMX_PINCTRL_PIN(IMX8DXL_ENET0_RGMII_RXC), 56 + IMX_PINCTRL_PIN(IMX8DXL_ENET0_RGMII_RX_CTL), 57 + IMX_PINCTRL_PIN(IMX8DXL_ENET0_RGMII_RXD0), 58 + IMX_PINCTRL_PIN(IMX8DXL_ENET0_RGMII_RXD1), 59 + IMX_PINCTRL_PIN(IMX8DXL_ENET0_RGMII_RXD2), 60 + IMX_PINCTRL_PIN(IMX8DXL_ENET0_RGMII_RXD3), 61 + IMX_PINCTRL_PIN(IMX8DXL_COMP_CTL_GPIO_1V8_3V3_ENET_ENETB1), 62 + IMX_PINCTRL_PIN(IMX8DXL_ENET0_REFCLK_125M_25M), 63 + IMX_PINCTRL_PIN(IMX8DXL_ENET0_MDIO), 64 + IMX_PINCTRL_PIN(IMX8DXL_ENET0_MDC), 65 + IMX_PINCTRL_PIN(IMX8DXL_COMP_CTL_GPIO_1V8_3V3_GPIOCT), 66 + IMX_PINCTRL_PIN(IMX8DXL_ENET1_RGMII_TXC), 67 + IMX_PINCTRL_PIN(IMX8DXL_ENET1_RGMII_TXD2), 68 + IMX_PINCTRL_PIN(IMX8DXL_ENET1_RGMII_TX_CTL), 69 + IMX_PINCTRL_PIN(IMX8DXL_ENET1_RGMII_TXD3), 70 + IMX_PINCTRL_PIN(IMX8DXL_ENET1_RGMII_RXC), 71 + IMX_PINCTRL_PIN(IMX8DXL_ENET1_RGMII_RXD3), 72 + IMX_PINCTRL_PIN(IMX8DXL_ENET1_RGMII_RXD2), 73 + IMX_PINCTRL_PIN(IMX8DXL_ENET1_RGMII_RXD1), 74 + IMX_PINCTRL_PIN(IMX8DXL_ENET1_RGMII_TXD0), 75 + IMX_PINCTRL_PIN(IMX8DXL_ENET1_RGMII_TXD1), 76 + IMX_PINCTRL_PIN(IMX8DXL_ENET1_RGMII_RXD0), 77 + IMX_PINCTRL_PIN(IMX8DXL_ENET1_RGMII_RX_CTL), 78 + IMX_PINCTRL_PIN(IMX8DXL_ENET1_REFCLK_125M_25M), 79 + IMX_PINCTRL_PIN(IMX8DXL_COMP_CTL_GPIO_1V8_3V3_GPIORHB), 80 + IMX_PINCTRL_PIN(IMX8DXL_SPI3_SCK), 81 + IMX_PINCTRL_PIN(IMX8DXL_SPI3_SDO), 82 + IMX_PINCTRL_PIN(IMX8DXL_SPI3_SDI), 83 + IMX_PINCTRL_PIN(IMX8DXL_SPI3_CS0), 84 + IMX_PINCTRL_PIN(IMX8DXL_SPI3_CS1), 85 + IMX_PINCTRL_PIN(IMX8DXL_MCLK_IN1), 86 + IMX_PINCTRL_PIN(IMX8DXL_MCLK_IN0), 87 + IMX_PINCTRL_PIN(IMX8DXL_MCLK_OUT0), 88 + IMX_PINCTRL_PIN(IMX8DXL_UART1_TX), 89 + IMX_PINCTRL_PIN(IMX8DXL_UART1_RX), 90 + IMX_PINCTRL_PIN(IMX8DXL_UART1_RTS_B), 91 + IMX_PINCTRL_PIN(IMX8DXL_UART1_CTS_B), 92 + IMX_PINCTRL_PIN(IMX8DXL_COMP_CTL_GPIO_1V8_3V3_GPIORHK), 93 + IMX_PINCTRL_PIN(IMX8DXL_SPI0_SCK), 94 + IMX_PINCTRL_PIN(IMX8DXL_SPI0_SDI), 95 + IMX_PINCTRL_PIN(IMX8DXL_SPI0_SDO), 96 + IMX_PINCTRL_PIN(IMX8DXL_SPI0_CS1), 97 + IMX_PINCTRL_PIN(IMX8DXL_SPI0_CS0), 98 + IMX_PINCTRL_PIN(IMX8DXL_COMP_CTL_GPIO_1V8_3V3_GPIORHT), 99 + IMX_PINCTRL_PIN(IMX8DXL_ADC_IN1), 100 + IMX_PINCTRL_PIN(IMX8DXL_ADC_IN0), 101 + IMX_PINCTRL_PIN(IMX8DXL_ADC_IN3), 102 + IMX_PINCTRL_PIN(IMX8DXL_ADC_IN2), 103 + IMX_PINCTRL_PIN(IMX8DXL_ADC_IN5), 104 + IMX_PINCTRL_PIN(IMX8DXL_ADC_IN4), 105 + IMX_PINCTRL_PIN(IMX8DXL_FLEXCAN0_RX), 106 + IMX_PINCTRL_PIN(IMX8DXL_FLEXCAN0_TX), 107 + IMX_PINCTRL_PIN(IMX8DXL_FLEXCAN1_RX), 108 + IMX_PINCTRL_PIN(IMX8DXL_FLEXCAN1_TX), 109 + IMX_PINCTRL_PIN(IMX8DXL_FLEXCAN2_RX), 110 + IMX_PINCTRL_PIN(IMX8DXL_FLEXCAN2_TX), 111 + IMX_PINCTRL_PIN(IMX8DXL_UART0_RX), 112 + IMX_PINCTRL_PIN(IMX8DXL_UART0_TX), 113 + IMX_PINCTRL_PIN(IMX8DXL_UART2_TX), 114 + IMX_PINCTRL_PIN(IMX8DXL_UART2_RX), 115 + IMX_PINCTRL_PIN(IMX8DXL_COMP_CTL_GPIO_1V8_3V3_GPIOLH), 116 + IMX_PINCTRL_PIN(IMX8DXL_JTAG_TRST_B), 117 + IMX_PINCTRL_PIN(IMX8DXL_PMIC_I2C_SCL), 118 + IMX_PINCTRL_PIN(IMX8DXL_PMIC_I2C_SDA), 119 + IMX_PINCTRL_PIN(IMX8DXL_PMIC_INT_B), 120 + IMX_PINCTRL_PIN(IMX8DXL_SCU_GPIO0_00), 121 + IMX_PINCTRL_PIN(IMX8DXL_SCU_GPIO0_01), 122 + IMX_PINCTRL_PIN(IMX8DXL_SCU_PMIC_STANDBY), 123 + IMX_PINCTRL_PIN(IMX8DXL_SCU_BOOT_MODE1), 124 + IMX_PINCTRL_PIN(IMX8DXL_SCU_BOOT_MODE0), 125 + IMX_PINCTRL_PIN(IMX8DXL_SCU_BOOT_MODE2), 126 + IMX_PINCTRL_PIN(IMX8DXL_SNVS_TAMPER_OUT1), 127 + IMX_PINCTRL_PIN(IMX8DXL_SNVS_TAMPER_OUT2), 128 + IMX_PINCTRL_PIN(IMX8DXL_SNVS_TAMPER_OUT3), 129 + IMX_PINCTRL_PIN(IMX8DXL_SNVS_TAMPER_OUT4), 130 + IMX_PINCTRL_PIN(IMX8DXL_SNVS_TAMPER_IN0), 131 + IMX_PINCTRL_PIN(IMX8DXL_SNVS_TAMPER_IN1), 132 + IMX_PINCTRL_PIN(IMX8DXL_SNVS_TAMPER_IN2), 133 + IMX_PINCTRL_PIN(IMX8DXL_SNVS_TAMPER_IN3), 134 + IMX_PINCTRL_PIN(IMX8DXL_SPI1_SCK), 135 + IMX_PINCTRL_PIN(IMX8DXL_SPI1_SDO), 136 + IMX_PINCTRL_PIN(IMX8DXL_SPI1_SDI), 137 + IMX_PINCTRL_PIN(IMX8DXL_SPI1_CS0), 138 + IMX_PINCTRL_PIN(IMX8DXL_COMP_CTL_GPIO_1V8_3V3_GPIORHD), 139 + IMX_PINCTRL_PIN(IMX8DXL_QSPI0A_DATA1), 140 + IMX_PINCTRL_PIN(IMX8DXL_QSPI0A_DATA0), 141 + IMX_PINCTRL_PIN(IMX8DXL_QSPI0A_DATA3), 142 + IMX_PINCTRL_PIN(IMX8DXL_QSPI0A_DATA2), 143 + IMX_PINCTRL_PIN(IMX8DXL_QSPI0A_SS0_B), 144 + IMX_PINCTRL_PIN(IMX8DXL_QSPI0A_DQS), 145 + IMX_PINCTRL_PIN(IMX8DXL_QSPI0A_SCLK), 146 + IMX_PINCTRL_PIN(IMX8DXL_COMP_CTL_GPIO_1V8_3V3_QSPI0A), 147 + IMX_PINCTRL_PIN(IMX8DXL_QSPI0B_SCLK), 148 + IMX_PINCTRL_PIN(IMX8DXL_QSPI0B_DQS), 149 + IMX_PINCTRL_PIN(IMX8DXL_QSPI0B_DATA1), 150 + IMX_PINCTRL_PIN(IMX8DXL_QSPI0B_DATA0), 151 + IMX_PINCTRL_PIN(IMX8DXL_QSPI0B_DATA3), 152 + IMX_PINCTRL_PIN(IMX8DXL_QSPI0B_DATA2), 153 + IMX_PINCTRL_PIN(IMX8DXL_QSPI0B_SS0_B), 154 + IMX_PINCTRL_PIN(IMX8DXL_COMP_CTL_GPIO_1V8_3V3_QSPI0B) 155 + }; 156 + 157 + 158 + static struct imx_pinctrl_soc_info imx8dxl_pinctrl_info = { 159 + .pins = imx8dxl_pinctrl_pads, 160 + .npins = ARRAY_SIZE(imx8dxl_pinctrl_pads), 161 + .flags = IMX_USE_SCU, 162 + }; 163 + 164 + static const struct of_device_id imx8dxl_pinctrl_of_match[] = { 165 + { .compatible = "fsl,imx8dxl-iomuxc", }, 166 + { /* sentinel */ } 167 + }; 168 + 169 + static int imx8dxl_pinctrl_probe(struct platform_device *pdev) 170 + { 171 + int ret; 172 + 173 + ret = imx_pinctrl_sc_ipc_init(pdev); 174 + if (ret) 175 + return ret; 176 + 177 + return imx_pinctrl_probe(pdev, &imx8dxl_pinctrl_info); 178 + } 179 + 180 + static struct platform_driver imx8dxl_pinctrl_driver = { 181 + .driver = { 182 + .name = "fsl,imx8dxl-iomuxc", 183 + .of_match_table = of_match_ptr(imx8dxl_pinctrl_of_match), 184 + .suppress_bind_attrs = true, 185 + }, 186 + .probe = imx8dxl_pinctrl_probe, 187 + }; 188 + 189 + static int __init imx8dxl_pinctrl_init(void) 190 + { 191 + return platform_driver_register(&imx8dxl_pinctrl_driver); 192 + } 193 + arch_initcall(imx8dxl_pinctrl_init);
+8
drivers/pinctrl/intel/Kconfig
··· 111 111 This pinctrl driver provides an interface that allows configuring 112 112 of Intel Ice Lake PCH pins and using them as GPIOs. 113 113 114 + config PINCTRL_JASPERLAKE 115 + tristate "Intel Jasper Lake PCH pinctrl and GPIO driver" 116 + depends on ACPI 117 + select PINCTRL_INTEL 118 + help 119 + This pinctrl driver provides an interface that allows configuring 120 + of Intel Jasper Lake PCH pins and using them as GPIOs. 121 + 114 122 config PINCTRL_LEWISBURG 115 123 tristate "Intel Lewisburg pinctrl and GPIO driver" 116 124 depends on ACPI
+1
drivers/pinctrl/intel/Makefile
··· 12 12 obj-$(CONFIG_PINCTRL_DENVERTON) += pinctrl-denverton.o 13 13 obj-$(CONFIG_PINCTRL_GEMINILAKE) += pinctrl-geminilake.o 14 14 obj-$(CONFIG_PINCTRL_ICELAKE) += pinctrl-icelake.o 15 + obj-$(CONFIG_PINCTRL_JASPERLAKE) += pinctrl-jasperlake.o 15 16 obj-$(CONFIG_PINCTRL_LEWISBURG) += pinctrl-lewisburg.o 16 17 obj-$(CONFIG_PINCTRL_SUNRISEPOINT) += pinctrl-sunrisepoint.o 17 18 obj-$(CONFIG_PINCTRL_TIGERLAKE) += pinctrl-tigerlake.o
+4 -5
drivers/pinctrl/intel/pinctrl-baytrail.c
··· 1506 1506 { 1507 1507 struct platform_device *pdev = to_platform_device(vg->dev); 1508 1508 struct gpio_chip *gc; 1509 - struct resource *irq_rc; 1510 - int ret; 1509 + int irq, ret; 1511 1510 1512 1511 /* Set up gpio chip */ 1513 1512 vg->chip = byt_gpio_chip; ··· 1526 1527 #endif 1527 1528 1528 1529 /* set up interrupts */ 1529 - irq_rc = platform_get_resource(pdev, IORESOURCE_IRQ, 0); 1530 - if (irq_rc && irq_rc->start) { 1530 + irq = platform_get_irq_optional(pdev, 0); 1531 + if (irq > 0) { 1531 1532 struct gpio_irq_chip *girq; 1532 1533 1533 1534 vg->irqchip.name = "BYT-GPIO", ··· 1547 1548 sizeof(*girq->parents), GFP_KERNEL); 1548 1549 if (!girq->parents) 1549 1550 return -ENOMEM; 1550 - girq->parents[0] = (unsigned int)irq_rc->start; 1551 + girq->parents[0] = irq; 1551 1552 girq->default_type = IRQ_TYPE_NONE; 1552 1553 girq->handler = handle_bad_irq; 1553 1554 }
+28 -30
drivers/pinctrl/intel/pinctrl-cannonlake.c
··· 30 30 .gpio_base = (g), \ 31 31 } 32 32 33 - #define CNL_NO_GPIO -1 34 - 35 33 #define CNL_COMMUNITY(b, s, e, o, g) \ 36 34 { \ 37 35 .barno = (b), \ ··· 375 377 }; 376 378 377 379 static const struct intel_padgroup cnlh_community1_gpps[] = { 378 - CNL_GPP(0, 51, 74, 64), /* GPP_C */ 379 - CNL_GPP(1, 75, 98, 96), /* GPP_D */ 380 - CNL_GPP(2, 99, 106, 128), /* GPP_G */ 381 - CNL_GPP(3, 107, 114, CNL_NO_GPIO), /* AZA */ 382 - CNL_GPP(4, 115, 146, 160), /* vGPIO_0 */ 383 - CNL_GPP(5, 147, 154, CNL_NO_GPIO), /* vGPIO_1 */ 380 + CNL_GPP(0, 51, 74, 64), /* GPP_C */ 381 + CNL_GPP(1, 75, 98, 96), /* GPP_D */ 382 + CNL_GPP(2, 99, 106, 128), /* GPP_G */ 383 + CNL_GPP(3, 107, 114, INTEL_GPIO_BASE_NOMAP), /* AZA */ 384 + CNL_GPP(4, 115, 146, 160), /* vGPIO_0 */ 385 + CNL_GPP(5, 147, 154, INTEL_GPIO_BASE_NOMAP), /* vGPIO_1 */ 384 386 }; 385 387 386 388 static const struct intel_padgroup cnlh_community3_gpps[] = { 387 - CNL_GPP(0, 155, 178, 192), /* GPP_K */ 388 - CNL_GPP(1, 179, 202, 224), /* GPP_H */ 389 - CNL_GPP(2, 203, 215, 256), /* GPP_E */ 390 - CNL_GPP(3, 216, 239, 288), /* GPP_F */ 391 - CNL_GPP(4, 240, 248, CNL_NO_GPIO), /* SPI */ 389 + CNL_GPP(0, 155, 178, 192), /* GPP_K */ 390 + CNL_GPP(1, 179, 202, 224), /* GPP_H */ 391 + CNL_GPP(2, 203, 215, 256), /* GPP_E */ 392 + CNL_GPP(3, 216, 239, 288), /* GPP_F */ 393 + CNL_GPP(4, 240, 248, INTEL_GPIO_BASE_NOMAP), /* SPI */ 392 394 }; 393 395 394 396 static const struct intel_padgroup cnlh_community4_gpps[] = { 395 - CNL_GPP(0, 249, 259, CNL_NO_GPIO), /* CPU */ 396 - CNL_GPP(1, 260, 268, CNL_NO_GPIO), /* JTAG */ 397 - CNL_GPP(2, 269, 286, 320), /* GPP_I */ 398 - CNL_GPP(3, 287, 298, 352), /* GPP_J */ 397 + CNL_GPP(0, 249, 259, INTEL_GPIO_BASE_NOMAP), /* CPU */ 398 + CNL_GPP(1, 260, 268, INTEL_GPIO_BASE_NOMAP), /* JTAG */ 399 + CNL_GPP(2, 269, 286, 320), /* GPP_I */ 400 + CNL_GPP(3, 287, 298, 352), /* GPP_J */ 399 401 }; 400 402 401 403 static const unsigned int cnlh_spi0_pins[] = { 40, 41, 42, 43 }; ··· 788 790 }; 789 791 790 792 static const struct intel_padgroup cnllp_community0_gpps[] = { 791 - CNL_GPP(0, 0, 24, 0), /* GPP_A */ 792 - CNL_GPP(1, 25, 50, 32), /* GPP_B */ 793 - CNL_GPP(2, 51, 58, 64), /* GPP_G */ 794 - CNL_GPP(3, 59, 67, CNL_NO_GPIO), /* SPI */ 793 + CNL_GPP(0, 0, 24, 0), /* GPP_A */ 794 + CNL_GPP(1, 25, 50, 32), /* GPP_B */ 795 + CNL_GPP(2, 51, 58, 64), /* GPP_G */ 796 + CNL_GPP(3, 59, 67, INTEL_GPIO_BASE_NOMAP), /* SPI */ 795 797 }; 796 798 797 799 static const struct intel_padgroup cnllp_community1_gpps[] = { 798 - CNL_GPP(0, 68, 92, 96), /* GPP_D */ 799 - CNL_GPP(1, 93, 116, 128), /* GPP_F */ 800 - CNL_GPP(2, 117, 140, 160), /* GPP_H */ 801 - CNL_GPP(3, 141, 172, 192), /* vGPIO */ 802 - CNL_GPP(4, 173, 180, 224), /* vGPIO */ 800 + CNL_GPP(0, 68, 92, 96), /* GPP_D */ 801 + CNL_GPP(1, 93, 116, 128), /* GPP_F */ 802 + CNL_GPP(2, 117, 140, 160), /* GPP_H */ 803 + CNL_GPP(3, 141, 172, 192), /* vGPIO */ 804 + CNL_GPP(4, 173, 180, 224), /* vGPIO */ 803 805 }; 804 806 805 807 static const struct intel_padgroup cnllp_community4_gpps[] = { 806 - CNL_GPP(0, 181, 204, 256), /* GPP_C */ 807 - CNL_GPP(1, 205, 228, 288), /* GPP_E */ 808 - CNL_GPP(2, 229, 237, CNL_NO_GPIO), /* JTAG */ 809 - CNL_GPP(3, 238, 243, CNL_NO_GPIO), /* HVCMOS */ 808 + CNL_GPP(0, 181, 204, 256), /* GPP_C */ 809 + CNL_GPP(1, 205, 228, 288), /* GPP_E */ 810 + CNL_GPP(2, 229, 237, INTEL_GPIO_BASE_NOMAP), /* JTAG */ 811 + CNL_GPP(3, 238, 243, INTEL_GPIO_BASE_NOMAP), /* HVCMOS */ 810 812 }; 811 813 812 814 static const struct intel_community cnllp_communities[] = {
+104 -172
drivers/pinctrl/intel/pinctrl-cherryview.c
··· 35 35 36 36 #define CHV_PADCTRL0 0x000 37 37 #define CHV_PADCTRL0_INTSEL_SHIFT 28 38 - #define CHV_PADCTRL0_INTSEL_MASK (0xf << CHV_PADCTRL0_INTSEL_SHIFT) 38 + #define CHV_PADCTRL0_INTSEL_MASK GENMASK(31, 28) 39 39 #define CHV_PADCTRL0_TERM_UP BIT(23) 40 40 #define CHV_PADCTRL0_TERM_SHIFT 20 41 - #define CHV_PADCTRL0_TERM_MASK (7 << CHV_PADCTRL0_TERM_SHIFT) 41 + #define CHV_PADCTRL0_TERM_MASK GENMASK(22, 20) 42 42 #define CHV_PADCTRL0_TERM_20K 1 43 43 #define CHV_PADCTRL0_TERM_5K 2 44 44 #define CHV_PADCTRL0_TERM_1K 4 45 45 #define CHV_PADCTRL0_PMODE_SHIFT 16 46 - #define CHV_PADCTRL0_PMODE_MASK (0xf << CHV_PADCTRL0_PMODE_SHIFT) 46 + #define CHV_PADCTRL0_PMODE_MASK GENMASK(19, 16) 47 47 #define CHV_PADCTRL0_GPIOEN BIT(15) 48 48 #define CHV_PADCTRL0_GPIOCFG_SHIFT 8 49 - #define CHV_PADCTRL0_GPIOCFG_MASK (7 << CHV_PADCTRL0_GPIOCFG_SHIFT) 49 + #define CHV_PADCTRL0_GPIOCFG_MASK GENMASK(10, 8) 50 50 #define CHV_PADCTRL0_GPIOCFG_GPIO 0 51 51 #define CHV_PADCTRL0_GPIOCFG_GPO 1 52 52 #define CHV_PADCTRL0_GPIOCFG_GPI 2 ··· 57 57 #define CHV_PADCTRL1 0x004 58 58 #define CHV_PADCTRL1_CFGLOCK BIT(31) 59 59 #define CHV_PADCTRL1_INVRXTX_SHIFT 4 60 - #define CHV_PADCTRL1_INVRXTX_MASK (0xf << CHV_PADCTRL1_INVRXTX_SHIFT) 61 - #define CHV_PADCTRL1_INVRXTX_TXENABLE (2 << CHV_PADCTRL1_INVRXTX_SHIFT) 60 + #define CHV_PADCTRL1_INVRXTX_MASK GENMASK(7, 4) 61 + #define CHV_PADCTRL1_INVRXTX_RXDATA BIT(6) 62 + #define CHV_PADCTRL1_INVRXTX_TXENABLE BIT(5) 62 63 #define CHV_PADCTRL1_ODEN BIT(3) 63 - #define CHV_PADCTRL1_INVRXTX_RXDATA (4 << CHV_PADCTRL1_INVRXTX_SHIFT) 64 - #define CHV_PADCTRL1_INTWAKECFG_MASK 7 64 + #define CHV_PADCTRL1_INTWAKECFG_MASK GENMASK(2, 0) 65 65 #define CHV_PADCTRL1_INTWAKECFG_FALLING 1 66 66 #define CHV_PADCTRL1_INTWAKECFG_RISING 2 67 67 #define CHV_PADCTRL1_INTWAKECFG_BOTH 3 68 68 #define CHV_PADCTRL1_INTWAKECFG_LEVEL 4 69 - 70 - /** 71 - * struct chv_alternate_function - A per group or per pin alternate function 72 - * @pin: Pin number (only used in per pin configs) 73 - * @mode: Mode the pin should be set in 74 - * @invert_oe: Invert OE for this pin 75 - */ 76 - struct chv_alternate_function { 77 - unsigned int pin; 78 - u8 mode; 79 - bool invert_oe; 80 - }; 81 - 82 - /** 83 - * struct chv_pincgroup - describes a CHV pin group 84 - * @name: Name of the group 85 - * @pins: An array of pins in this group 86 - * @npins: Number of pins in this group 87 - * @altfunc: Alternate function applied to all pins in this group 88 - * @overrides: Alternate function override per pin or %NULL if not used 89 - * @noverrides: Number of per pin alternate function overrides if 90 - * @overrides != NULL. 91 - */ 92 - struct chv_pingroup { 93 - const char *name; 94 - const unsigned int *pins; 95 - size_t npins; 96 - struct chv_alternate_function altfunc; 97 - const struct chv_alternate_function *overrides; 98 - size_t noverrides; 99 - }; 100 - 101 - /** 102 - * struct chv_gpio_pinrange - A range of pins that can be used as GPIOs 103 - * @base: Start pin number 104 - * @npins: Number of pins in this range 105 - */ 106 - struct chv_gpio_pinrange { 107 - unsigned int base; 108 - unsigned int npins; 109 - }; 110 69 111 70 /** 112 71 * struct chv_community - A community specific configuration ··· 76 117 * @ngroups: Number of groups 77 118 * @functions: All functions in this community 78 119 * @nfunctions: Number of functions 79 - * @gpio_ranges: An array of GPIO ranges in this community 80 - * @ngpio_ranges: Number of GPIO ranges 120 + * @gpps: Pad groups 121 + * @ngpps: Number of pad groups in this community 81 122 * @nirqs: Total number of IRQs this community can generate 82 123 * @acpi_space_id: An address space ID for ACPI OpRegion handler 83 124 */ ··· 85 126 const char *uid; 86 127 const struct pinctrl_pin_desc *pins; 87 128 size_t npins; 88 - const struct chv_pingroup *groups; 129 + const struct intel_pingroup *groups; 89 130 size_t ngroups; 90 131 const struct intel_function *functions; 91 132 size_t nfunctions; 92 - const struct chv_gpio_pinrange *gpio_ranges; 93 - size_t ngpio_ranges; 133 + const struct intel_padgroup *gpps; 134 + size_t ngpps; 94 135 size_t nirqs; 95 136 acpi_adr_space_type acpi_space_id; 96 137 }; ··· 132 173 struct chv_pin_context *saved_pin_context; 133 174 }; 134 175 135 - #define ALTERNATE_FUNCTION(p, m, i) \ 136 - { \ 137 - .pin = (p), \ 138 - .mode = (m), \ 139 - .invert_oe = (i), \ 140 - } 176 + #define PINMODE_INVERT_OE BIT(15) 141 177 142 - #define PIN_GROUP_WITH_ALT(n, p, m, i) \ 143 - { \ 144 - .name = (n), \ 145 - .pins = (p), \ 146 - .npins = ARRAY_SIZE((p)), \ 147 - .altfunc.mode = (m), \ 148 - .altfunc.invert_oe = (i), \ 149 - } 178 + #define PINMODE(m, i) ((m) | ((i) * PINMODE_INVERT_OE)) 150 179 151 - #define PIN_GROUP_WITH_OVERRIDE(n, p, m, i, o) \ 152 - { \ 153 - .name = (n), \ 154 - .pins = (p), \ 155 - .npins = ARRAY_SIZE((p)), \ 156 - .altfunc.mode = (m), \ 157 - .altfunc.invert_oe = (i), \ 158 - .overrides = (o), \ 159 - .noverrides = ARRAY_SIZE((o)), \ 160 - } 161 - 162 - #define GPIO_PINRANGE(start, end) \ 180 + #define CHV_GPP(start, end) \ 163 181 { \ 164 182 .base = (start), \ 165 - .npins = (end) - (start) + 1, \ 183 + .size = (end) - (start) + 1, \ 166 184 } 167 185 168 186 static const struct pinctrl_pin_desc southwest_pins[] = { ··· 224 288 static const unsigned southwest_i2c_nfc_pins[] = { 49, 52 }; 225 289 static const unsigned southwest_spi3_pins[] = { 76, 79, 80, 81, 82 }; 226 290 227 - /* LPE I2S TXD pins need to have invert_oe set */ 228 - static const struct chv_alternate_function southwest_lpe_altfuncs[] = { 229 - ALTERNATE_FUNCTION(30, 1, true), 230 - ALTERNATE_FUNCTION(34, 1, true), 231 - ALTERNATE_FUNCTION(97, 1, true), 291 + /* Some of LPE I2S TXD pins need to have OE inversion set */ 292 + static const unsigned int southwest_lpe_altfuncs[] = { 293 + PINMODE(1, 1), PINMODE(1, 0), PINMODE(1, 0), PINMODE(1, 0), /* 30, 31, 32, 33 */ 294 + PINMODE(1, 1), PINMODE(1, 0), PINMODE(1, 0), PINMODE(1, 0), /* 34, 35, 36, 37 */ 295 + PINMODE(1, 0), PINMODE(1, 0), PINMODE(1, 0), PINMODE(1, 1), /* 92, 94, 96, 97 */ 232 296 }; 233 297 234 298 /* 235 299 * Two spi3 chipselects are available in different mode than the main spi3 236 - * functionality, which is using mode 1. 300 + * functionality, which is using mode 2. 237 301 */ 238 - static const struct chv_alternate_function southwest_spi3_altfuncs[] = { 239 - ALTERNATE_FUNCTION(76, 3, false), 240 - ALTERNATE_FUNCTION(80, 3, false), 302 + static const unsigned int southwest_spi3_altfuncs[] = { 303 + PINMODE(3, 0), PINMODE(2, 0), PINMODE(3, 0), PINMODE(2, 0), /* 76, 79, 80, 81 */ 304 + PINMODE(2, 0), /* 82 */ 241 305 }; 242 306 243 - static const struct chv_pingroup southwest_groups[] = { 244 - PIN_GROUP_WITH_ALT("uart0_grp", southwest_uart0_pins, 2, false), 245 - PIN_GROUP_WITH_ALT("uart1_grp", southwest_uart1_pins, 1, false), 246 - PIN_GROUP_WITH_ALT("uart2_grp", southwest_uart2_pins, 1, false), 247 - PIN_GROUP_WITH_ALT("hda_grp", southwest_hda_pins, 2, false), 248 - PIN_GROUP_WITH_ALT("i2c0_grp", southwest_i2c0_pins, 1, true), 249 - PIN_GROUP_WITH_ALT("i2c1_grp", southwest_i2c1_pins, 1, true), 250 - PIN_GROUP_WITH_ALT("i2c2_grp", southwest_i2c2_pins, 1, true), 251 - PIN_GROUP_WITH_ALT("i2c3_grp", southwest_i2c3_pins, 1, true), 252 - PIN_GROUP_WITH_ALT("i2c4_grp", southwest_i2c4_pins, 1, true), 253 - PIN_GROUP_WITH_ALT("i2c5_grp", southwest_i2c5_pins, 1, true), 254 - PIN_GROUP_WITH_ALT("i2c6_grp", southwest_i2c6_pins, 1, true), 255 - PIN_GROUP_WITH_ALT("i2c_nfc_grp", southwest_i2c_nfc_pins, 2, true), 256 - 257 - PIN_GROUP_WITH_OVERRIDE("lpe_grp", southwest_lpe_pins, 1, false, 258 - southwest_lpe_altfuncs), 259 - PIN_GROUP_WITH_OVERRIDE("spi3_grp", southwest_spi3_pins, 2, false, 260 - southwest_spi3_altfuncs), 307 + static const struct intel_pingroup southwest_groups[] = { 308 + PIN_GROUP("uart0_grp", southwest_uart0_pins, PINMODE(2, 0)), 309 + PIN_GROUP("uart1_grp", southwest_uart1_pins, PINMODE(1, 0)), 310 + PIN_GROUP("uart2_grp", southwest_uart2_pins, PINMODE(1, 0)), 311 + PIN_GROUP("hda_grp", southwest_hda_pins, PINMODE(2, 0)), 312 + PIN_GROUP("i2c0_grp", southwest_i2c0_pins, PINMODE(1, 1)), 313 + PIN_GROUP("i2c1_grp", southwest_i2c1_pins, PINMODE(1, 1)), 314 + PIN_GROUP("i2c2_grp", southwest_i2c2_pins, PINMODE(1, 1)), 315 + PIN_GROUP("i2c3_grp", southwest_i2c3_pins, PINMODE(1, 1)), 316 + PIN_GROUP("i2c4_grp", southwest_i2c4_pins, PINMODE(1, 1)), 317 + PIN_GROUP("i2c5_grp", southwest_i2c5_pins, PINMODE(1, 1)), 318 + PIN_GROUP("i2c6_grp", southwest_i2c6_pins, PINMODE(1, 1)), 319 + PIN_GROUP("i2c_nfc_grp", southwest_i2c_nfc_pins, PINMODE(2, 1)), 320 + PIN_GROUP("lpe_grp", southwest_lpe_pins, southwest_lpe_altfuncs), 321 + PIN_GROUP("spi3_grp", southwest_spi3_pins, southwest_spi3_altfuncs), 261 322 }; 262 323 263 324 static const char * const southwest_uart0_groups[] = { "uart0_grp" }; ··· 293 360 FUNCTION("spi3", southwest_spi3_groups), 294 361 }; 295 362 296 - static const struct chv_gpio_pinrange southwest_gpio_ranges[] = { 297 - GPIO_PINRANGE(0, 7), 298 - GPIO_PINRANGE(15, 22), 299 - GPIO_PINRANGE(30, 37), 300 - GPIO_PINRANGE(45, 52), 301 - GPIO_PINRANGE(60, 67), 302 - GPIO_PINRANGE(75, 82), 303 - GPIO_PINRANGE(90, 97), 363 + static const struct intel_padgroup southwest_gpps[] = { 364 + CHV_GPP(0, 7), 365 + CHV_GPP(15, 22), 366 + CHV_GPP(30, 37), 367 + CHV_GPP(45, 52), 368 + CHV_GPP(60, 67), 369 + CHV_GPP(75, 82), 370 + CHV_GPP(90, 97), 304 371 }; 305 372 306 373 static const struct chv_community southwest_community = { ··· 311 378 .ngroups = ARRAY_SIZE(southwest_groups), 312 379 .functions = southwest_functions, 313 380 .nfunctions = ARRAY_SIZE(southwest_functions), 314 - .gpio_ranges = southwest_gpio_ranges, 315 - .ngpio_ranges = ARRAY_SIZE(southwest_gpio_ranges), 381 + .gpps = southwest_gpps, 382 + .ngpps = ARRAY_SIZE(southwest_gpps), 316 383 /* 317 384 * Southwest community can generate GPIO interrupts only for the 318 385 * first 8 interrupts. The upper half (8-15) can only be used to ··· 388 455 PINCTRL_PIN(72, "PANEL0_VDDEN"), 389 456 }; 390 457 391 - static const struct chv_gpio_pinrange north_gpio_ranges[] = { 392 - GPIO_PINRANGE(0, 8), 393 - GPIO_PINRANGE(15, 27), 394 - GPIO_PINRANGE(30, 41), 395 - GPIO_PINRANGE(45, 56), 396 - GPIO_PINRANGE(60, 72), 458 + static const struct intel_padgroup north_gpps[] = { 459 + CHV_GPP(0, 8), 460 + CHV_GPP(15, 27), 461 + CHV_GPP(30, 41), 462 + CHV_GPP(45, 56), 463 + CHV_GPP(60, 72), 397 464 }; 398 465 399 466 static const struct chv_community north_community = { 400 467 .uid = "2", 401 468 .pins = north_pins, 402 469 .npins = ARRAY_SIZE(north_pins), 403 - .gpio_ranges = north_gpio_ranges, 404 - .ngpio_ranges = ARRAY_SIZE(north_gpio_ranges), 470 + .gpps = north_gpps, 471 + .ngpps = ARRAY_SIZE(north_gpps), 405 472 /* 406 473 * North community can generate GPIO interrupts only for the first 407 474 * 8 interrupts. The upper half (8-15) can only be used to trigger ··· 439 506 PINCTRL_PIN(26, "MF_ISH_I2C1_SDA"), 440 507 }; 441 508 442 - static const struct chv_gpio_pinrange east_gpio_ranges[] = { 443 - GPIO_PINRANGE(0, 11), 444 - GPIO_PINRANGE(15, 26), 509 + static const struct intel_padgroup east_gpps[] = { 510 + CHV_GPP(0, 11), 511 + CHV_GPP(15, 26), 445 512 }; 446 513 447 514 static const struct chv_community east_community = { 448 515 .uid = "3", 449 516 .pins = east_pins, 450 517 .npins = ARRAY_SIZE(east_pins), 451 - .gpio_ranges = east_gpio_ranges, 452 - .ngpio_ranges = ARRAY_SIZE(east_gpio_ranges), 518 + .gpps = east_gpps, 519 + .ngpps = ARRAY_SIZE(east_gpps), 453 520 .nirqs = 16, 454 521 .acpi_space_id = 0x93, 455 522 }; ··· 529 596 static const unsigned southeast_spi1_pins[] = { 60, 61, 62, 64, 66 }; 530 597 static const unsigned southeast_spi2_pins[] = { 2, 3, 4, 6, 7 }; 531 598 532 - static const struct chv_pingroup southeast_groups[] = { 533 - PIN_GROUP_WITH_ALT("pwm0_grp", southeast_pwm0_pins, 1, false), 534 - PIN_GROUP_WITH_ALT("pwm1_grp", southeast_pwm1_pins, 1, false), 535 - PIN_GROUP_WITH_ALT("sdmmc1_grp", southeast_sdmmc1_pins, 1, false), 536 - PIN_GROUP_WITH_ALT("sdmmc2_grp", southeast_sdmmc2_pins, 1, false), 537 - PIN_GROUP_WITH_ALT("sdmmc3_grp", southeast_sdmmc3_pins, 1, false), 538 - PIN_GROUP_WITH_ALT("spi1_grp", southeast_spi1_pins, 1, false), 539 - PIN_GROUP_WITH_ALT("spi2_grp", southeast_spi2_pins, 4, false), 599 + static const struct intel_pingroup southeast_groups[] = { 600 + PIN_GROUP("pwm0_grp", southeast_pwm0_pins, PINMODE(1, 0)), 601 + PIN_GROUP("pwm1_grp", southeast_pwm1_pins, PINMODE(1, 0)), 602 + PIN_GROUP("sdmmc1_grp", southeast_sdmmc1_pins, PINMODE(1, 0)), 603 + PIN_GROUP("sdmmc2_grp", southeast_sdmmc2_pins, PINMODE(1, 0)), 604 + PIN_GROUP("sdmmc3_grp", southeast_sdmmc3_pins, PINMODE(1, 0)), 605 + PIN_GROUP("spi1_grp", southeast_spi1_pins, PINMODE(1, 0)), 606 + PIN_GROUP("spi2_grp", southeast_spi2_pins, PINMODE(4, 0)), 540 607 }; 541 608 542 609 static const char * const southeast_pwm0_groups[] = { "pwm0_grp" }; ··· 557 624 FUNCTION("spi2", southeast_spi2_groups), 558 625 }; 559 626 560 - static const struct chv_gpio_pinrange southeast_gpio_ranges[] = { 561 - GPIO_PINRANGE(0, 7), 562 - GPIO_PINRANGE(15, 26), 563 - GPIO_PINRANGE(30, 35), 564 - GPIO_PINRANGE(45, 52), 565 - GPIO_PINRANGE(60, 69), 566 - GPIO_PINRANGE(75, 85), 627 + static const struct intel_padgroup southeast_gpps[] = { 628 + CHV_GPP(0, 7), 629 + CHV_GPP(15, 26), 630 + CHV_GPP(30, 35), 631 + CHV_GPP(45, 52), 632 + CHV_GPP(60, 69), 633 + CHV_GPP(75, 85), 567 634 }; 568 635 569 636 static const struct chv_community southeast_community = { ··· 574 641 .ngroups = ARRAY_SIZE(southeast_groups), 575 642 .functions = southeast_functions, 576 643 .nfunctions = ARRAY_SIZE(southeast_functions), 577 - .gpio_ranges = southeast_gpio_ranges, 578 - .ngpio_ranges = ARRAY_SIZE(southeast_gpio_ranges), 644 + .gpps = southeast_gpps, 645 + .ngpps = ARRAY_SIZE(southeast_gpps), 579 646 .nirqs = 16, 580 647 .acpi_space_id = 0x94, 581 648 }; ··· 722 789 unsigned int function, unsigned int group) 723 790 { 724 791 struct chv_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); 725 - const struct chv_pingroup *grp; 792 + const struct intel_pingroup *grp; 726 793 unsigned long flags; 727 794 int i; 728 795 ··· 741 808 } 742 809 743 810 for (i = 0; i < grp->npins; i++) { 744 - const struct chv_alternate_function *altfunc = &grp->altfunc; 745 811 int pin = grp->pins[i]; 746 812 void __iomem *reg; 813 + unsigned int mode; 814 + bool invert_oe; 747 815 u32 value; 748 816 749 817 /* Check if there is pin-specific config */ 750 - if (grp->overrides) { 751 - int j; 818 + if (grp->modes) 819 + mode = grp->modes[i]; 820 + else 821 + mode = grp->mode; 752 822 753 - for (j = 0; j < grp->noverrides; j++) { 754 - if (grp->overrides[j].pin == pin) { 755 - altfunc = &grp->overrides[j]; 756 - break; 757 - } 758 - } 759 - } 823 + /* Extract OE inversion */ 824 + invert_oe = mode & PINMODE_INVERT_OE; 825 + mode &= ~PINMODE_INVERT_OE; 760 826 761 827 reg = chv_padreg(pctrl, pin, CHV_PADCTRL0); 762 828 value = readl(reg); ··· 763 831 value &= ~CHV_PADCTRL0_GPIOEN; 764 832 /* Set to desired mode */ 765 833 value &= ~CHV_PADCTRL0_PMODE_MASK; 766 - value |= altfunc->mode << CHV_PADCTRL0_PMODE_SHIFT; 834 + value |= mode << CHV_PADCTRL0_PMODE_SHIFT; 767 835 chv_writel(value, reg); 768 836 769 837 /* Update for invert_oe */ 770 838 reg = chv_padreg(pctrl, pin, CHV_PADCTRL1); 771 839 value = readl(reg) & ~CHV_PADCTRL1_INVRXTX_MASK; 772 - if (altfunc->invert_oe) 840 + if (invert_oe) 773 841 value |= CHV_PADCTRL1_INVRXTX_TXENABLE; 774 842 chv_writel(value, reg); 775 843 776 844 dev_dbg(pctrl->dev, "configured pin %u mode %u OE %sinverted\n", 777 - pin, altfunc->mode, altfunc->invert_oe ? "" : "not "); 845 + pin, mode, invert_oe ? "" : "not "); 778 846 } 779 847 780 848 raw_spin_unlock_irqrestore(&chv_lock, flags); ··· 1526 1594 { 1527 1595 struct chv_pinctrl *pctrl = gpiochip_get_data(chip); 1528 1596 const struct chv_community *community = pctrl->community; 1529 - const struct chv_gpio_pinrange *range; 1597 + const struct intel_padgroup *gpp; 1530 1598 int ret, i; 1531 1599 1532 - for (i = 0; i < community->ngpio_ranges; i++) { 1533 - range = &community->gpio_ranges[i]; 1600 + for (i = 0; i < community->ngpps; i++) { 1601 + gpp = &community->gpps[i]; 1534 1602 ret = gpiochip_add_pin_range(chip, dev_name(pctrl->dev), 1535 - range->base, range->base, 1536 - range->npins); 1603 + gpp->base, gpp->base, 1604 + gpp->size); 1537 1605 if (ret) { 1538 1606 dev_err(pctrl->dev, "failed to add GPIO pin range\n"); 1539 1607 return ret; ··· 1545 1613 1546 1614 static int chv_gpio_probe(struct chv_pinctrl *pctrl, int irq) 1547 1615 { 1548 - const struct chv_gpio_pinrange *range; 1616 + const struct intel_padgroup *gpp; 1549 1617 struct gpio_chip *chip = &pctrl->chip; 1550 1618 bool need_valid_mask = !dmi_check_system(chv_no_valid_mask); 1551 1619 const struct chv_community *community = pctrl->community; ··· 1593 1661 } 1594 1662 1595 1663 if (!need_valid_mask) { 1596 - for (i = 0; i < community->ngpio_ranges; i++) { 1597 - range = &community->gpio_ranges[i]; 1664 + for (i = 0; i < community->ngpps; i++) { 1665 + gpp = &community->gpps[i]; 1598 1666 1599 1667 irq_domain_associate_many(chip->irq.domain, irq_base, 1600 - range->base, range->npins); 1601 - irq_base += range->npins; 1668 + gpp->base, gpp->size); 1669 + irq_base += gpp->size; 1602 1670 } 1603 1671 } 1604 1672
+14 -16
drivers/pinctrl/intel/pinctrl-icelake.c
··· 29 29 .gpio_base = (g), \ 30 30 } 31 31 32 - #define ICL_NO_GPIO -1 33 - 34 32 #define ICL_COMMUNITY(b, s, e, g) \ 35 33 { \ 36 34 .barno = (b), \ ··· 303 305 }; 304 306 305 307 static const struct intel_padgroup icllp_community0_gpps[] = { 306 - ICL_GPP(0, 0, 7, 0), /* GPP_G */ 307 - ICL_GPP(1, 8, 33, 32), /* GPP_B */ 308 - ICL_GPP(2, 34, 58, 64), /* GPP_A */ 308 + ICL_GPP(0, 0, 7, 0), /* GPP_G */ 309 + ICL_GPP(1, 8, 33, 32), /* GPP_B */ 310 + ICL_GPP(2, 34, 58, 64), /* GPP_A */ 309 311 }; 310 312 311 313 static const struct intel_padgroup icllp_community1_gpps[] = { 312 - ICL_GPP(0, 59, 82, 96), /* GPP_H */ 313 - ICL_GPP(1, 83, 103, 128), /* GPP_D */ 314 - ICL_GPP(2, 104, 123, 160), /* GPP_F */ 315 - ICL_GPP(3, 124, 152, 192), /* vGPIO */ 314 + ICL_GPP(0, 59, 82, 96), /* GPP_H */ 315 + ICL_GPP(1, 83, 103, 128), /* GPP_D */ 316 + ICL_GPP(2, 104, 123, 160), /* GPP_F */ 317 + ICL_GPP(3, 124, 152, 192), /* vGPIO */ 316 318 }; 317 319 318 320 static const struct intel_padgroup icllp_community4_gpps[] = { 319 - ICL_GPP(0, 153, 176, 224), /* GPP_C */ 320 - ICL_GPP(1, 177, 182, ICL_NO_GPIO), /* HVCMOS */ 321 - ICL_GPP(2, 183, 206, 256), /* GPP_E */ 322 - ICL_GPP(3, 207, 215, ICL_NO_GPIO), /* JTAG */ 321 + ICL_GPP(0, 153, 176, 224), /* GPP_C */ 322 + ICL_GPP(1, 177, 182, INTEL_GPIO_BASE_NOMAP), /* HVCMOS */ 323 + ICL_GPP(2, 183, 206, 256), /* GPP_E */ 324 + ICL_GPP(3, 207, 215, INTEL_GPIO_BASE_NOMAP), /* JTAG */ 323 325 }; 324 326 325 327 static const struct intel_padgroup icllp_community5_gpps[] = { 326 - ICL_GPP(0, 216, 223, 288), /* GPP_R */ 327 - ICL_GPP(1, 224, 231, 320), /* GPP_S */ 328 - ICL_GPP(2, 232, 240, ICL_NO_GPIO), /* SPI */ 328 + ICL_GPP(0, 216, 223, 288), /* GPP_R */ 329 + ICL_GPP(1, 224, 231, 320), /* GPP_S */ 330 + ICL_GPP(2, 232, 240, INTEL_GPIO_BASE_NOMAP), /* SPI */ 329 331 }; 330 332 331 333 static const struct intel_community icllp_communities[] = {
+16 -6
drivers/pinctrl/intel/pinctrl-intel.c
··· 798 798 for (j = 0; j < comm->ngpps; j++) { 799 799 const struct intel_padgroup *pgrp = &comm->gpps[j]; 800 800 801 - if (pgrp->gpio_base < 0) 801 + if (pgrp->gpio_base == INTEL_GPIO_BASE_NOMAP) 802 802 continue; 803 803 804 804 if (offset >= pgrp->gpio_base && ··· 1138 1138 for (i = 0; i < community->ngpps; i++) { 1139 1139 const struct intel_padgroup *gpp = &community->gpps[i]; 1140 1140 1141 - if (gpp->gpio_base < 0) 1141 + if (gpp->gpio_base == INTEL_GPIO_BASE_NOMAP) 1142 1142 continue; 1143 1143 1144 1144 ret = gpiochip_add_pin_range(&pctrl->chip, dev_name(pctrl->dev), ··· 1180 1180 for (j = 0; j < community->ngpps; j++) { 1181 1181 const struct intel_padgroup *gpp = &community->gpps[j]; 1182 1182 1183 - if (gpp->gpio_base < 0) 1183 + if (gpp->gpio_base == INTEL_GPIO_BASE_NOMAP) 1184 1184 continue; 1185 1185 1186 1186 if (gpp->gpio_base + gpp->size > ngpio) ··· 1276 1276 if (gpps[i].size > 32) 1277 1277 return -EINVAL; 1278 1278 1279 - if (!gpps[i].gpio_base) 1280 - gpps[i].gpio_base = gpps[i].base; 1279 + /* Special treatment for GPIO base */ 1280 + switch (gpps[i].gpio_base) { 1281 + case INTEL_GPIO_BASE_MATCH: 1282 + gpps[i].gpio_base = gpps[i].base; 1283 + break; 1284 + case INTEL_GPIO_BASE_ZERO: 1285 + gpps[i].gpio_base = 0; 1286 + break; 1287 + case INTEL_GPIO_BASE_NOMAP: 1288 + default: 1289 + break; 1290 + } 1281 1291 1282 1292 gpps[i].padown_num = padown_num; 1283 1293 ··· 1606 1596 struct device *dev = pctrl->dev; 1607 1597 u32 requested; 1608 1598 1609 - if (padgrp->gpio_base < 0) 1599 + if (padgrp->gpio_base == INTEL_GPIO_BASE_NOMAP) 1610 1600 return; 1611 1601 1612 1602 requested = intel_gpio_is_requested(&pctrl->chip, padgrp->gpio_base, padgrp->size);
+20 -7
drivers/pinctrl/intel/pinctrl-intel.h
··· 53 53 * @reg_num: GPI_IS register number 54 54 * @base: Starting pin of this group 55 55 * @size: Size of this group (maximum is 32). 56 - * @gpio_base: Starting GPIO base of this group (%0 if matches with @base, 57 - * and %-1 if no GPIO mapping should be created) 56 + * @gpio_base: Starting GPIO base of this group 58 57 * @padown_num: PAD_OWN register number (assigned by the core driver) 59 58 * 60 59 * If pad groups of a community are not the same size, use this structure ··· 65 66 unsigned int size; 66 67 int gpio_base; 67 68 unsigned int padown_num; 69 + }; 70 + 71 + /** 72 + * enum - Special treatment for GPIO base in pad group 73 + * 74 + * @INTEL_GPIO_BASE_ZERO: force GPIO base to be 0 75 + * @INTEL_GPIO_BASE_NOMAP: no GPIO mapping should be created 76 + * @INTEL_GPIO_BASE_MATCH: matches with starting pin number 77 + */ 78 + enum { 79 + INTEL_GPIO_BASE_ZERO = -2, 80 + INTEL_GPIO_BASE_NOMAP = -1, 81 + INTEL_GPIO_BASE_MATCH = 0, 68 82 }; 69 83 70 84 /** ··· 94 82 * @ie_offset: Register offset of GPI_IE from @regs. 95 83 * @features: Additional features supported by the hardware 96 84 * @pin_base: Starting pin of pins in this community 85 + * @npins: Number of pins in this community 97 86 * @gpp_size: Maximum number of pads in each group, such as PADCFGLOCK, 98 - * HOSTSW_OWN, GPI_IS, GPI_IE, etc. Used when @gpps is %NULL. 87 + * HOSTSW_OWN, GPI_IS, GPI_IE. Used when @gpps is %NULL. 99 88 * @gpp_num_padown_regs: Number of pad registers each pad group consumes at 100 89 * minimum. Use %0 if the number of registers can be 101 90 * determined by the size of the group. 102 - * @npins: Number of pins in this community 103 91 * @gpps: Pad groups if the controller has variable size pad groups 104 92 * @ngpps: Number of pad groups in this community 105 93 * @pad_map: Optional non-linear mapping of the pads 106 94 * @regs: Community specific common registers (reserved for core driver) 107 95 * @pad_regs: Community specific pad registers (reserved for core driver) 108 96 * 109 - * Most Intel GPIO host controllers this driver supports each pad group is 110 - * of equal size (except the last one). In that case the driver can just 97 + * In some of Intel GPIO host controllers this driver supports each pad group 98 + * is of equal size (except the last one). In that case the driver can just 111 99 * fill in @gpp_size field and let the core driver to handle the rest. If 112 100 * the controller has pad groups of variable size the client driver can 113 101 * pass custom @gpps and @ngpps instead. ··· 121 109 unsigned int ie_offset; 122 110 unsigned int features; 123 111 unsigned int pin_base; 112 + size_t npins; 124 113 unsigned int gpp_size; 125 114 unsigned int gpp_num_padown_regs; 126 - size_t npins; 127 115 const struct intel_padgroup *gpps; 128 116 size_t ngpps; 129 117 const unsigned int *pad_map; 118 + 130 119 /* Reserved for the core driver */ 131 120 void __iomem *regs; 132 121 void __iomem *pad_regs;
+344
drivers/pinctrl/intel/pinctrl-jasperlake.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 2 + /* 3 + * Intel Jasper Lake PCH pinctrl/GPIO driver 4 + * 5 + * Copyright (C) 2020, Intel Corporation 6 + * Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com> 7 + */ 8 + 9 + #include <linux/mod_devicetable.h> 10 + #include <linux/module.h> 11 + #include <linux/platform_device.h> 12 + 13 + #include <linux/pinctrl/pinctrl.h> 14 + 15 + #include "pinctrl-intel.h" 16 + 17 + #define JSL_PAD_OWN 0x020 18 + #define JSL_PADCFGLOCK 0x080 19 + #define JSL_HOSTSW_OWN 0x0b0 20 + #define JSL_GPI_IS 0x100 21 + #define JSL_GPI_IE 0x120 22 + 23 + #define JSL_GPP(r, s, e, g) \ 24 + { \ 25 + .reg_num = (r), \ 26 + .base = (s), \ 27 + .size = ((e) - (s) + 1), \ 28 + .gpio_base = (g), \ 29 + } 30 + 31 + #define JSL_COMMUNITY(b, s, e, g) \ 32 + { \ 33 + .barno = (b), \ 34 + .padown_offset = JSL_PAD_OWN, \ 35 + .padcfglock_offset = JSL_PADCFGLOCK, \ 36 + .hostown_offset = JSL_HOSTSW_OWN, \ 37 + .is_offset = JSL_GPI_IS, \ 38 + .ie_offset = JSL_GPI_IE, \ 39 + .pin_base = (s), \ 40 + .npins = ((e) - (s) + 1), \ 41 + .gpps = (g), \ 42 + .ngpps = ARRAY_SIZE(g), \ 43 + } 44 + 45 + /* Jasper Lake */ 46 + static const struct pinctrl_pin_desc jsl_pins[] = { 47 + /* GPP_F */ 48 + PINCTRL_PIN(0, "CNV_BRI_DT_UART0_RTSB"), 49 + PINCTRL_PIN(1, "CNV_BRI_RSP_UART0_RXD"), 50 + PINCTRL_PIN(2, "EMMC_HIP_MON"), 51 + PINCTRL_PIN(3, "CNV_RGI_RSP_UART0_CTSB"), 52 + PINCTRL_PIN(4, "CNV_RF_RESET_B"), 53 + PINCTRL_PIN(5, "MODEM_CLKREQ"), 54 + PINCTRL_PIN(6, "CNV_PA_BLANKING"), 55 + PINCTRL_PIN(7, "EMMC_CMD"), 56 + PINCTRL_PIN(8, "EMMC_DATA0"), 57 + PINCTRL_PIN(9, "EMMC_DATA1"), 58 + PINCTRL_PIN(10, "EMMC_DATA2"), 59 + PINCTRL_PIN(11, "EMMC_DATA3"), 60 + PINCTRL_PIN(12, "EMMC_DATA4"), 61 + PINCTRL_PIN(13, "EMMC_DATA5"), 62 + PINCTRL_PIN(14, "EMMC_DATA6"), 63 + PINCTRL_PIN(15, "EMMC_DATA7"), 64 + PINCTRL_PIN(16, "EMMC_RCLK"), 65 + PINCTRL_PIN(17, "EMMC_CLK"), 66 + PINCTRL_PIN(18, "EMMC_RESETB"), 67 + PINCTRL_PIN(19, "A4WP_PRESENT"), 68 + /* GPP_B */ 69 + PINCTRL_PIN(20, "CORE_VID_0"), 70 + PINCTRL_PIN(21, "CORE_VID_1"), 71 + PINCTRL_PIN(22, "VRALERTB"), 72 + PINCTRL_PIN(23, "CPU_GP_2"), 73 + PINCTRL_PIN(24, "CPU_GP_3"), 74 + PINCTRL_PIN(25, "SRCCLKREQB_0"), 75 + PINCTRL_PIN(26, "SRCCLKREQB_1"), 76 + PINCTRL_PIN(27, "SRCCLKREQB_2"), 77 + PINCTRL_PIN(28, "SRCCLKREQB_3"), 78 + PINCTRL_PIN(29, "SRCCLKREQB_4"), 79 + PINCTRL_PIN(30, "SRCCLKREQB_5"), 80 + PINCTRL_PIN(31, "PMCALERTB"), 81 + PINCTRL_PIN(32, "SLP_S0B"), 82 + PINCTRL_PIN(33, "PLTRSTB"), 83 + PINCTRL_PIN(34, "SPKR"), 84 + PINCTRL_PIN(35, "GSPI0_CS0B"), 85 + PINCTRL_PIN(36, "GSPI0_CLK"), 86 + PINCTRL_PIN(37, "GSPI0_MISO"), 87 + PINCTRL_PIN(38, "GSPI0_MOSI"), 88 + PINCTRL_PIN(39, "GSPI1_CS0B"), 89 + PINCTRL_PIN(40, "GSPI1_CLK"), 90 + PINCTRL_PIN(41, "GSPI1_MISO"), 91 + PINCTRL_PIN(42, "GSPI1_MOSI"), 92 + PINCTRL_PIN(43, "DDSP_HPD_A"), 93 + PINCTRL_PIN(44, "GSPI0_CLK_LOOPBK"), 94 + PINCTRL_PIN(45, "GSPI1_CLK_LOOPBK"), 95 + /* GPP_A */ 96 + PINCTRL_PIN(46, "ESPI_IO_0"), 97 + PINCTRL_PIN(47, "ESPI_IO_1"), 98 + PINCTRL_PIN(48, "ESPI_IO_2"), 99 + PINCTRL_PIN(49, "ESPI_IO_3"), 100 + PINCTRL_PIN(50, "ESPI_CSB"), 101 + PINCTRL_PIN(51, "ESPI_CLK"), 102 + PINCTRL_PIN(52, "ESPI_RESETB"), 103 + PINCTRL_PIN(53, "SMBCLK"), 104 + PINCTRL_PIN(54, "SMBDATA"), 105 + PINCTRL_PIN(55, "SMBALERTB"), 106 + PINCTRL_PIN(56, "CPU_GP_0"), 107 + PINCTRL_PIN(57, "CPU_GP_1"), 108 + PINCTRL_PIN(58, "USB2_OCB_1"), 109 + PINCTRL_PIN(59, "USB2_OCB_2"), 110 + PINCTRL_PIN(60, "USB2_OCB_3"), 111 + PINCTRL_PIN(61, "DDSP_HPD_A_TIME_SYNC_0"), 112 + PINCTRL_PIN(62, "DDSP_HPD_B"), 113 + PINCTRL_PIN(63, "DDSP_HPD_C"), 114 + PINCTRL_PIN(64, "USB2_OCB_0"), 115 + PINCTRL_PIN(65, "PCHHOTB"), 116 + PINCTRL_PIN(66, "ESPI_CLK_LOOPBK"), 117 + /* GPP_S */ 118 + PINCTRL_PIN(67, "SNDW1_CLK"), 119 + PINCTRL_PIN(68, "SNDW1_DATA"), 120 + PINCTRL_PIN(69, "SNDW2_CLK"), 121 + PINCTRL_PIN(70, "SNDW2_DATA"), 122 + PINCTRL_PIN(71, "SNDW1_CLK"), 123 + PINCTRL_PIN(72, "SNDW1_DATA"), 124 + PINCTRL_PIN(73, "SNDW4_CLK_DMIC_CLK_0"), 125 + PINCTRL_PIN(74, "SNDW4_DATA_DMIC_DATA_0"), 126 + /* GPP_R */ 127 + PINCTRL_PIN(75, "HDA_BCLK"), 128 + PINCTRL_PIN(76, "HDA_SYNC"), 129 + PINCTRL_PIN(77, "HDA_SDO"), 130 + PINCTRL_PIN(78, "HDA_SDI_0"), 131 + PINCTRL_PIN(79, "HDA_RSTB"), 132 + PINCTRL_PIN(80, "HDA_SDI_1"), 133 + PINCTRL_PIN(81, "I2S1_SFRM"), 134 + PINCTRL_PIN(82, "I2S1_TXD"), 135 + /* GPP_H */ 136 + PINCTRL_PIN(83, "GPPC_H_0"), 137 + PINCTRL_PIN(84, "SD_PWR_EN_B"), 138 + PINCTRL_PIN(85, "MODEM_CLKREQ"), 139 + PINCTRL_PIN(86, "SX_EXIT_HOLDOFFB"), 140 + PINCTRL_PIN(87, "I2C2_SDA"), 141 + PINCTRL_PIN(88, "I2C2_SCL"), 142 + PINCTRL_PIN(89, "I2C3_SDA"), 143 + PINCTRL_PIN(90, "I2C3_SCL"), 144 + PINCTRL_PIN(91, "I2C4_SDA"), 145 + PINCTRL_PIN(92, "I2C4_SCL"), 146 + PINCTRL_PIN(93, "CPU_VCCIO_PWR_GATEB"), 147 + PINCTRL_PIN(94, "I2S2_SCLK"), 148 + PINCTRL_PIN(95, "I2S2_SFRM"), 149 + PINCTRL_PIN(96, "I2S2_TXD"), 150 + PINCTRL_PIN(97, "I2S2_RXD"), 151 + PINCTRL_PIN(98, "I2S1_SCLK"), 152 + PINCTRL_PIN(99, "GPPC_H_16"), 153 + PINCTRL_PIN(100, "GPPC_H_17"), 154 + PINCTRL_PIN(101, "GPPC_H_18"), 155 + PINCTRL_PIN(102, "GPPC_H_19"), 156 + PINCTRL_PIN(103, "GPPC_H_20"), 157 + PINCTRL_PIN(104, "GPPC_H_21"), 158 + PINCTRL_PIN(105, "GPPC_H_22"), 159 + PINCTRL_PIN(106, "GPPC_H_23"), 160 + /* GPP_D */ 161 + PINCTRL_PIN(107, "SPI1_CSB"), 162 + PINCTRL_PIN(108, "SPI1_CLK"), 163 + PINCTRL_PIN(109, "SPI1_MISO_IO_1"), 164 + PINCTRL_PIN(110, "SPI1_MOSI_IO_0"), 165 + PINCTRL_PIN(111, "ISH_I2C0_SDA"), 166 + PINCTRL_PIN(112, "ISH_I2C0_SCL"), 167 + PINCTRL_PIN(113, "ISH_I2C1_SDA"), 168 + PINCTRL_PIN(114, "ISH_I2C1_SCL"), 169 + PINCTRL_PIN(115, "ISH_SPI_CSB"), 170 + PINCTRL_PIN(116, "ISH_SPI_CLK"), 171 + PINCTRL_PIN(117, "ISH_SPI_MISO"), 172 + PINCTRL_PIN(118, "ISH_SPI_MOSI"), 173 + PINCTRL_PIN(119, "ISH_UART0_RXD"), 174 + PINCTRL_PIN(120, "ISH_UART0_TXD"), 175 + PINCTRL_PIN(121, "ISH_UART0_RTSB"), 176 + PINCTRL_PIN(122, "ISH_UART0_CTSB"), 177 + PINCTRL_PIN(123, "SPI1_IO_2"), 178 + PINCTRL_PIN(124, "SPI1_IO_3"), 179 + PINCTRL_PIN(125, "I2S_MCLK"), 180 + PINCTRL_PIN(126, "CNV_MFUART2_RXD"), 181 + PINCTRL_PIN(127, "CNV_MFUART2_TXD"), 182 + PINCTRL_PIN(128, "CNV_PA_BLANKING"), 183 + PINCTRL_PIN(129, "I2C5_SDA"), 184 + PINCTRL_PIN(130, "I2C5_SCL"), 185 + PINCTRL_PIN(131, "GSPI2_CLK_LOOPBK"), 186 + PINCTRL_PIN(132, "SPI1_CLK_LOOPBK"), 187 + /* vGPIO */ 188 + PINCTRL_PIN(133, "CNV_BTEN"), 189 + PINCTRL_PIN(134, "CNV_WCEN"), 190 + PINCTRL_PIN(135, "CNV_BT_HOST_WAKEB"), 191 + PINCTRL_PIN(136, "CNV_BT_IF_SELECT"), 192 + PINCTRL_PIN(137, "vCNV_BT_UART_TXD"), 193 + PINCTRL_PIN(138, "vCNV_BT_UART_RXD"), 194 + PINCTRL_PIN(139, "vCNV_BT_UART_CTS_B"), 195 + PINCTRL_PIN(140, "vCNV_BT_UART_RTS_B"), 196 + PINCTRL_PIN(141, "vCNV_MFUART1_TXD"), 197 + PINCTRL_PIN(142, "vCNV_MFUART1_RXD"), 198 + PINCTRL_PIN(143, "vCNV_MFUART1_CTS_B"), 199 + PINCTRL_PIN(144, "vCNV_MFUART1_RTS_B"), 200 + PINCTRL_PIN(145, "vUART0_TXD"), 201 + PINCTRL_PIN(146, "vUART0_RXD"), 202 + PINCTRL_PIN(147, "vUART0_CTS_B"), 203 + PINCTRL_PIN(148, "vUART0_RTS_B"), 204 + PINCTRL_PIN(149, "vISH_UART0_TXD"), 205 + PINCTRL_PIN(150, "vISH_UART0_RXD"), 206 + PINCTRL_PIN(151, "vISH_UART0_CTS_B"), 207 + PINCTRL_PIN(152, "vISH_UART0_RTS_B"), 208 + PINCTRL_PIN(153, "vCNV_BT_I2S_BCLK"), 209 + PINCTRL_PIN(154, "vCNV_BT_I2S_WS_SYNC"), 210 + PINCTRL_PIN(155, "vCNV_BT_I2S_SDO"), 211 + PINCTRL_PIN(156, "vCNV_BT_I2S_SDI"), 212 + PINCTRL_PIN(157, "vI2S2_SCLK"), 213 + PINCTRL_PIN(158, "vI2S2_SFRM"), 214 + PINCTRL_PIN(159, "vI2S2_TXD"), 215 + PINCTRL_PIN(160, "vI2S2_RXD"), 216 + PINCTRL_PIN(161, "vSD3_CD_B"), 217 + /* GPP_C */ 218 + PINCTRL_PIN(162, "GPPC_C_0"), 219 + PINCTRL_PIN(163, "GPPC_C_1"), 220 + PINCTRL_PIN(164, "GPPC_C_2"), 221 + PINCTRL_PIN(165, "GPPC_C_3"), 222 + PINCTRL_PIN(166, "GPPC_C_4"), 223 + PINCTRL_PIN(167, "GPPC_C_5"), 224 + PINCTRL_PIN(168, "SUSWARNB_SUSPWRDNACK"), 225 + PINCTRL_PIN(169, "SUSACKB"), 226 + PINCTRL_PIN(170, "UART0_RXD"), 227 + PINCTRL_PIN(171, "UART0_TXD"), 228 + PINCTRL_PIN(172, "UART0_RTSB"), 229 + PINCTRL_PIN(173, "UART0_CTSB"), 230 + PINCTRL_PIN(174, "UART1_RXD"), 231 + PINCTRL_PIN(175, "UART1_TXD"), 232 + PINCTRL_PIN(176, "UART1_RTSB"), 233 + PINCTRL_PIN(177, "UART1_CTSB"), 234 + PINCTRL_PIN(178, "I2C0_SDA"), 235 + PINCTRL_PIN(179, "I2C0_SCL"), 236 + PINCTRL_PIN(180, "I2C1_SDA"), 237 + PINCTRL_PIN(181, "I2C1_SCL"), 238 + PINCTRL_PIN(182, "UART2_RXD"), 239 + PINCTRL_PIN(183, "UART2_TXD"), 240 + PINCTRL_PIN(184, "UART2_RTSB"), 241 + PINCTRL_PIN(185, "UART2_CTSB"), 242 + /* HVCMOS */ 243 + PINCTRL_PIN(186, "L_BKLTEN"), 244 + PINCTRL_PIN(187, "L_BKLTCTL"), 245 + PINCTRL_PIN(188, "L_VDDEN"), 246 + PINCTRL_PIN(189, "SYS_PWROK"), 247 + PINCTRL_PIN(190, "SYS_RESETB"), 248 + PINCTRL_PIN(191, "MLK_RSTB"), 249 + /* GPP_E */ 250 + PINCTRL_PIN(192, "ISH_GP_0"), 251 + PINCTRL_PIN(193, "ISH_GP_1"), 252 + PINCTRL_PIN(194, "IMGCLKOUT_1"), 253 + PINCTRL_PIN(195, "ISH_GP_2"), 254 + PINCTRL_PIN(196, "IMGCLKOUT_2"), 255 + PINCTRL_PIN(197, "SATA_LEDB"), 256 + PINCTRL_PIN(198, "IMGCLKOUT_3"), 257 + PINCTRL_PIN(199, "ISH_GP_3"), 258 + PINCTRL_PIN(200, "ISH_GP_4"), 259 + PINCTRL_PIN(201, "ISH_GP_5"), 260 + PINCTRL_PIN(202, "ISH_GP_6"), 261 + PINCTRL_PIN(203, "ISH_GP_7"), 262 + PINCTRL_PIN(204, "IMGCLKOUT_4"), 263 + PINCTRL_PIN(205, "DDPA_CTRLCLK"), 264 + PINCTRL_PIN(206, "DDPA_CTRLDATA"), 265 + PINCTRL_PIN(207, "DDPB_CTRLCLK"), 266 + PINCTRL_PIN(208, "DDPB_CTRLDATA"), 267 + PINCTRL_PIN(209, "DDPC_CTRLCLK"), 268 + PINCTRL_PIN(210, "DDPC_CTRLDATA"), 269 + PINCTRL_PIN(211, "IMGCLKOUT_5"), 270 + PINCTRL_PIN(212, "CNV_BRI_DT"), 271 + PINCTRL_PIN(213, "CNV_BRI_RSP"), 272 + PINCTRL_PIN(214, "CNV_RGI_DT"), 273 + PINCTRL_PIN(215, "CNV_RGI_RSP"), 274 + /* GPP_G */ 275 + PINCTRL_PIN(216, "SD3_CMD"), 276 + PINCTRL_PIN(217, "SD3_D0"), 277 + PINCTRL_PIN(218, "SD3_D1"), 278 + PINCTRL_PIN(219, "SD3_D2"), 279 + PINCTRL_PIN(220, "SD3_D3"), 280 + PINCTRL_PIN(221, "SD3_CDB"), 281 + PINCTRL_PIN(222, "SD3_CLK"), 282 + PINCTRL_PIN(223, "SD3_WP"), 283 + }; 284 + 285 + static const struct intel_padgroup jsl_community0_gpps[] = { 286 + JSL_GPP(0, 0, 19, 320), /* GPP_F */ 287 + JSL_GPP(1, 20, 45, 32), /* GPP_B */ 288 + JSL_GPP(2, 46, 66, 64), /* GPP_A */ 289 + JSL_GPP(3, 67, 74, 96), /* GPP_S */ 290 + JSL_GPP(4, 75, 82, 128), /* GPP_R */ 291 + }; 292 + 293 + static const struct intel_padgroup jsl_community1_gpps[] = { 294 + JSL_GPP(0, 83, 106, 160), /* GPP_H */ 295 + JSL_GPP(1, 107, 132, 192), /* GPP_D */ 296 + JSL_GPP(2, 133, 161, 224), /* vGPIO */ 297 + JSL_GPP(3, 162, 185, 256), /* GPP_C */ 298 + }; 299 + 300 + static const struct intel_padgroup jsl_community4_gpps[] = { 301 + JSL_GPP(0, 186, 191, INTEL_GPIO_BASE_NOMAP), /* HVCMOS */ 302 + JSL_GPP(1, 192, 215, 288), /* GPP_E */ 303 + }; 304 + 305 + static const struct intel_padgroup jsl_community5_gpps[] = { 306 + JSL_GPP(0, 216, 223, INTEL_GPIO_BASE_ZERO), /* GPP_G */ 307 + }; 308 + 309 + static const struct intel_community jsl_communities[] = { 310 + JSL_COMMUNITY(0, 0, 82, jsl_community0_gpps), 311 + JSL_COMMUNITY(1, 83, 185, jsl_community1_gpps), 312 + JSL_COMMUNITY(2, 186, 215, jsl_community4_gpps), 313 + JSL_COMMUNITY(3, 216, 223, jsl_community5_gpps), 314 + }; 315 + 316 + static const struct intel_pinctrl_soc_data jsl_soc_data = { 317 + .pins = jsl_pins, 318 + .npins = ARRAY_SIZE(jsl_pins), 319 + .communities = jsl_communities, 320 + .ncommunities = ARRAY_SIZE(jsl_communities), 321 + }; 322 + 323 + static const struct acpi_device_id jsl_pinctrl_acpi_match[] = { 324 + { "INT34C8", (kernel_ulong_t)&jsl_soc_data }, 325 + { } 326 + }; 327 + MODULE_DEVICE_TABLE(acpi, jsl_pinctrl_acpi_match); 328 + 329 + static INTEL_PINCTRL_PM_OPS(jsl_pinctrl_pm_ops); 330 + 331 + static struct platform_driver jsl_pinctrl_driver = { 332 + .probe = intel_pinctrl_probe_by_hid, 333 + .driver = { 334 + .name = "jasperlake-pinctrl", 335 + .acpi_match_table = jsl_pinctrl_acpi_match, 336 + .pm = &jsl_pinctrl_pm_ops, 337 + }, 338 + }; 339 + 340 + module_platform_driver(jsl_pinctrl_driver); 341 + 342 + MODULE_AUTHOR("Andy Shevchenko <andriy.shevchenko@linux.intel.com>"); 343 + MODULE_DESCRIPTION("Intel Jasper Lake PCH pinctrl/GPIO driver"); 344 + MODULE_LICENSE("GPL v2");
+5 -5
drivers/pinctrl/intel/pinctrl-lynxpoint.c
··· 794 794 const struct intel_pinctrl_soc_data *soc; 795 795 struct intel_pinctrl *lg; 796 796 struct gpio_chip *gc; 797 - struct resource *io_rc, *irq_rc; 798 797 struct device *dev = &pdev->dev; 798 + struct resource *io_rc; 799 799 void __iomem *regs; 800 800 unsigned int i; 801 - int ret; 801 + int irq, ret; 802 802 803 803 soc = (const struct intel_pinctrl_soc_data *)device_get_match_data(dev); 804 804 if (!soc) ··· 870 870 gc->parent = dev; 871 871 872 872 /* set up interrupts */ 873 - irq_rc = platform_get_resource(pdev, IORESOURCE_IRQ, 0); 874 - if (irq_rc && irq_rc->start) { 873 + irq = platform_get_irq_optional(pdev, 0); 874 + if (irq > 0) { 875 875 struct gpio_irq_chip *girq; 876 876 877 877 girq = &gc->irq; ··· 884 884 GFP_KERNEL); 885 885 if (!girq->parents) 886 886 return -ENOMEM; 887 - girq->parents[0] = (unsigned int)irq_rc->start; 887 + girq->parents[0] = irq; 888 888 girq->default_type = IRQ_TYPE_NONE; 889 889 girq->handler = handle_bad_irq; 890 890 }
+15 -17
drivers/pinctrl/intel/pinctrl-tigerlake.c
··· 21 21 #define TGL_GPI_IS 0x100 22 22 #define TGL_GPI_IE 0x120 23 23 24 - #define TGL_NO_GPIO -1 25 - 26 24 #define TGL_GPP(r, s, e, g) \ 27 25 { \ 28 26 .reg_num = (r), \ ··· 340 342 }; 341 343 342 344 static const struct intel_padgroup tgllp_community0_gpps[] = { 343 - TGL_GPP(0, 0, 25, 0), /* GPP_B */ 344 - TGL_GPP(1, 26, 41, 32), /* GPP_T */ 345 - TGL_GPP(2, 42, 66, 64), /* GPP_A */ 345 + TGL_GPP(0, 0, 25, 0), /* GPP_B */ 346 + TGL_GPP(1, 26, 41, 32), /* GPP_T */ 347 + TGL_GPP(2, 42, 66, 64), /* GPP_A */ 346 348 }; 347 349 348 350 static const struct intel_padgroup tgllp_community1_gpps[] = { 349 - TGL_GPP(0, 67, 74, 96), /* GPP_S */ 350 - TGL_GPP(1, 75, 98, 128), /* GPP_H */ 351 - TGL_GPP(2, 99, 119, 160), /* GPP_D */ 352 - TGL_GPP(3, 120, 143, 192), /* GPP_U */ 353 - TGL_GPP(4, 144, 170, 224), /* vGPIO */ 351 + TGL_GPP(0, 67, 74, 96), /* GPP_S */ 352 + TGL_GPP(1, 75, 98, 128), /* GPP_H */ 353 + TGL_GPP(2, 99, 119, 160), /* GPP_D */ 354 + TGL_GPP(3, 120, 143, 192), /* GPP_U */ 355 + TGL_GPP(4, 144, 170, 224), /* vGPIO */ 354 356 }; 355 357 356 358 static const struct intel_padgroup tgllp_community4_gpps[] = { 357 - TGL_GPP(0, 171, 194, 256), /* GPP_C */ 358 - TGL_GPP(1, 195, 219, 288), /* GPP_F */ 359 - TGL_GPP(2, 220, 225, TGL_NO_GPIO), /* HVCMOS */ 360 - TGL_GPP(3, 226, 250, 320), /* GPP_E */ 361 - TGL_GPP(4, 251, 259, TGL_NO_GPIO), /* JTAG */ 359 + TGL_GPP(0, 171, 194, 256), /* GPP_C */ 360 + TGL_GPP(1, 195, 219, 288), /* GPP_F */ 361 + TGL_GPP(2, 220, 225, INTEL_GPIO_BASE_NOMAP), /* HVCMOS */ 362 + TGL_GPP(3, 226, 250, 320), /* GPP_E */ 363 + TGL_GPP(4, 251, 259, INTEL_GPIO_BASE_NOMAP), /* JTAG */ 362 364 }; 363 365 364 366 static const struct intel_padgroup tgllp_community5_gpps[] = { 365 - TGL_GPP(0, 260, 267, 352), /* GPP_R */ 366 - TGL_GPP(1, 268, 276, TGL_NO_GPIO), /* SPI */ 367 + TGL_GPP(0, 260, 267, 352), /* GPP_R */ 368 + TGL_GPP(1, 268, 276, INTEL_GPIO_BASE_NOMAP), /* SPI */ 367 369 }; 368 370 369 371 static const struct intel_community tgllp_communities[] = {
+10 -3
drivers/pinctrl/mediatek/Kconfig
··· 3 3 depends on ARCH_MEDIATEK || COMPILE_TEST 4 4 5 5 config EINT_MTK 6 - bool "MediaTek External Interrupt Support" 6 + tristate "MediaTek External Interrupt Support" 7 7 depends on PINCTRL_MTK || PINCTRL_MTK_MOORE || PINCTRL_MTK_PARIS || COMPILE_TEST 8 8 select GPIOLIB 9 9 select IRQ_DOMAIN 10 + default y if PINCTRL_MTK || PINCTRL_MTK_MOORE 11 + default PINCTRL_MTK_PARIS 10 12 11 13 config PINCTRL_MTK 12 14 bool ··· 19 17 select EINT_MTK 20 18 select OF_GPIO 21 19 20 + config PINCTRL_MTK_V2 21 + tristate 22 + 22 23 config PINCTRL_MTK_MOORE 23 24 bool 24 25 depends on OF ··· 30 25 select GENERIC_PINMUX_FUNCTIONS 31 26 select GPIOLIB 32 27 select OF_GPIO 28 + select PINCTRL_MTK_V2 33 29 34 30 config PINCTRL_MTK_PARIS 35 - bool 31 + tristate 36 32 depends on OF 37 33 select PINMUX 38 34 select GENERIC_PINCONF 39 35 select GPIOLIB 40 36 select EINT_MTK 41 37 select OF_GPIO 38 + select PINCTRL_MTK_V2 42 39 43 40 # For ARMv7 SoCs 44 41 config PINCTRL_MT2701 ··· 87 80 select PINCTRL_MTK 88 81 89 82 config PINCTRL_MT6765 90 - bool "Mediatek MT6765 pin control" 83 + tristate "Mediatek MT6765 pin control" 91 84 depends on OF 92 85 depends on ARM64 || COMPILE_TEST 93 86 default ARM64 && ARCH_MEDIATEK
+3 -2
drivers/pinctrl/mediatek/Makefile
··· 2 2 # Core 3 3 obj-$(CONFIG_EINT_MTK) += mtk-eint.o 4 4 obj-$(CONFIG_PINCTRL_MTK) += pinctrl-mtk-common.o 5 - obj-$(CONFIG_PINCTRL_MTK_MOORE) += pinctrl-moore.o pinctrl-mtk-common-v2.o 6 - obj-$(CONFIG_PINCTRL_MTK_PARIS) += pinctrl-paris.o pinctrl-mtk-common-v2.o 5 + obj-$(CONFIG_PINCTRL_MTK_V2) += pinctrl-mtk-common-v2.o 6 + obj-$(CONFIG_PINCTRL_MTK_MOORE) += pinctrl-moore.o 7 + obj-$(CONFIG_PINCTRL_MTK_PARIS) += pinctrl-paris.o 7 8 8 9 # SoC Drivers 9 10 obj-$(CONFIG_PINCTRL_MT2701) += pinctrl-mt2701.o
+9
drivers/pinctrl/mediatek/mtk-eint.c
··· 15 15 #include <linux/io.h> 16 16 #include <linux/irqchip/chained_irq.h> 17 17 #include <linux/irqdomain.h> 18 + #include <linux/module.h> 18 19 #include <linux/of_irq.h> 19 20 #include <linux/platform_device.h> 20 21 ··· 380 379 381 380 return 0; 382 381 } 382 + EXPORT_SYMBOL_GPL(mtk_eint_do_suspend); 383 383 384 384 int mtk_eint_do_resume(struct mtk_eint *eint) 385 385 { ··· 388 386 389 387 return 0; 390 388 } 389 + EXPORT_SYMBOL_GPL(mtk_eint_do_resume); 391 390 392 391 int mtk_eint_set_debounce(struct mtk_eint *eint, unsigned long eint_num, 393 392 unsigned int debounce) ··· 443 440 444 441 return 0; 445 442 } 443 + EXPORT_SYMBOL_GPL(mtk_eint_set_debounce); 446 444 447 445 int mtk_eint_find_irq(struct mtk_eint *eint, unsigned long eint_n) 448 446 { ··· 455 451 456 452 return irq; 457 453 } 454 + EXPORT_SYMBOL_GPL(mtk_eint_find_irq); 458 455 459 456 int mtk_eint_do_init(struct mtk_eint *eint) 460 457 { ··· 500 495 501 496 return 0; 502 497 } 498 + EXPORT_SYMBOL_GPL(mtk_eint_do_init); 499 + 500 + MODULE_LICENSE("GPL v2"); 501 + MODULE_DESCRIPTION("MediaTek EINT Driver");
+4
drivers/pinctrl/mediatek/pinctrl-mt6765.c
··· 6 6 * 7 7 */ 8 8 9 + #include <linux/module.h> 9 10 #include "pinctrl-mtk-mt6765.h" 10 11 #include "pinctrl-paris.h" 11 12 ··· 1104 1103 return platform_driver_register(&mt6765_pinctrl_driver); 1105 1104 } 1106 1105 arch_initcall(mt6765_pinctrl_init); 1106 + 1107 + MODULE_LICENSE("GPL v2"); 1108 + MODULE_DESCRIPTION("MediaTek MT6765 Pinctrl Driver");
+28
drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c
··· 12 12 #include <linux/gpio/driver.h> 13 13 #include <linux/platform_device.h> 14 14 #include <linux/io.h> 15 + #include <linux/module.h> 15 16 #include <linux/of_irq.h> 16 17 17 18 #include "mtk-eint.h" ··· 205 204 206 205 return 0; 207 206 } 207 + EXPORT_SYMBOL_GPL(mtk_hw_set_value); 208 208 209 209 int mtk_hw_get_value(struct mtk_pinctrl *hw, const struct mtk_pin_desc *desc, 210 210 int field, int *value) ··· 225 223 226 224 return 0; 227 225 } 226 + EXPORT_SYMBOL_GPL(mtk_hw_get_value); 228 227 229 228 static int mtk_xt_find_eint_num(struct mtk_pinctrl *hw, unsigned long eint_n) 230 229 { ··· 364 361 365 362 return mtk_eint_do_init(hw->eint); 366 363 } 364 + EXPORT_SYMBOL_GPL(mtk_build_eint); 367 365 368 366 /* Revision 0 */ 369 367 int mtk_pinconf_bias_disable_set(struct mtk_pinctrl *hw, ··· 384 380 385 381 return 0; 386 382 } 383 + EXPORT_SYMBOL_GPL(mtk_pinconf_bias_disable_set); 387 384 388 385 int mtk_pinconf_bias_disable_get(struct mtk_pinctrl *hw, 389 386 const struct mtk_pin_desc *desc, int *res) ··· 407 402 408 403 return 0; 409 404 } 405 + EXPORT_SYMBOL_GPL(mtk_pinconf_bias_disable_get); 410 406 411 407 int mtk_pinconf_bias_set(struct mtk_pinctrl *hw, 412 408 const struct mtk_pin_desc *desc, bool pullup) ··· 427 421 428 422 return 0; 429 423 } 424 + EXPORT_SYMBOL_GPL(mtk_pinconf_bias_set); 430 425 431 426 int mtk_pinconf_bias_get(struct mtk_pinctrl *hw, 432 427 const struct mtk_pin_desc *desc, bool pullup, int *res) ··· 447 440 448 441 return 0; 449 442 } 443 + EXPORT_SYMBOL_GPL(mtk_pinconf_bias_get); 450 444 451 445 /* Revision 1 */ 452 446 int mtk_pinconf_bias_disable_set_rev1(struct mtk_pinctrl *hw, ··· 462 454 463 455 return 0; 464 456 } 457 + EXPORT_SYMBOL_GPL(mtk_pinconf_bias_disable_set_rev1); 465 458 466 459 int mtk_pinconf_bias_disable_get_rev1(struct mtk_pinctrl *hw, 467 460 const struct mtk_pin_desc *desc, int *res) ··· 480 471 481 472 return 0; 482 473 } 474 + EXPORT_SYMBOL_GPL(mtk_pinconf_bias_disable_get_rev1); 483 475 484 476 int mtk_pinconf_bias_set_rev1(struct mtk_pinctrl *hw, 485 477 const struct mtk_pin_desc *desc, bool pullup) ··· 500 490 501 491 return 0; 502 492 } 493 + EXPORT_SYMBOL_GPL(mtk_pinconf_bias_set_rev1); 503 494 504 495 int mtk_pinconf_bias_get_rev1(struct mtk_pinctrl *hw, 505 496 const struct mtk_pin_desc *desc, bool pullup, ··· 526 515 527 516 return 0; 528 517 } 518 + EXPORT_SYMBOL_GPL(mtk_pinconf_bias_get_rev1); 529 519 530 520 /* Combo for the following pull register type: 531 521 * 1. PU + PD ··· 727 715 out: 728 716 return err; 729 717 } 718 + EXPORT_SYMBOL_GPL(mtk_pinconf_bias_set_combo); 730 719 731 720 int mtk_pinconf_bias_get_combo(struct mtk_pinctrl *hw, 732 721 const struct mtk_pin_desc *desc, ··· 748 735 out: 749 736 return err; 750 737 } 738 + EXPORT_SYMBOL_GPL(mtk_pinconf_bias_get_combo); 751 739 752 740 /* Revision 0 */ 753 741 int mtk_pinconf_drive_set(struct mtk_pinctrl *hw, ··· 778 764 779 765 return err; 780 766 } 767 + EXPORT_SYMBOL_GPL(mtk_pinconf_drive_set); 781 768 782 769 int mtk_pinconf_drive_get(struct mtk_pinctrl *hw, 783 770 const struct mtk_pin_desc *desc, int *val) ··· 803 788 804 789 return 0; 805 790 } 791 + EXPORT_SYMBOL_GPL(mtk_pinconf_drive_get); 806 792 807 793 /* Revision 1 */ 808 794 int mtk_pinconf_drive_set_rev1(struct mtk_pinctrl *hw, ··· 825 809 826 810 return err; 827 811 } 812 + EXPORT_SYMBOL_GPL(mtk_pinconf_drive_set_rev1); 828 813 829 814 int mtk_pinconf_drive_get_rev1(struct mtk_pinctrl *hw, 830 815 const struct mtk_pin_desc *desc, int *val) ··· 843 826 844 827 return 0; 845 828 } 829 + EXPORT_SYMBOL_GPL(mtk_pinconf_drive_get_rev1); 846 830 847 831 int mtk_pinconf_drive_set_raw(struct mtk_pinctrl *hw, 848 832 const struct mtk_pin_desc *desc, u32 arg) 849 833 { 850 834 return mtk_hw_set_value(hw, desc, PINCTRL_PIN_REG_DRV, arg); 851 835 } 836 + EXPORT_SYMBOL_GPL(mtk_pinconf_drive_set_raw); 852 837 853 838 int mtk_pinconf_drive_get_raw(struct mtk_pinctrl *hw, 854 839 const struct mtk_pin_desc *desc, int *val) 855 840 { 856 841 return mtk_hw_get_value(hw, desc, PINCTRL_PIN_REG_DRV, val); 857 842 } 843 + EXPORT_SYMBOL_GPL(mtk_pinconf_drive_get_raw); 858 844 859 845 int mtk_pinconf_adv_pull_set(struct mtk_pinctrl *hw, 860 846 const struct mtk_pin_desc *desc, bool pullup, ··· 898 878 899 879 return err; 900 880 } 881 + EXPORT_SYMBOL_GPL(mtk_pinconf_adv_pull_set); 901 882 902 883 int mtk_pinconf_adv_pull_get(struct mtk_pinctrl *hw, 903 884 const struct mtk_pin_desc *desc, bool pullup, ··· 941 920 942 921 return 0; 943 922 } 923 + EXPORT_SYMBOL_GPL(mtk_pinconf_adv_pull_get); 944 924 945 925 int mtk_pinconf_adv_drive_set(struct mtk_pinctrl *hw, 946 926 const struct mtk_pin_desc *desc, u32 arg) ··· 968 946 969 947 return err; 970 948 } 949 + EXPORT_SYMBOL_GPL(mtk_pinconf_adv_drive_set); 971 950 972 951 int mtk_pinconf_adv_drive_get(struct mtk_pinctrl *hw, 973 952 const struct mtk_pin_desc *desc, u32 *val) ··· 992 969 993 970 return 0; 994 971 } 972 + EXPORT_SYMBOL_GPL(mtk_pinconf_adv_drive_get); 973 + 974 + MODULE_LICENSE("GPL v2"); 975 + MODULE_AUTHOR("Sean Wang <sean.wang@mediatek.com>"); 976 + MODULE_DESCRIPTION("Pin configuration library module for mediatek SoCs");
+6
drivers/pinctrl/mediatek/pinctrl-paris.c
··· 10 10 */ 11 11 12 12 #include <linux/gpio/driver.h> 13 + #include <linux/module.h> 13 14 #include <dt-bindings/pinctrl/mt65xx.h> 14 15 #include "pinctrl-paris.h" 15 16 ··· 632 631 633 632 return len; 634 633 } 634 + EXPORT_SYMBOL_GPL(mtk_pctrl_show_one_pin); 635 635 636 636 #define PIN_DBG_BUF_SZ 96 637 637 static void mtk_pctrl_dbg_show(struct pinctrl_dev *pctldev, struct seq_file *s, ··· 1021 1019 1022 1020 return 0; 1023 1021 } 1022 + EXPORT_SYMBOL_GPL(mtk_paris_pinctrl_probe); 1024 1023 1025 1024 static int mtk_paris_pinctrl_suspend(struct device *device) 1026 1025 { ··· 1041 1038 .suspend_noirq = mtk_paris_pinctrl_suspend, 1042 1039 .resume_noirq = mtk_paris_pinctrl_resume, 1043 1040 }; 1041 + 1042 + MODULE_LICENSE("GPL v2"); 1043 + MODULE_DESCRIPTION("MediaTek Pinctrl Common Driver V2 Paris");
+14
drivers/pinctrl/meson/pinctrl-meson.c
··· 549 549 .is_generic = true, 550 550 }; 551 551 552 + static int meson_gpio_get_direction(struct gpio_chip *chip, unsigned gpio) 553 + { 554 + struct meson_pinctrl *pc = gpiochip_get_data(chip); 555 + int ret; 556 + 557 + ret = meson_pinconf_get_output(pc, gpio); 558 + if (ret < 0) 559 + return ret; 560 + 561 + return ret ? GPIO_LINE_DIRECTION_OUT : GPIO_LINE_DIRECTION_IN; 562 + } 563 + 552 564 static int meson_gpio_direction_input(struct gpio_chip *chip, unsigned gpio) 553 565 { 554 566 return meson_pinconf_set_output(gpiochip_get_data(chip), gpio, false); ··· 603 591 pc->chip.parent = pc->dev; 604 592 pc->chip.request = gpiochip_generic_request; 605 593 pc->chip.free = gpiochip_generic_free; 594 + pc->chip.set_config = gpiochip_generic_config; 595 + pc->chip.get_direction = meson_gpio_get_direction; 606 596 pc->chip.direction_input = meson_gpio_direction_input; 607 597 pc->chip.direction_output = meson_gpio_direction_output; 608 598 pc->chip.get = meson_gpio_get;
+1
drivers/pinctrl/nomadik/pinctrl-ab8505.c
··· 178 178 AB8505_PIN_GROUP(gpio40_a_1, ABX500_ALT_A), 179 179 AB8505_PIN_GROUP(gpio41_a_1, ABX500_ALT_A), 180 180 AB8505_PIN_GROUP(uartrxdata_a_1, ABX500_ALT_A), 181 + AB8505_PIN_GROUP(gpio50_a_1, ABX500_ALT_A), 181 182 AB8505_PIN_GROUP(gpio52_a_1, ABX500_ALT_A), 182 183 AB8505_PIN_GROUP(gpio53_a_1, ABX500_ALT_A), 183 184 AB8505_PIN_GROUP(pdmdata_b_1, ABX500_ALT_B),
+5 -1
drivers/pinctrl/nomadik/pinctrl-nomadik-db8500.c
··· 691 691 DB8500_PIN_GROUP(lcd_d8_d11_a_1, NMK_GPIO_ALT_A), 692 692 DB8500_PIN_GROUP(lcd_d12_d23_a_1, NMK_GPIO_ALT_A), 693 693 DB8500_PIN_GROUP(kp_a_1, NMK_GPIO_ALT_A), 694 + DB8500_PIN_GROUP(kpskaskb_a_1, NMK_GPIO_ALT_A), 694 695 DB8500_PIN_GROUP(mc2_a_1, NMK_GPIO_ALT_A), 695 696 DB8500_PIN_GROUP(ssp1_a_1, NMK_GPIO_ALT_A), 696 697 DB8500_PIN_GROUP(ssp0_a_1, NMK_GPIO_ALT_A), 697 698 DB8500_PIN_GROUP(i2c0_a_1, NMK_GPIO_ALT_A), 698 699 DB8500_PIN_GROUP(ipgpio0_a_1, NMK_GPIO_ALT_A), 699 700 DB8500_PIN_GROUP(ipgpio1_a_1, NMK_GPIO_ALT_A), 701 + DB8500_PIN_GROUP(modem_a_1, NMK_GPIO_ALT_A), 700 702 DB8500_PIN_GROUP(kp_a_2, NMK_GPIO_ALT_A), 701 703 DB8500_PIN_GROUP(msp2sck_a_1, NMK_GPIO_ALT_A), 702 704 DB8500_PIN_GROUP(msp2_a_1, NMK_GPIO_ALT_A), 703 705 DB8500_PIN_GROUP(mc4_a_1, NMK_GPIO_ALT_A), 704 706 DB8500_PIN_GROUP(mc1_a_1, NMK_GPIO_ALT_A), 705 707 DB8500_PIN_GROUP(mc1_a_2, NMK_GPIO_ALT_A), 708 + DB8500_PIN_GROUP(mc1dir_a_1, NMK_GPIO_ALT_A), 706 709 DB8500_PIN_GROUP(hsir_a_1, NMK_GPIO_ALT_A), 707 710 DB8500_PIN_GROUP(hsit_a_1, NMK_GPIO_ALT_A), 708 711 DB8500_PIN_GROUP(hsit_a_2, NMK_GPIO_ALT_A), ··· 763 760 DB8500_PIN_GROUP(u0_c_1, NMK_GPIO_ALT_C), 764 761 DB8500_PIN_GROUP(ipgpio4_c_1, NMK_GPIO_ALT_C), 765 762 DB8500_PIN_GROUP(ipgpio5_c_1, NMK_GPIO_ALT_C), 766 - DB8500_PIN_GROUP(ipgpio6_c_1, NMK_GPIO_ALT_C), 763 + DB8500_PIN_GROUP(ipgpio6_c_2, NMK_GPIO_ALT_C), 767 764 DB8500_PIN_GROUP(ipgpio7_c_1, NMK_GPIO_ALT_C), 768 765 DB8500_PIN_GROUP(smcleale_c_1, NMK_GPIO_ALT_C), 769 766 DB8500_PIN_GROUP(stmape_c_1, NMK_GPIO_ALT_C), ··· 958 955 FUNCTION(spi0), 959 956 FUNCTION(spi2), 960 957 FUNCTION(remap), 958 + FUNCTION(sbag), 961 959 FUNCTION(ptm), 962 960 FUNCTION(rf), 963 961 FUNCTION(hx),
+1 -3
drivers/pinctrl/nomadik/pinctrl-nomadik.c
··· 1343 1343 1344 1344 static int nmk_dt_pin_config(int index, int val, unsigned long *config) 1345 1345 { 1346 - int ret = 0; 1347 - 1348 1346 if (nmk_cfg_params[index].choice == NULL) 1349 1347 *config = nmk_cfg_params[index].config; 1350 1348 else { ··· 1352 1354 nmk_cfg_params[index].choice[val]; 1353 1355 } 1354 1356 } 1355 - return ret; 1357 + return 0; 1356 1358 } 1357 1359 1358 1360 static const char *nmk_find_pin_name(struct pinctrl_dev *pctldev, const char *pin_name)
+1 -1
drivers/pinctrl/pinctrl-at91-pio4.c
··· 1019 1019 1020 1020 atmel_pioctrl->reg_base = devm_platform_ioremap_resource(pdev, 0); 1021 1021 if (IS_ERR(atmel_pioctrl->reg_base)) 1022 - return -EINVAL; 1022 + return PTR_ERR(atmel_pioctrl->reg_base); 1023 1023 1024 1024 atmel_pioctrl->clk = devm_clk_get(dev, NULL); 1025 1025 if (IS_ERR(atmel_pioctrl->clk)) {
+1
drivers/pinctrl/pinctrl-bm1880.c
··· 408 408 BM1880_PINCTRL_GRP(pwm34), 409 409 BM1880_PINCTRL_GRP(pwm35), 410 410 BM1880_PINCTRL_GRP(pwm36), 411 + BM1880_PINCTRL_GRP(pwm37), 411 412 BM1880_PINCTRL_GRP(i2c0), 412 413 BM1880_PINCTRL_GRP(i2c1), 413 414 BM1880_PINCTRL_GRP(i2c2),
+21
drivers/pinctrl/pinctrl-ingenic.c
··· 1977 1977 .dt_free_map = pinconf_generic_dt_free_map, 1978 1978 }; 1979 1979 1980 + static int ingenic_gpio_irq_request(struct irq_data *data) 1981 + { 1982 + struct gpio_chip *gpio_chip = irq_data_get_irq_chip_data(data); 1983 + int ret; 1984 + 1985 + ret = ingenic_gpio_direction_input(gpio_chip, data->hwirq); 1986 + if (ret) 1987 + return ret; 1988 + 1989 + return gpiochip_reqres_irq(gpio_chip, data->hwirq); 1990 + } 1991 + 1992 + static void ingenic_gpio_irq_release(struct irq_data *data) 1993 + { 1994 + struct gpio_chip *gpio_chip = irq_data_get_irq_chip_data(data); 1995 + 1996 + return gpiochip_relres_irq(gpio_chip, data->hwirq); 1997 + } 1998 + 1980 1999 static int ingenic_pinmux_set_pin_fn(struct ingenic_pinctrl *jzpc, 1981 2000 int pin, int func) 1982 2001 { ··· 2357 2338 jzgc->irq_chip.irq_ack = ingenic_gpio_irq_ack; 2358 2339 jzgc->irq_chip.irq_set_type = ingenic_gpio_irq_set_type; 2359 2340 jzgc->irq_chip.irq_set_wake = ingenic_gpio_irq_set_wake; 2341 + jzgc->irq_chip.irq_request_resources = ingenic_gpio_irq_request; 2342 + jzgc->irq_chip.irq_release_resources = ingenic_gpio_irq_release; 2360 2343 jzgc->irq_chip.flags = IRQCHIP_MASK_ON_SUSPEND; 2361 2344 2362 2345 girq = &jzgc->gc.irq;
+1 -1
drivers/pinctrl/pinctrl-lantiq.c
··· 221 221 return i; 222 222 } 223 223 224 - /* dont assume .mfp is linearly mapped. find the mfp with the correct .pin */ 224 + /* don't assume .mfp is linearly mapped. find the mfp with the correct .pin */ 225 225 static int match_mfp(const struct ltq_pinmux_info *info, int pin) 226 226 { 227 227 int i;
+19 -495
drivers/pinctrl/pinctrl-mcp23s08.c
··· 1 1 // SPDX-License-Identifier: GPL-2.0-only 2 2 /* MCP23S08 SPI/I2C GPIO driver */ 3 3 4 + #include <linux/bitops.h> 4 5 #include <linux/kernel.h> 5 6 #include <linux/device.h> 6 7 #include <linux/mutex.h> 8 + #include <linux/mod_devicetable.h> 7 9 #include <linux/module.h> 10 + #include <linux/export.h> 8 11 #include <linux/gpio/driver.h> 9 - #include <linux/i2c.h> 10 - #include <linux/spi/spi.h> 11 - #include <linux/spi/mcp23s08.h> 12 12 #include <linux/slab.h> 13 13 #include <asm/byteorder.h> 14 14 #include <linux/interrupt.h> 15 - #include <linux/of_device.h> 16 15 #include <linux/regmap.h> 17 16 #include <linux/pinctrl/pinctrl.h> 18 17 #include <linux/pinctrl/pinconf.h> 19 18 #include <linux/pinctrl/pinconf-generic.h> 20 19 21 - /* 22 - * MCP types supported by driver 23 - */ 24 - #define MCP_TYPE_S08 0 25 - #define MCP_TYPE_S17 1 26 - #define MCP_TYPE_008 2 27 - #define MCP_TYPE_017 3 28 - #define MCP_TYPE_S18 4 29 - #define MCP_TYPE_018 5 30 - 31 - #define MCP_MAX_DEV_PER_CS 8 20 + #include "pinctrl-mcp23s08.h" 32 21 33 22 /* Registers are all 8 bits wide. 34 23 * ··· 41 52 #define MCP_INTCAP 0x08 42 53 #define MCP_GPIO 0x09 43 54 #define MCP_OLAT 0x0a 44 - 45 - struct mcp23s08; 46 - 47 - struct mcp23s08 { 48 - u8 addr; 49 - bool irq_active_high; 50 - bool reg_shift; 51 - 52 - u16 irq_rise; 53 - u16 irq_fall; 54 - int irq; 55 - bool irq_controller; 56 - int cached_gpio; 57 - /* lock protects regmap access with bypass/cache flags */ 58 - struct mutex lock; 59 - 60 - struct gpio_chip chip; 61 - struct irq_chip irq_chip; 62 - 63 - struct regmap *regmap; 64 - struct device *dev; 65 - 66 - struct pinctrl_dev *pctldev; 67 - struct pinctrl_desc pinctrl_desc; 68 - }; 69 55 70 56 static const struct reg_default mcp23x08_defaults[] = { 71 57 {.reg = MCP_IODIR, .def = 0xff}, ··· 73 109 .n_yes_ranges = 1, 74 110 }; 75 111 76 - static const struct regmap_config mcp23x08_regmap = { 112 + const struct regmap_config mcp23x08_regmap = { 77 113 .reg_bits = 8, 78 114 .val_bits = 8, 79 115 ··· 85 121 .cache_type = REGCACHE_FLAT, 86 122 .max_register = MCP_OLAT, 87 123 }; 124 + EXPORT_SYMBOL_GPL(mcp23x08_regmap); 88 125 89 126 static const struct reg_default mcp23x16_defaults[] = { 90 127 {.reg = MCP_IODIR << 1, .def = 0xffff}, ··· 118 153 .n_yes_ranges = 1, 119 154 }; 120 155 121 - static const struct regmap_config mcp23x17_regmap = { 156 + const struct regmap_config mcp23x17_regmap = { 122 157 .reg_bits = 8, 123 158 .val_bits = 16, 124 159 ··· 131 166 .cache_type = REGCACHE_FLAT, 132 167 .val_format_endian = REGMAP_ENDIAN_LITTLE, 133 168 }; 169 + EXPORT_SYMBOL_GPL(mcp23x17_regmap); 134 170 135 171 static int mcp_read(struct mcp23s08 *mcp, unsigned int reg, unsigned int *val) 136 172 { ··· 274 308 }; 275 309 276 310 /*----------------------------------------------------------------------*/ 277 - 278 - #ifdef CONFIG_SPI_MASTER 279 - 280 - static int mcp23sxx_spi_write(void *context, const void *data, size_t count) 281 - { 282 - struct mcp23s08 *mcp = context; 283 - struct spi_device *spi = to_spi_device(mcp->dev); 284 - struct spi_message m; 285 - struct spi_transfer t[2] = { { .tx_buf = &mcp->addr, .len = 1, }, 286 - { .tx_buf = data, .len = count, }, }; 287 - 288 - spi_message_init(&m); 289 - spi_message_add_tail(&t[0], &m); 290 - spi_message_add_tail(&t[1], &m); 291 - 292 - return spi_sync(spi, &m); 293 - } 294 - 295 - static int mcp23sxx_spi_gather_write(void *context, 296 - const void *reg, size_t reg_size, 297 - const void *val, size_t val_size) 298 - { 299 - struct mcp23s08 *mcp = context; 300 - struct spi_device *spi = to_spi_device(mcp->dev); 301 - struct spi_message m; 302 - struct spi_transfer t[3] = { { .tx_buf = &mcp->addr, .len = 1, }, 303 - { .tx_buf = reg, .len = reg_size, }, 304 - { .tx_buf = val, .len = val_size, }, }; 305 - 306 - spi_message_init(&m); 307 - spi_message_add_tail(&t[0], &m); 308 - spi_message_add_tail(&t[1], &m); 309 - spi_message_add_tail(&t[2], &m); 310 - 311 - return spi_sync(spi, &m); 312 - } 313 - 314 - static int mcp23sxx_spi_read(void *context, const void *reg, size_t reg_size, 315 - void *val, size_t val_size) 316 - { 317 - struct mcp23s08 *mcp = context; 318 - struct spi_device *spi = to_spi_device(mcp->dev); 319 - u8 tx[2]; 320 - 321 - if (reg_size != 1) 322 - return -EINVAL; 323 - 324 - tx[0] = mcp->addr | 0x01; 325 - tx[1] = *((u8 *) reg); 326 - 327 - return spi_write_then_read(spi, tx, sizeof(tx), val, val_size); 328 - } 329 - 330 - static const struct regmap_bus mcp23sxx_spi_regmap = { 331 - .write = mcp23sxx_spi_write, 332 - .gather_write = mcp23sxx_spi_gather_write, 333 - .read = mcp23sxx_spi_read, 334 - }; 335 - 336 - #endif /* CONFIG_SPI_MASTER */ 337 - 338 - /*----------------------------------------------------------------------*/ 339 - 340 - /* A given spi_device can represent up to eight mcp23sxx chips 341 - * sharing the same chipselect but using different addresses 342 - * (e.g. chips #0 and #3 might be populated, but not #1 or $2). 343 - * Driver data holds all the per-chip data. 344 - */ 345 - struct mcp23s08_driver_data { 346 - unsigned ngpio; 347 - struct mcp23s08 *mcp[8]; 348 - struct mcp23s08 chip[]; 349 - }; 350 - 351 311 352 312 static int mcp23s08_direction_input(struct gpio_chip *chip, unsigned offset) 353 313 { ··· 454 562 struct gpio_chip *gc = irq_data_get_irq_chip_data(data); 455 563 struct mcp23s08 *mcp = gpiochip_get_data(gc); 456 564 unsigned int pos = data->hwirq; 457 - int status = 0; 458 565 459 566 if ((type & IRQ_TYPE_EDGE_BOTH) == IRQ_TYPE_EDGE_BOTH) { 460 567 mcp_set_bit(mcp, MCP_INTCON, pos, false); ··· 476 585 } else 477 586 return -EINVAL; 478 587 479 - return status; 588 + return 0; 480 589 } 481 590 482 591 static void mcp23s08_irq_bus_lock(struct irq_data *data) ··· 547 656 548 657 /*----------------------------------------------------------------------*/ 549 658 550 - static int mcp23s08_probe_one(struct mcp23s08 *mcp, struct device *dev, 551 - void *data, unsigned addr, unsigned type, 552 - unsigned int base, int cs) 659 + int mcp23s08_probe_one(struct mcp23s08 *mcp, struct device *dev, 660 + unsigned int addr, unsigned int type, unsigned int base) 553 661 { 554 662 int status, ret; 555 663 bool mirror = false; 556 664 bool open_drain = false; 557 - struct regmap_config *one_regmap_config = NULL; 558 - int raw_chip_address = (addr & ~0x40) >> 1; 559 665 560 666 mutex_init(&mcp->lock); 561 667 562 668 mcp->dev = dev; 563 669 mcp->addr = addr; 670 + 564 671 mcp->irq_active_high = false; 672 + mcp->irq_chip.name = dev_name(dev); 673 + mcp->irq_chip.irq_mask = mcp23s08_irq_mask; 674 + mcp->irq_chip.irq_unmask = mcp23s08_irq_unmask; 675 + mcp->irq_chip.irq_set_type = mcp23s08_irq_set_type; 676 + mcp->irq_chip.irq_bus_lock = mcp23s08_irq_bus_lock; 677 + mcp->irq_chip.irq_bus_sync_unlock = mcp23s08_irq_bus_unlock; 565 678 566 679 mcp->chip.direction_input = mcp23s08_direction_input; 567 680 mcp->chip.get = mcp23s08_get; ··· 575 680 mcp->chip.of_gpio_n_cells = 2; 576 681 mcp->chip.of_node = dev->of_node; 577 682 #endif 578 - 579 - switch (type) { 580 - #ifdef CONFIG_SPI_MASTER 581 - case MCP_TYPE_S08: 582 - case MCP_TYPE_S17: 583 - switch (type) { 584 - case MCP_TYPE_S08: 585 - one_regmap_config = 586 - devm_kmemdup(dev, &mcp23x08_regmap, 587 - sizeof(struct regmap_config), GFP_KERNEL); 588 - mcp->reg_shift = 0; 589 - mcp->chip.ngpio = 8; 590 - mcp->chip.label = devm_kasprintf(dev, GFP_KERNEL, 591 - "mcp23s08.%d", raw_chip_address); 592 - break; 593 - case MCP_TYPE_S17: 594 - one_regmap_config = 595 - devm_kmemdup(dev, &mcp23x17_regmap, 596 - sizeof(struct regmap_config), GFP_KERNEL); 597 - mcp->reg_shift = 1; 598 - mcp->chip.ngpio = 16; 599 - mcp->chip.label = devm_kasprintf(dev, GFP_KERNEL, 600 - "mcp23s17.%d", raw_chip_address); 601 - break; 602 - } 603 - if (!one_regmap_config) 604 - return -ENOMEM; 605 - 606 - one_regmap_config->name = devm_kasprintf(dev, GFP_KERNEL, "%d", raw_chip_address); 607 - mcp->regmap = devm_regmap_init(dev, &mcp23sxx_spi_regmap, mcp, 608 - one_regmap_config); 609 - break; 610 - 611 - case MCP_TYPE_S18: 612 - one_regmap_config = 613 - devm_kmemdup(dev, &mcp23x17_regmap, 614 - sizeof(struct regmap_config), GFP_KERNEL); 615 - if (!one_regmap_config) 616 - return -ENOMEM; 617 - mcp->regmap = devm_regmap_init(dev, &mcp23sxx_spi_regmap, mcp, 618 - one_regmap_config); 619 - mcp->reg_shift = 1; 620 - mcp->chip.ngpio = 16; 621 - mcp->chip.label = "mcp23s18"; 622 - break; 623 - #endif /* CONFIG_SPI_MASTER */ 624 - 625 - #if IS_ENABLED(CONFIG_I2C) 626 - case MCP_TYPE_008: 627 - mcp->regmap = devm_regmap_init_i2c(data, &mcp23x08_regmap); 628 - mcp->reg_shift = 0; 629 - mcp->chip.ngpio = 8; 630 - mcp->chip.label = "mcp23008"; 631 - break; 632 - 633 - case MCP_TYPE_017: 634 - mcp->regmap = devm_regmap_init_i2c(data, &mcp23x17_regmap); 635 - mcp->reg_shift = 1; 636 - mcp->chip.ngpio = 16; 637 - mcp->chip.label = "mcp23017"; 638 - break; 639 - 640 - case MCP_TYPE_018: 641 - mcp->regmap = devm_regmap_init_i2c(data, &mcp23x17_regmap); 642 - mcp->reg_shift = 1; 643 - mcp->chip.ngpio = 16; 644 - mcp->chip.label = "mcp23018"; 645 - break; 646 - #endif /* CONFIG_I2C */ 647 - 648 - default: 649 - dev_err(dev, "invalid device type (%d)\n", type); 650 - return -EINVAL; 651 - } 652 - 653 - if (IS_ERR(mcp->regmap)) 654 - return PTR_ERR(mcp->regmap); 655 683 656 684 mcp->chip.base = base; 657 685 mcp->chip.can_sleep = true; ··· 634 816 goto fail; 635 817 } 636 818 637 - if (one_regmap_config) { 638 - mcp->pinctrl_desc.name = devm_kasprintf(dev, GFP_KERNEL, 639 - "mcp23xxx-pinctrl.%d", raw_chip_address); 640 - if (!mcp->pinctrl_desc.name) 641 - return -ENOMEM; 642 - } else { 643 - mcp->pinctrl_desc.name = "mcp23xxx-pinctrl"; 644 - } 645 819 mcp->pinctrl_desc.pctlops = &mcp_pinctrl_ops; 646 820 mcp->pinctrl_desc.confops = &mcp_pinconf_ops; 647 821 mcp->pinctrl_desc.npins = mcp->chip.ngpio; ··· 657 847 dev_dbg(dev, "can't setup chip %d, --> %d\n", addr, ret); 658 848 return ret; 659 849 } 660 - 661 - /*----------------------------------------------------------------------*/ 662 - 663 - #ifdef CONFIG_OF 664 - #ifdef CONFIG_SPI_MASTER 665 - static const struct of_device_id mcp23s08_spi_of_match[] = { 666 - { 667 - .compatible = "microchip,mcp23s08", 668 - .data = (void *) MCP_TYPE_S08, 669 - }, 670 - { 671 - .compatible = "microchip,mcp23s17", 672 - .data = (void *) MCP_TYPE_S17, 673 - }, 674 - { 675 - .compatible = "microchip,mcp23s18", 676 - .data = (void *) MCP_TYPE_S18, 677 - }, 678 - /* NOTE: The use of the mcp prefix is deprecated and will be removed. */ 679 - { 680 - .compatible = "mcp,mcp23s08", 681 - .data = (void *) MCP_TYPE_S08, 682 - }, 683 - { 684 - .compatible = "mcp,mcp23s17", 685 - .data = (void *) MCP_TYPE_S17, 686 - }, 687 - { }, 688 - }; 689 - MODULE_DEVICE_TABLE(of, mcp23s08_spi_of_match); 690 - #endif 691 - 692 - #if IS_ENABLED(CONFIG_I2C) 693 - static const struct of_device_id mcp23s08_i2c_of_match[] = { 694 - { 695 - .compatible = "microchip,mcp23008", 696 - .data = (void *) MCP_TYPE_008, 697 - }, 698 - { 699 - .compatible = "microchip,mcp23017", 700 - .data = (void *) MCP_TYPE_017, 701 - }, 702 - { 703 - .compatible = "microchip,mcp23018", 704 - .data = (void *) MCP_TYPE_018, 705 - }, 706 - /* NOTE: The use of the mcp prefix is deprecated and will be removed. */ 707 - { 708 - .compatible = "mcp,mcp23008", 709 - .data = (void *) MCP_TYPE_008, 710 - }, 711 - { 712 - .compatible = "mcp,mcp23017", 713 - .data = (void *) MCP_TYPE_017, 714 - }, 715 - { }, 716 - }; 717 - MODULE_DEVICE_TABLE(of, mcp23s08_i2c_of_match); 718 - #endif 719 - #endif /* CONFIG_OF */ 720 - 721 - 722 - #if IS_ENABLED(CONFIG_I2C) 723 - 724 - static int mcp230xx_probe(struct i2c_client *client, 725 - const struct i2c_device_id *id) 726 - { 727 - struct mcp23s08_platform_data *pdata, local_pdata; 728 - struct mcp23s08 *mcp; 729 - int status; 730 - 731 - pdata = dev_get_platdata(&client->dev); 732 - if (!pdata) { 733 - pdata = &local_pdata; 734 - pdata->base = -1; 735 - } 736 - 737 - mcp = devm_kzalloc(&client->dev, sizeof(*mcp), GFP_KERNEL); 738 - if (!mcp) 739 - return -ENOMEM; 740 - 741 - mcp->irq = client->irq; 742 - mcp->irq_chip.name = dev_name(&client->dev); 743 - mcp->irq_chip.irq_mask = mcp23s08_irq_mask; 744 - mcp->irq_chip.irq_unmask = mcp23s08_irq_unmask; 745 - mcp->irq_chip.irq_set_type = mcp23s08_irq_set_type; 746 - mcp->irq_chip.irq_bus_lock = mcp23s08_irq_bus_lock; 747 - mcp->irq_chip.irq_bus_sync_unlock = mcp23s08_irq_bus_unlock; 748 - 749 - status = mcp23s08_probe_one(mcp, &client->dev, client, client->addr, 750 - id->driver_data, pdata->base, 0); 751 - if (status) 752 - return status; 753 - 754 - i2c_set_clientdata(client, mcp); 755 - 756 - return 0; 757 - } 758 - 759 - static const struct i2c_device_id mcp230xx_id[] = { 760 - { "mcp23008", MCP_TYPE_008 }, 761 - { "mcp23017", MCP_TYPE_017 }, 762 - { "mcp23018", MCP_TYPE_018 }, 763 - { }, 764 - }; 765 - MODULE_DEVICE_TABLE(i2c, mcp230xx_id); 766 - 767 - static struct i2c_driver mcp230xx_driver = { 768 - .driver = { 769 - .name = "mcp230xx", 770 - .of_match_table = of_match_ptr(mcp23s08_i2c_of_match), 771 - }, 772 - .probe = mcp230xx_probe, 773 - .id_table = mcp230xx_id, 774 - }; 775 - 776 - static int __init mcp23s08_i2c_init(void) 777 - { 778 - return i2c_add_driver(&mcp230xx_driver); 779 - } 780 - 781 - static void mcp23s08_i2c_exit(void) 782 - { 783 - i2c_del_driver(&mcp230xx_driver); 784 - } 785 - 786 - #else 787 - 788 - static int __init mcp23s08_i2c_init(void) { return 0; } 789 - static void mcp23s08_i2c_exit(void) { } 790 - 791 - #endif /* CONFIG_I2C */ 792 - 793 - /*----------------------------------------------------------------------*/ 794 - 795 - #ifdef CONFIG_SPI_MASTER 796 - 797 - static int mcp23s08_probe(struct spi_device *spi) 798 - { 799 - struct mcp23s08_platform_data *pdata, local_pdata; 800 - unsigned addr; 801 - int chips = 0; 802 - struct mcp23s08_driver_data *data; 803 - int status, type; 804 - unsigned ngpio = 0; 805 - const struct of_device_id *match; 806 - 807 - match = of_match_device(of_match_ptr(mcp23s08_spi_of_match), &spi->dev); 808 - if (match) 809 - type = (int)(uintptr_t)match->data; 810 - else 811 - type = spi_get_device_id(spi)->driver_data; 812 - 813 - pdata = dev_get_platdata(&spi->dev); 814 - if (!pdata) { 815 - pdata = &local_pdata; 816 - pdata->base = -1; 817 - 818 - status = device_property_read_u32(&spi->dev, 819 - "microchip,spi-present-mask", &pdata->spi_present_mask); 820 - if (status) { 821 - status = device_property_read_u32(&spi->dev, 822 - "mcp,spi-present-mask", 823 - &pdata->spi_present_mask); 824 - 825 - if (status) { 826 - dev_err(&spi->dev, "missing spi-present-mask"); 827 - return -ENODEV; 828 - } 829 - } 830 - } 831 - 832 - if (!pdata->spi_present_mask || pdata->spi_present_mask > 0xff) { 833 - dev_err(&spi->dev, "invalid spi-present-mask"); 834 - return -ENODEV; 835 - } 836 - 837 - for (addr = 0; addr < MCP_MAX_DEV_PER_CS; addr++) { 838 - if (pdata->spi_present_mask & BIT(addr)) 839 - chips++; 840 - } 841 - 842 - if (!chips) 843 - return -ENODEV; 844 - 845 - data = devm_kzalloc(&spi->dev, 846 - struct_size(data, chip, chips), GFP_KERNEL); 847 - if (!data) 848 - return -ENOMEM; 849 - 850 - spi_set_drvdata(spi, data); 851 - 852 - for (addr = 0; addr < MCP_MAX_DEV_PER_CS; addr++) { 853 - if (!(pdata->spi_present_mask & BIT(addr))) 854 - continue; 855 - chips--; 856 - data->mcp[addr] = &data->chip[chips]; 857 - data->mcp[addr]->irq = spi->irq; 858 - data->mcp[addr]->irq_chip.name = dev_name(&spi->dev); 859 - data->mcp[addr]->irq_chip.irq_mask = mcp23s08_irq_mask; 860 - data->mcp[addr]->irq_chip.irq_unmask = mcp23s08_irq_unmask; 861 - data->mcp[addr]->irq_chip.irq_set_type = mcp23s08_irq_set_type; 862 - data->mcp[addr]->irq_chip.irq_bus_lock = mcp23s08_irq_bus_lock; 863 - data->mcp[addr]->irq_chip.irq_bus_sync_unlock = 864 - mcp23s08_irq_bus_unlock; 865 - status = mcp23s08_probe_one(data->mcp[addr], &spi->dev, spi, 866 - 0x40 | (addr << 1), type, 867 - pdata->base, addr); 868 - if (status < 0) 869 - return status; 870 - 871 - if (pdata->base != -1) 872 - pdata->base += data->mcp[addr]->chip.ngpio; 873 - ngpio += data->mcp[addr]->chip.ngpio; 874 - } 875 - data->ngpio = ngpio; 876 - 877 - return 0; 878 - } 879 - 880 - static const struct spi_device_id mcp23s08_ids[] = { 881 - { "mcp23s08", MCP_TYPE_S08 }, 882 - { "mcp23s17", MCP_TYPE_S17 }, 883 - { "mcp23s18", MCP_TYPE_S18 }, 884 - { }, 885 - }; 886 - MODULE_DEVICE_TABLE(spi, mcp23s08_ids); 887 - 888 - static struct spi_driver mcp23s08_driver = { 889 - .probe = mcp23s08_probe, 890 - .id_table = mcp23s08_ids, 891 - .driver = { 892 - .name = "mcp23s08", 893 - .of_match_table = of_match_ptr(mcp23s08_spi_of_match), 894 - }, 895 - }; 896 - 897 - static int __init mcp23s08_spi_init(void) 898 - { 899 - return spi_register_driver(&mcp23s08_driver); 900 - } 901 - 902 - static void mcp23s08_spi_exit(void) 903 - { 904 - spi_unregister_driver(&mcp23s08_driver); 905 - } 906 - 907 - #else 908 - 909 - static int __init mcp23s08_spi_init(void) { return 0; } 910 - static void mcp23s08_spi_exit(void) { } 911 - 912 - #endif /* CONFIG_SPI_MASTER */ 913 - 914 - /*----------------------------------------------------------------------*/ 915 - 916 - static int __init mcp23s08_init(void) 917 - { 918 - int ret; 919 - 920 - ret = mcp23s08_spi_init(); 921 - if (ret) 922 - goto spi_fail; 923 - 924 - ret = mcp23s08_i2c_init(); 925 - if (ret) 926 - goto i2c_fail; 927 - 928 - return 0; 929 - 930 - i2c_fail: 931 - mcp23s08_spi_exit(); 932 - spi_fail: 933 - return ret; 934 - } 935 - /* register after spi/i2c postcore initcall and before 936 - * subsys initcalls that may rely on these GPIOs 937 - */ 938 - subsys_initcall(mcp23s08_init); 939 - 940 - static void __exit mcp23s08_exit(void) 941 - { 942 - mcp23s08_spi_exit(); 943 - mcp23s08_i2c_exit(); 944 - } 945 - module_exit(mcp23s08_exit); 946 - 850 + EXPORT_SYMBOL_GPL(mcp23s08_probe_one); 947 851 MODULE_LICENSE("GPL");
+52
drivers/pinctrl/pinctrl-mcp23s08.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0-only */ 2 + /* MCP23S08 SPI/I2C GPIO driver */ 3 + 4 + #include <linux/gpio/driver.h> 5 + #include <linux/irq.h> 6 + #include <linux/mutex.h> 7 + #include <linux/pinctrl/pinctrl.h> 8 + #include <linux/types.h> 9 + 10 + /* 11 + * MCP types supported by driver 12 + */ 13 + #define MCP_TYPE_S08 1 14 + #define MCP_TYPE_S17 2 15 + #define MCP_TYPE_008 3 16 + #define MCP_TYPE_017 4 17 + #define MCP_TYPE_S18 5 18 + #define MCP_TYPE_018 6 19 + 20 + struct device; 21 + struct regmap; 22 + 23 + struct pinctrl_dev; 24 + 25 + struct mcp23s08 { 26 + u8 addr; 27 + bool irq_active_high; 28 + bool reg_shift; 29 + 30 + u16 irq_rise; 31 + u16 irq_fall; 32 + int irq; 33 + bool irq_controller; 34 + int cached_gpio; 35 + /* lock protects regmap access with bypass/cache flags */ 36 + struct mutex lock; 37 + 38 + struct gpio_chip chip; 39 + struct irq_chip irq_chip; 40 + 41 + struct regmap *regmap; 42 + struct device *dev; 43 + 44 + struct pinctrl_dev *pctldev; 45 + struct pinctrl_desc pinctrl_desc; 46 + }; 47 + 48 + extern const struct regmap_config mcp23x08_regmap; 49 + extern const struct regmap_config mcp23x17_regmap; 50 + 51 + int mcp23s08_probe_one(struct mcp23s08 *mcp, struct device *dev, 52 + unsigned int addr, unsigned int type, unsigned int base);
+124
drivers/pinctrl/pinctrl-mcp23s08_i2c.c
··· 1 + // SPDX-License-Identifier: GPL-2.0-only 2 + /* MCP23S08 I2C GPIO driver */ 3 + 4 + #include <linux/i2c.h> 5 + #include <linux/mod_devicetable.h> 6 + #include <linux/module.h> 7 + #include <linux/regmap.h> 8 + 9 + #include "pinctrl-mcp23s08.h" 10 + 11 + static int mcp230xx_probe(struct i2c_client *client, const struct i2c_device_id *id) 12 + { 13 + struct device *dev = &client->dev; 14 + unsigned int type = id->driver_data; 15 + struct mcp23s08 *mcp; 16 + int ret; 17 + 18 + mcp = devm_kzalloc(dev, sizeof(*mcp), GFP_KERNEL); 19 + if (!mcp) 20 + return -ENOMEM; 21 + 22 + switch (type) { 23 + case MCP_TYPE_008: 24 + mcp->regmap = devm_regmap_init_i2c(client, &mcp23x08_regmap); 25 + mcp->reg_shift = 0; 26 + mcp->chip.ngpio = 8; 27 + mcp->chip.label = "mcp23008"; 28 + break; 29 + 30 + case MCP_TYPE_017: 31 + mcp->regmap = devm_regmap_init_i2c(client, &mcp23x17_regmap); 32 + mcp->reg_shift = 1; 33 + mcp->chip.ngpio = 16; 34 + mcp->chip.label = "mcp23017"; 35 + break; 36 + 37 + case MCP_TYPE_018: 38 + mcp->regmap = devm_regmap_init_i2c(client, &mcp23x17_regmap); 39 + mcp->reg_shift = 1; 40 + mcp->chip.ngpio = 16; 41 + mcp->chip.label = "mcp23018"; 42 + break; 43 + 44 + default: 45 + dev_err(dev, "invalid device type (%d)\n", type); 46 + return -EINVAL; 47 + } 48 + 49 + if (IS_ERR(mcp->regmap)) 50 + return PTR_ERR(mcp->regmap); 51 + 52 + mcp->irq = client->irq; 53 + mcp->pinctrl_desc.name = "mcp23xxx-pinctrl"; 54 + 55 + ret = mcp23s08_probe_one(mcp, dev, client->addr, type, -1); 56 + if (ret) 57 + return ret; 58 + 59 + i2c_set_clientdata(client, mcp); 60 + 61 + return 0; 62 + } 63 + 64 + static const struct i2c_device_id mcp230xx_id[] = { 65 + { "mcp23008", MCP_TYPE_008 }, 66 + { "mcp23017", MCP_TYPE_017 }, 67 + { "mcp23018", MCP_TYPE_018 }, 68 + { } 69 + }; 70 + MODULE_DEVICE_TABLE(i2c, mcp230xx_id); 71 + 72 + static const struct of_device_id mcp23s08_i2c_of_match[] = { 73 + { 74 + .compatible = "microchip,mcp23008", 75 + .data = (void *) MCP_TYPE_008, 76 + }, 77 + { 78 + .compatible = "microchip,mcp23017", 79 + .data = (void *) MCP_TYPE_017, 80 + }, 81 + { 82 + .compatible = "microchip,mcp23018", 83 + .data = (void *) MCP_TYPE_018, 84 + }, 85 + /* NOTE: The use of the mcp prefix is deprecated and will be removed. */ 86 + { 87 + .compatible = "mcp,mcp23008", 88 + .data = (void *) MCP_TYPE_008, 89 + }, 90 + { 91 + .compatible = "mcp,mcp23017", 92 + .data = (void *) MCP_TYPE_017, 93 + }, 94 + { } 95 + }; 96 + MODULE_DEVICE_TABLE(of, mcp23s08_i2c_of_match); 97 + 98 + static struct i2c_driver mcp230xx_driver = { 99 + .driver = { 100 + .name = "mcp230xx", 101 + .of_match_table = mcp23s08_i2c_of_match, 102 + }, 103 + .probe = mcp230xx_probe, 104 + .id_table = mcp230xx_id, 105 + }; 106 + 107 + static int __init mcp23s08_i2c_init(void) 108 + { 109 + return i2c_add_driver(&mcp230xx_driver); 110 + } 111 + 112 + /* 113 + * Register after I²C postcore initcall and before 114 + * subsys initcalls that may rely on these GPIOs. 115 + */ 116 + subsys_initcall(mcp23s08_i2c_init); 117 + 118 + static void mcp23s08_i2c_exit(void) 119 + { 120 + i2c_del_driver(&mcp230xx_driver); 121 + } 122 + module_exit(mcp23s08_i2c_exit); 123 + 124 + MODULE_LICENSE("GPL");
+262
drivers/pinctrl/pinctrl-mcp23s08_spi.c
··· 1 + // SPDX-License-Identifier: GPL-2.0-only 2 + /* MCP23S08 SPI GPIO driver */ 3 + 4 + #include <linux/mod_devicetable.h> 5 + #include <linux/module.h> 6 + #include <linux/property.h> 7 + #include <linux/regmap.h> 8 + #include <linux/spi/spi.h> 9 + 10 + #include "pinctrl-mcp23s08.h" 11 + 12 + #define MCP_MAX_DEV_PER_CS 8 13 + 14 + /* 15 + * A given spi_device can represent up to eight mcp23sxx chips 16 + * sharing the same chipselect but using different addresses 17 + * (e.g. chips #0 and #3 might be populated, but not #1 or #2). 18 + * Driver data holds all the per-chip data. 19 + */ 20 + struct mcp23s08_driver_data { 21 + unsigned ngpio; 22 + struct mcp23s08 *mcp[8]; 23 + struct mcp23s08 chip[]; 24 + }; 25 + 26 + static int mcp23sxx_spi_write(void *context, const void *data, size_t count) 27 + { 28 + struct mcp23s08 *mcp = context; 29 + struct spi_device *spi = to_spi_device(mcp->dev); 30 + struct spi_message m; 31 + struct spi_transfer t[2] = { { .tx_buf = &mcp->addr, .len = 1, }, 32 + { .tx_buf = data, .len = count, }, }; 33 + 34 + spi_message_init(&m); 35 + spi_message_add_tail(&t[0], &m); 36 + spi_message_add_tail(&t[1], &m); 37 + 38 + return spi_sync(spi, &m); 39 + } 40 + 41 + static int mcp23sxx_spi_gather_write(void *context, 42 + const void *reg, size_t reg_size, 43 + const void *val, size_t val_size) 44 + { 45 + struct mcp23s08 *mcp = context; 46 + struct spi_device *spi = to_spi_device(mcp->dev); 47 + struct spi_message m; 48 + struct spi_transfer t[3] = { { .tx_buf = &mcp->addr, .len = 1, }, 49 + { .tx_buf = reg, .len = reg_size, }, 50 + { .tx_buf = val, .len = val_size, }, }; 51 + 52 + spi_message_init(&m); 53 + spi_message_add_tail(&t[0], &m); 54 + spi_message_add_tail(&t[1], &m); 55 + spi_message_add_tail(&t[2], &m); 56 + 57 + return spi_sync(spi, &m); 58 + } 59 + 60 + static int mcp23sxx_spi_read(void *context, const void *reg, size_t reg_size, 61 + void *val, size_t val_size) 62 + { 63 + struct mcp23s08 *mcp = context; 64 + struct spi_device *spi = to_spi_device(mcp->dev); 65 + u8 tx[2]; 66 + 67 + if (reg_size != 1) 68 + return -EINVAL; 69 + 70 + tx[0] = mcp->addr | 0x01; 71 + tx[1] = *((u8 *) reg); 72 + 73 + return spi_write_then_read(spi, tx, sizeof(tx), val, val_size); 74 + } 75 + 76 + static const struct regmap_bus mcp23sxx_spi_regmap = { 77 + .write = mcp23sxx_spi_write, 78 + .gather_write = mcp23sxx_spi_gather_write, 79 + .read = mcp23sxx_spi_read, 80 + }; 81 + 82 + static int mcp23s08_spi_regmap_init(struct mcp23s08 *mcp, struct device *dev, 83 + unsigned int addr, unsigned int type) 84 + { 85 + const struct regmap_config *config; 86 + struct regmap_config *copy; 87 + const char *name; 88 + 89 + switch (type) { 90 + case MCP_TYPE_S08: 91 + mcp->reg_shift = 0; 92 + mcp->chip.ngpio = 8; 93 + mcp->chip.label = devm_kasprintf(dev, GFP_KERNEL, "mcp23s08.%d", addr); 94 + 95 + config = &mcp23x08_regmap; 96 + name = devm_kasprintf(dev, GFP_KERNEL, "%d", addr); 97 + break; 98 + 99 + case MCP_TYPE_S17: 100 + mcp->reg_shift = 1; 101 + mcp->chip.ngpio = 16; 102 + mcp->chip.label = devm_kasprintf(dev, GFP_KERNEL, "mcp23s17.%d", addr); 103 + 104 + config = &mcp23x17_regmap; 105 + name = devm_kasprintf(dev, GFP_KERNEL, "%d", addr); 106 + break; 107 + 108 + case MCP_TYPE_S18: 109 + mcp->reg_shift = 1; 110 + mcp->chip.ngpio = 16; 111 + mcp->chip.label = "mcp23s18"; 112 + 113 + config = &mcp23x17_regmap; 114 + name = config->name; 115 + break; 116 + 117 + default: 118 + dev_err(dev, "invalid device type (%d)\n", type); 119 + return -EINVAL; 120 + } 121 + 122 + copy = devm_kmemdup(dev, &config, sizeof(config), GFP_KERNEL); 123 + if (!copy) 124 + return -ENOMEM; 125 + 126 + copy->name = name; 127 + 128 + mcp->regmap = devm_regmap_init(dev, &mcp23sxx_spi_regmap, mcp, copy); 129 + if (IS_ERR(mcp->regmap)) 130 + return PTR_ERR(mcp->regmap); 131 + 132 + return 0; 133 + } 134 + 135 + static int mcp23s08_probe(struct spi_device *spi) 136 + { 137 + struct device *dev = &spi->dev; 138 + struct mcp23s08_driver_data *data; 139 + unsigned long spi_present_mask; 140 + const void *match; 141 + unsigned int addr; 142 + unsigned int ngpio = 0; 143 + int chips; 144 + int type; 145 + int ret; 146 + u32 v; 147 + 148 + match = device_get_match_data(dev); 149 + if (match) 150 + type = (int)(uintptr_t)match; 151 + else 152 + type = spi_get_device_id(spi)->driver_data; 153 + 154 + ret = device_property_read_u32(dev, "microchip,spi-present-mask", &v); 155 + if (ret) { 156 + ret = device_property_read_u32(dev, "mcp,spi-present-mask", &v); 157 + if (ret) { 158 + dev_err(dev, "missing spi-present-mask"); 159 + return ret; 160 + } 161 + } 162 + spi_present_mask = v; 163 + 164 + if (!spi_present_mask || spi_present_mask >= BIT(MCP_MAX_DEV_PER_CS)) { 165 + dev_err(dev, "invalid spi-present-mask"); 166 + return -ENODEV; 167 + } 168 + 169 + chips = hweight_long(spi_present_mask); 170 + 171 + data = devm_kzalloc(dev, struct_size(data, chip, chips), GFP_KERNEL); 172 + if (!data) 173 + return -ENOMEM; 174 + 175 + spi_set_drvdata(spi, data); 176 + 177 + for_each_set_bit(addr, &spi_present_mask, MCP_MAX_DEV_PER_CS) { 178 + data->mcp[addr] = &data->chip[--chips]; 179 + data->mcp[addr]->irq = spi->irq; 180 + 181 + ret = mcp23s08_spi_regmap_init(data->mcp[addr], dev, addr, type); 182 + if (ret) 183 + return ret; 184 + 185 + data->mcp[addr]->pinctrl_desc.name = devm_kasprintf(dev, GFP_KERNEL, 186 + "mcp23xxx-pinctrl.%d", 187 + addr); 188 + if (!data->mcp[addr]->pinctrl_desc.name) 189 + return -ENOMEM; 190 + 191 + ret = mcp23s08_probe_one(data->mcp[addr], dev, 0x40 | (addr << 1), type, -1); 192 + if (ret < 0) 193 + return ret; 194 + 195 + ngpio += data->mcp[addr]->chip.ngpio; 196 + } 197 + data->ngpio = ngpio; 198 + 199 + return 0; 200 + } 201 + 202 + static const struct spi_device_id mcp23s08_ids[] = { 203 + { "mcp23s08", MCP_TYPE_S08 }, 204 + { "mcp23s17", MCP_TYPE_S17 }, 205 + { "mcp23s18", MCP_TYPE_S18 }, 206 + { } 207 + }; 208 + MODULE_DEVICE_TABLE(spi, mcp23s08_ids); 209 + 210 + static const struct of_device_id mcp23s08_spi_of_match[] = { 211 + { 212 + .compatible = "microchip,mcp23s08", 213 + .data = (void *) MCP_TYPE_S08, 214 + }, 215 + { 216 + .compatible = "microchip,mcp23s17", 217 + .data = (void *) MCP_TYPE_S17, 218 + }, 219 + { 220 + .compatible = "microchip,mcp23s18", 221 + .data = (void *) MCP_TYPE_S18, 222 + }, 223 + /* NOTE: The use of the mcp prefix is deprecated and will be removed. */ 224 + { 225 + .compatible = "mcp,mcp23s08", 226 + .data = (void *) MCP_TYPE_S08, 227 + }, 228 + { 229 + .compatible = "mcp,mcp23s17", 230 + .data = (void *) MCP_TYPE_S17, 231 + }, 232 + { } 233 + }; 234 + MODULE_DEVICE_TABLE(of, mcp23s08_spi_of_match); 235 + 236 + static struct spi_driver mcp23s08_driver = { 237 + .probe = mcp23s08_probe, 238 + .id_table = mcp23s08_ids, 239 + .driver = { 240 + .name = "mcp23s08", 241 + .of_match_table = mcp23s08_spi_of_match, 242 + }, 243 + }; 244 + 245 + static int __init mcp23s08_spi_init(void) 246 + { 247 + return spi_register_driver(&mcp23s08_driver); 248 + } 249 + 250 + /* 251 + * Register after SPI postcore initcall and before 252 + * subsys initcalls that may rely on these GPIOs. 253 + */ 254 + subsys_initcall(mcp23s08_spi_init); 255 + 256 + static void mcp23s08_spi_exit(void) 257 + { 258 + spi_unregister_driver(&mcp23s08_driver); 259 + } 260 + module_exit(mcp23s08_spi_exit); 261 + 262 + MODULE_LICENSE("GPL");
+47 -80
drivers/pinctrl/pinctrl-ocelot.c
··· 46 46 FUNC_IRQ0_OUT, 47 47 FUNC_IRQ1_IN, 48 48 FUNC_IRQ1_OUT, 49 - FUNC_MIIM1, 50 - FUNC_MIIM2, 49 + FUNC_MIIM, 51 50 FUNC_PCI_WAKE, 52 51 FUNC_PTP0, 53 52 FUNC_PTP1, 54 53 FUNC_PTP2, 55 54 FUNC_PTP3, 56 55 FUNC_PWM, 57 - FUNC_RECO_CLK0, 58 - FUNC_RECO_CLK1, 59 - FUNC_SFP0, 60 - FUNC_SFP1, 61 - FUNC_SFP2, 62 - FUNC_SFP3, 63 - FUNC_SFP4, 64 - FUNC_SFP5, 65 - FUNC_SFP6, 66 - FUNC_SFP7, 67 - FUNC_SFP8, 68 - FUNC_SFP9, 69 - FUNC_SFP10, 70 - FUNC_SFP11, 71 - FUNC_SFP12, 72 - FUNC_SFP13, 73 - FUNC_SFP14, 74 - FUNC_SFP15, 56 + FUNC_RECO_CLK, 57 + FUNC_SFP, 75 58 FUNC_SG0, 76 59 FUNC_SG1, 77 60 FUNC_SG2, ··· 75 92 [FUNC_IRQ0_OUT] = "irq0_out", 76 93 [FUNC_IRQ1_IN] = "irq1_in", 77 94 [FUNC_IRQ1_OUT] = "irq1_out", 78 - [FUNC_MIIM1] = "miim1", 79 - [FUNC_MIIM2] = "miim2", 95 + [FUNC_MIIM] = "miim", 80 96 [FUNC_PCI_WAKE] = "pci_wake", 81 97 [FUNC_PTP0] = "ptp0", 82 98 [FUNC_PTP1] = "ptp1", 83 99 [FUNC_PTP2] = "ptp2", 84 100 [FUNC_PTP3] = "ptp3", 85 101 [FUNC_PWM] = "pwm", 86 - [FUNC_RECO_CLK0] = "reco_clk0", 87 - [FUNC_RECO_CLK1] = "reco_clk1", 88 - [FUNC_SFP0] = "sfp0", 89 - [FUNC_SFP1] = "sfp1", 90 - [FUNC_SFP2] = "sfp2", 91 - [FUNC_SFP3] = "sfp3", 92 - [FUNC_SFP4] = "sfp4", 93 - [FUNC_SFP5] = "sfp5", 94 - [FUNC_SFP6] = "sfp6", 95 - [FUNC_SFP7] = "sfp7", 96 - [FUNC_SFP8] = "sfp8", 97 - [FUNC_SFP9] = "sfp9", 98 - [FUNC_SFP10] = "sfp10", 99 - [FUNC_SFP11] = "sfp11", 100 - [FUNC_SFP12] = "sfp12", 101 - [FUNC_SFP13] = "sfp13", 102 - [FUNC_SFP14] = "sfp14", 103 - [FUNC_SFP15] = "sfp15", 102 + [FUNC_RECO_CLK] = "reco_clk", 103 + [FUNC_SFP] = "sfp", 104 104 [FUNC_SG0] = "sg0", 105 105 [FUNC_SG1] = "sg1", 106 106 [FUNC_SG2] = "sg2", ··· 134 168 OCELOT_P(7, UART, TWI_SCL_M, NONE); 135 169 OCELOT_P(8, SI, TWI_SCL_M, IRQ0_OUT); 136 170 OCELOT_P(9, SI, TWI_SCL_M, IRQ1_OUT); 137 - OCELOT_P(10, PTP2, TWI_SCL_M, SFP0); 138 - OCELOT_P(11, PTP3, TWI_SCL_M, SFP1); 139 - OCELOT_P(12, UART2, TWI_SCL_M, SFP2); 140 - OCELOT_P(13, UART2, TWI_SCL_M, SFP3); 141 - OCELOT_P(14, MIIM1, TWI_SCL_M, SFP4); 142 - OCELOT_P(15, MIIM1, TWI_SCL_M, SFP5); 171 + OCELOT_P(10, PTP2, TWI_SCL_M, SFP); 172 + OCELOT_P(11, PTP3, TWI_SCL_M, SFP); 173 + OCELOT_P(12, UART2, TWI_SCL_M, SFP); 174 + OCELOT_P(13, UART2, TWI_SCL_M, SFP); 175 + OCELOT_P(14, MIIM, TWI_SCL_M, SFP); 176 + OCELOT_P(15, MIIM, TWI_SCL_M, SFP); 143 177 OCELOT_P(16, TWI, NONE, SI); 144 178 OCELOT_P(17, TWI, TWI_SCL_M, SI); 145 179 OCELOT_P(18, PTP0, TWI_SCL_M, NONE); 146 180 OCELOT_P(19, PTP1, TWI_SCL_M, NONE); 147 - OCELOT_P(20, RECO_CLK0, TACHO, NONE); 148 - OCELOT_P(21, RECO_CLK1, PWM, NONE); 181 + OCELOT_P(20, RECO_CLK, TACHO, TWI_SCL_M); 182 + OCELOT_P(21, RECO_CLK, PWM, TWI_SCL_M); 149 183 150 184 #define OCELOT_PIN(n) { \ 151 185 .number = n, \ ··· 230 264 JAGUAR2_P(41, NONE, TWI_SCL_M); 231 265 JAGUAR2_P(42, NONE, TWI_SCL_M); 232 266 JAGUAR2_P(43, NONE, TWI_SCL_M); 233 - JAGUAR2_P(44, NONE, SFP8); 234 - JAGUAR2_P(45, NONE, SFP9); 235 - JAGUAR2_P(46, NONE, SFP10); 236 - JAGUAR2_P(47, NONE, SFP11); 237 - JAGUAR2_P(48, SFP0, NONE); 238 - JAGUAR2_P(49, SFP1, SI); 239 - JAGUAR2_P(50, SFP2, SI); 240 - JAGUAR2_P(51, SFP3, SI); 241 - JAGUAR2_P(52, SFP4, NONE); 242 - JAGUAR2_P(53, SFP5, NONE); 243 - JAGUAR2_P(54, SFP6, NONE); 244 - JAGUAR2_P(55, SFP7, NONE); 245 - JAGUAR2_P(56, MIIM1, SFP12); 246 - JAGUAR2_P(57, MIIM1, SFP13); 247 - JAGUAR2_P(58, MIIM2, SFP14); 248 - JAGUAR2_P(59, MIIM2, SFP15); 267 + JAGUAR2_P(44, NONE, SFP); 268 + JAGUAR2_P(45, NONE, SFP); 269 + JAGUAR2_P(46, NONE, SFP); 270 + JAGUAR2_P(47, NONE, SFP); 271 + JAGUAR2_P(48, SFP, NONE); 272 + JAGUAR2_P(49, SFP, SI); 273 + JAGUAR2_P(50, SFP, SI); 274 + JAGUAR2_P(51, SFP, SI); 275 + JAGUAR2_P(52, SFP, NONE); 276 + JAGUAR2_P(53, SFP, NONE); 277 + JAGUAR2_P(54, SFP, NONE); 278 + JAGUAR2_P(55, SFP, NONE); 279 + JAGUAR2_P(56, MIIM, SFP); 280 + JAGUAR2_P(57, MIIM, SFP); 281 + JAGUAR2_P(58, MIIM, SFP); 282 + JAGUAR2_P(59, MIIM, SFP); 249 283 JAGUAR2_P(60, NONE, NONE); 250 284 JAGUAR2_P(61, NONE, NONE); 251 285 JAGUAR2_P(62, NONE, NONE); ··· 680 714 struct irq_chip *parent_chip = irq_desc_get_chip(desc); 681 715 struct gpio_chip *chip = irq_desc_get_handler_data(desc); 682 716 struct ocelot_pinctrl *info = gpiochip_get_data(chip); 717 + unsigned int id_reg = OCELOT_GPIO_INTR_IDENT * info->stride; 683 718 unsigned int reg = 0, irq, i; 684 719 unsigned long irqs; 685 720 686 721 for (i = 0; i < info->stride; i++) { 687 - regmap_read(info->map, OCELOT_GPIO_INTR_IDENT + 4 * i, &reg); 722 + regmap_read(info->map, id_reg + 4 * i, &reg); 688 723 if (!reg) 689 724 continue; 690 725 ··· 718 751 gc->of_node = info->dev->of_node; 719 752 gc->label = "ocelot-gpio"; 720 753 721 - irq = irq_of_parse_and_map(pdev->dev.of_node, 0); 722 - if (irq <= 0) 723 - return irq; 724 - 725 - girq = &gc->irq; 726 - girq->chip = &ocelot_irqchip; 727 - girq->parent_handler = ocelot_irq_handler; 728 - girq->num_parents = 1; 729 - girq->parents = devm_kcalloc(&pdev->dev, 1, sizeof(*girq->parents), 730 - GFP_KERNEL); 731 - if (!girq->parents) 732 - return -ENOMEM; 733 - girq->parents[0] = irq; 734 - girq->default_type = IRQ_TYPE_NONE; 735 - girq->handler = handle_edge_irq; 754 + irq = irq_of_parse_and_map(gc->of_node, 0); 755 + if (irq) { 756 + girq = &gc->irq; 757 + girq->chip = &ocelot_irqchip; 758 + girq->parent_handler = ocelot_irq_handler; 759 + girq->num_parents = 1; 760 + girq->parents = devm_kcalloc(&pdev->dev, 1, 761 + sizeof(*girq->parents), 762 + GFP_KERNEL); 763 + if (!girq->parents) 764 + return -ENOMEM; 765 + girq->parents[0] = irq; 766 + girq->default_type = IRQ_TYPE_NONE; 767 + girq->handler = handle_edge_irq; 768 + } 736 769 737 770 ret = devm_gpiochip_add_data(&pdev->dev, gc, info); 738 771 if (ret)
+2 -2
drivers/pinctrl/pinctrl-rk805.c
··· 73 73 int num_pin_groups; 74 74 const struct pinctrl_pin_desc *pins; 75 75 unsigned int num_pins; 76 - struct rk805_pin_config *pin_cfg; 76 + const struct rk805_pin_config *pin_cfg; 77 77 }; 78 78 79 79 enum rk805_pinmux_option { ··· 121 121 #define RK805_GPIO0_VAL_MSK BIT(0) 122 122 #define RK805_GPIO1_VAL_MSK BIT(1) 123 123 124 - static struct rk805_pin_config rk805_gpio_cfgs[] = { 124 + static const struct rk805_pin_config rk805_gpio_cfgs[] = { 125 125 { 126 126 .reg = RK805_OUT_REG, 127 127 .val_msk = RK805_GPIO0_VAL_MSK,
+6 -5
drivers/pinctrl/pinctrl-rockchip.c
··· 508 508 } 509 509 510 510 map_num += grp->npins; 511 - new_map = devm_kcalloc(pctldev->dev, map_num, sizeof(*new_map), 512 - GFP_KERNEL); 511 + 512 + new_map = kcalloc(map_num, sizeof(*new_map), GFP_KERNEL); 513 513 if (!new_map) 514 514 return -ENOMEM; 515 515 ··· 519 519 /* create mux map */ 520 520 parent = of_get_parent(np); 521 521 if (!parent) { 522 - devm_kfree(pctldev->dev, new_map); 522 + kfree(new_map); 523 523 return -EINVAL; 524 524 } 525 525 new_map[0].type = PIN_MAP_TYPE_MUX_GROUP; ··· 546 546 static void rockchip_dt_free_map(struct pinctrl_dev *pctldev, 547 547 struct pinctrl_map *map, unsigned num_maps) 548 548 { 549 + kfree(map); 549 550 } 550 551 551 552 static const struct pinctrl_ops rockchip_pctrl_ops = { ··· 2941 2940 sizeof(struct rockchip_pmx_func), 2942 2941 GFP_KERNEL); 2943 2942 if (!info->functions) 2944 - return -EINVAL; 2943 + return -ENOMEM; 2945 2944 2946 2945 info->groups = devm_kcalloc(dev, 2947 2946 info->ngroups, 2948 2947 sizeof(struct rockchip_pin_group), 2949 2948 GFP_KERNEL); 2950 2949 if (!info->groups) 2951 - return -EINVAL; 2950 + return -ENOMEM; 2952 2951 2953 2952 i = 0; 2954 2953
+2 -2
drivers/pinctrl/pinctrl-rza1.c
··· 93 93 }; 94 94 95 95 /** 96 - * rza1_swio_pin - describe a single pin that needs bidir flag applied. 96 + * rza1_swio_pin - describe a single pin that needs swio flag applied. 97 97 */ 98 98 struct rza1_swio_pin { 99 99 u16 pin: 4; ··· 418 418 }; 419 419 420 420 static const struct rza1_swio_entry rza1l_swio_entries[] = { 421 - [0] = { ARRAY_SIZE(rza1h_swio_pins), rza1h_swio_pins }, 421 + [0] = { ARRAY_SIZE(rza1l_swio_pins), rza1l_swio_pins }, 422 422 }; 423 423 424 424 /* RZ/A1L (r7s72102x) pinmux flags table */
+1 -5
drivers/pinctrl/pinctrl-stmfx.c
··· 288 288 struct pinctrl_gpio_range *range; 289 289 enum pin_config_param param; 290 290 u32 arg; 291 - int dir, i, ret; 291 + int i, ret; 292 292 293 293 range = pinctrl_find_gpio_range_from_pin_nolock(pctldev, pin); 294 294 if (!range) { 295 295 dev_err(pctldev->dev, "pin %d is not available\n", pin); 296 296 return -EINVAL; 297 297 } 298 - 299 - dir = stmfx_gpio_get_direction(&pctl->gpio_chip, pin); 300 - if (dir < 0) 301 - return dir; 302 298 303 299 for (i = 0; i < num_configs; i++) { 304 300 param = pinconf_to_config_param(configs[i]);
+1 -1
drivers/pinctrl/pinctrl-sx150x.c
··· 988 988 /* 989 989 * In order to mask the differences between 16 and 8 bit expander 990 990 * devices we set up a sligthly ficticious regmap that pretends to be 991 - * a set of 32-bit (to accomodate RegSenseLow/RegSenseHigh 991 + * a set of 32-bit (to accommodate RegSenseLow/RegSenseHigh 992 992 * pair/quartet) registers and transparently reconstructs those 993 993 * registers via multiple I2C/SMBus reads 994 994 *
-9
drivers/pinctrl/pxa/pinctrl-pxa2xx.c
··· 425 425 } 426 426 EXPORT_SYMBOL_GPL(pxa2xx_pinctrl_init); 427 427 428 - int pxa2xx_pinctrl_exit(struct platform_device *pdev) 429 - { 430 - struct pxa_pinctrl *pctl = platform_get_drvdata(pdev); 431 - 432 - pinctrl_unregister(pctl->pctl_dev); 433 - return 0; 434 - } 435 - EXPORT_SYMBOL_GPL(pxa2xx_pinctrl_exit); 436 - 437 428 MODULE_AUTHOR("Robert Jarzmik <robert.jarzmik@free.fr>"); 438 429 MODULE_DESCRIPTION("Marvell PXA2xx pinctrl driver"); 439 430 MODULE_LICENSE("GPL v2");
+9
drivers/pinctrl/qcom/Kconfig
··· 216 216 Qualcomm Technologies Inc TLMM block found on the Qualcomm 217 217 Technologies Inc SM8150 platform. 218 218 219 + config PINCTRL_SM8250 220 + tristate "Qualcomm Technologies Inc SM8250 pin controller driver" 221 + depends on GPIOLIB && OF 222 + select PINCTRL_MSM 223 + help 224 + This is the pinctrl, pinmux, pinconf and gpiolib driver for the 225 + Qualcomm Technologies Inc TLMM block found on the Qualcomm 226 + Technologies Inc SM8250 platform. 227 + 219 228 endif
+1
drivers/pinctrl/qcom/Makefile
··· 26 26 obj-$(CONFIG_PINCTRL_SDM660) += pinctrl-sdm660.o 27 27 obj-$(CONFIG_PINCTRL_SDM845) += pinctrl-sdm845.o 28 28 obj-$(CONFIG_PINCTRL_SM8150) += pinctrl-sm8150.o 29 + obj-$(CONFIG_PINCTRL_SM8250) += pinctrl-sm8250.o
-1
drivers/pinctrl/qcom/pinctrl-msm.c
··· 23 23 #include <linux/pm.h> 24 24 #include <linux/log2.h> 25 25 #include <linux/qcom_scm.h> 26 - #include <linux/io.h> 27 26 28 27 #include <linux/soc/qcom/irq.h> 29 28
+1361
drivers/pinctrl/qcom/pinctrl-sm8250.c
··· 1 + // SPDX-License-Identifier: GPL-2.0-only 2 + /* 3 + * Copyright (c) 2018-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 sm8250_tiles[] = { 14 + "west", 15 + "south", 16 + "north", 17 + }; 18 + 19 + enum { 20 + WEST, 21 + SOUTH, 22 + NORTH, 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 REG_SIZE 0x1000 33 + #define PINGROUP(id, _tile, f1, f2, f3, f4, f5, f6, f7, f8, f9) \ 34 + { \ 35 + .name = "gpio" #id, \ 36 + .pins = gpio##id##_pins, \ 37 + .npins = (unsigned int)ARRAY_SIZE(gpio##id##_pins), \ 38 + .funcs = (int[]){ \ 39 + msm_mux_gpio, /* gpio mode */ \ 40 + msm_mux_##f1, \ 41 + msm_mux_##f2, \ 42 + msm_mux_##f3, \ 43 + msm_mux_##f4, \ 44 + msm_mux_##f5, \ 45 + msm_mux_##f6, \ 46 + msm_mux_##f7, \ 47 + msm_mux_##f8, \ 48 + msm_mux_##f9 \ 49 + }, \ 50 + .nfuncs = 10, \ 51 + .ctl_reg = REG_SIZE * id, \ 52 + .io_reg = REG_SIZE * id + 0x4, \ 53 + .intr_cfg_reg = REG_SIZE * id + 0x8, \ 54 + .intr_status_reg = REG_SIZE * id + 0xc, \ 55 + .intr_target_reg = REG_SIZE * id + 0x8, \ 56 + .tile = _tile, \ 57 + .mux_bit = 2, \ 58 + .pull_bit = 0, \ 59 + .drv_bit = 6, \ 60 + .oe_bit = 9, \ 61 + .in_bit = 0, \ 62 + .out_bit = 1, \ 63 + .intr_enable_bit = 0, \ 64 + .intr_status_bit = 0, \ 65 + .intr_target_bit = 5, \ 66 + .intr_target_kpss_val = 3, \ 67 + .intr_raw_status_bit = 4, \ 68 + .intr_polarity_bit = 1, \ 69 + .intr_detection_bit = 2, \ 70 + .intr_detection_width = 2, \ 71 + } 72 + 73 + #define SDC_PINGROUP(pg_name, ctl, pull, drv) \ 74 + { \ 75 + .name = #pg_name, \ 76 + .pins = pg_name##_pins, \ 77 + .npins = (unsigned int)ARRAY_SIZE(pg_name##_pins), \ 78 + .ctl_reg = ctl, \ 79 + .io_reg = 0, \ 80 + .intr_cfg_reg = 0, \ 81 + .intr_status_reg = 0, \ 82 + .intr_target_reg = 0, \ 83 + .tile = NORTH, \ 84 + .mux_bit = -1, \ 85 + .pull_bit = pull, \ 86 + .drv_bit = drv, \ 87 + .oe_bit = -1, \ 88 + .in_bit = -1, \ 89 + .out_bit = -1, \ 90 + .intr_enable_bit = -1, \ 91 + .intr_status_bit = -1, \ 92 + .intr_target_bit = -1, \ 93 + .intr_raw_status_bit = -1, \ 94 + .intr_polarity_bit = -1, \ 95 + .intr_detection_bit = -1, \ 96 + .intr_detection_width = -1, \ 97 + } 98 + 99 + #define UFS_RESET(pg_name, offset) \ 100 + { \ 101 + .name = #pg_name, \ 102 + .pins = pg_name##_pins, \ 103 + .npins = (unsigned int)ARRAY_SIZE(pg_name##_pins), \ 104 + .ctl_reg = offset, \ 105 + .io_reg = offset + 0x4, \ 106 + .intr_cfg_reg = 0, \ 107 + .intr_status_reg = 0, \ 108 + .intr_target_reg = 0, \ 109 + .tile = SOUTH, \ 110 + .mux_bit = -1, \ 111 + .pull_bit = 3, \ 112 + .drv_bit = 0, \ 113 + .oe_bit = -1, \ 114 + .in_bit = -1, \ 115 + .out_bit = 0, \ 116 + .intr_enable_bit = -1, \ 117 + .intr_status_bit = -1, \ 118 + .intr_target_bit = -1, \ 119 + .intr_raw_status_bit = -1, \ 120 + .intr_polarity_bit = -1, \ 121 + .intr_detection_bit = -1, \ 122 + .intr_detection_width = -1, \ 123 + } 124 + 125 + static const struct pinctrl_pin_desc sm8250_pins[] = { 126 + PINCTRL_PIN(0, "GPIO_0"), 127 + PINCTRL_PIN(1, "GPIO_1"), 128 + PINCTRL_PIN(2, "GPIO_2"), 129 + PINCTRL_PIN(3, "GPIO_3"), 130 + PINCTRL_PIN(4, "GPIO_4"), 131 + PINCTRL_PIN(5, "GPIO_5"), 132 + PINCTRL_PIN(6, "GPIO_6"), 133 + PINCTRL_PIN(7, "GPIO_7"), 134 + PINCTRL_PIN(8, "GPIO_8"), 135 + PINCTRL_PIN(9, "GPIO_9"), 136 + PINCTRL_PIN(10, "GPIO_10"), 137 + PINCTRL_PIN(11, "GPIO_11"), 138 + PINCTRL_PIN(12, "GPIO_12"), 139 + PINCTRL_PIN(13, "GPIO_13"), 140 + PINCTRL_PIN(14, "GPIO_14"), 141 + PINCTRL_PIN(15, "GPIO_15"), 142 + PINCTRL_PIN(16, "GPIO_16"), 143 + PINCTRL_PIN(17, "GPIO_17"), 144 + PINCTRL_PIN(18, "GPIO_18"), 145 + PINCTRL_PIN(19, "GPIO_19"), 146 + PINCTRL_PIN(20, "GPIO_20"), 147 + PINCTRL_PIN(21, "GPIO_21"), 148 + PINCTRL_PIN(22, "GPIO_22"), 149 + PINCTRL_PIN(23, "GPIO_23"), 150 + PINCTRL_PIN(24, "GPIO_24"), 151 + PINCTRL_PIN(25, "GPIO_25"), 152 + PINCTRL_PIN(26, "GPIO_26"), 153 + PINCTRL_PIN(27, "GPIO_27"), 154 + PINCTRL_PIN(28, "GPIO_28"), 155 + PINCTRL_PIN(29, "GPIO_29"), 156 + PINCTRL_PIN(30, "GPIO_30"), 157 + PINCTRL_PIN(31, "GPIO_31"), 158 + PINCTRL_PIN(32, "GPIO_32"), 159 + PINCTRL_PIN(33, "GPIO_33"), 160 + PINCTRL_PIN(34, "GPIO_34"), 161 + PINCTRL_PIN(35, "GPIO_35"), 162 + PINCTRL_PIN(36, "GPIO_36"), 163 + PINCTRL_PIN(37, "GPIO_37"), 164 + PINCTRL_PIN(38, "GPIO_38"), 165 + PINCTRL_PIN(39, "GPIO_39"), 166 + PINCTRL_PIN(40, "GPIO_40"), 167 + PINCTRL_PIN(41, "GPIO_41"), 168 + PINCTRL_PIN(42, "GPIO_42"), 169 + PINCTRL_PIN(43, "GPIO_43"), 170 + PINCTRL_PIN(44, "GPIO_44"), 171 + PINCTRL_PIN(45, "GPIO_45"), 172 + PINCTRL_PIN(46, "GPIO_46"), 173 + PINCTRL_PIN(47, "GPIO_47"), 174 + PINCTRL_PIN(48, "GPIO_48"), 175 + PINCTRL_PIN(49, "GPIO_49"), 176 + PINCTRL_PIN(50, "GPIO_50"), 177 + PINCTRL_PIN(51, "GPIO_51"), 178 + PINCTRL_PIN(52, "GPIO_52"), 179 + PINCTRL_PIN(53, "GPIO_53"), 180 + PINCTRL_PIN(54, "GPIO_54"), 181 + PINCTRL_PIN(55, "GPIO_55"), 182 + PINCTRL_PIN(56, "GPIO_56"), 183 + PINCTRL_PIN(57, "GPIO_57"), 184 + PINCTRL_PIN(58, "GPIO_58"), 185 + PINCTRL_PIN(59, "GPIO_59"), 186 + PINCTRL_PIN(60, "GPIO_60"), 187 + PINCTRL_PIN(61, "GPIO_61"), 188 + PINCTRL_PIN(62, "GPIO_62"), 189 + PINCTRL_PIN(63, "GPIO_63"), 190 + PINCTRL_PIN(64, "GPIO_64"), 191 + PINCTRL_PIN(65, "GPIO_65"), 192 + PINCTRL_PIN(66, "GPIO_66"), 193 + PINCTRL_PIN(67, "GPIO_67"), 194 + PINCTRL_PIN(68, "GPIO_68"), 195 + PINCTRL_PIN(69, "GPIO_69"), 196 + PINCTRL_PIN(70, "GPIO_70"), 197 + PINCTRL_PIN(71, "GPIO_71"), 198 + PINCTRL_PIN(72, "GPIO_72"), 199 + PINCTRL_PIN(73, "GPIO_73"), 200 + PINCTRL_PIN(74, "GPIO_74"), 201 + PINCTRL_PIN(75, "GPIO_75"), 202 + PINCTRL_PIN(76, "GPIO_76"), 203 + PINCTRL_PIN(77, "GPIO_77"), 204 + PINCTRL_PIN(78, "GPIO_78"), 205 + PINCTRL_PIN(79, "GPIO_79"), 206 + PINCTRL_PIN(80, "GPIO_80"), 207 + PINCTRL_PIN(81, "GPIO_81"), 208 + PINCTRL_PIN(82, "GPIO_82"), 209 + PINCTRL_PIN(83, "GPIO_83"), 210 + PINCTRL_PIN(84, "GPIO_84"), 211 + PINCTRL_PIN(85, "GPIO_85"), 212 + PINCTRL_PIN(86, "GPIO_86"), 213 + PINCTRL_PIN(87, "GPIO_87"), 214 + PINCTRL_PIN(88, "GPIO_88"), 215 + PINCTRL_PIN(89, "GPIO_89"), 216 + PINCTRL_PIN(90, "GPIO_90"), 217 + PINCTRL_PIN(91, "GPIO_91"), 218 + PINCTRL_PIN(92, "GPIO_92"), 219 + PINCTRL_PIN(93, "GPIO_93"), 220 + PINCTRL_PIN(94, "GPIO_94"), 221 + PINCTRL_PIN(95, "GPIO_95"), 222 + PINCTRL_PIN(96, "GPIO_96"), 223 + PINCTRL_PIN(97, "GPIO_97"), 224 + PINCTRL_PIN(98, "GPIO_98"), 225 + PINCTRL_PIN(99, "GPIO_99"), 226 + PINCTRL_PIN(100, "GPIO_100"), 227 + PINCTRL_PIN(101, "GPIO_101"), 228 + PINCTRL_PIN(102, "GPIO_102"), 229 + PINCTRL_PIN(103, "GPIO_103"), 230 + PINCTRL_PIN(104, "GPIO_104"), 231 + PINCTRL_PIN(105, "GPIO_105"), 232 + PINCTRL_PIN(106, "GPIO_106"), 233 + PINCTRL_PIN(107, "GPIO_107"), 234 + PINCTRL_PIN(108, "GPIO_108"), 235 + PINCTRL_PIN(109, "GPIO_109"), 236 + PINCTRL_PIN(110, "GPIO_110"), 237 + PINCTRL_PIN(111, "GPIO_111"), 238 + PINCTRL_PIN(112, "GPIO_112"), 239 + PINCTRL_PIN(113, "GPIO_113"), 240 + PINCTRL_PIN(114, "GPIO_114"), 241 + PINCTRL_PIN(115, "GPIO_115"), 242 + PINCTRL_PIN(116, "GPIO_116"), 243 + PINCTRL_PIN(117, "GPIO_117"), 244 + PINCTRL_PIN(118, "GPIO_118"), 245 + PINCTRL_PIN(119, "GPIO_119"), 246 + PINCTRL_PIN(120, "GPIO_120"), 247 + PINCTRL_PIN(121, "GPIO_121"), 248 + PINCTRL_PIN(122, "GPIO_122"), 249 + PINCTRL_PIN(123, "GPIO_123"), 250 + PINCTRL_PIN(124, "GPIO_124"), 251 + PINCTRL_PIN(125, "GPIO_125"), 252 + PINCTRL_PIN(126, "GPIO_126"), 253 + PINCTRL_PIN(127, "GPIO_127"), 254 + PINCTRL_PIN(128, "GPIO_128"), 255 + PINCTRL_PIN(129, "GPIO_129"), 256 + PINCTRL_PIN(130, "GPIO_130"), 257 + PINCTRL_PIN(131, "GPIO_131"), 258 + PINCTRL_PIN(132, "GPIO_132"), 259 + PINCTRL_PIN(133, "GPIO_133"), 260 + PINCTRL_PIN(134, "GPIO_134"), 261 + PINCTRL_PIN(135, "GPIO_135"), 262 + PINCTRL_PIN(136, "GPIO_136"), 263 + PINCTRL_PIN(137, "GPIO_137"), 264 + PINCTRL_PIN(138, "GPIO_138"), 265 + PINCTRL_PIN(139, "GPIO_139"), 266 + PINCTRL_PIN(140, "GPIO_140"), 267 + PINCTRL_PIN(141, "GPIO_141"), 268 + PINCTRL_PIN(142, "GPIO_142"), 269 + PINCTRL_PIN(143, "GPIO_143"), 270 + PINCTRL_PIN(144, "GPIO_144"), 271 + PINCTRL_PIN(145, "GPIO_145"), 272 + PINCTRL_PIN(146, "GPIO_146"), 273 + PINCTRL_PIN(147, "GPIO_147"), 274 + PINCTRL_PIN(148, "GPIO_148"), 275 + PINCTRL_PIN(149, "GPIO_149"), 276 + PINCTRL_PIN(150, "GPIO_150"), 277 + PINCTRL_PIN(151, "GPIO_151"), 278 + PINCTRL_PIN(152, "GPIO_152"), 279 + PINCTRL_PIN(153, "GPIO_153"), 280 + PINCTRL_PIN(154, "GPIO_154"), 281 + PINCTRL_PIN(155, "GPIO_155"), 282 + PINCTRL_PIN(156, "GPIO_156"), 283 + PINCTRL_PIN(157, "GPIO_157"), 284 + PINCTRL_PIN(158, "GPIO_158"), 285 + PINCTRL_PIN(159, "GPIO_159"), 286 + PINCTRL_PIN(160, "GPIO_160"), 287 + PINCTRL_PIN(161, "GPIO_161"), 288 + PINCTRL_PIN(162, "GPIO_162"), 289 + PINCTRL_PIN(163, "GPIO_163"), 290 + PINCTRL_PIN(164, "GPIO_164"), 291 + PINCTRL_PIN(165, "GPIO_165"), 292 + PINCTRL_PIN(166, "GPIO_166"), 293 + PINCTRL_PIN(167, "GPIO_167"), 294 + PINCTRL_PIN(168, "GPIO_168"), 295 + PINCTRL_PIN(169, "GPIO_169"), 296 + PINCTRL_PIN(170, "GPIO_170"), 297 + PINCTRL_PIN(171, "GPIO_171"), 298 + PINCTRL_PIN(172, "GPIO_172"), 299 + PINCTRL_PIN(173, "GPIO_173"), 300 + PINCTRL_PIN(174, "GPIO_174"), 301 + PINCTRL_PIN(175, "GPIO_175"), 302 + PINCTRL_PIN(176, "GPIO_176"), 303 + PINCTRL_PIN(177, "GPIO_177"), 304 + PINCTRL_PIN(178, "GPIO_178"), 305 + PINCTRL_PIN(179, "GPIO_179"), 306 + PINCTRL_PIN(180, "SDC2_CLK"), 307 + PINCTRL_PIN(181, "SDC2_CMD"), 308 + PINCTRL_PIN(182, "SDC2_DATA"), 309 + PINCTRL_PIN(183, "UFS_RESET"), 310 + }; 311 + 312 + #define DECLARE_MSM_GPIO_PINS(pin) \ 313 + static const unsigned int gpio##pin##_pins[] = { pin } 314 + DECLARE_MSM_GPIO_PINS(0); 315 + DECLARE_MSM_GPIO_PINS(1); 316 + DECLARE_MSM_GPIO_PINS(2); 317 + DECLARE_MSM_GPIO_PINS(3); 318 + DECLARE_MSM_GPIO_PINS(4); 319 + DECLARE_MSM_GPIO_PINS(5); 320 + DECLARE_MSM_GPIO_PINS(6); 321 + DECLARE_MSM_GPIO_PINS(7); 322 + DECLARE_MSM_GPIO_PINS(8); 323 + DECLARE_MSM_GPIO_PINS(9); 324 + DECLARE_MSM_GPIO_PINS(10); 325 + DECLARE_MSM_GPIO_PINS(11); 326 + DECLARE_MSM_GPIO_PINS(12); 327 + DECLARE_MSM_GPIO_PINS(13); 328 + DECLARE_MSM_GPIO_PINS(14); 329 + DECLARE_MSM_GPIO_PINS(15); 330 + DECLARE_MSM_GPIO_PINS(16); 331 + DECLARE_MSM_GPIO_PINS(17); 332 + DECLARE_MSM_GPIO_PINS(18); 333 + DECLARE_MSM_GPIO_PINS(19); 334 + DECLARE_MSM_GPIO_PINS(20); 335 + DECLARE_MSM_GPIO_PINS(21); 336 + DECLARE_MSM_GPIO_PINS(22); 337 + DECLARE_MSM_GPIO_PINS(23); 338 + DECLARE_MSM_GPIO_PINS(24); 339 + DECLARE_MSM_GPIO_PINS(25); 340 + DECLARE_MSM_GPIO_PINS(26); 341 + DECLARE_MSM_GPIO_PINS(27); 342 + DECLARE_MSM_GPIO_PINS(28); 343 + DECLARE_MSM_GPIO_PINS(29); 344 + DECLARE_MSM_GPIO_PINS(30); 345 + DECLARE_MSM_GPIO_PINS(31); 346 + DECLARE_MSM_GPIO_PINS(32); 347 + DECLARE_MSM_GPIO_PINS(33); 348 + DECLARE_MSM_GPIO_PINS(34); 349 + DECLARE_MSM_GPIO_PINS(35); 350 + DECLARE_MSM_GPIO_PINS(36); 351 + DECLARE_MSM_GPIO_PINS(37); 352 + DECLARE_MSM_GPIO_PINS(38); 353 + DECLARE_MSM_GPIO_PINS(39); 354 + DECLARE_MSM_GPIO_PINS(40); 355 + DECLARE_MSM_GPIO_PINS(41); 356 + DECLARE_MSM_GPIO_PINS(42); 357 + DECLARE_MSM_GPIO_PINS(43); 358 + DECLARE_MSM_GPIO_PINS(44); 359 + DECLARE_MSM_GPIO_PINS(45); 360 + DECLARE_MSM_GPIO_PINS(46); 361 + DECLARE_MSM_GPIO_PINS(47); 362 + DECLARE_MSM_GPIO_PINS(48); 363 + DECLARE_MSM_GPIO_PINS(49); 364 + DECLARE_MSM_GPIO_PINS(50); 365 + DECLARE_MSM_GPIO_PINS(51); 366 + DECLARE_MSM_GPIO_PINS(52); 367 + DECLARE_MSM_GPIO_PINS(53); 368 + DECLARE_MSM_GPIO_PINS(54); 369 + DECLARE_MSM_GPIO_PINS(55); 370 + DECLARE_MSM_GPIO_PINS(56); 371 + DECLARE_MSM_GPIO_PINS(57); 372 + DECLARE_MSM_GPIO_PINS(58); 373 + DECLARE_MSM_GPIO_PINS(59); 374 + DECLARE_MSM_GPIO_PINS(60); 375 + DECLARE_MSM_GPIO_PINS(61); 376 + DECLARE_MSM_GPIO_PINS(62); 377 + DECLARE_MSM_GPIO_PINS(63); 378 + DECLARE_MSM_GPIO_PINS(64); 379 + DECLARE_MSM_GPIO_PINS(65); 380 + DECLARE_MSM_GPIO_PINS(66); 381 + DECLARE_MSM_GPIO_PINS(67); 382 + DECLARE_MSM_GPIO_PINS(68); 383 + DECLARE_MSM_GPIO_PINS(69); 384 + DECLARE_MSM_GPIO_PINS(70); 385 + DECLARE_MSM_GPIO_PINS(71); 386 + DECLARE_MSM_GPIO_PINS(72); 387 + DECLARE_MSM_GPIO_PINS(73); 388 + DECLARE_MSM_GPIO_PINS(74); 389 + DECLARE_MSM_GPIO_PINS(75); 390 + DECLARE_MSM_GPIO_PINS(76); 391 + DECLARE_MSM_GPIO_PINS(77); 392 + DECLARE_MSM_GPIO_PINS(78); 393 + DECLARE_MSM_GPIO_PINS(79); 394 + DECLARE_MSM_GPIO_PINS(80); 395 + DECLARE_MSM_GPIO_PINS(81); 396 + DECLARE_MSM_GPIO_PINS(82); 397 + DECLARE_MSM_GPIO_PINS(83); 398 + DECLARE_MSM_GPIO_PINS(84); 399 + DECLARE_MSM_GPIO_PINS(85); 400 + DECLARE_MSM_GPIO_PINS(86); 401 + DECLARE_MSM_GPIO_PINS(87); 402 + DECLARE_MSM_GPIO_PINS(88); 403 + DECLARE_MSM_GPIO_PINS(89); 404 + DECLARE_MSM_GPIO_PINS(90); 405 + DECLARE_MSM_GPIO_PINS(91); 406 + DECLARE_MSM_GPIO_PINS(92); 407 + DECLARE_MSM_GPIO_PINS(93); 408 + DECLARE_MSM_GPIO_PINS(94); 409 + DECLARE_MSM_GPIO_PINS(95); 410 + DECLARE_MSM_GPIO_PINS(96); 411 + DECLARE_MSM_GPIO_PINS(97); 412 + DECLARE_MSM_GPIO_PINS(98); 413 + DECLARE_MSM_GPIO_PINS(99); 414 + DECLARE_MSM_GPIO_PINS(100); 415 + DECLARE_MSM_GPIO_PINS(101); 416 + DECLARE_MSM_GPIO_PINS(102); 417 + DECLARE_MSM_GPIO_PINS(103); 418 + DECLARE_MSM_GPIO_PINS(104); 419 + DECLARE_MSM_GPIO_PINS(105); 420 + DECLARE_MSM_GPIO_PINS(106); 421 + DECLARE_MSM_GPIO_PINS(107); 422 + DECLARE_MSM_GPIO_PINS(108); 423 + DECLARE_MSM_GPIO_PINS(109); 424 + DECLARE_MSM_GPIO_PINS(110); 425 + DECLARE_MSM_GPIO_PINS(111); 426 + DECLARE_MSM_GPIO_PINS(112); 427 + DECLARE_MSM_GPIO_PINS(113); 428 + DECLARE_MSM_GPIO_PINS(114); 429 + DECLARE_MSM_GPIO_PINS(115); 430 + DECLARE_MSM_GPIO_PINS(116); 431 + DECLARE_MSM_GPIO_PINS(117); 432 + DECLARE_MSM_GPIO_PINS(118); 433 + DECLARE_MSM_GPIO_PINS(119); 434 + DECLARE_MSM_GPIO_PINS(120); 435 + DECLARE_MSM_GPIO_PINS(121); 436 + DECLARE_MSM_GPIO_PINS(122); 437 + DECLARE_MSM_GPIO_PINS(123); 438 + DECLARE_MSM_GPIO_PINS(124); 439 + DECLARE_MSM_GPIO_PINS(125); 440 + DECLARE_MSM_GPIO_PINS(126); 441 + DECLARE_MSM_GPIO_PINS(127); 442 + DECLARE_MSM_GPIO_PINS(128); 443 + DECLARE_MSM_GPIO_PINS(129); 444 + DECLARE_MSM_GPIO_PINS(130); 445 + DECLARE_MSM_GPIO_PINS(131); 446 + DECLARE_MSM_GPIO_PINS(132); 447 + DECLARE_MSM_GPIO_PINS(133); 448 + DECLARE_MSM_GPIO_PINS(134); 449 + DECLARE_MSM_GPIO_PINS(135); 450 + DECLARE_MSM_GPIO_PINS(136); 451 + DECLARE_MSM_GPIO_PINS(137); 452 + DECLARE_MSM_GPIO_PINS(138); 453 + DECLARE_MSM_GPIO_PINS(139); 454 + DECLARE_MSM_GPIO_PINS(140); 455 + DECLARE_MSM_GPIO_PINS(141); 456 + DECLARE_MSM_GPIO_PINS(142); 457 + DECLARE_MSM_GPIO_PINS(143); 458 + DECLARE_MSM_GPIO_PINS(144); 459 + DECLARE_MSM_GPIO_PINS(145); 460 + DECLARE_MSM_GPIO_PINS(146); 461 + DECLARE_MSM_GPIO_PINS(147); 462 + DECLARE_MSM_GPIO_PINS(148); 463 + DECLARE_MSM_GPIO_PINS(149); 464 + DECLARE_MSM_GPIO_PINS(150); 465 + DECLARE_MSM_GPIO_PINS(151); 466 + DECLARE_MSM_GPIO_PINS(152); 467 + DECLARE_MSM_GPIO_PINS(153); 468 + DECLARE_MSM_GPIO_PINS(154); 469 + DECLARE_MSM_GPIO_PINS(155); 470 + DECLARE_MSM_GPIO_PINS(156); 471 + DECLARE_MSM_GPIO_PINS(157); 472 + DECLARE_MSM_GPIO_PINS(158); 473 + DECLARE_MSM_GPIO_PINS(159); 474 + DECLARE_MSM_GPIO_PINS(160); 475 + DECLARE_MSM_GPIO_PINS(161); 476 + DECLARE_MSM_GPIO_PINS(162); 477 + DECLARE_MSM_GPIO_PINS(163); 478 + DECLARE_MSM_GPIO_PINS(164); 479 + DECLARE_MSM_GPIO_PINS(165); 480 + DECLARE_MSM_GPIO_PINS(166); 481 + DECLARE_MSM_GPIO_PINS(167); 482 + DECLARE_MSM_GPIO_PINS(168); 483 + DECLARE_MSM_GPIO_PINS(169); 484 + DECLARE_MSM_GPIO_PINS(170); 485 + DECLARE_MSM_GPIO_PINS(171); 486 + DECLARE_MSM_GPIO_PINS(172); 487 + DECLARE_MSM_GPIO_PINS(173); 488 + DECLARE_MSM_GPIO_PINS(174); 489 + DECLARE_MSM_GPIO_PINS(175); 490 + DECLARE_MSM_GPIO_PINS(176); 491 + DECLARE_MSM_GPIO_PINS(177); 492 + DECLARE_MSM_GPIO_PINS(178); 493 + DECLARE_MSM_GPIO_PINS(179); 494 + 495 + static const unsigned int ufs_reset_pins[] = { 180 }; 496 + static const unsigned int sdc2_clk_pins[] = { 181 }; 497 + static const unsigned int sdc2_cmd_pins[] = { 182 }; 498 + static const unsigned int sdc2_data_pins[] = { 183 }; 499 + 500 + enum sm8250_functions { 501 + msm_mux_aoss_cti, 502 + msm_mux_atest, 503 + msm_mux_audio_ref, 504 + msm_mux_cam_mclk, 505 + msm_mux_cci_async, 506 + msm_mux_cci_i2c, 507 + msm_mux_cci_timer0, 508 + msm_mux_cci_timer1, 509 + msm_mux_cci_timer2, 510 + msm_mux_cci_timer3, 511 + msm_mux_cci_timer4, 512 + msm_mux_cri_trng, 513 + msm_mux_cri_trng0, 514 + msm_mux_cri_trng1, 515 + msm_mux_dbg_out, 516 + msm_mux_ddr_bist, 517 + msm_mux_ddr_pxi0, 518 + msm_mux_ddr_pxi1, 519 + msm_mux_ddr_pxi2, 520 + msm_mux_ddr_pxi3, 521 + msm_mux_dp_hot, 522 + msm_mux_dp_lcd, 523 + msm_mux_gcc_gp1, 524 + msm_mux_gcc_gp2, 525 + msm_mux_gcc_gp3, 526 + msm_mux_gpio, 527 + msm_mux_ibi_i3c, 528 + msm_mux_jitter_bist, 529 + msm_mux_lpass_slimbus, 530 + msm_mux_mdp_vsync, 531 + msm_mux_mdp_vsync0, 532 + msm_mux_mdp_vsync1, 533 + msm_mux_mdp_vsync2, 534 + msm_mux_mdp_vsync3, 535 + msm_mux_mi2s0_data0, 536 + msm_mux_mi2s0_data1, 537 + msm_mux_mi2s0_sck, 538 + msm_mux_mi2s0_ws, 539 + msm_mux_mi2s1_data0, 540 + msm_mux_mi2s1_data1, 541 + msm_mux_mi2s1_sck, 542 + msm_mux_mi2s1_ws, 543 + msm_mux_mi2s2_data0, 544 + msm_mux_mi2s2_data1, 545 + msm_mux_mi2s2_sck, 546 + msm_mux_mi2s2_ws, 547 + msm_mux_pci_e0, 548 + msm_mux_pci_e1, 549 + msm_mux_pci_e2, 550 + msm_mux_phase_flag, 551 + msm_mux_pll_bist, 552 + msm_mux_pll_bypassnl, 553 + msm_mux_pll_clk, 554 + msm_mux_pll_reset, 555 + msm_mux_pri_mi2s, 556 + msm_mux_prng_rosc, 557 + msm_mux_qdss_cti, 558 + msm_mux_qdss_gpio, 559 + msm_mux_qspi0, 560 + msm_mux_qspi1, 561 + msm_mux_qspi2, 562 + msm_mux_qspi3, 563 + msm_mux_qspi_clk, 564 + msm_mux_qspi_cs, 565 + msm_mux_qup0, 566 + msm_mux_qup1, 567 + msm_mux_qup10, 568 + msm_mux_qup11, 569 + msm_mux_qup12, 570 + msm_mux_qup13, 571 + msm_mux_qup14, 572 + msm_mux_qup15, 573 + msm_mux_qup16, 574 + msm_mux_qup17, 575 + msm_mux_qup18, 576 + msm_mux_qup19, 577 + msm_mux_qup2, 578 + msm_mux_qup3, 579 + msm_mux_qup4, 580 + msm_mux_qup5, 581 + msm_mux_qup6, 582 + msm_mux_qup7, 583 + msm_mux_qup8, 584 + msm_mux_qup9, 585 + msm_mux_qup_l4, 586 + msm_mux_qup_l5, 587 + msm_mux_qup_l6, 588 + msm_mux_sd_write, 589 + msm_mux_sdc40, 590 + msm_mux_sdc41, 591 + msm_mux_sdc42, 592 + msm_mux_sdc43, 593 + msm_mux_sdc4_clk, 594 + msm_mux_sdc4_cmd, 595 + msm_mux_sec_mi2s, 596 + msm_mux_sp_cmu, 597 + msm_mux_tgu_ch0, 598 + msm_mux_tgu_ch1, 599 + msm_mux_tgu_ch2, 600 + msm_mux_tgu_ch3, 601 + msm_mux_tsense_pwm1, 602 + msm_mux_tsense_pwm2, 603 + msm_mux_tsif0_clk, 604 + msm_mux_tsif0_data, 605 + msm_mux_tsif0_en, 606 + msm_mux_tsif0_error, 607 + msm_mux_tsif0_sync, 608 + msm_mux_tsif1_clk, 609 + msm_mux_tsif1_data, 610 + msm_mux_tsif1_en, 611 + msm_mux_tsif1_error, 612 + msm_mux_tsif1_sync, 613 + msm_mux_usb2phy_ac, 614 + msm_mux_usb_phy, 615 + msm_mux_vsense_trigger, 616 + msm_mux__, 617 + }; 618 + 619 + static const char * const tsif1_data_groups[] = { 620 + "gpio75", 621 + }; 622 + static const char * const sdc41_groups[] = { 623 + "gpio75", 624 + }; 625 + static const char * const tsif1_sync_groups[] = { 626 + "gpio76", 627 + }; 628 + static const char * const sdc40_groups[] = { 629 + "gpio76", 630 + }; 631 + static const char * const aoss_cti_groups[] = { 632 + "gpio77", 633 + }; 634 + static const char * const phase_flag_groups[] = { 635 + "gpio45", "gpio46", "gpio47", "gpio48", "gpio49", "gpio50", "gpio51", 636 + "gpio69", "gpio70", "gpio71", "gpio72", "gpio73", "gpio74", "gpio77", 637 + "gpio78", "gpio79", "gpio80", "gpio81", "gpio82", "gpio83", "gpio84", 638 + "gpio103", "gpio104", "gpio115", "gpio116", "gpio117", "gpio118", 639 + "gpio119", "gpio120", "gpio122", "gpio124", "gpio125", 640 + }; 641 + static const char * const sd_write_groups[] = { 642 + "gpio78", 643 + }; 644 + static const char * const pci_e0_groups[] = { 645 + "gpio79", "gpio80", 646 + }; 647 + static const char * const pci_e1_groups[] = { 648 + "gpio82", "gpio83", 649 + }; 650 + static const char * const pci_e2_groups[] = { 651 + "gpio85", "gpio86", 652 + }; 653 + static const char * const tgu_ch0_groups[] = { 654 + "gpio85", 655 + }; 656 + static const char * const atest_groups[] = { 657 + "gpio24", "gpio25", "gpio26", "gpio27", "gpio32", "gpio33", "gpio34", 658 + "gpio35", "gpio36", "gpio37", "gpio85", "gpio86", "gpio87", "gpio88", 659 + "gpio89", 660 + }; 661 + static const char * const tgu_ch3_groups[] = { 662 + "gpio86", 663 + }; 664 + static const char * const tsif1_error_groups[] = { 665 + "gpio90", 666 + }; 667 + static const char * const tgu_ch1_groups[] = { 668 + "gpio90", 669 + }; 670 + static const char * const tsif0_error_groups[] = { 671 + "gpio91", 672 + }; 673 + static const char * const tgu_ch2_groups[] = { 674 + "gpio91", 675 + }; 676 + static const char * const cam_mclk_groups[] = { 677 + "gpio94", "gpio95", "gpio96", "gpio97", "gpio98", "gpio99", "gpio100", 678 + }; 679 + static const char * const ddr_bist_groups[] = { 680 + "gpio94", "gpio95", "gpio143", "gpio144", 681 + }; 682 + static const char * const pll_bypassnl_groups[] = { 683 + "gpio96", 684 + }; 685 + static const char * const pll_reset_groups[] = { 686 + "gpio97", 687 + }; 688 + static const char * const cci_i2c_groups[] = { 689 + "gpio101", "gpio102", "gpio103", "gpio104", "gpio105", "gpio106", 690 + "gpio107", "gpio108", 691 + }; 692 + static const char * const qdss_gpio_groups[] = { 693 + "gpio94", "gpio95", "gpio96", "gpio97", "gpio98", "gpio99", "gpio100", 694 + "gpio101", "gpio102", "gpio103", "gpio104", "gpio105", "gpio106", 695 + "gpio107", "gpio108", "gpio109", "gpio110", "gpio111", "gpio160", 696 + "gpio161", "gpio162", "gpio163", "gpio164", "gpio165", "gpio166", 697 + "gpio167", "gpio168", "gpio169", "gpio170", "gpio171", "gpio172", 698 + "gpio173", "gpio174", "gpio175", "gpio176", "gpio177", 699 + }; 700 + static const char * const gcc_gp1_groups[] = { 701 + "gpio106", "gpio136", 702 + }; 703 + static const char * const gcc_gp2_groups[] = { 704 + "gpio107", "gpio137", 705 + }; 706 + static const char * const gcc_gp3_groups[] = { 707 + "gpio108", "gpio138", 708 + }; 709 + static const char * const cci_timer0_groups[] = { 710 + "gpio109", 711 + }; 712 + static const char * const cci_timer1_groups[] = { 713 + "gpio110", 714 + }; 715 + static const char * const cci_timer2_groups[] = { 716 + "gpio111", 717 + }; 718 + static const char * const cci_timer3_groups[] = { 719 + "gpio112", 720 + }; 721 + static const char * const cci_async_groups[] = { 722 + "gpio112", "gpio113", "gpio114", 723 + }; 724 + static const char * const cci_timer4_groups[] = { 725 + "gpio113", 726 + }; 727 + static const char * const qup2_groups[] = { 728 + "gpio115", "gpio116", "gpio117", "gpio118", 729 + }; 730 + static const char * const qup3_groups[] = { 731 + "gpio119", "gpio120", "gpio121", "gpio122", 732 + }; 733 + static const char * const tsense_pwm1_groups[] = { 734 + "gpio123", 735 + }; 736 + static const char * const tsense_pwm2_groups[] = { 737 + "gpio123", 738 + }; 739 + static const char * const qup9_groups[] = { 740 + "gpio125", "gpio126", "gpio127", "gpio128", 741 + }; 742 + static const char * const qup10_groups[] = { 743 + "gpio129", "gpio130", "gpio131", "gpio132", 744 + }; 745 + static const char * const mi2s2_sck_groups[] = { 746 + "gpio133", 747 + }; 748 + static const char * const mi2s2_data0_groups[] = { 749 + "gpio134", 750 + }; 751 + static const char * const mi2s2_ws_groups[] = { 752 + "gpio135", 753 + }; 754 + static const char * const pri_mi2s_groups[] = { 755 + "gpio136", 756 + }; 757 + static const char * const sec_mi2s_groups[] = { 758 + "gpio137", 759 + }; 760 + static const char * const audio_ref_groups[] = { 761 + "gpio137", 762 + }; 763 + static const char * const mi2s2_data1_groups[] = { 764 + "gpio137", 765 + }; 766 + static const char * const mi2s0_sck_groups[] = { 767 + "gpio138", 768 + }; 769 + static const char * const mi2s0_data0_groups[] = { 770 + "gpio139", 771 + }; 772 + static const char * const mi2s0_data1_groups[] = { 773 + "gpio140", 774 + }; 775 + static const char * const mi2s0_ws_groups[] = { 776 + "gpio141", 777 + }; 778 + static const char * const lpass_slimbus_groups[] = { 779 + "gpio142", "gpio143", "gpio144", "gpio145", 780 + }; 781 + static const char * const mi2s1_sck_groups[] = { 782 + "gpio142", 783 + }; 784 + static const char * const mi2s1_data0_groups[] = { 785 + "gpio143", 786 + }; 787 + static const char * const mi2s1_data1_groups[] = { 788 + "gpio144", 789 + }; 790 + static const char * const mi2s1_ws_groups[] = { 791 + "gpio145", 792 + }; 793 + static const char * const cri_trng0_groups[] = { 794 + "gpio159", 795 + }; 796 + static const char * const cri_trng1_groups[] = { 797 + "gpio160", 798 + }; 799 + static const char * const cri_trng_groups[] = { 800 + "gpio161", 801 + }; 802 + static const char * const sp_cmu_groups[] = { 803 + "gpio162", 804 + }; 805 + static const char * const prng_rosc_groups[] = { 806 + "gpio163", 807 + }; 808 + static const char * const qup19_groups[] = { 809 + "gpio0", "gpio1", "gpio2", "gpio3", 810 + }; 811 + static const char * const gpio_groups[] = { 812 + "gpio0", "gpio1", "gpio2", "gpio3", "gpio4", "gpio5", "gpio6", "gpio7", 813 + "gpio8", "gpio9", "gpio10", "gpio11", "gpio12", "gpio13", "gpio14", 814 + "gpio15", "gpio16", "gpio17", "gpio18", "gpio19", "gpio20", "gpio21", 815 + "gpio22", "gpio23", "gpio24", "gpio25", "gpio26", "gpio27", "gpio28", 816 + "gpio29", "gpio30", "gpio31", "gpio32", "gpio33", "gpio34", "gpio35", 817 + "gpio36", "gpio37", "gpio38", "gpio39", "gpio40", "gpio41", "gpio42", 818 + "gpio43", "gpio44", "gpio45", "gpio46", "gpio47", "gpio48", "gpio49", 819 + "gpio50", "gpio51", "gpio52", "gpio53", "gpio54", "gpio55", "gpio56", 820 + "gpio57", "gpio58", "gpio59", "gpio60", "gpio61", "gpio62", "gpio63", 821 + "gpio64", "gpio65", "gpio66", "gpio67", "gpio68", "gpio69", "gpio70", 822 + "gpio71", "gpio72", "gpio73", "gpio74", "gpio75", "gpio76", "gpio77", 823 + "gpio78", "gpio79", "gpio80", "gpio81", "gpio82", "gpio83", "gpio84", 824 + "gpio85", "gpio86", "gpio87", "gpio88", "gpio89", "gpio90", "gpio91", 825 + "gpio92", "gpio93", "gpio94", "gpio95", "gpio96", "gpio97", "gpio98", 826 + "gpio99", "gpio100", "gpio101", "gpio102", "gpio103", "gpio104", 827 + "gpio105", "gpio106", "gpio107", "gpio108", "gpio109", "gpio110", 828 + "gpio111", "gpio112", "gpio113", "gpio114", "gpio115", "gpio116", 829 + "gpio117", "gpio118", "gpio119", "gpio120", "gpio121", "gpio122", 830 + "gpio123", "gpio124", "gpio125", "gpio126", "gpio127", "gpio128", 831 + "gpio129", "gpio130", "gpio131", "gpio132", "gpio133", "gpio134", 832 + "gpio135", "gpio136", "gpio137", "gpio138", "gpio139", "gpio140", 833 + "gpio141", "gpio142", "gpio143", "gpio144", "gpio145", "gpio146", 834 + "gpio147", "gpio148", "gpio149", "gpio150", "gpio151", "gpio152", 835 + "gpio153", "gpio154", "gpio155", "gpio156", "gpio157", "gpio158", 836 + "gpio159", "gpio160", "gpio161", "gpio162", "gpio163", "gpio164", 837 + "gpio165", "gpio166", "gpio167", "gpio168", "gpio169", "gpio170", 838 + "gpio171", "gpio172", "gpio173", "gpio174", "gpio175", "gpio176", 839 + "gpio177", "gpio178", "gpio179", 840 + }; 841 + static const char * const qdss_cti_groups[] = { 842 + "gpio0", "gpio2", "gpio2", "gpio44", "gpio45", "gpio46", "gpio92", 843 + "gpio93", 844 + }; 845 + static const char * const qup1_groups[] = { 846 + "gpio4", "gpio5", "gpio6", "gpio7", 847 + }; 848 + static const char * const ibi_i3c_groups[] = { 849 + "gpio4", "gpio5", "gpio24", "gpio25", "gpio28", "gpio29", "gpio40", 850 + "gpio41", 851 + }; 852 + static const char * const qup_l4_groups[] = { 853 + "gpio6", "gpio14", "gpio46", "gpio123", 854 + }; 855 + static const char * const qup_l5_groups[] = { 856 + "gpio7", "gpio15", "gpio47", "gpio124", 857 + }; 858 + static const char * const qup4_groups[] = { 859 + "gpio8", "gpio9", "gpio10", "gpio11", 860 + }; 861 + static const char * const qup5_groups[] = { 862 + "gpio12", "gpio13", "gpio14", "gpio15", 863 + }; 864 + static const char * const qup6_groups[] = { 865 + "gpio16", "gpio17", "gpio18", "gpio19", 866 + }; 867 + static const char * const qup7_groups[] = { 868 + "gpio20", "gpio21", "gpio22", "gpio23", 869 + }; 870 + static const char * const qup8_groups[] = { 871 + "gpio24", "gpio25", "gpio26", "gpio27", 872 + }; 873 + static const char * const qup0_groups[] = { 874 + "gpio28", "gpio29", "gpio30", "gpio31", 875 + }; 876 + static const char * const qup12_groups[] = { 877 + "gpio32", "gpio33", "gpio34", "gpio35", 878 + }; 879 + static const char * const qup13_groups[] = { 880 + "gpio36", "gpio37", "gpio38", "gpio39", 881 + }; 882 + static const char * const qup14_groups[] = { 883 + "gpio40", "gpio41", "gpio42", "gpio43", 884 + }; 885 + static const char * const ddr_pxi3_groups[] = { 886 + "gpio40", "gpio43", 887 + }; 888 + static const char * const ddr_pxi1_groups[] = { 889 + "gpio41", "gpio42", 890 + }; 891 + static const char * const vsense_trigger_groups[] = { 892 + "gpio42", 893 + }; 894 + static const char * const qup15_groups[] = { 895 + "gpio44", "gpio45", "gpio46", "gpio47", 896 + }; 897 + static const char * const dbg_out_groups[] = { 898 + "gpio44", 899 + }; 900 + static const char * const qup16_groups[] = { 901 + "gpio48", "gpio49", "gpio50", "gpio51", 902 + }; 903 + static const char * const qup17_groups[] = { 904 + "gpio52", "gpio53", "gpio54", "gpio55", 905 + }; 906 + static const char * const ddr_pxi0_groups[] = { 907 + "gpio52", "gpio53", 908 + }; 909 + static const char * const jitter_bist_groups[] = { 910 + "gpio54", 911 + }; 912 + static const char * const pll_bist_groups[] = { 913 + "gpio55", 914 + }; 915 + static const char * const ddr_pxi2_groups[] = { 916 + "gpio55", "gpio56", 917 + }; 918 + static const char * const qup18_groups[] = { 919 + "gpio56", "gpio57", "gpio58", "gpio59", 920 + }; 921 + static const char * const qup11_groups[] = { 922 + "gpio60", "gpio61", "gpio62", "gpio63", 923 + }; 924 + static const char * const usb2phy_ac_groups[] = { 925 + "gpio64", "gpio90", 926 + }; 927 + static const char * const qup_l6_groups[] = { 928 + "gpio64", "gpio77", "gpio92", "gpio93", 929 + }; 930 + static const char * const usb_phy_groups[] = { 931 + "gpio65", 932 + }; 933 + static const char * const pll_clk_groups[] = { 934 + "gpio65", 935 + }; 936 + static const char * const mdp_vsync_groups[] = { 937 + "gpio66", "gpio67", "gpio68", "gpio122", "gpio124", 938 + }; 939 + static const char * const dp_lcd_groups[] = { 940 + "gpio67", 941 + }; 942 + static const char * const dp_hot_groups[] = { 943 + "gpio68", 944 + }; 945 + static const char * const qspi_cs_groups[] = { 946 + "gpio69", "gpio75", 947 + }; 948 + static const char * const tsif0_clk_groups[] = { 949 + "gpio69", 950 + }; 951 + static const char * const qspi0_groups[] = { 952 + "gpio70", 953 + }; 954 + static const char * const tsif0_en_groups[] = { 955 + "gpio70", 956 + }; 957 + static const char * const mdp_vsync0_groups[] = { 958 + "gpio70", 959 + }; 960 + static const char * const mdp_vsync1_groups[] = { 961 + "gpio70", 962 + }; 963 + static const char * const mdp_vsync2_groups[] = { 964 + "gpio70", 965 + }; 966 + static const char * const mdp_vsync3_groups[] = { 967 + "gpio70", 968 + }; 969 + static const char * const qspi1_groups[] = { 970 + "gpio71", 971 + }; 972 + static const char * const tsif0_data_groups[] = { 973 + "gpio71", 974 + }; 975 + static const char * const sdc4_cmd_groups[] = { 976 + "gpio71", 977 + }; 978 + static const char * const qspi2_groups[] = { 979 + "gpio72", 980 + }; 981 + static const char * const tsif0_sync_groups[] = { 982 + "gpio72", 983 + }; 984 + static const char * const sdc43_groups[] = { 985 + "gpio72", 986 + }; 987 + static const char * const qspi_clk_groups[] = { 988 + "gpio73", 989 + }; 990 + static const char * const tsif1_clk_groups[] = { 991 + "gpio73", 992 + }; 993 + static const char * const sdc4_clk_groups[] = { 994 + "gpio73", 995 + }; 996 + static const char * const qspi3_groups[] = { 997 + "gpio74", 998 + }; 999 + static const char * const tsif1_en_groups[] = { 1000 + "gpio74", 1001 + }; 1002 + static const char * const sdc42_groups[] = { 1003 + "gpio74", 1004 + }; 1005 + 1006 + static const struct msm_function sm8250_functions[] = { 1007 + FUNCTION(aoss_cti), 1008 + FUNCTION(atest), 1009 + FUNCTION(audio_ref), 1010 + FUNCTION(cam_mclk), 1011 + FUNCTION(cci_async), 1012 + FUNCTION(cci_i2c), 1013 + FUNCTION(cci_timer0), 1014 + FUNCTION(cci_timer1), 1015 + FUNCTION(cci_timer2), 1016 + FUNCTION(cci_timer3), 1017 + FUNCTION(cci_timer4), 1018 + FUNCTION(cri_trng), 1019 + FUNCTION(cri_trng0), 1020 + FUNCTION(cri_trng1), 1021 + FUNCTION(dbg_out), 1022 + FUNCTION(ddr_bist), 1023 + FUNCTION(ddr_pxi0), 1024 + FUNCTION(ddr_pxi1), 1025 + FUNCTION(ddr_pxi2), 1026 + FUNCTION(ddr_pxi3), 1027 + FUNCTION(dp_hot), 1028 + FUNCTION(dp_lcd), 1029 + FUNCTION(gcc_gp1), 1030 + FUNCTION(gcc_gp2), 1031 + FUNCTION(gcc_gp3), 1032 + FUNCTION(gpio), 1033 + FUNCTION(ibi_i3c), 1034 + FUNCTION(jitter_bist), 1035 + FUNCTION(lpass_slimbus), 1036 + FUNCTION(mdp_vsync), 1037 + FUNCTION(mdp_vsync0), 1038 + FUNCTION(mdp_vsync1), 1039 + FUNCTION(mdp_vsync2), 1040 + FUNCTION(mdp_vsync3), 1041 + FUNCTION(mi2s0_data0), 1042 + FUNCTION(mi2s0_data1), 1043 + FUNCTION(mi2s0_sck), 1044 + FUNCTION(mi2s0_ws), 1045 + FUNCTION(mi2s1_data0), 1046 + FUNCTION(mi2s1_data1), 1047 + FUNCTION(mi2s1_sck), 1048 + FUNCTION(mi2s1_ws), 1049 + FUNCTION(mi2s2_data0), 1050 + FUNCTION(mi2s2_data1), 1051 + FUNCTION(mi2s2_sck), 1052 + FUNCTION(mi2s2_ws), 1053 + FUNCTION(pci_e0), 1054 + FUNCTION(pci_e1), 1055 + FUNCTION(pci_e2), 1056 + FUNCTION(phase_flag), 1057 + FUNCTION(pll_bist), 1058 + FUNCTION(pll_bypassnl), 1059 + FUNCTION(pll_clk), 1060 + FUNCTION(pll_reset), 1061 + FUNCTION(pri_mi2s), 1062 + FUNCTION(prng_rosc), 1063 + FUNCTION(qdss_cti), 1064 + FUNCTION(qdss_gpio), 1065 + FUNCTION(qspi0), 1066 + FUNCTION(qspi1), 1067 + FUNCTION(qspi2), 1068 + FUNCTION(qspi3), 1069 + FUNCTION(qspi_clk), 1070 + FUNCTION(qspi_cs), 1071 + FUNCTION(qup0), 1072 + FUNCTION(qup1), 1073 + FUNCTION(qup10), 1074 + FUNCTION(qup11), 1075 + FUNCTION(qup12), 1076 + FUNCTION(qup13), 1077 + FUNCTION(qup14), 1078 + FUNCTION(qup15), 1079 + FUNCTION(qup16), 1080 + FUNCTION(qup17), 1081 + FUNCTION(qup18), 1082 + FUNCTION(qup19), 1083 + FUNCTION(qup2), 1084 + FUNCTION(qup3), 1085 + FUNCTION(qup4), 1086 + FUNCTION(qup5), 1087 + FUNCTION(qup6), 1088 + FUNCTION(qup7), 1089 + FUNCTION(qup8), 1090 + FUNCTION(qup9), 1091 + FUNCTION(qup_l4), 1092 + FUNCTION(qup_l5), 1093 + FUNCTION(qup_l6), 1094 + FUNCTION(sd_write), 1095 + FUNCTION(sdc40), 1096 + FUNCTION(sdc41), 1097 + FUNCTION(sdc42), 1098 + FUNCTION(sdc43), 1099 + FUNCTION(sdc4_clk), 1100 + FUNCTION(sdc4_cmd), 1101 + FUNCTION(sec_mi2s), 1102 + FUNCTION(sp_cmu), 1103 + FUNCTION(tgu_ch0), 1104 + FUNCTION(tgu_ch1), 1105 + FUNCTION(tgu_ch2), 1106 + FUNCTION(tgu_ch3), 1107 + FUNCTION(tsense_pwm1), 1108 + FUNCTION(tsense_pwm2), 1109 + FUNCTION(tsif0_clk), 1110 + FUNCTION(tsif0_data), 1111 + FUNCTION(tsif0_en), 1112 + FUNCTION(tsif0_error), 1113 + FUNCTION(tsif0_sync), 1114 + FUNCTION(tsif1_clk), 1115 + FUNCTION(tsif1_data), 1116 + FUNCTION(tsif1_en), 1117 + FUNCTION(tsif1_error), 1118 + FUNCTION(tsif1_sync), 1119 + FUNCTION(usb2phy_ac), 1120 + FUNCTION(usb_phy), 1121 + FUNCTION(vsense_trigger), 1122 + }; 1123 + 1124 + /* Every pin is maintained as a single group, and missing or non-existing pin 1125 + * would be maintained as dummy group to synchronize pin group index with 1126 + * pin descriptor registered with pinctrl core. 1127 + * Clients would not be able to request these dummy pin groups. 1128 + */ 1129 + static const struct msm_pingroup sm8250_groups[] = { 1130 + [0] = PINGROUP(0, SOUTH, qup19, qdss_cti, _, _, _, _, _, _, _), 1131 + [1] = PINGROUP(1, SOUTH, qup19, _, _, _, _, _, _, _, _), 1132 + [2] = PINGROUP(2, SOUTH, qup19, qdss_cti, qdss_cti, _, _, _, _, _, _), 1133 + [3] = PINGROUP(3, SOUTH, qup19, _, _, _, _, _, _, _, _), 1134 + [4] = PINGROUP(4, NORTH, qup1, ibi_i3c, _, _, _, _, _, _, _), 1135 + [5] = PINGROUP(5, NORTH, qup1, ibi_i3c, _, _, _, _, _, _, _), 1136 + [6] = PINGROUP(6, NORTH, qup1, qup_l4, _, _, _, _, _, _, _), 1137 + [7] = PINGROUP(7, NORTH, qup1, qup_l5, _, _, _, _, _, _, _), 1138 + [8] = PINGROUP(8, NORTH, qup4, _, _, _, _, _, _, _, _), 1139 + [9] = PINGROUP(9, NORTH, qup4, _, _, _, _, _, _, _, _), 1140 + [10] = PINGROUP(10, NORTH, qup4, _, _, _, _, _, _, _, _), 1141 + [11] = PINGROUP(11, NORTH, qup4, _, _, _, _, _, _, _, _), 1142 + [12] = PINGROUP(12, NORTH, qup5, _, _, _, _, _, _, _, _), 1143 + [13] = PINGROUP(13, NORTH, qup5, _, _, _, _, _, _, _, _), 1144 + [14] = PINGROUP(14, NORTH, qup5, qup_l4, _, _, _, _, _, _, _), 1145 + [15] = PINGROUP(15, NORTH, qup5, qup_l5, _, _, _, _, _, _, _), 1146 + [16] = PINGROUP(16, NORTH, qup6, _, _, _, _, _, _, _, _), 1147 + [17] = PINGROUP(17, NORTH, qup6, _, _, _, _, _, _, _, _), 1148 + [18] = PINGROUP(18, NORTH, qup6, _, _, _, _, _, _, _, _), 1149 + [19] = PINGROUP(19, NORTH, qup6, _, _, _, _, _, _, _, _), 1150 + [20] = PINGROUP(20, NORTH, qup7, _, _, _, _, _, _, _, _), 1151 + [21] = PINGROUP(21, NORTH, qup7, _, _, _, _, _, _, _, _), 1152 + [22] = PINGROUP(22, NORTH, qup7, _, _, _, _, _, _, _, _), 1153 + [23] = PINGROUP(23, NORTH, qup7, _, _, _, _, _, _, _, _), 1154 + [24] = PINGROUP(24, SOUTH, qup8, ibi_i3c, atest, _, _, _, _, _, _), 1155 + [25] = PINGROUP(25, SOUTH, qup8, ibi_i3c, atest, _, _, _, _, _, _), 1156 + [26] = PINGROUP(26, SOUTH, qup8, atest, _, _, _, _, _, _, _), 1157 + [27] = PINGROUP(27, SOUTH, qup8, atest, _, _, _, _, _, _, _), 1158 + [28] = PINGROUP(28, NORTH, qup0, ibi_i3c, _, _, _, _, _, _, _), 1159 + [29] = PINGROUP(29, NORTH, qup0, ibi_i3c, _, _, _, _, _, _, _), 1160 + [30] = PINGROUP(30, NORTH, qup0, _, _, _, _, _, _, _, _), 1161 + [31] = PINGROUP(31, NORTH, qup0, _, _, _, _, _, _, _, _), 1162 + [32] = PINGROUP(32, SOUTH, qup12, _, atest, _, _, _, _, _, _), 1163 + [33] = PINGROUP(33, SOUTH, qup12, atest, _, _, _, _, _, _, _), 1164 + [34] = PINGROUP(34, SOUTH, qup12, atest, _, _, _, _, _, _, _), 1165 + [35] = PINGROUP(35, SOUTH, qup12, atest, _, _, _, _, _, _, _), 1166 + [36] = PINGROUP(36, SOUTH, qup13, atest, _, _, _, _, _, _, _), 1167 + [37] = PINGROUP(37, SOUTH, qup13, atest, _, _, _, _, _, _, _), 1168 + [38] = PINGROUP(38, SOUTH, qup13, _, _, _, _, _, _, _, _), 1169 + [39] = PINGROUP(39, SOUTH, qup13, _, _, _, _, _, _, _, _), 1170 + [40] = PINGROUP(40, SOUTH, qup14, ibi_i3c, _, ddr_pxi3, _, _, _, _, _), 1171 + [41] = PINGROUP(41, SOUTH, qup14, ibi_i3c, _, ddr_pxi1, _, _, _, _, _), 1172 + [42] = PINGROUP(42, SOUTH, qup14, vsense_trigger, ddr_pxi1, _, _, _, _, _, _), 1173 + [43] = PINGROUP(43, SOUTH, qup14, ddr_pxi3, _, _, _, _, _, _, _), 1174 + [44] = PINGROUP(44, SOUTH, qup15, qdss_cti, dbg_out, _, _, _, _, _, _), 1175 + [45] = PINGROUP(45, SOUTH, qup15, qdss_cti, phase_flag, _, _, _, _, _, _), 1176 + [46] = PINGROUP(46, SOUTH, qup15, qup_l4, qdss_cti, phase_flag, _, _, _, _, _), 1177 + [47] = PINGROUP(47, SOUTH, qup15, qup_l5, phase_flag, _, _, _, _, _, _), 1178 + [48] = PINGROUP(48, SOUTH, qup16, phase_flag, _, _, _, _, _, _, _), 1179 + [49] = PINGROUP(49, SOUTH, qup16, phase_flag, _, _, _, _, _, _, _), 1180 + [50] = PINGROUP(50, SOUTH, qup16, phase_flag, _, _, _, _, _, _, _), 1181 + [51] = PINGROUP(51, SOUTH, qup16, phase_flag, _, _, _, _, _, _, _), 1182 + [52] = PINGROUP(52, SOUTH, qup17, ddr_pxi0, _, _, _, _, _, _, _), 1183 + [53] = PINGROUP(53, SOUTH, qup17, ddr_pxi0, _, _, _, _, _, _, _), 1184 + [54] = PINGROUP(54, SOUTH, qup17, jitter_bist, _, _, _, _, _, _, _), 1185 + [55] = PINGROUP(55, SOUTH, qup17, pll_bist, ddr_pxi2, _, _, _, _, _, _), 1186 + [56] = PINGROUP(56, SOUTH, qup18, ddr_pxi2, _, _, _, _, _, _, _), 1187 + [57] = PINGROUP(57, SOUTH, qup18, _, _, _, _, _, _, _, _), 1188 + [58] = PINGROUP(58, SOUTH, qup18, _, _, _, _, _, _, _, _), 1189 + [59] = PINGROUP(59, SOUTH, qup18, _, _, _, _, _, _, _, _), 1190 + [60] = PINGROUP(60, SOUTH, qup11, _, _, _, _, _, _, _, _), 1191 + [61] = PINGROUP(61, SOUTH, qup11, _, _, _, _, _, _, _, _), 1192 + [62] = PINGROUP(62, SOUTH, qup11, _, _, _, _, _, _, _, _), 1193 + [63] = PINGROUP(63, SOUTH, qup11, _, _, _, _, _, _, _, _), 1194 + [64] = PINGROUP(64, SOUTH, usb2phy_ac, qup_l6, _, _, _, _, _, _, _), 1195 + [65] = PINGROUP(65, SOUTH, usb_phy, pll_clk, _, _, _, _, _, _, _), 1196 + [66] = PINGROUP(66, NORTH, mdp_vsync, _, _, _, _, _, _, _, _), 1197 + [67] = PINGROUP(67, NORTH, mdp_vsync, dp_lcd, _, _, _, _, _, _, _), 1198 + [68] = PINGROUP(68, NORTH, mdp_vsync, dp_hot, _, _, _, _, _, _, _), 1199 + [69] = PINGROUP(69, SOUTH, qspi_cs, tsif0_clk, phase_flag, _, _, _, _, _, _), 1200 + [70] = PINGROUP(70, SOUTH, qspi0, tsif0_en, mdp_vsync0, mdp_vsync1, mdp_vsync2, mdp_vsync3, phase_flag, _, _), 1201 + [71] = PINGROUP(71, SOUTH, qspi1, tsif0_data, sdc4_cmd, phase_flag, _, _, _, _, _), 1202 + [72] = PINGROUP(72, SOUTH, qspi2, tsif0_sync, sdc43, phase_flag, _, _, _, _, _), 1203 + [73] = PINGROUP(73, SOUTH, qspi_clk, tsif1_clk, sdc4_clk, phase_flag, _, _, _, _, _), 1204 + [74] = PINGROUP(74, SOUTH, qspi3, tsif1_en, sdc42, phase_flag, _, _, _, _, _), 1205 + [75] = PINGROUP(75, SOUTH, qspi_cs, tsif1_data, sdc41, _, _, _, _, _, _), 1206 + [76] = PINGROUP(76, SOUTH, tsif1_sync, sdc40, _, _, _, _, _, _, _), 1207 + [77] = PINGROUP(77, NORTH, qup_l6, aoss_cti, phase_flag, _, _, _, _, _, _), 1208 + [78] = PINGROUP(78, NORTH, sd_write, phase_flag, _, _, _, _, _, _, _), 1209 + [79] = PINGROUP(79, NORTH, pci_e0, phase_flag, _, _, _, _, _, _, _), 1210 + [80] = PINGROUP(80, NORTH, pci_e0, phase_flag, _, _, _, _, _, _, _), 1211 + [81] = PINGROUP(81, NORTH, phase_flag, _, _, _, _, _, _, _, _), 1212 + [82] = PINGROUP(82, NORTH, pci_e1, phase_flag, _, _, _, _, _, _, _), 1213 + [83] = PINGROUP(83, NORTH, pci_e1, phase_flag, _, _, _, _, _, _, _), 1214 + [84] = PINGROUP(84, NORTH, phase_flag, _, _, _, _, _, _, _, _), 1215 + [85] = PINGROUP(85, SOUTH, pci_e2, tgu_ch0, atest, _, _, _, _, _, _), 1216 + [86] = PINGROUP(86, SOUTH, pci_e2, tgu_ch3, atest, _, _, _, _, _, _), 1217 + [87] = PINGROUP(87, SOUTH, atest, _, _, _, _, _, _, _, _), 1218 + [88] = PINGROUP(88, SOUTH, _, atest, _, _, _, _, _, _, _), 1219 + [89] = PINGROUP(89, SOUTH, _, atest, _, _, _, _, _, _, _), 1220 + [90] = PINGROUP(90, SOUTH, tsif1_error, usb2phy_ac, tgu_ch1, _, _, _, _, _, _), 1221 + [91] = PINGROUP(91, SOUTH, tsif0_error, tgu_ch2, _, _, _, _, _, _, _), 1222 + [92] = PINGROUP(92, NORTH, qup_l6, qdss_cti, _, _, _, _, _, _, _), 1223 + [93] = PINGROUP(93, NORTH, qup_l6, qdss_cti, _, _, _, _, _, _, _), 1224 + [94] = PINGROUP(94, NORTH, cam_mclk, ddr_bist, qdss_gpio, _, _, _, _, _, _), 1225 + [95] = PINGROUP(95, NORTH, cam_mclk, ddr_bist, qdss_gpio, _, _, _, _, _, _), 1226 + [96] = PINGROUP(96, NORTH, cam_mclk, pll_bypassnl, qdss_gpio, _, _, _, _, _, _), 1227 + [97] = PINGROUP(97, NORTH, cam_mclk, pll_reset, qdss_gpio, _, _, _, _, _, _), 1228 + [98] = PINGROUP(98, NORTH, cam_mclk, qdss_gpio, _, _, _, _, _, _, _), 1229 + [99] = PINGROUP(99, NORTH, cam_mclk, qdss_gpio, _, _, _, _, _, _, _), 1230 + [100] = PINGROUP(100, NORTH, cam_mclk, qdss_gpio, _, _, _, _, _, _, _), 1231 + [101] = PINGROUP(101, NORTH, cci_i2c, qdss_gpio, _, _, _, _, _, _, _), 1232 + [102] = PINGROUP(102, NORTH, cci_i2c, qdss_gpio, _, _, _, _, _, _, _), 1233 + [103] = PINGROUP(103, NORTH, cci_i2c, phase_flag, _, qdss_gpio, _, _, _, _, _), 1234 + [104] = PINGROUP(104, NORTH, cci_i2c, phase_flag, _, qdss_gpio, _, _, _, _, _), 1235 + [105] = PINGROUP(105, NORTH, cci_i2c, qdss_gpio, _, _, _, _, _, _, _), 1236 + [106] = PINGROUP(106, NORTH, cci_i2c, gcc_gp1, qdss_gpio, _, _, _, _, _, _), 1237 + [107] = PINGROUP(107, NORTH, cci_i2c, gcc_gp2, qdss_gpio, _, _, _, _, _, _), 1238 + [108] = PINGROUP(108, NORTH, cci_i2c, gcc_gp3, qdss_gpio, _, _, _, _, _, _), 1239 + [109] = PINGROUP(109, NORTH, cci_timer0, qdss_gpio, _, _, _, _, _, _, _), 1240 + [110] = PINGROUP(110, NORTH, cci_timer1, qdss_gpio, _, _, _, _, _, _, _), 1241 + [111] = PINGROUP(111, NORTH, cci_timer2, qdss_gpio, _, _, _, _, _, _, _), 1242 + [112] = PINGROUP(112, NORTH, cci_timer3, cci_async, _, _, _, _, _, _, _), 1243 + [113] = PINGROUP(113, NORTH, cci_timer4, cci_async, _, _, _, _, _, _, _), 1244 + [114] = PINGROUP(114, NORTH, cci_async, _, _, _, _, _, _, _, _), 1245 + [115] = PINGROUP(115, NORTH, qup2, phase_flag, _, _, _, _, _, _, _), 1246 + [116] = PINGROUP(116, NORTH, qup2, phase_flag, _, _, _, _, _, _, _), 1247 + [117] = PINGROUP(117, NORTH, qup2, phase_flag, _, _, _, _, _, _, _), 1248 + [118] = PINGROUP(118, NORTH, qup2, phase_flag, _, _, _, _, _, _, _), 1249 + [119] = PINGROUP(119, NORTH, qup3, phase_flag, _, _, _, _, _, _, _), 1250 + [120] = PINGROUP(120, NORTH, qup3, phase_flag, _, _, _, _, _, _, _), 1251 + [121] = PINGROUP(121, NORTH, qup3, _, _, _, _, _, _, _, _), 1252 + [122] = PINGROUP(122, NORTH, qup3, mdp_vsync, phase_flag, _, _, _, _, _, _), 1253 + [123] = PINGROUP(123, NORTH, qup_l4, tsense_pwm1, tsense_pwm2, _, _, _, _, _, _), 1254 + [124] = PINGROUP(124, NORTH, qup_l5, mdp_vsync, phase_flag, _, _, _, _, _, _), 1255 + [125] = PINGROUP(125, SOUTH, qup9, phase_flag, _, _, _, _, _, _, _), 1256 + [126] = PINGROUP(126, SOUTH, qup9, _, _, _, _, _, _, _, _), 1257 + [127] = PINGROUP(127, SOUTH, qup9, _, _, _, _, _, _, _, _), 1258 + [128] = PINGROUP(128, SOUTH, qup9, _, _, _, _, _, _, _, _), 1259 + [129] = PINGROUP(129, SOUTH, qup10, _, _, _, _, _, _, _, _), 1260 + [130] = PINGROUP(130, SOUTH, qup10, _, _, _, _, _, _, _, _), 1261 + [131] = PINGROUP(131, SOUTH, qup10, _, _, _, _, _, _, _, _), 1262 + [132] = PINGROUP(132, SOUTH, qup10, _, _, _, _, _, _, _, _), 1263 + [133] = PINGROUP(133, WEST, mi2s2_sck, _, _, _, _, _, _, _, _), 1264 + [134] = PINGROUP(134, WEST, mi2s2_data0, _, _, _, _, _, _, _, _), 1265 + [135] = PINGROUP(135, WEST, mi2s2_ws, _, _, _, _, _, _, _, _), 1266 + [136] = PINGROUP(136, WEST, pri_mi2s, gcc_gp1, _, _, _, _, _, _, _), 1267 + [137] = PINGROUP(137, WEST, sec_mi2s, audio_ref, mi2s2_data1, gcc_gp2, _, _, _, _, _), 1268 + [138] = PINGROUP(138, WEST, mi2s0_sck, gcc_gp3, _, _, _, _, _, _, _), 1269 + [139] = PINGROUP(139, WEST, mi2s0_data0, _, _, _, _, _, _, _, _), 1270 + [140] = PINGROUP(140, WEST, mi2s0_data1, _, _, _, _, _, _, _, _), 1271 + [141] = PINGROUP(141, WEST, mi2s0_ws, _, _, _, _, _, _, _, _), 1272 + [142] = PINGROUP(142, WEST, lpass_slimbus, mi2s1_sck, _, _, _, _, _, _, _), 1273 + [143] = PINGROUP(143, WEST, lpass_slimbus, mi2s1_data0, ddr_bist, _, _, _, _, _, _), 1274 + [144] = PINGROUP(144, WEST, lpass_slimbus, mi2s1_data1, ddr_bist, _, _, _, _, _, _), 1275 + [145] = PINGROUP(145, WEST, lpass_slimbus, mi2s1_ws, _, _, _, _, _, _, _), 1276 + [146] = PINGROUP(146, WEST, _, _, _, _, _, _, _, _, _), 1277 + [147] = PINGROUP(147, WEST, _, _, _, _, _, _, _, _, _), 1278 + [148] = PINGROUP(148, WEST, _, _, _, _, _, _, _, _, _), 1279 + [149] = PINGROUP(149, WEST, _, _, _, _, _, _, _, _, _), 1280 + [150] = PINGROUP(150, WEST, _, _, _, _, _, _, _, _, _), 1281 + [151] = PINGROUP(151, WEST, _, _, _, _, _, _, _, _, _), 1282 + [152] = PINGROUP(152, WEST, _, _, _, _, _, _, _, _, _), 1283 + [153] = PINGROUP(153, WEST, _, _, _, _, _, _, _, _, _), 1284 + [154] = PINGROUP(154, WEST, _, _, _, _, _, _, _, _, _), 1285 + [155] = PINGROUP(155, WEST, _, _, _, _, _, _, _, _, _), 1286 + [156] = PINGROUP(156, WEST, _, _, _, _, _, _, _, _, _), 1287 + [157] = PINGROUP(157, WEST, _, _, _, _, _, _, _, _, _), 1288 + [158] = PINGROUP(158, WEST, _, _, _, _, _, _, _, _, _), 1289 + [159] = PINGROUP(159, WEST, cri_trng0, _, _, _, _, _, _, _, _), 1290 + [160] = PINGROUP(160, WEST, cri_trng1, qdss_gpio, _, _, _, _, _, _, _), 1291 + [161] = PINGROUP(161, WEST, cri_trng, qdss_gpio, _, _, _, _, _, _, _), 1292 + [162] = PINGROUP(162, WEST, sp_cmu, qdss_gpio, _, _, _, _, _, _, _), 1293 + [163] = PINGROUP(163, WEST, prng_rosc, qdss_gpio, _, _, _, _, _, _, _), 1294 + [164] = PINGROUP(164, WEST, qdss_gpio, _, _, _, _, _, _, _, _), 1295 + [165] = PINGROUP(165, WEST, qdss_gpio, _, _, _, _, _, _, _, _), 1296 + [166] = PINGROUP(166, WEST, qdss_gpio, _, _, _, _, _, _, _, _), 1297 + [167] = PINGROUP(167, WEST, qdss_gpio, _, _, _, _, _, _, _, _), 1298 + [168] = PINGROUP(168, WEST, qdss_gpio, _, _, _, _, _, _, _, _), 1299 + [169] = PINGROUP(169, WEST, qdss_gpio, _, _, _, _, _, _, _, _), 1300 + [170] = PINGROUP(170, WEST, qdss_gpio, _, _, _, _, _, _, _, _), 1301 + [171] = PINGROUP(171, WEST, qdss_gpio, _, _, _, _, _, _, _, _), 1302 + [172] = PINGROUP(172, WEST, qdss_gpio, _, _, _, _, _, _, _, _), 1303 + [173] = PINGROUP(173, WEST, qdss_gpio, _, _, _, _, _, _, _, _), 1304 + [174] = PINGROUP(174, WEST, qdss_gpio, _, _, _, _, _, _, _, _), 1305 + [175] = PINGROUP(175, WEST, qdss_gpio, _, _, _, _, _, _, _, _), 1306 + [176] = PINGROUP(176, WEST, qdss_gpio, _, _, _, _, _, _, _, _), 1307 + [177] = PINGROUP(177, WEST, qdss_gpio, _, _, _, _, _, _, _, _), 1308 + [178] = PINGROUP(178, WEST, _, _, _, _, _, _, _, _, _), 1309 + [179] = PINGROUP(179, WEST, _, _, _, _, _, _, _, _, _), 1310 + [180] = UFS_RESET(ufs_reset, 0xb8000), 1311 + [181] = SDC_PINGROUP(sdc2_clk, 0x7000, 14, 6), 1312 + [182] = SDC_PINGROUP(sdc2_cmd, 0xb7000, 11, 3), 1313 + [183] = SDC_PINGROUP(sdc2_data, 0xb7000, 9, 0), 1314 + }; 1315 + 1316 + static const struct msm_pinctrl_soc_data sm8250_pinctrl = { 1317 + .pins = sm8250_pins, 1318 + .npins = ARRAY_SIZE(sm8250_pins), 1319 + .functions = sm8250_functions, 1320 + .nfunctions = ARRAY_SIZE(sm8250_functions), 1321 + .groups = sm8250_groups, 1322 + .ngroups = ARRAY_SIZE(sm8250_groups), 1323 + .ngpios = 181, 1324 + .tiles = sm8250_tiles, 1325 + .ntiles = ARRAY_SIZE(sm8250_tiles), 1326 + }; 1327 + 1328 + static int sm8250_pinctrl_probe(struct platform_device *pdev) 1329 + { 1330 + return msm_pinctrl_probe(pdev, &sm8250_pinctrl); 1331 + } 1332 + 1333 + static const struct of_device_id sm8250_pinctrl_of_match[] = { 1334 + { .compatible = "qcom,sm8250-pinctrl", }, 1335 + { }, 1336 + }; 1337 + 1338 + static struct platform_driver sm8250_pinctrl_driver = { 1339 + .driver = { 1340 + .name = "sm8250-pinctrl", 1341 + .of_match_table = sm8250_pinctrl_of_match, 1342 + }, 1343 + .probe = sm8250_pinctrl_probe, 1344 + .remove = msm_pinctrl_remove, 1345 + }; 1346 + 1347 + static int __init sm8250_pinctrl_init(void) 1348 + { 1349 + return platform_driver_register(&sm8250_pinctrl_driver); 1350 + } 1351 + arch_initcall(sm8250_pinctrl_init); 1352 + 1353 + static void __exit sm8250_pinctrl_exit(void) 1354 + { 1355 + platform_driver_unregister(&sm8250_pinctrl_driver); 1356 + } 1357 + module_exit(sm8250_pinctrl_exit); 1358 + 1359 + MODULE_DESCRIPTION("QTI sm8250 pinctrl driver"); 1360 + MODULE_LICENSE("GPL v2"); 1361 + MODULE_DEVICE_TABLE(of, sm8250_pinctrl_of_match);
+58 -24
drivers/pinctrl/samsung/pinctrl-exynos.c
··· 40 40 u32 eint_pend; 41 41 u32 eint_wake_mask_value; 42 42 u32 eint_wake_mask_reg; 43 + void (*set_eint_wakeup_mask)(struct samsung_pinctrl_drv_data *drvdata, 44 + struct exynos_irq_chip *irq_chip); 43 45 }; 44 46 45 47 static inline struct exynos_irq_chip *to_exynos_irq_chip(struct irq_chip *chip) ··· 267 265 u32 eint_con; 268 266 u32 eint_fltcon0; 269 267 u32 eint_fltcon1; 268 + u32 eint_mask; 270 269 }; 271 270 272 271 /* ··· 345 342 return 0; 346 343 } 347 344 345 + static void 346 + exynos_pinctrl_set_eint_wakeup_mask(struct samsung_pinctrl_drv_data *drvdata, 347 + struct exynos_irq_chip *irq_chip) 348 + { 349 + struct regmap *pmu_regs; 350 + 351 + if (!drvdata->retention_ctrl || !drvdata->retention_ctrl->priv) { 352 + dev_warn(drvdata->dev, 353 + "No retention data configured bank with external wakeup interrupt. Wake-up mask will not be set.\n"); 354 + return; 355 + } 356 + 357 + pmu_regs = drvdata->retention_ctrl->priv; 358 + dev_info(drvdata->dev, 359 + "Setting external wakeup interrupt mask: 0x%x\n", 360 + irq_chip->eint_wake_mask_value); 361 + 362 + regmap_write(pmu_regs, irq_chip->eint_wake_mask_reg, 363 + irq_chip->eint_wake_mask_value); 364 + } 365 + 366 + static void 367 + s5pv210_pinctrl_set_eint_wakeup_mask(struct samsung_pinctrl_drv_data *drvdata, 368 + struct exynos_irq_chip *irq_chip) 369 + 370 + { 371 + void __iomem *clk_base; 372 + 373 + if (!drvdata->retention_ctrl || !drvdata->retention_ctrl->priv) { 374 + dev_warn(drvdata->dev, 375 + "No retention data configured bank with external wakeup interrupt. Wake-up mask will not be set.\n"); 376 + return; 377 + } 378 + 379 + 380 + clk_base = (void __iomem *) drvdata->retention_ctrl->priv; 381 + 382 + __raw_writel(irq_chip->eint_wake_mask_value, 383 + clk_base + irq_chip->eint_wake_mask_reg); 384 + } 385 + 348 386 /* 349 387 * irq_chip for wakeup interrupts 350 388 */ ··· 404 360 .eint_mask = EXYNOS_WKUP_EMASK_OFFSET, 405 361 .eint_pend = EXYNOS_WKUP_EPEND_OFFSET, 406 362 .eint_wake_mask_value = EXYNOS_EINT_WAKEUP_MASK_DISABLED, 407 - /* Only difference with exynos4210_wkup_irq_chip: */ 363 + /* Only differences with exynos4210_wkup_irq_chip: */ 408 364 .eint_wake_mask_reg = S5PV210_EINT_WAKEUP_MASK, 365 + .set_eint_wakeup_mask = s5pv210_pinctrl_set_eint_wakeup_mask, 409 366 }; 410 367 411 368 static const struct exynos_irq_chip exynos4210_wkup_irq_chip __initconst = { ··· 425 380 .eint_pend = EXYNOS_WKUP_EPEND_OFFSET, 426 381 .eint_wake_mask_value = EXYNOS_EINT_WAKEUP_MASK_DISABLED, 427 382 .eint_wake_mask_reg = EXYNOS_EINT_WAKEUP_MASK, 383 + .set_eint_wakeup_mask = exynos_pinctrl_set_eint_wakeup_mask, 428 384 }; 429 385 430 386 static const struct exynos_irq_chip exynos7_wkup_irq_chip __initconst = { ··· 444 398 .eint_pend = EXYNOS7_WKUP_EPEND_OFFSET, 445 399 .eint_wake_mask_value = EXYNOS_EINT_WAKEUP_MASK_DISABLED, 446 400 .eint_wake_mask_reg = EXYNOS5433_EINT_WAKEUP_MASK, 401 + .set_eint_wakeup_mask = exynos_pinctrl_set_eint_wakeup_mask, 447 402 }; 448 403 449 404 /* list of external wakeup controllers supported */ ··· 621 574 return 0; 622 575 } 623 576 624 - static void 625 - exynos_pinctrl_set_eint_wakeup_mask(struct samsung_pinctrl_drv_data *drvdata, 626 - struct exynos_irq_chip *irq_chip) 627 - { 628 - struct regmap *pmu_regs; 629 - 630 - if (!drvdata->retention_ctrl || !drvdata->retention_ctrl->priv) { 631 - dev_warn(drvdata->dev, 632 - "No retention data configured bank with external wakeup interrupt. Wake-up mask will not be set.\n"); 633 - return; 634 - } 635 - 636 - pmu_regs = drvdata->retention_ctrl->priv; 637 - dev_info(drvdata->dev, 638 - "Setting external wakeup interrupt mask: 0x%x\n", 639 - irq_chip->eint_wake_mask_value); 640 - 641 - regmap_write(pmu_regs, irq_chip->eint_wake_mask_reg, 642 - irq_chip->eint_wake_mask_value); 643 - } 644 - 645 577 static void exynos_pinctrl_suspend_bank( 646 578 struct samsung_pinctrl_drv_data *drvdata, 647 579 struct samsung_pin_bank *bank) ··· 634 608 + 2 * bank->eint_offset); 635 609 save->eint_fltcon1 = readl(regs + EXYNOS_GPIO_EFLTCON_OFFSET 636 610 + 2 * bank->eint_offset + 4); 611 + save->eint_mask = readl(regs + bank->irq_chip->eint_mask 612 + + bank->eint_offset); 637 613 638 614 pr_debug("%s: save con %#010x\n", bank->name, save->eint_con); 639 615 pr_debug("%s: save fltcon0 %#010x\n", bank->name, save->eint_fltcon0); 640 616 pr_debug("%s: save fltcon1 %#010x\n", bank->name, save->eint_fltcon1); 617 + pr_debug("%s: save mask %#010x\n", bank->name, save->eint_mask); 641 618 } 642 619 643 620 void exynos_pinctrl_suspend(struct samsung_pinctrl_drv_data *drvdata) ··· 655 626 else if (bank->eint_type == EINT_TYPE_WKUP) { 656 627 if (!irq_chip) { 657 628 irq_chip = bank->irq_chip; 658 - exynos_pinctrl_set_eint_wakeup_mask(drvdata, 659 - irq_chip); 629 + irq_chip->set_eint_wakeup_mask(drvdata, 630 + irq_chip); 660 631 } else if (bank->irq_chip != irq_chip) { 661 632 dev_warn(drvdata->dev, 662 633 "More than one external wakeup interrupt chip configured (bank: %s). This is not supported by hardware nor by driver.\n", ··· 682 653 pr_debug("%s: fltcon1 %#010x => %#010x\n", bank->name, 683 654 readl(regs + EXYNOS_GPIO_EFLTCON_OFFSET 684 655 + 2 * bank->eint_offset + 4), save->eint_fltcon1); 656 + pr_debug("%s: mask %#010x => %#010x\n", bank->name, 657 + readl(regs + bank->irq_chip->eint_mask 658 + + bank->eint_offset), save->eint_mask); 685 659 686 660 writel(save->eint_con, regs + EXYNOS_GPIO_ECON_OFFSET 687 661 + bank->eint_offset); ··· 692 660 + 2 * bank->eint_offset); 693 661 writel(save->eint_fltcon1, regs + EXYNOS_GPIO_EFLTCON_OFFSET 694 662 + 2 * bank->eint_offset + 4); 663 + writel(save->eint_mask, regs + bank->irq_chip->eint_mask 664 + + bank->eint_offset); 695 665 } 696 666 697 667 void exynos_pinctrl_resume(struct samsung_pinctrl_drv_data *drvdata)
+4
drivers/pinctrl/sh-pfc/Kconfig
··· 12 12 select PINCTRL_PFC_EMEV2 if ARCH_EMEV2 13 13 select PINCTRL_PFC_R8A73A4 if ARCH_R8A73A4 14 14 select PINCTRL_PFC_R8A7740 if ARCH_R8A7740 15 + select PINCTRL_PFC_R8A7742 if ARCH_R8A7742 15 16 select PINCTRL_PFC_R8A7743 if ARCH_R8A7743 16 17 select PINCTRL_PFC_R8A7744 if ARCH_R8A7744 17 18 select PINCTRL_PFC_R8A7745 if ARCH_R8A7745 ··· 74 73 config PINCTRL_PFC_R8A7740 75 74 bool "R-Mobile A1 pin control support" if COMPILE_TEST 76 75 select PINCTRL_SH_PFC_GPIO 76 + 77 + config PINCTRL_PFC_R8A7742 78 + bool "RZ/G1H pin control support" if COMPILE_TEST 77 79 78 80 config PINCTRL_PFC_R8A7743 79 81 bool "RZ/G1M pin control support" if COMPILE_TEST
+1
drivers/pinctrl/sh-pfc/Makefile
··· 4 4 obj-$(CONFIG_PINCTRL_PFC_EMEV2) += pfc-emev2.o 5 5 obj-$(CONFIG_PINCTRL_PFC_R8A73A4) += pfc-r8a73a4.o 6 6 obj-$(CONFIG_PINCTRL_PFC_R8A7740) += pfc-r8a7740.o 7 + obj-$(CONFIG_PINCTRL_PFC_R8A7742) += pfc-r8a7790.o 7 8 obj-$(CONFIG_PINCTRL_PFC_R8A7743) += pfc-r8a7791.o 8 9 obj-$(CONFIG_PINCTRL_PFC_R8A7744) += pfc-r8a7791.o 9 10 obj-$(CONFIG_PINCTRL_PFC_R8A7745) += pfc-r8a7794.o
+6
drivers/pinctrl/sh-pfc/core.c
··· 485 485 .data = &r8a7740_pinmux_info, 486 486 }, 487 487 #endif 488 + #ifdef CONFIG_PINCTRL_PFC_R8A7742 489 + { 490 + .compatible = "renesas,pfc-r8a7742", 491 + .data = &r8a7742_pinmux_info, 492 + }, 493 + #endif 488 494 #ifdef CONFIG_PINCTRL_PFC_R8A7743 489 495 { 490 496 .compatible = "renesas,pfc-r8a7743",
+392 -352
drivers/pinctrl/sh-pfc/pfc-r8a7790.c
··· 3938 3938 VI3_CLK_MARK, 3939 3939 }; 3940 3940 3941 - static const struct sh_pfc_pin_group pinmux_groups[] = { 3942 - SH_PFC_PIN_GROUP(audio_clk_a), 3943 - SH_PFC_PIN_GROUP(audio_clk_b), 3944 - SH_PFC_PIN_GROUP(audio_clk_c), 3945 - SH_PFC_PIN_GROUP(audio_clkout), 3946 - SH_PFC_PIN_GROUP(audio_clkout_b), 3947 - SH_PFC_PIN_GROUP(audio_clkout_c), 3948 - SH_PFC_PIN_GROUP(audio_clkout_d), 3949 - SH_PFC_PIN_GROUP(avb_link), 3950 - SH_PFC_PIN_GROUP(avb_magic), 3951 - SH_PFC_PIN_GROUP(avb_phy_int), 3952 - SH_PFC_PIN_GROUP(avb_mdio), 3953 - SH_PFC_PIN_GROUP(avb_mii), 3954 - SH_PFC_PIN_GROUP(avb_gmii), 3955 - SH_PFC_PIN_GROUP(du_rgb666), 3956 - SH_PFC_PIN_GROUP(du_rgb888), 3957 - SH_PFC_PIN_GROUP(du_clk_out_0), 3958 - SH_PFC_PIN_GROUP(du_clk_out_1), 3959 - SH_PFC_PIN_GROUP(du_sync_0), 3960 - SH_PFC_PIN_GROUP(du_sync_1), 3961 - SH_PFC_PIN_GROUP(du_cde), 3962 - SH_PFC_PIN_GROUP(du0_clk_in), 3963 - SH_PFC_PIN_GROUP(du1_clk_in), 3964 - SH_PFC_PIN_GROUP(du2_clk_in), 3965 - SH_PFC_PIN_GROUP(eth_link), 3966 - SH_PFC_PIN_GROUP(eth_magic), 3967 - SH_PFC_PIN_GROUP(eth_mdio), 3968 - SH_PFC_PIN_GROUP(eth_rmii), 3969 - SH_PFC_PIN_GROUP(hscif0_data), 3970 - SH_PFC_PIN_GROUP(hscif0_clk), 3971 - SH_PFC_PIN_GROUP(hscif0_ctrl), 3972 - SH_PFC_PIN_GROUP(hscif0_data_b), 3973 - SH_PFC_PIN_GROUP(hscif0_ctrl_b), 3974 - SH_PFC_PIN_GROUP(hscif0_data_c), 3975 - SH_PFC_PIN_GROUP(hscif0_ctrl_c), 3976 - SH_PFC_PIN_GROUP(hscif0_data_d), 3977 - SH_PFC_PIN_GROUP(hscif0_ctrl_d), 3978 - SH_PFC_PIN_GROUP(hscif0_data_e), 3979 - SH_PFC_PIN_GROUP(hscif0_ctrl_e), 3980 - SH_PFC_PIN_GROUP(hscif0_data_f), 3981 - SH_PFC_PIN_GROUP(hscif0_ctrl_f), 3982 - SH_PFC_PIN_GROUP(hscif1_data), 3983 - SH_PFC_PIN_GROUP(hscif1_clk), 3984 - SH_PFC_PIN_GROUP(hscif1_ctrl), 3985 - SH_PFC_PIN_GROUP(hscif1_data_b), 3986 - SH_PFC_PIN_GROUP(hscif1_clk_b), 3987 - SH_PFC_PIN_GROUP(hscif1_ctrl_b), 3988 - SH_PFC_PIN_GROUP(i2c0), 3989 - SH_PFC_PIN_GROUP(i2c1), 3990 - SH_PFC_PIN_GROUP(i2c1_b), 3991 - SH_PFC_PIN_GROUP(i2c1_c), 3992 - SH_PFC_PIN_GROUP(i2c2), 3993 - SH_PFC_PIN_GROUP(i2c2_b), 3994 - SH_PFC_PIN_GROUP(i2c2_c), 3995 - SH_PFC_PIN_GROUP(i2c2_d), 3996 - SH_PFC_PIN_GROUP(i2c2_e), 3997 - SH_PFC_PIN_GROUP(i2c3), 3998 - SH_PFC_PIN_GROUP(iic0), 3999 - SH_PFC_PIN_GROUP(iic1), 4000 - SH_PFC_PIN_GROUP(iic1_b), 4001 - SH_PFC_PIN_GROUP(iic1_c), 4002 - SH_PFC_PIN_GROUP(iic2), 4003 - SH_PFC_PIN_GROUP(iic2_b), 4004 - SH_PFC_PIN_GROUP(iic2_c), 4005 - SH_PFC_PIN_GROUP(iic2_d), 4006 - SH_PFC_PIN_GROUP(iic2_e), 4007 - SH_PFC_PIN_GROUP(iic3), 4008 - SH_PFC_PIN_GROUP(intc_irq0), 4009 - SH_PFC_PIN_GROUP(intc_irq1), 4010 - SH_PFC_PIN_GROUP(intc_irq2), 4011 - SH_PFC_PIN_GROUP(intc_irq3), 4012 - SH_PFC_PIN_GROUP(mlb_3pin), 4013 - SH_PFC_PIN_GROUP(mmc0_data1), 4014 - SH_PFC_PIN_GROUP(mmc0_data4), 4015 - SH_PFC_PIN_GROUP(mmc0_data8), 4016 - SH_PFC_PIN_GROUP(mmc0_ctrl), 4017 - SH_PFC_PIN_GROUP(mmc1_data1), 4018 - SH_PFC_PIN_GROUP(mmc1_data4), 4019 - SH_PFC_PIN_GROUP(mmc1_data8), 4020 - SH_PFC_PIN_GROUP(mmc1_ctrl), 4021 - SH_PFC_PIN_GROUP(msiof0_clk), 4022 - SH_PFC_PIN_GROUP(msiof0_sync), 4023 - SH_PFC_PIN_GROUP(msiof0_ss1), 4024 - SH_PFC_PIN_GROUP(msiof0_ss2), 4025 - SH_PFC_PIN_GROUP(msiof0_rx), 4026 - SH_PFC_PIN_GROUP(msiof0_tx), 4027 - SH_PFC_PIN_GROUP(msiof0_clk_b), 4028 - SH_PFC_PIN_GROUP(msiof0_ss1_b), 4029 - SH_PFC_PIN_GROUP(msiof0_ss2_b), 4030 - SH_PFC_PIN_GROUP(msiof0_rx_b), 4031 - SH_PFC_PIN_GROUP(msiof0_tx_b), 4032 - SH_PFC_PIN_GROUP(msiof1_clk), 4033 - SH_PFC_PIN_GROUP(msiof1_sync), 4034 - SH_PFC_PIN_GROUP(msiof1_ss1), 4035 - SH_PFC_PIN_GROUP(msiof1_ss2), 4036 - SH_PFC_PIN_GROUP(msiof1_rx), 4037 - SH_PFC_PIN_GROUP(msiof1_tx), 4038 - SH_PFC_PIN_GROUP(msiof1_clk_b), 4039 - SH_PFC_PIN_GROUP(msiof1_ss1_b), 4040 - SH_PFC_PIN_GROUP(msiof1_ss2_b), 4041 - SH_PFC_PIN_GROUP(msiof1_rx_b), 4042 - SH_PFC_PIN_GROUP(msiof1_tx_b), 4043 - SH_PFC_PIN_GROUP(msiof2_clk), 4044 - SH_PFC_PIN_GROUP(msiof2_sync), 4045 - SH_PFC_PIN_GROUP(msiof2_ss1), 4046 - SH_PFC_PIN_GROUP(msiof2_ss2), 4047 - SH_PFC_PIN_GROUP(msiof2_rx), 4048 - SH_PFC_PIN_GROUP(msiof2_tx), 4049 - SH_PFC_PIN_GROUP(msiof3_clk), 4050 - SH_PFC_PIN_GROUP(msiof3_sync), 4051 - SH_PFC_PIN_GROUP(msiof3_ss1), 4052 - SH_PFC_PIN_GROUP(msiof3_ss2), 4053 - SH_PFC_PIN_GROUP(msiof3_rx), 4054 - SH_PFC_PIN_GROUP(msiof3_tx), 4055 - SH_PFC_PIN_GROUP(msiof3_clk_b), 4056 - SH_PFC_PIN_GROUP(msiof3_sync_b), 4057 - SH_PFC_PIN_GROUP(msiof3_rx_b), 4058 - SH_PFC_PIN_GROUP(msiof3_tx_b), 4059 - SH_PFC_PIN_GROUP(pwm0), 4060 - SH_PFC_PIN_GROUP(pwm0_b), 4061 - SH_PFC_PIN_GROUP(pwm1), 4062 - SH_PFC_PIN_GROUP(pwm1_b), 4063 - SH_PFC_PIN_GROUP(pwm2), 4064 - SH_PFC_PIN_GROUP(pwm3), 4065 - SH_PFC_PIN_GROUP(pwm4), 4066 - SH_PFC_PIN_GROUP(pwm5), 4067 - SH_PFC_PIN_GROUP(pwm6), 4068 - SH_PFC_PIN_GROUP(qspi_ctrl), 4069 - SH_PFC_PIN_GROUP(qspi_data2), 4070 - SH_PFC_PIN_GROUP(qspi_data4), 4071 - SH_PFC_PIN_GROUP(scif0_data), 4072 - SH_PFC_PIN_GROUP(scif0_clk), 4073 - SH_PFC_PIN_GROUP(scif0_ctrl), 4074 - SH_PFC_PIN_GROUP(scif0_data_b), 4075 - SH_PFC_PIN_GROUP(scif1_data), 4076 - SH_PFC_PIN_GROUP(scif1_clk), 4077 - SH_PFC_PIN_GROUP(scif1_ctrl), 4078 - SH_PFC_PIN_GROUP(scif1_data_b), 4079 - SH_PFC_PIN_GROUP(scif1_data_c), 4080 - SH_PFC_PIN_GROUP(scif1_data_d), 4081 - SH_PFC_PIN_GROUP(scif1_clk_d), 4082 - SH_PFC_PIN_GROUP(scif1_data_e), 4083 - SH_PFC_PIN_GROUP(scif1_clk_e), 4084 - SH_PFC_PIN_GROUP(scif2_data), 4085 - SH_PFC_PIN_GROUP(scif2_clk), 4086 - SH_PFC_PIN_GROUP(scif2_data_b), 4087 - SH_PFC_PIN_GROUP(scifa0_data), 4088 - SH_PFC_PIN_GROUP(scifa0_clk), 4089 - SH_PFC_PIN_GROUP(scifa0_ctrl), 4090 - SH_PFC_PIN_GROUP(scifa0_data_b), 4091 - SH_PFC_PIN_GROUP(scifa0_clk_b), 4092 - SH_PFC_PIN_GROUP(scifa0_ctrl_b), 4093 - SH_PFC_PIN_GROUP(scifa1_data), 4094 - SH_PFC_PIN_GROUP(scifa1_clk), 4095 - SH_PFC_PIN_GROUP(scifa1_ctrl), 4096 - SH_PFC_PIN_GROUP(scifa1_data_b), 4097 - SH_PFC_PIN_GROUP(scifa1_clk_b), 4098 - SH_PFC_PIN_GROUP(scifa1_ctrl_b), 4099 - SH_PFC_PIN_GROUP(scifa1_data_c), 4100 - SH_PFC_PIN_GROUP(scifa1_clk_c), 4101 - SH_PFC_PIN_GROUP(scifa1_ctrl_c), 4102 - SH_PFC_PIN_GROUP(scifa1_data_d), 4103 - SH_PFC_PIN_GROUP(scifa1_clk_d), 4104 - SH_PFC_PIN_GROUP(scifa1_ctrl_d), 4105 - SH_PFC_PIN_GROUP(scifa2_data), 4106 - SH_PFC_PIN_GROUP(scifa2_clk), 4107 - SH_PFC_PIN_GROUP(scifa2_ctrl), 4108 - SH_PFC_PIN_GROUP(scifa2_data_b), 4109 - SH_PFC_PIN_GROUP(scifa2_data_c), 4110 - SH_PFC_PIN_GROUP(scifa2_clk_c), 4111 - SH_PFC_PIN_GROUP(scifb0_data), 4112 - SH_PFC_PIN_GROUP(scifb0_clk), 4113 - SH_PFC_PIN_GROUP(scifb0_ctrl), 4114 - SH_PFC_PIN_GROUP(scifb0_data_b), 4115 - SH_PFC_PIN_GROUP(scifb0_clk_b), 4116 - SH_PFC_PIN_GROUP(scifb0_ctrl_b), 4117 - SH_PFC_PIN_GROUP(scifb0_data_c), 4118 - SH_PFC_PIN_GROUP(scifb1_data), 4119 - SH_PFC_PIN_GROUP(scifb1_clk), 4120 - SH_PFC_PIN_GROUP(scifb1_ctrl), 4121 - SH_PFC_PIN_GROUP(scifb1_data_b), 4122 - SH_PFC_PIN_GROUP(scifb1_clk_b), 4123 - SH_PFC_PIN_GROUP(scifb1_ctrl_b), 4124 - SH_PFC_PIN_GROUP(scifb1_data_c), 4125 - SH_PFC_PIN_GROUP(scifb1_data_d), 4126 - SH_PFC_PIN_GROUP(scifb1_data_e), 4127 - SH_PFC_PIN_GROUP(scifb1_clk_e), 4128 - SH_PFC_PIN_GROUP(scifb1_data_f), 4129 - SH_PFC_PIN_GROUP(scifb1_data_g), 4130 - SH_PFC_PIN_GROUP(scifb1_clk_g), 4131 - SH_PFC_PIN_GROUP(scifb2_data), 4132 - SH_PFC_PIN_GROUP(scifb2_clk), 4133 - SH_PFC_PIN_GROUP(scifb2_ctrl), 4134 - SH_PFC_PIN_GROUP(scifb2_data_b), 4135 - SH_PFC_PIN_GROUP(scifb2_clk_b), 4136 - SH_PFC_PIN_GROUP(scifb2_ctrl_b), 4137 - SH_PFC_PIN_GROUP(scifb2_data_c), 4138 - SH_PFC_PIN_GROUP(scif_clk), 4139 - SH_PFC_PIN_GROUP(scif_clk_b), 4140 - SH_PFC_PIN_GROUP(sdhi0_data1), 4141 - SH_PFC_PIN_GROUP(sdhi0_data4), 4142 - SH_PFC_PIN_GROUP(sdhi0_ctrl), 4143 - SH_PFC_PIN_GROUP(sdhi0_cd), 4144 - SH_PFC_PIN_GROUP(sdhi0_wp), 4145 - SH_PFC_PIN_GROUP(sdhi1_data1), 4146 - SH_PFC_PIN_GROUP(sdhi1_data4), 4147 - SH_PFC_PIN_GROUP(sdhi1_ctrl), 4148 - SH_PFC_PIN_GROUP(sdhi1_cd), 4149 - SH_PFC_PIN_GROUP(sdhi1_wp), 4150 - SH_PFC_PIN_GROUP(sdhi2_data1), 4151 - SH_PFC_PIN_GROUP(sdhi2_data4), 4152 - SH_PFC_PIN_GROUP(sdhi2_ctrl), 4153 - SH_PFC_PIN_GROUP(sdhi2_cd), 4154 - SH_PFC_PIN_GROUP(sdhi2_wp), 4155 - SH_PFC_PIN_GROUP(sdhi3_data1), 4156 - SH_PFC_PIN_GROUP(sdhi3_data4), 4157 - SH_PFC_PIN_GROUP(sdhi3_ctrl), 4158 - SH_PFC_PIN_GROUP(sdhi3_cd), 4159 - SH_PFC_PIN_GROUP(sdhi3_wp), 4160 - SH_PFC_PIN_GROUP(ssi0_data), 4161 - SH_PFC_PIN_GROUP(ssi0129_ctrl), 4162 - SH_PFC_PIN_GROUP(ssi1_data), 4163 - SH_PFC_PIN_GROUP(ssi1_ctrl), 4164 - SH_PFC_PIN_GROUP(ssi2_data), 4165 - SH_PFC_PIN_GROUP(ssi2_ctrl), 4166 - SH_PFC_PIN_GROUP(ssi3_data), 4167 - SH_PFC_PIN_GROUP(ssi34_ctrl), 4168 - SH_PFC_PIN_GROUP(ssi4_data), 4169 - SH_PFC_PIN_GROUP(ssi4_ctrl), 4170 - SH_PFC_PIN_GROUP(ssi5), 4171 - SH_PFC_PIN_GROUP(ssi5_b), 4172 - SH_PFC_PIN_GROUP(ssi5_c), 4173 - SH_PFC_PIN_GROUP(ssi6), 4174 - SH_PFC_PIN_GROUP(ssi6_b), 4175 - SH_PFC_PIN_GROUP(ssi7_data), 4176 - SH_PFC_PIN_GROUP(ssi7_b_data), 4177 - SH_PFC_PIN_GROUP(ssi7_c_data), 4178 - SH_PFC_PIN_GROUP(ssi78_ctrl), 4179 - SH_PFC_PIN_GROUP(ssi78_b_ctrl), 4180 - SH_PFC_PIN_GROUP(ssi78_c_ctrl), 4181 - SH_PFC_PIN_GROUP(ssi8_data), 4182 - SH_PFC_PIN_GROUP(ssi8_b_data), 4183 - SH_PFC_PIN_GROUP(ssi8_c_data), 4184 - SH_PFC_PIN_GROUP(ssi9_data), 4185 - SH_PFC_PIN_GROUP(ssi9_ctrl), 4186 - SH_PFC_PIN_GROUP(tpu0_to0), 4187 - SH_PFC_PIN_GROUP(tpu0_to1), 4188 - SH_PFC_PIN_GROUP(tpu0_to2), 4189 - SH_PFC_PIN_GROUP(tpu0_to3), 4190 - SH_PFC_PIN_GROUP(usb0), 4191 - SH_PFC_PIN_GROUP(usb0_ovc_vbus), 4192 - SH_PFC_PIN_GROUP(usb1), 4193 - SH_PFC_PIN_GROUP(usb2), 4194 - VIN_DATA_PIN_GROUP(vin0_data, 24), 4195 - VIN_DATA_PIN_GROUP(vin0_data, 20), 4196 - SH_PFC_PIN_GROUP(vin0_data18), 4197 - VIN_DATA_PIN_GROUP(vin0_data, 16), 4198 - VIN_DATA_PIN_GROUP(vin0_data, 12), 4199 - VIN_DATA_PIN_GROUP(vin0_data, 10), 4200 - VIN_DATA_PIN_GROUP(vin0_data, 8), 4201 - VIN_DATA_PIN_GROUP(vin0_data, 4), 4202 - SH_PFC_PIN_GROUP(vin0_sync), 4203 - SH_PFC_PIN_GROUP(vin0_field), 4204 - SH_PFC_PIN_GROUP(vin0_clkenb), 4205 - SH_PFC_PIN_GROUP(vin0_clk), 4206 - VIN_DATA_PIN_GROUP(vin1_data, 24), 4207 - VIN_DATA_PIN_GROUP(vin1_data, 20), 4208 - SH_PFC_PIN_GROUP(vin1_data18), 4209 - VIN_DATA_PIN_GROUP(vin1_data, 16), 4210 - VIN_DATA_PIN_GROUP(vin1_data, 12), 4211 - VIN_DATA_PIN_GROUP(vin1_data, 10), 4212 - VIN_DATA_PIN_GROUP(vin1_data, 8), 4213 - VIN_DATA_PIN_GROUP(vin1_data, 4), 4214 - SH_PFC_PIN_GROUP(vin1_sync), 4215 - SH_PFC_PIN_GROUP(vin1_field), 4216 - SH_PFC_PIN_GROUP(vin1_clkenb), 4217 - SH_PFC_PIN_GROUP(vin1_clk), 4218 - VIN_DATA_PIN_GROUP(vin2_data, 24), 4219 - SH_PFC_PIN_GROUP(vin2_data18), 4220 - VIN_DATA_PIN_GROUP(vin2_data, 16), 4221 - VIN_DATA_PIN_GROUP(vin2_data, 8), 4222 - VIN_DATA_PIN_GROUP(vin2_data, 4), 4223 - SH_PFC_PIN_GROUP(vin2_sync), 4224 - SH_PFC_PIN_GROUP(vin2_field), 4225 - SH_PFC_PIN_GROUP(vin2_clkenb), 4226 - SH_PFC_PIN_GROUP(vin2_clk), 4227 - SH_PFC_PIN_GROUP(vin3_data8), 4228 - SH_PFC_PIN_GROUP(vin3_sync), 4229 - SH_PFC_PIN_GROUP(vin3_field), 4230 - SH_PFC_PIN_GROUP(vin3_clkenb), 4231 - SH_PFC_PIN_GROUP(vin3_clk), 3941 + static const struct { 3942 + struct sh_pfc_pin_group common[289]; 3943 + struct sh_pfc_pin_group automotive[1]; 3944 + } pinmux_groups = { 3945 + .common = { 3946 + SH_PFC_PIN_GROUP(audio_clk_a), 3947 + SH_PFC_PIN_GROUP(audio_clk_b), 3948 + SH_PFC_PIN_GROUP(audio_clk_c), 3949 + SH_PFC_PIN_GROUP(audio_clkout), 3950 + SH_PFC_PIN_GROUP(audio_clkout_b), 3951 + SH_PFC_PIN_GROUP(audio_clkout_c), 3952 + SH_PFC_PIN_GROUP(audio_clkout_d), 3953 + SH_PFC_PIN_GROUP(avb_link), 3954 + SH_PFC_PIN_GROUP(avb_magic), 3955 + SH_PFC_PIN_GROUP(avb_phy_int), 3956 + SH_PFC_PIN_GROUP(avb_mdio), 3957 + SH_PFC_PIN_GROUP(avb_mii), 3958 + SH_PFC_PIN_GROUP(avb_gmii), 3959 + SH_PFC_PIN_GROUP(du_rgb666), 3960 + SH_PFC_PIN_GROUP(du_rgb888), 3961 + SH_PFC_PIN_GROUP(du_clk_out_0), 3962 + SH_PFC_PIN_GROUP(du_clk_out_1), 3963 + SH_PFC_PIN_GROUP(du_sync_0), 3964 + SH_PFC_PIN_GROUP(du_sync_1), 3965 + SH_PFC_PIN_GROUP(du_cde), 3966 + SH_PFC_PIN_GROUP(du0_clk_in), 3967 + SH_PFC_PIN_GROUP(du1_clk_in), 3968 + SH_PFC_PIN_GROUP(du2_clk_in), 3969 + SH_PFC_PIN_GROUP(eth_link), 3970 + SH_PFC_PIN_GROUP(eth_magic), 3971 + SH_PFC_PIN_GROUP(eth_mdio), 3972 + SH_PFC_PIN_GROUP(eth_rmii), 3973 + SH_PFC_PIN_GROUP(hscif0_data), 3974 + SH_PFC_PIN_GROUP(hscif0_clk), 3975 + SH_PFC_PIN_GROUP(hscif0_ctrl), 3976 + SH_PFC_PIN_GROUP(hscif0_data_b), 3977 + SH_PFC_PIN_GROUP(hscif0_ctrl_b), 3978 + SH_PFC_PIN_GROUP(hscif0_data_c), 3979 + SH_PFC_PIN_GROUP(hscif0_ctrl_c), 3980 + SH_PFC_PIN_GROUP(hscif0_data_d), 3981 + SH_PFC_PIN_GROUP(hscif0_ctrl_d), 3982 + SH_PFC_PIN_GROUP(hscif0_data_e), 3983 + SH_PFC_PIN_GROUP(hscif0_ctrl_e), 3984 + SH_PFC_PIN_GROUP(hscif0_data_f), 3985 + SH_PFC_PIN_GROUP(hscif0_ctrl_f), 3986 + SH_PFC_PIN_GROUP(hscif1_data), 3987 + SH_PFC_PIN_GROUP(hscif1_clk), 3988 + SH_PFC_PIN_GROUP(hscif1_ctrl), 3989 + SH_PFC_PIN_GROUP(hscif1_data_b), 3990 + SH_PFC_PIN_GROUP(hscif1_clk_b), 3991 + SH_PFC_PIN_GROUP(hscif1_ctrl_b), 3992 + SH_PFC_PIN_GROUP(i2c0), 3993 + SH_PFC_PIN_GROUP(i2c1), 3994 + SH_PFC_PIN_GROUP(i2c1_b), 3995 + SH_PFC_PIN_GROUP(i2c1_c), 3996 + SH_PFC_PIN_GROUP(i2c2), 3997 + SH_PFC_PIN_GROUP(i2c2_b), 3998 + SH_PFC_PIN_GROUP(i2c2_c), 3999 + SH_PFC_PIN_GROUP(i2c2_d), 4000 + SH_PFC_PIN_GROUP(i2c2_e), 4001 + SH_PFC_PIN_GROUP(i2c3), 4002 + SH_PFC_PIN_GROUP(iic0), 4003 + SH_PFC_PIN_GROUP(iic1), 4004 + SH_PFC_PIN_GROUP(iic1_b), 4005 + SH_PFC_PIN_GROUP(iic1_c), 4006 + SH_PFC_PIN_GROUP(iic2), 4007 + SH_PFC_PIN_GROUP(iic2_b), 4008 + SH_PFC_PIN_GROUP(iic2_c), 4009 + SH_PFC_PIN_GROUP(iic2_d), 4010 + SH_PFC_PIN_GROUP(iic2_e), 4011 + SH_PFC_PIN_GROUP(iic3), 4012 + SH_PFC_PIN_GROUP(intc_irq0), 4013 + SH_PFC_PIN_GROUP(intc_irq1), 4014 + SH_PFC_PIN_GROUP(intc_irq2), 4015 + SH_PFC_PIN_GROUP(intc_irq3), 4016 + SH_PFC_PIN_GROUP(mmc0_data1), 4017 + SH_PFC_PIN_GROUP(mmc0_data4), 4018 + SH_PFC_PIN_GROUP(mmc0_data8), 4019 + SH_PFC_PIN_GROUP(mmc0_ctrl), 4020 + SH_PFC_PIN_GROUP(mmc1_data1), 4021 + SH_PFC_PIN_GROUP(mmc1_data4), 4022 + SH_PFC_PIN_GROUP(mmc1_data8), 4023 + SH_PFC_PIN_GROUP(mmc1_ctrl), 4024 + SH_PFC_PIN_GROUP(msiof0_clk), 4025 + SH_PFC_PIN_GROUP(msiof0_sync), 4026 + SH_PFC_PIN_GROUP(msiof0_ss1), 4027 + SH_PFC_PIN_GROUP(msiof0_ss2), 4028 + SH_PFC_PIN_GROUP(msiof0_rx), 4029 + SH_PFC_PIN_GROUP(msiof0_tx), 4030 + SH_PFC_PIN_GROUP(msiof0_clk_b), 4031 + SH_PFC_PIN_GROUP(msiof0_ss1_b), 4032 + SH_PFC_PIN_GROUP(msiof0_ss2_b), 4033 + SH_PFC_PIN_GROUP(msiof0_rx_b), 4034 + SH_PFC_PIN_GROUP(msiof0_tx_b), 4035 + SH_PFC_PIN_GROUP(msiof1_clk), 4036 + SH_PFC_PIN_GROUP(msiof1_sync), 4037 + SH_PFC_PIN_GROUP(msiof1_ss1), 4038 + SH_PFC_PIN_GROUP(msiof1_ss2), 4039 + SH_PFC_PIN_GROUP(msiof1_rx), 4040 + SH_PFC_PIN_GROUP(msiof1_tx), 4041 + SH_PFC_PIN_GROUP(msiof1_clk_b), 4042 + SH_PFC_PIN_GROUP(msiof1_ss1_b), 4043 + SH_PFC_PIN_GROUP(msiof1_ss2_b), 4044 + SH_PFC_PIN_GROUP(msiof1_rx_b), 4045 + SH_PFC_PIN_GROUP(msiof1_tx_b), 4046 + SH_PFC_PIN_GROUP(msiof2_clk), 4047 + SH_PFC_PIN_GROUP(msiof2_sync), 4048 + SH_PFC_PIN_GROUP(msiof2_ss1), 4049 + SH_PFC_PIN_GROUP(msiof2_ss2), 4050 + SH_PFC_PIN_GROUP(msiof2_rx), 4051 + SH_PFC_PIN_GROUP(msiof2_tx), 4052 + SH_PFC_PIN_GROUP(msiof3_clk), 4053 + SH_PFC_PIN_GROUP(msiof3_sync), 4054 + SH_PFC_PIN_GROUP(msiof3_ss1), 4055 + SH_PFC_PIN_GROUP(msiof3_ss2), 4056 + SH_PFC_PIN_GROUP(msiof3_rx), 4057 + SH_PFC_PIN_GROUP(msiof3_tx), 4058 + SH_PFC_PIN_GROUP(msiof3_clk_b), 4059 + SH_PFC_PIN_GROUP(msiof3_sync_b), 4060 + SH_PFC_PIN_GROUP(msiof3_rx_b), 4061 + SH_PFC_PIN_GROUP(msiof3_tx_b), 4062 + SH_PFC_PIN_GROUP(pwm0), 4063 + SH_PFC_PIN_GROUP(pwm0_b), 4064 + SH_PFC_PIN_GROUP(pwm1), 4065 + SH_PFC_PIN_GROUP(pwm1_b), 4066 + SH_PFC_PIN_GROUP(pwm2), 4067 + SH_PFC_PIN_GROUP(pwm3), 4068 + SH_PFC_PIN_GROUP(pwm4), 4069 + SH_PFC_PIN_GROUP(pwm5), 4070 + SH_PFC_PIN_GROUP(pwm6), 4071 + SH_PFC_PIN_GROUP(qspi_ctrl), 4072 + SH_PFC_PIN_GROUP(qspi_data2), 4073 + SH_PFC_PIN_GROUP(qspi_data4), 4074 + SH_PFC_PIN_GROUP(scif0_data), 4075 + SH_PFC_PIN_GROUP(scif0_clk), 4076 + SH_PFC_PIN_GROUP(scif0_ctrl), 4077 + SH_PFC_PIN_GROUP(scif0_data_b), 4078 + SH_PFC_PIN_GROUP(scif1_data), 4079 + SH_PFC_PIN_GROUP(scif1_clk), 4080 + SH_PFC_PIN_GROUP(scif1_ctrl), 4081 + SH_PFC_PIN_GROUP(scif1_data_b), 4082 + SH_PFC_PIN_GROUP(scif1_data_c), 4083 + SH_PFC_PIN_GROUP(scif1_data_d), 4084 + SH_PFC_PIN_GROUP(scif1_clk_d), 4085 + SH_PFC_PIN_GROUP(scif1_data_e), 4086 + SH_PFC_PIN_GROUP(scif1_clk_e), 4087 + SH_PFC_PIN_GROUP(scif2_data), 4088 + SH_PFC_PIN_GROUP(scif2_clk), 4089 + SH_PFC_PIN_GROUP(scif2_data_b), 4090 + SH_PFC_PIN_GROUP(scifa0_data), 4091 + SH_PFC_PIN_GROUP(scifa0_clk), 4092 + SH_PFC_PIN_GROUP(scifa0_ctrl), 4093 + SH_PFC_PIN_GROUP(scifa0_data_b), 4094 + SH_PFC_PIN_GROUP(scifa0_clk_b), 4095 + SH_PFC_PIN_GROUP(scifa0_ctrl_b), 4096 + SH_PFC_PIN_GROUP(scifa1_data), 4097 + SH_PFC_PIN_GROUP(scifa1_clk), 4098 + SH_PFC_PIN_GROUP(scifa1_ctrl), 4099 + SH_PFC_PIN_GROUP(scifa1_data_b), 4100 + SH_PFC_PIN_GROUP(scifa1_clk_b), 4101 + SH_PFC_PIN_GROUP(scifa1_ctrl_b), 4102 + SH_PFC_PIN_GROUP(scifa1_data_c), 4103 + SH_PFC_PIN_GROUP(scifa1_clk_c), 4104 + SH_PFC_PIN_GROUP(scifa1_ctrl_c), 4105 + SH_PFC_PIN_GROUP(scifa1_data_d), 4106 + SH_PFC_PIN_GROUP(scifa1_clk_d), 4107 + SH_PFC_PIN_GROUP(scifa1_ctrl_d), 4108 + SH_PFC_PIN_GROUP(scifa2_data), 4109 + SH_PFC_PIN_GROUP(scifa2_clk), 4110 + SH_PFC_PIN_GROUP(scifa2_ctrl), 4111 + SH_PFC_PIN_GROUP(scifa2_data_b), 4112 + SH_PFC_PIN_GROUP(scifa2_data_c), 4113 + SH_PFC_PIN_GROUP(scifa2_clk_c), 4114 + SH_PFC_PIN_GROUP(scifb0_data), 4115 + SH_PFC_PIN_GROUP(scifb0_clk), 4116 + SH_PFC_PIN_GROUP(scifb0_ctrl), 4117 + SH_PFC_PIN_GROUP(scifb0_data_b), 4118 + SH_PFC_PIN_GROUP(scifb0_clk_b), 4119 + SH_PFC_PIN_GROUP(scifb0_ctrl_b), 4120 + SH_PFC_PIN_GROUP(scifb0_data_c), 4121 + SH_PFC_PIN_GROUP(scifb1_data), 4122 + SH_PFC_PIN_GROUP(scifb1_clk), 4123 + SH_PFC_PIN_GROUP(scifb1_ctrl), 4124 + SH_PFC_PIN_GROUP(scifb1_data_b), 4125 + SH_PFC_PIN_GROUP(scifb1_clk_b), 4126 + SH_PFC_PIN_GROUP(scifb1_ctrl_b), 4127 + SH_PFC_PIN_GROUP(scifb1_data_c), 4128 + SH_PFC_PIN_GROUP(scifb1_data_d), 4129 + SH_PFC_PIN_GROUP(scifb1_data_e), 4130 + SH_PFC_PIN_GROUP(scifb1_clk_e), 4131 + SH_PFC_PIN_GROUP(scifb1_data_f), 4132 + SH_PFC_PIN_GROUP(scifb1_data_g), 4133 + SH_PFC_PIN_GROUP(scifb1_clk_g), 4134 + SH_PFC_PIN_GROUP(scifb2_data), 4135 + SH_PFC_PIN_GROUP(scifb2_clk), 4136 + SH_PFC_PIN_GROUP(scifb2_ctrl), 4137 + SH_PFC_PIN_GROUP(scifb2_data_b), 4138 + SH_PFC_PIN_GROUP(scifb2_clk_b), 4139 + SH_PFC_PIN_GROUP(scifb2_ctrl_b), 4140 + SH_PFC_PIN_GROUP(scifb2_data_c), 4141 + SH_PFC_PIN_GROUP(scif_clk), 4142 + SH_PFC_PIN_GROUP(scif_clk_b), 4143 + SH_PFC_PIN_GROUP(sdhi0_data1), 4144 + SH_PFC_PIN_GROUP(sdhi0_data4), 4145 + SH_PFC_PIN_GROUP(sdhi0_ctrl), 4146 + SH_PFC_PIN_GROUP(sdhi0_cd), 4147 + SH_PFC_PIN_GROUP(sdhi0_wp), 4148 + SH_PFC_PIN_GROUP(sdhi1_data1), 4149 + SH_PFC_PIN_GROUP(sdhi1_data4), 4150 + SH_PFC_PIN_GROUP(sdhi1_ctrl), 4151 + SH_PFC_PIN_GROUP(sdhi1_cd), 4152 + SH_PFC_PIN_GROUP(sdhi1_wp), 4153 + SH_PFC_PIN_GROUP(sdhi2_data1), 4154 + SH_PFC_PIN_GROUP(sdhi2_data4), 4155 + SH_PFC_PIN_GROUP(sdhi2_ctrl), 4156 + SH_PFC_PIN_GROUP(sdhi2_cd), 4157 + SH_PFC_PIN_GROUP(sdhi2_wp), 4158 + SH_PFC_PIN_GROUP(sdhi3_data1), 4159 + SH_PFC_PIN_GROUP(sdhi3_data4), 4160 + SH_PFC_PIN_GROUP(sdhi3_ctrl), 4161 + SH_PFC_PIN_GROUP(sdhi3_cd), 4162 + SH_PFC_PIN_GROUP(sdhi3_wp), 4163 + SH_PFC_PIN_GROUP(ssi0_data), 4164 + SH_PFC_PIN_GROUP(ssi0129_ctrl), 4165 + SH_PFC_PIN_GROUP(ssi1_data), 4166 + SH_PFC_PIN_GROUP(ssi1_ctrl), 4167 + SH_PFC_PIN_GROUP(ssi2_data), 4168 + SH_PFC_PIN_GROUP(ssi2_ctrl), 4169 + SH_PFC_PIN_GROUP(ssi3_data), 4170 + SH_PFC_PIN_GROUP(ssi34_ctrl), 4171 + SH_PFC_PIN_GROUP(ssi4_data), 4172 + SH_PFC_PIN_GROUP(ssi4_ctrl), 4173 + SH_PFC_PIN_GROUP(ssi5), 4174 + SH_PFC_PIN_GROUP(ssi5_b), 4175 + SH_PFC_PIN_GROUP(ssi5_c), 4176 + SH_PFC_PIN_GROUP(ssi6), 4177 + SH_PFC_PIN_GROUP(ssi6_b), 4178 + SH_PFC_PIN_GROUP(ssi7_data), 4179 + SH_PFC_PIN_GROUP(ssi7_b_data), 4180 + SH_PFC_PIN_GROUP(ssi7_c_data), 4181 + SH_PFC_PIN_GROUP(ssi78_ctrl), 4182 + SH_PFC_PIN_GROUP(ssi78_b_ctrl), 4183 + SH_PFC_PIN_GROUP(ssi78_c_ctrl), 4184 + SH_PFC_PIN_GROUP(ssi8_data), 4185 + SH_PFC_PIN_GROUP(ssi8_b_data), 4186 + SH_PFC_PIN_GROUP(ssi8_c_data), 4187 + SH_PFC_PIN_GROUP(ssi9_data), 4188 + SH_PFC_PIN_GROUP(ssi9_ctrl), 4189 + SH_PFC_PIN_GROUP(tpu0_to0), 4190 + SH_PFC_PIN_GROUP(tpu0_to1), 4191 + SH_PFC_PIN_GROUP(tpu0_to2), 4192 + SH_PFC_PIN_GROUP(tpu0_to3), 4193 + SH_PFC_PIN_GROUP(usb0), 4194 + SH_PFC_PIN_GROUP(usb0_ovc_vbus), 4195 + SH_PFC_PIN_GROUP(usb1), 4196 + SH_PFC_PIN_GROUP(usb2), 4197 + VIN_DATA_PIN_GROUP(vin0_data, 24), 4198 + VIN_DATA_PIN_GROUP(vin0_data, 20), 4199 + SH_PFC_PIN_GROUP(vin0_data18), 4200 + VIN_DATA_PIN_GROUP(vin0_data, 16), 4201 + VIN_DATA_PIN_GROUP(vin0_data, 12), 4202 + VIN_DATA_PIN_GROUP(vin0_data, 10), 4203 + VIN_DATA_PIN_GROUP(vin0_data, 8), 4204 + VIN_DATA_PIN_GROUP(vin0_data, 4), 4205 + SH_PFC_PIN_GROUP(vin0_sync), 4206 + SH_PFC_PIN_GROUP(vin0_field), 4207 + SH_PFC_PIN_GROUP(vin0_clkenb), 4208 + SH_PFC_PIN_GROUP(vin0_clk), 4209 + VIN_DATA_PIN_GROUP(vin1_data, 24), 4210 + VIN_DATA_PIN_GROUP(vin1_data, 20), 4211 + SH_PFC_PIN_GROUP(vin1_data18), 4212 + VIN_DATA_PIN_GROUP(vin1_data, 16), 4213 + VIN_DATA_PIN_GROUP(vin1_data, 12), 4214 + VIN_DATA_PIN_GROUP(vin1_data, 10), 4215 + VIN_DATA_PIN_GROUP(vin1_data, 8), 4216 + VIN_DATA_PIN_GROUP(vin1_data, 4), 4217 + SH_PFC_PIN_GROUP(vin1_sync), 4218 + SH_PFC_PIN_GROUP(vin1_field), 4219 + SH_PFC_PIN_GROUP(vin1_clkenb), 4220 + SH_PFC_PIN_GROUP(vin1_clk), 4221 + VIN_DATA_PIN_GROUP(vin2_data, 24), 4222 + SH_PFC_PIN_GROUP(vin2_data18), 4223 + VIN_DATA_PIN_GROUP(vin2_data, 16), 4224 + VIN_DATA_PIN_GROUP(vin2_data, 8), 4225 + VIN_DATA_PIN_GROUP(vin2_data, 4), 4226 + SH_PFC_PIN_GROUP(vin2_sync), 4227 + SH_PFC_PIN_GROUP(vin2_field), 4228 + SH_PFC_PIN_GROUP(vin2_clkenb), 4229 + SH_PFC_PIN_GROUP(vin2_clk), 4230 + SH_PFC_PIN_GROUP(vin3_data8), 4231 + SH_PFC_PIN_GROUP(vin3_sync), 4232 + SH_PFC_PIN_GROUP(vin3_field), 4233 + SH_PFC_PIN_GROUP(vin3_clkenb), 4234 + SH_PFC_PIN_GROUP(vin3_clk), 4235 + }, 4236 + .automotive = { 4237 + SH_PFC_PIN_GROUP(mlb_3pin), 4238 + } 4232 4239 }; 4233 4240 4234 4241 static const char * const audio_clk_groups[] = { ··· 4696 4689 "vin3_clk", 4697 4690 }; 4698 4691 4699 - static const struct sh_pfc_function pinmux_functions[] = { 4700 - SH_PFC_FUNCTION(audio_clk), 4701 - SH_PFC_FUNCTION(avb), 4702 - SH_PFC_FUNCTION(du), 4703 - SH_PFC_FUNCTION(du0), 4704 - SH_PFC_FUNCTION(du1), 4705 - SH_PFC_FUNCTION(du2), 4706 - SH_PFC_FUNCTION(eth), 4707 - SH_PFC_FUNCTION(hscif0), 4708 - SH_PFC_FUNCTION(hscif1), 4709 - SH_PFC_FUNCTION(i2c0), 4710 - SH_PFC_FUNCTION(i2c1), 4711 - SH_PFC_FUNCTION(i2c2), 4712 - SH_PFC_FUNCTION(i2c3), 4713 - SH_PFC_FUNCTION(iic0), 4714 - SH_PFC_FUNCTION(iic1), 4715 - SH_PFC_FUNCTION(iic2), 4716 - SH_PFC_FUNCTION(iic3), 4717 - SH_PFC_FUNCTION(intc), 4718 - SH_PFC_FUNCTION(mlb), 4719 - SH_PFC_FUNCTION(mmc0), 4720 - SH_PFC_FUNCTION(mmc1), 4721 - SH_PFC_FUNCTION(msiof0), 4722 - SH_PFC_FUNCTION(msiof1), 4723 - SH_PFC_FUNCTION(msiof2), 4724 - SH_PFC_FUNCTION(msiof3), 4725 - SH_PFC_FUNCTION(pwm0), 4726 - SH_PFC_FUNCTION(pwm1), 4727 - SH_PFC_FUNCTION(pwm2), 4728 - SH_PFC_FUNCTION(pwm3), 4729 - SH_PFC_FUNCTION(pwm4), 4730 - SH_PFC_FUNCTION(pwm5), 4731 - SH_PFC_FUNCTION(pwm6), 4732 - SH_PFC_FUNCTION(qspi), 4733 - SH_PFC_FUNCTION(scif0), 4734 - SH_PFC_FUNCTION(scif1), 4735 - SH_PFC_FUNCTION(scif2), 4736 - SH_PFC_FUNCTION(scifa0), 4737 - SH_PFC_FUNCTION(scifa1), 4738 - SH_PFC_FUNCTION(scifa2), 4739 - SH_PFC_FUNCTION(scifb0), 4740 - SH_PFC_FUNCTION(scifb1), 4741 - SH_PFC_FUNCTION(scifb2), 4742 - SH_PFC_FUNCTION(scif_clk), 4743 - SH_PFC_FUNCTION(sdhi0), 4744 - SH_PFC_FUNCTION(sdhi1), 4745 - SH_PFC_FUNCTION(sdhi2), 4746 - SH_PFC_FUNCTION(sdhi3), 4747 - SH_PFC_FUNCTION(ssi), 4748 - SH_PFC_FUNCTION(tpu0), 4749 - SH_PFC_FUNCTION(usb0), 4750 - SH_PFC_FUNCTION(usb1), 4751 - SH_PFC_FUNCTION(usb2), 4752 - SH_PFC_FUNCTION(vin0), 4753 - SH_PFC_FUNCTION(vin1), 4754 - SH_PFC_FUNCTION(vin2), 4755 - SH_PFC_FUNCTION(vin3), 4692 + static const struct { 4693 + struct sh_pfc_function common[55]; 4694 + struct sh_pfc_function automotive[1]; 4695 + } pinmux_functions = { 4696 + .common = { 4697 + SH_PFC_FUNCTION(audio_clk), 4698 + SH_PFC_FUNCTION(avb), 4699 + SH_PFC_FUNCTION(du), 4700 + SH_PFC_FUNCTION(du0), 4701 + SH_PFC_FUNCTION(du1), 4702 + SH_PFC_FUNCTION(du2), 4703 + SH_PFC_FUNCTION(eth), 4704 + SH_PFC_FUNCTION(hscif0), 4705 + SH_PFC_FUNCTION(hscif1), 4706 + SH_PFC_FUNCTION(i2c0), 4707 + SH_PFC_FUNCTION(i2c1), 4708 + SH_PFC_FUNCTION(i2c2), 4709 + SH_PFC_FUNCTION(i2c3), 4710 + SH_PFC_FUNCTION(iic0), 4711 + SH_PFC_FUNCTION(iic1), 4712 + SH_PFC_FUNCTION(iic2), 4713 + SH_PFC_FUNCTION(iic3), 4714 + SH_PFC_FUNCTION(intc), 4715 + SH_PFC_FUNCTION(mmc0), 4716 + SH_PFC_FUNCTION(mmc1), 4717 + SH_PFC_FUNCTION(msiof0), 4718 + SH_PFC_FUNCTION(msiof1), 4719 + SH_PFC_FUNCTION(msiof2), 4720 + SH_PFC_FUNCTION(msiof3), 4721 + SH_PFC_FUNCTION(pwm0), 4722 + SH_PFC_FUNCTION(pwm1), 4723 + SH_PFC_FUNCTION(pwm2), 4724 + SH_PFC_FUNCTION(pwm3), 4725 + SH_PFC_FUNCTION(pwm4), 4726 + SH_PFC_FUNCTION(pwm5), 4727 + SH_PFC_FUNCTION(pwm6), 4728 + SH_PFC_FUNCTION(qspi), 4729 + SH_PFC_FUNCTION(scif0), 4730 + SH_PFC_FUNCTION(scif1), 4731 + SH_PFC_FUNCTION(scif2), 4732 + SH_PFC_FUNCTION(scifa0), 4733 + SH_PFC_FUNCTION(scifa1), 4734 + SH_PFC_FUNCTION(scifa2), 4735 + SH_PFC_FUNCTION(scifb0), 4736 + SH_PFC_FUNCTION(scifb1), 4737 + SH_PFC_FUNCTION(scifb2), 4738 + SH_PFC_FUNCTION(scif_clk), 4739 + SH_PFC_FUNCTION(sdhi0), 4740 + SH_PFC_FUNCTION(sdhi1), 4741 + SH_PFC_FUNCTION(sdhi2), 4742 + SH_PFC_FUNCTION(sdhi3), 4743 + SH_PFC_FUNCTION(ssi), 4744 + SH_PFC_FUNCTION(tpu0), 4745 + SH_PFC_FUNCTION(usb0), 4746 + SH_PFC_FUNCTION(usb1), 4747 + SH_PFC_FUNCTION(usb2), 4748 + SH_PFC_FUNCTION(vin0), 4749 + SH_PFC_FUNCTION(vin1), 4750 + SH_PFC_FUNCTION(vin2), 4751 + SH_PFC_FUNCTION(vin3), 4752 + }, 4753 + .automotive = { 4754 + SH_PFC_FUNCTION(mlb), 4755 + } 4756 4756 }; 4757 4757 4758 4758 static const struct pinmux_cfg_reg pinmux_config_regs[] = { ··· 5750 5736 .pin_to_pocctrl = r8a7790_pin_to_pocctrl, 5751 5737 }; 5752 5738 5739 + #ifdef CONFIG_PINCTRL_PFC_R8A7742 5740 + const struct sh_pfc_soc_info r8a7742_pinmux_info = { 5741 + .name = "r8a77420_pfc", 5742 + .ops = &r8a7790_pinmux_ops, 5743 + .unlock_reg = 0xe6060000, /* PMMR */ 5744 + 5745 + .function = { PINMUX_FUNCTION_BEGIN, PINMUX_FUNCTION_END }, 5746 + 5747 + .pins = pinmux_pins, 5748 + .nr_pins = ARRAY_SIZE(pinmux_pins), 5749 + .groups = pinmux_groups.common, 5750 + .nr_groups = ARRAY_SIZE(pinmux_groups.common), 5751 + .functions = pinmux_functions.common, 5752 + .nr_functions = ARRAY_SIZE(pinmux_functions.common), 5753 + 5754 + .cfg_regs = pinmux_config_regs, 5755 + 5756 + .pinmux_data = pinmux_data, 5757 + .pinmux_data_size = ARRAY_SIZE(pinmux_data), 5758 + }; 5759 + #endif 5760 + 5761 + #ifdef CONFIG_PINCTRL_PFC_R8A7790 5753 5762 const struct sh_pfc_soc_info r8a7790_pinmux_info = { 5754 5763 .name = "r8a77900_pfc", 5755 5764 .ops = &r8a7790_pinmux_ops, ··· 5782 5745 5783 5746 .pins = pinmux_pins, 5784 5747 .nr_pins = ARRAY_SIZE(pinmux_pins), 5785 - .groups = pinmux_groups, 5786 - .nr_groups = ARRAY_SIZE(pinmux_groups), 5787 - .functions = pinmux_functions, 5788 - .nr_functions = ARRAY_SIZE(pinmux_functions), 5748 + .groups = pinmux_groups.common, 5749 + .nr_groups = ARRAY_SIZE(pinmux_groups.common) + 5750 + ARRAY_SIZE(pinmux_groups.automotive), 5751 + .functions = pinmux_functions.common, 5752 + .nr_functions = ARRAY_SIZE(pinmux_functions.common) + 5753 + ARRAY_SIZE(pinmux_functions.automotive), 5789 5754 5790 5755 .cfg_regs = pinmux_config_regs, 5791 5756 5792 5757 .pinmux_data = pinmux_data, 5793 5758 .pinmux_data_size = ARRAY_SIZE(pinmux_data), 5794 5759 }; 5760 + #endif
+3 -2
drivers/pinctrl/sh-pfc/pfc-sh7269.c
··· 1963 1963 static const struct pinmux_cfg_reg pinmux_config_regs[] = { 1964 1964 /* "name" addr register_size Field_Width */ 1965 1965 1966 - /* where Field_Width is 1 for single mode registers or 4 for upto 16 1967 - mode registers and modes are described in assending order [0..16] */ 1966 + /* where Field_Width is 1 for single mode registers or 4 for up to 16 1967 + * mode registers and modes are described in assending order [0..15] 1968 + */ 1968 1969 1969 1970 { PINMUX_CFG_REG("PAIOR0", 0xfffe3812, 16, 1, GROUP( 1970 1971 0, 0, 0, 0, 0, 0, 0, 0,
+1
drivers/pinctrl/sh-pfc/sh_pfc.h
··· 304 304 extern const struct sh_pfc_soc_info emev2_pinmux_info; 305 305 extern const struct sh_pfc_soc_info r8a73a4_pinmux_info; 306 306 extern const struct sh_pfc_soc_info r8a7740_pinmux_info; 307 + extern const struct sh_pfc_soc_info r8a7742_pinmux_info; 307 308 extern const struct sh_pfc_soc_info r8a7743_pinmux_info; 308 309 extern const struct sh_pfc_soc_info r8a7744_pinmux_info; 309 310 extern const struct sh_pfc_soc_info r8a7745_pinmux_info;
+14 -6
drivers/pinctrl/sirf/pinctrl-sirf.c
··· 794 794 return -ENODEV; 795 795 796 796 sgpio = devm_kzalloc(&pdev->dev, sizeof(*sgpio), GFP_KERNEL); 797 - if (!sgpio) 798 - return -ENOMEM; 797 + if (!sgpio) { 798 + err = -ENOMEM; 799 + goto out_put_device; 800 + } 799 801 spin_lock_init(&sgpio->lock); 800 802 801 803 regs = of_iomap(np, 0); 802 - if (!regs) 803 - return -ENOMEM; 804 + if (!regs) { 805 + err = -ENOMEM; 806 + goto out_put_device; 807 + } 804 808 805 809 sgpio->chip.gc.request = sirfsoc_gpio_request; 806 810 sgpio->chip.gc.free = sirfsoc_gpio_free; ··· 828 824 girq->parents = devm_kcalloc(&pdev->dev, SIRFSOC_GPIO_NO_OF_BANKS, 829 825 sizeof(*girq->parents), 830 826 GFP_KERNEL); 831 - if (!girq->parents) 832 - return -ENOMEM; 827 + if (!girq->parents) { 828 + err = -ENOMEM; 829 + goto out_put_device; 830 + } 833 831 for (i = 0; i < SIRFSOC_GPIO_NO_OF_BANKS; i++) { 834 832 bank = &sgpio->sgpio_bank[i]; 835 833 spin_lock_init(&bank->lock); ··· 874 868 gpiochip_remove(&sgpio->chip.gc); 875 869 out: 876 870 iounmap(regs); 871 + out_put_device: 872 + put_device(&pdev->dev); 877 873 return err; 878 874 } 879 875
+2 -2
drivers/pinctrl/sprd/pinctrl-sprd.c
··· 68 68 #define SLEEP_PULL_UP_MASK 0x1 69 69 #define SLEEP_PULL_UP_SHIFT 3 70 70 71 - #define PULL_UP_20K (BIT(12) | BIT(7)) 72 - #define PULL_UP_4_7K BIT(12) 71 + #define PULL_UP_4_7K (BIT(12) | BIT(7)) 72 + #define PULL_UP_20K BIT(7) 73 73 #define PULL_UP_MASK 0x21 74 74 #define PULL_UP_SHIFT 7 75 75
+5 -2
drivers/pinctrl/sunxi/pinctrl-sun8i-a23-r.c
··· 103 103 104 104 rstc = devm_reset_control_get_exclusive(&pdev->dev, NULL); 105 105 if (IS_ERR(rstc)) { 106 - dev_err(&pdev->dev, "Reset controller missing\n"); 107 - return PTR_ERR(rstc); 106 + ret = PTR_ERR(rstc); 107 + if (ret == -EPROBE_DEFER) 108 + return ret; 109 + dev_err(&pdev->dev, "Reset controller missing err=%d\n", ret); 110 + return ret; 108 111 } 109 112 110 113 ret = reset_control_deassert(rstc);
+1 -1
drivers/pinctrl/tegra/pinctrl-tegra-xusb.c
··· 123 123 unsigned *num_pins) 124 124 { 125 125 /* 126 - * For the tegra-xusb pad controller groups are synonomous 126 + * For the tegra-xusb pad controller groups are synonymous 127 127 * with lanes/pins and there is always one lane/pin per group. 128 128 */ 129 129 *pins = &pinctrl->desc->pins[group].number;
+1 -1
drivers/pinctrl/zte/pinctrl-zx.c
··· 94 94 if (data->aon_pin) { 95 95 /* 96 96 * It's an AON pin, whose mux register offset and bit position 97 - * can be caluculated from pin number. Each register covers 16 97 + * can be calculated from pin number. Each register covers 16 98 98 * pins, and each pin occupies 2 bits. 99 99 */ 100 100 u16 aoffset = pindesc->number / 16 * 4;
+639
include/dt-bindings/pinctrl/pads-imx8dxl.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0+ */ 2 + /* 3 + * Copyright 2019~2020 NXP 4 + */ 5 + 6 + #ifndef _IMX8DXL_PADS_H 7 + #define _IMX8DXL_PADS_H 8 + 9 + /* pin id */ 10 + #define IMX8DXL_PCIE_CTRL0_PERST_B 0 11 + #define IMX8DXL_PCIE_CTRL0_CLKREQ_B 1 12 + #define IMX8DXL_PCIE_CTRL0_WAKE_B 2 13 + #define IMX8DXL_COMP_CTL_GPIO_1V8_3V3_PCIESEP 3 14 + #define IMX8DXL_USB_SS3_TC0 4 15 + #define IMX8DXL_USB_SS3_TC1 5 16 + #define IMX8DXL_USB_SS3_TC2 6 17 + #define IMX8DXL_USB_SS3_TC3 7 18 + #define IMX8DXL_COMP_CTL_GPIO_3V3_USB3IO 8 19 + #define IMX8DXL_EMMC0_CLK 9 20 + #define IMX8DXL_EMMC0_CMD 10 21 + #define IMX8DXL_EMMC0_DATA0 11 22 + #define IMX8DXL_EMMC0_DATA1 12 23 + #define IMX8DXL_EMMC0_DATA2 13 24 + #define IMX8DXL_EMMC0_DATA3 14 25 + #define IMX8DXL_EMMC0_DATA4 15 26 + #define IMX8DXL_EMMC0_DATA5 16 27 + #define IMX8DXL_EMMC0_DATA6 17 28 + #define IMX8DXL_EMMC0_DATA7 18 29 + #define IMX8DXL_EMMC0_STROBE 19 30 + #define IMX8DXL_EMMC0_RESET_B 20 31 + #define IMX8DXL_COMP_CTL_GPIO_1V8_3V3_SD1FIX0 21 32 + #define IMX8DXL_USDHC1_RESET_B 22 33 + #define IMX8DXL_USDHC1_VSELECT 23 34 + #define IMX8DXL_CTL_NAND_RE_P_N 24 35 + #define IMX8DXL_USDHC1_WP 25 36 + #define IMX8DXL_USDHC1_CD_B 26 37 + #define IMX8DXL_CTL_NAND_DQS_P_N 27 38 + #define IMX8DXL_COMP_CTL_GPIO_1V8_3V3_VSELSEP 28 39 + #define IMX8DXL_ENET0_RGMII_TXC 29 40 + #define IMX8DXL_ENET0_RGMII_TX_CTL 30 41 + #define IMX8DXL_ENET0_RGMII_TXD0 31 42 + #define IMX8DXL_ENET0_RGMII_TXD1 32 43 + #define IMX8DXL_ENET0_RGMII_TXD2 33 44 + #define IMX8DXL_ENET0_RGMII_TXD3 34 45 + #define IMX8DXL_COMP_CTL_GPIO_1V8_3V3_ENET_ENETB0 35 46 + #define IMX8DXL_ENET0_RGMII_RXC 36 47 + #define IMX8DXL_ENET0_RGMII_RX_CTL 37 48 + #define IMX8DXL_ENET0_RGMII_RXD0 38 49 + #define IMX8DXL_ENET0_RGMII_RXD1 39 50 + #define IMX8DXL_ENET0_RGMII_RXD2 40 51 + #define IMX8DXL_ENET0_RGMII_RXD3 41 52 + #define IMX8DXL_COMP_CTL_GPIO_1V8_3V3_ENET_ENETB1 42 53 + #define IMX8DXL_ENET0_REFCLK_125M_25M 43 54 + #define IMX8DXL_ENET0_MDIO 44 55 + #define IMX8DXL_ENET0_MDC 45 56 + #define IMX8DXL_COMP_CTL_GPIO_1V8_3V3_GPIOCT 46 57 + #define IMX8DXL_ENET1_RGMII_TXC 47 58 + #define IMX8DXL_ENET1_RGMII_TXD2 48 59 + #define IMX8DXL_ENET1_RGMII_TX_CTL 49 60 + #define IMX8DXL_ENET1_RGMII_TXD3 50 61 + #define IMX8DXL_ENET1_RGMII_RXC 51 62 + #define IMX8DXL_ENET1_RGMII_RXD3 52 63 + #define IMX8DXL_ENET1_RGMII_RXD2 53 64 + #define IMX8DXL_ENET1_RGMII_RXD1 54 65 + #define IMX8DXL_ENET1_RGMII_TXD0 55 66 + #define IMX8DXL_ENET1_RGMII_TXD1 56 67 + #define IMX8DXL_ENET1_RGMII_RXD0 57 68 + #define IMX8DXL_ENET1_RGMII_RX_CTL 58 69 + #define IMX8DXL_ENET1_REFCLK_125M_25M 59 70 + #define IMX8DXL_COMP_CTL_GPIO_1V8_3V3_GPIORHB 60 71 + #define IMX8DXL_SPI3_SCK 61 72 + #define IMX8DXL_SPI3_SDO 62 73 + #define IMX8DXL_SPI3_SDI 63 74 + #define IMX8DXL_SPI3_CS0 64 75 + #define IMX8DXL_SPI3_CS1 65 76 + #define IMX8DXL_MCLK_IN1 66 77 + #define IMX8DXL_MCLK_IN0 67 78 + #define IMX8DXL_MCLK_OUT0 68 79 + #define IMX8DXL_UART1_TX 69 80 + #define IMX8DXL_UART1_RX 70 81 + #define IMX8DXL_UART1_RTS_B 71 82 + #define IMX8DXL_UART1_CTS_B 72 83 + #define IMX8DXL_COMP_CTL_GPIO_1V8_3V3_GPIORHK 73 84 + #define IMX8DXL_SPI0_SCK 74 85 + #define IMX8DXL_SPI0_SDI 75 86 + #define IMX8DXL_SPI0_SDO 76 87 + #define IMX8DXL_SPI0_CS1 77 88 + #define IMX8DXL_SPI0_CS0 78 89 + #define IMX8DXL_COMP_CTL_GPIO_1V8_3V3_GPIORHT 79 90 + #define IMX8DXL_ADC_IN1 80 91 + #define IMX8DXL_ADC_IN0 81 92 + #define IMX8DXL_ADC_IN3 82 93 + #define IMX8DXL_ADC_IN2 83 94 + #define IMX8DXL_ADC_IN5 84 95 + #define IMX8DXL_ADC_IN4 85 96 + #define IMX8DXL_FLEXCAN0_RX 86 97 + #define IMX8DXL_FLEXCAN0_TX 87 98 + #define IMX8DXL_FLEXCAN1_RX 88 99 + #define IMX8DXL_FLEXCAN1_TX 89 100 + #define IMX8DXL_FLEXCAN2_RX 90 101 + #define IMX8DXL_FLEXCAN2_TX 91 102 + #define IMX8DXL_UART0_RX 92 103 + #define IMX8DXL_UART0_TX 93 104 + #define IMX8DXL_UART2_TX 94 105 + #define IMX8DXL_UART2_RX 95 106 + #define IMX8DXL_COMP_CTL_GPIO_1V8_3V3_GPIOLH 96 107 + #define IMX8DXL_JTAG_TRST_B 97 108 + #define IMX8DXL_PMIC_I2C_SCL 98 109 + #define IMX8DXL_PMIC_I2C_SDA 99 110 + #define IMX8DXL_PMIC_INT_B 100 111 + #define IMX8DXL_SCU_GPIO0_00 101 112 + #define IMX8DXL_SCU_GPIO0_01 102 113 + #define IMX8DXL_SCU_PMIC_STANDBY 103 114 + #define IMX8DXL_SCU_BOOT_MODE1 104 115 + #define IMX8DXL_SCU_BOOT_MODE0 105 116 + #define IMX8DXL_SCU_BOOT_MODE2 106 117 + #define IMX8DXL_SNVS_TAMPER_OUT1 107 118 + #define IMX8DXL_SNVS_TAMPER_OUT2 108 119 + #define IMX8DXL_SNVS_TAMPER_OUT3 109 120 + #define IMX8DXL_SNVS_TAMPER_OUT4 110 121 + #define IMX8DXL_SNVS_TAMPER_IN0 111 122 + #define IMX8DXL_SNVS_TAMPER_IN1 112 123 + #define IMX8DXL_SNVS_TAMPER_IN2 113 124 + #define IMX8DXL_SNVS_TAMPER_IN3 114 125 + #define IMX8DXL_SPI1_SCK 115 126 + #define IMX8DXL_SPI1_SDO 116 127 + #define IMX8DXL_SPI1_SDI 117 128 + #define IMX8DXL_SPI1_CS0 118 129 + #define IMX8DXL_COMP_CTL_GPIO_1V8_3V3_GPIORHD 119 130 + #define IMX8DXL_QSPI0A_DATA1 120 131 + #define IMX8DXL_QSPI0A_DATA0 121 132 + #define IMX8DXL_QSPI0A_DATA3 122 133 + #define IMX8DXL_QSPI0A_DATA2 123 134 + #define IMX8DXL_QSPI0A_SS0_B 124 135 + #define IMX8DXL_QSPI0A_DQS 125 136 + #define IMX8DXL_QSPI0A_SCLK 126 137 + #define IMX8DXL_COMP_CTL_GPIO_1V8_3V3_QSPI0A 127 138 + #define IMX8DXL_QSPI0B_SCLK 128 139 + #define IMX8DXL_QSPI0B_DQS 129 140 + #define IMX8DXL_QSPI0B_DATA1 130 141 + #define IMX8DXL_QSPI0B_DATA0 131 142 + #define IMX8DXL_QSPI0B_DATA3 132 143 + #define IMX8DXL_QSPI0B_DATA2 133 144 + #define IMX8DXL_QSPI0B_SS0_B 134 145 + #define IMX8DXL_COMP_CTL_GPIO_1V8_3V3_QSPI0B 135 146 + 147 + /* format: <pin_id mux_mode> */ 148 + #define IMX8DXL_PCIE_CTRL0_PERST_B_HSIO_PCIE0_PERST_B IMX8DXL_PCIE_CTRL0_PERST_B 0 149 + #define IMX8DXL_PCIE_CTRL0_PERST_B_LSIO_GPIO4_IO00 IMX8DXL_PCIE_CTRL0_PERST_B 4 150 + #define IMX8DXL_PCIE_CTRL0_PERST_B_LSIO_GPIO7_IO00 IMX8DXL_PCIE_CTRL0_PERST_B 5 151 + #define IMX8DXL_PCIE_CTRL0_CLKREQ_B_HSIO_PCIE0_CLKREQ_B IMX8DXL_PCIE_CTRL0_CLKREQ_B 0 152 + #define IMX8DXL_PCIE_CTRL0_CLKREQ_B_LSIO_GPIO4_IO01 IMX8DXL_PCIE_CTRL0_CLKREQ_B 4 153 + #define IMX8DXL_PCIE_CTRL0_CLKREQ_B_LSIO_GPIO7_IO01 IMX8DXL_PCIE_CTRL0_CLKREQ_B 5 154 + #define IMX8DXL_PCIE_CTRL0_WAKE_B_HSIO_PCIE0_WAKE_B IMX8DXL_PCIE_CTRL0_WAKE_B 0 155 + #define IMX8DXL_PCIE_CTRL0_WAKE_B_LSIO_GPIO4_IO02 IMX8DXL_PCIE_CTRL0_WAKE_B 4 156 + #define IMX8DXL_PCIE_CTRL0_WAKE_B_LSIO_GPIO7_IO02 IMX8DXL_PCIE_CTRL0_WAKE_B 5 157 + #define IMX8DXL_USB_SS3_TC0_ADMA_I2C1_SCL IMX8DXL_USB_SS3_TC0 0 158 + #define IMX8DXL_USB_SS3_TC0_CONN_USB_OTG1_PWR IMX8DXL_USB_SS3_TC0 1 159 + #define IMX8DXL_USB_SS3_TC0_CONN_USB_OTG2_PWR IMX8DXL_USB_SS3_TC0 2 160 + #define IMX8DXL_USB_SS3_TC0_LSIO_GPIO4_IO03 IMX8DXL_USB_SS3_TC0 4 161 + #define IMX8DXL_USB_SS3_TC0_LSIO_GPIO7_IO03 IMX8DXL_USB_SS3_TC0 5 162 + #define IMX8DXL_USB_SS3_TC1_ADMA_I2C1_SCL IMX8DXL_USB_SS3_TC1 0 163 + #define IMX8DXL_USB_SS3_TC1_CONN_USB_OTG2_PWR IMX8DXL_USB_SS3_TC1 1 164 + #define IMX8DXL_USB_SS3_TC1_LSIO_GPIO4_IO04 IMX8DXL_USB_SS3_TC1 4 165 + #define IMX8DXL_USB_SS3_TC1_LSIO_GPIO7_IO04 IMX8DXL_USB_SS3_TC1 5 166 + #define IMX8DXL_USB_SS3_TC2_ADMA_I2C1_SDA IMX8DXL_USB_SS3_TC2 0 167 + #define IMX8DXL_USB_SS3_TC2_CONN_USB_OTG1_OC IMX8DXL_USB_SS3_TC2 1 168 + #define IMX8DXL_USB_SS3_TC2_CONN_USB_OTG2_OC IMX8DXL_USB_SS3_TC2 2 169 + #define IMX8DXL_USB_SS3_TC2_LSIO_GPIO4_IO05 IMX8DXL_USB_SS3_TC2 4 170 + #define IMX8DXL_USB_SS3_TC2_LSIO_GPIO7_IO05 IMX8DXL_USB_SS3_TC2 5 171 + #define IMX8DXL_USB_SS3_TC3_ADMA_I2C1_SDA IMX8DXL_USB_SS3_TC3 0 172 + #define IMX8DXL_USB_SS3_TC3_CONN_USB_OTG2_OC IMX8DXL_USB_SS3_TC3 1 173 + #define IMX8DXL_USB_SS3_TC3_LSIO_GPIO4_IO06 IMX8DXL_USB_SS3_TC3 4 174 + #define IMX8DXL_USB_SS3_TC3_LSIO_GPIO7_IO06 IMX8DXL_USB_SS3_TC3 5 175 + #define IMX8DXL_EMMC0_CLK_CONN_EMMC0_CLK IMX8DXL_EMMC0_CLK 0 176 + #define IMX8DXL_EMMC0_CLK_CONN_NAND_READY_B IMX8DXL_EMMC0_CLK 1 177 + #define IMX8DXL_EMMC0_CLK_LSIO_GPIO4_IO07 IMX8DXL_EMMC0_CLK 4 178 + #define IMX8DXL_EMMC0_CMD_CONN_EMMC0_CMD IMX8DXL_EMMC0_CMD 0 179 + #define IMX8DXL_EMMC0_CMD_CONN_NAND_DQS IMX8DXL_EMMC0_CMD 1 180 + #define IMX8DXL_EMMC0_CMD_LSIO_GPIO4_IO08 IMX8DXL_EMMC0_CMD 4 181 + #define IMX8DXL_EMMC0_DATA0_CONN_EMMC0_DATA0 IMX8DXL_EMMC0_DATA0 0 182 + #define IMX8DXL_EMMC0_DATA0_CONN_NAND_DATA00 IMX8DXL_EMMC0_DATA0 1 183 + #define IMX8DXL_EMMC0_DATA0_LSIO_GPIO4_IO09 IMX8DXL_EMMC0_DATA0 4 184 + #define IMX8DXL_EMMC0_DATA1_CONN_EMMC0_DATA1 IMX8DXL_EMMC0_DATA1 0 185 + #define IMX8DXL_EMMC0_DATA1_CONN_NAND_DATA01 IMX8DXL_EMMC0_DATA1 1 186 + #define IMX8DXL_EMMC0_DATA1_LSIO_GPIO4_IO10 IMX8DXL_EMMC0_DATA1 4 187 + #define IMX8DXL_EMMC0_DATA2_CONN_EMMC0_DATA2 IMX8DXL_EMMC0_DATA2 0 188 + #define IMX8DXL_EMMC0_DATA2_CONN_NAND_DATA02 IMX8DXL_EMMC0_DATA2 1 189 + #define IMX8DXL_EMMC0_DATA2_LSIO_GPIO4_IO11 IMX8DXL_EMMC0_DATA2 4 190 + #define IMX8DXL_EMMC0_DATA3_CONN_EMMC0_DATA3 IMX8DXL_EMMC0_DATA3 0 191 + #define IMX8DXL_EMMC0_DATA3_CONN_NAND_DATA03 IMX8DXL_EMMC0_DATA3 1 192 + #define IMX8DXL_EMMC0_DATA3_LSIO_GPIO4_IO12 IMX8DXL_EMMC0_DATA3 4 193 + #define IMX8DXL_EMMC0_DATA4_CONN_EMMC0_DATA4 IMX8DXL_EMMC0_DATA4 0 194 + #define IMX8DXL_EMMC0_DATA4_CONN_NAND_DATA04 IMX8DXL_EMMC0_DATA4 1 195 + #define IMX8DXL_EMMC0_DATA4_LSIO_GPIO4_IO13 IMX8DXL_EMMC0_DATA4 4 196 + #define IMX8DXL_EMMC0_DATA5_CONN_EMMC0_DATA5 IMX8DXL_EMMC0_DATA5 0 197 + #define IMX8DXL_EMMC0_DATA5_CONN_NAND_DATA05 IMX8DXL_EMMC0_DATA5 1 198 + #define IMX8DXL_EMMC0_DATA5_LSIO_GPIO4_IO14 IMX8DXL_EMMC0_DATA5 4 199 + #define IMX8DXL_EMMC0_DATA6_CONN_EMMC0_DATA6 IMX8DXL_EMMC0_DATA6 0 200 + #define IMX8DXL_EMMC0_DATA6_CONN_NAND_DATA06 IMX8DXL_EMMC0_DATA6 1 201 + #define IMX8DXL_EMMC0_DATA6_LSIO_GPIO4_IO15 IMX8DXL_EMMC0_DATA6 4 202 + #define IMX8DXL_EMMC0_DATA7_CONN_EMMC0_DATA7 IMX8DXL_EMMC0_DATA7 0 203 + #define IMX8DXL_EMMC0_DATA7_CONN_NAND_DATA07 IMX8DXL_EMMC0_DATA7 1 204 + #define IMX8DXL_EMMC0_DATA7_LSIO_GPIO4_IO16 IMX8DXL_EMMC0_DATA7 4 205 + #define IMX8DXL_EMMC0_STROBE_CONN_EMMC0_STROBE IMX8DXL_EMMC0_STROBE 0 206 + #define IMX8DXL_EMMC0_STROBE_CONN_NAND_CLE IMX8DXL_EMMC0_STROBE 1 207 + #define IMX8DXL_EMMC0_STROBE_LSIO_GPIO4_IO17 IMX8DXL_EMMC0_STROBE 4 208 + #define IMX8DXL_EMMC0_RESET_B_CONN_EMMC0_RESET_B IMX8DXL_EMMC0_RESET_B 0 209 + #define IMX8DXL_EMMC0_RESET_B_CONN_NAND_WP_B IMX8DXL_EMMC0_RESET_B 1 210 + #define IMX8DXL_EMMC0_RESET_B_LSIO_GPIO4_IO18 IMX8DXL_EMMC0_RESET_B 4 211 + #define IMX8DXL_USDHC1_RESET_B_CONN_USDHC1_RESET_B IMX8DXL_USDHC1_RESET_B 0 212 + #define IMX8DXL_USDHC1_RESET_B_CONN_NAND_RE_N IMX8DXL_USDHC1_RESET_B 1 213 + #define IMX8DXL_USDHC1_RESET_B_ADMA_SPI2_SCK IMX8DXL_USDHC1_RESET_B 2 214 + #define IMX8DXL_USDHC1_RESET_B_CONN_NAND_WE_B IMX8DXL_USDHC1_RESET_B 3 215 + #define IMX8DXL_USDHC1_RESET_B_LSIO_GPIO4_IO19 IMX8DXL_USDHC1_RESET_B 4 216 + #define IMX8DXL_USDHC1_RESET_B_LSIO_GPIO7_IO08 IMX8DXL_USDHC1_RESET_B 5 217 + #define IMX8DXL_USDHC1_VSELECT_CONN_USDHC1_VSELECT IMX8DXL_USDHC1_VSELECT 0 218 + #define IMX8DXL_USDHC1_VSELECT_CONN_NAND_RE_P IMX8DXL_USDHC1_VSELECT 1 219 + #define IMX8DXL_USDHC1_VSELECT_ADMA_SPI2_SDO IMX8DXL_USDHC1_VSELECT 2 220 + #define IMX8DXL_USDHC1_VSELECT_CONN_NAND_RE_B IMX8DXL_USDHC1_VSELECT 3 221 + #define IMX8DXL_USDHC1_VSELECT_LSIO_GPIO4_IO20 IMX8DXL_USDHC1_VSELECT 4 222 + #define IMX8DXL_USDHC1_VSELECT_LSIO_GPIO7_IO09 IMX8DXL_USDHC1_VSELECT 5 223 + #define IMX8DXL_USDHC1_WP_CONN_USDHC1_WP IMX8DXL_USDHC1_WP 0 224 + #define IMX8DXL_USDHC1_WP_CONN_NAND_DQS_N IMX8DXL_USDHC1_WP 1 225 + #define IMX8DXL_USDHC1_WP_ADMA_SPI2_SDI IMX8DXL_USDHC1_WP 2 226 + #define IMX8DXL_USDHC1_WP_CONN_NAND_ALE IMX8DXL_USDHC1_WP 3 227 + #define IMX8DXL_USDHC1_WP_LSIO_GPIO4_IO21 IMX8DXL_USDHC1_WP 4 228 + #define IMX8DXL_USDHC1_WP_LSIO_GPIO7_IO10 IMX8DXL_USDHC1_WP 5 229 + #define IMX8DXL_USDHC1_CD_B_CONN_USDHC1_CD_B IMX8DXL_USDHC1_CD_B 0 230 + #define IMX8DXL_USDHC1_CD_B_CONN_NAND_DQS_P IMX8DXL_USDHC1_CD_B 1 231 + #define IMX8DXL_USDHC1_CD_B_ADMA_SPI2_CS0 IMX8DXL_USDHC1_CD_B 2 232 + #define IMX8DXL_USDHC1_CD_B_CONN_NAND_DQS IMX8DXL_USDHC1_CD_B 3 233 + #define IMX8DXL_USDHC1_CD_B_LSIO_GPIO4_IO22 IMX8DXL_USDHC1_CD_B 4 234 + #define IMX8DXL_USDHC1_CD_B_LSIO_GPIO7_IO11 IMX8DXL_USDHC1_CD_B 5 235 + #define IMX8DXL_ENET0_RGMII_TXC_CONN_ENET0_RGMII_TXC IMX8DXL_ENET0_RGMII_TXC 0 236 + #define IMX8DXL_ENET0_RGMII_TXC_CONN_ENET0_RCLK50M_OUT IMX8DXL_ENET0_RGMII_TXC 1 237 + #define IMX8DXL_ENET0_RGMII_TXC_CONN_ENET0_RCLK50M_IN IMX8DXL_ENET0_RGMII_TXC 2 238 + #define IMX8DXL_ENET0_RGMII_TXC_CONN_NAND_CE1_B IMX8DXL_ENET0_RGMII_TXC 3 239 + #define IMX8DXL_ENET0_RGMII_TXC_LSIO_GPIO4_IO29 IMX8DXL_ENET0_RGMII_TXC 4 240 + #define IMX8DXL_ENET0_RGMII_TXC_CONN_USDHC2_CLK IMX8DXL_ENET0_RGMII_TXC 5 241 + #define IMX8DXL_ENET0_RGMII_TX_CTL_CONN_ENET0_RGMII_TX_CTL IMX8DXL_ENET0_RGMII_TX_CTL 0 242 + #define IMX8DXL_ENET0_RGMII_TX_CTL_CONN_USDHC1_RESET_B IMX8DXL_ENET0_RGMII_TX_CTL 3 243 + #define IMX8DXL_ENET0_RGMII_TX_CTL_LSIO_GPIO4_IO30 IMX8DXL_ENET0_RGMII_TX_CTL 4 244 + #define IMX8DXL_ENET0_RGMII_TX_CTL_CONN_USDHC2_CMD IMX8DXL_ENET0_RGMII_TX_CTL 5 245 + #define IMX8DXL_ENET0_RGMII_TXD0_CONN_ENET0_RGMII_TXD0 IMX8DXL_ENET0_RGMII_TXD0 0 246 + #define IMX8DXL_ENET0_RGMII_TXD0_CONN_USDHC1_VSELECT IMX8DXL_ENET0_RGMII_TXD0 3 247 + #define IMX8DXL_ENET0_RGMII_TXD0_LSIO_GPIO4_IO31 IMX8DXL_ENET0_RGMII_TXD0 4 248 + #define IMX8DXL_ENET0_RGMII_TXD0_CONN_USDHC2_DATA0 IMX8DXL_ENET0_RGMII_TXD0 5 249 + #define IMX8DXL_ENET0_RGMII_TXD1_CONN_ENET0_RGMII_TXD1 IMX8DXL_ENET0_RGMII_TXD1 0 250 + #define IMX8DXL_ENET0_RGMII_TXD1_CONN_USDHC1_WP IMX8DXL_ENET0_RGMII_TXD1 3 251 + #define IMX8DXL_ENET0_RGMII_TXD1_LSIO_GPIO5_IO00 IMX8DXL_ENET0_RGMII_TXD1 4 252 + #define IMX8DXL_ENET0_RGMII_TXD1_CONN_USDHC2_DATA1 IMX8DXL_ENET0_RGMII_TXD1 5 253 + #define IMX8DXL_ENET0_RGMII_TXD2_CONN_ENET0_RGMII_TXD2 IMX8DXL_ENET0_RGMII_TXD2 0 254 + #define IMX8DXL_ENET0_RGMII_TXD2_CONN_NAND_CE0_B IMX8DXL_ENET0_RGMII_TXD2 2 255 + #define IMX8DXL_ENET0_RGMII_TXD2_CONN_USDHC1_CD_B IMX8DXL_ENET0_RGMII_TXD2 3 256 + #define IMX8DXL_ENET0_RGMII_TXD2_LSIO_GPIO5_IO01 IMX8DXL_ENET0_RGMII_TXD2 4 257 + #define IMX8DXL_ENET0_RGMII_TXD2_CONN_USDHC2_DATA2 IMX8DXL_ENET0_RGMII_TXD2 5 258 + #define IMX8DXL_ENET0_RGMII_TXD3_CONN_ENET0_RGMII_TXD3 IMX8DXL_ENET0_RGMII_TXD3 0 259 + #define IMX8DXL_ENET0_RGMII_TXD3_CONN_NAND_RE_B IMX8DXL_ENET0_RGMII_TXD3 2 260 + #define IMX8DXL_ENET0_RGMII_TXD3_LSIO_GPIO5_IO02 IMX8DXL_ENET0_RGMII_TXD3 4 261 + #define IMX8DXL_ENET0_RGMII_TXD3_CONN_USDHC2_DATA3 IMX8DXL_ENET0_RGMII_TXD3 5 262 + #define IMX8DXL_ENET0_RGMII_RXC_CONN_ENET0_RGMII_RXC IMX8DXL_ENET0_RGMII_RXC 0 263 + #define IMX8DXL_ENET0_RGMII_RXC_CONN_NAND_WE_B IMX8DXL_ENET0_RGMII_RXC 2 264 + #define IMX8DXL_ENET0_RGMII_RXC_CONN_USDHC1_CLK IMX8DXL_ENET0_RGMII_RXC 3 265 + #define IMX8DXL_ENET0_RGMII_RXC_LSIO_GPIO5_IO03 IMX8DXL_ENET0_RGMII_RXC 4 266 + #define IMX8DXL_ENET0_RGMII_RX_CTL_CONN_ENET0_RGMII_RX_CTL IMX8DXL_ENET0_RGMII_RX_CTL 0 267 + #define IMX8DXL_ENET0_RGMII_RX_CTL_CONN_USDHC1_CMD IMX8DXL_ENET0_RGMII_RX_CTL 3 268 + #define IMX8DXL_ENET0_RGMII_RX_CTL_LSIO_GPIO5_IO04 IMX8DXL_ENET0_RGMII_RX_CTL 4 269 + #define IMX8DXL_ENET0_RGMII_RXD0_CONN_ENET0_RGMII_RXD0 IMX8DXL_ENET0_RGMII_RXD0 0 270 + #define IMX8DXL_ENET0_RGMII_RXD0_CONN_USDHC1_DATA0 IMX8DXL_ENET0_RGMII_RXD0 3 271 + #define IMX8DXL_ENET0_RGMII_RXD0_LSIO_GPIO5_IO05 IMX8DXL_ENET0_RGMII_RXD0 4 272 + #define IMX8DXL_ENET0_RGMII_RXD1_CONN_ENET0_RGMII_RXD1 IMX8DXL_ENET0_RGMII_RXD1 0 273 + #define IMX8DXL_ENET0_RGMII_RXD1_CONN_USDHC1_DATA1 IMX8DXL_ENET0_RGMII_RXD1 3 274 + #define IMX8DXL_ENET0_RGMII_RXD1_LSIO_GPIO5_IO06 IMX8DXL_ENET0_RGMII_RXD1 4 275 + #define IMX8DXL_ENET0_RGMII_RXD2_CONN_ENET0_RGMII_RXD2 IMX8DXL_ENET0_RGMII_RXD2 0 276 + #define IMX8DXL_ENET0_RGMII_RXD2_CONN_ENET0_RMII_RX_ER IMX8DXL_ENET0_RGMII_RXD2 1 277 + #define IMX8DXL_ENET0_RGMII_RXD2_CONN_USDHC1_DATA2 IMX8DXL_ENET0_RGMII_RXD2 3 278 + #define IMX8DXL_ENET0_RGMII_RXD2_LSIO_GPIO5_IO07 IMX8DXL_ENET0_RGMII_RXD2 4 279 + #define IMX8DXL_ENET0_RGMII_RXD3_CONN_ENET0_RGMII_RXD3 IMX8DXL_ENET0_RGMII_RXD3 0 280 + #define IMX8DXL_ENET0_RGMII_RXD3_CONN_NAND_ALE IMX8DXL_ENET0_RGMII_RXD3 2 281 + #define IMX8DXL_ENET0_RGMII_RXD3_CONN_USDHC1_DATA3 IMX8DXL_ENET0_RGMII_RXD3 3 282 + #define IMX8DXL_ENET0_RGMII_RXD3_LSIO_GPIO5_IO08 IMX8DXL_ENET0_RGMII_RXD3 4 283 + #define IMX8DXL_ENET0_REFCLK_125M_25M_CONN_ENET0_REFCLK_125M_25M IMX8DXL_ENET0_REFCLK_125M_25M 0 284 + #define IMX8DXL_ENET0_REFCLK_125M_25M_CONN_ENET0_PPS IMX8DXL_ENET0_REFCLK_125M_25M 1 285 + #define IMX8DXL_ENET0_REFCLK_125M_25M_CONN_EQOS_PPS_IN IMX8DXL_ENET0_REFCLK_125M_25M 2 286 + #define IMX8DXL_ENET0_REFCLK_125M_25M_CONN_EQOS_PPS_OUT IMX8DXL_ENET0_REFCLK_125M_25M 3 287 + #define IMX8DXL_ENET0_REFCLK_125M_25M_LSIO_GPIO5_IO09 IMX8DXL_ENET0_REFCLK_125M_25M 4 288 + #define IMX8DXL_ENET0_MDIO_CONN_ENET0_MDIO IMX8DXL_ENET0_MDIO 0 289 + #define IMX8DXL_ENET0_MDIO_ADMA_I2C3_SDA IMX8DXL_ENET0_MDIO 1 290 + #define IMX8DXL_ENET0_MDIO_CONN_EQOS_MDIO IMX8DXL_ENET0_MDIO 2 291 + #define IMX8DXL_ENET0_MDIO_LSIO_GPIO5_IO10 IMX8DXL_ENET0_MDIO 4 292 + #define IMX8DXL_ENET0_MDIO_LSIO_GPIO7_IO16 IMX8DXL_ENET0_MDIO 5 293 + #define IMX8DXL_ENET0_MDC_CONN_ENET0_MDC IMX8DXL_ENET0_MDC 0 294 + #define IMX8DXL_ENET0_MDC_ADMA_I2C3_SCL IMX8DXL_ENET0_MDC 1 295 + #define IMX8DXL_ENET0_MDC_CONN_EQOS_MDC IMX8DXL_ENET0_MDC 2 296 + #define IMX8DXL_ENET0_MDC_LSIO_GPIO5_IO11 IMX8DXL_ENET0_MDC 4 297 + #define IMX8DXL_ENET0_MDC_LSIO_GPIO7_IO17 IMX8DXL_ENET0_MDC 5 298 + #define IMX8DXL_ENET1_RGMII_TXC_LSIO_GPIO0_IO00 IMX8DXL_ENET1_RGMII_TXC 0 299 + #define IMX8DXL_ENET1_RGMII_TXC_CONN_EQOS_RCLK50M_OUT IMX8DXL_ENET1_RGMII_TXC 1 300 + #define IMX8DXL_ENET1_RGMII_TXC_ADMA_LCDIF_D00 IMX8DXL_ENET1_RGMII_TXC 2 301 + #define IMX8DXL_ENET1_RGMII_TXC_CONN_EQOS_RGMII_TXC IMX8DXL_ENET1_RGMII_TXC 3 302 + #define IMX8DXL_ENET1_RGMII_TXC_CONN_EQOS_RCLK50M_IN IMX8DXL_ENET1_RGMII_TXC 4 303 + #define IMX8DXL_ENET1_RGMII_TXD2_ADMA_LCDIF_D01 IMX8DXL_ENET1_RGMII_TXD2 2 304 + #define IMX8DXL_ENET1_RGMII_TXD2_CONN_EQOS_RGMII_TXD2 IMX8DXL_ENET1_RGMII_TXD2 3 305 + #define IMX8DXL_ENET1_RGMII_TXD2_LSIO_GPIO0_IO01 IMX8DXL_ENET1_RGMII_TXD2 4 306 + #define IMX8DXL_ENET1_RGMII_TX_CTL_ADMA_LCDIF_D02 IMX8DXL_ENET1_RGMII_TX_CTL 2 307 + #define IMX8DXL_ENET1_RGMII_TX_CTL_CONN_EQOS_RGMII_TX_CTL IMX8DXL_ENET1_RGMII_TX_CTL 3 308 + #define IMX8DXL_ENET1_RGMII_TX_CTL_LSIO_GPIO0_IO02 IMX8DXL_ENET1_RGMII_TX_CTL 4 309 + #define IMX8DXL_ENET1_RGMII_TXD3_ADMA_LCDIF_D03 IMX8DXL_ENET1_RGMII_TXD3 2 310 + #define IMX8DXL_ENET1_RGMII_TXD3_CONN_EQOS_RGMII_TXD3 IMX8DXL_ENET1_RGMII_TXD3 3 311 + #define IMX8DXL_ENET1_RGMII_TXD3_LSIO_GPIO0_IO03 IMX8DXL_ENET1_RGMII_TXD3 4 312 + #define IMX8DXL_ENET1_RGMII_RXC_ADMA_LCDIF_D04 IMX8DXL_ENET1_RGMII_RXC 2 313 + #define IMX8DXL_ENET1_RGMII_RXC_CONN_EQOS_RGMII_RXC IMX8DXL_ENET1_RGMII_RXC 3 314 + #define IMX8DXL_ENET1_RGMII_RXC_LSIO_GPIO0_IO04 IMX8DXL_ENET1_RGMII_RXC 4 315 + #define IMX8DXL_ENET1_RGMII_RXD3_ADMA_LCDIF_D05 IMX8DXL_ENET1_RGMII_RXD3 2 316 + #define IMX8DXL_ENET1_RGMII_RXD3_CONN_EQOS_RGMII_RXD3 IMX8DXL_ENET1_RGMII_RXD3 3 317 + #define IMX8DXL_ENET1_RGMII_RXD3_LSIO_GPIO0_IO05 IMX8DXL_ENET1_RGMII_RXD3 4 318 + #define IMX8DXL_ENET1_RGMII_RXD2_ADMA_LCDIF_D06 IMX8DXL_ENET1_RGMII_RXD2 2 319 + #define IMX8DXL_ENET1_RGMII_RXD2_CONN_EQOS_RGMII_RXD2 IMX8DXL_ENET1_RGMII_RXD2 3 320 + #define IMX8DXL_ENET1_RGMII_RXD2_LSIO_GPIO0_IO06 IMX8DXL_ENET1_RGMII_RXD2 4 321 + #define IMX8DXL_ENET1_RGMII_RXD2_LSIO_GPIO6_IO00 IMX8DXL_ENET1_RGMII_RXD2 5 322 + #define IMX8DXL_ENET1_RGMII_RXD1_ADMA_LCDIF_D07 IMX8DXL_ENET1_RGMII_RXD1 2 323 + #define IMX8DXL_ENET1_RGMII_RXD1_CONN_EQOS_RGMII_RXD1 IMX8DXL_ENET1_RGMII_RXD1 3 324 + #define IMX8DXL_ENET1_RGMII_RXD1_LSIO_GPIO0_IO07 IMX8DXL_ENET1_RGMII_RXD1 4 325 + #define IMX8DXL_ENET1_RGMII_RXD1_LSIO_GPIO6_IO01 IMX8DXL_ENET1_RGMII_RXD1 5 326 + #define IMX8DXL_ENET1_RGMII_TXD0_ADMA_LCDIF_D08 IMX8DXL_ENET1_RGMII_TXD0 2 327 + #define IMX8DXL_ENET1_RGMII_TXD0_CONN_EQOS_RGMII_TXD0 IMX8DXL_ENET1_RGMII_TXD0 3 328 + #define IMX8DXL_ENET1_RGMII_TXD0_LSIO_GPIO0_IO08 IMX8DXL_ENET1_RGMII_TXD0 4 329 + #define IMX8DXL_ENET1_RGMII_TXD0_LSIO_GPIO6_IO02 IMX8DXL_ENET1_RGMII_TXD0 5 330 + #define IMX8DXL_ENET1_RGMII_TXD1_ADMA_LCDIF_D09 IMX8DXL_ENET1_RGMII_TXD1 2 331 + #define IMX8DXL_ENET1_RGMII_TXD1_CONN_EQOS_RGMII_TXD1 IMX8DXL_ENET1_RGMII_TXD1 3 332 + #define IMX8DXL_ENET1_RGMII_TXD1_LSIO_GPIO0_IO09 IMX8DXL_ENET1_RGMII_TXD1 4 333 + #define IMX8DXL_ENET1_RGMII_TXD1_LSIO_GPIO6_IO03 IMX8DXL_ENET1_RGMII_TXD1 5 334 + #define IMX8DXL_ENET1_RGMII_RXD0_ADMA_SPDIF0_RX IMX8DXL_ENET1_RGMII_RXD0 0 335 + #define IMX8DXL_ENET1_RGMII_RXD0_ADMA_MQS_R IMX8DXL_ENET1_RGMII_RXD0 1 336 + #define IMX8DXL_ENET1_RGMII_RXD0_ADMA_LCDIF_D10 IMX8DXL_ENET1_RGMII_RXD0 2 337 + #define IMX8DXL_ENET1_RGMII_RXD0_CONN_EQOS_RGMII_RXD0 IMX8DXL_ENET1_RGMII_RXD0 3 338 + #define IMX8DXL_ENET1_RGMII_RXD0_LSIO_GPIO0_IO10 IMX8DXL_ENET1_RGMII_RXD0 4 339 + #define IMX8DXL_ENET1_RGMII_RXD0_LSIO_GPIO6_IO04 IMX8DXL_ENET1_RGMII_RXD0 5 340 + #define IMX8DXL_ENET1_RGMII_RX_CTL_ADMA_SPDIF0_TX IMX8DXL_ENET1_RGMII_RX_CTL 0 341 + #define IMX8DXL_ENET1_RGMII_RX_CTL_ADMA_MQS_L IMX8DXL_ENET1_RGMII_RX_CTL 1 342 + #define IMX8DXL_ENET1_RGMII_RX_CTL_ADMA_LCDIF_D11 IMX8DXL_ENET1_RGMII_RX_CTL 2 343 + #define IMX8DXL_ENET1_RGMII_RX_CTL_CONN_EQOS_RGMII_RX_CTL IMX8DXL_ENET1_RGMII_RX_CTL 3 344 + #define IMX8DXL_ENET1_RGMII_RX_CTL_LSIO_GPIO0_IO11 IMX8DXL_ENET1_RGMII_RX_CTL 4 345 + #define IMX8DXL_ENET1_RGMII_RX_CTL_LSIO_GPIO6_IO05 IMX8DXL_ENET1_RGMII_RX_CTL 5 346 + #define IMX8DXL_ENET1_REFCLK_125M_25M_ADMA_SPDIF0_EXT_CLK IMX8DXL_ENET1_REFCLK_125M_25M 0 347 + #define IMX8DXL_ENET1_REFCLK_125M_25M_ADMA_LCDIF_D12 IMX8DXL_ENET1_REFCLK_125M_25M 2 348 + #define IMX8DXL_ENET1_REFCLK_125M_25M_CONN_EQOS_REFCLK_125M_25M IMX8DXL_ENET1_REFCLK_125M_25M 3 349 + #define IMX8DXL_ENET1_REFCLK_125M_25M_LSIO_GPIO0_IO12 IMX8DXL_ENET1_REFCLK_125M_25M 4 350 + #define IMX8DXL_ENET1_REFCLK_125M_25M_LSIO_GPIO6_IO06 IMX8DXL_ENET1_REFCLK_125M_25M 5 351 + #define IMX8DXL_SPI3_SCK_ADMA_SPI3_SCK IMX8DXL_SPI3_SCK 0 352 + #define IMX8DXL_SPI3_SCK_ADMA_LCDIF_D13 IMX8DXL_SPI3_SCK 2 353 + #define IMX8DXL_SPI3_SCK_LSIO_GPIO0_IO13 IMX8DXL_SPI3_SCK 4 354 + #define IMX8DXL_SPI3_SCK_ADMA_LCDIF_D00 IMX8DXL_SPI3_SCK 5 355 + #define IMX8DXL_SPI3_SDO_ADMA_SPI3_SDO IMX8DXL_SPI3_SDO 0 356 + #define IMX8DXL_SPI3_SDO_ADMA_LCDIF_D14 IMX8DXL_SPI3_SDO 2 357 + #define IMX8DXL_SPI3_SDO_LSIO_GPIO0_IO14 IMX8DXL_SPI3_SDO 4 358 + #define IMX8DXL_SPI3_SDO_ADMA_LCDIF_D01 IMX8DXL_SPI3_SDO 5 359 + #define IMX8DXL_SPI3_SDI_ADMA_SPI3_SDI IMX8DXL_SPI3_SDI 0 360 + #define IMX8DXL_SPI3_SDI_ADMA_LCDIF_D15 IMX8DXL_SPI3_SDI 2 361 + #define IMX8DXL_SPI3_SDI_LSIO_GPIO0_IO15 IMX8DXL_SPI3_SDI 4 362 + #define IMX8DXL_SPI3_SDI_ADMA_LCDIF_D02 IMX8DXL_SPI3_SDI 5 363 + #define IMX8DXL_SPI3_CS0_ADMA_SPI3_CS0 IMX8DXL_SPI3_CS0 0 364 + #define IMX8DXL_SPI3_CS0_ADMA_ACM_MCLK_OUT1 IMX8DXL_SPI3_CS0 1 365 + #define IMX8DXL_SPI3_CS0_ADMA_LCDIF_HSYNC IMX8DXL_SPI3_CS0 2 366 + #define IMX8DXL_SPI3_CS0_LSIO_GPIO0_IO16 IMX8DXL_SPI3_CS0 4 367 + #define IMX8DXL_SPI3_CS0_ADMA_LCDIF_CS IMX8DXL_SPI3_CS0 5 368 + #define IMX8DXL_SPI3_CS1_ADMA_SPI3_CS1 IMX8DXL_SPI3_CS1 0 369 + #define IMX8DXL_SPI3_CS1_ADMA_I2C3_SCL IMX8DXL_SPI3_CS1 1 370 + #define IMX8DXL_SPI3_CS1_ADMA_LCDIF_RESET IMX8DXL_SPI3_CS1 2 371 + #define IMX8DXL_SPI3_CS1_ADMA_SPI2_CS0 IMX8DXL_SPI3_CS1 3 372 + #define IMX8DXL_SPI3_CS1_ADMA_LCDIF_D16 IMX8DXL_SPI3_CS1 4 373 + #define IMX8DXL_SPI3_CS1_ADMA_LCDIF_RD_E IMX8DXL_SPI3_CS1 5 374 + #define IMX8DXL_MCLK_IN1_ADMA_ACM_MCLK_IN1 IMX8DXL_MCLK_IN1 0 375 + #define IMX8DXL_MCLK_IN1_ADMA_I2C3_SDA IMX8DXL_MCLK_IN1 1 376 + #define IMX8DXL_MCLK_IN1_ADMA_LCDIF_EN IMX8DXL_MCLK_IN1 2 377 + #define IMX8DXL_MCLK_IN1_ADMA_SPI2_SCK IMX8DXL_MCLK_IN1 3 378 + #define IMX8DXL_MCLK_IN1_ADMA_LCDIF_D17 IMX8DXL_MCLK_IN1 4 379 + #define IMX8DXL_MCLK_IN1_ADMA_LCDIF_D03 IMX8DXL_MCLK_IN1 5 380 + #define IMX8DXL_MCLK_IN0_ADMA_ACM_MCLK_IN0 IMX8DXL_MCLK_IN0 0 381 + #define IMX8DXL_MCLK_IN0_ADMA_LCDIF_VSYNC IMX8DXL_MCLK_IN0 2 382 + #define IMX8DXL_MCLK_IN0_ADMA_SPI2_SDI IMX8DXL_MCLK_IN0 3 383 + #define IMX8DXL_MCLK_IN0_LSIO_GPIO0_IO19 IMX8DXL_MCLK_IN0 4 384 + #define IMX8DXL_MCLK_IN0_ADMA_LCDIF_RS IMX8DXL_MCLK_IN0 5 385 + #define IMX8DXL_MCLK_OUT0_ADMA_ACM_MCLK_OUT0 IMX8DXL_MCLK_OUT0 0 386 + #define IMX8DXL_MCLK_OUT0_ADMA_LCDIF_CLK IMX8DXL_MCLK_OUT0 2 387 + #define IMX8DXL_MCLK_OUT0_ADMA_SPI2_SDO IMX8DXL_MCLK_OUT0 3 388 + #define IMX8DXL_MCLK_OUT0_LSIO_GPIO0_IO20 IMX8DXL_MCLK_OUT0 4 389 + #define IMX8DXL_MCLK_OUT0_ADMA_LCDIF_WR_RWN IMX8DXL_MCLK_OUT0 5 390 + #define IMX8DXL_UART1_TX_ADMA_UART1_TX IMX8DXL_UART1_TX 0 391 + #define IMX8DXL_UART1_TX_LSIO_PWM0_OUT IMX8DXL_UART1_TX 1 392 + #define IMX8DXL_UART1_TX_LSIO_GPT0_CAPTURE IMX8DXL_UART1_TX 2 393 + #define IMX8DXL_UART1_TX_LSIO_GPIO0_IO21 IMX8DXL_UART1_TX 4 394 + #define IMX8DXL_UART1_TX_ADMA_LCDIF_D04 IMX8DXL_UART1_TX 5 395 + #define IMX8DXL_UART1_RX_ADMA_UART1_RX IMX8DXL_UART1_RX 0 396 + #define IMX8DXL_UART1_RX_LSIO_PWM1_OUT IMX8DXL_UART1_RX 1 397 + #define IMX8DXL_UART1_RX_LSIO_GPT0_COMPARE IMX8DXL_UART1_RX 2 398 + #define IMX8DXL_UART1_RX_LSIO_GPT1_CLK IMX8DXL_UART1_RX 3 399 + #define IMX8DXL_UART1_RX_LSIO_GPIO0_IO22 IMX8DXL_UART1_RX 4 400 + #define IMX8DXL_UART1_RX_ADMA_LCDIF_D05 IMX8DXL_UART1_RX 5 401 + #define IMX8DXL_UART1_RTS_B_ADMA_UART1_RTS_B IMX8DXL_UART1_RTS_B 0 402 + #define IMX8DXL_UART1_RTS_B_LSIO_PWM2_OUT IMX8DXL_UART1_RTS_B 1 403 + #define IMX8DXL_UART1_RTS_B_ADMA_LCDIF_D16 IMX8DXL_UART1_RTS_B 2 404 + #define IMX8DXL_UART1_RTS_B_LSIO_GPT1_CAPTURE IMX8DXL_UART1_RTS_B 3 405 + #define IMX8DXL_UART1_RTS_B_LSIO_GPT0_CLK IMX8DXL_UART1_RTS_B 4 406 + #define IMX8DXL_UART1_RTS_B_ADMA_LCDIF_D06 IMX8DXL_UART1_RTS_B 5 407 + #define IMX8DXL_UART1_CTS_B_ADMA_UART1_CTS_B IMX8DXL_UART1_CTS_B 0 408 + #define IMX8DXL_UART1_CTS_B_LSIO_PWM3_OUT IMX8DXL_UART1_CTS_B 1 409 + #define IMX8DXL_UART1_CTS_B_ADMA_LCDIF_D17 IMX8DXL_UART1_CTS_B 2 410 + #define IMX8DXL_UART1_CTS_B_LSIO_GPT1_COMPARE IMX8DXL_UART1_CTS_B 3 411 + #define IMX8DXL_UART1_CTS_B_LSIO_GPIO0_IO24 IMX8DXL_UART1_CTS_B 4 412 + #define IMX8DXL_UART1_CTS_B_ADMA_LCDIF_D07 IMX8DXL_UART1_CTS_B 5 413 + #define IMX8DXL_SPI0_SCK_ADMA_SPI0_SCK IMX8DXL_SPI0_SCK 0 414 + #define IMX8DXL_SPI0_SCK_ADMA_SAI0_TXC IMX8DXL_SPI0_SCK 1 415 + #define IMX8DXL_SPI0_SCK_M40_I2C0_SCL IMX8DXL_SPI0_SCK 2 416 + #define IMX8DXL_SPI0_SCK_M40_GPIO0_IO00 IMX8DXL_SPI0_SCK 3 417 + #define IMX8DXL_SPI0_SCK_LSIO_GPIO1_IO04 IMX8DXL_SPI0_SCK 4 418 + #define IMX8DXL_SPI0_SCK_ADMA_LCDIF_D08 IMX8DXL_SPI0_SCK 5 419 + #define IMX8DXL_SPI0_SDI_ADMA_SPI0_SDI IMX8DXL_SPI0_SDI 0 420 + #define IMX8DXL_SPI0_SDI_ADMA_SAI0_TXD IMX8DXL_SPI0_SDI 1 421 + #define IMX8DXL_SPI0_SDI_M40_TPM0_CH0 IMX8DXL_SPI0_SDI 2 422 + #define IMX8DXL_SPI0_SDI_M40_GPIO0_IO02 IMX8DXL_SPI0_SDI 3 423 + #define IMX8DXL_SPI0_SDI_LSIO_GPIO1_IO05 IMX8DXL_SPI0_SDI 4 424 + #define IMX8DXL_SPI0_SDI_ADMA_LCDIF_D09 IMX8DXL_SPI0_SDI 5 425 + #define IMX8DXL_SPI0_SDO_ADMA_SPI0_SDO IMX8DXL_SPI0_SDO 0 426 + #define IMX8DXL_SPI0_SDO_ADMA_SAI0_TXFS IMX8DXL_SPI0_SDO 1 427 + #define IMX8DXL_SPI0_SDO_M40_I2C0_SDA IMX8DXL_SPI0_SDO 2 428 + #define IMX8DXL_SPI0_SDO_M40_GPIO0_IO01 IMX8DXL_SPI0_SDO 3 429 + #define IMX8DXL_SPI0_SDO_LSIO_GPIO1_IO06 IMX8DXL_SPI0_SDO 4 430 + #define IMX8DXL_SPI0_SDO_ADMA_LCDIF_D10 IMX8DXL_SPI0_SDO 5 431 + #define IMX8DXL_SPI0_CS1_ADMA_SPI0_CS1 IMX8DXL_SPI0_CS1 0 432 + #define IMX8DXL_SPI0_CS1_ADMA_SAI0_RXC IMX8DXL_SPI0_CS1 1 433 + #define IMX8DXL_SPI0_CS1_ADMA_SAI1_TXD IMX8DXL_SPI0_CS1 2 434 + #define IMX8DXL_SPI0_CS1_ADMA_LCD_PWM0_OUT IMX8DXL_SPI0_CS1 3 435 + #define IMX8DXL_SPI0_CS1_LSIO_GPIO1_IO07 IMX8DXL_SPI0_CS1 4 436 + #define IMX8DXL_SPI0_CS1_ADMA_LCDIF_D11 IMX8DXL_SPI0_CS1 5 437 + #define IMX8DXL_SPI0_CS0_ADMA_SPI0_CS0 IMX8DXL_SPI0_CS0 0 438 + #define IMX8DXL_SPI0_CS0_ADMA_SAI0_RXD IMX8DXL_SPI0_CS0 1 439 + #define IMX8DXL_SPI0_CS0_M40_TPM0_CH1 IMX8DXL_SPI0_CS0 2 440 + #define IMX8DXL_SPI0_CS0_M40_GPIO0_IO03 IMX8DXL_SPI0_CS0 3 441 + #define IMX8DXL_SPI0_CS0_LSIO_GPIO1_IO08 IMX8DXL_SPI0_CS0 4 442 + #define IMX8DXL_SPI0_CS0_ADMA_LCDIF_D12 IMX8DXL_SPI0_CS0 5 443 + #define IMX8DXL_ADC_IN1_ADMA_ADC_IN1 IMX8DXL_ADC_IN1 0 444 + #define IMX8DXL_ADC_IN1_M40_I2C0_SDA IMX8DXL_ADC_IN1 1 445 + #define IMX8DXL_ADC_IN1_M40_GPIO0_IO01 IMX8DXL_ADC_IN1 2 446 + #define IMX8DXL_ADC_IN1_ADMA_I2C0_SDA IMX8DXL_ADC_IN1 3 447 + #define IMX8DXL_ADC_IN1_LSIO_GPIO1_IO09 IMX8DXL_ADC_IN1 4 448 + #define IMX8DXL_ADC_IN1_ADMA_LCDIF_D13 IMX8DXL_ADC_IN1 5 449 + #define IMX8DXL_ADC_IN0_ADMA_ADC_IN0 IMX8DXL_ADC_IN0 0 450 + #define IMX8DXL_ADC_IN0_M40_I2C0_SCL IMX8DXL_ADC_IN0 1 451 + #define IMX8DXL_ADC_IN0_M40_GPIO0_IO00 IMX8DXL_ADC_IN0 2 452 + #define IMX8DXL_ADC_IN0_ADMA_I2C0_SCL IMX8DXL_ADC_IN0 3 453 + #define IMX8DXL_ADC_IN0_LSIO_GPIO1_IO10 IMX8DXL_ADC_IN0 4 454 + #define IMX8DXL_ADC_IN0_ADMA_LCDIF_D14 IMX8DXL_ADC_IN0 5 455 + #define IMX8DXL_ADC_IN3_ADMA_ADC_IN3 IMX8DXL_ADC_IN3 0 456 + #define IMX8DXL_ADC_IN3_M40_UART0_TX IMX8DXL_ADC_IN3 1 457 + #define IMX8DXL_ADC_IN3_M40_GPIO0_IO03 IMX8DXL_ADC_IN3 2 458 + #define IMX8DXL_ADC_IN3_ADMA_ACM_MCLK_OUT0 IMX8DXL_ADC_IN3 3 459 + #define IMX8DXL_ADC_IN3_LSIO_GPIO1_IO11 IMX8DXL_ADC_IN3 4 460 + #define IMX8DXL_ADC_IN3_ADMA_LCDIF_D15 IMX8DXL_ADC_IN3 5 461 + #define IMX8DXL_ADC_IN2_ADMA_ADC_IN2 IMX8DXL_ADC_IN2 0 462 + #define IMX8DXL_ADC_IN2_M40_UART0_RX IMX8DXL_ADC_IN2 1 463 + #define IMX8DXL_ADC_IN2_M40_GPIO0_IO02 IMX8DXL_ADC_IN2 2 464 + #define IMX8DXL_ADC_IN2_ADMA_ACM_MCLK_IN0 IMX8DXL_ADC_IN2 3 465 + #define IMX8DXL_ADC_IN2_LSIO_GPIO1_IO12 IMX8DXL_ADC_IN2 4 466 + #define IMX8DXL_ADC_IN2_ADMA_LCDIF_D16 IMX8DXL_ADC_IN2 5 467 + #define IMX8DXL_ADC_IN5_ADMA_ADC_IN5 IMX8DXL_ADC_IN5 0 468 + #define IMX8DXL_ADC_IN5_M40_TPM0_CH1 IMX8DXL_ADC_IN5 1 469 + #define IMX8DXL_ADC_IN5_M40_GPIO0_IO05 IMX8DXL_ADC_IN5 2 470 + #define IMX8DXL_ADC_IN5_ADMA_LCDIF_LCDBUSY IMX8DXL_ADC_IN5 3 471 + #define IMX8DXL_ADC_IN5_LSIO_GPIO1_IO13 IMX8DXL_ADC_IN5 4 472 + #define IMX8DXL_ADC_IN5_ADMA_LCDIF_D17 IMX8DXL_ADC_IN5 5 473 + #define IMX8DXL_ADC_IN4_ADMA_ADC_IN4 IMX8DXL_ADC_IN4 0 474 + #define IMX8DXL_ADC_IN4_M40_TPM0_CH0 IMX8DXL_ADC_IN4 1 475 + #define IMX8DXL_ADC_IN4_M40_GPIO0_IO04 IMX8DXL_ADC_IN4 2 476 + #define IMX8DXL_ADC_IN4_ADMA_LCDIF_LCDRESET IMX8DXL_ADC_IN4 3 477 + #define IMX8DXL_ADC_IN4_LSIO_GPIO1_IO14 IMX8DXL_ADC_IN4 4 478 + #define IMX8DXL_FLEXCAN0_RX_ADMA_FLEXCAN0_RX IMX8DXL_FLEXCAN0_RX 0 479 + #define IMX8DXL_FLEXCAN0_RX_ADMA_SAI2_RXC IMX8DXL_FLEXCAN0_RX 1 480 + #define IMX8DXL_FLEXCAN0_RX_ADMA_UART0_RTS_B IMX8DXL_FLEXCAN0_RX 2 481 + #define IMX8DXL_FLEXCAN0_RX_ADMA_SAI1_TXC IMX8DXL_FLEXCAN0_RX 3 482 + #define IMX8DXL_FLEXCAN0_RX_LSIO_GPIO1_IO15 IMX8DXL_FLEXCAN0_RX 4 483 + #define IMX8DXL_FLEXCAN0_RX_LSIO_GPIO6_IO08 IMX8DXL_FLEXCAN0_RX 5 484 + #define IMX8DXL_FLEXCAN0_TX_ADMA_FLEXCAN0_TX IMX8DXL_FLEXCAN0_TX 0 485 + #define IMX8DXL_FLEXCAN0_TX_ADMA_SAI2_RXD IMX8DXL_FLEXCAN0_TX 1 486 + #define IMX8DXL_FLEXCAN0_TX_ADMA_UART0_CTS_B IMX8DXL_FLEXCAN0_TX 2 487 + #define IMX8DXL_FLEXCAN0_TX_ADMA_SAI1_TXFS IMX8DXL_FLEXCAN0_TX 3 488 + #define IMX8DXL_FLEXCAN0_TX_LSIO_GPIO1_IO16 IMX8DXL_FLEXCAN0_TX 4 489 + #define IMX8DXL_FLEXCAN0_TX_LSIO_GPIO6_IO09 IMX8DXL_FLEXCAN0_TX 5 490 + #define IMX8DXL_FLEXCAN1_RX_ADMA_FLEXCAN1_RX IMX8DXL_FLEXCAN1_RX 0 491 + #define IMX8DXL_FLEXCAN1_RX_ADMA_SAI2_RXFS IMX8DXL_FLEXCAN1_RX 1 492 + #define IMX8DXL_FLEXCAN1_RX_ADMA_FTM_CH2 IMX8DXL_FLEXCAN1_RX 2 493 + #define IMX8DXL_FLEXCAN1_RX_ADMA_SAI1_TXD IMX8DXL_FLEXCAN1_RX 3 494 + #define IMX8DXL_FLEXCAN1_RX_LSIO_GPIO1_IO17 IMX8DXL_FLEXCAN1_RX 4 495 + #define IMX8DXL_FLEXCAN1_RX_LSIO_GPIO6_IO10 IMX8DXL_FLEXCAN1_RX 5 496 + #define IMX8DXL_FLEXCAN1_TX_ADMA_FLEXCAN1_TX IMX8DXL_FLEXCAN1_TX 0 497 + #define IMX8DXL_FLEXCAN1_TX_ADMA_SAI3_RXC IMX8DXL_FLEXCAN1_TX 1 498 + #define IMX8DXL_FLEXCAN1_TX_ADMA_DMA0_REQ_IN0 IMX8DXL_FLEXCAN1_TX 2 499 + #define IMX8DXL_FLEXCAN1_TX_ADMA_SAI1_RXD IMX8DXL_FLEXCAN1_TX 3 500 + #define IMX8DXL_FLEXCAN1_TX_LSIO_GPIO1_IO18 IMX8DXL_FLEXCAN1_TX 4 501 + #define IMX8DXL_FLEXCAN1_TX_LSIO_GPIO6_IO11 IMX8DXL_FLEXCAN1_TX 5 502 + #define IMX8DXL_FLEXCAN2_RX_ADMA_FLEXCAN2_RX IMX8DXL_FLEXCAN2_RX 0 503 + #define IMX8DXL_FLEXCAN2_RX_ADMA_SAI3_RXD IMX8DXL_FLEXCAN2_RX 1 504 + #define IMX8DXL_FLEXCAN2_RX_ADMA_UART3_RX IMX8DXL_FLEXCAN2_RX 2 505 + #define IMX8DXL_FLEXCAN2_RX_ADMA_SAI1_RXFS IMX8DXL_FLEXCAN2_RX 3 506 + #define IMX8DXL_FLEXCAN2_RX_LSIO_GPIO1_IO19 IMX8DXL_FLEXCAN2_RX 4 507 + #define IMX8DXL_FLEXCAN2_RX_LSIO_GPIO6_IO12 IMX8DXL_FLEXCAN2_RX 5 508 + #define IMX8DXL_FLEXCAN2_TX_ADMA_FLEXCAN2_TX IMX8DXL_FLEXCAN2_TX 0 509 + #define IMX8DXL_FLEXCAN2_TX_ADMA_SAI3_RXFS IMX8DXL_FLEXCAN2_TX 1 510 + #define IMX8DXL_FLEXCAN2_TX_ADMA_UART3_TX IMX8DXL_FLEXCAN2_TX 2 511 + #define IMX8DXL_FLEXCAN2_TX_ADMA_SAI1_RXC IMX8DXL_FLEXCAN2_TX 3 512 + #define IMX8DXL_FLEXCAN2_TX_LSIO_GPIO1_IO20 IMX8DXL_FLEXCAN2_TX 4 513 + #define IMX8DXL_FLEXCAN2_TX_LSIO_GPIO6_IO13 IMX8DXL_FLEXCAN2_TX 5 514 + #define IMX8DXL_UART0_RX_ADMA_UART0_RX IMX8DXL_UART0_RX 0 515 + #define IMX8DXL_UART0_RX_ADMA_MQS_R IMX8DXL_UART0_RX 1 516 + #define IMX8DXL_UART0_RX_ADMA_FLEXCAN0_RX IMX8DXL_UART0_RX 2 517 + #define IMX8DXL_UART0_RX_SCU_UART0_RX IMX8DXL_UART0_RX 3 518 + #define IMX8DXL_UART0_RX_LSIO_GPIO1_IO21 IMX8DXL_UART0_RX 4 519 + #define IMX8DXL_UART0_RX_LSIO_GPIO6_IO14 IMX8DXL_UART0_RX 5 520 + #define IMX8DXL_UART0_TX_ADMA_UART0_TX IMX8DXL_UART0_TX 0 521 + #define IMX8DXL_UART0_TX_ADMA_MQS_L IMX8DXL_UART0_TX 1 522 + #define IMX8DXL_UART0_TX_ADMA_FLEXCAN0_TX IMX8DXL_UART0_TX 2 523 + #define IMX8DXL_UART0_TX_SCU_UART0_TX IMX8DXL_UART0_TX 3 524 + #define IMX8DXL_UART0_TX_LSIO_GPIO1_IO22 IMX8DXL_UART0_TX 4 525 + #define IMX8DXL_UART0_TX_LSIO_GPIO6_IO15 IMX8DXL_UART0_TX 5 526 + #define IMX8DXL_UART2_TX_ADMA_UART2_TX IMX8DXL_UART2_TX 0 527 + #define IMX8DXL_UART2_TX_ADMA_FTM_CH1 IMX8DXL_UART2_TX 1 528 + #define IMX8DXL_UART2_TX_ADMA_FLEXCAN1_TX IMX8DXL_UART2_TX 2 529 + #define IMX8DXL_UART2_TX_LSIO_GPIO1_IO23 IMX8DXL_UART2_TX 4 530 + #define IMX8DXL_UART2_TX_LSIO_GPIO6_IO16 IMX8DXL_UART2_TX 5 531 + #define IMX8DXL_UART2_RX_ADMA_UART2_RX IMX8DXL_UART2_RX 0 532 + #define IMX8DXL_UART2_RX_ADMA_FTM_CH0 IMX8DXL_UART2_RX 1 533 + #define IMX8DXL_UART2_RX_ADMA_FLEXCAN1_RX IMX8DXL_UART2_RX 2 534 + #define IMX8DXL_UART2_RX_LSIO_GPIO1_IO24 IMX8DXL_UART2_RX 4 535 + #define IMX8DXL_UART2_RX_LSIO_GPIO6_IO17 IMX8DXL_UART2_RX 5 536 + #define IMX8DXL_JTAG_TRST_B_SCU_JTAG_TRST_B IMX8DXL_JTAG_TRST_B 0 537 + #define IMX8DXL_JTAG_TRST_B_SCU_WDOG0_WDOG_OUT IMX8DXL_JTAG_TRST_B 1 538 + #define IMX8DXL_PMIC_I2C_SCL_SCU_PMIC_I2C_SCL IMX8DXL_PMIC_I2C_SCL 0 539 + #define IMX8DXL_PMIC_I2C_SCL_SCU_GPIO0_IOXX_PMIC_A35_ON IMX8DXL_PMIC_I2C_SCL 1 540 + #define IMX8DXL_PMIC_I2C_SCL_LSIO_GPIO2_IO01 IMX8DXL_PMIC_I2C_SCL 4 541 + #define IMX8DXL_PMIC_I2C_SDA_SCU_PMIC_I2C_SDA IMX8DXL_PMIC_I2C_SDA 0 542 + #define IMX8DXL_PMIC_I2C_SDA_SCU_GPIO0_IOXX_PMIC_GPU_ON IMX8DXL_PMIC_I2C_SDA 1 543 + #define IMX8DXL_PMIC_I2C_SDA_LSIO_GPIO2_IO02 IMX8DXL_PMIC_I2C_SDA 4 544 + #define IMX8DXL_PMIC_INT_B_SCU_DSC_PMIC_INT_B IMX8DXL_PMIC_INT_B 0 545 + #define IMX8DXL_SCU_GPIO0_00_SCU_GPIO0_IO00 IMX8DXL_SCU_GPIO0_00 0 546 + #define IMX8DXL_SCU_GPIO0_00_SCU_UART0_RX IMX8DXL_SCU_GPIO0_00 1 547 + #define IMX8DXL_SCU_GPIO0_00_M40_UART0_RX IMX8DXL_SCU_GPIO0_00 2 548 + #define IMX8DXL_SCU_GPIO0_00_ADMA_UART3_RX IMX8DXL_SCU_GPIO0_00 3 549 + #define IMX8DXL_SCU_GPIO0_00_LSIO_GPIO2_IO03 IMX8DXL_SCU_GPIO0_00 4 550 + #define IMX8DXL_SCU_GPIO0_01_SCU_GPIO0_IO01 IMX8DXL_SCU_GPIO0_01 0 551 + #define IMX8DXL_SCU_GPIO0_01_SCU_UART0_TX IMX8DXL_SCU_GPIO0_01 1 552 + #define IMX8DXL_SCU_GPIO0_01_M40_UART0_TX IMX8DXL_SCU_GPIO0_01 2 553 + #define IMX8DXL_SCU_GPIO0_01_ADMA_UART3_TX IMX8DXL_SCU_GPIO0_01 3 554 + #define IMX8DXL_SCU_GPIO0_01_SCU_WDOG0_WDOG_OUT IMX8DXL_SCU_GPIO0_01 4 555 + #define IMX8DXL_SCU_PMIC_STANDBY_SCU_DSC_PMIC_STANDBY IMX8DXL_SCU_PMIC_STANDBY 0 556 + #define IMX8DXL_SCU_BOOT_MODE1_SCU_DSC_BOOT_MODE1 IMX8DXL_SCU_BOOT_MODE1 0 557 + #define IMX8DXL_SCU_BOOT_MODE0_SCU_DSC_BOOT_MODE0 IMX8DXL_SCU_BOOT_MODE0 0 558 + #define IMX8DXL_SCU_BOOT_MODE2_SCU_DSC_BOOT_MODE2 IMX8DXL_SCU_BOOT_MODE2 0 559 + #define IMX8DXL_SCU_BOOT_MODE2_SCU_DSC_RTC_CLOCK_OUTPUT_32K IMX8DXL_SCU_BOOT_MODE2 1 560 + #define IMX8DXL_SNVS_TAMPER_OUT1_LSIO_GPIO2_IO05_IN IMX8DXL_SNVS_TAMPER_OUT1 4 561 + #define IMX8DXL_SNVS_TAMPER_OUT1_LSIO_GPIO6_IO19_IN IMX8DXL_SNVS_TAMPER_OUT1 5 562 + #define IMX8DXL_SNVS_TAMPER_OUT2_LSIO_GPIO2_IO06_IN IMX8DXL_SNVS_TAMPER_OUT2 4 563 + #define IMX8DXL_SNVS_TAMPER_OUT2_LSIO_GPIO6_IO20_IN IMX8DXL_SNVS_TAMPER_OUT2 5 564 + #define IMX8DXL_SNVS_TAMPER_OUT3_ADMA_SAI2_RXC IMX8DXL_SNVS_TAMPER_OUT3 2 565 + #define IMX8DXL_SNVS_TAMPER_OUT3_LSIO_GPIO2_IO07_IN IMX8DXL_SNVS_TAMPER_OUT3 4 566 + #define IMX8DXL_SNVS_TAMPER_OUT3_LSIO_GPIO6_IO21_IN IMX8DXL_SNVS_TAMPER_OUT3 5 567 + #define IMX8DXL_SNVS_TAMPER_OUT4_ADMA_SAI2_RXD IMX8DXL_SNVS_TAMPER_OUT4 2 568 + #define IMX8DXL_SNVS_TAMPER_OUT4_LSIO_GPIO2_IO08_IN IMX8DXL_SNVS_TAMPER_OUT4 4 569 + #define IMX8DXL_SNVS_TAMPER_OUT4_LSIO_GPIO6_IO22_IN IMX8DXL_SNVS_TAMPER_OUT4 5 570 + #define IMX8DXL_SNVS_TAMPER_IN0_ADMA_SAI2_RXFS IMX8DXL_SNVS_TAMPER_IN0 2 571 + #define IMX8DXL_SNVS_TAMPER_IN0_LSIO_GPIO2_IO09_IN IMX8DXL_SNVS_TAMPER_IN0 4 572 + #define IMX8DXL_SNVS_TAMPER_IN0_LSIO_GPIO6_IO23_IN IMX8DXL_SNVS_TAMPER_IN0 5 573 + #define IMX8DXL_SNVS_TAMPER_IN1_ADMA_SAI3_RXC IMX8DXL_SNVS_TAMPER_IN1 2 574 + #define IMX8DXL_SNVS_TAMPER_IN1_LSIO_GPIO2_IO10_IN IMX8DXL_SNVS_TAMPER_IN1 4 575 + #define IMX8DXL_SNVS_TAMPER_IN1_LSIO_GPIO6_IO24_IN IMX8DXL_SNVS_TAMPER_IN1 5 576 + #define IMX8DXL_SNVS_TAMPER_IN2_ADMA_SAI3_RXD IMX8DXL_SNVS_TAMPER_IN2 2 577 + #define IMX8DXL_SNVS_TAMPER_IN2_LSIO_GPIO2_IO11_IN IMX8DXL_SNVS_TAMPER_IN2 4 578 + #define IMX8DXL_SNVS_TAMPER_IN2_LSIO_GPIO6_IO25_IN IMX8DXL_SNVS_TAMPER_IN2 5 579 + #define IMX8DXL_SNVS_TAMPER_IN3_ADMA_SAI3_RXFS IMX8DXL_SNVS_TAMPER_IN3 2 580 + #define IMX8DXL_SNVS_TAMPER_IN3_LSIO_GPIO2_IO12_IN IMX8DXL_SNVS_TAMPER_IN3 4 581 + #define IMX8DXL_SNVS_TAMPER_IN3_LSIO_GPIO6_IO26_IN IMX8DXL_SNVS_TAMPER_IN3 5 582 + #define IMX8DXL_SPI1_SCK_ADMA_I2C2_SDA IMX8DXL_SPI1_SCK 2 583 + #define IMX8DXL_SPI1_SCK_ADMA_SPI1_SCK IMX8DXL_SPI1_SCK 3 584 + #define IMX8DXL_SPI1_SCK_LSIO_GPIO3_IO00 IMX8DXL_SPI1_SCK 4 585 + #define IMX8DXL_SPI1_SDO_ADMA_I2C2_SCL IMX8DXL_SPI1_SDO 2 586 + #define IMX8DXL_SPI1_SDO_ADMA_SPI1_SDO IMX8DXL_SPI1_SDO 3 587 + #define IMX8DXL_SPI1_SDO_LSIO_GPIO3_IO01 IMX8DXL_SPI1_SDO 4 588 + #define IMX8DXL_SPI1_SDI_ADMA_I2C3_SCL IMX8DXL_SPI1_SDI 2 589 + #define IMX8DXL_SPI1_SDI_ADMA_SPI1_SDI IMX8DXL_SPI1_SDI 3 590 + #define IMX8DXL_SPI1_SDI_LSIO_GPIO3_IO02 IMX8DXL_SPI1_SDI 4 591 + #define IMX8DXL_SPI1_CS0_ADMA_I2C3_SDA IMX8DXL_SPI1_CS0 2 592 + #define IMX8DXL_SPI1_CS0_ADMA_SPI1_CS0 IMX8DXL_SPI1_CS0 3 593 + #define IMX8DXL_SPI1_CS0_LSIO_GPIO3_IO03 IMX8DXL_SPI1_CS0 4 594 + #define IMX8DXL_QSPI0A_DATA1_LSIO_QSPI0A_DATA1 IMX8DXL_QSPI0A_DATA1 0 595 + #define IMX8DXL_QSPI0A_DATA1_LSIO_GPIO3_IO10 IMX8DXL_QSPI0A_DATA1 4 596 + #define IMX8DXL_QSPI0A_DATA0_LSIO_QSPI0A_DATA0 IMX8DXL_QSPI0A_DATA0 0 597 + #define IMX8DXL_QSPI0A_DATA0_LSIO_GPIO3_IO09 IMX8DXL_QSPI0A_DATA0 4 598 + #define IMX8DXL_QSPI0A_DATA3_LSIO_QSPI0A_DATA3 IMX8DXL_QSPI0A_DATA3 0 599 + #define IMX8DXL_QSPI0A_DATA3_LSIO_GPIO3_IO12 IMX8DXL_QSPI0A_DATA3 4 600 + #define IMX8DXL_QSPI0A_DATA2_LSIO_QSPI0A_DATA2 IMX8DXL_QSPI0A_DATA2 0 601 + #define IMX8DXL_QSPI0A_DATA2_LSIO_GPIO3_IO11 IMX8DXL_QSPI0A_DATA2 4 602 + #define IMX8DXL_QSPI0A_SS0_B_LSIO_QSPI0A_SS0_B IMX8DXL_QSPI0A_SS0_B 0 603 + #define IMX8DXL_QSPI0A_SS0_B_LSIO_GPIO3_IO14 IMX8DXL_QSPI0A_SS0_B 4 604 + #define IMX8DXL_QSPI0A_DQS_LSIO_QSPI0A_DQS IMX8DXL_QSPI0A_DQS 0 605 + #define IMX8DXL_QSPI0A_DQS_LSIO_GPIO3_IO13 IMX8DXL_QSPI0A_DQS 4 606 + #define IMX8DXL_QSPI0A_SCLK_LSIO_QSPI0A_SCLK IMX8DXL_QSPI0A_SCLK 0 607 + #define IMX8DXL_QSPI0A_SCLK_LSIO_GPIO3_IO16 IMX8DXL_QSPI0A_SCLK 4 608 + #define IMX8DXL_QSPI0B_SCLK_LSIO_QSPI0B_SCLK IMX8DXL_QSPI0B_SCLK 0 609 + #define IMX8DXL_QSPI0B_SCLK_LSIO_GPIO3_IO17 IMX8DXL_QSPI0B_SCLK 4 610 + #define IMX8DXL_QSPI0B_DQS_LSIO_QSPI0B_DQS IMX8DXL_QSPI0B_DQS 0 611 + #define IMX8DXL_QSPI0B_DQS_LSIO_GPIO3_IO22 IMX8DXL_QSPI0B_DQS 4 612 + #define IMX8DXL_QSPI0B_DATA1_LSIO_QSPI0B_DATA1 IMX8DXL_QSPI0B_DATA1 0 613 + #define IMX8DXL_QSPI0B_DATA1_LSIO_GPIO3_IO19 IMX8DXL_QSPI0B_DATA1 4 614 + #define IMX8DXL_QSPI0B_DATA0_LSIO_QSPI0B_DATA0 IMX8DXL_QSPI0B_DATA0 0 615 + #define IMX8DXL_QSPI0B_DATA0_LSIO_GPIO3_IO18 IMX8DXL_QSPI0B_DATA0 4 616 + #define IMX8DXL_QSPI0B_DATA3_LSIO_QSPI0B_DATA3 IMX8DXL_QSPI0B_DATA3 0 617 + #define IMX8DXL_QSPI0B_DATA3_LSIO_GPIO3_IO21 IMX8DXL_QSPI0B_DATA3 4 618 + #define IMX8DXL_QSPI0B_DATA2_LSIO_QSPI0B_DATA2 IMX8DXL_QSPI0B_DATA2 0 619 + #define IMX8DXL_QSPI0B_DATA2_LSIO_GPIO3_IO20 IMX8DXL_QSPI0B_DATA2 4 620 + #define IMX8DXL_QSPI0B_SS0_B_LSIO_QSPI0B_SS0_B IMX8DXL_QSPI0B_SS0_B 0 621 + #define IMX8DXL_QSPI0B_SS0_B_LSIO_GPIO3_IO23 IMX8DXL_QSPI0B_SS0_B 4 622 + #define IMX8DXL_QSPI0B_SS0_B_LSIO_QSPI0A_SS1_B IMX8DXL_QSPI0B_SS0_B 5 623 + 624 + #define IMX8DXL_COMP_CTL_GPIO_1V8_3V3_PCIESEP_PAD IMX8DXL_COMP_CTL_GPIO_1V8_3V3_PCIESEP 0 625 + #define IMX8DXL_COMP_CTL_GPIO_3V3_USB3IO_PAD IMX8DXL_COMP_CTL_GPIO_3V3_USB3IO 0 626 + #define IMX8DXL_COMP_CTL_GPIO_1V8_3V3_SD1FIX0_PAD IMX8DXL_COMP_CTL_GPIO_1V8_3V3_SD1FIX0 0 627 + #define IMX8DXL_COMP_CTL_GPIO_1V8_3V3_VSELSEP_PAD IMX8DXL_COMP_CTL_GPIO_1V8_3V3_VSELSEP 0 628 + #define IMX8DXL_COMP_CTL_GPIO_1V8_3V3_ENET_ENETB0_PAD IMX8DXL_COMP_CTL_GPIO_1V8_3V3_ENET_ENETB0 0 629 + #define IMX8DXL_COMP_CTL_GPIO_1V8_3V3_ENET_ENETB1_PAD IMX8DXL_COMP_CTL_GPIO_1V8_3V3_ENET_ENETB1 0 630 + #define IMX8DXL_COMP_CTL_GPIO_1V8_3V3_GPIOCT_PAD IMX8DXL_COMP_CTL_GPIO_1V8_3V3_GPIOCT 0 631 + #define IMX8DXL_COMP_CTL_GPIO_1V8_3V3_GPIORHB_PAD IMX8DXL_COMP_CTL_GPIO_1V8_3V3_GPIORHB 0 632 + #define IMX8DXL_COMP_CTL_GPIO_1V8_3V3_GPIORHK_PAD IMX8DXL_COMP_CTL_GPIO_1V8_3V3_GPIORHK 0 633 + #define IMX8DXL_COMP_CTL_GPIO_1V8_3V3_GPIORHT_PAD IMX8DXL_COMP_CTL_GPIO_1V8_3V3_GPIORHT 0 634 + #define IMX8DXL_COMP_CTL_GPIO_1V8_3V3_GPIOLH_PAD IMX8DXL_COMP_CTL_GPIO_1V8_3V3_GPIOLH 0 635 + #define IMX8DXL_COMP_CTL_GPIO_1V8_3V3_GPIORHD_PAD IMX8DXL_COMP_CTL_GPIO_1V8_3V3_GPIORHD 0 636 + #define IMX8DXL_COMP_CTL_GPIO_1V8_3V3_QSPI0A_PAD IMX8DXL_COMP_CTL_GPIO_1V8_3V3_QSPI0A 0 637 + #define IMX8DXL_COMP_CTL_GPIO_1V8_3V3_QSPI0B_PAD IMX8DXL_COMP_CTL_GPIO_1V8_3V3_QSPI0B 0 638 + 639 + #endif
-18
include/linux/spi/mcp23s08.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 */ 2 - struct mcp23s08_platform_data { 3 - /* For mcp23s08, up to 4 slaves (numbered 0..3) can share one SPI 4 - * chipselect, each providing 1 gpio_chip instance with 8 gpios. 5 - * For mpc23s17, up to 8 slaves (numbered 0..7) can share one SPI 6 - * chipselect, each providing 1 gpio_chip (port A + port B) with 7 - * 16 gpios. 8 - */ 9 - u32 spi_present_mask; 10 - 11 - /* "base" is the number of the first GPIO or -1 for dynamic 12 - * assignment. If there are gaps in chip addressing the GPIO 13 - * numbers are sequential .. so for example if only slaves 0 14 - * and 3 are present, their GPIOs range from base to base+15 15 - * (or base+31 for s17 variant). 16 - */ 17 - unsigned base; 18 - };