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

Merge tag 'pinctrl-v4.16-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 v4.16 kernel cycle.
Like with GPIO it is actually a bit calm this time.

Core changes:

- After lengthy discussions and partly due to my ignorance, we have
merged a patch making pinctrl_force_default() and
pinctrl_force_sleep() reprogram the states into the hardware of any
hogged pins, even if they are already in the desired state.

This only apply to hogged pins since groups of pins owned by
drivers need to be managed by each driver, lest they could not do
things like runtime PM and put pins to sleeping state even if the
system as a whole is not in sleep.

New drivers:

- New driver for the Microsemi Ocelot SoC. This is used in ethernet
switches.

- The X-Powers AXP209 GPIO driver was extended to also deal with pin
control and moved over from the GPIO subsystem. This circuit is a
mixed-mode integrated circuit which is part of AllWinner designs.

- New subdriver for the Qualcomm MSM8998 SoC, core of a high end
mobile devices (phones) chipset.

- New subdriver for the ST Microelectronics STM32MP157 MPU and
STM32F769 MCU from the STM32 family.

- New subdriver for the MediaTek MT7622 SoC. This is used for
routers, repeater, gateways and such network infrastructure.

- New subdriver for the NXP (former Freescale) i.MX 6ULL. This SoC
has multimedia features and target "smart devices", I guess in-car
entertainment, in-flight entertainment, industrial control panels
etc.

General improvements:

- Incremental improvements on the SH-PFC subdrivers for things like
the CAN bus.

- Enable the glitch filter on Baytrail GPIOs used for interrupts.

- Proper handling of pins to GPIO ranges on the Semtec SX150X

- An IRQ setup ordering fix on MCP23S08.

- A good set of janitorial coding style fixes"

* tag 'pinctrl-v4.16-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: (102 commits)
pinctrl: mcp23s08: fix irq setup order
pinctrl: Forward declare struct device
pinctrl: sunxi: Use of_clk_get_parent_count() instead of open coding
pinctrl: stm32: add STM32F769 MCU support
pinctrl: sx150x: Add a static gpio/pinctrl pin range mapping
pinctrl: sx150x: Register pinctrl before adding the gpiochip
pinctrl: sx150x: Unregister the pinctrl on release
pinctrl: ingenic: Remove redundant dev_err call in ingenic_pinctrl_probe()
pinctrl: sprd: Use seq_putc() in sprd_pinconf_group_dbg_show()
pinctrl: pinmux: Use seq_putc() in pinmux_pins_show()
pinctrl: abx500: Use seq_putc() in abx500_gpio_dbg_show()
pinctrl: mediatek: mt7622: align error handling of mtk_hw_get_value call
pinctrl: mediatek: mt7622: fix potential uninitialized value being returned
pinctrl: uniphier: refactor drive strength get/set functions
pinctrl: imx7ulp: constify struct imx_cfg_params_decode
pinctrl: imx: constify struct imx_pinctrl_soc_info
pinctrl: imx7d: simplify imx7d_pinctrl_probe
pinctrl: imx: use struct imx_pinctrl_soc_info as a const
pinctrl: sunxi-pinctrl: fix pin funtion can not be match correctly.
pinctrl: qcom: Add msm8998 pinctrl driver
...

+13578 -751
+3
Documentation/devicetree/bindings/pinctrl/cortina,gemini-pinctrl.txt
··· 17 17 18 18 Supported configurations: 19 19 - skew-delay is supported on the Ethernet pins 20 + - drive-strength with 4, 8, 12 or 16 mA as argument is supported for 21 + entire groups on the groups "idegrp", "gmii_gmac0_grp", "gmii_gmac1_grp" 22 + and "pcigrp". 20 23 21 24 Example: 22 25
+2 -1
Documentation/devicetree/bindings/pinctrl/fsl,imx6ul-pinctrl.txt
··· 4 4 and usage. 5 5 6 6 Required properties: 7 - - compatible: "fsl,imx6ul-iomuxc" 7 + - compatible: "fsl,imx6ul-iomuxc" for main IOMUX controller or 8 + "fsl,imx6ull-iomuxc-snvs" for i.MX 6ULL's SNVS IOMUX controller. 8 9 - fsl,pins: each entry consists of 6 integers and represents the mux and config 9 10 setting for one pin. The first 5 integers <mux_reg conf_reg input_reg mux_val 10 11 input_val> are specified using a PIN_FUNC_ID macro, which can be found in
+39
Documentation/devicetree/bindings/pinctrl/mscc,ocelot-pinctrl.txt
··· 1 + Microsemi Ocelot pin controller Device Tree Bindings 2 + ---------------------------------------------------- 3 + 4 + Required properties: 5 + - compatible : Should be "mscc,ocelot-pinctrl" 6 + - reg : Address and length of the register set for the device 7 + - gpio-controller : Indicates this device is a GPIO controller 8 + - #gpio-cells : Must be 2. 9 + The first cell is the pin number and the 10 + second cell specifies GPIO flags, as defined in 11 + <dt-bindings/gpio/gpio.h>. 12 + - gpio-ranges : Range of pins managed by the GPIO controller. 13 + 14 + 15 + The ocelot-pinctrl driver uses the generic pin multiplexing and generic pin 16 + configuration documented in pinctrl-bindings.txt. 17 + 18 + The following generic properties are supported: 19 + - function 20 + - pins 21 + 22 + Example: 23 + gpio: pinctrl@71070034 { 24 + compatible = "mscc,ocelot-pinctrl"; 25 + reg = <0x71070034 0x28>; 26 + gpio-controller; 27 + #gpio-cells = <2>; 28 + gpio-ranges = <&gpio 0 0 22>; 29 + 30 + uart_pins: uart-pins { 31 + pins = "GPIO_6", "GPIO_7"; 32 + function = "uart"; 33 + }; 34 + 35 + uart2_pins: uart2-pins { 36 + pins = "GPIO_12", "GPIO_13"; 37 + function = "uart2"; 38 + }; 39 + };
+351
Documentation/devicetree/bindings/pinctrl/pinctrl-mt7622.txt
··· 1 + == MediaTek MT7622 pinctrl controller == 2 + 3 + Required properties for the root node: 4 + - compatible: Should be one of the following 5 + "mediatek,mt7622-pinctrl" for MT7622 SoC 6 + - reg: offset and length of the pinctrl space 7 + 8 + - gpio-controller: Marks the device node as a GPIO controller. 9 + - #gpio-cells: Should be two. The first cell is the pin number and the 10 + second is the GPIO flags. 11 + 12 + Please refer to pinctrl-bindings.txt in this directory for details of the 13 + common pinctrl bindings used by client devices, including the meaning of the 14 + phrase "pin configuration node". 15 + 16 + MT7622 pin configuration nodes act as a container for an arbitrary number of 17 + subnodes. Each of these subnodes represents some desired configuration for a 18 + pin, a group, or a list of pins or groups. This configuration can include the 19 + mux function to select on those pin(s)/group(s), and various pin configuration 20 + parameters, such as pull-up, slew rate, etc. 21 + 22 + We support 2 types of configuration nodes. Those nodes can be either pinmux 23 + nodes or pinconf nodes. Each configuration node can consist of multiple nodes 24 + describing the pinmux and pinconf options. 25 + 26 + The name of each subnode doesn't matter as long as it is unique; all subnodes 27 + should be enumerated and processed purely based on their content. 28 + 29 + == pinmux nodes content == 30 + 31 + The following generic properties as defined in pinctrl-bindings.txt are valid 32 + to specify in a pinmux subnode: 33 + 34 + Required properties are: 35 + - groups: An array of strings. Each string contains the name of a group. 36 + Valid values for these names are listed below. 37 + - function: A string containing the name of the function to mux to the 38 + group. Valid values for function names are listed below. 39 + 40 + == pinconf nodes content == 41 + 42 + The following generic properties as defined in pinctrl-bindings.txt are valid 43 + to specify in a pinconf subnode: 44 + 45 + Required properties are: 46 + - pins: An array of strings. Each string contains the name of a pin. 47 + Valid values for these names are listed below. 48 + - groups: An array of strings. Each string contains the name of a group. 49 + Valid values for these names are listed below. 50 + 51 + Optional properies are: 52 + bias-disable, bias-pull, bias-pull-down, input-enable, 53 + input-schmitt-enable, input-schmitt-disable, output-enable 54 + output-low, output-high, drive-strength, slew-rate 55 + 56 + Valid arguments for 'slew-rate' are '0' for no slew rate controlled and '1' for 57 + slower slew rate respectively. 58 + Valid arguments for 'drive-strength', 4, 8, 12, or 16 in mA. 59 + 60 + The following specific properties as defined are valid to specify in a pinconf 61 + subnode: 62 + 63 + Optional properties are: 64 + - mediatek,tdsel: An integer describing the steps for output level shifter duty 65 + cycle when asserted (high pulse width adjustment). Valid arguments are from 0 66 + to 15. 67 + - mediatek,rdsel: An integer describing the steps for input level shifter duty 68 + cycle when asserted (high pulse width adjustment). Valid arguments are from 0 69 + to 63. 70 + 71 + == Valid values for pins, function and groups on MT7622 == 72 + 73 + Valid values for pins are: 74 + pins can be referenced via the pin names as the below table shown and the 75 + related physical number is also put ahead of those names which helps cross 76 + references to pins between groups to know whether pins assignment conflict 77 + happens among devices try to acquire those available pins. 78 + 79 + Pin #: Valid values for pins 80 + ----------------------------- 81 + PIN 0: "GPIO_A" 82 + PIN 1: "I2S1_IN" 83 + PIN 2: "I2S1_OUT" 84 + PIN 3: "I2S_BCLK" 85 + PIN 4: "I2S_WS" 86 + PIN 5: "I2S_MCLK" 87 + PIN 6: "TXD0" 88 + PIN 7: "RXD0" 89 + PIN 8: "SPI_WP" 90 + PIN 9: "SPI_HOLD" 91 + PIN 10: "SPI_CLK" 92 + PIN 11: "SPI_MOSI" 93 + PIN 12: "SPI_MISO" 94 + PIN 13: "SPI_CS" 95 + PIN 14: "I2C_SDA" 96 + PIN 15: "I2C_SCL" 97 + PIN 16: "I2S2_IN" 98 + PIN 17: "I2S3_IN" 99 + PIN 18: "I2S4_IN" 100 + PIN 19: "I2S2_OUT" 101 + PIN 20: "I2S3_OUT" 102 + PIN 21: "I2S4_OUT" 103 + PIN 22: "GPIO_B" 104 + PIN 23: "MDC" 105 + PIN 24: "MDIO" 106 + PIN 25: "G2_TXD0" 107 + PIN 26: "G2_TXD1" 108 + PIN 27: "G2_TXD2" 109 + PIN 28: "G2_TXD3" 110 + PIN 29: "G2_TXEN" 111 + PIN 30: "G2_TXC" 112 + PIN 31: "G2_RXD0" 113 + PIN 32: "G2_RXD1" 114 + PIN 33: "G2_RXD2" 115 + PIN 34: "G2_RXD3" 116 + PIN 35: "G2_RXDV" 117 + PIN 36: "G2_RXC" 118 + PIN 37: "NCEB" 119 + PIN 38: "NWEB" 120 + PIN 39: "NREB" 121 + PIN 40: "NDL4" 122 + PIN 41: "NDL5" 123 + PIN 42: "NDL6" 124 + PIN 43: "NDL7" 125 + PIN 44: "NRB" 126 + PIN 45: "NCLE" 127 + PIN 46: "NALE" 128 + PIN 47: "NDL0" 129 + PIN 48: "NDL1" 130 + PIN 49: "NDL2" 131 + PIN 50: "NDL3" 132 + PIN 51: "MDI_TP_P0" 133 + PIN 52: "MDI_TN_P0" 134 + PIN 53: "MDI_RP_P0" 135 + PIN 54: "MDI_RN_P0" 136 + PIN 55: "MDI_TP_P1" 137 + PIN 56: "MDI_TN_P1" 138 + PIN 57: "MDI_RP_P1" 139 + PIN 58: "MDI_RN_P1" 140 + PIN 59: "MDI_RP_P2" 141 + PIN 60: "MDI_RN_P2" 142 + PIN 61: "MDI_TP_P2" 143 + PIN 62: "MDI_TN_P2" 144 + PIN 63: "MDI_TP_P3" 145 + PIN 64: "MDI_TN_P3" 146 + PIN 65: "MDI_RP_P3" 147 + PIN 66: "MDI_RN_P3" 148 + PIN 67: "MDI_RP_P4" 149 + PIN 68: "MDI_RN_P4" 150 + PIN 69: "MDI_TP_P4" 151 + PIN 70: "MDI_TN_P4" 152 + PIN 71: "PMIC_SCL" 153 + PIN 72: "PMIC_SDA" 154 + PIN 73: "SPIC1_CLK" 155 + PIN 74: "SPIC1_MOSI" 156 + PIN 75: "SPIC1_MISO" 157 + PIN 76: "SPIC1_CS" 158 + PIN 77: "GPIO_D" 159 + PIN 78: "WATCHDOG" 160 + PIN 79: "RTS3_N" 161 + PIN 80: "CTS3_N" 162 + PIN 81: "TXD3" 163 + PIN 82: "RXD3" 164 + PIN 83: "PERST0_N" 165 + PIN 84: "PERST1_N" 166 + PIN 85: "WLED_N" 167 + PIN 86: "EPHY_LED0_N" 168 + PIN 87: "AUXIN0" 169 + PIN 88: "AUXIN1" 170 + PIN 89: "AUXIN2" 171 + PIN 90: "AUXIN3" 172 + PIN 91: "TXD4" 173 + PIN 92: "RXD4" 174 + PIN 93: "RTS4_N" 175 + PIN 94: "CST4_N" 176 + PIN 95: "PWM1" 177 + PIN 96: "PWM2" 178 + PIN 97: "PWM3" 179 + PIN 98: "PWM4" 180 + PIN 99: "PWM5" 181 + PIN 100: "PWM6" 182 + PIN 101: "PWM7" 183 + PIN 102: "GPIO_E" 184 + 185 + Valid values for function are: 186 + "emmc", "eth", "i2c", "i2s", "ir", "led", "flash", "pcie", 187 + "pmic", "pwm", "sd", "spi", "tdm", "uart", "watchdog" 188 + 189 + Valid values for groups are: 190 + additional data is put followingly with valid value allowing us to know which 191 + applicable function and which relevant pins (in pin#) are able applied for that 192 + group. 193 + 194 + Valid value function pins (in pin#) 195 + ------------------------------------------------------------------------- 196 + "emmc" "emmc" 40, 41, 42, 43, 44, 45, 197 + 47, 48, 49, 50 198 + "emmc_rst" "emmc" 37 199 + "esw" "eth" 51, 52, 53, 54, 55, 56, 200 + 57, 58, 59, 60, 61, 62, 201 + 63, 64, 65, 66, 67, 68, 202 + 69, 70 203 + "esw_p0_p1" "eth" 51, 52, 53, 54, 55, 56, 204 + 57, 58 205 + "esw_p2_p3_p4" "eth" 59, 60, 61, 62, 63, 64, 206 + 65, 66, 67, 68, 69, 70 207 + "rgmii_via_esw" "eth" 59, 60, 61, 62, 63, 64, 208 + 65, 66, 67, 68, 69, 70 209 + "rgmii_via_gmac1" "eth" 59, 60, 61, 62, 63, 64, 210 + 65, 66, 67, 68, 69, 70 211 + "rgmii_via_gmac2" "eth" 25, 26, 27, 28, 29, 30, 212 + 31, 32, 33, 34, 35, 36 213 + "mdc_mdio" "eth" 23, 24 214 + "i2c0" "i2c" 14, 15 215 + "i2c1_0" "i2c" 55, 56 216 + "i2c1_1" "i2c" 73, 74 217 + "i2c1_2" "i2c" 87, 88 218 + "i2c2_0" "i2c" 57, 58 219 + "i2c2_1" "i2c" 75, 76 220 + "i2c2_2" "i2c" 89, 90 221 + "i2s_in_mclk_bclk_ws" "i2s" 3, 4, 5 222 + "i2s1_in_data" "i2s" 1 223 + "i2s2_in_data" "i2s" 16 224 + "i2s3_in_data" "i2s" 17 225 + "i2s4_in_data" "i2s" 18 226 + "i2s_out_mclk_bclk_ws" "i2s" 3, 4, 5 227 + "i2s1_out_data" "i2s" 2 228 + "i2s2_out_data" "i2s" 19 229 + "i2s3_out_data" "i2s" 20 230 + "i2s4_out_data" "i2s" 21 231 + "ir_0_tx" "ir" 16 232 + "ir_1_tx" "ir" 59 233 + "ir_2_tx" "ir" 99 234 + "ir_0_rx" "ir" 17 235 + "ir_1_rx" "ir" 60 236 + "ir_2_rx" "ir" 100 237 + "ephy_leds" "led" 86, 91, 92, 93, 94 238 + "ephy0_led" "led" 86 239 + "ephy1_led" "led" 91 240 + "ephy2_led" "led" 92 241 + "ephy3_led" "led" 93 242 + "ephy4_led" "led" 94 243 + "wled" "led" 85 244 + "par_nand" "flash" 37, 38, 39, 40, 41, 42, 245 + 43, 44, 45, 46, 47, 48, 246 + 49, 50 247 + "snfi" "flash" 8, 9, 10, 11, 12, 13 248 + "spi_nor" "flash" 8, 9, 10, 11, 12, 13 249 + "pcie0_0_waken" "pcie" 14 250 + "pcie0_1_waken" "pcie" 79 251 + "pcie1_0_waken" "pcie" 14 252 + "pcie0_0_clkreq" "pcie" 15 253 + "pcie0_1_clkreq" "pcie" 80 254 + "pcie1_0_clkreq" "pcie" 15 255 + "pcie0_pad_perst" "pcie" 83 256 + "pcie1_pad_perst" "pcie" 84 257 + "pmic_bus" "pmic" 71, 72 258 + "pwm_ch1_0" "pwm" 51 259 + "pwm_ch1_1" "pwm" 73 260 + "pwm_ch1_2" "pwm" 95 261 + "pwm_ch2_0" "pwm" 52 262 + "pwm_ch2_1" "pwm" 74 263 + "pwm_ch2_2" "pwm" 96 264 + "pwm_ch3_0" "pwm" 53 265 + "pwm_ch3_1" "pwm" 75 266 + "pwm_ch3_2" "pwm" 97 267 + "pwm_ch4_0" "pwm" 54 268 + "pwm_ch4_1" "pwm" 67 269 + "pwm_ch4_2" "pwm" 76 270 + "pwm_ch4_3" "pwm" 98 271 + "pwm_ch5_0" "pwm" 68 272 + "pwm_ch5_1" "pwm" 77 273 + "pwm_ch5_2" "pwm" 99 274 + "pwm_ch6_0" "pwm" 69 275 + "pwm_ch6_1" "pwm" 78 276 + "pwm_ch6_2" "pwm" 81 277 + "pwm_ch6_3" "pwm" 100 278 + "pwm_ch7_0" "pwm" 70 279 + "pwm_ch7_1" "pwm" 82 280 + "pwm_ch7_2" "pwm" 101 281 + "sd_0" "sd" 16, 17, 18, 19, 20, 21 282 + "sd_1" "sd" 25, 26, 27, 28, 29, 30 283 + "spic0_0" "spi" 63, 64, 65, 66 284 + "spic0_1" "spi" 79, 80, 81, 82 285 + "spic1_0" "spi" 67, 68, 69, 70 286 + "spic1_1" "spi" 73, 74, 75, 76 287 + "spic2_0_wp_hold" "spi" 8, 9 288 + "spic2_0" "spi" 10, 11, 12, 13 289 + "tdm_0_out_mclk_bclk_ws" "tdm" 8, 9, 10 290 + "tdm_0_in_mclk_bclk_ws" "tdm" 11, 12, 13 291 + "tdm_0_out_data" "tdm" 20 292 + "tdm_0_in_data" "tdm" 21 293 + "tdm_1_out_mclk_bclk_ws" "tdm" 57, 58, 59 294 + "tdm_1_in_mclk_bclk_ws" "tdm" 60, 61, 62 295 + "tdm_1_out_data" "tdm" 55 296 + "tdm_1_in_data" "tdm" 56 297 + "uart0_0_tx_rx" "uart" 6, 7 298 + "uart1_0_tx_rx" "uart" 55, 56 299 + "uart1_0_rts_cts" "uart" 57, 58 300 + "uart1_1_tx_rx" "uart" 73, 74 301 + "uart1_1_rts_cts" "uart" 75, 76 302 + "uart2_0_tx_rx" "uart" 3, 4 303 + "uart2_0_rts_cts" "uart" 1, 2 304 + "uart2_1_tx_rx" "uart" 51, 52 305 + "uart2_1_rts_cts" "uart" 53, 54 306 + "uart2_2_tx_rx" "uart" 59, 60 307 + "uart2_2_rts_cts" "uart" 61, 62 308 + "uart2_3_tx_rx" "uart" 95, 96 309 + "uart3_0_tx_rx" "uart" 57, 58 310 + "uart3_1_tx_rx" "uart" 81, 82 311 + "uart3_1_rts_cts" "uart" 79, 80 312 + "uart4_0_tx_rx" "uart" 61, 62 313 + "uart4_1_tx_rx" "uart" 91, 92 314 + "uart4_1_rts_cts" "uart" 93, 94 315 + "uart4_2_tx_rx" "uart" 97, 98 316 + "uart4_2_rts_cts" "uart" 95, 96 317 + "watchdog" "watchdog" 78 318 + 319 + Example: 320 + 321 + pio: pinctrl@10211000 { 322 + compatible = "mediatek,mt7622-pinctrl"; 323 + reg = <0 0x10211000 0 0x1000>; 324 + gpio-controller; 325 + #gpio-cells = <2>; 326 + 327 + pinctrl_eth_default: eth-default { 328 + mux-mdio { 329 + groups = "mdc_mdio"; 330 + function = "eth"; 331 + drive-strength = <12>; 332 + }; 333 + 334 + mux-gmac2 { 335 + groups = "gmac2"; 336 + function = "eth"; 337 + drive-strength = <12>; 338 + }; 339 + 340 + mux-esw { 341 + groups = "esw"; 342 + function = "eth"; 343 + drive-strength = <8>; 344 + }; 345 + 346 + conf-mdio { 347 + pins = "MDC"; 348 + bias-pull-up; 349 + }; 350 + }; 351 + };
+193
Documentation/devicetree/bindings/pinctrl/qcom,msm8998-pinctrl.txt
··· 1 + Qualcomm MSM8998 TLMM block 2 + 3 + This binding describes the Top Level Mode Multiplexer block found in the 4 + MSM8998 platform. 5 + 6 + - compatible: 7 + Usage: required 8 + Value type: <string> 9 + Definition: must be "qcom,msm8998-pinctrl" 10 + 11 + - reg: 12 + Usage: required 13 + Value type: <prop-encoded-array> 14 + Definition: the base address and size of the TLMM register space. 15 + 16 + - interrupts: 17 + Usage: required 18 + Value type: <prop-encoded-array> 19 + Definition: should specify the TLMM summary IRQ. 20 + 21 + - interrupt-controller: 22 + Usage: required 23 + Value type: <none> 24 + Definition: identifies this node as an interrupt controller 25 + 26 + - #interrupt-cells: 27 + Usage: required 28 + Value type: <u32> 29 + Definition: must be 2. Specifying the pin number and flags, as defined 30 + in <dt-bindings/interrupt-controller/irq.h> 31 + 32 + - gpio-controller: 33 + Usage: required 34 + Value type: <none> 35 + Definition: identifies this node as a gpio controller 36 + 37 + - #gpio-cells: 38 + Usage: required 39 + Value type: <u32> 40 + Definition: must be 2. Specifying the pin number and flags, as defined 41 + in <dt-bindings/gpio/gpio.h> 42 + 43 + Please refer to ../gpio/gpio.txt and ../interrupt-controller/interrupts.txt for 44 + a general description of GPIO and interrupt bindings. 45 + 46 + Please refer to pinctrl-bindings.txt in this directory for details of the 47 + common pinctrl bindings used by client devices, including the meaning of the 48 + phrase "pin configuration node". 49 + 50 + The pin configuration nodes act as a container for an arbitrary number of 51 + subnodes. Each of these subnodes represents some desired configuration for a 52 + pin, a group, or a list of pins or groups. This configuration can include the 53 + mux function to select on those pin(s)/group(s), and various pin configuration 54 + parameters, such as pull-up, drive strength, etc. 55 + 56 + 57 + PIN CONFIGURATION NODES: 58 + 59 + The name of each subnode is not important; all subnodes should be enumerated 60 + and processed purely based on their content. 61 + 62 + Each subnode only affects those parameters that are explicitly listed. In 63 + other words, a subnode that lists a mux function but no pin configuration 64 + parameters implies no information about any pin configuration parameters. 65 + Similarly, a pin subnode that describes a pullup parameter implies no 66 + information about e.g. the mux function. 67 + 68 + 69 + The following generic properties as defined in pinctrl-bindings.txt are valid 70 + to specify in a pin configuration subnode: 71 + 72 + - pins: 73 + Usage: required 74 + Value type: <string-array> 75 + Definition: List of gpio pins affected by the properties specified in 76 + this subnode. 77 + 78 + Valid pins are: 79 + gpio0-gpio149 80 + Supports mux, bias and drive-strength 81 + 82 + sdc2_clk, sdc2_cmd, sdc2_data 83 + Supports bias and drive-strength 84 + 85 + ufs_reset 86 + Supports bias and drive-strength 87 + 88 + - function: 89 + Usage: required 90 + Value type: <string> 91 + Definition: Specify the alternative function to be configured for the 92 + specified pins. Functions are only valid for gpio pins. 93 + Valid values are: 94 + 95 + gpio, adsp_ext, agera_pll, atest_char, atest_gpsadc0, 96 + atest_gpsadc1, atest_tsens, atest_tsens2, atest_usb1, 97 + atest_usb10, atest_usb11, atest_usb12, atest_usb13, 98 + audio_ref, bimc_dte0, bimc_dte1, blsp10_spi, blsp10_spi_a, 99 + blsp10_spi_b, blsp11_i2c, blsp1_spi, blsp1_spi_a, 100 + blsp1_spi_b, blsp2_spi, blsp9_spi, blsp_i2c1, blsp_i2c2, 101 + blsp_i2c3, blsp_i2c4, blsp_i2c5, blsp_i2c6, blsp_i2c7, 102 + blsp_i2c8, blsp_i2c9, blsp_i2c10, blsp_i2c11, blsp_i2c12, 103 + blsp_spi1, blsp_spi2, blsp_spi3, blsp_spi4, blsp_spi5, 104 + blsp_spi6, blsp_spi7, blsp_spi8, blsp_spi9, blsp_spi10, 105 + blsp_spi11, blsp_spi12, blsp_uart1_a, blsp_uart1_b, 106 + blsp_uart2_a, blsp_uart2_b, blsp_uart3_a, blsp_uart3_b, 107 + blsp_uart7_a, blsp_uart7_b, blsp_uart8, blsp_uart8_a, 108 + blsp_uart8_b, blsp_uart9_a, blsp_uart9_b, blsp_uim1_a, 109 + blsp_uim1_b, blsp_uim2_a, blsp_uim2_b, blsp_uim3_a, 110 + blsp_uim3_b, blsp_uim7_a, blsp_uim7_b, blsp_uim8_a, 111 + blsp_uim8_b, blsp_uim9_a, blsp_uim9_b, bt_reset, 112 + btfm_slimbus, cam_mclk, cci_async, cci_i2c, cci_timer0, 113 + cci_timer1, cci_timer2, cci_timer3, cci_timer4, cri_trng, 114 + cri_trng0, cri_trng1, dbg_out, ddr_bist, edp_hot, edp_lcd, 115 + gcc_gp1_a, gcc_gp1_b, gcc_gp2_a, gcc_gp2_b, gcc_gp3_a, 116 + gcc_gp3_b, hdmi_cec, hdmi_ddc, hdmi_hot, hdmi_rcv, 117 + isense_dbg, jitter_bist, ldo_en, ldo_update, lpass_slimbus, 118 + m_voc, mdp_vsync, mdp_vsync0, mdp_vsync1, mdp_vsync2, 119 + mdp_vsync3, mdp_vsync_a, mdp_vsync_b, modem_tsync, mss_lte, 120 + nav_dr, nav_pps, pa_indicator, pci_e0, phase_flag, 121 + pll_bypassnl, pll_reset, pri_mi2s, pri_mi2s_ws, prng_rosc, 122 + pwr_crypto, pwr_modem, pwr_nav, qdss_cti0_a, qdss_cti0_b, 123 + qdss_cti1_a, qdss_cti1_b, qdss, qlink_enable, 124 + qlink_request, qua_mi2s, sd_card, sd_write, sdc40, sdc41, 125 + sdc42, sdc43, sdc4_clk, sdc4_cmd, sec_mi2s, sp_cmu, 126 + spkr_i2s, ssbi1, ssc_irq, ter_mi2s, tgu_ch0, tgu_ch1, 127 + tsense_pwm1, tsense_pwm2, tsif1_clk, tsif1_data, tsif1_en, 128 + tsif1_error, tsif1_sync, tsif2_clk, tsif2_data, tsif2_en, 129 + tsif2_error, tsif2_sync, uim1_clk, uim1_data, uim1_present, 130 + uim1_reset, uim2_clk, uim2_data, uim2_present, uim2_reset, 131 + uim_batt, usb_phy, vfr_1, vsense_clkout, vsense_data0, 132 + vsense_data1, vsense_mode, wlan1_adc0, wlan1_adc1, 133 + wlan2_adc0, wlan2_adc1, 134 + 135 + - bias-disable: 136 + Usage: optional 137 + Value type: <none> 138 + Definition: The specified pins should be configued as no pull. 139 + 140 + - bias-pull-down: 141 + Usage: optional 142 + Value type: <none> 143 + Definition: The specified pins should be configued as pull down. 144 + 145 + - bias-pull-up: 146 + Usage: optional 147 + Value type: <none> 148 + Definition: The specified pins should be configued as pull up. 149 + 150 + - output-high: 151 + Usage: optional 152 + Value type: <none> 153 + Definition: The specified pins are configured in output mode, driven 154 + high. 155 + Not valid for sdc pins. 156 + 157 + - output-low: 158 + Usage: optional 159 + Value type: <none> 160 + Definition: The specified pins are configured in output mode, driven 161 + low. 162 + Not valid for sdc pins. 163 + 164 + - drive-strength: 165 + Usage: optional 166 + Value type: <u32> 167 + Definition: Selects the drive strength for the specified pins, in mA. 168 + Valid values are: 2, 4, 6, 8, 10, 12, 14 and 16 169 + 170 + Example: 171 + 172 + tlmm: pinctrl@03400000 { 173 + compatible = "qcom,msm8998-pinctrl"; 174 + reg = <0x03400000 0xc00000>; 175 + interrupts = <0 208 0>; 176 + gpio-controller; 177 + #gpio-cells = <2>; 178 + interrupt-controller; 179 + #interrupt-cells = <2>; 180 + 181 + uart_console_active: uart_console_active { 182 + mux { 183 + pins = "gpio4", "gpio5"; 184 + function = "blsp_uart8_a"; 185 + }; 186 + 187 + config { 188 + pins = "gpio4", "gpio5"; 189 + drive-strength = <2>; 190 + bias-disable; 191 + }; 192 + }; 193 + };
+1
Documentation/devicetree/bindings/pinctrl/renesas,pfc-pinctrl.txt
··· 24 24 - "renesas,pfc-r8a7794": for R8A7794 (R-Car E2) compatible pin-controller. 25 25 - "renesas,pfc-r8a7795": for R8A7795 (R-Car H3) compatible pin-controller. 26 26 - "renesas,pfc-r8a7796": for R8A7796 (R-Car M3-W) compatible pin-controller. 27 + - "renesas,pfc-r8a77970": for R8A77970 (R-Car V3M) compatible pin-controller. 27 28 - "renesas,pfc-r8a77995": for R8A77995 (R-Car D3) compatible pin-controller. 28 29 - "renesas,pfc-sh73a0": for SH73A0 (SH-Mobile AG5) compatible pin-controller. 29 30
+27
Documentation/devicetree/bindings/pinctrl/socionext,uniphier-pinctrl.txt
··· 1 + UniPhier SoCs pin controller 2 + 3 + Required properties: 4 + - compatible: should be one of the following: 5 + "socionext,uniphier-ld4-pinctrl" - for LD4 SoC 6 + "socionext,uniphier-pro4-pinctrl" - for Pro4 SoC 7 + "socionext,uniphier-sld8-pinctrl" - for sLD8 SoC 8 + "socionext,uniphier-pro5-pinctrl" - for Pro5 SoC 9 + "socionext,uniphier-pxs2-pinctrl" - for PXs2 SoC 10 + "socionext,uniphier-ld6b-pinctrl" - for LD6b SoC 11 + "socionext,uniphier-ld11-pinctrl" - for LD11 SoC 12 + "socionext,uniphier-ld20-pinctrl" - for LD20 SoC 13 + "socionext,uniphier-pxs3-pinctrl" - for PXs3 SoC 14 + 15 + Note: 16 + The UniPhier pinctrl should be a subnode of a "syscon" compatible node. 17 + 18 + Example: 19 + soc-glue@5f800000 { 20 + compatible = "socionext,uniphier-pro4-soc-glue", 21 + "simple-mfd", "syscon"; 22 + reg = <0x5f800000 0x2000>; 23 + 24 + pinctrl: pinctrl { 25 + compatible = "socionext,uniphier-pro4-pinctrl"; 26 + }; 27 + };
+2
Documentation/devicetree/bindings/pinctrl/st,stm32-pinctrl.txt
··· 12 12 "st,stm32f469-pinctrl" 13 13 "st,stm32f746-pinctrl" 14 14 "st,stm32h743-pinctrl" 15 + "st,stm32mp157-pinctrl" 16 + "st,stm32mp157-z-pinctrl" 15 17 - #address-cells: The value of this property must be 1 16 18 - #size-cells : The value of this property must be 1 17 19 - ranges : defines mapping between pin controller node (parent) to
+11
MAINTAINERS
··· 2086 2086 T: git git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-uniphier.git 2087 2087 S: Maintained 2088 2088 F: Documentation/devicetree/bindings/gpio/gpio-uniphier.txt 2089 + F: Documentation/devicetree/bindings/pinctrl/socionext,uniphier-pinctrl.txt 2089 2090 F: arch/arm/boot/dts/uniphier* 2090 2091 F: arch/arm/include/asm/hardware/cache-uniphier.h 2091 2092 F: arch/arm/mach-uniphier/ ··· 10875 10874 M: Heikki Krogerus <heikki.krogerus@linux.intel.com> 10876 10875 S: Maintained 10877 10876 F: drivers/pinctrl/intel/ 10877 + 10878 + PIN CONTROLLER - MEDIATEK 10879 + M: Sean Wang <sean.wang@mediatek.com> 10880 + L: linux-mediatek@lists.infradead.org (moderated for non-subscribers) 10881 + S: Maintained 10882 + F: Documentation/devicetree/bindings/pinctrl/pinctrl-mt65xx.txt 10883 + F: Documentation/devicetree/bindings/pinctrl/pinctrl-mt7622.txt 10884 + F: drivers/pinctrl/mediatek/pinctrl-mtk-common.* 10885 + F: drivers/pinctrl/mediatek/pinctrl-mt2701.c 10886 + F: drivers/pinctrl/mediatek/pinctrl-mt7622.c 10878 10887 10879 10888 PIN CONTROLLER - QUALCOMM 10880 10889 M: Bjorn Andersson <bjorn.andersson@linaro.org>
+1 -1
drivers/gpio/gpio-uniphier.c
··· 505 505 506 506 MODULE_AUTHOR("Masahiro Yamada <yamada.masahiro@socionext.com>"); 507 507 MODULE_DESCRIPTION("UniPhier GPIO driver"); 508 - MODULE_LICENSE("GPL"); 508 + MODULE_LICENSE("GPL v2");
+2 -73
drivers/gpio/gpiolib-acpi.c
··· 58 58 return ACPI_HANDLE(gc->parent) == data; 59 59 } 60 60 61 - #ifdef CONFIG_PINCTRL 62 - /** 63 - * acpi_gpiochip_pin_to_gpio_offset() - translates ACPI GPIO to Linux GPIO 64 - * @gdev: GPIO device 65 - * @pin: ACPI GPIO pin number from GpioIo/GpioInt resource 66 - * 67 - * Function takes ACPI GpioIo/GpioInt pin number as a parameter and 68 - * translates it to a corresponding offset suitable to be passed to a 69 - * GPIO controller driver. 70 - * 71 - * Typically the returned offset is same as @pin, but if the GPIO 72 - * controller uses pin controller and the mapping is not contiguous the 73 - * offset might be different. 74 - */ 75 - static int acpi_gpiochip_pin_to_gpio_offset(struct gpio_device *gdev, int pin) 76 - { 77 - struct gpio_pin_range *pin_range; 78 - 79 - /* If there are no ranges in this chip, use 1:1 mapping */ 80 - if (list_empty(&gdev->pin_ranges)) 81 - return pin; 82 - 83 - list_for_each_entry(pin_range, &gdev->pin_ranges, node) { 84 - const struct pinctrl_gpio_range *range = &pin_range->range; 85 - int i; 86 - 87 - if (range->pins) { 88 - for (i = 0; i < range->npins; i++) { 89 - if (range->pins[i] == pin) 90 - return range->base + i - gdev->base; 91 - } 92 - } else { 93 - if (pin >= range->pin_base && 94 - pin < range->pin_base + range->npins) { 95 - unsigned gpio_base; 96 - 97 - gpio_base = range->base - gdev->base; 98 - return gpio_base + pin - range->pin_base; 99 - } 100 - } 101 - } 102 - 103 - return -EINVAL; 104 - } 105 - #else 106 - static inline int acpi_gpiochip_pin_to_gpio_offset(struct gpio_device *gdev, 107 - int pin) 108 - { 109 - return pin; 110 - } 111 - #endif 112 - 113 61 /** 114 62 * acpi_get_gpiod() - Translate ACPI GPIO pin to GPIO descriptor usable with GPIO API 115 63 * @path: ACPI GPIO controller full path name, (e.g. "\\_SB.GPO1") ··· 73 125 struct gpio_chip *chip; 74 126 acpi_handle handle; 75 127 acpi_status status; 76 - int offset; 77 128 78 129 status = acpi_get_handle(NULL, path, &handle); 79 130 if (ACPI_FAILURE(status)) ··· 82 135 if (!chip) 83 136 return ERR_PTR(-EPROBE_DEFER); 84 137 85 - offset = acpi_gpiochip_pin_to_gpio_offset(chip->gpiodev, pin); 86 - if (offset < 0) 87 - return ERR_PTR(offset); 88 - 89 - return gpiochip_get_desc(chip, offset); 138 + return gpiochip_get_desc(chip, pin); 90 139 } 91 140 92 141 static irqreturn_t acpi_gpio_irq_handler(int irq, void *data) ··· 158 215 } 159 216 if (!handler) 160 217 return AE_OK; 161 - 162 - pin = acpi_gpiochip_pin_to_gpio_offset(chip->gpiodev, pin); 163 - if (pin < 0) 164 - return AE_BAD_PARAMETER; 165 218 166 219 desc = gpiochip_request_own_desc(chip, pin, "ACPI:Event"); 167 220 if (IS_ERR(desc)) { ··· 810 871 struct gpio_desc *desc; 811 872 bool found; 812 873 813 - pin = acpi_gpiochip_pin_to_gpio_offset(chip->gpiodev, pin); 814 - if (pin < 0) { 815 - status = AE_BAD_PARAMETER; 816 - goto out; 817 - } 818 - 819 874 mutex_lock(&achip->conn_lock); 820 875 821 876 found = false; ··· 942 1009 if (ret < 0) 943 1010 return ERR_PTR(ret); 944 1011 945 - ret = acpi_gpiochip_pin_to_gpio_offset(chip->gpiodev, gpios[0]); 946 - if (ret < 0) 947 - return ERR_PTR(ret); 948 - 949 - desc = gpiochip_get_desc(chip, ret); 1012 + desc = gpiochip_get_desc(chip, gpios[0]); 950 1013 if (IS_ERR(desc)) 951 1014 return desc; 952 1015
+15
drivers/pinctrl/Kconfig
··· 66 66 config PINCTRL_AXP209 67 67 tristate "X-Powers AXP209 PMIC pinctrl and GPIO Support" 68 68 depends on MFD_AXP20X 69 + depends on OF 70 + select PINMUX 71 + select GENERIC_PINCONF 72 + select GPIOLIB 69 73 help 70 74 AXP PMICs provides multiple GPIOs that can be muxed for different 71 75 functions. This driver bundles a pinctrl driver to select the function ··· 356 352 select GENERIC_PINCONF 357 353 help 358 354 This selects the pinctrl driver for RK805. 355 + 356 + config PINCTRL_OCELOT 357 + bool "Pinctrl driver for the Microsemi Ocelot SoCs" 358 + default y 359 + depends on OF 360 + depends on MSCC_OCELOT || COMPILE_TEST 361 + select GPIOLIB 362 + select GENERIC_PINCONF 363 + select GENERIC_PINCTRL_GROUPS 364 + select GENERIC_PINMUX_FUNCTIONS 365 + select REGMAP_MMIO 359 366 360 367 source "drivers/pinctrl/aspeed/Kconfig" 361 368 source "drivers/pinctrl/bcm/Kconfig"
+2 -1
drivers/pinctrl/Makefile
··· 46 46 obj-$(CONFIG_PINCTRL_ZYNQ) += pinctrl-zynq.o 47 47 obj-$(CONFIG_PINCTRL_INGENIC) += pinctrl-ingenic.o 48 48 obj-$(CONFIG_PINCTRL_RK805) += pinctrl-rk805.o 49 + obj-$(CONFIG_PINCTRL_OCELOT) += pinctrl-ocelot.o 49 50 50 51 obj-$(CONFIG_ARCH_ASPEED) += aspeed/ 51 52 obj-y += bcm/ ··· 66 65 obj-y += ti/ 67 66 obj-$(CONFIG_PINCTRL_UNIPHIER) += uniphier/ 68 67 obj-$(CONFIG_ARCH_VT8500) += vt8500/ 69 - obj-$(CONFIG_PINCTRL_MTK) += mediatek/ 68 + obj-y += mediatek/ 70 69 obj-$(CONFIG_PINCTRL_ZX) += zte/
+17 -7
drivers/pinctrl/core.c
··· 1189 1189 EXPORT_SYMBOL_GPL(pinctrl_lookup_state); 1190 1190 1191 1191 /** 1192 - * pinctrl_select_state() - select/activate/program a pinctrl state to HW 1192 + * pinctrl_commit_state() - select/activate/program a pinctrl state to HW 1193 1193 * @p: the pinctrl handle for the device that requests configuration 1194 1194 * @state: the state handle to select/activate/program 1195 1195 */ 1196 - int pinctrl_select_state(struct pinctrl *p, struct pinctrl_state *state) 1196 + static int pinctrl_commit_state(struct pinctrl *p, struct pinctrl_state *state) 1197 1197 { 1198 1198 struct pinctrl_setting *setting, *setting2; 1199 1199 struct pinctrl_state *old_state = p->state; 1200 1200 int ret; 1201 - 1202 - if (p->state == state) 1203 - return 0; 1204 1201 1205 1202 if (p->state) { 1206 1203 /* ··· 1261 1264 pinctrl_select_state(p, old_state); 1262 1265 1263 1266 return ret; 1267 + } 1268 + 1269 + /** 1270 + * pinctrl_select_state() - select/activate/program a pinctrl state to HW 1271 + * @p: the pinctrl handle for the device that requests configuration 1272 + * @state: the state handle to select/activate/program 1273 + */ 1274 + int pinctrl_select_state(struct pinctrl *p, struct pinctrl_state *state) 1275 + { 1276 + if (p->state == state) 1277 + return 0; 1278 + 1279 + return pinctrl_commit_state(p, state); 1264 1280 } 1265 1281 EXPORT_SYMBOL_GPL(pinctrl_select_state); 1266 1282 ··· 1440 1430 int pinctrl_force_sleep(struct pinctrl_dev *pctldev) 1441 1431 { 1442 1432 if (!IS_ERR(pctldev->p) && !IS_ERR(pctldev->hog_sleep)) 1443 - return pinctrl_select_state(pctldev->p, pctldev->hog_sleep); 1433 + return pinctrl_commit_state(pctldev->p, pctldev->hog_sleep); 1444 1434 return 0; 1445 1435 } 1446 1436 EXPORT_SYMBOL_GPL(pinctrl_force_sleep); ··· 1452 1442 int pinctrl_force_default(struct pinctrl_dev *pctldev) 1453 1443 { 1454 1444 if (!IS_ERR(pctldev->p) && !IS_ERR(pctldev->hog_default)) 1455 - return pinctrl_select_state(pctldev->p, pctldev->hog_default); 1445 + return pinctrl_commit_state(pctldev->p, pctldev->hog_default); 1456 1446 return 0; 1457 1447 } 1458 1448 EXPORT_SYMBOL_GPL(pinctrl_force_default);
+38 -43
drivers/pinctrl/freescale/pinctrl-imx.c
··· 62 62 struct pinctrl_map **map, unsigned *num_maps) 63 63 { 64 64 struct imx_pinctrl *ipctl = pinctrl_dev_get_drvdata(pctldev); 65 - struct imx_pinctrl_soc_info *info = ipctl->info; 66 65 const struct group_desc *grp; 67 66 struct pinctrl_map *new_map; 68 67 struct device_node *parent; ··· 74 75 */ 75 76 grp = imx_pinctrl_find_group_by_name(pctldev, np->name); 76 77 if (!grp) { 77 - dev_err(info->dev, "unable to find group for node %s\n", 78 + dev_err(ipctl->dev, "unable to find group for node %s\n", 78 79 np->name); 79 80 return -EINVAL; 80 81 } ··· 145 146 unsigned group) 146 147 { 147 148 struct imx_pinctrl *ipctl = pinctrl_dev_get_drvdata(pctldev); 148 - struct imx_pinctrl_soc_info *info = ipctl->info; 149 + const struct imx_pinctrl_soc_info *info = ipctl->info; 149 150 const struct imx_pin_reg *pin_reg; 150 151 unsigned int npins, pin_id; 151 152 int i; ··· 173 174 struct imx_pin *pin = &((struct imx_pin *)(grp->data))[i]; 174 175 175 176 pin_id = pin->pin; 176 - pin_reg = &info->pin_regs[pin_id]; 177 + pin_reg = &ipctl->pin_regs[pin_id]; 177 178 178 179 if (pin_reg->mux_reg == -1) { 179 180 dev_dbg(ipctl->dev, "Pin(%s) does not support mux function\n", ··· 254 255 unsigned long *configs, 255 256 unsigned int num_configs) 256 257 { 257 - struct imx_pinctrl_soc_info *info = ipctl->info; 258 - struct imx_cfg_params_decode *decode; 258 + const struct imx_pinctrl_soc_info *info = ipctl->info; 259 + const struct imx_cfg_params_decode *decode; 259 260 enum pin_config_param param; 260 261 u32 raw_config = 0; 261 262 u32 param_val; ··· 288 289 static u32 imx_pinconf_parse_generic_config(struct device_node *np, 289 290 struct imx_pinctrl *ipctl) 290 291 { 291 - struct imx_pinctrl_soc_info *info = ipctl->info; 292 + const struct imx_pinctrl_soc_info *info = ipctl->info; 292 293 struct pinctrl_dev *pctl = ipctl->pctl; 293 294 unsigned int num_configs; 294 295 unsigned long *configs; ··· 309 310 unsigned pin_id, unsigned long *config) 310 311 { 311 312 struct imx_pinctrl *ipctl = pinctrl_dev_get_drvdata(pctldev); 312 - struct imx_pinctrl_soc_info *info = ipctl->info; 313 - const struct imx_pin_reg *pin_reg = &info->pin_regs[pin_id]; 313 + const struct imx_pinctrl_soc_info *info = ipctl->info; 314 + const struct imx_pin_reg *pin_reg = &ipctl->pin_regs[pin_id]; 314 315 315 316 if (pin_reg->conf_reg == -1) { 316 - dev_err(info->dev, "Pin(%s) does not support config function\n", 317 + dev_err(ipctl->dev, "Pin(%s) does not support config function\n", 317 318 info->pins[pin_id].name); 318 319 return -EINVAL; 319 320 } ··· 331 332 unsigned num_configs) 332 333 { 333 334 struct imx_pinctrl *ipctl = pinctrl_dev_get_drvdata(pctldev); 334 - struct imx_pinctrl_soc_info *info = ipctl->info; 335 - const struct imx_pin_reg *pin_reg = &info->pin_regs[pin_id]; 335 + const struct imx_pinctrl_soc_info *info = ipctl->info; 336 + const struct imx_pin_reg *pin_reg = &ipctl->pin_regs[pin_id]; 336 337 int i; 337 338 338 339 if (pin_reg->conf_reg == -1) { 339 - dev_err(info->dev, "Pin(%s) does not support config function\n", 340 + dev_err(ipctl->dev, "Pin(%s) does not support config function\n", 340 341 info->pins[pin_id].name); 341 342 return -EINVAL; 342 343 } ··· 367 368 struct seq_file *s, unsigned pin_id) 368 369 { 369 370 struct imx_pinctrl *ipctl = pinctrl_dev_get_drvdata(pctldev); 370 - struct imx_pinctrl_soc_info *info = ipctl->info; 371 - const struct imx_pin_reg *pin_reg = &info->pin_regs[pin_id]; 371 + const struct imx_pin_reg *pin_reg = &ipctl->pin_regs[pin_id]; 372 372 unsigned long config; 373 373 374 374 if (!pin_reg || pin_reg->conf_reg == -1) { ··· 425 427 struct imx_pinctrl *ipctl, 426 428 u32 index) 427 429 { 428 - struct imx_pinctrl_soc_info *info = ipctl->info; 430 + const struct imx_pinctrl_soc_info *info = ipctl->info; 429 431 int size, pin_size; 430 432 const __be32 *list; 431 433 int i; 432 434 u32 config; 433 435 434 - dev_dbg(info->dev, "group(%d): %s\n", index, np->name); 436 + dev_dbg(ipctl->dev, "group(%d): %s\n", index, np->name); 435 437 436 438 if (info->flags & SHARE_MUX_CONF_REG) 437 439 pin_size = SHARE_FSL_PIN_SIZE; ··· 458 460 if (!list) { 459 461 list = of_get_property(np, "pinmux", &size); 460 462 if (!list) { 461 - dev_err(info->dev, 463 + dev_err(ipctl->dev, 462 464 "no fsl,pins and pins property in node %pOF\n", np); 463 465 return -EINVAL; 464 466 } ··· 466 468 467 469 /* we do not check return since it's safe node passed down */ 468 470 if (!size || size % pin_size) { 469 - dev_err(info->dev, "Invalid fsl,pins or pins property in node %pOF\n", np); 471 + dev_err(ipctl->dev, "Invalid fsl,pins or pins property in node %pOF\n", np); 470 472 return -EINVAL; 471 473 } 472 474 ··· 474 476 config = imx_pinconf_parse_generic_config(np, ipctl); 475 477 476 478 grp->num_pins = size / pin_size; 477 - grp->data = devm_kzalloc(info->dev, grp->num_pins * 479 + grp->data = devm_kzalloc(ipctl->dev, grp->num_pins * 478 480 sizeof(struct imx_pin), GFP_KERNEL); 479 - grp->pins = devm_kzalloc(info->dev, grp->num_pins * 481 + grp->pins = devm_kzalloc(ipctl->dev, grp->num_pins * 480 482 sizeof(unsigned int), GFP_KERNEL); 481 483 if (!grp->pins || !grp->data) 482 484 return -ENOMEM; ··· 500 502 } 501 503 502 504 pin_id = (mux_reg != -1) ? mux_reg / 4 : conf_reg / 4; 503 - pin_reg = &info->pin_regs[pin_id]; 505 + pin_reg = &ipctl->pin_regs[pin_id]; 504 506 pin->pin = pin_id; 505 507 grp->pins[i] = pin_id; 506 508 pin_reg->mux_reg = mux_reg; ··· 522 524 pin->config = config & ~IMX_PAD_SION; 523 525 } 524 526 525 - dev_dbg(info->dev, "%s: 0x%x 0x%08lx", info->pins[pin_id].name, 527 + dev_dbg(ipctl->dev, "%s: 0x%x 0x%08lx", info->pins[pin_id].name, 526 528 pin->mux_mode, pin->config); 527 529 } 528 530 ··· 534 536 u32 index) 535 537 { 536 538 struct pinctrl_dev *pctl = ipctl->pctl; 537 - struct imx_pinctrl_soc_info *info = ipctl->info; 538 539 struct device_node *child; 539 540 struct function_desc *func; 540 541 struct group_desc *grp; 541 542 u32 i = 0; 542 543 543 - dev_dbg(info->dev, "parse function(%d): %s\n", index, np->name); 544 + dev_dbg(pctl->dev, "parse function(%d): %s\n", index, np->name); 544 545 545 546 func = pinmux_generic_get_function(pctl, index); 546 547 if (!func) ··· 549 552 func->name = np->name; 550 553 func->num_group_names = of_get_child_count(np); 551 554 if (func->num_group_names == 0) { 552 - dev_err(info->dev, "no groups defined in %pOF\n", np); 555 + dev_err(ipctl->dev, "no groups defined in %pOF\n", np); 553 556 return -EINVAL; 554 557 } 555 - func->group_names = devm_kcalloc(info->dev, func->num_group_names, 558 + func->group_names = devm_kcalloc(ipctl->dev, func->num_group_names, 556 559 sizeof(char *), GFP_KERNEL); 557 560 if (!func->group_names) 558 561 return -ENOMEM; ··· 560 563 for_each_child_of_node(np, child) { 561 564 func->group_names[i] = child->name; 562 565 563 - grp = devm_kzalloc(info->dev, sizeof(struct group_desc), 566 + grp = devm_kzalloc(ipctl->dev, sizeof(struct group_desc), 564 567 GFP_KERNEL); 565 568 if (!grp) 566 569 return -ENOMEM; 567 570 568 - mutex_lock(&info->mutex); 571 + mutex_lock(&ipctl->mutex); 569 572 radix_tree_insert(&pctl->pin_group_tree, 570 - info->group_index++, grp); 571 - mutex_unlock(&info->mutex); 573 + ipctl->group_index++, grp); 574 + mutex_unlock(&ipctl->mutex); 572 575 573 576 imx_pinctrl_parse_groups(child, grp, ipctl, i++); 574 577 } ··· 605 608 struct device_node *np = pdev->dev.of_node; 606 609 struct device_node *child; 607 610 struct pinctrl_dev *pctl = ipctl->pctl; 608 - struct imx_pinctrl_soc_info *info = ipctl->info; 609 611 u32 nfuncs = 0; 610 612 u32 i = 0; 611 613 bool flat_funcs; ··· 631 635 if (!function) 632 636 return -ENOMEM; 633 637 634 - mutex_lock(&info->mutex); 638 + mutex_lock(&ipctl->mutex); 635 639 radix_tree_insert(&pctl->pin_function_tree, i, function); 636 - mutex_unlock(&info->mutex); 640 + mutex_unlock(&ipctl->mutex); 637 641 } 638 642 pctl->num_functions = nfuncs; 639 643 640 - info->group_index = 0; 644 + ipctl->group_index = 0; 641 645 if (flat_funcs) { 642 646 pctl->num_groups = of_get_child_count(np); 643 647 } else { ··· 668 672 } 669 673 670 674 int imx_pinctrl_probe(struct platform_device *pdev, 671 - struct imx_pinctrl_soc_info *info) 675 + const struct imx_pinctrl_soc_info *info) 672 676 { 673 677 struct regmap_config config = { .name = "gpr" }; 674 678 struct device_node *dev_np = pdev->dev.of_node; ··· 683 687 dev_err(&pdev->dev, "wrong pinctrl info\n"); 684 688 return -EINVAL; 685 689 } 686 - info->dev = &pdev->dev; 687 690 688 691 if (info->gpr_compatible) { 689 692 gpr = syscon_regmap_lookup_by_compatible(info->gpr_compatible); ··· 695 700 if (!ipctl) 696 701 return -ENOMEM; 697 702 698 - info->pin_regs = devm_kmalloc(&pdev->dev, sizeof(*info->pin_regs) * 703 + ipctl->pin_regs = devm_kmalloc(&pdev->dev, sizeof(*ipctl->pin_regs) * 699 704 info->npins, GFP_KERNEL); 700 - if (!info->pin_regs) 705 + if (!ipctl->pin_regs) 701 706 return -ENOMEM; 702 707 703 708 for (i = 0; i < info->npins; i++) { 704 - info->pin_regs[i].mux_reg = -1; 705 - info->pin_regs[i].conf_reg = -1; 709 + ipctl->pin_regs[i].mux_reg = -1; 710 + ipctl->pin_regs[i].conf_reg = -1; 706 711 } 707 712 708 713 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); ··· 746 751 /* platform specific callback */ 747 752 imx_pmx_ops.gpio_set_direction = info->gpio_set_direction; 748 753 749 - mutex_init(&info->mutex); 754 + mutex_init(&ipctl->mutex); 750 755 751 756 ipctl->info = info; 752 - ipctl->dev = info->dev; 757 + ipctl->dev = &pdev->dev; 753 758 platform_set_drvdata(pdev, ipctl); 754 759 ret = devm_pinctrl_register_and_init(&pdev->dev, 755 760 imx_pinctrl_desc, ipctl,
+6 -7
drivers/pinctrl/freescale/pinctrl-imx.h
··· 58 58 }; 59 59 60 60 struct imx_pinctrl_soc_info { 61 - struct device *dev; 62 61 const struct pinctrl_pin_desc *pins; 63 62 unsigned int npins; 64 - struct imx_pin_reg *pin_regs; 65 - unsigned int group_index; 66 63 unsigned int flags; 67 64 const char *gpr_compatible; 68 - struct mutex mutex; 69 65 70 66 /* MUX_MODE shift and mask in case SHARE_MUX_CONF_REG */ 71 67 unsigned int mux_mask; ··· 71 75 bool generic_pinconf; 72 76 const struct pinconf_generic_params *custom_params; 73 77 unsigned int num_custom_params; 74 - struct imx_cfg_params_decode *decodes; 78 + const struct imx_cfg_params_decode *decodes; 75 79 unsigned int num_decodes; 76 80 void (*fixup)(unsigned long *configs, unsigned int num_configs, 77 81 u32 *raw_config); ··· 91 95 struct pinctrl_dev *pctl; 92 96 void __iomem *base; 93 97 void __iomem *input_sel_base; 94 - struct imx_pinctrl_soc_info *info; 98 + const struct imx_pinctrl_soc_info *info; 99 + struct imx_pin_reg *pin_regs; 100 + unsigned int group_index; 101 + struct mutex mutex; 95 102 }; 96 103 97 104 #define IMX_CFG_PARAMS_DECODE(p, m, o) \ ··· 116 117 #define IOMUXC_CONFIG_SION (0x1 << 4) 117 118 118 119 int imx_pinctrl_probe(struct platform_device *pdev, 119 - struct imx_pinctrl_soc_info *info); 120 + const struct imx_pinctrl_soc_info *info); 120 121 #endif /* __DRIVERS_PINCTRL_IMX_H */
+1 -1
drivers/pinctrl/freescale/pinctrl-imx25.c
··· 309 309 IMX_PINCTRL_PIN(MX25_PAD_BOOT_MODE1), 310 310 }; 311 311 312 - static struct imx_pinctrl_soc_info imx25_pinctrl_info = { 312 + static const struct imx_pinctrl_soc_info imx25_pinctrl_info = { 313 313 .pins = imx25_pinctrl_pads, 314 314 .npins = ARRAY_SIZE(imx25_pinctrl_pads), 315 315 };
+1 -1
drivers/pinctrl/freescale/pinctrl-imx35.c
··· 999 999 IMX_PINCTRL_PIN(MX35_PAD_TEST_MODE), 1000 1000 }; 1001 1001 1002 - static struct imx_pinctrl_soc_info imx35_pinctrl_info = { 1002 + static const struct imx_pinctrl_soc_info imx35_pinctrl_info = { 1003 1003 .pins = imx35_pinctrl_pads, 1004 1004 .npins = ARRAY_SIZE(imx35_pinctrl_pads), 1005 1005 };
+1 -1
drivers/pinctrl/freescale/pinctrl-imx50.c
··· 385 385 IMX_PINCTRL_PIN(MX50_PAD_EIM_CRE), 386 386 }; 387 387 388 - static struct imx_pinctrl_soc_info imx50_pinctrl_info = { 388 + static const struct imx_pinctrl_soc_info imx50_pinctrl_info = { 389 389 .pins = imx50_pinctrl_pads, 390 390 .npins = ARRAY_SIZE(imx50_pinctrl_pads), 391 391 .gpr_compatible = "fsl,imx50-iomuxc-gpr",
+1 -1
drivers/pinctrl/freescale/pinctrl-imx51.c
··· 762 762 IMX_PINCTRL_PIN(MX51_PAD_CSI1_MCLK), 763 763 }; 764 764 765 - static struct imx_pinctrl_soc_info imx51_pinctrl_info = { 765 + static const struct imx_pinctrl_soc_info imx51_pinctrl_info = { 766 766 .pins = imx51_pinctrl_pads, 767 767 .npins = ARRAY_SIZE(imx51_pinctrl_pads), 768 768 };
+1 -1
drivers/pinctrl/freescale/pinctrl-imx53.c
··· 448 448 IMX_PINCTRL_PIN(MX53_PAD_GPIO_18), 449 449 }; 450 450 451 - static struct imx_pinctrl_soc_info imx53_pinctrl_info = { 451 + static const struct imx_pinctrl_soc_info imx53_pinctrl_info = { 452 452 .pins = imx53_pinctrl_pads, 453 453 .npins = ARRAY_SIZE(imx53_pinctrl_pads), 454 454 .gpr_compatible = "fsl,imx53-iomuxc-gpr",
+1 -1
drivers/pinctrl/freescale/pinctrl-imx6dl.c
··· 457 457 IMX_PINCTRL_PIN(MX6DL_PAD_SD4_DAT7), 458 458 }; 459 459 460 - static struct imx_pinctrl_soc_info imx6dl_pinctrl_info = { 460 + static const struct imx_pinctrl_soc_info imx6dl_pinctrl_info = { 461 461 .pins = imx6dl_pinctrl_pads, 462 462 .npins = ARRAY_SIZE(imx6dl_pinctrl_pads), 463 463 .gpr_compatible = "fsl,imx6q-iomuxc-gpr",
+1 -1
drivers/pinctrl/freescale/pinctrl-imx6q.c
··· 460 460 IMX_PINCTRL_PIN(MX6Q_PAD_SD2_DAT3), 461 461 }; 462 462 463 - static struct imx_pinctrl_soc_info imx6q_pinctrl_info = { 463 + static const struct imx_pinctrl_soc_info imx6q_pinctrl_info = { 464 464 .pins = imx6q_pinctrl_pads, 465 465 .npins = ARRAY_SIZE(imx6q_pinctrl_pads), 466 466 .gpr_compatible = "fsl,imx6q-iomuxc-gpr",
+1 -1
drivers/pinctrl/freescale/pinctrl-imx6sl.c
··· 363 363 IMX_PINCTRL_PIN(MX6SL_PAD_WDOG_B), 364 364 }; 365 365 366 - static struct imx_pinctrl_soc_info imx6sl_pinctrl_info = { 366 + static const struct imx_pinctrl_soc_info imx6sl_pinctrl_info = { 367 367 .pins = imx6sl_pinctrl_pads, 368 368 .npins = ARRAY_SIZE(imx6sl_pinctrl_pads), 369 369 .gpr_compatible = "fsl,imx6sl-iomuxc-gpr",
+1 -1
drivers/pinctrl/freescale/pinctrl-imx6sx.c
··· 367 367 IMX_PINCTRL_PIN(MX6SX_PAD_USB_H_STROBE), 368 368 }; 369 369 370 - static struct imx_pinctrl_soc_info imx6sx_pinctrl_info = { 370 + static const struct imx_pinctrl_soc_info imx6sx_pinctrl_info = { 371 371 .pins = imx6sx_pinctrl_pads, 372 372 .npins = ARRAY_SIZE(imx6sx_pinctrl_pads), 373 373 .gpr_compatible = "fsl,imx6sx-iomuxc-gpr",
+48 -4
drivers/pinctrl/freescale/pinctrl-imx6ul.c
··· 150 150 MX6UL_PAD_CSI_DATA07 = 128, 151 151 }; 152 152 153 + enum imx6ull_lpsr_pads { 154 + MX6ULL_PAD_BOOT_MODE0 = 0, 155 + MX6ULL_PAD_BOOT_MODE1 = 1, 156 + MX6ULL_PAD_SNVS_TAMPER0 = 2, 157 + MX6ULL_PAD_SNVS_TAMPER1 = 3, 158 + MX6ULL_PAD_SNVS_TAMPER2 = 4, 159 + MX6ULL_PAD_SNVS_TAMPER3 = 5, 160 + MX6ULL_PAD_SNVS_TAMPER4 = 6, 161 + MX6ULL_PAD_SNVS_TAMPER5 = 7, 162 + MX6ULL_PAD_SNVS_TAMPER6 = 8, 163 + MX6ULL_PAD_SNVS_TAMPER7 = 9, 164 + MX6ULL_PAD_SNVS_TAMPER8 = 10, 165 + MX6ULL_PAD_SNVS_TAMPER9 = 11, 166 + }; 167 + 153 168 /* Pad names for the pinmux subsystem */ 154 169 static const struct pinctrl_pin_desc imx6ul_pinctrl_pads[] = { 155 170 IMX_PINCTRL_PIN(MX6UL_PAD_RESERVE0), ··· 298 283 IMX_PINCTRL_PIN(MX6UL_PAD_CSI_DATA07), 299 284 }; 300 285 301 - static struct imx_pinctrl_soc_info imx6ul_pinctrl_info = { 286 + /* pad for i.MX6ULL lpsr pinmux */ 287 + static const struct pinctrl_pin_desc imx6ull_snvs_pinctrl_pads[] = { 288 + IMX_PINCTRL_PIN(MX6ULL_PAD_BOOT_MODE0), 289 + IMX_PINCTRL_PIN(MX6ULL_PAD_BOOT_MODE1), 290 + IMX_PINCTRL_PIN(MX6ULL_PAD_SNVS_TAMPER0), 291 + IMX_PINCTRL_PIN(MX6ULL_PAD_SNVS_TAMPER1), 292 + IMX_PINCTRL_PIN(MX6ULL_PAD_SNVS_TAMPER2), 293 + IMX_PINCTRL_PIN(MX6ULL_PAD_SNVS_TAMPER3), 294 + IMX_PINCTRL_PIN(MX6ULL_PAD_SNVS_TAMPER4), 295 + IMX_PINCTRL_PIN(MX6ULL_PAD_SNVS_TAMPER5), 296 + IMX_PINCTRL_PIN(MX6ULL_PAD_SNVS_TAMPER6), 297 + IMX_PINCTRL_PIN(MX6ULL_PAD_SNVS_TAMPER7), 298 + IMX_PINCTRL_PIN(MX6ULL_PAD_SNVS_TAMPER8), 299 + IMX_PINCTRL_PIN(MX6ULL_PAD_SNVS_TAMPER9), 300 + }; 301 + 302 + static const struct imx_pinctrl_soc_info imx6ul_pinctrl_info = { 302 303 .pins = imx6ul_pinctrl_pads, 303 304 .npins = ARRAY_SIZE(imx6ul_pinctrl_pads), 304 305 .gpr_compatible = "fsl,imx6ul-iomuxc-gpr", 305 306 }; 306 307 307 - static struct of_device_id imx6ul_pinctrl_of_match[] = { 308 - { .compatible = "fsl,imx6ul-iomuxc", }, 308 + static const struct imx_pinctrl_soc_info imx6ull_snvs_pinctrl_info = { 309 + .pins = imx6ull_snvs_pinctrl_pads, 310 + .npins = ARRAY_SIZE(imx6ull_snvs_pinctrl_pads), 311 + .flags = ZERO_OFFSET_VALID, 312 + }; 313 + 314 + static const struct of_device_id imx6ul_pinctrl_of_match[] = { 315 + { .compatible = "fsl,imx6ul-iomuxc", .data = &imx6ul_pinctrl_info, }, 316 + { .compatible = "fsl,imx6ull-iomuxc-snvs", .data = &imx6ull_snvs_pinctrl_info, }, 309 317 { /* sentinel */ } 310 318 }; 311 319 312 320 static int imx6ul_pinctrl_probe(struct platform_device *pdev) 313 321 { 314 - return imx_pinctrl_probe(pdev, &imx6ul_pinctrl_info); 322 + const struct imx_pinctrl_soc_info *pinctrl_info; 323 + 324 + pinctrl_info = of_device_get_match_data(&pdev->dev); 325 + if (!pinctrl_info) 326 + return -ENODEV; 327 + 328 + return imx_pinctrl_probe(pdev, pinctrl_info); 315 329 } 316 330 317 331 static struct platform_driver imx6ul_pinctrl_driver = {
+3 -7
drivers/pinctrl/freescale/pinctrl-imx7d.c
··· 378 378 379 379 static int imx7d_pinctrl_probe(struct platform_device *pdev) 380 380 { 381 - const struct of_device_id *match; 382 - struct imx_pinctrl_soc_info *pinctrl_info; 381 + const struct imx_pinctrl_soc_info *pinctrl_info; 383 382 384 - match = of_match_device(imx7d_pinctrl_of_match, &pdev->dev); 385 - 386 - if (!match) 383 + pinctrl_info = of_device_get_match_data(&pdev->dev); 384 + if (!pinctrl_info) 387 385 return -ENODEV; 388 - 389 - pinctrl_info = (struct imx_pinctrl_soc_info *) match->data; 390 386 391 387 return imx_pinctrl_probe(pdev, pinctrl_info); 392 388 }
+3 -4
drivers/pinctrl/freescale/pinctrl-imx7ulp.c
··· 266 266 #define BP_MUX_MODE 8 267 267 #define BM_PULL_ENABLED BIT(1) 268 268 269 - struct imx_cfg_params_decode imx7ulp_cfg_decodes[] = { 269 + static const struct imx_cfg_params_decode imx7ulp_cfg_decodes[] = { 270 270 IMX_CFG_PARAMS_DECODE(PIN_CONFIG_DRIVE_STRENGTH, BIT(6), 6), 271 271 IMX_CFG_PARAMS_DECODE(PIN_CONFIG_DRIVE_PUSH_PULL, BIT(5), 5), 272 272 IMX_CFG_PARAMS_DECODE(PIN_CONFIG_SLEW_RATE, BIT(2), 2), ··· 307 307 unsigned offset, bool input) 308 308 { 309 309 struct imx_pinctrl *ipctl = pinctrl_dev_get_drvdata(pctldev); 310 - struct imx_pinctrl_soc_info *info = ipctl->info; 311 310 const struct imx_pin_reg *pin_reg; 312 311 u32 reg; 313 312 314 - pin_reg = &info->pin_regs[offset]; 313 + pin_reg = &ipctl->pin_regs[offset]; 315 314 if (pin_reg->mux_reg == -1) 316 315 return -EINVAL; 317 316 ··· 324 325 return 0; 325 326 } 326 327 327 - static struct imx_pinctrl_soc_info imx7ulp_pinctrl_info = { 328 + static const struct imx_pinctrl_soc_info imx7ulp_pinctrl_info = { 328 329 .pins = imx7ulp_pinctrl_pads, 329 330 .npins = ARRAY_SIZE(imx7ulp_pinctrl_pads), 330 331 .flags = ZERO_OFFSET_VALID | SHARE_MUX_CONF_REG,
+2 -3
drivers/pinctrl/freescale/pinctrl-vf610.c
··· 300 300 unsigned offset, bool input) 301 301 { 302 302 struct imx_pinctrl *ipctl = pinctrl_dev_get_drvdata(pctldev); 303 - struct imx_pinctrl_soc_info *info = ipctl->info; 304 303 const struct imx_pin_reg *pin_reg; 305 304 u32 reg; 306 305 307 - pin_reg = &info->pin_regs[offset]; 306 + pin_reg = &ipctl->pin_regs[offset]; 308 307 if (pin_reg->mux_reg == -1) 309 308 return -EINVAL; 310 309 ··· 318 319 return 0; 319 320 } 320 321 321 - static struct imx_pinctrl_soc_info vf610_pinctrl_info = { 322 + static const struct imx_pinctrl_soc_info vf610_pinctrl_info = { 322 323 .pins = vf610_pinctrl_pads, 323 324 .npins = ARRAY_SIZE(vf610_pinctrl_pads), 324 325 .flags = SHARE_MUX_CONF_REG | ZERO_OFFSET_VALID,
+6
drivers/pinctrl/intel/pinctrl-baytrail.c
··· 46 46 #define BYT_TRIG_POS BIT(25) 47 47 #define BYT_TRIG_LVL BIT(24) 48 48 #define BYT_DEBOUNCE_EN BIT(20) 49 + #define BYT_GLITCH_FILTER_EN BIT(19) 50 + #define BYT_GLITCH_F_SLOW_CLK BIT(17) 51 + #define BYT_GLITCH_F_FAST_CLK BIT(16) 49 52 #define BYT_PULL_STR_SHIFT 9 50 53 #define BYT_PULL_STR_MASK (3 << BYT_PULL_STR_SHIFT) 51 54 #define BYT_PULL_STR_2K (0 << BYT_PULL_STR_SHIFT) ··· 1582 1579 */ 1583 1580 value &= ~(BYT_DIRECT_IRQ_EN | BYT_TRIG_POS | BYT_TRIG_NEG | 1584 1581 BYT_TRIG_LVL); 1582 + /* Enable glitch filtering */ 1583 + value |= BYT_GLITCH_FILTER_EN | BYT_GLITCH_F_SLOW_CLK | 1584 + BYT_GLITCH_F_FAST_CLK; 1585 1585 1586 1586 writel(value, reg); 1587 1587
+34 -31
drivers/pinctrl/intel/pinctrl-cannonlake.c
··· 23 23 #define CNL_HOSTSW_OWN 0x0b0 24 24 #define CNL_GPI_IE 0x120 25 25 26 - #define CNL_GPP(r, s, e) \ 26 + #define CNL_GPP(r, s, e, g) \ 27 27 { \ 28 28 .reg_num = (r), \ 29 29 .base = (s), \ 30 30 .size = ((e) - (s) + 1), \ 31 + .gpio_base = (g), \ 31 32 } 33 + 34 + #define CNL_NO_GPIO -1 32 35 33 36 #define CNL_COMMUNITY(b, s, e, g) \ 34 37 { \ ··· 366 363 }; 367 364 368 365 static const struct intel_padgroup cnlh_community0_gpps[] = { 369 - CNL_GPP(0, 0, 24), /* GPP_A */ 370 - CNL_GPP(1, 25, 50), /* GPP_B */ 366 + CNL_GPP(0, 0, 24, 0), /* GPP_A */ 367 + CNL_GPP(1, 25, 50, 32), /* GPP_B */ 371 368 }; 372 369 373 370 static const struct intel_padgroup cnlh_community1_gpps[] = { 374 - CNL_GPP(0, 51, 74), /* GPP_C */ 375 - CNL_GPP(1, 75, 98), /* GPP_D */ 376 - CNL_GPP(2, 99, 106), /* GPP_G */ 377 - CNL_GPP(3, 107, 114), /* AZA */ 378 - CNL_GPP(4, 115, 146), /* vGPIO_0 */ 379 - CNL_GPP(5, 147, 154), /* vGPIO_1 */ 371 + CNL_GPP(0, 51, 74, 64), /* GPP_C */ 372 + CNL_GPP(1, 75, 98, 96), /* GPP_D */ 373 + CNL_GPP(2, 99, 106, 128), /* GPP_G */ 374 + CNL_GPP(3, 107, 114, CNL_NO_GPIO), /* AZA */ 375 + CNL_GPP(4, 115, 146, 160), /* vGPIO_0 */ 376 + CNL_GPP(5, 147, 154, CNL_NO_GPIO), /* vGPIO_1 */ 380 377 }; 381 378 382 379 static const struct intel_padgroup cnlh_community3_gpps[] = { 383 - CNL_GPP(0, 155, 178), /* GPP_K */ 384 - CNL_GPP(1, 179, 202), /* GPP_H */ 385 - CNL_GPP(2, 203, 215), /* GPP_E */ 386 - CNL_GPP(3, 216, 239), /* GPP_F */ 387 - CNL_GPP(4, 240, 248), /* SPI */ 380 + CNL_GPP(0, 155, 178, 192), /* GPP_K */ 381 + CNL_GPP(1, 179, 202, 224), /* GPP_H */ 382 + CNL_GPP(2, 203, 215, 258), /* GPP_E */ 383 + CNL_GPP(3, 216, 239, 288), /* GPP_F */ 384 + CNL_GPP(4, 240, 248, CNL_NO_GPIO), /* SPI */ 388 385 }; 389 386 390 387 static const struct intel_padgroup cnlh_community4_gpps[] = { 391 - CNL_GPP(0, 249, 259), /* CPU */ 392 - CNL_GPP(1, 260, 268), /* JTAG */ 393 - CNL_GPP(2, 269, 286), /* GPP_I */ 394 - CNL_GPP(3, 287, 298), /* GPP_J */ 388 + CNL_GPP(0, 249, 259, CNL_NO_GPIO), /* CPU */ 389 + CNL_GPP(1, 260, 268, CNL_NO_GPIO), /* JTAG */ 390 + CNL_GPP(2, 269, 286, 320), /* GPP_I */ 391 + CNL_GPP(3, 287, 298, 352), /* GPP_J */ 395 392 }; 396 393 397 394 static const unsigned int cnlh_spi0_pins[] = { 40, 41, 42, 43 }; ··· 788 785 }; 789 786 790 787 static const struct intel_padgroup cnllp_community0_gpps[] = { 791 - CNL_GPP(0, 0, 24), /* GPP_A */ 792 - CNL_GPP(1, 25, 50), /* GPP_B */ 793 - CNL_GPP(2, 51, 58), /* GPP_G */ 794 - CNL_GPP(3, 59, 67), /* SPI */ 788 + CNL_GPP(0, 0, 24, 0), /* GPP_A */ 789 + CNL_GPP(1, 25, 50, 32), /* GPP_B */ 790 + CNL_GPP(2, 51, 58, 64), /* GPP_G */ 791 + CNL_GPP(3, 59, 67, CNL_NO_GPIO), /* SPI */ 795 792 }; 796 793 797 794 static const struct intel_padgroup cnllp_community1_gpps[] = { 798 - CNL_GPP(0, 68, 92), /* GPP_D */ 799 - CNL_GPP(1, 93, 116), /* GPP_F */ 800 - CNL_GPP(2, 117, 140), /* GPP_H */ 801 - CNL_GPP(3, 141, 172), /* vGPIO */ 802 - CNL_GPP(4, 173, 180), /* vGPIO */ 795 + CNL_GPP(0, 68, 92, 96), /* GPP_D */ 796 + CNL_GPP(1, 93, 116, 128), /* GPP_F */ 797 + CNL_GPP(2, 117, 140, 160), /* GPP_H */ 798 + CNL_GPP(3, 141, 172, 192), /* vGPIO */ 799 + CNL_GPP(4, 173, 180, 224), /* vGPIO */ 803 800 }; 804 801 805 802 static const struct intel_padgroup cnllp_community4_gpps[] = { 806 - CNL_GPP(0, 181, 204), /* GPP_C */ 807 - CNL_GPP(1, 205, 228), /* GPP_E */ 808 - CNL_GPP(2, 229, 237), /* JTAG */ 809 - CNL_GPP(3, 238, 243), /* HVCMOS */ 803 + CNL_GPP(0, 181, 204, 256), /* GPP_C */ 804 + CNL_GPP(1, 205, 228, 288), /* GPP_E */ 805 + CNL_GPP(2, 229, 237, CNL_NO_GPIO), /* JTAG */ 806 + CNL_GPP(3, 238, 243, CNL_NO_GPIO), /* HVCMOS */ 810 807 }; 811 808 812 809 static const struct intel_community cnllp_communities[] = {
+20 -39
drivers/pinctrl/intel/pinctrl-cherryview.c
··· 131 131 * @ngroups: Number of groups 132 132 * @functions: All functions in this community 133 133 * @nfunctions: Number of functions 134 - * @ngpios: Number of GPIOs in this community 135 134 * @gpio_ranges: An array of GPIO ranges in this community 136 135 * @ngpio_ranges: Number of GPIO ranges 137 - * @ngpios: Total number of GPIOs in this community 138 136 * @nirqs: Total number of IRQs this community can generate 139 137 */ 140 138 struct chv_community { ··· 145 147 size_t nfunctions; 146 148 const struct chv_gpio_pinrange *gpio_ranges; 147 149 size_t ngpio_ranges; 148 - size_t ngpios; 149 150 size_t nirqs; 150 151 acpi_adr_space_type acpi_space_id; 151 152 }; ··· 396 399 .nfunctions = ARRAY_SIZE(southwest_functions), 397 400 .gpio_ranges = southwest_gpio_ranges, 398 401 .ngpio_ranges = ARRAY_SIZE(southwest_gpio_ranges), 399 - .ngpios = ARRAY_SIZE(southwest_pins), 400 402 /* 401 403 * Southwest community can benerate GPIO interrupts only for the 402 404 * first 8 interrupts. The upper half (8-15) can only be used to ··· 485 489 .npins = ARRAY_SIZE(north_pins), 486 490 .gpio_ranges = north_gpio_ranges, 487 491 .ngpio_ranges = ARRAY_SIZE(north_gpio_ranges), 488 - .ngpios = ARRAY_SIZE(north_pins), 489 492 /* 490 493 * North community can generate GPIO interrupts only for the first 491 494 * 8 interrupts. The upper half (8-15) can only be used to trigger ··· 533 538 .npins = ARRAY_SIZE(east_pins), 534 539 .gpio_ranges = east_gpio_ranges, 535 540 .ngpio_ranges = ARRAY_SIZE(east_gpio_ranges), 536 - .ngpios = ARRAY_SIZE(east_pins), 537 541 .nirqs = 16, 538 542 .acpi_space_id = 0x93, 539 543 }; ··· 659 665 .nfunctions = ARRAY_SIZE(southeast_functions), 660 666 .gpio_ranges = southeast_gpio_ranges, 661 667 .ngpio_ranges = ARRAY_SIZE(southeast_gpio_ranges), 662 - .ngpios = ARRAY_SIZE(southeast_pins), 663 668 .nirqs = 16, 664 669 .acpi_space_id = 0x94, 665 670 }; ··· 1246 1253 .owner = THIS_MODULE, 1247 1254 }; 1248 1255 1249 - static unsigned chv_gpio_offset_to_pin(struct chv_pinctrl *pctrl, 1250 - unsigned offset) 1251 - { 1252 - return pctrl->community->pins[offset].number; 1253 - } 1254 - 1255 1256 static int chv_gpio_get(struct gpio_chip *chip, unsigned offset) 1256 1257 { 1257 1258 struct chv_pinctrl *pctrl = gpiochip_get_data(chip); 1258 - int pin = chv_gpio_offset_to_pin(pctrl, offset); 1259 1259 unsigned long flags; 1260 1260 u32 ctrl0, cfg; 1261 1261 1262 1262 raw_spin_lock_irqsave(&chv_lock, flags); 1263 - ctrl0 = readl(chv_padreg(pctrl, pin, CHV_PADCTRL0)); 1263 + ctrl0 = readl(chv_padreg(pctrl, offset, CHV_PADCTRL0)); 1264 1264 raw_spin_unlock_irqrestore(&chv_lock, flags); 1265 1265 1266 1266 cfg = ctrl0 & CHV_PADCTRL0_GPIOCFG_MASK; ··· 1267 1281 static void chv_gpio_set(struct gpio_chip *chip, unsigned offset, int value) 1268 1282 { 1269 1283 struct chv_pinctrl *pctrl = gpiochip_get_data(chip); 1270 - unsigned pin = chv_gpio_offset_to_pin(pctrl, offset); 1271 1284 unsigned long flags; 1272 1285 void __iomem *reg; 1273 1286 u32 ctrl0; 1274 1287 1275 1288 raw_spin_lock_irqsave(&chv_lock, flags); 1276 1289 1277 - reg = chv_padreg(pctrl, pin, CHV_PADCTRL0); 1290 + reg = chv_padreg(pctrl, offset, CHV_PADCTRL0); 1278 1291 ctrl0 = readl(reg); 1279 1292 1280 1293 if (value) ··· 1289 1304 static int chv_gpio_get_direction(struct gpio_chip *chip, unsigned offset) 1290 1305 { 1291 1306 struct chv_pinctrl *pctrl = gpiochip_get_data(chip); 1292 - unsigned pin = chv_gpio_offset_to_pin(pctrl, offset); 1293 1307 u32 ctrl0, direction; 1294 1308 unsigned long flags; 1295 1309 1296 1310 raw_spin_lock_irqsave(&chv_lock, flags); 1297 - ctrl0 = readl(chv_padreg(pctrl, pin, CHV_PADCTRL0)); 1311 + ctrl0 = readl(chv_padreg(pctrl, offset, CHV_PADCTRL0)); 1298 1312 raw_spin_unlock_irqrestore(&chv_lock, flags); 1299 1313 1300 1314 direction = ctrl0 & CHV_PADCTRL0_GPIOCFG_MASK; ··· 1329 1345 { 1330 1346 struct gpio_chip *gc = irq_data_get_irq_chip_data(d); 1331 1347 struct chv_pinctrl *pctrl = gpiochip_get_data(gc); 1332 - int pin = chv_gpio_offset_to_pin(pctrl, irqd_to_hwirq(d)); 1348 + int pin = irqd_to_hwirq(d); 1333 1349 u32 intr_line; 1334 1350 1335 1351 raw_spin_lock(&chv_lock); ··· 1346 1362 { 1347 1363 struct gpio_chip *gc = irq_data_get_irq_chip_data(d); 1348 1364 struct chv_pinctrl *pctrl = gpiochip_get_data(gc); 1349 - int pin = chv_gpio_offset_to_pin(pctrl, irqd_to_hwirq(d)); 1365 + int pin = irqd_to_hwirq(d); 1350 1366 u32 value, intr_line; 1351 1367 unsigned long flags; 1352 1368 ··· 1391 1407 if (irqd_get_trigger_type(d) == IRQ_TYPE_NONE) { 1392 1408 struct gpio_chip *gc = irq_data_get_irq_chip_data(d); 1393 1409 struct chv_pinctrl *pctrl = gpiochip_get_data(gc); 1394 - unsigned offset = irqd_to_hwirq(d); 1395 - int pin = chv_gpio_offset_to_pin(pctrl, offset); 1410 + unsigned pin = irqd_to_hwirq(d); 1396 1411 irq_flow_handler_t handler; 1397 1412 unsigned long flags; 1398 1413 u32 intsel, value; ··· 1409 1426 1410 1427 if (!pctrl->intr_lines[intsel]) { 1411 1428 irq_set_handler_locked(d, handler); 1412 - pctrl->intr_lines[intsel] = offset; 1429 + pctrl->intr_lines[intsel] = pin; 1413 1430 } 1414 1431 raw_spin_unlock_irqrestore(&chv_lock, flags); 1415 1432 } ··· 1422 1439 { 1423 1440 struct gpio_chip *gc = irq_data_get_irq_chip_data(d); 1424 1441 struct chv_pinctrl *pctrl = gpiochip_get_data(gc); 1425 - unsigned offset = irqd_to_hwirq(d); 1426 - int pin = chv_gpio_offset_to_pin(pctrl, offset); 1442 + unsigned pin = irqd_to_hwirq(d); 1427 1443 unsigned long flags; 1428 1444 u32 value; 1429 1445 ··· 1468 1486 value &= CHV_PADCTRL0_INTSEL_MASK; 1469 1487 value >>= CHV_PADCTRL0_INTSEL_SHIFT; 1470 1488 1471 - pctrl->intr_lines[value] = offset; 1489 + pctrl->intr_lines[value] = pin; 1472 1490 1473 1491 if (type & IRQ_TYPE_EDGE_BOTH) 1474 1492 irq_set_handler_locked(d, handle_edge_irq); ··· 1558 1576 const struct chv_gpio_pinrange *range; 1559 1577 struct gpio_chip *chip = &pctrl->chip; 1560 1578 bool need_valid_mask = !dmi_check_system(chv_no_valid_mask); 1561 - int ret, i, offset; 1562 - int irq_base; 1579 + const struct chv_community *community = pctrl->community; 1580 + int ret, i, irq_base; 1563 1581 1564 1582 *chip = chv_gpio_chip; 1565 1583 1566 - chip->ngpio = pctrl->community->ngpios; 1584 + chip->ngpio = community->pins[community->npins - 1].number + 1; 1567 1585 chip->label = dev_name(pctrl->dev); 1568 1586 chip->parent = pctrl->dev; 1569 1587 chip->base = -1; ··· 1575 1593 return ret; 1576 1594 } 1577 1595 1578 - for (i = 0, offset = 0; i < pctrl->community->ngpio_ranges; i++) { 1579 - range = &pctrl->community->gpio_ranges[i]; 1580 - ret = gpiochip_add_pin_range(chip, dev_name(pctrl->dev), offset, 1581 - range->base, range->npins); 1596 + for (i = 0; i < community->ngpio_ranges; i++) { 1597 + range = &community->gpio_ranges[i]; 1598 + ret = gpiochip_add_pin_range(chip, dev_name(pctrl->dev), 1599 + range->base, range->base, 1600 + range->npins); 1582 1601 if (ret) { 1583 1602 dev_err(pctrl->dev, "failed to add GPIO pin range\n"); 1584 1603 return ret; 1585 1604 } 1586 - 1587 - offset += range->npins; 1588 1605 } 1589 1606 1590 1607 /* Do not add GPIOs that can only generate GPEs to the IRQ domain */ 1591 - for (i = 0; i < pctrl->community->npins; i++) { 1608 + for (i = 0; i < community->npins; i++) { 1592 1609 const struct pinctrl_pin_desc *desc; 1593 1610 u32 intsel; 1594 1611 1595 - desc = &pctrl->community->pins[i]; 1612 + desc = &community->pins[i]; 1596 1613 1597 1614 intsel = readl(chv_padreg(pctrl, desc->number, CHV_PADCTRL0)); 1598 1615 intsel &= CHV_PADCTRL0_INTSEL_MASK; 1599 1616 intsel >>= CHV_PADCTRL0_INTSEL_SHIFT; 1600 1617 1601 - if (need_valid_mask && intsel >= pctrl->community->nirqs) 1618 + if (need_valid_mask && intsel >= community->nirqs) 1602 1619 clear_bit(i, chip->irq.valid_mask); 1603 1620 } 1604 1621
+132 -47
drivers/pinctrl/intel/pinctrl-intel.c
··· 425 425 writel(value, padcfg0); 426 426 } 427 427 428 + static void intel_gpio_set_gpio_mode(void __iomem *padcfg0) 429 + { 430 + u32 value; 431 + 432 + /* Put the pad into GPIO mode */ 433 + value = readl(padcfg0) & ~PADCFG0_PMODE_MASK; 434 + /* Disable SCI/SMI/NMI generation */ 435 + value &= ~(PADCFG0_GPIROUTIOXAPIC | PADCFG0_GPIROUTSCI); 436 + value &= ~(PADCFG0_GPIROUTSMI | PADCFG0_GPIROUTNMI); 437 + writel(value, padcfg0); 438 + } 439 + 428 440 static int intel_gpio_request_enable(struct pinctrl_dev *pctldev, 429 441 struct pinctrl_gpio_range *range, 430 442 unsigned pin) ··· 444 432 struct intel_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); 445 433 void __iomem *padcfg0; 446 434 unsigned long flags; 447 - u32 value; 448 435 449 436 raw_spin_lock_irqsave(&pctrl->lock, flags); 450 437 ··· 453 442 } 454 443 455 444 padcfg0 = intel_get_padcfg(pctrl, pin, PADCFG0); 456 - /* Put the pad into GPIO mode */ 457 - value = readl(padcfg0) & ~PADCFG0_PMODE_MASK; 458 - /* Disable SCI/SMI/NMI generation */ 459 - value &= ~(PADCFG0_GPIROUTIOXAPIC | PADCFG0_GPIROUTSCI); 460 - value &= ~(PADCFG0_GPIROUTSMI | PADCFG0_GPIROUTNMI); 461 - writel(value, padcfg0); 462 - 445 + intel_gpio_set_gpio_mode(padcfg0); 463 446 /* Disable TX buffer and enable RX (this will be input) */ 464 447 __intel_gpio_set_direction(padcfg0, true); 465 448 ··· 811 806 .set_config = gpiochip_generic_config, 812 807 }; 813 808 809 + /** 810 + * intel_gpio_to_pin() - Translate from GPIO offset to pin number 811 + * @pctrl: Pinctrl structure 812 + * @offset: GPIO offset from gpiolib 813 + * @commmunity: Community is filled here if not %NULL 814 + * @padgrp: Pad group is filled here if not %NULL 815 + * 816 + * When coming through gpiolib irqchip, the GPIO offset is not 817 + * automatically translated to pinctrl pin number. This function can be 818 + * used to find out the corresponding pinctrl pin. 819 + */ 820 + static int intel_gpio_to_pin(struct intel_pinctrl *pctrl, unsigned offset, 821 + const struct intel_community **community, 822 + const struct intel_padgroup **padgrp) 823 + { 824 + int i; 825 + 826 + for (i = 0; i < pctrl->ncommunities; i++) { 827 + const struct intel_community *comm = &pctrl->communities[i]; 828 + int j; 829 + 830 + for (j = 0; j < comm->ngpps; j++) { 831 + const struct intel_padgroup *pgrp = &comm->gpps[j]; 832 + 833 + if (pgrp->gpio_base < 0) 834 + continue; 835 + 836 + if (offset >= pgrp->gpio_base && 837 + offset < pgrp->gpio_base + pgrp->size) { 838 + int pin; 839 + 840 + pin = pgrp->base + offset - pgrp->gpio_base; 841 + if (community) 842 + *community = comm; 843 + if (padgrp) 844 + *padgrp = pgrp; 845 + 846 + return pin; 847 + } 848 + } 849 + } 850 + 851 + return -EINVAL; 852 + } 853 + 814 854 static void intel_gpio_irq_ack(struct irq_data *d) 815 855 { 816 856 struct gpio_chip *gc = irq_data_get_irq_chip_data(d); 817 857 struct intel_pinctrl *pctrl = gpiochip_get_data(gc); 818 858 const struct intel_community *community; 819 - unsigned pin = irqd_to_hwirq(d); 859 + const struct intel_padgroup *padgrp; 860 + int pin; 820 861 821 - community = intel_get_community(pctrl, pin); 822 - if (community) { 823 - const struct intel_padgroup *padgrp; 862 + pin = intel_gpio_to_pin(pctrl, irqd_to_hwirq(d), &community, &padgrp); 863 + if (pin >= 0) { 824 864 unsigned gpp, gpp_offset, is_offset; 825 - 826 - padgrp = intel_community_get_padgroup(community, pin); 827 - if (!padgrp) 828 - return; 829 865 830 866 gpp = padgrp->reg_num; 831 867 gpp_offset = padgroup_offset(padgrp, pin); ··· 883 837 struct gpio_chip *gc = irq_data_get_irq_chip_data(d); 884 838 struct intel_pinctrl *pctrl = gpiochip_get_data(gc); 885 839 const struct intel_community *community; 886 - unsigned pin = irqd_to_hwirq(d); 840 + const struct intel_padgroup *padgrp; 841 + int pin; 887 842 888 - community = intel_get_community(pctrl, pin); 889 - if (community) { 890 - const struct intel_padgroup *padgrp; 843 + pin = intel_gpio_to_pin(pctrl, irqd_to_hwirq(d), &community, &padgrp); 844 + if (pin >= 0) { 891 845 unsigned gpp, gpp_offset, is_offset; 892 846 unsigned long flags; 893 847 u32 value; 894 - 895 - padgrp = intel_community_get_padgroup(community, pin); 896 - if (!padgrp) 897 - return; 898 848 899 849 gpp = padgrp->reg_num; 900 850 gpp_offset = padgroup_offset(padgrp, pin); ··· 912 870 struct gpio_chip *gc = irq_data_get_irq_chip_data(d); 913 871 struct intel_pinctrl *pctrl = gpiochip_get_data(gc); 914 872 const struct intel_community *community; 915 - unsigned pin = irqd_to_hwirq(d); 873 + const struct intel_padgroup *padgrp; 874 + int pin; 916 875 917 - community = intel_get_community(pctrl, pin); 918 - if (community) { 919 - const struct intel_padgroup *padgrp; 876 + pin = intel_gpio_to_pin(pctrl, irqd_to_hwirq(d), &community, &padgrp); 877 + if (pin >= 0) { 920 878 unsigned gpp, gpp_offset; 921 879 unsigned long flags; 922 880 void __iomem *reg; 923 881 u32 value; 924 - 925 - padgrp = intel_community_get_padgroup(community, pin); 926 - if (!padgrp) 927 - return; 928 882 929 883 gpp = padgrp->reg_num; 930 884 gpp_offset = padgroup_offset(padgrp, pin); ··· 952 914 { 953 915 struct gpio_chip *gc = irq_data_get_irq_chip_data(d); 954 916 struct intel_pinctrl *pctrl = gpiochip_get_data(gc); 955 - unsigned pin = irqd_to_hwirq(d); 917 + unsigned pin = intel_gpio_to_pin(pctrl, irqd_to_hwirq(d), NULL, NULL); 956 918 unsigned long flags; 957 919 void __iomem *reg; 958 920 u32 value; ··· 972 934 } 973 935 974 936 raw_spin_lock_irqsave(&pctrl->lock, flags); 937 + 938 + intel_gpio_set_gpio_mode(reg); 975 939 976 940 value = readl(reg); 977 941 ··· 1009 969 { 1010 970 struct gpio_chip *gc = irq_data_get_irq_chip_data(d); 1011 971 struct intel_pinctrl *pctrl = gpiochip_get_data(gc); 1012 - unsigned pin = irqd_to_hwirq(d); 972 + unsigned pin = intel_gpio_to_pin(pctrl, irqd_to_hwirq(d), NULL, NULL); 1013 973 1014 974 if (on) 1015 975 enable_irq_wake(pctrl->irq); ··· 1040 1000 pending &= enabled; 1041 1001 1042 1002 for_each_set_bit(gpp_offset, &pending, padgrp->size) { 1043 - unsigned padno, irq; 1044 - 1045 - padno = padgrp->base - community->pin_base + gpp_offset; 1046 - if (padno >= community->npins) 1047 - break; 1003 + unsigned irq; 1048 1004 1049 1005 irq = irq_find_mapping(gc->irq.domain, 1050 - community->pin_base + padno); 1006 + padgrp->gpio_base + gpp_offset); 1051 1007 generic_handle_irq(irq); 1052 1008 1053 1009 ret |= IRQ_HANDLED; ··· 1080 1044 .flags = IRQCHIP_MASK_ON_SUSPEND, 1081 1045 }; 1082 1046 1047 + static int intel_gpio_add_pin_ranges(struct intel_pinctrl *pctrl, 1048 + const struct intel_community *community) 1049 + { 1050 + int ret = 0, i; 1051 + 1052 + for (i = 0; i < community->ngpps; i++) { 1053 + const struct intel_padgroup *gpp = &community->gpps[i]; 1054 + 1055 + if (gpp->gpio_base < 0) 1056 + continue; 1057 + 1058 + ret = gpiochip_add_pin_range(&pctrl->chip, dev_name(pctrl->dev), 1059 + gpp->gpio_base, gpp->base, 1060 + gpp->size); 1061 + if (ret) 1062 + return ret; 1063 + } 1064 + 1065 + return ret; 1066 + } 1067 + 1068 + static unsigned intel_gpio_ngpio(const struct intel_pinctrl *pctrl) 1069 + { 1070 + const struct intel_community *community; 1071 + unsigned ngpio = 0; 1072 + int i, j; 1073 + 1074 + for (i = 0; i < pctrl->ncommunities; i++) { 1075 + community = &pctrl->communities[i]; 1076 + for (j = 0; j < community->ngpps; j++) { 1077 + const struct intel_padgroup *gpp = &community->gpps[j]; 1078 + 1079 + if (gpp->gpio_base < 0) 1080 + continue; 1081 + 1082 + if (gpp->gpio_base + gpp->size > ngpio) 1083 + ngpio = gpp->gpio_base + gpp->size; 1084 + } 1085 + } 1086 + 1087 + return ngpio; 1088 + } 1089 + 1083 1090 static int intel_gpio_probe(struct intel_pinctrl *pctrl, int irq) 1084 1091 { 1085 - int ret; 1092 + int ret, i; 1086 1093 1087 1094 pctrl->chip = intel_gpio_chip; 1088 1095 1089 - pctrl->chip.ngpio = pctrl->soc->npins; 1096 + pctrl->chip.ngpio = intel_gpio_ngpio(pctrl); 1090 1097 pctrl->chip.label = dev_name(pctrl->dev); 1091 1098 pctrl->chip.parent = pctrl->dev; 1092 1099 pctrl->chip.base = -1; ··· 1141 1062 return ret; 1142 1063 } 1143 1064 1144 - ret = gpiochip_add_pin_range(&pctrl->chip, dev_name(pctrl->dev), 1145 - 0, 0, pctrl->soc->npins); 1146 - if (ret) { 1147 - dev_err(pctrl->dev, "failed to add GPIO pin range\n"); 1148 - return ret; 1065 + for (i = 0; i < pctrl->ncommunities; i++) { 1066 + struct intel_community *community = &pctrl->communities[i]; 1067 + 1068 + ret = intel_gpio_add_pin_ranges(pctrl, community); 1069 + if (ret) { 1070 + dev_err(pctrl->dev, "failed to add GPIO pin range\n"); 1071 + return ret; 1072 + } 1149 1073 } 1150 1074 1151 1075 /* ··· 1207 1125 1208 1126 if (gpps[i].size > 32) 1209 1127 return -EINVAL; 1128 + 1129 + if (!gpps[i].gpio_base) 1130 + gpps[i].gpio_base = gpps[i].base; 1210 1131 1211 1132 gpps[i].padown_num = padown_num; 1212 1133
+3
drivers/pinctrl/intel/pinctrl-intel.h
··· 51 51 * @reg_num: GPI_IS register number 52 52 * @base: Starting pin of this group 53 53 * @size: Size of this group (maximum is 32). 54 + * @gpio_base: Starting GPIO base of this group (%0 if matches with @base, 55 + * and %-1 if no GPIO mapping should be created) 54 56 * @padown_num: PAD_OWN register number (assigned by the core driver) 55 57 * 56 58 * If pad groups of a community are not the same size, use this structure ··· 62 60 unsigned reg_num; 63 61 unsigned base; 64 62 unsigned size; 63 + int gpio_base; 65 64 unsigned padown_num; 66 65 }; 67 66
+7
drivers/pinctrl/intel/pinctrl-merrifield.c
··· 931 931 return 0; 932 932 } 933 933 934 + static const struct acpi_device_id mrfld_acpi_table[] = { 935 + { "INTC1002" }, 936 + { } 937 + }; 938 + MODULE_DEVICE_TABLE(acpi, mrfld_acpi_table); 939 + 934 940 static struct platform_driver mrfld_pinctrl_driver = { 935 941 .probe = mrfld_pinctrl_probe, 936 942 .driver = { 937 943 .name = "pinctrl-merrifield", 944 + .acpi_match_table = mrfld_acpi_table, 938 945 }, 939 946 }; 940 947
+13 -2
drivers/pinctrl/mediatek/Kconfig
··· 1 - if ARCH_MEDIATEK || COMPILE_TEST 1 + menu "MediaTek pinctrl drivers" 2 + depends on ARCH_MEDIATEK || COMPILE_TEST 2 3 3 4 config PINCTRL_MTK 4 5 bool ··· 32 31 select PINCTRL_MTK 33 32 34 33 # For ARMv8 SoCs 34 + config PINCTRL_MT7622 35 + bool "MediaTek MT7622 pin control" 36 + depends on OF 37 + depends on ARM64 || COMPILE_TEST 38 + select GENERIC_PINCONF 39 + select GENERIC_PINCTRL_GROUPS 40 + select GENERIC_PINMUX_FUNCTIONS 41 + select GPIOLIB 42 + select OF_GPIO 43 + 35 44 config PINCTRL_MT8173 36 45 bool "Mediatek MT8173 pin control" 37 46 depends on OF ··· 57 46 default MFD_MT6397 58 47 select PINCTRL_MTK 59 48 60 - endif 49 + endmenu
+2 -1
drivers/pinctrl/mediatek/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 2 # Core 3 - obj-y += pinctrl-mtk-common.o 3 + obj-$(CONFIG_PINCTRL_MTK) += pinctrl-mtk-common.o 4 4 5 5 # SoC Drivers 6 6 obj-$(CONFIG_PINCTRL_MT2701) += pinctrl-mt2701.o 7 7 obj-$(CONFIG_PINCTRL_MT8135) += pinctrl-mt8135.o 8 8 obj-$(CONFIG_PINCTRL_MT8127) += pinctrl-mt8127.o 9 + obj-$(CONFIG_PINCTRL_MT7622) += pinctrl-mt7622.o 9 10 obj-$(CONFIG_PINCTRL_MT8173) += pinctrl-mt8173.o 10 11 obj-$(CONFIG_PINCTRL_MT6397) += pinctrl-mt6397.o
+1597
drivers/pinctrl/mediatek/pinctrl-mt7622.c
··· 1 + /* 2 + * MediaTek MT7622 Pinctrl Driver 3 + * 4 + * Copyright (C) 2017 Sean Wang <sean.wang@mediatek.com> 5 + * 6 + * This program is free software; you can redistribute it and/or modify 7 + * it under the terms of the GNU General Public License version 2 as 8 + * published by the Free Software Foundation. 9 + * 10 + * This program is distributed in the hope that it will be useful, 11 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 + * GNU General Public License for more details. 14 + */ 15 + 16 + #include <linux/gpio.h> 17 + #include <linux/gpio/driver.h> 18 + #include <linux/io.h> 19 + #include <linux/init.h> 20 + #include <linux/mfd/syscon.h> 21 + #include <linux/of.h> 22 + #include <linux/of_platform.h> 23 + #include <linux/platform_device.h> 24 + #include <linux/pinctrl/pinctrl.h> 25 + #include <linux/pinctrl/pinmux.h> 26 + #include <linux/pinctrl/pinconf.h> 27 + #include <linux/pinctrl/pinconf-generic.h> 28 + #include <linux/regmap.h> 29 + 30 + #include "../core.h" 31 + #include "../pinconf.h" 32 + #include "../pinmux.h" 33 + 34 + #define PINCTRL_PINCTRL_DEV KBUILD_MODNAME 35 + #define MTK_RANGE(_a) { .range = (_a), .nranges = ARRAY_SIZE(_a), } 36 + #define PINCTRL_PIN_GROUP(name, id) \ 37 + { \ 38 + name, \ 39 + id##_pins, \ 40 + ARRAY_SIZE(id##_pins), \ 41 + id##_funcs, \ 42 + } 43 + 44 + #define MTK_GPIO_MODE 1 45 + #define MTK_INPUT 0 46 + #define MTK_OUTPUT 1 47 + #define MTK_DISABLE 0 48 + #define MTK_ENABLE 1 49 + 50 + /* Custom pinconf parameters */ 51 + #define MTK_PIN_CONFIG_TDSEL (PIN_CONFIG_END + 1) 52 + #define MTK_PIN_CONFIG_RDSEL (PIN_CONFIG_END + 2) 53 + 54 + /* List these attributes which could be modified for the pin */ 55 + enum { 56 + PINCTRL_PIN_REG_MODE, 57 + PINCTRL_PIN_REG_DIR, 58 + PINCTRL_PIN_REG_DI, 59 + PINCTRL_PIN_REG_DO, 60 + PINCTRL_PIN_REG_SR, 61 + PINCTRL_PIN_REG_SMT, 62 + PINCTRL_PIN_REG_PD, 63 + PINCTRL_PIN_REG_PU, 64 + PINCTRL_PIN_REG_E4, 65 + PINCTRL_PIN_REG_E8, 66 + PINCTRL_PIN_REG_TDSEL, 67 + PINCTRL_PIN_REG_RDSEL, 68 + PINCTRL_PIN_REG_MAX, 69 + }; 70 + 71 + /* struct mtk_pin_field - the structure that holds the information of the field 72 + * used to describe the attribute for the pin 73 + * @offset: the register offset relative to the base address 74 + * @mask: the mask used to filter out the field from the register 75 + * @bitpos: the start bit relative to the register 76 + * @next: the indication that the field would be extended to the 77 + next register 78 + */ 79 + struct mtk_pin_field { 80 + u32 offset; 81 + u32 mask; 82 + u8 bitpos; 83 + u8 next; 84 + }; 85 + 86 + /* struct mtk_pin_field_calc - the structure that holds the range providing 87 + * the guide used to look up the relevant field 88 + * @s_pin: the start pin within the range 89 + * @e_pin: the end pin within the range 90 + * @s_addr: the start address for the range 91 + * @x_addrs: the address distance between two consecutive registers 92 + * within the range 93 + * @s_bit: the start bit for the first register within the range 94 + * @x_bits: the bit distance between two consecutive pins within 95 + * the range 96 + */ 97 + struct mtk_pin_field_calc { 98 + u16 s_pin; 99 + u16 e_pin; 100 + u32 s_addr; 101 + u8 x_addrs; 102 + u8 s_bit; 103 + u8 x_bits; 104 + }; 105 + 106 + /* struct mtk_pin_reg_calc - the structure that holds all ranges used to 107 + * determine which register the pin would make use of 108 + * for certain pin attribute. 109 + * @range: the start address for the range 110 + * @nranges: the number of items in the range 111 + */ 112 + struct mtk_pin_reg_calc { 113 + const struct mtk_pin_field_calc *range; 114 + unsigned int nranges; 115 + }; 116 + 117 + /* struct mtk_pin_soc - the structure that holds SoC-specific data */ 118 + struct mtk_pin_soc { 119 + const struct mtk_pin_reg_calc *reg_cal; 120 + const struct pinctrl_pin_desc *pins; 121 + unsigned int npins; 122 + const struct group_desc *grps; 123 + unsigned int ngrps; 124 + const struct function_desc *funcs; 125 + unsigned int nfuncs; 126 + }; 127 + 128 + struct mtk_pinctrl { 129 + struct pinctrl_dev *pctrl; 130 + void __iomem *base; 131 + struct device *dev; 132 + struct gpio_chip chip; 133 + const struct mtk_pin_soc *soc; 134 + }; 135 + 136 + static const struct mtk_pin_field_calc mt7622_pin_mode_range[] = { 137 + {0, 0, 0x320, 0x10, 16, 4}, 138 + {1, 4, 0x3a0, 0x10, 16, 4}, 139 + {5, 5, 0x320, 0x10, 0, 4}, 140 + {6, 6, 0x300, 0x10, 4, 4}, 141 + {7, 7, 0x300, 0x10, 4, 4}, 142 + {8, 9, 0x350, 0x10, 20, 4}, 143 + {10, 10, 0x300, 0x10, 8, 4}, 144 + {11, 11, 0x300, 0x10, 8, 4}, 145 + {12, 12, 0x300, 0x10, 8, 4}, 146 + {13, 13, 0x300, 0x10, 8, 4}, 147 + {14, 15, 0x320, 0x10, 4, 4}, 148 + {16, 17, 0x320, 0x10, 20, 4}, 149 + {18, 21, 0x310, 0x10, 16, 4}, 150 + {22, 22, 0x380, 0x10, 16, 4}, 151 + {23, 23, 0x300, 0x10, 24, 4}, 152 + {24, 24, 0x300, 0x10, 24, 4}, 153 + {25, 25, 0x300, 0x10, 12, 4}, 154 + {25, 25, 0x300, 0x10, 12, 4}, 155 + {26, 26, 0x300, 0x10, 12, 4}, 156 + {27, 27, 0x300, 0x10, 12, 4}, 157 + {28, 28, 0x300, 0x10, 12, 4}, 158 + {29, 29, 0x300, 0x10, 12, 4}, 159 + {30, 30, 0x300, 0x10, 12, 4}, 160 + {31, 31, 0x300, 0x10, 12, 4}, 161 + {32, 32, 0x300, 0x10, 12, 4}, 162 + {33, 33, 0x300, 0x10, 12, 4}, 163 + {34, 34, 0x300, 0x10, 12, 4}, 164 + {35, 35, 0x300, 0x10, 12, 4}, 165 + {36, 36, 0x300, 0x10, 12, 4}, 166 + {37, 37, 0x300, 0x10, 20, 4}, 167 + {38, 38, 0x300, 0x10, 20, 4}, 168 + {39, 39, 0x300, 0x10, 20, 4}, 169 + {40, 40, 0x300, 0x10, 20, 4}, 170 + {41, 41, 0x300, 0x10, 20, 4}, 171 + {42, 42, 0x300, 0x10, 20, 4}, 172 + {43, 43, 0x300, 0x10, 20, 4}, 173 + {44, 44, 0x300, 0x10, 20, 4}, 174 + {45, 46, 0x300, 0x10, 20, 4}, 175 + {47, 47, 0x300, 0x10, 20, 4}, 176 + {48, 48, 0x300, 0x10, 20, 4}, 177 + {49, 49, 0x300, 0x10, 20, 4}, 178 + {50, 50, 0x300, 0x10, 20, 4}, 179 + {51, 70, 0x330, 0x10, 4, 4}, 180 + {71, 71, 0x300, 0x10, 16, 4}, 181 + {72, 72, 0x300, 0x10, 16, 4}, 182 + {73, 76, 0x310, 0x10, 0, 4}, 183 + {77, 77, 0x320, 0x10, 28, 4}, 184 + {78, 78, 0x320, 0x10, 12, 4}, 185 + {79, 82, 0x3a0, 0x10, 0, 4}, 186 + {83, 83, 0x350, 0x10, 28, 4}, 187 + {84, 84, 0x330, 0x10, 0, 4}, 188 + {85, 90, 0x360, 0x10, 4, 4}, 189 + {91, 94, 0x390, 0x10, 16, 4}, 190 + {95, 97, 0x380, 0x10, 20, 4}, 191 + {98, 101, 0x390, 0x10, 0, 4}, 192 + {102, 102, 0x360, 0x10, 0, 4}, 193 + }; 194 + 195 + static const struct mtk_pin_field_calc mt7622_pin_dir_range[] = { 196 + {0, 102, 0x0, 0x10, 0, 1}, 197 + }; 198 + 199 + static const struct mtk_pin_field_calc mt7622_pin_di_range[] = { 200 + {0, 102, 0x200, 0x10, 0, 1}, 201 + }; 202 + 203 + static const struct mtk_pin_field_calc mt7622_pin_do_range[] = { 204 + {0, 102, 0x100, 0x10, 0, 1}, 205 + }; 206 + 207 + static const struct mtk_pin_field_calc mt7622_pin_sr_range[] = { 208 + {0, 31, 0x910, 0x10, 0, 1}, 209 + {32, 50, 0xa10, 0x10, 0, 1}, 210 + {51, 70, 0x810, 0x10, 0, 1}, 211 + {71, 72, 0xb10, 0x10, 0, 1}, 212 + {73, 86, 0xb10, 0x10, 4, 1}, 213 + {87, 90, 0xc10, 0x10, 0, 1}, 214 + {91, 102, 0xb10, 0x10, 18, 1}, 215 + }; 216 + 217 + static const struct mtk_pin_field_calc mt7622_pin_smt_range[] = { 218 + {0, 31, 0x920, 0x10, 0, 1}, 219 + {32, 50, 0xa20, 0x10, 0, 1}, 220 + {51, 70, 0x820, 0x10, 0, 1}, 221 + {71, 72, 0xb20, 0x10, 0, 1}, 222 + {73, 86, 0xb20, 0x10, 4, 1}, 223 + {87, 90, 0xc20, 0x10, 0, 1}, 224 + {91, 102, 0xb20, 0x10, 18, 1}, 225 + }; 226 + 227 + static const struct mtk_pin_field_calc mt7622_pin_pu_range[] = { 228 + {0, 31, 0x930, 0x10, 0, 1}, 229 + {32, 50, 0xa30, 0x10, 0, 1}, 230 + {51, 70, 0x830, 0x10, 0, 1}, 231 + {71, 72, 0xb30, 0x10, 0, 1}, 232 + {73, 86, 0xb30, 0x10, 4, 1}, 233 + {87, 90, 0xc30, 0x10, 0, 1}, 234 + {91, 102, 0xb30, 0x10, 18, 1}, 235 + }; 236 + 237 + static const struct mtk_pin_field_calc mt7622_pin_pd_range[] = { 238 + {0, 31, 0x940, 0x10, 0, 1}, 239 + {32, 50, 0xa40, 0x10, 0, 1}, 240 + {51, 70, 0x840, 0x10, 0, 1}, 241 + {71, 72, 0xb40, 0x10, 0, 1}, 242 + {73, 86, 0xb40, 0x10, 4, 1}, 243 + {87, 90, 0xc40, 0x10, 0, 1}, 244 + {91, 102, 0xb40, 0x10, 18, 1}, 245 + }; 246 + 247 + static const struct mtk_pin_field_calc mt7622_pin_e4_range[] = { 248 + {0, 31, 0x960, 0x10, 0, 1}, 249 + {32, 50, 0xa60, 0x10, 0, 1}, 250 + {51, 70, 0x860, 0x10, 0, 1}, 251 + {71, 72, 0xb60, 0x10, 0, 1}, 252 + {73, 86, 0xb60, 0x10, 4, 1}, 253 + {87, 90, 0xc60, 0x10, 0, 1}, 254 + {91, 102, 0xb60, 0x10, 18, 1}, 255 + }; 256 + 257 + static const struct mtk_pin_field_calc mt7622_pin_e8_range[] = { 258 + {0, 31, 0x970, 0x10, 0, 1}, 259 + {32, 50, 0xa70, 0x10, 0, 1}, 260 + {51, 70, 0x870, 0x10, 0, 1}, 261 + {71, 72, 0xb70, 0x10, 0, 1}, 262 + {73, 86, 0xb70, 0x10, 4, 1}, 263 + {87, 90, 0xc70, 0x10, 0, 1}, 264 + {91, 102, 0xb70, 0x10, 18, 1}, 265 + }; 266 + 267 + static const struct mtk_pin_field_calc mt7622_pin_tdsel_range[] = { 268 + {0, 31, 0x980, 0x4, 0, 4}, 269 + {32, 50, 0xa80, 0x4, 0, 4}, 270 + {51, 70, 0x880, 0x4, 0, 4}, 271 + {71, 72, 0xb80, 0x4, 0, 4}, 272 + {73, 86, 0xb80, 0x4, 16, 4}, 273 + {87, 90, 0xc80, 0x4, 0, 4}, 274 + {91, 102, 0xb88, 0x4, 8, 4}, 275 + }; 276 + 277 + static const struct mtk_pin_field_calc mt7622_pin_rdsel_range[] = { 278 + {0, 31, 0x990, 0x4, 0, 6}, 279 + {32, 50, 0xa90, 0x4, 0, 6}, 280 + {51, 58, 0x890, 0x4, 0, 6}, 281 + {59, 60, 0x894, 0x4, 28, 6}, 282 + {61, 62, 0x894, 0x4, 16, 6}, 283 + {63, 66, 0x898, 0x4, 8, 6}, 284 + {67, 68, 0x89c, 0x4, 12, 6}, 285 + {69, 70, 0x89c, 0x4, 0, 6}, 286 + {71, 72, 0xb90, 0x4, 0, 6}, 287 + {73, 86, 0xb90, 0x4, 24, 6}, 288 + {87, 90, 0xc90, 0x4, 0, 6}, 289 + {91, 102, 0xb9c, 0x4, 12, 6}, 290 + }; 291 + 292 + static const struct mtk_pin_reg_calc mt7622_reg_cals[PINCTRL_PIN_REG_MAX] = { 293 + [PINCTRL_PIN_REG_MODE] = MTK_RANGE(mt7622_pin_mode_range), 294 + [PINCTRL_PIN_REG_DIR] = MTK_RANGE(mt7622_pin_dir_range), 295 + [PINCTRL_PIN_REG_DI] = MTK_RANGE(mt7622_pin_di_range), 296 + [PINCTRL_PIN_REG_DO] = MTK_RANGE(mt7622_pin_do_range), 297 + [PINCTRL_PIN_REG_SR] = MTK_RANGE(mt7622_pin_sr_range), 298 + [PINCTRL_PIN_REG_SMT] = MTK_RANGE(mt7622_pin_smt_range), 299 + [PINCTRL_PIN_REG_PU] = MTK_RANGE(mt7622_pin_pu_range), 300 + [PINCTRL_PIN_REG_PD] = MTK_RANGE(mt7622_pin_pd_range), 301 + [PINCTRL_PIN_REG_E4] = MTK_RANGE(mt7622_pin_e4_range), 302 + [PINCTRL_PIN_REG_E8] = MTK_RANGE(mt7622_pin_e8_range), 303 + [PINCTRL_PIN_REG_TDSEL] = MTK_RANGE(mt7622_pin_tdsel_range), 304 + [PINCTRL_PIN_REG_RDSEL] = MTK_RANGE(mt7622_pin_rdsel_range), 305 + }; 306 + 307 + static const struct pinctrl_pin_desc mt7622_pins[] = { 308 + PINCTRL_PIN(0, "GPIO_A"), 309 + PINCTRL_PIN(1, "I2S1_IN"), 310 + PINCTRL_PIN(2, "I2S1_OUT"), 311 + PINCTRL_PIN(3, "I2S_BCLK"), 312 + PINCTRL_PIN(4, "I2S_WS"), 313 + PINCTRL_PIN(5, "I2S_MCLK"), 314 + PINCTRL_PIN(6, "TXD0"), 315 + PINCTRL_PIN(7, "RXD0"), 316 + PINCTRL_PIN(8, "SPI_WP"), 317 + PINCTRL_PIN(9, "SPI_HOLD"), 318 + PINCTRL_PIN(10, "SPI_CLK"), 319 + PINCTRL_PIN(11, "SPI_MOSI"), 320 + PINCTRL_PIN(12, "SPI_MISO"), 321 + PINCTRL_PIN(13, "SPI_CS"), 322 + PINCTRL_PIN(14, "I2C_SDA"), 323 + PINCTRL_PIN(15, "I2C_SCL"), 324 + PINCTRL_PIN(16, "I2S2_IN"), 325 + PINCTRL_PIN(17, "I2S3_IN"), 326 + PINCTRL_PIN(18, "I2S4_IN"), 327 + PINCTRL_PIN(19, "I2S2_OUT"), 328 + PINCTRL_PIN(20, "I2S3_OUT"), 329 + PINCTRL_PIN(21, "I2S4_OUT"), 330 + PINCTRL_PIN(22, "GPIO_B"), 331 + PINCTRL_PIN(23, "MDC"), 332 + PINCTRL_PIN(24, "MDIO"), 333 + PINCTRL_PIN(25, "G2_TXD0"), 334 + PINCTRL_PIN(26, "G2_TXD1"), 335 + PINCTRL_PIN(27, "G2_TXD2"), 336 + PINCTRL_PIN(28, "G2_TXD3"), 337 + PINCTRL_PIN(29, "G2_TXEN"), 338 + PINCTRL_PIN(30, "G2_TXC"), 339 + PINCTRL_PIN(31, "G2_RXD0"), 340 + PINCTRL_PIN(32, "G2_RXD1"), 341 + PINCTRL_PIN(33, "G2_RXD2"), 342 + PINCTRL_PIN(34, "G2_RXD3"), 343 + PINCTRL_PIN(35, "G2_RXDV"), 344 + PINCTRL_PIN(36, "G2_RXC"), 345 + PINCTRL_PIN(37, "NCEB"), 346 + PINCTRL_PIN(38, "NWEB"), 347 + PINCTRL_PIN(39, "NREB"), 348 + PINCTRL_PIN(40, "NDL4"), 349 + PINCTRL_PIN(41, "NDL5"), 350 + PINCTRL_PIN(42, "NDL6"), 351 + PINCTRL_PIN(43, "NDL7"), 352 + PINCTRL_PIN(44, "NRB"), 353 + PINCTRL_PIN(45, "NCLE"), 354 + PINCTRL_PIN(46, "NALE"), 355 + PINCTRL_PIN(47, "NDL0"), 356 + PINCTRL_PIN(48, "NDL1"), 357 + PINCTRL_PIN(49, "NDL2"), 358 + PINCTRL_PIN(50, "NDL3"), 359 + PINCTRL_PIN(51, "MDI_TP_P0"), 360 + PINCTRL_PIN(52, "MDI_TN_P0"), 361 + PINCTRL_PIN(53, "MDI_RP_P0"), 362 + PINCTRL_PIN(54, "MDI_RN_P0"), 363 + PINCTRL_PIN(55, "MDI_TP_P1"), 364 + PINCTRL_PIN(56, "MDI_TN_P1"), 365 + PINCTRL_PIN(57, "MDI_RP_P1"), 366 + PINCTRL_PIN(58, "MDI_RN_P1"), 367 + PINCTRL_PIN(59, "MDI_RP_P2"), 368 + PINCTRL_PIN(60, "MDI_RN_P2"), 369 + PINCTRL_PIN(61, "MDI_TP_P2"), 370 + PINCTRL_PIN(62, "MDI_TN_P2"), 371 + PINCTRL_PIN(63, "MDI_TP_P3"), 372 + PINCTRL_PIN(64, "MDI_TN_P3"), 373 + PINCTRL_PIN(65, "MDI_RP_P3"), 374 + PINCTRL_PIN(66, "MDI_RN_P3"), 375 + PINCTRL_PIN(67, "MDI_RP_P4"), 376 + PINCTRL_PIN(68, "MDI_RN_P4"), 377 + PINCTRL_PIN(69, "MDI_TP_P4"), 378 + PINCTRL_PIN(70, "MDI_TN_P4"), 379 + PINCTRL_PIN(71, "PMIC_SCL"), 380 + PINCTRL_PIN(72, "PMIC_SDA"), 381 + PINCTRL_PIN(73, "SPIC1_CLK"), 382 + PINCTRL_PIN(74, "SPIC1_MOSI"), 383 + PINCTRL_PIN(75, "SPIC1_MISO"), 384 + PINCTRL_PIN(76, "SPIC1_CS"), 385 + PINCTRL_PIN(77, "GPIO_D"), 386 + PINCTRL_PIN(78, "WATCHDOG"), 387 + PINCTRL_PIN(79, "RTS3_N"), 388 + PINCTRL_PIN(80, "CTS3_N"), 389 + PINCTRL_PIN(81, "TXD3"), 390 + PINCTRL_PIN(82, "RXD3"), 391 + PINCTRL_PIN(83, "PERST0_N"), 392 + PINCTRL_PIN(84, "PERST1_N"), 393 + PINCTRL_PIN(85, "WLED_N"), 394 + PINCTRL_PIN(86, "EPHY_LED0_N"), 395 + PINCTRL_PIN(87, "AUXIN0"), 396 + PINCTRL_PIN(88, "AUXIN1"), 397 + PINCTRL_PIN(89, "AUXIN2"), 398 + PINCTRL_PIN(90, "AUXIN3"), 399 + PINCTRL_PIN(91, "TXD4"), 400 + PINCTRL_PIN(92, "RXD4"), 401 + PINCTRL_PIN(93, "RTS4_N"), 402 + PINCTRL_PIN(94, "CTS4_N"), 403 + PINCTRL_PIN(95, "PWM1"), 404 + PINCTRL_PIN(96, "PWM2"), 405 + PINCTRL_PIN(97, "PWM3"), 406 + PINCTRL_PIN(98, "PWM4"), 407 + PINCTRL_PIN(99, "PWM5"), 408 + PINCTRL_PIN(100, "PWM6"), 409 + PINCTRL_PIN(101, "PWM7"), 410 + PINCTRL_PIN(102, "GPIO_E"), 411 + }; 412 + 413 + /* List all groups consisting of these pins dedicated to the enablement of 414 + * certain hardware block and the corresponding mode for all of the pins. The 415 + * hardware probably has multiple combinations of these pinouts. 416 + */ 417 + 418 + /* EMMC */ 419 + static int mt7622_emmc_pins[] = { 40, 41, 42, 43, 44, 45, 47, 48, 49, 50, }; 420 + static int mt7622_emmc_funcs[] = { 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, }; 421 + 422 + static int mt7622_emmc_rst_pins[] = { 37, }; 423 + static int mt7622_emmc_rst_funcs[] = { 1, }; 424 + 425 + /* LED for EPHY */ 426 + static int mt7622_ephy_leds_pins[] = { 86, 91, 92, 93, 94, }; 427 + static int mt7622_ephy_leds_funcs[] = { 0, 0, 0, 0, 0, }; 428 + static int mt7622_ephy0_led_pins[] = { 86, }; 429 + static int mt7622_ephy0_led_funcs[] = { 0, }; 430 + static int mt7622_ephy1_led_pins[] = { 91, }; 431 + static int mt7622_ephy1_led_funcs[] = { 2, }; 432 + static int mt7622_ephy2_led_pins[] = { 92, }; 433 + static int mt7622_ephy2_led_funcs[] = { 2, }; 434 + static int mt7622_ephy3_led_pins[] = { 93, }; 435 + static int mt7622_ephy3_led_funcs[] = { 2, }; 436 + static int mt7622_ephy4_led_pins[] = { 94, }; 437 + static int mt7622_ephy4_led_funcs[] = { 2, }; 438 + 439 + /* Embedded Switch */ 440 + static int mt7622_esw_pins[] = { 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 441 + 62, 63, 64, 65, 66, 67, 68, 69, 70, }; 442 + static int mt7622_esw_funcs[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 443 + 0, 0, 0, 0, 0, 0, 0, 0, 0, }; 444 + static int mt7622_esw_p0_p1_pins[] = { 51, 52, 53, 54, 55, 56, 57, 58, }; 445 + static int mt7622_esw_p0_p1_funcs[] = { 0, 0, 0, 0, 0, 0, 0, 0, }; 446 + static int mt7622_esw_p2_p3_p4_pins[] = { 59, 60, 61, 62, 63, 64, 65, 66, 67, 447 + 68, 69, 70, }; 448 + static int mt7622_esw_p2_p3_p4_funcs[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 449 + 0, 0, 0, }; 450 + /* RGMII via ESW */ 451 + static int mt7622_rgmii_via_esw_pins[] = { 59, 60, 61, 62, 63, 64, 65, 66, 452 + 67, 68, 69, 70, }; 453 + static int mt7622_rgmii_via_esw_funcs[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 454 + 0, }; 455 + 456 + /* RGMII via GMAC1 */ 457 + static int mt7622_rgmii_via_gmac1_pins[] = { 59, 60, 61, 62, 63, 64, 65, 66, 458 + 67, 68, 69, 70, }; 459 + static int mt7622_rgmii_via_gmac1_funcs[] = { 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 460 + 2, }; 461 + 462 + /* RGMII via GMAC2 */ 463 + static int mt7622_rgmii_via_gmac2_pins[] = { 25, 26, 27, 28, 29, 30, 31, 32, 464 + 33, 34, 35, 36, }; 465 + static int mt7622_rgmii_via_gmac2_funcs[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 466 + 0, }; 467 + 468 + /* I2C */ 469 + static int mt7622_i2c0_pins[] = { 14, 15, }; 470 + static int mt7622_i2c0_funcs[] = { 0, 0, }; 471 + static int mt7622_i2c1_0_pins[] = { 55, 56, }; 472 + static int mt7622_i2c1_0_funcs[] = { 0, 0, }; 473 + static int mt7622_i2c1_1_pins[] = { 73, 74, }; 474 + static int mt7622_i2c1_1_funcs[] = { 3, 3, }; 475 + static int mt7622_i2c1_2_pins[] = { 87, 88, }; 476 + static int mt7622_i2c1_2_funcs[] = { 0, 0, }; 477 + static int mt7622_i2c2_0_pins[] = { 57, 58, }; 478 + static int mt7622_i2c2_0_funcs[] = { 0, 0, }; 479 + static int mt7622_i2c2_1_pins[] = { 75, 76, }; 480 + static int mt7622_i2c2_1_funcs[] = { 3, 3, }; 481 + static int mt7622_i2c2_2_pins[] = { 89, 90, }; 482 + static int mt7622_i2c2_2_funcs[] = { 0, 0, }; 483 + 484 + /* I2S */ 485 + static int mt7622_i2s_in_mclk_bclk_ws_pins[] = { 3, 4, 5, }; 486 + static int mt7622_i2s_in_mclk_bclk_ws_funcs[] = { 3, 3, 0, }; 487 + static int mt7622_i2s1_in_data_pins[] = { 1, }; 488 + static int mt7622_i2s1_in_data_funcs[] = { 0, }; 489 + static int mt7622_i2s2_in_data_pins[] = { 16, }; 490 + static int mt7622_i2s2_in_data_funcs[] = { 0, }; 491 + static int mt7622_i2s3_in_data_pins[] = { 17, }; 492 + static int mt7622_i2s3_in_data_funcs[] = { 0, }; 493 + static int mt7622_i2s4_in_data_pins[] = { 18, }; 494 + static int mt7622_i2s4_in_data_funcs[] = { 0, }; 495 + static int mt7622_i2s_out_mclk_bclk_ws_pins[] = { 3, 4, 5, }; 496 + static int mt7622_i2s_out_mclk_bclk_ws_funcs[] = { 0, 0, 0, }; 497 + static int mt7622_i2s1_out_data_pins[] = { 2, }; 498 + static int mt7622_i2s1_out_data_funcs[] = { 0, }; 499 + static int mt7622_i2s2_out_data_pins[] = { 19, }; 500 + static int mt7622_i2s2_out_data_funcs[] = { 0, }; 501 + static int mt7622_i2s3_out_data_pins[] = { 20, }; 502 + static int mt7622_i2s3_out_data_funcs[] = { 0, }; 503 + static int mt7622_i2s4_out_data_pins[] = { 21, }; 504 + static int mt7622_i2s4_out_data_funcs[] = { 0, }; 505 + 506 + /* IR */ 507 + static int mt7622_ir_0_tx_pins[] = { 16, }; 508 + static int mt7622_ir_0_tx_funcs[] = { 4, }; 509 + static int mt7622_ir_1_tx_pins[] = { 59, }; 510 + static int mt7622_ir_1_tx_funcs[] = { 5, }; 511 + static int mt7622_ir_2_tx_pins[] = { 99, }; 512 + static int mt7622_ir_2_tx_funcs[] = { 3, }; 513 + static int mt7622_ir_0_rx_pins[] = { 17, }; 514 + static int mt7622_ir_0_rx_funcs[] = { 4, }; 515 + static int mt7622_ir_1_rx_pins[] = { 60, }; 516 + static int mt7622_ir_1_rx_funcs[] = { 5, }; 517 + static int mt7622_ir_2_rx_pins[] = { 100, }; 518 + static int mt7622_ir_2_rx_funcs[] = { 3, }; 519 + 520 + /* MDIO */ 521 + static int mt7622_mdc_mdio_pins[] = { 23, 24, }; 522 + static int mt7622_mdc_mdio_funcs[] = { 0, 0, }; 523 + 524 + /* PCIE */ 525 + static int mt7622_pcie0_0_waken_pins[] = { 14, }; 526 + static int mt7622_pcie0_0_waken_funcs[] = { 2, }; 527 + static int mt7622_pcie0_0_clkreq_pins[] = { 15, }; 528 + static int mt7622_pcie0_0_clkreq_funcs[] = { 2, }; 529 + static int mt7622_pcie0_1_waken_pins[] = { 79, }; 530 + static int mt7622_pcie0_1_waken_funcs[] = { 4, }; 531 + static int mt7622_pcie0_1_clkreq_pins[] = { 80, }; 532 + static int mt7622_pcie0_1_clkreq_funcs[] = { 4, }; 533 + static int mt7622_pcie1_0_waken_pins[] = { 14, }; 534 + static int mt7622_pcie1_0_waken_funcs[] = { 3, }; 535 + static int mt7622_pcie1_0_clkreq_pins[] = { 15, }; 536 + static int mt7622_pcie1_0_clkreq_funcs[] = { 3, }; 537 + 538 + static int mt7622_pcie0_pad_perst_pins[] = { 83, }; 539 + static int mt7622_pcie0_pad_perst_funcs[] = { 0, }; 540 + static int mt7622_pcie1_pad_perst_pins[] = { 84, }; 541 + static int mt7622_pcie1_pad_perst_funcs[] = { 0, }; 542 + 543 + /* PMIC bus */ 544 + static int mt7622_pmic_bus_pins[] = { 71, 72, }; 545 + static int mt7622_pmic_bus_funcs[] = { 0, 0, }; 546 + 547 + /* Parallel NAND */ 548 + static int mt7622_pnand_pins[] = { 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 549 + 48, 49, 50, }; 550 + static int mt7622_pnand_funcs[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 551 + 0, }; 552 + 553 + /* PWM */ 554 + static int mt7622_pwm_ch1_0_pins[] = { 51, }; 555 + static int mt7622_pwm_ch1_0_funcs[] = { 3, }; 556 + static int mt7622_pwm_ch1_1_pins[] = { 73, }; 557 + static int mt7622_pwm_ch1_1_funcs[] = { 4, }; 558 + static int mt7622_pwm_ch1_2_pins[] = { 95, }; 559 + static int mt7622_pwm_ch1_2_funcs[] = { 0, }; 560 + static int mt7622_pwm_ch2_0_pins[] = { 52, }; 561 + static int mt7622_pwm_ch2_0_funcs[] = { 3, }; 562 + static int mt7622_pwm_ch2_1_pins[] = { 74, }; 563 + static int mt7622_pwm_ch2_1_funcs[] = { 4, }; 564 + static int mt7622_pwm_ch2_2_pins[] = { 96, }; 565 + static int mt7622_pwm_ch2_2_funcs[] = { 0, }; 566 + static int mt7622_pwm_ch3_0_pins[] = { 53, }; 567 + static int mt7622_pwm_ch3_0_funcs[] = { 3, }; 568 + static int mt7622_pwm_ch3_1_pins[] = { 75, }; 569 + static int mt7622_pwm_ch3_1_funcs[] = { 4, }; 570 + static int mt7622_pwm_ch3_2_pins[] = { 97, }; 571 + static int mt7622_pwm_ch3_2_funcs[] = { 0, }; 572 + static int mt7622_pwm_ch4_0_pins[] = { 54, }; 573 + static int mt7622_pwm_ch4_0_funcs[] = { 3, }; 574 + static int mt7622_pwm_ch4_1_pins[] = { 67, }; 575 + static int mt7622_pwm_ch4_1_funcs[] = { 3, }; 576 + static int mt7622_pwm_ch4_2_pins[] = { 76, }; 577 + static int mt7622_pwm_ch4_2_funcs[] = { 4, }; 578 + static int mt7622_pwm_ch4_3_pins[] = { 98, }; 579 + static int mt7622_pwm_ch4_3_funcs[] = { 0, }; 580 + static int mt7622_pwm_ch5_0_pins[] = { 68, }; 581 + static int mt7622_pwm_ch5_0_funcs[] = { 3, }; 582 + static int mt7622_pwm_ch5_1_pins[] = { 77, }; 583 + static int mt7622_pwm_ch5_1_funcs[] = { 4, }; 584 + static int mt7622_pwm_ch5_2_pins[] = { 99, }; 585 + static int mt7622_pwm_ch5_2_funcs[] = { 0, }; 586 + static int mt7622_pwm_ch6_0_pins[] = { 69, }; 587 + static int mt7622_pwm_ch6_0_funcs[] = { 3, }; 588 + static int mt7622_pwm_ch6_1_pins[] = { 78, }; 589 + static int mt7622_pwm_ch6_1_funcs[] = { 4, }; 590 + static int mt7622_pwm_ch6_2_pins[] = { 81, }; 591 + static int mt7622_pwm_ch6_2_funcs[] = { 4, }; 592 + static int mt7622_pwm_ch6_3_pins[] = { 100, }; 593 + static int mt7622_pwm_ch6_3_funcs[] = { 0, }; 594 + static int mt7622_pwm_ch7_0_pins[] = { 70, }; 595 + static int mt7622_pwm_ch7_0_funcs[] = { 3, }; 596 + static int mt7622_pwm_ch7_1_pins[] = { 82, }; 597 + static int mt7622_pwm_ch7_1_funcs[] = { 4, }; 598 + static int mt7622_pwm_ch7_2_pins[] = { 101, }; 599 + static int mt7622_pwm_ch7_2_funcs[] = { 0, }; 600 + 601 + /* SD */ 602 + static int mt7622_sd_0_pins[] = { 16, 17, 18, 19, 20, 21, }; 603 + static int mt7622_sd_0_funcs[] = { 2, 2, 2, 2, 2, 2, }; 604 + static int mt7622_sd_1_pins[] = { 25, 26, 27, 28, 29, 30, }; 605 + static int mt7622_sd_1_funcs[] = { 2, 2, 2, 2, 2, 2, }; 606 + 607 + /* Serial NAND */ 608 + static int mt7622_snfi_pins[] = { 8, 9, 10, 11, 12, 13, }; 609 + static int mt7622_snfi_funcs[] = { 2, 2, 2, 2, 2, 2, }; 610 + 611 + /* SPI NOR */ 612 + static int mt7622_spi_pins[] = { 8, 9, 10, 11, 12, 13 }; 613 + static int mt7622_spi_funcs[] = { 0, 0, 0, 0, 0, 0, }; 614 + 615 + /* SPIC */ 616 + static int mt7622_spic0_0_pins[] = { 63, 64, 65, 66, }; 617 + static int mt7622_spic0_0_funcs[] = { 4, 4, 4, 4, }; 618 + static int mt7622_spic0_1_pins[] = { 79, 80, 81, 82, }; 619 + static int mt7622_spic0_1_funcs[] = { 3, 3, 3, 3, }; 620 + static int mt7622_spic1_0_pins[] = { 67, 68, 69, 70, }; 621 + static int mt7622_spic1_0_funcs[] = { 4, 4, 4, 4, }; 622 + static int mt7622_spic1_1_pins[] = { 73, 74, 75, 76, }; 623 + static int mt7622_spic1_1_funcs[] = { 0, 0, 0, 0, }; 624 + static int mt7622_spic2_0_pins[] = { 10, 11, 12, 13, }; 625 + static int mt7622_spic2_0_funcs[] = { 0, 0, 0, 0, }; 626 + static int mt7622_spic2_0_wp_hold_pins[] = { 8, 9, }; 627 + static int mt7622_spic2_0_wp_hold_funcs[] = { 0, 0, }; 628 + 629 + /* TDM */ 630 + static int mt7622_tdm_0_out_mclk_bclk_ws_pins[] = { 8, 9, 10, }; 631 + static int mt7622_tdm_0_out_mclk_bclk_ws_funcs[] = { 3, 3, 3, }; 632 + static int mt7622_tdm_0_in_mclk_bclk_ws_pins[] = { 11, 12, 13, }; 633 + static int mt7622_tdm_0_in_mclk_bclk_ws_funcs[] = { 3, 3, 3, }; 634 + static int mt7622_tdm_0_out_data_pins[] = { 20, }; 635 + static int mt7622_tdm_0_out_data_funcs[] = { 3, }; 636 + static int mt7622_tdm_0_in_data_pins[] = { 21, }; 637 + static int mt7622_tdm_0_in_data_funcs[] = { 3, }; 638 + static int mt7622_tdm_1_out_mclk_bclk_ws_pins[] = { 57, 58, 59, }; 639 + static int mt7622_tdm_1_out_mclk_bclk_ws_funcs[] = { 3, 3, 3, }; 640 + static int mt7622_tdm_1_in_mclk_bclk_ws_pins[] = { 60, 61, 62, }; 641 + static int mt7622_tdm_1_in_mclk_bclk_ws_funcs[] = { 3, 3, 3, }; 642 + static int mt7622_tdm_1_out_data_pins[] = { 55, }; 643 + static int mt7622_tdm_1_out_data_funcs[] = { 3, }; 644 + static int mt7622_tdm_1_in_data_pins[] = { 56, }; 645 + static int mt7622_tdm_1_in_data_funcs[] = { 3, }; 646 + 647 + /* UART */ 648 + static int mt7622_uart0_0_tx_rx_pins[] = { 6, 7, }; 649 + static int mt7622_uart0_0_tx_rx_funcs[] = { 0, 0, }; 650 + static int mt7622_uart1_0_tx_rx_pins[] = { 55, 56, }; 651 + static int mt7622_uart1_0_tx_rx_funcs[] = { 2, 2, }; 652 + static int mt7622_uart1_0_rts_cts_pins[] = { 57, 58, }; 653 + static int mt7622_uart1_0_rts_cts_funcs[] = { 2, 2, }; 654 + static int mt7622_uart1_1_tx_rx_pins[] = { 73, 74, }; 655 + static int mt7622_uart1_1_tx_rx_funcs[] = { 2, 2, }; 656 + static int mt7622_uart1_1_rts_cts_pins[] = { 75, 76, }; 657 + static int mt7622_uart1_1_rts_cts_funcs[] = { 2, 2, }; 658 + static int mt7622_uart2_0_tx_rx_pins[] = { 3, 4, }; 659 + static int mt7622_uart2_0_tx_rx_funcs[] = { 2, 2, }; 660 + static int mt7622_uart2_0_rts_cts_pins[] = { 1, 2, }; 661 + static int mt7622_uart2_0_rts_cts_funcs[] = { 2, 2, }; 662 + static int mt7622_uart2_1_tx_rx_pins[] = { 51, 52, }; 663 + static int mt7622_uart2_1_tx_rx_funcs[] = { 0, 0, }; 664 + static int mt7622_uart2_1_rts_cts_pins[] = { 53, 54, }; 665 + static int mt7622_uart2_1_rts_cts_funcs[] = { 0, 0, }; 666 + static int mt7622_uart2_2_tx_rx_pins[] = { 59, 60, }; 667 + static int mt7622_uart2_2_tx_rx_funcs[] = { 4, 4, }; 668 + static int mt7622_uart2_2_rts_cts_pins[] = { 61, 62, }; 669 + static int mt7622_uart2_2_rts_cts_funcs[] = { 4, 4, }; 670 + static int mt7622_uart2_3_tx_rx_pins[] = { 95, 96, }; 671 + static int mt7622_uart2_3_tx_rx_funcs[] = { 3, 3, }; 672 + static int mt7622_uart3_0_tx_rx_pins[] = { 57, 58, }; 673 + static int mt7622_uart3_0_tx_rx_funcs[] = { 5, 5, }; 674 + static int mt7622_uart3_1_tx_rx_pins[] = { 81, 82, }; 675 + static int mt7622_uart3_1_tx_rx_funcs[] = { 0, 0, }; 676 + static int mt7622_uart3_1_rts_cts_pins[] = { 79, 80, }; 677 + static int mt7622_uart3_1_rts_cts_funcs[] = { 0, 0, }; 678 + static int mt7622_uart4_0_tx_rx_pins[] = { 61, 62, }; 679 + static int mt7622_uart4_0_tx_rx_funcs[] = { 5, 5, }; 680 + static int mt7622_uart4_1_tx_rx_pins[] = { 91, 92, }; 681 + static int mt7622_uart4_1_tx_rx_funcs[] = { 0, 0, }; 682 + static int mt7622_uart4_1_rts_cts_pins[] = { 93, 94 }; 683 + static int mt7622_uart4_1_rts_cts_funcs[] = { 0, 0, }; 684 + static int mt7622_uart4_2_tx_rx_pins[] = { 97, 98, }; 685 + static int mt7622_uart4_2_tx_rx_funcs[] = { 2, 2, }; 686 + static int mt7622_uart4_2_rts_cts_pins[] = { 95, 96 }; 687 + static int mt7622_uart4_2_rts_cts_funcs[] = { 2, 2, }; 688 + 689 + /* Watchdog */ 690 + static int mt7622_watchdog_pins[] = { 78, }; 691 + static int mt7622_watchdog_funcs[] = { 0, }; 692 + 693 + /* WLAN LED */ 694 + static int mt7622_wled_pins[] = { 85, }; 695 + static int mt7622_wled_funcs[] = { 0, }; 696 + 697 + static const struct group_desc mt7622_groups[] = { 698 + PINCTRL_PIN_GROUP("emmc", mt7622_emmc), 699 + PINCTRL_PIN_GROUP("emmc_rst", mt7622_emmc_rst), 700 + PINCTRL_PIN_GROUP("ephy_leds", mt7622_ephy_leds), 701 + PINCTRL_PIN_GROUP("ephy0_led", mt7622_ephy0_led), 702 + PINCTRL_PIN_GROUP("ephy1_led", mt7622_ephy1_led), 703 + PINCTRL_PIN_GROUP("ephy2_led", mt7622_ephy2_led), 704 + PINCTRL_PIN_GROUP("ephy3_led", mt7622_ephy3_led), 705 + PINCTRL_PIN_GROUP("ephy4_led", mt7622_ephy4_led), 706 + PINCTRL_PIN_GROUP("esw", mt7622_esw), 707 + PINCTRL_PIN_GROUP("esw_p0_p1", mt7622_esw_p0_p1), 708 + PINCTRL_PIN_GROUP("esw_p2_p3_p4", mt7622_esw_p2_p3_p4), 709 + PINCTRL_PIN_GROUP("rgmii_via_esw", mt7622_rgmii_via_esw), 710 + PINCTRL_PIN_GROUP("rgmii_via_gmac1", mt7622_rgmii_via_gmac1), 711 + PINCTRL_PIN_GROUP("rgmii_via_gmac2", mt7622_rgmii_via_gmac2), 712 + PINCTRL_PIN_GROUP("i2c0", mt7622_i2c0), 713 + PINCTRL_PIN_GROUP("i2c1_0", mt7622_i2c1_0), 714 + PINCTRL_PIN_GROUP("i2c1_1", mt7622_i2c1_1), 715 + PINCTRL_PIN_GROUP("i2c1_2", mt7622_i2c1_2), 716 + PINCTRL_PIN_GROUP("i2c2_0", mt7622_i2c2_0), 717 + PINCTRL_PIN_GROUP("i2c2_1", mt7622_i2c2_1), 718 + PINCTRL_PIN_GROUP("i2c2_2", mt7622_i2c2_2), 719 + PINCTRL_PIN_GROUP("i2s_out_mclk_bclk_ws", mt7622_i2s_out_mclk_bclk_ws), 720 + PINCTRL_PIN_GROUP("i2s_in_mclk_bclk_ws", mt7622_i2s_in_mclk_bclk_ws), 721 + PINCTRL_PIN_GROUP("i2s1_in_data", mt7622_i2s1_in_data), 722 + PINCTRL_PIN_GROUP("i2s2_in_data", mt7622_i2s2_in_data), 723 + PINCTRL_PIN_GROUP("i2s3_in_data", mt7622_i2s3_in_data), 724 + PINCTRL_PIN_GROUP("i2s4_in_data", mt7622_i2s4_in_data), 725 + PINCTRL_PIN_GROUP("i2s1_out_data", mt7622_i2s1_out_data), 726 + PINCTRL_PIN_GROUP("i2s2_out_data", mt7622_i2s2_out_data), 727 + PINCTRL_PIN_GROUP("i2s3_out_data", mt7622_i2s3_out_data), 728 + PINCTRL_PIN_GROUP("i2s4_out_data", mt7622_i2s4_out_data), 729 + PINCTRL_PIN_GROUP("ir_0_tx", mt7622_ir_0_tx), 730 + PINCTRL_PIN_GROUP("ir_1_tx", mt7622_ir_1_tx), 731 + PINCTRL_PIN_GROUP("ir_2_tx", mt7622_ir_2_tx), 732 + PINCTRL_PIN_GROUP("ir_0_rx", mt7622_ir_0_rx), 733 + PINCTRL_PIN_GROUP("ir_1_rx", mt7622_ir_1_rx), 734 + PINCTRL_PIN_GROUP("ir_2_rx", mt7622_ir_2_rx), 735 + PINCTRL_PIN_GROUP("mdc_mdio", mt7622_mdc_mdio), 736 + PINCTRL_PIN_GROUP("pcie0_0_waken", mt7622_pcie0_0_waken), 737 + PINCTRL_PIN_GROUP("pcie0_0_clkreq", mt7622_pcie0_0_clkreq), 738 + PINCTRL_PIN_GROUP("pcie0_1_waken", mt7622_pcie0_1_waken), 739 + PINCTRL_PIN_GROUP("pcie0_1_clkreq", mt7622_pcie0_1_clkreq), 740 + PINCTRL_PIN_GROUP("pcie1_0_waken", mt7622_pcie1_0_waken), 741 + PINCTRL_PIN_GROUP("pcie1_0_clkreq", mt7622_pcie1_0_clkreq), 742 + PINCTRL_PIN_GROUP("pcie0_pad_perst", mt7622_pcie0_pad_perst), 743 + PINCTRL_PIN_GROUP("pcie1_pad_perst", mt7622_pcie1_pad_perst), 744 + PINCTRL_PIN_GROUP("par_nand", mt7622_pnand), 745 + PINCTRL_PIN_GROUP("pmic_bus", mt7622_pmic_bus), 746 + PINCTRL_PIN_GROUP("pwm_ch1_0", mt7622_pwm_ch1_0), 747 + PINCTRL_PIN_GROUP("pwm_ch1_1", mt7622_pwm_ch1_1), 748 + PINCTRL_PIN_GROUP("pwm_ch1_2", mt7622_pwm_ch1_2), 749 + PINCTRL_PIN_GROUP("pwm_ch2_0", mt7622_pwm_ch2_0), 750 + PINCTRL_PIN_GROUP("pwm_ch2_1", mt7622_pwm_ch2_1), 751 + PINCTRL_PIN_GROUP("pwm_ch2_2", mt7622_pwm_ch2_2), 752 + PINCTRL_PIN_GROUP("pwm_ch3_0", mt7622_pwm_ch3_0), 753 + PINCTRL_PIN_GROUP("pwm_ch3_1", mt7622_pwm_ch3_1), 754 + PINCTRL_PIN_GROUP("pwm_ch3_2", mt7622_pwm_ch3_2), 755 + PINCTRL_PIN_GROUP("pwm_ch4_0", mt7622_pwm_ch4_0), 756 + PINCTRL_PIN_GROUP("pwm_ch4_1", mt7622_pwm_ch4_1), 757 + PINCTRL_PIN_GROUP("pwm_ch4_2", mt7622_pwm_ch4_2), 758 + PINCTRL_PIN_GROUP("pwm_ch4_3", mt7622_pwm_ch4_3), 759 + PINCTRL_PIN_GROUP("pwm_ch5_0", mt7622_pwm_ch5_0), 760 + PINCTRL_PIN_GROUP("pwm_ch5_1", mt7622_pwm_ch5_1), 761 + PINCTRL_PIN_GROUP("pwm_ch5_2", mt7622_pwm_ch5_2), 762 + PINCTRL_PIN_GROUP("pwm_ch6_0", mt7622_pwm_ch6_0), 763 + PINCTRL_PIN_GROUP("pwm_ch6_1", mt7622_pwm_ch6_1), 764 + PINCTRL_PIN_GROUP("pwm_ch6_2", mt7622_pwm_ch6_2), 765 + PINCTRL_PIN_GROUP("pwm_ch6_3", mt7622_pwm_ch6_3), 766 + PINCTRL_PIN_GROUP("pwm_ch7_0", mt7622_pwm_ch7_0), 767 + PINCTRL_PIN_GROUP("pwm_ch7_1", mt7622_pwm_ch7_1), 768 + PINCTRL_PIN_GROUP("pwm_ch7_2", mt7622_pwm_ch7_2), 769 + PINCTRL_PIN_GROUP("sd_0", mt7622_sd_0), 770 + PINCTRL_PIN_GROUP("sd_1", mt7622_sd_1), 771 + PINCTRL_PIN_GROUP("snfi", mt7622_snfi), 772 + PINCTRL_PIN_GROUP("spi_nor", mt7622_spi), 773 + PINCTRL_PIN_GROUP("spic0_0", mt7622_spic0_0), 774 + PINCTRL_PIN_GROUP("spic0_1", mt7622_spic0_1), 775 + PINCTRL_PIN_GROUP("spic1_0", mt7622_spic1_0), 776 + PINCTRL_PIN_GROUP("spic1_1", mt7622_spic1_1), 777 + PINCTRL_PIN_GROUP("spic2_0", mt7622_spic2_0), 778 + PINCTRL_PIN_GROUP("spic2_0_wp_hold", mt7622_spic2_0_wp_hold), 779 + PINCTRL_PIN_GROUP("tdm_0_out_mclk_bclk_ws", 780 + mt7622_tdm_0_out_mclk_bclk_ws), 781 + PINCTRL_PIN_GROUP("tdm_0_in_mclk_bclk_ws", 782 + mt7622_tdm_0_in_mclk_bclk_ws), 783 + PINCTRL_PIN_GROUP("tdm_0_out_data", mt7622_tdm_0_out_data), 784 + PINCTRL_PIN_GROUP("tdm_0_in_data", mt7622_tdm_0_in_data), 785 + PINCTRL_PIN_GROUP("tdm_1_out_mclk_bclk_ws", 786 + mt7622_tdm_1_out_mclk_bclk_ws), 787 + PINCTRL_PIN_GROUP("tdm_1_in_mclk_bclk_ws", 788 + mt7622_tdm_1_in_mclk_bclk_ws), 789 + PINCTRL_PIN_GROUP("tdm_1_out_data", mt7622_tdm_1_out_data), 790 + PINCTRL_PIN_GROUP("tdm_1_in_data", mt7622_tdm_1_in_data), 791 + PINCTRL_PIN_GROUP("uart0_0_tx_rx", mt7622_uart0_0_tx_rx), 792 + PINCTRL_PIN_GROUP("uart1_0_tx_rx", mt7622_uart1_0_tx_rx), 793 + PINCTRL_PIN_GROUP("uart1_0_rts_cts", mt7622_uart1_0_rts_cts), 794 + PINCTRL_PIN_GROUP("uart1_1_tx_rx", mt7622_uart1_1_tx_rx), 795 + PINCTRL_PIN_GROUP("uart1_1_rts_cts", mt7622_uart1_1_rts_cts), 796 + PINCTRL_PIN_GROUP("uart2_0_tx_rx", mt7622_uart2_0_tx_rx), 797 + PINCTRL_PIN_GROUP("uart2_0_rts_cts", mt7622_uart2_0_rts_cts), 798 + PINCTRL_PIN_GROUP("uart2_1_tx_rx", mt7622_uart2_1_tx_rx), 799 + PINCTRL_PIN_GROUP("uart2_1_rts_cts", mt7622_uart2_1_rts_cts), 800 + PINCTRL_PIN_GROUP("uart2_2_tx_rx", mt7622_uart2_2_tx_rx), 801 + PINCTRL_PIN_GROUP("uart2_2_rts_cts", mt7622_uart2_2_rts_cts), 802 + PINCTRL_PIN_GROUP("uart2_3_tx_rx", mt7622_uart2_3_tx_rx), 803 + PINCTRL_PIN_GROUP("uart3_0_tx_rx", mt7622_uart3_0_tx_rx), 804 + PINCTRL_PIN_GROUP("uart3_1_tx_rx", mt7622_uart3_1_tx_rx), 805 + PINCTRL_PIN_GROUP("uart3_1_rts_cts", mt7622_uart3_1_rts_cts), 806 + PINCTRL_PIN_GROUP("uart4_0_tx_rx", mt7622_uart4_0_tx_rx), 807 + PINCTRL_PIN_GROUP("uart4_1_tx_rx", mt7622_uart4_1_tx_rx), 808 + PINCTRL_PIN_GROUP("uart4_1_rts_cts", mt7622_uart4_1_rts_cts), 809 + PINCTRL_PIN_GROUP("uart4_2_tx_rx", mt7622_uart4_2_tx_rx), 810 + PINCTRL_PIN_GROUP("uart4_2_rts_cts", mt7622_uart4_2_rts_cts), 811 + PINCTRL_PIN_GROUP("watchdog", mt7622_watchdog), 812 + PINCTRL_PIN_GROUP("wled", mt7622_wled), 813 + }; 814 + 815 + /* Joint those groups owning the same capability in user point of view which 816 + * allows that people tend to use through the device tree. 817 + */ 818 + static const char *mt7622_emmc_groups[] = { "emmc", "emmc_rst", }; 819 + static const char *mt7622_ethernet_groups[] = { "esw", "esw_p0_p1", 820 + "esw_p2_p3_p4", "mdc_mdio", 821 + "rgmii_via_gmac1", 822 + "rgmii_via_gmac2", 823 + "rgmii_via_esw", }; 824 + static const char *mt7622_i2c_groups[] = { "i2c0", "i2c1_0", "i2c1_1", 825 + "i2c1_2", "i2c2_0", "i2c2_1", 826 + "i2c2_2", }; 827 + static const char *mt7622_i2s_groups[] = { "i2s_out_mclk_bclk_ws", 828 + "i2s_in_mclk_bclk_ws", 829 + "i2s1_in_data", "i2s2_in_data", 830 + "i2s3_in_data", "i2s4_in_data", 831 + "i2s1_out_data", "i2s2_out_data", 832 + "i2s3_out_data", "i2s4_out_data", }; 833 + static const char *mt7622_ir_groups[] = { "ir_0_tx", "ir_1_tx", "ir_2_tx", 834 + "ir_0_rx", "ir_1_rx", "ir_2_rx"}; 835 + static const char *mt7622_led_groups[] = { "ephy_leds", "ephy0_led", 836 + "ephy1_led", "ephy2_led", 837 + "ephy3_led", "ephy4_led", 838 + "wled", }; 839 + static const char *mt7622_flash_groups[] = { "par_nand", "snfi", "spi_nor"}; 840 + static const char *mt7622_pcie_groups[] = { "pcie0_0_waken", "pcie0_0_clkreq", 841 + "pcie0_1_waken", "pcie0_1_clkreq", 842 + "pcie1_0_waken", "pcie1_0_clkreq", 843 + "pcie0_pad_perst", 844 + "pcie1_pad_perst", }; 845 + static const char *mt7622_pmic_bus_groups[] = { "pmic_bus", }; 846 + static const char *mt7622_pwm_groups[] = { "pwm_ch1_0", "pwm_ch1_1", 847 + "pwm_ch1_2", "pwm_ch2_0", 848 + "pwm_ch2_1", "pwm_ch2_2", 849 + "pwm_ch3_0", "pwm_ch3_1", 850 + "pwm_ch3_2", "pwm_ch4_0", 851 + "pwm_ch4_1", "pwm_ch4_2", 852 + "pwm_ch4_3", "pwm_ch5_0", 853 + "pwm_ch5_1", "pwm_ch5_2", 854 + "pwm_ch6_0", "pwm_ch6_1", 855 + "pwm_ch6_2", "pwm_ch6_3", 856 + "pwm_ch7_0", "pwm_ch7_1", 857 + "pwm_ch7_2", }; 858 + static const char *mt7622_sd_groups[] = { "sd_0", "sd_1", }; 859 + static const char *mt7622_spic_groups[] = { "spic0_0", "spic0_1", "spic1_0", 860 + "spic1_1", "spic2_0", 861 + "spic2_0_wp_hold", }; 862 + static const char *mt7622_tdm_groups[] = { "tdm_0_out_mclk_bclk_ws", 863 + "tdm_0_in_mclk_bclk_ws", 864 + "tdm_0_out_data", 865 + "tdm_0_in_data", 866 + "tdm_1_out_mclk_bclk_ws", 867 + "tdm_1_in_mclk_bclk_ws", 868 + "tdm_1_out_data", 869 + "tdm_1_in_data", }; 870 + 871 + static const char *mt7622_uart_groups[] = { "uart0_0_tx_rx", 872 + "uart1_0_tx_rx", "uart1_0_rts_cts", 873 + "uart1_1_tx_rx", "uart1_1_rts_cts", 874 + "uart2_0_tx_rx", "uart2_0_rts_cts", 875 + "uart2_1_tx_rx", "uart2_1_rts_cts", 876 + "uart2_2_tx_rx", "uart2_2_rts_cts", 877 + "uart2_3_tx_rx", 878 + "uart3_0_tx_rx", 879 + "uart3_1_tx_rx", "uart3_1_rts_cts", 880 + "uart4_0_tx_rx", 881 + "uart4_1_tx_rx", "uart4_1_rts_cts", 882 + "uart4_2_tx_rx", 883 + "uart4_2_rts_cts",}; 884 + static const char *mt7622_wdt_groups[] = { "watchdog", }; 885 + 886 + static const struct function_desc mt7622_functions[] = { 887 + {"emmc", mt7622_emmc_groups, ARRAY_SIZE(mt7622_emmc_groups)}, 888 + {"eth", mt7622_ethernet_groups, ARRAY_SIZE(mt7622_ethernet_groups)}, 889 + {"i2c", mt7622_i2c_groups, ARRAY_SIZE(mt7622_i2c_groups)}, 890 + {"i2s", mt7622_i2s_groups, ARRAY_SIZE(mt7622_i2s_groups)}, 891 + {"ir", mt7622_ir_groups, ARRAY_SIZE(mt7622_ir_groups)}, 892 + {"led", mt7622_led_groups, ARRAY_SIZE(mt7622_led_groups)}, 893 + {"flash", mt7622_flash_groups, ARRAY_SIZE(mt7622_flash_groups)}, 894 + {"pcie", mt7622_pcie_groups, ARRAY_SIZE(mt7622_pcie_groups)}, 895 + {"pmic", mt7622_pmic_bus_groups, ARRAY_SIZE(mt7622_pmic_bus_groups)}, 896 + {"pwm", mt7622_pwm_groups, ARRAY_SIZE(mt7622_pwm_groups)}, 897 + {"sd", mt7622_sd_groups, ARRAY_SIZE(mt7622_sd_groups)}, 898 + {"spi", mt7622_spic_groups, ARRAY_SIZE(mt7622_spic_groups)}, 899 + {"tdm", mt7622_tdm_groups, ARRAY_SIZE(mt7622_tdm_groups)}, 900 + {"uart", mt7622_uart_groups, ARRAY_SIZE(mt7622_uart_groups)}, 901 + {"watchdog", mt7622_wdt_groups, ARRAY_SIZE(mt7622_wdt_groups)}, 902 + }; 903 + 904 + static const struct pinconf_generic_params mtk_custom_bindings[] = { 905 + {"mediatek,tdsel", MTK_PIN_CONFIG_TDSEL, 0}, 906 + {"mediatek,rdsel", MTK_PIN_CONFIG_RDSEL, 0}, 907 + }; 908 + 909 + #ifdef CONFIG_DEBUG_FS 910 + static const struct pin_config_item mtk_conf_items[] = { 911 + PCONFDUMP(MTK_PIN_CONFIG_TDSEL, "tdsel", NULL, true), 912 + PCONFDUMP(MTK_PIN_CONFIG_RDSEL, "rdsel", NULL, true), 913 + }; 914 + #endif 915 + 916 + static const struct mtk_pin_soc mt7622_data = { 917 + .reg_cal = mt7622_reg_cals, 918 + .pins = mt7622_pins, 919 + .npins = ARRAY_SIZE(mt7622_pins), 920 + .grps = mt7622_groups, 921 + .ngrps = ARRAY_SIZE(mt7622_groups), 922 + .funcs = mt7622_functions, 923 + .nfuncs = ARRAY_SIZE(mt7622_functions), 924 + }; 925 + 926 + static void mtk_w32(struct mtk_pinctrl *pctl, u32 reg, u32 val) 927 + { 928 + writel_relaxed(val, pctl->base + reg); 929 + } 930 + 931 + static u32 mtk_r32(struct mtk_pinctrl *pctl, u32 reg) 932 + { 933 + return readl_relaxed(pctl->base + reg); 934 + } 935 + 936 + static void mtk_rmw(struct mtk_pinctrl *pctl, u32 reg, u32 mask, u32 set) 937 + { 938 + u32 val; 939 + 940 + val = mtk_r32(pctl, reg); 941 + val &= ~mask; 942 + val |= set; 943 + mtk_w32(pctl, reg, val); 944 + } 945 + 946 + static int mtk_hw_pin_field_lookup(struct mtk_pinctrl *hw, int pin, 947 + const struct mtk_pin_reg_calc *rc, 948 + struct mtk_pin_field *pfd) 949 + { 950 + const struct mtk_pin_field_calc *c, *e; 951 + u32 bits; 952 + 953 + c = rc->range; 954 + e = c + rc->nranges; 955 + 956 + while (c < e) { 957 + if (pin >= c->s_pin && pin <= c->e_pin) 958 + break; 959 + c++; 960 + } 961 + 962 + if (c >= e) { 963 + dev_err(hw->dev, "Out of range for pin = %d\n", pin); 964 + return -EINVAL; 965 + } 966 + 967 + /* Caculated bits as the overall offset the pin is located at */ 968 + bits = c->s_bit + (pin - c->s_pin) * (c->x_bits); 969 + 970 + /* Fill pfd from bits and 32-bit register applied is assumed */ 971 + pfd->offset = c->s_addr + c->x_addrs * (bits / 32); 972 + pfd->bitpos = bits % 32; 973 + pfd->mask = (1 << c->x_bits) - 1; 974 + 975 + /* pfd->next is used for indicating that bit wrapping-around happens 976 + * which requires the manipulation for bit 0 starting in the next 977 + * register to form the complete field read/write. 978 + */ 979 + pfd->next = pfd->bitpos + c->x_bits - 1 > 31 ? c->x_addrs : 0; 980 + 981 + return 0; 982 + } 983 + 984 + static int mtk_hw_pin_field_get(struct mtk_pinctrl *hw, int pin, 985 + int field, struct mtk_pin_field *pfd) 986 + { 987 + const struct mtk_pin_reg_calc *rc; 988 + 989 + if (field < 0 || field >= PINCTRL_PIN_REG_MAX) { 990 + dev_err(hw->dev, "Invalid Field %d\n", field); 991 + return -EINVAL; 992 + } 993 + 994 + if (hw->soc->reg_cal && hw->soc->reg_cal[field].range) { 995 + rc = &hw->soc->reg_cal[field]; 996 + } else { 997 + dev_err(hw->dev, "Undefined range for field %d\n", field); 998 + return -EINVAL; 999 + } 1000 + 1001 + return mtk_hw_pin_field_lookup(hw, pin, rc, pfd); 1002 + } 1003 + 1004 + static void mtk_hw_bits_part(struct mtk_pin_field *pf, int *h, int *l) 1005 + { 1006 + *l = 32 - pf->bitpos; 1007 + *h = get_count_order(pf->mask) - *l; 1008 + } 1009 + 1010 + static void mtk_hw_write_cross_field(struct mtk_pinctrl *hw, 1011 + struct mtk_pin_field *pf, int value) 1012 + { 1013 + int nbits_l, nbits_h; 1014 + 1015 + mtk_hw_bits_part(pf, &nbits_h, &nbits_l); 1016 + 1017 + mtk_rmw(hw, pf->offset, pf->mask << pf->bitpos, 1018 + (value & pf->mask) << pf->bitpos); 1019 + 1020 + mtk_rmw(hw, pf->offset + pf->next, BIT(nbits_h) - 1, 1021 + (value & pf->mask) >> nbits_l); 1022 + } 1023 + 1024 + static void mtk_hw_read_cross_field(struct mtk_pinctrl *hw, 1025 + struct mtk_pin_field *pf, int *value) 1026 + { 1027 + int nbits_l, nbits_h, h, l; 1028 + 1029 + mtk_hw_bits_part(pf, &nbits_h, &nbits_l); 1030 + 1031 + l = (mtk_r32(hw, pf->offset) >> pf->bitpos) & (BIT(nbits_l) - 1); 1032 + h = (mtk_r32(hw, pf->offset + pf->next)) & (BIT(nbits_h) - 1); 1033 + 1034 + *value = (h << nbits_l) | l; 1035 + } 1036 + 1037 + static int mtk_hw_set_value(struct mtk_pinctrl *hw, int pin, int field, 1038 + int value) 1039 + { 1040 + struct mtk_pin_field pf; 1041 + int err; 1042 + 1043 + err = mtk_hw_pin_field_get(hw, pin, field, &pf); 1044 + if (err) 1045 + return err; 1046 + 1047 + if (!pf.next) 1048 + mtk_rmw(hw, pf.offset, pf.mask << pf.bitpos, 1049 + (value & pf.mask) << pf.bitpos); 1050 + else 1051 + mtk_hw_write_cross_field(hw, &pf, value); 1052 + 1053 + return 0; 1054 + } 1055 + 1056 + static int mtk_hw_get_value(struct mtk_pinctrl *hw, int pin, int field, 1057 + int *value) 1058 + { 1059 + struct mtk_pin_field pf; 1060 + int err; 1061 + 1062 + err = mtk_hw_pin_field_get(hw, pin, field, &pf); 1063 + if (err) 1064 + return err; 1065 + 1066 + if (!pf.next) 1067 + *value = (mtk_r32(hw, pf.offset) >> pf.bitpos) & pf.mask; 1068 + else 1069 + mtk_hw_read_cross_field(hw, &pf, value); 1070 + 1071 + return 0; 1072 + } 1073 + 1074 + static int mtk_pinmux_set_mux(struct pinctrl_dev *pctldev, 1075 + unsigned int selector, unsigned int group) 1076 + { 1077 + struct mtk_pinctrl *hw = pinctrl_dev_get_drvdata(pctldev); 1078 + struct function_desc *func; 1079 + struct group_desc *grp; 1080 + int i; 1081 + 1082 + func = pinmux_generic_get_function(pctldev, selector); 1083 + if (!func) 1084 + return -EINVAL; 1085 + 1086 + grp = pinctrl_generic_get_group(pctldev, group); 1087 + if (!grp) 1088 + return -EINVAL; 1089 + 1090 + dev_dbg(pctldev->dev, "enable function %s group %s\n", 1091 + func->name, grp->name); 1092 + 1093 + for (i = 0; i < grp->num_pins; i++) { 1094 + int *pin_modes = grp->data; 1095 + 1096 + mtk_hw_set_value(hw, grp->pins[i], PINCTRL_PIN_REG_MODE, 1097 + pin_modes[i]); 1098 + } 1099 + 1100 + return 0; 1101 + } 1102 + 1103 + static int mtk_pinmux_gpio_request_enable(struct pinctrl_dev *pctldev, 1104 + struct pinctrl_gpio_range *range, 1105 + unsigned int pin) 1106 + { 1107 + struct mtk_pinctrl *hw = pinctrl_dev_get_drvdata(pctldev); 1108 + 1109 + return mtk_hw_set_value(hw, pin, PINCTRL_PIN_REG_MODE, MTK_GPIO_MODE); 1110 + } 1111 + 1112 + static int mtk_pinmux_gpio_set_direction(struct pinctrl_dev *pctldev, 1113 + struct pinctrl_gpio_range *range, 1114 + unsigned int pin, bool input) 1115 + { 1116 + struct mtk_pinctrl *hw = pinctrl_dev_get_drvdata(pctldev); 1117 + 1118 + /* hardware would take 0 as input direction */ 1119 + return mtk_hw_set_value(hw, pin, PINCTRL_PIN_REG_DIR, !input); 1120 + } 1121 + 1122 + static int mtk_pinconf_get(struct pinctrl_dev *pctldev, 1123 + unsigned int pin, unsigned long *config) 1124 + { 1125 + struct mtk_pinctrl *hw = pinctrl_dev_get_drvdata(pctldev); 1126 + u32 param = pinconf_to_config_param(*config); 1127 + int val, val2, err, reg, ret = 1; 1128 + 1129 + switch (param) { 1130 + case PIN_CONFIG_BIAS_DISABLE: 1131 + err = mtk_hw_get_value(hw, pin, PINCTRL_PIN_REG_PU, &val); 1132 + if (err) 1133 + return err; 1134 + 1135 + err = mtk_hw_get_value(hw, pin, PINCTRL_PIN_REG_PD, &val2); 1136 + if (err) 1137 + return err; 1138 + 1139 + if (val || val2) 1140 + return -EINVAL; 1141 + 1142 + break; 1143 + case PIN_CONFIG_BIAS_PULL_UP: 1144 + case PIN_CONFIG_BIAS_PULL_DOWN: 1145 + case PIN_CONFIG_SLEW_RATE: 1146 + reg = (param == PIN_CONFIG_BIAS_PULL_UP) ? 1147 + PINCTRL_PIN_REG_PU : 1148 + (param == PIN_CONFIG_BIAS_PULL_DOWN) ? 1149 + PINCTRL_PIN_REG_PD : PINCTRL_PIN_REG_SR; 1150 + 1151 + err = mtk_hw_get_value(hw, pin, reg, &val); 1152 + if (err) 1153 + return err; 1154 + 1155 + if (!val) 1156 + return -EINVAL; 1157 + 1158 + break; 1159 + case PIN_CONFIG_INPUT_ENABLE: 1160 + case PIN_CONFIG_OUTPUT_ENABLE: 1161 + err = mtk_hw_get_value(hw, pin, PINCTRL_PIN_REG_DIR, &val); 1162 + if (err) 1163 + return err; 1164 + 1165 + /* HW takes input mode as zero; output mode as non-zero */ 1166 + if ((val && param == PIN_CONFIG_INPUT_ENABLE) || 1167 + (!val && param == PIN_CONFIG_OUTPUT_ENABLE)) 1168 + return -EINVAL; 1169 + 1170 + break; 1171 + case PIN_CONFIG_INPUT_SCHMITT_ENABLE: 1172 + err = mtk_hw_get_value(hw, pin, PINCTRL_PIN_REG_DIR, &val); 1173 + if (err) 1174 + return err; 1175 + 1176 + err = mtk_hw_get_value(hw, pin, PINCTRL_PIN_REG_SMT, &val2); 1177 + if (err) 1178 + return err; 1179 + 1180 + if (val || !val2) 1181 + return -EINVAL; 1182 + 1183 + break; 1184 + case PIN_CONFIG_DRIVE_STRENGTH: 1185 + err = mtk_hw_get_value(hw, pin, PINCTRL_PIN_REG_E4, &val); 1186 + if (err) 1187 + return err; 1188 + 1189 + err = mtk_hw_get_value(hw, pin, PINCTRL_PIN_REG_E8, &val2); 1190 + if (err) 1191 + return err; 1192 + 1193 + /* 4mA when (e8, e4) = (0, 0); 8mA when (e8, e4) = (0, 1) 1194 + * 12mA when (e8, e4) = (1, 0); 16mA when (e8, e4) = (1, 1) 1195 + */ 1196 + ret = ((val2 << 1) + val + 1) * 4; 1197 + 1198 + break; 1199 + case MTK_PIN_CONFIG_TDSEL: 1200 + case MTK_PIN_CONFIG_RDSEL: 1201 + reg = (param == MTK_PIN_CONFIG_TDSEL) ? 1202 + PINCTRL_PIN_REG_TDSEL : PINCTRL_PIN_REG_RDSEL; 1203 + 1204 + err = mtk_hw_get_value(hw, pin, reg, &val); 1205 + if (err) 1206 + return err; 1207 + 1208 + ret = val; 1209 + 1210 + break; 1211 + default: 1212 + return -ENOTSUPP; 1213 + } 1214 + 1215 + *config = pinconf_to_config_packed(param, ret); 1216 + 1217 + return 0; 1218 + } 1219 + 1220 + static int mtk_pinconf_set(struct pinctrl_dev *pctldev, unsigned int pin, 1221 + unsigned long *configs, unsigned int num_configs) 1222 + { 1223 + struct mtk_pinctrl *hw = pinctrl_dev_get_drvdata(pctldev); 1224 + u32 reg, param, arg; 1225 + int cfg, err = 0; 1226 + 1227 + for (cfg = 0; cfg < num_configs; cfg++) { 1228 + param = pinconf_to_config_param(configs[cfg]); 1229 + arg = pinconf_to_config_argument(configs[cfg]); 1230 + 1231 + switch (param) { 1232 + case PIN_CONFIG_BIAS_DISABLE: 1233 + case PIN_CONFIG_BIAS_PULL_UP: 1234 + case PIN_CONFIG_BIAS_PULL_DOWN: 1235 + arg = (param == PIN_CONFIG_BIAS_DISABLE) ? 0 : 1236 + (param == PIN_CONFIG_BIAS_PULL_UP) ? 1 : 2; 1237 + 1238 + err = mtk_hw_set_value(hw, pin, PINCTRL_PIN_REG_PU, 1239 + arg & 1); 1240 + if (err) 1241 + goto err; 1242 + 1243 + err = mtk_hw_set_value(hw, pin, PINCTRL_PIN_REG_PD, 1244 + !!(arg & 2)); 1245 + if (err) 1246 + goto err; 1247 + break; 1248 + case PIN_CONFIG_OUTPUT_ENABLE: 1249 + err = mtk_hw_set_value(hw, pin, PINCTRL_PIN_REG_SMT, 1250 + MTK_DISABLE); 1251 + if (err) 1252 + goto err; 1253 + case PIN_CONFIG_INPUT_ENABLE: 1254 + case PIN_CONFIG_SLEW_RATE: 1255 + reg = (param == PIN_CONFIG_SLEW_RATE) ? 1256 + PINCTRL_PIN_REG_SR : PINCTRL_PIN_REG_DIR; 1257 + 1258 + arg = (param == PIN_CONFIG_INPUT_ENABLE) ? 0 : 1259 + (param == PIN_CONFIG_OUTPUT_ENABLE) ? 1 : arg; 1260 + err = mtk_hw_set_value(hw, pin, reg, arg); 1261 + if (err) 1262 + goto err; 1263 + 1264 + break; 1265 + case PIN_CONFIG_OUTPUT: 1266 + err = mtk_hw_set_value(hw, pin, PINCTRL_PIN_REG_DIR, 1267 + MTK_OUTPUT); 1268 + if (err) 1269 + goto err; 1270 + 1271 + err = mtk_hw_set_value(hw, pin, PINCTRL_PIN_REG_DO, 1272 + arg); 1273 + if (err) 1274 + goto err; 1275 + break; 1276 + case PIN_CONFIG_INPUT_SCHMITT_ENABLE: 1277 + /* arg = 1: Input mode & SMT enable ; 1278 + * arg = 0: Output mode & SMT disable 1279 + */ 1280 + arg = arg ? 2 : 1; 1281 + err = mtk_hw_set_value(hw, pin, PINCTRL_PIN_REG_DIR, 1282 + arg & 1); 1283 + if (err) 1284 + goto err; 1285 + 1286 + err = mtk_hw_set_value(hw, pin, PINCTRL_PIN_REG_SMT, 1287 + !!(arg & 2)); 1288 + if (err) 1289 + goto err; 1290 + break; 1291 + case PIN_CONFIG_DRIVE_STRENGTH: 1292 + /* 4mA when (e8, e4) = (0, 0); 1293 + * 8mA when (e8, e4) = (0, 1); 1294 + * 12mA when (e8, e4) = (1, 0); 1295 + * 16mA when (e8, e4) = (1, 1) 1296 + */ 1297 + if (!(arg % 4) && (arg >= 4 && arg <= 16)) { 1298 + arg = arg / 4 - 1; 1299 + err = mtk_hw_set_value(hw, pin, 1300 + PINCTRL_PIN_REG_E4, 1301 + arg & 0x1); 1302 + if (err) 1303 + goto err; 1304 + 1305 + err = mtk_hw_set_value(hw, pin, 1306 + PINCTRL_PIN_REG_E8, 1307 + (arg & 0x2) >> 1); 1308 + if (err) 1309 + goto err; 1310 + } else { 1311 + err = -ENOTSUPP; 1312 + } 1313 + break; 1314 + case MTK_PIN_CONFIG_TDSEL: 1315 + case MTK_PIN_CONFIG_RDSEL: 1316 + reg = (param == MTK_PIN_CONFIG_TDSEL) ? 1317 + PINCTRL_PIN_REG_TDSEL : PINCTRL_PIN_REG_RDSEL; 1318 + 1319 + err = mtk_hw_set_value(hw, pin, reg, arg); 1320 + if (err) 1321 + goto err; 1322 + break; 1323 + default: 1324 + err = -ENOTSUPP; 1325 + } 1326 + } 1327 + err: 1328 + return err; 1329 + } 1330 + 1331 + static int mtk_pinconf_group_get(struct pinctrl_dev *pctldev, 1332 + unsigned int group, unsigned long *config) 1333 + { 1334 + const unsigned int *pins; 1335 + unsigned int i, npins, old = 0; 1336 + int ret; 1337 + 1338 + ret = pinctrl_generic_get_group_pins(pctldev, group, &pins, &npins); 1339 + if (ret) 1340 + return ret; 1341 + 1342 + for (i = 0; i < npins; i++) { 1343 + if (mtk_pinconf_get(pctldev, pins[i], config)) 1344 + return -ENOTSUPP; 1345 + 1346 + /* configs do not match between two pins */ 1347 + if (i && old != *config) 1348 + return -ENOTSUPP; 1349 + 1350 + old = *config; 1351 + } 1352 + 1353 + return 0; 1354 + } 1355 + 1356 + static int mtk_pinconf_group_set(struct pinctrl_dev *pctldev, 1357 + unsigned int group, unsigned long *configs, 1358 + unsigned int num_configs) 1359 + { 1360 + const unsigned int *pins; 1361 + unsigned int i, npins; 1362 + int ret; 1363 + 1364 + ret = pinctrl_generic_get_group_pins(pctldev, group, &pins, &npins); 1365 + if (ret) 1366 + return ret; 1367 + 1368 + for (i = 0; i < npins; i++) { 1369 + ret = mtk_pinconf_set(pctldev, pins[i], configs, num_configs); 1370 + if (ret) 1371 + return ret; 1372 + } 1373 + 1374 + return 0; 1375 + } 1376 + 1377 + static const struct pinctrl_ops mtk_pctlops = { 1378 + .get_groups_count = pinctrl_generic_get_group_count, 1379 + .get_group_name = pinctrl_generic_get_group_name, 1380 + .get_group_pins = pinctrl_generic_get_group_pins, 1381 + .dt_node_to_map = pinconf_generic_dt_node_to_map_all, 1382 + .dt_free_map = pinconf_generic_dt_free_map, 1383 + }; 1384 + 1385 + static const struct pinmux_ops mtk_pmxops = { 1386 + .get_functions_count = pinmux_generic_get_function_count, 1387 + .get_function_name = pinmux_generic_get_function_name, 1388 + .get_function_groups = pinmux_generic_get_function_groups, 1389 + .set_mux = mtk_pinmux_set_mux, 1390 + .gpio_request_enable = mtk_pinmux_gpio_request_enable, 1391 + .gpio_set_direction = mtk_pinmux_gpio_set_direction, 1392 + .strict = true, 1393 + }; 1394 + 1395 + static const struct pinconf_ops mtk_confops = { 1396 + .is_generic = true, 1397 + .pin_config_get = mtk_pinconf_get, 1398 + .pin_config_set = mtk_pinconf_set, 1399 + .pin_config_group_get = mtk_pinconf_group_get, 1400 + .pin_config_group_set = mtk_pinconf_group_set, 1401 + .pin_config_config_dbg_show = pinconf_generic_dump_config, 1402 + }; 1403 + 1404 + static struct pinctrl_desc mtk_desc = { 1405 + .name = PINCTRL_PINCTRL_DEV, 1406 + .pctlops = &mtk_pctlops, 1407 + .pmxops = &mtk_pmxops, 1408 + .confops = &mtk_confops, 1409 + .owner = THIS_MODULE, 1410 + }; 1411 + 1412 + static int mtk_gpio_get(struct gpio_chip *chip, unsigned int gpio) 1413 + { 1414 + struct mtk_pinctrl *hw = dev_get_drvdata(chip->parent); 1415 + int value, err; 1416 + 1417 + err = mtk_hw_get_value(hw, gpio, PINCTRL_PIN_REG_DI, &value); 1418 + if (err) 1419 + return err; 1420 + 1421 + return !!value; 1422 + } 1423 + 1424 + static void mtk_gpio_set(struct gpio_chip *chip, unsigned int gpio, int value) 1425 + { 1426 + struct mtk_pinctrl *hw = dev_get_drvdata(chip->parent); 1427 + 1428 + mtk_hw_set_value(hw, gpio, PINCTRL_PIN_REG_DO, !!value); 1429 + } 1430 + 1431 + static int mtk_gpio_direction_input(struct gpio_chip *chip, unsigned int gpio) 1432 + { 1433 + return pinctrl_gpio_direction_input(chip->base + gpio); 1434 + } 1435 + 1436 + static int mtk_gpio_direction_output(struct gpio_chip *chip, unsigned int gpio, 1437 + int value) 1438 + { 1439 + mtk_gpio_set(chip, gpio, value); 1440 + 1441 + return pinctrl_gpio_direction_output(chip->base + gpio); 1442 + } 1443 + 1444 + static int mtk_build_gpiochip(struct mtk_pinctrl *hw, struct device_node *np) 1445 + { 1446 + struct gpio_chip *chip = &hw->chip; 1447 + int ret; 1448 + 1449 + chip->label = PINCTRL_PINCTRL_DEV; 1450 + chip->parent = hw->dev; 1451 + chip->request = gpiochip_generic_request; 1452 + chip->free = gpiochip_generic_free; 1453 + chip->direction_input = mtk_gpio_direction_input; 1454 + chip->direction_output = mtk_gpio_direction_output; 1455 + chip->get = mtk_gpio_get; 1456 + chip->set = mtk_gpio_set; 1457 + chip->base = -1; 1458 + chip->ngpio = hw->soc->npins; 1459 + chip->of_node = np; 1460 + chip->of_gpio_n_cells = 2; 1461 + 1462 + ret = gpiochip_add_data(chip, hw); 1463 + if (ret < 0) 1464 + return ret; 1465 + 1466 + ret = gpiochip_add_pin_range(chip, dev_name(hw->dev), 0, 0, 1467 + chip->ngpio); 1468 + if (ret < 0) { 1469 + gpiochip_remove(chip); 1470 + return ret; 1471 + } 1472 + 1473 + return 0; 1474 + } 1475 + 1476 + static int mtk_build_groups(struct mtk_pinctrl *hw) 1477 + { 1478 + int err, i; 1479 + 1480 + for (i = 0; i < hw->soc->ngrps; i++) { 1481 + const struct group_desc *group = hw->soc->grps + i; 1482 + 1483 + err = pinctrl_generic_add_group(hw->pctrl, group->name, 1484 + group->pins, group->num_pins, 1485 + group->data); 1486 + if (err) { 1487 + dev_err(hw->dev, "Failed to register group %s\n", 1488 + group->name); 1489 + return err; 1490 + } 1491 + } 1492 + 1493 + return 0; 1494 + } 1495 + 1496 + static int mtk_build_functions(struct mtk_pinctrl *hw) 1497 + { 1498 + int i, err; 1499 + 1500 + for (i = 0; i < hw->soc->nfuncs ; i++) { 1501 + const struct function_desc *func = hw->soc->funcs + i; 1502 + 1503 + err = pinmux_generic_add_function(hw->pctrl, func->name, 1504 + func->group_names, 1505 + func->num_group_names, 1506 + func->data); 1507 + if (err) { 1508 + dev_err(hw->dev, "Failed to register function %s\n", 1509 + func->name); 1510 + return err; 1511 + } 1512 + } 1513 + 1514 + return 0; 1515 + } 1516 + 1517 + static const struct of_device_id mtk_pinctrl_of_match[] = { 1518 + { .compatible = "mediatek,mt7622-pinctrl", .data = &mt7622_data}, 1519 + { } 1520 + }; 1521 + 1522 + static int mtk_pinctrl_probe(struct platform_device *pdev) 1523 + { 1524 + struct resource *res; 1525 + struct mtk_pinctrl *hw; 1526 + const struct of_device_id *of_id = 1527 + of_match_device(mtk_pinctrl_of_match, &pdev->dev); 1528 + int err; 1529 + 1530 + hw = devm_kzalloc(&pdev->dev, sizeof(*hw), GFP_KERNEL); 1531 + if (!hw) 1532 + return -ENOMEM; 1533 + 1534 + hw->soc = of_id->data; 1535 + 1536 + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 1537 + if (!res) { 1538 + dev_err(&pdev->dev, "missing IO resource\n"); 1539 + return -ENXIO; 1540 + } 1541 + 1542 + hw->dev = &pdev->dev; 1543 + hw->base = devm_ioremap_resource(&pdev->dev, res); 1544 + if (IS_ERR(hw->base)) 1545 + return PTR_ERR(hw->base); 1546 + 1547 + /* Setup pins descriptions per SoC types */ 1548 + mtk_desc.pins = hw->soc->pins; 1549 + mtk_desc.npins = hw->soc->npins; 1550 + mtk_desc.num_custom_params = ARRAY_SIZE(mtk_custom_bindings); 1551 + mtk_desc.custom_params = mtk_custom_bindings; 1552 + #ifdef CONFIG_DEBUG_FS 1553 + mtk_desc.custom_conf_items = mtk_conf_items; 1554 + #endif 1555 + 1556 + hw->pctrl = devm_pinctrl_register(&pdev->dev, &mtk_desc, hw); 1557 + if (IS_ERR(hw->pctrl)) 1558 + return PTR_ERR(hw->pctrl); 1559 + 1560 + /* Setup groups descriptions per SoC types */ 1561 + err = mtk_build_groups(hw); 1562 + if (err) { 1563 + dev_err(&pdev->dev, "Failed to build groups\n"); 1564 + return 0; 1565 + } 1566 + 1567 + /* Setup functions descriptions per SoC types */ 1568 + err = mtk_build_functions(hw); 1569 + if (err) { 1570 + dev_err(&pdev->dev, "Failed to build functions\n"); 1571 + return err; 1572 + } 1573 + 1574 + err = mtk_build_gpiochip(hw, pdev->dev.of_node); 1575 + if (err) { 1576 + dev_err(&pdev->dev, "Failed to add gpio_chip\n"); 1577 + return err; 1578 + } 1579 + 1580 + platform_set_drvdata(pdev, hw); 1581 + 1582 + return 0; 1583 + } 1584 + 1585 + static struct platform_driver mtk_pinctrl_driver = { 1586 + .driver = { 1587 + .name = "mtk-pinctrl", 1588 + .of_match_table = mtk_pinctrl_of_match, 1589 + }, 1590 + .probe = mtk_pinctrl_probe, 1591 + }; 1592 + 1593 + static int __init mtk_pinctrl_init(void) 1594 + { 1595 + return platform_driver_register(&mtk_pinctrl_driver); 1596 + } 1597 + arch_initcall(mtk_pinctrl_init);
+9
drivers/pinctrl/meson/Kconfig
··· 38 38 config PINCTRL_MESON8_PMX 39 39 bool 40 40 41 + config PINCTRL_MESON_AXG 42 + bool "Meson axg Soc pinctrl driver" 43 + depends on ARM64 44 + select PINCTRL_MESON_AXG_PMX 45 + default y 46 + 47 + config PINCTRL_MESON_AXG_PMX 48 + bool 49 + 41 50 endif
+2
drivers/pinctrl/meson/Makefile
··· 4 4 obj-$(CONFIG_PINCTRL_MESON8B) += pinctrl-meson8b.o 5 5 obj-$(CONFIG_PINCTRL_MESON_GXBB) += pinctrl-meson-gxbb.o 6 6 obj-$(CONFIG_PINCTRL_MESON_GXL) += pinctrl-meson-gxl.o 7 + obj-$(CONFIG_PINCTRL_MESON_AXG_PMX) += pinctrl-meson-axg-pmx.o 8 + obj-$(CONFIG_PINCTRL_MESON_AXG) += pinctrl-meson-axg.o
+118
drivers/pinctrl/meson/pinctrl-meson-axg-pmx.c
··· 1 + /* 2 + * Second generation of pinmux driver for Amlogic Meson-AXG SoC. 3 + * 4 + * Copyright (c) 2017 Baylibre SAS. 5 + * Author: Jerome Brunet <jbrunet@baylibre.com> 6 + * 7 + * Copyright (c) 2017 Amlogic, Inc. All rights reserved. 8 + * Author: Xingyu Chen <xingyu.chen@amlogic.com> 9 + * 10 + * SPDX-License-Identifier: (GPL-2.0+ or MIT) 11 + */ 12 + 13 + /* 14 + * This new generation of pinctrl IP is mainly adopted by the 15 + * Meson-AXG SoC and later series, which use 4-width continuous 16 + * register bit to select the function for each pin. 17 + * 18 + * The value 0 is always selecting the GPIO mode, while other 19 + * values (start from 1) for selecting the function mode. 20 + */ 21 + #include <linux/device.h> 22 + #include <linux/regmap.h> 23 + #include <linux/pinctrl/pinctrl.h> 24 + #include <linux/pinctrl/pinmux.h> 25 + 26 + #include "pinctrl-meson.h" 27 + #include "pinctrl-meson-axg-pmx.h" 28 + 29 + static int meson_axg_pmx_get_bank(struct meson_pinctrl *pc, 30 + unsigned int pin, 31 + struct meson_pmx_bank **bank) 32 + { 33 + int i; 34 + struct meson_axg_pmx_data *pmx = pc->data->pmx_data; 35 + 36 + for (i = 0; i < pmx->num_pmx_banks; i++) 37 + if (pin >= pmx->pmx_banks[i].first && 38 + pin <= pmx->pmx_banks[i].last) { 39 + *bank = &pmx->pmx_banks[i]; 40 + return 0; 41 + } 42 + 43 + return -EINVAL; 44 + } 45 + 46 + static int meson_pmx_calc_reg_and_offset(struct meson_pmx_bank *bank, 47 + unsigned int pin, unsigned int *reg, 48 + unsigned int *offset) 49 + { 50 + int shift; 51 + 52 + shift = pin - bank->first; 53 + 54 + *reg = bank->reg + (bank->offset + (shift << 2)) / 32; 55 + *offset = (bank->offset + (shift << 2)) % 32; 56 + 57 + return 0; 58 + } 59 + 60 + static int meson_axg_pmx_update_function(struct meson_pinctrl *pc, 61 + unsigned int pin, unsigned int func) 62 + { 63 + int ret; 64 + int reg; 65 + int offset; 66 + struct meson_pmx_bank *bank; 67 + 68 + ret = meson_axg_pmx_get_bank(pc, pin, &bank); 69 + if (ret) 70 + return ret; 71 + 72 + meson_pmx_calc_reg_and_offset(bank, pin, &reg, &offset); 73 + 74 + ret = regmap_update_bits(pc->reg_mux, reg << 2, 75 + 0xf << offset, (func & 0xf) << offset); 76 + 77 + return ret; 78 + } 79 + 80 + static int meson_axg_pmx_set_mux(struct pinctrl_dev *pcdev, 81 + unsigned int func_num, unsigned int group_num) 82 + { 83 + int i; 84 + int ret; 85 + struct meson_pinctrl *pc = pinctrl_dev_get_drvdata(pcdev); 86 + struct meson_pmx_func *func = &pc->data->funcs[func_num]; 87 + struct meson_pmx_group *group = &pc->data->groups[group_num]; 88 + struct meson_pmx_axg_data *pmx_data = 89 + (struct meson_pmx_axg_data *)group->data; 90 + 91 + dev_dbg(pc->dev, "enable function %s, group %s\n", func->name, 92 + group->name); 93 + 94 + for (i = 0; i < group->num_pins; i++) { 95 + ret = meson_axg_pmx_update_function(pc, group->pins[i], 96 + pmx_data->func); 97 + if (ret) 98 + return ret; 99 + } 100 + 101 + return 0; 102 + } 103 + 104 + static int meson_axg_pmx_request_gpio(struct pinctrl_dev *pcdev, 105 + struct pinctrl_gpio_range *range, unsigned int offset) 106 + { 107 + struct meson_pinctrl *pc = pinctrl_dev_get_drvdata(pcdev); 108 + 109 + return meson_axg_pmx_update_function(pc, offset, 0); 110 + } 111 + 112 + const struct pinmux_ops meson_axg_pmx_ops = { 113 + .set_mux = meson_axg_pmx_set_mux, 114 + .get_functions_count = meson_pmx_get_funcs_count, 115 + .get_function_name = meson_pmx_get_func_name, 116 + .get_function_groups = meson_pmx_get_groups, 117 + .gpio_request_enable = meson_axg_pmx_request_gpio, 118 + };
+62
drivers/pinctrl/meson/pinctrl-meson-axg-pmx.h
··· 1 + /* 2 + * Copyright (c) 2017 Baylibre SAS. 3 + * Author: Jerome Brunet <jbrunet@baylibre.com> 4 + * 5 + * Copyright (c) 2017 Amlogic, Inc. All rights reserved. 6 + * Author: Xingyu Chen <xingyu.chen@amlogic.com> 7 + * 8 + * SPDX-License-Identifier: (GPL-2.0+ or MIT) 9 + */ 10 + 11 + struct meson_pmx_bank { 12 + const char *name; 13 + unsigned int first; 14 + unsigned int last; 15 + unsigned int reg; 16 + unsigned int offset; 17 + }; 18 + 19 + struct meson_axg_pmx_data { 20 + struct meson_pmx_bank *pmx_banks; 21 + unsigned int num_pmx_banks; 22 + }; 23 + 24 + #define BANK_PMX(n, f, l, r, o) \ 25 + { \ 26 + .name = n, \ 27 + .first = f, \ 28 + .last = l, \ 29 + .reg = r, \ 30 + .offset = o, \ 31 + } 32 + 33 + struct meson_pmx_axg_data { 34 + unsigned int func; 35 + }; 36 + 37 + #define PMX_DATA(f) \ 38 + { \ 39 + .func = f, \ 40 + } 41 + 42 + #define GROUP(grp, f) \ 43 + { \ 44 + .name = #grp, \ 45 + .pins = grp ## _pins, \ 46 + .num_pins = ARRAY_SIZE(grp ## _pins), \ 47 + .data = (const struct meson_pmx_axg_data[]){ \ 48 + PMX_DATA(f), \ 49 + }, \ 50 + } 51 + 52 + #define GPIO_GROUP(gpio) \ 53 + { \ 54 + .name = #gpio, \ 55 + .pins = (const unsigned int[]){ gpio }, \ 56 + .num_pins = 1, \ 57 + .data = (const struct meson_pmx_axg_data[]){ \ 58 + PMX_DATA(0), \ 59 + }, \ 60 + } 61 + 62 + extern const struct pinmux_ops meson_axg_pmx_ops;
+975
drivers/pinctrl/meson/pinctrl-meson-axg.c
··· 1 + /* 2 + * Pin controller and GPIO driver for Amlogic Meson AXG SoC. 3 + * 4 + * Copyright (c) 2017 Amlogic, Inc. All rights reserved. 5 + * Author: Xingyu Chen <xingyu.chen@amlogic.com> 6 + * 7 + * SPDX-License-Identifier: (GPL-2.0+ or MIT) 8 + */ 9 + 10 + #include <dt-bindings/gpio/meson-axg-gpio.h> 11 + #include "pinctrl-meson.h" 12 + #include "pinctrl-meson-axg-pmx.h" 13 + 14 + static const struct pinctrl_pin_desc meson_axg_periphs_pins[] = { 15 + MESON_PIN(GPIOZ_0), 16 + MESON_PIN(GPIOZ_1), 17 + MESON_PIN(GPIOZ_2), 18 + MESON_PIN(GPIOZ_3), 19 + MESON_PIN(GPIOZ_4), 20 + MESON_PIN(GPIOZ_5), 21 + MESON_PIN(GPIOZ_6), 22 + MESON_PIN(GPIOZ_7), 23 + MESON_PIN(GPIOZ_8), 24 + MESON_PIN(GPIOZ_9), 25 + MESON_PIN(GPIOZ_10), 26 + MESON_PIN(BOOT_0), 27 + MESON_PIN(BOOT_1), 28 + MESON_PIN(BOOT_2), 29 + MESON_PIN(BOOT_3), 30 + MESON_PIN(BOOT_4), 31 + MESON_PIN(BOOT_5), 32 + MESON_PIN(BOOT_6), 33 + MESON_PIN(BOOT_7), 34 + MESON_PIN(BOOT_8), 35 + MESON_PIN(BOOT_9), 36 + MESON_PIN(BOOT_10), 37 + MESON_PIN(BOOT_11), 38 + MESON_PIN(BOOT_12), 39 + MESON_PIN(BOOT_13), 40 + MESON_PIN(BOOT_14), 41 + MESON_PIN(GPIOA_0), 42 + MESON_PIN(GPIOA_1), 43 + MESON_PIN(GPIOA_2), 44 + MESON_PIN(GPIOA_3), 45 + MESON_PIN(GPIOA_4), 46 + MESON_PIN(GPIOA_5), 47 + MESON_PIN(GPIOA_6), 48 + MESON_PIN(GPIOA_7), 49 + MESON_PIN(GPIOA_8), 50 + MESON_PIN(GPIOA_9), 51 + MESON_PIN(GPIOA_10), 52 + MESON_PIN(GPIOA_11), 53 + MESON_PIN(GPIOA_12), 54 + MESON_PIN(GPIOA_13), 55 + MESON_PIN(GPIOA_14), 56 + MESON_PIN(GPIOA_15), 57 + MESON_PIN(GPIOA_16), 58 + MESON_PIN(GPIOA_17), 59 + MESON_PIN(GPIOA_18), 60 + MESON_PIN(GPIOA_19), 61 + MESON_PIN(GPIOA_20), 62 + MESON_PIN(GPIOX_0), 63 + MESON_PIN(GPIOX_1), 64 + MESON_PIN(GPIOX_2), 65 + MESON_PIN(GPIOX_3), 66 + MESON_PIN(GPIOX_4), 67 + MESON_PIN(GPIOX_5), 68 + MESON_PIN(GPIOX_6), 69 + MESON_PIN(GPIOX_7), 70 + MESON_PIN(GPIOX_8), 71 + MESON_PIN(GPIOX_9), 72 + MESON_PIN(GPIOX_10), 73 + MESON_PIN(GPIOX_11), 74 + MESON_PIN(GPIOX_12), 75 + MESON_PIN(GPIOX_13), 76 + MESON_PIN(GPIOX_14), 77 + MESON_PIN(GPIOX_15), 78 + MESON_PIN(GPIOX_16), 79 + MESON_PIN(GPIOX_17), 80 + MESON_PIN(GPIOX_18), 81 + MESON_PIN(GPIOX_19), 82 + MESON_PIN(GPIOX_20), 83 + MESON_PIN(GPIOX_21), 84 + MESON_PIN(GPIOX_22), 85 + MESON_PIN(GPIOY_0), 86 + MESON_PIN(GPIOY_1), 87 + MESON_PIN(GPIOY_2), 88 + MESON_PIN(GPIOY_3), 89 + MESON_PIN(GPIOY_4), 90 + MESON_PIN(GPIOY_5), 91 + MESON_PIN(GPIOY_6), 92 + MESON_PIN(GPIOY_7), 93 + MESON_PIN(GPIOY_8), 94 + MESON_PIN(GPIOY_9), 95 + MESON_PIN(GPIOY_10), 96 + MESON_PIN(GPIOY_11), 97 + MESON_PIN(GPIOY_12), 98 + MESON_PIN(GPIOY_13), 99 + MESON_PIN(GPIOY_14), 100 + MESON_PIN(GPIOY_15), 101 + }; 102 + 103 + static const struct pinctrl_pin_desc meson_axg_aobus_pins[] = { 104 + MESON_PIN(GPIOAO_0), 105 + MESON_PIN(GPIOAO_1), 106 + MESON_PIN(GPIOAO_2), 107 + MESON_PIN(GPIOAO_3), 108 + MESON_PIN(GPIOAO_4), 109 + MESON_PIN(GPIOAO_5), 110 + MESON_PIN(GPIOAO_6), 111 + MESON_PIN(GPIOAO_7), 112 + MESON_PIN(GPIOAO_8), 113 + MESON_PIN(GPIOAO_9), 114 + MESON_PIN(GPIOAO_10), 115 + MESON_PIN(GPIOAO_11), 116 + MESON_PIN(GPIOAO_12), 117 + MESON_PIN(GPIOAO_13), 118 + MESON_PIN(GPIO_TEST_N), 119 + }; 120 + 121 + /* emmc */ 122 + static const unsigned int emmc_nand_d0_pins[] = {BOOT_0}; 123 + static const unsigned int emmc_nand_d1_pins[] = {BOOT_1}; 124 + static const unsigned int emmc_nand_d2_pins[] = {BOOT_2}; 125 + static const unsigned int emmc_nand_d3_pins[] = {BOOT_3}; 126 + static const unsigned int emmc_nand_d4_pins[] = {BOOT_4}; 127 + static const unsigned int emmc_nand_d5_pins[] = {BOOT_5}; 128 + static const unsigned int emmc_nand_d6_pins[] = {BOOT_6}; 129 + static const unsigned int emmc_nand_d7_pins[] = {BOOT_7}; 130 + 131 + static const unsigned int emmc_clk_pins[] = {BOOT_8}; 132 + static const unsigned int emmc_cmd_pins[] = {BOOT_10}; 133 + static const unsigned int emmc_ds_pins[] = {BOOT_13}; 134 + 135 + /* nand */ 136 + static const unsigned int nand_ce0_pins[] = {BOOT_8}; 137 + static const unsigned int nand_ale_pins[] = {BOOT_9}; 138 + static const unsigned int nand_cle_pins[] = {BOOT_10}; 139 + static const unsigned int nand_wen_clk_pins[] = {BOOT_11}; 140 + static const unsigned int nand_ren_wr_pins[] = {BOOT_12}; 141 + static const unsigned int nand_rb0_pins[] = {BOOT_13}; 142 + 143 + /* nor */ 144 + static const unsigned int nor_hold_pins[] = {BOOT_3}; 145 + static const unsigned int nor_d_pins[] = {BOOT_4}; 146 + static const unsigned int nor_q_pins[] = {BOOT_5}; 147 + static const unsigned int nor_c_pins[] = {BOOT_6}; 148 + static const unsigned int nor_wp_pins[] = {BOOT_9}; 149 + static const unsigned int nor_cs_pins[] = {BOOT_14}; 150 + 151 + /* sdio */ 152 + static const unsigned int sdio_d0_pins[] = {GPIOX_0}; 153 + static const unsigned int sdio_d1_pins[] = {GPIOX_1}; 154 + static const unsigned int sdio_d2_pins[] = {GPIOX_2}; 155 + static const unsigned int sdio_d3_pins[] = {GPIOX_3}; 156 + static const unsigned int sdio_clk_pins[] = {GPIOX_4}; 157 + static const unsigned int sdio_cmd_pins[] = {GPIOX_5}; 158 + 159 + /* spi0 */ 160 + static const unsigned int spi0_clk_pins[] = {GPIOZ_0}; 161 + static const unsigned int spi0_mosi_pins[] = {GPIOZ_1}; 162 + static const unsigned int spi0_miso_pins[] = {GPIOZ_2}; 163 + static const unsigned int spi0_ss0_pins[] = {GPIOZ_3}; 164 + static const unsigned int spi0_ss1_pins[] = {GPIOZ_4}; 165 + static const unsigned int spi0_ss2_pins[] = {GPIOZ_5}; 166 + 167 + /* spi1 */ 168 + static const unsigned int spi1_clk_x_pins[] = {GPIOX_19}; 169 + static const unsigned int spi1_mosi_x_pins[] = {GPIOX_17}; 170 + static const unsigned int spi1_miso_x_pins[] = {GPIOX_18}; 171 + static const unsigned int spi1_ss0_x_pins[] = {GPIOX_16}; 172 + 173 + static const unsigned int spi1_clk_a_pins[] = {GPIOA_4}; 174 + static const unsigned int spi1_mosi_a_pins[] = {GPIOA_2}; 175 + static const unsigned int spi1_miso_a_pins[] = {GPIOA_3}; 176 + static const unsigned int spi1_ss0_a_pins[] = {GPIOA_5}; 177 + static const unsigned int spi1_ss1_pins[] = {GPIOA_6}; 178 + 179 + /* i2c0 */ 180 + static const unsigned int i2c0_sck_pins[] = {GPIOZ_6}; 181 + static const unsigned int i2c0_sda_pins[] = {GPIOZ_7}; 182 + 183 + /* i2c1 */ 184 + static const unsigned int i2c1_sck_z_pins[] = {GPIOZ_8}; 185 + static const unsigned int i2c1_sda_z_pins[] = {GPIOZ_9}; 186 + 187 + static const unsigned int i2c1_sck_x_pins[] = {GPIOX_16}; 188 + static const unsigned int i2c1_sda_x_pins[] = {GPIOX_17}; 189 + 190 + /* i2c2 */ 191 + static const unsigned int i2c2_sck_x_pins[] = {GPIOX_18}; 192 + static const unsigned int i2c2_sda_x_pins[] = {GPIOX_19}; 193 + 194 + static const unsigned int i2c2_sda_a_pins[] = {GPIOA_17}; 195 + static const unsigned int i2c2_sck_a_pins[] = {GPIOA_18}; 196 + 197 + /* i2c3 */ 198 + static const unsigned int i2c3_sda_a6_pins[] = {GPIOA_6}; 199 + static const unsigned int i2c3_sck_a7_pins[] = {GPIOA_7}; 200 + 201 + static const unsigned int i2c3_sda_a12_pins[] = {GPIOA_12}; 202 + static const unsigned int i2c3_sck_a13_pins[] = {GPIOA_13}; 203 + 204 + static const unsigned int i2c3_sda_a19_pins[] = {GPIOA_19}; 205 + static const unsigned int i2c3_sck_a20_pins[] = {GPIOA_20}; 206 + 207 + /* uart_a */ 208 + static const unsigned int uart_rts_a_pins[] = {GPIOX_11}; 209 + static const unsigned int uart_cts_a_pins[] = {GPIOX_10}; 210 + static const unsigned int uart_tx_a_pins[] = {GPIOX_8}; 211 + static const unsigned int uart_rx_a_pins[] = {GPIOX_9}; 212 + 213 + /* uart_b */ 214 + static const unsigned int uart_rts_b_z_pins[] = {GPIOZ_0}; 215 + static const unsigned int uart_cts_b_z_pins[] = {GPIOZ_1}; 216 + static const unsigned int uart_tx_b_z_pins[] = {GPIOZ_2}; 217 + static const unsigned int uart_rx_b_z_pins[] = {GPIOZ_3}; 218 + 219 + static const unsigned int uart_rts_b_x_pins[] = {GPIOX_18}; 220 + static const unsigned int uart_cts_b_x_pins[] = {GPIOX_19}; 221 + static const unsigned int uart_tx_b_x_pins[] = {GPIOX_16}; 222 + static const unsigned int uart_rx_b_x_pins[] = {GPIOX_17}; 223 + 224 + /* uart_ao_b */ 225 + static const unsigned int uart_ao_tx_b_z_pins[] = {GPIOZ_8}; 226 + static const unsigned int uart_ao_rx_b_z_pins[] = {GPIOZ_9}; 227 + static const unsigned int uart_ao_cts_b_z_pins[] = {GPIOZ_6}; 228 + static const unsigned int uart_ao_rts_b_z_pins[] = {GPIOZ_7}; 229 + 230 + /* pwm_a */ 231 + static const unsigned int pwm_a_z_pins[] = {GPIOZ_5}; 232 + 233 + static const unsigned int pwm_a_x18_pins[] = {GPIOX_18}; 234 + static const unsigned int pwm_a_x20_pins[] = {GPIOX_20}; 235 + 236 + static const unsigned int pwm_a_a_pins[] = {GPIOA_14}; 237 + 238 + /* pwm_b */ 239 + static const unsigned int pwm_b_z_pins[] = {GPIOZ_4}; 240 + 241 + static const unsigned int pwm_b_x_pins[] = {GPIOX_19}; 242 + 243 + static const unsigned int pwm_b_a_pins[] = {GPIOA_15}; 244 + 245 + /* pwm_c */ 246 + static const unsigned int pwm_c_x10_pins[] = {GPIOX_10}; 247 + static const unsigned int pwm_c_x17_pins[] = {GPIOX_17}; 248 + 249 + static const unsigned int pwm_c_a_pins[] = {GPIOA_16}; 250 + 251 + /* pwm_d */ 252 + static const unsigned int pwm_d_x11_pins[] = {GPIOX_11}; 253 + static const unsigned int pwm_d_x16_pins[] = {GPIOX_16}; 254 + 255 + /* pwm_vs */ 256 + static const unsigned int pwm_vs_pins[] = {GPIOA_0}; 257 + 258 + /* spdif_in */ 259 + static const unsigned int spdif_in_z_pins[] = {GPIOZ_4}; 260 + 261 + static const unsigned int spdif_in_a1_pins[] = {GPIOA_1}; 262 + static const unsigned int spdif_in_a7_pins[] = {GPIOA_7}; 263 + static const unsigned int spdif_in_a19_pins[] = {GPIOA_19}; 264 + static const unsigned int spdif_in_a20_pins[] = {GPIOA_20}; 265 + 266 + /* spdif_out */ 267 + static const unsigned int spdif_out_z_pins[] = {GPIOZ_5}; 268 + 269 + static const unsigned int spdif_out_a1_pins[] = {GPIOA_1}; 270 + static const unsigned int spdif_out_a11_pins[] = {GPIOA_11}; 271 + static const unsigned int spdif_out_a19_pins[] = {GPIOA_19}; 272 + static const unsigned int spdif_out_a20_pins[] = {GPIOA_20}; 273 + 274 + /* jtag_ee */ 275 + static const unsigned int jtag_tdo_x_pins[] = {GPIOX_0}; 276 + static const unsigned int jtag_tdi_x_pins[] = {GPIOX_1}; 277 + static const unsigned int jtag_clk_x_pins[] = {GPIOX_4}; 278 + static const unsigned int jtag_tms_x_pins[] = {GPIOX_5}; 279 + 280 + /* eth */ 281 + static const unsigned int eth_txd0_x_pins[] = {GPIOX_8}; 282 + static const unsigned int eth_txd1_x_pins[] = {GPIOX_9}; 283 + static const unsigned int eth_txen_x_pins[] = {GPIOX_10}; 284 + static const unsigned int eth_rgmii_rx_clk_x_pins[] = {GPIOX_12}; 285 + static const unsigned int eth_rxd0_x_pins[] = {GPIOX_13}; 286 + static const unsigned int eth_rxd1_x_pins[] = {GPIOX_14}; 287 + static const unsigned int eth_rx_dv_x_pins[] = {GPIOX_15}; 288 + static const unsigned int eth_mdio_x_pins[] = {GPIOX_21}; 289 + static const unsigned int eth_mdc_x_pins[] = {GPIOX_22}; 290 + 291 + static const unsigned int eth_txd0_y_pins[] = {GPIOY_10}; 292 + static const unsigned int eth_txd1_y_pins[] = {GPIOY_11}; 293 + static const unsigned int eth_txen_y_pins[] = {GPIOY_9}; 294 + static const unsigned int eth_rgmii_rx_clk_y_pins[] = {GPIOY_2}; 295 + static const unsigned int eth_rxd0_y_pins[] = {GPIOY_4}; 296 + static const unsigned int eth_rxd1_y_pins[] = {GPIOY_5}; 297 + static const unsigned int eth_rx_dv_y_pins[] = {GPIOY_3}; 298 + static const unsigned int eth_mdio_y_pins[] = {GPIOY_0}; 299 + static const unsigned int eth_mdc_y_pins[] = {GPIOY_1}; 300 + 301 + static const unsigned int eth_rxd2_rgmii_pins[] = {GPIOY_6}; 302 + static const unsigned int eth_rxd3_rgmii_pins[] = {GPIOY_7}; 303 + static const unsigned int eth_rgmii_tx_clk_pins[] = {GPIOY_8}; 304 + static const unsigned int eth_txd2_rgmii_pins[] = {GPIOY_12}; 305 + static const unsigned int eth_txd3_rgmii_pins[] = {GPIOY_13}; 306 + 307 + /* pdm */ 308 + static const unsigned int pdm_dclk_a14_pins[] = {GPIOA_14}; 309 + static const unsigned int pdm_dclk_a19_pins[] = {GPIOA_19}; 310 + static const unsigned int pdm_din0_pins[] = {GPIOA_15}; 311 + static const unsigned int pdm_din1_pins[] = {GPIOA_16}; 312 + static const unsigned int pdm_din2_pins[] = {GPIOA_17}; 313 + static const unsigned int pdm_din3_pins[] = {GPIOA_18}; 314 + 315 + static struct meson_pmx_group meson_axg_periphs_groups[] = { 316 + GPIO_GROUP(GPIOZ_0), 317 + GPIO_GROUP(GPIOZ_1), 318 + GPIO_GROUP(GPIOZ_2), 319 + GPIO_GROUP(GPIOZ_3), 320 + GPIO_GROUP(GPIOZ_4), 321 + GPIO_GROUP(GPIOZ_5), 322 + GPIO_GROUP(GPIOZ_6), 323 + GPIO_GROUP(GPIOZ_7), 324 + GPIO_GROUP(GPIOZ_8), 325 + GPIO_GROUP(GPIOZ_9), 326 + GPIO_GROUP(GPIOZ_10), 327 + 328 + GPIO_GROUP(BOOT_0), 329 + GPIO_GROUP(BOOT_1), 330 + GPIO_GROUP(BOOT_2), 331 + GPIO_GROUP(BOOT_3), 332 + GPIO_GROUP(BOOT_4), 333 + GPIO_GROUP(BOOT_5), 334 + GPIO_GROUP(BOOT_6), 335 + GPIO_GROUP(BOOT_7), 336 + GPIO_GROUP(BOOT_8), 337 + GPIO_GROUP(BOOT_9), 338 + GPIO_GROUP(BOOT_10), 339 + GPIO_GROUP(BOOT_11), 340 + GPIO_GROUP(BOOT_12), 341 + GPIO_GROUP(BOOT_13), 342 + GPIO_GROUP(BOOT_14), 343 + 344 + GPIO_GROUP(GPIOA_0), 345 + GPIO_GROUP(GPIOA_1), 346 + GPIO_GROUP(GPIOA_2), 347 + GPIO_GROUP(GPIOA_3), 348 + GPIO_GROUP(GPIOA_4), 349 + GPIO_GROUP(GPIOA_5), 350 + GPIO_GROUP(GPIOA_6), 351 + GPIO_GROUP(GPIOA_7), 352 + GPIO_GROUP(GPIOA_8), 353 + GPIO_GROUP(GPIOA_9), 354 + GPIO_GROUP(GPIOA_10), 355 + GPIO_GROUP(GPIOA_11), 356 + GPIO_GROUP(GPIOA_12), 357 + GPIO_GROUP(GPIOA_13), 358 + GPIO_GROUP(GPIOA_14), 359 + GPIO_GROUP(GPIOA_15), 360 + GPIO_GROUP(GPIOA_16), 361 + GPIO_GROUP(GPIOA_17), 362 + GPIO_GROUP(GPIOA_19), 363 + GPIO_GROUP(GPIOA_20), 364 + 365 + GPIO_GROUP(GPIOX_0), 366 + GPIO_GROUP(GPIOX_1), 367 + GPIO_GROUP(GPIOX_2), 368 + GPIO_GROUP(GPIOX_3), 369 + GPIO_GROUP(GPIOX_4), 370 + GPIO_GROUP(GPIOX_5), 371 + GPIO_GROUP(GPIOX_6), 372 + GPIO_GROUP(GPIOX_7), 373 + GPIO_GROUP(GPIOX_8), 374 + GPIO_GROUP(GPIOX_9), 375 + GPIO_GROUP(GPIOX_10), 376 + GPIO_GROUP(GPIOX_11), 377 + GPIO_GROUP(GPIOX_12), 378 + GPIO_GROUP(GPIOX_13), 379 + GPIO_GROUP(GPIOX_14), 380 + GPIO_GROUP(GPIOX_15), 381 + GPIO_GROUP(GPIOX_16), 382 + GPIO_GROUP(GPIOX_17), 383 + GPIO_GROUP(GPIOX_18), 384 + GPIO_GROUP(GPIOX_19), 385 + GPIO_GROUP(GPIOX_20), 386 + GPIO_GROUP(GPIOX_21), 387 + GPIO_GROUP(GPIOX_22), 388 + 389 + GPIO_GROUP(GPIOY_0), 390 + GPIO_GROUP(GPIOY_1), 391 + GPIO_GROUP(GPIOY_2), 392 + GPIO_GROUP(GPIOY_3), 393 + GPIO_GROUP(GPIOY_4), 394 + GPIO_GROUP(GPIOY_5), 395 + GPIO_GROUP(GPIOY_6), 396 + GPIO_GROUP(GPIOY_7), 397 + GPIO_GROUP(GPIOY_8), 398 + GPIO_GROUP(GPIOY_9), 399 + GPIO_GROUP(GPIOY_10), 400 + GPIO_GROUP(GPIOY_11), 401 + GPIO_GROUP(GPIOY_12), 402 + GPIO_GROUP(GPIOY_13), 403 + GPIO_GROUP(GPIOY_14), 404 + GPIO_GROUP(GPIOY_15), 405 + 406 + /* bank BOOT */ 407 + GROUP(emmc_nand_d0, 1), 408 + GROUP(emmc_nand_d1, 1), 409 + GROUP(emmc_nand_d2, 1), 410 + GROUP(emmc_nand_d3, 1), 411 + GROUP(emmc_nand_d4, 1), 412 + GROUP(emmc_nand_d5, 1), 413 + GROUP(emmc_nand_d6, 1), 414 + GROUP(emmc_nand_d7, 1), 415 + GROUP(emmc_clk, 1), 416 + GROUP(emmc_cmd, 1), 417 + GROUP(emmc_ds, 1), 418 + GROUP(nand_ce0, 2), 419 + GROUP(nand_ale, 2), 420 + GROUP(nand_cle, 2), 421 + GROUP(nand_wen_clk, 2), 422 + GROUP(nand_ren_wr, 2), 423 + GROUP(nand_rb0, 2), 424 + GROUP(nor_hold, 3), 425 + GROUP(nor_d, 3), 426 + GROUP(nor_q, 3), 427 + GROUP(nor_c, 3), 428 + GROUP(nor_wp, 3), 429 + GROUP(nor_cs, 3), 430 + 431 + /* bank GPIOZ */ 432 + GROUP(spi0_clk, 1), 433 + GROUP(spi0_mosi, 1), 434 + GROUP(spi0_miso, 1), 435 + GROUP(spi0_ss0, 1), 436 + GROUP(spi0_ss1, 1), 437 + GROUP(spi0_ss2, 1), 438 + GROUP(i2c0_sck, 1), 439 + GROUP(i2c0_sda, 1), 440 + GROUP(i2c1_sck_z, 1), 441 + GROUP(i2c1_sda_z, 1), 442 + GROUP(uart_rts_b_z, 2), 443 + GROUP(uart_cts_b_z, 2), 444 + GROUP(uart_tx_b_z, 2), 445 + GROUP(uart_rx_b_z, 2), 446 + GROUP(pwm_a_z, 2), 447 + GROUP(pwm_b_z, 2), 448 + GROUP(spdif_in_z, 3), 449 + GROUP(spdif_out_z, 3), 450 + GROUP(uart_ao_tx_b_z, 2), 451 + GROUP(uart_ao_rx_b_z, 2), 452 + GROUP(uart_ao_cts_b_z, 2), 453 + GROUP(uart_ao_rts_b_z, 2), 454 + 455 + /* bank GPIOX */ 456 + GROUP(sdio_d0, 1), 457 + GROUP(sdio_d1, 1), 458 + GROUP(sdio_d2, 1), 459 + GROUP(sdio_d3, 1), 460 + GROUP(sdio_clk, 1), 461 + GROUP(sdio_cmd, 1), 462 + GROUP(i2c1_sck_x, 1), 463 + GROUP(i2c1_sda_x, 1), 464 + GROUP(i2c2_sck_x, 1), 465 + GROUP(i2c2_sda_x, 1), 466 + GROUP(uart_rts_a, 1), 467 + GROUP(uart_cts_a, 1), 468 + GROUP(uart_tx_a, 1), 469 + GROUP(uart_rx_a, 1), 470 + GROUP(uart_rts_b_x, 2), 471 + GROUP(uart_cts_b_x, 2), 472 + GROUP(uart_tx_b_x, 2), 473 + GROUP(uart_rx_b_x, 2), 474 + GROUP(jtag_tdo_x, 2), 475 + GROUP(jtag_tdi_x, 2), 476 + GROUP(jtag_clk_x, 2), 477 + GROUP(jtag_tms_x, 2), 478 + GROUP(spi1_clk_x, 4), 479 + GROUP(spi1_mosi_x, 4), 480 + GROUP(spi1_miso_x, 4), 481 + GROUP(spi1_ss0_x, 4), 482 + GROUP(pwm_a_x18, 3), 483 + GROUP(pwm_a_x20, 1), 484 + GROUP(pwm_b_x, 3), 485 + GROUP(pwm_c_x10, 3), 486 + GROUP(pwm_c_x17, 3), 487 + GROUP(pwm_d_x11, 3), 488 + GROUP(pwm_d_x16, 3), 489 + GROUP(eth_txd0_x, 4), 490 + GROUP(eth_txd1_x, 4), 491 + GROUP(eth_txen_x, 4), 492 + GROUP(eth_rgmii_rx_clk_x, 4), 493 + GROUP(eth_rxd0_x, 4), 494 + GROUP(eth_rxd1_x, 4), 495 + GROUP(eth_rx_dv_x, 4), 496 + GROUP(eth_mdio_x, 4), 497 + GROUP(eth_mdc_x, 4), 498 + 499 + /* bank GPIOY */ 500 + GROUP(eth_txd0_y, 1), 501 + GROUP(eth_txd1_y, 1), 502 + GROUP(eth_txen_y, 1), 503 + GROUP(eth_rgmii_rx_clk_y, 1), 504 + GROUP(eth_rxd0_y, 1), 505 + GROUP(eth_rxd1_y, 1), 506 + GROUP(eth_rx_dv_y, 1), 507 + GROUP(eth_mdio_y, 1), 508 + GROUP(eth_mdc_y, 1), 509 + GROUP(eth_rxd2_rgmii, 1), 510 + GROUP(eth_rxd3_rgmii, 1), 511 + GROUP(eth_rgmii_tx_clk, 1), 512 + GROUP(eth_txd2_rgmii, 1), 513 + GROUP(eth_txd3_rgmii, 1), 514 + 515 + /* bank GPIOA */ 516 + GROUP(spdif_out_a1, 4), 517 + GROUP(spdif_out_a11, 3), 518 + GROUP(spdif_out_a19, 2), 519 + GROUP(spdif_out_a20, 1), 520 + GROUP(spdif_in_a1, 3), 521 + GROUP(spdif_in_a7, 3), 522 + GROUP(spdif_in_a19, 1), 523 + GROUP(spdif_in_a20, 2), 524 + GROUP(spi1_clk_a, 3), 525 + GROUP(spi1_mosi_a, 3), 526 + GROUP(spi1_miso_a, 3), 527 + GROUP(spi1_ss0_a, 3), 528 + GROUP(spi1_ss1, 3), 529 + GROUP(pwm_a_a, 3), 530 + GROUP(pwm_b_a, 3), 531 + GROUP(pwm_c_a, 3), 532 + GROUP(pwm_vs, 2), 533 + GROUP(i2c2_sda_a, 3), 534 + GROUP(i2c2_sck_a, 3), 535 + GROUP(i2c3_sda_a6, 4), 536 + GROUP(i2c3_sck_a7, 4), 537 + GROUP(i2c3_sda_a12, 4), 538 + GROUP(i2c3_sck_a13, 4), 539 + GROUP(i2c3_sda_a19, 4), 540 + GROUP(i2c3_sck_a20, 4), 541 + GROUP(pdm_dclk_a14, 1), 542 + GROUP(pdm_dclk_a19, 3), 543 + GROUP(pdm_din0, 1), 544 + GROUP(pdm_din1, 1), 545 + GROUP(pdm_din2, 1), 546 + GROUP(pdm_din3, 1), 547 + }; 548 + 549 + /* uart_ao_a */ 550 + static const unsigned int uart_ao_tx_a_pins[] = {GPIOAO_0}; 551 + static const unsigned int uart_ao_rx_a_pins[] = {GPIOAO_1}; 552 + static const unsigned int uart_ao_cts_a_pins[] = {GPIOAO_2}; 553 + static const unsigned int uart_ao_rts_a_pins[] = {GPIOAO_3}; 554 + 555 + /* uart_ao_b */ 556 + static const unsigned int uart_ao_tx_b_pins[] = {GPIOAO_4}; 557 + static const unsigned int uart_ao_rx_b_pins[] = {GPIOAO_5}; 558 + static const unsigned int uart_ao_cts_b_pins[] = {GPIOAO_2}; 559 + static const unsigned int uart_ao_rts_b_pins[] = {GPIOAO_3}; 560 + 561 + /* i2c_ao */ 562 + static const unsigned int i2c_ao_sck_4_pins[] = {GPIOAO_4}; 563 + static const unsigned int i2c_ao_sda_5_pins[] = {GPIOAO_5}; 564 + static const unsigned int i2c_ao_sck_8_pins[] = {GPIOAO_8}; 565 + static const unsigned int i2c_ao_sda_9_pins[] = {GPIOAO_9}; 566 + static const unsigned int i2c_ao_sck_10_pins[] = {GPIOAO_10}; 567 + static const unsigned int i2c_ao_sda_11_pins[] = {GPIOAO_11}; 568 + 569 + /* i2c_ao_slave */ 570 + static const unsigned int i2c_ao_slave_sck_pins[] = {GPIOAO_10}; 571 + static const unsigned int i2c_ao_slave_sda_pins[] = {GPIOAO_11}; 572 + 573 + /* ir_in */ 574 + static const unsigned int remote_input_ao_pins[] = {GPIOAO_6}; 575 + 576 + /* ir_out */ 577 + static const unsigned int remote_out_ao_pins[] = {GPIOAO_7}; 578 + 579 + /* pwm_ao_a */ 580 + static const unsigned int pwm_ao_a_pins[] = {GPIOAO_3}; 581 + 582 + /* pwm_ao_b */ 583 + static const unsigned int pwm_ao_b_ao2_pins[] = {GPIOAO_2}; 584 + static const unsigned int pwm_ao_b_ao12_pins[] = {GPIOAO_12}; 585 + 586 + /* pwm_ao_c */ 587 + static const unsigned int pwm_ao_c_ao8_pins[] = {GPIOAO_8}; 588 + static const unsigned int pwm_ao_c_ao13_pins[] = {GPIOAO_13}; 589 + 590 + /* pwm_ao_d */ 591 + static const unsigned int pwm_ao_d_pins[] = {GPIOAO_9}; 592 + 593 + /* jtag_ao */ 594 + static const unsigned int jtag_ao_tdi_pins[] = {GPIOAO_3}; 595 + static const unsigned int jtag_ao_tdo_pins[] = {GPIOAO_4}; 596 + static const unsigned int jtag_ao_clk_pins[] = {GPIOAO_5}; 597 + static const unsigned int jtag_ao_tms_pins[] = {GPIOAO_7}; 598 + 599 + static struct meson_pmx_group meson_axg_aobus_groups[] = { 600 + GPIO_GROUP(GPIOAO_0), 601 + GPIO_GROUP(GPIOAO_1), 602 + GPIO_GROUP(GPIOAO_2), 603 + GPIO_GROUP(GPIOAO_3), 604 + GPIO_GROUP(GPIOAO_4), 605 + GPIO_GROUP(GPIOAO_5), 606 + GPIO_GROUP(GPIOAO_6), 607 + GPIO_GROUP(GPIOAO_7), 608 + GPIO_GROUP(GPIOAO_8), 609 + GPIO_GROUP(GPIOAO_9), 610 + GPIO_GROUP(GPIOAO_10), 611 + GPIO_GROUP(GPIOAO_11), 612 + GPIO_GROUP(GPIOAO_12), 613 + GPIO_GROUP(GPIOAO_13), 614 + GPIO_GROUP(GPIO_TEST_N), 615 + 616 + /* bank AO */ 617 + GROUP(uart_ao_tx_a, 1), 618 + GROUP(uart_ao_rx_a, 1), 619 + GROUP(uart_ao_cts_a, 2), 620 + GROUP(uart_ao_rts_a, 2), 621 + GROUP(uart_ao_tx_b, 1), 622 + GROUP(uart_ao_rx_b, 1), 623 + GROUP(uart_ao_cts_b, 1), 624 + GROUP(uart_ao_rts_b, 1), 625 + GROUP(i2c_ao_sck_4, 2), 626 + GROUP(i2c_ao_sda_5, 2), 627 + GROUP(i2c_ao_sck_8, 2), 628 + GROUP(i2c_ao_sda_9, 2), 629 + GROUP(i2c_ao_sck_10, 2), 630 + GROUP(i2c_ao_sda_11, 2), 631 + GROUP(i2c_ao_slave_sck, 1), 632 + GROUP(i2c_ao_slave_sda, 1), 633 + GROUP(remote_input_ao, 1), 634 + GROUP(remote_out_ao, 1), 635 + GROUP(pwm_ao_a, 3), 636 + GROUP(pwm_ao_b_ao2, 3), 637 + GROUP(pwm_ao_b_ao12, 3), 638 + GROUP(pwm_ao_c_ao8, 3), 639 + GROUP(pwm_ao_c_ao13, 3), 640 + GROUP(pwm_ao_d, 3), 641 + GROUP(jtag_ao_tdi, 4), 642 + GROUP(jtag_ao_tdo, 4), 643 + GROUP(jtag_ao_clk, 4), 644 + GROUP(jtag_ao_tms, 4), 645 + }; 646 + 647 + static const char * const gpio_periphs_groups[] = { 648 + "GPIOZ_0", "GPIOZ_1", "GPIOZ_2", "GPIOZ_3", "GPIOZ_4", 649 + "GPIOZ_5", "GPIOZ_6", "GPIOZ_7", "GPIOZ_8", "GPIOZ_9", 650 + "GPIOZ_10", 651 + 652 + "BOOT_0", "BOOT_1", "BOOT_2", "BOOT_3", "BOOT_4", 653 + "BOOT_5", "BOOT_6", "BOOT_7", "BOOT_8", "BOOT_9", 654 + "BOOT_10", "BOOT_11", "BOOT_12", "BOOT_13", "BOOT_14", 655 + 656 + "GPIOA_0", "GPIOA_1", "GPIOA_2", "GPIOA_3", "GPIOA_4", 657 + "GPIOA_5", "GPIOA_6", "GPIOA_7", "GPIOA_8", "GPIOA_9", 658 + "GPIOA_10", "GPIOA_11", "GPIOA_12", "GPIOA_13", "GPIOA_14", 659 + "GPIOA_15", "GPIOA_16", "GPIOA_17", "GPIOA_18", "GPIOA_19", 660 + "GPIOA_20", 661 + 662 + "GPIOX_0", "GPIOX_1", "GPIOX_2", "GPIOX_3", "GPIOX_4", 663 + "GPIOX_5", "GPIOX_6", "GPIOX_7", "GPIOX_8", "GPIOX_9", 664 + "GPIOX_10", "GPIOX_11", "GPIOX_12", "GPIOX_13", "GPIOX_14", 665 + "GPIOX_15", "GPIOX_16", "GPIOX_17", "GPIOX_18", "GPIOX_19", 666 + "GPIOX_20", "GPIOX_21", "GPIOX_22", 667 + 668 + "GPIOY_0", "GPIOY_1", "GPIOY_2", "GPIOY_3", "GPIOY_4", 669 + "GPIOY_5", "GPIOY_6", "GPIOY_7", "GPIOY_8", "GPIOY_9", 670 + "GPIOY_10", "GPIOY_11", "GPIOY_12", "GPIOY_13", "GPIOY_14", 671 + "GPIOY_15", 672 + }; 673 + 674 + static const char * const emmc_groups[] = { 675 + "emmc_nand_d0", "emmc_nand_d1", "emmc_nand_d2", 676 + "emmc_nand_d3", "emmc_nand_d4", "emmc_nand_d5", 677 + "emmc_nand_d6", "emmc_nand_d7", 678 + "emmc_clk", "emmc_cmd", "emmc_ds", 679 + }; 680 + 681 + static const char * const nand_groups[] = { 682 + "emmc_nand_d0", "emmc_nand_d1", "emmc_nand_d2", 683 + "emmc_nand_d3", "emmc_nand_d4", "emmc_nand_d5", 684 + "emmc_nand_d6", "emmc_nand_d7", 685 + "nand_ce0", "nand_ale", "nand_cle", 686 + "nand_wen_clk", "nand_ren_wr", "nand_rb0", 687 + }; 688 + 689 + static const char * const nor_groups[] = { 690 + "nor_d", "nor_q", "nor_c", "nor_cs", 691 + "nor_hold", "nor_wp", 692 + }; 693 + 694 + static const char * const sdio_groups[] = { 695 + "sdio_d0", "sdio_d1", "sdio_d2", "sdio_d3", 696 + "sdio_cmd", "sdio_clk", 697 + }; 698 + 699 + static const char * const spi0_groups[] = { 700 + "spi0_clk", "spi0_mosi", "spi0_miso", "spi0_ss0", 701 + "spi0_ss1", "spi0_ss2" 702 + }; 703 + 704 + static const char * const spi1_groups[] = { 705 + "spi1_clk_x", "spi1_mosi_x", "spi1_miso_x", "spi1_ss0_x", 706 + "spi1_clk_a", "spi1_mosi_a", "spi1_miso_a", "spi1_ss0_a", 707 + "spi1_ss1" 708 + }; 709 + 710 + static const char * const uart_a_groups[] = { 711 + "uart_tx_a", "uart_rx_a", "uart_cts_a", "uart_rts_a", 712 + }; 713 + 714 + static const char * const uart_b_groups[] = { 715 + "uart_tx_b_z", "uart_rx_b_z", "uart_cts_b_z", "uart_rts_b_z", 716 + "uart_tx_b_x", "uart_rx_b_x", "uart_cts_b_x", "uart_rts_b_x", 717 + }; 718 + 719 + static const char * const uart_ao_b_gpioz_groups[] = { 720 + "uart_ao_tx_b_z", "uart_ao_rx_b_z", 721 + "uart_ao_cts_b_z", "uart_ao_rts_b_z", 722 + }; 723 + 724 + static const char * const i2c0_groups[] = { 725 + "i2c0_sck", "i2c0_sda", 726 + }; 727 + 728 + static const char * const i2c1_groups[] = { 729 + "i2c1_sck_z", "i2c1_sda_z", 730 + "i2c1_sck_x", "i2c1_sda_x", 731 + }; 732 + 733 + static const char * const i2c2_groups[] = { 734 + "i2c2_sck_x", "i2c2_sda_x", 735 + "i2c2_sda_a", "i2c2_sck_a", 736 + }; 737 + 738 + static const char * const i2c3_groups[] = { 739 + "i2c3_sda_a6", "i2c3_sck_a7", 740 + "i2c3_sda_a12", "i2c3_sck_a13", 741 + "i2c3_sda_a19", "i2c3_sck_a20", 742 + }; 743 + 744 + static const char * const eth_groups[] = { 745 + "eth_rxd2_rgmii", "eth_rxd3_rgmii", "eth_rgmii_tx_clk", 746 + "eth_txd2_rgmii", "eth_txd3_rgmii", 747 + "eth_txd0_x", "eth_txd1_x", "eth_txen_x", "eth_rgmii_rx_clk_x", 748 + "eth_rxd0_x", "eth_rxd1_x", "eth_rx_dv_x", "eth_mdio_x", 749 + "eth_mdc_x", 750 + "eth_txd0_y", "eth_txd1_y", "eth_txen_y", "eth_rgmii_rx_clk_y", 751 + "eth_rxd0_y", "eth_rxd1_y", "eth_rx_dv_y", "eth_mdio_y", 752 + "eth_mdc_y", 753 + }; 754 + 755 + static const char * const pwm_a_groups[] = { 756 + "pwm_a_z", "pwm_a_x18", "pwm_a_x20", "pwm_a_a", 757 + }; 758 + 759 + static const char * const pwm_b_groups[] = { 760 + "pwm_b_z", "pwm_b_x", "pwm_b_a", 761 + }; 762 + 763 + static const char * const pwm_c_groups[] = { 764 + "pwm_c_x10", "pwm_c_x17", "pwm_c_a", 765 + }; 766 + 767 + static const char * const pwm_d_groups[] = { 768 + "pwm_d_x11", "pwm_d_x16", 769 + }; 770 + 771 + static const char * const pwm_vs_groups[] = { 772 + "pwm_vs", 773 + }; 774 + 775 + static const char * const spdif_out_groups[] = { 776 + "spdif_out_z", "spdif_out_a1", "spdif_out_a11", 777 + "spdif_out_a19", "spdif_out_a20", 778 + }; 779 + 780 + static const char * const spdif_in_groups[] = { 781 + "spdif_in_z", "spdif_in_a1", "spdif_in_a7", 782 + "spdif_in_a19", "spdif_in_a20", 783 + }; 784 + 785 + static const char * const jtag_ee_groups[] = { 786 + "jtag_tdo_x", "jtag_tdi_x", "jtag_clk_x", 787 + "jtag_tms_x", 788 + }; 789 + 790 + static const char * const pdm_groups[] = { 791 + "pdm_din0", "pdm_din1", "pdm_din2", "pdm_din3", 792 + "pdm_dclk_a14", "pdm_dclk_a19", 793 + }; 794 + 795 + static const char * const gpio_aobus_groups[] = { 796 + "GPIOAO_0", "GPIOAO_1", "GPIOAO_2", "GPIOAO_3", "GPIOAO_4", 797 + "GPIOAO_5", "GPIOAO_6", "GPIOAO_7", "GPIOAO_8", "GPIOAO_9", 798 + "GPIOAO_10", "GPIOAO_11", "GPIOAO_12", "GPIOAO_13", 799 + "GPIO_TEST_N", 800 + }; 801 + 802 + static const char * const uart_ao_a_groups[] = { 803 + "uart_ao_tx_a", "uart_ao_rx_a", "uart_ao_cts_a", "uart_ao_rts_a", 804 + }; 805 + 806 + static const char * const uart_ao_b_groups[] = { 807 + "uart_ao_tx_b", "uart_ao_rx_b", "uart_ao_cts_b", "uart_ao_rts_b", 808 + }; 809 + 810 + static const char * const i2c_ao_groups[] = { 811 + "i2c_ao_sck_4", "i2c_ao_sda_5", 812 + "i2c_ao_sck_8", "i2c_ao_sda_9", 813 + "i2c_ao_sck_10", "i2c_ao_sda_11", 814 + }; 815 + 816 + static const char * const i2c_ao_slave_groups[] = { 817 + "i2c_ao_slave_sck", "i2c_ao_slave_sda", 818 + }; 819 + 820 + static const char * const remote_input_ao_groups[] = { 821 + "remote_input_ao", 822 + }; 823 + 824 + static const char * const remote_out_ao_groups[] = { 825 + "remote_out_ao", 826 + }; 827 + 828 + static const char * const pwm_ao_a_groups[] = { 829 + "pwm_ao_a", 830 + }; 831 + 832 + static const char * const pwm_ao_b_groups[] = { 833 + "pwm_ao_b_ao2", "pwm_ao_b_ao12", 834 + }; 835 + 836 + static const char * const pwm_ao_c_groups[] = { 837 + "pwm_ao_c_ao8", "pwm_ao_c_ao13", 838 + }; 839 + 840 + static const char * const pwm_ao_d_groups[] = { 841 + "pwm_ao_d", 842 + }; 843 + 844 + static const char * const jtag_ao_groups[] = { 845 + "jtag_ao_tdi", "jtag_ao_tdo", "jtag_ao_clk", "jtag_ao_tms", 846 + }; 847 + 848 + static struct meson_pmx_func meson_axg_periphs_functions[] = { 849 + FUNCTION(gpio_periphs), 850 + FUNCTION(emmc), 851 + FUNCTION(nor), 852 + FUNCTION(spi0), 853 + FUNCTION(spi1), 854 + FUNCTION(sdio), 855 + FUNCTION(nand), 856 + FUNCTION(uart_a), 857 + FUNCTION(uart_b), 858 + FUNCTION(uart_ao_b_gpioz), 859 + FUNCTION(i2c0), 860 + FUNCTION(i2c1), 861 + FUNCTION(i2c2), 862 + FUNCTION(i2c3), 863 + FUNCTION(eth), 864 + FUNCTION(pwm_a), 865 + FUNCTION(pwm_b), 866 + FUNCTION(pwm_c), 867 + FUNCTION(pwm_d), 868 + FUNCTION(pwm_vs), 869 + FUNCTION(spdif_out), 870 + FUNCTION(spdif_in), 871 + FUNCTION(jtag_ee), 872 + FUNCTION(pdm), 873 + }; 874 + 875 + static struct meson_pmx_func meson_axg_aobus_functions[] = { 876 + FUNCTION(gpio_aobus), 877 + FUNCTION(uart_ao_a), 878 + FUNCTION(uart_ao_b), 879 + FUNCTION(i2c_ao), 880 + FUNCTION(i2c_ao_slave), 881 + FUNCTION(remote_input_ao), 882 + FUNCTION(remote_out_ao), 883 + FUNCTION(pwm_ao_a), 884 + FUNCTION(pwm_ao_b), 885 + FUNCTION(pwm_ao_c), 886 + FUNCTION(pwm_ao_d), 887 + FUNCTION(jtag_ao), 888 + }; 889 + 890 + static struct meson_bank meson_axg_periphs_banks[] = { 891 + /* name first last irq pullen pull dir out in */ 892 + BANK("Z", GPIOZ_0, GPIOZ_10, 14, 24, 3, 0, 3, 0, 9, 0, 10, 0, 11, 0), 893 + BANK("BOOT", BOOT_0, BOOT_14, 25, 39, 4, 0, 4, 0, 12, 0, 13, 0, 14, 0), 894 + BANK("A", GPIOA_0, GPIOA_20, 40, 60, 0, 0, 0, 0, 0, 0, 1, 0, 2, 0), 895 + BANK("X", GPIOX_0, GPIOX_22, 61, 83, 2, 0, 2, 0, 6, 0, 7, 0, 8, 0), 896 + BANK("Y", GPIOY_0, GPIOY_15, 84, 99, 1, 0, 1, 0, 3, 0, 4, 0, 5, 0), 897 + }; 898 + 899 + static struct meson_bank meson_axg_aobus_banks[] = { 900 + /* name first last irq pullen pull dir out in */ 901 + BANK("AO", GPIOAO_0, GPIOAO_9, 0, 13, 0, 16, 0, 0, 0, 0, 0, 16, 1, 0), 902 + }; 903 + 904 + static struct meson_pmx_bank meson_axg_periphs_pmx_banks[] = { 905 + /* name first lask reg offset */ 906 + BANK_PMX("Z", GPIOZ_0, GPIOZ_10, 0x2, 0), 907 + BANK_PMX("BOOT", BOOT_0, BOOT_14, 0x0, 0), 908 + BANK_PMX("A", GPIOA_0, GPIOA_20, 0xb, 0), 909 + BANK_PMX("X", GPIOX_0, GPIOX_22, 0x4, 0), 910 + BANK_PMX("Y", GPIOY_0, GPIOY_15, 0x8, 0), 911 + }; 912 + 913 + static struct meson_axg_pmx_data meson_axg_periphs_pmx_banks_data = { 914 + .pmx_banks = meson_axg_periphs_pmx_banks, 915 + .num_pmx_banks = ARRAY_SIZE(meson_axg_periphs_pmx_banks), 916 + }; 917 + 918 + static struct meson_pmx_bank meson_axg_aobus_pmx_banks[] = { 919 + BANK_PMX("AO", GPIOAO_0, GPIOAO_13, 0x0, 0), 920 + }; 921 + 922 + static struct meson_axg_pmx_data meson_axg_aobus_pmx_banks_data = { 923 + .pmx_banks = meson_axg_aobus_pmx_banks, 924 + .num_pmx_banks = ARRAY_SIZE(meson_axg_aobus_pmx_banks), 925 + }; 926 + 927 + static struct meson_pinctrl_data meson_axg_periphs_pinctrl_data = { 928 + .name = "periphs-banks", 929 + .pins = meson_axg_periphs_pins, 930 + .groups = meson_axg_periphs_groups, 931 + .funcs = meson_axg_periphs_functions, 932 + .banks = meson_axg_periphs_banks, 933 + .num_pins = ARRAY_SIZE(meson_axg_periphs_pins), 934 + .num_groups = ARRAY_SIZE(meson_axg_periphs_groups), 935 + .num_funcs = ARRAY_SIZE(meson_axg_periphs_functions), 936 + .num_banks = ARRAY_SIZE(meson_axg_periphs_banks), 937 + .pmx_ops = &meson_axg_pmx_ops, 938 + .pmx_data = &meson_axg_periphs_pmx_banks_data, 939 + }; 940 + 941 + static struct meson_pinctrl_data meson_axg_aobus_pinctrl_data = { 942 + .name = "aobus-banks", 943 + .pins = meson_axg_aobus_pins, 944 + .groups = meson_axg_aobus_groups, 945 + .funcs = meson_axg_aobus_functions, 946 + .banks = meson_axg_aobus_banks, 947 + .num_pins = ARRAY_SIZE(meson_axg_aobus_pins), 948 + .num_groups = ARRAY_SIZE(meson_axg_aobus_groups), 949 + .num_funcs = ARRAY_SIZE(meson_axg_aobus_functions), 950 + .num_banks = ARRAY_SIZE(meson_axg_aobus_banks), 951 + .pmx_ops = &meson_axg_pmx_ops, 952 + .pmx_data = &meson_axg_aobus_pmx_banks_data, 953 + }; 954 + 955 + static const struct of_device_id meson_axg_pinctrl_dt_match[] = { 956 + { 957 + .compatible = "amlogic,meson-axg-periphs-pinctrl", 958 + .data = &meson_axg_periphs_pinctrl_data, 959 + }, 960 + { 961 + .compatible = "amlogic,meson-axg-aobus-pinctrl", 962 + .data = &meson_axg_aobus_pinctrl_data, 963 + }, 964 + { }, 965 + }; 966 + 967 + static struct platform_driver meson_axg_pinctrl_driver = { 968 + .probe = meson_pinctrl_probe, 969 + .driver = { 970 + .name = "meson-axg-pinctrl", 971 + .of_match_table = meson_axg_pinctrl_dt_match, 972 + }, 973 + }; 974 + 975 + builtin_platform_driver(meson_axg_pinctrl_driver);
+1
drivers/pinctrl/meson/pinctrl-meson.h
··· 108 108 struct meson_bank *banks; 109 109 unsigned int num_banks; 110 110 const struct pinmux_ops *pmx_ops; 111 + void *pmx_data; 111 112 }; 112 113 113 114 struct meson_pinctrl {
+2 -2
drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
··· 1006 1006 static const struct of_device_id armada_37xx_pinctrl_of_match[] = { 1007 1007 { 1008 1008 .compatible = "marvell,armada3710-sb-pinctrl", 1009 - .data = (void *)&armada_37xx_pin_sb, 1009 + .data = &armada_37xx_pin_sb, 1010 1010 }, 1011 1011 { 1012 1012 .compatible = "marvell,armada3710-nb-pinctrl", 1013 - .data = (void *)&armada_37xx_pin_nb, 1013 + .data = &armada_37xx_pin_nb, 1014 1014 }, 1015 1015 { }, 1016 1016 };
+2 -3
drivers/pinctrl/mvebu/pinctrl-mvebu.c
··· 636 636 */ 637 637 size = pctl->num_groups * sizeof(*pctl->groups) + noname * 8; 638 638 p = devm_kzalloc(&pdev->dev, size, GFP_KERNEL); 639 - if (!p) { 640 - dev_err(&pdev->dev, "failed to alloc group data\n"); 639 + if (!p) 641 640 return -ENOMEM; 642 - } 641 + 643 642 pctl->groups = p; 644 643 noname_buf = p + pctl->num_groups * sizeof(*pctl->groups); 645 644
+3 -7
drivers/pinctrl/nomadik/pinctrl-abx500.c
··· 633 633 for (i = 0; i < chip->ngpio; i++, gpio++) { 634 634 /* On AB8500, there is no GPIO0, the first is the GPIO 1 */ 635 635 abx500_gpio_dbg_show_one(s, pctldev, chip, i + 1, gpio); 636 - seq_printf(s, "\n"); 636 + seq_putc(s, '\n'); 637 637 } 638 638 } 639 639 ··· 1155 1155 return -ENODEV; 1156 1156 } 1157 1157 1158 - pct = devm_kzalloc(&pdev->dev, sizeof(struct abx500_pinctrl), 1159 - GFP_KERNEL); 1160 - if (pct == NULL) { 1161 - dev_err(&pdev->dev, 1162 - "failed to allocate memory for pct\n"); 1158 + pct = devm_kzalloc(&pdev->dev, sizeof(*pct), GFP_KERNEL); 1159 + if (!pct) 1163 1160 return -ENOMEM; 1164 - } 1165 1161 1166 1162 pct->dev = &pdev->dev; 1167 1163 pct->parent = dev_get_drvdata(pdev->dev.parent);
+4 -9
drivers/pinctrl/pinctrl-adi2.c
··· 827 827 { 828 828 struct device *dev = &pdev->dev; 829 829 struct resource *res; 830 - struct gpio_pint *pint; 830 + struct gpio_pint *pint = devm_kzalloc(dev, sizeof(*pint), GFP_KERNEL); 831 831 832 - pint = devm_kzalloc(dev, sizeof(struct gpio_pint), GFP_KERNEL); 833 - if (!pint) { 834 - dev_err(dev, "Memory alloc failed\n"); 832 + if (!pint) 835 833 return -ENOMEM; 836 - } 837 834 838 835 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 839 836 pint->base = devm_ioremap_resource(dev, res); ··· 942 945 if (!pdata) 943 946 return -EINVAL; 944 947 945 - port = devm_kzalloc(dev, sizeof(struct gpio_port), GFP_KERNEL); 946 - if (!port) { 947 - dev_err(dev, "Memory alloc failed\n"); 948 + port = devm_kzalloc(dev, sizeof(*port), GFP_KERNEL); 949 + if (!port) 948 950 return -ENOMEM; 949 - } 950 951 951 952 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 952 953 port->base = devm_ioremap_resource(dev, res);
+2 -2
drivers/pinctrl/pinctrl-at91-pio4.c
··· 910 910 int i, ret; 911 911 struct resource *res; 912 912 struct atmel_pioctrl *atmel_pioctrl; 913 - struct atmel_pioctrl_data *atmel_pioctrl_data; 913 + const struct atmel_pioctrl_data *atmel_pioctrl_data; 914 914 915 915 atmel_pioctrl = devm_kzalloc(dev, sizeof(*atmel_pioctrl), GFP_KERNEL); 916 916 if (!atmel_pioctrl) ··· 924 924 dev_err(dev, "unknown compatible string\n"); 925 925 return -ENODEV; 926 926 } 927 - atmel_pioctrl_data = (struct atmel_pioctrl_data *)match->data; 927 + atmel_pioctrl_data = match->data; 928 928 atmel_pioctrl->nbanks = atmel_pioctrl_data->nbanks; 929 929 atmel_pioctrl->npins = atmel_pioctrl->nbanks * ATMEL_PIO_NPINS_PER_BANK; 930 930
+1 -3
drivers/pinctrl/pinctrl-at91.c
··· 1050 1050 info->nmux = size / gpio_banks; 1051 1051 1052 1052 info->mux_mask = devm_kzalloc(info->dev, sizeof(u32) * size, GFP_KERNEL); 1053 - if (!info->mux_mask) { 1054 - dev_err(info->dev, "could not alloc mux_mask\n"); 1053 + if (!info->mux_mask) 1055 1054 return -ENOMEM; 1056 - } 1057 1055 1058 1056 ret = of_property_read_u32_array(np, "atmel,mux-mask", 1059 1057 info->mux_mask, size);
+3 -1
drivers/pinctrl/pinctrl-axp209.c
··· 413 413 pctl->chip.set = axp20x_gpio_set; 414 414 pctl->chip.direction_input = axp20x_gpio_input; 415 415 pctl->chip.direction_output = axp20x_gpio_output; 416 + 417 + pctl->desc = of_device_get_match_data(dev); 418 + 416 419 pctl->chip.ngpio = pctl->desc->npins; 417 420 418 - pctl->desc = (struct axp20x_pctrl_desc *)of_device_get_match_data(dev); 419 421 pctl->regmap = axp20x->regmap; 420 422 pctl->dev = &pdev->dev; 421 423
+83 -1
drivers/pinctrl/pinctrl-gemini.c
··· 67 67 * elements in .pins so we can iterate over that array 68 68 * @mask: bits to clear to enable this when doing pin muxing 69 69 * @value: bits to set to enable this when doing pin muxing 70 + * @driving_mask: bitmask for the IO Pad driving register for this 71 + * group, if it supports altering the driving strength of 72 + * its lines. 70 73 */ 71 74 struct gemini_pin_group { 72 75 const char *name; ··· 77 74 const unsigned int num_pins; 78 75 u32 mask; 79 76 u32 value; 77 + u32 driving_mask; 80 78 }; 81 79 82 80 /* Some straight-forward control registers */ 83 81 #define GLOBAL_WORD_ID 0x00 84 82 #define GLOBAL_STATUS 0x04 85 83 #define GLOBAL_STATUS_FLPIN BIT(20) 84 + #define GLOBAL_IODRIVE 0x10 86 85 #define GLOBAL_GMAC_CTRL_SKEW 0x1c 87 86 #define GLOBAL_GMAC0_DATA_SKEW 0x20 88 87 #define GLOBAL_GMAC1_DATA_SKEW 0x24 ··· 743 738 /* Conflict with all flash usage */ 744 739 .value = IDE_PADS_ENABLE | NAND_PADS_DISABLE | 745 740 PFLASH_PADS_DISABLE | SFLASH_PADS_DISABLE, 741 + .driving_mask = GENMASK(21, 20), 746 742 }, 747 743 { 748 744 .name = "satagrp", ··· 759 753 .name = "gmii_gmac0_grp", 760 754 .pins = gmii_gmac0_3512_pins, 761 755 .num_pins = ARRAY_SIZE(gmii_gmac0_3512_pins), 756 + .driving_mask = GENMASK(17, 16), 762 757 }, 763 758 { 764 759 .name = "gmii_gmac1_grp", ··· 767 760 .num_pins = ARRAY_SIZE(gmii_gmac1_3512_pins), 768 761 /* Bring out RGMII on the GMAC1 pins */ 769 762 .value = GEMINI_GMAC_IOSEL_GMAC0_GMAC1_RGMII, 763 + .driving_mask = GENMASK(19, 18), 770 764 }, 771 765 { 772 766 .name = "pcigrp", ··· 775 767 .num_pins = ARRAY_SIZE(pci_3512_pins), 776 768 /* Conflict only with GPIO2 */ 777 769 .value = PCI_PADS_ENABLE | PCI_CLK_PAD_ENABLE, 770 + .driving_mask = GENMASK(23, 22), 778 771 }, 779 772 { 780 773 .name = "lpcgrp", ··· 1680 1671 /* Conflict with all flash usage */ 1681 1672 .value = IDE_PADS_ENABLE | NAND_PADS_DISABLE | 1682 1673 PFLASH_PADS_DISABLE | SFLASH_PADS_DISABLE, 1674 + .driving_mask = GENMASK(21, 20), 1683 1675 }, 1684 1676 { 1685 1677 .name = "satagrp", ··· 1696 1686 .name = "gmii_gmac0_grp", 1697 1687 .pins = gmii_gmac0_3516_pins, 1698 1688 .num_pins = ARRAY_SIZE(gmii_gmac0_3516_pins), 1689 + .driving_mask = GENMASK(17, 16), 1699 1690 }, 1700 1691 { 1701 1692 .name = "gmii_gmac1_grp", ··· 1704 1693 .num_pins = ARRAY_SIZE(gmii_gmac1_3516_pins), 1705 1694 /* Bring out RGMII on the GMAC1 pins */ 1706 1695 .value = GEMINI_GMAC_IOSEL_GMAC0_GMAC1_RGMII, 1696 + .driving_mask = GENMASK(19, 18), 1707 1697 }, 1708 1698 { 1709 1699 .name = "pcigrp", ··· 1712 1700 .num_pins = ARRAY_SIZE(pci_3516_pins), 1713 1701 /* Conflict only with GPIO2 */ 1714 1702 .value = PCI_PADS_ENABLE | PCI_CLK_PAD_ENABLE, 1703 + .driving_mask = GENMASK(23, 22), 1715 1704 }, 1716 1705 { 1717 1706 .name = "lpcgrp", ··· 2028 2015 static const char * const gpio0grps[] = { "gpio0agrp", "gpio0bgrp", "gpio0cgrp", 2029 2016 "gpio0dgrp", "gpio0egrp", "gpio0fgrp", 2030 2017 "gpio0ggrp", "gpio0hgrp", "gpio0igrp", 2031 - "gpio0jgrp", "gpio0kgrp" }; 2018 + "gpio0jgrp", "gpio0kgrp", "gpio0lgrp", 2019 + "gpio0mgrp" }; 2032 2020 static const char * const gpio1grps[] = { "gpio1agrp", "gpio1bgrp", "gpio1cgrp", 2033 2021 "gpio1dgrp" }; 2034 2022 static const char * const gpio2grps[] = { "gpio2agrp", "gpio2bgrp", "gpio2cgrp" }; ··· 2407 2393 return ret; 2408 2394 } 2409 2395 2396 + static int gemini_pinconf_group_set(struct pinctrl_dev *pctldev, 2397 + unsigned selector, 2398 + unsigned long *configs, 2399 + unsigned num_configs) 2400 + { 2401 + struct gemini_pmx *pmx = pinctrl_dev_get_drvdata(pctldev); 2402 + const struct gemini_pin_group *grp = NULL; 2403 + enum pin_config_param param; 2404 + u32 arg; 2405 + u32 val; 2406 + int i; 2407 + 2408 + if (pmx->is_3512) 2409 + grp = &gemini_3512_pin_groups[selector]; 2410 + if (pmx->is_3516) 2411 + grp = &gemini_3516_pin_groups[selector]; 2412 + 2413 + /* First figure out if this group supports configs */ 2414 + if (!grp->driving_mask) { 2415 + dev_err(pmx->dev, "pin config group \"%s\" does " 2416 + "not support drive strength setting\n", 2417 + grp->name); 2418 + return -EINVAL; 2419 + } 2420 + 2421 + for (i = 0; i < num_configs; i++) { 2422 + param = pinconf_to_config_param(configs[i]); 2423 + arg = pinconf_to_config_argument(configs[i]); 2424 + 2425 + switch (param) { 2426 + case PIN_CONFIG_DRIVE_STRENGTH: 2427 + switch (arg) { 2428 + case 4: 2429 + val = 0; 2430 + break; 2431 + case 8: 2432 + val = 1; 2433 + break; 2434 + case 12: 2435 + val = 2; 2436 + break; 2437 + case 16: 2438 + val = 3; 2439 + break; 2440 + default: 2441 + dev_err(pmx->dev, 2442 + "invalid drive strength %d mA\n", 2443 + arg); 2444 + return -ENOTSUPP; 2445 + } 2446 + val <<= (ffs(grp->driving_mask) - 1); 2447 + regmap_update_bits(pmx->map, GLOBAL_IODRIVE, 2448 + grp->driving_mask, 2449 + val); 2450 + dev_info(pmx->dev, 2451 + "set group %s to %d mA drive strength mask %08x val %08x\n", 2452 + grp->name, arg, grp->driving_mask, val); 2453 + break; 2454 + default: 2455 + dev_err(pmx->dev, "invalid config param %04x\n", param); 2456 + return -ENOTSUPP; 2457 + } 2458 + } 2459 + 2460 + return 0; 2461 + } 2462 + 2410 2463 static const struct pinconf_ops gemini_pinconf_ops = { 2411 2464 .pin_config_get = gemini_pinconf_get, 2412 2465 .pin_config_set = gemini_pinconf_set, 2466 + .pin_config_group_set = gemini_pinconf_group_set, 2413 2467 .is_generic = true, 2414 2468 }; 2415 2469
+1 -3
drivers/pinctrl/pinctrl-ingenic.c
··· 736 736 737 737 base = devm_ioremap_resource(dev, 738 738 platform_get_resource(pdev, IORESOURCE_MEM, 0)); 739 - if (IS_ERR(base)) { 740 - dev_err(dev, "Failed to ioremap registers\n"); 739 + if (IS_ERR(base)) 741 740 return PTR_ERR(base); 742 - } 743 741 744 742 jzpc->map = devm_regmap_init_mmio(dev, base, 745 743 &ingenic_pinctrl_regmap_config);
+24 -30
drivers/pinctrl/pinctrl-mcp23s08.c
··· 455 455 defval_changed, gpio_set; 456 456 457 457 mutex_lock(&mcp->lock); 458 - if (mcp_read(mcp, MCP_INTF, &intf) < 0) { 459 - mutex_unlock(&mcp->lock); 460 - return IRQ_HANDLED; 461 - } 458 + if (mcp_read(mcp, MCP_INTF, &intf)) 459 + goto unlock; 462 460 463 - if (mcp_read(mcp, MCP_INTCAP, &intcap) < 0) { 464 - mutex_unlock(&mcp->lock); 465 - return IRQ_HANDLED; 466 - } 461 + if (mcp_read(mcp, MCP_INTCAP, &intcap)) 462 + goto unlock; 467 463 468 - if (mcp_read(mcp, MCP_INTCON, &intcon) < 0) { 469 - mutex_unlock(&mcp->lock); 470 - return IRQ_HANDLED; 471 - } 464 + if (mcp_read(mcp, MCP_INTCON, &intcon)) 465 + goto unlock; 472 466 473 - if (mcp_read(mcp, MCP_DEFVAL, &defval) < 0) { 474 - mutex_unlock(&mcp->lock); 475 - return IRQ_HANDLED; 476 - } 467 + if (mcp_read(mcp, MCP_DEFVAL, &defval)) 468 + goto unlock; 477 469 478 470 /* This clears the interrupt(configurable on S18) */ 479 - if (mcp_read(mcp, MCP_GPIO, &gpio) < 0) { 480 - mutex_unlock(&mcp->lock); 481 - return IRQ_HANDLED; 482 - } 471 + if (mcp_read(mcp, MCP_GPIO, &gpio)) 472 + goto unlock; 473 + 483 474 gpio_orig = mcp->cached_gpio; 484 475 mcp->cached_gpio = gpio; 485 476 mutex_unlock(&mcp->lock); ··· 531 540 } 532 541 } 533 542 543 + return IRQ_HANDLED; 544 + 545 + unlock: 546 + mutex_unlock(&mcp->lock); 534 547 return IRQ_HANDLED; 535 548 } 536 549 ··· 748 753 if (!label) 749 754 continue; 750 755 751 - seq_printf(s, " gpio-%-3d P%c.%d (%-12s) %s %s %s", 752 - chip->base + t, bank, t, label, 753 - (iodir & mask) ? "in " : "out", 754 - (gpio & mask) ? "hi" : "lo", 755 - (gppu & mask) ? "up" : " "); 756 + seq_printf(s, " gpio-%-3d P%c.%d (%-12s) %s %s %s\n", 757 + chip->base + t, bank, t, label, 758 + (iodir & mask) ? "in " : "out", 759 + (gpio & mask) ? "hi" : "lo", 760 + (gppu & mask) ? "up" : " "); 756 761 /* NOTE: ignoring the irq-related registers */ 757 - seq_puts(s, "\n"); 758 762 } 759 763 done: 760 764 mutex_unlock(&mcp->lock); ··· 890 896 goto fail; 891 897 } 892 898 893 - ret = devm_gpiochip_add_data(dev, &mcp->chip, mcp); 894 - if (ret < 0) 895 - goto fail; 896 - 897 899 if (mcp->irq && mcp->irq_controller) { 898 900 ret = mcp23s08_irq_setup(mcp); 899 901 if (ret) 900 902 goto fail; 901 903 } 904 + 905 + ret = devm_gpiochip_add_data(dev, &mcp->chip, mcp); 906 + if (ret < 0) 907 + goto fail; 902 908 903 909 mcp->pinctrl_desc.name = "mcp23xxx-pinctrl"; 904 910 mcp->pinctrl_desc.pctlops = &mcp_pinctrl_ops;
+511
drivers/pinctrl/pinctrl-ocelot.c
··· 1 + // SPDX-License-Identifier: (GPL-2.0 OR MIT) 2 + /* 3 + * Microsemi SoCs pinctrl driver 4 + * 5 + * Author: <alexandre.belloni@free-electrons.com> 6 + * License: Dual MIT/GPL 7 + * Copyright (c) 2017 Microsemi Corporation 8 + */ 9 + 10 + #include <linux/gpio/driver.h> 11 + #include <linux/interrupt.h> 12 + #include <linux/io.h> 13 + #include <linux/of_device.h> 14 + #include <linux/of_platform.h> 15 + #include <linux/pinctrl/pinctrl.h> 16 + #include <linux/pinctrl/pinmux.h> 17 + #include <linux/pinctrl/pinconf.h> 18 + #include <linux/pinctrl/pinconf-generic.h> 19 + #include <linux/platform_device.h> 20 + #include <linux/regmap.h> 21 + #include <linux/slab.h> 22 + 23 + #include "core.h" 24 + #include "pinconf.h" 25 + #include "pinmux.h" 26 + 27 + #define OCELOT_GPIO_OUT_SET 0x0 28 + #define OCELOT_GPIO_OUT_CLR 0x4 29 + #define OCELOT_GPIO_OUT 0x8 30 + #define OCELOT_GPIO_IN 0xc 31 + #define OCELOT_GPIO_OE 0x10 32 + #define OCELOT_GPIO_INTR 0x14 33 + #define OCELOT_GPIO_INTR_ENA 0x18 34 + #define OCELOT_GPIO_INTR_IDENT 0x1c 35 + #define OCELOT_GPIO_ALT0 0x20 36 + #define OCELOT_GPIO_ALT1 0x24 37 + #define OCELOT_GPIO_SD_MAP 0x28 38 + 39 + #define OCELOT_PINS 22 40 + #define OCELOT_FUNC_PER_PIN 4 41 + 42 + enum { 43 + FUNC_NONE, 44 + FUNC_GPIO, 45 + FUNC_IRQ0_IN, 46 + FUNC_IRQ0_OUT, 47 + FUNC_IRQ1_IN, 48 + FUNC_IRQ1_OUT, 49 + FUNC_MIIM1, 50 + FUNC_PCI_WAKE, 51 + FUNC_PTP0, 52 + FUNC_PTP1, 53 + FUNC_PTP2, 54 + FUNC_PTP3, 55 + FUNC_PWM, 56 + FUNC_RECO_CLK0, 57 + FUNC_RECO_CLK1, 58 + FUNC_SFP0, 59 + FUNC_SFP1, 60 + FUNC_SFP2, 61 + FUNC_SFP3, 62 + FUNC_SFP4, 63 + FUNC_SFP5, 64 + FUNC_SG0, 65 + FUNC_SI, 66 + FUNC_TACHO, 67 + FUNC_TWI, 68 + FUNC_TWI_SCL_M, 69 + FUNC_UART, 70 + FUNC_UART2, 71 + FUNC_MAX 72 + }; 73 + 74 + static const char *const ocelot_function_names[] = { 75 + [FUNC_NONE] = "none", 76 + [FUNC_GPIO] = "gpio", 77 + [FUNC_IRQ0_IN] = "irq0_in", 78 + [FUNC_IRQ0_OUT] = "irq0_out", 79 + [FUNC_IRQ1_IN] = "irq1_in", 80 + [FUNC_IRQ1_OUT] = "irq1_out", 81 + [FUNC_MIIM1] = "miim1", 82 + [FUNC_PCI_WAKE] = "pci_wake", 83 + [FUNC_PTP0] = "ptp0", 84 + [FUNC_PTP1] = "ptp1", 85 + [FUNC_PTP2] = "ptp2", 86 + [FUNC_PTP3] = "ptp3", 87 + [FUNC_PWM] = "pwm", 88 + [FUNC_RECO_CLK0] = "reco_clk0", 89 + [FUNC_RECO_CLK1] = "reco_clk1", 90 + [FUNC_SFP0] = "sfp0", 91 + [FUNC_SFP1] = "sfp1", 92 + [FUNC_SFP2] = "sfp2", 93 + [FUNC_SFP3] = "sfp3", 94 + [FUNC_SFP4] = "sfp4", 95 + [FUNC_SFP5] = "sfp5", 96 + [FUNC_SG0] = "sg0", 97 + [FUNC_SI] = "si", 98 + [FUNC_TACHO] = "tacho", 99 + [FUNC_TWI] = "twi", 100 + [FUNC_TWI_SCL_M] = "twi_scl_m", 101 + [FUNC_UART] = "uart", 102 + [FUNC_UART2] = "uart2", 103 + }; 104 + 105 + struct ocelot_pmx_func { 106 + const char **groups; 107 + unsigned int ngroups; 108 + }; 109 + 110 + struct ocelot_pin_caps { 111 + unsigned int pin; 112 + unsigned char functions[OCELOT_FUNC_PER_PIN]; 113 + }; 114 + 115 + struct ocelot_pinctrl { 116 + struct device *dev; 117 + struct pinctrl_dev *pctl; 118 + struct gpio_chip gpio_chip; 119 + struct regmap *map; 120 + struct ocelot_pmx_func func[FUNC_MAX]; 121 + }; 122 + 123 + #define OCELOT_P(p, f0, f1, f2) \ 124 + static struct ocelot_pin_caps ocelot_pin_##p = { \ 125 + .pin = p, \ 126 + .functions = { \ 127 + FUNC_GPIO, FUNC_##f0, FUNC_##f1, FUNC_##f2, \ 128 + }, \ 129 + } 130 + 131 + OCELOT_P(0, SG0, NONE, NONE); 132 + OCELOT_P(1, SG0, NONE, NONE); 133 + OCELOT_P(2, SG0, NONE, NONE); 134 + OCELOT_P(3, SG0, NONE, NONE); 135 + OCELOT_P(4, IRQ0_IN, IRQ0_OUT, TWI); 136 + OCELOT_P(5, IRQ1_IN, IRQ1_OUT, PCI_WAKE); 137 + OCELOT_P(6, UART, TWI_SCL_M, NONE); 138 + OCELOT_P(7, UART, TWI_SCL_M, NONE); 139 + OCELOT_P(8, SI, TWI_SCL_M, IRQ0_OUT); 140 + OCELOT_P(9, SI, TWI_SCL_M, IRQ1_OUT); 141 + OCELOT_P(10, PTP2, TWI_SCL_M, SFP0); 142 + OCELOT_P(11, PTP3, TWI_SCL_M, SFP1); 143 + OCELOT_P(12, UART2, TWI_SCL_M, SFP2); 144 + OCELOT_P(13, UART2, TWI_SCL_M, SFP3); 145 + OCELOT_P(14, MIIM1, TWI_SCL_M, SFP4); 146 + OCELOT_P(15, MIIM1, TWI_SCL_M, SFP5); 147 + OCELOT_P(16, TWI, NONE, SI); 148 + OCELOT_P(17, TWI, TWI_SCL_M, SI); 149 + OCELOT_P(18, PTP0, TWI_SCL_M, NONE); 150 + OCELOT_P(19, PTP1, TWI_SCL_M, NONE); 151 + OCELOT_P(20, RECO_CLK0, TACHO, NONE); 152 + OCELOT_P(21, RECO_CLK1, PWM, NONE); 153 + 154 + #define OCELOT_PIN(n) { \ 155 + .number = n, \ 156 + .name = "GPIO_"#n, \ 157 + .drv_data = &ocelot_pin_##n \ 158 + } 159 + 160 + static const struct pinctrl_pin_desc ocelot_pins[] = { 161 + OCELOT_PIN(0), 162 + OCELOT_PIN(1), 163 + OCELOT_PIN(2), 164 + OCELOT_PIN(3), 165 + OCELOT_PIN(4), 166 + OCELOT_PIN(5), 167 + OCELOT_PIN(6), 168 + OCELOT_PIN(7), 169 + OCELOT_PIN(8), 170 + OCELOT_PIN(9), 171 + OCELOT_PIN(10), 172 + OCELOT_PIN(11), 173 + OCELOT_PIN(12), 174 + OCELOT_PIN(13), 175 + OCELOT_PIN(14), 176 + OCELOT_PIN(15), 177 + OCELOT_PIN(16), 178 + OCELOT_PIN(17), 179 + OCELOT_PIN(18), 180 + OCELOT_PIN(19), 181 + OCELOT_PIN(20), 182 + OCELOT_PIN(21), 183 + }; 184 + 185 + static int ocelot_get_functions_count(struct pinctrl_dev *pctldev) 186 + { 187 + return ARRAY_SIZE(ocelot_function_names); 188 + } 189 + 190 + static const char *ocelot_get_function_name(struct pinctrl_dev *pctldev, 191 + unsigned int function) 192 + { 193 + return ocelot_function_names[function]; 194 + } 195 + 196 + static int ocelot_get_function_groups(struct pinctrl_dev *pctldev, 197 + unsigned int function, 198 + const char *const **groups, 199 + unsigned *const num_groups) 200 + { 201 + struct ocelot_pinctrl *info = pinctrl_dev_get_drvdata(pctldev); 202 + 203 + *groups = info->func[function].groups; 204 + *num_groups = info->func[function].ngroups; 205 + 206 + return 0; 207 + } 208 + 209 + static int ocelot_pin_function_idx(unsigned int pin, unsigned int function) 210 + { 211 + struct ocelot_pin_caps *p = ocelot_pins[pin].drv_data; 212 + int i; 213 + 214 + for (i = 0; i < OCELOT_FUNC_PER_PIN; i++) { 215 + if (function == p->functions[i]) 216 + return i; 217 + } 218 + 219 + return -1; 220 + } 221 + 222 + static int ocelot_pinmux_set_mux(struct pinctrl_dev *pctldev, 223 + unsigned int selector, unsigned int group) 224 + { 225 + struct ocelot_pinctrl *info = pinctrl_dev_get_drvdata(pctldev); 226 + struct ocelot_pin_caps *pin = ocelot_pins[group].drv_data; 227 + int f; 228 + 229 + f = ocelot_pin_function_idx(group, selector); 230 + if (f < 0) 231 + return -EINVAL; 232 + 233 + /* 234 + * f is encoded on two bits. 235 + * bit 0 of f goes in BIT(pin) of ALT0, bit 1 of f goes in BIT(pin) of 236 + * ALT1 237 + * This is racy because both registers can't be updated at the same time 238 + * but it doesn't matter much for now. 239 + */ 240 + regmap_update_bits(info->map, OCELOT_GPIO_ALT0, BIT(pin->pin), 241 + f << pin->pin); 242 + regmap_update_bits(info->map, OCELOT_GPIO_ALT1, BIT(pin->pin), 243 + f << (pin->pin - 1)); 244 + 245 + return 0; 246 + } 247 + 248 + static int ocelot_gpio_set_direction(struct pinctrl_dev *pctldev, 249 + struct pinctrl_gpio_range *range, 250 + unsigned int pin, bool input) 251 + { 252 + struct ocelot_pinctrl *info = pinctrl_dev_get_drvdata(pctldev); 253 + 254 + regmap_update_bits(info->map, OCELOT_GPIO_OE, BIT(pin), 255 + input ? BIT(pin) : 0); 256 + 257 + return 0; 258 + } 259 + 260 + static int ocelot_gpio_request_enable(struct pinctrl_dev *pctldev, 261 + struct pinctrl_gpio_range *range, 262 + unsigned int offset) 263 + { 264 + struct ocelot_pinctrl *info = pinctrl_dev_get_drvdata(pctldev); 265 + 266 + regmap_update_bits(info->map, OCELOT_GPIO_ALT0, BIT(offset), 0); 267 + regmap_update_bits(info->map, OCELOT_GPIO_ALT1, BIT(offset), 0); 268 + 269 + return 0; 270 + } 271 + 272 + static const struct pinmux_ops ocelot_pmx_ops = { 273 + .get_functions_count = ocelot_get_functions_count, 274 + .get_function_name = ocelot_get_function_name, 275 + .get_function_groups = ocelot_get_function_groups, 276 + .set_mux = ocelot_pinmux_set_mux, 277 + .gpio_set_direction = ocelot_gpio_set_direction, 278 + .gpio_request_enable = ocelot_gpio_request_enable, 279 + }; 280 + 281 + static int ocelot_pctl_get_groups_count(struct pinctrl_dev *pctldev) 282 + { 283 + return ARRAY_SIZE(ocelot_pins); 284 + } 285 + 286 + static const char *ocelot_pctl_get_group_name(struct pinctrl_dev *pctldev, 287 + unsigned int group) 288 + { 289 + return ocelot_pins[group].name; 290 + } 291 + 292 + static int ocelot_pctl_get_group_pins(struct pinctrl_dev *pctldev, 293 + unsigned int group, 294 + const unsigned int **pins, 295 + unsigned int *num_pins) 296 + { 297 + *pins = &ocelot_pins[group].number; 298 + *num_pins = 1; 299 + 300 + return 0; 301 + } 302 + 303 + static const struct pinctrl_ops ocelot_pctl_ops = { 304 + .get_groups_count = ocelot_pctl_get_groups_count, 305 + .get_group_name = ocelot_pctl_get_group_name, 306 + .get_group_pins = ocelot_pctl_get_group_pins, 307 + .dt_node_to_map = pinconf_generic_dt_node_to_map_pin, 308 + .dt_free_map = pinconf_generic_dt_free_map, 309 + }; 310 + 311 + static struct pinctrl_desc ocelot_desc = { 312 + .name = "ocelot-pinctrl", 313 + .pins = ocelot_pins, 314 + .npins = ARRAY_SIZE(ocelot_pins), 315 + .pctlops = &ocelot_pctl_ops, 316 + .pmxops = &ocelot_pmx_ops, 317 + .owner = THIS_MODULE, 318 + }; 319 + 320 + static int ocelot_create_group_func_map(struct device *dev, 321 + struct ocelot_pinctrl *info) 322 + { 323 + u16 pins[ARRAY_SIZE(ocelot_pins)]; 324 + int f, npins, i; 325 + 326 + for (f = 0; f < FUNC_MAX; f++) { 327 + for (npins = 0, i = 0; i < ARRAY_SIZE(ocelot_pins); i++) { 328 + if (ocelot_pin_function_idx(i, f) >= 0) 329 + pins[npins++] = i; 330 + } 331 + 332 + info->func[f].ngroups = npins; 333 + info->func[f].groups = devm_kzalloc(dev, npins * 334 + sizeof(char *), 335 + GFP_KERNEL); 336 + if (!info->func[f].groups) 337 + return -ENOMEM; 338 + 339 + for (i = 0; i < npins; i++) 340 + info->func[f].groups[i] = ocelot_pins[pins[i]].name; 341 + } 342 + 343 + return 0; 344 + } 345 + 346 + static int ocelot_pinctrl_register(struct platform_device *pdev, 347 + struct ocelot_pinctrl *info) 348 + { 349 + int ret; 350 + 351 + ret = ocelot_create_group_func_map(&pdev->dev, info); 352 + if (ret) { 353 + dev_err(&pdev->dev, "Unable to create group func map.\n"); 354 + return ret; 355 + } 356 + 357 + info->pctl = devm_pinctrl_register(&pdev->dev, &ocelot_desc, info); 358 + if (IS_ERR(info->pctl)) { 359 + dev_err(&pdev->dev, "Failed to register pinctrl\n"); 360 + return PTR_ERR(info->pctl); 361 + } 362 + 363 + return 0; 364 + } 365 + 366 + static int ocelot_gpio_get(struct gpio_chip *chip, unsigned int offset) 367 + { 368 + struct ocelot_pinctrl *info = gpiochip_get_data(chip); 369 + unsigned int val; 370 + 371 + regmap_read(info->map, OCELOT_GPIO_IN, &val); 372 + 373 + return !!(val & BIT(offset)); 374 + } 375 + 376 + static void ocelot_gpio_set(struct gpio_chip *chip, unsigned int offset, 377 + int value) 378 + { 379 + struct ocelot_pinctrl *info = gpiochip_get_data(chip); 380 + 381 + if (value) 382 + regmap_write(info->map, OCELOT_GPIO_OUT_SET, BIT(offset)); 383 + else 384 + regmap_write(info->map, OCELOT_GPIO_OUT_CLR, BIT(offset)); 385 + } 386 + 387 + static int ocelot_gpio_get_direction(struct gpio_chip *chip, 388 + unsigned int offset) 389 + { 390 + struct ocelot_pinctrl *info = gpiochip_get_data(chip); 391 + unsigned int val; 392 + 393 + regmap_read(info->map, OCELOT_GPIO_OE, &val); 394 + 395 + return !(val & BIT(offset)); 396 + } 397 + 398 + static int ocelot_gpio_direction_input(struct gpio_chip *chip, 399 + unsigned int offset) 400 + { 401 + return pinctrl_gpio_direction_input(chip->base + offset); 402 + } 403 + 404 + static int ocelot_gpio_direction_output(struct gpio_chip *chip, 405 + unsigned int offset, int value) 406 + { 407 + struct ocelot_pinctrl *info = gpiochip_get_data(chip); 408 + unsigned int pin = BIT(offset); 409 + 410 + if (value) 411 + regmap_write(info->map, OCELOT_GPIO_OUT_SET, pin); 412 + else 413 + regmap_write(info->map, OCELOT_GPIO_OUT_CLR, pin); 414 + 415 + return pinctrl_gpio_direction_output(chip->base + offset); 416 + } 417 + 418 + static const struct gpio_chip ocelot_gpiolib_chip = { 419 + .request = gpiochip_generic_request, 420 + .free = gpiochip_generic_free, 421 + .set = ocelot_gpio_set, 422 + .get = ocelot_gpio_get, 423 + .get_direction = ocelot_gpio_get_direction, 424 + .direction_input = ocelot_gpio_direction_input, 425 + .direction_output = ocelot_gpio_direction_output, 426 + .owner = THIS_MODULE, 427 + }; 428 + 429 + static int ocelot_gpiochip_register(struct platform_device *pdev, 430 + struct ocelot_pinctrl *info) 431 + { 432 + struct gpio_chip *gc; 433 + int ret; 434 + 435 + info->gpio_chip = ocelot_gpiolib_chip; 436 + 437 + gc = &info->gpio_chip; 438 + gc->ngpio = OCELOT_PINS; 439 + gc->parent = &pdev->dev; 440 + gc->base = 0; 441 + gc->of_node = info->dev->of_node; 442 + gc->label = "ocelot-gpio"; 443 + 444 + ret = devm_gpiochip_add_data(&pdev->dev, gc, info); 445 + if (ret) 446 + return ret; 447 + 448 + /* TODO: this can be used as an irqchip but no board is using that */ 449 + 450 + return 0; 451 + } 452 + 453 + static const struct regmap_config ocelot_pinctrl_regmap_config = { 454 + .reg_bits = 32, 455 + .val_bits = 32, 456 + .reg_stride = 4, 457 + .max_register = 0x64, 458 + }; 459 + 460 + static const struct of_device_id ocelot_pinctrl_of_match[] = { 461 + { .compatible = "mscc,ocelot-pinctrl" }, 462 + {}, 463 + }; 464 + 465 + int ocelot_pinctrl_probe(struct platform_device *pdev) 466 + { 467 + struct device *dev = &pdev->dev; 468 + struct ocelot_pinctrl *info; 469 + void __iomem *base; 470 + int ret; 471 + 472 + info = devm_kzalloc(dev, sizeof(*info), GFP_KERNEL); 473 + if (!info) 474 + return -ENOMEM; 475 + 476 + base = devm_ioremap_resource(dev, 477 + platform_get_resource(pdev, IORESOURCE_MEM, 0)); 478 + if (IS_ERR(base)) { 479 + dev_err(dev, "Failed to ioremap registers\n"); 480 + return PTR_ERR(base); 481 + } 482 + 483 + info->map = devm_regmap_init_mmio(dev, base, 484 + &ocelot_pinctrl_regmap_config); 485 + if (IS_ERR(info->map)) { 486 + dev_err(dev, "Failed to create regmap\n"); 487 + return PTR_ERR(info->map); 488 + } 489 + dev_set_drvdata(dev, info->map); 490 + info->dev = dev; 491 + 492 + ret = ocelot_pinctrl_register(pdev, info); 493 + if (ret) 494 + return ret; 495 + 496 + ret = ocelot_gpiochip_register(pdev, info); 497 + if (ret) 498 + return ret; 499 + 500 + return 0; 501 + } 502 + 503 + static struct platform_driver ocelot_pinctrl_driver = { 504 + .driver = { 505 + .name = "pinctrl-ocelot", 506 + .of_match_table = of_match_ptr(ocelot_pinctrl_of_match), 507 + .suppress_bind_attrs = true, 508 + }, 509 + .probe = ocelot_pinctrl_probe, 510 + }; 511 + builtin_platform_driver(ocelot_pinctrl_driver);
+1 -3
drivers/pinctrl/pinctrl-palmas.c
··· 1012 1012 } 1013 1013 1014 1014 pci = devm_kzalloc(&pdev->dev, sizeof(*pci), GFP_KERNEL); 1015 - if (!pci) { 1016 - dev_err(&pdev->dev, "Malloc for pci failed\n"); 1015 + if (!pci) 1017 1016 return -ENOMEM; 1018 - } 1019 1017 1020 1018 pci->dev = &pdev->dev; 1021 1019 pci->palmas = dev_get_drvdata(pdev->dev.parent);
+17 -14
drivers/pinctrl/pinctrl-rockchip.c
··· 136 136 * @iomux: array describing the 4 iomux sources of the bank 137 137 * @drv: array describing the 4 drive strength sources of the bank 138 138 * @pull_type: array describing the 4 pull type sources of the bank 139 - * @valid: are all necessary informations present 139 + * @valid: is all necessary information present 140 140 * @of_node: dt node of this bank 141 141 * @drvdata: common pinctrl basedata 142 142 * @domain: irqdomain of the gpio bank ··· 1988 1988 info->functions[selector].name, info->groups[group].name); 1989 1989 1990 1990 /* 1991 - * for each pin in the pin group selected, program the correspoding pin 1991 + * for each pin in the pin group selected, program the corresponding 1992 1992 * pin function number in the config register. 1993 1993 */ 1994 1994 for (cnt = 0; cnt < info->groups[group].npins; cnt++) { ··· 2014 2014 { 2015 2015 struct rockchip_pin_bank *bank = gpiochip_get_data(chip); 2016 2016 u32 data; 2017 + int ret; 2017 2018 2019 + ret = clk_enable(bank->clk); 2020 + if (ret < 0) { 2021 + dev_err(bank->drvdata->dev, 2022 + "failed to enable clock for bank %s\n", bank->name); 2023 + return ret; 2024 + } 2018 2025 data = readl_relaxed(bank->reg_base + GPIO_SWPORT_DDR); 2026 + clk_disable(bank->clk); 2019 2027 2020 2028 return !(data & BIT(offset)); 2021 2029 } ··· 2408 2400 info->functions = devm_kzalloc(dev, info->nfunctions * 2409 2401 sizeof(struct rockchip_pmx_func), 2410 2402 GFP_KERNEL); 2411 - if (!info->functions) { 2412 - dev_err(dev, "failed to allocate memory for function list\n"); 2403 + if (!info->functions) 2413 2404 return -EINVAL; 2414 - } 2415 2405 2416 2406 info->groups = devm_kzalloc(dev, info->ngroups * 2417 2407 sizeof(struct rockchip_pin_group), 2418 2408 GFP_KERNEL); 2419 - if (!info->groups) { 2420 - dev_err(dev, "failed allocate memory for ping group list\n"); 2409 + if (!info->groups) 2421 2410 return -EINVAL; 2422 - } 2423 2411 2424 2412 i = 0; 2425 2413 ··· 2451 2447 2452 2448 pindesc = devm_kzalloc(&pdev->dev, sizeof(*pindesc) * 2453 2449 info->ctrl->nr_pins, GFP_KERNEL); 2454 - if (!pindesc) { 2455 - dev_err(&pdev->dev, "mem alloc for pin descriptors failed\n"); 2450 + if (!pindesc) 2456 2451 return -ENOMEM; 2457 - } 2452 + 2458 2453 ctrldesc->pins = pindesc; 2459 2454 ctrldesc->npins = info->ctrl->nr_pins; 2460 2455 ··· 2535 2532 2536 2533 /* 2537 2534 * gpiolib gpio_direction_input callback function. The setting of the pin 2538 - * mux function as 'gpio input' will be handled by the pinctrl susbsystem 2535 + * mux function as 'gpio input' will be handled by the pinctrl subsystem 2539 2536 * interface. 2540 2537 */ 2541 2538 static int rockchip_gpio_direction_input(struct gpio_chip *gc, unsigned offset) ··· 2545 2542 2546 2543 /* 2547 2544 * gpiolib gpio_direction_output callback function. The setting of the pin 2548 - * mux function as 'gpio output' will be handled by the pinctrl susbsystem 2545 + * mux function as 'gpio output' will be handled by the pinctrl subsystem 2549 2546 * interface. 2550 2547 */ 2551 2548 static int rockchip_gpio_direction_output(struct gpio_chip *gc, ··· 3166 3163 return -ENODEV; 3167 3164 } 3168 3165 3169 - info = devm_kzalloc(dev, sizeof(struct rockchip_pinctrl), GFP_KERNEL); 3166 + info = devm_kzalloc(dev, sizeof(*info), GFP_KERNEL); 3170 3167 if (!info) 3171 3168 return -ENOMEM; 3172 3169
+3 -7
drivers/pinctrl/pinctrl-single.c
··· 1462 1462 pcs_irq_handle(pcs_soc); 1463 1463 /* REVISIT: export and add handle_bad_irq(irq, desc)? */ 1464 1464 chained_irq_exit(chip, desc); 1465 - 1466 - return; 1467 1465 } 1468 1466 1469 1467 static int pcs_irqdomain_map(struct irq_domain *d, unsigned int irq, ··· 1647 1649 return -EINVAL; 1648 1650 1649 1651 pcs = devm_kzalloc(&pdev->dev, sizeof(*pcs), GFP_KERNEL); 1650 - if (!pcs) { 1651 - dev_err(&pdev->dev, "could not allocate\n"); 1652 + if (!pcs) 1652 1653 return -ENOMEM; 1653 - } 1654 + 1654 1655 pcs->dev = &pdev->dev; 1655 1656 pcs->np = np; 1656 1657 raw_spin_lock_init(&pcs->lock); ··· 1774 1777 dev_warn(pcs->dev, "initialized with no interrupts\n"); 1775 1778 } 1776 1779 1777 - dev_info(pcs->dev, "%i pins at pa %p size %u\n", 1778 - pcs->desc.npins, pcs->base, pcs->size); 1780 + dev_info(pcs->dev, "%i pins, size %u\n", pcs->desc.npins, pcs->size); 1779 1781 1780 1782 return pinctrl_enable(pcs->pctl); 1781 1783
+26 -14
drivers/pinctrl/pinctrl-sx150x.c
··· 1144 1144 if (ret) 1145 1145 return ret; 1146 1146 1147 + /* Pinctrl_desc */ 1148 + pctl->pinctrl_desc.name = "sx150x-pinctrl"; 1149 + pctl->pinctrl_desc.pctlops = &sx150x_pinctrl_ops; 1150 + pctl->pinctrl_desc.confops = &sx150x_pinconf_ops; 1151 + pctl->pinctrl_desc.pins = pctl->data->pins; 1152 + pctl->pinctrl_desc.npins = pctl->data->npins; 1153 + pctl->pinctrl_desc.owner = THIS_MODULE; 1154 + 1155 + ret = devm_pinctrl_register_and_init(dev, &pctl->pinctrl_desc, 1156 + pctl, &pctl->pctldev); 1157 + if (ret) { 1158 + dev_err(dev, "Failed to register pinctrl device\n"); 1159 + return ret; 1160 + } 1161 + 1162 + ret = pinctrl_enable(pctl->pctldev); 1163 + if (ret) { 1164 + dev_err(dev, "Failed to enable pinctrl device\n"); 1165 + return ret; 1166 + } 1167 + 1147 1168 /* Register GPIO controller */ 1148 1169 pctl->gpio.label = devm_kstrdup(dev, client->name, GFP_KERNEL); 1149 1170 pctl->gpio.base = -1; ··· 1190 1169 pctl->gpio.set_multiple = sx150x_gpio_set_multiple; 1191 1170 1192 1171 ret = devm_gpiochip_add_data(dev, &pctl->gpio, pctl); 1172 + if (ret) 1173 + return ret; 1174 + 1175 + ret = gpiochip_add_pin_range(&pctl->gpio, dev_name(dev), 1176 + 0, 0, pctl->data->npins); 1193 1177 if (ret) 1194 1178 return ret; 1195 1179 ··· 1241 1215 gpiochip_set_nested_irqchip(&pctl->gpio, 1242 1216 &pctl->irq_chip, 1243 1217 client->irq); 1244 - } 1245 - 1246 - /* Pinctrl_desc */ 1247 - pctl->pinctrl_desc.name = "sx150x-pinctrl"; 1248 - pctl->pinctrl_desc.pctlops = &sx150x_pinctrl_ops; 1249 - pctl->pinctrl_desc.confops = &sx150x_pinconf_ops; 1250 - pctl->pinctrl_desc.pins = pctl->data->pins; 1251 - pctl->pinctrl_desc.npins = pctl->data->npins; 1252 - pctl->pinctrl_desc.owner = THIS_MODULE; 1253 - 1254 - pctl->pctldev = pinctrl_register(&pctl->pinctrl_desc, dev, pctl); 1255 - if (IS_ERR(pctl->pctldev)) { 1256 - dev_err(dev, "Failed to register pinctrl device\n"); 1257 - return PTR_ERR(pctl->pctldev); 1258 1218 } 1259 1219 1260 1220 return 0;
+3 -6
drivers/pinctrl/pinctrl-tz1090-pdc.c
··· 357 357 358 358 dup_configs = kmemdup(configs, num_configs * sizeof(*dup_configs), 359 359 GFP_KERNEL); 360 - if (!dup_configs) { 361 - dev_err(dev, "kmemdup(configs) failed\n"); 360 + if (!dup_configs) 362 361 return -ENOMEM; 363 - } 364 362 365 363 /* 366 364 * We support both pins and pin groups, but we need to figure out which ··· 929 931 struct resource *res; 930 932 931 933 pmx = devm_kzalloc(&pdev->dev, sizeof(*pmx), GFP_KERNEL); 932 - if (!pmx) { 933 - dev_err(&pdev->dev, "Can't alloc tz1090_pdc_pmx\n"); 934 + if (!pmx) 934 935 return -ENOMEM; 935 - } 936 + 936 937 pmx->dev = &pdev->dev; 937 938 spin_lock_init(&pmx->lock); 938 939
+3 -6
drivers/pinctrl/pinctrl-tz1090.c
··· 1082 1082 1083 1083 dup_configs = kmemdup(configs, num_configs * sizeof(*dup_configs), 1084 1084 GFP_KERNEL); 1085 - if (!dup_configs) { 1086 - dev_err(dev, "kmemdup(configs) failed\n"); 1085 + if (!dup_configs) 1087 1086 return -ENOMEM; 1088 - } 1089 1087 1090 1088 (*map)[*num_maps].type = PIN_MAP_TYPE_CONFIGS_GROUP; 1091 1089 (*map)[*num_maps].data.configs.group_or_pin = group; ··· 1944 1946 struct resource *res; 1945 1947 1946 1948 pmx = devm_kzalloc(&pdev->dev, sizeof(*pmx), GFP_KERNEL); 1947 - if (!pmx) { 1948 - dev_err(&pdev->dev, "Can't alloc tz1090_pmx\n"); 1949 + if (!pmx) 1949 1950 return -ENOMEM; 1950 - } 1951 + 1951 1952 pmx->dev = &pdev->dev; 1952 1953 spin_lock_init(&pmx->lock); 1953 1954
+1 -3
drivers/pinctrl/pinctrl-utils.c
··· 83 83 84 84 dup_configs = kmemdup(configs, num_configs * sizeof(*dup_configs), 85 85 GFP_KERNEL); 86 - if (!dup_configs) { 87 - dev_err(pctldev->dev, "kmemdup(configs) failed\n"); 86 + if (!dup_configs) 88 87 return -ENOMEM; 89 - } 90 88 91 89 (*map)[*num_maps].type = type; 92 90 (*map)[*num_maps].data.configs.group_or_pin = group;
+4 -6
drivers/pinctrl/pinctrl-xway.c
··· 1730 1730 xway_info.pads = devm_kzalloc(&pdev->dev, 1731 1731 sizeof(struct pinctrl_pin_desc) * xway_chip.ngpio, 1732 1732 GFP_KERNEL); 1733 - if (!xway_info.pads) { 1734 - dev_err(&pdev->dev, "Failed to allocate pads\n"); 1733 + if (!xway_info.pads) 1735 1734 return -ENOMEM; 1736 - } 1735 + 1737 1736 for (i = 0; i < xway_chip.ngpio; i++) { 1738 1737 /* strlen("ioXY") + 1 = 5 */ 1739 1738 char *name = devm_kzalloc(&pdev->dev, 5, GFP_KERNEL); 1740 1739 1741 - if (!name) { 1742 - dev_err(&pdev->dev, "Failed to allocate pad name\n"); 1740 + if (!name) 1743 1741 return -ENOMEM; 1744 - } 1742 + 1745 1743 snprintf(name, 5, "io%d", i); 1746 1744 xway_info.pads[i].number = GPIO0 + i; 1747 1745 xway_info.pads[i].name = name;
+1 -3
drivers/pinctrl/pinmux.c
··· 493 493 continue; 494 494 } 495 495 if (desc->mux_setting == &(setting->data.mux)) { 496 - desc->mux_setting = NULL; 497 - /* And release the pin */ 498 496 pin_free(pctldev, pins[i], NULL); 499 497 } else { 500 498 const char *gname; ··· 617 619 pctlops->get_group_name(pctldev, 618 620 desc->mux_setting->group)); 619 621 else 620 - seq_printf(s, "\n"); 622 + seq_putc(s, '\n'); 621 623 } 622 624 623 625 mutex_unlock(&pctldev->mutex);
+4
drivers/pinctrl/pxa/pinctrl-pxa2xx.c
··· 436 436 return 0; 437 437 } 438 438 EXPORT_SYMBOL_GPL(pxa2xx_pinctrl_exit); 439 + 440 + MODULE_AUTHOR("Robert Jarzmik <robert.jarzmik@free.fr>"); 441 + MODULE_DESCRIPTION("Marvell PXA2xx pinctrl driver"); 442 + MODULE_LICENSE("GPL v2");
+8
drivers/pinctrl/qcom/Kconfig
··· 106 106 This is the pinctrl, pinmux, pinconf and gpiolib driver for the 107 107 Qualcomm TLMM block found in the Qualcomm MSM8996 platform. 108 108 109 + config PINCTRL_MSM8998 110 + tristate "Qualcomm MSM8998 pin controller driver" 111 + depends on GPIOLIB && OF 112 + select PINCTRL_MSM 113 + help 114 + This is the pinctrl, pinmux, pinconf and gpiolib driver for the 115 + Qualcomm TLMM block found in the Qualcomm MSM8998 platform. 116 + 109 117 config PINCTRL_QDF2XXX 110 118 tristate "Qualcomm Technologies QDF2xxx pin controller driver" 111 119 depends on GPIOLIB && ACPI
+1
drivers/pinctrl/qcom/Makefile
··· 12 12 obj-$(CONFIG_PINCTRL_MSM8916) += pinctrl-msm8916.o 13 13 obj-$(CONFIG_PINCTRL_MSM8994) += pinctrl-msm8994.o 14 14 obj-$(CONFIG_PINCTRL_MSM8996) += pinctrl-msm8996.o 15 + obj-$(CONFIG_PINCTRL_MSM8998) += pinctrl-msm8998.o 15 16 obj-$(CONFIG_PINCTRL_QDF2XXX) += pinctrl-qdf2xxx.o 16 17 obj-$(CONFIG_PINCTRL_MDM9615) += pinctrl-mdm9615.o 17 18 obj-$(CONFIG_PINCTRL_QCOM_SPMI_PMIC) += pinctrl-spmi-gpio.o
+2 -3
drivers/pinctrl/qcom/pinctrl-msm.c
··· 898 898 int ret; 899 899 900 900 pctrl = devm_kzalloc(&pdev->dev, sizeof(*pctrl), GFP_KERNEL); 901 - if (!pctrl) { 902 - dev_err(&pdev->dev, "Can't allocate msm_pinctrl\n"); 901 + if (!pctrl) 903 902 return -ENOMEM; 904 - } 903 + 905 904 pctrl->dev = &pdev->dev; 906 905 pctrl->soc = soc_data; 907 906 pctrl->chip = msm_gpio_template;
+1590
drivers/pinctrl/qcom/pinctrl-msm8998.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 2 + /* 3 + * Copyright (c) 2015-2016, 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 + #define NORTH 0x500000 14 + #define WEST 0x100000 15 + #define EAST 0x900000 16 + 17 + #define FUNCTION(fname) \ 18 + [msm_mux_##fname] = { \ 19 + .name = #fname, \ 20 + .groups = fname##_groups, \ 21 + .ngroups = ARRAY_SIZE(fname##_groups), \ 22 + } 23 + 24 + #define PINGROUP(id, base, f1, f2, f3, f4, f5, f6, f7, f8, f9) \ 25 + { \ 26 + .name = "gpio" #id, \ 27 + .pins = gpio##id##_pins, \ 28 + .npins = ARRAY_SIZE(gpio##id##_pins), \ 29 + .funcs = (int[]){ \ 30 + msm_mux_gpio, /* gpio mode */ \ 31 + msm_mux_##f1, \ 32 + msm_mux_##f2, \ 33 + msm_mux_##f3, \ 34 + msm_mux_##f4, \ 35 + msm_mux_##f5, \ 36 + msm_mux_##f6, \ 37 + msm_mux_##f7, \ 38 + msm_mux_##f8, \ 39 + msm_mux_##f9 \ 40 + }, \ 41 + .nfuncs = 10, \ 42 + .ctl_reg = base + 0x1000 * id, \ 43 + .io_reg = base + 0x4 + 0x1000 * id, \ 44 + .intr_cfg_reg = base + 0x8 + 0x1000 * id, \ 45 + .intr_status_reg = base + 0xc + 0x1000 * id, \ 46 + .intr_target_reg = base + 0x8 + 0x1000 * id, \ 47 + .mux_bit = 2, \ 48 + .pull_bit = 0, \ 49 + .drv_bit = 6, \ 50 + .oe_bit = 9, \ 51 + .in_bit = 0, \ 52 + .out_bit = 1, \ 53 + .intr_enable_bit = 0, \ 54 + .intr_status_bit = 0, \ 55 + .intr_target_bit = 5, \ 56 + .intr_target_kpss_val = 3, \ 57 + .intr_raw_status_bit = 4, \ 58 + .intr_polarity_bit = 1, \ 59 + .intr_detection_bit = 2, \ 60 + .intr_detection_width = 2, \ 61 + } 62 + 63 + #define SDC_QDSD_PINGROUP(pg_name, ctl, pull, drv) \ 64 + { \ 65 + .name = #pg_name, \ 66 + .pins = pg_name##_pins, \ 67 + .npins = ARRAY_SIZE(pg_name##_pins), \ 68 + .ctl_reg = ctl, \ 69 + .io_reg = 0, \ 70 + .intr_cfg_reg = 0, \ 71 + .intr_status_reg = 0, \ 72 + .intr_target_reg = 0, \ 73 + .mux_bit = -1, \ 74 + .pull_bit = pull, \ 75 + .drv_bit = drv, \ 76 + .oe_bit = -1, \ 77 + .in_bit = -1, \ 78 + .out_bit = -1, \ 79 + .intr_enable_bit = -1, \ 80 + .intr_status_bit = -1, \ 81 + .intr_target_bit = -1, \ 82 + .intr_raw_status_bit = -1, \ 83 + .intr_polarity_bit = -1, \ 84 + .intr_detection_bit = -1, \ 85 + .intr_detection_width = -1, \ 86 + } 87 + 88 + #define UFS_RESET(pg_name, offset) \ 89 + { \ 90 + .name = #pg_name, \ 91 + .pins = pg_name##_pins, \ 92 + .npins = ARRAY_SIZE(pg_name##_pins), \ 93 + .ctl_reg = offset, \ 94 + .io_reg = offset + 0x4, \ 95 + .intr_cfg_reg = 0, \ 96 + .intr_status_reg = 0, \ 97 + .intr_target_reg = 0, \ 98 + .mux_bit = -1, \ 99 + .pull_bit = 3, \ 100 + .drv_bit = 0, \ 101 + .oe_bit = -1, \ 102 + .in_bit = -1, \ 103 + .out_bit = 0, \ 104 + .intr_enable_bit = -1, \ 105 + .intr_status_bit = -1, \ 106 + .intr_target_bit = -1, \ 107 + .intr_raw_status_bit = -1, \ 108 + .intr_polarity_bit = -1, \ 109 + .intr_detection_bit = -1, \ 110 + .intr_detection_width = -1, \ 111 + } 112 + 113 + static const struct pinctrl_pin_desc msm8998_pins[] = { 114 + PINCTRL_PIN(0, "GPIO_0"), 115 + PINCTRL_PIN(1, "GPIO_1"), 116 + PINCTRL_PIN(2, "GPIO_2"), 117 + PINCTRL_PIN(3, "GPIO_3"), 118 + PINCTRL_PIN(4, "GPIO_4"), 119 + PINCTRL_PIN(5, "GPIO_5"), 120 + PINCTRL_PIN(6, "GPIO_6"), 121 + PINCTRL_PIN(7, "GPIO_7"), 122 + PINCTRL_PIN(8, "GPIO_8"), 123 + PINCTRL_PIN(9, "GPIO_9"), 124 + PINCTRL_PIN(10, "GPIO_10"), 125 + PINCTRL_PIN(11, "GPIO_11"), 126 + PINCTRL_PIN(12, "GPIO_12"), 127 + PINCTRL_PIN(13, "GPIO_13"), 128 + PINCTRL_PIN(14, "GPIO_14"), 129 + PINCTRL_PIN(15, "GPIO_15"), 130 + PINCTRL_PIN(16, "GPIO_16"), 131 + PINCTRL_PIN(17, "GPIO_17"), 132 + PINCTRL_PIN(18, "GPIO_18"), 133 + PINCTRL_PIN(19, "GPIO_19"), 134 + PINCTRL_PIN(20, "GPIO_20"), 135 + PINCTRL_PIN(21, "GPIO_21"), 136 + PINCTRL_PIN(22, "GPIO_22"), 137 + PINCTRL_PIN(23, "GPIO_23"), 138 + PINCTRL_PIN(24, "GPIO_24"), 139 + PINCTRL_PIN(25, "GPIO_25"), 140 + PINCTRL_PIN(26, "GPIO_26"), 141 + PINCTRL_PIN(27, "GPIO_27"), 142 + PINCTRL_PIN(28, "GPIO_28"), 143 + PINCTRL_PIN(29, "GPIO_29"), 144 + PINCTRL_PIN(30, "GPIO_30"), 145 + PINCTRL_PIN(31, "GPIO_31"), 146 + PINCTRL_PIN(32, "GPIO_32"), 147 + PINCTRL_PIN(33, "GPIO_33"), 148 + PINCTRL_PIN(34, "GPIO_34"), 149 + PINCTRL_PIN(35, "GPIO_35"), 150 + PINCTRL_PIN(36, "GPIO_36"), 151 + PINCTRL_PIN(37, "GPIO_37"), 152 + PINCTRL_PIN(38, "GPIO_38"), 153 + PINCTRL_PIN(39, "GPIO_39"), 154 + PINCTRL_PIN(40, "GPIO_40"), 155 + PINCTRL_PIN(41, "GPIO_41"), 156 + PINCTRL_PIN(42, "GPIO_42"), 157 + PINCTRL_PIN(43, "GPIO_43"), 158 + PINCTRL_PIN(44, "GPIO_44"), 159 + PINCTRL_PIN(45, "GPIO_45"), 160 + PINCTRL_PIN(46, "GPIO_46"), 161 + PINCTRL_PIN(47, "GPIO_47"), 162 + PINCTRL_PIN(48, "GPIO_48"), 163 + PINCTRL_PIN(49, "GPIO_49"), 164 + PINCTRL_PIN(50, "GPIO_50"), 165 + PINCTRL_PIN(51, "GPIO_51"), 166 + PINCTRL_PIN(52, "GPIO_52"), 167 + PINCTRL_PIN(53, "GPIO_53"), 168 + PINCTRL_PIN(54, "GPIO_54"), 169 + PINCTRL_PIN(55, "GPIO_55"), 170 + PINCTRL_PIN(56, "GPIO_56"), 171 + PINCTRL_PIN(57, "GPIO_57"), 172 + PINCTRL_PIN(58, "GPIO_58"), 173 + PINCTRL_PIN(59, "GPIO_59"), 174 + PINCTRL_PIN(60, "GPIO_60"), 175 + PINCTRL_PIN(61, "GPIO_61"), 176 + PINCTRL_PIN(62, "GPIO_62"), 177 + PINCTRL_PIN(63, "GPIO_63"), 178 + PINCTRL_PIN(64, "GPIO_64"), 179 + PINCTRL_PIN(65, "GPIO_65"), 180 + PINCTRL_PIN(66, "GPIO_66"), 181 + PINCTRL_PIN(67, "GPIO_67"), 182 + PINCTRL_PIN(68, "GPIO_68"), 183 + PINCTRL_PIN(69, "GPIO_69"), 184 + PINCTRL_PIN(70, "GPIO_70"), 185 + PINCTRL_PIN(71, "GPIO_71"), 186 + PINCTRL_PIN(72, "GPIO_72"), 187 + PINCTRL_PIN(73, "GPIO_73"), 188 + PINCTRL_PIN(74, "GPIO_74"), 189 + PINCTRL_PIN(75, "GPIO_75"), 190 + PINCTRL_PIN(76, "GPIO_76"), 191 + PINCTRL_PIN(77, "GPIO_77"), 192 + PINCTRL_PIN(78, "GPIO_78"), 193 + PINCTRL_PIN(79, "GPIO_79"), 194 + PINCTRL_PIN(80, "GPIO_80"), 195 + PINCTRL_PIN(81, "GPIO_81"), 196 + PINCTRL_PIN(82, "GPIO_82"), 197 + PINCTRL_PIN(83, "GPIO_83"), 198 + PINCTRL_PIN(84, "GPIO_84"), 199 + PINCTRL_PIN(85, "GPIO_85"), 200 + PINCTRL_PIN(86, "GPIO_86"), 201 + PINCTRL_PIN(87, "GPIO_87"), 202 + PINCTRL_PIN(88, "GPIO_88"), 203 + PINCTRL_PIN(89, "GPIO_89"), 204 + PINCTRL_PIN(90, "GPIO_90"), 205 + PINCTRL_PIN(91, "GPIO_91"), 206 + PINCTRL_PIN(92, "GPIO_92"), 207 + PINCTRL_PIN(93, "GPIO_93"), 208 + PINCTRL_PIN(94, "GPIO_94"), 209 + PINCTRL_PIN(95, "GPIO_95"), 210 + PINCTRL_PIN(96, "GPIO_96"), 211 + PINCTRL_PIN(97, "GPIO_97"), 212 + PINCTRL_PIN(98, "GPIO_98"), 213 + PINCTRL_PIN(99, "GPIO_99"), 214 + PINCTRL_PIN(100, "GPIO_100"), 215 + PINCTRL_PIN(101, "GPIO_101"), 216 + PINCTRL_PIN(102, "GPIO_102"), 217 + PINCTRL_PIN(103, "GPIO_103"), 218 + PINCTRL_PIN(104, "GPIO_104"), 219 + PINCTRL_PIN(105, "GPIO_105"), 220 + PINCTRL_PIN(106, "GPIO_106"), 221 + PINCTRL_PIN(107, "GPIO_107"), 222 + PINCTRL_PIN(108, "GPIO_108"), 223 + PINCTRL_PIN(109, "GPIO_109"), 224 + PINCTRL_PIN(110, "GPIO_110"), 225 + PINCTRL_PIN(111, "GPIO_111"), 226 + PINCTRL_PIN(112, "GPIO_112"), 227 + PINCTRL_PIN(113, "GPIO_113"), 228 + PINCTRL_PIN(114, "GPIO_114"), 229 + PINCTRL_PIN(115, "GPIO_115"), 230 + PINCTRL_PIN(116, "GPIO_116"), 231 + PINCTRL_PIN(117, "GPIO_117"), 232 + PINCTRL_PIN(118, "GPIO_118"), 233 + PINCTRL_PIN(119, "GPIO_119"), 234 + PINCTRL_PIN(120, "GPIO_120"), 235 + PINCTRL_PIN(121, "GPIO_121"), 236 + PINCTRL_PIN(122, "GPIO_122"), 237 + PINCTRL_PIN(123, "GPIO_123"), 238 + PINCTRL_PIN(124, "GPIO_124"), 239 + PINCTRL_PIN(125, "GPIO_125"), 240 + PINCTRL_PIN(126, "GPIO_126"), 241 + PINCTRL_PIN(127, "GPIO_127"), 242 + PINCTRL_PIN(128, "GPIO_128"), 243 + PINCTRL_PIN(129, "GPIO_129"), 244 + PINCTRL_PIN(130, "GPIO_130"), 245 + PINCTRL_PIN(131, "GPIO_131"), 246 + PINCTRL_PIN(132, "GPIO_132"), 247 + PINCTRL_PIN(133, "GPIO_133"), 248 + PINCTRL_PIN(134, "GPIO_134"), 249 + PINCTRL_PIN(135, "GPIO_135"), 250 + PINCTRL_PIN(136, "GPIO_136"), 251 + PINCTRL_PIN(137, "GPIO_137"), 252 + PINCTRL_PIN(138, "GPIO_138"), 253 + PINCTRL_PIN(139, "GPIO_139"), 254 + PINCTRL_PIN(140, "GPIO_140"), 255 + PINCTRL_PIN(141, "GPIO_141"), 256 + PINCTRL_PIN(142, "GPIO_142"), 257 + PINCTRL_PIN(143, "GPIO_143"), 258 + PINCTRL_PIN(144, "GPIO_144"), 259 + PINCTRL_PIN(145, "GPIO_145"), 260 + PINCTRL_PIN(146, "GPIO_146"), 261 + PINCTRL_PIN(147, "GPIO_147"), 262 + PINCTRL_PIN(148, "GPIO_148"), 263 + PINCTRL_PIN(149, "GPIO_149"), 264 + PINCTRL_PIN(150, "SDC2_CLK"), 265 + PINCTRL_PIN(151, "SDC2_CMD"), 266 + PINCTRL_PIN(152, "SDC2_DATA"), 267 + PINCTRL_PIN(153, "UFS_RESET"), 268 + }; 269 + 270 + #define DECLARE_MSM_GPIO_PINS(pin) \ 271 + static const unsigned int gpio##pin##_pins[] = { pin } 272 + DECLARE_MSM_GPIO_PINS(0); 273 + DECLARE_MSM_GPIO_PINS(1); 274 + DECLARE_MSM_GPIO_PINS(2); 275 + DECLARE_MSM_GPIO_PINS(3); 276 + DECLARE_MSM_GPIO_PINS(4); 277 + DECLARE_MSM_GPIO_PINS(5); 278 + DECLARE_MSM_GPIO_PINS(6); 279 + DECLARE_MSM_GPIO_PINS(7); 280 + DECLARE_MSM_GPIO_PINS(8); 281 + DECLARE_MSM_GPIO_PINS(9); 282 + DECLARE_MSM_GPIO_PINS(10); 283 + DECLARE_MSM_GPIO_PINS(11); 284 + DECLARE_MSM_GPIO_PINS(12); 285 + DECLARE_MSM_GPIO_PINS(13); 286 + DECLARE_MSM_GPIO_PINS(14); 287 + DECLARE_MSM_GPIO_PINS(15); 288 + DECLARE_MSM_GPIO_PINS(16); 289 + DECLARE_MSM_GPIO_PINS(17); 290 + DECLARE_MSM_GPIO_PINS(18); 291 + DECLARE_MSM_GPIO_PINS(19); 292 + DECLARE_MSM_GPIO_PINS(20); 293 + DECLARE_MSM_GPIO_PINS(21); 294 + DECLARE_MSM_GPIO_PINS(22); 295 + DECLARE_MSM_GPIO_PINS(23); 296 + DECLARE_MSM_GPIO_PINS(24); 297 + DECLARE_MSM_GPIO_PINS(25); 298 + DECLARE_MSM_GPIO_PINS(26); 299 + DECLARE_MSM_GPIO_PINS(27); 300 + DECLARE_MSM_GPIO_PINS(28); 301 + DECLARE_MSM_GPIO_PINS(29); 302 + DECLARE_MSM_GPIO_PINS(30); 303 + DECLARE_MSM_GPIO_PINS(31); 304 + DECLARE_MSM_GPIO_PINS(32); 305 + DECLARE_MSM_GPIO_PINS(33); 306 + DECLARE_MSM_GPIO_PINS(34); 307 + DECLARE_MSM_GPIO_PINS(35); 308 + DECLARE_MSM_GPIO_PINS(36); 309 + DECLARE_MSM_GPIO_PINS(37); 310 + DECLARE_MSM_GPIO_PINS(38); 311 + DECLARE_MSM_GPIO_PINS(39); 312 + DECLARE_MSM_GPIO_PINS(40); 313 + DECLARE_MSM_GPIO_PINS(41); 314 + DECLARE_MSM_GPIO_PINS(42); 315 + DECLARE_MSM_GPIO_PINS(43); 316 + DECLARE_MSM_GPIO_PINS(44); 317 + DECLARE_MSM_GPIO_PINS(45); 318 + DECLARE_MSM_GPIO_PINS(46); 319 + DECLARE_MSM_GPIO_PINS(47); 320 + DECLARE_MSM_GPIO_PINS(48); 321 + DECLARE_MSM_GPIO_PINS(49); 322 + DECLARE_MSM_GPIO_PINS(50); 323 + DECLARE_MSM_GPIO_PINS(51); 324 + DECLARE_MSM_GPIO_PINS(52); 325 + DECLARE_MSM_GPIO_PINS(53); 326 + DECLARE_MSM_GPIO_PINS(54); 327 + DECLARE_MSM_GPIO_PINS(55); 328 + DECLARE_MSM_GPIO_PINS(56); 329 + DECLARE_MSM_GPIO_PINS(57); 330 + DECLARE_MSM_GPIO_PINS(58); 331 + DECLARE_MSM_GPIO_PINS(59); 332 + DECLARE_MSM_GPIO_PINS(60); 333 + DECLARE_MSM_GPIO_PINS(61); 334 + DECLARE_MSM_GPIO_PINS(62); 335 + DECLARE_MSM_GPIO_PINS(63); 336 + DECLARE_MSM_GPIO_PINS(64); 337 + DECLARE_MSM_GPIO_PINS(65); 338 + DECLARE_MSM_GPIO_PINS(66); 339 + DECLARE_MSM_GPIO_PINS(67); 340 + DECLARE_MSM_GPIO_PINS(68); 341 + DECLARE_MSM_GPIO_PINS(69); 342 + DECLARE_MSM_GPIO_PINS(70); 343 + DECLARE_MSM_GPIO_PINS(71); 344 + DECLARE_MSM_GPIO_PINS(72); 345 + DECLARE_MSM_GPIO_PINS(73); 346 + DECLARE_MSM_GPIO_PINS(74); 347 + DECLARE_MSM_GPIO_PINS(75); 348 + DECLARE_MSM_GPIO_PINS(76); 349 + DECLARE_MSM_GPIO_PINS(77); 350 + DECLARE_MSM_GPIO_PINS(78); 351 + DECLARE_MSM_GPIO_PINS(79); 352 + DECLARE_MSM_GPIO_PINS(80); 353 + DECLARE_MSM_GPIO_PINS(81); 354 + DECLARE_MSM_GPIO_PINS(82); 355 + DECLARE_MSM_GPIO_PINS(83); 356 + DECLARE_MSM_GPIO_PINS(84); 357 + DECLARE_MSM_GPIO_PINS(85); 358 + DECLARE_MSM_GPIO_PINS(86); 359 + DECLARE_MSM_GPIO_PINS(87); 360 + DECLARE_MSM_GPIO_PINS(88); 361 + DECLARE_MSM_GPIO_PINS(89); 362 + DECLARE_MSM_GPIO_PINS(90); 363 + DECLARE_MSM_GPIO_PINS(91); 364 + DECLARE_MSM_GPIO_PINS(92); 365 + DECLARE_MSM_GPIO_PINS(93); 366 + DECLARE_MSM_GPIO_PINS(94); 367 + DECLARE_MSM_GPIO_PINS(95); 368 + DECLARE_MSM_GPIO_PINS(96); 369 + DECLARE_MSM_GPIO_PINS(97); 370 + DECLARE_MSM_GPIO_PINS(98); 371 + DECLARE_MSM_GPIO_PINS(99); 372 + DECLARE_MSM_GPIO_PINS(100); 373 + DECLARE_MSM_GPIO_PINS(101); 374 + DECLARE_MSM_GPIO_PINS(102); 375 + DECLARE_MSM_GPIO_PINS(103); 376 + DECLARE_MSM_GPIO_PINS(104); 377 + DECLARE_MSM_GPIO_PINS(105); 378 + DECLARE_MSM_GPIO_PINS(106); 379 + DECLARE_MSM_GPIO_PINS(107); 380 + DECLARE_MSM_GPIO_PINS(108); 381 + DECLARE_MSM_GPIO_PINS(109); 382 + DECLARE_MSM_GPIO_PINS(110); 383 + DECLARE_MSM_GPIO_PINS(111); 384 + DECLARE_MSM_GPIO_PINS(112); 385 + DECLARE_MSM_GPIO_PINS(113); 386 + DECLARE_MSM_GPIO_PINS(114); 387 + DECLARE_MSM_GPIO_PINS(115); 388 + DECLARE_MSM_GPIO_PINS(116); 389 + DECLARE_MSM_GPIO_PINS(117); 390 + DECLARE_MSM_GPIO_PINS(118); 391 + DECLARE_MSM_GPIO_PINS(119); 392 + DECLARE_MSM_GPIO_PINS(120); 393 + DECLARE_MSM_GPIO_PINS(121); 394 + DECLARE_MSM_GPIO_PINS(122); 395 + DECLARE_MSM_GPIO_PINS(123); 396 + DECLARE_MSM_GPIO_PINS(124); 397 + DECLARE_MSM_GPIO_PINS(125); 398 + DECLARE_MSM_GPIO_PINS(126); 399 + DECLARE_MSM_GPIO_PINS(127); 400 + DECLARE_MSM_GPIO_PINS(128); 401 + DECLARE_MSM_GPIO_PINS(129); 402 + DECLARE_MSM_GPIO_PINS(130); 403 + DECLARE_MSM_GPIO_PINS(131); 404 + DECLARE_MSM_GPIO_PINS(132); 405 + DECLARE_MSM_GPIO_PINS(133); 406 + DECLARE_MSM_GPIO_PINS(134); 407 + DECLARE_MSM_GPIO_PINS(135); 408 + DECLARE_MSM_GPIO_PINS(136); 409 + DECLARE_MSM_GPIO_PINS(137); 410 + DECLARE_MSM_GPIO_PINS(138); 411 + DECLARE_MSM_GPIO_PINS(139); 412 + DECLARE_MSM_GPIO_PINS(140); 413 + DECLARE_MSM_GPIO_PINS(141); 414 + DECLARE_MSM_GPIO_PINS(142); 415 + DECLARE_MSM_GPIO_PINS(143); 416 + DECLARE_MSM_GPIO_PINS(144); 417 + DECLARE_MSM_GPIO_PINS(145); 418 + DECLARE_MSM_GPIO_PINS(146); 419 + DECLARE_MSM_GPIO_PINS(147); 420 + DECLARE_MSM_GPIO_PINS(148); 421 + DECLARE_MSM_GPIO_PINS(149); 422 + 423 + static const unsigned int sdc2_clk_pins[] = { 150 }; 424 + static const unsigned int sdc2_cmd_pins[] = { 151 }; 425 + static const unsigned int sdc2_data_pins[] = { 152 }; 426 + static const unsigned int ufs_reset_pins[] = { 153 }; 427 + 428 + enum msm8998_functions { 429 + msm_mux_adsp_ext, 430 + msm_mux_agera_pll, 431 + msm_mux_atest_char, 432 + msm_mux_atest_gpsadc0, 433 + msm_mux_atest_gpsadc1, 434 + msm_mux_atest_tsens, 435 + msm_mux_atest_tsens2, 436 + msm_mux_atest_usb1, 437 + msm_mux_atest_usb10, 438 + msm_mux_atest_usb11, 439 + msm_mux_atest_usb12, 440 + msm_mux_atest_usb13, 441 + msm_mux_audio_ref, 442 + msm_mux_bimc_dte0, 443 + msm_mux_bimc_dte1, 444 + msm_mux_blsp10_spi, 445 + msm_mux_blsp10_spi_a, 446 + msm_mux_blsp10_spi_b, 447 + msm_mux_blsp11_i2c, 448 + msm_mux_blsp1_spi, 449 + msm_mux_blsp1_spi_a, 450 + msm_mux_blsp1_spi_b, 451 + msm_mux_blsp2_spi, 452 + msm_mux_blsp9_spi, 453 + msm_mux_blsp_i2c1, 454 + msm_mux_blsp_i2c10, 455 + msm_mux_blsp_i2c11, 456 + msm_mux_blsp_i2c12, 457 + msm_mux_blsp_i2c2, 458 + msm_mux_blsp_i2c3, 459 + msm_mux_blsp_i2c4, 460 + msm_mux_blsp_i2c5, 461 + msm_mux_blsp_i2c6, 462 + msm_mux_blsp_i2c7, 463 + msm_mux_blsp_i2c8, 464 + msm_mux_blsp_i2c9, 465 + msm_mux_blsp_spi1, 466 + msm_mux_blsp_spi10, 467 + msm_mux_blsp_spi11, 468 + msm_mux_blsp_spi12, 469 + msm_mux_blsp_spi2, 470 + msm_mux_blsp_spi3, 471 + msm_mux_blsp_spi4, 472 + msm_mux_blsp_spi5, 473 + msm_mux_blsp_spi6, 474 + msm_mux_blsp_spi7, 475 + msm_mux_blsp_spi8, 476 + msm_mux_blsp_spi9, 477 + msm_mux_blsp_uart1_a, 478 + msm_mux_blsp_uart1_b, 479 + msm_mux_blsp_uart2_a, 480 + msm_mux_blsp_uart2_b, 481 + msm_mux_blsp_uart3_a, 482 + msm_mux_blsp_uart3_b, 483 + msm_mux_blsp_uart7_a, 484 + msm_mux_blsp_uart7_b, 485 + msm_mux_blsp_uart8, 486 + msm_mux_blsp_uart8_a, 487 + msm_mux_blsp_uart8_b, 488 + msm_mux_blsp_uart9_a, 489 + msm_mux_blsp_uart9_b, 490 + msm_mux_blsp_uim1_a, 491 + msm_mux_blsp_uim1_b, 492 + msm_mux_blsp_uim2_a, 493 + msm_mux_blsp_uim2_b, 494 + msm_mux_blsp_uim3_a, 495 + msm_mux_blsp_uim3_b, 496 + msm_mux_blsp_uim7_a, 497 + msm_mux_blsp_uim7_b, 498 + msm_mux_blsp_uim8_a, 499 + msm_mux_blsp_uim8_b, 500 + msm_mux_blsp_uim9_a, 501 + msm_mux_blsp_uim9_b, 502 + msm_mux_bt_reset, 503 + msm_mux_btfm_slimbus, 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_edp_hot, 518 + msm_mux_edp_lcd, 519 + msm_mux_gcc_gp1_a, 520 + msm_mux_gcc_gp1_b, 521 + msm_mux_gcc_gp2_a, 522 + msm_mux_gcc_gp2_b, 523 + msm_mux_gcc_gp3_a, 524 + msm_mux_gcc_gp3_b, 525 + msm_mux_gpio, 526 + msm_mux_hdmi_cec, 527 + msm_mux_hdmi_ddc, 528 + msm_mux_hdmi_hot, 529 + msm_mux_hdmi_rcv, 530 + msm_mux_isense_dbg, 531 + msm_mux_jitter_bist, 532 + msm_mux_ldo_en, 533 + msm_mux_ldo_update, 534 + msm_mux_lpass_slimbus, 535 + msm_mux_m_voc, 536 + msm_mux_mdp_vsync, 537 + msm_mux_mdp_vsync0, 538 + msm_mux_mdp_vsync1, 539 + msm_mux_mdp_vsync2, 540 + msm_mux_mdp_vsync3, 541 + msm_mux_mdp_vsync_a, 542 + msm_mux_mdp_vsync_b, 543 + msm_mux_modem_tsync, 544 + msm_mux_mss_lte, 545 + msm_mux_nav_dr, 546 + msm_mux_nav_pps, 547 + msm_mux_pa_indicator, 548 + msm_mux_pci_e0, 549 + msm_mux_phase_flag, 550 + msm_mux_pll_bypassnl, 551 + msm_mux_pll_reset, 552 + msm_mux_pri_mi2s, 553 + msm_mux_pri_mi2s_ws, 554 + msm_mux_prng_rosc, 555 + msm_mux_pwr_crypto, 556 + msm_mux_pwr_modem, 557 + msm_mux_pwr_nav, 558 + msm_mux_qdss_cti0_a, 559 + msm_mux_qdss_cti0_b, 560 + msm_mux_qdss_cti1_a, 561 + msm_mux_qdss_cti1_b, 562 + msm_mux_qdss, 563 + msm_mux_qlink_enable, 564 + msm_mux_qlink_request, 565 + msm_mux_qua_mi2s, 566 + msm_mux_sd_card, 567 + msm_mux_sd_write, 568 + msm_mux_sdc40, 569 + msm_mux_sdc41, 570 + msm_mux_sdc42, 571 + msm_mux_sdc43, 572 + msm_mux_sdc4_clk, 573 + msm_mux_sdc4_cmd, 574 + msm_mux_sec_mi2s, 575 + msm_mux_sp_cmu, 576 + msm_mux_spkr_i2s, 577 + msm_mux_ssbi1, 578 + msm_mux_ssc_irq, 579 + msm_mux_ter_mi2s, 580 + msm_mux_tgu_ch0, 581 + msm_mux_tgu_ch1, 582 + msm_mux_tsense_pwm1, 583 + msm_mux_tsense_pwm2, 584 + msm_mux_tsif1_clk, 585 + msm_mux_tsif1_data, 586 + msm_mux_tsif1_en, 587 + msm_mux_tsif1_error, 588 + msm_mux_tsif1_sync, 589 + msm_mux_tsif2_clk, 590 + msm_mux_tsif2_data, 591 + msm_mux_tsif2_en, 592 + msm_mux_tsif2_error, 593 + msm_mux_tsif2_sync, 594 + msm_mux_uim1_clk, 595 + msm_mux_uim1_data, 596 + msm_mux_uim1_present, 597 + msm_mux_uim1_reset, 598 + msm_mux_uim2_clk, 599 + msm_mux_uim2_data, 600 + msm_mux_uim2_present, 601 + msm_mux_uim2_reset, 602 + msm_mux_uim_batt, 603 + msm_mux_usb_phy, 604 + msm_mux_vfr_1, 605 + msm_mux_vsense_clkout, 606 + msm_mux_vsense_data0, 607 + msm_mux_vsense_data1, 608 + msm_mux_vsense_mode, 609 + msm_mux_wlan1_adc0, 610 + msm_mux_wlan1_adc1, 611 + msm_mux_wlan2_adc0, 612 + msm_mux_wlan2_adc1, 613 + msm_mux__, 614 + }; 615 + 616 + static const char * const gpio_groups[] = { 617 + "gpio0", "gpio1", "gpio2", "gpio3", "gpio4", "gpio5", "gpio6", "gpio7", 618 + "gpio8", "gpio9", "gpio10", "gpio11", "gpio12", "gpio13", "gpio14", 619 + "gpio15", "gpio16", "gpio17", "gpio18", "gpio19", "gpio20", "gpio21", 620 + "gpio22", "gpio23", "gpio24", "gpio25", "gpio26", "gpio27", "gpio28", 621 + "gpio29", "gpio30", "gpio31", "gpio32", "gpio33", "gpio34", "gpio35", 622 + "gpio36", "gpio37", "gpio38", "gpio39", "gpio40", "gpio41", "gpio42", 623 + "gpio43", "gpio44", "gpio45", "gpio46", "gpio47", "gpio48", "gpio49", 624 + "gpio50", "gpio51", "gpio52", "gpio53", "gpio54", "gpio55", "gpio56", 625 + "gpio57", "gpio58", "gpio59", "gpio60", "gpio61", "gpio62", "gpio63", 626 + "gpio64", "gpio65", "gpio66", "gpio67", "gpio68", "gpio69", "gpio70", 627 + "gpio71", "gpio72", "gpio73", "gpio74", "gpio75", "gpio76", "gpio77", 628 + "gpio78", "gpio79", "gpio80", "gpio81", "gpio82", "gpio83", "gpio84", 629 + "gpio85", "gpio86", "gpio87", "gpio88", "gpio89", "gpio90", "gpio91", 630 + "gpio92", "gpio93", "gpio94", "gpio95", "gpio96", "gpio97", "gpio98", 631 + "gpio99", "gpio100", "gpio101", "gpio102", "gpio103", "gpio104", 632 + "gpio105", "gpio106", "gpio107", "gpio108", "gpio109", "gpio110", 633 + "gpio111", "gpio112", "gpio113", "gpio114", "gpio115", "gpio116", 634 + "gpio117", "gpio118", "gpio119", "gpio120", "gpio121", "gpio122", 635 + "gpio123", "gpio124", "gpio125", "gpio126", "gpio127", "gpio128", 636 + "gpio129", "gpio130", "gpio131", "gpio132", "gpio133", "gpio134", 637 + "gpio135", "gpio136", "gpio137", "gpio138", "gpio139", "gpio140", 638 + "gpio141", "gpio142", "gpio143", "gpio144", "gpio145", "gpio146", 639 + "gpio147", "gpio148", "gpio149", 640 + }; 641 + static const char * const blsp_spi1_groups[] = { 642 + "gpio0", "gpio1", "gpio2", "gpio3", 643 + }; 644 + static const char * const blsp_uim1_a_groups[] = { 645 + "gpio0", "gpio1", 646 + }; 647 + static const char * const blsp_uart1_a_groups[] = { 648 + "gpio0", "gpio1", "gpio2", "gpio3", 649 + }; 650 + static const char * const blsp_i2c1_groups[] = { 651 + "gpio2", "gpio3", 652 + }; 653 + static const char * const blsp_spi8_groups[] = { 654 + "gpio4", "gpio5", "gpio6", "gpio7", 655 + }; 656 + static const char * const blsp_uart8_a_groups[] = { 657 + "gpio4", "gpio5", "gpio6", "gpio7", 658 + }; 659 + static const char * const blsp_uim8_a_groups[] = { 660 + "gpio4", "gpio5", 661 + }; 662 + static const char * const qdss_cti0_b_groups[] = { 663 + "gpio4", "gpio5", 664 + }; 665 + static const char * const blsp_i2c8_groups[] = { 666 + "gpio6", "gpio7", 667 + }; 668 + static const char * const ddr_bist_groups[] = { 669 + "gpio7", "gpio8", "gpio9", "gpio10", 670 + }; 671 + static const char * const atest_tsens2_groups[] = { 672 + "gpio7", 673 + }; 674 + static const char * const atest_usb1_groups[] = { 675 + "gpio7", 676 + }; 677 + static const char * const blsp_spi4_groups[] = { 678 + "gpio8", "gpio9", "gpio10", "gpio11", 679 + }; 680 + static const char * const blsp_uart1_b_groups[] = { 681 + "gpio8", "gpio9", "gpio10", "gpio11", 682 + }; 683 + static const char * const blsp_uim1_b_groups[] = { 684 + "gpio8", "gpio9", 685 + }; 686 + static const char * const wlan1_adc1_groups[] = { 687 + "gpio8", 688 + }; 689 + static const char * const atest_usb13_groups[] = { 690 + "gpio8", 691 + }; 692 + static const char * const bimc_dte1_groups[] = { 693 + "gpio8", "gpio10", 694 + }; 695 + static const char * const tsif1_sync_groups[] = { 696 + "gpio9", 697 + }; 698 + static const char * const wlan1_adc0_groups[] = { 699 + "gpio9", 700 + }; 701 + static const char * const atest_usb12_groups[] = { 702 + "gpio9", 703 + }; 704 + static const char * const bimc_dte0_groups[] = { 705 + "gpio9", "gpio11", 706 + }; 707 + static const char * const mdp_vsync_a_groups[] = { 708 + "gpio10", "gpio11", 709 + }; 710 + static const char * const blsp_i2c4_groups[] = { 711 + "gpio10", "gpio11", 712 + }; 713 + static const char * const atest_gpsadc1_groups[] = { 714 + "gpio10", 715 + }; 716 + static const char * const wlan2_adc1_groups[] = { 717 + "gpio10", 718 + }; 719 + static const char * const atest_usb11_groups[] = { 720 + "gpio10", 721 + }; 722 + static const char * const edp_lcd_groups[] = { 723 + "gpio11", 724 + }; 725 + static const char * const dbg_out_groups[] = { 726 + "gpio11", 727 + }; 728 + static const char * const atest_gpsadc0_groups[] = { 729 + "gpio11", 730 + }; 731 + static const char * const wlan2_adc0_groups[] = { 732 + "gpio11", 733 + }; 734 + static const char * const atest_usb10_groups[] = { 735 + "gpio11", 736 + }; 737 + static const char * const mdp_vsync_groups[] = { 738 + "gpio12", 739 + }; 740 + static const char * const m_voc_groups[] = { 741 + "gpio12", 742 + }; 743 + static const char * const cam_mclk_groups[] = { 744 + "gpio13", "gpio14", "gpio15", "gpio16", 745 + }; 746 + static const char * const pll_bypassnl_groups[] = { 747 + "gpio13", 748 + }; 749 + static const char * const qdss_groups[] = { 750 + "gpio13", "gpio14", "gpio15", "gpio16", "gpio17", "gpio18", "gpio19", 751 + "gpio20", "gpio21", "gpio22", "gpio23", "gpio24", "gpio25", "gpio26", 752 + "gpio27", "gpio28", "gpio29", "gpio30", "gpio41", "gpio42", "gpio43", 753 + "gpio44", "gpio75", "gpio76", "gpio77", "gpio79", "gpio80", "gpio93", 754 + "gpio117", "gpio118", "gpio119", "gpio120", "gpio121", "gpio122", 755 + "gpio123", "gpio124", 756 + }; 757 + static const char * const pll_reset_groups[] = { 758 + "gpio14", 759 + }; 760 + static const char * const cci_i2c_groups[] = { 761 + "gpio17", "gpio18", "gpio19", "gpio20", 762 + }; 763 + static const char * const phase_flag_groups[] = { 764 + "gpio18", "gpio19", "gpio73", "gpio74", "gpio75", "gpio76", "gpio77", 765 + "gpio89", "gpio91", "gpio92", "gpio96", "gpio114", "gpio115", 766 + "gpio116", "gpio117", "gpio118", "gpio119", "gpio120", "gpio121", 767 + "gpio122", "gpio123", "gpio124", "gpio125", "gpio126", "gpio128", 768 + "gpio129", "gpio130", "gpio131", "gpio132", "gpio133", "gpio134", 769 + }; 770 + static const char * const cci_timer4_groups[] = { 771 + "gpio25", 772 + }; 773 + static const char * const blsp2_spi_groups[] = { 774 + "gpio25", "gpio29", "gpio30", 775 + }; 776 + static const char * const cci_timer0_groups[] = { 777 + "gpio21", 778 + }; 779 + static const char * const vsense_data0_groups[] = { 780 + "gpio21", 781 + }; 782 + static const char * const cci_timer1_groups[] = { 783 + "gpio22", 784 + }; 785 + static const char * const vsense_data1_groups[] = { 786 + "gpio22", 787 + }; 788 + static const char * const cci_timer2_groups[] = { 789 + "gpio23", 790 + }; 791 + static const char * const blsp1_spi_b_groups[] = { 792 + "gpio23", "gpio28", 793 + }; 794 + static const char * const vsense_mode_groups[] = { 795 + "gpio23", 796 + }; 797 + static const char * const cci_timer3_groups[] = { 798 + "gpio24", 799 + }; 800 + static const char * const cci_async_groups[] = { 801 + "gpio24", "gpio25", "gpio26", 802 + }; 803 + static const char * const blsp1_spi_a_groups[] = { 804 + "gpio24", "gpio27", 805 + }; 806 + static const char * const vsense_clkout_groups[] = { 807 + "gpio24", 808 + }; 809 + static const char * const hdmi_rcv_groups[] = { 810 + "gpio30", 811 + }; 812 + static const char * const hdmi_cec_groups[] = { 813 + "gpio31", 814 + }; 815 + static const char * const blsp_spi2_groups[] = { 816 + "gpio31", "gpio32", "gpio33", "gpio34", 817 + }; 818 + static const char * const blsp_uart2_a_groups[] = { 819 + "gpio31", "gpio32", "gpio33", "gpio34", 820 + }; 821 + static const char * const blsp_uim2_a_groups[] = { 822 + "gpio31", "gpio34", 823 + }; 824 + static const char * const pwr_modem_groups[] = { 825 + "gpio31", 826 + }; 827 + static const char * const hdmi_ddc_groups[] = { 828 + "gpio32", "gpio33", 829 + }; 830 + static const char * const blsp_i2c2_groups[] = { 831 + "gpio32", "gpio33", 832 + }; 833 + static const char * const pwr_nav_groups[] = { 834 + "gpio32", 835 + }; 836 + static const char * const pwr_crypto_groups[] = { 837 + "gpio33", 838 + }; 839 + static const char * const hdmi_hot_groups[] = { 840 + "gpio34", 841 + }; 842 + static const char * const edp_hot_groups[] = { 843 + "gpio34", 844 + }; 845 + static const char * const pci_e0_groups[] = { 846 + "gpio35", "gpio36", "gpio37", 847 + }; 848 + static const char * const jitter_bist_groups[] = { 849 + "gpio35", 850 + }; 851 + static const char * const agera_pll_groups[] = { 852 + "gpio36", "gpio37", 853 + }; 854 + static const char * const atest_tsens_groups[] = { 855 + "gpio36", 856 + }; 857 + static const char * const usb_phy_groups[] = { 858 + "gpio38", 859 + }; 860 + static const char * const lpass_slimbus_groups[] = { 861 + "gpio39", "gpio70", "gpio71", "gpio72", 862 + }; 863 + static const char * const sd_write_groups[] = { 864 + "gpio40", 865 + }; 866 + static const char * const tsif1_error_groups[] = { 867 + "gpio40", 868 + }; 869 + static const char * const blsp_spi6_groups[] = { 870 + "gpio41", "gpio42", "gpio43", "gpio44", 871 + }; 872 + static const char * const blsp_uart3_b_groups[] = { 873 + "gpio41", "gpio42", "gpio43", "gpio44", 874 + }; 875 + static const char * const blsp_uim3_b_groups[] = { 876 + "gpio41", "gpio42", 877 + }; 878 + static const char * const blsp_i2c6_groups[] = { 879 + "gpio43", "gpio44", 880 + }; 881 + static const char * const bt_reset_groups[] = { 882 + "gpio45", 883 + }; 884 + static const char * const blsp_spi3_groups[] = { 885 + "gpio45", "gpio46", "gpio47", "gpio48", 886 + }; 887 + static const char * const blsp_uart3_a_groups[] = { 888 + "gpio45", "gpio46", "gpio47", "gpio48", 889 + }; 890 + static const char * const blsp_uim3_a_groups[] = { 891 + "gpio45", "gpio46", 892 + }; 893 + static const char * const blsp_i2c3_groups[] = { 894 + "gpio47", "gpio48", 895 + }; 896 + static const char * const blsp_spi9_groups[] = { 897 + "gpio49", "gpio50", "gpio51", "gpio52", 898 + }; 899 + static const char * const blsp_uart9_a_groups[] = { 900 + "gpio49", "gpio50", "gpio51", "gpio52", 901 + }; 902 + static const char * const blsp_uim9_a_groups[] = { 903 + "gpio49", "gpio50", 904 + }; 905 + static const char * const blsp10_spi_b_groups[] = { 906 + "gpio49", "gpio50", 907 + }; 908 + static const char * const qdss_cti0_a_groups[] = { 909 + "gpio49", "gpio50", 910 + }; 911 + static const char * const blsp_i2c9_groups[] = { 912 + "gpio51", "gpio52", 913 + }; 914 + static const char * const blsp10_spi_a_groups[] = { 915 + "gpio51", "gpio52", 916 + }; 917 + static const char * const blsp_spi7_groups[] = { 918 + "gpio53", "gpio54", "gpio55", "gpio56", 919 + }; 920 + static const char * const blsp_uart7_a_groups[] = { 921 + "gpio53", "gpio54", "gpio55", "gpio56", 922 + }; 923 + static const char * const blsp_uim7_a_groups[] = { 924 + "gpio53", "gpio54", 925 + }; 926 + static const char * const blsp_i2c7_groups[] = { 927 + "gpio55", "gpio56", 928 + }; 929 + static const char * const qua_mi2s_groups[] = { 930 + "gpio57", "gpio58", "gpio59", "gpio60", "gpio61", "gpio62", "gpio63", 931 + }; 932 + static const char * const blsp10_spi_groups[] = { 933 + "gpio57", 934 + }; 935 + static const char * const gcc_gp1_a_groups[] = { 936 + "gpio57", 937 + }; 938 + static const char * const ssc_irq_groups[] = { 939 + "gpio58", "gpio59", "gpio60", "gpio61", "gpio62", "gpio63", "gpio78", 940 + "gpio79", "gpio80", "gpio117", "gpio118", "gpio119", "gpio120", 941 + "gpio121", "gpio122", "gpio123", "gpio124", "gpio125", 942 + }; 943 + static const char * const blsp_spi11_groups[] = { 944 + "gpio58", "gpio59", "gpio60", "gpio61", 945 + }; 946 + static const char * const blsp_uart8_b_groups[] = { 947 + "gpio58", "gpio59", "gpio60", "gpio61", 948 + }; 949 + static const char * const blsp_uim8_b_groups[] = { 950 + "gpio58", "gpio59", 951 + }; 952 + static const char * const gcc_gp2_a_groups[] = { 953 + "gpio58", 954 + }; 955 + static const char * const qdss_cti1_a_groups[] = { 956 + "gpio58", "gpio59", 957 + }; 958 + static const char * const gcc_gp3_a_groups[] = { 959 + "gpio59", 960 + }; 961 + static const char * const blsp_i2c11_groups[] = { 962 + "gpio60", "gpio61", 963 + }; 964 + static const char * const cri_trng0_groups[] = { 965 + "gpio60", 966 + }; 967 + static const char * const cri_trng1_groups[] = { 968 + "gpio61", 969 + }; 970 + static const char * const cri_trng_groups[] = { 971 + "gpio62", 972 + }; 973 + static const char * const pri_mi2s_groups[] = { 974 + "gpio64", "gpio65", "gpio67", "gpio68", 975 + }; 976 + static const char * const sp_cmu_groups[] = { 977 + "gpio64", 978 + }; 979 + static const char * const blsp_spi10_groups[] = { 980 + "gpio65", "gpio66", "gpio67", "gpio68", 981 + }; 982 + static const char * const blsp_uart7_b_groups[] = { 983 + "gpio65", "gpio66", "gpio67", "gpio68", 984 + }; 985 + static const char * const blsp_uim7_b_groups[] = { 986 + "gpio65", "gpio66", 987 + }; 988 + static const char * const pri_mi2s_ws_groups[] = { 989 + "gpio66", 990 + }; 991 + static const char * const blsp_i2c10_groups[] = { 992 + "gpio67", "gpio68", 993 + }; 994 + static const char * const spkr_i2s_groups[] = { 995 + "gpio69", "gpio70", "gpio71", "gpio72", 996 + }; 997 + static const char * const audio_ref_groups[] = { 998 + "gpio69", 999 + }; 1000 + static const char * const blsp9_spi_groups[] = { 1001 + "gpio70", "gpio71", "gpio72", 1002 + }; 1003 + static const char * const tsense_pwm1_groups[] = { 1004 + "gpio71", 1005 + }; 1006 + static const char * const tsense_pwm2_groups[] = { 1007 + "gpio71", 1008 + }; 1009 + static const char * const btfm_slimbus_groups[] = { 1010 + "gpio73", "gpio74", 1011 + }; 1012 + static const char * const ter_mi2s_groups[] = { 1013 + "gpio74", "gpio75", "gpio76", "gpio77", "gpio78", 1014 + }; 1015 + static const char * const gcc_gp1_b_groups[] = { 1016 + "gpio78", 1017 + }; 1018 + static const char * const sec_mi2s_groups[] = { 1019 + "gpio79", "gpio80", "gpio81", "gpio82", "gpio83", 1020 + }; 1021 + static const char * const blsp_spi12_groups[] = { 1022 + "gpio81", "gpio82", "gpio83", "gpio84", 1023 + }; 1024 + static const char * const blsp_uart9_b_groups[] = { 1025 + "gpio81", "gpio82", "gpio83", "gpio84", 1026 + }; 1027 + static const char * const blsp_uim9_b_groups[] = { 1028 + "gpio81", "gpio82", 1029 + }; 1030 + static const char * const gcc_gp2_b_groups[] = { 1031 + "gpio81", 1032 + }; 1033 + static const char * const gcc_gp3_b_groups[] = { 1034 + "gpio82", 1035 + }; 1036 + static const char * const blsp_i2c12_groups[] = { 1037 + "gpio83", "gpio84", 1038 + }; 1039 + static const char * const blsp_spi5_groups[] = { 1040 + "gpio85", "gpio86", "gpio87", "gpio88", 1041 + }; 1042 + static const char * const blsp_uart2_b_groups[] = { 1043 + "gpio85", "gpio86", "gpio87", "gpio88", 1044 + }; 1045 + static const char * const blsp_uim2_b_groups[] = { 1046 + "gpio85", "gpio86", 1047 + }; 1048 + static const char * const blsp_i2c5_groups[] = { 1049 + "gpio87", "gpio88", 1050 + }; 1051 + static const char * const tsif1_clk_groups[] = { 1052 + "gpio89", 1053 + }; 1054 + static const char * const tsif1_en_groups[] = { 1055 + "gpio90", 1056 + }; 1057 + static const char * const mdp_vsync0_groups[] = { 1058 + "gpio90", 1059 + }; 1060 + static const char * const mdp_vsync1_groups[] = { 1061 + "gpio90", 1062 + }; 1063 + static const char * const mdp_vsync2_groups[] = { 1064 + "gpio90", 1065 + }; 1066 + static const char * const mdp_vsync3_groups[] = { 1067 + "gpio90", 1068 + }; 1069 + static const char * const blsp1_spi_groups[] = { 1070 + "gpio90", 1071 + }; 1072 + static const char * const tgu_ch0_groups[] = { 1073 + "gpio90", 1074 + }; 1075 + static const char * const qdss_cti1_b_groups[] = { 1076 + "gpio90", "gpio91", 1077 + }; 1078 + static const char * const tsif1_data_groups[] = { 1079 + "gpio91", 1080 + }; 1081 + static const char * const sdc4_cmd_groups[] = { 1082 + "gpio91", 1083 + }; 1084 + static const char * const tgu_ch1_groups[] = { 1085 + "gpio91", 1086 + }; 1087 + static const char * const tsif2_error_groups[] = { 1088 + "gpio92", 1089 + }; 1090 + static const char * const sdc43_groups[] = { 1091 + "gpio92", 1092 + }; 1093 + static const char * const vfr_1_groups[] = { 1094 + "gpio92", 1095 + }; 1096 + static const char * const tsif2_clk_groups[] = { 1097 + "gpio93", 1098 + }; 1099 + static const char * const sdc4_clk_groups[] = { 1100 + "gpio93", 1101 + }; 1102 + static const char * const tsif2_en_groups[] = { 1103 + "gpio94", 1104 + }; 1105 + static const char * const sdc42_groups[] = { 1106 + "gpio94", 1107 + }; 1108 + static const char * const sd_card_groups[] = { 1109 + "gpio95", 1110 + }; 1111 + static const char * const tsif2_data_groups[] = { 1112 + "gpio95", 1113 + }; 1114 + static const char * const sdc41_groups[] = { 1115 + "gpio95", 1116 + }; 1117 + static const char * const tsif2_sync_groups[] = { 1118 + "gpio96", 1119 + }; 1120 + static const char * const sdc40_groups[] = { 1121 + "gpio96", 1122 + }; 1123 + static const char * const mdp_vsync_b_groups[] = { 1124 + "gpio97", "gpio98", 1125 + }; 1126 + static const char * const ldo_en_groups[] = { 1127 + "gpio97", 1128 + }; 1129 + static const char * const ldo_update_groups[] = { 1130 + "gpio98", 1131 + }; 1132 + static const char * const blsp_uart8_groups[] = { 1133 + "gpio100", "gpio101", 1134 + }; 1135 + static const char * const blsp11_i2c_groups[] = { 1136 + "gpio102", "gpio103", 1137 + }; 1138 + static const char * const prng_rosc_groups[] = { 1139 + "gpio102", 1140 + }; 1141 + static const char * const uim2_data_groups[] = { 1142 + "gpio105", 1143 + }; 1144 + static const char * const uim2_clk_groups[] = { 1145 + "gpio106", 1146 + }; 1147 + static const char * const uim2_reset_groups[] = { 1148 + "gpio107", 1149 + }; 1150 + static const char * const uim2_present_groups[] = { 1151 + "gpio108", 1152 + }; 1153 + static const char * const uim1_data_groups[] = { 1154 + "gpio109", 1155 + }; 1156 + static const char * const uim1_clk_groups[] = { 1157 + "gpio110", 1158 + }; 1159 + static const char * const uim1_reset_groups[] = { 1160 + "gpio111", 1161 + }; 1162 + static const char * const uim1_present_groups[] = { 1163 + "gpio112", 1164 + }; 1165 + static const char * const uim_batt_groups[] = { 1166 + "gpio113", 1167 + }; 1168 + static const char * const nav_dr_groups[] = { 1169 + "gpio115", 1170 + }; 1171 + static const char * const atest_char_groups[] = { 1172 + "gpio117", "gpio118", "gpio119", "gpio120", "gpio121", 1173 + }; 1174 + static const char * const adsp_ext_groups[] = { 1175 + "gpio118", 1176 + }; 1177 + static const char * const modem_tsync_groups[] = { 1178 + "gpio128", 1179 + }; 1180 + static const char * const nav_pps_groups[] = { 1181 + "gpio128", 1182 + }; 1183 + static const char * const qlink_request_groups[] = { 1184 + "gpio130", 1185 + }; 1186 + static const char * const qlink_enable_groups[] = { 1187 + "gpio131", 1188 + }; 1189 + static const char * const pa_indicator_groups[] = { 1190 + "gpio135", 1191 + }; 1192 + static const char * const ssbi1_groups[] = { 1193 + "gpio142", 1194 + }; 1195 + static const char * const isense_dbg_groups[] = { 1196 + "gpio143", 1197 + }; 1198 + static const char * const mss_lte_groups[] = { 1199 + "gpio144", "gpio145", 1200 + }; 1201 + 1202 + static const struct msm_function msm8998_functions[] = { 1203 + FUNCTION(gpio), 1204 + FUNCTION(adsp_ext), 1205 + FUNCTION(agera_pll), 1206 + FUNCTION(atest_char), 1207 + FUNCTION(atest_gpsadc0), 1208 + FUNCTION(atest_gpsadc1), 1209 + FUNCTION(atest_tsens), 1210 + FUNCTION(atest_tsens2), 1211 + FUNCTION(atest_usb1), 1212 + FUNCTION(atest_usb10), 1213 + FUNCTION(atest_usb11), 1214 + FUNCTION(atest_usb12), 1215 + FUNCTION(atest_usb13), 1216 + FUNCTION(audio_ref), 1217 + FUNCTION(bimc_dte0), 1218 + FUNCTION(bimc_dte1), 1219 + FUNCTION(blsp10_spi), 1220 + FUNCTION(blsp10_spi_a), 1221 + FUNCTION(blsp10_spi_b), 1222 + FUNCTION(blsp11_i2c), 1223 + FUNCTION(blsp1_spi), 1224 + FUNCTION(blsp1_spi_a), 1225 + FUNCTION(blsp1_spi_b), 1226 + FUNCTION(blsp2_spi), 1227 + FUNCTION(blsp9_spi), 1228 + FUNCTION(blsp_i2c1), 1229 + FUNCTION(blsp_i2c2), 1230 + FUNCTION(blsp_i2c3), 1231 + FUNCTION(blsp_i2c4), 1232 + FUNCTION(blsp_i2c5), 1233 + FUNCTION(blsp_i2c6), 1234 + FUNCTION(blsp_i2c7), 1235 + FUNCTION(blsp_i2c8), 1236 + FUNCTION(blsp_i2c9), 1237 + FUNCTION(blsp_i2c10), 1238 + FUNCTION(blsp_i2c11), 1239 + FUNCTION(blsp_i2c12), 1240 + FUNCTION(blsp_spi1), 1241 + FUNCTION(blsp_spi2), 1242 + FUNCTION(blsp_spi3), 1243 + FUNCTION(blsp_spi4), 1244 + FUNCTION(blsp_spi5), 1245 + FUNCTION(blsp_spi6), 1246 + FUNCTION(blsp_spi7), 1247 + FUNCTION(blsp_spi8), 1248 + FUNCTION(blsp_spi9), 1249 + FUNCTION(blsp_spi10), 1250 + FUNCTION(blsp_spi11), 1251 + FUNCTION(blsp_spi12), 1252 + FUNCTION(blsp_uart1_a), 1253 + FUNCTION(blsp_uart1_b), 1254 + FUNCTION(blsp_uart2_a), 1255 + FUNCTION(blsp_uart2_b), 1256 + FUNCTION(blsp_uart3_a), 1257 + FUNCTION(blsp_uart3_b), 1258 + FUNCTION(blsp_uart7_a), 1259 + FUNCTION(blsp_uart7_b), 1260 + FUNCTION(blsp_uart8), 1261 + FUNCTION(blsp_uart8_a), 1262 + FUNCTION(blsp_uart8_b), 1263 + FUNCTION(blsp_uart9_a), 1264 + FUNCTION(blsp_uart9_b), 1265 + FUNCTION(blsp_uim1_a), 1266 + FUNCTION(blsp_uim1_b), 1267 + FUNCTION(blsp_uim2_a), 1268 + FUNCTION(blsp_uim2_b), 1269 + FUNCTION(blsp_uim3_a), 1270 + FUNCTION(blsp_uim3_b), 1271 + FUNCTION(blsp_uim7_a), 1272 + FUNCTION(blsp_uim7_b), 1273 + FUNCTION(blsp_uim8_a), 1274 + FUNCTION(blsp_uim8_b), 1275 + FUNCTION(blsp_uim9_a), 1276 + FUNCTION(blsp_uim9_b), 1277 + FUNCTION(bt_reset), 1278 + FUNCTION(btfm_slimbus), 1279 + FUNCTION(cam_mclk), 1280 + FUNCTION(cci_async), 1281 + FUNCTION(cci_i2c), 1282 + FUNCTION(cci_timer0), 1283 + FUNCTION(cci_timer1), 1284 + FUNCTION(cci_timer2), 1285 + FUNCTION(cci_timer3), 1286 + FUNCTION(cci_timer4), 1287 + FUNCTION(cri_trng), 1288 + FUNCTION(cri_trng0), 1289 + FUNCTION(cri_trng1), 1290 + FUNCTION(dbg_out), 1291 + FUNCTION(ddr_bist), 1292 + FUNCTION(edp_hot), 1293 + FUNCTION(edp_lcd), 1294 + FUNCTION(gcc_gp1_a), 1295 + FUNCTION(gcc_gp1_b), 1296 + FUNCTION(gcc_gp2_a), 1297 + FUNCTION(gcc_gp2_b), 1298 + FUNCTION(gcc_gp3_a), 1299 + FUNCTION(gcc_gp3_b), 1300 + FUNCTION(hdmi_cec), 1301 + FUNCTION(hdmi_ddc), 1302 + FUNCTION(hdmi_hot), 1303 + FUNCTION(hdmi_rcv), 1304 + FUNCTION(isense_dbg), 1305 + FUNCTION(jitter_bist), 1306 + FUNCTION(ldo_en), 1307 + FUNCTION(ldo_update), 1308 + FUNCTION(lpass_slimbus), 1309 + FUNCTION(m_voc), 1310 + FUNCTION(mdp_vsync), 1311 + FUNCTION(mdp_vsync0), 1312 + FUNCTION(mdp_vsync1), 1313 + FUNCTION(mdp_vsync2), 1314 + FUNCTION(mdp_vsync3), 1315 + FUNCTION(mdp_vsync_a), 1316 + FUNCTION(mdp_vsync_b), 1317 + FUNCTION(modem_tsync), 1318 + FUNCTION(mss_lte), 1319 + FUNCTION(nav_dr), 1320 + FUNCTION(nav_pps), 1321 + FUNCTION(pa_indicator), 1322 + FUNCTION(pci_e0), 1323 + FUNCTION(phase_flag), 1324 + FUNCTION(pll_bypassnl), 1325 + FUNCTION(pll_reset), 1326 + FUNCTION(pri_mi2s), 1327 + FUNCTION(pri_mi2s_ws), 1328 + FUNCTION(prng_rosc), 1329 + FUNCTION(pwr_crypto), 1330 + FUNCTION(pwr_modem), 1331 + FUNCTION(pwr_nav), 1332 + FUNCTION(qdss_cti0_a), 1333 + FUNCTION(qdss_cti0_b), 1334 + FUNCTION(qdss_cti1_a), 1335 + FUNCTION(qdss_cti1_b), 1336 + FUNCTION(qdss), 1337 + FUNCTION(qlink_enable), 1338 + FUNCTION(qlink_request), 1339 + FUNCTION(qua_mi2s), 1340 + FUNCTION(sd_card), 1341 + FUNCTION(sd_write), 1342 + FUNCTION(sdc40), 1343 + FUNCTION(sdc41), 1344 + FUNCTION(sdc42), 1345 + FUNCTION(sdc43), 1346 + FUNCTION(sdc4_clk), 1347 + FUNCTION(sdc4_cmd), 1348 + FUNCTION(sec_mi2s), 1349 + FUNCTION(sp_cmu), 1350 + FUNCTION(spkr_i2s), 1351 + FUNCTION(ssbi1), 1352 + FUNCTION(ssc_irq), 1353 + FUNCTION(ter_mi2s), 1354 + FUNCTION(tgu_ch0), 1355 + FUNCTION(tgu_ch1), 1356 + FUNCTION(tsense_pwm1), 1357 + FUNCTION(tsense_pwm2), 1358 + FUNCTION(tsif1_clk), 1359 + FUNCTION(tsif1_data), 1360 + FUNCTION(tsif1_en), 1361 + FUNCTION(tsif1_error), 1362 + FUNCTION(tsif1_sync), 1363 + FUNCTION(tsif2_clk), 1364 + FUNCTION(tsif2_data), 1365 + FUNCTION(tsif2_en), 1366 + FUNCTION(tsif2_error), 1367 + FUNCTION(tsif2_sync), 1368 + FUNCTION(uim1_clk), 1369 + FUNCTION(uim1_data), 1370 + FUNCTION(uim1_present), 1371 + FUNCTION(uim1_reset), 1372 + FUNCTION(uim2_clk), 1373 + FUNCTION(uim2_data), 1374 + FUNCTION(uim2_present), 1375 + FUNCTION(uim2_reset), 1376 + FUNCTION(uim_batt), 1377 + FUNCTION(usb_phy), 1378 + FUNCTION(vfr_1), 1379 + FUNCTION(vsense_clkout), 1380 + FUNCTION(vsense_data0), 1381 + FUNCTION(vsense_data1), 1382 + FUNCTION(vsense_mode), 1383 + FUNCTION(wlan1_adc0), 1384 + FUNCTION(wlan1_adc1), 1385 + FUNCTION(wlan2_adc0), 1386 + FUNCTION(wlan2_adc1), 1387 + }; 1388 + 1389 + static const struct msm_pingroup msm8998_groups[] = { 1390 + PINGROUP(0, EAST, blsp_spi1, blsp_uart1_a, blsp_uim1_a, _, _, _, _, _, _), 1391 + PINGROUP(1, EAST, blsp_spi1, blsp_uart1_a, blsp_uim1_a, _, _, _, _, _, _), 1392 + PINGROUP(2, EAST, blsp_spi1, blsp_uart1_a, blsp_i2c1, _, _, _, _, _, _), 1393 + PINGROUP(3, EAST, blsp_spi1, blsp_uart1_a, blsp_i2c1, _, _, _, _, _, _), 1394 + PINGROUP(4, WEST, blsp_spi8, blsp_uart8_a, blsp_uim8_a, _, qdss_cti0_b, _, _, _, _), 1395 + PINGROUP(5, WEST, blsp_spi8, blsp_uart8_a, blsp_uim8_a, _, qdss_cti0_b, _, _, _, _), 1396 + PINGROUP(6, WEST, blsp_spi8, blsp_uart8_a, blsp_i2c8, _, _, _, _, _, _), 1397 + PINGROUP(7, WEST, blsp_spi8, blsp_uart8_a, blsp_i2c8, ddr_bist, _, atest_tsens2, atest_usb1, _, _), 1398 + PINGROUP(8, EAST, blsp_spi4, blsp_uart1_b, blsp_uim1_b, _, ddr_bist, _, wlan1_adc1, atest_usb13, bimc_dte1), 1399 + PINGROUP(9, EAST, blsp_spi4, blsp_uart1_b, blsp_uim1_b, tsif1_sync, ddr_bist, _, wlan1_adc0, atest_usb12, bimc_dte0), 1400 + PINGROUP(10, EAST, mdp_vsync_a, blsp_spi4, blsp_uart1_b, blsp_i2c4, ddr_bist, atest_gpsadc1, wlan2_adc1, atest_usb11, bimc_dte1), 1401 + PINGROUP(11, EAST, mdp_vsync_a, edp_lcd, blsp_spi4, blsp_uart1_b, blsp_i2c4, dbg_out, atest_gpsadc0, wlan2_adc0, atest_usb10), 1402 + PINGROUP(12, EAST, mdp_vsync, m_voc, _, _, _, _, _, _, _), 1403 + PINGROUP(13, EAST, cam_mclk, pll_bypassnl, qdss, _, _, _, _, _, _), 1404 + PINGROUP(14, EAST, cam_mclk, pll_reset, qdss, _, _, _, _, _, _), 1405 + PINGROUP(15, EAST, cam_mclk, qdss, _, _, _, _, _, _, _), 1406 + PINGROUP(16, EAST, cam_mclk, qdss, _, _, _, _, _, _, _), 1407 + PINGROUP(17, EAST, cci_i2c, qdss, _, _, _, _, _, _, _), 1408 + PINGROUP(18, EAST, cci_i2c, phase_flag, qdss, _, _, _, _, _, _), 1409 + PINGROUP(19, EAST, cci_i2c, phase_flag, qdss, _, _, _, _, _, _), 1410 + PINGROUP(20, EAST, cci_i2c, qdss, _, _, _, _, _, _, _), 1411 + PINGROUP(21, EAST, cci_timer0, _, qdss, vsense_data0, _, _, _, _, _), 1412 + PINGROUP(22, EAST, cci_timer1, _, qdss, vsense_data1, _, _, _, _, _), 1413 + PINGROUP(23, EAST, cci_timer2, blsp1_spi_b, qdss, vsense_mode, _, _, _, _, _), 1414 + PINGROUP(24, EAST, cci_timer3, cci_async, blsp1_spi_a, _, qdss, vsense_clkout, _, _, _), 1415 + PINGROUP(25, EAST, cci_timer4, cci_async, blsp2_spi, _, qdss, _, _, _, _), 1416 + PINGROUP(26, EAST, cci_async, qdss, _, _, _, _, _, _, _), 1417 + PINGROUP(27, EAST, blsp1_spi_a, qdss, _, _, _, _, _, _, _), 1418 + PINGROUP(28, EAST, blsp1_spi_b, qdss, _, _, _, _, _, _, _), 1419 + PINGROUP(29, EAST, blsp2_spi, _, qdss, _, _, _, _, _, _), 1420 + PINGROUP(30, EAST, hdmi_rcv, blsp2_spi, qdss, _, _, _, _, _, _), 1421 + PINGROUP(31, EAST, hdmi_cec, blsp_spi2, blsp_uart2_a, blsp_uim2_a, pwr_modem, _, _, _, _), 1422 + PINGROUP(32, EAST, hdmi_ddc, blsp_spi2, blsp_uart2_a, blsp_i2c2, pwr_nav, _, _, _, _), 1423 + PINGROUP(33, EAST, hdmi_ddc, blsp_spi2, blsp_uart2_a, blsp_i2c2, pwr_crypto, _, _, _, _), 1424 + PINGROUP(34, EAST, hdmi_hot, edp_hot, blsp_spi2, blsp_uart2_a, blsp_uim2_a, _, _, _, _), 1425 + PINGROUP(35, NORTH, pci_e0, jitter_bist, _, _, _, _, _, _, _), 1426 + PINGROUP(36, NORTH, pci_e0, agera_pll, _, atest_tsens, _, _, _, _, _), 1427 + PINGROUP(37, NORTH, agera_pll, _, _, _, _, _, _, _, _), 1428 + PINGROUP(38, WEST, usb_phy, _, _, _, _, _, _, _, _), 1429 + PINGROUP(39, WEST, lpass_slimbus, _, _, _, _, _, _, _, _), 1430 + PINGROUP(40, EAST, sd_write, tsif1_error, _, _, _, _, _, _, _), 1431 + PINGROUP(41, EAST, blsp_spi6, blsp_uart3_b, blsp_uim3_b, _, qdss, _, _, _, _), 1432 + PINGROUP(42, EAST, blsp_spi6, blsp_uart3_b, blsp_uim3_b, _, qdss, _, _, _, _), 1433 + PINGROUP(43, EAST, blsp_spi6, blsp_uart3_b, blsp_i2c6, _, qdss, _, _, _, _), 1434 + PINGROUP(44, EAST, blsp_spi6, blsp_uart3_b, blsp_i2c6, _, qdss, _, _, _, _), 1435 + PINGROUP(45, EAST, blsp_spi3, blsp_uart3_a, blsp_uim3_a, _, _, _, _, _, _), 1436 + PINGROUP(46, EAST, blsp_spi3, blsp_uart3_a, blsp_uim3_a, _, _, _, _, _, _), 1437 + PINGROUP(47, EAST, blsp_spi3, blsp_uart3_a, blsp_i2c3, _, _, _, _, _, _), 1438 + PINGROUP(48, EAST, blsp_spi3, blsp_uart3_a, blsp_i2c3, _, _, _, _, _, _), 1439 + PINGROUP(49, NORTH, blsp_spi9, blsp_uart9_a, blsp_uim9_a, blsp10_spi_b, qdss_cti0_a, _, _, _, _), 1440 + PINGROUP(50, NORTH, blsp_spi9, blsp_uart9_a, blsp_uim9_a, blsp10_spi_b, qdss_cti0_a, _, _, _, _), 1441 + PINGROUP(51, NORTH, blsp_spi9, blsp_uart9_a, blsp_i2c9, blsp10_spi_a, _, _, _, _, _), 1442 + PINGROUP(52, NORTH, blsp_spi9, blsp_uart9_a, blsp_i2c9, blsp10_spi_a, _, _, _, _, _), 1443 + PINGROUP(53, WEST, blsp_spi7, blsp_uart7_a, blsp_uim7_a, _, _, _, _, _, _), 1444 + PINGROUP(54, WEST, blsp_spi7, blsp_uart7_a, blsp_uim7_a, _, _, _, _, _, _), 1445 + PINGROUP(55, WEST, blsp_spi7, blsp_uart7_a, blsp_i2c7, _, _, _, _, _, _), 1446 + PINGROUP(56, WEST, blsp_spi7, blsp_uart7_a, blsp_i2c7, _, _, _, _, _, _), 1447 + PINGROUP(57, WEST, qua_mi2s, blsp10_spi, gcc_gp1_a, _, _, _, _, _, _), 1448 + PINGROUP(58, WEST, qua_mi2s, blsp_spi11, blsp_uart8_b, blsp_uim8_b, gcc_gp2_a, _, qdss_cti1_a, _, _), 1449 + PINGROUP(59, WEST, qua_mi2s, blsp_spi11, blsp_uart8_b, blsp_uim8_b, gcc_gp3_a, _, qdss_cti1_a, _, _), 1450 + PINGROUP(60, WEST, qua_mi2s, blsp_spi11, blsp_uart8_b, blsp_i2c11, cri_trng0, _, _, _, _), 1451 + PINGROUP(61, WEST, qua_mi2s, blsp_spi11, blsp_uart8_b, blsp_i2c11, cri_trng1, _, _, _, _), 1452 + PINGROUP(62, WEST, qua_mi2s, cri_trng, _, _, _, _, _, _, _), 1453 + PINGROUP(63, WEST, qua_mi2s, _, _, _, _, _, _, _, _), 1454 + PINGROUP(64, WEST, pri_mi2s, sp_cmu, _, _, _, _, _, _, _), 1455 + PINGROUP(65, WEST, pri_mi2s, blsp_spi10, blsp_uart7_b, blsp_uim7_b, _, _, _, _, _), 1456 + PINGROUP(66, WEST, pri_mi2s_ws, blsp_spi10, blsp_uart7_b, blsp_uim7_b, _, _, _, _, _), 1457 + PINGROUP(67, WEST, pri_mi2s, blsp_spi10, blsp_uart7_b, blsp_i2c10, _, _, _, _, _), 1458 + PINGROUP(68, WEST, pri_mi2s, blsp_spi10, blsp_uart7_b, blsp_i2c10, _, _, _, _, _), 1459 + PINGROUP(69, WEST, spkr_i2s, audio_ref, _, _, _, _, _, _, _), 1460 + PINGROUP(70, WEST, lpass_slimbus, spkr_i2s, blsp9_spi, _, _, _, _, _, _), 1461 + PINGROUP(71, WEST, lpass_slimbus, spkr_i2s, blsp9_spi, tsense_pwm1, tsense_pwm2, _, _, _, _), 1462 + PINGROUP(72, WEST, lpass_slimbus, spkr_i2s, blsp9_spi, _, _, _, _, _, _), 1463 + PINGROUP(73, WEST, btfm_slimbus, phase_flag, _, _, _, _, _, _, _), 1464 + PINGROUP(74, WEST, btfm_slimbus, ter_mi2s, phase_flag, _, _, _, _, _, _), 1465 + PINGROUP(75, WEST, ter_mi2s, phase_flag, qdss, _, _, _, _, _, _), 1466 + PINGROUP(76, WEST, ter_mi2s, phase_flag, qdss, _, _, _, _, _, _), 1467 + PINGROUP(77, WEST, ter_mi2s, phase_flag, qdss, _, _, _, _, _, _), 1468 + PINGROUP(78, WEST, ter_mi2s, gcc_gp1_b, _, _, _, _, _, _, _), 1469 + PINGROUP(79, WEST, sec_mi2s, _, qdss, _, _, _, _, _, _), 1470 + PINGROUP(80, WEST, sec_mi2s, _, qdss, _, _, _, _, _, _), 1471 + PINGROUP(81, WEST, sec_mi2s, blsp_spi12, blsp_uart9_b, blsp_uim9_b, gcc_gp2_b, _, _, _, _), 1472 + PINGROUP(82, WEST, sec_mi2s, blsp_spi12, blsp_uart9_b, blsp_uim9_b, gcc_gp3_b, _, _, _, _), 1473 + PINGROUP(83, WEST, sec_mi2s, blsp_spi12, blsp_uart9_b, blsp_i2c12, _, _, _, _, _), 1474 + PINGROUP(84, WEST, blsp_spi12, blsp_uart9_b, blsp_i2c12, _, _, _, _, _, _), 1475 + PINGROUP(85, EAST, blsp_spi5, blsp_uart2_b, blsp_uim2_b, _, _, _, _, _, _), 1476 + PINGROUP(86, EAST, blsp_spi5, blsp_uart2_b, blsp_uim2_b, _, _, _, _, _, _), 1477 + PINGROUP(87, EAST, blsp_spi5, blsp_uart2_b, blsp_i2c5, _, _, _, _, _, _), 1478 + PINGROUP(88, EAST, blsp_spi5, blsp_uart2_b, blsp_i2c5, _, _, _, _, _, _), 1479 + PINGROUP(89, EAST, tsif1_clk, phase_flag, _, _, _, _, _, _, _), 1480 + PINGROUP(90, EAST, tsif1_en, mdp_vsync0, mdp_vsync1, mdp_vsync2, mdp_vsync3, blsp1_spi, tgu_ch0, qdss_cti1_b, _), 1481 + PINGROUP(91, EAST, tsif1_data, sdc4_cmd, tgu_ch1, phase_flag, qdss_cti1_b, _, _, _, _), 1482 + PINGROUP(92, EAST, tsif2_error, sdc43, vfr_1, phase_flag, _, _, _, _, _), 1483 + PINGROUP(93, EAST, tsif2_clk, sdc4_clk, _, qdss, _, _, _, _, _), 1484 + PINGROUP(94, EAST, tsif2_en, sdc42, _, _, _, _, _, _, _), 1485 + PINGROUP(95, EAST, tsif2_data, sdc41, _, _, _, _, _, _, _), 1486 + PINGROUP(96, EAST, tsif2_sync, sdc40, phase_flag, _, _, _, _, _, _), 1487 + PINGROUP(97, WEST, _, mdp_vsync_b, ldo_en, _, _, _, _, _, _), 1488 + PINGROUP(98, WEST, _, mdp_vsync_b, ldo_update, _, _, _, _, _, _), 1489 + PINGROUP(99, WEST, _, _, _, _, _, _, _, _, _), 1490 + PINGROUP(100, WEST, _, _, blsp_uart8, _, _, _, _, _, _), 1491 + PINGROUP(101, WEST, _, blsp_uart8, _, _, _, _, _, _, _), 1492 + PINGROUP(102, WEST, _, blsp11_i2c, prng_rosc, _, _, _, _, _, _), 1493 + PINGROUP(103, WEST, _, blsp11_i2c, phase_flag, _, _, _, _, _, _), 1494 + PINGROUP(104, WEST, _, _, _, _, _, _, _, _, _), 1495 + PINGROUP(105, NORTH, uim2_data, _, _, _, _, _, _, _, _), 1496 + PINGROUP(106, NORTH, uim2_clk, _, _, _, _, _, _, _, _), 1497 + PINGROUP(107, NORTH, uim2_reset, _, _, _, _, _, _, _, _), 1498 + PINGROUP(108, NORTH, uim2_present, _, _, _, _, _, _, _, _), 1499 + PINGROUP(109, NORTH, uim1_data, _, _, _, _, _, _, _, _), 1500 + PINGROUP(110, NORTH, uim1_clk, _, _, _, _, _, _, _, _), 1501 + PINGROUP(111, NORTH, uim1_reset, _, _, _, _, _, _, _, _), 1502 + PINGROUP(112, NORTH, uim1_present, _, _, _, _, _, _, _, _), 1503 + PINGROUP(113, NORTH, uim_batt, _, _, _, _, _, _, _, _), 1504 + PINGROUP(114, WEST, _, _, phase_flag, _, _, _, _, _, _), 1505 + PINGROUP(115, WEST, _, nav_dr, phase_flag, _, _, _, _, _, _), 1506 + PINGROUP(116, WEST, phase_flag, _, _, _, _, _, _, _, _), 1507 + PINGROUP(117, EAST, phase_flag, qdss, atest_char, _, _, _, _, _, _), 1508 + PINGROUP(118, EAST, adsp_ext, phase_flag, qdss, atest_char, _, _, _, _, _), 1509 + PINGROUP(119, EAST, phase_flag, qdss, atest_char, _, _, _, _, _, _), 1510 + PINGROUP(120, EAST, phase_flag, qdss, atest_char, _, _, _, _, _, _), 1511 + PINGROUP(121, EAST, phase_flag, qdss, atest_char, _, _, _, _, _, _), 1512 + PINGROUP(122, EAST, phase_flag, qdss, _, _, _, _, _, _, _), 1513 + PINGROUP(123, EAST, phase_flag, qdss, _, _, _, _, _, _, _), 1514 + PINGROUP(124, EAST, phase_flag, qdss, _, _, _, _, _, _, _), 1515 + PINGROUP(125, EAST, phase_flag, _, _, _, _, _, _, _, _), 1516 + PINGROUP(126, EAST, phase_flag, _, _, _, _, _, _, _, _), 1517 + PINGROUP(127, WEST, _, _, _, _, _, _, _, _, _), 1518 + PINGROUP(128, WEST, modem_tsync, nav_pps, phase_flag, _, _, _, _, _, _), 1519 + PINGROUP(129, WEST, phase_flag, _, _, _, _, _, _, _, _), 1520 + PINGROUP(130, NORTH, qlink_request, phase_flag, _, _, _, _, _, _, _), 1521 + PINGROUP(131, NORTH, qlink_enable, phase_flag, _, _, _, _, _, _, _), 1522 + PINGROUP(132, WEST, _, phase_flag, _, _, _, _, _, _, _), 1523 + PINGROUP(133, WEST, phase_flag, _, _, _, _, _, _, _, _), 1524 + PINGROUP(134, WEST, phase_flag, _, _, _, _, _, _, _, _), 1525 + PINGROUP(135, WEST, _, pa_indicator, _, _, _, _, _, _, _), 1526 + PINGROUP(136, WEST, _, _, _, _, _, _, _, _, _), 1527 + PINGROUP(137, WEST, _, _, _, _, _, _, _, _, _), 1528 + PINGROUP(138, WEST, _, _, _, _, _, _, _, _, _), 1529 + PINGROUP(139, WEST, _, _, _, _, _, _, _, _, _), 1530 + PINGROUP(140, WEST, _, _, _, _, _, _, _, _, _), 1531 + PINGROUP(141, WEST, _, _, _, _, _, _, _, _, _), 1532 + PINGROUP(142, WEST, _, ssbi1, _, _, _, _, _, _, _), 1533 + PINGROUP(143, WEST, isense_dbg, _, _, _, _, _, _, _, _), 1534 + PINGROUP(144, WEST, mss_lte, _, _, _, _, _, _, _, _), 1535 + PINGROUP(145, WEST, mss_lte, _, _, _, _, _, _, _, _), 1536 + PINGROUP(146, WEST, _, _, _, _, _, _, _, _, _), 1537 + PINGROUP(147, WEST, _, _, _, _, _, _, _, _, _), 1538 + PINGROUP(148, WEST, _, _, _, _, _, _, _, _, _), 1539 + PINGROUP(149, WEST, _, _, _, _, _, _, _, _, _), 1540 + SDC_QDSD_PINGROUP(sdc2_clk, 0x999000, 14, 6), 1541 + SDC_QDSD_PINGROUP(sdc2_cmd, 0x999000, 11, 3), 1542 + SDC_QDSD_PINGROUP(sdc2_data, 0x999000, 9, 0), 1543 + UFS_RESET(ufs_reset, 0x19d000), 1544 + }; 1545 + 1546 + static const struct msm_pinctrl_soc_data msm8998_pinctrl = { 1547 + .pins = msm8998_pins, 1548 + .npins = ARRAY_SIZE(msm8998_pins), 1549 + .functions = msm8998_functions, 1550 + .nfunctions = ARRAY_SIZE(msm8998_functions), 1551 + .groups = msm8998_groups, 1552 + .ngroups = ARRAY_SIZE(msm8998_groups), 1553 + .ngpios = 150, 1554 + }; 1555 + 1556 + static int msm8998_pinctrl_probe(struct platform_device *pdev) 1557 + { 1558 + return msm_pinctrl_probe(pdev, &msm8998_pinctrl); 1559 + } 1560 + 1561 + static const struct of_device_id msm8998_pinctrl_of_match[] = { 1562 + { .compatible = "qcom,msm8998-pinctrl", }, 1563 + { }, 1564 + }; 1565 + 1566 + static struct platform_driver msm8998_pinctrl_driver = { 1567 + .driver = { 1568 + .name = "msm8998-pinctrl", 1569 + .owner = THIS_MODULE, 1570 + .of_match_table = msm8998_pinctrl_of_match, 1571 + }, 1572 + .probe = msm8998_pinctrl_probe, 1573 + .remove = msm_pinctrl_remove, 1574 + }; 1575 + 1576 + static int __init msm8998_pinctrl_init(void) 1577 + { 1578 + return platform_driver_register(&msm8998_pinctrl_driver); 1579 + } 1580 + arch_initcall(msm8998_pinctrl_init); 1581 + 1582 + static void __exit msm8998_pinctrl_exit(void) 1583 + { 1584 + platform_driver_unregister(&msm8998_pinctrl_driver); 1585 + } 1586 + module_exit(msm8998_pinctrl_exit); 1587 + 1588 + MODULE_DESCRIPTION("QTI msm8998 pinctrl driver"); 1589 + MODULE_LICENSE("GPL v2"); 1590 + MODULE_DEVICE_TABLE(of, msm8998_pinctrl_of_match);
+1
drivers/pinctrl/samsung/Kconfig
··· 1 + # SPDX-License-Identifier: GPL-2.0 1 2 # 2 3 # Samsung Pin control drivers 3 4 #
+14 -19
drivers/pinctrl/samsung/pinctrl-exynos-arm.c
··· 1 - /* 2 - * Exynos specific support for Samsung pinctrl/gpiolib driver with eint support. 3 - * 4 - * Copyright (c) 2012 Samsung Electronics Co., Ltd. 5 - * http://www.samsung.com 6 - * Copyright (c) 2012 Linaro Ltd 7 - * http://www.linaro.org 8 - * 9 - * Author: Thomas Abraham <thomas.ab@samsung.com> 10 - * 11 - * This program is free software; you can redistribute it and/or modify 12 - * it under the terms of the GNU General Public License as published by 13 - * the Free Software Foundation; either version 2 of the License, or 14 - * (at your option) any later version. 15 - * 16 - * This file contains the Samsung Exynos specific information required by the 17 - * the Samsung pinctrl/gpiolib driver. It also includes the implementation of 18 - * external gpio and wakeup interrupt support. 19 - */ 1 + // SPDX-License-Identifier: GPL-2.0+ 2 + // 3 + // Exynos specific support for Samsung pinctrl/gpiolib driver with eint support. 4 + // 5 + // Copyright (c) 2012 Samsung Electronics Co., Ltd. 6 + // http://www.samsung.com 7 + // Copyright (c) 2012 Linaro Ltd 8 + // http://www.linaro.org 9 + // 10 + // Author: Thomas Abraham <thomas.ab@samsung.com> 11 + // 12 + // This file contains the Samsung Exynos specific information required by the 13 + // the Samsung pinctrl/gpiolib driver. It also includes the implementation of 14 + // external gpio and wakeup interrupt support. 20 15 21 16 #include <linux/device.h> 22 17 #include <linux/of_address.h>
+14 -19
drivers/pinctrl/samsung/pinctrl-exynos-arm64.c
··· 1 - /* 2 - * Exynos ARMv8 specific support for Samsung pinctrl/gpiolib driver 3 - * with eint support. 4 - * 5 - * Copyright (c) 2012 Samsung Electronics Co., Ltd. 6 - * http://www.samsung.com 7 - * Copyright (c) 2012 Linaro Ltd 8 - * http://www.linaro.org 9 - * Copyright (c) 2017 Krzysztof Kozlowski <krzk@kernel.org> 10 - * 11 - * This program is free software; you can redistribute it and/or modify 12 - * it under the terms of the GNU General Public License as published by 13 - * the Free Software Foundation; either version 2 of the License, or 14 - * (at your option) any later version. 15 - * 16 - * This file contains the Samsung Exynos specific information required by the 17 - * the Samsung pinctrl/gpiolib driver. It also includes the implementation of 18 - * external gpio and wakeup interrupt support. 19 - */ 1 + // SPDX-License-Identifier: GPL-2.0+ 2 + // 3 + // Exynos ARMv8 specific support for Samsung pinctrl/gpiolib driver 4 + // with eint support. 5 + // 6 + // Copyright (c) 2012 Samsung Electronics Co., Ltd. 7 + // http://www.samsung.com 8 + // Copyright (c) 2012 Linaro Ltd 9 + // http://www.linaro.org 10 + // Copyright (c) 2017 Krzysztof Kozlowski <krzk@kernel.org> 11 + // 12 + // This file contains the Samsung Exynos specific information required by the 13 + // the Samsung pinctrl/gpiolib driver. It also includes the implementation of 14 + // external gpio and wakeup interrupt support. 20 15 21 16 #include <linux/slab.h> 22 17 #include <linux/soc/samsung/exynos-regs-pmu.h>
+14 -19
drivers/pinctrl/samsung/pinctrl-exynos.c
··· 1 - /* 2 - * Exynos specific support for Samsung pinctrl/gpiolib driver with eint support. 3 - * 4 - * Copyright (c) 2012 Samsung Electronics Co., Ltd. 5 - * http://www.samsung.com 6 - * Copyright (c) 2012 Linaro Ltd 7 - * http://www.linaro.org 8 - * 9 - * Author: Thomas Abraham <thomas.ab@samsung.com> 10 - * 11 - * This program is free software; you can redistribute it and/or modify 12 - * it under the terms of the GNU General Public License as published by 13 - * the Free Software Foundation; either version 2 of the License, or 14 - * (at your option) any later version. 15 - * 16 - * This file contains the Samsung Exynos specific information required by the 17 - * the Samsung pinctrl/gpiolib driver. It also includes the implementation of 18 - * external gpio and wakeup interrupt support. 19 - */ 1 + // SPDX-License-Identifier: GPL-2.0+ 2 + // 3 + // Exynos specific support for Samsung pinctrl/gpiolib driver with eint support. 4 + // 5 + // Copyright (c) 2012 Samsung Electronics Co., Ltd. 6 + // http://www.samsung.com 7 + // Copyright (c) 2012 Linaro Ltd 8 + // http://www.linaro.org 9 + // 10 + // Author: Thomas Abraham <thomas.ab@samsung.com> 11 + // 12 + // This file contains the Samsung Exynos specific information required by the 13 + // the Samsung pinctrl/gpiolib driver. It also includes the implementation of 14 + // external gpio and wakeup interrupt support. 20 15 21 16 #include <linux/device.h> 22 17 #include <linux/interrupt.h>
+1 -5
drivers/pinctrl/samsung/pinctrl-exynos.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0+ */ 1 2 /* 2 3 * Exynos specific definitions for Samsung pinctrl and gpiolib driver. 3 4 * ··· 11 10 * pinctrl/gpiolib interface drivers. 12 11 * 13 12 * Author: Thomas Abraham <thomas.ab@samsung.com> 14 - * 15 - * This program is free software; you can redistribute it and/or modify 16 - * it under the terms of the GNU General Public License as published by 17 - * the Free Software Foundation; either version 2 of the License, or 18 - * (at your option) any later version. 19 13 */ 20 14 21 15 #ifndef __PINCTRL_SAMSUNG_EXYNOS_H
+8 -13
drivers/pinctrl/samsung/pinctrl-exynos5440.c
··· 1 - /* 2 - * pin-controller/pin-mux/pin-config/gpio-driver for Samsung's EXYNOS5440 SoC. 3 - * 4 - * Author: Thomas Abraham <thomas.ab@samsung.com> 5 - * 6 - * Copyright (c) 2012 Samsung Electronics Co., Ltd. 7 - * http://www.samsung.com 8 - * 9 - * This program is free software; you can redistribute it and/or modify 10 - * it under the terms of the GNU General Public License as published by 11 - * the Free Software Foundation; either version 2 of the License, or 12 - * (at your option) any later version. 13 - */ 1 + // SPDX-License-Identifier: GPL-2.0+ 2 + // 3 + // pin-controller/pin-mux/pin-config/gpio-driver for Samsung's EXYNOS5440 SoC. 4 + // 5 + // Author: Thomas Abraham <thomas.ab@samsung.com> 6 + // 7 + // Copyright (c) 2012 Samsung Electronics Co., Ltd. 8 + // http://www.samsung.com 14 9 15 10 #include <linux/init.h> 16 11 #include <linux/platform_device.h>
+9 -14
drivers/pinctrl/samsung/pinctrl-s3c24xx.c
··· 1 - /* 2 - * S3C24XX specific support for Samsung pinctrl/gpiolib driver. 3 - * 4 - * Copyright (c) 2013 Heiko Stuebner <heiko@sntech.de> 5 - * 6 - * This program is free software; you can redistribute it and/or modify 7 - * it under the terms of the GNU General Public License as published by 8 - * the Free Software Foundation; either version 2 of the License, or 9 - * (at your option) any later version. 10 - * 11 - * This file contains the SamsungS3C24XX specific information required by the 12 - * Samsung pinctrl/gpiolib driver. It also includes the implementation of 13 - * external gpio and wakeup interrupt support. 14 - */ 1 + // SPDX-License-Identifier: GPL-2.0+ 2 + // 3 + // S3C24XX specific support for Samsung pinctrl/gpiolib driver. 4 + // 5 + // Copyright (c) 2013 Heiko Stuebner <heiko@sntech.de> 6 + // 7 + // This file contains the SamsungS3C24XX specific information required by the 8 + // Samsung pinctrl/gpiolib driver. It also includes the implementation of 9 + // external gpio and wakeup interrupt support. 15 10 16 11 #include <linux/init.h> 17 12 #include <linux/device.h>
+11 -16
drivers/pinctrl/samsung/pinctrl-s3c64xx.c
··· 1 - /* 2 - * S3C64xx specific support for pinctrl-samsung driver. 3 - * 4 - * Copyright (c) 2013 Tomasz Figa <tomasz.figa@gmail.com> 5 - * 6 - * Based on pinctrl-exynos.c, please see the file for original copyrights. 7 - * 8 - * This program is free software; you can redistribute it and/or modify 9 - * it under the terms of the GNU General Public License as published by 10 - * the Free Software Foundation; either version 2 of the License, or 11 - * (at your option) any later version. 12 - * 13 - * This file contains the Samsung S3C64xx specific information required by the 14 - * the Samsung pinctrl/gpiolib driver. It also includes the implementation of 15 - * external gpio and wakeup interrupt support. 16 - */ 1 + // SPDX-License-Identifier: GPL-2.0+ 2 + // 3 + // S3C64xx specific support for pinctrl-samsung driver. 4 + // 5 + // Copyright (c) 2013 Tomasz Figa <tomasz.figa@gmail.com> 6 + // 7 + // Based on pinctrl-exynos.c, please see the file for original copyrights. 8 + // 9 + // This file contains the Samsung S3C64xx specific information required by the 10 + // the Samsung pinctrl/gpiolib driver. It also includes the implementation of 11 + // external gpio and wakeup interrupt support. 17 12 18 13 #include <linux/init.h> 19 14 #include <linux/device.h>
+16 -21
drivers/pinctrl/samsung/pinctrl-samsung.c
··· 1 - /* 2 - * pin-controller/pin-mux/pin-config/gpio-driver for Samsung's SoC's. 3 - * 4 - * Copyright (c) 2012 Samsung Electronics Co., Ltd. 5 - * http://www.samsung.com 6 - * Copyright (c) 2012 Linaro Ltd 7 - * http://www.linaro.org 8 - * 9 - * Author: Thomas Abraham <thomas.ab@samsung.com> 10 - * 11 - * This program is free software; you can redistribute it and/or modify 12 - * it under the terms of the GNU General Public License as published by 13 - * the Free Software Foundation; either version 2 of the License, or 14 - * (at your option) any later version. 15 - * 16 - * This driver implements the Samsung pinctrl driver. It supports setting up of 17 - * pinmux and pinconf configurations. The gpiolib interface is also included. 18 - * External interrupt (gpio and wakeup) support are not included in this driver 19 - * but provides extensions to which platform specific implementation of the gpio 20 - * and wakeup interrupts can be hooked to. 21 - */ 1 + // SPDX-License-Identifier: GPL-2.0+ 2 + // 3 + // pin-controller/pin-mux/pin-config/gpio-driver for Samsung's SoC's. 4 + // 5 + // Copyright (c) 2012 Samsung Electronics Co., Ltd. 6 + // http://www.samsung.com 7 + // Copyright (c) 2012 Linaro Ltd 8 + // http://www.linaro.org 9 + // 10 + // Author: Thomas Abraham <thomas.ab@samsung.com> 11 + // 12 + // This driver implements the Samsung pinctrl driver. It supports setting up of 13 + // pinmux and pinconf configurations. The gpiolib interface is also included. 14 + // External interrupt (gpio and wakeup) support are not included in this driver 15 + // but provides extensions to which platform specific implementation of the gpio 16 + // and wakeup interrupts can be hooked to. 22 17 23 18 #include <linux/init.h> 24 19 #include <linux/platform_device.h>
+1 -5
drivers/pinctrl/samsung/pinctrl-samsung.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0+ */ 1 2 /* 2 3 * pin-controller/pin-mux/pin-config/gpio-driver for Samsung's SoC's. 3 4 * ··· 8 7 * http://www.linaro.org 9 8 * 10 9 * Author: Thomas Abraham <thomas.ab@samsung.com> 11 - * 12 - * This program is free software; you can redistribute it and/or modify 13 - * it under the terms of the GNU General Public License as published by 14 - * the Free Software Foundation; either version 2 of the License, or 15 - * (at your option) any later version. 16 10 */ 17 11 18 12 #ifndef __PINCTRL_SAMSUNG_H
+5
drivers/pinctrl/sh-pfc/Kconfig
··· 89 89 depends on ARCH_R8A7796 90 90 select PINCTRL_SH_PFC 91 91 92 + config PINCTRL_PFC_R8A77970 93 + def_bool y 94 + depends on ARCH_R8A77970 95 + select PINCTRL_SH_PFC 96 + 92 97 config PINCTRL_PFC_R8A77995 93 98 def_bool y 94 99 depends on ARCH_R8A77995
+1
drivers/pinctrl/sh-pfc/Makefile
··· 16 16 obj-$(CONFIG_PINCTRL_PFC_R8A7795) += pfc-r8a7795.o 17 17 obj-$(CONFIG_PINCTRL_PFC_R8A7795) += pfc-r8a7795-es1.o 18 18 obj-$(CONFIG_PINCTRL_PFC_R8A7796) += pfc-r8a7796.o 19 + obj-$(CONFIG_PINCTRL_PFC_R8A77970) += pfc-r8a77970.o 19 20 obj-$(CONFIG_PINCTRL_PFC_R8A77995) += pfc-r8a77995.o 20 21 obj-$(CONFIG_PINCTRL_PFC_SH7203) += pfc-sh7203.o 21 22 obj-$(CONFIG_PINCTRL_PFC_SH7264) += pfc-sh7264.o
+6
drivers/pinctrl/sh-pfc/core.c
··· 557 557 .data = &r8a7796_pinmux_info, 558 558 }, 559 559 #endif 560 + #ifdef CONFIG_PINCTRL_PFC_R8A77970 561 + { 562 + .compatible = "renesas,pfc-r8a77970", 563 + .data = &r8a77970_pinmux_info, 564 + }, 565 + #endif 560 566 #ifdef CONFIG_PINCTRL_PFC_R8A77995 561 567 { 562 568 .compatible = "renesas,pfc-r8a77995",
+60 -2
drivers/pinctrl/sh-pfc/pfc-r8a7791.c
··· 4145 4145 SSI_SCK9_B_MARK, SSI_WS9_B_MARK, 4146 4146 }; 4147 4147 4148 + /* - TPU -------------------------------------------------------------------- */ 4149 + static const unsigned int tpu_to0_pins[] = { 4150 + RCAR_GP_PIN(6, 14), 4151 + }; 4152 + static const unsigned int tpu_to0_mux[] = { 4153 + TPU_TO0_MARK, 4154 + }; 4155 + static const unsigned int tpu_to1_pins[] = { 4156 + RCAR_GP_PIN(1, 17), 4157 + }; 4158 + static const unsigned int tpu_to1_mux[] = { 4159 + TPU_TO1_MARK, 4160 + }; 4161 + static const unsigned int tpu_to2_pins[] = { 4162 + RCAR_GP_PIN(1, 18), 4163 + }; 4164 + static const unsigned int tpu_to2_mux[] = { 4165 + TPU_TO2_MARK, 4166 + }; 4167 + static const unsigned int tpu_to3_pins[] = { 4168 + RCAR_GP_PIN(1, 24), 4169 + }; 4170 + static const unsigned int tpu_to3_mux[] = { 4171 + TPU_TO3_MARK, 4172 + }; 4173 + 4148 4174 /* - USB0 ------------------------------------------------------------------- */ 4149 4175 static const unsigned int usb0_pins[] = { 4150 4176 RCAR_GP_PIN(7, 23), /* PWEN */ ··· 4457 4431 }; 4458 4432 4459 4433 static const struct { 4460 - struct sh_pfc_pin_group common[342]; 4434 + struct sh_pfc_pin_group common[346]; 4461 4435 struct sh_pfc_pin_group r8a779x[9]; 4462 4436 } pinmux_groups = { 4463 4437 .common = { ··· 4769 4743 SH_PFC_PIN_GROUP(ssi9_data_b), 4770 4744 SH_PFC_PIN_GROUP(ssi9_ctrl), 4771 4745 SH_PFC_PIN_GROUP(ssi9_ctrl_b), 4746 + SH_PFC_PIN_GROUP(tpu_to0), 4747 + SH_PFC_PIN_GROUP(tpu_to1), 4748 + SH_PFC_PIN_GROUP(tpu_to2), 4749 + SH_PFC_PIN_GROUP(tpu_to3), 4772 4750 SH_PFC_PIN_GROUP(usb0), 4773 4751 SH_PFC_PIN_GROUP(usb1), 4774 4752 VIN_DATA_PIN_GROUP(vin0_data, 24), ··· 4856 4826 "can0_data_d", 4857 4827 "can0_data_e", 4858 4828 "can0_data_f", 4829 + /* 4830 + * Retained for backwards compatibility, use can_clk_groups in new 4831 + * designs. 4832 + */ 4859 4833 "can_clk", 4860 4834 "can_clk_b", 4861 4835 "can_clk_c", ··· 4871 4837 "can1_data_b", 4872 4838 "can1_data_c", 4873 4839 "can1_data_d", 4840 + /* 4841 + * Retained for backwards compatibility, use can_clk_groups in new 4842 + * designs. 4843 + */ 4844 + "can_clk", 4845 + "can_clk_b", 4846 + "can_clk_c", 4847 + "can_clk_d", 4848 + }; 4849 + 4850 + /* 4851 + * can_clk_groups allows for independent configuration, use can_clk function 4852 + * in new designs. 4853 + */ 4854 + static const char * const can_clk_groups[] = { 4874 4855 "can_clk", 4875 4856 "can_clk_b", 4876 4857 "can_clk_c", ··· 5308 5259 "ssi9_ctrl_b", 5309 5260 }; 5310 5261 5262 + static const char * const tpu_groups[] = { 5263 + "tpu_to0", 5264 + "tpu_to1", 5265 + "tpu_to2", 5266 + "tpu_to3", 5267 + }; 5268 + 5311 5269 static const char * const usb0_groups[] = { 5312 5270 "usb0", 5313 5271 }; ··· 5364 5308 }; 5365 5309 5366 5310 static const struct { 5367 - struct sh_pfc_function common[56]; 5311 + struct sh_pfc_function common[58]; 5368 5312 struct sh_pfc_function r8a779x[2]; 5369 5313 } pinmux_functions = { 5370 5314 .common = { ··· 5372 5316 SH_PFC_FUNCTION(avb), 5373 5317 SH_PFC_FUNCTION(can0), 5374 5318 SH_PFC_FUNCTION(can1), 5319 + SH_PFC_FUNCTION(can_clk), 5375 5320 SH_PFC_FUNCTION(du), 5376 5321 SH_PFC_FUNCTION(du0), 5377 5322 SH_PFC_FUNCTION(du1), ··· 5420 5363 SH_PFC_FUNCTION(sdhi1), 5421 5364 SH_PFC_FUNCTION(sdhi2), 5422 5365 SH_PFC_FUNCTION(ssi), 5366 + SH_PFC_FUNCTION(tpu), 5423 5367 SH_PFC_FUNCTION(usb0), 5424 5368 SH_PFC_FUNCTION(usb1), 5425 5369 SH_PFC_FUNCTION(vin0),
+473
drivers/pinctrl/sh-pfc/pfc-r8a7794.c
··· 1608 1608 AVB_TX_EN_MARK, AVB_TX_ER_MARK, AVB_TX_CLK_MARK, 1609 1609 AVB_COL_MARK, 1610 1610 }; 1611 + 1612 + /* - CAN -------------------------------------------------------------------- */ 1613 + static const unsigned int can0_data_pins[] = { 1614 + /* TX, RX */ 1615 + RCAR_GP_PIN(6, 15), RCAR_GP_PIN(6, 14), 1616 + }; 1617 + 1618 + static const unsigned int can0_data_mux[] = { 1619 + CAN0_TX_MARK, CAN0_RX_MARK, 1620 + }; 1621 + 1622 + static const unsigned int can0_data_b_pins[] = { 1623 + /* TX, RX */ 1624 + RCAR_GP_PIN(3, 16), RCAR_GP_PIN(3, 15), 1625 + }; 1626 + 1627 + static const unsigned int can0_data_b_mux[] = { 1628 + CAN0_TX_B_MARK, CAN0_RX_B_MARK, 1629 + }; 1630 + 1631 + static const unsigned int can0_data_c_pins[] = { 1632 + /* TX, RX */ 1633 + RCAR_GP_PIN(2, 17), RCAR_GP_PIN(2, 16), 1634 + }; 1635 + 1636 + static const unsigned int can0_data_c_mux[] = { 1637 + CAN0_TX_C_MARK, CAN0_RX_C_MARK, 1638 + }; 1639 + 1640 + static const unsigned int can0_data_d_pins[] = { 1641 + /* TX, RX */ 1642 + RCAR_GP_PIN(5, 12), RCAR_GP_PIN(5, 11), 1643 + }; 1644 + 1645 + static const unsigned int can0_data_d_mux[] = { 1646 + CAN0_TX_D_MARK, CAN0_RX_D_MARK, 1647 + }; 1648 + 1649 + static const unsigned int can1_data_pins[] = { 1650 + /* TX, RX */ 1651 + RCAR_GP_PIN(6, 25), RCAR_GP_PIN(6, 24), 1652 + }; 1653 + 1654 + static const unsigned int can1_data_mux[] = { 1655 + CAN1_TX_MARK, CAN1_RX_MARK, 1656 + }; 1657 + 1658 + static const unsigned int can1_data_b_pins[] = { 1659 + /* TX, RX */ 1660 + RCAR_GP_PIN(1, 2), RCAR_GP_PIN(1, 1), 1661 + }; 1662 + 1663 + static const unsigned int can1_data_b_mux[] = { 1664 + CAN1_TX_B_MARK, CAN1_RX_B_MARK, 1665 + }; 1666 + 1667 + static const unsigned int can1_data_c_pins[] = { 1668 + /* TX, RX */ 1669 + RCAR_GP_PIN(5, 6), RCAR_GP_PIN(5, 5), 1670 + }; 1671 + 1672 + static const unsigned int can1_data_c_mux[] = { 1673 + CAN1_TX_C_MARK, CAN1_RX_C_MARK, 1674 + }; 1675 + 1676 + static const unsigned int can1_data_d_pins[] = { 1677 + /* TX, RX */ 1678 + RCAR_GP_PIN(3, 31), RCAR_GP_PIN(3, 30), 1679 + }; 1680 + 1681 + static const unsigned int can1_data_d_mux[] = { 1682 + CAN1_TX_D_MARK, CAN1_RX_D_MARK, 1683 + }; 1684 + 1685 + static const unsigned int can_clk_pins[] = { 1686 + /* CLK */ 1687 + RCAR_GP_PIN(3, 31), 1688 + }; 1689 + 1690 + static const unsigned int can_clk_mux[] = { 1691 + CAN_CLK_MARK, 1692 + }; 1693 + 1694 + static const unsigned int can_clk_b_pins[] = { 1695 + /* CLK */ 1696 + RCAR_GP_PIN(1, 23), 1697 + }; 1698 + 1699 + static const unsigned int can_clk_b_mux[] = { 1700 + CAN_CLK_B_MARK, 1701 + }; 1702 + 1703 + static const unsigned int can_clk_c_pins[] = { 1704 + /* CLK */ 1705 + RCAR_GP_PIN(1, 0), 1706 + }; 1707 + 1708 + static const unsigned int can_clk_c_mux[] = { 1709 + CAN_CLK_C_MARK, 1710 + }; 1711 + 1712 + static const unsigned int can_clk_d_pins[] = { 1713 + /* CLK */ 1714 + RCAR_GP_PIN(5, 0), 1715 + }; 1716 + 1717 + static const unsigned int can_clk_d_mux[] = { 1718 + CAN_CLK_D_MARK, 1719 + }; 1720 + 1611 1721 /* - DU --------------------------------------------------------------------- */ 1612 1722 static const unsigned int du0_rgb666_pins[] = { 1613 1723 /* R[7:2], G[7:2], B[7:2] */ ··· 2228 2118 static const unsigned int i2c4_e_mux[] = { 2229 2119 I2C4_SCL_E_MARK, I2C4_SDA_E_MARK, 2230 2120 }; 2121 + /* - I2C5 ------------------------------------------------------------------- */ 2122 + static const unsigned int i2c5_pins[] = { 2123 + /* SCL, SDA */ 2124 + RCAR_GP_PIN(4, 14), RCAR_GP_PIN(4, 15), 2125 + }; 2126 + static const unsigned int i2c5_mux[] = { 2127 + I2C5_SCL_MARK, I2C5_SDA_MARK, 2128 + }; 2129 + static const unsigned int i2c5_b_pins[] = { 2130 + /* SCL, SDA */ 2131 + RCAR_GP_PIN(0, 14), RCAR_GP_PIN(0, 15), 2132 + }; 2133 + static const unsigned int i2c5_b_mux[] = { 2134 + I2C5_SCL_B_MARK, I2C5_SDA_B_MARK, 2135 + }; 2136 + static const unsigned int i2c5_c_pins[] = { 2137 + /* SCL, SDA */ 2138 + RCAR_GP_PIN(4, 31), RCAR_GP_PIN(4, 30), 2139 + }; 2140 + static const unsigned int i2c5_c_mux[] = { 2141 + I2C5_SCL_C_MARK, I2C5_SDA_C_MARK, 2142 + }; 2143 + static const unsigned int i2c5_d_pins[] = { 2144 + /* SCL, SDA */ 2145 + RCAR_GP_PIN(3, 13), RCAR_GP_PIN(3, 14), 2146 + }; 2147 + static const unsigned int i2c5_d_mux[] = { 2148 + I2C5_SCL_D_MARK, I2C5_SDA_D_MARK, 2149 + }; 2231 2150 /* - INTC ------------------------------------------------------------------- */ 2232 2151 static const unsigned int intc_irq0_pins[] = { 2233 2152 /* IRQ0 */ ··· 2574 2435 }; 2575 2436 static const unsigned int msiof2_tx_b_mux[] = { 2576 2437 MSIOF2_TXD_B_MARK, 2438 + }; 2439 + /* - PWM -------------------------------------------------------------------- */ 2440 + static const unsigned int pwm0_pins[] = { 2441 + RCAR_GP_PIN(1, 14), 2442 + }; 2443 + static const unsigned int pwm0_mux[] = { 2444 + PWM0_MARK, 2445 + }; 2446 + static const unsigned int pwm0_b_pins[] = { 2447 + RCAR_GP_PIN(5, 3), 2448 + }; 2449 + static const unsigned int pwm0_b_mux[] = { 2450 + PWM0_B_MARK, 2451 + }; 2452 + static const unsigned int pwm1_pins[] = { 2453 + RCAR_GP_PIN(4, 5), 2454 + }; 2455 + static const unsigned int pwm1_mux[] = { 2456 + PWM1_MARK, 2457 + }; 2458 + static const unsigned int pwm1_b_pins[] = { 2459 + RCAR_GP_PIN(5, 10), 2460 + }; 2461 + static const unsigned int pwm1_b_mux[] = { 2462 + PWM1_B_MARK, 2463 + }; 2464 + static const unsigned int pwm1_c_pins[] = { 2465 + RCAR_GP_PIN(1, 18), 2466 + }; 2467 + static const unsigned int pwm1_c_mux[] = { 2468 + PWM1_C_MARK, 2469 + }; 2470 + static const unsigned int pwm2_pins[] = { 2471 + RCAR_GP_PIN(4, 10), 2472 + }; 2473 + static const unsigned int pwm2_mux[] = { 2474 + PWM2_MARK, 2475 + }; 2476 + static const unsigned int pwm2_b_pins[] = { 2477 + RCAR_GP_PIN(5, 17), 2478 + }; 2479 + static const unsigned int pwm2_b_mux[] = { 2480 + PWM2_B_MARK, 2481 + }; 2482 + static const unsigned int pwm2_c_pins[] = { 2483 + RCAR_GP_PIN(0, 13), 2484 + }; 2485 + static const unsigned int pwm2_c_mux[] = { 2486 + PWM2_C_MARK, 2487 + }; 2488 + static const unsigned int pwm3_pins[] = { 2489 + RCAR_GP_PIN(4, 13), 2490 + }; 2491 + static const unsigned int pwm3_mux[] = { 2492 + PWM3_MARK, 2493 + }; 2494 + static const unsigned int pwm3_b_pins[] = { 2495 + RCAR_GP_PIN(0, 16), 2496 + }; 2497 + static const unsigned int pwm3_b_mux[] = { 2498 + PWM3_B_MARK, 2499 + }; 2500 + static const unsigned int pwm4_pins[] = { 2501 + RCAR_GP_PIN(1, 3), 2502 + }; 2503 + static const unsigned int pwm4_mux[] = { 2504 + PWM4_MARK, 2505 + }; 2506 + static const unsigned int pwm4_b_pins[] = { 2507 + RCAR_GP_PIN(0, 21), 2508 + }; 2509 + static const unsigned int pwm4_b_mux[] = { 2510 + PWM4_B_MARK, 2511 + }; 2512 + static const unsigned int pwm5_pins[] = { 2513 + RCAR_GP_PIN(3, 30), 2514 + }; 2515 + static const unsigned int pwm5_mux[] = { 2516 + PWM5_MARK, 2517 + }; 2518 + static const unsigned int pwm5_b_pins[] = { 2519 + RCAR_GP_PIN(4, 0), 2520 + }; 2521 + static const unsigned int pwm5_b_mux[] = { 2522 + PWM5_B_MARK, 2523 + }; 2524 + static const unsigned int pwm5_c_pins[] = { 2525 + RCAR_GP_PIN(0, 10), 2526 + }; 2527 + static const unsigned int pwm5_c_mux[] = { 2528 + PWM5_C_MARK, 2529 + }; 2530 + static const unsigned int pwm6_pins[] = { 2531 + RCAR_GP_PIN(4, 8), 2532 + }; 2533 + static const unsigned int pwm6_mux[] = { 2534 + PWM6_MARK, 2535 + }; 2536 + static const unsigned int pwm6_b_pins[] = { 2537 + RCAR_GP_PIN(0, 7), 2538 + }; 2539 + static const unsigned int pwm6_b_mux[] = { 2540 + PWM6_B_MARK, 2577 2541 }; 2578 2542 /* - QSPI ------------------------------------------------------------------- */ 2579 2543 static const unsigned int qspi_ctrl_pins[] = { ··· 3522 3280 static const unsigned int ssi9_ctrl_b_mux[] = { 3523 3281 SSI_SCK9_B_MARK, SSI_WS9_B_MARK, 3524 3282 }; 3283 + /* - TPU -------------------------------------------------------------------- */ 3284 + static const unsigned int tpu_to0_pins[] = { 3285 + RCAR_GP_PIN(3, 31), 3286 + }; 3287 + static const unsigned int tpu_to0_mux[] = { 3288 + TPUTO0_MARK, 3289 + }; 3290 + static const unsigned int tpu_to0_b_pins[] = { 3291 + RCAR_GP_PIN(3, 30), 3292 + }; 3293 + static const unsigned int tpu_to0_b_mux[] = { 3294 + TPUTO0_B_MARK, 3295 + }; 3296 + static const unsigned int tpu_to0_c_pins[] = { 3297 + RCAR_GP_PIN(1, 18), 3298 + }; 3299 + static const unsigned int tpu_to0_c_mux[] = { 3300 + TPUTO0_C_MARK, 3301 + }; 3302 + static const unsigned int tpu_to1_pins[] = { 3303 + RCAR_GP_PIN(4, 9), 3304 + }; 3305 + static const unsigned int tpu_to1_mux[] = { 3306 + TPUTO1_MARK, 3307 + }; 3308 + static const unsigned int tpu_to1_b_pins[] = { 3309 + RCAR_GP_PIN(4, 0), 3310 + }; 3311 + static const unsigned int tpu_to1_b_mux[] = { 3312 + TPUTO1_B_MARK, 3313 + }; 3314 + static const unsigned int tpu_to1_c_pins[] = { 3315 + RCAR_GP_PIN(4, 4), 3316 + }; 3317 + static const unsigned int tpu_to1_c_mux[] = { 3318 + TPUTO1_C_MARK, 3319 + }; 3320 + static const unsigned int tpu_to2_pins[] = { 3321 + RCAR_GP_PIN(1, 3), 3322 + }; 3323 + static const unsigned int tpu_to2_mux[] = { 3324 + TPUTO2_MARK, 3325 + }; 3326 + static const unsigned int tpu_to2_b_pins[] = { 3327 + RCAR_GP_PIN(1, 0), 3328 + }; 3329 + static const unsigned int tpu_to2_b_mux[] = { 3330 + TPUTO2_B_MARK, 3331 + }; 3332 + static const unsigned int tpu_to2_c_pins[] = { 3333 + RCAR_GP_PIN(0, 22), 3334 + }; 3335 + static const unsigned int tpu_to2_c_mux[] = { 3336 + TPUTO2_C_MARK, 3337 + }; 3338 + static const unsigned int tpu_to3_pins[] = { 3339 + RCAR_GP_PIN(1, 14), 3340 + }; 3341 + static const unsigned int tpu_to3_mux[] = { 3342 + TPUTO3_MARK, 3343 + }; 3344 + static const unsigned int tpu_to3_b_pins[] = { 3345 + RCAR_GP_PIN(1, 13), 3346 + }; 3347 + static const unsigned int tpu_to3_b_mux[] = { 3348 + TPUTO3_B_MARK, 3349 + }; 3350 + static const unsigned int tpu_to3_c_pins[] = { 3351 + RCAR_GP_PIN(0, 21), 3352 + }; 3353 + static const unsigned int tpu_to3_c_mux[] = { 3354 + TPUTO3_C_MARK, 3355 + }; 3525 3356 /* - USB0 ------------------------------------------------------------------- */ 3526 3357 static const unsigned int usb0_pins[] = { 3527 3358 RCAR_GP_PIN(5, 24), /* PWEN */ ··· 3774 3459 SH_PFC_PIN_GROUP(avb_mdio), 3775 3460 SH_PFC_PIN_GROUP(avb_mii), 3776 3461 SH_PFC_PIN_GROUP(avb_gmii), 3462 + SH_PFC_PIN_GROUP(can0_data), 3463 + SH_PFC_PIN_GROUP(can0_data_b), 3464 + SH_PFC_PIN_GROUP(can0_data_c), 3465 + SH_PFC_PIN_GROUP(can0_data_d), 3466 + SH_PFC_PIN_GROUP(can1_data), 3467 + SH_PFC_PIN_GROUP(can1_data_b), 3468 + SH_PFC_PIN_GROUP(can1_data_c), 3469 + SH_PFC_PIN_GROUP(can1_data_d), 3470 + SH_PFC_PIN_GROUP(can_clk), 3471 + SH_PFC_PIN_GROUP(can_clk_b), 3472 + SH_PFC_PIN_GROUP(can_clk_c), 3473 + SH_PFC_PIN_GROUP(can_clk_d), 3777 3474 SH_PFC_PIN_GROUP(du0_rgb666), 3778 3475 SH_PFC_PIN_GROUP(du0_rgb888), 3779 3476 SH_PFC_PIN_GROUP(du0_clk0_out), ··· 3850 3523 SH_PFC_PIN_GROUP(i2c4_c), 3851 3524 SH_PFC_PIN_GROUP(i2c4_d), 3852 3525 SH_PFC_PIN_GROUP(i2c4_e), 3526 + SH_PFC_PIN_GROUP(i2c5), 3527 + SH_PFC_PIN_GROUP(i2c5_b), 3528 + SH_PFC_PIN_GROUP(i2c5_c), 3529 + SH_PFC_PIN_GROUP(i2c5_d), 3853 3530 SH_PFC_PIN_GROUP(intc_irq0), 3854 3531 SH_PFC_PIN_GROUP(intc_irq1), 3855 3532 SH_PFC_PIN_GROUP(intc_irq2), ··· 3898 3567 SH_PFC_PIN_GROUP(msiof2_ss2_b), 3899 3568 SH_PFC_PIN_GROUP(msiof2_rx_b), 3900 3569 SH_PFC_PIN_GROUP(msiof2_tx_b), 3570 + SH_PFC_PIN_GROUP(pwm0), 3571 + SH_PFC_PIN_GROUP(pwm0_b), 3572 + SH_PFC_PIN_GROUP(pwm1), 3573 + SH_PFC_PIN_GROUP(pwm1_b), 3574 + SH_PFC_PIN_GROUP(pwm1_c), 3575 + SH_PFC_PIN_GROUP(pwm2), 3576 + SH_PFC_PIN_GROUP(pwm2_b), 3577 + SH_PFC_PIN_GROUP(pwm2_c), 3578 + SH_PFC_PIN_GROUP(pwm3), 3579 + SH_PFC_PIN_GROUP(pwm3_b), 3580 + SH_PFC_PIN_GROUP(pwm4), 3581 + SH_PFC_PIN_GROUP(pwm4_b), 3582 + SH_PFC_PIN_GROUP(pwm5), 3583 + SH_PFC_PIN_GROUP(pwm5_b), 3584 + SH_PFC_PIN_GROUP(pwm5_c), 3585 + SH_PFC_PIN_GROUP(pwm6), 3586 + SH_PFC_PIN_GROUP(pwm6_b), 3901 3587 SH_PFC_PIN_GROUP(qspi_ctrl), 3902 3588 SH_PFC_PIN_GROUP(qspi_data2), 3903 3589 SH_PFC_PIN_GROUP(qspi_data4), ··· 4032 3684 SH_PFC_PIN_GROUP(ssi9_ctrl), 4033 3685 SH_PFC_PIN_GROUP(ssi9_data_b), 4034 3686 SH_PFC_PIN_GROUP(ssi9_ctrl_b), 3687 + SH_PFC_PIN_GROUP(tpu_to0), 3688 + SH_PFC_PIN_GROUP(tpu_to0_b), 3689 + SH_PFC_PIN_GROUP(tpu_to0_c), 3690 + SH_PFC_PIN_GROUP(tpu_to1), 3691 + SH_PFC_PIN_GROUP(tpu_to1_b), 3692 + SH_PFC_PIN_GROUP(tpu_to1_c), 3693 + SH_PFC_PIN_GROUP(tpu_to2), 3694 + SH_PFC_PIN_GROUP(tpu_to2_b), 3695 + SH_PFC_PIN_GROUP(tpu_to2_c), 3696 + SH_PFC_PIN_GROUP(tpu_to3), 3697 + SH_PFC_PIN_GROUP(tpu_to3_b), 3698 + SH_PFC_PIN_GROUP(tpu_to3_c), 4035 3699 SH_PFC_PIN_GROUP(usb0), 4036 3700 SH_PFC_PIN_GROUP(usb1), 4037 3701 VIN_DATA_PIN_GROUP(vin0_data, 24), ··· 4089 3729 "avb_mdio", 4090 3730 "avb_mii", 4091 3731 "avb_gmii", 3732 + }; 3733 + 3734 + static const char * const can0_groups[] = { 3735 + "can0_data", 3736 + "can0_data_b", 3737 + "can0_data_c", 3738 + "can0_data_d", 3739 + /* 3740 + * Retained for backwards compatibility, use can_clk_groups in new 3741 + * designs. 3742 + */ 3743 + "can_clk", 3744 + "can_clk_b", 3745 + "can_clk_c", 3746 + "can_clk_d", 3747 + }; 3748 + 3749 + static const char * const can1_groups[] = { 3750 + "can1_data", 3751 + "can1_data_b", 3752 + "can1_data_c", 3753 + "can1_data_d", 3754 + /* 3755 + * Retained for backwards compatibility, use can_clk_groups in new 3756 + * designs. 3757 + */ 3758 + "can_clk", 3759 + "can_clk_b", 3760 + "can_clk_c", 3761 + "can_clk_d", 3762 + }; 3763 + 3764 + /* 3765 + * can_clk_groups allows for independent configuration, use can_clk function 3766 + * in new designs. 3767 + */ 3768 + static const char * const can_clk_groups[] = { 3769 + "can_clk", 3770 + "can_clk_b", 3771 + "can_clk_c", 3772 + "can_clk_d", 4092 3773 }; 4093 3774 4094 3775 static const char * const du0_groups[] = { ··· 4229 3828 "i2c4_e", 4230 3829 }; 4231 3830 3831 + static const char * const i2c5_groups[] = { 3832 + "i2c5", 3833 + "i2c5_b", 3834 + "i2c5_c", 3835 + "i2c5_d", 3836 + }; 3837 + 4232 3838 static const char * const intc_groups[] = { 4233 3839 "intc_irq0", 4234 3840 "intc_irq1", ··· 4293 3885 "msiof2_ss2_b", 4294 3886 "msiof2_rx_b", 4295 3887 "msiof2_tx_b", 3888 + }; 3889 + 3890 + static const char * const pwm0_groups[] = { 3891 + "pwm0", 3892 + "pwm0_b", 3893 + }; 3894 + 3895 + static const char * const pwm1_groups[] = { 3896 + "pwm1", 3897 + "pwm1_b", 3898 + "pwm1_c", 3899 + }; 3900 + 3901 + static const char * const pwm2_groups[] = { 3902 + "pwm2", 3903 + "pwm2_b", 3904 + "pwm2_c", 3905 + }; 3906 + 3907 + static const char * const pwm3_groups[] = { 3908 + "pwm3", 3909 + "pwm3_b", 3910 + }; 3911 + 3912 + static const char * const pwm4_groups[] = { 3913 + "pwm4", 3914 + "pwm4_b", 3915 + }; 3916 + 3917 + static const char * const pwm5_groups[] = { 3918 + "pwm5", 3919 + "pwm5_b", 3920 + "pwm5_c", 3921 + }; 3922 + 3923 + static const char * const pwm6_groups[] = { 3924 + "pwm6", 3925 + "pwm6_b", 4296 3926 }; 4297 3927 4298 3928 static const char * const qspi_groups[] = { ··· 4513 4067 "ssi9_ctrl_b", 4514 4068 }; 4515 4069 4070 + static const char * const tpu_groups[] = { 4071 + "tpu_to0", 4072 + "tpu_to0_b", 4073 + "tpu_to0_c", 4074 + "tpu_to1", 4075 + "tpu_to1_b", 4076 + "tpu_to1_c", 4077 + "tpu_to2", 4078 + "tpu_to2_b", 4079 + "tpu_to2_c", 4080 + "tpu_to3", 4081 + "tpu_to3_b", 4082 + "tpu_to3_c", 4083 + }; 4084 + 4516 4085 static const char * const usb0_groups[] = { 4517 4086 "usb0", 4518 4087 }; ··· 4563 4102 static const struct sh_pfc_function pinmux_functions[] = { 4564 4103 SH_PFC_FUNCTION(audio_clk), 4565 4104 SH_PFC_FUNCTION(avb), 4105 + SH_PFC_FUNCTION(can0), 4106 + SH_PFC_FUNCTION(can1), 4107 + SH_PFC_FUNCTION(can_clk), 4566 4108 SH_PFC_FUNCTION(du0), 4567 4109 SH_PFC_FUNCTION(du1), 4568 4110 SH_PFC_FUNCTION(eth), ··· 4577 4113 SH_PFC_FUNCTION(i2c2), 4578 4114 SH_PFC_FUNCTION(i2c3), 4579 4115 SH_PFC_FUNCTION(i2c4), 4116 + SH_PFC_FUNCTION(i2c5), 4580 4117 SH_PFC_FUNCTION(intc), 4581 4118 SH_PFC_FUNCTION(mmc), 4582 4119 SH_PFC_FUNCTION(msiof0), 4583 4120 SH_PFC_FUNCTION(msiof1), 4584 4121 SH_PFC_FUNCTION(msiof2), 4122 + SH_PFC_FUNCTION(pwm0), 4123 + SH_PFC_FUNCTION(pwm1), 4124 + SH_PFC_FUNCTION(pwm2), 4125 + SH_PFC_FUNCTION(pwm3), 4126 + SH_PFC_FUNCTION(pwm4), 4127 + SH_PFC_FUNCTION(pwm5), 4128 + SH_PFC_FUNCTION(pwm6), 4585 4129 SH_PFC_FUNCTION(qspi), 4586 4130 SH_PFC_FUNCTION(scif0), 4587 4131 SH_PFC_FUNCTION(scif1), ··· 4611 4139 SH_PFC_FUNCTION(sdhi1), 4612 4140 SH_PFC_FUNCTION(sdhi2), 4613 4141 SH_PFC_FUNCTION(ssi), 4142 + SH_PFC_FUNCTION(tpu), 4614 4143 SH_PFC_FUNCTION(usb0), 4615 4144 SH_PFC_FUNCTION(usb1), 4616 4145 SH_PFC_FUNCTION(vin0),
+1 -1
drivers/pinctrl/sh-pfc/pfc-r8a7795-es1.c
··· 1397 1397 PINMUX_IPSR_MSEL(IP16_27_24, AUDIO_CLKOUT_B, SEL_ADG_1), 1398 1398 PINMUX_IPSR_MSEL(IP16_27_24, SSI_SCK2_B, SEL_SSI_1), 1399 1399 PINMUX_IPSR_MSEL(IP16_27_24, TS_SDEN1_D, SEL_TSIF1_3), 1400 - PINMUX_IPSR_MSEL(IP16_27_24, STP_ISEN_1_D, SEL_SSP1_1_2), 1400 + PINMUX_IPSR_MSEL(IP16_27_24, STP_ISEN_1_D, SEL_SSP1_1_3), 1401 1401 PINMUX_IPSR_MSEL(IP16_27_24, STP_OPWM_0_E, SEL_SSP1_0_4), 1402 1402 PINMUX_IPSR_MSEL(IP16_27_24, RIF3_D0_B, SEL_DRIF3_1), 1403 1403 PINMUX_IPSR_MSEL(IP16_27_24, TCLK2_B, SEL_TIMER_TMU_1),
+151 -42
drivers/pinctrl/sh-pfc/pfc-r8a7795.c
··· 20 20 21 21 #define CPU_ALL_PORT(fn, sfx) \ 22 22 PORT_GP_CFG_16(0, fn, sfx, CFG_FLAGS), \ 23 - PORT_GP_CFG_28(1, fn, sfx, CFG_FLAGS), \ 23 + PORT_GP_CFG_29(1, fn, sfx, CFG_FLAGS), \ 24 24 PORT_GP_CFG_15(2, fn, sfx, CFG_FLAGS), \ 25 25 PORT_GP_CFG_12(3, fn, sfx, CFG_FLAGS | SH_PFC_PIN_CFG_IO_VOLTAGE), \ 26 26 PORT_GP_CFG_1(3, 12, fn, sfx, CFG_FLAGS), \ ··· 55 55 #define GPSR0_0 F_(D0, IP5_15_12) 56 56 57 57 /* GPSR1 */ 58 + #define GPSR1_28 FM(CLKOUT) 58 59 #define GPSR1_27 F_(EX_WAIT0_A, IP5_11_8) 59 60 #define GPSR1_26 F_(WE1_N, IP5_7_4) 60 61 #define GPSR1_25 F_(WE0_N, IP5_3_0) ··· 158 157 #define GPSR5_11 F_(RX2_A, IP13_7_4) 159 158 #define GPSR5_10 F_(TX2_A, IP13_3_0) 160 159 #define GPSR5_9 F_(SCK2, IP12_31_28) 161 - #define GPSR5_8 F_(RTS1_N_TANS, IP12_27_24) 160 + #define GPSR5_8 F_(RTS1_N, IP12_27_24) 162 161 #define GPSR5_7 F_(CTS1_N, IP12_23_20) 163 162 #define GPSR5_6 F_(TX1_A, IP12_19_16) 164 163 #define GPSR5_5 F_(RX1_A, IP12_15_12) 165 - #define GPSR5_4 F_(RTS0_N_TANS, IP12_11_8) 164 + #define GPSR5_4 F_(RTS0_N, IP12_11_8) 166 165 #define GPSR5_3 F_(CTS0_N, IP12_7_4) 167 166 #define GPSR5_2 F_(TX0, IP12_3_0) 168 167 #define GPSR5_1 F_(RX0, IP11_31_28) ··· 215 214 #define IP0_11_8 FM(AVB_PHY_INT) F_(0, 0) FM(MSIOF2_SYNC_C) FM(RX4_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 216 215 #define IP0_15_12 FM(AVB_LINK) F_(0, 0) FM(MSIOF2_SCK_C) FM(TX4_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 217 216 #define IP0_19_16 FM(AVB_AVTP_MATCH_A) F_(0, 0) FM(MSIOF2_RXD_C) FM(CTS4_N_A) F_(0, 0) FM(FSCLKST2_N_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 218 - #define IP0_23_20 FM(AVB_AVTP_CAPTURE_A) F_(0, 0) FM(MSIOF2_TXD_C) FM(RTS4_N_TANS_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 217 + #define IP0_23_20 FM(AVB_AVTP_CAPTURE_A) F_(0, 0) FM(MSIOF2_TXD_C) FM(RTS4_N_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 219 218 #define IP0_27_24 FM(IRQ0) FM(QPOLB) F_(0, 0) FM(DU_CDE) FM(VI4_DATA0_B) FM(CAN0_TX_B) FM(CANFD0_TX_B) FM(MSIOF3_SS2_E) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 220 219 #define IP0_31_28 FM(IRQ1) FM(QPOLA) F_(0, 0) FM(DU_DISP) FM(VI4_DATA1_B) FM(CAN0_RX_B) FM(CANFD0_RX_B) FM(MSIOF3_SS1_E) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 221 220 #define IP1_3_0 FM(IRQ2) FM(QCPV_QDE) F_(0, 0) FM(DU_EXODDF_DU_ODDF_DISP_CDE) FM(VI4_DATA2_B) F_(0, 0) F_(0, 0) FM(MSIOF3_SYNC_E) F_(0, 0) FM(PWM3_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 222 - #define IP1_7_4 FM(IRQ3) FM(QSTVB_QVE) FM(A25) FM(DU_DOTCLKOUT1) FM(VI4_DATA3_B) F_(0, 0) F_(0, 0) FM(MSIOF3_SCK_E) F_(0, 0) FM(PWM4_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 223 - #define IP1_11_8 FM(IRQ4) FM(QSTH_QHS) FM(A24) FM(DU_EXHSYNC_DU_HSYNC) FM(VI4_DATA4_B) F_(0, 0) F_(0, 0) FM(MSIOF3_RXD_E) F_(0, 0) FM(PWM5_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 224 - #define IP1_15_12 FM(IRQ5) FM(QSTB_QHE) FM(A23) FM(DU_EXVSYNC_DU_VSYNC) FM(VI4_DATA5_B) FM(FSCLKST2_N_B) F_(0, 0) FM(MSIOF3_TXD_E) F_(0, 0) FM(PWM6_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 225 - #define IP1_19_16 FM(PWM0) FM(AVB_AVTP_PPS)FM(A22) F_(0, 0) FM(VI4_DATA6_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) FM(IECLK_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 226 - #define IP1_23_20 FM(PWM1_A) F_(0, 0) FM(A21) FM(HRX3_D) FM(VI4_DATA7_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) FM(IERX_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 227 - #define IP1_27_24 FM(PWM2_A) F_(0, 0) FM(A20) FM(HTX3_D) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) FM(IETX_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 221 + #define IP1_7_4 FM(IRQ3) FM(QSTVB_QVE) F_(0, 0) FM(DU_DOTCLKOUT1) FM(VI4_DATA3_B) F_(0, 0) F_(0, 0) FM(MSIOF3_SCK_E) F_(0, 0) FM(PWM4_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 222 + #define IP1_11_8 FM(IRQ4) FM(QSTH_QHS) F_(0, 0) FM(DU_EXHSYNC_DU_HSYNC) FM(VI4_DATA4_B) F_(0, 0) F_(0, 0) FM(MSIOF3_RXD_E) F_(0, 0) FM(PWM5_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 223 + #define IP1_15_12 FM(IRQ5) FM(QSTB_QHE) F_(0, 0) FM(DU_EXVSYNC_DU_VSYNC) FM(VI4_DATA5_B) FM(FSCLKST2_N_B) F_(0, 0) FM(MSIOF3_TXD_E) F_(0, 0) FM(PWM6_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 224 + #define IP1_19_16 FM(PWM0) FM(AVB_AVTP_PPS)F_(0, 0) F_(0, 0) FM(VI4_DATA6_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) FM(IECLK_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 225 + #define IP1_23_20 FM(PWM1_A) F_(0, 0) F_(0, 0) FM(HRX3_D) FM(VI4_DATA7_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) FM(IERX_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 226 + #define IP1_27_24 FM(PWM2_A) F_(0, 0) F_(0, 0) FM(HTX3_D) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) FM(IETX_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 228 227 #define IP1_31_28 FM(A0) FM(LCDOUT16) FM(MSIOF3_SYNC_B) F_(0, 0) FM(VI4_DATA8) F_(0, 0) FM(DU_DB0) F_(0, 0) F_(0, 0) FM(PWM3_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 229 228 #define IP2_3_0 FM(A1) FM(LCDOUT17) FM(MSIOF3_TXD_B) F_(0, 0) FM(VI4_DATA9) F_(0, 0) FM(DU_DB1) F_(0, 0) F_(0, 0) FM(PWM4_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 230 229 #define IP2_7_4 FM(A2) FM(LCDOUT18) FM(MSIOF3_SCK_B) F_(0, 0) FM(VI4_DATA10) F_(0, 0) FM(DU_DB2) F_(0, 0) F_(0, 0) FM(PWM5_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) ··· 237 236 #define IP2_27_24 FM(A7) FM(LCDOUT23) FM(MSIOF2_SS2_A) FM(TX4_B) FM(VI4_DATA15) FM(VI5_DATA15) FM(DU_DB7) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 238 237 #define IP2_31_28 FM(A8) FM(RX3_B) FM(MSIOF2_SYNC_A) FM(HRX4_B) F_(0, 0) F_(0, 0) F_(0, 0) FM(SDA6_A) FM(AVB_AVTP_MATCH_B) FM(PWM1_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 239 238 #define IP3_3_0 FM(A9) F_(0, 0) FM(MSIOF2_SCK_A) FM(CTS4_N_B) F_(0, 0) FM(VI5_VSYNC_N) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 240 - #define IP3_7_4 FM(A10) F_(0, 0) FM(MSIOF2_RXD_A) FM(RTS4_N_TANS_B) F_(0, 0) FM(VI5_HSYNC_N) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 239 + #define IP3_7_4 FM(A10) F_(0, 0) FM(MSIOF2_RXD_A) FM(RTS4_N_B) F_(0, 0) FM(VI5_HSYNC_N) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 241 240 #define IP3_11_8 FM(A11) FM(TX3_B) FM(MSIOF2_TXD_A) FM(HTX4_B) FM(HSCK4) FM(VI5_FIELD) F_(0, 0) FM(SCL6_A) FM(AVB_AVTP_CAPTURE_B) FM(PWM2_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 242 241 #define IP3_15_12 FM(A12) FM(LCDOUT12) FM(MSIOF3_SCK_C) F_(0, 0) FM(HRX4_A) FM(VI5_DATA8) FM(DU_DG4) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 243 242 #define IP3_19_16 FM(A13) FM(LCDOUT13) FM(MSIOF3_SYNC_C) F_(0, 0) FM(HTX4_A) FM(VI5_DATA9) FM(DU_DG5) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) ··· 253 252 #define IP4_27_24 FM(RD_N) F_(0, 0) FM(MSIOF3_SYNC_D) FM(RX3_A) FM(HRX3_A) F_(0, 0) F_(0, 0) F_(0, 0) FM(CAN0_TX_A) FM(CANFD0_TX_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 254 253 #define IP4_31_28 FM(RD_WR_N) F_(0, 0) FM(MSIOF3_RXD_D) FM(TX3_A) FM(HTX3_A) F_(0, 0) F_(0, 0) F_(0, 0) FM(CAN0_RX_A) FM(CANFD0_RX_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 255 254 #define IP5_3_0 FM(WE0_N) F_(0, 0) FM(MSIOF3_TXD_D) FM(CTS3_N) FM(HCTS3_N) F_(0, 0) F_(0, 0) FM(SCL6_B) FM(CAN_CLK) F_(0, 0) FM(IECLK_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 256 - #define IP5_7_4 FM(WE1_N) F_(0, 0) FM(MSIOF3_SS1_D) FM(RTS3_N_TANS) FM(HRTS3_N) F_(0, 0) F_(0, 0) FM(SDA6_B) FM(CAN1_RX) FM(CANFD1_RX) FM(IERX_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 255 + #define IP5_7_4 FM(WE1_N) F_(0, 0) FM(MSIOF3_SS1_D) FM(RTS3_N) FM(HRTS3_N) F_(0, 0) F_(0, 0) FM(SDA6_B) FM(CAN1_RX) FM(CANFD1_RX) FM(IERX_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 257 256 #define IP5_11_8 FM(EX_WAIT0_A) FM(QCLK) F_(0, 0) F_(0, 0) FM(VI4_CLK) F_(0, 0) FM(DU_DOTCLKOUT0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 258 257 #define IP5_15_12 FM(D0) FM(MSIOF2_SS1_B)FM(MSIOF3_SCK_A) F_(0, 0) FM(VI4_DATA16) FM(VI5_DATA0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 259 258 #define IP5_19_16 FM(D1) FM(MSIOF2_SS2_B)FM(MSIOF3_SYNC_A) F_(0, 0) FM(VI4_DATA17) FM(VI5_DATA1) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) ··· 266 265 #define IP6_15_12 FM(D8) FM(LCDOUT0) FM(MSIOF2_SCK_D) FM(SCK4_C) FM(VI4_DATA0_A) F_(0, 0) FM(DU_DR0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 267 266 #define IP6_19_16 FM(D9) FM(LCDOUT1) FM(MSIOF2_SYNC_D) F_(0, 0) FM(VI4_DATA1_A) F_(0, 0) FM(DU_DR1) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 268 267 #define IP6_23_20 FM(D10) FM(LCDOUT2) FM(MSIOF2_RXD_D) FM(HRX3_B) FM(VI4_DATA2_A) FM(CTS4_N_C) FM(DU_DR2) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 269 - #define IP6_27_24 FM(D11) FM(LCDOUT3) FM(MSIOF2_TXD_D) FM(HTX3_B) FM(VI4_DATA3_A) FM(RTS4_N_TANS_C)FM(DU_DR3) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 268 + #define IP6_27_24 FM(D11) FM(LCDOUT3) FM(MSIOF2_TXD_D) FM(HTX3_B) FM(VI4_DATA3_A) FM(RTS4_N_C) FM(DU_DR3) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 270 269 #define IP6_31_28 FM(D12) FM(LCDOUT4) FM(MSIOF2_SS1_D) FM(RX4_C) FM(VI4_DATA4_A) F_(0, 0) FM(DU_DR4) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 271 270 #define IP7_3_0 FM(D13) FM(LCDOUT5) FM(MSIOF2_SS2_D) FM(TX4_C) FM(VI4_DATA5_A) F_(0, 0) FM(DU_DR5) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 272 271 #define IP7_7_4 FM(D14) FM(LCDOUT6) FM(MSIOF3_SS1_A) FM(HRX3_C) FM(VI4_DATA6_A) F_(0, 0) FM(DU_DR6) FM(SCL6_C) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) ··· 313 312 #define IP11_31_28 FM(RX0) FM(HRX1_B) F_(0, 0) F_(0, 0) F_(0, 0) FM(TS_SCK0_C) FM(STP_ISCLK_0_C) FM(RIF0_D0_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 314 313 #define IP12_3_0 FM(TX0) FM(HTX1_B) F_(0, 0) F_(0, 0) F_(0, 0) FM(TS_SPSYNC0_C)FM(STP_ISSYNC_0_C) FM(RIF0_D1_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 315 314 #define IP12_7_4 FM(CTS0_N) FM(HCTS1_N_B) FM(MSIOF1_SYNC_B) F_(0, 0) F_(0, 0) FM(TS_SPSYNC1_C)FM(STP_ISSYNC_1_C) FM(RIF1_SYNC_B) FM(AUDIO_CLKOUT_C) FM(ADICS_SAMP) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 316 - #define IP12_11_8 FM(RTS0_N_TANS) FM(HRTS1_N_B) FM(MSIOF1_SS1_B) FM(AUDIO_CLKA_B) FM(SCL2_A) F_(0, 0) FM(STP_IVCXO27_1_C) FM(RIF0_SYNC_B) F_(0, 0) FM(ADICHS1) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 315 + #define IP12_11_8 FM(RTS0_N) FM(HRTS1_N_B) FM(MSIOF1_SS1_B) FM(AUDIO_CLKA_B) FM(SCL2_A) F_(0, 0) FM(STP_IVCXO27_1_C) FM(RIF0_SYNC_B) F_(0, 0) FM(ADICHS1) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 317 316 #define IP12_15_12 FM(RX1_A) FM(HRX1_A) F_(0, 0) F_(0, 0) F_(0, 0) FM(TS_SDAT0_C) FM(STP_ISD_0_C) FM(RIF1_CLK_C) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 318 317 #define IP12_19_16 FM(TX1_A) FM(HTX1_A) F_(0, 0) F_(0, 0) F_(0, 0) FM(TS_SDEN0_C) FM(STP_ISEN_0_C) FM(RIF1_D0_C) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 319 318 #define IP12_23_20 FM(CTS1_N) FM(HCTS1_N_A) FM(MSIOF1_RXD_B) F_(0, 0) F_(0, 0) FM(TS_SDEN1_C) FM(STP_ISEN_1_C) FM(RIF1_D0_B) F_(0, 0) FM(ADIDATA) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 320 - #define IP12_27_24 FM(RTS1_N_TANS) FM(HRTS1_N_A) FM(MSIOF1_TXD_B) F_(0, 0) F_(0, 0) FM(TS_SDAT1_C) FM(STP_ISD_1_C) FM(RIF1_D1_B) F_(0, 0) FM(ADICHS0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 319 + #define IP12_27_24 FM(RTS1_N) FM(HRTS1_N_A) FM(MSIOF1_TXD_B) F_(0, 0) F_(0, 0) FM(TS_SDAT1_C) FM(STP_ISD_1_C) FM(RIF1_D1_B) F_(0, 0) FM(ADICHS0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 321 320 #define IP12_31_28 FM(SCK2) FM(SCIF_CLK_B) FM(MSIOF1_SCK_B) F_(0, 0) F_(0, 0) FM(TS_SCK1_C) FM(STP_ISCLK_1_C) FM(RIF1_CLK_B) F_(0, 0) FM(ADICLK) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 322 321 #define IP13_3_0 FM(TX2_A) F_(0, 0) F_(0, 0) FM(SD2_CD_B) FM(SCL1_A) F_(0, 0) FM(FMCLK_A) FM(RIF1_D1_C) F_(0, 0) FM(FSO_CFE_0_N) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 323 322 #define IP13_7_4 FM(RX2_A) F_(0, 0) F_(0, 0) FM(SD2_WP_B) FM(SDA1_A) F_(0, 0) FM(FMIN_A) FM(RIF1_SYNC_C) F_(0, 0) FM(FSO_CFE_1_N) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) ··· 369 368 GPSR6_31 \ 370 369 GPSR6_30 \ 371 370 GPSR6_29 \ 372 - GPSR6_28 \ 371 + GPSR1_28 GPSR6_28 \ 373 372 GPSR1_27 GPSR6_27 \ 374 373 GPSR1_26 GPSR6_26 \ 375 374 GPSR1_25 GPSR5_25 GPSR6_25 \ ··· 549 548 FM(AVB_TX_CTL) FM(AVB_TXC) FM(AVB_TD0) FM(AVB_TD1) FM(AVB_TD2) FM(AVB_TD3) \ 550 549 FM(AVB_RX_CTL) FM(AVB_RXC) FM(AVB_RD0) FM(AVB_RD1) FM(AVB_RD2) FM(AVB_RD3) \ 551 550 FM(AVB_TXCREFCLK) FM(AVB_MDIO) \ 552 - FM(CLKOUT) FM(PRESETOUT) \ 551 + FM(PRESETOUT) \ 553 552 FM(DU_DOTCLKIN0) FM(DU_DOTCLKIN1) FM(DU_DOTCLKIN2) FM(DU_DOTCLKIN3) \ 554 553 FM(TMS) FM(TDO) FM(ASEBRK) FM(MLB_REF) FM(TDI) FM(TCK) FM(TRST) FM(EXTALR) 555 554 ··· 588 587 589 588 PINMUX_SINGLE(AVS1), 590 589 PINMUX_SINGLE(AVS2), 590 + PINMUX_SINGLE(CLKOUT), 591 591 PINMUX_SINGLE(HDMI0_CEC), 592 592 PINMUX_SINGLE(HDMI1_CEC), 593 593 PINMUX_SINGLE(I2C_SEL_0_1), ··· 624 622 625 623 PINMUX_IPSR_MSEL(IP0_23_20, AVB_AVTP_CAPTURE_A, SEL_ETHERAVB_0), 626 624 PINMUX_IPSR_MSEL(IP0_23_20, MSIOF2_TXD_C, SEL_MSIOF2_2), 627 - PINMUX_IPSR_MSEL(IP0_23_20, RTS4_N_TANS_A, SEL_SCIF4_0), 625 + PINMUX_IPSR_MSEL(IP0_23_20, RTS4_N_A, SEL_SCIF4_0), 628 626 629 627 PINMUX_IPSR_GPSR(IP0_27_24, IRQ0), 630 628 PINMUX_IPSR_GPSR(IP0_27_24, QPOLB), ··· 652 650 653 651 PINMUX_IPSR_GPSR(IP1_7_4, IRQ3), 654 652 PINMUX_IPSR_GPSR(IP1_7_4, QSTVB_QVE), 655 - PINMUX_IPSR_GPSR(IP1_7_4, A25), 656 653 PINMUX_IPSR_GPSR(IP1_7_4, DU_DOTCLKOUT1), 657 654 PINMUX_IPSR_MSEL(IP1_7_4, VI4_DATA3_B, SEL_VIN4_1), 658 655 PINMUX_IPSR_MSEL(IP1_7_4, PWM4_B, SEL_PWM4_1), ··· 659 658 660 659 PINMUX_IPSR_GPSR(IP1_11_8, IRQ4), 661 660 PINMUX_IPSR_GPSR(IP1_11_8, QSTH_QHS), 662 - PINMUX_IPSR_GPSR(IP1_11_8, A24), 663 661 PINMUX_IPSR_GPSR(IP1_11_8, DU_EXHSYNC_DU_HSYNC), 664 662 PINMUX_IPSR_MSEL(IP1_11_8, VI4_DATA4_B, SEL_VIN4_1), 665 663 PINMUX_IPSR_MSEL(IP1_11_8, PWM5_B, SEL_PWM5_1), ··· 666 666 667 667 PINMUX_IPSR_GPSR(IP1_15_12, IRQ5), 668 668 PINMUX_IPSR_GPSR(IP1_15_12, QSTB_QHE), 669 - PINMUX_IPSR_GPSR(IP1_15_12, A23), 670 669 PINMUX_IPSR_GPSR(IP1_15_12, DU_EXVSYNC_DU_VSYNC), 671 670 PINMUX_IPSR_MSEL(IP1_15_12, VI4_DATA5_B, SEL_VIN4_1), 672 671 PINMUX_IPSR_MSEL(IP1_15_12, PWM6_B, SEL_PWM6_1), ··· 674 675 675 676 PINMUX_IPSR_GPSR(IP1_19_16, PWM0), 676 677 PINMUX_IPSR_GPSR(IP1_19_16, AVB_AVTP_PPS), 677 - PINMUX_IPSR_GPSR(IP1_19_16, A22), 678 678 PINMUX_IPSR_MSEL(IP1_19_16, VI4_DATA6_B, SEL_VIN4_1), 679 679 PINMUX_IPSR_MSEL(IP1_19_16, IECLK_B, SEL_IEBUS_1), 680 680 681 681 PINMUX_IPSR_MSEL(IP1_23_20, PWM1_A, SEL_PWM1_0), 682 - PINMUX_IPSR_GPSR(IP1_23_20, A21), 683 682 PINMUX_IPSR_MSEL(IP1_23_20, HRX3_D, SEL_HSCIF3_3), 684 683 PINMUX_IPSR_MSEL(IP1_23_20, VI4_DATA7_B, SEL_VIN4_1), 685 684 PINMUX_IPSR_MSEL(IP1_23_20, IERX_B, SEL_IEBUS_1), 686 685 687 686 PINMUX_IPSR_MSEL(IP1_27_24, PWM2_A, SEL_PWM2_0), 688 - PINMUX_IPSR_GPSR(IP1_27_24, A20), 689 687 PINMUX_IPSR_MSEL(IP1_27_24, HTX3_D, SEL_HSCIF3_3), 690 688 PINMUX_IPSR_MSEL(IP1_27_24, IETX_B, SEL_IEBUS_1), 691 689 ··· 762 766 763 767 PINMUX_IPSR_GPSR(IP3_7_4, A10), 764 768 PINMUX_IPSR_MSEL(IP3_7_4, MSIOF2_RXD_A, SEL_MSIOF2_0), 765 - PINMUX_IPSR_MSEL(IP3_7_4, RTS4_N_TANS_B, SEL_SCIF4_1), 769 + PINMUX_IPSR_MSEL(IP3_7_4, RTS4_N_B, SEL_SCIF4_1), 766 770 PINMUX_IPSR_GPSR(IP3_7_4, VI5_HSYNC_N), 767 771 768 772 PINMUX_IPSR_GPSR(IP3_11_8, A11), ··· 865 869 866 870 PINMUX_IPSR_GPSR(IP5_7_4, WE1_N), 867 871 PINMUX_IPSR_MSEL(IP5_7_4, MSIOF3_SS1_D, SEL_MSIOF3_3), 868 - PINMUX_IPSR_GPSR(IP5_7_4, RTS3_N_TANS), 872 + PINMUX_IPSR_GPSR(IP5_7_4, RTS3_N), 869 873 PINMUX_IPSR_GPSR(IP5_7_4, HRTS3_N), 870 874 PINMUX_IPSR_MSEL(IP5_7_4, SDA6_B, SEL_I2C6_1), 871 875 PINMUX_IPSR_GPSR(IP5_7_4, CAN1_RX), ··· 946 950 PINMUX_IPSR_MSEL(IP6_27_24, MSIOF2_TXD_D, SEL_MSIOF2_3), 947 951 PINMUX_IPSR_MSEL(IP6_27_24, HTX3_B, SEL_HSCIF3_1), 948 952 PINMUX_IPSR_MSEL(IP6_27_24, VI4_DATA3_A, SEL_VIN4_0), 949 - PINMUX_IPSR_MSEL(IP6_27_24, RTS4_N_TANS_C, SEL_SCIF4_2), 953 + PINMUX_IPSR_MSEL(IP6_27_24, RTS4_N_C, SEL_SCIF4_2), 950 954 PINMUX_IPSR_GPSR(IP6_27_24, DU_DR3), 951 955 952 956 PINMUX_IPSR_GPSR(IP6_31_28, D12), ··· 1155 1159 PINMUX_IPSR_GPSR(IP12_7_4, AUDIO_CLKOUT_C), 1156 1160 PINMUX_IPSR_GPSR(IP12_7_4, ADICS_SAMP), 1157 1161 1158 - PINMUX_IPSR_GPSR(IP12_11_8, RTS0_N_TANS), 1162 + PINMUX_IPSR_GPSR(IP12_11_8, RTS0_N), 1159 1163 PINMUX_IPSR_MSEL(IP12_11_8, HRTS1_N_B, SEL_HSCIF1_1), 1160 1164 PINMUX_IPSR_MSEL(IP12_11_8, MSIOF1_SS1_B, SEL_MSIOF1_1), 1161 1165 PINMUX_IPSR_MSEL(IP12_11_8, AUDIO_CLKA_B, SEL_ADG_A_1), ··· 1184 1188 PINMUX_IPSR_MSEL(IP12_23_20, RIF1_D0_B, SEL_DRIF1_1), 1185 1189 PINMUX_IPSR_GPSR(IP12_23_20, ADIDATA), 1186 1190 1187 - PINMUX_IPSR_GPSR(IP12_27_24, RTS1_N_TANS), 1191 + PINMUX_IPSR_GPSR(IP12_27_24, RTS1_N), 1188 1192 PINMUX_IPSR_MSEL(IP12_27_24, HRTS1_N_A, SEL_HSCIF1_0), 1189 1193 PINMUX_IPSR_MSEL(IP12_27_24, MSIOF1_TXD_B, SEL_MSIOF1_1), 1190 1194 PINMUX_IPSR_MSEL(IP12_27_24, TS_SDAT1_C, SEL_TSIF1_2), ··· 1775 1779 }; 1776 1780 static const unsigned int avb_avtp_capture_b_mux[] = { 1777 1781 AVB_AVTP_CAPTURE_B_MARK, 1782 + }; 1783 + 1784 + /* - CAN ------------------------------------------------------------------ */ 1785 + static const unsigned int can0_data_a_pins[] = { 1786 + /* TX, RX */ 1787 + RCAR_GP_PIN(1, 23), RCAR_GP_PIN(1, 24), 1788 + }; 1789 + static const unsigned int can0_data_a_mux[] = { 1790 + CAN0_TX_A_MARK, CAN0_RX_A_MARK, 1791 + }; 1792 + static const unsigned int can0_data_b_pins[] = { 1793 + /* TX, RX */ 1794 + RCAR_GP_PIN(2, 0), RCAR_GP_PIN(2, 1), 1795 + }; 1796 + static const unsigned int can0_data_b_mux[] = { 1797 + CAN0_TX_B_MARK, CAN0_RX_B_MARK, 1798 + }; 1799 + static const unsigned int can1_data_pins[] = { 1800 + /* TX, RX */ 1801 + RCAR_GP_PIN(1, 22), RCAR_GP_PIN(1, 26), 1802 + }; 1803 + static const unsigned int can1_data_mux[] = { 1804 + CAN1_TX_MARK, CAN1_RX_MARK, 1805 + }; 1806 + 1807 + /* - CAN Clock -------------------------------------------------------------- */ 1808 + static const unsigned int can_clk_pins[] = { 1809 + /* CLK */ 1810 + RCAR_GP_PIN(1, 25), 1811 + }; 1812 + static const unsigned int can_clk_mux[] = { 1813 + CAN_CLK_MARK, 1814 + }; 1815 + 1816 + /* - CAN FD --------------------------------------------------------------- */ 1817 + static const unsigned int canfd0_data_a_pins[] = { 1818 + /* TX, RX */ 1819 + RCAR_GP_PIN(1, 23), RCAR_GP_PIN(1, 24), 1820 + }; 1821 + static const unsigned int canfd0_data_a_mux[] = { 1822 + CANFD0_TX_A_MARK, CANFD0_RX_A_MARK, 1823 + }; 1824 + static const unsigned int canfd0_data_b_pins[] = { 1825 + /* TX, RX */ 1826 + RCAR_GP_PIN(2, 0), RCAR_GP_PIN(2, 1), 1827 + }; 1828 + static const unsigned int canfd0_data_b_mux[] = { 1829 + CANFD0_TX_B_MARK, CANFD0_RX_B_MARK, 1830 + }; 1831 + static const unsigned int canfd1_data_pins[] = { 1832 + /* TX, RX */ 1833 + RCAR_GP_PIN(1, 22), RCAR_GP_PIN(1, 26), 1834 + }; 1835 + static const unsigned int canfd1_data_mux[] = { 1836 + CANFD1_TX_MARK, CANFD1_RX_MARK, 1778 1837 }; 1779 1838 1780 1839 /* - DRIF0 --------------------------------------------------------------- */ ··· 3227 3176 PWM6_B_MARK, 3228 3177 }; 3229 3178 3179 + /* - SATA --------------------------------------------------------------------*/ 3180 + static const unsigned int sata0_devslp_a_pins[] = { 3181 + /* DEVSLP */ 3182 + RCAR_GP_PIN(6, 16), 3183 + }; 3184 + static const unsigned int sata0_devslp_a_mux[] = { 3185 + SATA_DEVSLP_A_MARK, 3186 + }; 3187 + static const unsigned int sata0_devslp_b_pins[] = { 3188 + /* DEVSLP */ 3189 + RCAR_GP_PIN(4, 6), 3190 + }; 3191 + static const unsigned int sata0_devslp_b_mux[] = { 3192 + SATA_DEVSLP_B_MARK, 3193 + }; 3194 + 3230 3195 /* - SCIF0 ------------------------------------------------------------------ */ 3231 3196 static const unsigned int scif0_data_pins[] = { 3232 3197 /* RX, TX */ ··· 3263 3196 RCAR_GP_PIN(5, 4), RCAR_GP_PIN(5, 3), 3264 3197 }; 3265 3198 static const unsigned int scif0_ctrl_mux[] = { 3266 - RTS0_N_TANS_MARK, CTS0_N_MARK, 3199 + RTS0_N_MARK, CTS0_N_MARK, 3267 3200 }; 3268 3201 /* - SCIF1 ------------------------------------------------------------------ */ 3269 3202 static const unsigned int scif1_data_a_pins[] = { ··· 3285 3218 RCAR_GP_PIN(5, 8), RCAR_GP_PIN(5, 7), 3286 3219 }; 3287 3220 static const unsigned int scif1_ctrl_mux[] = { 3288 - RTS1_N_TANS_MARK, CTS1_N_MARK, 3221 + RTS1_N_MARK, CTS1_N_MARK, 3289 3222 }; 3290 3223 3291 3224 static const unsigned int scif1_data_b_pins[] = { ··· 3337 3270 RCAR_GP_PIN(1, 26), RCAR_GP_PIN(1, 25), 3338 3271 }; 3339 3272 static const unsigned int scif3_ctrl_mux[] = { 3340 - RTS3_N_TANS_MARK, CTS3_N_MARK, 3273 + RTS3_N_MARK, CTS3_N_MARK, 3341 3274 }; 3342 3275 static const unsigned int scif3_data_b_pins[] = { 3343 3276 /* RX, TX */ ··· 3366 3299 RCAR_GP_PIN(2, 14), RCAR_GP_PIN(2, 13), 3367 3300 }; 3368 3301 static const unsigned int scif4_ctrl_a_mux[] = { 3369 - RTS4_N_TANS_A_MARK, CTS4_N_A_MARK, 3302 + RTS4_N_A_MARK, CTS4_N_A_MARK, 3370 3303 }; 3371 3304 static const unsigned int scif4_data_b_pins[] = { 3372 3305 /* RX, TX */ ··· 3387 3320 RCAR_GP_PIN(1, 10), RCAR_GP_PIN(1, 9), 3388 3321 }; 3389 3322 static const unsigned int scif4_ctrl_b_mux[] = { 3390 - RTS4_N_TANS_B_MARK, CTS4_N_B_MARK, 3323 + RTS4_N_B_MARK, CTS4_N_B_MARK, 3391 3324 }; 3392 3325 static const unsigned int scif4_data_c_pins[] = { 3393 3326 /* RX, TX */ ··· 3408 3341 RCAR_GP_PIN(0, 11), RCAR_GP_PIN(0, 10), 3409 3342 }; 3410 3343 static const unsigned int scif4_ctrl_c_mux[] = { 3411 - RTS4_N_TANS_C_MARK, CTS4_N_C_MARK, 3344 + RTS4_N_C_MARK, CTS4_N_C_MARK, 3412 3345 }; 3413 3346 /* - SCIF5 ------------------------------------------------------------------ */ 3414 3347 static const unsigned int scif5_data_a_pins[] = { ··· 3910 3843 SH_PFC_PIN_GROUP(avb_avtp_capture_a), 3911 3844 SH_PFC_PIN_GROUP(avb_avtp_match_b), 3912 3845 SH_PFC_PIN_GROUP(avb_avtp_capture_b), 3846 + SH_PFC_PIN_GROUP(can0_data_a), 3847 + SH_PFC_PIN_GROUP(can0_data_b), 3848 + SH_PFC_PIN_GROUP(can1_data), 3849 + SH_PFC_PIN_GROUP(can_clk), 3850 + SH_PFC_PIN_GROUP(canfd0_data_a), 3851 + SH_PFC_PIN_GROUP(canfd0_data_b), 3852 + SH_PFC_PIN_GROUP(canfd1_data), 3913 3853 SH_PFC_PIN_GROUP(drif0_ctrl_a), 3914 3854 SH_PFC_PIN_GROUP(drif0_data0_a), 3915 3855 SH_PFC_PIN_GROUP(drif0_data1_a), ··· 4108 4034 SH_PFC_PIN_GROUP(pwm5_b), 4109 4035 SH_PFC_PIN_GROUP(pwm6_a), 4110 4036 SH_PFC_PIN_GROUP(pwm6_b), 4037 + SH_PFC_PIN_GROUP(sata0_devslp_a), 4038 + SH_PFC_PIN_GROUP(sata0_devslp_b), 4111 4039 SH_PFC_PIN_GROUP(scif0_data), 4112 4040 SH_PFC_PIN_GROUP(scif0_clk), 4113 4041 SH_PFC_PIN_GROUP(scif0_ctrl), ··· 4228 4152 "avb_avtp_capture_a", 4229 4153 "avb_avtp_match_b", 4230 4154 "avb_avtp_capture_b", 4155 + }; 4156 + 4157 + static const char * const can0_groups[] = { 4158 + "can0_data_a", 4159 + "can0_data_b", 4160 + }; 4161 + 4162 + static const char * const can1_groups[] = { 4163 + "can1_data", 4164 + }; 4165 + 4166 + static const char * const can_clk_groups[] = { 4167 + "can_clk", 4168 + }; 4169 + 4170 + static const char * const canfd0_groups[] = { 4171 + "canfd0_data_a", 4172 + "canfd0_data_b", 4173 + }; 4174 + 4175 + static const char * const canfd1_groups[] = { 4176 + "canfd1_data", 4231 4177 }; 4232 4178 4233 4179 static const char * const drif0_groups[] = { ··· 4518 4420 "pwm6_b", 4519 4421 }; 4520 4422 4423 + static const char * const sata0_groups[] = { 4424 + "sata0_devslp_a", 4425 + "sata0_devslp_b", 4426 + }; 4427 + 4521 4428 static const char * const scif0_groups[] = { 4522 4429 "scif0_data", 4523 4430 "scif0_clk", ··· 4662 4559 static const struct sh_pfc_function pinmux_functions[] = { 4663 4560 SH_PFC_FUNCTION(audio_clk), 4664 4561 SH_PFC_FUNCTION(avb), 4562 + SH_PFC_FUNCTION(can0), 4563 + SH_PFC_FUNCTION(can1), 4564 + SH_PFC_FUNCTION(can_clk), 4565 + SH_PFC_FUNCTION(canfd0), 4566 + SH_PFC_FUNCTION(canfd1), 4665 4567 SH_PFC_FUNCTION(drif0), 4666 4568 SH_PFC_FUNCTION(drif1), 4667 4569 SH_PFC_FUNCTION(drif2), ··· 4692 4584 SH_PFC_FUNCTION(pwm4), 4693 4585 SH_PFC_FUNCTION(pwm5), 4694 4586 SH_PFC_FUNCTION(pwm6), 4587 + SH_PFC_FUNCTION(sata0), 4695 4588 SH_PFC_FUNCTION(scif0), 4696 4589 SH_PFC_FUNCTION(scif1), 4697 4590 SH_PFC_FUNCTION(scif2), ··· 4753 4644 0, 0, 4754 4645 0, 0, 4755 4646 0, 0, 4756 - 0, 0, 4647 + GP_1_28_FN, GPSR1_28, 4757 4648 GP_1_27_FN, GPSR1_27, 4758 4649 GP_1_26_FN, GPSR1_26, 4759 4650 GP_1_25_FN, GPSR1_25, ··· 5355 5246 { RCAR_GP_PIN(1, 19), 0, 3 }, /* A19 */ 5356 5247 } }, 5357 5248 { PINMUX_DRIVE_REG("DRVCTRL8", 0xe6060320) { 5358 - { PIN_NUMBER('F', 1), 28, 3 }, /* CLKOUT */ 5249 + { RCAR_GP_PIN(1, 28), 28, 3 }, /* CLKOUT */ 5359 5250 { RCAR_GP_PIN(1, 20), 24, 3 }, /* CS0 */ 5360 5251 { RCAR_GP_PIN(1, 21), 20, 3 }, /* CS1_A26 */ 5361 5252 { RCAR_GP_PIN(1, 22), 16, 3 }, /* BS */ ··· 5451 5342 { RCAR_GP_PIN(5, 3), 0, 3 }, /* CTS0 */ 5452 5343 } }, 5453 5344 { PINMUX_DRIVE_REG("DRVCTRL18", 0xe6060348) { 5454 - { RCAR_GP_PIN(5, 4), 28, 3 }, /* RTS0_TANS */ 5345 + { RCAR_GP_PIN(5, 4), 28, 3 }, /* RTS0 */ 5455 5346 { RCAR_GP_PIN(5, 5), 24, 3 }, /* RX1 */ 5456 5347 { RCAR_GP_PIN(5, 6), 20, 3 }, /* TX1 */ 5457 5348 { RCAR_GP_PIN(5, 7), 16, 3 }, /* CTS1 */ 5458 - { RCAR_GP_PIN(5, 8), 12, 3 }, /* RTS1_TANS */ 5349 + { RCAR_GP_PIN(5, 8), 12, 3 }, /* RTS1 */ 5459 5350 { RCAR_GP_PIN(5, 9), 8, 3 }, /* SCK2 */ 5460 5351 { RCAR_GP_PIN(5, 10), 4, 3 }, /* TX2 */ 5461 5352 { RCAR_GP_PIN(5, 11), 0, 3 }, /* RX2 */ ··· 5616 5507 [31] = RCAR_GP_PIN(1, 19), /* A19 */ 5617 5508 } }, 5618 5509 { PINMUX_BIAS_REG("PUEN2", 0xe6060408, "PUD2", 0xe6060448) { 5619 - [ 0] = PIN_NUMBER('F', 1), /* CLKOUT */ 5510 + [ 0] = RCAR_GP_PIN(1, 28), /* CLKOUT */ 5620 5511 [ 1] = RCAR_GP_PIN(1, 20), /* CS0_N */ 5621 5512 [ 2] = RCAR_GP_PIN(1, 21), /* CS1_N */ 5622 5513 [ 3] = RCAR_GP_PIN(1, 22), /* BS_N */ ··· 5700 5591 [13] = RCAR_GP_PIN(5, 1), /* RX0 */ 5701 5592 [14] = RCAR_GP_PIN(5, 2), /* TX0 */ 5702 5593 [15] = RCAR_GP_PIN(5, 3), /* CTS0_N */ 5703 - [16] = RCAR_GP_PIN(5, 4), /* RTS0_N_TANS */ 5594 + [16] = RCAR_GP_PIN(5, 4), /* RTS0_N */ 5704 5595 [17] = RCAR_GP_PIN(5, 5), /* RX1_A */ 5705 5596 [18] = RCAR_GP_PIN(5, 6), /* TX1_A */ 5706 5597 [19] = RCAR_GP_PIN(5, 7), /* CTS1_N */ 5707 - [20] = RCAR_GP_PIN(5, 8), /* RTS1_N_TANS */ 5598 + [20] = RCAR_GP_PIN(5, 8), /* RTS1_N */ 5708 5599 [21] = RCAR_GP_PIN(5, 9), /* SCK2 */ 5709 5600 [22] = RCAR_GP_PIN(5, 10), /* TX2_A */ 5710 5601 [23] = RCAR_GP_PIN(5, 11), /* RX2_A */
+30 -36
drivers/pinctrl/sh-pfc/pfc-r8a7796.c
··· 163 163 #define GPSR5_11 F_(RX2_A, IP13_7_4) 164 164 #define GPSR5_10 F_(TX2_A, IP13_3_0) 165 165 #define GPSR5_9 F_(SCK2, IP12_31_28) 166 - #define GPSR5_8 F_(RTS1_N_TANS, IP12_27_24) 166 + #define GPSR5_8 F_(RTS1_N, IP12_27_24) 167 167 #define GPSR5_7 F_(CTS1_N, IP12_23_20) 168 168 #define GPSR5_6 F_(TX1_A, IP12_19_16) 169 169 #define GPSR5_5 F_(RX1_A, IP12_15_12) 170 - #define GPSR5_4 F_(RTS0_N_TANS, IP12_11_8) 170 + #define GPSR5_4 F_(RTS0_N, IP12_11_8) 171 171 #define GPSR5_3 F_(CTS0_N, IP12_7_4) 172 172 #define GPSR5_2 F_(TX0, IP12_3_0) 173 173 #define GPSR5_1 F_(RX0, IP11_31_28) ··· 220 220 #define IP0_11_8 FM(AVB_PHY_INT) F_(0, 0) FM(MSIOF2_SYNC_C) FM(RX4_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 221 221 #define IP0_15_12 FM(AVB_LINK) F_(0, 0) FM(MSIOF2_SCK_C) FM(TX4_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 222 222 #define IP0_19_16 FM(AVB_AVTP_MATCH_A) F_(0, 0) FM(MSIOF2_RXD_C) FM(CTS4_N_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 223 - #define IP0_23_20 FM(AVB_AVTP_CAPTURE_A) F_(0, 0) FM(MSIOF2_TXD_C) FM(RTS4_N_TANS_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 223 + #define IP0_23_20 FM(AVB_AVTP_CAPTURE_A) F_(0, 0) FM(MSIOF2_TXD_C) FM(RTS4_N_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 224 224 #define IP0_27_24 FM(IRQ0) FM(QPOLB) F_(0, 0) FM(DU_CDE) FM(VI4_DATA0_B) FM(CAN0_TX_B) FM(CANFD0_TX_B) FM(MSIOF3_SS2_E) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 225 225 #define IP0_31_28 FM(IRQ1) FM(QPOLA) F_(0, 0) FM(DU_DISP) FM(VI4_DATA1_B) FM(CAN0_RX_B) FM(CANFD0_RX_B) FM(MSIOF3_SS1_E) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 226 226 #define IP1_3_0 FM(IRQ2) FM(QCPV_QDE) F_(0, 0) FM(DU_EXODDF_DU_ODDF_DISP_CDE) FM(VI4_DATA2_B) F_(0, 0) F_(0, 0) FM(MSIOF3_SYNC_E) F_(0, 0) FM(PWM3_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 227 - #define IP1_7_4 FM(IRQ3) FM(QSTVB_QVE) FM(A25) FM(DU_DOTCLKOUT1) FM(VI4_DATA3_B) F_(0, 0) F_(0, 0) FM(MSIOF3_SCK_E) F_(0, 0) FM(PWM4_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 228 - #define IP1_11_8 FM(IRQ4) FM(QSTH_QHS) FM(A24) FM(DU_EXHSYNC_DU_HSYNC) FM(VI4_DATA4_B) F_(0, 0) F_(0, 0) FM(MSIOF3_RXD_E) F_(0, 0) FM(PWM5_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 229 - #define IP1_15_12 FM(IRQ5) FM(QSTB_QHE) FM(A23) FM(DU_EXVSYNC_DU_VSYNC) FM(VI4_DATA5_B) F_(0, 0) F_(0, 0) FM(MSIOF3_TXD_E) F_(0, 0) FM(PWM6_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 230 - #define IP1_19_16 FM(PWM0) FM(AVB_AVTP_PPS)FM(A22) F_(0, 0) FM(VI4_DATA6_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) FM(IECLK_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 231 - #define IP1_23_20 FM(PWM1_A) F_(0, 0) FM(A21) FM(HRX3_D) FM(VI4_DATA7_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) FM(IERX_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 232 - #define IP1_27_24 FM(PWM2_A) F_(0, 0) FM(A20) FM(HTX3_D) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) FM(IETX_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 227 + #define IP1_7_4 FM(IRQ3) FM(QSTVB_QVE) F_(0, 0) FM(DU_DOTCLKOUT1) FM(VI4_DATA3_B) F_(0, 0) F_(0, 0) FM(MSIOF3_SCK_E) F_(0, 0) FM(PWM4_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 228 + #define IP1_11_8 FM(IRQ4) FM(QSTH_QHS) F_(0, 0) FM(DU_EXHSYNC_DU_HSYNC) FM(VI4_DATA4_B) F_(0, 0) F_(0, 0) FM(MSIOF3_RXD_E) F_(0, 0) FM(PWM5_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 229 + #define IP1_15_12 FM(IRQ5) FM(QSTB_QHE) F_(0, 0) FM(DU_EXVSYNC_DU_VSYNC) FM(VI4_DATA5_B) F_(0, 0) F_(0, 0) FM(MSIOF3_TXD_E) F_(0, 0) FM(PWM6_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 230 + #define IP1_19_16 FM(PWM0) FM(AVB_AVTP_PPS)F_(0, 0) F_(0, 0) FM(VI4_DATA6_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) FM(IECLK_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 231 + #define IP1_23_20 FM(PWM1_A) F_(0, 0) F_(0, 0) FM(HRX3_D) FM(VI4_DATA7_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) FM(IERX_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 232 + #define IP1_27_24 FM(PWM2_A) F_(0, 0) F_(0, 0) FM(HTX3_D) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) FM(IETX_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 233 233 #define IP1_31_28 FM(A0) FM(LCDOUT16) FM(MSIOF3_SYNC_B) F_(0, 0) FM(VI4_DATA8) F_(0, 0) FM(DU_DB0) F_(0, 0) F_(0, 0) FM(PWM3_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 234 234 #define IP2_3_0 FM(A1) FM(LCDOUT17) FM(MSIOF3_TXD_B) F_(0, 0) FM(VI4_DATA9) F_(0, 0) FM(DU_DB1) F_(0, 0) F_(0, 0) FM(PWM4_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 235 235 #define IP2_7_4 FM(A2) FM(LCDOUT18) FM(MSIOF3_SCK_B) F_(0, 0) FM(VI4_DATA10) F_(0, 0) FM(DU_DB2) F_(0, 0) F_(0, 0) FM(PWM5_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) ··· 240 240 #define IP2_27_24 FM(A7) FM(LCDOUT23) FM(MSIOF2_SS2_A) FM(TX4_B) FM(VI4_DATA15) FM(VI5_DATA15) FM(DU_DB7) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 241 241 #define IP2_31_28 FM(A8) FM(RX3_B) FM(MSIOF2_SYNC_A) FM(HRX4_B) F_(0, 0) F_(0, 0) F_(0, 0) FM(SDA6_A) FM(AVB_AVTP_MATCH_B) FM(PWM1_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 242 242 #define IP3_3_0 FM(A9) F_(0, 0) FM(MSIOF2_SCK_A) FM(CTS4_N_B) F_(0, 0) FM(VI5_VSYNC_N) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 243 - #define IP3_7_4 FM(A10) F_(0, 0) FM(MSIOF2_RXD_A) FM(RTS4_N_TANS_B) F_(0, 0) FM(VI5_HSYNC_N) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 243 + #define IP3_7_4 FM(A10) F_(0, 0) FM(MSIOF2_RXD_A) FM(RTS4_N_B) F_(0, 0) FM(VI5_HSYNC_N) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 244 244 #define IP3_11_8 FM(A11) FM(TX3_B) FM(MSIOF2_TXD_A) FM(HTX4_B) FM(HSCK4) FM(VI5_FIELD) F_(0, 0) FM(SCL6_A) FM(AVB_AVTP_CAPTURE_B) FM(PWM2_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 245 245 246 246 /* IPSRx */ /* 0 */ /* 1 */ /* 2 */ /* 3 */ /* 4 */ /* 5 */ /* 6 */ /* 7 */ /* 8 */ /* 9 */ /* A */ /* B */ /* C - F */ ··· 258 258 #define IP4_27_24 FM(RD_N) F_(0, 0) FM(MSIOF3_SYNC_D) FM(RX3_A) FM(HRX3_A) F_(0, 0) F_(0, 0) F_(0, 0) FM(CAN0_TX_A) FM(CANFD0_TX_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 259 259 #define IP4_31_28 FM(RD_WR_N) F_(0, 0) FM(MSIOF3_RXD_D) FM(TX3_A) FM(HTX3_A) F_(0, 0) F_(0, 0) F_(0, 0) FM(CAN0_RX_A) FM(CANFD0_RX_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 260 260 #define IP5_3_0 FM(WE0_N) F_(0, 0) FM(MSIOF3_TXD_D) FM(CTS3_N) FM(HCTS3_N) F_(0, 0) F_(0, 0) FM(SCL6_B) FM(CAN_CLK) F_(0, 0) FM(IECLK_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 261 - #define IP5_7_4 FM(WE1_N) F_(0, 0) FM(MSIOF3_SS1_D) FM(RTS3_N_TANS) FM(HRTS3_N) F_(0, 0) F_(0, 0) FM(SDA6_B) FM(CAN1_RX) FM(CANFD1_RX) FM(IERX_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 261 + #define IP5_7_4 FM(WE1_N) F_(0, 0) FM(MSIOF3_SS1_D) FM(RTS3_N) FM(HRTS3_N) F_(0, 0) F_(0, 0) FM(SDA6_B) FM(CAN1_RX) FM(CANFD1_RX) FM(IERX_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 262 262 #define IP5_11_8 FM(EX_WAIT0_A) FM(QCLK) F_(0, 0) F_(0, 0) FM(VI4_CLK) F_(0, 0) FM(DU_DOTCLKOUT0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 263 263 #define IP5_15_12 FM(D0) FM(MSIOF2_SS1_B)FM(MSIOF3_SCK_A) F_(0, 0) FM(VI4_DATA16) FM(VI5_DATA0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 264 264 #define IP5_19_16 FM(D1) FM(MSIOF2_SS2_B)FM(MSIOF3_SYNC_A) F_(0, 0) FM(VI4_DATA17) FM(VI5_DATA1) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) ··· 271 271 #define IP6_15_12 FM(D8) FM(LCDOUT0) FM(MSIOF2_SCK_D) FM(SCK4_C) FM(VI4_DATA0_A) F_(0, 0) FM(DU_DR0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 272 272 #define IP6_19_16 FM(D9) FM(LCDOUT1) FM(MSIOF2_SYNC_D) F_(0, 0) FM(VI4_DATA1_A) F_(0, 0) FM(DU_DR1) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 273 273 #define IP6_23_20 FM(D10) FM(LCDOUT2) FM(MSIOF2_RXD_D) FM(HRX3_B) FM(VI4_DATA2_A) FM(CTS4_N_C) FM(DU_DR2) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 274 - #define IP6_27_24 FM(D11) FM(LCDOUT3) FM(MSIOF2_TXD_D) FM(HTX3_B) FM(VI4_DATA3_A) FM(RTS4_N_TANS_C)FM(DU_DR3) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 274 + #define IP6_27_24 FM(D11) FM(LCDOUT3) FM(MSIOF2_TXD_D) FM(HTX3_B) FM(VI4_DATA3_A) FM(RTS4_N_C) FM(DU_DR3) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 275 275 #define IP6_31_28 FM(D12) FM(LCDOUT4) FM(MSIOF2_SS1_D) FM(RX4_C) FM(VI4_DATA4_A) F_(0, 0) FM(DU_DR4) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 276 276 277 277 /* IPSRx */ /* 0 */ /* 1 */ /* 2 */ /* 3 */ /* 4 */ /* 5 */ /* 6 */ /* 7 */ /* 8 */ /* 9 */ /* A */ /* B */ /* C - F */ ··· 318 318 #define IP11_31_28 FM(RX0) FM(HRX1_B) F_(0, 0) F_(0, 0) F_(0, 0) FM(TS_SCK0_C) FM(STP_ISCLK_0_C) FM(RIF0_D0_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 319 319 #define IP12_3_0 FM(TX0) FM(HTX1_B) F_(0, 0) F_(0, 0) F_(0, 0) FM(TS_SPSYNC0_C)FM(STP_ISSYNC_0_C) FM(RIF0_D1_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 320 320 #define IP12_7_4 FM(CTS0_N) FM(HCTS1_N_B) FM(MSIOF1_SYNC_B) F_(0, 0) F_(0, 0) FM(TS_SPSYNC1_C)FM(STP_ISSYNC_1_C) FM(RIF1_SYNC_B) FM(AUDIO_CLKOUT_C) FM(ADICS_SAMP) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 321 - #define IP12_11_8 FM(RTS0_N_TANS) FM(HRTS1_N_B) FM(MSIOF1_SS1_B) FM(AUDIO_CLKA_B) FM(SCL2_A) F_(0, 0) FM(STP_IVCXO27_1_C) FM(RIF0_SYNC_B) F_(0, 0) FM(ADICHS1) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 321 + #define IP12_11_8 FM(RTS0_N) FM(HRTS1_N_B) FM(MSIOF1_SS1_B) FM(AUDIO_CLKA_B) FM(SCL2_A) F_(0, 0) FM(STP_IVCXO27_1_C) FM(RIF0_SYNC_B) F_(0, 0) FM(ADICHS1) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 322 322 #define IP12_15_12 FM(RX1_A) FM(HRX1_A) F_(0, 0) F_(0, 0) F_(0, 0) FM(TS_SDAT0_C) FM(STP_ISD_0_C) FM(RIF1_CLK_C) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 323 323 #define IP12_19_16 FM(TX1_A) FM(HTX1_A) F_(0, 0) F_(0, 0) F_(0, 0) FM(TS_SDEN0_C) FM(STP_ISEN_0_C) FM(RIF1_D0_C) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 324 324 #define IP12_23_20 FM(CTS1_N) FM(HCTS1_N_A) FM(MSIOF1_RXD_B) F_(0, 0) F_(0, 0) FM(TS_SDEN1_C) FM(STP_ISEN_1_C) FM(RIF1_D0_B) F_(0, 0) FM(ADIDATA) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 325 - #define IP12_27_24 FM(RTS1_N_TANS) FM(HRTS1_N_A) FM(MSIOF1_TXD_B) F_(0, 0) F_(0, 0) FM(TS_SDAT1_C) FM(STP_ISD_1_C) FM(RIF1_D1_B) F_(0, 0) FM(ADICHS0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 325 + #define IP12_27_24 FM(RTS1_N) FM(HRTS1_N_A) FM(MSIOF1_TXD_B) F_(0, 0) F_(0, 0) FM(TS_SDAT1_C) FM(STP_ISD_1_C) FM(RIF1_D1_B) F_(0, 0) FM(ADICHS0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 326 326 #define IP12_31_28 FM(SCK2) FM(SCIF_CLK_B) FM(MSIOF1_SCK_B) F_(0, 0) F_(0, 0) FM(TS_SCK1_C) FM(STP_ISCLK_1_C) FM(RIF1_CLK_B) F_(0, 0) FM(ADICLK) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 327 327 #define IP13_3_0 FM(TX2_A) F_(0, 0) F_(0, 0) FM(SD2_CD_B) FM(SCL1_A) F_(0, 0) FM(FMCLK_A) FM(RIF1_D1_C) F_(0, 0) FM(FSO_CFE_0_N) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 328 328 #define IP13_7_4 FM(RX2_A) F_(0, 0) F_(0, 0) FM(SD2_WP_B) FM(SDA1_A) F_(0, 0) FM(FMIN_A) FM(RIF1_SYNC_C) F_(0, 0) FM(FSO_CFE_1_N) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) ··· 626 626 627 627 PINMUX_IPSR_MSEL(IP0_23_20, AVB_AVTP_CAPTURE_A, SEL_ETHERAVB_0), 628 628 PINMUX_IPSR_MSEL(IP0_23_20, MSIOF2_TXD_C, SEL_MSIOF2_2), 629 - PINMUX_IPSR_MSEL(IP0_23_20, RTS4_N_TANS_A, SEL_SCIF4_0), 629 + PINMUX_IPSR_MSEL(IP0_23_20, RTS4_N_A, SEL_SCIF4_0), 630 630 631 631 PINMUX_IPSR_GPSR(IP0_27_24, IRQ0), 632 632 PINMUX_IPSR_GPSR(IP0_27_24, QPOLB), ··· 654 654 655 655 PINMUX_IPSR_GPSR(IP1_7_4, IRQ3), 656 656 PINMUX_IPSR_GPSR(IP1_7_4, QSTVB_QVE), 657 - PINMUX_IPSR_GPSR(IP1_7_4, A25), 658 657 PINMUX_IPSR_GPSR(IP1_7_4, DU_DOTCLKOUT1), 659 658 PINMUX_IPSR_MSEL(IP1_7_4, VI4_DATA3_B, SEL_VIN4_1), 660 659 PINMUX_IPSR_MSEL(IP1_7_4, PWM4_B, SEL_PWM4_1), ··· 661 662 662 663 PINMUX_IPSR_GPSR(IP1_11_8, IRQ4), 663 664 PINMUX_IPSR_GPSR(IP1_11_8, QSTH_QHS), 664 - PINMUX_IPSR_GPSR(IP1_11_8, A24), 665 665 PINMUX_IPSR_GPSR(IP1_11_8, DU_EXHSYNC_DU_HSYNC), 666 666 PINMUX_IPSR_MSEL(IP1_11_8, VI4_DATA4_B, SEL_VIN4_1), 667 667 PINMUX_IPSR_MSEL(IP1_11_8, PWM5_B, SEL_PWM5_1), ··· 668 670 669 671 PINMUX_IPSR_GPSR(IP1_15_12, IRQ5), 670 672 PINMUX_IPSR_GPSR(IP1_15_12, QSTB_QHE), 671 - PINMUX_IPSR_GPSR(IP1_15_12, A23), 672 673 PINMUX_IPSR_GPSR(IP1_15_12, DU_EXVSYNC_DU_VSYNC), 673 674 PINMUX_IPSR_MSEL(IP1_15_12, VI4_DATA5_B, SEL_VIN4_1), 674 675 PINMUX_IPSR_MSEL(IP1_15_12, PWM6_B, SEL_PWM6_1), ··· 675 678 676 679 PINMUX_IPSR_GPSR(IP1_19_16, PWM0), 677 680 PINMUX_IPSR_GPSR(IP1_19_16, AVB_AVTP_PPS), 678 - PINMUX_IPSR_GPSR(IP1_19_16, A22), 679 681 PINMUX_IPSR_MSEL(IP1_19_16, VI4_DATA6_B, SEL_VIN4_1), 680 682 PINMUX_IPSR_MSEL(IP1_19_16, IECLK_B, SEL_IEBUS_1), 681 683 682 684 PINMUX_IPSR_MSEL(IP1_23_20, PWM1_A, SEL_PWM1_0), 683 - PINMUX_IPSR_GPSR(IP1_23_20, A21), 684 685 PINMUX_IPSR_MSEL(IP1_23_20, HRX3_D, SEL_HSCIF3_3), 685 686 PINMUX_IPSR_MSEL(IP1_23_20, VI4_DATA7_B, SEL_VIN4_1), 686 687 PINMUX_IPSR_MSEL(IP1_23_20, IERX_B, SEL_IEBUS_1), 687 688 688 689 PINMUX_IPSR_MSEL(IP1_27_24, PWM2_A, SEL_PWM2_0), 689 - PINMUX_IPSR_GPSR(IP1_27_24, A20), 690 690 PINMUX_IPSR_MSEL(IP1_27_24, HTX3_D, SEL_HSCIF3_3), 691 691 PINMUX_IPSR_MSEL(IP1_27_24, IETX_B, SEL_IEBUS_1), 692 692 ··· 763 769 764 770 PINMUX_IPSR_GPSR(IP3_7_4, A10), 765 771 PINMUX_IPSR_MSEL(IP3_7_4, MSIOF2_RXD_A, SEL_MSIOF2_0), 766 - PINMUX_IPSR_MSEL(IP3_7_4, RTS4_N_TANS_B, SEL_SCIF4_1), 772 + PINMUX_IPSR_MSEL(IP3_7_4, RTS4_N_B, SEL_SCIF4_1), 767 773 PINMUX_IPSR_GPSR(IP3_7_4, VI5_HSYNC_N), 768 774 769 775 PINMUX_IPSR_GPSR(IP3_11_8, A11), ··· 866 872 867 873 PINMUX_IPSR_GPSR(IP5_7_4, WE1_N), 868 874 PINMUX_IPSR_MSEL(IP5_7_4, MSIOF3_SS1_D, SEL_MSIOF3_3), 869 - PINMUX_IPSR_GPSR(IP5_7_4, RTS3_N_TANS), 875 + PINMUX_IPSR_GPSR(IP5_7_4, RTS3_N), 870 876 PINMUX_IPSR_GPSR(IP5_7_4, HRTS3_N), 871 877 PINMUX_IPSR_MSEL(IP5_7_4, SDA6_B, SEL_I2C6_1), 872 878 PINMUX_IPSR_GPSR(IP5_7_4, CAN1_RX), ··· 947 953 PINMUX_IPSR_MSEL(IP6_27_24, MSIOF2_TXD_D, SEL_MSIOF2_3), 948 954 PINMUX_IPSR_MSEL(IP6_27_24, HTX3_B, SEL_HSCIF3_1), 949 955 PINMUX_IPSR_MSEL(IP6_27_24, VI4_DATA3_A, SEL_VIN4_0), 950 - PINMUX_IPSR_MSEL(IP6_27_24, RTS4_N_TANS_C, SEL_SCIF4_2), 956 + PINMUX_IPSR_MSEL(IP6_27_24, RTS4_N_C, SEL_SCIF4_2), 951 957 PINMUX_IPSR_GPSR(IP6_27_24, DU_DR3), 952 958 953 959 PINMUX_IPSR_GPSR(IP6_31_28, D12), ··· 1155 1161 PINMUX_IPSR_GPSR(IP12_7_4, AUDIO_CLKOUT_C), 1156 1162 PINMUX_IPSR_GPSR(IP12_7_4, ADICS_SAMP), 1157 1163 1158 - PINMUX_IPSR_GPSR(IP12_11_8, RTS0_N_TANS), 1164 + PINMUX_IPSR_GPSR(IP12_11_8, RTS0_N), 1159 1165 PINMUX_IPSR_MSEL(IP12_11_8, HRTS1_N_B, SEL_HSCIF1_1), 1160 1166 PINMUX_IPSR_MSEL(IP12_11_8, MSIOF1_SS1_B, SEL_MSIOF1_1), 1161 1167 PINMUX_IPSR_MSEL(IP12_11_8, AUDIO_CLKA_B, SEL_ADG_A_1), ··· 1184 1190 PINMUX_IPSR_MSEL(IP12_23_20, RIF1_D0_B, SEL_DRIF1_1), 1185 1191 PINMUX_IPSR_GPSR(IP12_23_20, ADIDATA), 1186 1192 1187 - PINMUX_IPSR_GPSR(IP12_27_24, RTS1_N_TANS), 1193 + PINMUX_IPSR_GPSR(IP12_27_24, RTS1_N), 1188 1194 PINMUX_IPSR_MSEL(IP12_27_24, HRTS1_N_A, SEL_HSCIF1_0), 1189 1195 PINMUX_IPSR_MSEL(IP12_27_24, MSIOF1_TXD_B, SEL_MSIOF1_1), 1190 1196 PINMUX_IPSR_MSEL(IP12_27_24, TS_SDAT1_C, SEL_TSIF1_2), ··· 3249 3255 RCAR_GP_PIN(5, 4), RCAR_GP_PIN(5, 3), 3250 3256 }; 3251 3257 static const unsigned int scif0_ctrl_mux[] = { 3252 - RTS0_N_TANS_MARK, CTS0_N_MARK, 3258 + RTS0_N_MARK, CTS0_N_MARK, 3253 3259 }; 3254 3260 /* - SCIF1 ------------------------------------------------------------------ */ 3255 3261 static const unsigned int scif1_data_a_pins[] = { ··· 3271 3277 RCAR_GP_PIN(5, 8), RCAR_GP_PIN(5, 7), 3272 3278 }; 3273 3279 static const unsigned int scif1_ctrl_mux[] = { 3274 - RTS1_N_TANS_MARK, CTS1_N_MARK, 3280 + RTS1_N_MARK, CTS1_N_MARK, 3275 3281 }; 3276 3282 3277 3283 static const unsigned int scif1_data_b_pins[] = { ··· 3323 3329 RCAR_GP_PIN(1, 26), RCAR_GP_PIN(1, 25), 3324 3330 }; 3325 3331 static const unsigned int scif3_ctrl_mux[] = { 3326 - RTS3_N_TANS_MARK, CTS3_N_MARK, 3332 + RTS3_N_MARK, CTS3_N_MARK, 3327 3333 }; 3328 3334 static const unsigned int scif3_data_b_pins[] = { 3329 3335 /* RX, TX */ ··· 3352 3358 RCAR_GP_PIN(2, 14), RCAR_GP_PIN(2, 13), 3353 3359 }; 3354 3360 static const unsigned int scif4_ctrl_a_mux[] = { 3355 - RTS4_N_TANS_A_MARK, CTS4_N_A_MARK, 3361 + RTS4_N_A_MARK, CTS4_N_A_MARK, 3356 3362 }; 3357 3363 static const unsigned int scif4_data_b_pins[] = { 3358 3364 /* RX, TX */ ··· 3373 3379 RCAR_GP_PIN(1, 10), RCAR_GP_PIN(1, 9), 3374 3380 }; 3375 3381 static const unsigned int scif4_ctrl_b_mux[] = { 3376 - RTS4_N_TANS_B_MARK, CTS4_N_B_MARK, 3382 + RTS4_N_B_MARK, CTS4_N_B_MARK, 3377 3383 }; 3378 3384 static const unsigned int scif4_data_c_pins[] = { 3379 3385 /* RX, TX */ ··· 3394 3400 RCAR_GP_PIN(0, 11), RCAR_GP_PIN(0, 10), 3395 3401 }; 3396 3402 static const unsigned int scif4_ctrl_c_mux[] = { 3397 - RTS4_N_TANS_C_MARK, CTS4_N_C_MARK, 3403 + RTS4_N_C_MARK, CTS4_N_C_MARK, 3398 3404 }; 3399 3405 /* - SCIF5 ------------------------------------------------------------------ */ 3400 3406 static const unsigned int scif5_data_a_pins[] = { ··· 5400 5406 { RCAR_GP_PIN(5, 3), 0, 3 }, /* CTS0 */ 5401 5407 } }, 5402 5408 { PINMUX_DRIVE_REG("DRVCTRL18", 0xe6060348) { 5403 - { RCAR_GP_PIN(5, 4), 28, 3 }, /* RTS0_TANS */ 5409 + { RCAR_GP_PIN(5, 4), 28, 3 }, /* RTS0 */ 5404 5410 { RCAR_GP_PIN(5, 5), 24, 3 }, /* RX1 */ 5405 5411 { RCAR_GP_PIN(5, 6), 20, 3 }, /* TX1 */ 5406 5412 { RCAR_GP_PIN(5, 7), 16, 3 }, /* CTS1 */ 5407 - { RCAR_GP_PIN(5, 8), 12, 3 }, /* RTS1_TANS */ 5413 + { RCAR_GP_PIN(5, 8), 12, 3 }, /* RTS1 */ 5408 5414 { RCAR_GP_PIN(5, 9), 8, 3 }, /* SCK2 */ 5409 5415 { RCAR_GP_PIN(5, 10), 4, 3 }, /* TX2 */ 5410 5416 { RCAR_GP_PIN(5, 11), 0, 3 }, /* RX2 */ ··· 5649 5655 [13] = RCAR_GP_PIN(5, 1), /* RX0 */ 5650 5656 [14] = RCAR_GP_PIN(5, 2), /* TX0 */ 5651 5657 [15] = RCAR_GP_PIN(5, 3), /* CTS0_N */ 5652 - [16] = RCAR_GP_PIN(5, 4), /* RTS0_N_TANS */ 5658 + [16] = RCAR_GP_PIN(5, 4), /* RTS0_N */ 5653 5659 [17] = RCAR_GP_PIN(5, 5), /* RX1_A */ 5654 5660 [18] = RCAR_GP_PIN(5, 6), /* TX1_A */ 5655 5661 [19] = RCAR_GP_PIN(5, 7), /* CTS1_N */ 5656 - [20] = RCAR_GP_PIN(5, 8), /* RTS1_N_TANS */ 5662 + [20] = RCAR_GP_PIN(5, 8), /* RTS1_N */ 5657 5663 [21] = RCAR_GP_PIN(5, 9), /* SCK2 */ 5658 5664 [22] = RCAR_GP_PIN(5, 10), /* TX2_A */ 5659 5665 [23] = RCAR_GP_PIN(5, 11), /* RX2_A */
+2329
drivers/pinctrl/sh-pfc/pfc-r8a77970.c
··· 1 + /* 2 + * R8A77970 processor support - PFC hardware block. 3 + * 4 + * Copyright (C) 2016 Renesas Electronics Corp. 5 + * Copyright (C) 2017 Cogent Embedded, Inc. <source@cogentembedded.com> 6 + * 7 + * This file is based on the drivers/pinctrl/sh-pfc/pfc-r8a7795.c 8 + * 9 + * R-Car Gen3 processor support - PFC hardware block. 10 + * 11 + * Copyright (C) 2015 Renesas Electronics Corporation 12 + * 13 + * This program is free software; you can redistribute it and/or modify 14 + * it under the terms of the GNU General Public License as published by 15 + * the Free Software Foundation; version 2 of the License. 16 + */ 17 + 18 + #include <linux/io.h> 19 + #include <linux/kernel.h> 20 + 21 + #include "core.h" 22 + #include "sh_pfc.h" 23 + 24 + #define CPU_ALL_PORT(fn, sfx) \ 25 + PORT_GP_CFG_22(0, fn, sfx, SH_PFC_PIN_CFG_DRIVE_STRENGTH), \ 26 + PORT_GP_CFG_28(1, fn, sfx, SH_PFC_PIN_CFG_DRIVE_STRENGTH), \ 27 + PORT_GP_CFG_17(2, fn, sfx, SH_PFC_PIN_CFG_DRIVE_STRENGTH), \ 28 + PORT_GP_CFG_17(3, fn, sfx, SH_PFC_PIN_CFG_DRIVE_STRENGTH), \ 29 + PORT_GP_CFG_6(4, fn, sfx, SH_PFC_PIN_CFG_DRIVE_STRENGTH), \ 30 + PORT_GP_CFG_15(5, fn, sfx, SH_PFC_PIN_CFG_DRIVE_STRENGTH) 31 + /* 32 + * F_() : just information 33 + * FM() : macro for FN_xxx / xxx_MARK 34 + */ 35 + 36 + /* GPSR0 */ 37 + #define GPSR0_21 F_(DU_EXODDF_DU_ODDF_DISP_CDE, IP2_23_20) 38 + #define GPSR0_20 F_(DU_EXVSYNC_DU_VSYNC, IP2_19_16) 39 + #define GPSR0_19 F_(DU_EXHSYNC_DU_HSYNC, IP2_15_12) 40 + #define GPSR0_18 F_(DU_DOTCLKOUT, IP2_11_8) 41 + #define GPSR0_17 F_(DU_DB7, IP2_7_4) 42 + #define GPSR0_16 F_(DU_DB6, IP2_3_0) 43 + #define GPSR0_15 F_(DU_DB5, IP1_31_28) 44 + #define GPSR0_14 F_(DU_DB4, IP1_27_24) 45 + #define GPSR0_13 F_(DU_DB3, IP1_23_20) 46 + #define GPSR0_12 F_(DU_DB2, IP1_19_16) 47 + #define GPSR0_11 F_(DU_DG7, IP1_15_12) 48 + #define GPSR0_10 F_(DU_DG6, IP1_11_8) 49 + #define GPSR0_9 F_(DU_DG5, IP1_7_4) 50 + #define GPSR0_8 F_(DU_DG4, IP1_3_0) 51 + #define GPSR0_7 F_(DU_DG3, IP0_31_28) 52 + #define GPSR0_6 F_(DU_DG2, IP0_27_24) 53 + #define GPSR0_5 F_(DU_DR7, IP0_23_20) 54 + #define GPSR0_4 F_(DU_DR6, IP0_19_16) 55 + #define GPSR0_3 F_(DU_DR5, IP0_15_12) 56 + #define GPSR0_2 F_(DU_DR4, IP0_11_8) 57 + #define GPSR0_1 F_(DU_DR3, IP0_7_4) 58 + #define GPSR0_0 F_(DU_DR2, IP0_3_0) 59 + 60 + /* GPSR1 */ 61 + #define GPSR1_27 F_(DIGRF_CLKOUT, IP8_27_24) 62 + #define GPSR1_26 F_(DIGRF_CLKIN, IP8_23_20) 63 + #define GPSR1_25 F_(CANFD_CLK_A, IP8_19_16) 64 + #define GPSR1_24 F_(CANFD1_RX, IP8_15_12) 65 + #define GPSR1_23 F_(CANFD1_TX, IP8_11_8) 66 + #define GPSR1_22 F_(CANFD0_RX_A, IP8_7_4) 67 + #define GPSR1_21 F_(CANFD0_TX_A, IP8_3_0) 68 + #define GPSR1_20 F_(AVB0_AVTP_CAPTURE, IP7_31_28) 69 + #define GPSR1_19 FM(AVB0_AVTP_MATCH) 70 + #define GPSR1_18 FM(AVB0_LINK) 71 + #define GPSR1_17 FM(AVB0_PHY_INT) 72 + #define GPSR1_16 FM(AVB0_MAGIC) 73 + #define GPSR1_15 FM(AVB0_MDC) 74 + #define GPSR1_14 FM(AVB0_MDIO) 75 + #define GPSR1_13 FM(AVB0_TXCREFCLK) 76 + #define GPSR1_12 FM(AVB0_TD3) 77 + #define GPSR1_11 FM(AVB0_TD2) 78 + #define GPSR1_10 FM(AVB0_TD1) 79 + #define GPSR1_9 FM(AVB0_TD0) 80 + #define GPSR1_8 FM(AVB0_TXC) 81 + #define GPSR1_7 FM(AVB0_TX_CTL) 82 + #define GPSR1_6 FM(AVB0_RD3) 83 + #define GPSR1_5 FM(AVB0_RD2) 84 + #define GPSR1_4 FM(AVB0_RD1) 85 + #define GPSR1_3 FM(AVB0_RD0) 86 + #define GPSR1_2 FM(AVB0_RXC) 87 + #define GPSR1_1 FM(AVB0_RX_CTL) 88 + #define GPSR1_0 F_(IRQ0, IP2_27_24) 89 + 90 + /* GPSR2 */ 91 + #define GPSR2_16 F_(VI0_FIELD, IP4_31_28) 92 + #define GPSR2_15 F_(VI0_DATA11, IP4_27_24) 93 + #define GPSR2_14 F_(VI0_DATA10, IP4_23_20) 94 + #define GPSR2_13 F_(VI0_DATA9, IP4_19_16) 95 + #define GPSR2_12 F_(VI0_DATA8, IP4_15_12) 96 + #define GPSR2_11 F_(VI0_DATA7, IP4_11_8) 97 + #define GPSR2_10 F_(VI0_DATA6, IP4_7_4) 98 + #define GPSR2_9 F_(VI0_DATA5, IP4_3_0) 99 + #define GPSR2_8 F_(VI0_DATA4, IP3_31_28) 100 + #define GPSR2_7 F_(VI0_DATA3, IP3_27_24) 101 + #define GPSR2_6 F_(VI0_DATA2, IP3_23_20) 102 + #define GPSR2_5 F_(VI0_DATA1, IP3_19_16) 103 + #define GPSR2_4 F_(VI0_DATA0, IP3_15_12) 104 + #define GPSR2_3 F_(VI0_VSYNC_N, IP3_11_8) 105 + #define GPSR2_2 F_(VI0_HSYNC_N, IP3_7_4) 106 + #define GPSR2_1 F_(VI0_CLKENB, IP3_3_0) 107 + #define GPSR2_0 F_(VI0_CLK, IP2_31_28) 108 + 109 + /* GPSR3 */ 110 + #define GPSR3_16 F_(VI1_FIELD, IP7_3_0) 111 + #define GPSR3_15 F_(VI1_DATA11, IP6_31_28) 112 + #define GPSR3_14 F_(VI1_DATA10, IP6_27_24) 113 + #define GPSR3_13 F_(VI1_DATA9, IP6_23_20) 114 + #define GPSR3_12 F_(VI1_DATA8, IP6_19_16) 115 + #define GPSR3_11 F_(VI1_DATA7, IP6_15_12) 116 + #define GPSR3_10 F_(VI1_DATA6, IP6_11_8) 117 + #define GPSR3_9 F_(VI1_DATA5, IP6_7_4) 118 + #define GPSR3_8 F_(VI1_DATA4, IP6_3_0) 119 + #define GPSR3_7 F_(VI1_DATA3, IP5_31_28) 120 + #define GPSR3_6 F_(VI1_DATA2, IP5_27_24) 121 + #define GPSR3_5 F_(VI1_DATA1, IP5_23_20) 122 + #define GPSR3_4 F_(VI1_DATA0, IP5_19_16) 123 + #define GPSR3_3 F_(VI1_VSYNC_N, IP5_15_12) 124 + #define GPSR3_2 F_(VI1_HSYNC_N, IP5_11_8) 125 + #define GPSR3_1 F_(VI1_CLKENB, IP5_7_4) 126 + #define GPSR3_0 F_(VI1_CLK, IP5_3_0) 127 + 128 + /* GPSR4 */ 129 + #define GPSR4_5 F_(SDA2, IP7_27_24) 130 + #define GPSR4_4 F_(SCL2, IP7_23_20) 131 + #define GPSR4_3 F_(SDA1, IP7_19_16) 132 + #define GPSR4_2 F_(SCL1, IP7_15_12) 133 + #define GPSR4_1 F_(SDA0, IP7_11_8) 134 + #define GPSR4_0 F_(SCL0, IP7_7_4) 135 + 136 + /* GPSR5 */ 137 + #define GPSR5_14 FM(RPC_INT_N) 138 + #define GPSR5_13 FM(RPC_WP_N) 139 + #define GPSR5_12 FM(RPC_RESET_N) 140 + #define GPSR5_11 FM(QSPI1_SSL) 141 + #define GPSR5_10 FM(QSPI1_IO3) 142 + #define GPSR5_9 FM(QSPI1_IO2) 143 + #define GPSR5_8 FM(QSPI1_MISO_IO1) 144 + #define GPSR5_7 FM(QSPI1_MOSI_IO0) 145 + #define GPSR5_6 FM(QSPI1_SPCLK) 146 + #define GPSR5_5 FM(QSPI0_SSL) 147 + #define GPSR5_4 FM(QSPI0_IO3) 148 + #define GPSR5_3 FM(QSPI0_IO2) 149 + #define GPSR5_2 FM(QSPI0_MISO_IO1) 150 + #define GPSR5_1 FM(QSPI0_MOSI_IO0) 151 + #define GPSR5_0 FM(QSPI0_SPCLK) 152 + 153 + 154 + /* IPSRx */ /* 0 */ /* 1 */ /* 2 */ /* 3 */ /* 4 */ /* 5 */ /* 6 - F */ 155 + #define IP0_3_0 FM(DU_DR2) FM(HSCK0) F_(0, 0) FM(A0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 156 + #define IP0_7_4 FM(DU_DR3) FM(HRTS0_N) F_(0, 0) FM(A1) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 157 + #define IP0_11_8 FM(DU_DR4) FM(HCTS0_N) F_(0, 0) FM(A2) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 158 + #define IP0_15_12 FM(DU_DR5) FM(HTX0) F_(0, 0) FM(A3) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 159 + #define IP0_19_16 FM(DU_DR6) FM(MSIOF3_RXD) F_(0, 0) FM(A4) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 160 + #define IP0_23_20 FM(DU_DR7) FM(MSIOF3_TXD) F_(0, 0) FM(A5) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 161 + #define IP0_27_24 FM(DU_DG2) FM(MSIOF3_SS1) F_(0, 0) FM(A6) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 162 + #define IP0_31_28 FM(DU_DG3) FM(MSIOF3_SS2) F_(0, 0) FM(A7) FM(PWMFSW0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 163 + #define IP1_3_0 FM(DU_DG4) F_(0, 0) F_(0, 0) FM(A8) FM(FSO_CFE_0_N_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 164 + #define IP1_7_4 FM(DU_DG5) F_(0, 0) F_(0, 0) FM(A9) FM(FSO_CFE_1_N_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 165 + #define IP1_11_8 FM(DU_DG6) F_(0, 0) F_(0, 0) FM(A10) FM(FSO_TOE_N_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 166 + #define IP1_15_12 FM(DU_DG7) F_(0, 0) F_(0, 0) FM(A11) FM(IRQ1) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 167 + #define IP1_19_16 FM(DU_DB2) F_(0, 0) F_(0, 0) FM(A12) FM(IRQ2) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 168 + #define IP1_23_20 FM(DU_DB3) F_(0, 0) F_(0, 0) FM(A13) FM(FXR_CLKOUT1) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 169 + #define IP1_27_24 FM(DU_DB4) F_(0, 0) F_(0, 0) FM(A14) FM(FXR_CLKOUT2) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 170 + #define IP1_31_28 FM(DU_DB5) F_(0, 0) F_(0, 0) FM(A15) FM(FXR_TXENA_N) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 171 + #define IP2_3_0 FM(DU_DB6) F_(0, 0) F_(0, 0) FM(A16) FM(FXR_TXENB_N) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 172 + #define IP2_7_4 FM(DU_DB7) F_(0, 0) F_(0, 0) FM(A17) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 173 + #define IP2_11_8 FM(DU_DOTCLKOUT) FM(SCIF_CLK_A) F_(0, 0) FM(A18) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 174 + #define IP2_15_12 FM(DU_EXHSYNC_DU_HSYNC) FM(HRX0) F_(0, 0) FM(A19) FM(IRQ3) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 175 + #define IP2_19_16 FM(DU_EXVSYNC_DU_VSYNC) FM(MSIOF3_SCK) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 176 + #define IP2_23_20 FM(DU_EXODDF_DU_ODDF_DISP_CDE) FM(MSIOF3_SYNC) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 177 + #define IP2_27_24 FM(IRQ0) FM(CC5_OSCOUT) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 178 + #define IP2_31_28 FM(VI0_CLK) FM(MSIOF2_SCK) FM(SCK3) F_(0, 0) FM(HSCK3) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 179 + #define IP3_3_0 FM(VI0_CLKENB) FM(MSIOF2_RXD) FM(RX3) FM(RD_WR_N) FM(HCTS3_N) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 180 + #define IP3_7_4 FM(VI0_HSYNC_N) FM(MSIOF2_TXD) FM(TX3) F_(0, 0) FM(HRTS3_N) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 181 + #define IP3_11_8 FM(VI0_VSYNC_N) FM(MSIOF2_SYNC) FM(CTS3_N) F_(0, 0) FM(HTX3) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 182 + #define IP3_15_12 FM(VI0_DATA0) FM(MSIOF2_SS1) FM(RTS3_N_TANS) F_(0, 0) FM(HRX3) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 183 + #define IP3_19_16 FM(VI0_DATA1) FM(MSIOF2_SS2) FM(SCK1) F_(0, 0) FM(SPEEDIN_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 184 + #define IP3_23_20 FM(VI0_DATA2) FM(AVB0_AVTP_PPS) FM(SDA3_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 185 + #define IP3_27_24 FM(VI0_DATA3) FM(HSCK1) FM(SCL3_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 186 + #define IP3_31_28 FM(VI0_DATA4) FM(HRTS1_N) FM(RX1_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 187 + #define IP4_3_0 FM(VI0_DATA5) FM(HCTS1_N) FM(TX1_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 188 + #define IP4_7_4 FM(VI0_DATA6) FM(HTX1) FM(CTS1_N) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 189 + #define IP4_11_8 FM(VI0_DATA7) FM(HRX1) FM(RTS1_N_TANS) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 190 + #define IP4_15_12 FM(VI0_DATA8) FM(HSCK2) FM(PWM0_A) FM(A22) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 191 + #define IP4_19_16 FM(VI0_DATA9) FM(HCTS2_N) FM(PWM1_A) FM(A23) FM(FSO_CFE_0_N_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 192 + #define IP4_23_20 FM(VI0_DATA10) FM(HRTS2_N) FM(PWM2_A) FM(A24) FM(FSO_CFE_1_N_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 193 + #define IP4_27_24 FM(VI0_DATA11) FM(HTX2) FM(PWM3_A) FM(A25) FM(FSO_TOE_N_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 194 + #define IP4_31_28 FM(VI0_FIELD) FM(HRX2) FM(PWM4_A) FM(CS1_N) FM(FSCLKST2_N_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 195 + #define IP5_3_0 FM(VI1_CLK) FM(MSIOF1_RXD) F_(0, 0) FM(CS0_N) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 196 + #define IP5_7_4 FM(VI1_CLKENB) FM(MSIOF1_TXD) F_(0, 0) FM(D0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 197 + #define IP5_11_8 FM(VI1_HSYNC_N) FM(MSIOF1_SCK) F_(0, 0) FM(D1) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 198 + #define IP5_15_12 FM(VI1_VSYNC_N) FM(MSIOF1_SYNC) F_(0, 0) FM(D2) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 199 + #define IP5_19_16 FM(VI1_DATA0) FM(MSIOF1_SS1) F_(0, 0) FM(D3) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 200 + #define IP5_23_20 FM(VI1_DATA1) FM(MSIOF1_SS2) F_(0, 0) FM(D4) FM(MMC_CMD) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 201 + #define IP5_27_24 FM(VI1_DATA2) FM(CANFD0_TX_B) F_(0, 0) FM(D5) FM(MMC_D0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 202 + #define IP5_31_28 FM(VI1_DATA3) FM(CANFD0_RX_B) F_(0, 0) FM(D6) FM(MMC_D1) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 203 + #define IP6_3_0 FM(VI1_DATA4) FM(CANFD_CLK_B) F_(0, 0) FM(D7) FM(MMC_D2) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 204 + #define IP6_7_4 FM(VI1_DATA5) F_(0,0) FM(SCK4) FM(D8) FM(MMC_D3) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 205 + #define IP6_11_8 FM(VI1_DATA6) F_(0,0) FM(RX4) FM(D9) FM(MMC_CLK) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 206 + #define IP6_15_12 FM(VI1_DATA7) F_(0,0) FM(TX4) FM(D10) FM(MMC_D4) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 207 + #define IP6_19_16 FM(VI1_DATA8) F_(0,0) FM(CTS4_N) FM(D11) FM(MMC_D5) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 208 + #define IP6_23_20 FM(VI1_DATA9) F_(0,0) FM(RTS4_N_TANS) FM(D12) FM(MMC_D6) FM(SCL3_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 209 + #define IP6_27_24 FM(VI1_DATA10) F_(0,0) F_(0, 0) FM(D13) FM(MMC_D7) FM(SDA3_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 210 + #define IP6_31_28 FM(VI1_DATA11) FM(SCL4) FM(IRQ4) FM(D14) FM(MMC_WP) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 211 + #define IP7_3_0 FM(VI1_FIELD) FM(SDA4) FM(IRQ5) FM(D15) FM(MMC_CD) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 212 + #define IP7_7_4 FM(SCL0) FM(DU_DR0) FM(TPU0TO0) FM(CLKOUT) F_(0, 0) FM(MSIOF0_RXD) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 213 + #define IP7_11_8 FM(SDA0) FM(DU_DR1) FM(TPU0TO1) FM(BS_N) FM(SCK0) FM(MSIOF0_TXD) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 214 + #define IP7_15_12 FM(SCL1) FM(DU_DG0) FM(TPU0TO2) FM(RD_N) FM(CTS0_N) FM(MSIOF0_SCK) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 215 + #define IP7_19_16 FM(SDA1) FM(DU_DG1) FM(TPU0TO3) FM(WE0_N) FM(RTS0_N_TANS) FM(MSIOF0_SYNC) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 216 + #define IP7_23_20 FM(SCL2) FM(DU_DB0) FM(TCLK1_A) FM(WE1_N) FM(RX0) FM(MSIOF0_SS1) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 217 + #define IP7_27_24 FM(SDA2) FM(DU_DB1) FM(TCLK2_A) FM(EX_WAIT0) FM(TX0) FM(MSIOF0_SS2) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 218 + #define IP7_31_28 FM(AVB0_AVTP_CAPTURE) F_(0, 0) F_(0, 0) F_(0, 0) FM(FSCLKST2_N_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 219 + #define IP8_3_0 FM(CANFD0_TX_A) FM(FXR_TXDA) FM(PWM0_B) FM(DU_DISP) FM(FSCLKST2_N_C) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 220 + #define IP8_7_4 FM(CANFD0_RX_A) FM(RXDA_EXTFXR) FM(PWM1_B) FM(DU_CDE) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 221 + #define IP8_11_8 FM(CANFD1_TX) FM(FXR_TXDB) FM(PWM2_B) FM(TCLK1_B) FM(TX1_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 222 + #define IP8_15_12 FM(CANFD1_RX) FM(RXDB_EXTFXR) FM(PWM3_B) FM(TCLK2_B) FM(RX1_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 223 + #define IP8_19_16 FM(CANFD_CLK_A) FM(CLK_EXTFXR) FM(PWM4_B) FM(SPEEDIN_B) FM(SCIF_CLK_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 224 + #define IP8_23_20 FM(DIGRF_CLKIN) FM(DIGRF_CLKEN_IN) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 225 + #define IP8_27_24 FM(DIGRF_CLKOUT) FM(DIGRF_CLKEN_OUT) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 226 + #define IP8_31_28 F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 227 + 228 + #define PINMUX_GPSR \ 229 + \ 230 + GPSR1_27 \ 231 + GPSR1_26 \ 232 + GPSR1_25 \ 233 + GPSR1_24 \ 234 + GPSR1_23 \ 235 + GPSR1_22 \ 236 + GPSR0_21 GPSR1_21 \ 237 + GPSR0_20 GPSR1_20 \ 238 + GPSR0_19 GPSR1_19 \ 239 + GPSR0_18 GPSR1_18 \ 240 + GPSR0_17 GPSR1_17 \ 241 + GPSR0_16 GPSR1_16 GPSR2_16 GPSR3_16 \ 242 + GPSR0_15 GPSR1_15 GPSR2_15 GPSR3_15 \ 243 + GPSR0_14 GPSR1_14 GPSR2_14 GPSR3_14 GPSR5_14 \ 244 + GPSR0_13 GPSR1_13 GPSR2_13 GPSR3_13 GPSR5_13 \ 245 + GPSR0_12 GPSR1_12 GPSR2_12 GPSR3_12 GPSR5_12 \ 246 + GPSR0_11 GPSR1_11 GPSR2_11 GPSR3_11 GPSR5_11 \ 247 + GPSR0_10 GPSR1_10 GPSR2_10 GPSR3_10 GPSR5_10 \ 248 + GPSR0_9 GPSR1_9 GPSR2_9 GPSR3_9 GPSR5_9 \ 249 + GPSR0_8 GPSR1_8 GPSR2_8 GPSR3_8 GPSR5_8 \ 250 + GPSR0_7 GPSR1_7 GPSR2_7 GPSR3_7 GPSR5_7 \ 251 + GPSR0_6 GPSR1_6 GPSR2_6 GPSR3_6 GPSR5_6 \ 252 + GPSR0_5 GPSR1_5 GPSR2_5 GPSR3_5 GPSR4_5 GPSR5_5 \ 253 + GPSR0_4 GPSR1_4 GPSR2_4 GPSR3_4 GPSR4_4 GPSR5_4 \ 254 + GPSR0_3 GPSR1_3 GPSR2_3 GPSR3_3 GPSR4_3 GPSR5_3 \ 255 + GPSR0_2 GPSR1_2 GPSR2_2 GPSR3_2 GPSR4_2 GPSR5_2 \ 256 + GPSR0_1 GPSR1_1 GPSR2_1 GPSR3_1 GPSR4_1 GPSR5_1 \ 257 + GPSR0_0 GPSR1_0 GPSR2_0 GPSR3_0 GPSR4_0 GPSR5_0 258 + 259 + #define PINMUX_IPSR \ 260 + \ 261 + FM(IP0_3_0) IP0_3_0 FM(IP1_3_0) IP1_3_0 FM(IP2_3_0) IP2_3_0 FM(IP3_3_0) IP3_3_0 \ 262 + FM(IP0_7_4) IP0_7_4 FM(IP1_7_4) IP1_7_4 FM(IP2_7_4) IP2_7_4 FM(IP3_7_4) IP3_7_4 \ 263 + FM(IP0_11_8) IP0_11_8 FM(IP1_11_8) IP1_11_8 FM(IP2_11_8) IP2_11_8 FM(IP3_11_8) IP3_11_8 \ 264 + FM(IP0_15_12) IP0_15_12 FM(IP1_15_12) IP1_15_12 FM(IP2_15_12) IP2_15_12 FM(IP3_15_12) IP3_15_12 \ 265 + FM(IP0_19_16) IP0_19_16 FM(IP1_19_16) IP1_19_16 FM(IP2_19_16) IP2_19_16 FM(IP3_19_16) IP3_19_16 \ 266 + FM(IP0_23_20) IP0_23_20 FM(IP1_23_20) IP1_23_20 FM(IP2_23_20) IP2_23_20 FM(IP3_23_20) IP3_23_20 \ 267 + FM(IP0_27_24) IP0_27_24 FM(IP1_27_24) IP1_27_24 FM(IP2_27_24) IP2_27_24 FM(IP3_27_24) IP3_27_24 \ 268 + FM(IP0_31_28) IP0_31_28 FM(IP1_31_28) IP1_31_28 FM(IP2_31_28) IP2_31_28 FM(IP3_31_28) IP3_31_28 \ 269 + \ 270 + FM(IP4_3_0) IP4_3_0 FM(IP5_3_0) IP5_3_0 FM(IP6_3_0) IP6_3_0 FM(IP7_3_0) IP7_3_0 \ 271 + FM(IP4_7_4) IP4_7_4 FM(IP5_7_4) IP5_7_4 FM(IP6_7_4) IP6_7_4 FM(IP7_7_4) IP7_7_4 \ 272 + FM(IP4_11_8) IP4_11_8 FM(IP5_11_8) IP5_11_8 FM(IP6_11_8) IP6_11_8 FM(IP7_11_8) IP7_11_8 \ 273 + FM(IP4_15_12) IP4_15_12 FM(IP5_15_12) IP5_15_12 FM(IP6_15_12) IP6_15_12 FM(IP7_15_12) IP7_15_12 \ 274 + FM(IP4_19_16) IP4_19_16 FM(IP5_19_16) IP5_19_16 FM(IP6_19_16) IP6_19_16 FM(IP7_19_16) IP7_19_16 \ 275 + FM(IP4_23_20) IP4_23_20 FM(IP5_23_20) IP5_23_20 FM(IP6_23_20) IP6_23_20 FM(IP7_23_20) IP7_23_20 \ 276 + FM(IP4_27_24) IP4_27_24 FM(IP5_27_24) IP5_27_24 FM(IP6_27_24) IP6_27_24 FM(IP7_27_24) IP7_27_24 \ 277 + FM(IP4_31_28) IP4_31_28 FM(IP5_31_28) IP5_31_28 FM(IP6_31_28) IP6_31_28 FM(IP7_31_28) IP7_31_28 \ 278 + \ 279 + FM(IP8_3_0) IP8_3_0 \ 280 + FM(IP8_7_4) IP8_7_4 \ 281 + FM(IP8_11_8) IP8_11_8 \ 282 + FM(IP8_15_12) IP8_15_12 \ 283 + FM(IP8_19_16) IP8_19_16 \ 284 + FM(IP8_23_20) IP8_23_20 \ 285 + FM(IP8_27_24) IP8_27_24 \ 286 + FM(IP8_31_28) IP8_31_28 287 + 288 + /* MOD_SEL0 */ /* 0 */ /* 1 */ 289 + #define MOD_SEL0_11 FM(SEL_I2C3_0) FM(SEL_I2C3_1) 290 + #define MOD_SEL0_10 FM(SEL_HSCIF0_0) FM(SEL_HSCIF0_1) 291 + #define MOD_SEL0_9 FM(SEL_SCIF1_0) FM(SEL_SCIF1_1) 292 + #define MOD_SEL0_8 FM(SEL_CANFD0_0) FM(SEL_CANFD0_1) 293 + #define MOD_SEL0_7 FM(SEL_PWM4_0) FM(SEL_PWM4_1) 294 + #define MOD_SEL0_6 FM(SEL_PWM3_0) FM(SEL_PWM3_1) 295 + #define MOD_SEL0_5 FM(SEL_PWM2_0) FM(SEL_PWM2_1) 296 + #define MOD_SEL0_4 FM(SEL_PWM1_0) FM(SEL_PWM1_1) 297 + #define MOD_SEL0_3 FM(SEL_PWM0_0) FM(SEL_PWM0_1) 298 + #define MOD_SEL0_2 FM(SEL_RFSO_0) FM(SEL_RFSO_1) 299 + #define MOD_SEL0_1 FM(SEL_RSP_0) FM(SEL_RSP_1) 300 + #define MOD_SEL0_0 FM(SEL_TMU_0) FM(SEL_TMU_1) 301 + 302 + #define PINMUX_MOD_SELS \ 303 + \ 304 + MOD_SEL0_11 \ 305 + MOD_SEL0_10 \ 306 + MOD_SEL0_9 \ 307 + MOD_SEL0_8 \ 308 + MOD_SEL0_7 \ 309 + MOD_SEL0_6 \ 310 + MOD_SEL0_5 \ 311 + MOD_SEL0_4 \ 312 + MOD_SEL0_3 \ 313 + MOD_SEL0_2 \ 314 + MOD_SEL0_1 \ 315 + MOD_SEL0_0 316 + 317 + enum { 318 + PINMUX_RESERVED = 0, 319 + 320 + PINMUX_DATA_BEGIN, 321 + GP_ALL(DATA), 322 + PINMUX_DATA_END, 323 + 324 + #define F_(x, y) 325 + #define FM(x) FN_##x, 326 + PINMUX_FUNCTION_BEGIN, 327 + GP_ALL(FN), 328 + PINMUX_GPSR 329 + PINMUX_IPSR 330 + PINMUX_MOD_SELS 331 + PINMUX_FUNCTION_END, 332 + #undef F_ 333 + #undef FM 334 + 335 + #define F_(x, y) 336 + #define FM(x) x##_MARK, 337 + PINMUX_MARK_BEGIN, 338 + PINMUX_GPSR 339 + PINMUX_IPSR 340 + PINMUX_MOD_SELS 341 + PINMUX_MARK_END, 342 + #undef F_ 343 + #undef FM 344 + }; 345 + 346 + static const u16 pinmux_data[] = { 347 + PINMUX_DATA_GP_ALL(), 348 + 349 + PINMUX_SINGLE(AVB0_RX_CTL), 350 + PINMUX_SINGLE(AVB0_RXC), 351 + PINMUX_SINGLE(AVB0_RD0), 352 + PINMUX_SINGLE(AVB0_RD1), 353 + PINMUX_SINGLE(AVB0_RD2), 354 + PINMUX_SINGLE(AVB0_RD3), 355 + PINMUX_SINGLE(AVB0_TX_CTL), 356 + PINMUX_SINGLE(AVB0_TXC), 357 + PINMUX_SINGLE(AVB0_TD0), 358 + PINMUX_SINGLE(AVB0_TD1), 359 + PINMUX_SINGLE(AVB0_TD2), 360 + PINMUX_SINGLE(AVB0_TD3), 361 + PINMUX_SINGLE(AVB0_TXCREFCLK), 362 + PINMUX_SINGLE(AVB0_MDIO), 363 + PINMUX_SINGLE(AVB0_MDC), 364 + PINMUX_SINGLE(AVB0_MAGIC), 365 + PINMUX_SINGLE(AVB0_PHY_INT), 366 + PINMUX_SINGLE(AVB0_LINK), 367 + PINMUX_SINGLE(AVB0_AVTP_MATCH), 368 + 369 + PINMUX_SINGLE(QSPI0_SPCLK), 370 + PINMUX_SINGLE(QSPI0_MOSI_IO0), 371 + PINMUX_SINGLE(QSPI0_MISO_IO1), 372 + PINMUX_SINGLE(QSPI0_IO2), 373 + PINMUX_SINGLE(QSPI0_IO3), 374 + PINMUX_SINGLE(QSPI0_SSL), 375 + PINMUX_SINGLE(QSPI1_SPCLK), 376 + PINMUX_SINGLE(QSPI1_MOSI_IO0), 377 + PINMUX_SINGLE(QSPI1_MISO_IO1), 378 + PINMUX_SINGLE(QSPI1_IO2), 379 + PINMUX_SINGLE(QSPI1_IO3), 380 + PINMUX_SINGLE(QSPI1_SSL), 381 + PINMUX_SINGLE(RPC_RESET_N), 382 + PINMUX_SINGLE(RPC_WP_N), 383 + PINMUX_SINGLE(RPC_INT_N), 384 + 385 + /* IPSR0 */ 386 + PINMUX_IPSR_GPSR(IP0_3_0, DU_DR2), 387 + PINMUX_IPSR_GPSR(IP0_3_0, HSCK0), 388 + PINMUX_IPSR_GPSR(IP0_3_0, A0), 389 + 390 + PINMUX_IPSR_GPSR(IP0_7_4, DU_DR3), 391 + PINMUX_IPSR_GPSR(IP0_7_4, HRTS0_N), 392 + PINMUX_IPSR_GPSR(IP0_7_4, A1), 393 + 394 + PINMUX_IPSR_GPSR(IP0_11_8, DU_DR4), 395 + PINMUX_IPSR_GPSR(IP0_11_8, HCTS0_N), 396 + PINMUX_IPSR_GPSR(IP0_11_8, A2), 397 + 398 + PINMUX_IPSR_GPSR(IP0_15_12, DU_DR5), 399 + PINMUX_IPSR_GPSR(IP0_15_12, HTX0), 400 + PINMUX_IPSR_GPSR(IP0_15_12, A3), 401 + 402 + PINMUX_IPSR_GPSR(IP0_19_16, DU_DR6), 403 + PINMUX_IPSR_GPSR(IP0_19_16, MSIOF3_RXD), 404 + PINMUX_IPSR_GPSR(IP0_19_16, A4), 405 + 406 + PINMUX_IPSR_GPSR(IP0_23_20, DU_DR7), 407 + PINMUX_IPSR_GPSR(IP0_23_20, MSIOF3_TXD), 408 + PINMUX_IPSR_GPSR(IP0_23_20, A5), 409 + 410 + PINMUX_IPSR_GPSR(IP0_27_24, DU_DG2), 411 + PINMUX_IPSR_GPSR(IP0_27_24, MSIOF3_SS1), 412 + PINMUX_IPSR_GPSR(IP0_27_24, A6), 413 + 414 + PINMUX_IPSR_GPSR(IP0_31_28, DU_DG3), 415 + PINMUX_IPSR_GPSR(IP0_31_28, MSIOF3_SS2), 416 + PINMUX_IPSR_GPSR(IP0_31_28, A7), 417 + PINMUX_IPSR_GPSR(IP0_31_28, PWMFSW0), 418 + 419 + /* IPSR1 */ 420 + PINMUX_IPSR_GPSR(IP1_3_0, DU_DG4), 421 + PINMUX_IPSR_GPSR(IP1_3_0, A8), 422 + PINMUX_IPSR_MSEL(IP1_3_0, FSO_CFE_0_N_A, SEL_RFSO_0), 423 + 424 + PINMUX_IPSR_GPSR(IP1_7_4, DU_DG5), 425 + PINMUX_IPSR_GPSR(IP1_7_4, A9), 426 + PINMUX_IPSR_MSEL(IP1_7_4, FSO_CFE_1_N_A, SEL_RFSO_0), 427 + 428 + PINMUX_IPSR_GPSR(IP1_11_8, DU_DG6), 429 + PINMUX_IPSR_GPSR(IP1_11_8, A10), 430 + PINMUX_IPSR_MSEL(IP1_11_8, FSO_TOE_N_A, SEL_RFSO_0), 431 + 432 + PINMUX_IPSR_GPSR(IP1_15_12, DU_DG7), 433 + PINMUX_IPSR_GPSR(IP1_15_12, A11), 434 + PINMUX_IPSR_GPSR(IP1_15_12, IRQ1), 435 + 436 + PINMUX_IPSR_GPSR(IP1_19_16, DU_DB2), 437 + PINMUX_IPSR_GPSR(IP1_19_16, A12), 438 + PINMUX_IPSR_GPSR(IP1_19_16, IRQ2), 439 + 440 + PINMUX_IPSR_GPSR(IP1_23_20, DU_DB3), 441 + PINMUX_IPSR_GPSR(IP1_23_20, A13), 442 + PINMUX_IPSR_GPSR(IP1_23_20, FXR_CLKOUT1), 443 + 444 + PINMUX_IPSR_GPSR(IP1_27_24, DU_DB4), 445 + PINMUX_IPSR_GPSR(IP1_27_24, A14), 446 + PINMUX_IPSR_GPSR(IP1_27_24, FXR_CLKOUT2), 447 + 448 + PINMUX_IPSR_GPSR(IP1_31_28, DU_DB5), 449 + PINMUX_IPSR_GPSR(IP1_31_28, A15), 450 + PINMUX_IPSR_GPSR(IP1_31_28, FXR_TXENA_N), 451 + 452 + /* IPSR2 */ 453 + PINMUX_IPSR_GPSR(IP2_3_0, DU_DB6), 454 + PINMUX_IPSR_GPSR(IP2_3_0, A16), 455 + PINMUX_IPSR_GPSR(IP2_3_0, FXR_TXENB_N), 456 + 457 + PINMUX_IPSR_GPSR(IP2_7_4, DU_DB7), 458 + PINMUX_IPSR_GPSR(IP2_7_4, A17), 459 + 460 + PINMUX_IPSR_GPSR(IP2_11_8, DU_DOTCLKOUT), 461 + PINMUX_IPSR_MSEL(IP2_11_8, SCIF_CLK_A, SEL_HSCIF0_0), 462 + PINMUX_IPSR_GPSR(IP2_11_8, A18), 463 + 464 + PINMUX_IPSR_GPSR(IP2_15_12, DU_EXHSYNC_DU_HSYNC), 465 + PINMUX_IPSR_GPSR(IP2_15_12, HRX0), 466 + PINMUX_IPSR_GPSR(IP2_15_12, A19), 467 + PINMUX_IPSR_GPSR(IP2_15_12, IRQ3), 468 + 469 + PINMUX_IPSR_GPSR(IP2_19_16, DU_EXVSYNC_DU_VSYNC), 470 + PINMUX_IPSR_GPSR(IP2_19_16, MSIOF3_SCK), 471 + 472 + PINMUX_IPSR_GPSR(IP2_23_20, DU_EXODDF_DU_ODDF_DISP_CDE), 473 + PINMUX_IPSR_GPSR(IP2_23_20, MSIOF3_SYNC), 474 + 475 + PINMUX_IPSR_GPSR(IP2_27_24, IRQ0), 476 + PINMUX_IPSR_GPSR(IP2_27_24, CC5_OSCOUT), 477 + 478 + PINMUX_IPSR_GPSR(IP2_31_28, VI0_CLK), 479 + PINMUX_IPSR_GPSR(IP2_31_28, MSIOF2_SCK), 480 + PINMUX_IPSR_GPSR(IP2_31_28, SCK3), 481 + PINMUX_IPSR_GPSR(IP2_31_28, HSCK3), 482 + 483 + /* IPSR3 */ 484 + PINMUX_IPSR_GPSR(IP3_3_0, VI0_CLKENB), 485 + PINMUX_IPSR_GPSR(IP3_3_0, MSIOF2_RXD), 486 + PINMUX_IPSR_GPSR(IP3_3_0, RX3), 487 + PINMUX_IPSR_GPSR(IP3_3_0, RD_WR_N), 488 + PINMUX_IPSR_GPSR(IP3_3_0, HCTS3_N), 489 + 490 + PINMUX_IPSR_GPSR(IP3_7_4, VI0_HSYNC_N), 491 + PINMUX_IPSR_GPSR(IP3_7_4, MSIOF2_TXD), 492 + PINMUX_IPSR_GPSR(IP3_7_4, TX3), 493 + PINMUX_IPSR_GPSR(IP3_7_4, HRTS3_N), 494 + 495 + PINMUX_IPSR_GPSR(IP3_11_8, VI0_VSYNC_N), 496 + PINMUX_IPSR_GPSR(IP3_11_8, MSIOF2_SYNC), 497 + PINMUX_IPSR_GPSR(IP3_11_8, CTS3_N), 498 + PINMUX_IPSR_GPSR(IP3_11_8, HTX3), 499 + 500 + PINMUX_IPSR_GPSR(IP3_15_12, VI0_DATA0), 501 + PINMUX_IPSR_GPSR(IP3_15_12, MSIOF2_SS1), 502 + PINMUX_IPSR_GPSR(IP3_15_12, RTS3_N_TANS), 503 + PINMUX_IPSR_GPSR(IP3_15_12, HRX3), 504 + 505 + PINMUX_IPSR_GPSR(IP3_19_16, VI0_DATA1), 506 + PINMUX_IPSR_GPSR(IP3_19_16, MSIOF2_SS2), 507 + PINMUX_IPSR_GPSR(IP3_19_16, SCK1), 508 + PINMUX_IPSR_MSEL(IP3_19_16, SPEEDIN_A, SEL_RSP_0), 509 + 510 + PINMUX_IPSR_GPSR(IP3_23_20, VI0_DATA2), 511 + PINMUX_IPSR_GPSR(IP3_23_20, AVB0_AVTP_PPS), 512 + PINMUX_IPSR_MSEL(IP3_23_20, SDA3_A, SEL_I2C3_0), 513 + 514 + PINMUX_IPSR_GPSR(IP3_27_24, VI0_DATA3), 515 + PINMUX_IPSR_GPSR(IP3_27_24, HSCK1), 516 + PINMUX_IPSR_MSEL(IP3_27_24, SCL3_A, SEL_I2C3_0), 517 + 518 + PINMUX_IPSR_GPSR(IP3_31_28, VI0_DATA4), 519 + PINMUX_IPSR_GPSR(IP3_31_28, HRTS1_N), 520 + PINMUX_IPSR_MSEL(IP3_31_28, RX1_A, SEL_SCIF1_0), 521 + 522 + /* IPSR4 */ 523 + PINMUX_IPSR_GPSR(IP4_3_0, VI0_DATA5), 524 + PINMUX_IPSR_GPSR(IP4_3_0, HCTS1_N), 525 + PINMUX_IPSR_MSEL(IP4_3_0, TX1_A, SEL_SCIF1_0), 526 + 527 + PINMUX_IPSR_GPSR(IP4_7_4, VI0_DATA6), 528 + PINMUX_IPSR_GPSR(IP4_7_4, HTX1), 529 + PINMUX_IPSR_GPSR(IP4_7_4, CTS1_N), 530 + 531 + PINMUX_IPSR_GPSR(IP4_11_8, VI0_DATA7), 532 + PINMUX_IPSR_GPSR(IP4_11_8, HRX1), 533 + PINMUX_IPSR_GPSR(IP4_11_8, RTS1_N_TANS), 534 + 535 + PINMUX_IPSR_GPSR(IP4_15_12, VI0_DATA8), 536 + PINMUX_IPSR_GPSR(IP4_15_12, HSCK2), 537 + PINMUX_IPSR_MSEL(IP4_15_12, PWM0_A, SEL_PWM0_0), 538 + 539 + PINMUX_IPSR_GPSR(IP4_19_16, VI0_DATA9), 540 + PINMUX_IPSR_GPSR(IP4_19_16, HCTS2_N), 541 + PINMUX_IPSR_MSEL(IP4_19_16, PWM1_A, SEL_PWM1_0), 542 + PINMUX_IPSR_MSEL(IP4_19_16, FSO_CFE_0_N_B, SEL_RFSO_1), 543 + 544 + PINMUX_IPSR_GPSR(IP4_23_20, VI0_DATA10), 545 + PINMUX_IPSR_GPSR(IP4_23_20, HRTS2_N), 546 + PINMUX_IPSR_MSEL(IP4_23_20, PWM2_A, SEL_PWM2_0), 547 + PINMUX_IPSR_MSEL(IP4_23_20, FSO_CFE_1_N_B, SEL_RFSO_1), 548 + 549 + PINMUX_IPSR_GPSR(IP4_27_24, VI0_DATA11), 550 + PINMUX_IPSR_GPSR(IP4_27_24, HTX2), 551 + PINMUX_IPSR_MSEL(IP4_27_24, PWM3_A, SEL_PWM3_0), 552 + PINMUX_IPSR_MSEL(IP4_27_24, FSO_TOE_N_B, SEL_RFSO_1), 553 + 554 + PINMUX_IPSR_GPSR(IP4_31_28, VI0_FIELD), 555 + PINMUX_IPSR_GPSR(IP4_31_28, HRX2), 556 + PINMUX_IPSR_MSEL(IP4_31_28, PWM4_A, SEL_PWM4_0), 557 + PINMUX_IPSR_GPSR(IP4_31_28, CS1_N), 558 + PINMUX_IPSR_GPSR(IP4_31_28, FSCLKST2_N_A), 559 + 560 + /* IPSR5 */ 561 + PINMUX_IPSR_GPSR(IP5_3_0, VI1_CLK), 562 + PINMUX_IPSR_GPSR(IP5_3_0, MSIOF1_RXD), 563 + PINMUX_IPSR_GPSR(IP5_3_0, CS0_N), 564 + 565 + PINMUX_IPSR_GPSR(IP5_7_4, VI1_CLKENB), 566 + PINMUX_IPSR_GPSR(IP5_7_4, MSIOF1_TXD), 567 + PINMUX_IPSR_GPSR(IP5_7_4, D0), 568 + 569 + PINMUX_IPSR_GPSR(IP5_11_8, VI1_HSYNC_N), 570 + PINMUX_IPSR_GPSR(IP5_11_8, MSIOF1_SCK), 571 + PINMUX_IPSR_GPSR(IP5_11_8, D1), 572 + 573 + PINMUX_IPSR_GPSR(IP5_15_12, VI1_VSYNC_N), 574 + PINMUX_IPSR_GPSR(IP5_15_12, MSIOF1_SYNC), 575 + PINMUX_IPSR_GPSR(IP5_15_12, D2), 576 + 577 + PINMUX_IPSR_GPSR(IP5_19_16, VI1_DATA0), 578 + PINMUX_IPSR_GPSR(IP5_19_16, MSIOF1_SS1), 579 + PINMUX_IPSR_GPSR(IP5_19_16, D3), 580 + 581 + PINMUX_IPSR_GPSR(IP5_23_20, VI1_DATA1), 582 + PINMUX_IPSR_GPSR(IP5_23_20, MSIOF1_SS2), 583 + PINMUX_IPSR_GPSR(IP5_23_20, D4), 584 + PINMUX_IPSR_GPSR(IP5_23_20, MMC_CMD), 585 + 586 + PINMUX_IPSR_GPSR(IP5_27_24, VI1_DATA2), 587 + PINMUX_IPSR_MSEL(IP5_27_24, CANFD0_TX_B, SEL_CANFD0_1), 588 + PINMUX_IPSR_GPSR(IP5_27_24, D5), 589 + PINMUX_IPSR_GPSR(IP5_27_24, MMC_D0), 590 + 591 + PINMUX_IPSR_GPSR(IP5_31_28, VI1_DATA3), 592 + PINMUX_IPSR_MSEL(IP5_31_28, CANFD0_RX_B, SEL_CANFD0_1), 593 + PINMUX_IPSR_GPSR(IP5_31_28, D6), 594 + PINMUX_IPSR_GPSR(IP5_31_28, MMC_D1), 595 + 596 + /* IPSR6 */ 597 + PINMUX_IPSR_GPSR(IP6_3_0, VI1_DATA4), 598 + PINMUX_IPSR_MSEL(IP6_3_0, CANFD_CLK_B, SEL_CANFD0_1), 599 + PINMUX_IPSR_GPSR(IP6_3_0, D7), 600 + PINMUX_IPSR_GPSR(IP6_3_0, MMC_D2), 601 + 602 + PINMUX_IPSR_GPSR(IP6_7_4, VI1_DATA5), 603 + PINMUX_IPSR_GPSR(IP6_7_4, SCK4), 604 + PINMUX_IPSR_GPSR(IP6_7_4, D8), 605 + PINMUX_IPSR_GPSR(IP6_7_4, MMC_D3), 606 + 607 + PINMUX_IPSR_GPSR(IP6_11_8, VI1_DATA6), 608 + PINMUX_IPSR_GPSR(IP6_11_8, RX4), 609 + PINMUX_IPSR_GPSR(IP6_11_8, D9), 610 + PINMUX_IPSR_GPSR(IP6_11_8, MMC_CLK), 611 + 612 + PINMUX_IPSR_GPSR(IP6_15_12, VI1_DATA7), 613 + PINMUX_IPSR_GPSR(IP6_15_12, TX4), 614 + PINMUX_IPSR_GPSR(IP6_15_12, D10), 615 + PINMUX_IPSR_GPSR(IP6_15_12, MMC_D4), 616 + 617 + PINMUX_IPSR_GPSR(IP6_19_16, VI1_DATA8), 618 + PINMUX_IPSR_GPSR(IP6_19_16, CTS4_N), 619 + PINMUX_IPSR_GPSR(IP6_19_16, D11), 620 + PINMUX_IPSR_GPSR(IP6_19_16, MMC_D5), 621 + 622 + PINMUX_IPSR_GPSR(IP6_23_20, VI1_DATA9), 623 + PINMUX_IPSR_GPSR(IP6_23_20, RTS4_N_TANS), 624 + PINMUX_IPSR_GPSR(IP6_23_20, D12), 625 + PINMUX_IPSR_GPSR(IP6_23_20, MMC_D6), 626 + PINMUX_IPSR_MSEL(IP6_23_20, SCL3_B, SEL_I2C3_1), 627 + 628 + PINMUX_IPSR_GPSR(IP6_27_24, VI1_DATA10), 629 + PINMUX_IPSR_GPSR(IP6_27_24, D13), 630 + PINMUX_IPSR_GPSR(IP6_27_24, MMC_D7), 631 + PINMUX_IPSR_MSEL(IP6_27_24, SDA3_B, SEL_I2C3_1), 632 + 633 + PINMUX_IPSR_GPSR(IP6_31_28, VI1_DATA11), 634 + PINMUX_IPSR_GPSR(IP6_31_28, SCL4), 635 + PINMUX_IPSR_GPSR(IP6_31_28, IRQ4), 636 + PINMUX_IPSR_GPSR(IP6_31_28, D14), 637 + PINMUX_IPSR_GPSR(IP6_31_28, MMC_WP), 638 + 639 + /* IPSR7 */ 640 + PINMUX_IPSR_GPSR(IP7_3_0, VI1_FIELD), 641 + PINMUX_IPSR_GPSR(IP7_3_0, SDA4), 642 + PINMUX_IPSR_GPSR(IP7_3_0, IRQ5), 643 + PINMUX_IPSR_GPSR(IP7_3_0, D15), 644 + PINMUX_IPSR_GPSR(IP7_3_0, MMC_CD), 645 + 646 + PINMUX_IPSR_GPSR(IP7_7_4, SCL0), 647 + PINMUX_IPSR_GPSR(IP7_7_4, DU_DR0), 648 + PINMUX_IPSR_GPSR(IP7_7_4, TPU0TO0), 649 + PINMUX_IPSR_GPSR(IP7_7_4, CLKOUT), 650 + PINMUX_IPSR_GPSR(IP7_7_4, MSIOF0_RXD), 651 + 652 + PINMUX_IPSR_GPSR(IP7_11_8, SDA0), 653 + PINMUX_IPSR_GPSR(IP7_11_8, DU_DR1), 654 + PINMUX_IPSR_GPSR(IP7_11_8, TPU0TO1), 655 + PINMUX_IPSR_GPSR(IP7_11_8, BS_N), 656 + PINMUX_IPSR_GPSR(IP7_11_8, SCK0), 657 + PINMUX_IPSR_GPSR(IP7_11_8, MSIOF0_TXD), 658 + 659 + PINMUX_IPSR_GPSR(IP7_15_12, SCL1), 660 + PINMUX_IPSR_GPSR(IP7_15_12, DU_DG0), 661 + PINMUX_IPSR_GPSR(IP7_15_12, TPU0TO2), 662 + PINMUX_IPSR_GPSR(IP7_15_12, RD_N), 663 + PINMUX_IPSR_GPSR(IP7_15_12, CTS0_N), 664 + PINMUX_IPSR_GPSR(IP7_15_12, MSIOF0_SCK), 665 + 666 + PINMUX_IPSR_GPSR(IP7_19_16, SDA1), 667 + PINMUX_IPSR_GPSR(IP7_19_16, DU_DG1), 668 + PINMUX_IPSR_GPSR(IP7_19_16, TPU0TO3), 669 + PINMUX_IPSR_GPSR(IP7_19_16, WE0_N), 670 + PINMUX_IPSR_GPSR(IP7_19_16, RTS0_N_TANS), 671 + PINMUX_IPSR_GPSR(IP7_19_16, MSIOF0_SYNC), 672 + 673 + PINMUX_IPSR_GPSR(IP7_23_20, SCL2), 674 + PINMUX_IPSR_GPSR(IP7_23_20, DU_DB0), 675 + PINMUX_IPSR_MSEL(IP7_23_20, TCLK1_A, SEL_TMU_0), 676 + PINMUX_IPSR_GPSR(IP7_23_20, WE1_N), 677 + PINMUX_IPSR_GPSR(IP7_23_20, RX0), 678 + PINMUX_IPSR_GPSR(IP7_23_20, MSIOF0_SS1), 679 + 680 + PINMUX_IPSR_GPSR(IP7_27_24, SDA2), 681 + PINMUX_IPSR_GPSR(IP7_27_24, DU_DB1), 682 + PINMUX_IPSR_MSEL(IP7_27_24, TCLK2_A, SEL_TMU_0), 683 + PINMUX_IPSR_GPSR(IP7_27_24, EX_WAIT0), 684 + PINMUX_IPSR_GPSR(IP7_27_24, TX0), 685 + PINMUX_IPSR_GPSR(IP7_27_24, MSIOF0_SS2), 686 + 687 + PINMUX_IPSR_GPSR(IP7_31_28, AVB0_AVTP_CAPTURE), 688 + PINMUX_IPSR_GPSR(IP7_31_28, FSCLKST2_N_B), 689 + 690 + /* IPSR8 */ 691 + PINMUX_IPSR_MSEL(IP8_3_0, CANFD0_TX_A, SEL_CANFD0_0), 692 + PINMUX_IPSR_GPSR(IP8_3_0, FXR_TXDA), 693 + PINMUX_IPSR_MSEL(IP8_3_0, PWM0_B, SEL_PWM0_1), 694 + PINMUX_IPSR_GPSR(IP8_3_0, DU_DISP), 695 + PINMUX_IPSR_GPSR(IP8_3_0, FSCLKST2_N_C), 696 + 697 + PINMUX_IPSR_MSEL(IP8_7_4, CANFD0_RX_A, SEL_CANFD0_0), 698 + PINMUX_IPSR_GPSR(IP8_7_4, RXDA_EXTFXR), 699 + PINMUX_IPSR_MSEL(IP8_7_4, PWM1_B, SEL_PWM1_1), 700 + PINMUX_IPSR_GPSR(IP8_7_4, DU_CDE), 701 + 702 + PINMUX_IPSR_GPSR(IP8_11_8, CANFD1_TX), 703 + PINMUX_IPSR_GPSR(IP8_11_8, FXR_TXDB), 704 + PINMUX_IPSR_MSEL(IP8_11_8, PWM2_B, SEL_PWM2_1), 705 + PINMUX_IPSR_MSEL(IP8_11_8, TCLK1_B, SEL_TMU_1), 706 + PINMUX_IPSR_MSEL(IP8_11_8, TX1_B, SEL_SCIF1_1), 707 + 708 + PINMUX_IPSR_GPSR(IP8_15_12, CANFD1_RX), 709 + PINMUX_IPSR_GPSR(IP8_15_12, RXDB_EXTFXR), 710 + PINMUX_IPSR_MSEL(IP8_15_12, PWM3_B, SEL_PWM3_1), 711 + PINMUX_IPSR_MSEL(IP8_15_12, TCLK2_B, SEL_TMU_1), 712 + PINMUX_IPSR_MSEL(IP8_15_12, RX1_B, SEL_SCIF1_1), 713 + 714 + PINMUX_IPSR_MSEL(IP8_19_16, CANFD_CLK_A, SEL_CANFD0_0), 715 + PINMUX_IPSR_GPSR(IP8_19_16, CLK_EXTFXR), 716 + PINMUX_IPSR_MSEL(IP8_19_16, PWM4_B, SEL_PWM4_1), 717 + PINMUX_IPSR_MSEL(IP8_19_16, SPEEDIN_B, SEL_RSP_1), 718 + PINMUX_IPSR_MSEL(IP8_19_16, SCIF_CLK_B, SEL_HSCIF0_1), 719 + 720 + PINMUX_IPSR_GPSR(IP8_23_20, DIGRF_CLKIN), 721 + PINMUX_IPSR_GPSR(IP8_23_20, DIGRF_CLKEN_IN), 722 + 723 + PINMUX_IPSR_GPSR(IP8_27_24, DIGRF_CLKOUT), 724 + PINMUX_IPSR_GPSR(IP8_27_24, DIGRF_CLKEN_OUT), 725 + }; 726 + 727 + static const struct sh_pfc_pin pinmux_pins[] = { 728 + PINMUX_GPIO_GP_ALL(), 729 + }; 730 + 731 + /* - CANFD Clock ------------------------------------------------------------ */ 732 + static const unsigned int canfd_clk_a_pins[] = { 733 + /* CANFD_CLK */ 734 + RCAR_GP_PIN(1, 25), 735 + }; 736 + static const unsigned int canfd_clk_a_mux[] = { 737 + CANFD_CLK_A_MARK, 738 + }; 739 + static const unsigned int canfd_clk_b_pins[] = { 740 + /* CANFD_CLK */ 741 + RCAR_GP_PIN(3, 8), 742 + }; 743 + static const unsigned int canfd_clk_b_mux[] = { 744 + CANFD_CLK_B_MARK, 745 + }; 746 + 747 + /* - CANFD0 ----------------------------------------------------------------- */ 748 + static const unsigned int canfd0_data_a_pins[] = { 749 + /* TX, RX */ 750 + RCAR_GP_PIN(1, 21), RCAR_GP_PIN(1, 22), 751 + }; 752 + static const unsigned int canfd0_data_a_mux[] = { 753 + CANFD0_TX_A_MARK, CANFD0_RX_A_MARK, 754 + }; 755 + static const unsigned int canfd0_data_b_pins[] = { 756 + /* TX, RX */ 757 + RCAR_GP_PIN(3, 6), RCAR_GP_PIN(3, 7), 758 + }; 759 + static const unsigned int canfd0_data_b_mux[] = { 760 + CANFD0_TX_B_MARK, CANFD0_RX_B_MARK, 761 + }; 762 + 763 + /* - CANFD1 ----------------------------------------------------------------- */ 764 + static const unsigned int canfd1_data_pins[] = { 765 + /* TX, RX */ 766 + RCAR_GP_PIN(1, 23), RCAR_GP_PIN(1, 24), 767 + }; 768 + static const unsigned int canfd1_data_mux[] = { 769 + CANFD1_TX_MARK, CANFD1_RX_MARK, 770 + }; 771 + 772 + /* - DU --------------------------------------------------------------------- */ 773 + static const unsigned int du_rgb666_pins[] = { 774 + /* R[7:2], G[7:2], B[7:2] */ 775 + RCAR_GP_PIN(0, 5), RCAR_GP_PIN(0, 4), RCAR_GP_PIN(0, 3), 776 + RCAR_GP_PIN(0, 2), RCAR_GP_PIN(0, 1), RCAR_GP_PIN(0, 0), 777 + RCAR_GP_PIN(0, 11), RCAR_GP_PIN(0, 10), RCAR_GP_PIN(0, 9), 778 + RCAR_GP_PIN(0, 8), RCAR_GP_PIN(0, 7), RCAR_GP_PIN(0, 6), 779 + RCAR_GP_PIN(0, 17), RCAR_GP_PIN(0, 16), RCAR_GP_PIN(0, 15), 780 + RCAR_GP_PIN(0, 14), RCAR_GP_PIN(0, 13), RCAR_GP_PIN(0, 12), 781 + }; 782 + static const unsigned int du_rgb666_mux[] = { 783 + DU_DR7_MARK, DU_DR6_MARK, DU_DR5_MARK, 784 + DU_DR4_MARK, DU_DR3_MARK, DU_DR2_MARK, 785 + DU_DG7_MARK, DU_DG6_MARK, DU_DG5_MARK, 786 + DU_DG4_MARK, DU_DG3_MARK, DU_DG2_MARK, 787 + DU_DB7_MARK, DU_DB6_MARK, DU_DB5_MARK, 788 + DU_DB4_MARK, DU_DB3_MARK, DU_DB2_MARK, 789 + }; 790 + static const unsigned int du_clk_out_pins[] = { 791 + /* DOTCLKOUT */ 792 + RCAR_GP_PIN(0, 18), 793 + }; 794 + static const unsigned int du_clk_out_mux[] = { 795 + DU_DOTCLKOUT_MARK, 796 + }; 797 + static const unsigned int du_sync_pins[] = { 798 + /* EXVSYNC/VSYNC, EXHSYNC/HSYNC */ 799 + RCAR_GP_PIN(0, 20), RCAR_GP_PIN(0, 19), 800 + }; 801 + static const unsigned int du_sync_mux[] = { 802 + DU_EXVSYNC_DU_VSYNC_MARK, DU_EXHSYNC_DU_HSYNC_MARK 803 + }; 804 + static const unsigned int du_oddf_pins[] = { 805 + /* EXODDF/ODDF/DISP/CDE */ 806 + RCAR_GP_PIN(0, 21), 807 + }; 808 + static const unsigned int du_oddf_mux[] = { 809 + DU_EXODDF_DU_ODDF_DISP_CDE_MARK, 810 + }; 811 + static const unsigned int du_cde_pins[] = { 812 + /* CDE */ 813 + RCAR_GP_PIN(1, 22), 814 + }; 815 + static const unsigned int du_cde_mux[] = { 816 + DU_CDE_MARK, 817 + }; 818 + static const unsigned int du_disp_pins[] = { 819 + /* DISP */ 820 + RCAR_GP_PIN(1, 21), 821 + }; 822 + static const unsigned int du_disp_mux[] = { 823 + DU_DISP_MARK, 824 + }; 825 + 826 + /* - HSCIF0 ----------------------------------------------------------------- */ 827 + static const unsigned int hscif0_data_pins[] = { 828 + /* HRX, HTX */ 829 + RCAR_GP_PIN(0, 19), RCAR_GP_PIN(0, 3), 830 + }; 831 + static const unsigned int hscif0_data_mux[] = { 832 + HRX0_MARK, HTX0_MARK, 833 + }; 834 + static const unsigned int hscif0_clk_pins[] = { 835 + /* HSCK */ 836 + RCAR_GP_PIN(0, 0), 837 + }; 838 + static const unsigned int hscif0_clk_mux[] = { 839 + HSCK0_MARK, 840 + }; 841 + static const unsigned int hscif0_ctrl_pins[] = { 842 + /* HRTS#, HCTS# */ 843 + RCAR_GP_PIN(0, 1), RCAR_GP_PIN(0, 2), 844 + }; 845 + static const unsigned int hscif0_ctrl_mux[] = { 846 + HRTS0_N_MARK, HCTS0_N_MARK, 847 + }; 848 + 849 + /* - HSCIF1 ----------------------------------------------------------------- */ 850 + static const unsigned int hscif1_data_pins[] = { 851 + /* HRX, HTX */ 852 + RCAR_GP_PIN(2, 11), RCAR_GP_PIN(2, 10), 853 + }; 854 + static const unsigned int hscif1_data_mux[] = { 855 + HRX1_MARK, HTX1_MARK, 856 + }; 857 + static const unsigned int hscif1_clk_pins[] = { 858 + /* HSCK */ 859 + RCAR_GP_PIN(2, 7), 860 + }; 861 + static const unsigned int hscif1_clk_mux[] = { 862 + HSCK1_MARK, 863 + }; 864 + static const unsigned int hscif1_ctrl_pins[] = { 865 + /* HRTS#, HCTS# */ 866 + RCAR_GP_PIN(2, 8), RCAR_GP_PIN(2, 9), 867 + }; 868 + static const unsigned int hscif1_ctrl_mux[] = { 869 + HRTS1_N_MARK, HCTS1_N_MARK, 870 + }; 871 + 872 + /* - HSCIF2 ----------------------------------------------------------------- */ 873 + static const unsigned int hscif2_data_pins[] = { 874 + /* HRX, HTX */ 875 + RCAR_GP_PIN(2, 16), RCAR_GP_PIN(2, 15), 876 + }; 877 + static const unsigned int hscif2_data_mux[] = { 878 + HRX2_MARK, HTX2_MARK, 879 + }; 880 + static const unsigned int hscif2_clk_pins[] = { 881 + /* HSCK */ 882 + RCAR_GP_PIN(2, 12), 883 + }; 884 + static const unsigned int hscif2_clk_mux[] = { 885 + HSCK2_MARK, 886 + }; 887 + static const unsigned int hscif2_ctrl_pins[] = { 888 + /* HRTS#, HCTS# */ 889 + RCAR_GP_PIN(2, 14), RCAR_GP_PIN(2, 13), 890 + }; 891 + static const unsigned int hscif2_ctrl_mux[] = { 892 + HRTS2_N_MARK, HCTS2_N_MARK, 893 + }; 894 + 895 + /* - HSCIF3 ----------------------------------------------------------------- */ 896 + static const unsigned int hscif3_data_pins[] = { 897 + /* HRX, HTX */ 898 + RCAR_GP_PIN(2, 4), RCAR_GP_PIN(2, 3), 899 + }; 900 + static const unsigned int hscif3_data_mux[] = { 901 + HRX3_MARK, HTX3_MARK, 902 + }; 903 + static const unsigned int hscif3_clk_pins[] = { 904 + /* HSCK */ 905 + RCAR_GP_PIN(2, 0), 906 + }; 907 + static const unsigned int hscif3_clk_mux[] = { 908 + HSCK3_MARK, 909 + }; 910 + static const unsigned int hscif3_ctrl_pins[] = { 911 + /* HRTS#, HCTS# */ 912 + RCAR_GP_PIN(2, 2), RCAR_GP_PIN(2, 1), 913 + }; 914 + static const unsigned int hscif3_ctrl_mux[] = { 915 + HRTS3_N_MARK, HCTS3_N_MARK, 916 + }; 917 + 918 + /* - I2C0 ------------------------------------------------------------------- */ 919 + static const unsigned int i2c0_pins[] = { 920 + /* SDA, SCL */ 921 + RCAR_GP_PIN(4, 1), RCAR_GP_PIN(4, 0), 922 + }; 923 + static const unsigned int i2c0_mux[] = { 924 + SDA0_MARK, SCL0_MARK, 925 + }; 926 + 927 + /* - I2C1 ------------------------------------------------------------------- */ 928 + static const unsigned int i2c1_pins[] = { 929 + /* SDA, SCL */ 930 + RCAR_GP_PIN(4, 3), RCAR_GP_PIN(4, 2), 931 + }; 932 + static const unsigned int i2c1_mux[] = { 933 + SDA1_MARK, SCL1_MARK, 934 + }; 935 + 936 + /* - I2C2 ------------------------------------------------------------------- */ 937 + static const unsigned int i2c2_pins[] = { 938 + /* SDA, SCL */ 939 + RCAR_GP_PIN(4, 5), RCAR_GP_PIN(4, 4), 940 + }; 941 + static const unsigned int i2c2_mux[] = { 942 + SDA2_MARK, SCL2_MARK, 943 + }; 944 + 945 + /* - I2C3 ------------------------------------------------------------------- */ 946 + static const unsigned int i2c3_a_pins[] = { 947 + /* SDA, SCL */ 948 + RCAR_GP_PIN(2, 6), RCAR_GP_PIN(2, 7), 949 + }; 950 + static const unsigned int i2c3_a_mux[] = { 951 + SDA3_A_MARK, SCL3_A_MARK, 952 + }; 953 + static const unsigned int i2c3_b_pins[] = { 954 + /* SDA, SCL */ 955 + RCAR_GP_PIN(3, 14), RCAR_GP_PIN(3, 13), 956 + }; 957 + static const unsigned int i2c3_b_mux[] = { 958 + SDA3_B_MARK, SCL3_B_MARK, 959 + }; 960 + 961 + /* - I2C4 ------------------------------------------------------------------- */ 962 + static const unsigned int i2c4_pins[] = { 963 + /* SDA, SCL */ 964 + RCAR_GP_PIN(3, 16), RCAR_GP_PIN(3, 15), 965 + }; 966 + static const unsigned int i2c4_mux[] = { 967 + SDA4_MARK, SCL4_MARK, 968 + }; 969 + 970 + /* - INTC-EX ---------------------------------------------------------------- */ 971 + static const unsigned int intc_ex_irq0_pins[] = { 972 + /* IRQ0 */ 973 + RCAR_GP_PIN(1, 0), 974 + }; 975 + static const unsigned int intc_ex_irq0_mux[] = { 976 + IRQ0_MARK, 977 + }; 978 + static const unsigned int intc_ex_irq1_pins[] = { 979 + /* IRQ1 */ 980 + RCAR_GP_PIN(0, 11), 981 + }; 982 + static const unsigned int intc_ex_irq1_mux[] = { 983 + IRQ1_MARK, 984 + }; 985 + static const unsigned int intc_ex_irq2_pins[] = { 986 + /* IRQ2 */ 987 + RCAR_GP_PIN(0, 12), 988 + }; 989 + static const unsigned int intc_ex_irq2_mux[] = { 990 + IRQ2_MARK, 991 + }; 992 + static const unsigned int intc_ex_irq3_pins[] = { 993 + /* IRQ3 */ 994 + RCAR_GP_PIN(0, 19), 995 + }; 996 + static const unsigned int intc_ex_irq3_mux[] = { 997 + IRQ3_MARK, 998 + }; 999 + static const unsigned int intc_ex_irq4_pins[] = { 1000 + /* IRQ4 */ 1001 + RCAR_GP_PIN(3, 15), 1002 + }; 1003 + static const unsigned int intc_ex_irq4_mux[] = { 1004 + IRQ4_MARK, 1005 + }; 1006 + static const unsigned int intc_ex_irq5_pins[] = { 1007 + /* IRQ5 */ 1008 + RCAR_GP_PIN(3, 16), 1009 + }; 1010 + static const unsigned int intc_ex_irq5_mux[] = { 1011 + IRQ5_MARK, 1012 + }; 1013 + 1014 + /* - MMC -------------------------------------------------------------------- */ 1015 + static const unsigned int mmc_data1_pins[] = { 1016 + /* D0 */ 1017 + RCAR_GP_PIN(3, 6), 1018 + }; 1019 + static const unsigned int mmc_data1_mux[] = { 1020 + MMC_D0_MARK, 1021 + }; 1022 + static const unsigned int mmc_data4_pins[] = { 1023 + /* D[0:3] */ 1024 + RCAR_GP_PIN(3, 6), RCAR_GP_PIN(3, 7), 1025 + RCAR_GP_PIN(3, 8), RCAR_GP_PIN(3, 9), 1026 + }; 1027 + static const unsigned int mmc_data4_mux[] = { 1028 + MMC_D0_MARK, MMC_D1_MARK, 1029 + MMC_D2_MARK, MMC_D3_MARK, 1030 + }; 1031 + static const unsigned int mmc_data8_pins[] = { 1032 + /* D[0:7] */ 1033 + RCAR_GP_PIN(3, 6), RCAR_GP_PIN(3, 7), 1034 + RCAR_GP_PIN(3, 8), RCAR_GP_PIN(3, 9), 1035 + RCAR_GP_PIN(3, 11), RCAR_GP_PIN(3, 12), 1036 + RCAR_GP_PIN(3, 13), RCAR_GP_PIN(3, 14), 1037 + }; 1038 + static const unsigned int mmc_data8_mux[] = { 1039 + MMC_D0_MARK, MMC_D1_MARK, 1040 + MMC_D2_MARK, MMC_D3_MARK, 1041 + MMC_D4_MARK, MMC_D5_MARK, 1042 + MMC_D6_MARK, MMC_D7_MARK, 1043 + }; 1044 + static const unsigned int mmc_ctrl_pins[] = { 1045 + /* CLK, CMD */ 1046 + RCAR_GP_PIN(3, 10), RCAR_GP_PIN(3, 5), 1047 + }; 1048 + static const unsigned int mmc_ctrl_mux[] = { 1049 + MMC_CLK_MARK, MMC_CMD_MARK, 1050 + }; 1051 + static const unsigned int mmc_cd_pins[] = { 1052 + /* CD */ 1053 + RCAR_GP_PIN(3, 16), 1054 + }; 1055 + static const unsigned int mmc_cd_mux[] = { 1056 + MMC_CD_MARK, 1057 + }; 1058 + static const unsigned int mmc_wp_pins[] = { 1059 + /* WP */ 1060 + RCAR_GP_PIN(3, 15), 1061 + }; 1062 + static const unsigned int mmc_wp_mux[] = { 1063 + MMC_WP_MARK, 1064 + }; 1065 + 1066 + /* - MSIOF0 ----------------------------------------------------------------- */ 1067 + static const unsigned int msiof0_clk_pins[] = { 1068 + /* SCK */ 1069 + RCAR_GP_PIN(4, 2), 1070 + }; 1071 + static const unsigned int msiof0_clk_mux[] = { 1072 + MSIOF0_SCK_MARK, 1073 + }; 1074 + static const unsigned int msiof0_sync_pins[] = { 1075 + /* SYNC */ 1076 + RCAR_GP_PIN(4, 3), 1077 + }; 1078 + static const unsigned int msiof0_sync_mux[] = { 1079 + MSIOF0_SYNC_MARK, 1080 + }; 1081 + static const unsigned int msiof0_ss1_pins[] = { 1082 + /* SS1 */ 1083 + RCAR_GP_PIN(4, 4), 1084 + }; 1085 + static const unsigned int msiof0_ss1_mux[] = { 1086 + MSIOF0_SS1_MARK, 1087 + }; 1088 + static const unsigned int msiof0_ss2_pins[] = { 1089 + /* SS2 */ 1090 + RCAR_GP_PIN(4, 5), 1091 + }; 1092 + static const unsigned int msiof0_ss2_mux[] = { 1093 + MSIOF0_SS2_MARK, 1094 + }; 1095 + static const unsigned int msiof0_txd_pins[] = { 1096 + /* TXD */ 1097 + RCAR_GP_PIN(4, 1), 1098 + }; 1099 + static const unsigned int msiof0_txd_mux[] = { 1100 + MSIOF0_TXD_MARK, 1101 + }; 1102 + static const unsigned int msiof0_rxd_pins[] = { 1103 + /* RXD */ 1104 + RCAR_GP_PIN(4, 0), 1105 + }; 1106 + static const unsigned int msiof0_rxd_mux[] = { 1107 + MSIOF0_RXD_MARK, 1108 + }; 1109 + 1110 + /* - MSIOF1 ----------------------------------------------------------------- */ 1111 + static const unsigned int msiof1_clk_pins[] = { 1112 + /* SCK */ 1113 + RCAR_GP_PIN(3, 2), 1114 + }; 1115 + static const unsigned int msiof1_clk_mux[] = { 1116 + MSIOF1_SCK_MARK, 1117 + }; 1118 + static const unsigned int msiof1_sync_pins[] = { 1119 + /* SYNC */ 1120 + RCAR_GP_PIN(3, 3), 1121 + }; 1122 + static const unsigned int msiof1_sync_mux[] = { 1123 + MSIOF1_SYNC_MARK, 1124 + }; 1125 + static const unsigned int msiof1_ss1_pins[] = { 1126 + /* SS1 */ 1127 + RCAR_GP_PIN(3, 4), 1128 + }; 1129 + static const unsigned int msiof1_ss1_mux[] = { 1130 + MSIOF1_SS1_MARK, 1131 + }; 1132 + static const unsigned int msiof1_ss2_pins[] = { 1133 + /* SS2 */ 1134 + RCAR_GP_PIN(3, 5), 1135 + }; 1136 + static const unsigned int msiof1_ss2_mux[] = { 1137 + MSIOF1_SS2_MARK, 1138 + }; 1139 + static const unsigned int msiof1_txd_pins[] = { 1140 + /* TXD */ 1141 + RCAR_GP_PIN(3, 1), 1142 + }; 1143 + static const unsigned int msiof1_txd_mux[] = { 1144 + MSIOF1_TXD_MARK, 1145 + }; 1146 + static const unsigned int msiof1_rxd_pins[] = { 1147 + /* RXD */ 1148 + RCAR_GP_PIN(3, 0), 1149 + }; 1150 + static const unsigned int msiof1_rxd_mux[] = { 1151 + MSIOF1_RXD_MARK, 1152 + }; 1153 + 1154 + /* - MSIOF2 ----------------------------------------------------------------- */ 1155 + static const unsigned int msiof2_clk_pins[] = { 1156 + /* SCK */ 1157 + RCAR_GP_PIN(2, 0), 1158 + }; 1159 + static const unsigned int msiof2_clk_mux[] = { 1160 + MSIOF2_SCK_MARK, 1161 + }; 1162 + static const unsigned int msiof2_sync_pins[] = { 1163 + /* SYNC */ 1164 + RCAR_GP_PIN(2, 3), 1165 + }; 1166 + static const unsigned int msiof2_sync_mux[] = { 1167 + MSIOF2_SYNC_MARK, 1168 + }; 1169 + static const unsigned int msiof2_ss1_pins[] = { 1170 + /* SS1 */ 1171 + RCAR_GP_PIN(2, 4), 1172 + }; 1173 + static const unsigned int msiof2_ss1_mux[] = { 1174 + MSIOF2_SS1_MARK, 1175 + }; 1176 + static const unsigned int msiof2_ss2_pins[] = { 1177 + /* SS2 */ 1178 + RCAR_GP_PIN(2, 5), 1179 + }; 1180 + static const unsigned int msiof2_ss2_mux[] = { 1181 + MSIOF2_SS2_MARK, 1182 + }; 1183 + static const unsigned int msiof2_txd_pins[] = { 1184 + /* TXD */ 1185 + RCAR_GP_PIN(2, 2), 1186 + }; 1187 + static const unsigned int msiof2_txd_mux[] = { 1188 + MSIOF2_TXD_MARK, 1189 + }; 1190 + static const unsigned int msiof2_rxd_pins[] = { 1191 + /* RXD */ 1192 + RCAR_GP_PIN(2, 1), 1193 + }; 1194 + static const unsigned int msiof2_rxd_mux[] = { 1195 + MSIOF2_RXD_MARK, 1196 + }; 1197 + 1198 + /* - MSIOF3 ----------------------------------------------------------------- */ 1199 + static const unsigned int msiof3_clk_pins[] = { 1200 + /* SCK */ 1201 + RCAR_GP_PIN(0, 20), 1202 + }; 1203 + static const unsigned int msiof3_clk_mux[] = { 1204 + MSIOF3_SCK_MARK, 1205 + }; 1206 + static const unsigned int msiof3_sync_pins[] = { 1207 + /* SYNC */ 1208 + RCAR_GP_PIN(0, 21), 1209 + }; 1210 + static const unsigned int msiof3_sync_mux[] = { 1211 + MSIOF3_SYNC_MARK, 1212 + }; 1213 + static const unsigned int msiof3_ss1_pins[] = { 1214 + /* SS1 */ 1215 + RCAR_GP_PIN(0, 6), 1216 + }; 1217 + static const unsigned int msiof3_ss1_mux[] = { 1218 + MSIOF3_SS1_MARK, 1219 + }; 1220 + static const unsigned int msiof3_ss2_pins[] = { 1221 + /* SS2 */ 1222 + RCAR_GP_PIN(0, 7), 1223 + }; 1224 + static const unsigned int msiof3_ss2_mux[] = { 1225 + MSIOF3_SS2_MARK, 1226 + }; 1227 + static const unsigned int msiof3_txd_pins[] = { 1228 + /* TXD */ 1229 + RCAR_GP_PIN(0, 5), 1230 + }; 1231 + static const unsigned int msiof3_txd_mux[] = { 1232 + MSIOF3_TXD_MARK, 1233 + }; 1234 + static const unsigned int msiof3_rxd_pins[] = { 1235 + /* RXD */ 1236 + RCAR_GP_PIN(0, 4), 1237 + }; 1238 + static const unsigned int msiof3_rxd_mux[] = { 1239 + MSIOF3_RXD_MARK, 1240 + }; 1241 + 1242 + /* - PWM0 ------------------------------------------------------------------- */ 1243 + static const unsigned int pwm0_a_pins[] = { 1244 + RCAR_GP_PIN(2, 12), 1245 + }; 1246 + static const unsigned int pwm0_a_mux[] = { 1247 + PWM0_A_MARK, 1248 + }; 1249 + static const unsigned int pwm0_b_pins[] = { 1250 + RCAR_GP_PIN(1, 21), 1251 + }; 1252 + static const unsigned int pwm0_b_mux[] = { 1253 + PWM0_B_MARK, 1254 + }; 1255 + 1256 + /* - PWM1 ------------------------------------------------------------------- */ 1257 + static const unsigned int pwm1_a_pins[] = { 1258 + RCAR_GP_PIN(2, 13), 1259 + }; 1260 + static const unsigned int pwm1_a_mux[] = { 1261 + PWM1_A_MARK, 1262 + }; 1263 + static const unsigned int pwm1_b_pins[] = { 1264 + RCAR_GP_PIN(1, 22), 1265 + }; 1266 + static const unsigned int pwm1_b_mux[] = { 1267 + PWM1_B_MARK, 1268 + }; 1269 + 1270 + /* - PWM2 ------------------------------------------------------------------- */ 1271 + static const unsigned int pwm2_a_pins[] = { 1272 + RCAR_GP_PIN(2, 14), 1273 + }; 1274 + static const unsigned int pwm2_a_mux[] = { 1275 + PWM2_A_MARK, 1276 + }; 1277 + static const unsigned int pwm2_b_pins[] = { 1278 + RCAR_GP_PIN(1, 23), 1279 + }; 1280 + static const unsigned int pwm2_b_mux[] = { 1281 + PWM2_B_MARK, 1282 + }; 1283 + 1284 + /* - PWM3 ------------------------------------------------------------------- */ 1285 + static const unsigned int pwm3_a_pins[] = { 1286 + RCAR_GP_PIN(2, 15), 1287 + }; 1288 + static const unsigned int pwm3_a_mux[] = { 1289 + PWM3_A_MARK, 1290 + }; 1291 + static const unsigned int pwm3_b_pins[] = { 1292 + RCAR_GP_PIN(1, 24), 1293 + }; 1294 + static const unsigned int pwm3_b_mux[] = { 1295 + PWM3_B_MARK, 1296 + }; 1297 + 1298 + /* - PWM4 ------------------------------------------------------------------- */ 1299 + static const unsigned int pwm4_a_pins[] = { 1300 + RCAR_GP_PIN(2, 16), 1301 + }; 1302 + static const unsigned int pwm4_a_mux[] = { 1303 + PWM4_A_MARK, 1304 + }; 1305 + static const unsigned int pwm4_b_pins[] = { 1306 + RCAR_GP_PIN(1, 25), 1307 + }; 1308 + static const unsigned int pwm4_b_mux[] = { 1309 + PWM4_B_MARK, 1310 + }; 1311 + 1312 + /* - SCIF Clock ------------------------------------------------------------- */ 1313 + static const unsigned int scif_clk_a_pins[] = { 1314 + /* SCIF_CLK */ 1315 + RCAR_GP_PIN(0, 18), 1316 + }; 1317 + static const unsigned int scif_clk_a_mux[] = { 1318 + SCIF_CLK_A_MARK, 1319 + }; 1320 + static const unsigned int scif_clk_b_pins[] = { 1321 + /* SCIF_CLK */ 1322 + RCAR_GP_PIN(1, 25), 1323 + }; 1324 + static const unsigned int scif_clk_b_mux[] = { 1325 + SCIF_CLK_B_MARK, 1326 + }; 1327 + 1328 + /* - SCIF0 ------------------------------------------------------------------ */ 1329 + static const unsigned int scif0_data_pins[] = { 1330 + /* RX, TX */ 1331 + RCAR_GP_PIN(4, 4), RCAR_GP_PIN(4, 5), 1332 + }; 1333 + static const unsigned int scif0_data_mux[] = { 1334 + RX0_MARK, TX0_MARK, 1335 + }; 1336 + static const unsigned int scif0_clk_pins[] = { 1337 + /* SCK */ 1338 + RCAR_GP_PIN(4, 1), 1339 + }; 1340 + static const unsigned int scif0_clk_mux[] = { 1341 + SCK0_MARK, 1342 + }; 1343 + static const unsigned int scif0_ctrl_pins[] = { 1344 + /* RTS#, CTS# */ 1345 + RCAR_GP_PIN(4, 3), RCAR_GP_PIN(4, 2), 1346 + }; 1347 + static const unsigned int scif0_ctrl_mux[] = { 1348 + RTS0_N_TANS_MARK, CTS0_N_MARK, 1349 + }; 1350 + 1351 + /* - SCIF1 ------------------------------------------------------------------ */ 1352 + static const unsigned int scif1_data_a_pins[] = { 1353 + /* RX, TX */ 1354 + RCAR_GP_PIN(2, 8), RCAR_GP_PIN(2, 9), 1355 + }; 1356 + static const unsigned int scif1_data_a_mux[] = { 1357 + RX1_A_MARK, TX1_A_MARK, 1358 + }; 1359 + static const unsigned int scif1_clk_pins[] = { 1360 + /* SCK */ 1361 + RCAR_GP_PIN(2, 5), 1362 + }; 1363 + static const unsigned int scif1_clk_mux[] = { 1364 + SCK1_MARK, 1365 + }; 1366 + static const unsigned int scif1_ctrl_pins[] = { 1367 + /* RTS#, CTS# */ 1368 + RCAR_GP_PIN(2, 11), RCAR_GP_PIN(2, 10), 1369 + }; 1370 + static const unsigned int scif1_ctrl_mux[] = { 1371 + RTS1_N_TANS_MARK, CTS1_N_MARK, 1372 + }; 1373 + static const unsigned int scif1_data_b_pins[] = { 1374 + /* RX, TX */ 1375 + RCAR_GP_PIN(1, 24), RCAR_GP_PIN(1, 23), 1376 + }; 1377 + static const unsigned int scif1_data_b_mux[] = { 1378 + RX1_B_MARK, TX1_B_MARK, 1379 + }; 1380 + 1381 + /* - SCIF3 ------------------------------------------------------------------ */ 1382 + static const unsigned int scif3_data_pins[] = { 1383 + /* RX, TX */ 1384 + RCAR_GP_PIN(2, 1), RCAR_GP_PIN(2, 2), 1385 + }; 1386 + static const unsigned int scif3_data_mux[] = { 1387 + RX3_MARK, TX3_MARK, 1388 + }; 1389 + static const unsigned int scif3_clk_pins[] = { 1390 + /* SCK */ 1391 + RCAR_GP_PIN(2, 0), 1392 + }; 1393 + static const unsigned int scif3_clk_mux[] = { 1394 + SCK3_MARK, 1395 + }; 1396 + static const unsigned int scif3_ctrl_pins[] = { 1397 + /* RTS#, CTS# */ 1398 + RCAR_GP_PIN(2, 4), RCAR_GP_PIN(2, 3), 1399 + }; 1400 + static const unsigned int scif3_ctrl_mux[] = { 1401 + RTS3_N_TANS_MARK, CTS3_N_MARK, 1402 + }; 1403 + 1404 + /* - SCIF4 ------------------------------------------------------------------ */ 1405 + static const unsigned int scif4_data_pins[] = { 1406 + /* RX, TX */ 1407 + RCAR_GP_PIN(3, 10), RCAR_GP_PIN(3, 11), 1408 + }; 1409 + static const unsigned int scif4_data_mux[] = { 1410 + RX4_MARK, TX4_MARK, 1411 + }; 1412 + static const unsigned int scif4_clk_pins[] = { 1413 + /* SCK */ 1414 + RCAR_GP_PIN(3, 9), 1415 + }; 1416 + static const unsigned int scif4_clk_mux[] = { 1417 + SCK4_MARK, 1418 + }; 1419 + static const unsigned int scif4_ctrl_pins[] = { 1420 + /* RTS#, CTS# */ 1421 + RCAR_GP_PIN(3, 13), RCAR_GP_PIN(3, 12), 1422 + }; 1423 + static const unsigned int scif4_ctrl_mux[] = { 1424 + RTS4_N_TANS_MARK, CTS4_N_MARK, 1425 + }; 1426 + 1427 + /* - TMU -------------------------------------------------------------------- */ 1428 + static const unsigned int tmu_tclk1_a_pins[] = { 1429 + /* TCLK1 */ 1430 + RCAR_GP_PIN(4, 4), 1431 + }; 1432 + static const unsigned int tmu_tclk1_a_mux[] = { 1433 + TCLK1_A_MARK, 1434 + }; 1435 + static const unsigned int tmu_tclk1_b_pins[] = { 1436 + /* TCLK1 */ 1437 + RCAR_GP_PIN(1, 23), 1438 + }; 1439 + static const unsigned int tmu_tclk1_b_mux[] = { 1440 + TCLK1_B_MARK, 1441 + }; 1442 + static const unsigned int tmu_tclk2_a_pins[] = { 1443 + /* TCLK2 */ 1444 + RCAR_GP_PIN(4, 5), 1445 + }; 1446 + static const unsigned int tmu_tclk2_a_mux[] = { 1447 + TCLK2_A_MARK, 1448 + }; 1449 + static const unsigned int tmu_tclk2_b_pins[] = { 1450 + /* TCLK2 */ 1451 + RCAR_GP_PIN(1, 24), 1452 + }; 1453 + static const unsigned int tmu_tclk2_b_mux[] = { 1454 + TCLK2_B_MARK, 1455 + }; 1456 + 1457 + /* - VIN0 ------------------------------------------------------------------- */ 1458 + static const unsigned int vin0_data8_pins[] = { 1459 + RCAR_GP_PIN(2, 4), RCAR_GP_PIN(2, 5), 1460 + RCAR_GP_PIN(2, 6), RCAR_GP_PIN(2, 7), 1461 + RCAR_GP_PIN(2, 8), RCAR_GP_PIN(2, 9), 1462 + RCAR_GP_PIN(2, 10), RCAR_GP_PIN(2, 11), 1463 + }; 1464 + static const unsigned int vin0_data8_mux[] = { 1465 + VI0_DATA0_MARK, VI0_DATA1_MARK, 1466 + VI0_DATA2_MARK, VI0_DATA3_MARK, 1467 + VI0_DATA4_MARK, VI0_DATA5_MARK, 1468 + VI0_DATA6_MARK, VI0_DATA7_MARK, 1469 + }; 1470 + static const unsigned int vin0_data10_pins[] = { 1471 + RCAR_GP_PIN(2, 4), RCAR_GP_PIN(2, 5), 1472 + RCAR_GP_PIN(2, 6), RCAR_GP_PIN(2, 7), 1473 + RCAR_GP_PIN(2, 8), RCAR_GP_PIN(2, 9), 1474 + RCAR_GP_PIN(2, 10), RCAR_GP_PIN(2, 11), 1475 + RCAR_GP_PIN(2, 12), RCAR_GP_PIN(2, 13), 1476 + }; 1477 + static const unsigned int vin0_data10_mux[] = { 1478 + VI0_DATA0_MARK, VI0_DATA1_MARK, 1479 + VI0_DATA2_MARK, VI0_DATA3_MARK, 1480 + VI0_DATA4_MARK, VI0_DATA5_MARK, 1481 + VI0_DATA6_MARK, VI0_DATA7_MARK, 1482 + VI0_DATA8_MARK, VI0_DATA9_MARK, 1483 + }; 1484 + static const unsigned int vin0_data12_pins[] = { 1485 + RCAR_GP_PIN(2, 4), RCAR_GP_PIN(2, 5), 1486 + RCAR_GP_PIN(2, 6), RCAR_GP_PIN(2, 7), 1487 + RCAR_GP_PIN(2, 8), RCAR_GP_PIN(2, 9), 1488 + RCAR_GP_PIN(2, 10), RCAR_GP_PIN(2, 11), 1489 + RCAR_GP_PIN(2, 12), RCAR_GP_PIN(2, 13), 1490 + RCAR_GP_PIN(2, 14), RCAR_GP_PIN(2, 15), 1491 + }; 1492 + static const unsigned int vin0_data12_mux[] = { 1493 + VI0_DATA0_MARK, VI0_DATA1_MARK, 1494 + VI0_DATA2_MARK, VI0_DATA3_MARK, 1495 + VI0_DATA4_MARK, VI0_DATA5_MARK, 1496 + VI0_DATA6_MARK, VI0_DATA7_MARK, 1497 + VI0_DATA8_MARK, VI0_DATA9_MARK, 1498 + VI0_DATA10_MARK, VI0_DATA11_MARK, 1499 + }; 1500 + static const unsigned int vin0_sync_pins[] = { 1501 + /* HSYNC#, VSYNC# */ 1502 + RCAR_GP_PIN(2, 2), RCAR_GP_PIN(2, 3), 1503 + }; 1504 + static const unsigned int vin0_sync_mux[] = { 1505 + VI0_HSYNC_N_MARK, VI0_VSYNC_N_MARK, 1506 + }; 1507 + static const unsigned int vin0_field_pins[] = { 1508 + /* FIELD */ 1509 + RCAR_GP_PIN(2, 16), 1510 + }; 1511 + static const unsigned int vin0_field_mux[] = { 1512 + VI0_FIELD_MARK, 1513 + }; 1514 + static const unsigned int vin0_clkenb_pins[] = { 1515 + /* CLKENB */ 1516 + RCAR_GP_PIN(2, 1), 1517 + }; 1518 + static const unsigned int vin0_clkenb_mux[] = { 1519 + VI0_CLKENB_MARK, 1520 + }; 1521 + static const unsigned int vin0_clk_pins[] = { 1522 + /* CLK */ 1523 + RCAR_GP_PIN(2, 0), 1524 + }; 1525 + static const unsigned int vin0_clk_mux[] = { 1526 + VI0_CLK_MARK, 1527 + }; 1528 + 1529 + /* - VIN1 ------------------------------------------------------------------- */ 1530 + static const unsigned int vin1_data8_pins[] = { 1531 + RCAR_GP_PIN(3, 4), RCAR_GP_PIN(3, 5), 1532 + RCAR_GP_PIN(3, 6), RCAR_GP_PIN(3, 7), 1533 + RCAR_GP_PIN(3, 8), RCAR_GP_PIN(3, 9), 1534 + RCAR_GP_PIN(3, 10), RCAR_GP_PIN(3, 11), 1535 + }; 1536 + static const unsigned int vin1_data8_mux[] = { 1537 + VI1_DATA0_MARK, VI1_DATA1_MARK, 1538 + VI1_DATA2_MARK, VI1_DATA3_MARK, 1539 + VI1_DATA4_MARK, VI1_DATA5_MARK, 1540 + VI1_DATA6_MARK, VI1_DATA7_MARK, 1541 + }; 1542 + static const unsigned int vin1_data10_pins[] = { 1543 + RCAR_GP_PIN(3, 4), RCAR_GP_PIN(3, 5), 1544 + RCAR_GP_PIN(3, 6), RCAR_GP_PIN(3, 7), 1545 + RCAR_GP_PIN(3, 8), RCAR_GP_PIN(3, 9), 1546 + RCAR_GP_PIN(3, 10), RCAR_GP_PIN(3, 11), 1547 + RCAR_GP_PIN(3, 12), RCAR_GP_PIN(3, 13), 1548 + }; 1549 + static const unsigned int vin1_data10_mux[] = { 1550 + VI1_DATA0_MARK, VI1_DATA1_MARK, 1551 + VI1_DATA2_MARK, VI1_DATA3_MARK, 1552 + VI1_DATA4_MARK, VI1_DATA5_MARK, 1553 + VI1_DATA6_MARK, VI1_DATA7_MARK, 1554 + VI1_DATA8_MARK, VI1_DATA9_MARK, 1555 + }; 1556 + static const unsigned int vin1_data12_pins[] = { 1557 + RCAR_GP_PIN(3, 4), RCAR_GP_PIN(3, 5), 1558 + RCAR_GP_PIN(3, 6), RCAR_GP_PIN(3, 7), 1559 + RCAR_GP_PIN(3, 8), RCAR_GP_PIN(3, 9), 1560 + RCAR_GP_PIN(3, 10), RCAR_GP_PIN(3, 11), 1561 + RCAR_GP_PIN(3, 12), RCAR_GP_PIN(3, 13), 1562 + RCAR_GP_PIN(3, 14), RCAR_GP_PIN(3, 15), 1563 + }; 1564 + static const unsigned int vin1_data12_mux[] = { 1565 + VI1_DATA0_MARK, VI1_DATA1_MARK, 1566 + VI1_DATA2_MARK, VI1_DATA3_MARK, 1567 + VI1_DATA4_MARK, VI1_DATA5_MARK, 1568 + VI1_DATA6_MARK, VI1_DATA7_MARK, 1569 + VI1_DATA8_MARK, VI1_DATA9_MARK, 1570 + VI1_DATA10_MARK, VI1_DATA11_MARK, 1571 + }; 1572 + static const unsigned int vin1_sync_pins[] = { 1573 + /* HSYNC#, VSYNC# */ 1574 + RCAR_GP_PIN(3, 2), RCAR_GP_PIN(3, 3), 1575 + }; 1576 + static const unsigned int vin1_sync_mux[] = { 1577 + VI1_HSYNC_N_MARK, VI1_VSYNC_N_MARK, 1578 + }; 1579 + static const unsigned int vin1_field_pins[] = { 1580 + RCAR_GP_PIN(3, 16), 1581 + }; 1582 + static const unsigned int vin1_field_mux[] = { 1583 + /* FIELD */ 1584 + VI1_FIELD_MARK, 1585 + }; 1586 + static const unsigned int vin1_clkenb_pins[] = { 1587 + RCAR_GP_PIN(3, 1), 1588 + }; 1589 + static const unsigned int vin1_clkenb_mux[] = { 1590 + /* CLKENB */ 1591 + VI1_CLKENB_MARK, 1592 + }; 1593 + static const unsigned int vin1_clk_pins[] = { 1594 + RCAR_GP_PIN(3, 0), 1595 + }; 1596 + static const unsigned int vin1_clk_mux[] = { 1597 + /* CLK */ 1598 + VI1_CLK_MARK, 1599 + }; 1600 + 1601 + static const struct sh_pfc_pin_group pinmux_groups[] = { 1602 + SH_PFC_PIN_GROUP(canfd_clk_a), 1603 + SH_PFC_PIN_GROUP(canfd_clk_b), 1604 + SH_PFC_PIN_GROUP(canfd0_data_a), 1605 + SH_PFC_PIN_GROUP(canfd0_data_b), 1606 + SH_PFC_PIN_GROUP(canfd1_data), 1607 + SH_PFC_PIN_GROUP(du_rgb666), 1608 + SH_PFC_PIN_GROUP(du_clk_out), 1609 + SH_PFC_PIN_GROUP(du_sync), 1610 + SH_PFC_PIN_GROUP(du_oddf), 1611 + SH_PFC_PIN_GROUP(du_cde), 1612 + SH_PFC_PIN_GROUP(du_disp), 1613 + SH_PFC_PIN_GROUP(hscif0_data), 1614 + SH_PFC_PIN_GROUP(hscif0_clk), 1615 + SH_PFC_PIN_GROUP(hscif0_ctrl), 1616 + SH_PFC_PIN_GROUP(hscif1_data), 1617 + SH_PFC_PIN_GROUP(hscif1_clk), 1618 + SH_PFC_PIN_GROUP(hscif1_ctrl), 1619 + SH_PFC_PIN_GROUP(hscif2_data), 1620 + SH_PFC_PIN_GROUP(hscif2_clk), 1621 + SH_PFC_PIN_GROUP(hscif2_ctrl), 1622 + SH_PFC_PIN_GROUP(hscif3_data), 1623 + SH_PFC_PIN_GROUP(hscif3_clk), 1624 + SH_PFC_PIN_GROUP(hscif3_ctrl), 1625 + SH_PFC_PIN_GROUP(i2c0), 1626 + SH_PFC_PIN_GROUP(i2c1), 1627 + SH_PFC_PIN_GROUP(i2c2), 1628 + SH_PFC_PIN_GROUP(i2c3_a), 1629 + SH_PFC_PIN_GROUP(i2c3_b), 1630 + SH_PFC_PIN_GROUP(i2c4), 1631 + SH_PFC_PIN_GROUP(intc_ex_irq0), 1632 + SH_PFC_PIN_GROUP(intc_ex_irq1), 1633 + SH_PFC_PIN_GROUP(intc_ex_irq2), 1634 + SH_PFC_PIN_GROUP(intc_ex_irq3), 1635 + SH_PFC_PIN_GROUP(intc_ex_irq4), 1636 + SH_PFC_PIN_GROUP(intc_ex_irq5), 1637 + SH_PFC_PIN_GROUP(mmc_data1), 1638 + SH_PFC_PIN_GROUP(mmc_data4), 1639 + SH_PFC_PIN_GROUP(mmc_data8), 1640 + SH_PFC_PIN_GROUP(mmc_ctrl), 1641 + SH_PFC_PIN_GROUP(mmc_cd), 1642 + SH_PFC_PIN_GROUP(mmc_wp), 1643 + SH_PFC_PIN_GROUP(msiof0_clk), 1644 + SH_PFC_PIN_GROUP(msiof0_sync), 1645 + SH_PFC_PIN_GROUP(msiof0_ss1), 1646 + SH_PFC_PIN_GROUP(msiof0_ss2), 1647 + SH_PFC_PIN_GROUP(msiof0_txd), 1648 + SH_PFC_PIN_GROUP(msiof0_rxd), 1649 + SH_PFC_PIN_GROUP(msiof1_clk), 1650 + SH_PFC_PIN_GROUP(msiof1_sync), 1651 + SH_PFC_PIN_GROUP(msiof1_ss1), 1652 + SH_PFC_PIN_GROUP(msiof1_ss2), 1653 + SH_PFC_PIN_GROUP(msiof1_txd), 1654 + SH_PFC_PIN_GROUP(msiof1_rxd), 1655 + SH_PFC_PIN_GROUP(msiof2_clk), 1656 + SH_PFC_PIN_GROUP(msiof2_sync), 1657 + SH_PFC_PIN_GROUP(msiof2_ss1), 1658 + SH_PFC_PIN_GROUP(msiof2_ss2), 1659 + SH_PFC_PIN_GROUP(msiof2_txd), 1660 + SH_PFC_PIN_GROUP(msiof2_rxd), 1661 + SH_PFC_PIN_GROUP(msiof3_clk), 1662 + SH_PFC_PIN_GROUP(msiof3_sync), 1663 + SH_PFC_PIN_GROUP(msiof3_ss1), 1664 + SH_PFC_PIN_GROUP(msiof3_ss2), 1665 + SH_PFC_PIN_GROUP(msiof3_txd), 1666 + SH_PFC_PIN_GROUP(msiof3_rxd), 1667 + SH_PFC_PIN_GROUP(pwm0_a), 1668 + SH_PFC_PIN_GROUP(pwm0_b), 1669 + SH_PFC_PIN_GROUP(pwm1_a), 1670 + SH_PFC_PIN_GROUP(pwm1_b), 1671 + SH_PFC_PIN_GROUP(pwm2_a), 1672 + SH_PFC_PIN_GROUP(pwm2_b), 1673 + SH_PFC_PIN_GROUP(pwm3_a), 1674 + SH_PFC_PIN_GROUP(pwm3_b), 1675 + SH_PFC_PIN_GROUP(pwm4_a), 1676 + SH_PFC_PIN_GROUP(pwm4_b), 1677 + SH_PFC_PIN_GROUP(scif_clk_a), 1678 + SH_PFC_PIN_GROUP(scif_clk_b), 1679 + SH_PFC_PIN_GROUP(scif0_data), 1680 + SH_PFC_PIN_GROUP(scif0_clk), 1681 + SH_PFC_PIN_GROUP(scif0_ctrl), 1682 + SH_PFC_PIN_GROUP(scif1_data_a), 1683 + SH_PFC_PIN_GROUP(scif1_clk), 1684 + SH_PFC_PIN_GROUP(scif1_ctrl), 1685 + SH_PFC_PIN_GROUP(scif1_data_b), 1686 + SH_PFC_PIN_GROUP(scif3_data), 1687 + SH_PFC_PIN_GROUP(scif3_clk), 1688 + SH_PFC_PIN_GROUP(scif3_ctrl), 1689 + SH_PFC_PIN_GROUP(scif4_data), 1690 + SH_PFC_PIN_GROUP(scif4_clk), 1691 + SH_PFC_PIN_GROUP(scif4_ctrl), 1692 + SH_PFC_PIN_GROUP(tmu_tclk1_a), 1693 + SH_PFC_PIN_GROUP(tmu_tclk1_b), 1694 + SH_PFC_PIN_GROUP(tmu_tclk2_a), 1695 + SH_PFC_PIN_GROUP(tmu_tclk2_b), 1696 + SH_PFC_PIN_GROUP(vin0_data8), 1697 + SH_PFC_PIN_GROUP(vin0_data10), 1698 + SH_PFC_PIN_GROUP(vin0_data12), 1699 + SH_PFC_PIN_GROUP(vin0_sync), 1700 + SH_PFC_PIN_GROUP(vin0_field), 1701 + SH_PFC_PIN_GROUP(vin0_clkenb), 1702 + SH_PFC_PIN_GROUP(vin0_clk), 1703 + SH_PFC_PIN_GROUP(vin1_data8), 1704 + SH_PFC_PIN_GROUP(vin1_data10), 1705 + SH_PFC_PIN_GROUP(vin1_data12), 1706 + SH_PFC_PIN_GROUP(vin1_sync), 1707 + SH_PFC_PIN_GROUP(vin1_field), 1708 + SH_PFC_PIN_GROUP(vin1_clkenb), 1709 + SH_PFC_PIN_GROUP(vin1_clk), 1710 + }; 1711 + 1712 + static const char * const canfd_clk_groups[] = { 1713 + "canfd_clk_a", 1714 + "canfd_clk_b", 1715 + }; 1716 + 1717 + static const char * const canfd0_groups[] = { 1718 + "canfd0_data_a", 1719 + "canfd0_data_b", 1720 + }; 1721 + 1722 + static const char * const canfd1_groups[] = { 1723 + "canfd1_data", 1724 + }; 1725 + 1726 + static const char * const du_groups[] = { 1727 + "du_rgb666", 1728 + "du_clk_out", 1729 + "du_sync", 1730 + "du_oddf", 1731 + "du_cde", 1732 + "du_disp", 1733 + }; 1734 + 1735 + static const char * const hscif0_groups[] = { 1736 + "hscif0_data", 1737 + "hscif0_clk", 1738 + "hscif0_ctrl", 1739 + }; 1740 + 1741 + static const char * const hscif1_groups[] = { 1742 + "hscif1_data", 1743 + "hscif1_clk", 1744 + "hscif1_ctrl", 1745 + }; 1746 + 1747 + static const char * const hscif2_groups[] = { 1748 + "hscif2_data", 1749 + "hscif2_clk", 1750 + "hscif2_ctrl", 1751 + }; 1752 + 1753 + static const char * const hscif3_groups[] = { 1754 + "hscif3_data", 1755 + "hscif3_clk", 1756 + "hscif3_ctrl", 1757 + }; 1758 + 1759 + static const char * const i2c0_groups[] = { 1760 + "i2c0", 1761 + }; 1762 + 1763 + static const char * const i2c1_groups[] = { 1764 + "i2c1", 1765 + }; 1766 + 1767 + static const char * const i2c2_groups[] = { 1768 + "i2c2", 1769 + }; 1770 + 1771 + static const char * const i2c3_groups[] = { 1772 + "i2c3_a", 1773 + "i2c3_b", 1774 + }; 1775 + 1776 + static const char * const i2c4_groups[] = { 1777 + "i2c4", 1778 + }; 1779 + 1780 + static const char * const intc_ex_groups[] = { 1781 + "intc_ex_irq0", 1782 + "intc_ex_irq1", 1783 + "intc_ex_irq2", 1784 + "intc_ex_irq3", 1785 + "intc_ex_irq4", 1786 + "intc_ex_irq5", 1787 + }; 1788 + 1789 + static const char * const mmc_groups[] = { 1790 + "mmc_data1", 1791 + "mmc_data4", 1792 + "mmc_data8", 1793 + "mmc_ctrl", 1794 + "mmc_cd", 1795 + "mmc_wp", 1796 + }; 1797 + 1798 + static const char * const msiof0_groups[] = { 1799 + "msiof0_clk", 1800 + "msiof0_sync", 1801 + "msiof0_ss1", 1802 + "msiof0_ss2", 1803 + "msiof0_txd", 1804 + "msiof0_rxd", 1805 + }; 1806 + 1807 + static const char * const msiof1_groups[] = { 1808 + "msiof1_clk", 1809 + "msiof1_sync", 1810 + "msiof1_ss1", 1811 + "msiof1_ss2", 1812 + "msiof1_txd", 1813 + "msiof1_rxd", 1814 + }; 1815 + 1816 + static const char * const msiof2_groups[] = { 1817 + "msiof2_clk", 1818 + "msiof2_sync", 1819 + "msiof2_ss1", 1820 + "msiof2_ss2", 1821 + "msiof2_txd", 1822 + "msiof2_rxd", 1823 + }; 1824 + 1825 + static const char * const msiof3_groups[] = { 1826 + "msiof3_clk", 1827 + "msiof3_sync", 1828 + "msiof3_ss1", 1829 + "msiof3_ss2", 1830 + "msiof3_txd", 1831 + "msiof3_rxd", 1832 + }; 1833 + 1834 + static const char * const pwm0_groups[] = { 1835 + "pwm0_a", 1836 + "pwm0_b", 1837 + }; 1838 + 1839 + static const char * const pwm1_groups[] = { 1840 + "pwm1_a", 1841 + "pwm1_b", 1842 + }; 1843 + 1844 + static const char * const pwm2_groups[] = { 1845 + "pwm2_a", 1846 + "pwm2_b", 1847 + }; 1848 + 1849 + static const char * const pwm3_groups[] = { 1850 + "pwm3_a", 1851 + "pwm3_b", 1852 + }; 1853 + 1854 + static const char * const pwm4_groups[] = { 1855 + "pwm4_a", 1856 + "pwm4_b", 1857 + }; 1858 + 1859 + static const char * const scif_clk_groups[] = { 1860 + "scif_clk_a", 1861 + "scif_clk_b", 1862 + }; 1863 + 1864 + static const char * const scif0_groups[] = { 1865 + "scif0_data", 1866 + "scif0_clk", 1867 + "scif0_ctrl", 1868 + }; 1869 + 1870 + static const char * const scif1_groups[] = { 1871 + "scif1_data_a", 1872 + "scif1_clk", 1873 + "scif1_ctrl", 1874 + "scif1_data_b", 1875 + }; 1876 + 1877 + static const char * const scif3_groups[] = { 1878 + "scif3_data", 1879 + "scif3_clk", 1880 + "scif3_ctrl", 1881 + }; 1882 + 1883 + static const char * const scif4_groups[] = { 1884 + "scif4_data", 1885 + "scif4_clk", 1886 + "scif4_ctrl", 1887 + }; 1888 + 1889 + static const char * const tmu_groups[] = { 1890 + "tmu_tclk1_a", 1891 + "tmu_tclk1_b", 1892 + "tmu_tclk2_a", 1893 + "tmu_tclk2_b", 1894 + }; 1895 + 1896 + static const char * const vin0_groups[] = { 1897 + "vin0_data8", 1898 + "vin0_data10", 1899 + "vin0_data12", 1900 + "vin0_sync", 1901 + "vin0_field", 1902 + "vin0_clkenb", 1903 + "vin0_clk", 1904 + }; 1905 + 1906 + static const char * const vin1_groups[] = { 1907 + "vin1_data8", 1908 + "vin1_data10", 1909 + "vin1_data12", 1910 + "vin1_sync", 1911 + "vin1_field", 1912 + "vin1_clkenb", 1913 + "vin1_clk", 1914 + }; 1915 + 1916 + static const struct sh_pfc_function pinmux_functions[] = { 1917 + SH_PFC_FUNCTION(canfd_clk), 1918 + SH_PFC_FUNCTION(canfd0), 1919 + SH_PFC_FUNCTION(canfd1), 1920 + SH_PFC_FUNCTION(du), 1921 + SH_PFC_FUNCTION(hscif0), 1922 + SH_PFC_FUNCTION(hscif1), 1923 + SH_PFC_FUNCTION(hscif2), 1924 + SH_PFC_FUNCTION(hscif3), 1925 + SH_PFC_FUNCTION(i2c0), 1926 + SH_PFC_FUNCTION(i2c1), 1927 + SH_PFC_FUNCTION(i2c2), 1928 + SH_PFC_FUNCTION(i2c3), 1929 + SH_PFC_FUNCTION(i2c4), 1930 + SH_PFC_FUNCTION(intc_ex), 1931 + SH_PFC_FUNCTION(mmc), 1932 + SH_PFC_FUNCTION(msiof0), 1933 + SH_PFC_FUNCTION(msiof1), 1934 + SH_PFC_FUNCTION(msiof2), 1935 + SH_PFC_FUNCTION(msiof3), 1936 + SH_PFC_FUNCTION(pwm0), 1937 + SH_PFC_FUNCTION(pwm1), 1938 + SH_PFC_FUNCTION(pwm2), 1939 + SH_PFC_FUNCTION(pwm3), 1940 + SH_PFC_FUNCTION(pwm4), 1941 + SH_PFC_FUNCTION(scif_clk), 1942 + SH_PFC_FUNCTION(scif0), 1943 + SH_PFC_FUNCTION(scif1), 1944 + SH_PFC_FUNCTION(scif3), 1945 + SH_PFC_FUNCTION(scif4), 1946 + SH_PFC_FUNCTION(tmu), 1947 + SH_PFC_FUNCTION(vin0), 1948 + SH_PFC_FUNCTION(vin1), 1949 + }; 1950 + 1951 + static const struct pinmux_cfg_reg pinmux_config_regs[] = { 1952 + #define F_(x, y) FN_##y 1953 + #define FM(x) FN_##x 1954 + { PINMUX_CFG_REG("GPSR0", 0xe6060100, 32, 1) { 1955 + 0, 0, 1956 + 0, 0, 1957 + 0, 0, 1958 + 0, 0, 1959 + 0, 0, 1960 + 0, 0, 1961 + 0, 0, 1962 + 0, 0, 1963 + 0, 0, 1964 + 0, 0, 1965 + GP_0_21_FN, GPSR0_21, 1966 + GP_0_20_FN, GPSR0_20, 1967 + GP_0_19_FN, GPSR0_19, 1968 + GP_0_18_FN, GPSR0_18, 1969 + GP_0_17_FN, GPSR0_17, 1970 + GP_0_16_FN, GPSR0_16, 1971 + GP_0_15_FN, GPSR0_15, 1972 + GP_0_14_FN, GPSR0_14, 1973 + GP_0_13_FN, GPSR0_13, 1974 + GP_0_12_FN, GPSR0_12, 1975 + GP_0_11_FN, GPSR0_11, 1976 + GP_0_10_FN, GPSR0_10, 1977 + GP_0_9_FN, GPSR0_9, 1978 + GP_0_8_FN, GPSR0_8, 1979 + GP_0_7_FN, GPSR0_7, 1980 + GP_0_6_FN, GPSR0_6, 1981 + GP_0_5_FN, GPSR0_5, 1982 + GP_0_4_FN, GPSR0_4, 1983 + GP_0_3_FN, GPSR0_3, 1984 + GP_0_2_FN, GPSR0_2, 1985 + GP_0_1_FN, GPSR0_1, 1986 + GP_0_0_FN, GPSR0_0, } 1987 + }, 1988 + { PINMUX_CFG_REG("GPSR1", 0xe6060104, 32, 1) { 1989 + 0, 0, 1990 + 0, 0, 1991 + 0, 0, 1992 + 0, 0, 1993 + GP_1_27_FN, GPSR1_27, 1994 + GP_1_26_FN, GPSR1_26, 1995 + GP_1_25_FN, GPSR1_25, 1996 + GP_1_24_FN, GPSR1_24, 1997 + GP_1_23_FN, GPSR1_23, 1998 + GP_1_22_FN, GPSR1_22, 1999 + GP_1_21_FN, GPSR1_21, 2000 + GP_1_20_FN, GPSR1_20, 2001 + GP_1_19_FN, GPSR1_19, 2002 + GP_1_18_FN, GPSR1_18, 2003 + GP_1_17_FN, GPSR1_17, 2004 + GP_1_16_FN, GPSR1_16, 2005 + GP_1_15_FN, GPSR1_15, 2006 + GP_1_14_FN, GPSR1_14, 2007 + GP_1_13_FN, GPSR1_13, 2008 + GP_1_12_FN, GPSR1_12, 2009 + GP_1_11_FN, GPSR1_11, 2010 + GP_1_10_FN, GPSR1_10, 2011 + GP_1_9_FN, GPSR1_9, 2012 + GP_1_8_FN, GPSR1_8, 2013 + GP_1_7_FN, GPSR1_7, 2014 + GP_1_6_FN, GPSR1_6, 2015 + GP_1_5_FN, GPSR1_5, 2016 + GP_1_4_FN, GPSR1_4, 2017 + GP_1_3_FN, GPSR1_3, 2018 + GP_1_2_FN, GPSR1_2, 2019 + GP_1_1_FN, GPSR1_1, 2020 + GP_1_0_FN, GPSR1_0, } 2021 + }, 2022 + { PINMUX_CFG_REG("GPSR2", 0xe6060108, 32, 1) { 2023 + 0, 0, 2024 + 0, 0, 2025 + 0, 0, 2026 + 0, 0, 2027 + 0, 0, 2028 + 0, 0, 2029 + 0, 0, 2030 + 0, 0, 2031 + 0, 0, 2032 + 0, 0, 2033 + 0, 0, 2034 + 0, 0, 2035 + 0, 0, 2036 + 0, 0, 2037 + 0, 0, 2038 + GP_2_16_FN, GPSR2_16, 2039 + GP_2_15_FN, GPSR2_15, 2040 + GP_2_14_FN, GPSR2_14, 2041 + GP_2_13_FN, GPSR2_13, 2042 + GP_2_12_FN, GPSR2_12, 2043 + GP_2_11_FN, GPSR2_11, 2044 + GP_2_10_FN, GPSR2_10, 2045 + GP_2_9_FN, GPSR2_9, 2046 + GP_2_8_FN, GPSR2_8, 2047 + GP_2_7_FN, GPSR2_7, 2048 + GP_2_6_FN, GPSR2_6, 2049 + GP_2_5_FN, GPSR2_5, 2050 + GP_2_4_FN, GPSR2_4, 2051 + GP_2_3_FN, GPSR2_3, 2052 + GP_2_2_FN, GPSR2_2, 2053 + GP_2_1_FN, GPSR2_1, 2054 + GP_2_0_FN, GPSR2_0, } 2055 + }, 2056 + { PINMUX_CFG_REG("GPSR3", 0xe606010c, 32, 1) { 2057 + 0, 0, 2058 + 0, 0, 2059 + 0, 0, 2060 + 0, 0, 2061 + 0, 0, 2062 + 0, 0, 2063 + 0, 0, 2064 + 0, 0, 2065 + 0, 0, 2066 + 0, 0, 2067 + 0, 0, 2068 + 0, 0, 2069 + 0, 0, 2070 + 0, 0, 2071 + 0, 0, 2072 + GP_3_16_FN, GPSR3_16, 2073 + GP_3_15_FN, GPSR3_15, 2074 + GP_3_14_FN, GPSR3_14, 2075 + GP_3_13_FN, GPSR3_13, 2076 + GP_3_12_FN, GPSR3_12, 2077 + GP_3_11_FN, GPSR3_11, 2078 + GP_3_10_FN, GPSR3_10, 2079 + GP_3_9_FN, GPSR3_9, 2080 + GP_3_8_FN, GPSR3_8, 2081 + GP_3_7_FN, GPSR3_7, 2082 + GP_3_6_FN, GPSR3_6, 2083 + GP_3_5_FN, GPSR3_5, 2084 + GP_3_4_FN, GPSR3_4, 2085 + GP_3_3_FN, GPSR3_3, 2086 + GP_3_2_FN, GPSR3_2, 2087 + GP_3_1_FN, GPSR3_1, 2088 + GP_3_0_FN, GPSR3_0, } 2089 + }, 2090 + { PINMUX_CFG_REG("GPSR4", 0xe6060110, 32, 1) { 2091 + 0, 0, 2092 + 0, 0, 2093 + 0, 0, 2094 + 0, 0, 2095 + 0, 0, 2096 + 0, 0, 2097 + 0, 0, 2098 + 0, 0, 2099 + 0, 0, 2100 + 0, 0, 2101 + 0, 0, 2102 + 0, 0, 2103 + 0, 0, 2104 + 0, 0, 2105 + 0, 0, 2106 + 0, 0, 2107 + 0, 0, 2108 + 0, 0, 2109 + 0, 0, 2110 + 0, 0, 2111 + 0, 0, 2112 + 0, 0, 2113 + 0, 0, 2114 + 0, 0, 2115 + 0, 0, 2116 + 0, 0, 2117 + GP_4_5_FN, GPSR4_5, 2118 + GP_4_4_FN, GPSR4_4, 2119 + GP_4_3_FN, GPSR4_3, 2120 + GP_4_2_FN, GPSR4_2, 2121 + GP_4_1_FN, GPSR4_1, 2122 + GP_4_0_FN, GPSR4_0, } 2123 + }, 2124 + { PINMUX_CFG_REG("GPSR5", 0xe6060114, 32, 1) { 2125 + 0, 0, 2126 + 0, 0, 2127 + 0, 0, 2128 + 0, 0, 2129 + 0, 0, 2130 + 0, 0, 2131 + 0, 0, 2132 + 0, 0, 2133 + 0, 0, 2134 + 0, 0, 2135 + 0, 0, 2136 + 0, 0, 2137 + 0, 0, 2138 + 0, 0, 2139 + 0, 0, 2140 + 0, 0, 2141 + 0, 0, 2142 + GP_5_14_FN, GPSR5_14, 2143 + GP_5_13_FN, GPSR5_13, 2144 + GP_5_12_FN, GPSR5_12, 2145 + GP_5_11_FN, GPSR5_11, 2146 + GP_5_10_FN, GPSR5_10, 2147 + GP_5_9_FN, GPSR5_9, 2148 + GP_5_8_FN, GPSR5_8, 2149 + GP_5_7_FN, GPSR5_7, 2150 + GP_5_6_FN, GPSR5_6, 2151 + GP_5_5_FN, GPSR5_5, 2152 + GP_5_4_FN, GPSR5_4, 2153 + GP_5_3_FN, GPSR5_3, 2154 + GP_5_2_FN, GPSR5_2, 2155 + GP_5_1_FN, GPSR5_1, 2156 + GP_5_0_FN, GPSR5_0, } 2157 + }, 2158 + #undef F_ 2159 + #undef FM 2160 + 2161 + #define F_(x, y) x, 2162 + #define FM(x) FN_##x, 2163 + { PINMUX_CFG_REG("IPSR0", 0xe6060200, 32, 4) { 2164 + IP0_31_28 2165 + IP0_27_24 2166 + IP0_23_20 2167 + IP0_19_16 2168 + IP0_15_12 2169 + IP0_11_8 2170 + IP0_7_4 2171 + IP0_3_0 } 2172 + }, 2173 + { PINMUX_CFG_REG("IPSR1", 0xe6060204, 32, 4) { 2174 + IP1_31_28 2175 + IP1_27_24 2176 + IP1_23_20 2177 + IP1_19_16 2178 + IP1_15_12 2179 + IP1_11_8 2180 + IP1_7_4 2181 + IP1_3_0 } 2182 + }, 2183 + { PINMUX_CFG_REG("IPSR2", 0xe6060208, 32, 4) { 2184 + IP2_31_28 2185 + IP2_27_24 2186 + IP2_23_20 2187 + IP2_19_16 2188 + IP2_15_12 2189 + IP2_11_8 2190 + IP2_7_4 2191 + IP2_3_0 } 2192 + }, 2193 + { PINMUX_CFG_REG("IPSR3", 0xe606020c, 32, 4) { 2194 + IP3_31_28 2195 + IP3_27_24 2196 + IP3_23_20 2197 + IP3_19_16 2198 + IP3_15_12 2199 + IP3_11_8 2200 + IP3_7_4 2201 + IP3_3_0 } 2202 + }, 2203 + { PINMUX_CFG_REG("IPSR4", 0xe6060210, 32, 4) { 2204 + IP4_31_28 2205 + IP4_27_24 2206 + IP4_23_20 2207 + IP4_19_16 2208 + IP4_15_12 2209 + IP4_11_8 2210 + IP4_7_4 2211 + IP4_3_0 } 2212 + }, 2213 + { PINMUX_CFG_REG("IPSR5", 0xe6060214, 32, 4) { 2214 + IP5_31_28 2215 + IP5_27_24 2216 + IP5_23_20 2217 + IP5_19_16 2218 + IP5_15_12 2219 + IP5_11_8 2220 + IP5_7_4 2221 + IP5_3_0 } 2222 + }, 2223 + { PINMUX_CFG_REG("IPSR6", 0xe6060218, 32, 4) { 2224 + IP6_31_28 2225 + IP6_27_24 2226 + IP6_23_20 2227 + IP6_19_16 2228 + IP6_15_12 2229 + IP6_11_8 2230 + IP6_7_4 2231 + IP6_3_0 } 2232 + }, 2233 + { PINMUX_CFG_REG("IPSR7", 0xe606021c, 32, 4) { 2234 + IP7_31_28 2235 + IP7_27_24 2236 + IP7_23_20 2237 + IP7_19_16 2238 + IP7_15_12 2239 + IP7_11_8 2240 + IP7_7_4 2241 + IP7_3_0 } 2242 + }, 2243 + { PINMUX_CFG_REG("IPSR8", 0xe6060220, 32, 4) { 2244 + IP8_31_28 2245 + IP8_27_24 2246 + IP8_23_20 2247 + IP8_19_16 2248 + IP8_15_12 2249 + IP8_11_8 2250 + IP8_7_4 2251 + IP8_3_0 } 2252 + }, 2253 + #undef F_ 2254 + #undef FM 2255 + 2256 + #define F_(x, y) x, 2257 + #define FM(x) FN_##x, 2258 + { PINMUX_CFG_REG_VAR("MOD_SEL0", 0xe6060500, 32, 2259 + 4, 4, 4, 4, 2260 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1) { 2261 + /* RESERVED 31, 30, 29, 28 */ 2262 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2263 + /* RESERVED 27, 26, 25, 24 */ 2264 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2265 + /* RESERVED 23, 22, 21, 20 */ 2266 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2267 + /* RESERVED 19, 18, 17, 16 */ 2268 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2269 + /* RESERVED 15, 14, 13, 12 */ 2270 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2271 + MOD_SEL0_11 2272 + MOD_SEL0_10 2273 + MOD_SEL0_9 2274 + MOD_SEL0_8 2275 + MOD_SEL0_7 2276 + MOD_SEL0_6 2277 + MOD_SEL0_5 2278 + MOD_SEL0_4 2279 + MOD_SEL0_3 2280 + MOD_SEL0_2 2281 + MOD_SEL0_1 2282 + MOD_SEL0_0 } 2283 + }, 2284 + { }, 2285 + }; 2286 + 2287 + static int r8a77970_pin_to_pocctrl(struct sh_pfc *pfc, unsigned int pin, 2288 + u32 *pocctrl) 2289 + { 2290 + int bit = pin & 0x1f; 2291 + 2292 + *pocctrl = 0xe6060380; 2293 + if (pin >= RCAR_GP_PIN(0, 0) && pin <= RCAR_GP_PIN(0, 21)) 2294 + return bit; 2295 + if (pin >= RCAR_GP_PIN(2, 0) && pin <= RCAR_GP_PIN(2, 9)) 2296 + return bit + 22; 2297 + 2298 + *pocctrl += 4; 2299 + if (pin >= RCAR_GP_PIN(2, 10) && pin <= RCAR_GP_PIN(2, 16)) 2300 + return bit - 10; 2301 + if (pin >= RCAR_GP_PIN(3, 0) && pin <= RCAR_GP_PIN(3, 16)) 2302 + return bit + 7; 2303 + 2304 + return -EINVAL; 2305 + } 2306 + 2307 + static const struct sh_pfc_soc_operations pinmux_ops = { 2308 + .pin_to_pocctrl = r8a77970_pin_to_pocctrl, 2309 + }; 2310 + 2311 + const struct sh_pfc_soc_info r8a77970_pinmux_info = { 2312 + .name = "r8a77970_pfc", 2313 + .ops = &pinmux_ops, 2314 + .unlock_reg = 0xe6060000, /* PMMR */ 2315 + 2316 + .function = { PINMUX_FUNCTION_BEGIN, PINMUX_FUNCTION_END }, 2317 + 2318 + .pins = pinmux_pins, 2319 + .nr_pins = ARRAY_SIZE(pinmux_pins), 2320 + .groups = pinmux_groups, 2321 + .nr_groups = ARRAY_SIZE(pinmux_groups), 2322 + .functions = pinmux_functions, 2323 + .nr_functions = ARRAY_SIZE(pinmux_functions), 2324 + 2325 + .cfg_regs = pinmux_config_regs, 2326 + 2327 + .pinmux_data = pinmux_data, 2328 + .pinmux_data_size = ARRAY_SIZE(pinmux_data), 2329 + };
+88
drivers/pinctrl/sh-pfc/pfc-r8a77995.c
··· 518 518 PINMUX_SINGLE(QSPI0_MISO_IO1), 519 519 PINMUX_SINGLE(QSPI0_MOSI_IO0), 520 520 PINMUX_SINGLE(QSPI0_SPCLK), 521 + PINMUX_SINGLE(SCL0), 522 + PINMUX_SINGLE(SDA0), 521 523 522 524 /* IPSR0 */ 523 525 PINMUX_IPSR_MSEL(IP0_3_0, IRQ0_A, SEL_IRQ_0_0), ··· 1059 1057 AVB0_AVTP_CAPTURE_B_MARK, 1060 1058 }; 1061 1059 1060 + /* - CAN ------------------------------------------------------------------ */ 1061 + static const unsigned int can0_data_a_pins[] = { 1062 + /* TX, RX */ 1063 + RCAR_GP_PIN(4, 28), RCAR_GP_PIN(4, 31), 1064 + }; 1065 + static const unsigned int can0_data_a_mux[] = { 1066 + CAN0_TX_A_MARK, CAN0_RX_A_MARK, 1067 + }; 1068 + static const unsigned int can0_data_b_pins[] = { 1069 + /* TX, RX */ 1070 + RCAR_GP_PIN(4, 22), RCAR_GP_PIN(4, 5), 1071 + }; 1072 + static const unsigned int can0_data_b_mux[] = { 1073 + CAN0_TX_B_MARK, CAN0_RX_B_MARK, 1074 + }; 1075 + static const unsigned int can1_data_a_pins[] = { 1076 + /* TX, RX */ 1077 + RCAR_GP_PIN(4, 30), RCAR_GP_PIN(4, 29), 1078 + }; 1079 + static const unsigned int can1_data_a_mux[] = { 1080 + CAN1_TX_A_MARK, CAN1_RX_A_MARK, 1081 + }; 1082 + static const unsigned int can1_data_b_pins[] = { 1083 + /* TX, RX */ 1084 + RCAR_GP_PIN(4, 7), RCAR_GP_PIN(4, 6), 1085 + }; 1086 + static const unsigned int can1_data_b_mux[] = { 1087 + CAN1_TX_B_MARK, CAN1_RX_B_MARK, 1088 + }; 1089 + 1090 + /* - CAN Clock -------------------------------------------------------------- */ 1091 + static const unsigned int can_clk_pins[] = { 1092 + /* CLK */ 1093 + RCAR_GP_PIN(5, 2), 1094 + }; 1095 + static const unsigned int can_clk_mux[] = { 1096 + CAN_CLK_MARK, 1097 + }; 1098 + 1099 + /* - CAN FD ----------------------------------------------------------------- */ 1100 + static const unsigned int canfd0_data_pins[] = { 1101 + /* TX, RX */ 1102 + RCAR_GP_PIN(4, 28), RCAR_GP_PIN(4, 31), 1103 + }; 1104 + static const unsigned int canfd0_data_mux[] = { 1105 + CANFD0_TX_MARK, CANFD0_RX_MARK, 1106 + }; 1107 + static const unsigned int canfd1_data_pins[] = { 1108 + /* TX, RX */ 1109 + RCAR_GP_PIN(4, 30), RCAR_GP_PIN(4, 29), 1110 + }; 1111 + static const unsigned int canfd1_data_mux[] = { 1112 + CANFD1_TX_MARK, CANFD1_RX_MARK, 1113 + }; 1114 + 1062 1115 /* - I2C -------------------------------------------------------------------- */ 1063 1116 static const unsigned int i2c0_pins[] = { 1064 1117 /* SCL, SDA */ ··· 1561 1504 SH_PFC_PIN_GROUP(avb0_avtp_pps_b), 1562 1505 SH_PFC_PIN_GROUP(avb0_avtp_match_b), 1563 1506 SH_PFC_PIN_GROUP(avb0_avtp_capture_b), 1507 + SH_PFC_PIN_GROUP(can0_data_a), 1508 + SH_PFC_PIN_GROUP(can0_data_b), 1509 + SH_PFC_PIN_GROUP(can1_data_a), 1510 + SH_PFC_PIN_GROUP(can1_data_b), 1511 + SH_PFC_PIN_GROUP(can_clk), 1512 + SH_PFC_PIN_GROUP(canfd0_data), 1513 + SH_PFC_PIN_GROUP(canfd1_data), 1564 1514 SH_PFC_PIN_GROUP(i2c0), 1565 1515 SH_PFC_PIN_GROUP(i2c1), 1566 1516 SH_PFC_PIN_GROUP(i2c2_a), ··· 1643 1579 "avb0_avtp_pps_b", 1644 1580 "avb0_avtp_match_b", 1645 1581 "avb0_avtp_capture_b", 1582 + }; 1583 + 1584 + static const char * const can0_groups[] = { 1585 + "can0_data_a", 1586 + "can0_data_b", 1587 + }; 1588 + static const char * const can1_groups[] = { 1589 + "can1_data_a", 1590 + "can1_data_b", 1591 + }; 1592 + static const char * const can_clk_groups[] = { 1593 + "can_clk", 1594 + }; 1595 + 1596 + static const char * const canfd0_groups[] = { 1597 + "canfd0_data", 1598 + }; 1599 + static const char * const canfd1_groups[] = { 1600 + "canfd1_data", 1646 1601 }; 1647 1602 1648 1603 static const char * const i2c0_groups[] = { ··· 1774 1691 static const struct sh_pfc_function pinmux_functions[] = { 1775 1692 SH_PFC_FUNCTION(audio_clk), 1776 1693 SH_PFC_FUNCTION(avb0), 1694 + SH_PFC_FUNCTION(can0), 1695 + SH_PFC_FUNCTION(can1), 1696 + SH_PFC_FUNCTION(can_clk), 1697 + SH_PFC_FUNCTION(canfd0), 1698 + SH_PFC_FUNCTION(canfd1), 1777 1699 SH_PFC_FUNCTION(i2c0), 1778 1700 SH_PFC_FUNCTION(i2c1), 1779 1701 SH_PFC_FUNCTION(i2c2),
+13 -4
drivers/pinctrl/sh-pfc/sh_pfc.h
··· 283 283 extern const struct sh_pfc_soc_info r8a7795_pinmux_info; 284 284 extern const struct sh_pfc_soc_info r8a7795es1_pinmux_info; 285 285 extern const struct sh_pfc_soc_info r8a7796_pinmux_info; 286 + extern const struct sh_pfc_soc_info r8a77970_pinmux_info; 286 287 extern const struct sh_pfc_soc_info r8a77995_pinmux_info; 287 288 extern const struct sh_pfc_soc_info sh7203_pinmux_info; 288 289 extern const struct sh_pfc_soc_info sh7264_pinmux_info; ··· 390 389 PORT_GP_CFG_1(bank, 3, fn, sfx, cfg) 391 390 #define PORT_GP_4(bank, fn, sfx) PORT_GP_CFG_4(bank, fn, sfx, 0) 392 391 393 - #define PORT_GP_CFG_8(bank, fn, sfx, cfg) \ 392 + #define PORT_GP_CFG_6(bank, fn, sfx, cfg) \ 394 393 PORT_GP_CFG_4(bank, fn, sfx, cfg), \ 395 394 PORT_GP_CFG_1(bank, 4, fn, sfx, cfg), \ 396 - PORT_GP_CFG_1(bank, 5, fn, sfx, cfg), \ 395 + PORT_GP_CFG_1(bank, 5, fn, sfx, cfg) 396 + #define PORT_GP_6(bank, fn, sfx) PORT_GP_CFG_6(bank, fn, sfx, 0) 397 + 398 + #define PORT_GP_CFG_8(bank, fn, sfx, cfg) \ 399 + PORT_GP_CFG_6(bank, fn, sfx, cfg), \ 397 400 PORT_GP_CFG_1(bank, 6, fn, sfx, cfg), \ 398 401 PORT_GP_CFG_1(bank, 7, fn, sfx, cfg) 399 402 #define PORT_GP_8(bank, fn, sfx) PORT_GP_CFG_8(bank, fn, sfx, 0) ··· 455 450 PORT_GP_CFG_1(bank, 20, fn, sfx, cfg) 456 451 #define PORT_GP_21(bank, fn, sfx) PORT_GP_CFG_21(bank, fn, sfx, 0) 457 452 458 - #define PORT_GP_CFG_23(bank, fn, sfx, cfg) \ 453 + #define PORT_GP_CFG_22(bank, fn, sfx, cfg) \ 459 454 PORT_GP_CFG_21(bank, fn, sfx, cfg), \ 460 - PORT_GP_CFG_1(bank, 21, fn, sfx, cfg), \ 455 + PORT_GP_CFG_1(bank, 21, fn, sfx, cfg) 456 + #define PORT_GP_22(bank, fn, sfx) PORT_GP_CFG_22(bank, fn, sfx, 0) 457 + 458 + #define PORT_GP_CFG_23(bank, fn, sfx, cfg) \ 459 + PORT_GP_CFG_22(bank, fn, sfx, cfg), \ 461 460 PORT_GP_CFG_1(bank, 22, fn, sfx, cfg) 462 461 #define PORT_GP_23(bank, fn, sfx) PORT_GP_CFG_23(bank, fn, sfx, 0) 463 462
+2 -6
drivers/pinctrl/spear/pinctrl-plgpio.c
··· 519 519 int ret, irq; 520 520 521 521 plgpio = devm_kzalloc(&pdev->dev, sizeof(*plgpio), GFP_KERNEL); 522 - if (!plgpio) { 523 - dev_err(&pdev->dev, "memory allocation fail\n"); 522 + if (!plgpio) 524 523 return -ENOMEM; 525 - } 526 524 527 525 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 528 526 plgpio->base = devm_ioremap_resource(&pdev->dev, res); ··· 542 544 sizeof(*plgpio->csave_regs) * 543 545 DIV_ROUND_UP(plgpio->chip.ngpio, MAX_GPIO_PER_REG), 544 546 GFP_KERNEL); 545 - if (!plgpio->csave_regs) { 546 - dev_err(&pdev->dev, "csave registers memory allocation fail\n"); 547 + if (!plgpio->csave_regs) 547 548 return -ENOMEM; 548 - } 549 549 #endif 550 550 551 551 platform_set_drvdata(pdev, plgpio);
+1 -3
drivers/pinctrl/spear/pinctrl-spear.c
··· 361 361 return -ENODEV; 362 362 363 363 pmx = devm_kzalloc(&pdev->dev, sizeof(*pmx), GFP_KERNEL); 364 - if (!pmx) { 365 - dev_err(&pdev->dev, "Can't alloc spear_pmx\n"); 364 + if (!pmx) 366 365 return -ENOMEM; 367 - } 368 366 369 367 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 370 368 pmx->vbase = devm_ioremap_resource(&pdev->dev, res);
+1 -1
drivers/pinctrl/sprd/pinctrl-sprd.c
··· 818 818 819 819 grp = &info->groups[selector]; 820 820 821 - seq_printf(s, "\n"); 821 + seq_putc(s, '\n'); 822 822 for (i = 0; i < grp->npins; i++, config++) { 823 823 unsigned int pin_id = grp->pins[i]; 824 824
+12
drivers/pinctrl/stm32/Kconfig
··· 27 27 default MACH_STM32F746 28 28 select PINCTRL_STM32 29 29 30 + config PINCTRL_STM32F769 31 + bool "STMicroelectronics STM32F769 pin control" if COMPILE_TEST && !MACH_STM32F769 32 + depends on OF 33 + default MACH_STM32F769 34 + select PINCTRL_STM32 35 + 30 36 config PINCTRL_STM32H743 31 37 bool "STMicroelectronics STM32H743 pin control" if COMPILE_TEST && !MACH_STM32H743 32 38 depends on OF 33 39 default MACH_STM32H743 40 + select PINCTRL_STM32 41 + 42 + config PINCTRL_STM32MP157 43 + bool "STMicroelectronics STM32MP157 pin control" if COMPILE_TEST && !MACH_STM32MP157 44 + depends on OF 45 + default MACH_STM32MP157 34 46 select PINCTRL_STM32 35 47 endif
+2
drivers/pinctrl/stm32/Makefile
··· 6 6 obj-$(CONFIG_PINCTRL_STM32F429) += pinctrl-stm32f429.o 7 7 obj-$(CONFIG_PINCTRL_STM32F469) += pinctrl-stm32f469.o 8 8 obj-$(CONFIG_PINCTRL_STM32F746) += pinctrl-stm32f746.o 9 + obj-$(CONFIG_PINCTRL_STM32F769) += pinctrl-stm32f769.o 9 10 obj-$(CONFIG_PINCTRL_STM32H743) += pinctrl-stm32h743.o 11 + obj-$(CONFIG_PINCTRL_STM32MP157) += pinctrl-stm32mp157.o
+2 -1
drivers/pinctrl/stm32/pinctrl-stm32.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 1 2 /* 2 3 * Copyright (C) Maxime Coquelin 2015 4 + * Copyright (C) STMicroelectronics 2017 3 5 * Author: Maxime Coquelin <mcoquelin.stm32@gmail.com> 4 - * License terms: GNU General Public License (GPL), version 2 5 6 * 6 7 * Heavily based on Mediatek's pinctrl driver 7 8 */
+2 -1
drivers/pinctrl/stm32/pinctrl-stm32.h
··· 1 + // SPDX-License-Identifier: GPL-2.0 1 2 /* 2 3 * Copyright (C) Maxime Coquelin 2015 4 + * Copyright (C) STMicroelectronics 2017 3 5 * Author: Maxime Coquelin <mcoquelin.stm32@gmail.com> 4 - * License terms: GNU General Public License (GPL), version 2 5 6 */ 6 7 #ifndef __PINCTRL_STM32_H 7 8 #define __PINCTRL_STM32_H
+2 -1
drivers/pinctrl/stm32/pinctrl-stm32f429.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 1 2 /* 2 3 * Copyright (C) Maxime Coquelin 2015 4 + * Copyright (C) STMicroelectronics 2017 3 5 * Author: Maxime Coquelin <mcoquelin.stm32@gmail.com> 4 - * License terms: GNU General Public License (GPL), version 2 5 6 */ 6 7 #include <linux/init.h> 7 8 #include <linux/of.h>
+3 -3
drivers/pinctrl/stm32/pinctrl-stm32f469.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 1 2 /* 2 - * Copyright (C) Alexandre Torgue 2016 3 - * Author: Alexandre Torgue <alexandre.torgue@st.com> 4 - * License terms: GNU General Public License (GPL), version 2 3 + * Copyright (C) STMicroelectronics 2017 4 + * Author: Alexandre Torgue <alexandre.torgue@st.com> for STMicroelectronics. 5 5 */ 6 6 #include <linux/init.h> 7 7 #include <linux/of.h>
+2 -1
drivers/pinctrl/stm32/pinctrl-stm32f746.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 1 2 /* 2 3 * Copyright (C) Maxime Coquelin 2015 4 + * Copyright (C) STMicroelectronics 2017 3 5 * Author: Maxime Coquelin <mcoquelin.stm32@gmail.com> 4 - * License terms: GNU General Public License (GPL), version 2 5 6 */ 6 7 #include <linux/init.h> 7 8 #include <linux/of.h>
+1827
drivers/pinctrl/stm32/pinctrl-stm32f769.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 2 + /* 3 + * Copyright (C) STMicroelectronics 2017 4 + * Author: Alexandre Torgue <alexandre.torgue@st.com> for STMicroelectronics. 5 + */ 6 + #include <linux/init.h> 7 + #include <linux/of.h> 8 + #include <linux/platform_device.h> 9 + 10 + #include "pinctrl-stm32.h" 11 + 12 + static const struct stm32_desc_pin stm32f769_pins[] = { 13 + STM32_PIN( 14 + PINCTRL_PIN(0, "PA0"), 15 + STM32_FUNCTION(0, "GPIOA0"), 16 + STM32_FUNCTION(2, "TIM2_CH1 TIM2_ETR"), 17 + STM32_FUNCTION(3, "TIM5_CH1"), 18 + STM32_FUNCTION(4, "TIM8_ETR"), 19 + STM32_FUNCTION(8, "USART2_CTS"), 20 + STM32_FUNCTION(9, "UART4_TX"), 21 + STM32_FUNCTION(11, "SAI2_SD_B"), 22 + STM32_FUNCTION(12, "ETH_MII_CRS"), 23 + STM32_FUNCTION(16, "EVENTOUT"), 24 + STM32_FUNCTION(17, "ANALOG") 25 + ), 26 + STM32_PIN( 27 + PINCTRL_PIN(1, "PA1"), 28 + STM32_FUNCTION(0, "GPIOA1"), 29 + STM32_FUNCTION(2, "TIM2_CH2"), 30 + STM32_FUNCTION(3, "TIM5_CH2"), 31 + STM32_FUNCTION(8, "USART2_RTS"), 32 + STM32_FUNCTION(9, "UART4_RX"), 33 + STM32_FUNCTION(10, "QUADSPI_BK1_IO3"), 34 + STM32_FUNCTION(11, "SAI2_MCLK_B"), 35 + STM32_FUNCTION(12, "ETH_MII_RX_CLK ETH_RMII_REF_CLK"), 36 + STM32_FUNCTION(15, "LCD_R2"), 37 + STM32_FUNCTION(16, "EVENTOUT"), 38 + STM32_FUNCTION(17, "ANALOG") 39 + ), 40 + STM32_PIN( 41 + PINCTRL_PIN(2, "PA2"), 42 + STM32_FUNCTION(0, "GPIOA2"), 43 + STM32_FUNCTION(2, "TIM2_CH3"), 44 + STM32_FUNCTION(3, "TIM5_CH3"), 45 + STM32_FUNCTION(4, "TIM9_CH1"), 46 + STM32_FUNCTION(8, "USART2_TX"), 47 + STM32_FUNCTION(9, "SAI2_SCK_B"), 48 + STM32_FUNCTION(12, "ETH_MDIO"), 49 + STM32_FUNCTION(13, "MDIOS_MDIO"), 50 + STM32_FUNCTION(15, "LCD_R1"), 51 + STM32_FUNCTION(16, "EVENTOUT"), 52 + STM32_FUNCTION(17, "ANALOG") 53 + ), 54 + STM32_PIN( 55 + PINCTRL_PIN(3, "PA3"), 56 + STM32_FUNCTION(0, "GPIOA3"), 57 + STM32_FUNCTION(2, "TIM2_CH4"), 58 + STM32_FUNCTION(3, "TIM5_CH4"), 59 + STM32_FUNCTION(4, "TIM9_CH2"), 60 + STM32_FUNCTION(8, "USART2_RX"), 61 + STM32_FUNCTION(10, "LCD_B2"), 62 + STM32_FUNCTION(11, "OTG_HS_ULPI_D0"), 63 + STM32_FUNCTION(12, "ETH_MII_COL"), 64 + STM32_FUNCTION(15, "LCD_B5"), 65 + STM32_FUNCTION(16, "EVENTOUT"), 66 + STM32_FUNCTION(17, "ANALOG") 67 + ), 68 + STM32_PIN( 69 + PINCTRL_PIN(4, "PA4"), 70 + STM32_FUNCTION(0, "GPIOA4"), 71 + STM32_FUNCTION(6, "SPI1_NSS I2S1_WS"), 72 + STM32_FUNCTION(7, "SPI3_NSS I2S3_WS"), 73 + STM32_FUNCTION(8, "USART2_CK"), 74 + STM32_FUNCTION(9, "SPI6_NSS"), 75 + STM32_FUNCTION(13, "OTG_HS_SOF"), 76 + STM32_FUNCTION(14, "DCMI_HSYNC"), 77 + STM32_FUNCTION(15, "LCD_VSYNC"), 78 + STM32_FUNCTION(16, "EVENTOUT"), 79 + STM32_FUNCTION(17, "ANALOG") 80 + ), 81 + STM32_PIN( 82 + PINCTRL_PIN(5, "PA5"), 83 + STM32_FUNCTION(0, "GPIOA5"), 84 + STM32_FUNCTION(2, "TIM2_CH1 TIM2_ETR"), 85 + STM32_FUNCTION(4, "TIM8_CH1N"), 86 + STM32_FUNCTION(6, "SPI1_SCK I2S1_CK"), 87 + STM32_FUNCTION(9, "SPI6_SCK"), 88 + STM32_FUNCTION(11, "OTG_HS_ULPI_CK"), 89 + STM32_FUNCTION(15, "LCD_R4"), 90 + STM32_FUNCTION(16, "EVENTOUT"), 91 + STM32_FUNCTION(17, "ANALOG") 92 + ), 93 + STM32_PIN( 94 + PINCTRL_PIN(6, "PA6"), 95 + STM32_FUNCTION(0, "GPIOA6"), 96 + STM32_FUNCTION(2, "TIM1_BKIN"), 97 + STM32_FUNCTION(3, "TIM3_CH1"), 98 + STM32_FUNCTION(4, "TIM8_BKIN"), 99 + STM32_FUNCTION(6, "SPI1_MISO"), 100 + STM32_FUNCTION(9, "SPI6_MISO"), 101 + STM32_FUNCTION(10, "TIM13_CH1"), 102 + STM32_FUNCTION(13, "MDIOS_MDC"), 103 + STM32_FUNCTION(14, "DCMI_PIXCLK"), 104 + STM32_FUNCTION(15, "LCD_G2"), 105 + STM32_FUNCTION(16, "EVENTOUT"), 106 + STM32_FUNCTION(17, "ANALOG") 107 + ), 108 + STM32_PIN( 109 + PINCTRL_PIN(7, "PA7"), 110 + STM32_FUNCTION(0, "GPIOA7"), 111 + STM32_FUNCTION(2, "TIM1_CH1N"), 112 + STM32_FUNCTION(3, "TIM3_CH2"), 113 + STM32_FUNCTION(4, "TIM8_CH1N"), 114 + STM32_FUNCTION(6, "SPI1_MOSI I2S1_SD"), 115 + STM32_FUNCTION(9, "SPI6_MOSI"), 116 + STM32_FUNCTION(10, "TIM14_CH1"), 117 + STM32_FUNCTION(12, "ETH_MII_RX_DV ETH_RMII_CRS_DV"), 118 + STM32_FUNCTION(13, "FMC_SDNWE"), 119 + STM32_FUNCTION(16, "EVENTOUT"), 120 + STM32_FUNCTION(17, "ANALOG") 121 + ), 122 + STM32_PIN( 123 + PINCTRL_PIN(8, "PA8"), 124 + STM32_FUNCTION(0, "GPIOA8"), 125 + STM32_FUNCTION(1, "MCO1"), 126 + STM32_FUNCTION(2, "TIM1_CH1"), 127 + STM32_FUNCTION(4, "TIM8_BKIN2"), 128 + STM32_FUNCTION(5, "I2C3_SCL"), 129 + STM32_FUNCTION(8, "USART1_CK"), 130 + STM32_FUNCTION(11, "OTG_FS_SOF"), 131 + STM32_FUNCTION(12, "CAN3_RX"), 132 + STM32_FUNCTION(13, "UART7_RX"), 133 + STM32_FUNCTION(14, "LCD_B3"), 134 + STM32_FUNCTION(15, "LCD_R6"), 135 + STM32_FUNCTION(16, "EVENTOUT"), 136 + STM32_FUNCTION(17, "ANALOG") 137 + ), 138 + STM32_PIN( 139 + PINCTRL_PIN(9, "PA9"), 140 + STM32_FUNCTION(0, "GPIOA9"), 141 + STM32_FUNCTION(2, "TIM1_CH2"), 142 + STM32_FUNCTION(5, "I2C3_SMBA"), 143 + STM32_FUNCTION(6, "SPI2_SCK I2S2_CK"), 144 + STM32_FUNCTION(8, "USART1_TX"), 145 + STM32_FUNCTION(14, "DCMI_D0"), 146 + STM32_FUNCTION(15, "LCD_R5"), 147 + STM32_FUNCTION(16, "EVENTOUT"), 148 + STM32_FUNCTION(17, "ANALOG") 149 + ), 150 + STM32_PIN( 151 + PINCTRL_PIN(10, "PA10"), 152 + STM32_FUNCTION(0, "GPIOA10"), 153 + STM32_FUNCTION(2, "TIM1_CH3"), 154 + STM32_FUNCTION(8, "USART1_RX"), 155 + STM32_FUNCTION(10, "LCD_B4"), 156 + STM32_FUNCTION(11, "OTG_FS_ID"), 157 + STM32_FUNCTION(13, "MDIOS_MDIO"), 158 + STM32_FUNCTION(14, "DCMI_D1"), 159 + STM32_FUNCTION(15, "LCD_B1"), 160 + STM32_FUNCTION(16, "EVENTOUT"), 161 + STM32_FUNCTION(17, "ANALOG") 162 + ), 163 + STM32_PIN( 164 + PINCTRL_PIN(11, "PA11"), 165 + STM32_FUNCTION(0, "GPIOA11"), 166 + STM32_FUNCTION(2, "TIM1_CH4"), 167 + STM32_FUNCTION(6, "SPI2_NSS I2S2_WS"), 168 + STM32_FUNCTION(7, "UART4_RX"), 169 + STM32_FUNCTION(8, "USART1_CTS"), 170 + STM32_FUNCTION(10, "CAN1_RX"), 171 + STM32_FUNCTION(11, "OTG_FS_DM"), 172 + STM32_FUNCTION(15, "LCD_R4"), 173 + STM32_FUNCTION(16, "EVENTOUT"), 174 + STM32_FUNCTION(17, "ANALOG") 175 + ), 176 + STM32_PIN( 177 + PINCTRL_PIN(12, "PA12"), 178 + STM32_FUNCTION(0, "GPIOA12"), 179 + STM32_FUNCTION(2, "TIM1_ETR"), 180 + STM32_FUNCTION(6, "SPI2_SCK I2S2_CK"), 181 + STM32_FUNCTION(7, "UART4_TX"), 182 + STM32_FUNCTION(8, "USART1_RTS"), 183 + STM32_FUNCTION(9, "SAI2_FS_B"), 184 + STM32_FUNCTION(10, "CAN1_TX"), 185 + STM32_FUNCTION(11, "OTG_FS_DP"), 186 + STM32_FUNCTION(15, "LCD_R5"), 187 + STM32_FUNCTION(16, "EVENTOUT"), 188 + STM32_FUNCTION(17, "ANALOG") 189 + ), 190 + STM32_PIN( 191 + PINCTRL_PIN(13, "PA13"), 192 + STM32_FUNCTION(0, "GPIOA13"), 193 + STM32_FUNCTION(1, "JTMS SWDIO"), 194 + STM32_FUNCTION(16, "EVENTOUT"), 195 + STM32_FUNCTION(17, "ANALOG") 196 + ), 197 + STM32_PIN( 198 + PINCTRL_PIN(14, "PA14"), 199 + STM32_FUNCTION(0, "GPIOA14"), 200 + STM32_FUNCTION(1, "JTCK SWCLK"), 201 + STM32_FUNCTION(16, "EVENTOUT"), 202 + STM32_FUNCTION(17, "ANALOG") 203 + ), 204 + STM32_PIN( 205 + PINCTRL_PIN(15, "PA15"), 206 + STM32_FUNCTION(0, "GPIOA15"), 207 + STM32_FUNCTION(1, "JTDI"), 208 + STM32_FUNCTION(2, "TIM2_CH1 TIM2_ETR"), 209 + STM32_FUNCTION(5, "HDMI_CEC"), 210 + STM32_FUNCTION(6, "SPI1_NSS I2S1_WS"), 211 + STM32_FUNCTION(7, "SPI3_NSS I2S3_WS"), 212 + STM32_FUNCTION(8, "SPI6_NSS"), 213 + STM32_FUNCTION(9, "UART4_RTS"), 214 + STM32_FUNCTION(12, "CAN3_TX"), 215 + STM32_FUNCTION(13, "UART7_TX"), 216 + STM32_FUNCTION(16, "EVENTOUT"), 217 + STM32_FUNCTION(17, "ANALOG") 218 + ), 219 + STM32_PIN( 220 + PINCTRL_PIN(16, "PB0"), 221 + STM32_FUNCTION(0, "GPIOB0"), 222 + STM32_FUNCTION(2, "TIM1_CH2N"), 223 + STM32_FUNCTION(3, "TIM3_CH3"), 224 + STM32_FUNCTION(4, "TIM8_CH2N"), 225 + STM32_FUNCTION(7, "DFSDM_CKOUT"), 226 + STM32_FUNCTION(9, "UART4_CTS"), 227 + STM32_FUNCTION(10, "LCD_R3"), 228 + STM32_FUNCTION(11, "OTG_HS_ULPI_D1"), 229 + STM32_FUNCTION(12, "ETH_MII_RXD2"), 230 + STM32_FUNCTION(15, "LCD_G1"), 231 + STM32_FUNCTION(16, "EVENTOUT"), 232 + STM32_FUNCTION(17, "ANALOG") 233 + ), 234 + STM32_PIN( 235 + PINCTRL_PIN(17, "PB1"), 236 + STM32_FUNCTION(0, "GPIOB1"), 237 + STM32_FUNCTION(2, "TIM1_CH3N"), 238 + STM32_FUNCTION(3, "TIM3_CH4"), 239 + STM32_FUNCTION(4, "TIM8_CH3N"), 240 + STM32_FUNCTION(7, "DFSDM_DATIN1"), 241 + STM32_FUNCTION(10, "LCD_R6"), 242 + STM32_FUNCTION(11, "OTG_HS_ULPI_D2"), 243 + STM32_FUNCTION(12, "ETH_MII_RXD3"), 244 + STM32_FUNCTION(15, "LCD_G0"), 245 + STM32_FUNCTION(16, "EVENTOUT"), 246 + STM32_FUNCTION(17, "ANALOG") 247 + ), 248 + STM32_PIN( 249 + PINCTRL_PIN(18, "PB2"), 250 + STM32_FUNCTION(0, "GPIOB2"), 251 + STM32_FUNCTION(7, "SAI1_SD_A"), 252 + STM32_FUNCTION(8, "SPI3_MOSI I2S3_SD"), 253 + STM32_FUNCTION(10, "QUADSPI_CLK"), 254 + STM32_FUNCTION(11, "DFSDM_CKIN1"), 255 + STM32_FUNCTION(16, "EVENTOUT"), 256 + STM32_FUNCTION(17, "ANALOG") 257 + ), 258 + STM32_PIN( 259 + PINCTRL_PIN(19, "PB3"), 260 + STM32_FUNCTION(0, "GPIOB3"), 261 + STM32_FUNCTION(1, "JTDO TRACESWO"), 262 + STM32_FUNCTION(2, "TIM2_CH2"), 263 + STM32_FUNCTION(6, "SPI1_SCK I2S1_CK"), 264 + STM32_FUNCTION(7, "SPI3_SCK I2S3_CK"), 265 + STM32_FUNCTION(9, "SPI6_SCK"), 266 + STM32_FUNCTION(11, "SDMMC2_D2"), 267 + STM32_FUNCTION(12, "CAN3_RX"), 268 + STM32_FUNCTION(13, "UART7_RX"), 269 + STM32_FUNCTION(16, "EVENTOUT"), 270 + STM32_FUNCTION(17, "ANALOG") 271 + ), 272 + STM32_PIN( 273 + PINCTRL_PIN(20, "PB4"), 274 + STM32_FUNCTION(0, "GPIOB4"), 275 + STM32_FUNCTION(1, "NJTRST"), 276 + STM32_FUNCTION(3, "TIM3_CH1"), 277 + STM32_FUNCTION(6, "SPI1_MISO"), 278 + STM32_FUNCTION(7, "SPI3_MISO"), 279 + STM32_FUNCTION(8, "SPI2_NSS I2S2_WS"), 280 + STM32_FUNCTION(9, "SPI6_MISO"), 281 + STM32_FUNCTION(11, "SDMMC2_D3"), 282 + STM32_FUNCTION(12, "CAN3_TX"), 283 + STM32_FUNCTION(13, "UART7_TX"), 284 + STM32_FUNCTION(16, "EVENTOUT"), 285 + STM32_FUNCTION(17, "ANALOG") 286 + ), 287 + STM32_PIN( 288 + PINCTRL_PIN(21, "PB5"), 289 + STM32_FUNCTION(0, "GPIOB5"), 290 + STM32_FUNCTION(2, "UART5_RX"), 291 + STM32_FUNCTION(3, "TIM3_CH2"), 292 + STM32_FUNCTION(5, "I2C1_SMBA"), 293 + STM32_FUNCTION(6, "SPI1_MOSI I2S1_SD"), 294 + STM32_FUNCTION(7, "SPI3_MOSI I2S3_SD"), 295 + STM32_FUNCTION(9, "SPI6_MOSI"), 296 + STM32_FUNCTION(10, "CAN2_RX"), 297 + STM32_FUNCTION(11, "OTG_HS_ULPI_D7"), 298 + STM32_FUNCTION(12, "ETH_PPS_OUT"), 299 + STM32_FUNCTION(13, "FMC_SDCKE1"), 300 + STM32_FUNCTION(14, "DCMI_D10"), 301 + STM32_FUNCTION(15, "LCD_G7"), 302 + STM32_FUNCTION(16, "EVENTOUT"), 303 + STM32_FUNCTION(17, "ANALOG") 304 + ), 305 + STM32_PIN( 306 + PINCTRL_PIN(22, "PB6"), 307 + STM32_FUNCTION(0, "GPIOB6"), 308 + STM32_FUNCTION(2, "UART5_TX"), 309 + STM32_FUNCTION(3, "TIM4_CH1"), 310 + STM32_FUNCTION(4, "HDMI_CEC"), 311 + STM32_FUNCTION(5, "I2C1_SCL"), 312 + STM32_FUNCTION(7, "DFSDM_DATIN5"), 313 + STM32_FUNCTION(8, "USART1_TX"), 314 + STM32_FUNCTION(10, "CAN2_TX"), 315 + STM32_FUNCTION(11, "QUADSPI_BK1_NCS"), 316 + STM32_FUNCTION(12, "I2C4_SCL"), 317 + STM32_FUNCTION(13, "FMC_SDNE1"), 318 + STM32_FUNCTION(14, "DCMI_D5"), 319 + STM32_FUNCTION(16, "EVENTOUT"), 320 + STM32_FUNCTION(17, "ANALOG") 321 + ), 322 + STM32_PIN( 323 + PINCTRL_PIN(23, "PB7"), 324 + STM32_FUNCTION(0, "GPIOB7"), 325 + STM32_FUNCTION(3, "TIM4_CH2"), 326 + STM32_FUNCTION(5, "I2C1_SDA"), 327 + STM32_FUNCTION(7, "DFSDM_CKIN5"), 328 + STM32_FUNCTION(8, "USART1_RX"), 329 + STM32_FUNCTION(12, "I2C4_SDA"), 330 + STM32_FUNCTION(13, "FMC_NL"), 331 + STM32_FUNCTION(14, "DCMI_VSYNC"), 332 + STM32_FUNCTION(16, "EVENTOUT"), 333 + STM32_FUNCTION(17, "ANALOG") 334 + ), 335 + STM32_PIN( 336 + PINCTRL_PIN(24, "PB8"), 337 + STM32_FUNCTION(0, "GPIOB8"), 338 + STM32_FUNCTION(2, "I2C4_SCL"), 339 + STM32_FUNCTION(3, "TIM4_CH3"), 340 + STM32_FUNCTION(4, "TIM10_CH1"), 341 + STM32_FUNCTION(5, "I2C1_SCL"), 342 + STM32_FUNCTION(7, "DFSDM_CKIN7"), 343 + STM32_FUNCTION(8, "UART5_RX"), 344 + STM32_FUNCTION(10, "CAN1_RX"), 345 + STM32_FUNCTION(11, "SDMMC2_D4"), 346 + STM32_FUNCTION(12, "ETH_MII_TXD3"), 347 + STM32_FUNCTION(13, "SDMMC1_D4"), 348 + STM32_FUNCTION(14, "DCMI_D6"), 349 + STM32_FUNCTION(15, "LCD_B6"), 350 + STM32_FUNCTION(16, "EVENTOUT"), 351 + STM32_FUNCTION(17, "ANALOG") 352 + ), 353 + STM32_PIN( 354 + PINCTRL_PIN(25, "PB9"), 355 + STM32_FUNCTION(0, "GPIOB9"), 356 + STM32_FUNCTION(2, "I2C4_SDA"), 357 + STM32_FUNCTION(3, "TIM4_CH4"), 358 + STM32_FUNCTION(4, "TIM11_CH1"), 359 + STM32_FUNCTION(5, "I2C1_SDA"), 360 + STM32_FUNCTION(6, "SPI2_NSS I2S2_WS"), 361 + STM32_FUNCTION(7, "DFSDM_DATIN7"), 362 + STM32_FUNCTION(8, "UART5_TX"), 363 + STM32_FUNCTION(10, "CAN1_TX"), 364 + STM32_FUNCTION(11, "SDMMC2_D5"), 365 + STM32_FUNCTION(12, "I2C4_SMBA"), 366 + STM32_FUNCTION(13, "SDMMC1_D5"), 367 + STM32_FUNCTION(14, "DCMI_D7"), 368 + STM32_FUNCTION(15, "LCD_B7"), 369 + STM32_FUNCTION(16, "EVENTOUT"), 370 + STM32_FUNCTION(17, "ANALOG") 371 + ), 372 + STM32_PIN( 373 + PINCTRL_PIN(26, "PB10"), 374 + STM32_FUNCTION(0, "GPIOB10"), 375 + STM32_FUNCTION(2, "TIM2_CH3"), 376 + STM32_FUNCTION(5, "I2C2_SCL"), 377 + STM32_FUNCTION(6, "SPI2_SCK I2S2_CK"), 378 + STM32_FUNCTION(7, "DFSDM_DATIN7"), 379 + STM32_FUNCTION(8, "USART3_TX"), 380 + STM32_FUNCTION(10, "QUADSPI_BK1_NCS"), 381 + STM32_FUNCTION(11, "OTG_HS_ULPI_D3"), 382 + STM32_FUNCTION(12, "ETH_MII_RX_ER"), 383 + STM32_FUNCTION(15, "LCD_G4"), 384 + STM32_FUNCTION(16, "EVENTOUT"), 385 + STM32_FUNCTION(17, "ANALOG") 386 + ), 387 + STM32_PIN( 388 + PINCTRL_PIN(27, "PB11"), 389 + STM32_FUNCTION(0, "GPIOB11"), 390 + STM32_FUNCTION(2, "TIM2_CH4"), 391 + STM32_FUNCTION(5, "I2C2_SDA"), 392 + STM32_FUNCTION(7, "DFSDM_CKIN7"), 393 + STM32_FUNCTION(8, "USART3_RX"), 394 + STM32_FUNCTION(11, "OTG_HS_ULPI_D4"), 395 + STM32_FUNCTION(12, "ETH_MII_TX_EN ETH_RMII_TX_EN"), 396 + STM32_FUNCTION(14, "DSI_TE"), 397 + STM32_FUNCTION(15, "LCD_G5"), 398 + STM32_FUNCTION(16, "EVENTOUT"), 399 + STM32_FUNCTION(17, "ANALOG") 400 + ), 401 + STM32_PIN( 402 + PINCTRL_PIN(28, "PB12"), 403 + STM32_FUNCTION(0, "GPIOB12"), 404 + STM32_FUNCTION(2, "TIM1_BKIN"), 405 + STM32_FUNCTION(5, "I2C2_SMBA"), 406 + STM32_FUNCTION(6, "SPI2_NSS I2S2_WS"), 407 + STM32_FUNCTION(7, "DFSDM_DATIN1"), 408 + STM32_FUNCTION(8, "USART3_CK"), 409 + STM32_FUNCTION(9, "UART5_RX"), 410 + STM32_FUNCTION(10, "CAN2_RX"), 411 + STM32_FUNCTION(11, "OTG_HS_ULPI_D5"), 412 + STM32_FUNCTION(12, "ETH_MII_TXD0 ETH_RMII_TXD0"), 413 + STM32_FUNCTION(13, "OTG_HS_ID"), 414 + STM32_FUNCTION(16, "EVENTOUT"), 415 + STM32_FUNCTION(17, "ANALOG") 416 + ), 417 + STM32_PIN( 418 + PINCTRL_PIN(29, "PB13"), 419 + STM32_FUNCTION(0, "GPIOB13"), 420 + STM32_FUNCTION(2, "TIM1_CH1N"), 421 + STM32_FUNCTION(6, "SPI2_SCK I2S2_CK"), 422 + STM32_FUNCTION(7, "DFSDM_CKIN1"), 423 + STM32_FUNCTION(8, "USART3_CTS"), 424 + STM32_FUNCTION(9, "UART5_TX"), 425 + STM32_FUNCTION(10, "CAN2_TX"), 426 + STM32_FUNCTION(11, "OTG_HS_ULPI_D6"), 427 + STM32_FUNCTION(12, "ETH_MII_TXD1 ETH_RMII_TXD1"), 428 + STM32_FUNCTION(16, "EVENTOUT"), 429 + STM32_FUNCTION(17, "ANALOG") 430 + ), 431 + STM32_PIN( 432 + PINCTRL_PIN(30, "PB14"), 433 + STM32_FUNCTION(0, "GPIOB14"), 434 + STM32_FUNCTION(2, "TIM1_CH2N"), 435 + STM32_FUNCTION(4, "TIM8_CH2N"), 436 + STM32_FUNCTION(5, "USART1_TX"), 437 + STM32_FUNCTION(6, "SPI2_MISO"), 438 + STM32_FUNCTION(7, "DFSDM_DATIN2"), 439 + STM32_FUNCTION(8, "USART3_RTS"), 440 + STM32_FUNCTION(9, "UART4_RTS"), 441 + STM32_FUNCTION(10, "TIM12_CH1"), 442 + STM32_FUNCTION(11, "SDMMC2_D0"), 443 + STM32_FUNCTION(13, "OTG_HS_DM"), 444 + STM32_FUNCTION(16, "EVENTOUT"), 445 + STM32_FUNCTION(17, "ANALOG") 446 + ), 447 + STM32_PIN( 448 + PINCTRL_PIN(31, "PB15"), 449 + STM32_FUNCTION(0, "GPIOB15"), 450 + STM32_FUNCTION(1, "RTC_REFIN"), 451 + STM32_FUNCTION(2, "TIM1_CH3N"), 452 + STM32_FUNCTION(4, "TIM8_CH3N"), 453 + STM32_FUNCTION(5, "USART1_RX"), 454 + STM32_FUNCTION(6, "SPI2_MOSI I2S2_SD"), 455 + STM32_FUNCTION(7, "DFSDM_CKIN2"), 456 + STM32_FUNCTION(9, "UART4_CTS"), 457 + STM32_FUNCTION(10, "TIM12_CH2"), 458 + STM32_FUNCTION(11, "SDMMC2_D1"), 459 + STM32_FUNCTION(13, "OTG_HS_DP"), 460 + STM32_FUNCTION(16, "EVENTOUT"), 461 + STM32_FUNCTION(17, "ANALOG") 462 + ), 463 + STM32_PIN( 464 + PINCTRL_PIN(32, "PC0"), 465 + STM32_FUNCTION(0, "GPIOC0"), 466 + STM32_FUNCTION(4, "DFSDM_CKIN0"), 467 + STM32_FUNCTION(7, "DFSDM_DATIN4"), 468 + STM32_FUNCTION(9, "SAI2_FS_B"), 469 + STM32_FUNCTION(11, "OTG_HS_ULPI_STP"), 470 + STM32_FUNCTION(13, "FMC_SDNWE"), 471 + STM32_FUNCTION(15, "LCD_R5"), 472 + STM32_FUNCTION(16, "EVENTOUT"), 473 + STM32_FUNCTION(17, "ANALOG") 474 + ), 475 + STM32_PIN( 476 + PINCTRL_PIN(33, "PC1"), 477 + STM32_FUNCTION(0, "GPIOC1"), 478 + STM32_FUNCTION(1, "TRACED0"), 479 + STM32_FUNCTION(4, "DFSDM_DATIN0"), 480 + STM32_FUNCTION(6, "SPI2_MOSI I2S2_SD"), 481 + STM32_FUNCTION(7, "SAI1_SD_A"), 482 + STM32_FUNCTION(11, "DFSDM_CKIN4"), 483 + STM32_FUNCTION(12, "ETH_MDC"), 484 + STM32_FUNCTION(13, "MDIOS_MDC"), 485 + STM32_FUNCTION(16, "EVENTOUT"), 486 + STM32_FUNCTION(17, "ANALOG") 487 + ), 488 + STM32_PIN( 489 + PINCTRL_PIN(34, "PC2"), 490 + STM32_FUNCTION(0, "GPIOC2"), 491 + STM32_FUNCTION(4, "DFSDM_CKIN1"), 492 + STM32_FUNCTION(6, "SPI2_MISO"), 493 + STM32_FUNCTION(7, "DFSDM_CKOUT"), 494 + STM32_FUNCTION(11, "OTG_HS_ULPI_DIR"), 495 + STM32_FUNCTION(12, "ETH_MII_TXD2"), 496 + STM32_FUNCTION(13, "FMC_SDNE0"), 497 + STM32_FUNCTION(16, "EVENTOUT"), 498 + STM32_FUNCTION(17, "ANALOG") 499 + ), 500 + STM32_PIN( 501 + PINCTRL_PIN(35, "PC3"), 502 + STM32_FUNCTION(0, "GPIOC3"), 503 + STM32_FUNCTION(4, "DFSDM_DATIN1"), 504 + STM32_FUNCTION(6, "SPI2_MOSI I2S2_SD"), 505 + STM32_FUNCTION(11, "OTG_HS_ULPI_NXT"), 506 + STM32_FUNCTION(12, "ETH_MII_TX_CLK"), 507 + STM32_FUNCTION(13, "FMC_SDCKE0"), 508 + STM32_FUNCTION(16, "EVENTOUT"), 509 + STM32_FUNCTION(17, "ANALOG") 510 + ), 511 + STM32_PIN( 512 + PINCTRL_PIN(36, "PC4"), 513 + STM32_FUNCTION(0, "GPIOC4"), 514 + STM32_FUNCTION(4, "DFSDM_CKIN2"), 515 + STM32_FUNCTION(6, "I2S1_MCK"), 516 + STM32_FUNCTION(9, "SPDIF_RX2"), 517 + STM32_FUNCTION(12, "ETH_MII_RXD0 ETH_RMII_RXD0"), 518 + STM32_FUNCTION(13, "FMC_SDNE0"), 519 + STM32_FUNCTION(16, "EVENTOUT"), 520 + STM32_FUNCTION(17, "ANALOG") 521 + ), 522 + STM32_PIN( 523 + PINCTRL_PIN(37, "PC5"), 524 + STM32_FUNCTION(0, "GPIOC5"), 525 + STM32_FUNCTION(4, "DFSDM_DATIN2"), 526 + STM32_FUNCTION(9, "SPDIF_RX3"), 527 + STM32_FUNCTION(12, "ETH_MII_RXD1 ETH_RMII_RXD1"), 528 + STM32_FUNCTION(13, "FMC_SDCKE0"), 529 + STM32_FUNCTION(16, "EVENTOUT"), 530 + STM32_FUNCTION(17, "ANALOG") 531 + ), 532 + STM32_PIN( 533 + PINCTRL_PIN(38, "PC6"), 534 + STM32_FUNCTION(0, "GPIOC6"), 535 + STM32_FUNCTION(3, "TIM3_CH1"), 536 + STM32_FUNCTION(4, "TIM8_CH1"), 537 + STM32_FUNCTION(6, "I2S2_MCK"), 538 + STM32_FUNCTION(8, "DFSDM_CKIN3"), 539 + STM32_FUNCTION(9, "USART6_TX"), 540 + STM32_FUNCTION(10, "FMC_NWAIT"), 541 + STM32_FUNCTION(11, "SDMMC2_D6"), 542 + STM32_FUNCTION(13, "SDMMC1_D6"), 543 + STM32_FUNCTION(14, "DCMI_D0"), 544 + STM32_FUNCTION(15, "LCD_HSYNC"), 545 + STM32_FUNCTION(16, "EVENTOUT"), 546 + STM32_FUNCTION(17, "ANALOG") 547 + ), 548 + STM32_PIN( 549 + PINCTRL_PIN(39, "PC7"), 550 + STM32_FUNCTION(0, "GPIOC7"), 551 + STM32_FUNCTION(3, "TIM3_CH2"), 552 + STM32_FUNCTION(4, "TIM8_CH2"), 553 + STM32_FUNCTION(7, "I2S3_MCK"), 554 + STM32_FUNCTION(8, "DFSDM_DATIN3"), 555 + STM32_FUNCTION(9, "USART6_RX"), 556 + STM32_FUNCTION(10, "FMC_NE1"), 557 + STM32_FUNCTION(11, "SDMMC2_D7"), 558 + STM32_FUNCTION(13, "SDMMC1_D7"), 559 + STM32_FUNCTION(14, "DCMI_D1"), 560 + STM32_FUNCTION(15, "LCD_G6"), 561 + STM32_FUNCTION(16, "EVENTOUT"), 562 + STM32_FUNCTION(17, "ANALOG") 563 + ), 564 + STM32_PIN( 565 + PINCTRL_PIN(40, "PC8"), 566 + STM32_FUNCTION(0, "GPIOC8"), 567 + STM32_FUNCTION(1, "TRACED1"), 568 + STM32_FUNCTION(3, "TIM3_CH3"), 569 + STM32_FUNCTION(4, "TIM8_CH3"), 570 + STM32_FUNCTION(8, "UART5_RTS"), 571 + STM32_FUNCTION(9, "USART6_CK"), 572 + STM32_FUNCTION(10, "FMC_NE2 FMC_NCE"), 573 + STM32_FUNCTION(13, "SDMMC1_D0"), 574 + STM32_FUNCTION(14, "DCMI_D2"), 575 + STM32_FUNCTION(16, "EVENTOUT"), 576 + STM32_FUNCTION(17, "ANALOG") 577 + ), 578 + STM32_PIN( 579 + PINCTRL_PIN(41, "PC9"), 580 + STM32_FUNCTION(0, "GPIOC9"), 581 + STM32_FUNCTION(1, "MCO2"), 582 + STM32_FUNCTION(3, "TIM3_CH4"), 583 + STM32_FUNCTION(4, "TIM8_CH4"), 584 + STM32_FUNCTION(5, "I2C3_SDA"), 585 + STM32_FUNCTION(6, "I2S_CKIN"), 586 + STM32_FUNCTION(8, "UART5_CTS"), 587 + STM32_FUNCTION(10, "QUADSPI_BK1_IO0"), 588 + STM32_FUNCTION(11, "LCD_G3"), 589 + STM32_FUNCTION(13, "SDMMC1_D1"), 590 + STM32_FUNCTION(14, "DCMI_D3"), 591 + STM32_FUNCTION(15, "LCD_B2"), 592 + STM32_FUNCTION(16, "EVENTOUT"), 593 + STM32_FUNCTION(17, "ANALOG") 594 + ), 595 + STM32_PIN( 596 + PINCTRL_PIN(42, "PC10"), 597 + STM32_FUNCTION(0, "GPIOC10"), 598 + STM32_FUNCTION(4, "DFSDM_CKIN5"), 599 + STM32_FUNCTION(7, "SPI3_SCK I2S3_CK"), 600 + STM32_FUNCTION(8, "USART3_TX"), 601 + STM32_FUNCTION(9, "UART4_TX"), 602 + STM32_FUNCTION(10, "QUADSPI_BK1_IO1"), 603 + STM32_FUNCTION(13, "SDMMC1_D2"), 604 + STM32_FUNCTION(14, "DCMI_D8"), 605 + STM32_FUNCTION(15, "LCD_R2"), 606 + STM32_FUNCTION(16, "EVENTOUT"), 607 + STM32_FUNCTION(17, "ANALOG") 608 + ), 609 + STM32_PIN( 610 + PINCTRL_PIN(43, "PC11"), 611 + STM32_FUNCTION(0, "GPIOC11"), 612 + STM32_FUNCTION(4, "DFSDM_DATIN5"), 613 + STM32_FUNCTION(7, "SPI3_MISO"), 614 + STM32_FUNCTION(8, "USART3_RX"), 615 + STM32_FUNCTION(9, "UART4_RX"), 616 + STM32_FUNCTION(10, "QUADSPI_BK2_NCS"), 617 + STM32_FUNCTION(13, "SDMMC1_D3"), 618 + STM32_FUNCTION(14, "DCMI_D4"), 619 + STM32_FUNCTION(16, "EVENTOUT"), 620 + STM32_FUNCTION(17, "ANALOG") 621 + ), 622 + STM32_PIN( 623 + PINCTRL_PIN(44, "PC12"), 624 + STM32_FUNCTION(0, "GPIOC12"), 625 + STM32_FUNCTION(1, "TRACED3"), 626 + STM32_FUNCTION(7, "SPI3_MOSI I2S3_SD"), 627 + STM32_FUNCTION(8, "USART3_CK"), 628 + STM32_FUNCTION(9, "UART5_TX"), 629 + STM32_FUNCTION(13, "SDMMC1_CK"), 630 + STM32_FUNCTION(14, "DCMI_D9"), 631 + STM32_FUNCTION(16, "EVENTOUT"), 632 + STM32_FUNCTION(17, "ANALOG") 633 + ), 634 + STM32_PIN( 635 + PINCTRL_PIN(45, "PC13"), 636 + STM32_FUNCTION(0, "GPIOC13"), 637 + STM32_FUNCTION(16, "EVENTOUT"), 638 + STM32_FUNCTION(17, "ANALOG") 639 + ), 640 + STM32_PIN( 641 + PINCTRL_PIN(46, "PC14"), 642 + STM32_FUNCTION(0, "GPIOC14"), 643 + STM32_FUNCTION(16, "EVENTOUT"), 644 + STM32_FUNCTION(17, "ANALOG") 645 + ), 646 + STM32_PIN( 647 + PINCTRL_PIN(47, "PC15"), 648 + STM32_FUNCTION(0, "GPIOC15"), 649 + STM32_FUNCTION(16, "EVENTOUT"), 650 + STM32_FUNCTION(17, "ANALOG") 651 + ), 652 + STM32_PIN( 653 + PINCTRL_PIN(48, "PD0"), 654 + STM32_FUNCTION(0, "GPIOD0"), 655 + STM32_FUNCTION(4, "DFSDM_CKIN6"), 656 + STM32_FUNCTION(7, "DFSDM_DATIN7"), 657 + STM32_FUNCTION(9, "UART4_RX"), 658 + STM32_FUNCTION(10, "CAN1_RX"), 659 + STM32_FUNCTION(13, "FMC_D2"), 660 + STM32_FUNCTION(16, "EVENTOUT"), 661 + STM32_FUNCTION(17, "ANALOG") 662 + ), 663 + STM32_PIN( 664 + PINCTRL_PIN(49, "PD1"), 665 + STM32_FUNCTION(0, "GPIOD1"), 666 + STM32_FUNCTION(4, "DFSDM_DATIN6"), 667 + STM32_FUNCTION(7, "DFSDM_CKIN7"), 668 + STM32_FUNCTION(9, "UART4_TX"), 669 + STM32_FUNCTION(10, "CAN1_TX"), 670 + STM32_FUNCTION(13, "FMC_D3"), 671 + STM32_FUNCTION(16, "EVENTOUT"), 672 + STM32_FUNCTION(17, "ANALOG") 673 + ), 674 + STM32_PIN( 675 + PINCTRL_PIN(50, "PD2"), 676 + STM32_FUNCTION(0, "GPIOD2"), 677 + STM32_FUNCTION(1, "TRACED2"), 678 + STM32_FUNCTION(3, "TIM3_ETR"), 679 + STM32_FUNCTION(9, "UART5_RX"), 680 + STM32_FUNCTION(13, "SDMMC1_CMD"), 681 + STM32_FUNCTION(14, "DCMI_D11"), 682 + STM32_FUNCTION(16, "EVENTOUT"), 683 + STM32_FUNCTION(17, "ANALOG") 684 + ), 685 + STM32_PIN( 686 + PINCTRL_PIN(51, "PD3"), 687 + STM32_FUNCTION(0, "GPIOD3"), 688 + STM32_FUNCTION(4, "DFSDM_CKOUT"), 689 + STM32_FUNCTION(6, "SPI2_SCK I2S2_CK"), 690 + STM32_FUNCTION(7, "DFSDM_DATIN0"), 691 + STM32_FUNCTION(8, "USART2_CTS"), 692 + STM32_FUNCTION(13, "FMC_CLK"), 693 + STM32_FUNCTION(14, "DCMI_D5"), 694 + STM32_FUNCTION(15, "LCD_G7"), 695 + STM32_FUNCTION(16, "EVENTOUT"), 696 + STM32_FUNCTION(17, "ANALOG") 697 + ), 698 + STM32_PIN( 699 + PINCTRL_PIN(52, "PD4"), 700 + STM32_FUNCTION(0, "GPIOD4"), 701 + STM32_FUNCTION(7, "DFSDM_CKIN0"), 702 + STM32_FUNCTION(8, "USART2_RTS"), 703 + STM32_FUNCTION(13, "FMC_NOE"), 704 + STM32_FUNCTION(16, "EVENTOUT"), 705 + STM32_FUNCTION(17, "ANALOG") 706 + ), 707 + STM32_PIN( 708 + PINCTRL_PIN(53, "PD5"), 709 + STM32_FUNCTION(0, "GPIOD5"), 710 + STM32_FUNCTION(8, "USART2_TX"), 711 + STM32_FUNCTION(13, "FMC_NWE"), 712 + STM32_FUNCTION(16, "EVENTOUT"), 713 + STM32_FUNCTION(17, "ANALOG") 714 + ), 715 + STM32_PIN( 716 + PINCTRL_PIN(54, "PD6"), 717 + STM32_FUNCTION(0, "GPIOD6"), 718 + STM32_FUNCTION(4, "DFSDM_CKIN4"), 719 + STM32_FUNCTION(6, "SPI3_MOSI I2S3_SD"), 720 + STM32_FUNCTION(7, "SAI1_SD_A"), 721 + STM32_FUNCTION(8, "USART2_RX"), 722 + STM32_FUNCTION(11, "DFSDM_DATIN1"), 723 + STM32_FUNCTION(12, "SDMMC2_CK"), 724 + STM32_FUNCTION(13, "FMC_NWAIT"), 725 + STM32_FUNCTION(14, "DCMI_D10"), 726 + STM32_FUNCTION(15, "LCD_B2"), 727 + STM32_FUNCTION(16, "EVENTOUT"), 728 + STM32_FUNCTION(17, "ANALOG") 729 + ), 730 + STM32_PIN( 731 + PINCTRL_PIN(55, "PD7"), 732 + STM32_FUNCTION(0, "GPIOD7"), 733 + STM32_FUNCTION(4, "DFSDM_DATIN4"), 734 + STM32_FUNCTION(6, "SPI1_MOSI I2S1_SD"), 735 + STM32_FUNCTION(7, "DFSDM_CKIN1"), 736 + STM32_FUNCTION(8, "USART2_CK"), 737 + STM32_FUNCTION(9, "SPDIF_RX0"), 738 + STM32_FUNCTION(12, "SDMMC2_CMD"), 739 + STM32_FUNCTION(13, "FMC_NE1"), 740 + STM32_FUNCTION(16, "EVENTOUT"), 741 + STM32_FUNCTION(17, "ANALOG") 742 + ), 743 + STM32_PIN( 744 + PINCTRL_PIN(56, "PD8"), 745 + STM32_FUNCTION(0, "GPIOD8"), 746 + STM32_FUNCTION(4, "DFSDM_CKIN3"), 747 + STM32_FUNCTION(8, "USART3_TX"), 748 + STM32_FUNCTION(9, "SPDIF_RX1"), 749 + STM32_FUNCTION(13, "FMC_D13"), 750 + STM32_FUNCTION(16, "EVENTOUT"), 751 + STM32_FUNCTION(17, "ANALOG") 752 + ), 753 + STM32_PIN( 754 + PINCTRL_PIN(57, "PD9"), 755 + STM32_FUNCTION(0, "GPIOD9"), 756 + STM32_FUNCTION(4, "DFSDM_DATIN3"), 757 + STM32_FUNCTION(8, "USART3_RX"), 758 + STM32_FUNCTION(13, "FMC_D14"), 759 + STM32_FUNCTION(16, "EVENTOUT"), 760 + STM32_FUNCTION(17, "ANALOG") 761 + ), 762 + STM32_PIN( 763 + PINCTRL_PIN(58, "PD10"), 764 + STM32_FUNCTION(0, "GPIOD10"), 765 + STM32_FUNCTION(4, "DFSDM_CKOUT"), 766 + STM32_FUNCTION(8, "USART3_CK"), 767 + STM32_FUNCTION(13, "FMC_D15"), 768 + STM32_FUNCTION(15, "LCD_B3"), 769 + STM32_FUNCTION(16, "EVENTOUT"), 770 + STM32_FUNCTION(17, "ANALOG") 771 + ), 772 + STM32_PIN( 773 + PINCTRL_PIN(59, "PD11"), 774 + STM32_FUNCTION(0, "GPIOD11"), 775 + STM32_FUNCTION(5, "I2C4_SMBA"), 776 + STM32_FUNCTION(8, "USART3_CTS"), 777 + STM32_FUNCTION(10, "QUADSPI_BK1_IO0"), 778 + STM32_FUNCTION(11, "SAI2_SD_A"), 779 + STM32_FUNCTION(13, "FMC_A16 FMC_CLE"), 780 + STM32_FUNCTION(16, "EVENTOUT"), 781 + STM32_FUNCTION(17, "ANALOG") 782 + ), 783 + STM32_PIN( 784 + PINCTRL_PIN(60, "PD12"), 785 + STM32_FUNCTION(0, "GPIOD12"), 786 + STM32_FUNCTION(3, "TIM4_CH1"), 787 + STM32_FUNCTION(4, "LPTIM1_IN1"), 788 + STM32_FUNCTION(5, "I2C4_SCL"), 789 + STM32_FUNCTION(8, "USART3_RTS"), 790 + STM32_FUNCTION(10, "QUADSPI_BK1_IO1"), 791 + STM32_FUNCTION(11, "SAI2_FS_A"), 792 + STM32_FUNCTION(13, "FMC_A17 FMC_ALE"), 793 + STM32_FUNCTION(16, "EVENTOUT"), 794 + STM32_FUNCTION(17, "ANALOG") 795 + ), 796 + STM32_PIN( 797 + PINCTRL_PIN(61, "PD13"), 798 + STM32_FUNCTION(0, "GPIOD13"), 799 + STM32_FUNCTION(3, "TIM4_CH2"), 800 + STM32_FUNCTION(4, "LPTIM1_OUT"), 801 + STM32_FUNCTION(5, "I2C4_SDA"), 802 + STM32_FUNCTION(10, "QUADSPI_BK1_IO3"), 803 + STM32_FUNCTION(11, "SAI2_SCK_A"), 804 + STM32_FUNCTION(13, "FMC_A18"), 805 + STM32_FUNCTION(16, "EVENTOUT"), 806 + STM32_FUNCTION(17, "ANALOG") 807 + ), 808 + STM32_PIN( 809 + PINCTRL_PIN(62, "PD14"), 810 + STM32_FUNCTION(0, "GPIOD14"), 811 + STM32_FUNCTION(3, "TIM4_CH3"), 812 + STM32_FUNCTION(9, "UART8_CTS"), 813 + STM32_FUNCTION(13, "FMC_D0"), 814 + STM32_FUNCTION(16, "EVENTOUT"), 815 + STM32_FUNCTION(17, "ANALOG") 816 + ), 817 + STM32_PIN( 818 + PINCTRL_PIN(63, "PD15"), 819 + STM32_FUNCTION(0, "GPIOD15"), 820 + STM32_FUNCTION(3, "TIM4_CH4"), 821 + STM32_FUNCTION(9, "UART8_RTS"), 822 + STM32_FUNCTION(13, "FMC_D1"), 823 + STM32_FUNCTION(16, "EVENTOUT"), 824 + STM32_FUNCTION(17, "ANALOG") 825 + ), 826 + STM32_PIN( 827 + PINCTRL_PIN(64, "PE0"), 828 + STM32_FUNCTION(0, "GPIOE0"), 829 + STM32_FUNCTION(3, "TIM4_ETR"), 830 + STM32_FUNCTION(4, "LPTIM1_ETR"), 831 + STM32_FUNCTION(9, "UART8_RX"), 832 + STM32_FUNCTION(11, "SAI2_MCLK_A"), 833 + STM32_FUNCTION(13, "FMC_NBL0"), 834 + STM32_FUNCTION(14, "DCMI_D2"), 835 + STM32_FUNCTION(16, "EVENTOUT"), 836 + STM32_FUNCTION(17, "ANALOG") 837 + ), 838 + STM32_PIN( 839 + PINCTRL_PIN(65, "PE1"), 840 + STM32_FUNCTION(0, "GPIOE1"), 841 + STM32_FUNCTION(4, "LPTIM1_IN2"), 842 + STM32_FUNCTION(9, "UART8_TX"), 843 + STM32_FUNCTION(13, "FMC_NBL1"), 844 + STM32_FUNCTION(14, "DCMI_D3"), 845 + STM32_FUNCTION(16, "EVENTOUT"), 846 + STM32_FUNCTION(17, "ANALOG") 847 + ), 848 + STM32_PIN( 849 + PINCTRL_PIN(66, "PE2"), 850 + STM32_FUNCTION(0, "GPIOE2"), 851 + STM32_FUNCTION(1, "TRACECLK"), 852 + STM32_FUNCTION(6, "SPI4_SCK"), 853 + STM32_FUNCTION(7, "SAI1_MCLK_A"), 854 + STM32_FUNCTION(10, "QUADSPI_BK1_IO2"), 855 + STM32_FUNCTION(12, "ETH_MII_TXD3"), 856 + STM32_FUNCTION(13, "FMC_A23"), 857 + STM32_FUNCTION(16, "EVENTOUT"), 858 + STM32_FUNCTION(17, "ANALOG") 859 + ), 860 + STM32_PIN( 861 + PINCTRL_PIN(67, "PE3"), 862 + STM32_FUNCTION(0, "GPIOE3"), 863 + STM32_FUNCTION(1, "TRACED0"), 864 + STM32_FUNCTION(7, "SAI1_SD_B"), 865 + STM32_FUNCTION(13, "FMC_A19"), 866 + STM32_FUNCTION(16, "EVENTOUT"), 867 + STM32_FUNCTION(17, "ANALOG") 868 + ), 869 + STM32_PIN( 870 + PINCTRL_PIN(68, "PE4"), 871 + STM32_FUNCTION(0, "GPIOE4"), 872 + STM32_FUNCTION(1, "TRACED1"), 873 + STM32_FUNCTION(6, "SPI4_NSS"), 874 + STM32_FUNCTION(7, "SAI1_FS_A"), 875 + STM32_FUNCTION(11, "DFSDM_DATIN3"), 876 + STM32_FUNCTION(13, "FMC_A20"), 877 + STM32_FUNCTION(14, "DCMI_D4"), 878 + STM32_FUNCTION(15, "LCD_B0"), 879 + STM32_FUNCTION(16, "EVENTOUT"), 880 + STM32_FUNCTION(17, "ANALOG") 881 + ), 882 + STM32_PIN( 883 + PINCTRL_PIN(69, "PE5"), 884 + STM32_FUNCTION(0, "GPIOE5"), 885 + STM32_FUNCTION(1, "TRACED2"), 886 + STM32_FUNCTION(4, "TIM9_CH1"), 887 + STM32_FUNCTION(6, "SPI4_MISO"), 888 + STM32_FUNCTION(7, "SAI1_SCK_A"), 889 + STM32_FUNCTION(11, "DFSDM_CKIN3"), 890 + STM32_FUNCTION(13, "FMC_A21"), 891 + STM32_FUNCTION(14, "DCMI_D6"), 892 + STM32_FUNCTION(15, "LCD_G0"), 893 + STM32_FUNCTION(16, "EVENTOUT"), 894 + STM32_FUNCTION(17, "ANALOG") 895 + ), 896 + STM32_PIN( 897 + PINCTRL_PIN(70, "PE6"), 898 + STM32_FUNCTION(0, "GPIOE6"), 899 + STM32_FUNCTION(1, "TRACED3"), 900 + STM32_FUNCTION(2, "TIM1_BKIN2"), 901 + STM32_FUNCTION(4, "TIM9_CH2"), 902 + STM32_FUNCTION(6, "SPI4_MOSI"), 903 + STM32_FUNCTION(7, "SAI1_SD_A"), 904 + STM32_FUNCTION(11, "SAI2_MCLK_B"), 905 + STM32_FUNCTION(13, "FMC_A22"), 906 + STM32_FUNCTION(14, "DCMI_D7"), 907 + STM32_FUNCTION(15, "LCD_G1"), 908 + STM32_FUNCTION(16, "EVENTOUT"), 909 + STM32_FUNCTION(17, "ANALOG") 910 + ), 911 + STM32_PIN( 912 + PINCTRL_PIN(71, "PE7"), 913 + STM32_FUNCTION(0, "GPIOE7"), 914 + STM32_FUNCTION(2, "TIM1_ETR"), 915 + STM32_FUNCTION(7, "DFSDM_DATIN2"), 916 + STM32_FUNCTION(9, "UART7_RX"), 917 + STM32_FUNCTION(11, "QUADSPI_BK2_IO0"), 918 + STM32_FUNCTION(13, "FMC_D4"), 919 + STM32_FUNCTION(16, "EVENTOUT"), 920 + STM32_FUNCTION(17, "ANALOG") 921 + ), 922 + STM32_PIN( 923 + PINCTRL_PIN(72, "PE8"), 924 + STM32_FUNCTION(0, "GPIOE8"), 925 + STM32_FUNCTION(2, "TIM1_CH1N"), 926 + STM32_FUNCTION(7, "DFSDM_CKIN2"), 927 + STM32_FUNCTION(9, "UART7_TX"), 928 + STM32_FUNCTION(11, "QUADSPI_BK2_IO1"), 929 + STM32_FUNCTION(13, "FMC_D5"), 930 + STM32_FUNCTION(16, "EVENTOUT"), 931 + STM32_FUNCTION(17, "ANALOG") 932 + ), 933 + STM32_PIN( 934 + PINCTRL_PIN(73, "PE9"), 935 + STM32_FUNCTION(0, "GPIOE9"), 936 + STM32_FUNCTION(2, "TIM1_CH1"), 937 + STM32_FUNCTION(7, "DFSDM_CKOUT"), 938 + STM32_FUNCTION(9, "UART7_RTS"), 939 + STM32_FUNCTION(11, "QUADSPI_BK2_IO2"), 940 + STM32_FUNCTION(13, "FMC_D6"), 941 + STM32_FUNCTION(16, "EVENTOUT"), 942 + STM32_FUNCTION(17, "ANALOG") 943 + ), 944 + STM32_PIN( 945 + PINCTRL_PIN(74, "PE10"), 946 + STM32_FUNCTION(0, "GPIOE10"), 947 + STM32_FUNCTION(2, "TIM1_CH2N"), 948 + STM32_FUNCTION(7, "DFSDM_DATIN4"), 949 + STM32_FUNCTION(9, "UART7_CTS"), 950 + STM32_FUNCTION(11, "QUADSPI_BK2_IO3"), 951 + STM32_FUNCTION(13, "FMC_D7"), 952 + STM32_FUNCTION(16, "EVENTOUT"), 953 + STM32_FUNCTION(17, "ANALOG") 954 + ), 955 + STM32_PIN( 956 + PINCTRL_PIN(75, "PE11"), 957 + STM32_FUNCTION(0, "GPIOE11"), 958 + STM32_FUNCTION(2, "TIM1_CH2"), 959 + STM32_FUNCTION(6, "SPI4_NSS"), 960 + STM32_FUNCTION(7, "DFSDM_CKIN4"), 961 + STM32_FUNCTION(11, "SAI2_SD_B"), 962 + STM32_FUNCTION(13, "FMC_D8"), 963 + STM32_FUNCTION(15, "LCD_G3"), 964 + STM32_FUNCTION(16, "EVENTOUT"), 965 + STM32_FUNCTION(17, "ANALOG") 966 + ), 967 + STM32_PIN( 968 + PINCTRL_PIN(76, "PE12"), 969 + STM32_FUNCTION(0, "GPIOE12"), 970 + STM32_FUNCTION(2, "TIM1_CH3N"), 971 + STM32_FUNCTION(6, "SPI4_SCK"), 972 + STM32_FUNCTION(7, "DFSDM_DATIN5"), 973 + STM32_FUNCTION(11, "SAI2_SCK_B"), 974 + STM32_FUNCTION(13, "FMC_D9"), 975 + STM32_FUNCTION(15, "LCD_B4"), 976 + STM32_FUNCTION(16, "EVENTOUT"), 977 + STM32_FUNCTION(17, "ANALOG") 978 + ), 979 + STM32_PIN( 980 + PINCTRL_PIN(77, "PE13"), 981 + STM32_FUNCTION(0, "GPIOE13"), 982 + STM32_FUNCTION(2, "TIM1_CH3"), 983 + STM32_FUNCTION(6, "SPI4_MISO"), 984 + STM32_FUNCTION(7, "DFSDM_CKIN5"), 985 + STM32_FUNCTION(11, "SAI2_FS_B"), 986 + STM32_FUNCTION(13, "FMC_D10"), 987 + STM32_FUNCTION(15, "LCD_DE"), 988 + STM32_FUNCTION(16, "EVENTOUT"), 989 + STM32_FUNCTION(17, "ANALOG") 990 + ), 991 + STM32_PIN( 992 + PINCTRL_PIN(78, "PE14"), 993 + STM32_FUNCTION(0, "GPIOE14"), 994 + STM32_FUNCTION(2, "TIM1_CH4"), 995 + STM32_FUNCTION(6, "SPI4_MOSI"), 996 + STM32_FUNCTION(11, "SAI2_MCLK_B"), 997 + STM32_FUNCTION(13, "FMC_D11"), 998 + STM32_FUNCTION(15, "LCD_CLK"), 999 + STM32_FUNCTION(16, "EVENTOUT"), 1000 + STM32_FUNCTION(17, "ANALOG") 1001 + ), 1002 + STM32_PIN( 1003 + PINCTRL_PIN(79, "PE15"), 1004 + STM32_FUNCTION(0, "GPIOE15"), 1005 + STM32_FUNCTION(2, "TIM1_BKIN"), 1006 + STM32_FUNCTION(13, "FMC_D12"), 1007 + STM32_FUNCTION(15, "LCD_R7"), 1008 + STM32_FUNCTION(16, "EVENTOUT"), 1009 + STM32_FUNCTION(17, "ANALOG") 1010 + ), 1011 + STM32_PIN( 1012 + PINCTRL_PIN(80, "PF0"), 1013 + STM32_FUNCTION(0, "GPIOF0"), 1014 + STM32_FUNCTION(5, "I2C2_SDA"), 1015 + STM32_FUNCTION(13, "FMC_A0"), 1016 + STM32_FUNCTION(16, "EVENTOUT"), 1017 + STM32_FUNCTION(17, "ANALOG") 1018 + ), 1019 + STM32_PIN( 1020 + PINCTRL_PIN(81, "PF1"), 1021 + STM32_FUNCTION(0, "GPIOF1"), 1022 + STM32_FUNCTION(5, "I2C2_SCL"), 1023 + STM32_FUNCTION(13, "FMC_A1"), 1024 + STM32_FUNCTION(16, "EVENTOUT"), 1025 + STM32_FUNCTION(17, "ANALOG") 1026 + ), 1027 + STM32_PIN( 1028 + PINCTRL_PIN(82, "PF2"), 1029 + STM32_FUNCTION(0, "GPIOF2"), 1030 + STM32_FUNCTION(5, "I2C2_SMBA"), 1031 + STM32_FUNCTION(13, "FMC_A2"), 1032 + STM32_FUNCTION(16, "EVENTOUT"), 1033 + STM32_FUNCTION(17, "ANALOG") 1034 + ), 1035 + STM32_PIN( 1036 + PINCTRL_PIN(83, "PF3"), 1037 + STM32_FUNCTION(0, "GPIOF3"), 1038 + STM32_FUNCTION(13, "FMC_A3"), 1039 + STM32_FUNCTION(16, "EVENTOUT"), 1040 + STM32_FUNCTION(17, "ANALOG") 1041 + ), 1042 + STM32_PIN( 1043 + PINCTRL_PIN(84, "PF4"), 1044 + STM32_FUNCTION(0, "GPIOF4"), 1045 + STM32_FUNCTION(13, "FMC_A4"), 1046 + STM32_FUNCTION(16, "EVENTOUT"), 1047 + STM32_FUNCTION(17, "ANALOG") 1048 + ), 1049 + STM32_PIN( 1050 + PINCTRL_PIN(85, "PF5"), 1051 + STM32_FUNCTION(0, "GPIOF5"), 1052 + STM32_FUNCTION(13, "FMC_A5"), 1053 + STM32_FUNCTION(16, "EVENTOUT"), 1054 + STM32_FUNCTION(17, "ANALOG") 1055 + ), 1056 + STM32_PIN( 1057 + PINCTRL_PIN(86, "PF6"), 1058 + STM32_FUNCTION(0, "GPIOF6"), 1059 + STM32_FUNCTION(4, "TIM10_CH1"), 1060 + STM32_FUNCTION(6, "SPI5_NSS"), 1061 + STM32_FUNCTION(7, "SAI1_SD_B"), 1062 + STM32_FUNCTION(9, "UART7_RX"), 1063 + STM32_FUNCTION(10, "QUADSPI_BK1_IO3"), 1064 + STM32_FUNCTION(16, "EVENTOUT"), 1065 + STM32_FUNCTION(17, "ANALOG") 1066 + ), 1067 + STM32_PIN( 1068 + PINCTRL_PIN(87, "PF7"), 1069 + STM32_FUNCTION(0, "GPIOF7"), 1070 + STM32_FUNCTION(4, "TIM11_CH1"), 1071 + STM32_FUNCTION(6, "SPI5_SCK"), 1072 + STM32_FUNCTION(7, "SAI1_MCLK_B"), 1073 + STM32_FUNCTION(9, "UART7_TX"), 1074 + STM32_FUNCTION(10, "QUADSPI_BK1_IO2"), 1075 + STM32_FUNCTION(16, "EVENTOUT"), 1076 + STM32_FUNCTION(17, "ANALOG") 1077 + ), 1078 + STM32_PIN( 1079 + PINCTRL_PIN(88, "PF8"), 1080 + STM32_FUNCTION(0, "GPIOF8"), 1081 + STM32_FUNCTION(6, "SPI5_MISO"), 1082 + STM32_FUNCTION(7, "SAI1_SCK_B"), 1083 + STM32_FUNCTION(9, "UART7_RTS"), 1084 + STM32_FUNCTION(10, "TIM13_CH1"), 1085 + STM32_FUNCTION(11, "QUADSPI_BK1_IO0"), 1086 + STM32_FUNCTION(16, "EVENTOUT"), 1087 + STM32_FUNCTION(17, "ANALOG") 1088 + ), 1089 + STM32_PIN( 1090 + PINCTRL_PIN(89, "PF9"), 1091 + STM32_FUNCTION(0, "GPIOF9"), 1092 + STM32_FUNCTION(6, "SPI5_MOSI"), 1093 + STM32_FUNCTION(7, "SAI1_FS_B"), 1094 + STM32_FUNCTION(9, "UART7_CTS"), 1095 + STM32_FUNCTION(10, "TIM14_CH1"), 1096 + STM32_FUNCTION(11, "QUADSPI_BK1_IO1"), 1097 + STM32_FUNCTION(16, "EVENTOUT"), 1098 + STM32_FUNCTION(17, "ANALOG") 1099 + ), 1100 + STM32_PIN( 1101 + PINCTRL_PIN(90, "PF10"), 1102 + STM32_FUNCTION(0, "GPIOF10"), 1103 + STM32_FUNCTION(10, "QUADSPI_CLK"), 1104 + STM32_FUNCTION(14, "DCMI_D11"), 1105 + STM32_FUNCTION(15, "LCD_DE"), 1106 + STM32_FUNCTION(16, "EVENTOUT"), 1107 + STM32_FUNCTION(17, "ANALOG") 1108 + ), 1109 + STM32_PIN( 1110 + PINCTRL_PIN(91, "PF11"), 1111 + STM32_FUNCTION(0, "GPIOF11"), 1112 + STM32_FUNCTION(6, "SPI5_MOSI"), 1113 + STM32_FUNCTION(11, "SAI2_SD_B"), 1114 + STM32_FUNCTION(13, "FMC_SDNRAS"), 1115 + STM32_FUNCTION(14, "DCMI_D12"), 1116 + STM32_FUNCTION(16, "EVENTOUT"), 1117 + STM32_FUNCTION(17, "ANALOG") 1118 + ), 1119 + STM32_PIN( 1120 + PINCTRL_PIN(92, "PF12"), 1121 + STM32_FUNCTION(0, "GPIOF12"), 1122 + STM32_FUNCTION(13, "FMC_A6"), 1123 + STM32_FUNCTION(16, "EVENTOUT"), 1124 + STM32_FUNCTION(17, "ANALOG") 1125 + ), 1126 + STM32_PIN( 1127 + PINCTRL_PIN(93, "PF13"), 1128 + STM32_FUNCTION(0, "GPIOF13"), 1129 + STM32_FUNCTION(5, "I2C4_SMBA"), 1130 + STM32_FUNCTION(7, "DFSDM_DATIN6"), 1131 + STM32_FUNCTION(13, "FMC_A7"), 1132 + STM32_FUNCTION(16, "EVENTOUT"), 1133 + STM32_FUNCTION(17, "ANALOG") 1134 + ), 1135 + STM32_PIN( 1136 + PINCTRL_PIN(94, "PF14"), 1137 + STM32_FUNCTION(0, "GPIOF14"), 1138 + STM32_FUNCTION(5, "I2C4_SCL"), 1139 + STM32_FUNCTION(7, "DFSDM_CKIN6"), 1140 + STM32_FUNCTION(13, "FMC_A8"), 1141 + STM32_FUNCTION(16, "EVENTOUT"), 1142 + STM32_FUNCTION(17, "ANALOG") 1143 + ), 1144 + STM32_PIN( 1145 + PINCTRL_PIN(95, "PF15"), 1146 + STM32_FUNCTION(0, "GPIOF15"), 1147 + STM32_FUNCTION(5, "I2C4_SDA"), 1148 + STM32_FUNCTION(13, "FMC_A9"), 1149 + STM32_FUNCTION(16, "EVENTOUT"), 1150 + STM32_FUNCTION(17, "ANALOG") 1151 + ), 1152 + STM32_PIN( 1153 + PINCTRL_PIN(96, "PG0"), 1154 + STM32_FUNCTION(0, "GPIOG0"), 1155 + STM32_FUNCTION(13, "FMC_A10"), 1156 + STM32_FUNCTION(16, "EVENTOUT"), 1157 + STM32_FUNCTION(17, "ANALOG") 1158 + ), 1159 + STM32_PIN( 1160 + PINCTRL_PIN(97, "PG1"), 1161 + STM32_FUNCTION(0, "GPIOG1"), 1162 + STM32_FUNCTION(13, "FMC_A11"), 1163 + STM32_FUNCTION(16, "EVENTOUT"), 1164 + STM32_FUNCTION(17, "ANALOG") 1165 + ), 1166 + STM32_PIN( 1167 + PINCTRL_PIN(98, "PG2"), 1168 + STM32_FUNCTION(0, "GPIOG2"), 1169 + STM32_FUNCTION(13, "FMC_A12"), 1170 + STM32_FUNCTION(16, "EVENTOUT"), 1171 + STM32_FUNCTION(17, "ANALOG") 1172 + ), 1173 + STM32_PIN( 1174 + PINCTRL_PIN(99, "PG3"), 1175 + STM32_FUNCTION(0, "GPIOG3"), 1176 + STM32_FUNCTION(13, "FMC_A13"), 1177 + STM32_FUNCTION(16, "EVENTOUT"), 1178 + STM32_FUNCTION(17, "ANALOG") 1179 + ), 1180 + STM32_PIN( 1181 + PINCTRL_PIN(100, "PG4"), 1182 + STM32_FUNCTION(0, "GPIOG4"), 1183 + STM32_FUNCTION(13, "FMC_A14 FMC_BA0"), 1184 + STM32_FUNCTION(16, "EVENTOUT"), 1185 + STM32_FUNCTION(17, "ANALOG") 1186 + ), 1187 + STM32_PIN( 1188 + PINCTRL_PIN(101, "PG5"), 1189 + STM32_FUNCTION(0, "GPIOG5"), 1190 + STM32_FUNCTION(13, "FMC_A15 FMC_BA1"), 1191 + STM32_FUNCTION(16, "EVENTOUT"), 1192 + STM32_FUNCTION(17, "ANALOG") 1193 + ), 1194 + STM32_PIN( 1195 + PINCTRL_PIN(102, "PG6"), 1196 + STM32_FUNCTION(0, "GPIOG6"), 1197 + STM32_FUNCTION(13, "FMC_NE3"), 1198 + STM32_FUNCTION(14, "DCMI_D12"), 1199 + STM32_FUNCTION(15, "LCD_R7"), 1200 + STM32_FUNCTION(16, "EVENTOUT"), 1201 + STM32_FUNCTION(17, "ANALOG") 1202 + ), 1203 + STM32_PIN( 1204 + PINCTRL_PIN(103, "PG7"), 1205 + STM32_FUNCTION(0, "GPIOG7"), 1206 + STM32_FUNCTION(7, "SAI1_MCLK_A"), 1207 + STM32_FUNCTION(9, "USART6_CK"), 1208 + STM32_FUNCTION(13, "FMC_INT"), 1209 + STM32_FUNCTION(14, "DCMI_D13"), 1210 + STM32_FUNCTION(15, "LCD_CLK"), 1211 + STM32_FUNCTION(16, "EVENTOUT"), 1212 + STM32_FUNCTION(17, "ANALOG") 1213 + ), 1214 + STM32_PIN( 1215 + PINCTRL_PIN(104, "PG8"), 1216 + STM32_FUNCTION(0, "GPIOG8"), 1217 + STM32_FUNCTION(6, "SPI6_NSS"), 1218 + STM32_FUNCTION(8, "SPDIF_RX2"), 1219 + STM32_FUNCTION(9, "USART6_RTS"), 1220 + STM32_FUNCTION(12, "ETH_PPS_OUT"), 1221 + STM32_FUNCTION(13, "FMC_SDCLK"), 1222 + STM32_FUNCTION(15, "LCD_G7"), 1223 + STM32_FUNCTION(16, "EVENTOUT"), 1224 + STM32_FUNCTION(17, "ANALOG") 1225 + ), 1226 + STM32_PIN( 1227 + PINCTRL_PIN(105, "PG9"), 1228 + STM32_FUNCTION(0, "GPIOG9"), 1229 + STM32_FUNCTION(6, "SPI1_MISO"), 1230 + STM32_FUNCTION(8, "SPDIF_RX3"), 1231 + STM32_FUNCTION(9, "USART6_RX"), 1232 + STM32_FUNCTION(10, "QUADSPI_BK2_IO2"), 1233 + STM32_FUNCTION(11, "SAI2_FS_B"), 1234 + STM32_FUNCTION(12, "SDMMC2_D0"), 1235 + STM32_FUNCTION(13, "FMC_NE2 FMC_NCE"), 1236 + STM32_FUNCTION(14, "DCMI_VSYNC"), 1237 + STM32_FUNCTION(16, "EVENTOUT"), 1238 + STM32_FUNCTION(17, "ANALOG") 1239 + ), 1240 + STM32_PIN( 1241 + PINCTRL_PIN(106, "PG10"), 1242 + STM32_FUNCTION(0, "GPIOG10"), 1243 + STM32_FUNCTION(6, "SPI1_NSS I2S1_WS"), 1244 + STM32_FUNCTION(10, "LCD_G3"), 1245 + STM32_FUNCTION(11, "SAI2_SD_B"), 1246 + STM32_FUNCTION(12, "SDMMC2_D1"), 1247 + STM32_FUNCTION(13, "FMC_NE3"), 1248 + STM32_FUNCTION(14, "DCMI_D2"), 1249 + STM32_FUNCTION(15, "LCD_B2"), 1250 + STM32_FUNCTION(16, "EVENTOUT"), 1251 + STM32_FUNCTION(17, "ANALOG") 1252 + ), 1253 + STM32_PIN( 1254 + PINCTRL_PIN(107, "PG11"), 1255 + STM32_FUNCTION(0, "GPIOG11"), 1256 + STM32_FUNCTION(6, "SPI1_SCK I2S1_CK"), 1257 + STM32_FUNCTION(8, "SPDIF_RX0"), 1258 + STM32_FUNCTION(11, "SDMMC2_D2"), 1259 + STM32_FUNCTION(12, "ETH_MII_TX_EN ETH_RMII_TX_EN"), 1260 + STM32_FUNCTION(14, "DCMI_D3"), 1261 + STM32_FUNCTION(15, "LCD_B3"), 1262 + STM32_FUNCTION(16, "EVENTOUT"), 1263 + STM32_FUNCTION(17, "ANALOG") 1264 + ), 1265 + STM32_PIN( 1266 + PINCTRL_PIN(108, "PG12"), 1267 + STM32_FUNCTION(0, "GPIOG12"), 1268 + STM32_FUNCTION(4, "LPTIM1_IN1"), 1269 + STM32_FUNCTION(6, "SPI6_MISO"), 1270 + STM32_FUNCTION(8, "SPDIF_RX1"), 1271 + STM32_FUNCTION(9, "USART6_RTS"), 1272 + STM32_FUNCTION(10, "LCD_B4"), 1273 + STM32_FUNCTION(12, "SDMMC2_D3"), 1274 + STM32_FUNCTION(13, "FMC_NE4"), 1275 + STM32_FUNCTION(15, "LCD_B1"), 1276 + STM32_FUNCTION(16, "EVENTOUT"), 1277 + STM32_FUNCTION(17, "ANALOG") 1278 + ), 1279 + STM32_PIN( 1280 + PINCTRL_PIN(109, "PG13"), 1281 + STM32_FUNCTION(0, "GPIOG13"), 1282 + STM32_FUNCTION(1, "TRACED0"), 1283 + STM32_FUNCTION(4, "LPTIM1_OUT"), 1284 + STM32_FUNCTION(6, "SPI6_SCK"), 1285 + STM32_FUNCTION(9, "USART6_CTS"), 1286 + STM32_FUNCTION(12, "ETH_MII_TXD0 ETH_RMII_TXD0"), 1287 + STM32_FUNCTION(13, "FMC_A24"), 1288 + STM32_FUNCTION(15, "LCD_R0"), 1289 + STM32_FUNCTION(16, "EVENTOUT"), 1290 + STM32_FUNCTION(17, "ANALOG") 1291 + ), 1292 + STM32_PIN( 1293 + PINCTRL_PIN(110, "PG14"), 1294 + STM32_FUNCTION(0, "GPIOG14"), 1295 + STM32_FUNCTION(1, "TRACED1"), 1296 + STM32_FUNCTION(4, "LPTIM1_ETR"), 1297 + STM32_FUNCTION(6, "SPI6_MOSI"), 1298 + STM32_FUNCTION(9, "USART6_TX"), 1299 + STM32_FUNCTION(10, "QUADSPI_BK2_IO3"), 1300 + STM32_FUNCTION(12, "ETH_MII_TXD1 ETH_RMII_TXD1"), 1301 + STM32_FUNCTION(13, "FMC_A25"), 1302 + STM32_FUNCTION(15, "LCD_B0"), 1303 + STM32_FUNCTION(16, "EVENTOUT"), 1304 + STM32_FUNCTION(17, "ANALOG") 1305 + ), 1306 + STM32_PIN( 1307 + PINCTRL_PIN(111, "PG15"), 1308 + STM32_FUNCTION(0, "GPIOG15"), 1309 + STM32_FUNCTION(9, "USART6_CTS"), 1310 + STM32_FUNCTION(13, "FMC_SDNCAS"), 1311 + STM32_FUNCTION(14, "DCMI_D13"), 1312 + STM32_FUNCTION(16, "EVENTOUT"), 1313 + STM32_FUNCTION(17, "ANALOG") 1314 + ), 1315 + STM32_PIN( 1316 + PINCTRL_PIN(112, "PH0"), 1317 + STM32_FUNCTION(0, "GPIOH0"), 1318 + STM32_FUNCTION(16, "EVENTOUT"), 1319 + STM32_FUNCTION(17, "ANALOG") 1320 + ), 1321 + STM32_PIN( 1322 + PINCTRL_PIN(113, "PH1"), 1323 + STM32_FUNCTION(0, "GPIOH1"), 1324 + STM32_FUNCTION(16, "EVENTOUT"), 1325 + STM32_FUNCTION(17, "ANALOG") 1326 + ), 1327 + STM32_PIN( 1328 + PINCTRL_PIN(114, "PH2"), 1329 + STM32_FUNCTION(0, "GPIOH2"), 1330 + STM32_FUNCTION(4, "LPTIM1_IN2"), 1331 + STM32_FUNCTION(10, "QUADSPI_BK2_IO0"), 1332 + STM32_FUNCTION(11, "SAI2_SCK_B"), 1333 + STM32_FUNCTION(12, "ETH_MII_CRS"), 1334 + STM32_FUNCTION(13, "FMC_SDCKE0"), 1335 + STM32_FUNCTION(15, "LCD_R0"), 1336 + STM32_FUNCTION(16, "EVENTOUT"), 1337 + STM32_FUNCTION(17, "ANALOG") 1338 + ), 1339 + STM32_PIN( 1340 + PINCTRL_PIN(115, "PH3"), 1341 + STM32_FUNCTION(0, "GPIOH3"), 1342 + STM32_FUNCTION(10, "QUADSPI_BK2_IO1"), 1343 + STM32_FUNCTION(11, "SAI2_MCLK_B"), 1344 + STM32_FUNCTION(12, "ETH_MII_COL"), 1345 + STM32_FUNCTION(13, "FMC_SDNE0"), 1346 + STM32_FUNCTION(15, "LCD_R1"), 1347 + STM32_FUNCTION(16, "EVENTOUT"), 1348 + STM32_FUNCTION(17, "ANALOG") 1349 + ), 1350 + STM32_PIN( 1351 + PINCTRL_PIN(116, "PH4"), 1352 + STM32_FUNCTION(0, "GPIOH4"), 1353 + STM32_FUNCTION(5, "I2C2_SCL"), 1354 + STM32_FUNCTION(10, "LCD_G5"), 1355 + STM32_FUNCTION(11, "OTG_HS_ULPI_NXT"), 1356 + STM32_FUNCTION(15, "LCD_G4"), 1357 + STM32_FUNCTION(16, "EVENTOUT"), 1358 + STM32_FUNCTION(17, "ANALOG") 1359 + ), 1360 + STM32_PIN( 1361 + PINCTRL_PIN(117, "PH5"), 1362 + STM32_FUNCTION(0, "GPIOH5"), 1363 + STM32_FUNCTION(5, "I2C2_SDA"), 1364 + STM32_FUNCTION(6, "SPI5_NSS"), 1365 + STM32_FUNCTION(13, "FMC_SDNWE"), 1366 + STM32_FUNCTION(16, "EVENTOUT"), 1367 + STM32_FUNCTION(17, "ANALOG") 1368 + ), 1369 + STM32_PIN( 1370 + PINCTRL_PIN(118, "PH6"), 1371 + STM32_FUNCTION(0, "GPIOH6"), 1372 + STM32_FUNCTION(5, "I2C2_SMBA"), 1373 + STM32_FUNCTION(6, "SPI5_SCK"), 1374 + STM32_FUNCTION(10, "TIM12_CH1"), 1375 + STM32_FUNCTION(12, "ETH_MII_RXD2"), 1376 + STM32_FUNCTION(13, "FMC_SDNE1"), 1377 + STM32_FUNCTION(14, "DCMI_D8"), 1378 + STM32_FUNCTION(16, "EVENTOUT"), 1379 + STM32_FUNCTION(17, "ANALOG") 1380 + ), 1381 + STM32_PIN( 1382 + PINCTRL_PIN(119, "PH7"), 1383 + STM32_FUNCTION(0, "GPIOH7"), 1384 + STM32_FUNCTION(5, "I2C3_SCL"), 1385 + STM32_FUNCTION(6, "SPI5_MISO"), 1386 + STM32_FUNCTION(12, "ETH_MII_RXD3"), 1387 + STM32_FUNCTION(13, "FMC_SDCKE1"), 1388 + STM32_FUNCTION(14, "DCMI_D9"), 1389 + STM32_FUNCTION(16, "EVENTOUT"), 1390 + STM32_FUNCTION(17, "ANALOG") 1391 + ), 1392 + STM32_PIN( 1393 + PINCTRL_PIN(120, "PH8"), 1394 + STM32_FUNCTION(0, "GPIOH8"), 1395 + STM32_FUNCTION(5, "I2C3_SDA"), 1396 + STM32_FUNCTION(13, "FMC_D16"), 1397 + STM32_FUNCTION(14, "DCMI_HSYNC"), 1398 + STM32_FUNCTION(15, "LCD_R2"), 1399 + STM32_FUNCTION(16, "EVENTOUT"), 1400 + STM32_FUNCTION(17, "ANALOG") 1401 + ), 1402 + STM32_PIN( 1403 + PINCTRL_PIN(121, "PH9"), 1404 + STM32_FUNCTION(0, "GPIOH9"), 1405 + STM32_FUNCTION(5, "I2C3_SMBA"), 1406 + STM32_FUNCTION(10, "TIM12_CH2"), 1407 + STM32_FUNCTION(13, "FMC_D17"), 1408 + STM32_FUNCTION(14, "DCMI_D0"), 1409 + STM32_FUNCTION(15, "LCD_R3"), 1410 + STM32_FUNCTION(16, "EVENTOUT"), 1411 + STM32_FUNCTION(17, "ANALOG") 1412 + ), 1413 + STM32_PIN( 1414 + PINCTRL_PIN(122, "PH10"), 1415 + STM32_FUNCTION(0, "GPIOH10"), 1416 + STM32_FUNCTION(3, "TIM5_CH1"), 1417 + STM32_FUNCTION(5, "I2C4_SMBA"), 1418 + STM32_FUNCTION(13, "FMC_D18"), 1419 + STM32_FUNCTION(14, "DCMI_D1"), 1420 + STM32_FUNCTION(15, "LCD_R4"), 1421 + STM32_FUNCTION(16, "EVENTOUT"), 1422 + STM32_FUNCTION(17, "ANALOG") 1423 + ), 1424 + STM32_PIN( 1425 + PINCTRL_PIN(123, "PH11"), 1426 + STM32_FUNCTION(0, "GPIOH11"), 1427 + STM32_FUNCTION(3, "TIM5_CH2"), 1428 + STM32_FUNCTION(5, "I2C4_SCL"), 1429 + STM32_FUNCTION(13, "FMC_D19"), 1430 + STM32_FUNCTION(14, "DCMI_D2"), 1431 + STM32_FUNCTION(15, "LCD_R5"), 1432 + STM32_FUNCTION(16, "EVENTOUT"), 1433 + STM32_FUNCTION(17, "ANALOG") 1434 + ), 1435 + STM32_PIN( 1436 + PINCTRL_PIN(124, "PH12"), 1437 + STM32_FUNCTION(0, "GPIOH12"), 1438 + STM32_FUNCTION(3, "TIM5_CH3"), 1439 + STM32_FUNCTION(5, "I2C4_SDA"), 1440 + STM32_FUNCTION(13, "FMC_D20"), 1441 + STM32_FUNCTION(14, "DCMI_D3"), 1442 + STM32_FUNCTION(15, "LCD_R6"), 1443 + STM32_FUNCTION(16, "EVENTOUT"), 1444 + STM32_FUNCTION(17, "ANALOG") 1445 + ), 1446 + STM32_PIN( 1447 + PINCTRL_PIN(125, "PH13"), 1448 + STM32_FUNCTION(0, "GPIOH13"), 1449 + STM32_FUNCTION(4, "TIM8_CH1N"), 1450 + STM32_FUNCTION(9, "UART4_TX"), 1451 + STM32_FUNCTION(10, "CAN1_TX"), 1452 + STM32_FUNCTION(13, "FMC_D21"), 1453 + STM32_FUNCTION(15, "LCD_G2"), 1454 + STM32_FUNCTION(16, "EVENTOUT"), 1455 + STM32_FUNCTION(17, "ANALOG") 1456 + ), 1457 + STM32_PIN( 1458 + PINCTRL_PIN(126, "PH14"), 1459 + STM32_FUNCTION(0, "GPIOH14"), 1460 + STM32_FUNCTION(4, "TIM8_CH2N"), 1461 + STM32_FUNCTION(9, "UART4_RX"), 1462 + STM32_FUNCTION(10, "CAN1_RX"), 1463 + STM32_FUNCTION(13, "FMC_D22"), 1464 + STM32_FUNCTION(14, "DCMI_D4"), 1465 + STM32_FUNCTION(15, "LCD_G3"), 1466 + STM32_FUNCTION(16, "EVENTOUT"), 1467 + STM32_FUNCTION(17, "ANALOG") 1468 + ), 1469 + STM32_PIN( 1470 + PINCTRL_PIN(127, "PH15"), 1471 + STM32_FUNCTION(0, "GPIOH15"), 1472 + STM32_FUNCTION(4, "TIM8_CH3N"), 1473 + STM32_FUNCTION(13, "FMC_D23"), 1474 + STM32_FUNCTION(14, "DCMI_D11"), 1475 + STM32_FUNCTION(15, "LCD_G4"), 1476 + STM32_FUNCTION(16, "EVENTOUT"), 1477 + STM32_FUNCTION(17, "ANALOG") 1478 + ), 1479 + STM32_PIN( 1480 + PINCTRL_PIN(128, "PI0"), 1481 + STM32_FUNCTION(0, "GPIOI0"), 1482 + STM32_FUNCTION(3, "TIM5_CH4"), 1483 + STM32_FUNCTION(6, "SPI2_NSS I2S2_WS"), 1484 + STM32_FUNCTION(13, "FMC_D24"), 1485 + STM32_FUNCTION(14, "DCMI_D13"), 1486 + STM32_FUNCTION(15, "LCD_G5"), 1487 + STM32_FUNCTION(16, "EVENTOUT"), 1488 + STM32_FUNCTION(17, "ANALOG") 1489 + ), 1490 + STM32_PIN( 1491 + PINCTRL_PIN(129, "PI1"), 1492 + STM32_FUNCTION(0, "GPIOI1"), 1493 + STM32_FUNCTION(4, "TIM8_BKIN2"), 1494 + STM32_FUNCTION(6, "SPI2_SCK I2S2_CK"), 1495 + STM32_FUNCTION(13, "FMC_D25"), 1496 + STM32_FUNCTION(14, "DCMI_D8"), 1497 + STM32_FUNCTION(15, "LCD_G6"), 1498 + STM32_FUNCTION(16, "EVENTOUT"), 1499 + STM32_FUNCTION(17, "ANALOG") 1500 + ), 1501 + STM32_PIN( 1502 + PINCTRL_PIN(130, "PI2"), 1503 + STM32_FUNCTION(0, "GPIOI2"), 1504 + STM32_FUNCTION(4, "TIM8_CH4"), 1505 + STM32_FUNCTION(6, "SPI2_MISO"), 1506 + STM32_FUNCTION(13, "FMC_D26"), 1507 + STM32_FUNCTION(14, "DCMI_D9"), 1508 + STM32_FUNCTION(15, "LCD_G7"), 1509 + STM32_FUNCTION(16, "EVENTOUT"), 1510 + STM32_FUNCTION(17, "ANALOG") 1511 + ), 1512 + STM32_PIN( 1513 + PINCTRL_PIN(131, "PI3"), 1514 + STM32_FUNCTION(0, "GPIOI3"), 1515 + STM32_FUNCTION(4, "TIM8_ETR"), 1516 + STM32_FUNCTION(6, "SPI2_MOSI I2S2_SD"), 1517 + STM32_FUNCTION(13, "FMC_D27"), 1518 + STM32_FUNCTION(14, "DCMI_D10"), 1519 + STM32_FUNCTION(16, "EVENTOUT"), 1520 + STM32_FUNCTION(17, "ANALOG") 1521 + ), 1522 + STM32_PIN( 1523 + PINCTRL_PIN(132, "PI4"), 1524 + STM32_FUNCTION(0, "GPIOI4"), 1525 + STM32_FUNCTION(4, "TIM8_BKIN"), 1526 + STM32_FUNCTION(11, "SAI2_MCLK_A"), 1527 + STM32_FUNCTION(13, "FMC_NBL2"), 1528 + STM32_FUNCTION(14, "DCMI_D5"), 1529 + STM32_FUNCTION(15, "LCD_B4"), 1530 + STM32_FUNCTION(16, "EVENTOUT"), 1531 + STM32_FUNCTION(17, "ANALOG") 1532 + ), 1533 + STM32_PIN( 1534 + PINCTRL_PIN(133, "PI5"), 1535 + STM32_FUNCTION(0, "GPIOI5"), 1536 + STM32_FUNCTION(4, "TIM8_CH1"), 1537 + STM32_FUNCTION(11, "SAI2_SCK_A"), 1538 + STM32_FUNCTION(13, "FMC_NBL3"), 1539 + STM32_FUNCTION(14, "DCMI_VSYNC"), 1540 + STM32_FUNCTION(15, "LCD_B5"), 1541 + STM32_FUNCTION(16, "EVENTOUT"), 1542 + STM32_FUNCTION(17, "ANALOG") 1543 + ), 1544 + STM32_PIN( 1545 + PINCTRL_PIN(134, "PI6"), 1546 + STM32_FUNCTION(0, "GPIOI6"), 1547 + STM32_FUNCTION(4, "TIM8_CH2"), 1548 + STM32_FUNCTION(11, "SAI2_SD_A"), 1549 + STM32_FUNCTION(13, "FMC_D28"), 1550 + STM32_FUNCTION(14, "DCMI_D6"), 1551 + STM32_FUNCTION(15, "LCD_B6"), 1552 + STM32_FUNCTION(16, "EVENTOUT"), 1553 + STM32_FUNCTION(17, "ANALOG") 1554 + ), 1555 + STM32_PIN( 1556 + PINCTRL_PIN(135, "PI7"), 1557 + STM32_FUNCTION(0, "GPIOI7"), 1558 + STM32_FUNCTION(4, "TIM8_CH3"), 1559 + STM32_FUNCTION(11, "SAI2_FS_A"), 1560 + STM32_FUNCTION(13, "FMC_D29"), 1561 + STM32_FUNCTION(14, "DCMI_D7"), 1562 + STM32_FUNCTION(15, "LCD_B7"), 1563 + STM32_FUNCTION(16, "EVENTOUT"), 1564 + STM32_FUNCTION(17, "ANALOG") 1565 + ), 1566 + STM32_PIN( 1567 + PINCTRL_PIN(136, "PI8"), 1568 + STM32_FUNCTION(0, "GPIOI8"), 1569 + STM32_FUNCTION(16, "EVENTOUT"), 1570 + STM32_FUNCTION(17, "ANALOG") 1571 + ), 1572 + STM32_PIN( 1573 + PINCTRL_PIN(137, "PI9"), 1574 + STM32_FUNCTION(0, "GPIOI9"), 1575 + STM32_FUNCTION(9, "UART4_RX"), 1576 + STM32_FUNCTION(10, "CAN1_RX"), 1577 + STM32_FUNCTION(13, "FMC_D30"), 1578 + STM32_FUNCTION(15, "LCD_VSYNC"), 1579 + STM32_FUNCTION(16, "EVENTOUT"), 1580 + STM32_FUNCTION(17, "ANALOG") 1581 + ), 1582 + STM32_PIN( 1583 + PINCTRL_PIN(138, "PI10"), 1584 + STM32_FUNCTION(0, "GPIOI10"), 1585 + STM32_FUNCTION(12, "ETH_MII_RX_ER"), 1586 + STM32_FUNCTION(13, "FMC_D31"), 1587 + STM32_FUNCTION(15, "LCD_HSYNC"), 1588 + STM32_FUNCTION(16, "EVENTOUT"), 1589 + STM32_FUNCTION(17, "ANALOG") 1590 + ), 1591 + STM32_PIN( 1592 + PINCTRL_PIN(139, "PI11"), 1593 + STM32_FUNCTION(0, "GPIOI11"), 1594 + STM32_FUNCTION(10, "LCD_G6"), 1595 + STM32_FUNCTION(11, "OTG_HS_ULPI_DIR"), 1596 + STM32_FUNCTION(16, "EVENTOUT"), 1597 + STM32_FUNCTION(17, "ANALOG") 1598 + ), 1599 + STM32_PIN( 1600 + PINCTRL_PIN(140, "PI12"), 1601 + STM32_FUNCTION(0, "GPIOI12"), 1602 + STM32_FUNCTION(15, "LCD_HSYNC"), 1603 + STM32_FUNCTION(16, "EVENTOUT"), 1604 + STM32_FUNCTION(17, "ANALOG") 1605 + ), 1606 + STM32_PIN( 1607 + PINCTRL_PIN(141, "PI13"), 1608 + STM32_FUNCTION(0, "GPIOI13"), 1609 + STM32_FUNCTION(15, "LCD_VSYNC"), 1610 + STM32_FUNCTION(16, "EVENTOUT"), 1611 + STM32_FUNCTION(17, "ANALOG") 1612 + ), 1613 + STM32_PIN( 1614 + PINCTRL_PIN(142, "PI14"), 1615 + STM32_FUNCTION(0, "GPIOI14"), 1616 + STM32_FUNCTION(15, "LCD_CLK"), 1617 + STM32_FUNCTION(16, "EVENTOUT"), 1618 + STM32_FUNCTION(17, "ANALOG") 1619 + ), 1620 + STM32_PIN( 1621 + PINCTRL_PIN(143, "PI15"), 1622 + STM32_FUNCTION(0, "GPIOI15"), 1623 + STM32_FUNCTION(10, "LCD_G2"), 1624 + STM32_FUNCTION(15, "LCD_R0"), 1625 + STM32_FUNCTION(16, "EVENTOUT"), 1626 + STM32_FUNCTION(17, "ANALOG") 1627 + ), 1628 + STM32_PIN( 1629 + PINCTRL_PIN(144, "PJ0"), 1630 + STM32_FUNCTION(0, "GPIOJ0"), 1631 + STM32_FUNCTION(10, "LCD_R7"), 1632 + STM32_FUNCTION(15, "LCD_R1"), 1633 + STM32_FUNCTION(16, "EVENTOUT"), 1634 + STM32_FUNCTION(17, "ANALOG") 1635 + ), 1636 + STM32_PIN( 1637 + PINCTRL_PIN(145, "PJ1"), 1638 + STM32_FUNCTION(0, "GPIOJ1"), 1639 + STM32_FUNCTION(15, "LCD_R2"), 1640 + STM32_FUNCTION(16, "EVENTOUT"), 1641 + STM32_FUNCTION(17, "ANALOG") 1642 + ), 1643 + STM32_PIN( 1644 + PINCTRL_PIN(146, "PJ2"), 1645 + STM32_FUNCTION(0, "GPIOJ2"), 1646 + STM32_FUNCTION(14, "DSI_TE"), 1647 + STM32_FUNCTION(15, "LCD_R3"), 1648 + STM32_FUNCTION(16, "EVENTOUT"), 1649 + STM32_FUNCTION(17, "ANALOG") 1650 + ), 1651 + STM32_PIN( 1652 + PINCTRL_PIN(147, "PJ3"), 1653 + STM32_FUNCTION(0, "GPIOJ3"), 1654 + STM32_FUNCTION(15, "LCD_R4"), 1655 + STM32_FUNCTION(16, "EVENTOUT"), 1656 + STM32_FUNCTION(17, "ANALOG") 1657 + ), 1658 + STM32_PIN( 1659 + PINCTRL_PIN(148, "PJ4"), 1660 + STM32_FUNCTION(0, "GPIOJ4"), 1661 + STM32_FUNCTION(15, "LCD_R5"), 1662 + STM32_FUNCTION(16, "EVENTOUT"), 1663 + STM32_FUNCTION(17, "ANALOG") 1664 + ), 1665 + STM32_PIN( 1666 + PINCTRL_PIN(149, "PJ5"), 1667 + STM32_FUNCTION(0, "GPIOJ5"), 1668 + STM32_FUNCTION(15, "LCD_R6"), 1669 + STM32_FUNCTION(16, "EVENTOUT"), 1670 + STM32_FUNCTION(17, "ANALOG") 1671 + ), 1672 + STM32_PIN( 1673 + PINCTRL_PIN(150, "PJ6"), 1674 + STM32_FUNCTION(0, "GPIOJ6"), 1675 + STM32_FUNCTION(15, "LCD_R7"), 1676 + STM32_FUNCTION(16, "EVENTOUT"), 1677 + STM32_FUNCTION(17, "ANALOG") 1678 + ), 1679 + STM32_PIN( 1680 + PINCTRL_PIN(151, "PJ7"), 1681 + STM32_FUNCTION(0, "GPIOJ7"), 1682 + STM32_FUNCTION(15, "LCD_G0"), 1683 + STM32_FUNCTION(16, "EVENTOUT"), 1684 + STM32_FUNCTION(17, "ANALOG") 1685 + ), 1686 + STM32_PIN( 1687 + PINCTRL_PIN(152, "PJ8"), 1688 + STM32_FUNCTION(0, "GPIOJ8"), 1689 + STM32_FUNCTION(15, "LCD_G1"), 1690 + STM32_FUNCTION(16, "EVENTOUT"), 1691 + STM32_FUNCTION(17, "ANALOG") 1692 + ), 1693 + STM32_PIN( 1694 + PINCTRL_PIN(153, "PJ9"), 1695 + STM32_FUNCTION(0, "GPIOJ9"), 1696 + STM32_FUNCTION(15, "LCD_G2"), 1697 + STM32_FUNCTION(16, "EVENTOUT"), 1698 + STM32_FUNCTION(17, "ANALOG") 1699 + ), 1700 + STM32_PIN( 1701 + PINCTRL_PIN(154, "PJ10"), 1702 + STM32_FUNCTION(0, "GPIOJ10"), 1703 + STM32_FUNCTION(15, "LCD_G3"), 1704 + STM32_FUNCTION(16, "EVENTOUT"), 1705 + STM32_FUNCTION(17, "ANALOG") 1706 + ), 1707 + STM32_PIN( 1708 + PINCTRL_PIN(155, "PJ11"), 1709 + STM32_FUNCTION(0, "GPIOJ11"), 1710 + STM32_FUNCTION(15, "LCD_G4"), 1711 + STM32_FUNCTION(16, "EVENTOUT"), 1712 + STM32_FUNCTION(17, "ANALOG") 1713 + ), 1714 + STM32_PIN( 1715 + PINCTRL_PIN(156, "PJ12"), 1716 + STM32_FUNCTION(0, "GPIOJ12"), 1717 + STM32_FUNCTION(10, "LCD_G3"), 1718 + STM32_FUNCTION(15, "LCD_B0"), 1719 + STM32_FUNCTION(16, "EVENTOUT"), 1720 + STM32_FUNCTION(17, "ANALOG") 1721 + ), 1722 + STM32_PIN( 1723 + PINCTRL_PIN(157, "PJ13"), 1724 + STM32_FUNCTION(0, "GPIOJ13"), 1725 + STM32_FUNCTION(10, "LCD_G4"), 1726 + STM32_FUNCTION(15, "LCD_B1"), 1727 + STM32_FUNCTION(16, "EVENTOUT"), 1728 + STM32_FUNCTION(17, "ANALOG") 1729 + ), 1730 + STM32_PIN( 1731 + PINCTRL_PIN(158, "PJ14"), 1732 + STM32_FUNCTION(0, "GPIOJ14"), 1733 + STM32_FUNCTION(15, "LCD_B2"), 1734 + STM32_FUNCTION(16, "EVENTOUT"), 1735 + STM32_FUNCTION(17, "ANALOG") 1736 + ), 1737 + STM32_PIN( 1738 + PINCTRL_PIN(159, "PJ15"), 1739 + STM32_FUNCTION(0, "GPIOJ15"), 1740 + STM32_FUNCTION(15, "LCD_B3"), 1741 + STM32_FUNCTION(16, "EVENTOUT"), 1742 + STM32_FUNCTION(17, "ANALOG") 1743 + ), 1744 + STM32_PIN( 1745 + PINCTRL_PIN(160, "PK0"), 1746 + STM32_FUNCTION(0, "GPIOK0"), 1747 + STM32_FUNCTION(15, "LCD_G5"), 1748 + STM32_FUNCTION(16, "EVENTOUT"), 1749 + STM32_FUNCTION(17, "ANALOG") 1750 + ), 1751 + STM32_PIN( 1752 + PINCTRL_PIN(161, "PK1"), 1753 + STM32_FUNCTION(0, "GPIOK1"), 1754 + STM32_FUNCTION(15, "LCD_G6"), 1755 + STM32_FUNCTION(16, "EVENTOUT"), 1756 + STM32_FUNCTION(17, "ANALOG") 1757 + ), 1758 + STM32_PIN( 1759 + PINCTRL_PIN(162, "PK2"), 1760 + STM32_FUNCTION(0, "GPIOK2"), 1761 + STM32_FUNCTION(15, "LCD_G7"), 1762 + STM32_FUNCTION(16, "EVENTOUT"), 1763 + STM32_FUNCTION(17, "ANALOG") 1764 + ), 1765 + STM32_PIN( 1766 + PINCTRL_PIN(163, "PK3"), 1767 + STM32_FUNCTION(0, "GPIOK3"), 1768 + STM32_FUNCTION(15, "LCD_B4"), 1769 + STM32_FUNCTION(16, "EVENTOUT"), 1770 + STM32_FUNCTION(17, "ANALOG") 1771 + ), 1772 + STM32_PIN( 1773 + PINCTRL_PIN(164, "PK4"), 1774 + STM32_FUNCTION(0, "GPIOK4"), 1775 + STM32_FUNCTION(15, "LCD_B5"), 1776 + STM32_FUNCTION(16, "EVENTOUT"), 1777 + STM32_FUNCTION(17, "ANALOG") 1778 + ), 1779 + STM32_PIN( 1780 + PINCTRL_PIN(165, "PK5"), 1781 + STM32_FUNCTION(0, "GPIOK5"), 1782 + STM32_FUNCTION(15, "LCD_B6"), 1783 + STM32_FUNCTION(16, "EVENTOUT"), 1784 + STM32_FUNCTION(17, "ANALOG") 1785 + ), 1786 + STM32_PIN( 1787 + PINCTRL_PIN(166, "PK6"), 1788 + STM32_FUNCTION(0, "GPIOK6"), 1789 + STM32_FUNCTION(15, "LCD_B7"), 1790 + STM32_FUNCTION(16, "EVENTOUT"), 1791 + STM32_FUNCTION(17, "ANALOG") 1792 + ), 1793 + STM32_PIN( 1794 + PINCTRL_PIN(167, "PK7"), 1795 + STM32_FUNCTION(0, "GPIOK7"), 1796 + STM32_FUNCTION(15, "LCD_DE"), 1797 + STM32_FUNCTION(16, "EVENTOUT"), 1798 + STM32_FUNCTION(17, "ANALOG") 1799 + ), 1800 + }; 1801 + 1802 + static struct stm32_pinctrl_match_data stm32f769_match_data = { 1803 + .pins = stm32f769_pins, 1804 + .npins = ARRAY_SIZE(stm32f769_pins), 1805 + }; 1806 + 1807 + static const struct of_device_id stm32f769_pctrl_match[] = { 1808 + { 1809 + .compatible = "st,stm32f769-pinctrl", 1810 + .data = &stm32f769_match_data, 1811 + }, 1812 + { } 1813 + }; 1814 + 1815 + static struct platform_driver stm32f769_pinctrl_driver = { 1816 + .probe = stm32_pctl_probe, 1817 + .driver = { 1818 + .name = "stm32f769-pinctrl", 1819 + .of_match_table = stm32f769_pctrl_match, 1820 + }, 1821 + }; 1822 + 1823 + static int __init stm32f769_pinctrl_init(void) 1824 + { 1825 + return platform_driver_register(&stm32f769_pinctrl_driver); 1826 + } 1827 + arch_initcall(stm32f769_pinctrl_init);
+3 -3
drivers/pinctrl/stm32/pinctrl-stm32h743.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 1 2 /* 2 - * Copyright (C) Alexandre Torgue 2017 3 - * Author: Alexandre Torgue <alexandre.torgue@st.com> 4 - * License terms: GNU General Public License (GPL), version 2 3 + * Copyright (C) STMicroelectronics 2017 4 + * Author: Alexandre Torgue <alexandre.torgue@st.com> for STMicroelectronics. 5 5 */ 6 6 #include <linux/init.h> 7 7 #include <linux/of.h>
+2188
drivers/pinctrl/stm32/pinctrl-stm32mp157.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 2 + /* 3 + * Copyright (C) STMicroelectronics 2017 - All Rights Reserved 4 + * Author: Alexandre Torgue <alexandre.torgue@st.com> for STMicroelectronics. 5 + */ 6 + #include <linux/init.h> 7 + #include <linux/of.h> 8 + #include <linux/platform_device.h> 9 + 10 + #include "pinctrl-stm32.h" 11 + 12 + static const struct stm32_desc_pin stm32mp157_pins[] = { 13 + STM32_PIN( 14 + PINCTRL_PIN(0, "PA0"), 15 + STM32_FUNCTION(0, "GPIOA0"), 16 + STM32_FUNCTION(2, "TIM2_CH1 TIM2_ETR"), 17 + STM32_FUNCTION(3, "TIM5_CH1"), 18 + STM32_FUNCTION(4, "TIM8_ETR"), 19 + STM32_FUNCTION(5, "TIM15_BKIN"), 20 + STM32_FUNCTION(8, "USART2_CTS_NSS USART_BOOT2_CTS_NSS"), 21 + STM32_FUNCTION(9, "UART4_TX"), 22 + STM32_FUNCTION(10, "SDMMC2_CMD"), 23 + STM32_FUNCTION(11, "SAI2_SD_B"), 24 + STM32_FUNCTION(12, "ETH_GMII_CRS ETH_MII_CRS"), 25 + STM32_FUNCTION(16, "EVENTOUT"), 26 + STM32_FUNCTION(17, "ANALOG") 27 + ), 28 + STM32_PIN( 29 + PINCTRL_PIN(1, "PA1"), 30 + STM32_FUNCTION(0, "GPIOA1"), 31 + STM32_FUNCTION(1, "ETH_CLK"), 32 + STM32_FUNCTION(2, "TIM2_CH2"), 33 + STM32_FUNCTION(3, "TIM5_CH2"), 34 + STM32_FUNCTION(4, "LPTIM3_OUT"), 35 + STM32_FUNCTION(5, "TIM15_CH1N"), 36 + STM32_FUNCTION(8, "USART2_RTS USART_BOOT2_RTS"), 37 + STM32_FUNCTION(9, "UART4_RX"), 38 + STM32_FUNCTION(10, "QUADSPI_BK1_IO3 QUADSPI_BOOTBK1_IO3"), 39 + STM32_FUNCTION(11, "SAI2_MCLK_B"), 40 + STM32_FUNCTION(12, "ETH_GMII_RX_CLK ETH_MII_RX_CLK ETH_RGMII_RX_CLK ETH_RMII_REF_CLK"), 41 + STM32_FUNCTION(15, "LCD_R2"), 42 + STM32_FUNCTION(16, "EVENTOUT"), 43 + STM32_FUNCTION(17, "ANALOG") 44 + ), 45 + STM32_PIN( 46 + PINCTRL_PIN(2, "PA2"), 47 + STM32_FUNCTION(0, "GPIOA2"), 48 + STM32_FUNCTION(2, "TIM2_CH3"), 49 + STM32_FUNCTION(3, "TIM5_CH3"), 50 + STM32_FUNCTION(4, "LPTIM4_OUT"), 51 + STM32_FUNCTION(5, "TIM15_CH1"), 52 + STM32_FUNCTION(8, "USART2_TX USART_BOOT2_TX"), 53 + STM32_FUNCTION(9, "SAI2_SCK_B"), 54 + STM32_FUNCTION(11, "SDMMC2_D0DIR SDMMC_BOOT2_D0DIR"), 55 + STM32_FUNCTION(12, "ETH_MDIO"), 56 + STM32_FUNCTION(13, "MDIOS_MDIO"), 57 + STM32_FUNCTION(15, "LCD_R1"), 58 + STM32_FUNCTION(16, "EVENTOUT"), 59 + STM32_FUNCTION(17, "ANALOG") 60 + ), 61 + STM32_PIN( 62 + PINCTRL_PIN(3, "PA3"), 63 + STM32_FUNCTION(0, "GPIOA3"), 64 + STM32_FUNCTION(2, "TIM2_CH4"), 65 + STM32_FUNCTION(3, "TIM5_CH4"), 66 + STM32_FUNCTION(4, "LPTIM5_OUT"), 67 + STM32_FUNCTION(5, "TIM15_CH2"), 68 + STM32_FUNCTION(8, "USART2_RX USART_BOOT2_RX"), 69 + STM32_FUNCTION(10, "LCD_B2"), 70 + STM32_FUNCTION(12, "ETH_GMII_COL ETH_MII_COL"), 71 + STM32_FUNCTION(15, "LCD_B5"), 72 + STM32_FUNCTION(16, "EVENTOUT"), 73 + STM32_FUNCTION(17, "ANALOG") 74 + ), 75 + STM32_PIN( 76 + PINCTRL_PIN(4, "PA4"), 77 + STM32_FUNCTION(0, "GPIOA4"), 78 + STM32_FUNCTION(1, "HDP0"), 79 + STM32_FUNCTION(3, "TIM5_ETR"), 80 + STM32_FUNCTION(5, "SAI4_D2"), 81 + STM32_FUNCTION(6, "SPI1_NSS I2S1_WS"), 82 + STM32_FUNCTION(7, "SPI3_NSS I2S3_WS"), 83 + STM32_FUNCTION(8, "USART2_CK USART_BOOT2_CK"), 84 + STM32_FUNCTION(9, "SPI6_NSS"), 85 + STM32_FUNCTION(13, "SAI4_FS_A"), 86 + STM32_FUNCTION(14, "DCMI_HSYNC"), 87 + STM32_FUNCTION(15, "LCD_VSYNC"), 88 + STM32_FUNCTION(16, "EVENTOUT"), 89 + STM32_FUNCTION(17, "ANALOG") 90 + ), 91 + STM32_PIN( 92 + PINCTRL_PIN(5, "PA5"), 93 + STM32_FUNCTION(0, "GPIOA5"), 94 + STM32_FUNCTION(2, "TIM2_CH1 TIM2_ETR"), 95 + STM32_FUNCTION(4, "TIM8_CH1N"), 96 + STM32_FUNCTION(5, "SAI4_CK1"), 97 + STM32_FUNCTION(6, "SPI1_SCK I2S1_CK"), 98 + STM32_FUNCTION(9, "SPI6_SCK"), 99 + STM32_FUNCTION(13, "SAI4_MCLK_A"), 100 + STM32_FUNCTION(15, "LCD_R4"), 101 + STM32_FUNCTION(16, "EVENTOUT"), 102 + STM32_FUNCTION(17, "ANALOG") 103 + ), 104 + STM32_PIN( 105 + PINCTRL_PIN(6, "PA6"), 106 + STM32_FUNCTION(0, "GPIOA6"), 107 + STM32_FUNCTION(2, "TIM1_BKIN"), 108 + STM32_FUNCTION(3, "TIM3_CH1"), 109 + STM32_FUNCTION(4, "TIM8_BKIN"), 110 + STM32_FUNCTION(5, "SAI4_CK2"), 111 + STM32_FUNCTION(6, "SPI1_MISO I2S1_SDI"), 112 + STM32_FUNCTION(9, "SPI6_MISO"), 113 + STM32_FUNCTION(10, "TIM13_CH1"), 114 + STM32_FUNCTION(12, "MDIOS_MDC"), 115 + STM32_FUNCTION(13, "SAI4_SCK_A"), 116 + STM32_FUNCTION(14, "DCMI_PIXCLK"), 117 + STM32_FUNCTION(15, "LCD_G2"), 118 + STM32_FUNCTION(16, "EVENTOUT"), 119 + STM32_FUNCTION(17, "ANALOG") 120 + ), 121 + STM32_PIN( 122 + PINCTRL_PIN(7, "PA7"), 123 + STM32_FUNCTION(0, "GPIOA7"), 124 + STM32_FUNCTION(2, "TIM1_CH1N"), 125 + STM32_FUNCTION(3, "TIM3_CH2"), 126 + STM32_FUNCTION(4, "TIM8_CH1N"), 127 + STM32_FUNCTION(5, "SAI4_D1"), 128 + STM32_FUNCTION(6, "SPI1_MOSI I2S1_SDO"), 129 + STM32_FUNCTION(9, "SPI6_MOSI"), 130 + STM32_FUNCTION(10, "TIM14_CH1"), 131 + STM32_FUNCTION(11, "QUADSPI_CLK"), 132 + STM32_FUNCTION(12, "ETH_GMII_RX_DV ETH_MII_RX_DV ETH_RGMII_RX_CTL ETH_RMII_CRS_DV"), 133 + STM32_FUNCTION(13, "SAI4_SD_A"), 134 + STM32_FUNCTION(16, "EVENTOUT"), 135 + STM32_FUNCTION(17, "ANALOG") 136 + ), 137 + STM32_PIN( 138 + PINCTRL_PIN(8, "PA8"), 139 + STM32_FUNCTION(0, "GPIOA8"), 140 + STM32_FUNCTION(1, "MCO1"), 141 + STM32_FUNCTION(2, "TIM1_CH1"), 142 + STM32_FUNCTION(4, "TIM8_BKIN2"), 143 + STM32_FUNCTION(5, "I2C3_SCL"), 144 + STM32_FUNCTION(6, "SPI3_MOSI I2S3_SDO"), 145 + STM32_FUNCTION(8, "USART1_CK"), 146 + STM32_FUNCTION(9, "SDMMC2_CKIN SDMMC_BOOT2_CKIN"), 147 + STM32_FUNCTION(10, "SDMMC2_D4 SDMMC_BOOT2_D4"), 148 + STM32_FUNCTION(11, "USBO_SOF"), 149 + STM32_FUNCTION(13, "SAI4_SD_B"), 150 + STM32_FUNCTION(14, "UART7_RX"), 151 + STM32_FUNCTION(15, "LCD_R6"), 152 + STM32_FUNCTION(16, "EVENTOUT"), 153 + STM32_FUNCTION(17, "ANALOG") 154 + ), 155 + STM32_PIN( 156 + PINCTRL_PIN(9, "PA9"), 157 + STM32_FUNCTION(0, "GPIOA9"), 158 + STM32_FUNCTION(2, "TIM1_CH2"), 159 + STM32_FUNCTION(5, "I2C3_SMBA"), 160 + STM32_FUNCTION(6, "SPI2_SCK I2S2_CK"), 161 + STM32_FUNCTION(8, "USART1_TX"), 162 + STM32_FUNCTION(9, "SDMMC2_CDIR SDMMC_BOOT2_CDIR"), 163 + STM32_FUNCTION(10, "CAN1_RXFD"), 164 + STM32_FUNCTION(11, "SDMMC2_D5 SDMMC_BOOT2_D5"), 165 + STM32_FUNCTION(14, "DCMI_D0"), 166 + STM32_FUNCTION(15, "LCD_R5"), 167 + STM32_FUNCTION(16, "EVENTOUT"), 168 + STM32_FUNCTION(17, "ANALOG") 169 + ), 170 + STM32_PIN( 171 + PINCTRL_PIN(10, "PA10"), 172 + STM32_FUNCTION(0, "GPIOA10"), 173 + STM32_FUNCTION(2, "TIM1_CH3"), 174 + STM32_FUNCTION(6, "SPI3_NSS I2S3_WS"), 175 + STM32_FUNCTION(8, "USART1_RX"), 176 + STM32_FUNCTION(10, "CAN1_TXFD"), 177 + STM32_FUNCTION(12, "MDIOS_MDIO"), 178 + STM32_FUNCTION(13, "SAI4_FS_B"), 179 + STM32_FUNCTION(14, "DCMI_D1"), 180 + STM32_FUNCTION(15, "LCD_B1"), 181 + STM32_FUNCTION(16, "EVENTOUT"), 182 + STM32_FUNCTION(17, "ANALOG") 183 + ), 184 + STM32_PIN( 185 + PINCTRL_PIN(11, "PA11"), 186 + STM32_FUNCTION(0, "GPIOA11"), 187 + STM32_FUNCTION(2, "TIM1_CH4"), 188 + STM32_FUNCTION(3, "I2C6_SCL"), 189 + STM32_FUNCTION(5, "I2C5_SCL"), 190 + STM32_FUNCTION(6, "SPI2_NSS I2S2_WS"), 191 + STM32_FUNCTION(7, "UART4_RX"), 192 + STM32_FUNCTION(8, "USART1_CTS_NSS"), 193 + STM32_FUNCTION(10, "CAN1_RX"), 194 + STM32_FUNCTION(15, "LCD_R4"), 195 + STM32_FUNCTION(16, "EVENTOUT"), 196 + STM32_FUNCTION(17, "ANALOG") 197 + ), 198 + STM32_PIN( 199 + PINCTRL_PIN(12, "PA12"), 200 + STM32_FUNCTION(0, "GPIOA12"), 201 + STM32_FUNCTION(2, "TIM1_ETR"), 202 + STM32_FUNCTION(3, "I2C6_SDA"), 203 + STM32_FUNCTION(5, "I2C5_SDA"), 204 + STM32_FUNCTION(6, "SPI2_SCK I2S2_CK"), 205 + STM32_FUNCTION(7, "UART4_TX"), 206 + STM32_FUNCTION(8, "USART1_RTS"), 207 + STM32_FUNCTION(9, "SAI2_FS_B"), 208 + STM32_FUNCTION(10, "CAN1_TX"), 209 + STM32_FUNCTION(15, "LCD_R5"), 210 + STM32_FUNCTION(16, "EVENTOUT"), 211 + STM32_FUNCTION(17, "ANALOG") 212 + ), 213 + STM32_PIN( 214 + PINCTRL_PIN(13, "PA13"), 215 + STM32_FUNCTION(0, "GPIOA13"), 216 + STM32_FUNCTION(1, "DBTRGO"), 217 + STM32_FUNCTION(2, "DBTRGI"), 218 + STM32_FUNCTION(3, "MCO1"), 219 + STM32_FUNCTION(9, "UART4_TX"), 220 + STM32_FUNCTION(16, "EVENTOUT"), 221 + STM32_FUNCTION(17, "ANALOG") 222 + ), 223 + STM32_PIN( 224 + PINCTRL_PIN(14, "PA14"), 225 + STM32_FUNCTION(0, "GPIOA14"), 226 + STM32_FUNCTION(1, "DBTRGO"), 227 + STM32_FUNCTION(2, "DBTRGI"), 228 + STM32_FUNCTION(3, "MCO2"), 229 + STM32_FUNCTION(16, "EVENTOUT"), 230 + STM32_FUNCTION(17, "ANALOG") 231 + ), 232 + STM32_PIN( 233 + PINCTRL_PIN(15, "PA15"), 234 + STM32_FUNCTION(0, "GPIOA15"), 235 + STM32_FUNCTION(1, "DBTRGI"), 236 + STM32_FUNCTION(2, "TIM2_CH1 TIM2_ETR"), 237 + STM32_FUNCTION(3, "SAI4_D2"), 238 + STM32_FUNCTION(4, "SDMMC1_CDIR"), 239 + STM32_FUNCTION(5, "HDMI_CEC"), 240 + STM32_FUNCTION(6, "SPI1_NSS I2S1_WS"), 241 + STM32_FUNCTION(7, "SPI3_NSS I2S3_WS"), 242 + STM32_FUNCTION(8, "SPI6_NSS"), 243 + STM32_FUNCTION(9, "UART4_RTS UART_BOOT4_RTS"), 244 + STM32_FUNCTION(10, "SDMMC2_D5 SDMMC_BOOT2_D5"), 245 + STM32_FUNCTION(11, "SDMMC2_CDIR SDMMC_BOOT2_CDIR"), 246 + STM32_FUNCTION(12, "SDMMC1_D5 SDMMC_BOOT1_D5"), 247 + STM32_FUNCTION(13, "SAI4_FS_A"), 248 + STM32_FUNCTION(14, "UART7_TX"), 249 + STM32_FUNCTION(16, "EVENTOUT"), 250 + STM32_FUNCTION(17, "ANALOG") 251 + ), 252 + STM32_PIN( 253 + PINCTRL_PIN(16, "PB0"), 254 + STM32_FUNCTION(0, "GPIOB0"), 255 + STM32_FUNCTION(2, "TIM1_CH2N"), 256 + STM32_FUNCTION(3, "TIM3_CH3"), 257 + STM32_FUNCTION(4, "TIM8_CH2N"), 258 + STM32_FUNCTION(7, "DFSDM_CKOUT"), 259 + STM32_FUNCTION(9, "UART4_CTS UART_BOOT4_CTS"), 260 + STM32_FUNCTION(10, "LCD_R3"), 261 + STM32_FUNCTION(12, "ETH_GMII_RXD2 ETH_MII_RXD2 ETH_RGMII_RXD2"), 262 + STM32_FUNCTION(13, "MDIOS_MDIO"), 263 + STM32_FUNCTION(15, "LCD_G1"), 264 + STM32_FUNCTION(16, "EVENTOUT"), 265 + STM32_FUNCTION(17, "ANALOG") 266 + ), 267 + STM32_PIN( 268 + PINCTRL_PIN(17, "PB1"), 269 + STM32_FUNCTION(0, "GPIOB1"), 270 + STM32_FUNCTION(2, "TIM1_CH3N"), 271 + STM32_FUNCTION(3, "TIM3_CH4"), 272 + STM32_FUNCTION(4, "TIM8_CH3N"), 273 + STM32_FUNCTION(7, "DFSDM_DATA1"), 274 + STM32_FUNCTION(10, "LCD_R6"), 275 + STM32_FUNCTION(12, "ETH_GMII_RXD3 ETH_MII_RXD3 ETH_RGMII_RXD3"), 276 + STM32_FUNCTION(13, "MDIOS_MDC"), 277 + STM32_FUNCTION(15, "LCD_G0"), 278 + STM32_FUNCTION(16, "EVENTOUT"), 279 + STM32_FUNCTION(17, "ANALOG") 280 + ), 281 + STM32_PIN( 282 + PINCTRL_PIN(18, "PB2"), 283 + STM32_FUNCTION(0, "GPIOB2"), 284 + STM32_FUNCTION(1, "TRACED4"), 285 + STM32_FUNCTION(2, "RTC_OUT2"), 286 + STM32_FUNCTION(3, "SAI1_D1"), 287 + STM32_FUNCTION(4, "DFSDM_CK1"), 288 + STM32_FUNCTION(5, "USART1_RX"), 289 + STM32_FUNCTION(6, "I2S_CKIN"), 290 + STM32_FUNCTION(7, "SAI1_SD_A"), 291 + STM32_FUNCTION(8, "SPI3_MOSI I2S3_SDO"), 292 + STM32_FUNCTION(9, "UART4_RX UART_BOOT4_RX"), 293 + STM32_FUNCTION(10, "QUADSPI_CLK"), 294 + STM32_FUNCTION(16, "EVENTOUT"), 295 + STM32_FUNCTION(17, "ANALOG") 296 + ), 297 + STM32_PIN( 298 + PINCTRL_PIN(19, "PB3"), 299 + STM32_FUNCTION(0, "GPIOB3"), 300 + STM32_FUNCTION(1, "TRACED9"), 301 + STM32_FUNCTION(2, "TIM2_CH2"), 302 + STM32_FUNCTION(5, "SAI4_CK1"), 303 + STM32_FUNCTION(6, "SPI1_SCK I2S1_CK"), 304 + STM32_FUNCTION(7, "SPI3_SCK I2S3_CK"), 305 + STM32_FUNCTION(9, "SPI6_SCK"), 306 + STM32_FUNCTION(10, "SDMMC2_D2 SDMMC_BOOT2_D2"), 307 + STM32_FUNCTION(13, "SAI4_MCLK_A"), 308 + STM32_FUNCTION(14, "UART7_RX"), 309 + STM32_FUNCTION(16, "EVENTOUT"), 310 + STM32_FUNCTION(17, "ANALOG") 311 + ), 312 + STM32_PIN( 313 + PINCTRL_PIN(20, "PB4"), 314 + STM32_FUNCTION(0, "GPIOB4"), 315 + STM32_FUNCTION(1, "TRACED8"), 316 + STM32_FUNCTION(2, "TIM16_BKIN"), 317 + STM32_FUNCTION(3, "TIM3_CH1"), 318 + STM32_FUNCTION(5, "SAI4_CK2"), 319 + STM32_FUNCTION(6, "SPI1_MISO I2S1_SDI"), 320 + STM32_FUNCTION(7, "SPI3_MISO I2S3_SDI"), 321 + STM32_FUNCTION(8, "SPI2_NSS I2S2_WS"), 322 + STM32_FUNCTION(9, "SPI6_MISO"), 323 + STM32_FUNCTION(10, "SDMMC2_D3 SDMMC_BOOT2_D3"), 324 + STM32_FUNCTION(13, "SAI4_SCK_A"), 325 + STM32_FUNCTION(14, "UART7_TX"), 326 + STM32_FUNCTION(16, "EVENTOUT"), 327 + STM32_FUNCTION(17, "ANALOG") 328 + ), 329 + STM32_PIN( 330 + PINCTRL_PIN(21, "PB5"), 331 + STM32_FUNCTION(0, "GPIOB5"), 332 + STM32_FUNCTION(1, "ETH_CLK"), 333 + STM32_FUNCTION(2, "TIM17_BKIN"), 334 + STM32_FUNCTION(3, "TIM3_CH2"), 335 + STM32_FUNCTION(4, "SAI4_D1"), 336 + STM32_FUNCTION(5, "I2C1_SMBA"), 337 + STM32_FUNCTION(6, "SPI1_MOSI I2S1_SDO"), 338 + STM32_FUNCTION(7, "I2C4_SMBA"), 339 + STM32_FUNCTION(8, "SPI3_MOSI I2S3_SDO"), 340 + STM32_FUNCTION(9, "SPI6_MOSI"), 341 + STM32_FUNCTION(10, "CAN2_RX"), 342 + STM32_FUNCTION(11, "SAI4_SD_A"), 343 + STM32_FUNCTION(12, "ETH_PPS_OUT"), 344 + STM32_FUNCTION(13, "UART5_RX UART_BOOT5_RX"), 345 + STM32_FUNCTION(14, "DCMI_D10"), 346 + STM32_FUNCTION(15, "LCD_G7"), 347 + STM32_FUNCTION(16, "EVENTOUT"), 348 + STM32_FUNCTION(17, "ANALOG") 349 + ), 350 + STM32_PIN( 351 + PINCTRL_PIN(22, "PB6"), 352 + STM32_FUNCTION(0, "GPIOB6"), 353 + STM32_FUNCTION(2, "TIM16_CH1N"), 354 + STM32_FUNCTION(3, "TIM4_CH1"), 355 + STM32_FUNCTION(5, "I2C1_SCL"), 356 + STM32_FUNCTION(6, "HDMI_CEC"), 357 + STM32_FUNCTION(7, "I2C4_SCL"), 358 + STM32_FUNCTION(8, "USART1_TX"), 359 + STM32_FUNCTION(10, "CAN2_TX"), 360 + STM32_FUNCTION(11, "QUADSPI_BK1_NCS QUADSPI_BOOTBK1_NCS"), 361 + STM32_FUNCTION(12, "DFSDM_DATA5"), 362 + STM32_FUNCTION(13, "UART5_TX"), 363 + STM32_FUNCTION(14, "DCMI_D5"), 364 + STM32_FUNCTION(16, "EVENTOUT"), 365 + STM32_FUNCTION(17, "ANALOG") 366 + ), 367 + STM32_PIN( 368 + PINCTRL_PIN(23, "PB7"), 369 + STM32_FUNCTION(0, "GPIOB7"), 370 + STM32_FUNCTION(2, "TIM17_CH1N"), 371 + STM32_FUNCTION(3, "TIM4_CH2"), 372 + STM32_FUNCTION(5, "I2C1_SDA"), 373 + STM32_FUNCTION(7, "I2C4_SDA"), 374 + STM32_FUNCTION(8, "USART1_RX"), 375 + STM32_FUNCTION(10, "CAN2_TXFD"), 376 + STM32_FUNCTION(11, "SDMMC2_D1 SDMMC_BOOT2_D1"), 377 + STM32_FUNCTION(12, "DFSDM_CK5"), 378 + STM32_FUNCTION(13, "FMC_NL"), 379 + STM32_FUNCTION(14, "DCMI_VSYNC"), 380 + STM32_FUNCTION(16, "EVENTOUT"), 381 + STM32_FUNCTION(17, "ANALOG") 382 + ), 383 + STM32_PIN( 384 + PINCTRL_PIN(24, "PB8"), 385 + STM32_FUNCTION(0, "GPIOB8"), 386 + STM32_FUNCTION(1, "HDP6"), 387 + STM32_FUNCTION(2, "TIM16_CH1"), 388 + STM32_FUNCTION(3, "TIM4_CH3"), 389 + STM32_FUNCTION(4, "DFSDM_CK7"), 390 + STM32_FUNCTION(5, "I2C1_SCL"), 391 + STM32_FUNCTION(6, "SDMMC1_CKIN SDMMC_BOOT1_CKIN"), 392 + STM32_FUNCTION(7, "I2C4_SCL"), 393 + STM32_FUNCTION(8, "SDMMC2_CKIN SDMMC_BOOT2_CKIN"), 394 + STM32_FUNCTION(9, "UART4_RX"), 395 + STM32_FUNCTION(10, "CAN1_RX"), 396 + STM32_FUNCTION(11, "SDMMC2_D4 SDMMC_BOOT2_D4"), 397 + STM32_FUNCTION(12, "ETH_GMII_TXD3 ETH_MII_TXD3 ETH_RGMII_TXD3"), 398 + STM32_FUNCTION(13, "SDMMC1_D4 SDMMC_BOOT1_D4"), 399 + STM32_FUNCTION(14, "DCMI_D6"), 400 + STM32_FUNCTION(15, "LCD_B6"), 401 + STM32_FUNCTION(16, "EVENTOUT"), 402 + STM32_FUNCTION(17, "ANALOG") 403 + ), 404 + STM32_PIN( 405 + PINCTRL_PIN(25, "PB9"), 406 + STM32_FUNCTION(0, "GPIOB9"), 407 + STM32_FUNCTION(1, "HDP7"), 408 + STM32_FUNCTION(2, "TIM17_CH1"), 409 + STM32_FUNCTION(3, "TIM4_CH4"), 410 + STM32_FUNCTION(4, "DFSDM_DATA7"), 411 + STM32_FUNCTION(5, "I2C1_SDA"), 412 + STM32_FUNCTION(6, "SPI2_NSS I2S2_WS"), 413 + STM32_FUNCTION(7, "I2C4_SDA"), 414 + STM32_FUNCTION(8, "SDMMC2_CDIR SDMMC_BOOT2_CDIR"), 415 + STM32_FUNCTION(9, "UART4_TX"), 416 + STM32_FUNCTION(10, "CAN1_TX"), 417 + STM32_FUNCTION(11, "SDMMC2_D5 SDMMC_BOOT2_D5"), 418 + STM32_FUNCTION(12, "SDMMC1_CDIR SDMMC_BOOT1_CDIR"), 419 + STM32_FUNCTION(13, "SDMMC1_D5 SDMMC_BOOT1_D5"), 420 + STM32_FUNCTION(14, "DCMI_D7"), 421 + STM32_FUNCTION(15, "LCD_B7"), 422 + STM32_FUNCTION(16, "EVENTOUT"), 423 + STM32_FUNCTION(17, "ANALOG") 424 + ), 425 + STM32_PIN( 426 + PINCTRL_PIN(26, "PB10"), 427 + STM32_FUNCTION(0, "GPIOB10"), 428 + STM32_FUNCTION(2, "TIM2_CH3"), 429 + STM32_FUNCTION(4, "LPTIM2_IN1"), 430 + STM32_FUNCTION(5, "I2C2_SCL"), 431 + STM32_FUNCTION(6, "SPI2_SCK I2S2_CK"), 432 + STM32_FUNCTION(7, "DFSDM_DATA7"), 433 + STM32_FUNCTION(8, "USART3_TX USART_BOOT3_TX"), 434 + STM32_FUNCTION(10, "QUADSPI_BK1_NCS"), 435 + STM32_FUNCTION(12, "ETH_GMII_RX_ER ETH_MII_RX_ER"), 436 + STM32_FUNCTION(15, "LCD_G4"), 437 + STM32_FUNCTION(16, "EVENTOUT"), 438 + STM32_FUNCTION(17, "ANALOG") 439 + ), 440 + STM32_PIN( 441 + PINCTRL_PIN(27, "PB11"), 442 + STM32_FUNCTION(0, "GPIOB11"), 443 + STM32_FUNCTION(2, "TIM2_CH4"), 444 + STM32_FUNCTION(4, "LPTIM2_ETR"), 445 + STM32_FUNCTION(5, "I2C2_SDA"), 446 + STM32_FUNCTION(7, "DFSDM_CK7"), 447 + STM32_FUNCTION(8, "USART3_RX"), 448 + STM32_FUNCTION(12, "ETH_GMII_TX_EN ETH_MII_TX_EN ETH_RGMII_TX_CTL ETH_RMII_TX_EN"), 449 + STM32_FUNCTION(14, "DSI_TE"), 450 + STM32_FUNCTION(15, "LCD_G5"), 451 + STM32_FUNCTION(16, "EVENTOUT"), 452 + STM32_FUNCTION(17, "ANALOG") 453 + ), 454 + STM32_PIN( 455 + PINCTRL_PIN(28, "PB12"), 456 + STM32_FUNCTION(0, "GPIOB12"), 457 + STM32_FUNCTION(2, "TIM1_BKIN"), 458 + STM32_FUNCTION(3, "I2C6_SMBA"), 459 + STM32_FUNCTION(5, "I2C2_SMBA"), 460 + STM32_FUNCTION(6, "SPI2_NSS I2S2_WS"), 461 + STM32_FUNCTION(7, "DFSDM_DATA1"), 462 + STM32_FUNCTION(8, "USART3_CK USART_BOOT3_CK"), 463 + STM32_FUNCTION(9, "USART3_RX USART_BOOT3_RX"), 464 + STM32_FUNCTION(10, "CAN2_RX"), 465 + STM32_FUNCTION(12, "ETH_GMII_TXD0 ETH_MII_TXD0 ETH_RGMII_TXD0 ETH_RMII_TXD0"), 466 + STM32_FUNCTION(15, "UART5_RX"), 467 + STM32_FUNCTION(16, "EVENTOUT"), 468 + STM32_FUNCTION(17, "ANALOG") 469 + ), 470 + STM32_PIN( 471 + PINCTRL_PIN(29, "PB13"), 472 + STM32_FUNCTION(0, "GPIOB13"), 473 + STM32_FUNCTION(2, "TIM1_CH1N"), 474 + STM32_FUNCTION(4, "DFSDM_CKOUT"), 475 + STM32_FUNCTION(5, "LPTIM2_OUT"), 476 + STM32_FUNCTION(6, "SPI2_SCK I2S2_CK"), 477 + STM32_FUNCTION(7, "DFSDM_CK1"), 478 + STM32_FUNCTION(8, "USART3_CTS_NSS USART_BOOT3_CTS_NSS"), 479 + STM32_FUNCTION(10, "CAN2_TX"), 480 + STM32_FUNCTION(12, "ETH_GMII_TXD1 ETH_MII_TXD1 ETH_RGMII_TXD1 ETH_RMII_TXD1"), 481 + STM32_FUNCTION(15, "UART5_TX UART_BOOT5_TX"), 482 + STM32_FUNCTION(16, "EVENTOUT"), 483 + STM32_FUNCTION(17, "ANALOG") 484 + ), 485 + STM32_PIN( 486 + PINCTRL_PIN(30, "PB14"), 487 + STM32_FUNCTION(0, "GPIOB14"), 488 + STM32_FUNCTION(2, "TIM1_CH2N"), 489 + STM32_FUNCTION(3, "TIM12_CH1"), 490 + STM32_FUNCTION(4, "TIM8_CH2N"), 491 + STM32_FUNCTION(5, "USART1_TX"), 492 + STM32_FUNCTION(6, "SPI2_MISO I2S2_SDI"), 493 + STM32_FUNCTION(7, "DFSDM_DATA2"), 494 + STM32_FUNCTION(8, "USART3_RTS USART_BOOT3_RTS"), 495 + STM32_FUNCTION(10, "SDMMC2_D0 SDMMC_BOOT2_D0"), 496 + STM32_FUNCTION(16, "EVENTOUT"), 497 + STM32_FUNCTION(17, "ANALOG") 498 + ), 499 + STM32_PIN( 500 + PINCTRL_PIN(31, "PB15"), 501 + STM32_FUNCTION(0, "GPIOB15"), 502 + STM32_FUNCTION(1, "RTC_REFIN"), 503 + STM32_FUNCTION(2, "TIM1_CH3N"), 504 + STM32_FUNCTION(3, "TIM12_CH2"), 505 + STM32_FUNCTION(4, "TIM8_CH3N"), 506 + STM32_FUNCTION(5, "USART1_RX"), 507 + STM32_FUNCTION(6, "SPI2_MOSI I2S2_SDO"), 508 + STM32_FUNCTION(7, "DFSDM_CK2"), 509 + STM32_FUNCTION(10, "SDMMC2_D1 SDMMC_BOOT2_D1"), 510 + STM32_FUNCTION(16, "EVENTOUT"), 511 + STM32_FUNCTION(17, "ANALOG") 512 + ), 513 + STM32_PIN( 514 + PINCTRL_PIN(32, "PC0"), 515 + STM32_FUNCTION(0, "GPIOC0"), 516 + STM32_FUNCTION(4, "DFSDM_CK0"), 517 + STM32_FUNCTION(5, "LPTIM2_IN2"), 518 + STM32_FUNCTION(7, "DFSDM_DATA4"), 519 + STM32_FUNCTION(9, "SAI2_FS_B"), 520 + STM32_FUNCTION(11, "QUADSPI_BK2_NCS QUADSPI_BOOTBK2_NCS"), 521 + STM32_FUNCTION(15, "LCD_R5"), 522 + STM32_FUNCTION(16, "EVENTOUT"), 523 + STM32_FUNCTION(17, "ANALOG") 524 + ), 525 + STM32_PIN( 526 + PINCTRL_PIN(33, "PC1"), 527 + STM32_FUNCTION(0, "GPIOC1"), 528 + STM32_FUNCTION(1, "TRACED0"), 529 + STM32_FUNCTION(3, "SAI1_D1"), 530 + STM32_FUNCTION(4, "DFSDM_DATA0"), 531 + STM32_FUNCTION(5, "DFSDM_CK4"), 532 + STM32_FUNCTION(6, "SPI2_MOSI I2S2_SDO"), 533 + STM32_FUNCTION(7, "SAI1_SD_A"), 534 + STM32_FUNCTION(10, "SDMMC2_CK"), 535 + STM32_FUNCTION(12, "ETH_MDC"), 536 + STM32_FUNCTION(13, "MDIOS_MDC"), 537 + STM32_FUNCTION(16, "EVENTOUT"), 538 + STM32_FUNCTION(17, "ANALOG") 539 + ), 540 + STM32_PIN( 541 + PINCTRL_PIN(34, "PC2"), 542 + STM32_FUNCTION(0, "GPIOC2"), 543 + STM32_FUNCTION(4, "DFSDM_CK1"), 544 + STM32_FUNCTION(6, "SPI2_MISO I2S2_SDI"), 545 + STM32_FUNCTION(7, "DFSDM_CKOUT"), 546 + STM32_FUNCTION(12, "ETH_GMII_TXD2 ETH_MII_TXD2 ETH_RGMII_TXD2"), 547 + STM32_FUNCTION(16, "EVENTOUT"), 548 + STM32_FUNCTION(17, "ANALOG") 549 + ), 550 + STM32_PIN( 551 + PINCTRL_PIN(35, "PC3"), 552 + STM32_FUNCTION(0, "GPIOC3"), 553 + STM32_FUNCTION(1, "TRACECLK"), 554 + STM32_FUNCTION(4, "DFSDM_DATA1"), 555 + STM32_FUNCTION(6, "SPI2_MOSI I2S2_SDO"), 556 + STM32_FUNCTION(12, "ETH_GMII_TX_CLK ETH_MII_TX_CLK"), 557 + STM32_FUNCTION(16, "EVENTOUT"), 558 + STM32_FUNCTION(17, "ANALOG") 559 + ), 560 + STM32_PIN( 561 + PINCTRL_PIN(36, "PC4"), 562 + STM32_FUNCTION(0, "GPIOC4"), 563 + STM32_FUNCTION(4, "DFSDM_CK2"), 564 + STM32_FUNCTION(6, "I2S1_MCK"), 565 + STM32_FUNCTION(10, "SPDIF_IN2"), 566 + STM32_FUNCTION(12, "ETH_GMII_RXD0 ETH_MII_RXD0 ETH_RGMII_RXD0 ETH_RMII_RXD0"), 567 + STM32_FUNCTION(16, "EVENTOUT"), 568 + STM32_FUNCTION(17, "ANALOG") 569 + ), 570 + STM32_PIN( 571 + PINCTRL_PIN(37, "PC5"), 572 + STM32_FUNCTION(0, "GPIOC5"), 573 + STM32_FUNCTION(3, "SAI1_D3"), 574 + STM32_FUNCTION(4, "DFSDM_DATA2"), 575 + STM32_FUNCTION(5, "SAI4_D4"), 576 + STM32_FUNCTION(7, "SAI1_D4"), 577 + STM32_FUNCTION(10, "SPDIF_IN3"), 578 + STM32_FUNCTION(12, "ETH_GMII_RXD1 ETH_MII_RXD1 ETH_RGMII_RXD1 ETH_RMII_RXD1"), 579 + STM32_FUNCTION(13, "SAI4_D3"), 580 + STM32_FUNCTION(16, "EVENTOUT"), 581 + STM32_FUNCTION(17, "ANALOG") 582 + ), 583 + STM32_PIN( 584 + PINCTRL_PIN(38, "PC6"), 585 + STM32_FUNCTION(0, "GPIOC6"), 586 + STM32_FUNCTION(1, "HDP1"), 587 + STM32_FUNCTION(3, "TIM3_CH1"), 588 + STM32_FUNCTION(4, "TIM8_CH1"), 589 + STM32_FUNCTION(5, "DFSDM_CK3"), 590 + STM32_FUNCTION(6, "I2S2_MCK"), 591 + STM32_FUNCTION(8, "USART6_TX USART_BOOT6_TX"), 592 + STM32_FUNCTION(9, "SDMMC1_D0DIR SDMMC_BOOT1_D0DIR"), 593 + STM32_FUNCTION(10, "SDMMC2_D0DIR SDMMC_BOOT2_D0DIR"), 594 + STM32_FUNCTION(11, "SDMMC2_D6 SDMMC_BOOT2_D6"), 595 + STM32_FUNCTION(12, "DSI_TE"), 596 + STM32_FUNCTION(13, "SDMMC1_D6 SDMMC_BOOT1_D6"), 597 + STM32_FUNCTION(14, "DCMI_D0"), 598 + STM32_FUNCTION(15, "LCD_HSYNC"), 599 + STM32_FUNCTION(16, "EVENTOUT"), 600 + STM32_FUNCTION(17, "ANALOG") 601 + ), 602 + STM32_PIN( 603 + PINCTRL_PIN(39, "PC7"), 604 + STM32_FUNCTION(0, "GPIOC7"), 605 + STM32_FUNCTION(1, "HDP4"), 606 + STM32_FUNCTION(3, "TIM3_CH2"), 607 + STM32_FUNCTION(4, "TIM8_CH2"), 608 + STM32_FUNCTION(5, "DFSDM_DATA3"), 609 + STM32_FUNCTION(7, "I2S3_MCK"), 610 + STM32_FUNCTION(8, "USART6_RX USART_BOOT6_RX"), 611 + STM32_FUNCTION(9, "SDMMC1_D123DIR SDMMC_BOOT1_D123DIR"), 612 + STM32_FUNCTION(10, "SDMMC2_D123DIR SDMMC_BOOT2_D123DIR"), 613 + STM32_FUNCTION(11, "SDMMC2_D7 SDMMC_BOOT2_D7"), 614 + STM32_FUNCTION(13, "SDMMC1_D7 SDMMC_BOOT1_D7"), 615 + STM32_FUNCTION(14, "DCMI_D1"), 616 + STM32_FUNCTION(15, "LCD_G6"), 617 + STM32_FUNCTION(16, "EVENTOUT"), 618 + STM32_FUNCTION(17, "ANALOG") 619 + ), 620 + STM32_PIN( 621 + PINCTRL_PIN(40, "PC8"), 622 + STM32_FUNCTION(0, "GPIOC8"), 623 + STM32_FUNCTION(1, "TRACED0"), 624 + STM32_FUNCTION(3, "TIM3_CH3"), 625 + STM32_FUNCTION(4, "TIM8_CH3"), 626 + STM32_FUNCTION(7, "UART4_TX"), 627 + STM32_FUNCTION(8, "USART6_CK USART_BOOT6_CK"), 628 + STM32_FUNCTION(9, "UART5_RTS UART_BOOT5_RTS"), 629 + STM32_FUNCTION(13, "SDMMC1_D0 SDMMC_BOOT1_D0"), 630 + STM32_FUNCTION(14, "DCMI_D2"), 631 + STM32_FUNCTION(16, "EVENTOUT"), 632 + STM32_FUNCTION(17, "ANALOG") 633 + ), 634 + STM32_PIN( 635 + PINCTRL_PIN(41, "PC9"), 636 + STM32_FUNCTION(0, "GPIOC9"), 637 + STM32_FUNCTION(1, "TRACED1"), 638 + STM32_FUNCTION(3, "TIM3_CH4"), 639 + STM32_FUNCTION(4, "TIM8_CH4"), 640 + STM32_FUNCTION(5, "I2C3_SDA"), 641 + STM32_FUNCTION(6, "I2S_CKIN"), 642 + STM32_FUNCTION(9, "UART5_CTS UART_BOOT5_CTS"), 643 + STM32_FUNCTION(10, "QUADSPI_BK1_IO0"), 644 + STM32_FUNCTION(13, "SDMMC1_D1 SDMMC_BOOT1_D1"), 645 + STM32_FUNCTION(14, "DCMI_D3"), 646 + STM32_FUNCTION(15, "LCD_B2"), 647 + STM32_FUNCTION(16, "EVENTOUT"), 648 + STM32_FUNCTION(17, "ANALOG") 649 + ), 650 + STM32_PIN( 651 + PINCTRL_PIN(42, "PC10"), 652 + STM32_FUNCTION(0, "GPIOC10"), 653 + STM32_FUNCTION(1, "TRACED2"), 654 + STM32_FUNCTION(4, "DFSDM_CK5"), 655 + STM32_FUNCTION(7, "SPI3_SCK I2S3_CK"), 656 + STM32_FUNCTION(8, "USART3_TX"), 657 + STM32_FUNCTION(9, "UART4_TX"), 658 + STM32_FUNCTION(10, "QUADSPI_BK1_IO1"), 659 + STM32_FUNCTION(11, "SAI4_MCLK_B"), 660 + STM32_FUNCTION(13, "SDMMC1_D2 SDMMC_BOOT1_D2"), 661 + STM32_FUNCTION(14, "DCMI_D8"), 662 + STM32_FUNCTION(15, "LCD_R2"), 663 + STM32_FUNCTION(16, "EVENTOUT"), 664 + STM32_FUNCTION(17, "ANALOG") 665 + ), 666 + STM32_PIN( 667 + PINCTRL_PIN(43, "PC11"), 668 + STM32_FUNCTION(0, "GPIOC11"), 669 + STM32_FUNCTION(1, "TRACED3"), 670 + STM32_FUNCTION(4, "DFSDM_DATA5"), 671 + STM32_FUNCTION(7, "SPI3_MISO I2S3_SDI"), 672 + STM32_FUNCTION(8, "USART3_RX"), 673 + STM32_FUNCTION(9, "UART4_RX"), 674 + STM32_FUNCTION(10, "QUADSPI_BK2_NCS QUADSPI_BOOTBK2_NCS"), 675 + STM32_FUNCTION(11, "SAI4_SCK_B"), 676 + STM32_FUNCTION(13, "SDMMC1_D3 SDMMC_BOOT1_D3"), 677 + STM32_FUNCTION(14, "DCMI_D4"), 678 + STM32_FUNCTION(16, "EVENTOUT"), 679 + STM32_FUNCTION(17, "ANALOG") 680 + ), 681 + STM32_PIN( 682 + PINCTRL_PIN(44, "PC12"), 683 + STM32_FUNCTION(0, "GPIOC12"), 684 + STM32_FUNCTION(1, "TRACECLK"), 685 + STM32_FUNCTION(2, "MCO2"), 686 + STM32_FUNCTION(3, "SAI4_D3"), 687 + STM32_FUNCTION(7, "SPI3_MOSI I2S3_SDO"), 688 + STM32_FUNCTION(8, "USART3_CK USART_BOOT3_CK"), 689 + STM32_FUNCTION(9, "UART5_TX"), 690 + STM32_FUNCTION(11, "SAI4_SD_B"), 691 + STM32_FUNCTION(13, "SDMMC1_CK SDMMC_BOOT1_CK"), 692 + STM32_FUNCTION(14, "DCMI_D9"), 693 + STM32_FUNCTION(16, "EVENTOUT"), 694 + STM32_FUNCTION(17, "ANALOG") 695 + ), 696 + STM32_PIN( 697 + PINCTRL_PIN(45, "PC13"), 698 + STM32_FUNCTION(0, "GPIOC13"), 699 + STM32_FUNCTION(16, "EVENTOUT"), 700 + STM32_FUNCTION(17, "ANALOG") 701 + ), 702 + STM32_PIN( 703 + PINCTRL_PIN(46, "PC14"), 704 + STM32_FUNCTION(0, "GPIOC14"), 705 + STM32_FUNCTION(16, "EVENTOUT"), 706 + STM32_FUNCTION(17, "ANALOG") 707 + ), 708 + STM32_PIN( 709 + PINCTRL_PIN(47, "PC15"), 710 + STM32_FUNCTION(0, "GPIOC15"), 711 + STM32_FUNCTION(16, "EVENTOUT"), 712 + STM32_FUNCTION(17, "ANALOG") 713 + ), 714 + STM32_PIN( 715 + PINCTRL_PIN(48, "PD0"), 716 + STM32_FUNCTION(0, "GPIOD0"), 717 + STM32_FUNCTION(3, "I2C6_SDA"), 718 + STM32_FUNCTION(4, "DFSDM_CK6"), 719 + STM32_FUNCTION(5, "I2C5_SDA"), 720 + STM32_FUNCTION(7, "SAI3_SCK_A"), 721 + STM32_FUNCTION(9, "UART4_RX"), 722 + STM32_FUNCTION(10, "CAN1_RX"), 723 + STM32_FUNCTION(11, "SDMMC3_CMD"), 724 + STM32_FUNCTION(12, "DFSDM_DATA7"), 725 + STM32_FUNCTION(13, "FMC_D2"), 726 + STM32_FUNCTION(16, "EVENTOUT"), 727 + STM32_FUNCTION(17, "ANALOG") 728 + ), 729 + STM32_PIN( 730 + PINCTRL_PIN(49, "PD1"), 731 + STM32_FUNCTION(0, "GPIOD1"), 732 + STM32_FUNCTION(3, "I2C6_SCL"), 733 + STM32_FUNCTION(4, "DFSDM_DATA6"), 734 + STM32_FUNCTION(5, "I2C5_SCL"), 735 + STM32_FUNCTION(7, "SAI3_SD_A"), 736 + STM32_FUNCTION(9, "UART4_TX"), 737 + STM32_FUNCTION(10, "CAN1_TX"), 738 + STM32_FUNCTION(11, "SDMMC3_D0"), 739 + STM32_FUNCTION(12, "DFSDM_CK7"), 740 + STM32_FUNCTION(13, "FMC_D3"), 741 + STM32_FUNCTION(16, "EVENTOUT"), 742 + STM32_FUNCTION(17, "ANALOG") 743 + ), 744 + STM32_PIN( 745 + PINCTRL_PIN(50, "PD2"), 746 + STM32_FUNCTION(0, "GPIOD2"), 747 + STM32_FUNCTION(3, "TIM3_ETR"), 748 + STM32_FUNCTION(5, "I2C5_SMBA"), 749 + STM32_FUNCTION(7, "UART4_RX"), 750 + STM32_FUNCTION(9, "UART5_RX"), 751 + STM32_FUNCTION(13, "SDMMC1_CMD SDMMC_BOOT1_CMD"), 752 + STM32_FUNCTION(14, "DCMI_D11"), 753 + STM32_FUNCTION(16, "EVENTOUT"), 754 + STM32_FUNCTION(17, "ANALOG") 755 + ), 756 + STM32_PIN( 757 + PINCTRL_PIN(51, "PD3"), 758 + STM32_FUNCTION(0, "GPIOD3"), 759 + STM32_FUNCTION(1, "HDP5"), 760 + STM32_FUNCTION(4, "DFSDM_CKOUT"), 761 + STM32_FUNCTION(6, "SPI2_SCK I2S2_CK"), 762 + STM32_FUNCTION(7, "DFSDM_DATA0"), 763 + STM32_FUNCTION(8, "USART2_CTS_NSS USART_BOOT2_CTS_NSS"), 764 + STM32_FUNCTION(9, "SDMMC1_D123DIR SDMMC_BOOT1_D123DIR"), 765 + STM32_FUNCTION(10, "SDMMC2_D7 SDMMC_BOOT2_D7"), 766 + STM32_FUNCTION(11, "SDMMC2_D123DIR SDMMC_BOOT2_D123DIR"), 767 + STM32_FUNCTION(12, "SDMMC1_D7 SDMMC_BOOT1_D7"), 768 + STM32_FUNCTION(13, "FMC_CLK"), 769 + STM32_FUNCTION(14, "DCMI_D5"), 770 + STM32_FUNCTION(15, "LCD_G7"), 771 + STM32_FUNCTION(16, "EVENTOUT"), 772 + STM32_FUNCTION(17, "ANALOG") 773 + ), 774 + STM32_PIN( 775 + PINCTRL_PIN(52, "PD4"), 776 + STM32_FUNCTION(0, "GPIOD4"), 777 + STM32_FUNCTION(7, "SAI3_FS_A"), 778 + STM32_FUNCTION(8, "USART2_RTS USART_BOOT2_RTS"), 779 + STM32_FUNCTION(10, "CAN1_RXFD"), 780 + STM32_FUNCTION(11, "SDMMC3_D1"), 781 + STM32_FUNCTION(12, "DFSDM_CK0"), 782 + STM32_FUNCTION(13, "FMC_NOE"), 783 + STM32_FUNCTION(16, "EVENTOUT"), 784 + STM32_FUNCTION(17, "ANALOG") 785 + ), 786 + STM32_PIN( 787 + PINCTRL_PIN(53, "PD5"), 788 + STM32_FUNCTION(0, "GPIOD5"), 789 + STM32_FUNCTION(8, "USART2_TX"), 790 + STM32_FUNCTION(10, "CAN1_TXFD"), 791 + STM32_FUNCTION(11, "SDMMC3_D2"), 792 + STM32_FUNCTION(13, "FMC_NWE"), 793 + STM32_FUNCTION(16, "EVENTOUT"), 794 + STM32_FUNCTION(17, "ANALOG") 795 + ), 796 + STM32_PIN( 797 + PINCTRL_PIN(54, "PD6"), 798 + STM32_FUNCTION(0, "GPIOD6"), 799 + STM32_FUNCTION(2, "TIM16_CH1N"), 800 + STM32_FUNCTION(3, "SAI1_D1"), 801 + STM32_FUNCTION(4, "DFSDM_CK4"), 802 + STM32_FUNCTION(5, "DFSDM_DATA1"), 803 + STM32_FUNCTION(6, "SPI3_MOSI I2S3_SDO"), 804 + STM32_FUNCTION(7, "SAI1_SD_A"), 805 + STM32_FUNCTION(8, "USART2_RX"), 806 + STM32_FUNCTION(10, "CAN2_RXFD"), 807 + STM32_FUNCTION(11, "FMC_INT"), 808 + STM32_FUNCTION(13, "FMC_NWAIT"), 809 + STM32_FUNCTION(14, "DCMI_D10"), 810 + STM32_FUNCTION(15, "LCD_B2"), 811 + STM32_FUNCTION(16, "EVENTOUT"), 812 + STM32_FUNCTION(17, "ANALOG") 813 + ), 814 + STM32_PIN( 815 + PINCTRL_PIN(55, "PD7"), 816 + STM32_FUNCTION(0, "GPIOD7"), 817 + STM32_FUNCTION(1, "TRACED6"), 818 + STM32_FUNCTION(4, "DFSDM_DATA4"), 819 + STM32_FUNCTION(5, "I2C2_SCL"), 820 + STM32_FUNCTION(7, "DFSDM_CK1"), 821 + STM32_FUNCTION(8, "USART2_CK USART_BOOT2_CK"), 822 + STM32_FUNCTION(10, "SPDIF_IN0"), 823 + STM32_FUNCTION(11, "SDMMC3_D3"), 824 + STM32_FUNCTION(13, "FMC_NE1"), 825 + STM32_FUNCTION(16, "EVENTOUT"), 826 + STM32_FUNCTION(17, "ANALOG") 827 + ), 828 + STM32_PIN( 829 + PINCTRL_PIN(56, "PD8"), 830 + STM32_FUNCTION(0, "GPIOD8"), 831 + STM32_FUNCTION(4, "DFSDM_CK3"), 832 + STM32_FUNCTION(7, "SAI3_SCK_B"), 833 + STM32_FUNCTION(8, "USART3_TX"), 834 + STM32_FUNCTION(10, "SPDIF_IN1"), 835 + STM32_FUNCTION(13, "FMC_D13"), 836 + STM32_FUNCTION(15, "LCD_B7"), 837 + STM32_FUNCTION(16, "EVENTOUT"), 838 + STM32_FUNCTION(17, "ANALOG") 839 + ), 840 + STM32_PIN( 841 + PINCTRL_PIN(57, "PD9"), 842 + STM32_FUNCTION(0, "GPIOD9"), 843 + STM32_FUNCTION(4, "DFSDM_DATA3"), 844 + STM32_FUNCTION(7, "SAI3_SD_B"), 845 + STM32_FUNCTION(8, "USART3_RX"), 846 + STM32_FUNCTION(10, "CAN2_RXFD"), 847 + STM32_FUNCTION(13, "FMC_D14"), 848 + STM32_FUNCTION(15, "LCD_B0"), 849 + STM32_FUNCTION(16, "EVENTOUT"), 850 + STM32_FUNCTION(17, "ANALOG") 851 + ), 852 + STM32_PIN( 853 + PINCTRL_PIN(58, "PD10"), 854 + STM32_FUNCTION(0, "GPIOD10"), 855 + STM32_FUNCTION(1, "RTC_REFIN"), 856 + STM32_FUNCTION(2, "TIM16_BKIN"), 857 + STM32_FUNCTION(4, "DFSDM_CKOUT"), 858 + STM32_FUNCTION(5, "I2C5_SMBA"), 859 + STM32_FUNCTION(6, "SPI3_MISO I2S3_SDI"), 860 + STM32_FUNCTION(7, "SAI3_FS_B"), 861 + STM32_FUNCTION(8, "USART3_CK USART_BOOT3_CK"), 862 + STM32_FUNCTION(10, "CAN2_TXFD"), 863 + STM32_FUNCTION(13, "FMC_D15"), 864 + STM32_FUNCTION(15, "LCD_B3"), 865 + STM32_FUNCTION(16, "EVENTOUT"), 866 + STM32_FUNCTION(17, "ANALOG") 867 + ), 868 + STM32_PIN( 869 + PINCTRL_PIN(59, "PD11"), 870 + STM32_FUNCTION(0, "GPIOD11"), 871 + STM32_FUNCTION(4, "LPTIM2_IN2"), 872 + STM32_FUNCTION(5, "I2C4_SMBA"), 873 + STM32_FUNCTION(6, "I2C1_SMBA"), 874 + STM32_FUNCTION(8, "USART3_CTS_NSS USART_BOOT3_CTS_NSS"), 875 + STM32_FUNCTION(10, "QUADSPI_BK1_IO0"), 876 + STM32_FUNCTION(11, "SAI2_SD_A"), 877 + STM32_FUNCTION(13, "FMC_A16 FMC_CLE"), 878 + STM32_FUNCTION(16, "EVENTOUT"), 879 + STM32_FUNCTION(17, "ANALOG") 880 + ), 881 + STM32_PIN( 882 + PINCTRL_PIN(60, "PD12"), 883 + STM32_FUNCTION(0, "GPIOD12"), 884 + STM32_FUNCTION(2, "LPTIM1_IN1"), 885 + STM32_FUNCTION(3, "TIM4_CH1"), 886 + STM32_FUNCTION(4, "LPTIM2_IN1"), 887 + STM32_FUNCTION(5, "I2C4_SCL"), 888 + STM32_FUNCTION(6, "I2C1_SCL"), 889 + STM32_FUNCTION(8, "USART3_RTS USART_BOOT3_RTS"), 890 + STM32_FUNCTION(10, "QUADSPI_BK1_IO1"), 891 + STM32_FUNCTION(11, "SAI2_FS_A"), 892 + STM32_FUNCTION(13, "FMC_A17 FMC_ALE"), 893 + STM32_FUNCTION(16, "EVENTOUT"), 894 + STM32_FUNCTION(17, "ANALOG") 895 + ), 896 + STM32_PIN( 897 + PINCTRL_PIN(61, "PD13"), 898 + STM32_FUNCTION(0, "GPIOD13"), 899 + STM32_FUNCTION(2, "LPTIM1_OUT"), 900 + STM32_FUNCTION(3, "TIM4_CH2"), 901 + STM32_FUNCTION(5, "I2C4_SDA"), 902 + STM32_FUNCTION(6, "I2C1_SDA"), 903 + STM32_FUNCTION(7, "I2S3_MCK"), 904 + STM32_FUNCTION(10, "QUADSPI_BK1_IO3 QUADSPI_BOOTBK1_IO3"), 905 + STM32_FUNCTION(11, "SAI2_SCK_A"), 906 + STM32_FUNCTION(13, "FMC_A18"), 907 + STM32_FUNCTION(14, "DSI_TE"), 908 + STM32_FUNCTION(16, "EVENTOUT"), 909 + STM32_FUNCTION(17, "ANALOG") 910 + ), 911 + STM32_PIN( 912 + PINCTRL_PIN(62, "PD14"), 913 + STM32_FUNCTION(0, "GPIOD14"), 914 + STM32_FUNCTION(3, "TIM4_CH3"), 915 + STM32_FUNCTION(7, "SAI3_MCLK_B"), 916 + STM32_FUNCTION(9, "UART8_CTS UART_BOOT8_CTS"), 917 + STM32_FUNCTION(13, "FMC_D0"), 918 + STM32_FUNCTION(16, "EVENTOUT"), 919 + STM32_FUNCTION(17, "ANALOG") 920 + ), 921 + STM32_PIN( 922 + PINCTRL_PIN(63, "PD15"), 923 + STM32_FUNCTION(0, "GPIOD15"), 924 + STM32_FUNCTION(3, "TIM4_CH4"), 925 + STM32_FUNCTION(7, "SAI3_MCLK_A"), 926 + STM32_FUNCTION(9, "UART8_CTS UART_BOOT8_CTS"), 927 + STM32_FUNCTION(13, "FMC_D1"), 928 + STM32_FUNCTION(16, "EVENTOUT"), 929 + STM32_FUNCTION(17, "ANALOG") 930 + ), 931 + STM32_PIN( 932 + PINCTRL_PIN(64, "PE0"), 933 + STM32_FUNCTION(0, "GPIOE0"), 934 + STM32_FUNCTION(2, "LPTIM1_ETR"), 935 + STM32_FUNCTION(3, "TIM4_ETR"), 936 + STM32_FUNCTION(5, "LPTIM2_ETR"), 937 + STM32_FUNCTION(6, "SPI3_SCK I2S3_CK"), 938 + STM32_FUNCTION(7, "SAI4_MCLK_B"), 939 + STM32_FUNCTION(9, "UART8_RX UART_BOOT8_RX"), 940 + STM32_FUNCTION(10, "CAN1_RXFD"), 941 + STM32_FUNCTION(11, "SAI2_MCLK_A"), 942 + STM32_FUNCTION(13, "FMC_NBL0"), 943 + STM32_FUNCTION(14, "DCMI_D2"), 944 + STM32_FUNCTION(16, "EVENTOUT"), 945 + STM32_FUNCTION(17, "ANALOG") 946 + ), 947 + STM32_PIN( 948 + PINCTRL_PIN(65, "PE1"), 949 + STM32_FUNCTION(0, "GPIOE1"), 950 + STM32_FUNCTION(2, "LPTIM1_IN2"), 951 + STM32_FUNCTION(6, "I2S2_MCK"), 952 + STM32_FUNCTION(7, "SAI3_SD_B"), 953 + STM32_FUNCTION(9, "UART8_TX UART_BOOT8_TX"), 954 + STM32_FUNCTION(10, "CAN1_TXFD"), 955 + STM32_FUNCTION(13, "FMC_NBL1"), 956 + STM32_FUNCTION(14, "DCMI_D3"), 957 + STM32_FUNCTION(16, "EVENTOUT"), 958 + STM32_FUNCTION(17, "ANALOG") 959 + ), 960 + STM32_PIN( 961 + PINCTRL_PIN(66, "PE2"), 962 + STM32_FUNCTION(0, "GPIOE2"), 963 + STM32_FUNCTION(1, "TRACECLK"), 964 + STM32_FUNCTION(3, "SAI1_CK1"), 965 + STM32_FUNCTION(5, "I2C4_SCL"), 966 + STM32_FUNCTION(6, "SPI4_SCK"), 967 + STM32_FUNCTION(7, "SAI1_MCLK_A"), 968 + STM32_FUNCTION(10, "QUADSPI_BK1_IO2 QUADSPI_BOOTBK1_IO2"), 969 + STM32_FUNCTION(12, "ETH_GMII_TXD3 ETH_MII_TXD3 ETH_RGMII_TXD3"), 970 + STM32_FUNCTION(13, "FMC_A23"), 971 + STM32_FUNCTION(16, "EVENTOUT"), 972 + STM32_FUNCTION(17, "ANALOG") 973 + ), 974 + STM32_PIN( 975 + PINCTRL_PIN(67, "PE3"), 976 + STM32_FUNCTION(0, "GPIOE3"), 977 + STM32_FUNCTION(1, "TRACED0"), 978 + STM32_FUNCTION(5, "TIM15_BKIN"), 979 + STM32_FUNCTION(7, "SAI1_SD_B"), 980 + STM32_FUNCTION(10, "SDMMC2_CK SDMMC_BOOT2_CK"), 981 + STM32_FUNCTION(13, "FMC_A19"), 982 + STM32_FUNCTION(16, "EVENTOUT"), 983 + STM32_FUNCTION(17, "ANALOG") 984 + ), 985 + STM32_PIN( 986 + PINCTRL_PIN(68, "PE4"), 987 + STM32_FUNCTION(0, "GPIOE4"), 988 + STM32_FUNCTION(1, "TRACED1"), 989 + STM32_FUNCTION(3, "SAI1_D2"), 990 + STM32_FUNCTION(4, "DFSDM_DATA3"), 991 + STM32_FUNCTION(5, "TIM15_CH1N"), 992 + STM32_FUNCTION(6, "SPI4_NSS"), 993 + STM32_FUNCTION(7, "SAI1_FS_A"), 994 + STM32_FUNCTION(8, "SDMMC2_CKIN SDMMC_BOOT2_CKIN"), 995 + STM32_FUNCTION(9, "SDMMC1_CKIN SDMMC_BOOT1_CKIN"), 996 + STM32_FUNCTION(10, "SDMMC2_D4 SDMMC_BOOT2_D4"), 997 + STM32_FUNCTION(12, "SDMMC1_D4 SDMMC_BOOT1_D4"), 998 + STM32_FUNCTION(13, "FMC_A20"), 999 + STM32_FUNCTION(14, "DCMI_D4"), 1000 + STM32_FUNCTION(15, "LCD_B0"), 1001 + STM32_FUNCTION(16, "EVENTOUT"), 1002 + STM32_FUNCTION(17, "ANALOG") 1003 + ), 1004 + STM32_PIN( 1005 + PINCTRL_PIN(69, "PE5"), 1006 + STM32_FUNCTION(0, "GPIOE5"), 1007 + STM32_FUNCTION(1, "TRACED3"), 1008 + STM32_FUNCTION(3, "SAI1_CK2"), 1009 + STM32_FUNCTION(4, "DFSDM_CK3"), 1010 + STM32_FUNCTION(5, "TIM15_CH1"), 1011 + STM32_FUNCTION(6, "SPI4_MISO"), 1012 + STM32_FUNCTION(7, "SAI1_SCK_A"), 1013 + STM32_FUNCTION(8, "SDMMC2_D0DIR SDMMC_BOOT2_D0DIR"), 1014 + STM32_FUNCTION(9, "SDMMC1_D0DIR SDMMC_BOOT1_D0DIR"), 1015 + STM32_FUNCTION(10, "SDMMC2_D6 SDMMC_BOOT2_D6"), 1016 + STM32_FUNCTION(12, "SDMMC1_D6 SDMMC_BOOT1_D6"), 1017 + STM32_FUNCTION(13, "FMC_A21"), 1018 + STM32_FUNCTION(14, "DCMI_D6"), 1019 + STM32_FUNCTION(15, "LCD_G0"), 1020 + STM32_FUNCTION(16, "EVENTOUT"), 1021 + STM32_FUNCTION(17, "ANALOG") 1022 + ), 1023 + STM32_PIN( 1024 + PINCTRL_PIN(70, "PE6"), 1025 + STM32_FUNCTION(0, "GPIOE6"), 1026 + STM32_FUNCTION(1, "TRACED2"), 1027 + STM32_FUNCTION(2, "TIM1_BKIN2"), 1028 + STM32_FUNCTION(3, "SAI1_D1"), 1029 + STM32_FUNCTION(5, "TIM15_CH2"), 1030 + STM32_FUNCTION(6, "SPI4_MOSI"), 1031 + STM32_FUNCTION(7, "SAI1_SD_A"), 1032 + STM32_FUNCTION(8, "SDMMC2_D0"), 1033 + STM32_FUNCTION(9, "SDMMC1_D2 SDMMC_BOOT1_D2"), 1034 + STM32_FUNCTION(11, "SAI2_MCLK_B"), 1035 + STM32_FUNCTION(13, "FMC_A22"), 1036 + STM32_FUNCTION(14, "DCMI_D7"), 1037 + STM32_FUNCTION(15, "LCD_G1"), 1038 + STM32_FUNCTION(16, "EVENTOUT"), 1039 + STM32_FUNCTION(17, "ANALOG") 1040 + ), 1041 + STM32_PIN( 1042 + PINCTRL_PIN(71, "PE7"), 1043 + STM32_FUNCTION(0, "GPIOE7"), 1044 + STM32_FUNCTION(2, "TIM1_ETR"), 1045 + STM32_FUNCTION(3, "TIM3_ETR"), 1046 + STM32_FUNCTION(4, "DFSDM_DATA2"), 1047 + STM32_FUNCTION(8, "UART7_RX"), 1048 + STM32_FUNCTION(11, "QUADSPI_BK2_IO0 QUADSPI_BOOTBK2_IO0"), 1049 + STM32_FUNCTION(13, "FMC_D4"), 1050 + STM32_FUNCTION(16, "EVENTOUT"), 1051 + STM32_FUNCTION(17, "ANALOG") 1052 + ), 1053 + STM32_PIN( 1054 + PINCTRL_PIN(72, "PE8"), 1055 + STM32_FUNCTION(0, "GPIOE8"), 1056 + STM32_FUNCTION(2, "TIM1_CH1N"), 1057 + STM32_FUNCTION(4, "DFSDM_CK2"), 1058 + STM32_FUNCTION(8, "UART7_TX"), 1059 + STM32_FUNCTION(11, "QUADSPI_BK2_IO1 QUADSPI_BOOTBK2_IO1"), 1060 + STM32_FUNCTION(13, "FMC_D5"), 1061 + STM32_FUNCTION(16, "EVENTOUT"), 1062 + STM32_FUNCTION(17, "ANALOG") 1063 + ), 1064 + STM32_PIN( 1065 + PINCTRL_PIN(73, "PE9"), 1066 + STM32_FUNCTION(0, "GPIOE9"), 1067 + STM32_FUNCTION(2, "TIM1_CH1"), 1068 + STM32_FUNCTION(4, "DFSDM_CKOUT"), 1069 + STM32_FUNCTION(8, "UART7_RTS UART_BOOT7_RTS"), 1070 + STM32_FUNCTION(11, "QUADSPI_BK2_IO2 QUADSPI_BOOTBK2_IO2"), 1071 + STM32_FUNCTION(13, "FMC_D6"), 1072 + STM32_FUNCTION(16, "EVENTOUT"), 1073 + STM32_FUNCTION(17, "ANALOG") 1074 + ), 1075 + STM32_PIN( 1076 + PINCTRL_PIN(74, "PE10"), 1077 + STM32_FUNCTION(0, "GPIOE10"), 1078 + STM32_FUNCTION(2, "TIM1_CH2N"), 1079 + STM32_FUNCTION(4, "DFSDM_DATA4"), 1080 + STM32_FUNCTION(8, "UART7_CTS UART_BOOT7_CTS"), 1081 + STM32_FUNCTION(11, "QUADSPI_BK2_IO3 QUADSPI_BOOTBK2_IO3"), 1082 + STM32_FUNCTION(13, "FMC_D7"), 1083 + STM32_FUNCTION(16, "EVENTOUT"), 1084 + STM32_FUNCTION(17, "ANALOG") 1085 + ), 1086 + STM32_PIN( 1087 + PINCTRL_PIN(75, "PE11"), 1088 + STM32_FUNCTION(0, "GPIOE11"), 1089 + STM32_FUNCTION(2, "TIM1_CH2"), 1090 + STM32_FUNCTION(4, "DFSDM_CK4"), 1091 + STM32_FUNCTION(6, "SPI4_NSS"), 1092 + STM32_FUNCTION(8, "USART6_CK USART_BOOT6_CK"), 1093 + STM32_FUNCTION(11, "SAI2_SD_B"), 1094 + STM32_FUNCTION(13, "FMC_D8"), 1095 + STM32_FUNCTION(15, "LCD_G3"), 1096 + STM32_FUNCTION(16, "EVENTOUT"), 1097 + STM32_FUNCTION(17, "ANALOG") 1098 + ), 1099 + STM32_PIN( 1100 + PINCTRL_PIN(76, "PE12"), 1101 + STM32_FUNCTION(0, "GPIOE12"), 1102 + STM32_FUNCTION(2, "TIM1_CH3N"), 1103 + STM32_FUNCTION(4, "DFSDM_DATA5"), 1104 + STM32_FUNCTION(6, "SPI4_SCK"), 1105 + STM32_FUNCTION(9, "SDMMC1_D0DIR SDMMC_BOOT1_D0DIR"), 1106 + STM32_FUNCTION(11, "SAI2_SCK_B"), 1107 + STM32_FUNCTION(13, "FMC_D9"), 1108 + STM32_FUNCTION(15, "LCD_B4"), 1109 + STM32_FUNCTION(16, "EVENTOUT"), 1110 + STM32_FUNCTION(17, "ANALOG") 1111 + ), 1112 + STM32_PIN( 1113 + PINCTRL_PIN(77, "PE13"), 1114 + STM32_FUNCTION(0, "GPIOE13"), 1115 + STM32_FUNCTION(1, "HDP2"), 1116 + STM32_FUNCTION(2, "TIM1_CH3"), 1117 + STM32_FUNCTION(4, "DFSDM_CK5"), 1118 + STM32_FUNCTION(6, "SPI4_MISO"), 1119 + STM32_FUNCTION(11, "SAI2_FS_B"), 1120 + STM32_FUNCTION(13, "FMC_D10"), 1121 + STM32_FUNCTION(15, "LCD_DE"), 1122 + STM32_FUNCTION(16, "EVENTOUT"), 1123 + STM32_FUNCTION(17, "ANALOG") 1124 + ), 1125 + STM32_PIN( 1126 + PINCTRL_PIN(78, "PE14"), 1127 + STM32_FUNCTION(0, "GPIOE14"), 1128 + STM32_FUNCTION(2, "TIM1_CH4"), 1129 + STM32_FUNCTION(6, "SPI4_MOSI"), 1130 + STM32_FUNCTION(9, "UART8_RTS UART_BOOT8_RTS"), 1131 + STM32_FUNCTION(11, "SAI2_MCLK_B"), 1132 + STM32_FUNCTION(12, "SDMMC1_D123DIR SDMMC_BOOT1_D123DIR"), 1133 + STM32_FUNCTION(13, "FMC_D11"), 1134 + STM32_FUNCTION(14, "LCD_G0"), 1135 + STM32_FUNCTION(15, "LCD_CLK"), 1136 + STM32_FUNCTION(16, "EVENTOUT"), 1137 + STM32_FUNCTION(17, "ANALOG") 1138 + ), 1139 + STM32_PIN( 1140 + PINCTRL_PIN(79, "PE15"), 1141 + STM32_FUNCTION(0, "GPIOE15"), 1142 + STM32_FUNCTION(1, "HDP3"), 1143 + STM32_FUNCTION(2, "TIM1_BKIN"), 1144 + STM32_FUNCTION(5, "TIM15_BKIN"), 1145 + STM32_FUNCTION(8, "USART2_CTS_NSS USART_BOOT2_CTS_NSS"), 1146 + STM32_FUNCTION(9, "UART8_CTS UART_BOOT8_CTS"), 1147 + STM32_FUNCTION(13, "FMC_D12"), 1148 + STM32_FUNCTION(15, "LCD_R7"), 1149 + STM32_FUNCTION(16, "EVENTOUT"), 1150 + STM32_FUNCTION(17, "ANALOG") 1151 + ), 1152 + STM32_PIN( 1153 + PINCTRL_PIN(80, "PF0"), 1154 + STM32_FUNCTION(0, "GPIOF0"), 1155 + STM32_FUNCTION(5, "I2C2_SDA"), 1156 + STM32_FUNCTION(10, "SDMMC3_D0"), 1157 + STM32_FUNCTION(11, "SDMMC3_CKIN"), 1158 + STM32_FUNCTION(13, "FMC_A0"), 1159 + STM32_FUNCTION(16, "EVENTOUT"), 1160 + STM32_FUNCTION(17, "ANALOG") 1161 + ), 1162 + STM32_PIN( 1163 + PINCTRL_PIN(81, "PF1"), 1164 + STM32_FUNCTION(0, "GPIOF1"), 1165 + STM32_FUNCTION(5, "I2C2_SCL"), 1166 + STM32_FUNCTION(10, "SDMMC3_CMD"), 1167 + STM32_FUNCTION(11, "SDMMC3_CDIR"), 1168 + STM32_FUNCTION(13, "FMC_A1"), 1169 + STM32_FUNCTION(16, "EVENTOUT"), 1170 + STM32_FUNCTION(17, "ANALOG") 1171 + ), 1172 + STM32_PIN( 1173 + PINCTRL_PIN(82, "PF2"), 1174 + STM32_FUNCTION(0, "GPIOF2"), 1175 + STM32_FUNCTION(5, "I2C2_SMBA"), 1176 + STM32_FUNCTION(10, "SDMMC2_D0DIR SDMMC_BOOT2_D0DIR"), 1177 + STM32_FUNCTION(11, "SDMMC3_D0DIR"), 1178 + STM32_FUNCTION(12, "SDMMC1_D0DIR SDMMC_BOOT1_D0DIR"), 1179 + STM32_FUNCTION(13, "FMC_A2"), 1180 + STM32_FUNCTION(16, "EVENTOUT"), 1181 + STM32_FUNCTION(17, "ANALOG") 1182 + ), 1183 + STM32_PIN( 1184 + PINCTRL_PIN(83, "PF3"), 1185 + STM32_FUNCTION(0, "GPIOF3"), 1186 + STM32_FUNCTION(12, "ETH_GMII_TX_ER ETH_MII_TX_ER"), 1187 + STM32_FUNCTION(13, "FMC_A3"), 1188 + STM32_FUNCTION(16, "EVENTOUT"), 1189 + STM32_FUNCTION(17, "ANALOG") 1190 + ), 1191 + STM32_PIN( 1192 + PINCTRL_PIN(84, "PF4"), 1193 + STM32_FUNCTION(0, "GPIOF4"), 1194 + STM32_FUNCTION(8, "USART2_RX"), 1195 + STM32_FUNCTION(10, "SDMMC3_D1"), 1196 + STM32_FUNCTION(11, "SDMMC3_D123DIR"), 1197 + STM32_FUNCTION(13, "FMC_A4"), 1198 + STM32_FUNCTION(16, "EVENTOUT"), 1199 + STM32_FUNCTION(17, "ANALOG") 1200 + ), 1201 + STM32_PIN( 1202 + PINCTRL_PIN(85, "PF5"), 1203 + STM32_FUNCTION(0, "GPIOF5"), 1204 + STM32_FUNCTION(8, "USART2_TX"), 1205 + STM32_FUNCTION(10, "SDMMC3_D2"), 1206 + STM32_FUNCTION(13, "FMC_A5"), 1207 + STM32_FUNCTION(16, "EVENTOUT"), 1208 + STM32_FUNCTION(17, "ANALOG") 1209 + ), 1210 + STM32_PIN( 1211 + PINCTRL_PIN(86, "PF6"), 1212 + STM32_FUNCTION(0, "GPIOF6"), 1213 + STM32_FUNCTION(2, "TIM16_CH1"), 1214 + STM32_FUNCTION(6, "SPI5_NSS"), 1215 + STM32_FUNCTION(7, "SAI1_SD_B"), 1216 + STM32_FUNCTION(8, "UART7_RX UART_BOOT7_RX"), 1217 + STM32_FUNCTION(10, "QUADSPI_BK1_IO3 QUADSPI_BOOTBK1_IO3"), 1218 + STM32_FUNCTION(13, "SAI4_SCK_B"), 1219 + STM32_FUNCTION(16, "EVENTOUT"), 1220 + STM32_FUNCTION(17, "ANALOG") 1221 + ), 1222 + STM32_PIN( 1223 + PINCTRL_PIN(87, "PF7"), 1224 + STM32_FUNCTION(0, "GPIOF7"), 1225 + STM32_FUNCTION(2, "TIM17_CH1"), 1226 + STM32_FUNCTION(6, "SPI5_SCK"), 1227 + STM32_FUNCTION(7, "SAI1_MCLK_B"), 1228 + STM32_FUNCTION(8, "UART7_TX UART_BOOT7_TX"), 1229 + STM32_FUNCTION(10, "QUADSPI_BK1_IO2 QUADSPI_BOOTBK1_IO2"), 1230 + STM32_FUNCTION(16, "EVENTOUT"), 1231 + STM32_FUNCTION(17, "ANALOG") 1232 + ), 1233 + STM32_PIN( 1234 + PINCTRL_PIN(88, "PF8"), 1235 + STM32_FUNCTION(0, "GPIOF8"), 1236 + STM32_FUNCTION(1, "TRACED12"), 1237 + STM32_FUNCTION(2, "TIM16_CH1N"), 1238 + STM32_FUNCTION(6, "SPI5_MISO"), 1239 + STM32_FUNCTION(7, "SAI1_SCK_B"), 1240 + STM32_FUNCTION(8, "UART7_RTS UART_BOOT7_RTS"), 1241 + STM32_FUNCTION(10, "TIM13_CH1"), 1242 + STM32_FUNCTION(11, "QUADSPI_BK1_IO0 QUADSPI_BOOTBK1_IO0"), 1243 + STM32_FUNCTION(16, "EVENTOUT"), 1244 + STM32_FUNCTION(17, "ANALOG") 1245 + ), 1246 + STM32_PIN( 1247 + PINCTRL_PIN(89, "PF9"), 1248 + STM32_FUNCTION(0, "GPIOF9"), 1249 + STM32_FUNCTION(1, "TRACED13"), 1250 + STM32_FUNCTION(2, "TIM17_CH1N"), 1251 + STM32_FUNCTION(6, "SPI5_MOSI"), 1252 + STM32_FUNCTION(7, "SAI1_FS_B"), 1253 + STM32_FUNCTION(8, "UART7_CTS UART_BOOT7_CTS"), 1254 + STM32_FUNCTION(10, "TIM14_CH1"), 1255 + STM32_FUNCTION(11, "QUADSPI_BK1_IO1 QUADSPI_BOOTBK1_IO1"), 1256 + STM32_FUNCTION(16, "EVENTOUT"), 1257 + STM32_FUNCTION(17, "ANALOG") 1258 + ), 1259 + STM32_PIN( 1260 + PINCTRL_PIN(90, "PF10"), 1261 + STM32_FUNCTION(0, "GPIOF10"), 1262 + STM32_FUNCTION(2, "TIM16_BKIN"), 1263 + STM32_FUNCTION(3, "SAI1_D3"), 1264 + STM32_FUNCTION(4, "SAI4_D4"), 1265 + STM32_FUNCTION(7, "SAI1_D4"), 1266 + STM32_FUNCTION(10, "QUADSPI_CLK QUADSPI_BOOTCLK"), 1267 + STM32_FUNCTION(13, "SAI4_D3"), 1268 + STM32_FUNCTION(14, "DCMI_D11"), 1269 + STM32_FUNCTION(15, "LCD_DE"), 1270 + STM32_FUNCTION(16, "EVENTOUT"), 1271 + STM32_FUNCTION(17, "ANALOG") 1272 + ), 1273 + STM32_PIN( 1274 + PINCTRL_PIN(91, "PF11"), 1275 + STM32_FUNCTION(0, "GPIOF11"), 1276 + STM32_FUNCTION(6, "SPI5_MOSI"), 1277 + STM32_FUNCTION(11, "SAI2_SD_B"), 1278 + STM32_FUNCTION(14, "DCMI_D12"), 1279 + STM32_FUNCTION(15, "LCD_G5"), 1280 + STM32_FUNCTION(16, "EVENTOUT"), 1281 + STM32_FUNCTION(17, "ANALOG") 1282 + ), 1283 + STM32_PIN( 1284 + PINCTRL_PIN(92, "PF12"), 1285 + STM32_FUNCTION(0, "GPIOF12"), 1286 + STM32_FUNCTION(1, "TRACED4"), 1287 + STM32_FUNCTION(12, "ETH_GMII_RXD4"), 1288 + STM32_FUNCTION(13, "FMC_A6"), 1289 + STM32_FUNCTION(16, "EVENTOUT"), 1290 + STM32_FUNCTION(17, "ANALOG") 1291 + ), 1292 + STM32_PIN( 1293 + PINCTRL_PIN(93, "PF13"), 1294 + STM32_FUNCTION(0, "GPIOF13"), 1295 + STM32_FUNCTION(1, "TRACED5"), 1296 + STM32_FUNCTION(4, "DFSDM_DATA6"), 1297 + STM32_FUNCTION(5, "I2C4_SMBA"), 1298 + STM32_FUNCTION(6, "I2C1_SMBA"), 1299 + STM32_FUNCTION(7, "DFSDM_DATA3"), 1300 + STM32_FUNCTION(12, "ETH_GMII_RXD5"), 1301 + STM32_FUNCTION(13, "FMC_A7"), 1302 + STM32_FUNCTION(16, "EVENTOUT"), 1303 + STM32_FUNCTION(17, "ANALOG") 1304 + ), 1305 + STM32_PIN( 1306 + PINCTRL_PIN(94, "PF14"), 1307 + STM32_FUNCTION(0, "GPIOF14"), 1308 + STM32_FUNCTION(1, "TRACED6"), 1309 + STM32_FUNCTION(4, "DFSDM_CK6"), 1310 + STM32_FUNCTION(5, "I2C4_SCL"), 1311 + STM32_FUNCTION(6, "I2C1_SCL"), 1312 + STM32_FUNCTION(12, "ETH_GMII_RXD6"), 1313 + STM32_FUNCTION(13, "FMC_A8"), 1314 + STM32_FUNCTION(16, "EVENTOUT"), 1315 + STM32_FUNCTION(17, "ANALOG") 1316 + ), 1317 + STM32_PIN( 1318 + PINCTRL_PIN(95, "PF15"), 1319 + STM32_FUNCTION(0, "GPIOF15"), 1320 + STM32_FUNCTION(1, "TRACED7"), 1321 + STM32_FUNCTION(5, "I2C4_SDA"), 1322 + STM32_FUNCTION(6, "I2C1_SDA"), 1323 + STM32_FUNCTION(12, "ETH_GMII_RXD7"), 1324 + STM32_FUNCTION(13, "FMC_A9"), 1325 + STM32_FUNCTION(16, "EVENTOUT"), 1326 + STM32_FUNCTION(17, "ANALOG") 1327 + ), 1328 + STM32_PIN( 1329 + PINCTRL_PIN(96, "PG0"), 1330 + STM32_FUNCTION(0, "GPIOG0"), 1331 + STM32_FUNCTION(1, "TRACED0"), 1332 + STM32_FUNCTION(4, "DFSDM_DATA0"), 1333 + STM32_FUNCTION(12, "ETH_GMII_TXD4"), 1334 + STM32_FUNCTION(13, "FMC_A10"), 1335 + STM32_FUNCTION(16, "EVENTOUT"), 1336 + STM32_FUNCTION(17, "ANALOG") 1337 + ), 1338 + STM32_PIN( 1339 + PINCTRL_PIN(97, "PG1"), 1340 + STM32_FUNCTION(0, "GPIOG1"), 1341 + STM32_FUNCTION(1, "TRACED1"), 1342 + STM32_FUNCTION(12, "ETH_GMII_TXD5"), 1343 + STM32_FUNCTION(13, "FMC_A11"), 1344 + STM32_FUNCTION(16, "EVENTOUT"), 1345 + STM32_FUNCTION(17, "ANALOG") 1346 + ), 1347 + STM32_PIN( 1348 + PINCTRL_PIN(98, "PG2"), 1349 + STM32_FUNCTION(0, "GPIOG2"), 1350 + STM32_FUNCTION(1, "TRACED2"), 1351 + STM32_FUNCTION(2, "MCO2"), 1352 + STM32_FUNCTION(4, "TIM8_BKIN"), 1353 + STM32_FUNCTION(12, "ETH_GMII_TXD6"), 1354 + STM32_FUNCTION(13, "FMC_A12"), 1355 + STM32_FUNCTION(16, "EVENTOUT"), 1356 + STM32_FUNCTION(17, "ANALOG") 1357 + ), 1358 + STM32_PIN( 1359 + PINCTRL_PIN(99, "PG3"), 1360 + STM32_FUNCTION(0, "GPIOG3"), 1361 + STM32_FUNCTION(1, "TRACED3"), 1362 + STM32_FUNCTION(4, "TIM8_BKIN2"), 1363 + STM32_FUNCTION(5, "DFSDM_CK1"), 1364 + STM32_FUNCTION(12, "ETH_GMII_TXD7"), 1365 + STM32_FUNCTION(13, "FMC_A13"), 1366 + STM32_FUNCTION(16, "EVENTOUT"), 1367 + STM32_FUNCTION(17, "ANALOG") 1368 + ), 1369 + STM32_PIN( 1370 + PINCTRL_PIN(100, "PG4"), 1371 + STM32_FUNCTION(0, "GPIOG4"), 1372 + STM32_FUNCTION(2, "TIM1_BKIN2"), 1373 + STM32_FUNCTION(12, "ETH_GMII_GTX_CLK ETH_RGMII_GTX_CLK"), 1374 + STM32_FUNCTION(13, "FMC_A14"), 1375 + STM32_FUNCTION(16, "EVENTOUT"), 1376 + STM32_FUNCTION(17, "ANALOG") 1377 + ), 1378 + STM32_PIN( 1379 + PINCTRL_PIN(101, "PG5"), 1380 + STM32_FUNCTION(0, "GPIOG5"), 1381 + STM32_FUNCTION(2, "TIM1_ETR"), 1382 + STM32_FUNCTION(12, "ETH_GMII_CLK125 ETH_RGMII_CLK125"), 1383 + STM32_FUNCTION(13, "FMC_A15"), 1384 + STM32_FUNCTION(16, "EVENTOUT"), 1385 + STM32_FUNCTION(17, "ANALOG") 1386 + ), 1387 + STM32_PIN( 1388 + PINCTRL_PIN(102, "PG6"), 1389 + STM32_FUNCTION(0, "GPIOG6"), 1390 + STM32_FUNCTION(1, "TRACED14"), 1391 + STM32_FUNCTION(2, "TIM17_BKIN"), 1392 + STM32_FUNCTION(11, "SDMMC2_CMD SDMMC_BOOT2_CMD"), 1393 + STM32_FUNCTION(14, "DCMI_D12"), 1394 + STM32_FUNCTION(15, "LCD_R7"), 1395 + STM32_FUNCTION(16, "EVENTOUT"), 1396 + STM32_FUNCTION(17, "ANALOG") 1397 + ), 1398 + STM32_PIN( 1399 + PINCTRL_PIN(103, "PG7"), 1400 + STM32_FUNCTION(0, "GPIOG7"), 1401 + STM32_FUNCTION(1, "TRACED5"), 1402 + STM32_FUNCTION(7, "SAI1_MCLK_A"), 1403 + STM32_FUNCTION(8, "USART6_CK USART_BOOT6_CK"), 1404 + STM32_FUNCTION(9, "UART8_RTS UART_BOOT8_RTS"), 1405 + STM32_FUNCTION(10, "QUADSPI_CLK"), 1406 + STM32_FUNCTION(12, "QUADSPI_BK2_IO3 QUADSPI_BOOTBK2_IO3"), 1407 + STM32_FUNCTION(13, "FMC_INT"), 1408 + STM32_FUNCTION(14, "DCMI_D13"), 1409 + STM32_FUNCTION(15, "LCD_CLK"), 1410 + STM32_FUNCTION(16, "EVENTOUT"), 1411 + STM32_FUNCTION(17, "ANALOG") 1412 + ), 1413 + STM32_PIN( 1414 + PINCTRL_PIN(104, "PG8"), 1415 + STM32_FUNCTION(0, "GPIOG8"), 1416 + STM32_FUNCTION(1, "TRACED15"), 1417 + STM32_FUNCTION(2, "TIM2_CH1 TIM2_ETR"), 1418 + STM32_FUNCTION(3, "ETH_CLK"), 1419 + STM32_FUNCTION(4, "TIM8_ETR"), 1420 + STM32_FUNCTION(6, "SPI6_NSS"), 1421 + STM32_FUNCTION(7, "SAI4_D2"), 1422 + STM32_FUNCTION(8, "USART6_RTS USART_BOOT6_RTS"), 1423 + STM32_FUNCTION(9, "USART3_RTS"), 1424 + STM32_FUNCTION(10, "SPDIF_IN2"), 1425 + STM32_FUNCTION(11, "SAI4_FS_A"), 1426 + STM32_FUNCTION(12, "ETH_PPS_OUT"), 1427 + STM32_FUNCTION(15, "LCD_G7"), 1428 + STM32_FUNCTION(16, "EVENTOUT"), 1429 + STM32_FUNCTION(17, "ANALOG") 1430 + ), 1431 + STM32_PIN( 1432 + PINCTRL_PIN(105, "PG9"), 1433 + STM32_FUNCTION(0, "GPIOG9"), 1434 + STM32_FUNCTION(1, "DBTRGO"), 1435 + STM32_FUNCTION(8, "USART6_RX"), 1436 + STM32_FUNCTION(9, "SPDIF_IN3"), 1437 + STM32_FUNCTION(10, "QUADSPI_BK2_IO2 QUADSPI_BOOTBK2_IO2"), 1438 + STM32_FUNCTION(11, "SAI2_FS_B"), 1439 + STM32_FUNCTION(13, "FMC_NE2 FMC_NCE"), 1440 + STM32_FUNCTION(14, "DCMI_VSYNC"), 1441 + STM32_FUNCTION(16, "EVENTOUT"), 1442 + STM32_FUNCTION(17, "ANALOG") 1443 + ), 1444 + STM32_PIN( 1445 + PINCTRL_PIN(106, "PG10"), 1446 + STM32_FUNCTION(0, "GPIOG10"), 1447 + STM32_FUNCTION(1, "TRACED10"), 1448 + STM32_FUNCTION(9, "UART8_CTS UART_BOOT8_CTS"), 1449 + STM32_FUNCTION(10, "LCD_G3"), 1450 + STM32_FUNCTION(11, "SAI2_SD_B"), 1451 + STM32_FUNCTION(12, "QUADSPI_BK2_IO2 QUADSPI_BOOTBK2_IO2"), 1452 + STM32_FUNCTION(13, "FMC_NE3"), 1453 + STM32_FUNCTION(14, "DCMI_D2"), 1454 + STM32_FUNCTION(15, "LCD_B2"), 1455 + STM32_FUNCTION(16, "EVENTOUT"), 1456 + STM32_FUNCTION(17, "ANALOG") 1457 + ), 1458 + STM32_PIN( 1459 + PINCTRL_PIN(107, "PG11"), 1460 + STM32_FUNCTION(0, "GPIOG11"), 1461 + STM32_FUNCTION(1, "TRACED11"), 1462 + STM32_FUNCTION(5, "USART1_TX"), 1463 + STM32_FUNCTION(7, "UART4_TX UART_BOOT4_TX"), 1464 + STM32_FUNCTION(9, "SPDIF_IN0"), 1465 + STM32_FUNCTION(12, "ETH_GMII_TX_EN ETH_MII_TX_EN ETH_RGMII_TX_CTL ETH_RMII_TX_EN"), 1466 + STM32_FUNCTION(14, "DCMI_D3"), 1467 + STM32_FUNCTION(15, "LCD_B3"), 1468 + STM32_FUNCTION(16, "EVENTOUT"), 1469 + STM32_FUNCTION(17, "ANALOG") 1470 + ), 1471 + STM32_PIN( 1472 + PINCTRL_PIN(108, "PG12"), 1473 + STM32_FUNCTION(0, "GPIOG12"), 1474 + STM32_FUNCTION(2, "LPTIM1_IN1"), 1475 + STM32_FUNCTION(6, "SPI6_MISO"), 1476 + STM32_FUNCTION(7, "SAI4_CK2"), 1477 + STM32_FUNCTION(8, "USART6_RTS USART_BOOT6_RTS"), 1478 + STM32_FUNCTION(9, "SPDIF_IN1"), 1479 + STM32_FUNCTION(10, "LCD_B4"), 1480 + STM32_FUNCTION(11, "SAI4_SCK_A"), 1481 + STM32_FUNCTION(12, "ETH_PHY_INTN"), 1482 + STM32_FUNCTION(13, "FMC_NE4"), 1483 + STM32_FUNCTION(15, "LCD_B1"), 1484 + STM32_FUNCTION(16, "EVENTOUT"), 1485 + STM32_FUNCTION(17, "ANALOG") 1486 + ), 1487 + STM32_PIN( 1488 + PINCTRL_PIN(109, "PG13"), 1489 + STM32_FUNCTION(0, "GPIOG13"), 1490 + STM32_FUNCTION(1, "TRACED0"), 1491 + STM32_FUNCTION(2, "LPTIM1_OUT"), 1492 + STM32_FUNCTION(3, "SAI1_CK2"), 1493 + STM32_FUNCTION(5, "SAI4_CK1"), 1494 + STM32_FUNCTION(6, "SPI6_SCK"), 1495 + STM32_FUNCTION(7, "SAI1_SCK_A"), 1496 + STM32_FUNCTION(8, "USART6_CTS_NSS USART_BOOT6_CTS_NSS"), 1497 + STM32_FUNCTION(11, "SAI4_MCLK_A"), 1498 + STM32_FUNCTION(12, "ETH_GMII_TXD0 ETH_MII_TXD0 ETH_RGMII_TXD0 ETH_RMII_TXD0"), 1499 + STM32_FUNCTION(13, "FMC_A24"), 1500 + STM32_FUNCTION(15, "LCD_R0"), 1501 + STM32_FUNCTION(16, "EVENTOUT"), 1502 + STM32_FUNCTION(17, "ANALOG") 1503 + ), 1504 + STM32_PIN( 1505 + PINCTRL_PIN(110, "PG14"), 1506 + STM32_FUNCTION(0, "GPIOG14"), 1507 + STM32_FUNCTION(1, "TRACED1"), 1508 + STM32_FUNCTION(2, "LPTIM1_ETR"), 1509 + STM32_FUNCTION(6, "SPI6_MOSI"), 1510 + STM32_FUNCTION(7, "SAI4_D1"), 1511 + STM32_FUNCTION(8, "USART6_TX"), 1512 + STM32_FUNCTION(10, "QUADSPI_BK2_IO3 QUADSPI_BOOTBK2_IO3"), 1513 + STM32_FUNCTION(11, "SAI4_SD_A"), 1514 + STM32_FUNCTION(12, "ETH_GMII_TXD1 ETH_MII_TXD1 ETH_RGMII_TXD1 ETH_RMII_TXD1"), 1515 + STM32_FUNCTION(13, "FMC_A25"), 1516 + STM32_FUNCTION(15, "LCD_B0"), 1517 + STM32_FUNCTION(16, "EVENTOUT"), 1518 + STM32_FUNCTION(17, "ANALOG") 1519 + ), 1520 + STM32_PIN( 1521 + PINCTRL_PIN(111, "PG15"), 1522 + STM32_FUNCTION(0, "GPIOG15"), 1523 + STM32_FUNCTION(1, "TRACED7"), 1524 + STM32_FUNCTION(3, "SAI1_D2"), 1525 + STM32_FUNCTION(5, "I2C2_SDA"), 1526 + STM32_FUNCTION(7, "SAI1_FS_A"), 1527 + STM32_FUNCTION(8, "USART6_CTS_NSS USART_BOOT6_CTS_NSS"), 1528 + STM32_FUNCTION(11, "SDMMC3_CK"), 1529 + STM32_FUNCTION(14, "DCMI_D13"), 1530 + STM32_FUNCTION(16, "EVENTOUT"), 1531 + STM32_FUNCTION(17, "ANALOG") 1532 + ), 1533 + STM32_PIN( 1534 + PINCTRL_PIN(112, "PH0"), 1535 + STM32_FUNCTION(0, "GPIOH0"), 1536 + STM32_FUNCTION(16, "EVENTOUT"), 1537 + STM32_FUNCTION(17, "ANALOG") 1538 + ), 1539 + STM32_PIN( 1540 + PINCTRL_PIN(113, "PH1"), 1541 + STM32_FUNCTION(0, "GPIOH1"), 1542 + STM32_FUNCTION(16, "EVENTOUT"), 1543 + STM32_FUNCTION(17, "ANALOG") 1544 + ), 1545 + STM32_PIN( 1546 + PINCTRL_PIN(114, "PH2"), 1547 + STM32_FUNCTION(0, "GPIOH2"), 1548 + STM32_FUNCTION(2, "LPTIM1_IN2"), 1549 + STM32_FUNCTION(10, "QUADSPI_BK2_IO0 QUADSPI_BOOTBK2_IO0"), 1550 + STM32_FUNCTION(11, "SAI2_SCK_B"), 1551 + STM32_FUNCTION(12, "ETH_GMII_CRS ETH_MII_CRS"), 1552 + STM32_FUNCTION(15, "LCD_R0"), 1553 + STM32_FUNCTION(16, "EVENTOUT"), 1554 + STM32_FUNCTION(17, "ANALOG") 1555 + ), 1556 + STM32_PIN( 1557 + PINCTRL_PIN(115, "PH3"), 1558 + STM32_FUNCTION(0, "GPIOH3"), 1559 + STM32_FUNCTION(4, "DFSDM_CK4"), 1560 + STM32_FUNCTION(10, "QUADSPI_BK2_IO1 QUADSPI_BOOTBK2_IO1"), 1561 + STM32_FUNCTION(11, "SAI2_MCLK_B"), 1562 + STM32_FUNCTION(12, "ETH_GMII_COL ETH_MII_COL"), 1563 + STM32_FUNCTION(15, "LCD_R1"), 1564 + STM32_FUNCTION(16, "EVENTOUT"), 1565 + STM32_FUNCTION(17, "ANALOG") 1566 + ), 1567 + STM32_PIN( 1568 + PINCTRL_PIN(116, "PH4"), 1569 + STM32_FUNCTION(0, "GPIOH4"), 1570 + STM32_FUNCTION(5, "I2C2_SCL"), 1571 + STM32_FUNCTION(10, "LCD_G5"), 1572 + STM32_FUNCTION(15, "LCD_G4"), 1573 + STM32_FUNCTION(16, "EVENTOUT"), 1574 + STM32_FUNCTION(17, "ANALOG") 1575 + ), 1576 + STM32_PIN( 1577 + PINCTRL_PIN(117, "PH5"), 1578 + STM32_FUNCTION(0, "GPIOH5"), 1579 + STM32_FUNCTION(5, "I2C2_SDA"), 1580 + STM32_FUNCTION(6, "SPI5_NSS"), 1581 + STM32_FUNCTION(13, "SAI4_SD_B"), 1582 + STM32_FUNCTION(16, "EVENTOUT"), 1583 + STM32_FUNCTION(17, "ANALOG") 1584 + ), 1585 + STM32_PIN( 1586 + PINCTRL_PIN(118, "PH6"), 1587 + STM32_FUNCTION(0, "GPIOH6"), 1588 + STM32_FUNCTION(3, "TIM12_CH1"), 1589 + STM32_FUNCTION(5, "I2C2_SMBA"), 1590 + STM32_FUNCTION(6, "SPI5_SCK"), 1591 + STM32_FUNCTION(12, "ETH_GMII_RXD2 ETH_MII_RXD2 ETH_RGMII_RXD2"), 1592 + STM32_FUNCTION(13, "MDIOS_MDIO"), 1593 + STM32_FUNCTION(14, "DCMI_D8"), 1594 + STM32_FUNCTION(16, "EVENTOUT"), 1595 + STM32_FUNCTION(17, "ANALOG") 1596 + ), 1597 + STM32_PIN( 1598 + PINCTRL_PIN(119, "PH7"), 1599 + STM32_FUNCTION(0, "GPIOH7"), 1600 + STM32_FUNCTION(5, "I2C3_SCL"), 1601 + STM32_FUNCTION(6, "SPI5_MISO"), 1602 + STM32_FUNCTION(12, "ETH_GMII_RXD3 ETH_MII_RXD3 ETH_RGMII_RXD3"), 1603 + STM32_FUNCTION(13, "MDIOS_MDC"), 1604 + STM32_FUNCTION(14, "DCMI_D9"), 1605 + STM32_FUNCTION(16, "EVENTOUT"), 1606 + STM32_FUNCTION(17, "ANALOG") 1607 + ), 1608 + STM32_PIN( 1609 + PINCTRL_PIN(120, "PH8"), 1610 + STM32_FUNCTION(0, "GPIOH8"), 1611 + STM32_FUNCTION(3, "TIM5_ETR"), 1612 + STM32_FUNCTION(5, "I2C3_SDA"), 1613 + STM32_FUNCTION(14, "DCMI_HSYNC"), 1614 + STM32_FUNCTION(15, "LCD_R2"), 1615 + STM32_FUNCTION(16, "EVENTOUT"), 1616 + STM32_FUNCTION(17, "ANALOG") 1617 + ), 1618 + STM32_PIN( 1619 + PINCTRL_PIN(121, "PH9"), 1620 + STM32_FUNCTION(0, "GPIOH9"), 1621 + STM32_FUNCTION(3, "TIM12_CH2"), 1622 + STM32_FUNCTION(5, "I2C3_SMBA"), 1623 + STM32_FUNCTION(14, "DCMI_D0"), 1624 + STM32_FUNCTION(15, "LCD_R3"), 1625 + STM32_FUNCTION(16, "EVENTOUT"), 1626 + STM32_FUNCTION(17, "ANALOG") 1627 + ), 1628 + STM32_PIN( 1629 + PINCTRL_PIN(122, "PH10"), 1630 + STM32_FUNCTION(0, "GPIOH10"), 1631 + STM32_FUNCTION(3, "TIM5_CH1"), 1632 + STM32_FUNCTION(5, "I2C4_SMBA"), 1633 + STM32_FUNCTION(6, "I2C1_SMBA"), 1634 + STM32_FUNCTION(14, "DCMI_D1"), 1635 + STM32_FUNCTION(15, "LCD_R4"), 1636 + STM32_FUNCTION(16, "EVENTOUT"), 1637 + STM32_FUNCTION(17, "ANALOG") 1638 + ), 1639 + STM32_PIN( 1640 + PINCTRL_PIN(123, "PH11"), 1641 + STM32_FUNCTION(0, "GPIOH11"), 1642 + STM32_FUNCTION(3, "TIM5_CH2"), 1643 + STM32_FUNCTION(5, "I2C4_SCL"), 1644 + STM32_FUNCTION(6, "I2C1_SCL"), 1645 + STM32_FUNCTION(14, "DCMI_D2"), 1646 + STM32_FUNCTION(15, "LCD_R5"), 1647 + STM32_FUNCTION(16, "EVENTOUT"), 1648 + STM32_FUNCTION(17, "ANALOG") 1649 + ), 1650 + STM32_PIN( 1651 + PINCTRL_PIN(124, "PH12"), 1652 + STM32_FUNCTION(0, "GPIOH12"), 1653 + STM32_FUNCTION(1, "HDP2"), 1654 + STM32_FUNCTION(3, "TIM5_CH3"), 1655 + STM32_FUNCTION(5, "I2C4_SDA"), 1656 + STM32_FUNCTION(6, "I2C1_SDA"), 1657 + STM32_FUNCTION(14, "DCMI_D3"), 1658 + STM32_FUNCTION(15, "LCD_R6"), 1659 + STM32_FUNCTION(16, "EVENTOUT"), 1660 + STM32_FUNCTION(17, "ANALOG") 1661 + ), 1662 + STM32_PIN( 1663 + PINCTRL_PIN(125, "PH13"), 1664 + STM32_FUNCTION(0, "GPIOH13"), 1665 + STM32_FUNCTION(4, "TIM8_CH1N"), 1666 + STM32_FUNCTION(9, "UART4_TX"), 1667 + STM32_FUNCTION(10, "CAN1_TX"), 1668 + STM32_FUNCTION(15, "LCD_G2"), 1669 + STM32_FUNCTION(16, "EVENTOUT"), 1670 + STM32_FUNCTION(17, "ANALOG") 1671 + ), 1672 + STM32_PIN( 1673 + PINCTRL_PIN(126, "PH14"), 1674 + STM32_FUNCTION(0, "GPIOH14"), 1675 + STM32_FUNCTION(4, "TIM8_CH2N"), 1676 + STM32_FUNCTION(9, "UART4_RX"), 1677 + STM32_FUNCTION(10, "CAN1_RX"), 1678 + STM32_FUNCTION(14, "DCMI_D4"), 1679 + STM32_FUNCTION(15, "LCD_G3"), 1680 + STM32_FUNCTION(16, "EVENTOUT"), 1681 + STM32_FUNCTION(17, "ANALOG") 1682 + ), 1683 + STM32_PIN( 1684 + PINCTRL_PIN(127, "PH15"), 1685 + STM32_FUNCTION(0, "GPIOH15"), 1686 + STM32_FUNCTION(4, "TIM8_CH3N"), 1687 + STM32_FUNCTION(10, "CAN1_TXFD"), 1688 + STM32_FUNCTION(14, "DCMI_D11"), 1689 + STM32_FUNCTION(15, "LCD_G4"), 1690 + STM32_FUNCTION(16, "EVENTOUT"), 1691 + STM32_FUNCTION(17, "ANALOG") 1692 + ), 1693 + STM32_PIN( 1694 + PINCTRL_PIN(128, "PI0"), 1695 + STM32_FUNCTION(0, "GPIOI0"), 1696 + STM32_FUNCTION(3, "TIM5_CH4"), 1697 + STM32_FUNCTION(6, "SPI2_NSS I2S2_WS"), 1698 + STM32_FUNCTION(10, "CAN1_RXFD"), 1699 + STM32_FUNCTION(14, "DCMI_D13"), 1700 + STM32_FUNCTION(15, "LCD_G5"), 1701 + STM32_FUNCTION(16, "EVENTOUT"), 1702 + STM32_FUNCTION(17, "ANALOG") 1703 + ), 1704 + STM32_PIN( 1705 + PINCTRL_PIN(129, "PI1"), 1706 + STM32_FUNCTION(0, "GPIOI1"), 1707 + STM32_FUNCTION(4, "TIM8_BKIN2"), 1708 + STM32_FUNCTION(6, "SPI2_SCK I2S2_CK"), 1709 + STM32_FUNCTION(14, "DCMI_D8"), 1710 + STM32_FUNCTION(15, "LCD_G6"), 1711 + STM32_FUNCTION(16, "EVENTOUT"), 1712 + STM32_FUNCTION(17, "ANALOG") 1713 + ), 1714 + STM32_PIN( 1715 + PINCTRL_PIN(130, "PI2"), 1716 + STM32_FUNCTION(0, "GPIOI2"), 1717 + STM32_FUNCTION(4, "TIM8_CH4"), 1718 + STM32_FUNCTION(6, "SPI2_MISO I2S2_SDI"), 1719 + STM32_FUNCTION(14, "DCMI_D9"), 1720 + STM32_FUNCTION(15, "LCD_G7"), 1721 + STM32_FUNCTION(16, "EVENTOUT"), 1722 + STM32_FUNCTION(17, "ANALOG") 1723 + ), 1724 + STM32_PIN( 1725 + PINCTRL_PIN(131, "PI3"), 1726 + STM32_FUNCTION(0, "GPIOI3"), 1727 + STM32_FUNCTION(4, "TIM8_ETR"), 1728 + STM32_FUNCTION(6, "SPI2_MOSI I2S2_SDO"), 1729 + STM32_FUNCTION(14, "DCMI_D10"), 1730 + STM32_FUNCTION(16, "EVENTOUT"), 1731 + STM32_FUNCTION(17, "ANALOG") 1732 + ), 1733 + STM32_PIN( 1734 + PINCTRL_PIN(132, "PI4"), 1735 + STM32_FUNCTION(0, "GPIOI4"), 1736 + STM32_FUNCTION(4, "TIM8_BKIN"), 1737 + STM32_FUNCTION(11, "SAI2_MCLK_A"), 1738 + STM32_FUNCTION(14, "DCMI_D5"), 1739 + STM32_FUNCTION(15, "LCD_B4"), 1740 + STM32_FUNCTION(16, "EVENTOUT"), 1741 + STM32_FUNCTION(17, "ANALOG") 1742 + ), 1743 + STM32_PIN( 1744 + PINCTRL_PIN(133, "PI5"), 1745 + STM32_FUNCTION(0, "GPIOI5"), 1746 + STM32_FUNCTION(4, "TIM8_CH1"), 1747 + STM32_FUNCTION(11, "SAI2_SCK_A"), 1748 + STM32_FUNCTION(14, "DCMI_VSYNC"), 1749 + STM32_FUNCTION(15, "LCD_B5"), 1750 + STM32_FUNCTION(16, "EVENTOUT"), 1751 + STM32_FUNCTION(17, "ANALOG") 1752 + ), 1753 + STM32_PIN( 1754 + PINCTRL_PIN(134, "PI6"), 1755 + STM32_FUNCTION(0, "GPIOI6"), 1756 + STM32_FUNCTION(4, "TIM8_CH2"), 1757 + STM32_FUNCTION(11, "SAI2_SD_A"), 1758 + STM32_FUNCTION(14, "DCMI_D6"), 1759 + STM32_FUNCTION(15, "LCD_B6"), 1760 + STM32_FUNCTION(16, "EVENTOUT"), 1761 + STM32_FUNCTION(17, "ANALOG") 1762 + ), 1763 + STM32_PIN( 1764 + PINCTRL_PIN(135, "PI7"), 1765 + STM32_FUNCTION(0, "GPIOI7"), 1766 + STM32_FUNCTION(4, "TIM8_CH3"), 1767 + STM32_FUNCTION(11, "SAI2_FS_A"), 1768 + STM32_FUNCTION(14, "DCMI_D7"), 1769 + STM32_FUNCTION(15, "LCD_B7"), 1770 + STM32_FUNCTION(16, "EVENTOUT"), 1771 + STM32_FUNCTION(17, "ANALOG") 1772 + ), 1773 + STM32_PIN( 1774 + PINCTRL_PIN(136, "PI8"), 1775 + STM32_FUNCTION(0, "GPIOI8"), 1776 + STM32_FUNCTION(16, "EVENTOUT"), 1777 + STM32_FUNCTION(17, "ANALOG") 1778 + ), 1779 + STM32_PIN( 1780 + PINCTRL_PIN(137, "PI9"), 1781 + STM32_FUNCTION(0, "GPIOI9"), 1782 + STM32_FUNCTION(1, "HDP1"), 1783 + STM32_FUNCTION(9, "UART4_RX"), 1784 + STM32_FUNCTION(10, "CAN1_RX"), 1785 + STM32_FUNCTION(15, "LCD_VSYNC"), 1786 + STM32_FUNCTION(16, "EVENTOUT"), 1787 + STM32_FUNCTION(17, "ANALOG") 1788 + ), 1789 + STM32_PIN( 1790 + PINCTRL_PIN(138, "PI10"), 1791 + STM32_FUNCTION(0, "GPIOI10"), 1792 + STM32_FUNCTION(1, "HDP0"), 1793 + STM32_FUNCTION(9, "USART3_CTS_NSS USART_BOOT3_CTS_NSS"), 1794 + STM32_FUNCTION(10, "CAN1_RXFD"), 1795 + STM32_FUNCTION(12, "ETH_GMII_RX_ER ETH_MII_RX_ER"), 1796 + STM32_FUNCTION(15, "LCD_HSYNC"), 1797 + STM32_FUNCTION(16, "EVENTOUT"), 1798 + STM32_FUNCTION(17, "ANALOG") 1799 + ), 1800 + STM32_PIN( 1801 + PINCTRL_PIN(139, "PI11"), 1802 + STM32_FUNCTION(0, "GPIOI11"), 1803 + STM32_FUNCTION(1, "MCO1"), 1804 + STM32_FUNCTION(6, "I2S_CKIN"), 1805 + STM32_FUNCTION(10, "LCD_G6"), 1806 + STM32_FUNCTION(16, "EVENTOUT"), 1807 + STM32_FUNCTION(17, "ANALOG") 1808 + ), 1809 + STM32_PIN( 1810 + PINCTRL_PIN(140, "PI12"), 1811 + STM32_FUNCTION(0, "GPIOI12"), 1812 + STM32_FUNCTION(1, "TRACED0"), 1813 + STM32_FUNCTION(3, "HDP0"), 1814 + STM32_FUNCTION(15, "LCD_HSYNC"), 1815 + STM32_FUNCTION(16, "EVENTOUT"), 1816 + STM32_FUNCTION(17, "ANALOG") 1817 + ), 1818 + STM32_PIN( 1819 + PINCTRL_PIN(141, "PI13"), 1820 + STM32_FUNCTION(0, "GPIOI13"), 1821 + STM32_FUNCTION(1, "TRACED1"), 1822 + STM32_FUNCTION(3, "HDP1"), 1823 + STM32_FUNCTION(15, "LCD_VSYNC"), 1824 + STM32_FUNCTION(16, "EVENTOUT"), 1825 + STM32_FUNCTION(17, "ANALOG") 1826 + ), 1827 + STM32_PIN( 1828 + PINCTRL_PIN(142, "PI14"), 1829 + STM32_FUNCTION(0, "GPIOI14"), 1830 + STM32_FUNCTION(1, "TRACECLK"), 1831 + STM32_FUNCTION(15, "LCD_CLK"), 1832 + STM32_FUNCTION(16, "EVENTOUT"), 1833 + STM32_FUNCTION(17, "ANALOG") 1834 + ), 1835 + STM32_PIN( 1836 + PINCTRL_PIN(143, "PI15"), 1837 + STM32_FUNCTION(0, "GPIOI15"), 1838 + STM32_FUNCTION(10, "LCD_G2"), 1839 + STM32_FUNCTION(15, "LCD_R0"), 1840 + STM32_FUNCTION(16, "EVENTOUT"), 1841 + STM32_FUNCTION(17, "ANALOG") 1842 + ), 1843 + STM32_PIN( 1844 + PINCTRL_PIN(144, "PJ0"), 1845 + STM32_FUNCTION(0, "GPIOJ0"), 1846 + STM32_FUNCTION(1, "TRACED8"), 1847 + STM32_FUNCTION(10, "LCD_R7"), 1848 + STM32_FUNCTION(15, "LCD_R1"), 1849 + STM32_FUNCTION(16, "EVENTOUT"), 1850 + STM32_FUNCTION(17, "ANALOG") 1851 + ), 1852 + STM32_PIN( 1853 + PINCTRL_PIN(145, "PJ1"), 1854 + STM32_FUNCTION(0, "GPIOJ1"), 1855 + STM32_FUNCTION(1, "TRACED9"), 1856 + STM32_FUNCTION(15, "LCD_R2"), 1857 + STM32_FUNCTION(16, "EVENTOUT"), 1858 + STM32_FUNCTION(17, "ANALOG") 1859 + ), 1860 + STM32_PIN( 1861 + PINCTRL_PIN(146, "PJ2"), 1862 + STM32_FUNCTION(0, "GPIOJ2"), 1863 + STM32_FUNCTION(1, "TRACED10"), 1864 + STM32_FUNCTION(14, "DSI_TE"), 1865 + STM32_FUNCTION(15, "LCD_R3"), 1866 + STM32_FUNCTION(16, "EVENTOUT"), 1867 + STM32_FUNCTION(17, "ANALOG") 1868 + ), 1869 + STM32_PIN( 1870 + PINCTRL_PIN(147, "PJ3"), 1871 + STM32_FUNCTION(0, "GPIOJ3"), 1872 + STM32_FUNCTION(1, "TRACED11"), 1873 + STM32_FUNCTION(15, "LCD_R4"), 1874 + STM32_FUNCTION(16, "EVENTOUT"), 1875 + STM32_FUNCTION(17, "ANALOG") 1876 + ), 1877 + STM32_PIN( 1878 + PINCTRL_PIN(148, "PJ4"), 1879 + STM32_FUNCTION(0, "GPIOJ4"), 1880 + STM32_FUNCTION(1, "TRACED12"), 1881 + STM32_FUNCTION(15, "LCD_R5"), 1882 + STM32_FUNCTION(16, "EVENTOUT"), 1883 + STM32_FUNCTION(17, "ANALOG") 1884 + ), 1885 + STM32_PIN( 1886 + PINCTRL_PIN(149, "PJ5"), 1887 + STM32_FUNCTION(0, "GPIOJ5"), 1888 + STM32_FUNCTION(1, "TRACED2"), 1889 + STM32_FUNCTION(3, "HDP2"), 1890 + STM32_FUNCTION(15, "LCD_R6"), 1891 + STM32_FUNCTION(16, "EVENTOUT"), 1892 + STM32_FUNCTION(17, "ANALOG") 1893 + ), 1894 + STM32_PIN( 1895 + PINCTRL_PIN(150, "PJ6"), 1896 + STM32_FUNCTION(0, "GPIOJ6"), 1897 + STM32_FUNCTION(1, "TRACED3"), 1898 + STM32_FUNCTION(3, "HDP3"), 1899 + STM32_FUNCTION(4, "TIM8_CH2"), 1900 + STM32_FUNCTION(15, "LCD_R7"), 1901 + STM32_FUNCTION(16, "EVENTOUT"), 1902 + STM32_FUNCTION(17, "ANALOG") 1903 + ), 1904 + STM32_PIN( 1905 + PINCTRL_PIN(151, "PJ7"), 1906 + STM32_FUNCTION(0, "GPIOJ7"), 1907 + STM32_FUNCTION(1, "TRACED13"), 1908 + STM32_FUNCTION(4, "TIM8_CH2N"), 1909 + STM32_FUNCTION(15, "LCD_G0"), 1910 + STM32_FUNCTION(16, "EVENTOUT"), 1911 + STM32_FUNCTION(17, "ANALOG") 1912 + ), 1913 + STM32_PIN( 1914 + PINCTRL_PIN(152, "PJ8"), 1915 + STM32_FUNCTION(0, "GPIOJ8"), 1916 + STM32_FUNCTION(1, "TRACED14"), 1917 + STM32_FUNCTION(2, "TIM1_CH3N"), 1918 + STM32_FUNCTION(4, "TIM8_CH1"), 1919 + STM32_FUNCTION(9, "UART8_TX"), 1920 + STM32_FUNCTION(15, "LCD_G1"), 1921 + STM32_FUNCTION(16, "EVENTOUT"), 1922 + STM32_FUNCTION(17, "ANALOG") 1923 + ), 1924 + STM32_PIN( 1925 + PINCTRL_PIN(153, "PJ9"), 1926 + STM32_FUNCTION(0, "GPIOJ9"), 1927 + STM32_FUNCTION(1, "TRACED15"), 1928 + STM32_FUNCTION(2, "TIM1_CH3"), 1929 + STM32_FUNCTION(4, "TIM8_CH1N"), 1930 + STM32_FUNCTION(9, "UART8_RX"), 1931 + STM32_FUNCTION(15, "LCD_G2"), 1932 + STM32_FUNCTION(16, "EVENTOUT"), 1933 + STM32_FUNCTION(17, "ANALOG") 1934 + ), 1935 + STM32_PIN( 1936 + PINCTRL_PIN(154, "PJ10"), 1937 + STM32_FUNCTION(0, "GPIOJ10"), 1938 + STM32_FUNCTION(2, "TIM1_CH2N"), 1939 + STM32_FUNCTION(4, "TIM8_CH2"), 1940 + STM32_FUNCTION(6, "SPI5_MOSI"), 1941 + STM32_FUNCTION(15, "LCD_G3"), 1942 + STM32_FUNCTION(16, "EVENTOUT"), 1943 + STM32_FUNCTION(17, "ANALOG") 1944 + ), 1945 + STM32_PIN( 1946 + PINCTRL_PIN(155, "PJ11"), 1947 + STM32_FUNCTION(0, "GPIOJ11"), 1948 + STM32_FUNCTION(2, "TIM1_CH2"), 1949 + STM32_FUNCTION(4, "TIM8_CH2N"), 1950 + STM32_FUNCTION(6, "SPI5_MISO"), 1951 + STM32_FUNCTION(15, "LCD_G4"), 1952 + STM32_FUNCTION(16, "EVENTOUT"), 1953 + STM32_FUNCTION(17, "ANALOG") 1954 + ), 1955 + STM32_PIN( 1956 + PINCTRL_PIN(156, "PJ12"), 1957 + STM32_FUNCTION(0, "GPIOJ12"), 1958 + STM32_FUNCTION(10, "LCD_G3"), 1959 + STM32_FUNCTION(15, "LCD_B0"), 1960 + STM32_FUNCTION(16, "EVENTOUT"), 1961 + STM32_FUNCTION(17, "ANALOG") 1962 + ), 1963 + STM32_PIN( 1964 + PINCTRL_PIN(157, "PJ13"), 1965 + STM32_FUNCTION(0, "GPIOJ13"), 1966 + STM32_FUNCTION(10, "LCD_G4"), 1967 + STM32_FUNCTION(15, "LCD_B1"), 1968 + STM32_FUNCTION(16, "EVENTOUT"), 1969 + STM32_FUNCTION(17, "ANALOG") 1970 + ), 1971 + STM32_PIN( 1972 + PINCTRL_PIN(158, "PJ14"), 1973 + STM32_FUNCTION(0, "GPIOJ14"), 1974 + STM32_FUNCTION(15, "LCD_B2"), 1975 + STM32_FUNCTION(16, "EVENTOUT"), 1976 + STM32_FUNCTION(17, "ANALOG") 1977 + ), 1978 + STM32_PIN( 1979 + PINCTRL_PIN(159, "PJ15"), 1980 + STM32_FUNCTION(0, "GPIOJ15"), 1981 + STM32_FUNCTION(15, "LCD_B3"), 1982 + STM32_FUNCTION(16, "EVENTOUT"), 1983 + STM32_FUNCTION(17, "ANALOG") 1984 + ), 1985 + STM32_PIN( 1986 + PINCTRL_PIN(160, "PK0"), 1987 + STM32_FUNCTION(0, "GPIOK0"), 1988 + STM32_FUNCTION(2, "TIM1_CH1N"), 1989 + STM32_FUNCTION(4, "TIM8_CH3"), 1990 + STM32_FUNCTION(6, "SPI5_SCK"), 1991 + STM32_FUNCTION(15, "LCD_G5"), 1992 + STM32_FUNCTION(16, "EVENTOUT"), 1993 + STM32_FUNCTION(17, "ANALOG") 1994 + ), 1995 + STM32_PIN( 1996 + PINCTRL_PIN(161, "PK1"), 1997 + STM32_FUNCTION(0, "GPIOK1"), 1998 + STM32_FUNCTION(1, "TRACED4"), 1999 + STM32_FUNCTION(2, "TIM1_CH1"), 2000 + STM32_FUNCTION(3, "HDP4"), 2001 + STM32_FUNCTION(4, "TIM8_CH3N"), 2002 + STM32_FUNCTION(6, "SPI5_NSS"), 2003 + STM32_FUNCTION(15, "LCD_G6"), 2004 + STM32_FUNCTION(16, "EVENTOUT"), 2005 + STM32_FUNCTION(17, "ANALOG") 2006 + ), 2007 + STM32_PIN( 2008 + PINCTRL_PIN(162, "PK2"), 2009 + STM32_FUNCTION(0, "GPIOK2"), 2010 + STM32_FUNCTION(1, "TRACED5"), 2011 + STM32_FUNCTION(2, "TIM1_BKIN"), 2012 + STM32_FUNCTION(3, "HDP5"), 2013 + STM32_FUNCTION(4, "TIM8_BKIN"), 2014 + STM32_FUNCTION(15, "LCD_G7"), 2015 + STM32_FUNCTION(16, "EVENTOUT"), 2016 + STM32_FUNCTION(17, "ANALOG") 2017 + ), 2018 + STM32_PIN( 2019 + PINCTRL_PIN(163, "PK3"), 2020 + STM32_FUNCTION(0, "GPIOK3"), 2021 + STM32_FUNCTION(15, "LCD_B4"), 2022 + STM32_FUNCTION(16, "EVENTOUT"), 2023 + STM32_FUNCTION(17, "ANALOG") 2024 + ), 2025 + STM32_PIN( 2026 + PINCTRL_PIN(164, "PK4"), 2027 + STM32_FUNCTION(0, "GPIOK4"), 2028 + STM32_FUNCTION(15, "LCD_B5"), 2029 + STM32_FUNCTION(16, "EVENTOUT"), 2030 + STM32_FUNCTION(17, "ANALOG") 2031 + ), 2032 + STM32_PIN( 2033 + PINCTRL_PIN(165, "PK5"), 2034 + STM32_FUNCTION(0, "GPIOK5"), 2035 + STM32_FUNCTION(1, "TRACED6"), 2036 + STM32_FUNCTION(3, "HDP6"), 2037 + STM32_FUNCTION(15, "LCD_B6"), 2038 + STM32_FUNCTION(16, "EVENTOUT"), 2039 + STM32_FUNCTION(17, "ANALOG") 2040 + ), 2041 + STM32_PIN( 2042 + PINCTRL_PIN(166, "PK6"), 2043 + STM32_FUNCTION(0, "GPIOK6"), 2044 + STM32_FUNCTION(1, "TRACED7"), 2045 + STM32_FUNCTION(3, "HDP7"), 2046 + STM32_FUNCTION(15, "LCD_B7"), 2047 + STM32_FUNCTION(16, "EVENTOUT"), 2048 + STM32_FUNCTION(17, "ANALOG") 2049 + ), 2050 + STM32_PIN( 2051 + PINCTRL_PIN(167, "PK7"), 2052 + STM32_FUNCTION(0, "GPIOK7"), 2053 + STM32_FUNCTION(15, "LCD_DE"), 2054 + STM32_FUNCTION(16, "EVENTOUT"), 2055 + STM32_FUNCTION(17, "ANALOG") 2056 + ), 2057 + }; 2058 + 2059 + static const struct stm32_desc_pin stm32mp157_z_pins[] = { 2060 + STM32_PIN( 2061 + PINCTRL_PIN(400, "PZ0"), 2062 + STM32_FUNCTION(0, "GPIOZ0"), 2063 + STM32_FUNCTION(3, "I2C6_SCL"), 2064 + STM32_FUNCTION(4, "I2C2_SCL"), 2065 + STM32_FUNCTION(6, "SPI1_SCK I2S1_CK"), 2066 + STM32_FUNCTION(8, "USART1_CK"), 2067 + STM32_FUNCTION(9, "SPI6_SCK"), 2068 + STM32_FUNCTION(16, "EVENTOUT"), 2069 + STM32_FUNCTION(17, "ANALOG") 2070 + ), 2071 + STM32_PIN( 2072 + PINCTRL_PIN(401, "PZ1"), 2073 + STM32_FUNCTION(0, "GPIOZ1"), 2074 + STM32_FUNCTION(3, "I2C6_SDA"), 2075 + STM32_FUNCTION(4, "I2C2_SDA"), 2076 + STM32_FUNCTION(5, "I2C5_SDA"), 2077 + STM32_FUNCTION(6, "SPI1_MISO I2S1_SDI"), 2078 + STM32_FUNCTION(7, "I2C4_SDA"), 2079 + STM32_FUNCTION(8, "USART1_RX"), 2080 + STM32_FUNCTION(9, "SPI6_MISO"), 2081 + STM32_FUNCTION(16, "EVENTOUT"), 2082 + STM32_FUNCTION(17, "ANALOG") 2083 + ), 2084 + STM32_PIN( 2085 + PINCTRL_PIN(402, "PZ2"), 2086 + STM32_FUNCTION(0, "GPIOZ2"), 2087 + STM32_FUNCTION(3, "I2C6_SCL"), 2088 + STM32_FUNCTION(4, "I2C2_SCL"), 2089 + STM32_FUNCTION(5, "I2C5_SMBA"), 2090 + STM32_FUNCTION(6, "SPI1_MOSI I2S1_SDO"), 2091 + STM32_FUNCTION(7, "I2C4_SMBA"), 2092 + STM32_FUNCTION(8, "USART1_TX"), 2093 + STM32_FUNCTION(9, "SPI6_MOSI"), 2094 + STM32_FUNCTION(16, "EVENTOUT"), 2095 + STM32_FUNCTION(17, "ANALOG") 2096 + ), 2097 + STM32_PIN( 2098 + PINCTRL_PIN(403, "PZ3"), 2099 + STM32_FUNCTION(0, "GPIOZ3"), 2100 + STM32_FUNCTION(3, "I2C6_SDA"), 2101 + STM32_FUNCTION(4, "I2C2_SDA"), 2102 + STM32_FUNCTION(5, "I2C5_SDA"), 2103 + STM32_FUNCTION(6, "SPI1_NSS I2S1_WS"), 2104 + STM32_FUNCTION(7, "I2C4_SDA"), 2105 + STM32_FUNCTION(8, "USART1_CTS_NSS"), 2106 + STM32_FUNCTION(9, "SPI6_NSS"), 2107 + STM32_FUNCTION(16, "EVENTOUT"), 2108 + STM32_FUNCTION(17, "ANALOG") 2109 + ), 2110 + STM32_PIN( 2111 + PINCTRL_PIN(404, "PZ4"), 2112 + STM32_FUNCTION(0, "GPIOZ4"), 2113 + STM32_FUNCTION(3, "I2C6_SCL"), 2114 + STM32_FUNCTION(4, "I2C2_SCL"), 2115 + STM32_FUNCTION(5, "I2C5_SCL"), 2116 + STM32_FUNCTION(7, "I2C4_SCL"), 2117 + STM32_FUNCTION(16, "EVENTOUT"), 2118 + STM32_FUNCTION(17, "ANALOG") 2119 + ), 2120 + STM32_PIN( 2121 + PINCTRL_PIN(405, "PZ5"), 2122 + STM32_FUNCTION(0, "GPIOZ5"), 2123 + STM32_FUNCTION(3, "I2C6_SDA"), 2124 + STM32_FUNCTION(4, "I2C2_SDA"), 2125 + STM32_FUNCTION(5, "I2C5_SDA"), 2126 + STM32_FUNCTION(7, "I2C4_SDA"), 2127 + STM32_FUNCTION(8, "USART1_RTS"), 2128 + STM32_FUNCTION(16, "EVENTOUT"), 2129 + STM32_FUNCTION(17, "ANALOG") 2130 + ), 2131 + STM32_PIN( 2132 + PINCTRL_PIN(406, "PZ6"), 2133 + STM32_FUNCTION(0, "GPIOZ6"), 2134 + STM32_FUNCTION(3, "I2C6_SCL"), 2135 + STM32_FUNCTION(4, "I2C2_SCL"), 2136 + STM32_FUNCTION(5, "USART1_CK"), 2137 + STM32_FUNCTION(6, "I2S1_MCK"), 2138 + STM32_FUNCTION(7, "I2C4_SMBA"), 2139 + STM32_FUNCTION(8, "USART1_RX"), 2140 + STM32_FUNCTION(16, "EVENTOUT"), 2141 + STM32_FUNCTION(17, "ANALOG") 2142 + ), 2143 + STM32_PIN( 2144 + PINCTRL_PIN(407, "PZ7"), 2145 + STM32_FUNCTION(0, "GPIOZ7"), 2146 + STM32_FUNCTION(3, "I2C6_SDA"), 2147 + STM32_FUNCTION(4, "I2C2_SDA"), 2148 + STM32_FUNCTION(8, "USART1_TX"), 2149 + STM32_FUNCTION(16, "EVENTOUT"), 2150 + STM32_FUNCTION(17, "ANALOG") 2151 + ), 2152 + }; 2153 + 2154 + static struct stm32_pinctrl_match_data stm32mp157_match_data = { 2155 + .pins = stm32mp157_pins, 2156 + .npins = ARRAY_SIZE(stm32mp157_pins), 2157 + }; 2158 + 2159 + static struct stm32_pinctrl_match_data stm32mp157_z_match_data = { 2160 + .pins = stm32mp157_z_pins, 2161 + .npins = ARRAY_SIZE(stm32mp157_z_pins), 2162 + }; 2163 + 2164 + static const struct of_device_id stm32mp157_pctrl_match[] = { 2165 + { 2166 + .compatible = "st,stm32mp157-pinctrl", 2167 + .data = &stm32mp157_match_data, 2168 + }, 2169 + { 2170 + .compatible = "st,stm32mp157-z-pinctrl", 2171 + .data = &stm32mp157_z_match_data, 2172 + }, 2173 + { } 2174 + }; 2175 + 2176 + static struct platform_driver stm32mp157_pinctrl_driver = { 2177 + .probe = stm32_pctl_probe, 2178 + .driver = { 2179 + .name = "stm32mp157-pinctrl", 2180 + .of_match_table = stm32mp157_pctrl_match, 2181 + }, 2182 + }; 2183 + 2184 + static int __init stm32mp157_pinctrl_init(void) 2185 + { 2186 + return platform_driver_register(&stm32mp157_pinctrl_driver); 2187 + } 2188 + arch_initcall(stm32mp157_pinctrl_init);
+1 -1
drivers/pinctrl/sunxi/pinctrl-sun4i-a10.c
··· 1167 1167 SUNXI_FUNCTION(0x0, "gpio_in"), 1168 1168 SUNXI_FUNCTION(0x1, "gpio_out"), 1169 1169 SUNXI_FUNCTION(0x2, "pwm"), /* PWM1 */ 1170 - SUNXI_FUNCTION_VARIANT(0x3, "i2c3", /* SDA */ 1170 + SUNXI_FUNCTION_VARIANT(0x3, "i2c4", /* SDA */ 1171 1171 PINCTRL_SUN7I_A20 | 1172 1172 PINCTRL_SUN8I_R40)), 1173 1173 SUNXI_PIN(SUNXI_PINCTRL_PIN(I, 4),
+5 -2
drivers/pinctrl/sunxi/pinctrl-sunxi.c
··· 12 12 13 13 #include <linux/io.h> 14 14 #include <linux/clk.h> 15 + #include <linux/clk-provider.h> 15 16 #include <linux/gpio/driver.h> 16 17 #include <linux/irqdomain.h> 17 18 #include <linux/irqchip/chained_irq.h> ··· 84 83 struct sunxi_desc_function *func = pin->functions; 85 84 86 85 while (func->name) { 87 - if (!strcmp(func->name, func_name)) 86 + if (!strcmp(func->name, func_name) && 87 + (!func->variant || 88 + func->variant & pctl->variant)) 88 89 return func; 89 90 90 91 func++; ··· 1188 1185 int i, ret; 1189 1186 1190 1187 /* Deal with old DTs that didn't have the oscillators */ 1191 - if (of_count_phandle_with_args(node, "clocks", "#clock-cells") != 3) 1188 + if (of_clk_get_parent_count(node) != 3) 1192 1189 return 0; 1193 1190 1194 1191 /* If we don't have any setup, bail out */
+3 -6
drivers/pinctrl/tegra/pinctrl-tegra.c
··· 666 666 int fn, gn, gfn; 667 667 668 668 pmx = devm_kzalloc(&pdev->dev, sizeof(*pmx), GFP_KERNEL); 669 - if (!pmx) { 670 - dev_err(&pdev->dev, "Can't alloc tegra_pmx\n"); 669 + if (!pmx) 671 670 return -ENOMEM; 672 - } 671 + 673 672 pmx->dev = &pdev->dev; 674 673 pmx->soc = soc_data; 675 674 ··· 721 722 722 723 pmx->regs = devm_kzalloc(&pdev->dev, pmx->nbanks * sizeof(*pmx->regs), 723 724 GFP_KERNEL); 724 - if (!pmx->regs) { 725 - dev_err(&pdev->dev, "Can't alloc regs pointer\n"); 725 + if (!pmx->regs) 726 726 return -ENOMEM; 727 - } 728 727 729 728 for (i = 0; i < pmx->nbanks; i++) { 730 729 res = platform_get_resource(pdev, IORESOURCE_MEM, i);
+91 -85
drivers/pinctrl/uniphier/pinctrl-uniphier-core.c
··· 146 146 .dt_free_map = pinctrl_utils_free_map, 147 147 }; 148 148 149 + static const unsigned int uniphier_conf_drv_strengths_1bit[] = {4, 8}; 150 + static const unsigned int uniphier_conf_drv_strengths_2bit[] = {8, 12, 16, 20}; 151 + static const unsigned int uniphier_conf_drv_strengths_3bit[] = {4, 5, 7, 9, 11, 152 + 12, 14, 16}; 153 + static const unsigned int uniphier_conf_drv_strengths_fixed4[] = {4}; 154 + static const unsigned int uniphier_conf_drv_strengths_fixed5[] = {5}; 155 + static const unsigned int uniphier_conf_drv_strengths_fixed8[] = {8}; 156 + 157 + static int uniphier_conf_get_drvctrl_data(struct pinctrl_dev *pctldev, 158 + unsigned int pin, unsigned int *reg, 159 + unsigned int *shift, 160 + unsigned int *mask, 161 + const unsigned int **strengths) 162 + { 163 + const struct pin_desc *desc = pin_desc_get(pctldev, pin); 164 + enum uniphier_pin_drv_type type = 165 + uniphier_pin_get_drv_type(desc->drv_data); 166 + unsigned int base = 0; 167 + unsigned int stride = 0; 168 + unsigned int width = 0; 169 + unsigned int drvctrl; 170 + 171 + switch (type) { 172 + case UNIPHIER_PIN_DRV_1BIT: 173 + *strengths = uniphier_conf_drv_strengths_1bit; 174 + base = UNIPHIER_PINCTRL_DRVCTRL_BASE; 175 + stride = 1; 176 + width = 1; 177 + break; 178 + case UNIPHIER_PIN_DRV_2BIT: 179 + *strengths = uniphier_conf_drv_strengths_2bit; 180 + base = UNIPHIER_PINCTRL_DRV2CTRL_BASE; 181 + stride = 2; 182 + width = 2; 183 + break; 184 + case UNIPHIER_PIN_DRV_3BIT: 185 + *strengths = uniphier_conf_drv_strengths_3bit; 186 + base = UNIPHIER_PINCTRL_DRV3CTRL_BASE; 187 + stride = 4; 188 + width = 3; 189 + break; 190 + case UNIPHIER_PIN_DRV_FIXED4: 191 + *strengths = uniphier_conf_drv_strengths_fixed4; 192 + break; 193 + case UNIPHIER_PIN_DRV_FIXED5: 194 + *strengths = uniphier_conf_drv_strengths_fixed5; 195 + break; 196 + case UNIPHIER_PIN_DRV_FIXED8: 197 + *strengths = uniphier_conf_drv_strengths_fixed8; 198 + break; 199 + default: 200 + /* drive strength control is not supported for this pin */ 201 + return -EINVAL; 202 + } 203 + 204 + drvctrl = uniphier_pin_get_drvctrl(desc->drv_data); 205 + drvctrl *= stride; 206 + 207 + *reg = base + drvctrl / 32 * 4; 208 + *shift = drvctrl % 32; 209 + *mask = (1U << width) - 1; 210 + 211 + return 0; 212 + } 213 + 149 214 static int uniphier_conf_pin_bias_get(struct pinctrl_dev *pctldev, 150 215 unsigned int pin, 151 216 enum pin_config_param param) ··· 266 201 unsigned int pin, u32 *strength) 267 202 { 268 203 struct uniphier_pinctrl_priv *priv = pinctrl_dev_get_drvdata(pctldev); 269 - const struct pin_desc *desc = pin_desc_get(pctldev, pin); 270 - enum uniphier_pin_drv_type type = 271 - uniphier_pin_get_drv_type(desc->drv_data); 272 - static const unsigned int strength_1bit[] = {4, 8}; 273 - static const unsigned int strength_2bit[] = {8, 12, 16, 20}; 274 - static const unsigned int strength_3bit[] = {4, 5, 7, 9, 11, 12, 275 - 14, 16}; 276 - const unsigned int *supported_strength; 277 - unsigned int drvctrl, reg, shift, mask, width, val; 204 + unsigned int reg, shift, mask, val; 205 + const unsigned int *strengths; 278 206 int ret; 279 207 280 - switch (type) { 281 - case UNIPHIER_PIN_DRV_1BIT: 282 - supported_strength = strength_1bit; 283 - reg = UNIPHIER_PINCTRL_DRVCTRL_BASE; 284 - width = 1; 285 - break; 286 - case UNIPHIER_PIN_DRV_2BIT: 287 - supported_strength = strength_2bit; 288 - reg = UNIPHIER_PINCTRL_DRV2CTRL_BASE; 289 - width = 2; 290 - break; 291 - case UNIPHIER_PIN_DRV_3BIT: 292 - supported_strength = strength_3bit; 293 - reg = UNIPHIER_PINCTRL_DRV3CTRL_BASE; 294 - width = 4; 295 - break; 296 - case UNIPHIER_PIN_DRV_FIXED4: 297 - *strength = 4; 298 - return 0; 299 - case UNIPHIER_PIN_DRV_FIXED5: 300 - *strength = 5; 301 - return 0; 302 - case UNIPHIER_PIN_DRV_FIXED8: 303 - *strength = 8; 304 - return 0; 305 - default: 306 - /* drive strength control is not supported for this pin */ 307 - return -EINVAL; 308 - } 309 - 310 - drvctrl = uniphier_pin_get_drvctrl(desc->drv_data); 311 - drvctrl *= width; 312 - 313 - reg += drvctrl / 32 * 4; 314 - shift = drvctrl % 32; 315 - mask = (1U << width) - 1; 316 - 317 - ret = regmap_read(priv->regmap, reg, &val); 208 + ret = uniphier_conf_get_drvctrl_data(pctldev, pin, &reg, &shift, 209 + &mask, &strengths); 318 210 if (ret) 319 211 return ret; 320 212 321 - *strength = supported_strength[(val >> shift) & mask]; 213 + if (mask) { 214 + ret = regmap_read(priv->regmap, reg, &val); 215 + if (ret) 216 + return ret; 217 + } else { 218 + val = 0; 219 + } 220 + 221 + *strength = strengths[(val >> shift) & mask]; 322 222 323 223 return 0; 324 224 } ··· 428 398 { 429 399 struct uniphier_pinctrl_priv *priv = pinctrl_dev_get_drvdata(pctldev); 430 400 const struct pin_desc *desc = pin_desc_get(pctldev, pin); 431 - enum uniphier_pin_drv_type type = 432 - uniphier_pin_get_drv_type(desc->drv_data); 433 - static const unsigned int strength_1bit[] = {4, 8, -1}; 434 - static const unsigned int strength_2bit[] = {8, 12, 16, 20, -1}; 435 - static const unsigned int strength_3bit[] = {4, 5, 7, 9, 11, 12, 14, 436 - 16, -1}; 437 - const unsigned int *supported_strength; 438 - unsigned int drvctrl, reg, shift, mask, width, val; 401 + unsigned int reg, shift, mask, val; 402 + const unsigned int *strengths; 403 + int ret; 439 404 440 - switch (type) { 441 - case UNIPHIER_PIN_DRV_1BIT: 442 - supported_strength = strength_1bit; 443 - reg = UNIPHIER_PINCTRL_DRVCTRL_BASE; 444 - width = 1; 445 - break; 446 - case UNIPHIER_PIN_DRV_2BIT: 447 - supported_strength = strength_2bit; 448 - reg = UNIPHIER_PINCTRL_DRV2CTRL_BASE; 449 - width = 2; 450 - break; 451 - case UNIPHIER_PIN_DRV_3BIT: 452 - supported_strength = strength_3bit; 453 - reg = UNIPHIER_PINCTRL_DRV3CTRL_BASE; 454 - width = 4; 455 - break; 456 - default: 457 - dev_err(pctldev->dev, 458 - "cannot change drive strength for pin %s\n", 405 + ret = uniphier_conf_get_drvctrl_data(pctldev, pin, &reg, &shift, 406 + &mask, &strengths); 407 + if (ret) { 408 + dev_err(pctldev->dev, "cannot set drive strength for pin %s\n", 459 409 desc->name); 460 - return -EINVAL; 410 + return ret; 461 411 } 462 412 463 - for (val = 0; supported_strength[val] > 0; val++) { 464 - if (supported_strength[val] > strength) 413 + for (val = 0; val <= mask; val++) { 414 + if (strengths[val] > strength) 465 415 break; 466 416 } 467 417 ··· 452 442 return -EINVAL; 453 443 } 454 444 445 + if (!mask) 446 + return 0; 447 + 455 448 val--; 456 - 457 - drvctrl = uniphier_pin_get_drvctrl(desc->drv_data); 458 - drvctrl *= width; 459 - 460 - reg += drvctrl / 32 * 4; 461 - shift = drvctrl % 32; 462 - mask = (1U << width) - 1; 463 449 464 450 return regmap_update_bits(priv->regmap, reg, 465 451 mask << shift, val << shift);
+1 -3
drivers/pinctrl/vt8500/pinctrl-vt8500.c
··· 458 458 struct wmt_pinctrl_data *data; 459 459 460 460 data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL); 461 - if (!data) { 462 - dev_err(&pdev->dev, "failed to allocate data\n"); 461 + if (!data) 463 462 return -ENOMEM; 464 - } 465 463 466 464 data->banks = vt8500_banks; 467 465 data->nbanks = ARRAY_SIZE(vt8500_banks);
+1 -3
drivers/pinctrl/vt8500/pinctrl-wm8505.c
··· 489 489 struct wmt_pinctrl_data *data; 490 490 491 491 data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL); 492 - if (!data) { 493 - dev_err(&pdev->dev, "failed to allocate data\n"); 492 + if (!data) 494 493 return -ENOMEM; 495 - } 496 494 497 495 data->banks = wm8505_banks; 498 496 data->nbanks = ARRAY_SIZE(wm8505_banks);
+1 -3
drivers/pinctrl/vt8500/pinctrl-wm8650.c
··· 327 327 struct wmt_pinctrl_data *data; 328 328 329 329 data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL); 330 - if (!data) { 331 - dev_err(&pdev->dev, "failed to allocate data\n"); 330 + if (!data) 332 331 return -ENOMEM; 333 - } 334 332 335 333 data->banks = wm8650_banks; 336 334 data->nbanks = ARRAY_SIZE(wm8650_banks);
+1 -3
drivers/pinctrl/vt8500/pinctrl-wm8750.c
··· 366 366 struct wmt_pinctrl_data *data; 367 367 368 368 data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL); 369 - if (!data) { 370 - dev_err(&pdev->dev, "failed to allocate data\n"); 369 + if (!data) 371 370 return -ENOMEM; 372 - } 373 371 374 372 data->banks = wm8750_banks; 375 373 data->nbanks = ARRAY_SIZE(wm8750_banks);
+1 -3
drivers/pinctrl/vt8500/pinctrl-wm8850.c
··· 345 345 struct wmt_pinctrl_data *data; 346 346 347 347 data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL); 348 - if (!data) { 349 - dev_err(&pdev->dev, "failed to allocate data\n"); 348 + if (!data) 350 349 return -ENOMEM; 351 - } 352 350 353 351 data->banks = wm8850_banks; 354 352 data->nbanks = ARRAY_SIZE(wm8850_banks);
+116
include/dt-bindings/gpio/meson-axg-gpio.h
··· 1 + /* 2 + * Copyright (c) 2017 Amlogic, Inc. All rights reserved. 3 + * Author: Xingyu Chen <xingyu.chen@amlogic.com> 4 + * 5 + * SPDX-License-Identifier: GPL-2.0+ 6 + */ 7 + 8 + #ifndef _DT_BINDINGS_MESON_AXG_GPIO_H 9 + #define _DT_BINDINGS_MESON_AXG_GPIO_H 10 + 11 + /* First GPIO chip */ 12 + #define GPIOAO_0 0 13 + #define GPIOAO_1 1 14 + #define GPIOAO_2 2 15 + #define GPIOAO_3 3 16 + #define GPIOAO_4 4 17 + #define GPIOAO_5 5 18 + #define GPIOAO_6 6 19 + #define GPIOAO_7 7 20 + #define GPIOAO_8 8 21 + #define GPIOAO_9 9 22 + #define GPIOAO_10 10 23 + #define GPIOAO_11 11 24 + #define GPIOAO_12 12 25 + #define GPIOAO_13 13 26 + #define GPIO_TEST_N 14 27 + 28 + /* Second GPIO chip */ 29 + #define GPIOZ_0 0 30 + #define GPIOZ_1 1 31 + #define GPIOZ_2 2 32 + #define GPIOZ_3 3 33 + #define GPIOZ_4 4 34 + #define GPIOZ_5 5 35 + #define GPIOZ_6 6 36 + #define GPIOZ_7 7 37 + #define GPIOZ_8 8 38 + #define GPIOZ_9 9 39 + #define GPIOZ_10 10 40 + #define BOOT_0 11 41 + #define BOOT_1 12 42 + #define BOOT_2 13 43 + #define BOOT_3 14 44 + #define BOOT_4 15 45 + #define BOOT_5 16 46 + #define BOOT_6 17 47 + #define BOOT_7 18 48 + #define BOOT_8 19 49 + #define BOOT_9 20 50 + #define BOOT_10 21 51 + #define BOOT_11 22 52 + #define BOOT_12 23 53 + #define BOOT_13 24 54 + #define BOOT_14 25 55 + #define GPIOA_0 26 56 + #define GPIOA_1 27 57 + #define GPIOA_2 28 58 + #define GPIOA_3 29 59 + #define GPIOA_4 30 60 + #define GPIOA_5 31 61 + #define GPIOA_6 32 62 + #define GPIOA_7 33 63 + #define GPIOA_8 34 64 + #define GPIOA_9 35 65 + #define GPIOA_10 36 66 + #define GPIOA_11 37 67 + #define GPIOA_12 38 68 + #define GPIOA_13 39 69 + #define GPIOA_14 40 70 + #define GPIOA_15 41 71 + #define GPIOA_16 42 72 + #define GPIOA_17 43 73 + #define GPIOA_18 44 74 + #define GPIOA_19 45 75 + #define GPIOA_20 46 76 + #define GPIOX_0 47 77 + #define GPIOX_1 48 78 + #define GPIOX_2 49 79 + #define GPIOX_3 50 80 + #define GPIOX_4 51 81 + #define GPIOX_5 52 82 + #define GPIOX_6 53 83 + #define GPIOX_7 54 84 + #define GPIOX_8 55 85 + #define GPIOX_9 56 86 + #define GPIOX_10 57 87 + #define GPIOX_11 58 88 + #define GPIOX_12 59 89 + #define GPIOX_13 60 90 + #define GPIOX_14 61 91 + #define GPIOX_15 62 92 + #define GPIOX_16 63 93 + #define GPIOX_17 64 94 + #define GPIOX_18 65 95 + #define GPIOX_19 66 96 + #define GPIOX_20 67 97 + #define GPIOX_21 68 98 + #define GPIOX_22 69 99 + #define GPIOY_0 70 100 + #define GPIOY_1 71 101 + #define GPIOY_2 72 102 + #define GPIOY_3 73 103 + #define GPIOY_4 74 104 + #define GPIOY_5 75 105 + #define GPIOY_6 76 106 + #define GPIOY_7 77 107 + #define GPIOY_8 78 108 + #define GPIOY_9 79 109 + #define GPIOY_10 80 110 + #define GPIOY_11 81 111 + #define GPIOY_12 82 112 + #define GPIOY_13 83 113 + #define GPIOY_14 84 114 + #define GPIOY_15 85 115 + 116 + #endif /* _DT_BINDINGS_MESON_AXG_GPIO_H */
+6
include/dt-bindings/pinctrl/stm32-pinfunc.h
··· 1 + /* SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) */ 2 + /* 3 + * Copyright (C) STMicroelectronics 2017 - All Rights Reserved 4 + * Author: Torgue Alexandre <alexandre.torgue@st.com> for STMicroelectronics. 5 + */ 6 + 1 7 #ifndef _DT_BINDINGS_STM32_PINFUNC_H 2 8 #define _DT_BINDINGS_STM32_PINFUNC_H 3 9
+2
include/linux/pinctrl/devinfo.h
··· 43 43 44 44 #else 45 45 46 + struct device; 47 + 46 48 /* Stubs if we're not using pinctrl */ 47 49 48 50 static inline int pinctrl_bind_pins(struct device *dev)