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

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

Pull pin control updates from Linus Walleij:
"The technical details below. For me the CIX Semi and Axis
Communications ARTPEC-9 SoCs were the most interesting new drivers in
this merge window.

Core changes:

- Handle per-direction skew control in the generic pin config

- Drop the pointless subsystem boilerplate banner message during
boot. Less noise in the console. It's available as debug message if
someone really want it

New drivers:

- Samsung Exynos 8890 SoC support

- Samsung Exynos derived Axis Communications ARTPEC-9 SoC support.
These guys literally live next door to me, ARTPEC spells out "Axis
Real-Time Picture Encoding Chip" and is tailored for camera image
streams and is something they have evolved for a quarter of a
century

- Mediatek MT6878 SoC support

- Qualcomm Glymur PMIC support (mostly just compatible strings)

- Qualcomm Kaanapali SoC TLMM support

- Microchip pic64gx "gpio2" SoC support

- Microchip Polarfire "iomux0" SoC support

- CIX Semiconductors SKY1 SoC support

- Rockchip RK3506 SoC support

- Airhoa AN7583 chip support

Improvements:

- Improvements for ST Microelectronics STM32 handling of skew
settings so input and output can have different skew settings

- A whole bunch of device tree binding cleanups: Marvell Armada and
Berlin, Actions Semiconductor S700 and S900, Broadcom Northstar 2
(NS2), Bitmain BM1880 and Spreadtrum SC9860 are moved over to
schema"

* tag 'pinctrl-v6.19-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: (107 commits)
pinctrl: add CONFIG_OF dependencies for microchip drivers
pinctrl: starfive: use dynamic GPIO base allocation
pinctrl: single: Fix incorrect type for error return variable
MAINTAINERS: Change Linus Walleij mail address
pinctrl: cix: Fix obscure dependency
dt-bindings: pinctrl: cix,sky1-pinctrl: Drop duplicate newline
dt-bindings: pinctrl: aspeed,ast2600-pinctrl: Add PCIe RC PERST# group
pinctrl: airoha: Fix AIROHA_PINCTRL_CONFS_DRIVE_E2 in an7583_pinctrl_match_data
pinctrl: airoha: fix pinctrl function mismatch issue
pinctrl: cherryview: Convert to use intel_gpio_add_pin_ranges()
pinctrl: intel: Export intel_gpio_add_pin_ranges()
pinctrl: renesas: rzg2l: Refactor OEN register PWPR handling
pinctrl: airoha: convert comma to semicolon
pinctrl: elkhartlake: Switch to INTEL_GPP() macro
pinctrl: cherryview: Switch to INTEL_GPP() macro
pinctrl: emmitsburg: Switch to INTEL_GPP() macro
pinctrl: denverton: Switch to INTEL_GPP() macro
pinctrl: cedarfork: Switch to INTEL_GPP() macro
pinctrl: airoha: add support for Airoha AN7583 PINs
dt-bindings: pinctrl: airoha: Document AN7583 Pin Controller
...

+12444 -3006
-29
Documentation/devicetree/bindings/clock/armada3700-xtal-clock.txt
··· 1 - * Xtal Clock bindings for Marvell Armada 37xx SoCs 2 - 3 - Marvell Armada 37xx SoCs allow to determine the xtal clock frequencies by 4 - reading the gpio latch register. 5 - 6 - This node must be a subnode of the node exposing the register address 7 - of the GPIO block where the gpio latch is located. 8 - See Documentation/devicetree/bindings/pinctrl/marvell,armada-37xx-pinctrl.txt 9 - 10 - Required properties: 11 - - compatible : shall be one of the following: 12 - "marvell,armada-3700-xtal-clock" 13 - - #clock-cells : from common clock binding; shall be set to 0 14 - 15 - Optional properties: 16 - - clock-output-names : from common clock binding; allows overwrite default clock 17 - output names ("xtal") 18 - 19 - Example: 20 - pinctrl_nb: pinctrl-nb@13800 { 21 - compatible = "armada3710-nb-pinctrl", "syscon", "simple-mfd"; 22 - reg = <0x13800 0x100>, <0x13C00 0x20>; 23 - 24 - xtalclk: xtal-clk { 25 - compatible = "marvell,armada-3700-xtal-clock"; 26 - clock-output-names = "xtal"; 27 - #clock-cells = <0>; 28 - }; 29 - };
-3
Documentation/devicetree/bindings/mfd/syscon-common.yaml
··· 35 35 minItems: 2 36 36 maxItems: 5 # Should be enough 37 37 38 - reg: 39 - maxItems: 1 40 - 41 38 reg-io-width: 42 39 description: 43 40 The size (in bytes) of the IO accesses that should be performed
-170
Documentation/devicetree/bindings/pinctrl/actions,s700-pinctrl.txt
··· 1 - Actions Semi S700 Pin Controller 2 - 3 - This binding describes the pin controller found in the S700 SoC. 4 - 5 - Required Properties: 6 - 7 - - compatible: Should be "actions,s700-pinctrl" 8 - - reg: Should contain the register base address and size of 9 - the pin controller. 10 - - clocks: phandle of the clock feeding the pin controller 11 - - gpio-controller: Marks the device node as a GPIO controller. 12 - - gpio-ranges: Specifies the mapping between gpio controller and 13 - pin-controller pins. 14 - - #gpio-cells: Should be two. The first cell is the gpio pin number 15 - and the second cell is used for optional parameters. 16 - - interrupt-controller: Marks the device node as an interrupt controller. 17 - - #interrupt-cells: Specifies the number of cells needed to encode an 18 - interrupt. Shall be set to 2. The first cell 19 - defines the interrupt number, the second encodes 20 - the trigger flags described in 21 - bindings/interrupt-controller/interrupts.txt 22 - - interrupts: The interrupt outputs from the controller. There is one GPIO 23 - interrupt per GPIO bank. The number of interrupts listed depends 24 - on the number of GPIO banks on the SoC. The interrupts must be 25 - ordered by bank, starting with bank 0. 26 - 27 - Please refer to pinctrl-bindings.txt in this directory for details of the 28 - common pinctrl bindings used by client devices, including the meaning of the 29 - phrase "pin configuration node". 30 - 31 - The pin configuration nodes act as a container for an arbitrary number of 32 - subnodes. Each of these subnodes represents some desired configuration for a 33 - pin, a group, or a list of pins or groups. This configuration can include the 34 - mux function to select on those group(s), and various pin configuration 35 - parameters, such as pull-up, drive strength, etc. 36 - 37 - PIN CONFIGURATION NODES: 38 - 39 - The name of each subnode is not important; all subnodes should be enumerated 40 - and processed purely based on their content. 41 - 42 - Each subnode only affects those parameters that are explicitly listed. In 43 - other words, a subnode that lists a mux function but no pin configuration 44 - parameters implies no information about any pin configuration parameters. 45 - Similarly, a pin subnode that describes a pullup parameter implies no 46 - information about e.g. the mux function. 47 - 48 - Pinmux functions are available only for the pin groups while pinconf 49 - parameters are available for both pin groups and individual pins. 50 - 51 - The following generic properties as defined in pinctrl-bindings.txt are valid 52 - to specify in a pin configuration subnode: 53 - 54 - Required Properties: 55 - 56 - - pins: An array of strings, each string containing the name of a pin. 57 - These pins are used for selecting the pull control and schmitt 58 - trigger parameters. The following are the list of pins 59 - available: 60 - 61 - eth_txd0, eth_txd1, eth_txd2, eth_txd3, eth_txen, eth_rxer, 62 - eth_crs_dv, eth_rxd1, eth_rxd0, eth_rxd2, eth_rxd3, eth_ref_clk, 63 - eth_mdc, eth_mdio, sirq0, sirq1, sirq2, i2s_d0, i2s_bclk0, 64 - i2s_lrclk0, i2s_mclk0, i2s_d1, i2s_bclk1, i2s_lrclk1, i2s_mclk1, 65 - pcm1_in, pcm1_clk, pcm1_sync, pcm1_out, ks_in0, ks_in1, ks_in2, 66 - ks_in3, ks_out0, ks_out1, ks_out2, lvds_oep, lvds_oen, lvds_odp, 67 - lvds_odn, lvds_ocp, lvds_ocn, lvds_obp, lvds_obn, lvds_oap, 68 - lvds_oan, lvds_eep, lvds_een, lvds_edp, lvds_edn, lvds_ecp, 69 - lvds_ecn, lvds_ebp, lvds_ebn, lvds_eap, lvds_ean, lcd0_d18, 70 - lcd0_d2, dsi_dp3, dsi_dn3, dsi_dp1, dsi_dn1, dsi_cp, dsi_cn, 71 - dsi_dp0, dsi_dn0, dsi_dp2, dsi_dn2, sd0_d0, sd0_d1, sd0_d2, 72 - sd0_d3, sd1_d0, sd1_d1, sd1_d2, sd1_d3, sd0_cmd, sd0_clk, 73 - sd1_cmd, sd1_clk, spi0_ss, spi0_miso, uart0_rx, uart0_tx, 74 - uart2_rx, uart2_tx, uart2_rtsb, uart2_ctsb, uart3_rx, uart3_tx, 75 - uart3_rtsb, uart3_ctsb, i2c0_sclk, i2c0_sdata, i2c1_sclk, 76 - i2c1_sdata, i2c2_sdata, csi_dn0, csi_dp0, csi_dn1, csi_dp1, 77 - csi_cn, csi_cp, csi_dn2, csi_dp2, csi_dn3, csi_dp3, 78 - sensor0_pclk, sensor0_ckout, dnand_d0, dnand_d1, dnand_d2, 79 - dnand_d3, dnand_d4, dnand_d5, dnand_d6, dnand_d7, dnand_wrb, 80 - dnand_rdb, dnand_rdbn, dnand_dqs, dnand_dqsn, dnand_rb0, 81 - dnand_ale, dnand_cle, dnand_ceb0, dnand_ceb1, dnand_ceb2, 82 - dnand_ceb3, porb, clko_25m, bsel, pkg0, pkg1, pkg2, pkg3 83 - 84 - - groups: An array of strings, each string containing the name of a pin 85 - group. These pin groups are used for selecting the pinmux 86 - functions. 87 - rgmii_txd23_mfp, rgmii_rxd2_mfp, rgmii_rxd3_mfp, lcd0_d18_mfp, 88 - rgmii_txd01_mfp, rgmii_txd0_mfp, rgmii_txd1_mfp, rgmii_txen_mfp, 89 - rgmii_rxen_mfp, rgmii_rxd1_mfp, rgmii_rxd0_mfp, rgmii_ref_clk_mfp, 90 - i2s_d0_mfp, i2s_pcm1_mfp, i2s0_pcm0_mfp, i2s1_pcm0_mfp, 91 - i2s_d1_mfp, ks_in2_mfp, ks_in1_mfp, ks_in0_mfp, ks_in3_mfp, 92 - ks_out0_mfp, ks_out1_mfp, ks_out2_mfp, lvds_o_pn_mfp, dsi_dn0_mfp, 93 - dsi_dp2_mfp, lcd0_d2_mfp, dsi_dp3_mfp, dsi_dn3_mfp, dsi_dp0_mfp, 94 - lvds_ee_pn_mfp, uart2_rx_tx_mfp, spi0_i2c_pcm_mfp, dsi_dnp1_cp_d2_mfp, 95 - dsi_dnp1_cp_d17_mfp, lvds_e_pn_mfp, dsi_dn2_mfp, uart2_rtsb_mfp, 96 - uart2_ctsb_mfp, uart3_rtsb_mfp, uart3_ctsb_mfp, sd0_d0_mfp, sd0_d1_mfp, 97 - sd0_d2_d3_mfp, sd1_d0_d3_mfp, sd0_cmd_mfp, sd0_clk_mfp, sd1_cmd_mfp, 98 - uart0_rx_mfp, clko_25m_mfp, csi_cn_cp_mfp, sens0_ckout_mfp, uart0_tx_mfp, 99 - i2c0_mfp, csi_dn_dp_mfp, sen0_pclk_mfp, pcm1_in_mfp, pcm1_clk_mfp, 100 - pcm1_sync_mfp, pcm1_out_mfp, dnand_data_wr_mfp, dnand_acle_ce0_mfp, 101 - nand_ceb2_mfp, nand_ceb3_mfp 102 - 103 - These pin groups are used for selecting the drive strength 104 - parameters. 105 - 106 - sirq_drv, rgmii_txd23_drv, rgmii_rxd23_drv, rgmii_txd01_txen_drv, 107 - rgmii_rxer_drv, rgmii_crs_drv, rgmii_rxd10_drv, rgmii_ref_clk_drv, 108 - smi_mdc_mdio_drv, i2s_d0_drv, i2s_bclk0_drv, i2s3_drv, i2s13_drv, 109 - pcm1_drv, ks_in_drv, ks_out_drv, lvds_all_drv, lcd_d18_d2_drv, 110 - dsi_all_drv, sd0_d0_d3_drv, sd0_cmd_drv, sd0_clk_drv, spi0_all_drv, 111 - uart0_rx_drv, uart0_tx_drv, uart2_all_drv, i2c0_all_drv, i2c12_all_drv, 112 - sens0_pclk_drv, sens0_ckout_drv, uart3_all_drv 113 - 114 - - function: An array of strings, each string containing the name of the 115 - pinmux functions. These functions can only be selected by 116 - the corresponding pin groups. The following are the list of 117 - pinmux functions available: 118 - 119 - nor, eth_rgmii, eth_sgmii, spi0, spi1, spi2, spi3, seNs0, sens1, 120 - uart0, uart1, uart2, uart3, uart4, uart5, uart6, i2s0, i2s1, 121 - pcm1, pcm0, ks, jtag, pwm0, pwm1, pwm2, pwm3, pwm4, pwm5, p0, 122 - sd0, sd1, sd2, i2c0, i2c1, i2c2, i2c3, dsi, lvds, usb30, 123 - clko_25m, mipi_csi, nand, spdif, sirq0, sirq1, sirq2, bt, lcd0 124 - 125 - Optional Properties: 126 - 127 - - bias-pull-down: No arguments. The specified pins should be configured as 128 - pull down. 129 - - bias-pull-up: No arguments. The specified pins should be configured as 130 - pull up. 131 - - input-schmitt-enable: No arguments: Enable schmitt trigger for the specified 132 - pins 133 - - input-schmitt-disable: No arguments: Disable schmitt trigger for the specified 134 - pins 135 - - drive-strength: Integer. Selects the drive strength for the specified 136 - pins in mA. 137 - Valid values are: 138 - <2> 139 - <4> 140 - <8> 141 - <12> 142 - 143 - Example: 144 - 145 - pinctrl: pinctrl@e01b0000 { 146 - compatible = "actions,s700-pinctrl"; 147 - reg = <0x0 0xe01b0000 0x0 0x1000>; 148 - clocks = <&cmu CLK_GPIO>; 149 - gpio-controller; 150 - gpio-ranges = <&pinctrl 0 0 136>; 151 - #gpio-cells = <2>; 152 - interrupt-controller; 153 - #interrupt-cells = <2>; 154 - interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>, 155 - <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>, 156 - <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>, 157 - <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>, 158 - <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>; 159 - 160 - uart3-default: uart3-default { 161 - pinmux { 162 - groups = "uart3_rtsb_mfp", "uart3_ctsb_mfp"; 163 - function = "uart3"; 164 - }; 165 - pinconf { 166 - groups = "uart3_all_drv"; 167 - drive-strength = <2>; 168 - }; 169 - }; 170 - };
+204
Documentation/devicetree/bindings/pinctrl/actions,s700-pinctrl.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/pinctrl/actions,s700-pinctrl.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Actions Semi S700 Pin Controller 8 + 9 + maintainers: 10 + - Manivannan Sadhasivam <mani@kernel.org> 11 + 12 + properties: 13 + compatible: 14 + const: actions,s700-pinctrl 15 + 16 + reg: 17 + maxItems: 1 18 + 19 + clocks: 20 + maxItems: 1 21 + 22 + gpio-controller: true 23 + 24 + gpio-line-names: 25 + maxItems: 136 26 + 27 + gpio-ranges: true 28 + 29 + '#gpio-cells': 30 + const: 2 31 + 32 + interrupt-controller: true 33 + 34 + '#interrupt-cells': 35 + const: 2 36 + 37 + interrupts: 38 + maxItems: 5 39 + description: 40 + The interrupt outputs from the controller. There is one GPIO interrupt per 41 + GPIO bank. The interrupts must be ordered by bank, starting with 42 + bank 0. 43 + 44 + additionalProperties: 45 + type: object 46 + description: Pin configuration subnode 47 + additionalProperties: false 48 + 49 + properties: 50 + pinmux: 51 + description: Configure pin multiplexing. 52 + type: object 53 + $ref: /schemas/pinctrl/pinmux-node.yaml# 54 + additionalProperties: false 55 + 56 + properties: 57 + groups: 58 + items: 59 + enum: [ 60 + rgmii_txd23_mfp, rgmii_rxd2_mfp, rgmii_rxd3_mfp, lcd0_d18_mfp, 61 + rgmii_txd01_mfp, rgmii_txd0_mfp, rgmii_txd1_mfp, rgmii_txen_mfp, 62 + rgmii_rxen_mfp, rgmii_rxd1_mfp, rgmii_rxd0_mfp, rgmii_ref_clk_mfp, 63 + i2c1_dummy, i2c2_dummy, i2s_d0_mfp, i2s_pcm1_mfp, i2s0_pcm0_mfp, i2s1_pcm0_mfp, 64 + i2s_d1_mfp, ks_in2_mfp, ks_in1_mfp, ks_in0_mfp, ks_in3_mfp, 65 + ks_out0_mfp, ks_out1_mfp, ks_out2_mfp, lvds_o_pn_mfp, dsi_dn0_mfp, 66 + dsi_dp2_mfp, lcd0_d2_mfp, dsi_dp3_mfp, dsi_dn3_mfp, dsi_dp0_mfp, 67 + lvds_ee_pn_mfp, uart2_rx_tx_mfp, spi0_i2c_pcm_mfp, 68 + dsi_dnp1_cp_d2_mfp, dsi_dnp1_cp_d17_mfp, lvds_e_pn_mfp, 69 + dsi_dn2_mfp, uart2_rtsb_mfp, uart2_ctsb_mfp, uart3_rtsb_mfp, 70 + uart3_ctsb_mfp, sd0_d0_mfp, sd0_d1_mfp, sd0_d2_d3_mfp, 71 + sd1_d0_d3_mfp, sd0_cmd_mfp, sd0_clk_mfp, sd1_cmd_mfp, 72 + uart0_rx_mfp, clko_25m_mfp, csi_cn_cp_mfp, sens0_ckout_mfp, 73 + uart0_tx_mfp, i2c0_mfp, csi_dn_dp_mfp, sen0_pclk_mfp, pcm1_in_mfp, 74 + pcm1_clk_mfp, pcm1_sync_mfp, pcm1_out_mfp, dnand_data_wr_mfp, 75 + dnand_acle_ce0_mfp, nand_ceb2_mfp, nand_ceb3_mfp 76 + ] 77 + 78 + function: 79 + items: 80 + enum: [ 81 + nor, eth_rgmii, eth_sgmii, spi0, spi1, spi2, spi3, seNs0, sens1, 82 + uart0, uart1, uart2, uart3, uart4, uart5, uart6, i2s0, i2s1, pcm1, 83 + pcm0, ks, jtag, pwm0, pwm1, pwm2, pwm3, pwm4, pwm5, p0, sd0, sd1, 84 + sd2, i2c0, i2c1, i2c2, i2c3, dsi, lvds, usb30, clko_25m, mipi_csi, 85 + nand, spdif, sirq0, sirq1, sirq2, bt, lcd0 86 + ] 87 + 88 + required: 89 + - groups 90 + - function 91 + 92 + pinconf: 93 + description: Configure pin-specific parameters. 94 + type: object 95 + allOf: 96 + - $ref: /schemas/pinctrl/pincfg-node.yaml# 97 + - $ref: /schemas/pinctrl/pinmux-node.yaml# 98 + additionalProperties: false 99 + 100 + properties: 101 + groups: 102 + items: 103 + enum: [ 104 + sirq_drv, rgmii_txd23_drv, rgmii_rxd23_drv, rgmii_txd01_txen_drv, 105 + rgmii_rxer_drv, rgmii_crs_drv, rgmii_rxd10_drv, rgmii_ref_clk_drv, 106 + smi_mdc_mdio_drv, i2s_d0_drv, i2s_bclk0_drv, i2s3_drv, i2s13_drv, 107 + pcm1_drv, ks_in_drv, ks_out_drv, lvds_all_drv, lcd_d18_d2_drv, 108 + dsi_all_drv, sd0_d0_d3_drv, sd0_cmd_drv, sd0_clk_drv, 109 + spi0_all_drv, uart0_rx_drv, uart0_tx_drv, uart2_all_drv, 110 + i2c0_all_drv, i2c12_all_drv, sens0_pclk_drv, sens0_ckout_drv, 111 + uart3_all_drv 112 + ] 113 + 114 + pins: 115 + items: 116 + enum: [ 117 + eth_txd0, eth_txd1, eth_txd2, eth_txd3, eth_txen, eth_rxer, 118 + eth_crs_dv, eth_rxd1, eth_rxd0, eth_rxd2, eth_rxd3, eth_ref_clk, 119 + eth_mdc, eth_mdio, sirq0, sirq1, sirq2, i2s_d0, i2s_bclk0, 120 + i2s_lrclk0, i2s_mclk0, i2s_d1, i2s_bclk1, i2s_lrclk1, i2s_mclk1, 121 + pcm1_in, pcm1_clk, pcm1_sync, pcm1_out, ks_in0, ks_in1, ks_in2, 122 + ks_in3, ks_out0, ks_out1, ks_out2, lvds_oep, lvds_oen, lvds_odp, 123 + lvds_odn, lvds_ocp, lvds_ocn, lvds_obp, lvds_obn, lvds_oap, 124 + lvds_oan, lvds_eep, lvds_een, lvds_edp, lvds_edn, lvds_ecp, 125 + lvds_ecn, lvds_ebp, lvds_ebn, lvds_eap, lvds_ean, lcd0_d18, 126 + lcd0_d2, dsi_dp3, dsi_dn3, dsi_dp1, dsi_dn1, dsi_cp, dsi_cn, 127 + dsi_dp0, dsi_dn0, dsi_dp2, dsi_dn2, sd0_d0, sd0_d1, sd0_d2, 128 + sd0_d3, sd1_d0, sd1_d1, sd1_d2, sd1_d3, sd0_cmd, sd0_clk, sd1_cmd, 129 + sd1_clk, spi0_ss, spi0_miso, uart0_rx, uart0_tx, uart2_rx, 130 + uart2_tx, uart2_rtsb, uart2_ctsb, uart3_rx, uart3_tx, uart3_rtsb, 131 + uart3_ctsb, i2c0_sclk, i2c0_sdata, i2c1_sclk, i2c1_sdata, 132 + i2c2_sclk, i2c2_sdata, csi_dn0, csi_dp0, csi_dn1, csi_dp1, csi_cn, csi_cp, 133 + csi_dn2, csi_dp2, csi_dn3, csi_dp3, sensor0_pclk, sensor0_ckout, 134 + dnand_d0, dnand_d1, dnand_d2, dnand_d3, dnand_d4, dnand_d5, 135 + dnand_d6, dnand_d7, dnand_wrb, dnand_rdb, dnand_rdbn, dnand_dqs, 136 + dnand_dqsn, dnand_rb0, dnand_ale, dnand_cle, dnand_ceb0, 137 + dnand_ceb1, dnand_ceb2, dnand_ceb3, porb, clko_25m, bsel, pkg0, 138 + pkg1, pkg2, pkg3 139 + ] 140 + 141 + bias-pull-down: 142 + type: boolean 143 + 144 + bias-pull-up: 145 + type: boolean 146 + 147 + drive-strength: 148 + description: Selects the drive strength for the specified pins in mA. 149 + enum: [2, 4, 8, 12] 150 + 151 + input-schmitt-enable: true 152 + input-schmitt-disable: true 153 + 154 + oneOf: 155 + - required: 156 + - groups 157 + - required: 158 + - pins 159 + 160 + anyOf: 161 + - required: [ pinmux ] 162 + - required: [ pinconf ] 163 + 164 + required: 165 + - compatible 166 + - reg 167 + - clocks 168 + - gpio-controller 169 + - gpio-ranges 170 + - '#gpio-cells' 171 + - interrupt-controller 172 + - '#interrupt-cells' 173 + - interrupts 174 + 175 + examples: 176 + - | 177 + #include <dt-bindings/interrupt-controller/arm-gic.h> 178 + 179 + pinctrl: pinctrl@e01b0000 { 180 + compatible = "actions,s700-pinctrl"; 181 + reg = <0xe01b0000 0x1000>; 182 + clocks = <&cmu 1>; 183 + gpio-controller; 184 + gpio-ranges = <&pinctrl 0 0 136>; 185 + #gpio-cells = <2>; 186 + interrupt-controller; 187 + #interrupt-cells = <2>; 188 + interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>, 189 + <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>, 190 + <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>, 191 + <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>, 192 + <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>; 193 + 194 + uart3-default { 195 + pinmux { 196 + groups = "uart3_rtsb_mfp", "uart3_ctsb_mfp"; 197 + function = "uart3"; 198 + }; 199 + pinconf { 200 + groups = "uart3_all_drv"; 201 + drive-strength = <2>; 202 + }; 203 + }; 204 + };
-204
Documentation/devicetree/bindings/pinctrl/actions,s900-pinctrl.txt
··· 1 - Actions Semi S900 Pin Controller 2 - 3 - This binding describes the pin controller found in the S900 SoC. 4 - 5 - Required Properties: 6 - 7 - - compatible: Should be "actions,s900-pinctrl" 8 - - reg: Should contain the register base address and size of 9 - the pin controller. 10 - - clocks: phandle of the clock feeding the pin controller 11 - - gpio-controller: Marks the device node as a GPIO controller. 12 - - gpio-ranges: Specifies the mapping between gpio controller and 13 - pin-controller pins. 14 - - #gpio-cells: Should be two. The first cell is the gpio pin number 15 - and the second cell is used for optional parameters. 16 - - interrupt-controller: Marks the device node as an interrupt controller. 17 - - #interrupt-cells: Specifies the number of cells needed to encode an 18 - interrupt. Shall be set to 2. The first cell 19 - defines the interrupt number, the second encodes 20 - the trigger flags described in 21 - bindings/interrupt-controller/interrupts.txt 22 - - interrupts: The interrupt outputs from the controller. There is one GPIO 23 - interrupt per GPIO bank. The number of interrupts listed depends 24 - on the number of GPIO banks on the SoC. The interrupts must be 25 - ordered by bank, starting with bank 0. 26 - 27 - Please refer to pinctrl-bindings.txt in this directory for details of the 28 - common pinctrl bindings used by client devices, including the meaning of the 29 - phrase "pin configuration node". 30 - 31 - The pin configuration nodes act as a container for an arbitrary number of 32 - subnodes. Each of these subnodes represents some desired configuration for a 33 - pin, a group, or a list of pins or groups. This configuration can include the 34 - mux function to select on those group(s), and various pin configuration 35 - parameters, such as pull-up, drive strength, etc. 36 - 37 - PIN CONFIGURATION NODES: 38 - 39 - The name of each subnode is not important; all subnodes should be enumerated 40 - and processed purely based on their content. 41 - 42 - Each subnode only affects those parameters that are explicitly listed. In 43 - other words, a subnode that lists a mux function but no pin configuration 44 - parameters implies no information about any pin configuration parameters. 45 - Similarly, a pin subnode that describes a pullup parameter implies no 46 - information about e.g. the mux function. 47 - 48 - Pinmux functions are available only for the pin groups while pinconf 49 - parameters are available for both pin groups and individual pins. 50 - 51 - The following generic properties as defined in pinctrl-bindings.txt are valid 52 - to specify in a pin configuration subnode: 53 - 54 - Required Properties: 55 - 56 - - pins: An array of strings, each string containing the name of a pin. 57 - These pins are used for selecting the pull control and schmitt 58 - trigger parameters. The following are the list of pins 59 - available: 60 - 61 - eth_txd0, eth_txd1, eth_txen, eth_rxer, eth_crs_dv, 62 - eth_rxd1, eth_rxd0, eth_ref_clk, eth_mdc, eth_mdio, 63 - sirq0, sirq1, sirq2, i2s_d0, i2s_bclk0, i2s_lrclk0, 64 - i2s_mclk0, i2s_d1, i2s_bclk1, i2s_lrclk1, i2s_mclk1, 65 - pcm1_in, pcm1_clk, pcm1_sync, pcm1_out, eram_a5, 66 - eram_a6, eram_a7, eram_a8, eram_a9, eram_a10, eram_a11, 67 - lvds_oep, lvds_oen, lvds_odp, lvds_odn, lvds_ocp, 68 - lvds_ocn, lvds_obp, lvds_obn, lvds_oap, lvds_oan, 69 - lvds_eep, lvds_een, lvds_edp, lvds_edn, lvds_ecp, 70 - lvds_ecn, lvds_ebp, lvds_ebn, lvds_eap, lvds_ean, 71 - sd0_d0, sd0_d1, sd0_d2, sd0_d3, sd1_d0, sd1_d1, 72 - sd1_d2, sd1_d3, sd0_cmd, sd0_clk, sd1_cmd, sd1_clk, 73 - spi0_sclk, spi0_ss, spi0_miso, spi0_mosi, uart0_rx, 74 - uart0_tx, uart2_rx, uart2_tx, uart2_rtsb, uart2_ctsb, 75 - uart3_rx, uart3_tx, uart3_rtsb, uart3_ctsb, uart4_rx, 76 - uart4_tx, i2c0_sclk, i2c0_sdata, i2c1_sclk, i2c1_sdata, 77 - i2c2_sclk, i2c2_sdata, csi0_dn0, csi0_dp0, csi0_dn1, 78 - csi0_dp1, csi0_cn, csi0_cp, csi0_dn2, csi0_dp2, csi0_dn3, 79 - csi0_dp3, dsi_dp3, dsi_dn3, dsi_dp1, dsi_dn1, dsi_cp, 80 - dsi_cn, dsi_dp0, dsi_dn0, dsi_dp2, dsi_dn2, sensor0_pclk, 81 - csi1_dn0,csi1_dp0,csi1_dn1, csi1_dp1, csi1_cn, csi1_cp, 82 - sensor0_ckout, nand0_d0, nand0_d1, nand0_d2, nand0_d3, 83 - nand0_d4, nand0_d5, nand0_d6, nand0_d7, nand0_dqs, 84 - nand0_dqsn, nand0_ale, nand0_cle, nand0_ceb0, nand0_ceb1, 85 - nand0_ceb2, nand0_ceb3, nand1_d0, nand1_d1, nand1_d2, 86 - nand1_d3, nand1_d4, nand1_d5, nand1_d6, nand1_d7, nand1_dqs, 87 - nand1_dqsn, nand1_ale, nand1_cle, nand1_ceb0, nand1_ceb1, 88 - nand1_ceb2, nand1_ceb3, sgpio0, sgpio1, sgpio2, sgpio3 89 - 90 - - groups: An array of strings, each string containing the name of a pin 91 - group. These pin groups are used for selecting the pinmux 92 - functions. 93 - 94 - lvds_oxx_uart4_mfp, rmii_mdc_mfp, rmii_mdio_mfp, sirq0_mfp, 95 - sirq1_mfp, rmii_txd0_mfp, rmii_txd1_mfp, rmii_txen_mfp, 96 - rmii_rxer_mfp, rmii_crs_dv_mfp, rmii_rxd1_mfp, rmii_rxd0_mfp, 97 - rmii_ref_clk_mfp, i2s_d0_mfp, i2s_d1_mfp, i2s_lr_m_clk0_mfp, 98 - i2s_bclk0_mfp, i2s_bclk1_mclk1_mfp, pcm1_in_out_mfp, 99 - pcm1_clk_mfp, pcm1_sync_mfp, eram_a5_mfp, eram_a6_mfp, 100 - eram_a7_mfp, eram_a8_mfp, eram_a9_mfp, eram_a10_mfp, 101 - eram_a11_mfp, lvds_oep_odn_mfp, lvds_ocp_obn_mfp, 102 - lvds_oap_oan_mfp, lvds_e_mfp, spi0_sclk_mosi_mfp, spi0_ss_mfp, 103 - spi0_miso_mfp, uart2_rtsb_mfp, uart2_ctsb_mfp, uart3_rtsb_mfp, 104 - uart3_ctsb_mfp, sd0_d0_mfp, sd0_d1_mfp, sd0_d2_d3_mfp, 105 - sd1_d0_d3_mfp, sd0_cmd_mfp, sd0_clk_mfp, sd1_cmd_clk_mfp, 106 - uart0_rx_mfp, nand0_d0_ceb3_mfp, uart0_tx_mfp, i2c0_mfp, 107 - csi0_cn_cp_mfp, csi0_dn0_dp3_mfp, csi1_dn0_cp_mfp, 108 - dsi_dp3_dn1_mfp, dsi_cp_dn0_mfp, dsi_dp2_dn2_mfp, 109 - nand1_d0_ceb1_mfp, nand1_ceb3_mfp, nand1_ceb0_mfp, 110 - csi1_dn0_dp0_mfp, uart4_rx_tx_mfp 111 - 112 - 113 - These pin groups are used for selecting the drive strength 114 - parameters. 115 - 116 - sgpio3_drv, sgpio2_drv, sgpio1_drv, sgpio0_drv, 117 - rmii_tx_d0_d1_drv, rmii_txen_rxer_drv, rmii_crs_dv_drv, 118 - rmii_rx_d1_d0_drv, rmii_ref_clk_drv, rmii_mdc_mdio_drv, 119 - sirq_0_1_drv, sirq2_drv, i2s_d0_d1_drv, i2s_lr_m_clk0_drv, 120 - i2s_blk1_mclk1_drv, pcm1_in_out_drv, lvds_oap_oan_drv, 121 - lvds_oep_odn_drv, lvds_ocp_obn_drv, lvds_e_drv, sd0_d3_d0_drv, 122 - sd1_d3_d0_drv, sd0_sd1_cmd_clk_drv, spi0_sclk_mosi_drv, 123 - spi0_ss_miso_drv, uart0_rx_tx_drv, uart4_rx_tx_drv, uart2_drv, 124 - uart3_drv, i2c0_drv, i2c1_drv, i2c2_drv, sensor0_drv 125 - 126 - These pin groups are used for selecting the slew rate 127 - parameters. 128 - 129 - sgpio3_sr, sgpio2_sr, sgpio1_sr, sgpio0_sr, rmii_tx_d0_d1_sr, 130 - rmii_txen_rxer_sr, rmii_crs_dv_sr, rmii_rx_d1_d0_sr, 131 - rmii_ref_clk_sr, rmii_mdc_mdio_sr, sirq_0_1_sr, sirq2_sr, 132 - i2s_do_d1_sr, i2s_lr_m_clk0_sr, i2s_bclk0_mclk1_sr, 133 - pcm1_in_out_sr, sd1_d3_d0_sr, sd0_sd1_clk_cmd_sr, 134 - spi0_sclk_mosi_sr, spi0_ss_miso_sr, uart0_rx_tx_sr, 135 - uart4_rx_tx_sr, uart2_sr, uart3_sr, i2c0_sr, i2c1_sr, i2c2_sr, 136 - sensor0_sr 137 - 138 - - function: An array of strings, each string containing the name of the 139 - pinmux functions. These functions can only be selected by 140 - the corresponding pin groups. The following are the list of 141 - pinmux functions available: 142 - 143 - eram, eth_rmii, eth_smii, spi0, spi1, spi2, spi3, sens0, 144 - uart0, uart1, uart2, uart3, uart4, uart5, uart6, i2s0, i2s1, 145 - pcm0, pcm1, jtag, pwm0, pwm1, pwm2, pwm3, pwm4, pwm5, sd0, 146 - sd1, sd2, sd3, i2c0, i2c1, i2c2, i2c3, i2c4, i2c5, lvds, 147 - usb30, usb20, gpu, mipi_csi0, mipi_csi1, mipi_dsi, nand0, 148 - nand1, spdif, sirq0, sirq1, sirq2 149 - 150 - Optional Properties: 151 - 152 - - bias-bus-hold: No arguments. The specified pins should retain the previous 153 - state value. 154 - - bias-high-impedance: No arguments. The specified pins should be configured 155 - as high impedance. 156 - - bias-pull-down: No arguments. The specified pins should be configured as 157 - pull down. 158 - - bias-pull-up: No arguments. The specified pins should be configured as 159 - pull up. 160 - - input-schmitt-enable: No arguments: Enable schmitt trigger for the specified 161 - pins 162 - - input-schmitt-disable: No arguments: Disable schmitt trigger for the specified 163 - pins 164 - - slew-rate: Integer. Sets slew rate for the specified pins. 165 - Valid values are: 166 - <0> - Slow 167 - <1> - Fast 168 - - drive-strength: Integer. Selects the drive strength for the specified 169 - pins in mA. 170 - Valid values are: 171 - <2> 172 - <4> 173 - <8> 174 - <12> 175 - 176 - Example: 177 - 178 - pinctrl: pinctrl@e01b0000 { 179 - compatible = "actions,s900-pinctrl"; 180 - reg = <0x0 0xe01b0000 0x0 0x1000>; 181 - clocks = <&cmu CLK_GPIO>; 182 - gpio-controller; 183 - gpio-ranges = <&pinctrl 0 0 146>; 184 - #gpio-cells = <2>; 185 - interrupt-controller; 186 - #interrupt-cells = <2>; 187 - interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>, 188 - <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>, 189 - <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>, 190 - <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>, 191 - <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>, 192 - <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>; 193 - 194 - uart2-default: uart2-default { 195 - pinmux { 196 - groups = "lvds_oep_odn_mfp"; 197 - function = "uart2"; 198 - }; 199 - pinconf { 200 - groups = "lvds_oep_odn_drv"; 201 - drive-strength = <12>; 202 - }; 203 - }; 204 - };
+219
Documentation/devicetree/bindings/pinctrl/actions,s900-pinctrl.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/pinctrl/actions,s900-pinctrl.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Actions Semi S900 Pin Controller 8 + 9 + maintainers: 10 + - Manivannan Sadhasivam <mani@kernel.org> 11 + 12 + properties: 13 + compatible: 14 + const: actions,s900-pinctrl 15 + 16 + reg: 17 + maxItems: 1 18 + 19 + interrupts: 20 + maxItems: 6 21 + description: The interrupt outputs from the controller. There is one GPIO 22 + interrupt per GPIO bank. The number of interrupts listed depends on the 23 + number of GPIO banks on the SoC. The interrupts must be ordered by bank, 24 + starting with bank 0. 25 + 26 + interrupt-controller: true 27 + 28 + "#interrupt-cells": 29 + const: 2 30 + 31 + clocks: 32 + maxItems: 1 33 + 34 + gpio-controller: true 35 + 36 + gpio-line-names: 37 + maxItems: 146 38 + 39 + gpio-ranges: true 40 + 41 + "#gpio-cells": 42 + const: 2 43 + 44 + required: 45 + - compatible 46 + - reg 47 + - interrupts 48 + - interrupt-controller 49 + - "#interrupt-cells" 50 + - clocks 51 + - gpio-controller 52 + - gpio-ranges 53 + - "#gpio-cells" 54 + 55 + additionalProperties: 56 + type: object 57 + description: Pin configuration subnode 58 + additionalProperties: false 59 + 60 + properties: 61 + pinmux: 62 + type: object 63 + description: Pin mux configuration 64 + $ref: /schemas/pinctrl/pinmux-node.yaml# 65 + additionalProperties: false 66 + 67 + properties: 68 + groups: 69 + items: 70 + enum: [ 71 + lvds_oxx_uart4_mfp, rmii_mdc_mfp, rmii_mdio_mfp, sirq0_mfp, 72 + sirq1_mfp, rmii_txd0_mfp, rmii_txd1_mfp, rmii_txen_mfp, 73 + rmii_rxer_mfp, rmii_crs_dv_mfp, rmii_rxd1_mfp, rmii_rxd0_mfp, 74 + rmii_ref_clk_mfp, i2s_d0_mfp, i2s_d1_mfp, i2s_lr_m_clk0_mfp, 75 + i2s_bclk0_mfp, i2s_bclk1_mclk1_mfp, pcm1_in_out_mfp, pcm1_clk_mfp, 76 + pcm1_sync_mfp, eram_a5_mfp, eram_a6_mfp, eram_a7_mfp, eram_a8_mfp, 77 + eram_a9_mfp, eram_a10_mfp, eram_a11_mfp, lvds_oep_odn_mfp, 78 + lvds_ocp_obn_mfp, lvds_oap_oan_mfp, lvds_e_mfp, 79 + spi0_sclk_mosi_mfp, spi0_ss_mfp, spi0_miso_mfp, uart2_rtsb_mfp, 80 + uart2_ctsb_mfp, uart3_rtsb_mfp, uart3_ctsb_mfp, sd0_d0_mfp, 81 + sd0_d1_mfp, sd0_d2_d3_mfp, sd1_d0_d3_mfp, sd0_cmd_mfp, 82 + sd0_clk_mfp, sd1_cmd_clk_mfp, uart0_rx_mfp, nand0_d0_ceb3_mfp, 83 + uart0_tx_mfp, i2c0_mfp, csi0_cn_cp_mfp, csi0_dn0_dp3_mfp, 84 + csi1_dn0_cp_mfp, dsi_dp3_dn1_mfp, dsi_cp_dn0_mfp, dsi_dp2_dn2_mfp, 85 + nand1_d0_ceb1_mfp, nand1_ceb3_mfp, nand1_ceb0_mfp, 86 + csi1_dn0_dp0_mfp, uart4_rx_tx_mfp 87 + ] 88 + 89 + function: 90 + items: 91 + enum: [ 92 + eram, eth_rmii, eth_smii, spi0, spi1, spi2, spi3, sens0, 93 + uart0, uart1, uart2, uart3, uart4, uart5, uart6, i2s0, i2s1, 94 + pcm0, pcm1, jtag, pwm0, pwm1, pwm2, pwm3, pwm4, pwm5, sd0, 95 + sd1, sd2, sd3, i2c0, i2c1, i2c2, i2c3, i2c4, i2c5, lvds, 96 + usb30, usb20, gpu, mipi_csi0, mipi_csi1, mipi_dsi, nand0, 97 + nand1, spdif, sirq0, sirq1, sirq2 98 + ] 99 + 100 + required: 101 + - groups 102 + - function 103 + 104 + pinconf: 105 + type: object 106 + description: Pin configuration parameters 107 + allOf: 108 + - $ref: /schemas/pinctrl/pincfg-node.yaml# 109 + - $ref: /schemas/pinctrl/pinmux-node.yaml# 110 + 111 + additionalProperties: false 112 + 113 + properties: 114 + groups: 115 + items: 116 + enum: [ 117 + # pin groups for drive strength 118 + sgpio3_drv, sgpio2_drv, sgpio1_drv, sgpio0_drv, rmii_tx_d0_d1_drv, 119 + rmii_txen_rxer_drv, rmii_crs_dv_drv, rmii_rx_d1_d0_drv, 120 + rmii_ref_clk_drv, rmii_mdc_mdio_drv, sirq_0_1_drv, sirq2_drv, 121 + i2s_d0_d1_drv, i2s_lr_m_clk0_drv, i2s_blk1_mclk1_drv, 122 + pcm1_in_out_drv, lvds_oap_oan_drv, lvds_oep_odn_drv, 123 + lvds_ocp_obn_drv, lvds_e_drv, sd0_d3_d0_drv, sd1_d3_d0_drv, 124 + sd0_sd1_cmd_clk_drv, spi0_sclk_mosi_drv, spi0_ss_miso_drv, 125 + uart0_rx_tx_drv, uart4_rx_tx_drv, uart2_drv, uart3_drv, i2c0_drv, 126 + i2c1_drv, i2c2_drv, sensor0_drv, 127 + # pin groups for slew rate 128 + sgpio3_sr, sgpio2_sr, sgpio1_sr, sgpio0_sr, rmii_tx_d0_d1_sr, 129 + rmii_txen_rxer_sr, rmii_crs_dv_sr, rmii_rx_d1_d0_sr, 130 + rmii_ref_clk_sr, rmii_mdc_mdio_sr, sirq_0_1_sr, sirq2_sr, 131 + i2s_do_d1_sr, i2s_lr_m_clk0_sr, i2s_bclk0_mclk1_sr, 132 + pcm1_in_out_sr, sd1_d3_d0_sr, sd0_sd1_clk_cmd_sr, 133 + spi0_sclk_mosi_sr, spi0_ss_miso_sr, uart0_rx_tx_sr, 134 + uart4_rx_tx_sr, uart2_sr, uart3_sr, i2c0_sr, i2c1_sr, i2c2_sr, 135 + sensor0_sr 136 + ] 137 + 138 + pins: 139 + items: 140 + enum: [ 141 + eth_txd0, eth_txd1, eth_txen, eth_rxer, eth_crs_dv, eth_rxd1, 142 + eth_rxd0, eth_ref_clk, eth_mdc, eth_mdio, sirq0, sirq1, sirq2, 143 + i2s_d0, i2s_bclk0, i2s_lrclk0, i2s_mclk0, i2s_d1, i2s_bclk1, 144 + i2s_lrclk1, i2s_mclk1, pcm1_in, pcm1_clk, pcm1_sync, pcm1_out, 145 + eram_a5, eram_a6, eram_a7, eram_a8, eram_a9, eram_a10, eram_a11, 146 + lvds_oep, lvds_oen, lvds_odp, lvds_odn, lvds_ocp, lvds_ocn, 147 + lvds_obp, lvds_obn, lvds_oap, lvds_oan, lvds_eep, lvds_een, 148 + lvds_edp, lvds_edn, lvds_ecp, lvds_ecn, lvds_ebp, lvds_ebn, 149 + lvds_eap, lvds_ean, sd0_d0, sd0_d1, sd0_d2, sd0_d3, sd1_d0, 150 + sd1_d1, sd1_d2, sd1_d3, sd0_cmd, sd0_clk, sd1_cmd, sd1_clk, 151 + spi0_sclk, spi0_ss, spi0_miso, spi0_mosi, uart0_rx, uart0_tx, 152 + uart2_rx, uart2_tx, uart2_rtsb, uart2_ctsb, uart3_rx, uart3_tx, 153 + uart3_rtsb, uart3_ctsb, uart4_rx, uart4_tx, i2c0_sclk, i2c0_sdata, 154 + i2c1_sclk, i2c1_sdata, i2c2_sclk, i2c2_sdata, csi0_dn0, csi0_dp0, 155 + csi0_dn1, csi0_dp1, csi0_cn, csi0_cp, csi0_dn2, csi0_dp2, 156 + csi0_dn3, csi0_dp3, dsi_dp3, dsi_dn3, dsi_dp1, dsi_dn1, dsi_cp, 157 + dsi_cn, dsi_dp0, dsi_dn0, dsi_dp2, dsi_dn2, sensor0_pclk, 158 + csi1_dn0, csi1_dp0, csi1_dn1, csi1_dp1, csi1_cn, csi1_cp, 159 + sensor0_ckout, nand0_d0, nand0_d1, nand0_d2, nand0_d3, nand0_d4, 160 + nand0_d5, nand0_d6, nand0_d7, nand0_dqs, nand0_dqsn, nand0_ale, 161 + nand0_cle, nand0_ceb0, nand0_ceb1, nand0_ceb2, nand0_ceb3, 162 + nand1_d0, nand1_d1, nand1_d2, nand1_d3, nand1_d4, nand1_d5, 163 + nand1_d6, nand1_d7, nand1_dqs, nand1_dqsn, nand1_ale, nand1_cle, 164 + nand1_ceb0, nand1_ceb1, nand1_ceb2, nand1_ceb3, sgpio0, sgpio1, 165 + sgpio2, sgpio3 166 + ] 167 + 168 + bias-bus-hold: true 169 + bias-high-impedance: true 170 + 171 + bias-pull-down: 172 + type: boolean 173 + 174 + bias-pull-up: 175 + type: boolean 176 + 177 + input-schmitt-enable: true 178 + input-schmitt-disable: true 179 + slew-rate: true 180 + drive-strength: true 181 + 182 + oneOf: 183 + - required: 184 + - groups 185 + - required: 186 + - pins 187 + 188 + examples: 189 + - | 190 + #include <dt-bindings/interrupt-controller/arm-gic.h> 191 + 192 + pinctrl: pinctrl@e01b0000 { 193 + compatible = "actions,s900-pinctrl"; 194 + reg = <0xe01b0000 0x1000>; 195 + clocks = <&cmu 1>; 196 + gpio-controller; 197 + gpio-ranges = <&pinctrl 0 0 146>; 198 + #gpio-cells = <2>; 199 + interrupt-controller; 200 + #interrupt-cells = <2>; 201 + interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>, 202 + <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>, 203 + <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>, 204 + <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>, 205 + <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>, 206 + <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>; 207 + 208 + uart2-default { 209 + pinmux { 210 + groups = "lvds_oep_odn_mfp"; 211 + function = "uart2"; 212 + }; 213 + 214 + pinconf { 215 + groups = "lvds_oep_odn_drv"; 216 + drive-strength = <12>; 217 + }; 218 + }; 219 + };
+402
Documentation/devicetree/bindings/pinctrl/airoha,an7583-pinctrl.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/pinctrl/airoha,an7583-pinctrl.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Airoha AN7583 Pin Controller 8 + 9 + maintainers: 10 + - Lorenzo Bianconi <lorenzo@kernel.org> 11 + 12 + description: 13 + The Airoha's AN7583 Pin controller is used to control SoC pins. 14 + 15 + properties: 16 + compatible: 17 + const: airoha,an7583-pinctrl 18 + 19 + interrupts: 20 + maxItems: 1 21 + 22 + gpio-controller: true 23 + 24 + '#gpio-cells': 25 + const: 2 26 + 27 + gpio-ranges: 28 + maxItems: 1 29 + 30 + interrupt-controller: true 31 + 32 + '#interrupt-cells': 33 + const: 2 34 + 35 + allOf: 36 + - $ref: pinctrl.yaml# 37 + 38 + required: 39 + - compatible 40 + - interrupts 41 + - gpio-controller 42 + - "#gpio-cells" 43 + - interrupt-controller 44 + - "#interrupt-cells" 45 + 46 + patternProperties: 47 + '-pins$': 48 + type: object 49 + 50 + patternProperties: 51 + '^mux(-|$)': 52 + type: object 53 + 54 + description: 55 + pinmux configuration nodes. 56 + 57 + $ref: /schemas/pinctrl/pinmux-node.yaml 58 + 59 + properties: 60 + function: 61 + description: 62 + A string containing the name of the function to mux to the group. 63 + enum: [pon, tod_1pps, sipo, mdio, uart, i2c, jtag, pcm, spi, 64 + pcm_spi, i2s, emmc, pnand, pcie_reset, pwm, phy1_led0, 65 + phy2_led0, phy3_led0, phy4_led0, phy1_led1, phy2_led1, 66 + phy3_led1, phy4_led1] 67 + 68 + groups: 69 + description: 70 + An array of strings. Each string contains the name of a group. 71 + 72 + required: 73 + - function 74 + - groups 75 + 76 + allOf: 77 + - if: 78 + properties: 79 + function: 80 + const: pon 81 + then: 82 + properties: 83 + groups: 84 + enum: [pon] 85 + - if: 86 + properties: 87 + function: 88 + const: tod_1pps 89 + then: 90 + properties: 91 + groups: 92 + enum: [pon_tod_1pps, gsw_tod_1pps] 93 + - if: 94 + properties: 95 + function: 96 + const: sipo 97 + then: 98 + properties: 99 + groups: 100 + enum: [sipo, sipo_rclk] 101 + - if: 102 + properties: 103 + function: 104 + const: mdio 105 + then: 106 + properties: 107 + groups: 108 + enum: [mdio] 109 + - if: 110 + properties: 111 + function: 112 + const: uart 113 + then: 114 + properties: 115 + groups: 116 + items: 117 + enum: [uart2, uart2_cts_rts, hsuart, hsuart_cts_rts, 118 + uart4, uart5] 119 + maxItems: 2 120 + - if: 121 + properties: 122 + function: 123 + const: i2c 124 + then: 125 + properties: 126 + groups: 127 + enum: [i2c1] 128 + - if: 129 + properties: 130 + function: 131 + const: jtag 132 + then: 133 + properties: 134 + groups: 135 + enum: [jtag_udi, jtag_dfd] 136 + - if: 137 + properties: 138 + function: 139 + const: pcm 140 + then: 141 + properties: 142 + groups: 143 + enum: [pcm1, pcm2] 144 + - if: 145 + properties: 146 + function: 147 + const: spi 148 + then: 149 + properties: 150 + groups: 151 + items: 152 + enum: [spi_quad, spi_cs1] 153 + maxItems: 2 154 + - if: 155 + properties: 156 + function: 157 + const: pcm_spi 158 + then: 159 + properties: 160 + groups: 161 + items: 162 + enum: [pcm_spi, pcm_spi_int, pcm_spi_rst, pcm_spi_cs1, 163 + pcm_spi_cs2, pcm_spi_cs3, pcm_spi_cs4] 164 + maxItems: 7 165 + - if: 166 + properties: 167 + function: 168 + const: i2c 169 + then: 170 + properties: 171 + groups: 172 + enum: [i2s] 173 + - if: 174 + properties: 175 + function: 176 + const: emmc 177 + then: 178 + properties: 179 + groups: 180 + enum: [emmc] 181 + - if: 182 + properties: 183 + function: 184 + const: pnand 185 + then: 186 + properties: 187 + groups: 188 + enum: [pnand] 189 + - if: 190 + properties: 191 + function: 192 + const: pcie_reset 193 + then: 194 + properties: 195 + groups: 196 + enum: [pcie_reset0, pcie_reset1] 197 + - if: 198 + properties: 199 + function: 200 + const: pwm 201 + then: 202 + properties: 203 + groups: 204 + enum: [gpio0, gpio1, gpio2, gpio3, gpio4, gpio5, gpio6, 205 + gpio7, gpio8, gpio9, gpio10, gpio11, gpio12, gpio13, 206 + gpio14, gpio15, gpio16, gpio17, gpio18, gpio19, 207 + gpio20, gpio21, gpio22, gpio23, gpio24, gpio25, 208 + gpio26, gpio27, gpio28, gpio29, gpio30, gpio31, 209 + gpio36, gpio37, gpio38, gpio39, gpio40, gpio41, 210 + gpio42, gpio43, gpio44, gpio45, gpio46, gpio47] 211 + - if: 212 + properties: 213 + function: 214 + const: phy1_led0 215 + then: 216 + properties: 217 + groups: 218 + enum: [gpio1, gpio2, gpio3, gpio4] 219 + - if: 220 + properties: 221 + function: 222 + const: phy2_led0 223 + then: 224 + properties: 225 + groups: 226 + enum: [gpio1, gpio2, gpio3, gpio4] 227 + - if: 228 + properties: 229 + function: 230 + const: phy3_led0 231 + then: 232 + properties: 233 + groups: 234 + enum: [gpio1, gpio2, gpio3, gpio4] 235 + - if: 236 + properties: 237 + function: 238 + const: phy4_led0 239 + then: 240 + properties: 241 + groups: 242 + enum: [gpio1, gpio2, gpio3, gpio4] 243 + - if: 244 + properties: 245 + function: 246 + const: phy1_led1 247 + then: 248 + properties: 249 + groups: 250 + enum: [gpio8, gpio9, gpio10, gpio11] 251 + - if: 252 + properties: 253 + function: 254 + const: phy2_led1 255 + then: 256 + properties: 257 + groups: 258 + enum: [gpio8, gpio9, gpio10, gpio11] 259 + - if: 260 + properties: 261 + function: 262 + const: phy3_led1 263 + then: 264 + properties: 265 + groups: 266 + enum: [gpio8, gpio9, gpio10, gpio11] 267 + - if: 268 + properties: 269 + function: 270 + const: phy4_led1 271 + then: 272 + properties: 273 + groups: 274 + enum: [gpio8, gpio9, gpio10, gpio11] 275 + 276 + additionalProperties: false 277 + 278 + '^conf(-|$)': 279 + type: object 280 + 281 + description: 282 + pinconf configuration nodes. 283 + 284 + $ref: /schemas/pinctrl/pincfg-node.yaml 285 + 286 + properties: 287 + pins: 288 + description: 289 + An array of strings. Each string contains the name of a pin. 290 + items: 291 + enum: [uart1_txd, uart1_rxd, i2c_scl, i2c_sda, spi_cs0, spi_clk, 292 + spi_mosi, spi_miso, gpio0, gpio1, gpio2, gpio3, gpio4, 293 + gpio5, gpio6, gpio7, gpio8, gpio9, gpio10, gpio11, gpio12, 294 + gpio13, gpio14, gpio15, gpio16, gpio17, gpio18, gpio19, 295 + gpio20, gpio21, gpio22, gpio23, gpio24, gpio25, gpio26, 296 + gpio27, gpio28, gpio29, gpio30, gpio31, gpio32, gpio33, 297 + gpio34, gpio35, gpio36, gpio37, gpio38, gpio39, gpio40, 298 + gpio41, gpio42, gpio43, gpio44, gpio45, gpio46, 299 + pcie_reset0, pcie_reset1, pcie_reset2] 300 + minItems: 1 301 + maxItems: 58 302 + 303 + bias-disable: true 304 + 305 + bias-pull-up: true 306 + 307 + bias-pull-down: true 308 + 309 + input-enable: true 310 + 311 + output-enable: true 312 + 313 + output-low: true 314 + 315 + output-high: true 316 + 317 + drive-open-drain: true 318 + 319 + drive-strength: 320 + description: 321 + Selects the drive strength for MIO pins, in mA. 322 + enum: [2, 4, 6, 8] 323 + 324 + required: 325 + - pins 326 + 327 + additionalProperties: false 328 + 329 + additionalProperties: false 330 + 331 + additionalProperties: false 332 + 333 + examples: 334 + - | 335 + #include <dt-bindings/interrupt-controller/arm-gic.h> 336 + 337 + pinctrl { 338 + compatible = "airoha,an7583-pinctrl"; 339 + 340 + interrupt-parent = <&gic>; 341 + interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>; 342 + 343 + gpio-controller; 344 + #gpio-cells = <2>; 345 + 346 + interrupt-controller; 347 + #interrupt-cells = <2>; 348 + 349 + pcie1-rst-pins { 350 + conf { 351 + pins = "pcie_reset1"; 352 + drive-open-drain = <1>; 353 + }; 354 + }; 355 + 356 + pwm-pins { 357 + mux { 358 + function = "pwm"; 359 + groups = "gpio18"; 360 + }; 361 + }; 362 + 363 + spi-pins { 364 + mux { 365 + function = "spi"; 366 + groups = "spi_quad", "spi_cs1"; 367 + }; 368 + }; 369 + 370 + uart2-pins { 371 + mux { 372 + function = "uart"; 373 + groups = "uart2", "uart2_cts_rts"; 374 + }; 375 + }; 376 + 377 + uar5-pins { 378 + mux { 379 + function = "uart"; 380 + groups = "uart5"; 381 + }; 382 + }; 383 + 384 + mmc-pins { 385 + mux { 386 + function = "emmc"; 387 + groups = "emmc"; 388 + }; 389 + }; 390 + 391 + mdio-pins { 392 + mux { 393 + function = "mdio"; 394 + groups = "mdio"; 395 + }; 396 + 397 + conf { 398 + pins = "gpio2"; 399 + output-enable; 400 + }; 401 + }; 402 + };
+2
Documentation/devicetree/bindings/pinctrl/aspeed,ast2600-pinctrl.yaml
··· 141 141 - NRTS3 142 142 - NRTS4 143 143 - OSCCLK 144 + - PCIERC1 144 145 - PEWAKE 145 146 - PWM0 146 147 - PWM1 ··· 370 369 - NRTS3 371 370 - NRTS4 372 371 - OSCCLK 372 + - PCIERC1 373 373 - PEWAKE 374 374 - PWM0 375 375 - PWM1
-47
Documentation/devicetree/bindings/pinctrl/berlin,pinctrl.txt
··· 1 - * Pin-controller driver for the Marvell Berlin SoCs 2 - 3 - Pin control registers are part of both chip controller and system 4 - controller register sets. Pin controller nodes should be a sub-node of 5 - either the chip controller or system controller node. The pins 6 - controlled are organized in groups, so no actual pin information is 7 - needed. 8 - 9 - A pin-controller node should contain subnodes representing the pin group 10 - configurations, one per function. Each subnode has the group name and 11 - the muxing function used. 12 - 13 - Be aware the Marvell Berlin datasheets use the keyword 'mode' for what 14 - is called a 'function' in the pin-controller subsystem. 15 - 16 - Required properties: 17 - - compatible: should be one of: 18 - "marvell,berlin2-soc-pinctrl", 19 - "marvell,berlin2-system-pinctrl", 20 - "marvell,berlin2cd-soc-pinctrl", 21 - "marvell,berlin2cd-system-pinctrl", 22 - "marvell,berlin2q-soc-pinctrl", 23 - "marvell,berlin2q-system-pinctrl", 24 - "marvell,berlin4ct-avio-pinctrl", 25 - "marvell,berlin4ct-soc-pinctrl", 26 - "marvell,berlin4ct-system-pinctrl", 27 - "syna,as370-soc-pinctrl" 28 - 29 - Required subnode-properties: 30 - - groups: a list of strings describing the group names. 31 - - function: a string describing the function used to mux the groups. 32 - 33 - Example: 34 - 35 - sys_pinctrl: pin-controller { 36 - compatible = "marvell,berlin2q-system-pinctrl"; 37 - 38 - uart0_pmux: uart0-pmux { 39 - groups = "GSM12"; 40 - function = "uart0"; 41 - }; 42 - }; 43 - 44 - &uart0 { 45 - pinctrl-0 = <&uart0_pmux>; 46 - pinctrl-names = "default"; 47 - };
-126
Documentation/devicetree/bindings/pinctrl/bitmain,bm1880-pinctrl.txt
··· 1 - Bitmain BM1880 Pin Controller 2 - 3 - This binding describes the pin controller found in the BM1880 SoC. 4 - 5 - Required Properties: 6 - 7 - - compatible: Should be "bitmain,bm1880-pinctrl" 8 - - reg: Offset and length of pinctrl space in SCTRL. 9 - 10 - Please refer to pinctrl-bindings.txt in this directory for details of the 11 - common pinctrl bindings used by client devices, including the meaning of the 12 - phrase "pin configuration node". 13 - 14 - The pin configuration nodes act as a container for an arbitrary number of 15 - subnodes. Each of these subnodes represents some desired configuration for a 16 - pin, a group, or a list of pins or groups. This configuration for BM1880 SoC 17 - includes pinmux and various pin configuration parameters, such as pull-up, 18 - slew rate etc... 19 - 20 - Each configuration node can consist of multiple nodes describing the pinmux 21 - options. The name of each subnode is not important; all subnodes should be 22 - enumerated and processed purely based on their content. 23 - 24 - The following generic properties as defined in pinctrl-bindings.txt are valid 25 - to specify in a pinmux subnode: 26 - 27 - Required Properties: 28 - 29 - - pins: An array of strings, each string containing the name of a pin. 30 - Valid values for pins are: 31 - 32 - MIO0 - MIO111 33 - 34 - - groups: An array of strings, each string containing the name of a pin 35 - group. Valid values for groups are: 36 - 37 - nand_grp, spi_grp, emmc_grp, sdio_grp, eth0_grp, pwm0_grp, 38 - pwm1_grp, pwm2_grp, pwm3_grp, pwm4_grp, pwm5_grp, pwm6_grp, 39 - pwm7_grp, pwm8_grp, pwm9_grp, pwm10_grp, pwm11_grp, pwm12_grp, 40 - pwm13_grp, pwm14_grp, pwm15_grp, pwm16_grp, pwm17_grp, 41 - pwm18_grp, pwm19_grp, pwm20_grp, pwm21_grp, pwm22_grp, 42 - pwm23_grp, pwm24_grp, pwm25_grp, pwm26_grp, pwm27_grp, 43 - pwm28_grp, pwm29_grp, pwm30_grp, pwm31_grp, pwm32_grp, 44 - pwm33_grp, pwm34_grp, pwm35_grp, pwm36_grp, i2c0_grp, 45 - i2c1_grp, i2c2_grp, i2c3_grp, i2c4_grp, uart0_grp, uart1_grp, 46 - uart2_grp, uart3_grp, uart4_grp, uart5_grp, uart6_grp, 47 - uart7_grp, uart8_grp, uart9_grp, uart10_grp, uart11_grp, 48 - uart12_grp, uart13_grp, uart14_grp, uart15_grp, gpio0_grp, 49 - gpio1_grp, gpio2_grp, gpio3_grp, gpio4_grp, gpio5_grp, 50 - gpio6_grp, gpio7_grp, gpio8_grp, gpio9_grp, gpio10_grp, 51 - gpio11_grp, gpio12_grp, gpio13_grp, gpio14_grp, gpio15_grp, 52 - gpio16_grp, gpio17_grp, gpio18_grp, gpio19_grp, gpio20_grp, 53 - gpio21_grp, gpio22_grp, gpio23_grp, gpio24_grp, gpio25_grp, 54 - gpio26_grp, gpio27_grp, gpio28_grp, gpio29_grp, gpio30_grp, 55 - gpio31_grp, gpio32_grp, gpio33_grp, gpio34_grp, gpio35_grp, 56 - gpio36_grp, gpio37_grp, gpio38_grp, gpio39_grp, gpio40_grp, 57 - gpio41_grp, gpio42_grp, gpio43_grp, gpio44_grp, gpio45_grp, 58 - gpio46_grp, gpio47_grp, gpio48_grp, gpio49_grp, gpio50_grp, 59 - gpio51_grp, gpio52_grp, gpio53_grp, gpio54_grp, gpio55_grp, 60 - gpio56_grp, gpio57_grp, gpio58_grp, gpio59_grp, gpio60_grp, 61 - gpio61_grp, gpio62_grp, gpio63_grp, gpio64_grp, gpio65_grp, 62 - gpio66_grp, gpio67_grp, eth1_grp, i2s0_grp, i2s0_mclkin_grp, 63 - i2s1_grp, i2s1_mclkin_grp, spi0_grp 64 - 65 - - function: An array of strings, each string containing the name of the 66 - pinmux functions. The following are the list of pinmux 67 - functions available: 68 - 69 - nand, spi, emmc, sdio, eth0, pwm0, pwm1, pwm2, pwm3, pwm4, 70 - pwm5, pwm6, pwm7, pwm8, pwm9, pwm10, pwm11, pwm12, pwm13, 71 - pwm14, pwm15, pwm16, pwm17, pwm18, pwm19, pwm20, pwm21, pwm22, 72 - pwm23, pwm24, pwm25, pwm26, pwm27, pwm28, pwm29, pwm30, pwm31, 73 - pwm32, pwm33, pwm34, pwm35, pwm36, i2c0, i2c1, i2c2, i2c3, 74 - i2c4, uart0, uart1, uart2, uart3, uart4, uart5, uart6, uart7, 75 - uart8, uart9, uart10, uart11, uart12, uart13, uart14, uart15, 76 - gpio0, gpio1, gpio2, gpio3, gpio4, gpio5, gpio6, gpio7, gpio8, 77 - gpio9, gpio10, gpio11, gpio12, gpio13, gpio14, gpio15, gpio16, 78 - gpio17, gpio18, gpio19, gpio20, gpio21, gpio22, gpio23, 79 - gpio24, gpio25, gpio26, gpio27, gpio28, gpio29, gpio30, 80 - gpio31, gpio32, gpio33, gpio34, gpio35, gpio36, gpio37, 81 - gpio38, gpio39, gpio40, gpio41, gpio42, gpio43, gpio44, 82 - gpio45, gpio46, gpio47, gpio48, gpio49, gpio50, gpio51, 83 - gpio52, gpio53, gpio54, gpio55, gpio56, gpio57, gpio58, 84 - gpio59, gpio60, gpio61, gpio62, gpio63, gpio64, gpio65, 85 - gpio66, gpio67, eth1, i2s0, i2s0_mclkin, i2s1, i2s1_mclkin, 86 - spi0 87 - 88 - Optional Properties: 89 - 90 - - bias-disable: No arguments. Disable pin bias. 91 - - bias-pull-down: No arguments. The specified pins should be configured as 92 - pull down. 93 - - bias-pull-up: No arguments. The specified pins should be configured as 94 - pull up. 95 - - input-schmitt-enable: No arguments: Enable schmitt trigger for the specified 96 - pins 97 - - input-schmitt-disable: No arguments: Disable schmitt trigger for the specified 98 - pins 99 - - slew-rate: Integer. Sets slew rate for the specified pins. 100 - Valid values are: 101 - <0> - Slow 102 - <1> - Fast 103 - - drive-strength: Integer. Selects the drive strength for the specified 104 - pins in mA. 105 - Valid values are: 106 - <4> 107 - <8> 108 - <12> 109 - <16> 110 - <20> 111 - <24> 112 - <28> 113 - <32> 114 - 115 - Example: 116 - pinctrl: pinctrl@400 { 117 - compatible = "bitmain,bm1880-pinctrl"; 118 - reg = <0x400 0x120>; 119 - 120 - pinctrl_uart0_default: uart0-default { 121 - pinmux { 122 - groups = "uart0_grp"; 123 - function = "uart0"; 124 - }; 125 - }; 126 - };
+132
Documentation/devicetree/bindings/pinctrl/bitmain,bm1880-pinctrl.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/pinctrl/bitmain,bm1880-pinctrl.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Bitmain BM1880 Pin Controller 8 + 9 + maintainers: 10 + - Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> 11 + 12 + properties: 13 + compatible: 14 + const: bitmain,bm1880-pinctrl 15 + 16 + reg: 17 + maxItems: 1 18 + 19 + additionalProperties: 20 + description: A pin configuration node. 21 + type: object 22 + additionalProperties: false 23 + 24 + properties: 25 + pinmux: 26 + type: object 27 + description: Pin multiplexing parameters. 28 + allOf: 29 + - $ref: /schemas/pinctrl/pincfg-node.yaml# 30 + - $ref: /schemas/pinctrl/pinmux-node.yaml# 31 + additionalProperties: false 32 + 33 + properties: 34 + pins: 35 + items: 36 + pattern: '^MIO[0-9]+$' 37 + 38 + groups: 39 + items: 40 + enum: [ 41 + nand_grp, spi_grp, emmc_grp, sdio_grp, eth0_grp, pwm0_grp, 42 + pwm1_grp, pwm2_grp, pwm3_grp, pwm4_grp, pwm5_grp, pwm6_grp, 43 + pwm7_grp, pwm8_grp, pwm9_grp, pwm10_grp, pwm11_grp, pwm12_grp, 44 + pwm13_grp, pwm14_grp, pwm15_grp, pwm16_grp, pwm17_grp, 45 + pwm18_grp, pwm19_grp, pwm20_grp, pwm21_grp, pwm22_grp, 46 + pwm23_grp, pwm24_grp, pwm25_grp, pwm26_grp, pwm27_grp, 47 + pwm28_grp, pwm29_grp, pwm30_grp, pwm31_grp, pwm32_grp, 48 + pwm33_grp, pwm34_grp, pwm35_grp, pwm36_grp, i2c0_grp, 49 + i2c1_grp, i2c2_grp, i2c3_grp, i2c4_grp, uart0_grp, uart1_grp, 50 + uart2_grp, uart3_grp, uart4_grp, uart5_grp, uart6_grp, 51 + uart7_grp, uart8_grp, uart9_grp, uart10_grp, uart11_grp, 52 + uart12_grp, uart13_grp, uart14_grp, uart15_grp, gpio0_grp, 53 + gpio1_grp, gpio2_grp, gpio3_grp, gpio4_grp, gpio5_grp, 54 + gpio6_grp, gpio7_grp, gpio8_grp, gpio9_grp, gpio10_grp, 55 + gpio11_grp, gpio12_grp, gpio13_grp, gpio14_grp, gpio15_grp, 56 + gpio16_grp, gpio17_grp, gpio18_grp, gpio19_grp, gpio20_grp, 57 + gpio21_grp, gpio22_grp, gpio23_grp, gpio24_grp, gpio25_grp, 58 + gpio26_grp, gpio27_grp, gpio28_grp, gpio29_grp, gpio30_grp, 59 + gpio31_grp, gpio32_grp, gpio33_grp, gpio34_grp, gpio35_grp, 60 + gpio36_grp, gpio37_grp, gpio38_grp, gpio39_grp, gpio40_grp, 61 + gpio41_grp, gpio42_grp, gpio43_grp, gpio44_grp, gpio45_grp, 62 + gpio46_grp, gpio47_grp, gpio48_grp, gpio49_grp, gpio50_grp, 63 + gpio51_grp, gpio52_grp, gpio53_grp, gpio54_grp, gpio55_grp, 64 + gpio56_grp, gpio57_grp, gpio58_grp, gpio59_grp, gpio60_grp, 65 + gpio61_grp, gpio62_grp, gpio63_grp, gpio64_grp, gpio65_grp, 66 + gpio66_grp, gpio67_grp, eth1_grp, i2s0_grp, i2s0_mclkin_grp, 67 + i2s1_grp, i2s1_mclkin_grp, spi0_grp 68 + ] 69 + 70 + function: 71 + items: 72 + enum: [ 73 + nand, spi, emmc, sdio, eth0, pwm0, pwm1, pwm2, pwm3, pwm4, 74 + pwm5, pwm6, pwm7, pwm8, pwm9, pwm10, pwm11, pwm12, pwm13, 75 + pwm14, pwm15, pwm16, pwm17, pwm18, pwm19, pwm20, pwm21, pwm22, 76 + pwm23, pwm24, pwm25, pwm26, pwm27, pwm28, pwm29, pwm30, pwm31, 77 + pwm32, pwm33, pwm34, pwm35, pwm36, i2c0, i2c1, i2c2, i2c3, 78 + i2c4, uart0, uart1, uart2, uart3, uart4, uart5, uart6, uart7, 79 + uart8, uart9, uart10, uart11, uart12, uart13, uart14, uart15, 80 + gpio0, gpio1, gpio2, gpio3, gpio4, gpio5, gpio6, gpio7, gpio8, 81 + gpio9, gpio10, gpio11, gpio12, gpio13, gpio14, gpio15, gpio16, 82 + gpio17, gpio18, gpio19, gpio20, gpio21, gpio22, gpio23, 83 + gpio24, gpio25, gpio26, gpio27, gpio28, gpio29, gpio30, 84 + gpio31, gpio32, gpio33, gpio34, gpio35, gpio36, gpio37, 85 + gpio38, gpio39, gpio40, gpio41, gpio42, gpio43, gpio44, 86 + gpio45, gpio46, gpio47, gpio48, gpio49, gpio50, gpio51, 87 + gpio52, gpio53, gpio54, gpio55, gpio56, gpio57, gpio58, 88 + gpio59, gpio60, gpio61, gpio62, gpio63, gpio64, gpio65, 89 + gpio66, gpio67, eth1, i2s0, i2s0_mclkin, i2s1, i2s1_mclkin, 90 + spi0 91 + ] 92 + 93 + bias-disable: true 94 + bias-pull-down: true 95 + bias-pull-up: true 96 + input-schmitt-enable: true 97 + input-schmitt-disable: true 98 + 99 + slew-rate: 100 + description: > 101 + Sets slew rate. Valid values: 0 = Slow, 1 = Fast. 102 + enum: [0, 1] 103 + 104 + drive-strength: 105 + enum: [4, 8, 12, 16, 20, 24, 28, 32] 106 + 107 + oneOf: 108 + - required: 109 + - pins 110 + - required: 111 + - groups 112 + 113 + required: 114 + - function 115 + 116 + required: 117 + - compatible 118 + - reg 119 + 120 + examples: 121 + - | 122 + pinctrl@400 { 123 + compatible = "bitmain,bm1880-pinctrl"; 124 + reg = <0x400 0x120>; 125 + 126 + uart0-default { 127 + pinmux { 128 + groups = "uart0_grp"; 129 + function = "uart0"; 130 + }; 131 + }; 132 + };
-102
Documentation/devicetree/bindings/pinctrl/brcm,ns2-pinmux.txt
··· 1 - Broadcom Northstar2 IOMUX Controller 2 - 3 - The Northstar2 IOMUX controller supports group based mux configuration. There 4 - are some individual pins that support modifying the pinconf parameters. 5 - 6 - Required properties: 7 - 8 - - compatible: 9 - Must be "brcm,ns2-pinmux" 10 - 11 - - reg: 12 - Define the base and range of the I/O address space that contains the 13 - Northstar2 IOMUX and pin configuration registers. 14 - 15 - Properties in sub nodes: 16 - 17 - - function: 18 - The mux function to select 19 - 20 - - groups: 21 - The list of groups to select with a given function 22 - 23 - - pins: 24 - List of pin names to change configuration 25 - 26 - The generic properties bias-disable, bias-pull-down, bias-pull-up, 27 - drive-strength, slew-rate, input-enable, input-disable are supported 28 - for some individual pins listed at the end. 29 - 30 - For more details, refer to 31 - Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt 32 - 33 - For example: 34 - 35 - pinctrl: pinctrl@6501d130 { 36 - compatible = "brcm,ns2-pinmux"; 37 - reg = <0x6501d130 0x08>, 38 - <0x660a0028 0x04>, 39 - <0x660009b0 0x40>; 40 - 41 - pinctrl-names = "default"; 42 - pinctrl-0 = <&nand_sel>, <&uart3_rx>, <&sdio0_d4>; 43 - 44 - /* Select nand function */ 45 - nand_sel: nand_sel { 46 - function = "nand"; 47 - groups = "nand_grp"; 48 - }; 49 - 50 - /* Pull up the uart3 rx pin */ 51 - uart3_rx: uart3_rx { 52 - pins = "uart3_sin"; 53 - bias-pull-up; 54 - }; 55 - 56 - /* Set the drive strength of sdio d4 pin */ 57 - sdio0_d4: sdio0_d4 { 58 - pins = "sdio0_data4"; 59 - drive-strength = <8>; 60 - }; 61 - }; 62 - 63 - List of supported functions and groups in Northstar2: 64 - 65 - "nand": "nand_grp" 66 - 67 - "nor": "nor_data_grp", "nor_adv_grp", "nor_addr_0_3_grp", "nor_addr_4_5_grp", 68 - "nor_addr_6_7_grp", "nor_addr_8_9_grp", "nor_addr_10_11_grp", 69 - "nor_addr_12_15_grp" 70 - 71 - "gpio": "gpio_0_1_grp", "gpio_2_5_grp", "gpio_6_7_grp", "gpio_8_9_grp", 72 - "gpio_10_11_grp", "gpio_12_13_grp", "gpio_14_17_grp", "gpio_18_19_grp", 73 - "gpio_20_21_grp", "gpio_22_23_grp", "gpio_24_25_grp", "gpio_26_27_grp", 74 - "gpio_28_29_grp", "gpio_30_31_grp" 75 - 76 - "pcie": "pcie_ab1_clk_wak_grp", "pcie_a3_clk_wak_grp", "pcie_b3_clk_wak_grp", 77 - "pcie_b2_clk_wak_grp", "pcie_a2_clk_wak_grp" 78 - 79 - "uart0": "uart0_modem_grp", "uart0_rts_cts_grp", "uart0_in_out_grp" 80 - 81 - "uart1": "uart1_ext_clk_grp", "uart1_dcd_dsr_grp", "uart1_ri_dtr_grp", 82 - "uart1_rts_cts_grp", "uart1_in_out_grp" 83 - 84 - "uart2": "uart2_rts_cts_grp" 85 - 86 - "pwm": "pwm_0_grp", "pwm_1_grp", "pwm_2_grp", "pwm_3_grp" 87 - 88 - 89 - List of pins that support pinconf parameters: 90 - 91 - "qspi_wp", "qspi_hold", "qspi_cs", "qspi_sck", "uart3_sin", "uart3_sout", 92 - "qspi_mosi", "qspi_miso", "spi0_fss", "spi0_rxd", "spi0_txd", "spi0_sck", 93 - "spi1_fss", "spi1_rxd", "spi1_txd", "spi1_sck", "sdio0_data7", 94 - "sdio0_emmc_rst", "sdio0_led_on", "sdio0_wp", "sdio0_data3", "sdio0_data4", 95 - "sdio0_data5", "sdio0_data6", "sdio0_cmd", "sdio0_data0", "sdio0_data1", 96 - "sdio0_data2", "sdio1_led_on", "sdio1_wp", "sdio0_cd_l", "sdio0_clk", 97 - "sdio1_data5", "sdio1_data6", "sdio1_data7", "sdio1_emmc_rst", "sdio1_data1", 98 - "sdio1_data2", "sdio1_data3", "sdio1_data4", "sdio1_cd_l", "sdio1_clk", 99 - "sdio1_cmd", "sdio1_data0", "ext_mdio_0", "ext_mdc_0", "usb3_p1_vbus_ppc", 100 - "usb3_p1_overcurrent", "usb3_p0_vbus_ppc", "usb3_p0_overcurrent", 101 - "usb2_presence_indication", "usb2_vbus_present", "usb2_vbus_ppc", 102 - "usb2_overcurrent", "sata_led1", "sata_led0"
+111
Documentation/devicetree/bindings/pinctrl/brcm,ns2-pinmux.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/pinctrl/brcm,ns2-pinmux.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Broadcom Northstar2 IOMUX Controller 8 + 9 + maintainers: 10 + - Ray Jui <rjui@broadcom.com> 11 + - Scott Branden <sbranden@broadcom.com> 12 + 13 + properties: 14 + compatible: 15 + const: brcm,ns2-pinmux 16 + 17 + reg: 18 + maxItems: 3 19 + 20 + additionalProperties: 21 + description: Pin group node properties 22 + type: object 23 + allOf: 24 + - $ref: /schemas/pinctrl/pincfg-node.yaml# 25 + - $ref: /schemas/pinctrl/pinmux-node.yaml# 26 + additionalProperties: false 27 + 28 + properties: 29 + function: 30 + description: The mux function to select 31 + $ref: /schemas/types.yaml#/definitions/string 32 + 33 + groups: 34 + items: 35 + enum: [ 36 + nand_grp, nor_data_grp, nor_adv_grp, nor_addr_0_3_grp, 37 + nor_addr_4_5_grp, nor_addr_6_7_grp, nor_addr_8_9_grp, 38 + nor_addr_10_11_grp, nor_addr_12_15_grp, gpio_0_1_grp, gpio_2_5_grp, 39 + gpio_6_7_grp, gpio_8_9_grp, gpio_10_11_grp, gpio_12_13_grp, 40 + gpio_14_17_grp, gpio_18_19_grp, gpio_20_21_grp, gpio_22_23_grp, 41 + gpio_24_25_grp, gpio_26_27_grp, gpio_28_29_grp, gpio_30_31_grp, 42 + pcie_ab1_clk_wak_grp, pcie_a3_clk_wak_grp, pcie_b3_clk_wak_grp, 43 + pcie_b2_clk_wak_grp, pcie_a2_clk_wak_grp, uart0_modem_grp, 44 + uart0_rts_cts_grp, uart0_in_out_grp, uart1_ext_clk_grp, 45 + uart1_dcd_dsr_grp, uart1_ri_dtr_grp, uart1_rts_cts_grp, 46 + uart1_in_out_grp, uart2_rts_cts_grp, pwm_0_grp, pwm_1_grp, pwm_2_grp, 47 + pwm_3_grp 48 + ] 49 + 50 + pins: 51 + items: 52 + enum: [ 53 + qspi_wp, qspi_hold, qspi_cs, qspi_sck, uart3_sin, uart3_sout, 54 + qspi_mosi, qspi_miso, spi0_fss, spi0_rxd, spi0_txd, spi0_sck, 55 + spi1_fss, spi1_rxd, spi1_txd, spi1_sck, sdio0_data7, sdio0_emmc_rst, 56 + sdio0_led_on, sdio0_wp, sdio0_data3, sdio0_data4, sdio0_data5, 57 + sdio0_data6, sdio0_cmd, sdio0_data0, sdio0_data1, sdio0_data2, 58 + sdio1_led_on, sdio1_wp, sdio0_cd_l, sdio0_clk, sdio1_data5, 59 + sdio1_data6, sdio1_data7, sdio1_emmc_rst, sdio1_data1, sdio1_data2, 60 + sdio1_data3, sdio1_data4, sdio1_cd_l, sdio1_clk, sdio1_cmd, 61 + sdio1_data0, ext_mdio_0, ext_mdc_0, usb3_p1_vbus_ppc, 62 + usb3_p1_overcurrent, usb3_p0_vbus_ppc, usb3_p0_overcurrent, 63 + usb2_presence_indication, usb2_vbus_present, usb2_vbus_ppc, 64 + usb2_overcurrent, sata_led1, sata_led0 65 + ] 66 + 67 + bias-disable: true 68 + bias-pull-down: true 69 + bias-pull-up: true 70 + drive-strength: true 71 + slew-rate: true 72 + input-enable: true 73 + input-disable: true 74 + 75 + oneOf: 76 + - required: 77 + - groups 78 + - function 79 + - required: 80 + - pins 81 + 82 + required: 83 + - compatible 84 + - reg 85 + 86 + examples: 87 + - | 88 + pinctrl@6501d130 { 89 + compatible = "brcm,ns2-pinmux"; 90 + reg = <0x6501d130 0x08>, 91 + <0x660a0028 0x04>, 92 + <0x660009b0 0x40>; 93 + 94 + /* Select nand function */ 95 + nand-sel { 96 + function = "nand"; 97 + groups = "nand_grp"; 98 + }; 99 + 100 + /* Pull up the uart3 rx pin */ 101 + uart3-rx { 102 + pins = "uart3_sin"; 103 + bias-pull-up; 104 + }; 105 + 106 + /* Set the drive strength of sdio d4 pin */ 107 + sdio0-d4 { 108 + pins = "sdio0_data4"; 109 + drive-strength = <8>; 110 + }; 111 + };
+91
Documentation/devicetree/bindings/pinctrl/cix,sky1-pinctrl.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/pinctrl/cix,sky1-pinctrl.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Cix Sky1 Soc Pin Controller 8 + 9 + maintainers: 10 + - Gary Yang <gary.yang@cixtech.com> 11 + 12 + description: 13 + The pin-controller is used to control Soc pins. There are two pin-controllers 14 + on Cix Sky1 platform. one is used under S0 state, the other one is used under 15 + S0 and S5 state. 16 + 17 + properties: 18 + compatible: 19 + enum: 20 + - cix,sky1-pinctrl 21 + - cix,sky1-pinctrl-s5 22 + 23 + reg: 24 + items: 25 + - description: gpio base 26 + 27 + patternProperties: 28 + '-cfg$': 29 + type: object 30 + additionalProperties: false 31 + 32 + description: 33 + A pinctrl node should contain at least one subnode representing the 34 + pinctrl groups available on the machine. 35 + 36 + patternProperties: 37 + 'pins$': 38 + type: object 39 + additionalProperties: false 40 + 41 + description: 42 + Each subnode will list the pins it needs, and how they should 43 + be configured, with regard to muxer configuration, bias pull, 44 + and drive strength. 45 + 46 + allOf: 47 + - $ref: pincfg-node.yaml# 48 + - $ref: pinmux-node.yaml# 49 + 50 + properties: 51 + pinmux: 52 + description: 53 + Values are constructed from pin number and mux setting, pin 54 + number is left shifted by 8 bits, then ORed with mux setting 55 + 56 + bias-disable: true 57 + 58 + bias-pull-up: true 59 + 60 + bias-pull-down: true 61 + 62 + drive-strength: 63 + description: 64 + typical current when output high level. 65 + enum: [ 2, 3, 5, 6, 8, 9, 11, 12, 13, 14, 17, 18, 20, 21, 23, 66 + 24 ] 67 + 68 + required: 69 + - pinmux 70 + 71 + required: 72 + - compatible 73 + - reg 74 + 75 + additionalProperties: false 76 + 77 + examples: 78 + - | 79 + #define CIX_PAD_GPIO012_FUNC_GPIO012 (11 << 8 | 0x0) 80 + pinctrl@4170000 { 81 + compatible = "cix,sky1-pinctrl"; 82 + reg = <0x4170000 0x1000>; 83 + 84 + wifi_vbat_gpio: wifi-vbat-gpio-cfg { 85 + pins { 86 + pinmux = <CIX_PAD_GPIO012_FUNC_GPIO012>; 87 + bias-pull-up; 88 + drive-strength = <8>; 89 + }; 90 + }; 91 + };
-195
Documentation/devicetree/bindings/pinctrl/marvell,armada-37xx-pinctrl.txt
··· 1 - * Marvell Armada 37xx SoC pin and gpio controller 2 - 3 - Each Armada 37xx SoC come with two pin and gpio controller one for the 4 - south bridge and the other for the north bridge. 5 - 6 - Inside this set of register the gpio latch allows exposing some 7 - configuration of the SoC and especially the clock frequency of the 8 - xtal. Hence, this node is a represent as syscon allowing sharing the 9 - register between multiple hardware block. 10 - 11 - GPIO and pin controller: 12 - ------------------------ 13 - 14 - Main node: 15 - 16 - Refer to pinctrl-bindings.txt in this directory for details of the 17 - common pinctrl bindings used by client devices, including the meaning 18 - of the phrase "pin configuration node". 19 - 20 - Required properties for pinctrl driver: 21 - 22 - - compatible: "marvell,armada3710-sb-pinctrl", "syscon, "simple-mfd" 23 - for the south bridge 24 - "marvell,armada3710-nb-pinctrl", "syscon, "simple-mfd" 25 - for the north bridge 26 - - reg: The first set of register are for pinctrl/gpio and the second 27 - set for the interrupt controller 28 - - interrupts: list of the interrupt use by the gpio 29 - 30 - Available groups and functions for the North bridge: 31 - 32 - group: jtag 33 - - pins 20-24 34 - - functions jtag, gpio 35 - 36 - group sdio0 37 - - pins 8-10 38 - - functions sdio, gpio 39 - 40 - group emmc_nb 41 - - pins 27-35 42 - - functions emmc, gpio 43 - 44 - group pwm0 45 - - pin 11 (GPIO1-11) 46 - - functions pwm, led, gpio 47 - 48 - group pwm1 49 - - pin 12 50 - - functions pwm, led, gpio 51 - 52 - group pwm2 53 - - pin 13 54 - - functions pwm, led, gpio 55 - 56 - group pwm3 57 - - pin 14 58 - - functions pwm, led, gpio 59 - 60 - group pmic1 61 - - pin 7 62 - - functions pmic, gpio 63 - 64 - group pmic0 65 - - pin 6 66 - - functions pmic, gpio 67 - 68 - group i2c2 69 - - pins 2-3 70 - - functions i2c, gpio 71 - 72 - group i2c1 73 - - pins 0-1 74 - - functions i2c, gpio 75 - 76 - group spi_cs1 77 - - pin 17 78 - - functions spi, gpio 79 - 80 - group spi_cs2 81 - - pin 18 82 - - functions spi, gpio 83 - 84 - group spi_cs3 85 - - pin 19 86 - - functions spi, gpio 87 - 88 - group onewire 89 - - pin 4 90 - - functions onewire, gpio 91 - 92 - group uart1 93 - - pins 25-26 94 - - functions uart, gpio 95 - 96 - group spi_quad 97 - - pins 15-16 98 - - functions spi, gpio 99 - 100 - group uart2 101 - - pins 9-10 and 18-19 102 - - functions uart, gpio 103 - 104 - Available groups and functions for the South bridge: 105 - 106 - group usb32_drvvbus0 107 - - pin 36 108 - - functions drvbus, gpio 109 - 110 - group usb2_drvvbus1 111 - - pin 37 112 - - functions drvbus, gpio 113 - 114 - group sdio_sb 115 - - pins 60-65 116 - - functions sdio, gpio 117 - 118 - group rgmii 119 - - pins 42-53 120 - - functions mii, gpio 121 - 122 - group pcie1 123 - - pins 39 124 - - functions pcie, gpio 125 - 126 - group pcie1_clkreq 127 - - pins 40 128 - - functions pcie, gpio 129 - 130 - group pcie1_wakeup 131 - - pins 41 132 - - functions pcie, gpio 133 - 134 - group smi 135 - - pins 54-55 136 - - functions smi, gpio 137 - 138 - group ptp 139 - - pins 56 140 - - functions ptp, gpio 141 - 142 - group ptp_clk 143 - - pin 57 144 - - functions ptp, mii 145 - 146 - group ptp_trig 147 - - pin 58 148 - - functions ptp, mii 149 - 150 - group mii_col 151 - - pin 59 152 - - functions mii, mii_err 153 - 154 - GPIO subnode: 155 - 156 - Please refer to gpio.txt in this directory for details of gpio-ranges property 157 - and the common GPIO bindings used by client devices. 158 - 159 - Required properties for gpio driver under the gpio subnode: 160 - - interrupts: List of interrupt specifier for the controllers interrupt. 161 - - gpio-controller: Marks the device node as a gpio controller. 162 - - #gpio-cells: Should be 2. The first cell is the GPIO number and the 163 - second cell specifies GPIO flags, as defined in 164 - <dt-bindings/gpio/gpio.h>. Only the GPIO_ACTIVE_HIGH and 165 - GPIO_ACTIVE_LOW flags are supported. 166 - - gpio-ranges: Range of pins managed by the GPIO controller. 167 - 168 - Xtal Clock bindings for Marvell Armada 37xx SoCs 169 - ------------------------------------------------ 170 - 171 - see Documentation/devicetree/bindings/clock/armada3700-xtal-clock.txt 172 - 173 - 174 - Example: 175 - pinctrl_sb: pinctrl-sb@18800 { 176 - compatible = "marvell,armada3710-sb-pinctrl", "syscon", "simple-mfd"; 177 - reg = <0x18800 0x100>, <0x18C00 0x20>; 178 - gpio { 179 - #gpio-cells = <2>; 180 - gpio-ranges = <&pinctrl_sb 0 0 29>; 181 - gpio-controller; 182 - interrupts = 183 - <GIC_SPI 160 IRQ_TYPE_LEVEL_HIGH>, 184 - <GIC_SPI 159 IRQ_TYPE_LEVEL_HIGH>, 185 - <GIC_SPI 158 IRQ_TYPE_LEVEL_HIGH>, 186 - <GIC_SPI 157 IRQ_TYPE_LEVEL_HIGH>, 187 - <GIC_SPI 156 IRQ_TYPE_LEVEL_HIGH>; 188 - }; 189 - 190 - rgmii_pins: mii-pins { 191 - groups = "rgmii"; 192 - function = "mii"; 193 - }; 194 - 195 - };
+124
Documentation/devicetree/bindings/pinctrl/marvell,armada3710-xb-pinctrl.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/pinctrl/marvell,armada3710-xb-pinctrl.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Marvell Armada 37xx SoC pin and gpio controller 8 + 9 + maintainers: 10 + - Gregory CLEMENT <gregory.clement@bootlin.com> 11 + - Marek Behún <kabel@kernel.org> 12 + - Miquel Raynal <miquel.raynal@bootlin.com> 13 + 14 + description: > 15 + Each Armada 37xx SoC come with two pin and gpio controller one for the south 16 + bridge and the other for the north bridge. 17 + 18 + Inside this set of register the gpio latch allows exposing some configuration 19 + of the SoC and especially the clock frequency of the xtal. Hence, this node is 20 + a represent as syscon allowing sharing the register between multiple hardware 21 + block. 22 + 23 + properties: 24 + compatible: 25 + items: 26 + - enum: 27 + - marvell,armada3710-sb-pinctrl 28 + - marvell,armada3710-nb-pinctrl 29 + - const: syscon 30 + - const: simple-mfd 31 + 32 + reg: 33 + items: 34 + - description: pinctrl and GPIO controller registers 35 + - description: interrupt controller registers 36 + 37 + gpio: 38 + description: GPIO controller subnode 39 + type: object 40 + additionalProperties: false 41 + 42 + properties: 43 + '#gpio-cells': 44 + const: 2 45 + 46 + gpio-controller: true 47 + 48 + gpio-ranges: 49 + description: Range of pins managed by the GPIO controller 50 + 51 + '#interrupt-cells': 52 + const: 2 53 + 54 + interrupt-controller: true 55 + 56 + interrupts: 57 + description: List of interrupt specifiers for the GPIO controller 58 + 59 + required: 60 + - '#gpio-cells' 61 + - gpio-ranges 62 + - gpio-controller 63 + - '#interrupt-cells' 64 + - interrupt-controller 65 + - interrupts 66 + 67 + xtal-clk: 68 + type: object 69 + additionalProperties: false 70 + 71 + properties: 72 + compatible: 73 + const: marvell,armada-3700-xtal-clock 74 + 75 + '#clock-cells': 76 + const: 0 77 + 78 + clock-output-names: true 79 + 80 + patternProperties: 81 + '-pins$': 82 + $ref: pinmux-node.yaml# 83 + additionalProperties: false 84 + 85 + properties: 86 + groups: 87 + enum: [ emmc_nb, i2c1, i2c2, jtag, mii_col, onewire, pcie1, 88 + pcie1_clkreq, pcie1_wakeup, pmic0, pmic1, ptp, ptp_clk, 89 + ptp_trig, pwm0, pwm1, pwm2, pwm3, rgmii, sdio0, sdio_sb, smi, 90 + spi_cs1, spi_cs2, spi_cs3, spi_quad, uart1, uart2, 91 + usb2_drvvbus1, usb32_drvvbus ] 92 + 93 + function: 94 + enum: [ drvbus, emmc, gpio, i2c, jtag, led, mii, mii_err, onewire, 95 + pcie, pmic, ptp, pwm, sdio, smi, spi, uart ] 96 + 97 + required: 98 + - compatible 99 + - reg 100 + 101 + additionalProperties: false 102 + 103 + examples: 104 + - | 105 + #include <dt-bindings/interrupt-controller/arm-gic.h> 106 + 107 + pinctrl_sb: pinctrl@18800 { 108 + compatible = "marvell,armada3710-sb-pinctrl", "syscon", "simple-mfd"; 109 + reg = <0x18800 0x100>, <0x18C00 0x20>; 110 + 111 + gpio { 112 + #gpio-cells = <2>; 113 + gpio-ranges = <&pinctrl_sb 0 0 29>; 114 + gpio-controller; 115 + #interrupt-cells = <2>; 116 + interrupt-controller; 117 + interrupts = 118 + <GIC_SPI 160 IRQ_TYPE_LEVEL_HIGH>, 119 + <GIC_SPI 159 IRQ_TYPE_LEVEL_HIGH>, 120 + <GIC_SPI 158 IRQ_TYPE_LEVEL_HIGH>, 121 + <GIC_SPI 157 IRQ_TYPE_LEVEL_HIGH>, 122 + <GIC_SPI 156 IRQ_TYPE_LEVEL_HIGH>; 123 + }; 124 + };
+86
Documentation/devicetree/bindings/pinctrl/marvell,berlin2-soc-pinctrl.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/pinctrl/marvell,berlin2-soc-pinctrl.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Marvell Berlin pin-controller driver 8 + 9 + maintainers: 10 + - Antoine Tenart <atenart@kernel.org> 11 + - Jisheng Zhang <jszhang@kernel.org> 12 + 13 + description: > 14 + Pin control registers are part of both chip controller and system controller 15 + register sets. Pin controller nodes should be a sub-node of either the chip 16 + controller or system controller node. The pins controlled are organized in 17 + groups, so no actual pin information is needed. 18 + 19 + A pin-controller node should contain subnodes representing the pin group 20 + configurations, one per function. Each subnode has the group name and the 21 + muxing function used. 22 + 23 + Be aware the Marvell Berlin datasheets use the keyword 'mode' for what is 24 + called a 'function' in the pin-controller subsystem. 25 + 26 + properties: 27 + compatible: 28 + items: 29 + - enum: 30 + - marvell,berlin2-soc-pinctrl 31 + - marvell,berlin2-system-pinctrl 32 + - marvell,berlin2cd-soc-pinctrl 33 + - marvell,berlin2cd-system-pinctrl 34 + - marvell,berlin2q-soc-pinctrl 35 + - marvell,berlin2q-system-pinctrl 36 + - marvell,berlin4ct-avio-pinctrl 37 + - marvell,berlin4ct-soc-pinctrl 38 + - marvell,berlin4ct-system-pinctrl 39 + - syna,as370-soc-pinctrl 40 + 41 + reg: 42 + maxItems: 1 43 + 44 + additionalProperties: 45 + description: Pin group configuration subnodes. 46 + type: object 47 + $ref: /schemas/pinctrl/pinmux-node.yaml# 48 + additionalProperties: false 49 + 50 + properties: 51 + groups: 52 + description: List of pin group names. 53 + $ref: /schemas/types.yaml#/definitions/string-array 54 + 55 + function: 56 + description: Function used to mux the group. 57 + $ref: /schemas/types.yaml#/definitions/string 58 + 59 + required: 60 + - groups 61 + - function 62 + 63 + allOf: 64 + - if: 65 + properties: 66 + compatible: 67 + contains: 68 + enum: 69 + - marvell,berlin4ct-avio-pinctrl 70 + - marvell,berlin4ct-soc-pinctrl 71 + - marvell,berlin4ct-system-pinctrl 72 + - syna,as370-soc-pinctrl 73 + then: 74 + required: 75 + - reg 76 + 77 + examples: 78 + - | 79 + pinctrl { 80 + compatible = "marvell,berlin2q-system-pinctrl"; 81 + 82 + uart0-pmux { 83 + groups = "GSM12"; 84 + function = "uart0"; 85 + }; 86 + };
+211
Documentation/devicetree/bindings/pinctrl/mediatek,mt6878-pinctrl.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/pinctrl/mediatek,mt6878-pinctrl.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: MediaTek MT6878 Pin Controller 8 + 9 + maintainers: 10 + - AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> 11 + - Igor Belwon <igor.belwon@mentallysanemainliners.org> 12 + 13 + description: 14 + The MediaTek MT6878 Pin controller is used to control SoC pins. 15 + 16 + properties: 17 + compatible: 18 + const: mediatek,mt6878-pinctrl 19 + 20 + reg: 21 + items: 22 + - description: pin controller base 23 + - description: bl group IO 24 + - description: bm group IO 25 + - description: br group IO 26 + - description: bl1 group IO 27 + - description: br1 group IO 28 + - description: lm group IO 29 + - description: lt group IO 30 + - description: rm group IO 31 + - description: rt group IO 32 + - description: EINT controller E block 33 + - description: EINT controller S block 34 + - description: EINT controller W block 35 + - description: EINT controller C block 36 + 37 + reg-names: 38 + items: 39 + - const: base 40 + - const: bl 41 + - const: bm 42 + - const: br 43 + - const: bl1 44 + - const: br1 45 + - const: lm 46 + - const: lt 47 + - const: rm 48 + - const: rt 49 + - const: eint-e 50 + - const: eint-s 51 + - const: eint-w 52 + - const: eint-c 53 + 54 + gpio-controller: true 55 + 56 + '#gpio-cells': 57 + description: 58 + Number of cells in GPIO specifier. Since the generic GPIO binding is used, 59 + the amount of cells must be specified as 2. See the below mentioned gpio 60 + binding representation for description of particular cells. 61 + const: 2 62 + 63 + gpio-ranges: 64 + maxItems: 1 65 + 66 + gpio-line-names: 67 + maxItems: 216 68 + 69 + interrupts: 70 + description: The interrupt outputs to sysirq 71 + maxItems: 1 72 + 73 + interrupt-controller: true 74 + 75 + '#interrupt-cells': 76 + const: 2 77 + 78 + # PIN CONFIGURATION NODES 79 + patternProperties: 80 + '-pins$': 81 + type: object 82 + additionalProperties: false 83 + 84 + patternProperties: 85 + '^pins': 86 + type: object 87 + allOf: 88 + - $ref: /schemas/pinctrl/pincfg-node.yaml 89 + - $ref: /schemas/pinctrl/pinmux-node.yaml 90 + description: 91 + A pinctrl node should contain at least one subnodes representing the 92 + pinctrl groups available on the machine. Each subnode will list the 93 + pins it needs, and how they should be configured, with regard to muxer 94 + configuration, pullups, drive strength, input enable/disable and input 95 + schmitt. 96 + 97 + properties: 98 + pinmux: 99 + description: 100 + Integer array, represents gpio pin number and mux setting. 101 + Supported pin number and mux are defined as macros in 102 + arch/arm64/boot/dts/mediatek/mt8196-pinfunc.h for this SoC. 103 + 104 + drive-strength: 105 + enum: [2, 4, 6, 8, 10, 12, 14, 16] 106 + 107 + drive-strength-microamp: 108 + enum: [125, 250, 500, 1000] 109 + 110 + bias-pull-down: 111 + oneOf: 112 + - type: boolean 113 + - enum: [75000, 5000] 114 + description: Pull down RSEL type resistance values (in ohms) 115 + description: 116 + For normal pull down type there is no need to specify a resistance 117 + value, hence this can be specified as a boolean property. 118 + For RSEL pull down type a resistance value (in ohms) can be added. 119 + 120 + bias-pull-up: 121 + oneOf: 122 + - type: boolean 123 + - enum: [10000, 5000, 4000, 3000] 124 + description: Pull up RSEL type resistance values (in ohms) 125 + description: 126 + For normal pull up type there is no need to specify a resistance 127 + value, hence this can be specified as a boolean property. 128 + For RSEL pull up type a resistance value (in ohms) can be added. 129 + 130 + bias-disable: true 131 + 132 + output-high: true 133 + 134 + output-low: true 135 + 136 + input-enable: true 137 + 138 + input-disable: true 139 + 140 + input-schmitt-enable: true 141 + 142 + input-schmitt-disable: true 143 + 144 + required: 145 + - pinmux 146 + 147 + additionalProperties: false 148 + 149 + required: 150 + - compatible 151 + - reg 152 + - interrupts 153 + - interrupt-controller 154 + - '#interrupt-cells' 155 + - gpio-controller 156 + - '#gpio-cells' 157 + - gpio-ranges 158 + 159 + additionalProperties: false 160 + 161 + examples: 162 + - | 163 + #include <dt-bindings/interrupt-controller/arm-gic.h> 164 + #include <dt-bindings/pinctrl/mt65xx.h> 165 + #define PINMUX_GPIO0__FUNC_GPIO0 (MTK_PIN_NO(0) | 0) 166 + #define PINMUX_GPIO99__FUNC_SCL0 (MTK_PIN_NO(99) | 1) 167 + #define PINMUX_GPIO100__FUNC_SDA0 (MTK_PIN_NO(100) | 1) 168 + 169 + pio: pinctrl@10005000 { 170 + compatible = "mediatek,mt6878-pinctrl"; 171 + reg = <0x10005000 0x1000>, 172 + <0x11d10000 0x1000>, 173 + <0x11d30000 0x1000>, 174 + <0x11d40000 0x1000>, 175 + <0x11d50000 0x1000>, 176 + <0x11d60000 0x1000>, 177 + <0x11e20000 0x1000>, 178 + <0x11e30000 0x1000>, 179 + <0x11eb0000 0x1000>, 180 + <0x11ec0000 0x1000>, 181 + <0x11ce0000 0x1000>, 182 + <0x11de0000 0x1000>, 183 + <0x11e60000 0x1000>, 184 + <0x1c01e000 0x1000>; 185 + reg-names = "base", "bl", "bm", "br", "bl1", "br1", 186 + "lm", "lt", "rm", "rt", "eint-e", "eint-s", 187 + "eint-w", "eint-c"; 188 + gpio-controller; 189 + #gpio-cells = <2>; 190 + gpio-ranges = <&pio 0 0 220>; 191 + interrupt-controller; 192 + interrupts = <GIC_SPI 239 IRQ_TYPE_LEVEL_HIGH 0>; 193 + #interrupt-cells = <2>; 194 + 195 + gpio-pins { 196 + pins { 197 + pinmux = <PINMUX_GPIO0__FUNC_GPIO0>; 198 + bias-pull-up = <4000>; 199 + drive-strength = <6>; 200 + }; 201 + }; 202 + 203 + i2c0-pins { 204 + pins-bus { 205 + pinmux = <PINMUX_GPIO99__FUNC_SCL0>, 206 + <PINMUX_GPIO100__FUNC_SDA0>; 207 + bias-pull-down = <75000>; 208 + drive-strength-microamp = <1000>; 209 + }; 210 + }; 211 + };
+5
Documentation/devicetree/bindings/pinctrl/mediatek,mt7988-pinctrl.yaml
··· 61 61 - "#gpio-cells" 62 62 63 63 patternProperties: 64 + "-hog(-[0-9]+)?$": 65 + type: object 66 + required: 67 + - gpio-hog 68 + 64 69 '-pins$': 65 70 type: object 66 71 additionalProperties: false
+89
Documentation/devicetree/bindings/pinctrl/microchip,mpfs-pinctrl-iomux0.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/pinctrl/microchip,mpfs-pinctrl-iomux0.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Microchip PolarFire SoC iomux0 8 + 9 + maintainers: 10 + - Conor Dooley <conor.dooley@microchip.com> 11 + 12 + description: 13 + iomux0 is responsible for routing some functions to either the FPGA fabric, 14 + or to MSSIOs. It only performs muxing, and has no IO configuration role, as 15 + fabric IOs are configured separately and just routing a function to MSSIOs is 16 + not sufficient for it to actually get mapped to an MSSIO, just makes it 17 + possible. 18 + 19 + properties: 20 + compatible: 21 + oneOf: 22 + - const: microchip,mpfs-pinctrl-iomux0 23 + - items: 24 + - const: microchip,pic64gx-pinctrl-iomux0 25 + - const: microchip,mpfs-pinctrl-iomux0 26 + 27 + reg: 28 + maxItems: 1 29 + 30 + pinctrl-use-default: true 31 + 32 + patternProperties: 33 + '^mux-': 34 + type: object 35 + $ref: pinmux-node.yaml 36 + additionalProperties: false 37 + 38 + properties: 39 + function: 40 + description: 41 + A string containing the name of the function to mux to the group. 42 + enum: [ spi0, spi1, i2c0, i2c1, can0, can1, qspi, uart0, uart1, uart2, 43 + uart3, uart4, mdio0, mdio1 ] 44 + 45 + groups: 46 + description: 47 + An array of strings. Each string contains the name of a group. 48 + items: 49 + enum: [ spi0_fabric, spi0_mssio, spi1_fabric, spi1_mssio, i2c0_fabric, 50 + i2c0_mssio, i2c1_fabric, i2c1_mssio, can0_fabric, can0_mssio, 51 + can1_fabric, can1_mssio, qspi_fabric, qspi_mssio, 52 + uart0_fabric, uart0_mssio, uart1_fabric, uart1_mssio, 53 + uart2_fabric, uart2_mssio, uart3_fabric, uart3_mssio, 54 + uart4_fabric, uart4_mssio, mdio0_fabric, mdio0_mssio, 55 + mdio1_fabric, mdio1_mssio ] 56 + 57 + required: 58 + - function 59 + - groups 60 + 61 + required: 62 + - compatible 63 + - reg 64 + 65 + additionalProperties: false 66 + 67 + examples: 68 + - | 69 + soc { 70 + #size-cells = <1>; 71 + #address-cells = <1>; 72 + 73 + pinctrl@200 { 74 + compatible = "microchip,mpfs-pinctrl-iomux0"; 75 + reg = <0x200 0x4>; 76 + 77 + mux-spi0-fabric { 78 + function = "spi0"; 79 + groups = "spi0_fabric"; 80 + }; 81 + 82 + mux-spi1-mssio { 83 + function = "spi1"; 84 + groups = "spi1_mssio"; 85 + }; 86 + }; 87 + }; 88 + 89 + ...
+74
Documentation/devicetree/bindings/pinctrl/microchip,pic64gx-pinctrl-gpio2.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/pinctrl/microchip,pic64gx-pinctrl-gpio2.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Microchip PIC64GX GPIO2 Mux 8 + 9 + maintainers: 10 + - Conor Dooley <conor.dooley@microchip.com> 11 + 12 + description: 13 + The "GPIO2 Mux" determines whether GPIO2 or select other functions are 14 + available on package pins on PIC64GX. Some of these functions must be 15 + mapped to this mux via iomux0 for settings here to have any impact. 16 + 17 + properties: 18 + compatible: 19 + const: microchip,pic64gx-pinctrl-gpio2 20 + 21 + reg: 22 + maxItems: 1 23 + 24 + pinctrl-use-default: true 25 + 26 + patternProperties: 27 + '^mux-': 28 + type: object 29 + $ref: pinmux-node.yaml 30 + additionalProperties: false 31 + 32 + properties: 33 + function: 34 + description: 35 + A string containing the name of the function to mux to the group. 36 + enum: [ mdio0, mdio1, spi0, can0, pcie, qspi, uart3, uart4, can1, uart2, gpio ] 37 + 38 + groups: 39 + description: 40 + An array of strings. Each string contains the name of a group. 41 + items: 42 + enum: [ mdio0, mdio1, spi0, can0, pcie, qspi, uart3, uart4, can1, uart2, 43 + gpio_mdio0, gpio_mdio1, gpio_spi0, gpio_can0, gpio_pcie, 44 + gpio_qspi, gpio_uart3, gpio_uart4, gpio_can1, gpio_uart2 ] 45 + 46 + required: 47 + - function 48 + - groups 49 + 50 + required: 51 + - compatible 52 + - reg 53 + 54 + additionalProperties: false 55 + 56 + examples: 57 + - | 58 + pinctrl@41000000 { 59 + compatible = "microchip,pic64gx-pinctrl-gpio2"; 60 + reg = <0x41000000 0x4>; 61 + pinctrl-use-default; 62 + pinctrl-names = "default"; 63 + pinctrl-0 = <&mdio0_gpio2>, <&mdio1_gpio2>, <&spi0_gpio2>, <&qspi_gpio2>, 64 + <&uart3_gpio2>, <&uart4_gpio2>, <&can1_gpio2>, <&can0_gpio2>, 65 + <&uart2_gpio2>; 66 + 67 + mux-gpio2 { 68 + function = "gpio"; 69 + groups = "gpio_mdio1", "gpio_spi0", "gpio_can0", "gpio_pcie", 70 + "gpio_qspi", "gpio_uart3", "gpio_uart4", "gpio_can1"; 71 + }; 72 + }; 73 + 74 + ...
+17
Documentation/devicetree/bindings/pinctrl/pincfg-node.yaml
··· 153 153 pin. Typically indicates how many double-inverters are 154 154 used to delay the signal. 155 155 156 + skew-delay-input-ps: 157 + description: 158 + this affects the expected clock skew in ps on an input pin. 159 + 160 + skew-delay-output-ps: 161 + description: 162 + this affects the expected delay in ps before latching a value to 163 + an output pin. 164 + 165 + if: 166 + required: 167 + - skew-delay 168 + then: 169 + properties: 170 + skew-delay-input-ps: false 171 + skew-delay-output-ps: false 172 + 156 173 additionalProperties: true
+1
Documentation/devicetree/bindings/pinctrl/pinctrl-single.yaml
··· 24 24 - items: 25 25 - enum: 26 26 - ti,am437-padconf 27 + - ti,am62l-padconf 27 28 - ti,am654-padconf 28 29 - ti,dra7-padconf 29 30 - ti,omap2420-padconf
+127
Documentation/devicetree/bindings/pinctrl/qcom,kaanapali-tlmm.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/pinctrl/qcom,kaanapali-tlmm.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Qualcomm Technologies, Inc. Kaanapali TLMM block 8 + 9 + maintainers: 10 + - Jingyi Wang <jingyi.wang@oss.qualcomm.com> 11 + 12 + description: 13 + Top Level Mode Multiplexer pin controller in Qualcomm Kaanapali SoC. 14 + 15 + allOf: 16 + - $ref: /schemas/pinctrl/qcom,tlmm-common.yaml# 17 + 18 + properties: 19 + compatible: 20 + const: qcom,kaanapali-tlmm 21 + 22 + reg: 23 + maxItems: 1 24 + 25 + interrupts: 26 + maxItems: 1 27 + 28 + gpio-reserved-ranges: 29 + minItems: 1 30 + maxItems: 109 31 + 32 + gpio-line-names: 33 + maxItems: 217 34 + 35 + patternProperties: 36 + "-state$": 37 + oneOf: 38 + - $ref: "#/$defs/qcom-kaanapali-tlmm-state" 39 + - patternProperties: 40 + "-pins$": 41 + $ref: "#/$defs/qcom-kaanapali-tlmm-state" 42 + additionalProperties: false 43 + 44 + $defs: 45 + qcom-kaanapali-tlmm-state: 46 + type: object 47 + description: 48 + Pinctrl node's client devices use subnodes for desired pin configuration. 49 + Client device subnodes use below standard properties. 50 + $ref: qcom,tlmm-common.yaml#/$defs/qcom-tlmm-state 51 + unevaluatedProperties: false 52 + 53 + properties: 54 + pins: 55 + description: 56 + List of gpio pins affected by the properties specified in this 57 + subnode. 58 + items: 59 + oneOf: 60 + - pattern: "^gpio([0-9]|[1-9][0-9]|1[0-9][0-9]|20[0-9]|21[0-6])$" 61 + - enum: [ ufs_reset, sdc2_clk, sdc2_cmd, sdc2_data ] 62 + minItems: 1 63 + maxItems: 36 64 + 65 + function: 66 + description: 67 + Specify the alternative function to be configured for the specified 68 + pins. 69 + enum: [ gpio, aoss_cti, atest_char, atest_usb, audio_ext_mclk0, 70 + audio_ext_mclk1, audio_ref_clk, cam_asc_mclk2, cam_asc_mclk4, 71 + cam_mclk, cci_async_in, cci_i2c_scl, cci_i2c_sda, cci_timer, 72 + cmu_rng, coex_uart1_rx, coex_uart1_tx, coex_uart2_rx, 73 + coex_uart2_tx, dbg_out_clk, ddr_bist_complete, ddr_bist_fail, 74 + ddr_bist_start, ddr_bist_stop, ddr_pxi0, ddr_pxi1, ddr_pxi2, 75 + ddr_pxi3, dp_hot, egpio, gcc_gp1, gcc_gp2, gcc_gp3, gnss_adc0, 76 + gnss_adc1, i2chub0_se0, i2chub0_se1, i2chub0_se2, i2chub0_se3, 77 + i2chub0_se4, i2s0_data0, i2s0_data1, i2s0_sck, i2s0_ws, 78 + i2s1_data0, i2s1_data1, i2s1_sck, i2s1_ws, ibi_i3c, jitter_bist, 79 + mdp_esync0_out, mdp_esync1_out, mdp_vsync, mdp_vsync0_out, 80 + mdp_vsync1_out, mdp_vsync2_out, mdp_vsync3_out, mdp_vsync5_out, 81 + mdp_vsync_e, nav_gpio0, nav_gpio1, nav_gpio2, nav_gpio3, 82 + pcie0_clk_req_n, phase_flag, pll_bist_sync, pll_clk_aux, 83 + prng_rosc0, prng_rosc1, prng_rosc2, prng_rosc3, qdss_cti, 84 + qdss_gpio_traceclk, qdss_gpio_tracectl, qdss_gpio_tracedata, 85 + qlink_big_enable, qlink_big_request, qlink_little_enable, 86 + qlink_little_request, qlink_wmss, qspi0, qspi1, qspi2, qspi3, 87 + qspi_clk, qspi_cs, qup1_se0, qup1_se1, qup1_se2, qup1_se3, 88 + qup1_se4, qup1_se5, qup1_se6, qup1_se7, qup2_se0, qup2_se1, 89 + qup2_se2, qup2_se3, qup2_se4, qup3_se0, qup3_se1, qup3_se2, 90 + qup3_se3, qup3_se4, qup3_se5, qup4_se0, qup4_se1, qup4_se2, 91 + qup4_se3, qup4_se4, sd_write_protect, sdc40, sdc41, sdc42, sdc43, 92 + sdc4_clk, sdc4_cmd, sys_throttle, tb_trig_sdc2, tb_trig_sdc4, 93 + tmess_prng0, tmess_prng1, tmess_prng2, tmess_prng3, tsense_pwm1, 94 + tsense_pwm2, tsense_pwm3, tsense_pwm4, tsense_pwm5, tsense_pwm6, 95 + tsense_pwm7, uim0_clk, uim0_data, uim0_present, uim0_reset, uim1_clk, 96 + uim1_data, uim1_present, uim1_reset, usb0_hs, usb_phy, vfr_0, vfr_1, 97 + vsense_trigger_mirnat, wcn_sw, wcn_sw_ctrl ] 98 + 99 + required: 100 + - pins 101 + 102 + required: 103 + - compatible 104 + - reg 105 + 106 + unevaluatedProperties: false 107 + 108 + examples: 109 + - | 110 + #include <dt-bindings/interrupt-controller/arm-gic.h> 111 + 112 + tlmm: pinctrl@f100000 { 113 + compatible = "qcom,kaanapali-tlmm"; 114 + reg = <0x0f100000 0x300000>; 115 + interrupts = <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>; 116 + gpio-controller; 117 + #gpio-cells = <2>; 118 + gpio-ranges = <&tlmm 0 0 218>; 119 + interrupt-controller; 120 + #interrupt-cells = <2>; 121 + 122 + qup-uart7-state { 123 + pins = "gpio62", "gpio63"; 124 + function = "qup1_se7"; 125 + }; 126 + }; 127 + ...
+2 -2
Documentation/devicetree/bindings/pinctrl/qcom,msm8960-pinctrl.yaml
··· 107 107 - | 108 108 #include <dt-bindings/interrupt-controller/arm-gic.h> 109 109 110 - msmgpio: pinctrl@800000 { 110 + tlmm: pinctrl@800000 { 111 111 compatible = "qcom,msm8960-pinctrl"; 112 112 reg = <0x800000 0x4000>; 113 113 #gpio-cells = <2>; 114 114 gpio-controller; 115 - gpio-ranges = <&msmgpio 0 0 152>; 115 + gpio-ranges = <&tlmm 0 0 152>; 116 116 interrupts = <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>; 117 117 interrupt-controller; 118 118 #interrupt-cells = <2>;
+15
Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.yaml
··· 59 59 - qcom,pmc8180-gpio 60 60 - qcom,pmc8180c-gpio 61 61 - qcom,pmc8380-gpio 62 + - qcom,pmcx0102-gpio 62 63 - qcom,pmd8028-gpio 64 + - qcom,pmh0101-gpio 65 + - qcom,pmh0104-gpio 66 + - qcom,pmh0110-gpio 63 67 - qcom,pmi632-gpio 64 68 - qcom,pmi8950-gpio 65 69 - qcom,pmi8994-gpio ··· 72 68 - qcom,pmiv0104-gpio 73 69 - qcom,pmk8350-gpio 74 70 - qcom,pmk8550-gpio 71 + - qcom,pmk8850-gpio 75 72 - qcom,pmm8155au-gpio 76 73 - qcom,pmm8654au-gpio 77 74 - qcom,pmp8074-gpio ··· 196 191 - qcom,pm8950-gpio 197 192 - qcom,pm8953-gpio 198 193 - qcom,pmi632-gpio 194 + - qcom,pmh0104-gpio 195 + - qcom,pmk8850-gpio 199 196 then: 200 197 properties: 201 198 gpio-line-names: ··· 310 303 compatible: 311 304 contains: 312 305 enum: 306 + - qcom,pmcx0102-gpio 307 + - qcom,pmh0110-gpio 313 308 - qcom,pmi8998-gpio 314 309 then: 315 310 properties: ··· 327 318 compatible: 328 319 contains: 329 320 enum: 321 + - qcom,pmh0101-gpio 330 322 - qcom,pmih0108-gpio 331 323 then: 332 324 properties: ··· 491 481 - gpio1-gpio22 for pm8994 492 482 - gpio1-gpio26 for pm8998 493 483 - gpio1-gpio22 for pma8084 484 + - gpio1-gpio14 for pmcx0102 494 485 - gpio1-gpio4 for pmd8028 486 + - gpio1-gpio18 for pmh0101 487 + - gpio1-gpio8 for pmh0104 488 + - gpio1-gpio14 for pmh0110 495 489 - gpio1-gpio8 for pmi632 496 490 - gpio1-gpio2 for pmi8950 497 491 - gpio1-gpio10 for pmi8994 498 492 - gpio1-gpio18 for pmih0108 499 493 - gpio1-gpio4 for pmk8350 500 494 - gpio1-gpio6 for pmk8550 495 + - gpio1-gpio8 for pmk8850 501 496 - gpio1-gpio10 for pmm8155au 502 497 - gpio1-gpio12 for pmm8654au 503 498 - gpio1-gpio12 for pmp8074 (holes on gpio1 and gpio12)
+7 -1
Documentation/devicetree/bindings/pinctrl/qcom,sm6115-lpass-lpi-pinctrl.yaml
··· 16 16 17 17 properties: 18 18 compatible: 19 - const: qcom,sm6115-lpass-lpi-pinctrl 19 + oneOf: 20 + - enum: 21 + - qcom,sm6115-lpass-lpi-pinctrl 22 + - items: 23 + - enum: 24 + - qcom,qcm2290-lpass-lpi-pinctrl 25 + - const: qcom,sm6115-lpass-lpi-pinctrl 20 26 21 27 reg: 22 28 items:
+1
Documentation/devicetree/bindings/pinctrl/rockchip,pinctrl.yaml
··· 44 44 - rockchip,rk3328-pinctrl 45 45 - rockchip,rk3368-pinctrl 46 46 - rockchip,rk3399-pinctrl 47 + - rockchip,rk3506-pinctrl 47 48 - rockchip,rk3528-pinctrl 48 49 - rockchip,rk3562-pinctrl 49 50 - rockchip,rk3568-pinctrl
+1
Documentation/devicetree/bindings/pinctrl/samsung,pinctrl-wakeup-interrupt.yaml
··· 41 41 - samsung,exynos7870-wakeup-eint 42 42 - samsung,exynos7885-wakeup-eint 43 43 - samsung,exynos850-wakeup-eint 44 + - samsung,exynos8890-wakeup-eint 44 45 - samsung,exynos8895-wakeup-eint 45 46 - const: samsung,exynos7-wakeup-eint 46 47 - items:
+5 -1
Documentation/devicetree/bindings/pinctrl/samsung,pinctrl.yaml
··· 36 36 compatible: 37 37 enum: 38 38 - axis,artpec8-pinctrl 39 + - axis,artpec9-pinctrl 39 40 - google,gs101-pinctrl 40 41 - samsung,s3c64xx-pinctrl 41 42 - samsung,s5pv210-pinctrl ··· 53 52 - samsung,exynos7870-pinctrl 54 53 - samsung,exynos7885-pinctrl 55 54 - samsung,exynos850-pinctrl 55 + - samsung,exynos8890-pinctrl 56 56 - samsung,exynos8895-pinctrl 57 57 - samsung,exynos9810-pinctrl 58 58 - samsung,exynos990-pinctrl ··· 135 133 properties: 136 134 compatible: 137 135 contains: 138 - const: google,gs101-pinctrl 136 + enum: 137 + - google,gs101-pinctrl 138 + - samsung,exynos8890-pinctrl 139 139 then: 140 140 required: 141 141 - clocks
-83
Documentation/devicetree/bindings/pinctrl/sprd,pinctrl.txt
··· 1 - * Spreadtrum Pin Controller 2 - 3 - The Spreadtrum pin controller are organized in 3 blocks (types). 4 - 5 - The first block comprises some global control registers, and each 6 - register contains several bit fields with one bit or several bits 7 - to configure for some global common configuration, such as domain 8 - pad driving level, system control select and so on ("domain pad 9 - driving level": One pin can output 3.0v or 1.8v, depending on the 10 - related domain pad driving selection, if the related domain pad 11 - select 3.0v, then the pin can output 3.0v. "system control" is used 12 - to choose one function (like: UART0) for which system, since we 13 - have several systems (AP/CP/CM4) on one SoC.). 14 - 15 - There are too much various configuration that we can not list all 16 - of them, so we can not make every Spreadtrum-special configuration 17 - as one generic configuration, and maybe it will add more strange 18 - global configuration in future. Then we add one "sprd,control" to 19 - set these various global control configuration, and we need use 20 - magic number for this property. 21 - 22 - Moreover we recognise every fields comprising one bit or several 23 - bits in one global control register as one pin, thus we should 24 - record every pin's bit offset, bit width and register offset to 25 - configure this field (pin). 26 - 27 - The second block comprises some common registers which have unified 28 - register definition, and each register described one pin is used 29 - to configure the pin sleep mode, function select and sleep related 30 - configuration. 31 - 32 - Now we have 4 systems for sleep mode on SC9860 SoC: AP system, 33 - PUBCP system, TGLDSP system and AGDSP system. And the pin sleep 34 - related configuration are: 35 - - input-enable 36 - - input-disable 37 - - output-high 38 - - output-low 39 - - bias-pull-up 40 - - bias-pull-down 41 - 42 - In some situation we need set the pin sleep mode and pin sleep related 43 - configuration, to set the pin sleep related configuration automatically 44 - by hardware when the system specified by sleep mode goes into deep 45 - sleep mode. For example, if we set the pin sleep mode as PUBCP_SLEEP 46 - and set the pin sleep related configuration as "input-enable", which 47 - means when PUBCP system goes into deep sleep mode, this pin will be set 48 - input enable automatically. 49 - 50 - Moreover we can not use the "sleep" state, since some systems (like: 51 - PUBCP system) do not run linux kernel OS (only AP system run linux 52 - kernel on SC9860 platform), then we can not select "sleep" state 53 - when the PUBCP system goes into deep sleep mode. Thus we introduce 54 - "sprd,sleep-mode" property to set pin sleep mode. 55 - 56 - The last block comprises some misc registers which also have unified 57 - register definition, and each register described one pin is used to 58 - configure drive strength, pull up/down and so on. Especially for pull 59 - up, we have two kind pull up resistor: 20K and 4.7K. 60 - 61 - Required properties for Spreadtrum pin controller: 62 - - compatible: "sprd,<soc>-pinctrl" 63 - Please refer to each sprd,<soc>-pinctrl.txt binding doc for supported SoCs. 64 - - reg: The register address of pin controller device. 65 - - pins : An array of pin names. 66 - 67 - Optional properties: 68 - - function: Specified the function name. 69 - - drive-strength: Drive strength in mA. 70 - - input-schmitt-disable: Enable schmitt-trigger mode. 71 - - input-schmitt-enable: Disable schmitt-trigger mode. 72 - - bias-disable: Disable pin bias. 73 - - bias-pull-down: Pull down on pin. 74 - - bias-pull-up: Pull up on pin. 75 - - input-enable: Enable pin input. 76 - - input-disable: Enable pin output. 77 - - output-high: Set the pin as an output level high. 78 - - output-low: Set the pin as an output level low. 79 - - sleep-hardware-state: Indicate these configs in this state are sleep related. 80 - - sprd,control: Control values referring to databook for global control pins. 81 - - sprd,sleep-mode: Sleep mode selection. 82 - 83 - Please refer to each sprd,<soc>-pinctrl.txt binding doc for supported values.
-70
Documentation/devicetree/bindings/pinctrl/sprd,sc9860-pinctrl.txt
··· 1 - * Spreadtrum SC9860 Pin Controller 2 - 3 - Please refer to sprd,pinctrl.txt in this directory for common binding part 4 - and usage. 5 - 6 - Required properties: 7 - - compatible: Must be "sprd,sc9860-pinctrl". 8 - - reg: The register address of pin controller device. 9 - - pins : An array of strings, each string containing the name of a pin. 10 - 11 - Optional properties: 12 - - function: A string containing the name of the function, values must be 13 - one of: "func1", "func2", "func3" and "func4". 14 - - drive-strength: Drive strength in mA. Supported values: 2, 4, 6, 8, 10, 15 - 12, 14, 16, 20, 21, 24, 25, 27, 29, 31 and 33. 16 - - input-schmitt-disable: Enable schmitt-trigger mode. 17 - - input-schmitt-enable: Disable schmitt-trigger mode. 18 - - bias-disable: Disable pin bias. 19 - - bias-pull-down: Pull down on pin. 20 - - bias-pull-up: Pull up on pin. Supported values: 20000 for pull-up resistor 21 - is 20K and 4700 for pull-up resistor is 4.7K. 22 - - input-enable: Enable pin input. 23 - - input-disable: Enable pin output. 24 - - output-high: Set the pin as an output level high. 25 - - output-low: Set the pin as an output level low. 26 - - sleep-hardware-state: Indicate these configs in this state are sleep related. 27 - - sprd,control: Control values referring to databook for global control pins. 28 - - sprd,sleep-mode: Choose the pin sleep mode, and supported values are: 29 - AP_SLEEP, PUBCP_SLEEP, TGLDSP_SLEEP and AGDSP_SLEEP. 30 - 31 - Pin sleep mode definition: 32 - enum pin_sleep_mode { 33 - AP_SLEEP = BIT(0), 34 - PUBCP_SLEEP = BIT(1), 35 - TGLDSP_SLEEP = BIT(2), 36 - AGDSP_SLEEP = BIT(3), 37 - }; 38 - 39 - Example: 40 - pin_controller: pinctrl@402a0000 { 41 - compatible = "sprd,sc9860-pinctrl"; 42 - reg = <0x402a0000 0x10000>; 43 - 44 - grp1: sd0 { 45 - pins = "SC9860_VIO_SD2_IRTE", "SC9860_VIO_SD0_IRTE"; 46 - sprd,control = <0x1>; 47 - }; 48 - 49 - grp2: rfctl_33 { 50 - pins = "SC9860_RFCTL33"; 51 - function = "func2"; 52 - sprd,sleep-mode = <AP_SLEEP | PUBCP_SLEEP>; 53 - grp2_sleep_mode: rfctl_33_sleep { 54 - pins = "SC9860_RFCTL33"; 55 - sleep-hardware-state; 56 - output-low; 57 - } 58 - }; 59 - 60 - grp3: rfctl_misc_20 { 61 - pins = "SC9860_RFCTL20_MISC"; 62 - drive-strength = <10>; 63 - bias-pull-up = <4700>; 64 - grp3_sleep_mode: rfctl_misc_sleep { 65 - pins = "SC9860_RFCTL20_MISC"; 66 - sleep-hardware-state; 67 - bias-pull-up; 68 - } 69 - }; 70 - };
+199
Documentation/devicetree/bindings/pinctrl/sprd,sc9860-pinctrl.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/pinctrl/sprd,sc9860-pinctrl.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Spreadtrum SC9860 Pin Controller 8 + 9 + maintainers: 10 + - Baolin Wang <baolin.wang@linux.alibaba.com> 11 + 12 + description: > 13 + The Spreadtrum pin controller are organized in 3 blocks (types). 14 + 15 + The first block comprises some global control registers, and each 16 + register contains several bit fields with one bit or several bits 17 + to configure for some global common configuration, such as domain 18 + pad driving level, system control select and so on ("domain pad 19 + driving level": One pin can output 3.0v or 1.8v, depending on the 20 + related domain pad driving selection, if the related domain pad 21 + select 3.0v, then the pin can output 3.0v. "system control" is used 22 + to choose one function (like: UART0) for which system, since we 23 + have several systems (AP/CP/CM4) on one SoC.). 24 + 25 + There are too much various configuration that we can not list all 26 + of them, so we can not make every Spreadtrum-special configuration 27 + as one generic configuration, and maybe it will add more strange 28 + global configuration in future. Then we add one "sprd,control" to 29 + set these various global control configuration, and we need use 30 + magic number for this property. 31 + 32 + Moreover we recognize every fields comprising one bit or several 33 + bits in one global control register as one pin, thus we should 34 + record every pin's bit offset, bit width and register offset to 35 + configure this field (pin). 36 + 37 + The second block comprises some common registers which have unified 38 + register definition, and each register described one pin is used 39 + to configure the pin sleep mode, function select and sleep related 40 + configuration. 41 + 42 + Now we have 4 systems for sleep mode on SC9860 SoC: AP system, 43 + PUBCP system, TGLDSP system and AGDSP system. And the pin sleep 44 + related configuration are: 45 + - input-enable 46 + - input-disable 47 + - output-high 48 + - output-low 49 + - bias-pull-up 50 + - bias-pull-down 51 + 52 + In some situation we need set the pin sleep mode and pin sleep related 53 + configuration, to set the pin sleep related configuration automatically 54 + by hardware when the system specified by sleep mode goes into deep 55 + sleep mode. For example, if we set the pin sleep mode as PUBCP_SLEEP 56 + and set the pin sleep related configuration as "input-enable", which 57 + means when PUBCP system goes into deep sleep mode, this pin will be set 58 + input enable automatically. 59 + 60 + Moreover we can not use the "sleep" state, since some systems (like: 61 + PUBCP system) do not run linux kernel OS (only AP system run linux 62 + kernel on SC9860 platform), then we can not select "sleep" state 63 + when the PUBCP system goes into deep sleep mode. Thus we introduce 64 + "sprd,sleep-mode" property to set pin sleep mode. 65 + 66 + The last block comprises some misc registers which also have unified 67 + register definition, and each register described one pin is used to 68 + configure drive strength, pull up/down and so on. Especially for pull 69 + up, we have two kind pull up resistor: 20K and 4.7K. 70 + 71 + properties: 72 + compatible: 73 + const: sprd,sc9860-pinctrl 74 + 75 + reg: 76 + maxItems: 1 77 + 78 + additionalProperties: 79 + $ref: '#/$defs/pin-node' 80 + unevaluatedProperties: false 81 + 82 + properties: 83 + function: 84 + description: Function to assign to the pins. 85 + enum: 86 + - func1 87 + - func2 88 + - func3 89 + - func4 90 + 91 + drive-strength: 92 + description: Drive strength in mA. 93 + $ref: /schemas/types.yaml#/definitions/uint32 94 + enum: [2, 4, 6, 8, 10, 12, 14, 16, 20, 21, 24, 25, 27, 29, 31, 33] 95 + 96 + input-schmitt-disable: true 97 + 98 + input-schmitt-enable: true 99 + 100 + bias-pull-up: 101 + enum: [20000, 4700] 102 + 103 + sprd,sleep-mode: 104 + description: Pin sleep mode selection. 105 + $ref: /schemas/types.yaml#/definitions/uint32 106 + maximum: 0x1f 107 + 108 + sprd,control: 109 + description: Control values referring to databook for global control pins. 110 + $ref: /schemas/types.yaml#/definitions/uint32 111 + 112 + patternProperties: 113 + 'sleep$': 114 + $ref: '#/$defs/pin-node' 115 + unevaluatedProperties: false 116 + 117 + properties: 118 + bias-pull-up: 119 + type: boolean 120 + 121 + sleep-hardware-state: 122 + description: Indicate these configs in sleep related state. 123 + type: boolean 124 + 125 + $defs: 126 + pin-node: 127 + type: object 128 + allOf: 129 + - $ref: /schemas/pinctrl/pincfg-node.yaml# 130 + - $ref: /schemas/pinctrl/pinmux-node.yaml# 131 + 132 + properties: 133 + pins: 134 + description: Names of pins to configure. 135 + $ref: /schemas/types.yaml#/definitions/string-array 136 + 137 + bias-disable: 138 + description: Disable pin bias. 139 + type: boolean 140 + 141 + bias-pull-down: 142 + description: Pull down on pin. 143 + type: boolean 144 + 145 + bias-pull-up: true 146 + 147 + input-enable: 148 + description: Enable pin input. 149 + type: boolean 150 + 151 + input-disable: 152 + description: Enable pin output. 153 + type: boolean 154 + 155 + output-high: 156 + description: Set the pin as an output level high. 157 + type: boolean 158 + 159 + output-low: 160 + description: Set the pin as an output level low. 161 + type: boolean 162 + 163 + required: 164 + - compatible 165 + - reg 166 + 167 + examples: 168 + - | 169 + pin_controller: pinctrl@402a0000 { 170 + compatible = "sprd,sc9860-pinctrl"; 171 + reg = <0x402a0000 0x10000>; 172 + 173 + grp1: sd0 { 174 + pins = "SC9860_VIO_SD2_IRTE", "SC9860_VIO_SD0_IRTE"; 175 + sprd,control = <0x1>; 176 + }; 177 + 178 + grp2: rfctl_33 { 179 + pins = "SC9860_RFCTL33"; 180 + function = "func2"; 181 + sprd,sleep-mode = <3>; 182 + grp2_sleep_mode: rfctl_33_sleep { 183 + pins = "SC9860_RFCTL33"; 184 + sleep-hardware-state; 185 + output-low; 186 + }; 187 + }; 188 + 189 + grp3: rfctl_misc_20 { 190 + pins = "SC9860_RFCTL20_MISC"; 191 + drive-strength = <10>; 192 + bias-pull-up = <4700>; 193 + grp3_sleep_mode: rfctl_misc_sleep { 194 + pins = "SC9860_RFCTL20_MISC"; 195 + sleep-hardware-state; 196 + bias-pull-up; 197 + }; 198 + }; 199 + };
+85 -16
Documentation/devicetree/bindings/pinctrl/st,stm32-pinctrl.yaml
··· 151 151 pinctrl group available on the machine. Each subnode will list the 152 152 pins it needs, and how they should be configured, with regard to muxer 153 153 configuration, pullups, drive, output high/low and output speed. 154 + $ref: /schemas/pinctrl/pincfg-node.yaml 155 + 154 156 properties: 155 157 pinmux: 156 158 $ref: /schemas/types.yaml#/definitions/uint32-array ··· 197 195 pinmux = <STM32_PINMUX('A', 9, RSVD)>; 198 196 }; 199 197 200 - bias-disable: 201 - type: boolean 198 + bias-disable: true 202 199 203 - bias-pull-down: 204 - type: boolean 200 + bias-pull-down: true 205 201 206 - bias-pull-up: 207 - type: boolean 202 + bias-pull-up: true 208 203 209 - drive-push-pull: 210 - type: boolean 204 + drive-push-pull: true 211 205 212 - drive-open-drain: 213 - type: boolean 206 + drive-open-drain: true 214 207 215 - output-low: 216 - type: boolean 208 + output-low: true 217 209 218 - output-high: 219 - type: boolean 210 + output-high: true 220 211 221 212 slew-rate: 222 213 description: | ··· 217 222 1: Medium speed 218 223 2: Fast speed 219 224 3: High speed 220 - $ref: /schemas/types.yaml#/definitions/uint32 221 - enum: [0, 1, 2, 3] 225 + minimum: 0 226 + maximum: 3 227 + 228 + skew-delay-input-ps: 229 + description: | 230 + IO synchronization skew rate applied to the input path 231 + enum: [0, 300, 500, 750, 1000, 1250, 1500, 1750, 2000, 2250, 2500, 2750, 3000, 3250] 232 + 233 + skew-delay-output-ps: 234 + description: | 235 + IO synchronization latch delay applied to the output path 236 + enum: [0, 300, 500, 750, 1000, 1250, 1500, 1750, 2000, 2250, 2500, 2750, 3000, 3250] 237 + 238 + st,io-sync: 239 + $ref: /schemas/types.yaml#/definitions/string 240 + enum: 241 + - pass-through 242 + - clock inverted 243 + - data on rising edge 244 + - data on falling edge 245 + - data on both edges 246 + description: | 247 + IO synchronization through re-sampling or inversion 248 + "pass-through" - data or clock GPIO pass-through 249 + "clock inverted" - clock GPIO inverted 250 + "data on rising edge" - data GPIO re-sampled on clock rising edge 251 + "data on falling edge" - data GPIO re-sampled on clock falling edge 252 + "data on both edges" - data GPIO re-sampled on both clock edges 253 + default: pass-through 222 254 223 255 required: 224 256 - pinmux 225 257 258 + # Not allowed both skew-delay-input-ps and skew-delay-output-ps 259 + if: 260 + required: 261 + - skew-delay-input-ps 262 + then: 263 + properties: 264 + skew-delay-output-ps: false 265 + 226 266 allOf: 227 267 - $ref: pinctrl.yaml# 268 + 269 + - if: 270 + not: 271 + properties: 272 + compatible: 273 + contains: 274 + enum: 275 + - st,stm32mp257-pinctrl 276 + - st,stm32mp257-z-pinctrl 277 + then: 278 + patternProperties: 279 + '-[0-9]*$': 280 + patternProperties: 281 + '^pins': 282 + properties: 283 + skew-delay-input-ps: false 284 + skew-delay-output-ps: false 285 + st,io-sync: false 228 286 229 287 required: 230 288 - compatible ··· 358 310 pinctrl-0 = <&usart1_pins_a>; 359 311 pinctrl-names = "default"; 360 312 }; 313 + 314 + - | 315 + #include <dt-bindings/pinctrl/stm32-pinfunc.h> 316 + //Example 4 skew-delay and st,io-sync 317 + pinctrl: pinctrl@44240000 { 318 + compatible = "st,stm32mp257-pinctrl"; 319 + #address-cells = <1>; 320 + #size-cells = <1>; 321 + ranges = <0 0x44240000 0xa0400>; 322 + 323 + eth3_rgmii_pins_a: eth3-rgmii-0 { 324 + pins1 { 325 + pinmux = <STM32_PINMUX('A', 6, AF14)>; 326 + st,io-sync = "data on both edges"; 327 + }; 328 + pins2 { 329 + pinmux = <STM32_PINMUX('H', 2, AF14)>; 330 + skew-delay-output-ps = <500>; 331 + }; 332 + }; 333 + }; 361 334 362 335 ...
-1
Documentation/devicetree/bindings/pinctrl/toshiba,visconti-pinctrl.yaml
··· 42 42 function: 43 43 description: 44 44 Function to mux. 45 - $ref: /schemas/types.yaml#/definitions/string 46 45 enum: [i2c0, i2c1, i2c2, i2c3, i2c4, i2c5, i2c6, i2c7, i2c8, 47 46 spi0, spi1, spi2, spi3, spi4, spi5, spi6, 48 47 uart0, uart1, uart2, uart3, pwm, pcmif_out, pcmif_in]
+12 -1
Documentation/devicetree/bindings/soc/microchip/microchip,mpfs-mss-top-sysreg.yaml
··· 18 18 items: 19 19 - const: microchip,mpfs-mss-top-sysreg 20 20 - const: syscon 21 + - const: simple-mfd 21 22 22 23 reg: 23 24 maxItems: 1 25 + 26 + '#address-cells': 27 + const: 1 28 + 29 + '#size-cells': 30 + const: 1 24 31 25 32 '#reset-cells': 26 33 description: ··· 38 31 of PolarFire clock/reset IDs. 39 32 const: 1 40 33 34 + pinctrl@200: 35 + type: object 36 + $ref: /schemas/pinctrl/microchip,mpfs-pinctrl-iomux0.yaml 37 + 41 38 required: 42 39 - compatible 43 40 - reg ··· 51 40 examples: 52 41 - | 53 42 syscon@20002000 { 54 - compatible = "microchip,mpfs-mss-top-sysreg", "syscon"; 43 + compatible = "microchip,mpfs-mss-top-sysreg", "syscon", "simple-mfd"; 55 44 reg = <0x20002000 0x1000>; 56 45 #reset-cells = <1>; 57 46 };
+34 -30
MAINTAINERS
··· 195 195 F: include/linux/mfd/upboard-fpga.h 196 196 197 197 AB8500 BATTERY AND CHARGER DRIVERS 198 - M: Linus Walleij <linus.walleij@linaro.org> 198 + M: Linus Walleij <linusw@kernel.org> 199 199 F: Documentation/devicetree/bindings/power/supply/*ab8500* 200 200 F: drivers/power/supply/*ab8500* 201 201 ··· 2070 2070 F: drivers/gpu/drm/arm/hdlcd_* 2071 2071 2072 2072 ARM INTEGRATOR, VERSATILE AND REALVIEW SUPPORT 2073 - M: Linus Walleij <linus.walleij@linaro.org> 2073 + M: Linus Walleij <linusw@kernel.org> 2074 2074 L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) 2075 2075 S: Maintained 2076 2076 F: Documentation/devicetree/bindings/arm/arm,integrator.yaml ··· 2243 2243 F: drivers/memory/pl353-smc.c 2244 2244 2245 2245 ARM PRIMECELL SSP PL022 SPI DRIVER 2246 - M: Linus Walleij <linus.walleij@linaro.org> 2246 + M: Linus Walleij <linusw@kernel.org> 2247 2247 L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) 2248 2248 S: Maintained 2249 2249 F: Documentation/devicetree/bindings/spi/spi-pl022.yaml ··· 2256 2256 F: include/linux/amba/serial.h 2257 2257 2258 2258 ARM PRIMECELL VIC PL190/PL192 DRIVER 2259 - M: Linus Walleij <linus.walleij@linaro.org> 2259 + M: Linus Walleij <linusw@kernel.org> 2260 2260 L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) 2261 2261 S: Maintained 2262 2262 F: Documentation/devicetree/bindings/interrupt-controller/arm,vic.yaml ··· 2573 2573 S: Maintained 2574 2574 F: Documentation/devicetree/bindings/arm/bitmain.yaml 2575 2575 F: Documentation/devicetree/bindings/clock/bitmain,bm1880-clk.yaml 2576 - F: Documentation/devicetree/bindings/pinctrl/bitmain,bm1880-pinctrl.txt 2576 + F: Documentation/devicetree/bindings/pinctrl/bitmain,bm1880-pinctrl.yaml 2577 2577 F: arch/arm64/boot/dts/bitmain/ 2578 2578 F: drivers/clk/clk-bm1880.c 2579 2579 F: drivers/pinctrl/pinctrl-bm1880.c ··· 2685 2685 2686 2686 ARM/CORTINA SYSTEMS GEMINI ARM ARCHITECTURE 2687 2687 M: Hans Ulli Kroll <ulli.kroll@googlemail.com> 2688 - M: Linus Walleij <linus.walleij@linaro.org> 2688 + M: Linus Walleij <linusw@kernel.org> 2689 2689 L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) 2690 2690 S: Maintained 2691 2691 T: git https://github.com/ulli-kroll/linux.git ··· 3087 3087 F: include/dt-bindings/gpio/msc313-gpio.h 3088 3088 3089 3089 ARM/NOMADIK/Ux500 ARCHITECTURES 3090 - M: Linus Walleij <linus.walleij@linaro.org> 3090 + M: Linus Walleij <linusw@kernel.org> 3091 3091 L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) 3092 3092 S: Maintained 3093 3093 T: git git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik.git ··· 3793 3793 F: drivers/media/i2c/ak7375.c 3794 3794 3795 3795 ASAHI KASEI AK8974 DRIVER 3796 - M: Linus Walleij <linus.walleij@linaro.org> 3796 + M: Linus Walleij <linusw@kernel.org> 3797 3797 L: linux-iio@vger.kernel.org 3798 3798 S: Supported 3799 3799 W: http://www.akm.com/ ··· 6853 6853 F: drivers/pinctrl/pinctrl-cy8c95x0.c 6854 6854 6855 6855 CYPRESS CY8CTMA140 TOUCHSCREEN DRIVER 6856 - M: Linus Walleij <linus.walleij@linaro.org> 6856 + M: Linus Walleij <linusw@kernel.org> 6857 6857 L: linux-input@vger.kernel.org 6858 6858 S: Maintained 6859 6859 F: drivers/input/touchscreen/cy8ctma140.c ··· 6873 6873 F: drivers/media/common/cypress_firmware* 6874 6874 6875 6875 CYTTSP TOUCHSCREEN DRIVER 6876 - M: Linus Walleij <linus.walleij@linaro.org> 6876 + M: Linus Walleij <linusw@kernel.org> 6877 6877 L: linux-input@vger.kernel.org 6878 6878 S: Maintained 6879 6879 F: drivers/input/touchscreen/cyttsp* 6880 6880 6881 6881 D-LINK DIR-685 TOUCHKEYS DRIVER 6882 - M: Linus Walleij <linus.walleij@linaro.org> 6882 + M: Linus Walleij <linusw@kernel.org> 6883 6883 L: linux-input@vger.kernel.org 6884 6884 S: Supported 6885 6885 F: drivers/input/keyboard/dlink-dir685-touchkeys.c ··· 7742 7742 F: drivers/gpu/drm/tiny/appletbdrm.c 7743 7743 7744 7744 DRM DRIVER FOR ARM PL111 CLCD 7745 - M: Linus Walleij <linus.walleij@linaro.org> 7745 + M: Linus Walleij <linusw@kernel.org> 7746 7746 S: Maintained 7747 7747 T: git https://gitlab.freedesktop.org/drm/misc/kernel.git 7748 7748 F: drivers/gpu/drm/pl111/ 7749 7749 7750 7750 DRM DRIVER FOR ARM VERSATILE TFT PANELS 7751 - M: Linus Walleij <linus.walleij@linaro.org> 7751 + M: Linus Walleij <linusw@kernel.org> 7752 7752 S: Maintained 7753 7753 T: git https://gitlab.freedesktop.org/drm/misc/kernel.git 7754 7754 F: Documentation/devicetree/bindings/display/panel/arm,versatile-tft-panel.yaml ··· 7798 7798 F: drivers/gpu/drm/panel/panel-ebbg-ft8719.c 7799 7799 7800 7800 DRM DRIVER FOR FARADAY TVE200 TV ENCODER 7801 - M: Linus Walleij <linus.walleij@linaro.org> 7801 + M: Linus Walleij <linusw@kernel.org> 7802 7802 S: Maintained 7803 7803 T: git https://gitlab.freedesktop.org/drm/misc/kernel.git 7804 7804 F: drivers/gpu/drm/tve200/ ··· 7994 7994 F: include/uapi/drm/msm_drm.h 7995 7995 7996 7996 DRM DRIVER FOR NOVATEK NT35510 PANELS 7997 - M: Linus Walleij <linus.walleij@linaro.org> 7997 + M: Linus Walleij <linusw@kernel.org> 7998 7998 S: Maintained 7999 7999 T: git https://gitlab.freedesktop.org/drm/misc/kernel.git 8000 8000 F: Documentation/devicetree/bindings/display/panel/novatek,nt35510.yaml 8001 8001 F: drivers/gpu/drm/panel/panel-novatek-nt35510.c 8002 8002 8003 8003 DRM DRIVER FOR NOVATEK NT35560 PANELS 8004 - M: Linus Walleij <linus.walleij@linaro.org> 8004 + M: Linus Walleij <linusw@kernel.org> 8005 8005 S: Maintained 8006 8006 T: git https://gitlab.freedesktop.org/drm/misc/kernel.git 8007 8007 F: Documentation/devicetree/bindings/display/panel/sony,acx424akp.yaml ··· 8119 8119 F: drivers/gpu/drm/panel/panel-raydium-rm67191.c 8120 8120 8121 8121 DRM DRIVER FOR SAMSUNG DB7430 PANELS 8122 - M: Linus Walleij <linus.walleij@linaro.org> 8122 + M: Linus Walleij <linusw@kernel.org> 8123 8123 S: Maintained 8124 8124 T: git https://gitlab.freedesktop.org/drm/misc/kernel.git 8125 8125 F: Documentation/devicetree/bindings/display/panel/samsung,lms397kf04.yaml ··· 8216 8216 F: drivers/gpu/drm/solomon/ssd130x* 8217 8217 8218 8218 DRM DRIVER FOR ST-ERICSSON MCDE 8219 - M: Linus Walleij <linus.walleij@linaro.org> 8219 + M: Linus Walleij <linusw@kernel.org> 8220 8220 S: Maintained 8221 8221 T: git https://gitlab.freedesktop.org/drm/misc/kernel.git 8222 8222 F: Documentation/devicetree/bindings/display/ste,mcde.yaml ··· 8248 8248 F: drivers/gpu/drm/bridge/ti-sn65dsi86.c 8249 8249 8250 8250 DRM DRIVER FOR TPO TPG110 PANELS 8251 - M: Linus Walleij <linus.walleij@linaro.org> 8251 + M: Linus Walleij <linusw@kernel.org> 8252 8252 S: Maintained 8253 8253 T: git https://gitlab.freedesktop.org/drm/misc/kernel.git 8254 8254 F: Documentation/devicetree/bindings/display/panel/tpo,tpg110.yaml ··· 8292 8292 F: include/uapi/drm/vmwgfx_drm.h 8293 8293 8294 8294 DRM DRIVER FOR WIDECHIPS WS2401 PANELS 8295 - M: Linus Walleij <linus.walleij@linaro.org> 8295 + M: Linus Walleij <linusw@kernel.org> 8296 8296 S: Maintained 8297 8297 T: git https://gitlab.freedesktop.org/drm/misc/kernel.git 8298 8298 F: Documentation/devicetree/bindings/display/panel/samsung,lms380kf01.yaml ··· 9590 9590 F: include/uapi/linux/fanotify.h 9591 9591 9592 9592 FARADAY FOTG210 USB2 DUAL-ROLE CONTROLLER 9593 - M: Linus Walleij <linus.walleij@linaro.org> 9593 + M: Linus Walleij <linusw@kernel.org> 9594 9594 L: linux-usb@vger.kernel.org 9595 9595 S: Maintained 9596 9596 F: drivers/usb/fotg210/ ··· 10780 10780 F: tools/gpio/gpio-sloppy-logic-analyzer.sh 10781 10781 10782 10782 GPIO SUBSYSTEM 10783 - M: Linus Walleij <linus.walleij@linaro.org> 10783 + M: Linus Walleij <linusw@kernel.org> 10784 10784 M: Bartosz Golaszewski <brgl@kernel.org> 10785 10785 L: linux-gpio@vger.kernel.org 10786 10786 S: Maintained ··· 13182 13182 F: drivers/iio/imu/inv_icm45600/ 13183 13183 13184 13184 INVENSENSE MPU-3050 GYROSCOPE DRIVER 13185 - M: Linus Walleij <linus.walleij@linaro.org> 13185 + M: Linus Walleij <linusw@kernel.org> 13186 13186 L: linux-iio@vger.kernel.org 13187 13187 S: Maintained 13188 13188 F: Documentation/devicetree/bindings/iio/gyroscope/invensense,mpu3050.yaml ··· 14112 14112 F: include/linux/ks0108.h 14113 14113 14114 14114 KTD253 BACKLIGHT DRIVER 14115 - M: Linus Walleij <linus.walleij@linaro.org> 14115 + M: Linus Walleij <linusw@kernel.org> 14116 14116 S: Maintained 14117 14117 F: Documentation/devicetree/bindings/leds/backlight/kinetic,ktd253.yaml 14118 14118 F: drivers/video/backlight/ktd253-backlight.c ··· 14324 14324 F: include/linux/pata_arasan_cf_data.h 14325 14325 14326 14326 LIBATA PATA FARADAY FTIDE010 AND GEMINI SATA BRIDGE DRIVERS 14327 - M: Linus Walleij <linus.walleij@linaro.org> 14327 + M: Linus Walleij <linusw@kernel.org> 14328 14328 L: linux-ide@vger.kernel.org 14329 14329 S: Maintained 14330 14330 F: drivers/ata/pata_ftide010.c ··· 19946 19946 F: drivers/pci/controller/dwc/*imx6* 19947 19947 19948 19948 PCI DRIVER FOR INTEL IXP4XX 19949 - M: Linus Walleij <linus.walleij@linaro.org> 19949 + M: Linus Walleij <linusw@kernel.org> 19950 19950 S: Maintained 19951 19951 F: Documentation/devicetree/bindings/pci/intel,ixp4xx-pci.yaml 19952 19952 F: drivers/pci/controller/pci-ixp4xx.c ··· 20057 20057 F: drivers/pci/controller/dwc/pci-dra7xx.c 20058 20058 20059 20059 PCI DRIVER FOR V3 SEMICONDUCTOR V360EPC 20060 - M: Linus Walleij <linus.walleij@linaro.org> 20060 + M: Linus Walleij <linusw@kernel.org> 20061 20061 L: linux-pci@vger.kernel.org 20062 20062 S: Maintained 20063 20063 F: Documentation/devicetree/bindings/pci/v3,v360epc-pci.yaml ··· 20513 20513 K: \b(clone_args|kernel_clone_args)\b 20514 20514 20515 20515 PIN CONTROL SUBSYSTEM 20516 - M: Linus Walleij <linus.walleij@linaro.org> 20516 + M: Linus Walleij <linusw@kernel.org> 20517 20517 L: linux-gpio@vger.kernel.org 20518 20518 S: Maintained 20519 20519 T: git git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git ··· 21940 21940 F: drivers/watchdog/realtek_otto_wdt.c 21941 21941 21942 21942 REALTEK RTL83xx SMI DSA ROUTER CHIPS 21943 - M: Linus Walleij <linus.walleij@linaro.org> 21943 + M: Linus Walleij <linusw@kernel.org> 21944 21944 M: Alvin Šipraga <alsi@bang-olufsen.dk> 21945 21945 S: Maintained 21946 21946 F: Documentation/devicetree/bindings/net/dsa/realtek.yaml ··· 22434 22434 F: Documentation/devicetree/bindings/i2c/microchip,corei2c.yaml 22435 22435 F: Documentation/devicetree/bindings/mailbox/microchip,mpfs-mailbox.yaml 22436 22436 F: Documentation/devicetree/bindings/net/can/microchip,mpfs-can.yaml 22437 + F: Documentation/devicetree/bindings/pinctrl/microchip,mpfs-pinctrl-iomux0.yaml 22438 + F: Documentation/devicetree/bindings/pinctrl/microchip,pic64gx-pinctrl-gpio2.yaml 22437 22439 F: Documentation/devicetree/bindings/pwm/microchip,corepwm.yaml 22438 22440 F: Documentation/devicetree/bindings/riscv/microchip.yaml 22439 22441 F: Documentation/devicetree/bindings/soc/microchip/microchip,mpfs-sys-controller.yaml ··· 22449 22447 F: drivers/i2c/busses/i2c-microchip-corei2c.c 22450 22448 F: drivers/mailbox/mailbox-mpfs.c 22451 22449 F: drivers/pci/controller/plda/pcie-microchip-host.c 22450 + F: drivers/pinctrl/pinctrl-mpfs-iomux0.c 22451 + F: drivers/pinctrl/pinctrl-pic64gx-gpio2.c 22452 22452 F: drivers/pwm/pwm-microchip-core.c 22453 22453 F: drivers/reset/reset-mpfs.c 22454 22454 F: drivers/rtc/rtc-mpfs.c ··· 23765 23761 F: net/smc/ 23766 23762 23767 23763 SHARP GP2AP002A00F/GP2AP002S00F SENSOR DRIVER 23768 - M: Linus Walleij <linus.walleij@linaro.org> 23764 + M: Linus Walleij <linusw@kernel.org> 23769 23765 L: linux-iio@vger.kernel.org 23770 23766 S: Maintained 23771 23767 T: git git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git
+19
drivers/pinctrl/Kconfig
··· 486 486 def_bool y if PIC32MZDA 487 487 select PINCTRL_PIC32 488 488 489 + config PINCTRL_PIC64GX 490 + bool "pic64gx gpio2 pinctrl driver" 491 + depends on ARCH_MICROCHIP || COMPILE_TEST 492 + depends on OF 493 + select GENERIC_PINCONF 494 + default y 495 + help 496 + This selects the pinctrl driver for gpio2 on pic64gx. 497 + 489 498 config PINCTRL_PISTACHIO 490 499 bool "IMG Pistachio SoC pinctrl driver" 491 500 depends on OF && (MIPS || COMPILE_TEST) ··· 505 496 select OF_GPIO 506 497 help 507 498 This support pinctrl and GPIO driver for IMG Pistachio SoC. 499 + 500 + config PINCTRL_POLARFIRE_SOC 501 + bool "Polarfire SoC pinctrl driver" 502 + depends on ARCH_MICROCHIP || COMPILE_TEST 503 + depends on OF 504 + select GENERIC_PINCONF 505 + default y 506 + help 507 + This selects the pinctrl driver for Microchip Polarfire SoC. 508 508 509 509 config PINCTRL_RK805 510 510 tristate "Pinctrl and GPIO driver for RK805 PMIC" ··· 704 686 source "drivers/pinctrl/bcm/Kconfig" 705 687 source "drivers/pinctrl/berlin/Kconfig" 706 688 source "drivers/pinctrl/cirrus/Kconfig" 689 + source "drivers/pinctrl/cix/Kconfig" 707 690 source "drivers/pinctrl/freescale/Kconfig" 708 691 source "drivers/pinctrl/intel/Kconfig" 709 692 source "drivers/pinctrl/mediatek/Kconfig"
+3
drivers/pinctrl/Makefile
··· 48 48 obj-$(CONFIG_PINCTRL_PALMAS) += pinctrl-palmas.o 49 49 obj-$(CONFIG_PINCTRL_PEF2256) += pinctrl-pef2256.o 50 50 obj-$(CONFIG_PINCTRL_PIC32) += pinctrl-pic32.o 51 + obj-$(CONFIG_PINCTRL_PIC64GX) += pinctrl-pic64gx-gpio2.o 51 52 obj-$(CONFIG_PINCTRL_PISTACHIO) += pinctrl-pistachio.o 53 + obj-$(CONFIG_PINCTRL_POLARFIRE_SOC) += pinctrl-mpfs-iomux0.o 52 54 obj-$(CONFIG_PINCTRL_RK805) += pinctrl-rk805.o 53 55 obj-$(CONFIG_PINCTRL_ROCKCHIP) += pinctrl-rockchip.o 54 56 obj-$(CONFIG_PINCTRL_RP1) += pinctrl-rp1.o ··· 71 69 obj-y += bcm/ 72 70 obj-$(CONFIG_PINCTRL_BERLIN) += berlin/ 73 71 obj-y += cirrus/ 72 + obj-y += cix/ 74 73 obj-y += freescale/ 75 74 obj-$(CONFIG_X86) += intel/ 76 75 obj-y += mediatek/
+15
drivers/pinctrl/cix/Kconfig
··· 1 + # SPDX-License-Identifier: GPL-2.0-only 2 + config PINCTRL_SKY1_BASE 3 + tristate 4 + select GENERIC_PINCTRL_GROUPS 5 + select GENERIC_PINMUX_FUNCTIONS 6 + select GENERIC_PINCONF 7 + select REGMAP 8 + 9 + config PINCTRL_SKY1 10 + tristate "Cix Sky1 pinctrl driver" 11 + depends on ARCH_CIX || COMPILE_TEST 12 + depends on HAS_IOMEM 13 + select PINCTRL_SKY1_BASE 14 + help 15 + Say Y here to enable the sky1 pinctrl driver
+4
drivers/pinctrl/cix/Makefile
··· 1 + # SPDX-License-Identifier: GPL-2.0 2 + # Cix Sky1 pin control drivers 3 + obj-$(CONFIG_PINCTRL_SKY1_BASE) += pinctrl-sky1-base.o 4 + obj-$(CONFIG_PINCTRL_SKY1) += pinctrl-sky1.o
+587
drivers/pinctrl/cix/pinctrl-sky1-base.c
··· 1 + // SPDX-License-Identifier: GPL-2.0+ 2 + // 3 + // Author: Jerry Zhu <Jerry.Zhu@cixtech.com> 4 + // Author: Gary Yang <gary.yang@cixtech.com> 5 + 6 + #include <linux/device.h> 7 + #include <linux/err.h> 8 + #include <linux/init.h> 9 + #include <linux/io.h> 10 + #include <linux/module.h> 11 + #include <linux/of.h> 12 + #include <linux/of_device.h> 13 + #include <linux/of_address.h> 14 + #include <linux/pinctrl/pinconf.h> 15 + #include <linux/pinctrl/pinconf-generic.h> 16 + #include <linux/pinctrl/pinctrl.h> 17 + #include <linux/pinctrl/pinmux.h> 18 + #include <linux/platform_device.h> 19 + #include <linux/seq_file.h> 20 + #include <linux/slab.h> 21 + 22 + #include "../core.h" 23 + #include "../pinconf.h" 24 + #include "../pinctrl-utils.h" 25 + #include "../pinmux.h" 26 + #include "pinctrl-sky1.h" 27 + 28 + #define SKY1_PIN_SIZE (4) 29 + #define SKY1_MUX_MASK GENMASK(8, 7) 30 + #define SKY1_MUX_SHIFT (7) 31 + #define SKY1_PULLCONF_MASK GENMASK(6, 5) 32 + #define SKY1_PULLUP_BIT (6) 33 + #define SKY1_PULLDN_BIT (5) 34 + #define SKY1_DS_MASK GENMASK(3, 0) 35 + 36 + #define CIX_PIN_NO_SHIFT (8) 37 + #define CIX_PIN_FUN_MASK GENMASK(1, 0) 38 + #define CIX_GET_PIN_NO(x) ((x) >> CIX_PIN_NO_SHIFT) 39 + #define CIX_GET_PIN_FUNC(x) ((x) & CIX_PIN_FUN_MASK) 40 + #define SKY1_DEFAULT_DS_VAL (4) 41 + 42 + static const char * const sky1_gpio_functions[] = { 43 + "func0", "func1", "func2", "func3", 44 + }; 45 + 46 + static unsigned char sky1_ds_table[] = { 47 + 2, 3, 5, 6, 8, 9, 11, 12, 13, 14, 17, 18, 20, 21, 23, 24, 48 + }; 49 + 50 + static bool sky1_pctrl_is_function_valid(struct sky1_pinctrl *spctl, 51 + u32 pin_num, u32 fnum) 52 + { 53 + int i; 54 + 55 + for (i = 0; i < spctl->info->npins; i++) { 56 + const struct sky1_pin_desc *pin = spctl->info->pins + i; 57 + 58 + if (pin->pin.number == pin_num) { 59 + if (fnum < pin->nfunc) 60 + return true; 61 + 62 + break; 63 + } 64 + } 65 + 66 + return false; 67 + } 68 + 69 + static int sky1_pctrl_dt_node_to_map_func(struct sky1_pinctrl *spctl, 70 + u32 pin, u32 fnum, struct sky1_pinctrl_group *grp, 71 + struct pinctrl_map **map, unsigned int *reserved_maps, 72 + unsigned int *num_maps) 73 + { 74 + bool ret; 75 + 76 + if (*num_maps == *reserved_maps) 77 + return -ENOSPC; 78 + 79 + (*map)[*num_maps].type = PIN_MAP_TYPE_MUX_GROUP; 80 + (*map)[*num_maps].data.mux.group = grp->name; 81 + 82 + ret = sky1_pctrl_is_function_valid(spctl, pin, fnum); 83 + if (!ret) { 84 + dev_err(spctl->dev, "invalid function %d on pin %d .\n", 85 + fnum, pin); 86 + return -EINVAL; 87 + } 88 + 89 + (*map)[*num_maps].data.mux.function = sky1_gpio_functions[fnum]; 90 + (*num_maps)++; 91 + 92 + return 0; 93 + } 94 + 95 + static struct sky1_pinctrl_group * 96 + sky1_pctrl_find_group_by_pin(struct sky1_pinctrl *spctl, u32 pin) 97 + { 98 + int i; 99 + 100 + for (i = 0; i < spctl->info->npins; i++) { 101 + struct sky1_pinctrl_group *grp = 102 + (struct sky1_pinctrl_group *)spctl->groups + i; 103 + 104 + if (grp->pin == pin) 105 + return grp; 106 + } 107 + 108 + return NULL; 109 + } 110 + 111 + static int sky1_pctrl_dt_subnode_to_map(struct pinctrl_dev *pctldev, 112 + struct device_node *node, 113 + struct pinctrl_map **map, 114 + unsigned int *reserved_maps, 115 + unsigned int *num_maps) 116 + { 117 + struct property *pins; 118 + u32 pinfunc, pin, func; 119 + int num_pins, num_funcs, maps_per_pin; 120 + unsigned long *configs; 121 + unsigned int num_configs; 122 + bool has_config = false; 123 + int i, err; 124 + unsigned int reserve = 0; 125 + struct sky1_pinctrl_group *grp; 126 + struct sky1_pinctrl *spctl = pinctrl_dev_get_drvdata(pctldev); 127 + 128 + pins = of_find_property(node, "pinmux", NULL); 129 + if (!pins) { 130 + dev_err(spctl->dev, "missing pins property in node %pOFn .\n", 131 + node); 132 + return -EINVAL; 133 + } 134 + 135 + err = pinconf_generic_parse_dt_config(node, pctldev, &configs, 136 + &num_configs); 137 + if (err) 138 + return err; 139 + 140 + if (num_configs) 141 + has_config = true; 142 + 143 + num_pins = pins->length / sizeof(u32); 144 + num_funcs = num_pins; 145 + maps_per_pin = 0; 146 + if (num_funcs) 147 + maps_per_pin++; 148 + if (has_config && num_pins >= 1) 149 + maps_per_pin++; 150 + 151 + if (!num_pins || !maps_per_pin) { 152 + err = -EINVAL; 153 + goto exit; 154 + } 155 + 156 + reserve = num_pins * maps_per_pin; 157 + 158 + err = pinctrl_utils_reserve_map(pctldev, map, 159 + reserved_maps, num_maps, reserve); 160 + if (err < 0) 161 + goto exit; 162 + 163 + for (i = 0; i < num_pins; i++) { 164 + err = of_property_read_u32_index(node, "pinmux", 165 + i, &pinfunc); 166 + if (err) 167 + goto exit; 168 + 169 + pin = CIX_GET_PIN_NO(pinfunc); 170 + func = CIX_GET_PIN_FUNC(pinfunc); 171 + pctldev->num_functions = ARRAY_SIZE(sky1_gpio_functions); 172 + 173 + if (pin >= pctldev->desc->npins || 174 + func >= pctldev->num_functions) { 175 + dev_err(spctl->dev, "invalid pins value.\n"); 176 + err = -EINVAL; 177 + goto exit; 178 + } 179 + 180 + grp = sky1_pctrl_find_group_by_pin(spctl, pin); 181 + if (!grp) { 182 + dev_err(spctl->dev, "unable to match pin %d to group\n", 183 + pin); 184 + err = -EINVAL; 185 + goto exit; 186 + } 187 + 188 + err = sky1_pctrl_dt_node_to_map_func(spctl, pin, func, grp, 189 + map, reserved_maps, num_maps); 190 + if (err < 0) 191 + goto exit; 192 + 193 + if (has_config) { 194 + err = pinctrl_utils_add_map_configs(pctldev, map, 195 + reserved_maps, num_maps, grp->name, 196 + configs, num_configs, 197 + PIN_MAP_TYPE_CONFIGS_GROUP); 198 + if (err < 0) 199 + goto exit; 200 + } 201 + } 202 + 203 + err = 0; 204 + 205 + exit: 206 + kfree(configs); 207 + return err; 208 + } 209 + 210 + static int sky1_pctrl_dt_node_to_map(struct pinctrl_dev *pctldev, 211 + struct device_node *np_config, 212 + struct pinctrl_map **map, unsigned int *num_maps) 213 + { 214 + unsigned int reserved_maps; 215 + int ret; 216 + 217 + *map = NULL; 218 + *num_maps = 0; 219 + reserved_maps = 0; 220 + 221 + for_each_child_of_node_scoped(np_config, np) { 222 + ret = sky1_pctrl_dt_subnode_to_map(pctldev, np, map, 223 + &reserved_maps, num_maps); 224 + if (ret < 0) { 225 + pinctrl_utils_free_map(pctldev, *map, *num_maps); 226 + return ret; 227 + } 228 + } 229 + 230 + return 0; 231 + } 232 + 233 + static void sky1_dt_free_map(struct pinctrl_dev *pctldev, 234 + struct pinctrl_map *map, 235 + unsigned int num_maps) 236 + { 237 + kfree(map); 238 + } 239 + 240 + static int sky1_pctrl_get_groups_count(struct pinctrl_dev *pctldev) 241 + { 242 + struct sky1_pinctrl *spctl = pinctrl_dev_get_drvdata(pctldev); 243 + 244 + return spctl->info->npins; 245 + } 246 + 247 + static const char *sky1_pctrl_get_group_name(struct pinctrl_dev *pctldev, 248 + unsigned int group) 249 + { 250 + struct sky1_pinctrl *spctl = pinctrl_dev_get_drvdata(pctldev); 251 + 252 + return spctl->groups[group].name; 253 + } 254 + 255 + static int sky1_pctrl_get_group_pins(struct pinctrl_dev *pctldev, 256 + unsigned int group, 257 + const unsigned int **pins, 258 + unsigned int *num_pins) 259 + { 260 + struct sky1_pinctrl *spctl = pinctrl_dev_get_drvdata(pctldev); 261 + 262 + *pins = (unsigned int *)&spctl->groups[group].pin; 263 + *num_pins = 1; 264 + 265 + return 0; 266 + } 267 + 268 + static void sky1_pin_dbg_show(struct pinctrl_dev *pctldev, struct seq_file *s, 269 + unsigned int offset) 270 + { 271 + seq_printf(s, "%s", dev_name(pctldev->dev)); 272 + } 273 + 274 + static const struct pinctrl_ops sky1_pctrl_ops = { 275 + .dt_node_to_map = sky1_pctrl_dt_node_to_map, 276 + .dt_free_map = sky1_dt_free_map, 277 + .get_groups_count = sky1_pctrl_get_groups_count, 278 + .get_group_name = sky1_pctrl_get_group_name, 279 + .get_group_pins = sky1_pctrl_get_group_pins, 280 + .pin_dbg_show = sky1_pin_dbg_show, 281 + }; 282 + 283 + static int sky1_pmx_set_one_pin(struct sky1_pinctrl *spctl, 284 + unsigned int pin, unsigned char muxval) 285 + { 286 + u32 reg_val; 287 + void __iomem *pin_reg; 288 + 289 + pin_reg = spctl->base + pin * SKY1_PIN_SIZE; 290 + reg_val = readl(pin_reg); 291 + reg_val &= ~SKY1_MUX_MASK; 292 + reg_val |= muxval << SKY1_MUX_SHIFT; 293 + writel(reg_val, pin_reg); 294 + 295 + dev_dbg(spctl->dev, "write: offset 0x%x val 0x%x\n", 296 + pin * SKY1_PIN_SIZE, reg_val); 297 + return 0; 298 + } 299 + 300 + static int sky1_pmx_set_mux(struct pinctrl_dev *pctldev, 301 + unsigned int function, 302 + unsigned int group) 303 + { 304 + bool ret; 305 + struct sky1_pinctrl *spctl = pinctrl_dev_get_drvdata(pctldev); 306 + struct sky1_pinctrl_group *g = 307 + (struct sky1_pinctrl_group *)spctl->groups + group; 308 + 309 + ret = sky1_pctrl_is_function_valid(spctl, g->pin, function); 310 + if (!ret) { 311 + dev_err(spctl->dev, "invalid function %d on group %d .\n", 312 + function, group); 313 + return -EINVAL; 314 + } 315 + 316 + sky1_pmx_set_one_pin(spctl, g->pin, function); 317 + return 0; 318 + } 319 + 320 + static int sky1_pmx_get_funcs_cnt(struct pinctrl_dev *pctldev) 321 + { 322 + return ARRAY_SIZE(sky1_gpio_functions); 323 + } 324 + 325 + static const char *sky1_pmx_get_func_name(struct pinctrl_dev *pctldev, 326 + unsigned int selector) 327 + { 328 + return sky1_gpio_functions[selector]; 329 + } 330 + 331 + static int sky1_pmx_get_func_groups(struct pinctrl_dev *pctldev, 332 + unsigned int function, 333 + const char * const **groups, 334 + unsigned int * const num_groups) 335 + { 336 + struct sky1_pinctrl *spctl = pinctrl_dev_get_drvdata(pctldev); 337 + const struct sky1_pinctrl_soc_info *info = spctl->info; 338 + 339 + *groups = spctl->grp_names; 340 + *num_groups = info->npins; 341 + 342 + return 0; 343 + } 344 + 345 + static const struct pinmux_ops sky1_pmx_ops = { 346 + .get_functions_count = sky1_pmx_get_funcs_cnt, 347 + .get_function_groups = sky1_pmx_get_func_groups, 348 + .get_function_name = sky1_pmx_get_func_name, 349 + .set_mux = sky1_pmx_set_mux, 350 + }; 351 + 352 + static int sky1_pconf_set_pull_select(struct sky1_pinctrl *spctl, 353 + unsigned int pin, bool enable, bool isup) 354 + { 355 + u32 reg_val, reg_pullsel = 0; 356 + void __iomem *pin_reg; 357 + 358 + pin_reg = spctl->base + pin * SKY1_PIN_SIZE; 359 + reg_val = readl(pin_reg); 360 + reg_val &= ~SKY1_PULLCONF_MASK; 361 + 362 + if (!enable) 363 + goto update; 364 + 365 + if (isup) 366 + reg_pullsel = BIT(SKY1_PULLUP_BIT); 367 + else 368 + reg_pullsel = BIT(SKY1_PULLDN_BIT); 369 + 370 + update: 371 + reg_val |= reg_pullsel; 372 + writel(reg_val, pin_reg); 373 + 374 + dev_dbg(spctl->dev, "write: offset 0x%x val 0x%x\n", 375 + pin * SKY1_PIN_SIZE, reg_val); 376 + return 0; 377 + } 378 + 379 + static int sky1_ds_to_index(unsigned char driving) 380 + { 381 + int i; 382 + 383 + for (i = 0; i < sizeof(sky1_ds_table); i++) 384 + if (driving == sky1_ds_table[i]) 385 + return i; 386 + return SKY1_DEFAULT_DS_VAL; 387 + } 388 + 389 + static int sky1_pconf_set_driving(struct sky1_pinctrl *spctl, 390 + unsigned int pin, unsigned char driving) 391 + { 392 + unsigned int reg_val, val; 393 + void __iomem *pin_reg; 394 + 395 + if (pin >= spctl->info->npins) 396 + return -EINVAL; 397 + 398 + pin_reg = spctl->base + pin * SKY1_PIN_SIZE; 399 + reg_val = readl(pin_reg); 400 + reg_val &= ~SKY1_DS_MASK; 401 + val = sky1_ds_to_index(driving); 402 + reg_val |= (val & SKY1_DS_MASK); 403 + writel(reg_val, pin_reg); 404 + 405 + dev_dbg(spctl->dev, "write: offset 0x%x val 0x%x\n", 406 + pin * SKY1_PIN_SIZE, reg_val); 407 + 408 + return 0; 409 + } 410 + 411 + static int sky1_pconf_parse_conf(struct pinctrl_dev *pctldev, 412 + unsigned int pin, enum pin_config_param param, 413 + enum pin_config_param arg) 414 + { 415 + int ret = 0; 416 + struct sky1_pinctrl *spctl = pinctrl_dev_get_drvdata(pctldev); 417 + 418 + switch (param) { 419 + case PIN_CONFIG_BIAS_DISABLE: 420 + ret = sky1_pconf_set_pull_select(spctl, pin, false, false); 421 + break; 422 + case PIN_CONFIG_BIAS_PULL_UP: 423 + ret = sky1_pconf_set_pull_select(spctl, pin, true, true); 424 + break; 425 + case PIN_CONFIG_BIAS_PULL_DOWN: 426 + ret = sky1_pconf_set_pull_select(spctl, pin, true, false); 427 + break; 428 + case PIN_CONFIG_DRIVE_STRENGTH: 429 + ret = sky1_pconf_set_driving(spctl, pin, arg); 430 + break; 431 + default: 432 + ret = -EINVAL; 433 + } 434 + 435 + return ret; 436 + } 437 + 438 + static int sky1_pconf_group_get(struct pinctrl_dev *pctldev, 439 + unsigned int group, 440 + unsigned long *config) 441 + { 442 + struct sky1_pinctrl *spctl = pinctrl_dev_get_drvdata(pctldev); 443 + struct sky1_pinctrl_group *g = &spctl->groups[group]; 444 + 445 + *config = g->config; 446 + 447 + return 0; 448 + } 449 + 450 + static int sky1_pconf_group_set(struct pinctrl_dev *pctldev, unsigned int group, 451 + unsigned long *configs, unsigned int num_configs) 452 + { 453 + struct sky1_pinctrl *spctl = pinctrl_dev_get_drvdata(pctldev); 454 + struct sky1_pinctrl_group *g = &spctl->groups[group]; 455 + int i, ret; 456 + 457 + for (i = 0; i < num_configs; i++) { 458 + ret = sky1_pconf_parse_conf(pctldev, g->pin, 459 + pinconf_to_config_param(configs[i]), 460 + pinconf_to_config_argument(configs[i])); 461 + if (ret < 0) 462 + return ret; 463 + 464 + g->config = configs[i]; 465 + } 466 + 467 + return 0; 468 + } 469 + 470 + static const struct pinconf_ops sky1_pinconf_ops = { 471 + .pin_config_group_get = sky1_pconf_group_get, 472 + .pin_config_group_set = sky1_pconf_group_set, 473 + }; 474 + 475 + static int sky1_pctrl_build_state(struct platform_device *pdev) 476 + { 477 + struct sky1_pinctrl *spctl = platform_get_drvdata(pdev); 478 + const struct sky1_pinctrl_soc_info *info = spctl->info; 479 + int i; 480 + 481 + /* Allocate groups */ 482 + spctl->groups = devm_kcalloc(&pdev->dev, info->npins, 483 + sizeof(*spctl->groups), GFP_KERNEL); 484 + if (!spctl->groups) 485 + return -ENOMEM; 486 + 487 + /* We assume that one pin is one group, use pin name as group name. */ 488 + spctl->grp_names = devm_kcalloc(&pdev->dev, info->npins, 489 + sizeof(*spctl->grp_names), GFP_KERNEL); 490 + if (!spctl->grp_names) 491 + return -ENOMEM; 492 + 493 + for (i = 0; i < info->npins; i++) { 494 + const struct sky1_pin_desc *pin = spctl->info->pins + i; 495 + struct sky1_pinctrl_group *group = 496 + (struct sky1_pinctrl_group *)spctl->groups + i; 497 + 498 + group->name = pin->pin.name; 499 + group->pin = pin->pin.number; 500 + spctl->grp_names[i] = pin->pin.name; 501 + } 502 + 503 + return 0; 504 + } 505 + 506 + int sky1_base_pinctrl_probe(struct platform_device *pdev, 507 + const struct sky1_pinctrl_soc_info *info) 508 + { 509 + struct pinctrl_desc *sky1_pinctrl_desc; 510 + struct sky1_pinctrl *spctl; 511 + struct pinctrl_pin_desc *pins; 512 + int ret, i; 513 + 514 + if (!info || !info->pins || !info->npins) { 515 + dev_err(&pdev->dev, "wrong pinctrl info\n"); 516 + return -EINVAL; 517 + } 518 + 519 + /* Create state holders etc for this driver */ 520 + spctl = devm_kzalloc(&pdev->dev, sizeof(*spctl), GFP_KERNEL); 521 + if (!spctl) 522 + return -ENOMEM; 523 + 524 + spctl->info = info; 525 + platform_set_drvdata(pdev, spctl); 526 + 527 + spctl->base = devm_platform_ioremap_resource(pdev, 0); 528 + if (IS_ERR(spctl->base)) 529 + return PTR_ERR(spctl->base); 530 + 531 + sky1_pinctrl_desc = devm_kzalloc(&pdev->dev, sizeof(*sky1_pinctrl_desc), 532 + GFP_KERNEL); 533 + if (!sky1_pinctrl_desc) 534 + return -ENOMEM; 535 + 536 + pins = devm_kcalloc(&pdev->dev, info->npins, sizeof(*pins), 537 + GFP_KERNEL); 538 + if (!pins) 539 + return -ENOMEM; 540 + for (i = 0; i < info->npins; i++) 541 + pins[i] = info->pins[i].pin; 542 + 543 + ret = sky1_pctrl_build_state(pdev); 544 + if (ret) 545 + return ret; 546 + 547 + sky1_pinctrl_desc->name = dev_name(&pdev->dev); 548 + sky1_pinctrl_desc->pins = pins; 549 + sky1_pinctrl_desc->npins = info->npins; 550 + sky1_pinctrl_desc->pctlops = &sky1_pctrl_ops; 551 + sky1_pinctrl_desc->pmxops = &sky1_pmx_ops; 552 + sky1_pinctrl_desc->confops = &sky1_pinconf_ops; 553 + sky1_pinctrl_desc->owner = THIS_MODULE; 554 + spctl->dev = &pdev->dev; 555 + ret = devm_pinctrl_register_and_init(&pdev->dev, 556 + sky1_pinctrl_desc, spctl, 557 + &spctl->pctl); 558 + if (ret) { 559 + dev_err(&pdev->dev, "could not register SKY1 pinctrl driver\n"); 560 + return ret; 561 + } 562 + 563 + /* 564 + * The SKY1 SoC has two pin controllers: one for normal working state 565 + * and one for sleep state. Since one controller only has working 566 + * states and the other only sleep states, it will seem to the 567 + * controller is always in the first configured state, so no 568 + * transitions between default->sleep->default are detected and no 569 + * new pin states are applied when we go in and out of sleep state. 570 + * 571 + * To counter this, provide dummies, so that the sleep-only pin 572 + * controller still get some default states, and the working state pin 573 + * controller get some sleep states, so that state transitions occur 574 + * and we re-configure pins for default and sleep states. 575 + */ 576 + pinctrl_provide_dummies(); 577 + 578 + dev_dbg(&pdev->dev, "initialized SKY1 pinctrl driver\n"); 579 + 580 + return pinctrl_enable(spctl->pctl); 581 + } 582 + EXPORT_SYMBOL_GPL(sky1_base_pinctrl_probe); 583 + 584 + 585 + MODULE_AUTHOR("Jerry Zhu <Jerry.Zhu@cixtech.com>"); 586 + MODULE_DESCRIPTION("Cix SKy1 pinctrl base driver"); 587 + MODULE_LICENSE("GPL");
+559
drivers/pinctrl/cix/pinctrl-sky1.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 2 + // 3 + // Author: Jerry Zhu <Jerry.Zhu@cixtech.com> 4 + // Author: Gary Yang <gary.yang@cixtech.com> 5 + 6 + #include <linux/err.h> 7 + #include <linux/init.h> 8 + #include <linux/module.h> 9 + #include <linux/of.h> 10 + #include <linux/of_device.h> 11 + #include <linux/pinctrl/pinctrl.h> 12 + #include <linux/platform_device.h> 13 + #include "linux/stddef.h" 14 + 15 + #include "../core.h" 16 + #include "pinctrl-sky1.h" 17 + 18 + /* Pad names for the s5 domain pinmux subsystem */ 19 + static const char * const gpio1_group[] = {"GPIO1"}; 20 + static const char * const gpio2_group[] = {"GPIO2"}; 21 + static const char * const gpio3_group[] = {"GPIO3"}; 22 + static const char * const gpio4_group[] = {"GPIO4"}; 23 + static const char * const gpio5_group[] = {"GPIO5"}; 24 + static const char * const gpio6_group[] = {"GPIO6"}; 25 + static const char * const gpio7_group[] = {"GPIO7"}; 26 + static const char * const gpio8_group[] = {"GPIO8"}; 27 + static const char * const gpio9_group[] = {"GPIO9"}; 28 + static const char * const gpio10_group[] = {"GPIO10"}; 29 + static const char * const gpio11_group[] = {"GPIO11"}; 30 + static const char * const gpio12_group[] = {"GPIO12"}; 31 + static const char * const gpio13_group[] = {"GPIO13"}; 32 + static const char * const gpio14_group[] = {"GPIO14"}; 33 + static const char * const rsmrst_group[] = { }; 34 + static const char * const srst_group[] = { }; 35 + static const char * const slp_s3_group[] = { }; 36 + static const char * const slp_s5_group[] = { }; 37 + static const char * const pwrgd_group[] = { }; 38 + static const char * const pwrok_group[] = { }; 39 + static const char * const pwrbtn_group[] = { }; 40 + static const char * const ddrio_gate_group[] = { }; 41 + static const char * const jtag_gpio_group[] = { }; 42 + static const char * const jtag_tck_group[] = { }; 43 + static const char * const jtag_tdi_group[] = { }; 44 + static const char * const jtag_tdo_group[] = { }; 45 + static const char * const tms_group[] = { }; 46 + static const char * const trsl_group[] = { }; 47 + static const char * const sfi_i2c0_scl_group[] = {"SFI_I2C0_SCL", 48 + "SFI_I3C0_SCL"}; 49 + static const char * const sfi_i2c0_sda_group[] = {"SFI_I2C0_SDA", 50 + "SFI_I3C0_SDA"}; 51 + static const char * const sfi_i2c1_scl_group[] = {"SFI_I2C1_SCL", 52 + "SFI_I3C1_SCL", "SFI_SPI_CS0"}; 53 + static const char * const sfi_i2c1_sda_group[] = {"SFI_I2C1_SDA", 54 + "SFI_I3C1_SDA", "SFI_SPI_CS1"}; 55 + static const char * const sfi_gpio0_group[] = {"GPIO15", "SFI_SPI_SCK", 56 + "SFI_GPIO0"}; 57 + static const char * const sfi_gpio1_group[] = {"GPIO16", "SFI_SPI_MOSI", 58 + "SFI_GPIO1"}; 59 + static const char * const sfi_gpio2_group[] = {"GPIO17", "SFI_SPI_MISO", 60 + "SFI_GPIO2"}; 61 + static const char * const gpio18_group[] = {"SFI_GPIO3", "GPIO18"}; 62 + static const char * const gpio19_group[] = {"SFI_GPIO4", "GPIO19"}; 63 + static const char * const gpio20_group[] = {"SFI_GPIO5", "GPIO20"}; 64 + static const char * const gpio21_group[] = {"SFI_GPIO6", "GPIO21"}; 65 + static const char * const gpio22_group[] = {"SFI_GPIO7", "GPIO22"}; 66 + static const char * const gpio23_group[] = {"SFI_GPIO8", "GPIO23", 67 + "SFI_I3C0_PUR_EN_L"}; 68 + static const char * const gpio24_group[] = {"SFI_GPIO9", "GPIO24", 69 + "SFI_I3C1_PUR_EN_L"}; 70 + static const char * const spi1_miso_group[] = {"SPI1_MISO", "GPIO25"}; 71 + static const char * const spi1_cs0_group[] = {"SPI1_CS0", "GPIO26"}; 72 + static const char * const spi1_cs1_group[] = {"SPI1_CS1", "GPIO27"}; 73 + static const char * const spi1_mosi_group[] = {"SPI1_MOSI", "GPIO28"}; 74 + static const char * const spi1_clk_group[] = {"SPI1_CLK", "GPIO29"}; 75 + static const char * const gpio30_group[] = {"GPIO30", "USB_0C0_L"}; 76 + static const char * const gpio31_group[] = {"GPIO31", "USB_0C1_L"}; 77 + static const char * const gpio32_group[] = {"GPIO32", "USB_0C2_L"}; 78 + static const char * const gpio33_group[] = {"GPIO33", "USB_0C3_L"}; 79 + static const char * const gpio34_group[] = {"GPIO34", "USB_0C4_L"}; 80 + static const char * const gpio35_group[] = {"GPIO35", "USB_0C5_L"}; 81 + static const char * const gpio36_group[] = {"GPIO36", "USB_0C6_L"}; 82 + static const char * const gpio37_group[] = {"GPIO37", "USB_0C7_L"}; 83 + static const char * const gpio38_group[] = {"GPIO38", "USB_0C8_L"}; 84 + static const char * const gpio39_group[] = {"GPIO39", "USB_0C9_L"}; 85 + static const char * const gpio40_group[] = {"GPIO40", "USB_DRIVE_VBUS0"}; 86 + static const char * const gpio41_group[] = {"GPIO41", "USB_DRIVE_VBUS4"}; 87 + static const char * const gpio42_group[] = {"GPIO42", "USB_DRIVE_VBUS5"}; 88 + static const char * const se_qspi_clk_group[] = {"SE_QSPI_CLK", "QSPI_CLK"}; 89 + static const char * const se_qspi_cs_group[] = {"SE_QSPI_CS_L", "QSPI_CS_L"}; 90 + static const char * const se_qspi_data0_group[] = {"SE_QSPI_DATA0", 91 + "QSPI_DATA0"}; 92 + static const char * const se_qspi_data1_group[] = {"SE_QSPI_DATA1", 93 + "QSPI_DATA1"}; 94 + static const char * const se_qspi_data2_group[] = {"SE_QSPI_DATA2", 95 + "QSPI_DATA2"}; 96 + static const char * const se_qspi_data3_group[] = {"SE_QSPI_DATA3", 97 + "QSPI_DATA3"}; 98 + static const struct sky1_pin_desc sky1_pinctrl_s5_pads[] = { 99 + SKY_PINFUNCTION(PINCTRL_PIN(0, "GPIO1"), gpio1), 100 + SKY_PINFUNCTION(PINCTRL_PIN(1, "GPIO2"), gpio2), 101 + SKY_PINFUNCTION(PINCTRL_PIN(2, "GPIO3"), gpio3), 102 + SKY_PINFUNCTION(PINCTRL_PIN(3, "GPIO4"), gpio4), 103 + SKY_PINFUNCTION(PINCTRL_PIN(4, "GPIO5"), gpio5), 104 + SKY_PINFUNCTION(PINCTRL_PIN(5, "GPIO6"), gpio6), 105 + SKY_PINFUNCTION(PINCTRL_PIN(6, "GPIO7"), gpio7), 106 + SKY_PINFUNCTION(PINCTRL_PIN(7, "GPIO8"), gpio8), 107 + SKY_PINFUNCTION(PINCTRL_PIN(8, "GPIO9"), gpio9), 108 + SKY_PINFUNCTION(PINCTRL_PIN(9, "GPIO10"), gpio10), 109 + SKY_PINFUNCTION(PINCTRL_PIN(10, "GPIO11"), gpio11), 110 + SKY_PINFUNCTION(PINCTRL_PIN(11, "GPIO12"), gpio12), 111 + SKY_PINFUNCTION(PINCTRL_PIN(12, "GPIO13"), gpio13), 112 + SKY_PINFUNCTION(PINCTRL_PIN(13, "GPIO14"), gpio14), 113 + SKY_PINFUNCTION(PINCTRL_PIN(14, "RSMRST_L"), rsmrst), 114 + SKY_PINFUNCTION(PINCTRL_PIN(15, "SRST_L"), srst), 115 + SKY_PINFUNCTION(PINCTRL_PIN(16, "SLP_S3_L"), slp_s3), 116 + SKY_PINFUNCTION(PINCTRL_PIN(17, "SLP_S5_L"), slp_s5), 117 + SKY_PINFUNCTION(PINCTRL_PIN(18, "PWRGD"), pwrgd), 118 + SKY_PINFUNCTION(PINCTRL_PIN(19, "PWROK"), pwrok), 119 + SKY_PINFUNCTION(PINCTRL_PIN(20, "PWRBTN_L"), pwrbtn), 120 + SKY_PINFUNCTION(PINCTRL_PIN(21, "VDD_DDRIO_GATE"), ddrio_gate), 121 + SKY_PINFUNCTION(PINCTRL_PIN(22, "JTAG_GPIO_L"), jtag_gpio), 122 + SKY_PINFUNCTION(PINCTRL_PIN(23, "JTAG_TCK"), jtag_tck), 123 + SKY_PINFUNCTION(PINCTRL_PIN(24, "JTAG_TDI"), jtag_tdi), 124 + SKY_PINFUNCTION(PINCTRL_PIN(25, "JTAG_TDO"), jtag_tdo), 125 + SKY_PINFUNCTION(PINCTRL_PIN(26, "TMS"), tms), 126 + SKY_PINFUNCTION(PINCTRL_PIN(27, "TRSL_L"), trsl), 127 + SKY_PINFUNCTION(PINCTRL_PIN(28, "SFI_I2C0_SCL"), sfi_i2c0_scl), 128 + SKY_PINFUNCTION(PINCTRL_PIN(29, "SFI_I2C0_SDA"), sfi_i2c0_sda), 129 + SKY_PINFUNCTION(PINCTRL_PIN(30, "SFI_I2C1_SCL"), sfi_i2c1_scl), 130 + SKY_PINFUNCTION(PINCTRL_PIN(31, "SFI_I2C1_SDA"), sfi_i2c1_sda), 131 + SKY_PINFUNCTION(PINCTRL_PIN(32, "SFI_GPIO0"), sfi_gpio0), 132 + SKY_PINFUNCTION(PINCTRL_PIN(33, "SFI_GPIO1"), sfi_gpio1), 133 + SKY_PINFUNCTION(PINCTRL_PIN(34, "SFI_GPIO2"), sfi_gpio2), 134 + SKY_PINFUNCTION(PINCTRL_PIN(35, "GPIO18"), gpio18), 135 + SKY_PINFUNCTION(PINCTRL_PIN(36, "GPIO19"), gpio19), 136 + SKY_PINFUNCTION(PINCTRL_PIN(37, "GPIO20"), gpio20), 137 + SKY_PINFUNCTION(PINCTRL_PIN(38, "GPIO21"), gpio21), 138 + SKY_PINFUNCTION(PINCTRL_PIN(39, "GPIO22"), gpio22), 139 + SKY_PINFUNCTION(PINCTRL_PIN(40, "GPIO23"), gpio23), 140 + SKY_PINFUNCTION(PINCTRL_PIN(41, "GPIO24"), gpio24), 141 + SKY_PINFUNCTION(PINCTRL_PIN(42, "SPI1_MISO"), spi1_miso), 142 + SKY_PINFUNCTION(PINCTRL_PIN(43, "SPI1_CS0"), spi1_cs0), 143 + SKY_PINFUNCTION(PINCTRL_PIN(44, "SPI1_CS1"), spi1_cs1), 144 + SKY_PINFUNCTION(PINCTRL_PIN(45, "SPI1_MOSI"), spi1_mosi), 145 + SKY_PINFUNCTION(PINCTRL_PIN(46, "SPI1_CLK"), spi1_clk), 146 + SKY_PINFUNCTION(PINCTRL_PIN(47, "GPIO30"), gpio30), 147 + SKY_PINFUNCTION(PINCTRL_PIN(48, "GPIO31"), gpio31), 148 + SKY_PINFUNCTION(PINCTRL_PIN(49, "GPIO32"), gpio32), 149 + SKY_PINFUNCTION(PINCTRL_PIN(50, "GPIO33"), gpio33), 150 + SKY_PINFUNCTION(PINCTRL_PIN(51, "GPIO34"), gpio34), 151 + SKY_PINFUNCTION(PINCTRL_PIN(52, "GPIO35"), gpio35), 152 + SKY_PINFUNCTION(PINCTRL_PIN(53, "GPIO36"), gpio36), 153 + SKY_PINFUNCTION(PINCTRL_PIN(54, "GPIO37"), gpio37), 154 + SKY_PINFUNCTION(PINCTRL_PIN(55, "GPIO38"), gpio38), 155 + SKY_PINFUNCTION(PINCTRL_PIN(56, "GPIO39"), gpio39), 156 + SKY_PINFUNCTION(PINCTRL_PIN(57, "GPIO40"), gpio40), 157 + SKY_PINFUNCTION(PINCTRL_PIN(58, "GPIO41"), gpio41), 158 + SKY_PINFUNCTION(PINCTRL_PIN(59, "GPIO42"), gpio42), 159 + SKY_PINFUNCTION(PINCTRL_PIN(60, "SE_QSPI_CLK"), se_qspi_clk), 160 + SKY_PINFUNCTION(PINCTRL_PIN(61, "SE_QSPI_CS_L"), se_qspi_cs), 161 + SKY_PINFUNCTION(PINCTRL_PIN(62, "SE_QSPI_DATA0"), se_qspi_data0), 162 + SKY_PINFUNCTION(PINCTRL_PIN(63, "SE_QSPI_DATA1"), se_qspi_data1), 163 + SKY_PINFUNCTION(PINCTRL_PIN(64, "SE_QSPI_DATA2"), se_qspi_data2), 164 + SKY_PINFUNCTION(PINCTRL_PIN(65, "SE_QSPI_DATA3"), se_qspi_data3), 165 + }; 166 + 167 + /* Pad names for the s0 domain pinmux subsystem */ 168 + static const char * const gpio43_group[] = {"GPIO43"}; 169 + static const char * const gpio44_group[] = {"GPIO44"}; 170 + static const char * const gpio45_group[] = {"GPIO45"}; 171 + static const char * const gpio46_group[] = {"GPIO46"}; 172 + static const char * const reset_in_group[] = { }; 173 + static const char * const plt_reset_group[] = { }; 174 + static const char * const thermtrip_group[] = { }; 175 + static const char * const prochot_group[] = { }; 176 + static const char * const pm_i2c0_clk_group[] = { }; 177 + static const char * const pm_i2c0_data_group[] = { }; 178 + static const char * const pm_i2c1_clk_group[] = { }; 179 + static const char * const pm_i2c1_data_group[] = { }; 180 + static const char * const pm_i2c2_clk_group[] = { }; 181 + static const char * const pm_i2c2_data_group[] = { }; 182 + static const char * const pm_i2c3_clk_group[] = { }; 183 + static const char * const pm_i2c3_data_group[] = { }; 184 + static const char * const strap0_group[] = { }; 185 + static const char * const strap1_group[] = { }; 186 + static const char * const dp2_digon_group[] = {"DP2_DIGON"}; 187 + static const char * const dp2_blon_group[] = {"DP2_BLON"}; 188 + static const char * const dp2_vary_bl_group[] = {"DP2_VARY_BL"}; 189 + static const char * const i2c7_scl_group[] = {"I2C7_SCL"}; 190 + static const char * const i2c7_sda_group[] = {"I2C7_SDA"}; 191 + static const char * const uart6_csu_se_txd_group[] = { }; 192 + static const char * const clk_req1_group[] = { }; 193 + static const char * const clk_req3_group[] = { }; 194 + static const char * const i2c5_scl_group[] = {"I2C5_SCL", "GPIO47"}; 195 + static const char * const i2c5_sda_group[] = {"I2C5_SDA", "GPIO48"}; 196 + static const char * const i2c6_scl_group[] = {"I2C6_SCL", "GPIO49"}; 197 + static const char * const i2c6_sda_group[] = {"I2C6_SDA", "GPIO50"}; 198 + static const char * const i2c0_scl_group[] = {"I2C0_SCL", "GPIO51"}; 199 + static const char * const i2c0_sda_group[] = {"I2C0_SDA", "GPIO52"}; 200 + static const char * const i2c1_scl_group[] = {"I2C1_SCL", "GPIO53"}; 201 + static const char * const i2c1_sda_group[] = {"I2C1_SDA", "GPIO54"}; 202 + static const char * const i2c2_scl_group[] = {"I2C2_SCL", "I3C0_SCL", 203 + "GPIO55"}; 204 + static const char * const i2c2_sda_group[] = {"I2C2_SDA", "I3C0_SDA", 205 + "GPIO56"}; 206 + static const char * const gpio57_group[] = {"GPIO57", "I3C0_PUR_EN_L"}; 207 + static const char * const i2c3_scl_group[] = {"I2C3_SCL", "I3C1_SCL", 208 + "GPIO58"}; 209 + static const char * const i2c3_sda_group[] = {"I2C3_SDA", "I3C1_SDA", 210 + "GPIO59"}; 211 + static const char * const gpio60_group[] = {"GPIO60", "I3C1_PUR_EN_L"}; 212 + static const char * const i2c4_scl_group[] = {"I2C4_SCL", "GPIO61"}; 213 + static const char * const i2c4_sda_group[] = {"I2C4_SDA", "GPIO62"}; 214 + static const char * const hda_bitclk_group[] = {"HDA_BITCLK", "I2S0_SCK", 215 + "I2S9_RSCK_DBG"}; 216 + static const char * const hda_rst_group[] = {"HDA_RST_L", "I2S0_DATA_IN", 217 + "I2S9_DATA_IN_DBG"}; 218 + static const char * const hda_sdin0_group[] = {"HDA_SDIN0", "I2S0_MCLK", 219 + "I2S9_TSCK_DBG"}; 220 + static const char * const hda_sdout0_group[] = {"HDA_SDOUT0", "I2S0_DATA_OUT", 221 + "I2S9_TWS_DBG"}; 222 + static const char * const hda_sync_group[] = {"HDA_SYNC", "I2S0_WS", 223 + "I2S9_RWS_DBG"}; 224 + static const char * const hda_sdin1_group[] = {"HDA_SDIN1", "GPIO63", 225 + "I2S9_DATA_IN1_DBG"}; 226 + static const char * const hda_sdout1_group[] = {"HDA_SDOUT1", "GPIO64", 227 + "I2S9_DATA_OUT0_DBG"}; 228 + static const char * const i2s1_mclk_group[] = {"I2S1_MCLK", "GPIO65"}; 229 + static const char * const i2s1_sck_group[] = {"I2S1_SCK", "GPIO66"}; 230 + static const char * const i2s1_ws_group[] = {"I2S1_WS", "GPIO67"}; 231 + static const char * const i2s1_data_in_group[] = {"I2S1_DATA_IN", "GPIO68"}; 232 + static const char * const i2s1_data_out_group[] = {"I2S1_DATA_OUT", "GPIO69"}; 233 + static const char * const i2s2_mck_group[] = {"I2S2_MCLK", "GPIO70"}; 234 + static const char * const i2s2_rsck_group[] = {"I2S2_RSCK", "GPIO71", 235 + "I2S5_RSCK_DBG", "I2S6_RSCK_DBG"}; 236 + static const char * const i2s2_rws_group[] = {"I2S2_RWS", "GPIO72", 237 + "I2S5_RWS_DBG", "I2S6_RWS_DBG"}; 238 + static const char * const i2s2_tsck_group[] = {"I2S2_TSCK", "GPIO73", 239 + "I2S5_TSCK_DBG", "I2S6_TSCK_DBG"}; 240 + static const char * const i2s2_tws_group[] = {"I2S2_TWS", "GPIO74", 241 + "I2S5_TWS_DBG", "I2S6_TWS_DBG"}; 242 + static const char * const i2s2_data_in0_group[] = {"I2S2_DATA_IN0", "GPIO75", 243 + "I2S5_DATA_IN0_DBG", "I2S6_DATA_IN0_DBG"}; 244 + static const char * const i2s2_data_in1_group[] = {"I2S2_DATA_IN1", "GPIO76", 245 + "I2S5_DATA_IN1_DBG", "I2S6_DATA_IN1_DBG"}; 246 + static const char * const i2s2_data_out0_group[] = {"I2S2_DATA_OUT0", "GPIO77", 247 + "I2S5_DATA_OUT0_DBG", "I2S6_DATA_OUT0_DBG"}; 248 + static const char * const i2s2_data_out1_group[] = {"I2S2_DATA_OUT1", "GPIO78", 249 + "I2S5_DATA_OUT1_DBG", "I2S6_DATA_OUT1_DBG"}; 250 + static const char * const i2s2_data_out2_group[] = {"I2S2_DATA_OUT2", 251 + "GPIO79"}; 252 + static const char * const i2s2_data_out3_group[] = {"I2S2_DATA_OUT3", "GPIO80", 253 + "I2S9_DATA_OUT1_DBG"}; 254 + static const char * const i2s3_mclk_group[] = {"I2S3_MCLK", "GPIO81"}; 255 + static const char * const i2s3_rsck_group[] = {"I2S3_RSCK", "GPIO82", 256 + "I2S7_RSCK_DBG", "I2S8_RSCK_DBG"}; 257 + static const char * const i2s3_rws_group[] = {"I2S3_RWS", "GPIO83", 258 + "I2S7_RWS_DBG", "I2S8_RWS_DBG"}; 259 + static const char * const i2s3_tsck_group[] = {"I2S3_TSCK", "GPIO84", 260 + "I2S7_TSCK_DBG", "I2S8_TSCK_DBG"}; 261 + static const char * const i2s3_tws_group[] = {"I2S3_TWS", "GPIO85", 262 + "I2S7_TWS_DBG", "I2S8_TWS_DBG"}; 263 + static const char * const i2s3_data_in0_group[] = {"I2S3_DATA_IN0", "GPIO86", 264 + "I2S7_DATA_IN0_DBG", "I2S8_DATA_IN0_DBG"}; 265 + static const char * const i2s3_data_in1_group[] = {"I2S3_DATA_IN1", "GPIO87", 266 + "I2S7_DATA_IN1_DBG", "I2S8_DATA_IN1_DBG"}; 267 + static const char * const i2s3_data_out0_group[] = {"I2S3_DATA_OUT0", "GPIO88", 268 + "I2S7_DATA_OUT0_DBG", "I2S8_DATA_OUT0_DBG"}; 269 + static const char * const i2s3_data_out1_group[] = {"I2S3_DATA_OUT1", "GPIO89", 270 + "I2S7_DATA_OUT1_DBG", "I2S8_DATA_OUT1_DBG"}; 271 + static const char * const gpio90_group[] = {"GPIO90", "I2S4_MCLK_LB"}; 272 + static const char * const gpio91_group[] = {"GPIO91", "I2S4_SCK_LB"}; 273 + static const char * const gpio92_group[] = {"GPIO92", "I2S4_WS_LB"}; 274 + static const char * const gpio93_group[] = {"GPIO93", "I2S4_DATA_IN_LB"}; 275 + static const char * const gpio94_group[] = {"GPIO94", "I2S4_DATA_OUT_LB"}; 276 + static const char * const uart0_txd_group[] = {"UART0_TXD", "PWM0", "GPIO95"}; 277 + static const char * const uart0_rxd_group[] = {"UART0_RXD", "PWM1", "GPIO96"}; 278 + static const char * const uart0_cts_group[] = {"UART0_CTS", "FAN_OUT2", 279 + "GPIO97"}; 280 + static const char * const uart0_rts_group[] = {"UART0_RTS", "FAN_TACH2", 281 + "GPIO98"}; 282 + static const char * const uart1_txd_group[] = {"UART1_TXD", "FAN_OUT0", 283 + "GPIO99"}; 284 + static const char * const uart1_rxd_group[] = {"UART1_RXD", "FAN_TACH0", 285 + "GPIO100"}; 286 + static const char * const uart1_cts_group[] = {"UART1_CTS", "FAN_OUT1", 287 + "GPIO101"}; 288 + static const char * const uart1_rts_group[] = {"UART1_RTS", "FAN_TACH1", 289 + "GPIO102"}; 290 + static const char * const uart2_txd_group[] = {"UART2_TXD", "GPIO103"}; 291 + static const char * const uart2_rxd_group[] = {"UART2_RXD", "GPIO104"}; 292 + static const char * const uart3_txd_group[] = {"UART3_TXD", "GPIO105"}; 293 + static const char * const uart3_rxd_group[] = {"UART3_RXD", "GPIO106"}; 294 + static const char * const uart3_cts_group[] = {"UART3_CTS", "GPIO107", 295 + "TRIGIN0"}; 296 + static const char * const uart3_rts_group[] = {"UART3_RTS", "GPIO108", 297 + "TRIGIN1"}; 298 + static const char * const uart4_csu_pm_txd_group[] = {"UART4_CSU_PM_TXD", 299 + "GPIO109"}; 300 + static const char * const uart4_csu_pm_rxd_group[] = {"UART4_CSU_PM_RXD", 301 + "GPIO110"}; 302 + static const char * const uart5_csu_se_txd_group[] = {"UART5_CSU_SE_TXD", 303 + "GPIO111"}; 304 + static const char * const uart5_csu_se_rxd_group[] = {"UART5_CSU_SE_RXD", 305 + "GPIO112"}; 306 + static const char * const uart6_csu_se_rxd_group[] = {"UART6_CSU_SE_RXD", 307 + "GPIO113"}; 308 + static const char * const clk_req0_group[] = {"CLK_REQ0_L", "GPIO114"}; 309 + static const char * const clk_req2_group[] = {"CLK_REQ2_L", "GPIO115"}; 310 + static const char * const clk_req4_group[] = {"CLK_REQ4_L", "GPIO116"}; 311 + static const char * const csi0_mclk0_group[] = {"CSI0_MCLK0", "GPIO117"}; 312 + static const char * const csi0_mclk1_group[] = {"CSI0_MCLK1", "GPIO118"}; 313 + static const char * const csi1_mclk0_group[] = {"CSI1_MCLK0", "GPIO119"}; 314 + static const char * const csi1_mclk1_group[] = {"CSI1_MCLK1", "GPIO120"}; 315 + static const char * const gpio121_group[] = {"GPIO121", "GMAC0_REFCLK_25M"}; 316 + static const char * const gpio122_group[] = {"GPIO122", "GMAC0_TX_CTL"}; 317 + static const char * const gpio123_group[] = {"GPIO123", "GMAC0_TXD0"}; 318 + static const char * const gpio124_group[] = {"GPIO124", "GMAC0_TXD1"}; 319 + static const char * const gpio125_group[] = {"GPIO125", "GMAC0_TXD2"}; 320 + static const char * const gpio126_group[] = {"GPIO126", "GMAC0_TXD3"}; 321 + static const char * const gpio127_group[] = {"GPIO127", "GMAC0_TX_CLK"}; 322 + static const char * const gpio128_group[] = {"GPIO128", "GMAC0_RX_CTL"}; 323 + static const char * const gpio129_group[] = {"GPIO129", "GMAC0_RXD0"}; 324 + static const char * const gpio130_group[] = {"GPIO130", "GMAC0_RXD1"}; 325 + static const char * const gpio131_group[] = {"GPIO131", "GMAC0_RXD2"}; 326 + static const char * const gpio132_group[] = {"GPIO132", "GMAC0_RXD3"}; 327 + static const char * const gpio133_group[] = {"GPIO133", "GMAC0_RX_CLK"}; 328 + static const char * const gpio134_group[] = {"GPIO134", "GMAC0_MDC"}; 329 + static const char * const gpio135_group[] = {"GPIO135", "GMAC0_MDIO"}; 330 + static const char * const gpio136_group[] = {"GPIO136", "GMAC1_REFCLK_25M"}; 331 + static const char * const gpio137_group[] = {"GPIO137", "GMAC1_TX_CTL"}; 332 + static const char * const gpio138_group[] = {"GPIO138", "GMAC1_TXD0", 333 + "SPI2_MISO"}; 334 + static const char * const gpio139_group[] = {"GPIO139", "GMAC1_TXD1", 335 + "SPI2_CS0"}; 336 + static const char * const gpio140_group[] = {"GPIO140", "GMAC1_TXD2", 337 + "SPI2_CS1"}; 338 + static const char * const gpio141_group[] = {"GPIO141", "GMAC1_TXD3", 339 + "SPI2_MOSI"}; 340 + static const char * const gpio142_group[] = {"GPIO142", "GMAC1_TX_CLK", 341 + "SPI2_CLK"}; 342 + static const char * const gpio143_group[] = {"GPIO143", "GMAC1_RX_CTL"}; 343 + static const char * const gpio144_group[] = {"GPIO144", "GMAC1_RXD0"}; 344 + static const char * const gpio145_group[] = {"GPIO145", "GMAC1_RXD1"}; 345 + static const char * const gpio146_group[] = {"GPIO146", "GMAC1_RXD2"}; 346 + static const char * const gpio147_group[] = {"GPIO147", "GMAC1_RXD3"}; 347 + static const char * const gpio148_group[] = {"GPIO148", "GMAC1_RX_CLK"}; 348 + static const char * const gpio149_group[] = {"GPIO149", "GMAC1_MDC"}; 349 + static const char * const gpio150_group[] = {"GPIO150", "GMAC1_MDIO"}; 350 + static const char * const gpio151_group[] = {"GPIO151", "PM_GPIO0"}; 351 + static const char * const gpio152_group[] = {"GPIO152", "PM_GPIO1"}; 352 + static const char * const gpio153_group[] = {"GPIO153", "PM_GPIO2"}; 353 + static const struct sky1_pin_desc sky1_pinctrl_pads[] = { 354 + SKY_PINFUNCTION(PINCTRL_PIN(0, "GPIO43"), gpio43), 355 + SKY_PINFUNCTION(PINCTRL_PIN(1, "GPIO44"), gpio44), 356 + SKY_PINFUNCTION(PINCTRL_PIN(2, "GPIO45"), gpio45), 357 + SKY_PINFUNCTION(PINCTRL_PIN(3, "GPIO46"), gpio46), 358 + SKY_PINFUNCTION(PINCTRL_PIN(4, "RESET_IN_L"), reset_in), 359 + SKY_PINFUNCTION(PINCTRL_PIN(5, "PLT_RESET_L"), plt_reset), 360 + SKY_PINFUNCTION(PINCTRL_PIN(6, "THERMTRIP_L"), thermtrip), 361 + SKY_PINFUNCTION(PINCTRL_PIN(7, "PROCHOT_L"), prochot), 362 + SKY_PINFUNCTION(PINCTRL_PIN(8, "PM_I2C0_CLK"), pm_i2c0_clk), 363 + SKY_PINFUNCTION(PINCTRL_PIN(9, "PM_I2C0_DATA"), pm_i2c0_data), 364 + SKY_PINFUNCTION(PINCTRL_PIN(10, "PM_I2C1_CLK"), pm_i2c1_clk), 365 + SKY_PINFUNCTION(PINCTRL_PIN(11, "PM_I2C1_DATA"), pm_i2c1_data), 366 + SKY_PINFUNCTION(PINCTRL_PIN(12, "PM_I2C2_CLK"), pm_i2c2_clk), 367 + SKY_PINFUNCTION(PINCTRL_PIN(13, "PM_I2C2_DATA"), pm_i2c2_data), 368 + SKY_PINFUNCTION(PINCTRL_PIN(14, "PM_I2C3_CLK"), pm_i2c3_clk), 369 + SKY_PINFUNCTION(PINCTRL_PIN(15, "PM_I2C3_DATA"), pm_i2c3_data), 370 + SKY_PINFUNCTION(PINCTRL_PIN(16, "STRAP0"), strap0), 371 + SKY_PINFUNCTION(PINCTRL_PIN(17, "STRAP1"), strap1), 372 + SKY_PINFUNCTION(PINCTRL_PIN(18, "DP2_DIGON"), dp2_digon), 373 + SKY_PINFUNCTION(PINCTRL_PIN(19, "DP2_BLON"), dp2_blon), 374 + SKY_PINFUNCTION(PINCTRL_PIN(20, "DP2_VARY_BL"), dp2_vary_bl), 375 + SKY_PINFUNCTION(PINCTRL_PIN(21, "I2C7_SCL"), i2c7_scl), 376 + SKY_PINFUNCTION(PINCTRL_PIN(22, "I2C7_SDA"), i2c7_sda), 377 + SKY_PINFUNCTION(PINCTRL_PIN(23, "UART6_CSU_SE_TXD"), uart6_csu_se_txd), 378 + SKY_PINFUNCTION(PINCTRL_PIN(24, "CLK_REQ1_L"), clk_req1), 379 + SKY_PINFUNCTION(PINCTRL_PIN(25, "CLK_REQ3_L"), clk_req3), 380 + SKY_PINFUNCTION(PINCTRL_PIN(26, "I2C5_SCL"), i2c5_scl), 381 + SKY_PINFUNCTION(PINCTRL_PIN(27, "I2C5_SDA"), i2c5_sda), 382 + SKY_PINFUNCTION(PINCTRL_PIN(28, "I2C6_SCL"), i2c6_scl), 383 + SKY_PINFUNCTION(PINCTRL_PIN(29, "I2C6_SDA"), i2c6_sda), 384 + SKY_PINFUNCTION(PINCTRL_PIN(30, "I2C0_CLK"), i2c0_scl), 385 + SKY_PINFUNCTION(PINCTRL_PIN(31, "I2C0_SDA"), i2c0_sda), 386 + SKY_PINFUNCTION(PINCTRL_PIN(32, "I2C1_CLK"), i2c1_scl), 387 + SKY_PINFUNCTION(PINCTRL_PIN(33, "I2C1_SDA"), i2c1_sda), 388 + SKY_PINFUNCTION(PINCTRL_PIN(34, "I2C2_SCL"), i2c2_scl), 389 + SKY_PINFUNCTION(PINCTRL_PIN(35, "I2C2_SDA"), i2c2_sda), 390 + SKY_PINFUNCTION(PINCTRL_PIN(36, "GPIO57"), gpio57), 391 + SKY_PINFUNCTION(PINCTRL_PIN(37, "I2C3_SCL"), i2c3_scl), 392 + SKY_PINFUNCTION(PINCTRL_PIN(38, "I2C3_SDA"), i2c3_sda), 393 + SKY_PINFUNCTION(PINCTRL_PIN(39, "GPIO60"), gpio60), 394 + SKY_PINFUNCTION(PINCTRL_PIN(40, "I2C4_SCL"), i2c4_scl), 395 + SKY_PINFUNCTION(PINCTRL_PIN(41, "I2C4_SDA"), i2c4_sda), 396 + SKY_PINFUNCTION(PINCTRL_PIN(42, "HDA_BITCLK"), hda_bitclk), 397 + SKY_PINFUNCTION(PINCTRL_PIN(43, "HDA_RST_L"), hda_rst), 398 + SKY_PINFUNCTION(PINCTRL_PIN(44, "HDA_SDIN0"), hda_sdin0), 399 + SKY_PINFUNCTION(PINCTRL_PIN(45, "HDA_SDOUT0"), hda_sdout0), 400 + SKY_PINFUNCTION(PINCTRL_PIN(46, "HDA_SYNC"), hda_sync), 401 + SKY_PINFUNCTION(PINCTRL_PIN(47, "HDA_SDIN1"), hda_sdin1), 402 + SKY_PINFUNCTION(PINCTRL_PIN(48, "HDA_SDOUT1"), hda_sdout1), 403 + SKY_PINFUNCTION(PINCTRL_PIN(49, "I2S1_MCLK"), i2s1_mclk), 404 + SKY_PINFUNCTION(PINCTRL_PIN(50, "I2S1_SCK"), i2s1_sck), 405 + SKY_PINFUNCTION(PINCTRL_PIN(51, "I2S1_WS"), i2s1_ws), 406 + SKY_PINFUNCTION(PINCTRL_PIN(52, "I2S1_DATA_IN"), i2s1_data_in), 407 + SKY_PINFUNCTION(PINCTRL_PIN(53, "I2S1_DATA_OUT"), i2s1_data_out), 408 + SKY_PINFUNCTION(PINCTRL_PIN(54, "I2S2_MCLK"), i2s2_mck), 409 + SKY_PINFUNCTION(PINCTRL_PIN(55, "I2S2_RSCK"), i2s2_rsck), 410 + SKY_PINFUNCTION(PINCTRL_PIN(56, "I2S2_RWS"), i2s2_rws), 411 + SKY_PINFUNCTION(PINCTRL_PIN(57, "I2S2_TSCK"), i2s2_tsck), 412 + SKY_PINFUNCTION(PINCTRL_PIN(58, "I2S2_TWS"), i2s2_tws), 413 + SKY_PINFUNCTION(PINCTRL_PIN(59, "I2S2_DATA_IN0"), i2s2_data_in0), 414 + SKY_PINFUNCTION(PINCTRL_PIN(60, "I2S2_DATA_IN1"), i2s2_data_in1), 415 + SKY_PINFUNCTION(PINCTRL_PIN(61, "I2S2_DATA_OUT0"), i2s2_data_out0), 416 + SKY_PINFUNCTION(PINCTRL_PIN(62, "I2S2_DATA_OUT1"), i2s2_data_out1), 417 + SKY_PINFUNCTION(PINCTRL_PIN(63, "I2S2_DATA_OUT2"), i2s2_data_out2), 418 + SKY_PINFUNCTION(PINCTRL_PIN(64, "I2S2_DATA_OUT3"), i2s2_data_out3), 419 + SKY_PINFUNCTION(PINCTRL_PIN(65, "I2S3_MCLK"), i2s3_mclk), 420 + SKY_PINFUNCTION(PINCTRL_PIN(66, "I2S3_RSCK"), i2s3_rsck), 421 + SKY_PINFUNCTION(PINCTRL_PIN(67, "I2S3_RWS"), i2s3_rws), 422 + SKY_PINFUNCTION(PINCTRL_PIN(68, "I2S3_TSCK"), i2s3_tsck), 423 + SKY_PINFUNCTION(PINCTRL_PIN(69, "I2S3_TWS"), i2s3_tws), 424 + SKY_PINFUNCTION(PINCTRL_PIN(70, "I2S3_DATA_IN0"), i2s3_data_in0), 425 + SKY_PINFUNCTION(PINCTRL_PIN(71, "I2S3_DATA_IN1"), i2s3_data_in1), 426 + SKY_PINFUNCTION(PINCTRL_PIN(72, "I2S3_DATA_OUT0"), i2s3_data_out0), 427 + SKY_PINFUNCTION(PINCTRL_PIN(73, "I2S3_DATA_OUT1"), i2s3_data_out1), 428 + SKY_PINFUNCTION(PINCTRL_PIN(74, "GPIO90"), gpio90), 429 + SKY_PINFUNCTION(PINCTRL_PIN(75, "GPIO91"), gpio91), 430 + SKY_PINFUNCTION(PINCTRL_PIN(76, "GPIO92"), gpio92), 431 + SKY_PINFUNCTION(PINCTRL_PIN(77, "GPIO93"), gpio93), 432 + SKY_PINFUNCTION(PINCTRL_PIN(78, "GPIO94"), gpio94), 433 + SKY_PINFUNCTION(PINCTRL_PIN(79, "UART0_TXD"), uart0_txd), 434 + SKY_PINFUNCTION(PINCTRL_PIN(80, "UART0_RXD"), uart0_rxd), 435 + SKY_PINFUNCTION(PINCTRL_PIN(81, "UART0_CTS"), uart0_cts), 436 + SKY_PINFUNCTION(PINCTRL_PIN(82, "UART0_RTS"), uart0_rts), 437 + SKY_PINFUNCTION(PINCTRL_PIN(83, "UART1_TXD"), uart1_txd), 438 + SKY_PINFUNCTION(PINCTRL_PIN(84, "UART1_RXD"), uart1_rxd), 439 + SKY_PINFUNCTION(PINCTRL_PIN(85, "UART1_CTS"), uart1_cts), 440 + SKY_PINFUNCTION(PINCTRL_PIN(86, "UART1_RTS"), uart1_rts), 441 + SKY_PINFUNCTION(PINCTRL_PIN(87, "UART2_TXD"), uart2_txd), 442 + SKY_PINFUNCTION(PINCTRL_PIN(88, "UART2_RXD"), uart2_rxd), 443 + SKY_PINFUNCTION(PINCTRL_PIN(89, "UART3_TXD"), uart3_txd), 444 + SKY_PINFUNCTION(PINCTRL_PIN(90, "UART3_RXD"), uart3_rxd), 445 + SKY_PINFUNCTION(PINCTRL_PIN(91, "UART3_CTS"), uart3_cts), 446 + SKY_PINFUNCTION(PINCTRL_PIN(92, "UART3_RTS"), uart3_rts), 447 + SKY_PINFUNCTION(PINCTRL_PIN(93, "UART4_CSU_PM_TXD"), uart4_csu_pm_txd), 448 + SKY_PINFUNCTION(PINCTRL_PIN(94, "UART4_CSU_PM_RXD"), uart4_csu_pm_rxd), 449 + SKY_PINFUNCTION(PINCTRL_PIN(95, "UART5_CSU_SE_TXD"), uart5_csu_se_txd), 450 + SKY_PINFUNCTION(PINCTRL_PIN(96, "UART5_CSU_SE_RXD"), uart5_csu_se_rxd), 451 + SKY_PINFUNCTION(PINCTRL_PIN(97, "UART6_CSU_SE_RXD"), uart6_csu_se_rxd), 452 + SKY_PINFUNCTION(PINCTRL_PIN(98, "CLK_REQ0_L"), clk_req0), 453 + SKY_PINFUNCTION(PINCTRL_PIN(99, "CLK_REQ2_L"), clk_req2), 454 + SKY_PINFUNCTION(PINCTRL_PIN(100, "CLK_REQ4_L"), clk_req4), 455 + SKY_PINFUNCTION(PINCTRL_PIN(101, "CSI0_MCLK0"), csi0_mclk0), 456 + SKY_PINFUNCTION(PINCTRL_PIN(102, "CSI0_MCLK1"), csi0_mclk1), 457 + SKY_PINFUNCTION(PINCTRL_PIN(103, "CSI1_MCLK0"), csi1_mclk0), 458 + SKY_PINFUNCTION(PINCTRL_PIN(104, "CSI1_MCLK1"), csi1_mclk1), 459 + SKY_PINFUNCTION(PINCTRL_PIN(105, "GPIO121"), gpio121), 460 + SKY_PINFUNCTION(PINCTRL_PIN(106, "GPIO122"), gpio122), 461 + SKY_PINFUNCTION(PINCTRL_PIN(107, "GPIO123"), gpio123), 462 + SKY_PINFUNCTION(PINCTRL_PIN(108, "GPIO124"), gpio124), 463 + SKY_PINFUNCTION(PINCTRL_PIN(109, "GPIO125"), gpio125), 464 + SKY_PINFUNCTION(PINCTRL_PIN(110, "GPIO126"), gpio126), 465 + SKY_PINFUNCTION(PINCTRL_PIN(111, "GPIO127"), gpio127), 466 + SKY_PINFUNCTION(PINCTRL_PIN(112, "GPIO128"), gpio128), 467 + SKY_PINFUNCTION(PINCTRL_PIN(113, "GPIO129"), gpio129), 468 + SKY_PINFUNCTION(PINCTRL_PIN(114, "GPIO130"), gpio130), 469 + SKY_PINFUNCTION(PINCTRL_PIN(115, "GPIO131"), gpio131), 470 + SKY_PINFUNCTION(PINCTRL_PIN(116, "GPIO132"), gpio132), 471 + SKY_PINFUNCTION(PINCTRL_PIN(117, "GPIO133"), gpio133), 472 + SKY_PINFUNCTION(PINCTRL_PIN(118, "GPIO134"), gpio134), 473 + SKY_PINFUNCTION(PINCTRL_PIN(119, "GPIO135"), gpio135), 474 + SKY_PINFUNCTION(PINCTRL_PIN(120, "GPIO136"), gpio136), 475 + SKY_PINFUNCTION(PINCTRL_PIN(121, "GPIO137"), gpio137), 476 + SKY_PINFUNCTION(PINCTRL_PIN(122, "GPIO138"), gpio138), 477 + SKY_PINFUNCTION(PINCTRL_PIN(123, "GPIO139"), gpio139), 478 + SKY_PINFUNCTION(PINCTRL_PIN(124, "GPIO140"), gpio140), 479 + SKY_PINFUNCTION(PINCTRL_PIN(125, "GPIO141"), gpio141), 480 + SKY_PINFUNCTION(PINCTRL_PIN(126, "GPIO142"), gpio142), 481 + SKY_PINFUNCTION(PINCTRL_PIN(127, "GPIO143"), gpio143), 482 + SKY_PINFUNCTION(PINCTRL_PIN(128, "GPIO144"), gpio144), 483 + SKY_PINFUNCTION(PINCTRL_PIN(129, "GPIO145"), gpio145), 484 + SKY_PINFUNCTION(PINCTRL_PIN(130, "GPIO146"), gpio146), 485 + SKY_PINFUNCTION(PINCTRL_PIN(131, "GPIO147"), gpio147), 486 + SKY_PINFUNCTION(PINCTRL_PIN(132, "GPIO148"), gpio148), 487 + SKY_PINFUNCTION(PINCTRL_PIN(133, "GPIO149"), gpio149), 488 + SKY_PINFUNCTION(PINCTRL_PIN(134, "GPIO150"), gpio150), 489 + SKY_PINFUNCTION(PINCTRL_PIN(135, "GPIO151"), gpio151), 490 + SKY_PINFUNCTION(PINCTRL_PIN(136, "GPIO152"), gpio152), 491 + SKY_PINFUNCTION(PINCTRL_PIN(137, "GPIO153"), gpio153), 492 + }; 493 + 494 + static const struct sky1_pinctrl_soc_info sky1_pinctrl_s5_info = { 495 + .pins = sky1_pinctrl_s5_pads, 496 + .npins = ARRAY_SIZE(sky1_pinctrl_s5_pads), 497 + }; 498 + 499 + static const struct sky1_pinctrl_soc_info sky1_pinctrl_info = { 500 + .pins = sky1_pinctrl_pads, 501 + .npins = ARRAY_SIZE(sky1_pinctrl_pads), 502 + }; 503 + 504 + static const struct of_device_id sky1_pinctrl_of_match[] = { 505 + { .compatible = "cix,sky1-pinctrl-s5", .data = &sky1_pinctrl_s5_info, }, 506 + { .compatible = "cix,sky1-pinctrl", .data = &sky1_pinctrl_info, }, 507 + { /* sentinel */ } 508 + }; 509 + MODULE_DEVICE_TABLE(of, sky1_pinctrl_of_match); 510 + 511 + static int __maybe_unused sky1_pinctrl_suspend(struct device *dev) 512 + { 513 + struct sky1_pinctrl *spctl = dev_get_drvdata(dev); 514 + 515 + return pinctrl_force_sleep(spctl->pctl); 516 + } 517 + 518 + static int __maybe_unused sky1_pinctrl_resume(struct device *dev) 519 + { 520 + struct sky1_pinctrl *spctl = dev_get_drvdata(dev); 521 + 522 + return pinctrl_force_default(spctl->pctl); 523 + } 524 + 525 + const struct dev_pm_ops sky1_pinctrl_pm_ops = { 526 + SET_LATE_SYSTEM_SLEEP_PM_OPS(sky1_pinctrl_suspend, 527 + sky1_pinctrl_resume) 528 + }; 529 + EXPORT_SYMBOL_GPL(sky1_pinctrl_pm_ops); 530 + 531 + static int sky1_pinctrl_probe(struct platform_device *pdev) 532 + { 533 + const struct sky1_pinctrl_soc_info *pinctrl_info; 534 + 535 + pinctrl_info = device_get_match_data(&pdev->dev); 536 + if (!pinctrl_info) 537 + return -ENODEV; 538 + 539 + return sky1_base_pinctrl_probe(pdev, pinctrl_info); 540 + } 541 + 542 + static struct platform_driver sky1_pinctrl_driver = { 543 + .driver = { 544 + .name = "sky1-pinctrl", 545 + .of_match_table = sky1_pinctrl_of_match, 546 + .pm = &sky1_pinctrl_pm_ops, 547 + }, 548 + .probe = sky1_pinctrl_probe, 549 + }; 550 + 551 + static int __init sky1_pinctrl_init(void) 552 + { 553 + return platform_driver_register(&sky1_pinctrl_driver); 554 + } 555 + arch_initcall(sky1_pinctrl_init); 556 + 557 + MODULE_AUTHOR("Jerry Zhu <Jerry.Zhu@cixtech.com>"); 558 + MODULE_DESCRIPTION("Cix Sky1 pinctrl driver"); 559 + MODULE_LICENSE("GPL");
+48
drivers/pinctrl/cix/pinctrl-sky1.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0+ */ 2 + /* 3 + * Author: Jerry Zhu <Jerry.Zhu@cixtech.com> 4 + */ 5 + 6 + #ifndef __DRIVERS_PINCTRL_SKY1_H 7 + #define __DRIVERS_PINCTRL_SKY1_H 8 + 9 + struct sky1_pinctrl_group { 10 + const char *name; 11 + unsigned long config; 12 + unsigned int pin; 13 + }; 14 + 15 + struct sky1_pin_desc { 16 + const struct pinctrl_pin_desc pin; 17 + const char * const *func_group; 18 + unsigned int nfunc; 19 + }; 20 + 21 + struct sky1_pinctrl_soc_info { 22 + const struct sky1_pin_desc *pins; 23 + unsigned int npins; 24 + }; 25 + 26 + #define SKY_PINFUNCTION(_pin, _func) \ 27 + ((struct sky1_pin_desc) { \ 28 + .pin = _pin, \ 29 + .func_group = _func##_group, \ 30 + .nfunc = ARRAY_SIZE(_func##_group), \ 31 + }) 32 + /** 33 + * @dev: a pointer back to containing device 34 + * @base: the offset to the controller in virtual memory 35 + */ 36 + struct sky1_pinctrl { 37 + struct device *dev; 38 + struct pinctrl_dev *pctl; 39 + void __iomem *base; 40 + const struct sky1_pinctrl_soc_info *info; 41 + struct sky1_pinctrl_group *groups; 42 + const char **grp_names; 43 + }; 44 + 45 + int sky1_base_pinctrl_probe(struct platform_device *pdev, 46 + const struct sky1_pinctrl_soc_info *info); 47 + 48 + #endif /* __DRIVERS_PINCTRL_SKY1_H */
+2 -1
drivers/pinctrl/core.c
··· 70 70 { 71 71 pinctrl_dummy_state = true; 72 72 } 73 + EXPORT_SYMBOL_GPL(pinctrl_provide_dummies); 73 74 74 75 const char *pinctrl_dev_get_name(struct pinctrl_dev *pctldev) 75 76 { ··· 2417 2416 2418 2417 static int __init pinctrl_init(void) 2419 2418 { 2420 - pr_info("initialized pinctrl subsystem\n"); 2419 + pr_debug("initialized pinctrl subsystem\n"); 2421 2420 pinctrl_init_debugfs(); 2422 2421 return 0; 2423 2422 }
+30 -38
drivers/pinctrl/intel/pinctrl-alderlake.c
··· 27 27 #define ADL_S_GPI_IS 0x200 28 28 #define ADL_S_GPI_IE 0x220 29 29 30 - #define ADL_GPP(r, s, e, g) \ 31 - { \ 32 - .reg_num = (r), \ 33 - .base = (s), \ 34 - .size = ((e) - (s) + 1), \ 35 - .gpio_base = (g), \ 36 - } 37 - 38 30 #define ADL_N_COMMUNITY(b, s, e, g) \ 39 31 INTEL_COMMUNITY_GPPS(b, s, e, g, ADL_N) 40 32 ··· 308 316 }; 309 317 310 318 static const struct intel_padgroup adln_community0_gpps[] = { 311 - ADL_GPP(0, 0, 25, 0), /* GPP_B */ 312 - ADL_GPP(1, 26, 41, 32), /* GPP_T */ 313 - ADL_GPP(2, 42, 66, 64), /* GPP_A */ 319 + INTEL_GPP(0, 0, 25, 0), /* GPP_B */ 320 + INTEL_GPP(1, 26, 41, 32), /* GPP_T */ 321 + INTEL_GPP(2, 42, 66, 64), /* GPP_A */ 314 322 }; 315 323 316 324 static const struct intel_padgroup adln_community1_gpps[] = { 317 - ADL_GPP(0, 67, 74, 96), /* GPP_S */ 318 - ADL_GPP(1, 75, 94, 128), /* GPP_I */ 319 - ADL_GPP(2, 95, 118, 160), /* GPP_H */ 320 - ADL_GPP(3, 119, 139, 192), /* GPP_D */ 321 - ADL_GPP(4, 140, 168, 224), /* vGPIO */ 325 + INTEL_GPP(0, 67, 74, 96), /* GPP_S */ 326 + INTEL_GPP(1, 75, 94, 128), /* GPP_I */ 327 + INTEL_GPP(2, 95, 118, 160), /* GPP_H */ 328 + INTEL_GPP(3, 119, 139, 192), /* GPP_D */ 329 + INTEL_GPP(4, 140, 168, 224), /* vGPIO */ 322 330 }; 323 331 324 332 static const struct intel_padgroup adln_community4_gpps[] = { 325 - ADL_GPP(0, 169, 192, 256), /* GPP_C */ 326 - ADL_GPP(1, 193, 217, 288), /* GPP_F */ 327 - ADL_GPP(2, 218, 223, INTEL_GPIO_BASE_NOMAP), /* HVCMOS */ 328 - ADL_GPP(3, 224, 248, 320), /* GPP_E */ 333 + INTEL_GPP(0, 169, 192, 256), /* GPP_C */ 334 + INTEL_GPP(1, 193, 217, 288), /* GPP_F */ 335 + INTEL_GPP(2, 218, 223, INTEL_GPIO_BASE_NOMAP), /* HVCMOS */ 336 + INTEL_GPP(3, 224, 248, 320), /* GPP_E */ 329 337 }; 330 338 331 339 static const struct intel_padgroup adln_community5_gpps[] = { 332 - ADL_GPP(0, 249, 256, 352), /* GPP_R */ 340 + INTEL_GPP(0, 249, 256, 352), /* GPP_R */ 333 341 }; 334 342 335 343 static const struct intel_community adln_communities[] = { ··· 672 680 }; 673 681 674 682 static const struct intel_padgroup adls_community0_gpps[] = { 675 - ADL_GPP(0, 0, 24, 0), /* GPP_I */ 676 - ADL_GPP(1, 25, 47, 32), /* GPP_R */ 677 - ADL_GPP(2, 48, 59, 64), /* GPP_J */ 678 - ADL_GPP(3, 60, 86, 96), /* vGPIO */ 679 - ADL_GPP(4, 87, 94, 128), /* vGPIO_0 */ 683 + INTEL_GPP(0, 0, 24, 0), /* GPP_I */ 684 + INTEL_GPP(1, 25, 47, 32), /* GPP_R */ 685 + INTEL_GPP(2, 48, 59, 64), /* GPP_J */ 686 + INTEL_GPP(3, 60, 86, 96), /* vGPIO */ 687 + INTEL_GPP(4, 87, 94, 128), /* vGPIO_0 */ 680 688 }; 681 689 682 690 static const struct intel_padgroup adls_community1_gpps[] = { 683 - ADL_GPP(0, 95, 118, 160), /* GPP_B */ 684 - ADL_GPP(1, 119, 126, 192), /* GPP_G */ 685 - ADL_GPP(2, 127, 150, 224), /* GPP_H */ 691 + INTEL_GPP(0, 95, 118, 160), /* GPP_B */ 692 + INTEL_GPP(1, 119, 126, 192), /* GPP_G */ 693 + INTEL_GPP(2, 127, 150, 224), /* GPP_H */ 686 694 }; 687 695 688 696 static const struct intel_padgroup adls_community3_gpps[] = { 689 - ADL_GPP(0, 151, 159, INTEL_GPIO_BASE_NOMAP), /* SPI0 */ 690 - ADL_GPP(1, 160, 175, 256), /* GPP_A */ 691 - ADL_GPP(2, 176, 199, 288), /* GPP_C */ 697 + INTEL_GPP(0, 151, 159, INTEL_GPIO_BASE_NOMAP), /* SPI0 */ 698 + INTEL_GPP(1, 160, 175, 256), /* GPP_A */ 699 + INTEL_GPP(2, 176, 199, 288), /* GPP_C */ 692 700 }; 693 701 694 702 static const struct intel_padgroup adls_community4_gpps[] = { 695 - ADL_GPP(0, 200, 207, 320), /* GPP_S */ 696 - ADL_GPP(1, 208, 230, 352), /* GPP_E */ 697 - ADL_GPP(2, 231, 245, 384), /* GPP_K */ 698 - ADL_GPP(3, 246, 269, 416), /* GPP_F */ 703 + INTEL_GPP(0, 200, 207, 320), /* GPP_S */ 704 + INTEL_GPP(1, 208, 230, 352), /* GPP_E */ 705 + INTEL_GPP(2, 231, 245, 384), /* GPP_K */ 706 + INTEL_GPP(3, 246, 269, 416), /* GPP_F */ 699 707 }; 700 708 701 709 static const struct intel_padgroup adls_community5_gpps[] = { 702 - ADL_GPP(0, 270, 294, 448), /* GPP_D */ 703 - ADL_GPP(1, 295, 303, INTEL_GPIO_BASE_NOMAP), /* JTAG */ 710 + INTEL_GPP(0, 270, 294, 448), /* GPP_D */ 711 + INTEL_GPP(1, 295, 303, INTEL_GPIO_BASE_NOMAP), /* JTAG */ 704 712 }; 705 713 706 714 static const struct intel_community adls_communities[] = {
+8 -12
drivers/pinctrl/intel/pinctrl-baytrail.c
··· 1498 1498 1499 1499 ret = gpiochip_add_pin_range(chip, dev_name(dev), 0, 0, vg->soc->npins); 1500 1500 if (ret) 1501 - dev_err(dev, "failed to add GPIO pin range\n"); 1501 + return dev_err_probe(dev, ret, "failed to add GPIO pin range\n"); 1502 1502 1503 - return ret; 1503 + return 0; 1504 1504 } 1505 1505 1506 1506 static int byt_gpio_probe(struct intel_pinctrl *vg) ··· 1548 1548 1549 1549 ret = devm_gpiochip_add_data(vg->dev, gc, vg); 1550 1550 if (ret) 1551 - dev_err(vg->dev, "failed adding byt-gpio chip\n"); 1551 + return dev_err_probe(vg->dev, ret, "failed to register gpiochip\n"); 1552 1552 1553 - return ret; 1553 + return 0; 1554 1554 } 1555 1555 1556 1556 static int byt_set_soc_data(struct intel_pinctrl *vg, ··· 1601 1601 1602 1602 vg->dev = dev; 1603 1603 ret = byt_set_soc_data(vg, soc_data); 1604 - if (ret) { 1605 - dev_err(dev, "failed to set soc data\n"); 1606 - return ret; 1607 - } 1604 + if (ret) 1605 + return dev_err_probe(dev, ret, "failed to set soc data\n"); 1608 1606 1609 1607 vg->pctldesc = byt_pinctrl_desc; 1610 1608 vg->pctldesc.name = dev_name(dev); ··· 1610 1612 vg->pctldesc.npins = vg->soc->npins; 1611 1613 1612 1614 vg->pctldev = devm_pinctrl_register(dev, &vg->pctldesc, vg); 1613 - if (IS_ERR(vg->pctldev)) { 1614 - dev_err(dev, "failed to register pinctrl driver\n"); 1615 - return PTR_ERR(vg->pctldev); 1616 - } 1615 + if (IS_ERR(vg->pctldev)) 1616 + return dev_err_probe(dev, PTR_ERR(vg->pctldev), "failed to register pinctrl\n"); 1617 1617 1618 1618 ret = byt_gpio_probe(vg); 1619 1619 if (ret)
+30 -38
drivers/pinctrl/intel/pinctrl-cannonlake.c
··· 28 28 #define CNL_H_GPI_IS 0x100 29 29 #define CNL_H_GPI_IE 0x120 30 30 31 - #define CNL_GPP(r, s, e, g) \ 32 - { \ 33 - .reg_num = (r), \ 34 - .base = (s), \ 35 - .size = ((e) - (s) + 1), \ 36 - .gpio_base = (g), \ 37 - } 38 - 39 31 #define CNL_LP_COMMUNITY(b, s, e, g) \ 40 32 INTEL_COMMUNITY_GPPS(b, s, e, g, CNL_LP) 41 33 ··· 354 362 }; 355 363 356 364 static const struct intel_padgroup cnlh_community0_gpps[] = { 357 - CNL_GPP(0, 0, 24, 0), /* GPP_A */ 358 - CNL_GPP(1, 25, 50, 32), /* GPP_B */ 365 + INTEL_GPP(0, 0, 24, 0), /* GPP_A */ 366 + INTEL_GPP(1, 25, 50, 32), /* GPP_B */ 359 367 }; 360 368 361 369 static const struct intel_padgroup cnlh_community1_gpps[] = { 362 - CNL_GPP(0, 51, 74, 64), /* GPP_C */ 363 - CNL_GPP(1, 75, 98, 96), /* GPP_D */ 364 - CNL_GPP(2, 99, 106, 128), /* GPP_G */ 365 - CNL_GPP(3, 107, 114, INTEL_GPIO_BASE_NOMAP), /* AZA */ 366 - CNL_GPP(4, 115, 146, 160), /* vGPIO_0 */ 367 - CNL_GPP(5, 147, 154, INTEL_GPIO_BASE_NOMAP), /* vGPIO_1 */ 370 + INTEL_GPP(0, 51, 74, 64), /* GPP_C */ 371 + INTEL_GPP(1, 75, 98, 96), /* GPP_D */ 372 + INTEL_GPP(2, 99, 106, 128), /* GPP_G */ 373 + INTEL_GPP(3, 107, 114, INTEL_GPIO_BASE_NOMAP), /* AZA */ 374 + INTEL_GPP(4, 115, 146, 160), /* vGPIO_0 */ 375 + INTEL_GPP(5, 147, 154, INTEL_GPIO_BASE_NOMAP), /* vGPIO_1 */ 368 376 }; 369 377 370 378 static const struct intel_padgroup cnlh_community3_gpps[] = { 371 - CNL_GPP(0, 155, 178, 192), /* GPP_K */ 372 - CNL_GPP(1, 179, 202, 224), /* GPP_H */ 373 - CNL_GPP(2, 203, 215, 256), /* GPP_E */ 374 - CNL_GPP(3, 216, 239, 288), /* GPP_F */ 375 - CNL_GPP(4, 240, 248, INTEL_GPIO_BASE_NOMAP), /* SPI */ 379 + INTEL_GPP(0, 155, 178, 192), /* GPP_K */ 380 + INTEL_GPP(1, 179, 202, 224), /* GPP_H */ 381 + INTEL_GPP(2, 203, 215, 256), /* GPP_E */ 382 + INTEL_GPP(3, 216, 239, 288), /* GPP_F */ 383 + INTEL_GPP(4, 240, 248, INTEL_GPIO_BASE_NOMAP), /* SPI */ 376 384 }; 377 385 378 386 static const struct intel_padgroup cnlh_community4_gpps[] = { 379 - CNL_GPP(0, 249, 259, INTEL_GPIO_BASE_NOMAP), /* CPU */ 380 - CNL_GPP(1, 260, 268, INTEL_GPIO_BASE_NOMAP), /* JTAG */ 381 - CNL_GPP(2, 269, 286, 320), /* GPP_I */ 382 - CNL_GPP(3, 287, 298, 352), /* GPP_J */ 387 + INTEL_GPP(0, 249, 259, INTEL_GPIO_BASE_NOMAP), /* CPU */ 388 + INTEL_GPP(1, 260, 268, INTEL_GPIO_BASE_NOMAP), /* JTAG */ 389 + INTEL_GPP(2, 269, 286, 320), /* GPP_I */ 390 + INTEL_GPP(3, 287, 298, 352), /* GPP_J */ 383 391 }; 384 392 385 393 static const unsigned int cnlh_spi0_pins[] = { 40, 41, 42, 43 }; ··· 772 780 }; 773 781 774 782 static const struct intel_padgroup cnllp_community0_gpps[] = { 775 - CNL_GPP(0, 0, 24, 0), /* GPP_A */ 776 - CNL_GPP(1, 25, 50, 32), /* GPP_B */ 777 - CNL_GPP(2, 51, 58, 64), /* GPP_G */ 778 - CNL_GPP(3, 59, 67, INTEL_GPIO_BASE_NOMAP), /* SPI */ 783 + INTEL_GPP(0, 0, 24, 0), /* GPP_A */ 784 + INTEL_GPP(1, 25, 50, 32), /* GPP_B */ 785 + INTEL_GPP(2, 51, 58, 64), /* GPP_G */ 786 + INTEL_GPP(3, 59, 67, INTEL_GPIO_BASE_NOMAP), /* SPI */ 779 787 }; 780 788 781 789 static const struct intel_padgroup cnllp_community1_gpps[] = { 782 - CNL_GPP(0, 68, 92, 96), /* GPP_D */ 783 - CNL_GPP(1, 93, 116, 128), /* GPP_F */ 784 - CNL_GPP(2, 117, 140, 160), /* GPP_H */ 785 - CNL_GPP(3, 141, 172, 192), /* vGPIO */ 786 - CNL_GPP(4, 173, 180, 224), /* vGPIO */ 790 + INTEL_GPP(0, 68, 92, 96), /* GPP_D */ 791 + INTEL_GPP(1, 93, 116, 128), /* GPP_F */ 792 + INTEL_GPP(2, 117, 140, 160), /* GPP_H */ 793 + INTEL_GPP(3, 141, 172, 192), /* vGPIO */ 794 + INTEL_GPP(4, 173, 180, 224), /* vGPIO */ 787 795 }; 788 796 789 797 static const struct intel_padgroup cnllp_community4_gpps[] = { 790 - CNL_GPP(0, 181, 204, 256), /* GPP_C */ 791 - CNL_GPP(1, 205, 228, 288), /* GPP_E */ 792 - CNL_GPP(2, 229, 237, INTEL_GPIO_BASE_NOMAP), /* JTAG */ 793 - CNL_GPP(3, 238, 243, INTEL_GPIO_BASE_NOMAP), /* HVCMOS */ 798 + INTEL_GPP(0, 181, 204, 256), /* GPP_C */ 799 + INTEL_GPP(1, 205, 228, 288), /* GPP_E */ 800 + INTEL_GPP(2, 229, 237, INTEL_GPIO_BASE_NOMAP), /* JTAG */ 801 + INTEL_GPP(3, 238, 243, INTEL_GPIO_BASE_NOMAP), /* HVCMOS */ 794 802 }; 795 803 796 804 static const struct intel_community cnllp_communities[] = {
+15 -22
drivers/pinctrl/intel/pinctrl-cedarfork.c
··· 21 21 #define CDF_GPI_IS 0x200 22 22 #define CDF_GPI_IE 0x230 23 23 24 - #define CDF_GPP(r, s, e) \ 25 - { \ 26 - .reg_num = (r), \ 27 - .base = (s), \ 28 - .size = ((e) - (s) + 1), \ 29 - } 30 - 31 24 #define CDF_COMMUNITY(b, s, e, g) \ 32 25 INTEL_COMMUNITY_GPPS(b, s, e, g, CDF) 33 26 ··· 281 288 }; 282 289 283 290 static const struct intel_padgroup cdf_community0_gpps[] = { 284 - CDF_GPP(0, 0, 23), /* WEST2 */ 285 - CDF_GPP(1, 24, 47), /* WEST3 */ 286 - CDF_GPP(2, 48, 70), /* WEST01 */ 287 - CDF_GPP(3, 71, 90), /* WEST5 */ 288 - CDF_GPP(4, 91, 96), /* WESTC */ 289 - CDF_GPP(5, 97, 101), /* WESTC_DFX */ 290 - CDF_GPP(6, 102, 111), /* WESTA */ 291 - CDF_GPP(7, 112, 123), /* WESTB */ 292 - CDF_GPP(8, 124, 143), /* WESTD */ 293 - CDF_GPP(9, 144, 144), /* WESTD_PECI */ 294 - CDF_GPP(10, 145, 167), /* WESTF */ 291 + INTEL_GPP(0, 0, 23, 0), /* WEST2 */ 292 + INTEL_GPP(1, 24, 47, 24), /* WEST3 */ 293 + INTEL_GPP(2, 48, 70, 48), /* WEST01 */ 294 + INTEL_GPP(3, 71, 90, 71), /* WEST5 */ 295 + INTEL_GPP(4, 91, 96, 91), /* WESTC */ 296 + INTEL_GPP(5, 97, 101, 97), /* WESTC_DFX */ 297 + INTEL_GPP(6, 102, 111, 102), /* WESTA */ 298 + INTEL_GPP(7, 112, 123, 112), /* WESTB */ 299 + INTEL_GPP(8, 124, 143, 124), /* WESTD */ 300 + INTEL_GPP(9, 144, 144, 144), /* WESTD_PECI */ 301 + INTEL_GPP(10, 145, 167, 145), /* WESTF */ 295 302 }; 296 303 297 304 static const struct intel_padgroup cdf_community1_gpps[] = { 298 - CDF_GPP(0, 168, 191), /* EAST2 */ 299 - CDF_GPP(1, 192, 202), /* EAST3 */ 300 - CDF_GPP(2, 203, 225), /* EAST0 */ 301 - CDF_GPP(3, 226, 236), /* EMMC */ 305 + INTEL_GPP(0, 168, 191, 168), /* EAST2 */ 306 + INTEL_GPP(1, 192, 202, 192), /* EAST3 */ 307 + INTEL_GPP(2, 203, 225, 203), /* EAST0 */ 308 + INTEL_GPP(3, 226, 236, 226), /* EMMC */ 302 309 }; 303 310 304 311 static const struct intel_community cdf_communities[] = {
+27 -59
drivers/pinctrl/intel/pinctrl-cherryview.c
··· 92 92 93 93 #define PINMODE(m, i) ((m) | ((i) * PINMODE_INVERT_OE)) 94 94 95 - #define CHV_GPP(start, end) \ 96 - { \ 97 - .base = (start), \ 98 - .size = (end) - (start) + 1, \ 99 - } 100 - 101 95 #define CHV_COMMUNITY(g, i, a) \ 102 96 { \ 103 97 .gpps = (g), \ ··· 252 258 }; 253 259 254 260 static const struct intel_padgroup southwest_gpps[] = { 255 - CHV_GPP(0, 7), 256 - CHV_GPP(15, 22), 257 - CHV_GPP(30, 37), 258 - CHV_GPP(45, 52), 259 - CHV_GPP(60, 67), 260 - CHV_GPP(75, 82), 261 - CHV_GPP(90, 97), 261 + INTEL_GPP(0, 0, 7, 0), 262 + INTEL_GPP(1, 15, 22, 15), 263 + INTEL_GPP(2, 30, 37, 30), 264 + INTEL_GPP(3, 45, 52, 45), 265 + INTEL_GPP(4, 60, 67, 60), 266 + INTEL_GPP(5, 75, 82, 75), 267 + INTEL_GPP(6, 90, 97, 90), 262 268 }; 263 269 264 270 /* ··· 348 354 }; 349 355 350 356 static const struct intel_padgroup north_gpps[] = { 351 - CHV_GPP(0, 8), 352 - CHV_GPP(15, 27), 353 - CHV_GPP(30, 41), 354 - CHV_GPP(45, 56), 355 - CHV_GPP(60, 72), 357 + INTEL_GPP(0, 0, 8, 0), 358 + INTEL_GPP(1, 15, 27, 15), 359 + INTEL_GPP(2, 30, 41, 30), 360 + INTEL_GPP(3, 45, 56, 45), 361 + INTEL_GPP(4, 60, 72, 60), 356 362 }; 357 363 358 364 /* ··· 400 406 }; 401 407 402 408 static const struct intel_padgroup east_gpps[] = { 403 - CHV_GPP(0, 11), 404 - CHV_GPP(15, 26), 409 + INTEL_GPP(0, 0, 11, 0), 410 + INTEL_GPP(1, 15, 26, 15), 405 411 }; 406 412 407 413 static const struct intel_community east_communities[] = { ··· 520 526 }; 521 527 522 528 static const struct intel_padgroup southeast_gpps[] = { 523 - CHV_GPP(0, 7), 524 - CHV_GPP(15, 26), 525 - CHV_GPP(30, 35), 526 - CHV_GPP(45, 52), 527 - CHV_GPP(60, 69), 528 - CHV_GPP(75, 85), 529 + INTEL_GPP(0, 0, 7, 0), 530 + INTEL_GPP(1, 15, 26, 15), 531 + INTEL_GPP(2, 30, 35, 30), 532 + INTEL_GPP(3, 45, 52, 45), 533 + INTEL_GPP(4, 60, 69, 60), 534 + INTEL_GPP(5, 75, 85, 75), 529 535 }; 530 536 531 537 static const struct intel_community southeast_communities[] = { ··· 1511 1517 return 0; 1512 1518 } 1513 1519 1514 - static int chv_gpio_add_pin_ranges(struct gpio_chip *chip) 1515 - { 1516 - struct intel_pinctrl *pctrl = gpiochip_get_data(chip); 1517 - struct device *dev = pctrl->dev; 1518 - const struct intel_community *community = &pctrl->communities[0]; 1519 - const struct intel_padgroup *gpp; 1520 - int ret, i; 1521 - 1522 - for (i = 0; i < community->ngpps; i++) { 1523 - gpp = &community->gpps[i]; 1524 - ret = gpiochip_add_pin_range(chip, dev_name(dev), gpp->base, gpp->base, gpp->size); 1525 - if (ret) { 1526 - dev_err(dev, "failed to add GPIO pin range\n"); 1527 - return ret; 1528 - } 1529 - } 1530 - 1531 - return 0; 1532 - } 1533 - 1534 1520 static int chv_gpio_probe(struct intel_pinctrl *pctrl, int irq) 1535 1521 { 1536 1522 const struct intel_community *community = &pctrl->communities[0]; ··· 1524 1550 1525 1551 chip->ngpio = pctrl->soc->pins[pctrl->soc->npins - 1].number + 1; 1526 1552 chip->label = dev_name(dev); 1527 - chip->add_pin_ranges = chv_gpio_add_pin_ranges; 1553 + chip->add_pin_ranges = intel_gpio_add_pin_ranges; 1528 1554 chip->parent = dev; 1529 1555 chip->base = -1; 1530 1556 ··· 1541 1567 chip->irq.init_valid_mask = chv_init_irq_valid_mask; 1542 1568 } else { 1543 1569 irq_base = devm_irq_alloc_descs(dev, -1, 0, pctrl->soc->npins, NUMA_NO_NODE); 1544 - if (irq_base < 0) { 1545 - dev_err(dev, "Failed to allocate IRQ numbers\n"); 1546 - return irq_base; 1547 - } 1570 + if (irq_base < 0) 1571 + return dev_err_probe(dev, irq_base, "failed to allocate IRQ numbers\n"); 1548 1572 } 1549 1573 1550 1574 ret = devm_gpiochip_add_data(dev, chip, pctrl); 1551 - if (ret) { 1552 - dev_err(dev, "Failed to register gpiochip\n"); 1553 - return ret; 1554 - } 1575 + if (ret) 1576 + return dev_err_probe(dev, ret, "failed to register gpiochip\n"); 1555 1577 1556 1578 if (!need_valid_mask) { 1557 1579 for (i = 0; i < community->ngpps; i++) { ··· 1643 1673 pctrl->pctldesc.npins = pctrl->soc->npins; 1644 1674 1645 1675 pctrl->pctldev = devm_pinctrl_register(dev, &pctrl->pctldesc, pctrl); 1646 - if (IS_ERR(pctrl->pctldev)) { 1647 - dev_err(dev, "failed to register pinctrl driver\n"); 1648 - return PTR_ERR(pctrl->pctldev); 1649 - } 1676 + if (IS_ERR(pctrl->pctldev)) 1677 + return dev_err_probe(dev, PTR_ERR(pctrl->pctldev), "failed to register pinctrl\n"); 1650 1678 1651 1679 ret = chv_gpio_probe(pctrl, irq); 1652 1680 if (ret)
+7 -14
drivers/pinctrl/intel/pinctrl-denverton.c
··· 21 21 #define DNV_GPI_IS 0x100 22 22 #define DNV_GPI_IE 0x120 23 23 24 - #define DNV_GPP(n, s, e) \ 25 - { \ 26 - .reg_num = (n), \ 27 - .base = (s), \ 28 - .size = ((e) - (s) + 1), \ 29 - } 30 - 31 24 #define DNV_COMMUNITY(b, s, e, g) \ 32 25 INTEL_COMMUNITY_GPPS(b, s, e, g, DNV) 33 26 ··· 215 222 }; 216 223 217 224 static const struct intel_padgroup dnv_north_gpps[] = { 218 - DNV_GPP(0, 0, 31), /* North ALL_0 */ 219 - DNV_GPP(1, 32, 40), /* North ALL_1 */ 225 + INTEL_GPP(0, 0, 31, 0), /* North ALL_0 */ 226 + INTEL_GPP(1, 32, 40, 32), /* North ALL_1 */ 220 227 }; 221 228 222 229 static const struct intel_padgroup dnv_south_gpps[] = { 223 - DNV_GPP(0, 41, 58), /* South DFX */ 224 - DNV_GPP(1, 59, 90), /* South GPP0_0 */ 225 - DNV_GPP(2, 91, 111), /* South GPP0_1 */ 226 - DNV_GPP(3, 112, 143), /* South GPP1_0 */ 227 - DNV_GPP(4, 144, 153), /* South GPP1_1 */ 230 + INTEL_GPP(0, 41, 58, 41), /* South DFX */ 231 + INTEL_GPP(1, 59, 90, 59), /* South GPP0_0 */ 232 + INTEL_GPP(2, 91, 111, 91), /* South GPP0_1 */ 233 + INTEL_GPP(3, 112, 143, 112), /* South GPP1_0 */ 234 + INTEL_GPP(4, 144, 153, 144), /* South GPP1_1 */ 228 235 }; 229 236 230 237 static const struct intel_community dnv_communities[] = {
+18 -25
drivers/pinctrl/intel/pinctrl-elkhartlake.c
··· 21 21 #define EHL_GPI_IS 0x100 22 22 #define EHL_GPI_IE 0x120 23 23 24 - #define EHL_GPP(r, s, e) \ 25 - { \ 26 - .reg_num = (r), \ 27 - .base = (s), \ 28 - .size = ((e) - (s) + 1), \ 29 - } 30 - 31 24 #define EHL_COMMUNITY(b, s, e, g) \ 32 25 INTEL_COMMUNITY_GPPS(b, s, e, g, EHL) 33 26 ··· 99 106 }; 100 107 101 108 static const struct intel_padgroup ehl_community0_gpps[] = { 102 - EHL_GPP(0, 0, 25), /* GPP_B */ 103 - EHL_GPP(1, 26, 41), /* GPP_T */ 104 - EHL_GPP(2, 42, 66), /* GPP_G */ 109 + INTEL_GPP(0, 0, 25, 0), /* GPP_B */ 110 + INTEL_GPP(1, 26, 41, 26), /* GPP_T */ 111 + INTEL_GPP(2, 42, 66, 42), /* GPP_G */ 105 112 }; 106 113 107 114 static const struct intel_community ehl_community0[] = { ··· 238 245 }; 239 246 240 247 static const struct intel_padgroup ehl_community1_gpps[] = { 241 - EHL_GPP(0, 0, 15), /* GPP_V */ 242 - EHL_GPP(1, 16, 39), /* GPP_H */ 243 - EHL_GPP(2, 40, 60), /* GPP_D */ 244 - EHL_GPP(3, 61, 84), /* GPP_U */ 245 - EHL_GPP(4, 85, 112), /* vGPIO */ 248 + INTEL_GPP(0, 0, 15, 0), /* GPP_V */ 249 + INTEL_GPP(1, 16, 39, 16), /* GPP_H */ 250 + INTEL_GPP(2, 40, 60, 40), /* GPP_D */ 251 + INTEL_GPP(3, 61, 84, 61), /* GPP_U */ 252 + INTEL_GPP(4, 85, 112, 85), /* vGPIO */ 246 253 }; 247 254 248 255 static const struct intel_community ehl_community1[] = { ··· 279 286 }; 280 287 281 288 static const struct intel_padgroup ehl_community2_gpps[] = { 282 - EHL_GPP(0, 0, 16), /* DSW */ 289 + INTEL_GPP(0, 0, 16, 0), /* DSW */ 283 290 }; 284 291 285 292 static const struct intel_community ehl_community2[] = { ··· 349 356 }; 350 357 351 358 static const struct intel_padgroup ehl_community3_gpps[] = { 352 - EHL_GPP(0, 0, 16), /* CPU */ 353 - EHL_GPP(1, 17, 18), /* GPP_S */ 354 - EHL_GPP(2, 19, 42), /* GPP_A */ 355 - EHL_GPP(3, 43, 46), /* vGPIO_3 */ 359 + INTEL_GPP(0, 0, 16, 0), /* CPU */ 360 + INTEL_GPP(1, 17, 18, 17), /* GPP_S */ 361 + INTEL_GPP(2, 19, 42, 19), /* GPP_A */ 362 + INTEL_GPP(3, 43, 46, 43), /* vGPIO_3 */ 356 363 }; 357 364 358 365 static const struct intel_community ehl_community3[] = { ··· 455 462 }; 456 463 457 464 static const struct intel_padgroup ehl_community4_gpps[] = { 458 - EHL_GPP(0, 0, 23), /* GPP_C */ 459 - EHL_GPP(1, 24, 48), /* GPP_F */ 460 - EHL_GPP(2, 49, 54), /* HVCMOS */ 461 - EHL_GPP(3, 55, 79), /* GPP_E */ 465 + INTEL_GPP(0, 0, 23, 0), /* GPP_C */ 466 + INTEL_GPP(1, 24, 48, 24), /* GPP_F */ 467 + INTEL_GPP(2, 49, 54, 49), /* HVCMOS */ 468 + INTEL_GPP(3, 55, 79, 55), /* GPP_E */ 462 469 }; 463 470 464 471 static const struct intel_community ehl_community4[] = { ··· 486 493 }; 487 494 488 495 static const struct intel_padgroup ehl_community5_gpps[] = { 489 - EHL_GPP(0, 0, 7), /* GPP_R */ 496 + INTEL_GPP(0, 0, 7, 0), /* GPP_R */ 490 497 }; 491 498 492 499 static const struct intel_community ehl_community5[] = {
+13 -20
drivers/pinctrl/intel/pinctrl-emmitsburg.c
··· 21 21 #define EBG_GPI_IS 0x200 22 22 #define EBG_GPI_IE 0x210 23 23 24 - #define EBG_GPP(r, s, e) \ 25 - { \ 26 - .reg_num = (r), \ 27 - .base = (s), \ 28 - .size = ((e) - (s) + 1), \ 29 - } 30 - 31 24 #define EBG_COMMUNITY(b, s, e, g) \ 32 25 INTEL_COMMUNITY_GPPS(b, s, e, g, EBG) 33 26 ··· 304 311 }; 305 312 306 313 static const struct intel_padgroup ebg_community0_gpps[] = { 307 - EBG_GPP(0, 0, 20), /* GPP_A */ 308 - EBG_GPP(1, 21, 44), /* GPP_B */ 309 - EBG_GPP(2, 45, 65), /* SPI */ 314 + INTEL_GPP(0, 0, 20, 0), /* GPP_A */ 315 + INTEL_GPP(1, 21, 44, 21), /* GPP_B */ 316 + INTEL_GPP(2, 45, 65, 45), /* SPI */ 310 317 }; 311 318 312 319 static const struct intel_padgroup ebg_community1_gpps[] = { 313 - EBG_GPP(0, 66, 87), /* GPP_C */ 314 - EBG_GPP(1, 88, 111), /* GPP_D */ 320 + INTEL_GPP(0, 66, 87, 66), /* GPP_C */ 321 + INTEL_GPP(1, 88, 111, 88), /* GPP_D */ 315 322 }; 316 323 317 324 static const struct intel_padgroup ebg_community3_gpps[] = { 318 - EBG_GPP(0, 112, 135), /* GPP_E */ 319 - EBG_GPP(1, 136, 145), /* JTAG */ 325 + INTEL_GPP(0, 112, 135, 112), /* GPP_E */ 326 + INTEL_GPP(1, 136, 145, 136), /* JTAG */ 320 327 }; 321 328 322 329 static const struct intel_padgroup ebg_community4_gpps[] = { 323 - EBG_GPP(0, 146, 165), /* GPP_H */ 324 - EBG_GPP(1, 166, 183), /* GPP_J */ 330 + INTEL_GPP(0, 146, 165, 146), /* GPP_H */ 331 + INTEL_GPP(1, 166, 183, 166), /* GPP_J */ 325 332 }; 326 333 327 334 static const struct intel_padgroup ebg_community5_gpps[] = { 328 - EBG_GPP(0, 184, 207), /* GPP_I */ 329 - EBG_GPP(1, 208, 225), /* GPP_L */ 330 - EBG_GPP(2, 226, 243), /* GPP_M */ 331 - EBG_GPP(3, 244, 261), /* GPP_N */ 335 + INTEL_GPP(0, 184, 207, 184), /* GPP_I */ 336 + INTEL_GPP(1, 208, 225, 208), /* GPP_L */ 337 + INTEL_GPP(2, 226, 243, 226), /* GPP_M */ 338 + INTEL_GPP(3, 244, 261, 244), /* GPP_N */ 332 339 }; 333 340 334 341 static const struct intel_community ebg_communities[] = {
+26 -34
drivers/pinctrl/intel/pinctrl-icelake.c
··· 28 28 #define ICL_N_GPI_IS 0x100 29 29 #define ICL_N_GPI_IE 0x120 30 30 31 - #define ICL_GPP(r, s, e, g) \ 32 - { \ 33 - .reg_num = (r), \ 34 - .base = (s), \ 35 - .size = ((e) - (s) + 1), \ 36 - .gpio_base = (g), \ 37 - } 38 - 39 31 #define ICL_LP_COMMUNITY(b, s, e, g) \ 40 32 INTEL_COMMUNITY_GPPS(b, s, e, g, ICL_LP) 41 33 ··· 294 302 }; 295 303 296 304 static const struct intel_padgroup icllp_community0_gpps[] = { 297 - ICL_GPP(0, 0, 7, 0), /* GPP_G */ 298 - ICL_GPP(1, 8, 33, 32), /* GPP_B */ 299 - ICL_GPP(2, 34, 58, 64), /* GPP_A */ 305 + INTEL_GPP(0, 0, 7, 0), /* GPP_G */ 306 + INTEL_GPP(1, 8, 33, 32), /* GPP_B */ 307 + INTEL_GPP(2, 34, 58, 64), /* GPP_A */ 300 308 }; 301 309 302 310 static const struct intel_padgroup icllp_community1_gpps[] = { 303 - ICL_GPP(0, 59, 82, 96), /* GPP_H */ 304 - ICL_GPP(1, 83, 103, 128), /* GPP_D */ 305 - ICL_GPP(2, 104, 123, 160), /* GPP_F */ 306 - ICL_GPP(3, 124, 152, 192), /* vGPIO */ 311 + INTEL_GPP(0, 59, 82, 96), /* GPP_H */ 312 + INTEL_GPP(1, 83, 103, 128), /* GPP_D */ 313 + INTEL_GPP(2, 104, 123, 160), /* GPP_F */ 314 + INTEL_GPP(3, 124, 152, 192), /* vGPIO */ 307 315 }; 308 316 309 317 static const struct intel_padgroup icllp_community4_gpps[] = { 310 - ICL_GPP(0, 153, 176, 224), /* GPP_C */ 311 - ICL_GPP(1, 177, 182, INTEL_GPIO_BASE_NOMAP), /* HVCMOS */ 312 - ICL_GPP(2, 183, 206, 256), /* GPP_E */ 313 - ICL_GPP(3, 207, 215, INTEL_GPIO_BASE_NOMAP), /* JTAG */ 318 + INTEL_GPP(0, 153, 176, 224), /* GPP_C */ 319 + INTEL_GPP(1, 177, 182, INTEL_GPIO_BASE_NOMAP), /* HVCMOS */ 320 + INTEL_GPP(2, 183, 206, 256), /* GPP_E */ 321 + INTEL_GPP(3, 207, 215, INTEL_GPIO_BASE_NOMAP), /* JTAG */ 314 322 }; 315 323 316 324 static const struct intel_padgroup icllp_community5_gpps[] = { 317 - ICL_GPP(0, 216, 223, 288), /* GPP_R */ 318 - ICL_GPP(1, 224, 231, 320), /* GPP_S */ 319 - ICL_GPP(2, 232, 240, INTEL_GPIO_BASE_NOMAP), /* SPI */ 325 + INTEL_GPP(0, 216, 223, 288), /* GPP_R */ 326 + INTEL_GPP(1, 224, 231, 320), /* GPP_S */ 327 + INTEL_GPP(2, 232, 240, INTEL_GPIO_BASE_NOMAP), /* SPI */ 320 328 }; 321 329 322 330 static const struct intel_community icllp_communities[] = { ··· 624 632 }; 625 633 626 634 static const struct intel_padgroup icln_community0_gpps[] = { 627 - ICL_GPP(0, 0, 8, INTEL_GPIO_BASE_NOMAP), /* SPI */ 628 - ICL_GPP(1, 9, 34, 32), /* GPP_B */ 629 - ICL_GPP(2, 35, 55, 64), /* GPP_A */ 630 - ICL_GPP(3, 56, 63, 96), /* GPP_S */ 631 - ICL_GPP(4, 64, 71, 128), /* GPP_R */ 635 + INTEL_GPP(0, 0, 8, INTEL_GPIO_BASE_NOMAP), /* SPI */ 636 + INTEL_GPP(1, 9, 34, 32), /* GPP_B */ 637 + INTEL_GPP(2, 35, 55, 64), /* GPP_A */ 638 + INTEL_GPP(3, 56, 63, 96), /* GPP_S */ 639 + INTEL_GPP(4, 64, 71, 128), /* GPP_R */ 632 640 }; 633 641 634 642 static const struct intel_padgroup icln_community1_gpps[] = { 635 - ICL_GPP(0, 72, 95, 160), /* GPP_H */ 636 - ICL_GPP(1, 96, 121, 192), /* GPP_D */ 637 - ICL_GPP(2, 122, 150, 224), /* vGPIO */ 638 - ICL_GPP(3, 151, 174, 256), /* GPP_C */ 643 + INTEL_GPP(0, 72, 95, 160), /* GPP_H */ 644 + INTEL_GPP(1, 96, 121, 192), /* GPP_D */ 645 + INTEL_GPP(2, 122, 150, 224), /* vGPIO */ 646 + INTEL_GPP(3, 151, 174, 256), /* GPP_C */ 639 647 }; 640 648 641 649 static const struct intel_padgroup icln_community4_gpps[] = { 642 - ICL_GPP(0, 175, 180, INTEL_GPIO_BASE_NOMAP), /* HVCMOS */ 643 - ICL_GPP(1, 181, 204, 288), /* GPP_E */ 650 + INTEL_GPP(0, 175, 180, INTEL_GPIO_BASE_NOMAP), /* HVCMOS */ 651 + INTEL_GPP(1, 181, 204, 288), /* GPP_E */ 644 652 }; 645 653 646 654 static const struct intel_padgroup icln_community5_gpps[] = { 647 - ICL_GPP(0, 205, 212, INTEL_GPIO_BASE_ZERO), /* GPP_G */ 655 + INTEL_GPP(0, 205, 212, INTEL_GPIO_BASE_ZERO), /* GPP_G */ 648 656 }; 649 657 650 658 static const struct intel_community icln_communities[] = {
+19 -17
drivers/pinctrl/intel/pinctrl-intel.c
··· 1345 1345 return 0; 1346 1346 } 1347 1347 1348 - static int intel_gpio_add_pin_ranges(struct gpio_chip *gc) 1348 + /** 1349 + * intel_gpio_add_pin_ranges - add GPIO pin ranges for all groups in all communities 1350 + * @gc: GPIO chip structure 1351 + * 1352 + * This function iterates over all communities and all groups and adds the respective 1353 + * GPIO pin ranges, so the GPIO library will correctly map a GPIO offset to a pin number. 1354 + * 1355 + * Return: 0, or negative error code if range can't be added. 1356 + */ 1357 + int intel_gpio_add_pin_ranges(struct gpio_chip *gc) 1349 1358 { 1350 1359 struct intel_pinctrl *pctrl = gpiochip_get_data(gc); 1351 1360 const struct intel_community *community; ··· 1365 1356 ret = gpiochip_add_pin_range(&pctrl->chip, dev_name(pctrl->dev), 1366 1357 grp->gpio_base, grp->base, 1367 1358 grp->size); 1368 - if (ret) { 1369 - dev_err(pctrl->dev, "failed to add GPIO pin range\n"); 1370 - return ret; 1371 - } 1359 + if (ret) 1360 + return dev_err_probe(pctrl->dev, ret, "failed to add GPIO pin range\n"); 1372 1361 } 1373 1362 1374 1363 return 0; 1375 1364 } 1365 + EXPORT_SYMBOL_NS_GPL(intel_gpio_add_pin_ranges, "PINCTRL_INTEL"); 1376 1366 1377 1367 static unsigned int intel_gpio_ngpio(const struct intel_pinctrl *pctrl) 1378 1368 { ··· 1409 1401 ret = devm_request_irq(pctrl->dev, irq, intel_gpio_irq, 1410 1402 IRQF_SHARED | IRQF_NO_THREAD, 1411 1403 dev_name(pctrl->dev), pctrl); 1412 - if (ret) { 1413 - dev_err(pctrl->dev, "failed to request interrupt\n"); 1414 - return ret; 1415 - } 1404 + if (ret) 1405 + return dev_err_probe(pctrl->dev, ret, "failed to request interrupt\n"); 1416 1406 1417 1407 /* Setup IRQ chip */ 1418 1408 girq = &pctrl->chip.irq; ··· 1423 1417 girq->init_hw = intel_gpio_irq_init_hw; 1424 1418 1425 1419 ret = devm_gpiochip_add_data(pctrl->dev, &pctrl->chip, pctrl); 1426 - if (ret) { 1427 - dev_err(pctrl->dev, "failed to register gpiochip\n"); 1428 - return ret; 1429 - } 1420 + if (ret) 1421 + return dev_err_probe(pctrl->dev, ret, "failed to register gpiochip\n"); 1430 1422 1431 1423 return 0; 1432 1424 } ··· 1672 1668 pctrl->pctldesc.npins = pctrl->soc->npins; 1673 1669 1674 1670 pctrl->pctldev = devm_pinctrl_register(dev, &pctrl->pctldesc, pctrl); 1675 - if (IS_ERR(pctrl->pctldev)) { 1676 - dev_err(dev, "failed to register pinctrl driver\n"); 1677 - return PTR_ERR(pctrl->pctldev); 1678 - } 1671 + if (IS_ERR(pctrl->pctldev)) 1672 + return dev_err_probe(dev, PTR_ERR(pctrl->pctldev), "failed to register pinctrl\n"); 1679 1673 1680 1674 ret = intel_gpio_probe(pctrl, irq); 1681 1675 if (ret)
+11
drivers/pinctrl/intel/pinctrl-intel.h
··· 76 76 INTEL_GPIO_BASE_MATCH = 0, 77 77 }; 78 78 79 + /* Initialise struct intel_padgroup */ 80 + #define INTEL_GPP(r, s, e, g) \ 81 + { \ 82 + .reg_num = (r), \ 83 + .base = (s), \ 84 + .size = ((e) - (s) + 1), \ 85 + .gpio_base = (g), \ 86 + } 87 + 79 88 /** 80 89 * struct intel_community - Intel pin community description 81 90 * @barno: MMIO BAR number where registers for this community reside ··· 275 266 276 267 const struct intel_community *intel_get_community(const struct intel_pinctrl *pctrl, 277 268 unsigned int pin); 269 + 270 + int intel_gpio_add_pin_ranges(struct gpio_chip *gc); 278 271 279 272 int intel_get_groups_count(struct pinctrl_dev *pctldev); 280 273 const char *intel_get_group_name(struct pinctrl_dev *pctldev, unsigned int group);
+13 -21
drivers/pinctrl/intel/pinctrl-jasperlake.c
··· 21 21 #define JSL_GPI_IS 0x100 22 22 #define JSL_GPI_IE 0x120 23 23 24 - #define JSL_GPP(r, s, e, g) \ 25 - { \ 26 - .reg_num = (r), \ 27 - .base = (s), \ 28 - .size = ((e) - (s) + 1), \ 29 - .gpio_base = (g), \ 30 - } 31 - 32 24 #define JSL_COMMUNITY(b, s, e, g) \ 33 25 INTEL_COMMUNITY_GPPS(b, s, e, g, JSL) 34 26 ··· 275 283 }; 276 284 277 285 static const struct intel_padgroup jsl_community0_gpps[] = { 278 - JSL_GPP(0, 0, 19, 320), /* GPP_F */ 279 - JSL_GPP(1, 20, 28, INTEL_GPIO_BASE_NOMAP), /* SPI */ 280 - JSL_GPP(2, 29, 54, 32), /* GPP_B */ 281 - JSL_GPP(3, 55, 75, 64), /* GPP_A */ 282 - JSL_GPP(4, 76, 83, 96), /* GPP_S */ 283 - JSL_GPP(5, 84, 91, 128), /* GPP_R */ 286 + INTEL_GPP(0, 0, 19, 320), /* GPP_F */ 287 + INTEL_GPP(1, 20, 28, INTEL_GPIO_BASE_NOMAP), /* SPI */ 288 + INTEL_GPP(2, 29, 54, 32), /* GPP_B */ 289 + INTEL_GPP(3, 55, 75, 64), /* GPP_A */ 290 + INTEL_GPP(4, 76, 83, 96), /* GPP_S */ 291 + INTEL_GPP(5, 84, 91, 128), /* GPP_R */ 284 292 }; 285 293 286 294 static const struct intel_padgroup jsl_community1_gpps[] = { 287 - JSL_GPP(0, 92, 115, 160), /* GPP_H */ 288 - JSL_GPP(1, 116, 141, 192), /* GPP_D */ 289 - JSL_GPP(2, 142, 170, 224), /* vGPIO */ 290 - JSL_GPP(3, 171, 194, 256), /* GPP_C */ 295 + INTEL_GPP(0, 92, 115, 160), /* GPP_H */ 296 + INTEL_GPP(1, 116, 141, 192), /* GPP_D */ 297 + INTEL_GPP(2, 142, 170, 224), /* vGPIO */ 298 + INTEL_GPP(3, 171, 194, 256), /* GPP_C */ 291 299 }; 292 300 293 301 static const struct intel_padgroup jsl_community4_gpps[] = { 294 - JSL_GPP(0, 195, 200, INTEL_GPIO_BASE_NOMAP), /* HVCMOS */ 295 - JSL_GPP(1, 201, 224, 288), /* GPP_E */ 302 + INTEL_GPP(0, 195, 200, INTEL_GPIO_BASE_NOMAP), /* HVCMOS */ 303 + INTEL_GPP(1, 201, 224, 288), /* GPP_E */ 296 304 }; 297 305 298 306 static const struct intel_padgroup jsl_community5_gpps[] = { 299 - JSL_GPP(0, 225, 232, INTEL_GPIO_BASE_ZERO), /* GPP_G */ 307 + INTEL_GPP(0, 225, 232, INTEL_GPIO_BASE_ZERO), /* GPP_G */ 300 308 }; 301 309 302 310 static const struct intel_community jsl_communities[] = {
+9 -17
drivers/pinctrl/intel/pinctrl-lakefield.c
··· 21 21 #define LKF_GPI_IS 0x100 22 22 #define LKF_GPI_IE 0x110 23 23 24 - #define LKF_GPP(r, s, e, g) \ 25 - { \ 26 - .reg_num = (r), \ 27 - .base = (s), \ 28 - .size = ((e) - (s) + 1), \ 29 - .gpio_base = (g), \ 30 - } 31 - 32 24 #define LKF_COMMUNITY(b, s, e, g) \ 33 25 INTEL_COMMUNITY_GPPS(b, s, e, g, LKF) 34 26 ··· 300 308 }; 301 309 302 310 static const struct intel_padgroup lkf_community0_gpps[] = { 303 - LKF_GPP(0, 0, 31, 0), /* EAST_0 */ 304 - LKF_GPP(1, 32, 59, 32), /* EAST_1 */ 311 + INTEL_GPP(0, 0, 31, 0), /* EAST_0 */ 312 + INTEL_GPP(1, 32, 59, 32), /* EAST_1 */ 305 313 }; 306 314 307 315 static const struct intel_padgroup lkf_community1_gpps[] = { 308 - LKF_GPP(0, 60, 91, 64), /* NORTHWEST_0 */ 309 - LKF_GPP(1, 92, 123, 96), /* NORTHWEST_1 */ 310 - LKF_GPP(2, 124, 148, 128), /* NORTHWEST_2 */ 316 + INTEL_GPP(0, 60, 91, 64), /* NORTHWEST_0 */ 317 + INTEL_GPP(1, 92, 123, 96), /* NORTHWEST_1 */ 318 + INTEL_GPP(2, 124, 148, 128), /* NORTHWEST_2 */ 311 319 }; 312 320 313 321 static const struct intel_padgroup lkf_community2_gpps[] = { 314 - LKF_GPP(0, 149, 180, 160), /* WEST_0 */ 315 - LKF_GPP(1, 181, 212, 192), /* WEST_1 */ 316 - LKF_GPP(2, 213, 237, 224), /* WEST_2 */ 322 + INTEL_GPP(0, 149, 180, 160), /* WEST_0 */ 323 + INTEL_GPP(1, 181, 212, 192), /* WEST_1 */ 324 + INTEL_GPP(2, 213, 237, 224), /* WEST_2 */ 317 325 }; 318 326 319 327 static const struct intel_padgroup lkf_community3_gpps[] = { 320 - LKF_GPP(0, 238, 266, 256), /* SOUTHEAST */ 328 + INTEL_GPP(0, 238, 266, 256), /* SOUTHEAST */ 321 329 }; 322 330 323 331 static const struct intel_community lkf_communities[] = {
+10 -18
drivers/pinctrl/intel/pinctrl-lynxpoint.c
··· 700 700 701 701 ret = gpiochip_add_pin_range(chip, dev_name(dev), 0, 0, lg->soc->npins); 702 702 if (ret) 703 - dev_err(dev, "failed to add GPIO pin range\n"); 703 + return dev_err_probe(dev, ret, "failed to add GPIO pin range\n"); 704 704 705 - return ret; 705 + return 0; 706 706 } 707 707 708 708 static int lp_gpio_probe(struct platform_device *pdev) ··· 739 739 lg->pctldesc.npins = lg->soc->npins; 740 740 741 741 lg->pctldev = devm_pinctrl_register(dev, &lg->pctldesc, lg); 742 - if (IS_ERR(lg->pctldev)) { 743 - dev_err(dev, "failed to register pinctrl driver\n"); 744 - return PTR_ERR(lg->pctldev); 745 - } 742 + if (IS_ERR(lg->pctldev)) 743 + return dev_err_probe(dev, PTR_ERR(lg->pctldev), "failed to register pinctrl\n"); 746 744 747 745 platform_set_drvdata(pdev, lg); 748 746 749 747 io_rc = platform_get_resource(pdev, IORESOURCE_IO, 0); 750 - if (!io_rc) { 751 - dev_err(dev, "missing IO resources\n"); 752 - return -EINVAL; 753 - } 748 + if (!io_rc) 749 + return dev_err_probe(dev, -EINVAL, "missing IO resources\n"); 754 750 755 751 regs = devm_ioport_map(dev, io_rc->start, resource_size(io_rc)); 756 - if (!regs) { 757 - dev_err(dev, "failed mapping IO region %pR\n", &io_rc); 758 - return -EBUSY; 759 - } 752 + if (!regs) 753 + return dev_err_probe(dev, -EBUSY, "failed mapping IO region %pR\n", &io_rc); 760 754 761 755 for (i = 0; i < lg->soc->ncommunities; i++) { 762 756 struct intel_community *comm = &lg->communities[i]; ··· 801 807 } 802 808 803 809 ret = devm_gpiochip_add_data(dev, gc, lg); 804 - if (ret) { 805 - dev_err(dev, "failed adding lp-gpio chip\n"); 806 - return ret; 807 - } 810 + if (ret) 811 + return dev_err_probe(dev, ret, "failed to register gpiochip\n"); 808 812 809 813 return 0; 810 814 }
+23 -31
drivers/pinctrl/intel/pinctrl-meteorlake.c
··· 27 27 #define MTL_S_GPI_IS 0x200 28 28 #define MTL_S_GPI_IE 0x210 29 29 30 - #define MTL_GPP(r, s, e, g) \ 31 - { \ 32 - .reg_num = (r), \ 33 - .base = (s), \ 34 - .size = ((e) - (s) + 1), \ 35 - .gpio_base = (g), \ 36 - } 37 - 38 30 #define MTL_P_COMMUNITY(b, s, e, g) \ 39 31 INTEL_COMMUNITY_GPPS(b, s, e, g, MTL_P) 40 32 ··· 341 349 }; 342 350 343 351 static const struct intel_padgroup mtlp_community0_gpps[] = { 344 - MTL_GPP(0, 0, 4, 0), /* CPU */ 345 - MTL_GPP(1, 5, 28, 32), /* GPP_V */ 346 - MTL_GPP(2, 29, 52, 64), /* GPP_C */ 352 + INTEL_GPP(0, 0, 4, 0), /* CPU */ 353 + INTEL_GPP(1, 5, 28, 32), /* GPP_V */ 354 + INTEL_GPP(2, 29, 52, 64), /* GPP_C */ 347 355 }; 348 356 349 357 static const struct intel_padgroup mtlp_community1_gpps[] = { 350 - MTL_GPP(0, 53, 77, 96), /* GPP_A */ 351 - MTL_GPP(1, 78, 102, 128), /* GPP_E */ 358 + INTEL_GPP(0, 53, 77, 96), /* GPP_A */ 359 + INTEL_GPP(1, 78, 102, 128), /* GPP_E */ 352 360 }; 353 361 354 362 static const struct intel_padgroup mtlp_community3_gpps[] = { 355 - MTL_GPP(0, 103, 128, 160), /* GPP_H */ 356 - MTL_GPP(1, 129, 154, 192), /* GPP_F */ 357 - MTL_GPP(2, 155, 169, 224), /* SPI0 */ 358 - MTL_GPP(3, 170, 183, 256), /* vGPIO_3 */ 363 + INTEL_GPP(0, 103, 128, 160), /* GPP_H */ 364 + INTEL_GPP(1, 129, 154, 192), /* GPP_F */ 365 + INTEL_GPP(2, 155, 169, 224), /* SPI0 */ 366 + INTEL_GPP(3, 170, 183, 256), /* vGPIO_3 */ 359 367 }; 360 368 361 369 static const struct intel_padgroup mtlp_community4_gpps[] = { 362 - MTL_GPP(0, 184, 191, 288), /* GPP_S */ 363 - MTL_GPP(1, 192, 203, 320), /* JTAG */ 370 + INTEL_GPP(0, 184, 191, 288), /* GPP_S */ 371 + INTEL_GPP(1, 192, 203, 320), /* JTAG */ 364 372 }; 365 373 366 374 static const struct intel_padgroup mtlp_community5_gpps[] = { 367 - MTL_GPP(0, 204, 228, 352), /* GPP_B */ 368 - MTL_GPP(1, 229, 253, 384), /* GPP_D */ 369 - MTL_GPP(2, 254, 285, 416), /* vGPIO_0 */ 370 - MTL_GPP(3, 286, 288, 448), /* vGPIO_1 */ 375 + INTEL_GPP(0, 204, 228, 352), /* GPP_B */ 376 + INTEL_GPP(1, 229, 253, 384), /* GPP_D */ 377 + INTEL_GPP(2, 254, 285, 416), /* vGPIO_0 */ 378 + INTEL_GPP(3, 286, 288, 448), /* vGPIO_1 */ 371 379 }; 372 380 373 381 static const struct intel_community mtlp_communities[] = { ··· 546 554 }; 547 555 548 556 static const struct intel_padgroup mtls_community0_gpps[] = { 549 - MTL_GPP(0, 0, 27, 0), /* GPP_A */ 550 - MTL_GPP(1, 28, 46, 32), /* vGPIO_0 */ 551 - MTL_GPP(2, 47, 73, 64), /* GPP_C */ 557 + INTEL_GPP(0, 0, 27, 0), /* GPP_A */ 558 + INTEL_GPP(1, 28, 46, 32), /* vGPIO_0 */ 559 + INTEL_GPP(2, 47, 73, 64), /* GPP_C */ 552 560 }; 553 561 554 562 static const struct intel_padgroup mtls_community1_gpps[] = { 555 - MTL_GPP(0, 74, 93, 96), /* GPP_B */ 556 - MTL_GPP(1, 94, 95, 128), /* vGPIO_3 */ 557 - MTL_GPP(2, 96, 119, 160), /* GPP_D */ 563 + INTEL_GPP(0, 74, 93, 96), /* GPP_B */ 564 + INTEL_GPP(1, 94, 95, 128), /* vGPIO_3 */ 565 + INTEL_GPP(2, 96, 119, 160), /* GPP_D */ 558 566 }; 559 567 560 568 static const struct intel_padgroup mtls_community3_gpps[] = { 561 - MTL_GPP(0, 120, 135, 192), /* JTAG_CPU */ 562 - MTL_GPP(1, 136, 147, 224), /* vGPIO_4 */ 569 + INTEL_GPP(0, 120, 135, 192), /* JTAG_CPU */ 570 + INTEL_GPP(1, 136, 147, 224), /* vGPIO_4 */ 563 571 }; 564 572 565 573 static const struct intel_community mtls_communities[] = {
+19 -27
drivers/pinctrl/intel/pinctrl-meteorpoint.c
··· 21 21 #define MTP_GPI_IS 0x200 22 22 #define MTP_GPI_IE 0x220 23 23 24 - #define MTP_GPP(r, s, e, g) \ 25 - { \ 26 - .reg_num = (r), \ 27 - .base = (s), \ 28 - .size = ((e) - (s) + 1), \ 29 - .gpio_base = (g), \ 30 - } 31 - 32 24 #define MTP_COMMUNITY(b, s, e, g) \ 33 25 INTEL_COMMUNITY_GPPS(b, s, e, g, MTP) 34 26 ··· 387 395 }; 388 396 389 397 static const struct intel_padgroup mtps_community0_gpps[] = { 390 - MTP_GPP(0, 0, 24, 0), /* GPP_D */ 391 - MTP_GPP(1, 25, 38, 32), /* GPP_R */ 392 - MTP_GPP(2, 39, 56, 64), /* GPP_J */ 393 - MTP_GPP(3, 57, 87, 96), /* vGPIO */ 398 + INTEL_GPP(0, 0, 24, 0), /* GPP_D */ 399 + INTEL_GPP(1, 25, 38, 32), /* GPP_R */ 400 + INTEL_GPP(2, 39, 56, 64), /* GPP_J */ 401 + INTEL_GPP(3, 57, 87, 96), /* vGPIO */ 394 402 }; 395 403 396 404 static const struct intel_padgroup mtps_community1_gpps[] = { 397 - MTP_GPP(0, 88, 102, 128), /* GPP_A */ 398 - MTP_GPP(1, 103, 114, 160), /* DIR_ESPI */ 399 - MTP_GPP(2, 115, 136, 192), /* GPP_B */ 405 + INTEL_GPP(0, 88, 102, 128), /* GPP_A */ 406 + INTEL_GPP(1, 103, 114, 160), /* DIR_ESPI */ 407 + INTEL_GPP(2, 115, 136, 192), /* GPP_B */ 400 408 }; 401 409 402 410 static const struct intel_padgroup mtps_community3_gpps[] = { 403 - MTP_GPP(0, 137, 145, 224), /* SPI0 */ 404 - MTP_GPP(1, 146, 169, 256), /* GPP_C */ 405 - MTP_GPP(2, 170, 189, 288), /* GPP_H */ 406 - MTP_GPP(3, 190, 193, 320), /* vGPIO_3 */ 407 - MTP_GPP(4, 194, 201, 352), /* vGPIO_0 */ 408 - MTP_GPP(5, 202, 232, 384), /* vGPIO_4 */ 411 + INTEL_GPP(0, 137, 145, 224), /* SPI0 */ 412 + INTEL_GPP(1, 146, 169, 256), /* GPP_C */ 413 + INTEL_GPP(2, 170, 189, 288), /* GPP_H */ 414 + INTEL_GPP(3, 190, 193, 320), /* vGPIO_3 */ 415 + INTEL_GPP(4, 194, 201, 352), /* vGPIO_0 */ 416 + INTEL_GPP(5, 202, 232, 384), /* vGPIO_4 */ 409 417 }; 410 418 411 419 static const struct intel_padgroup mtps_community4_gpps[] = { 412 - MTP_GPP(0, 233, 240, 416), /* GPP_S */ 413 - MTP_GPP(1, 241, 263, 448), /* GPP_E */ 414 - MTP_GPP(2, 264, 277, 480), /* GPP_K */ 415 - MTP_GPP(3, 278, 301, 512), /* GPP_F */ 420 + INTEL_GPP(0, 233, 240, 416), /* GPP_S */ 421 + INTEL_GPP(1, 241, 263, 448), /* GPP_E */ 422 + INTEL_GPP(2, 264, 277, 480), /* GPP_K */ 423 + INTEL_GPP(3, 278, 301, 512), /* GPP_F */ 416 424 }; 417 425 418 426 static const struct intel_padgroup mtps_community5_gpps[] = { 419 - MTP_GPP(0, 302, 322, 544), /* GPP_I */ 420 - MTP_GPP(1, 323, 338, 576), /* JTAG_CPU */ 427 + INTEL_GPP(0, 302, 322, 544), /* GPP_I */ 428 + INTEL_GPP(1, 323, 338, 576), /* JTAG_CPU */ 421 429 }; 422 430 423 431 static const struct intel_community mtps_communities[] = {
+9 -17
drivers/pinctrl/intel/pinctrl-sunrisepoint.c
··· 28 28 #define SPT_LP_GPI_IS 0x100 29 29 #define SPT_LP_GPI_IE 0x120 30 30 31 - #define SPT_H_GPP(r, s, e, g) \ 32 - { \ 33 - .reg_num = (r), \ 34 - .base = (s), \ 35 - .size = ((e) - (s) + 1), \ 36 - .gpio_base = (g), \ 37 - } 38 - 39 31 #define SPT_H_COMMUNITY(b, s, e, g) \ 40 32 INTEL_COMMUNITY_GPPS(b, s, e, g, SPT_H) 41 33 ··· 530 538 }; 531 539 532 540 static const struct intel_padgroup spth_community0_gpps[] = { 533 - SPT_H_GPP(0, 0, 23, 0), /* GPP_A */ 534 - SPT_H_GPP(1, 24, 47, 24), /* GPP_B */ 541 + INTEL_GPP(0, 0, 23, 0), /* GPP_A */ 542 + INTEL_GPP(1, 24, 47, 24), /* GPP_B */ 535 543 }; 536 544 537 545 static const struct intel_padgroup spth_community1_gpps[] = { 538 - SPT_H_GPP(0, 48, 71, 48), /* GPP_C */ 539 - SPT_H_GPP(1, 72, 95, 72), /* GPP_D */ 540 - SPT_H_GPP(2, 96, 108, 96), /* GPP_E */ 541 - SPT_H_GPP(3, 109, 132, 120), /* GPP_F */ 542 - SPT_H_GPP(4, 133, 156, 144), /* GPP_G */ 543 - SPT_H_GPP(5, 157, 180, 168), /* GPP_H */ 546 + INTEL_GPP(0, 48, 71, 48), /* GPP_C */ 547 + INTEL_GPP(1, 72, 95, 72), /* GPP_D */ 548 + INTEL_GPP(2, 96, 108, 96), /* GPP_E */ 549 + INTEL_GPP(3, 109, 132, 120), /* GPP_F */ 550 + INTEL_GPP(4, 133, 156, 144), /* GPP_G */ 551 + INTEL_GPP(5, 157, 180, 168), /* GPP_H */ 544 552 }; 545 553 546 554 static const struct intel_padgroup spth_community3_gpps[] = { 547 - SPT_H_GPP(0, 181, 191, 192), /* GPP_I */ 555 + INTEL_GPP(0, 181, 191, 192), /* GPP_I */ 548 556 }; 549 557 550 558 static const struct intel_community spth_communities[] = {
+1 -2
drivers/pinctrl/intel/pinctrl-tangier.c
··· 562 562 563 563 tp->pctldev = devm_pinctrl_register(dev, &tp->pctldesc, tp); 564 564 if (IS_ERR(tp->pctldev)) 565 - return dev_err_probe(dev, PTR_ERR(tp->pctldev), 566 - "failed to register pinctrl driver\n"); 565 + return dev_err_probe(dev, PTR_ERR(tp->pctldev), "failed to register pinctrl\n"); 567 566 568 567 return 0; 569 568 }
+31 -39
drivers/pinctrl/intel/pinctrl-tigerlake.c
··· 28 28 #define TGL_H_GPI_IS 0x100 29 29 #define TGL_H_GPI_IE 0x120 30 30 31 - #define TGL_GPP(r, s, e, g) \ 32 - { \ 33 - .reg_num = (r), \ 34 - .base = (s), \ 35 - .size = ((e) - (s) + 1), \ 36 - .gpio_base = (g), \ 37 - } 38 - 39 31 #define TGL_LP_COMMUNITY(b, s, e, g) \ 40 32 INTEL_COMMUNITY_GPPS(b, s, e, g, TGL_LP) 41 33 ··· 331 339 }; 332 340 333 341 static const struct intel_padgroup tgllp_community0_gpps[] = { 334 - TGL_GPP(0, 0, 25, 0), /* GPP_B */ 335 - TGL_GPP(1, 26, 41, 32), /* GPP_T */ 336 - TGL_GPP(2, 42, 66, 64), /* GPP_A */ 342 + INTEL_GPP(0, 0, 25, 0), /* GPP_B */ 343 + INTEL_GPP(1, 26, 41, 32), /* GPP_T */ 344 + INTEL_GPP(2, 42, 66, 64), /* GPP_A */ 337 345 }; 338 346 339 347 static const struct intel_padgroup tgllp_community1_gpps[] = { 340 - TGL_GPP(0, 67, 74, 96), /* GPP_S */ 341 - TGL_GPP(1, 75, 98, 128), /* GPP_H */ 342 - TGL_GPP(2, 99, 119, 160), /* GPP_D */ 343 - TGL_GPP(3, 120, 143, 192), /* GPP_U */ 344 - TGL_GPP(4, 144, 170, 224), /* vGPIO */ 348 + INTEL_GPP(0, 67, 74, 96), /* GPP_S */ 349 + INTEL_GPP(1, 75, 98, 128), /* GPP_H */ 350 + INTEL_GPP(2, 99, 119, 160), /* GPP_D */ 351 + INTEL_GPP(3, 120, 143, 192), /* GPP_U */ 352 + INTEL_GPP(4, 144, 170, 224), /* vGPIO */ 345 353 }; 346 354 347 355 static const struct intel_padgroup tgllp_community4_gpps[] = { 348 - TGL_GPP(0, 171, 194, 256), /* GPP_C */ 349 - TGL_GPP(1, 195, 219, 288), /* GPP_F */ 350 - TGL_GPP(2, 220, 225, INTEL_GPIO_BASE_NOMAP), /* HVCMOS */ 351 - TGL_GPP(3, 226, 250, 320), /* GPP_E */ 352 - TGL_GPP(4, 251, 259, INTEL_GPIO_BASE_NOMAP), /* JTAG */ 356 + INTEL_GPP(0, 171, 194, 256), /* GPP_C */ 357 + INTEL_GPP(1, 195, 219, 288), /* GPP_F */ 358 + INTEL_GPP(2, 220, 225, INTEL_GPIO_BASE_NOMAP), /* HVCMOS */ 359 + INTEL_GPP(3, 226, 250, 320), /* GPP_E */ 360 + INTEL_GPP(4, 251, 259, INTEL_GPIO_BASE_NOMAP), /* JTAG */ 353 361 }; 354 362 355 363 static const struct intel_padgroup tgllp_community5_gpps[] = { 356 - TGL_GPP(0, 260, 267, 352), /* GPP_R */ 357 - TGL_GPP(1, 268, 276, INTEL_GPIO_BASE_NOMAP), /* SPI */ 364 + INTEL_GPP(0, 260, 267, 352), /* GPP_R */ 365 + INTEL_GPP(1, 268, 276, INTEL_GPIO_BASE_NOMAP), /* SPI */ 358 366 }; 359 367 360 368 static const struct intel_community tgllp_communities[] = { ··· 683 691 }; 684 692 685 693 static const struct intel_padgroup tglh_community0_gpps[] = { 686 - TGL_GPP(0, 0, 24, 0), /* GPP_A */ 687 - TGL_GPP(1, 25, 44, 32), /* GPP_R */ 688 - TGL_GPP(2, 45, 70, 64), /* GPP_B */ 689 - TGL_GPP(3, 71, 78, 96), /* vGPIO_0 */ 694 + INTEL_GPP(0, 0, 24, 0), /* GPP_A */ 695 + INTEL_GPP(1, 25, 44, 32), /* GPP_R */ 696 + INTEL_GPP(2, 45, 70, 64), /* GPP_B */ 697 + INTEL_GPP(3, 71, 78, 96), /* vGPIO_0 */ 690 698 }; 691 699 692 700 static const struct intel_padgroup tglh_community1_gpps[] = { 693 - TGL_GPP(0, 79, 104, 128), /* GPP_D */ 694 - TGL_GPP(1, 105, 128, 160), /* GPP_C */ 695 - TGL_GPP(2, 129, 136, 192), /* GPP_S */ 696 - TGL_GPP(3, 137, 153, 224), /* GPP_G */ 697 - TGL_GPP(4, 154, 180, 256), /* vGPIO */ 701 + INTEL_GPP(0, 79, 104, 128), /* GPP_D */ 702 + INTEL_GPP(1, 105, 128, 160), /* GPP_C */ 703 + INTEL_GPP(2, 129, 136, 192), /* GPP_S */ 704 + INTEL_GPP(3, 137, 153, 224), /* GPP_G */ 705 + INTEL_GPP(4, 154, 180, 256), /* vGPIO */ 698 706 }; 699 707 700 708 static const struct intel_padgroup tglh_community3_gpps[] = { 701 - TGL_GPP(0, 181, 193, 288), /* GPP_E */ 702 - TGL_GPP(1, 194, 217, 320), /* GPP_F */ 709 + INTEL_GPP(0, 181, 193, 288), /* GPP_E */ 710 + INTEL_GPP(1, 194, 217, 320), /* GPP_F */ 703 711 }; 704 712 705 713 static const struct intel_padgroup tglh_community4_gpps[] = { 706 - TGL_GPP(0, 218, 241, 352), /* GPP_H */ 707 - TGL_GPP(1, 242, 251, 384), /* GPP_J */ 708 - TGL_GPP(2, 252, 266, 416), /* GPP_K */ 714 + INTEL_GPP(0, 218, 241, 352), /* GPP_H */ 715 + INTEL_GPP(1, 242, 251, 384), /* GPP_J */ 716 + INTEL_GPP(2, 252, 266, 416), /* GPP_K */ 709 717 }; 710 718 711 719 static const struct intel_padgroup tglh_community5_gpps[] = { 712 - TGL_GPP(0, 267, 281, 448), /* GPP_I */ 713 - TGL_GPP(1, 282, 290, INTEL_GPIO_BASE_NOMAP), /* JTAG */ 720 + INTEL_GPP(0, 267, 281, 448), /* GPP_I */ 721 + INTEL_GPP(1, 282, 290, INTEL_GPIO_BASE_NOMAP), /* JTAG */ 714 722 }; 715 723 716 724 static const struct intel_community tglh_communities[] = {
+10
drivers/pinctrl/mediatek/Kconfig
··· 181 181 default ARM64 && ARCH_MEDIATEK 182 182 select PINCTRL_MTK_PARIS 183 183 184 + config PINCTRL_MT6878 185 + bool "MediaTek MT6878 pin control" 186 + depends on OF 187 + depends on ARM64 || COMPILE_TEST 188 + default ARM64 && ARCH_MEDIATEK 189 + select PINCTRL_MTK_PARIS 190 + help 191 + Say yes here to support pin controller and gpio driver 192 + on the MediaTek MT6878 SoC. 193 + 184 194 config PINCTRL_MT6893 185 195 bool "MediaTek Dimensity MT6893 pin control" 186 196 depends on OF
+1
drivers/pinctrl/mediatek/Makefile
··· 23 23 obj-$(CONFIG_PINCTRL_MT6779) += pinctrl-mt6779.o 24 24 obj-$(CONFIG_PINCTRL_MT6795) += pinctrl-mt6795.o 25 25 obj-$(CONFIG_PINCTRL_MT6797) += pinctrl-mt6797.o 26 + obj-$(CONFIG_PINCTRL_MT6878) += pinctrl-mt6878.o 26 27 obj-$(CONFIG_PINCTRL_MT6893) += pinctrl-mt6893.o 27 28 obj-$(CONFIG_PINCTRL_MT7622) += pinctrl-mt7622.o 28 29 obj-$(CONFIG_PINCTRL_MT7623) += pinctrl-mt7623.o
+5
drivers/pinctrl/mediatek/mtk-eint.c
··· 66 66 }; 67 67 EXPORT_SYMBOL_GPL(debounce_time_mt6795); 68 68 69 + const unsigned int debounce_time_mt6878[] = { 70 + 156, 313, 625, 1250, 20000, 40000, 80000, 160000, 320000, 640000, 0 71 + }; 72 + EXPORT_SYMBOL_GPL(debounce_time_mt6878); 73 + 69 74 static void __iomem *mtk_eint_get_offset(struct mtk_eint *eint, 70 75 unsigned int eint_num, 71 76 unsigned int offset)
+1
drivers/pinctrl/mediatek/mtk-eint.h
··· 52 52 extern const unsigned int debounce_time_mt2701[]; 53 53 extern const unsigned int debounce_time_mt6765[]; 54 54 extern const unsigned int debounce_time_mt6795[]; 55 + extern const unsigned int debounce_time_mt6878[]; 55 56 56 57 struct mtk_eint; 57 58
+1217 -1132
drivers/pinctrl/mediatek/pinctrl-airoha.c
··· 30 30 #include "../pinconf.h" 31 31 #include "../pinmux.h" 32 32 33 - #define PINCTRL_PIN_GROUP(id) \ 34 - PINCTRL_PINGROUP(#id, id##_pins, ARRAY_SIZE(id##_pins)) 33 + #define PINCTRL_PIN_GROUP(id, table) \ 34 + PINCTRL_PINGROUP(id, table##_pins, ARRAY_SIZE(table##_pins)) 35 35 36 - #define PINCTRL_FUNC_DESC(id) \ 36 + #define PINCTRL_FUNC_DESC(id, table) \ 37 37 { \ 38 - .desc = PINCTRL_PINFUNCTION(#id, id##_groups, \ 39 - ARRAY_SIZE(id##_groups)), \ 40 - .groups = id##_func_group, \ 41 - .group_size = ARRAY_SIZE(id##_func_group), \ 38 + .desc = PINCTRL_PINFUNCTION(id, table##_groups, \ 39 + ARRAY_SIZE(table##_groups)),\ 40 + .groups = table##_func_group, \ 41 + .group_size = ARRAY_SIZE(table##_func_group), \ 42 42 } 43 43 44 44 #define PINCTRL_CONF_DESC(p, offset, mask) \ ··· 70 70 #define GPIO_PCM_SPI_CS3_MODE_MASK BIT(20) 71 71 #define GPIO_PCM_SPI_CS2_MODE_P156_MASK BIT(19) 72 72 #define GPIO_PCM_SPI_CS2_MODE_P128_MASK BIT(18) 73 + #define AN7583_GPIO_PCM_SPI_CS2_MODE_MASK BIT(18) 73 74 #define GPIO_PCM_SPI_CS1_MODE_MASK BIT(17) 74 75 #define GPIO_PCM_SPI_MODE_MASK BIT(16) 75 76 #define GPIO_PCM2_MODE_MASK BIT(13) ··· 128 127 129 128 /* CONF */ 130 129 #define REG_I2C_SDA_E2 0x001c 130 + #define AN7583_I2C1_SCL_E2_MASK BIT(16) 131 + #define AN7583_I2C1_SDA_E2_MASK BIT(15) 131 132 #define SPI_MISO_E2_MASK BIT(14) 132 133 #define SPI_MOSI_E2_MASK BIT(13) 133 134 #define SPI_CLK_E2_MASK BIT(12) ··· 137 134 #define PCIE2_RESET_E2_MASK BIT(10) 138 135 #define PCIE1_RESET_E2_MASK BIT(9) 139 136 #define PCIE0_RESET_E2_MASK BIT(8) 137 + #define AN7583_MDIO_0_E2_MASK BIT(5) 138 + #define AN7583_MDC_0_E2_MASK BIT(4) 140 139 #define UART1_RXD_E2_MASK BIT(3) 141 140 #define UART1_TXD_E2_MASK BIT(2) 142 141 #define I2C_SCL_E2_MASK BIT(1) 143 142 #define I2C_SDA_E2_MASK BIT(0) 144 143 145 144 #define REG_I2C_SDA_E4 0x0020 145 + #define AN7583_I2C1_SCL_E4_MASK BIT(16) 146 + #define AN7583_I2C1_SDA_E4_MASK BIT(15) 146 147 #define SPI_MISO_E4_MASK BIT(14) 147 148 #define SPI_MOSI_E4_MASK BIT(13) 148 149 #define SPI_CLK_E4_MASK BIT(12) ··· 154 147 #define PCIE2_RESET_E4_MASK BIT(10) 155 148 #define PCIE1_RESET_E4_MASK BIT(9) 156 149 #define PCIE0_RESET_E4_MASK BIT(8) 150 + #define AN7583_MDIO_0_E4_MASK BIT(5) 151 + #define AN7583_MDC_0_E4_MASK BIT(4) 157 152 #define UART1_RXD_E4_MASK BIT(3) 158 153 #define UART1_TXD_E4_MASK BIT(2) 159 154 #define I2C_SCL_E4_MASK BIT(1) ··· 167 158 #define REG_GPIO_H_E4 0x0030 168 159 169 160 #define REG_I2C_SDA_PU 0x0044 161 + #define AN7583_I2C1_SCL_PU_MASK BIT(16) 162 + #define AN7583_I2C1_SDA_PU_MASK BIT(15) 170 163 #define SPI_MISO_PU_MASK BIT(14) 171 164 #define SPI_MOSI_PU_MASK BIT(13) 172 165 #define SPI_CLK_PU_MASK BIT(12) ··· 176 165 #define PCIE2_RESET_PU_MASK BIT(10) 177 166 #define PCIE1_RESET_PU_MASK BIT(9) 178 167 #define PCIE0_RESET_PU_MASK BIT(8) 168 + #define AN7583_MDIO_0_PU_MASK BIT(5) 169 + #define AN7583_MDC_0_PU_MASK BIT(4) 179 170 #define UART1_RXD_PU_MASK BIT(3) 180 171 #define UART1_TXD_PU_MASK BIT(2) 181 172 #define I2C_SCL_PU_MASK BIT(1) 182 173 #define I2C_SDA_PU_MASK BIT(0) 183 174 184 175 #define REG_I2C_SDA_PD 0x0048 176 + #define AN7583_I2C1_SDA_PD_MASK BIT(16) 177 + #define AN7583_I2C1_SCL_PD_MASK BIT(15) 185 178 #define SPI_MISO_PD_MASK BIT(14) 186 179 #define SPI_MOSI_PD_MASK BIT(13) 187 180 #define SPI_CLK_PD_MASK BIT(12) ··· 193 178 #define PCIE2_RESET_PD_MASK BIT(10) 194 179 #define PCIE1_RESET_PD_MASK BIT(9) 195 180 #define PCIE0_RESET_PD_MASK BIT(8) 181 + #define AN7583_MDIO_0_PD_MASK BIT(5) 182 + #define AN7583_MDC_0_PD_MASK BIT(4) 196 183 #define UART1_RXD_PD_MASK BIT(3) 197 184 #define UART1_TXD_PD_MASK BIT(2) 198 185 #define I2C_SCL_PD_MASK BIT(1) ··· 374 357 u32 irq_type[AIROHA_NUM_PINS]; 375 358 }; 376 359 360 + struct airoha_pinctrl_confs_info { 361 + const struct airoha_pinctrl_conf *confs; 362 + unsigned int num_confs; 363 + }; 364 + 365 + enum airoha_pinctrl_confs_type { 366 + AIROHA_PINCTRL_CONFS_PULLUP, 367 + AIROHA_PINCTRL_CONFS_PULLDOWN, 368 + AIROHA_PINCTRL_CONFS_DRIVE_E2, 369 + AIROHA_PINCTRL_CONFS_DRIVE_E4, 370 + AIROHA_PINCTRL_CONFS_PCIE_RST_OD, 371 + 372 + AIROHA_PINCTRL_CONFS_MAX, 373 + }; 374 + 377 375 struct airoha_pinctrl { 378 376 struct pinctrl_dev *ctrl; 377 + 378 + struct pinctrl_desc desc; 379 + const struct pingroup *grps; 380 + const struct airoha_pinctrl_func *funcs; 381 + const struct airoha_pinctrl_confs_info *confs_info; 379 382 380 383 struct regmap *chip_scu; 381 384 struct regmap *regmap; ··· 403 366 struct airoha_pinctrl_gpiochip gpiochip; 404 367 }; 405 368 406 - static struct pinctrl_pin_desc airoha_pinctrl_pins[] = { 369 + struct airoha_pinctrl_match_data { 370 + const struct pinctrl_pin_desc *pins; 371 + const unsigned int num_pins; 372 + const struct pingroup *grps; 373 + const unsigned int num_grps; 374 + const struct airoha_pinctrl_func *funcs; 375 + const unsigned int num_funcs; 376 + const struct airoha_pinctrl_confs_info confs_info[AIROHA_PINCTRL_CONFS_MAX]; 377 + }; 378 + 379 + static struct pinctrl_pin_desc en7581_pinctrl_pins[] = { 407 380 PINCTRL_PIN(0, "uart1_txd"), 408 381 PINCTRL_PIN(1, "uart1_rxd"), 409 382 PINCTRL_PIN(2, "i2c_scl"), ··· 474 427 PINCTRL_PIN(63, "pcie_reset2"), 475 428 }; 476 429 477 - static const int pon_pins[] = { 49, 50, 51, 52, 53, 54 }; 478 - static const int pon_tod_1pps_pins[] = { 46 }; 479 - static const int gsw_tod_1pps_pins[] = { 46 }; 480 - static const int sipo_pins[] = { 16, 17 }; 481 - static const int sipo_rclk_pins[] = { 16, 17, 43 }; 482 - static const int mdio_pins[] = { 14, 15 }; 483 - static const int uart2_pins[] = { 48, 55 }; 484 - static const int uart2_cts_rts_pins[] = { 46, 47 }; 485 - static const int hsuart_pins[] = { 28, 29 }; 486 - static const int hsuart_cts_rts_pins[] = { 26, 27 }; 487 - static const int uart4_pins[] = { 38, 39 }; 488 - static const int uart5_pins[] = { 18, 19 }; 489 - static const int i2c0_pins[] = { 2, 3 }; 490 - static const int i2c1_pins[] = { 14, 15 }; 491 - static const int jtag_udi_pins[] = { 16, 17, 18, 19, 20 }; 492 - static const int jtag_dfd_pins[] = { 16, 17, 18, 19, 20 }; 493 - static const int i2s_pins[] = { 26, 27, 28, 29 }; 494 - static const int pcm1_pins[] = { 22, 23, 24, 25 }; 495 - static const int pcm2_pins[] = { 18, 19, 20, 21 }; 496 - static const int spi_quad_pins[] = { 32, 33 }; 497 - static const int spi_pins[] = { 4, 5, 6, 7 }; 498 - static const int spi_cs1_pins[] = { 34 }; 499 - static const int pcm_spi_pins[] = { 18, 19, 20, 21, 22, 23, 24, 25 }; 500 - static const int pcm_spi_int_pins[] = { 14 }; 501 - static const int pcm_spi_rst_pins[] = { 15 }; 502 - static const int pcm_spi_cs1_pins[] = { 43 }; 503 - static const int pcm_spi_cs2_pins[] = { 40 }; 504 - static const int pcm_spi_cs2_p128_pins[] = { 40 }; 505 - static const int pcm_spi_cs2_p156_pins[] = { 40 }; 506 - static const int pcm_spi_cs3_pins[] = { 41 }; 507 - static const int pcm_spi_cs4_pins[] = { 42 }; 508 - static const int emmc_pins[] = { 4, 5, 6, 30, 31, 32, 33, 34, 35, 36, 37 }; 509 - static const int pnand_pins[] = { 4, 5, 6, 7, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42 }; 510 - static const int gpio0_pins[] = { 13 }; 511 - static const int gpio1_pins[] = { 14 }; 512 - static const int gpio2_pins[] = { 15 }; 513 - static const int gpio3_pins[] = { 16 }; 514 - static const int gpio4_pins[] = { 17 }; 515 - static const int gpio5_pins[] = { 18 }; 516 - static const int gpio6_pins[] = { 19 }; 517 - static const int gpio7_pins[] = { 20 }; 518 - static const int gpio8_pins[] = { 21 }; 519 - static const int gpio9_pins[] = { 22 }; 520 - static const int gpio10_pins[] = { 23 }; 521 - static const int gpio11_pins[] = { 24 }; 522 - static const int gpio12_pins[] = { 25 }; 523 - static const int gpio13_pins[] = { 26 }; 524 - static const int gpio14_pins[] = { 27 }; 525 - static const int gpio15_pins[] = { 28 }; 526 - static const int gpio16_pins[] = { 29 }; 527 - static const int gpio17_pins[] = { 30 }; 528 - static const int gpio18_pins[] = { 31 }; 529 - static const int gpio19_pins[] = { 32 }; 530 - static const int gpio20_pins[] = { 33 }; 531 - static const int gpio21_pins[] = { 34 }; 532 - static const int gpio22_pins[] = { 35 }; 533 - static const int gpio23_pins[] = { 36 }; 534 - static const int gpio24_pins[] = { 37 }; 535 - static const int gpio25_pins[] = { 38 }; 536 - static const int gpio26_pins[] = { 39 }; 537 - static const int gpio27_pins[] = { 40 }; 538 - static const int gpio28_pins[] = { 41 }; 539 - static const int gpio29_pins[] = { 42 }; 540 - static const int gpio30_pins[] = { 43 }; 541 - static const int gpio31_pins[] = { 44 }; 542 - static const int gpio33_pins[] = { 46 }; 543 - static const int gpio34_pins[] = { 47 }; 544 - static const int gpio35_pins[] = { 48 }; 545 - static const int gpio36_pins[] = { 49 }; 546 - static const int gpio37_pins[] = { 50 }; 547 - static const int gpio38_pins[] = { 51 }; 548 - static const int gpio39_pins[] = { 52 }; 549 - static const int gpio40_pins[] = { 53 }; 550 - static const int gpio41_pins[] = { 54 }; 551 - static const int gpio42_pins[] = { 55 }; 552 - static const int gpio43_pins[] = { 56 }; 553 - static const int gpio44_pins[] = { 57 }; 554 - static const int gpio45_pins[] = { 58 }; 555 - static const int gpio46_pins[] = { 59 }; 556 - static const int pcie_reset0_pins[] = { 61 }; 557 - static const int pcie_reset1_pins[] = { 62 }; 558 - static const int pcie_reset2_pins[] = { 63 }; 430 + static const int en7581_pon_pins[] = { 49, 50, 51, 52, 53, 54 }; 431 + static const int en7581_pon_tod_1pps_pins[] = { 46 }; 432 + static const int en7581_gsw_tod_1pps_pins[] = { 46 }; 433 + static const int en7581_sipo_pins[] = { 16, 17 }; 434 + static const int en7581_sipo_rclk_pins[] = { 16, 17, 43 }; 435 + static const int en7581_mdio_pins[] = { 14, 15 }; 436 + static const int en7581_uart2_pins[] = { 48, 55 }; 437 + static const int en7581_uart2_cts_rts_pins[] = { 46, 47 }; 438 + static const int en7581_hsuart_pins[] = { 28, 29 }; 439 + static const int en7581_hsuart_cts_rts_pins[] = { 26, 27 }; 440 + static const int en7581_uart4_pins[] = { 38, 39 }; 441 + static const int en7581_uart5_pins[] = { 18, 19 }; 442 + static const int en7581_i2c0_pins[] = { 2, 3 }; 443 + static const int en7581_i2c1_pins[] = { 14, 15 }; 444 + static const int en7581_jtag_udi_pins[] = { 16, 17, 18, 19, 20 }; 445 + static const int en7581_jtag_dfd_pins[] = { 16, 17, 18, 19, 20 }; 446 + static const int en7581_i2s_pins[] = { 26, 27, 28, 29 }; 447 + static const int en7581_pcm1_pins[] = { 22, 23, 24, 25 }; 448 + static const int en7581_pcm2_pins[] = { 18, 19, 20, 21 }; 449 + static const int en7581_spi_quad_pins[] = { 32, 33 }; 450 + static const int en7581_spi_pins[] = { 4, 5, 6, 7 }; 451 + static const int en7581_spi_cs1_pins[] = { 34 }; 452 + static const int en7581_pcm_spi_pins[] = { 18, 19, 20, 21, 22, 23, 24, 25 }; 453 + static const int en7581_pcm_spi_int_pins[] = { 14 }; 454 + static const int en7581_pcm_spi_rst_pins[] = { 15 }; 455 + static const int en7581_pcm_spi_cs1_pins[] = { 43 }; 456 + static const int en7581_pcm_spi_cs2_pins[] = { 40 }; 457 + static const int en7581_pcm_spi_cs2_p128_pins[] = { 40 }; 458 + static const int en7581_pcm_spi_cs2_p156_pins[] = { 40 }; 459 + static const int en7581_pcm_spi_cs3_pins[] = { 41 }; 460 + static const int en7581_pcm_spi_cs4_pins[] = { 42 }; 461 + static const int en7581_emmc_pins[] = { 4, 5, 6, 30, 31, 32, 33, 34, 35, 36, 37 }; 462 + static const int en7581_pnand_pins[] = { 4, 5, 6, 7, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42 }; 463 + static const int en7581_gpio0_pins[] = { 13 }; 464 + static const int en7581_gpio1_pins[] = { 14 }; 465 + static const int en7581_gpio2_pins[] = { 15 }; 466 + static const int en7581_gpio3_pins[] = { 16 }; 467 + static const int en7581_gpio4_pins[] = { 17 }; 468 + static const int en7581_gpio5_pins[] = { 18 }; 469 + static const int en7581_gpio6_pins[] = { 19 }; 470 + static const int en7581_gpio7_pins[] = { 20 }; 471 + static const int en7581_gpio8_pins[] = { 21 }; 472 + static const int en7581_gpio9_pins[] = { 22 }; 473 + static const int en7581_gpio10_pins[] = { 23 }; 474 + static const int en7581_gpio11_pins[] = { 24 }; 475 + static const int en7581_gpio12_pins[] = { 25 }; 476 + static const int en7581_gpio13_pins[] = { 26 }; 477 + static const int en7581_gpio14_pins[] = { 27 }; 478 + static const int en7581_gpio15_pins[] = { 28 }; 479 + static const int en7581_gpio16_pins[] = { 29 }; 480 + static const int en7581_gpio17_pins[] = { 30 }; 481 + static const int en7581_gpio18_pins[] = { 31 }; 482 + static const int en7581_gpio19_pins[] = { 32 }; 483 + static const int en7581_gpio20_pins[] = { 33 }; 484 + static const int en7581_gpio21_pins[] = { 34 }; 485 + static const int en7581_gpio22_pins[] = { 35 }; 486 + static const int en7581_gpio23_pins[] = { 36 }; 487 + static const int en7581_gpio24_pins[] = { 37 }; 488 + static const int en7581_gpio25_pins[] = { 38 }; 489 + static const int en7581_gpio26_pins[] = { 39 }; 490 + static const int en7581_gpio27_pins[] = { 40 }; 491 + static const int en7581_gpio28_pins[] = { 41 }; 492 + static const int en7581_gpio29_pins[] = { 42 }; 493 + static const int en7581_gpio30_pins[] = { 43 }; 494 + static const int en7581_gpio31_pins[] = { 44 }; 495 + static const int en7581_gpio33_pins[] = { 46 }; 496 + static const int en7581_gpio34_pins[] = { 47 }; 497 + static const int en7581_gpio35_pins[] = { 48 }; 498 + static const int en7581_gpio36_pins[] = { 49 }; 499 + static const int en7581_gpio37_pins[] = { 50 }; 500 + static const int en7581_gpio38_pins[] = { 51 }; 501 + static const int en7581_gpio39_pins[] = { 52 }; 502 + static const int en7581_gpio40_pins[] = { 53 }; 503 + static const int en7581_gpio41_pins[] = { 54 }; 504 + static const int en7581_gpio42_pins[] = { 55 }; 505 + static const int en7581_gpio43_pins[] = { 56 }; 506 + static const int en7581_gpio44_pins[] = { 57 }; 507 + static const int en7581_gpio45_pins[] = { 58 }; 508 + static const int en7581_gpio46_pins[] = { 59 }; 509 + static const int en7581_pcie_reset0_pins[] = { 61 }; 510 + static const int en7581_pcie_reset1_pins[] = { 62 }; 511 + static const int en7581_pcie_reset2_pins[] = { 63 }; 559 512 560 - static const struct pingroup airoha_pinctrl_groups[] = { 561 - PINCTRL_PIN_GROUP(pon), 562 - PINCTRL_PIN_GROUP(pon_tod_1pps), 563 - PINCTRL_PIN_GROUP(gsw_tod_1pps), 564 - PINCTRL_PIN_GROUP(sipo), 565 - PINCTRL_PIN_GROUP(sipo_rclk), 566 - PINCTRL_PIN_GROUP(mdio), 567 - PINCTRL_PIN_GROUP(uart2), 568 - PINCTRL_PIN_GROUP(uart2_cts_rts), 569 - PINCTRL_PIN_GROUP(hsuart), 570 - PINCTRL_PIN_GROUP(hsuart_cts_rts), 571 - PINCTRL_PIN_GROUP(uart4), 572 - PINCTRL_PIN_GROUP(uart5), 573 - PINCTRL_PIN_GROUP(i2c0), 574 - PINCTRL_PIN_GROUP(i2c1), 575 - PINCTRL_PIN_GROUP(jtag_udi), 576 - PINCTRL_PIN_GROUP(jtag_dfd), 577 - PINCTRL_PIN_GROUP(i2s), 578 - PINCTRL_PIN_GROUP(pcm1), 579 - PINCTRL_PIN_GROUP(pcm2), 580 - PINCTRL_PIN_GROUP(spi), 581 - PINCTRL_PIN_GROUP(spi_quad), 582 - PINCTRL_PIN_GROUP(spi_cs1), 583 - PINCTRL_PIN_GROUP(pcm_spi), 584 - PINCTRL_PIN_GROUP(pcm_spi_int), 585 - PINCTRL_PIN_GROUP(pcm_spi_rst), 586 - PINCTRL_PIN_GROUP(pcm_spi_cs1), 587 - PINCTRL_PIN_GROUP(pcm_spi_cs2_p128), 588 - PINCTRL_PIN_GROUP(pcm_spi_cs2_p156), 589 - PINCTRL_PIN_GROUP(pcm_spi_cs2), 590 - PINCTRL_PIN_GROUP(pcm_spi_cs3), 591 - PINCTRL_PIN_GROUP(pcm_spi_cs4), 592 - PINCTRL_PIN_GROUP(emmc), 593 - PINCTRL_PIN_GROUP(pnand), 594 - PINCTRL_PIN_GROUP(gpio0), 595 - PINCTRL_PIN_GROUP(gpio1), 596 - PINCTRL_PIN_GROUP(gpio2), 597 - PINCTRL_PIN_GROUP(gpio3), 598 - PINCTRL_PIN_GROUP(gpio4), 599 - PINCTRL_PIN_GROUP(gpio5), 600 - PINCTRL_PIN_GROUP(gpio6), 601 - PINCTRL_PIN_GROUP(gpio7), 602 - PINCTRL_PIN_GROUP(gpio8), 603 - PINCTRL_PIN_GROUP(gpio9), 604 - PINCTRL_PIN_GROUP(gpio10), 605 - PINCTRL_PIN_GROUP(gpio11), 606 - PINCTRL_PIN_GROUP(gpio12), 607 - PINCTRL_PIN_GROUP(gpio13), 608 - PINCTRL_PIN_GROUP(gpio14), 609 - PINCTRL_PIN_GROUP(gpio15), 610 - PINCTRL_PIN_GROUP(gpio16), 611 - PINCTRL_PIN_GROUP(gpio17), 612 - PINCTRL_PIN_GROUP(gpio18), 613 - PINCTRL_PIN_GROUP(gpio19), 614 - PINCTRL_PIN_GROUP(gpio20), 615 - PINCTRL_PIN_GROUP(gpio21), 616 - PINCTRL_PIN_GROUP(gpio22), 617 - PINCTRL_PIN_GROUP(gpio23), 618 - PINCTRL_PIN_GROUP(gpio24), 619 - PINCTRL_PIN_GROUP(gpio25), 620 - PINCTRL_PIN_GROUP(gpio26), 621 - PINCTRL_PIN_GROUP(gpio27), 622 - PINCTRL_PIN_GROUP(gpio28), 623 - PINCTRL_PIN_GROUP(gpio29), 624 - PINCTRL_PIN_GROUP(gpio30), 625 - PINCTRL_PIN_GROUP(gpio31), 626 - PINCTRL_PIN_GROUP(gpio33), 627 - PINCTRL_PIN_GROUP(gpio34), 628 - PINCTRL_PIN_GROUP(gpio35), 629 - PINCTRL_PIN_GROUP(gpio36), 630 - PINCTRL_PIN_GROUP(gpio37), 631 - PINCTRL_PIN_GROUP(gpio38), 632 - PINCTRL_PIN_GROUP(gpio39), 633 - PINCTRL_PIN_GROUP(gpio40), 634 - PINCTRL_PIN_GROUP(gpio41), 635 - PINCTRL_PIN_GROUP(gpio42), 636 - PINCTRL_PIN_GROUP(gpio43), 637 - PINCTRL_PIN_GROUP(gpio44), 638 - PINCTRL_PIN_GROUP(gpio45), 639 - PINCTRL_PIN_GROUP(gpio46), 640 - PINCTRL_PIN_GROUP(pcie_reset0), 641 - PINCTRL_PIN_GROUP(pcie_reset1), 642 - PINCTRL_PIN_GROUP(pcie_reset2), 513 + static const struct pingroup en7581_pinctrl_groups[] = { 514 + PINCTRL_PIN_GROUP("pon", en7581_pon), 515 + PINCTRL_PIN_GROUP("pon_tod_1pps", en7581_pon_tod_1pps), 516 + PINCTRL_PIN_GROUP("gsw_tod_1pps", en7581_gsw_tod_1pps), 517 + PINCTRL_PIN_GROUP("sipo", en7581_sipo), 518 + PINCTRL_PIN_GROUP("sipo_rclk", en7581_sipo_rclk), 519 + PINCTRL_PIN_GROUP("mdio", en7581_mdio), 520 + PINCTRL_PIN_GROUP("uart2", en7581_uart2), 521 + PINCTRL_PIN_GROUP("uart2_cts_rts", en7581_uart2_cts_rts), 522 + PINCTRL_PIN_GROUP("hsuart", en7581_hsuart), 523 + PINCTRL_PIN_GROUP("hsuart_cts_rts", en7581_hsuart_cts_rts), 524 + PINCTRL_PIN_GROUP("uart4", en7581_uart4), 525 + PINCTRL_PIN_GROUP("uart5", en7581_uart5), 526 + PINCTRL_PIN_GROUP("i2c0", en7581_i2c0), 527 + PINCTRL_PIN_GROUP("i2c1", en7581_i2c1), 528 + PINCTRL_PIN_GROUP("jtag_udi", en7581_jtag_udi), 529 + PINCTRL_PIN_GROUP("jtag_dfd", en7581_jtag_dfd), 530 + PINCTRL_PIN_GROUP("i2s", en7581_i2s), 531 + PINCTRL_PIN_GROUP("pcm1", en7581_pcm1), 532 + PINCTRL_PIN_GROUP("pcm2", en7581_pcm2), 533 + PINCTRL_PIN_GROUP("spi", en7581_spi), 534 + PINCTRL_PIN_GROUP("spi_quad", en7581_spi_quad), 535 + PINCTRL_PIN_GROUP("spi_cs1", en7581_spi_cs1), 536 + PINCTRL_PIN_GROUP("pcm_spi", en7581_pcm_spi), 537 + PINCTRL_PIN_GROUP("pcm_spi_int", en7581_pcm_spi_int), 538 + PINCTRL_PIN_GROUP("pcm_spi_rst", en7581_pcm_spi_rst), 539 + PINCTRL_PIN_GROUP("pcm_spi_cs1", en7581_pcm_spi_cs1), 540 + PINCTRL_PIN_GROUP("pcm_spi_cs2_p128", en7581_pcm_spi_cs2_p128), 541 + PINCTRL_PIN_GROUP("pcm_spi_cs2_p156", en7581_pcm_spi_cs2_p156), 542 + PINCTRL_PIN_GROUP("pcm_spi_cs2", en7581_pcm_spi_cs2), 543 + PINCTRL_PIN_GROUP("pcm_spi_cs3", en7581_pcm_spi_cs3), 544 + PINCTRL_PIN_GROUP("pcm_spi_cs4", en7581_pcm_spi_cs4), 545 + PINCTRL_PIN_GROUP("emmc", en7581_emmc), 546 + PINCTRL_PIN_GROUP("pnand", en7581_pnand), 547 + PINCTRL_PIN_GROUP("gpio0", en7581_gpio0), 548 + PINCTRL_PIN_GROUP("gpio1", en7581_gpio1), 549 + PINCTRL_PIN_GROUP("gpio2", en7581_gpio2), 550 + PINCTRL_PIN_GROUP("gpio3", en7581_gpio3), 551 + PINCTRL_PIN_GROUP("gpio4", en7581_gpio4), 552 + PINCTRL_PIN_GROUP("gpio5", en7581_gpio5), 553 + PINCTRL_PIN_GROUP("gpio6", en7581_gpio6), 554 + PINCTRL_PIN_GROUP("gpio7", en7581_gpio7), 555 + PINCTRL_PIN_GROUP("gpio8", en7581_gpio8), 556 + PINCTRL_PIN_GROUP("gpio9", en7581_gpio9), 557 + PINCTRL_PIN_GROUP("gpio10", en7581_gpio10), 558 + PINCTRL_PIN_GROUP("gpio11", en7581_gpio11), 559 + PINCTRL_PIN_GROUP("gpio12", en7581_gpio12), 560 + PINCTRL_PIN_GROUP("gpio13", en7581_gpio13), 561 + PINCTRL_PIN_GROUP("gpio14", en7581_gpio14), 562 + PINCTRL_PIN_GROUP("gpio15", en7581_gpio15), 563 + PINCTRL_PIN_GROUP("gpio16", en7581_gpio16), 564 + PINCTRL_PIN_GROUP("gpio17", en7581_gpio17), 565 + PINCTRL_PIN_GROUP("gpio18", en7581_gpio18), 566 + PINCTRL_PIN_GROUP("gpio19", en7581_gpio19), 567 + PINCTRL_PIN_GROUP("gpio20", en7581_gpio20), 568 + PINCTRL_PIN_GROUP("gpio21", en7581_gpio21), 569 + PINCTRL_PIN_GROUP("gpio22", en7581_gpio22), 570 + PINCTRL_PIN_GROUP("gpio23", en7581_gpio23), 571 + PINCTRL_PIN_GROUP("gpio24", en7581_gpio24), 572 + PINCTRL_PIN_GROUP("gpio25", en7581_gpio25), 573 + PINCTRL_PIN_GROUP("gpio26", en7581_gpio26), 574 + PINCTRL_PIN_GROUP("gpio27", en7581_gpio27), 575 + PINCTRL_PIN_GROUP("gpio28", en7581_gpio28), 576 + PINCTRL_PIN_GROUP("gpio29", en7581_gpio29), 577 + PINCTRL_PIN_GROUP("gpio30", en7581_gpio30), 578 + PINCTRL_PIN_GROUP("gpio31", en7581_gpio31), 579 + PINCTRL_PIN_GROUP("gpio33", en7581_gpio33), 580 + PINCTRL_PIN_GROUP("gpio34", en7581_gpio34), 581 + PINCTRL_PIN_GROUP("gpio35", en7581_gpio35), 582 + PINCTRL_PIN_GROUP("gpio36", en7581_gpio36), 583 + PINCTRL_PIN_GROUP("gpio37", en7581_gpio37), 584 + PINCTRL_PIN_GROUP("gpio38", en7581_gpio38), 585 + PINCTRL_PIN_GROUP("gpio39", en7581_gpio39), 586 + PINCTRL_PIN_GROUP("gpio40", en7581_gpio40), 587 + PINCTRL_PIN_GROUP("gpio41", en7581_gpio41), 588 + PINCTRL_PIN_GROUP("gpio42", en7581_gpio42), 589 + PINCTRL_PIN_GROUP("gpio43", en7581_gpio43), 590 + PINCTRL_PIN_GROUP("gpio44", en7581_gpio44), 591 + PINCTRL_PIN_GROUP("gpio45", en7581_gpio45), 592 + PINCTRL_PIN_GROUP("gpio46", en7581_gpio46), 593 + PINCTRL_PIN_GROUP("pcie_reset0", en7581_pcie_reset0), 594 + PINCTRL_PIN_GROUP("pcie_reset1", en7581_pcie_reset1), 595 + PINCTRL_PIN_GROUP("pcie_reset2", en7581_pcie_reset2), 596 + }; 597 + 598 + static struct pinctrl_pin_desc an7583_pinctrl_pins[] = { 599 + PINCTRL_PIN(2, "gpio0"), 600 + PINCTRL_PIN(3, "gpio1"), 601 + PINCTRL_PIN(4, "gpio2"), 602 + PINCTRL_PIN(5, "gpio3"), 603 + PINCTRL_PIN(6, "gpio4"), 604 + PINCTRL_PIN(7, "gpio5"), 605 + PINCTRL_PIN(8, "gpio6"), 606 + PINCTRL_PIN(9, "gpio7"), 607 + PINCTRL_PIN(10, "gpio8"), 608 + PINCTRL_PIN(11, "gpio9"), 609 + PINCTRL_PIN(12, "gpio10"), 610 + PINCTRL_PIN(13, "gpio11"), 611 + PINCTRL_PIN(14, "gpio12"), 612 + PINCTRL_PIN(15, "gpio13"), 613 + PINCTRL_PIN(16, "gpio14"), 614 + PINCTRL_PIN(17, "gpio15"), 615 + PINCTRL_PIN(18, "gpio16"), 616 + PINCTRL_PIN(19, "gpio17"), 617 + PINCTRL_PIN(20, "gpio18"), 618 + PINCTRL_PIN(21, "gpio19"), 619 + PINCTRL_PIN(22, "gpio20"), 620 + PINCTRL_PIN(23, "gpio21"), 621 + PINCTRL_PIN(24, "gpio22"), 622 + PINCTRL_PIN(25, "gpio23"), 623 + PINCTRL_PIN(26, "gpio24"), 624 + PINCTRL_PIN(27, "gpio25"), 625 + PINCTRL_PIN(28, "gpio26"), 626 + PINCTRL_PIN(29, "gpio27"), 627 + PINCTRL_PIN(30, "gpio28"), 628 + PINCTRL_PIN(31, "gpio29"), 629 + PINCTRL_PIN(32, "gpio30"), 630 + PINCTRL_PIN(33, "gpio31"), 631 + PINCTRL_PIN(34, "gpio32"), 632 + PINCTRL_PIN(35, "gpio33"), 633 + PINCTRL_PIN(36, "gpio34"), 634 + PINCTRL_PIN(37, "gpio35"), 635 + PINCTRL_PIN(38, "gpio36"), 636 + PINCTRL_PIN(39, "gpio37"), 637 + PINCTRL_PIN(40, "gpio38"), 638 + PINCTRL_PIN(41, "i2c0_scl"), 639 + PINCTRL_PIN(42, "i2c0_sda"), 640 + PINCTRL_PIN(43, "i2c1_scl"), 641 + PINCTRL_PIN(44, "i2c1_sda"), 642 + PINCTRL_PIN(45, "spi_clk"), 643 + PINCTRL_PIN(46, "spi_cs"), 644 + PINCTRL_PIN(47, "spi_mosi"), 645 + PINCTRL_PIN(48, "spi_miso"), 646 + PINCTRL_PIN(49, "uart_txd"), 647 + PINCTRL_PIN(50, "uart_rxd"), 648 + PINCTRL_PIN(51, "pcie_reset0"), 649 + PINCTRL_PIN(52, "pcie_reset1"), 650 + PINCTRL_PIN(53, "mdc_0"), 651 + PINCTRL_PIN(54, "mdio_0"), 652 + }; 653 + 654 + static const int an7583_pon_pins[] = { 15, 16, 17, 18, 19, 20 }; 655 + static const int an7583_pon_tod_1pps_pins[] = { 32 }; 656 + static const int an7583_gsw_tod_1pps_pins[] = { 32 }; 657 + static const int an7583_sipo_pins[] = { 34, 35 }; 658 + static const int an7583_sipo_rclk_pins[] = { 34, 35, 33 }; 659 + static const int an7583_mdio_pins[] = { 43, 44 }; 660 + static const int an7583_uart2_pins[] = { 34, 35 }; 661 + static const int an7583_uart2_cts_rts_pins[] = { 32, 33 }; 662 + static const int an7583_hsuart_pins[] = { 30, 31 }; 663 + static const int an7583_hsuart_cts_rts_pins[] = { 28, 29 }; 664 + static const int an7583_npu_uart_pins[] = { 7, 8 }; 665 + static const int an7583_uart4_pins[] = { 7, 8 }; 666 + static const int an7583_uart5_pins[] = { 23, 24 }; 667 + static const int an7583_i2c0_pins[] = { 41, 42 }; 668 + static const int an7583_i2c1_pins[] = { 43, 44 }; 669 + static const int an7583_jtag_udi_pins[] = { 23, 24, 22, 25, 26 }; 670 + static const int an7583_jtag_dfd_pins[] = { 23, 24, 22, 25, 26 }; 671 + static const int an7583_pcm1_pins[] = { 10, 11, 12, 13, 14 }; 672 + static const int an7583_pcm2_pins[] = { 28, 29, 30, 31, 24 }; 673 + static const int an7583_spi_pins[] = { 28, 29, 30, 31 }; 674 + static const int an7583_spi_quad_pins[] = { 25, 26 }; 675 + static const int an7583_spi_cs1_pins[] = { 27 }; 676 + static const int an7583_pcm_spi_pins[] = { 28, 29, 30, 31, 10, 11, 12, 13 }; 677 + static const int an7583_pcm_spi_rst_pins[] = { 14 }; 678 + static const int an7583_pcm_spi_cs1_pins[] = { 24 }; 679 + static const int an7583_emmc_pins[] = { 7, 8, 9, 22, 23, 24, 25, 26, 45, 46, 47 }; 680 + static const int an7583_pnand_pins[] = { 7, 8, 9, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 45, 46, 47, 48 }; 681 + static const int an7583_gpio0_pins[] = { 2 }; 682 + static const int an7583_gpio1_pins[] = { 3 }; 683 + static const int an7583_gpio2_pins[] = { 4 }; 684 + static const int an7583_gpio3_pins[] = { 5 }; 685 + static const int an7583_gpio4_pins[] = { 6 }; 686 + static const int an7583_gpio5_pins[] = { 7 }; 687 + static const int an7583_gpio6_pins[] = { 8 }; 688 + static const int an7583_gpio7_pins[] = { 9 }; 689 + static const int an7583_gpio8_pins[] = { 10 }; 690 + static const int an7583_gpio9_pins[] = { 11 }; 691 + static const int an7583_gpio10_pins[] = { 12 }; 692 + static const int an7583_gpio11_pins[] = { 13 }; 693 + static const int an7583_gpio12_pins[] = { 14 }; 694 + static const int an7583_gpio13_pins[] = { 15 }; 695 + static const int an7583_gpio14_pins[] = { 16 }; 696 + static const int an7583_gpio15_pins[] = { 17 }; 697 + static const int an7583_gpio16_pins[] = { 18 }; 698 + static const int an7583_gpio17_pins[] = { 19 }; 699 + static const int an7583_gpio18_pins[] = { 20 }; 700 + static const int an7583_gpio19_pins[] = { 21 }; 701 + static const int an7583_gpio20_pins[] = { 22 }; 702 + static const int an7583_gpio21_pins[] = { 24 }; 703 + static const int an7583_gpio23_pins[] = { 25 }; 704 + static const int an7583_gpio24_pins[] = { 26 }; 705 + static const int an7583_gpio25_pins[] = { 27 }; 706 + static const int an7583_gpio26_pins[] = { 28 }; 707 + static const int an7583_gpio27_pins[] = { 29 }; 708 + static const int an7583_gpio28_pins[] = { 30 }; 709 + static const int an7583_gpio29_pins[] = { 31 }; 710 + static const int an7583_gpio30_pins[] = { 32 }; 711 + static const int an7583_gpio31_pins[] = { 33 }; 712 + static const int an7583_gpio33_pins[] = { 35 }; 713 + static const int an7583_gpio34_pins[] = { 36 }; 714 + static const int an7583_gpio35_pins[] = { 37 }; 715 + static const int an7583_gpio36_pins[] = { 38 }; 716 + static const int an7583_gpio37_pins[] = { 39 }; 717 + static const int an7583_gpio38_pins[] = { 40 }; 718 + static const int an7583_gpio39_pins[] = { 41 }; 719 + static const int an7583_gpio40_pins[] = { 42 }; 720 + static const int an7583_gpio41_pins[] = { 43 }; 721 + static const int an7583_gpio42_pins[] = { 44 }; 722 + static const int an7583_gpio43_pins[] = { 45 }; 723 + static const int an7583_gpio44_pins[] = { 46 }; 724 + static const int an7583_gpio45_pins[] = { 47 }; 725 + static const int an7583_gpio46_pins[] = { 48 }; 726 + static const int an7583_gpio47_pins[] = { 49 }; 727 + static const int an7583_gpio48_pins[] = { 50 }; 728 + static const int an7583_pcie_reset0_pins[] = { 51 }; 729 + static const int an7583_pcie_reset1_pins[] = { 52 }; 730 + 731 + static const struct pingroup an7583_pinctrl_groups[] = { 732 + PINCTRL_PIN_GROUP("pon", an7583_pon), 733 + PINCTRL_PIN_GROUP("pon_tod_1pps", an7583_pon_tod_1pps), 734 + PINCTRL_PIN_GROUP("gsw_tod_1pps", an7583_gsw_tod_1pps), 735 + PINCTRL_PIN_GROUP("sipo", an7583_sipo), 736 + PINCTRL_PIN_GROUP("sipo_rclk", an7583_sipo_rclk), 737 + PINCTRL_PIN_GROUP("mdio", an7583_mdio), 738 + PINCTRL_PIN_GROUP("uart2", an7583_uart2), 739 + PINCTRL_PIN_GROUP("uart2_cts_rts", an7583_uart2_cts_rts), 740 + PINCTRL_PIN_GROUP("hsuart", an7583_hsuart), 741 + PINCTRL_PIN_GROUP("hsuart_cts_rts", an7583_hsuart_cts_rts), 742 + PINCTRL_PIN_GROUP("npu_uart", an7583_npu_uart), 743 + PINCTRL_PIN_GROUP("uart4", an7583_uart4), 744 + PINCTRL_PIN_GROUP("uart5", an7583_uart5), 745 + PINCTRL_PIN_GROUP("i2c0", an7583_i2c0), 746 + PINCTRL_PIN_GROUP("i2c1", an7583_i2c1), 747 + PINCTRL_PIN_GROUP("jtag_udi", an7583_jtag_udi), 748 + PINCTRL_PIN_GROUP("jtag_dfd", an7583_jtag_dfd), 749 + PINCTRL_PIN_GROUP("pcm1", an7583_pcm1), 750 + PINCTRL_PIN_GROUP("pcm2", an7583_pcm2), 751 + PINCTRL_PIN_GROUP("spi", an7583_spi), 752 + PINCTRL_PIN_GROUP("spi_quad", an7583_spi_quad), 753 + PINCTRL_PIN_GROUP("spi_cs1", an7583_spi_cs1), 754 + PINCTRL_PIN_GROUP("pcm_spi", an7583_pcm_spi), 755 + PINCTRL_PIN_GROUP("pcm_spi_rst", an7583_pcm_spi_rst), 756 + PINCTRL_PIN_GROUP("pcm_spi_cs1", an7583_pcm_spi_cs1), 757 + PINCTRL_PIN_GROUP("emmc", an7583_emmc), 758 + PINCTRL_PIN_GROUP("pnand", an7583_pnand), 759 + PINCTRL_PIN_GROUP("gpio0", an7583_gpio0), 760 + PINCTRL_PIN_GROUP("gpio1", an7583_gpio1), 761 + PINCTRL_PIN_GROUP("gpio2", an7583_gpio2), 762 + PINCTRL_PIN_GROUP("gpio3", an7583_gpio3), 763 + PINCTRL_PIN_GROUP("gpio4", an7583_gpio4), 764 + PINCTRL_PIN_GROUP("gpio5", an7583_gpio5), 765 + PINCTRL_PIN_GROUP("gpio6", an7583_gpio6), 766 + PINCTRL_PIN_GROUP("gpio7", an7583_gpio7), 767 + PINCTRL_PIN_GROUP("gpio8", an7583_gpio8), 768 + PINCTRL_PIN_GROUP("gpio9", an7583_gpio9), 769 + PINCTRL_PIN_GROUP("gpio10", an7583_gpio10), 770 + PINCTRL_PIN_GROUP("gpio11", an7583_gpio11), 771 + PINCTRL_PIN_GROUP("gpio12", an7583_gpio12), 772 + PINCTRL_PIN_GROUP("gpio13", an7583_gpio13), 773 + PINCTRL_PIN_GROUP("gpio14", an7583_gpio14), 774 + PINCTRL_PIN_GROUP("gpio15", an7583_gpio15), 775 + PINCTRL_PIN_GROUP("gpio16", an7583_gpio16), 776 + PINCTRL_PIN_GROUP("gpio17", an7583_gpio17), 777 + PINCTRL_PIN_GROUP("gpio18", an7583_gpio18), 778 + PINCTRL_PIN_GROUP("gpio19", an7583_gpio19), 779 + PINCTRL_PIN_GROUP("gpio20", an7583_gpio20), 780 + PINCTRL_PIN_GROUP("gpio21", an7583_gpio21), 781 + PINCTRL_PIN_GROUP("gpio23", an7583_gpio23), 782 + PINCTRL_PIN_GROUP("gpio24", an7583_gpio24), 783 + PINCTRL_PIN_GROUP("gpio25", an7583_gpio25), 784 + PINCTRL_PIN_GROUP("gpio26", an7583_gpio26), 785 + PINCTRL_PIN_GROUP("gpio27", an7583_gpio27), 786 + PINCTRL_PIN_GROUP("gpio28", an7583_gpio28), 787 + PINCTRL_PIN_GROUP("gpio29", an7583_gpio29), 788 + PINCTRL_PIN_GROUP("gpio30", an7583_gpio30), 789 + PINCTRL_PIN_GROUP("gpio31", an7583_gpio31), 790 + PINCTRL_PIN_GROUP("gpio33", an7583_gpio33), 791 + PINCTRL_PIN_GROUP("gpio34", an7583_gpio34), 792 + PINCTRL_PIN_GROUP("gpio35", an7583_gpio35), 793 + PINCTRL_PIN_GROUP("gpio36", an7583_gpio36), 794 + PINCTRL_PIN_GROUP("gpio37", an7583_gpio37), 795 + PINCTRL_PIN_GROUP("gpio38", an7583_gpio38), 796 + PINCTRL_PIN_GROUP("gpio39", an7583_gpio39), 797 + PINCTRL_PIN_GROUP("gpio40", an7583_gpio40), 798 + PINCTRL_PIN_GROUP("gpio41", an7583_gpio41), 799 + PINCTRL_PIN_GROUP("gpio42", an7583_gpio42), 800 + PINCTRL_PIN_GROUP("gpio43", an7583_gpio43), 801 + PINCTRL_PIN_GROUP("gpio44", an7583_gpio44), 802 + PINCTRL_PIN_GROUP("gpio45", an7583_gpio45), 803 + PINCTRL_PIN_GROUP("gpio46", an7583_gpio46), 804 + PINCTRL_PIN_GROUP("gpio47", an7583_gpio47), 805 + PINCTRL_PIN_GROUP("gpio48", an7583_gpio48), 806 + PINCTRL_PIN_GROUP("pcie_reset0", an7583_pcie_reset0), 807 + PINCTRL_PIN_GROUP("pcie_reset1", an7583_pcie_reset1), 643 808 }; 644 809 645 810 static const char *const pon_groups[] = { "pon" }; 646 811 static const char *const tod_1pps_groups[] = { "pon_tod_1pps", "gsw_tod_1pps" }; 647 812 static const char *const sipo_groups[] = { "sipo", "sipo_rclk" }; 648 813 static const char *const mdio_groups[] = { "mdio" }; 814 + static const char *const an7583_mdio_groups[] = { "mdio" }; 649 815 static const char *const uart_groups[] = { "uart2", "uart2_cts_rts", "hsuart", 650 816 "hsuart_cts_rts", "uart4", 651 817 "uart5" }; ··· 871 611 "pcm_spi_cs2_p156", 872 612 "pcm_spi_cs2_p128", 873 613 "pcm_spi_cs3", "pcm_spi_cs4" }; 614 + static const char *const an7583_pcm_spi_groups[] = { "pcm_spi", "pcm_spi_int", 615 + "pcm_spi_rst", "pcm_spi_cs1", 616 + "pcm_spi_cs2", "pcm_spi_cs3", 617 + "pcm_spi_cs4" }; 874 618 static const char *const i2s_groups[] = { "i2s" }; 875 619 static const char *const emmc_groups[] = { "emmc" }; 876 620 static const char *const pnand_groups[] = { "pnand" }; 877 621 static const char *const pcie_reset_groups[] = { "pcie_reset0", "pcie_reset1", 878 622 "pcie_reset2" }; 623 + static const char *const an7583_pcie_reset_groups[] = { "pcie_reset0", "pcie_reset1" }; 879 624 static const char *const pwm_groups[] = { "gpio0", "gpio1", 880 625 "gpio2", "gpio3", 881 626 "gpio4", "gpio5", ··· 919 654 "gpio45", "gpio46" }; 920 655 static const char *const phy4_led1_groups[] = { "gpio43", "gpio44", 921 656 "gpio45", "gpio46" }; 657 + static const char *const an7583_phy1_led0_groups[] = { "gpio1", "gpio2", 658 + "gpio3", "gpio4" }; 659 + static const char *const an7583_phy2_led0_groups[] = { "gpio1", "gpio2", 660 + "gpio3", "gpio4" }; 661 + static const char *const an7583_phy3_led0_groups[] = { "gpio1", "gpio2", 662 + "gpio3", "gpio4" }; 663 + static const char *const an7583_phy4_led0_groups[] = { "gpio1", "gpio2", 664 + "gpio3", "gpio4" }; 665 + static const char *const an7583_phy1_led1_groups[] = { "gpio8", "gpio9", 666 + "gpio10", "gpio11" }; 667 + static const char *const an7583_phy2_led1_groups[] = { "gpio8", "gpio9", 668 + "gpio10", "gpio11" }; 669 + static const char *const an7583_phy3_led1_groups[] = { "gpio8", "gpio9", 670 + "gpio10", "gpio11" }; 671 + static const char *const an7583_phy4_led1_groups[] = { "gpio8", "gpio9", 672 + "gpio10", "gpio11" }; 922 673 923 674 static const struct airoha_pinctrl_func_group pon_func_group[] = { 924 675 { ··· 1007 726 REG_FORCE_GPIO_EN, 1008 727 FORCE_GPIO_EN(1) | FORCE_GPIO_EN(2), 1009 728 FORCE_GPIO_EN(1) | FORCE_GPIO_EN(2) 729 + }, 730 + .regmap_size = 2, 731 + }, 732 + }; 733 + 734 + static const struct airoha_pinctrl_func_group an7583_mdio_func_group[] = { 735 + { 736 + .name = "mdio", 737 + .regmap[0] = { 738 + AIROHA_FUNC_MUX, 739 + REG_GPIO_PON_MODE, 740 + GPIO_SGMII_MDIO_MODE_MASK, 741 + GPIO_SGMII_MDIO_MODE_MASK 742 + }, 743 + .regmap[1] = { 744 + AIROHA_FUNC_MUX, 745 + REG_GPIO_SPI_CS1_MODE, 746 + GPIO_MDC_IO_MASTER_MODE_MODE, 747 + GPIO_MDC_IO_MASTER_MODE_MODE 1010 748 }, 1011 749 .regmap_size = 2, 1012 750 }, ··· 1272 972 }, 1273 973 }; 1274 974 975 + static const struct airoha_pinctrl_func_group an7583_pcm_spi_func_group[] = { 976 + { 977 + .name = "pcm_spi", 978 + .regmap[0] = { 979 + AIROHA_FUNC_MUX, 980 + REG_GPIO_SPI_CS1_MODE, 981 + GPIO_PCM_SPI_MODE_MASK, 982 + GPIO_PCM_SPI_MODE_MASK 983 + }, 984 + .regmap_size = 1, 985 + }, { 986 + .name = "pcm_spi_int", 987 + .regmap[0] = { 988 + AIROHA_FUNC_MUX, 989 + REG_GPIO_SPI_CS1_MODE, 990 + GPIO_PCM_INT_MODE_MASK, 991 + GPIO_PCM_INT_MODE_MASK 992 + }, 993 + .regmap_size = 1, 994 + }, { 995 + .name = "pcm_spi_rst", 996 + .regmap[0] = { 997 + AIROHA_FUNC_MUX, 998 + REG_GPIO_SPI_CS1_MODE, 999 + GPIO_PCM_RESET_MODE_MASK, 1000 + GPIO_PCM_RESET_MODE_MASK 1001 + }, 1002 + .regmap_size = 1, 1003 + }, { 1004 + .name = "pcm_spi_cs1", 1005 + .regmap[0] = { 1006 + AIROHA_FUNC_MUX, 1007 + REG_GPIO_SPI_CS1_MODE, 1008 + GPIO_PCM_SPI_CS1_MODE_MASK, 1009 + GPIO_PCM_SPI_CS1_MODE_MASK 1010 + }, 1011 + .regmap_size = 1, 1012 + }, { 1013 + .name = "pcm_spi_cs2", 1014 + .regmap[0] = { 1015 + AIROHA_FUNC_MUX, 1016 + REG_GPIO_SPI_CS1_MODE, 1017 + AN7583_GPIO_PCM_SPI_CS2_MODE_MASK, 1018 + AN7583_GPIO_PCM_SPI_CS2_MODE_MASK 1019 + }, 1020 + .regmap_size = 1, 1021 + }, { 1022 + .name = "pcm_spi_cs3", 1023 + .regmap[0] = { 1024 + AIROHA_FUNC_MUX, 1025 + REG_GPIO_SPI_CS1_MODE, 1026 + GPIO_PCM_SPI_CS3_MODE_MASK, 1027 + GPIO_PCM_SPI_CS3_MODE_MASK 1028 + }, 1029 + .regmap_size = 1, 1030 + }, { 1031 + .name = "pcm_spi_cs4", 1032 + .regmap[0] = { 1033 + AIROHA_FUNC_MUX, 1034 + REG_GPIO_SPI_CS1_MODE, 1035 + GPIO_PCM_SPI_CS4_MODE_MASK, 1036 + GPIO_PCM_SPI_CS4_MODE_MASK 1037 + }, 1038 + .regmap_size = 1, 1039 + }, 1040 + }; 1041 + 1275 1042 static const struct airoha_pinctrl_func_group i2s_func_group[] = { 1276 1043 { 1277 1044 .name = "i2s", ··· 1409 1042 }, 1410 1043 }; 1411 1044 1412 - /* PWM */ 1413 - static const struct airoha_pinctrl_func_group pwm_func_group[] = { 1045 + static const struct airoha_pinctrl_func_group an7583_pcie_reset_func_group[] = { 1414 1046 { 1415 - .name = "gpio0", 1047 + .name = "pcie_reset0", 1416 1048 .regmap[0] = { 1417 - AIROHA_FUNC_PWM_MUX, 1418 - REG_GPIO_FLASH_MODE_CFG, 1419 - GPIO0_FLASH_MODE_CFG, 1420 - GPIO0_FLASH_MODE_CFG 1049 + AIROHA_FUNC_MUX, 1050 + REG_GPIO_PON_MODE, 1051 + GPIO_PCIE_RESET0_MASK, 1052 + GPIO_PCIE_RESET0_MASK 1421 1053 }, 1422 1054 .regmap_size = 1, 1423 1055 }, { 1424 - .name = "gpio1", 1056 + .name = "pcie_reset1", 1425 1057 .regmap[0] = { 1426 - AIROHA_FUNC_PWM_MUX, 1427 - REG_GPIO_FLASH_MODE_CFG, 1428 - GPIO1_FLASH_MODE_CFG, 1429 - GPIO1_FLASH_MODE_CFG 1430 - }, 1431 - .regmap_size = 1, 1432 - }, { 1433 - .name = "gpio2", 1434 - .regmap[0] = { 1435 - AIROHA_FUNC_PWM_MUX, 1436 - REG_GPIO_FLASH_MODE_CFG, 1437 - GPIO2_FLASH_MODE_CFG, 1438 - GPIO2_FLASH_MODE_CFG 1439 - }, 1440 - .regmap_size = 1, 1441 - }, { 1442 - .name = "gpio3", 1443 - .regmap[0] = { 1444 - AIROHA_FUNC_PWM_MUX, 1445 - REG_GPIO_FLASH_MODE_CFG, 1446 - GPIO3_FLASH_MODE_CFG, 1447 - GPIO3_FLASH_MODE_CFG 1448 - }, 1449 - .regmap_size = 1, 1450 - }, { 1451 - .name = "gpio4", 1452 - .regmap[0] = { 1453 - AIROHA_FUNC_PWM_MUX, 1454 - REG_GPIO_FLASH_MODE_CFG, 1455 - GPIO4_FLASH_MODE_CFG, 1456 - GPIO4_FLASH_MODE_CFG 1457 - }, 1458 - .regmap_size = 1, 1459 - }, { 1460 - .name = "gpio5", 1461 - .regmap[0] = { 1462 - AIROHA_FUNC_PWM_MUX, 1463 - REG_GPIO_FLASH_MODE_CFG, 1464 - GPIO5_FLASH_MODE_CFG, 1465 - GPIO5_FLASH_MODE_CFG 1466 - }, 1467 - .regmap_size = 1, 1468 - }, { 1469 - .name = "gpio6", 1470 - .regmap[0] = { 1471 - AIROHA_FUNC_PWM_MUX, 1472 - REG_GPIO_FLASH_MODE_CFG, 1473 - GPIO6_FLASH_MODE_CFG, 1474 - GPIO6_FLASH_MODE_CFG 1475 - }, 1476 - .regmap_size = 1, 1477 - }, { 1478 - .name = "gpio7", 1479 - .regmap[0] = { 1480 - AIROHA_FUNC_PWM_MUX, 1481 - REG_GPIO_FLASH_MODE_CFG, 1482 - GPIO7_FLASH_MODE_CFG, 1483 - GPIO7_FLASH_MODE_CFG 1484 - }, 1485 - .regmap_size = 1, 1486 - }, { 1487 - .name = "gpio8", 1488 - .regmap[0] = { 1489 - AIROHA_FUNC_PWM_MUX, 1490 - REG_GPIO_FLASH_MODE_CFG, 1491 - GPIO8_FLASH_MODE_CFG, 1492 - GPIO8_FLASH_MODE_CFG 1493 - }, 1494 - .regmap_size = 1, 1495 - }, { 1496 - .name = "gpio9", 1497 - .regmap[0] = { 1498 - AIROHA_FUNC_PWM_MUX, 1499 - REG_GPIO_FLASH_MODE_CFG, 1500 - GPIO9_FLASH_MODE_CFG, 1501 - GPIO9_FLASH_MODE_CFG 1502 - }, 1503 - .regmap_size = 1, 1504 - }, { 1505 - .name = "gpio10", 1506 - .regmap[0] = { 1507 - AIROHA_FUNC_PWM_MUX, 1508 - REG_GPIO_FLASH_MODE_CFG, 1509 - GPIO10_FLASH_MODE_CFG, 1510 - GPIO10_FLASH_MODE_CFG 1511 - }, 1512 - .regmap_size = 1, 1513 - }, { 1514 - .name = "gpio11", 1515 - .regmap[0] = { 1516 - AIROHA_FUNC_PWM_MUX, 1517 - REG_GPIO_FLASH_MODE_CFG, 1518 - GPIO11_FLASH_MODE_CFG, 1519 - GPIO11_FLASH_MODE_CFG 1520 - }, 1521 - .regmap_size = 1, 1522 - }, { 1523 - .name = "gpio12", 1524 - .regmap[0] = { 1525 - AIROHA_FUNC_PWM_MUX, 1526 - REG_GPIO_FLASH_MODE_CFG, 1527 - GPIO12_FLASH_MODE_CFG, 1528 - GPIO12_FLASH_MODE_CFG 1529 - }, 1530 - .regmap_size = 1, 1531 - }, { 1532 - .name = "gpio13", 1533 - .regmap[0] = { 1534 - AIROHA_FUNC_PWM_MUX, 1535 - REG_GPIO_FLASH_MODE_CFG, 1536 - GPIO13_FLASH_MODE_CFG, 1537 - GPIO13_FLASH_MODE_CFG 1538 - }, 1539 - .regmap_size = 1, 1540 - }, { 1541 - .name = "gpio14", 1542 - .regmap[0] = { 1543 - AIROHA_FUNC_PWM_MUX, 1544 - REG_GPIO_FLASH_MODE_CFG, 1545 - GPIO14_FLASH_MODE_CFG, 1546 - GPIO14_FLASH_MODE_CFG 1547 - }, 1548 - .regmap_size = 1, 1549 - }, { 1550 - .name = "gpio15", 1551 - .regmap[0] = { 1552 - AIROHA_FUNC_PWM_MUX, 1553 - REG_GPIO_FLASH_MODE_CFG, 1554 - GPIO15_FLASH_MODE_CFG, 1555 - GPIO15_FLASH_MODE_CFG 1556 - }, 1557 - .regmap_size = 1, 1558 - }, { 1559 - .name = "gpio16", 1560 - .regmap[0] = { 1561 - AIROHA_FUNC_PWM_EXT_MUX, 1562 - REG_GPIO_FLASH_MODE_CFG_EXT, 1563 - GPIO16_FLASH_MODE_CFG, 1564 - GPIO16_FLASH_MODE_CFG 1565 - }, 1566 - .regmap_size = 1, 1567 - }, { 1568 - .name = "gpio17", 1569 - .regmap[0] = { 1570 - AIROHA_FUNC_PWM_EXT_MUX, 1571 - REG_GPIO_FLASH_MODE_CFG_EXT, 1572 - GPIO17_FLASH_MODE_CFG, 1573 - GPIO17_FLASH_MODE_CFG 1574 - }, 1575 - .regmap_size = 1, 1576 - }, { 1577 - .name = "gpio18", 1578 - .regmap[0] = { 1579 - AIROHA_FUNC_PWM_EXT_MUX, 1580 - REG_GPIO_FLASH_MODE_CFG_EXT, 1581 - GPIO18_FLASH_MODE_CFG, 1582 - GPIO18_FLASH_MODE_CFG 1583 - }, 1584 - .regmap_size = 1, 1585 - }, { 1586 - .name = "gpio19", 1587 - .regmap[0] = { 1588 - AIROHA_FUNC_PWM_EXT_MUX, 1589 - REG_GPIO_FLASH_MODE_CFG_EXT, 1590 - GPIO19_FLASH_MODE_CFG, 1591 - GPIO19_FLASH_MODE_CFG 1592 - }, 1593 - .regmap_size = 1, 1594 - }, { 1595 - .name = "gpio20", 1596 - .regmap[0] = { 1597 - AIROHA_FUNC_PWM_EXT_MUX, 1598 - REG_GPIO_FLASH_MODE_CFG_EXT, 1599 - GPIO20_FLASH_MODE_CFG, 1600 - GPIO20_FLASH_MODE_CFG 1601 - }, 1602 - .regmap_size = 1, 1603 - }, { 1604 - .name = "gpio21", 1605 - .regmap[0] = { 1606 - AIROHA_FUNC_PWM_EXT_MUX, 1607 - REG_GPIO_FLASH_MODE_CFG_EXT, 1608 - GPIO21_FLASH_MODE_CFG, 1609 - GPIO21_FLASH_MODE_CFG 1610 - }, 1611 - .regmap_size = 1, 1612 - }, { 1613 - .name = "gpio22", 1614 - .regmap[0] = { 1615 - AIROHA_FUNC_PWM_EXT_MUX, 1616 - REG_GPIO_FLASH_MODE_CFG_EXT, 1617 - GPIO22_FLASH_MODE_CFG, 1618 - GPIO22_FLASH_MODE_CFG 1619 - }, 1620 - .regmap_size = 1, 1621 - }, { 1622 - .name = "gpio23", 1623 - .regmap[0] = { 1624 - AIROHA_FUNC_PWM_EXT_MUX, 1625 - REG_GPIO_FLASH_MODE_CFG_EXT, 1626 - GPIO23_FLASH_MODE_CFG, 1627 - GPIO23_FLASH_MODE_CFG 1628 - }, 1629 - .regmap_size = 1, 1630 - }, { 1631 - .name = "gpio24", 1632 - .regmap[0] = { 1633 - AIROHA_FUNC_PWM_EXT_MUX, 1634 - REG_GPIO_FLASH_MODE_CFG_EXT, 1635 - GPIO24_FLASH_MODE_CFG, 1636 - GPIO24_FLASH_MODE_CFG 1637 - }, 1638 - .regmap_size = 1, 1639 - }, { 1640 - .name = "gpio25", 1641 - .regmap[0] = { 1642 - AIROHA_FUNC_PWM_EXT_MUX, 1643 - REG_GPIO_FLASH_MODE_CFG_EXT, 1644 - GPIO25_FLASH_MODE_CFG, 1645 - GPIO25_FLASH_MODE_CFG 1646 - }, 1647 - .regmap_size = 1, 1648 - }, { 1649 - .name = "gpio26", 1650 - .regmap[0] = { 1651 - AIROHA_FUNC_PWM_EXT_MUX, 1652 - REG_GPIO_FLASH_MODE_CFG_EXT, 1653 - GPIO26_FLASH_MODE_CFG, 1654 - GPIO26_FLASH_MODE_CFG 1655 - }, 1656 - .regmap_size = 1, 1657 - }, { 1658 - .name = "gpio27", 1659 - .regmap[0] = { 1660 - AIROHA_FUNC_PWM_EXT_MUX, 1661 - REG_GPIO_FLASH_MODE_CFG_EXT, 1662 - GPIO27_FLASH_MODE_CFG, 1663 - GPIO27_FLASH_MODE_CFG 1664 - }, 1665 - .regmap_size = 1, 1666 - }, { 1667 - .name = "gpio28", 1668 - .regmap[0] = { 1669 - AIROHA_FUNC_PWM_EXT_MUX, 1670 - REG_GPIO_FLASH_MODE_CFG_EXT, 1671 - GPIO28_FLASH_MODE_CFG, 1672 - GPIO28_FLASH_MODE_CFG 1673 - }, 1674 - .regmap_size = 1, 1675 - }, { 1676 - .name = "gpio29", 1677 - .regmap[0] = { 1678 - AIROHA_FUNC_PWM_EXT_MUX, 1679 - REG_GPIO_FLASH_MODE_CFG_EXT, 1680 - GPIO29_FLASH_MODE_CFG, 1681 - GPIO29_FLASH_MODE_CFG 1682 - }, 1683 - .regmap_size = 1, 1684 - }, { 1685 - .name = "gpio30", 1686 - .regmap[0] = { 1687 - AIROHA_FUNC_PWM_EXT_MUX, 1688 - REG_GPIO_FLASH_MODE_CFG_EXT, 1689 - GPIO30_FLASH_MODE_CFG, 1690 - GPIO30_FLASH_MODE_CFG 1691 - }, 1692 - .regmap_size = 1, 1693 - }, { 1694 - .name = "gpio31", 1695 - .regmap[0] = { 1696 - AIROHA_FUNC_PWM_EXT_MUX, 1697 - REG_GPIO_FLASH_MODE_CFG_EXT, 1698 - GPIO31_FLASH_MODE_CFG, 1699 - GPIO31_FLASH_MODE_CFG 1700 - }, 1701 - .regmap_size = 1, 1702 - }, { 1703 - .name = "gpio36", 1704 - .regmap[0] = { 1705 - AIROHA_FUNC_PWM_EXT_MUX, 1706 - REG_GPIO_FLASH_MODE_CFG_EXT, 1707 - GPIO36_FLASH_MODE_CFG, 1708 - GPIO36_FLASH_MODE_CFG 1709 - }, 1710 - .regmap_size = 1, 1711 - }, { 1712 - .name = "gpio37", 1713 - .regmap[0] = { 1714 - AIROHA_FUNC_PWM_EXT_MUX, 1715 - REG_GPIO_FLASH_MODE_CFG_EXT, 1716 - GPIO37_FLASH_MODE_CFG, 1717 - GPIO37_FLASH_MODE_CFG 1718 - }, 1719 - .regmap_size = 1, 1720 - }, { 1721 - .name = "gpio38", 1722 - .regmap[0] = { 1723 - AIROHA_FUNC_PWM_EXT_MUX, 1724 - REG_GPIO_FLASH_MODE_CFG_EXT, 1725 - GPIO38_FLASH_MODE_CFG, 1726 - GPIO38_FLASH_MODE_CFG 1727 - }, 1728 - .regmap_size = 1, 1729 - }, { 1730 - .name = "gpio39", 1731 - .regmap[0] = { 1732 - AIROHA_FUNC_PWM_EXT_MUX, 1733 - REG_GPIO_FLASH_MODE_CFG_EXT, 1734 - GPIO39_FLASH_MODE_CFG, 1735 - GPIO39_FLASH_MODE_CFG 1736 - }, 1737 - .regmap_size = 1, 1738 - }, { 1739 - .name = "gpio40", 1740 - .regmap[0] = { 1741 - AIROHA_FUNC_PWM_EXT_MUX, 1742 - REG_GPIO_FLASH_MODE_CFG_EXT, 1743 - GPIO40_FLASH_MODE_CFG, 1744 - GPIO40_FLASH_MODE_CFG 1745 - }, 1746 - .regmap_size = 1, 1747 - }, { 1748 - .name = "gpio41", 1749 - .regmap[0] = { 1750 - AIROHA_FUNC_PWM_EXT_MUX, 1751 - REG_GPIO_FLASH_MODE_CFG_EXT, 1752 - GPIO41_FLASH_MODE_CFG, 1753 - GPIO41_FLASH_MODE_CFG 1754 - }, 1755 - .regmap_size = 1, 1756 - }, { 1757 - .name = "gpio42", 1758 - .regmap[0] = { 1759 - AIROHA_FUNC_PWM_EXT_MUX, 1760 - REG_GPIO_FLASH_MODE_CFG_EXT, 1761 - GPIO42_FLASH_MODE_CFG, 1762 - GPIO42_FLASH_MODE_CFG 1763 - }, 1764 - .regmap_size = 1, 1765 - }, { 1766 - .name = "gpio43", 1767 - .regmap[0] = { 1768 - AIROHA_FUNC_PWM_EXT_MUX, 1769 - REG_GPIO_FLASH_MODE_CFG_EXT, 1770 - GPIO43_FLASH_MODE_CFG, 1771 - GPIO43_FLASH_MODE_CFG 1772 - }, 1773 - .regmap_size = 1, 1774 - }, { 1775 - .name = "gpio44", 1776 - .regmap[0] = { 1777 - AIROHA_FUNC_PWM_EXT_MUX, 1778 - REG_GPIO_FLASH_MODE_CFG_EXT, 1779 - GPIO44_FLASH_MODE_CFG, 1780 - GPIO44_FLASH_MODE_CFG 1781 - }, 1782 - .regmap_size = 1, 1783 - }, { 1784 - .name = "gpio45", 1785 - .regmap[0] = { 1786 - AIROHA_FUNC_PWM_EXT_MUX, 1787 - REG_GPIO_FLASH_MODE_CFG_EXT, 1788 - GPIO45_FLASH_MODE_CFG, 1789 - GPIO45_FLASH_MODE_CFG 1790 - }, 1791 - .regmap_size = 1, 1792 - }, { 1793 - .name = "gpio46", 1794 - .regmap[0] = { 1795 - AIROHA_FUNC_PWM_EXT_MUX, 1796 - REG_GPIO_FLASH_MODE_CFG_EXT, 1797 - GPIO46_FLASH_MODE_CFG, 1798 - GPIO46_FLASH_MODE_CFG 1799 - }, 1800 - .regmap_size = 1, 1801 - }, { 1802 - .name = "gpio47", 1803 - .regmap[0] = { 1804 - AIROHA_FUNC_PWM_EXT_MUX, 1805 - REG_GPIO_FLASH_MODE_CFG_EXT, 1806 - GPIO47_FLASH_MODE_CFG, 1807 - GPIO47_FLASH_MODE_CFG 1058 + AIROHA_FUNC_MUX, 1059 + REG_GPIO_PON_MODE, 1060 + GPIO_PCIE_RESET1_MASK, 1061 + GPIO_PCIE_RESET1_MASK 1808 1062 }, 1809 1063 .regmap_size = 1, 1810 1064 }, 1811 1065 }; 1812 1066 1067 + /* PWM */ 1068 + #define AIROHA_PINCTRL_PWM(gpio, mux_val) \ 1069 + { \ 1070 + .name = (gpio), \ 1071 + .regmap[0] = { \ 1072 + AIROHA_FUNC_PWM_MUX, \ 1073 + REG_GPIO_FLASH_MODE_CFG, \ 1074 + (mux_val), \ 1075 + (mux_val) \ 1076 + }, \ 1077 + .regmap_size = 1, \ 1078 + } \ 1079 + 1080 + #define AIROHA_PINCTRL_PWM_EXT(gpio, mux_val) \ 1081 + { \ 1082 + .name = (gpio), \ 1083 + .regmap[0] = { \ 1084 + AIROHA_FUNC_PWM_EXT_MUX, \ 1085 + REG_GPIO_FLASH_MODE_CFG_EXT, \ 1086 + (mux_val), \ 1087 + (mux_val) \ 1088 + }, \ 1089 + .regmap_size = 1, \ 1090 + } \ 1091 + 1092 + static const struct airoha_pinctrl_func_group pwm_func_group[] = { 1093 + AIROHA_PINCTRL_PWM("gpio0", GPIO0_FLASH_MODE_CFG), 1094 + AIROHA_PINCTRL_PWM("gpio1", GPIO1_FLASH_MODE_CFG), 1095 + AIROHA_PINCTRL_PWM("gpio2", GPIO2_FLASH_MODE_CFG), 1096 + AIROHA_PINCTRL_PWM("gpio3", GPIO3_FLASH_MODE_CFG), 1097 + AIROHA_PINCTRL_PWM("gpio4", GPIO4_FLASH_MODE_CFG), 1098 + AIROHA_PINCTRL_PWM("gpio5", GPIO5_FLASH_MODE_CFG), 1099 + AIROHA_PINCTRL_PWM("gpio6", GPIO6_FLASH_MODE_CFG), 1100 + AIROHA_PINCTRL_PWM("gpio7", GPIO7_FLASH_MODE_CFG), 1101 + AIROHA_PINCTRL_PWM("gpio8", GPIO8_FLASH_MODE_CFG), 1102 + AIROHA_PINCTRL_PWM("gpio9", GPIO9_FLASH_MODE_CFG), 1103 + AIROHA_PINCTRL_PWM("gpio10", GPIO10_FLASH_MODE_CFG), 1104 + AIROHA_PINCTRL_PWM("gpio11", GPIO11_FLASH_MODE_CFG), 1105 + AIROHA_PINCTRL_PWM("gpio12", GPIO12_FLASH_MODE_CFG), 1106 + AIROHA_PINCTRL_PWM("gpio13", GPIO13_FLASH_MODE_CFG), 1107 + AIROHA_PINCTRL_PWM("gpio14", GPIO14_FLASH_MODE_CFG), 1108 + AIROHA_PINCTRL_PWM("gpio15", GPIO15_FLASH_MODE_CFG), 1109 + AIROHA_PINCTRL_PWM_EXT("gpio16", GPIO16_FLASH_MODE_CFG), 1110 + AIROHA_PINCTRL_PWM_EXT("gpio17", GPIO17_FLASH_MODE_CFG), 1111 + AIROHA_PINCTRL_PWM_EXT("gpio18", GPIO18_FLASH_MODE_CFG), 1112 + AIROHA_PINCTRL_PWM_EXT("gpio19", GPIO19_FLASH_MODE_CFG), 1113 + AIROHA_PINCTRL_PWM_EXT("gpio20", GPIO20_FLASH_MODE_CFG), 1114 + AIROHA_PINCTRL_PWM_EXT("gpio21", GPIO21_FLASH_MODE_CFG), 1115 + AIROHA_PINCTRL_PWM_EXT("gpio22", GPIO22_FLASH_MODE_CFG), 1116 + AIROHA_PINCTRL_PWM_EXT("gpio23", GPIO23_FLASH_MODE_CFG), 1117 + AIROHA_PINCTRL_PWM_EXT("gpio24", GPIO24_FLASH_MODE_CFG), 1118 + AIROHA_PINCTRL_PWM_EXT("gpio25", GPIO25_FLASH_MODE_CFG), 1119 + AIROHA_PINCTRL_PWM_EXT("gpio26", GPIO26_FLASH_MODE_CFG), 1120 + AIROHA_PINCTRL_PWM_EXT("gpio27", GPIO27_FLASH_MODE_CFG), 1121 + AIROHA_PINCTRL_PWM_EXT("gpio28", GPIO28_FLASH_MODE_CFG), 1122 + AIROHA_PINCTRL_PWM_EXT("gpio29", GPIO29_FLASH_MODE_CFG), 1123 + AIROHA_PINCTRL_PWM_EXT("gpio30", GPIO30_FLASH_MODE_CFG), 1124 + AIROHA_PINCTRL_PWM_EXT("gpio31", GPIO31_FLASH_MODE_CFG), 1125 + AIROHA_PINCTRL_PWM_EXT("gpio36", GPIO36_FLASH_MODE_CFG), 1126 + AIROHA_PINCTRL_PWM_EXT("gpio37", GPIO37_FLASH_MODE_CFG), 1127 + AIROHA_PINCTRL_PWM_EXT("gpio38", GPIO38_FLASH_MODE_CFG), 1128 + AIROHA_PINCTRL_PWM_EXT("gpio39", GPIO39_FLASH_MODE_CFG), 1129 + AIROHA_PINCTRL_PWM_EXT("gpio40", GPIO40_FLASH_MODE_CFG), 1130 + AIROHA_PINCTRL_PWM_EXT("gpio41", GPIO41_FLASH_MODE_CFG), 1131 + AIROHA_PINCTRL_PWM_EXT("gpio42", GPIO42_FLASH_MODE_CFG), 1132 + AIROHA_PINCTRL_PWM_EXT("gpio43", GPIO43_FLASH_MODE_CFG), 1133 + AIROHA_PINCTRL_PWM_EXT("gpio44", GPIO44_FLASH_MODE_CFG), 1134 + AIROHA_PINCTRL_PWM_EXT("gpio45", GPIO45_FLASH_MODE_CFG), 1135 + AIROHA_PINCTRL_PWM_EXT("gpio46", GPIO46_FLASH_MODE_CFG), 1136 + AIROHA_PINCTRL_PWM_EXT("gpio47", GPIO47_FLASH_MODE_CFG), 1137 + }; 1138 + 1139 + #define AIROHA_PINCTRL_PHY_LED0(gpio, mux_val, map_mask, map_val) \ 1140 + { \ 1141 + .name = (gpio), \ 1142 + .regmap[0] = { \ 1143 + AIROHA_FUNC_MUX, \ 1144 + REG_GPIO_2ND_I2C_MODE, \ 1145 + (mux_val), \ 1146 + (mux_val), \ 1147 + }, \ 1148 + .regmap[1] = { \ 1149 + AIROHA_FUNC_MUX, \ 1150 + REG_LAN_LED0_MAPPING, \ 1151 + (map_mask), \ 1152 + (map_val), \ 1153 + }, \ 1154 + .regmap_size = 2, \ 1155 + } 1156 + 1157 + #define AIROHA_PINCTRL_PHY_LED1(gpio, mux_val, map_mask, map_val) \ 1158 + { \ 1159 + .name = (gpio), \ 1160 + .regmap[0] = { \ 1161 + AIROHA_FUNC_MUX, \ 1162 + REG_GPIO_2ND_I2C_MODE, \ 1163 + (mux_val), \ 1164 + (mux_val), \ 1165 + }, \ 1166 + .regmap[1] = { \ 1167 + AIROHA_FUNC_MUX, \ 1168 + REG_LAN_LED1_MAPPING, \ 1169 + (map_mask), \ 1170 + (map_val), \ 1171 + }, \ 1172 + .regmap_size = 2, \ 1173 + } 1174 + 1813 1175 static const struct airoha_pinctrl_func_group phy1_led0_func_group[] = { 1814 - { 1815 - .name = "gpio33", 1816 - .regmap[0] = { 1817 - AIROHA_FUNC_MUX, 1818 - REG_GPIO_2ND_I2C_MODE, 1819 - GPIO_LAN0_LED0_MODE_MASK, 1820 - GPIO_LAN0_LED0_MODE_MASK 1821 - }, 1822 - .regmap[1] = { 1823 - AIROHA_FUNC_MUX, 1824 - REG_LAN_LED0_MAPPING, 1825 - LAN0_LED_MAPPING_MASK, 1826 - LAN0_PHY_LED_MAP(0) 1827 - }, 1828 - .regmap_size = 2, 1829 - }, { 1830 - .name = "gpio34", 1831 - .regmap[0] = { 1832 - AIROHA_FUNC_MUX, 1833 - REG_GPIO_2ND_I2C_MODE, 1834 - GPIO_LAN1_LED0_MODE_MASK, 1835 - GPIO_LAN1_LED0_MODE_MASK 1836 - }, 1837 - .regmap[1] = { 1838 - AIROHA_FUNC_MUX, 1839 - REG_LAN_LED0_MAPPING, 1840 - LAN1_LED_MAPPING_MASK, 1841 - LAN1_PHY_LED_MAP(0) 1842 - }, 1843 - .regmap_size = 2, 1844 - }, { 1845 - .name = "gpio35", 1846 - .regmap[0] = { 1847 - AIROHA_FUNC_MUX, 1848 - REG_GPIO_2ND_I2C_MODE, 1849 - GPIO_LAN2_LED0_MODE_MASK, 1850 - GPIO_LAN2_LED0_MODE_MASK 1851 - }, 1852 - .regmap[1] = { 1853 - AIROHA_FUNC_MUX, 1854 - REG_LAN_LED0_MAPPING, 1855 - LAN2_LED_MAPPING_MASK, 1856 - LAN2_PHY_LED_MAP(0) 1857 - }, 1858 - .regmap_size = 2, 1859 - }, { 1860 - .name = "gpio42", 1861 - .regmap[0] = { 1862 - AIROHA_FUNC_MUX, 1863 - REG_GPIO_2ND_I2C_MODE, 1864 - GPIO_LAN3_LED0_MODE_MASK, 1865 - GPIO_LAN3_LED0_MODE_MASK 1866 - }, 1867 - .regmap[1] = { 1868 - AIROHA_FUNC_MUX, 1869 - REG_LAN_LED0_MAPPING, 1870 - LAN3_LED_MAPPING_MASK, 1871 - LAN3_PHY_LED_MAP(0) 1872 - }, 1873 - .regmap_size = 2, 1874 - }, 1176 + AIROHA_PINCTRL_PHY_LED0("gpio33", GPIO_LAN0_LED0_MODE_MASK, 1177 + LAN0_LED_MAPPING_MASK, LAN0_PHY_LED_MAP(0)), 1178 + AIROHA_PINCTRL_PHY_LED0("gpio34", GPIO_LAN1_LED0_MODE_MASK, 1179 + LAN1_LED_MAPPING_MASK, LAN1_PHY_LED_MAP(0)), 1180 + AIROHA_PINCTRL_PHY_LED0("gpio35", GPIO_LAN2_LED0_MODE_MASK, 1181 + LAN2_LED_MAPPING_MASK, LAN2_PHY_LED_MAP(0)), 1182 + AIROHA_PINCTRL_PHY_LED0("gpio42", GPIO_LAN3_LED0_MODE_MASK, 1183 + LAN3_LED_MAPPING_MASK, LAN3_PHY_LED_MAP(0)), 1875 1184 }; 1876 1185 1877 1186 static const struct airoha_pinctrl_func_group phy2_led0_func_group[] = { 1878 - { 1879 - .name = "gpio33", 1880 - .regmap[0] = { 1881 - AIROHA_FUNC_MUX, 1882 - REG_GPIO_2ND_I2C_MODE, 1883 - GPIO_LAN0_LED0_MODE_MASK, 1884 - GPIO_LAN0_LED0_MODE_MASK 1885 - }, 1886 - .regmap[1] = { 1887 - AIROHA_FUNC_MUX, 1888 - REG_LAN_LED0_MAPPING, 1889 - LAN0_LED_MAPPING_MASK, 1890 - LAN0_PHY_LED_MAP(1) 1891 - }, 1892 - .regmap_size = 2, 1893 - }, { 1894 - .name = "gpio34", 1895 - .regmap[0] = { 1896 - AIROHA_FUNC_MUX, 1897 - REG_GPIO_2ND_I2C_MODE, 1898 - GPIO_LAN1_LED0_MODE_MASK, 1899 - GPIO_LAN1_LED0_MODE_MASK 1900 - }, 1901 - .regmap[1] = { 1902 - AIROHA_FUNC_MUX, 1903 - REG_LAN_LED0_MAPPING, 1904 - LAN1_LED_MAPPING_MASK, 1905 - LAN1_PHY_LED_MAP(1) 1906 - }, 1907 - .regmap_size = 2, 1908 - }, { 1909 - .name = "gpio35", 1910 - .regmap[0] = { 1911 - AIROHA_FUNC_MUX, 1912 - REG_GPIO_2ND_I2C_MODE, 1913 - GPIO_LAN2_LED0_MODE_MASK, 1914 - GPIO_LAN2_LED0_MODE_MASK 1915 - }, 1916 - .regmap[1] = { 1917 - AIROHA_FUNC_MUX, 1918 - REG_LAN_LED0_MAPPING, 1919 - LAN2_LED_MAPPING_MASK, 1920 - LAN2_PHY_LED_MAP(1) 1921 - }, 1922 - .regmap_size = 2, 1923 - }, { 1924 - .name = "gpio42", 1925 - .regmap[0] = { 1926 - AIROHA_FUNC_MUX, 1927 - REG_GPIO_2ND_I2C_MODE, 1928 - GPIO_LAN3_LED0_MODE_MASK, 1929 - GPIO_LAN3_LED0_MODE_MASK 1930 - }, 1931 - .regmap[1] = { 1932 - AIROHA_FUNC_MUX, 1933 - REG_LAN_LED0_MAPPING, 1934 - LAN3_LED_MAPPING_MASK, 1935 - LAN3_PHY_LED_MAP(1) 1936 - }, 1937 - .regmap_size = 2, 1938 - }, 1187 + AIROHA_PINCTRL_PHY_LED0("gpio33", GPIO_LAN0_LED0_MODE_MASK, 1188 + LAN0_LED_MAPPING_MASK, LAN0_PHY_LED_MAP(1)), 1189 + AIROHA_PINCTRL_PHY_LED0("gpio34", GPIO_LAN1_LED0_MODE_MASK, 1190 + LAN1_LED_MAPPING_MASK, LAN1_PHY_LED_MAP(1)), 1191 + AIROHA_PINCTRL_PHY_LED0("gpio35", GPIO_LAN2_LED0_MODE_MASK, 1192 + LAN2_LED_MAPPING_MASK, LAN2_PHY_LED_MAP(1)), 1193 + AIROHA_PINCTRL_PHY_LED0("gpio42", GPIO_LAN3_LED0_MODE_MASK, 1194 + LAN3_LED_MAPPING_MASK, LAN3_PHY_LED_MAP(1)), 1939 1195 }; 1940 1196 1941 1197 static const struct airoha_pinctrl_func_group phy3_led0_func_group[] = { 1942 - { 1943 - .name = "gpio33", 1944 - .regmap[0] = { 1945 - AIROHA_FUNC_MUX, 1946 - REG_GPIO_2ND_I2C_MODE, 1947 - GPIO_LAN0_LED0_MODE_MASK, 1948 - GPIO_LAN0_LED0_MODE_MASK 1949 - }, 1950 - .regmap[1] = { 1951 - AIROHA_FUNC_MUX, 1952 - REG_LAN_LED0_MAPPING, 1953 - LAN0_LED_MAPPING_MASK, 1954 - LAN0_PHY_LED_MAP(2) 1955 - }, 1956 - .regmap_size = 2, 1957 - }, { 1958 - .name = "gpio34", 1959 - .regmap[0] = { 1960 - AIROHA_FUNC_MUX, 1961 - REG_GPIO_2ND_I2C_MODE, 1962 - GPIO_LAN1_LED0_MODE_MASK, 1963 - GPIO_LAN1_LED0_MODE_MASK 1964 - }, 1965 - .regmap[1] = { 1966 - AIROHA_FUNC_MUX, 1967 - REG_LAN_LED0_MAPPING, 1968 - LAN1_LED_MAPPING_MASK, 1969 - LAN1_PHY_LED_MAP(2) 1970 - }, 1971 - .regmap_size = 2, 1972 - }, { 1973 - .name = "gpio35", 1974 - .regmap[0] = { 1975 - AIROHA_FUNC_MUX, 1976 - REG_GPIO_2ND_I2C_MODE, 1977 - GPIO_LAN2_LED0_MODE_MASK, 1978 - GPIO_LAN2_LED0_MODE_MASK 1979 - }, 1980 - .regmap[1] = { 1981 - AIROHA_FUNC_MUX, 1982 - REG_LAN_LED0_MAPPING, 1983 - LAN2_LED_MAPPING_MASK, 1984 - LAN2_PHY_LED_MAP(2) 1985 - }, 1986 - .regmap_size = 2, 1987 - }, { 1988 - .name = "gpio42", 1989 - .regmap[0] = { 1990 - AIROHA_FUNC_MUX, 1991 - REG_GPIO_2ND_I2C_MODE, 1992 - GPIO_LAN3_LED0_MODE_MASK, 1993 - GPIO_LAN3_LED0_MODE_MASK 1994 - }, 1995 - .regmap[1] = { 1996 - AIROHA_FUNC_MUX, 1997 - REG_LAN_LED0_MAPPING, 1998 - LAN3_LED_MAPPING_MASK, 1999 - LAN3_PHY_LED_MAP(2) 2000 - }, 2001 - .regmap_size = 2, 2002 - }, 1198 + AIROHA_PINCTRL_PHY_LED0("gpio33", GPIO_LAN0_LED0_MODE_MASK, 1199 + LAN0_LED_MAPPING_MASK, LAN0_PHY_LED_MAP(2)), 1200 + AIROHA_PINCTRL_PHY_LED0("gpio34", GPIO_LAN1_LED0_MODE_MASK, 1201 + LAN1_LED_MAPPING_MASK, LAN1_PHY_LED_MAP(2)), 1202 + AIROHA_PINCTRL_PHY_LED0("gpio35", GPIO_LAN2_LED0_MODE_MASK, 1203 + LAN2_LED_MAPPING_MASK, LAN2_PHY_LED_MAP(2)), 1204 + AIROHA_PINCTRL_PHY_LED0("gpio42", GPIO_LAN3_LED0_MODE_MASK, 1205 + LAN3_LED_MAPPING_MASK, LAN3_PHY_LED_MAP(2)), 2003 1206 }; 2004 1207 2005 1208 static const struct airoha_pinctrl_func_group phy4_led0_func_group[] = { 2006 - { 2007 - .name = "gpio33", 2008 - .regmap[0] = { 2009 - AIROHA_FUNC_MUX, 2010 - REG_GPIO_2ND_I2C_MODE, 2011 - GPIO_LAN0_LED0_MODE_MASK, 2012 - GPIO_LAN0_LED0_MODE_MASK 2013 - }, 2014 - .regmap[1] = { 2015 - AIROHA_FUNC_MUX, 2016 - REG_LAN_LED0_MAPPING, 2017 - LAN0_LED_MAPPING_MASK, 2018 - LAN0_PHY_LED_MAP(3) 2019 - }, 2020 - .regmap_size = 2, 2021 - }, { 2022 - .name = "gpio34", 2023 - .regmap[0] = { 2024 - AIROHA_FUNC_MUX, 2025 - REG_GPIO_2ND_I2C_MODE, 2026 - GPIO_LAN1_LED0_MODE_MASK, 2027 - GPIO_LAN1_LED0_MODE_MASK 2028 - }, 2029 - .regmap[1] = { 2030 - AIROHA_FUNC_MUX, 2031 - REG_LAN_LED0_MAPPING, 2032 - LAN1_LED_MAPPING_MASK, 2033 - LAN1_PHY_LED_MAP(3) 2034 - }, 2035 - .regmap_size = 2, 2036 - }, { 2037 - .name = "gpio35", 2038 - .regmap[0] = { 2039 - AIROHA_FUNC_MUX, 2040 - REG_GPIO_2ND_I2C_MODE, 2041 - GPIO_LAN2_LED0_MODE_MASK, 2042 - GPIO_LAN2_LED0_MODE_MASK 2043 - }, 2044 - .regmap[1] = { 2045 - AIROHA_FUNC_MUX, 2046 - REG_LAN_LED0_MAPPING, 2047 - LAN2_LED_MAPPING_MASK, 2048 - LAN2_PHY_LED_MAP(3) 2049 - }, 2050 - .regmap_size = 2, 2051 - }, { 2052 - .name = "gpio42", 2053 - .regmap[0] = { 2054 - AIROHA_FUNC_MUX, 2055 - REG_GPIO_2ND_I2C_MODE, 2056 - GPIO_LAN3_LED0_MODE_MASK, 2057 - GPIO_LAN3_LED0_MODE_MASK 2058 - }, 2059 - .regmap[1] = { 2060 - AIROHA_FUNC_MUX, 2061 - REG_LAN_LED0_MAPPING, 2062 - LAN3_LED_MAPPING_MASK, 2063 - LAN3_PHY_LED_MAP(3) 2064 - }, 2065 - .regmap_size = 2, 2066 - }, 1209 + AIROHA_PINCTRL_PHY_LED0("gpio33", GPIO_LAN0_LED0_MODE_MASK, 1210 + LAN0_LED_MAPPING_MASK, LAN0_PHY_LED_MAP(3)), 1211 + AIROHA_PINCTRL_PHY_LED0("gpio34", GPIO_LAN1_LED0_MODE_MASK, 1212 + LAN1_LED_MAPPING_MASK, LAN1_PHY_LED_MAP(3)), 1213 + AIROHA_PINCTRL_PHY_LED0("gpio35", GPIO_LAN2_LED0_MODE_MASK, 1214 + LAN2_LED_MAPPING_MASK, LAN2_PHY_LED_MAP(3)), 1215 + AIROHA_PINCTRL_PHY_LED0("gpio42", GPIO_LAN3_LED0_MODE_MASK, 1216 + LAN3_LED_MAPPING_MASK, LAN3_PHY_LED_MAP(3)), 2067 1217 }; 2068 1218 2069 1219 static const struct airoha_pinctrl_func_group phy1_led1_func_group[] = { 2070 - { 2071 - .name = "gpio43", 2072 - .regmap[0] = { 2073 - AIROHA_FUNC_MUX, 2074 - REG_GPIO_2ND_I2C_MODE, 2075 - GPIO_LAN0_LED1_MODE_MASK, 2076 - GPIO_LAN0_LED1_MODE_MASK 2077 - }, 2078 - .regmap[1] = { 2079 - AIROHA_FUNC_MUX, 2080 - REG_LAN_LED1_MAPPING, 2081 - LAN0_LED_MAPPING_MASK, 2082 - LAN0_PHY_LED_MAP(0) 2083 - }, 2084 - .regmap_size = 2, 2085 - }, { 2086 - .name = "gpio44", 2087 - .regmap[0] = { 2088 - AIROHA_FUNC_MUX, 2089 - REG_GPIO_2ND_I2C_MODE, 2090 - GPIO_LAN1_LED1_MODE_MASK, 2091 - GPIO_LAN1_LED1_MODE_MASK 2092 - }, 2093 - .regmap[1] = { 2094 - AIROHA_FUNC_MUX, 2095 - REG_LAN_LED1_MAPPING, 2096 - LAN1_LED_MAPPING_MASK, 2097 - LAN1_PHY_LED_MAP(0) 2098 - }, 2099 - .regmap_size = 2, 2100 - }, { 2101 - .name = "gpio45", 2102 - .regmap[0] = { 2103 - AIROHA_FUNC_MUX, 2104 - REG_GPIO_2ND_I2C_MODE, 2105 - GPIO_LAN2_LED1_MODE_MASK, 2106 - GPIO_LAN2_LED1_MODE_MASK 2107 - }, 2108 - .regmap[1] = { 2109 - AIROHA_FUNC_MUX, 2110 - REG_LAN_LED1_MAPPING, 2111 - LAN2_LED_MAPPING_MASK, 2112 - LAN2_PHY_LED_MAP(0) 2113 - }, 2114 - .regmap_size = 2, 2115 - }, { 2116 - .name = "gpio46", 2117 - .regmap[0] = { 2118 - AIROHA_FUNC_MUX, 2119 - REG_GPIO_2ND_I2C_MODE, 2120 - GPIO_LAN3_LED1_MODE_MASK, 2121 - GPIO_LAN3_LED1_MODE_MASK 2122 - }, 2123 - .regmap[1] = { 2124 - AIROHA_FUNC_MUX, 2125 - REG_LAN_LED1_MAPPING, 2126 - LAN3_LED_MAPPING_MASK, 2127 - LAN3_PHY_LED_MAP(0) 2128 - }, 2129 - .regmap_size = 2, 2130 - }, 1220 + AIROHA_PINCTRL_PHY_LED1("gpio43", GPIO_LAN0_LED1_MODE_MASK, 1221 + LAN0_LED_MAPPING_MASK, LAN0_PHY_LED_MAP(0)), 1222 + AIROHA_PINCTRL_PHY_LED1("gpio44", GPIO_LAN1_LED1_MODE_MASK, 1223 + LAN1_LED_MAPPING_MASK, LAN1_PHY_LED_MAP(0)), 1224 + AIROHA_PINCTRL_PHY_LED1("gpio45", GPIO_LAN2_LED1_MODE_MASK, 1225 + LAN2_LED_MAPPING_MASK, LAN2_PHY_LED_MAP(0)), 1226 + AIROHA_PINCTRL_PHY_LED1("gpio46", GPIO_LAN3_LED1_MODE_MASK, 1227 + LAN3_LED_MAPPING_MASK, LAN3_PHY_LED_MAP(0)), 2131 1228 }; 2132 1229 2133 1230 static const struct airoha_pinctrl_func_group phy2_led1_func_group[] = { 2134 - { 2135 - .name = "gpio43", 2136 - .regmap[0] = { 2137 - AIROHA_FUNC_MUX, 2138 - REG_GPIO_2ND_I2C_MODE, 2139 - GPIO_LAN0_LED1_MODE_MASK, 2140 - GPIO_LAN0_LED1_MODE_MASK 2141 - }, 2142 - .regmap[1] = { 2143 - AIROHA_FUNC_MUX, 2144 - REG_LAN_LED1_MAPPING, 2145 - LAN0_LED_MAPPING_MASK, 2146 - LAN0_PHY_LED_MAP(1) 2147 - }, 2148 - .regmap_size = 2, 2149 - }, { 2150 - .name = "gpio44", 2151 - .regmap[0] = { 2152 - AIROHA_FUNC_MUX, 2153 - REG_GPIO_2ND_I2C_MODE, 2154 - GPIO_LAN1_LED1_MODE_MASK, 2155 - GPIO_LAN1_LED1_MODE_MASK 2156 - }, 2157 - .regmap[1] = { 2158 - AIROHA_FUNC_MUX, 2159 - REG_LAN_LED1_MAPPING, 2160 - LAN1_LED_MAPPING_MASK, 2161 - LAN1_PHY_LED_MAP(1) 2162 - }, 2163 - .regmap_size = 2, 2164 - }, { 2165 - .name = "gpio45", 2166 - .regmap[0] = { 2167 - AIROHA_FUNC_MUX, 2168 - REG_GPIO_2ND_I2C_MODE, 2169 - GPIO_LAN2_LED1_MODE_MASK, 2170 - GPIO_LAN2_LED1_MODE_MASK 2171 - }, 2172 - .regmap[1] = { 2173 - AIROHA_FUNC_MUX, 2174 - REG_LAN_LED1_MAPPING, 2175 - LAN2_LED_MAPPING_MASK, 2176 - LAN2_PHY_LED_MAP(1) 2177 - }, 2178 - .regmap_size = 2, 2179 - }, { 2180 - .name = "gpio46", 2181 - .regmap[0] = { 2182 - AIROHA_FUNC_MUX, 2183 - REG_GPIO_2ND_I2C_MODE, 2184 - GPIO_LAN3_LED1_MODE_MASK, 2185 - GPIO_LAN3_LED1_MODE_MASK 2186 - }, 2187 - .regmap[1] = { 2188 - AIROHA_FUNC_MUX, 2189 - REG_LAN_LED1_MAPPING, 2190 - LAN3_LED_MAPPING_MASK, 2191 - LAN3_PHY_LED_MAP(1) 2192 - }, 2193 - .regmap_size = 2, 2194 - }, 1231 + AIROHA_PINCTRL_PHY_LED1("gpio43", GPIO_LAN0_LED1_MODE_MASK, 1232 + LAN0_LED_MAPPING_MASK, LAN0_PHY_LED_MAP(1)), 1233 + AIROHA_PINCTRL_PHY_LED1("gpio44", GPIO_LAN1_LED1_MODE_MASK, 1234 + LAN1_LED_MAPPING_MASK, LAN1_PHY_LED_MAP(1)), 1235 + AIROHA_PINCTRL_PHY_LED1("gpio45", GPIO_LAN2_LED1_MODE_MASK, 1236 + LAN2_LED_MAPPING_MASK, LAN2_PHY_LED_MAP(1)), 1237 + AIROHA_PINCTRL_PHY_LED1("gpio46", GPIO_LAN3_LED1_MODE_MASK, 1238 + LAN3_LED_MAPPING_MASK, LAN3_PHY_LED_MAP(1)), 2195 1239 }; 2196 1240 2197 1241 static const struct airoha_pinctrl_func_group phy3_led1_func_group[] = { 2198 - { 2199 - .name = "gpio43", 2200 - .regmap[0] = { 2201 - AIROHA_FUNC_MUX, 2202 - REG_GPIO_2ND_I2C_MODE, 2203 - GPIO_LAN0_LED1_MODE_MASK, 2204 - GPIO_LAN0_LED1_MODE_MASK 2205 - }, 2206 - .regmap[1] = { 2207 - AIROHA_FUNC_MUX, 2208 - REG_LAN_LED1_MAPPING, 2209 - LAN0_LED_MAPPING_MASK, 2210 - LAN0_PHY_LED_MAP(2) 2211 - }, 2212 - .regmap_size = 2, 2213 - }, { 2214 - .name = "gpio44", 2215 - .regmap[0] = { 2216 - AIROHA_FUNC_MUX, 2217 - REG_GPIO_2ND_I2C_MODE, 2218 - GPIO_LAN1_LED1_MODE_MASK, 2219 - GPIO_LAN1_LED1_MODE_MASK 2220 - }, 2221 - .regmap[1] = { 2222 - AIROHA_FUNC_MUX, 2223 - REG_LAN_LED1_MAPPING, 2224 - LAN1_LED_MAPPING_MASK, 2225 - LAN1_PHY_LED_MAP(2) 2226 - }, 2227 - .regmap_size = 2, 2228 - }, { 2229 - .name = "gpio45", 2230 - .regmap[0] = { 2231 - AIROHA_FUNC_MUX, 2232 - REG_GPIO_2ND_I2C_MODE, 2233 - GPIO_LAN2_LED1_MODE_MASK, 2234 - GPIO_LAN2_LED1_MODE_MASK 2235 - }, 2236 - .regmap[1] = { 2237 - AIROHA_FUNC_MUX, 2238 - REG_LAN_LED1_MAPPING, 2239 - LAN2_LED_MAPPING_MASK, 2240 - LAN2_PHY_LED_MAP(2) 2241 - }, 2242 - .regmap_size = 2, 2243 - }, { 2244 - .name = "gpio46", 2245 - .regmap[0] = { 2246 - AIROHA_FUNC_MUX, 2247 - REG_GPIO_2ND_I2C_MODE, 2248 - GPIO_LAN3_LED1_MODE_MASK, 2249 - GPIO_LAN3_LED1_MODE_MASK 2250 - }, 2251 - .regmap[1] = { 2252 - AIROHA_FUNC_MUX, 2253 - REG_LAN_LED1_MAPPING, 2254 - LAN3_LED_MAPPING_MASK, 2255 - LAN3_PHY_LED_MAP(2) 2256 - }, 2257 - .regmap_size = 2, 2258 - }, 1242 + AIROHA_PINCTRL_PHY_LED1("gpio43", GPIO_LAN0_LED1_MODE_MASK, 1243 + LAN0_LED_MAPPING_MASK, LAN0_PHY_LED_MAP(2)), 1244 + AIROHA_PINCTRL_PHY_LED1("gpio44", GPIO_LAN1_LED1_MODE_MASK, 1245 + LAN1_LED_MAPPING_MASK, LAN1_PHY_LED_MAP(2)), 1246 + AIROHA_PINCTRL_PHY_LED1("gpio45", GPIO_LAN2_LED1_MODE_MASK, 1247 + LAN2_LED_MAPPING_MASK, LAN2_PHY_LED_MAP(2)), 1248 + AIROHA_PINCTRL_PHY_LED1("gpio46", GPIO_LAN3_LED1_MODE_MASK, 1249 + LAN3_LED_MAPPING_MASK, LAN3_PHY_LED_MAP(2)), 2259 1250 }; 2260 1251 2261 1252 static const struct airoha_pinctrl_func_group phy4_led1_func_group[] = { 2262 - { 2263 - .name = "gpio43", 2264 - .regmap[0] = { 2265 - AIROHA_FUNC_MUX, 2266 - REG_GPIO_2ND_I2C_MODE, 2267 - GPIO_LAN0_LED1_MODE_MASK, 2268 - GPIO_LAN0_LED1_MODE_MASK 2269 - }, 2270 - .regmap[1] = { 2271 - AIROHA_FUNC_MUX, 2272 - REG_LAN_LED1_MAPPING, 2273 - LAN0_LED_MAPPING_MASK, 2274 - LAN0_PHY_LED_MAP(3) 2275 - }, 2276 - .regmap_size = 2, 2277 - }, { 2278 - .name = "gpio44", 2279 - .regmap[0] = { 2280 - AIROHA_FUNC_MUX, 2281 - REG_GPIO_2ND_I2C_MODE, 2282 - GPIO_LAN1_LED1_MODE_MASK, 2283 - GPIO_LAN1_LED1_MODE_MASK 2284 - }, 2285 - .regmap[1] = { 2286 - AIROHA_FUNC_MUX, 2287 - REG_LAN_LED1_MAPPING, 2288 - LAN1_LED_MAPPING_MASK, 2289 - LAN1_PHY_LED_MAP(3) 2290 - }, 2291 - .regmap_size = 2, 2292 - }, { 2293 - .name = "gpio45", 2294 - .regmap[0] = { 2295 - AIROHA_FUNC_MUX, 2296 - REG_GPIO_2ND_I2C_MODE, 2297 - GPIO_LAN2_LED1_MODE_MASK, 2298 - GPIO_LAN2_LED1_MODE_MASK 2299 - }, 2300 - .regmap[1] = { 2301 - AIROHA_FUNC_MUX, 2302 - REG_LAN_LED1_MAPPING, 2303 - LAN2_LED_MAPPING_MASK, 2304 - LAN2_PHY_LED_MAP(3) 2305 - }, 2306 - .regmap_size = 2, 2307 - }, { 2308 - .name = "gpio46", 2309 - .regmap[0] = { 2310 - AIROHA_FUNC_MUX, 2311 - REG_GPIO_2ND_I2C_MODE, 2312 - GPIO_LAN3_LED1_MODE_MASK, 2313 - GPIO_LAN3_LED1_MODE_MASK 2314 - }, 2315 - .regmap[1] = { 2316 - AIROHA_FUNC_MUX, 2317 - REG_LAN_LED1_MAPPING, 2318 - LAN3_LED_MAPPING_MASK, 2319 - LAN3_PHY_LED_MAP(3) 2320 - }, 2321 - .regmap_size = 2, 2322 - }, 1253 + AIROHA_PINCTRL_PHY_LED1("gpio43", GPIO_LAN0_LED1_MODE_MASK, 1254 + LAN0_LED_MAPPING_MASK, LAN0_PHY_LED_MAP(2)), 1255 + AIROHA_PINCTRL_PHY_LED1("gpio44", GPIO_LAN1_LED1_MODE_MASK, 1256 + LAN1_LED_MAPPING_MASK, LAN1_PHY_LED_MAP(2)), 1257 + AIROHA_PINCTRL_PHY_LED1("gpio45", GPIO_LAN2_LED1_MODE_MASK, 1258 + LAN2_LED_MAPPING_MASK, LAN2_PHY_LED_MAP(2)), 1259 + AIROHA_PINCTRL_PHY_LED1("gpio46", GPIO_LAN3_LED1_MODE_MASK, 1260 + LAN3_LED_MAPPING_MASK, LAN3_PHY_LED_MAP(2)), 2323 1261 }; 2324 1262 2325 - static const struct airoha_pinctrl_func airoha_pinctrl_funcs[] = { 2326 - PINCTRL_FUNC_DESC(pon), 2327 - PINCTRL_FUNC_DESC(tod_1pps), 2328 - PINCTRL_FUNC_DESC(sipo), 2329 - PINCTRL_FUNC_DESC(mdio), 2330 - PINCTRL_FUNC_DESC(uart), 2331 - PINCTRL_FUNC_DESC(i2c), 2332 - PINCTRL_FUNC_DESC(jtag), 2333 - PINCTRL_FUNC_DESC(pcm), 2334 - PINCTRL_FUNC_DESC(spi), 2335 - PINCTRL_FUNC_DESC(pcm_spi), 2336 - PINCTRL_FUNC_DESC(i2s), 2337 - PINCTRL_FUNC_DESC(emmc), 2338 - PINCTRL_FUNC_DESC(pnand), 2339 - PINCTRL_FUNC_DESC(pcie_reset), 2340 - PINCTRL_FUNC_DESC(pwm), 2341 - PINCTRL_FUNC_DESC(phy1_led0), 2342 - PINCTRL_FUNC_DESC(phy2_led0), 2343 - PINCTRL_FUNC_DESC(phy3_led0), 2344 - PINCTRL_FUNC_DESC(phy4_led0), 2345 - PINCTRL_FUNC_DESC(phy1_led1), 2346 - PINCTRL_FUNC_DESC(phy2_led1), 2347 - PINCTRL_FUNC_DESC(phy3_led1), 2348 - PINCTRL_FUNC_DESC(phy4_led1), 1263 + static const struct airoha_pinctrl_func_group an7583_phy1_led0_func_group[] = { 1264 + AIROHA_PINCTRL_PHY_LED0("gpio1", GPIO_LAN0_LED0_MODE_MASK, 1265 + LAN0_LED_MAPPING_MASK, LAN0_PHY_LED_MAP(0)), 1266 + AIROHA_PINCTRL_PHY_LED0("gpio2", GPIO_LAN1_LED0_MODE_MASK, 1267 + LAN1_LED_MAPPING_MASK, LAN1_PHY_LED_MAP(0)), 1268 + AIROHA_PINCTRL_PHY_LED0("gpio3", GPIO_LAN2_LED0_MODE_MASK, 1269 + LAN2_LED_MAPPING_MASK, LAN2_PHY_LED_MAP(0)), 1270 + AIROHA_PINCTRL_PHY_LED0("gpio4", GPIO_LAN3_LED0_MODE_MASK, 1271 + LAN3_LED_MAPPING_MASK, LAN3_PHY_LED_MAP(0)), 2349 1272 }; 2350 1273 2351 - static const struct airoha_pinctrl_conf airoha_pinctrl_pullup_conf[] = { 1274 + static const struct airoha_pinctrl_func_group an7583_phy2_led0_func_group[] = { 1275 + AIROHA_PINCTRL_PHY_LED0("gpio1", GPIO_LAN0_LED0_MODE_MASK, 1276 + LAN0_LED_MAPPING_MASK, LAN0_PHY_LED_MAP(1)), 1277 + AIROHA_PINCTRL_PHY_LED0("gpio2", GPIO_LAN1_LED0_MODE_MASK, 1278 + LAN1_LED_MAPPING_MASK, LAN1_PHY_LED_MAP(1)), 1279 + AIROHA_PINCTRL_PHY_LED0("gpio3", GPIO_LAN2_LED0_MODE_MASK, 1280 + LAN2_LED_MAPPING_MASK, LAN2_PHY_LED_MAP(1)), 1281 + AIROHA_PINCTRL_PHY_LED0("gpio4", GPIO_LAN3_LED0_MODE_MASK, 1282 + LAN3_LED_MAPPING_MASK, LAN3_PHY_LED_MAP(1)), 1283 + }; 1284 + 1285 + static const struct airoha_pinctrl_func_group an7583_phy3_led0_func_group[] = { 1286 + AIROHA_PINCTRL_PHY_LED0("gpio1", GPIO_LAN0_LED0_MODE_MASK, 1287 + LAN0_LED_MAPPING_MASK, LAN0_PHY_LED_MAP(2)), 1288 + AIROHA_PINCTRL_PHY_LED0("gpio2", GPIO_LAN1_LED0_MODE_MASK, 1289 + LAN1_LED_MAPPING_MASK, LAN1_PHY_LED_MAP(2)), 1290 + AIROHA_PINCTRL_PHY_LED0("gpio3", GPIO_LAN2_LED0_MODE_MASK, 1291 + LAN2_LED_MAPPING_MASK, LAN2_PHY_LED_MAP(2)), 1292 + AIROHA_PINCTRL_PHY_LED0("gpio4", GPIO_LAN3_LED0_MODE_MASK, 1293 + LAN3_LED_MAPPING_MASK, LAN3_PHY_LED_MAP(2)), 1294 + }; 1295 + 1296 + static const struct airoha_pinctrl_func_group an7583_phy4_led0_func_group[] = { 1297 + AIROHA_PINCTRL_PHY_LED0("gpio1", GPIO_LAN0_LED0_MODE_MASK, 1298 + LAN0_LED_MAPPING_MASK, LAN0_PHY_LED_MAP(3)), 1299 + AIROHA_PINCTRL_PHY_LED0("gpio2", GPIO_LAN1_LED0_MODE_MASK, 1300 + LAN1_LED_MAPPING_MASK, LAN1_PHY_LED_MAP(3)), 1301 + AIROHA_PINCTRL_PHY_LED0("gpio3", GPIO_LAN2_LED0_MODE_MASK, 1302 + LAN2_LED_MAPPING_MASK, LAN2_PHY_LED_MAP(3)), 1303 + AIROHA_PINCTRL_PHY_LED0("gpio4", GPIO_LAN3_LED0_MODE_MASK, 1304 + LAN3_LED_MAPPING_MASK, LAN3_PHY_LED_MAP(3)), 1305 + }; 1306 + 1307 + static const struct airoha_pinctrl_func_group an7583_phy1_led1_func_group[] = { 1308 + AIROHA_PINCTRL_PHY_LED1("gpio8", GPIO_LAN0_LED1_MODE_MASK, 1309 + LAN0_LED_MAPPING_MASK, LAN0_PHY_LED_MAP(0)), 1310 + AIROHA_PINCTRL_PHY_LED1("gpio9", GPIO_LAN1_LED1_MODE_MASK, 1311 + LAN1_LED_MAPPING_MASK, LAN1_PHY_LED_MAP(0)), 1312 + AIROHA_PINCTRL_PHY_LED1("gpio10", GPIO_LAN2_LED1_MODE_MASK, 1313 + LAN2_LED_MAPPING_MASK, LAN2_PHY_LED_MAP(0)), 1314 + AIROHA_PINCTRL_PHY_LED1("gpio1", GPIO_LAN3_LED1_MODE_MASK, 1315 + LAN3_LED_MAPPING_MASK, LAN3_PHY_LED_MAP(0)), 1316 + }; 1317 + 1318 + static const struct airoha_pinctrl_func_group an7583_phy2_led1_func_group[] = { 1319 + AIROHA_PINCTRL_PHY_LED1("gpio8", GPIO_LAN0_LED1_MODE_MASK, 1320 + LAN0_LED_MAPPING_MASK, LAN0_PHY_LED_MAP(1)), 1321 + AIROHA_PINCTRL_PHY_LED1("gpio9", GPIO_LAN1_LED1_MODE_MASK, 1322 + LAN1_LED_MAPPING_MASK, LAN1_PHY_LED_MAP(1)), 1323 + AIROHA_PINCTRL_PHY_LED1("gpio10", GPIO_LAN2_LED1_MODE_MASK, 1324 + LAN2_LED_MAPPING_MASK, LAN2_PHY_LED_MAP(1)), 1325 + AIROHA_PINCTRL_PHY_LED1("gpio11", GPIO_LAN3_LED1_MODE_MASK, 1326 + LAN3_LED_MAPPING_MASK, LAN3_PHY_LED_MAP(1)), 1327 + }; 1328 + 1329 + static const struct airoha_pinctrl_func_group an7583_phy3_led1_func_group[] = { 1330 + AIROHA_PINCTRL_PHY_LED1("gpio8", GPIO_LAN0_LED1_MODE_MASK, 1331 + LAN0_LED_MAPPING_MASK, LAN0_PHY_LED_MAP(2)), 1332 + AIROHA_PINCTRL_PHY_LED1("gpio9", GPIO_LAN1_LED1_MODE_MASK, 1333 + LAN1_LED_MAPPING_MASK, LAN1_PHY_LED_MAP(2)), 1334 + AIROHA_PINCTRL_PHY_LED1("gpio10", GPIO_LAN2_LED1_MODE_MASK, 1335 + LAN2_LED_MAPPING_MASK, LAN2_PHY_LED_MAP(2)), 1336 + AIROHA_PINCTRL_PHY_LED1("gpio11", GPIO_LAN3_LED1_MODE_MASK, 1337 + LAN3_LED_MAPPING_MASK, LAN3_PHY_LED_MAP(2)), 1338 + }; 1339 + 1340 + static const struct airoha_pinctrl_func_group an7583_phy4_led1_func_group[] = { 1341 + AIROHA_PINCTRL_PHY_LED1("gpio8", GPIO_LAN0_LED1_MODE_MASK, 1342 + LAN0_LED_MAPPING_MASK, LAN0_PHY_LED_MAP(2)), 1343 + AIROHA_PINCTRL_PHY_LED1("gpio9", GPIO_LAN1_LED1_MODE_MASK, 1344 + LAN1_LED_MAPPING_MASK, LAN1_PHY_LED_MAP(2)), 1345 + AIROHA_PINCTRL_PHY_LED1("gpio10", GPIO_LAN2_LED1_MODE_MASK, 1346 + LAN2_LED_MAPPING_MASK, LAN2_PHY_LED_MAP(2)), 1347 + AIROHA_PINCTRL_PHY_LED1("gpio11", GPIO_LAN3_LED1_MODE_MASK, 1348 + LAN3_LED_MAPPING_MASK, LAN3_PHY_LED_MAP(2)), 1349 + }; 1350 + 1351 + static const struct airoha_pinctrl_func en7581_pinctrl_funcs[] = { 1352 + PINCTRL_FUNC_DESC("pon", pon), 1353 + PINCTRL_FUNC_DESC("tod_1pps", tod_1pps), 1354 + PINCTRL_FUNC_DESC("sipo", sipo), 1355 + PINCTRL_FUNC_DESC("mdio", mdio), 1356 + PINCTRL_FUNC_DESC("uart", uart), 1357 + PINCTRL_FUNC_DESC("i2c", i2c), 1358 + PINCTRL_FUNC_DESC("jtag", jtag), 1359 + PINCTRL_FUNC_DESC("pcm", pcm), 1360 + PINCTRL_FUNC_DESC("spi", spi), 1361 + PINCTRL_FUNC_DESC("pcm_spi", pcm_spi), 1362 + PINCTRL_FUNC_DESC("i2s", i2s), 1363 + PINCTRL_FUNC_DESC("emmc", emmc), 1364 + PINCTRL_FUNC_DESC("pnand", pnand), 1365 + PINCTRL_FUNC_DESC("pcie_reset", pcie_reset), 1366 + PINCTRL_FUNC_DESC("pwm", pwm), 1367 + PINCTRL_FUNC_DESC("phy1_led0", phy1_led0), 1368 + PINCTRL_FUNC_DESC("phy2_led0", phy2_led0), 1369 + PINCTRL_FUNC_DESC("phy3_led0", phy3_led0), 1370 + PINCTRL_FUNC_DESC("phy4_led0", phy4_led0), 1371 + PINCTRL_FUNC_DESC("phy1_led1", phy1_led1), 1372 + PINCTRL_FUNC_DESC("phy2_led1", phy2_led1), 1373 + PINCTRL_FUNC_DESC("phy3_led1", phy3_led1), 1374 + PINCTRL_FUNC_DESC("phy4_led1", phy4_led1), 1375 + }; 1376 + 1377 + static const struct airoha_pinctrl_func an7583_pinctrl_funcs[] = { 1378 + PINCTRL_FUNC_DESC("pon", pon), 1379 + PINCTRL_FUNC_DESC("tod_1pps", tod_1pps), 1380 + PINCTRL_FUNC_DESC("sipo", sipo), 1381 + PINCTRL_FUNC_DESC("mdio", an7583_mdio), 1382 + PINCTRL_FUNC_DESC("uart", uart), 1383 + PINCTRL_FUNC_DESC("i2c", i2c), 1384 + PINCTRL_FUNC_DESC("jtag", jtag), 1385 + PINCTRL_FUNC_DESC("pcm", pcm), 1386 + PINCTRL_FUNC_DESC("spi", spi), 1387 + PINCTRL_FUNC_DESC("pcm_spi", an7583_pcm_spi), 1388 + PINCTRL_FUNC_DESC("emmc", emmc), 1389 + PINCTRL_FUNC_DESC("pnand", pnand), 1390 + PINCTRL_FUNC_DESC("pcie_reset", an7583_pcie_reset), 1391 + PINCTRL_FUNC_DESC("pwm", pwm), 1392 + PINCTRL_FUNC_DESC("phy1_led0", an7583_phy1_led0), 1393 + PINCTRL_FUNC_DESC("phy2_led0", an7583_phy2_led0), 1394 + PINCTRL_FUNC_DESC("phy3_led0", an7583_phy3_led0), 1395 + PINCTRL_FUNC_DESC("phy4_led0", an7583_phy4_led0), 1396 + PINCTRL_FUNC_DESC("phy1_led1", an7583_phy1_led1), 1397 + PINCTRL_FUNC_DESC("phy2_led1", an7583_phy2_led1), 1398 + PINCTRL_FUNC_DESC("phy3_led1", an7583_phy3_led1), 1399 + PINCTRL_FUNC_DESC("phy4_led1", an7583_phy4_led1), 1400 + }; 1401 + 1402 + static const struct airoha_pinctrl_conf en7581_pinctrl_pullup_conf[] = { 2352 1403 PINCTRL_CONF_DESC(0, REG_I2C_SDA_PU, UART1_TXD_PU_MASK), 2353 1404 PINCTRL_CONF_DESC(1, REG_I2C_SDA_PU, UART1_RXD_PU_MASK), 2354 1405 PINCTRL_CONF_DESC(2, REG_I2C_SDA_PU, I2C_SDA_PU_MASK), ··· 1827 2042 PINCTRL_CONF_DESC(63, REG_I2C_SDA_PU, PCIE2_RESET_PU_MASK), 1828 2043 }; 1829 2044 1830 - static const struct airoha_pinctrl_conf airoha_pinctrl_pulldown_conf[] = { 2045 + static const struct airoha_pinctrl_conf an7583_pinctrl_pullup_conf[] = { 2046 + PINCTRL_CONF_DESC(2, REG_GPIO_L_PU, BIT(0)), 2047 + PINCTRL_CONF_DESC(3, REG_GPIO_L_PU, BIT(1)), 2048 + PINCTRL_CONF_DESC(4, REG_GPIO_L_PU, BIT(2)), 2049 + PINCTRL_CONF_DESC(5, REG_GPIO_L_PU, BIT(3)), 2050 + PINCTRL_CONF_DESC(6, REG_GPIO_L_PU, BIT(4)), 2051 + PINCTRL_CONF_DESC(7, REG_GPIO_L_PU, BIT(5)), 2052 + PINCTRL_CONF_DESC(8, REG_GPIO_L_PU, BIT(6)), 2053 + PINCTRL_CONF_DESC(9, REG_GPIO_L_PU, BIT(7)), 2054 + PINCTRL_CONF_DESC(10, REG_GPIO_L_PU, BIT(8)), 2055 + PINCTRL_CONF_DESC(11, REG_GPIO_L_PU, BIT(9)), 2056 + PINCTRL_CONF_DESC(12, REG_GPIO_L_PU, BIT(10)), 2057 + PINCTRL_CONF_DESC(13, REG_GPIO_L_PU, BIT(11)), 2058 + PINCTRL_CONF_DESC(14, REG_GPIO_L_PU, BIT(12)), 2059 + PINCTRL_CONF_DESC(15, REG_GPIO_L_PU, BIT(13)), 2060 + PINCTRL_CONF_DESC(16, REG_GPIO_L_PU, BIT(14)), 2061 + PINCTRL_CONF_DESC(17, REG_GPIO_L_PU, BIT(15)), 2062 + PINCTRL_CONF_DESC(18, REG_GPIO_L_PU, BIT(16)), 2063 + PINCTRL_CONF_DESC(19, REG_GPIO_L_PU, BIT(17)), 2064 + PINCTRL_CONF_DESC(20, REG_GPIO_L_PU, BIT(18)), 2065 + PINCTRL_CONF_DESC(21, REG_GPIO_L_PU, BIT(18)), 2066 + PINCTRL_CONF_DESC(22, REG_GPIO_L_PU, BIT(20)), 2067 + PINCTRL_CONF_DESC(23, REG_GPIO_L_PU, BIT(21)), 2068 + PINCTRL_CONF_DESC(24, REG_GPIO_L_PU, BIT(22)), 2069 + PINCTRL_CONF_DESC(25, REG_GPIO_L_PU, BIT(23)), 2070 + PINCTRL_CONF_DESC(26, REG_GPIO_L_PU, BIT(24)), 2071 + PINCTRL_CONF_DESC(27, REG_GPIO_L_PU, BIT(25)), 2072 + PINCTRL_CONF_DESC(28, REG_GPIO_L_PU, BIT(26)), 2073 + PINCTRL_CONF_DESC(29, REG_GPIO_L_PU, BIT(27)), 2074 + PINCTRL_CONF_DESC(30, REG_GPIO_L_PU, BIT(28)), 2075 + PINCTRL_CONF_DESC(31, REG_GPIO_L_PU, BIT(29)), 2076 + PINCTRL_CONF_DESC(32, REG_GPIO_L_PU, BIT(30)), 2077 + PINCTRL_CONF_DESC(33, REG_GPIO_L_PU, BIT(31)), 2078 + PINCTRL_CONF_DESC(34, REG_GPIO_H_PU, BIT(0)), 2079 + PINCTRL_CONF_DESC(35, REG_GPIO_H_PU, BIT(1)), 2080 + PINCTRL_CONF_DESC(36, REG_GPIO_H_PU, BIT(2)), 2081 + PINCTRL_CONF_DESC(37, REG_GPIO_H_PU, BIT(3)), 2082 + PINCTRL_CONF_DESC(38, REG_GPIO_H_PU, BIT(4)), 2083 + PINCTRL_CONF_DESC(39, REG_GPIO_H_PU, BIT(5)), 2084 + PINCTRL_CONF_DESC(40, REG_GPIO_H_PU, BIT(6)), 2085 + PINCTRL_CONF_DESC(41, REG_I2C_SDA_PU, I2C_SCL_PU_MASK), 2086 + PINCTRL_CONF_DESC(42, REG_I2C_SDA_PU, I2C_SDA_PU_MASK), 2087 + PINCTRL_CONF_DESC(43, REG_I2C_SDA_PU, AN7583_I2C1_SCL_PU_MASK), 2088 + PINCTRL_CONF_DESC(44, REG_I2C_SDA_PU, AN7583_I2C1_SDA_PU_MASK), 2089 + PINCTRL_CONF_DESC(45, REG_I2C_SDA_PU, SPI_CLK_PU_MASK), 2090 + PINCTRL_CONF_DESC(46, REG_I2C_SDA_PU, SPI_CS0_PU_MASK), 2091 + PINCTRL_CONF_DESC(47, REG_I2C_SDA_PU, SPI_MOSI_PU_MASK), 2092 + PINCTRL_CONF_DESC(48, REG_I2C_SDA_PU, SPI_MISO_PU_MASK), 2093 + PINCTRL_CONF_DESC(49, REG_I2C_SDA_PU, UART1_TXD_PU_MASK), 2094 + PINCTRL_CONF_DESC(50, REG_I2C_SDA_PU, UART1_RXD_PU_MASK), 2095 + PINCTRL_CONF_DESC(51, REG_I2C_SDA_PU, PCIE0_RESET_PU_MASK), 2096 + PINCTRL_CONF_DESC(52, REG_I2C_SDA_PU, PCIE1_RESET_PU_MASK), 2097 + PINCTRL_CONF_DESC(53, REG_I2C_SDA_PU, AN7583_MDC_0_PU_MASK), 2098 + PINCTRL_CONF_DESC(54, REG_I2C_SDA_PU, AN7583_MDIO_0_PU_MASK), 2099 + }; 2100 + 2101 + static const struct airoha_pinctrl_conf en7581_pinctrl_pulldown_conf[] = { 1831 2102 PINCTRL_CONF_DESC(0, REG_I2C_SDA_PD, UART1_TXD_PD_MASK), 1832 2103 PINCTRL_CONF_DESC(1, REG_I2C_SDA_PD, UART1_RXD_PD_MASK), 1833 2104 PINCTRL_CONF_DESC(2, REG_I2C_SDA_PD, I2C_SDA_PD_MASK), ··· 1944 2103 PINCTRL_CONF_DESC(63, REG_I2C_SDA_PD, PCIE2_RESET_PD_MASK), 1945 2104 }; 1946 2105 1947 - static const struct airoha_pinctrl_conf airoha_pinctrl_drive_e2_conf[] = { 2106 + static const struct airoha_pinctrl_conf an7583_pinctrl_pulldown_conf[] = { 2107 + PINCTRL_CONF_DESC(2, REG_GPIO_L_PD, BIT(0)), 2108 + PINCTRL_CONF_DESC(3, REG_GPIO_L_PD, BIT(1)), 2109 + PINCTRL_CONF_DESC(4, REG_GPIO_L_PD, BIT(2)), 2110 + PINCTRL_CONF_DESC(5, REG_GPIO_L_PD, BIT(3)), 2111 + PINCTRL_CONF_DESC(6, REG_GPIO_L_PD, BIT(4)), 2112 + PINCTRL_CONF_DESC(7, REG_GPIO_L_PD, BIT(5)), 2113 + PINCTRL_CONF_DESC(8, REG_GPIO_L_PD, BIT(6)), 2114 + PINCTRL_CONF_DESC(9, REG_GPIO_L_PD, BIT(7)), 2115 + PINCTRL_CONF_DESC(10, REG_GPIO_L_PD, BIT(8)), 2116 + PINCTRL_CONF_DESC(11, REG_GPIO_L_PD, BIT(9)), 2117 + PINCTRL_CONF_DESC(12, REG_GPIO_L_PD, BIT(10)), 2118 + PINCTRL_CONF_DESC(13, REG_GPIO_L_PD, BIT(11)), 2119 + PINCTRL_CONF_DESC(14, REG_GPIO_L_PD, BIT(12)), 2120 + PINCTRL_CONF_DESC(15, REG_GPIO_L_PD, BIT(13)), 2121 + PINCTRL_CONF_DESC(16, REG_GPIO_L_PD, BIT(14)), 2122 + PINCTRL_CONF_DESC(17, REG_GPIO_L_PD, BIT(15)), 2123 + PINCTRL_CONF_DESC(18, REG_GPIO_L_PD, BIT(16)), 2124 + PINCTRL_CONF_DESC(19, REG_GPIO_L_PD, BIT(17)), 2125 + PINCTRL_CONF_DESC(20, REG_GPIO_L_PD, BIT(18)), 2126 + PINCTRL_CONF_DESC(21, REG_GPIO_L_PD, BIT(18)), 2127 + PINCTRL_CONF_DESC(22, REG_GPIO_L_PD, BIT(20)), 2128 + PINCTRL_CONF_DESC(23, REG_GPIO_L_PD, BIT(21)), 2129 + PINCTRL_CONF_DESC(24, REG_GPIO_L_PD, BIT(22)), 2130 + PINCTRL_CONF_DESC(25, REG_GPIO_L_PD, BIT(23)), 2131 + PINCTRL_CONF_DESC(26, REG_GPIO_L_PD, BIT(24)), 2132 + PINCTRL_CONF_DESC(27, REG_GPIO_L_PD, BIT(25)), 2133 + PINCTRL_CONF_DESC(28, REG_GPIO_L_PD, BIT(26)), 2134 + PINCTRL_CONF_DESC(29, REG_GPIO_L_PD, BIT(27)), 2135 + PINCTRL_CONF_DESC(30, REG_GPIO_L_PD, BIT(28)), 2136 + PINCTRL_CONF_DESC(31, REG_GPIO_L_PD, BIT(29)), 2137 + PINCTRL_CONF_DESC(32, REG_GPIO_L_PD, BIT(30)), 2138 + PINCTRL_CONF_DESC(33, REG_GPIO_L_PD, BIT(31)), 2139 + PINCTRL_CONF_DESC(34, REG_GPIO_H_PD, BIT(0)), 2140 + PINCTRL_CONF_DESC(35, REG_GPIO_H_PD, BIT(1)), 2141 + PINCTRL_CONF_DESC(36, REG_GPIO_H_PD, BIT(2)), 2142 + PINCTRL_CONF_DESC(37, REG_GPIO_H_PD, BIT(3)), 2143 + PINCTRL_CONF_DESC(38, REG_GPIO_H_PD, BIT(4)), 2144 + PINCTRL_CONF_DESC(39, REG_GPIO_H_PD, BIT(5)), 2145 + PINCTRL_CONF_DESC(40, REG_GPIO_H_PD, BIT(6)), 2146 + PINCTRL_CONF_DESC(41, REG_I2C_SDA_PD, I2C_SCL_PD_MASK), 2147 + PINCTRL_CONF_DESC(42, REG_I2C_SDA_PD, I2C_SDA_PD_MASK), 2148 + PINCTRL_CONF_DESC(43, REG_I2C_SDA_PD, AN7583_I2C1_SCL_PD_MASK), 2149 + PINCTRL_CONF_DESC(44, REG_I2C_SDA_PD, AN7583_I2C1_SDA_PD_MASK), 2150 + PINCTRL_CONF_DESC(45, REG_I2C_SDA_PD, SPI_CLK_PD_MASK), 2151 + PINCTRL_CONF_DESC(46, REG_I2C_SDA_PD, SPI_CS0_PD_MASK), 2152 + PINCTRL_CONF_DESC(47, REG_I2C_SDA_PD, SPI_MOSI_PD_MASK), 2153 + PINCTRL_CONF_DESC(48, REG_I2C_SDA_PD, SPI_MISO_PD_MASK), 2154 + PINCTRL_CONF_DESC(49, REG_I2C_SDA_PD, UART1_TXD_PD_MASK), 2155 + PINCTRL_CONF_DESC(50, REG_I2C_SDA_PD, UART1_RXD_PD_MASK), 2156 + PINCTRL_CONF_DESC(51, REG_I2C_SDA_PD, PCIE0_RESET_PD_MASK), 2157 + PINCTRL_CONF_DESC(52, REG_I2C_SDA_PD, PCIE1_RESET_PD_MASK), 2158 + PINCTRL_CONF_DESC(53, REG_I2C_SDA_PD, AN7583_MDC_0_PD_MASK), 2159 + PINCTRL_CONF_DESC(54, REG_I2C_SDA_PD, AN7583_MDIO_0_PD_MASK), 2160 + }; 2161 + 2162 + static const struct airoha_pinctrl_conf en7581_pinctrl_drive_e2_conf[] = { 1948 2163 PINCTRL_CONF_DESC(0, REG_I2C_SDA_E2, UART1_TXD_E2_MASK), 1949 2164 PINCTRL_CONF_DESC(1, REG_I2C_SDA_E2, UART1_RXD_E2_MASK), 1950 2165 PINCTRL_CONF_DESC(2, REG_I2C_SDA_E2, I2C_SDA_E2_MASK), ··· 2061 2164 PINCTRL_CONF_DESC(63, REG_I2C_SDA_E2, PCIE2_RESET_E2_MASK), 2062 2165 }; 2063 2166 2064 - static const struct airoha_pinctrl_conf airoha_pinctrl_drive_e4_conf[] = { 2167 + static const struct airoha_pinctrl_conf an7583_pinctrl_drive_e2_conf[] = { 2168 + PINCTRL_CONF_DESC(2, REG_GPIO_L_E2, BIT(0)), 2169 + PINCTRL_CONF_DESC(3, REG_GPIO_L_E2, BIT(1)), 2170 + PINCTRL_CONF_DESC(4, REG_GPIO_L_E2, BIT(2)), 2171 + PINCTRL_CONF_DESC(5, REG_GPIO_L_E2, BIT(3)), 2172 + PINCTRL_CONF_DESC(6, REG_GPIO_L_E2, BIT(4)), 2173 + PINCTRL_CONF_DESC(7, REG_GPIO_L_E2, BIT(5)), 2174 + PINCTRL_CONF_DESC(8, REG_GPIO_L_E2, BIT(6)), 2175 + PINCTRL_CONF_DESC(9, REG_GPIO_L_E2, BIT(7)), 2176 + PINCTRL_CONF_DESC(10, REG_GPIO_L_E2, BIT(8)), 2177 + PINCTRL_CONF_DESC(11, REG_GPIO_L_E2, BIT(9)), 2178 + PINCTRL_CONF_DESC(12, REG_GPIO_L_E2, BIT(10)), 2179 + PINCTRL_CONF_DESC(13, REG_GPIO_L_E2, BIT(11)), 2180 + PINCTRL_CONF_DESC(14, REG_GPIO_L_E2, BIT(12)), 2181 + PINCTRL_CONF_DESC(15, REG_GPIO_L_E2, BIT(13)), 2182 + PINCTRL_CONF_DESC(16, REG_GPIO_L_E2, BIT(14)), 2183 + PINCTRL_CONF_DESC(17, REG_GPIO_L_E2, BIT(15)), 2184 + PINCTRL_CONF_DESC(18, REG_GPIO_L_E2, BIT(16)), 2185 + PINCTRL_CONF_DESC(19, REG_GPIO_L_E2, BIT(17)), 2186 + PINCTRL_CONF_DESC(20, REG_GPIO_L_E2, BIT(18)), 2187 + PINCTRL_CONF_DESC(21, REG_GPIO_L_E2, BIT(18)), 2188 + PINCTRL_CONF_DESC(22, REG_GPIO_L_E2, BIT(20)), 2189 + PINCTRL_CONF_DESC(23, REG_GPIO_L_E2, BIT(21)), 2190 + PINCTRL_CONF_DESC(24, REG_GPIO_L_E2, BIT(22)), 2191 + PINCTRL_CONF_DESC(25, REG_GPIO_L_E2, BIT(23)), 2192 + PINCTRL_CONF_DESC(26, REG_GPIO_L_E2, BIT(24)), 2193 + PINCTRL_CONF_DESC(27, REG_GPIO_L_E2, BIT(25)), 2194 + PINCTRL_CONF_DESC(28, REG_GPIO_L_E2, BIT(26)), 2195 + PINCTRL_CONF_DESC(29, REG_GPIO_L_E2, BIT(27)), 2196 + PINCTRL_CONF_DESC(30, REG_GPIO_L_E2, BIT(28)), 2197 + PINCTRL_CONF_DESC(31, REG_GPIO_L_E2, BIT(29)), 2198 + PINCTRL_CONF_DESC(32, REG_GPIO_L_E2, BIT(30)), 2199 + PINCTRL_CONF_DESC(33, REG_GPIO_L_E2, BIT(31)), 2200 + PINCTRL_CONF_DESC(34, REG_GPIO_H_E2, BIT(0)), 2201 + PINCTRL_CONF_DESC(35, REG_GPIO_H_E2, BIT(1)), 2202 + PINCTRL_CONF_DESC(36, REG_GPIO_H_E2, BIT(2)), 2203 + PINCTRL_CONF_DESC(37, REG_GPIO_H_E2, BIT(3)), 2204 + PINCTRL_CONF_DESC(38, REG_GPIO_H_E2, BIT(4)), 2205 + PINCTRL_CONF_DESC(39, REG_GPIO_H_E2, BIT(5)), 2206 + PINCTRL_CONF_DESC(40, REG_GPIO_H_E2, BIT(6)), 2207 + PINCTRL_CONF_DESC(41, REG_I2C_SDA_E2, I2C_SCL_E2_MASK), 2208 + PINCTRL_CONF_DESC(42, REG_I2C_SDA_E2, I2C_SDA_E2_MASK), 2209 + PINCTRL_CONF_DESC(43, REG_I2C_SDA_E2, AN7583_I2C1_SCL_E2_MASK), 2210 + PINCTRL_CONF_DESC(44, REG_I2C_SDA_E2, AN7583_I2C1_SDA_E2_MASK), 2211 + PINCTRL_CONF_DESC(45, REG_I2C_SDA_E2, SPI_CLK_E2_MASK), 2212 + PINCTRL_CONF_DESC(46, REG_I2C_SDA_E2, SPI_CS0_E2_MASK), 2213 + PINCTRL_CONF_DESC(47, REG_I2C_SDA_E2, SPI_MOSI_E2_MASK), 2214 + PINCTRL_CONF_DESC(48, REG_I2C_SDA_E2, SPI_MISO_E2_MASK), 2215 + PINCTRL_CONF_DESC(49, REG_I2C_SDA_E2, UART1_TXD_E2_MASK), 2216 + PINCTRL_CONF_DESC(50, REG_I2C_SDA_E2, UART1_RXD_E2_MASK), 2217 + PINCTRL_CONF_DESC(51, REG_I2C_SDA_E2, PCIE0_RESET_E2_MASK), 2218 + PINCTRL_CONF_DESC(52, REG_I2C_SDA_E2, PCIE1_RESET_E2_MASK), 2219 + PINCTRL_CONF_DESC(53, REG_I2C_SDA_E2, AN7583_MDC_0_E2_MASK), 2220 + PINCTRL_CONF_DESC(54, REG_I2C_SDA_E2, AN7583_MDIO_0_E2_MASK), 2221 + }; 2222 + 2223 + static const struct airoha_pinctrl_conf en7581_pinctrl_drive_e4_conf[] = { 2065 2224 PINCTRL_CONF_DESC(0, REG_I2C_SDA_E4, UART1_TXD_E4_MASK), 2066 2225 PINCTRL_CONF_DESC(1, REG_I2C_SDA_E4, UART1_RXD_E4_MASK), 2067 2226 PINCTRL_CONF_DESC(2, REG_I2C_SDA_E4, I2C_SDA_E4_MASK), ··· 2178 2225 PINCTRL_CONF_DESC(63, REG_I2C_SDA_E4, PCIE2_RESET_E4_MASK), 2179 2226 }; 2180 2227 2181 - static const struct airoha_pinctrl_conf airoha_pinctrl_pcie_rst_od_conf[] = { 2228 + static const struct airoha_pinctrl_conf an7583_pinctrl_drive_e4_conf[] = { 2229 + PINCTRL_CONF_DESC(2, REG_GPIO_L_E4, BIT(0)), 2230 + PINCTRL_CONF_DESC(3, REG_GPIO_L_E4, BIT(1)), 2231 + PINCTRL_CONF_DESC(4, REG_GPIO_L_E4, BIT(2)), 2232 + PINCTRL_CONF_DESC(5, REG_GPIO_L_E4, BIT(3)), 2233 + PINCTRL_CONF_DESC(6, REG_GPIO_L_E4, BIT(4)), 2234 + PINCTRL_CONF_DESC(7, REG_GPIO_L_E4, BIT(5)), 2235 + PINCTRL_CONF_DESC(8, REG_GPIO_L_E4, BIT(6)), 2236 + PINCTRL_CONF_DESC(9, REG_GPIO_L_E4, BIT(7)), 2237 + PINCTRL_CONF_DESC(10, REG_GPIO_L_E4, BIT(8)), 2238 + PINCTRL_CONF_DESC(11, REG_GPIO_L_E4, BIT(9)), 2239 + PINCTRL_CONF_DESC(12, REG_GPIO_L_E4, BIT(10)), 2240 + PINCTRL_CONF_DESC(13, REG_GPIO_L_E4, BIT(11)), 2241 + PINCTRL_CONF_DESC(14, REG_GPIO_L_E4, BIT(12)), 2242 + PINCTRL_CONF_DESC(15, REG_GPIO_L_E4, BIT(13)), 2243 + PINCTRL_CONF_DESC(16, REG_GPIO_L_E4, BIT(14)), 2244 + PINCTRL_CONF_DESC(17, REG_GPIO_L_E4, BIT(15)), 2245 + PINCTRL_CONF_DESC(18, REG_GPIO_L_E4, BIT(16)), 2246 + PINCTRL_CONF_DESC(19, REG_GPIO_L_E4, BIT(17)), 2247 + PINCTRL_CONF_DESC(20, REG_GPIO_L_E4, BIT(18)), 2248 + PINCTRL_CONF_DESC(21, REG_GPIO_L_E4, BIT(18)), 2249 + PINCTRL_CONF_DESC(22, REG_GPIO_L_E4, BIT(20)), 2250 + PINCTRL_CONF_DESC(23, REG_GPIO_L_E4, BIT(21)), 2251 + PINCTRL_CONF_DESC(24, REG_GPIO_L_E4, BIT(22)), 2252 + PINCTRL_CONF_DESC(25, REG_GPIO_L_E4, BIT(23)), 2253 + PINCTRL_CONF_DESC(26, REG_GPIO_L_E4, BIT(24)), 2254 + PINCTRL_CONF_DESC(27, REG_GPIO_L_E4, BIT(25)), 2255 + PINCTRL_CONF_DESC(28, REG_GPIO_L_E4, BIT(26)), 2256 + PINCTRL_CONF_DESC(29, REG_GPIO_L_E4, BIT(27)), 2257 + PINCTRL_CONF_DESC(30, REG_GPIO_L_E4, BIT(28)), 2258 + PINCTRL_CONF_DESC(31, REG_GPIO_L_E4, BIT(29)), 2259 + PINCTRL_CONF_DESC(32, REG_GPIO_L_E4, BIT(30)), 2260 + PINCTRL_CONF_DESC(33, REG_GPIO_L_E4, BIT(31)), 2261 + PINCTRL_CONF_DESC(34, REG_GPIO_H_E4, BIT(0)), 2262 + PINCTRL_CONF_DESC(35, REG_GPIO_H_E4, BIT(1)), 2263 + PINCTRL_CONF_DESC(36, REG_GPIO_H_E4, BIT(2)), 2264 + PINCTRL_CONF_DESC(37, REG_GPIO_H_E4, BIT(3)), 2265 + PINCTRL_CONF_DESC(38, REG_GPIO_H_E4, BIT(4)), 2266 + PINCTRL_CONF_DESC(39, REG_GPIO_H_E4, BIT(5)), 2267 + PINCTRL_CONF_DESC(40, REG_GPIO_H_E4, BIT(6)), 2268 + PINCTRL_CONF_DESC(41, REG_I2C_SDA_E4, I2C_SCL_E4_MASK), 2269 + PINCTRL_CONF_DESC(42, REG_I2C_SDA_E4, I2C_SDA_E4_MASK), 2270 + PINCTRL_CONF_DESC(43, REG_I2C_SDA_E4, AN7583_I2C1_SCL_E4_MASK), 2271 + PINCTRL_CONF_DESC(44, REG_I2C_SDA_E4, AN7583_I2C1_SDA_E4_MASK), 2272 + PINCTRL_CONF_DESC(45, REG_I2C_SDA_E4, SPI_CLK_E4_MASK), 2273 + PINCTRL_CONF_DESC(46, REG_I2C_SDA_E4, SPI_CS0_E4_MASK), 2274 + PINCTRL_CONF_DESC(47, REG_I2C_SDA_E4, SPI_MOSI_E4_MASK), 2275 + PINCTRL_CONF_DESC(48, REG_I2C_SDA_E4, SPI_MISO_E4_MASK), 2276 + PINCTRL_CONF_DESC(49, REG_I2C_SDA_E4, UART1_TXD_E4_MASK), 2277 + PINCTRL_CONF_DESC(50, REG_I2C_SDA_E4, UART1_RXD_E4_MASK), 2278 + PINCTRL_CONF_DESC(51, REG_I2C_SDA_E4, PCIE0_RESET_E4_MASK), 2279 + PINCTRL_CONF_DESC(52, REG_I2C_SDA_E4, PCIE1_RESET_E4_MASK), 2280 + PINCTRL_CONF_DESC(53, REG_I2C_SDA_E4, AN7583_MDC_0_E4_MASK), 2281 + PINCTRL_CONF_DESC(54, REG_I2C_SDA_E4, AN7583_MDIO_0_E4_MASK), 2282 + }; 2283 + 2284 + static const struct airoha_pinctrl_conf en7581_pinctrl_pcie_rst_od_conf[] = { 2182 2285 PINCTRL_CONF_DESC(61, REG_PCIE_RESET_OD, PCIE0_RESET_OD_MASK), 2183 2286 PINCTRL_CONF_DESC(62, REG_PCIE_RESET_OD, PCIE1_RESET_OD_MASK), 2184 2287 PINCTRL_CONF_DESC(63, REG_PCIE_RESET_OD, PCIE2_RESET_OD_MASK), 2288 + }; 2289 + 2290 + static const struct airoha_pinctrl_conf an7583_pinctrl_pcie_rst_od_conf[] = { 2291 + PINCTRL_CONF_DESC(51, REG_PCIE_RESET_OD, PCIE0_RESET_OD_MASK), 2292 + PINCTRL_CONF_DESC(52, REG_PCIE_RESET_OD, PCIE1_RESET_OD_MASK), 2185 2293 }; 2186 2294 2187 2295 static int airoha_convert_pin_to_reg_offset(struct pinctrl_dev *pctrl_dev, ··· 2409 2395 }; 2410 2396 2411 2397 static int airoha_pinctrl_add_gpiochip(struct airoha_pinctrl *pinctrl, 2412 - struct platform_device *pdev) 2398 + struct platform_device *pdev) 2413 2399 { 2414 2400 struct airoha_pinctrl_gpiochip *chip = &pinctrl->gpiochip; 2415 2401 struct gpio_chip *gc = &chip->chip; ··· 2444 2430 return irq; 2445 2431 2446 2432 err = devm_request_irq(dev, irq, airoha_irq_handler, IRQF_SHARED, 2447 - dev_name(dev), pinctrl); 2433 + dev_name(dev), pinctrl); 2448 2434 if (err) { 2449 2435 dev_err(dev, "error requesting irq %d: %d\n", irq, err); 2450 2436 return err; ··· 2508 2494 } 2509 2495 2510 2496 static int airoha_pinmux_set_direction(struct pinctrl_dev *pctrl_dev, 2511 - struct pinctrl_gpio_range *range, 2512 - unsigned int p, bool input) 2497 + struct pinctrl_gpio_range *range, 2498 + unsigned int p, bool input) 2513 2499 { 2514 2500 struct airoha_pinctrl *pinctrl = pinctrl_dev_get_drvdata(pctrl_dev); 2515 2501 u32 mask, index; ··· 2560 2546 } 2561 2547 2562 2548 static int airoha_pinctrl_get_conf(struct airoha_pinctrl *pinctrl, 2563 - const struct airoha_pinctrl_conf *conf, 2564 - int conf_size, int pin, u32 *val) 2549 + enum airoha_pinctrl_confs_type conf_type, 2550 + int pin, u32 *val) 2565 2551 { 2552 + const struct airoha_pinctrl_confs_info *confs_info; 2566 2553 const struct airoha_pinctrl_reg *reg; 2567 2554 2568 - reg = airoha_pinctrl_get_conf_reg(conf, conf_size, pin); 2555 + confs_info = &pinctrl->confs_info[conf_type]; 2556 + 2557 + reg = airoha_pinctrl_get_conf_reg(confs_info->confs, 2558 + confs_info->num_confs, 2559 + pin); 2569 2560 if (!reg) 2570 2561 return -EINVAL; 2571 2562 ··· 2583 2564 } 2584 2565 2585 2566 static int airoha_pinctrl_set_conf(struct airoha_pinctrl *pinctrl, 2586 - const struct airoha_pinctrl_conf *conf, 2587 - int conf_size, int pin, u32 val) 2567 + enum airoha_pinctrl_confs_type conf_type, 2568 + int pin, u32 val) 2588 2569 { 2570 + const struct airoha_pinctrl_confs_info *confs_info; 2589 2571 const struct airoha_pinctrl_reg *reg = NULL; 2590 2572 2591 - reg = airoha_pinctrl_get_conf_reg(conf, conf_size, pin); 2573 + confs_info = &pinctrl->confs_info[conf_type]; 2574 + 2575 + reg = airoha_pinctrl_get_conf_reg(confs_info->confs, 2576 + confs_info->num_confs, 2577 + pin); 2592 2578 if (!reg) 2593 2579 return -EINVAL; 2594 2580 2595 2581 2596 2582 if (regmap_update_bits(pinctrl->chip_scu, reg->offset, reg->mask, 2597 - val << __ffs(reg->mask))) 2583 + val << __ffs(reg->mask))) 2598 2584 return -EINVAL; 2599 2585 2600 2586 return 0; 2601 2587 } 2602 2588 2603 2589 #define airoha_pinctrl_get_pullup_conf(pinctrl, pin, val) \ 2604 - airoha_pinctrl_get_conf((pinctrl), airoha_pinctrl_pullup_conf, \ 2605 - ARRAY_SIZE(airoha_pinctrl_pullup_conf), \ 2590 + airoha_pinctrl_get_conf((pinctrl), AIROHA_PINCTRL_CONFS_PULLUP, \ 2606 2591 (pin), (val)) 2607 2592 #define airoha_pinctrl_get_pulldown_conf(pinctrl, pin, val) \ 2608 - airoha_pinctrl_get_conf((pinctrl), airoha_pinctrl_pulldown_conf, \ 2609 - ARRAY_SIZE(airoha_pinctrl_pulldown_conf), \ 2593 + airoha_pinctrl_get_conf((pinctrl), AIROHA_PINCTRL_CONFS_PULLDOWN, \ 2610 2594 (pin), (val)) 2611 2595 #define airoha_pinctrl_get_drive_e2_conf(pinctrl, pin, val) \ 2612 - airoha_pinctrl_get_conf((pinctrl), airoha_pinctrl_drive_e2_conf, \ 2613 - ARRAY_SIZE(airoha_pinctrl_drive_e2_conf), \ 2596 + airoha_pinctrl_get_conf((pinctrl), AIROHA_PINCTRL_CONFS_DRIVE_E2, \ 2614 2597 (pin), (val)) 2615 2598 #define airoha_pinctrl_get_drive_e4_conf(pinctrl, pin, val) \ 2616 - airoha_pinctrl_get_conf((pinctrl), airoha_pinctrl_drive_e4_conf, \ 2617 - ARRAY_SIZE(airoha_pinctrl_drive_e4_conf), \ 2599 + airoha_pinctrl_get_conf((pinctrl), AIROHA_PINCTRL_CONFS_DRIVE_E4, \ 2618 2600 (pin), (val)) 2619 2601 #define airoha_pinctrl_get_pcie_rst_od_conf(pinctrl, pin, val) \ 2620 - airoha_pinctrl_get_conf((pinctrl), airoha_pinctrl_pcie_rst_od_conf, \ 2621 - ARRAY_SIZE(airoha_pinctrl_pcie_rst_od_conf), \ 2602 + airoha_pinctrl_get_conf((pinctrl), AIROHA_PINCTRL_CONFS_PCIE_RST_OD, \ 2622 2603 (pin), (val)) 2623 2604 #define airoha_pinctrl_set_pullup_conf(pinctrl, pin, val) \ 2624 - airoha_pinctrl_set_conf((pinctrl), airoha_pinctrl_pullup_conf, \ 2625 - ARRAY_SIZE(airoha_pinctrl_pullup_conf), \ 2605 + airoha_pinctrl_set_conf((pinctrl), AIROHA_PINCTRL_CONFS_PULLUP, \ 2626 2606 (pin), (val)) 2627 2607 #define airoha_pinctrl_set_pulldown_conf(pinctrl, pin, val) \ 2628 - airoha_pinctrl_set_conf((pinctrl), airoha_pinctrl_pulldown_conf, \ 2629 - ARRAY_SIZE(airoha_pinctrl_pulldown_conf), \ 2608 + airoha_pinctrl_set_conf((pinctrl), AIROHA_PINCTRL_CONFS_PULLDOWN, \ 2630 2609 (pin), (val)) 2631 2610 #define airoha_pinctrl_set_drive_e2_conf(pinctrl, pin, val) \ 2632 - airoha_pinctrl_set_conf((pinctrl), airoha_pinctrl_drive_e2_conf, \ 2633 - ARRAY_SIZE(airoha_pinctrl_drive_e2_conf), \ 2611 + airoha_pinctrl_set_conf((pinctrl), AIROHA_PINCTRL_CONFS_DRIVE_E2, \ 2634 2612 (pin), (val)) 2635 2613 #define airoha_pinctrl_set_drive_e4_conf(pinctrl, pin, val) \ 2636 - airoha_pinctrl_set_conf((pinctrl), airoha_pinctrl_drive_e4_conf, \ 2637 - ARRAY_SIZE(airoha_pinctrl_drive_e4_conf), \ 2614 + airoha_pinctrl_set_conf((pinctrl), AIROHA_PINCTRL_CONFS_DRIVE_E4, \ 2638 2615 (pin), (val)) 2639 2616 #define airoha_pinctrl_set_pcie_rst_od_conf(pinctrl, pin, val) \ 2640 - airoha_pinctrl_set_conf((pinctrl), airoha_pinctrl_pcie_rst_od_conf, \ 2641 - ARRAY_SIZE(airoha_pinctrl_pcie_rst_od_conf), \ 2617 + airoha_pinctrl_set_conf((pinctrl), AIROHA_PINCTRL_CONFS_PCIE_RST_OD, \ 2642 2618 (pin), (val)) 2643 2619 2644 2620 static int airoha_pinconf_get_direction(struct pinctrl_dev *pctrl_dev, u32 p) ··· 2810 2796 static int airoha_pinconf_group_get(struct pinctrl_dev *pctrl_dev, 2811 2797 unsigned int group, unsigned long *config) 2812 2798 { 2799 + struct airoha_pinctrl *pinctrl = pinctrl_dev_get_drvdata(pctrl_dev); 2813 2800 u32 cur_config = 0; 2814 2801 int i; 2815 2802 2816 - for (i = 0; i < airoha_pinctrl_groups[group].npins; i++) { 2803 + for (i = 0; i < pinctrl->grps[group].npins; i++) { 2817 2804 if (airoha_pinconf_get(pctrl_dev, 2818 - airoha_pinctrl_groups[group].pins[i], 2819 - config)) 2805 + pinctrl->grps[group].pins[i], 2806 + config)) 2820 2807 return -ENOTSUPP; 2821 2808 2822 2809 if (i && cur_config != *config) ··· 2833 2818 unsigned int group, unsigned long *configs, 2834 2819 unsigned int num_configs) 2835 2820 { 2821 + struct airoha_pinctrl *pinctrl = pinctrl_dev_get_drvdata(pctrl_dev); 2836 2822 int i; 2837 2823 2838 - for (i = 0; i < airoha_pinctrl_groups[group].npins; i++) { 2824 + for (i = 0; i < pinctrl->grps[group].npins; i++) { 2839 2825 int err; 2840 2826 2841 2827 err = airoha_pinconf_set(pctrl_dev, 2842 - airoha_pinctrl_groups[group].pins[i], 2828 + pinctrl->grps[group].pins[i], 2843 2829 configs, num_configs); 2844 2830 if (err) 2845 2831 return err; ··· 2866 2850 .dt_free_map = pinconf_generic_dt_free_map, 2867 2851 }; 2868 2852 2869 - static const struct pinctrl_desc airoha_pinctrl_desc = { 2870 - .name = KBUILD_MODNAME, 2871 - .owner = THIS_MODULE, 2872 - .pctlops = &airoha_pctlops, 2873 - .pmxops = &airoha_pmxops, 2874 - .confops = &airoha_confops, 2875 - .pins = airoha_pinctrl_pins, 2876 - .npins = ARRAY_SIZE(airoha_pinctrl_pins), 2877 - }; 2878 - 2879 2853 static int airoha_pinctrl_probe(struct platform_device *pdev) 2880 2854 { 2855 + const struct airoha_pinctrl_match_data *data; 2881 2856 struct device *dev = &pdev->dev; 2882 2857 struct airoha_pinctrl *pinctrl; 2883 2858 struct regmap *map; 2884 2859 int err, i; 2860 + 2861 + data = device_get_match_data(dev); 2885 2862 2886 2863 pinctrl = devm_kzalloc(dev, sizeof(*pinctrl), GFP_KERNEL); 2887 2864 if (!pinctrl) ··· 2890 2881 2891 2882 pinctrl->chip_scu = map; 2892 2883 2893 - err = devm_pinctrl_register_and_init(dev, &airoha_pinctrl_desc, 2884 + /* Init pinctrl desc struct */ 2885 + pinctrl->desc.name = KBUILD_MODNAME; 2886 + pinctrl->desc.owner = THIS_MODULE; 2887 + pinctrl->desc.pctlops = &airoha_pctlops; 2888 + pinctrl->desc.pmxops = &airoha_pmxops; 2889 + pinctrl->desc.confops = &airoha_confops; 2890 + pinctrl->desc.pins = data->pins; 2891 + pinctrl->desc.npins = data->num_pins; 2892 + 2893 + err = devm_pinctrl_register_and_init(dev, &pinctrl->desc, 2894 2894 pinctrl, &pinctrl->ctrl); 2895 2895 if (err) 2896 2896 return err; 2897 2897 2898 2898 /* build pin groups */ 2899 - for (i = 0; i < ARRAY_SIZE(airoha_pinctrl_groups); i++) { 2900 - const struct pingroup *grp = &airoha_pinctrl_groups[i]; 2899 + for (i = 0; i < data->num_grps; i++) { 2900 + const struct pingroup *grp = &data->grps[i]; 2901 2901 2902 2902 err = pinctrl_generic_add_group(pinctrl->ctrl, grp->name, 2903 2903 grp->pins, grp->npins, ··· 2919 2901 } 2920 2902 2921 2903 /* build functions */ 2922 - for (i = 0; i < ARRAY_SIZE(airoha_pinctrl_funcs); i++) { 2904 + for (i = 0; i < data->num_funcs; i++) { 2923 2905 const struct airoha_pinctrl_func *func; 2924 2906 2925 - func = &airoha_pinctrl_funcs[i]; 2907 + func = &data->funcs[i]; 2926 2908 err = pinmux_generic_add_pinfunction(pinctrl->ctrl, 2927 2909 &func->desc, 2928 2910 (void *)func); ··· 2933 2915 } 2934 2916 } 2935 2917 2918 + pinctrl->grps = data->grps; 2919 + pinctrl->funcs = data->funcs; 2920 + pinctrl->confs_info = data->confs_info; 2921 + 2936 2922 err = pinctrl_enable(pinctrl->ctrl); 2937 2923 if (err) 2938 2924 return err; ··· 2945 2923 return airoha_pinctrl_add_gpiochip(pinctrl, pdev); 2946 2924 } 2947 2925 2926 + static const struct airoha_pinctrl_match_data en7581_pinctrl_match_data = { 2927 + .pins = en7581_pinctrl_pins, 2928 + .num_pins = ARRAY_SIZE(en7581_pinctrl_pins), 2929 + .grps = en7581_pinctrl_groups, 2930 + .num_grps = ARRAY_SIZE(en7581_pinctrl_groups), 2931 + .funcs = en7581_pinctrl_funcs, 2932 + .num_funcs = ARRAY_SIZE(en7581_pinctrl_funcs), 2933 + .confs_info = { 2934 + [AIROHA_PINCTRL_CONFS_PULLUP] = { 2935 + .confs = en7581_pinctrl_pullup_conf, 2936 + .num_confs = ARRAY_SIZE(en7581_pinctrl_pullup_conf), 2937 + }, 2938 + [AIROHA_PINCTRL_CONFS_PULLDOWN] = { 2939 + .confs = en7581_pinctrl_pulldown_conf, 2940 + .num_confs = ARRAY_SIZE(en7581_pinctrl_pulldown_conf), 2941 + }, 2942 + [AIROHA_PINCTRL_CONFS_DRIVE_E2] = { 2943 + .confs = en7581_pinctrl_drive_e2_conf, 2944 + .num_confs = ARRAY_SIZE(en7581_pinctrl_drive_e2_conf), 2945 + }, 2946 + [AIROHA_PINCTRL_CONFS_DRIVE_E4] = { 2947 + .confs = en7581_pinctrl_drive_e4_conf, 2948 + .num_confs = ARRAY_SIZE(en7581_pinctrl_drive_e4_conf), 2949 + }, 2950 + [AIROHA_PINCTRL_CONFS_PCIE_RST_OD] = { 2951 + .confs = en7581_pinctrl_pcie_rst_od_conf, 2952 + .num_confs = ARRAY_SIZE(en7581_pinctrl_pcie_rst_od_conf), 2953 + }, 2954 + }, 2955 + }; 2956 + 2957 + static const struct airoha_pinctrl_match_data an7583_pinctrl_match_data = { 2958 + .pins = an7583_pinctrl_pins, 2959 + .num_pins = ARRAY_SIZE(an7583_pinctrl_pins), 2960 + .grps = an7583_pinctrl_groups, 2961 + .num_grps = ARRAY_SIZE(an7583_pinctrl_groups), 2962 + .funcs = an7583_pinctrl_funcs, 2963 + .num_funcs = ARRAY_SIZE(an7583_pinctrl_funcs), 2964 + .confs_info = { 2965 + [AIROHA_PINCTRL_CONFS_PULLUP] = { 2966 + .confs = an7583_pinctrl_pullup_conf, 2967 + .num_confs = ARRAY_SIZE(an7583_pinctrl_pullup_conf), 2968 + }, 2969 + [AIROHA_PINCTRL_CONFS_PULLDOWN] = { 2970 + .confs = an7583_pinctrl_pulldown_conf, 2971 + .num_confs = ARRAY_SIZE(an7583_pinctrl_pulldown_conf), 2972 + }, 2973 + [AIROHA_PINCTRL_CONFS_DRIVE_E2] = { 2974 + .confs = an7583_pinctrl_drive_e2_conf, 2975 + .num_confs = ARRAY_SIZE(an7583_pinctrl_drive_e2_conf), 2976 + }, 2977 + [AIROHA_PINCTRL_CONFS_DRIVE_E4] = { 2978 + .confs = an7583_pinctrl_drive_e4_conf, 2979 + .num_confs = ARRAY_SIZE(an7583_pinctrl_drive_e4_conf), 2980 + }, 2981 + [AIROHA_PINCTRL_CONFS_PCIE_RST_OD] = { 2982 + .confs = an7583_pinctrl_pcie_rst_od_conf, 2983 + .num_confs = ARRAY_SIZE(an7583_pinctrl_pcie_rst_od_conf), 2984 + }, 2985 + }, 2986 + }; 2987 + 2948 2988 static const struct of_device_id airoha_pinctrl_of_match[] = { 2949 - { .compatible = "airoha,en7581-pinctrl" }, 2989 + { .compatible = "airoha,en7581-pinctrl", .data = &en7581_pinctrl_match_data }, 2990 + { .compatible = "airoha,an7583-pinctrl", .data = &an7583_pinctrl_match_data }, 2950 2991 { /* sentinel */ } 2951 2992 }; 2952 2993 MODULE_DEVICE_TABLE(of, airoha_pinctrl_of_match);
+1478
drivers/pinctrl/mediatek/pinctrl-mt6878.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 2 + /* 3 + * Copyright (C) 2023 MediaTek Inc. 4 + * Author: Light Hsieh <light.hsieh@mediatek.com> 5 + * 6 + * Copyright (C) 2025 Igor Belwon <igor.belwon@mentallysanemainliners.org> 7 + */ 8 + 9 + #include <linux/module.h> 10 + #include "pinctrl-mtk-mt6878.h" 11 + #include "pinctrl-paris.h" 12 + 13 + /* MT6878 have multiple bases to program pin configuration listed as the below: 14 + * GPIO_BASE: 0x10005000 15 + * IOCFG_BL_BASE: 0x11D10000 16 + * IOCFG_BM_BASE: 0x11D30000 17 + * IOCFG_BR_BASE: 0x11D40000 18 + * IOCFG_BL1_BASE: 0x11D50000 19 + * IOCFG_BR1_BASE: 0x11D60000 20 + * IOCFG_LM_BASE: 0x11E20000 21 + * IOCFG_LT_BASE: 0x11E30000 22 + * IOCFG_RM_BASE: 0x11EB0000 23 + * IOCFG_RT_BASE: 0x11EC0000 24 + * _i_based could be used to indicate what base the pin should be mapped into. 25 + */ 26 + 27 + #define PIN_FIELD_BASE(s_pin, e_pin, i_base, s_addr, x_addrs, s_bit, x_bits) \ 28 + PIN_FIELD_CALC(s_pin, e_pin, i_base, s_addr, x_addrs, s_bit, x_bits, \ 29 + 32, 0) 30 + 31 + #define PINS_FIELD_BASE(s_pin, e_pin, i_base, s_addr, x_addrs, s_bit, x_bits) \ 32 + PIN_FIELD_CALC(s_pin, e_pin, i_base, s_addr, x_addrs, s_bit, x_bits, \ 33 + 32, 1) 34 + 35 + static const struct mtk_pin_field_calc mt6878_pin_mode_range[] = { 36 + PIN_FIELD(0, 195, 0x300, 0x10, 0, 4), 37 + }; 38 + 39 + static const struct mtk_pin_field_calc mt6878_pin_dir_range[] = { 40 + PIN_FIELD(0, 195, 0x0, 0x10, 0, 1), 41 + }; 42 + 43 + static const struct mtk_pin_field_calc mt6878_pin_di_range[] = { 44 + PIN_FIELD(0, 195, 0x200, 0x10, 0, 1), 45 + }; 46 + 47 + static const struct mtk_pin_field_calc mt6878_pin_do_range[] = { 48 + PIN_FIELD(0, 195, 0x100, 0x10, 0, 1), 49 + }; 50 + 51 + static const struct mtk_pin_field_calc mt6878_pin_ies_range[] = { 52 + PIN_FIELD_BASE(0, 0, 3, 0x0070, 0x10, 9, 1), 53 + PIN_FIELD_BASE(1, 1, 3, 0x0070, 0x10, 10, 1), 54 + PIN_FIELD_BASE(2, 2, 3, 0x0070, 0x10, 11, 1), 55 + PIN_FIELD_BASE(3, 3, 3, 0x0070, 0x10, 12, 1), 56 + PIN_FIELD_BASE(4, 4, 3, 0x0070, 0x10, 13, 1), 57 + PIN_FIELD_BASE(5, 5, 3, 0x0070, 0x10, 14, 1), 58 + PIN_FIELD_BASE(6, 6, 4, 0x0050, 0x10, 13, 1), 59 + PIN_FIELD_BASE(7, 7, 4, 0x0050, 0x10, 14, 1), 60 + PIN_FIELD_BASE(8, 8, 4, 0x0050, 0x10, 15, 1), 61 + PIN_FIELD_BASE(9, 9, 4, 0x0050, 0x10, 16, 1), 62 + PIN_FIELD_BASE(10, 10, 4, 0x0050, 0x10, 10, 1), 63 + PIN_FIELD_BASE(11, 11, 4, 0x0050, 0x10, 11, 1), 64 + PIN_FIELD_BASE(12, 12, 4, 0x0050, 0x10, 12, 1), 65 + PIN_FIELD_BASE(13, 13, 6, 0x0070, 0x10, 4, 1), 66 + PIN_FIELD_BASE(14, 14, 6, 0x0070, 0x10, 5, 1), 67 + PIN_FIELD_BASE(15, 15, 6, 0x0070, 0x10, 6, 1), 68 + PIN_FIELD_BASE(16, 16, 6, 0x0070, 0x10, 7, 1), 69 + PIN_FIELD_BASE(17, 17, 6, 0x0070, 0x10, 8, 1), 70 + PIN_FIELD_BASE(18, 18, 6, 0x0070, 0x10, 9, 1), 71 + PIN_FIELD_BASE(19, 19, 3, 0x0070, 0x10, 0, 1), 72 + PIN_FIELD_BASE(20, 20, 3, 0x0070, 0x10, 1, 1), 73 + PIN_FIELD_BASE(21, 21, 3, 0x0070, 0x10, 2, 1), 74 + PIN_FIELD_BASE(22, 22, 3, 0x0070, 0x10, 3, 1), 75 + PIN_FIELD_BASE(23, 23, 3, 0x0070, 0x10, 4, 1), 76 + PIN_FIELD_BASE(24, 24, 5, 0x0040, 0x10, 1, 1), 77 + PIN_FIELD_BASE(25, 25, 3, 0x0070, 0x10, 5, 1), 78 + PIN_FIELD_BASE(26, 26, 3, 0x0070, 0x10, 6, 1), 79 + PIN_FIELD_BASE(27, 27, 3, 0x0070, 0x10, 7, 1), 80 + PIN_FIELD_BASE(28, 28, 3, 0x0070, 0x10, 8, 1), 81 + PIN_FIELD_BASE(29, 29, 6, 0x0070, 0x10, 10, 1), 82 + PIN_FIELD_BASE(30, 30, 6, 0x0070, 0x10, 12, 1), 83 + PIN_FIELD_BASE(31, 31, 6, 0x0070, 0x10, 13, 1), 84 + PIN_FIELD_BASE(32, 32, 6, 0x0070, 0x10, 11, 1), 85 + PIN_FIELD_BASE(33, 33, 9, 0x0050, 0x10, 0, 1), 86 + PIN_FIELD_BASE(34, 34, 9, 0x0050, 0x10, 1, 1), 87 + PIN_FIELD_BASE(35, 35, 9, 0x0050, 0x10, 2, 1), 88 + PIN_FIELD_BASE(36, 36, 8, 0x0090, 0x10, 0, 1), 89 + PIN_FIELD_BASE(37, 37, 8, 0x0090, 0x10, 1, 1), 90 + PIN_FIELD_BASE(38, 38, 8, 0x0090, 0x10, 2, 1), 91 + PIN_FIELD_BASE(39, 39, 8, 0x0090, 0x10, 3, 1), 92 + PIN_FIELD_BASE(40, 40, 8, 0x0090, 0x10, 4, 1), 93 + PIN_FIELD_BASE(41, 41, 4, 0x0050, 0x10, 20, 1), 94 + PIN_FIELD_BASE(42, 42, 4, 0x0050, 0x10, 17, 1), 95 + PIN_FIELD_BASE(43, 43, 4, 0x0050, 0x10, 19, 1), 96 + PIN_FIELD_BASE(44, 44, 4, 0x0050, 0x10, 21, 1), 97 + PIN_FIELD_BASE(45, 45, 4, 0x0050, 0x10, 18, 1), 98 + PIN_FIELD_BASE(46, 46, 4, 0x0050, 0x10, 22, 1), 99 + PIN_FIELD_BASE(47, 47, 4, 0x0050, 0x10, 23, 1), 100 + PIN_FIELD_BASE(48, 48, 3, 0x0070, 0x10, 25, 1), 101 + PIN_FIELD_BASE(49, 49, 3, 0x0070, 0x10, 23, 1), 102 + PIN_FIELD_BASE(50, 50, 3, 0x0070, 0x10, 26, 1), 103 + PIN_FIELD_BASE(51, 51, 3, 0x0070, 0x10, 24, 1), 104 + PIN_FIELD_BASE(52, 52, 3, 0x0070, 0x10, 17, 1), 105 + PIN_FIELD_BASE(53, 53, 3, 0x0070, 0x10, 18, 1), 106 + PIN_FIELD_BASE(54, 54, 3, 0x0070, 0x10, 15, 1), 107 + PIN_FIELD_BASE(55, 55, 3, 0x0070, 0x10, 16, 1), 108 + PIN_FIELD_BASE(56, 56, 5, 0x0040, 0x10, 8, 1), 109 + PIN_FIELD_BASE(57, 57, 5, 0x0040, 0x10, 9, 1), 110 + PIN_FIELD_BASE(58, 58, 3, 0x0070, 0x10, 22, 1), 111 + PIN_FIELD_BASE(59, 59, 3, 0x0070, 0x10, 21, 1), 112 + PIN_FIELD_BASE(60, 60, 8, 0x0090, 0x10, 21, 1), 113 + PIN_FIELD_BASE(61, 61, 8, 0x0090, 0x10, 22, 1), 114 + PIN_FIELD_BASE(62, 62, 8, 0x0090, 0x10, 24, 1), 115 + PIN_FIELD_BASE(63, 63, 8, 0x0090, 0x10, 23, 1), 116 + PIN_FIELD_BASE(64, 64, 8, 0x0090, 0x10, 25, 1), 117 + PIN_FIELD_BASE(65, 65, 8, 0x0090, 0x10, 26, 1), 118 + PIN_FIELD_BASE(66, 66, 8, 0x0090, 0x10, 28, 1), 119 + PIN_FIELD_BASE(67, 67, 8, 0x0090, 0x10, 27, 1), 120 + PIN_FIELD_BASE(68, 68, 5, 0x0040, 0x10, 3, 1), 121 + PIN_FIELD_BASE(69, 69, 5, 0x0040, 0x10, 4, 1), 122 + PIN_FIELD_BASE(70, 70, 5, 0x0040, 0x10, 6, 1), 123 + PIN_FIELD_BASE(71, 71, 5, 0x0040, 0x10, 5, 1), 124 + PIN_FIELD_BASE(72, 72, 5, 0x0040, 0x10, 10, 1), 125 + PIN_FIELD_BASE(73, 73, 5, 0x0040, 0x10, 11, 1), 126 + PIN_FIELD_BASE(74, 74, 5, 0x0040, 0x10, 13, 1), 127 + PIN_FIELD_BASE(75, 75, 5, 0x0040, 0x10, 12, 1), 128 + PIN_FIELD_BASE(76, 76, 5, 0x0040, 0x10, 0, 1), 129 + PIN_FIELD_BASE(77, 77, 2, 0x0040, 0x10, 0, 1), 130 + PIN_FIELD_BASE(78, 78, 2, 0x0040, 0x10, 1, 1), 131 + PIN_FIELD_BASE(79, 79, 2, 0x0040, 0x10, 2, 1), 132 + PIN_FIELD_BASE(80, 80, 2, 0x0040, 0x10, 3, 1), 133 + PIN_FIELD_BASE(81, 81, 2, 0x0040, 0x10, 4, 1), 134 + PIN_FIELD_BASE(82, 82, 2, 0x0040, 0x10, 5, 1), 135 + PIN_FIELD_BASE(83, 83, 2, 0x0040, 0x10, 9, 1), 136 + PIN_FIELD_BASE(84, 84, 2, 0x0040, 0x10, 11, 1), 137 + PIN_FIELD_BASE(85, 85, 2, 0x0040, 0x10, 10, 1), 138 + PIN_FIELD_BASE(86, 86, 2, 0x0040, 0x10, 12, 1), 139 + PIN_FIELD_BASE(87, 87, 2, 0x0040, 0x10, 14, 1), 140 + PIN_FIELD_BASE(88, 88, 2, 0x0040, 0x10, 13, 1), 141 + PIN_FIELD_BASE(89, 89, 4, 0x0050, 0x10, 9, 1), 142 + PIN_FIELD_BASE(90, 90, 4, 0x0050, 0x10, 24, 1), 143 + PIN_FIELD_BASE(91, 91, 4, 0x0050, 0x10, 8, 1), 144 + PIN_FIELD_BASE(92, 92, 8, 0x0090, 0x10, 5, 1), 145 + PIN_FIELD_BASE(93, 93, 8, 0x0090, 0x10, 6, 1), 146 + PIN_FIELD_BASE(94, 94, 8, 0x0090, 0x10, 7, 1), 147 + PIN_FIELD_BASE(95, 95, 8, 0x0090, 0x10, 8, 1), 148 + PIN_FIELD_BASE(96, 96, 8, 0x0090, 0x10, 9, 1), 149 + PIN_FIELD_BASE(97, 97, 1, 0x0070, 0x10, 19, 1), 150 + PIN_FIELD_BASE(98, 98, 1, 0x0070, 0x10, 18, 1), 151 + PIN_FIELD_BASE(99, 99, 1, 0x0070, 0x10, 0, 1), 152 + PIN_FIELD_BASE(100, 100, 1, 0x0070, 0x10, 1, 1), 153 + PIN_FIELD_BASE(101, 101, 1, 0x0070, 0x10, 10, 1), 154 + PIN_FIELD_BASE(102, 102, 1, 0x0070, 0x10, 11, 1), 155 + PIN_FIELD_BASE(103, 103, 1, 0x0070, 0x10, 12, 1), 156 + PIN_FIELD_BASE(104, 104, 1, 0x0070, 0x10, 13, 1), 157 + PIN_FIELD_BASE(105, 105, 1, 0x0070, 0x10, 14, 1), 158 + PIN_FIELD_BASE(106, 106, 1, 0x0070, 0x10, 15, 1), 159 + PIN_FIELD_BASE(107, 107, 1, 0x0070, 0x10, 16, 1), 160 + PIN_FIELD_BASE(108, 108, 1, 0x0070, 0x10, 17, 1), 161 + PIN_FIELD_BASE(109, 109, 1, 0x0070, 0x10, 2, 1), 162 + PIN_FIELD_BASE(110, 110, 1, 0x0070, 0x10, 3, 1), 163 + PIN_FIELD_BASE(111, 111, 1, 0x0070, 0x10, 4, 1), 164 + PIN_FIELD_BASE(112, 112, 1, 0x0070, 0x10, 5, 1), 165 + PIN_FIELD_BASE(113, 113, 1, 0x0070, 0x10, 6, 1), 166 + PIN_FIELD_BASE(114, 114, 1, 0x0070, 0x10, 7, 1), 167 + PIN_FIELD_BASE(115, 115, 1, 0x0070, 0x10, 8, 1), 168 + PIN_FIELD_BASE(116, 116, 1, 0x0070, 0x10, 9, 1), 169 + PIN_FIELD_BASE(117, 117, 1, 0x0070, 0x10, 20, 1), 170 + PIN_FIELD_BASE(118, 118, 1, 0x0070, 0x10, 21, 1), 171 + PIN_FIELD_BASE(119, 119, 1, 0x0070, 0x10, 22, 1), 172 + PIN_FIELD_BASE(120, 120, 1, 0x0070, 0x10, 23, 1), 173 + PIN_FIELD_BASE(121, 121, 1, 0x0070, 0x10, 24, 1), 174 + PIN_FIELD_BASE(122, 122, 1, 0x0070, 0x10, 25, 1), 175 + PIN_FIELD_BASE(123, 123, 1, 0x0070, 0x10, 26, 1), 176 + PIN_FIELD_BASE(124, 124, 1, 0x0070, 0x10, 27, 1), 177 + PIN_FIELD_BASE(125, 125, 8, 0x0090, 0x10, 20, 1), 178 + PIN_FIELD_BASE(126, 126, 8, 0x0090, 0x10, 29, 1), 179 + PIN_FIELD_BASE(127, 127, 8, 0x0090, 0x10, 30, 1), 180 + PIN_FIELD_BASE(128, 128, 8, 0x0090, 0x10, 31, 1), 181 + PIN_FIELD_BASE(129, 129, 8, 0x0090, 0x10, 10, 1), 182 + PIN_FIELD_BASE(130, 130, 8, 0x0090, 0x10, 13, 1), 183 + PIN_FIELD_BASE(131, 131, 6, 0x0070, 0x10, 14, 1), 184 + PIN_FIELD_BASE(132, 132, 6, 0x0070, 0x10, 17, 1), 185 + PIN_FIELD_BASE(133, 133, 8, 0x0090, 0x10, 11, 1), 186 + PIN_FIELD_BASE(134, 134, 8, 0x0090, 0x10, 14, 1), 187 + PIN_FIELD_BASE(135, 135, 6, 0x0070, 0x10, 15, 1), 188 + PIN_FIELD_BASE(136, 136, 6, 0x0070, 0x10, 18, 1), 189 + PIN_FIELD_BASE(137, 137, 6, 0x0070, 0x10, 16, 1), 190 + PIN_FIELD_BASE(138, 138, 6, 0x0070, 0x10, 19, 1), 191 + PIN_FIELD_BASE(139, 139, 6, 0x0070, 0x10, 0, 1), 192 + PIN_FIELD_BASE(140, 140, 6, 0x0070, 0x10, 2, 1), 193 + PIN_FIELD_BASE(141, 141, 6, 0x0070, 0x10, 1, 1), 194 + PIN_FIELD_BASE(142, 142, 6, 0x0070, 0x10, 3, 1), 195 + PIN_FIELD_BASE(143, 143, 8, 0x0090, 0x10, 12, 1), 196 + PIN_FIELD_BASE(144, 144, 8, 0x0090, 0x10, 15, 1), 197 + PIN_FIELD_BASE(145, 145, 5, 0x0040, 0x10, 2, 1), 198 + PIN_FIELD_BASE(146, 146, 5, 0x0040, 0x10, 7, 1), 199 + PIN_FIELD_BASE(147, 147, 3, 0x0070, 0x10, 19, 1), 200 + PIN_FIELD_BASE(148, 148, 3, 0x0070, 0x10, 20, 1), 201 + PIN_FIELD_BASE(149, 149, 8, 0x0090, 0x10, 16, 1), 202 + PIN_FIELD_BASE(150, 150, 8, 0x0090, 0x10, 17, 1), 203 + PIN_FIELD_BASE(151, 151, 8, 0x0090, 0x10, 18, 1), 204 + PIN_FIELD_BASE(152, 152, 8, 0x0090, 0x10, 19, 1), 205 + PIN_FIELD_BASE(153, 153, 2, 0x0040, 0x10, 6, 1), 206 + PIN_FIELD_BASE(154, 154, 2, 0x0040, 0x10, 7, 1), 207 + PIN_FIELD_BASE(155, 155, 2, 0x0040, 0x10, 8, 1), 208 + PIN_FIELD_BASE(156, 156, 9, 0x0050, 0x10, 15, 1), 209 + PIN_FIELD_BASE(157, 157, 9, 0x0050, 0x10, 16, 1), 210 + PIN_FIELD_BASE(158, 158, 9, 0x0050, 0x10, 17, 1), 211 + PIN_FIELD_BASE(159, 159, 9, 0x0050, 0x10, 18, 1), 212 + PIN_FIELD_BASE(160, 160, 4, 0x0050, 0x10, 26, 1), 213 + PIN_FIELD_BASE(161, 161, 4, 0x0050, 0x10, 25, 1), 214 + PIN_FIELD_BASE(162, 162, 4, 0x0050, 0x10, 28, 1), 215 + PIN_FIELD_BASE(163, 163, 4, 0x0050, 0x10, 27, 1), 216 + PIN_FIELD_BASE(164, 164, 4, 0x0050, 0x10, 0, 1), 217 + PIN_FIELD_BASE(165, 165, 4, 0x0050, 0x10, 7, 1), 218 + PIN_FIELD_BASE(166, 166, 4, 0x0050, 0x10, 3, 1), 219 + PIN_FIELD_BASE(167, 167, 4, 0x0050, 0x10, 4, 1), 220 + PIN_FIELD_BASE(168, 168, 4, 0x0050, 0x10, 5, 1), 221 + PIN_FIELD_BASE(169, 169, 4, 0x0050, 0x10, 6, 1), 222 + PIN_FIELD_BASE(170, 170, 4, 0x0050, 0x10, 1, 1), 223 + PIN_FIELD_BASE(171, 171, 4, 0x0050, 0x10, 2, 1), 224 + PIN_FIELD_BASE(172, 172, 9, 0x0050, 0x10, 7, 1), 225 + PIN_FIELD_BASE(173, 173, 9, 0x0050, 0x10, 8, 1), 226 + PIN_FIELD_BASE(174, 174, 9, 0x0050, 0x10, 3, 1), 227 + PIN_FIELD_BASE(175, 175, 9, 0x0050, 0x10, 4, 1), 228 + PIN_FIELD_BASE(176, 176, 9, 0x0050, 0x10, 5, 1), 229 + PIN_FIELD_BASE(177, 177, 9, 0x0050, 0x10, 9, 1), 230 + PIN_FIELD_BASE(178, 178, 9, 0x0050, 0x10, 10, 1), 231 + PIN_FIELD_BASE(179, 179, 9, 0x0050, 0x10, 11, 1), 232 + PIN_FIELD_BASE(180, 180, 9, 0x0050, 0x10, 12, 1), 233 + PIN_FIELD_BASE(181, 181, 9, 0x0050, 0x10, 13, 1), 234 + PIN_FIELD_BASE(182, 182, 9, 0x0050, 0x10, 14, 1), 235 + PIN_FIELD_BASE(183, 183, 9, 0x0050, 0x10, 6, 1), 236 + PIN_FIELD_BASE(184, 184, 7, 0x0040, 0x10, 10, 1), 237 + PIN_FIELD_BASE(185, 185, 7, 0x0040, 0x10, 0, 1), 238 + PIN_FIELD_BASE(186, 186, 7, 0x0040, 0x10, 1, 1), 239 + PIN_FIELD_BASE(187, 187, 7, 0x0040, 0x10, 11, 1), 240 + PIN_FIELD_BASE(188, 188, 7, 0x0040, 0x10, 2, 1), 241 + PIN_FIELD_BASE(189, 189, 7, 0x0040, 0x10, 3, 1), 242 + PIN_FIELD_BASE(190, 190, 7, 0x0040, 0x10, 4, 1), 243 + PIN_FIELD_BASE(191, 191, 7, 0x0040, 0x10, 5, 1), 244 + PIN_FIELD_BASE(192, 192, 7, 0x0040, 0x10, 6, 1), 245 + PIN_FIELD_BASE(193, 193, 7, 0x0040, 0x10, 7, 1), 246 + PIN_FIELD_BASE(194, 194, 7, 0x0040, 0x10, 8, 1), 247 + PIN_FIELD_BASE(195, 195, 7, 0x0040, 0x10, 9, 1), 248 + }; 249 + 250 + static const struct mtk_pin_field_calc mt6878_pin_smt_range[] = { 251 + PIN_FIELD_BASE(0, 0, 3, 0x00e0, 0x10, 16, 1), 252 + PIN_FIELD_BASE(1, 1, 3, 0x00e0, 0x10, 16, 1), 253 + PIN_FIELD_BASE(2, 2, 3, 0x00e0, 0x10, 15, 1), 254 + PIN_FIELD_BASE(3, 3, 3, 0x00e0, 0x10, 15, 1), 255 + PIN_FIELD_BASE(4, 4, 3, 0x00e0, 0x10, 9, 1), 256 + PIN_FIELD_BASE(5, 5, 3, 0x00e0, 0x10, 10, 1), 257 + PIN_FIELD_BASE(6, 6, 4, 0x00b0, 0x10, 2, 1), 258 + PIN_FIELD_BASE(7, 7, 4, 0x00b0, 0x10, 3, 1), 259 + PIN_FIELD_BASE(8, 8, 4, 0x00b0, 0x10, 11, 1), 260 + PIN_FIELD_BASE(9, 9, 4, 0x00b0, 0x10, 11, 1), 261 + PIN_FIELD_BASE(10, 10, 4, 0x00b0, 0x10, 11, 1), 262 + PIN_FIELD_BASE(11, 11, 4, 0x00b0, 0x10, 11, 1), 263 + PIN_FIELD_BASE(12, 12, 4, 0x00b0, 0x10, 11, 1), 264 + PIN_FIELD_BASE(13, 13, 6, 0x00e0, 0x10, 8, 1), 265 + PIN_FIELD_BASE(14, 14, 6, 0x00e0, 0x10, 8, 1), 266 + PIN_FIELD_BASE(15, 15, 6, 0x00e0, 0x10, 8, 1), 267 + PIN_FIELD_BASE(16, 16, 6, 0x00e0, 0x10, 8, 1), 268 + PIN_FIELD_BASE(17, 17, 6, 0x00e0, 0x10, 8, 1), 269 + PIN_FIELD_BASE(18, 18, 6, 0x00e0, 0x10, 7, 1), 270 + PIN_FIELD_BASE(19, 19, 3, 0x00e0, 0x10, 0, 1), 271 + PIN_FIELD_BASE(20, 20, 3, 0x00e0, 0x10, 1, 1), 272 + PIN_FIELD_BASE(21, 21, 3, 0x00e0, 0x10, 2, 1), 273 + PIN_FIELD_BASE(22, 22, 3, 0x00e0, 0x10, 3, 1), 274 + PIN_FIELD_BASE(23, 23, 3, 0x00e0, 0x10, 4, 1), 275 + PIN_FIELD_BASE(24, 24, 5, 0x00b0, 0x10, 0, 1), 276 + PIN_FIELD_BASE(25, 25, 3, 0x00e0, 0x10, 5, 1), 277 + PIN_FIELD_BASE(26, 26, 3, 0x00e0, 0x10, 6, 1), 278 + PIN_FIELD_BASE(27, 27, 3, 0x00e0, 0x10, 7, 1), 279 + PIN_FIELD_BASE(28, 28, 3, 0x00e0, 0x10, 8, 1), 280 + PIN_FIELD_BASE(29, 29, 6, 0x00e0, 0x10, 4, 1), 281 + PIN_FIELD_BASE(30, 30, 6, 0x00e0, 0x10, 9, 1), 282 + PIN_FIELD_BASE(31, 31, 6, 0x00e0, 0x10, 6, 1), 283 + PIN_FIELD_BASE(32, 32, 6, 0x00e0, 0x10, 5, 1), 284 + PIN_FIELD_BASE(33, 33, 9, 0x00f0, 0x10, 0, 1), 285 + PIN_FIELD_BASE(34, 34, 9, 0x00f0, 0x10, 1, 1), 286 + PIN_FIELD_BASE(35, 35, 9, 0x00f0, 0x10, 2, 1), 287 + PIN_FIELD_BASE(36, 36, 8, 0x0130, 0x10, 0, 1), 288 + PIN_FIELD_BASE(37, 37, 8, 0x0130, 0x10, 1, 1), 289 + PIN_FIELD_BASE(38, 38, 8, 0x0130, 0x10, 2, 1), 290 + PIN_FIELD_BASE(39, 39, 8, 0x0130, 0x10, 3, 1), 291 + PIN_FIELD_BASE(40, 40, 8, 0x0130, 0x10, 4, 1), 292 + PIN_FIELD_BASE(41, 41, 4, 0x00b0, 0x10, 7, 1), 293 + PIN_FIELD_BASE(42, 42, 4, 0x00b0, 0x10, 4, 1), 294 + PIN_FIELD_BASE(43, 43, 4, 0x00b0, 0x10, 6, 1), 295 + PIN_FIELD_BASE(44, 44, 4, 0x00b0, 0x10, 8, 1), 296 + PIN_FIELD_BASE(45, 45, 4, 0x00b0, 0x10, 5, 1), 297 + PIN_FIELD_BASE(46, 46, 4, 0x00b0, 0x10, 12, 1), 298 + PIN_FIELD_BASE(47, 47, 4, 0x00b0, 0x10, 12, 1), 299 + PIN_FIELD_BASE(48, 48, 3, 0x00e0, 0x10, 16, 1), 300 + PIN_FIELD_BASE(49, 49, 3, 0x00e0, 0x10, 16, 1), 301 + PIN_FIELD_BASE(50, 50, 3, 0x00e0, 0x10, 14, 1), 302 + PIN_FIELD_BASE(51, 51, 3, 0x00e0, 0x10, 14, 1), 303 + PIN_FIELD_BASE(52, 52, 3, 0x00e0, 0x10, 12, 1), 304 + PIN_FIELD_BASE(53, 53, 3, 0x00e0, 0x10, 13, 1), 305 + PIN_FIELD_BASE(54, 54, 3, 0x00e0, 0x10, 17, 1), 306 + PIN_FIELD_BASE(55, 55, 3, 0x00e0, 0x10, 11, 1), 307 + PIN_FIELD_BASE(56, 56, 5, 0x00b0, 0x10, 8, 1), 308 + PIN_FIELD_BASE(57, 57, 5, 0x00b0, 0x10, 9, 1), 309 + PIN_FIELD_BASE(58, 58, 3, 0x00e0, 0x10, 21, 1), 310 + PIN_FIELD_BASE(59, 59, 3, 0x00e0, 0x10, 20, 1), 311 + PIN_FIELD_BASE(60, 60, 8, 0x0130, 0x10, 20, 1), 312 + PIN_FIELD_BASE(61, 61, 8, 0x0130, 0x10, 21, 1), 313 + PIN_FIELD_BASE(62, 62, 8, 0x0130, 0x10, 23, 1), 314 + PIN_FIELD_BASE(63, 63, 8, 0x0130, 0x10, 22, 1), 315 + PIN_FIELD_BASE(64, 64, 8, 0x0130, 0x10, 24, 1), 316 + PIN_FIELD_BASE(65, 65, 8, 0x0130, 0x10, 25, 1), 317 + PIN_FIELD_BASE(66, 66, 8, 0x0130, 0x10, 27, 1), 318 + PIN_FIELD_BASE(67, 67, 8, 0x0130, 0x10, 26, 1), 319 + PIN_FIELD_BASE(68, 68, 5, 0x00b0, 0x10, 3, 1), 320 + PIN_FIELD_BASE(69, 69, 5, 0x00b0, 0x10, 4, 1), 321 + PIN_FIELD_BASE(70, 70, 5, 0x00b0, 0x10, 6, 1), 322 + PIN_FIELD_BASE(71, 71, 5, 0x00b0, 0x10, 5, 1), 323 + PIN_FIELD_BASE(72, 72, 5, 0x00b0, 0x10, 10, 1), 324 + PIN_FIELD_BASE(73, 73, 5, 0x00b0, 0x10, 11, 1), 325 + PIN_FIELD_BASE(74, 74, 5, 0x00b0, 0x10, 13, 1), 326 + PIN_FIELD_BASE(75, 75, 5, 0x00b0, 0x10, 12, 1), 327 + PIN_FIELD_BASE(76, 76, 5, 0x00b0, 0x10, 1, 1), 328 + PIN_FIELD_BASE(77, 77, 2, 0x00e0, 0x10, 0, 1), 329 + PIN_FIELD_BASE(78, 78, 2, 0x00e0, 0x10, 1, 1), 330 + PIN_FIELD_BASE(79, 79, 2, 0x00e0, 0x10, 2, 1), 331 + PIN_FIELD_BASE(80, 80, 2, 0x00e0, 0x10, 3, 1), 332 + PIN_FIELD_BASE(81, 81, 2, 0x00e0, 0x10, 4, 1), 333 + PIN_FIELD_BASE(82, 82, 2, 0x00e0, 0x10, 5, 1), 334 + PIN_FIELD_BASE(83, 83, 2, 0x00e0, 0x10, 6, 1), 335 + PIN_FIELD_BASE(84, 84, 2, 0x00e0, 0x10, 9, 1), 336 + PIN_FIELD_BASE(85, 85, 2, 0x00e0, 0x10, 8, 1), 337 + PIN_FIELD_BASE(86, 86, 2, 0x00e0, 0x10, 10, 1), 338 + PIN_FIELD_BASE(87, 87, 2, 0x00e0, 0x10, 12, 1), 339 + PIN_FIELD_BASE(88, 88, 2, 0x00e0, 0x10, 11, 1), 340 + PIN_FIELD_BASE(89, 89, 4, 0x00b0, 0x10, 12, 1), 341 + PIN_FIELD_BASE(90, 90, 4, 0x00b0, 0x10, 13, 1), 342 + PIN_FIELD_BASE(91, 91, 4, 0x00b0, 0x10, 12, 1), 343 + PIN_FIELD_BASE(92, 92, 8, 0x0130, 0x10, 5, 1), 344 + PIN_FIELD_BASE(93, 93, 8, 0x0130, 0x10, 6, 1), 345 + PIN_FIELD_BASE(94, 94, 8, 0x0130, 0x10, 7, 1), 346 + PIN_FIELD_BASE(95, 95, 8, 0x0130, 0x10, 8, 1), 347 + PIN_FIELD_BASE(96, 96, 8, 0x0130, 0x10, 9, 1), 348 + PIN_FIELD_BASE(97, 97, 1, 0x0120, 0x10, 25, 1), 349 + PIN_FIELD_BASE(98, 98, 1, 0x0120, 0x10, 25, 1), 350 + PIN_FIELD_BASE(99, 99, 1, 0x0120, 0x10, 0, 1), 351 + PIN_FIELD_BASE(100, 100, 1, 0x0120, 0x10, 1, 1), 352 + PIN_FIELD_BASE(101, 101, 1, 0x0120, 0x10, 10, 1), 353 + PIN_FIELD_BASE(102, 102, 1, 0x0120, 0x10, 11, 1), 354 + PIN_FIELD_BASE(103, 103, 1, 0x0120, 0x10, 12, 1), 355 + PIN_FIELD_BASE(104, 104, 1, 0x0120, 0x10, 13, 1), 356 + PIN_FIELD_BASE(105, 105, 1, 0x0120, 0x10, 14, 1), 357 + PIN_FIELD_BASE(106, 106, 1, 0x0120, 0x10, 15, 1), 358 + PIN_FIELD_BASE(107, 107, 1, 0x0120, 0x10, 16, 1), 359 + PIN_FIELD_BASE(108, 108, 1, 0x0120, 0x10, 17, 1), 360 + PIN_FIELD_BASE(109, 109, 1, 0x0120, 0x10, 2, 1), 361 + PIN_FIELD_BASE(110, 110, 1, 0x0120, 0x10, 3, 1), 362 + PIN_FIELD_BASE(111, 111, 1, 0x0120, 0x10, 4, 1), 363 + PIN_FIELD_BASE(112, 112, 1, 0x0120, 0x10, 5, 1), 364 + PIN_FIELD_BASE(113, 113, 1, 0x0120, 0x10, 6, 1), 365 + PIN_FIELD_BASE(114, 114, 1, 0x0120, 0x10, 7, 1), 366 + PIN_FIELD_BASE(115, 115, 1, 0x0120, 0x10, 8, 1), 367 + PIN_FIELD_BASE(116, 116, 1, 0x0120, 0x10, 9, 1), 368 + PIN_FIELD_BASE(117, 117, 1, 0x0120, 0x10, 18, 1), 369 + PIN_FIELD_BASE(118, 118, 1, 0x0120, 0x10, 19, 1), 370 + PIN_FIELD_BASE(119, 119, 1, 0x0120, 0x10, 20, 1), 371 + PIN_FIELD_BASE(120, 120, 1, 0x0120, 0x10, 21, 1), 372 + PIN_FIELD_BASE(121, 121, 1, 0x0120, 0x10, 22, 1), 373 + PIN_FIELD_BASE(122, 122, 1, 0x0120, 0x10, 23, 1), 374 + PIN_FIELD_BASE(123, 123, 1, 0x0120, 0x10, 24, 1), 375 + PIN_FIELD_BASE(124, 124, 1, 0x0120, 0x10, 24, 1), 376 + PIN_FIELD_BASE(125, 125, 8, 0x0130, 0x10, 19, 1), 377 + PIN_FIELD_BASE(126, 126, 8, 0x0130, 0x10, 28, 1), 378 + PIN_FIELD_BASE(127, 127, 8, 0x0130, 0x10, 29, 1), 379 + PIN_FIELD_BASE(128, 128, 8, 0x0130, 0x10, 30, 1), 380 + PIN_FIELD_BASE(129, 129, 8, 0x0130, 0x10, 10, 1), 381 + PIN_FIELD_BASE(130, 130, 8, 0x0130, 0x10, 13, 1), 382 + PIN_FIELD_BASE(131, 131, 6, 0x00e0, 0x10, 10, 1), 383 + PIN_FIELD_BASE(132, 132, 6, 0x00e0, 0x10, 13, 1), 384 + PIN_FIELD_BASE(133, 133, 8, 0x0130, 0x10, 11, 1), 385 + PIN_FIELD_BASE(134, 134, 8, 0x0130, 0x10, 14, 1), 386 + PIN_FIELD_BASE(135, 135, 6, 0x00e0, 0x10, 11, 1), 387 + PIN_FIELD_BASE(136, 136, 6, 0x00e0, 0x10, 14, 1), 388 + PIN_FIELD_BASE(137, 137, 6, 0x00e0, 0x10, 12, 1), 389 + PIN_FIELD_BASE(138, 138, 6, 0x00e0, 0x10, 15, 1), 390 + PIN_FIELD_BASE(139, 139, 6, 0x00e0, 0x10, 0, 1), 391 + PIN_FIELD_BASE(140, 140, 6, 0x00e0, 0x10, 2, 1), 392 + PIN_FIELD_BASE(141, 141, 6, 0x00e0, 0x10, 1, 1), 393 + PIN_FIELD_BASE(142, 142, 6, 0x00e0, 0x10, 3, 1), 394 + PIN_FIELD_BASE(143, 143, 8, 0x0130, 0x10, 12, 1), 395 + PIN_FIELD_BASE(144, 144, 8, 0x0130, 0x10, 15, 1), 396 + PIN_FIELD_BASE(145, 145, 5, 0x00b0, 0x10, 2, 1), 397 + PIN_FIELD_BASE(146, 146, 5, 0x00b0, 0x10, 7, 1), 398 + PIN_FIELD_BASE(147, 147, 3, 0x00e0, 0x10, 18, 1), 399 + PIN_FIELD_BASE(148, 148, 3, 0x00e0, 0x10, 19, 1), 400 + PIN_FIELD_BASE(149, 149, 8, 0x0130, 0x10, 16, 1), 401 + PIN_FIELD_BASE(150, 150, 8, 0x0130, 0x10, 17, 1), 402 + PIN_FIELD_BASE(151, 151, 8, 0x0130, 0x10, 18, 1), 403 + PIN_FIELD_BASE(152, 152, 8, 0x0130, 0x10, 18, 1), 404 + PIN_FIELD_BASE(153, 153, 2, 0x00e0, 0x10, 7, 1), 405 + PIN_FIELD_BASE(154, 154, 2, 0x00e0, 0x10, 7, 1), 406 + PIN_FIELD_BASE(155, 155, 2, 0x00e0, 0x10, 7, 1), 407 + PIN_FIELD_BASE(156, 156, 9, 0x00f0, 0x10, 7, 1), 408 + PIN_FIELD_BASE(157, 157, 9, 0x00f0, 0x10, 8, 1), 409 + PIN_FIELD_BASE(158, 158, 9, 0x00f0, 0x10, 9, 1), 410 + PIN_FIELD_BASE(159, 159, 9, 0x00f0, 0x10, 10, 1), 411 + PIN_FIELD_BASE(160, 160, 4, 0x00b0, 0x10, 13, 1), 412 + PIN_FIELD_BASE(161, 161, 4, 0x00b0, 0x10, 13, 1), 413 + PIN_FIELD_BASE(162, 162, 4, 0x00b0, 0x10, 13, 1), 414 + PIN_FIELD_BASE(163, 163, 4, 0x00b0, 0x10, 9, 1), 415 + PIN_FIELD_BASE(164, 164, 4, 0x00b0, 0x10, 10, 1), 416 + PIN_FIELD_BASE(165, 165, 4, 0x00b0, 0x10, 10, 1), 417 + PIN_FIELD_BASE(166, 166, 4, 0x00b0, 0x10, 10, 1), 418 + PIN_FIELD_BASE(167, 167, 4, 0x00b0, 0x10, 10, 1), 419 + PIN_FIELD_BASE(168, 168, 4, 0x00b0, 0x10, 10, 1), 420 + PIN_FIELD_BASE(169, 169, 4, 0x00b0, 0x10, 10, 1), 421 + PIN_FIELD_BASE(170, 170, 4, 0x00b0, 0x10, 0, 1), 422 + PIN_FIELD_BASE(171, 171, 4, 0x00b0, 0x10, 1, 1), 423 + PIN_FIELD_BASE(172, 172, 9, 0x00f0, 0x10, 5, 1), 424 + PIN_FIELD_BASE(173, 173, 9, 0x00f0, 0x10, 5, 1), 425 + PIN_FIELD_BASE(174, 174, 9, 0x00f0, 0x10, 5, 1), 426 + PIN_FIELD_BASE(175, 175, 9, 0x00f0, 0x10, 5, 1), 427 + PIN_FIELD_BASE(176, 176, 9, 0x00f0, 0x10, 5, 1), 428 + PIN_FIELD_BASE(177, 177, 9, 0x00f0, 0x10, 5, 1), 429 + PIN_FIELD_BASE(178, 178, 9, 0x00f0, 0x10, 6, 1), 430 + PIN_FIELD_BASE(179, 179, 9, 0x00f0, 0x10, 6, 1), 431 + PIN_FIELD_BASE(180, 180, 9, 0x00f0, 0x10, 6, 1), 432 + PIN_FIELD_BASE(181, 181, 9, 0x00f0, 0x10, 3, 1), 433 + PIN_FIELD_BASE(182, 182, 9, 0x00f0, 0x10, 4, 1), 434 + PIN_FIELD_BASE(183, 183, 9, 0x00f0, 0x10, 5, 1), 435 + PIN_FIELD_BASE(184, 184, 7, 0x00d0, 0x10, 10, 1), 436 + PIN_FIELD_BASE(185, 185, 7, 0x00d0, 0x10, 0, 1), 437 + PIN_FIELD_BASE(186, 186, 7, 0x00d0, 0x10, 1, 1), 438 + PIN_FIELD_BASE(187, 187, 7, 0x00d0, 0x10, 11, 1), 439 + PIN_FIELD_BASE(188, 188, 7, 0x00d0, 0x10, 2, 1), 440 + PIN_FIELD_BASE(189, 189, 7, 0x00d0, 0x10, 3, 1), 441 + PIN_FIELD_BASE(190, 190, 7, 0x00d0, 0x10, 4, 1), 442 + PIN_FIELD_BASE(191, 191, 7, 0x00d0, 0x10, 5, 1), 443 + PIN_FIELD_BASE(192, 192, 7, 0x00d0, 0x10, 6, 1), 444 + PIN_FIELD_BASE(193, 193, 7, 0x00d0, 0x10, 7, 1), 445 + PIN_FIELD_BASE(194, 194, 7, 0x00d0, 0x10, 8, 1), 446 + PIN_FIELD_BASE(195, 195, 7, 0x00d0, 0x10, 9, 1), 447 + }; 448 + 449 + static const struct mtk_pin_field_calc mt6878_pin_pu_range[] = { 450 + PIN_FIELD_BASE(0, 0, 3, 0x00b0, 0x10, 9, 1), 451 + PIN_FIELD_BASE(1, 1, 3, 0x00b0, 0x10, 10, 1), 452 + PIN_FIELD_BASE(2, 2, 3, 0x00b0, 0x10, 11, 1), 453 + PIN_FIELD_BASE(3, 3, 3, 0x00b0, 0x10, 12, 1), 454 + PIN_FIELD_BASE(4, 4, 3, 0x00b0, 0x10, 13, 1), 455 + PIN_FIELD_BASE(5, 5, 3, 0x00b0, 0x10, 14, 1), 456 + PIN_FIELD_BASE(6, 6, 4, 0x0090, 0x10, 13, 1), 457 + PIN_FIELD_BASE(7, 7, 4, 0x0090, 0x10, 14, 1), 458 + PIN_FIELD_BASE(8, 8, 4, 0x0090, 0x10, 15, 1), 459 + PIN_FIELD_BASE(9, 9, 4, 0x0090, 0x10, 16, 1), 460 + PIN_FIELD_BASE(10, 10, 4, 0x0090, 0x10, 10, 1), 461 + PIN_FIELD_BASE(11, 11, 4, 0x0090, 0x10, 11, 1), 462 + PIN_FIELD_BASE(12, 12, 4, 0x0090, 0x10, 12, 1), 463 + PIN_FIELD_BASE(13, 13, 6, 0x00b0, 0x10, 4, 1), 464 + PIN_FIELD_BASE(14, 14, 6, 0x00b0, 0x10, 5, 1), 465 + PIN_FIELD_BASE(15, 15, 6, 0x00b0, 0x10, 6, 1), 466 + PIN_FIELD_BASE(16, 16, 6, 0x00b0, 0x10, 7, 1), 467 + PIN_FIELD_BASE(17, 17, 6, 0x00b0, 0x10, 8, 1), 468 + PIN_FIELD_BASE(18, 18, 6, 0x00b0, 0x10, 9, 1), 469 + PIN_FIELD_BASE(19, 19, 3, 0x00b0, 0x10, 0, 1), 470 + PIN_FIELD_BASE(20, 20, 3, 0x00b0, 0x10, 1, 1), 471 + PIN_FIELD_BASE(21, 21, 3, 0x00b0, 0x10, 2, 1), 472 + PIN_FIELD_BASE(22, 22, 3, 0x00b0, 0x10, 3, 1), 473 + PIN_FIELD_BASE(23, 23, 3, 0x00b0, 0x10, 4, 1), 474 + PIN_FIELD_BASE(24, 24, 5, 0x0080, 0x10, 1, 1), 475 + PIN_FIELD_BASE(25, 25, 3, 0x00b0, 0x10, 5, 1), 476 + PIN_FIELD_BASE(26, 26, 3, 0x00b0, 0x10, 6, 1), 477 + PIN_FIELD_BASE(27, 27, 3, 0x00b0, 0x10, 7, 1), 478 + PIN_FIELD_BASE(28, 28, 3, 0x00b0, 0x10, 8, 1), 479 + PIN_FIELD_BASE(29, 29, 6, 0x00b0, 0x10, 10, 1), 480 + PIN_FIELD_BASE(30, 30, 6, 0x00b0, 0x10, 12, 1), 481 + PIN_FIELD_BASE(31, 31, 6, 0x00b0, 0x10, 13, 1), 482 + PIN_FIELD_BASE(32, 32, 6, 0x00b0, 0x10, 11, 1), 483 + PIN_FIELD_BASE(36, 36, 8, 0x00d0, 0x10, 0, 1), 484 + PIN_FIELD_BASE(37, 37, 8, 0x00d0, 0x10, 1, 1), 485 + PIN_FIELD_BASE(38, 38, 8, 0x00d0, 0x10, 2, 1), 486 + PIN_FIELD_BASE(39, 39, 8, 0x00d0, 0x10, 3, 1), 487 + PIN_FIELD_BASE(40, 40, 8, 0x00d0, 0x10, 4, 1), 488 + PIN_FIELD_BASE(41, 41, 4, 0x0090, 0x10, 20, 1), 489 + PIN_FIELD_BASE(42, 42, 4, 0x0090, 0x10, 17, 1), 490 + PIN_FIELD_BASE(43, 43, 4, 0x0090, 0x10, 19, 1), 491 + PIN_FIELD_BASE(44, 44, 4, 0x0090, 0x10, 21, 1), 492 + PIN_FIELD_BASE(45, 45, 4, 0x0090, 0x10, 18, 1), 493 + PIN_FIELD_BASE(46, 46, 4, 0x0090, 0x10, 22, 1), 494 + PIN_FIELD_BASE(47, 47, 4, 0x0090, 0x10, 23, 1), 495 + PIN_FIELD_BASE(48, 48, 3, 0x00b0, 0x10, 25, 1), 496 + PIN_FIELD_BASE(49, 49, 3, 0x00b0, 0x10, 23, 1), 497 + PIN_FIELD_BASE(50, 50, 3, 0x00b0, 0x10, 26, 1), 498 + PIN_FIELD_BASE(51, 51, 3, 0x00b0, 0x10, 24, 1), 499 + PIN_FIELD_BASE(52, 52, 3, 0x00b0, 0x10, 17, 1), 500 + PIN_FIELD_BASE(53, 53, 3, 0x00b0, 0x10, 18, 1), 501 + PIN_FIELD_BASE(54, 54, 3, 0x00b0, 0x10, 15, 1), 502 + PIN_FIELD_BASE(55, 55, 3, 0x00b0, 0x10, 16, 1), 503 + PIN_FIELD_BASE(56, 56, 5, 0x0080, 0x10, 8, 1), 504 + PIN_FIELD_BASE(57, 57, 5, 0x0080, 0x10, 9, 1), 505 + PIN_FIELD_BASE(58, 58, 3, 0x00b0, 0x10, 22, 1), 506 + PIN_FIELD_BASE(59, 59, 3, 0x00b0, 0x10, 21, 1), 507 + PIN_FIELD_BASE(60, 60, 8, 0x00d0, 0x10, 21, 1), 508 + PIN_FIELD_BASE(61, 61, 8, 0x00d0, 0x10, 22, 1), 509 + PIN_FIELD_BASE(62, 62, 8, 0x00d0, 0x10, 24, 1), 510 + PIN_FIELD_BASE(63, 63, 8, 0x00d0, 0x10, 23, 1), 511 + PIN_FIELD_BASE(64, 64, 8, 0x00d0, 0x10, 25, 1), 512 + PIN_FIELD_BASE(65, 65, 8, 0x00d0, 0x10, 26, 1), 513 + PIN_FIELD_BASE(66, 66, 8, 0x00d0, 0x10, 28, 1), 514 + PIN_FIELD_BASE(67, 67, 8, 0x00d0, 0x10, 27, 1), 515 + PIN_FIELD_BASE(68, 68, 5, 0x0080, 0x10, 3, 1), 516 + PIN_FIELD_BASE(69, 69, 5, 0x0080, 0x10, 4, 1), 517 + PIN_FIELD_BASE(70, 70, 5, 0x0080, 0x10, 6, 1), 518 + PIN_FIELD_BASE(71, 71, 5, 0x0080, 0x10, 5, 1), 519 + PIN_FIELD_BASE(72, 72, 5, 0x0080, 0x10, 10, 1), 520 + PIN_FIELD_BASE(73, 73, 5, 0x0080, 0x10, 11, 1), 521 + PIN_FIELD_BASE(74, 74, 5, 0x0080, 0x10, 13, 1), 522 + PIN_FIELD_BASE(75, 75, 5, 0x0080, 0x10, 12, 1), 523 + PIN_FIELD_BASE(76, 76, 5, 0x0080, 0x10, 0, 1), 524 + PIN_FIELD_BASE(89, 89, 4, 0x0090, 0x10, 9, 1), 525 + PIN_FIELD_BASE(90, 90, 4, 0x0090, 0x10, 24, 1), 526 + PIN_FIELD_BASE(91, 91, 4, 0x0090, 0x10, 8, 1), 527 + PIN_FIELD_BASE(92, 92, 8, 0x00d0, 0x10, 5, 1), 528 + PIN_FIELD_BASE(93, 93, 8, 0x00d0, 0x10, 6, 1), 529 + PIN_FIELD_BASE(94, 94, 8, 0x00d0, 0x10, 7, 1), 530 + PIN_FIELD_BASE(95, 95, 8, 0x00d0, 0x10, 8, 1), 531 + PIN_FIELD_BASE(96, 96, 8, 0x00d0, 0x10, 9, 1), 532 + PIN_FIELD_BASE(99, 99, 1, 0x00c0, 0x10, 0, 1), 533 + PIN_FIELD_BASE(100, 100, 1, 0x00c0, 0x10, 1, 1), 534 + PIN_FIELD_BASE(101, 101, 1, 0x00c0, 0x10, 10, 1), 535 + PIN_FIELD_BASE(102, 102, 1, 0x00c0, 0x10, 11, 1), 536 + PIN_FIELD_BASE(103, 103, 1, 0x00c0, 0x10, 12, 1), 537 + PIN_FIELD_BASE(104, 104, 1, 0x00c0, 0x10, 13, 1), 538 + PIN_FIELD_BASE(105, 105, 1, 0x00c0, 0x10, 14, 1), 539 + PIN_FIELD_BASE(106, 106, 1, 0x00c0, 0x10, 15, 1), 540 + PIN_FIELD_BASE(107, 107, 1, 0x00c0, 0x10, 16, 1), 541 + PIN_FIELD_BASE(108, 108, 1, 0x00c0, 0x10, 17, 1), 542 + PIN_FIELD_BASE(109, 109, 1, 0x00c0, 0x10, 2, 1), 543 + PIN_FIELD_BASE(110, 110, 1, 0x00c0, 0x10, 3, 1), 544 + PIN_FIELD_BASE(111, 111, 1, 0x00c0, 0x10, 4, 1), 545 + PIN_FIELD_BASE(112, 112, 1, 0x00c0, 0x10, 5, 1), 546 + PIN_FIELD_BASE(113, 113, 1, 0x00c0, 0x10, 6, 1), 547 + PIN_FIELD_BASE(114, 114, 1, 0x00c0, 0x10, 7, 1), 548 + PIN_FIELD_BASE(115, 115, 1, 0x00c0, 0x10, 8, 1), 549 + PIN_FIELD_BASE(116, 116, 1, 0x00c0, 0x10, 9, 1), 550 + PIN_FIELD_BASE(125, 125, 8, 0x00d0, 0x10, 20, 1), 551 + PIN_FIELD_BASE(126, 126, 8, 0x00d0, 0x10, 29, 1), 552 + PIN_FIELD_BASE(127, 127, 8, 0x00d0, 0x10, 30, 1), 553 + PIN_FIELD_BASE(128, 128, 8, 0x00d0, 0x10, 31, 1), 554 + PIN_FIELD_BASE(129, 129, 8, 0x00d0, 0x10, 10, 1), 555 + PIN_FIELD_BASE(130, 130, 8, 0x00d0, 0x10, 13, 1), 556 + PIN_FIELD_BASE(131, 131, 6, 0x00b0, 0x10, 14, 1), 557 + PIN_FIELD_BASE(132, 132, 6, 0x00b0, 0x10, 17, 1), 558 + PIN_FIELD_BASE(133, 133, 8, 0x00d0, 0x10, 11, 1), 559 + PIN_FIELD_BASE(134, 134, 8, 0x00d0, 0x10, 14, 1), 560 + PIN_FIELD_BASE(135, 135, 6, 0x00b0, 0x10, 15, 1), 561 + PIN_FIELD_BASE(136, 136, 6, 0x00b0, 0x10, 18, 1), 562 + PIN_FIELD_BASE(137, 137, 6, 0x00b0, 0x10, 16, 1), 563 + PIN_FIELD_BASE(138, 138, 6, 0x00b0, 0x10, 19, 1), 564 + PIN_FIELD_BASE(139, 139, 6, 0x00b0, 0x10, 0, 1), 565 + PIN_FIELD_BASE(140, 140, 6, 0x00b0, 0x10, 2, 1), 566 + PIN_FIELD_BASE(141, 141, 6, 0x00b0, 0x10, 1, 1), 567 + PIN_FIELD_BASE(142, 142, 6, 0x00b0, 0x10, 3, 1), 568 + PIN_FIELD_BASE(143, 143, 8, 0x00d0, 0x10, 12, 1), 569 + PIN_FIELD_BASE(144, 144, 8, 0x00d0, 0x10, 15, 1), 570 + PIN_FIELD_BASE(145, 145, 5, 0x0080, 0x10, 2, 1), 571 + PIN_FIELD_BASE(146, 146, 5, 0x0080, 0x10, 7, 1), 572 + PIN_FIELD_BASE(147, 147, 3, 0x00b0, 0x10, 19, 1), 573 + PIN_FIELD_BASE(148, 148, 3, 0x00b0, 0x10, 20, 1), 574 + PIN_FIELD_BASE(149, 149, 8, 0x00d0, 0x10, 16, 1), 575 + PIN_FIELD_BASE(150, 150, 8, 0x00d0, 0x10, 17, 1), 576 + PIN_FIELD_BASE(151, 151, 8, 0x00d0, 0x10, 18, 1), 577 + PIN_FIELD_BASE(152, 152, 8, 0x00d0, 0x10, 19, 1), 578 + PIN_FIELD_BASE(156, 156, 9, 0x00a0, 0x10, 0, 1), 579 + PIN_FIELD_BASE(157, 157, 9, 0x00a0, 0x10, 1, 1), 580 + PIN_FIELD_BASE(158, 158, 9, 0x00a0, 0x10, 2, 1), 581 + PIN_FIELD_BASE(159, 159, 9, 0x00a0, 0x10, 3, 1), 582 + PIN_FIELD_BASE(160, 160, 4, 0x0090, 0x10, 26, 1), 583 + PIN_FIELD_BASE(161, 161, 4, 0x0090, 0x10, 25, 1), 584 + PIN_FIELD_BASE(162, 162, 4, 0x0090, 0x10, 30, 1), 585 + PIN_FIELD_BASE(163, 163, 4, 0x0090, 0x10, 29, 1), 586 + PIN_FIELD_BASE(164, 164, 4, 0x0090, 0x10, 0, 1), 587 + PIN_FIELD_BASE(165, 165, 4, 0x0090, 0x10, 7, 1), 588 + PIN_FIELD_BASE(166, 166, 4, 0x0090, 0x10, 3, 1), 589 + PIN_FIELD_BASE(167, 167, 4, 0x0090, 0x10, 4, 1), 590 + PIN_FIELD_BASE(168, 168, 4, 0x0090, 0x10, 5, 1), 591 + PIN_FIELD_BASE(169, 169, 4, 0x0090, 0x10, 6, 1), 592 + PIN_FIELD_BASE(170, 170, 4, 0x0090, 0x10, 1, 1), 593 + PIN_FIELD_BASE(171, 171, 4, 0x0090, 0x10, 2, 1), 594 + }; 595 + 596 + static const struct mtk_pin_field_calc mt6878_pin_pd_range[] = { 597 + PIN_FIELD_BASE(0, 0, 3, 0x00a0, 0x10, 9, 1), 598 + PIN_FIELD_BASE(1, 1, 3, 0x00a0, 0x10, 10, 1), 599 + PIN_FIELD_BASE(2, 2, 3, 0x00a0, 0x10, 11, 1), 600 + PIN_FIELD_BASE(3, 3, 3, 0x00a0, 0x10, 12, 1), 601 + PIN_FIELD_BASE(4, 4, 3, 0x00a0, 0x10, 13, 1), 602 + PIN_FIELD_BASE(5, 5, 3, 0x00a0, 0x10, 14, 1), 603 + PIN_FIELD_BASE(6, 6, 4, 0x0080, 0x10, 13, 1), 604 + PIN_FIELD_BASE(7, 7, 4, 0x0080, 0x10, 14, 1), 605 + PIN_FIELD_BASE(8, 8, 4, 0x0080, 0x10, 15, 1), 606 + PIN_FIELD_BASE(9, 9, 4, 0x0080, 0x10, 16, 1), 607 + PIN_FIELD_BASE(10, 10, 4, 0x0080, 0x10, 10, 1), 608 + PIN_FIELD_BASE(11, 11, 4, 0x0080, 0x10, 11, 1), 609 + PIN_FIELD_BASE(12, 12, 4, 0x0080, 0x10, 12, 1), 610 + PIN_FIELD_BASE(13, 13, 6, 0x00a0, 0x10, 4, 1), 611 + PIN_FIELD_BASE(14, 14, 6, 0x00a0, 0x10, 5, 1), 612 + PIN_FIELD_BASE(15, 15, 6, 0x00a0, 0x10, 6, 1), 613 + PIN_FIELD_BASE(16, 16, 6, 0x00a0, 0x10, 7, 1), 614 + PIN_FIELD_BASE(17, 17, 6, 0x00a0, 0x10, 8, 1), 615 + PIN_FIELD_BASE(18, 18, 6, 0x00a0, 0x10, 9, 1), 616 + PIN_FIELD_BASE(19, 19, 3, 0x00a0, 0x10, 0, 1), 617 + PIN_FIELD_BASE(20, 20, 3, 0x00a0, 0x10, 1, 1), 618 + PIN_FIELD_BASE(21, 21, 3, 0x00a0, 0x10, 2, 1), 619 + PIN_FIELD_BASE(22, 22, 3, 0x00a0, 0x10, 3, 1), 620 + PIN_FIELD_BASE(23, 23, 3, 0x00a0, 0x10, 4, 1), 621 + PIN_FIELD_BASE(24, 24, 5, 0x0070, 0x10, 1, 1), 622 + PIN_FIELD_BASE(25, 25, 3, 0x00a0, 0x10, 5, 1), 623 + PIN_FIELD_BASE(26, 26, 3, 0x00a0, 0x10, 6, 1), 624 + PIN_FIELD_BASE(27, 27, 3, 0x00a0, 0x10, 7, 1), 625 + PIN_FIELD_BASE(28, 28, 3, 0x00a0, 0x10, 8, 1), 626 + PIN_FIELD_BASE(29, 29, 6, 0x00a0, 0x10, 10, 1), 627 + PIN_FIELD_BASE(30, 30, 6, 0x00a0, 0x10, 12, 1), 628 + PIN_FIELD_BASE(31, 31, 6, 0x00a0, 0x10, 13, 1), 629 + PIN_FIELD_BASE(32, 32, 6, 0x00a0, 0x10, 11, 1), 630 + PIN_FIELD_BASE(36, 36, 8, 0x00c0, 0x10, 0, 1), 631 + PIN_FIELD_BASE(37, 37, 8, 0x00c0, 0x10, 1, 1), 632 + PIN_FIELD_BASE(38, 38, 8, 0x00c0, 0x10, 2, 1), 633 + PIN_FIELD_BASE(39, 39, 8, 0x00c0, 0x10, 3, 1), 634 + PIN_FIELD_BASE(40, 40, 8, 0x00c0, 0x10, 4, 1), 635 + PIN_FIELD_BASE(41, 41, 4, 0x0080, 0x10, 20, 1), 636 + PIN_FIELD_BASE(42, 42, 4, 0x0080, 0x10, 17, 1), 637 + PIN_FIELD_BASE(43, 43, 4, 0x0080, 0x10, 19, 1), 638 + PIN_FIELD_BASE(44, 44, 4, 0x0080, 0x10, 21, 1), 639 + PIN_FIELD_BASE(45, 45, 4, 0x0080, 0x10, 18, 1), 640 + PIN_FIELD_BASE(46, 46, 4, 0x0080, 0x10, 22, 1), 641 + PIN_FIELD_BASE(47, 47, 4, 0x0080, 0x10, 23, 1), 642 + PIN_FIELD_BASE(48, 48, 3, 0x00a0, 0x10, 25, 1), 643 + PIN_FIELD_BASE(49, 49, 3, 0x00a0, 0x10, 23, 1), 644 + PIN_FIELD_BASE(50, 50, 3, 0x00a0, 0x10, 26, 1), 645 + PIN_FIELD_BASE(51, 51, 3, 0x00a0, 0x10, 24, 1), 646 + PIN_FIELD_BASE(52, 52, 3, 0x00a0, 0x10, 17, 1), 647 + PIN_FIELD_BASE(53, 53, 3, 0x00a0, 0x10, 18, 1), 648 + PIN_FIELD_BASE(54, 54, 3, 0x00a0, 0x10, 15, 1), 649 + PIN_FIELD_BASE(55, 55, 3, 0x00a0, 0x10, 16, 1), 650 + PIN_FIELD_BASE(56, 56, 5, 0x0070, 0x10, 8, 1), 651 + PIN_FIELD_BASE(57, 57, 5, 0x0070, 0x10, 9, 1), 652 + PIN_FIELD_BASE(58, 58, 3, 0x00a0, 0x10, 22, 1), 653 + PIN_FIELD_BASE(59, 59, 3, 0x00a0, 0x10, 21, 1), 654 + PIN_FIELD_BASE(60, 60, 8, 0x00c0, 0x10, 21, 1), 655 + PIN_FIELD_BASE(61, 61, 8, 0x00c0, 0x10, 22, 1), 656 + PIN_FIELD_BASE(62, 62, 8, 0x00c0, 0x10, 24, 1), 657 + PIN_FIELD_BASE(63, 63, 8, 0x00c0, 0x10, 23, 1), 658 + PIN_FIELD_BASE(64, 64, 8, 0x00c0, 0x10, 25, 1), 659 + PIN_FIELD_BASE(65, 65, 8, 0x00c0, 0x10, 26, 1), 660 + PIN_FIELD_BASE(66, 66, 8, 0x00c0, 0x10, 28, 1), 661 + PIN_FIELD_BASE(67, 67, 8, 0x00c0, 0x10, 27, 1), 662 + PIN_FIELD_BASE(68, 68, 5, 0x0070, 0x10, 3, 1), 663 + PIN_FIELD_BASE(69, 69, 5, 0x0070, 0x10, 4, 1), 664 + PIN_FIELD_BASE(70, 70, 5, 0x0070, 0x10, 6, 1), 665 + PIN_FIELD_BASE(71, 71, 5, 0x0070, 0x10, 5, 1), 666 + PIN_FIELD_BASE(72, 72, 5, 0x0070, 0x10, 10, 1), 667 + PIN_FIELD_BASE(73, 73, 5, 0x0070, 0x10, 11, 1), 668 + PIN_FIELD_BASE(74, 74, 5, 0x0070, 0x10, 13, 1), 669 + PIN_FIELD_BASE(75, 75, 5, 0x0070, 0x10, 12, 1), 670 + PIN_FIELD_BASE(76, 76, 5, 0x0070, 0x10, 0, 1), 671 + PIN_FIELD_BASE(89, 89, 4, 0x0080, 0x10, 9, 1), 672 + PIN_FIELD_BASE(90, 90, 4, 0x0080, 0x10, 24, 1), 673 + PIN_FIELD_BASE(91, 91, 4, 0x0080, 0x10, 8, 1), 674 + PIN_FIELD_BASE(92, 92, 8, 0x00c0, 0x10, 5, 1), 675 + PIN_FIELD_BASE(93, 93, 8, 0x00c0, 0x10, 6, 1), 676 + PIN_FIELD_BASE(94, 94, 8, 0x00c0, 0x10, 7, 1), 677 + PIN_FIELD_BASE(95, 95, 8, 0x00c0, 0x10, 8, 1), 678 + PIN_FIELD_BASE(96, 96, 8, 0x00c0, 0x10, 9, 1), 679 + PIN_FIELD_BASE(99, 99, 1, 0x00a0, 0x10, 0, 1), 680 + PIN_FIELD_BASE(100, 100, 1, 0x00a0, 0x10, 1, 1), 681 + PIN_FIELD_BASE(101, 101, 1, 0x00a0, 0x10, 10, 1), 682 + PIN_FIELD_BASE(102, 102, 1, 0x00a0, 0x10, 11, 1), 683 + PIN_FIELD_BASE(103, 103, 1, 0x00a0, 0x10, 12, 1), 684 + PIN_FIELD_BASE(104, 104, 1, 0x00a0, 0x10, 13, 1), 685 + PIN_FIELD_BASE(105, 105, 1, 0x00a0, 0x10, 14, 1), 686 + PIN_FIELD_BASE(106, 106, 1, 0x00a0, 0x10, 15, 1), 687 + PIN_FIELD_BASE(107, 107, 1, 0x00a0, 0x10, 16, 1), 688 + PIN_FIELD_BASE(108, 108, 1, 0x00a0, 0x10, 17, 1), 689 + PIN_FIELD_BASE(109, 109, 1, 0x00a0, 0x10, 2, 1), 690 + PIN_FIELD_BASE(110, 110, 1, 0x00a0, 0x10, 3, 1), 691 + PIN_FIELD_BASE(111, 111, 1, 0x00a0, 0x10, 4, 1), 692 + PIN_FIELD_BASE(112, 112, 1, 0x00a0, 0x10, 5, 1), 693 + PIN_FIELD_BASE(113, 113, 1, 0x00a0, 0x10, 6, 1), 694 + PIN_FIELD_BASE(114, 114, 1, 0x00a0, 0x10, 7, 1), 695 + PIN_FIELD_BASE(115, 115, 1, 0x00a0, 0x10, 8, 1), 696 + PIN_FIELD_BASE(116, 116, 1, 0x00a0, 0x10, 9, 1), 697 + PIN_FIELD_BASE(125, 125, 8, 0x00c0, 0x10, 20, 1), 698 + PIN_FIELD_BASE(126, 126, 8, 0x00c0, 0x10, 29, 1), 699 + PIN_FIELD_BASE(127, 127, 8, 0x00c0, 0x10, 30, 1), 700 + PIN_FIELD_BASE(128, 128, 8, 0x00c0, 0x10, 31, 1), 701 + PIN_FIELD_BASE(129, 129, 8, 0x00c0, 0x10, 10, 1), 702 + PIN_FIELD_BASE(130, 130, 8, 0x00c0, 0x10, 13, 1), 703 + PIN_FIELD_BASE(131, 131, 6, 0x00a0, 0x10, 14, 1), 704 + PIN_FIELD_BASE(132, 132, 6, 0x00a0, 0x10, 17, 1), 705 + PIN_FIELD_BASE(133, 133, 8, 0x00c0, 0x10, 11, 1), 706 + PIN_FIELD_BASE(134, 134, 8, 0x00c0, 0x10, 14, 1), 707 + PIN_FIELD_BASE(135, 135, 6, 0x00a0, 0x10, 15, 1), 708 + PIN_FIELD_BASE(136, 136, 6, 0x00a0, 0x10, 18, 1), 709 + PIN_FIELD_BASE(137, 137, 6, 0x00a0, 0x10, 16, 1), 710 + PIN_FIELD_BASE(138, 138, 6, 0x00a0, 0x10, 19, 1), 711 + PIN_FIELD_BASE(139, 139, 6, 0x00a0, 0x10, 0, 1), 712 + PIN_FIELD_BASE(140, 140, 6, 0x00a0, 0x10, 2, 1), 713 + PIN_FIELD_BASE(141, 141, 6, 0x00a0, 0x10, 1, 1), 714 + PIN_FIELD_BASE(142, 142, 6, 0x00a0, 0x10, 3, 1), 715 + PIN_FIELD_BASE(143, 143, 8, 0x00c0, 0x10, 12, 1), 716 + PIN_FIELD_BASE(144, 144, 8, 0x00c0, 0x10, 15, 1), 717 + PIN_FIELD_BASE(145, 145, 5, 0x0070, 0x10, 2, 1), 718 + PIN_FIELD_BASE(146, 146, 5, 0x0070, 0x10, 7, 1), 719 + PIN_FIELD_BASE(147, 147, 3, 0x00a0, 0x10, 19, 1), 720 + PIN_FIELD_BASE(148, 148, 3, 0x00a0, 0x10, 20, 1), 721 + PIN_FIELD_BASE(149, 149, 8, 0x00c0, 0x10, 16, 1), 722 + PIN_FIELD_BASE(150, 150, 8, 0x00c0, 0x10, 17, 1), 723 + PIN_FIELD_BASE(151, 151, 8, 0x00c0, 0x10, 18, 1), 724 + PIN_FIELD_BASE(152, 152, 8, 0x00c0, 0x10, 19, 1), 725 + PIN_FIELD_BASE(156, 156, 9, 0x0080, 0x10, 0, 1), 726 + PIN_FIELD_BASE(157, 157, 9, 0x0080, 0x10, 1, 1), 727 + PIN_FIELD_BASE(158, 158, 9, 0x0080, 0x10, 2, 1), 728 + PIN_FIELD_BASE(159, 159, 9, 0x0080, 0x10, 3, 1), 729 + PIN_FIELD_BASE(160, 160, 4, 0x0080, 0x10, 26, 1), 730 + PIN_FIELD_BASE(161, 161, 4, 0x0080, 0x10, 25, 1), 731 + PIN_FIELD_BASE(162, 162, 4, 0x0080, 0x10, 30, 1), 732 + PIN_FIELD_BASE(163, 163, 4, 0x0080, 0x10, 29, 1), 733 + PIN_FIELD_BASE(164, 164, 4, 0x0080, 0x10, 0, 1), 734 + PIN_FIELD_BASE(165, 165, 4, 0x0080, 0x10, 7, 1), 735 + PIN_FIELD_BASE(166, 166, 4, 0x0080, 0x10, 3, 1), 736 + PIN_FIELD_BASE(167, 167, 4, 0x0080, 0x10, 4, 1), 737 + PIN_FIELD_BASE(168, 168, 4, 0x0080, 0x10, 5, 1), 738 + PIN_FIELD_BASE(169, 169, 4, 0x0080, 0x10, 6, 1), 739 + PIN_FIELD_BASE(170, 170, 4, 0x0080, 0x10, 1, 1), 740 + PIN_FIELD_BASE(171, 171, 4, 0x0080, 0x10, 2, 1), 741 + }; 742 + 743 + static const struct mtk_pin_field_calc mt6878_pin_pupd_range[] = { 744 + PIN_FIELD_BASE(33, 33, 9, 0x0090, 0x10, 0, 1), 745 + PIN_FIELD_BASE(34, 34, 9, 0x0090, 0x10, 1, 1), 746 + PIN_FIELD_BASE(35, 35, 9, 0x0090, 0x10, 2, 1), 747 + PIN_FIELD_BASE(77, 77, 2, 0x0070, 0x10, 0, 1), 748 + PIN_FIELD_BASE(78, 78, 2, 0x0070, 0x10, 1, 1), 749 + PIN_FIELD_BASE(79, 79, 2, 0x0070, 0x10, 2, 1), 750 + PIN_FIELD_BASE(80, 80, 2, 0x0070, 0x10, 3, 1), 751 + PIN_FIELD_BASE(81, 81, 2, 0x0070, 0x10, 4, 1), 752 + PIN_FIELD_BASE(82, 82, 2, 0x0070, 0x10, 5, 1), 753 + PIN_FIELD_BASE(83, 83, 2, 0x0070, 0x10, 9, 1), 754 + PIN_FIELD_BASE(84, 84, 2, 0x0070, 0x10, 11, 1), 755 + PIN_FIELD_BASE(85, 85, 2, 0x0070, 0x10, 10, 1), 756 + PIN_FIELD_BASE(86, 86, 2, 0x0070, 0x10, 12, 1), 757 + PIN_FIELD_BASE(87, 87, 2, 0x0070, 0x10, 14, 1), 758 + PIN_FIELD_BASE(88, 88, 2, 0x0070, 0x10, 13, 1), 759 + PIN_FIELD_BASE(97, 97, 1, 0x00b0, 0x10, 1, 1), 760 + PIN_FIELD_BASE(98, 98, 1, 0x00b0, 0x10, 0, 1), 761 + PIN_FIELD_BASE(117, 117, 1, 0x00b0, 0x10, 2, 1), 762 + PIN_FIELD_BASE(118, 118, 1, 0x00b0, 0x10, 3, 1), 763 + PIN_FIELD_BASE(119, 119, 1, 0x00b0, 0x10, 4, 1), 764 + PIN_FIELD_BASE(120, 120, 1, 0x00b0, 0x10, 5, 1), 765 + PIN_FIELD_BASE(121, 121, 1, 0x00b0, 0x10, 6, 1), 766 + PIN_FIELD_BASE(122, 122, 1, 0x00b0, 0x10, 7, 1), 767 + PIN_FIELD_BASE(123, 123, 1, 0x00b0, 0x10, 8, 1), 768 + PIN_FIELD_BASE(124, 124, 1, 0x00b0, 0x10, 9, 1), 769 + PIN_FIELD_BASE(153, 153, 2, 0x0070, 0x10, 6, 1), 770 + PIN_FIELD_BASE(154, 154, 2, 0x0070, 0x10, 7, 1), 771 + PIN_FIELD_BASE(155, 155, 2, 0x0070, 0x10, 8, 1), 772 + PIN_FIELD_BASE(172, 172, 9, 0x0090, 0x10, 7, 1), 773 + PIN_FIELD_BASE(173, 173, 9, 0x0090, 0x10, 8, 1), 774 + PIN_FIELD_BASE(174, 174, 9, 0x0090, 0x10, 3, 1), 775 + PIN_FIELD_BASE(175, 175, 9, 0x0090, 0x10, 4, 1), 776 + PIN_FIELD_BASE(176, 176, 9, 0x0090, 0x10, 5, 1), 777 + PIN_FIELD_BASE(177, 177, 9, 0x0090, 0x10, 9, 1), 778 + PIN_FIELD_BASE(178, 178, 9, 0x0090, 0x10, 10, 1), 779 + PIN_FIELD_BASE(179, 179, 9, 0x0090, 0x10, 11, 1), 780 + PIN_FIELD_BASE(180, 180, 9, 0x0090, 0x10, 12, 1), 781 + PIN_FIELD_BASE(181, 181, 9, 0x0090, 0x10, 13, 1), 782 + PIN_FIELD_BASE(182, 182, 9, 0x0090, 0x10, 14, 1), 783 + PIN_FIELD_BASE(183, 183, 9, 0x0090, 0x10, 6, 1), 784 + PIN_FIELD_BASE(184, 184, 7, 0x0070, 0x10, 10, 1), 785 + PIN_FIELD_BASE(185, 185, 7, 0x0070, 0x10, 0, 1), 786 + PIN_FIELD_BASE(186, 186, 7, 0x0070, 0x10, 1, 1), 787 + PIN_FIELD_BASE(187, 187, 7, 0x0070, 0x10, 11, 1), 788 + PIN_FIELD_BASE(188, 188, 7, 0x0070, 0x10, 2, 1), 789 + PIN_FIELD_BASE(189, 189, 7, 0x0070, 0x10, 3, 1), 790 + PIN_FIELD_BASE(190, 190, 7, 0x0070, 0x10, 4, 1), 791 + PIN_FIELD_BASE(191, 191, 7, 0x0070, 0x10, 5, 1), 792 + PIN_FIELD_BASE(192, 192, 7, 0x0070, 0x10, 6, 1), 793 + PIN_FIELD_BASE(193, 193, 7, 0x0070, 0x10, 7, 1), 794 + PIN_FIELD_BASE(194, 194, 7, 0x0070, 0x10, 8, 1), 795 + PIN_FIELD_BASE(195, 195, 7, 0x0070, 0x10, 9, 1), 796 + }; 797 + 798 + static const struct mtk_pin_field_calc mt6878_pin_r0_range[] = { 799 + PIN_FIELD_BASE(33, 33, 9, 0x00b0, 0x10, 0, 1), 800 + PIN_FIELD_BASE(34, 34, 9, 0x00b0, 0x10, 1, 1), 801 + PIN_FIELD_BASE(35, 35, 9, 0x00b0, 0x10, 2, 1), 802 + PIN_FIELD_BASE(77, 77, 2, 0x0080, 0x10, 0, 1), 803 + PIN_FIELD_BASE(78, 78, 2, 0x0080, 0x10, 1, 1), 804 + PIN_FIELD_BASE(79, 79, 2, 0x0080, 0x10, 2, 1), 805 + PIN_FIELD_BASE(80, 80, 2, 0x0080, 0x10, 3, 1), 806 + PIN_FIELD_BASE(81, 81, 2, 0x0080, 0x10, 4, 1), 807 + PIN_FIELD_BASE(82, 82, 2, 0x0080, 0x10, 5, 1), 808 + PIN_FIELD_BASE(83, 83, 2, 0x0080, 0x10, 9, 1), 809 + PIN_FIELD_BASE(84, 84, 2, 0x0080, 0x10, 11, 1), 810 + PIN_FIELD_BASE(85, 85, 2, 0x0080, 0x10, 10, 1), 811 + PIN_FIELD_BASE(86, 86, 2, 0x0080, 0x10, 12, 1), 812 + PIN_FIELD_BASE(87, 87, 2, 0x0080, 0x10, 14, 1), 813 + PIN_FIELD_BASE(88, 88, 2, 0x0080, 0x10, 13, 1), 814 + PIN_FIELD_BASE(97, 97, 1, 0x00d0, 0x10, 1, 1), 815 + PIN_FIELD_BASE(98, 98, 1, 0x00d0, 0x10, 0, 1), 816 + PIN_FIELD_BASE(117, 117, 1, 0x00d0, 0x10, 2, 1), 817 + PIN_FIELD_BASE(118, 118, 1, 0x00d0, 0x10, 3, 1), 818 + PIN_FIELD_BASE(119, 119, 1, 0x00d0, 0x10, 4, 1), 819 + PIN_FIELD_BASE(120, 120, 1, 0x00d0, 0x10, 5, 1), 820 + PIN_FIELD_BASE(121, 121, 1, 0x00d0, 0x10, 6, 1), 821 + PIN_FIELD_BASE(122, 122, 1, 0x00d0, 0x10, 7, 1), 822 + PIN_FIELD_BASE(123, 123, 1, 0x00d0, 0x10, 8, 1), 823 + PIN_FIELD_BASE(124, 124, 1, 0x00d0, 0x10, 9, 1), 824 + PIN_FIELD_BASE(153, 153, 2, 0x0080, 0x10, 6, 1), 825 + PIN_FIELD_BASE(154, 154, 2, 0x0080, 0x10, 7, 1), 826 + PIN_FIELD_BASE(155, 155, 2, 0x0080, 0x10, 8, 1), 827 + PIN_FIELD_BASE(172, 172, 9, 0x00b0, 0x10, 7, 1), 828 + PIN_FIELD_BASE(173, 173, 9, 0x00b0, 0x10, 8, 1), 829 + PIN_FIELD_BASE(174, 174, 9, 0x00b0, 0x10, 3, 1), 830 + PIN_FIELD_BASE(175, 175, 9, 0x00b0, 0x10, 4, 1), 831 + PIN_FIELD_BASE(176, 176, 9, 0x00b0, 0x10, 5, 1), 832 + PIN_FIELD_BASE(177, 177, 9, 0x00b0, 0x10, 9, 1), 833 + PIN_FIELD_BASE(178, 178, 9, 0x00b0, 0x10, 10, 1), 834 + PIN_FIELD_BASE(179, 179, 9, 0x00b0, 0x10, 11, 1), 835 + PIN_FIELD_BASE(180, 180, 9, 0x00b0, 0x10, 12, 1), 836 + PIN_FIELD_BASE(181, 181, 9, 0x00b0, 0x10, 13, 1), 837 + PIN_FIELD_BASE(182, 182, 9, 0x00b0, 0x10, 14, 1), 838 + PIN_FIELD_BASE(183, 183, 9, 0x00b0, 0x10, 6, 1), 839 + PIN_FIELD_BASE(184, 184, 7, 0x0080, 0x10, 10, 1), 840 + PIN_FIELD_BASE(185, 185, 7, 0x0080, 0x10, 0, 1), 841 + PIN_FIELD_BASE(186, 186, 7, 0x0080, 0x10, 1, 1), 842 + PIN_FIELD_BASE(187, 187, 7, 0x0080, 0x10, 11, 1), 843 + PIN_FIELD_BASE(188, 188, 7, 0x0080, 0x10, 2, 1), 844 + PIN_FIELD_BASE(189, 189, 7, 0x0080, 0x10, 3, 1), 845 + PIN_FIELD_BASE(190, 190, 7, 0x0080, 0x10, 4, 1), 846 + PIN_FIELD_BASE(191, 191, 7, 0x0080, 0x10, 5, 1), 847 + PIN_FIELD_BASE(192, 192, 7, 0x0080, 0x10, 6, 1), 848 + PIN_FIELD_BASE(193, 193, 7, 0x0080, 0x10, 7, 1), 849 + PIN_FIELD_BASE(194, 194, 7, 0x0080, 0x10, 8, 1), 850 + PIN_FIELD_BASE(195, 195, 7, 0x0080, 0x10, 9, 1), 851 + }; 852 + 853 + static const struct mtk_pin_field_calc mt6878_pin_r1_range[] = { 854 + PIN_FIELD_BASE(33, 33, 9, 0x00c0, 0x10, 0, 1), 855 + PIN_FIELD_BASE(34, 34, 9, 0x00c0, 0x10, 1, 1), 856 + PIN_FIELD_BASE(35, 35, 9, 0x00c0, 0x10, 2, 1), 857 + PIN_FIELD_BASE(77, 77, 2, 0x0090, 0x10, 0, 1), 858 + PIN_FIELD_BASE(78, 78, 2, 0x0090, 0x10, 1, 1), 859 + PIN_FIELD_BASE(79, 79, 2, 0x0090, 0x10, 2, 1), 860 + PIN_FIELD_BASE(80, 80, 2, 0x0090, 0x10, 3, 1), 861 + PIN_FIELD_BASE(81, 81, 2, 0x0090, 0x10, 4, 1), 862 + PIN_FIELD_BASE(82, 82, 2, 0x0090, 0x10, 5, 1), 863 + PIN_FIELD_BASE(83, 83, 2, 0x0090, 0x10, 9, 1), 864 + PIN_FIELD_BASE(84, 84, 2, 0x0090, 0x10, 11, 1), 865 + PIN_FIELD_BASE(85, 85, 2, 0x0090, 0x10, 10, 1), 866 + PIN_FIELD_BASE(86, 86, 2, 0x0090, 0x10, 12, 1), 867 + PIN_FIELD_BASE(87, 87, 2, 0x0090, 0x10, 14, 1), 868 + PIN_FIELD_BASE(88, 88, 2, 0x0090, 0x10, 13, 1), 869 + PIN_FIELD_BASE(97, 97, 1, 0x00e0, 0x10, 1, 1), 870 + PIN_FIELD_BASE(98, 98, 1, 0x00e0, 0x10, 0, 1), 871 + PIN_FIELD_BASE(117, 117, 1, 0x00e0, 0x10, 2, 1), 872 + PIN_FIELD_BASE(118, 118, 1, 0x00e0, 0x10, 3, 1), 873 + PIN_FIELD_BASE(119, 119, 1, 0x00e0, 0x10, 4, 1), 874 + PIN_FIELD_BASE(120, 120, 1, 0x00e0, 0x10, 5, 1), 875 + PIN_FIELD_BASE(121, 121, 1, 0x00e0, 0x10, 6, 1), 876 + PIN_FIELD_BASE(122, 122, 1, 0x00e0, 0x10, 7, 1), 877 + PIN_FIELD_BASE(123, 123, 1, 0x00e0, 0x10, 8, 1), 878 + PIN_FIELD_BASE(124, 124, 1, 0x00e0, 0x10, 9, 1), 879 + PIN_FIELD_BASE(153, 153, 2, 0x0090, 0x10, 6, 1), 880 + PIN_FIELD_BASE(154, 154, 2, 0x0090, 0x10, 7, 1), 881 + PIN_FIELD_BASE(155, 155, 2, 0x0090, 0x10, 8, 1), 882 + PIN_FIELD_BASE(172, 172, 9, 0x00c0, 0x10, 7, 1), 883 + PIN_FIELD_BASE(173, 173, 9, 0x00c0, 0x10, 8, 1), 884 + PIN_FIELD_BASE(174, 174, 9, 0x00c0, 0x10, 3, 1), 885 + PIN_FIELD_BASE(175, 175, 9, 0x00c0, 0x10, 4, 1), 886 + PIN_FIELD_BASE(176, 176, 9, 0x00c0, 0x10, 5, 1), 887 + PIN_FIELD_BASE(177, 177, 9, 0x00c0, 0x10, 9, 1), 888 + PIN_FIELD_BASE(178, 178, 9, 0x00c0, 0x10, 10, 1), 889 + PIN_FIELD_BASE(179, 179, 9, 0x00c0, 0x10, 11, 1), 890 + PIN_FIELD_BASE(180, 180, 9, 0x00c0, 0x10, 12, 1), 891 + PIN_FIELD_BASE(181, 181, 9, 0x00c0, 0x10, 13, 1), 892 + PIN_FIELD_BASE(182, 182, 9, 0x00c0, 0x10, 14, 1), 893 + PIN_FIELD_BASE(183, 183, 9, 0x00c0, 0x10, 6, 1), 894 + PIN_FIELD_BASE(184, 184, 7, 0x0090, 0x10, 10, 1), 895 + PIN_FIELD_BASE(185, 185, 7, 0x0090, 0x10, 0, 1), 896 + PIN_FIELD_BASE(186, 186, 7, 0x0090, 0x10, 1, 1), 897 + PIN_FIELD_BASE(187, 187, 7, 0x0090, 0x10, 11, 1), 898 + PIN_FIELD_BASE(188, 188, 7, 0x0090, 0x10, 2, 1), 899 + PIN_FIELD_BASE(189, 189, 7, 0x0090, 0x10, 3, 1), 900 + PIN_FIELD_BASE(190, 190, 7, 0x0090, 0x10, 4, 1), 901 + PIN_FIELD_BASE(191, 191, 7, 0x0090, 0x10, 5, 1), 902 + PIN_FIELD_BASE(192, 192, 7, 0x0090, 0x10, 6, 1), 903 + PIN_FIELD_BASE(193, 193, 7, 0x0090, 0x10, 7, 1), 904 + PIN_FIELD_BASE(194, 194, 7, 0x0090, 0x10, 8, 1), 905 + PIN_FIELD_BASE(195, 195, 7, 0x0090, 0x10, 9, 1), 906 + }; 907 + 908 + static const struct mtk_pin_field_calc mt6878_pin_drv_range[] = { 909 + PIN_FIELD_BASE(0, 0, 3, 0x0010, 0x10, 21, 3), 910 + PIN_FIELD_BASE(1, 1, 3, 0x0010, 0x10, 21, 3), 911 + PIN_FIELD_BASE(2, 2, 3, 0x0000, 0x10, 27, 3), 912 + PIN_FIELD_BASE(3, 3, 3, 0x0010, 0x10, 0, 3), 913 + PIN_FIELD_BASE(4, 4, 3, 0x0010, 0x10, 3, 3), 914 + PIN_FIELD_BASE(5, 5, 3, 0x0010, 0x10, 6, 3), 915 + PIN_FIELD_BASE(6, 6, 4, 0x0000, 0x10, 15, 3), 916 + PIN_FIELD_BASE(7, 7, 4, 0x0000, 0x10, 18, 3), 917 + PIN_FIELD_BASE(8, 8, 4, 0x0000, 0x10, 21, 3), 918 + PIN_FIELD_BASE(9, 9, 4, 0x0000, 0x10, 24, 3), 919 + PIN_FIELD_BASE(10, 10, 4, 0x0000, 0x10, 6, 3), 920 + PIN_FIELD_BASE(11, 11, 4, 0x0000, 0x10, 9, 3), 921 + PIN_FIELD_BASE(12, 12, 4, 0x0000, 0x10, 12, 3), 922 + PIN_FIELD_BASE(13, 13, 6, 0x0000, 0x10, 12, 3), 923 + PIN_FIELD_BASE(14, 14, 6, 0x0000, 0x10, 15, 3), 924 + PIN_FIELD_BASE(15, 15, 6, 0x0000, 0x10, 18, 3), 925 + PIN_FIELD_BASE(16, 16, 6, 0x0000, 0x10, 21, 3), 926 + PIN_FIELD_BASE(17, 17, 6, 0x0000, 0x10, 24, 3), 927 + PIN_FIELD_BASE(18, 18, 6, 0x0010, 0x10, 6, 3), 928 + PIN_FIELD_BASE(19, 19, 3, 0x0000, 0x10, 0, 3), 929 + PIN_FIELD_BASE(20, 20, 3, 0x0000, 0x10, 3, 3), 930 + PIN_FIELD_BASE(21, 21, 3, 0x0000, 0x10, 6, 3), 931 + PIN_FIELD_BASE(22, 22, 3, 0x0000, 0x10, 9, 3), 932 + PIN_FIELD_BASE(23, 23, 3, 0x0000, 0x10, 12, 3), 933 + PIN_FIELD_BASE(24, 24, 5, 0x0000, 0x10, 0, 3), 934 + PIN_FIELD_BASE(25, 25, 3, 0x0000, 0x10, 15, 3), 935 + PIN_FIELD_BASE(26, 26, 3, 0x0000, 0x10, 18, 3), 936 + PIN_FIELD_BASE(27, 27, 3, 0x0000, 0x10, 21, 3), 937 + PIN_FIELD_BASE(28, 28, 3, 0x0000, 0x10, 24, 3), 938 + PIN_FIELD_BASE(29, 29, 6, 0x0000, 0x10, 27, 3), 939 + PIN_FIELD_BASE(30, 30, 6, 0x0010, 0x10, 9, 3), 940 + PIN_FIELD_BASE(31, 31, 6, 0x0010, 0x10, 3, 3), 941 + PIN_FIELD_BASE(32, 32, 6, 0x0010, 0x10, 0, 3), 942 + PIN_FIELD_BASE(33, 33, 9, 0x0000, 0x10, 0, 3), 943 + PIN_FIELD_BASE(34, 34, 9, 0x0000, 0x10, 3, 3), 944 + PIN_FIELD_BASE(35, 35, 9, 0x0000, 0x10, 6, 3), 945 + PIN_FIELD_BASE(36, 36, 8, 0x0000, 0x10, 0, 3), 946 + PIN_FIELD_BASE(37, 37, 8, 0x0000, 0x10, 3, 3), 947 + PIN_FIELD_BASE(38, 38, 8, 0x0000, 0x10, 6, 3), 948 + PIN_FIELD_BASE(39, 39, 8, 0x0000, 0x10, 9, 3), 949 + PIN_FIELD_BASE(40, 40, 8, 0x0000, 0x10, 12, 3), 950 + PIN_FIELD_BASE(41, 41, 4, 0x0010, 0x10, 6, 3), 951 + PIN_FIELD_BASE(42, 42, 4, 0x0000, 0x10, 27, 3), 952 + PIN_FIELD_BASE(43, 43, 4, 0x0010, 0x10, 3, 3), 953 + PIN_FIELD_BASE(44, 44, 4, 0x0010, 0x10, 9, 3), 954 + PIN_FIELD_BASE(45, 45, 4, 0x0010, 0x10, 0, 3), 955 + PIN_FIELD_BASE(46, 46, 4, 0x0010, 0x10, 18, 3), 956 + PIN_FIELD_BASE(47, 47, 4, 0x0010, 0x10, 18, 3), 957 + PIN_FIELD_BASE(48, 48, 3, 0x0010, 0x10, 21, 3), 958 + PIN_FIELD_BASE(49, 49, 3, 0x0010, 0x10, 21, 3), 959 + PIN_FIELD_BASE(50, 50, 3, 0x0010, 0x10, 18, 3), 960 + PIN_FIELD_BASE(51, 51, 3, 0x0010, 0x10, 18, 3), 961 + PIN_FIELD_BASE(52, 52, 3, 0x0010, 0x10, 12, 3), 962 + PIN_FIELD_BASE(53, 53, 3, 0x0010, 0x10, 15, 3), 963 + PIN_FIELD_BASE(54, 54, 3, 0x0010, 0x10, 24, 3), 964 + PIN_FIELD_BASE(55, 55, 3, 0x0010, 0x10, 9, 3), 965 + PIN_FIELD_BASE(56, 56, 5, 0x0000, 0x10, 24, 3), 966 + PIN_FIELD_BASE(57, 57, 5, 0x0000, 0x10, 27, 3), 967 + PIN_FIELD_BASE(58, 58, 3, 0x0020, 0x10, 6, 3), 968 + PIN_FIELD_BASE(59, 59, 3, 0x0020, 0x10, 3, 3), 969 + PIN_FIELD_BASE(60, 60, 8, 0x0020, 0x10, 0, 3), 970 + PIN_FIELD_BASE(61, 61, 8, 0x0020, 0x10, 3, 3), 971 + PIN_FIELD_BASE(62, 62, 8, 0x0020, 0x10, 9, 3), 972 + PIN_FIELD_BASE(63, 63, 8, 0x0020, 0x10, 6, 3), 973 + PIN_FIELD_BASE(64, 64, 8, 0x0020, 0x10, 12, 3), 974 + PIN_FIELD_BASE(65, 65, 8, 0x0020, 0x10, 15, 3), 975 + PIN_FIELD_BASE(66, 66, 8, 0x0020, 0x10, 21, 3), 976 + PIN_FIELD_BASE(67, 67, 8, 0x0020, 0x10, 18, 3), 977 + PIN_FIELD_BASE(68, 68, 5, 0x0000, 0x10, 9, 3), 978 + PIN_FIELD_BASE(69, 69, 5, 0x0000, 0x10, 12, 3), 979 + PIN_FIELD_BASE(70, 70, 5, 0x0000, 0x10, 18, 3), 980 + PIN_FIELD_BASE(71, 71, 5, 0x0000, 0x10, 15, 3), 981 + PIN_FIELD_BASE(72, 72, 5, 0x0010, 0x10, 0, 3), 982 + PIN_FIELD_BASE(73, 73, 5, 0x0010, 0x10, 3, 3), 983 + PIN_FIELD_BASE(74, 74, 5, 0x0010, 0x10, 9, 3), 984 + PIN_FIELD_BASE(75, 75, 5, 0x0010, 0x10, 6, 3), 985 + PIN_FIELD_BASE(76, 76, 5, 0x0000, 0x10, 3, 3), 986 + PIN_FIELD_BASE(77, 77, 2, 0x0000, 0x10, 0, 3), 987 + PIN_FIELD_BASE(78, 78, 2, 0x0000, 0x10, 3, 3), 988 + PIN_FIELD_BASE(79, 79, 2, 0x0000, 0x10, 6, 3), 989 + PIN_FIELD_BASE(80, 80, 2, 0x0000, 0x10, 9, 3), 990 + PIN_FIELD_BASE(81, 81, 2, 0x0000, 0x10, 12, 3), 991 + PIN_FIELD_BASE(82, 82, 2, 0x0000, 0x10, 15, 3), 992 + PIN_FIELD_BASE(83, 83, 2, 0x0000, 0x10, 18, 3), 993 + PIN_FIELD_BASE(84, 84, 2, 0x0000, 0x10, 27, 3), 994 + PIN_FIELD_BASE(85, 85, 2, 0x0000, 0x10, 24, 3), 995 + PIN_FIELD_BASE(86, 86, 2, 0x0010, 0x10, 0, 3), 996 + PIN_FIELD_BASE(87, 87, 2, 0x0010, 0x10, 6, 3), 997 + PIN_FIELD_BASE(88, 88, 2, 0x0010, 0x10, 3, 3), 998 + PIN_FIELD_BASE(89, 89, 4, 0x0010, 0x10, 18, 3), 999 + PIN_FIELD_BASE(90, 90, 4, 0x0010, 0x10, 21, 3), 1000 + PIN_FIELD_BASE(91, 91, 4, 0x0010, 0x10, 18, 3), 1001 + PIN_FIELD_BASE(92, 92, 8, 0x0000, 0x10, 15, 3), 1002 + PIN_FIELD_BASE(93, 93, 8, 0x0000, 0x10, 18, 3), 1003 + PIN_FIELD_BASE(94, 94, 8, 0x0000, 0x10, 21, 3), 1004 + PIN_FIELD_BASE(95, 95, 8, 0x0000, 0x10, 24, 3), 1005 + PIN_FIELD_BASE(96, 96, 8, 0x0000, 0x10, 27, 3), 1006 + PIN_FIELD_BASE(97, 97, 1, 0x0020, 0x10, 18, 3), 1007 + PIN_FIELD_BASE(98, 98, 1, 0x0020, 0x10, 15, 3), 1008 + PIN_FIELD_BASE(99, 99, 1, 0x0000, 0x10, 0, 3), 1009 + PIN_FIELD_BASE(100, 100, 1, 0x0000, 0x10, 27, 3), 1010 + PIN_FIELD_BASE(101, 101, 1, 0x0010, 0x10, 0, 3), 1011 + PIN_FIELD_BASE(102, 102, 1, 0x0010, 0x10, 3, 3), 1012 + PIN_FIELD_BASE(103, 103, 1, 0x0010, 0x10, 6, 3), 1013 + PIN_FIELD_BASE(104, 104, 1, 0x0010, 0x10, 9, 3), 1014 + PIN_FIELD_BASE(105, 105, 1, 0x0010, 0x10, 12, 3), 1015 + PIN_FIELD_BASE(106, 106, 1, 0x0010, 0x10, 15, 3), 1016 + PIN_FIELD_BASE(107, 107, 1, 0x0010, 0x10, 18, 3), 1017 + PIN_FIELD_BASE(108, 108, 1, 0x0010, 0x10, 21, 3), 1018 + PIN_FIELD_BASE(109, 109, 1, 0x0000, 0x10, 3, 3), 1019 + PIN_FIELD_BASE(110, 110, 1, 0x0000, 0x10, 6, 3), 1020 + PIN_FIELD_BASE(111, 111, 1, 0x0000, 0x10, 9, 3), 1021 + PIN_FIELD_BASE(112, 112, 1, 0x0000, 0x10, 12, 3), 1022 + PIN_FIELD_BASE(113, 113, 1, 0x0000, 0x10, 15, 3), 1023 + PIN_FIELD_BASE(114, 114, 1, 0x0000, 0x10, 18, 3), 1024 + PIN_FIELD_BASE(115, 115, 1, 0x0000, 0x10, 21, 3), 1025 + PIN_FIELD_BASE(116, 116, 1, 0x0000, 0x10, 24, 3), 1026 + PIN_FIELD_BASE(117, 117, 1, 0x0010, 0x10, 24, 3), 1027 + PIN_FIELD_BASE(118, 118, 1, 0x0010, 0x10, 27, 3), 1028 + PIN_FIELD_BASE(119, 119, 1, 0x0020, 0x10, 0, 3), 1029 + PIN_FIELD_BASE(120, 120, 1, 0x0020, 0x10, 3, 3), 1030 + PIN_FIELD_BASE(121, 121, 1, 0x0020, 0x10, 6, 3), 1031 + PIN_FIELD_BASE(122, 122, 1, 0x0020, 0x10, 9, 3), 1032 + PIN_FIELD_BASE(123, 123, 1, 0x0020, 0x10, 12, 3), 1033 + PIN_FIELD_BASE(124, 124, 1, 0x0020, 0x10, 12, 3), 1034 + PIN_FIELD_BASE(125, 125, 8, 0x0010, 0x10, 27, 3), 1035 + PIN_FIELD_BASE(126, 126, 8, 0x0020, 0x10, 24, 3), 1036 + PIN_FIELD_BASE(127, 127, 8, 0x0020, 0x10, 27, 3), 1037 + PIN_FIELD_BASE(128, 128, 8, 0x0030, 0x10, 0, 3), 1038 + PIN_FIELD_BASE(129, 129, 8, 0x0010, 0x10, 0, 3), 1039 + PIN_FIELD_BASE(130, 130, 8, 0x0010, 0x10, 9, 3), 1040 + PIN_FIELD_BASE(131, 131, 6, 0x0010, 0x10, 12, 3), 1041 + PIN_FIELD_BASE(132, 132, 6, 0x0010, 0x10, 21, 3), 1042 + PIN_FIELD_BASE(133, 133, 8, 0x0010, 0x10, 3, 3), 1043 + PIN_FIELD_BASE(134, 134, 8, 0x0010, 0x10, 12, 3), 1044 + PIN_FIELD_BASE(135, 135, 6, 0x0010, 0x10, 15, 3), 1045 + PIN_FIELD_BASE(136, 136, 6, 0x0010, 0x10, 24, 3), 1046 + PIN_FIELD_BASE(137, 137, 6, 0x0010, 0x10, 18, 3), 1047 + PIN_FIELD_BASE(138, 138, 6, 0x0010, 0x10, 27, 3), 1048 + PIN_FIELD_BASE(139, 139, 6, 0x0000, 0x10, 0, 3), 1049 + PIN_FIELD_BASE(140, 140, 6, 0x0000, 0x10, 6, 3), 1050 + PIN_FIELD_BASE(141, 141, 6, 0x0000, 0x10, 3, 3), 1051 + PIN_FIELD_BASE(142, 142, 6, 0x0000, 0x10, 9, 3), 1052 + PIN_FIELD_BASE(143, 143, 8, 0x0010, 0x10, 6, 3), 1053 + PIN_FIELD_BASE(144, 144, 8, 0x0010, 0x10, 15, 3), 1054 + PIN_FIELD_BASE(145, 145, 5, 0x0000, 0x10, 6, 3), 1055 + PIN_FIELD_BASE(146, 146, 5, 0x0000, 0x10, 21, 3), 1056 + PIN_FIELD_BASE(147, 147, 3, 0x0010, 0x10, 27, 3), 1057 + PIN_FIELD_BASE(148, 148, 3, 0x0020, 0x10, 0, 3), 1058 + PIN_FIELD_BASE(149, 149, 8, 0x0010, 0x10, 18, 3), 1059 + PIN_FIELD_BASE(150, 150, 8, 0x0010, 0x10, 21, 3), 1060 + PIN_FIELD_BASE(151, 151, 8, 0x0010, 0x10, 24, 3), 1061 + PIN_FIELD_BASE(152, 152, 8, 0x0010, 0x10, 24, 3), 1062 + PIN_FIELD_BASE(153, 153, 2, 0x0000, 0x10, 21, 3), 1063 + PIN_FIELD_BASE(154, 154, 2, 0x0000, 0x10, 21, 3), 1064 + PIN_FIELD_BASE(155, 155, 2, 0x0000, 0x10, 21, 3), 1065 + PIN_FIELD_BASE(156, 156, 9, 0x0000, 0x10, 21, 3), 1066 + PIN_FIELD_BASE(157, 157, 9, 0x0000, 0x10, 24, 3), 1067 + PIN_FIELD_BASE(158, 158, 9, 0x0000, 0x10, 27, 3), 1068 + PIN_FIELD_BASE(159, 159, 9, 0x0010, 0x10, 0, 3), 1069 + PIN_FIELD_BASE(160, 160, 4, 0x0010, 0x10, 21, 3), 1070 + PIN_FIELD_BASE(161, 161, 4, 0x0010, 0x10, 21, 3), 1071 + PIN_FIELD_BASE(162, 162, 4, 0x0010, 0x10, 21, 3), 1072 + PIN_FIELD_BASE(163, 163, 4, 0x0010, 0x10, 24, 3), 1073 + PIN_FIELD_BASE(164, 164, 4, 0x0010, 0x10, 15, 3), 1074 + PIN_FIELD_BASE(165, 165, 4, 0x0010, 0x10, 12, 3), 1075 + PIN_FIELD_BASE(166, 166, 4, 0x0010, 0x10, 12, 3), 1076 + PIN_FIELD_BASE(167, 167, 4, 0x0010, 0x10, 12, 3), 1077 + PIN_FIELD_BASE(168, 168, 4, 0x0010, 0x10, 12, 3), 1078 + PIN_FIELD_BASE(169, 169, 4, 0x0010, 0x10, 12, 3), 1079 + PIN_FIELD_BASE(170, 170, 4, 0x0000, 0x10, 0, 3), 1080 + PIN_FIELD_BASE(171, 171, 4, 0x0000, 0x10, 3, 3), 1081 + PIN_FIELD_BASE(172, 172, 9, 0x0000, 0x10, 18, 3), 1082 + PIN_FIELD_BASE(173, 173, 9, 0x0000, 0x10, 18, 3), 1083 + PIN_FIELD_BASE(174, 174, 9, 0x0000, 0x10, 18, 3), 1084 + PIN_FIELD_BASE(175, 175, 9, 0x0000, 0x10, 18, 3), 1085 + PIN_FIELD_BASE(176, 176, 9, 0x0000, 0x10, 18, 3), 1086 + PIN_FIELD_BASE(177, 177, 9, 0x0000, 0x10, 18, 3), 1087 + PIN_FIELD_BASE(178, 178, 9, 0x0000, 0x10, 15, 3), 1088 + PIN_FIELD_BASE(179, 179, 9, 0x0000, 0x10, 15, 3), 1089 + PIN_FIELD_BASE(180, 180, 9, 0x0000, 0x10, 15, 3), 1090 + PIN_FIELD_BASE(181, 181, 9, 0x0000, 0x10, 9, 3), 1091 + PIN_FIELD_BASE(182, 182, 9, 0x0000, 0x10, 12, 3), 1092 + PIN_FIELD_BASE(183, 183, 9, 0x0000, 0x10, 18, 3), 1093 + PIN_FIELD_BASE(184, 184, 7, 0x0010, 0x10, 0, 3), 1094 + PIN_FIELD_BASE(185, 185, 7, 0x0000, 0x10, 0, 3), 1095 + PIN_FIELD_BASE(186, 186, 7, 0x0000, 0x10, 3, 3), 1096 + PIN_FIELD_BASE(187, 187, 7, 0x0010, 0x10, 3, 3), 1097 + PIN_FIELD_BASE(188, 188, 7, 0x0000, 0x10, 6, 3), 1098 + PIN_FIELD_BASE(189, 189, 7, 0x0000, 0x10, 9, 3), 1099 + PIN_FIELD_BASE(190, 190, 7, 0x0000, 0x10, 12, 3), 1100 + PIN_FIELD_BASE(191, 191, 7, 0x0000, 0x10, 15, 3), 1101 + PIN_FIELD_BASE(192, 192, 7, 0x0000, 0x10, 18, 3), 1102 + PIN_FIELD_BASE(193, 193, 7, 0x0000, 0x10, 21, 3), 1103 + PIN_FIELD_BASE(194, 194, 7, 0x0000, 0x10, 24, 3), 1104 + PIN_FIELD_BASE(195, 195, 7, 0x0000, 0x10, 27, 3), 1105 + }; 1106 + 1107 + static const struct mtk_pin_field_calc mt6878_pin_drv_adv_range[] = { 1108 + PIN_FIELD_BASE(19, 19, 3, 0x0030, 0x10, 0, 3), 1109 + PIN_FIELD_BASE(24, 24, 5, 0x0020, 0x10, 0, 3), 1110 + PIN_FIELD_BASE(25, 25, 3, 0x0030, 0x10, 3, 3), 1111 + PIN_FIELD_BASE(26, 26, 3, 0x0030, 0x10, 6, 3), 1112 + PIN_FIELD_BASE(52, 52, 3, 0x0030, 0x10, 12, 3), 1113 + PIN_FIELD_BASE(53, 53, 3, 0x0030, 0x10, 15, 3), 1114 + PIN_FIELD_BASE(55, 55, 3, 0x0030, 0x10, 9, 3), 1115 + PIN_FIELD_BASE(60, 60, 8, 0x0050, 0x10, 12, 3), 1116 + PIN_FIELD_BASE(61, 61, 8, 0x0050, 0x10, 15, 3), 1117 + PIN_FIELD_BASE(62, 62, 8, 0x0050, 0x10, 21, 3), 1118 + PIN_FIELD_BASE(63, 63, 8, 0x0050, 0x10, 18, 3), 1119 + PIN_FIELD_BASE(64, 64, 8, 0x0050, 0x10, 24, 3), 1120 + PIN_FIELD_BASE(65, 65, 8, 0x0050, 0x10, 27, 3), 1121 + PIN_FIELD_BASE(66, 66, 8, 0x0060, 0x10, 3, 3), 1122 + PIN_FIELD_BASE(67, 67, 8, 0x0060, 0x10, 0, 3), 1123 + PIN_FIELD_BASE(92, 92, 8, 0x0040, 0x10, 0, 3), 1124 + PIN_FIELD_BASE(93, 93, 8, 0x0040, 0x10, 3, 3), 1125 + PIN_FIELD_BASE(94, 94, 8, 0x0040, 0x10, 6, 3), 1126 + PIN_FIELD_BASE(95, 95, 8, 0x0040, 0x10, 9, 3), 1127 + PIN_FIELD_BASE(96, 96, 8, 0x0040, 0x10, 12, 3), 1128 + PIN_FIELD_BASE(125, 125, 8, 0x0050, 0x10, 9, 3), 1129 + PIN_FIELD_BASE(126, 126, 8, 0x0060, 0x10, 6, 3), 1130 + PIN_FIELD_BASE(127, 127, 8, 0x0060, 0x10, 9, 3), 1131 + PIN_FIELD_BASE(128, 128, 8, 0x0060, 0x10, 12, 3), 1132 + PIN_FIELD_BASE(129, 129, 8, 0x0040, 0x10, 15, 3), 1133 + PIN_FIELD_BASE(130, 130, 8, 0x0040, 0x10, 24, 3), 1134 + PIN_FIELD_BASE(131, 131, 6, 0x0030, 0x10, 12, 3), 1135 + PIN_FIELD_BASE(132, 132, 6, 0x0030, 0x10, 21, 3), 1136 + PIN_FIELD_BASE(133, 133, 8, 0x0040, 0x10, 18, 3), 1137 + PIN_FIELD_BASE(134, 134, 8, 0x0040, 0x10, 27, 3), 1138 + PIN_FIELD_BASE(135, 135, 6, 0x0030, 0x10, 15, 3), 1139 + PIN_FIELD_BASE(136, 136, 6, 0x0030, 0x10, 24, 3), 1140 + PIN_FIELD_BASE(137, 137, 6, 0x0030, 0x10, 18, 3), 1141 + PIN_FIELD_BASE(138, 138, 6, 0x0030, 0x10, 27, 3), 1142 + PIN_FIELD_BASE(139, 139, 6, 0x0030, 0x10, 0, 3), 1143 + PIN_FIELD_BASE(140, 140, 6, 0x0030, 0x10, 6, 3), 1144 + PIN_FIELD_BASE(141, 141, 6, 0x0030, 0x10, 3, 3), 1145 + PIN_FIELD_BASE(142, 142, 6, 0x0030, 0x10, 9, 3), 1146 + PIN_FIELD_BASE(143, 143, 8, 0x0040, 0x10, 21, 3), 1147 + PIN_FIELD_BASE(144, 144, 8, 0x0050, 0x10, 0, 3), 1148 + PIN_FIELD_BASE(145, 145, 5, 0x0020, 0x10, 3, 3), 1149 + PIN_FIELD_BASE(146, 146, 5, 0x0020, 0x10, 6, 3), 1150 + PIN_FIELD_BASE(147, 147, 3, 0x0030, 0x10, 18, 3), 1151 + PIN_FIELD_BASE(148, 148, 3, 0x0030, 0x10, 21, 3), 1152 + PIN_FIELD_BASE(149, 149, 8, 0x0050, 0x10, 3, 3), 1153 + PIN_FIELD_BASE(150, 150, 8, 0x0050, 0x10, 6, 3), 1154 + PIN_FIELD_BASE(156, 156, 9, 0x0020, 0x10, 0, 5), 1155 + PIN_FIELD_BASE(157, 157, 9, 0x0020, 0x10, 5, 5), 1156 + PIN_FIELD_BASE(158, 158, 9, 0x0020, 0x10, 10, 5), 1157 + PIN_FIELD_BASE(159, 159, 9, 0x0020, 0x10, 15, 5), 1158 + }; 1159 + 1160 + static const struct mtk_pin_field_calc mt6878_pin_rsel_range[] = { 1161 + PIN_FIELD_BASE(19, 19, 3, 0x00d0, 0x10, 0, 3), 1162 + PIN_FIELD_BASE(24, 24, 5, 0x00a0, 0x10, 0, 3), 1163 + PIN_FIELD_BASE(25, 25, 3, 0x00d0, 0x10, 3, 3), 1164 + PIN_FIELD_BASE(26, 26, 3, 0x00d0, 0x10, 6, 3), 1165 + PIN_FIELD_BASE(52, 52, 3, 0x00d0, 0x10, 12, 3), 1166 + PIN_FIELD_BASE(53, 53, 3, 0x00d0, 0x10, 15, 3), 1167 + PIN_FIELD_BASE(55, 55, 3, 0x00d0, 0x10, 9, 3), 1168 + PIN_FIELD_BASE(60, 60, 8, 0x0110, 0x10, 12, 3), 1169 + PIN_FIELD_BASE(61, 61, 8, 0x0110, 0x10, 15, 3), 1170 + PIN_FIELD_BASE(62, 62, 8, 0x0110, 0x10, 21, 3), 1171 + PIN_FIELD_BASE(63, 63, 8, 0x0110, 0x10, 18, 3), 1172 + PIN_FIELD_BASE(64, 64, 8, 0x0110, 0x10, 24, 3), 1173 + PIN_FIELD_BASE(65, 65, 8, 0x0110, 0x10, 27, 3), 1174 + PIN_FIELD_BASE(66, 66, 8, 0x0120, 0x10, 3, 3), 1175 + PIN_FIELD_BASE(67, 67, 8, 0x0120, 0x10, 0, 3), 1176 + PIN_FIELD_BASE(92, 92, 8, 0x0100, 0x10, 0, 3), 1177 + PIN_FIELD_BASE(93, 93, 8, 0x0100, 0x10, 3, 3), 1178 + PIN_FIELD_BASE(94, 94, 8, 0x0100, 0x10, 6, 3), 1179 + PIN_FIELD_BASE(95, 95, 8, 0x0100, 0x10, 9, 3), 1180 + PIN_FIELD_BASE(96, 96, 8, 0x0100, 0x10, 12, 3), 1181 + PIN_FIELD_BASE(125, 125, 8, 0x0110, 0x10, 9, 3), 1182 + PIN_FIELD_BASE(126, 126, 8, 0x0120, 0x10, 6, 3), 1183 + PIN_FIELD_BASE(127, 127, 8, 0x0120, 0x10, 9, 3), 1184 + PIN_FIELD_BASE(128, 128, 8, 0x0120, 0x10, 12, 3), 1185 + PIN_FIELD_BASE(129, 129, 8, 0x0100, 0x10, 15, 3), 1186 + PIN_FIELD_BASE(130, 130, 8, 0x0100, 0x10, 24, 3), 1187 + PIN_FIELD_BASE(131, 131, 6, 0x00d0, 0x10, 12, 3), 1188 + PIN_FIELD_BASE(132, 132, 6, 0x00d0, 0x10, 21, 3), 1189 + PIN_FIELD_BASE(133, 133, 8, 0x0100, 0x10, 18, 3), 1190 + PIN_FIELD_BASE(134, 134, 8, 0x0100, 0x10, 27, 3), 1191 + PIN_FIELD_BASE(135, 135, 6, 0x00d0, 0x10, 15, 3), 1192 + PIN_FIELD_BASE(136, 136, 6, 0x00d0, 0x10, 24, 3), 1193 + PIN_FIELD_BASE(137, 137, 6, 0x00d0, 0x10, 18, 3), 1194 + PIN_FIELD_BASE(138, 138, 6, 0x00d0, 0x10, 27, 3), 1195 + PIN_FIELD_BASE(139, 139, 6, 0x00d0, 0x10, 0, 3), 1196 + PIN_FIELD_BASE(140, 140, 6, 0x00d0, 0x10, 6, 3), 1197 + PIN_FIELD_BASE(141, 141, 6, 0x00d0, 0x10, 3, 3), 1198 + PIN_FIELD_BASE(142, 142, 6, 0x00d0, 0x10, 9, 3), 1199 + PIN_FIELD_BASE(143, 143, 8, 0x0100, 0x10, 21, 3), 1200 + PIN_FIELD_BASE(144, 144, 8, 0x0110, 0x10, 0, 3), 1201 + PIN_FIELD_BASE(145, 145, 5, 0x00a0, 0x10, 3, 3), 1202 + PIN_FIELD_BASE(146, 146, 5, 0x00a0, 0x10, 6, 3), 1203 + PIN_FIELD_BASE(147, 147, 3, 0x00d0, 0x10, 18, 3), 1204 + PIN_FIELD_BASE(148, 148, 3, 0x00d0, 0x10, 21, 3), 1205 + PIN_FIELD_BASE(149, 149, 8, 0x0110, 0x10, 3, 3), 1206 + PIN_FIELD_BASE(150, 150, 8, 0x0110, 0x10, 6, 3), 1207 + }; 1208 + 1209 + static const unsigned int mt6878_pull_type[] = { 1210 + MTK_PULL_PU_PD_TYPE /* 0 */, 1211 + MTK_PULL_PU_PD_TYPE /* 1 */, 1212 + MTK_PULL_PU_PD_TYPE /* 2 */, 1213 + MTK_PULL_PU_PD_TYPE /* 3 */, 1214 + MTK_PULL_PU_PD_TYPE /* 4 */, 1215 + MTK_PULL_PU_PD_TYPE /* 5 */, 1216 + MTK_PULL_PU_PD_TYPE /* 6 */, 1217 + MTK_PULL_PU_PD_TYPE /* 7 */, 1218 + MTK_PULL_PU_PD_TYPE /* 8 */, 1219 + MTK_PULL_PU_PD_TYPE /* 9 */, 1220 + MTK_PULL_PU_PD_TYPE /* 10 */, 1221 + MTK_PULL_PU_PD_TYPE /* 11 */, 1222 + MTK_PULL_PU_PD_TYPE /* 12 */, 1223 + MTK_PULL_PU_PD_TYPE /* 13 */, 1224 + MTK_PULL_PU_PD_TYPE /* 14 */, 1225 + MTK_PULL_PU_PD_TYPE /* 15 */, 1226 + MTK_PULL_PU_PD_TYPE /* 16 */, 1227 + MTK_PULL_PU_PD_TYPE /* 17 */, 1228 + MTK_PULL_PU_PD_TYPE /* 18 */, 1229 + MTK_PULL_PU_PD_RSEL_TYPE /* 19 */, 1230 + MTK_PULL_PU_PD_TYPE /* 20 */, 1231 + MTK_PULL_PU_PD_TYPE /* 21 */, 1232 + MTK_PULL_PU_PD_TYPE /* 22 */, 1233 + MTK_PULL_PU_PD_TYPE /* 23 */, 1234 + MTK_PULL_PU_PD_RSEL_TYPE /* 24 */, 1235 + MTK_PULL_PU_PD_RSEL_TYPE /* 25 */, 1236 + MTK_PULL_PU_PD_RSEL_TYPE /* 26 */, 1237 + MTK_PULL_PU_PD_TYPE /* 27 */, 1238 + MTK_PULL_PU_PD_TYPE /* 28 */, 1239 + MTK_PULL_PU_PD_TYPE /* 29 */, 1240 + MTK_PULL_PU_PD_TYPE /* 30 */, 1241 + MTK_PULL_PU_PD_TYPE /* 31 */, 1242 + MTK_PULL_PU_PD_TYPE /* 32 */, 1243 + MTK_PULL_PUPD_R1R0_TYPE /* 33 */, 1244 + MTK_PULL_PUPD_R1R0_TYPE /* 34 */, 1245 + MTK_PULL_PUPD_R1R0_TYPE /* 35 */, 1246 + MTK_PULL_PU_PD_TYPE /* 36 */, 1247 + MTK_PULL_PU_PD_TYPE /* 37 */, 1248 + MTK_PULL_PU_PD_TYPE /* 38 */, 1249 + MTK_PULL_PU_PD_TYPE /* 39 */, 1250 + MTK_PULL_PU_PD_TYPE /* 40 */, 1251 + MTK_PULL_PU_PD_TYPE /* 41 */, 1252 + MTK_PULL_PU_PD_TYPE /* 42 */, 1253 + MTK_PULL_PU_PD_TYPE /* 43 */, 1254 + MTK_PULL_PU_PD_TYPE /* 44 */, 1255 + MTK_PULL_PU_PD_TYPE /* 45 */, 1256 + MTK_PULL_PU_PD_TYPE /* 46 */, 1257 + MTK_PULL_PU_PD_TYPE /* 47 */, 1258 + MTK_PULL_PU_PD_TYPE /* 48 */, 1259 + MTK_PULL_PU_PD_TYPE /* 49 */, 1260 + MTK_PULL_PU_PD_TYPE /* 50 */, 1261 + MTK_PULL_PU_PD_TYPE /* 51 */, 1262 + MTK_PULL_PU_PD_RSEL_TYPE /* 52 */, 1263 + MTK_PULL_PU_PD_RSEL_TYPE /* 53 */, 1264 + MTK_PULL_PU_PD_TYPE /* 54 */, 1265 + MTK_PULL_PU_PD_RSEL_TYPE /* 55 */, 1266 + MTK_PULL_PU_PD_TYPE /* 56 */, 1267 + MTK_PULL_PU_PD_TYPE /* 57 */, 1268 + MTK_PULL_PU_PD_TYPE /* 58 */, 1269 + MTK_PULL_PU_PD_TYPE /* 59 */, 1270 + MTK_PULL_PU_PD_RSEL_TYPE /* 60 */, 1271 + MTK_PULL_PU_PD_RSEL_TYPE /* 61 */, 1272 + MTK_PULL_PU_PD_RSEL_TYPE /* 62 */, 1273 + MTK_PULL_PU_PD_RSEL_TYPE /* 63 */, 1274 + MTK_PULL_PU_PD_RSEL_TYPE /* 64 */, 1275 + MTK_PULL_PU_PD_RSEL_TYPE /* 65 */, 1276 + MTK_PULL_PU_PD_RSEL_TYPE /* 66 */, 1277 + MTK_PULL_PU_PD_RSEL_TYPE /* 67 */, 1278 + MTK_PULL_PU_PD_TYPE /* 68 */, 1279 + MTK_PULL_PU_PD_TYPE /* 69 */, 1280 + MTK_PULL_PU_PD_TYPE /* 70 */, 1281 + MTK_PULL_PU_PD_TYPE /* 71 */, 1282 + MTK_PULL_PU_PD_TYPE /* 72 */, 1283 + MTK_PULL_PU_PD_TYPE /* 73 */, 1284 + MTK_PULL_PU_PD_TYPE /* 74 */, 1285 + MTK_PULL_PU_PD_TYPE /* 75 */, 1286 + MTK_PULL_PU_PD_TYPE /* 76 */, 1287 + MTK_PULL_PUPD_R1R0_TYPE /* 77 */, 1288 + MTK_PULL_PUPD_R1R0_TYPE /* 78 */, 1289 + MTK_PULL_PUPD_R1R0_TYPE /* 79 */, 1290 + MTK_PULL_PUPD_R1R0_TYPE /* 80 */, 1291 + MTK_PULL_PUPD_R1R0_TYPE /* 81 */, 1292 + MTK_PULL_PUPD_R1R0_TYPE /* 82 */, 1293 + MTK_PULL_PUPD_R1R0_TYPE /* 83 */, 1294 + MTK_PULL_PUPD_R1R0_TYPE /* 84 */, 1295 + MTK_PULL_PUPD_R1R0_TYPE /* 85 */, 1296 + MTK_PULL_PUPD_R1R0_TYPE /* 86 */, 1297 + MTK_PULL_PUPD_R1R0_TYPE /* 87 */, 1298 + MTK_PULL_PUPD_R1R0_TYPE /* 88 */, 1299 + MTK_PULL_PU_PD_TYPE /* 89 */, 1300 + MTK_PULL_PU_PD_TYPE /* 90 */, 1301 + MTK_PULL_PU_PD_TYPE /* 91 */, 1302 + MTK_PULL_PU_PD_RSEL_TYPE /* 92 */, 1303 + MTK_PULL_PU_PD_RSEL_TYPE /* 93 */, 1304 + MTK_PULL_PU_PD_RSEL_TYPE /* 94 */, 1305 + MTK_PULL_PU_PD_RSEL_TYPE /* 95 */, 1306 + MTK_PULL_PU_PD_RSEL_TYPE /* 96 */, 1307 + MTK_PULL_PUPD_R1R0_TYPE /* 97 */, 1308 + MTK_PULL_PUPD_R1R0_TYPE /* 98 */, 1309 + MTK_PULL_PU_PD_TYPE /* 99 */, 1310 + MTK_PULL_PU_PD_TYPE /* 100 */, 1311 + MTK_PULL_PU_PD_TYPE /* 101 */, 1312 + MTK_PULL_PU_PD_TYPE /* 102 */, 1313 + MTK_PULL_PU_PD_TYPE /* 103 */, 1314 + MTK_PULL_PU_PD_TYPE /* 104 */, 1315 + MTK_PULL_PU_PD_TYPE /* 105 */, 1316 + MTK_PULL_PU_PD_TYPE /* 106 */, 1317 + MTK_PULL_PU_PD_TYPE /* 107 */, 1318 + MTK_PULL_PU_PD_TYPE /* 108 */, 1319 + MTK_PULL_PU_PD_TYPE /* 109 */, 1320 + MTK_PULL_PU_PD_TYPE /* 110 */, 1321 + MTK_PULL_PU_PD_TYPE /* 111 */, 1322 + MTK_PULL_PU_PD_TYPE /* 112 */, 1323 + MTK_PULL_PU_PD_TYPE /* 113 */, 1324 + MTK_PULL_PU_PD_TYPE /* 114 */, 1325 + MTK_PULL_PU_PD_TYPE /* 115 */, 1326 + MTK_PULL_PU_PD_TYPE /* 116 */, 1327 + MTK_PULL_PUPD_R1R0_TYPE /* 117 */, 1328 + MTK_PULL_PUPD_R1R0_TYPE /* 118 */, 1329 + MTK_PULL_PUPD_R1R0_TYPE /* 119 */, 1330 + MTK_PULL_PUPD_R1R0_TYPE /* 120 */, 1331 + MTK_PULL_PUPD_R1R0_TYPE /* 121 */, 1332 + MTK_PULL_PUPD_R1R0_TYPE /* 122 */, 1333 + MTK_PULL_PUPD_R1R0_TYPE /* 123 */, 1334 + MTK_PULL_PUPD_R1R0_TYPE /* 124 */, 1335 + MTK_PULL_PU_PD_RSEL_TYPE /* 125 */, 1336 + MTK_PULL_PU_PD_RSEL_TYPE /* 126 */, 1337 + MTK_PULL_PU_PD_RSEL_TYPE /* 127 */, 1338 + MTK_PULL_PU_PD_RSEL_TYPE /* 128 */, 1339 + MTK_PULL_PU_PD_RSEL_TYPE /* 129 */, 1340 + MTK_PULL_PU_PD_RSEL_TYPE /* 130 */, 1341 + MTK_PULL_PU_PD_RSEL_TYPE /* 131 */, 1342 + MTK_PULL_PU_PD_RSEL_TYPE /* 132 */, 1343 + MTK_PULL_PU_PD_RSEL_TYPE /* 133 */, 1344 + MTK_PULL_PU_PD_RSEL_TYPE /* 134 */, 1345 + MTK_PULL_PU_PD_RSEL_TYPE /* 135 */, 1346 + MTK_PULL_PU_PD_RSEL_TYPE /* 136 */, 1347 + MTK_PULL_PU_PD_RSEL_TYPE /* 137 */, 1348 + MTK_PULL_PU_PD_RSEL_TYPE /* 138 */, 1349 + MTK_PULL_PU_PD_RSEL_TYPE /* 139 */, 1350 + MTK_PULL_PU_PD_RSEL_TYPE /* 140 */, 1351 + MTK_PULL_PU_PD_RSEL_TYPE /* 141 */, 1352 + MTK_PULL_PU_PD_RSEL_TYPE /* 142 */, 1353 + MTK_PULL_PU_PD_RSEL_TYPE /* 143 */, 1354 + MTK_PULL_PU_PD_RSEL_TYPE /* 144 */, 1355 + MTK_PULL_PU_PD_RSEL_TYPE /* 145 */, 1356 + MTK_PULL_PU_PD_RSEL_TYPE /* 146 */, 1357 + MTK_PULL_PU_PD_RSEL_TYPE /* 147 */, 1358 + MTK_PULL_PU_PD_RSEL_TYPE /* 148 */, 1359 + MTK_PULL_PU_PD_RSEL_TYPE /* 149 */, 1360 + MTK_PULL_PU_PD_RSEL_TYPE /* 150 */, 1361 + MTK_PULL_PU_PD_TYPE /* 151 */, 1362 + MTK_PULL_PU_PD_TYPE /* 152 */, 1363 + MTK_PULL_PUPD_R1R0_TYPE /* 153 */, 1364 + MTK_PULL_PUPD_R1R0_TYPE /* 154 */, 1365 + MTK_PULL_PUPD_R1R0_TYPE /* 155 */, 1366 + MTK_PULL_PU_PD_TYPE /* 156 */, 1367 + MTK_PULL_PU_PD_TYPE /* 157 */, 1368 + MTK_PULL_PU_PD_TYPE /* 158 */, 1369 + MTK_PULL_PU_PD_TYPE /* 159 */, 1370 + MTK_PULL_PU_PD_TYPE /* 160 */, 1371 + MTK_PULL_PU_PD_TYPE /* 161 */, 1372 + MTK_PULL_PU_PD_TYPE /* 162 */, 1373 + MTK_PULL_PU_PD_TYPE /* 163 */, 1374 + MTK_PULL_PU_PD_TYPE /* 164 */, 1375 + MTK_PULL_PU_PD_TYPE /* 165 */, 1376 + MTK_PULL_PU_PD_TYPE /* 166 */, 1377 + MTK_PULL_PU_PD_TYPE /* 167 */, 1378 + MTK_PULL_PU_PD_TYPE /* 168 */, 1379 + MTK_PULL_PU_PD_TYPE /* 169 */, 1380 + MTK_PULL_PU_PD_TYPE /* 170 */, 1381 + MTK_PULL_PU_PD_TYPE /* 171 */, 1382 + MTK_PULL_PUPD_R1R0_TYPE /* 172 */, 1383 + MTK_PULL_PUPD_R1R0_TYPE /* 173 */, 1384 + MTK_PULL_PUPD_R1R0_TYPE /* 174 */, 1385 + MTK_PULL_PUPD_R1R0_TYPE /* 175 */, 1386 + MTK_PULL_PUPD_R1R0_TYPE /* 176 */, 1387 + MTK_PULL_PUPD_R1R0_TYPE /* 177 */, 1388 + MTK_PULL_PUPD_R1R0_TYPE /* 178 */, 1389 + MTK_PULL_PUPD_R1R0_TYPE /* 179 */, 1390 + MTK_PULL_PUPD_R1R0_TYPE /* 180 */, 1391 + MTK_PULL_PUPD_R1R0_TYPE /* 181 */, 1392 + MTK_PULL_PUPD_R1R0_TYPE /* 182 */, 1393 + MTK_PULL_PUPD_R1R0_TYPE /* 183 */, 1394 + MTK_PULL_PUPD_R1R0_TYPE /* 184 */, 1395 + MTK_PULL_PUPD_R1R0_TYPE /* 185 */, 1396 + MTK_PULL_PUPD_R1R0_TYPE /* 186 */, 1397 + MTK_PULL_PUPD_R1R0_TYPE /* 187 */, 1398 + MTK_PULL_PUPD_R1R0_TYPE /* 188 */, 1399 + MTK_PULL_PUPD_R1R0_TYPE /* 189 */, 1400 + MTK_PULL_PUPD_R1R0_TYPE /* 190 */, 1401 + MTK_PULL_PUPD_R1R0_TYPE /* 191 */, 1402 + MTK_PULL_PUPD_R1R0_TYPE /* 192 */, 1403 + MTK_PULL_PUPD_R1R0_TYPE /* 193 */, 1404 + MTK_PULL_PUPD_R1R0_TYPE /* 194 */, 1405 + MTK_PULL_PUPD_R1R0_TYPE /* 195 */, 1406 + }; 1407 + 1408 + static const char * const mt6878_pinctrl_register_base_names[] = { 1409 + "gpio", "iocfg_bl", "iocfg_bm", "iocfg_br", 1410 + "iocfg_bl1", "iocfg_br1", "iocfg_lm", "iocfg_lt", 1411 + "iocfg_rm", "iocfg_rt", 1412 + }; 1413 + 1414 + static const struct mtk_eint_hw mt6878_eint_hw = { 1415 + .port_mask = 31, 1416 + .ports = 1, 1417 + .ap_num = 216, 1418 + .db_cnt = 36, 1419 + .db_time = debounce_time_mt6878, 1420 + }; 1421 + 1422 + static const struct mtk_pin_reg_calc mt6878_reg_cals[PINCTRL_PIN_REG_MAX] = { 1423 + [PINCTRL_PIN_REG_MODE] = MTK_RANGE(mt6878_pin_mode_range), 1424 + [PINCTRL_PIN_REG_DIR] = MTK_RANGE(mt6878_pin_dir_range), 1425 + [PINCTRL_PIN_REG_DI] = MTK_RANGE(mt6878_pin_di_range), 1426 + [PINCTRL_PIN_REG_DO] = MTK_RANGE(mt6878_pin_do_range), 1427 + [PINCTRL_PIN_REG_SR] = MTK_RANGE(mt6878_pin_dir_range), 1428 + [PINCTRL_PIN_REG_SMT] = MTK_RANGE(mt6878_pin_smt_range), 1429 + [PINCTRL_PIN_REG_IES] = MTK_RANGE(mt6878_pin_ies_range), 1430 + [PINCTRL_PIN_REG_PU] = MTK_RANGE(mt6878_pin_pu_range), 1431 + [PINCTRL_PIN_REG_PD] = MTK_RANGE(mt6878_pin_pd_range), 1432 + [PINCTRL_PIN_REG_DRV] = MTK_RANGE(mt6878_pin_drv_range), 1433 + [PINCTRL_PIN_REG_PUPD] = MTK_RANGE(mt6878_pin_pupd_range), 1434 + [PINCTRL_PIN_REG_R0] = MTK_RANGE(mt6878_pin_r0_range), 1435 + [PINCTRL_PIN_REG_R1] = MTK_RANGE(mt6878_pin_r1_range), 1436 + [PINCTRL_PIN_REG_DRV_ADV] = MTK_RANGE(mt6878_pin_drv_adv_range), 1437 + [PINCTRL_PIN_REG_RSEL] = MTK_RANGE(mt6878_pin_rsel_range), 1438 + }; 1439 + 1440 + static const struct mtk_pin_soc mt6878_data = { 1441 + .reg_cal = mt6878_reg_cals, 1442 + .pins = mtk_pins_mt6878, 1443 + .npins = ARRAY_SIZE(mtk_pins_mt6878), 1444 + .ngrps = ARRAY_SIZE(mtk_pins_mt6878), 1445 + .eint_pin = eint_pins_mt6878, 1446 + .eint_hw = &mt6878_eint_hw, 1447 + .nfuncs = 8, 1448 + .gpio_m = 0, 1449 + .base_names = mt6878_pinctrl_register_base_names, 1450 + .nbase_names = ARRAY_SIZE(mt6878_pinctrl_register_base_names), 1451 + .bias_set_combo = mtk_pinconf_bias_set_combo, 1452 + .bias_get_combo = mtk_pinconf_bias_get_combo, 1453 + .pull_type = mt6878_pull_type, 1454 + .adv_drive_get = mtk_pinconf_adv_drive_get, 1455 + .adv_drive_set = mtk_pinconf_adv_drive_set, 1456 + }; 1457 + 1458 + static const struct of_device_id mt6878_pinctrl_of_match[] = { 1459 + { .compatible = "mediatek,mt6878-pinctrl", .data = &mt6878_data }, 1460 + { } 1461 + }; 1462 + 1463 + static struct platform_driver mt6878_pinctrl_driver = { 1464 + .driver = { 1465 + .name = "mt6878-pinctrl", 1466 + .of_match_table = mt6878_pinctrl_of_match, 1467 + .pm = pm_sleep_ptr(&mtk_paris_pinctrl_pm_ops), 1468 + }, 1469 + .probe = mtk_paris_pinctrl_probe, 1470 + }; 1471 + 1472 + static int __init mt6878_pinctrl_init(void) 1473 + { 1474 + return platform_driver_register(&mt6878_pinctrl_driver); 1475 + } 1476 + arch_initcall(mt6878_pinctrl_init); 1477 + 1478 + MODULE_DESCRIPTION("MediaTek MT6878 Pinctrl Driver");
+2248
drivers/pinctrl/mediatek/pinctrl-mtk-mt6878.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 */ 2 + /* 3 + * Copyright (C) 2023 MediaTek Inc. 4 + * Author: Light Hsieh <light.hsieh@mediatek.com> 5 + * 6 + * Copyright (C) 2025 Igor Belwon <igor.belwon@mentallysanemainliners.org> 7 + */ 8 + 9 + #ifndef __PINCTRL_MTK_MT6878_H 10 + #define __PINCTRL_MTK_MT6878_H 11 + 12 + #include "pinctrl-paris.h" 13 + 14 + static const struct mtk_pin_desc mtk_pins_mt6878[] = { 15 + MTK_PIN( 16 + 0, "GPIO0", 17 + MTK_EINT_FUNCTION(0, 0), 18 + DRV_GRP4, 19 + MTK_FUNCTION(0, "GPIO0"), 20 + MTK_FUNCTION(1, "TP_GPIO0_AO"), 21 + MTK_FUNCTION(2, "SRCLKENA1"), 22 + MTK_FUNCTION(7, "DBG_MON_A3") 23 + ), 24 + MTK_PIN( 25 + 1, "GPIO1", 26 + MTK_EINT_FUNCTION(0, 1), 27 + DRV_GRP4, 28 + MTK_FUNCTION(0, "GPIO1"), 29 + MTK_FUNCTION(1, "TP_GPIO1_AO"), 30 + MTK_FUNCTION(2, "SRCLKENA1"), 31 + MTK_FUNCTION(3, "SRCLKENA2"), 32 + MTK_FUNCTION(5, "IDDIG"), 33 + MTK_FUNCTION(7, "DBG_MON_A4") 34 + ), 35 + MTK_PIN( 36 + 2, "GPIO2", 37 + MTK_EINT_FUNCTION(0, 2), 38 + DRV_GRP4, 39 + MTK_FUNCTION(0, "GPIO2"), 40 + MTK_FUNCTION(1, "TP_GPIO2_AO"), 41 + MTK_FUNCTION(2, "SRCLKENAI0"), 42 + MTK_FUNCTION(4, "SCP_DMIC_CLK"), 43 + MTK_FUNCTION(5, "DMIC_CLK"), 44 + MTK_FUNCTION(7, "DBG_MON_A5") 45 + ), 46 + MTK_PIN( 47 + 3, "GPIO3", 48 + MTK_EINT_FUNCTION(0, 3), 49 + DRV_GRP4, 50 + MTK_FUNCTION(0, "GPIO3"), 51 + MTK_FUNCTION(1, "TP_GPIO3_AO"), 52 + MTK_FUNCTION(2, "SRCLKENAI1"), 53 + MTK_FUNCTION(4, "SCP_DMIC_DAT"), 54 + MTK_FUNCTION(5, "DMIC_DAT"), 55 + MTK_FUNCTION(7, "DBG_MON_A6") 56 + ), 57 + MTK_PIN( 58 + 4, "GPIO4", 59 + MTK_EINT_FUNCTION(0, 4), 60 + DRV_GRP4, 61 + MTK_FUNCTION(0, "GPIO4"), 62 + MTK_FUNCTION(1, "SPI7_CLK"), 63 + MTK_FUNCTION(2, "TP_GPIO4_AO"), 64 + MTK_FUNCTION(3, "ANT_SEL0"), 65 + MTK_FUNCTION(5, "DMIC1_CLK"), 66 + MTK_FUNCTION(6, "MD_INT4"), 67 + MTK_FUNCTION(7, "DBG_MON_A7") 68 + ), 69 + MTK_PIN( 70 + 5, "GPIO5", 71 + MTK_EINT_FUNCTION(0, 5), 72 + DRV_GRP4, 73 + MTK_FUNCTION(0, "GPIO5"), 74 + MTK_FUNCTION(1, "SPI7_CSB"), 75 + MTK_FUNCTION(2, "TP_GPIO5_AO"), 76 + MTK_FUNCTION(3, "ANT_SEL1"), 77 + MTK_FUNCTION(5, "DMIC1_DAT"), 78 + MTK_FUNCTION(6, "MD_INT0"), 79 + MTK_FUNCTION(7, "DBG_MON_A8") 80 + ), 81 + MTK_PIN( 82 + 6, "GPIO6", 83 + MTK_EINT_FUNCTION(0, 6), 84 + DRV_GRP4, 85 + MTK_FUNCTION(0, "GPIO6"), 86 + MTK_FUNCTION(1, "SPI7_MO"), 87 + MTK_FUNCTION(2, "TP_GPIO6_AO"), 88 + MTK_FUNCTION(3, "ANT_SEL2"), 89 + MTK_FUNCTION(4, "MD32_0_GPIO0"), 90 + MTK_FUNCTION(6, "MD_INT3"), 91 + MTK_FUNCTION(7, "DBG_MON_B0") 92 + ), 93 + MTK_PIN( 94 + 7, "GPIO7", 95 + MTK_EINT_FUNCTION(0, 7), 96 + DRV_GRP4, 97 + MTK_FUNCTION(0, "GPIO7"), 98 + MTK_FUNCTION(1, "SPI7_MI"), 99 + MTK_FUNCTION(2, "TP_GPIO7_AO"), 100 + MTK_FUNCTION(3, "ANT_SEL3"), 101 + MTK_FUNCTION(4, "MD32_1_GPIO0") 102 + ), 103 + MTK_PIN( 104 + 8, "GPIO8", 105 + MTK_EINT_FUNCTION(0, 8), 106 + DRV_GRP4, 107 + MTK_FUNCTION(0, "GPIO8"), 108 + MTK_FUNCTION(2, "SCP_JTAG0_TRSTN_VLP"), 109 + MTK_FUNCTION(3, "SPM_JTAG_TRSTN_VLP"), 110 + MTK_FUNCTION(4, "SSPM_JTAG_TRSTN_VLP"), 111 + MTK_FUNCTION(5, "HFRP_JTAG0_TRSTN"), 112 + MTK_FUNCTION(6, "IO_JTAG_TRSTN"), 113 + MTK_FUNCTION(7, "CONN_BGF_MCU_TDI") 114 + ), 115 + MTK_PIN( 116 + 9, "GPIO9", 117 + MTK_EINT_FUNCTION(0, 9), 118 + DRV_GRP4, 119 + MTK_FUNCTION(0, "GPIO9"), 120 + MTK_FUNCTION(2, "SCP_JTAG0_TCK_VLP"), 121 + MTK_FUNCTION(3, "SPM_JTAG_TCK_VLP"), 122 + MTK_FUNCTION(4, "SSPM_JTAG_TCK_VLP"), 123 + MTK_FUNCTION(5, "HFRP_JTAG0_TCK"), 124 + MTK_FUNCTION(6, "IO_JTAG_TCK"), 125 + MTK_FUNCTION(7, "CONN_BGF_MCU_TRST_B") 126 + ), 127 + MTK_PIN( 128 + 10, "GPIO10", 129 + MTK_EINT_FUNCTION(0, 10), 130 + DRV_GRP4, 131 + MTK_FUNCTION(0, "GPIO10"), 132 + MTK_FUNCTION(2, "SCP_JTAG0_TMS_VLP"), 133 + MTK_FUNCTION(3, "SPM_JTAG_TMS_VLP"), 134 + MTK_FUNCTION(4, "SSPM_JTAG_TMS_VLP"), 135 + MTK_FUNCTION(5, "HFRP_JTAG0_TMS"), 136 + MTK_FUNCTION(6, "IO_JTAG_TMS"), 137 + MTK_FUNCTION(7, "CONN_BGF_MCU_TCK") 138 + ), 139 + MTK_PIN( 140 + 11, "GPIO11", 141 + MTK_EINT_FUNCTION(0, 11), 142 + DRV_GRP4, 143 + MTK_FUNCTION(0, "GPIO11"), 144 + MTK_FUNCTION(2, "SCP_JTAG0_TDI_VLP"), 145 + MTK_FUNCTION(3, "SPM_JTAG_TDI_VLP"), 146 + MTK_FUNCTION(4, "SSPM_JTAG_TDI_VLP"), 147 + MTK_FUNCTION(5, "HFRP_JTAG0_TDI"), 148 + MTK_FUNCTION(6, "IO_JTAG_TDI"), 149 + MTK_FUNCTION(7, "CONN_BGF_MCU_TDO") 150 + ), 151 + MTK_PIN( 152 + 12, "GPIO12", 153 + MTK_EINT_FUNCTION(0, 12), 154 + DRV_GRP4, 155 + MTK_FUNCTION(0, "GPIO12"), 156 + MTK_FUNCTION(2, "SCP_JTAG0_TDO_VLP"), 157 + MTK_FUNCTION(3, "SPM_JTAG_TDO_VLP"), 158 + MTK_FUNCTION(4, "SSPM_JTAG_TDO_VLP"), 159 + MTK_FUNCTION(5, "HFRP_JTAG0_TDO"), 160 + MTK_FUNCTION(6, "IO_JTAG_TDO"), 161 + MTK_FUNCTION(7, "CONN_BGF_MCU_TMS") 162 + ), 163 + MTK_PIN( 164 + 13, "GPIO13", 165 + MTK_EINT_FUNCTION(0, 13), 166 + DRV_GRP4, 167 + MTK_FUNCTION(0, "GPIO13"), 168 + MTK_FUNCTION(1, "MFG_EB_JTAG_TDI"), 169 + MTK_FUNCTION(2, "CONN_WF_MCU_TDI"), 170 + MTK_FUNCTION(3, "SCP_JTAG0_TDI_VCORE"), 171 + MTK_FUNCTION(5, "SPM_JTAG_TDI_VCORE"), 172 + MTK_FUNCTION(6, "MCUPM_JTAG_TDI") 173 + ), 174 + MTK_PIN( 175 + 14, "GPIO14", 176 + MTK_EINT_FUNCTION(0, 14), 177 + DRV_GRP4, 178 + MTK_FUNCTION(0, "GPIO14"), 179 + MTK_FUNCTION(1, "MFG_EB_JTAG_TRSTN"), 180 + MTK_FUNCTION(2, "CONN_WF_MCU_TRST_B"), 181 + MTK_FUNCTION(3, "SCP_JTAG0_TRSTN_VCORE"), 182 + MTK_FUNCTION(5, "SPM_JTAG_TRSTN_VCORE"), 183 + MTK_FUNCTION(6, "MCUPM_JTAG_TRSTN") 184 + ), 185 + MTK_PIN( 186 + 15, "GPIO15", 187 + MTK_EINT_FUNCTION(0, 15), 188 + DRV_GRP4, 189 + MTK_FUNCTION(0, "GPIO15"), 190 + MTK_FUNCTION(1, "MFG_EB_JTAG_TCK"), 191 + MTK_FUNCTION(2, "CONN_WF_MCU_TCK"), 192 + MTK_FUNCTION(3, "SCP_JTAG0_TCK_VCORE"), 193 + MTK_FUNCTION(5, "SPM_JTAG_TCK_VCORE"), 194 + MTK_FUNCTION(6, "MCUPM_JTAG_TCK") 195 + ), 196 + MTK_PIN( 197 + 16, "GPIO16", 198 + MTK_EINT_FUNCTION(0, 16), 199 + DRV_GRP4, 200 + MTK_FUNCTION(0, "GPIO16"), 201 + MTK_FUNCTION(1, "MFG_EB_JTAG_TDO"), 202 + MTK_FUNCTION(2, "CONN_WF_MCU_TDO"), 203 + MTK_FUNCTION(3, "SCP_JTAG0_TDO_VCORE"), 204 + MTK_FUNCTION(5, "SPM_JTAG_TDO_VCORE"), 205 + MTK_FUNCTION(6, "MCUPM_JTAG_TDO") 206 + ), 207 + MTK_PIN( 208 + 17, "GPIO17", 209 + MTK_EINT_FUNCTION(0, 17), 210 + DRV_GRP4, 211 + MTK_FUNCTION(0, "GPIO17"), 212 + MTK_FUNCTION(1, "MFG_EB_JTAG_TMS"), 213 + MTK_FUNCTION(2, "CONN_WF_MCU_TMS"), 214 + MTK_FUNCTION(3, "SCP_JTAG0_TMS_VCORE"), 215 + MTK_FUNCTION(5, "SPM_JTAG_TMS_VCORE"), 216 + MTK_FUNCTION(6, "MCUPM_JTAG_TMS") 217 + ), 218 + MTK_PIN( 219 + 18, "GPIO18", 220 + MTK_EINT_FUNCTION(0, 18), 221 + DRV_GRP4, 222 + MTK_FUNCTION(0, "GPIO18"), 223 + MTK_FUNCTION(2, "CONN_BT_TXD"), 224 + MTK_FUNCTION(3, "CONN_TCXOENA_REQ"), 225 + MTK_FUNCTION(6, "GPS_L1_ELNA_EN") 226 + ), 227 + MTK_PIN( 228 + 19, "GPIO19", 229 + MTK_EINT_FUNCTION(0, 19), 230 + DRV_GRP4, 231 + MTK_FUNCTION(0, "GPIO19"), 232 + MTK_FUNCTION(1, "PWM_0"), 233 + MTK_FUNCTION(3, "SDA10"), 234 + MTK_FUNCTION(4, "MD32_0_GPIO0"), 235 + MTK_FUNCTION(5, "EXT_FRAME_SYNC"), 236 + MTK_FUNCTION(7, "DBG_MON_A9") 237 + ), 238 + MTK_PIN( 239 + 20, "GPIO20", 240 + MTK_EINT_FUNCTION(0, 20), 241 + DRV_GRP4, 242 + MTK_FUNCTION(0, "GPIO20"), 243 + MTK_FUNCTION(1, "PWM_1"), 244 + MTK_FUNCTION(2, "SPI4_CLK"), 245 + MTK_FUNCTION(4, "GPS_L1_ELNA_EN"), 246 + MTK_FUNCTION(6, "DAP_SONIC_SWCK"), 247 + MTK_FUNCTION(7, "DBG_MON_A10") 248 + ), 249 + MTK_PIN( 250 + 21, "GPIO21", 251 + MTK_EINT_FUNCTION(0, 21), 252 + DRV_GRP4, 253 + MTK_FUNCTION(0, "GPIO21"), 254 + MTK_FUNCTION(1, "PWM_2"), 255 + MTK_FUNCTION(2, "SPI4_CSB"), 256 + MTK_FUNCTION(4, "GPS_L5_ELNA_EN"), 257 + MTK_FUNCTION(5, "IDDIG"), 258 + MTK_FUNCTION(6, "DAP_SONIC_SWD"), 259 + MTK_FUNCTION(7, "DBG_MON_A11") 260 + ), 261 + MTK_PIN( 262 + 22, "GPIO22", 263 + MTK_EINT_FUNCTION(0, 22), 264 + DRV_GRP4, 265 + MTK_FUNCTION(0, "GPIO22"), 266 + MTK_FUNCTION(1, "PWM_3"), 267 + MTK_FUNCTION(2, "SPI4_MO"), 268 + MTK_FUNCTION(4, "EXT_FRAME_SYNC"), 269 + MTK_FUNCTION(5, "VBUSVALID"), 270 + MTK_FUNCTION(6, "DAP_MD32_SWCK"), 271 + MTK_FUNCTION(7, "DBG_MON_A12") 272 + ), 273 + MTK_PIN( 274 + 23, "GPIO23", 275 + MTK_EINT_FUNCTION(0, 23), 276 + DRV_GRP4, 277 + MTK_FUNCTION(0, "GPIO23"), 278 + MTK_FUNCTION(2, "SPI4_MI"), 279 + MTK_FUNCTION(4, "MD32_1_GPIO0"), 280 + MTK_FUNCTION(5, "USB_DRVVBUS"), 281 + MTK_FUNCTION(6, "DAP_MD32_SWD"), 282 + MTK_FUNCTION(7, "DBG_MON_A13") 283 + ), 284 + MTK_PIN( 285 + 24, "GPIO24", 286 + MTK_EINT_FUNCTION(0, 24), 287 + DRV_GRP4, 288 + MTK_FUNCTION(0, "GPIO24"), 289 + MTK_FUNCTION(1, "GPS_L5_ELNA_EN"), 290 + MTK_FUNCTION(2, "SCL12"), 291 + MTK_FUNCTION(3, "SCL10"), 292 + MTK_FUNCTION(4, "CMVREF0"), 293 + MTK_FUNCTION(5, "CONN_WIFI_TXD"), 294 + MTK_FUNCTION(6, "CMFLASH0"), 295 + MTK_FUNCTION(7, "DBG_MON_A14") 296 + ), 297 + MTK_PIN( 298 + 25, "GPIO25", 299 + MTK_EINT_FUNCTION(0, 25), 300 + DRV_GRP4, 301 + MTK_FUNCTION(0, "GPIO25"), 302 + MTK_FUNCTION(1, "SPI6_CLK"), 303 + MTK_FUNCTION(2, "SCL11"), 304 + MTK_FUNCTION(4, "CMVREF1"), 305 + MTK_FUNCTION(6, "CMFLASH1"), 306 + MTK_FUNCTION(7, "DBG_MON_A15") 307 + ), 308 + MTK_PIN( 309 + 26, "GPIO26", 310 + MTK_EINT_FUNCTION(0, 26), 311 + DRV_GRP4, 312 + MTK_FUNCTION(0, "GPIO26"), 313 + MTK_FUNCTION(1, "SPI6_CSB"), 314 + MTK_FUNCTION(2, "SDA11"), 315 + MTK_FUNCTION(3, "USB_DRVVBUS"), 316 + MTK_FUNCTION(4, "CMVREF2"), 317 + MTK_FUNCTION(6, "CMFLASH2"), 318 + MTK_FUNCTION(7, "DBG_MON_A16") 319 + ), 320 + MTK_PIN( 321 + 27, "GPIO27", 322 + MTK_EINT_FUNCTION(0, 27), 323 + DRV_GRP4, 324 + MTK_FUNCTION(0, "GPIO27"), 325 + MTK_FUNCTION(1, "SPI6_MO"), 326 + MTK_FUNCTION(3, "VBUSVALID"), 327 + MTK_FUNCTION(4, "CMVREF3"), 328 + MTK_FUNCTION(5, "DMIC1_CLK"), 329 + MTK_FUNCTION(6, "CMFLASH3"), 330 + MTK_FUNCTION(7, "DBG_MON_A17") 331 + ), 332 + MTK_PIN( 333 + 28, "GPIO28", 334 + MTK_EINT_FUNCTION(0, 28), 335 + DRV_GRP4, 336 + MTK_FUNCTION(0, "GPIO28"), 337 + MTK_FUNCTION(1, "SPI6_MI"), 338 + MTK_FUNCTION(3, "IDDIG"), 339 + MTK_FUNCTION(5, "DMIC1_DAT"), 340 + MTK_FUNCTION(6, "CMFLASH0"), 341 + MTK_FUNCTION(7, "DBG_MON_A18") 342 + ), 343 + MTK_PIN( 344 + 29, "GPIO29", 345 + MTK_EINT_FUNCTION(0, 29), 346 + DRV_GRP4, 347 + MTK_FUNCTION(0, "GPIO29"), 348 + MTK_FUNCTION(1, "I2SIN2_BCK"), 349 + MTK_FUNCTION(2, "TP_UTXD1_VCORE"), 350 + MTK_FUNCTION(3, "MD_UTXD0"), 351 + MTK_FUNCTION(4, "SSPM_UTXD_AO_VCORE"), 352 + MTK_FUNCTION(5, "MD32_1_TXD"), 353 + MTK_FUNCTION(6, "CONN_BT_TXD"), 354 + MTK_FUNCTION(7, "PTA_TXD") 355 + ), 356 + MTK_PIN( 357 + 30, "GPIO30", 358 + MTK_EINT_FUNCTION(0, 30), 359 + DRV_GRP4, 360 + MTK_FUNCTION(0, "GPIO30"), 361 + MTK_FUNCTION(1, "I2SIN2_LRCK"), 362 + MTK_FUNCTION(2, "TP_URXD1_VCORE"), 363 + MTK_FUNCTION(3, "MD_URXD0"), 364 + MTK_FUNCTION(4, "SSPM_URXD_AO_VCORE"), 365 + MTK_FUNCTION(5, "MD32_1_RXD"), 366 + MTK_FUNCTION(7, "PTA_RXD") 367 + ), 368 + MTK_PIN( 369 + 31, "GPIO31", 370 + MTK_EINT_FUNCTION(0, 31), 371 + DRV_GRP4, 372 + MTK_FUNCTION(0, "GPIO31"), 373 + MTK_FUNCTION(1, "I2SOUT2_DO"), 374 + MTK_FUNCTION(2, "TP_UTXD2_VCORE"), 375 + MTK_FUNCTION(3, "MD_UTXD1"), 376 + MTK_FUNCTION(4, "HFRP_UTXD1"), 377 + MTK_FUNCTION(5, "MD32_0_TXD"), 378 + MTK_FUNCTION(6, "CONN_WIFI_TXD"), 379 + MTK_FUNCTION(7, "CONN_BGF_UART0_TXD") 380 + ), 381 + MTK_PIN( 382 + 32, "GPIO32", 383 + MTK_EINT_FUNCTION(0, 32), 384 + DRV_GRP4, 385 + MTK_FUNCTION(0, "GPIO32"), 386 + MTK_FUNCTION(1, "I2SIN2_DI"), 387 + MTK_FUNCTION(2, "TP_URXD2_VCORE"), 388 + MTK_FUNCTION(3, "MD_URXD1"), 389 + MTK_FUNCTION(4, "HFRP_URXD1"), 390 + MTK_FUNCTION(5, "MD32_0_RXD"), 391 + MTK_FUNCTION(7, "CONN_BGF_UART0_RXD") 392 + ), 393 + MTK_PIN( 394 + 33, "GPIO33", 395 + MTK_EINT_FUNCTION(0, 33), 396 + DRV_GRP4, 397 + MTK_FUNCTION(0, "GPIO33"), 398 + MTK_FUNCTION(1, "ANT_SEL0"), 399 + MTK_FUNCTION(3, "GPS_L1_ELNA_EN"), 400 + MTK_FUNCTION(4, "SCL1"), 401 + MTK_FUNCTION(5, "CONN_BPI_BUS18_ANT1"), 402 + MTK_FUNCTION(6, "MD_UCTS0") 403 + ), 404 + MTK_PIN( 405 + 34, "GPIO34", 406 + MTK_EINT_FUNCTION(0, 34), 407 + DRV_GRP4, 408 + MTK_FUNCTION(0, "GPIO34"), 409 + MTK_FUNCTION(1, "ANT_SEL1"), 410 + MTK_FUNCTION(3, "GPS_L5_ELNA_EN"), 411 + MTK_FUNCTION(4, "SDA1"), 412 + MTK_FUNCTION(5, "CONN_BPI_BUS19_ANT2"), 413 + MTK_FUNCTION(6, "MD_URTS0") 414 + ), 415 + MTK_PIN( 416 + 35, "GPIO35", 417 + MTK_EINT_FUNCTION(0, 35), 418 + DRV_GRP4, 419 + MTK_FUNCTION(0, "GPIO35"), 420 + MTK_FUNCTION(1, "ANT_SEL2"), 421 + MTK_FUNCTION(2, "SSPM_JTAG_TCK_VCORE"), 422 + MTK_FUNCTION(3, "UDI_TCK"), 423 + MTK_FUNCTION(5, "CONN_BPI_BUS20_ANT3"), 424 + MTK_FUNCTION(6, "MD_UCTS1") 425 + ), 426 + MTK_PIN( 427 + 36, "GPIO36", 428 + MTK_EINT_FUNCTION(0, 36), 429 + DRV_GRP4, 430 + MTK_FUNCTION(0, "GPIO36"), 431 + MTK_FUNCTION(1, "ANT_SEL3"), 432 + MTK_FUNCTION(2, "SSPM_JTAG_TRSTN_VCORE"), 433 + MTK_FUNCTION(3, "UDI_NTRST"), 434 + MTK_FUNCTION(5, "CONN_BPI_BUS21_ANT4"), 435 + MTK_FUNCTION(6, "MD_URTS1") 436 + ), 437 + MTK_PIN( 438 + 37, "GPIO37", 439 + MTK_EINT_FUNCTION(0, 37), 440 + DRV_GRP4, 441 + MTK_FUNCTION(0, "GPIO37"), 442 + MTK_FUNCTION(1, "ANT_SEL4"), 443 + MTK_FUNCTION(2, "SSPM_JTAG_TDI_VCORE"), 444 + MTK_FUNCTION(3, "UDI_TDI"), 445 + MTK_FUNCTION(6, "TP_UCTS1_VCORE") 446 + ), 447 + MTK_PIN( 448 + 38, "GPIO38", 449 + MTK_EINT_FUNCTION(0, 38), 450 + DRV_GRP4, 451 + MTK_FUNCTION(0, "GPIO38"), 452 + MTK_FUNCTION(1, "ANT_SEL5"), 453 + MTK_FUNCTION(2, "SSPM_JTAG_TMS_VCORE"), 454 + MTK_FUNCTION(3, "UDI_TMS"), 455 + MTK_FUNCTION(6, "TP_URTS1_VCORE") 456 + ), 457 + MTK_PIN( 458 + 39, "GPIO39", 459 + MTK_EINT_FUNCTION(0, 39), 460 + DRV_GRP4, 461 + MTK_FUNCTION(0, "GPIO39"), 462 + MTK_FUNCTION(1, "ANT_SEL6"), 463 + MTK_FUNCTION(2, "SSPM_JTAG_TDO_VCORE"), 464 + MTK_FUNCTION(3, "UDI_TDO"), 465 + MTK_FUNCTION(5, "CLKM3") 466 + ), 467 + MTK_PIN( 468 + 40, "GPIO40", 469 + MTK_EINT_FUNCTION(0, 40), 470 + DRV_GRP4, 471 + MTK_FUNCTION(0, "GPIO40"), 472 + MTK_FUNCTION(1, "ANT_SEL7"), 473 + MTK_FUNCTION(2, "PMSR_SMAP"), 474 + MTK_FUNCTION(3, "CONN_TCXOENA_REQ"), 475 + MTK_FUNCTION(4, "CONN_WIFI_TXD"), 476 + MTK_FUNCTION(5, "GPS_PPS") 477 + ), 478 + MTK_PIN( 479 + 41, "GPIO41", 480 + MTK_EINT_FUNCTION(0, 41), 481 + DRV_GRP4, 482 + MTK_FUNCTION(0, "GPIO41"), 483 + MTK_FUNCTION(1, "I2SIN1_MCK"), 484 + MTK_FUNCTION(2, "IDDIG"), 485 + MTK_FUNCTION(3, "GPS_PPS"), 486 + MTK_FUNCTION(4, "HFRP_UCTS1"), 487 + MTK_FUNCTION(5, "TP_UCTS2_VCORE"), 488 + MTK_FUNCTION(6, "ANT_SEL8"), 489 + MTK_FUNCTION(7, "DBG_MON_B1") 490 + ), 491 + MTK_PIN( 492 + 42, "GPIO42", 493 + MTK_EINT_FUNCTION(0, 42), 494 + DRV_GRP4, 495 + MTK_FUNCTION(0, "GPIO42"), 496 + MTK_FUNCTION(1, "I2SIN1_BCK"), 497 + MTK_FUNCTION(2, "I2SIN4_BCK"), 498 + MTK_FUNCTION(4, "HFRP_URTS1"), 499 + MTK_FUNCTION(5, "TP_URTS2_VCORE"), 500 + MTK_FUNCTION(6, "ANT_SEL9"), 501 + MTK_FUNCTION(7, "DBG_MON_B2") 502 + ), 503 + MTK_PIN( 504 + 43, "GPIO43", 505 + MTK_EINT_FUNCTION(0, 43), 506 + DRV_GRP4, 507 + MTK_FUNCTION(0, "GPIO43"), 508 + MTK_FUNCTION(1, "I2SIN1_LRCK"), 509 + MTK_FUNCTION(2, "I2SIN4_LRCK"), 510 + MTK_FUNCTION(6, "ANT_SEL10"), 511 + MTK_FUNCTION(7, "DBG_MON_B3") 512 + ), 513 + MTK_PIN( 514 + 44, "GPIO44", 515 + MTK_EINT_FUNCTION(0, 44), 516 + DRV_GRP4, 517 + MTK_FUNCTION(0, "GPIO44"), 518 + MTK_FUNCTION(1, "I2SOUT1_DO"), 519 + MTK_FUNCTION(2, "I2SOUT4_DATA0"), 520 + MTK_FUNCTION(6, "ANT_SEL11"), 521 + MTK_FUNCTION(7, "DBG_MON_B4") 522 + ), 523 + MTK_PIN( 524 + 45, "GPIO45", 525 + MTK_EINT_FUNCTION(0, 45), 526 + DRV_GRP4, 527 + MTK_FUNCTION(0, "GPIO45"), 528 + MTK_FUNCTION(1, "I2SIN1_DI"), 529 + MTK_FUNCTION(2, "I2SIN4_DATA0"), 530 + MTK_FUNCTION(5, "AGPS_SYNC"), 531 + MTK_FUNCTION(6, "ANT_SEL12"), 532 + MTK_FUNCTION(7, "DBG_MON_B5") 533 + ), 534 + MTK_PIN( 535 + 46, "GPIO46", 536 + MTK_EINT_FUNCTION(0, 46), 537 + DRV_GRP4, 538 + MTK_FUNCTION(0, "GPIO46"), 539 + MTK_FUNCTION(1, "MD_INT1_C2K_UIM0_HOT_PLUG"), 540 + MTK_FUNCTION(2, "MD_INT2_C2K_UIM1_HOT_PLUG"), 541 + MTK_FUNCTION(3, "SRCLKENAI0"), 542 + MTK_FUNCTION(5, "SSPM_UTXD_AO_VLP"), 543 + MTK_FUNCTION(6, "MD_MCIF_UTXD0"), 544 + MTK_FUNCTION(7, "DBG_MON_B6") 545 + ), 546 + MTK_PIN( 547 + 47, "GPIO47", 548 + MTK_EINT_FUNCTION(0, 47), 549 + DRV_GRP4, 550 + MTK_FUNCTION(0, "GPIO47"), 551 + MTK_FUNCTION(1, "MD_INT2_C2K_UIM1_HOT_PLUG"), 552 + MTK_FUNCTION(2, "MD_INT1_C2K_UIM0_HOT_PLUG"), 553 + MTK_FUNCTION(3, "SRCLKENAI1"), 554 + MTK_FUNCTION(4, "SRCLKENA1"), 555 + MTK_FUNCTION(5, "SSPM_URXD_AO_VLP"), 556 + MTK_FUNCTION(6, "MD_MCIF_URXD0"), 557 + MTK_FUNCTION(7, "DBG_MON_B7") 558 + ), 559 + MTK_PIN( 560 + 48, "GPIO48", 561 + MTK_EINT_FUNCTION(0, 48), 562 + DRV_GRP4, 563 + MTK_FUNCTION(0, "GPIO48"), 564 + MTK_FUNCTION(1, "UTXD0"), 565 + MTK_FUNCTION(3, "MD_UTXD1"), 566 + MTK_FUNCTION(4, "HFRP_UTXD1"), 567 + MTK_FUNCTION(5, "MD32_0_TXD") 568 + ), 569 + MTK_PIN( 570 + 49, "GPIO49", 571 + MTK_EINT_FUNCTION(0, 49), 572 + DRV_GRP4, 573 + MTK_FUNCTION(0, "GPIO49"), 574 + MTK_FUNCTION(1, "URXD0"), 575 + MTK_FUNCTION(3, "MD_URXD1"), 576 + MTK_FUNCTION(4, "HFRP_URXD1"), 577 + MTK_FUNCTION(5, "MD32_0_RXD") 578 + ), 579 + MTK_PIN( 580 + 50, "GPIO50", 581 + MTK_EINT_FUNCTION(0, 50), 582 + DRV_GRP4, 583 + MTK_FUNCTION(0, "GPIO50"), 584 + MTK_FUNCTION(1, "MD_UTXD0"), 585 + MTK_FUNCTION(2, "TP_UTXD1_VLP"), 586 + MTK_FUNCTION(3, "CONN_BGF_UART0_TXD"), 587 + MTK_FUNCTION(4, "SSPM_UTXD_AO_VLP"), 588 + MTK_FUNCTION(5, "MD_MCIF_UTXD0"), 589 + MTK_FUNCTION(6, "TP_UTXD2_VLP"), 590 + MTK_FUNCTION(7, "UTXD1") 591 + ), 592 + MTK_PIN( 593 + 51, "GPIO51", 594 + MTK_EINT_FUNCTION(0, 51), 595 + DRV_GRP4, 596 + MTK_FUNCTION(0, "GPIO51"), 597 + MTK_FUNCTION(1, "MD_URXD0"), 598 + MTK_FUNCTION(2, "TP_URXD1_VLP"), 599 + MTK_FUNCTION(3, "CONN_BGF_UART0_RXD"), 600 + MTK_FUNCTION(4, "SSPM_URXD_AO_VLP"), 601 + MTK_FUNCTION(5, "MD_MCIF_URXD0"), 602 + MTK_FUNCTION(6, "TP_URXD2_VLP"), 603 + MTK_FUNCTION(7, "URXD1") 604 + ), 605 + MTK_PIN( 606 + 52, "GPIO52", 607 + MTK_EINT_FUNCTION(0, 52), 608 + DRV_GRP4, 609 + MTK_FUNCTION(0, "GPIO52"), 610 + MTK_FUNCTION(1, "KPROW0"), 611 + MTK_FUNCTION(2, "CMFLASH0"), 612 + MTK_FUNCTION(3, "SDA12"), 613 + MTK_FUNCTION(4, "DSI_TE1") 614 + ), 615 + MTK_PIN( 616 + 53, "GPIO53", 617 + MTK_EINT_FUNCTION(0, 53), 618 + DRV_GRP4, 619 + MTK_FUNCTION(0, "GPIO53"), 620 + MTK_FUNCTION(1, "KPROW1"), 621 + MTK_FUNCTION(2, "CMFLASH1"), 622 + MTK_FUNCTION(3, "SCL12"), 623 + MTK_FUNCTION(4, "LCM_RST1"), 624 + MTK_FUNCTION(6, "EXTIF0_ACT") 625 + ), 626 + MTK_PIN( 627 + 54, "GPIO54", 628 + MTK_EINT_FUNCTION(0, 54), 629 + DRV_GRP4, 630 + MTK_FUNCTION(0, "GPIO54"), 631 + MTK_FUNCTION(1, "KPCOL0_VLP"), 632 + MTK_FUNCTION(7, "KPCOL0_VLP") 633 + ), 634 + MTK_PIN( 635 + 55, "GPIO55", 636 + MTK_EINT_FUNCTION(0, 55), 637 + DRV_GRP4, 638 + MTK_FUNCTION(0, "GPIO55"), 639 + MTK_FUNCTION(1, "KPCOL1"), 640 + MTK_FUNCTION(3, "SDA12"), 641 + MTK_FUNCTION(4, "DISP_PWM1"), 642 + MTK_FUNCTION(7, "JTRSTN_SEL1_VCORE") 643 + ), 644 + MTK_PIN( 645 + 56, "GPIO56", 646 + MTK_EINT_FUNCTION(0, 56), 647 + DRV_GRP4, 648 + MTK_FUNCTION(0, "GPIO56"), 649 + MTK_FUNCTION(1, "SPI0_CLK"), 650 + MTK_FUNCTION(7, "JTCK_SEL1_VCORE") 651 + ), 652 + MTK_PIN( 653 + 57, "GPIO57", 654 + MTK_EINT_FUNCTION(0, 57), 655 + DRV_GRP4, 656 + MTK_FUNCTION(0, "GPIO57"), 657 + MTK_FUNCTION(1, "SPI0_CSB"), 658 + MTK_FUNCTION(7, "JTMS_SEL1_VCORE") 659 + ), 660 + MTK_PIN( 661 + 58, "GPIO58", 662 + MTK_EINT_FUNCTION(0, 58), 663 + DRV_GRP4, 664 + MTK_FUNCTION(0, "GPIO58"), 665 + MTK_FUNCTION(1, "SPI0_MO"), 666 + MTK_FUNCTION(7, "JTDO_SEL1_VCORE") 667 + ), 668 + MTK_PIN( 669 + 59, "GPIO59", 670 + MTK_EINT_FUNCTION(0, 59), 671 + DRV_GRP4, 672 + MTK_FUNCTION(0, "GPIO59"), 673 + MTK_FUNCTION(1, "SPI0_MI"), 674 + MTK_FUNCTION(7, "JTDI_SEL1_VCORE") 675 + ), 676 + MTK_PIN( 677 + 60, "GPIO60", 678 + MTK_EINT_FUNCTION(0, 60), 679 + DRV_GRP4, 680 + MTK_FUNCTION(0, "GPIO60"), 681 + MTK_FUNCTION(1, "SCP_SPI1_CK"), 682 + MTK_FUNCTION(2, "SPI1_CLK"), 683 + MTK_FUNCTION(4, "SCP_SCL3"), 684 + MTK_FUNCTION(5, "TP_GPIO0_AO"), 685 + MTK_FUNCTION(6, "UTXD0"), 686 + MTK_FUNCTION(7, "TP_UTXD2_VLP") 687 + ), 688 + MTK_PIN( 689 + 61, "GPIO61", 690 + MTK_EINT_FUNCTION(0, 61), 691 + DRV_GRP4, 692 + MTK_FUNCTION(0, "GPIO61"), 693 + MTK_FUNCTION(1, "SCP_SPI1_CS"), 694 + MTK_FUNCTION(2, "SPI1_CSB"), 695 + MTK_FUNCTION(5, "TP_GPIO1_AO"), 696 + MTK_FUNCTION(6, "URXD0"), 697 + MTK_FUNCTION(7, "TP_URXD2_VLP") 698 + ), 699 + MTK_PIN( 700 + 62, "GPIO62", 701 + MTK_EINT_FUNCTION(0, 62), 702 + DRV_GRP4, 703 + MTK_FUNCTION(0, "GPIO62"), 704 + MTK_FUNCTION(1, "SCP_SPI1_MO"), 705 + MTK_FUNCTION(2, "SPI1_MO"), 706 + MTK_FUNCTION(3, "SCP_SCL3"), 707 + MTK_FUNCTION(4, "SCP_SDA3"), 708 + MTK_FUNCTION(5, "TP_GPIO2_AO"), 709 + MTK_FUNCTION(7, "DBG_MON_B29") 710 + ), 711 + MTK_PIN( 712 + 63, "GPIO63", 713 + MTK_EINT_FUNCTION(0, 63), 714 + DRV_GRP4, 715 + MTK_FUNCTION(0, "GPIO63"), 716 + MTK_FUNCTION(1, "SCP_SPI1_MI"), 717 + MTK_FUNCTION(2, "SPI1_MI"), 718 + MTK_FUNCTION(3, "SCP_SDA3"), 719 + MTK_FUNCTION(5, "TP_GPIO3_AO"), 720 + MTK_FUNCTION(7, "DBG_MON_B30") 721 + ), 722 + MTK_PIN( 723 + 64, "GPIO64", 724 + MTK_EINT_FUNCTION(0, 64), 725 + DRV_GRP4, 726 + MTK_FUNCTION(0, "GPIO64"), 727 + MTK_FUNCTION(1, "SCP_SPI2_CK"), 728 + MTK_FUNCTION(2, "SPI2_CLK"), 729 + MTK_FUNCTION(4, "SCP_SCL2"), 730 + MTK_FUNCTION(5, "TP_GPIO4_AO") 731 + ), 732 + MTK_PIN( 733 + 65, "GPIO65", 734 + MTK_EINT_FUNCTION(0, 65), 735 + DRV_GRP4, 736 + MTK_FUNCTION(0, "GPIO65"), 737 + MTK_FUNCTION(1, "SCP_SPI2_CS"), 738 + MTK_FUNCTION(2, "SPI2_CSB"), 739 + MTK_FUNCTION(5, "TP_GPIO5_AO"), 740 + MTK_FUNCTION(7, "DBG_MON_B31") 741 + ), 742 + MTK_PIN( 743 + 66, "GPIO66", 744 + MTK_EINT_FUNCTION(0, 66), 745 + DRV_GRP4, 746 + MTK_FUNCTION(0, "GPIO66"), 747 + MTK_FUNCTION(1, "SCP_SPI2_MO"), 748 + MTK_FUNCTION(2, "SPI2_MO"), 749 + MTK_FUNCTION(3, "SCP_SCL2"), 750 + MTK_FUNCTION(4, "SCP_SDA2"), 751 + MTK_FUNCTION(5, "TP_GPIO6_AO") 752 + ), 753 + MTK_PIN( 754 + 67, "GPIO67", 755 + MTK_EINT_FUNCTION(0, 67), 756 + DRV_GRP4, 757 + MTK_FUNCTION(0, "GPIO67"), 758 + MTK_FUNCTION(1, "SCP_SPI2_MI"), 759 + MTK_FUNCTION(2, "SPI2_MI"), 760 + MTK_FUNCTION(3, "SCP_SDA2"), 761 + MTK_FUNCTION(5, "TP_GPIO7_AO") 762 + ), 763 + MTK_PIN( 764 + 68, "GPIO68", 765 + MTK_EINT_FUNCTION(0, 68), 766 + DRV_GRP4, 767 + MTK_FUNCTION(0, "GPIO68"), 768 + MTK_FUNCTION(1, "SCP_SPI3_CK"), 769 + MTK_FUNCTION(2, "SPI3_CLK"), 770 + MTK_FUNCTION(3, "MD_INT4"), 771 + MTK_FUNCTION(4, "SCP_SCL4"), 772 + MTK_FUNCTION(5, "TP_GPIO8_AO"), 773 + MTK_FUNCTION(7, "DBG_MON_A19") 774 + ), 775 + MTK_PIN( 776 + 69, "GPIO69", 777 + MTK_EINT_FUNCTION(0, 69), 778 + DRV_GRP4, 779 + MTK_FUNCTION(0, "GPIO69"), 780 + MTK_FUNCTION(1, "SCP_SPI3_CS"), 781 + MTK_FUNCTION(2, "SPI3_CSB"), 782 + MTK_FUNCTION(3, "MD_INT3"), 783 + MTK_FUNCTION(5, "TP_GPIO9_AO"), 784 + MTK_FUNCTION(7, "DBG_MON_A20") 785 + ), 786 + MTK_PIN( 787 + 70, "GPIO70", 788 + MTK_EINT_FUNCTION(0, 70), 789 + DRV_GRP4, 790 + MTK_FUNCTION(0, "GPIO70"), 791 + MTK_FUNCTION(1, "SCP_SPI3_MO"), 792 + MTK_FUNCTION(2, "SPI3_MO"), 793 + MTK_FUNCTION(3, "SCP_SCL4"), 794 + MTK_FUNCTION(4, "SCP_SDA4"), 795 + MTK_FUNCTION(5, "TP_GPIO10_AO"), 796 + MTK_FUNCTION(7, "DBG_MON_A21") 797 + ), 798 + MTK_PIN( 799 + 71, "GPIO71", 800 + MTK_EINT_FUNCTION(0, 71), 801 + DRV_GRP4, 802 + MTK_FUNCTION(0, "GPIO71"), 803 + MTK_FUNCTION(1, "SCP_SPI3_MI"), 804 + MTK_FUNCTION(2, "SPI3_MI"), 805 + MTK_FUNCTION(3, "SCP_SDA4"), 806 + MTK_FUNCTION(4, "MD_INT0"), 807 + MTK_FUNCTION(5, "TP_GPIO11_AO"), 808 + MTK_FUNCTION(7, "DBG_MON_A22") 809 + ), 810 + MTK_PIN( 811 + 72, "GPIO72", 812 + MTK_EINT_FUNCTION(0, 72), 813 + DRV_GRP4, 814 + MTK_FUNCTION(0, "GPIO72"), 815 + MTK_FUNCTION(1, "SPI5_CLK"), 816 + MTK_FUNCTION(2, "SCP_SPI0_CK"), 817 + MTK_FUNCTION(3, "UCTS2"), 818 + MTK_FUNCTION(4, "MBISTREADEN_TRIGGER"), 819 + MTK_FUNCTION(5, "TP_GPIO12_AO"), 820 + MTK_FUNCTION(6, "EXTIF0_ACT"), 821 + MTK_FUNCTION(7, "DAP_SONIC_SWCK") 822 + ), 823 + MTK_PIN( 824 + 73, "GPIO73", 825 + MTK_EINT_FUNCTION(0, 73), 826 + DRV_GRP4, 827 + MTK_FUNCTION(0, "GPIO73"), 828 + MTK_FUNCTION(1, "SPI5_CSB"), 829 + MTK_FUNCTION(2, "SCP_SPI0_CS"), 830 + MTK_FUNCTION(3, "URTS2"), 831 + MTK_FUNCTION(4, "MBISTWRITEEN_TRIGGER"), 832 + MTK_FUNCTION(5, "TP_GPIO13_AO"), 833 + MTK_FUNCTION(6, "EXTIF0_PRI"), 834 + MTK_FUNCTION(7, "DAP_SONIC_SWD") 835 + ), 836 + MTK_PIN( 837 + 74, "GPIO74", 838 + MTK_EINT_FUNCTION(0, 74), 839 + DRV_GRP4, 840 + MTK_FUNCTION(0, "GPIO74"), 841 + MTK_FUNCTION(1, "SPI5_MO"), 842 + MTK_FUNCTION(2, "SCP_SPI0_MO"), 843 + MTK_FUNCTION(3, "UTXD2"), 844 + MTK_FUNCTION(4, "TP_UTXD2_VCORE"), 845 + MTK_FUNCTION(5, "TP_GPIO14_AO"), 846 + MTK_FUNCTION(6, "EXTIF0_GNT_B"), 847 + MTK_FUNCTION(7, "DAP_MD32_SWCK") 848 + ), 849 + MTK_PIN( 850 + 75, "GPIO75", 851 + MTK_EINT_FUNCTION(0, 75), 852 + DRV_GRP4, 853 + MTK_FUNCTION(0, "GPIO75"), 854 + MTK_FUNCTION(1, "SPI5_MI"), 855 + MTK_FUNCTION(2, "SCP_SPI0_MI"), 856 + MTK_FUNCTION(3, "URXD2"), 857 + MTK_FUNCTION(4, "TP_URXD2_VCORE"), 858 + MTK_FUNCTION(5, "TP_GPIO15_AO"), 859 + MTK_FUNCTION(7, "DAP_MD32_SWD") 860 + ), 861 + MTK_PIN( 862 + 76, "GPIO76", 863 + MTK_EINT_FUNCTION(0, 76), 864 + DRV_GRP4, 865 + MTK_FUNCTION(0, "GPIO76"), 866 + MTK_FUNCTION(1, "AP_GOOD"), 867 + MTK_FUNCTION(3, "CONN_WIFI_TXD"), 868 + MTK_FUNCTION(4, "GPS_PPS"), 869 + MTK_FUNCTION(5, "PMSR_SMAP"), 870 + MTK_FUNCTION(6, "AGPS_SYNC") 871 + ), 872 + MTK_PIN( 873 + 77, "GPIO77", 874 + MTK_EINT_FUNCTION(0, 77), 875 + DRV_GRP4, 876 + MTK_FUNCTION(0, "GPIO77"), 877 + MTK_FUNCTION(1, "MSDC1_CLK"), 878 + MTK_FUNCTION(2, "MD1_SIM2_SCLK"), 879 + MTK_FUNCTION(3, "UDI_TCK"), 880 + MTK_FUNCTION(4, "CONN_DSP_JCK"), 881 + MTK_FUNCTION(6, "TSFDC_EN"), 882 + MTK_FUNCTION(7, "SSPM_JTAG_TCK_VCORE") 883 + ), 884 + MTK_PIN( 885 + 78, "GPIO78", 886 + MTK_EINT_FUNCTION(0, 78), 887 + DRV_GRP4, 888 + MTK_FUNCTION(0, "GPIO78"), 889 + MTK_FUNCTION(1, "MSDC1_CMD"), 890 + MTK_FUNCTION(2, "CONN_WF_MCU_AICE_TMSC"), 891 + MTK_FUNCTION(3, "UDI_TMS"), 892 + MTK_FUNCTION(4, "CONN_DSP_JMS"), 893 + MTK_FUNCTION(6, "TSFDC_VCO_RST"), 894 + MTK_FUNCTION(7, "SSPM_JTAG_TMS_VCORE") 895 + ), 896 + MTK_PIN( 897 + 79, "GPIO79", 898 + MTK_EINT_FUNCTION(0, 79), 899 + DRV_GRP4, 900 + MTK_FUNCTION(0, "GPIO79"), 901 + MTK_FUNCTION(1, "MSDC1_DAT0"), 902 + MTK_FUNCTION(2, "MD1_SIM2_SRST"), 903 + MTK_FUNCTION(3, "UDI_TDI"), 904 + MTK_FUNCTION(4, "CONN_DSP_JDI"), 905 + MTK_FUNCTION(6, "TSFDC_TSSEL2"), 906 + MTK_FUNCTION(7, "SSPM_JTAG_TDI_VCORE") 907 + ), 908 + MTK_PIN( 909 + 80, "GPIO80", 910 + MTK_EINT_FUNCTION(0, 80), 911 + DRV_GRP4, 912 + MTK_FUNCTION(0, "GPIO80"), 913 + MTK_FUNCTION(1, "MSDC1_DAT1"), 914 + MTK_FUNCTION(2, "MD1_SIM2_SIO"), 915 + MTK_FUNCTION(3, "UDI_TDO"), 916 + MTK_FUNCTION(4, "CONN_DSP_JDO"), 917 + MTK_FUNCTION(6, "TSFDC_TSSEL1"), 918 + MTK_FUNCTION(7, "SSPM_JTAG_TDO_VCORE") 919 + ), 920 + MTK_PIN( 921 + 81, "GPIO81", 922 + MTK_EINT_FUNCTION(0, 81), 923 + DRV_GRP4, 924 + MTK_FUNCTION(0, "GPIO81"), 925 + MTK_FUNCTION(1, "MSDC1_DAT2"), 926 + MTK_FUNCTION(2, "CONN_WF_MCU_AICE_TCKC"), 927 + MTK_FUNCTION(3, "UDI_NTRST"), 928 + MTK_FUNCTION(4, "CONN_BGF_MCU_AICE_TCKC"), 929 + MTK_FUNCTION(5, "MIPI3_D_SDATA"), 930 + MTK_FUNCTION(6, "TSFDC_TSSEL0"), 931 + MTK_FUNCTION(7, "SSPM_JTAG_TRSTN_VCORE") 932 + ), 933 + MTK_PIN( 934 + 82, "GPIO82", 935 + MTK_EINT_FUNCTION(0, 82), 936 + DRV_GRP4, 937 + MTK_FUNCTION(0, "GPIO82"), 938 + MTK_FUNCTION(1, "MSDC1_DAT3"), 939 + MTK_FUNCTION(3, "CONN_BGF_MCU_AICE_TMSC"), 940 + MTK_FUNCTION(4, "CONN_DSP_JINTP"), 941 + MTK_FUNCTION(5, "MIPI3_D_SCLK"), 942 + MTK_FUNCTION(6, "TSFDC_RCK_SELB") 943 + ), 944 + MTK_PIN( 945 + 83, "GPIO83", 946 + MTK_EINT_FUNCTION(0, 83), 947 + DRV_GRP4, 948 + MTK_FUNCTION(0, "GPIO83"), 949 + MTK_FUNCTION(1, "MD1_SIM1_SCLK"), 950 + MTK_FUNCTION(6, "TSFDC_26M") 951 + ), 952 + MTK_PIN( 953 + 84, "GPIO84", 954 + MTK_EINT_FUNCTION(0, 84), 955 + DRV_GRP4, 956 + MTK_FUNCTION(0, "GPIO84"), 957 + MTK_FUNCTION(1, "MD1_SIM1_SRST"), 958 + MTK_FUNCTION(3, "SPM_JTAG_TCK_VCORE"), 959 + MTK_FUNCTION(4, "APU_JTAG_TCK"), 960 + MTK_FUNCTION(6, "TSFDC_SDO"), 961 + MTK_FUNCTION(7, "CONN_DSP_L5_JCK") 962 + ), 963 + MTK_PIN( 964 + 85, "GPIO85", 965 + MTK_EINT_FUNCTION(0, 85), 966 + DRV_GRP4, 967 + MTK_FUNCTION(0, "GPIO85"), 968 + MTK_FUNCTION(1, "MD1_SIM1_SIO"), 969 + MTK_FUNCTION(3, "SPM_JTAG_TRSTN_VCORE"), 970 + MTK_FUNCTION(4, "APU_JTAG_TRST"), 971 + MTK_FUNCTION(6, "TSFDC_FOUT"), 972 + MTK_FUNCTION(7, "CONN_DSP_L5_JINTP") 973 + ), 974 + MTK_PIN( 975 + 86, "GPIO86", 976 + MTK_EINT_FUNCTION(0, 86), 977 + DRV_GRP4, 978 + MTK_FUNCTION(0, "GPIO86"), 979 + MTK_FUNCTION(1, "MD1_SIM2_SCLK"), 980 + MTK_FUNCTION(3, "SPM_JTAG_TDI_VCORE"), 981 + MTK_FUNCTION(4, "APU_JTAG_TDI"), 982 + MTK_FUNCTION(6, "TSFDC_SCK"), 983 + MTK_FUNCTION(7, "CONN_DSP_L5_JDI") 984 + ), 985 + MTK_PIN( 986 + 87, "GPIO87", 987 + MTK_EINT_FUNCTION(0, 87), 988 + DRV_GRP4, 989 + MTK_FUNCTION(0, "GPIO87"), 990 + MTK_FUNCTION(1, "MD1_SIM2_SRST"), 991 + MTK_FUNCTION(3, "SPM_JTAG_TMS_VCORE"), 992 + MTK_FUNCTION(4, "APU_JTAG_TMS"), 993 + MTK_FUNCTION(6, "TSFDC_SDI"), 994 + MTK_FUNCTION(7, "CONN_DSP_L5_JMS") 995 + ), 996 + MTK_PIN( 997 + 88, "GPIO88", 998 + MTK_EINT_FUNCTION(0, 88), 999 + DRV_GRP4, 1000 + MTK_FUNCTION(0, "GPIO88"), 1001 + MTK_FUNCTION(1, "MD1_SIM2_SIO"), 1002 + MTK_FUNCTION(3, "SPM_JTAG_TDO_VCORE"), 1003 + MTK_FUNCTION(4, "APU_JTAG_TDO"), 1004 + MTK_FUNCTION(6, "TSFDC_SCF"), 1005 + MTK_FUNCTION(7, "CONN_DSP_L5_JDO") 1006 + ), 1007 + MTK_PIN( 1008 + 89, "GPIO89", 1009 + MTK_EINT_FUNCTION(0, 89), 1010 + DRV_GRP4, 1011 + MTK_FUNCTION(0, "GPIO89"), 1012 + MTK_FUNCTION(1, "DSI_TE"), 1013 + MTK_FUNCTION(7, "DBG_MON_B8") 1014 + ), 1015 + MTK_PIN( 1016 + 90, "GPIO90", 1017 + MTK_EINT_FUNCTION(0, 90), 1018 + DRV_GRP4, 1019 + MTK_FUNCTION(0, "GPIO90"), 1020 + MTK_FUNCTION(1, "LCM_RST"), 1021 + MTK_FUNCTION(7, "DBG_MON_B9") 1022 + ), 1023 + MTK_PIN( 1024 + 91, "GPIO91", 1025 + MTK_EINT_FUNCTION(0, 91), 1026 + DRV_GRP4, 1027 + MTK_FUNCTION(0, "GPIO91"), 1028 + MTK_FUNCTION(1, "DISP_PWM"), 1029 + MTK_FUNCTION(7, "DBG_MON_B10") 1030 + ), 1031 + MTK_PIN( 1032 + 92, "GPIO92", 1033 + MTK_EINT_FUNCTION(0, 92), 1034 + DRV_GRP4, 1035 + MTK_FUNCTION(0, "GPIO92"), 1036 + MTK_FUNCTION(1, "CMMCLK0"), 1037 + MTK_FUNCTION(7, "DBG_MON_A23") 1038 + ), 1039 + MTK_PIN( 1040 + 93, "GPIO93", 1041 + MTK_EINT_FUNCTION(0, 93), 1042 + DRV_GRP4, 1043 + MTK_FUNCTION(0, "GPIO93"), 1044 + MTK_FUNCTION(1, "CMMCLK1"), 1045 + MTK_FUNCTION(7, "DBG_MON_A24") 1046 + ), 1047 + MTK_PIN( 1048 + 94, "GPIO94", 1049 + MTK_EINT_FUNCTION(0, 94), 1050 + DRV_GRP4, 1051 + MTK_FUNCTION(0, "GPIO94"), 1052 + MTK_FUNCTION(1, "CMMCLK2"), 1053 + MTK_FUNCTION(7, "DBG_MON_A25") 1054 + ), 1055 + MTK_PIN( 1056 + 95, "GPIO95", 1057 + MTK_EINT_FUNCTION(0, 95), 1058 + DRV_GRP4, 1059 + MTK_FUNCTION(0, "GPIO95"), 1060 + MTK_FUNCTION(1, "CMMCLK3"), 1061 + MTK_FUNCTION(5, "MD32_1_TXD"), 1062 + MTK_FUNCTION(6, "PTA_TXD"), 1063 + MTK_FUNCTION(7, "DBG_MON_A26") 1064 + ), 1065 + MTK_PIN( 1066 + 96, "GPIO96", 1067 + MTK_EINT_FUNCTION(0, 96), 1068 + DRV_GRP4, 1069 + MTK_FUNCTION(0, "GPIO96"), 1070 + MTK_FUNCTION(1, "CMMCLK4"), 1071 + MTK_FUNCTION(5, "MD32_1_RXD"), 1072 + MTK_FUNCTION(6, "PTA_RXD"), 1073 + MTK_FUNCTION(7, "DBG_MON_A27") 1074 + ), 1075 + MTK_PIN( 1076 + 97, "GPIO97", 1077 + MTK_EINT_FUNCTION(0, 97), 1078 + DRV_GRP4, 1079 + MTK_FUNCTION(0, "GPIO97"), 1080 + MTK_FUNCTION(1, "MD_UCNT_A_TGL") 1081 + ), 1082 + MTK_PIN( 1083 + 98, "GPIO98", 1084 + MTK_EINT_FUNCTION(0, 98), 1085 + DRV_GRP4, 1086 + MTK_FUNCTION(0, "GPIO98"), 1087 + MTK_FUNCTION(1, "DIGRF_IRQ") 1088 + ), 1089 + MTK_PIN( 1090 + 99, "GPIO99", 1091 + MTK_EINT_FUNCTION(0, 99), 1092 + DRV_GRP4, 1093 + MTK_FUNCTION(0, "GPIO99"), 1094 + MTK_FUNCTION(1, "BPI_BUS0"), 1095 + MTK_FUNCTION(4, "MFG_TSFDC_EN"), 1096 + MTK_FUNCTION(6, "ANT_SEL0"), 1097 + MTK_FUNCTION(7, "DBG_MON_B11") 1098 + ), 1099 + MTK_PIN( 1100 + 100, "GPIO100", 1101 + MTK_EINT_FUNCTION(0, 100), 1102 + DRV_GRP4, 1103 + MTK_FUNCTION(0, "GPIO100"), 1104 + MTK_FUNCTION(1, "BPI_BUS1"), 1105 + MTK_FUNCTION(4, "MFG_TSFDC_VCO_RST"), 1106 + MTK_FUNCTION(6, "ANT_SEL1"), 1107 + MTK_FUNCTION(7, "DBG_MON_B12") 1108 + ), 1109 + MTK_PIN( 1110 + 101, "GPIO101", 1111 + MTK_EINT_FUNCTION(0, 101), 1112 + DRV_GRP4, 1113 + MTK_FUNCTION(0, "GPIO101"), 1114 + MTK_FUNCTION(1, "BPI_BUS2"), 1115 + MTK_FUNCTION(3, "DMIC1_CLK"), 1116 + MTK_FUNCTION(4, "MFG_TSFDC_TSSEL2"), 1117 + MTK_FUNCTION(6, "ANT_SEL2"), 1118 + MTK_FUNCTION(7, "DBG_MON_B13") 1119 + ), 1120 + MTK_PIN( 1121 + 102, "GPIO102", 1122 + MTK_EINT_FUNCTION(0, 102), 1123 + DRV_GRP4, 1124 + MTK_FUNCTION(0, "GPIO102"), 1125 + MTK_FUNCTION(1, "BPI_BUS3"), 1126 + MTK_FUNCTION(3, "DMIC1_DAT"), 1127 + MTK_FUNCTION(4, "MFG_TSFDC_TSSEL1"), 1128 + MTK_FUNCTION(6, "ANT_SEL3"), 1129 + MTK_FUNCTION(7, "DBG_MON_B14") 1130 + ), 1131 + MTK_PIN( 1132 + 103, "GPIO103", 1133 + MTK_EINT_FUNCTION(0, 103), 1134 + DRV_GRP4, 1135 + MTK_FUNCTION(0, "GPIO103"), 1136 + MTK_FUNCTION(1, "BPI_BUS4"), 1137 + MTK_FUNCTION(4, "MFG_TSFDC_TSSEL0"), 1138 + MTK_FUNCTION(6, "ANT_SEL4"), 1139 + MTK_FUNCTION(7, "DBG_MON_B15") 1140 + ), 1141 + MTK_PIN( 1142 + 104, "GPIO104", 1143 + MTK_EINT_FUNCTION(0, 104), 1144 + DRV_GRP4, 1145 + MTK_FUNCTION(0, "GPIO104"), 1146 + MTK_FUNCTION(1, "BPI_BUS5"), 1147 + MTK_FUNCTION(4, "MFG_TSFDC_RCK_SELB"), 1148 + MTK_FUNCTION(6, "ANT_SEL5"), 1149 + MTK_FUNCTION(7, "DBG_MON_B16") 1150 + ), 1151 + MTK_PIN( 1152 + 105, "GPIO105", 1153 + MTK_EINT_FUNCTION(0, 105), 1154 + DRV_GRP4, 1155 + MTK_FUNCTION(0, "GPIO105"), 1156 + MTK_FUNCTION(1, "BPI_BUS6"), 1157 + MTK_FUNCTION(2, "CONN_BPI_BUS6"), 1158 + MTK_FUNCTION(6, "ANT_SEL6"), 1159 + MTK_FUNCTION(7, "DBG_MON_B17") 1160 + ), 1161 + MTK_PIN( 1162 + 106, "GPIO106", 1163 + MTK_EINT_FUNCTION(0, 106), 1164 + DRV_GRP4, 1165 + MTK_FUNCTION(0, "GPIO106"), 1166 + MTK_FUNCTION(1, "BPI_BUS7"), 1167 + MTK_FUNCTION(2, "CONN_BPI_BUS7"), 1168 + MTK_FUNCTION(4, "MFG_TSFDC_SDO"), 1169 + MTK_FUNCTION(5, "AUD_DAC_26M_CLK"), 1170 + MTK_FUNCTION(6, "ANT_SEL7"), 1171 + MTK_FUNCTION(7, "DBG_MON_B18") 1172 + ), 1173 + MTK_PIN( 1174 + 107, "GPIO107", 1175 + MTK_EINT_FUNCTION(0, 107), 1176 + DRV_GRP4, 1177 + MTK_FUNCTION(0, "GPIO107"), 1178 + MTK_FUNCTION(1, "BPI_BUS8"), 1179 + MTK_FUNCTION(2, "CONN_BPI_BUS8"), 1180 + MTK_FUNCTION(4, "MFG_TSFDC_FOUT"), 1181 + MTK_FUNCTION(5, "I2SOUT4_DATA0"), 1182 + MTK_FUNCTION(6, "ANT_SEL8"), 1183 + MTK_FUNCTION(7, "DBG_MON_B19") 1184 + ), 1185 + MTK_PIN( 1186 + 108, "GPIO108", 1187 + MTK_EINT_FUNCTION(0, 108), 1188 + DRV_GRP4, 1189 + MTK_FUNCTION(0, "GPIO108"), 1190 + MTK_FUNCTION(1, "BPI_BUS9"), 1191 + MTK_FUNCTION(2, "CONN_BPI_BUS9"), 1192 + MTK_FUNCTION(5, "I2SOUT4_DATA1"), 1193 + MTK_FUNCTION(6, "ANT_SEL9"), 1194 + MTK_FUNCTION(7, "DBG_MON_B20") 1195 + ), 1196 + MTK_PIN( 1197 + 109, "GPIO109", 1198 + MTK_EINT_FUNCTION(0, 109), 1199 + DRV_GRP4, 1200 + MTK_FUNCTION(0, "GPIO109"), 1201 + MTK_FUNCTION(1, "BPI_BUS10"), 1202 + MTK_FUNCTION(2, "CONN_BPI_BUS10"), 1203 + MTK_FUNCTION(5, "I2SOUT4_DATA2"), 1204 + MTK_FUNCTION(6, "ANT_SEL10"), 1205 + MTK_FUNCTION(7, "DBG_MON_B21") 1206 + ), 1207 + MTK_PIN( 1208 + 110, "GPIO110", 1209 + MTK_EINT_FUNCTION(0, 110), 1210 + DRV_GRP4, 1211 + MTK_FUNCTION(0, "GPIO110"), 1212 + MTK_FUNCTION(1, "BPI_BUS11"), 1213 + MTK_FUNCTION(2, "CONN_BPI_BUS11_OLAT0"), 1214 + MTK_FUNCTION(5, "I2SOUT4_DATA3"), 1215 + MTK_FUNCTION(6, "ANT_SEL11"), 1216 + MTK_FUNCTION(7, "DBG_MON_B22") 1217 + ), 1218 + MTK_PIN( 1219 + 111, "GPIO111", 1220 + MTK_EINT_FUNCTION(0, 111), 1221 + DRV_GRP4, 1222 + MTK_FUNCTION(0, "GPIO111"), 1223 + MTK_FUNCTION(1, "BPI_BUS12"), 1224 + MTK_FUNCTION(2, "CONN_BPI_BUS12_OLAT1"), 1225 + MTK_FUNCTION(3, "CLKM0"), 1226 + MTK_FUNCTION(5, "I2SIN4_BCK"), 1227 + MTK_FUNCTION(6, "ANT_SEL12"), 1228 + MTK_FUNCTION(7, "DBG_MON_B23") 1229 + ), 1230 + MTK_PIN( 1231 + 112, "GPIO112", 1232 + MTK_EINT_FUNCTION(0, 112), 1233 + DRV_GRP4, 1234 + MTK_FUNCTION(0, "GPIO112"), 1235 + MTK_FUNCTION(1, "BPI_BUS13"), 1236 + MTK_FUNCTION(2, "CONN_BPI_BUS13_OLAT2"), 1237 + MTK_FUNCTION(3, "CLKM1"), 1238 + MTK_FUNCTION(5, "I2SIN4_DATA0"), 1239 + MTK_FUNCTION(6, "ANT_SEL13"), 1240 + MTK_FUNCTION(7, "DBG_MON_B24") 1241 + ), 1242 + MTK_PIN( 1243 + 113, "GPIO113", 1244 + MTK_EINT_FUNCTION(0, 113), 1245 + DRV_GRP4, 1246 + MTK_FUNCTION(0, "GPIO113"), 1247 + MTK_FUNCTION(1, "BPI_BUS14"), 1248 + MTK_FUNCTION(2, "CONN_BPI_BUS14_OLAT3"), 1249 + MTK_FUNCTION(3, "CLKM2"), 1250 + MTK_FUNCTION(5, "I2SIN4_DATA1"), 1251 + MTK_FUNCTION(6, "ANT_SEL14"), 1252 + MTK_FUNCTION(7, "DBG_MON_B25") 1253 + ), 1254 + MTK_PIN( 1255 + 114, "GPIO114", 1256 + MTK_EINT_FUNCTION(0, 114), 1257 + DRV_GRP4, 1258 + MTK_FUNCTION(0, "GPIO114"), 1259 + MTK_FUNCTION(1, "BPI_BUS15"), 1260 + MTK_FUNCTION(2, "CONN_BPI_BUS15_OLAT4"), 1261 + MTK_FUNCTION(3, "CLKM3"), 1262 + MTK_FUNCTION(5, "I2SIN4_DATA2"), 1263 + MTK_FUNCTION(6, "ANT_SEL15"), 1264 + MTK_FUNCTION(7, "DBG_MON_B26") 1265 + ), 1266 + MTK_PIN( 1267 + 115, "GPIO115", 1268 + MTK_EINT_FUNCTION(0, 115), 1269 + DRV_GRP4, 1270 + MTK_FUNCTION(0, "GPIO115"), 1271 + MTK_FUNCTION(1, "BPI_BUS16"), 1272 + MTK_FUNCTION(2, "CONN_BPI_BUS16_OLAT5"), 1273 + MTK_FUNCTION(5, "I2SIN4_DATA3"), 1274 + MTK_FUNCTION(6, "ANT_SEL16"), 1275 + MTK_FUNCTION(7, "DBG_MON_B27") 1276 + ), 1277 + MTK_PIN( 1278 + 116, "GPIO116", 1279 + MTK_EINT_FUNCTION(0, 116), 1280 + DRV_GRP4, 1281 + MTK_FUNCTION(0, "GPIO116"), 1282 + MTK_FUNCTION(1, "BPI_BUS17"), 1283 + MTK_FUNCTION(2, "CONN_BPI_BUS17_ANT0"), 1284 + MTK_FUNCTION(5, "I2SIN4_LRCK"), 1285 + MTK_FUNCTION(6, "ANT_SEL17"), 1286 + MTK_FUNCTION(7, "DBG_MON_B28") 1287 + ), 1288 + MTK_PIN( 1289 + 117, "GPIO117", 1290 + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 1291 + DRV_GRP4, 1292 + MTK_FUNCTION(0, "GPIO117"), 1293 + MTK_FUNCTION(1, "MIPI0_D_SCLK"), 1294 + MTK_FUNCTION(2, "CONN_MIPI0_SCLK"), 1295 + MTK_FUNCTION(3, "BPI_BUS18"), 1296 + MTK_FUNCTION(6, "ANT_SEL18") 1297 + ), 1298 + MTK_PIN( 1299 + 118, "GPIO118", 1300 + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 1301 + DRV_GRP4, 1302 + MTK_FUNCTION(0, "GPIO118"), 1303 + MTK_FUNCTION(1, "MIPI0_D_SDATA"), 1304 + MTK_FUNCTION(2, "CONN_MIPI0_SDATA"), 1305 + MTK_FUNCTION(3, "BPI_BUS19"), 1306 + MTK_FUNCTION(6, "ANT_SEL19") 1307 + ), 1308 + MTK_PIN( 1309 + 119, "GPIO119", 1310 + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 1311 + DRV_GRP4, 1312 + MTK_FUNCTION(0, "GPIO119"), 1313 + MTK_FUNCTION(1, "MIPI1_D_SCLK"), 1314 + MTK_FUNCTION(2, "CONN_MIPI1_SCLK"), 1315 + MTK_FUNCTION(3, "BPI_BUS20"), 1316 + MTK_FUNCTION(6, "ANT_SEL20") 1317 + ), 1318 + MTK_PIN( 1319 + 120, "GPIO120", 1320 + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 1321 + DRV_GRP4, 1322 + MTK_FUNCTION(0, "GPIO120"), 1323 + MTK_FUNCTION(1, "MIPI1_D_SDATA"), 1324 + MTK_FUNCTION(2, "CONN_MIPI1_SDATA"), 1325 + MTK_FUNCTION(3, "BPI_BUS21"), 1326 + MTK_FUNCTION(6, "ANT_SEL21") 1327 + ), 1328 + MTK_PIN( 1329 + 121, "GPIO121", 1330 + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 1331 + DRV_GRP4, 1332 + MTK_FUNCTION(0, "GPIO121"), 1333 + MTK_FUNCTION(1, "MIPI2_D_SCLK"), 1334 + MTK_FUNCTION(2, "MIPI4_D_SCLK"), 1335 + MTK_FUNCTION(3, "BPI_BUS22"), 1336 + MTK_FUNCTION(6, "MD_GPS_L1_BLANK") 1337 + ), 1338 + MTK_PIN( 1339 + 122, "GPIO122", 1340 + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 1341 + DRV_GRP4, 1342 + MTK_FUNCTION(0, "GPIO122"), 1343 + MTK_FUNCTION(1, "MIPI2_D_SDATA"), 1344 + MTK_FUNCTION(2, "MIPI4_D_SDATA"), 1345 + MTK_FUNCTION(3, "BPI_BUS23"), 1346 + MTK_FUNCTION(6, "MD_GPS_L5_BLANK") 1347 + ), 1348 + MTK_PIN( 1349 + 123, "GPIO123", 1350 + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 1351 + DRV_GRP4, 1352 + MTK_FUNCTION(0, "GPIO123"), 1353 + MTK_FUNCTION(1, "MIPI_M_SCLK") 1354 + ), 1355 + MTK_PIN( 1356 + 124, "GPIO124", 1357 + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 1358 + DRV_GRP4, 1359 + MTK_FUNCTION(0, "GPIO124"), 1360 + MTK_FUNCTION(1, "MIPI_M_SDATA") 1361 + ), 1362 + MTK_PIN( 1363 + 125, "GPIO125", 1364 + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 1365 + DRV_GRP4, 1366 + MTK_FUNCTION(0, "GPIO125"), 1367 + MTK_FUNCTION(1, "SCL0"), 1368 + MTK_FUNCTION(2, "SCP_SCL4"), 1369 + MTK_FUNCTION(3, "TP_UTXD2_VLP"), 1370 + MTK_FUNCTION(4, "TP_UCTS1_VLP"), 1371 + MTK_FUNCTION(5, "TP_GPIO4_AO"), 1372 + MTK_FUNCTION(6, "UTXD2") 1373 + ), 1374 + MTK_PIN( 1375 + 126, "GPIO126", 1376 + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 1377 + DRV_GRP4, 1378 + MTK_FUNCTION(0, "GPIO126"), 1379 + MTK_FUNCTION(1, "SDA0"), 1380 + MTK_FUNCTION(2, "SCP_SDA4"), 1381 + MTK_FUNCTION(3, "TP_URXD2_VLP"), 1382 + MTK_FUNCTION(4, "TP_URTS1_VLP"), 1383 + MTK_FUNCTION(5, "TP_GPIO5_AO"), 1384 + MTK_FUNCTION(6, "URXD2") 1385 + ), 1386 + MTK_PIN( 1387 + 127, "GPIO127", 1388 + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 1389 + DRV_GRP4, 1390 + MTK_FUNCTION(0, "GPIO127"), 1391 + MTK_FUNCTION(1, "SCL1"), 1392 + MTK_FUNCTION(2, "SCP_SCL5"), 1393 + MTK_FUNCTION(3, "TP_UCTS2_VLP"), 1394 + MTK_FUNCTION(4, "TP_UTXD1_VLP"), 1395 + MTK_FUNCTION(5, "TP_GPIO6_AO"), 1396 + MTK_FUNCTION(6, "MD_MCIF_UTXD0") 1397 + ), 1398 + MTK_PIN( 1399 + 128, "GPIO128", 1400 + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 1401 + DRV_GRP4, 1402 + MTK_FUNCTION(0, "GPIO128"), 1403 + MTK_FUNCTION(1, "SDA1"), 1404 + MTK_FUNCTION(2, "SCP_SDA5"), 1405 + MTK_FUNCTION(3, "TP_URTS2_VLP"), 1406 + MTK_FUNCTION(4, "TP_URXD1_VLP"), 1407 + MTK_FUNCTION(5, "TP_GPIO7_AO"), 1408 + MTK_FUNCTION(6, "MD_MCIF_URXD0") 1409 + ), 1410 + MTK_PIN( 1411 + 129, "GPIO129", 1412 + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 1413 + DRV_GRP4, 1414 + MTK_FUNCTION(0, "GPIO129"), 1415 + MTK_FUNCTION(1, "SCL2") 1416 + ), 1417 + MTK_PIN( 1418 + 130, "GPIO130", 1419 + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 1420 + DRV_GRP4, 1421 + MTK_FUNCTION(0, "GPIO130"), 1422 + MTK_FUNCTION(1, "SDA2") 1423 + ), 1424 + MTK_PIN( 1425 + 131, "GPIO131", 1426 + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 1427 + DRV_GRP4, 1428 + MTK_FUNCTION(0, "GPIO131"), 1429 + MTK_FUNCTION(1, "SCL3"), 1430 + MTK_FUNCTION(3, "TP_UTXD2_VCORE"), 1431 + MTK_FUNCTION(6, "SSPM_UTXD_AO_VCORE") 1432 + ), 1433 + MTK_PIN( 1434 + 132, "GPIO132", 1435 + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 1436 + DRV_GRP4, 1437 + MTK_FUNCTION(0, "GPIO132"), 1438 + MTK_FUNCTION(1, "SDA3"), 1439 + MTK_FUNCTION(3, "TP_URXD2_VCORE"), 1440 + MTK_FUNCTION(6, "SSPM_URXD_AO_VCORE") 1441 + ), 1442 + MTK_PIN( 1443 + 133, "GPIO133", 1444 + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 1445 + DRV_GRP4, 1446 + MTK_FUNCTION(0, "GPIO133"), 1447 + MTK_FUNCTION(1, "SCL4") 1448 + ), 1449 + MTK_PIN( 1450 + 134, "GPIO134", 1451 + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 1452 + DRV_GRP4, 1453 + MTK_FUNCTION(0, "GPIO134"), 1454 + MTK_FUNCTION(1, "SDA4") 1455 + ), 1456 + MTK_PIN( 1457 + 135, "GPIO135", 1458 + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 1459 + DRV_GRP4, 1460 + MTK_FUNCTION(0, "GPIO135"), 1461 + MTK_FUNCTION(1, "SCL5") 1462 + ), 1463 + MTK_PIN( 1464 + 136, "GPIO136", 1465 + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 1466 + DRV_GRP4, 1467 + MTK_FUNCTION(0, "GPIO136"), 1468 + MTK_FUNCTION(1, "SDA5") 1469 + ), 1470 + MTK_PIN( 1471 + 137, "GPIO137", 1472 + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 1473 + DRV_GRP4, 1474 + MTK_FUNCTION(0, "GPIO137"), 1475 + MTK_FUNCTION(1, "SCL6") 1476 + ), 1477 + MTK_PIN( 1478 + 138, "GPIO138", 1479 + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 1480 + DRV_GRP4, 1481 + MTK_FUNCTION(0, "GPIO138"), 1482 + MTK_FUNCTION(1, "SDA6") 1483 + ), 1484 + MTK_PIN( 1485 + 139, "GPIO139", 1486 + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 1487 + DRV_GRP4, 1488 + MTK_FUNCTION(0, "GPIO139"), 1489 + MTK_FUNCTION(1, "SCL7"), 1490 + MTK_FUNCTION(3, "TP_UTXD1_VCORE"), 1491 + MTK_FUNCTION(4, "MD_UTXD0"), 1492 + MTK_FUNCTION(6, "UTXD1") 1493 + ), 1494 + MTK_PIN( 1495 + 140, "GPIO140", 1496 + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 1497 + DRV_GRP4, 1498 + MTK_FUNCTION(0, "GPIO140"), 1499 + MTK_FUNCTION(1, "SDA7"), 1500 + MTK_FUNCTION(3, "TP_URXD1_VCORE"), 1501 + MTK_FUNCTION(4, "MD_URXD0"), 1502 + MTK_FUNCTION(6, "URXD1") 1503 + ), 1504 + MTK_PIN( 1505 + 141, "GPIO141", 1506 + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 1507 + DRV_GRP4, 1508 + MTK_FUNCTION(0, "GPIO141"), 1509 + MTK_FUNCTION(1, "SCL8") 1510 + ), 1511 + MTK_PIN( 1512 + 142, "GPIO142", 1513 + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 1514 + DRV_GRP4, 1515 + MTK_FUNCTION(0, "GPIO142"), 1516 + MTK_FUNCTION(1, "SDA8") 1517 + ), 1518 + MTK_PIN( 1519 + 143, "GPIO143", 1520 + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 1521 + DRV_GRP4, 1522 + MTK_FUNCTION(0, "GPIO143"), 1523 + MTK_FUNCTION(1, "SCL9"), 1524 + MTK_FUNCTION(2, "GPS_L1_ELNA_EN"), 1525 + MTK_FUNCTION(3, "HFRP_UTXD1"), 1526 + MTK_FUNCTION(4, "CONN_BGF_MCU_AICE_TMSC"), 1527 + MTK_FUNCTION(5, "CONN_WF_MCU_AICE_TMSC"), 1528 + MTK_FUNCTION(7, "MBISTREADEN_TRIGGER") 1529 + ), 1530 + MTK_PIN( 1531 + 144, "GPIO144", 1532 + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 1533 + DRV_GRP4, 1534 + MTK_FUNCTION(0, "GPIO144"), 1535 + MTK_FUNCTION(1, "SDA9"), 1536 + MTK_FUNCTION(2, "GPS_L5_ELNA_EN"), 1537 + MTK_FUNCTION(3, "HFRP_URXD1"), 1538 + MTK_FUNCTION(4, "CONN_BGF_MCU_AICE_TCKC"), 1539 + MTK_FUNCTION(5, "CONN_WF_MCU_AICE_TCKC"), 1540 + MTK_FUNCTION(7, "MBISTWRITEEN_TRIGGER") 1541 + ), 1542 + MTK_PIN( 1543 + 145, "GPIO145", 1544 + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 1545 + DRV_GRP4, 1546 + MTK_FUNCTION(0, "GPIO145"), 1547 + MTK_FUNCTION(1, "SCL10"), 1548 + MTK_FUNCTION(2, "SCP_SCL0"), 1549 + MTK_FUNCTION(5, "TP_GPIO8_AO") 1550 + ), 1551 + MTK_PIN( 1552 + 146, "GPIO146", 1553 + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 1554 + DRV_GRP4, 1555 + MTK_FUNCTION(0, "GPIO146"), 1556 + MTK_FUNCTION(1, "SDA10"), 1557 + MTK_FUNCTION(2, "SCP_SDA0"), 1558 + MTK_FUNCTION(5, "TP_GPIO9_AO") 1559 + ), 1560 + MTK_PIN( 1561 + 147, "GPIO147", 1562 + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 1563 + DRV_GRP4, 1564 + MTK_FUNCTION(0, "GPIO147"), 1565 + MTK_FUNCTION(1, "SCL11"), 1566 + MTK_FUNCTION(2, "SCP_SCL1"), 1567 + MTK_FUNCTION(3, "SCP_DMIC_CLK"), 1568 + MTK_FUNCTION(4, "DMIC_CLK"), 1569 + MTK_FUNCTION(5, "TP_GPIO10_AO"), 1570 + MTK_FUNCTION(6, "EXTIF0_PRI") 1571 + ), 1572 + MTK_PIN( 1573 + 148, "GPIO148", 1574 + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 1575 + DRV_GRP4, 1576 + MTK_FUNCTION(0, "GPIO148"), 1577 + MTK_FUNCTION(1, "SDA11"), 1578 + MTK_FUNCTION(2, "SCP_SDA1"), 1579 + MTK_FUNCTION(3, "SCP_DMIC_DAT"), 1580 + MTK_FUNCTION(4, "DMIC_DAT"), 1581 + MTK_FUNCTION(5, "TP_GPIO11_AO"), 1582 + MTK_FUNCTION(6, "EXTIF0_GNT_B") 1583 + ), 1584 + MTK_PIN( 1585 + 149, "GPIO149", 1586 + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 1587 + DRV_GRP4, 1588 + MTK_FUNCTION(0, "GPIO149"), 1589 + MTK_FUNCTION(1, "KPROW2"), 1590 + MTK_FUNCTION(2, "PWM_VLP"), 1591 + MTK_FUNCTION(4, "MD_INT0"), 1592 + MTK_FUNCTION(5, "TP_GPIO12_AO"), 1593 + MTK_FUNCTION(6, "SCL0"), 1594 + MTK_FUNCTION(7, "DBG_MON_A28") 1595 + ), 1596 + MTK_PIN( 1597 + 150, "GPIO150", 1598 + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 1599 + DRV_GRP4, 1600 + MTK_FUNCTION(0, "GPIO150"), 1601 + MTK_FUNCTION(1, "KPCOL2"), 1602 + MTK_FUNCTION(2, "PWM_VLP"), 1603 + MTK_FUNCTION(3, "CMMCLK5"), 1604 + MTK_FUNCTION(4, "MD_INT3"), 1605 + MTK_FUNCTION(5, "TP_GPIO13_AO"), 1606 + MTK_FUNCTION(6, "SDA0") 1607 + ), 1608 + MTK_PIN( 1609 + 151, "GPIO151", 1610 + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 1611 + DRV_GRP4, 1612 + MTK_FUNCTION(0, "GPIO151"), 1613 + MTK_FUNCTION(1, "SRCLKENAI0"), 1614 + MTK_FUNCTION(4, "MD_INT4"), 1615 + MTK_FUNCTION(5, "TP_GPIO14_AO"), 1616 + MTK_FUNCTION(7, "DBG_MON_A29") 1617 + ), 1618 + MTK_PIN( 1619 + 152, "GPIO152", 1620 + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 1621 + DRV_GRP4, 1622 + MTK_FUNCTION(0, "GPIO152"), 1623 + MTK_FUNCTION(1, "SRCLKENAI1"), 1624 + MTK_FUNCTION(4, "SPMI_M_TRIG_FLAG"), 1625 + MTK_FUNCTION(5, "TP_GPIO15_AO"), 1626 + MTK_FUNCTION(7, "DBG_MON_A30") 1627 + ), 1628 + MTK_PIN( 1629 + 153, "GPIO153", 1630 + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 1631 + DRV_GRP4, 1632 + MTK_FUNCTION(0, "GPIO153"), 1633 + MTK_FUNCTION(1, "MD1_SIM2_SCLK"), 1634 + MTK_FUNCTION(2, "DISP_PWM1"), 1635 + MTK_FUNCTION(4, "SPMI_P_TRIG_FLAG"), 1636 + MTK_FUNCTION(7, "DBG_MON_A0") 1637 + ), 1638 + MTK_PIN( 1639 + 154, "GPIO154", 1640 + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 1641 + DRV_GRP4, 1642 + MTK_FUNCTION(0, "GPIO154"), 1643 + MTK_FUNCTION(1, "MD1_SIM2_SRST"), 1644 + MTK_FUNCTION(2, "LCM_RST1"), 1645 + MTK_FUNCTION(3, "GPS_L1_ELNA_EN"), 1646 + MTK_FUNCTION(4, "CMFLASH2"), 1647 + MTK_FUNCTION(5, "MBISTREADEN_TRIGGER"), 1648 + MTK_FUNCTION(7, "DBG_MON_A1") 1649 + ), 1650 + MTK_PIN( 1651 + 155, "GPIO155", 1652 + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 1653 + DRV_GRP4, 1654 + MTK_FUNCTION(0, "GPIO155"), 1655 + MTK_FUNCTION(1, "MD1_SIM2_SIO"), 1656 + MTK_FUNCTION(2, "DSI_TE1"), 1657 + MTK_FUNCTION(3, "GPS_L5_ELNA_EN"), 1658 + MTK_FUNCTION(4, "CMFLASH3"), 1659 + MTK_FUNCTION(5, "MBISTWRITEEN_TRIGGER"), 1660 + MTK_FUNCTION(7, "DBG_MON_A2") 1661 + ), 1662 + MTK_PIN( 1663 + 156, "GPIO156", 1664 + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 1665 + DRV_GRP4, 1666 + MTK_FUNCTION(0, "GPIO156"), 1667 + MTK_FUNCTION(1, "SPMI_M_SCL") 1668 + ), 1669 + MTK_PIN( 1670 + 157, "GPIO157", 1671 + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 1672 + DRV_GRP4, 1673 + MTK_FUNCTION(0, "GPIO157"), 1674 + MTK_FUNCTION(1, "SPMI_M_SDA") 1675 + ), 1676 + MTK_PIN( 1677 + 158, "GPIO158", 1678 + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 1679 + DRV_GRP4, 1680 + MTK_FUNCTION(0, "GPIO158"), 1681 + MTK_FUNCTION(1, "SPMI_P_SCL") 1682 + ), 1683 + MTK_PIN( 1684 + 159, "GPIO159", 1685 + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 1686 + DRV_GRP4, 1687 + MTK_FUNCTION(0, "GPIO159"), 1688 + MTK_FUNCTION(1, "SPMI_P_SDA") 1689 + ), 1690 + MTK_PIN( 1691 + 160, "GPIO160", 1692 + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 1693 + DRV_GRP4, 1694 + MTK_FUNCTION(0, "GPIO160"), 1695 + MTK_FUNCTION(1, "SRCLKENA0") 1696 + ), 1697 + MTK_PIN( 1698 + 161, "GPIO161", 1699 + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 1700 + DRV_GRP4, 1701 + MTK_FUNCTION(0, "GPIO161"), 1702 + MTK_FUNCTION(1, "SCP_VREQ_VAO") 1703 + ), 1704 + MTK_PIN( 1705 + 162, "GPIO162", 1706 + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 1707 + DRV_GRP4, 1708 + MTK_FUNCTION(0, "GPIO162"), 1709 + MTK_FUNCTION(1, "RTC32K_CK") 1710 + ), 1711 + MTK_PIN( 1712 + 163, "GPIO163", 1713 + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 1714 + DRV_GRP4, 1715 + MTK_FUNCTION(0, "GPIO163"), 1716 + MTK_FUNCTION(1, "WATCHDOG") 1717 + ), 1718 + MTK_PIN( 1719 + 164, "GPIO164", 1720 + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 1721 + DRV_GRP4, 1722 + MTK_FUNCTION(0, "GPIO164"), 1723 + MTK_FUNCTION(1, "AUD_CLK_MOSI"), 1724 + MTK_FUNCTION(3, "AUD_CLK_MOSI") 1725 + ), 1726 + MTK_PIN( 1727 + 165, "GPIO165", 1728 + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 1729 + DRV_GRP4, 1730 + MTK_FUNCTION(0, "GPIO165"), 1731 + MTK_FUNCTION(1, "AUD_SYNC_MOSI") 1732 + ), 1733 + MTK_PIN( 1734 + 166, "GPIO166", 1735 + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 1736 + DRV_GRP4, 1737 + MTK_FUNCTION(0, "GPIO166"), 1738 + MTK_FUNCTION(1, "AUD_DAT_MOSI0"), 1739 + MTK_FUNCTION(3, "AUD_DAT_MOSI0") 1740 + ), 1741 + MTK_PIN( 1742 + 167, "GPIO167", 1743 + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 1744 + DRV_GRP4, 1745 + MTK_FUNCTION(0, "GPIO167"), 1746 + MTK_FUNCTION(1, "AUD_DAT_MOSI1"), 1747 + MTK_FUNCTION(3, "AUD_DAT_MOSI1") 1748 + ), 1749 + MTK_PIN( 1750 + 168, "GPIO168", 1751 + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 1752 + DRV_GRP4, 1753 + MTK_FUNCTION(0, "GPIO168"), 1754 + MTK_FUNCTION(1, "AUD_NLE_MOSI0"), 1755 + MTK_FUNCTION(2, "AUD_SYNC_MISO") 1756 + ), 1757 + MTK_PIN( 1758 + 169, "GPIO169", 1759 + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 1760 + DRV_GRP4, 1761 + MTK_FUNCTION(0, "GPIO169"), 1762 + MTK_FUNCTION(1, "AUD_NLE_MOSI1"), 1763 + MTK_FUNCTION(2, "AUD_CLK_MISO"), 1764 + MTK_FUNCTION(3, "AUD_CLK_MISO") 1765 + ), 1766 + MTK_PIN( 1767 + 170, "GPIO170", 1768 + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 1769 + DRV_GRP4, 1770 + MTK_FUNCTION(0, "GPIO170"), 1771 + MTK_FUNCTION(1, "AUD_DAT_MISO0"), 1772 + MTK_FUNCTION(2, "VOW_DAT_MISO"), 1773 + MTK_FUNCTION(3, "AUD_DAT_MISO0") 1774 + ), 1775 + MTK_PIN( 1776 + 171, "GPIO171", 1777 + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 1778 + DRV_GRP4, 1779 + MTK_FUNCTION(0, "GPIO171"), 1780 + MTK_FUNCTION(1, "AUD_DAT_MISO1"), 1781 + MTK_FUNCTION(2, "VOW_CLK_MISO"), 1782 + MTK_FUNCTION(3, "AUD_DAT_MISO1") 1783 + ), 1784 + MTK_PIN( 1785 + 172, "GPIO172", 1786 + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 1787 + DRV_GRP4, 1788 + MTK_FUNCTION(0, "GPIO172"), 1789 + MTK_FUNCTION(1, "CONN_TOP_CLK"), 1790 + MTK_FUNCTION(7, "DBG_MON_A31") 1791 + ), 1792 + MTK_PIN( 1793 + 173, "GPIO173", 1794 + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 1795 + DRV_GRP4, 1796 + MTK_FUNCTION(0, "GPIO173"), 1797 + MTK_FUNCTION(1, "CONN_TOP_DATA") 1798 + ), 1799 + MTK_PIN( 1800 + 174, "GPIO174", 1801 + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 1802 + DRV_GRP4, 1803 + MTK_FUNCTION(0, "GPIO174"), 1804 + MTK_FUNCTION(1, "CONN_BT_CLK") 1805 + ), 1806 + MTK_PIN( 1807 + 175, "GPIO175", 1808 + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 1809 + DRV_GRP4, 1810 + MTK_FUNCTION(0, "GPIO175"), 1811 + MTK_FUNCTION(1, "CONN_BT_DATA") 1812 + ), 1813 + MTK_PIN( 1814 + 176, "GPIO176", 1815 + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 1816 + DRV_GRP4, 1817 + MTK_FUNCTION(0, "GPIO176"), 1818 + MTK_FUNCTION(1, "CONN_HRST_B") 1819 + ), 1820 + MTK_PIN( 1821 + 177, "GPIO177", 1822 + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 1823 + DRV_GRP4, 1824 + MTK_FUNCTION(0, "GPIO177"), 1825 + MTK_FUNCTION(1, "CONN_WB_PTA") 1826 + ), 1827 + MTK_PIN( 1828 + 178, "GPIO178", 1829 + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 1830 + DRV_GRP4, 1831 + MTK_FUNCTION(0, "GPIO178"), 1832 + MTK_FUNCTION(1, "CONN_WF_CTRL0") 1833 + ), 1834 + MTK_PIN( 1835 + 179, "GPIO179", 1836 + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 1837 + DRV_GRP4, 1838 + MTK_FUNCTION(0, "GPIO179"), 1839 + MTK_FUNCTION(1, "CONN_WF_CTRL1") 1840 + ), 1841 + MTK_PIN( 1842 + 180, "GPIO180", 1843 + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 1844 + DRV_GRP4, 1845 + MTK_FUNCTION(0, "GPIO180"), 1846 + MTK_FUNCTION(1, "CONN_WF_CTRL2") 1847 + ), 1848 + MTK_PIN( 1849 + 181, "GPIO181", 1850 + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 1851 + DRV_GRP4, 1852 + MTK_FUNCTION(0, "GPIO181"), 1853 + MTK_FUNCTION(1, "CONN_WF_CTRL3"), 1854 + MTK_FUNCTION(2, "CONN_TOP_CLK_2"), 1855 + MTK_FUNCTION(3, "GPS_L1_ELNA_EN") 1856 + ), 1857 + MTK_PIN( 1858 + 182, "GPIO182", 1859 + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 1860 + DRV_GRP4, 1861 + MTK_FUNCTION(0, "GPIO182"), 1862 + MTK_FUNCTION(1, "CONN_WF_CTRL4"), 1863 + MTK_FUNCTION(2, "CONN_TOP_DATA_2"), 1864 + MTK_FUNCTION(3, "GPS_L5_ELNA_EN") 1865 + ), 1866 + MTK_PIN( 1867 + 183, "GPIO183", 1868 + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 1869 + DRV_GRP4, 1870 + MTK_FUNCTION(0, "GPIO183"), 1871 + MTK_FUNCTION(1, "CONN_HRST_B_2") 1872 + ), 1873 + MTK_PIN( 1874 + 184, "GPIO184", 1875 + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 1876 + DRV_GRP4, 1877 + MTK_FUNCTION(0, "GPIO184"), 1878 + MTK_FUNCTION(1, "MSDC0_DSL"), 1879 + MTK_FUNCTION(3, "ANT_SEL13") 1880 + ), 1881 + MTK_PIN( 1882 + 185, "GPIO185", 1883 + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 1884 + DRV_GRP4, 1885 + MTK_FUNCTION(0, "GPIO185"), 1886 + MTK_FUNCTION(1, "MSDC0_CLK"), 1887 + MTK_FUNCTION(2, "CONN_TCXOENA_REQ"), 1888 + MTK_FUNCTION(3, "ANT_SEL14") 1889 + ), 1890 + MTK_PIN( 1891 + 186, "GPIO186", 1892 + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 1893 + DRV_GRP4, 1894 + MTK_FUNCTION(0, "GPIO186"), 1895 + MTK_FUNCTION(1, "MSDC0_CMD"), 1896 + MTK_FUNCTION(2, "GPS_L1_ELNA_EN"), 1897 + MTK_FUNCTION(3, "ANT_SEL15"), 1898 + MTK_FUNCTION(5, "I2SOUT4_DATA0") 1899 + ), 1900 + MTK_PIN( 1901 + 187, "GPIO187", 1902 + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 1903 + DRV_GRP4, 1904 + MTK_FUNCTION(0, "GPIO187"), 1905 + MTK_FUNCTION(1, "MSDC0_RSTB"), 1906 + MTK_FUNCTION(2, "GPS_L5_ELNA_EN"), 1907 + MTK_FUNCTION(3, "ANT_SEL16"), 1908 + MTK_FUNCTION(5, "I2SOUT4_DATA1") 1909 + ), 1910 + MTK_PIN( 1911 + 188, "GPIO188", 1912 + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 1913 + DRV_GRP4, 1914 + MTK_FUNCTION(0, "GPIO188"), 1915 + MTK_FUNCTION(1, "MSDC0_DAT0"), 1916 + MTK_FUNCTION(3, "ANT_SEL17"), 1917 + MTK_FUNCTION(5, "I2SOUT4_DATA2") 1918 + ), 1919 + MTK_PIN( 1920 + 189, "GPIO189", 1921 + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 1922 + DRV_GRP4, 1923 + MTK_FUNCTION(0, "GPIO189"), 1924 + MTK_FUNCTION(1, "MSDC0_DAT1"), 1925 + MTK_FUNCTION(3, "ANT_SEL18"), 1926 + MTK_FUNCTION(5, "I2SOUT4_DATA3") 1927 + ), 1928 + MTK_PIN( 1929 + 190, "GPIO190", 1930 + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 1931 + DRV_GRP4, 1932 + MTK_FUNCTION(0, "GPIO190"), 1933 + MTK_FUNCTION(1, "MSDC0_DAT2"), 1934 + MTK_FUNCTION(2, "DMIC1_CLK"), 1935 + MTK_FUNCTION(3, "ANT_SEL19"), 1936 + MTK_FUNCTION(5, "I2SIN4_BCK") 1937 + ), 1938 + MTK_PIN( 1939 + 191, "GPIO191", 1940 + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 1941 + DRV_GRP4, 1942 + MTK_FUNCTION(0, "GPIO191"), 1943 + MTK_FUNCTION(1, "MSDC0_DAT3"), 1944 + MTK_FUNCTION(2, "DMIC1_DAT"), 1945 + MTK_FUNCTION(3, "ANT_SEL20"), 1946 + MTK_FUNCTION(5, "I2SIN4_DATA0") 1947 + ), 1948 + MTK_PIN( 1949 + 192, "GPIO192", 1950 + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 1951 + DRV_GRP4, 1952 + MTK_FUNCTION(0, "GPIO192"), 1953 + MTK_FUNCTION(1, "MSDC0_DAT4"), 1954 + MTK_FUNCTION(2, "IDDIG"), 1955 + MTK_FUNCTION(3, "ANT_SEL21"), 1956 + MTK_FUNCTION(4, "UFS_MPHY_SCL"), 1957 + MTK_FUNCTION(5, "I2SIN4_DATA1") 1958 + ), 1959 + MTK_PIN( 1960 + 193, "GPIO193", 1961 + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 1962 + DRV_GRP4, 1963 + MTK_FUNCTION(0, "GPIO193"), 1964 + MTK_FUNCTION(1, "MSDC0_DAT5"), 1965 + MTK_FUNCTION(2, "USB_DRVVBUS"), 1966 + MTK_FUNCTION(4, "UFS_MPHY_SDA"), 1967 + MTK_FUNCTION(5, "I2SIN4_DATA2") 1968 + ), 1969 + MTK_PIN( 1970 + 194, "GPIO194", 1971 + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 1972 + DRV_GRP4, 1973 + MTK_FUNCTION(0, "GPIO194"), 1974 + MTK_FUNCTION(1, "MSDC0_DAT6"), 1975 + MTK_FUNCTION(2, "VBUSVALID"), 1976 + MTK_FUNCTION(5, "I2SIN4_DATA3") 1977 + ), 1978 + MTK_PIN( 1979 + 195, "GPIO195", 1980 + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 1981 + DRV_GRP4, 1982 + MTK_FUNCTION(0, "GPIO195"), 1983 + MTK_FUNCTION(1, "MSDC0_DAT7"), 1984 + MTK_FUNCTION(5, "I2SIN4_LRCK") 1985 + ), 1986 + MTK_PIN( 1987 + 196, "GPIO196", 1988 + MTK_EINT_FUNCTION(0, 196), 1989 + DRV_GRP4, 1990 + MTK_FUNCTION(0, NULL) 1991 + ), 1992 + MTK_PIN( 1993 + 197, "GPIO197", 1994 + MTK_EINT_FUNCTION(0, 197), 1995 + DRV_GRP4, 1996 + MTK_FUNCTION(0, NULL) 1997 + ), 1998 + MTK_PIN( 1999 + 198, "GPIO198", 2000 + MTK_EINT_FUNCTION(0, 198), 2001 + DRV_GRP4, 2002 + MTK_FUNCTION(0, NULL) 2003 + ), 2004 + MTK_PIN( 2005 + 199, "GPIO199", 2006 + MTK_EINT_FUNCTION(0, 199), 2007 + DRV_GRP4, 2008 + MTK_FUNCTION(0, NULL) 2009 + ), 2010 + MTK_PIN( 2011 + 200, "GPIO200", 2012 + MTK_EINT_FUNCTION(0, 200), 2013 + DRV_GRP4, 2014 + MTK_FUNCTION(0, NULL) 2015 + ), 2016 + MTK_PIN( 2017 + 201, "GPIO201", 2018 + MTK_EINT_FUNCTION(0, 201), 2019 + DRV_GRP4, 2020 + MTK_FUNCTION(0, NULL) 2021 + ), 2022 + MTK_PIN( 2023 + 202, "GPIO202", 2024 + MTK_EINT_FUNCTION(0, 202), 2025 + DRV_GRP4, 2026 + MTK_FUNCTION(0, NULL) 2027 + ), 2028 + MTK_PIN( 2029 + 203, "GPIO203", 2030 + MTK_EINT_FUNCTION(0, 203), 2031 + DRV_GRP4, 2032 + MTK_FUNCTION(0, NULL) 2033 + ), 2034 + MTK_PIN( 2035 + 204, "GPIO204", 2036 + MTK_EINT_FUNCTION(0, 204), 2037 + DRV_GRP4, 2038 + MTK_FUNCTION(0, NULL) 2039 + ), 2040 + MTK_PIN( 2041 + 205, "GPIO205", 2042 + MTK_EINT_FUNCTION(0, 205), 2043 + DRV_GRP4, 2044 + MTK_FUNCTION(0, NULL) 2045 + ), 2046 + MTK_PIN( 2047 + 206, "GPIO206", 2048 + MTK_EINT_FUNCTION(0, 206), 2049 + DRV_GRP4, 2050 + MTK_FUNCTION(0, NULL) 2051 + ), 2052 + MTK_PIN( 2053 + 207, "GPIO207", 2054 + MTK_EINT_FUNCTION(0, 207), 2055 + DRV_GRP4, 2056 + MTK_FUNCTION(0, NULL) 2057 + ), 2058 + MTK_PIN( 2059 + 208, "GPIO208", 2060 + MTK_EINT_FUNCTION(0, 208), 2061 + DRV_GRP4, 2062 + MTK_FUNCTION(0, NULL) 2063 + ), 2064 + MTK_PIN( 2065 + 209, "GPIO209", 2066 + MTK_EINT_FUNCTION(0, 209), 2067 + DRV_GRP4, 2068 + MTK_FUNCTION(0, NULL) 2069 + ), 2070 + MTK_PIN( 2071 + 210, "GPIO210", 2072 + MTK_EINT_FUNCTION(0, 210), 2073 + DRV_GRP4, 2074 + MTK_FUNCTION(0, NULL) 2075 + ), 2076 + MTK_PIN( 2077 + 211, "GPIO211", 2078 + MTK_EINT_FUNCTION(0, 211), 2079 + DRV_GRP4, 2080 + MTK_FUNCTION(0, NULL) 2081 + ), 2082 + MTK_PIN( 2083 + 212, "GPIO212", 2084 + MTK_EINT_FUNCTION(0, 212), 2085 + DRV_GRP4, 2086 + MTK_FUNCTION(0, NULL) 2087 + ), 2088 + MTK_PIN( 2089 + 213, "GPIO213", 2090 + MTK_EINT_FUNCTION(0, 213), 2091 + DRV_GRP4, 2092 + MTK_FUNCTION(0, NULL) 2093 + ), 2094 + MTK_PIN( 2095 + 214, "GPIO214", 2096 + MTK_EINT_FUNCTION(0, 214), 2097 + DRV_GRP4, 2098 + MTK_FUNCTION(0, NULL) 2099 + ), 2100 + MTK_PIN( 2101 + 215, "GPIO215", 2102 + MTK_EINT_FUNCTION(0, 215), 2103 + DRV_GRP4, 2104 + MTK_FUNCTION(0, NULL) 2105 + ), 2106 + }; 2107 + 2108 + static struct mtk_eint_pin eint_pins_mt6878[] = { 2109 + MTK_EINT_PIN(0, 0, 0, 1), 2110 + MTK_EINT_PIN(1, 0, 1, 1), 2111 + MTK_EINT_PIN(2, 0, 2, 1), 2112 + MTK_EINT_PIN(3, 0, 3, 1), 2113 + MTK_EINT_PIN(4, 0, 4, 1), 2114 + MTK_EINT_PIN(5, 0, 5, 1), 2115 + MTK_EINT_PIN(6, 1, 0, 1), 2116 + MTK_EINT_PIN(7, 1, 1, 1), 2117 + MTK_EINT_PIN(8, 1, 2, 1), 2118 + MTK_EINT_PIN(9, 1, 3, 1), 2119 + MTK_EINT_PIN(10, 1, 4, 1), 2120 + MTK_EINT_PIN(11, 1, 5, 1), 2121 + MTK_EINT_PIN(12, 1, 6, 1), 2122 + MTK_EINT_PIN(13, 2, 0, 1), 2123 + MTK_EINT_PIN(14, 2, 1, 1), 2124 + MTK_EINT_PIN(15, 2, 2, 1), 2125 + MTK_EINT_PIN(16, 2, 3, 1), 2126 + MTK_EINT_PIN(17, 2, 4, 1), 2127 + MTK_EINT_PIN(18, 2, 5, 1), 2128 + MTK_EINT_PIN(19, 0, 6, 1), 2129 + MTK_EINT_PIN(20, 0, 7, 1), 2130 + MTK_EINT_PIN(21, 0, 8, 1), 2131 + MTK_EINT_PIN(22, 0, 9, 1), 2132 + MTK_EINT_PIN(23, 0, 10, 1), 2133 + MTK_EINT_PIN(24, 0, 11, 1), 2134 + MTK_EINT_PIN(25, 0, 12, 1), 2135 + MTK_EINT_PIN(26, 0, 13, 1), 2136 + MTK_EINT_PIN(27, 0, 14, 1), 2137 + MTK_EINT_PIN(28, 0, 15, 1), 2138 + MTK_EINT_PIN(29, 2, 6, 1), 2139 + MTK_EINT_PIN(30, 2, 7, 1), 2140 + MTK_EINT_PIN(31, 2, 8, 1), 2141 + MTK_EINT_PIN(32, 2, 9, 1), 2142 + MTK_EINT_PIN(33, 0, 16, 1), 2143 + MTK_EINT_PIN(34, 0, 17, 1), 2144 + MTK_EINT_PIN(35, 0, 18, 1), 2145 + MTK_EINT_PIN(36, 0, 19, 0), 2146 + MTK_EINT_PIN(37, 0, 20, 0), 2147 + MTK_EINT_PIN(38, 0, 21, 0), 2148 + MTK_EINT_PIN(39, 0, 22, 0), 2149 + MTK_EINT_PIN(40, 0, 23, 0), 2150 + MTK_EINT_PIN(41, 1, 7, 0), 2151 + MTK_EINT_PIN(42, 1, 8, 0), 2152 + MTK_EINT_PIN(43, 1, 9, 0), 2153 + MTK_EINT_PIN(44, 1, 10, 0), 2154 + MTK_EINT_PIN(45, 1, 11, 0), 2155 + MTK_EINT_PIN(46, 1, 12, 0), 2156 + MTK_EINT_PIN(47, 1, 13, 0), 2157 + MTK_EINT_PIN(48, 0, 24, 0), 2158 + MTK_EINT_PIN(49, 0, 25, 0), 2159 + MTK_EINT_PIN(50, 0, 26, 0), 2160 + MTK_EINT_PIN(51, 0, 27, 0), 2161 + MTK_EINT_PIN(52, 0, 28, 0), 2162 + MTK_EINT_PIN(53, 0, 29, 0), 2163 + MTK_EINT_PIN(54, 0, 30, 0), 2164 + MTK_EINT_PIN(55, 0, 31, 0), 2165 + MTK_EINT_PIN(56, 0, 32, 0), 2166 + MTK_EINT_PIN(57, 0, 33, 0), 2167 + MTK_EINT_PIN(58, 0, 34, 0), 2168 + MTK_EINT_PIN(59, 0, 35, 0), 2169 + MTK_EINT_PIN(60, 0, 36, 0), 2170 + MTK_EINT_PIN(61, 0, 37, 0), 2171 + MTK_EINT_PIN(62, 0, 38, 0), 2172 + MTK_EINT_PIN(63, 0, 39, 0), 2173 + MTK_EINT_PIN(64, 0, 40, 0), 2174 + MTK_EINT_PIN(65, 0, 41, 0), 2175 + MTK_EINT_PIN(66, 0, 42, 0), 2176 + MTK_EINT_PIN(67, 0, 43, 0), 2177 + MTK_EINT_PIN(68, 0, 44, 0), 2178 + MTK_EINT_PIN(69, 0, 45, 0), 2179 + MTK_EINT_PIN(70, 0, 46, 0), 2180 + MTK_EINT_PIN(71, 0, 47, 0), 2181 + MTK_EINT_PIN(72, 0, 48, 0), 2182 + MTK_EINT_PIN(73, 0, 49, 0), 2183 + MTK_EINT_PIN(74, 0, 50, 0), 2184 + MTK_EINT_PIN(75, 0, 51, 0), 2185 + MTK_EINT_PIN(76, 0, 52, 0), 2186 + MTK_EINT_PIN(77, 1, 14, 0), 2187 + MTK_EINT_PIN(78, 1, 15, 0), 2188 + MTK_EINT_PIN(79, 1, 16, 0), 2189 + MTK_EINT_PIN(80, 1, 17, 0), 2190 + MTK_EINT_PIN(81, 1, 18, 0), 2191 + MTK_EINT_PIN(82, 1, 19, 0), 2192 + MTK_EINT_PIN(83, 1, 20, 0), 2193 + MTK_EINT_PIN(84, 1, 21, 0), 2194 + MTK_EINT_PIN(85, 1, 22, 0), 2195 + MTK_EINT_PIN(86, 1, 23, 0), 2196 + MTK_EINT_PIN(87, 1, 24, 0), 2197 + MTK_EINT_PIN(88, 1, 25, 0), 2198 + MTK_EINT_PIN(89, 1, 26, 0), 2199 + MTK_EINT_PIN(90, 1, 27, 0), 2200 + MTK_EINT_PIN(91, 1, 28, 0), 2201 + MTK_EINT_PIN(92, 0, 53, 0), 2202 + MTK_EINT_PIN(93, 0, 54, 0), 2203 + MTK_EINT_PIN(94, 0, 55, 0), 2204 + MTK_EINT_PIN(95, 0, 56, 0), 2205 + MTK_EINT_PIN(96, 0, 57, 0), 2206 + MTK_EINT_PIN(97, 2, 10, 0), 2207 + MTK_EINT_PIN(98, 2, 11, 0), 2208 + MTK_EINT_PIN(99, 1, 29, 0), 2209 + MTK_EINT_PIN(100, 1, 30, 0), 2210 + MTK_EINT_PIN(101, 1, 31, 0), 2211 + MTK_EINT_PIN(102, 1, 32, 0), 2212 + MTK_EINT_PIN(103, 1, 33, 0), 2213 + MTK_EINT_PIN(104, 1, 34, 0), 2214 + MTK_EINT_PIN(105, 1, 35, 0), 2215 + MTK_EINT_PIN(106, 1, 36, 0), 2216 + MTK_EINT_PIN(107, 1, 37, 0), 2217 + MTK_EINT_PIN(108, 1, 38, 0), 2218 + MTK_EINT_PIN(109, 1, 39, 0), 2219 + MTK_EINT_PIN(110, 1, 40, 0), 2220 + MTK_EINT_PIN(111, 1, 41, 0), 2221 + MTK_EINT_PIN(112, 1, 42, 0), 2222 + MTK_EINT_PIN(113, 1, 43, 0), 2223 + MTK_EINT_PIN(114, 1, 44, 0), 2224 + MTK_EINT_PIN(115, 1, 45, 0), 2225 + MTK_EINT_PIN(116, 1, 46, 0), 2226 + MTK_EINT_PIN(196, 3, 0, 0), 2227 + MTK_EINT_PIN(197, 3, 1, 0), 2228 + MTK_EINT_PIN(198, 3, 2, 0), 2229 + MTK_EINT_PIN(199, 3, 3, 0), 2230 + MTK_EINT_PIN(200, 3, 4, 0), 2231 + MTK_EINT_PIN(201, 3, 5, 0), 2232 + MTK_EINT_PIN(202, 3, 6, 0), 2233 + MTK_EINT_PIN(203, 3, 7, 0), 2234 + MTK_EINT_PIN(204, 3, 8, 0), 2235 + MTK_EINT_PIN(205, 3, 9, 0), 2236 + MTK_EINT_PIN(206, 3, 10, 0), 2237 + MTK_EINT_PIN(207, 3, 11, 0), 2238 + MTK_EINT_PIN(208, 3, 12, 0), 2239 + MTK_EINT_PIN(209, 3, 13, 0), 2240 + MTK_EINT_PIN(210, 3, 14, 0), 2241 + MTK_EINT_PIN(211, 3, 15, 0), 2242 + MTK_EINT_PIN(212, 3, 16, 0), 2243 + MTK_EINT_PIN(213, 3, 17, 0), 2244 + MTK_EINT_PIN(214, 3, 18, 0), 2245 + MTK_EINT_PIN(215, 3, 19, 0), 2246 + }; 2247 + 2248 + #endif /* __PINCTRL_MTK_MT6878_H */
+47 -18
drivers/pinctrl/pinconf-generic.c
··· 54 54 PCONFDUMP(PIN_CONFIG_SLEEP_HARDWARE_STATE, "sleep hardware state", NULL, false), 55 55 PCONFDUMP(PIN_CONFIG_SLEW_RATE, "slew rate", NULL, true), 56 56 PCONFDUMP(PIN_CONFIG_SKEW_DELAY, "skew delay", NULL, true), 57 + PCONFDUMP(PIN_CONFIG_SKEW_DELAY_INPUT_PS, "input skew delay", "ps", true), 58 + PCONFDUMP(PIN_CONFIG_SKEW_DELAY_OUTPUT_PS, "output skew delay", "ps", true), 57 59 }; 58 60 59 61 static void pinconf_generic_dump_one(struct pinctrl_dev *pctldev, ··· 67 65 int i; 68 66 69 67 for (i = 0; i < nitems; i++) { 68 + const struct pin_config_item *item = &items[i]; 70 69 unsigned long config; 71 70 int ret; 72 71 73 72 /* We want to check out this parameter */ 74 - config = pinconf_to_config_packed(items[i].param, 0); 73 + config = pinconf_to_config_packed(item->param, 0); 75 74 if (gname) 76 75 ret = pin_config_group_get(dev_name(pctldev->dev), 77 76 gname, &config); ··· 89 86 if (*print_sep) 90 87 seq_puts(s, ", "); 91 88 *print_sep = 1; 92 - seq_puts(s, items[i].display); 89 + seq_puts(s, item->display); 93 90 /* Print unit if available */ 94 - if (items[i].has_arg) { 91 + if (item->has_arg) { 95 92 u32 val = pinconf_to_config_argument(config); 96 93 97 - if (items[i].format) 98 - seq_printf(s, " (%u %s)", val, items[i].format); 94 + if (item->format) 95 + seq_printf(s, " (%u %s)", val, item->format); 99 96 else 100 97 seq_printf(s, " (0x%x)", val); 98 + 99 + if (item->values && item->num_values) { 100 + if (val < item->num_values) 101 + seq_printf(s, " \"%s\"", item->values[val]); 102 + else 103 + seq_puts(s, " \"(unknown)\""); 104 + } 101 105 } 102 106 } 103 107 } ··· 114 104 * @pctldev: Pincontrol device 115 105 * @s: File to print to 116 106 * @gname: Group name specifying pins 117 - * @pin: Pin number specyfying pin 107 + * @pin: Pin number specifying pin 118 108 * 119 109 * Print the pinconf configuration for the requested pin(s) to @s. Pins can be 120 110 * specified either by pin using @pin or by group using @gname. Only one needs ··· 200 190 { "sleep-hardware-state", PIN_CONFIG_SLEEP_HARDWARE_STATE, 0 }, 201 191 { "slew-rate", PIN_CONFIG_SLEW_RATE, 0 }, 202 192 { "skew-delay", PIN_CONFIG_SKEW_DELAY, 0 }, 193 + { "skew-delay-input-ps", PIN_CONFIG_SKEW_DELAY_INPUT_PS, 0 }, 194 + { "skew-delay-output-ps", PIN_CONFIG_SKEW_DELAY_OUTPUT_PS, 0 }, 203 195 }; 204 196 205 197 /** ··· 217 205 * @ncfg. @ncfg is updated to reflect the number of entries after parsing. @cfg 218 206 * needs to have enough memory allocated to hold all possible entries. 219 207 */ 220 - static void parse_dt_cfg(struct device_node *np, 221 - const struct pinconf_generic_params *params, 222 - unsigned int count, unsigned long *cfg, 223 - unsigned int *ncfg) 208 + static int parse_dt_cfg(struct device_node *np, 209 + const struct pinconf_generic_params *params, 210 + unsigned int count, unsigned long *cfg, 211 + unsigned int *ncfg) 224 212 { 225 213 int i; 226 214 ··· 229 217 int ret; 230 218 const struct pinconf_generic_params *par = &params[i]; 231 219 232 - ret = of_property_read_u32(np, par->property, &val); 220 + if (par->values && par->num_values) { 221 + ret = fwnode_property_match_property_string(of_fwnode_handle(np), 222 + par->property, 223 + par->values, par->num_values); 224 + if (ret == -ENOENT) 225 + return ret; 226 + if (ret >= 0) { 227 + val = ret; 228 + ret = 0; 229 + } 230 + } else { 231 + ret = of_property_read_u32(np, par->property, &val); 232 + } 233 233 234 234 /* property not found */ 235 235 if (ret == -EINVAL) ··· 255 231 cfg[*ncfg] = pinconf_to_config_packed(par->param, val); 256 232 (*ncfg)++; 257 233 } 234 + 235 + return 0; 258 236 } 259 237 260 238 /** ··· 268 242 * @pmux: array with pin mux value entries 269 243 * @npins: number of pins 270 244 * 271 - * pinmux propertity: mux value [0,7]bits and pin identity [8,31]bits. 245 + * pinmux property: mux value [0,7]bits and pin identity [8,31]bits. 272 246 */ 273 247 int pinconf_generic_parse_dt_pinmux(struct device_node *np, struct device *dev, 274 248 unsigned int **pid, unsigned int **pmux, ··· 349 323 if (!cfg) 350 324 return -ENOMEM; 351 325 352 - parse_dt_cfg(np, dt_params, ARRAY_SIZE(dt_params), cfg, &ncfg); 326 + ret = parse_dt_cfg(np, dt_params, ARRAY_SIZE(dt_params), cfg, &ncfg); 327 + if (ret) 328 + return ret; 353 329 if (pctldev && pctldev->desc->num_custom_params && 354 - pctldev->desc->custom_params) 355 - parse_dt_cfg(np, pctldev->desc->custom_params, 356 - pctldev->desc->num_custom_params, cfg, &ncfg); 357 - 358 - ret = 0; 330 + pctldev->desc->custom_params) { 331 + ret = parse_dt_cfg(np, pctldev->desc->custom_params, 332 + pctldev->desc->num_custom_params, cfg, &ncfg); 333 + if (ret) 334 + return ret; 335 + } 359 336 360 337 /* no configs found at all */ 361 338 if (ncfg == 0) {
+4 -36
drivers/pinctrl/pinctrl-mcp23s08.c
··· 44 44 #define MCP_GPIO 0x09 45 45 #define MCP_OLAT 0x0a 46 46 47 - static const struct reg_default mcp23x08_defaults[] = { 48 - {.reg = MCP_IODIR, .def = 0xff}, 49 - {.reg = MCP_IPOL, .def = 0x00}, 50 - {.reg = MCP_GPINTEN, .def = 0x00}, 51 - {.reg = MCP_DEFVAL, .def = 0x00}, 52 - {.reg = MCP_INTCON, .def = 0x00}, 53 - {.reg = MCP_IOCON, .def = 0x00}, 54 - {.reg = MCP_GPPU, .def = 0x00}, 55 - {.reg = MCP_OLAT, .def = 0x00}, 56 - }; 57 - 58 47 static const struct regmap_range mcp23x08_volatile_range = { 59 48 .range_min = MCP_INTF, 60 49 .range_max = MCP_GPIO, ··· 71 82 .reg_stride = 1, 72 83 .volatile_table = &mcp23x08_volatile_table, 73 84 .precious_table = &mcp23x08_precious_table, 74 - .reg_defaults = mcp23x08_defaults, 75 - .num_reg_defaults = ARRAY_SIZE(mcp23x08_defaults), 76 - .cache_type = REGCACHE_FLAT, 85 + .num_reg_defaults_raw = MCP_OLAT + 1, 86 + .cache_type = REGCACHE_MAPLE, 77 87 .max_register = MCP_OLAT, 78 88 .disable_locking = true, /* mcp->lock protects the regmap */ 79 89 }; 80 90 EXPORT_SYMBOL_GPL(mcp23x08_regmap); 81 - 82 - static const struct reg_default mcp23x17_defaults[] = { 83 - {.reg = MCP_IODIR << 1, .def = 0xffff}, 84 - {.reg = MCP_IPOL << 1, .def = 0x0000}, 85 - {.reg = MCP_GPINTEN << 1, .def = 0x0000}, 86 - {.reg = MCP_DEFVAL << 1, .def = 0x0000}, 87 - {.reg = MCP_INTCON << 1, .def = 0x0000}, 88 - {.reg = MCP_IOCON << 1, .def = 0x0000}, 89 - {.reg = MCP_GPPU << 1, .def = 0x0000}, 90 - {.reg = MCP_OLAT << 1, .def = 0x0000}, 91 - }; 92 91 93 92 static const struct regmap_range mcp23x17_volatile_range = { 94 93 .range_min = MCP_INTF << 1, ··· 106 129 .max_register = MCP_OLAT << 1, 107 130 .volatile_table = &mcp23x17_volatile_table, 108 131 .precious_table = &mcp23x17_precious_table, 109 - .reg_defaults = mcp23x17_defaults, 110 - .num_reg_defaults = ARRAY_SIZE(mcp23x17_defaults), 111 - .cache_type = REGCACHE_FLAT, 132 + .num_reg_defaults_raw = MCP_OLAT + 1, 133 + .cache_type = REGCACHE_MAPLE, 112 134 .val_format_endian = REGMAP_ENDIAN_LITTLE, 113 135 .disable_locking = true, /* mcp->lock protects the regmap */ 114 136 }; ··· 617 641 mcp->chip.owner = THIS_MODULE; 618 642 619 643 mcp->reset_gpio = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_LOW); 620 - 621 - /* 622 - * Reset the chip - we don't really know what state it's in, so reset 623 - * all pins to input first to prevent surprises. 624 - */ 625 - ret = mcp_write(mcp, MCP_IODIR, mcp->chip.ngpio == 16 ? 0xFFFF : 0xFF); 626 - if (ret < 0) 627 - return ret; 628 644 629 645 /* verify MCP_IOCON.SEQOP = 0, so sequential reads work, 630 646 * and MCP_IOCON.HAEN = 1, so we work with all chips.
+278
drivers/pinctrl/pinctrl-mpfs-iomux0.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 2 + 3 + #include <linux/bitfield.h> 4 + #include <linux/cleanup.h> 5 + #include <linux/module.h> 6 + #include <linux/mfd/syscon.h> 7 + #include <linux/mod_devicetable.h> 8 + #include <linux/of.h> 9 + #include <linux/platform_device.h> 10 + #include <linux/regmap.h> 11 + #include <linux/seq_file.h> 12 + 13 + #include <linux/pinctrl/pinconf-generic.h> 14 + #include <linux/pinctrl/pinconf.h> 15 + #include <linux/pinctrl/pinctrl.h> 16 + #include <linux/pinctrl/pinmux.h> 17 + 18 + #include "core.h" 19 + #include "pinctrl-utils.h" 20 + #include "pinconf.h" 21 + #include "pinmux.h" 22 + 23 + #define MPFS_IOMUX0_REG 0x200 24 + 25 + struct mpfs_iomux0_pinctrl { 26 + struct pinctrl_dev *pctrl; 27 + struct device *dev; 28 + struct regmap *regmap; 29 + struct pinctrl_desc desc; 30 + }; 31 + 32 + struct mpfs_iomux0_pin_group { 33 + const char *name; 34 + const unsigned int *pins; 35 + u32 mask; 36 + u32 setting; 37 + }; 38 + 39 + struct mpfs_iomux0_function { 40 + const char *name; 41 + const char * const *groups; 42 + }; 43 + 44 + static const struct pinctrl_pin_desc mpfs_iomux0_pins[] = { 45 + PINCTRL_PIN(0, "spi0"), 46 + PINCTRL_PIN(1, "spi1"), 47 + PINCTRL_PIN(2, "i2c0"), 48 + PINCTRL_PIN(3, "i2c1"), 49 + PINCTRL_PIN(4, "can0"), 50 + PINCTRL_PIN(5, "can1"), 51 + PINCTRL_PIN(6, "qspi"), 52 + PINCTRL_PIN(7, "uart0"), 53 + PINCTRL_PIN(8, "uart1"), 54 + PINCTRL_PIN(9, "uart2"), 55 + PINCTRL_PIN(10, "uart3"), 56 + PINCTRL_PIN(11, "uart4"), 57 + PINCTRL_PIN(12, "mdio0"), 58 + PINCTRL_PIN(13, "mdio1"), 59 + }; 60 + 61 + static const unsigned int mpfs_iomux0_spi0_pins[] = { 0 }; 62 + static const unsigned int mpfs_iomux0_spi1_pins[] = { 1 }; 63 + static const unsigned int mpfs_iomux0_i2c0_pins[] = { 2 }; 64 + static const unsigned int mpfs_iomux0_i2c1_pins[] = { 3 }; 65 + static const unsigned int mpfs_iomux0_can0_pins[] = { 4 }; 66 + static const unsigned int mpfs_iomux0_can1_pins[] = { 5 }; 67 + static const unsigned int mpfs_iomux0_qspi_pins[] = { 6 }; 68 + static const unsigned int mpfs_iomux0_uart0_pins[] = { 7 }; 69 + static const unsigned int mpfs_iomux0_uart1_pins[] = { 8 }; 70 + static const unsigned int mpfs_iomux0_uart2_pins[] = { 9 }; 71 + static const unsigned int mpfs_iomux0_uart3_pins[] = { 10 }; 72 + static const unsigned int mpfs_iomux0_uart4_pins[] = { 11 }; 73 + static const unsigned int mpfs_iomux0_mdio0_pins[] = { 12 }; 74 + static const unsigned int mpfs_iomux0_mdio1_pins[] = { 13 }; 75 + 76 + #define MPFS_IOMUX0_GROUP(_name, _mask) { \ 77 + .name = #_name "_mssio", \ 78 + .pins = mpfs_iomux0_##_name##_pins, \ 79 + .mask = _mask, \ 80 + .setting = 0x0, \ 81 + }, { \ 82 + .name = #_name "_fabric", \ 83 + .pins = mpfs_iomux0_##_name##_pins, \ 84 + .mask = _mask, \ 85 + .setting = _mask, \ 86 + } 87 + 88 + static const struct mpfs_iomux0_pin_group mpfs_iomux0_pin_groups[] = { 89 + MPFS_IOMUX0_GROUP(spi0, BIT(0)), 90 + MPFS_IOMUX0_GROUP(spi1, BIT(1)), 91 + MPFS_IOMUX0_GROUP(i2c0, BIT(2)), 92 + MPFS_IOMUX0_GROUP(i2c1, BIT(3)), 93 + MPFS_IOMUX0_GROUP(can0, BIT(4)), 94 + MPFS_IOMUX0_GROUP(can1, BIT(5)), 95 + MPFS_IOMUX0_GROUP(qspi, BIT(6)), 96 + MPFS_IOMUX0_GROUP(uart0, BIT(7)), 97 + MPFS_IOMUX0_GROUP(uart1, BIT(8)), 98 + MPFS_IOMUX0_GROUP(uart2, BIT(9)), 99 + MPFS_IOMUX0_GROUP(uart3, BIT(10)), 100 + MPFS_IOMUX0_GROUP(uart4, BIT(11)), 101 + MPFS_IOMUX0_GROUP(mdio0, BIT(12)), 102 + MPFS_IOMUX0_GROUP(mdio1, BIT(13)), 103 + }; 104 + 105 + static const char * const mpfs_iomux0_spi0_groups[] = { "spi0_mssio", "spi0_fabric" }; 106 + static const char * const mpfs_iomux0_spi1_groups[] = { "spi1_mssio", "spi1_fabric" }; 107 + static const char * const mpfs_iomux0_i2c0_groups[] = { "i2c0_mssio", "i2c0_fabric" }; 108 + static const char * const mpfs_iomux0_i2c1_groups[] = { "i2c1_mssio", "i2c1_fabric" }; 109 + static const char * const mpfs_iomux0_can0_groups[] = { "can0_mssio", "can0_fabric" }; 110 + static const char * const mpfs_iomux0_can1_groups[] = { "can1_mssio", "can1_fabric" }; 111 + static const char * const mpfs_iomux0_qspi_groups[] = { "qspi_mssio", "qspi_fabric" }; 112 + static const char * const mpfs_iomux0_uart0_groups[] = { "uart0_mssio", "uart0_fabric" }; 113 + static const char * const mpfs_iomux0_uart1_groups[] = { "uart1_mssio", "uart1_fabric" }; 114 + static const char * const mpfs_iomux0_uart2_groups[] = { "uart2_mssio", "uart2_fabric" }; 115 + static const char * const mpfs_iomux0_uart3_groups[] = { "uart3_mssio", "uart3_fabric" }; 116 + static const char * const mpfs_iomux0_uart4_groups[] = { "uart4_mssio", "uart4_fabric" }; 117 + static const char * const mpfs_iomux0_mdio0_groups[] = { "mdio0_mssio", "mdio0_fabric" }; 118 + static const char * const mpfs_iomux0_mdio1_groups[] = { "mdio1_mssio", "mdio1_fabric" }; 119 + 120 + #define MPFS_IOMUX0_FUNCTION(_name) { \ 121 + .name = #_name, \ 122 + .groups = mpfs_iomux0_##_name##_groups, \ 123 + } 124 + 125 + static const struct mpfs_iomux0_function mpfs_iomux0_functions[] = { 126 + MPFS_IOMUX0_FUNCTION(spi0), 127 + MPFS_IOMUX0_FUNCTION(spi1), 128 + MPFS_IOMUX0_FUNCTION(i2c0), 129 + MPFS_IOMUX0_FUNCTION(i2c1), 130 + MPFS_IOMUX0_FUNCTION(can0), 131 + MPFS_IOMUX0_FUNCTION(can1), 132 + MPFS_IOMUX0_FUNCTION(qspi), 133 + MPFS_IOMUX0_FUNCTION(uart0), 134 + MPFS_IOMUX0_FUNCTION(uart1), 135 + MPFS_IOMUX0_FUNCTION(uart2), 136 + MPFS_IOMUX0_FUNCTION(uart3), 137 + MPFS_IOMUX0_FUNCTION(uart4), 138 + MPFS_IOMUX0_FUNCTION(mdio0), 139 + MPFS_IOMUX0_FUNCTION(mdio1), 140 + }; 141 + 142 + static void mpfs_iomux0_pin_dbg_show(struct pinctrl_dev *pctrl_dev, struct seq_file *seq, 143 + unsigned int pin) 144 + { 145 + struct mpfs_iomux0_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctrl_dev); 146 + u32 val; 147 + 148 + seq_printf(seq, "reg: %x, pin: %u ", MPFS_IOMUX0_REG, pin); 149 + 150 + regmap_read(pctrl->regmap, MPFS_IOMUX0_REG, &val); 151 + val = (val & BIT(pin)) >> pin; 152 + 153 + seq_printf(seq, "val: %x\n", val); 154 + } 155 + 156 + static int mpfs_iomux0_groups_count(struct pinctrl_dev *pctldev) 157 + { 158 + return ARRAY_SIZE(mpfs_iomux0_pin_groups); 159 + } 160 + 161 + static const char *mpfs_iomux0_group_name(struct pinctrl_dev *pctldev, unsigned int selector) 162 + { 163 + return mpfs_iomux0_pin_groups[selector].name; 164 + } 165 + 166 + static int mpfs_iomux0_group_pins(struct pinctrl_dev *pctldev, unsigned int selector, 167 + const unsigned int **pins, unsigned int *num_pins) 168 + { 169 + *pins = mpfs_iomux0_pin_groups[selector].pins; 170 + *num_pins = 1; 171 + 172 + return 0; 173 + } 174 + 175 + static const struct pinctrl_ops mpfs_iomux0_pinctrl_ops = { 176 + .get_groups_count = mpfs_iomux0_groups_count, 177 + .get_group_name = mpfs_iomux0_group_name, 178 + .get_group_pins = mpfs_iomux0_group_pins, 179 + .dt_node_to_map = pinconf_generic_dt_node_to_map_all, 180 + .dt_free_map = pinctrl_utils_free_map, 181 + .pin_dbg_show = mpfs_iomux0_pin_dbg_show, 182 + }; 183 + 184 + static int mpfs_iomux0_pinmux_set_mux(struct pinctrl_dev *pctrl_dev, unsigned int fsel, 185 + unsigned int gsel) 186 + { 187 + struct mpfs_iomux0_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctrl_dev); 188 + struct device *dev = pctrl->dev; 189 + const struct mpfs_iomux0_pin_group *group; 190 + const struct mpfs_iomux0_function *function; 191 + 192 + group = &mpfs_iomux0_pin_groups[gsel]; 193 + function = &mpfs_iomux0_functions[fsel]; 194 + 195 + dev_dbg(dev, "Setting func %s mask %x setting %x\n", 196 + function->name, group->mask, group->setting); 197 + regmap_assign_bits(pctrl->regmap, MPFS_IOMUX0_REG, group->mask, group->setting); 198 + 199 + return 0; 200 + } 201 + 202 + static int mpfs_iomux0_pinmux_get_funcs_count(struct pinctrl_dev *pctldev) 203 + { 204 + return ARRAY_SIZE(mpfs_iomux0_functions); 205 + } 206 + 207 + static const char *mpfs_iomux0_pinmux_get_func_name(struct pinctrl_dev *pctldev, 208 + unsigned int selector) 209 + { 210 + return mpfs_iomux0_functions[selector].name; 211 + } 212 + 213 + static int mpfs_iomux0_pinmux_get_groups(struct pinctrl_dev *pctldev, unsigned int selector, 214 + const char * const **groups, 215 + unsigned int * const num_groups) 216 + { 217 + *groups = mpfs_iomux0_functions[selector].groups; 218 + *num_groups = 2; 219 + 220 + return 0; 221 + } 222 + 223 + static const struct pinmux_ops mpfs_iomux0_pinmux_ops = { 224 + .get_functions_count = mpfs_iomux0_pinmux_get_funcs_count, 225 + .get_function_name = mpfs_iomux0_pinmux_get_func_name, 226 + .get_function_groups = mpfs_iomux0_pinmux_get_groups, 227 + .set_mux = mpfs_iomux0_pinmux_set_mux, 228 + }; 229 + 230 + static int mpfs_iomux0_probe(struct platform_device *pdev) 231 + { 232 + struct device *dev = &pdev->dev; 233 + struct mpfs_iomux0_pinctrl *pctrl; 234 + 235 + pctrl = devm_kzalloc(dev, sizeof(*pctrl), GFP_KERNEL); 236 + if (!pctrl) 237 + return -ENOMEM; 238 + 239 + pctrl->regmap = device_node_to_regmap(pdev->dev.parent->of_node); 240 + if (IS_ERR(pctrl->regmap)) 241 + dev_err_probe(dev, PTR_ERR(pctrl->regmap), "Failed to find syscon regmap\n"); 242 + 243 + pctrl->desc.name = dev_name(dev); 244 + pctrl->desc.pins = mpfs_iomux0_pins; 245 + pctrl->desc.npins = ARRAY_SIZE(mpfs_iomux0_pins); 246 + pctrl->desc.pctlops = &mpfs_iomux0_pinctrl_ops; 247 + pctrl->desc.pmxops = &mpfs_iomux0_pinmux_ops; 248 + pctrl->desc.owner = THIS_MODULE; 249 + 250 + pctrl->dev = dev; 251 + 252 + platform_set_drvdata(pdev, pctrl); 253 + 254 + pctrl->pctrl = devm_pinctrl_register(&pdev->dev, &pctrl->desc, pctrl); 255 + if (IS_ERR(pctrl->pctrl)) 256 + return PTR_ERR(pctrl->pctrl); 257 + 258 + return 0; 259 + } 260 + 261 + static const struct of_device_id mpfs_iomux0_of_match[] = { 262 + { .compatible = "microchip,mpfs-pinctrl-iomux0" }, 263 + { } 264 + }; 265 + MODULE_DEVICE_TABLE(of, mpfs_iomux0_of_match); 266 + 267 + static struct platform_driver mpfs_iomux0_driver = { 268 + .driver = { 269 + .name = "mpfs-pinctrl-iomux0", 270 + .of_match_table = mpfs_iomux0_of_match, 271 + }, 272 + .probe = mpfs_iomux0_probe, 273 + }; 274 + module_platform_driver(mpfs_iomux0_driver); 275 + 276 + MODULE_AUTHOR("Conor Dooley <conor.dooley@microchip.com>"); 277 + MODULE_DESCRIPTION("Polarfire SoC iomux0 pinctrl driver"); 278 + MODULE_LICENSE("GPL");
+356
drivers/pinctrl/pinctrl-pic64gx-gpio2.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 2 + 3 + #include <linux/bitfield.h> 4 + #include <linux/module.h> 5 + #include <linux/mfd/syscon.h> 6 + #include <linux/mod_devicetable.h> 7 + #include <linux/of.h> 8 + #include <linux/platform_device.h> 9 + #include <linux/regmap.h> 10 + #include <linux/seq_file.h> 11 + 12 + #include <linux/pinctrl/pinconf-generic.h> 13 + #include <linux/pinctrl/pinconf.h> 14 + #include <linux/pinctrl/pinctrl.h> 15 + #include <linux/pinctrl/pinmux.h> 16 + 17 + #include "pinctrl-utils.h" 18 + 19 + #define PIC64GX_PINMUX_REG 0x0 20 + 21 + static const struct regmap_config pic64gx_gpio2_regmap_config = { 22 + .reg_bits = 32, 23 + .reg_stride = 4, 24 + .val_bits = 32, 25 + .val_format_endian = REGMAP_ENDIAN_LITTLE, 26 + .max_register = 0x0, 27 + }; 28 + 29 + struct pic64gx_gpio2_pinctrl { 30 + struct pinctrl_dev *pctrl; 31 + struct device *dev; 32 + struct regmap *regmap; 33 + struct pinctrl_desc desc; 34 + }; 35 + 36 + struct pic64gx_gpio2_pin_group { 37 + const char *name; 38 + const unsigned int *pins; 39 + const unsigned int num_pins; 40 + u32 mask; 41 + u32 setting; 42 + }; 43 + 44 + struct pic64gx_gpio2_function { 45 + const char *name; 46 + const char * const *groups; 47 + const unsigned int num_groups; 48 + }; 49 + 50 + static const struct pinctrl_pin_desc pic64gx_gpio2_pins[] = { 51 + PINCTRL_PIN(0, "E14"), 52 + PINCTRL_PIN(1, "E15"), 53 + PINCTRL_PIN(2, "F16"), 54 + PINCTRL_PIN(3, "F17"), 55 + PINCTRL_PIN(4, "D19"), 56 + PINCTRL_PIN(5, "B18"), 57 + PINCTRL_PIN(6, "B10"), 58 + PINCTRL_PIN(7, "C14"), 59 + PINCTRL_PIN(8, "E18"), 60 + PINCTRL_PIN(9, "D18"), 61 + PINCTRL_PIN(10, "E19"), 62 + PINCTRL_PIN(11, "C7"), 63 + PINCTRL_PIN(12, "D6"), 64 + PINCTRL_PIN(13, "D7"), 65 + PINCTRL_PIN(14, "C9"), 66 + PINCTRL_PIN(15, "C10"), 67 + PINCTRL_PIN(16, "A5"), 68 + PINCTRL_PIN(17, "A6"), 69 + PINCTRL_PIN(18, "D8"), 70 + PINCTRL_PIN(19, "D9"), 71 + PINCTRL_PIN(20, "B8"), 72 + PINCTRL_PIN(21, "A8"), 73 + PINCTRL_PIN(22, "C12"), 74 + PINCTRL_PIN(23, "B12"), 75 + PINCTRL_PIN(24, "A11"), 76 + PINCTRL_PIN(25, "A10"), 77 + PINCTRL_PIN(26, "D11"), 78 + PINCTRL_PIN(27, "C11"), 79 + PINCTRL_PIN(28, "B9"), 80 + }; 81 + 82 + static const unsigned int pic64gx_gpio2_mdio0_pins[] = { 83 + 0, 1 84 + }; 85 + 86 + static const unsigned int pic64gx_gpio2_mdio1_pins[] = { 87 + 2, 3 88 + }; 89 + 90 + static const unsigned int pic64gx_gpio2_spi0_pins[] = { 91 + 4, 5, 10, 11 92 + }; 93 + 94 + static const unsigned int pic64gx_gpio2_can0_pins[] = { 95 + 6, 24, 28 96 + }; 97 + 98 + static const unsigned int pic64gx_gpio2_pcie_pins[] = { 99 + 7, 8, 9 100 + }; 101 + 102 + static const unsigned int pic64gx_gpio2_qspi_pins[] = { 103 + 12, 13, 14, 15, 16, 17 104 + }; 105 + 106 + static const unsigned int pic64gx_gpio2_uart3_pins[] = { 107 + 18, 19 108 + }; 109 + 110 + static const unsigned int pic64gx_gpio2_uart4_pins[] = { 111 + 20, 21 112 + }; 113 + 114 + static const unsigned int pic64gx_gpio2_can1_pins[] = { 115 + 22, 23, 25 116 + }; 117 + 118 + static const unsigned int pic64gx_gpio2_uart2_pins[] = { 119 + 26, 27 120 + }; 121 + 122 + #define PIC64GX_PINCTRL_GROUP(_name, _mask) { \ 123 + .name = "gpio_" #_name, \ 124 + .pins = pic64gx_gpio2_##_name##_pins, \ 125 + .num_pins = ARRAY_SIZE(pic64gx_gpio2_##_name##_pins), \ 126 + .mask = _mask, \ 127 + .setting = 0x0, \ 128 + }, { \ 129 + .name = #_name, \ 130 + .pins = pic64gx_gpio2_##_name##_pins, \ 131 + .num_pins = ARRAY_SIZE(pic64gx_gpio2_##_name##_pins), \ 132 + .mask = _mask, \ 133 + .setting = _mask, \ 134 + } 135 + 136 + static const struct pic64gx_gpio2_pin_group pic64gx_gpio2_pin_groups[] = { 137 + PIC64GX_PINCTRL_GROUP(mdio0, BIT(0) | BIT(1)), 138 + PIC64GX_PINCTRL_GROUP(mdio1, BIT(2) | BIT(3)), 139 + PIC64GX_PINCTRL_GROUP(spi0, BIT(4) | BIT(5) | BIT(10) | BIT(11)), 140 + PIC64GX_PINCTRL_GROUP(can0, BIT(6) | BIT(24) | BIT(28)), 141 + PIC64GX_PINCTRL_GROUP(pcie, BIT(7) | BIT(8) | BIT(9)), 142 + PIC64GX_PINCTRL_GROUP(qspi, GENMASK(17, 12)), 143 + PIC64GX_PINCTRL_GROUP(uart3, BIT(18) | BIT(19)), 144 + PIC64GX_PINCTRL_GROUP(uart4, BIT(20) | BIT(21)), 145 + PIC64GX_PINCTRL_GROUP(can1, BIT(22) | BIT(23) | BIT(25)), 146 + PIC64GX_PINCTRL_GROUP(uart2, BIT(26) | BIT(27)), 147 + }; 148 + 149 + static const char * const pic64gx_gpio2_gpio_groups[] = { 150 + "gpio_mdio0", "gpio_mdio1", "gpio_spi0", "gpio_can0", "gpio_pcie", 151 + "gpio_qspi", "gpio_uart3", "gpio_uart4", "gpio_can1", "gpio_uart2" 152 + }; 153 + 154 + static const char * const pic64gx_gpio2_mdio0_groups[] = { 155 + "mdio0" 156 + }; 157 + 158 + static const char * const pic64gx_gpio2_mdio1_groups[] = { 159 + "mdio1" 160 + }; 161 + 162 + static const char * const pic64gx_gpio2_spi0_groups[] = { 163 + "spi0" 164 + }; 165 + 166 + static const char * const pic64gx_gpio2_can0_groups[] = { 167 + "can0" 168 + }; 169 + 170 + static const char * const pic64gx_gpio2_pcie_groups[] = { 171 + "pcie" 172 + }; 173 + 174 + static const char * const pic64gx_gpio2_qspi_groups[] = { 175 + "qspi" 176 + }; 177 + 178 + static const char * const pic64gx_gpio2_uart3_groups[] = { 179 + "uart3" 180 + }; 181 + 182 + static const char * const pic64gx_gpio2_uart4_groups[] = { 183 + "uart4" 184 + }; 185 + 186 + static const char * const pic64gx_gpio2_can1_groups[] = { 187 + "can1" 188 + }; 189 + 190 + static const char * const pic64gx_gpio2_uart2_groups[] = { 191 + "uart2" 192 + }; 193 + 194 + #define PIC64GX_PINCTRL_FUNCTION(_name) { \ 195 + .name = #_name, \ 196 + .groups = pic64gx_gpio2_##_name##_groups, \ 197 + .num_groups = ARRAY_SIZE(pic64gx_gpio2_##_name##_groups), \ 198 + } 199 + 200 + static const struct pic64gx_gpio2_function pic64gx_gpio2_functions[] = { 201 + PIC64GX_PINCTRL_FUNCTION(gpio), 202 + PIC64GX_PINCTRL_FUNCTION(mdio0), 203 + PIC64GX_PINCTRL_FUNCTION(mdio1), 204 + PIC64GX_PINCTRL_FUNCTION(spi0), 205 + PIC64GX_PINCTRL_FUNCTION(can0), 206 + PIC64GX_PINCTRL_FUNCTION(pcie), 207 + PIC64GX_PINCTRL_FUNCTION(qspi), 208 + PIC64GX_PINCTRL_FUNCTION(uart3), 209 + PIC64GX_PINCTRL_FUNCTION(uart4), 210 + PIC64GX_PINCTRL_FUNCTION(can1), 211 + PIC64GX_PINCTRL_FUNCTION(uart2), 212 + }; 213 + 214 + static void pic64gx_gpio2_pin_dbg_show(struct pinctrl_dev *pctrl_dev, struct seq_file *seq, 215 + unsigned int pin) 216 + { 217 + struct pic64gx_gpio2_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctrl_dev); 218 + u32 val; 219 + 220 + regmap_read(pctrl->regmap, PIC64GX_PINMUX_REG, &val); 221 + val = (val & BIT(pin)) >> pin; 222 + seq_printf(seq, "pin: %u val: %x\n", pin, val); 223 + } 224 + 225 + static int pic64gx_gpio2_groups_count(struct pinctrl_dev *pctldev) 226 + { 227 + return ARRAY_SIZE(pic64gx_gpio2_pin_groups); 228 + } 229 + 230 + static const char *pic64gx_gpio2_group_name(struct pinctrl_dev *pctldev, unsigned int selector) 231 + { 232 + return pic64gx_gpio2_pin_groups[selector].name; 233 + } 234 + 235 + static int pic64gx_gpio2_group_pins(struct pinctrl_dev *pctldev, unsigned int selector, 236 + const unsigned int **pins, unsigned int *num_pins) 237 + { 238 + *pins = pic64gx_gpio2_pin_groups[selector].pins; 239 + *num_pins = pic64gx_gpio2_pin_groups[selector].num_pins; 240 + 241 + return 0; 242 + } 243 + 244 + static const struct pinctrl_ops pic64gx_gpio2_pinctrl_ops = { 245 + .get_groups_count = pic64gx_gpio2_groups_count, 246 + .get_group_name = pic64gx_gpio2_group_name, 247 + .get_group_pins = pic64gx_gpio2_group_pins, 248 + .dt_node_to_map = pinconf_generic_dt_node_to_map_all, 249 + .dt_free_map = pinctrl_utils_free_map, 250 + .pin_dbg_show = pic64gx_gpio2_pin_dbg_show, 251 + }; 252 + 253 + static int pic64gx_gpio2_pinmux_get_funcs_count(struct pinctrl_dev *pctldev) 254 + { 255 + return ARRAY_SIZE(pic64gx_gpio2_functions); 256 + } 257 + 258 + static const char *pic64gx_gpio2_pinmux_get_func_name(struct pinctrl_dev *pctldev, 259 + unsigned int selector) 260 + { 261 + return pic64gx_gpio2_functions[selector].name; 262 + } 263 + 264 + static int pic64gx_gpio2_pinmux_get_groups(struct pinctrl_dev *pctldev, unsigned int selector, 265 + const char * const **groups, 266 + unsigned int * const num_groups) 267 + { 268 + *groups = pic64gx_gpio2_functions[selector].groups; 269 + *num_groups = pic64gx_gpio2_functions[selector].num_groups; 270 + 271 + return 0; 272 + } 273 + 274 + static int pic64gx_gpio2_pinmux_set_mux(struct pinctrl_dev *pctrl_dev, unsigned int fsel, 275 + unsigned int gsel) 276 + { 277 + struct pic64gx_gpio2_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctrl_dev); 278 + struct device *dev = pctrl->dev; 279 + const struct pic64gx_gpio2_pin_group *group; 280 + const struct pic64gx_gpio2_function *function; 281 + 282 + group = &pic64gx_gpio2_pin_groups[gsel]; 283 + function = &pic64gx_gpio2_functions[fsel]; 284 + 285 + dev_dbg(dev, "Setting func %s mask %x setting %x\n", 286 + function->name, group->mask, group->setting); 287 + regmap_assign_bits(pctrl->regmap, PIC64GX_PINMUX_REG, group->mask, group->setting); 288 + 289 + return 0; 290 + } 291 + 292 + static const struct pinmux_ops pic64gx_gpio2_pinmux_ops = { 293 + .get_functions_count = pic64gx_gpio2_pinmux_get_funcs_count, 294 + .get_function_name = pic64gx_gpio2_pinmux_get_func_name, 295 + .get_function_groups = pic64gx_gpio2_pinmux_get_groups, 296 + .set_mux = pic64gx_gpio2_pinmux_set_mux, 297 + }; 298 + 299 + static int pic64gx_gpio2_probe(struct platform_device *pdev) 300 + { 301 + struct device *dev = &pdev->dev; 302 + struct pic64gx_gpio2_pinctrl *pctrl; 303 + void __iomem *base; 304 + 305 + pctrl = devm_kzalloc(dev, sizeof(*pctrl), GFP_KERNEL); 306 + if (!pctrl) 307 + return -ENOMEM; 308 + 309 + base = devm_platform_ioremap_resource(pdev, 0); 310 + if (IS_ERR(base)) { 311 + dev_err(dev, "Failed get resource\n"); 312 + return PTR_ERR(base); 313 + } 314 + 315 + pctrl->regmap = devm_regmap_init_mmio(dev, base, &pic64gx_gpio2_regmap_config); 316 + if (IS_ERR(pctrl->regmap)) { 317 + dev_err(dev, "Failed to map regmap\n"); 318 + return PTR_ERR(pctrl->regmap); 319 + } 320 + 321 + pctrl->desc.name = dev_name(dev); 322 + pctrl->desc.pins = pic64gx_gpio2_pins; 323 + pctrl->desc.npins = ARRAY_SIZE(pic64gx_gpio2_pins); 324 + pctrl->desc.pctlops = &pic64gx_gpio2_pinctrl_ops; 325 + pctrl->desc.pmxops = &pic64gx_gpio2_pinmux_ops; 326 + pctrl->desc.owner = THIS_MODULE; 327 + 328 + pctrl->dev = dev; 329 + 330 + platform_set_drvdata(pdev, pctrl); 331 + 332 + pctrl->pctrl = devm_pinctrl_register(&pdev->dev, &pctrl->desc, pctrl); 333 + if (IS_ERR(pctrl->pctrl)) 334 + return PTR_ERR(pctrl->pctrl); 335 + 336 + return 0; 337 + } 338 + 339 + static const struct of_device_id pic64gx_gpio2_of_match[] = { 340 + { .compatible = "microchip,pic64gx-pinctrl-gpio2" }, 341 + { } 342 + }; 343 + MODULE_DEVICE_TABLE(of, pic64gx_gpio2_of_match); 344 + 345 + static struct platform_driver pic64gx_gpio2_driver = { 346 + .driver = { 347 + .name = "pic64gx-pinctrl-gpio2", 348 + .of_match_table = pic64gx_gpio2_of_match, 349 + }, 350 + .probe = pic64gx_gpio2_probe, 351 + }; 352 + module_platform_driver(pic64gx_gpio2_driver); 353 + 354 + MODULE_AUTHOR("Conor Dooley <conor.dooley@microchip.com>"); 355 + MODULE_DESCRIPTION("pic64gx gpio2 pinctrl driver"); 356 + MODULE_LICENSE("GPL");
+434 -8
drivers/pinctrl/pinctrl-rockchip.c
··· 105 105 .pull_type[3] = pull3, \ 106 106 } 107 107 108 + #define PIN_BANK_IOMUX_FLAGS_OFFSET_DRV_FLAGS(id, pins, label, iom0, \ 109 + iom1, iom2, iom3, \ 110 + offset0, offset1, \ 111 + offset2, offset3, drv0, \ 112 + drv1, drv2, drv3) \ 113 + { \ 114 + .bank_num = id, \ 115 + .nr_pins = pins, \ 116 + .name = label, \ 117 + .iomux = { \ 118 + { .type = iom0, .offset = offset0 }, \ 119 + { .type = iom1, .offset = offset1 }, \ 120 + { .type = iom2, .offset = offset2 }, \ 121 + { .type = iom3, .offset = offset3 }, \ 122 + }, \ 123 + .drv = { \ 124 + { .drv_type = drv0, .offset = -1 }, \ 125 + { .drv_type = drv1, .offset = -1 }, \ 126 + { .drv_type = drv2, .offset = -1 }, \ 127 + { .drv_type = drv3, .offset = -1 }, \ 128 + }, \ 129 + } 130 + 108 131 #define PIN_BANK_DRV_FLAGS(id, pins, label, type0, type1, type2, type3) \ 109 132 { \ 110 133 .bank_num = id, \ ··· 249 226 { .drv_type = drv1, .offset = offset1 }, \ 250 227 { .drv_type = drv2, .offset = offset2 }, \ 251 228 { .drv_type = drv3, .offset = offset3 }, \ 229 + }, \ 230 + .pull_type[0] = pull0, \ 231 + .pull_type[1] = pull1, \ 232 + .pull_type[2] = pull2, \ 233 + .pull_type[3] = pull3, \ 234 + } 235 + 236 + #define PIN_BANK_IOMUX_FLAGS_OFFSET_DRV_FLAGS_PULL_FLAGS(id, pins, \ 237 + label, iom0, iom1, \ 238 + iom2, iom3, offset0, \ 239 + offset1, offset2, \ 240 + offset3, drv0, drv1, \ 241 + drv2, drv3, pull0, \ 242 + pull1, pull2, pull3) \ 243 + { \ 244 + .bank_num = id, \ 245 + .nr_pins = pins, \ 246 + .name = label, \ 247 + .iomux = { \ 248 + { .type = iom0, .offset = offset0 }, \ 249 + { .type = iom1, .offset = offset1 }, \ 250 + { .type = iom2, .offset = offset2 }, \ 251 + { .type = iom3, .offset = offset3 }, \ 252 + }, \ 253 + .drv = { \ 254 + { .drv_type = drv0, .offset = -1 }, \ 255 + { .drv_type = drv1, .offset = -1 }, \ 256 + { .drv_type = drv2, .offset = -1 }, \ 257 + { .drv_type = drv3, .offset = -1 }, \ 252 258 }, \ 253 259 .pull_type[0] = pull0, \ 254 260 .pull_type[1] = pull1, \ ··· 1172 1120 else 1173 1121 regmap = info->regmap_base; 1174 1122 1123 + if (ctrl->type == RK3506) { 1124 + if (bank->bank_num == 1) 1125 + regmap = info->regmap_ioc1; 1126 + else if (bank->bank_num == 4) 1127 + return 0; 1128 + } 1129 + 1175 1130 /* get basic quadrupel of mux registers and the correct reg inside */ 1176 1131 mux_type = bank->iomux[iomux_num].type; 1177 1132 reg = bank->iomux[iomux_num].offset; ··· 1297 1238 regmap = (pin % 8 < 4) ? info->regmap_pmu : info->regmap_base; 1298 1239 else 1299 1240 regmap = info->regmap_base; 1241 + 1242 + if (ctrl->type == RK3506) { 1243 + if (bank->bank_num == 1) 1244 + regmap = info->regmap_ioc1; 1245 + else if (bank->bank_num == 4) 1246 + return 0; 1247 + } 1300 1248 1301 1249 /* get basic quadrupel of mux registers and the correct reg inside */ 1302 1250 mux_type = bank->iomux[iomux_num].type; ··· 2069 2003 return 0; 2070 2004 } 2071 2005 2006 + #define RK3506_DRV_BITS_PER_PIN 8 2007 + #define RK3506_DRV_PINS_PER_REG 2 2008 + #define RK3506_DRV_GPIO0_A_OFFSET 0x100 2009 + #define RK3506_DRV_GPIO0_D_OFFSET 0x830 2010 + #define RK3506_DRV_GPIO1_OFFSET 0x140 2011 + #define RK3506_DRV_GPIO2_OFFSET 0x180 2012 + #define RK3506_DRV_GPIO3_OFFSET 0x1c0 2013 + #define RK3506_DRV_GPIO4_OFFSET 0x840 2014 + 2015 + static int rk3506_calc_drv_reg_and_bit(struct rockchip_pin_bank *bank, 2016 + int pin_num, struct regmap **regmap, 2017 + int *reg, u8 *bit) 2018 + { 2019 + struct rockchip_pinctrl *info = bank->drvdata; 2020 + int ret = 0; 2021 + 2022 + switch (bank->bank_num) { 2023 + case 0: 2024 + *regmap = info->regmap_pmu; 2025 + if (pin_num > 24) { 2026 + ret = -EINVAL; 2027 + } else if (pin_num < 24) { 2028 + *reg = RK3506_DRV_GPIO0_A_OFFSET; 2029 + } else { 2030 + *reg = RK3506_DRV_GPIO0_D_OFFSET; 2031 + *bit = 3; 2032 + 2033 + return 0; 2034 + } 2035 + break; 2036 + 2037 + case 1: 2038 + *regmap = info->regmap_ioc1; 2039 + if (pin_num < 28) 2040 + *reg = RK3506_DRV_GPIO1_OFFSET; 2041 + else 2042 + ret = -EINVAL; 2043 + break; 2044 + 2045 + case 2: 2046 + *regmap = info->regmap_base; 2047 + if (pin_num < 17) 2048 + *reg = RK3506_DRV_GPIO2_OFFSET; 2049 + else 2050 + ret = -EINVAL; 2051 + break; 2052 + 2053 + case 3: 2054 + *regmap = info->regmap_base; 2055 + if (pin_num < 15) 2056 + *reg = RK3506_DRV_GPIO3_OFFSET; 2057 + else 2058 + ret = -EINVAL; 2059 + break; 2060 + 2061 + case 4: 2062 + *regmap = info->regmap_base; 2063 + if (pin_num < 8 || pin_num > 11) { 2064 + ret = -EINVAL; 2065 + } else { 2066 + *reg = RK3506_DRV_GPIO4_OFFSET; 2067 + *bit = 10; 2068 + 2069 + return 0; 2070 + } 2071 + break; 2072 + 2073 + default: 2074 + ret = -EINVAL; 2075 + break; 2076 + } 2077 + 2078 + if (ret) { 2079 + dev_err(info->dev, "unsupported bank_num %d pin_num %d\n", bank->bank_num, pin_num); 2080 + 2081 + return ret; 2082 + } 2083 + 2084 + *reg += ((pin_num / RK3506_DRV_PINS_PER_REG) * 4); 2085 + *bit = pin_num % RK3506_DRV_PINS_PER_REG; 2086 + *bit *= RK3506_DRV_BITS_PER_PIN; 2087 + 2088 + return 0; 2089 + } 2090 + 2091 + #define RK3506_PULL_BITS_PER_PIN 2 2092 + #define RK3506_PULL_PINS_PER_REG 8 2093 + #define RK3506_PULL_GPIO0_A_OFFSET 0x200 2094 + #define RK3506_PULL_GPIO0_D_OFFSET 0x830 2095 + #define RK3506_PULL_GPIO1_OFFSET 0x210 2096 + #define RK3506_PULL_GPIO2_OFFSET 0x220 2097 + #define RK3506_PULL_GPIO3_OFFSET 0x230 2098 + #define RK3506_PULL_GPIO4_OFFSET 0x840 2099 + 2100 + static int rk3506_calc_pull_reg_and_bit(struct rockchip_pin_bank *bank, 2101 + int pin_num, struct regmap **regmap, 2102 + int *reg, u8 *bit) 2103 + { 2104 + struct rockchip_pinctrl *info = bank->drvdata; 2105 + int ret = 0; 2106 + 2107 + switch (bank->bank_num) { 2108 + case 0: 2109 + *regmap = info->regmap_pmu; 2110 + if (pin_num > 24) { 2111 + ret = -EINVAL; 2112 + } else if (pin_num < 24) { 2113 + *reg = RK3506_PULL_GPIO0_A_OFFSET; 2114 + } else { 2115 + *reg = RK3506_PULL_GPIO0_D_OFFSET; 2116 + *bit = 5; 2117 + 2118 + return 0; 2119 + } 2120 + break; 2121 + 2122 + case 1: 2123 + *regmap = info->regmap_ioc1; 2124 + if (pin_num < 28) 2125 + *reg = RK3506_PULL_GPIO1_OFFSET; 2126 + else 2127 + ret = -EINVAL; 2128 + break; 2129 + 2130 + case 2: 2131 + *regmap = info->regmap_base; 2132 + if (pin_num < 17) 2133 + *reg = RK3506_PULL_GPIO2_OFFSET; 2134 + else 2135 + ret = -EINVAL; 2136 + break; 2137 + 2138 + case 3: 2139 + *regmap = info->regmap_base; 2140 + if (pin_num < 15) 2141 + *reg = RK3506_PULL_GPIO3_OFFSET; 2142 + else 2143 + ret = -EINVAL; 2144 + break; 2145 + 2146 + case 4: 2147 + *regmap = info->regmap_base; 2148 + if (pin_num < 8 || pin_num > 11) { 2149 + ret = -EINVAL; 2150 + } else { 2151 + *reg = RK3506_PULL_GPIO4_OFFSET; 2152 + *bit = 13; 2153 + 2154 + return 0; 2155 + } 2156 + break; 2157 + 2158 + default: 2159 + ret = -EINVAL; 2160 + break; 2161 + } 2162 + 2163 + if (ret) { 2164 + dev_err(info->dev, "unsupported bank_num %d pin_num %d\n", bank->bank_num, pin_num); 2165 + 2166 + return ret; 2167 + } 2168 + 2169 + *reg += ((pin_num / RK3506_PULL_PINS_PER_REG) * 4); 2170 + *bit = pin_num % RK3506_PULL_PINS_PER_REG; 2171 + *bit *= RK3506_PULL_BITS_PER_PIN; 2172 + 2173 + return 0; 2174 + } 2175 + 2176 + #define RK3506_SMT_BITS_PER_PIN 1 2177 + #define RK3506_SMT_PINS_PER_REG 8 2178 + #define RK3506_SMT_GPIO0_A_OFFSET 0x400 2179 + #define RK3506_SMT_GPIO0_D_OFFSET 0x830 2180 + #define RK3506_SMT_GPIO1_OFFSET 0x410 2181 + #define RK3506_SMT_GPIO2_OFFSET 0x420 2182 + #define RK3506_SMT_GPIO3_OFFSET 0x430 2183 + #define RK3506_SMT_GPIO4_OFFSET 0x840 2184 + 2185 + static int rk3506_calc_schmitt_reg_and_bit(struct rockchip_pin_bank *bank, 2186 + int pin_num, 2187 + struct regmap **regmap, 2188 + int *reg, u8 *bit) 2189 + { 2190 + struct rockchip_pinctrl *info = bank->drvdata; 2191 + int ret = 0; 2192 + 2193 + switch (bank->bank_num) { 2194 + case 0: 2195 + *regmap = info->regmap_pmu; 2196 + if (pin_num > 24) { 2197 + ret = -EINVAL; 2198 + } else if (pin_num < 24) { 2199 + *reg = RK3506_SMT_GPIO0_A_OFFSET; 2200 + } else { 2201 + *reg = RK3506_SMT_GPIO0_D_OFFSET; 2202 + *bit = 9; 2203 + 2204 + return 0; 2205 + } 2206 + break; 2207 + 2208 + case 1: 2209 + *regmap = info->regmap_ioc1; 2210 + if (pin_num < 28) 2211 + *reg = RK3506_SMT_GPIO1_OFFSET; 2212 + else 2213 + ret = -EINVAL; 2214 + break; 2215 + 2216 + case 2: 2217 + *regmap = info->regmap_base; 2218 + if (pin_num < 17) 2219 + *reg = RK3506_SMT_GPIO2_OFFSET; 2220 + else 2221 + ret = -EINVAL; 2222 + break; 2223 + 2224 + case 3: 2225 + *regmap = info->regmap_base; 2226 + if (pin_num < 15) 2227 + *reg = RK3506_SMT_GPIO3_OFFSET; 2228 + else 2229 + ret = -EINVAL; 2230 + break; 2231 + 2232 + case 4: 2233 + *regmap = info->regmap_base; 2234 + if (pin_num < 8 || pin_num > 11) { 2235 + ret = -EINVAL; 2236 + } else { 2237 + *reg = RK3506_SMT_GPIO4_OFFSET; 2238 + *bit = 8; 2239 + 2240 + return 0; 2241 + } 2242 + break; 2243 + 2244 + default: 2245 + ret = -EINVAL; 2246 + break; 2247 + } 2248 + 2249 + if (ret) { 2250 + dev_err(info->dev, "unsupported bank_num %d pin_num %d\n", bank->bank_num, pin_num); 2251 + 2252 + return ret; 2253 + } 2254 + 2255 + *reg += ((pin_num / RK3506_SMT_PINS_PER_REG) * 4); 2256 + *bit = pin_num % RK3506_SMT_PINS_PER_REG; 2257 + *bit *= RK3506_SMT_BITS_PER_PIN; 2258 + 2259 + return 0; 2260 + } 2261 + 2072 2262 #define RK3528_DRV_BITS_PER_PIN 8 2073 2263 #define RK3528_DRV_PINS_PER_REG 2 2074 2264 #define RK3528_DRV_GPIO0_OFFSET 0x100 ··· 3071 2749 rmask_bits = RK3588_DRV_BITS_PER_PIN; 3072 2750 ret = strength; 3073 2751 goto config; 3074 - } else if (ctrl->type == RK3528 || 2752 + } else if (ctrl->type == RK3506 || 2753 + ctrl->type == RK3528 || 3075 2754 ctrl->type == RK3562 || 3076 2755 ctrl->type == RK3568) { 3077 2756 rmask_bits = RK3568_DRV_BITS_PER_PIN; ··· 3151 2828 case DRV_TYPE_IO_1V8_ONLY: 3152 2829 rmask_bits = RK3288_DRV_BITS_PER_PIN; 3153 2830 break; 2831 + case DRV_TYPE_IO_LEVEL_2_BIT: 2832 + ret = regmap_read(regmap, reg, &data); 2833 + if (ret) 2834 + return ret; 2835 + data >>= bit; 2836 + 2837 + return data & 0x3; 2838 + case DRV_TYPE_IO_LEVEL_8_BIT: 2839 + ret = regmap_read(regmap, reg, &data); 2840 + if (ret) 2841 + return ret; 2842 + data >>= bit; 2843 + data &= (1 << 8) - 1; 2844 + 2845 + ret = hweight8(data); 2846 + if (ret > 0) 2847 + return ret - 1; 2848 + else 2849 + return -EINVAL; 3154 2850 default: 3155 2851 dev_err(dev, "unsupported pinctrl drive type: %d\n", drv_type); 3156 2852 return -EINVAL; 3157 2853 } 3158 2854 3159 2855 config: 2856 + if (ctrl->type == RK3506) { 2857 + if ((bank->bank_num == 0 && pin_num == 24) || bank->bank_num == 4) { 2858 + rmask_bits = 2; 2859 + ret = strength; 2860 + } 2861 + } 3160 2862 /* enable the write to the equivalent lower bits */ 3161 2863 data = ((1 << rmask_bits) - 1) << (bit + 16); 3162 2864 rmask = data | (data >> 16); ··· 3305 2957 case RK3328: 3306 2958 case RK3368: 3307 2959 case RK3399: 2960 + case RK3506: 3308 2961 case RK3528: 3309 2962 case RK3562: 3310 2963 case RK3568: ··· 3426 3077 break; 3427 3078 } 3428 3079 3080 + if (ctrl->type == RK3506) 3081 + if ((bank->bank_num == 0 && pin_num == 24) || bank->bank_num == 4) 3082 + return data & 0x3; 3083 + 3429 3084 return data & 0x1; 3430 3085 } 3431 3086 ··· 3463 3110 data = BIT(bit + 16) | (enable << bit); 3464 3111 rmask = BIT(bit + 16) | BIT(bit); 3465 3112 break; 3113 + } 3114 + 3115 + if (ctrl->type == RK3506) { 3116 + if ((bank->bank_num == 0 && pin_num == 24) || bank->bank_num == 4) { 3117 + data = 0x3 << (bit + 16); 3118 + rmask = data | (data >> 16); 3119 + data |= ((enable ? 0x3 : 0) << bit); 3120 + } 3466 3121 } 3467 3122 3468 3123 return regmap_update_bits(regmap, reg, rmask, data); ··· 3588 3227 case RK3328: 3589 3228 case RK3368: 3590 3229 case RK3399: 3230 + case RK3506: 3591 3231 case RK3528: 3592 3232 case RK3562: 3593 3233 case RK3568: ··· 4242 3880 } 4243 3881 4244 3882 /* try to find the optional reference to the pmu syscon */ 4245 - node = of_parse_phandle(np, "rockchip,pmu", 0); 4246 - if (node) { 4247 - info->regmap_pmu = syscon_node_to_regmap(node); 4248 - of_node_put(node); 4249 - if (IS_ERR(info->regmap_pmu)) 4250 - return PTR_ERR(info->regmap_pmu); 4251 - } 3883 + info->regmap_pmu = syscon_regmap_lookup_by_phandle_optional(np, "rockchip,pmu"); 3884 + 3885 + /* try to find the optional reference to the ioc1 syscon */ 3886 + info->regmap_ioc1 = syscon_regmap_lookup_by_phandle_optional(np, "rockchip,ioc1"); 4252 3887 4253 3888 ret = rockchip_pinctrl_register(pdev, info); 4254 3889 if (ret) ··· 4709 4350 .drv_calc_reg = rk3399_calc_drv_reg_and_bit, 4710 4351 }; 4711 4352 4353 + static struct rockchip_pin_bank rk3506_pin_banks[] = { 4354 + PIN_BANK_IOMUX_FLAGS_OFFSET_DRV_FLAGS_PULL_FLAGS(0, 32, "gpio0", 4355 + IOMUX_WIDTH_4BIT | IOMUX_SOURCE_PMU, 4356 + IOMUX_WIDTH_4BIT | IOMUX_SOURCE_PMU, 4357 + IOMUX_WIDTH_4BIT | IOMUX_SOURCE_PMU, 4358 + IOMUX_WIDTH_2BIT | IOMUX_SOURCE_PMU, 4359 + 0x0, 0x8, 0x10, 0x830, 4360 + DRV_TYPE_IO_LEVEL_8_BIT, 4361 + DRV_TYPE_IO_LEVEL_8_BIT, 4362 + DRV_TYPE_IO_LEVEL_8_BIT, 4363 + DRV_TYPE_IO_LEVEL_2_BIT, 4364 + 0, 0, 0, 1), 4365 + PIN_BANK_IOMUX_FLAGS_OFFSET_DRV_FLAGS(1, 32, "gpio1", 4366 + IOMUX_WIDTH_4BIT, 4367 + IOMUX_WIDTH_4BIT, 4368 + IOMUX_WIDTH_4BIT, 4369 + IOMUX_WIDTH_4BIT, 4370 + 0x20, 0x28, 0x30, 0x38, 4371 + DRV_TYPE_IO_LEVEL_8_BIT, 4372 + DRV_TYPE_IO_LEVEL_8_BIT, 4373 + DRV_TYPE_IO_LEVEL_8_BIT, 4374 + DRV_TYPE_IO_LEVEL_8_BIT), 4375 + PIN_BANK_IOMUX_FLAGS_OFFSET_DRV_FLAGS(2, 32, "gpio2", 4376 + IOMUX_WIDTH_4BIT, 4377 + IOMUX_WIDTH_4BIT, 4378 + IOMUX_WIDTH_4BIT, 4379 + IOMUX_WIDTH_4BIT, 4380 + 0x40, 0x48, 0x50, 0x58, 4381 + DRV_TYPE_IO_LEVEL_8_BIT, 4382 + DRV_TYPE_IO_LEVEL_8_BIT, 4383 + DRV_TYPE_IO_LEVEL_8_BIT, 4384 + DRV_TYPE_IO_LEVEL_8_BIT), 4385 + PIN_BANK_IOMUX_FLAGS_OFFSET_DRV_FLAGS(3, 32, "gpio3", 4386 + IOMUX_WIDTH_4BIT, 4387 + IOMUX_WIDTH_4BIT, 4388 + IOMUX_WIDTH_4BIT, 4389 + IOMUX_WIDTH_4BIT, 4390 + 0x60, 0x68, 0x70, 0x78, 4391 + DRV_TYPE_IO_LEVEL_8_BIT, 4392 + DRV_TYPE_IO_LEVEL_8_BIT, 4393 + DRV_TYPE_IO_LEVEL_8_BIT, 4394 + DRV_TYPE_IO_LEVEL_8_BIT), 4395 + PIN_BANK_IOMUX_FLAGS_OFFSET_DRV_FLAGS_PULL_FLAGS(4, 32, "gpio4", 4396 + IOMUX_WIDTH_4BIT, 4397 + IOMUX_WIDTH_4BIT, 4398 + IOMUX_WIDTH_4BIT, 4399 + IOMUX_WIDTH_4BIT, 4400 + 0x80, 0x88, 0x90, 0x98, 4401 + DRV_TYPE_IO_LEVEL_2_BIT, 4402 + DRV_TYPE_IO_LEVEL_2_BIT, 4403 + DRV_TYPE_IO_LEVEL_2_BIT, 4404 + DRV_TYPE_IO_LEVEL_2_BIT, 4405 + 1, 1, 1, 1), 4406 + }; 4407 + 4408 + static struct rockchip_pin_ctrl rk3506_pin_ctrl __maybe_unused = { 4409 + .pin_banks = rk3506_pin_banks, 4410 + .nr_banks = ARRAY_SIZE(rk3506_pin_banks), 4411 + .label = "RK3506-GPIO", 4412 + .type = RK3506, 4413 + .pull_calc_reg = rk3506_calc_pull_reg_and_bit, 4414 + .drv_calc_reg = rk3506_calc_drv_reg_and_bit, 4415 + .schmitt_calc_reg = rk3506_calc_schmitt_reg_and_bit, 4416 + }; 4417 + 4712 4418 static struct rockchip_pin_bank rk3528_pin_banks[] = { 4713 4419 PIN_BANK_IOMUX_FLAGS_OFFSET(0, 32, "gpio0", 4714 4420 IOMUX_WIDTH_4BIT, ··· 4984 4560 .data = &rk3368_pin_ctrl }, 4985 4561 { .compatible = "rockchip,rk3399-pinctrl", 4986 4562 .data = &rk3399_pin_ctrl }, 4563 + { .compatible = "rockchip,rk3506-pinctrl", 4564 + .data = &rk3506_pin_ctrl }, 4987 4565 { .compatible = "rockchip,rk3528-pinctrl", 4988 4566 .data = &rk3528_pin_ctrl }, 4989 4567 { .compatible = "rockchip,rk3562-pinctrl",
+4
drivers/pinctrl/pinctrl-rockchip.h
··· 196 196 RK3328, 197 197 RK3368, 198 198 RK3399, 199 + RK3506, 199 200 RK3528, 200 201 RK3562, 201 202 RK3568, ··· 261 260 DRV_TYPE_IO_1V8_ONLY, 262 261 DRV_TYPE_IO_1V8_3V0_AUTO, 263 262 DRV_TYPE_IO_3V3_ONLY, 263 + DRV_TYPE_IO_LEVEL_2_BIT, 264 + DRV_TYPE_IO_LEVEL_8_BIT, 264 265 DRV_TYPE_MAX 265 266 }; 266 267 ··· 461 458 int reg_size; 462 459 struct regmap *regmap_pull; 463 460 struct regmap *regmap_pmu; 461 + struct regmap *regmap_ioc1; 464 462 struct device *dev; 465 463 struct rockchip_pin_ctrl *ctrl; 466 464 struct pinctrl_desc pctl;
-2
drivers/pinctrl/pinctrl-scmi.c
··· 40 40 struct pinctrl_desc pctl_desc; 41 41 struct pinfunction *functions; 42 42 unsigned int nr_functions; 43 - struct pinctrl_pin_desc *pins; 44 - unsigned int nr_pins; 45 43 }; 46 44 47 45 static int pinctrl_scmi_get_groups_count(struct pinctrl_dev *pctldev)
+4 -3
drivers/pinctrl/pinctrl-single.c
··· 485 485 struct pcs_device *pcs = pinctrl_dev_get_drvdata(pctldev); 486 486 struct pcs_function *func; 487 487 enum pin_config_param param; 488 - unsigned offset = 0, data = 0, i, j, ret; 488 + unsigned offset = 0, data = 0, i, j; 489 + int ret; 489 490 490 491 ret = pcs_get_function(pctldev, pin, &func); 491 492 if (ret) ··· 550 549 { 551 550 struct pcs_device *pcs = pinctrl_dev_get_drvdata(pctldev); 552 551 struct pcs_function *func; 553 - unsigned offset = 0, shift = 0, i, data, ret; 552 + unsigned offset = 0, shift = 0, i, data; 554 553 u32 arg; 555 - int j; 554 + int j, ret; 556 555 enum pin_config_param param; 557 556 558 557 ret = pcs_get_function(pctldev, pin, &func);
+8
drivers/pinctrl/qcom/Kconfig.msm
··· 92 92 Qualcomm Technologies Inc. IPQ9574 platform. Select this for 93 93 IPQ9574. 94 94 95 + config PINCTRL_KAANAPALI 96 + tristate "Qualcomm Technologies Inc Kaanapali pin controller driver" 97 + depends on ARM64 || COMPILE_TEST 98 + help 99 + This is the pinctrl, pinmux, pinconf and gpiolib driver for the 100 + Qualcomm Technologies Inc TLMM block found on the Qualcomm 101 + Technologies Inc Kaanapali platform. 102 + 95 103 config PINCTRL_MSM8226 96 104 tristate "Qualcomm 8226 pin controller driver" 97 105 depends on ARM || COMPILE_TEST
+1
drivers/pinctrl/qcom/Makefile
··· 12 12 obj-$(CONFIG_PINCTRL_IPQ8074) += pinctrl-ipq8074.o 13 13 obj-$(CONFIG_PINCTRL_IPQ6018) += pinctrl-ipq6018.o 14 14 obj-$(CONFIG_PINCTRL_IPQ9574) += pinctrl-ipq9574.o 15 + obj-$(CONFIG_PINCTRL_KAANAPALI) += pinctrl-kaanapali.o 15 16 obj-$(CONFIG_PINCTRL_MSM8226) += pinctrl-msm8226.o 16 17 obj-$(CONFIG_PINCTRL_MSM8660) += pinctrl-msm8660.o 17 18 obj-$(CONFIG_PINCTRL_MSM8960) += pinctrl-msm8960.o
+3 -3
drivers/pinctrl/qcom/pinctrl-glymur.c
··· 1316 1316 }; 1317 1317 1318 1318 static const struct pinfunction glymur_functions[] = { 1319 - MSM_PIN_FUNCTION(gpio), 1319 + MSM_GPIO_PIN_FUNCTION(gpio), 1320 1320 MSM_PIN_FUNCTION(resout_gpio_n), 1321 1321 MSM_PIN_FUNCTION(aoss_cti), 1322 1322 MSM_PIN_FUNCTION(asc_cci), ··· 1342 1342 MSM_PIN_FUNCTION(edp0_hot), 1343 1343 MSM_PIN_FUNCTION(edp0_lcd), 1344 1344 MSM_PIN_FUNCTION(edp1_lcd), 1345 - MSM_PIN_FUNCTION(egpio), 1345 + MSM_GPIO_PIN_FUNCTION(egpio), 1346 1346 MSM_PIN_FUNCTION(eusb_ac_en), 1347 1347 MSM_PIN_FUNCTION(gcc_gp1), 1348 1348 MSM_PIN_FUNCTION(gcc_gp2), ··· 1743 1743 }; 1744 1744 1745 1745 static const struct of_device_id glymur_tlmm_of_match[] = { 1746 - { .compatible = "qcom,glymur-tlmm", .data = &glymur_tlmm }, 1746 + { .compatible = "qcom,glymur-tlmm", }, 1747 1747 { } 1748 1748 }; 1749 1749
+1803
drivers/pinctrl/qcom/pinctrl-kaanapali.c
··· 1 + // SPDX-License-Identifier: GPL-2.0-only 2 + /* 3 + * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. 4 + */ 5 + 6 + #include <linux/module.h> 7 + #include <linux/of.h> 8 + #include <linux/platform_device.h> 9 + 10 + #include "pinctrl-msm.h" 11 + 12 + #define REG_SIZE 0x1000 13 + #define PINGROUP(id, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11) \ 14 + { \ 15 + .grp = PINCTRL_PINGROUP("gpio" #id, \ 16 + gpio##id##_pins, \ 17 + ARRAY_SIZE(gpio##id##_pins)), \ 18 + .funcs = (int[]){ \ 19 + msm_mux_gpio, /* gpio mode */ \ 20 + msm_mux_##f1, \ 21 + msm_mux_##f2, \ 22 + msm_mux_##f3, \ 23 + msm_mux_##f4, \ 24 + msm_mux_##f5, \ 25 + msm_mux_##f6, \ 26 + msm_mux_##f7, \ 27 + msm_mux_##f8, \ 28 + msm_mux_##f9, \ 29 + msm_mux_##f10, \ 30 + msm_mux_##f11 /* egpio mode */ \ 31 + }, \ 32 + .nfuncs = 12, \ 33 + .ctl_reg = REG_SIZE * id, \ 34 + .io_reg = 0x4 + REG_SIZE * id, \ 35 + .intr_cfg_reg = 0x8 + REG_SIZE * id, \ 36 + .intr_status_reg = 0xc + REG_SIZE * id, \ 37 + .intr_target_reg = 0x8 + REG_SIZE * id, \ 38 + .mux_bit = 2, \ 39 + .pull_bit = 0, \ 40 + .drv_bit = 6, \ 41 + .egpio_enable = 12, \ 42 + .egpio_present = 11, \ 43 + .oe_bit = 9, \ 44 + .in_bit = 0, \ 45 + .out_bit = 1, \ 46 + .intr_enable_bit = 0, \ 47 + .intr_status_bit = 0, \ 48 + .intr_wakeup_present_bit = 6, \ 49 + .intr_wakeup_enable_bit = 7, \ 50 + .intr_target_bit = 8, \ 51 + .intr_target_kpss_val = 3, \ 52 + .intr_raw_status_bit = 4, \ 53 + .intr_polarity_bit = 1, \ 54 + .intr_detection_bit = 2, \ 55 + .intr_detection_width = 2, \ 56 + } 57 + 58 + #define SDC_QDSD_PINGROUP(pg_name, ctl, pull, drv) \ 59 + { \ 60 + .grp = PINCTRL_PINGROUP(#pg_name, \ 61 + pg_name##_pins, \ 62 + ARRAY_SIZE(pg_name##_pins)), \ 63 + .ctl_reg = ctl, \ 64 + .io_reg = 0, \ 65 + .intr_cfg_reg = 0, \ 66 + .intr_status_reg = 0, \ 67 + .intr_target_reg = 0, \ 68 + .mux_bit = -1, \ 69 + .pull_bit = pull, \ 70 + .drv_bit = drv, \ 71 + .oe_bit = -1, \ 72 + .in_bit = -1, \ 73 + .out_bit = -1, \ 74 + .intr_enable_bit = -1, \ 75 + .intr_status_bit = -1, \ 76 + .intr_target_bit = -1, \ 77 + .intr_raw_status_bit = -1, \ 78 + .intr_polarity_bit = -1, \ 79 + .intr_detection_bit = -1, \ 80 + .intr_detection_width = -1, \ 81 + } 82 + 83 + #define UFS_RESET(pg_name, ctl, io) \ 84 + { \ 85 + .grp = PINCTRL_PINGROUP(#pg_name, \ 86 + pg_name##_pins, \ 87 + ARRAY_SIZE(pg_name##_pins)), \ 88 + .ctl_reg = ctl, \ 89 + .io_reg = io, \ 90 + .intr_cfg_reg = 0, \ 91 + .intr_status_reg = 0, \ 92 + .intr_target_reg = 0, \ 93 + .mux_bit = -1, \ 94 + .pull_bit = 3, \ 95 + .drv_bit = 0, \ 96 + .oe_bit = -1, \ 97 + .in_bit = -1, \ 98 + .out_bit = 0, \ 99 + .intr_enable_bit = -1, \ 100 + .intr_status_bit = -1, \ 101 + .intr_target_bit = -1, \ 102 + .intr_raw_status_bit = -1, \ 103 + .intr_polarity_bit = -1, \ 104 + .intr_detection_bit = -1, \ 105 + .intr_detection_width = -1, \ 106 + } 107 + 108 + static const struct pinctrl_pin_desc kaanapali_pins[] = { 109 + PINCTRL_PIN(0, "GPIO_0"), 110 + PINCTRL_PIN(1, "GPIO_1"), 111 + PINCTRL_PIN(2, "GPIO_2"), 112 + PINCTRL_PIN(3, "GPIO_3"), 113 + PINCTRL_PIN(4, "GPIO_4"), 114 + PINCTRL_PIN(5, "GPIO_5"), 115 + PINCTRL_PIN(6, "GPIO_6"), 116 + PINCTRL_PIN(7, "GPIO_7"), 117 + PINCTRL_PIN(8, "GPIO_8"), 118 + PINCTRL_PIN(9, "GPIO_9"), 119 + PINCTRL_PIN(10, "GPIO_10"), 120 + PINCTRL_PIN(11, "GPIO_11"), 121 + PINCTRL_PIN(12, "GPIO_12"), 122 + PINCTRL_PIN(13, "GPIO_13"), 123 + PINCTRL_PIN(14, "GPIO_14"), 124 + PINCTRL_PIN(15, "GPIO_15"), 125 + PINCTRL_PIN(16, "GPIO_16"), 126 + PINCTRL_PIN(17, "GPIO_17"), 127 + PINCTRL_PIN(18, "GPIO_18"), 128 + PINCTRL_PIN(19, "GPIO_19"), 129 + PINCTRL_PIN(20, "GPIO_20"), 130 + PINCTRL_PIN(21, "GPIO_21"), 131 + PINCTRL_PIN(22, "GPIO_22"), 132 + PINCTRL_PIN(23, "GPIO_23"), 133 + PINCTRL_PIN(24, "GPIO_24"), 134 + PINCTRL_PIN(25, "GPIO_25"), 135 + PINCTRL_PIN(26, "GPIO_26"), 136 + PINCTRL_PIN(27, "GPIO_27"), 137 + PINCTRL_PIN(28, "GPIO_28"), 138 + PINCTRL_PIN(29, "GPIO_29"), 139 + PINCTRL_PIN(30, "GPIO_30"), 140 + PINCTRL_PIN(31, "GPIO_31"), 141 + PINCTRL_PIN(32, "GPIO_32"), 142 + PINCTRL_PIN(33, "GPIO_33"), 143 + PINCTRL_PIN(34, "GPIO_34"), 144 + PINCTRL_PIN(35, "GPIO_35"), 145 + PINCTRL_PIN(36, "GPIO_36"), 146 + PINCTRL_PIN(37, "GPIO_37"), 147 + PINCTRL_PIN(38, "GPIO_38"), 148 + PINCTRL_PIN(39, "GPIO_39"), 149 + PINCTRL_PIN(40, "GPIO_40"), 150 + PINCTRL_PIN(41, "GPIO_41"), 151 + PINCTRL_PIN(42, "GPIO_42"), 152 + PINCTRL_PIN(43, "GPIO_43"), 153 + PINCTRL_PIN(44, "GPIO_44"), 154 + PINCTRL_PIN(45, "GPIO_45"), 155 + PINCTRL_PIN(46, "GPIO_46"), 156 + PINCTRL_PIN(47, "GPIO_47"), 157 + PINCTRL_PIN(48, "GPIO_48"), 158 + PINCTRL_PIN(49, "GPIO_49"), 159 + PINCTRL_PIN(50, "GPIO_50"), 160 + PINCTRL_PIN(51, "GPIO_51"), 161 + PINCTRL_PIN(52, "GPIO_52"), 162 + PINCTRL_PIN(53, "GPIO_53"), 163 + PINCTRL_PIN(54, "GPIO_54"), 164 + PINCTRL_PIN(55, "GPIO_55"), 165 + PINCTRL_PIN(56, "GPIO_56"), 166 + PINCTRL_PIN(57, "GPIO_57"), 167 + PINCTRL_PIN(58, "GPIO_58"), 168 + PINCTRL_PIN(59, "GPIO_59"), 169 + PINCTRL_PIN(60, "GPIO_60"), 170 + PINCTRL_PIN(61, "GPIO_61"), 171 + PINCTRL_PIN(62, "GPIO_62"), 172 + PINCTRL_PIN(63, "GPIO_63"), 173 + PINCTRL_PIN(64, "GPIO_64"), 174 + PINCTRL_PIN(65, "GPIO_65"), 175 + PINCTRL_PIN(66, "GPIO_66"), 176 + PINCTRL_PIN(67, "GPIO_67"), 177 + PINCTRL_PIN(68, "GPIO_68"), 178 + PINCTRL_PIN(69, "GPIO_69"), 179 + PINCTRL_PIN(70, "GPIO_70"), 180 + PINCTRL_PIN(71, "GPIO_71"), 181 + PINCTRL_PIN(72, "GPIO_72"), 182 + PINCTRL_PIN(73, "GPIO_73"), 183 + PINCTRL_PIN(74, "GPIO_74"), 184 + PINCTRL_PIN(75, "GPIO_75"), 185 + PINCTRL_PIN(76, "GPIO_76"), 186 + PINCTRL_PIN(77, "GPIO_77"), 187 + PINCTRL_PIN(78, "GPIO_78"), 188 + PINCTRL_PIN(79, "GPIO_79"), 189 + PINCTRL_PIN(80, "GPIO_80"), 190 + PINCTRL_PIN(81, "GPIO_81"), 191 + PINCTRL_PIN(82, "GPIO_82"), 192 + PINCTRL_PIN(83, "GPIO_83"), 193 + PINCTRL_PIN(84, "GPIO_84"), 194 + PINCTRL_PIN(85, "GPIO_85"), 195 + PINCTRL_PIN(86, "GPIO_86"), 196 + PINCTRL_PIN(87, "GPIO_87"), 197 + PINCTRL_PIN(88, "GPIO_88"), 198 + PINCTRL_PIN(89, "GPIO_89"), 199 + PINCTRL_PIN(90, "GPIO_90"), 200 + PINCTRL_PIN(91, "GPIO_91"), 201 + PINCTRL_PIN(92, "GPIO_92"), 202 + PINCTRL_PIN(93, "GPIO_93"), 203 + PINCTRL_PIN(94, "GPIO_94"), 204 + PINCTRL_PIN(95, "GPIO_95"), 205 + PINCTRL_PIN(96, "GPIO_96"), 206 + PINCTRL_PIN(97, "GPIO_97"), 207 + PINCTRL_PIN(98, "GPIO_98"), 208 + PINCTRL_PIN(99, "GPIO_99"), 209 + PINCTRL_PIN(100, "GPIO_100"), 210 + PINCTRL_PIN(101, "GPIO_101"), 211 + PINCTRL_PIN(102, "GPIO_102"), 212 + PINCTRL_PIN(103, "GPIO_103"), 213 + PINCTRL_PIN(104, "GPIO_104"), 214 + PINCTRL_PIN(105, "GPIO_105"), 215 + PINCTRL_PIN(106, "GPIO_106"), 216 + PINCTRL_PIN(107, "GPIO_107"), 217 + PINCTRL_PIN(108, "GPIO_108"), 218 + PINCTRL_PIN(109, "GPIO_109"), 219 + PINCTRL_PIN(110, "GPIO_110"), 220 + PINCTRL_PIN(111, "GPIO_111"), 221 + PINCTRL_PIN(112, "GPIO_112"), 222 + PINCTRL_PIN(113, "GPIO_113"), 223 + PINCTRL_PIN(114, "GPIO_114"), 224 + PINCTRL_PIN(115, "GPIO_115"), 225 + PINCTRL_PIN(116, "GPIO_116"), 226 + PINCTRL_PIN(117, "GPIO_117"), 227 + PINCTRL_PIN(118, "GPIO_118"), 228 + PINCTRL_PIN(119, "GPIO_119"), 229 + PINCTRL_PIN(120, "GPIO_120"), 230 + PINCTRL_PIN(121, "GPIO_121"), 231 + PINCTRL_PIN(122, "GPIO_122"), 232 + PINCTRL_PIN(123, "GPIO_123"), 233 + PINCTRL_PIN(124, "GPIO_124"), 234 + PINCTRL_PIN(125, "GPIO_125"), 235 + PINCTRL_PIN(126, "GPIO_126"), 236 + PINCTRL_PIN(127, "GPIO_127"), 237 + PINCTRL_PIN(128, "GPIO_128"), 238 + PINCTRL_PIN(129, "GPIO_129"), 239 + PINCTRL_PIN(130, "GPIO_130"), 240 + PINCTRL_PIN(131, "GPIO_131"), 241 + PINCTRL_PIN(132, "GPIO_132"), 242 + PINCTRL_PIN(133, "GPIO_133"), 243 + PINCTRL_PIN(134, "GPIO_134"), 244 + PINCTRL_PIN(135, "GPIO_135"), 245 + PINCTRL_PIN(136, "GPIO_136"), 246 + PINCTRL_PIN(137, "GPIO_137"), 247 + PINCTRL_PIN(138, "GPIO_138"), 248 + PINCTRL_PIN(139, "GPIO_139"), 249 + PINCTRL_PIN(140, "GPIO_140"), 250 + PINCTRL_PIN(141, "GPIO_141"), 251 + PINCTRL_PIN(142, "GPIO_142"), 252 + PINCTRL_PIN(143, "GPIO_143"), 253 + PINCTRL_PIN(144, "GPIO_144"), 254 + PINCTRL_PIN(145, "GPIO_145"), 255 + PINCTRL_PIN(146, "GPIO_146"), 256 + PINCTRL_PIN(147, "GPIO_147"), 257 + PINCTRL_PIN(148, "GPIO_148"), 258 + PINCTRL_PIN(149, "GPIO_149"), 259 + PINCTRL_PIN(150, "GPIO_150"), 260 + PINCTRL_PIN(151, "GPIO_151"), 261 + PINCTRL_PIN(152, "GPIO_152"), 262 + PINCTRL_PIN(153, "GPIO_153"), 263 + PINCTRL_PIN(154, "GPIO_154"), 264 + PINCTRL_PIN(155, "GPIO_155"), 265 + PINCTRL_PIN(156, "GPIO_156"), 266 + PINCTRL_PIN(157, "GPIO_157"), 267 + PINCTRL_PIN(158, "GPIO_158"), 268 + PINCTRL_PIN(159, "GPIO_159"), 269 + PINCTRL_PIN(160, "GPIO_160"), 270 + PINCTRL_PIN(161, "GPIO_161"), 271 + PINCTRL_PIN(162, "GPIO_162"), 272 + PINCTRL_PIN(163, "GPIO_163"), 273 + PINCTRL_PIN(164, "GPIO_164"), 274 + PINCTRL_PIN(165, "GPIO_165"), 275 + PINCTRL_PIN(166, "GPIO_166"), 276 + PINCTRL_PIN(167, "GPIO_167"), 277 + PINCTRL_PIN(168, "GPIO_168"), 278 + PINCTRL_PIN(169, "GPIO_169"), 279 + PINCTRL_PIN(170, "GPIO_170"), 280 + PINCTRL_PIN(171, "GPIO_171"), 281 + PINCTRL_PIN(172, "GPIO_172"), 282 + PINCTRL_PIN(173, "GPIO_173"), 283 + PINCTRL_PIN(174, "GPIO_174"), 284 + PINCTRL_PIN(175, "GPIO_175"), 285 + PINCTRL_PIN(176, "GPIO_176"), 286 + PINCTRL_PIN(177, "GPIO_177"), 287 + PINCTRL_PIN(178, "GPIO_178"), 288 + PINCTRL_PIN(179, "GPIO_179"), 289 + PINCTRL_PIN(180, "GPIO_180"), 290 + PINCTRL_PIN(181, "GPIO_181"), 291 + PINCTRL_PIN(182, "GPIO_182"), 292 + PINCTRL_PIN(183, "GPIO_183"), 293 + PINCTRL_PIN(184, "GPIO_184"), 294 + PINCTRL_PIN(185, "GPIO_185"), 295 + PINCTRL_PIN(186, "GPIO_186"), 296 + PINCTRL_PIN(187, "GPIO_187"), 297 + PINCTRL_PIN(188, "GPIO_188"), 298 + PINCTRL_PIN(189, "GPIO_189"), 299 + PINCTRL_PIN(190, "GPIO_190"), 300 + PINCTRL_PIN(191, "GPIO_191"), 301 + PINCTRL_PIN(192, "GPIO_192"), 302 + PINCTRL_PIN(193, "GPIO_193"), 303 + PINCTRL_PIN(194, "GPIO_194"), 304 + PINCTRL_PIN(195, "GPIO_195"), 305 + PINCTRL_PIN(196, "GPIO_196"), 306 + PINCTRL_PIN(197, "GPIO_197"), 307 + PINCTRL_PIN(198, "GPIO_198"), 308 + PINCTRL_PIN(199, "GPIO_199"), 309 + PINCTRL_PIN(200, "GPIO_200"), 310 + PINCTRL_PIN(201, "GPIO_201"), 311 + PINCTRL_PIN(202, "GPIO_202"), 312 + PINCTRL_PIN(203, "GPIO_203"), 313 + PINCTRL_PIN(204, "GPIO_204"), 314 + PINCTRL_PIN(205, "GPIO_205"), 315 + PINCTRL_PIN(206, "GPIO_206"), 316 + PINCTRL_PIN(207, "GPIO_207"), 317 + PINCTRL_PIN(208, "GPIO_208"), 318 + PINCTRL_PIN(209, "GPIO_209"), 319 + PINCTRL_PIN(210, "GPIO_210"), 320 + PINCTRL_PIN(211, "GPIO_211"), 321 + PINCTRL_PIN(212, "GPIO_212"), 322 + PINCTRL_PIN(213, "GPIO_213"), 323 + PINCTRL_PIN(214, "GPIO_214"), 324 + PINCTRL_PIN(215, "GPIO_215"), 325 + PINCTRL_PIN(216, "GPIO_216"), 326 + PINCTRL_PIN(217, "UFS_RESET"), 327 + PINCTRL_PIN(218, "SDC2_CLK"), 328 + PINCTRL_PIN(219, "SDC2_CMD"), 329 + PINCTRL_PIN(220, "SDC2_DATA"), 330 + }; 331 + 332 + #define DECLARE_MSM_GPIO_PINS(pin) \ 333 + static const unsigned int gpio##pin##_pins[] = { pin } 334 + DECLARE_MSM_GPIO_PINS(0); 335 + DECLARE_MSM_GPIO_PINS(1); 336 + DECLARE_MSM_GPIO_PINS(2); 337 + DECLARE_MSM_GPIO_PINS(3); 338 + DECLARE_MSM_GPIO_PINS(4); 339 + DECLARE_MSM_GPIO_PINS(5); 340 + DECLARE_MSM_GPIO_PINS(6); 341 + DECLARE_MSM_GPIO_PINS(7); 342 + DECLARE_MSM_GPIO_PINS(8); 343 + DECLARE_MSM_GPIO_PINS(9); 344 + DECLARE_MSM_GPIO_PINS(10); 345 + DECLARE_MSM_GPIO_PINS(11); 346 + DECLARE_MSM_GPIO_PINS(12); 347 + DECLARE_MSM_GPIO_PINS(13); 348 + DECLARE_MSM_GPIO_PINS(14); 349 + DECLARE_MSM_GPIO_PINS(15); 350 + DECLARE_MSM_GPIO_PINS(16); 351 + DECLARE_MSM_GPIO_PINS(17); 352 + DECLARE_MSM_GPIO_PINS(18); 353 + DECLARE_MSM_GPIO_PINS(19); 354 + DECLARE_MSM_GPIO_PINS(20); 355 + DECLARE_MSM_GPIO_PINS(21); 356 + DECLARE_MSM_GPIO_PINS(22); 357 + DECLARE_MSM_GPIO_PINS(23); 358 + DECLARE_MSM_GPIO_PINS(24); 359 + DECLARE_MSM_GPIO_PINS(25); 360 + DECLARE_MSM_GPIO_PINS(26); 361 + DECLARE_MSM_GPIO_PINS(27); 362 + DECLARE_MSM_GPIO_PINS(28); 363 + DECLARE_MSM_GPIO_PINS(29); 364 + DECLARE_MSM_GPIO_PINS(30); 365 + DECLARE_MSM_GPIO_PINS(31); 366 + DECLARE_MSM_GPIO_PINS(32); 367 + DECLARE_MSM_GPIO_PINS(33); 368 + DECLARE_MSM_GPIO_PINS(34); 369 + DECLARE_MSM_GPIO_PINS(35); 370 + DECLARE_MSM_GPIO_PINS(36); 371 + DECLARE_MSM_GPIO_PINS(37); 372 + DECLARE_MSM_GPIO_PINS(38); 373 + DECLARE_MSM_GPIO_PINS(39); 374 + DECLARE_MSM_GPIO_PINS(40); 375 + DECLARE_MSM_GPIO_PINS(41); 376 + DECLARE_MSM_GPIO_PINS(42); 377 + DECLARE_MSM_GPIO_PINS(43); 378 + DECLARE_MSM_GPIO_PINS(44); 379 + DECLARE_MSM_GPIO_PINS(45); 380 + DECLARE_MSM_GPIO_PINS(46); 381 + DECLARE_MSM_GPIO_PINS(47); 382 + DECLARE_MSM_GPIO_PINS(48); 383 + DECLARE_MSM_GPIO_PINS(49); 384 + DECLARE_MSM_GPIO_PINS(50); 385 + DECLARE_MSM_GPIO_PINS(51); 386 + DECLARE_MSM_GPIO_PINS(52); 387 + DECLARE_MSM_GPIO_PINS(53); 388 + DECLARE_MSM_GPIO_PINS(54); 389 + DECLARE_MSM_GPIO_PINS(55); 390 + DECLARE_MSM_GPIO_PINS(56); 391 + DECLARE_MSM_GPIO_PINS(57); 392 + DECLARE_MSM_GPIO_PINS(58); 393 + DECLARE_MSM_GPIO_PINS(59); 394 + DECLARE_MSM_GPIO_PINS(60); 395 + DECLARE_MSM_GPIO_PINS(61); 396 + DECLARE_MSM_GPIO_PINS(62); 397 + DECLARE_MSM_GPIO_PINS(63); 398 + DECLARE_MSM_GPIO_PINS(64); 399 + DECLARE_MSM_GPIO_PINS(65); 400 + DECLARE_MSM_GPIO_PINS(66); 401 + DECLARE_MSM_GPIO_PINS(67); 402 + DECLARE_MSM_GPIO_PINS(68); 403 + DECLARE_MSM_GPIO_PINS(69); 404 + DECLARE_MSM_GPIO_PINS(70); 405 + DECLARE_MSM_GPIO_PINS(71); 406 + DECLARE_MSM_GPIO_PINS(72); 407 + DECLARE_MSM_GPIO_PINS(73); 408 + DECLARE_MSM_GPIO_PINS(74); 409 + DECLARE_MSM_GPIO_PINS(75); 410 + DECLARE_MSM_GPIO_PINS(76); 411 + DECLARE_MSM_GPIO_PINS(77); 412 + DECLARE_MSM_GPIO_PINS(78); 413 + DECLARE_MSM_GPIO_PINS(79); 414 + DECLARE_MSM_GPIO_PINS(80); 415 + DECLARE_MSM_GPIO_PINS(81); 416 + DECLARE_MSM_GPIO_PINS(82); 417 + DECLARE_MSM_GPIO_PINS(83); 418 + DECLARE_MSM_GPIO_PINS(84); 419 + DECLARE_MSM_GPIO_PINS(85); 420 + DECLARE_MSM_GPIO_PINS(86); 421 + DECLARE_MSM_GPIO_PINS(87); 422 + DECLARE_MSM_GPIO_PINS(88); 423 + DECLARE_MSM_GPIO_PINS(89); 424 + DECLARE_MSM_GPIO_PINS(90); 425 + DECLARE_MSM_GPIO_PINS(91); 426 + DECLARE_MSM_GPIO_PINS(92); 427 + DECLARE_MSM_GPIO_PINS(93); 428 + DECLARE_MSM_GPIO_PINS(94); 429 + DECLARE_MSM_GPIO_PINS(95); 430 + DECLARE_MSM_GPIO_PINS(96); 431 + DECLARE_MSM_GPIO_PINS(97); 432 + DECLARE_MSM_GPIO_PINS(98); 433 + DECLARE_MSM_GPIO_PINS(99); 434 + DECLARE_MSM_GPIO_PINS(100); 435 + DECLARE_MSM_GPIO_PINS(101); 436 + DECLARE_MSM_GPIO_PINS(102); 437 + DECLARE_MSM_GPIO_PINS(103); 438 + DECLARE_MSM_GPIO_PINS(104); 439 + DECLARE_MSM_GPIO_PINS(105); 440 + DECLARE_MSM_GPIO_PINS(106); 441 + DECLARE_MSM_GPIO_PINS(107); 442 + DECLARE_MSM_GPIO_PINS(108); 443 + DECLARE_MSM_GPIO_PINS(109); 444 + DECLARE_MSM_GPIO_PINS(110); 445 + DECLARE_MSM_GPIO_PINS(111); 446 + DECLARE_MSM_GPIO_PINS(112); 447 + DECLARE_MSM_GPIO_PINS(113); 448 + DECLARE_MSM_GPIO_PINS(114); 449 + DECLARE_MSM_GPIO_PINS(115); 450 + DECLARE_MSM_GPIO_PINS(116); 451 + DECLARE_MSM_GPIO_PINS(117); 452 + DECLARE_MSM_GPIO_PINS(118); 453 + DECLARE_MSM_GPIO_PINS(119); 454 + DECLARE_MSM_GPIO_PINS(120); 455 + DECLARE_MSM_GPIO_PINS(121); 456 + DECLARE_MSM_GPIO_PINS(122); 457 + DECLARE_MSM_GPIO_PINS(123); 458 + DECLARE_MSM_GPIO_PINS(124); 459 + DECLARE_MSM_GPIO_PINS(125); 460 + DECLARE_MSM_GPIO_PINS(126); 461 + DECLARE_MSM_GPIO_PINS(127); 462 + DECLARE_MSM_GPIO_PINS(128); 463 + DECLARE_MSM_GPIO_PINS(129); 464 + DECLARE_MSM_GPIO_PINS(130); 465 + DECLARE_MSM_GPIO_PINS(131); 466 + DECLARE_MSM_GPIO_PINS(132); 467 + DECLARE_MSM_GPIO_PINS(133); 468 + DECLARE_MSM_GPIO_PINS(134); 469 + DECLARE_MSM_GPIO_PINS(135); 470 + DECLARE_MSM_GPIO_PINS(136); 471 + DECLARE_MSM_GPIO_PINS(137); 472 + DECLARE_MSM_GPIO_PINS(138); 473 + DECLARE_MSM_GPIO_PINS(139); 474 + DECLARE_MSM_GPIO_PINS(140); 475 + DECLARE_MSM_GPIO_PINS(141); 476 + DECLARE_MSM_GPIO_PINS(142); 477 + DECLARE_MSM_GPIO_PINS(143); 478 + DECLARE_MSM_GPIO_PINS(144); 479 + DECLARE_MSM_GPIO_PINS(145); 480 + DECLARE_MSM_GPIO_PINS(146); 481 + DECLARE_MSM_GPIO_PINS(147); 482 + DECLARE_MSM_GPIO_PINS(148); 483 + DECLARE_MSM_GPIO_PINS(149); 484 + DECLARE_MSM_GPIO_PINS(150); 485 + DECLARE_MSM_GPIO_PINS(151); 486 + DECLARE_MSM_GPIO_PINS(152); 487 + DECLARE_MSM_GPIO_PINS(153); 488 + DECLARE_MSM_GPIO_PINS(154); 489 + DECLARE_MSM_GPIO_PINS(155); 490 + DECLARE_MSM_GPIO_PINS(156); 491 + DECLARE_MSM_GPIO_PINS(157); 492 + DECLARE_MSM_GPIO_PINS(158); 493 + DECLARE_MSM_GPIO_PINS(159); 494 + DECLARE_MSM_GPIO_PINS(160); 495 + DECLARE_MSM_GPIO_PINS(161); 496 + DECLARE_MSM_GPIO_PINS(162); 497 + DECLARE_MSM_GPIO_PINS(163); 498 + DECLARE_MSM_GPIO_PINS(164); 499 + DECLARE_MSM_GPIO_PINS(165); 500 + DECLARE_MSM_GPIO_PINS(166); 501 + DECLARE_MSM_GPIO_PINS(167); 502 + DECLARE_MSM_GPIO_PINS(168); 503 + DECLARE_MSM_GPIO_PINS(169); 504 + DECLARE_MSM_GPIO_PINS(170); 505 + DECLARE_MSM_GPIO_PINS(171); 506 + DECLARE_MSM_GPIO_PINS(172); 507 + DECLARE_MSM_GPIO_PINS(173); 508 + DECLARE_MSM_GPIO_PINS(174); 509 + DECLARE_MSM_GPIO_PINS(175); 510 + DECLARE_MSM_GPIO_PINS(176); 511 + DECLARE_MSM_GPIO_PINS(177); 512 + DECLARE_MSM_GPIO_PINS(178); 513 + DECLARE_MSM_GPIO_PINS(179); 514 + DECLARE_MSM_GPIO_PINS(180); 515 + DECLARE_MSM_GPIO_PINS(181); 516 + DECLARE_MSM_GPIO_PINS(182); 517 + DECLARE_MSM_GPIO_PINS(183); 518 + DECLARE_MSM_GPIO_PINS(184); 519 + DECLARE_MSM_GPIO_PINS(185); 520 + DECLARE_MSM_GPIO_PINS(186); 521 + DECLARE_MSM_GPIO_PINS(187); 522 + DECLARE_MSM_GPIO_PINS(188); 523 + DECLARE_MSM_GPIO_PINS(189); 524 + DECLARE_MSM_GPIO_PINS(190); 525 + DECLARE_MSM_GPIO_PINS(191); 526 + DECLARE_MSM_GPIO_PINS(192); 527 + DECLARE_MSM_GPIO_PINS(193); 528 + DECLARE_MSM_GPIO_PINS(194); 529 + DECLARE_MSM_GPIO_PINS(195); 530 + DECLARE_MSM_GPIO_PINS(196); 531 + DECLARE_MSM_GPIO_PINS(197); 532 + DECLARE_MSM_GPIO_PINS(198); 533 + DECLARE_MSM_GPIO_PINS(199); 534 + DECLARE_MSM_GPIO_PINS(200); 535 + DECLARE_MSM_GPIO_PINS(201); 536 + DECLARE_MSM_GPIO_PINS(202); 537 + DECLARE_MSM_GPIO_PINS(203); 538 + DECLARE_MSM_GPIO_PINS(204); 539 + DECLARE_MSM_GPIO_PINS(205); 540 + DECLARE_MSM_GPIO_PINS(206); 541 + DECLARE_MSM_GPIO_PINS(207); 542 + DECLARE_MSM_GPIO_PINS(208); 543 + DECLARE_MSM_GPIO_PINS(209); 544 + DECLARE_MSM_GPIO_PINS(210); 545 + DECLARE_MSM_GPIO_PINS(211); 546 + DECLARE_MSM_GPIO_PINS(212); 547 + DECLARE_MSM_GPIO_PINS(213); 548 + DECLARE_MSM_GPIO_PINS(214); 549 + DECLARE_MSM_GPIO_PINS(215); 550 + DECLARE_MSM_GPIO_PINS(216); 551 + 552 + static const unsigned int ufs_reset_pins[] = { 217 }; 553 + static const unsigned int sdc2_clk_pins[] = { 218 }; 554 + static const unsigned int sdc2_cmd_pins[] = { 219 }; 555 + static const unsigned int sdc2_data_pins[] = { 220 }; 556 + 557 + enum kaanapali_functions { 558 + msm_mux_gpio, 559 + msm_mux_aoss_cti, 560 + msm_mux_atest_char, 561 + msm_mux_atest_usb, 562 + msm_mux_audio_ext_mclk0, 563 + msm_mux_audio_ext_mclk1, 564 + msm_mux_audio_ref_clk, 565 + msm_mux_cam_asc_mclk2, 566 + msm_mux_cam_asc_mclk4, 567 + msm_mux_cam_mclk, 568 + msm_mux_cci_async_in, 569 + msm_mux_cci_i2c_scl, 570 + msm_mux_cci_i2c_sda, 571 + msm_mux_cci_timer, 572 + msm_mux_cmu_rng, 573 + msm_mux_coex_uart1_rx, 574 + msm_mux_coex_uart1_tx, 575 + msm_mux_coex_uart2_rx, 576 + msm_mux_coex_uart2_tx, 577 + msm_mux_dbg_out_clk, 578 + msm_mux_ddr_bist_complete, 579 + msm_mux_ddr_bist_fail, 580 + msm_mux_ddr_bist_start, 581 + msm_mux_ddr_bist_stop, 582 + msm_mux_ddr_pxi0, 583 + msm_mux_ddr_pxi1, 584 + msm_mux_ddr_pxi2, 585 + msm_mux_ddr_pxi3, 586 + msm_mux_dp_hot, 587 + msm_mux_egpio, 588 + msm_mux_gcc_gp1, 589 + msm_mux_gcc_gp2, 590 + msm_mux_gcc_gp3, 591 + msm_mux_gnss_adc0, 592 + msm_mux_gnss_adc1, 593 + msm_mux_i2chub0_se0, 594 + msm_mux_i2chub0_se1, 595 + msm_mux_i2chub0_se2, 596 + msm_mux_i2chub0_se3, 597 + msm_mux_i2chub0_se4, 598 + msm_mux_i2s0_data0, 599 + msm_mux_i2s0_data1, 600 + msm_mux_i2s0_sck, 601 + msm_mux_i2s0_ws, 602 + msm_mux_i2s1_data0, 603 + msm_mux_i2s1_data1, 604 + msm_mux_i2s1_sck, 605 + msm_mux_i2s1_ws, 606 + msm_mux_ibi_i3c, 607 + msm_mux_jitter_bist, 608 + msm_mux_mdp_esync0_out, 609 + msm_mux_mdp_esync1_out, 610 + msm_mux_mdp_vsync, 611 + msm_mux_mdp_vsync0_out, 612 + msm_mux_mdp_vsync1_out, 613 + msm_mux_mdp_vsync2_out, 614 + msm_mux_mdp_vsync3_out, 615 + msm_mux_mdp_vsync5_out, 616 + msm_mux_mdp_vsync_e, 617 + msm_mux_nav_gpio0, 618 + msm_mux_nav_gpio1, 619 + msm_mux_nav_gpio2, 620 + msm_mux_nav_gpio3, 621 + msm_mux_pcie0_clk_req_n, 622 + msm_mux_phase_flag, 623 + msm_mux_pll_bist_sync, 624 + msm_mux_pll_clk_aux, 625 + msm_mux_prng_rosc0, 626 + msm_mux_prng_rosc1, 627 + msm_mux_prng_rosc2, 628 + msm_mux_prng_rosc3, 629 + msm_mux_qdss_cti, 630 + msm_mux_qdss_gpio_traceclk, 631 + msm_mux_qdss_gpio_tracectl, 632 + msm_mux_qdss_gpio_tracedata, 633 + msm_mux_qlink_big_enable, 634 + msm_mux_qlink_big_request, 635 + msm_mux_qlink_little_enable, 636 + msm_mux_qlink_little_request, 637 + msm_mux_qlink_wmss, 638 + msm_mux_qspi0, 639 + msm_mux_qspi1, 640 + msm_mux_qspi2, 641 + msm_mux_qspi3, 642 + msm_mux_qspi_clk, 643 + msm_mux_qspi_cs, 644 + msm_mux_qup1_se0, 645 + msm_mux_qup1_se1, 646 + msm_mux_qup1_se2, 647 + msm_mux_qup1_se3, 648 + msm_mux_qup1_se4, 649 + msm_mux_qup1_se5, 650 + msm_mux_qup1_se6, 651 + msm_mux_qup1_se7, 652 + msm_mux_qup2_se0, 653 + msm_mux_qup2_se1, 654 + msm_mux_qup2_se2, 655 + msm_mux_qup2_se3, 656 + msm_mux_qup2_se4, 657 + msm_mux_qup3_se0, 658 + msm_mux_qup3_se1, 659 + msm_mux_qup3_se2, 660 + msm_mux_qup3_se3, 661 + msm_mux_qup3_se4, 662 + msm_mux_qup3_se5, 663 + msm_mux_qup4_se0, 664 + msm_mux_qup4_se1, 665 + msm_mux_qup4_se2, 666 + msm_mux_qup4_se3, 667 + msm_mux_qup4_se4, 668 + msm_mux_sd_write_protect, 669 + msm_mux_sdc40, 670 + msm_mux_sdc41, 671 + msm_mux_sdc42, 672 + msm_mux_sdc43, 673 + msm_mux_sdc4_clk, 674 + msm_mux_sdc4_cmd, 675 + msm_mux_sys_throttle, 676 + msm_mux_tb_trig_sdc2, 677 + msm_mux_tb_trig_sdc4, 678 + msm_mux_tmess_prng0, 679 + msm_mux_tmess_prng1, 680 + msm_mux_tmess_prng2, 681 + msm_mux_tmess_prng3, 682 + msm_mux_tsense_pwm1, 683 + msm_mux_tsense_pwm2, 684 + msm_mux_tsense_pwm3, 685 + msm_mux_tsense_pwm4, 686 + msm_mux_tsense_pwm5, 687 + msm_mux_tsense_pwm6, 688 + msm_mux_tsense_pwm7, 689 + msm_mux_uim0_clk, 690 + msm_mux_uim0_data, 691 + msm_mux_uim0_present, 692 + msm_mux_uim0_reset, 693 + msm_mux_uim1_clk, 694 + msm_mux_uim1_data, 695 + msm_mux_uim1_present, 696 + msm_mux_uim1_reset, 697 + msm_mux_usb0_hs, 698 + msm_mux_usb_phy, 699 + msm_mux_vfr_0, 700 + msm_mux_vfr_1, 701 + msm_mux_vsense_trigger_mirnat, 702 + msm_mux_wcn_sw, 703 + msm_mux_wcn_sw_ctrl, 704 + msm_mux__, 705 + }; 706 + 707 + static const char *const gpio_groups[] = { 708 + "gpio0", "gpio1", "gpio2", "gpio3", "gpio4", "gpio5", 709 + "gpio6", "gpio7", "gpio8", "gpio9", "gpio10", "gpio11", 710 + "gpio12", "gpio13", "gpio14", "gpio15", "gpio16", "gpio17", 711 + "gpio18", "gpio19", "gpio20", "gpio21", "gpio22", "gpio23", 712 + "gpio24", "gpio25", "gpio26", "gpio27", "gpio28", "gpio29", 713 + "gpio30", "gpio31", "gpio32", "gpio33", "gpio34", "gpio35", 714 + "gpio36", "gpio37", "gpio38", "gpio39", "gpio40", "gpio41", 715 + "gpio42", "gpio43", "gpio44", "gpio45", "gpio46", "gpio47", 716 + "gpio48", "gpio49", "gpio50", "gpio51", "gpio52", "gpio53", 717 + "gpio54", "gpio55", "gpio56", "gpio57", "gpio58", "gpio59", 718 + "gpio60", "gpio61", "gpio62", "gpio63", "gpio64", "gpio65", 719 + "gpio66", "gpio67", "gpio68", "gpio69", "gpio70", "gpio71", 720 + "gpio72", "gpio73", "gpio74", "gpio75", "gpio76", "gpio77", 721 + "gpio78", "gpio79", "gpio80", "gpio81", "gpio82", "gpio83", 722 + "gpio84", "gpio85", "gpio86", "gpio87", "gpio88", "gpio89", 723 + "gpio90", "gpio91", "gpio92", "gpio93", "gpio94", "gpio95", 724 + "gpio96", "gpio97", "gpio98", "gpio99", "gpio100", "gpio101", 725 + "gpio102", "gpio103", "gpio104", "gpio105", "gpio106", "gpio107", 726 + "gpio108", "gpio109", "gpio110", "gpio111", "gpio112", "gpio113", 727 + "gpio114", "gpio115", "gpio116", "gpio117", "gpio118", "gpio119", 728 + "gpio120", "gpio121", "gpio122", "gpio123", "gpio124", "gpio125", 729 + "gpio126", "gpio127", "gpio128", "gpio129", "gpio130", "gpio131", 730 + "gpio132", "gpio133", "gpio134", "gpio135", "gpio136", "gpio137", 731 + "gpio138", "gpio139", "gpio140", "gpio141", "gpio142", "gpio143", 732 + "gpio144", "gpio145", "gpio146", "gpio147", "gpio148", "gpio149", 733 + "gpio150", "gpio151", "gpio152", "gpio153", "gpio154", "gpio155", 734 + "gpio156", "gpio157", "gpio158", "gpio159", "gpio160", "gpio161", 735 + "gpio162", "gpio163", "gpio164", "gpio165", "gpio166", "gpio167", 736 + "gpio168", "gpio169", "gpio170", "gpio171", "gpio172", "gpio173", 737 + "gpio174", "gpio175", "gpio176", "gpio177", "gpio178", "gpio179", 738 + "gpio180", "gpio181", "gpio182", "gpio183", "gpio184", "gpio185", 739 + "gpio186", "gpio187", "gpio188", "gpio189", "gpio190", "gpio191", 740 + "gpio192", "gpio193", "gpio194", "gpio195", "gpio196", "gpio197", 741 + "gpio198", "gpio199", "gpio200", "gpio201", "gpio202", "gpio203", 742 + "gpio204", "gpio205", "gpio206", "gpio207", "gpio208", "gpio209", 743 + "gpio210", "gpio211", "gpio212", "gpio213", "gpio214", "gpio215", 744 + "gpio216", 745 + }; 746 + 747 + static const char *const aoss_cti_groups[] = { 748 + "gpio74", "gpio75", "gpio76", "gpio77", 749 + }; 750 + 751 + static const char *const atest_char_groups[] = { 752 + "gpio126", "gpio127", "gpio128", "gpio129", "gpio133", 753 + }; 754 + 755 + static const char *const atest_usb_groups[] = { 756 + "gpio70", "gpio71", "gpio72", "gpio73", "gpio129", 757 + }; 758 + 759 + static const char *const audio_ext_mclk0_groups[] = { 760 + "gpio121", 761 + }; 762 + 763 + static const char *const audio_ext_mclk1_groups[] = { 764 + "gpio120", 765 + }; 766 + 767 + static const char *const audio_ref_clk_groups[] = { 768 + "gpio120", 769 + }; 770 + 771 + static const char *const cam_asc_mclk2_groups[] = { 772 + "gpio91", 773 + }; 774 + 775 + static const char *const cam_asc_mclk4_groups[] = { 776 + "gpio93", 777 + }; 778 + 779 + static const char *const cam_mclk_groups[] = { 780 + "gpio89", "gpio90", "gpio92", "gpio94", "gpio95", "gpio96", 781 + }; 782 + 783 + static const char *const cci_async_in_groups[] = { 784 + "gpio10", "gpio11", "gpio15", 785 + }; 786 + 787 + static const char *const cci_i2c_scl_groups[] = { 788 + "gpio110", "gpio112", "gpio114", "gpio116", "gpio149", "gpio160", 789 + }; 790 + 791 + static const char *const cci_i2c_sda_groups[] = { 792 + "gpio107", "gpio108", "gpio109", "gpio111", "gpio113", "gpio115", 793 + }; 794 + 795 + static const char *const cci_timer_groups[] = { 796 + "gpio105", "gpio106", "gpio107", "gpio159", "gpio160", 797 + }; 798 + 799 + static const char *const cmu_rng_groups[] = { 800 + "gpio40", "gpio41", "gpio42", "gpio43", "gpio144", "gpio145", 801 + "gpio146", "gpio147", 802 + }; 803 + 804 + static const char *const coex_uart1_rx_groups[] = { 805 + "gpio144", 806 + }; 807 + 808 + static const char *const coex_uart1_tx_groups[] = { 809 + "gpio145", 810 + }; 811 + 812 + static const char *const coex_uart2_rx_groups[] = { 813 + "gpio146", 814 + }; 815 + 816 + static const char *const coex_uart2_tx_groups[] = { 817 + "gpio147", 818 + }; 819 + 820 + static const char *const dbg_out_clk_groups[] = { 821 + "gpio42", 822 + }; 823 + 824 + static const char *const ddr_bist_complete_groups[] = { 825 + "gpio44", 826 + }; 827 + 828 + static const char *const ddr_bist_fail_groups[] = { 829 + "gpio40", 830 + }; 831 + 832 + static const char *const ddr_bist_start_groups[] = { 833 + "gpio41", 834 + }; 835 + 836 + static const char *const ddr_bist_stop_groups[] = { 837 + "gpio45", 838 + }; 839 + 840 + static const char *const ddr_pxi0_groups[] = { 841 + "gpio54", "gpio55", 842 + }; 843 + 844 + static const char *const ddr_pxi1_groups[] = { 845 + "gpio44", "gpio45", 846 + }; 847 + 848 + static const char *const ddr_pxi2_groups[] = { 849 + "gpio43", "gpio52", 850 + }; 851 + 852 + static const char *const ddr_pxi3_groups[] = { 853 + "gpio46", "gpio53", 854 + }; 855 + 856 + static const char *const dp_hot_groups[] = { 857 + "gpio47", 858 + }; 859 + 860 + static const char *const egpio_groups[] = { 861 + "gpio0", "gpio1", "gpio2", "gpio3", "gpio4", "gpio5", 862 + "gpio6", "gpio7", "gpio28", "gpio29", "gpio48", "gpio49", 863 + "gpio50", "gpio51", "gpio163", "gpio164", "gpio165", "gpio166", 864 + "gpio167", "gpio168", "gpio169", "gpio170", "gpio171", "gpio172", 865 + "gpio173", "gpio174", "gpio175", "gpio176", "gpio177", "gpio178", 866 + "gpio179", "gpio180", "gpio181", "gpio182", "gpio183", "gpio184", 867 + "gpio185", "gpio186", "gpio187", "gpio188", "gpio189", "gpio190", 868 + "gpio191", "gpio192", "gpio193", "gpio194", "gpio195", "gpio196", 869 + "gpio197", "gpio198", "gpio199", "gpio200", "gpio201", "gpio202", 870 + "gpio203", "gpio204", "gpio205", "gpio206", "gpio207", "gpio208", 871 + "gpio209", "gpio210", "gpio211", "gpio212", "gpio213", "gpio214", 872 + "gpio215", "gpio216", 873 + }; 874 + 875 + static const char *const gcc_gp1_groups[] = { 876 + "gpio130", "gpio158", 877 + }; 878 + 879 + static const char *const gcc_gp2_groups[] = { 880 + "gpio86", "gpio131", 881 + }; 882 + 883 + static const char *const gcc_gp3_groups[] = { 884 + "gpio87", "gpio132", 885 + }; 886 + 887 + static const char *const gnss_adc0_groups[] = { 888 + "gpio40", "gpio41", 889 + }; 890 + 891 + static const char *const gnss_adc1_groups[] = { 892 + "gpio42", "gpio77", 893 + }; 894 + 895 + static const char *const i2chub0_se0_groups[] = { 896 + "gpio66", "gpio67", 897 + }; 898 + 899 + static const char *const i2chub0_se1_groups[] = { 900 + "gpio78", "gpio79", 901 + }; 902 + 903 + static const char *const i2chub0_se2_groups[] = { 904 + "gpio68", "gpio69", 905 + }; 906 + 907 + static const char *const i2chub0_se3_groups[] = { 908 + "gpio70", "gpio71", 909 + }; 910 + 911 + static const char *const i2chub0_se4_groups[] = { 912 + "gpio72", "gpio73", 913 + }; 914 + 915 + static const char *const i2s0_data0_groups[] = { 916 + "gpio123", 917 + }; 918 + 919 + static const char *const i2s0_data1_groups[] = { 920 + "gpio124", 921 + }; 922 + 923 + static const char *const i2s0_sck_groups[] = { 924 + "gpio122", 925 + }; 926 + 927 + static const char *const i2s0_ws_groups[] = { 928 + "gpio125", 929 + }; 930 + 931 + static const char *const i2s1_data0_groups[] = { 932 + "gpio118", 933 + }; 934 + 935 + static const char *const i2s1_data1_groups[] = { 936 + "gpio120", 937 + }; 938 + 939 + static const char *const i2s1_sck_groups[] = { 940 + "gpio117", 941 + }; 942 + 943 + static const char *const i2s1_ws_groups[] = { 944 + "gpio119", 945 + }; 946 + 947 + static const char *const ibi_i3c_groups[] = { 948 + "gpio0", "gpio1", "gpio4", "gpio5", "gpio8", "gpio9", 949 + "gpio12", "gpio13", "gpio28", "gpio29", "gpio32", "gpio33", 950 + "gpio36", "gpio37", "gpio48", "gpio49", "gpio60", "gpio61", 951 + }; 952 + 953 + static const char *const jitter_bist_groups[] = { 954 + "gpio73", 955 + }; 956 + 957 + static const char *const mdp_esync0_out_groups[] = { 958 + "gpio88", 959 + }; 960 + 961 + static const char *const mdp_esync1_out_groups[] = { 962 + "gpio100", 963 + }; 964 + 965 + static const char *const mdp_vsync_groups[] = { 966 + "gpio86", "gpio87", "gpio97", "gpio98", 967 + }; 968 + 969 + static const char *const mdp_vsync0_out_groups[] = { 970 + "gpio86", 971 + }; 972 + 973 + static const char *const mdp_vsync1_out_groups[] = { 974 + "gpio86", 975 + }; 976 + 977 + static const char *const mdp_vsync2_out_groups[] = { 978 + "gpio87", 979 + }; 980 + 981 + static const char *const mdp_vsync3_out_groups[] = { 982 + "gpio87", 983 + }; 984 + 985 + static const char *const mdp_vsync5_out_groups[] = { 986 + "gpio87", 987 + }; 988 + 989 + static const char *const mdp_vsync_e_groups[] = { 990 + "gpio88", 991 + }; 992 + 993 + static const char *const nav_gpio0_groups[] = { 994 + "gpio150", 995 + }; 996 + 997 + static const char *const nav_gpio1_groups[] = { 998 + "gpio151", 999 + }; 1000 + 1001 + static const char *const nav_gpio2_groups[] = { 1002 + "gpio148", 1003 + }; 1004 + 1005 + static const char *const nav_gpio3_groups[] = { 1006 + "gpio150", 1007 + }; 1008 + 1009 + static const char *const pcie0_clk_req_n_groups[] = { 1010 + "gpio103", 1011 + }; 1012 + 1013 + static const char *const phase_flag_groups[] = { 1014 + "gpio117", "gpio118", "gpio119", "gpio123", "gpio124", "gpio125", 1015 + "gpio169", "gpio170", "gpio171", "gpio172", "gpio173", "gpio175", 1016 + "gpio176", "gpio179", "gpio180", "gpio181", "gpio184", "gpio185", 1017 + "gpio192", "gpio196", "gpio197", "gpio198", "gpio199", "gpio204", 1018 + "gpio206", "gpio207", "gpio208", "gpio210", "gpio211", "gpio214", 1019 + "gpio215", "gpio216", 1020 + }; 1021 + 1022 + static const char *const pll_bist_sync_groups[] = { 1023 + "gpio104", 1024 + }; 1025 + 1026 + static const char *const pll_clk_aux_groups[] = { 1027 + "gpio94", 1028 + }; 1029 + 1030 + static const char *const prng_rosc0_groups[] = { 1031 + "gpio85", 1032 + }; 1033 + 1034 + static const char *const prng_rosc1_groups[] = { 1035 + "gpio64", 1036 + }; 1037 + 1038 + static const char *const prng_rosc2_groups[] = { 1039 + "gpio65", 1040 + }; 1041 + 1042 + static const char *const prng_rosc3_groups[] = { 1043 + "gpio66", 1044 + }; 1045 + 1046 + static const char *const qdss_cti_groups[] = { 1047 + "gpio27", "gpio31", "gpio72", "gpio73", "gpio82", "gpio83", 1048 + "gpio155", "gpio158", 1049 + }; 1050 + 1051 + static const char *const qdss_gpio_traceclk_groups[] = { 1052 + "gpio128", 1053 + }; 1054 + 1055 + static const char *const qdss_gpio_tracectl_groups[] = { 1056 + "gpio127", 1057 + }; 1058 + 1059 + static const char *const qdss_gpio_tracedata_groups[] = { 1060 + "gpio38", "gpio39", "gpio40", "gpio41", "gpio42", "gpio43", 1061 + "gpio62", "gpio63", "gpio68", "gpio69", "gpio126", "gpio129", 1062 + "gpio130", "gpio131", "gpio132", "gpio133", 1063 + }; 1064 + 1065 + static const char *const qlink_big_enable_groups[] = { 1066 + "gpio156", 1067 + }; 1068 + 1069 + static const char *const qlink_big_request_groups[] = { 1070 + "gpio155", 1071 + }; 1072 + 1073 + static const char *const qlink_little_enable_groups[] = { 1074 + "gpio153", 1075 + }; 1076 + 1077 + static const char *const qlink_little_request_groups[] = { 1078 + "gpio152", 1079 + }; 1080 + 1081 + static const char *const qlink_wmss_groups[] = { 1082 + "gpio154", 1083 + }; 1084 + 1085 + static const char *const qspi0_groups[] = { 1086 + "gpio80", 1087 + }; 1088 + 1089 + static const char *const qspi1_groups[] = { 1090 + "gpio147", 1091 + }; 1092 + 1093 + static const char *const qspi2_groups[] = { 1094 + "gpio81", 1095 + }; 1096 + 1097 + static const char *const qspi3_groups[] = { 1098 + "gpio82", 1099 + }; 1100 + 1101 + static const char *const qspi_clk_groups[] = { 1102 + "gpio83", 1103 + }; 1104 + 1105 + static const char *const qspi_cs_groups[] = { 1106 + "gpio146", "gpio148", 1107 + }; 1108 + 1109 + static const char *const qup1_se0_groups[] = { 1110 + "gpio80", "gpio81", "gpio82", "gpio83", 1111 + }; 1112 + 1113 + static const char *const qup1_se1_groups[] = { 1114 + "gpio74", "gpio75", "gpio76", "gpio77", 1115 + }; 1116 + 1117 + static const char *const qup1_se2_groups[] = { 1118 + "gpio40", "gpio41", "gpio42", "gpio43", "gpio130", "gpio131", "gpio132", 1119 + }; 1120 + 1121 + static const char *const qup1_se3_groups[] = { 1122 + "gpio44", "gpio45", "gpio46", "gpio47", 1123 + }; 1124 + 1125 + static const char *const qup1_se4_groups[] = { 1126 + "gpio36", "gpio37", "gpio38", "gpio39", 1127 + }; 1128 + 1129 + static const char *const qup1_se5_groups[] = { 1130 + "gpio52", "gpio53", "gpio54", "gpio55", 1131 + }; 1132 + 1133 + static const char *const qup1_se6_groups[] = { 1134 + "gpio56", "gpio57", "gpio58", "gpio59", 1135 + }; 1136 + 1137 + static const char *const qup1_se7_groups[] = { 1138 + "gpio60", "gpio61", "gpio62", "gpio63", 1139 + }; 1140 + 1141 + static const char *const qup2_se0_groups[] = { 1142 + "gpio0", "gpio1", "gpio2", "gpio3", 1143 + }; 1144 + 1145 + static const char *const qup2_se1_groups[] = { 1146 + "gpio4", "gpio5", "gpio6", "gpio7", 1147 + }; 1148 + 1149 + static const char *const qup2_se2_groups[] = { 1150 + "gpio117", "gpio118", "gpio119", "gpio120", 1151 + }; 1152 + 1153 + static const char *const qup2_se3_groups[] = { 1154 + "gpio122", "gpio123", "gpio124", "gpio125", 1155 + }; 1156 + 1157 + static const char *const qup2_se4_groups[] = { 1158 + "gpio208", "gpio209", 1159 + }; 1160 + 1161 + static const char *const qup3_se0_groups[] = { 1162 + "gpio64", "gpio65", 1163 + }; 1164 + 1165 + static const char *const qup3_se1_groups[] = { 1166 + "gpio8", "gpio9", "gpio10", "gpio11", "gpio12", "gpio13", "gpio15", 1167 + }; 1168 + 1169 + static const char *const qup3_se2_groups[] = { 1170 + "gpio12", "gpio13", "gpio14", "gpio15", 1171 + }; 1172 + 1173 + static const char *const qup3_se3_groups[] = { 1174 + "gpio16", "gpio17", "gpio18", "gpio19", 1175 + }; 1176 + 1177 + static const char *const qup3_se4_groups[] = { 1178 + "gpio20", "gpio21", "gpio22", "gpio23", 1179 + }; 1180 + 1181 + static const char *const qup3_se5_groups[] = { 1182 + "gpio24", "gpio25", "gpio26", "gpio27", 1183 + }; 1184 + 1185 + static const char *const qup4_se0_groups[] = { 1186 + "gpio48", "gpio49", "gpio50", "gpio51", 1187 + }; 1188 + 1189 + static const char *const qup4_se1_groups[] = { 1190 + "gpio28", "gpio29", "gpio30", "gpio31", 1191 + }; 1192 + 1193 + static const char *const qup4_se2_groups[] = { 1194 + "gpio32", "gpio33", "gpio34", "gpio35", 1195 + }; 1196 + 1197 + static const char *const qup4_se3_groups[] = { 1198 + "gpio84", "gpio121", 1199 + }; 1200 + 1201 + static const char *const qup4_se4_groups[] = { 1202 + "gpio161", "gpio162", 1203 + }; 1204 + 1205 + static const char *const sd_write_protect_groups[] = { 1206 + "gpio85", 1207 + }; 1208 + 1209 + static const char *const sdc40_groups[] = { 1210 + "gpio80", 1211 + }; 1212 + 1213 + static const char *const sdc41_groups[] = { 1214 + "gpio147", 1215 + }; 1216 + 1217 + static const char *const sdc42_groups[] = { 1218 + "gpio81", 1219 + }; 1220 + 1221 + static const char *const sdc43_groups[] = { 1222 + "gpio82", 1223 + }; 1224 + 1225 + static const char *const sdc4_clk_groups[] = { 1226 + "gpio83", 1227 + }; 1228 + 1229 + static const char *const sdc4_cmd_groups[] = { 1230 + "gpio148", 1231 + }; 1232 + 1233 + static const char *const sys_throttle_groups[] = { 1234 + "gpio99", 1235 + }; 1236 + 1237 + static const char *const tb_trig_sdc2_groups[] = { 1238 + "gpio88", 1239 + }; 1240 + 1241 + static const char *const tb_trig_sdc4_groups[] = { 1242 + "gpio146", 1243 + }; 1244 + 1245 + static const char *const tmess_prng0_groups[] = { 1246 + "gpio85", 1247 + }; 1248 + 1249 + static const char *const tmess_prng1_groups[] = { 1250 + "gpio64", 1251 + }; 1252 + 1253 + static const char *const tmess_prng2_groups[] = { 1254 + "gpio65", 1255 + }; 1256 + 1257 + static const char *const tmess_prng3_groups[] = { 1258 + "gpio66", 1259 + }; 1260 + 1261 + static const char *const tsense_pwm1_groups[] = { 1262 + "gpio87", 1263 + }; 1264 + 1265 + static const char *const tsense_pwm2_groups[] = { 1266 + "gpio10", 1267 + }; 1268 + 1269 + static const char *const tsense_pwm3_groups[] = { 1270 + "gpio97", 1271 + }; 1272 + 1273 + static const char *const tsense_pwm4_groups[] = { 1274 + "gpio99", 1275 + }; 1276 + 1277 + static const char *const tsense_pwm5_groups[] = { 1278 + "gpio105", 1279 + }; 1280 + 1281 + static const char *const tsense_pwm6_groups[] = { 1282 + "gpio106", 1283 + }; 1284 + 1285 + static const char *const tsense_pwm7_groups[] = { 1286 + "gpio159", 1287 + }; 1288 + 1289 + static const char *const uim0_clk_groups[] = { 1290 + "gpio127", 1291 + }; 1292 + 1293 + static const char *const uim0_data_groups[] = { 1294 + "gpio126", 1295 + }; 1296 + 1297 + static const char *const uim0_present_groups[] = { 1298 + "gpio129", 1299 + }; 1300 + 1301 + static const char *const uim0_reset_groups[] = { 1302 + "gpio128", 1303 + }; 1304 + 1305 + static const char *const uim1_clk_groups[] = { 1306 + "gpio37", "gpio55", "gpio71", "gpio131", 1307 + }; 1308 + 1309 + static const char *const uim1_data_groups[] = { 1310 + "gpio36", "gpio54", "gpio70", "gpio130", 1311 + }; 1312 + 1313 + static const char *const uim1_present_groups[] = { 1314 + "gpio133", 1315 + }; 1316 + 1317 + static const char *const uim1_reset_groups[] = { 1318 + "gpio39", "gpio56", "gpio72", "gpio132", 1319 + }; 1320 + 1321 + static const char *const usb0_hs_groups[] = { 1322 + "gpio79", 1323 + }; 1324 + 1325 + static const char *const usb_phy_groups[] = { 1326 + "gpio59", "gpio60", 1327 + }; 1328 + 1329 + static const char *const vfr_0_groups[] = { 1330 + "gpio146", 1331 + }; 1332 + 1333 + static const char *const vfr_1_groups[] = { 1334 + "gpio151", 1335 + }; 1336 + 1337 + static const char *const vsense_trigger_mirnat_groups[] = { 1338 + "gpio59", 1339 + }; 1340 + 1341 + static const char *const wcn_sw_groups[] = { 1342 + "gpio19", 1343 + }; 1344 + 1345 + static const char *const wcn_sw_ctrl_groups[] = { 1346 + "gpio18", 1347 + }; 1348 + 1349 + static const struct pinfunction kaanapali_functions[] = { 1350 + MSM_GPIO_PIN_FUNCTION(gpio), 1351 + MSM_PIN_FUNCTION(aoss_cti), 1352 + MSM_PIN_FUNCTION(atest_char), 1353 + MSM_PIN_FUNCTION(atest_usb), 1354 + MSM_PIN_FUNCTION(audio_ext_mclk0), 1355 + MSM_PIN_FUNCTION(audio_ext_mclk1), 1356 + MSM_PIN_FUNCTION(audio_ref_clk), 1357 + MSM_PIN_FUNCTION(cam_asc_mclk2), 1358 + MSM_PIN_FUNCTION(cam_asc_mclk4), 1359 + MSM_PIN_FUNCTION(cam_mclk), 1360 + MSM_PIN_FUNCTION(cci_async_in), 1361 + MSM_PIN_FUNCTION(cci_i2c_scl), 1362 + MSM_PIN_FUNCTION(cci_i2c_sda), 1363 + MSM_PIN_FUNCTION(cci_timer), 1364 + MSM_PIN_FUNCTION(cmu_rng), 1365 + MSM_PIN_FUNCTION(coex_uart1_rx), 1366 + MSM_PIN_FUNCTION(coex_uart1_tx), 1367 + MSM_PIN_FUNCTION(coex_uart2_rx), 1368 + MSM_PIN_FUNCTION(coex_uart2_tx), 1369 + MSM_PIN_FUNCTION(dbg_out_clk), 1370 + MSM_PIN_FUNCTION(ddr_bist_complete), 1371 + MSM_PIN_FUNCTION(ddr_bist_fail), 1372 + MSM_PIN_FUNCTION(ddr_bist_start), 1373 + MSM_PIN_FUNCTION(ddr_bist_stop), 1374 + MSM_PIN_FUNCTION(ddr_pxi0), 1375 + MSM_PIN_FUNCTION(ddr_pxi1), 1376 + MSM_PIN_FUNCTION(ddr_pxi2), 1377 + MSM_PIN_FUNCTION(ddr_pxi3), 1378 + MSM_PIN_FUNCTION(dp_hot), 1379 + MSM_PIN_FUNCTION(egpio), 1380 + MSM_PIN_FUNCTION(gcc_gp1), 1381 + MSM_PIN_FUNCTION(gcc_gp2), 1382 + MSM_PIN_FUNCTION(gcc_gp3), 1383 + MSM_PIN_FUNCTION(gnss_adc0), 1384 + MSM_PIN_FUNCTION(gnss_adc1), 1385 + MSM_PIN_FUNCTION(i2chub0_se0), 1386 + MSM_PIN_FUNCTION(i2chub0_se1), 1387 + MSM_PIN_FUNCTION(i2chub0_se2), 1388 + MSM_PIN_FUNCTION(i2chub0_se3), 1389 + MSM_PIN_FUNCTION(i2chub0_se4), 1390 + MSM_PIN_FUNCTION(i2s0_data0), 1391 + MSM_PIN_FUNCTION(i2s0_data1), 1392 + MSM_PIN_FUNCTION(i2s0_sck), 1393 + MSM_PIN_FUNCTION(i2s0_ws), 1394 + MSM_PIN_FUNCTION(i2s1_data0), 1395 + MSM_PIN_FUNCTION(i2s1_data1), 1396 + MSM_PIN_FUNCTION(i2s1_sck), 1397 + MSM_PIN_FUNCTION(i2s1_ws), 1398 + MSM_PIN_FUNCTION(ibi_i3c), 1399 + MSM_PIN_FUNCTION(jitter_bist), 1400 + MSM_PIN_FUNCTION(mdp_esync0_out), 1401 + MSM_PIN_FUNCTION(mdp_esync1_out), 1402 + MSM_PIN_FUNCTION(mdp_vsync), 1403 + MSM_PIN_FUNCTION(mdp_vsync0_out), 1404 + MSM_PIN_FUNCTION(mdp_vsync1_out), 1405 + MSM_PIN_FUNCTION(mdp_vsync2_out), 1406 + MSM_PIN_FUNCTION(mdp_vsync3_out), 1407 + MSM_PIN_FUNCTION(mdp_vsync5_out), 1408 + MSM_PIN_FUNCTION(mdp_vsync_e), 1409 + MSM_PIN_FUNCTION(nav_gpio0), 1410 + MSM_PIN_FUNCTION(nav_gpio1), 1411 + MSM_PIN_FUNCTION(nav_gpio2), 1412 + MSM_PIN_FUNCTION(nav_gpio3), 1413 + MSM_PIN_FUNCTION(pcie0_clk_req_n), 1414 + MSM_PIN_FUNCTION(phase_flag), 1415 + MSM_PIN_FUNCTION(pll_bist_sync), 1416 + MSM_PIN_FUNCTION(pll_clk_aux), 1417 + MSM_PIN_FUNCTION(prng_rosc0), 1418 + MSM_PIN_FUNCTION(prng_rosc1), 1419 + MSM_PIN_FUNCTION(prng_rosc2), 1420 + MSM_PIN_FUNCTION(prng_rosc3), 1421 + MSM_PIN_FUNCTION(qdss_cti), 1422 + MSM_PIN_FUNCTION(qdss_gpio_traceclk), 1423 + MSM_PIN_FUNCTION(qdss_gpio_tracectl), 1424 + MSM_PIN_FUNCTION(qdss_gpio_tracedata), 1425 + MSM_PIN_FUNCTION(qlink_big_enable), 1426 + MSM_PIN_FUNCTION(qlink_big_request), 1427 + MSM_PIN_FUNCTION(qlink_little_enable), 1428 + MSM_PIN_FUNCTION(qlink_little_request), 1429 + MSM_PIN_FUNCTION(qlink_wmss), 1430 + MSM_PIN_FUNCTION(qspi0), 1431 + MSM_PIN_FUNCTION(qspi1), 1432 + MSM_PIN_FUNCTION(qspi2), 1433 + MSM_PIN_FUNCTION(qspi3), 1434 + MSM_PIN_FUNCTION(qspi_clk), 1435 + MSM_PIN_FUNCTION(qspi_cs), 1436 + MSM_PIN_FUNCTION(qup1_se0), 1437 + MSM_PIN_FUNCTION(qup1_se1), 1438 + MSM_PIN_FUNCTION(qup1_se2), 1439 + MSM_PIN_FUNCTION(qup1_se3), 1440 + MSM_PIN_FUNCTION(qup1_se4), 1441 + MSM_PIN_FUNCTION(qup1_se5), 1442 + MSM_PIN_FUNCTION(qup1_se6), 1443 + MSM_PIN_FUNCTION(qup1_se7), 1444 + MSM_PIN_FUNCTION(qup2_se0), 1445 + MSM_PIN_FUNCTION(qup2_se1), 1446 + MSM_PIN_FUNCTION(qup2_se2), 1447 + MSM_PIN_FUNCTION(qup2_se3), 1448 + MSM_PIN_FUNCTION(qup2_se4), 1449 + MSM_PIN_FUNCTION(qup3_se0), 1450 + MSM_PIN_FUNCTION(qup3_se1), 1451 + MSM_PIN_FUNCTION(qup3_se2), 1452 + MSM_PIN_FUNCTION(qup3_se3), 1453 + MSM_PIN_FUNCTION(qup3_se4), 1454 + MSM_PIN_FUNCTION(qup3_se5), 1455 + MSM_PIN_FUNCTION(qup4_se0), 1456 + MSM_PIN_FUNCTION(qup4_se1), 1457 + MSM_PIN_FUNCTION(qup4_se2), 1458 + MSM_PIN_FUNCTION(qup4_se3), 1459 + MSM_PIN_FUNCTION(qup4_se4), 1460 + MSM_PIN_FUNCTION(sd_write_protect), 1461 + MSM_PIN_FUNCTION(sdc40), 1462 + MSM_PIN_FUNCTION(sdc41), 1463 + MSM_PIN_FUNCTION(sdc42), 1464 + MSM_PIN_FUNCTION(sdc43), 1465 + MSM_PIN_FUNCTION(sdc4_clk), 1466 + MSM_PIN_FUNCTION(sdc4_cmd), 1467 + MSM_PIN_FUNCTION(sys_throttle), 1468 + MSM_PIN_FUNCTION(tb_trig_sdc2), 1469 + MSM_PIN_FUNCTION(tb_trig_sdc4), 1470 + MSM_PIN_FUNCTION(tmess_prng0), 1471 + MSM_PIN_FUNCTION(tmess_prng1), 1472 + MSM_PIN_FUNCTION(tmess_prng2), 1473 + MSM_PIN_FUNCTION(tmess_prng3), 1474 + MSM_PIN_FUNCTION(tsense_pwm1), 1475 + MSM_PIN_FUNCTION(tsense_pwm2), 1476 + MSM_PIN_FUNCTION(tsense_pwm3), 1477 + MSM_PIN_FUNCTION(tsense_pwm4), 1478 + MSM_PIN_FUNCTION(tsense_pwm5), 1479 + MSM_PIN_FUNCTION(tsense_pwm6), 1480 + MSM_PIN_FUNCTION(tsense_pwm7), 1481 + MSM_PIN_FUNCTION(uim0_clk), 1482 + MSM_PIN_FUNCTION(uim0_data), 1483 + MSM_PIN_FUNCTION(uim0_present), 1484 + MSM_PIN_FUNCTION(uim0_reset), 1485 + MSM_PIN_FUNCTION(uim1_clk), 1486 + MSM_PIN_FUNCTION(uim1_data), 1487 + MSM_PIN_FUNCTION(uim1_present), 1488 + MSM_PIN_FUNCTION(uim1_reset), 1489 + MSM_PIN_FUNCTION(usb0_hs), 1490 + MSM_PIN_FUNCTION(usb_phy), 1491 + MSM_PIN_FUNCTION(vfr_0), 1492 + MSM_PIN_FUNCTION(vfr_1), 1493 + MSM_PIN_FUNCTION(vsense_trigger_mirnat), 1494 + MSM_PIN_FUNCTION(wcn_sw), 1495 + MSM_PIN_FUNCTION(wcn_sw_ctrl), 1496 + }; 1497 + 1498 + /* Every pin is maintained as a single group, and missing or non-existing pin 1499 + * would be maintained as dummy group to synchronize pin group index with 1500 + * pin descriptor registered with pinctrl core. 1501 + * Clients would not be able to request these dummy pin groups. 1502 + */ 1503 + static const struct msm_pingroup kaanapali_groups[] = { 1504 + [0] = PINGROUP(0, qup2_se0, ibi_i3c, _, _, _, _, _, _, _, _, egpio), 1505 + [1] = PINGROUP(1, qup2_se0, ibi_i3c, _, _, _, _, _, _, _, _, egpio), 1506 + [2] = PINGROUP(2, qup2_se0, _, _, _, _, _, _, _, _, _, egpio), 1507 + [3] = PINGROUP(3, qup2_se0, _, _, _, _, _, _, _, _, _, egpio), 1508 + [4] = PINGROUP(4, qup2_se1, ibi_i3c, _, _, _, _, _, _, _, _, egpio), 1509 + [5] = PINGROUP(5, qup2_se1, ibi_i3c, _, _, _, _, _, _, _, _, egpio), 1510 + [6] = PINGROUP(6, qup2_se1, _, _, _, _, _, _, _, _, _, egpio), 1511 + [7] = PINGROUP(7, qup2_se1, _, _, _, _, _, _, _, _, _, egpio), 1512 + [8] = PINGROUP(8, qup3_se1, ibi_i3c, _, _, _, _, _, _, _, _, _), 1513 + [9] = PINGROUP(9, qup3_se1, ibi_i3c, _, _, _, _, _, _, _, _, _), 1514 + [10] = PINGROUP(10, qup3_se1, cci_async_in, _, tsense_pwm2, _, _, _, _, _, _, _), 1515 + [11] = PINGROUP(11, qup3_se1, cci_async_in, _, _, _, _, _, _, _, _, _), 1516 + [12] = PINGROUP(12, qup3_se2, ibi_i3c, qup3_se1, _, _, _, _, _, _, _, _), 1517 + [13] = PINGROUP(13, qup3_se2, ibi_i3c, qup3_se1, _, _, _, _, _, _, _, _), 1518 + [14] = PINGROUP(14, qup3_se2, _, _, _, _, _, _, _, _, _, _), 1519 + [15] = PINGROUP(15, qup3_se2, cci_async_in, qup3_se1, _, _, _, _, _, _, _, _), 1520 + [16] = PINGROUP(16, qup3_se3, _, _, _, _, _, _, _, _, _, _), 1521 + [17] = PINGROUP(17, qup3_se3, _, _, _, _, _, _, _, _, _, _), 1522 + [18] = PINGROUP(18, wcn_sw_ctrl, qup3_se3, _, _, _, _, _, _, _, _, _), 1523 + [19] = PINGROUP(19, wcn_sw, qup3_se3, _, _, _, _, _, _, _, _, _), 1524 + [20] = PINGROUP(20, qup3_se4, _, _, _, _, _, _, _, _, _, _), 1525 + [21] = PINGROUP(21, qup3_se4, _, _, _, _, _, _, _, _, _, _), 1526 + [22] = PINGROUP(22, qup3_se4, _, _, _, _, _, _, _, _, _, _), 1527 + [23] = PINGROUP(23, qup3_se4, _, _, _, _, _, _, _, _, _, _), 1528 + [24] = PINGROUP(24, qup3_se5, _, _, _, _, _, _, _, _, _, _), 1529 + [25] = PINGROUP(25, qup3_se5, _, _, _, _, _, _, _, _, _, _), 1530 + [26] = PINGROUP(26, qup3_se5, _, _, _, _, _, _, _, _, _, _), 1531 + [27] = PINGROUP(27, qup3_se5, qdss_cti, _, _, _, _, _, _, _, _, _), 1532 + [28] = PINGROUP(28, qup4_se1, ibi_i3c, _, _, _, _, _, _, _, _, egpio), 1533 + [29] = PINGROUP(29, qup4_se1, ibi_i3c, _, _, _, _, _, _, _, _, egpio), 1534 + [30] = PINGROUP(30, qup4_se1, _, _, _, _, _, _, _, _, _, _), 1535 + [31] = PINGROUP(31, qup4_se1, qdss_cti, _, _, _, _, _, _, _, _, _), 1536 + [32] = PINGROUP(32, qup4_se2, ibi_i3c, _, _, _, _, _, _, _, _, _), 1537 + [33] = PINGROUP(33, qup4_se2, ibi_i3c, _, _, _, _, _, _, _, _, _), 1538 + [34] = PINGROUP(34, qup4_se2, _, _, _, _, _, _, _, _, _, _), 1539 + [35] = PINGROUP(35, qup4_se2, _, _, _, _, _, _, _, _, _, _), 1540 + [36] = PINGROUP(36, qup1_se4, uim1_data, ibi_i3c, _, _, _, _, _, _, _, _), 1541 + [37] = PINGROUP(37, qup1_se4, uim1_clk, ibi_i3c, _, _, _, _, _, _, _, _), 1542 + [38] = PINGROUP(38, qup1_se4, qdss_gpio_tracedata, _, _, _, _, _, _, _, _, _), 1543 + [39] = PINGROUP(39, qup1_se4, uim1_reset, qdss_gpio_tracedata, _, _, _, _, _, _, _, _), 1544 + [40] = PINGROUP(40, qup1_se2, cmu_rng, ddr_bist_fail, _, qdss_gpio_tracedata, gnss_adc0, 1545 + _, _, _, _, _), 1546 + [41] = PINGROUP(41, qup1_se2, cmu_rng, ddr_bist_start, _, qdss_gpio_tracedata, gnss_adc0, 1547 + _, _, _, _, _), 1548 + [42] = PINGROUP(42, qup1_se2, cmu_rng, dbg_out_clk, qdss_gpio_tracedata, gnss_adc1, _, _, 1549 + _, _, _, _), 1550 + [43] = PINGROUP(43, qup1_se2, cmu_rng, _, qdss_gpio_tracedata, ddr_pxi2, _, _, _, _, _, _), 1551 + [44] = PINGROUP(44, qup1_se3, ddr_bist_complete, ddr_pxi1, _, _, _, _, _, _, _, _), 1552 + [45] = PINGROUP(45, qup1_se3, ddr_bist_stop, ddr_pxi1, _, _, _, _, _, _, _, _), 1553 + [46] = PINGROUP(46, qup1_se3, ddr_pxi3, _, _, _, _, _, _, _, _, _), 1554 + [47] = PINGROUP(47, qup1_se3, dp_hot, _, _, _, _, _, _, _, _, _), 1555 + [48] = PINGROUP(48, qup4_se0, ibi_i3c, _, _, _, _, _, _, _, _, egpio), 1556 + [49] = PINGROUP(49, qup4_se0, ibi_i3c, _, _, _, _, _, _, _, _, egpio), 1557 + [50] = PINGROUP(50, qup4_se0, _, _, _, _, _, _, _, _, _, egpio), 1558 + [51] = PINGROUP(51, qup4_se0, _, _, _, _, _, _, _, _, _, egpio), 1559 + [52] = PINGROUP(52, qup1_se5, ddr_pxi2, _, _, _, _, _, _, _, _, _), 1560 + [53] = PINGROUP(53, qup1_se5, _, ddr_pxi3, _, _, _, _, _, _, _, _), 1561 + [54] = PINGROUP(54, qup1_se5, uim1_data, ddr_pxi0, _, _, _, _, _, _, _, _), 1562 + [55] = PINGROUP(55, qup1_se5, uim1_clk, ddr_pxi0, _, _, _, _, _, _, _, _), 1563 + [56] = PINGROUP(56, qup1_se6, uim1_reset, _, _, _, _, _, _, _, _, _), 1564 + [57] = PINGROUP(57, qup1_se6, _, _, _, _, _, _, _, _, _, _), 1565 + [58] = PINGROUP(58, qup1_se6, _, _, _, _, _, _, _, _, _, _), 1566 + [59] = PINGROUP(59, qup1_se6, usb_phy, vsense_trigger_mirnat, _, _, _, _, _, _, _, _), 1567 + [60] = PINGROUP(60, qup1_se7, usb_phy, ibi_i3c, _, _, _, _, _, _, _, _), 1568 + [61] = PINGROUP(61, qup1_se7, ibi_i3c, _, _, _, _, _, _, _, _, _), 1569 + [62] = PINGROUP(62, qup1_se7, qdss_gpio_tracedata, _, _, _, _, _, _, _, _, _), 1570 + [63] = PINGROUP(63, qup1_se7, qdss_gpio_tracedata, _, _, _, _, _, _, _, _, _), 1571 + [64] = PINGROUP(64, qup3_se0, _, prng_rosc1, tmess_prng1, _, _, _, _, _, _, _), 1572 + [65] = PINGROUP(65, qup3_se0, _, prng_rosc2, tmess_prng2, _, _, _, _, _, _, _), 1573 + [66] = PINGROUP(66, i2chub0_se0, prng_rosc3, tmess_prng3, _, _, _, _, _, _, _, _), 1574 + [67] = PINGROUP(67, i2chub0_se0, _, _, _, _, _, _, _, _, _, _), 1575 + [68] = PINGROUP(68, i2chub0_se2, qdss_gpio_tracedata, _, _, _, _, _, _, _, _, _), 1576 + [69] = PINGROUP(69, i2chub0_se2, qdss_gpio_tracedata, _, _, _, _, _, _, _, _, _), 1577 + [70] = PINGROUP(70, i2chub0_se3, uim1_data, _, atest_usb, _, _, _, _, _, _, _), 1578 + [71] = PINGROUP(71, i2chub0_se3, uim1_clk, _, atest_usb, _, _, _, _, _, _, _), 1579 + [72] = PINGROUP(72, i2chub0_se4, uim1_reset, qdss_cti, _, atest_usb, _, _, _, _, _, _), 1580 + [73] = PINGROUP(73, i2chub0_se4, qdss_cti, jitter_bist, atest_usb, _, _, _, _, _, _, _), 1581 + [74] = PINGROUP(74, qup1_se1, aoss_cti, _, _, _, _, _, _, _, _, _), 1582 + [75] = PINGROUP(75, qup1_se1, aoss_cti, _, _, _, _, _, _, _, _, _), 1583 + [76] = PINGROUP(76, qup1_se1, aoss_cti, _, _, _, _, _, _, _, _, _), 1584 + [77] = PINGROUP(77, qup1_se1, aoss_cti, gnss_adc1, _, _, _, _, _, _, _, _), 1585 + [78] = PINGROUP(78, i2chub0_se1, _, _, _, _, _, _, _, _, _, _), 1586 + [79] = PINGROUP(79, i2chub0_se1, usb0_hs, _, _, _, _, _, _, _, _, _), 1587 + [80] = PINGROUP(80, qup1_se0, sdc40, qspi0, _, _, _, _, _, _, _, _), 1588 + [81] = PINGROUP(81, qup1_se0, sdc42, qspi2, _, _, _, _, _, _, _, _), 1589 + [82] = PINGROUP(82, qup1_se0, sdc43, qdss_cti, qspi3, _, _, _, _, _, _, _), 1590 + [83] = PINGROUP(83, qup1_se0, sdc4_clk, qdss_cti, qspi_clk, _, _, _, _, _, _, _), 1591 + [84] = PINGROUP(84, qup4_se3, _, _, _, _, _, _, _, _, _, _), 1592 + [85] = PINGROUP(85, sd_write_protect, prng_rosc0, tmess_prng0, _, _, _, _, _, _, _, _), 1593 + [86] = PINGROUP(86, mdp_vsync, mdp_vsync0_out, mdp_vsync1_out, gcc_gp2, _, _, _, _, _, _, 1594 + _), 1595 + [87] = PINGROUP(87, mdp_vsync, mdp_vsync2_out, mdp_vsync3_out, mdp_vsync5_out, gcc_gp3, _, 1596 + tsense_pwm1, _, _, _, _), 1597 + [88] = PINGROUP(88, mdp_vsync_e, mdp_esync0_out, tb_trig_sdc2, _, _, _, _, _, _, _, _), 1598 + [89] = PINGROUP(89, cam_mclk, _, _, _, _, _, _, _, _, _, _), 1599 + [90] = PINGROUP(90, cam_mclk, _, _, _, _, _, _, _, _, _, _), 1600 + [91] = PINGROUP(91, cam_asc_mclk2, _, _, _, _, _, _, _, _, _, _), 1601 + [92] = PINGROUP(92, cam_mclk, _, _, _, _, _, _, _, _, _, _), 1602 + [93] = PINGROUP(93, cam_asc_mclk4, _, _, _, _, _, _, _, _, _, _), 1603 + [94] = PINGROUP(94, cam_mclk, pll_clk_aux, _, _, _, _, _, _, _, _, _), 1604 + [95] = PINGROUP(95, cam_mclk, _, _, _, _, _, _, _, _, _, _), 1605 + [96] = PINGROUP(96, cam_mclk, _, _, _, _, _, _, _, _, _, _), 1606 + [97] = PINGROUP(97, mdp_vsync, tsense_pwm3, _, _, _, _, _, _, _, _, _), 1607 + [98] = PINGROUP(98, mdp_vsync, _, _, _, _, _, _, _, _, _, _), 1608 + [99] = PINGROUP(99, sys_throttle, tsense_pwm4, _, _, _, _, _, _, _, _, _), 1609 + [100] = PINGROUP(100, mdp_esync1_out, _, _, _, _, _, _, _, _, _, _), 1610 + [101] = PINGROUP(101, _, _, _, _, _, _, _, _, _, _, _), 1611 + [102] = PINGROUP(102, _, _, _, _, _, _, _, _, _, _, _), 1612 + [103] = PINGROUP(103, pcie0_clk_req_n, _, _, _, _, _, _, _, _, _, _), 1613 + [104] = PINGROUP(104, pll_bist_sync, _, _, _, _, _, _, _, _, _, _), 1614 + [105] = PINGROUP(105, cci_timer, tsense_pwm5, _, _, _, _, _, _, _, _, _), 1615 + [106] = PINGROUP(106, cci_timer, tsense_pwm6, _, _, _, _, _, _, _, _, _), 1616 + [107] = PINGROUP(107, cci_timer, cci_i2c_sda, _, _, _, _, _, _, _, _, _), 1617 + [108] = PINGROUP(108, cci_i2c_sda, _, _, _, _, _, _, _, _, _, _), 1618 + [109] = PINGROUP(109, cci_i2c_sda, _, _, _, _, _, _, _, _, _, _), 1619 + [110] = PINGROUP(110, cci_i2c_scl, _, _, _, _, _, _, _, _, _, _), 1620 + [111] = PINGROUP(111, cci_i2c_sda, _, _, _, _, _, _, _, _, _, _), 1621 + [112] = PINGROUP(112, cci_i2c_scl, _, _, _, _, _, _, _, _, _, _), 1622 + [113] = PINGROUP(113, cci_i2c_sda, _, _, _, _, _, _, _, _, _, _), 1623 + [114] = PINGROUP(114, cci_i2c_scl, _, _, _, _, _, _, _, _, _, _), 1624 + [115] = PINGROUP(115, cci_i2c_sda, _, _, _, _, _, _, _, _, _, _), 1625 + [116] = PINGROUP(116, cci_i2c_scl, _, _, _, _, _, _, _, _, _, _), 1626 + [117] = PINGROUP(117, i2s1_sck, qup2_se2, phase_flag, _, _, _, _, _, _, _, _), 1627 + [118] = PINGROUP(118, i2s1_data0, qup2_se2, phase_flag, _, _, _, _, _, _, _, _), 1628 + [119] = PINGROUP(119, i2s1_ws, qup2_se2, phase_flag, _, _, _, _, _, _, _, _), 1629 + [120] = PINGROUP(120, i2s1_data1, qup2_se2, audio_ext_mclk1, audio_ref_clk, _, _, _, _, _, 1630 + _, _), 1631 + [121] = PINGROUP(121, audio_ext_mclk0, qup4_se3, _, _, _, _, _, _, _, _, _), 1632 + [122] = PINGROUP(122, i2s0_sck, qup2_se3, _, _, _, _, _, _, _, _, _), 1633 + [123] = PINGROUP(123, i2s0_data0, qup2_se3, _, phase_flag, _, _, _, _, _, _, _), 1634 + [124] = PINGROUP(124, i2s0_data1, qup2_se3, _, phase_flag, _, _, _, _, _, _, _), 1635 + [125] = PINGROUP(125, i2s0_ws, qup2_se3, phase_flag, _, _, _, _, _, _, _, _), 1636 + [126] = PINGROUP(126, uim0_data, qdss_gpio_tracedata, atest_char, _, _, _, _, _, _, _, _), 1637 + [127] = PINGROUP(127, uim0_clk, qdss_gpio_tracectl, atest_char, _, _, _, _, _, _, _, _), 1638 + [128] = PINGROUP(128, uim0_reset, qdss_gpio_traceclk, atest_char, _, _, _, _, _, _, _, _), 1639 + [129] = PINGROUP(129, uim0_present, qdss_gpio_tracedata, atest_usb, atest_char, _, _, _, _, 1640 + _, _, _), 1641 + [130] = PINGROUP(130, uim1_data, qup1_se2, gcc_gp1, qdss_gpio_tracedata, _, _, _, _, _, _, 1642 + _), 1643 + [131] = PINGROUP(131, uim1_clk, qup1_se2, gcc_gp2, qdss_gpio_tracedata, _, _, _, _, _, _, 1644 + _), 1645 + [132] = PINGROUP(132, uim1_reset, qup1_se2, gcc_gp3, qdss_gpio_tracedata, _, _, _, _, _, _, 1646 + _), 1647 + [133] = PINGROUP(133, uim1_present, qdss_gpio_tracedata, atest_char, _, _, _, _, _, _, _, 1648 + _), 1649 + [134] = PINGROUP(134, _, _, _, _, _, _, _, _, _, _, _), 1650 + [135] = PINGROUP(135, _, _, _, _, _, _, _, _, _, _, _), 1651 + [136] = PINGROUP(136, _, _, _, _, _, _, _, _, _, _, _), 1652 + [137] = PINGROUP(137, _, _, _, _, _, _, _, _, _, _, _), 1653 + [138] = PINGROUP(138, _, _, _, _, _, _, _, _, _, _, _), 1654 + [139] = PINGROUP(139, _, _, _, _, _, _, _, _, _, _, _), 1655 + [140] = PINGROUP(140, _, _, _, _, _, _, _, _, _, _, _), 1656 + [141] = PINGROUP(141, _, _, _, _, _, _, _, _, _, _, _), 1657 + [142] = PINGROUP(142, _, _, _, _, _, _, _, _, _, _, _), 1658 + [143] = PINGROUP(143, _, _, _, _, _, _, _, _, _, _, _), 1659 + [144] = PINGROUP(144, coex_uart1_rx, cmu_rng, _, _, _, _, _, _, _, _, _), 1660 + [145] = PINGROUP(145, coex_uart1_tx, cmu_rng, _, _, _, _, _, _, _, _, _), 1661 + [146] = PINGROUP(146, _, vfr_0, coex_uart2_rx, cmu_rng, tb_trig_sdc4, qspi_cs, _, _, _, _, 1662 + _), 1663 + [147] = PINGROUP(147, _, coex_uart2_tx, cmu_rng, sdc41, qspi1, _, _, _, _, _, _), 1664 + [148] = PINGROUP(148, nav_gpio2, _, sdc4_cmd, qspi_cs, _, _, _, _, _, _, _), 1665 + [149] = PINGROUP(149, cci_i2c_scl, _, _, _, _, _, _, _, _, _, _), 1666 + [150] = PINGROUP(150, nav_gpio0, nav_gpio3, _, _, _, _, _, _, _, _, _), 1667 + [151] = PINGROUP(151, nav_gpio1, vfr_1, _, _, _, _, _, _, _, _, _), 1668 + [152] = PINGROUP(152, qlink_little_request, _, _, _, _, _, _, _, _, _, _), 1669 + [153] = PINGROUP(153, qlink_little_enable, _, _, _, _, _, _, _, _, _, _), 1670 + [154] = PINGROUP(154, qlink_wmss, _, _, _, _, _, _, _, _, _, _), 1671 + [155] = PINGROUP(155, qlink_big_request, qdss_cti, _, _, _, _, _, _, _, _, _), 1672 + [156] = PINGROUP(156, qlink_big_enable, _, _, _, _, _, _, _, _, _, _), 1673 + [157] = PINGROUP(157, _, _, _, _, _, _, _, _, _, _, _), 1674 + [158] = PINGROUP(158, qdss_cti, gcc_gp1, _, _, _, _, _, _, _, _, _), 1675 + [159] = PINGROUP(159, cci_timer, tsense_pwm7, _, _, _, _, _, _, _, _, _), 1676 + [160] = PINGROUP(160, cci_timer, cci_i2c_scl, _, _, _, _, _, _, _, _, _), 1677 + [161] = PINGROUP(161, qup4_se4, _, _, _, _, _, _, _, _, _, _), 1678 + [162] = PINGROUP(162, qup4_se4, _, _, _, _, _, _, _, _, _, _), 1679 + [163] = PINGROUP(163, _, _, _, _, _, _, _, _, _, _, egpio), 1680 + [164] = PINGROUP(164, _, _, _, _, _, _, _, _, _, _, egpio), 1681 + [165] = PINGROUP(165, _, _, _, _, _, _, _, _, _, _, egpio), 1682 + [166] = PINGROUP(166, _, _, _, _, _, _, _, _, _, _, egpio), 1683 + [167] = PINGROUP(167, _, _, _, _, _, _, _, _, _, _, egpio), 1684 + [168] = PINGROUP(168, _, _, _, _, _, _, _, _, _, _, egpio), 1685 + [169] = PINGROUP(169, phase_flag, _, _, _, _, _, _, _, _, _, egpio), 1686 + [170] = PINGROUP(170, phase_flag, _, _, _, _, _, _, _, _, _, egpio), 1687 + [171] = PINGROUP(171, phase_flag, _, _, _, _, _, _, _, _, _, egpio), 1688 + [172] = PINGROUP(172, phase_flag, _, _, _, _, _, _, _, _, _, egpio), 1689 + [173] = PINGROUP(173, phase_flag, _, _, _, _, _, _, _, _, _, egpio), 1690 + [174] = PINGROUP(174, _, _, _, _, _, _, _, _, _, _, egpio), 1691 + [175] = PINGROUP(175, phase_flag, _, _, _, _, _, _, _, _, _, egpio), 1692 + [176] = PINGROUP(176, phase_flag, _, _, _, _, _, _, _, _, _, egpio), 1693 + [177] = PINGROUP(177, _, _, _, _, _, _, _, _, _, _, egpio), 1694 + [178] = PINGROUP(178, _, _, _, _, _, _, _, _, _, _, egpio), 1695 + [179] = PINGROUP(179, phase_flag, _, _, _, _, _, _, _, _, _, egpio), 1696 + [180] = PINGROUP(180, phase_flag, _, _, _, _, _, _, _, _, _, egpio), 1697 + [181] = PINGROUP(181, phase_flag, _, _, _, _, _, _, _, _, _, egpio), 1698 + [182] = PINGROUP(182, _, _, _, _, _, _, _, _, _, _, egpio), 1699 + [183] = PINGROUP(183, _, _, _, _, _, _, _, _, _, _, egpio), 1700 + [184] = PINGROUP(184, phase_flag, _, _, _, _, _, _, _, _, _, egpio), 1701 + [185] = PINGROUP(185, phase_flag, _, _, _, _, _, _, _, _, _, egpio), 1702 + [186] = PINGROUP(186, _, _, _, _, _, _, _, _, _, _, egpio), 1703 + [187] = PINGROUP(187, _, _, _, _, _, _, _, _, _, _, egpio), 1704 + [188] = PINGROUP(188, _, _, _, _, _, _, _, _, _, _, egpio), 1705 + [189] = PINGROUP(189, _, _, _, _, _, _, _, _, _, _, egpio), 1706 + [190] = PINGROUP(190, _, _, _, _, _, _, _, _, _, _, egpio), 1707 + [191] = PINGROUP(191, _, _, _, _, _, _, _, _, _, _, egpio), 1708 + [192] = PINGROUP(192, phase_flag, _, _, _, _, _, _, _, _, _, egpio), 1709 + [193] = PINGROUP(193, _, _, _, _, _, _, _, _, _, _, egpio), 1710 + [194] = PINGROUP(194, _, _, _, _, _, _, _, _, _, _, egpio), 1711 + [195] = PINGROUP(195, _, _, _, _, _, _, _, _, _, _, egpio), 1712 + [196] = PINGROUP(196, phase_flag, _, _, _, _, _, _, _, _, _, egpio), 1713 + [197] = PINGROUP(197, phase_flag, _, _, _, _, _, _, _, _, _, egpio), 1714 + [198] = PINGROUP(198, phase_flag, _, _, _, _, _, _, _, _, _, egpio), 1715 + [199] = PINGROUP(199, phase_flag, _, _, _, _, _, _, _, _, _, egpio), 1716 + [200] = PINGROUP(200, _, _, _, _, _, _, _, _, _, _, egpio), 1717 + [201] = PINGROUP(201, _, _, _, _, _, _, _, _, _, _, egpio), 1718 + [202] = PINGROUP(202, _, _, _, _, _, _, _, _, _, _, egpio), 1719 + [203] = PINGROUP(203, _, _, _, _, _, _, _, _, _, _, egpio), 1720 + [204] = PINGROUP(204, phase_flag, _, _, _, _, _, _, _, _, _, egpio), 1721 + [205] = PINGROUP(205, _, _, _, _, _, _, _, _, _, _, egpio), 1722 + [206] = PINGROUP(206, phase_flag, _, _, _, _, _, _, _, _, _, egpio), 1723 + [207] = PINGROUP(207, phase_flag, _, _, _, _, _, _, _, _, _, egpio), 1724 + [208] = PINGROUP(208, qup2_se4, _, phase_flag, _, _, _, _, _, _, _, egpio), 1725 + [209] = PINGROUP(209, qup2_se4, _, _, _, _, _, _, _, _, _, egpio), 1726 + [210] = PINGROUP(210, phase_flag, _, _, _, _, _, _, _, _, _, egpio), 1727 + [211] = PINGROUP(211, phase_flag, _, _, _, _, _, _, _, _, _, egpio), 1728 + [212] = PINGROUP(212, _, _, _, _, _, _, _, _, _, _, egpio), 1729 + [213] = PINGROUP(213, _, _, _, _, _, _, _, _, _, _, egpio), 1730 + [214] = PINGROUP(214, phase_flag, _, _, _, _, _, _, _, _, _, egpio), 1731 + [215] = PINGROUP(215, phase_flag, _, _, _, _, _, _, _, _, _, egpio), 1732 + [216] = PINGROUP(216, phase_flag, _, _, _, _, _, _, _, _, _, egpio), 1733 + [217] = UFS_RESET(ufs_reset, 0xe8004, 0xe9000), 1734 + [218] = SDC_QDSD_PINGROUP(sdc2_clk, 0xdd000, 14, 6), 1735 + [219] = SDC_QDSD_PINGROUP(sdc2_cmd, 0xdd000, 11, 3), 1736 + [220] = SDC_QDSD_PINGROUP(sdc2_data, 0xdd000, 9, 0), 1737 + }; 1738 + 1739 + static const struct msm_gpio_wakeirq_map kaanapali_pdc_map[] = { 1740 + { 0, 89 }, { 3, 97 }, { 4, 90 }, { 7, 91 }, { 8, 92 }, { 11, 93 }, 1741 + { 12, 101 }, { 15, 115 }, { 17, 125 }, { 18, 127 }, { 19, 96 }, { 23, 99 }, 1742 + { 24, 100 }, { 27, 102 }, { 28, 103 }, { 31, 111 }, { 32, 109 }, { 35, 85 }, 1743 + { 36, 110 }, { 39, 112 }, { 43, 113 }, { 47, 138 }, { 48, 114 }, { 51, 98 }, 1744 + { 55, 88 }, { 57, 120 }, { 59, 121 }, { 60, 122 }, { 63, 108 }, { 64, 94 }, 1745 + { 65, 107 }, { 67, 116 }, { 68, 129 }, { 69, 130 }, { 75, 135 }, { 77, 123 }, 1746 + { 78, 119 }, { 79, 131 }, { 80, 139 }, { 81, 132 }, { 84, 118 }, { 85, 133 }, 1747 + { 86, 140 }, { 87, 141 }, { 88, 142 }, { 95, 143 }, { 96, 144 }, { 97, 117 }, 1748 + { 98, 134 }, { 99, 95 }, { 101, 145 }, { 102, 146 }, { 103, 147 }, { 104, 148 }, 1749 + { 120, 149 }, { 125, 150 }, { 129, 137 }, { 133, 84 }, { 144, 151 }, { 146, 152 }, 1750 + { 151, 153 }, { 152, 154 }, { 155, 106 }, { 158, 104 }, { 162, 126 }, { 164, 155 }, 1751 + { 167, 156 }, { 169, 157 }, { 170, 158 }, { 172, 159 }, { 174, 160 }, { 175, 161 }, 1752 + { 179, 162 }, { 180, 163 }, { 183, 164 }, { 186, 165 }, { 188, 128 }, { 189, 166 }, 1753 + { 190, 105 }, { 191, 167 }, { 194, 168 }, { 195, 169 }, { 196, 170 }, { 197, 171 }, 1754 + { 199, 136 }, { 200, 86 }, { 201, 172 }, { 202, 173 }, { 203, 174 }, { 205, 124 }, 1755 + { 209, 175 }, { 213, 87 }, { 216, 176 }, 1756 + }; 1757 + 1758 + static const struct msm_pinctrl_soc_data kaanapali_tlmm = { 1759 + .pins = kaanapali_pins, 1760 + .npins = ARRAY_SIZE(kaanapali_pins), 1761 + .functions = kaanapali_functions, 1762 + .nfunctions = ARRAY_SIZE(kaanapali_functions), 1763 + .groups = kaanapali_groups, 1764 + .ngroups = ARRAY_SIZE(kaanapali_groups), 1765 + .ngpios = 218, 1766 + .wakeirq_map = kaanapali_pdc_map, 1767 + .nwakeirq_map = ARRAY_SIZE(kaanapali_pdc_map), 1768 + .egpio_func = 11, 1769 + }; 1770 + 1771 + static int kaanapali_tlmm_probe(struct platform_device *pdev) 1772 + { 1773 + return msm_pinctrl_probe(pdev, &kaanapali_tlmm); 1774 + } 1775 + 1776 + static const struct of_device_id kaanapali_tlmm_of_match[] = { 1777 + { .compatible = "qcom,kaanapali-tlmm",}, 1778 + {}, 1779 + }; 1780 + 1781 + static struct platform_driver kaanapali_tlmm_driver = { 1782 + .driver = { 1783 + .name = "kaanapali-tlmm", 1784 + .of_match_table = kaanapali_tlmm_of_match, 1785 + }, 1786 + .probe = kaanapali_tlmm_probe, 1787 + }; 1788 + 1789 + static int __init kaanapali_tlmm_init(void) 1790 + { 1791 + return platform_driver_register(&kaanapali_tlmm_driver); 1792 + } 1793 + arch_initcall(kaanapali_tlmm_init); 1794 + 1795 + static void __exit kaanapali_tlmm_exit(void) 1796 + { 1797 + platform_driver_unregister(&kaanapali_tlmm_driver); 1798 + } 1799 + module_exit(kaanapali_tlmm_exit); 1800 + 1801 + MODULE_DESCRIPTION("QTI Kaanapali TLMM driver"); 1802 + MODULE_LICENSE("GPL"); 1803 + MODULE_DEVICE_TABLE(of, kaanapali_tlmm_of_match);
+9
drivers/pinctrl/qcom/pinctrl-spmi-gpio.c
··· 42 42 #define PMIC_GPIO_SUBTYPE_GPIO_MV 0x11 43 43 #define PMIC_GPIO_SUBTYPE_GPIO_LV_VIN2 0x12 44 44 #define PMIC_GPIO_SUBTYPE_GPIO_MV_VIN3 0x13 45 + #define PMIC_GPIO_SUBTYPE_GPIO_LV_VIN2_CLK 0x14 46 + #define PMIC_GPIO_SUBTYPE_GPIO_MV_VIN3_CLK 0x15 45 47 46 48 #define PMIC_MPP_REG_RT_STS 0x10 47 49 #define PMIC_MPP_REG_RT_STS_VAL_MASK 0x1 ··· 854 852 pad->lv_mv_type = true; 855 853 break; 856 854 case PMIC_GPIO_SUBTYPE_GPIO_LV_VIN2: 855 + case PMIC_GPIO_SUBTYPE_GPIO_LV_VIN2_CLK: 857 856 pad->num_sources = 2; 858 857 pad->have_buffer = true; 859 858 pad->lv_mv_type = true; 860 859 break; 861 860 case PMIC_GPIO_SUBTYPE_GPIO_MV_VIN3: 861 + case PMIC_GPIO_SUBTYPE_GPIO_MV_VIN3_CLK: 862 862 pad->num_sources = 3; 863 863 pad->have_buffer = true; 864 864 pad->lv_mv_type = true; ··· 1243 1239 { .compatible = "qcom,pm8998-gpio", .data = (void *) 26 }, 1244 1240 { .compatible = "qcom,pma8084-gpio", .data = (void *) 22 }, 1245 1241 { .compatible = "qcom,pmc8380-gpio", .data = (void *) 10 }, 1242 + { .compatible = "qcom,pmcx0102-gpio", .data = (void *)14 }, 1246 1243 { .compatible = "qcom,pmd8028-gpio", .data = (void *) 4 }, 1244 + { .compatible = "qcom,pmh0101-gpio", .data = (void *)18 }, 1245 + { .compatible = "qcom,pmh0104-gpio", .data = (void *)8 }, 1246 + { .compatible = "qcom,pmh0110-gpio", .data = (void *)14 }, 1247 1247 { .compatible = "qcom,pmi632-gpio", .data = (void *) 8 }, 1248 1248 { .compatible = "qcom,pmi8950-gpio", .data = (void *) 2 }, 1249 1249 { .compatible = "qcom,pmi8994-gpio", .data = (void *) 10 }, ··· 1256 1248 { .compatible = "qcom,pmiv0104-gpio", .data = (void *) 10 }, 1257 1249 { .compatible = "qcom,pmk8350-gpio", .data = (void *) 4 }, 1258 1250 { .compatible = "qcom,pmk8550-gpio", .data = (void *) 6 }, 1251 + { .compatible = "qcom,pmk8850-gpio", .data = (void *)8 }, 1259 1252 { .compatible = "qcom,pmm8155au-gpio", .data = (void *) 10 }, 1260 1253 { .compatible = "qcom,pmm8654au-gpio", .data = (void *) 12 }, 1261 1254 /* pmp8074 has 12 GPIOs with holes on 1 and 12 */
-1
drivers/pinctrl/renesas/pfc-emev2.c
··· 666 666 PINMUX_IPSR_NOFN(UART_1_0_PORT158, UART2_TX, SEL_UART_1_0_01), 667 667 }; 668 668 669 - 670 669 #define EMEV_MUX_PIN(name, pin, mark) \ 671 670 static const unsigned int name##_pins[] = { pin }; \ 672 671 static const unsigned int name##_mux[] = { mark##_MARK }
-2
drivers/pinctrl/renesas/pfc-r8a73a4.c
··· 85 85 /* Port320 - Port329 */ \ 86 86 PORT_10(320, fn, pfx##32, sfx) 87 87 88 - 89 88 enum { 90 89 PINMUX_RESERVED = 0, 91 90 ··· 225 226 PINMUX_FUNCTION_END, 226 227 227 228 PINMUX_MARK_BEGIN, 228 - 229 229 230 230 #define F1(a) a##_MARK 231 231 #define F2(a) a##_MARK
-1
drivers/pinctrl/renesas/pfc-r8a7778.c
··· 1994 1994 "scif5_data_b", 1995 1995 }; 1996 1996 1997 - 1998 1997 static const char * const sdhi0_groups[] = { 1999 1998 "sdhi0_cd", 2000 1999 "sdhi0_ctrl",
-1
drivers/pinctrl/renesas/pfc-r8a77951.c
··· 249 249 #define GPSR7_1 FM(AVS2) 250 250 #define GPSR7_0 FM(AVS1) 251 251 252 - 253 252 /* IPSRx */ /* 0 */ /* 1 */ /* 2 */ /* 3 */ /* 4 */ /* 5 */ /* 6 */ /* 7 */ /* 8 */ /* 9 */ /* A */ /* B */ /* C - F */ 254 253 #define IP0_3_0 FM(AVB_MDC) F_(0, 0) FM(MSIOF2_SS2_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) F_(0, 0) F_(0, 0) 255 254 #define IP0_7_4 FM(AVB_MAGIC) F_(0, 0) FM(MSIOF2_SS1_C) FM(SCK4_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)
-1
drivers/pinctrl/renesas/pfc-r8a7796.c
··· 254 254 #define GPSR7_1 FM(AVS2) 255 255 #define GPSR7_0 FM(AVS1) 256 256 257 - 258 257 /* IPSRx */ /* 0 */ /* 1 */ /* 2 */ /* 3 */ /* 4 */ /* 5 */ /* 6 */ /* 7 */ /* 8 */ /* 9 */ /* A */ /* B */ /* C - F */ 259 258 #define IP0_3_0 FM(AVB_MDC) F_(0, 0) FM(MSIOF2_SS2_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) F_(0, 0) F_(0, 0) 260 259 #define IP0_7_4 FM(AVB_MAGIC) F_(0, 0) FM(MSIOF2_SS1_C) FM(SCK4_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)
-1
drivers/pinctrl/renesas/pfc-r8a77965.c
··· 254 254 #define GPSR7_1 FM(AVS2) 255 255 #define GPSR7_0 FM(AVS1) 256 256 257 - 258 257 /* IPSRx */ /* 0 */ /* 1 */ /* 2 */ /* 3 */ /* 4 */ /* 5 */ /* 6 */ /* 7 */ /* 8 */ /* 9 */ /* A */ /* B */ /* C - F */ 259 258 #define IP0_3_0 FM(AVB_MDC) F_(0, 0) FM(MSIOF2_SS2_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) F_(0, 0) F_(0, 0) 260 259 #define IP0_7_4 FM(AVB_MAGIC) F_(0, 0) FM(MSIOF2_SS1_C) FM(SCK4_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)
-1
drivers/pinctrl/renesas/pfc-r8a77970.c
··· 159 159 #define GPSR5_1 FM(QSPI0_MOSI_IO0) 160 160 #define GPSR5_0 FM(QSPI0_SPCLK) 161 161 162 - 163 162 /* IPSRx */ /* 0 */ /* 1 */ /* 2 */ /* 3 */ /* 4 */ /* 5 */ /* 6 - F */ 164 163 #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) 165 164 #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)
-1
drivers/pinctrl/renesas/pfc-r8a77980.c
··· 193 193 #define GPSR5_1 FM(QSPI0_MOSI_IO0) 194 194 #define GPSR5_0 FM(QSPI0_SPCLK) 195 195 196 - 197 196 /* IPSRx */ /* 0 */ /* 1 */ /* 2 */ /* 3 */ /* 4 */ /* 5 */ /* 6 - F */ 198 197 #define IP0_3_0 FM(DU_DR2) FM(SCK4) FM(GETHER_RMII_CRS_DV) 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) 199 198 #define IP0_7_4 FM(DU_DR3) FM(RX4) FM(GETHER_RMII_RX_ER) 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)
-2
drivers/pinctrl/renesas/pfc-r8a77995.c
··· 427 427 #define MOD_SEL1_27 FM(SEL_SCIF0_0) FM(SEL_SCIF0_1) 428 428 #define MOD_SEL1_26 FM(SEL_SSIF4_0) FM(SEL_SSIF4_1) 429 429 430 - 431 430 #define PINMUX_MOD_SELS \ 432 431 \ 433 432 MOD_SEL1_31 \ ··· 2867 2868 [TDSELCTRL] = { 0xe60603c0, }, 2868 2869 { /* sentinel */ } 2869 2870 }; 2870 - 2871 2871 2872 2872 static int r8a77995_pin_to_pocctrl(unsigned int pin, u32 *pocctrl) 2873 2873 {
-1
drivers/pinctrl/renesas/pfc-r8a779f0.c
··· 652 652 SDA5_MARK, SCL5_MARK, 653 653 }; 654 654 655 - 656 655 /* - INTC-EX ---------------------------------------------------------------- */ 657 656 static const unsigned int intc_ex_irq0_pins[] = { 658 657 /* IRQ0 */
+33 -67
drivers/pinctrl/renesas/pfc-r8a779g0.c
··· 352 352 #define IP1SR2_3_0 FM(TPU0TO0_A) FM(CANFD6_RX) F_(0, 0) FM(TCLK1_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) F_(0, 0) 353 353 #define IP1SR2_7_4 FM(CAN_CLK) FM(FXR_TXENA_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) F_(0, 0) F_(0, 0) F_(0, 0) 354 354 #define IP1SR2_11_8 FM(CANFD0_TX) FM(FXR_TXENB_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) F_(0, 0) F_(0, 0) F_(0, 0) 355 - #define IP1SR2_15_12 FM(CANFD0_RX) FM(STPWT_EXTFXR) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 355 + #define IP1SR2_15_12 FM(CANFD0_RX) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 356 356 #define IP1SR2_19_16 FM(CANFD2_TX) FM(TPU0TO2_A) F_(0, 0) FM(TCLK3_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) F_(0, 0) 357 357 #define IP1SR2_23_20 FM(CANFD2_RX) FM(TPU0TO3_A) FM(PWM1_B) FM(TCLK4_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) F_(0, 0) 358 358 #define IP1SR2_27_24 FM(CANFD3_TX) F_(0, 0) FM(PWM2) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) ··· 471 471 #define IP0SR6_7_4 FM(AVB1_MAGIC) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 472 472 #define IP0SR6_11_8 FM(AVB1_MDC) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 473 473 #define IP0SR6_15_12 FM(AVB1_PHY_INT) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 474 - #define IP0SR6_19_16 FM(AVB1_LINK) FM(AVB1_MII_TX_ER) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 475 - #define IP0SR6_23_20 FM(AVB1_AVTP_MATCH) FM(AVB1_MII_RX_ER) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 476 - #define IP0SR6_27_24 FM(AVB1_TXC) FM(AVB1_MII_TXC) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 477 - #define IP0SR6_31_28 FM(AVB1_TX_CTL) FM(AVB1_MII_TX_EN) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 474 + #define IP0SR6_19_16 FM(AVB1_LINK) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 475 + #define IP0SR6_23_20 FM(AVB1_AVTP_MATCH) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 476 + #define IP0SR6_27_24 FM(AVB1_TXC) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 477 + #define IP0SR6_31_28 FM(AVB1_TX_CTL) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 478 478 479 479 /* IP1SR6 */ /* 0 */ /* 1 */ /* 2 */ /* 3 4 5 6 7 8 9 A B C D E F */ 480 - #define IP1SR6_3_0 FM(AVB1_RXC) FM(AVB1_MII_RXC) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 481 - #define IP1SR6_7_4 FM(AVB1_RX_CTL) FM(AVB1_MII_RX_DV) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 482 - #define IP1SR6_11_8 FM(AVB1_AVTP_PPS) FM(AVB1_MII_COL) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 483 - #define IP1SR6_15_12 FM(AVB1_AVTP_CAPTURE) FM(AVB1_MII_CRS) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 484 - #define IP1SR6_19_16 FM(AVB1_TD1) FM(AVB1_MII_TD1) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 485 - #define IP1SR6_23_20 FM(AVB1_TD0) FM(AVB1_MII_TD0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 486 - #define IP1SR6_27_24 FM(AVB1_RD1) FM(AVB1_MII_RD1) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 487 - #define IP1SR6_31_28 FM(AVB1_RD0) FM(AVB1_MII_RD0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 480 + #define IP1SR6_3_0 FM(AVB1_RXC) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 481 + #define IP1SR6_7_4 FM(AVB1_RX_CTL) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 482 + #define IP1SR6_11_8 FM(AVB1_AVTP_PPS) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 483 + #define IP1SR6_15_12 FM(AVB1_AVTP_CAPTURE) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 484 + #define IP1SR6_19_16 FM(AVB1_TD1) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 485 + #define IP1SR6_23_20 FM(AVB1_TD0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 486 + #define IP1SR6_27_24 FM(AVB1_RD1) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 487 + #define IP1SR6_31_28 FM(AVB1_RD0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 488 488 489 489 /* IP2SR6 */ /* 0 */ /* 1 */ /* 2 */ /* 3 4 5 6 7 8 9 A B C D E F */ 490 - #define IP2SR6_3_0 FM(AVB1_TD2) FM(AVB1_MII_TD2) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 491 - #define IP2SR6_7_4 FM(AVB1_RD2) FM(AVB1_MII_RD2) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 492 - #define IP2SR6_11_8 FM(AVB1_TD3) FM(AVB1_MII_TD3) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 493 - #define IP2SR6_15_12 FM(AVB1_RD3) FM(AVB1_MII_RD3) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 490 + #define IP2SR6_3_0 FM(AVB1_TD2) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 491 + #define IP2SR6_7_4 FM(AVB1_RD2) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 492 + #define IP2SR6_11_8 FM(AVB1_TD3) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 493 + #define IP2SR6_15_12 FM(AVB1_RD3) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 494 494 #define IP2SR6_19_16 FM(AVB1_TXCREFCLK) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 495 495 496 496 /* SR7 */ 497 497 /* IP0SR7 */ /* 0 */ /* 1 */ /* 2 */ /* 3 4 5 6 7 8 9 A B C D E F */ 498 - #define IP0SR7_3_0 FM(AVB0_AVTP_PPS) FM(AVB0_MII_COL) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 499 - #define IP0SR7_7_4 FM(AVB0_AVTP_CAPTURE) FM(AVB0_MII_CRS) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 500 - #define IP0SR7_11_8 FM(AVB0_AVTP_MATCH) FM(AVB0_MII_RX_ER) 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) 501 - #define IP0SR7_15_12 FM(AVB0_TD3) FM(AVB0_MII_TD3) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 502 - #define IP0SR7_19_16 FM(AVB0_LINK) FM(AVB0_MII_TX_ER) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 498 + #define IP0SR7_3_0 FM(AVB0_AVTP_PPS) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 499 + #define IP0SR7_7_4 FM(AVB0_AVTP_CAPTURE) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 500 + #define IP0SR7_11_8 FM(AVB0_AVTP_MATCH) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 501 + #define IP0SR7_15_12 FM(AVB0_TD3) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 502 + #define IP0SR7_19_16 FM(AVB0_LINK) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 503 503 #define IP0SR7_23_20 FM(AVB0_PHY_INT) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 504 - #define IP0SR7_27_24 FM(AVB0_TD2) FM(AVB0_MII_TD2) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 505 - #define IP0SR7_31_28 FM(AVB0_TD1) FM(AVB0_MII_TD1) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 504 + #define IP0SR7_27_24 FM(AVB0_TD2) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 505 + #define IP0SR7_31_28 FM(AVB0_TD1) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 506 506 507 507 /* IP1SR7 */ /* 0 */ /* 1 */ /* 2 */ /* 3 4 5 6 7 8 9 A B C D E F */ 508 - #define IP1SR7_3_0 FM(AVB0_RD3) FM(AVB0_MII_RD3) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 508 + #define IP1SR7_3_0 FM(AVB0_RD3) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 509 509 #define IP1SR7_7_4 FM(AVB0_TXCREFCLK) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 510 510 #define IP1SR7_11_8 FM(AVB0_MAGIC) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 511 - #define IP1SR7_15_12 FM(AVB0_TD0) FM(AVB0_MII_TD0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 512 - #define IP1SR7_19_16 FM(AVB0_RD2) FM(AVB0_MII_RD2) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 511 + #define IP1SR7_15_12 FM(AVB0_TD0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 512 + #define IP1SR7_19_16 FM(AVB0_RD2) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 513 513 #define IP1SR7_23_20 FM(AVB0_MDC) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 514 514 #define IP1SR7_27_24 FM(AVB0_MDIO) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 515 - #define IP1SR7_31_28 FM(AVB0_TXC) FM(AVB0_MII_TXC) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 515 + #define IP1SR7_31_28 FM(AVB0_TXC) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 516 516 517 517 /* IP2SR7 */ /* 0 */ /* 1 */ /* 2 */ /* 3 4 5 6 7 8 9 A B C D E F */ 518 - #define IP2SR7_3_0 FM(AVB0_TX_CTL) FM(AVB0_MII_TX_EN) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 519 - #define IP2SR7_7_4 FM(AVB0_RD1) FM(AVB0_MII_RD1) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 520 - #define IP2SR7_11_8 FM(AVB0_RD0) FM(AVB0_MII_RD0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 521 - #define IP2SR7_15_12 FM(AVB0_RXC) FM(AVB0_MII_RXC) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 522 - #define IP2SR7_19_16 FM(AVB0_RX_CTL) FM(AVB0_MII_RX_DV) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 518 + #define IP2SR7_3_0 FM(AVB0_TX_CTL) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 519 + #define IP2SR7_7_4 FM(AVB0_RD1) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 520 + #define IP2SR7_11_8 FM(AVB0_RD0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 521 + #define IP2SR7_15_12 FM(AVB0_RXC) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 522 + #define IP2SR7_19_16 FM(AVB0_RX_CTL) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 523 523 524 524 /* SR8 */ 525 525 /* IP0SR8 */ /* 0 */ /* 1 */ /* 2 */ /* 3 4 5 6 7 8 9 A B C D E F */ ··· 925 925 PINMUX_IPSR_GPSR(IP1SR2_11_8, FXR_TXENB_N_B), 926 926 927 927 PINMUX_IPSR_GPSR(IP1SR2_15_12, CANFD0_RX), 928 - PINMUX_IPSR_GPSR(IP1SR2_15_12, STPWT_EXTFXR), 929 928 930 929 PINMUX_IPSR_GPSR(IP1SR2_19_16, CANFD2_TX), 931 930 PINMUX_IPSR_GPSR(IP1SR2_19_16, TPU0TO2_A), ··· 1075 1076 PINMUX_IPSR_GPSR(IP0SR6_15_12, AVB1_PHY_INT), 1076 1077 1077 1078 PINMUX_IPSR_GPSR(IP0SR6_19_16, AVB1_LINK), 1078 - PINMUX_IPSR_GPSR(IP0SR6_19_16, AVB1_MII_TX_ER), 1079 1079 1080 1080 PINMUX_IPSR_GPSR(IP0SR6_23_20, AVB1_AVTP_MATCH), 1081 - PINMUX_IPSR_GPSR(IP0SR6_23_20, AVB1_MII_RX_ER), 1082 1081 1083 1082 PINMUX_IPSR_GPSR(IP0SR6_27_24, AVB1_TXC), 1084 - PINMUX_IPSR_GPSR(IP0SR6_27_24, AVB1_MII_TXC), 1085 1083 1086 1084 PINMUX_IPSR_GPSR(IP0SR6_31_28, AVB1_TX_CTL), 1087 - PINMUX_IPSR_GPSR(IP0SR6_31_28, AVB1_MII_TX_EN), 1088 1085 1089 1086 /* IP1SR6 */ 1090 1087 PINMUX_IPSR_GPSR(IP1SR6_3_0, AVB1_RXC), 1091 - PINMUX_IPSR_GPSR(IP1SR6_3_0, AVB1_MII_RXC), 1092 1088 1093 1089 PINMUX_IPSR_GPSR(IP1SR6_7_4, AVB1_RX_CTL), 1094 - PINMUX_IPSR_GPSR(IP1SR6_7_4, AVB1_MII_RX_DV), 1095 1090 1096 1091 PINMUX_IPSR_GPSR(IP1SR6_11_8, AVB1_AVTP_PPS), 1097 - PINMUX_IPSR_GPSR(IP1SR6_11_8, AVB1_MII_COL), 1098 1092 1099 1093 PINMUX_IPSR_GPSR(IP1SR6_15_12, AVB1_AVTP_CAPTURE), 1100 - PINMUX_IPSR_GPSR(IP1SR6_15_12, AVB1_MII_CRS), 1101 1094 1102 1095 PINMUX_IPSR_GPSR(IP1SR6_19_16, AVB1_TD1), 1103 - PINMUX_IPSR_GPSR(IP1SR6_19_16, AVB1_MII_TD1), 1104 1096 1105 1097 PINMUX_IPSR_GPSR(IP1SR6_23_20, AVB1_TD0), 1106 - PINMUX_IPSR_GPSR(IP1SR6_23_20, AVB1_MII_TD0), 1107 1098 1108 1099 PINMUX_IPSR_GPSR(IP1SR6_27_24, AVB1_RD1), 1109 - PINMUX_IPSR_GPSR(IP1SR6_27_24, AVB1_MII_RD1), 1110 1100 1111 1101 PINMUX_IPSR_GPSR(IP1SR6_31_28, AVB1_RD0), 1112 - PINMUX_IPSR_GPSR(IP1SR6_31_28, AVB1_MII_RD0), 1113 1102 1114 1103 /* IP2SR6 */ 1115 1104 PINMUX_IPSR_GPSR(IP2SR6_3_0, AVB1_TD2), 1116 - PINMUX_IPSR_GPSR(IP2SR6_3_0, AVB1_MII_TD2), 1117 1105 1118 1106 PINMUX_IPSR_GPSR(IP2SR6_7_4, AVB1_RD2), 1119 - PINMUX_IPSR_GPSR(IP2SR6_7_4, AVB1_MII_RD2), 1120 1107 1121 1108 PINMUX_IPSR_GPSR(IP2SR6_11_8, AVB1_TD3), 1122 - PINMUX_IPSR_GPSR(IP2SR6_11_8, AVB1_MII_TD3), 1123 1109 1124 1110 PINMUX_IPSR_GPSR(IP2SR6_15_12, AVB1_RD3), 1125 - PINMUX_IPSR_GPSR(IP2SR6_15_12, AVB1_MII_RD3), 1126 1111 1127 1112 PINMUX_IPSR_GPSR(IP2SR6_19_16, AVB1_TXCREFCLK), 1128 1113 1129 1114 /* IP0SR7 */ 1130 1115 PINMUX_IPSR_GPSR(IP0SR7_3_0, AVB0_AVTP_PPS), 1131 - PINMUX_IPSR_GPSR(IP0SR7_3_0, AVB0_MII_COL), 1132 1116 1133 1117 PINMUX_IPSR_GPSR(IP0SR7_7_4, AVB0_AVTP_CAPTURE), 1134 - PINMUX_IPSR_GPSR(IP0SR7_7_4, AVB0_MII_CRS), 1135 1118 1136 1119 PINMUX_IPSR_GPSR(IP0SR7_11_8, AVB0_AVTP_MATCH), 1137 - PINMUX_IPSR_GPSR(IP0SR7_11_8, AVB0_MII_RX_ER), 1138 - PINMUX_IPSR_GPSR(IP0SR7_11_8, CC5_OSCOUT), 1139 1120 1140 1121 PINMUX_IPSR_GPSR(IP0SR7_15_12, AVB0_TD3), 1141 - PINMUX_IPSR_GPSR(IP0SR7_15_12, AVB0_MII_TD3), 1142 1122 1143 1123 PINMUX_IPSR_GPSR(IP0SR7_19_16, AVB0_LINK), 1144 - PINMUX_IPSR_GPSR(IP0SR7_19_16, AVB0_MII_TX_ER), 1145 1124 1146 1125 PINMUX_IPSR_GPSR(IP0SR7_23_20, AVB0_PHY_INT), 1147 1126 1148 1127 PINMUX_IPSR_GPSR(IP0SR7_27_24, AVB0_TD2), 1149 - PINMUX_IPSR_GPSR(IP0SR7_27_24, AVB0_MII_TD2), 1150 1128 1151 1129 PINMUX_IPSR_GPSR(IP0SR7_31_28, AVB0_TD1), 1152 - PINMUX_IPSR_GPSR(IP0SR7_31_28, AVB0_MII_TD1), 1153 1130 1154 1131 /* IP1SR7 */ 1155 1132 PINMUX_IPSR_GPSR(IP1SR7_3_0, AVB0_RD3), 1156 - PINMUX_IPSR_GPSR(IP1SR7_3_0, AVB0_MII_RD3), 1157 1133 1158 1134 PINMUX_IPSR_GPSR(IP1SR7_7_4, AVB0_TXCREFCLK), 1159 1135 1160 1136 PINMUX_IPSR_GPSR(IP1SR7_11_8, AVB0_MAGIC), 1161 1137 1162 1138 PINMUX_IPSR_GPSR(IP1SR7_15_12, AVB0_TD0), 1163 - PINMUX_IPSR_GPSR(IP1SR7_15_12, AVB0_MII_TD0), 1164 1139 1165 1140 PINMUX_IPSR_GPSR(IP1SR7_19_16, AVB0_RD2), 1166 - PINMUX_IPSR_GPSR(IP1SR7_19_16, AVB0_MII_RD2), 1167 1141 1168 1142 PINMUX_IPSR_GPSR(IP1SR7_23_20, AVB0_MDC), 1169 1143 1170 1144 PINMUX_IPSR_GPSR(IP1SR7_27_24, AVB0_MDIO), 1171 1145 1172 1146 PINMUX_IPSR_GPSR(IP1SR7_31_28, AVB0_TXC), 1173 - PINMUX_IPSR_GPSR(IP1SR7_31_28, AVB0_MII_TXC), 1174 1147 1175 1148 /* IP2SR7 */ 1176 1149 PINMUX_IPSR_GPSR(IP2SR7_3_0, AVB0_TX_CTL), 1177 - PINMUX_IPSR_GPSR(IP2SR7_3_0, AVB0_MII_TX_EN), 1178 1150 1179 1151 PINMUX_IPSR_GPSR(IP2SR7_7_4, AVB0_RD1), 1180 - PINMUX_IPSR_GPSR(IP2SR7_7_4, AVB0_MII_RD1), 1181 1152 1182 1153 PINMUX_IPSR_GPSR(IP2SR7_11_8, AVB0_RD0), 1183 - PINMUX_IPSR_GPSR(IP2SR7_11_8, AVB0_MII_RD0), 1184 1154 1185 1155 PINMUX_IPSR_GPSR(IP2SR7_15_12, AVB0_RXC), 1186 - PINMUX_IPSR_GPSR(IP2SR7_15_12, AVB0_MII_RXC), 1187 1156 1188 1157 PINMUX_IPSR_GPSR(IP2SR7_19_16, AVB0_RX_CTL), 1189 - PINMUX_IPSR_GPSR(IP2SR7_19_16, AVB0_MII_RX_DV), 1190 1158 1191 1159 /* IP0SR8 */ 1192 1160 PINMUX_IPSR_MSEL(IP0SR8_3_0, SCL0, SEL_SCL0_0),
+2 -5
drivers/pinctrl/renesas/pfc-r8a779h0.c
··· 259 259 #define GPSR7_1 F_(AVB0_AVTP_CAPTURE, IP0SR7_7_4) 260 260 #define GPSR7_0 F_(AVB0_AVTP_PPS, IP0SR7_3_0) 261 261 262 - 263 262 /* SR0 */ 264 263 /* IP0SR0 */ /* 0 */ /* 1 */ /* 2 */ /* 3 4 5 6 7 8 9 A B C D E F */ 265 264 #define IP0SR0_3_0 F_(0, 0) FM(ERROROUTC_N_B) FM(TCLK2_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) F_(0, 0) F_(0, 0) ··· 339 340 #define IP1SR2_3_0 FM(TPU0TO0_A) F_(0, 0) F_(0, 0) FM(TCLK1_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) F_(0, 0) 340 341 #define IP1SR2_7_4 FM(CAN_CLK) FM(FXR_TXENA_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) F_(0, 0) F_(0, 0) F_(0, 0) 341 342 #define IP1SR2_11_8 FM(CANFD0_TX) FM(FXR_TXENB_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) F_(0, 0) F_(0, 0) F_(0, 0) 342 - #define IP1SR2_15_12 FM(CANFD0_RX) FM(STPWT_EXTFXR) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 343 + #define IP1SR2_15_12 FM(CANFD0_RX) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 343 344 #define IP1SR2_19_16 FM(CANFD2_TX) FM(TPU0TO2_A) F_(0, 0) FM(TCLK3_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) F_(0, 0) 344 345 #define IP1SR2_23_20 FM(CANFD2_RX) FM(TPU0TO3_A) FM(PWM1_B) FM(TCLK4_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) F_(0, 0) 345 346 #define IP1SR2_27_24 FM(CANFD3_TX) F_(0, 0) FM(PWM2_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) F_(0, 0) F_(0, 0) ··· 478 479 /* IP0SR7 */ /* 0 */ /* 1 */ /* 2 */ /* 3 4 5 6 7 8 9 A B C D E F */ 479 480 #define IP0SR7_3_0 FM(AVB0_AVTP_PPS) FM(AVB0_MII_COL) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 480 481 #define IP0SR7_7_4 FM(AVB0_AVTP_CAPTURE) FM(AVB0_MII_CRS) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 481 - #define IP0SR7_11_8 FM(AVB0_AVTP_MATCH) FM(AVB0_MII_RX_ER) 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) 482 + #define IP0SR7_11_8 FM(AVB0_AVTP_MATCH) FM(AVB0_MII_RX_ER) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 482 483 #define IP0SR7_15_12 FM(AVB0_TD3) FM(AVB0_MII_TD3) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 483 484 #define IP0SR7_19_16 FM(AVB0_LINK) FM(AVB0_MII_TX_ER) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 484 485 #define IP0SR7_23_20 FM(AVB0_PHY_INT) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) ··· 865 866 PINMUX_IPSR_GPSR(IP1SR2_11_8, FXR_TXENB_N_B), 866 867 867 868 PINMUX_IPSR_GPSR(IP1SR2_15_12, CANFD0_RX), 868 - PINMUX_IPSR_GPSR(IP1SR2_15_12, STPWT_EXTFXR), 869 869 870 870 PINMUX_IPSR_GPSR(IP1SR2_19_16, CANFD2_TX), 871 871 PINMUX_IPSR_GPSR(IP1SR2_19_16, TPU0TO2_A), ··· 1122 1124 1123 1125 PINMUX_IPSR_GPSR(IP0SR7_11_8, AVB0_AVTP_MATCH), 1124 1126 PINMUX_IPSR_GPSR(IP0SR7_11_8, AVB0_MII_RX_ER), 1125 - PINMUX_IPSR_GPSR(IP0SR7_11_8, CC5_OSCOUT), 1126 1127 1127 1128 PINMUX_IPSR_GPSR(IP0SR7_15_12, AVB0_TD3), 1128 1129 PINMUX_IPSR_GPSR(IP0SR7_15_12, AVB0_MII_TD3),
-1
drivers/pinctrl/renesas/pfc-sh7723.c
··· 182 182 PTZ7_FN, PTZ6_FN, PTZ5_FN, PTZ4_FN, 183 183 PTZ3_FN, PTZ2_FN, PTZ1_FN, PTZ0_FN, 184 184 185 - 186 185 PSA15_PSA14_FN1, PSA15_PSA14_FN2, 187 186 PSA13_PSA12_FN1, PSA13_PSA12_FN2, 188 187 PSA11_PSA10_FN1, PSA11_PSA10_FN2,
-1
drivers/pinctrl/renesas/pfc-sh7724.c
··· 210 210 PTZ7_FN, PTZ6_FN, PTZ5_FN, PTZ4_FN, 211 211 PTZ3_FN, PTZ2_FN, PTZ1_FN, PTZ0_FN, 212 212 213 - 214 213 PSA15_0, PSA15_1, 215 214 PSA14_0, PSA14_1, 216 215 PSA13_0, PSA13_1,
-1
drivers/pinctrl/renesas/pfc-sh7734.c
··· 664 664 PINMUX_IPSR_MSEL(IP0_31_30, LCD_DATA15_A, SEL_LCDC_0), 665 665 PINMUX_IPSR_MSEL(IP0_31_30, TIOC3D_C, SEL_MTU2_CH3_1), 666 666 667 - 668 667 /* IPSR1 */ 669 668 PINMUX_IPSR_GPSR(IP1_1_0, A16), 670 669 PINMUX_IPSR_GPSR(IP1_1_0, ST0_PWM),
+3 -4
drivers/pinctrl/renesas/pinctrl-rza1.c
··· 526 526 const struct rza1_swio_pin *swio_pin; 527 527 unsigned int i; 528 528 529 - 530 529 for (i = 0; i < table->npins; ++i) { 531 530 swio_pin = &table->pins[i]; 532 531 if (swio_pin->port == port && swio_pin->pin == pin && ··· 668 669 * @mux_conf: pin multiplexing descriptor 669 670 */ 670 671 static int rza1_pin_mux_single(struct rza1_pinctrl *rza1_pctl, 671 - struct rza1_mux_conf *mux_conf) 672 + const struct rza1_mux_conf *mux_conf) 672 673 { 673 674 struct rza1_port *port = &rza1_pctl->ports[mux_conf->port]; 674 675 unsigned int pin = mux_conf->pin; ··· 1118 1119 unsigned int group) 1119 1120 { 1120 1121 struct rza1_pinctrl *rza1_pctl = pinctrl_dev_get_drvdata(pctldev); 1121 - struct rza1_mux_conf *mux_confs; 1122 + const struct rza1_mux_conf *mux_confs; 1122 1123 const struct function_desc *func; 1123 1124 struct group_desc *grp; 1124 1125 int i; ··· 1131 1132 if (!func) 1132 1133 return -EINVAL; 1133 1134 1134 - mux_confs = (struct rza1_mux_conf *)func->data; 1135 + mux_confs = (const struct rza1_mux_conf *)func->data; 1135 1136 for (i = 0; i < grp->grp.npins; ++i) { 1136 1137 int ret; 1137 1138
+104 -67
drivers/pinctrl/renesas/pinctrl-rzg2l.c
··· 359 359 spinlock_t bitmap_lock; /* protect tint_slot bitmap */ 360 360 unsigned int hwirq[RZG2L_TINT_MAX_INTERRUPT]; 361 361 362 - spinlock_t lock; /* lock read/write registers */ 362 + raw_spinlock_t lock; /* lock read/write registers */ 363 363 struct mutex mutex; /* serialize adding groups and functions */ 364 364 365 365 struct rzg2l_pinctrl_pin_settings *settings; ··· 541 541 u8 pin, u8 off, u8 func) 542 542 { 543 543 unsigned long flags; 544 - u32 reg; 544 + u32 reg, pfc; 545 545 546 - spin_lock_irqsave(&pctrl->lock, flags); 546 + /* Switching to GPIO is not required if reset value is same as func */ 547 + raw_spin_lock_irqsave(&pctrl->lock, flags); 548 + reg = readb(pctrl->base + PMC(off)); 549 + pfc = readl(pctrl->base + PFC(off)); 550 + if ((reg & BIT(pin)) && (((pfc >> (pin * 4)) & PFC_MASK) == func)) { 551 + raw_spin_unlock_irqrestore(&pctrl->lock, flags); 552 + return; 553 + } 547 554 548 555 /* Set pin to 'Non-use (Hi-Z input protection)' */ 549 556 reg = readw(pctrl->base + PM(off)); ··· 564 557 writeb(reg & ~BIT(pin), pctrl->base + PMC(off)); 565 558 566 559 /* Select Pin function mode with PFC register */ 567 - reg = readl(pctrl->base + PFC(off)); 568 - reg &= ~(PFC_MASK << (pin * 4)); 569 - writel(reg | (func << (pin * 4)), pctrl->base + PFC(off)); 560 + pfc &= ~(PFC_MASK << (pin * 4)); 561 + writel(pfc | (func << (pin * 4)), pctrl->base + PFC(off)); 570 562 571 563 /* Switch to Peripheral pin function with PMC register */ 572 564 reg = readb(pctrl->base + PMC(off)); ··· 573 567 574 568 pctrl->data->pwpr_pfc_lock_unlock(pctrl, true); 575 569 576 - spin_unlock_irqrestore(&pctrl->lock, flags); 577 - }; 570 + raw_spin_unlock_irqrestore(&pctrl->lock, flags); 571 + } 578 572 579 573 static int rzg2l_pinctrl_set_mux(struct pinctrl_dev *pctldev, 580 574 unsigned int func_selector, ··· 614 608 } 615 609 616 610 return 0; 617 - }; 611 + } 618 612 619 613 static int rzg2l_map_add_config(struct pinctrl_map *map, 620 614 const char *group_or_pin, ··· 888 882 addr += 4; 889 883 } 890 884 891 - spin_lock_irqsave(&pctrl->lock, flags); 885 + raw_spin_lock_irqsave(&pctrl->lock, flags); 892 886 reg = readl(addr) & ~(mask << (bit * 8)); 893 887 writel(reg | (val << (bit * 8)), addr); 894 - spin_unlock_irqrestore(&pctrl->lock, flags); 888 + raw_spin_unlock_irqrestore(&pctrl->lock, flags); 895 889 } 896 890 897 891 static int rzg2l_caps_to_pwr_reg(const struct rzg2l_register_offsets *regs, u32 caps) ··· 1112 1106 return !(readb(pctrl->base + pctrl->data->hwcfg->regs.oen) & BIT(bit)); 1113 1107 } 1114 1108 1115 - static int rzg2l_write_oen(struct rzg2l_pinctrl *pctrl, unsigned int _pin, u8 oen) 1109 + /** 1110 + * rzg2l_oen_write_with_pwpr - Write to OEN register with PWPR protection 1111 + * @pctrl: pinctrl driver data 1112 + * @val: value to write to OEN register 1113 + * 1114 + * Writes to the OEN register, handling PWPR write protection if required 1115 + * by the hardware configuration. Must be called with pctrl->lock held. 1116 + */ 1117 + static void rzg2l_oen_write_with_pwpr(struct rzg2l_pinctrl *pctrl, u8 val) 1116 1118 { 1117 1119 const struct rzg2l_register_offsets *regs = &pctrl->data->hwcfg->regs; 1118 1120 u16 oen_offset = pctrl->data->hwcfg->regs.oen; 1121 + u8 pwpr; 1122 + 1123 + if (pctrl->data->hwcfg->oen_pwpr_lock) { 1124 + pwpr = readb(pctrl->base + regs->pwpr); 1125 + writeb(pwpr | PWPR_REGWE_B, pctrl->base + regs->pwpr); 1126 + } 1127 + 1128 + writeb(val, pctrl->base + oen_offset); 1129 + 1130 + if (pctrl->data->hwcfg->oen_pwpr_lock) 1131 + writeb(pwpr & ~PWPR_REGWE_B, pctrl->base + regs->pwpr); 1132 + } 1133 + 1134 + static int rzg2l_write_oen(struct rzg2l_pinctrl *pctrl, unsigned int _pin, u8 oen) 1135 + { 1136 + u16 oen_offset = pctrl->data->hwcfg->regs.oen; 1119 1137 unsigned long flags; 1120 - u8 val, pwpr; 1121 1138 int bit; 1139 + u8 val; 1122 1140 1123 1141 if (!pctrl->data->pin_to_oen_bit) 1124 1142 return -EOPNOTSUPP; ··· 1151 1121 if (bit < 0) 1152 1122 return -EINVAL; 1153 1123 1154 - spin_lock_irqsave(&pctrl->lock, flags); 1124 + raw_spin_lock_irqsave(&pctrl->lock, flags); 1155 1125 val = readb(pctrl->base + oen_offset); 1156 1126 if (oen) 1157 1127 val &= ~BIT(bit); 1158 1128 else 1159 1129 val |= BIT(bit); 1160 - if (pctrl->data->hwcfg->oen_pwpr_lock) { 1161 - pwpr = readb(pctrl->base + regs->pwpr); 1162 - writeb(pwpr | PWPR_REGWE_B, pctrl->base + regs->pwpr); 1163 - } 1164 - writeb(val, pctrl->base + oen_offset); 1165 - if (pctrl->data->hwcfg->oen_pwpr_lock) 1166 - writeb(pwpr & ~PWPR_REGWE_B, pctrl->base + regs->pwpr); 1167 - spin_unlock_irqrestore(&pctrl->lock, flags); 1130 + 1131 + rzg2l_oen_write_with_pwpr(pctrl, val); 1132 + raw_spin_unlock_irqrestore(&pctrl->lock, flags); 1168 1133 1169 1134 return 0; 1170 1135 } ··· 1438 1413 *config = pinconf_to_config_packed(param, arg); 1439 1414 1440 1415 return 0; 1441 - }; 1416 + } 1442 1417 1443 1418 static int rzg2l_pinctrl_pinconf_set(struct pinctrl_dev *pctldev, 1444 1419 unsigned int _pin, ··· 1638 1613 } 1639 1614 1640 1615 return 0; 1641 - }; 1616 + } 1642 1617 1643 1618 static int rzg2l_pinctrl_pinconf_group_get(struct pinctrl_dev *pctldev, 1644 1619 unsigned int group, ··· 1665 1640 } 1666 1641 1667 1642 return 0; 1668 - }; 1643 + } 1669 1644 1670 1645 static const struct pinctrl_ops rzg2l_pinctrl_pctlops = { 1671 1646 .get_groups_count = pinctrl_generic_get_group_count, ··· 1712 1687 if (ret) 1713 1688 return ret; 1714 1689 1715 - spin_lock_irqsave(&pctrl->lock, flags); 1690 + raw_spin_lock_irqsave(&pctrl->lock, flags); 1716 1691 1717 1692 /* Select GPIO mode in PMC Register */ 1718 1693 reg8 = readb(pctrl->base + PMC(off)); 1719 1694 reg8 &= ~BIT(bit); 1720 1695 pctrl->data->pmc_writeb(pctrl, reg8, PMC(off)); 1721 1696 1722 - spin_unlock_irqrestore(&pctrl->lock, flags); 1697 + raw_spin_unlock_irqrestore(&pctrl->lock, flags); 1723 1698 1724 1699 return 0; 1725 1700 } ··· 1734 1709 unsigned long flags; 1735 1710 u16 reg16; 1736 1711 1737 - spin_lock_irqsave(&pctrl->lock, flags); 1712 + raw_spin_lock_irqsave(&pctrl->lock, flags); 1738 1713 1739 1714 reg16 = readw(pctrl->base + PM(off)); 1740 1715 reg16 &= ~(PM_MASK << (bit * 2)); ··· 1742 1717 reg16 |= (output ? PM_OUTPUT : PM_INPUT) << (bit * 2); 1743 1718 writew(reg16, pctrl->base + PM(off)); 1744 1719 1745 - spin_unlock_irqrestore(&pctrl->lock, flags); 1720 + raw_spin_unlock_irqrestore(&pctrl->lock, flags); 1746 1721 } 1747 1722 1748 1723 static int rzg2l_gpio_get_direction(struct gpio_chip *chip, unsigned int offset) ··· 1786 1761 unsigned long flags; 1787 1762 u8 reg8; 1788 1763 1789 - spin_lock_irqsave(&pctrl->lock, flags); 1764 + raw_spin_lock_irqsave(&pctrl->lock, flags); 1790 1765 1791 1766 reg8 = readb(pctrl->base + P(off)); 1792 1767 ··· 1795 1770 else 1796 1771 writeb(reg8 & ~BIT(bit), pctrl->base + P(off)); 1797 1772 1798 - spin_unlock_irqrestore(&pctrl->lock, flags); 1773 + raw_spin_unlock_irqrestore(&pctrl->lock, flags); 1799 1774 1800 1775 return 0; 1801 1776 } ··· 2454 2429 return gpioint; 2455 2430 } 2456 2431 2457 - static void rzg2l_gpio_irq_endisable(struct rzg2l_pinctrl *pctrl, 2458 - unsigned int hwirq, bool enable) 2432 + static void __rzg2l_gpio_irq_endisable(struct rzg2l_pinctrl *pctrl, 2433 + unsigned int hwirq, bool enable) 2459 2434 { 2460 2435 const struct pinctrl_pin_desc *pin_desc = &pctrl->desc.pins[hwirq]; 2461 2436 u64 *pin_data = pin_desc->drv_data; 2462 2437 u32 off = RZG2L_PIN_CFG_TO_PORT_OFFSET(*pin_data); 2463 2438 u8 bit = RZG2L_PIN_ID_TO_PIN(hwirq); 2464 - unsigned long flags; 2465 2439 void __iomem *addr; 2466 2440 2467 2441 addr = pctrl->base + ISEL(off); ··· 2469 2445 addr += 4; 2470 2446 } 2471 2447 2472 - spin_lock_irqsave(&pctrl->lock, flags); 2473 2448 if (enable) 2474 2449 writel(readl(addr) | BIT(bit * 8), addr); 2475 2450 else 2476 2451 writel(readl(addr) & ~BIT(bit * 8), addr); 2477 - spin_unlock_irqrestore(&pctrl->lock, flags); 2452 + } 2453 + 2454 + static void rzg2l_gpio_irq_endisable(struct rzg2l_pinctrl *pctrl, 2455 + unsigned int hwirq, bool enable) 2456 + { 2457 + unsigned long flags; 2458 + 2459 + raw_spin_lock_irqsave(&pctrl->lock, flags); 2460 + __rzg2l_gpio_irq_endisable(pctrl, hwirq, enable); 2461 + raw_spin_unlock_irqrestore(&pctrl->lock, flags); 2478 2462 } 2479 2463 2480 2464 static void rzg2l_gpio_irq_disable(struct irq_data *d) ··· 2494 2462 gpiochip_disable_irq(gc, hwirq); 2495 2463 } 2496 2464 2497 - static void rzg2l_gpio_irq_enable(struct irq_data *d) 2465 + static void __rzg2l_gpio_irq_enable(struct irq_data *d, bool lock) 2498 2466 { 2499 2467 struct gpio_chip *gc = irq_data_get_irq_chip_data(d); 2468 + struct rzg2l_pinctrl *pctrl = container_of(gc, struct rzg2l_pinctrl, gpio_chip); 2500 2469 unsigned int hwirq = irqd_to_hwirq(d); 2501 2470 2502 2471 gpiochip_enable_irq(gc, hwirq); 2472 + if (lock) 2473 + rzg2l_gpio_irq_endisable(pctrl, hwirq, true); 2474 + else 2475 + __rzg2l_gpio_irq_endisable(pctrl, hwirq, true); 2503 2476 irq_chip_enable_parent(d); 2504 2477 } 2505 2478 2506 - static int rzg2l_gpio_irq_set_type(struct irq_data *d, unsigned int type) 2479 + static void rzg2l_gpio_irq_enable(struct irq_data *d) 2507 2480 { 2508 - return irq_chip_set_type_parent(d, type); 2509 - } 2510 - 2511 - static void rzg2l_gpio_irqc_eoi(struct irq_data *d) 2512 - { 2513 - irq_chip_eoi_parent(d); 2481 + __rzg2l_gpio_irq_enable(d, true); 2514 2482 } 2515 2483 2516 2484 static void rzg2l_gpio_irq_print_chip(struct irq_data *data, struct seq_file *p) ··· 2548 2516 .irq_enable = rzg2l_gpio_irq_enable, 2549 2517 .irq_mask = irq_chip_mask_parent, 2550 2518 .irq_unmask = irq_chip_unmask_parent, 2551 - .irq_set_type = rzg2l_gpio_irq_set_type, 2552 - .irq_eoi = rzg2l_gpio_irqc_eoi, 2519 + .irq_set_type = irq_chip_set_type_parent, 2520 + .irq_eoi = irq_chip_eoi_parent, 2553 2521 .irq_print_chip = rzg2l_gpio_irq_print_chip, 2554 2522 .irq_set_affinity = irq_chip_set_affinity_parent, 2555 2523 .irq_set_wake = rzg2l_gpio_irq_set_wake, ··· 2648 2616 * This has to be atomically executed to protect against a concurrent 2649 2617 * interrupt. 2650 2618 */ 2651 - spin_lock_irqsave(&pctrl->lock, flags); 2652 - ret = rzg2l_gpio_irq_set_type(data, irqd_get_trigger_type(data)); 2619 + raw_spin_lock_irqsave(&pctrl->lock, flags); 2620 + ret = irq_chip_set_type_parent(data, irqd_get_trigger_type(data)); 2653 2621 if (!ret && !irqd_irq_disabled(data)) 2654 - rzg2l_gpio_irq_enable(data); 2655 - spin_unlock_irqrestore(&pctrl->lock, flags); 2622 + __rzg2l_gpio_irq_enable(data, false); 2623 + raw_spin_unlock_irqrestore(&pctrl->lock, flags); 2656 2624 2657 2625 if (ret) 2658 2626 dev_crit(pctrl->dev, "Failed to set IRQ type for virq=%u\n", virq); ··· 2982 2950 "failed to enable GPIO clk\n"); 2983 2951 } 2984 2952 2985 - spin_lock_init(&pctrl->lock); 2953 + raw_spin_lock_init(&pctrl->lock); 2986 2954 spin_lock_init(&pctrl->bitmap_lock); 2987 2955 mutex_init(&pctrl->mutex); 2988 2956 atomic_set(&pctrl->wakeup_path, 0); ··· 3025 2993 * Now cache the registers or set them in the order suggested by 3026 2994 * HW manual (section "Operation for GPIO Function"). 3027 2995 */ 3028 - RZG2L_PCTRL_REG_ACCESS8(suspend, pctrl->base + PMC(off), cache->pmc[port]); 2996 + if (suspend) 2997 + RZG2L_PCTRL_REG_ACCESS8(suspend, pctrl->base + PMC(off), cache->pmc[port]); 2998 + else 2999 + pctrl->data->pmc_writeb(pctrl, cache->pmc[port], PMC(off)); 3000 + 3029 3001 if (has_iolh) { 3030 3002 RZG2L_PCTRL_REG_ACCESS32(suspend, pctrl->base + IOLH(off), 3031 3003 cache->iolh[0][port]); ··· 3129 3093 u32 nports = pctrl->data->n_port_pins / RZG2L_PINS_PER_PORT; 3130 3094 unsigned long flags; 3131 3095 3132 - spin_lock_irqsave(&pctrl->lock, flags); 3096 + raw_spin_lock_irqsave(&pctrl->lock, flags); 3133 3097 pctrl->data->pwpr_pfc_lock_unlock(pctrl, false); 3134 3098 3135 3099 /* Restore port registers. */ ··· 3149 3113 pm = readw(pctrl->base + PM(off)); 3150 3114 for_each_set_bit(pin, &pinmap, max_pin) { 3151 3115 struct rzg2l_pinctrl_reg_cache *cache = pctrl->cache; 3116 + u32 pfc_val, pfc_mask; 3152 3117 3153 3118 /* Nothing to do if PFC was not configured before. */ 3154 3119 if (!(cache->pmc[port] & BIT(pin))) 3120 + continue; 3121 + 3122 + pfc_val = readl(pctrl->base + PFC(off)); 3123 + pfc_mask = PFC_MASK << (pin * 4); 3124 + /* Nothing to do if reset value of the pin is same as cached value */ 3125 + if ((cache->pfc[port] & pfc_mask) == (pfc_val & pfc_mask)) 3155 3126 continue; 3156 3127 3157 3128 /* Set pin to 'Non-use (Hi-Z input protection)' */ ··· 3170 3127 writeb(pmc, pctrl->base + PMC(off)); 3171 3128 3172 3129 /* Select Pin function mode. */ 3173 - pfc &= ~(PFC_MASK << (pin * 4)); 3174 - pfc |= (cache->pfc[port] & (PFC_MASK << (pin * 4))); 3130 + pfc &= ~pfc_mask; 3131 + pfc |= (cache->pfc[port] & pfc_mask); 3175 3132 writel(pfc, pctrl->base + PFC(off)); 3176 3133 3177 3134 /* Switch to Peripheral pin function. */ ··· 3181 3138 } 3182 3139 3183 3140 pctrl->data->pwpr_pfc_lock_unlock(pctrl, true); 3184 - spin_unlock_irqrestore(&pctrl->lock, flags); 3141 + raw_spin_unlock_irqrestore(&pctrl->lock, flags); 3185 3142 } 3186 3143 3187 3144 static int rzg2l_pinctrl_suspend_noirq(struct device *dev) ··· 3219 3176 const struct rzg2l_register_offsets *regs = &hwcfg->regs; 3220 3177 struct rzg2l_pinctrl_reg_cache *cache = pctrl->cache; 3221 3178 unsigned long flags; 3222 - u8 pwpr; 3223 3179 int ret; 3224 3180 3225 3181 if (!atomic_read(&pctrl->wakeup_path)) { ··· 3228 3186 } 3229 3187 3230 3188 writeb(cache->qspi, pctrl->base + QSPI); 3231 - if (pctrl->data->hwcfg->oen_pwpr_lock) { 3232 - spin_lock_irqsave(&pctrl->lock, flags); 3233 - pwpr = readb(pctrl->base + regs->pwpr); 3234 - writeb(pwpr | PWPR_REGWE_B, pctrl->base + regs->pwpr); 3235 - } 3236 - writeb(cache->oen, pctrl->base + pctrl->data->hwcfg->regs.oen); 3237 - if (pctrl->data->hwcfg->oen_pwpr_lock) { 3238 - writeb(pwpr & ~PWPR_REGWE_B, pctrl->base + regs->pwpr); 3239 - spin_unlock_irqrestore(&pctrl->lock, flags); 3240 - } 3189 + 3190 + raw_spin_lock_irqsave(&pctrl->lock, flags); 3191 + rzg2l_oen_write_with_pwpr(pctrl, cache->oen); 3192 + raw_spin_unlock_irqrestore(&pctrl->lock, flags); 3193 + 3241 3194 for (u8 i = 0; i < 2; i++) { 3242 3195 if (regs->sd_ch) 3243 3196 writeb(cache->sd_ch[i], pctrl->base + SD_CH(regs->sd_ch, i));
+2 -2
drivers/pinctrl/renesas/pinctrl-rzt2h.c
··· 144 144 /* Switch to Peripheral pin function with PMC register */ 145 145 reg16 = rzt2h_pinctrl_readb(pctrl, port, PMC(port)); 146 146 rzt2h_pinctrl_writeb(pctrl, port, reg16 | BIT(pin), PMC(port)); 147 - }; 147 + } 148 148 149 149 static int rzt2h_pinctrl_set_mux(struct pinctrl_dev *pctldev, 150 150 unsigned int func_selector, ··· 182 182 } 183 183 184 184 return 0; 185 - }; 185 + } 186 186 187 187 static int rzt2h_map_add_config(struct pinctrl_map *map, 188 188 const char *group_or_pin,
+5 -5
drivers/pinctrl/renesas/pinctrl-rzv2m.c
··· 155 155 /* Unmask input/output */ 156 156 rzv2m_writel_we(pctrl->base + EN_MSK(port), pin, 0); 157 157 rzv2m_writel_we(pctrl->base + DI_MSK(port), pin, 0); 158 - }; 158 + } 159 159 160 160 static int rzv2m_pinctrl_set_mux(struct pinctrl_dev *pctldev, 161 161 unsigned int func_selector, ··· 186 186 } 187 187 188 188 return 0; 189 - }; 189 + } 190 190 191 191 static int rzv2m_map_add_config(struct pinctrl_map *map, 192 192 const char *group_or_pin, ··· 551 551 *config = pinconf_to_config_packed(param, arg); 552 552 553 553 return 0; 554 - }; 554 + } 555 555 556 556 static int rzv2m_pinctrl_pinconf_set(struct pinctrl_dev *pctldev, 557 557 unsigned int _pin, ··· 689 689 } 690 690 691 691 return 0; 692 - }; 692 + } 693 693 694 694 static int rzv2m_pinctrl_pinconf_group_get(struct pinctrl_dev *pctldev, 695 695 unsigned int group, ··· 716 716 } 717 717 718 718 return 0; 719 - }; 719 + } 720 720 721 721 static const struct pinctrl_ops rzv2m_pinctrl_pctlops = { 722 722 .get_groups_count = pinctrl_generic_get_group_count,
+206
drivers/pinctrl/samsung/pinctrl-exynos-arm64.c
··· 1485 1485 .num_ctrl = ARRAY_SIZE(exynosautov920_pin_ctrl), 1486 1486 }; 1487 1487 1488 + /* pin banks of exynos8890 pin-controller 0 (ALIVE) */ 1489 + static const struct samsung_pin_bank_data exynos8890_pin_banks0[] __initconst = { 1490 + /* Must start with EINTG banks, ordered by EINT group number. */ 1491 + EXYNOS7870_PIN_BANK_EINTW(8, 0x000, "gpa0", 0x00), 1492 + EXYNOS7870_PIN_BANK_EINTW(8, 0x020, "gpa1", 0x04), 1493 + EXYNOS7870_PIN_BANK_EINTW(8, 0x040, "gpa2", 0x08), 1494 + EXYNOS7870_PIN_BANK_EINTW(8, 0x060, "gpa3", 0x0c), 1495 + }; 1496 + 1497 + /* pin banks of exynos8890 pin-controller 1 (AUD) */ 1498 + static const struct samsung_pin_bank_data exynos8890_pin_banks1[] __initconst = { 1499 + /* Must start with EINTG banks, ordered by EINT group number. */ 1500 + EXYNOS8895_PIN_BANK_EINTG(7, 0x000, "gph0", 0x00), 1501 + }; 1502 + 1503 + /* pin banks of exynos8890 pin-controller 2 (CCORE) */ 1504 + static const struct samsung_pin_bank_data exynos8890_pin_banks2[] __initconst = { 1505 + /* Must start with EINTG banks, ordered by EINT group number. */ 1506 + EXYNOS8895_PIN_BANK_EINTG(2, 0x000, "etc0", 0x00), 1507 + }; 1508 + 1509 + /* pin banks of exynos8890 pin-controller 3 (ESE) */ 1510 + static const struct samsung_pin_bank_data exynos8890_pin_banks3[] __initconst = { 1511 + /* Must start with EINTG banks, ordered by EINT group number. */ 1512 + EXYNOS8895_PIN_BANK_EINTG(5, 0x000, "gpf3", 0x00), 1513 + }; 1514 + 1515 + /* pin banks of exynos8890 pin-controller 4 (FP) */ 1516 + static const struct samsung_pin_bank_data exynos8890_pin_banks4[] __initconst = { 1517 + /* Must start with EINTG banks, ordered by EINT group number. */ 1518 + EXYNOS8895_PIN_BANK_EINTG(4, 0x000, "gpf2", 0x00), 1519 + }; 1520 + 1521 + /* pin banks of exynos8890 pin-controller 5 (FSYS0) */ 1522 + static const struct samsung_pin_bank_data exynos8890_pin_banks5[] __initconst = { 1523 + /* Must start with EINTG banks, ordered by EINT group number. */ 1524 + EXYNOS8895_PIN_BANK_EINTG(4, 0x000, "gpi1", 0x00), 1525 + EXYNOS8895_PIN_BANK_EINTG(8, 0x020, "gpi2", 0x04), 1526 + }; 1527 + 1528 + /* pin banks of exynos8890 pin-controller 6 (FSYS1) */ 1529 + static const struct samsung_pin_bank_data exynos8890_pin_banks6[] __initconst = { 1530 + /* Must start with EINTG banks, ordered by EINT group number. */ 1531 + EXYNOS8895_PIN_BANK_EINTG(7, 0x000, "gpj0", 0x00), 1532 + }; 1533 + 1534 + /* pin banks of exynos8890 pin-controller 7 (NFC) */ 1535 + static const struct samsung_pin_bank_data exynos8890_pin_banks7[] __initconst = { 1536 + /* Must start with EINTG banks, ordered by EINT group number. */ 1537 + EXYNOS8895_PIN_BANK_EINTG(3, 0x000, "gpf0", 0x00), 1538 + }; 1539 + 1540 + /* pin banks of exynos8890 pin-controller 8 (PERIC0) */ 1541 + static const struct samsung_pin_bank_data exynos8890_pin_banks8[] __initconst = { 1542 + /* Must start with EINTG banks, ordered by EINT group number. */ 1543 + EXYNOS8895_PIN_BANK_EINTG(6, 0x000, "gpi0", 0x00), 1544 + EXYNOS8895_PIN_BANK_EINTG(8, 0x020, "gpd0", 0x04), 1545 + EXYNOS8895_PIN_BANK_EINTG(6, 0x040, "gpd1", 0x08), 1546 + EXYNOS8895_PIN_BANK_EINTG(4, 0x060, "gpd2", 0x0c), 1547 + EXYNOS8895_PIN_BANK_EINTG(4, 0x080, "gpd3", 0x10), 1548 + EXYNOS8895_PIN_BANK_EINTG(2, 0x0A0, "gpb1", 0x14), 1549 + EXYNOS8895_PIN_BANK_EINTG(2, 0x0C0, "gpb2", 0x18), 1550 + EXYNOS8895_PIN_BANK_EINTG(3, 0x0E0, "gpb0", 0x1c), 1551 + EXYNOS8895_PIN_BANK_EINTG(5, 0x100, "gpc0", 0x20), 1552 + EXYNOS8895_PIN_BANK_EINTG(5, 0x120, "gpc1", 0x24), 1553 + EXYNOS8895_PIN_BANK_EINTG(6, 0x140, "gpc2", 0x28), 1554 + EXYNOS8895_PIN_BANK_EINTG(8, 0x160, "gpc3", 0x2c), 1555 + EXYNOS8895_PIN_BANK_EINTG(4, 0x180, "gpk0", 0x30), 1556 + EXYNOS8895_PIN_BANK_EINTG(7, 0x1A0, "etc1", 0x34), 1557 + }; 1558 + 1559 + /* pin banks of exynos8890 pin-controller 9 (PERIC1) */ 1560 + static const struct samsung_pin_bank_data exynos8890_pin_banks9[] __initconst = { 1561 + /* Must start with EINTG banks, ordered by EINT group number. */ 1562 + EXYNOS8895_PIN_BANK_EINTG(8, 0x000, "gpe0", 0x00), 1563 + EXYNOS8895_PIN_BANK_EINTG(8, 0x020, "gpe5", 0x04), 1564 + EXYNOS8895_PIN_BANK_EINTG(8, 0x040, "gpe6", 0x08), 1565 + EXYNOS8895_PIN_BANK_EINTG(8, 0x060, "gpj1", 0x0c), 1566 + EXYNOS8895_PIN_BANK_EINTG(2, 0x080, "gpj2", 0x10), 1567 + EXYNOS8895_PIN_BANK_EINTG(8, 0x0A0, "gpe2", 0x14), 1568 + EXYNOS8895_PIN_BANK_EINTG(8, 0x0C0, "gpe3", 0x18), 1569 + EXYNOS8895_PIN_BANK_EINTG(8, 0x0E0, "gpe4", 0x1c), 1570 + EXYNOS8895_PIN_BANK_EINTG(8, 0x100, "gpe1", 0x20), 1571 + EXYNOS8895_PIN_BANK_EINTG(4, 0x120, "gpe7", 0x24), 1572 + EXYNOS8895_PIN_BANK_EINTG(3, 0x140, "gpg0", 0x28), 1573 + }; 1574 + 1575 + /* pin banks of exynos8890 pin-controller 10 (TOUCH) */ 1576 + static const struct samsung_pin_bank_data exynos8890_pin_banks10[] __initconst = { 1577 + /* Must start with EINTG banks, ordered by EINT group number. */ 1578 + EXYNOS8895_PIN_BANK_EINTG(3, 0x000, "gpf1", 0x00), 1579 + }; 1580 + 1581 + static const struct samsung_pin_ctrl exynos8890_pin_ctrl[] __initconst = { 1582 + { 1583 + /* pin-controller instance 0 Alive data */ 1584 + .pin_banks = exynos8890_pin_banks0, 1585 + .nr_banks = ARRAY_SIZE(exynos8890_pin_banks0), 1586 + .eint_wkup_init = exynos_eint_wkup_init, 1587 + }, { 1588 + /* pin-controller instance 1 AUD data */ 1589 + .pin_banks = exynos8890_pin_banks1, 1590 + .nr_banks = ARRAY_SIZE(exynos8890_pin_banks1), 1591 + .eint_gpio_init = exynos_eint_gpio_init, 1592 + }, { 1593 + /* pin-controller instance 2 CCORE data */ 1594 + .pin_banks = exynos8890_pin_banks2, 1595 + .nr_banks = ARRAY_SIZE(exynos8890_pin_banks2), 1596 + .eint_gpio_init = exynos_eint_gpio_init, 1597 + }, { 1598 + /* pin-controller instance 3 ESE data */ 1599 + .pin_banks = exynos8890_pin_banks3, 1600 + .nr_banks = ARRAY_SIZE(exynos8890_pin_banks3), 1601 + .eint_gpio_init = exynos_eint_gpio_init, 1602 + }, { 1603 + /* pin-controller instance 4 FP data */ 1604 + .pin_banks = exynos8890_pin_banks4, 1605 + .nr_banks = ARRAY_SIZE(exynos8890_pin_banks4), 1606 + .eint_gpio_init = exynos_eint_gpio_init, 1607 + }, { 1608 + /* pin-controller instance 5 FSYS0 data */ 1609 + .pin_banks = exynos8890_pin_banks5, 1610 + .nr_banks = ARRAY_SIZE(exynos8890_pin_banks5), 1611 + .eint_gpio_init = exynos_eint_gpio_init, 1612 + }, { 1613 + /* pin-controller instance 6 FSYS1 data */ 1614 + .pin_banks = exynos8890_pin_banks6, 1615 + .nr_banks = ARRAY_SIZE(exynos8890_pin_banks6), 1616 + .eint_gpio_init = exynos_eint_gpio_init, 1617 + }, { 1618 + /* pin-controller instance 7 NFC data */ 1619 + .pin_banks = exynos8890_pin_banks7, 1620 + .nr_banks = ARRAY_SIZE(exynos8890_pin_banks7), 1621 + .eint_gpio_init = exynos_eint_gpio_init, 1622 + }, { 1623 + /* pin-controller instance 8 PERIC0 data */ 1624 + .pin_banks = exynos8890_pin_banks8, 1625 + .nr_banks = ARRAY_SIZE(exynos8890_pin_banks8), 1626 + .eint_gpio_init = exynos_eint_gpio_init, 1627 + }, { 1628 + /* pin-controller instance 9 PERIC1 data */ 1629 + .pin_banks = exynos8890_pin_banks9, 1630 + .nr_banks = ARRAY_SIZE(exynos8890_pin_banks9), 1631 + .eint_gpio_init = exynos_eint_gpio_init, 1632 + }, { 1633 + /* pin-controller instance 10 TOUCH data */ 1634 + .pin_banks = exynos8890_pin_banks10, 1635 + .nr_banks = ARRAY_SIZE(exynos8890_pin_banks10), 1636 + .eint_gpio_init = exynos_eint_gpio_init, 1637 + }, 1638 + }; 1639 + 1640 + const struct samsung_pinctrl_of_match_data exynos8890_of_data __initconst = { 1641 + .ctrl = exynos8890_pin_ctrl, 1642 + .num_ctrl = ARRAY_SIZE(exynos8890_pin_ctrl), 1643 + }; 1644 + 1488 1645 /* pin banks of exynos8895 pin-controller 0 (ALIVE) */ 1489 1646 static const struct samsung_pin_bank_data exynos8895_pin_banks0[] __initconst = { 1490 1647 EXYNOS_PIN_BANK_EINTW(8, 0x020, "gpa0", 0x00), ··· 2022 1865 const struct samsung_pinctrl_of_match_data artpec8_of_data __initconst = { 2023 1866 .ctrl = artpec8_pin_ctrl, 2024 1867 .num_ctrl = ARRAY_SIZE(artpec8_pin_ctrl), 1868 + }; 1869 + 1870 + /* pin banks of artpec9 pin-controller (FSYS0) */ 1871 + static const struct samsung_pin_bank_data artpec9_pin_banks0[] __initconst = { 1872 + ARTPEC_PIN_BANK_EINTG(8, 0x000, "gpf0", 0x00), 1873 + ARTPEC_PIN_BANK_EINTG(8, 0x020, "gpf1", 0x04), 1874 + ARTPEC_PIN_BANK_EINTG(8, 0x040, "gpe0", 0x08), 1875 + ARTPEC_PIN_BANK_EINTG(8, 0x060, "gpe1", 0x0c), 1876 + ARTPEC_PIN_BANK_EINTG(8, 0x080, "gpe2", 0x10), 1877 + ARTPEC_PIN_BANK_EINTG(8, 0x0a0, "gpe3", 0x14), 1878 + ARTPEC_PIN_BANK_EINTG(2, 0x0c0, "gpe4", 0x18), 1879 + ARTPEC_PIN_BANK_EINTG(8, 0x0e0, "gps0", 0x1c), 1880 + ARTPEC_PIN_BANK_EINTG(8, 0x100, "gps1", 0x20), 1881 + ARTPEC_PIN_BANK_EINTG(5, 0x120, "gpi0", 0x24), 1882 + }; 1883 + 1884 + /* pin banks of artpec9 pin-controller (FSYS1) */ 1885 + static const struct samsung_pin_bank_data artpec9_pin_banks1[] __initconst = { 1886 + ARTPEC_PIN_BANK_EINTG(2, 0x000, "gpu0", 0x00), 1887 + }; 1888 + 1889 + /* pin banks of artpec9 pin-controller (PERIC) */ 1890 + static const struct samsung_pin_bank_data artpec9_pin_banks2[] __initconst = { 1891 + ARTPEC_PIN_BANK_EINTG(8, 0x000, "gpa0", 0x00), 1892 + ARTPEC_PIN_BANK_EINTG(8, 0x020, "gpa1", 0x04), 1893 + }; 1894 + 1895 + static const struct samsung_pin_ctrl artpec9_pin_ctrl[] __initconst = { 1896 + { 1897 + /* pin-controller instance 0 FSYS0 data */ 1898 + .pin_banks = artpec9_pin_banks0, 1899 + .nr_banks = ARRAY_SIZE(artpec9_pin_banks0), 1900 + .eint_gpio_init = exynos_eint_gpio_init, 1901 + }, { 1902 + /* pin-controller instance 1 FSYS1 data */ 1903 + .pin_banks = artpec9_pin_banks1, 1904 + .nr_banks = ARRAY_SIZE(artpec9_pin_banks1), 1905 + .eint_gpio_init = exynos_eint_gpio_init, 1906 + }, { 1907 + /* pin-controller instance 2 PERIC data */ 1908 + .pin_banks = artpec9_pin_banks2, 1909 + .nr_banks = ARRAY_SIZE(artpec9_pin_banks2), 1910 + .eint_gpio_init = exynos_eint_gpio_init, 1911 + }, 1912 + }; 1913 + 1914 + const struct samsung_pinctrl_of_match_data artpec9_of_data __initconst = { 1915 + .ctrl = artpec9_pin_ctrl, 1916 + .num_ctrl = ARRAY_SIZE(artpec9_pin_ctrl), 2025 1917 };
+4
drivers/pinctrl/samsung/pinctrl-samsung.c
··· 1484 1484 #ifdef CONFIG_PINCTRL_EXYNOS_ARM64 1485 1485 { .compatible = "axis,artpec8-pinctrl", 1486 1486 .data = &artpec8_of_data }, 1487 + { .compatible = "axis,artpec9-pinctrl", 1488 + .data = &artpec9_of_data }, 1487 1489 { .compatible = "google,gs101-pinctrl", 1488 1490 .data = &gs101_of_data }, 1489 1491 { .compatible = "samsung,exynos2200-pinctrl", ··· 1500 1498 .data = &exynos7885_of_data }, 1501 1499 { .compatible = "samsung,exynos850-pinctrl", 1502 1500 .data = &exynos850_of_data }, 1501 + { .compatible = "samsung,exynos8890-pinctrl", 1502 + .data = &exynos8890_of_data }, 1503 1503 { .compatible = "samsung,exynos8895-pinctrl", 1504 1504 .data = &exynos8895_of_data }, 1505 1505 { .compatible = "samsung,exynos9810-pinctrl",
+2
drivers/pinctrl/samsung/pinctrl-samsung.h
··· 382 382 383 383 /* list of all exported SoC specific data */ 384 384 extern const struct samsung_pinctrl_of_match_data artpec8_of_data; 385 + extern const struct samsung_pinctrl_of_match_data artpec9_of_data; 385 386 extern const struct samsung_pinctrl_of_match_data exynos2200_of_data; 386 387 extern const struct samsung_pinctrl_of_match_data exynos3250_of_data; 387 388 extern const struct samsung_pinctrl_of_match_data exynos4210_of_data; ··· 396 395 extern const struct samsung_pinctrl_of_match_data exynos7870_of_data; 397 396 extern const struct samsung_pinctrl_of_match_data exynos7885_of_data; 398 397 extern const struct samsung_pinctrl_of_match_data exynos850_of_data; 398 + extern const struct samsung_pinctrl_of_match_data exynos8890_of_data; 399 399 extern const struct samsung_pinctrl_of_match_data exynos8895_of_data; 400 400 extern const struct samsung_pinctrl_of_match_data exynos9810_of_data; 401 401 extern const struct samsung_pinctrl_of_match_data exynos990_of_data;
-2
drivers/pinctrl/starfive/pinctrl-starfive-jh7110-aon.c
··· 29 29 #include "pinctrl-starfive-jh7110.h" 30 30 31 31 #define JH7110_AON_NGPIO 4 32 - #define JH7110_AON_GC_BASE 64 33 32 34 33 #define JH7110_AON_REGS_NUM 37 35 34 ··· 137 138 .pins = jh7110_aon_pins, 138 139 .npins = ARRAY_SIZE(jh7110_aon_pins), 139 140 .ngpios = JH7110_AON_NGPIO, 140 - .gc_base = JH7110_AON_GC_BASE, 141 141 .dout_reg_base = JH7110_AON_DOUT, 142 142 .dout_mask = GENMASK(3, 0), 143 143 .doen_reg_base = JH7110_AON_DOEN,
-2
drivers/pinctrl/starfive/pinctrl-starfive-jh7110-sys.c
··· 29 29 #include "pinctrl-starfive-jh7110.h" 30 30 31 31 #define JH7110_SYS_NGPIO 64 32 - #define JH7110_SYS_GC_BASE 0 33 32 34 33 #define JH7110_SYS_REGS_NUM 174 35 34 ··· 409 410 .pins = jh7110_sys_pins, 410 411 .npins = ARRAY_SIZE(jh7110_sys_pins), 411 412 .ngpios = JH7110_SYS_NGPIO, 412 - .gc_base = JH7110_SYS_GC_BASE, 413 413 .dout_reg_base = JH7110_SYS_DOUT, 414 414 .dout_mask = GENMASK(6, 0), 415 415 .doen_reg_base = JH7110_SYS_DOEN,
+1 -1
drivers/pinctrl/starfive/pinctrl-starfive-jh7110.c
··· 938 938 sfp->gc.set = jh7110_gpio_set; 939 939 sfp->gc.set_config = jh7110_gpio_set_config; 940 940 sfp->gc.add_pin_ranges = jh7110_gpio_add_pin_ranges; 941 - sfp->gc.base = info->gc_base; 941 + sfp->gc.base = -1; 942 942 sfp->gc.ngpio = info->ngpios; 943 943 944 944 jh7110_irq_chip.name = sfp->gc.label;
-1
drivers/pinctrl/starfive/pinctrl-starfive-jh7110.h
··· 38 38 const struct pinctrl_pin_desc *pins; 39 39 unsigned int npins; 40 40 unsigned int ngpios; 41 - unsigned int gc_base; 42 41 43 42 /* gpio dout/doen/din/gpioinput register */ 44 43 unsigned int dout_reg_base;
+320 -96
drivers/pinctrl/stm32/pinctrl-stm32.c
··· 51 51 #define STM32_GPIO_AFRL 0x20 52 52 #define STM32_GPIO_AFRH 0x24 53 53 #define STM32_GPIO_SECCFGR 0x30 54 + #define STM32_GPIO_DELAYRL 0x40 55 + #define STM32_GPIO_ADVCFGRL 0x48 54 56 #define STM32_GPIO_CIDCFGR(x) (0x50 + (0x8 * (x))) 55 57 #define STM32_GPIO_SEMCR(x) (0x54 + (0x8 * (x))) 56 58 57 - /* custom bitfield to backup pin status */ 58 - #define STM32_GPIO_BKP_MODE_SHIFT 0 59 - #define STM32_GPIO_BKP_MODE_MASK GENMASK(1, 0) 60 - #define STM32_GPIO_BKP_ALT_SHIFT 2 61 - #define STM32_GPIO_BKP_ALT_MASK GENMASK(5, 2) 62 - #define STM32_GPIO_BKP_SPEED_SHIFT 6 63 - #define STM32_GPIO_BKP_SPEED_MASK GENMASK(7, 6) 64 - #define STM32_GPIO_BKP_PUPD_SHIFT 8 65 - #define STM32_GPIO_BKP_PUPD_MASK GENMASK(9, 8) 66 - #define STM32_GPIO_BKP_TYPE 10 67 - #define STM32_GPIO_BKP_VAL 11 59 + /* Unitary delay for STM32_GPIO_DELAYRL */ 60 + #define STM32_GPIO_DELAYRL_PS 250 61 + 62 + #define STM32_GPIO_ADVCFGR_DLYPATH_MASK BIT(0) 63 + #define STM32_GPIO_ADVCFGR_DE_MASK BIT(1) 64 + #define STM32_GPIO_ADVCFGR_INVCLK_MASK BIT(2) 65 + #define STM32_GPIO_ADVCFGR_RET_MASK BIT(3) 66 + #define STM32_GPIO_ADVCFGR_IO_SYNC_MASK \ 67 + (STM32_GPIO_ADVCFGR_DE_MASK \ 68 + | STM32_GPIO_ADVCFGR_INVCLK_MASK \ 69 + | STM32_GPIO_ADVCFGR_RET_MASK) 68 70 69 71 #define STM32_GPIO_CIDCFGR_CFEN BIT(0) 70 72 #define STM32_GPIO_CIDCFGR_SEMEN BIT(1) ··· 80 78 #define STM32_GPIO_IRQ_LINE 16 81 79 82 80 #define SYSCFG_IRQMUX_MASK GENMASK(3, 0) 81 + 82 + /* Vendor specific pin configuration */ 83 + #define STM32_GPIO_PIN_CONFIG_IO_SYNC (PIN_CONFIG_END + 1) 83 84 84 85 #define gpio_range_to_bank(chip) \ 85 86 container_of(chip, struct stm32_gpio_bank, range) ··· 99 94 "reserved", 100 95 }; 101 96 97 + static const char * const stm32_gpio_io_sync[] = { 98 + "pass-through", 99 + "clock inverted", 100 + "data on rising edge", 101 + "data on falling edge", 102 + "data on both edges", 103 + }; 104 + 105 + static u8 io_sync_2_advcfgr[] = { 106 + /* data or clock GPIO pass-through */ 107 + [0] = 0, 108 + /* clock GPIO inverted */ 109 + [1] = STM32_GPIO_ADVCFGR_INVCLK_MASK, 110 + /* data GPIO re-sampled on clock rising edge */ 111 + [2] = STM32_GPIO_ADVCFGR_RET_MASK, 112 + /* data GPIO re-sampled on clock falling edge */ 113 + [3] = STM32_GPIO_ADVCFGR_RET_MASK | STM32_GPIO_ADVCFGR_INVCLK_MASK, 114 + /* data GPIO re-sampled on both clock edges */ 115 + [4] = STM32_GPIO_ADVCFGR_RET_MASK | STM32_GPIO_ADVCFGR_DE_MASK, 116 + }; 117 + 118 + static const struct pinconf_generic_params stm32_gpio_bindings[] = { 119 + {"st,io-sync", STM32_GPIO_PIN_CONFIG_IO_SYNC, 0, 120 + stm32_gpio_io_sync, ARRAY_SIZE(stm32_gpio_io_sync)}, 121 + }; 122 + 102 123 struct stm32_pinctrl_group { 103 124 const char *name; 104 125 unsigned long config; 105 126 unsigned pin; 127 + }; 128 + 129 + struct stm32_pin_backup { 130 + unsigned int alt:4; 131 + unsigned int mode:2; 132 + unsigned int bias:2; 133 + unsigned int speed:2; 134 + unsigned int drive:1; 135 + unsigned int value:1; 136 + unsigned int advcfg:4; 137 + unsigned int skew_delay:4; 106 138 }; 107 139 108 140 struct stm32_gpio_bank { ··· 152 110 struct irq_domain *domain; 153 111 u32 bank_nr; 154 112 u32 bank_ioport_nr; 155 - u32 pin_backup[STM32_GPIO_PINS_PER_BANK]; 113 + struct stm32_pin_backup pin_backup[STM32_GPIO_PINS_PER_BANK]; 156 114 u8 irq_type[STM32_GPIO_PINS_PER_BANK]; 157 115 bool secure_control; 116 + bool io_sync_control; 158 117 bool rif_control; 159 118 }; 160 119 ··· 219 176 static void stm32_gpio_backup_value(struct stm32_gpio_bank *bank, 220 177 u32 offset, u32 value) 221 178 { 222 - bank->pin_backup[offset] &= ~BIT(STM32_GPIO_BKP_VAL); 223 - bank->pin_backup[offset] |= value << STM32_GPIO_BKP_VAL; 179 + bank->pin_backup[offset].value = value; 224 180 } 225 181 226 182 static void stm32_gpio_backup_mode(struct stm32_gpio_bank *bank, u32 offset, 227 183 u32 mode, u32 alt) 228 184 { 229 - bank->pin_backup[offset] &= ~(STM32_GPIO_BKP_MODE_MASK | 230 - STM32_GPIO_BKP_ALT_MASK); 231 - bank->pin_backup[offset] |= mode << STM32_GPIO_BKP_MODE_SHIFT; 232 - bank->pin_backup[offset] |= alt << STM32_GPIO_BKP_ALT_SHIFT; 185 + bank->pin_backup[offset].mode = mode; 186 + bank->pin_backup[offset].alt = alt; 233 187 } 234 188 235 189 static void stm32_gpio_backup_driving(struct stm32_gpio_bank *bank, u32 offset, 236 190 u32 drive) 237 191 { 238 - bank->pin_backup[offset] &= ~BIT(STM32_GPIO_BKP_TYPE); 239 - bank->pin_backup[offset] |= drive << STM32_GPIO_BKP_TYPE; 192 + bank->pin_backup[offset].drive = drive; 240 193 } 241 194 242 195 static void stm32_gpio_backup_speed(struct stm32_gpio_bank *bank, u32 offset, 243 196 u32 speed) 244 197 { 245 - bank->pin_backup[offset] &= ~STM32_GPIO_BKP_SPEED_MASK; 246 - bank->pin_backup[offset] |= speed << STM32_GPIO_BKP_SPEED_SHIFT; 198 + bank->pin_backup[offset].speed = speed; 247 199 } 248 200 249 201 static void stm32_gpio_backup_bias(struct stm32_gpio_bank *bank, u32 offset, 250 202 u32 bias) 251 203 { 252 - bank->pin_backup[offset] &= ~STM32_GPIO_BKP_PUPD_MASK; 253 - bank->pin_backup[offset] |= bias << STM32_GPIO_BKP_PUPD_SHIFT; 204 + bank->pin_backup[offset].bias = bias; 205 + } 206 + 207 + static void stm32_gpio_backup_advcfg(struct stm32_gpio_bank *bank, u32 offset, u32 mask, u32 value) 208 + { 209 + u32 val; 210 + 211 + val = bank->pin_backup[offset].advcfg; 212 + val &= ~mask; 213 + val |= value & mask; 214 + bank->pin_backup[offset].advcfg = val; 215 + } 216 + 217 + static void stm32_gpio_backup_skew_delay(struct stm32_gpio_bank *bank, u32 offset, u32 delay) 218 + { 219 + bank->pin_backup[offset].skew_delay = delay; 254 220 } 255 221 256 222 /* RIF functions */ ··· 339 287 /* GPIO functions */ 340 288 341 289 static inline void __stm32_gpio_set(struct stm32_gpio_bank *bank, 342 - unsigned offset, int value) 290 + unsigned int offset, u32 value) 343 291 { 344 292 stm32_gpio_backup_value(bank, offset, value); 345 293 ··· 362 310 return -EINVAL; 363 311 } 364 312 365 - if (bank->rif_control) { 366 - if (!stm32_gpio_rif_acquire_semaphore(bank, offset)) { 367 - dev_err(pctl->dev, "pin %d not available.\n", pin); 368 - return -EINVAL; 369 - } 313 + if (bank->rif_control && !stm32_gpio_rif_acquire_semaphore(bank, offset)) { 314 + dev_err(pctl->dev, "pin %d not available.\n", offset); 315 + return -EACCES; 370 316 } 371 317 372 318 return pinctrl_gpio_request(chip, offset); ··· 979 929 u32 val; 980 930 int alt_shift = (pin % 8) * 4; 981 931 int alt_offset = STM32_GPIO_AFRL + (pin / 8) * 4; 982 - unsigned long flags; 983 - 984 - spin_lock_irqsave(&bank->lock, flags); 985 932 986 933 val = readl_relaxed(bank->base + alt_offset); 987 934 val &= GENMASK(alt_shift + 3, alt_shift); ··· 987 940 val = readl_relaxed(bank->base + STM32_GPIO_MODER); 988 941 val &= GENMASK(pin * 2 + 1, pin * 2); 989 942 *mode = val >> (pin * 2); 990 - 991 - spin_unlock_irqrestore(&bank->lock, flags); 992 943 } 993 944 994 945 static int stm32_pmx_set_mux(struct pinctrl_dev *pctldev, ··· 1038 993 static int stm32_pmx_request(struct pinctrl_dev *pctldev, unsigned int gpio) 1039 994 { 1040 995 struct stm32_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); 996 + unsigned int offset = stm32_gpio_pin(gpio); 1041 997 struct pinctrl_gpio_range *range; 998 + struct stm32_gpio_bank *bank; 1042 999 1043 1000 range = pinctrl_find_gpio_range_from_pin_nolock(pctldev, gpio); 1044 1001 if (!range) { ··· 1048 1001 return -EINVAL; 1049 1002 } 1050 1003 1051 - if (!gpiochip_line_is_valid(range->gc, stm32_gpio_pin(gpio))) { 1004 + if (!gpiochip_line_is_valid(range->gc, offset)) { 1052 1005 dev_warn(pctl->dev, "Can't access gpio %d\n", gpio); 1006 + return -EACCES; 1007 + } 1008 + 1009 + bank = gpiochip_get_data(range->gc); 1010 + if (!bank) 1011 + return -ENODEV; 1012 + 1013 + if (bank->rif_control && !stm32_gpio_rif_acquire_semaphore(bank, offset)) { 1014 + dev_err(pctl->dev, "pin %d not available.\n", offset); 1053 1015 return -EACCES; 1054 1016 } 1055 1017 ··· 1115 1059 static u32 stm32_pconf_get_driving(struct stm32_gpio_bank *bank, 1116 1060 unsigned int offset) 1117 1061 { 1118 - unsigned long flags; 1119 1062 u32 val; 1120 - 1121 - spin_lock_irqsave(&bank->lock, flags); 1122 1063 1123 1064 val = readl_relaxed(bank->base + STM32_GPIO_TYPER); 1124 1065 val &= BIT(offset); 1125 - 1126 - spin_unlock_irqrestore(&bank->lock, flags); 1127 1066 1128 1067 return (val >> offset); 1129 1068 } ··· 1161 1110 static u32 stm32_pconf_get_speed(struct stm32_gpio_bank *bank, 1162 1111 unsigned int offset) 1163 1112 { 1164 - unsigned long flags; 1165 1113 u32 val; 1166 - 1167 - spin_lock_irqsave(&bank->lock, flags); 1168 1114 1169 1115 val = readl_relaxed(bank->base + STM32_GPIO_SPEEDR); 1170 1116 val &= GENMASK(offset * 2 + 1, offset * 2); 1171 - 1172 - spin_unlock_irqrestore(&bank->lock, flags); 1173 1117 1174 1118 return (val >> (offset * 2)); 1175 1119 } ··· 1207 1161 static u32 stm32_pconf_get_bias(struct stm32_gpio_bank *bank, 1208 1162 unsigned int offset) 1209 1163 { 1210 - unsigned long flags; 1211 1164 u32 val; 1212 - 1213 - spin_lock_irqsave(&bank->lock, flags); 1214 1165 1215 1166 val = readl_relaxed(bank->base + STM32_GPIO_PUPDR); 1216 1167 val &= GENMASK(offset * 2 + 1, offset * 2); 1217 1168 1169 + return (val >> (offset * 2)); 1170 + } 1171 + 1172 + static void 1173 + stm32_pconf_set_advcfgr_nolock(struct stm32_gpio_bank *bank, int offset, u32 mask, u32 value) 1174 + { 1175 + int advcfgr_offset = STM32_GPIO_ADVCFGRL + (offset / 8) * 4; 1176 + int advcfgr_shift = (offset % 8) * 4; 1177 + u32 val; 1178 + 1179 + val = readl_relaxed(bank->base + advcfgr_offset); 1180 + val &= ~(mask << advcfgr_shift); 1181 + val |= (value & mask) << advcfgr_shift; 1182 + writel_relaxed(val, bank->base + advcfgr_offset); 1183 + 1184 + stm32_gpio_backup_advcfg(bank, offset, mask, value); 1185 + } 1186 + 1187 + static int stm32_pconf_set_advcfgr(struct stm32_gpio_bank *bank, int offset, u32 mask, u32 value) 1188 + { 1189 + struct stm32_pinctrl *pctl = dev_get_drvdata(bank->gpio_chip.parent); 1190 + unsigned long flags; 1191 + int err = 0; 1192 + 1193 + if (!bank->io_sync_control) 1194 + return -ENOTSUPP; 1195 + 1196 + spin_lock_irqsave(&bank->lock, flags); 1197 + 1198 + if (pctl->hwlock) { 1199 + err = hwspin_lock_timeout_in_atomic(pctl->hwlock, HWSPNLCK_TIMEOUT); 1200 + if (err) { 1201 + dev_err(pctl->dev, "Can't get hwspinlock\n"); 1202 + goto unlock; 1203 + } 1204 + } 1205 + 1206 + stm32_pconf_set_advcfgr_nolock(bank, offset, mask, value); 1207 + 1208 + if (pctl->hwlock) 1209 + hwspin_unlock_in_atomic(pctl->hwlock); 1210 + 1211 + unlock: 1218 1212 spin_unlock_irqrestore(&bank->lock, flags); 1219 1213 1220 - return (val >> (offset * 2)); 1214 + return err; 1215 + } 1216 + 1217 + static u32 stm32_pconf_get_advcfgr(struct stm32_gpio_bank *bank, int offset, u32 mask) 1218 + { 1219 + int advcfgr_offset = STM32_GPIO_ADVCFGRL + (offset / 8) * 4; 1220 + int advcfgr_shift = (offset % 8) * 4; 1221 + u32 val; 1222 + 1223 + if (!bank->io_sync_control) 1224 + return 0; 1225 + 1226 + val = readl_relaxed(bank->base + advcfgr_offset); 1227 + val >>= advcfgr_shift; 1228 + 1229 + return val & mask; 1230 + } 1231 + 1232 + static int stm32_pconf_set_io_sync(struct stm32_gpio_bank *bank, int offset, u32 io_sync) 1233 + { 1234 + if (io_sync >= ARRAY_SIZE(io_sync_2_advcfgr)) 1235 + return -EINVAL; 1236 + 1237 + return stm32_pconf_set_advcfgr(bank, offset, STM32_GPIO_ADVCFGR_IO_SYNC_MASK, 1238 + io_sync_2_advcfgr[io_sync]); 1239 + } 1240 + 1241 + static const char *stm32_pconf_get_io_sync_str(struct stm32_gpio_bank *bank, int offset) 1242 + { 1243 + u32 io_sync = stm32_pconf_get_advcfgr(bank, offset, STM32_GPIO_ADVCFGR_IO_SYNC_MASK); 1244 + 1245 + if (io_sync & STM32_GPIO_ADVCFGR_RET_MASK) { 1246 + if (io_sync & STM32_GPIO_ADVCFGR_DE_MASK) 1247 + return "data GPIO re-sampled on both clock edges"; 1248 + 1249 + if (io_sync & STM32_GPIO_ADVCFGR_INVCLK_MASK) 1250 + return "data GPIO re-sampled on clock falling edge"; 1251 + 1252 + return "data GPIO re-sampled on clock rising edge"; 1253 + } 1254 + 1255 + if (io_sync & STM32_GPIO_ADVCFGR_INVCLK_MASK) 1256 + return "clock GPIO inverted"; 1257 + 1258 + return NULL; 1259 + } 1260 + 1261 + static int 1262 + stm32_pconf_set_skew_delay(struct stm32_gpio_bank *bank, int offset, u32 delay, bool is_dir_input) 1263 + { 1264 + struct stm32_pinctrl *pctl = dev_get_drvdata(bank->gpio_chip.parent); 1265 + int delay_offset = STM32_GPIO_DELAYRL + (offset / 8) * 4; 1266 + int delay_shift = (offset % 8) * 4; 1267 + unsigned long flags; 1268 + int err = 0; 1269 + u32 val; 1270 + 1271 + if (!bank->io_sync_control) 1272 + return -ENOTSUPP; 1273 + 1274 + spin_lock_irqsave(&bank->lock, flags); 1275 + 1276 + if (pctl->hwlock) { 1277 + err = hwspin_lock_timeout_in_atomic(pctl->hwlock, HWSPNLCK_TIMEOUT); 1278 + if (err) { 1279 + dev_err(pctl->dev, "Can't get hwspinlock\n"); 1280 + goto unlock; 1281 + } 1282 + } 1283 + 1284 + val = readl_relaxed(bank->base + delay_offset); 1285 + val &= ~GENMASK(delay_shift + 3, delay_shift); 1286 + val |= (delay << delay_shift); 1287 + writel_relaxed(val, bank->base + delay_offset); 1288 + 1289 + stm32_gpio_backup_skew_delay(bank, offset, delay); 1290 + 1291 + stm32_pconf_set_advcfgr_nolock(bank, offset, STM32_GPIO_ADVCFGR_DLYPATH_MASK, 1292 + is_dir_input ? STM32_GPIO_ADVCFGR_DLYPATH_MASK : 0); 1293 + 1294 + if (pctl->hwlock) 1295 + hwspin_unlock_in_atomic(pctl->hwlock); 1296 + 1297 + unlock: 1298 + spin_unlock_irqrestore(&bank->lock, flags); 1299 + 1300 + return err; 1301 + } 1302 + 1303 + static u32 stm32_pconf_get_skew_delay_val(struct stm32_gpio_bank *bank, int offset) 1304 + { 1305 + int delay_offset = STM32_GPIO_DELAYRL + (offset / 8) * 4; 1306 + int delay_shift = (offset % 8) * 4; 1307 + u32 val; 1308 + 1309 + val = readl_relaxed(bank->base + delay_offset); 1310 + val &= GENMASK(delay_shift + 3, delay_shift); 1311 + 1312 + return val >> delay_shift; 1313 + } 1314 + 1315 + static const char *stm32_pconf_get_skew_dir_str(struct stm32_gpio_bank *bank, int offset) 1316 + { 1317 + return stm32_pconf_get_advcfgr(bank, offset, STM32_GPIO_ADVCFGR_DLYPATH_MASK) ? 1318 + "input" : "output"; 1221 1319 } 1222 1320 1223 1321 static bool stm32_pconf_get(struct stm32_gpio_bank *bank, 1224 1322 unsigned int offset, bool dir) 1225 1323 { 1226 - unsigned long flags; 1227 - u32 val; 1228 - 1229 - spin_lock_irqsave(&bank->lock, flags); 1324 + bool val; 1230 1325 1231 1326 if (dir) 1232 1327 val = !!(readl_relaxed(bank->base + STM32_GPIO_IDR) & ··· 1376 1189 val = !!(readl_relaxed(bank->base + STM32_GPIO_ODR) & 1377 1190 BIT(offset)); 1378 1191 1379 - spin_unlock_irqrestore(&bank->lock, flags); 1380 - 1381 1192 return val; 1382 1193 } 1383 1194 1384 1195 static int stm32_pconf_parse_conf(struct pinctrl_dev *pctldev, 1385 - unsigned int pin, enum pin_config_param param, 1386 - enum pin_config_param arg) 1196 + unsigned int pin, unsigned long config) 1387 1197 { 1388 1198 struct stm32_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); 1199 + unsigned int param = pinconf_to_config_param(config); 1200 + u32 arg = pinconf_to_config_argument(config); 1389 1201 struct pinctrl_gpio_range *range; 1390 1202 struct stm32_gpio_bank *bank; 1391 1203 int offset, ret = 0; ··· 1400 1214 1401 1215 if (!gpiochip_line_is_valid(range->gc, offset)) { 1402 1216 dev_warn(pctl->dev, "Can't access gpio %d\n", pin); 1217 + return -EACCES; 1218 + } 1219 + 1220 + if (bank->rif_control && !stm32_gpio_rif_acquire_semaphore(bank, offset)) { 1221 + dev_err(pctl->dev, "pin %d not available.\n", offset); 1403 1222 return -EACCES; 1404 1223 } 1405 1224 ··· 1430 1239 case PIN_CONFIG_LEVEL: 1431 1240 __stm32_gpio_set(bank, offset, arg); 1432 1241 ret = stm32_pmx_gpio_set_direction(pctldev, range, pin, false); 1242 + break; 1243 + case PIN_CONFIG_SKEW_DELAY_INPUT_PS: 1244 + arg /= STM32_GPIO_DELAYRL_PS; 1245 + ret = stm32_pconf_set_skew_delay(bank, offset, arg, true); 1246 + break; 1247 + case PIN_CONFIG_SKEW_DELAY_OUTPUT_PS: 1248 + arg /= STM32_GPIO_DELAYRL_PS; 1249 + ret = stm32_pconf_set_skew_delay(bank, offset, arg, false); 1250 + break; 1251 + case STM32_GPIO_PIN_CONFIG_IO_SYNC: 1252 + ret = stm32_pconf_set_io_sync(bank, offset, arg); 1433 1253 break; 1434 1254 default: 1435 1255 ret = -ENOTSUPP; ··· 1469 1267 1470 1268 for (i = 0; i < num_configs; i++) { 1471 1269 mutex_lock(&pctldev->mutex); 1472 - ret = stm32_pconf_parse_conf(pctldev, g->pin, 1473 - pinconf_to_config_param(configs[i]), 1474 - pinconf_to_config_argument(configs[i])); 1270 + ret = stm32_pconf_parse_conf(pctldev, g->pin, configs[i]); 1475 1271 mutex_unlock(&pctldev->mutex); 1476 1272 if (ret < 0) 1477 1273 return ret; ··· 1486 1286 int i, ret; 1487 1287 1488 1288 for (i = 0; i < num_configs; i++) { 1489 - ret = stm32_pconf_parse_conf(pctldev, pin, 1490 - pinconf_to_config_param(configs[i]), 1491 - pinconf_to_config_argument(configs[i])); 1289 + ret = stm32_pconf_parse_conf(pctldev, pin, configs[i]); 1492 1290 if (ret < 0) 1493 1291 return ret; 1494 1292 } ··· 1584 1386 case 3: 1585 1387 break; 1586 1388 } 1389 + 1390 + if (bank->io_sync_control) { 1391 + const char *io_sync_str, *skew_dir_str; 1392 + u32 skew_delay; 1393 + 1394 + io_sync_str = stm32_pconf_get_io_sync_str(bank, offset); 1395 + skew_dir_str = stm32_pconf_get_skew_dir_str(bank, offset); 1396 + skew_delay = stm32_pconf_get_skew_delay_val(bank, offset); 1397 + 1398 + if (io_sync_str) 1399 + seq_printf(s, " - IO-sync: %s", io_sync_str); 1400 + 1401 + if (skew_delay) 1402 + seq_printf(s, " - Skew-delay: %u (%u ps) %s", skew_delay, 1403 + skew_delay * STM32_GPIO_DELAYRL_PS, skew_dir_str); 1404 + } 1587 1405 } 1588 1406 1589 1407 static const struct pinconf_ops stm32_pconf_ops = { ··· 1692 1478 bank->bank_nr = bank_nr; 1693 1479 bank->bank_ioport_nr = bank_ioport_nr; 1694 1480 bank->secure_control = pctl->match_data->secure_control; 1481 + bank->io_sync_control = pctl->match_data->io_sync_control; 1695 1482 bank->rif_control = pctl->match_data->rif_control; 1696 1483 spin_lock_init(&bank->lock); 1697 1484 ··· 1886 1671 if (hwlock_id == -EPROBE_DEFER) 1887 1672 return hwlock_id; 1888 1673 } else { 1889 - pctl->hwlock = hwspin_lock_request_specific(hwlock_id); 1674 + pctl->hwlock = devm_hwspin_lock_request_specific(dev, hwlock_id); 1890 1675 } 1891 1676 1892 1677 spin_lock_init(&pctl->irqmux_lock); ··· 1935 1720 pctl->pctl_desc.confops = &stm32_pconf_ops; 1936 1721 pctl->pctl_desc.pctlops = &stm32_pctrl_ops; 1937 1722 pctl->pctl_desc.pmxops = &stm32_pmx_ops; 1723 + pctl->pctl_desc.num_custom_params = ARRAY_SIZE(stm32_gpio_bindings); 1724 + pctl->pctl_desc.custom_params = stm32_gpio_bindings; 1938 1725 pctl->dev = &pdev->dev; 1939 1726 1940 1727 pctl->pctl_dev = devm_pinctrl_register(&pdev->dev, &pctl->pctl_desc, ··· 2018 1801 struct stm32_pinctrl *pctl, u32 pin) 2019 1802 { 2020 1803 const struct pin_desc *desc = pin_desc_get(pctl->pctl_dev, pin); 2021 - u32 val, alt, mode, offset = stm32_gpio_pin(pin); 1804 + u32 mode, offset = stm32_gpio_pin(pin); 2022 1805 struct pinctrl_gpio_range *range; 2023 1806 struct stm32_gpio_bank *bank; 2024 1807 bool pin_is_irq; ··· 2028 1811 if (!range) 2029 1812 return 0; 2030 1813 1814 + bank = gpiochip_get_data(range->gc); 1815 + 2031 1816 if (!gpiochip_line_is_valid(range->gc, offset)) 2032 1817 return 0; 1818 + 1819 + if (bank->rif_control && !stm32_gpio_rif_acquire_semaphore(bank, offset)) { 1820 + dev_err(pctl->dev, "pin %d not available.\n", offset); 1821 + return -EACCES; 1822 + } 2033 1823 2034 1824 pin_is_irq = gpiochip_line_is_irq(range->gc, offset); 2035 1825 2036 1826 if (!desc || (!pin_is_irq && !desc->gpio_owner)) 2037 1827 return 0; 2038 1828 2039 - bank = gpiochip_get_data(range->gc); 2040 - 2041 - alt = bank->pin_backup[offset] & STM32_GPIO_BKP_ALT_MASK; 2042 - alt >>= STM32_GPIO_BKP_ALT_SHIFT; 2043 - mode = bank->pin_backup[offset] & STM32_GPIO_BKP_MODE_MASK; 2044 - mode >>= STM32_GPIO_BKP_MODE_SHIFT; 2045 - 2046 - ret = stm32_pmx_set_mode(bank, offset, mode, alt); 1829 + mode = bank->pin_backup[offset].mode; 1830 + ret = stm32_pmx_set_mode(bank, offset, mode, bank->pin_backup[offset].alt); 2047 1831 if (ret) 2048 1832 return ret; 2049 1833 2050 - if (mode == 1) { 2051 - val = bank->pin_backup[offset] & BIT(STM32_GPIO_BKP_VAL); 2052 - val = val >> STM32_GPIO_BKP_VAL; 2053 - __stm32_gpio_set(bank, offset, val); 1834 + if (mode == 1) 1835 + __stm32_gpio_set(bank, offset, bank->pin_backup[offset].value); 1836 + 1837 + ret = stm32_pconf_set_driving(bank, offset, bank->pin_backup[offset].drive); 1838 + if (ret) 1839 + return ret; 1840 + 1841 + ret = stm32_pconf_set_speed(bank, offset, bank->pin_backup[offset].speed); 1842 + if (ret) 1843 + return ret; 1844 + 1845 + ret = stm32_pconf_set_bias(bank, offset, bank->pin_backup[offset].bias); 1846 + if (ret) 1847 + return ret; 1848 + 1849 + if (bank->io_sync_control) { 1850 + bool is_input = bank->pin_backup[offset].advcfg & STM32_GPIO_ADVCFGR_DLYPATH_MASK; 1851 + 1852 + ret = stm32_pconf_set_skew_delay(bank, offset, 1853 + bank->pin_backup[offset].skew_delay, 1854 + is_input); 1855 + if (ret) 1856 + return ret; 1857 + 1858 + ret = stm32_pconf_set_advcfgr(bank, offset, STM32_GPIO_ADVCFGR_IO_SYNC_MASK, 1859 + bank->pin_backup[offset].advcfg); 1860 + if (ret) 1861 + return ret; 2054 1862 } 2055 - 2056 - val = bank->pin_backup[offset] & BIT(STM32_GPIO_BKP_TYPE); 2057 - val >>= STM32_GPIO_BKP_TYPE; 2058 - ret = stm32_pconf_set_driving(bank, offset, val); 2059 - if (ret) 2060 - return ret; 2061 - 2062 - val = bank->pin_backup[offset] & STM32_GPIO_BKP_SPEED_MASK; 2063 - val >>= STM32_GPIO_BKP_SPEED_SHIFT; 2064 - ret = stm32_pconf_set_speed(bank, offset, val); 2065 - if (ret) 2066 - return ret; 2067 - 2068 - val = bank->pin_backup[offset] & STM32_GPIO_BKP_PUPD_MASK; 2069 - val >>= STM32_GPIO_BKP_PUPD_SHIFT; 2070 - ret = stm32_pconf_set_bias(bank, offset, val); 2071 - if (ret) 2072 - return ret; 2073 1863 2074 1864 if (pin_is_irq) 2075 1865 regmap_field_write(pctl->irqmux[offset], bank->bank_ioport_nr);
+1
drivers/pinctrl/stm32/pinctrl-stm32.h
··· 64 64 const struct stm32_desc_pin *pins; 65 65 const unsigned int npins; 66 66 bool secure_control; 67 + bool io_sync_control; 67 68 bool rif_control; 68 69 }; 69 70
+2
drivers/pinctrl/stm32/pinctrl-stm32mp257.c
··· 2543 2543 static struct stm32_pinctrl_match_data stm32mp257_match_data = { 2544 2544 .pins = stm32mp257_pins, 2545 2545 .npins = ARRAY_SIZE(stm32mp257_pins), 2546 + .io_sync_control = true, 2546 2547 .secure_control = true, 2547 2548 .rif_control = true, 2548 2549 }; ··· 2551 2550 static struct stm32_pinctrl_match_data stm32mp257_z_match_data = { 2552 2551 .pins = stm32mp257_z_pins, 2553 2552 .npins = ARRAY_SIZE(stm32mp257_z_pins), 2553 + .io_sync_control = true, 2554 2554 .secure_control = true, 2555 2555 .rif_control = true, 2556 2556 };
+9 -2
drivers/pinctrl/tegra/pinctrl-tegra20.c
··· 2222 2222 .drvtype_in_mux = false, 2223 2223 }; 2224 2224 2225 - static const char *cdev1_parents[] = { 2225 + static const char * const cdev1_parents[] = { 2226 2226 "dev1_osc_div", "pll_a_out0", "pll_m_out1", "audio", 2227 2227 }; 2228 2228 2229 - static const char *cdev2_parents[] = { 2229 + static const char * const cdev2_parents[] = { 2230 2230 "dev2_osc_div", "hclk", "pclk", "pll_p_out4", 2231 + }; 2232 + 2233 + static const char * const csus_parents[] = { 2234 + "pll_c_out1", "pll_p_out2", "pll_p_out3", "vi_sensor", 2231 2235 }; 2232 2236 2233 2237 static void tegra20_pinctrl_register_clock_muxes(struct platform_device *pdev) ··· 2243 2239 2244 2240 clk_register_mux(NULL, "cdev2_mux", cdev2_parents, 4, 0, 2245 2241 pmx->regs[1] + 0x8, 4, 2, CLK_MUX_READ_ONLY, NULL); 2242 + 2243 + clk_register_mux(NULL, "csus_mux", csus_parents, 4, 0, 2244 + pmx->regs[1] + 0x8, 6, 2, CLK_MUX_READ_ONLY, NULL); 2246 2245 } 2247 2246 2248 2247 static int tegra20_pinctrl_probe(struct platform_device *pdev)
+17 -2
include/linux/pinctrl/pinconf-generic.h
··· 112 112 * or latch delay (on outputs) this parameter (in a custom format) 113 113 * specifies the clock skew or latch delay. It typically controls how 114 114 * many double inverters are put in front of the line. 115 + * @PIN_CONFIG_SKEW_DELAY_INPUT_PS: if the pin has independent values for the 116 + * programmable skew rate (on inputs) and latch delay (on outputs), then 117 + * this parameter specifies the clock skew only. The argument is in ps. 118 + * @PIN_CONFIG_SKEW_DELAY_OUPUT_PS: if the pin has independent values for the 119 + * programmable skew rate (on inputs) and latch delay (on outputs), then 120 + * this parameter specifies the latch delay only. The argument is in ps. 115 121 * @PIN_CONFIG_SLEEP_HARDWARE_STATE: indicate this is sleep related state. 116 122 * @PIN_CONFIG_SLEW_RATE: if the pin can select slew rate, the argument to 117 123 * this parameter (on a custom format) tells the driver which alternative ··· 153 147 PIN_CONFIG_PERSIST_STATE, 154 148 PIN_CONFIG_POWER_SOURCE, 155 149 PIN_CONFIG_SKEW_DELAY, 150 + PIN_CONFIG_SKEW_DELAY_INPUT_PS, 151 + PIN_CONFIG_SKEW_DELAY_OUTPUT_PS, 156 152 PIN_CONFIG_SLEEP_HARDWARE_STATE, 157 153 PIN_CONFIG_SLEW_RATE, 158 154 PIN_CONFIG_END = 0x7F, ··· 189 181 return PIN_CONF_PACKED(param, argument); 190 182 } 191 183 192 - #define PCONFDUMP(a, b, c, d) { \ 193 - .param = a, .display = b, .format = c, .has_arg = d \ 184 + #define PCONFDUMP_WITH_VALUES(a, b, c, d, e, f) { \ 185 + .param = a, .display = b, .format = c, .has_arg = d, \ 186 + .values = e, .num_values = f \ 194 187 } 188 + 189 + #define PCONFDUMP(a, b, c, d) PCONFDUMP_WITH_VALUES(a, b, c, d, NULL, 0) 195 190 196 191 struct pin_config_item { 197 192 const enum pin_config_param param; 198 193 const char * const display; 199 194 const char * const format; 200 195 bool has_arg; 196 + const char * const *values; 197 + size_t num_values; 201 198 }; 202 199 203 200 struct pinconf_generic_params { 204 201 const char * const property; 205 202 enum pin_config_param param; 206 203 u32 default_value; 204 + const char * const *values; 205 + size_t num_values; 207 206 }; 208 207 209 208 int pinconf_generic_dt_subnode_to_map(struct pinctrl_dev *pctldev,
+10
include/linux/pinctrl/pinmux.h
··· 35 35 * name can be used with the generic @pinctrl_ops to retrieve the 36 36 * actual pins affected. The applicable groups will be returned in 37 37 * @groups and the number of groups in @num_groups 38 + * @function_is_gpio: determine if the indicated function selector passed 39 + * corresponds to the GPIO function which is used by the accelerated GPIO 40 + * functions @gpio_request_enable, @gpio_disable_free and 41 + * @gpio_set_direction. When the pin control core can properly determine 42 + * if a function is a GPIO function, it is easier to use the @strict mode 43 + * on the pin controller. Since a single function is passed, this is 44 + * only useful on pin controllers that use a specific function for GPIO, 45 + * and that usually presupposes that a one-group-per-pin approach is 46 + * used, so that a single function can be set on a single pin to turn 47 + * it to GPIO mode. 38 48 * @set_mux: enable a certain muxing function with a certain pin group. The 39 49 * driver does not need to figure out whether enabling this function 40 50 * conflicts some other use of the pins in that group, such collisions