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

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

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

Drivers, drivers and drivers. Not a single core change.

Some new stuff, especially a bunch of new Intel, Qualcomm and Ocelot
SoCs.

As part of the modularization attempt, I applied one patch affecting
the firmware subsystem as a functional (not syntactic/semantic)
dependency and then it blew up in our face, so I had to revert it,
bummer. It will come in later, through that subsystem, I guess.

New drivers:

- New driver for the Microchip Serial GPIO "SGPIO".

- Qualcomm SM8250 LPASS (Low Power Audio Subsystem) GPIO driver.

New subdrivers:

- Intel Lakefield subdriver.

- Intel Elkhart Lake subdriver.

- Intel Alder Lake-S subdriver.

- Qualcomm MSM8953 subdriver.

- Qualcomm SDX55 subdriver.

- Qualcomm SDX55 PMIC subdriver.

- Ocelot Luton SoC subdriver.

- Ocelot Serval SoC subdriver.

Modularization:

- The Meson driver can now be built as modules.

- The Qualcomm driver(s) can now be built as modules.

Incremental improvements:

- The Intel driver now supports pin configuration for GPIO-related
configurations.

- A bunch of Renesas PFC drivers have been augmented with support for
QSPI pins, groups and functions.

- Non-critical fixes to the irq handling in the Allwinner Sunxi
driver"

* tag 'pinctrl-v5.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: (80 commits)
pinctrl/spear: simplify the return expression of spear300_pinctrl_probe()
pinctrl: mediatek: simplify the return expression of mtk_pinconf_bias_disable_set_rev1()
dt-bindings: pinctrl: pinctrl-microchip-sgpio: Add irq support
pinctrl: pinctrl-microchip-sgpio: Add irq support (for sparx5)
pinctrl: qcom: Add sm8250 lpass lpi pinctrl driver
dt-bindings: pinctrl: qcom: Add sm8250 lpass lpi pinctrl bindings
pinctrl: qcom-pmic-gpio: Add support for pmx55
dt-bindings: pinctrl: qcom-pmic-gpio: Add pmx55 support
pinctrl: pinctrl-microchip-sgpio: Mark some symbols with static keyword
pinctrl: at91-pio4: Make PINCTRL_AT91PIO4 depend on HAS_IOMEM to fix build error
pinctrl: mtk: Fix low level output voltage issue
pinctrl: falcon: add missing put_device() call in pinctrl_falcon_probe()
pinctrl: actions: pinctrl-s500: Constify s500_padinfo[]
pinctrl: pinctrl-microchip-sgpio: Add OF config dependency
pinctrl: pinctrl-microchip-sgpio: Add pinctrl driver for Microsemi Serial GPIO
dt-bindings: pinctrl: Add bindings for pinctrl-microchip-sgpio driver
pinctrl: at91-pio4: add support for fewer lines on last PIO bank
pinctrl: sunxi: Always call chained_irq_{enter, exit} in sunxi_pinctrl_irq_handler
pinctrl: sunxi: Mark the irq bank not found in sunxi_pinctrl_irq_handler() with WARN_ON
pinctrl: sunxi: fix irq bank map for the Allwinner A100 pin controller
...

+9537 -1542
+161
Documentation/devicetree/bindings/pinctrl/microchip,sparx5-sgpio.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,sparx5-sgpio.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Microsemi/Microchip Serial GPIO controller 8 + 9 + maintainers: 10 + - Lars Povlsen <lars.povlsen@microchip.com> 11 + 12 + description: | 13 + By using a serial interface, the SIO controller significantly extend 14 + the number of available GPIOs with a minimum number of additional 15 + pins on the device. The primary purpose of the SIO controllers is to 16 + connect control signals from SFP modules and to act as an LED 17 + controller. 18 + 19 + properties: 20 + $nodename: 21 + pattern: "^gpio@[0-9a-f]+$" 22 + 23 + compatible: 24 + enum: 25 + - microchip,sparx5-sgpio 26 + - mscc,ocelot-sgpio 27 + - mscc,luton-sgpio 28 + 29 + "#address-cells": 30 + const: 1 31 + 32 + "#size-cells": 33 + const: 0 34 + 35 + reg: 36 + maxItems: 1 37 + 38 + clocks: 39 + maxItems: 1 40 + 41 + microchip,sgpio-port-ranges: 42 + description: This is a sequence of tuples, defining intervals of 43 + enabled ports in the serial input stream. The enabled ports must 44 + match the hardware configuration in order for signals to be 45 + properly written/read to/from the controller holding 46 + registers. Being tuples, then number of arguments must be 47 + even. The tuples mast be ordered (low, high) and are 48 + inclusive. 49 + $ref: /schemas/types.yaml#/definitions/uint32-matrix 50 + items: 51 + items: 52 + - description: | 53 + "low" indicates start bit number of range 54 + minimum: 0 55 + maximum: 31 56 + - description: | 57 + "high" indicates end bit number of range 58 + minimum: 0 59 + maximum: 31 60 + minItems: 1 61 + maxItems: 32 62 + 63 + bus-frequency: 64 + description: The sgpio controller frequency (Hz). This dictates 65 + the serial bitstream speed, which again affects the latency in 66 + getting control signals back and forth between external shift 67 + registers. The speed must be no larger than half the system 68 + clock, and larger than zero. 69 + default: 12500000 70 + 71 + patternProperties: 72 + "^gpio@[0-1]$": 73 + type: object 74 + properties: 75 + compatible: 76 + const: microchip,sparx5-sgpio-bank 77 + 78 + reg: 79 + description: | 80 + The GPIO bank number. "0" is designates the input pin bank, 81 + "1" the output bank. 82 + maxItems: 1 83 + 84 + gpio-controller: true 85 + 86 + '#gpio-cells': 87 + description: | 88 + Specifies the pin (port and bit) and flags. Note that the 89 + SGIO pin is defined by *2* numbers, a port number between 0 90 + and 31, and a bit index, 0 to 3. The maximum bit number is 91 + controlled indirectly by the "ngpios" property: (ngpios/32). 92 + const: 3 93 + 94 + interrupts: 95 + description: Specifies the sgpio IRQ (in parent controller) 96 + maxItems: 1 97 + 98 + interrupt-controller: true 99 + 100 + '#interrupt-cells': 101 + description: 102 + Specifies the pin (port and bit) and flags, as defined in 103 + defined in include/dt-bindings/interrupt-controller/irq.h 104 + const: 3 105 + 106 + ngpios: 107 + description: The numbers of GPIO's exposed. This must be a 108 + multiple of 32. 109 + minimum: 32 110 + maximum: 128 111 + 112 + required: 113 + - compatible 114 + - reg 115 + - gpio-controller 116 + - '#gpio-cells' 117 + - ngpios 118 + 119 + additionalProperties: false 120 + 121 + additionalProperties: false 122 + 123 + required: 124 + - compatible 125 + - reg 126 + - clocks 127 + - microchip,sgpio-port-ranges 128 + - "#address-cells" 129 + - "#size-cells" 130 + 131 + examples: 132 + - | 133 + #include <dt-bindings/interrupt-controller/arm-gic.h> 134 + sgpio2: gpio@1101059c { 135 + #address-cells = <1>; 136 + #size-cells = <0>; 137 + compatible = "microchip,sparx5-sgpio"; 138 + clocks = <&sys_clk>; 139 + pinctrl-0 = <&sgpio2_pins>; 140 + pinctrl-names = "default"; 141 + reg = <0x1101059c 0x100>; 142 + microchip,sgpio-port-ranges = <0 0>, <16 18>, <28 31>; 143 + bus-frequency = <25000000>; 144 + sgpio_in2: gpio@0 { 145 + reg = <0>; 146 + compatible = "microchip,sparx5-sgpio-bank"; 147 + gpio-controller; 148 + #gpio-cells = <3>; 149 + ngpios = <96>; 150 + interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>; 151 + interrupt-controller; 152 + #interrupt-cells = <3>; 153 + }; 154 + sgpio_out2: gpio@1 { 155 + compatible = "microchip,sparx5-sgpio-bank"; 156 + reg = <1>; 157 + gpio-controller; 158 + #gpio-cells = <3>; 159 + ngpios = <96>; 160 + }; 161 + };
+2 -1
Documentation/devicetree/bindings/pinctrl/mscc,ocelot-pinctrl.txt
··· 3 3 4 4 Required properties: 5 5 - compatible : Should be "mscc,ocelot-pinctrl", 6 - "mscc,jaguar2-pinctrl" or "microchip,sparx5-pinctrl" 6 + "mscc,jaguar2-pinctrl", "microchip,sparx5-pinctrl", 7 + "mscc,luton-pinctrl" or "mscc,serval-pinctrl" 7 8 - reg : Address and length of the register set for the device 8 9 - gpio-controller : Indicates this device is a GPIO controller 9 10 - #gpio-cells : Must be 2.
+130
Documentation/devicetree/bindings/pinctrl/qcom,lpass-lpi-pinctrl.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/pinctrl/qcom,lpass-lpi-pinctrl.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Qualcomm Technologies, Inc. Low Power Audio SubSystem (LPASS) 8 + Low Power Island (LPI) TLMM block 9 + 10 + maintainers: 11 + - Srinivas Kandagatla <srinivas.kandagatla@linaro.org> 12 + 13 + description: | 14 + This binding describes the Top Level Mode Multiplexer block found in the 15 + LPASS LPI IP on most Qualcomm SoCs 16 + 17 + properties: 18 + compatible: 19 + const: qcom,sm8250-lpass-lpi-pinctrl 20 + 21 + reg: 22 + minItems: 2 23 + maxItems: 2 24 + 25 + clocks: 26 + items: 27 + - description: LPASS Core voting clock 28 + - description: LPASS Audio voting clock 29 + 30 + clock-names: 31 + items: 32 + - const: core 33 + - const: audio 34 + 35 + gpio-controller: true 36 + 37 + '#gpio-cells': 38 + description: Specifying the pin number and flags, as defined in 39 + include/dt-bindings/gpio/gpio.h 40 + const: 2 41 + 42 + gpio-ranges: 43 + maxItems: 1 44 + 45 + #PIN CONFIGURATION NODES 46 + patternProperties: 47 + '-pins$': 48 + type: object 49 + description: 50 + Pinctrl node's client devices use subnodes for desired pin configuration. 51 + Client device subnodes use below standard properties. 52 + $ref: "/schemas/pinctrl/pincfg-node.yaml" 53 + 54 + properties: 55 + pins: 56 + description: 57 + List of gpio pins affected by the properties specified in this 58 + subnode. 59 + items: 60 + oneOf: 61 + - pattern: "^gpio([0-9]|[1-9][0-9])$" 62 + minItems: 1 63 + maxItems: 14 64 + 65 + function: 66 + enum: [ gpio, swr_tx_clk, qua_mi2s_sclk, swr_tx_data, qua_mi2s_ws, 67 + qua_mi2s_data, swr_rx_clk, swr_rx_data, dmic1_clk, i2s1_clk, 68 + dmic1_data, i2s1_ws, dmic2_clk, dmic2_data, i2s1_data, 69 + i2s2_clk, wsa_swr_clk, i2s2_ws, wsa_swr_data, dmic3_clk, 70 + dmic3_data, i2s2_data ] 71 + description: 72 + Specify the alternative function to be configured for the specified 73 + pins. 74 + 75 + drive-strength: 76 + enum: [2, 4, 6, 8, 10, 12, 14, 16] 77 + default: 2 78 + description: 79 + Selects the drive strength for the specified pins, in mA. 80 + 81 + slew-rate: 82 + enum: [0, 1, 2, 3] 83 + default: 0 84 + description: | 85 + 0: No adjustments 86 + 1: Higher Slew rate (faster edges) 87 + 2: Lower Slew rate (slower edges) 88 + 3: Reserved (No adjustments) 89 + 90 + bias-pull-down: true 91 + 92 + bias-pull-up: true 93 + 94 + bias-disable: true 95 + 96 + output-high: true 97 + 98 + output-low: true 99 + 100 + required: 101 + - pins 102 + - function 103 + 104 + additionalProperties: false 105 + 106 + required: 107 + - compatible 108 + - reg 109 + - clocks 110 + - clock-names 111 + - gpio-controller 112 + - '#gpio-cells' 113 + - gpio-ranges 114 + 115 + additionalProperties: false 116 + 117 + examples: 118 + - | 119 + #include <dt-bindings/sound/qcom,q6afe.h> 120 + lpi_tlmm: pinctrl@33c0000 { 121 + compatible = "qcom,sm8250-lpass-lpi-pinctrl"; 122 + reg = <0x33c0000 0x20000>, 123 + <0x3550000 0x10000>; 124 + clocks = <&q6afecc LPASS_HW_MACRO_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>, 125 + <&q6afecc LPASS_HW_DCODEC_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>; 126 + clock-names = "core", "audio"; 127 + gpio-controller; 128 + #gpio-cells = <2>; 129 + gpio-ranges = <&lpi_tlmm 0 0 14>; 130 + };
+167
Documentation/devicetree/bindings/pinctrl/qcom,msm8953-pinctrl.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/pinctrl/qcom,msm8953-pinctrl.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Qualcomm Technologies, Inc. MSM8953 TLMM block 8 + 9 + maintainers: 10 + - Bjorn Andersson <bjorn.andersson@linaro.org> 11 + 12 + description: | 13 + This binding describes the Top Level Mode Multiplexer block found in the 14 + MSM8953 platform. 15 + 16 + properties: 17 + compatible: 18 + const: qcom,msm8953-pinctrl 19 + 20 + reg: 21 + maxItems: 1 22 + 23 + interrupts: 24 + description: Specifies the TLMM summary IRQ 25 + maxItems: 1 26 + 27 + interrupt-controller: true 28 + 29 + '#interrupt-cells': 30 + description: 31 + Specifies the PIN numbers and Flags, as defined in defined in 32 + include/dt-bindings/interrupt-controller/irq.h 33 + const: 2 34 + 35 + gpio-controller: true 36 + 37 + '#gpio-cells': 38 + description: Specifying the pin number and flags, as defined in 39 + include/dt-bindings/gpio/gpio.h 40 + const: 2 41 + 42 + gpio-ranges: 43 + maxItems: 1 44 + 45 + #PIN CONFIGURATION NODES 46 + patternProperties: 47 + '-pins$': 48 + type: object 49 + description: 50 + Pinctrl node's client devices use subnodes for desired pin configuration. 51 + Client device subnodes use below standard properties. 52 + $ref: "/schemas/pinctrl/pincfg-node.yaml" 53 + 54 + properties: 55 + pins: 56 + description: 57 + List of gpio pins affected by the properties specified in this 58 + subnode. 59 + items: 60 + oneOf: 61 + - pattern: "^gpio([0-9]|[1-9][0-9]|1[0-7][0-9])$" 62 + - enum: [ sdc1_clk, sdc1_cmd, sdc1_data, sdc1_rclk, sdc2_clk, 63 + sdc2_cmd, sdc2_data, qdsd_clk, qdsd_cmd, qdsd_data0, 64 + qdsd_data1, qdsd_data2, qdsd_data3 ] 65 + minItems: 1 66 + maxItems: 16 67 + 68 + function: 69 + description: 70 + Specify the alternative function to be configured for the specified 71 + pins. 72 + 73 + enum: [ accel_int, adsp_ext, alsp_int, atest_bbrx0, atest_bbrx1, 74 + atest_char, atest_char0, atest_char1, atest_char2, atest_char3, 75 + atest_gpsadc_dtest0_native, atest_gpsadc_dtest1_native, atest_tsens, 76 + atest_wlan0, atest_wlan1, bimc_dte0, bimc_dte1, blsp1_spi, 77 + blsp3_spi, blsp6_spi, blsp7_spi, blsp_i2c1, blsp_i2c2, blsp_i2c3, 78 + blsp_i2c4, blsp_i2c5, blsp_i2c6, blsp_i2c7, blsp_i2c8, blsp_spi1, 79 + blsp_spi2, blsp_spi3, blsp_spi4, blsp_spi5, blsp_spi6, blsp_spi7, 80 + blsp_spi8, blsp_uart2, blsp_uart4, blsp_uart5, blsp_uart6, cam0_ldo, 81 + cam1_ldo, cam1_rst, cam1_standby, cam2_rst, cam2_standby, cam3_rst, 82 + cam3_standby, cam_irq, cam_mclk, cap_int, cci_async, cci_i2c, 83 + cci_timer0, cci_timer1, cci_timer2, cci_timer3, cci_timer4, 84 + cdc_pdm0, codec_int1, codec_int2, codec_reset, cri_trng, cri_trng0, 85 + cri_trng1, dac_calib0, dac_calib1, dac_calib10, dac_calib11, 86 + dac_calib12, dac_calib13, dac_calib14, dac_calib15, dac_calib16, 87 + dac_calib17, dac_calib18, dac_calib19, dac_calib2, dac_calib20, 88 + dac_calib21, dac_calib22, dac_calib23, dac_calib24, dac_calib25, 89 + dac_calib3, dac_calib4, dac_calib5, dac_calib6, dac_calib7, 90 + dac_calib8, dac_calib9, dbg_out, ddr_bist, dmic0_clk, dmic0_data, 91 + ebi_cdc, ebi_ch0, ext_lpass, flash_strobe, fp_int, gcc_gp1_clk_a, 92 + gcc_gp1_clk_b, gcc_gp2_clk_a, gcc_gp2_clk_b, gcc_gp3_clk_a, 93 + gcc_gp3_clk_b, gcc_plltest, gcc_tlmm, gpio, gsm0_tx, gsm1_tx, 94 + gyro_int, hall_int, hdmi_int, key_focus, key_home, key_snapshot, 95 + key_volp, ldo_en, ldo_update, lpass_slimbus, lpass_slimbus0, 96 + lpass_slimbus1, m_voc, mag_int, mdp_vsync, mipi_dsi0, modem_tsync, 97 + mss_lte, nav_pps, nav_pps_in_a, nav_pps_in_b, nav_tsync, 98 + nfc_disable, nfc_dwl, nfc_irq, ois_sync, pa_indicator, pbs0, pbs1, 99 + pbs2, pressure_int, pri_mi2s, pri_mi2s_mclk_a, pri_mi2s_mclk_b, 100 + pri_mi2s_ws, prng_rosc, pwr_crypto_enabled_a, pwr_crypto_enabled_b, 101 + pwr_down, pwr_modem_enabled_a, pwr_modem_enabled_b, 102 + pwr_nav_enabled_a, pwr_nav_enabled_b, qdss_cti_trig_in_a0, 103 + qdss_cti_trig_in_a1, qdss_cti_trig_in_b0, qdss_cti_trig_in_b1, 104 + qdss_cti_trig_out_a0, qdss_cti_trig_out_a1, qdss_cti_trig_out_b0, 105 + qdss_cti_trig_out_b1, qdss_traceclk_a, qdss_traceclk_b, 106 + qdss_tracectl_a, qdss_tracectl_b, qdss_tracedata_a, 107 + qdss_tracedata_b, sd_write, sdcard_det, sec_mi2s, sec_mi2s_mclk_a, 108 + sec_mi2s_mclk_b, smb_int, ss_switch, ssbi_wtr1, ts_resout, 109 + ts_sample, ts_xvdd, tsens_max, uim1_clk, uim1_data, uim1_present, 110 + uim1_reset, uim2_clk, uim2_data, uim2_present, uim2_reset, 111 + uim_batt, us_emitter, us_euro, wcss_bt, wcss_fm, wcss_wlan, 112 + wcss_wlan0, wcss_wlan1, wcss_wlan2, wsa_en, wsa_io, wsa_irq ] 113 + 114 + drive-strength: 115 + enum: [2, 4, 6, 8, 10, 12, 14, 16] 116 + default: 2 117 + description: 118 + Selects the drive strength for the specified pins, in mA. 119 + 120 + bias-pull-down: true 121 + 122 + bias-pull-up: true 123 + 124 + bias-disable: true 125 + 126 + output-high: true 127 + 128 + output-low: true 129 + 130 + required: 131 + - pins 132 + - function 133 + 134 + additionalProperties: false 135 + 136 + required: 137 + - compatible 138 + - reg 139 + - interrupts 140 + - interrupt-controller 141 + - '#interrupt-cells' 142 + - gpio-controller 143 + - '#gpio-cells' 144 + - gpio-ranges 145 + 146 + additionalProperties: false 147 + 148 + examples: 149 + - | 150 + #include <dt-bindings/interrupt-controller/arm-gic.h> 151 + tlmm: pinctrl@1000000 { 152 + compatible = "qcom,msm8953-pinctrl"; 153 + reg = <0x01000000 0x300000>; 154 + interrupts = <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>; 155 + interrupt-controller; 156 + #interrupt-cells = <2>; 157 + gpio-controller; 158 + #gpio-cells = <2>; 159 + gpio-ranges = <&tlmm 0 0 142>; 160 + 161 + serial_default: serial-pins { 162 + pins = "gpio4", "gpio5"; 163 + function = "blsp_uart2"; 164 + drive-strength = <2>; 165 + bias-disable; 166 + }; 167 + };
+3
Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.txt
··· 29 29 "qcom,pm8150b-gpio" 30 30 "qcom,pm6150-gpio" 31 31 "qcom,pm6150l-gpio" 32 + "qcom,pmx55-gpio" 32 33 33 34 And must contain either "qcom,spmi-gpio" or "qcom,ssbi-gpio" 34 35 if the device is on an spmi bus or an ssbi bus respectively ··· 111 110 gpio1-gpio12 for pm8150l (hole on gpio7) 112 111 gpio1-gpio10 for pm6150 113 112 gpio1-gpio12 for pm6150l 113 + gpio1-gpio11 for pmx55 (holes on gpio3, gpio7, gpio10 114 + and gpio11) 114 115 115 116 - function: 116 117 Usage: required
+158
Documentation/devicetree/bindings/pinctrl/qcom,sc7280-pinctrl.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/pinctrl/qcom,sc7280-pinctrl.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Qualcomm Technologies, Inc. SC7280 TLMM block 8 + 9 + maintainers: 10 + - Rajendra Nayak <rnayak@codeaurora.org> 11 + 12 + description: | 13 + This binding describes the Top Level Mode Multiplexer block found in the 14 + SC7280 platform. 15 + 16 + properties: 17 + compatible: 18 + const: qcom,sc7280-pinctrl 19 + 20 + reg: 21 + maxItems: 1 22 + 23 + interrupts: 24 + description: Specifies the TLMM summary IRQ 25 + maxItems: 1 26 + 27 + interrupt-controller: true 28 + 29 + '#interrupt-cells': 30 + description: 31 + Specifies the PIN numbers and Flags, as defined in defined in 32 + include/dt-bindings/interrupt-controller/irq.h 33 + const: 2 34 + 35 + gpio-controller: true 36 + 37 + '#gpio-cells': 38 + description: Specifying the pin number and flags, as defined in 39 + include/dt-bindings/gpio/gpio.h 40 + const: 2 41 + 42 + gpio-ranges: 43 + maxItems: 1 44 + 45 + wakeup-parent: 46 + maxItems: 1 47 + 48 + #PIN CONFIGURATION NODES 49 + patternProperties: 50 + '-pins$': 51 + type: object 52 + description: 53 + Pinctrl node's client devices use subnodes for desired pin configuration. 54 + Client device subnodes use below standard properties. 55 + $ref: "/schemas/pinctrl/pincfg-node.yaml" 56 + 57 + properties: 58 + pins: 59 + description: 60 + List of gpio pins affected by the properties specified in this 61 + subnode. 62 + items: 63 + oneOf: 64 + - pattern: "^gpio([0-9]|[1-9][0-9]|1[0-7][0-4])$" 65 + - enum: [ sdc1_rclk, sdc1_clk, sdc1_cmd, sdc1_data, sdc2_clk, 66 + sdc2_cmd, sdc2_data, ufs_reset ] 67 + minItems: 1 68 + maxItems: 16 69 + 70 + function: 71 + description: 72 + Specify the alternative function to be configured for the specified 73 + pins. 74 + 75 + enum: [ atest_char, atest_char0, atest_char1, atest_char2, 76 + atest_char3, atest_usb0, atest_usb00, atest_usb01, 77 + atest_usb02, atest_usb03, atest_usb1, atest_usb10, 78 + atest_usb11, atest_usb12, atest_usb13, audio_ref, 79 + cam_mclk, cci_async, cci_i2c, cci_timer0, cci_timer1, 80 + cci_timer2, cci_timer3, cci_timer4, cmu_rng0, cmu_rng1, 81 + cmu_rng2, cmu_rng3, coex_uart1, cri_trng, cri_trng0, 82 + cri_trng1, dbg_out, ddr_bist, ddr_pxi0, ddr_pxi1, dp_hot, 83 + dp_lcd, edp_hot, edp_lcd, gcc_gp1, gcc_gp2, gcc_gp3, 84 + gpio, host2wlan_sol, ibi_i3c, jitter_bist, lpass_slimbus, 85 + mdp_vsync, mdp_vsync0, mdp_vsync1, mdp_vsync2, mdp_vsync3, 86 + mdp_vsync4, mdp_vsync5, mi2s0_data0, mi2s0_data1, mi2s0_sck, 87 + mi2s0_ws, mi2s1_data0, mi2s1_data1, mi2s1_sck, mi2s1_ws, 88 + mi2s2_data0, mi2s2_data1, mi2s2_sck, mi2s2_ws, mss_grfc0, 89 + mss_grfc1, mss_grfc10, mss_grfc11, mss_grfc12, mss_grfc2, 90 + mss_grfc3, mss_grfc4, mss_grfc5, mss_grfc6, mss_grfc7, 91 + mss_grfc8, mss_grfc9, nav_gpio0, nav_gpio1, nav_gpio2, 92 + pa_indicator, pcie0_clkreqn, pcie1_clkreqn, phase_flag, 93 + pll_bist, pll_bypassnl, pll_clk, pll_reset, pri_mi2s, prng_rosc, 94 + qdss, qdss_cti, qlink0_enable, qlink0_request, qlink0_wmss, 95 + qlink1_enable, qlink1_request, qlink1_wmss, qspi_clk, qspi_cs, 96 + qspi_data, qup00, qup01, qup02, qup03, qup04, qup05, qup06, qup07, 97 + qup10, qup11, qup12, qup13, qup14, qup15, qup16, qup17, 98 + sdc40, sdc41, sdc42, sdc43, sdc4_clk, sdc4_cmd, sd_write, 99 + sec_mi2s, tb_trig, tgu_ch0, tgu_ch1, tsense_pwm1, 100 + tsense_pwm2, uim0_clk, uim0_data, uim0_present, uim0_reset, 101 + uim1_clk, uim1_data, uim1_present, uim1_reset, usb2phy_ac, 102 + usb_phy, vfr_0, vfr_1, vsense_trigger ] 103 + 104 + drive-strength: 105 + enum: [2, 4, 6, 8, 10, 12, 14, 16] 106 + default: 2 107 + description: 108 + Selects the drive strength for the specified pins, in mA. 109 + 110 + bias-pull-down: true 111 + 112 + bias-pull-up: true 113 + 114 + bias-disable: true 115 + 116 + output-high: true 117 + 118 + output-low: true 119 + 120 + required: 121 + - pins 122 + - function 123 + 124 + additionalProperties: false 125 + 126 + required: 127 + - compatible 128 + - reg 129 + - interrupts 130 + - interrupt-controller 131 + - '#interrupt-cells' 132 + - gpio-controller 133 + - '#gpio-cells' 134 + - gpio-ranges 135 + 136 + additionalProperties: false 137 + 138 + examples: 139 + - | 140 + #include <dt-bindings/interrupt-controller/arm-gic.h> 141 + tlmm: pinctrl@f000000 { 142 + compatible = "qcom,sc7280-pinctrl"; 143 + reg = <0xf000000 0x1000000>; 144 + interrupts = <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>; 145 + gpio-controller; 146 + #gpio-cells = <2>; 147 + interrupt-controller; 148 + #interrupt-cells = <2>; 149 + gpio-ranges = <&tlmm 0 0 175>; 150 + wakeup-parent = <&pdc>; 151 + 152 + qup_uart5_default: qup-uart5-pins { 153 + pins = "gpio46", "gpio47"; 154 + function = "qup13"; 155 + drive-strength = <2>; 156 + bias-disable; 157 + }; 158 + };
+154
Documentation/devicetree/bindings/pinctrl/qcom,sdx55-pinctrl.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/pinctrl/qcom,sdx55-pinctrl.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Qualcomm Technologies, Inc. SDX55 TLMM block 8 + 9 + maintainers: 10 + - Vinod Koul <vkoul@kernel.org> 11 + 12 + description: | 13 + This binding describes the Top Level Mode Multiplexer block found in the 14 + SDX55 platform. 15 + 16 + properties: 17 + compatible: 18 + const: qcom,sdx55-pinctrl 19 + 20 + reg: 21 + description: Specifies the base address and size of the TLMM register space 22 + maxItems: 1 23 + 24 + interrupts: 25 + description: Specifies the TLMM summary IRQ 26 + maxItems: 1 27 + 28 + interrupt-controller: true 29 + 30 + '#interrupt-cells': 31 + description: Specifies the PIN numbers and Flags, as defined in 32 + include/dt-bindings/interrupt-controller/irq.h 33 + const: 2 34 + 35 + gpio-controller: true 36 + 37 + '#gpio-cells': 38 + description: Specifying the pin number and flags, as defined in 39 + include/dt-bindings/gpio/gpio.h 40 + const: 2 41 + 42 + gpio-ranges: 43 + maxItems: 1 44 + 45 + gpio-reserved-ranges: 46 + maxItems: 1 47 + 48 + #PIN CONFIGURATION NODES 49 + patternProperties: 50 + '-pins$': 51 + type: object 52 + description: 53 + Pinctrl node's client devices use subnodes for desired pin configuration. 54 + Client device subnodes use below standard properties. 55 + $ref: "/schemas/pinctrl/pincfg-node.yaml" 56 + 57 + properties: 58 + pins: 59 + description: 60 + List of gpio pins affected by the properties specified in this subnode. 61 + items: 62 + oneOf: 63 + - pattern: "^gpio([0-9]|[1-9][0-9]|1[0-1][0-6])$" 64 + - enum: [ sdc1_clk, sdc1_cmd, sdc1_data, sdc2_clk, sdc2_cmd, sdc2_data ] 65 + minItems: 1 66 + maxItems: 36 67 + 68 + function: 69 + description: 70 + Specify the alternative function to be configured for the specified 71 + pins. Functions are only valid for gpio pins. 72 + enum: [ adsp_ext, atest, audio_ref, bimc_dte0, bimc_dte1, blsp_i2c1, 73 + blsp_i2c2, blsp_i2c3, blsp_i2c4, blsp_spi1, blsp_spi2, 74 + blsp_spi3, blsp_spi4, blsp_uart1, blsp_uart2, blsp_uart3, 75 + blsp_uart4, char_exec, coex_uart, coex_uart2, cri_trng, 76 + cri_trng0, cri_trng1, dbg_out, ddr_bist, ddr_pxi0, 77 + ebi0_wrcdc, ebi2_a, ebi2_lcd, emac_gcc0, emac_gcc1, 78 + emac_pps0, emac_pps1, ext_dbg, gcc_gp1, gcc_gp2, gcc_gp3, 79 + gcc_plltest, gpio, i2s_mclk, jitter_bist, ldo_en, ldo_update, 80 + mgpi_clk, m_voc, native_char, native_char0, native_char1, 81 + native_char2, native_char3, native_tsens, native_tsense, 82 + nav_gpio, pa_indicator, pcie_clkreq, pci_e, pll_bist, pll_ref, 83 + pll_test, pri_mi2s, prng_rosc, qdss_cti, qdss_gpio, 84 + qdss_gpio0, qdss_gpio1, qdss_gpio2, qdss_gpio3, qdss_gpio4, 85 + qdss_gpio5, qdss_gpio6, qdss_gpio7, qdss_gpio8, qdss_gpio9, 86 + qdss_gpio10, qdss_gpio11, qdss_gpio12, qdss_gpio13, 87 + qdss_gpio14, qdss_gpio15, qdss_stm0, qdss_stm1, qdss_stm2, 88 + qdss_stm3, qdss_stm4, qdss_stm5, qdss_stm6, qdss_stm7, 89 + qdss_stm8, qdss_stm9, qdss_stm10, qdss_stm11, qdss_stm12, 90 + qdss_stm13, qdss_stm14, qdss_stm15, qdss_stm16, qdss_stm17, 91 + qdss_stm18, qdss_stm19, qdss_stm20, qdss_stm21, qdss_stm22, 92 + qdss_stm23, qdss_stm24, qdss_stm25, qdss_stm26, qdss_stm27, 93 + qdss_stm28, qdss_stm29, qdss_stm30, qdss_stm31, qlink0_en, 94 + qlink0_req, qlink0_wmss, qlink1_en, qlink1_req, qlink1_wmss, 95 + spmi_coex, sec_mi2s, spmi_vgi, tgu_ch0, uim1_clk, uim1_data, 96 + uim1_present, uim1_reset, uim2_clk, uim2_data, uim2_present, 97 + uim2_reset, usb2phy_ac, vsense_trigger ] 98 + 99 + drive-strength: 100 + enum: [2, 4, 6, 8, 10, 12, 14, 16] 101 + default: 2 102 + description: 103 + Selects the drive strength for the specified pins, in mA. 104 + 105 + bias-pull-down: true 106 + 107 + bias-pull-up: true 108 + 109 + bias-disable: true 110 + 111 + output-high: true 112 + 113 + output-low: true 114 + 115 + required: 116 + - pins 117 + - function 118 + 119 + additionalProperties: false 120 + 121 + required: 122 + - compatible 123 + - reg 124 + - interrupts 125 + - interrupt-controller 126 + - '#interrupt-cells' 127 + - gpio-controller 128 + - '#gpio-cells' 129 + - gpio-ranges 130 + 131 + additionalProperties: false 132 + 133 + examples: 134 + - | 135 + #include <dt-bindings/interrupt-controller/arm-gic.h> 136 + tlmm: pinctrl@1f00000 { 137 + compatible = "qcom,sdx55-pinctrl"; 138 + reg = <0x0f100000 0x300000>; 139 + gpio-controller; 140 + #gpio-cells = <2>; 141 + gpio-ranges = <&tlmm 0 0 108>; 142 + interrupt-controller; 143 + #interrupt-cells = <2>; 144 + interrupts = <GIC_SPI 212 IRQ_TYPE_LEVEL_HIGH>; 145 + 146 + serial-pins { 147 + pins = "gpio8", "gpio9"; 148 + function = "blsp_uart3"; 149 + drive-strength = <8>; 150 + bias-disable; 151 + }; 152 + }; 153 + 154 + ...
+1
MAINTAINERS
··· 2116 2116 S: Supported 2117 2117 T: git git://github.com/microchip-ung/linux-upstream.git 2118 2118 F: arch/arm64/boot/dts/microchip/ 2119 + F: drivers/pinctrl/pinctrl-microchip-sgpio.c 2119 2120 N: sparx5 2120 2121 2121 2122 Microchip Timer Counter Block (TCB) Capture Driver
+1
arch/arm64/configs/defconfig
··· 483 483 CONFIG_PINCTRL_IMX8MQ=y 484 484 CONFIG_PINCTRL_IMX8QXP=y 485 485 CONFIG_PINCTRL_IMX8DXL=y 486 + CONFIG_PINCTRL_MSM=y 486 487 CONFIG_PINCTRL_IPQ8074=y 487 488 CONFIG_PINCTRL_IPQ6018=y 488 489 CONFIG_PINCTRL_MSM8916=y
+20
drivers/pinctrl/Kconfig
··· 82 82 config PINCTRL_AT91PIO4 83 83 bool "AT91 PIO4 pinctrl driver" 84 84 depends on OF 85 + depends on HAS_IOMEM 85 86 depends on ARCH_AT91 || COMPILE_TEST 86 87 select PINMUX 87 88 select GENERIC_PINCONF ··· 374 373 select GENERIC_PINMUX_FUNCTIONS 375 374 select OF_GPIO 376 375 select REGMAP_MMIO 376 + 377 + config PINCTRL_MICROCHIP_SGPIO 378 + bool "Pinctrl driver for Microsemi/Microchip Serial GPIO" 379 + depends on OF 380 + depends on HAS_IOMEM 381 + select GPIOLIB 382 + select GPIOLIB_IRQCHIP 383 + select GENERIC_PINCONF 384 + select GENERIC_PINCTRL_GROUPS 385 + select GENERIC_PINMUX_FUNCTIONS 386 + select OF_GPIO 387 + help 388 + Support for the serial GPIO interface used on Microsemi and 389 + Microchip SoC's. By using a serial interface, the SIO 390 + controller significantly extends the number of available 391 + GPIOs with a minimum number of additional pins on the 392 + device. The primary purpose of the SIO controller is to 393 + connect control signals from SFP modules and to act as an 394 + LED controller. 377 395 378 396 source "drivers/pinctrl/actions/Kconfig" 379 397 source "drivers/pinctrl/aspeed/Kconfig"
+1
drivers/pinctrl/Makefile
··· 46 46 obj-$(CONFIG_PINCTRL_INGENIC) += pinctrl-ingenic.o 47 47 obj-$(CONFIG_PINCTRL_RK805) += pinctrl-rk805.o 48 48 obj-$(CONFIG_PINCTRL_OCELOT) += pinctrl-ocelot.o 49 + obj-$(CONFIG_PINCTRL_MICROCHIP_SGPIO) += pinctrl-microchip-sgpio.o 49 50 obj-$(CONFIG_PINCTRL_EQUILIBRIUM) += pinctrl-equilibrium.o 50 51 51 52 obj-y += actions/
+1 -1
drivers/pinctrl/actions/pinctrl-s500.c
··· 1485 1485 static PAD_PULLCTL_CONF(DNAND_D7, 2, 2, 1); 1486 1486 1487 1487 /* Pad info table */ 1488 - static struct owl_padinfo s500_padinfo[NUM_PADS] = { 1488 + static const struct owl_padinfo s500_padinfo[NUM_PADS] = { 1489 1489 [DNAND_DQS] = PAD_INFO_PULLCTL(DNAND_DQS), 1490 1490 [DNAND_DQSN] = PAD_INFO_PULLCTL(DNAND_DQSN), 1491 1491 [ETH_TXD0] = PAD_INFO_ST(ETH_TXD0),
+2
drivers/pinctrl/core.c
··· 1602 1602 struct pinctrl_dev *pctldev = s->private; 1603 1603 const struct pinctrl_ops *ops = pctldev->desc->pctlops; 1604 1604 unsigned i, pin; 1605 + #ifdef CONFIG_GPIOLIB 1605 1606 struct pinctrl_gpio_range *range; 1606 1607 unsigned int gpio_num; 1607 1608 struct gpio_chip *chip; 1609 + #endif 1608 1610 1609 1611 seq_printf(s, "registered pins: %d\n", pctldev->desc->npins); 1610 1612
-7
drivers/pinctrl/freescale/Kconfig
··· 24 24 help 25 25 Say Y here to enable the imx1 pinctrl driver 26 26 27 - config PINCTRL_IMX21 28 - bool "i.MX21 pinctrl driver" 29 - depends on SOC_IMX21 30 - select PINCTRL_IMX1_CORE 31 - help 32 - Say Y here to enable the i.MX21 pinctrl driver 33 - 34 27 config PINCTRL_IMX27 35 28 bool "IMX27 pinctrl driver" 36 29 depends on SOC_IMX27
-1
drivers/pinctrl/freescale/Makefile
··· 4 4 obj-$(CONFIG_PINCTRL_IMX_SCU) += pinctrl-scu.o 5 5 obj-$(CONFIG_PINCTRL_IMX1_CORE) += pinctrl-imx1-core.o 6 6 obj-$(CONFIG_PINCTRL_IMX1) += pinctrl-imx1.o 7 - obj-$(CONFIG_PINCTRL_IMX21) += pinctrl-imx21.o 8 7 obj-$(CONFIG_PINCTRL_IMX27) += pinctrl-imx27.o 9 8 obj-$(CONFIG_PINCTRL_IMX35) += pinctrl-imx35.o 10 9 obj-$(CONFIG_PINCTRL_IMX50) += pinctrl-imx50.o
-330
drivers/pinctrl/freescale/pinctrl-imx21.c
··· 1 - // SPDX-License-Identifier: GPL-2.0+ 2 - // 3 - // i.MX21 pinctrl driver based on imx pinmux core 4 - // 5 - // Copyright (C) 2014 Alexander Shiyan <shc_work@mail.ru> 6 - 7 - #include <linux/init.h> 8 - #include <linux/of.h> 9 - #include <linux/platform_device.h> 10 - #include <linux/pinctrl/pinctrl.h> 11 - 12 - #include "pinctrl-imx1.h" 13 - 14 - #define PAD_ID(port, pin) ((port) * 32 + (pin)) 15 - #define PA 0 16 - #define PB 1 17 - #define PC 2 18 - #define PD 3 19 - #define PE 4 20 - #define PF 5 21 - 22 - enum imx21_pads { 23 - MX21_PAD_LSCLK = PAD_ID(PA, 5), 24 - MX21_PAD_LD0 = PAD_ID(PA, 6), 25 - MX21_PAD_LD1 = PAD_ID(PA, 7), 26 - MX21_PAD_LD2 = PAD_ID(PA, 8), 27 - MX21_PAD_LD3 = PAD_ID(PA, 9), 28 - MX21_PAD_LD4 = PAD_ID(PA, 10), 29 - MX21_PAD_LD5 = PAD_ID(PA, 11), 30 - MX21_PAD_LD6 = PAD_ID(PA, 12), 31 - MX21_PAD_LD7 = PAD_ID(PA, 13), 32 - MX21_PAD_LD8 = PAD_ID(PA, 14), 33 - MX21_PAD_LD9 = PAD_ID(PA, 15), 34 - MX21_PAD_LD10 = PAD_ID(PA, 16), 35 - MX21_PAD_LD11 = PAD_ID(PA, 17), 36 - MX21_PAD_LD12 = PAD_ID(PA, 18), 37 - MX21_PAD_LD13 = PAD_ID(PA, 19), 38 - MX21_PAD_LD14 = PAD_ID(PA, 20), 39 - MX21_PAD_LD15 = PAD_ID(PA, 21), 40 - MX21_PAD_LD16 = PAD_ID(PA, 22), 41 - MX21_PAD_LD17 = PAD_ID(PA, 23), 42 - MX21_PAD_REV = PAD_ID(PA, 24), 43 - MX21_PAD_CLS = PAD_ID(PA, 25), 44 - MX21_PAD_PS = PAD_ID(PA, 26), 45 - MX21_PAD_SPL_SPR = PAD_ID(PA, 27), 46 - MX21_PAD_HSYNC = PAD_ID(PA, 28), 47 - MX21_PAD_VSYNC = PAD_ID(PA, 29), 48 - MX21_PAD_CONTRAST = PAD_ID(PA, 30), 49 - MX21_PAD_OE_ACD = PAD_ID(PA, 31), 50 - MX21_PAD_SD2_D0 = PAD_ID(PB, 4), 51 - MX21_PAD_SD2_D1 = PAD_ID(PB, 5), 52 - MX21_PAD_SD2_D2 = PAD_ID(PB, 6), 53 - MX21_PAD_SD2_D3 = PAD_ID(PB, 7), 54 - MX21_PAD_SD2_CMD = PAD_ID(PB, 8), 55 - MX21_PAD_SD2_CLK = PAD_ID(PB, 9), 56 - MX21_PAD_CSI_D0 = PAD_ID(PB, 10), 57 - MX21_PAD_CSI_D1 = PAD_ID(PB, 11), 58 - MX21_PAD_CSI_D2 = PAD_ID(PB, 12), 59 - MX21_PAD_CSI_D3 = PAD_ID(PB, 13), 60 - MX21_PAD_CSI_D4 = PAD_ID(PB, 14), 61 - MX21_PAD_CSI_MCLK = PAD_ID(PB, 15), 62 - MX21_PAD_CSI_PIXCLK = PAD_ID(PB, 16), 63 - MX21_PAD_CSI_D5 = PAD_ID(PB, 17), 64 - MX21_PAD_CSI_D6 = PAD_ID(PB, 18), 65 - MX21_PAD_CSI_D7 = PAD_ID(PB, 19), 66 - MX21_PAD_CSI_VSYNC = PAD_ID(PB, 20), 67 - MX21_PAD_CSI_HSYNC = PAD_ID(PB, 21), 68 - MX21_PAD_USB_BYP = PAD_ID(PB, 22), 69 - MX21_PAD_USB_PWR = PAD_ID(PB, 23), 70 - MX21_PAD_USB_OC = PAD_ID(PB, 24), 71 - MX21_PAD_USBH_ON = PAD_ID(PB, 25), 72 - MX21_PAD_USBH1_FS = PAD_ID(PB, 26), 73 - MX21_PAD_USBH1_OE = PAD_ID(PB, 27), 74 - MX21_PAD_USBH1_TXDM = PAD_ID(PB, 28), 75 - MX21_PAD_USBH1_TXDP = PAD_ID(PB, 29), 76 - MX21_PAD_USBH1_RXDM = PAD_ID(PB, 30), 77 - MX21_PAD_USBH1_RXDP = PAD_ID(PB, 31), 78 - MX21_PAD_USBG_SDA = PAD_ID(PC, 5), 79 - MX21_PAD_USBG_SCL = PAD_ID(PC, 6), 80 - MX21_PAD_USBG_ON = PAD_ID(PC, 7), 81 - MX21_PAD_USBG_FS = PAD_ID(PC, 8), 82 - MX21_PAD_USBG_OE = PAD_ID(PC, 9), 83 - MX21_PAD_USBG_TXDM = PAD_ID(PC, 10), 84 - MX21_PAD_USBG_TXDP = PAD_ID(PC, 11), 85 - MX21_PAD_USBG_RXDM = PAD_ID(PC, 12), 86 - MX21_PAD_USBG_RXDP = PAD_ID(PC, 13), 87 - MX21_PAD_TOUT = PAD_ID(PC, 14), 88 - MX21_PAD_TIN = PAD_ID(PC, 15), 89 - MX21_PAD_SAP_FS = PAD_ID(PC, 16), 90 - MX21_PAD_SAP_RXD = PAD_ID(PC, 17), 91 - MX21_PAD_SAP_TXD = PAD_ID(PC, 18), 92 - MX21_PAD_SAP_CLK = PAD_ID(PC, 19), 93 - MX21_PAD_SSI1_FS = PAD_ID(PC, 20), 94 - MX21_PAD_SSI1_RXD = PAD_ID(PC, 21), 95 - MX21_PAD_SSI1_TXD = PAD_ID(PC, 22), 96 - MX21_PAD_SSI1_CLK = PAD_ID(PC, 23), 97 - MX21_PAD_SSI2_FS = PAD_ID(PC, 24), 98 - MX21_PAD_SSI2_RXD = PAD_ID(PC, 25), 99 - MX21_PAD_SSI2_TXD = PAD_ID(PC, 26), 100 - MX21_PAD_SSI2_CLK = PAD_ID(PC, 27), 101 - MX21_PAD_SSI3_FS = PAD_ID(PC, 28), 102 - MX21_PAD_SSI3_RXD = PAD_ID(PC, 29), 103 - MX21_PAD_SSI3_TXD = PAD_ID(PC, 30), 104 - MX21_PAD_SSI3_CLK = PAD_ID(PC, 31), 105 - MX21_PAD_I2C_DATA = PAD_ID(PD, 17), 106 - MX21_PAD_I2C_CLK = PAD_ID(PD, 18), 107 - MX21_PAD_CSPI2_SS2 = PAD_ID(PD, 19), 108 - MX21_PAD_CSPI2_SS1 = PAD_ID(PD, 20), 109 - MX21_PAD_CSPI2_SS0 = PAD_ID(PD, 21), 110 - MX21_PAD_CSPI2_SCLK = PAD_ID(PD, 22), 111 - MX21_PAD_CSPI2_MISO = PAD_ID(PD, 23), 112 - MX21_PAD_CSPI2_MOSI = PAD_ID(PD, 24), 113 - MX21_PAD_CSPI1_RDY = PAD_ID(PD, 25), 114 - MX21_PAD_CSPI1_SS2 = PAD_ID(PD, 26), 115 - MX21_PAD_CSPI1_SS1 = PAD_ID(PD, 27), 116 - MX21_PAD_CSPI1_SS0 = PAD_ID(PD, 28), 117 - MX21_PAD_CSPI1_SCLK = PAD_ID(PD, 29), 118 - MX21_PAD_CSPI1_MISO = PAD_ID(PD, 30), 119 - MX21_PAD_CSPI1_MOSI = PAD_ID(PD, 31), 120 - MX21_PAD_TEST_WB2 = PAD_ID(PE, 0), 121 - MX21_PAD_TEST_WB1 = PAD_ID(PE, 1), 122 - MX21_PAD_TEST_WB0 = PAD_ID(PE, 2), 123 - MX21_PAD_UART2_CTS = PAD_ID(PE, 3), 124 - MX21_PAD_UART2_RTS = PAD_ID(PE, 4), 125 - MX21_PAD_PWMO = PAD_ID(PE, 5), 126 - MX21_PAD_UART2_TXD = PAD_ID(PE, 6), 127 - MX21_PAD_UART2_RXD = PAD_ID(PE, 7), 128 - MX21_PAD_UART3_TXD = PAD_ID(PE, 8), 129 - MX21_PAD_UART3_RXD = PAD_ID(PE, 9), 130 - MX21_PAD_UART3_CTS = PAD_ID(PE, 10), 131 - MX21_PAD_UART3_RTS = PAD_ID(PE, 11), 132 - MX21_PAD_UART1_TXD = PAD_ID(PE, 12), 133 - MX21_PAD_UART1_RXD = PAD_ID(PE, 13), 134 - MX21_PAD_UART1_CTS = PAD_ID(PE, 14), 135 - MX21_PAD_UART1_RTS = PAD_ID(PE, 15), 136 - MX21_PAD_RTCK = PAD_ID(PE, 16), 137 - MX21_PAD_RESET_OUT = PAD_ID(PE, 17), 138 - MX21_PAD_SD1_D0 = PAD_ID(PE, 18), 139 - MX21_PAD_SD1_D1 = PAD_ID(PE, 19), 140 - MX21_PAD_SD1_D2 = PAD_ID(PE, 20), 141 - MX21_PAD_SD1_D3 = PAD_ID(PE, 21), 142 - MX21_PAD_SD1_CMD = PAD_ID(PE, 22), 143 - MX21_PAD_SD1_CLK = PAD_ID(PE, 23), 144 - MX21_PAD_NFRB = PAD_ID(PF, 0), 145 - MX21_PAD_NFCE = PAD_ID(PF, 1), 146 - MX21_PAD_NFWP = PAD_ID(PF, 2), 147 - MX21_PAD_NFCLE = PAD_ID(PF, 3), 148 - MX21_PAD_NFALE = PAD_ID(PF, 4), 149 - MX21_PAD_NFRE = PAD_ID(PF, 5), 150 - MX21_PAD_NFWE = PAD_ID(PF, 6), 151 - MX21_PAD_NFIO0 = PAD_ID(PF, 7), 152 - MX21_PAD_NFIO1 = PAD_ID(PF, 8), 153 - MX21_PAD_NFIO2 = PAD_ID(PF, 9), 154 - MX21_PAD_NFIO3 = PAD_ID(PF, 10), 155 - MX21_PAD_NFIO4 = PAD_ID(PF, 11), 156 - MX21_PAD_NFIO5 = PAD_ID(PF, 12), 157 - MX21_PAD_NFIO6 = PAD_ID(PF, 13), 158 - MX21_PAD_NFIO7 = PAD_ID(PF, 14), 159 - MX21_PAD_CLKO = PAD_ID(PF, 15), 160 - MX21_PAD_RESERVED = PAD_ID(PF, 16), 161 - MX21_PAD_CS4 = PAD_ID(PF, 21), 162 - MX21_PAD_CS5 = PAD_ID(PF, 22), 163 - }; 164 - 165 - /* Pad names for the pinmux subsystem */ 166 - static const struct pinctrl_pin_desc imx21_pinctrl_pads[] = { 167 - IMX_PINCTRL_PIN(MX21_PAD_LSCLK), 168 - IMX_PINCTRL_PIN(MX21_PAD_LD0), 169 - IMX_PINCTRL_PIN(MX21_PAD_LD1), 170 - IMX_PINCTRL_PIN(MX21_PAD_LD2), 171 - IMX_PINCTRL_PIN(MX21_PAD_LD3), 172 - IMX_PINCTRL_PIN(MX21_PAD_LD4), 173 - IMX_PINCTRL_PIN(MX21_PAD_LD5), 174 - IMX_PINCTRL_PIN(MX21_PAD_LD6), 175 - IMX_PINCTRL_PIN(MX21_PAD_LD7), 176 - IMX_PINCTRL_PIN(MX21_PAD_LD8), 177 - IMX_PINCTRL_PIN(MX21_PAD_LD9), 178 - IMX_PINCTRL_PIN(MX21_PAD_LD10), 179 - IMX_PINCTRL_PIN(MX21_PAD_LD11), 180 - IMX_PINCTRL_PIN(MX21_PAD_LD12), 181 - IMX_PINCTRL_PIN(MX21_PAD_LD13), 182 - IMX_PINCTRL_PIN(MX21_PAD_LD14), 183 - IMX_PINCTRL_PIN(MX21_PAD_LD15), 184 - IMX_PINCTRL_PIN(MX21_PAD_LD16), 185 - IMX_PINCTRL_PIN(MX21_PAD_LD17), 186 - IMX_PINCTRL_PIN(MX21_PAD_REV), 187 - IMX_PINCTRL_PIN(MX21_PAD_CLS), 188 - IMX_PINCTRL_PIN(MX21_PAD_PS), 189 - IMX_PINCTRL_PIN(MX21_PAD_SPL_SPR), 190 - IMX_PINCTRL_PIN(MX21_PAD_HSYNC), 191 - IMX_PINCTRL_PIN(MX21_PAD_VSYNC), 192 - IMX_PINCTRL_PIN(MX21_PAD_CONTRAST), 193 - IMX_PINCTRL_PIN(MX21_PAD_OE_ACD), 194 - IMX_PINCTRL_PIN(MX21_PAD_SD2_D0), 195 - IMX_PINCTRL_PIN(MX21_PAD_SD2_D1), 196 - IMX_PINCTRL_PIN(MX21_PAD_SD2_D2), 197 - IMX_PINCTRL_PIN(MX21_PAD_SD2_D3), 198 - IMX_PINCTRL_PIN(MX21_PAD_SD2_CMD), 199 - IMX_PINCTRL_PIN(MX21_PAD_SD2_CLK), 200 - IMX_PINCTRL_PIN(MX21_PAD_CSI_D0), 201 - IMX_PINCTRL_PIN(MX21_PAD_CSI_D1), 202 - IMX_PINCTRL_PIN(MX21_PAD_CSI_D2), 203 - IMX_PINCTRL_PIN(MX21_PAD_CSI_D3), 204 - IMX_PINCTRL_PIN(MX21_PAD_CSI_D4), 205 - IMX_PINCTRL_PIN(MX21_PAD_CSI_MCLK), 206 - IMX_PINCTRL_PIN(MX21_PAD_CSI_PIXCLK), 207 - IMX_PINCTRL_PIN(MX21_PAD_CSI_D5), 208 - IMX_PINCTRL_PIN(MX21_PAD_CSI_D6), 209 - IMX_PINCTRL_PIN(MX21_PAD_CSI_D7), 210 - IMX_PINCTRL_PIN(MX21_PAD_CSI_VSYNC), 211 - IMX_PINCTRL_PIN(MX21_PAD_CSI_HSYNC), 212 - IMX_PINCTRL_PIN(MX21_PAD_USB_BYP), 213 - IMX_PINCTRL_PIN(MX21_PAD_USB_PWR), 214 - IMX_PINCTRL_PIN(MX21_PAD_USB_OC), 215 - IMX_PINCTRL_PIN(MX21_PAD_USBH_ON), 216 - IMX_PINCTRL_PIN(MX21_PAD_USBH1_FS), 217 - IMX_PINCTRL_PIN(MX21_PAD_USBH1_OE), 218 - IMX_PINCTRL_PIN(MX21_PAD_USBH1_TXDM), 219 - IMX_PINCTRL_PIN(MX21_PAD_USBH1_TXDP), 220 - IMX_PINCTRL_PIN(MX21_PAD_USBH1_RXDM), 221 - IMX_PINCTRL_PIN(MX21_PAD_USBH1_RXDP), 222 - IMX_PINCTRL_PIN(MX21_PAD_USBG_SDA), 223 - IMX_PINCTRL_PIN(MX21_PAD_USBG_SCL), 224 - IMX_PINCTRL_PIN(MX21_PAD_USBG_ON), 225 - IMX_PINCTRL_PIN(MX21_PAD_USBG_FS), 226 - IMX_PINCTRL_PIN(MX21_PAD_USBG_OE), 227 - IMX_PINCTRL_PIN(MX21_PAD_USBG_TXDM), 228 - IMX_PINCTRL_PIN(MX21_PAD_USBG_TXDP), 229 - IMX_PINCTRL_PIN(MX21_PAD_USBG_RXDM), 230 - IMX_PINCTRL_PIN(MX21_PAD_USBG_RXDP), 231 - IMX_PINCTRL_PIN(MX21_PAD_TOUT), 232 - IMX_PINCTRL_PIN(MX21_PAD_TIN), 233 - IMX_PINCTRL_PIN(MX21_PAD_SAP_FS), 234 - IMX_PINCTRL_PIN(MX21_PAD_SAP_RXD), 235 - IMX_PINCTRL_PIN(MX21_PAD_SAP_TXD), 236 - IMX_PINCTRL_PIN(MX21_PAD_SAP_CLK), 237 - IMX_PINCTRL_PIN(MX21_PAD_SSI1_FS), 238 - IMX_PINCTRL_PIN(MX21_PAD_SSI1_RXD), 239 - IMX_PINCTRL_PIN(MX21_PAD_SSI1_TXD), 240 - IMX_PINCTRL_PIN(MX21_PAD_SSI1_CLK), 241 - IMX_PINCTRL_PIN(MX21_PAD_SSI2_FS), 242 - IMX_PINCTRL_PIN(MX21_PAD_SSI2_RXD), 243 - IMX_PINCTRL_PIN(MX21_PAD_SSI2_TXD), 244 - IMX_PINCTRL_PIN(MX21_PAD_SSI2_CLK), 245 - IMX_PINCTRL_PIN(MX21_PAD_SSI3_FS), 246 - IMX_PINCTRL_PIN(MX21_PAD_SSI3_RXD), 247 - IMX_PINCTRL_PIN(MX21_PAD_SSI3_TXD), 248 - IMX_PINCTRL_PIN(MX21_PAD_SSI3_CLK), 249 - IMX_PINCTRL_PIN(MX21_PAD_I2C_DATA), 250 - IMX_PINCTRL_PIN(MX21_PAD_I2C_CLK), 251 - IMX_PINCTRL_PIN(MX21_PAD_CSPI2_SS2), 252 - IMX_PINCTRL_PIN(MX21_PAD_CSPI2_SS1), 253 - IMX_PINCTRL_PIN(MX21_PAD_CSPI2_SS0), 254 - IMX_PINCTRL_PIN(MX21_PAD_CSPI2_SCLK), 255 - IMX_PINCTRL_PIN(MX21_PAD_CSPI2_MISO), 256 - IMX_PINCTRL_PIN(MX21_PAD_CSPI2_MOSI), 257 - IMX_PINCTRL_PIN(MX21_PAD_CSPI1_RDY), 258 - IMX_PINCTRL_PIN(MX21_PAD_CSPI1_SS2), 259 - IMX_PINCTRL_PIN(MX21_PAD_CSPI1_SS1), 260 - IMX_PINCTRL_PIN(MX21_PAD_CSPI1_SS0), 261 - IMX_PINCTRL_PIN(MX21_PAD_CSPI1_SCLK), 262 - IMX_PINCTRL_PIN(MX21_PAD_CSPI1_MISO), 263 - IMX_PINCTRL_PIN(MX21_PAD_CSPI1_MOSI), 264 - IMX_PINCTRL_PIN(MX21_PAD_TEST_WB2), 265 - IMX_PINCTRL_PIN(MX21_PAD_TEST_WB1), 266 - IMX_PINCTRL_PIN(MX21_PAD_TEST_WB0), 267 - IMX_PINCTRL_PIN(MX21_PAD_UART2_CTS), 268 - IMX_PINCTRL_PIN(MX21_PAD_UART2_RTS), 269 - IMX_PINCTRL_PIN(MX21_PAD_PWMO), 270 - IMX_PINCTRL_PIN(MX21_PAD_UART2_TXD), 271 - IMX_PINCTRL_PIN(MX21_PAD_UART2_RXD), 272 - IMX_PINCTRL_PIN(MX21_PAD_UART3_TXD), 273 - IMX_PINCTRL_PIN(MX21_PAD_UART3_RXD), 274 - IMX_PINCTRL_PIN(MX21_PAD_UART3_CTS), 275 - IMX_PINCTRL_PIN(MX21_PAD_UART3_RTS), 276 - IMX_PINCTRL_PIN(MX21_PAD_UART1_TXD), 277 - IMX_PINCTRL_PIN(MX21_PAD_UART1_RXD), 278 - IMX_PINCTRL_PIN(MX21_PAD_UART1_CTS), 279 - IMX_PINCTRL_PIN(MX21_PAD_UART1_RTS), 280 - IMX_PINCTRL_PIN(MX21_PAD_RTCK), 281 - IMX_PINCTRL_PIN(MX21_PAD_RESET_OUT), 282 - IMX_PINCTRL_PIN(MX21_PAD_SD1_D0), 283 - IMX_PINCTRL_PIN(MX21_PAD_SD1_D1), 284 - IMX_PINCTRL_PIN(MX21_PAD_SD1_D2), 285 - IMX_PINCTRL_PIN(MX21_PAD_SD1_D3), 286 - IMX_PINCTRL_PIN(MX21_PAD_SD1_CMD), 287 - IMX_PINCTRL_PIN(MX21_PAD_SD1_CLK), 288 - IMX_PINCTRL_PIN(MX21_PAD_NFRB), 289 - IMX_PINCTRL_PIN(MX21_PAD_NFCE), 290 - IMX_PINCTRL_PIN(MX21_PAD_NFWP), 291 - IMX_PINCTRL_PIN(MX21_PAD_NFCLE), 292 - IMX_PINCTRL_PIN(MX21_PAD_NFALE), 293 - IMX_PINCTRL_PIN(MX21_PAD_NFRE), 294 - IMX_PINCTRL_PIN(MX21_PAD_NFWE), 295 - IMX_PINCTRL_PIN(MX21_PAD_NFIO0), 296 - IMX_PINCTRL_PIN(MX21_PAD_NFIO1), 297 - IMX_PINCTRL_PIN(MX21_PAD_NFIO2), 298 - IMX_PINCTRL_PIN(MX21_PAD_NFIO3), 299 - IMX_PINCTRL_PIN(MX21_PAD_NFIO4), 300 - IMX_PINCTRL_PIN(MX21_PAD_NFIO5), 301 - IMX_PINCTRL_PIN(MX21_PAD_NFIO6), 302 - IMX_PINCTRL_PIN(MX21_PAD_NFIO7), 303 - IMX_PINCTRL_PIN(MX21_PAD_CLKO), 304 - IMX_PINCTRL_PIN(MX21_PAD_RESERVED), 305 - IMX_PINCTRL_PIN(MX21_PAD_CS4), 306 - IMX_PINCTRL_PIN(MX21_PAD_CS5), 307 - }; 308 - 309 - static struct imx1_pinctrl_soc_info imx21_pinctrl_info = { 310 - .pins = imx21_pinctrl_pads, 311 - .npins = ARRAY_SIZE(imx21_pinctrl_pads), 312 - }; 313 - 314 - static int __init imx21_pinctrl_probe(struct platform_device *pdev) 315 - { 316 - return imx1_pinctrl_core_probe(pdev, &imx21_pinctrl_info); 317 - } 318 - 319 - static const struct of_device_id imx21_pinctrl_of_match[] = { 320 - { .compatible = "fsl,imx21-iomuxc", }, 321 - { } 322 - }; 323 - 324 - static struct platform_driver imx21_pinctrl_driver = { 325 - .driver = { 326 - .name = "imx21-pinctrl", 327 - .of_match_table = imx21_pinctrl_of_match, 328 - }, 329 - }; 330 - builtin_platform_driver_probe(imx21_pinctrl_driver, imx21_pinctrl_probe);
+25
drivers/pinctrl/intel/Kconfig
··· 55 55 select GPIOLIB 56 56 select GPIOLIB_IRQCHIP 57 57 58 + config PINCTRL_ALDERLAKE 59 + tristate "Intel Alder Lake pinctrl and GPIO driver" 60 + depends on ACPI 61 + select PINCTRL_INTEL 62 + help 63 + This pinctrl driver provides an interface that allows configuring 64 + of Intel Alder Lake PCH pins and using them as GPIOs. 65 + 58 66 config PINCTRL_BROXTON 59 67 tristate "Intel Broxton pinctrl and GPIO driver" 60 68 depends on ACPI ··· 94 86 help 95 87 This pinctrl driver provides an interface that allows configuring 96 88 of Intel Denverton SoC pins and using them as GPIOs. 89 + 90 + config PINCTRL_ELKHARTLAKE 91 + tristate "Intel Elkhart Lake SoC pinctrl and GPIO driver" 92 + depends on ACPI 93 + select PINCTRL_INTEL 94 + help 95 + This pinctrl driver provides an interface that allows configuring 96 + of Intel Elkhart Lake SoC pins and using them as GPIOs. 97 97 98 98 config PINCTRL_EMMITSBURG 99 99 tristate "Intel Emmitsburg pinctrl and GPIO driver" ··· 135 119 This pinctrl driver provides an interface that allows configuring 136 120 of Intel Jasper Lake PCH pins and using them as GPIOs. 137 121 122 + config PINCTRL_LAKEFIELD 123 + tristate "Intel Lakefield SoC pinctrl and GPIO driver" 124 + depends on ACPI 125 + select PINCTRL_INTEL 126 + help 127 + This pinctrl driver provides an interface that allows configuring 128 + of Intel Lakefield SoC pins and using them as GPIOs. 129 + 138 130 config PINCTRL_LEWISBURG 139 131 tristate "Intel Lewisburg pinctrl and GPIO driver" 140 132 depends on ACPI ··· 167 143 help 168 144 This pinctrl driver provides an interface that allows configuring 169 145 of Intel Tiger Lake PCH pins and using them as GPIOs. 146 + 170 147 endif
+3
drivers/pinctrl/intel/Makefile
··· 6 6 obj-$(CONFIG_PINCTRL_LYNXPOINT) += pinctrl-lynxpoint.o 7 7 obj-$(CONFIG_PINCTRL_MERRIFIELD) += pinctrl-merrifield.o 8 8 obj-$(CONFIG_PINCTRL_INTEL) += pinctrl-intel.o 9 + obj-$(CONFIG_PINCTRL_ALDERLAKE) += pinctrl-alderlake.o 9 10 obj-$(CONFIG_PINCTRL_BROXTON) += pinctrl-broxton.o 10 11 obj-$(CONFIG_PINCTRL_CANNONLAKE) += pinctrl-cannonlake.o 11 12 obj-$(CONFIG_PINCTRL_CEDARFORK) += pinctrl-cedarfork.o 12 13 obj-$(CONFIG_PINCTRL_DENVERTON) += pinctrl-denverton.o 14 + obj-$(CONFIG_PINCTRL_ELKHARTLAKE) += pinctrl-elkhartlake.o 13 15 obj-$(CONFIG_PINCTRL_EMMITSBURG) += pinctrl-emmitsburg.o 14 16 obj-$(CONFIG_PINCTRL_GEMINILAKE) += pinctrl-geminilake.o 15 17 obj-$(CONFIG_PINCTRL_ICELAKE) += pinctrl-icelake.o 16 18 obj-$(CONFIG_PINCTRL_JASPERLAKE) += pinctrl-jasperlake.o 19 + obj-$(CONFIG_PINCTRL_LAKEFIELD) += pinctrl-lakefield.o 17 20 obj-$(CONFIG_PINCTRL_LEWISBURG) += pinctrl-lewisburg.o 18 21 obj-$(CONFIG_PINCTRL_SUNRISEPOINT) += pinctrl-sunrisepoint.o 19 22 obj-$(CONFIG_PINCTRL_TIGERLAKE) += pinctrl-tigerlake.o
+437
drivers/pinctrl/intel/pinctrl-alderlake.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 2 + /* 3 + * Intel Alder Lake PCH pinctrl/GPIO driver 4 + * 5 + * Copyright (C) 2020, Intel Corporation 6 + * Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com> 7 + */ 8 + 9 + #include <linux/mod_devicetable.h> 10 + #include <linux/module.h> 11 + #include <linux/platform_device.h> 12 + 13 + #include <linux/pinctrl/pinctrl.h> 14 + 15 + #include "pinctrl-intel.h" 16 + 17 + #define ADL_PAD_OWN 0x0a0 18 + #define ADL_PADCFGLOCK 0x110 19 + #define ADL_HOSTSW_OWN 0x150 20 + #define ADL_GPI_IS 0x200 21 + #define ADL_GPI_IE 0x220 22 + 23 + #define ADL_GPP(r, s, e, g) \ 24 + { \ 25 + .reg_num = (r), \ 26 + .base = (s), \ 27 + .size = ((e) - (s) + 1), \ 28 + .gpio_base = (g), \ 29 + } 30 + 31 + #define ADL_COMMUNITY(b, s, e, g) \ 32 + { \ 33 + .barno = (b), \ 34 + .padown_offset = ADL_PAD_OWN, \ 35 + .padcfglock_offset = ADL_PADCFGLOCK, \ 36 + .hostown_offset = ADL_HOSTSW_OWN, \ 37 + .is_offset = ADL_GPI_IS, \ 38 + .ie_offset = ADL_GPI_IE, \ 39 + .pin_base = (s), \ 40 + .npins = ((e) - (s) + 1), \ 41 + .gpps = (g), \ 42 + .ngpps = ARRAY_SIZE(g), \ 43 + } 44 + 45 + /* Alder Lake-S */ 46 + static const struct pinctrl_pin_desc adls_pins[] = { 47 + /* GPP_I */ 48 + PINCTRL_PIN(0, "EXT_PWR_GATEB"), 49 + PINCTRL_PIN(1, "DDSP_HPD_1"), 50 + PINCTRL_PIN(2, "DDSP_HPD_2"), 51 + PINCTRL_PIN(3, "DDSP_HPD_3"), 52 + PINCTRL_PIN(4, "DDSP_HPD_4"), 53 + PINCTRL_PIN(5, "DDPB_CTRLCLK"), 54 + PINCTRL_PIN(6, "DDPB_CTRLDATA"), 55 + PINCTRL_PIN(7, "DDPC_CTRLCLK"), 56 + PINCTRL_PIN(8, "DDPC_CTRLDATA"), 57 + PINCTRL_PIN(9, "GSPI0_CS1B"), 58 + PINCTRL_PIN(10, "GSPI1_CS1B"), 59 + PINCTRL_PIN(11, "USB2_OCB_4"), 60 + PINCTRL_PIN(12, "USB2_OCB_5"), 61 + PINCTRL_PIN(13, "USB2_OCB_6"), 62 + PINCTRL_PIN(14, "USB2_OCB_7"), 63 + PINCTRL_PIN(15, "GSPI0_CS0B"), 64 + PINCTRL_PIN(16, "GSPI0_CLK"), 65 + PINCTRL_PIN(17, "GSPI0_MISO"), 66 + PINCTRL_PIN(18, "GSPI0_MOSI"), 67 + PINCTRL_PIN(19, "GSPI1_CS0B"), 68 + PINCTRL_PIN(20, "GSPI1_CLK"), 69 + PINCTRL_PIN(21, "GSPI1_MISO"), 70 + PINCTRL_PIN(22, "GSPI1_MOSI"), 71 + PINCTRL_PIN(23, "GSPI0_CLK_LOOPBK"), 72 + PINCTRL_PIN(24, "GSPI1_CLK_LOOPBK"), 73 + /* GPP_R */ 74 + PINCTRL_PIN(25, "HDA_BCLK"), 75 + PINCTRL_PIN(26, "HDA_SYNC"), 76 + PINCTRL_PIN(27, "HDA_SDO"), 77 + PINCTRL_PIN(28, "HDA_SDI_0"), 78 + PINCTRL_PIN(29, "HDA_RSTB"), 79 + PINCTRL_PIN(30, "HDA_SDI_1"), 80 + PINCTRL_PIN(31, "GPP_R_6"), 81 + PINCTRL_PIN(32, "GPP_R_7"), 82 + PINCTRL_PIN(33, "GPP_R_8"), 83 + PINCTRL_PIN(34, "DDSP_HPD_A"), 84 + PINCTRL_PIN(35, "DDSP_HPD_B"), 85 + PINCTRL_PIN(36, "DDSP_HPD_C"), 86 + PINCTRL_PIN(37, "ISH_SPI_CSB"), 87 + PINCTRL_PIN(38, "ISH_SPI_CLK"), 88 + PINCTRL_PIN(39, "ISH_SPI_MISO"), 89 + PINCTRL_PIN(40, "ISH_SPI_MOSI"), 90 + PINCTRL_PIN(41, "DDP1_CTRLCLK"), 91 + PINCTRL_PIN(42, "DDP1_CTRLDATA"), 92 + PINCTRL_PIN(43, "DDP2_CTRLCLK"), 93 + PINCTRL_PIN(44, "DDP2_CTRLDATA"), 94 + PINCTRL_PIN(45, "DDPA_CTRLCLK"), 95 + PINCTRL_PIN(46, "DDPA_CTRLDATA"), 96 + PINCTRL_PIN(47, "GSPI2_CLK_LOOPBK"), 97 + /* GPP_J */ 98 + PINCTRL_PIN(48, "CNV_PA_BLANKING"), 99 + PINCTRL_PIN(49, "CPU_C10_GATEB"), 100 + PINCTRL_PIN(50, "CNV_BRI_DT"), 101 + PINCTRL_PIN(51, "CNV_BRI_RSP"), 102 + PINCTRL_PIN(52, "CNV_RGI_DT"), 103 + PINCTRL_PIN(53, "CNV_RGI_RSP"), 104 + PINCTRL_PIN(54, "CNV_MFUART2_RXD"), 105 + PINCTRL_PIN(55, "CNV_MFUART2_TXD"), 106 + PINCTRL_PIN(56, "SRCCLKREQB_16"), 107 + PINCTRL_PIN(57, "SRCCLKREQB_17"), 108 + PINCTRL_PIN(58, "BSSB_LS_RX"), 109 + PINCTRL_PIN(59, "BSSB_LS_TX"), 110 + /* vGPIO */ 111 + PINCTRL_PIN(60, "CNV_BTEN"), 112 + PINCTRL_PIN(61, "CNV_BT_HOST_WAKEB"), 113 + PINCTRL_PIN(62, "CNV_BT_IF_SELECT"), 114 + PINCTRL_PIN(63, "vCNV_BT_UART_TXD"), 115 + PINCTRL_PIN(64, "vCNV_BT_UART_RXD"), 116 + PINCTRL_PIN(65, "vCNV_BT_UART_CTS_B"), 117 + PINCTRL_PIN(66, "vCNV_BT_UART_RTS_B"), 118 + PINCTRL_PIN(67, "vCNV_MFUART1_TXD"), 119 + PINCTRL_PIN(68, "vCNV_MFUART1_RXD"), 120 + PINCTRL_PIN(69, "vCNV_MFUART1_CTS_B"), 121 + PINCTRL_PIN(70, "vCNV_MFUART1_RTS_B"), 122 + PINCTRL_PIN(71, "vUART0_TXD"), 123 + PINCTRL_PIN(72, "vUART0_RXD"), 124 + PINCTRL_PIN(73, "vUART0_CTS_B"), 125 + PINCTRL_PIN(74, "vUART0_RTS_B"), 126 + PINCTRL_PIN(75, "vISH_UART0_TXD"), 127 + PINCTRL_PIN(76, "vISH_UART0_RXD"), 128 + PINCTRL_PIN(77, "vISH_UART0_CTS_B"), 129 + PINCTRL_PIN(78, "vISH_UART0_RTS_B"), 130 + PINCTRL_PIN(79, "vCNV_BT_I2S_BCLK"), 131 + PINCTRL_PIN(80, "vCNV_BT_I2S_WS_SYNC"), 132 + PINCTRL_PIN(81, "vCNV_BT_I2S_SDO"), 133 + PINCTRL_PIN(82, "vCNV_BT_I2S_SDI"), 134 + PINCTRL_PIN(83, "vI2S2_SCLK"), 135 + PINCTRL_PIN(84, "vI2S2_SFRM"), 136 + PINCTRL_PIN(85, "vI2S2_TXD"), 137 + PINCTRL_PIN(86, "vI2S2_RXD"), 138 + /* vGPIO_0 */ 139 + PINCTRL_PIN(87, "ESPI_USB_OCB_0"), 140 + PINCTRL_PIN(88, "ESPI_USB_OCB_1"), 141 + PINCTRL_PIN(89, "ESPI_USB_OCB_2"), 142 + PINCTRL_PIN(90, "ESPI_USB_OCB_3"), 143 + PINCTRL_PIN(91, "USB_CPU_OCB_0"), 144 + PINCTRL_PIN(92, "USB_CPU_OCB_1"), 145 + PINCTRL_PIN(93, "USB_CPU_OCB_2"), 146 + PINCTRL_PIN(94, "USB_CPU_OCB_3"), 147 + /* GPP_B */ 148 + PINCTRL_PIN(95, "PCIE_LNK_DOWN"), 149 + PINCTRL_PIN(96, "ISH_UART0_RTSB"), 150 + PINCTRL_PIN(97, "VRALERTB"), 151 + PINCTRL_PIN(98, "CPU_GP_2"), 152 + PINCTRL_PIN(99, "CPU_GP_3"), 153 + PINCTRL_PIN(100, "SX_EXIT_HOLDOFFB"), 154 + PINCTRL_PIN(101, "CLKOUT_48"), 155 + PINCTRL_PIN(102, "ISH_GP_7"), 156 + PINCTRL_PIN(103, "ISH_GP_0"), 157 + PINCTRL_PIN(104, "ISH_GP_1"), 158 + PINCTRL_PIN(105, "ISH_GP_2"), 159 + PINCTRL_PIN(106, "I2S_MCLK"), 160 + PINCTRL_PIN(107, "SLP_S0B"), 161 + PINCTRL_PIN(108, "PLTRSTB"), 162 + PINCTRL_PIN(109, "SPKR"), 163 + PINCTRL_PIN(110, "ISH_GP_3"), 164 + PINCTRL_PIN(111, "ISH_GP_4"), 165 + PINCTRL_PIN(112, "ISH_GP_5"), 166 + PINCTRL_PIN(113, "PMCALERTB"), 167 + PINCTRL_PIN(114, "FUSA_DIAGTEST_EN"), 168 + PINCTRL_PIN(115, "FUSA_DIAGTEST_MODE"), 169 + PINCTRL_PIN(116, "GPP_B_21"), 170 + PINCTRL_PIN(117, "GPP_B_22"), 171 + PINCTRL_PIN(118, "SML1ALERTB"), 172 + /* GPP_G */ 173 + PINCTRL_PIN(119, "GPP_G_0"), 174 + PINCTRL_PIN(120, "GPP_G_1"), 175 + PINCTRL_PIN(121, "DNX_FORCE_RELOAD"), 176 + PINCTRL_PIN(122, "GMII_MDC_0"), 177 + PINCTRL_PIN(123, "GMII_MDIO_0"), 178 + PINCTRL_PIN(124, "SLP_DRAMB"), 179 + PINCTRL_PIN(125, "GPP_G_6"), 180 + PINCTRL_PIN(126, "GPP_G_7"), 181 + /* GPP_H */ 182 + PINCTRL_PIN(127, "SRCCLKREQB_18"), 183 + PINCTRL_PIN(128, "GPP_H_1"), 184 + PINCTRL_PIN(129, "SRCCLKREQB_8"), 185 + PINCTRL_PIN(130, "SRCCLKREQB_9"), 186 + PINCTRL_PIN(131, "SRCCLKREQB_10"), 187 + PINCTRL_PIN(132, "SRCCLKREQB_11"), 188 + PINCTRL_PIN(133, "SRCCLKREQB_12"), 189 + PINCTRL_PIN(134, "SRCCLKREQB_13"), 190 + PINCTRL_PIN(135, "SRCCLKREQB_14"), 191 + PINCTRL_PIN(136, "SRCCLKREQB_15"), 192 + PINCTRL_PIN(137, "SML2CLK"), 193 + PINCTRL_PIN(138, "SML2DATA"), 194 + PINCTRL_PIN(139, "SML2ALERTB"), 195 + PINCTRL_PIN(140, "SML3CLK"), 196 + PINCTRL_PIN(141, "SML3DATA"), 197 + PINCTRL_PIN(142, "SML3ALERTB"), 198 + PINCTRL_PIN(143, "SML4CLK"), 199 + PINCTRL_PIN(144, "SML4DATA"), 200 + PINCTRL_PIN(145, "SML4ALERTB"), 201 + PINCTRL_PIN(146, "ISH_I2C0_SDA"), 202 + PINCTRL_PIN(147, "ISH_I2C0_SCL"), 203 + PINCTRL_PIN(148, "ISH_I2C1_SDA"), 204 + PINCTRL_PIN(149, "ISH_I2C1_SCL"), 205 + PINCTRL_PIN(150, "TIME_SYNC_0"), 206 + /* SPI0 */ 207 + PINCTRL_PIN(151, "SPI0_IO_2"), 208 + PINCTRL_PIN(152, "SPI0_IO_3"), 209 + PINCTRL_PIN(153, "SPI0_MOSI_IO_0"), 210 + PINCTRL_PIN(154, "SPI0_MISO_IO_1"), 211 + PINCTRL_PIN(155, "SPI0_TPM_CSB"), 212 + PINCTRL_PIN(156, "SPI0_FLASH_0_CSB"), 213 + PINCTRL_PIN(157, "SPI0_FLASH_1_CSB"), 214 + PINCTRL_PIN(158, "SPI0_CLK"), 215 + PINCTRL_PIN(159, "SPI0_CLK_LOOPBK"), 216 + /* GPP_A */ 217 + PINCTRL_PIN(160, "ESPI_IO_0"), 218 + PINCTRL_PIN(161, "ESPI_IO_1"), 219 + PINCTRL_PIN(162, "ESPI_IO_2"), 220 + PINCTRL_PIN(163, "ESPI_IO_3"), 221 + PINCTRL_PIN(164, "ESPI_CS0B"), 222 + PINCTRL_PIN(165, "ESPI_CLK"), 223 + PINCTRL_PIN(166, "ESPI_RESETB"), 224 + PINCTRL_PIN(167, "ESPI_CS1B"), 225 + PINCTRL_PIN(168, "ESPI_CS2B"), 226 + PINCTRL_PIN(169, "ESPI_CS3B"), 227 + PINCTRL_PIN(170, "ESPI_ALERT0B"), 228 + PINCTRL_PIN(171, "ESPI_ALERT1B"), 229 + PINCTRL_PIN(172, "ESPI_ALERT2B"), 230 + PINCTRL_PIN(173, "ESPI_ALERT3B"), 231 + PINCTRL_PIN(174, "GPP_A_14"), 232 + PINCTRL_PIN(175, "ESPI_CLK_LOOPBK"), 233 + /* GPP_C */ 234 + PINCTRL_PIN(176, "SMBCLK"), 235 + PINCTRL_PIN(177, "SMBDATA"), 236 + PINCTRL_PIN(178, "SMBALERTB"), 237 + PINCTRL_PIN(179, "ISH_UART0_RXD"), 238 + PINCTRL_PIN(180, "ISH_UART0_TXD"), 239 + PINCTRL_PIN(181, "SML0ALERTB"), 240 + PINCTRL_PIN(182, "ISH_I2C2_SDA"), 241 + PINCTRL_PIN(183, "ISH_I2C2_SCL"), 242 + PINCTRL_PIN(184, "UART0_RXD"), 243 + PINCTRL_PIN(185, "UART0_TXD"), 244 + PINCTRL_PIN(186, "UART0_RTSB"), 245 + PINCTRL_PIN(187, "UART0_CTSB"), 246 + PINCTRL_PIN(188, "UART1_RXD"), 247 + PINCTRL_PIN(189, "UART1_TXD"), 248 + PINCTRL_PIN(190, "UART1_RTSB"), 249 + PINCTRL_PIN(191, "UART1_CTSB"), 250 + PINCTRL_PIN(192, "I2C0_SDA"), 251 + PINCTRL_PIN(193, "I2C0_SCL"), 252 + PINCTRL_PIN(194, "I2C1_SDA"), 253 + PINCTRL_PIN(195, "I2C1_SCL"), 254 + PINCTRL_PIN(196, "UART2_RXD"), 255 + PINCTRL_PIN(197, "UART2_TXD"), 256 + PINCTRL_PIN(198, "UART2_RTSB"), 257 + PINCTRL_PIN(199, "UART2_CTSB"), 258 + /* GPP_S */ 259 + PINCTRL_PIN(200, "SNDW1_CLK"), 260 + PINCTRL_PIN(201, "SNDW1_DATA"), 261 + PINCTRL_PIN(202, "SNDW2_CLK"), 262 + PINCTRL_PIN(203, "SNDW2_DATA"), 263 + PINCTRL_PIN(204, "SNDW3_CLK"), 264 + PINCTRL_PIN(205, "SNDW3_DATA"), 265 + PINCTRL_PIN(206, "SNDW4_CLK"), 266 + PINCTRL_PIN(207, "SNDW4_DATA"), 267 + /* GPP_E */ 268 + PINCTRL_PIN(208, "SATAXPCIE_0"), 269 + PINCTRL_PIN(209, "SATAXPCIE_1"), 270 + PINCTRL_PIN(210, "SATAXPCIE_2"), 271 + PINCTRL_PIN(211, "CPU_GP_0"), 272 + PINCTRL_PIN(212, "SATA_DEVSLP_0"), 273 + PINCTRL_PIN(213, "SATA_DEVSLP_1"), 274 + PINCTRL_PIN(214, "SATA_DEVSLP_2"), 275 + PINCTRL_PIN(215, "CPU_GP_1"), 276 + PINCTRL_PIN(216, "SATA_LEDB"), 277 + PINCTRL_PIN(217, "USB2_OCB_0"), 278 + PINCTRL_PIN(218, "USB2_OCB_1"), 279 + PINCTRL_PIN(219, "USB2_OCB_2"), 280 + PINCTRL_PIN(220, "USB2_OCB_3"), 281 + PINCTRL_PIN(221, "SPI1_CSB"), 282 + PINCTRL_PIN(222, "SPI1_CLK"), 283 + PINCTRL_PIN(223, "SPI1_MISO_IO_1"), 284 + PINCTRL_PIN(224, "SPI1_MOSI_IO_0"), 285 + PINCTRL_PIN(225, "SPI1_IO_2"), 286 + PINCTRL_PIN(226, "SPI1_IO_3"), 287 + PINCTRL_PIN(227, "GPP_E_19"), 288 + PINCTRL_PIN(228, "GPP_E_20"), 289 + PINCTRL_PIN(229, "ISH_UART0_CTSB"), 290 + PINCTRL_PIN(230, "SPI1_CLK_LOOPBK"), 291 + /* GPP_K */ 292 + PINCTRL_PIN(231, "GSXDOUT"), 293 + PINCTRL_PIN(232, "GSXSLOAD"), 294 + PINCTRL_PIN(233, "GSXDIN"), 295 + PINCTRL_PIN(234, "GSXSRESETB"), 296 + PINCTRL_PIN(235, "GSXCLK"), 297 + PINCTRL_PIN(236, "ADR_COMPLETE"), 298 + PINCTRL_PIN(237, "GPP_K_6"), 299 + PINCTRL_PIN(238, "GPP_K_7"), 300 + PINCTRL_PIN(239, "CORE_VID_0"), 301 + PINCTRL_PIN(240, "CORE_VID_1"), 302 + PINCTRL_PIN(241, "GPP_K_10"), 303 + PINCTRL_PIN(242, "GPP_K_11"), 304 + PINCTRL_PIN(243, "SYS_PWROK"), 305 + PINCTRL_PIN(244, "SYS_RESETB"), 306 + PINCTRL_PIN(245, "MLK_RSTB"), 307 + /* GPP_F */ 308 + PINCTRL_PIN(246, "SATAXPCIE_3"), 309 + PINCTRL_PIN(247, "SATAXPCIE_4"), 310 + PINCTRL_PIN(248, "SATAXPCIE_5"), 311 + PINCTRL_PIN(249, "SATAXPCIE_6"), 312 + PINCTRL_PIN(250, "SATAXPCIE_7"), 313 + PINCTRL_PIN(251, "SATA_DEVSLP_3"), 314 + PINCTRL_PIN(252, "SATA_DEVSLP_4"), 315 + PINCTRL_PIN(253, "SATA_DEVSLP_5"), 316 + PINCTRL_PIN(254, "SATA_DEVSLP_6"), 317 + PINCTRL_PIN(255, "SATA_DEVSLP_7"), 318 + PINCTRL_PIN(256, "SATA_SCLOCK"), 319 + PINCTRL_PIN(257, "SATA_SLOAD"), 320 + PINCTRL_PIN(258, "SATA_SDATAOUT1"), 321 + PINCTRL_PIN(259, "SATA_SDATAOUT0"), 322 + PINCTRL_PIN(260, "PS_ONB"), 323 + PINCTRL_PIN(261, "M2_SKT2_CFG_0"), 324 + PINCTRL_PIN(262, "M2_SKT2_CFG_1"), 325 + PINCTRL_PIN(263, "M2_SKT2_CFG_2"), 326 + PINCTRL_PIN(264, "M2_SKT2_CFG_3"), 327 + PINCTRL_PIN(265, "L_VDDEN"), 328 + PINCTRL_PIN(266, "L_BKLTEN"), 329 + PINCTRL_PIN(267, "L_BKLTCTL"), 330 + PINCTRL_PIN(268, "VNN_CTRL"), 331 + PINCTRL_PIN(269, "GPP_F_23"), 332 + /* GPP_D */ 333 + PINCTRL_PIN(270, "SRCCLKREQB_0"), 334 + PINCTRL_PIN(271, "SRCCLKREQB_1"), 335 + PINCTRL_PIN(272, "SRCCLKREQB_2"), 336 + PINCTRL_PIN(273, "SRCCLKREQB_3"), 337 + PINCTRL_PIN(274, "SML1CLK"), 338 + PINCTRL_PIN(275, "I2S2_SFRM"), 339 + PINCTRL_PIN(276, "I2S2_TXD"), 340 + PINCTRL_PIN(277, "I2S2_RXD"), 341 + PINCTRL_PIN(278, "I2S2_SCLK"), 342 + PINCTRL_PIN(279, "SML0CLK"), 343 + PINCTRL_PIN(280, "SML0DATA"), 344 + PINCTRL_PIN(281, "SRCCLKREQB_4"), 345 + PINCTRL_PIN(282, "SRCCLKREQB_5"), 346 + PINCTRL_PIN(283, "SRCCLKREQB_6"), 347 + PINCTRL_PIN(284, "SRCCLKREQB_7"), 348 + PINCTRL_PIN(285, "SML1DATA"), 349 + PINCTRL_PIN(286, "GSPI3_CS0B"), 350 + PINCTRL_PIN(287, "GSPI3_CLK"), 351 + PINCTRL_PIN(288, "GSPI3_MISO"), 352 + PINCTRL_PIN(289, "GSPI3_MOSI"), 353 + PINCTRL_PIN(290, "UART3_RXD"), 354 + PINCTRL_PIN(291, "UART3_TXD"), 355 + PINCTRL_PIN(292, "UART3_RTSB"), 356 + PINCTRL_PIN(293, "UART3_CTSB"), 357 + PINCTRL_PIN(294, "GSPI3_CLK_LOOPBK"), 358 + /* JTAG */ 359 + PINCTRL_PIN(295, "JTAG_TDO"), 360 + PINCTRL_PIN(296, "JTAGX"), 361 + PINCTRL_PIN(297, "PRDYB"), 362 + PINCTRL_PIN(298, "PREQB"), 363 + PINCTRL_PIN(299, "JTAG_TDI"), 364 + PINCTRL_PIN(300, "JTAG_TMS"), 365 + PINCTRL_PIN(301, "JTAG_TCK"), 366 + PINCTRL_PIN(302, "DBG_PMODE"), 367 + PINCTRL_PIN(303, "CPU_TRSTB"), 368 + }; 369 + 370 + static const struct intel_padgroup adls_community0_gpps[] = { 371 + ADL_GPP(0, 0, 24, 0), /* GPP_I */ 372 + ADL_GPP(1, 25, 47, 32), /* GPP_R */ 373 + ADL_GPP(2, 48, 59, 64), /* GPP_J */ 374 + ADL_GPP(3, 60, 86, 96), /* vGPIO */ 375 + ADL_GPP(4, 87, 94, 128), /* vGPIO_0 */ 376 + }; 377 + 378 + static const struct intel_padgroup adls_community1_gpps[] = { 379 + ADL_GPP(0, 95, 118, 160), /* GPP_B */ 380 + ADL_GPP(1, 119, 126, 192), /* GPP_G */ 381 + ADL_GPP(2, 127, 150, 224), /* GPP_H */ 382 + }; 383 + 384 + static const struct intel_padgroup adls_community3_gpps[] = { 385 + ADL_GPP(0, 151, 159, INTEL_GPIO_BASE_NOMAP), /* SPI0 */ 386 + ADL_GPP(1, 160, 175, 256), /* GPP_A */ 387 + ADL_GPP(2, 176, 199, 288), /* GPP_C */ 388 + }; 389 + 390 + static const struct intel_padgroup adls_community4_gpps[] = { 391 + ADL_GPP(0, 200, 207, 320), /* GPP_S */ 392 + ADL_GPP(1, 208, 230, 352), /* GPP_E */ 393 + ADL_GPP(2, 231, 245, 384), /* GPP_K */ 394 + ADL_GPP(3, 246, 269, 416), /* GPP_F */ 395 + }; 396 + 397 + static const struct intel_padgroup adls_community5_gpps[] = { 398 + ADL_GPP(0, 270, 294, 448), /* GPP_D */ 399 + ADL_GPP(1, 295, 303, INTEL_GPIO_BASE_NOMAP), /* JTAG */ 400 + }; 401 + 402 + static const struct intel_community adls_communities[] = { 403 + ADL_COMMUNITY(0, 0, 94, adls_community0_gpps), 404 + ADL_COMMUNITY(1, 95, 150, adls_community1_gpps), 405 + ADL_COMMUNITY(2, 151, 199, adls_community3_gpps), 406 + ADL_COMMUNITY(3, 200, 269, adls_community4_gpps), 407 + ADL_COMMUNITY(4, 270, 303, adls_community5_gpps), 408 + }; 409 + 410 + static const struct intel_pinctrl_soc_data adls_soc_data = { 411 + .pins = adls_pins, 412 + .npins = ARRAY_SIZE(adls_pins), 413 + .communities = adls_communities, 414 + .ncommunities = ARRAY_SIZE(adls_communities), 415 + }; 416 + 417 + static const struct acpi_device_id adl_pinctrl_acpi_match[] = { 418 + { "INTC1056", (kernel_ulong_t)&adls_soc_data }, 419 + { } 420 + }; 421 + MODULE_DEVICE_TABLE(acpi, adl_pinctrl_acpi_match); 422 + 423 + static INTEL_PINCTRL_PM_OPS(adl_pinctrl_pm_ops); 424 + 425 + static struct platform_driver adl_pinctrl_driver = { 426 + .probe = intel_pinctrl_probe_by_hid, 427 + .driver = { 428 + .name = "alderlake-pinctrl", 429 + .acpi_match_table = adl_pinctrl_acpi_match, 430 + .pm = &adl_pinctrl_pm_ops, 431 + }, 432 + }; 433 + module_platform_driver(adl_pinctrl_driver); 434 + 435 + MODULE_AUTHOR("Andy Shevchenko <andriy.shevchenko@linux.intel.com>"); 436 + MODULE_DESCRIPTION("Intel Alder Lake PCH pinctrl/GPIO driver"); 437 + MODULE_LICENSE("GPL v2");
+513
drivers/pinctrl/intel/pinctrl-elkhartlake.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 2 + /* 3 + * Intel Elkhart Lake PCH pinctrl/GPIO driver 4 + * 5 + * Copyright (C) 2019, Intel Corporation 6 + * Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com> 7 + */ 8 + 9 + #include <linux/mod_devicetable.h> 10 + #include <linux/module.h> 11 + #include <linux/platform_device.h> 12 + 13 + #include <linux/pinctrl/pinctrl.h> 14 + 15 + #include "pinctrl-intel.h" 16 + 17 + #define EHL_PAD_OWN 0x020 18 + #define EHL_PADCFGLOCK 0x080 19 + #define EHL_HOSTSW_OWN 0x0b0 20 + #define EHL_GPI_IS 0x100 21 + #define EHL_GPI_IE 0x120 22 + 23 + #define EHL_GPP(r, s, e) \ 24 + { \ 25 + .reg_num = (r), \ 26 + .base = (s), \ 27 + .size = ((e) - (s) + 1), \ 28 + } 29 + 30 + #define EHL_COMMUNITY(s, e, g) \ 31 + { \ 32 + .padown_offset = EHL_PAD_OWN, \ 33 + .padcfglock_offset = EHL_PADCFGLOCK, \ 34 + .hostown_offset = EHL_HOSTSW_OWN, \ 35 + .is_offset = EHL_GPI_IS, \ 36 + .ie_offset = EHL_GPI_IE, \ 37 + .pin_base = (s), \ 38 + .npins = ((e) - (s) + 1), \ 39 + .gpps = (g), \ 40 + .ngpps = ARRAY_SIZE(g), \ 41 + } 42 + 43 + /* Elkhart Lake */ 44 + static const struct pinctrl_pin_desc ehl_community0_pins[] = { 45 + /* GPP_B */ 46 + PINCTRL_PIN(0, "CORE_VID_0"), 47 + PINCTRL_PIN(1, "CORE_VID_1"), 48 + PINCTRL_PIN(2, "VRALERTB"), 49 + PINCTRL_PIN(3, "CPU_GP_2"), 50 + PINCTRL_PIN(4, "CPU_GP_3"), 51 + PINCTRL_PIN(5, "OSE_I2C0_SCLK"), 52 + PINCTRL_PIN(6, "OSE_I2C0_SDAT"), 53 + PINCTRL_PIN(7, "OSE_I2C1_SCLK"), 54 + PINCTRL_PIN(8, "OSE_I2C1_SDAT"), 55 + PINCTRL_PIN(9, "I2C5_SDA"), 56 + PINCTRL_PIN(10, "I2C5_SCL"), 57 + PINCTRL_PIN(11, "PMCALERTB"), 58 + PINCTRL_PIN(12, "SLP_S0B"), 59 + PINCTRL_PIN(13, "PLTRSTB"), 60 + PINCTRL_PIN(14, "SPKR"), 61 + PINCTRL_PIN(15, "GSPI0_CS0B"), 62 + PINCTRL_PIN(16, "GSPI0_CLK"), 63 + PINCTRL_PIN(17, "GSPI0_MISO"), 64 + PINCTRL_PIN(18, "GSPI0_MOSI"), 65 + PINCTRL_PIN(19, "GSPI1_CS0B"), 66 + PINCTRL_PIN(20, "GSPI1_CLK"), 67 + PINCTRL_PIN(21, "GSPI1_MISO"), 68 + PINCTRL_PIN(22, "GSPI1_MOSI"), 69 + PINCTRL_PIN(23, "GPPC_B_23"), 70 + PINCTRL_PIN(24, "GSPI0_CLK_LOOPBK"), 71 + PINCTRL_PIN(25, "GSPI1_CLK_LOOPBK"), 72 + /* GPP_T */ 73 + PINCTRL_PIN(26, "OSE_QEPA_2"), 74 + PINCTRL_PIN(27, "OSE_QEPB_2"), 75 + PINCTRL_PIN(28, "OSE_QEPI_2"), 76 + PINCTRL_PIN(29, "GPPC_T_3"), 77 + PINCTRL_PIN(30, "RGMII0_INT"), 78 + PINCTRL_PIN(31, "RGMII0_RESETB"), 79 + PINCTRL_PIN(32, "RGMII0_AUXTS"), 80 + PINCTRL_PIN(33, "RGMII0_PPS"), 81 + PINCTRL_PIN(34, "USB2_OCB_2"), 82 + PINCTRL_PIN(35, "OSE_HSUART2_EN"), 83 + PINCTRL_PIN(36, "OSE_HSUART2_RE"), 84 + PINCTRL_PIN(37, "USB2_OCB_3"), 85 + PINCTRL_PIN(38, "OSE_UART2_RXD"), 86 + PINCTRL_PIN(39, "OSE_UART2_TXD"), 87 + PINCTRL_PIN(40, "OSE_UART2_RTSB"), 88 + PINCTRL_PIN(41, "OSE_UART2_CTSB"), 89 + /* GPP_G */ 90 + PINCTRL_PIN(42, "SD3_CMD"), 91 + PINCTRL_PIN(43, "SD3_D0"), 92 + PINCTRL_PIN(44, "SD3_D1"), 93 + PINCTRL_PIN(45, "SD3_D2"), 94 + PINCTRL_PIN(46, "SD3_D3"), 95 + PINCTRL_PIN(47, "SD3_CDB"), 96 + PINCTRL_PIN(48, "SD3_CLK"), 97 + PINCTRL_PIN(49, "I2S2_SCLK"), 98 + PINCTRL_PIN(50, "I2S2_SFRM"), 99 + PINCTRL_PIN(51, "I2S2_TXD"), 100 + PINCTRL_PIN(52, "I2S2_RXD"), 101 + PINCTRL_PIN(53, "I2S3_SCLK"), 102 + PINCTRL_PIN(54, "I2S3_SFRM"), 103 + PINCTRL_PIN(55, "I2S3_TXD"), 104 + PINCTRL_PIN(56, "I2S3_RXD"), 105 + PINCTRL_PIN(57, "ESPI_IO_0"), 106 + PINCTRL_PIN(58, "ESPI_IO_1"), 107 + PINCTRL_PIN(59, "ESPI_IO_2"), 108 + PINCTRL_PIN(60, "ESPI_IO_3"), 109 + PINCTRL_PIN(61, "I2S1_SCLK"), 110 + PINCTRL_PIN(62, "ESPI_CSB"), 111 + PINCTRL_PIN(63, "ESPI_CLK"), 112 + PINCTRL_PIN(64, "ESPI_RESETB"), 113 + PINCTRL_PIN(65, "SD3_WP"), 114 + PINCTRL_PIN(66, "ESPI_CLK_LOOPBK"), 115 + }; 116 + 117 + static const struct intel_padgroup ehl_community0_gpps[] = { 118 + EHL_GPP(0, 0, 25), /* GPP_B */ 119 + EHL_GPP(1, 26, 41), /* GPP_T */ 120 + EHL_GPP(2, 42, 66), /* GPP_G */ 121 + }; 122 + 123 + static const struct intel_community ehl_community0[] = { 124 + EHL_COMMUNITY(0, 66, ehl_community0_gpps), 125 + }; 126 + 127 + static const struct intel_pinctrl_soc_data ehl_community0_soc_data = { 128 + .uid = "0", 129 + .pins = ehl_community0_pins, 130 + .npins = ARRAY_SIZE(ehl_community0_pins), 131 + .communities = ehl_community0, 132 + .ncommunities = ARRAY_SIZE(ehl_community0), 133 + }; 134 + 135 + static const struct pinctrl_pin_desc ehl_community1_pins[] = { 136 + /* GPP_V */ 137 + PINCTRL_PIN(0, "EMMC_CMD"), 138 + PINCTRL_PIN(1, "EMMC_DATA0"), 139 + PINCTRL_PIN(2, "EMMC_DATA1"), 140 + PINCTRL_PIN(3, "EMMC_DATA2"), 141 + PINCTRL_PIN(4, "EMMC_DATA3"), 142 + PINCTRL_PIN(5, "EMMC_DATA4"), 143 + PINCTRL_PIN(6, "EMMC_DATA5"), 144 + PINCTRL_PIN(7, "EMMC_DATA6"), 145 + PINCTRL_PIN(8, "EMMC_DATA7"), 146 + PINCTRL_PIN(9, "EMMC_RCLK"), 147 + PINCTRL_PIN(10, "EMMC_CLK"), 148 + PINCTRL_PIN(11, "EMMC_RESETB"), 149 + PINCTRL_PIN(12, "OSE_TGPIO0"), 150 + PINCTRL_PIN(13, "OSE_TGPIO1"), 151 + PINCTRL_PIN(14, "OSE_TGPIO2"), 152 + PINCTRL_PIN(15, "OSE_TGPIO3"), 153 + /* GPP_H */ 154 + PINCTRL_PIN(16, "RGMII1_INT"), 155 + PINCTRL_PIN(17, "RGMII1_RESETB"), 156 + PINCTRL_PIN(18, "RGMII1_AUXTS"), 157 + PINCTRL_PIN(19, "RGMII1_PPS"), 158 + PINCTRL_PIN(20, "I2C2_SDA"), 159 + PINCTRL_PIN(21, "I2C2_SCL"), 160 + PINCTRL_PIN(22, "I2C3_SDA"), 161 + PINCTRL_PIN(23, "I2C3_SCL"), 162 + PINCTRL_PIN(24, "I2C4_SDA"), 163 + PINCTRL_PIN(25, "I2C4_SCL"), 164 + PINCTRL_PIN(26, "SRCCLKREQB_4"), 165 + PINCTRL_PIN(27, "SRCCLKREQB_5"), 166 + PINCTRL_PIN(28, "OSE_UART1_RXD"), 167 + PINCTRL_PIN(29, "OSE_UART1_TXD"), 168 + PINCTRL_PIN(30, "GPPC_H_14"), 169 + PINCTRL_PIN(31, "OSE_UART1_CTSB"), 170 + PINCTRL_PIN(32, "PCIE_LNK_DOWN"), 171 + PINCTRL_PIN(33, "SD_PWR_EN_B"), 172 + PINCTRL_PIN(34, "CPU_C10_GATEB"), 173 + PINCTRL_PIN(35, "GPPC_H_19"), 174 + PINCTRL_PIN(36, "OSE_PWM7"), 175 + PINCTRL_PIN(37, "OSE_HSUART1_DE"), 176 + PINCTRL_PIN(38, "OSE_HSUART1_RE"), 177 + PINCTRL_PIN(39, "OSE_HSUART1_EN"), 178 + /* GPP_D */ 179 + PINCTRL_PIN(40, "OSE_QEPA_0"), 180 + PINCTRL_PIN(41, "OSE_QEPB_0"), 181 + PINCTRL_PIN(42, "OSE_QEPI_0"), 182 + PINCTRL_PIN(43, "OSE_PWM6"), 183 + PINCTRL_PIN(44, "OSE_PWM2"), 184 + PINCTRL_PIN(45, "SRCCLKREQB_0"), 185 + PINCTRL_PIN(46, "SRCCLKREQB_1"), 186 + PINCTRL_PIN(47, "SRCCLKREQB_2"), 187 + PINCTRL_PIN(48, "SRCCLKREQB_3"), 188 + PINCTRL_PIN(49, "OSE_SPI0_CSB"), 189 + PINCTRL_PIN(50, "OSE_SPI0_SCLK"), 190 + PINCTRL_PIN(51, "OSE_SPI0_MISO"), 191 + PINCTRL_PIN(52, "OSE_SPI0_MOSI"), 192 + PINCTRL_PIN(53, "OSE_QEPA_1"), 193 + PINCTRL_PIN(54, "OSE_QEPB_1"), 194 + PINCTRL_PIN(55, "OSE_PWM3"), 195 + PINCTRL_PIN(56, "OSE_QEPI_1"), 196 + PINCTRL_PIN(57, "OSE_PWM4"), 197 + PINCTRL_PIN(58, "OSE_PWM5"), 198 + PINCTRL_PIN(59, "I2S_MCLK1_OUT"), 199 + PINCTRL_PIN(60, "GSPI2_CLK_LOOPBK"), 200 + /* GPP_U */ 201 + PINCTRL_PIN(61, "RGMII2_INT"), 202 + PINCTRL_PIN(62, "RGMII2_RESETB"), 203 + PINCTRL_PIN(63, "RGMII2_PPS"), 204 + PINCTRL_PIN(64, "RGMII2_AUXTS"), 205 + PINCTRL_PIN(65, "ISI_SPIM_CS"), 206 + PINCTRL_PIN(66, "ISI_SPIM_SCLK"), 207 + PINCTRL_PIN(67, "ISI_SPIM_MISO"), 208 + PINCTRL_PIN(68, "OSE_QEPA_3"), 209 + PINCTRL_PIN(69, "ISI_SPIS_CS"), 210 + PINCTRL_PIN(70, "ISI_SPIS_SCLK"), 211 + PINCTRL_PIN(71, "ISI_SPIS_MISO"), 212 + PINCTRL_PIN(72, "OSE_QEPB_3"), 213 + PINCTRL_PIN(73, "ISI_CHX_OKNOK_0"), 214 + PINCTRL_PIN(74, "ISI_CHX_OKNOK_1"), 215 + PINCTRL_PIN(75, "ISI_CHX_RLY_SWTCH"), 216 + PINCTRL_PIN(76, "ISI_CHX_PMIC_EN"), 217 + PINCTRL_PIN(77, "ISI_OKNOK_0"), 218 + PINCTRL_PIN(78, "ISI_OKNOK_1"), 219 + PINCTRL_PIN(79, "ISI_ALERT"), 220 + PINCTRL_PIN(80, "OSE_QEPI_3"), 221 + PINCTRL_PIN(81, "GSPI3_CLK_LOOPBK"), 222 + PINCTRL_PIN(82, "GSPI4_CLK_LOOPBK"), 223 + PINCTRL_PIN(83, "GSPI5_CLK_LOOPBK"), 224 + PINCTRL_PIN(84, "GSPI6_CLK_LOOPBK"), 225 + /* vGPIO */ 226 + PINCTRL_PIN(85, "CNV_BTEN"), 227 + PINCTRL_PIN(86, "CNV_BT_HOST_WAKEB"), 228 + PINCTRL_PIN(87, "CNV_BT_IF_SELECT"), 229 + PINCTRL_PIN(88, "vCNV_BT_UART_TXD"), 230 + PINCTRL_PIN(89, "vCNV_BT_UART_RXD"), 231 + PINCTRL_PIN(90, "vCNV_BT_UART_CTS_B"), 232 + PINCTRL_PIN(91, "vCNV_BT_UART_RTS_B"), 233 + PINCTRL_PIN(92, "vCNV_MFUART1_TXD"), 234 + PINCTRL_PIN(93, "vCNV_MFUART1_RXD"), 235 + PINCTRL_PIN(94, "vCNV_MFUART1_CTS_B"), 236 + PINCTRL_PIN(95, "vCNV_MFUART1_RTS_B"), 237 + PINCTRL_PIN(96, "vUART0_TXD"), 238 + PINCTRL_PIN(97, "vUART0_RXD"), 239 + PINCTRL_PIN(98, "vUART0_CTS_B"), 240 + PINCTRL_PIN(99, "vUART0_RTS_B"), 241 + PINCTRL_PIN(100, "vOSE_UART0_TXD"), 242 + PINCTRL_PIN(101, "vOSE_UART0_RXD"), 243 + PINCTRL_PIN(102, "vOSE_UART0_CTS_B"), 244 + PINCTRL_PIN(103, "vOSE_UART0_RTS_B"), 245 + PINCTRL_PIN(104, "vCNV_BT_I2S_BCLK"), 246 + PINCTRL_PIN(105, "vCNV_BT_I2S_WS_SYNC"), 247 + PINCTRL_PIN(106, "vCNV_BT_I2S_SDO"), 248 + PINCTRL_PIN(107, "vCNV_BT_I2S_SDI"), 249 + PINCTRL_PIN(108, "vI2S2_SCLK"), 250 + PINCTRL_PIN(109, "vI2S2_SFRM"), 251 + PINCTRL_PIN(110, "vI2S2_TXD"), 252 + PINCTRL_PIN(111, "vI2S2_RXD"), 253 + PINCTRL_PIN(112, "vSD3_CD_B"), 254 + }; 255 + 256 + static const struct intel_padgroup ehl_community1_gpps[] = { 257 + EHL_GPP(0, 0, 15), /* GPP_V */ 258 + EHL_GPP(1, 16, 39), /* GPP_H */ 259 + EHL_GPP(2, 40, 60), /* GPP_D */ 260 + EHL_GPP(3, 61, 84), /* GPP_U */ 261 + EHL_GPP(4, 85, 112), /* vGPIO */ 262 + }; 263 + 264 + static const struct intel_community ehl_community1[] = { 265 + EHL_COMMUNITY(0, 112, ehl_community1_gpps), 266 + }; 267 + 268 + static const struct intel_pinctrl_soc_data ehl_community1_soc_data = { 269 + .uid = "1", 270 + .pins = ehl_community1_pins, 271 + .npins = ARRAY_SIZE(ehl_community1_pins), 272 + .communities = ehl_community1, 273 + .ncommunities = ARRAY_SIZE(ehl_community1), 274 + }; 275 + 276 + static const struct pinctrl_pin_desc ehl_community3_pins[] = { 277 + /* CPU */ 278 + PINCTRL_PIN(0, "HDACPU_SDI"), 279 + PINCTRL_PIN(1, "HDACPU_SDO"), 280 + PINCTRL_PIN(2, "HDACPU_BCLK"), 281 + PINCTRL_PIN(3, "PM_SYNC"), 282 + PINCTRL_PIN(4, "PECI"), 283 + PINCTRL_PIN(5, "CPUPWRGD"), 284 + PINCTRL_PIN(6, "THRMTRIPB"), 285 + PINCTRL_PIN(7, "PLTRST_CPUB"), 286 + PINCTRL_PIN(8, "PM_DOWN"), 287 + PINCTRL_PIN(9, "TRIGGER_IN"), 288 + PINCTRL_PIN(10, "TRIGGER_OUT"), 289 + PINCTRL_PIN(11, "UFS_RESETB"), 290 + PINCTRL_PIN(12, "CLKOUT_CPURTC"), 291 + PINCTRL_PIN(13, "VCCST_OVERRIDE"), 292 + PINCTRL_PIN(14, "C10_WAKE"), 293 + PINCTRL_PIN(15, "PROCHOTB"), 294 + PINCTRL_PIN(16, "CATERRB"), 295 + /* GPP_S */ 296 + PINCTRL_PIN(17, "UFS_REF_CLK_0"), 297 + PINCTRL_PIN(18, "UFS_REF_CLK_1"), 298 + /* GPP_A */ 299 + PINCTRL_PIN(19, "RGMII0_TXDATA_3"), 300 + PINCTRL_PIN(20, "RGMII0_TXDATA_2"), 301 + PINCTRL_PIN(21, "RGMII0_TXDATA_1"), 302 + PINCTRL_PIN(22, "RGMII0_TXDATA_0"), 303 + PINCTRL_PIN(23, "RGMII0_TXCLK"), 304 + PINCTRL_PIN(24, "RGMII0_TXCTL"), 305 + PINCTRL_PIN(25, "RGMII0_RXCLK"), 306 + PINCTRL_PIN(26, "RGMII0_RXDATA_3"), 307 + PINCTRL_PIN(27, "RGMII0_RXDATA_2"), 308 + PINCTRL_PIN(28, "RGMII0_RXDATA_1"), 309 + PINCTRL_PIN(29, "RGMII0_RXDATA_0"), 310 + PINCTRL_PIN(30, "RGMII1_TXDATA_3"), 311 + PINCTRL_PIN(31, "RGMII1_TXDATA_2"), 312 + PINCTRL_PIN(32, "RGMII1_TXDATA_1"), 313 + PINCTRL_PIN(33, "RGMII1_TXDATA_0"), 314 + PINCTRL_PIN(34, "RGMII1_TXCLK"), 315 + PINCTRL_PIN(35, "RGMII1_TXCTL"), 316 + PINCTRL_PIN(36, "RGMII1_RXCLK"), 317 + PINCTRL_PIN(37, "RGMII1_RXCTL"), 318 + PINCTRL_PIN(38, "RGMII1_RXDATA_3"), 319 + PINCTRL_PIN(39, "RGMII1_RXDATA_2"), 320 + PINCTRL_PIN(40, "RGMII1_RXDATA_1"), 321 + PINCTRL_PIN(41, "RGMII1_RXDATA_0"), 322 + PINCTRL_PIN(42, "RGMII0_RXCTL"), 323 + /* vGPIO_3 */ 324 + PINCTRL_PIN(43, "ESPI_USB_OCB_0"), 325 + PINCTRL_PIN(44, "ESPI_USB_OCB_1"), 326 + PINCTRL_PIN(45, "ESPI_USB_OCB_2"), 327 + PINCTRL_PIN(46, "ESPI_USB_OCB_3"), 328 + }; 329 + 330 + static const struct intel_padgroup ehl_community3_gpps[] = { 331 + EHL_GPP(0, 0, 16), /* CPU */ 332 + EHL_GPP(1, 17, 18), /* GPP_S */ 333 + EHL_GPP(2, 19, 42), /* GPP_A */ 334 + EHL_GPP(3, 43, 46), /* vGPIO_3 */ 335 + }; 336 + 337 + static const struct intel_community ehl_community3[] = { 338 + EHL_COMMUNITY(0, 46, ehl_community3_gpps), 339 + }; 340 + 341 + static const struct intel_pinctrl_soc_data ehl_community3_soc_data = { 342 + .uid = "3", 343 + .pins = ehl_community3_pins, 344 + .npins = ARRAY_SIZE(ehl_community3_pins), 345 + .communities = ehl_community3, 346 + .ncommunities = ARRAY_SIZE(ehl_community3), 347 + }; 348 + 349 + static const struct pinctrl_pin_desc ehl_community4_pins[] = { 350 + /* GPP_C */ 351 + PINCTRL_PIN(0, "SMBCLK"), 352 + PINCTRL_PIN(1, "SMBDATA"), 353 + PINCTRL_PIN(2, "OSE_PWM0"), 354 + PINCTRL_PIN(3, "RGMII0_MDC"), 355 + PINCTRL_PIN(4, "RGMII0_MDIO"), 356 + PINCTRL_PIN(5, "OSE_PWM1"), 357 + PINCTRL_PIN(6, "RGMII1_MDC"), 358 + PINCTRL_PIN(7, "RGMII1_MDIO"), 359 + PINCTRL_PIN(8, "OSE_TGPIO4"), 360 + PINCTRL_PIN(9, "OSE_HSUART0_EN"), 361 + PINCTRL_PIN(10, "OSE_TGPIO5"), 362 + PINCTRL_PIN(11, "OSE_HSUART0_RE"), 363 + PINCTRL_PIN(12, "OSE_UART0_RXD"), 364 + PINCTRL_PIN(13, "OSE_UART0_TXD"), 365 + PINCTRL_PIN(14, "OSE_UART0_RTSB"), 366 + PINCTRL_PIN(15, "OSE_UART0_CTSB"), 367 + PINCTRL_PIN(16, "RGMII2_MDIO"), 368 + PINCTRL_PIN(17, "RGMII2_MDC"), 369 + PINCTRL_PIN(18, "OSE_I2C4_SDAT"), 370 + PINCTRL_PIN(19, "OSE_I2C4_SCLK"), 371 + PINCTRL_PIN(20, "OSE_UART4_RXD"), 372 + PINCTRL_PIN(21, "OSE_UART4_TXD"), 373 + PINCTRL_PIN(22, "OSE_UART4_RTSB"), 374 + PINCTRL_PIN(23, "OSE_UART4_CTSB"), 375 + /* GPP_F */ 376 + PINCTRL_PIN(24, "CNV_BRI_DT"), 377 + PINCTRL_PIN(25, "CNV_BRI_RSP"), 378 + PINCTRL_PIN(26, "CNV_RGI_DT"), 379 + PINCTRL_PIN(27, "CNV_RGI_RSP"), 380 + PINCTRL_PIN(28, "CNV_RF_RESET_B"), 381 + PINCTRL_PIN(29, "EMMC_HIP_MON"), 382 + PINCTRL_PIN(30, "CNV_PA_BLANKING"), 383 + PINCTRL_PIN(31, "OSE_I2S1_SCLK"), 384 + PINCTRL_PIN(32, "I2S_MCLK2_INOUT"), 385 + PINCTRL_PIN(33, "BOOTMPC"), 386 + PINCTRL_PIN(34, "OSE_I2S1_SFRM"), 387 + PINCTRL_PIN(35, "GPPC_F_11"), 388 + PINCTRL_PIN(36, "GSXDOUT"), 389 + PINCTRL_PIN(37, "GSXSLOAD"), 390 + PINCTRL_PIN(38, "GSXDIN"), 391 + PINCTRL_PIN(39, "GSXSRESETB"), 392 + PINCTRL_PIN(40, "GSXCLK"), 393 + PINCTRL_PIN(41, "GPPC_F_17"), 394 + PINCTRL_PIN(42, "OSE_I2S1_TXD"), 395 + PINCTRL_PIN(43, "OSE_I2S1_RXD"), 396 + PINCTRL_PIN(44, "EXT_PWR_GATEB"), 397 + PINCTRL_PIN(45, "EXT_PWR_GATE2B"), 398 + PINCTRL_PIN(46, "VNN_CTRL"), 399 + PINCTRL_PIN(47, "V1P05_CTRL"), 400 + PINCTRL_PIN(48, "GPPF_CLK_LOOPBACK"), 401 + /* HVCMOS */ 402 + PINCTRL_PIN(49, "L_BKLTEN"), 403 + PINCTRL_PIN(50, "L_BKLTCTL"), 404 + PINCTRL_PIN(51, "L_VDDEN"), 405 + PINCTRL_PIN(52, "SYS_PWROK"), 406 + PINCTRL_PIN(53, "SYS_RESETB"), 407 + PINCTRL_PIN(54, "MLK_RSTB"), 408 + /* GPP_E */ 409 + PINCTRL_PIN(55, "SATA_LEDB"), 410 + PINCTRL_PIN(56, "GPPC_E_1"), 411 + PINCTRL_PIN(57, "GPPC_E_2"), 412 + PINCTRL_PIN(58, "DDSP_HPD_B"), 413 + PINCTRL_PIN(59, "SATA_DEVSLP_0"), 414 + PINCTRL_PIN(60, "DDPB_CTRLDATA"), 415 + PINCTRL_PIN(61, "GPPC_E_6"), 416 + PINCTRL_PIN(62, "DDPB_CTRLCLK"), 417 + PINCTRL_PIN(63, "GPPC_E_8"), 418 + PINCTRL_PIN(64, "USB2_OCB_0"), 419 + PINCTRL_PIN(65, "GPPC_E_10"), 420 + PINCTRL_PIN(66, "GPPC_E_11"), 421 + PINCTRL_PIN(67, "GPPC_E_12"), 422 + PINCTRL_PIN(68, "GPPC_E_13"), 423 + PINCTRL_PIN(69, "DDSP_HPD_A"), 424 + PINCTRL_PIN(70, "OSE_I2S0_RXD"), 425 + PINCTRL_PIN(71, "OSE_I2S0_TXD"), 426 + PINCTRL_PIN(72, "DDSP_HPD_C"), 427 + PINCTRL_PIN(73, "DDPA_CTRLDATA"), 428 + PINCTRL_PIN(74, "DDPA_CTRLCLK"), 429 + PINCTRL_PIN(75, "OSE_I2S0_SCLK"), 430 + PINCTRL_PIN(76, "OSE_I2S0_SFRM"), 431 + PINCTRL_PIN(77, "DDPC_CTRLDATA"), 432 + PINCTRL_PIN(78, "DDPC_CTRLCLK"), 433 + PINCTRL_PIN(79, "SPI1_CLK_LOOPBK"), 434 + }; 435 + 436 + static const struct intel_padgroup ehl_community4_gpps[] = { 437 + EHL_GPP(0, 0, 23), /* GPP_C */ 438 + EHL_GPP(1, 24, 48), /* GPP_F */ 439 + EHL_GPP(2, 49, 54), /* HVCMOS */ 440 + EHL_GPP(3, 55, 79), /* GPP_E */ 441 + }; 442 + 443 + static const struct intel_community ehl_community4[] = { 444 + EHL_COMMUNITY(0, 79, ehl_community4_gpps), 445 + }; 446 + 447 + static const struct intel_pinctrl_soc_data ehl_community4_soc_data = { 448 + .uid = "4", 449 + .pins = ehl_community4_pins, 450 + .npins = ARRAY_SIZE(ehl_community4_pins), 451 + .communities = ehl_community4, 452 + .ncommunities = ARRAY_SIZE(ehl_community4), 453 + }; 454 + 455 + static const struct pinctrl_pin_desc ehl_community5_pins[] = { 456 + /* GPP_R */ 457 + PINCTRL_PIN(0, "HDA_BCLK"), 458 + PINCTRL_PIN(1, "HDA_SYNC"), 459 + PINCTRL_PIN(2, "HDA_SDO"), 460 + PINCTRL_PIN(3, "HDA_SDI_0"), 461 + PINCTRL_PIN(4, "HDA_RSTB"), 462 + PINCTRL_PIN(5, "HDA_SDI_1"), 463 + PINCTRL_PIN(6, "GPP_R_6"), 464 + PINCTRL_PIN(7, "GPP_R_7"), 465 + }; 466 + 467 + static const struct intel_padgroup ehl_community5_gpps[] = { 468 + EHL_GPP(0, 0, 7), /* GPP_R */ 469 + }; 470 + 471 + static const struct intel_community ehl_community5[] = { 472 + EHL_COMMUNITY(0, 7, ehl_community5_gpps), 473 + }; 474 + 475 + static const struct intel_pinctrl_soc_data ehl_community5_soc_data = { 476 + .uid = "5", 477 + .pins = ehl_community5_pins, 478 + .npins = ARRAY_SIZE(ehl_community5_pins), 479 + .communities = ehl_community5, 480 + .ncommunities = ARRAY_SIZE(ehl_community5), 481 + }; 482 + 483 + static const struct intel_pinctrl_soc_data *ehl_soc_data_array[] = { 484 + &ehl_community0_soc_data, 485 + &ehl_community1_soc_data, 486 + &ehl_community3_soc_data, 487 + &ehl_community4_soc_data, 488 + &ehl_community5_soc_data, 489 + NULL 490 + }; 491 + 492 + static const struct acpi_device_id ehl_pinctrl_acpi_match[] = { 493 + { "INTC1020", (kernel_ulong_t)ehl_soc_data_array }, 494 + { } 495 + }; 496 + MODULE_DEVICE_TABLE(acpi, ehl_pinctrl_acpi_match); 497 + 498 + static INTEL_PINCTRL_PM_OPS(ehl_pinctrl_pm_ops); 499 + 500 + static struct platform_driver ehl_pinctrl_driver = { 501 + .probe = intel_pinctrl_probe_by_uid, 502 + .driver = { 503 + .name = "elkhartlake-pinctrl", 504 + .acpi_match_table = ehl_pinctrl_acpi_match, 505 + .pm = &ehl_pinctrl_pm_ops, 506 + }, 507 + }; 508 + 509 + module_platform_driver(ehl_pinctrl_driver); 510 + 511 + MODULE_AUTHOR("Andy Shevchenko <andriy.shevchenko@linux.intel.com>"); 512 + MODULE_DESCRIPTION("Intel Elkhart Lake PCH pinctrl/GPIO driver"); 513 + MODULE_LICENSE("GPL v2");
+375
drivers/pinctrl/intel/pinctrl-lakefield.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 2 + /* 3 + * Intel Lakefield PCH pinctrl/GPIO driver 4 + * 5 + * Copyright (C) 2020, Intel Corporation 6 + * Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com> 7 + */ 8 + 9 + #include <linux/mod_devicetable.h> 10 + #include <linux/module.h> 11 + #include <linux/platform_device.h> 12 + 13 + #include <linux/pinctrl/pinctrl.h> 14 + 15 + #include "pinctrl-intel.h" 16 + 17 + #define LKF_PAD_OWN 0x020 18 + #define LKF_PADCFGLOCK 0x070 19 + #define LKF_HOSTSW_OWN 0x090 20 + #define LKF_GPI_IS 0x100 21 + #define LKF_GPI_IE 0x110 22 + 23 + #define LKF_GPP(r, s, e, g) \ 24 + { \ 25 + .reg_num = (r), \ 26 + .base = (s), \ 27 + .size = ((e) - (s) + 1), \ 28 + .gpio_base = (g), \ 29 + } 30 + 31 + #define LKF_COMMUNITY(b, s, e, g) \ 32 + { \ 33 + .barno = (b), \ 34 + .padown_offset = LKF_PAD_OWN, \ 35 + .padcfglock_offset = LKF_PADCFGLOCK, \ 36 + .hostown_offset = LKF_HOSTSW_OWN, \ 37 + .is_offset = LKF_GPI_IS, \ 38 + .ie_offset = LKF_GPI_IE, \ 39 + .pin_base = (s), \ 40 + .npins = ((e) - (s) + 1), \ 41 + .gpps = (g), \ 42 + .ngpps = ARRAY_SIZE(g), \ 43 + } 44 + 45 + /* Lakefield */ 46 + static const struct pinctrl_pin_desc lkf_pins[] = { 47 + /* EAST */ 48 + PINCTRL_PIN(0, "MDSI_A_TE0"), 49 + PINCTRL_PIN(1, "MDSI_A_TE1"), 50 + PINCTRL_PIN(2, "PANEL0_AVDD_EN"), 51 + PINCTRL_PIN(3, "PANEL0_BKLTEN"), 52 + PINCTRL_PIN(4, "PANEL0_BKLTCTL"), 53 + PINCTRL_PIN(5, "PANEL1_AVDD_EN"), 54 + PINCTRL_PIN(6, "PANEL1_BKLTEN"), 55 + PINCTRL_PIN(7, "PANEL1_BKLTCTL"), 56 + PINCTRL_PIN(8, "THC0_SPI1_IO_0"), 57 + PINCTRL_PIN(9, "THC0_SPI1_IO_1"), 58 + PINCTRL_PIN(10, "THC0_SPI1_IO_2"), 59 + PINCTRL_PIN(11, "THC0_SPI1_IO_3"), 60 + PINCTRL_PIN(12, "THC0_SPI1_CSB"), 61 + PINCTRL_PIN(13, "THC0_SPI1_CLK"), 62 + PINCTRL_PIN(14, "THC0_SPI1_RESETB"), 63 + PINCTRL_PIN(15, "THC0_SPI1_CLK_FB"), 64 + PINCTRL_PIN(16, "SPI_TOUCH_CLK_FB"), 65 + PINCTRL_PIN(17, "THC1_SPI2_IO_0"), 66 + PINCTRL_PIN(18, "THC1_SPI2_IO_1"), 67 + PINCTRL_PIN(19, "THC1_SPI2_IO_2"), 68 + PINCTRL_PIN(20, "THC1_SPI2_IO_3"), 69 + PINCTRL_PIN(21, "THC1_SPI2_CSB"), 70 + PINCTRL_PIN(22, "THC1_SPI2_CLK"), 71 + PINCTRL_PIN(23, "THC1_SPI2_RESETB"), 72 + PINCTRL_PIN(24, "THC1_SPI2_CLK_FB"), 73 + PINCTRL_PIN(25, "eSPI_IO_0"), 74 + PINCTRL_PIN(26, "eSPI_IO_1"), 75 + PINCTRL_PIN(27, "eSPI_IO_2"), 76 + PINCTRL_PIN(28, "eSPI_IO_3"), 77 + PINCTRL_PIN(29, "eSPI_CSB"), 78 + PINCTRL_PIN(30, "eSPI_RESETB"), 79 + PINCTRL_PIN(31, "eSPI_CLK"), 80 + PINCTRL_PIN(32, "eSPI_CLK_FB"), 81 + PINCTRL_PIN(33, "FAST_SPI0_IO_0"), 82 + PINCTRL_PIN(34, "FAST_SPI0_IO_1"), 83 + PINCTRL_PIN(35, "FAST_SPI0_IO_2"), 84 + PINCTRL_PIN(36, "FAST_SPI0_IO_3"), 85 + PINCTRL_PIN(37, "FAST_SPI0_CSB_0"), 86 + PINCTRL_PIN(38, "FAST_SPI0_CSB_2"), 87 + PINCTRL_PIN(39, "FAST_SPI0_CLK"), 88 + PINCTRL_PIN(40, "FAST_SPI_CLK_FB"), 89 + PINCTRL_PIN(41, "FAST_SPI0_CSB_1"), 90 + PINCTRL_PIN(42, "ISH_GP_12"), 91 + PINCTRL_PIN(43, "THC0_SPI1_INTB"), 92 + PINCTRL_PIN(44, "THC1_SPI2_INTB"), 93 + PINCTRL_PIN(45, "PANEL0_AVEE_EN"), 94 + PINCTRL_PIN(46, "PANEL0_VIO_EN"), 95 + PINCTRL_PIN(47, "PANEL1_AVEE_EN"), 96 + PINCTRL_PIN(48, "PANEL1_VIO_EN"), 97 + PINCTRL_PIN(49, "PANEL0_RESET"), 98 + PINCTRL_PIN(50, "PANEL1_RESET"), 99 + PINCTRL_PIN(51, "ISH_GP_15"), 100 + PINCTRL_PIN(52, "ISH_GP_16"), 101 + PINCTRL_PIN(53, "ISH_GP_17"), 102 + PINCTRL_PIN(54, "ISH_GP_18"), 103 + PINCTRL_PIN(55, "ISH_GP_19"), 104 + PINCTRL_PIN(56, "ISH_GP_20"), 105 + PINCTRL_PIN(57, "ISH_GP_21"), 106 + PINCTRL_PIN(58, "ISH_GP_22"), 107 + PINCTRL_PIN(59, "ISH_GP_23"), 108 + /* NORTHWEST */ 109 + PINCTRL_PIN(60, "MCSI_GPIO_0"), 110 + PINCTRL_PIN(61, "MCSI_GPIO_1"), 111 + PINCTRL_PIN(62, "MCSI_GPIO_2"), 112 + PINCTRL_PIN(63, "MCSI_GPIO_3"), 113 + PINCTRL_PIN(64, "LPSS_I2C0_SDA"), 114 + PINCTRL_PIN(65, "LPSS_I2C0_SCL"), 115 + PINCTRL_PIN(66, "LPSS_I2C1_SDA"), 116 + PINCTRL_PIN(67, "LPSS_I2C1_SCL"), 117 + PINCTRL_PIN(68, "LPSS_I2C2_SDA"), 118 + PINCTRL_PIN(69, "LPSS_I2C2_SCL"), 119 + PINCTRL_PIN(70, "LPSS_I2C3_SDA"), 120 + PINCTRL_PIN(71, "LPSS_I2C3_SCL"), 121 + PINCTRL_PIN(72, "LPSS_I2C4_SDA"), 122 + PINCTRL_PIN(73, "LPSS_I2C4_SCL"), 123 + PINCTRL_PIN(74, "LPSS_I2C5_SDA"), 124 + PINCTRL_PIN(75, "LPSS_I2C5_SCL"), 125 + PINCTRL_PIN(76, "LPSS_I3C0_SDA"), 126 + PINCTRL_PIN(77, "LPSS_I3C0_SCL"), 127 + PINCTRL_PIN(78, "LPSS_I3C0_SCL_FB"), 128 + PINCTRL_PIN(79, "LPSS_I3C1_SDA"), 129 + PINCTRL_PIN(80, "LPSS_I3C1_SCL"), 130 + PINCTRL_PIN(81, "LPSS_I3C1_SCL_FB"), 131 + PINCTRL_PIN(82, "ISH_I2C0_SDA"), 132 + PINCTRL_PIN(83, "ISH_I2C0_SCL"), 133 + PINCTRL_PIN(84, "ISH_I2C1_SCL"), 134 + PINCTRL_PIN(85, "ISH_I2C1_SDA"), 135 + PINCTRL_PIN(86, "DBG_PMODE"), 136 + PINCTRL_PIN(87, "BJTAG_TCK"), 137 + PINCTRL_PIN(88, "BJTAG_TDI"), 138 + PINCTRL_PIN(89, "BJTAGX"), 139 + PINCTRL_PIN(90, "BPREQ_B"), 140 + PINCTRL_PIN(91, "BJTAG_TMS"), 141 + PINCTRL_PIN(92, "BPRDY_B"), 142 + PINCTRL_PIN(93, "BJTAG_TDO"), 143 + PINCTRL_PIN(94, "BJTAG_TRST_B_0"), 144 + PINCTRL_PIN(95, "ISH_I3C0_SDA"), 145 + PINCTRL_PIN(96, "ISH_I3C0_SCL"), 146 + PINCTRL_PIN(97, "ISH_I3C0_SCL_FB"), 147 + PINCTRL_PIN(98, "AVS_I2S_BCLK_0"), 148 + PINCTRL_PIN(99, "AVS_I2S_MCLK_0"), 149 + PINCTRL_PIN(100, "AVS_I2S_SFRM_0"), 150 + PINCTRL_PIN(101, "AVS_I2S_RXD_0"), 151 + PINCTRL_PIN(102, "AVS_I2S_TXD_0"), 152 + PINCTRL_PIN(103, "AVS_I2S_BCLK_1"), 153 + PINCTRL_PIN(104, "AVS_I2S_SFRM_1"), 154 + PINCTRL_PIN(105, "AVS_I2S_RXD_1"), 155 + PINCTRL_PIN(106, "AVS_I2S_TXD_1"), 156 + PINCTRL_PIN(107, "AVS_I2S_BCLK_2"), 157 + PINCTRL_PIN(108, "AVS_I2S_SFRM_2"), 158 + PINCTRL_PIN(109, "AVS_I2S_RXD_2"), 159 + PINCTRL_PIN(110, "AVS_I2S_TXD_2"), 160 + PINCTRL_PIN(111, "AVS_I2S_BCLK_3"), 161 + PINCTRL_PIN(112, "AVS_I2S_SFRM_3"), 162 + PINCTRL_PIN(113, "AVS_I2S_RXD_3"), 163 + PINCTRL_PIN(114, "AVS_I2S_TXD_3"), 164 + PINCTRL_PIN(115, "AVS_I2S_BCLK_4"), 165 + PINCTRL_PIN(116, "AVS_I2S_SFRM_4"), 166 + PINCTRL_PIN(117, "AVS_I2S_RXD_4"), 167 + PINCTRL_PIN(118, "AVS_I2S_TXD_4"), 168 + PINCTRL_PIN(119, "AVS_I2S_SFRM_5"), 169 + PINCTRL_PIN(120, "AVS_I2S_RXD_5"), 170 + PINCTRL_PIN(121, "AVS_I2S_TXD_5"), 171 + PINCTRL_PIN(122, "AVS_I2S_BCLK_5"), 172 + PINCTRL_PIN(123, "AVS_SNDW_CLK_0"), 173 + PINCTRL_PIN(124, "AVS_SNDW_DATA_0"), 174 + PINCTRL_PIN(125, "AVS_SNDW_CLK_1"), 175 + PINCTRL_PIN(126, "AVS_SNDW_DATA_1"), 176 + PINCTRL_PIN(127, "AVS_SNDW_CLK_2"), 177 + PINCTRL_PIN(128, "AVS_SNDW_DATA_2"), 178 + PINCTRL_PIN(129, "AVS_SNDW_CLK_3"), 179 + PINCTRL_PIN(130, "AVS_SNDW_DATA_3"), 180 + PINCTRL_PIN(131, "VISA_PTI_CH0_D0_internal"), 181 + PINCTRL_PIN(132, "VISA_PTI_CH0_D1_internal"), 182 + PINCTRL_PIN(133, "VISA_PTI_CH0_D2_internal"), 183 + PINCTRL_PIN(134, "VISA_PTI_CH0_D3_internal"), 184 + PINCTRL_PIN(135, "VISA_PTI_CH0_D4_internal"), 185 + PINCTRL_PIN(136, "VISA_PTI_CH0_D5_internal"), 186 + PINCTRL_PIN(137, "VISA_PTI_CH0_D6_internal"), 187 + PINCTRL_PIN(138, "VISA_PTI_CH0_D7_internal"), 188 + PINCTRL_PIN(139, "VISA_PTI_CH0_CLK_internal"), 189 + PINCTRL_PIN(140, "VISA_PTI_CH1_D0_internal"), 190 + PINCTRL_PIN(141, "VISA_PTI_CH1_D1_internal"), 191 + PINCTRL_PIN(142, "VISA_PTI_CH1_D2_internal"), 192 + PINCTRL_PIN(143, "VISA_PTI_CH1_D3_internal"), 193 + PINCTRL_PIN(144, "VISA_PTI_CH1_D4_internal"), 194 + PINCTRL_PIN(145, "VISA_PTI_CH1_D5_internal"), 195 + PINCTRL_PIN(146, "VISA_PTI_CH1_D6_internal"), 196 + PINCTRL_PIN(147, "VISA_PTI_CH1_D7_internal"), 197 + PINCTRL_PIN(148, "VISA_PTI_CH1_CLK_internal"), 198 + /* WEST */ 199 + PINCTRL_PIN(149, "LPSS_UART0_TXD"), 200 + PINCTRL_PIN(150, "LPSS_UART0_RXD"), 201 + PINCTRL_PIN(151, "LPSS_UART0_RTS_B"), 202 + PINCTRL_PIN(152, "LPSS_UART0_CTS_B"), 203 + PINCTRL_PIN(153, "LPSS_UART1_RXD"), 204 + PINCTRL_PIN(154, "LPSS_UART1_TXD"), 205 + PINCTRL_PIN(155, "LPSS_UART1_RTS_B"), 206 + PINCTRL_PIN(156, "LPSS_UART1_CTS_B"), 207 + PINCTRL_PIN(157, "ISH_UART0_RXD"), 208 + PINCTRL_PIN(158, "ISH_UART0_TXD"), 209 + PINCTRL_PIN(159, "ISH_UART0_RTSB"), 210 + PINCTRL_PIN(160, "ISH_UART0_CTSB"), 211 + PINCTRL_PIN(161, "LPSS_SSP_0_CLK"), 212 + PINCTRL_PIN(162, "LPSS_SSP_0_CLK_FB"), 213 + PINCTRL_PIN(163, "LPSS_SSP_0_FS0"), 214 + PINCTRL_PIN(164, "LPSS_SSP_0_FS1"), 215 + PINCTRL_PIN(165, "LPSS_SSP_0_RXD"), 216 + PINCTRL_PIN(166, "LPSS_SSP_0_TXD"), 217 + PINCTRL_PIN(167, "ISH_UART1_RXD"), 218 + PINCTRL_PIN(168, "ISH_UART1_TXD"), 219 + PINCTRL_PIN(169, "ISH_UART1_RTSB"), 220 + PINCTRL_PIN(170, "ISH_UART1_CTSB"), 221 + PINCTRL_PIN(171, "LPSS_SSP_1_FS0"), 222 + PINCTRL_PIN(172, "LPSS_SSP_1_FS1"), 223 + PINCTRL_PIN(173, "LPSS_SSP_1_CLK"), 224 + PINCTRL_PIN(174, "LPSS_SSP_1_CLK_FB"), 225 + PINCTRL_PIN(175, "LPSS_SSP_1_RXD"), 226 + PINCTRL_PIN(176, "LPSS_SSP_1_TXD"), 227 + PINCTRL_PIN(177, "LPSS_SSP_2_CLK"), 228 + PINCTRL_PIN(178, "LPSS_SSP_2_CLK_FB"), 229 + PINCTRL_PIN(179, "LPSS_SSP_2_FS0"), 230 + PINCTRL_PIN(180, "LPSS_SSP_2_FS1"), 231 + PINCTRL_PIN(181, "LPSS_SSP_2_RXD"), 232 + PINCTRL_PIN(182, "LPSS_SSP_2_TXD"), 233 + PINCTRL_PIN(183, "ISH_SPI0_CSB0"), 234 + PINCTRL_PIN(184, "ISH_SPI0_CSB1"), 235 + PINCTRL_PIN(185, "ISH_SPI0_CLK"), 236 + PINCTRL_PIN(186, "ISH_SPI0_MISO"), 237 + PINCTRL_PIN(187, "ISH_SPI0_MOSI"), 238 + PINCTRL_PIN(188, "ISH_GP_0"), 239 + PINCTRL_PIN(189, "ISH_GP_1"), 240 + PINCTRL_PIN(190, "ISH_GP_2"), 241 + PINCTRL_PIN(191, "ISH_GP_13"), 242 + PINCTRL_PIN(192, "ISH_GP_3"), 243 + PINCTRL_PIN(193, "ISH_GP_4"), 244 + PINCTRL_PIN(194, "ISH_GP_5"), 245 + PINCTRL_PIN(195, "ISH_GP_6"), 246 + PINCTRL_PIN(196, "ISH_GP_7"), 247 + PINCTRL_PIN(197, "ISH_GP_8"), 248 + PINCTRL_PIN(198, "ISH_GP_9"), 249 + PINCTRL_PIN(199, "ISH_GP_10"), 250 + PINCTRL_PIN(200, "ISH_GP_11"), 251 + PINCTRL_PIN(201, "ISH_GP_14"), 252 + PINCTRL_PIN(202, "ISH_GP_15"), 253 + PINCTRL_PIN(203, "ISH_GP_22"), 254 + PINCTRL_PIN(204, "ISH_GP_12"), 255 + PINCTRL_PIN(205, "ISH_GP_30_USB_OC"), 256 + PINCTRL_PIN(206, "LPDDRx_RESET0_n"), 257 + PINCTRL_PIN(207, "UFS_RESET_B"), 258 + PINCTRL_PIN(208, "UFS_REFCLK0"), 259 + PINCTRL_PIN(209, "EMMC_SD_CLK"), 260 + PINCTRL_PIN(210, "EMMC_SD_D0"), 261 + PINCTRL_PIN(211, "EMMC_SD_D1"), 262 + PINCTRL_PIN(212, "EMMC_SD_D2"), 263 + PINCTRL_PIN(213, "EMMC_SD_D3"), 264 + PINCTRL_PIN(214, "EMMC_D4"), 265 + PINCTRL_PIN(215, "EMMC_D5"), 266 + PINCTRL_PIN(216, "EMMC_D6"), 267 + PINCTRL_PIN(217, "EMMC_D7"), 268 + PINCTRL_PIN(218, "EMMC_SD_CMD"), 269 + PINCTRL_PIN(219, "EMMC_RCLK"), 270 + PINCTRL_PIN(220, "SDCARD_CLK_FB"), 271 + PINCTRL_PIN(221, "SD_Virtual_GPIO"), 272 + PINCTRL_PIN(222, "OSC_CLK_OUT_NFC"), 273 + PINCTRL_PIN(223, "OSC_CLK_OUT_CAM_0"), 274 + PINCTRL_PIN(224, "OSC_CLK_OUT_CAM_1"), 275 + PINCTRL_PIN(225, "OSC_CLK_OUT_CAM_2"), 276 + PINCTRL_PIN(226, "OSC_CLK_OUT_CAM_3"), 277 + PINCTRL_PIN(227, "PCIe_LINKDOWN"), 278 + PINCTRL_PIN(228, "NFC_CLK_REQ"), 279 + PINCTRL_PIN(229, "PCIE_CLKREQ_N_DEV2"), 280 + PINCTRL_PIN(230, "PCIE_CLKREQ_N_DEV3"), 281 + PINCTRL_PIN(231, "PCIE_CLKREQ_N_DEV4"), 282 + PINCTRL_PIN(232, "PCIE_CLKREQ_N_DEV1"), 283 + PINCTRL_PIN(233, "PCIE_CLKREQ_N_DEV0"), 284 + PINCTRL_PIN(234, "GMBUS_1_SCL"), 285 + PINCTRL_PIN(235, "GMBUS_1_SDA"), 286 + PINCTRL_PIN(236, "GMBUS_0_SCL"), 287 + PINCTRL_PIN(237, "GMBUS_0_SDA"), 288 + /* SOUTHEAST */ 289 + PINCTRL_PIN(238, "COMPUTE_PMIC_SVID_DATA"), 290 + PINCTRL_PIN(239, "COMPUTE_PMIC_SVID_CLK"), 291 + PINCTRL_PIN(240, "COMPUTE_PMIC_SVID_ALERT_B"), 292 + PINCTRL_PIN(241, "ROP_PMIC_I2C_SCL"), 293 + PINCTRL_PIN(242, "ROP_PMIC_I2C_SDA"), 294 + PINCTRL_PIN(243, "ISH_TYPEC_I2C2_SDA"), 295 + PINCTRL_PIN(244, "ISH_TYPEC_I2C2_SCL"), 296 + PINCTRL_PIN(245, "COMPUTE_PMU_PROCHOT_B"), 297 + PINCTRL_PIN(246, "PMU_CATERR_B"), 298 + PINCTRL_PIN(247, "COMPUTE_PMIC_VR_READY"), 299 + PINCTRL_PIN(248, "FORCE_FW_RELOAD"), 300 + PINCTRL_PIN(249, "ROP_PMIC_IRQ_ISH_GPIO31_TPC_ALERT_B"), 301 + PINCTRL_PIN(250, "ROP_PMIC_RESET_B"), 302 + PINCTRL_PIN(251, "ROP_PMIC_STNBY_SLP_S0_B"), 303 + PINCTRL_PIN(252, "ROP_PMIC_THERMTRIP_B"), 304 + PINCTRL_PIN(253, "MODEM_CLKREQ"), 305 + PINCTRL_PIN(254, "TPC0_BSSB_SBU1"), 306 + PINCTRL_PIN(255, "TPC0_BSSB_SBU2"), 307 + PINCTRL_PIN(256, "OSC_CLK_OUT_CAM_4"), 308 + PINCTRL_PIN(257, "HPD1"), 309 + PINCTRL_PIN(258, "HPD0"), 310 + PINCTRL_PIN(259, "PMC_TIME_SYNC_0"), 311 + PINCTRL_PIN(260, "PMC_TIME_SYNC_1"), 312 + PINCTRL_PIN(261, "OSC_CLK_OUT_CAM_5"), 313 + PINCTRL_PIN(262, "ISH_GP_20"), 314 + PINCTRL_PIN(263, "ISH_GP_16"), 315 + PINCTRL_PIN(264, "ISH_GP_17"), 316 + PINCTRL_PIN(265, "ISH_GP_18"), 317 + PINCTRL_PIN(266, "ISH_GP_19"), 318 + }; 319 + 320 + static const struct intel_padgroup lkf_community0_gpps[] = { 321 + LKF_GPP(0, 0, 31, 0), /* EAST_0 */ 322 + LKF_GPP(1, 32, 59, 32), /* EAST_1 */ 323 + }; 324 + 325 + static const struct intel_padgroup lkf_community1_gpps[] = { 326 + LKF_GPP(0, 60, 91, 64), /* NORTHWEST_0 */ 327 + LKF_GPP(1, 92, 123, 96), /* NORTHWEST_1 */ 328 + LKF_GPP(2, 124, 148, 128), /* NORTHWEST_2 */ 329 + }; 330 + 331 + static const struct intel_padgroup lkf_community2_gpps[] = { 332 + LKF_GPP(0, 149, 180, 160), /* WEST_0 */ 333 + LKF_GPP(1, 181, 212, 192), /* WEST_1 */ 334 + LKF_GPP(2, 213, 237, 224), /* WEST_2 */ 335 + }; 336 + 337 + static const struct intel_padgroup lkf_community3_gpps[] = { 338 + LKF_GPP(0, 238, 266, 256), /* SOUTHEAST */ 339 + }; 340 + 341 + static const struct intel_community lkf_communities[] = { 342 + LKF_COMMUNITY(0, 0, 59, lkf_community0_gpps), /* EAST */ 343 + LKF_COMMUNITY(1, 60, 148, lkf_community1_gpps), /* NORTHWEST */ 344 + LKF_COMMUNITY(2, 149, 237, lkf_community2_gpps), /* WEST */ 345 + LKF_COMMUNITY(3, 238, 266, lkf_community3_gpps), /* SOUTHEAST */ 346 + }; 347 + 348 + static const struct intel_pinctrl_soc_data lkf_soc_data = { 349 + .pins = lkf_pins, 350 + .npins = ARRAY_SIZE(lkf_pins), 351 + .communities = lkf_communities, 352 + .ncommunities = ARRAY_SIZE(lkf_communities), 353 + }; 354 + 355 + static const struct acpi_device_id lkf_pinctrl_acpi_match[] = { 356 + { "INT34C4", (kernel_ulong_t)&lkf_soc_data }, 357 + { } 358 + }; 359 + MODULE_DEVICE_TABLE(acpi, lkf_pinctrl_acpi_match); 360 + 361 + static INTEL_PINCTRL_PM_OPS(lkf_pinctrl_pm_ops); 362 + 363 + static struct platform_driver lkf_pinctrl_driver = { 364 + .probe = intel_pinctrl_probe_by_hid, 365 + .driver = { 366 + .name = "lakefield-pinctrl", 367 + .acpi_match_table = lkf_pinctrl_acpi_match, 368 + .pm = &lkf_pinctrl_pm_ops, 369 + }, 370 + }; 371 + module_platform_driver(lkf_pinctrl_driver); 372 + 373 + MODULE_AUTHOR("Andy Shevchenko <andriy.shevchenko@linux.intel.com>"); 374 + MODULE_DESCRIPTION("Intel Lakefield PCH pinctrl/GPIO driver"); 375 + MODULE_LICENSE("GPL v2");
+6 -4
drivers/pinctrl/intel/pinctrl-lynxpoint.c
··· 496 496 enum pin_config_param param = pinconf_to_config_param(*config); 497 497 unsigned long flags; 498 498 u32 value, pull; 499 - u16 arg = 0; 499 + u16 arg; 500 500 501 501 raw_spin_lock_irqsave(&lg->lock, flags); 502 502 value = ioread32(conf2); ··· 506 506 507 507 switch (param) { 508 508 case PIN_CONFIG_BIAS_DISABLE: 509 - if (pull) 509 + if (pull != GPIWP_NONE) 510 510 return -EINVAL; 511 + arg = 0; 511 512 break; 512 513 case PIN_CONFIG_BIAS_PULL_DOWN: 513 514 if (pull != GPIWP_DOWN) ··· 551 550 switch (param) { 552 551 case PIN_CONFIG_BIAS_DISABLE: 553 552 value &= ~GPIWP_MASK; 553 + value |= GPIWP_NONE; 554 554 break; 555 555 case PIN_CONFIG_BIAS_PULL_DOWN: 556 556 value &= ~GPIWP_MASK; ··· 874 872 gc->direction_output = lp_gpio_direction_output; 875 873 gc->get = lp_gpio_get; 876 874 gc->set = lp_gpio_set; 875 + gc->set_config = gpiochip_generic_config; 877 876 gc->get_direction = lp_gpio_get_direction; 878 877 gc->base = -1; 879 878 gc->ngpio = LP_NUM_GPIO; ··· 970 967 { 971 968 return platform_driver_register(&lp_gpio_driver); 972 969 } 970 + subsys_initcall(lp_gpio_init); 973 971 974 972 static void __exit lp_gpio_exit(void) 975 973 { 976 974 platform_driver_unregister(&lp_gpio_driver); 977 975 } 978 - 979 - subsys_initcall(lp_gpio_init); 980 976 module_exit(lp_gpio_exit); 981 977 982 978 MODULE_AUTHOR("Mathias Nyman (Intel)");
+1 -12
drivers/pinctrl/mediatek/pinctrl-mt7622.c
··· 501 501 static int mt7622_pwm_ch6_2_funcs[] = { 4, }; 502 502 static int mt7622_pwm_ch6_3_pins[] = { 100, }; 503 503 static int mt7622_pwm_ch6_3_funcs[] = { 0, }; 504 - static int mt7622_pwm_ch7_0_pins[] = { 70, }; 505 - static int mt7622_pwm_ch7_0_funcs[] = { 3, }; 506 - static int mt7622_pwm_ch7_1_pins[] = { 82, }; 507 - static int mt7622_pwm_ch7_1_funcs[] = { 4, }; 508 - static int mt7622_pwm_ch7_2_pins[] = { 101, }; 509 - static int mt7622_pwm_ch7_2_funcs[] = { 0, }; 510 504 511 505 /* SD */ 512 506 static int mt7622_sd_0_pins[] = { 16, 17, 18, 19, 20, 21, }; ··· 697 703 PINCTRL_PIN_GROUP("pwm_ch6_1", mt7622_pwm_ch6_1), 698 704 PINCTRL_PIN_GROUP("pwm_ch6_2", mt7622_pwm_ch6_2), 699 705 PINCTRL_PIN_GROUP("pwm_ch6_3", mt7622_pwm_ch6_3), 700 - PINCTRL_PIN_GROUP("pwm_ch7_0", mt7622_pwm_ch7_0), 701 - PINCTRL_PIN_GROUP("pwm_ch7_1", mt7622_pwm_ch7_1), 702 - PINCTRL_PIN_GROUP("pwm_ch7_2", mt7622_pwm_ch7_2), 703 706 PINCTRL_PIN_GROUP("sd_0", mt7622_sd_0), 704 707 PINCTRL_PIN_GROUP("sd_1", mt7622_sd_1), 705 708 PINCTRL_PIN_GROUP("snfi", mt7622_snfi), ··· 793 802 "pwm_ch4_3", "pwm_ch5_0", 794 803 "pwm_ch5_1", "pwm_ch5_2", 795 804 "pwm_ch6_0", "pwm_ch6_1", 796 - "pwm_ch6_2", "pwm_ch6_3", 797 - "pwm_ch7_0", "pwm_ch7_1", 798 - "pwm_ch7_2", }; 805 + "pwm_ch6_2", "pwm_ch6_3", }; 799 806 static const char *mt7622_sd_groups[] = { "sd_0", "sd_1", }; 800 807 static const char *mt7622_spic_groups[] = { "spic0_0", "spic0_1", "spic1_0", 801 808 "spic1_1", "spic2_0",
+2 -8
drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c
··· 488 488 int mtk_pinconf_bias_disable_set_rev1(struct mtk_pinctrl *hw, 489 489 const struct mtk_pin_desc *desc) 490 490 { 491 - int err; 492 - 493 - err = mtk_hw_set_value(hw, desc, PINCTRL_PIN_REG_PULLEN, 494 - MTK_DISABLE); 495 - if (err) 496 - return err; 497 - 498 - return 0; 491 + return mtk_hw_set_value(hw, desc, PINCTRL_PIN_REG_PULLEN, 492 + MTK_DISABLE); 499 493 } 500 494 EXPORT_SYMBOL_GPL(mtk_pinconf_bias_disable_set_rev1); 501 495
+4 -4
drivers/pinctrl/mediatek/pinctrl-paris.c
··· 247 247 err = mtk_hw_set_value(hw, desc, PINCTRL_PIN_REG_SR, !!arg); 248 248 break; 249 249 case PIN_CONFIG_OUTPUT: 250 - err = mtk_hw_set_value(hw, desc, PINCTRL_PIN_REG_DIR, 251 - MTK_OUTPUT); 250 + err = mtk_hw_set_value(hw, desc, PINCTRL_PIN_REG_DO, 251 + arg); 252 252 if (err) 253 253 goto err; 254 254 255 - err = mtk_hw_set_value(hw, desc, PINCTRL_PIN_REG_DO, 256 - arg); 255 + err = mtk_hw_set_value(hw, desc, PINCTRL_PIN_REG_DIR, 256 + MTK_OUTPUT); 257 257 break; 258 258 case PIN_CONFIG_INPUT_SCHMITT: 259 259 case PIN_CONFIG_INPUT_SCHMITT_ENABLE:
+9 -8
drivers/pinctrl/meson/Kconfig
··· 1 1 # SPDX-License-Identifier: GPL-2.0-only 2 2 menuconfig PINCTRL_MESON 3 - bool "Amlogic SoC pinctrl drivers" 3 + tristate "Amlogic SoC pinctrl drivers" 4 4 depends on ARCH_MESON 5 5 depends on OF 6 + default y 6 7 select PINMUX 7 8 select PINCONF 8 9 select GENERIC_PINCONF ··· 26 25 default y 27 26 28 27 config PINCTRL_MESON_GXBB 29 - bool "Meson gxbb SoC pinctrl driver" 28 + tristate "Meson gxbb SoC pinctrl driver" 30 29 depends on ARM64 31 30 select PINCTRL_MESON8_PMX 32 31 default y 33 32 34 33 config PINCTRL_MESON_GXL 35 - bool "Meson gxl SoC pinctrl driver" 34 + tristate "Meson gxl SoC pinctrl driver" 36 35 depends on ARM64 37 36 select PINCTRL_MESON8_PMX 38 37 default y 39 38 40 39 config PINCTRL_MESON8_PMX 41 - bool 40 + tristate 42 41 43 42 config PINCTRL_MESON_AXG 44 - bool "Meson axg Soc pinctrl driver" 43 + tristate "Meson axg Soc pinctrl driver" 45 44 depends on ARM64 46 45 select PINCTRL_MESON_AXG_PMX 47 46 default y 48 47 49 48 config PINCTRL_MESON_AXG_PMX 50 - bool 49 + tristate 51 50 52 51 config PINCTRL_MESON_G12A 53 - bool "Meson g12a Soc pinctrl driver" 52 + tristate "Meson g12a Soc pinctrl driver" 54 53 depends on ARM64 55 54 select PINCTRL_MESON_AXG_PMX 56 55 default y 57 56 58 57 config PINCTRL_MESON_A1 59 - bool "Meson a1 Soc pinctrl driver" 58 + tristate "Meson a1 Soc pinctrl driver" 60 59 depends on ARM64 61 60 select PINCTRL_MESON_AXG_PMX 62 61 default y
+3 -1
drivers/pinctrl/meson/pinctrl-meson-a1.c
··· 925 925 }, 926 926 { }, 927 927 }; 928 + MODULE_DEVICE_TABLE(of, meson_a1_pinctrl_dt_match); 928 929 929 930 static struct platform_driver meson_a1_pinctrl_driver = { 930 931 .probe = meson_pinctrl_probe, ··· 935 934 }, 936 935 }; 937 936 938 - builtin_platform_driver(meson_a1_pinctrl_driver); 937 + module_platform_driver(meson_a1_pinctrl_driver); 938 + MODULE_LICENSE("Dual BSD/GPL");
+3
drivers/pinctrl/meson/pinctrl-meson-axg-pmx.c
··· 116 116 .get_function_groups = meson_pmx_get_groups, 117 117 .gpio_request_enable = meson_axg_pmx_request_gpio, 118 118 }; 119 + EXPORT_SYMBOL_GPL(meson_axg_pmx_ops); 120 + 121 + MODULE_LICENSE("Dual BSD/GPL");
+3 -1
drivers/pinctrl/meson/pinctrl-meson-axg.c
··· 1080 1080 }, 1081 1081 { }, 1082 1082 }; 1083 + MODULE_DEVICE_TABLE(of, meson_axg_pinctrl_dt_match); 1083 1084 1084 1085 static struct platform_driver meson_axg_pinctrl_driver = { 1085 1086 .probe = meson_pinctrl_probe, ··· 1090 1089 }, 1091 1090 }; 1092 1091 1093 - builtin_platform_driver(meson_axg_pinctrl_driver); 1092 + module_platform_driver(meson_axg_pinctrl_driver); 1093 + MODULE_LICENSE("Dual BSD/GPL");
+3 -1
drivers/pinctrl/meson/pinctrl-meson-g12a.c
··· 1410 1410 }, 1411 1411 { }, 1412 1412 }; 1413 + MODULE_DEVICE_TABLE(of, meson_g12a_pinctrl_dt_match); 1413 1414 1414 1415 static struct platform_driver meson_g12a_pinctrl_driver = { 1415 1416 .probe = meson_pinctrl_probe, ··· 1420 1419 }, 1421 1420 }; 1422 1421 1423 - builtin_platform_driver(meson_g12a_pinctrl_driver); 1422 + module_platform_driver(meson_g12a_pinctrl_driver); 1423 + MODULE_LICENSE("Dual BSD/GPL");
+3 -1
drivers/pinctrl/meson/pinctrl-meson-gxbb.c
··· 900 900 }, 901 901 { }, 902 902 }; 903 + MODULE_DEVICE_TABLE(of, meson_gxbb_pinctrl_dt_match); 903 904 904 905 static struct platform_driver meson_gxbb_pinctrl_driver = { 905 906 .probe = meson_pinctrl_probe, ··· 909 908 .of_match_table = meson_gxbb_pinctrl_dt_match, 910 909 }, 911 910 }; 912 - builtin_platform_driver(meson_gxbb_pinctrl_driver); 911 + module_platform_driver(meson_gxbb_pinctrl_driver); 912 + MODULE_LICENSE("GPL v2");
+3 -1
drivers/pinctrl/meson/pinctrl-meson-gxl.c
··· 861 861 }, 862 862 { }, 863 863 }; 864 + MODULE_DEVICE_TABLE(of, meson_gxl_pinctrl_dt_match); 864 865 865 866 static struct platform_driver meson_gxl_pinctrl_driver = { 866 867 .probe = meson_pinctrl_probe, ··· 870 869 .of_match_table = meson_gxl_pinctrl_dt_match, 871 870 }, 872 871 }; 873 - builtin_platform_driver(meson_gxl_pinctrl_driver); 872 + module_platform_driver(meson_gxl_pinctrl_driver); 873 + MODULE_LICENSE("GPL v2");
+8
drivers/pinctrl/meson/pinctrl-meson.c
··· 152 152 153 153 return pc->data->num_funcs; 154 154 } 155 + EXPORT_SYMBOL_GPL(meson_pmx_get_funcs_count); 155 156 156 157 const char *meson_pmx_get_func_name(struct pinctrl_dev *pcdev, 157 158 unsigned selector) ··· 161 160 162 161 return pc->data->funcs[selector].name; 163 162 } 163 + EXPORT_SYMBOL_GPL(meson_pmx_get_func_name); 164 164 165 165 int meson_pmx_get_groups(struct pinctrl_dev *pcdev, unsigned selector, 166 166 const char * const **groups, ··· 174 172 175 173 return 0; 176 174 } 175 + EXPORT_SYMBOL_GPL(meson_pmx_get_groups); 177 176 178 177 static int meson_pinconf_set_gpio_bit(struct meson_pinctrl *pc, 179 178 unsigned int pin, ··· 726 723 727 724 return 0; 728 725 } 726 + EXPORT_SYMBOL_GPL(meson8_aobus_parse_dt_extra); 729 727 730 728 int meson_a1_parse_dt_extra(struct meson_pinctrl *pc) 731 729 { ··· 736 732 737 733 return 0; 738 734 } 735 + EXPORT_SYMBOL_GPL(meson_a1_parse_dt_extra); 739 736 740 737 int meson_pinctrl_probe(struct platform_device *pdev) 741 738 { ··· 771 766 772 767 return meson_gpiolib_register(pc); 773 768 } 769 + EXPORT_SYMBOL_GPL(meson_pinctrl_probe); 770 + 771 + MODULE_LICENSE("GPL v2");
+1
drivers/pinctrl/meson/pinctrl-meson.h
··· 10 10 #include <linux/platform_device.h> 11 11 #include <linux/regmap.h> 12 12 #include <linux/types.h> 13 + #include <linux/module.h> 13 14 14 15 struct meson_pinctrl; 15 16
+2
drivers/pinctrl/meson/pinctrl-meson8-pmx.c
··· 100 100 .get_function_groups = meson_pmx_get_groups, 101 101 .gpio_request_enable = meson8_pmx_request_gpio, 102 102 }; 103 + EXPORT_SYMBOL_GPL(meson8_pmx_ops); 104 + MODULE_LICENSE("GPL v2");
+9 -1
drivers/pinctrl/nomadik/pinctrl-nomadik-db8500.c
··· 421 421 /* D8 thru D11 often used as TVOUT lines */ 422 422 static const unsigned lcd_d8_d11_a_1_pins[] = { DB8500_PIN_F4, 423 423 DB8500_PIN_E3, DB8500_PIN_E4, DB8500_PIN_D2 }; 424 + static const unsigned lcd_d12_d15_a_1_pins[] = { 425 + DB8500_PIN_C1, DB8500_PIN_D3, DB8500_PIN_C2, DB8500_PIN_D5 }; 424 426 static const unsigned lcd_d12_d23_a_1_pins[] = { 425 427 DB8500_PIN_C1, DB8500_PIN_D3, DB8500_PIN_C2, DB8500_PIN_D5, 426 428 DB8500_PIN_C6, DB8500_PIN_B3, DB8500_PIN_C4, DB8500_PIN_E6, ··· 535 533 static const unsigned lcd_b_1_pins[] = { DB8500_PIN_D17, DB8500_PIN_D16, 536 534 DB8500_PIN_B17, DB8500_PIN_C16, DB8500_PIN_C19, DB8500_PIN_C17, 537 535 DB8500_PIN_A18, DB8500_PIN_C18, DB8500_PIN_B19, DB8500_PIN_B20, 536 + DB8500_PIN_D21, DB8500_PIN_D20, DB8500_PIN_C20, DB8500_PIN_B21, 537 + DB8500_PIN_C21, DB8500_PIN_A22, DB8500_PIN_B24, DB8500_PIN_C22 }; 538 + static const unsigned lcd_d16_d23_b_1_pins[] = { 538 539 DB8500_PIN_D21, DB8500_PIN_D20, DB8500_PIN_C20, DB8500_PIN_B21, 539 540 DB8500_PIN_C21, DB8500_PIN_A22, DB8500_PIN_B24, DB8500_PIN_C22 }; 540 541 static const unsigned ddrtrig_b_1_pins[] = { DB8500_PIN_AJ27 }; ··· 694 689 DB8500_PIN_GROUP(lcdvsi1_a_1, NMK_GPIO_ALT_A), 695 690 DB8500_PIN_GROUP(lcd_d0_d7_a_1, NMK_GPIO_ALT_A), 696 691 DB8500_PIN_GROUP(lcd_d8_d11_a_1, NMK_GPIO_ALT_A), 692 + DB8500_PIN_GROUP(lcd_d12_d15_a_1, NMK_GPIO_ALT_A), 697 693 DB8500_PIN_GROUP(lcd_d12_d23_a_1, NMK_GPIO_ALT_A), 698 694 DB8500_PIN_GROUP(kp_a_1, NMK_GPIO_ALT_A), 699 695 DB8500_PIN_GROUP(kpskaskb_a_1, NMK_GPIO_ALT_A), ··· 747 741 DB8500_PIN_GROUP(lcdaclk_b_1, NMK_GPIO_ALT_B), 748 742 DB8500_PIN_GROUP(lcda_b_1, NMK_GPIO_ALT_B), 749 743 DB8500_PIN_GROUP(lcd_b_1, NMK_GPIO_ALT_B), 744 + DB8500_PIN_GROUP(lcd_d16_d23_b_1, NMK_GPIO_ALT_B), 750 745 DB8500_PIN_GROUP(ddrtrig_b_1, NMK_GPIO_ALT_B), 751 746 DB8500_PIN_GROUP(pwl_b_1, NMK_GPIO_ALT_B), 752 747 DB8500_PIN_GROUP(spi1_b_1, NMK_GPIO_ALT_B), ··· 853 846 DB8500_FUNC_GROUPS(msp1, "msp1txrx_a_1", "msp1_a_1", "msp1txrx_b_1"); 854 847 DB8500_FUNC_GROUPS(lcdb, "lcdb_a_1"); 855 848 DB8500_FUNC_GROUPS(lcd, "lcdvsi0_a_1", "lcdvsi1_a_1", "lcd_d0_d7_a_1", 856 - "lcd_d8_d11_a_1", "lcd_d12_d23_a_1", "lcd_b_1"); 849 + "lcd_d8_d11_a_1", "lcd_d12_d15_a_1", "lcd_d12_d23_a_1", "lcd_b_1", 850 + "lcd_d16_d23_b_1"); 857 851 DB8500_FUNC_GROUPS(kp, "kp_a_1", "kp_a_2", "kp_b_1", "kp_b_2", "kp_c_1", "kp_oc1_1"); 858 852 DB8500_FUNC_GROUPS(mc2, "mc2_a_1", "mc2rstn_c_1"); 859 853 DB8500_FUNC_GROUPS(ssp1, "ssp1_a_1");
+41 -2
drivers/pinctrl/pinctrl-amd.c
··· 197 197 static void amd_gpio_dbg_show(struct seq_file *s, struct gpio_chip *gc) 198 198 { 199 199 u32 pin_reg; 200 + u32 db_cntrl; 200 201 unsigned long flags; 201 202 unsigned int bank, i, pin_num; 202 203 struct amd_gpio *gpio_dev = gpiochip_get_data(gc); 204 + 205 + bool tmr_out_unit; 206 + unsigned int time; 207 + unsigned int unit; 208 + bool tmr_large; 203 209 204 210 char *level_trig; 205 211 char *active_level; ··· 220 214 char *pull_down_enable; 221 215 char *output_value; 222 216 char *output_enable; 217 + char debounce_value[40]; 218 + char *debounce_enable; 223 219 224 220 for (bank = 0; bank < gpio_dev->hwbank_num; bank++) { 225 221 seq_printf(s, "GPIO bank%d\t", bank); ··· 335 327 pin_sts = "input is low|"; 336 328 } 337 329 330 + db_cntrl = (DB_CNTRl_MASK << DB_CNTRL_OFF) & pin_reg; 331 + if (db_cntrl) { 332 + tmr_out_unit = pin_reg & BIT(DB_TMR_OUT_UNIT_OFF); 333 + tmr_large = pin_reg & BIT(DB_TMR_LARGE_OFF); 334 + time = pin_reg & DB_TMR_OUT_MASK; 335 + if (tmr_large) { 336 + if (tmr_out_unit) 337 + unit = 62500; 338 + else 339 + unit = 15625; 340 + } else { 341 + if (tmr_out_unit) 342 + unit = 244; 343 + else 344 + unit = 61; 345 + } 346 + if ((DB_TYPE_REMOVE_GLITCH << DB_CNTRL_OFF) == db_cntrl) 347 + debounce_enable = "debouncing filter (high and low) enabled|"; 348 + else if ((DB_TYPE_PRESERVE_LOW_GLITCH << DB_CNTRL_OFF) == db_cntrl) 349 + debounce_enable = "debouncing filter (low) enabled|"; 350 + else 351 + debounce_enable = "debouncing filter (high) enabled|"; 352 + 353 + snprintf(debounce_value, sizeof(debounce_value), 354 + "debouncing timeout is %u (us)|", time * unit); 355 + } else { 356 + debounce_enable = "debouncing filter disabled|"; 357 + snprintf(debounce_value, sizeof(debounce_value), " "); 358 + } 359 + 338 360 seq_printf(s, "%s %s %s %s %s %s\n" 339 - " %s %s %s %s %s %s %s 0x%x\n", 361 + " %s %s %s %s %s %s %s %s %s 0x%x\n", 340 362 level_trig, active_level, interrupt_enable, 341 363 interrupt_mask, wake_cntrl0, wake_cntrl1, 342 364 wake_cntrl2, pin_sts, pull_up_sel, 343 365 pull_up_enable, pull_down_enable, 344 - output_value, output_enable, pin_reg); 366 + output_value, output_enable, 367 + debounce_enable, debounce_value, pin_reg); 345 368 } 346 369 } 347 370 }
+18 -4
drivers/pinctrl/pinctrl-at91-pio4.c
··· 71 71 /* Custom pinconf parameters */ 72 72 #define ATMEL_PIN_CONFIG_DRIVE_STRENGTH (PIN_CONFIG_END + 1) 73 73 74 + /** 75 + * struct atmel_pioctrl_data - Atmel PIO controller (pinmux + gpio) data struct 76 + * @nbanks: number of PIO banks 77 + * @last_bank_count: number of lines in the last bank (can be less than 78 + * the rest of the banks). 79 + */ 74 80 struct atmel_pioctrl_data { 75 81 unsigned nbanks; 82 + unsigned last_bank_count; 76 83 }; 77 84 78 85 struct atmel_group { ··· 987 980 * We can have up to 16 banks. 988 981 */ 989 982 static const struct atmel_pioctrl_data atmel_sama5d2_pioctrl_data = { 990 - .nbanks = 4, 983 + .nbanks = 4, 984 + .last_bank_count = ATMEL_PIO_NPINS_PER_BANK, 991 985 }; 992 986 993 987 static const struct atmel_pioctrl_data microchip_sama7g5_pioctrl_data = { 994 - .nbanks = 5, 988 + .nbanks = 5, 989 + .last_bank_count = 8, /* sama7g5 has only PE0 to PE7 */ 995 990 }; 996 991 997 992 static const struct of_device_id atmel_pctrl_of_match[] = { ··· 1034 1025 atmel_pioctrl_data = match->data; 1035 1026 atmel_pioctrl->nbanks = atmel_pioctrl_data->nbanks; 1036 1027 atmel_pioctrl->npins = atmel_pioctrl->nbanks * ATMEL_PIO_NPINS_PER_BANK; 1028 + /* if last bank has limited number of pins, adjust accordingly */ 1029 + if (atmel_pioctrl_data->last_bank_count != ATMEL_PIO_NPINS_PER_BANK) { 1030 + atmel_pioctrl->npins -= ATMEL_PIO_NPINS_PER_BANK; 1031 + atmel_pioctrl->npins += atmel_pioctrl_data->last_bank_count; 1032 + } 1037 1033 1038 1034 atmel_pioctrl->reg_base = devm_platform_ioremap_resource(pdev, 0); 1039 1035 if (IS_ERR(atmel_pioctrl->reg_base)) ··· 1141 1127 return -EINVAL; 1142 1128 } 1143 1129 atmel_pioctrl->irqs[i] = res->start; 1144 - irq_set_chained_handler(res->start, atmel_gpio_irq_handler); 1145 - irq_set_handler_data(res->start, atmel_pioctrl); 1130 + irq_set_chained_handler_and_data(res->start, 1131 + atmel_gpio_irq_handler, atmel_pioctrl); 1146 1132 dev_dbg(dev, "bank %i: irq=%pr\n", i, res); 1147 1133 } 1148 1134
+9 -5
drivers/pinctrl/pinctrl-falcon.c
··· 431 431 432 432 /* load and remap the pad resources of the different banks */ 433 433 for_each_compatible_node(np, NULL, "lantiq,pad-falcon") { 434 - struct platform_device *ppdev = of_find_device_by_node(np); 435 434 const __be32 *bank = of_get_property(np, "lantiq,bank", NULL); 436 435 struct resource res; 436 + struct platform_device *ppdev; 437 437 u32 avail; 438 438 int pins; 439 439 440 440 if (!of_device_is_available(np)) 441 441 continue; 442 442 443 - if (!ppdev) { 444 - dev_err(&pdev->dev, "failed to find pad pdev\n"); 445 - continue; 446 - } 447 443 if (!bank || *bank >= PORTS) 448 444 continue; 449 445 if (of_address_to_resource(np, 0, &res)) 450 446 continue; 447 + 448 + ppdev = of_find_device_by_node(np); 449 + if (!ppdev) { 450 + dev_err(&pdev->dev, "failed to find pad pdev\n"); 451 + continue; 452 + } 453 + 451 454 falcon_info.clk[*bank] = clk_get(&ppdev->dev, NULL); 455 + put_device(&ppdev->dev); 452 456 if (IS_ERR(falcon_info.clk[*bank])) { 453 457 dev_err(&ppdev->dev, "failed to get clock\n"); 454 458 of_node_put(np);
+454 -811
drivers/pinctrl/pinctrl-ingenic.c
··· 134 134 static int jz4740_pwm_pwm6_pins[] = { 0x7e, }; 135 135 static int jz4740_pwm_pwm7_pins[] = { 0x7f, }; 136 136 137 - static int jz4740_mmc_1bit_funcs[] = { 0, 0, 0, }; 138 - static int jz4740_mmc_4bit_funcs[] = { 0, 0, 0, }; 139 - static int jz4740_uart0_data_funcs[] = { 1, 1, }; 140 - static int jz4740_uart0_hwflow_funcs[] = { 1, 1, }; 141 - static int jz4740_uart1_data_funcs[] = { 2, 2, }; 142 - static int jz4740_lcd_8bit_funcs[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; 143 - static int jz4740_lcd_16bit_funcs[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, }; 144 - static int jz4740_lcd_18bit_funcs[] = { 0, 0, }; 145 - static int jz4740_lcd_18bit_tft_funcs[] = { 0, 0, 0, 0, }; 146 - static int jz4740_nand_cs1_funcs[] = { 0, }; 147 - static int jz4740_nand_cs2_funcs[] = { 0, }; 148 - static int jz4740_nand_cs3_funcs[] = { 0, }; 149 - static int jz4740_nand_cs4_funcs[] = { 0, }; 150 - static int jz4740_nand_fre_fwe_funcs[] = { 0, 0, }; 151 - static int jz4740_pwm_pwm0_funcs[] = { 0, }; 152 - static int jz4740_pwm_pwm1_funcs[] = { 0, }; 153 - static int jz4740_pwm_pwm2_funcs[] = { 0, }; 154 - static int jz4740_pwm_pwm3_funcs[] = { 0, }; 155 - static int jz4740_pwm_pwm4_funcs[] = { 0, }; 156 - static int jz4740_pwm_pwm5_funcs[] = { 0, }; 157 - static int jz4740_pwm_pwm6_funcs[] = { 0, }; 158 - static int jz4740_pwm_pwm7_funcs[] = { 0, }; 159 137 160 - #define INGENIC_PIN_GROUP(name, id) \ 138 + #define INGENIC_PIN_GROUP_FUNCS(name, id, funcs) \ 161 139 { \ 162 140 name, \ 163 141 id##_pins, \ 164 142 ARRAY_SIZE(id##_pins), \ 165 - id##_funcs, \ 143 + funcs, \ 166 144 } 167 145 146 + #define INGENIC_PIN_GROUP(name, id, func) \ 147 + INGENIC_PIN_GROUP_FUNCS(name, id, (void *)(func)) 148 + 168 149 static const struct group_desc jz4740_groups[] = { 169 - INGENIC_PIN_GROUP("mmc-1bit", jz4740_mmc_1bit), 170 - INGENIC_PIN_GROUP("mmc-4bit", jz4740_mmc_4bit), 171 - INGENIC_PIN_GROUP("uart0-data", jz4740_uart0_data), 172 - INGENIC_PIN_GROUP("uart0-hwflow", jz4740_uart0_hwflow), 173 - INGENIC_PIN_GROUP("uart1-data", jz4740_uart1_data), 174 - INGENIC_PIN_GROUP("lcd-8bit", jz4740_lcd_8bit), 175 - INGENIC_PIN_GROUP("lcd-16bit", jz4740_lcd_16bit), 176 - INGENIC_PIN_GROUP("lcd-18bit", jz4740_lcd_18bit), 177 - INGENIC_PIN_GROUP("lcd-18bit-tft", jz4740_lcd_18bit_tft), 150 + INGENIC_PIN_GROUP("mmc-1bit", jz4740_mmc_1bit, 0), 151 + INGENIC_PIN_GROUP("mmc-4bit", jz4740_mmc_4bit, 0), 152 + INGENIC_PIN_GROUP("uart0-data", jz4740_uart0_data, 1), 153 + INGENIC_PIN_GROUP("uart0-hwflow", jz4740_uart0_hwflow, 1), 154 + INGENIC_PIN_GROUP("uart1-data", jz4740_uart1_data, 2), 155 + INGENIC_PIN_GROUP("lcd-8bit", jz4740_lcd_8bit, 0), 156 + INGENIC_PIN_GROUP("lcd-16bit", jz4740_lcd_16bit, 0), 157 + INGENIC_PIN_GROUP("lcd-18bit", jz4740_lcd_18bit, 0), 158 + INGENIC_PIN_GROUP("lcd-18bit-tft", jz4740_lcd_18bit_tft, 0), 178 159 { "lcd-no-pins", }, 179 - INGENIC_PIN_GROUP("nand-cs1", jz4740_nand_cs1), 180 - INGENIC_PIN_GROUP("nand-cs2", jz4740_nand_cs2), 181 - INGENIC_PIN_GROUP("nand-cs3", jz4740_nand_cs3), 182 - INGENIC_PIN_GROUP("nand-cs4", jz4740_nand_cs4), 183 - INGENIC_PIN_GROUP("nand-fre-fwe", jz4740_nand_fre_fwe), 184 - INGENIC_PIN_GROUP("pwm0", jz4740_pwm_pwm0), 185 - INGENIC_PIN_GROUP("pwm1", jz4740_pwm_pwm1), 186 - INGENIC_PIN_GROUP("pwm2", jz4740_pwm_pwm2), 187 - INGENIC_PIN_GROUP("pwm3", jz4740_pwm_pwm3), 188 - INGENIC_PIN_GROUP("pwm4", jz4740_pwm_pwm4), 189 - INGENIC_PIN_GROUP("pwm5", jz4740_pwm_pwm5), 190 - INGENIC_PIN_GROUP("pwm6", jz4740_pwm_pwm6), 191 - INGENIC_PIN_GROUP("pwm7", jz4740_pwm_pwm7), 160 + INGENIC_PIN_GROUP("nand-cs1", jz4740_nand_cs1, 0), 161 + INGENIC_PIN_GROUP("nand-cs2", jz4740_nand_cs2, 0), 162 + INGENIC_PIN_GROUP("nand-cs3", jz4740_nand_cs3, 0), 163 + INGENIC_PIN_GROUP("nand-cs4", jz4740_nand_cs4, 0), 164 + INGENIC_PIN_GROUP("nand-fre-fwe", jz4740_nand_fre_fwe, 0), 165 + INGENIC_PIN_GROUP("pwm0", jz4740_pwm_pwm0, 0), 166 + INGENIC_PIN_GROUP("pwm1", jz4740_pwm_pwm1, 0), 167 + INGENIC_PIN_GROUP("pwm2", jz4740_pwm_pwm2, 0), 168 + INGENIC_PIN_GROUP("pwm3", jz4740_pwm_pwm3, 0), 169 + INGENIC_PIN_GROUP("pwm4", jz4740_pwm_pwm4, 0), 170 + INGENIC_PIN_GROUP("pwm5", jz4740_pwm_pwm5, 0), 171 + INGENIC_PIN_GROUP("pwm6", jz4740_pwm_pwm6, 0), 172 + INGENIC_PIN_GROUP("pwm7", jz4740_pwm_pwm7, 0), 192 173 }; 193 174 194 175 static const char *jz4740_mmc_groups[] = { "mmc-1bit", "mmc-4bit", }; ··· 249 268 static int jz4725b_lcd_special_pins[] = { 0x76, 0x77, 0x78, 0x79, }; 250 269 static int jz4725b_lcd_generic_pins[] = { 0x75, }; 251 270 252 - static int jz4725b_mmc0_1bit_funcs[] = { 1, 1, 1, }; 253 - static int jz4725b_mmc0_4bit_funcs[] = { 1, 0, 1, }; 254 - static int jz4725b_mmc1_1bit_funcs[] = { 0, 0, 0, }; 255 - static int jz4725b_mmc1_4bit_funcs[] = { 0, 0, 0, }; 256 - static int jz4725b_uart_data_funcs[] = { 1, 1, }; 257 - static int jz4725b_nand_cs1_funcs[] = { 0, }; 258 - static int jz4725b_nand_cs2_funcs[] = { 0, }; 259 - static int jz4725b_nand_cs3_funcs[] = { 0, }; 260 - static int jz4725b_nand_cs4_funcs[] = { 0, }; 261 - static int jz4725b_nand_cle_ale_funcs[] = { 0, 0, }; 262 - static int jz4725b_nand_fre_fwe_funcs[] = { 0, 0, }; 263 - static int jz4725b_pwm_pwm0_funcs[] = { 0, }; 264 - static int jz4725b_pwm_pwm1_funcs[] = { 0, }; 265 - static int jz4725b_pwm_pwm2_funcs[] = { 0, }; 266 - static int jz4725b_pwm_pwm3_funcs[] = { 0, }; 267 - static int jz4725b_pwm_pwm4_funcs[] = { 0, }; 268 - static int jz4725b_pwm_pwm5_funcs[] = { 0, }; 269 - static int jz4725b_lcd_8bit_funcs[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; 270 - static int jz4725b_lcd_16bit_funcs[] = { 0, 0, 0, 0, 0, 0, 0, 0, }; 271 - static int jz4725b_lcd_18bit_funcs[] = { 0, 0, }; 272 - static int jz4725b_lcd_24bit_funcs[] = { 1, 1, 1, 1, }; 273 - static int jz4725b_lcd_special_funcs[] = { 0, 0, 0, 0, }; 274 - static int jz4725b_lcd_generic_funcs[] = { 0, }; 271 + static u8 jz4725b_mmc0_4bit_funcs[] = { 1, 0, 1, }; 275 272 276 273 static const struct group_desc jz4725b_groups[] = { 277 - INGENIC_PIN_GROUP("mmc0-1bit", jz4725b_mmc0_1bit), 278 - INGENIC_PIN_GROUP("mmc0-4bit", jz4725b_mmc0_4bit), 279 - INGENIC_PIN_GROUP("mmc1-1bit", jz4725b_mmc1_1bit), 280 - INGENIC_PIN_GROUP("mmc1-4bit", jz4725b_mmc1_4bit), 281 - INGENIC_PIN_GROUP("uart-data", jz4725b_uart_data), 282 - INGENIC_PIN_GROUP("nand-cs1", jz4725b_nand_cs1), 283 - INGENIC_PIN_GROUP("nand-cs2", jz4725b_nand_cs2), 284 - INGENIC_PIN_GROUP("nand-cs3", jz4725b_nand_cs3), 285 - INGENIC_PIN_GROUP("nand-cs4", jz4725b_nand_cs4), 286 - INGENIC_PIN_GROUP("nand-cle-ale", jz4725b_nand_cle_ale), 287 - INGENIC_PIN_GROUP("nand-fre-fwe", jz4725b_nand_fre_fwe), 288 - INGENIC_PIN_GROUP("pwm0", jz4725b_pwm_pwm0), 289 - INGENIC_PIN_GROUP("pwm1", jz4725b_pwm_pwm1), 290 - INGENIC_PIN_GROUP("pwm2", jz4725b_pwm_pwm2), 291 - INGENIC_PIN_GROUP("pwm3", jz4725b_pwm_pwm3), 292 - INGENIC_PIN_GROUP("pwm4", jz4725b_pwm_pwm4), 293 - INGENIC_PIN_GROUP("pwm5", jz4725b_pwm_pwm5), 294 - INGENIC_PIN_GROUP("lcd-8bit", jz4725b_lcd_8bit), 295 - INGENIC_PIN_GROUP("lcd-16bit", jz4725b_lcd_16bit), 296 - INGENIC_PIN_GROUP("lcd-18bit", jz4725b_lcd_18bit), 297 - INGENIC_PIN_GROUP("lcd-24bit", jz4725b_lcd_24bit), 298 - INGENIC_PIN_GROUP("lcd-special", jz4725b_lcd_special), 299 - INGENIC_PIN_GROUP("lcd-generic", jz4725b_lcd_generic), 274 + INGENIC_PIN_GROUP("mmc0-1bit", jz4725b_mmc0_1bit, 1), 275 + INGENIC_PIN_GROUP_FUNCS("mmc0-4bit", jz4725b_mmc0_4bit, 276 + jz4725b_mmc0_4bit_funcs), 277 + INGENIC_PIN_GROUP("mmc1-1bit", jz4725b_mmc1_1bit, 0), 278 + INGENIC_PIN_GROUP("mmc1-4bit", jz4725b_mmc1_4bit, 0), 279 + INGENIC_PIN_GROUP("uart-data", jz4725b_uart_data, 1), 280 + INGENIC_PIN_GROUP("nand-cs1", jz4725b_nand_cs1, 0), 281 + INGENIC_PIN_GROUP("nand-cs2", jz4725b_nand_cs2, 0), 282 + INGENIC_PIN_GROUP("nand-cs3", jz4725b_nand_cs3, 0), 283 + INGENIC_PIN_GROUP("nand-cs4", jz4725b_nand_cs4, 0), 284 + INGENIC_PIN_GROUP("nand-cle-ale", jz4725b_nand_cle_ale, 0), 285 + INGENIC_PIN_GROUP("nand-fre-fwe", jz4725b_nand_fre_fwe, 0), 286 + INGENIC_PIN_GROUP("pwm0", jz4725b_pwm_pwm0, 0), 287 + INGENIC_PIN_GROUP("pwm1", jz4725b_pwm_pwm1, 0), 288 + INGENIC_PIN_GROUP("pwm2", jz4725b_pwm_pwm2, 0), 289 + INGENIC_PIN_GROUP("pwm3", jz4725b_pwm_pwm3, 0), 290 + INGENIC_PIN_GROUP("pwm4", jz4725b_pwm_pwm4, 0), 291 + INGENIC_PIN_GROUP("pwm5", jz4725b_pwm_pwm5, 0), 292 + INGENIC_PIN_GROUP("lcd-8bit", jz4725b_lcd_8bit, 0), 293 + INGENIC_PIN_GROUP("lcd-16bit", jz4725b_lcd_16bit, 0), 294 + INGENIC_PIN_GROUP("lcd-18bit", jz4725b_lcd_18bit, 0), 295 + INGENIC_PIN_GROUP("lcd-24bit", jz4725b_lcd_24bit, 1), 296 + INGENIC_PIN_GROUP("lcd-special", jz4725b_lcd_special, 0), 297 + INGENIC_PIN_GROUP("lcd-generic", jz4725b_lcd_generic, 0), 300 298 }; 301 299 302 300 static const char *jz4725b_mmc0_groups[] = { "mmc0-1bit", "mmc0-4bit", }; ··· 391 431 static int jz4760_pwm_pwm6_pins[] = { 0x6a, }; 392 432 static int jz4760_pwm_pwm7_pins[] = { 0x6b, }; 393 433 394 - static int jz4760_uart0_data_funcs[] = { 0, 0, }; 395 - static int jz4760_uart0_hwflow_funcs[] = { 0, 0, }; 396 - static int jz4760_uart1_data_funcs[] = { 0, 0, }; 397 - static int jz4760_uart1_hwflow_funcs[] = { 0, 0, }; 398 - static int jz4760_uart2_data_funcs[] = { 0, 0, }; 399 - static int jz4760_uart2_hwflow_funcs[] = { 0, 0, }; 400 - static int jz4760_uart3_data_funcs[] = { 0, 1, }; 401 - static int jz4760_uart3_hwflow_funcs[] = { 0, 0, }; 402 - static int jz4760_mmc0_1bit_a_funcs[] = { 1, 1, 0, }; 403 - static int jz4760_mmc0_4bit_a_funcs[] = { 1, 1, 1, }; 404 - static int jz4760_mmc0_1bit_e_funcs[] = { 0, 0, 0, }; 405 - static int jz4760_mmc0_4bit_e_funcs[] = { 0, 0, 0, }; 406 - static int jz4760_mmc0_8bit_e_funcs[] = { 0, 0, 0, 0, }; 407 - static int jz4760_mmc1_1bit_d_funcs[] = { 0, 0, 0, }; 408 - static int jz4760_mmc1_4bit_d_funcs[] = { 0, 0, 0, }; 409 - static int jz4760_mmc1_1bit_e_funcs[] = { 1, 1, 1, }; 410 - static int jz4760_mmc1_4bit_e_funcs[] = { 1, 1, 1, }; 411 - static int jz4760_mmc1_8bit_e_funcs[] = { 1, 1, 1, 1, }; 412 - static int jz4760_mmc2_1bit_b_funcs[] = { 0, 0, 0, }; 413 - static int jz4760_mmc2_4bit_b_funcs[] = { 0, 0, 0, }; 414 - static int jz4760_mmc2_1bit_e_funcs[] = { 2, 2, 2, }; 415 - static int jz4760_mmc2_4bit_e_funcs[] = { 2, 2, 2, }; 416 - static int jz4760_mmc2_8bit_e_funcs[] = { 2, 2, 2, 2, }; 417 - static int jz4760_nemc_8bit_data_funcs[] = { 0, 0, 0, 0, 0, 0, 0, 0, }; 418 - static int jz4760_nemc_16bit_data_funcs[] = { 0, 0, 0, 0, 0, 0, 0, 0, }; 419 - static int jz4760_nemc_cle_ale_funcs[] = { 0, 0, }; 420 - static int jz4760_nemc_addr_funcs[] = { 0, 0, 0, 0, }; 421 - static int jz4760_nemc_rd_we_funcs[] = { 0, 0, }; 422 - static int jz4760_nemc_frd_fwe_funcs[] = { 0, 0, }; 423 - static int jz4760_nemc_wait_funcs[] = { 0, }; 424 - static int jz4760_nemc_cs1_funcs[] = { 0, }; 425 - static int jz4760_nemc_cs2_funcs[] = { 0, }; 426 - static int jz4760_nemc_cs3_funcs[] = { 0, }; 427 - static int jz4760_nemc_cs4_funcs[] = { 0, }; 428 - static int jz4760_nemc_cs5_funcs[] = { 0, }; 429 - static int jz4760_nemc_cs6_funcs[] = { 0, }; 430 - static int jz4760_i2c0_funcs[] = { 0, 0, }; 431 - static int jz4760_i2c1_funcs[] = { 0, 0, }; 432 - static int jz4760_cim_funcs[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; 433 - static int jz4760_lcd_24bit_funcs[] = { 434 - 0, 0, 0, 0, 0, 0, 0, 0, 435 - 0, 0, 0, 0, 0, 0, 0, 0, 436 - 0, 0, 0, 0, 0, 0, 0, 0, 437 - 0, 0, 0, 0, 438 - }; 439 - static int jz4760_pwm_pwm0_funcs[] = { 0, }; 440 - static int jz4760_pwm_pwm1_funcs[] = { 0, }; 441 - static int jz4760_pwm_pwm2_funcs[] = { 0, }; 442 - static int jz4760_pwm_pwm3_funcs[] = { 0, }; 443 - static int jz4760_pwm_pwm4_funcs[] = { 0, }; 444 - static int jz4760_pwm_pwm5_funcs[] = { 0, }; 445 - static int jz4760_pwm_pwm6_funcs[] = { 0, }; 446 - static int jz4760_pwm_pwm7_funcs[] = { 0, }; 434 + static u8 jz4760_uart3_data_funcs[] = { 0, 1, }; 435 + static u8 jz4760_mmc0_1bit_a_funcs[] = { 1, 1, 0, }; 447 436 448 437 static const struct group_desc jz4760_groups[] = { 449 - INGENIC_PIN_GROUP("uart0-data", jz4760_uart0_data), 450 - INGENIC_PIN_GROUP("uart0-hwflow", jz4760_uart0_hwflow), 451 - INGENIC_PIN_GROUP("uart1-data", jz4760_uart1_data), 452 - INGENIC_PIN_GROUP("uart1-hwflow", jz4760_uart1_hwflow), 453 - INGENIC_PIN_GROUP("uart2-data", jz4760_uart2_data), 454 - INGENIC_PIN_GROUP("uart2-hwflow", jz4760_uart2_hwflow), 455 - INGENIC_PIN_GROUP("uart3-data", jz4760_uart3_data), 456 - INGENIC_PIN_GROUP("uart3-hwflow", jz4760_uart3_hwflow), 457 - INGENIC_PIN_GROUP("mmc0-1bit-a", jz4760_mmc0_1bit_a), 458 - INGENIC_PIN_GROUP("mmc0-4bit-a", jz4760_mmc0_4bit_a), 459 - INGENIC_PIN_GROUP("mmc0-1bit-e", jz4760_mmc0_1bit_e), 460 - INGENIC_PIN_GROUP("mmc0-4bit-e", jz4760_mmc0_4bit_e), 461 - INGENIC_PIN_GROUP("mmc0-8bit-e", jz4760_mmc0_8bit_e), 462 - INGENIC_PIN_GROUP("mmc1-1bit-d", jz4760_mmc1_1bit_d), 463 - INGENIC_PIN_GROUP("mmc1-4bit-d", jz4760_mmc1_4bit_d), 464 - INGENIC_PIN_GROUP("mmc1-1bit-e", jz4760_mmc1_1bit_e), 465 - INGENIC_PIN_GROUP("mmc1-4bit-e", jz4760_mmc1_4bit_e), 466 - INGENIC_PIN_GROUP("mmc1-8bit-e", jz4760_mmc1_8bit_e), 467 - INGENIC_PIN_GROUP("mmc2-1bit-b", jz4760_mmc2_1bit_b), 468 - INGENIC_PIN_GROUP("mmc2-4bit-b", jz4760_mmc2_4bit_b), 469 - INGENIC_PIN_GROUP("mmc2-1bit-e", jz4760_mmc2_1bit_e), 470 - INGENIC_PIN_GROUP("mmc2-4bit-e", jz4760_mmc2_4bit_e), 471 - INGENIC_PIN_GROUP("mmc2-8bit-e", jz4760_mmc2_8bit_e), 472 - INGENIC_PIN_GROUP("nemc-8bit-data", jz4760_nemc_8bit_data), 473 - INGENIC_PIN_GROUP("nemc-16bit-data", jz4760_nemc_16bit_data), 474 - INGENIC_PIN_GROUP("nemc-cle-ale", jz4760_nemc_cle_ale), 475 - INGENIC_PIN_GROUP("nemc-addr", jz4760_nemc_addr), 476 - INGENIC_PIN_GROUP("nemc-rd-we", jz4760_nemc_rd_we), 477 - INGENIC_PIN_GROUP("nemc-frd-fwe", jz4760_nemc_frd_fwe), 478 - INGENIC_PIN_GROUP("nemc-wait", jz4760_nemc_wait), 479 - INGENIC_PIN_GROUP("nemc-cs1", jz4760_nemc_cs1), 480 - INGENIC_PIN_GROUP("nemc-cs2", jz4760_nemc_cs2), 481 - INGENIC_PIN_GROUP("nemc-cs3", jz4760_nemc_cs3), 482 - INGENIC_PIN_GROUP("nemc-cs4", jz4760_nemc_cs4), 483 - INGENIC_PIN_GROUP("nemc-cs5", jz4760_nemc_cs5), 484 - INGENIC_PIN_GROUP("nemc-cs6", jz4760_nemc_cs6), 485 - INGENIC_PIN_GROUP("i2c0-data", jz4760_i2c0), 486 - INGENIC_PIN_GROUP("i2c1-data", jz4760_i2c1), 487 - INGENIC_PIN_GROUP("cim-data", jz4760_cim), 488 - INGENIC_PIN_GROUP("lcd-24bit", jz4760_lcd_24bit), 438 + INGENIC_PIN_GROUP("uart0-data", jz4760_uart0_data, 0), 439 + INGENIC_PIN_GROUP("uart0-hwflow", jz4760_uart0_hwflow, 0), 440 + INGENIC_PIN_GROUP("uart1-data", jz4760_uart1_data, 0), 441 + INGENIC_PIN_GROUP("uart1-hwflow", jz4760_uart1_hwflow, 0), 442 + INGENIC_PIN_GROUP("uart2-data", jz4760_uart2_data, 0), 443 + INGENIC_PIN_GROUP("uart2-hwflow", jz4760_uart2_hwflow, 0), 444 + INGENIC_PIN_GROUP_FUNCS("uart3-data", jz4760_uart3_data, 445 + jz4760_uart3_data_funcs), 446 + INGENIC_PIN_GROUP("uart3-hwflow", jz4760_uart3_hwflow, 0), 447 + INGENIC_PIN_GROUP_FUNCS("mmc0-1bit-a", jz4760_mmc0_1bit_a, 448 + jz4760_mmc0_1bit_a_funcs), 449 + INGENIC_PIN_GROUP("mmc0-4bit-a", jz4760_mmc0_4bit_a, 1), 450 + INGENIC_PIN_GROUP("mmc0-1bit-e", jz4760_mmc0_1bit_e, 0), 451 + INGENIC_PIN_GROUP("mmc0-4bit-e", jz4760_mmc0_4bit_e, 0), 452 + INGENIC_PIN_GROUP("mmc0-8bit-e", jz4760_mmc0_8bit_e, 0), 453 + INGENIC_PIN_GROUP("mmc1-1bit-d", jz4760_mmc1_1bit_d, 0), 454 + INGENIC_PIN_GROUP("mmc1-4bit-d", jz4760_mmc1_4bit_d, 0), 455 + INGENIC_PIN_GROUP("mmc1-1bit-e", jz4760_mmc1_1bit_e, 1), 456 + INGENIC_PIN_GROUP("mmc1-4bit-e", jz4760_mmc1_4bit_e, 1), 457 + INGENIC_PIN_GROUP("mmc1-8bit-e", jz4760_mmc1_8bit_e, 1), 458 + INGENIC_PIN_GROUP("mmc2-1bit-b", jz4760_mmc2_1bit_b, 0), 459 + INGENIC_PIN_GROUP("mmc2-4bit-b", jz4760_mmc2_4bit_b, 0), 460 + INGENIC_PIN_GROUP("mmc2-1bit-e", jz4760_mmc2_1bit_e, 2), 461 + INGENIC_PIN_GROUP("mmc2-4bit-e", jz4760_mmc2_4bit_e, 2), 462 + INGENIC_PIN_GROUP("mmc2-8bit-e", jz4760_mmc2_8bit_e, 2), 463 + INGENIC_PIN_GROUP("nemc-8bit-data", jz4760_nemc_8bit_data, 0), 464 + INGENIC_PIN_GROUP("nemc-16bit-data", jz4760_nemc_16bit_data, 0), 465 + INGENIC_PIN_GROUP("nemc-cle-ale", jz4760_nemc_cle_ale, 0), 466 + INGENIC_PIN_GROUP("nemc-addr", jz4760_nemc_addr, 0), 467 + INGENIC_PIN_GROUP("nemc-rd-we", jz4760_nemc_rd_we, 0), 468 + INGENIC_PIN_GROUP("nemc-frd-fwe", jz4760_nemc_frd_fwe, 0), 469 + INGENIC_PIN_GROUP("nemc-wait", jz4760_nemc_wait, 0), 470 + INGENIC_PIN_GROUP("nemc-cs1", jz4760_nemc_cs1, 0), 471 + INGENIC_PIN_GROUP("nemc-cs2", jz4760_nemc_cs2, 0), 472 + INGENIC_PIN_GROUP("nemc-cs3", jz4760_nemc_cs3, 0), 473 + INGENIC_PIN_GROUP("nemc-cs4", jz4760_nemc_cs4, 0), 474 + INGENIC_PIN_GROUP("nemc-cs5", jz4760_nemc_cs5, 0), 475 + INGENIC_PIN_GROUP("nemc-cs6", jz4760_nemc_cs6, 0), 476 + INGENIC_PIN_GROUP("i2c0-data", jz4760_i2c0, 0), 477 + INGENIC_PIN_GROUP("i2c1-data", jz4760_i2c1, 0), 478 + INGENIC_PIN_GROUP("cim-data", jz4760_cim, 0), 479 + INGENIC_PIN_GROUP("lcd-24bit", jz4760_lcd_24bit, 0), 489 480 { "lcd-no-pins", }, 490 - INGENIC_PIN_GROUP("pwm0", jz4760_pwm_pwm0), 491 - INGENIC_PIN_GROUP("pwm1", jz4760_pwm_pwm1), 492 - INGENIC_PIN_GROUP("pwm2", jz4760_pwm_pwm2), 493 - INGENIC_PIN_GROUP("pwm3", jz4760_pwm_pwm3), 494 - INGENIC_PIN_GROUP("pwm4", jz4760_pwm_pwm4), 495 - INGENIC_PIN_GROUP("pwm5", jz4760_pwm_pwm5), 496 - INGENIC_PIN_GROUP("pwm6", jz4760_pwm_pwm6), 497 - INGENIC_PIN_GROUP("pwm7", jz4760_pwm_pwm7), 481 + INGENIC_PIN_GROUP("pwm0", jz4760_pwm_pwm0, 0), 482 + INGENIC_PIN_GROUP("pwm1", jz4760_pwm_pwm1, 0), 483 + INGENIC_PIN_GROUP("pwm2", jz4760_pwm_pwm2, 0), 484 + INGENIC_PIN_GROUP("pwm3", jz4760_pwm_pwm3, 0), 485 + INGENIC_PIN_GROUP("pwm4", jz4760_pwm_pwm4, 0), 486 + INGENIC_PIN_GROUP("pwm5", jz4760_pwm_pwm5, 0), 487 + INGENIC_PIN_GROUP("pwm6", jz4760_pwm_pwm6, 0), 488 + INGENIC_PIN_GROUP("pwm7", jz4760_pwm_pwm7, 0), 498 489 }; 499 490 500 491 static const char *jz4760_uart0_groups[] = { "uart0-data", "uart0-hwflow", }; ··· 626 715 static int jz4770_cim_12bit_pins[] = { 627 716 0x32, 0x33, 0xb0, 0xb1, 628 717 }; 718 + static int jz4770_lcd_8bit_pins[] = { 719 + 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x4c, 0x4d, 720 + 0x48, 0x49, 0x52, 0x53, 721 + }; 629 722 static int jz4770_lcd_24bit_pins[] = { 630 723 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 631 724 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, ··· 650 735 static int jz4770_mac_mii_pins[] = { 0xa7, 0xaf, }; 651 736 static int jz4770_otg_pins[] = { 0x8a, }; 652 737 653 - static int jz4770_uart0_data_funcs[] = { 0, 0, }; 654 - static int jz4770_uart0_hwflow_funcs[] = { 0, 0, }; 655 - static int jz4770_uart1_data_funcs[] = { 0, 0, }; 656 - static int jz4770_uart1_hwflow_funcs[] = { 0, 0, }; 657 - static int jz4770_uart2_data_funcs[] = { 0, 0, }; 658 - static int jz4770_uart2_hwflow_funcs[] = { 0, 0, }; 659 - static int jz4770_uart3_data_funcs[] = { 0, 1, }; 660 - static int jz4770_uart3_hwflow_funcs[] = { 0, 0, }; 661 - static int jz4770_ssi0_dt_a_funcs[] = { 2, }; 662 - static int jz4770_ssi0_dt_b_funcs[] = { 1, }; 663 - static int jz4770_ssi0_dt_d_funcs[] = { 1, }; 664 - static int jz4770_ssi0_dt_e_funcs[] = { 0, }; 665 - static int jz4770_ssi0_dr_a_funcs[] = { 1, }; 666 - static int jz4770_ssi0_dr_b_funcs[] = { 1, }; 667 - static int jz4770_ssi0_dr_d_funcs[] = { 1, }; 668 - static int jz4770_ssi0_dr_e_funcs[] = { 0, }; 669 - static int jz4770_ssi0_clk_a_funcs[] = { 2, }; 670 - static int jz4770_ssi0_clk_b_funcs[] = { 1, }; 671 - static int jz4770_ssi0_clk_d_funcs[] = { 1, }; 672 - static int jz4770_ssi0_clk_e_funcs[] = { 0, }; 673 - static int jz4770_ssi0_gpc_b_funcs[] = { 1, }; 674 - static int jz4770_ssi0_gpc_d_funcs[] = { 1, }; 675 - static int jz4770_ssi0_gpc_e_funcs[] = { 0, }; 676 - static int jz4770_ssi0_ce0_a_funcs[] = { 2, }; 677 - static int jz4770_ssi0_ce0_b_funcs[] = { 1, }; 678 - static int jz4770_ssi0_ce0_d_funcs[] = { 1, }; 679 - static int jz4770_ssi0_ce0_e_funcs[] = { 0, }; 680 - static int jz4770_ssi0_ce1_b_funcs[] = { 1, }; 681 - static int jz4770_ssi0_ce1_d_funcs[] = { 1, }; 682 - static int jz4770_ssi0_ce1_e_funcs[] = { 0, }; 683 - static int jz4770_ssi1_dt_b_funcs[] = { 2, }; 684 - static int jz4770_ssi1_dt_d_funcs[] = { 2, }; 685 - static int jz4770_ssi1_dt_e_funcs[] = { 1, }; 686 - static int jz4770_ssi1_dr_b_funcs[] = { 2, }; 687 - static int jz4770_ssi1_dr_d_funcs[] = { 2, }; 688 - static int jz4770_ssi1_dr_e_funcs[] = { 1, }; 689 - static int jz4770_ssi1_clk_b_funcs[] = { 2, }; 690 - static int jz4770_ssi1_clk_d_funcs[] = { 2, }; 691 - static int jz4770_ssi1_clk_e_funcs[] = { 1, }; 692 - static int jz4770_ssi1_gpc_b_funcs[] = { 2, }; 693 - static int jz4770_ssi1_gpc_d_funcs[] = { 2, }; 694 - static int jz4770_ssi1_gpc_e_funcs[] = { 1, }; 695 - static int jz4770_ssi1_ce0_b_funcs[] = { 2, }; 696 - static int jz4770_ssi1_ce0_d_funcs[] = { 2, }; 697 - static int jz4770_ssi1_ce0_e_funcs[] = { 1, }; 698 - static int jz4770_ssi1_ce1_b_funcs[] = { 2, }; 699 - static int jz4770_ssi1_ce1_d_funcs[] = { 2, }; 700 - static int jz4770_ssi1_ce1_e_funcs[] = { 1, }; 701 - static int jz4770_mmc0_1bit_a_funcs[] = { 1, 1, 0, }; 702 - static int jz4770_mmc0_4bit_a_funcs[] = { 1, 1, 1, }; 703 - static int jz4770_mmc0_1bit_e_funcs[] = { 0, 0, 0, }; 704 - static int jz4770_mmc0_4bit_e_funcs[] = { 0, 0, 0, }; 705 - static int jz4770_mmc0_8bit_e_funcs[] = { 0, 0, 0, 0, }; 706 - static int jz4770_mmc1_1bit_d_funcs[] = { 0, 0, 0, }; 707 - static int jz4770_mmc1_4bit_d_funcs[] = { 0, 0, 0, }; 708 - static int jz4770_mmc1_1bit_e_funcs[] = { 1, 1, 1, }; 709 - static int jz4770_mmc1_4bit_e_funcs[] = { 1, 1, 1, }; 710 - static int jz4770_mmc1_8bit_e_funcs[] = { 1, 1, 1, 1, }; 711 - static int jz4770_mmc2_1bit_b_funcs[] = { 0, 0, 0, }; 712 - static int jz4770_mmc2_4bit_b_funcs[] = { 0, 0, 0, }; 713 - static int jz4770_mmc2_1bit_e_funcs[] = { 2, 2, 2, }; 714 - static int jz4770_mmc2_4bit_e_funcs[] = { 2, 2, 2, }; 715 - static int jz4770_mmc2_8bit_e_funcs[] = { 2, 2, 2, 2, }; 716 - static int jz4770_nemc_8bit_data_funcs[] = { 0, 0, 0, 0, 0, 0, 0, 0, }; 717 - static int jz4770_nemc_16bit_data_funcs[] = { 0, 0, 0, 0, 0, 0, 0, 0, }; 718 - static int jz4770_nemc_cle_ale_funcs[] = { 0, 0, }; 719 - static int jz4770_nemc_addr_funcs[] = { 0, 0, 0, 0, }; 720 - static int jz4770_nemc_rd_we_funcs[] = { 0, 0, }; 721 - static int jz4770_nemc_frd_fwe_funcs[] = { 0, 0, }; 722 - static int jz4770_nemc_wait_funcs[] = { 0, }; 723 - static int jz4770_nemc_cs1_funcs[] = { 0, }; 724 - static int jz4770_nemc_cs2_funcs[] = { 0, }; 725 - static int jz4770_nemc_cs3_funcs[] = { 0, }; 726 - static int jz4770_nemc_cs4_funcs[] = { 0, }; 727 - static int jz4770_nemc_cs5_funcs[] = { 0, }; 728 - static int jz4770_nemc_cs6_funcs[] = { 0, }; 729 - static int jz4770_i2c0_funcs[] = { 0, 0, }; 730 - static int jz4770_i2c1_funcs[] = { 0, 0, }; 731 - static int jz4770_i2c2_funcs[] = { 2, 2, }; 732 - static int jz4770_cim_8bit_funcs[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; 733 - static int jz4770_cim_12bit_funcs[] = { 0, 0, 0, 0, }; 734 - static int jz4770_lcd_24bit_funcs[] = { 735 - 0, 0, 0, 0, 0, 0, 0, 0, 736 - 0, 0, 0, 0, 0, 0, 0, 0, 737 - 0, 0, 0, 0, 0, 0, 0, 0, 738 - 0, 0, 0, 0, 739 - }; 740 - static int jz4770_pwm_pwm0_funcs[] = { 0, }; 741 - static int jz4770_pwm_pwm1_funcs[] = { 0, }; 742 - static int jz4770_pwm_pwm2_funcs[] = { 0, }; 743 - static int jz4770_pwm_pwm3_funcs[] = { 0, }; 744 - static int jz4770_pwm_pwm4_funcs[] = { 0, }; 745 - static int jz4770_pwm_pwm5_funcs[] = { 0, }; 746 - static int jz4770_pwm_pwm6_funcs[] = { 0, }; 747 - static int jz4770_pwm_pwm7_funcs[] = { 0, }; 748 - static int jz4770_mac_rmii_funcs[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; 749 - static int jz4770_mac_mii_funcs[] = { 0, 0, }; 750 - static int jz4770_otg_funcs[] = { 0, }; 751 - 752 738 static const struct group_desc jz4770_groups[] = { 753 - INGENIC_PIN_GROUP("uart0-data", jz4770_uart0_data), 754 - INGENIC_PIN_GROUP("uart0-hwflow", jz4770_uart0_hwflow), 755 - INGENIC_PIN_GROUP("uart1-data", jz4770_uart1_data), 756 - INGENIC_PIN_GROUP("uart1-hwflow", jz4770_uart1_hwflow), 757 - INGENIC_PIN_GROUP("uart2-data", jz4770_uart2_data), 758 - INGENIC_PIN_GROUP("uart2-hwflow", jz4770_uart2_hwflow), 759 - INGENIC_PIN_GROUP("uart3-data", jz4770_uart3_data), 760 - INGENIC_PIN_GROUP("uart3-hwflow", jz4770_uart3_hwflow), 761 - INGENIC_PIN_GROUP("ssi0-dt-a", jz4770_ssi0_dt_a), 762 - INGENIC_PIN_GROUP("ssi0-dt-b", jz4770_ssi0_dt_b), 763 - INGENIC_PIN_GROUP("ssi0-dt-d", jz4770_ssi0_dt_d), 764 - INGENIC_PIN_GROUP("ssi0-dt-e", jz4770_ssi0_dt_e), 765 - INGENIC_PIN_GROUP("ssi0-dr-a", jz4770_ssi0_dr_a), 766 - INGENIC_PIN_GROUP("ssi0-dr-b", jz4770_ssi0_dr_b), 767 - INGENIC_PIN_GROUP("ssi0-dr-d", jz4770_ssi0_dr_d), 768 - INGENIC_PIN_GROUP("ssi0-dr-e", jz4770_ssi0_dr_e), 769 - INGENIC_PIN_GROUP("ssi0-clk-a", jz4770_ssi0_clk_a), 770 - INGENIC_PIN_GROUP("ssi0-clk-b", jz4770_ssi0_clk_b), 771 - INGENIC_PIN_GROUP("ssi0-clk-d", jz4770_ssi0_clk_d), 772 - INGENIC_PIN_GROUP("ssi0-clk-e", jz4770_ssi0_clk_e), 773 - INGENIC_PIN_GROUP("ssi0-gpc-b", jz4770_ssi0_gpc_b), 774 - INGENIC_PIN_GROUP("ssi0-gpc-d", jz4770_ssi0_gpc_d), 775 - INGENIC_PIN_GROUP("ssi0-gpc-e", jz4770_ssi0_gpc_e), 776 - INGENIC_PIN_GROUP("ssi0-ce0-a", jz4770_ssi0_ce0_a), 777 - INGENIC_PIN_GROUP("ssi0-ce0-b", jz4770_ssi0_ce0_b), 778 - INGENIC_PIN_GROUP("ssi0-ce0-d", jz4770_ssi0_ce0_d), 779 - INGENIC_PIN_GROUP("ssi0-ce0-e", jz4770_ssi0_ce0_e), 780 - INGENIC_PIN_GROUP("ssi0-ce1-b", jz4770_ssi0_ce1_b), 781 - INGENIC_PIN_GROUP("ssi0-ce1-d", jz4770_ssi0_ce1_d), 782 - INGENIC_PIN_GROUP("ssi0-ce1-e", jz4770_ssi0_ce1_e), 783 - INGENIC_PIN_GROUP("ssi1-dt-b", jz4770_ssi1_dt_b), 784 - INGENIC_PIN_GROUP("ssi1-dt-d", jz4770_ssi1_dt_d), 785 - INGENIC_PIN_GROUP("ssi1-dt-e", jz4770_ssi1_dt_e), 786 - INGENIC_PIN_GROUP("ssi1-dr-b", jz4770_ssi1_dr_b), 787 - INGENIC_PIN_GROUP("ssi1-dr-d", jz4770_ssi1_dr_d), 788 - INGENIC_PIN_GROUP("ssi1-dr-e", jz4770_ssi1_dr_e), 789 - INGENIC_PIN_GROUP("ssi1-clk-b", jz4770_ssi1_clk_b), 790 - INGENIC_PIN_GROUP("ssi1-clk-d", jz4770_ssi1_clk_d), 791 - INGENIC_PIN_GROUP("ssi1-clk-e", jz4770_ssi1_clk_e), 792 - INGENIC_PIN_GROUP("ssi1-gpc-b", jz4770_ssi1_gpc_b), 793 - INGENIC_PIN_GROUP("ssi1-gpc-d", jz4770_ssi1_gpc_d), 794 - INGENIC_PIN_GROUP("ssi1-gpc-e", jz4770_ssi1_gpc_e), 795 - INGENIC_PIN_GROUP("ssi1-ce0-b", jz4770_ssi1_ce0_b), 796 - INGENIC_PIN_GROUP("ssi1-ce0-d", jz4770_ssi1_ce0_d), 797 - INGENIC_PIN_GROUP("ssi1-ce0-e", jz4770_ssi1_ce0_e), 798 - INGENIC_PIN_GROUP("ssi1-ce1-b", jz4770_ssi1_ce1_b), 799 - INGENIC_PIN_GROUP("ssi1-ce1-d", jz4770_ssi1_ce1_d), 800 - INGENIC_PIN_GROUP("ssi1-ce1-e", jz4770_ssi1_ce1_e), 801 - INGENIC_PIN_GROUP("mmc0-1bit-a", jz4770_mmc0_1bit_a), 802 - INGENIC_PIN_GROUP("mmc0-4bit-a", jz4770_mmc0_4bit_a), 803 - INGENIC_PIN_GROUP("mmc0-1bit-e", jz4770_mmc0_1bit_e), 804 - INGENIC_PIN_GROUP("mmc0-4bit-e", jz4770_mmc0_4bit_e), 805 - INGENIC_PIN_GROUP("mmc0-8bit-e", jz4770_mmc0_8bit_e), 806 - INGENIC_PIN_GROUP("mmc1-1bit-d", jz4770_mmc1_1bit_d), 807 - INGENIC_PIN_GROUP("mmc1-4bit-d", jz4770_mmc1_4bit_d), 808 - INGENIC_PIN_GROUP("mmc1-1bit-e", jz4770_mmc1_1bit_e), 809 - INGENIC_PIN_GROUP("mmc1-4bit-e", jz4770_mmc1_4bit_e), 810 - INGENIC_PIN_GROUP("mmc1-8bit-e", jz4770_mmc1_8bit_e), 811 - INGENIC_PIN_GROUP("mmc2-1bit-b", jz4770_mmc2_1bit_b), 812 - INGENIC_PIN_GROUP("mmc2-4bit-b", jz4770_mmc2_4bit_b), 813 - INGENIC_PIN_GROUP("mmc2-1bit-e", jz4770_mmc2_1bit_e), 814 - INGENIC_PIN_GROUP("mmc2-4bit-e", jz4770_mmc2_4bit_e), 815 - INGENIC_PIN_GROUP("mmc2-8bit-e", jz4770_mmc2_8bit_e), 816 - INGENIC_PIN_GROUP("nemc-8bit-data", jz4770_nemc_8bit_data), 817 - INGENIC_PIN_GROUP("nemc-16bit-data", jz4770_nemc_16bit_data), 818 - INGENIC_PIN_GROUP("nemc-cle-ale", jz4770_nemc_cle_ale), 819 - INGENIC_PIN_GROUP("nemc-addr", jz4770_nemc_addr), 820 - INGENIC_PIN_GROUP("nemc-rd-we", jz4770_nemc_rd_we), 821 - INGENIC_PIN_GROUP("nemc-frd-fwe", jz4770_nemc_frd_fwe), 822 - INGENIC_PIN_GROUP("nemc-wait", jz4770_nemc_wait), 823 - INGENIC_PIN_GROUP("nemc-cs1", jz4770_nemc_cs1), 824 - INGENIC_PIN_GROUP("nemc-cs2", jz4770_nemc_cs2), 825 - INGENIC_PIN_GROUP("nemc-cs3", jz4770_nemc_cs3), 826 - INGENIC_PIN_GROUP("nemc-cs4", jz4770_nemc_cs4), 827 - INGENIC_PIN_GROUP("nemc-cs5", jz4770_nemc_cs5), 828 - INGENIC_PIN_GROUP("nemc-cs6", jz4770_nemc_cs6), 829 - INGENIC_PIN_GROUP("i2c0-data", jz4770_i2c0), 830 - INGENIC_PIN_GROUP("i2c1-data", jz4770_i2c1), 831 - INGENIC_PIN_GROUP("i2c2-data", jz4770_i2c2), 832 - INGENIC_PIN_GROUP("cim-data-8bit", jz4770_cim_8bit), 833 - INGENIC_PIN_GROUP("cim-data-12bit", jz4770_cim_12bit), 834 - INGENIC_PIN_GROUP("lcd-24bit", jz4770_lcd_24bit), 739 + INGENIC_PIN_GROUP("uart0-data", jz4770_uart0_data, 0), 740 + INGENIC_PIN_GROUP("uart0-hwflow", jz4770_uart0_hwflow, 0), 741 + INGENIC_PIN_GROUP("uart1-data", jz4770_uart1_data, 0), 742 + INGENIC_PIN_GROUP("uart1-hwflow", jz4770_uart1_hwflow, 0), 743 + INGENIC_PIN_GROUP("uart2-data", jz4770_uart2_data, 0), 744 + INGENIC_PIN_GROUP("uart2-hwflow", jz4770_uart2_hwflow, 0), 745 + INGENIC_PIN_GROUP_FUNCS("uart3-data", jz4770_uart3_data, 746 + jz4760_uart3_data_funcs), 747 + INGENIC_PIN_GROUP("uart3-hwflow", jz4770_uart3_hwflow, 0), 748 + INGENIC_PIN_GROUP("ssi0-dt-a", jz4770_ssi0_dt_a, 2), 749 + INGENIC_PIN_GROUP("ssi0-dt-b", jz4770_ssi0_dt_b, 1), 750 + INGENIC_PIN_GROUP("ssi0-dt-d", jz4770_ssi0_dt_d, 1), 751 + INGENIC_PIN_GROUP("ssi0-dt-e", jz4770_ssi0_dt_e, 0), 752 + INGENIC_PIN_GROUP("ssi0-dr-a", jz4770_ssi0_dr_a, 1), 753 + INGENIC_PIN_GROUP("ssi0-dr-b", jz4770_ssi0_dr_b, 1), 754 + INGENIC_PIN_GROUP("ssi0-dr-d", jz4770_ssi0_dr_d, 1), 755 + INGENIC_PIN_GROUP("ssi0-dr-e", jz4770_ssi0_dr_e, 0), 756 + INGENIC_PIN_GROUP("ssi0-clk-a", jz4770_ssi0_clk_a, 2), 757 + INGENIC_PIN_GROUP("ssi0-clk-b", jz4770_ssi0_clk_b, 1), 758 + INGENIC_PIN_GROUP("ssi0-clk-d", jz4770_ssi0_clk_d, 1), 759 + INGENIC_PIN_GROUP("ssi0-clk-e", jz4770_ssi0_clk_e, 0), 760 + INGENIC_PIN_GROUP("ssi0-gpc-b", jz4770_ssi0_gpc_b, 1), 761 + INGENIC_PIN_GROUP("ssi0-gpc-d", jz4770_ssi0_gpc_d, 1), 762 + INGENIC_PIN_GROUP("ssi0-gpc-e", jz4770_ssi0_gpc_e, 0), 763 + INGENIC_PIN_GROUP("ssi0-ce0-a", jz4770_ssi0_ce0_a, 2), 764 + INGENIC_PIN_GROUP("ssi0-ce0-b", jz4770_ssi0_ce0_b, 1), 765 + INGENIC_PIN_GROUP("ssi0-ce0-d", jz4770_ssi0_ce0_d, 1), 766 + INGENIC_PIN_GROUP("ssi0-ce0-e", jz4770_ssi0_ce0_e, 0), 767 + INGENIC_PIN_GROUP("ssi0-ce1-b", jz4770_ssi0_ce1_b, 1), 768 + INGENIC_PIN_GROUP("ssi0-ce1-d", jz4770_ssi0_ce1_d, 1), 769 + INGENIC_PIN_GROUP("ssi0-ce1-e", jz4770_ssi0_ce1_e, 0), 770 + INGENIC_PIN_GROUP("ssi1-dt-b", jz4770_ssi1_dt_b, 2), 771 + INGENIC_PIN_GROUP("ssi1-dt-d", jz4770_ssi1_dt_d, 2), 772 + INGENIC_PIN_GROUP("ssi1-dt-e", jz4770_ssi1_dt_e, 1), 773 + INGENIC_PIN_GROUP("ssi1-dr-b", jz4770_ssi1_dr_b, 2), 774 + INGENIC_PIN_GROUP("ssi1-dr-d", jz4770_ssi1_dr_d, 2), 775 + INGENIC_PIN_GROUP("ssi1-dr-e", jz4770_ssi1_dr_e, 1), 776 + INGENIC_PIN_GROUP("ssi1-clk-b", jz4770_ssi1_clk_b, 2), 777 + INGENIC_PIN_GROUP("ssi1-clk-d", jz4770_ssi1_clk_d, 2), 778 + INGENIC_PIN_GROUP("ssi1-clk-e", jz4770_ssi1_clk_e, 1), 779 + INGENIC_PIN_GROUP("ssi1-gpc-b", jz4770_ssi1_gpc_b, 2), 780 + INGENIC_PIN_GROUP("ssi1-gpc-d", jz4770_ssi1_gpc_d, 2), 781 + INGENIC_PIN_GROUP("ssi1-gpc-e", jz4770_ssi1_gpc_e, 1), 782 + INGENIC_PIN_GROUP("ssi1-ce0-b", jz4770_ssi1_ce0_b, 2), 783 + INGENIC_PIN_GROUP("ssi1-ce0-d", jz4770_ssi1_ce0_d, 2), 784 + INGENIC_PIN_GROUP("ssi1-ce0-e", jz4770_ssi1_ce0_e, 1), 785 + INGENIC_PIN_GROUP("ssi1-ce1-b", jz4770_ssi1_ce1_b, 2), 786 + INGENIC_PIN_GROUP("ssi1-ce1-d", jz4770_ssi1_ce1_d, 2), 787 + INGENIC_PIN_GROUP("ssi1-ce1-e", jz4770_ssi1_ce1_e, 1), 788 + INGENIC_PIN_GROUP_FUNCS("mmc0-1bit-a", jz4770_mmc0_1bit_a, 789 + jz4760_mmc0_1bit_a_funcs), 790 + INGENIC_PIN_GROUP("mmc0-4bit-a", jz4770_mmc0_4bit_a, 1), 791 + INGENIC_PIN_GROUP("mmc0-1bit-e", jz4770_mmc0_1bit_e, 0), 792 + INGENIC_PIN_GROUP("mmc0-4bit-e", jz4770_mmc0_4bit_e, 0), 793 + INGENIC_PIN_GROUP("mmc0-8bit-e", jz4770_mmc0_8bit_e, 0), 794 + INGENIC_PIN_GROUP("mmc1-1bit-d", jz4770_mmc1_1bit_d, 0), 795 + INGENIC_PIN_GROUP("mmc1-4bit-d", jz4770_mmc1_4bit_d, 0), 796 + INGENIC_PIN_GROUP("mmc1-1bit-e", jz4770_mmc1_1bit_e, 1), 797 + INGENIC_PIN_GROUP("mmc1-4bit-e", jz4770_mmc1_4bit_e, 1), 798 + INGENIC_PIN_GROUP("mmc1-8bit-e", jz4770_mmc1_8bit_e, 1), 799 + INGENIC_PIN_GROUP("mmc2-1bit-b", jz4770_mmc2_1bit_b, 0), 800 + INGENIC_PIN_GROUP("mmc2-4bit-b", jz4770_mmc2_4bit_b, 0), 801 + INGENIC_PIN_GROUP("mmc2-1bit-e", jz4770_mmc2_1bit_e, 2), 802 + INGENIC_PIN_GROUP("mmc2-4bit-e", jz4770_mmc2_4bit_e, 2), 803 + INGENIC_PIN_GROUP("mmc2-8bit-e", jz4770_mmc2_8bit_e, 2), 804 + INGENIC_PIN_GROUP("nemc-8bit-data", jz4770_nemc_8bit_data, 0), 805 + INGENIC_PIN_GROUP("nemc-16bit-data", jz4770_nemc_16bit_data, 0), 806 + INGENIC_PIN_GROUP("nemc-cle-ale", jz4770_nemc_cle_ale, 0), 807 + INGENIC_PIN_GROUP("nemc-addr", jz4770_nemc_addr, 0), 808 + INGENIC_PIN_GROUP("nemc-rd-we", jz4770_nemc_rd_we, 0), 809 + INGENIC_PIN_GROUP("nemc-frd-fwe", jz4770_nemc_frd_fwe, 0), 810 + INGENIC_PIN_GROUP("nemc-wait", jz4770_nemc_wait, 0), 811 + INGENIC_PIN_GROUP("nemc-cs1", jz4770_nemc_cs1, 0), 812 + INGENIC_PIN_GROUP("nemc-cs2", jz4770_nemc_cs2, 0), 813 + INGENIC_PIN_GROUP("nemc-cs3", jz4770_nemc_cs3, 0), 814 + INGENIC_PIN_GROUP("nemc-cs4", jz4770_nemc_cs4, 0), 815 + INGENIC_PIN_GROUP("nemc-cs5", jz4770_nemc_cs5, 0), 816 + INGENIC_PIN_GROUP("nemc-cs6", jz4770_nemc_cs6, 0), 817 + INGENIC_PIN_GROUP("i2c0-data", jz4770_i2c0, 0), 818 + INGENIC_PIN_GROUP("i2c1-data", jz4770_i2c1, 0), 819 + INGENIC_PIN_GROUP("i2c2-data", jz4770_i2c2, 2), 820 + INGENIC_PIN_GROUP("cim-data-8bit", jz4770_cim_8bit, 0), 821 + INGENIC_PIN_GROUP("cim-data-12bit", jz4770_cim_12bit, 0), 822 + INGENIC_PIN_GROUP("lcd-8bit", jz4770_lcd_8bit, 0), 823 + INGENIC_PIN_GROUP("lcd-24bit", jz4770_lcd_24bit, 0), 835 824 { "lcd-no-pins", }, 836 - INGENIC_PIN_GROUP("pwm0", jz4770_pwm_pwm0), 837 - INGENIC_PIN_GROUP("pwm1", jz4770_pwm_pwm1), 838 - INGENIC_PIN_GROUP("pwm2", jz4770_pwm_pwm2), 839 - INGENIC_PIN_GROUP("pwm3", jz4770_pwm_pwm3), 840 - INGENIC_PIN_GROUP("pwm4", jz4770_pwm_pwm4), 841 - INGENIC_PIN_GROUP("pwm5", jz4770_pwm_pwm5), 842 - INGENIC_PIN_GROUP("pwm6", jz4770_pwm_pwm6), 843 - INGENIC_PIN_GROUP("pwm7", jz4770_pwm_pwm7), 844 - INGENIC_PIN_GROUP("mac-rmii", jz4770_mac_rmii), 845 - INGENIC_PIN_GROUP("mac-mii", jz4770_mac_mii), 846 - INGENIC_PIN_GROUP("otg-vbus", jz4770_otg), 825 + INGENIC_PIN_GROUP("pwm0", jz4770_pwm_pwm0, 0), 826 + INGENIC_PIN_GROUP("pwm1", jz4770_pwm_pwm1, 0), 827 + INGENIC_PIN_GROUP("pwm2", jz4770_pwm_pwm2, 0), 828 + INGENIC_PIN_GROUP("pwm3", jz4770_pwm_pwm3, 0), 829 + INGENIC_PIN_GROUP("pwm4", jz4770_pwm_pwm4, 0), 830 + INGENIC_PIN_GROUP("pwm5", jz4770_pwm_pwm5, 0), 831 + INGENIC_PIN_GROUP("pwm6", jz4770_pwm_pwm6, 0), 832 + INGENIC_PIN_GROUP("pwm7", jz4770_pwm_pwm7, 0), 833 + INGENIC_PIN_GROUP("mac-rmii", jz4770_mac_rmii, 0), 834 + INGENIC_PIN_GROUP("mac-mii", jz4770_mac_mii, 0), 835 + INGENIC_PIN_GROUP("otg-vbus", jz4770_otg, 0), 847 836 }; 848 837 849 838 static const char *jz4770_uart0_groups[] = { "uart0-data", "uart0-hwflow", }; ··· 796 977 static const char *jz4770_i2c1_groups[] = { "i2c1-data", }; 797 978 static const char *jz4770_i2c2_groups[] = { "i2c2-data", }; 798 979 static const char *jz4770_cim_groups[] = { "cim-data-8bit", "cim-data-12bit", }; 799 - static const char *jz4770_lcd_groups[] = { "lcd-24bit", "lcd-no-pins", }; 980 + static const char *jz4770_lcd_groups[] = { 981 + "lcd-8bit", "lcd-24bit", "lcd-no-pins", 982 + }; 800 983 static const char *jz4770_pwm0_groups[] = { "pwm0", }; 801 984 static const char *jz4770_pwm1_groups[] = { "pwm1", }; 802 985 static const char *jz4770_pwm2_groups[] = { "pwm2", }; ··· 911 1090 static int jz4780_i2s_sysclk_pins[] = { 0x85, }; 912 1091 static int jz4780_hdmi_ddc_pins[] = { 0xb9, 0xb8, }; 913 1092 914 - static int jz4780_uart2_data_funcs[] = { 1, 1, }; 915 - static int jz4780_uart2_hwflow_funcs[] = { 1, 1, }; 916 - static int jz4780_uart4_data_funcs[] = { 2, 2, }; 917 - static int jz4780_ssi0_dt_a_19_funcs[] = { 2, }; 918 - static int jz4780_ssi0_dt_a_21_funcs[] = { 2, }; 919 - static int jz4780_ssi0_dt_a_28_funcs[] = { 2, }; 920 - static int jz4780_ssi0_dt_b_funcs[] = { 1, }; 921 - static int jz4780_ssi0_dt_d_funcs[] = { 1, }; 922 - static int jz4780_ssi0_dr_a_20_funcs[] = { 2, }; 923 - static int jz4780_ssi0_dr_a_27_funcs[] = { 2, }; 924 - static int jz4780_ssi0_dr_b_funcs[] = { 1, }; 925 - static int jz4780_ssi0_dr_d_funcs[] = { 1, }; 926 - static int jz4780_ssi0_clk_a_funcs[] = { 2, }; 927 - static int jz4780_ssi0_clk_b_5_funcs[] = { 1, }; 928 - static int jz4780_ssi0_clk_b_28_funcs[] = { 1, }; 929 - static int jz4780_ssi0_clk_d_funcs[] = { 1, }; 930 - static int jz4780_ssi0_gpc_b_funcs[] = { 1, }; 931 - static int jz4780_ssi0_gpc_d_funcs[] = { 1, }; 932 - static int jz4780_ssi0_ce0_a_23_funcs[] = { 2, }; 933 - static int jz4780_ssi0_ce0_a_25_funcs[] = { 2, }; 934 - static int jz4780_ssi0_ce0_b_funcs[] = { 1, }; 935 - static int jz4780_ssi0_ce0_d_funcs[] = { 1, }; 936 - static int jz4780_ssi0_ce1_b_funcs[] = { 1, }; 937 - static int jz4780_ssi0_ce1_d_funcs[] = { 1, }; 938 - static int jz4780_ssi1_dt_b_funcs[] = { 2, }; 939 - static int jz4780_ssi1_dt_d_funcs[] = { 2, }; 940 - static int jz4780_ssi1_dr_b_funcs[] = { 2, }; 941 - static int jz4780_ssi1_dr_d_funcs[] = { 2, }; 942 - static int jz4780_ssi1_clk_b_funcs[] = { 2, }; 943 - static int jz4780_ssi1_clk_d_funcs[] = { 2, }; 944 - static int jz4780_ssi1_gpc_b_funcs[] = { 2, }; 945 - static int jz4780_ssi1_gpc_d_funcs[] = { 2, }; 946 - static int jz4780_ssi1_ce0_b_funcs[] = { 2, }; 947 - static int jz4780_ssi1_ce0_d_funcs[] = { 2, }; 948 - static int jz4780_ssi1_ce1_b_funcs[] = { 2, }; 949 - static int jz4780_ssi1_ce1_d_funcs[] = { 2, }; 950 - static int jz4780_mmc0_8bit_a_funcs[] = { 1, 1, 1, 1, 1, }; 951 - static int jz4780_i2c3_funcs[] = { 1, 1, }; 952 - static int jz4780_i2c4_e_funcs[] = { 1, 1, }; 953 - static int jz4780_i2c4_f_funcs[] = { 1, 1, }; 954 - static int jz4780_i2s_data_tx_funcs[] = { 0, }; 955 - static int jz4780_i2s_data_rx_funcs[] = { 0, }; 956 - static int jz4780_i2s_clk_txrx_funcs[] = { 1, 0, }; 957 - static int jz4780_i2s_clk_rx_funcs[] = { 1, 1, }; 958 - static int jz4780_i2s_sysclk_funcs[] = { 2, }; 959 - static int jz4780_hdmi_ddc_funcs[] = { 0, 0, }; 1093 + static u8 jz4780_i2s_clk_txrx_funcs[] = { 1, 0, }; 960 1094 961 1095 static const struct group_desc jz4780_groups[] = { 962 - INGENIC_PIN_GROUP("uart0-data", jz4770_uart0_data), 963 - INGENIC_PIN_GROUP("uart0-hwflow", jz4770_uart0_hwflow), 964 - INGENIC_PIN_GROUP("uart1-data", jz4770_uart1_data), 965 - INGENIC_PIN_GROUP("uart1-hwflow", jz4770_uart1_hwflow), 966 - INGENIC_PIN_GROUP("uart2-data", jz4780_uart2_data), 967 - INGENIC_PIN_GROUP("uart2-hwflow", jz4780_uart2_hwflow), 968 - INGENIC_PIN_GROUP("uart3-data", jz4770_uart3_data), 969 - INGENIC_PIN_GROUP("uart3-hwflow", jz4770_uart3_hwflow), 970 - INGENIC_PIN_GROUP("uart4-data", jz4780_uart4_data), 971 - INGENIC_PIN_GROUP("ssi0-dt-a-19", jz4780_ssi0_dt_a_19), 972 - INGENIC_PIN_GROUP("ssi0-dt-a-21", jz4780_ssi0_dt_a_21), 973 - INGENIC_PIN_GROUP("ssi0-dt-a-28", jz4780_ssi0_dt_a_28), 974 - INGENIC_PIN_GROUP("ssi0-dt-b", jz4780_ssi0_dt_b), 975 - INGENIC_PIN_GROUP("ssi0-dt-d", jz4780_ssi0_dt_d), 976 - INGENIC_PIN_GROUP("ssi0-dt-e", jz4770_ssi0_dt_e), 977 - INGENIC_PIN_GROUP("ssi0-dr-a-20", jz4780_ssi0_dr_a_20), 978 - INGENIC_PIN_GROUP("ssi0-dr-a-27", jz4780_ssi0_dr_a_27), 979 - INGENIC_PIN_GROUP("ssi0-dr-b", jz4780_ssi0_dr_b), 980 - INGENIC_PIN_GROUP("ssi0-dr-d", jz4780_ssi0_dr_d), 981 - INGENIC_PIN_GROUP("ssi0-dr-e", jz4770_ssi0_dr_e), 982 - INGENIC_PIN_GROUP("ssi0-clk-a", jz4780_ssi0_clk_a), 983 - INGENIC_PIN_GROUP("ssi0-clk-b-5", jz4780_ssi0_clk_b_5), 984 - INGENIC_PIN_GROUP("ssi0-clk-b-28", jz4780_ssi0_clk_b_28), 985 - INGENIC_PIN_GROUP("ssi0-clk-d", jz4780_ssi0_clk_d), 986 - INGENIC_PIN_GROUP("ssi0-clk-e", jz4770_ssi0_clk_e), 987 - INGENIC_PIN_GROUP("ssi0-gpc-b", jz4780_ssi0_gpc_b), 988 - INGENIC_PIN_GROUP("ssi0-gpc-d", jz4780_ssi0_gpc_d), 989 - INGENIC_PIN_GROUP("ssi0-gpc-e", jz4770_ssi0_gpc_e), 990 - INGENIC_PIN_GROUP("ssi0-ce0-a-23", jz4780_ssi0_ce0_a_23), 991 - INGENIC_PIN_GROUP("ssi0-ce0-a-25", jz4780_ssi0_ce0_a_25), 992 - INGENIC_PIN_GROUP("ssi0-ce0-b", jz4780_ssi0_ce0_b), 993 - INGENIC_PIN_GROUP("ssi0-ce0-d", jz4780_ssi0_ce0_d), 994 - INGENIC_PIN_GROUP("ssi0-ce0-e", jz4770_ssi0_ce0_e), 995 - INGENIC_PIN_GROUP("ssi0-ce1-b", jz4780_ssi0_ce1_b), 996 - INGENIC_PIN_GROUP("ssi0-ce1-d", jz4780_ssi0_ce1_d), 997 - INGENIC_PIN_GROUP("ssi0-ce1-e", jz4770_ssi0_ce1_e), 998 - INGENIC_PIN_GROUP("ssi1-dt-b", jz4780_ssi1_dt_b), 999 - INGENIC_PIN_GROUP("ssi1-dt-d", jz4780_ssi1_dt_d), 1000 - INGENIC_PIN_GROUP("ssi1-dt-e", jz4770_ssi1_dt_e), 1001 - INGENIC_PIN_GROUP("ssi1-dr-b", jz4780_ssi1_dr_b), 1002 - INGENIC_PIN_GROUP("ssi1-dr-d", jz4780_ssi1_dr_d), 1003 - INGENIC_PIN_GROUP("ssi1-dr-e", jz4770_ssi1_dr_e), 1004 - INGENIC_PIN_GROUP("ssi1-clk-b", jz4780_ssi1_clk_b), 1005 - INGENIC_PIN_GROUP("ssi1-clk-d", jz4780_ssi1_clk_d), 1006 - INGENIC_PIN_GROUP("ssi1-clk-e", jz4770_ssi1_clk_e), 1007 - INGENIC_PIN_GROUP("ssi1-gpc-b", jz4780_ssi1_gpc_b), 1008 - INGENIC_PIN_GROUP("ssi1-gpc-d", jz4780_ssi1_gpc_d), 1009 - INGENIC_PIN_GROUP("ssi1-gpc-e", jz4770_ssi1_gpc_e), 1010 - INGENIC_PIN_GROUP("ssi1-ce0-b", jz4780_ssi1_ce0_b), 1011 - INGENIC_PIN_GROUP("ssi1-ce0-d", jz4780_ssi1_ce0_d), 1012 - INGENIC_PIN_GROUP("ssi1-ce0-e", jz4770_ssi1_ce0_e), 1013 - INGENIC_PIN_GROUP("ssi1-ce1-b", jz4780_ssi1_ce1_b), 1014 - INGENIC_PIN_GROUP("ssi1-ce1-d", jz4780_ssi1_ce1_d), 1015 - INGENIC_PIN_GROUP("ssi1-ce1-e", jz4770_ssi1_ce1_e), 1016 - INGENIC_PIN_GROUP("mmc0-1bit-a", jz4770_mmc0_1bit_a), 1017 - INGENIC_PIN_GROUP("mmc0-4bit-a", jz4770_mmc0_4bit_a), 1018 - INGENIC_PIN_GROUP("mmc0-8bit-a", jz4780_mmc0_8bit_a), 1019 - INGENIC_PIN_GROUP("mmc0-1bit-e", jz4770_mmc0_1bit_e), 1020 - INGENIC_PIN_GROUP("mmc0-4bit-e", jz4770_mmc0_4bit_e), 1021 - INGENIC_PIN_GROUP("mmc1-1bit-d", jz4770_mmc1_1bit_d), 1022 - INGENIC_PIN_GROUP("mmc1-4bit-d", jz4770_mmc1_4bit_d), 1023 - INGENIC_PIN_GROUP("mmc1-1bit-e", jz4770_mmc1_1bit_e), 1024 - INGENIC_PIN_GROUP("mmc1-4bit-e", jz4770_mmc1_4bit_e), 1025 - INGENIC_PIN_GROUP("mmc2-1bit-b", jz4770_mmc2_1bit_b), 1026 - INGENIC_PIN_GROUP("mmc2-4bit-b", jz4770_mmc2_4bit_b), 1027 - INGENIC_PIN_GROUP("mmc2-1bit-e", jz4770_mmc2_1bit_e), 1028 - INGENIC_PIN_GROUP("mmc2-4bit-e", jz4770_mmc2_4bit_e), 1029 - INGENIC_PIN_GROUP("nemc-data", jz4770_nemc_8bit_data), 1030 - INGENIC_PIN_GROUP("nemc-cle-ale", jz4770_nemc_cle_ale), 1031 - INGENIC_PIN_GROUP("nemc-addr", jz4770_nemc_addr), 1032 - INGENIC_PIN_GROUP("nemc-rd-we", jz4770_nemc_rd_we), 1033 - INGENIC_PIN_GROUP("nemc-frd-fwe", jz4770_nemc_frd_fwe), 1034 - INGENIC_PIN_GROUP("nemc-wait", jz4770_nemc_wait), 1035 - INGENIC_PIN_GROUP("nemc-cs1", jz4770_nemc_cs1), 1036 - INGENIC_PIN_GROUP("nemc-cs2", jz4770_nemc_cs2), 1037 - INGENIC_PIN_GROUP("nemc-cs3", jz4770_nemc_cs3), 1038 - INGENIC_PIN_GROUP("nemc-cs4", jz4770_nemc_cs4), 1039 - INGENIC_PIN_GROUP("nemc-cs5", jz4770_nemc_cs5), 1040 - INGENIC_PIN_GROUP("nemc-cs6", jz4770_nemc_cs6), 1041 - INGENIC_PIN_GROUP("i2c0-data", jz4770_i2c0), 1042 - INGENIC_PIN_GROUP("i2c1-data", jz4770_i2c1), 1043 - INGENIC_PIN_GROUP("i2c2-data", jz4770_i2c2), 1044 - INGENIC_PIN_GROUP("i2c3-data", jz4780_i2c3), 1045 - INGENIC_PIN_GROUP("i2c4-data-e", jz4780_i2c4_e), 1046 - INGENIC_PIN_GROUP("i2c4-data-f", jz4780_i2c4_f), 1047 - INGENIC_PIN_GROUP("i2s-data-tx", jz4780_i2s_data_tx), 1048 - INGENIC_PIN_GROUP("i2s-data-rx", jz4780_i2s_data_rx), 1049 - INGENIC_PIN_GROUP("i2s-clk-txrx", jz4780_i2s_clk_txrx), 1050 - INGENIC_PIN_GROUP("i2s-clk-rx", jz4780_i2s_clk_rx), 1051 - INGENIC_PIN_GROUP("i2s-sysclk", jz4780_i2s_sysclk), 1052 - INGENIC_PIN_GROUP("hdmi-ddc", jz4780_hdmi_ddc), 1053 - INGENIC_PIN_GROUP("cim-data", jz4770_cim_8bit), 1054 - INGENIC_PIN_GROUP("lcd-24bit", jz4770_lcd_24bit), 1096 + INGENIC_PIN_GROUP("uart0-data", jz4770_uart0_data, 0), 1097 + INGENIC_PIN_GROUP("uart0-hwflow", jz4770_uart0_hwflow, 0), 1098 + INGENIC_PIN_GROUP("uart1-data", jz4770_uart1_data, 0), 1099 + INGENIC_PIN_GROUP("uart1-hwflow", jz4770_uart1_hwflow, 0), 1100 + INGENIC_PIN_GROUP("uart2-data", jz4780_uart2_data, 1), 1101 + INGENIC_PIN_GROUP("uart2-hwflow", jz4780_uart2_hwflow, 1), 1102 + INGENIC_PIN_GROUP_FUNCS("uart3-data", jz4770_uart3_data, 1103 + jz4760_uart3_data_funcs), 1104 + INGENIC_PIN_GROUP("uart3-hwflow", jz4770_uart3_hwflow, 0), 1105 + INGENIC_PIN_GROUP("uart4-data", jz4780_uart4_data, 2), 1106 + INGENIC_PIN_GROUP("ssi0-dt-a-19", jz4780_ssi0_dt_a_19, 2), 1107 + INGENIC_PIN_GROUP("ssi0-dt-a-21", jz4780_ssi0_dt_a_21, 2), 1108 + INGENIC_PIN_GROUP("ssi0-dt-a-28", jz4780_ssi0_dt_a_28, 2), 1109 + INGENIC_PIN_GROUP("ssi0-dt-b", jz4780_ssi0_dt_b, 1), 1110 + INGENIC_PIN_GROUP("ssi0-dt-d", jz4780_ssi0_dt_d, 1), 1111 + INGENIC_PIN_GROUP("ssi0-dt-e", jz4770_ssi0_dt_e, 0), 1112 + INGENIC_PIN_GROUP("ssi0-dr-a-20", jz4780_ssi0_dr_a_20, 2), 1113 + INGENIC_PIN_GROUP("ssi0-dr-a-27", jz4780_ssi0_dr_a_27, 2), 1114 + INGENIC_PIN_GROUP("ssi0-dr-b", jz4780_ssi0_dr_b, 1), 1115 + INGENIC_PIN_GROUP("ssi0-dr-d", jz4780_ssi0_dr_d, 1), 1116 + INGENIC_PIN_GROUP("ssi0-dr-e", jz4770_ssi0_dr_e, 0), 1117 + INGENIC_PIN_GROUP("ssi0-clk-a", jz4780_ssi0_clk_a, 2), 1118 + INGENIC_PIN_GROUP("ssi0-clk-b-5", jz4780_ssi0_clk_b_5, 1), 1119 + INGENIC_PIN_GROUP("ssi0-clk-b-28", jz4780_ssi0_clk_b_28, 1), 1120 + INGENIC_PIN_GROUP("ssi0-clk-d", jz4780_ssi0_clk_d, 1), 1121 + INGENIC_PIN_GROUP("ssi0-clk-e", jz4770_ssi0_clk_e, 0), 1122 + INGENIC_PIN_GROUP("ssi0-gpc-b", jz4780_ssi0_gpc_b, 1), 1123 + INGENIC_PIN_GROUP("ssi0-gpc-d", jz4780_ssi0_gpc_d, 1), 1124 + INGENIC_PIN_GROUP("ssi0-gpc-e", jz4770_ssi0_gpc_e, 0), 1125 + INGENIC_PIN_GROUP("ssi0-ce0-a-23", jz4780_ssi0_ce0_a_23, 2), 1126 + INGENIC_PIN_GROUP("ssi0-ce0-a-25", jz4780_ssi0_ce0_a_25, 2), 1127 + INGENIC_PIN_GROUP("ssi0-ce0-b", jz4780_ssi0_ce0_b, 1), 1128 + INGENIC_PIN_GROUP("ssi0-ce0-d", jz4780_ssi0_ce0_d, 1), 1129 + INGENIC_PIN_GROUP("ssi0-ce0-e", jz4770_ssi0_ce0_e, 0), 1130 + INGENIC_PIN_GROUP("ssi0-ce1-b", jz4780_ssi0_ce1_b, 1), 1131 + INGENIC_PIN_GROUP("ssi0-ce1-d", jz4780_ssi0_ce1_d, 1), 1132 + INGENIC_PIN_GROUP("ssi0-ce1-e", jz4770_ssi0_ce1_e, 0), 1133 + INGENIC_PIN_GROUP("ssi1-dt-b", jz4780_ssi1_dt_b, 2), 1134 + INGENIC_PIN_GROUP("ssi1-dt-d", jz4780_ssi1_dt_d, 2), 1135 + INGENIC_PIN_GROUP("ssi1-dt-e", jz4770_ssi1_dt_e, 1), 1136 + INGENIC_PIN_GROUP("ssi1-dr-b", jz4780_ssi1_dr_b, 2), 1137 + INGENIC_PIN_GROUP("ssi1-dr-d", jz4780_ssi1_dr_d, 2), 1138 + INGENIC_PIN_GROUP("ssi1-dr-e", jz4770_ssi1_dr_e, 1), 1139 + INGENIC_PIN_GROUP("ssi1-clk-b", jz4780_ssi1_clk_b, 2), 1140 + INGENIC_PIN_GROUP("ssi1-clk-d", jz4780_ssi1_clk_d, 2), 1141 + INGENIC_PIN_GROUP("ssi1-clk-e", jz4770_ssi1_clk_e, 1), 1142 + INGENIC_PIN_GROUP("ssi1-gpc-b", jz4780_ssi1_gpc_b, 2), 1143 + INGENIC_PIN_GROUP("ssi1-gpc-d", jz4780_ssi1_gpc_d, 2), 1144 + INGENIC_PIN_GROUP("ssi1-gpc-e", jz4770_ssi1_gpc_e, 1), 1145 + INGENIC_PIN_GROUP("ssi1-ce0-b", jz4780_ssi1_ce0_b, 2), 1146 + INGENIC_PIN_GROUP("ssi1-ce0-d", jz4780_ssi1_ce0_d, 2), 1147 + INGENIC_PIN_GROUP("ssi1-ce0-e", jz4770_ssi1_ce0_e, 1), 1148 + INGENIC_PIN_GROUP("ssi1-ce1-b", jz4780_ssi1_ce1_b, 2), 1149 + INGENIC_PIN_GROUP("ssi1-ce1-d", jz4780_ssi1_ce1_d, 2), 1150 + INGENIC_PIN_GROUP("ssi1-ce1-e", jz4770_ssi1_ce1_e, 1), 1151 + INGENIC_PIN_GROUP_FUNCS("mmc0-1bit-a", jz4770_mmc0_1bit_a, 1152 + jz4760_mmc0_1bit_a_funcs), 1153 + INGENIC_PIN_GROUP("mmc0-4bit-a", jz4770_mmc0_4bit_a, 1), 1154 + INGENIC_PIN_GROUP("mmc0-8bit-a", jz4780_mmc0_8bit_a, 1), 1155 + INGENIC_PIN_GROUP("mmc0-1bit-e", jz4770_mmc0_1bit_e, 0), 1156 + INGENIC_PIN_GROUP("mmc0-4bit-e", jz4770_mmc0_4bit_e, 0), 1157 + INGENIC_PIN_GROUP("mmc1-1bit-d", jz4770_mmc1_1bit_d, 0), 1158 + INGENIC_PIN_GROUP("mmc1-4bit-d", jz4770_mmc1_4bit_d, 0), 1159 + INGENIC_PIN_GROUP("mmc1-1bit-e", jz4770_mmc1_1bit_e, 1), 1160 + INGENIC_PIN_GROUP("mmc1-4bit-e", jz4770_mmc1_4bit_e, 1), 1161 + INGENIC_PIN_GROUP("mmc2-1bit-b", jz4770_mmc2_1bit_b, 0), 1162 + INGENIC_PIN_GROUP("mmc2-4bit-b", jz4770_mmc2_4bit_b, 0), 1163 + INGENIC_PIN_GROUP("mmc2-1bit-e", jz4770_mmc2_1bit_e, 2), 1164 + INGENIC_PIN_GROUP("mmc2-4bit-e", jz4770_mmc2_4bit_e, 2), 1165 + INGENIC_PIN_GROUP("nemc-data", jz4770_nemc_8bit_data, 0), 1166 + INGENIC_PIN_GROUP("nemc-cle-ale", jz4770_nemc_cle_ale, 0), 1167 + INGENIC_PIN_GROUP("nemc-addr", jz4770_nemc_addr, 0), 1168 + INGENIC_PIN_GROUP("nemc-rd-we", jz4770_nemc_rd_we, 0), 1169 + INGENIC_PIN_GROUP("nemc-frd-fwe", jz4770_nemc_frd_fwe, 0), 1170 + INGENIC_PIN_GROUP("nemc-wait", jz4770_nemc_wait, 0), 1171 + INGENIC_PIN_GROUP("nemc-cs1", jz4770_nemc_cs1, 0), 1172 + INGENIC_PIN_GROUP("nemc-cs2", jz4770_nemc_cs2, 0), 1173 + INGENIC_PIN_GROUP("nemc-cs3", jz4770_nemc_cs3, 0), 1174 + INGENIC_PIN_GROUP("nemc-cs4", jz4770_nemc_cs4, 0), 1175 + INGENIC_PIN_GROUP("nemc-cs5", jz4770_nemc_cs5, 0), 1176 + INGENIC_PIN_GROUP("nemc-cs6", jz4770_nemc_cs6, 0), 1177 + INGENIC_PIN_GROUP("i2c0-data", jz4770_i2c0, 0), 1178 + INGENIC_PIN_GROUP("i2c1-data", jz4770_i2c1, 0), 1179 + INGENIC_PIN_GROUP("i2c2-data", jz4770_i2c2, 2), 1180 + INGENIC_PIN_GROUP("i2c3-data", jz4780_i2c3, 1), 1181 + INGENIC_PIN_GROUP("i2c4-data-e", jz4780_i2c4_e, 1), 1182 + INGENIC_PIN_GROUP("i2c4-data-f", jz4780_i2c4_f, 1), 1183 + INGENIC_PIN_GROUP("i2s-data-tx", jz4780_i2s_data_tx, 0), 1184 + INGENIC_PIN_GROUP("i2s-data-rx", jz4780_i2s_data_rx, 0), 1185 + INGENIC_PIN_GROUP_FUNCS("i2s-clk-txrx", jz4780_i2s_clk_txrx, 1186 + jz4780_i2s_clk_txrx_funcs), 1187 + INGENIC_PIN_GROUP("i2s-clk-rx", jz4780_i2s_clk_rx, 1), 1188 + INGENIC_PIN_GROUP("i2s-sysclk", jz4780_i2s_sysclk, 2), 1189 + INGENIC_PIN_GROUP("hdmi-ddc", jz4780_hdmi_ddc, 0), 1190 + INGENIC_PIN_GROUP("cim-data", jz4770_cim_8bit, 0), 1191 + INGENIC_PIN_GROUP("cim-data-12bit", jz4770_cim_12bit, 0), 1192 + INGENIC_PIN_GROUP("lcd-24bit", jz4770_lcd_24bit, 0), 1055 1193 { "lcd-no-pins", }, 1056 - INGENIC_PIN_GROUP("pwm0", jz4770_pwm_pwm0), 1057 - INGENIC_PIN_GROUP("pwm1", jz4770_pwm_pwm1), 1058 - INGENIC_PIN_GROUP("pwm2", jz4770_pwm_pwm2), 1059 - INGENIC_PIN_GROUP("pwm3", jz4770_pwm_pwm3), 1060 - INGENIC_PIN_GROUP("pwm4", jz4770_pwm_pwm4), 1061 - INGENIC_PIN_GROUP("pwm5", jz4770_pwm_pwm5), 1062 - INGENIC_PIN_GROUP("pwm6", jz4770_pwm_pwm6), 1063 - INGENIC_PIN_GROUP("pwm7", jz4770_pwm_pwm7), 1194 + INGENIC_PIN_GROUP("pwm0", jz4770_pwm_pwm0, 0), 1195 + INGENIC_PIN_GROUP("pwm1", jz4770_pwm_pwm1, 0), 1196 + INGENIC_PIN_GROUP("pwm2", jz4770_pwm_pwm2, 0), 1197 + INGENIC_PIN_GROUP("pwm3", jz4770_pwm_pwm3, 0), 1198 + INGENIC_PIN_GROUP("pwm4", jz4770_pwm_pwm4, 0), 1199 + INGENIC_PIN_GROUP("pwm5", jz4770_pwm_pwm5, 0), 1200 + INGENIC_PIN_GROUP("pwm6", jz4770_pwm_pwm6, 0), 1201 + INGENIC_PIN_GROUP("pwm7", jz4770_pwm_pwm7, 0), 1064 1202 }; 1065 1203 1066 1204 static const char *jz4780_uart2_groups[] = { "uart2-data", "uart2-hwflow", }; ··· 1191 1411 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 0x26, 1192 1412 }; 1193 1413 1194 - static int x1000_uart0_data_funcs[] = { 0, 0, }; 1195 - static int x1000_uart0_hwflow_funcs[] = { 0, 0, }; 1196 - static int x1000_uart1_data_a_funcs[] = { 2, 2, }; 1197 - static int x1000_uart1_data_d_funcs[] = { 1, 1, }; 1198 - static int x1000_uart1_hwflow_funcs[] = { 1, 1, }; 1199 - static int x1000_uart2_data_a_funcs[] = { 2, 2, }; 1200 - static int x1000_uart2_data_d_funcs[] = { 0, 0, }; 1201 - static int x1000_sfc_funcs[] = { 1, 1, 1, 1, 1, 1, }; 1202 - static int x1000_ssi_dt_a_22_funcs[] = { 2, }; 1203 - static int x1000_ssi_dt_a_29_funcs[] = { 2, }; 1204 - static int x1000_ssi_dt_d_funcs[] = { 0, }; 1205 - static int x1000_ssi_dr_a_23_funcs[] = { 2, }; 1206 - static int x1000_ssi_dr_a_28_funcs[] = { 2, }; 1207 - static int x1000_ssi_dr_d_funcs[] = { 0, }; 1208 - static int x1000_ssi_clk_a_24_funcs[] = { 2, }; 1209 - static int x1000_ssi_clk_a_26_funcs[] = { 2, }; 1210 - static int x1000_ssi_clk_d_funcs[] = { 0, }; 1211 - static int x1000_ssi_gpc_a_20_funcs[] = { 2, }; 1212 - static int x1000_ssi_gpc_a_31_funcs[] = { 2, }; 1213 - static int x1000_ssi_ce0_a_25_funcs[] = { 2, }; 1214 - static int x1000_ssi_ce0_a_27_funcs[] = { 2, }; 1215 - static int x1000_ssi_ce0_d_funcs[] = { 0, }; 1216 - static int x1000_ssi_ce1_a_21_funcs[] = { 2, }; 1217 - static int x1000_ssi_ce1_a_30_funcs[] = { 2, }; 1218 - static int x1000_mmc0_1bit_funcs[] = { 1, 1, 1, }; 1219 - static int x1000_mmc0_4bit_funcs[] = { 1, 1, 1, }; 1220 - static int x1000_mmc0_8bit_funcs[] = { 1, 1, 1, 1, 1, }; 1221 - static int x1000_mmc1_1bit_funcs[] = { 0, 0, 0, }; 1222 - static int x1000_mmc1_4bit_funcs[] = { 0, 0, 0, }; 1223 - static int x1000_emc_8bit_data_funcs[] = { 0, 0, 0, 0, 0, 0, 0, 0, }; 1224 - static int x1000_emc_16bit_data_funcs[] = { 0, 0, 0, 0, 0, 0, 0, 0, }; 1225 - static int x1000_emc_addr_funcs[] = { 1226 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1227 - }; 1228 - static int x1000_emc_rd_we_funcs[] = { 0, 0, }; 1229 - static int x1000_emc_wait_funcs[] = { 0, }; 1230 - static int x1000_emc_cs1_funcs[] = { 0, }; 1231 - static int x1000_emc_cs2_funcs[] = { 0, }; 1232 - static int x1000_i2c0_funcs[] = { 0, 0, }; 1233 - static int x1000_i2c1_a_funcs[] = { 2, 2, }; 1234 - static int x1000_i2c1_c_funcs[] = { 0, 0, }; 1235 - static int x1000_i2c2_funcs[] = { 1, 1, }; 1236 - static int x1000_i2s_data_tx_funcs[] = { 1, }; 1237 - static int x1000_i2s_data_rx_funcs[] = { 1, }; 1238 - static int x1000_i2s_clk_txrx_funcs[] = { 1, 1, }; 1239 - static int x1000_i2s_sysclk_funcs[] = { 1, }; 1240 - static int x1000_cim_funcs[] = { 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, }; 1241 - static int x1000_lcd_8bit_funcs[] = { 1242 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1243 - }; 1244 - static int x1000_lcd_16bit_funcs[] = { 1, 1, 1, 1, 1, 1, 1, 1, }; 1245 - static int x1000_pwm_pwm0_funcs[] = { 0, }; 1246 - static int x1000_pwm_pwm1_funcs[] = { 1, }; 1247 - static int x1000_pwm_pwm2_funcs[] = { 1, }; 1248 - static int x1000_pwm_pwm3_funcs[] = { 2, }; 1249 - static int x1000_pwm_pwm4_funcs[] = { 0, }; 1250 - static int x1000_mac_funcs[] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, }; 1251 - 1252 1414 static const struct group_desc x1000_groups[] = { 1253 - INGENIC_PIN_GROUP("uart0-data", x1000_uart0_data), 1254 - INGENIC_PIN_GROUP("uart0-hwflow", x1000_uart0_hwflow), 1255 - INGENIC_PIN_GROUP("uart1-data-a", x1000_uart1_data_a), 1256 - INGENIC_PIN_GROUP("uart1-data-d", x1000_uart1_data_d), 1257 - INGENIC_PIN_GROUP("uart1-hwflow", x1000_uart1_hwflow), 1258 - INGENIC_PIN_GROUP("uart2-data-a", x1000_uart2_data_a), 1259 - INGENIC_PIN_GROUP("uart2-data-d", x1000_uart2_data_d), 1260 - INGENIC_PIN_GROUP("sfc", x1000_sfc), 1261 - INGENIC_PIN_GROUP("ssi-dt-a-22", x1000_ssi_dt_a_22), 1262 - INGENIC_PIN_GROUP("ssi-dt-a-29", x1000_ssi_dt_a_29), 1263 - INGENIC_PIN_GROUP("ssi-dt-d", x1000_ssi_dt_d), 1264 - INGENIC_PIN_GROUP("ssi-dr-a-23", x1000_ssi_dr_a_23), 1265 - INGENIC_PIN_GROUP("ssi-dr-a-28", x1000_ssi_dr_a_28), 1266 - INGENIC_PIN_GROUP("ssi-dr-d", x1000_ssi_dr_d), 1267 - INGENIC_PIN_GROUP("ssi-clk-a-24", x1000_ssi_clk_a_24), 1268 - INGENIC_PIN_GROUP("ssi-clk-a-26", x1000_ssi_clk_a_26), 1269 - INGENIC_PIN_GROUP("ssi-clk-d", x1000_ssi_clk_d), 1270 - INGENIC_PIN_GROUP("ssi-gpc-a-20", x1000_ssi_gpc_a_20), 1271 - INGENIC_PIN_GROUP("ssi-gpc-a-31", x1000_ssi_gpc_a_31), 1272 - INGENIC_PIN_GROUP("ssi-ce0-a-25", x1000_ssi_ce0_a_25), 1273 - INGENIC_PIN_GROUP("ssi-ce0-a-27", x1000_ssi_ce0_a_27), 1274 - INGENIC_PIN_GROUP("ssi-ce0-d", x1000_ssi_ce0_d), 1275 - INGENIC_PIN_GROUP("ssi-ce1-a-21", x1000_ssi_ce1_a_21), 1276 - INGENIC_PIN_GROUP("ssi-ce1-a-30", x1000_ssi_ce1_a_30), 1277 - INGENIC_PIN_GROUP("mmc0-1bit", x1000_mmc0_1bit), 1278 - INGENIC_PIN_GROUP("mmc0-4bit", x1000_mmc0_4bit), 1279 - INGENIC_PIN_GROUP("mmc0-8bit", x1000_mmc0_8bit), 1280 - INGENIC_PIN_GROUP("mmc1-1bit", x1000_mmc1_1bit), 1281 - INGENIC_PIN_GROUP("mmc1-4bit", x1000_mmc1_4bit), 1282 - INGENIC_PIN_GROUP("emc-8bit-data", x1000_emc_8bit_data), 1283 - INGENIC_PIN_GROUP("emc-16bit-data", x1000_emc_16bit_data), 1284 - INGENIC_PIN_GROUP("emc-addr", x1000_emc_addr), 1285 - INGENIC_PIN_GROUP("emc-rd-we", x1000_emc_rd_we), 1286 - INGENIC_PIN_GROUP("emc-wait", x1000_emc_wait), 1287 - INGENIC_PIN_GROUP("emc-cs1", x1000_emc_cs1), 1288 - INGENIC_PIN_GROUP("emc-cs2", x1000_emc_cs2), 1289 - INGENIC_PIN_GROUP("i2c0-data", x1000_i2c0), 1290 - INGENIC_PIN_GROUP("i2c1-data-a", x1000_i2c1_a), 1291 - INGENIC_PIN_GROUP("i2c1-data-c", x1000_i2c1_c), 1292 - INGENIC_PIN_GROUP("i2c2-data", x1000_i2c2), 1293 - INGENIC_PIN_GROUP("i2s-data-tx", x1000_i2s_data_tx), 1294 - INGENIC_PIN_GROUP("i2s-data-rx", x1000_i2s_data_rx), 1295 - INGENIC_PIN_GROUP("i2s-clk-txrx", x1000_i2s_clk_txrx), 1296 - INGENIC_PIN_GROUP("i2s-sysclk", x1000_i2s_sysclk), 1297 - INGENIC_PIN_GROUP("cim-data", x1000_cim), 1298 - INGENIC_PIN_GROUP("lcd-8bit", x1000_lcd_8bit), 1299 - INGENIC_PIN_GROUP("lcd-16bit", x1000_lcd_16bit), 1415 + INGENIC_PIN_GROUP("uart0-data", x1000_uart0_data, 0), 1416 + INGENIC_PIN_GROUP("uart0-hwflow", x1000_uart0_hwflow, 0), 1417 + INGENIC_PIN_GROUP("uart1-data-a", x1000_uart1_data_a, 2), 1418 + INGENIC_PIN_GROUP("uart1-data-d", x1000_uart1_data_d, 1), 1419 + INGENIC_PIN_GROUP("uart1-hwflow", x1000_uart1_hwflow, 1), 1420 + INGENIC_PIN_GROUP("uart2-data-a", x1000_uart2_data_a, 2), 1421 + INGENIC_PIN_GROUP("uart2-data-d", x1000_uart2_data_d, 0), 1422 + INGENIC_PIN_GROUP("sfc", x1000_sfc, 1), 1423 + INGENIC_PIN_GROUP("ssi-dt-a-22", x1000_ssi_dt_a_22, 2), 1424 + INGENIC_PIN_GROUP("ssi-dt-a-29", x1000_ssi_dt_a_29, 2), 1425 + INGENIC_PIN_GROUP("ssi-dt-d", x1000_ssi_dt_d, 0), 1426 + INGENIC_PIN_GROUP("ssi-dr-a-23", x1000_ssi_dr_a_23, 2), 1427 + INGENIC_PIN_GROUP("ssi-dr-a-28", x1000_ssi_dr_a_28, 2), 1428 + INGENIC_PIN_GROUP("ssi-dr-d", x1000_ssi_dr_d, 0), 1429 + INGENIC_PIN_GROUP("ssi-clk-a-24", x1000_ssi_clk_a_24, 2), 1430 + INGENIC_PIN_GROUP("ssi-clk-a-26", x1000_ssi_clk_a_26, 2), 1431 + INGENIC_PIN_GROUP("ssi-clk-d", x1000_ssi_clk_d, 0), 1432 + INGENIC_PIN_GROUP("ssi-gpc-a-20", x1000_ssi_gpc_a_20, 2), 1433 + INGENIC_PIN_GROUP("ssi-gpc-a-31", x1000_ssi_gpc_a_31, 2), 1434 + INGENIC_PIN_GROUP("ssi-ce0-a-25", x1000_ssi_ce0_a_25, 2), 1435 + INGENIC_PIN_GROUP("ssi-ce0-a-27", x1000_ssi_ce0_a_27, 2), 1436 + INGENIC_PIN_GROUP("ssi-ce0-d", x1000_ssi_ce0_d, 0), 1437 + INGENIC_PIN_GROUP("ssi-ce1-a-21", x1000_ssi_ce1_a_21, 2), 1438 + INGENIC_PIN_GROUP("ssi-ce1-a-30", x1000_ssi_ce1_a_30, 2), 1439 + INGENIC_PIN_GROUP("mmc0-1bit", x1000_mmc0_1bit, 1), 1440 + INGENIC_PIN_GROUP("mmc0-4bit", x1000_mmc0_4bit, 1), 1441 + INGENIC_PIN_GROUP("mmc0-8bit", x1000_mmc0_8bit, 1), 1442 + INGENIC_PIN_GROUP("mmc1-1bit", x1000_mmc1_1bit, 0), 1443 + INGENIC_PIN_GROUP("mmc1-4bit", x1000_mmc1_4bit, 0), 1444 + INGENIC_PIN_GROUP("emc-8bit-data", x1000_emc_8bit_data, 0), 1445 + INGENIC_PIN_GROUP("emc-16bit-data", x1000_emc_16bit_data, 0), 1446 + INGENIC_PIN_GROUP("emc-addr", x1000_emc_addr, 0), 1447 + INGENIC_PIN_GROUP("emc-rd-we", x1000_emc_rd_we, 0), 1448 + INGENIC_PIN_GROUP("emc-wait", x1000_emc_wait, 0), 1449 + INGENIC_PIN_GROUP("emc-cs1", x1000_emc_cs1, 0), 1450 + INGENIC_PIN_GROUP("emc-cs2", x1000_emc_cs2, 0), 1451 + INGENIC_PIN_GROUP("i2c0-data", x1000_i2c0, 0), 1452 + INGENIC_PIN_GROUP("i2c1-data-a", x1000_i2c1_a, 2), 1453 + INGENIC_PIN_GROUP("i2c1-data-c", x1000_i2c1_c, 0), 1454 + INGENIC_PIN_GROUP("i2c2-data", x1000_i2c2, 1), 1455 + INGENIC_PIN_GROUP("i2s-data-tx", x1000_i2s_data_tx, 1), 1456 + INGENIC_PIN_GROUP("i2s-data-rx", x1000_i2s_data_rx, 1), 1457 + INGENIC_PIN_GROUP("i2s-clk-txrx", x1000_i2s_clk_txrx, 1), 1458 + INGENIC_PIN_GROUP("i2s-sysclk", x1000_i2s_sysclk, 1), 1459 + INGENIC_PIN_GROUP("cim-data", x1000_cim, 2), 1460 + INGENIC_PIN_GROUP("lcd-8bit", x1000_lcd_8bit, 1), 1461 + INGENIC_PIN_GROUP("lcd-16bit", x1000_lcd_16bit, 1), 1300 1462 { "lcd-no-pins", }, 1301 - INGENIC_PIN_GROUP("pwm0", x1000_pwm_pwm0), 1302 - INGENIC_PIN_GROUP("pwm1", x1000_pwm_pwm1), 1303 - INGENIC_PIN_GROUP("pwm2", x1000_pwm_pwm2), 1304 - INGENIC_PIN_GROUP("pwm3", x1000_pwm_pwm3), 1305 - INGENIC_PIN_GROUP("pwm4", x1000_pwm_pwm4), 1306 - INGENIC_PIN_GROUP("mac", x1000_mac), 1463 + INGENIC_PIN_GROUP("pwm0", x1000_pwm_pwm0, 0), 1464 + INGENIC_PIN_GROUP("pwm1", x1000_pwm_pwm1, 1), 1465 + INGENIC_PIN_GROUP("pwm2", x1000_pwm_pwm2, 1), 1466 + INGENIC_PIN_GROUP("pwm3", x1000_pwm_pwm3, 2), 1467 + INGENIC_PIN_GROUP("pwm4", x1000_pwm_pwm4, 0), 1468 + INGENIC_PIN_GROUP("mac", x1000_mac, 1), 1307 1469 }; 1308 1470 1309 1471 static const char *x1000_uart0_groups[] = { "uart0-data", "uart0-hwflow", }; ··· 1355 1633 static int x1500_pwm_pwm3_pins[] = { 0x26, }; 1356 1634 static int x1500_pwm_pwm4_pins[] = { 0x58, }; 1357 1635 1358 - static int x1500_uart0_data_funcs[] = { 0, 0, }; 1359 - static int x1500_uart0_hwflow_funcs[] = { 0, 0, }; 1360 - static int x1500_uart1_data_a_funcs[] = { 2, 2, }; 1361 - static int x1500_uart1_data_d_funcs[] = { 1, 1, }; 1362 - static int x1500_uart1_hwflow_funcs[] = { 1, 1, }; 1363 - static int x1500_uart2_data_a_funcs[] = { 2, 2, }; 1364 - static int x1500_uart2_data_d_funcs[] = { 0, 0, }; 1365 - static int x1500_mmc_1bit_funcs[] = { 1, 1, 1, }; 1366 - static int x1500_mmc_4bit_funcs[] = { 1, 1, 1, }; 1367 - static int x1500_i2c0_funcs[] = { 0, 0, }; 1368 - static int x1500_i2c1_a_funcs[] = { 2, 2, }; 1369 - static int x1500_i2c1_c_funcs[] = { 0, 0, }; 1370 - static int x1500_i2c2_funcs[] = { 1, 1, }; 1371 - static int x1500_i2s_data_tx_funcs[] = { 1, }; 1372 - static int x1500_i2s_data_rx_funcs[] = { 1, }; 1373 - static int x1500_i2s_clk_txrx_funcs[] = { 1, 1, }; 1374 - static int x1500_i2s_sysclk_funcs[] = { 1, }; 1375 - static int x1500_cim_funcs[] = { 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, }; 1376 - static int x1500_pwm_pwm0_funcs[] = { 0, }; 1377 - static int x1500_pwm_pwm1_funcs[] = { 1, }; 1378 - static int x1500_pwm_pwm2_funcs[] = { 1, }; 1379 - static int x1500_pwm_pwm3_funcs[] = { 2, }; 1380 - static int x1500_pwm_pwm4_funcs[] = { 0, }; 1381 - 1382 1636 static const struct group_desc x1500_groups[] = { 1383 - INGENIC_PIN_GROUP("uart0-data", x1500_uart0_data), 1384 - INGENIC_PIN_GROUP("uart0-hwflow", x1500_uart0_hwflow), 1385 - INGENIC_PIN_GROUP("uart1-data-a", x1500_uart1_data_a), 1386 - INGENIC_PIN_GROUP("uart1-data-d", x1500_uart1_data_d), 1387 - INGENIC_PIN_GROUP("uart1-hwflow", x1500_uart1_hwflow), 1388 - INGENIC_PIN_GROUP("uart2-data-a", x1500_uart2_data_a), 1389 - INGENIC_PIN_GROUP("uart2-data-d", x1500_uart2_data_d), 1390 - INGENIC_PIN_GROUP("sfc", x1000_sfc), 1391 - INGENIC_PIN_GROUP("mmc-1bit", x1500_mmc_1bit), 1392 - INGENIC_PIN_GROUP("mmc-4bit", x1500_mmc_4bit), 1393 - INGENIC_PIN_GROUP("i2c0-data", x1500_i2c0), 1394 - INGENIC_PIN_GROUP("i2c1-data-a", x1500_i2c1_a), 1395 - INGENIC_PIN_GROUP("i2c1-data-c", x1500_i2c1_c), 1396 - INGENIC_PIN_GROUP("i2c2-data", x1500_i2c2), 1397 - INGENIC_PIN_GROUP("i2s-data-tx", x1500_i2s_data_tx), 1398 - INGENIC_PIN_GROUP("i2s-data-rx", x1500_i2s_data_rx), 1399 - INGENIC_PIN_GROUP("i2s-clk-txrx", x1500_i2s_clk_txrx), 1400 - INGENIC_PIN_GROUP("i2s-sysclk", x1500_i2s_sysclk), 1401 - INGENIC_PIN_GROUP("cim-data", x1500_cim), 1637 + INGENIC_PIN_GROUP("uart0-data", x1500_uart0_data, 0), 1638 + INGENIC_PIN_GROUP("uart0-hwflow", x1500_uart0_hwflow, 0), 1639 + INGENIC_PIN_GROUP("uart1-data-a", x1500_uart1_data_a, 2), 1640 + INGENIC_PIN_GROUP("uart1-data-d", x1500_uart1_data_d, 1), 1641 + INGENIC_PIN_GROUP("uart1-hwflow", x1500_uart1_hwflow, 1), 1642 + INGENIC_PIN_GROUP("uart2-data-a", x1500_uart2_data_a, 2), 1643 + INGENIC_PIN_GROUP("uart2-data-d", x1500_uart2_data_d, 0), 1644 + INGENIC_PIN_GROUP("sfc", x1000_sfc, 1), 1645 + INGENIC_PIN_GROUP("mmc-1bit", x1500_mmc_1bit, 1), 1646 + INGENIC_PIN_GROUP("mmc-4bit", x1500_mmc_4bit, 1), 1647 + INGENIC_PIN_GROUP("i2c0-data", x1500_i2c0, 0), 1648 + INGENIC_PIN_GROUP("i2c1-data-a", x1500_i2c1_a, 2), 1649 + INGENIC_PIN_GROUP("i2c1-data-c", x1500_i2c1_c, 0), 1650 + INGENIC_PIN_GROUP("i2c2-data", x1500_i2c2, 1), 1651 + INGENIC_PIN_GROUP("i2s-data-tx", x1500_i2s_data_tx, 1), 1652 + INGENIC_PIN_GROUP("i2s-data-rx", x1500_i2s_data_rx, 1), 1653 + INGENIC_PIN_GROUP("i2s-clk-txrx", x1500_i2s_clk_txrx, 1), 1654 + INGENIC_PIN_GROUP("i2s-sysclk", x1500_i2s_sysclk, 1), 1655 + INGENIC_PIN_GROUP("cim-data", x1500_cim, 2), 1402 1656 { "lcd-no-pins", }, 1403 - INGENIC_PIN_GROUP("pwm0", x1500_pwm_pwm0), 1404 - INGENIC_PIN_GROUP("pwm1", x1500_pwm_pwm1), 1405 - INGENIC_PIN_GROUP("pwm2", x1500_pwm_pwm2), 1406 - INGENIC_PIN_GROUP("pwm3", x1500_pwm_pwm3), 1407 - INGENIC_PIN_GROUP("pwm4", x1500_pwm_pwm4), 1657 + INGENIC_PIN_GROUP("pwm0", x1500_pwm_pwm0, 0), 1658 + INGENIC_PIN_GROUP("pwm1", x1500_pwm_pwm1, 1), 1659 + INGENIC_PIN_GROUP("pwm2", x1500_pwm_pwm2, 1), 1660 + INGENIC_PIN_GROUP("pwm3", x1500_pwm_pwm3, 2), 1661 + INGENIC_PIN_GROUP("pwm4", x1500_pwm_pwm4, 0), 1408 1662 }; 1409 1663 1410 1664 static const char *x1500_uart0_groups[] = { "uart0-data", "uart0-hwflow", }; ··· 1509 1811 0x29, 0x30, 0x2f, 0x28, 0x2e, 0x2d, 0x2a, 0x2b, 0x26, 0x27, 1510 1812 }; 1511 1813 1512 - static int x1830_uart0_data_funcs[] = { 0, 0, }; 1513 - static int x1830_uart0_hwflow_funcs[] = { 0, 0, }; 1514 - static int x1830_uart1_data_funcs[] = { 0, 0, }; 1515 - static int x1830_sfc_funcs[] = { 1, 1, 1, 1, 1, 1, }; 1516 - static int x1830_ssi0_dt_funcs[] = { 0, }; 1517 - static int x1830_ssi0_dr_funcs[] = { 0, }; 1518 - static int x1830_ssi0_clk_funcs[] = { 0, }; 1519 - static int x1830_ssi0_gpc_funcs[] = { 0, }; 1520 - static int x1830_ssi0_ce0_funcs[] = { 0, }; 1521 - static int x1830_ssi0_ce1_funcs[] = { 0, }; 1522 - static int x1830_ssi1_dt_c_funcs[] = { 1, }; 1523 - static int x1830_ssi1_dr_c_funcs[] = { 1, }; 1524 - static int x1830_ssi1_clk_c_funcs[] = { 1, }; 1525 - static int x1830_ssi1_gpc_c_funcs[] = { 1, }; 1526 - static int x1830_ssi1_ce0_c_funcs[] = { 1, }; 1527 - static int x1830_ssi1_ce1_c_funcs[] = { 1, }; 1528 - static int x1830_ssi1_dt_d_funcs[] = { 2, }; 1529 - static int x1830_ssi1_dr_d_funcs[] = { 2, }; 1530 - static int x1830_ssi1_clk_d_funcs[] = { 2, }; 1531 - static int x1830_ssi1_gpc_d_funcs[] = { 2, }; 1532 - static int x1830_ssi1_ce0_d_funcs[] = { 2, }; 1533 - static int x1830_ssi1_ce1_d_funcs[] = { 2, }; 1534 - static int x1830_mmc0_1bit_funcs[] = { 0, 0, 0, }; 1535 - static int x1830_mmc0_4bit_funcs[] = { 0, 0, 0, }; 1536 - static int x1830_mmc1_1bit_funcs[] = { 0, 0, 0, }; 1537 - static int x1830_mmc1_4bit_funcs[] = { 0, 0, 0, }; 1538 - static int x1830_i2c0_funcs[] = { 1, 1, }; 1539 - static int x1830_i2c1_funcs[] = { 0, 0, }; 1540 - static int x1830_i2c2_funcs[] = { 1, 1, }; 1541 - static int x1830_i2s_data_tx_funcs[] = { 0, }; 1542 - static int x1830_i2s_data_rx_funcs[] = { 0, }; 1543 - static int x1830_i2s_clk_txrx_funcs[] = { 0, 0, }; 1544 - static int x1830_i2s_clk_rx_funcs[] = { 0, 0, }; 1545 - static int x1830_i2s_sysclk_funcs[] = { 0, }; 1546 - static int x1830_lcd_rgb_18bit_funcs[] = { 1547 - 0, 0, 0, 0, 0, 0, 1548 - 0, 0, 0, 0, 0, 0, 1549 - 0, 0, 0, 0, 0, 0, 1550 - 0, 0, 0, 0, 1551 - }; 1552 - static int x1830_lcd_slcd_8bit_funcs[] = { 1553 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1554 - }; 1555 - static int x1830_lcd_slcd_16bit_funcs[] = { 1, 1, 1, 1, 1, 1, 1, 1, }; 1556 - static int x1830_pwm_pwm0_b_funcs[] = { 0, }; 1557 - static int x1830_pwm_pwm0_c_funcs[] = { 1, }; 1558 - static int x1830_pwm_pwm1_b_funcs[] = { 0, }; 1559 - static int x1830_pwm_pwm1_c_funcs[] = { 1, }; 1560 - static int x1830_pwm_pwm2_c_8_funcs[] = { 0, }; 1561 - static int x1830_pwm_pwm2_c_13_funcs[] = { 1, }; 1562 - static int x1830_pwm_pwm3_c_9_funcs[] = { 0, }; 1563 - static int x1830_pwm_pwm3_c_14_funcs[] = { 1, }; 1564 - static int x1830_pwm_pwm4_c_15_funcs[] = { 1, }; 1565 - static int x1830_pwm_pwm4_c_25_funcs[] = { 0, }; 1566 - static int x1830_pwm_pwm5_c_16_funcs[] = { 1, }; 1567 - static int x1830_pwm_pwm5_c_26_funcs[] = { 0, }; 1568 - static int x1830_pwm_pwm6_c_17_funcs[] = { 1, }; 1569 - static int x1830_pwm_pwm6_c_27_funcs[] = { 0, }; 1570 - static int x1830_pwm_pwm7_c_18_funcs[] = { 1, }; 1571 - static int x1830_pwm_pwm7_c_28_funcs[] = { 0, }; 1572 - static int x1830_mac_funcs[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; 1573 - 1574 1814 static const struct group_desc x1830_groups[] = { 1575 - INGENIC_PIN_GROUP("uart0-data", x1830_uart0_data), 1576 - INGENIC_PIN_GROUP("uart0-hwflow", x1830_uart0_hwflow), 1577 - INGENIC_PIN_GROUP("uart1-data", x1830_uart1_data), 1578 - INGENIC_PIN_GROUP("sfc", x1830_sfc), 1579 - INGENIC_PIN_GROUP("ssi0-dt", x1830_ssi0_dt), 1580 - INGENIC_PIN_GROUP("ssi0-dr", x1830_ssi0_dr), 1581 - INGENIC_PIN_GROUP("ssi0-clk", x1830_ssi0_clk), 1582 - INGENIC_PIN_GROUP("ssi0-gpc", x1830_ssi0_gpc), 1583 - INGENIC_PIN_GROUP("ssi0-ce0", x1830_ssi0_ce0), 1584 - INGENIC_PIN_GROUP("ssi0-ce1", x1830_ssi0_ce1), 1585 - INGENIC_PIN_GROUP("ssi1-dt-c", x1830_ssi1_dt_c), 1586 - INGENIC_PIN_GROUP("ssi1-dr-c", x1830_ssi1_dr_c), 1587 - INGENIC_PIN_GROUP("ssi1-clk-c", x1830_ssi1_clk_c), 1588 - INGENIC_PIN_GROUP("ssi1-gpc-c", x1830_ssi1_gpc_c), 1589 - INGENIC_PIN_GROUP("ssi1-ce0-c", x1830_ssi1_ce0_c), 1590 - INGENIC_PIN_GROUP("ssi1-ce1-c", x1830_ssi1_ce1_c), 1591 - INGENIC_PIN_GROUP("ssi1-dt-d", x1830_ssi1_dt_d), 1592 - INGENIC_PIN_GROUP("ssi1-dr-d", x1830_ssi1_dr_d), 1593 - INGENIC_PIN_GROUP("ssi1-clk-d", x1830_ssi1_clk_d), 1594 - INGENIC_PIN_GROUP("ssi1-gpc-d", x1830_ssi1_gpc_d), 1595 - INGENIC_PIN_GROUP("ssi1-ce0-d", x1830_ssi1_ce0_d), 1596 - INGENIC_PIN_GROUP("ssi1-ce1-d", x1830_ssi1_ce1_d), 1597 - INGENIC_PIN_GROUP("mmc0-1bit", x1830_mmc0_1bit), 1598 - INGENIC_PIN_GROUP("mmc0-4bit", x1830_mmc0_4bit), 1599 - INGENIC_PIN_GROUP("mmc1-1bit", x1830_mmc1_1bit), 1600 - INGENIC_PIN_GROUP("mmc1-4bit", x1830_mmc1_4bit), 1601 - INGENIC_PIN_GROUP("i2c0-data", x1830_i2c0), 1602 - INGENIC_PIN_GROUP("i2c1-data", x1830_i2c1), 1603 - INGENIC_PIN_GROUP("i2c2-data", x1830_i2c2), 1604 - INGENIC_PIN_GROUP("i2s-data-tx", x1830_i2s_data_tx), 1605 - INGENIC_PIN_GROUP("i2s-data-rx", x1830_i2s_data_rx), 1606 - INGENIC_PIN_GROUP("i2s-clk-txrx", x1830_i2s_clk_txrx), 1607 - INGENIC_PIN_GROUP("i2s-clk-rx", x1830_i2s_clk_rx), 1608 - INGENIC_PIN_GROUP("i2s-sysclk", x1830_i2s_sysclk), 1609 - INGENIC_PIN_GROUP("lcd-rgb-18bit", x1830_lcd_rgb_18bit), 1610 - INGENIC_PIN_GROUP("lcd-slcd-8bit", x1830_lcd_slcd_8bit), 1611 - INGENIC_PIN_GROUP("lcd-slcd-16bit", x1830_lcd_slcd_16bit), 1815 + INGENIC_PIN_GROUP("uart0-data", x1830_uart0_data, 0), 1816 + INGENIC_PIN_GROUP("uart0-hwflow", x1830_uart0_hwflow, 0), 1817 + INGENIC_PIN_GROUP("uart1-data", x1830_uart1_data, 0), 1818 + INGENIC_PIN_GROUP("sfc", x1830_sfc, 1), 1819 + INGENIC_PIN_GROUP("ssi0-dt", x1830_ssi0_dt, 0), 1820 + INGENIC_PIN_GROUP("ssi0-dr", x1830_ssi0_dr, 0), 1821 + INGENIC_PIN_GROUP("ssi0-clk", x1830_ssi0_clk, 0), 1822 + INGENIC_PIN_GROUP("ssi0-gpc", x1830_ssi0_gpc, 0), 1823 + INGENIC_PIN_GROUP("ssi0-ce0", x1830_ssi0_ce0, 0), 1824 + INGENIC_PIN_GROUP("ssi0-ce1", x1830_ssi0_ce1, 0), 1825 + INGENIC_PIN_GROUP("ssi1-dt-c", x1830_ssi1_dt_c, 1), 1826 + INGENIC_PIN_GROUP("ssi1-dr-c", x1830_ssi1_dr_c, 1), 1827 + INGENIC_PIN_GROUP("ssi1-clk-c", x1830_ssi1_clk_c, 1), 1828 + INGENIC_PIN_GROUP("ssi1-gpc-c", x1830_ssi1_gpc_c, 1), 1829 + INGENIC_PIN_GROUP("ssi1-ce0-c", x1830_ssi1_ce0_c, 1), 1830 + INGENIC_PIN_GROUP("ssi1-ce1-c", x1830_ssi1_ce1_c, 1), 1831 + INGENIC_PIN_GROUP("ssi1-dt-d", x1830_ssi1_dt_d, 2), 1832 + INGENIC_PIN_GROUP("ssi1-dr-d", x1830_ssi1_dr_d, 2), 1833 + INGENIC_PIN_GROUP("ssi1-clk-d", x1830_ssi1_clk_d, 2), 1834 + INGENIC_PIN_GROUP("ssi1-gpc-d", x1830_ssi1_gpc_d, 2), 1835 + INGENIC_PIN_GROUP("ssi1-ce0-d", x1830_ssi1_ce0_d, 2), 1836 + INGENIC_PIN_GROUP("ssi1-ce1-d", x1830_ssi1_ce1_d, 2), 1837 + INGENIC_PIN_GROUP("mmc0-1bit", x1830_mmc0_1bit, 0), 1838 + INGENIC_PIN_GROUP("mmc0-4bit", x1830_mmc0_4bit, 0), 1839 + INGENIC_PIN_GROUP("mmc1-1bit", x1830_mmc1_1bit, 0), 1840 + INGENIC_PIN_GROUP("mmc1-4bit", x1830_mmc1_4bit, 0), 1841 + INGENIC_PIN_GROUP("i2c0-data", x1830_i2c0, 1), 1842 + INGENIC_PIN_GROUP("i2c1-data", x1830_i2c1, 0), 1843 + INGENIC_PIN_GROUP("i2c2-data", x1830_i2c2, 1), 1844 + INGENIC_PIN_GROUP("i2s-data-tx", x1830_i2s_data_tx, 0), 1845 + INGENIC_PIN_GROUP("i2s-data-rx", x1830_i2s_data_rx, 0), 1846 + INGENIC_PIN_GROUP("i2s-clk-txrx", x1830_i2s_clk_txrx, 0), 1847 + INGENIC_PIN_GROUP("i2s-clk-rx", x1830_i2s_clk_rx, 0), 1848 + INGENIC_PIN_GROUP("i2s-sysclk", x1830_i2s_sysclk, 0), 1849 + INGENIC_PIN_GROUP("lcd-rgb-18bit", x1830_lcd_rgb_18bit, 0), 1850 + INGENIC_PIN_GROUP("lcd-slcd-8bit", x1830_lcd_slcd_8bit, 1), 1851 + INGENIC_PIN_GROUP("lcd-slcd-16bit", x1830_lcd_slcd_16bit, 1), 1612 1852 { "lcd-no-pins", }, 1613 - INGENIC_PIN_GROUP("pwm0-b", x1830_pwm_pwm0_b), 1614 - INGENIC_PIN_GROUP("pwm0-c", x1830_pwm_pwm0_c), 1615 - INGENIC_PIN_GROUP("pwm1-b", x1830_pwm_pwm1_b), 1616 - INGENIC_PIN_GROUP("pwm1-c", x1830_pwm_pwm1_c), 1617 - INGENIC_PIN_GROUP("pwm2-c-8", x1830_pwm_pwm2_c_8), 1618 - INGENIC_PIN_GROUP("pwm2-c-13", x1830_pwm_pwm2_c_13), 1619 - INGENIC_PIN_GROUP("pwm3-c-9", x1830_pwm_pwm3_c_9), 1620 - INGENIC_PIN_GROUP("pwm3-c-14", x1830_pwm_pwm3_c_14), 1621 - INGENIC_PIN_GROUP("pwm4-c-15", x1830_pwm_pwm4_c_15), 1622 - INGENIC_PIN_GROUP("pwm4-c-25", x1830_pwm_pwm4_c_25), 1623 - INGENIC_PIN_GROUP("pwm5-c-16", x1830_pwm_pwm5_c_16), 1624 - INGENIC_PIN_GROUP("pwm5-c-26", x1830_pwm_pwm5_c_26), 1625 - INGENIC_PIN_GROUP("pwm6-c-17", x1830_pwm_pwm6_c_17), 1626 - INGENIC_PIN_GROUP("pwm6-c-27", x1830_pwm_pwm6_c_27), 1627 - INGENIC_PIN_GROUP("pwm7-c-18", x1830_pwm_pwm7_c_18), 1628 - INGENIC_PIN_GROUP("pwm7-c-28", x1830_pwm_pwm7_c_28), 1629 - INGENIC_PIN_GROUP("mac", x1830_mac), 1853 + INGENIC_PIN_GROUP("pwm0-b", x1830_pwm_pwm0_b, 0), 1854 + INGENIC_PIN_GROUP("pwm0-c", x1830_pwm_pwm0_c, 1), 1855 + INGENIC_PIN_GROUP("pwm1-b", x1830_pwm_pwm1_b, 0), 1856 + INGENIC_PIN_GROUP("pwm1-c", x1830_pwm_pwm1_c, 1), 1857 + INGENIC_PIN_GROUP("pwm2-c-8", x1830_pwm_pwm2_c_8, 0), 1858 + INGENIC_PIN_GROUP("pwm2-c-13", x1830_pwm_pwm2_c_13, 1), 1859 + INGENIC_PIN_GROUP("pwm3-c-9", x1830_pwm_pwm3_c_9, 0), 1860 + INGENIC_PIN_GROUP("pwm3-c-14", x1830_pwm_pwm3_c_14, 1), 1861 + INGENIC_PIN_GROUP("pwm4-c-15", x1830_pwm_pwm4_c_15, 1), 1862 + INGENIC_PIN_GROUP("pwm4-c-25", x1830_pwm_pwm4_c_25, 0), 1863 + INGENIC_PIN_GROUP("pwm5-c-16", x1830_pwm_pwm5_c_16, 1), 1864 + INGENIC_PIN_GROUP("pwm5-c-26", x1830_pwm_pwm5_c_26, 0), 1865 + INGENIC_PIN_GROUP("pwm6-c-17", x1830_pwm_pwm6_c_17, 1), 1866 + INGENIC_PIN_GROUP("pwm6-c-27", x1830_pwm_pwm6_c_27, 0), 1867 + INGENIC_PIN_GROUP("pwm7-c-18", x1830_pwm_pwm7_c_18, 1), 1868 + INGENIC_PIN_GROUP("pwm7-c-28", x1830_pwm_pwm7_c_28, 0), 1869 + INGENIC_PIN_GROUP("mac", x1830_mac, 0), 1630 1870 }; 1631 1871 1632 1872 static const char *x1830_uart0_groups[] = { "uart0-data", "uart0-hwflow", }; ··· 2017 2381 struct function_desc *func; 2018 2382 struct group_desc *grp; 2019 2383 unsigned int i; 2384 + uintptr_t mode; 2385 + u8 *pin_modes; 2020 2386 2021 2387 func = pinmux_generic_get_function(pctldev, selector); 2022 2388 if (!func) ··· 2031 2393 dev_dbg(pctldev->dev, "enable function %s group %s\n", 2032 2394 func->name, grp->name); 2033 2395 2034 - for (i = 0; i < grp->num_pins; i++) { 2035 - int *pin_modes = grp->data; 2396 + mode = (uintptr_t)grp->data; 2397 + if (mode <= 3) { 2398 + for (i = 0; i < grp->num_pins; i++) 2399 + ingenic_pinmux_set_pin_fn(jzpc, grp->pins[i], mode); 2400 + } else { 2401 + pin_modes = grp->data; 2036 2402 2037 - ingenic_pinmux_set_pin_fn(jzpc, grp->pins[i], pin_modes[i]); 2403 + for (i = 0; i < grp->num_pins; i++) 2404 + ingenic_pinmux_set_pin_fn(jzpc, grp->pins[i], pin_modes[i]); 2038 2405 } 2039 2406 2040 2407 return 0;
+892
drivers/pinctrl/pinctrl-microchip-sgpio.c
··· 1 + // SPDX-License-Identifier: GPL-2.0-or-later 2 + /* 3 + * Microsemi/Microchip SoCs serial gpio driver 4 + * 5 + * Author: Lars Povlsen <lars.povlsen@microchip.com> 6 + * 7 + * Copyright (c) 2020 Microchip Technology Inc. and its subsidiaries. 8 + */ 9 + 10 + #include <linux/bitfield.h> 11 + #include <linux/bits.h> 12 + #include <linux/clk.h> 13 + #include <linux/gpio/driver.h> 14 + #include <linux/io.h> 15 + #include <linux/mod_devicetable.h> 16 + #include <linux/module.h> 17 + #include <linux/pinctrl/pinmux.h> 18 + #include <linux/platform_device.h> 19 + #include <linux/property.h> 20 + 21 + #include "core.h" 22 + #include "pinconf.h" 23 + 24 + #define SGPIO_BITS_PER_WORD 32 25 + #define SGPIO_MAX_BITS 4 26 + #define SGPIO_SRC_BITS 3 /* 3 bit wide field per pin */ 27 + 28 + enum { 29 + REG_INPUT_DATA, 30 + REG_PORT_CONFIG, 31 + REG_PORT_ENABLE, 32 + REG_SIO_CONFIG, 33 + REG_SIO_CLOCK, 34 + REG_INT_POLARITY, 35 + REG_INT_TRIGGER, 36 + REG_INT_ACK, 37 + REG_INT_ENABLE, 38 + REG_INT_IDENT, 39 + MAXREG 40 + }; 41 + 42 + enum { 43 + SGPIO_ARCH_LUTON, 44 + SGPIO_ARCH_OCELOT, 45 + SGPIO_ARCH_SPARX5, 46 + }; 47 + 48 + enum { 49 + SGPIO_FLAGS_HAS_IRQ = BIT(0), 50 + }; 51 + 52 + struct sgpio_properties { 53 + int arch; 54 + int flags; 55 + u8 regoff[MAXREG]; 56 + }; 57 + 58 + #define SGPIO_LUTON_AUTO_REPEAT BIT(5) 59 + #define SGPIO_LUTON_PORT_WIDTH GENMASK(3, 2) 60 + #define SGPIO_LUTON_CLK_FREQ GENMASK(11, 0) 61 + #define SGPIO_LUTON_BIT_SOURCE GENMASK(11, 0) 62 + 63 + #define SGPIO_OCELOT_AUTO_REPEAT BIT(10) 64 + #define SGPIO_OCELOT_PORT_WIDTH GENMASK(8, 7) 65 + #define SGPIO_OCELOT_CLK_FREQ GENMASK(19, 8) 66 + #define SGPIO_OCELOT_BIT_SOURCE GENMASK(23, 12) 67 + 68 + #define SGPIO_SPARX5_AUTO_REPEAT BIT(6) 69 + #define SGPIO_SPARX5_PORT_WIDTH GENMASK(4, 3) 70 + #define SGPIO_SPARX5_CLK_FREQ GENMASK(19, 8) 71 + #define SGPIO_SPARX5_BIT_SOURCE GENMASK(23, 12) 72 + 73 + #define SGPIO_MASTER_INTR_ENA BIT(0) 74 + 75 + #define SGPIO_INT_TRG_LEVEL 0 76 + #define SGPIO_INT_TRG_EDGE 1 77 + #define SGPIO_INT_TRG_EDGE_FALL 2 78 + #define SGPIO_INT_TRG_EDGE_RISE 3 79 + 80 + #define SGPIO_TRG_LEVEL_HIGH 0 81 + #define SGPIO_TRG_LEVEL_LOW 1 82 + 83 + static const struct sgpio_properties properties_luton = { 84 + .arch = SGPIO_ARCH_LUTON, 85 + .regoff = { 0x00, 0x09, 0x29, 0x2a, 0x2b }, 86 + }; 87 + 88 + static const struct sgpio_properties properties_ocelot = { 89 + .arch = SGPIO_ARCH_OCELOT, 90 + .regoff = { 0x00, 0x06, 0x26, 0x04, 0x05 }, 91 + }; 92 + 93 + static const struct sgpio_properties properties_sparx5 = { 94 + .arch = SGPIO_ARCH_SPARX5, 95 + .flags = SGPIO_FLAGS_HAS_IRQ, 96 + .regoff = { 0x00, 0x06, 0x26, 0x04, 0x05, 0x2a, 0x32, 0x3a, 0x3e, 0x42 }, 97 + }; 98 + 99 + static const char * const functions[] = { "gpio" }; 100 + 101 + struct sgpio_bank { 102 + struct sgpio_priv *priv; 103 + bool is_input; 104 + struct gpio_chip gpio; 105 + struct pinctrl_desc pctl_desc; 106 + }; 107 + 108 + struct sgpio_priv { 109 + struct device *dev; 110 + struct sgpio_bank in; 111 + struct sgpio_bank out; 112 + u32 bitcount; 113 + u32 ports; 114 + u32 clock; 115 + u32 __iomem *regs; 116 + const struct sgpio_properties *properties; 117 + }; 118 + 119 + struct sgpio_port_addr { 120 + u8 port; 121 + u8 bit; 122 + }; 123 + 124 + static inline void sgpio_pin_to_addr(struct sgpio_priv *priv, int pin, 125 + struct sgpio_port_addr *addr) 126 + { 127 + addr->port = pin / priv->bitcount; 128 + addr->bit = pin % priv->bitcount; 129 + } 130 + 131 + static inline int sgpio_addr_to_pin(struct sgpio_priv *priv, int port, int bit) 132 + { 133 + return bit + port * priv->bitcount; 134 + } 135 + 136 + static inline u32 sgpio_readl(struct sgpio_priv *priv, u32 rno, u32 off) 137 + { 138 + u32 __iomem *reg = &priv->regs[priv->properties->regoff[rno] + off]; 139 + 140 + return readl(reg); 141 + } 142 + 143 + static inline void sgpio_writel(struct sgpio_priv *priv, 144 + u32 val, u32 rno, u32 off) 145 + { 146 + u32 __iomem *reg = &priv->regs[priv->properties->regoff[rno] + off]; 147 + 148 + writel(val, reg); 149 + } 150 + 151 + static inline void sgpio_clrsetbits(struct sgpio_priv *priv, 152 + u32 rno, u32 off, u32 clear, u32 set) 153 + { 154 + u32 __iomem *reg = &priv->regs[priv->properties->regoff[rno] + off]; 155 + u32 val = readl(reg); 156 + 157 + val &= ~clear; 158 + val |= set; 159 + 160 + writel(val, reg); 161 + } 162 + 163 + static inline void sgpio_configure_bitstream(struct sgpio_priv *priv) 164 + { 165 + int width = priv->bitcount - 1; 166 + u32 clr, set; 167 + 168 + switch (priv->properties->arch) { 169 + case SGPIO_ARCH_LUTON: 170 + clr = SGPIO_LUTON_PORT_WIDTH; 171 + set = SGPIO_LUTON_AUTO_REPEAT | 172 + FIELD_PREP(SGPIO_LUTON_PORT_WIDTH, width); 173 + break; 174 + case SGPIO_ARCH_OCELOT: 175 + clr = SGPIO_OCELOT_PORT_WIDTH; 176 + set = SGPIO_OCELOT_AUTO_REPEAT | 177 + FIELD_PREP(SGPIO_OCELOT_PORT_WIDTH, width); 178 + break; 179 + case SGPIO_ARCH_SPARX5: 180 + clr = SGPIO_SPARX5_PORT_WIDTH; 181 + set = SGPIO_SPARX5_AUTO_REPEAT | 182 + FIELD_PREP(SGPIO_SPARX5_PORT_WIDTH, width); 183 + break; 184 + default: 185 + return; 186 + } 187 + sgpio_clrsetbits(priv, REG_SIO_CONFIG, 0, clr, set); 188 + } 189 + 190 + static inline void sgpio_configure_clock(struct sgpio_priv *priv, u32 clkfrq) 191 + { 192 + u32 clr, set; 193 + 194 + switch (priv->properties->arch) { 195 + case SGPIO_ARCH_LUTON: 196 + clr = SGPIO_LUTON_CLK_FREQ; 197 + set = FIELD_PREP(SGPIO_LUTON_CLK_FREQ, clkfrq); 198 + break; 199 + case SGPIO_ARCH_OCELOT: 200 + clr = SGPIO_OCELOT_CLK_FREQ; 201 + set = FIELD_PREP(SGPIO_OCELOT_CLK_FREQ, clkfrq); 202 + break; 203 + case SGPIO_ARCH_SPARX5: 204 + clr = SGPIO_SPARX5_CLK_FREQ; 205 + set = FIELD_PREP(SGPIO_SPARX5_CLK_FREQ, clkfrq); 206 + break; 207 + default: 208 + return; 209 + } 210 + sgpio_clrsetbits(priv, REG_SIO_CLOCK, 0, clr, set); 211 + } 212 + 213 + static void sgpio_output_set(struct sgpio_priv *priv, 214 + struct sgpio_port_addr *addr, 215 + int value) 216 + { 217 + unsigned int bit = SGPIO_SRC_BITS * addr->bit; 218 + u32 clr, set; 219 + 220 + switch (priv->properties->arch) { 221 + case SGPIO_ARCH_LUTON: 222 + clr = FIELD_PREP(SGPIO_LUTON_BIT_SOURCE, BIT(bit)); 223 + set = FIELD_PREP(SGPIO_LUTON_BIT_SOURCE, value << bit); 224 + break; 225 + case SGPIO_ARCH_OCELOT: 226 + clr = FIELD_PREP(SGPIO_OCELOT_BIT_SOURCE, BIT(bit)); 227 + set = FIELD_PREP(SGPIO_OCELOT_BIT_SOURCE, value << bit); 228 + break; 229 + case SGPIO_ARCH_SPARX5: 230 + clr = FIELD_PREP(SGPIO_SPARX5_BIT_SOURCE, BIT(bit)); 231 + set = FIELD_PREP(SGPIO_SPARX5_BIT_SOURCE, value << bit); 232 + break; 233 + default: 234 + return; 235 + } 236 + sgpio_clrsetbits(priv, REG_PORT_CONFIG, addr->port, clr, set); 237 + } 238 + 239 + static int sgpio_output_get(struct sgpio_priv *priv, 240 + struct sgpio_port_addr *addr) 241 + { 242 + u32 val, portval = sgpio_readl(priv, REG_PORT_CONFIG, addr->port); 243 + unsigned int bit = SGPIO_SRC_BITS * addr->bit; 244 + 245 + switch (priv->properties->arch) { 246 + case SGPIO_ARCH_LUTON: 247 + val = FIELD_GET(SGPIO_LUTON_BIT_SOURCE, portval); 248 + break; 249 + case SGPIO_ARCH_OCELOT: 250 + val = FIELD_GET(SGPIO_OCELOT_BIT_SOURCE, portval); 251 + break; 252 + case SGPIO_ARCH_SPARX5: 253 + val = FIELD_GET(SGPIO_SPARX5_BIT_SOURCE, portval); 254 + break; 255 + default: 256 + val = 0; 257 + break; 258 + } 259 + return !!(val & BIT(bit)); 260 + } 261 + 262 + static int sgpio_input_get(struct sgpio_priv *priv, 263 + struct sgpio_port_addr *addr) 264 + { 265 + return !!(sgpio_readl(priv, REG_INPUT_DATA, addr->bit) & BIT(addr->port)); 266 + } 267 + 268 + static int sgpio_pinconf_get(struct pinctrl_dev *pctldev, 269 + unsigned int pin, unsigned long *config) 270 + { 271 + struct sgpio_bank *bank = pinctrl_dev_get_drvdata(pctldev); 272 + u32 param = pinconf_to_config_param(*config); 273 + struct sgpio_priv *priv = bank->priv; 274 + struct sgpio_port_addr addr; 275 + int val; 276 + 277 + sgpio_pin_to_addr(priv, pin, &addr); 278 + 279 + switch (param) { 280 + case PIN_CONFIG_INPUT_ENABLE: 281 + val = bank->is_input; 282 + break; 283 + 284 + case PIN_CONFIG_OUTPUT_ENABLE: 285 + val = !bank->is_input; 286 + break; 287 + 288 + case PIN_CONFIG_OUTPUT: 289 + if (bank->is_input) 290 + return -EINVAL; 291 + val = sgpio_output_get(priv, &addr); 292 + break; 293 + 294 + default: 295 + return -ENOTSUPP; 296 + } 297 + 298 + *config = pinconf_to_config_packed(param, val); 299 + 300 + return 0; 301 + } 302 + 303 + static int sgpio_pinconf_set(struct pinctrl_dev *pctldev, unsigned int pin, 304 + unsigned long *configs, unsigned int num_configs) 305 + { 306 + struct sgpio_bank *bank = pinctrl_dev_get_drvdata(pctldev); 307 + struct sgpio_priv *priv = bank->priv; 308 + struct sgpio_port_addr addr; 309 + int cfg, err = 0; 310 + u32 param, arg; 311 + 312 + sgpio_pin_to_addr(priv, pin, &addr); 313 + 314 + for (cfg = 0; cfg < num_configs; cfg++) { 315 + param = pinconf_to_config_param(configs[cfg]); 316 + arg = pinconf_to_config_argument(configs[cfg]); 317 + 318 + switch (param) { 319 + case PIN_CONFIG_OUTPUT: 320 + if (bank->is_input) 321 + return -EINVAL; 322 + sgpio_output_set(priv, &addr, arg); 323 + break; 324 + 325 + default: 326 + err = -ENOTSUPP; 327 + } 328 + } 329 + 330 + return err; 331 + } 332 + 333 + static const struct pinconf_ops sgpio_confops = { 334 + .is_generic = true, 335 + .pin_config_get = sgpio_pinconf_get, 336 + .pin_config_set = sgpio_pinconf_set, 337 + .pin_config_config_dbg_show = pinconf_generic_dump_config, 338 + }; 339 + 340 + static int sgpio_get_functions_count(struct pinctrl_dev *pctldev) 341 + { 342 + return 1; 343 + } 344 + 345 + static const char *sgpio_get_function_name(struct pinctrl_dev *pctldev, 346 + unsigned int function) 347 + { 348 + return functions[0]; 349 + } 350 + 351 + static int sgpio_get_function_groups(struct pinctrl_dev *pctldev, 352 + unsigned int function, 353 + const char *const **groups, 354 + unsigned *const num_groups) 355 + { 356 + *groups = functions; 357 + *num_groups = ARRAY_SIZE(functions); 358 + 359 + return 0; 360 + } 361 + 362 + static int sgpio_pinmux_set_mux(struct pinctrl_dev *pctldev, 363 + unsigned int selector, unsigned int group) 364 + { 365 + return 0; 366 + } 367 + 368 + static int sgpio_gpio_set_direction(struct pinctrl_dev *pctldev, 369 + struct pinctrl_gpio_range *range, 370 + unsigned int pin, bool input) 371 + { 372 + struct sgpio_bank *bank = pinctrl_dev_get_drvdata(pctldev); 373 + 374 + return (input == bank->is_input) ? 0 : -EINVAL; 375 + } 376 + 377 + static int sgpio_gpio_request_enable(struct pinctrl_dev *pctldev, 378 + struct pinctrl_gpio_range *range, 379 + unsigned int offset) 380 + { 381 + struct sgpio_bank *bank = pinctrl_dev_get_drvdata(pctldev); 382 + struct sgpio_priv *priv = bank->priv; 383 + struct sgpio_port_addr addr; 384 + 385 + sgpio_pin_to_addr(priv, offset, &addr); 386 + 387 + if ((priv->ports & BIT(addr.port)) == 0) { 388 + dev_warn(priv->dev, "Request port %d.%d: Port is not enabled\n", 389 + addr.port, addr.bit); 390 + return -EINVAL; 391 + } 392 + 393 + return 0; 394 + } 395 + 396 + static const struct pinmux_ops sgpio_pmx_ops = { 397 + .get_functions_count = sgpio_get_functions_count, 398 + .get_function_name = sgpio_get_function_name, 399 + .get_function_groups = sgpio_get_function_groups, 400 + .set_mux = sgpio_pinmux_set_mux, 401 + .gpio_set_direction = sgpio_gpio_set_direction, 402 + .gpio_request_enable = sgpio_gpio_request_enable, 403 + }; 404 + 405 + static int sgpio_pctl_get_groups_count(struct pinctrl_dev *pctldev) 406 + { 407 + struct sgpio_bank *bank = pinctrl_dev_get_drvdata(pctldev); 408 + 409 + return bank->pctl_desc.npins; 410 + } 411 + 412 + static const char *sgpio_pctl_get_group_name(struct pinctrl_dev *pctldev, 413 + unsigned int group) 414 + { 415 + struct sgpio_bank *bank = pinctrl_dev_get_drvdata(pctldev); 416 + 417 + return bank->pctl_desc.pins[group].name; 418 + } 419 + 420 + static int sgpio_pctl_get_group_pins(struct pinctrl_dev *pctldev, 421 + unsigned int group, 422 + const unsigned int **pins, 423 + unsigned int *num_pins) 424 + { 425 + struct sgpio_bank *bank = pinctrl_dev_get_drvdata(pctldev); 426 + 427 + *pins = &bank->pctl_desc.pins[group].number; 428 + *num_pins = 1; 429 + 430 + return 0; 431 + } 432 + 433 + static const struct pinctrl_ops sgpio_pctl_ops = { 434 + .get_groups_count = sgpio_pctl_get_groups_count, 435 + .get_group_name = sgpio_pctl_get_group_name, 436 + .get_group_pins = sgpio_pctl_get_group_pins, 437 + .dt_node_to_map = pinconf_generic_dt_node_to_map_pin, 438 + .dt_free_map = pinconf_generic_dt_free_map, 439 + }; 440 + 441 + static int microchip_sgpio_direction_input(struct gpio_chip *gc, unsigned int gpio) 442 + { 443 + struct sgpio_bank *bank = gpiochip_get_data(gc); 444 + 445 + /* Fixed-position function */ 446 + return bank->is_input ? 0 : -EINVAL; 447 + } 448 + 449 + static int microchip_sgpio_direction_output(struct gpio_chip *gc, 450 + unsigned int gpio, int value) 451 + { 452 + struct sgpio_bank *bank = gpiochip_get_data(gc); 453 + struct sgpio_priv *priv = bank->priv; 454 + struct sgpio_port_addr addr; 455 + 456 + /* Fixed-position function */ 457 + if (bank->is_input) 458 + return -EINVAL; 459 + 460 + sgpio_pin_to_addr(priv, gpio, &addr); 461 + 462 + sgpio_output_set(priv, &addr, value); 463 + 464 + return 0; 465 + } 466 + 467 + static int microchip_sgpio_get_direction(struct gpio_chip *gc, unsigned int gpio) 468 + { 469 + struct sgpio_bank *bank = gpiochip_get_data(gc); 470 + 471 + return bank->is_input ? GPIO_LINE_DIRECTION_IN : GPIO_LINE_DIRECTION_OUT; 472 + } 473 + 474 + static void microchip_sgpio_set_value(struct gpio_chip *gc, 475 + unsigned int gpio, int value) 476 + { 477 + microchip_sgpio_direction_output(gc, gpio, value); 478 + } 479 + 480 + static int microchip_sgpio_get_value(struct gpio_chip *gc, unsigned int gpio) 481 + { 482 + struct sgpio_bank *bank = gpiochip_get_data(gc); 483 + struct sgpio_priv *priv = bank->priv; 484 + struct sgpio_port_addr addr; 485 + 486 + sgpio_pin_to_addr(priv, gpio, &addr); 487 + 488 + return bank->is_input ? sgpio_input_get(priv, &addr) : sgpio_output_get(priv, &addr); 489 + } 490 + 491 + static int microchip_sgpio_of_xlate(struct gpio_chip *gc, 492 + const struct of_phandle_args *gpiospec, 493 + u32 *flags) 494 + { 495 + struct sgpio_bank *bank = gpiochip_get_data(gc); 496 + struct sgpio_priv *priv = bank->priv; 497 + int pin; 498 + 499 + /* 500 + * Note that the SGIO pin is defined by *2* numbers, a port 501 + * number between 0 and 31, and a bit index, 0 to 3. 502 + */ 503 + if (gpiospec->args[0] > SGPIO_BITS_PER_WORD || 504 + gpiospec->args[1] > priv->bitcount) 505 + return -EINVAL; 506 + 507 + pin = sgpio_addr_to_pin(priv, gpiospec->args[0], gpiospec->args[1]); 508 + 509 + if (pin > gc->ngpio) 510 + return -EINVAL; 511 + 512 + if (flags) 513 + *flags = gpiospec->args[2]; 514 + 515 + return pin; 516 + } 517 + 518 + static int microchip_sgpio_get_ports(struct sgpio_priv *priv) 519 + { 520 + const char *range_property_name = "microchip,sgpio-port-ranges"; 521 + struct device *dev = priv->dev; 522 + u32 range_params[64]; 523 + int i, nranges, ret; 524 + 525 + /* Calculate port mask */ 526 + nranges = device_property_count_u32(dev, range_property_name); 527 + if (nranges < 2 || nranges % 2 || nranges > ARRAY_SIZE(range_params)) { 528 + dev_err(dev, "%s port range: '%s' property\n", 529 + nranges == -EINVAL ? "Missing" : "Invalid", 530 + range_property_name); 531 + return -EINVAL; 532 + } 533 + 534 + ret = device_property_read_u32_array(dev, range_property_name, 535 + range_params, nranges); 536 + if (ret) { 537 + dev_err(dev, "failed to parse '%s' property: %d\n", 538 + range_property_name, ret); 539 + return ret; 540 + } 541 + for (i = 0; i < nranges; i += 2) { 542 + int start, end; 543 + 544 + start = range_params[i]; 545 + end = range_params[i + 1]; 546 + if (start > end || end >= SGPIO_BITS_PER_WORD) { 547 + dev_err(dev, "Ill-formed port-range [%d:%d]\n", 548 + start, end); 549 + } 550 + priv->ports |= GENMASK(end, start); 551 + } 552 + 553 + return 0; 554 + } 555 + 556 + static void microchip_sgpio_irq_settype(struct irq_data *data, 557 + int type, 558 + int polarity) 559 + { 560 + struct gpio_chip *chip = irq_data_get_irq_chip_data(data); 561 + struct sgpio_bank *bank = gpiochip_get_data(chip); 562 + unsigned int gpio = irqd_to_hwirq(data); 563 + struct sgpio_port_addr addr; 564 + u32 ena; 565 + 566 + sgpio_pin_to_addr(bank->priv, gpio, &addr); 567 + 568 + /* Disable interrupt while changing type */ 569 + ena = sgpio_readl(bank->priv, REG_INT_ENABLE, addr.bit); 570 + sgpio_writel(bank->priv, ena & ~BIT(addr.port), REG_INT_ENABLE, addr.bit); 571 + 572 + /* Type value spread over 2 registers sets: low, high bit */ 573 + sgpio_clrsetbits(bank->priv, REG_INT_TRIGGER, addr.bit, 574 + BIT(addr.port), (!!(type & 0x1)) << addr.port); 575 + sgpio_clrsetbits(bank->priv, REG_INT_TRIGGER + SGPIO_MAX_BITS, addr.bit, 576 + BIT(addr.port), (!!(type & 0x2)) << addr.port); 577 + 578 + if (type == SGPIO_INT_TRG_LEVEL) 579 + sgpio_clrsetbits(bank->priv, REG_INT_POLARITY, addr.bit, 580 + BIT(addr.port), polarity << addr.port); 581 + 582 + /* Possibly re-enable interrupts */ 583 + sgpio_writel(bank->priv, ena, REG_INT_ENABLE, addr.bit); 584 + } 585 + 586 + static void microchip_sgpio_irq_setreg(struct irq_data *data, 587 + int reg, 588 + bool clear) 589 + { 590 + struct gpio_chip *chip = irq_data_get_irq_chip_data(data); 591 + struct sgpio_bank *bank = gpiochip_get_data(chip); 592 + unsigned int gpio = irqd_to_hwirq(data); 593 + struct sgpio_port_addr addr; 594 + 595 + sgpio_pin_to_addr(bank->priv, gpio, &addr); 596 + 597 + if (clear) 598 + sgpio_clrsetbits(bank->priv, reg, addr.bit, BIT(addr.port), 0); 599 + else 600 + sgpio_clrsetbits(bank->priv, reg, addr.bit, 0, BIT(addr.port)); 601 + } 602 + 603 + static void microchip_sgpio_irq_mask(struct irq_data *data) 604 + { 605 + microchip_sgpio_irq_setreg(data, REG_INT_ENABLE, true); 606 + } 607 + 608 + static void microchip_sgpio_irq_unmask(struct irq_data *data) 609 + { 610 + microchip_sgpio_irq_setreg(data, REG_INT_ENABLE, false); 611 + } 612 + 613 + static void microchip_sgpio_irq_ack(struct irq_data *data) 614 + { 615 + microchip_sgpio_irq_setreg(data, REG_INT_ACK, false); 616 + } 617 + 618 + static int microchip_sgpio_irq_set_type(struct irq_data *data, unsigned int type) 619 + { 620 + type &= IRQ_TYPE_SENSE_MASK; 621 + 622 + switch (type) { 623 + case IRQ_TYPE_EDGE_BOTH: 624 + irq_set_handler_locked(data, handle_edge_irq); 625 + microchip_sgpio_irq_settype(data, SGPIO_INT_TRG_EDGE, 0); 626 + break; 627 + case IRQ_TYPE_EDGE_RISING: 628 + irq_set_handler_locked(data, handle_edge_irq); 629 + microchip_sgpio_irq_settype(data, SGPIO_INT_TRG_EDGE_RISE, 0); 630 + break; 631 + case IRQ_TYPE_EDGE_FALLING: 632 + irq_set_handler_locked(data, handle_edge_irq); 633 + microchip_sgpio_irq_settype(data, SGPIO_INT_TRG_EDGE_FALL, 0); 634 + break; 635 + case IRQ_TYPE_LEVEL_HIGH: 636 + irq_set_handler_locked(data, handle_level_irq); 637 + microchip_sgpio_irq_settype(data, SGPIO_INT_TRG_LEVEL, SGPIO_TRG_LEVEL_HIGH); 638 + break; 639 + case IRQ_TYPE_LEVEL_LOW: 640 + irq_set_handler_locked(data, handle_level_irq); 641 + microchip_sgpio_irq_settype(data, SGPIO_INT_TRG_LEVEL, SGPIO_TRG_LEVEL_LOW); 642 + break; 643 + default: 644 + return -EINVAL; 645 + } 646 + 647 + return 0; 648 + } 649 + 650 + static const struct irq_chip microchip_sgpio_irqchip = { 651 + .name = "gpio", 652 + .irq_mask = microchip_sgpio_irq_mask, 653 + .irq_ack = microchip_sgpio_irq_ack, 654 + .irq_unmask = microchip_sgpio_irq_unmask, 655 + .irq_set_type = microchip_sgpio_irq_set_type, 656 + }; 657 + 658 + static void sgpio_irq_handler(struct irq_desc *desc) 659 + { 660 + struct irq_chip *parent_chip = irq_desc_get_chip(desc); 661 + struct gpio_chip *chip = irq_desc_get_handler_data(desc); 662 + struct sgpio_bank *bank = gpiochip_get_data(chip); 663 + struct sgpio_priv *priv = bank->priv; 664 + int bit, port, gpio; 665 + long val; 666 + 667 + for (bit = 0; bit < priv->bitcount; bit++) { 668 + val = sgpio_readl(priv, REG_INT_IDENT, bit); 669 + if (!val) 670 + continue; 671 + 672 + chained_irq_enter(parent_chip, desc); 673 + 674 + for_each_set_bit(port, &val, SGPIO_BITS_PER_WORD) { 675 + gpio = sgpio_addr_to_pin(priv, port, bit); 676 + generic_handle_irq(irq_linear_revmap(chip->irq.domain, gpio)); 677 + } 678 + 679 + chained_irq_exit(parent_chip, desc); 680 + } 681 + } 682 + 683 + static int microchip_sgpio_register_bank(struct device *dev, 684 + struct sgpio_priv *priv, 685 + struct fwnode_handle *fwnode, 686 + int bankno) 687 + { 688 + struct pinctrl_pin_desc *pins; 689 + struct pinctrl_desc *pctl_desc; 690 + struct pinctrl_dev *pctldev; 691 + struct sgpio_bank *bank; 692 + struct gpio_chip *gc; 693 + u32 ngpios; 694 + int i, ret; 695 + 696 + /* Get overall bank struct */ 697 + bank = (bankno == 0) ? &priv->in : &priv->out; 698 + bank->priv = priv; 699 + 700 + if (fwnode_property_read_u32(fwnode, "ngpios", &ngpios)) { 701 + dev_info(dev, "failed to get number of gpios for bank%d\n", 702 + bankno); 703 + ngpios = 64; 704 + } 705 + 706 + priv->bitcount = ngpios / SGPIO_BITS_PER_WORD; 707 + if (priv->bitcount > SGPIO_MAX_BITS) { 708 + dev_err(dev, "Bit width exceeds maximum (%d)\n", 709 + SGPIO_MAX_BITS); 710 + return -EINVAL; 711 + } 712 + 713 + pctl_desc = &bank->pctl_desc; 714 + pctl_desc->name = devm_kasprintf(dev, GFP_KERNEL, "%s-%sput", 715 + dev_name(dev), 716 + bank->is_input ? "in" : "out"); 717 + pctl_desc->pctlops = &sgpio_pctl_ops; 718 + pctl_desc->pmxops = &sgpio_pmx_ops; 719 + pctl_desc->confops = &sgpio_confops; 720 + pctl_desc->owner = THIS_MODULE; 721 + 722 + pins = devm_kzalloc(dev, sizeof(*pins)*ngpios, GFP_KERNEL); 723 + if (!pins) 724 + return -ENOMEM; 725 + 726 + pctl_desc->npins = ngpios; 727 + pctl_desc->pins = pins; 728 + 729 + for (i = 0; i < ngpios; i++) { 730 + struct sgpio_port_addr addr; 731 + 732 + sgpio_pin_to_addr(priv, i, &addr); 733 + 734 + pins[i].number = i; 735 + pins[i].name = devm_kasprintf(dev, GFP_KERNEL, 736 + "SGPIO_%c_p%db%d", 737 + bank->is_input ? 'I' : 'O', 738 + addr.port, addr.bit); 739 + if (!pins[i].name) 740 + return -ENOMEM; 741 + } 742 + 743 + pctldev = devm_pinctrl_register(dev, pctl_desc, bank); 744 + if (IS_ERR(pctldev)) 745 + return dev_err_probe(dev, PTR_ERR(pctldev), "Failed to register pinctrl\n"); 746 + 747 + gc = &bank->gpio; 748 + gc->label = pctl_desc->name; 749 + gc->parent = dev; 750 + gc->of_node = to_of_node(fwnode); 751 + gc->owner = THIS_MODULE; 752 + gc->get_direction = microchip_sgpio_get_direction; 753 + gc->direction_input = microchip_sgpio_direction_input; 754 + gc->direction_output = microchip_sgpio_direction_output; 755 + gc->get = microchip_sgpio_get_value; 756 + gc->set = microchip_sgpio_set_value; 757 + gc->request = gpiochip_generic_request; 758 + gc->free = gpiochip_generic_free; 759 + gc->of_xlate = microchip_sgpio_of_xlate; 760 + gc->of_gpio_n_cells = 3; 761 + gc->base = -1; 762 + gc->ngpio = ngpios; 763 + 764 + if (bank->is_input && priv->properties->flags & SGPIO_FLAGS_HAS_IRQ) { 765 + int irq = fwnode_irq_get(fwnode, 0); 766 + 767 + if (irq) { 768 + struct gpio_irq_chip *girq = &gc->irq; 769 + 770 + girq->chip = devm_kmemdup(dev, &microchip_sgpio_irqchip, 771 + sizeof(microchip_sgpio_irqchip), 772 + GFP_KERNEL); 773 + if (!girq->chip) 774 + return -ENOMEM; 775 + girq->parent_handler = sgpio_irq_handler; 776 + girq->num_parents = 1; 777 + girq->parents = devm_kcalloc(dev, 1, 778 + sizeof(*girq->parents), 779 + GFP_KERNEL); 780 + if (!girq->parents) 781 + return -ENOMEM; 782 + girq->parents[0] = irq; 783 + girq->default_type = IRQ_TYPE_NONE; 784 + girq->handler = handle_bad_irq; 785 + 786 + /* Disable all individual pins */ 787 + for (i = 0; i < SGPIO_MAX_BITS; i++) 788 + sgpio_writel(priv, 0, REG_INT_ENABLE, i); 789 + /* Master enable */ 790 + sgpio_clrsetbits(priv, REG_SIO_CONFIG, 0, 0, SGPIO_MASTER_INTR_ENA); 791 + } 792 + } 793 + 794 + ret = devm_gpiochip_add_data(dev, gc, bank); 795 + if (ret) 796 + dev_err(dev, "Failed to register: ret %d\n", ret); 797 + 798 + return ret; 799 + } 800 + 801 + static int microchip_sgpio_probe(struct platform_device *pdev) 802 + { 803 + int div_clock = 0, ret, port, i, nbanks; 804 + struct device *dev = &pdev->dev; 805 + struct fwnode_handle *fwnode; 806 + struct sgpio_priv *priv; 807 + struct clk *clk; 808 + u32 val; 809 + 810 + priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); 811 + if (!priv) 812 + return -ENOMEM; 813 + 814 + priv->dev = dev; 815 + 816 + clk = devm_clk_get(dev, NULL); 817 + if (IS_ERR(clk)) 818 + return dev_err_probe(dev, PTR_ERR(clk), "Failed to get clock\n"); 819 + 820 + div_clock = clk_get_rate(clk); 821 + if (device_property_read_u32(dev, "bus-frequency", &priv->clock)) 822 + priv->clock = 12500000; 823 + if (priv->clock == 0 || priv->clock > (div_clock / 2)) { 824 + dev_err(dev, "Invalid frequency %d\n", priv->clock); 825 + return -EINVAL; 826 + } 827 + 828 + priv->regs = devm_platform_ioremap_resource(pdev, 0); 829 + if (IS_ERR(priv->regs)) 830 + return PTR_ERR(priv->regs); 831 + priv->properties = device_get_match_data(dev); 832 + priv->in.is_input = true; 833 + 834 + /* Get rest of device properties */ 835 + ret = microchip_sgpio_get_ports(priv); 836 + if (ret) 837 + return ret; 838 + 839 + nbanks = device_get_child_node_count(dev); 840 + if (nbanks != 2) { 841 + dev_err(dev, "Must have 2 banks (have %d)\n", nbanks); 842 + return -EINVAL; 843 + } 844 + 845 + i = 0; 846 + device_for_each_child_node(dev, fwnode) { 847 + ret = microchip_sgpio_register_bank(dev, priv, fwnode, i++); 848 + if (ret) 849 + return ret; 850 + } 851 + 852 + if (priv->in.gpio.ngpio != priv->out.gpio.ngpio) { 853 + dev_err(dev, "Banks must have same GPIO count\n"); 854 + return -ERANGE; 855 + } 856 + 857 + sgpio_configure_bitstream(priv); 858 + 859 + val = max(2U, div_clock / priv->clock); 860 + sgpio_configure_clock(priv, val); 861 + 862 + for (port = 0; port < SGPIO_BITS_PER_WORD; port++) 863 + sgpio_writel(priv, 0, REG_PORT_CONFIG, port); 864 + sgpio_writel(priv, priv->ports, REG_PORT_ENABLE, 0); 865 + 866 + return 0; 867 + } 868 + 869 + static const struct of_device_id microchip_sgpio_gpio_of_match[] = { 870 + { 871 + .compatible = "microchip,sparx5-sgpio", 872 + .data = &properties_sparx5, 873 + }, { 874 + .compatible = "mscc,luton-sgpio", 875 + .data = &properties_luton, 876 + }, { 877 + .compatible = "mscc,ocelot-sgpio", 878 + .data = &properties_ocelot, 879 + }, { 880 + /* sentinel */ 881 + } 882 + }; 883 + 884 + static struct platform_driver microchip_sgpio_pinctrl_driver = { 885 + .driver = { 886 + .name = "pinctrl-microchip-sgpio", 887 + .of_match_table = microchip_sgpio_gpio_of_match, 888 + .suppress_bind_attrs = true, 889 + }, 890 + .probe = microchip_sgpio_probe, 891 + }; 892 + builtin_platform_driver(microchip_sgpio_pinctrl_driver);
+185 -1
drivers/pinctrl/pinctrl-ocelot.c
··· 158 158 u8 stride; 159 159 }; 160 160 161 + #define LUTON_P(p, f0, f1) \ 162 + static struct ocelot_pin_caps luton_pin_##p = { \ 163 + .pin = p, \ 164 + .functions = { \ 165 + FUNC_GPIO, FUNC_##f0, FUNC_##f1, FUNC_NONE, \ 166 + }, \ 167 + } 168 + 169 + LUTON_P(0, SG0, NONE); 170 + LUTON_P(1, SG0, NONE); 171 + LUTON_P(2, SG0, NONE); 172 + LUTON_P(3, SG0, NONE); 173 + LUTON_P(4, TACHO, NONE); 174 + LUTON_P(5, TWI, PHY_LED); 175 + LUTON_P(6, TWI, PHY_LED); 176 + LUTON_P(7, NONE, PHY_LED); 177 + LUTON_P(8, EXT_IRQ, PHY_LED); 178 + LUTON_P(9, EXT_IRQ, PHY_LED); 179 + LUTON_P(10, SFP, PHY_LED); 180 + LUTON_P(11, SFP, PHY_LED); 181 + LUTON_P(12, SFP, PHY_LED); 182 + LUTON_P(13, SFP, PHY_LED); 183 + LUTON_P(14, SI, PHY_LED); 184 + LUTON_P(15, SI, PHY_LED); 185 + LUTON_P(16, SI, PHY_LED); 186 + LUTON_P(17, SFP, PHY_LED); 187 + LUTON_P(18, SFP, PHY_LED); 188 + LUTON_P(19, SFP, PHY_LED); 189 + LUTON_P(20, SFP, PHY_LED); 190 + LUTON_P(21, SFP, PHY_LED); 191 + LUTON_P(22, SFP, PHY_LED); 192 + LUTON_P(23, SFP, PHY_LED); 193 + LUTON_P(24, SFP, PHY_LED); 194 + LUTON_P(25, SFP, PHY_LED); 195 + LUTON_P(26, SFP, PHY_LED); 196 + LUTON_P(27, SFP, PHY_LED); 197 + LUTON_P(28, SFP, PHY_LED); 198 + LUTON_P(29, PWM, NONE); 199 + LUTON_P(30, UART, NONE); 200 + LUTON_P(31, UART, NONE); 201 + 202 + #define LUTON_PIN(n) { \ 203 + .number = n, \ 204 + .name = "GPIO_"#n, \ 205 + .drv_data = &luton_pin_##n \ 206 + } 207 + 208 + static const struct pinctrl_pin_desc luton_pins[] = { 209 + LUTON_PIN(0), 210 + LUTON_PIN(1), 211 + LUTON_PIN(2), 212 + LUTON_PIN(3), 213 + LUTON_PIN(4), 214 + LUTON_PIN(5), 215 + LUTON_PIN(6), 216 + LUTON_PIN(7), 217 + LUTON_PIN(8), 218 + LUTON_PIN(9), 219 + LUTON_PIN(10), 220 + LUTON_PIN(11), 221 + LUTON_PIN(12), 222 + LUTON_PIN(13), 223 + LUTON_PIN(14), 224 + LUTON_PIN(15), 225 + LUTON_PIN(16), 226 + LUTON_PIN(17), 227 + LUTON_PIN(18), 228 + LUTON_PIN(19), 229 + LUTON_PIN(20), 230 + LUTON_PIN(21), 231 + LUTON_PIN(22), 232 + LUTON_PIN(23), 233 + LUTON_PIN(24), 234 + LUTON_PIN(25), 235 + LUTON_PIN(26), 236 + LUTON_PIN(27), 237 + LUTON_PIN(28), 238 + LUTON_PIN(29), 239 + LUTON_PIN(30), 240 + LUTON_PIN(31), 241 + }; 242 + 243 + #define SERVAL_P(p, f0, f1, f2) \ 244 + static struct ocelot_pin_caps serval_pin_##p = { \ 245 + .pin = p, \ 246 + .functions = { \ 247 + FUNC_GPIO, FUNC_##f0, FUNC_##f1, FUNC_##f2, \ 248 + }, \ 249 + } 250 + 251 + SERVAL_P(0, SG0, NONE, NONE); 252 + SERVAL_P(1, SG0, NONE, NONE); 253 + SERVAL_P(2, SG0, NONE, NONE); 254 + SERVAL_P(3, SG0, NONE, NONE); 255 + SERVAL_P(4, TACHO, NONE, NONE); 256 + SERVAL_P(5, PWM, NONE, NONE); 257 + SERVAL_P(6, TWI, NONE, NONE); 258 + SERVAL_P(7, TWI, NONE, NONE); 259 + SERVAL_P(8, SI, NONE, NONE); 260 + SERVAL_P(9, SI, MD, NONE); 261 + SERVAL_P(10, SI, MD, NONE); 262 + SERVAL_P(11, SFP, MD, TWI_SCL_M); 263 + SERVAL_P(12, SFP, MD, TWI_SCL_M); 264 + SERVAL_P(13, SFP, UART2, TWI_SCL_M); 265 + SERVAL_P(14, SFP, UART2, TWI_SCL_M); 266 + SERVAL_P(15, SFP, PTP0, TWI_SCL_M); 267 + SERVAL_P(16, SFP, PTP0, TWI_SCL_M); 268 + SERVAL_P(17, SFP, PCI_WAKE, TWI_SCL_M); 269 + SERVAL_P(18, SFP, NONE, TWI_SCL_M); 270 + SERVAL_P(19, SFP, NONE, TWI_SCL_M); 271 + SERVAL_P(20, SFP, NONE, TWI_SCL_M); 272 + SERVAL_P(21, SFP, NONE, TWI_SCL_M); 273 + SERVAL_P(22, NONE, NONE, NONE); 274 + SERVAL_P(23, NONE, NONE, NONE); 275 + SERVAL_P(24, NONE, NONE, NONE); 276 + SERVAL_P(25, NONE, NONE, NONE); 277 + SERVAL_P(26, UART, NONE, NONE); 278 + SERVAL_P(27, UART, NONE, NONE); 279 + SERVAL_P(28, IRQ0, NONE, NONE); 280 + SERVAL_P(29, IRQ1, NONE, NONE); 281 + SERVAL_P(30, PTP0, NONE, NONE); 282 + SERVAL_P(31, PTP0, NONE, NONE); 283 + 284 + #define SERVAL_PIN(n) { \ 285 + .number = n, \ 286 + .name = "GPIO_"#n, \ 287 + .drv_data = &serval_pin_##n \ 288 + } 289 + 290 + static const struct pinctrl_pin_desc serval_pins[] = { 291 + SERVAL_PIN(0), 292 + SERVAL_PIN(1), 293 + SERVAL_PIN(2), 294 + SERVAL_PIN(3), 295 + SERVAL_PIN(4), 296 + SERVAL_PIN(5), 297 + SERVAL_PIN(6), 298 + SERVAL_PIN(7), 299 + SERVAL_PIN(8), 300 + SERVAL_PIN(9), 301 + SERVAL_PIN(10), 302 + SERVAL_PIN(11), 303 + SERVAL_PIN(12), 304 + SERVAL_PIN(13), 305 + SERVAL_PIN(14), 306 + SERVAL_PIN(15), 307 + SERVAL_PIN(16), 308 + SERVAL_PIN(17), 309 + SERVAL_PIN(18), 310 + SERVAL_PIN(19), 311 + SERVAL_PIN(20), 312 + SERVAL_PIN(21), 313 + SERVAL_PIN(22), 314 + SERVAL_PIN(23), 315 + SERVAL_PIN(24), 316 + SERVAL_PIN(25), 317 + SERVAL_PIN(26), 318 + SERVAL_PIN(27), 319 + SERVAL_PIN(28), 320 + SERVAL_PIN(29), 321 + SERVAL_PIN(30), 322 + SERVAL_PIN(31), 323 + }; 324 + 161 325 #define OCELOT_P(p, f0, f1, f2) \ 162 326 static struct ocelot_pin_caps ocelot_pin_##p = { \ 163 327 .pin = p, \ ··· 893 729 if (err) 894 730 return err; 895 731 if (param == PIN_CONFIG_BIAS_DISABLE) 896 - val = (val == 0 ? true : false); 732 + val = (val == 0); 897 733 else if (param == PIN_CONFIG_BIAS_PULL_DOWN) 898 734 val = (val & BIAS_PD_BIT ? true : false); 899 735 else /* PIN_CONFIG_BIAS_PULL_UP */ ··· 1030 866 .get_group_pins = ocelot_pctl_get_group_pins, 1031 867 .dt_node_to_map = pinconf_generic_dt_node_to_map_pin, 1032 868 .dt_free_map = pinconf_generic_dt_free_map, 869 + }; 870 + 871 + static struct pinctrl_desc luton_desc = { 872 + .name = "luton-pinctrl", 873 + .pins = luton_pins, 874 + .npins = ARRAY_SIZE(luton_pins), 875 + .pctlops = &ocelot_pctl_ops, 876 + .pmxops = &ocelot_pmx_ops, 877 + .owner = THIS_MODULE, 878 + }; 879 + 880 + static struct pinctrl_desc serval_desc = { 881 + .name = "serval-pinctrl", 882 + .pins = serval_pins, 883 + .npins = ARRAY_SIZE(serval_pins), 884 + .pctlops = &ocelot_pctl_ops, 885 + .pmxops = &ocelot_pmx_ops, 886 + .owner = THIS_MODULE, 1033 887 }; 1034 888 1035 889 static struct pinctrl_desc ocelot_desc = { ··· 1333 1151 } 1334 1152 1335 1153 static const struct of_device_id ocelot_pinctrl_of_match[] = { 1154 + { .compatible = "mscc,luton-pinctrl", .data = &luton_desc }, 1155 + { .compatible = "mscc,serval-pinctrl", .data = &serval_desc }, 1336 1156 { .compatible = "mscc,ocelot-pinctrl", .data = &ocelot_desc }, 1337 1157 { .compatible = "mscc,jaguar2-pinctrl", .data = &jaguar2_desc }, 1338 1158 { .compatible = "microchip,sparx5-pinctrl", .data = &sparx5_desc },
+64 -24
drivers/pinctrl/qcom/Kconfig
··· 2 2 if (ARCH_QCOM || COMPILE_TEST) 3 3 4 4 config PINCTRL_MSM 5 - bool 5 + tristate "Qualcomm core pin controller driver" 6 + depends on QCOM_SCM || !QCOM_SCM #if QCOM_SCM=m this can't be =y 6 7 select PINMUX 7 8 select PINCONF 8 9 select GENERIC_PINCONF ··· 14 13 config PINCTRL_APQ8064 15 14 tristate "Qualcomm APQ8064 pin controller driver" 16 15 depends on GPIOLIB && OF 17 - select PINCTRL_MSM 16 + depends on PINCTRL_MSM 18 17 help 19 18 This is the pinctrl, pinmux, pinconf and gpiolib driver for the 20 19 Qualcomm TLMM block found in the Qualcomm APQ8064 platform. ··· 22 21 config PINCTRL_APQ8084 23 22 tristate "Qualcomm APQ8084 pin controller driver" 24 23 depends on GPIOLIB && OF 25 - select PINCTRL_MSM 24 + depends on PINCTRL_MSM 26 25 help 27 26 This is the pinctrl, pinmux, pinconf and gpiolib driver for the 28 27 Qualcomm TLMM block found in the Qualcomm APQ8084 platform. ··· 30 29 config PINCTRL_IPQ4019 31 30 tristate "Qualcomm IPQ4019 pin controller driver" 32 31 depends on GPIOLIB && OF 33 - select PINCTRL_MSM 32 + depends on PINCTRL_MSM 34 33 help 35 34 This is the pinctrl, pinmux, pinconf and gpiolib driver for the 36 35 Qualcomm TLMM block found in the Qualcomm IPQ4019 platform. ··· 38 37 config PINCTRL_IPQ8064 39 38 tristate "Qualcomm IPQ8064 pin controller driver" 40 39 depends on GPIOLIB && OF 41 - select PINCTRL_MSM 40 + depends on PINCTRL_MSM 42 41 help 43 42 This is the pinctrl, pinmux, pinconf and gpiolib driver for the 44 43 Qualcomm TLMM block found in the Qualcomm IPQ8064 platform. ··· 46 45 config PINCTRL_IPQ8074 47 46 tristate "Qualcomm Technologies, Inc. IPQ8074 pin controller driver" 48 47 depends on GPIOLIB && OF 49 - select PINCTRL_MSM 48 + depends on PINCTRL_MSM 50 49 help 51 50 This is the pinctrl, pinmux, pinconf and gpiolib driver for 52 51 the Qualcomm Technologies Inc. TLMM block found on the ··· 56 55 config PINCTRL_IPQ6018 57 56 tristate "Qualcomm Technologies, Inc. IPQ6018 pin controller driver" 58 57 depends on GPIOLIB && OF 59 - select PINCTRL_MSM 58 + depends on PINCTRL_MSM 60 59 help 61 60 This is the pinctrl, pinmux, pinconf and gpiolib driver for 62 61 the Qualcomm Technologies Inc. TLMM block found on the ··· 66 65 config PINCTRL_MSM8226 67 66 tristate "Qualcomm 8226 pin controller driver" 68 67 depends on GPIOLIB && OF 69 - select PINCTRL_MSM 68 + depends on PINCTRL_MSM 70 69 help 71 70 This is the pinctrl, pinmux, pinconf and gpiolib driver for the 72 71 Qualcomm Technologies Inc TLMM block found on the Qualcomm ··· 75 74 config PINCTRL_MSM8660 76 75 tristate "Qualcomm 8660 pin controller driver" 77 76 depends on GPIOLIB && OF 78 - select PINCTRL_MSM 77 + depends on PINCTRL_MSM 79 78 help 80 79 This is the pinctrl, pinmux, pinconf and gpiolib driver for the 81 80 Qualcomm TLMM block found in the Qualcomm 8660 platform. ··· 83 82 config PINCTRL_MSM8960 84 83 tristate "Qualcomm 8960 pin controller driver" 85 84 depends on GPIOLIB && OF 86 - select PINCTRL_MSM 85 + depends on PINCTRL_MSM 87 86 help 88 87 This is the pinctrl, pinmux, pinconf and gpiolib driver for the 89 88 Qualcomm TLMM block found in the Qualcomm 8960 platform. ··· 91 90 config PINCTRL_MDM9615 92 91 tristate "Qualcomm 9615 pin controller driver" 93 92 depends on GPIOLIB && OF 94 - select PINCTRL_MSM 93 + depends on PINCTRL_MSM 95 94 help 96 95 This is the pinctrl, pinmux, pinconf and gpiolib driver for the 97 96 Qualcomm TLMM block found in the Qualcomm 9615 platform. ··· 99 98 config PINCTRL_MSM8X74 100 99 tristate "Qualcomm 8x74 pin controller driver" 101 100 depends on GPIOLIB && OF 102 - select PINCTRL_MSM 101 + depends on PINCTRL_MSM 103 102 help 104 103 This is the pinctrl, pinmux, pinconf and gpiolib driver for the 105 104 Qualcomm TLMM block found in the Qualcomm 8974 platform. ··· 107 106 config PINCTRL_MSM8916 108 107 tristate "Qualcomm 8916 pin controller driver" 109 108 depends on GPIOLIB && OF 110 - select PINCTRL_MSM 109 + depends on PINCTRL_MSM 111 110 help 112 111 This is the pinctrl, pinmux, pinconf and gpiolib driver for the 113 112 Qualcomm TLMM block found on the Qualcomm 8916 platform. 114 113 114 + config PINCTRL_MSM8953 115 + tristate "Qualcomm 8953 pin controller driver" 116 + depends on GPIOLIB && OF 117 + depends on PINCTRL_MSM 118 + help 119 + This is the pinctrl, pinmux, pinconf and gpiolib driver for the 120 + Qualcomm TLMM block found on the Qualcomm MSM8953 platform. 121 + The Qualcomm APQ8053, SDM450, SDM632 platforms are also 122 + supported by this driver. 123 + 115 124 config PINCTRL_MSM8976 116 125 tristate "Qualcomm 8976 pin controller driver" 117 126 depends on GPIOLIB && OF 118 - select PINCTRL_MSM 127 + depends on PINCTRL_MSM 119 128 help 120 129 This is the pinctrl, pinmux, pinconf and gpiolib driver for the 121 130 Qualcomm TLMM block found on the Qualcomm MSM8976 platform. ··· 135 124 config PINCTRL_MSM8994 136 125 tristate "Qualcomm 8994 pin controller driver" 137 126 depends on GPIOLIB && OF 138 - select PINCTRL_MSM 127 + depends on PINCTRL_MSM 139 128 help 140 129 This is the pinctrl, pinmux, pinconf and gpiolib driver for the 141 130 Qualcomm TLMM block found in the Qualcomm 8994 platform. The ··· 144 133 config PINCTRL_MSM8996 145 134 tristate "Qualcomm MSM8996 pin controller driver" 146 135 depends on GPIOLIB && OF 147 - select PINCTRL_MSM 136 + depends on PINCTRL_MSM 148 137 help 149 138 This is the pinctrl, pinmux, pinconf and gpiolib driver for the 150 139 Qualcomm TLMM block found in the Qualcomm MSM8996 platform. ··· 152 141 config PINCTRL_MSM8998 153 142 tristate "Qualcomm MSM8998 pin controller driver" 154 143 depends on GPIOLIB && OF 155 - select PINCTRL_MSM 144 + depends on PINCTRL_MSM 156 145 help 157 146 This is the pinctrl, pinmux, pinconf and gpiolib driver for the 158 147 Qualcomm TLMM block found in the Qualcomm MSM8998 platform. ··· 160 149 config PINCTRL_QCS404 161 150 tristate "Qualcomm QCS404 pin controller driver" 162 151 depends on GPIOLIB && OF 163 - select PINCTRL_MSM 152 + depends on PINCTRL_MSM 164 153 help 165 154 This is the pinctrl, pinmux, pinconf and gpiolib driver for the 166 155 TLMM block found in the Qualcomm QCS404 platform. ··· 168 157 config PINCTRL_QDF2XXX 169 158 tristate "Qualcomm Technologies QDF2xxx pin controller driver" 170 159 depends on GPIOLIB && ACPI 171 - select PINCTRL_MSM 160 + depends on PINCTRL_MSM 172 161 help 173 162 This is the GPIO driver for the TLMM block found on the 174 163 Qualcomm Technologies QDF2xxx SOCs. ··· 205 194 config PINCTRL_SC7180 206 195 tristate "Qualcomm Technologies Inc SC7180 pin controller driver" 207 196 depends on GPIOLIB && OF 208 - select PINCTRL_MSM 197 + depends on PINCTRL_MSM 209 198 help 210 199 This is the pinctrl, pinmux, pinconf and gpiolib driver for the 211 200 Qualcomm Technologies Inc TLMM block found on the Qualcomm 212 201 Technologies Inc SC7180 platform. 213 202 203 + config PINCTRL_SC7280 204 + tristate "Qualcomm Technologies Inc SC7280 pin controller driver" 205 + depends on GPIOLIB && OF 206 + depends on PINCTRL_MSM 207 + help 208 + This is the pinctrl, pinmux, pinconf and gpiolib driver for the 209 + Qualcomm Technologies Inc TLMM block found on the Qualcomm 210 + Technologies Inc SC7280 platform. 211 + 214 212 config PINCTRL_SDM660 215 213 tristate "Qualcomm Technologies Inc SDM660 pin controller driver" 216 214 depends on GPIOLIB && OF 217 - select PINCTRL_MSM 215 + depends on PINCTRL_MSM 218 216 help 219 217 This is the pinctrl, pinmux, pinconf and gpiolib driver for the 220 218 Qualcomm Technologies Inc TLMM block found on the Qualcomm ··· 232 212 config PINCTRL_SDM845 233 213 tristate "Qualcomm Technologies Inc SDM845 pin controller driver" 234 214 depends on GPIOLIB && (OF || ACPI) 235 - select PINCTRL_MSM 215 + depends on PINCTRL_MSM 236 216 help 237 217 This is the pinctrl, pinmux, pinconf and gpiolib driver for the 238 218 Qualcomm Technologies Inc TLMM block found on the Qualcomm 239 219 Technologies Inc SDM845 platform. 240 220 221 + config PINCTRL_SDX55 222 + tristate "Qualcomm Technologies Inc SDX55 pin controller driver" 223 + depends on GPIOLIB && OF 224 + depends on PINCTRL_MSM 225 + help 226 + This is the pinctrl, pinmux, pinconf and gpiolib driver for the 227 + Qualcomm Technologies Inc TLMM block found on the Qualcomm 228 + Technologies Inc SDX55 platform. 229 + 241 230 config PINCTRL_SM8150 242 231 tristate "Qualcomm Technologies Inc SM8150 pin controller driver" 243 232 depends on GPIOLIB && OF 244 - select PINCTRL_MSM 233 + depends on PINCTRL_MSM 245 234 help 246 235 This is the pinctrl, pinmux, pinconf and gpiolib driver for the 247 236 Qualcomm Technologies Inc TLMM block found on the Qualcomm ··· 259 230 config PINCTRL_SM8250 260 231 tristate "Qualcomm Technologies Inc SM8250 pin controller driver" 261 232 depends on GPIOLIB && OF 262 - select PINCTRL_MSM 233 + depends on PINCTRL_MSM 263 234 help 264 235 This is the pinctrl, pinmux, pinconf and gpiolib driver for the 265 236 Qualcomm Technologies Inc TLMM block found on the Qualcomm 266 237 Technologies Inc SM8250 platform. 238 + 239 + config PINCTRL_LPASS_LPI 240 + tristate "Qualcomm Technologies Inc LPASS LPI pin controller driver" 241 + select PINMUX 242 + select PINCONF 243 + select GENERIC_PINCONF 244 + depends on GPIOLIB 245 + help 246 + This is the pinctrl, pinmux, pinconf and gpiolib driver for the 247 + Qualcomm Technologies Inc LPASS (Low Power Audio SubSystem) LPI 248 + (Low Power Island) found on the Qualcomm Technologies Inc SoCs. 267 249 268 250 endif
+4
drivers/pinctrl/qcom/Makefile
··· 12 12 obj-$(CONFIG_PINCTRL_MSM8960) += pinctrl-msm8960.o 13 13 obj-$(CONFIG_PINCTRL_MSM8X74) += pinctrl-msm8x74.o 14 14 obj-$(CONFIG_PINCTRL_MSM8916) += pinctrl-msm8916.o 15 + obj-$(CONFIG_PINCTRL_MSM8953) += pinctrl-msm8953.o 15 16 obj-$(CONFIG_PINCTRL_MSM8976) += pinctrl-msm8976.o 16 17 obj-$(CONFIG_PINCTRL_MSM8994) += pinctrl-msm8994.o 17 18 obj-$(CONFIG_PINCTRL_MSM8996) += pinctrl-msm8996.o ··· 25 24 obj-$(CONFIG_PINCTRL_QCOM_SSBI_PMIC) += pinctrl-ssbi-gpio.o 26 25 obj-$(CONFIG_PINCTRL_QCOM_SSBI_PMIC) += pinctrl-ssbi-mpp.o 27 26 obj-$(CONFIG_PINCTRL_SC7180) += pinctrl-sc7180.o 27 + obj-$(CONFIG_PINCTRL_SC7280) += pinctrl-sc7280.o 28 28 obj-$(CONFIG_PINCTRL_SDM660) += pinctrl-sdm660.o 29 29 obj-$(CONFIG_PINCTRL_SDM845) += pinctrl-sdm845.o 30 + obj-$(CONFIG_PINCTRL_SDX55) += pinctrl-sdx55.o 30 31 obj-$(CONFIG_PINCTRL_SM8150) += pinctrl-sm8150.o 31 32 obj-$(CONFIG_PINCTRL_SM8250) += pinctrl-sm8250.o 33 + obj-$(CONFIG_PINCTRL_LPASS_LPI) += pinctrl-lpass-lpi.o
+695
drivers/pinctrl/qcom/pinctrl-lpass-lpi.c
··· 1 + // SPDX-License-Identifier: GPL-2.0-only 2 + /* 3 + * Copyright (c) 2016-2019, The Linux Foundation. All rights reserved. 4 + * Copyright (c) 2020 Linaro Ltd. 5 + */ 6 + 7 + #include <linux/bitops.h> 8 + #include <linux/bitfield.h> 9 + #include <linux/clk.h> 10 + #include <linux/gpio/driver.h> 11 + #include <linux/io.h> 12 + #include <linux/module.h> 13 + #include <linux/of_device.h> 14 + #include <linux/of.h> 15 + #include <linux/pinctrl/pinconf-generic.h> 16 + #include <linux/pinctrl/pinconf.h> 17 + #include <linux/pinctrl/pinmux.h> 18 + #include <linux/platform_device.h> 19 + #include <linux/slab.h> 20 + #include <linux/types.h> 21 + #include "../core.h" 22 + #include "../pinctrl-utils.h" 23 + 24 + #define LPI_SLEW_RATE_CTL_REG 0xa000 25 + #define LPI_TLMM_REG_OFFSET 0x1000 26 + #define LPI_SLEW_RATE_MAX 0x03 27 + #define LPI_SLEW_BITS_SIZE 0x02 28 + #define LPI_SLEW_RATE_MASK GENMASK(1, 0) 29 + #define LPI_GPIO_CFG_REG 0x00 30 + #define LPI_GPIO_PULL_MASK GENMASK(1, 0) 31 + #define LPI_GPIO_FUNCTION_MASK GENMASK(5, 2) 32 + #define LPI_GPIO_OUT_STRENGTH_MASK GENMASK(8, 6) 33 + #define LPI_GPIO_OE_MASK BIT(9) 34 + #define LPI_GPIO_VALUE_REG 0x04 35 + #define LPI_GPIO_VALUE_IN_MASK BIT(0) 36 + #define LPI_GPIO_VALUE_OUT_MASK BIT(1) 37 + 38 + #define LPI_GPIO_BIAS_DISABLE 0x0 39 + #define LPI_GPIO_PULL_DOWN 0x1 40 + #define LPI_GPIO_KEEPER 0x2 41 + #define LPI_GPIO_PULL_UP 0x3 42 + #define LPI_GPIO_DS_TO_VAL(v) (v / 2 - 1) 43 + #define NO_SLEW -1 44 + 45 + #define LPI_FUNCTION(fname) \ 46 + [LPI_MUX_##fname] = { \ 47 + .name = #fname, \ 48 + .groups = fname##_groups, \ 49 + .ngroups = ARRAY_SIZE(fname##_groups), \ 50 + } 51 + 52 + #define LPI_PINGROUP(id, soff, f1, f2, f3, f4) \ 53 + { \ 54 + .name = "gpio" #id, \ 55 + .pins = gpio##id##_pins, \ 56 + .pin = id, \ 57 + .slew_offset = soff, \ 58 + .npins = ARRAY_SIZE(gpio##id##_pins), \ 59 + .funcs = (int[]){ \ 60 + LPI_MUX_gpio, \ 61 + LPI_MUX_##f1, \ 62 + LPI_MUX_##f2, \ 63 + LPI_MUX_##f3, \ 64 + LPI_MUX_##f4, \ 65 + }, \ 66 + .nfuncs = 5, \ 67 + } 68 + 69 + struct lpi_pingroup { 70 + const char *name; 71 + const unsigned int *pins; 72 + unsigned int npins; 73 + unsigned int pin; 74 + /* Bit offset in slew register for SoundWire pins only */ 75 + int slew_offset; 76 + unsigned int *funcs; 77 + unsigned int nfuncs; 78 + }; 79 + 80 + struct lpi_function { 81 + const char *name; 82 + const char * const *groups; 83 + unsigned int ngroups; 84 + }; 85 + 86 + struct lpi_pinctrl_variant_data { 87 + const struct pinctrl_pin_desc *pins; 88 + int npins; 89 + const struct lpi_pingroup *groups; 90 + int ngroups; 91 + const struct lpi_function *functions; 92 + int nfunctions; 93 + }; 94 + 95 + #define MAX_LPI_NUM_CLKS 2 96 + 97 + struct lpi_pinctrl { 98 + struct device *dev; 99 + struct pinctrl_dev *ctrl; 100 + struct gpio_chip chip; 101 + struct pinctrl_desc desc; 102 + char __iomem *tlmm_base; 103 + char __iomem *slew_base; 104 + struct clk_bulk_data clks[MAX_LPI_NUM_CLKS]; 105 + struct mutex slew_access_lock; 106 + const struct lpi_pinctrl_variant_data *data; 107 + }; 108 + 109 + /* sm8250 variant specific data */ 110 + static const struct pinctrl_pin_desc sm8250_lpi_pins[] = { 111 + PINCTRL_PIN(0, "gpio0"), 112 + PINCTRL_PIN(1, "gpio1"), 113 + PINCTRL_PIN(2, "gpio2"), 114 + PINCTRL_PIN(3, "gpio3"), 115 + PINCTRL_PIN(4, "gpio4"), 116 + PINCTRL_PIN(5, "gpio5"), 117 + PINCTRL_PIN(6, "gpio6"), 118 + PINCTRL_PIN(7, "gpio7"), 119 + PINCTRL_PIN(8, "gpio8"), 120 + PINCTRL_PIN(9, "gpio9"), 121 + PINCTRL_PIN(10, "gpio10"), 122 + PINCTRL_PIN(11, "gpio11"), 123 + PINCTRL_PIN(12, "gpio12"), 124 + PINCTRL_PIN(13, "gpio13"), 125 + }; 126 + 127 + enum sm8250_lpi_functions { 128 + LPI_MUX_dmic1_clk, 129 + LPI_MUX_dmic1_data, 130 + LPI_MUX_dmic2_clk, 131 + LPI_MUX_dmic2_data, 132 + LPI_MUX_dmic3_clk, 133 + LPI_MUX_dmic3_data, 134 + LPI_MUX_i2s1_clk, 135 + LPI_MUX_i2s1_data, 136 + LPI_MUX_i2s1_ws, 137 + LPI_MUX_i2s2_clk, 138 + LPI_MUX_i2s2_data, 139 + LPI_MUX_i2s2_ws, 140 + LPI_MUX_qua_mi2s_data, 141 + LPI_MUX_qua_mi2s_sclk, 142 + LPI_MUX_qua_mi2s_ws, 143 + LPI_MUX_swr_rx_clk, 144 + LPI_MUX_swr_rx_data, 145 + LPI_MUX_swr_tx_clk, 146 + LPI_MUX_swr_tx_data, 147 + LPI_MUX_wsa_swr_clk, 148 + LPI_MUX_wsa_swr_data, 149 + LPI_MUX_gpio, 150 + LPI_MUX__, 151 + }; 152 + 153 + static const unsigned int gpio0_pins[] = { 0 }; 154 + static const unsigned int gpio1_pins[] = { 1 }; 155 + static const unsigned int gpio2_pins[] = { 2 }; 156 + static const unsigned int gpio3_pins[] = { 3 }; 157 + static const unsigned int gpio4_pins[] = { 4 }; 158 + static const unsigned int gpio5_pins[] = { 5 }; 159 + static const unsigned int gpio6_pins[] = { 6 }; 160 + static const unsigned int gpio7_pins[] = { 7 }; 161 + static const unsigned int gpio8_pins[] = { 8 }; 162 + static const unsigned int gpio9_pins[] = { 9 }; 163 + static const unsigned int gpio10_pins[] = { 10 }; 164 + static const unsigned int gpio11_pins[] = { 11 }; 165 + static const unsigned int gpio12_pins[] = { 12 }; 166 + static const unsigned int gpio13_pins[] = { 13 }; 167 + static const char * const swr_tx_clk_groups[] = { "gpio0" }; 168 + static const char * const swr_tx_data_groups[] = { "gpio1", "gpio2", "gpio5" }; 169 + static const char * const swr_rx_clk_groups[] = { "gpio3" }; 170 + static const char * const swr_rx_data_groups[] = { "gpio4", "gpio5" }; 171 + static const char * const dmic1_clk_groups[] = { "gpio6" }; 172 + static const char * const dmic1_data_groups[] = { "gpio7" }; 173 + static const char * const dmic2_clk_groups[] = { "gpio8" }; 174 + static const char * const dmic2_data_groups[] = { "gpio9" }; 175 + static const char * const i2s2_clk_groups[] = { "gpio10" }; 176 + static const char * const i2s2_ws_groups[] = { "gpio11" }; 177 + static const char * const dmic3_clk_groups[] = { "gpio12" }; 178 + static const char * const dmic3_data_groups[] = { "gpio13" }; 179 + static const char * const qua_mi2s_sclk_groups[] = { "gpio0" }; 180 + static const char * const qua_mi2s_ws_groups[] = { "gpio1" }; 181 + static const char * const qua_mi2s_data_groups[] = { "gpio2", "gpio3", "gpio4" }; 182 + static const char * const i2s1_clk_groups[] = { "gpio6" }; 183 + static const char * const i2s1_ws_groups[] = { "gpio7" }; 184 + static const char * const i2s1_data_groups[] = { "gpio8", "gpio9" }; 185 + static const char * const wsa_swr_clk_groups[] = { "gpio10" }; 186 + static const char * const wsa_swr_data_groups[] = { "gpio11" }; 187 + static const char * const i2s2_data_groups[] = { "gpio12", "gpio12" }; 188 + 189 + static const struct lpi_pingroup sm8250_groups[] = { 190 + LPI_PINGROUP(0, 0, swr_tx_clk, qua_mi2s_sclk, _, _), 191 + LPI_PINGROUP(1, 2, swr_tx_data, qua_mi2s_ws, _, _), 192 + LPI_PINGROUP(2, 4, swr_tx_data, qua_mi2s_data, _, _), 193 + LPI_PINGROUP(3, 8, swr_rx_clk, qua_mi2s_data, _, _), 194 + LPI_PINGROUP(4, 10, swr_rx_data, qua_mi2s_data, _, _), 195 + LPI_PINGROUP(5, 12, swr_tx_data, swr_rx_data, _, _), 196 + LPI_PINGROUP(6, NO_SLEW, dmic1_clk, i2s1_clk, _, _), 197 + LPI_PINGROUP(7, NO_SLEW, dmic1_data, i2s1_ws, _, _), 198 + LPI_PINGROUP(8, NO_SLEW, dmic2_clk, i2s1_data, _, _), 199 + LPI_PINGROUP(9, NO_SLEW, dmic2_data, i2s1_data, _, _), 200 + LPI_PINGROUP(10, 16, i2s2_clk, wsa_swr_clk, _, _), 201 + LPI_PINGROUP(11, 18, i2s2_ws, wsa_swr_data, _, _), 202 + LPI_PINGROUP(12, NO_SLEW, dmic3_clk, i2s2_data, _, _), 203 + LPI_PINGROUP(13, NO_SLEW, dmic3_data, i2s2_data, _, _), 204 + }; 205 + 206 + static const struct lpi_function sm8250_functions[] = { 207 + LPI_FUNCTION(dmic1_clk), 208 + LPI_FUNCTION(dmic1_data), 209 + LPI_FUNCTION(dmic2_clk), 210 + LPI_FUNCTION(dmic2_data), 211 + LPI_FUNCTION(dmic3_clk), 212 + LPI_FUNCTION(dmic3_data), 213 + LPI_FUNCTION(i2s1_clk), 214 + LPI_FUNCTION(i2s1_data), 215 + LPI_FUNCTION(i2s1_ws), 216 + LPI_FUNCTION(i2s2_clk), 217 + LPI_FUNCTION(i2s2_data), 218 + LPI_FUNCTION(i2s2_ws), 219 + LPI_FUNCTION(qua_mi2s_data), 220 + LPI_FUNCTION(qua_mi2s_sclk), 221 + LPI_FUNCTION(qua_mi2s_ws), 222 + LPI_FUNCTION(swr_rx_clk), 223 + LPI_FUNCTION(swr_rx_data), 224 + LPI_FUNCTION(swr_tx_clk), 225 + LPI_FUNCTION(swr_tx_data), 226 + LPI_FUNCTION(wsa_swr_clk), 227 + LPI_FUNCTION(wsa_swr_data), 228 + }; 229 + 230 + static struct lpi_pinctrl_variant_data sm8250_lpi_data = { 231 + .pins = sm8250_lpi_pins, 232 + .npins = ARRAY_SIZE(sm8250_lpi_pins), 233 + .groups = sm8250_groups, 234 + .ngroups = ARRAY_SIZE(sm8250_groups), 235 + .functions = sm8250_functions, 236 + .nfunctions = ARRAY_SIZE(sm8250_functions), 237 + }; 238 + 239 + static int lpi_gpio_read(struct lpi_pinctrl *state, unsigned int pin, 240 + unsigned int addr) 241 + { 242 + return ioread32(state->tlmm_base + LPI_TLMM_REG_OFFSET * pin + addr); 243 + } 244 + 245 + static int lpi_gpio_write(struct lpi_pinctrl *state, unsigned int pin, 246 + unsigned int addr, unsigned int val) 247 + { 248 + iowrite32(val, state->tlmm_base + LPI_TLMM_REG_OFFSET * pin + addr); 249 + 250 + return 0; 251 + } 252 + 253 + static int lpi_gpio_get_groups_count(struct pinctrl_dev *pctldev) 254 + { 255 + struct lpi_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); 256 + 257 + return pctrl->data->ngroups; 258 + } 259 + 260 + static const char *lpi_gpio_get_group_name(struct pinctrl_dev *pctldev, 261 + unsigned int group) 262 + { 263 + struct lpi_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); 264 + 265 + return pctrl->data->groups[group].name; 266 + } 267 + 268 + static int lpi_gpio_get_group_pins(struct pinctrl_dev *pctldev, 269 + unsigned int group, 270 + const unsigned int **pins, 271 + unsigned int *num_pins) 272 + { 273 + struct lpi_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); 274 + 275 + *pins = pctrl->data->groups[group].pins; 276 + *num_pins = pctrl->data->groups[group].npins; 277 + 278 + return 0; 279 + } 280 + 281 + static const struct pinctrl_ops lpi_gpio_pinctrl_ops = { 282 + .get_groups_count = lpi_gpio_get_groups_count, 283 + .get_group_name = lpi_gpio_get_group_name, 284 + .get_group_pins = lpi_gpio_get_group_pins, 285 + .dt_node_to_map = pinconf_generic_dt_node_to_map_group, 286 + .dt_free_map = pinctrl_utils_free_map, 287 + }; 288 + 289 + static int lpi_gpio_get_functions_count(struct pinctrl_dev *pctldev) 290 + { 291 + struct lpi_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); 292 + 293 + return pctrl->data->nfunctions; 294 + } 295 + 296 + static const char *lpi_gpio_get_function_name(struct pinctrl_dev *pctldev, 297 + unsigned int function) 298 + { 299 + struct lpi_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); 300 + 301 + return pctrl->data->functions[function].name; 302 + } 303 + 304 + static int lpi_gpio_get_function_groups(struct pinctrl_dev *pctldev, 305 + unsigned int function, 306 + const char *const **groups, 307 + unsigned *const num_qgroups) 308 + { 309 + struct lpi_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); 310 + 311 + *groups = pctrl->data->functions[function].groups; 312 + *num_qgroups = pctrl->data->functions[function].ngroups; 313 + 314 + return 0; 315 + } 316 + 317 + static int lpi_gpio_set_mux(struct pinctrl_dev *pctldev, unsigned int function, 318 + unsigned int group_num) 319 + { 320 + struct lpi_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); 321 + const struct lpi_pingroup *g = &pctrl->data->groups[group_num]; 322 + u32 val; 323 + int i, pin = g->pin; 324 + 325 + for (i = 0; i < g->nfuncs; i++) { 326 + if (g->funcs[i] == function) 327 + break; 328 + } 329 + 330 + if (WARN_ON(i == g->nfuncs)) 331 + return -EINVAL; 332 + 333 + val = lpi_gpio_read(pctrl, pin, LPI_GPIO_CFG_REG); 334 + u32p_replace_bits(&val, i, LPI_GPIO_FUNCTION_MASK); 335 + lpi_gpio_write(pctrl, pin, LPI_GPIO_CFG_REG, val); 336 + 337 + return 0; 338 + } 339 + 340 + static const struct pinmux_ops lpi_gpio_pinmux_ops = { 341 + .get_functions_count = lpi_gpio_get_functions_count, 342 + .get_function_name = lpi_gpio_get_function_name, 343 + .get_function_groups = lpi_gpio_get_function_groups, 344 + .set_mux = lpi_gpio_set_mux, 345 + }; 346 + 347 + static int lpi_config_get(struct pinctrl_dev *pctldev, 348 + unsigned int pin, unsigned long *config) 349 + { 350 + unsigned int param = pinconf_to_config_param(*config); 351 + struct lpi_pinctrl *state = dev_get_drvdata(pctldev->dev); 352 + unsigned int arg = 0; 353 + int is_out; 354 + int pull; 355 + u32 ctl_reg; 356 + 357 + ctl_reg = lpi_gpio_read(state, pin, LPI_GPIO_CFG_REG); 358 + is_out = ctl_reg & LPI_GPIO_OE_MASK; 359 + pull = FIELD_GET(LPI_GPIO_PULL_MASK, ctl_reg); 360 + 361 + switch (param) { 362 + case PIN_CONFIG_BIAS_DISABLE: 363 + if (pull == LPI_GPIO_BIAS_DISABLE) 364 + arg = 1; 365 + break; 366 + case PIN_CONFIG_BIAS_PULL_DOWN: 367 + if (pull == LPI_GPIO_PULL_DOWN) 368 + arg = 1; 369 + break; 370 + case PIN_CONFIG_BIAS_BUS_HOLD: 371 + if (pull == LPI_GPIO_KEEPER) 372 + arg = 1; 373 + break; 374 + case PIN_CONFIG_BIAS_PULL_UP: 375 + if (pull == LPI_GPIO_PULL_UP) 376 + arg = 1; 377 + break; 378 + case PIN_CONFIG_INPUT_ENABLE: 379 + case PIN_CONFIG_OUTPUT: 380 + if (is_out) 381 + arg = 1; 382 + break; 383 + default: 384 + return -EINVAL; 385 + } 386 + 387 + *config = pinconf_to_config_packed(param, arg); 388 + return 0; 389 + } 390 + 391 + static int lpi_config_set(struct pinctrl_dev *pctldev, unsigned int group, 392 + unsigned long *configs, unsigned int nconfs) 393 + { 394 + struct lpi_pinctrl *pctrl = dev_get_drvdata(pctldev->dev); 395 + unsigned int param, arg, pullup, strength; 396 + bool value, output_enabled = false; 397 + const struct lpi_pingroup *g; 398 + unsigned long sval; 399 + int i, slew_offset; 400 + u32 val; 401 + 402 + g = &pctrl->data->groups[group]; 403 + for (i = 0; i < nconfs; i++) { 404 + param = pinconf_to_config_param(configs[i]); 405 + arg = pinconf_to_config_argument(configs[i]); 406 + 407 + switch (param) { 408 + case PIN_CONFIG_BIAS_DISABLE: 409 + pullup = LPI_GPIO_BIAS_DISABLE; 410 + break; 411 + case PIN_CONFIG_BIAS_PULL_DOWN: 412 + pullup = LPI_GPIO_PULL_DOWN; 413 + break; 414 + case PIN_CONFIG_BIAS_BUS_HOLD: 415 + pullup = LPI_GPIO_KEEPER; 416 + break; 417 + case PIN_CONFIG_BIAS_PULL_UP: 418 + pullup = LPI_GPIO_PULL_UP; 419 + break; 420 + case PIN_CONFIG_INPUT_ENABLE: 421 + output_enabled = false; 422 + break; 423 + case PIN_CONFIG_OUTPUT: 424 + output_enabled = true; 425 + value = arg; 426 + break; 427 + case PIN_CONFIG_DRIVE_STRENGTH: 428 + strength = arg; 429 + break; 430 + case PIN_CONFIG_SLEW_RATE: 431 + if (arg > LPI_SLEW_RATE_MAX) { 432 + dev_err(pctldev->dev, "invalid slew rate %u for pin: %d\n", 433 + arg, group); 434 + return -EINVAL; 435 + } 436 + 437 + slew_offset = g->slew_offset; 438 + if (slew_offset == NO_SLEW) 439 + break; 440 + 441 + mutex_lock(&pctrl->slew_access_lock); 442 + 443 + sval = ioread32(pctrl->slew_base + LPI_SLEW_RATE_CTL_REG); 444 + sval &= ~(LPI_SLEW_RATE_MASK << slew_offset); 445 + sval |= arg << slew_offset; 446 + iowrite32(sval, pctrl->slew_base + LPI_SLEW_RATE_CTL_REG); 447 + 448 + mutex_unlock(&pctrl->slew_access_lock); 449 + break; 450 + default: 451 + return -EINVAL; 452 + } 453 + } 454 + 455 + val = lpi_gpio_read(pctrl, group, LPI_GPIO_CFG_REG); 456 + 457 + u32p_replace_bits(&val, pullup, LPI_GPIO_PULL_MASK); 458 + u32p_replace_bits(&val, LPI_GPIO_DS_TO_VAL(strength), 459 + LPI_GPIO_OUT_STRENGTH_MASK); 460 + u32p_replace_bits(&val, output_enabled, LPI_GPIO_OE_MASK); 461 + 462 + lpi_gpio_write(pctrl, group, LPI_GPIO_CFG_REG, val); 463 + 464 + if (output_enabled) { 465 + val = u32_encode_bits(value ? 1 : 0, LPI_GPIO_VALUE_OUT_MASK); 466 + lpi_gpio_write(pctrl, group, LPI_GPIO_VALUE_REG, val); 467 + } 468 + 469 + return 0; 470 + } 471 + 472 + static const struct pinconf_ops lpi_gpio_pinconf_ops = { 473 + .is_generic = true, 474 + .pin_config_group_get = lpi_config_get, 475 + .pin_config_group_set = lpi_config_set, 476 + }; 477 + 478 + static int lpi_gpio_direction_input(struct gpio_chip *chip, unsigned int pin) 479 + { 480 + struct lpi_pinctrl *state = gpiochip_get_data(chip); 481 + unsigned long config; 482 + 483 + config = pinconf_to_config_packed(PIN_CONFIG_INPUT_ENABLE, 1); 484 + 485 + return lpi_config_set(state->ctrl, pin, &config, 1); 486 + } 487 + 488 + static int lpi_gpio_direction_output(struct gpio_chip *chip, 489 + unsigned int pin, int val) 490 + { 491 + struct lpi_pinctrl *state = gpiochip_get_data(chip); 492 + unsigned long config; 493 + 494 + config = pinconf_to_config_packed(PIN_CONFIG_OUTPUT, val); 495 + 496 + return lpi_config_set(state->ctrl, pin, &config, 1); 497 + } 498 + 499 + static int lpi_gpio_get(struct gpio_chip *chip, unsigned int pin) 500 + { 501 + struct lpi_pinctrl *state = gpiochip_get_data(chip); 502 + 503 + return lpi_gpio_read(state, pin, LPI_GPIO_VALUE_REG) & 504 + LPI_GPIO_VALUE_IN_MASK; 505 + } 506 + 507 + static void lpi_gpio_set(struct gpio_chip *chip, unsigned int pin, int value) 508 + { 509 + struct lpi_pinctrl *state = gpiochip_get_data(chip); 510 + unsigned long config; 511 + 512 + config = pinconf_to_config_packed(PIN_CONFIG_OUTPUT, value); 513 + 514 + lpi_config_set(state->ctrl, pin, &config, 1); 515 + } 516 + 517 + #ifdef CONFIG_DEBUG_FS 518 + #include <linux/seq_file.h> 519 + 520 + static unsigned int lpi_regval_to_drive(u32 val) 521 + { 522 + return (val + 1) * 2; 523 + } 524 + 525 + static void lpi_gpio_dbg_show_one(struct seq_file *s, 526 + struct pinctrl_dev *pctldev, 527 + struct gpio_chip *chip, 528 + unsigned int offset, 529 + unsigned int gpio) 530 + { 531 + struct lpi_pinctrl *state = gpiochip_get_data(chip); 532 + struct pinctrl_pin_desc pindesc; 533 + unsigned int func; 534 + int is_out; 535 + int drive; 536 + int pull; 537 + u32 ctl_reg; 538 + 539 + static const char * const pulls[] = { 540 + "no pull", 541 + "pull down", 542 + "keeper", 543 + "pull up" 544 + }; 545 + 546 + pctldev = pctldev ? : state->ctrl; 547 + pindesc = pctldev->desc->pins[offset]; 548 + ctl_reg = lpi_gpio_read(state, offset, LPI_GPIO_CFG_REG); 549 + is_out = ctl_reg & LPI_GPIO_OE_MASK; 550 + 551 + func = FIELD_GET(LPI_GPIO_FUNCTION_MASK, ctl_reg); 552 + drive = FIELD_GET(LPI_GPIO_OUT_STRENGTH_MASK, ctl_reg); 553 + pull = FIELD_GET(LPI_GPIO_PULL_MASK, ctl_reg); 554 + 555 + seq_printf(s, " %-8s: %-3s %d", pindesc.name, is_out ? "out" : "in", func); 556 + seq_printf(s, " %dmA", lpi_regval_to_drive(drive)); 557 + seq_printf(s, " %s", pulls[pull]); 558 + } 559 + 560 + static void lpi_gpio_dbg_show(struct seq_file *s, struct gpio_chip *chip) 561 + { 562 + unsigned int gpio = chip->base; 563 + unsigned int i; 564 + 565 + for (i = 0; i < chip->ngpio; i++, gpio++) { 566 + lpi_gpio_dbg_show_one(s, NULL, chip, i, gpio); 567 + seq_puts(s, "\n"); 568 + } 569 + } 570 + 571 + #else 572 + #define lpi_gpio_dbg_show NULL 573 + #endif 574 + 575 + static const struct gpio_chip lpi_gpio_template = { 576 + .direction_input = lpi_gpio_direction_input, 577 + .direction_output = lpi_gpio_direction_output, 578 + .get = lpi_gpio_get, 579 + .set = lpi_gpio_set, 580 + .request = gpiochip_generic_request, 581 + .free = gpiochip_generic_free, 582 + .dbg_show = lpi_gpio_dbg_show, 583 + }; 584 + 585 + static int lpi_pinctrl_probe(struct platform_device *pdev) 586 + { 587 + const struct lpi_pinctrl_variant_data *data; 588 + struct device *dev = &pdev->dev; 589 + struct lpi_pinctrl *pctrl; 590 + int ret; 591 + 592 + pctrl = devm_kzalloc(dev, sizeof(*pctrl), GFP_KERNEL); 593 + if (!pctrl) 594 + return -ENOMEM; 595 + 596 + platform_set_drvdata(pdev, pctrl); 597 + 598 + data = of_device_get_match_data(dev); 599 + if (!data) 600 + return -EINVAL; 601 + 602 + pctrl->data = data; 603 + pctrl->dev = &pdev->dev; 604 + 605 + pctrl->clks[0].id = "core"; 606 + pctrl->clks[1].id = "audio"; 607 + 608 + pctrl->tlmm_base = devm_platform_ioremap_resource(pdev, 0); 609 + if (IS_ERR(pctrl->tlmm_base)) 610 + return dev_err_probe(dev, PTR_ERR(pctrl->tlmm_base), 611 + "TLMM resource not provided\n"); 612 + 613 + pctrl->slew_base = devm_platform_ioremap_resource(pdev, 1); 614 + if (IS_ERR(pctrl->slew_base)) 615 + return dev_err_probe(dev, PTR_ERR(pctrl->slew_base), 616 + "Slew resource not provided\n"); 617 + 618 + ret = devm_clk_bulk_get(dev, MAX_LPI_NUM_CLKS, pctrl->clks); 619 + if (ret) 620 + return dev_err_probe(dev, ret, "Can't get clocks\n"); 621 + 622 + ret = clk_bulk_prepare_enable(MAX_LPI_NUM_CLKS, pctrl->clks); 623 + if (ret) 624 + return dev_err_probe(dev, ret, "Can't enable clocks\n"); 625 + 626 + pctrl->desc.pctlops = &lpi_gpio_pinctrl_ops; 627 + pctrl->desc.pmxops = &lpi_gpio_pinmux_ops; 628 + pctrl->desc.confops = &lpi_gpio_pinconf_ops; 629 + pctrl->desc.owner = THIS_MODULE; 630 + pctrl->desc.name = dev_name(dev); 631 + pctrl->desc.pins = data->pins; 632 + pctrl->desc.npins = data->npins; 633 + pctrl->chip = lpi_gpio_template; 634 + pctrl->chip.parent = dev; 635 + pctrl->chip.base = -1; 636 + pctrl->chip.ngpio = data->npins; 637 + pctrl->chip.label = dev_name(dev); 638 + pctrl->chip.of_gpio_n_cells = 2; 639 + pctrl->chip.can_sleep = false; 640 + 641 + mutex_init(&pctrl->slew_access_lock); 642 + 643 + pctrl->ctrl = devm_pinctrl_register(dev, &pctrl->desc, pctrl); 644 + if (IS_ERR(pctrl->ctrl)) { 645 + ret = PTR_ERR(pctrl->ctrl); 646 + dev_err(dev, "failed to add pin controller\n"); 647 + goto err_pinctrl; 648 + } 649 + 650 + ret = devm_gpiochip_add_data(dev, &pctrl->chip, pctrl); 651 + if (ret) { 652 + dev_err(pctrl->dev, "can't add gpio chip\n"); 653 + goto err_pinctrl; 654 + } 655 + 656 + return 0; 657 + 658 + err_pinctrl: 659 + mutex_destroy(&pctrl->slew_access_lock); 660 + clk_bulk_disable_unprepare(MAX_LPI_NUM_CLKS, pctrl->clks); 661 + 662 + return ret; 663 + } 664 + 665 + static int lpi_pinctrl_remove(struct platform_device *pdev) 666 + { 667 + struct lpi_pinctrl *pctrl = platform_get_drvdata(pdev); 668 + 669 + mutex_destroy(&pctrl->slew_access_lock); 670 + clk_bulk_disable_unprepare(MAX_LPI_NUM_CLKS, pctrl->clks); 671 + 672 + return 0; 673 + } 674 + 675 + static const struct of_device_id lpi_pinctrl_of_match[] = { 676 + { 677 + .compatible = "qcom,sm8250-lpass-lpi-pinctrl", 678 + .data = &sm8250_lpi_data, 679 + }, 680 + { } 681 + }; 682 + MODULE_DEVICE_TABLE(of, lpi_pinctrl_of_match); 683 + 684 + static struct platform_driver lpi_pinctrl_driver = { 685 + .driver = { 686 + .name = "qcom-lpass-lpi-pinctrl", 687 + .of_match_table = lpi_pinctrl_of_match, 688 + }, 689 + .probe = lpi_pinctrl_probe, 690 + .remove = lpi_pinctrl_remove, 691 + }; 692 + 693 + module_platform_driver(lpi_pinctrl_driver); 694 + MODULE_DESCRIPTION("QTI LPI GPIO pin control driver"); 695 + MODULE_LICENSE("GPL");
+2
drivers/pinctrl/qcom/pinctrl-msm.c
··· 1449 1449 } 1450 1450 EXPORT_SYMBOL(msm_pinctrl_remove); 1451 1451 1452 + MODULE_DESCRIPTION("Qualcomm Technologies, Inc. TLMM driver"); 1453 + MODULE_LICENSE("GPL v2");
+1844
drivers/pinctrl/qcom/pinctrl-msm8953.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 2 + // Copyright (c) 2020, The Linux Foundation. All rights reserved. 3 + 4 + #include <linux/module.h> 5 + #include <linux/of.h> 6 + #include <linux/platform_device.h> 7 + #include <linux/pinctrl/pinctrl.h> 8 + 9 + #include "pinctrl-msm.h" 10 + 11 + #define FUNCTION(fname) \ 12 + [msm_mux_##fname] = { \ 13 + .name = #fname, \ 14 + .groups = fname##_groups, \ 15 + .ngroups = ARRAY_SIZE(fname##_groups), \ 16 + } 17 + 18 + #define PINGROUP(id, f1, f2, f3, f4, f5, f6, f7, f8, f9) \ 19 + { \ 20 + .name = "gpio" #id, \ 21 + .pins = gpio##id##_pins, \ 22 + .npins = ARRAY_SIZE(gpio##id##_pins), \ 23 + .funcs = (int[]){ \ 24 + msm_mux_gpio, /* gpio mode */ \ 25 + msm_mux_##f1, \ 26 + msm_mux_##f2, \ 27 + msm_mux_##f3, \ 28 + msm_mux_##f4, \ 29 + msm_mux_##f5, \ 30 + msm_mux_##f6, \ 31 + msm_mux_##f7, \ 32 + msm_mux_##f8, \ 33 + msm_mux_##f9 \ 34 + }, \ 35 + .nfuncs = 10, \ 36 + .ctl_reg = 0x1000 * id, \ 37 + .io_reg = 0x4 + 0x1000 * id, \ 38 + .intr_cfg_reg = 0x8 + 0x1000 * id, \ 39 + .intr_status_reg = 0xc + 0x1000 * id, \ 40 + .intr_target_reg = 0x8 + 0x1000 * id, \ 41 + .mux_bit = 2, \ 42 + .pull_bit = 0, \ 43 + .drv_bit = 6, \ 44 + .oe_bit = 9, \ 45 + .in_bit = 0, \ 46 + .out_bit = 1, \ 47 + .intr_enable_bit = 0, \ 48 + .intr_status_bit = 0, \ 49 + .intr_target_bit = 5, \ 50 + .intr_target_kpss_val = 4, \ 51 + .intr_raw_status_bit = 4, \ 52 + .intr_polarity_bit = 1, \ 53 + .intr_detection_bit = 2, \ 54 + .intr_detection_width = 2, \ 55 + } 56 + 57 + #define SDC_QDSD_PINGROUP(pg_name, ctl, pull, drv) \ 58 + { \ 59 + .name = #pg_name, \ 60 + .pins = pg_name##_pins, \ 61 + .npins = ARRAY_SIZE(pg_name##_pins), \ 62 + .ctl_reg = ctl, \ 63 + .io_reg = 0, \ 64 + .intr_cfg_reg = 0, \ 65 + .intr_status_reg = 0, \ 66 + .intr_target_reg = 0, \ 67 + .mux_bit = -1, \ 68 + .pull_bit = pull, \ 69 + .drv_bit = drv, \ 70 + .oe_bit = -1, \ 71 + .in_bit = -1, \ 72 + .out_bit = -1, \ 73 + .intr_enable_bit = -1, \ 74 + .intr_status_bit = -1, \ 75 + .intr_target_bit = -1, \ 76 + .intr_raw_status_bit = -1, \ 77 + .intr_polarity_bit = -1, \ 78 + .intr_detection_bit = -1, \ 79 + .intr_detection_width = -1, \ 80 + } 81 + 82 + static const struct pinctrl_pin_desc msm8953_pins[] = { 83 + PINCTRL_PIN(0, "GPIO_0"), 84 + PINCTRL_PIN(1, "GPIO_1"), 85 + PINCTRL_PIN(2, "GPIO_2"), 86 + PINCTRL_PIN(3, "GPIO_3"), 87 + PINCTRL_PIN(4, "GPIO_4"), 88 + PINCTRL_PIN(5, "GPIO_5"), 89 + PINCTRL_PIN(6, "GPIO_6"), 90 + PINCTRL_PIN(7, "GPIO_7"), 91 + PINCTRL_PIN(8, "GPIO_8"), 92 + PINCTRL_PIN(9, "GPIO_9"), 93 + PINCTRL_PIN(10, "GPIO_10"), 94 + PINCTRL_PIN(11, "GPIO_11"), 95 + PINCTRL_PIN(12, "GPIO_12"), 96 + PINCTRL_PIN(13, "GPIO_13"), 97 + PINCTRL_PIN(14, "GPIO_14"), 98 + PINCTRL_PIN(15, "GPIO_15"), 99 + PINCTRL_PIN(16, "GPIO_16"), 100 + PINCTRL_PIN(17, "GPIO_17"), 101 + PINCTRL_PIN(18, "GPIO_18"), 102 + PINCTRL_PIN(19, "GPIO_19"), 103 + PINCTRL_PIN(20, "GPIO_20"), 104 + PINCTRL_PIN(21, "GPIO_21"), 105 + PINCTRL_PIN(22, "GPIO_22"), 106 + PINCTRL_PIN(23, "GPIO_23"), 107 + PINCTRL_PIN(24, "GPIO_24"), 108 + PINCTRL_PIN(25, "GPIO_25"), 109 + PINCTRL_PIN(26, "GPIO_26"), 110 + PINCTRL_PIN(27, "GPIO_27"), 111 + PINCTRL_PIN(28, "GPIO_28"), 112 + PINCTRL_PIN(29, "GPIO_29"), 113 + PINCTRL_PIN(30, "GPIO_30"), 114 + PINCTRL_PIN(31, "GPIO_31"), 115 + PINCTRL_PIN(32, "GPIO_32"), 116 + PINCTRL_PIN(33, "GPIO_33"), 117 + PINCTRL_PIN(34, "GPIO_34"), 118 + PINCTRL_PIN(35, "GPIO_35"), 119 + PINCTRL_PIN(36, "GPIO_36"), 120 + PINCTRL_PIN(37, "GPIO_37"), 121 + PINCTRL_PIN(38, "GPIO_38"), 122 + PINCTRL_PIN(39, "GPIO_39"), 123 + PINCTRL_PIN(40, "GPIO_40"), 124 + PINCTRL_PIN(41, "GPIO_41"), 125 + PINCTRL_PIN(42, "GPIO_42"), 126 + PINCTRL_PIN(43, "GPIO_43"), 127 + PINCTRL_PIN(44, "GPIO_44"), 128 + PINCTRL_PIN(45, "GPIO_45"), 129 + PINCTRL_PIN(46, "GPIO_46"), 130 + PINCTRL_PIN(47, "GPIO_47"), 131 + PINCTRL_PIN(48, "GPIO_48"), 132 + PINCTRL_PIN(49, "GPIO_49"), 133 + PINCTRL_PIN(50, "GPIO_50"), 134 + PINCTRL_PIN(51, "GPIO_51"), 135 + PINCTRL_PIN(52, "GPIO_52"), 136 + PINCTRL_PIN(53, "GPIO_53"), 137 + PINCTRL_PIN(54, "GPIO_54"), 138 + PINCTRL_PIN(55, "GPIO_55"), 139 + PINCTRL_PIN(56, "GPIO_56"), 140 + PINCTRL_PIN(57, "GPIO_57"), 141 + PINCTRL_PIN(58, "GPIO_58"), 142 + PINCTRL_PIN(59, "GPIO_59"), 143 + PINCTRL_PIN(60, "GPIO_60"), 144 + PINCTRL_PIN(61, "GPIO_61"), 145 + PINCTRL_PIN(62, "GPIO_62"), 146 + PINCTRL_PIN(63, "GPIO_63"), 147 + PINCTRL_PIN(64, "GPIO_64"), 148 + PINCTRL_PIN(65, "GPIO_65"), 149 + PINCTRL_PIN(66, "GPIO_66"), 150 + PINCTRL_PIN(67, "GPIO_67"), 151 + PINCTRL_PIN(68, "GPIO_68"), 152 + PINCTRL_PIN(69, "GPIO_69"), 153 + PINCTRL_PIN(70, "GPIO_70"), 154 + PINCTRL_PIN(71, "GPIO_71"), 155 + PINCTRL_PIN(72, "GPIO_72"), 156 + PINCTRL_PIN(73, "GPIO_73"), 157 + PINCTRL_PIN(74, "GPIO_74"), 158 + PINCTRL_PIN(75, "GPIO_75"), 159 + PINCTRL_PIN(76, "GPIO_76"), 160 + PINCTRL_PIN(77, "GPIO_77"), 161 + PINCTRL_PIN(78, "GPIO_78"), 162 + PINCTRL_PIN(79, "GPIO_79"), 163 + PINCTRL_PIN(80, "GPIO_80"), 164 + PINCTRL_PIN(81, "GPIO_81"), 165 + PINCTRL_PIN(82, "GPIO_82"), 166 + PINCTRL_PIN(83, "GPIO_83"), 167 + PINCTRL_PIN(84, "GPIO_84"), 168 + PINCTRL_PIN(85, "GPIO_85"), 169 + PINCTRL_PIN(86, "GPIO_86"), 170 + PINCTRL_PIN(87, "GPIO_87"), 171 + PINCTRL_PIN(88, "GPIO_88"), 172 + PINCTRL_PIN(89, "GPIO_89"), 173 + PINCTRL_PIN(90, "GPIO_90"), 174 + PINCTRL_PIN(91, "GPIO_91"), 175 + PINCTRL_PIN(92, "GPIO_92"), 176 + PINCTRL_PIN(93, "GPIO_93"), 177 + PINCTRL_PIN(94, "GPIO_94"), 178 + PINCTRL_PIN(95, "GPIO_95"), 179 + PINCTRL_PIN(96, "GPIO_96"), 180 + PINCTRL_PIN(97, "GPIO_97"), 181 + PINCTRL_PIN(98, "GPIO_98"), 182 + PINCTRL_PIN(99, "GPIO_99"), 183 + PINCTRL_PIN(100, "GPIO_100"), 184 + PINCTRL_PIN(101, "GPIO_101"), 185 + PINCTRL_PIN(102, "GPIO_102"), 186 + PINCTRL_PIN(103, "GPIO_103"), 187 + PINCTRL_PIN(104, "GPIO_104"), 188 + PINCTRL_PIN(105, "GPIO_105"), 189 + PINCTRL_PIN(106, "GPIO_106"), 190 + PINCTRL_PIN(107, "GPIO_107"), 191 + PINCTRL_PIN(108, "GPIO_108"), 192 + PINCTRL_PIN(109, "GPIO_109"), 193 + PINCTRL_PIN(110, "GPIO_110"), 194 + PINCTRL_PIN(111, "GPIO_111"), 195 + PINCTRL_PIN(112, "GPIO_112"), 196 + PINCTRL_PIN(113, "GPIO_113"), 197 + PINCTRL_PIN(114, "GPIO_114"), 198 + PINCTRL_PIN(115, "GPIO_115"), 199 + PINCTRL_PIN(116, "GPIO_116"), 200 + PINCTRL_PIN(117, "GPIO_117"), 201 + PINCTRL_PIN(118, "GPIO_118"), 202 + PINCTRL_PIN(119, "GPIO_119"), 203 + PINCTRL_PIN(120, "GPIO_120"), 204 + PINCTRL_PIN(121, "GPIO_121"), 205 + PINCTRL_PIN(122, "GPIO_122"), 206 + PINCTRL_PIN(123, "GPIO_123"), 207 + PINCTRL_PIN(124, "GPIO_124"), 208 + PINCTRL_PIN(125, "GPIO_125"), 209 + PINCTRL_PIN(126, "GPIO_126"), 210 + PINCTRL_PIN(127, "GPIO_127"), 211 + PINCTRL_PIN(128, "GPIO_128"), 212 + PINCTRL_PIN(129, "GPIO_129"), 213 + PINCTRL_PIN(130, "GPIO_130"), 214 + PINCTRL_PIN(131, "GPIO_131"), 215 + PINCTRL_PIN(132, "GPIO_132"), 216 + PINCTRL_PIN(133, "GPIO_133"), 217 + PINCTRL_PIN(134, "GPIO_134"), 218 + PINCTRL_PIN(135, "GPIO_135"), 219 + PINCTRL_PIN(136, "GPIO_136"), 220 + PINCTRL_PIN(137, "GPIO_137"), 221 + PINCTRL_PIN(138, "GPIO_138"), 222 + PINCTRL_PIN(139, "GPIO_139"), 223 + PINCTRL_PIN(140, "GPIO_140"), 224 + PINCTRL_PIN(141, "GPIO_141"), 225 + PINCTRL_PIN(142, "SDC1_CLK"), 226 + PINCTRL_PIN(143, "SDC1_CMD"), 227 + PINCTRL_PIN(144, "SDC1_DATA"), 228 + PINCTRL_PIN(145, "SDC1_RCLK"), 229 + PINCTRL_PIN(146, "SDC2_CLK"), 230 + PINCTRL_PIN(147, "SDC2_CMD"), 231 + PINCTRL_PIN(148, "SDC2_DATA"), 232 + PINCTRL_PIN(149, "QDSD_CLK"), 233 + PINCTRL_PIN(150, "QDSD_CMD"), 234 + PINCTRL_PIN(151, "QDSD_DATA0"), 235 + PINCTRL_PIN(152, "QDSD_DATA1"), 236 + PINCTRL_PIN(153, "QDSD_DATA2"), 237 + PINCTRL_PIN(154, "QDSD_DATA3"), 238 + }; 239 + 240 + #define DECLARE_MSM_GPIO_PINS(pin) \ 241 + static const unsigned int gpio##pin##_pins[] = { pin } 242 + DECLARE_MSM_GPIO_PINS(0); 243 + DECLARE_MSM_GPIO_PINS(1); 244 + DECLARE_MSM_GPIO_PINS(2); 245 + DECLARE_MSM_GPIO_PINS(3); 246 + DECLARE_MSM_GPIO_PINS(4); 247 + DECLARE_MSM_GPIO_PINS(5); 248 + DECLARE_MSM_GPIO_PINS(6); 249 + DECLARE_MSM_GPIO_PINS(7); 250 + DECLARE_MSM_GPIO_PINS(8); 251 + DECLARE_MSM_GPIO_PINS(9); 252 + DECLARE_MSM_GPIO_PINS(10); 253 + DECLARE_MSM_GPIO_PINS(11); 254 + DECLARE_MSM_GPIO_PINS(12); 255 + DECLARE_MSM_GPIO_PINS(13); 256 + DECLARE_MSM_GPIO_PINS(14); 257 + DECLARE_MSM_GPIO_PINS(15); 258 + DECLARE_MSM_GPIO_PINS(16); 259 + DECLARE_MSM_GPIO_PINS(17); 260 + DECLARE_MSM_GPIO_PINS(18); 261 + DECLARE_MSM_GPIO_PINS(19); 262 + DECLARE_MSM_GPIO_PINS(20); 263 + DECLARE_MSM_GPIO_PINS(21); 264 + DECLARE_MSM_GPIO_PINS(22); 265 + DECLARE_MSM_GPIO_PINS(23); 266 + DECLARE_MSM_GPIO_PINS(24); 267 + DECLARE_MSM_GPIO_PINS(25); 268 + DECLARE_MSM_GPIO_PINS(26); 269 + DECLARE_MSM_GPIO_PINS(27); 270 + DECLARE_MSM_GPIO_PINS(28); 271 + DECLARE_MSM_GPIO_PINS(29); 272 + DECLARE_MSM_GPIO_PINS(30); 273 + DECLARE_MSM_GPIO_PINS(31); 274 + DECLARE_MSM_GPIO_PINS(32); 275 + DECLARE_MSM_GPIO_PINS(33); 276 + DECLARE_MSM_GPIO_PINS(34); 277 + DECLARE_MSM_GPIO_PINS(35); 278 + DECLARE_MSM_GPIO_PINS(36); 279 + DECLARE_MSM_GPIO_PINS(37); 280 + DECLARE_MSM_GPIO_PINS(38); 281 + DECLARE_MSM_GPIO_PINS(39); 282 + DECLARE_MSM_GPIO_PINS(40); 283 + DECLARE_MSM_GPIO_PINS(41); 284 + DECLARE_MSM_GPIO_PINS(42); 285 + DECLARE_MSM_GPIO_PINS(43); 286 + DECLARE_MSM_GPIO_PINS(44); 287 + DECLARE_MSM_GPIO_PINS(45); 288 + DECLARE_MSM_GPIO_PINS(46); 289 + DECLARE_MSM_GPIO_PINS(47); 290 + DECLARE_MSM_GPIO_PINS(48); 291 + DECLARE_MSM_GPIO_PINS(49); 292 + DECLARE_MSM_GPIO_PINS(50); 293 + DECLARE_MSM_GPIO_PINS(51); 294 + DECLARE_MSM_GPIO_PINS(52); 295 + DECLARE_MSM_GPIO_PINS(53); 296 + DECLARE_MSM_GPIO_PINS(54); 297 + DECLARE_MSM_GPIO_PINS(55); 298 + DECLARE_MSM_GPIO_PINS(56); 299 + DECLARE_MSM_GPIO_PINS(57); 300 + DECLARE_MSM_GPIO_PINS(58); 301 + DECLARE_MSM_GPIO_PINS(59); 302 + DECLARE_MSM_GPIO_PINS(60); 303 + DECLARE_MSM_GPIO_PINS(61); 304 + DECLARE_MSM_GPIO_PINS(62); 305 + DECLARE_MSM_GPIO_PINS(63); 306 + DECLARE_MSM_GPIO_PINS(64); 307 + DECLARE_MSM_GPIO_PINS(65); 308 + DECLARE_MSM_GPIO_PINS(66); 309 + DECLARE_MSM_GPIO_PINS(67); 310 + DECLARE_MSM_GPIO_PINS(68); 311 + DECLARE_MSM_GPIO_PINS(69); 312 + DECLARE_MSM_GPIO_PINS(70); 313 + DECLARE_MSM_GPIO_PINS(71); 314 + DECLARE_MSM_GPIO_PINS(72); 315 + DECLARE_MSM_GPIO_PINS(73); 316 + DECLARE_MSM_GPIO_PINS(74); 317 + DECLARE_MSM_GPIO_PINS(75); 318 + DECLARE_MSM_GPIO_PINS(76); 319 + DECLARE_MSM_GPIO_PINS(77); 320 + DECLARE_MSM_GPIO_PINS(78); 321 + DECLARE_MSM_GPIO_PINS(79); 322 + DECLARE_MSM_GPIO_PINS(80); 323 + DECLARE_MSM_GPIO_PINS(81); 324 + DECLARE_MSM_GPIO_PINS(82); 325 + DECLARE_MSM_GPIO_PINS(83); 326 + DECLARE_MSM_GPIO_PINS(84); 327 + DECLARE_MSM_GPIO_PINS(85); 328 + DECLARE_MSM_GPIO_PINS(86); 329 + DECLARE_MSM_GPIO_PINS(87); 330 + DECLARE_MSM_GPIO_PINS(88); 331 + DECLARE_MSM_GPIO_PINS(89); 332 + DECLARE_MSM_GPIO_PINS(90); 333 + DECLARE_MSM_GPIO_PINS(91); 334 + DECLARE_MSM_GPIO_PINS(92); 335 + DECLARE_MSM_GPIO_PINS(93); 336 + DECLARE_MSM_GPIO_PINS(94); 337 + DECLARE_MSM_GPIO_PINS(95); 338 + DECLARE_MSM_GPIO_PINS(96); 339 + DECLARE_MSM_GPIO_PINS(97); 340 + DECLARE_MSM_GPIO_PINS(98); 341 + DECLARE_MSM_GPIO_PINS(99); 342 + DECLARE_MSM_GPIO_PINS(100); 343 + DECLARE_MSM_GPIO_PINS(101); 344 + DECLARE_MSM_GPIO_PINS(102); 345 + DECLARE_MSM_GPIO_PINS(103); 346 + DECLARE_MSM_GPIO_PINS(104); 347 + DECLARE_MSM_GPIO_PINS(105); 348 + DECLARE_MSM_GPIO_PINS(106); 349 + DECLARE_MSM_GPIO_PINS(107); 350 + DECLARE_MSM_GPIO_PINS(108); 351 + DECLARE_MSM_GPIO_PINS(109); 352 + DECLARE_MSM_GPIO_PINS(110); 353 + DECLARE_MSM_GPIO_PINS(111); 354 + DECLARE_MSM_GPIO_PINS(112); 355 + DECLARE_MSM_GPIO_PINS(113); 356 + DECLARE_MSM_GPIO_PINS(114); 357 + DECLARE_MSM_GPIO_PINS(115); 358 + DECLARE_MSM_GPIO_PINS(116); 359 + DECLARE_MSM_GPIO_PINS(117); 360 + DECLARE_MSM_GPIO_PINS(118); 361 + DECLARE_MSM_GPIO_PINS(119); 362 + DECLARE_MSM_GPIO_PINS(120); 363 + DECLARE_MSM_GPIO_PINS(121); 364 + DECLARE_MSM_GPIO_PINS(122); 365 + DECLARE_MSM_GPIO_PINS(123); 366 + DECLARE_MSM_GPIO_PINS(124); 367 + DECLARE_MSM_GPIO_PINS(125); 368 + DECLARE_MSM_GPIO_PINS(126); 369 + DECLARE_MSM_GPIO_PINS(127); 370 + DECLARE_MSM_GPIO_PINS(128); 371 + DECLARE_MSM_GPIO_PINS(129); 372 + DECLARE_MSM_GPIO_PINS(130); 373 + DECLARE_MSM_GPIO_PINS(131); 374 + DECLARE_MSM_GPIO_PINS(132); 375 + DECLARE_MSM_GPIO_PINS(133); 376 + DECLARE_MSM_GPIO_PINS(134); 377 + DECLARE_MSM_GPIO_PINS(135); 378 + DECLARE_MSM_GPIO_PINS(136); 379 + DECLARE_MSM_GPIO_PINS(137); 380 + DECLARE_MSM_GPIO_PINS(138); 381 + DECLARE_MSM_GPIO_PINS(139); 382 + DECLARE_MSM_GPIO_PINS(140); 383 + DECLARE_MSM_GPIO_PINS(141); 384 + 385 + static const unsigned int qdsd_clk_pins[] = { 142 }; 386 + static const unsigned int qdsd_cmd_pins[] = { 143 }; 387 + static const unsigned int qdsd_data0_pins[] = { 144 }; 388 + static const unsigned int qdsd_data1_pins[] = { 145 }; 389 + static const unsigned int qdsd_data2_pins[] = { 146 }; 390 + static const unsigned int qdsd_data3_pins[] = { 147 }; 391 + static const unsigned int sdc1_clk_pins[] = { 148 }; 392 + static const unsigned int sdc1_cmd_pins[] = { 149 }; 393 + static const unsigned int sdc1_data_pins[] = { 150 }; 394 + static const unsigned int sdc1_rclk_pins[] = { 151 }; 395 + static const unsigned int sdc2_clk_pins[] = { 152 }; 396 + static const unsigned int sdc2_cmd_pins[] = { 153 }; 397 + static const unsigned int sdc2_data_pins[] = { 154 }; 398 + 399 + enum msm8953_functions { 400 + msm_mux_accel_int, 401 + msm_mux_adsp_ext, 402 + msm_mux_alsp_int, 403 + msm_mux_atest_bbrx0, 404 + msm_mux_atest_bbrx1, 405 + msm_mux_atest_char, 406 + msm_mux_atest_char0, 407 + msm_mux_atest_char1, 408 + msm_mux_atest_char2, 409 + msm_mux_atest_char3, 410 + msm_mux_atest_gpsadc_dtest0_native, 411 + msm_mux_atest_gpsadc_dtest1_native, 412 + msm_mux_atest_tsens, 413 + msm_mux_atest_wlan0, 414 + msm_mux_atest_wlan1, 415 + msm_mux_bimc_dte0, 416 + msm_mux_bimc_dte1, 417 + msm_mux_blsp1_spi, 418 + msm_mux_blsp3_spi, 419 + msm_mux_blsp6_spi, 420 + msm_mux_blsp7_spi, 421 + msm_mux_blsp_i2c1, 422 + msm_mux_blsp_i2c2, 423 + msm_mux_blsp_i2c3, 424 + msm_mux_blsp_i2c4, 425 + msm_mux_blsp_i2c5, 426 + msm_mux_blsp_i2c6, 427 + msm_mux_blsp_i2c7, 428 + msm_mux_blsp_i2c8, 429 + msm_mux_blsp_spi1, 430 + msm_mux_blsp_spi2, 431 + msm_mux_blsp_spi3, 432 + msm_mux_blsp_spi4, 433 + msm_mux_blsp_spi5, 434 + msm_mux_blsp_spi6, 435 + msm_mux_blsp_spi7, 436 + msm_mux_blsp_spi8, 437 + msm_mux_blsp_uart2, 438 + msm_mux_blsp_uart4, 439 + msm_mux_blsp_uart5, 440 + msm_mux_blsp_uart6, 441 + msm_mux_cam0_ldo, 442 + msm_mux_cam1_ldo, 443 + msm_mux_cam1_rst, 444 + msm_mux_cam1_standby, 445 + msm_mux_cam2_rst, 446 + msm_mux_cam2_standby, 447 + msm_mux_cam3_rst, 448 + msm_mux_cam3_standby, 449 + msm_mux_cam_irq, 450 + msm_mux_cam_mclk, 451 + msm_mux_cap_int, 452 + msm_mux_cci_async, 453 + msm_mux_cci_i2c, 454 + msm_mux_cci_timer0, 455 + msm_mux_cci_timer1, 456 + msm_mux_cci_timer2, 457 + msm_mux_cci_timer3, 458 + msm_mux_cci_timer4, 459 + msm_mux_cdc_pdm0, 460 + msm_mux_codec_int1, 461 + msm_mux_codec_int2, 462 + msm_mux_codec_reset, 463 + msm_mux_cri_trng, 464 + msm_mux_cri_trng0, 465 + msm_mux_cri_trng1, 466 + msm_mux_dac_calib0, 467 + msm_mux_dac_calib1, 468 + msm_mux_dac_calib2, 469 + msm_mux_dac_calib3, 470 + msm_mux_dac_calib4, 471 + msm_mux_dac_calib5, 472 + msm_mux_dac_calib6, 473 + msm_mux_dac_calib7, 474 + msm_mux_dac_calib8, 475 + msm_mux_dac_calib9, 476 + msm_mux_dac_calib10, 477 + msm_mux_dac_calib11, 478 + msm_mux_dac_calib12, 479 + msm_mux_dac_calib13, 480 + msm_mux_dac_calib14, 481 + msm_mux_dac_calib15, 482 + msm_mux_dac_calib16, 483 + msm_mux_dac_calib17, 484 + msm_mux_dac_calib18, 485 + msm_mux_dac_calib19, 486 + msm_mux_dac_calib20, 487 + msm_mux_dac_calib21, 488 + msm_mux_dac_calib22, 489 + msm_mux_dac_calib23, 490 + msm_mux_dac_calib24, 491 + msm_mux_dac_calib25, 492 + msm_mux_dbg_out, 493 + msm_mux_ddr_bist, 494 + msm_mux_dmic0_clk, 495 + msm_mux_dmic0_data, 496 + msm_mux_ebi_cdc, 497 + msm_mux_ebi_ch0, 498 + msm_mux_ext_lpass, 499 + msm_mux_flash_strobe, 500 + msm_mux_fp_int, 501 + msm_mux_gcc_gp1_clk_a, 502 + msm_mux_gcc_gp1_clk_b, 503 + msm_mux_gcc_gp2_clk_a, 504 + msm_mux_gcc_gp2_clk_b, 505 + msm_mux_gcc_gp3_clk_a, 506 + msm_mux_gcc_gp3_clk_b, 507 + msm_mux_gcc_plltest, 508 + msm_mux_gcc_tlmm, 509 + msm_mux_gpio, 510 + msm_mux_gsm0_tx, 511 + msm_mux_gsm1_tx, 512 + msm_mux_gyro_int, 513 + msm_mux_hall_int, 514 + msm_mux_hdmi_int, 515 + msm_mux_key_focus, 516 + msm_mux_key_home, 517 + msm_mux_key_snapshot, 518 + msm_mux_key_volp, 519 + msm_mux_ldo_en, 520 + msm_mux_ldo_update, 521 + msm_mux_lpass_slimbus, 522 + msm_mux_lpass_slimbus0, 523 + msm_mux_lpass_slimbus1, 524 + msm_mux_m_voc, 525 + msm_mux_mag_int, 526 + msm_mux_mdp_vsync, 527 + msm_mux_mipi_dsi0, 528 + msm_mux_modem_tsync, 529 + msm_mux_mss_lte, 530 + msm_mux_nav_pps, 531 + msm_mux_nav_pps_in_a, 532 + msm_mux_nav_pps_in_b, 533 + msm_mux_nav_tsync, 534 + msm_mux_nfc_disable, 535 + msm_mux_nfc_dwl, 536 + msm_mux_nfc_irq, 537 + msm_mux_ois_sync, 538 + msm_mux_pa_indicator, 539 + msm_mux_pbs0, 540 + msm_mux_pbs1, 541 + msm_mux_pbs2, 542 + msm_mux_pressure_int, 543 + msm_mux_pri_mi2s, 544 + msm_mux_pri_mi2s_mclk_a, 545 + msm_mux_pri_mi2s_mclk_b, 546 + msm_mux_pri_mi2s_ws, 547 + msm_mux_prng_rosc, 548 + msm_mux_pwr_crypto_enabled_a, 549 + msm_mux_pwr_crypto_enabled_b, 550 + msm_mux_pwr_down, 551 + msm_mux_pwr_modem_enabled_a, 552 + msm_mux_pwr_modem_enabled_b, 553 + msm_mux_pwr_nav_enabled_a, 554 + msm_mux_pwr_nav_enabled_b, 555 + msm_mux_qdss_cti_trig_in_a0, 556 + msm_mux_qdss_cti_trig_in_a1, 557 + msm_mux_qdss_cti_trig_in_b0, 558 + msm_mux_qdss_cti_trig_in_b1, 559 + msm_mux_qdss_cti_trig_out_a0, 560 + msm_mux_qdss_cti_trig_out_a1, 561 + msm_mux_qdss_cti_trig_out_b0, 562 + msm_mux_qdss_cti_trig_out_b1, 563 + msm_mux_qdss_traceclk_a, 564 + msm_mux_qdss_traceclk_b, 565 + msm_mux_qdss_tracectl_a, 566 + msm_mux_qdss_tracectl_b, 567 + msm_mux_qdss_tracedata_a, 568 + msm_mux_qdss_tracedata_b, 569 + msm_mux_sd_write, 570 + msm_mux_sdcard_det, 571 + msm_mux_sec_mi2s, 572 + msm_mux_sec_mi2s_mclk_a, 573 + msm_mux_sec_mi2s_mclk_b, 574 + msm_mux_smb_int, 575 + msm_mux_ss_switch, 576 + msm_mux_ssbi_wtr1, 577 + msm_mux_ts_resout, 578 + msm_mux_ts_sample, 579 + msm_mux_ts_xvdd, 580 + msm_mux_tsens_max, 581 + msm_mux_uim1_clk, 582 + msm_mux_uim1_data, 583 + msm_mux_uim1_present, 584 + msm_mux_uim1_reset, 585 + msm_mux_uim2_clk, 586 + msm_mux_uim2_data, 587 + msm_mux_uim2_present, 588 + msm_mux_uim2_reset, 589 + msm_mux_uim_batt, 590 + msm_mux_us_emitter, 591 + msm_mux_us_euro, 592 + msm_mux_wcss_bt, 593 + msm_mux_wcss_fm, 594 + msm_mux_wcss_wlan, 595 + msm_mux_wcss_wlan0, 596 + msm_mux_wcss_wlan1, 597 + msm_mux_wcss_wlan2, 598 + msm_mux_wsa_en, 599 + msm_mux_wsa_io, 600 + msm_mux_wsa_irq, 601 + msm_mux__, 602 + }; 603 + 604 + static const char * const accel_int_groups[] = { 605 + "gpio42", 606 + }; 607 + 608 + static const char * const adsp_ext_groups[] = { 609 + "gpio1", 610 + }; 611 + 612 + static const char * const alsp_int_groups[] = { 613 + "gpio43", 614 + }; 615 + 616 + static const char * const atest_bbrx0_groups[] = { 617 + "gpio17", 618 + }; 619 + 620 + static const char * const atest_bbrx1_groups[] = { 621 + "gpio16", 622 + }; 623 + 624 + static const char * const atest_char0_groups[] = { 625 + "gpio68", 626 + }; 627 + 628 + static const char * const atest_char1_groups[] = { 629 + "gpio67", 630 + }; 631 + 632 + static const char * const atest_char2_groups[] = { 633 + "gpio75", 634 + }; 635 + 636 + static const char * const atest_char3_groups[] = { 637 + "gpio63", 638 + }; 639 + 640 + static const char * const atest_char_groups[] = { 641 + "gpio120", 642 + }; 643 + 644 + static const char * const atest_gpsadc_dtest0_native_groups[] = { 645 + "gpio7", 646 + }; 647 + 648 + static const char * const atest_gpsadc_dtest1_native_groups[] = { 649 + "gpio18", 650 + }; 651 + 652 + static const char * const atest_tsens_groups[] = { 653 + "gpio120", 654 + }; 655 + 656 + static const char * const atest_wlan0_groups[] = { 657 + "gpio22", 658 + }; 659 + 660 + static const char * const atest_wlan1_groups[] = { 661 + "gpio23", 662 + }; 663 + 664 + static const char * const bimc_dte0_groups[] = { 665 + "gpio63", "gpio65", 666 + }; 667 + 668 + static const char * const bimc_dte1_groups[] = { 669 + "gpio121", "gpio122", 670 + }; 671 + 672 + static const char * const blsp1_spi_groups[] = { 673 + "gpio35", "gpio36", 674 + }; 675 + 676 + static const char * const blsp3_spi_groups[] = { 677 + "gpio41", "gpio50", 678 + }; 679 + 680 + static const char * const blsp6_spi_groups[] = { 681 + "gpio47", "gpio48", 682 + }; 683 + 684 + static const char * const blsp7_spi_groups[] = { 685 + "gpio89", "gpio90", 686 + }; 687 + 688 + static const char * const blsp_i2c1_groups[] = { 689 + "gpio2", "gpio3", 690 + }; 691 + 692 + static const char * const blsp_i2c2_groups[] = { 693 + "gpio6", "gpio7", 694 + }; 695 + 696 + static const char * const blsp_i2c3_groups[] = { 697 + "gpio10", "gpio11", 698 + }; 699 + 700 + static const char * const blsp_i2c4_groups[] = { 701 + "gpio14", "gpio15", 702 + }; 703 + 704 + static const char * const blsp_i2c5_groups[] = { 705 + "gpio18", "gpio19", 706 + }; 707 + 708 + static const char * const blsp_i2c6_groups[] = { 709 + "gpio22", "gpio23", 710 + }; 711 + 712 + static const char * const blsp_i2c7_groups[] = { 713 + "gpio135", "gpio136", 714 + }; 715 + 716 + static const char * const blsp_i2c8_groups[] = { 717 + "gpio98", "gpio99", 718 + }; 719 + 720 + static const char * const blsp_spi1_groups[] = { 721 + "gpio0", "gpio1", "gpio2", "gpio3", 722 + }; 723 + 724 + static const char * const blsp_spi2_groups[] = { 725 + "gpio4", "gpio5", "gpio6", "gpio7", 726 + }; 727 + 728 + static const char * const blsp_spi3_groups[] = { 729 + "gpio8", "gpio9", "gpio10", "gpio11", 730 + }; 731 + 732 + static const char * const blsp_spi4_groups[] = { 733 + "gpio12", "gpio13", "gpio14", "gpio15", 734 + }; 735 + 736 + static const char * const blsp_spi5_groups[] = { 737 + "gpio16", "gpio17", "gpio18", "gpio19", 738 + }; 739 + 740 + static const char * const blsp_spi6_groups[] = { 741 + "gpio20", "gpio21", "gpio22", "gpio23", 742 + }; 743 + 744 + static const char * const blsp_spi7_groups[] = { 745 + "gpio135", "gpio136", "gpio137", "gpio138", 746 + }; 747 + 748 + static const char * const blsp_spi8_groups[] = { 749 + "gpio96", "gpio97", "gpio98", "gpio99", 750 + }; 751 + 752 + static const char * const blsp_uart2_groups[] = { 753 + "gpio4", "gpio5", "gpio6", "gpio7", 754 + }; 755 + 756 + static const char * const blsp_uart4_groups[] = { 757 + "gpio12", "gpio13", "gpio14", "gpio15", 758 + }; 759 + 760 + static const char * const blsp_uart5_groups[] = { 761 + "gpio16", "gpio17", "gpio18", "gpio19", 762 + }; 763 + 764 + static const char * const blsp_uart6_groups[] = { 765 + "gpio20", "gpio21", "gpio22", "gpio23", 766 + }; 767 + 768 + static const char * const cam0_ldo_groups[] = { 769 + "gpio50", 770 + }; 771 + 772 + static const char * const cam1_ldo_groups[] = { 773 + "gpio134", 774 + }; 775 + 776 + static const char * const cam1_rst_groups[] = { 777 + "gpio40", 778 + }; 779 + 780 + static const char * const cam1_standby_groups[] = { 781 + "gpio39", 782 + }; 783 + 784 + static const char * const cam2_rst_groups[] = { 785 + "gpio129", 786 + }; 787 + 788 + static const char * const cam2_standby_groups[] = { 789 + "gpio130", 790 + }; 791 + 792 + static const char * const cam3_rst_groups[] = { 793 + "gpio131", 794 + }; 795 + 796 + static const char * const cam3_standby_groups[] = { 797 + "gpio132", 798 + }; 799 + 800 + static const char * const cam_irq_groups[] = { 801 + "gpio35", 802 + }; 803 + 804 + static const char * const cam_mclk_groups[] = { 805 + "gpio26", "gpio27", "gpio28", "gpio128", 806 + }; 807 + 808 + static const char * const cap_int_groups[] = { 809 + "gpio13", 810 + }; 811 + 812 + static const char * const cci_async_groups[] = { 813 + "gpio38", 814 + }; 815 + 816 + static const char * const cci_i2c_groups[] = { 817 + "gpio29", "gpio30", "gpio31", "gpio32", 818 + }; 819 + 820 + static const char * const cci_timer0_groups[] = { 821 + "gpio33", 822 + }; 823 + 824 + static const char * const cci_timer1_groups[] = { 825 + "gpio34", 826 + }; 827 + 828 + static const char * const cci_timer2_groups[] = { 829 + "gpio35", 830 + }; 831 + 832 + static const char * const cci_timer3_groups[] = { 833 + "gpio36", 834 + }; 835 + 836 + static const char * const cci_timer4_groups[] = { 837 + "gpio41", 838 + }; 839 + 840 + static const char * const cdc_pdm0_groups[] = { 841 + "gpio67", "gpio68", "gpio69", "gpio70", "gpio71", "gpio72", "gpio73", 842 + "gpio74", 843 + }; 844 + 845 + static const char * const codec_int1_groups[] = { 846 + "gpio73", 847 + }; 848 + 849 + static const char * const codec_int2_groups[] = { 850 + "gpio74", 851 + }; 852 + 853 + static const char * const codec_reset_groups[] = { 854 + "gpio67", 855 + }; 856 + 857 + static const char * const cri_trng0_groups[] = { 858 + "gpio85", 859 + }; 860 + 861 + static const char * const cri_trng1_groups[] = { 862 + "gpio86", 863 + }; 864 + 865 + static const char * const cri_trng_groups[] = { 866 + "gpio87", 867 + }; 868 + 869 + static const char * const dac_calib0_groups[] = { 870 + "gpio4", 871 + }; 872 + 873 + static const char * const dac_calib1_groups[] = { 874 + "gpio12", 875 + }; 876 + 877 + static const char * const dac_calib2_groups[] = { 878 + "gpio13", 879 + }; 880 + 881 + static const char * const dac_calib3_groups[] = { 882 + "gpio28", 883 + }; 884 + 885 + static const char * const dac_calib4_groups[] = { 886 + "gpio29", 887 + }; 888 + 889 + static const char * const dac_calib5_groups[] = { 890 + "gpio39", 891 + }; 892 + 893 + static const char * const dac_calib6_groups[] = { 894 + "gpio40", 895 + }; 896 + 897 + static const char * const dac_calib7_groups[] = { 898 + "gpio41", 899 + }; 900 + 901 + static const char * const dac_calib8_groups[] = { 902 + "gpio42", 903 + }; 904 + 905 + static const char * const dac_calib9_groups[] = { 906 + "gpio43", 907 + }; 908 + 909 + static const char * const dac_calib10_groups[] = { 910 + "gpio44", 911 + }; 912 + 913 + static const char * const dac_calib11_groups[] = { 914 + "gpio45", 915 + }; 916 + 917 + static const char * const dac_calib12_groups[] = { 918 + "gpio46", 919 + }; 920 + 921 + static const char * const dac_calib13_groups[] = { 922 + "gpio47", 923 + }; 924 + 925 + static const char * const dac_calib14_groups[] = { 926 + "gpio48", 927 + }; 928 + 929 + static const char * const dac_calib15_groups[] = { 930 + "gpio20", 931 + }; 932 + 933 + static const char * const dac_calib16_groups[] = { 934 + "gpio21", 935 + }; 936 + 937 + static const char * const dac_calib17_groups[] = { 938 + "gpio67", 939 + }; 940 + 941 + static const char * const dac_calib18_groups[] = { 942 + "gpio115", 943 + }; 944 + 945 + static const char * const dac_calib19_groups[] = { 946 + "gpio30", 947 + }; 948 + 949 + static const char * const dac_calib20_groups[] = { 950 + "gpio128", 951 + }; 952 + 953 + static const char * const dac_calib21_groups[] = { 954 + "gpio129", 955 + }; 956 + 957 + static const char * const dac_calib22_groups[] = { 958 + "gpio130", 959 + }; 960 + 961 + static const char * const dac_calib23_groups[] = { 962 + "gpio131", 963 + }; 964 + 965 + static const char * const dac_calib24_groups[] = { 966 + "gpio132", 967 + }; 968 + 969 + static const char * const dac_calib25_groups[] = { 970 + "gpio133", 971 + }; 972 + 973 + static const char * const dbg_out_groups[] = { 974 + "gpio63", 975 + }; 976 + 977 + static const char * const ddr_bist_groups[] = { 978 + "gpio129", "gpio130", "gpio131", "gpio132", 979 + }; 980 + 981 + static const char * const dmic0_clk_groups[] = { 982 + "gpio89", 983 + }; 984 + 985 + static const char * const dmic0_data_groups[] = { 986 + "gpio90", 987 + }; 988 + 989 + static const char * const ebi_cdc_groups[] = { 990 + "gpio67", "gpio69", "gpio118", "gpio119", "gpio120", "gpio123", 991 + }; 992 + 993 + static const char * const ebi_ch0_groups[] = { 994 + "gpio75", 995 + }; 996 + 997 + static const char * const ext_lpass_groups[] = { 998 + "gpio81", 999 + }; 1000 + 1001 + static const char * const flash_strobe_groups[] = { 1002 + "gpio33", "gpio34", 1003 + }; 1004 + 1005 + static const char * const fp_int_groups[] = { 1006 + "gpio48", 1007 + }; 1008 + 1009 + static const char * const gcc_gp1_clk_a_groups[] = { 1010 + "gpio42", 1011 + }; 1012 + 1013 + static const char * const gcc_gp1_clk_b_groups[] = { 1014 + "gpio6", "gpio41", 1015 + }; 1016 + 1017 + static const char * const gcc_gp2_clk_a_groups[] = { 1018 + "gpio43", 1019 + }; 1020 + 1021 + static const char * const gcc_gp2_clk_b_groups[] = { 1022 + "gpio10", 1023 + }; 1024 + 1025 + static const char * const gcc_gp3_clk_a_groups[] = { 1026 + "gpio44", 1027 + }; 1028 + 1029 + static const char * const gcc_gp3_clk_b_groups[] = { 1030 + "gpio11", 1031 + }; 1032 + 1033 + static const char * const gcc_plltest_groups[] = { 1034 + "gpio98", "gpio99", 1035 + }; 1036 + 1037 + static const char * const gcc_tlmm_groups[] = { 1038 + "gpio87", 1039 + }; 1040 + 1041 + static const char * const gpio_groups[] = { 1042 + "gpio0", "gpio1", "gpio2", "gpio3", "gpio4", "gpio5", "gpio6", "gpio7", 1043 + "gpio8", "gpio9", "gpio10", "gpio11", "gpio12", "gpio13", "gpio14", 1044 + "gpio15", "gpio16", "gpio17", "gpio18", "gpio19", "gpio20", "gpio21", 1045 + "gpio22", "gpio23", "gpio24", "gpio25", "gpio26", "gpio27", "gpio28", 1046 + "gpio29", "gpio30", "gpio31", "gpio32", "gpio33", "gpio34", "gpio35", 1047 + "gpio36", "gpio37", "gpio38", "gpio39", "gpio40", "gpio41", "gpio42", 1048 + "gpio43", "gpio44", "gpio45", "gpio46", "gpio47", "gpio48", "gpio49", 1049 + "gpio50", "gpio51", "gpio52", "gpio53", "gpio54", "gpio55", "gpio56", 1050 + "gpio57", "gpio58", "gpio59", "gpio60", "gpio61", "gpio62", "gpio63", 1051 + "gpio64", "gpio65", "gpio66", "gpio67", "gpio68", "gpio69", "gpio70", 1052 + "gpio71", "gpio72", "gpio73", "gpio74", "gpio75", "gpio76", "gpio77", 1053 + "gpio78", "gpio79", "gpio80", "gpio81", "gpio82", "gpio83", "gpio84", 1054 + "gpio85", "gpio86", "gpio87", "gpio88", "gpio89", "gpio90", "gpio91", 1055 + "gpio92", "gpio93", "gpio94", "gpio95", "gpio96", "gpio97", "gpio98", 1056 + "gpio99", "gpio100", "gpio101", "gpio102", "gpio103", "gpio104", 1057 + "gpio105", "gpio106", "gpio107", "gpio108", "gpio109", "gpio110", 1058 + "gpio111", "gpio112", "gpio113", "gpio114", "gpio115", "gpio116", 1059 + "gpio117", "gpio118", "gpio119", "gpio120", "gpio121", "gpio122", 1060 + "gpio123", "gpio124", "gpio125", "gpio126", "gpio127", "gpio128", 1061 + "gpio129", "gpio130", "gpio131", "gpio132", "gpio133", "gpio134", 1062 + "gpio135", "gpio136", "gpio137", "gpio138", "gpio139", "gpio140", 1063 + "gpio141", 1064 + }; 1065 + 1066 + static const char * const gsm0_tx_groups[] = { 1067 + "gpio117", 1068 + }; 1069 + 1070 + static const char * const gsm1_tx_groups[] = { 1071 + "gpio115", 1072 + }; 1073 + 1074 + static const char * const gyro_int_groups[] = { 1075 + "gpio45", 1076 + }; 1077 + 1078 + static const char * const hall_int_groups[] = { 1079 + "gpio12", 1080 + }; 1081 + 1082 + static const char * const hdmi_int_groups[] = { 1083 + "gpio90", 1084 + }; 1085 + 1086 + static const char * const key_focus_groups[] = { 1087 + "gpio87", 1088 + }; 1089 + 1090 + static const char * const key_home_groups[] = { 1091 + "gpio88", 1092 + }; 1093 + 1094 + static const char * const key_snapshot_groups[] = { 1095 + "gpio86", 1096 + }; 1097 + 1098 + static const char * const key_volp_groups[] = { 1099 + "gpio85", 1100 + }; 1101 + 1102 + static const char * const ldo_en_groups[] = { 1103 + "gpio5", 1104 + }; 1105 + 1106 + static const char * const ldo_update_groups[] = { 1107 + "gpio4", 1108 + }; 1109 + 1110 + static const char * const lpass_slimbus0_groups[] = { 1111 + "gpio71", 1112 + }; 1113 + 1114 + static const char * const lpass_slimbus1_groups[] = { 1115 + "gpio72", 1116 + }; 1117 + 1118 + static const char * const lpass_slimbus_groups[] = { 1119 + "gpio70", 1120 + }; 1121 + 1122 + static const char * const m_voc_groups[] = { 1123 + "gpio17", "gpio21", 1124 + }; 1125 + 1126 + static const char * const mag_int_groups[] = { 1127 + "gpio44", 1128 + }; 1129 + 1130 + static const char * const mdp_vsync_groups[] = { 1131 + "gpio24", "gpio25", 1132 + }; 1133 + 1134 + static const char * const mipi_dsi0_groups[] = { 1135 + "gpio61", 1136 + }; 1137 + 1138 + static const char * const modem_tsync_groups[] = { 1139 + "gpio113", 1140 + }; 1141 + 1142 + static const char * const mss_lte_groups[] = { 1143 + "gpio82", "gpio83", 1144 + }; 1145 + 1146 + static const char * const nav_pps_groups[] = { 1147 + "gpio113", 1148 + }; 1149 + 1150 + static const char * const nav_pps_in_a_groups[] = { 1151 + "gpio111", 1152 + }; 1153 + 1154 + static const char * const nav_pps_in_b_groups[] = { 1155 + "gpio113", 1156 + }; 1157 + 1158 + static const char * const nav_tsync_groups[] = { 1159 + "gpio113", 1160 + }; 1161 + 1162 + static const char * const nfc_disable_groups[] = { 1163 + "gpio16", 1164 + }; 1165 + 1166 + static const char * const nfc_dwl_groups[] = { 1167 + "gpio62", 1168 + }; 1169 + 1170 + static const char * const nfc_irq_groups[] = { 1171 + "gpio17", 1172 + }; 1173 + 1174 + static const char * const ois_sync_groups[] = { 1175 + "gpio36", 1176 + }; 1177 + 1178 + static const char * const pa_indicator_groups[] = { 1179 + "gpio112", 1180 + }; 1181 + 1182 + static const char * const pbs0_groups[] = { 1183 + "gpio85", 1184 + }; 1185 + 1186 + static const char * const pbs1_groups[] = { 1187 + "gpio86", 1188 + }; 1189 + 1190 + static const char * const pbs2_groups[] = { 1191 + "gpio87", 1192 + }; 1193 + 1194 + static const char * const pressure_int_groups[] = { 1195 + "gpio46", 1196 + }; 1197 + 1198 + static const char * const pri_mi2s_groups[] = { 1199 + "gpio66", "gpio88", "gpio91", "gpio93", "gpio94", "gpio95", 1200 + }; 1201 + 1202 + static const char * const pri_mi2s_mclk_a_groups[] = { 1203 + "gpio25", 1204 + }; 1205 + 1206 + static const char * const pri_mi2s_mclk_b_groups[] = { 1207 + "gpio69", 1208 + }; 1209 + 1210 + static const char * const pri_mi2s_ws_groups[] = { 1211 + "gpio92", 1212 + }; 1213 + 1214 + static const char * const prng_rosc_groups[] = { 1215 + "gpio2", 1216 + }; 1217 + 1218 + static const char * const pwr_crypto_enabled_a_groups[] = { 1219 + "gpio36", 1220 + }; 1221 + 1222 + static const char * const pwr_crypto_enabled_b_groups[] = { 1223 + "gpio13", 1224 + }; 1225 + 1226 + static const char * const pwr_down_groups[] = { 1227 + "gpio89", 1228 + }; 1229 + 1230 + static const char * const pwr_modem_enabled_a_groups[] = { 1231 + "gpio29", 1232 + }; 1233 + 1234 + static const char * const pwr_modem_enabled_b_groups[] = { 1235 + "gpio9", 1236 + }; 1237 + 1238 + static const char * const pwr_nav_enabled_a_groups[] = { 1239 + "gpio35", 1240 + }; 1241 + 1242 + static const char * const pwr_nav_enabled_b_groups[] = { 1243 + "gpio12", 1244 + }; 1245 + 1246 + static const char * const qdss_cti_trig_in_a0_groups[] = { 1247 + "gpio17", 1248 + }; 1249 + 1250 + static const char * const qdss_cti_trig_in_a1_groups[] = { 1251 + "gpio91", 1252 + }; 1253 + 1254 + static const char * const qdss_cti_trig_in_b0_groups[] = { 1255 + "gpio21", 1256 + }; 1257 + 1258 + static const char * const qdss_cti_trig_in_b1_groups[] = { 1259 + "gpio48", 1260 + }; 1261 + 1262 + static const char * const qdss_cti_trig_out_a0_groups[] = { 1263 + "gpio41", 1264 + }; 1265 + 1266 + static const char * const qdss_cti_trig_out_a1_groups[] = { 1267 + "gpio3", 1268 + }; 1269 + 1270 + static const char * const qdss_cti_trig_out_b0_groups[] = { 1271 + "gpio2", 1272 + }; 1273 + 1274 + static const char * const qdss_cti_trig_out_b1_groups[] = { 1275 + "gpio25", 1276 + }; 1277 + 1278 + static const char * const qdss_traceclk_a_groups[] = { 1279 + "gpio16", 1280 + }; 1281 + 1282 + static const char * const qdss_traceclk_b_groups[] = { 1283 + "gpio22", 1284 + }; 1285 + 1286 + static const char * const qdss_tracectl_a_groups[] = { 1287 + "gpio18", 1288 + }; 1289 + 1290 + static const char * const qdss_tracectl_b_groups[] = { 1291 + "gpio20", 1292 + }; 1293 + 1294 + static const char * const qdss_tracedata_a_groups[] = { 1295 + "gpio19", "gpio26", "gpio27", "gpio28", "gpio29", "gpio30", "gpio31", 1296 + "gpio32", "gpio33", "gpio34", "gpio35", "gpio36", "gpio38", "gpio39", 1297 + "gpio40", "gpio50", 1298 + }; 1299 + 1300 + static const char * const qdss_tracedata_b_groups[] = { 1301 + "gpio8", "gpio9", "gpio12", "gpio13", "gpio23", "gpio42", "gpio43", 1302 + "gpio44", "gpio45", "gpio46", "gpio47", "gpio66", "gpio86", "gpio87", 1303 + "gpio88", "gpio92", 1304 + }; 1305 + 1306 + static const char * const sd_write_groups[] = { 1307 + "gpio50", 1308 + }; 1309 + 1310 + static const char * const sdcard_det_groups[] = { 1311 + "gpio133", 1312 + }; 1313 + 1314 + static const char * const sec_mi2s_groups[] = { 1315 + "gpio135", "gpio136", "gpio137", "gpio138", 1316 + }; 1317 + 1318 + static const char * const sec_mi2s_mclk_a_groups[] = { 1319 + "gpio25", 1320 + }; 1321 + 1322 + static const char * const sec_mi2s_mclk_b_groups[] = { 1323 + "gpio66", 1324 + }; 1325 + 1326 + static const char * const smb_int_groups[] = { 1327 + "gpio1", 1328 + }; 1329 + 1330 + static const char * const ss_switch_groups[] = { 1331 + "gpio139", 1332 + }; 1333 + 1334 + static const char * const ssbi_wtr1_groups[] = { 1335 + "gpio114", "gpio123", 1336 + }; 1337 + 1338 + static const char * const ts_resout_groups[] = { 1339 + "gpio64", 1340 + }; 1341 + 1342 + static const char * const ts_sample_groups[] = { 1343 + "gpio65", 1344 + }; 1345 + 1346 + static const char * const ts_xvdd_groups[] = { 1347 + "gpio60", 1348 + }; 1349 + 1350 + static const char * const tsens_max_groups[] = { 1351 + "gpio139", 1352 + }; 1353 + 1354 + static const char * const uim1_clk_groups[] = { 1355 + "gpio52", 1356 + }; 1357 + 1358 + static const char * const uim1_data_groups[] = { 1359 + "gpio51", 1360 + }; 1361 + 1362 + static const char * const uim1_present_groups[] = { 1363 + "gpio54", 1364 + }; 1365 + 1366 + static const char * const uim1_reset_groups[] = { 1367 + "gpio53", 1368 + }; 1369 + 1370 + static const char * const uim2_clk_groups[] = { 1371 + "gpio56", 1372 + }; 1373 + 1374 + static const char * const uim2_data_groups[] = { 1375 + "gpio55", 1376 + }; 1377 + 1378 + static const char * const uim2_present_groups[] = { 1379 + "gpio58", 1380 + }; 1381 + 1382 + static const char * const uim2_reset_groups[] = { 1383 + "gpio57", 1384 + }; 1385 + 1386 + static const char * const uim_batt_groups[] = { 1387 + "gpio49", 1388 + }; 1389 + 1390 + static const char * const us_emitter_groups[] = { 1391 + "gpio68", 1392 + }; 1393 + 1394 + static const char * const us_euro_groups[] = { 1395 + "gpio63", 1396 + }; 1397 + 1398 + static const char * const wcss_bt_groups[] = { 1399 + "gpio75", "gpio83", "gpio84", 1400 + }; 1401 + 1402 + static const char * const wcss_fm_groups[] = { 1403 + "gpio81", "gpio82", 1404 + }; 1405 + 1406 + static const char * const wcss_wlan0_groups[] = { 1407 + "gpio78", 1408 + }; 1409 + 1410 + static const char * const wcss_wlan1_groups[] = { 1411 + "gpio77", 1412 + }; 1413 + 1414 + static const char * const wcss_wlan2_groups[] = { 1415 + "gpio76", 1416 + }; 1417 + 1418 + static const char * const wcss_wlan_groups[] = { 1419 + "gpio79", "gpio80", 1420 + }; 1421 + 1422 + static const char * const wsa_en_groups[] = { 1423 + "gpio96", 1424 + }; 1425 + 1426 + static const char * const wsa_io_groups[] = { 1427 + "gpio94", "gpio95", 1428 + }; 1429 + 1430 + static const char * const wsa_irq_groups[] = { 1431 + "gpio97", 1432 + }; 1433 + 1434 + static const struct msm_function msm8953_functions[] = { 1435 + FUNCTION(accel_int), 1436 + FUNCTION(adsp_ext), 1437 + FUNCTION(alsp_int), 1438 + FUNCTION(atest_bbrx0), 1439 + FUNCTION(atest_bbrx1), 1440 + FUNCTION(atest_char), 1441 + FUNCTION(atest_char0), 1442 + FUNCTION(atest_char1), 1443 + FUNCTION(atest_char2), 1444 + FUNCTION(atest_char3), 1445 + FUNCTION(atest_gpsadc_dtest0_native), 1446 + FUNCTION(atest_gpsadc_dtest1_native), 1447 + FUNCTION(atest_tsens), 1448 + FUNCTION(atest_wlan0), 1449 + FUNCTION(atest_wlan1), 1450 + FUNCTION(bimc_dte0), 1451 + FUNCTION(bimc_dte1), 1452 + FUNCTION(blsp1_spi), 1453 + FUNCTION(blsp3_spi), 1454 + FUNCTION(blsp6_spi), 1455 + FUNCTION(blsp7_spi), 1456 + FUNCTION(blsp_i2c1), 1457 + FUNCTION(blsp_i2c2), 1458 + FUNCTION(blsp_i2c3), 1459 + FUNCTION(blsp_i2c4), 1460 + FUNCTION(blsp_i2c5), 1461 + FUNCTION(blsp_i2c6), 1462 + FUNCTION(blsp_i2c7), 1463 + FUNCTION(blsp_i2c8), 1464 + FUNCTION(blsp_spi1), 1465 + FUNCTION(blsp_spi2), 1466 + FUNCTION(blsp_spi3), 1467 + FUNCTION(blsp_spi4), 1468 + FUNCTION(blsp_spi5), 1469 + FUNCTION(blsp_spi6), 1470 + FUNCTION(blsp_spi7), 1471 + FUNCTION(blsp_spi8), 1472 + FUNCTION(blsp_uart2), 1473 + FUNCTION(blsp_uart4), 1474 + FUNCTION(blsp_uart5), 1475 + FUNCTION(blsp_uart6), 1476 + FUNCTION(cam0_ldo), 1477 + FUNCTION(cam1_ldo), 1478 + FUNCTION(cam1_rst), 1479 + FUNCTION(cam1_standby), 1480 + FUNCTION(cam2_rst), 1481 + FUNCTION(cam2_standby), 1482 + FUNCTION(cam3_rst), 1483 + FUNCTION(cam3_standby), 1484 + FUNCTION(cam_irq), 1485 + FUNCTION(cam_mclk), 1486 + FUNCTION(cap_int), 1487 + FUNCTION(cci_async), 1488 + FUNCTION(cci_i2c), 1489 + FUNCTION(cci_timer0), 1490 + FUNCTION(cci_timer1), 1491 + FUNCTION(cci_timer2), 1492 + FUNCTION(cci_timer3), 1493 + FUNCTION(cci_timer4), 1494 + FUNCTION(cdc_pdm0), 1495 + FUNCTION(codec_int1), 1496 + FUNCTION(codec_int2), 1497 + FUNCTION(codec_reset), 1498 + FUNCTION(cri_trng), 1499 + FUNCTION(cri_trng0), 1500 + FUNCTION(cri_trng1), 1501 + FUNCTION(dac_calib0), 1502 + FUNCTION(dac_calib1), 1503 + FUNCTION(dac_calib10), 1504 + FUNCTION(dac_calib11), 1505 + FUNCTION(dac_calib12), 1506 + FUNCTION(dac_calib13), 1507 + FUNCTION(dac_calib14), 1508 + FUNCTION(dac_calib15), 1509 + FUNCTION(dac_calib16), 1510 + FUNCTION(dac_calib17), 1511 + FUNCTION(dac_calib18), 1512 + FUNCTION(dac_calib19), 1513 + FUNCTION(dac_calib2), 1514 + FUNCTION(dac_calib20), 1515 + FUNCTION(dac_calib21), 1516 + FUNCTION(dac_calib22), 1517 + FUNCTION(dac_calib23), 1518 + FUNCTION(dac_calib24), 1519 + FUNCTION(dac_calib25), 1520 + FUNCTION(dac_calib3), 1521 + FUNCTION(dac_calib4), 1522 + FUNCTION(dac_calib5), 1523 + FUNCTION(dac_calib6), 1524 + FUNCTION(dac_calib7), 1525 + FUNCTION(dac_calib8), 1526 + FUNCTION(dac_calib9), 1527 + FUNCTION(dbg_out), 1528 + FUNCTION(ddr_bist), 1529 + FUNCTION(dmic0_clk), 1530 + FUNCTION(dmic0_data), 1531 + FUNCTION(ebi_cdc), 1532 + FUNCTION(ebi_ch0), 1533 + FUNCTION(ext_lpass), 1534 + FUNCTION(flash_strobe), 1535 + FUNCTION(fp_int), 1536 + FUNCTION(gcc_gp1_clk_a), 1537 + FUNCTION(gcc_gp1_clk_b), 1538 + FUNCTION(gcc_gp2_clk_a), 1539 + FUNCTION(gcc_gp2_clk_b), 1540 + FUNCTION(gcc_gp3_clk_a), 1541 + FUNCTION(gcc_gp3_clk_b), 1542 + FUNCTION(gcc_plltest), 1543 + FUNCTION(gcc_tlmm), 1544 + FUNCTION(gpio), 1545 + FUNCTION(gsm0_tx), 1546 + FUNCTION(gsm1_tx), 1547 + FUNCTION(gyro_int), 1548 + FUNCTION(hall_int), 1549 + FUNCTION(hdmi_int), 1550 + FUNCTION(key_focus), 1551 + FUNCTION(key_home), 1552 + FUNCTION(key_snapshot), 1553 + FUNCTION(key_volp), 1554 + FUNCTION(ldo_en), 1555 + FUNCTION(ldo_update), 1556 + FUNCTION(lpass_slimbus), 1557 + FUNCTION(lpass_slimbus0), 1558 + FUNCTION(lpass_slimbus1), 1559 + FUNCTION(m_voc), 1560 + FUNCTION(mag_int), 1561 + FUNCTION(mdp_vsync), 1562 + FUNCTION(mipi_dsi0), 1563 + FUNCTION(modem_tsync), 1564 + FUNCTION(mss_lte), 1565 + FUNCTION(nav_pps), 1566 + FUNCTION(nav_pps_in_a), 1567 + FUNCTION(nav_pps_in_b), 1568 + FUNCTION(nav_tsync), 1569 + FUNCTION(nfc_disable), 1570 + FUNCTION(nfc_dwl), 1571 + FUNCTION(nfc_irq), 1572 + FUNCTION(ois_sync), 1573 + FUNCTION(pa_indicator), 1574 + FUNCTION(pbs0), 1575 + FUNCTION(pbs1), 1576 + FUNCTION(pbs2), 1577 + FUNCTION(pressure_int), 1578 + FUNCTION(pri_mi2s), 1579 + FUNCTION(pri_mi2s_mclk_a), 1580 + FUNCTION(pri_mi2s_mclk_b), 1581 + FUNCTION(pri_mi2s_ws), 1582 + FUNCTION(prng_rosc), 1583 + FUNCTION(pwr_crypto_enabled_a), 1584 + FUNCTION(pwr_crypto_enabled_b), 1585 + FUNCTION(pwr_down), 1586 + FUNCTION(pwr_modem_enabled_a), 1587 + FUNCTION(pwr_modem_enabled_b), 1588 + FUNCTION(pwr_nav_enabled_a), 1589 + FUNCTION(pwr_nav_enabled_b), 1590 + FUNCTION(qdss_cti_trig_in_a0), 1591 + FUNCTION(qdss_cti_trig_in_a1), 1592 + FUNCTION(qdss_cti_trig_in_b0), 1593 + FUNCTION(qdss_cti_trig_in_b1), 1594 + FUNCTION(qdss_cti_trig_out_a0), 1595 + FUNCTION(qdss_cti_trig_out_a1), 1596 + FUNCTION(qdss_cti_trig_out_b0), 1597 + FUNCTION(qdss_cti_trig_out_b1), 1598 + FUNCTION(qdss_traceclk_a), 1599 + FUNCTION(qdss_traceclk_b), 1600 + FUNCTION(qdss_tracectl_a), 1601 + FUNCTION(qdss_tracectl_b), 1602 + FUNCTION(qdss_tracedata_a), 1603 + FUNCTION(qdss_tracedata_b), 1604 + FUNCTION(sd_write), 1605 + FUNCTION(sdcard_det), 1606 + FUNCTION(sec_mi2s), 1607 + FUNCTION(sec_mi2s_mclk_a), 1608 + FUNCTION(sec_mi2s_mclk_b), 1609 + FUNCTION(smb_int), 1610 + FUNCTION(ss_switch), 1611 + FUNCTION(ssbi_wtr1), 1612 + FUNCTION(ts_resout), 1613 + FUNCTION(ts_sample), 1614 + FUNCTION(ts_xvdd), 1615 + FUNCTION(tsens_max), 1616 + FUNCTION(uim1_clk), 1617 + FUNCTION(uim1_data), 1618 + FUNCTION(uim1_present), 1619 + FUNCTION(uim1_reset), 1620 + FUNCTION(uim2_clk), 1621 + FUNCTION(uim2_data), 1622 + FUNCTION(uim2_present), 1623 + FUNCTION(uim2_reset), 1624 + FUNCTION(uim_batt), 1625 + FUNCTION(us_emitter), 1626 + FUNCTION(us_euro), 1627 + FUNCTION(wcss_bt), 1628 + FUNCTION(wcss_fm), 1629 + FUNCTION(wcss_wlan), 1630 + FUNCTION(wcss_wlan0), 1631 + FUNCTION(wcss_wlan1), 1632 + FUNCTION(wcss_wlan2), 1633 + FUNCTION(wsa_en), 1634 + FUNCTION(wsa_io), 1635 + FUNCTION(wsa_irq), 1636 + }; 1637 + 1638 + static const struct msm_pingroup msm8953_groups[] = { 1639 + PINGROUP(0, blsp_spi1, _, _, _, _, _, _, _, _), 1640 + PINGROUP(1, blsp_spi1, adsp_ext, _, _, _, _, _, _, _), 1641 + PINGROUP(2, blsp_spi1, blsp_i2c1, prng_rosc, _, _, _, qdss_cti_trig_out_b0, _, _), 1642 + PINGROUP(3, blsp_spi1, blsp_i2c1, _, _, _, qdss_cti_trig_out_a1, _, _, _), 1643 + PINGROUP(4, blsp_spi2, blsp_uart2, ldo_update, _, dac_calib0, _, _, _, _), 1644 + PINGROUP(5, blsp_spi2, blsp_uart2, ldo_en, _, _, _, _, _, _), 1645 + PINGROUP(6, blsp_spi2, blsp_uart2, blsp_i2c2, gcc_gp1_clk_b, _, _, _, _, _), 1646 + PINGROUP(7, blsp_spi2, blsp_uart2, blsp_i2c2, _, atest_gpsadc_dtest0_native, _, _, _, _), 1647 + PINGROUP(8, blsp_spi3, _, _, qdss_tracedata_b, _, _, _, _, _), 1648 + PINGROUP(9, blsp_spi3, pwr_modem_enabled_b, _, _, qdss_tracedata_b, _, _, _, _), 1649 + PINGROUP(10, blsp_spi3, blsp_i2c3, gcc_gp2_clk_b, _, _, _, _, _, _), 1650 + PINGROUP(11, blsp_spi3, blsp_i2c3, gcc_gp3_clk_b, _, _, _, _, _, _), 1651 + PINGROUP(12, blsp_spi4, blsp_uart4, pwr_nav_enabled_b, _, _, 1652 + qdss_tracedata_b, _, dac_calib1, _), 1653 + PINGROUP(13, blsp_spi4, blsp_uart4, pwr_crypto_enabled_b, _, _, _, 1654 + qdss_tracedata_b, _, dac_calib2), 1655 + PINGROUP(14, blsp_spi4, blsp_uart4, blsp_i2c4, _, _, _, _, _, _), 1656 + PINGROUP(15, blsp_spi4, blsp_uart4, blsp_i2c4, _, _, _, _, _, _), 1657 + PINGROUP(16, blsp_spi5, blsp_uart5, _, _, qdss_traceclk_a, _, atest_bbrx1, _, _), 1658 + PINGROUP(17, blsp_spi5, blsp_uart5, m_voc, qdss_cti_trig_in_a0, _, atest_bbrx0, _, _, _), 1659 + PINGROUP(18, blsp_spi5, blsp_uart5, blsp_i2c5, 1660 + qdss_tracectl_a, _, atest_gpsadc_dtest1_native, _, _, _), 1661 + PINGROUP(19, blsp_spi5, blsp_uart5, blsp_i2c5, qdss_tracedata_a, _, _, _, _, _), 1662 + PINGROUP(20, blsp_spi6, blsp_uart6, _, _, _, qdss_tracectl_b, _, dac_calib15, _), 1663 + PINGROUP(21, blsp_spi6, blsp_uart6, m_voc, _, _, _, qdss_cti_trig_in_b0, _, dac_calib16), 1664 + PINGROUP(22, blsp_spi6, blsp_uart6, blsp_i2c6, qdss_traceclk_b, _, atest_wlan0, _, _, _), 1665 + PINGROUP(23, blsp_spi6, blsp_uart6, blsp_i2c6, qdss_tracedata_b, _, atest_wlan1, _, _, _), 1666 + PINGROUP(24, mdp_vsync, _, _, _, _, _, _, _, _), 1667 + PINGROUP(25, mdp_vsync, pri_mi2s_mclk_a, sec_mi2s_mclk_a, 1668 + qdss_cti_trig_out_b1, _, _, _, _, _), 1669 + PINGROUP(26, cam_mclk, _, _, _, qdss_tracedata_a, _, _, _, _), 1670 + PINGROUP(27, cam_mclk, _, _, _, qdss_tracedata_a, _, _, _, _), 1671 + PINGROUP(28, cam_mclk, _, _, _, qdss_tracedata_a, _, dac_calib3, _, _), 1672 + PINGROUP(29, cci_i2c, pwr_modem_enabled_a, _, _, _, qdss_tracedata_a, _, dac_calib4, _), 1673 + PINGROUP(30, cci_i2c, _, _, _, qdss_tracedata_a, _, dac_calib19, _, _), 1674 + PINGROUP(31, cci_i2c, _, _, _, qdss_tracedata_a, _, _, _, _), 1675 + PINGROUP(32, cci_i2c, _, _, _, qdss_tracedata_a, _, _, _, _), 1676 + PINGROUP(33, cci_timer0, _, _, _, _, qdss_tracedata_a, _, _, _), 1677 + PINGROUP(34, cci_timer1, _, _, _, _, qdss_tracedata_a, _, _, _), 1678 + PINGROUP(35, cci_timer2, blsp1_spi, pwr_nav_enabled_a, _, _, _, qdss_tracedata_a, _, _), 1679 + PINGROUP(36, cci_timer3, blsp1_spi, _, pwr_crypto_enabled_a, _, _, _, qdss_tracedata_a, _), 1680 + PINGROUP(37, _, _, _, _, _, _, _, _, _), 1681 + PINGROUP(38, cci_async, _, qdss_tracedata_a, _, _, _, _, _, _), 1682 + PINGROUP(39, _, _, _, qdss_tracedata_a, _, dac_calib5, _, _, _), 1683 + PINGROUP(40, _, _, qdss_tracedata_a, _, dac_calib6, _, _, _, _), 1684 + PINGROUP(41, cci_timer4, blsp3_spi, gcc_gp1_clk_b, _, _, 1685 + qdss_cti_trig_out_a0, _, dac_calib7, _), 1686 + PINGROUP(42, gcc_gp1_clk_a, qdss_tracedata_b, _, dac_calib8, _, _, _, _, _), 1687 + PINGROUP(43, gcc_gp2_clk_a, qdss_tracedata_b, _, dac_calib9, _, _, _, _, _), 1688 + PINGROUP(44, gcc_gp3_clk_a, qdss_tracedata_b, _, dac_calib10, _, _, _, _, _), 1689 + PINGROUP(45, _, qdss_tracedata_b, _, dac_calib11, _, _, _, _, _), 1690 + PINGROUP(46, qdss_tracedata_b, _, dac_calib12, _, _, _, _, _, _), 1691 + PINGROUP(47, blsp6_spi, qdss_tracedata_b, _, dac_calib13, _, _, _, _, _), 1692 + PINGROUP(48, blsp6_spi, _, qdss_cti_trig_in_b1, _, dac_calib14, _, _, _, _), 1693 + PINGROUP(49, uim_batt, _, _, _, _, _, _, _, _), 1694 + PINGROUP(50, blsp3_spi, sd_write, _, _, _, qdss_tracedata_a, _, _, _), 1695 + PINGROUP(51, uim1_data, _, _, _, _, _, _, _, _), 1696 + PINGROUP(52, uim1_clk, _, _, _, _, _, _, _, _), 1697 + PINGROUP(53, uim1_reset, _, _, _, _, _, _, _, _), 1698 + PINGROUP(54, uim1_present, _, _, _, _, _, _, _, _), 1699 + PINGROUP(55, uim2_data, _, _, _, _, _, _, _, _), 1700 + PINGROUP(56, uim2_clk, _, _, _, _, _, _, _, _), 1701 + PINGROUP(57, uim2_reset, _, _, _, _, _, _, _, _), 1702 + PINGROUP(58, uim2_present, _, _, _, _, _, _, _, _), 1703 + PINGROUP(59, _, _, _, _, _, _, _, _, _), 1704 + PINGROUP(60, _, _, _, _, _, _, _, _, _), 1705 + PINGROUP(61, _, _, _, _, _, _, _, _, _), 1706 + PINGROUP(62, _, _, _, _, _, _, _, _, _), 1707 + PINGROUP(63, atest_char3, dbg_out, bimc_dte0, _, _, _, _, _, _), 1708 + PINGROUP(64, _, _, _, _, _, _, _, _, _), 1709 + PINGROUP(65, bimc_dte0, _, _, _, _, _, _, _, _), 1710 + PINGROUP(66, sec_mi2s_mclk_b, pri_mi2s, _, qdss_tracedata_b, _, _, _, _, _), 1711 + PINGROUP(67, cdc_pdm0, atest_char1, ebi_cdc, _, dac_calib17, _, _, _, _), 1712 + PINGROUP(68, cdc_pdm0, atest_char0, _, _, _, _, _, _, _), 1713 + PINGROUP(69, cdc_pdm0, pri_mi2s_mclk_b, ebi_cdc, _, _, _, _, _, _), 1714 + PINGROUP(70, lpass_slimbus, cdc_pdm0, _, _, _, _, _, _, _), 1715 + PINGROUP(71, lpass_slimbus0, cdc_pdm0, _, _, _, _, _, _, _), 1716 + PINGROUP(72, lpass_slimbus1, cdc_pdm0, _, _, _, _, _, _, _), 1717 + PINGROUP(73, cdc_pdm0, _, _, _, _, _, _, _, _), 1718 + PINGROUP(74, cdc_pdm0, _, _, _, _, _, _, _, _), 1719 + PINGROUP(75, wcss_bt, atest_char2, _, ebi_ch0, _, _, _, _, _), 1720 + PINGROUP(76, wcss_wlan2, _, _, _, _, _, _, _, _), 1721 + PINGROUP(77, wcss_wlan1, _, _, _, _, _, _, _, _), 1722 + PINGROUP(78, wcss_wlan0, _, _, _, _, _, _, _, _), 1723 + PINGROUP(79, wcss_wlan, _, _, _, _, _, _, _, _), 1724 + PINGROUP(80, wcss_wlan, _, _, _, _, _, _, _, _), 1725 + PINGROUP(81, wcss_fm, ext_lpass, _, _, _, _, _, _, _), 1726 + PINGROUP(82, wcss_fm, mss_lte, _, _, _, _, _, _, _), 1727 + PINGROUP(83, wcss_bt, mss_lte, _, _, _, _, _, _, _), 1728 + PINGROUP(84, wcss_bt, _, _, _, _, _, _, _, _), 1729 + PINGROUP(85, pbs0, cri_trng0, _, _, _, _, _, _, _), 1730 + PINGROUP(86, pbs1, cri_trng1, qdss_tracedata_b, _, _, _, _, _, _), 1731 + PINGROUP(87, pbs2, cri_trng, qdss_tracedata_b, gcc_tlmm, _, _, _, _, _), 1732 + PINGROUP(88, pri_mi2s, _, _, _, qdss_tracedata_b, _, _, _, _), 1733 + PINGROUP(89, dmic0_clk, blsp7_spi, _, _, _, _, _, _, _), 1734 + PINGROUP(90, dmic0_data, blsp7_spi, _, _, _, _, _, _, _), 1735 + PINGROUP(91, pri_mi2s, _, _, _, qdss_cti_trig_in_a1, _, _, _, _), 1736 + PINGROUP(92, pri_mi2s_ws, _, _, _, qdss_tracedata_b, _, _, _, _), 1737 + PINGROUP(93, pri_mi2s, _, _, _, _, _, _, _, _), 1738 + PINGROUP(94, wsa_io, pri_mi2s, _, _, _, _, _, _, _), 1739 + PINGROUP(95, wsa_io, pri_mi2s, _, _, _, _, _, _, _), 1740 + PINGROUP(96, blsp_spi8, _, _, _, _, _, _, _, _), 1741 + PINGROUP(97, blsp_spi8, _, _, _, _, _, _, _, _), 1742 + PINGROUP(98, blsp_i2c8, blsp_spi8, gcc_plltest, _, _, _, _, _, _), 1743 + PINGROUP(99, blsp_i2c8, blsp_spi8, gcc_plltest, _, _, _, _, _, _), 1744 + PINGROUP(100, _, _, _, _, _, _, _, _, _), 1745 + PINGROUP(101, _, _, _, _, _, _, _, _, _), 1746 + PINGROUP(102, _, _, _, _, _, _, _, _, _), 1747 + PINGROUP(103, _, _, _, _, _, _, _, _, _), 1748 + PINGROUP(104, _, _, _, _, _, _, _, _, _), 1749 + PINGROUP(105, _, _, _, _, _, _, _, _, _), 1750 + PINGROUP(106, _, _, _, _, _, _, _, _, _), 1751 + PINGROUP(107, _, _, _, _, _, _, _, _, _), 1752 + PINGROUP(108, _, _, _, _, _, _, _, _, _), 1753 + PINGROUP(109, _, _, _, _, _, _, _, _, _), 1754 + PINGROUP(110, _, _, _, _, _, _, _, _, _), 1755 + PINGROUP(111, _, _, nav_pps_in_a, _, _, _, _, _, _), 1756 + PINGROUP(112, _, pa_indicator, _, _, _, _, _, _, _), 1757 + PINGROUP(113, _, nav_pps_in_b, nav_pps, modem_tsync, nav_tsync, _, _, _, _), 1758 + PINGROUP(114, _, ssbi_wtr1, _, _, _, _, _, _, _), 1759 + PINGROUP(115, _, gsm1_tx, _, dac_calib18, _, _, _, _, _), 1760 + PINGROUP(116, _, _, _, _, _, _, _, _, _), 1761 + PINGROUP(117, gsm0_tx, _, _, _, _, _, _, _, _), 1762 + PINGROUP(118, _, ebi_cdc, _, _, _, _, _, _, _), 1763 + PINGROUP(119, _, ebi_cdc, _, _, _, _, _, _, _), 1764 + PINGROUP(120, _, atest_char, ebi_cdc, _, atest_tsens, _, _, _, _), 1765 + PINGROUP(121, _, _, _, bimc_dte1, _, _, _, _, _), 1766 + PINGROUP(122, _, _, _, bimc_dte1, _, _, _, _, _), 1767 + PINGROUP(123, _, ssbi_wtr1, ebi_cdc, _, _, _, _, _, _), 1768 + PINGROUP(124, _, _, _, _, _, _, _, _, _), 1769 + PINGROUP(125, _, _, _, _, _, _, _, _, _), 1770 + PINGROUP(126, _, _, _, _, _, _, _, _, _), 1771 + PINGROUP(127, _, _, _, _, _, _, _, _, _), 1772 + PINGROUP(128, cam_mclk, _, dac_calib20, _, _, _, _, _, _), 1773 + PINGROUP(129, ddr_bist, _, dac_calib21, _, _, _, _, _, _), 1774 + PINGROUP(130, ddr_bist, _, dac_calib22, _, _, _, _, _, _), 1775 + PINGROUP(131, ddr_bist, _, dac_calib23, _, _, _, _, _, _), 1776 + PINGROUP(132, ddr_bist, _, dac_calib24, _, _, _, _, _, _), 1777 + PINGROUP(133, _, dac_calib25, _, _, _, _, _, _, _), 1778 + PINGROUP(134, _, _, _, _, _, _, _, _, _), 1779 + PINGROUP(135, sec_mi2s, blsp_spi7, blsp_i2c7, _, _, _, _, _, _), 1780 + PINGROUP(136, sec_mi2s, blsp_spi7, blsp_i2c7, _, _, _, _, _, _), 1781 + PINGROUP(137, sec_mi2s, blsp_spi7, _, _, _, _, _, _, _), 1782 + PINGROUP(138, sec_mi2s, blsp_spi7, _, _, _, _, _, _, _), 1783 + PINGROUP(139, tsens_max, _, _, _, _, _, _, _, _), 1784 + PINGROUP(140, _, _, _, _, _, _, _, _, _), 1785 + PINGROUP(141, _, _, _, _, _, _, _, _, _), 1786 + SDC_QDSD_PINGROUP(qdsd_clk, 0x19c000, 3, 0), 1787 + SDC_QDSD_PINGROUP(qdsd_cmd, 0x19c000, 8, 5), 1788 + SDC_QDSD_PINGROUP(qdsd_data0, 0x19c000, 13, 10), 1789 + SDC_QDSD_PINGROUP(qdsd_data1, 0x19c000, 18, 15), 1790 + SDC_QDSD_PINGROUP(qdsd_data2, 0x19c000, 23, 20), 1791 + SDC_QDSD_PINGROUP(qdsd_data3, 0x19c000, 28, 25), 1792 + SDC_QDSD_PINGROUP(sdc1_clk, 0x10a000, 13, 6), 1793 + SDC_QDSD_PINGROUP(sdc1_cmd, 0x10a000, 11, 3), 1794 + SDC_QDSD_PINGROUP(sdc1_data, 0x10a000, 9, 0), 1795 + SDC_QDSD_PINGROUP(sdc1_rclk, 0x10a000, 15, 0), 1796 + SDC_QDSD_PINGROUP(sdc2_clk, 0x109000, 14, 6), 1797 + SDC_QDSD_PINGROUP(sdc2_cmd, 0x109000, 11, 3), 1798 + SDC_QDSD_PINGROUP(sdc2_data, 0x109000, 9, 0), 1799 + }; 1800 + 1801 + static const struct msm_pinctrl_soc_data msm8953_pinctrl = { 1802 + .pins = msm8953_pins, 1803 + .npins = ARRAY_SIZE(msm8953_pins), 1804 + .functions = msm8953_functions, 1805 + .nfunctions = ARRAY_SIZE(msm8953_functions), 1806 + .groups = msm8953_groups, 1807 + .ngroups = ARRAY_SIZE(msm8953_groups), 1808 + .ngpios = 142, 1809 + }; 1810 + 1811 + static int msm8953_pinctrl_probe(struct platform_device *pdev) 1812 + { 1813 + return msm_pinctrl_probe(pdev, &msm8953_pinctrl); 1814 + } 1815 + 1816 + static const struct of_device_id msm8953_pinctrl_of_match[] = { 1817 + { .compatible = "qcom,msm8953-pinctrl", }, 1818 + { }, 1819 + }; 1820 + 1821 + static struct platform_driver msm8953_pinctrl_driver = { 1822 + .driver = { 1823 + .name = "msm8953-pinctrl", 1824 + .of_match_table = msm8953_pinctrl_of_match, 1825 + }, 1826 + .probe = msm8953_pinctrl_probe, 1827 + .remove = msm_pinctrl_remove, 1828 + }; 1829 + 1830 + static int __init msm8953_pinctrl_init(void) 1831 + { 1832 + return platform_driver_register(&msm8953_pinctrl_driver); 1833 + } 1834 + arch_initcall(msm8953_pinctrl_init); 1835 + 1836 + static void __exit msm8953_pinctrl_exit(void) 1837 + { 1838 + platform_driver_unregister(&msm8953_pinctrl_driver); 1839 + } 1840 + module_exit(msm8953_pinctrl_exit); 1841 + 1842 + MODULE_DESCRIPTION("QTI msm8953 pinctrl driver"); 1843 + MODULE_LICENSE("GPL v2"); 1844 + MODULE_DEVICE_TABLE(of, msm8953_pinctrl_of_match);
+1495
drivers/pinctrl/qcom/pinctrl-sc7280.c
··· 1 + // SPDX-License-Identifier: GPL-2.0-only 2 + /* 3 + * Copyright (c) 2020, The Linux Foundation. All rights reserved. 4 + */ 5 + 6 + #include <linux/module.h> 7 + #include <linux/of.h> 8 + #include <linux/platform_device.h> 9 + #include <linux/pinctrl/pinctrl.h> 10 + 11 + #include "pinctrl-msm.h" 12 + 13 + #define FUNCTION(fname) \ 14 + [msm_mux_##fname] = { \ 15 + .name = #fname, \ 16 + .groups = fname##_groups, \ 17 + .ngroups = ARRAY_SIZE(fname##_groups), \ 18 + } 19 + 20 + #define PINGROUP(id, f1, f2, f3, f4, f5, f6, f7, f8, f9) \ 21 + { \ 22 + .name = "gpio" #id, \ 23 + .pins = gpio##id##_pins, \ 24 + .npins = (unsigned int)ARRAY_SIZE(gpio##id##_pins), \ 25 + .funcs = (int[]){ \ 26 + msm_mux_gpio, /* gpio mode */ \ 27 + msm_mux_##f1, \ 28 + msm_mux_##f2, \ 29 + msm_mux_##f3, \ 30 + msm_mux_##f4, \ 31 + msm_mux_##f5, \ 32 + msm_mux_##f6, \ 33 + msm_mux_##f7, \ 34 + msm_mux_##f8, \ 35 + msm_mux_##f9 \ 36 + }, \ 37 + .nfuncs = 10, \ 38 + .ctl_reg = 0x1000 * id, \ 39 + .io_reg = 0x1000 * id + 0x4, \ 40 + .intr_cfg_reg = 0x1000 * id + 0x8, \ 41 + .intr_status_reg = 0x1000 * id + 0xc, \ 42 + .intr_target_reg = 0x1000 * id + 0x8, \ 43 + .mux_bit = 2, \ 44 + .pull_bit = 0, \ 45 + .drv_bit = 6, \ 46 + .oe_bit = 9, \ 47 + .in_bit = 0, \ 48 + .out_bit = 1, \ 49 + .intr_enable_bit = 0, \ 50 + .intr_status_bit = 0, \ 51 + .intr_target_bit = 5, \ 52 + .intr_target_kpss_val = 3, \ 53 + .intr_raw_status_bit = 4, \ 54 + .intr_polarity_bit = 1, \ 55 + .intr_detection_bit = 2, \ 56 + .intr_detection_width = 2, \ 57 + } 58 + 59 + #define SDC_QDSD_PINGROUP(pg_name, ctl, pull, drv) \ 60 + { \ 61 + .name = #pg_name, \ 62 + .pins = pg_name##_pins, \ 63 + .npins = (unsigned int)ARRAY_SIZE(pg_name##_pins), \ 64 + .ctl_reg = ctl, \ 65 + .io_reg = 0, \ 66 + .intr_cfg_reg = 0, \ 67 + .intr_status_reg = 0, \ 68 + .intr_target_reg = 0, \ 69 + .mux_bit = -1, \ 70 + .pull_bit = pull, \ 71 + .drv_bit = drv, \ 72 + .oe_bit = -1, \ 73 + .in_bit = -1, \ 74 + .out_bit = -1, \ 75 + .intr_enable_bit = -1, \ 76 + .intr_status_bit = -1, \ 77 + .intr_target_bit = -1, \ 78 + .intr_raw_status_bit = -1, \ 79 + .intr_polarity_bit = -1, \ 80 + .intr_detection_bit = -1, \ 81 + .intr_detection_width = -1, \ 82 + } 83 + 84 + #define UFS_RESET(pg_name, offset) \ 85 + { \ 86 + .name = #pg_name, \ 87 + .pins = pg_name##_pins, \ 88 + .npins = (unsigned int)ARRAY_SIZE(pg_name##_pins), \ 89 + .ctl_reg = offset, \ 90 + .io_reg = offset + 0x4, \ 91 + .intr_cfg_reg = 0, \ 92 + .intr_status_reg = 0, \ 93 + .intr_target_reg = 0, \ 94 + .mux_bit = -1, \ 95 + .pull_bit = 3, \ 96 + .drv_bit = 0, \ 97 + .oe_bit = -1, \ 98 + .in_bit = -1, \ 99 + .out_bit = 0, \ 100 + .intr_enable_bit = -1, \ 101 + .intr_status_bit = -1, \ 102 + .intr_target_bit = -1, \ 103 + .intr_raw_status_bit = -1, \ 104 + .intr_polarity_bit = -1, \ 105 + .intr_detection_bit = -1, \ 106 + .intr_detection_width = -1, \ 107 + } 108 + 109 + static const struct pinctrl_pin_desc sc7280_pins[] = { 110 + PINCTRL_PIN(0, "GPIO_0"), 111 + PINCTRL_PIN(1, "GPIO_1"), 112 + PINCTRL_PIN(2, "GPIO_2"), 113 + PINCTRL_PIN(3, "GPIO_3"), 114 + PINCTRL_PIN(4, "GPIO_4"), 115 + PINCTRL_PIN(5, "GPIO_5"), 116 + PINCTRL_PIN(6, "GPIO_6"), 117 + PINCTRL_PIN(7, "GPIO_7"), 118 + PINCTRL_PIN(8, "GPIO_8"), 119 + PINCTRL_PIN(9, "GPIO_9"), 120 + PINCTRL_PIN(10, "GPIO_10"), 121 + PINCTRL_PIN(11, "GPIO_11"), 122 + PINCTRL_PIN(12, "GPIO_12"), 123 + PINCTRL_PIN(13, "GPIO_13"), 124 + PINCTRL_PIN(14, "GPIO_14"), 125 + PINCTRL_PIN(15, "GPIO_15"), 126 + PINCTRL_PIN(16, "GPIO_16"), 127 + PINCTRL_PIN(17, "GPIO_17"), 128 + PINCTRL_PIN(18, "GPIO_18"), 129 + PINCTRL_PIN(19, "GPIO_19"), 130 + PINCTRL_PIN(20, "GPIO_20"), 131 + PINCTRL_PIN(21, "GPIO_21"), 132 + PINCTRL_PIN(22, "GPIO_22"), 133 + PINCTRL_PIN(23, "GPIO_23"), 134 + PINCTRL_PIN(24, "GPIO_24"), 135 + PINCTRL_PIN(25, "GPIO_25"), 136 + PINCTRL_PIN(26, "GPIO_26"), 137 + PINCTRL_PIN(27, "GPIO_27"), 138 + PINCTRL_PIN(28, "GPIO_28"), 139 + PINCTRL_PIN(29, "GPIO_29"), 140 + PINCTRL_PIN(30, "GPIO_30"), 141 + PINCTRL_PIN(31, "GPIO_31"), 142 + PINCTRL_PIN(32, "GPIO_32"), 143 + PINCTRL_PIN(33, "GPIO_33"), 144 + PINCTRL_PIN(34, "GPIO_34"), 145 + PINCTRL_PIN(35, "GPIO_35"), 146 + PINCTRL_PIN(36, "GPIO_36"), 147 + PINCTRL_PIN(37, "GPIO_37"), 148 + PINCTRL_PIN(38, "GPIO_38"), 149 + PINCTRL_PIN(39, "GPIO_39"), 150 + PINCTRL_PIN(40, "GPIO_40"), 151 + PINCTRL_PIN(41, "GPIO_41"), 152 + PINCTRL_PIN(42, "GPIO_42"), 153 + PINCTRL_PIN(43, "GPIO_43"), 154 + PINCTRL_PIN(44, "GPIO_44"), 155 + PINCTRL_PIN(45, "GPIO_45"), 156 + PINCTRL_PIN(46, "GPIO_46"), 157 + PINCTRL_PIN(47, "GPIO_47"), 158 + PINCTRL_PIN(48, "GPIO_48"), 159 + PINCTRL_PIN(49, "GPIO_49"), 160 + PINCTRL_PIN(50, "GPIO_50"), 161 + PINCTRL_PIN(51, "GPIO_51"), 162 + PINCTRL_PIN(52, "GPIO_52"), 163 + PINCTRL_PIN(53, "GPIO_53"), 164 + PINCTRL_PIN(54, "GPIO_54"), 165 + PINCTRL_PIN(55, "GPIO_55"), 166 + PINCTRL_PIN(56, "GPIO_56"), 167 + PINCTRL_PIN(57, "GPIO_57"), 168 + PINCTRL_PIN(58, "GPIO_58"), 169 + PINCTRL_PIN(59, "GPIO_59"), 170 + PINCTRL_PIN(60, "GPIO_60"), 171 + PINCTRL_PIN(61, "GPIO_61"), 172 + PINCTRL_PIN(62, "GPIO_62"), 173 + PINCTRL_PIN(63, "GPIO_63"), 174 + PINCTRL_PIN(64, "GPIO_64"), 175 + PINCTRL_PIN(65, "GPIO_65"), 176 + PINCTRL_PIN(66, "GPIO_66"), 177 + PINCTRL_PIN(67, "GPIO_67"), 178 + PINCTRL_PIN(68, "GPIO_68"), 179 + PINCTRL_PIN(69, "GPIO_69"), 180 + PINCTRL_PIN(70, "GPIO_70"), 181 + PINCTRL_PIN(71, "GPIO_71"), 182 + PINCTRL_PIN(72, "GPIO_72"), 183 + PINCTRL_PIN(73, "GPIO_73"), 184 + PINCTRL_PIN(74, "GPIO_74"), 185 + PINCTRL_PIN(75, "GPIO_75"), 186 + PINCTRL_PIN(76, "GPIO_76"), 187 + PINCTRL_PIN(77, "GPIO_77"), 188 + PINCTRL_PIN(78, "GPIO_78"), 189 + PINCTRL_PIN(79, "GPIO_79"), 190 + PINCTRL_PIN(80, "GPIO_80"), 191 + PINCTRL_PIN(81, "GPIO_81"), 192 + PINCTRL_PIN(82, "GPIO_82"), 193 + PINCTRL_PIN(83, "GPIO_83"), 194 + PINCTRL_PIN(84, "GPIO_84"), 195 + PINCTRL_PIN(85, "GPIO_85"), 196 + PINCTRL_PIN(86, "GPIO_86"), 197 + PINCTRL_PIN(87, "GPIO_87"), 198 + PINCTRL_PIN(88, "GPIO_88"), 199 + PINCTRL_PIN(89, "GPIO_89"), 200 + PINCTRL_PIN(90, "GPIO_90"), 201 + PINCTRL_PIN(91, "GPIO_91"), 202 + PINCTRL_PIN(92, "GPIO_92"), 203 + PINCTRL_PIN(93, "GPIO_93"), 204 + PINCTRL_PIN(94, "GPIO_94"), 205 + PINCTRL_PIN(95, "GPIO_95"), 206 + PINCTRL_PIN(96, "GPIO_96"), 207 + PINCTRL_PIN(97, "GPIO_97"), 208 + PINCTRL_PIN(98, "GPIO_98"), 209 + PINCTRL_PIN(99, "GPIO_99"), 210 + PINCTRL_PIN(100, "GPIO_100"), 211 + PINCTRL_PIN(101, "GPIO_101"), 212 + PINCTRL_PIN(102, "GPIO_102"), 213 + PINCTRL_PIN(103, "GPIO_103"), 214 + PINCTRL_PIN(104, "GPIO_104"), 215 + PINCTRL_PIN(105, "GPIO_105"), 216 + PINCTRL_PIN(106, "GPIO_106"), 217 + PINCTRL_PIN(107, "GPIO_107"), 218 + PINCTRL_PIN(108, "GPIO_108"), 219 + PINCTRL_PIN(109, "GPIO_109"), 220 + PINCTRL_PIN(110, "GPIO_110"), 221 + PINCTRL_PIN(111, "GPIO_111"), 222 + PINCTRL_PIN(112, "GPIO_112"), 223 + PINCTRL_PIN(113, "GPIO_113"), 224 + PINCTRL_PIN(114, "GPIO_114"), 225 + PINCTRL_PIN(115, "GPIO_115"), 226 + PINCTRL_PIN(116, "GPIO_116"), 227 + PINCTRL_PIN(117, "GPIO_117"), 228 + PINCTRL_PIN(118, "GPIO_118"), 229 + PINCTRL_PIN(119, "GPIO_119"), 230 + PINCTRL_PIN(120, "GPIO_120"), 231 + PINCTRL_PIN(121, "GPIO_121"), 232 + PINCTRL_PIN(122, "GPIO_122"), 233 + PINCTRL_PIN(123, "GPIO_123"), 234 + PINCTRL_PIN(124, "GPIO_124"), 235 + PINCTRL_PIN(125, "GPIO_125"), 236 + PINCTRL_PIN(126, "GPIO_126"), 237 + PINCTRL_PIN(127, "GPIO_127"), 238 + PINCTRL_PIN(128, "GPIO_128"), 239 + PINCTRL_PIN(129, "GPIO_129"), 240 + PINCTRL_PIN(130, "GPIO_130"), 241 + PINCTRL_PIN(131, "GPIO_131"), 242 + PINCTRL_PIN(132, "GPIO_132"), 243 + PINCTRL_PIN(133, "GPIO_133"), 244 + PINCTRL_PIN(134, "GPIO_134"), 245 + PINCTRL_PIN(135, "GPIO_135"), 246 + PINCTRL_PIN(136, "GPIO_136"), 247 + PINCTRL_PIN(137, "GPIO_137"), 248 + PINCTRL_PIN(138, "GPIO_138"), 249 + PINCTRL_PIN(139, "GPIO_139"), 250 + PINCTRL_PIN(140, "GPIO_140"), 251 + PINCTRL_PIN(141, "GPIO_141"), 252 + PINCTRL_PIN(142, "GPIO_142"), 253 + PINCTRL_PIN(143, "GPIO_143"), 254 + PINCTRL_PIN(144, "GPIO_144"), 255 + PINCTRL_PIN(145, "GPIO_145"), 256 + PINCTRL_PIN(146, "GPIO_146"), 257 + PINCTRL_PIN(147, "GPIO_147"), 258 + PINCTRL_PIN(148, "GPIO_148"), 259 + PINCTRL_PIN(149, "GPIO_149"), 260 + PINCTRL_PIN(150, "GPIO_150"), 261 + PINCTRL_PIN(151, "GPIO_151"), 262 + PINCTRL_PIN(152, "GPIO_152"), 263 + PINCTRL_PIN(153, "GPIO_153"), 264 + PINCTRL_PIN(154, "GPIO_154"), 265 + PINCTRL_PIN(155, "GPIO_155"), 266 + PINCTRL_PIN(156, "GPIO_156"), 267 + PINCTRL_PIN(157, "GPIO_157"), 268 + PINCTRL_PIN(158, "GPIO_158"), 269 + PINCTRL_PIN(159, "GPIO_159"), 270 + PINCTRL_PIN(160, "GPIO_160"), 271 + PINCTRL_PIN(161, "GPIO_161"), 272 + PINCTRL_PIN(162, "GPIO_162"), 273 + PINCTRL_PIN(163, "GPIO_163"), 274 + PINCTRL_PIN(164, "GPIO_164"), 275 + PINCTRL_PIN(165, "GPIO_165"), 276 + PINCTRL_PIN(166, "GPIO_166"), 277 + PINCTRL_PIN(167, "GPIO_167"), 278 + PINCTRL_PIN(168, "GPIO_168"), 279 + PINCTRL_PIN(169, "GPIO_169"), 280 + PINCTRL_PIN(170, "GPIO_170"), 281 + PINCTRL_PIN(171, "GPIO_171"), 282 + PINCTRL_PIN(172, "GPIO_172"), 283 + PINCTRL_PIN(173, "GPIO_173"), 284 + PINCTRL_PIN(174, "GPIO_174"), 285 + PINCTRL_PIN(175, "UFS_RESET"), 286 + PINCTRL_PIN(176, "SDC1_RCLK"), 287 + PINCTRL_PIN(177, "SDC1_CLK"), 288 + PINCTRL_PIN(178, "SDC1_CMD"), 289 + PINCTRL_PIN(179, "SDC1_DATA"), 290 + PINCTRL_PIN(180, "SDC2_CLK"), 291 + PINCTRL_PIN(181, "SDC2_CMD"), 292 + PINCTRL_PIN(182, "SDC2_DATA"), 293 + }; 294 + 295 + #define DECLARE_MSM_GPIO_PINS(pin) \ 296 + static const unsigned int gpio##pin##_pins[] = { pin } 297 + DECLARE_MSM_GPIO_PINS(0); 298 + DECLARE_MSM_GPIO_PINS(1); 299 + DECLARE_MSM_GPIO_PINS(2); 300 + DECLARE_MSM_GPIO_PINS(3); 301 + DECLARE_MSM_GPIO_PINS(4); 302 + DECLARE_MSM_GPIO_PINS(5); 303 + DECLARE_MSM_GPIO_PINS(6); 304 + DECLARE_MSM_GPIO_PINS(7); 305 + DECLARE_MSM_GPIO_PINS(8); 306 + DECLARE_MSM_GPIO_PINS(9); 307 + DECLARE_MSM_GPIO_PINS(10); 308 + DECLARE_MSM_GPIO_PINS(11); 309 + DECLARE_MSM_GPIO_PINS(12); 310 + DECLARE_MSM_GPIO_PINS(13); 311 + DECLARE_MSM_GPIO_PINS(14); 312 + DECLARE_MSM_GPIO_PINS(15); 313 + DECLARE_MSM_GPIO_PINS(16); 314 + DECLARE_MSM_GPIO_PINS(17); 315 + DECLARE_MSM_GPIO_PINS(18); 316 + DECLARE_MSM_GPIO_PINS(19); 317 + DECLARE_MSM_GPIO_PINS(20); 318 + DECLARE_MSM_GPIO_PINS(21); 319 + DECLARE_MSM_GPIO_PINS(22); 320 + DECLARE_MSM_GPIO_PINS(23); 321 + DECLARE_MSM_GPIO_PINS(24); 322 + DECLARE_MSM_GPIO_PINS(25); 323 + DECLARE_MSM_GPIO_PINS(26); 324 + DECLARE_MSM_GPIO_PINS(27); 325 + DECLARE_MSM_GPIO_PINS(28); 326 + DECLARE_MSM_GPIO_PINS(29); 327 + DECLARE_MSM_GPIO_PINS(30); 328 + DECLARE_MSM_GPIO_PINS(31); 329 + DECLARE_MSM_GPIO_PINS(32); 330 + DECLARE_MSM_GPIO_PINS(33); 331 + DECLARE_MSM_GPIO_PINS(34); 332 + DECLARE_MSM_GPIO_PINS(35); 333 + DECLARE_MSM_GPIO_PINS(36); 334 + DECLARE_MSM_GPIO_PINS(37); 335 + DECLARE_MSM_GPIO_PINS(38); 336 + DECLARE_MSM_GPIO_PINS(39); 337 + DECLARE_MSM_GPIO_PINS(40); 338 + DECLARE_MSM_GPIO_PINS(41); 339 + DECLARE_MSM_GPIO_PINS(42); 340 + DECLARE_MSM_GPIO_PINS(43); 341 + DECLARE_MSM_GPIO_PINS(44); 342 + DECLARE_MSM_GPIO_PINS(45); 343 + DECLARE_MSM_GPIO_PINS(46); 344 + DECLARE_MSM_GPIO_PINS(47); 345 + DECLARE_MSM_GPIO_PINS(48); 346 + DECLARE_MSM_GPIO_PINS(49); 347 + DECLARE_MSM_GPIO_PINS(50); 348 + DECLARE_MSM_GPIO_PINS(51); 349 + DECLARE_MSM_GPIO_PINS(52); 350 + DECLARE_MSM_GPIO_PINS(53); 351 + DECLARE_MSM_GPIO_PINS(54); 352 + DECLARE_MSM_GPIO_PINS(55); 353 + DECLARE_MSM_GPIO_PINS(56); 354 + DECLARE_MSM_GPIO_PINS(57); 355 + DECLARE_MSM_GPIO_PINS(58); 356 + DECLARE_MSM_GPIO_PINS(59); 357 + DECLARE_MSM_GPIO_PINS(60); 358 + DECLARE_MSM_GPIO_PINS(61); 359 + DECLARE_MSM_GPIO_PINS(62); 360 + DECLARE_MSM_GPIO_PINS(63); 361 + DECLARE_MSM_GPIO_PINS(64); 362 + DECLARE_MSM_GPIO_PINS(65); 363 + DECLARE_MSM_GPIO_PINS(66); 364 + DECLARE_MSM_GPIO_PINS(67); 365 + DECLARE_MSM_GPIO_PINS(68); 366 + DECLARE_MSM_GPIO_PINS(69); 367 + DECLARE_MSM_GPIO_PINS(70); 368 + DECLARE_MSM_GPIO_PINS(71); 369 + DECLARE_MSM_GPIO_PINS(72); 370 + DECLARE_MSM_GPIO_PINS(73); 371 + DECLARE_MSM_GPIO_PINS(74); 372 + DECLARE_MSM_GPIO_PINS(75); 373 + DECLARE_MSM_GPIO_PINS(76); 374 + DECLARE_MSM_GPIO_PINS(77); 375 + DECLARE_MSM_GPIO_PINS(78); 376 + DECLARE_MSM_GPIO_PINS(79); 377 + DECLARE_MSM_GPIO_PINS(80); 378 + DECLARE_MSM_GPIO_PINS(81); 379 + DECLARE_MSM_GPIO_PINS(82); 380 + DECLARE_MSM_GPIO_PINS(83); 381 + DECLARE_MSM_GPIO_PINS(84); 382 + DECLARE_MSM_GPIO_PINS(85); 383 + DECLARE_MSM_GPIO_PINS(86); 384 + DECLARE_MSM_GPIO_PINS(87); 385 + DECLARE_MSM_GPIO_PINS(88); 386 + DECLARE_MSM_GPIO_PINS(89); 387 + DECLARE_MSM_GPIO_PINS(90); 388 + DECLARE_MSM_GPIO_PINS(91); 389 + DECLARE_MSM_GPIO_PINS(92); 390 + DECLARE_MSM_GPIO_PINS(93); 391 + DECLARE_MSM_GPIO_PINS(94); 392 + DECLARE_MSM_GPIO_PINS(95); 393 + DECLARE_MSM_GPIO_PINS(96); 394 + DECLARE_MSM_GPIO_PINS(97); 395 + DECLARE_MSM_GPIO_PINS(98); 396 + DECLARE_MSM_GPIO_PINS(99); 397 + DECLARE_MSM_GPIO_PINS(100); 398 + DECLARE_MSM_GPIO_PINS(101); 399 + DECLARE_MSM_GPIO_PINS(102); 400 + DECLARE_MSM_GPIO_PINS(103); 401 + DECLARE_MSM_GPIO_PINS(104); 402 + DECLARE_MSM_GPIO_PINS(105); 403 + DECLARE_MSM_GPIO_PINS(106); 404 + DECLARE_MSM_GPIO_PINS(107); 405 + DECLARE_MSM_GPIO_PINS(108); 406 + DECLARE_MSM_GPIO_PINS(109); 407 + DECLARE_MSM_GPIO_PINS(110); 408 + DECLARE_MSM_GPIO_PINS(111); 409 + DECLARE_MSM_GPIO_PINS(112); 410 + DECLARE_MSM_GPIO_PINS(113); 411 + DECLARE_MSM_GPIO_PINS(114); 412 + DECLARE_MSM_GPIO_PINS(115); 413 + DECLARE_MSM_GPIO_PINS(116); 414 + DECLARE_MSM_GPIO_PINS(117); 415 + DECLARE_MSM_GPIO_PINS(118); 416 + DECLARE_MSM_GPIO_PINS(119); 417 + DECLARE_MSM_GPIO_PINS(120); 418 + DECLARE_MSM_GPIO_PINS(121); 419 + DECLARE_MSM_GPIO_PINS(122); 420 + DECLARE_MSM_GPIO_PINS(123); 421 + DECLARE_MSM_GPIO_PINS(124); 422 + DECLARE_MSM_GPIO_PINS(125); 423 + DECLARE_MSM_GPIO_PINS(126); 424 + DECLARE_MSM_GPIO_PINS(127); 425 + DECLARE_MSM_GPIO_PINS(128); 426 + DECLARE_MSM_GPIO_PINS(129); 427 + DECLARE_MSM_GPIO_PINS(130); 428 + DECLARE_MSM_GPIO_PINS(131); 429 + DECLARE_MSM_GPIO_PINS(132); 430 + DECLARE_MSM_GPIO_PINS(133); 431 + DECLARE_MSM_GPIO_PINS(134); 432 + DECLARE_MSM_GPIO_PINS(135); 433 + DECLARE_MSM_GPIO_PINS(136); 434 + DECLARE_MSM_GPIO_PINS(137); 435 + DECLARE_MSM_GPIO_PINS(138); 436 + DECLARE_MSM_GPIO_PINS(139); 437 + DECLARE_MSM_GPIO_PINS(140); 438 + DECLARE_MSM_GPIO_PINS(141); 439 + DECLARE_MSM_GPIO_PINS(142); 440 + DECLARE_MSM_GPIO_PINS(143); 441 + DECLARE_MSM_GPIO_PINS(144); 442 + DECLARE_MSM_GPIO_PINS(145); 443 + DECLARE_MSM_GPIO_PINS(146); 444 + DECLARE_MSM_GPIO_PINS(147); 445 + DECLARE_MSM_GPIO_PINS(148); 446 + DECLARE_MSM_GPIO_PINS(149); 447 + DECLARE_MSM_GPIO_PINS(150); 448 + DECLARE_MSM_GPIO_PINS(151); 449 + DECLARE_MSM_GPIO_PINS(152); 450 + DECLARE_MSM_GPIO_PINS(153); 451 + DECLARE_MSM_GPIO_PINS(154); 452 + DECLARE_MSM_GPIO_PINS(155); 453 + DECLARE_MSM_GPIO_PINS(156); 454 + DECLARE_MSM_GPIO_PINS(157); 455 + DECLARE_MSM_GPIO_PINS(158); 456 + DECLARE_MSM_GPIO_PINS(159); 457 + DECLARE_MSM_GPIO_PINS(160); 458 + DECLARE_MSM_GPIO_PINS(161); 459 + DECLARE_MSM_GPIO_PINS(162); 460 + DECLARE_MSM_GPIO_PINS(163); 461 + DECLARE_MSM_GPIO_PINS(164); 462 + DECLARE_MSM_GPIO_PINS(165); 463 + DECLARE_MSM_GPIO_PINS(166); 464 + DECLARE_MSM_GPIO_PINS(167); 465 + DECLARE_MSM_GPIO_PINS(168); 466 + DECLARE_MSM_GPIO_PINS(169); 467 + DECLARE_MSM_GPIO_PINS(170); 468 + DECLARE_MSM_GPIO_PINS(171); 469 + DECLARE_MSM_GPIO_PINS(172); 470 + DECLARE_MSM_GPIO_PINS(173); 471 + DECLARE_MSM_GPIO_PINS(174); 472 + 473 + static const unsigned int ufs_reset_pins[] = { 175 }; 474 + static const unsigned int sdc1_rclk_pins[] = { 176 }; 475 + static const unsigned int sdc1_clk_pins[] = { 177 }; 476 + static const unsigned int sdc1_cmd_pins[] = { 178 }; 477 + static const unsigned int sdc1_data_pins[] = { 179 }; 478 + static const unsigned int sdc2_clk_pins[] = { 180 }; 479 + static const unsigned int sdc2_cmd_pins[] = { 181 }; 480 + static const unsigned int sdc2_data_pins[] = { 182 }; 481 + 482 + enum sc7280_functions { 483 + msm_mux_atest_char, 484 + msm_mux_atest_char0, 485 + msm_mux_atest_char1, 486 + msm_mux_atest_char2, 487 + msm_mux_atest_char3, 488 + msm_mux_atest_usb0, 489 + msm_mux_atest_usb00, 490 + msm_mux_atest_usb01, 491 + msm_mux_atest_usb02, 492 + msm_mux_atest_usb03, 493 + msm_mux_atest_usb1, 494 + msm_mux_atest_usb10, 495 + msm_mux_atest_usb11, 496 + msm_mux_atest_usb12, 497 + msm_mux_atest_usb13, 498 + msm_mux_audio_ref, 499 + msm_mux_cam_mclk, 500 + msm_mux_cci_async, 501 + msm_mux_cci_i2c, 502 + msm_mux_cci_timer0, 503 + msm_mux_cci_timer1, 504 + msm_mux_cci_timer2, 505 + msm_mux_cci_timer3, 506 + msm_mux_cci_timer4, 507 + msm_mux_cmu_rng0, 508 + msm_mux_cmu_rng1, 509 + msm_mux_cmu_rng2, 510 + msm_mux_cmu_rng3, 511 + msm_mux_coex_uart1, 512 + msm_mux_cri_trng, 513 + msm_mux_cri_trng0, 514 + msm_mux_cri_trng1, 515 + msm_mux_dbg_out, 516 + msm_mux_ddr_bist, 517 + msm_mux_ddr_pxi0, 518 + msm_mux_ddr_pxi1, 519 + msm_mux_dp_hot, 520 + msm_mux_dp_lcd, 521 + msm_mux_edp_hot, 522 + msm_mux_edp_lcd, 523 + msm_mux_gcc_gp1, 524 + msm_mux_gcc_gp2, 525 + msm_mux_gcc_gp3, 526 + msm_mux_gpio, 527 + msm_mux_host2wlan_sol, 528 + msm_mux_ibi_i3c, 529 + msm_mux_jitter_bist, 530 + msm_mux_lpass_slimbus, 531 + msm_mux_mdp_vsync, 532 + msm_mux_mdp_vsync0, 533 + msm_mux_mdp_vsync1, 534 + msm_mux_mdp_vsync2, 535 + msm_mux_mdp_vsync3, 536 + msm_mux_mdp_vsync4, 537 + msm_mux_mdp_vsync5, 538 + msm_mux_mi2s0_data0, 539 + msm_mux_mi2s0_data1, 540 + msm_mux_mi2s0_sck, 541 + msm_mux_mi2s0_ws, 542 + msm_mux_mi2s1_data0, 543 + msm_mux_mi2s1_data1, 544 + msm_mux_mi2s1_sck, 545 + msm_mux_mi2s1_ws, 546 + msm_mux_mi2s2_data0, 547 + msm_mux_mi2s2_data1, 548 + msm_mux_mi2s2_sck, 549 + msm_mux_mi2s2_ws, 550 + msm_mux_mss_grfc0, 551 + msm_mux_mss_grfc1, 552 + msm_mux_mss_grfc10, 553 + msm_mux_mss_grfc11, 554 + msm_mux_mss_grfc12, 555 + msm_mux_mss_grfc2, 556 + msm_mux_mss_grfc3, 557 + msm_mux_mss_grfc4, 558 + msm_mux_mss_grfc5, 559 + msm_mux_mss_grfc6, 560 + msm_mux_mss_grfc7, 561 + msm_mux_mss_grfc8, 562 + msm_mux_mss_grfc9, 563 + msm_mux_nav_gpio0, 564 + msm_mux_nav_gpio1, 565 + msm_mux_nav_gpio2, 566 + msm_mux_pa_indicator, 567 + msm_mux_pcie0_clkreqn, 568 + msm_mux_pcie1_clkreqn, 569 + msm_mux_phase_flag, 570 + msm_mux_pll_bist, 571 + msm_mux_pll_bypassnl, 572 + msm_mux_pll_clk, 573 + msm_mux_pll_reset, 574 + msm_mux_pri_mi2s, 575 + msm_mux_prng_rosc, 576 + msm_mux_qdss, 577 + msm_mux_qdss_cti, 578 + msm_mux_qlink0_enable, 579 + msm_mux_qlink0_request, 580 + msm_mux_qlink0_wmss, 581 + msm_mux_qlink1_enable, 582 + msm_mux_qlink1_request, 583 + msm_mux_qlink1_wmss, 584 + msm_mux_qspi_clk, 585 + msm_mux_qspi_cs, 586 + msm_mux_qspi_data, 587 + msm_mux_qup00, 588 + msm_mux_qup01, 589 + msm_mux_qup02, 590 + msm_mux_qup03, 591 + msm_mux_qup04, 592 + msm_mux_qup05, 593 + msm_mux_qup06, 594 + msm_mux_qup07, 595 + msm_mux_qup10, 596 + msm_mux_qup11, 597 + msm_mux_qup12, 598 + msm_mux_qup13, 599 + msm_mux_qup14, 600 + msm_mux_qup15, 601 + msm_mux_qup16, 602 + msm_mux_qup17, 603 + msm_mux_sd_write, 604 + msm_mux_sdc40, 605 + msm_mux_sdc41, 606 + msm_mux_sdc42, 607 + msm_mux_sdc43, 608 + msm_mux_sdc4_clk, 609 + msm_mux_sdc4_cmd, 610 + msm_mux_sec_mi2s, 611 + msm_mux_tb_trig, 612 + msm_mux_tgu_ch0, 613 + msm_mux_tgu_ch1, 614 + msm_mux_tsense_pwm1, 615 + msm_mux_tsense_pwm2, 616 + msm_mux_uim0_clk, 617 + msm_mux_uim0_data, 618 + msm_mux_uim0_present, 619 + msm_mux_uim0_reset, 620 + msm_mux_uim1_clk, 621 + msm_mux_uim1_data, 622 + msm_mux_uim1_present, 623 + msm_mux_uim1_reset, 624 + msm_mux_usb2phy_ac, 625 + msm_mux_usb_phy, 626 + msm_mux_vfr_0, 627 + msm_mux_vfr_1, 628 + msm_mux_vsense_trigger, 629 + msm_mux__, 630 + }; 631 + 632 + static const char * const gpio_groups[] = { 633 + "gpio0", "gpio1", "gpio2", "gpio3", "gpio4", "gpio5", "gpio6", "gpio7", 634 + "gpio8", "gpio9", "gpio10", "gpio11", "gpio12", "gpio13", "gpio14", 635 + "gpio15", "gpio16", "gpio17", "gpio18", "gpio19", "gpio20", "gpio21", 636 + "gpio22", "gpio23", "gpio24", "gpio25", "gpio26", "gpio27", "gpio28", 637 + "gpio29", "gpio30", "gpio31", "gpio32", "gpio33", "gpio34", "gpio35", 638 + "gpio36", "gpio37", "gpio38", "gpio39", "gpio40", "gpio41", "gpio42", 639 + "gpio43", "gpio44", "gpio45", "gpio46", "gpio47", "gpio48", "gpio49", 640 + "gpio50", "gpio51", "gpio52", "gpio53", "gpio54", "gpio55", "gpio56", 641 + "gpio57", "gpio58", "gpio59", "gpio60", "gpio61", "gpio62", "gpio63", 642 + "gpio64", "gpio65", "gpio66", "gpio67", "gpio68", "gpio69", "gpio70", 643 + "gpio71", "gpio72", "gpio73", "gpio74", "gpio75", "gpio76", "gpio77", 644 + "gpio78", "gpio79", "gpio80", "gpio81", "gpio82", "gpio83", "gpio84", 645 + "gpio85", "gpio86", "gpio87", "gpio88", "gpio89", "gpio90", "gpio91", 646 + "gpio92", "gpio93", "gpio94", "gpio95", "gpio96", "gpio97", "gpio98", 647 + "gpio99", "gpio100", "gpio101", "gpio102", "gpio103", "gpio104", 648 + "gpio105", "gpio106", "gpio107", "gpio108", "gpio109", "gpio110", 649 + "gpio111", "gpio112", "gpio113", "gpio114", "gpio115", "gpio116", 650 + "gpio117", "gpio118", "gpio119", "gpio120", "gpio121", "gpio122", 651 + "gpio123", "gpio124", "gpio125", "gpio126", "gpio127", "gpio128", 652 + "gpio129", "gpio130", "gpio131", "gpio132", "gpio133", "gpio134", 653 + "gpio135", "gpio136", "gpio137", "gpio138", "gpio139", "gpio140", 654 + "gpio141", "gpio142", "gpio143", "gpio144", "gpio145", "gpio146", 655 + "gpio147", "gpio148", "gpio149", "gpio150", "gpio151", "gpio152", 656 + "gpio153", "gpio154", "gpio155", "gpio156", "gpio157", "gpio158", 657 + "gpio159", "gpio160", "gpio161", "gpio162", "gpio163", "gpio164", 658 + "gpio165", "gpio166", "gpio167", "gpio168", "gpio169", "gpio170", 659 + "gpio171", "gpio172", "gpio173", "gpio174", 660 + }; 661 + static const char * const atest_char_groups[] = { 662 + "gpio81", 663 + }; 664 + static const char * const atest_char0_groups[] = { 665 + "gpio77", 666 + }; 667 + static const char * const atest_char1_groups[] = { 668 + "gpio78", 669 + }; 670 + static const char * const atest_char2_groups[] = { 671 + "gpio79", 672 + }; 673 + static const char * const atest_char3_groups[] = { 674 + "gpio80", 675 + }; 676 + static const char * const atest_usb0_groups[] = { 677 + "gpio107", 678 + }; 679 + static const char * const atest_usb00_groups[] = { 680 + "gpio106", 681 + }; 682 + static const char * const atest_usb01_groups[] = { 683 + "gpio105", 684 + }; 685 + static const char * const atest_usb02_groups[] = { 686 + "gpio104", 687 + }; 688 + static const char * const atest_usb03_groups[] = { 689 + "gpio103", 690 + }; 691 + static const char * const atest_usb1_groups[] = { 692 + "gpio81", 693 + }; 694 + static const char * const atest_usb10_groups[] = { 695 + "gpio80", 696 + }; 697 + static const char * const atest_usb11_groups[] = { 698 + "gpio79", 699 + }; 700 + static const char * const atest_usb12_groups[] = { 701 + "gpio78", 702 + }; 703 + static const char * const atest_usb13_groups[] = { 704 + "gpio77", 705 + }; 706 + static const char * const audio_ref_groups[] = { 707 + "gpio105", 708 + }; 709 + static const char * const cam_mclk_groups[] = { 710 + "gpio64", "gpio65", "gpio66", "gpio67", "gpio68", "gpio93", 711 + }; 712 + static const char * const cci_async_groups[] = { 713 + "gpio78", "gpio79", "gpio93", 714 + }; 715 + static const char * const cci_i2c_groups[] = { 716 + "gpio69", "gpio70", "gpio71", "gpio72", "gpio73", "gpio74", "gpio75", 717 + "gpio76", 718 + }; 719 + static const char * const cci_timer0_groups[] = { 720 + "gpio20", 721 + }; 722 + static const char * const cci_timer1_groups[] = { 723 + "gpio21", 724 + }; 725 + static const char * const cci_timer2_groups[] = { 726 + "gpio77", 727 + }; 728 + static const char * const cci_timer3_groups[] = { 729 + "gpio78", 730 + }; 731 + static const char * const cci_timer4_groups[] = { 732 + "gpio79", 733 + }; 734 + static const char * const cmu_rng0_groups[] = { 735 + "gpio120", 736 + }; 737 + static const char * const cmu_rng1_groups[] = { 738 + "gpio119", 739 + }; 740 + static const char * const cmu_rng2_groups[] = { 741 + "gpio118", 742 + }; 743 + static const char * const cmu_rng3_groups[] = { 744 + "gpio117", 745 + }; 746 + static const char * const coex_uart1_groups[] = { 747 + "gpio127", "gpio128", 748 + }; 749 + static const char * const cri_trng_groups[] = { 750 + "gpio124", 751 + }; 752 + static const char * const cri_trng0_groups[] = { 753 + "gpio121", 754 + }; 755 + static const char * const cri_trng1_groups[] = { 756 + "gpio122", 757 + }; 758 + static const char * const dbg_out_groups[] = { 759 + "gpio38", 760 + }; 761 + static const char * const ddr_bist_groups[] = { 762 + "gpio56", "gpio57", "gpio58", "gpio59", 763 + }; 764 + static const char * const ddr_pxi0_groups[] = { 765 + "gpio14", "gpio15", 766 + }; 767 + static const char * const ddr_pxi1_groups[] = { 768 + "gpio12", "gpio13", 769 + }; 770 + static const char * const dp_hot_groups[] = { 771 + "gpio47", 772 + }; 773 + static const char * const dp_lcd_groups[] = { 774 + "gpio81", 775 + }; 776 + static const char * const edp_hot_groups[] = { 777 + "gpio60", 778 + }; 779 + static const char * const edp_lcd_groups[] = { 780 + "gpio46", 781 + }; 782 + static const char * const gcc_gp1_groups[] = { 783 + "gpio76", "gpio105", 784 + }; 785 + static const char * const gcc_gp2_groups[] = { 786 + "gpio77", "gpio106", 787 + }; 788 + static const char * const gcc_gp3_groups[] = { 789 + "gpio78", "gpio107", 790 + }; 791 + static const char * const host2wlan_sol_groups[] = { 792 + "gpio26", 793 + }; 794 + static const char * const ibi_i3c_groups[] = { 795 + "gpio0", "gpio1", "gpio4", "gpio5", "gpio36", "gpio37", 796 + }; 797 + static const char * const jitter_bist_groups[] = { 798 + "gpio79", 799 + }; 800 + static const char * const lpass_slimbus_groups[] = { 801 + "gpio94", "gpio95", 802 + }; 803 + static const char * const mdp_vsync_groups[] = { 804 + "gpio14", "gpio16", "gpio79", "gpio80", "gpio81", 805 + }; 806 + static const char * const mdp_vsync0_groups[] = { 807 + "gpio80", 808 + }; 809 + static const char * const mdp_vsync1_groups[] = { 810 + "gpio80", 811 + }; 812 + static const char * const mdp_vsync2_groups[] = { 813 + "gpio81", 814 + }; 815 + static const char * const mdp_vsync3_groups[] = { 816 + "gpio81", 817 + }; 818 + static const char * const mdp_vsync4_groups[] = { 819 + "gpio80", 820 + }; 821 + static const char * const mdp_vsync5_groups[] = { 822 + "gpio81", 823 + }; 824 + static const char * const mi2s0_data0_groups[] = { 825 + "gpio98", 826 + }; 827 + static const char * const mi2s0_data1_groups[] = { 828 + "gpio99", 829 + }; 830 + static const char * const mi2s0_sck_groups[] = { 831 + "gpio97", 832 + }; 833 + static const char * const mi2s0_ws_groups[] = { 834 + "gpio100", 835 + }; 836 + static const char * const mi2s1_data0_groups[] = { 837 + "gpio107", 838 + }; 839 + static const char * const mi2s1_data1_groups[] = { 840 + "gpio105", 841 + }; 842 + static const char * const mi2s1_sck_groups[] = { 843 + "gpio106", 844 + }; 845 + static const char * const mi2s1_ws_groups[] = { 846 + "gpio108", 847 + }; 848 + static const char * const mi2s2_data0_groups[] = { 849 + "gpio102", 850 + }; 851 + static const char * const mi2s2_data1_groups[] = { 852 + "gpio104", 853 + }; 854 + static const char * const mi2s2_sck_groups[] = { 855 + "gpio101", 856 + }; 857 + static const char * const mi2s2_ws_groups[] = { 858 + "gpio103", 859 + }; 860 + static const char * const mss_grfc0_groups[] = { 861 + "gpio117", "gpio132", 862 + }; 863 + static const char * const mss_grfc1_groups[] = { 864 + "gpio118", 865 + }; 866 + static const char * const mss_grfc10_groups[] = { 867 + "gpio127", 868 + }; 869 + static const char * const mss_grfc11_groups[] = { 870 + "gpio128", 871 + }; 872 + static const char * const mss_grfc12_groups[] = { 873 + "gpio131", 874 + }; 875 + static const char * const mss_grfc2_groups[] = { 876 + "gpio119", 877 + }; 878 + static const char * const mss_grfc3_groups[] = { 879 + "gpio120", 880 + }; 881 + static const char * const mss_grfc4_groups[] = { 882 + "gpio121", 883 + }; 884 + static const char * const mss_grfc5_groups[] = { 885 + "gpio122", 886 + }; 887 + static const char * const mss_grfc6_groups[] = { 888 + "gpio123", 889 + }; 890 + static const char * const mss_grfc7_groups[] = { 891 + "gpio124", 892 + }; 893 + static const char * const mss_grfc8_groups[] = { 894 + "gpio125", 895 + }; 896 + static const char * const mss_grfc9_groups[] = { 897 + "gpio126", 898 + }; 899 + static const char * const nav_gpio0_groups[] = { 900 + "gpio129", 901 + }; 902 + static const char * const nav_gpio1_groups[] = { 903 + "gpio130", 904 + }; 905 + static const char * const nav_gpio2_groups[] = { 906 + "gpio131", 907 + }; 908 + static const char * const pa_indicator_groups[] = { 909 + "gpio131", 910 + }; 911 + static const char * const pcie0_clkreqn_groups[] = { 912 + "gpio88", 913 + }; 914 + static const char * const pcie1_clkreqn_groups[] = { 915 + "gpio79", 916 + }; 917 + static const char * const phase_flag_groups[] = { 918 + "gpio12", "gpio13", "gpio14", "gpio15", "gpio16", 919 + "gpio17", "gpio18", "gpio19", "gpio56", "gpio57", 920 + "gpio58", "gpio59", "gpio60", "gpio61", "gpio62", 921 + "gpio63", "gpio117", "gpio118", "gpio119", "gpio120", 922 + "gpio121", "gpio122", "gpio123", "gpio124", "gpio125", 923 + "gpio126", "gpio127", "gpio128", "gpio129", "gpio130", 924 + "gpio131", "gpio132", 925 + }; 926 + static const char * const pll_bist_groups[] = { 927 + "gpio80", 928 + }; 929 + static const char * const pll_bypassnl_groups[] = { 930 + "gpio66", 931 + }; 932 + static const char * const pll_clk_groups[] = { 933 + "gpio140", 934 + }; 935 + static const char * const pll_reset_groups[] = { 936 + "gpio67", 937 + }; 938 + static const char * const pri_mi2s_groups[] = { 939 + "gpio96", 940 + }; 941 + static const char * const prng_rosc_groups[] = { 942 + "gpio123", 943 + }; 944 + static const char * const qdss_groups[] = { 945 + "gpio2", "gpio3", "gpio8", "gpio9", "gpio10", 946 + "gpio11", "gpio12", "gpio13", "gpio20", "gpio21", 947 + "gpio22", "gpio23", "gpio24", "gpio25", "gpio26", 948 + "gpio27", "gpio28", "gpio29", "gpio58", "gpio59", 949 + "gpio101", "gpio102", "gpio103", "gpio104", "gpio105", 950 + "gpio106", "gpio107", "gpio108", "gpio150", "gpio151", 951 + "gpio152", "gpio153", "gpio171", "gpio172", "gpio173", 952 + "gpio174", 953 + }; 954 + static const char * const qdss_cti_groups[] = { 955 + "gpio15", "gpio16", "gpio18", "gpio19", "gpio156", "gpio157", 956 + "gpio165", "gpio166", 957 + }; 958 + static const char * const qlink0_enable_groups[] = { 959 + "gpio134", 960 + }; 961 + static const char * const qlink0_request_groups[] = { 962 + "gpio133", 963 + }; 964 + static const char * const qlink0_wmss_groups[] = { 965 + "gpio135", 966 + }; 967 + static const char * const qlink1_enable_groups[] = { 968 + "gpio137", 969 + }; 970 + static const char * const qlink1_request_groups[] = { 971 + "gpio136", 972 + }; 973 + static const char * const qlink1_wmss_groups[] = { 974 + "gpio138", 975 + }; 976 + static const char * const qspi_clk_groups[] = { 977 + "gpio14", 978 + }; 979 + static const char * const qspi_cs_groups[] = { 980 + "gpio15", "gpio19", 981 + }; 982 + static const char * const qspi_data_groups[] = { 983 + "gpio12", "gpio13", "gpio16", "gpio17", 984 + }; 985 + static const char * const qup00_groups[] = { 986 + "gpio0", "gpio1", "gpio2", "gpio3", 987 + }; 988 + static const char * const qup01_groups[] = { 989 + "gpio4", "gpio5", "gpio6", "gpio7", 990 + }; 991 + static const char * const qup02_groups[] = { 992 + "gpio8", "gpio9", "gpio10", "gpio11", 993 + }; 994 + static const char * const qup03_groups[] = { 995 + "gpio12", "gpio13", "gpio14", "gpio15", 996 + }; 997 + static const char * const qup04_groups[] = { 998 + "gpio16", "gpio17", "gpio18", "gpio19", 999 + }; 1000 + static const char * const qup05_groups[] = { 1001 + "gpio20", "gpio21", "gpio22", "gpio23", 1002 + }; 1003 + static const char * const qup06_groups[] = { 1004 + "gpio24", "gpio25", "gpio26", "gpio27", 1005 + }; 1006 + static const char * const qup07_groups[] = { 1007 + "gpio2", "gpio3", "gpio6", "gpio28", "gpio29", "gpio30", "gpio31", 1008 + }; 1009 + static const char * const qup10_groups[] = { 1010 + "gpio32", "gpio33", "gpio34", "gpio35", 1011 + }; 1012 + static const char * const qup11_groups[] = { 1013 + "gpio36", "gpio37", "gpio38", "gpio39", 1014 + }; 1015 + static const char * const qup12_groups[] = { 1016 + "gpio40", "gpio41", "gpio42", "gpio43", 1017 + }; 1018 + static const char * const qup13_groups[] = { 1019 + "gpio44", "gpio45", "gpio46", "gpio47", 1020 + }; 1021 + static const char * const qup14_groups[] = { 1022 + "gpio38", "gpio48", "gpio49", "gpio50", "gpio51", "gpio54", "gpio55", 1023 + }; 1024 + static const char * const qup15_groups[] = { 1025 + "gpio52", "gpio53", "gpio54", "gpio55", 1026 + }; 1027 + static const char * const qup16_groups[] = { 1028 + "gpio50", "gpio56", "gpio57", "gpio58", "gpio59", "gpio62", "gpio63", 1029 + }; 1030 + static const char * const qup17_groups[] = { 1031 + "gpio60", "gpio61", "gpio62", "gpio63", 1032 + }; 1033 + static const char * const sd_write_groups[] = { 1034 + "gpio61", 1035 + }; 1036 + static const char * const sdc40_groups[] = { 1037 + "gpio12", 1038 + }; 1039 + static const char * const sdc41_groups[] = { 1040 + "gpio13", 1041 + }; 1042 + static const char * const sdc42_groups[] = { 1043 + "gpio16", 1044 + }; 1045 + static const char * const sdc43_groups[] = { 1046 + "gpio17", 1047 + }; 1048 + static const char * const sdc4_clk_groups[] = { 1049 + "gpio14", 1050 + }; 1051 + static const char * const sdc4_cmd_groups[] = { 1052 + "gpio19", 1053 + }; 1054 + static const char * const sec_mi2s_groups[] = { 1055 + "gpio105", 1056 + }; 1057 + static const char * const tb_trig_groups[] = { 1058 + "gpio12", "gpio13", "gpio15", 1059 + }; 1060 + static const char * const tgu_ch0_groups[] = { 1061 + "gpio65", 1062 + }; 1063 + static const char * const tgu_ch1_groups[] = { 1064 + "gpio66", 1065 + }; 1066 + static const char * const tsense_pwm1_groups[] = { 1067 + "gpio61", 1068 + }; 1069 + static const char * const tsense_pwm2_groups[] = { 1070 + "gpio61", 1071 + }; 1072 + static const char * const uim0_clk_groups[] = { 1073 + "gpio114", 1074 + }; 1075 + static const char * const uim0_data_groups[] = { 1076 + "gpio113", 1077 + }; 1078 + static const char * const uim0_present_groups[] = { 1079 + "gpio116", 1080 + }; 1081 + static const char * const uim0_reset_groups[] = { 1082 + "gpio115", 1083 + }; 1084 + static const char * const uim1_clk_groups[] = { 1085 + "gpio110", 1086 + }; 1087 + static const char * const uim1_data_groups[] = { 1088 + "gpio109", 1089 + }; 1090 + static const char * const uim1_present_groups[] = { 1091 + "gpio112", 1092 + }; 1093 + static const char * const uim1_reset_groups[] = { 1094 + "gpio111", 1095 + }; 1096 + static const char * const usb2phy_ac_groups[] = { 1097 + "gpio84", "gpio85", 1098 + }; 1099 + static const char * const usb_phy_groups[] = { 1100 + "gpio140", 1101 + }; 1102 + static const char * const vfr_0_groups[] = { 1103 + "gpio80", 1104 + }; 1105 + static const char * const vfr_1_groups[] = { 1106 + "gpio103", 1107 + }; 1108 + static const char * const vsense_trigger_groups[] = { 1109 + "gpio100", 1110 + }; 1111 + 1112 + static const struct msm_function sc7280_functions[] = { 1113 + FUNCTION(atest_char), 1114 + FUNCTION(atest_char0), 1115 + FUNCTION(atest_char1), 1116 + FUNCTION(atest_char2), 1117 + FUNCTION(atest_char3), 1118 + FUNCTION(atest_usb0), 1119 + FUNCTION(atest_usb00), 1120 + FUNCTION(atest_usb01), 1121 + FUNCTION(atest_usb02), 1122 + FUNCTION(atest_usb03), 1123 + FUNCTION(atest_usb1), 1124 + FUNCTION(atest_usb10), 1125 + FUNCTION(atest_usb11), 1126 + FUNCTION(atest_usb12), 1127 + FUNCTION(atest_usb13), 1128 + FUNCTION(audio_ref), 1129 + FUNCTION(cam_mclk), 1130 + FUNCTION(cci_async), 1131 + FUNCTION(cci_i2c), 1132 + FUNCTION(cci_timer0), 1133 + FUNCTION(cci_timer1), 1134 + FUNCTION(cci_timer2), 1135 + FUNCTION(cci_timer3), 1136 + FUNCTION(cci_timer4), 1137 + FUNCTION(cmu_rng0), 1138 + FUNCTION(cmu_rng1), 1139 + FUNCTION(cmu_rng2), 1140 + FUNCTION(cmu_rng3), 1141 + FUNCTION(coex_uart1), 1142 + FUNCTION(cri_trng), 1143 + FUNCTION(cri_trng0), 1144 + FUNCTION(cri_trng1), 1145 + FUNCTION(dbg_out), 1146 + FUNCTION(ddr_bist), 1147 + FUNCTION(ddr_pxi0), 1148 + FUNCTION(ddr_pxi1), 1149 + FUNCTION(dp_hot), 1150 + FUNCTION(dp_lcd), 1151 + FUNCTION(edp_hot), 1152 + FUNCTION(edp_lcd), 1153 + FUNCTION(gcc_gp1), 1154 + FUNCTION(gcc_gp2), 1155 + FUNCTION(gcc_gp3), 1156 + FUNCTION(gpio), 1157 + FUNCTION(host2wlan_sol), 1158 + FUNCTION(ibi_i3c), 1159 + FUNCTION(jitter_bist), 1160 + FUNCTION(lpass_slimbus), 1161 + FUNCTION(mdp_vsync), 1162 + FUNCTION(mdp_vsync0), 1163 + FUNCTION(mdp_vsync1), 1164 + FUNCTION(mdp_vsync2), 1165 + FUNCTION(mdp_vsync3), 1166 + FUNCTION(mdp_vsync4), 1167 + FUNCTION(mdp_vsync5), 1168 + FUNCTION(mi2s0_data0), 1169 + FUNCTION(mi2s0_data1), 1170 + FUNCTION(mi2s0_sck), 1171 + FUNCTION(mi2s0_ws), 1172 + FUNCTION(mi2s1_data0), 1173 + FUNCTION(mi2s1_data1), 1174 + FUNCTION(mi2s1_sck), 1175 + FUNCTION(mi2s1_ws), 1176 + FUNCTION(mi2s2_data0), 1177 + FUNCTION(mi2s2_data1), 1178 + FUNCTION(mi2s2_sck), 1179 + FUNCTION(mi2s2_ws), 1180 + FUNCTION(mss_grfc0), 1181 + FUNCTION(mss_grfc1), 1182 + FUNCTION(mss_grfc10), 1183 + FUNCTION(mss_grfc11), 1184 + FUNCTION(mss_grfc12), 1185 + FUNCTION(mss_grfc2), 1186 + FUNCTION(mss_grfc3), 1187 + FUNCTION(mss_grfc4), 1188 + FUNCTION(mss_grfc5), 1189 + FUNCTION(mss_grfc6), 1190 + FUNCTION(mss_grfc7), 1191 + FUNCTION(mss_grfc8), 1192 + FUNCTION(mss_grfc9), 1193 + FUNCTION(nav_gpio0), 1194 + FUNCTION(nav_gpio1), 1195 + FUNCTION(nav_gpio2), 1196 + FUNCTION(pa_indicator), 1197 + FUNCTION(pcie0_clkreqn), 1198 + FUNCTION(pcie1_clkreqn), 1199 + FUNCTION(phase_flag), 1200 + FUNCTION(pll_bist), 1201 + FUNCTION(pll_bypassnl), 1202 + FUNCTION(pll_clk), 1203 + FUNCTION(pll_reset), 1204 + FUNCTION(pri_mi2s), 1205 + FUNCTION(prng_rosc), 1206 + FUNCTION(qdss), 1207 + FUNCTION(qdss_cti), 1208 + FUNCTION(qlink0_enable), 1209 + FUNCTION(qlink0_request), 1210 + FUNCTION(qlink0_wmss), 1211 + FUNCTION(qlink1_enable), 1212 + FUNCTION(qlink1_request), 1213 + FUNCTION(qlink1_wmss), 1214 + FUNCTION(qspi_clk), 1215 + FUNCTION(qspi_cs), 1216 + FUNCTION(qspi_data), 1217 + FUNCTION(qup00), 1218 + FUNCTION(qup01), 1219 + FUNCTION(qup02), 1220 + FUNCTION(qup03), 1221 + FUNCTION(qup04), 1222 + FUNCTION(qup05), 1223 + FUNCTION(qup06), 1224 + FUNCTION(qup07), 1225 + FUNCTION(qup10), 1226 + FUNCTION(qup11), 1227 + FUNCTION(qup12), 1228 + FUNCTION(qup13), 1229 + FUNCTION(qup14), 1230 + FUNCTION(qup15), 1231 + FUNCTION(qup16), 1232 + FUNCTION(qup17), 1233 + FUNCTION(sdc40), 1234 + FUNCTION(sdc41), 1235 + FUNCTION(sdc42), 1236 + FUNCTION(sdc43), 1237 + FUNCTION(sdc4_clk), 1238 + FUNCTION(sdc4_cmd), 1239 + FUNCTION(sd_write), 1240 + FUNCTION(sec_mi2s), 1241 + FUNCTION(tb_trig), 1242 + FUNCTION(tgu_ch0), 1243 + FUNCTION(tgu_ch1), 1244 + FUNCTION(tsense_pwm1), 1245 + FUNCTION(tsense_pwm2), 1246 + FUNCTION(uim0_clk), 1247 + FUNCTION(uim0_data), 1248 + FUNCTION(uim0_present), 1249 + FUNCTION(uim0_reset), 1250 + FUNCTION(uim1_clk), 1251 + FUNCTION(uim1_data), 1252 + FUNCTION(uim1_present), 1253 + FUNCTION(uim1_reset), 1254 + FUNCTION(usb2phy_ac), 1255 + FUNCTION(usb_phy), 1256 + FUNCTION(vfr_0), 1257 + FUNCTION(vfr_1), 1258 + FUNCTION(vsense_trigger), 1259 + }; 1260 + 1261 + /* Every pin is maintained as a single group, and missing or non-existing pin 1262 + * would be maintained as dummy group to synchronize pin group index with 1263 + * pin descriptor registered with pinctrl core. 1264 + * Clients would not be able to request these dummy pin groups. 1265 + */ 1266 + static const struct msm_pingroup sc7280_groups[] = { 1267 + [0] = PINGROUP(0, qup00, ibi_i3c, _, _, _, _, _, _, _), 1268 + [1] = PINGROUP(1, qup00, ibi_i3c, _, _, _, _, _, _, _), 1269 + [2] = PINGROUP(2, qup00, qup07, _, qdss, _, _, _, _, _), 1270 + [3] = PINGROUP(3, qup00, qup07, _, qdss, _, _, _, _, _), 1271 + [4] = PINGROUP(4, qup01, ibi_i3c, _, _, _, _, _, _, _), 1272 + [5] = PINGROUP(5, qup01, ibi_i3c, _, _, _, _, _, _, _), 1273 + [6] = PINGROUP(6, qup01, qup07, _, _, _, _, _, _, _), 1274 + [7] = PINGROUP(7, qup01, _, _, _, _, _, _, _, _), 1275 + [8] = PINGROUP(8, qup02, _, qdss, _, _, _, _, _, _), 1276 + [9] = PINGROUP(9, qup02, _, qdss, _, _, _, _, _, _), 1277 + [10] = PINGROUP(10, qup02, _, qdss, _, _, _, _, _, _), 1278 + [11] = PINGROUP(11, qup02, _, qdss, _, _, _, _, _, _), 1279 + [12] = PINGROUP(12, qup03, qspi_data, sdc40, tb_trig, phase_flag, qdss, ddr_pxi1, _, _), 1280 + [13] = PINGROUP(13, qup03, qspi_data, sdc41, tb_trig, phase_flag, qdss, ddr_pxi1, _, _), 1281 + [14] = PINGROUP(14, qup03, qspi_clk, sdc4_clk, mdp_vsync, phase_flag, ddr_pxi0, _, _, _), 1282 + [15] = PINGROUP(15, qup03, qspi_cs, tb_trig, phase_flag, qdss_cti, ddr_pxi0, _, _, _), 1283 + [16] = PINGROUP(16, qup04, qspi_data, sdc42, mdp_vsync, phase_flag, qdss_cti, _, _, _), 1284 + [17] = PINGROUP(17, qup04, qspi_data, sdc43, _, phase_flag, _, _, _, _), 1285 + [18] = PINGROUP(18, qup04, _, phase_flag, qdss_cti, _, _, _, _, _), 1286 + [19] = PINGROUP(19, qup04, qspi_cs, sdc4_cmd, _, phase_flag, qdss_cti, _, _, _), 1287 + [20] = PINGROUP(20, qup05, cci_timer0, _, qdss, _, _, _, _, _), 1288 + [21] = PINGROUP(21, qup05, cci_timer1, _, qdss, _, _, _, _, _), 1289 + [22] = PINGROUP(22, qup05, _, qdss, _, _, _, _, _, _), 1290 + [23] = PINGROUP(23, qup05, _, qdss, _, _, _, _, _, _), 1291 + [24] = PINGROUP(24, qup06, _, qdss, _, _, _, _, _, _), 1292 + [25] = PINGROUP(25, qup06, _, qdss, _, _, _, _, _, _), 1293 + [26] = PINGROUP(26, qup06, host2wlan_sol, _, qdss, _, _, _, _, _), 1294 + [27] = PINGROUP(27, qup06, _, qdss, _, _, _, _, _, _), 1295 + [28] = PINGROUP(28, qup07, _, qdss, _, _, _, _, _, _), 1296 + [29] = PINGROUP(29, qup07, qdss, _, _, _, _, _, _, _), 1297 + [30] = PINGROUP(30, qup07, _, _, _, _, _, _, _, _), 1298 + [31] = PINGROUP(31, qup07, _, _, _, _, _, _, _, _), 1299 + [32] = PINGROUP(32, qup10, _, _, _, _, _, _, _, _), 1300 + [33] = PINGROUP(33, qup10, _, _, _, _, _, _, _, _), 1301 + [34] = PINGROUP(34, qup10, _, _, _, _, _, _, _, _), 1302 + [35] = PINGROUP(35, qup10, _, _, _, _, _, _, _, _), 1303 + [36] = PINGROUP(36, qup11, ibi_i3c, _, _, _, _, _, _, _), 1304 + [37] = PINGROUP(37, qup11, ibi_i3c, _, _, _, _, _, _, _), 1305 + [38] = PINGROUP(38, qup11, qup14, dbg_out, _, _, _, _, _, _), 1306 + [39] = PINGROUP(39, qup11, _, _, _, _, _, _, _, _), 1307 + [40] = PINGROUP(40, qup12, _, _, _, _, _, _, _, _), 1308 + [41] = PINGROUP(41, qup12, _, _, _, _, _, _, _, _), 1309 + [42] = PINGROUP(42, qup12, _, _, _, _, _, _, _, _), 1310 + [43] = PINGROUP(43, qup12, _, _, _, _, _, _, _, _), 1311 + [44] = PINGROUP(44, qup13, _, _, _, _, _, _, _, _), 1312 + [45] = PINGROUP(45, qup13, _, _, _, _, _, _, _, _), 1313 + [46] = PINGROUP(46, qup13, edp_lcd, _, _, _, _, _, _, _), 1314 + [47] = PINGROUP(47, qup13, dp_hot, _, _, _, _, _, _, _), 1315 + [48] = PINGROUP(48, qup14, _, _, _, _, _, _, _, _), 1316 + [49] = PINGROUP(49, qup14, _, _, _, _, _, _, _, _), 1317 + [50] = PINGROUP(50, qup14, qup16, _, _, _, _, _, _, _), 1318 + [51] = PINGROUP(51, qup14, _, _, _, _, _, _, _, _), 1319 + [52] = PINGROUP(52, qup15, _, _, _, _, _, _, _, _), 1320 + [53] = PINGROUP(53, qup15, _, _, _, _, _, _, _, _), 1321 + [54] = PINGROUP(54, qup15, qup14, _, _, _, _, _, _, _), 1322 + [55] = PINGROUP(55, qup15, qup14, _, _, _, _, _, _, _), 1323 + [56] = PINGROUP(56, qup16, ddr_bist, phase_flag, _, _, _, _, _, _), 1324 + [57] = PINGROUP(57, qup16, ddr_bist, phase_flag, _, _, _, _, _, _), 1325 + [58] = PINGROUP(58, qup16, ddr_bist, phase_flag, qdss, _, _, _, _, _), 1326 + [59] = PINGROUP(59, qup16, ddr_bist, phase_flag, qdss, _, _, _, _, _), 1327 + [60] = PINGROUP(60, qup17, edp_hot, _, phase_flag, _, _, _, _, _), 1328 + [61] = PINGROUP(61, qup17, sd_write, phase_flag, tsense_pwm1, tsense_pwm2, _, _, _, _), 1329 + [62] = PINGROUP(62, qup17, qup16, phase_flag, _, _, _, _, _, _), 1330 + [63] = PINGROUP(63, qup17, qup16, phase_flag, _, _, _, _, _, _), 1331 + [64] = PINGROUP(64, cam_mclk, _, _, _, _, _, _, _, _), 1332 + [65] = PINGROUP(65, cam_mclk, tgu_ch0, _, _, _, _, _, _, _), 1333 + [66] = PINGROUP(66, cam_mclk, pll_bypassnl, tgu_ch1, _, _, _, _, _, _), 1334 + [67] = PINGROUP(67, cam_mclk, pll_reset, _, _, _, _, _, _, _), 1335 + [68] = PINGROUP(68, cam_mclk, _, _, _, _, _, _, _, _), 1336 + [69] = PINGROUP(69, cci_i2c, _, _, _, _, _, _, _, _), 1337 + [70] = PINGROUP(70, cci_i2c, _, _, _, _, _, _, _, _), 1338 + [71] = PINGROUP(71, cci_i2c, _, _, _, _, _, _, _, _), 1339 + [72] = PINGROUP(72, cci_i2c, _, _, _, _, _, _, _, _), 1340 + [73] = PINGROUP(73, cci_i2c, _, _, _, _, _, _, _, _), 1341 + [74] = PINGROUP(74, cci_i2c, _, _, _, _, _, _, _, _), 1342 + [75] = PINGROUP(75, cci_i2c, _, _, _, _, _, _, _, _), 1343 + [76] = PINGROUP(76, cci_i2c, gcc_gp1, _, _, _, _, _, _, _), 1344 + [77] = PINGROUP(77, cci_timer2, gcc_gp2, _, atest_usb13, atest_char0, _, _, _, _), 1345 + [78] = PINGROUP(78, cci_timer3, cci_async, gcc_gp3, _, atest_usb12, atest_char1, _, _, _), 1346 + [79] = PINGROUP(79, cci_timer4, cci_async, pcie1_clkreqn, mdp_vsync, jitter_bist, atest_usb11, atest_char2, _, _), 1347 + [80] = PINGROUP(80, mdp_vsync, vfr_0, mdp_vsync0, mdp_vsync1, mdp_vsync4, pll_bist, atest_usb10, atest_char3, _), 1348 + [81] = PINGROUP(81, mdp_vsync, dp_lcd, mdp_vsync2, mdp_vsync3, mdp_vsync5, atest_usb1, atest_char, _, _), 1349 + [82] = PINGROUP(82, _, _, _, _, _, _, _, _, _), 1350 + [83] = PINGROUP(83, _, _, _, _, _, _, _, _, _), 1351 + [84] = PINGROUP(84, usb2phy_ac, _, _, _, _, _, _, _, _), 1352 + [85] = PINGROUP(85, usb2phy_ac, _, _, _, _, _, _, _, _), 1353 + [86] = PINGROUP(86, _, _, _, _, _, _, _, _, _), 1354 + [87] = PINGROUP(87, _, _, _, _, _, _, _, _, _), 1355 + [88] = PINGROUP(88, pcie0_clkreqn, _, _, _, _, _, _, _, _), 1356 + [89] = PINGROUP(89, _, _, _, _, _, _, _, _, _), 1357 + [90] = PINGROUP(90, _, _, _, _, _, _, _, _, _), 1358 + [91] = PINGROUP(91, _, _, _, _, _, _, _, _, _), 1359 + [92] = PINGROUP(92, _, _, _, _, _, _, _, _, _), 1360 + [93] = PINGROUP(93, cam_mclk, cci_async, _, _, _, _, _, _, _), 1361 + [94] = PINGROUP(94, lpass_slimbus, _, _, _, _, _, _, _, _), 1362 + [95] = PINGROUP(95, lpass_slimbus, _, _, _, _, _, _, _, _), 1363 + [96] = PINGROUP(96, pri_mi2s, _, _, _, _, _, _, _, _), 1364 + [97] = PINGROUP(97, mi2s0_sck, _, _, _, _, _, _, _, _), 1365 + [98] = PINGROUP(98, mi2s0_data0, _, _, _, _, _, _, _, _), 1366 + [99] = PINGROUP(99, mi2s0_data1, _, _, _, _, _, _, _, _), 1367 + [100] = PINGROUP(100, mi2s0_ws, _, vsense_trigger, _, _, _, _, _, _), 1368 + [101] = PINGROUP(101, mi2s2_sck, _, qdss, _, _, _, _, _, _), 1369 + [102] = PINGROUP(102, mi2s2_data0, _, _, qdss, _, _, _, _, _), 1370 + [103] = PINGROUP(103, mi2s2_ws, vfr_1, _, _, qdss, _, atest_usb03, _, _), 1371 + [104] = PINGROUP(104, mi2s2_data1, _, _, qdss, _, atest_usb02, _, _, _), 1372 + [105] = PINGROUP(105, sec_mi2s, mi2s1_data1, audio_ref, gcc_gp1, _, qdss, atest_usb01, _, _), 1373 + [106] = PINGROUP(106, mi2s1_sck, gcc_gp2, _, qdss, atest_usb00, _, _, _, _), 1374 + [107] = PINGROUP(107, mi2s1_data0, gcc_gp3, _, qdss, atest_usb0, _, _, _, _), 1375 + [108] = PINGROUP(108, mi2s1_ws, _, qdss, _, _, _, _, _, _), 1376 + [109] = PINGROUP(109, uim1_data, _, _, _, _, _, _, _, _), 1377 + [110] = PINGROUP(110, uim1_clk, _, _, _, _, _, _, _, _), 1378 + [111] = PINGROUP(111, uim1_reset, _, _, _, _, _, _, _, _), 1379 + [112] = PINGROUP(112, uim1_present, _, _, _, _, _, _, _, _), 1380 + [113] = PINGROUP(113, uim0_data, _, _, _, _, _, _, _, _), 1381 + [114] = PINGROUP(114, uim0_clk, _, _, _, _, _, _, _, _), 1382 + [115] = PINGROUP(115, uim0_reset, _, _, _, _, _, _, _, _), 1383 + [116] = PINGROUP(116, uim0_present, _, _, _, _, _, _, _, _), 1384 + [117] = PINGROUP(117, _, mss_grfc0, cmu_rng3, phase_flag, _, _, _, _, _), 1385 + [118] = PINGROUP(118, _, mss_grfc1, cmu_rng2, phase_flag, _, _, _, _, _), 1386 + [119] = PINGROUP(119, _, mss_grfc2, cmu_rng1, phase_flag, _, _, _, _, _), 1387 + [120] = PINGROUP(120, _, mss_grfc3, cmu_rng0, phase_flag, _, _, _, _, _), 1388 + [121] = PINGROUP(121, _, mss_grfc4, cri_trng0, phase_flag, _, _, _, _, _), 1389 + [122] = PINGROUP(122, _, mss_grfc5, cri_trng1, phase_flag, _, _, _, _, _), 1390 + [123] = PINGROUP(123, _, mss_grfc6, prng_rosc, phase_flag, _, _, _, _, _), 1391 + [124] = PINGROUP(124, _, mss_grfc7, cri_trng, phase_flag, _, _, _, _, _), 1392 + [125] = PINGROUP(125, _, mss_grfc8, phase_flag, _, _, _, _, _, _), 1393 + [126] = PINGROUP(126, _, mss_grfc9, phase_flag, _, _, _, _, _, _), 1394 + [127] = PINGROUP(127, coex_uart1, mss_grfc10, phase_flag, _, _, _, _, _, _), 1395 + [128] = PINGROUP(128, coex_uart1, mss_grfc11, phase_flag, _, _, _, _, _, _), 1396 + [129] = PINGROUP(129, nav_gpio0, phase_flag, _, _, _, _, _, _, _), 1397 + [130] = PINGROUP(130, nav_gpio1, phase_flag, _, _, _, _, _, _, _), 1398 + [131] = PINGROUP(131, mss_grfc12, nav_gpio2, pa_indicator, phase_flag, _, _, _, _, _), 1399 + [132] = PINGROUP(132, mss_grfc0, phase_flag, _, _, _, _, _, _, _), 1400 + [133] = PINGROUP(133, qlink0_request, _, _, _, _, _, _, _, _), 1401 + [134] = PINGROUP(134, qlink0_enable, _, _, _, _, _, _, _, _), 1402 + [135] = PINGROUP(135, qlink0_wmss, _, _, _, _, _, _, _, _), 1403 + [136] = PINGROUP(136, qlink1_request, _, _, _, _, _, _, _, _), 1404 + [137] = PINGROUP(137, qlink1_enable, _, _, _, _, _, _, _, _), 1405 + [138] = PINGROUP(138, qlink1_wmss, _, _, _, _, _, _, _, _), 1406 + [139] = PINGROUP(139, _, _, _, _, _, _, _, _, _), 1407 + [140] = PINGROUP(140, usb_phy, pll_clk, _, _, _, _, _, _, _), 1408 + [141] = PINGROUP(141, _, _, _, _, _, _, _, _, _), 1409 + [142] = PINGROUP(142, _, _, _, _, _, _, _, _, _), 1410 + [143] = PINGROUP(143, _, _, _, _, _, _, _, _, _), 1411 + [144] = PINGROUP(144, _, _, _, _, _, _, _, _, _), 1412 + [145] = PINGROUP(145, _, _, _, _, _, _, _, _, _), 1413 + [146] = PINGROUP(146, _, _, _, _, _, _, _, _, _), 1414 + [147] = PINGROUP(147, _, _, _, _, _, _, _, _, _), 1415 + [148] = PINGROUP(148, _, _, _, _, _, _, _, _, _), 1416 + [149] = PINGROUP(149, _, _, _, _, _, _, _, _, _), 1417 + [150] = PINGROUP(150, qdss, _, _, _, _, _, _, _, _), 1418 + [151] = PINGROUP(151, qdss, _, _, _, _, _, _, _, _), 1419 + [152] = PINGROUP(152, qdss, _, _, _, _, _, _, _, _), 1420 + [153] = PINGROUP(153, qdss, _, _, _, _, _, _, _, _), 1421 + [154] = PINGROUP(154, _, _, _, _, _, _, _, _, _), 1422 + [155] = PINGROUP(155, _, _, _, _, _, _, _, _, _), 1423 + [156] = PINGROUP(156, qdss_cti, _, _, _, _, _, _, _, _), 1424 + [157] = PINGROUP(157, qdss_cti, _, _, _, _, _, _, _, _), 1425 + [158] = PINGROUP(158, _, _, _, _, _, _, _, _, _), 1426 + [159] = PINGROUP(159, _, _, _, _, _, _, _, _, _), 1427 + [160] = PINGROUP(160, _, _, _, _, _, _, _, _, _), 1428 + [161] = PINGROUP(161, _, _, _, _, _, _, _, _, _), 1429 + [162] = PINGROUP(162, _, _, _, _, _, _, _, _, _), 1430 + [163] = PINGROUP(163, _, _, _, _, _, _, _, _, _), 1431 + [164] = PINGROUP(164, _, _, _, _, _, _, _, _, _), 1432 + [165] = PINGROUP(165, qdss_cti, _, _, _, _, _, _, _, _), 1433 + [166] = PINGROUP(166, qdss_cti, _, _, _, _, _, _, _, _), 1434 + [167] = PINGROUP(167, _, _, _, _, _, _, _, _, _), 1435 + [168] = PINGROUP(168, _, _, _, _, _, _, _, _, _), 1436 + [169] = PINGROUP(169, _, _, _, _, _, _, _, _, _), 1437 + [170] = PINGROUP(170, _, _, _, _, _, _, _, _, _), 1438 + [171] = PINGROUP(171, qdss, _, _, _, _, _, _, _, _), 1439 + [172] = PINGROUP(172, qdss, _, _, _, _, _, _, _, _), 1440 + [173] = PINGROUP(173, qdss, _, _, _, _, _, _, _, _), 1441 + [174] = PINGROUP(174, qdss, _, _, _, _, _, _, _, _), 1442 + [175] = UFS_RESET(ufs_reset, 0x1be000), 1443 + [176] = SDC_QDSD_PINGROUP(sdc1_rclk, 0x1b3000, 15, 0), 1444 + [177] = SDC_QDSD_PINGROUP(sdc1_clk, 0x1b3000, 13, 6), 1445 + [178] = SDC_QDSD_PINGROUP(sdc1_cmd, 0x1b3000, 11, 3), 1446 + [179] = SDC_QDSD_PINGROUP(sdc1_data, 0x1b3000, 9, 0), 1447 + [180] = SDC_QDSD_PINGROUP(sdc2_clk, 0x1b4000, 14, 6), 1448 + [181] = SDC_QDSD_PINGROUP(sdc2_cmd, 0x1b4000, 11, 3), 1449 + [182] = SDC_QDSD_PINGROUP(sdc2_data, 0x1b4000, 9, 0), 1450 + }; 1451 + 1452 + static const struct msm_pinctrl_soc_data sc7280_pinctrl = { 1453 + .pins = sc7280_pins, 1454 + .npins = ARRAY_SIZE(sc7280_pins), 1455 + .functions = sc7280_functions, 1456 + .nfunctions = ARRAY_SIZE(sc7280_functions), 1457 + .groups = sc7280_groups, 1458 + .ngroups = ARRAY_SIZE(sc7280_groups), 1459 + .ngpios = 176, 1460 + }; 1461 + 1462 + static int sc7280_pinctrl_probe(struct platform_device *pdev) 1463 + { 1464 + return msm_pinctrl_probe(pdev, &sc7280_pinctrl); 1465 + } 1466 + 1467 + static const struct of_device_id sc7280_pinctrl_of_match[] = { 1468 + { .compatible = "qcom,sc7280-pinctrl", }, 1469 + { }, 1470 + }; 1471 + 1472 + static struct platform_driver sc7280_pinctrl_driver = { 1473 + .driver = { 1474 + .name = "sc7280-pinctrl", 1475 + .of_match_table = sc7280_pinctrl_of_match, 1476 + }, 1477 + .probe = sc7280_pinctrl_probe, 1478 + .remove = msm_pinctrl_remove, 1479 + }; 1480 + 1481 + static int __init sc7280_pinctrl_init(void) 1482 + { 1483 + return platform_driver_register(&sc7280_pinctrl_driver); 1484 + } 1485 + arch_initcall(sc7280_pinctrl_init); 1486 + 1487 + static void __exit sc7280_pinctrl_exit(void) 1488 + { 1489 + platform_driver_unregister(&sc7280_pinctrl_driver); 1490 + } 1491 + module_exit(sc7280_pinctrl_exit); 1492 + 1493 + MODULE_DESCRIPTION("QTI sc7280 pinctrl driver"); 1494 + MODULE_LICENSE("GPL v2"); 1495 + MODULE_DEVICE_TABLE(of, sc7280_pinctrl_of_match);
+1018
drivers/pinctrl/qcom/pinctrl-sdx55.c
··· 1 + // SPDX-License-Identifier: GPL-2.0-only 2 + /* 3 + * Copyright (c) 2018-2020, The Linux Foundation. All rights reserved. 4 + */ 5 + 6 + #include <linux/module.h> 7 + #include <linux/of.h> 8 + #include <linux/platform_device.h> 9 + #include <linux/pinctrl/pinctrl.h> 10 + 11 + #include "pinctrl-msm.h" 12 + 13 + #define FUNCTION(fname) \ 14 + [msm_mux_##fname] = { \ 15 + .name = #fname, \ 16 + .groups = fname##_groups, \ 17 + .ngroups = ARRAY_SIZE(fname##_groups), \ 18 + } 19 + 20 + #define REG_SIZE 0x1000 21 + 22 + #define PINGROUP(id, f1, f2, f3, f4, f5, f6, f7, f8, f9) \ 23 + { \ 24 + .name = "gpio" #id, \ 25 + .pins = gpio##id##_pins, \ 26 + .npins = (unsigned int)ARRAY_SIZE(gpio##id##_pins), \ 27 + .funcs = (int[]){ \ 28 + msm_mux_gpio, /* gpio mode */ \ 29 + msm_mux_##f1, \ 30 + msm_mux_##f2, \ 31 + msm_mux_##f3, \ 32 + msm_mux_##f4, \ 33 + msm_mux_##f5, \ 34 + msm_mux_##f6, \ 35 + msm_mux_##f7, \ 36 + msm_mux_##f8, \ 37 + msm_mux_##f9 \ 38 + }, \ 39 + .nfuncs = 10, \ 40 + .ctl_reg = REG_SIZE * id, \ 41 + .io_reg = 0x4 + REG_SIZE * id, \ 42 + .intr_cfg_reg = 0x8 + REG_SIZE * id, \ 43 + .intr_status_reg = 0xc + REG_SIZE * id, \ 44 + .intr_target_reg = 0x8 + REG_SIZE * id, \ 45 + .mux_bit = 2, \ 46 + .pull_bit = 0, \ 47 + .drv_bit = 6, \ 48 + .oe_bit = 9, \ 49 + .in_bit = 0, \ 50 + .out_bit = 1, \ 51 + .intr_enable_bit = 0, \ 52 + .intr_status_bit = 0, \ 53 + .intr_target_bit = 5, \ 54 + .intr_target_kpss_val = 3, \ 55 + .intr_raw_status_bit = 4, \ 56 + .intr_polarity_bit = 1, \ 57 + .intr_detection_bit = 2, \ 58 + .intr_detection_width = 2, \ 59 + } 60 + 61 + #define SDC_PINGROUP(pg_name, ctl, pull, drv) \ 62 + { \ 63 + .name = #pg_name, \ 64 + .pins = pg_name##_pins, \ 65 + .npins = (unsigned int)ARRAY_SIZE(pg_name##_pins), \ 66 + .ctl_reg = ctl, \ 67 + .io_reg = 0, \ 68 + .intr_cfg_reg = 0, \ 69 + .intr_status_reg = 0, \ 70 + .intr_target_reg = 0, \ 71 + .mux_bit = -1, \ 72 + .pull_bit = pull, \ 73 + .drv_bit = drv, \ 74 + .oe_bit = -1, \ 75 + .in_bit = -1, \ 76 + .out_bit = -1, \ 77 + .intr_enable_bit = -1, \ 78 + .intr_status_bit = -1, \ 79 + .intr_target_bit = -1, \ 80 + .intr_raw_status_bit = -1, \ 81 + .intr_polarity_bit = -1, \ 82 + .intr_detection_bit = -1, \ 83 + .intr_detection_width = -1, \ 84 + } 85 + 86 + static const struct pinctrl_pin_desc sdx55_pins[] = { 87 + PINCTRL_PIN(0, "GPIO_0"), 88 + PINCTRL_PIN(1, "GPIO_1"), 89 + PINCTRL_PIN(2, "GPIO_2"), 90 + PINCTRL_PIN(3, "GPIO_3"), 91 + PINCTRL_PIN(4, "GPIO_4"), 92 + PINCTRL_PIN(5, "GPIO_5"), 93 + PINCTRL_PIN(6, "GPIO_6"), 94 + PINCTRL_PIN(7, "GPIO_7"), 95 + PINCTRL_PIN(8, "GPIO_8"), 96 + PINCTRL_PIN(9, "GPIO_9"), 97 + PINCTRL_PIN(10, "GPIO_10"), 98 + PINCTRL_PIN(11, "GPIO_11"), 99 + PINCTRL_PIN(12, "GPIO_12"), 100 + PINCTRL_PIN(13, "GPIO_13"), 101 + PINCTRL_PIN(14, "GPIO_14"), 102 + PINCTRL_PIN(15, "GPIO_15"), 103 + PINCTRL_PIN(16, "GPIO_16"), 104 + PINCTRL_PIN(17, "GPIO_17"), 105 + PINCTRL_PIN(18, "GPIO_18"), 106 + PINCTRL_PIN(19, "GPIO_19"), 107 + PINCTRL_PIN(20, "GPIO_20"), 108 + PINCTRL_PIN(21, "GPIO_21"), 109 + PINCTRL_PIN(22, "GPIO_22"), 110 + PINCTRL_PIN(23, "GPIO_23"), 111 + PINCTRL_PIN(24, "GPIO_24"), 112 + PINCTRL_PIN(25, "GPIO_25"), 113 + PINCTRL_PIN(26, "GPIO_26"), 114 + PINCTRL_PIN(27, "GPIO_27"), 115 + PINCTRL_PIN(28, "GPIO_28"), 116 + PINCTRL_PIN(29, "GPIO_29"), 117 + PINCTRL_PIN(30, "GPIO_30"), 118 + PINCTRL_PIN(31, "GPIO_31"), 119 + PINCTRL_PIN(32, "GPIO_32"), 120 + PINCTRL_PIN(33, "GPIO_33"), 121 + PINCTRL_PIN(34, "GPIO_34"), 122 + PINCTRL_PIN(35, "GPIO_35"), 123 + PINCTRL_PIN(36, "GPIO_36"), 124 + PINCTRL_PIN(37, "GPIO_37"), 125 + PINCTRL_PIN(38, "GPIO_38"), 126 + PINCTRL_PIN(39, "GPIO_39"), 127 + PINCTRL_PIN(40, "GPIO_40"), 128 + PINCTRL_PIN(41, "GPIO_41"), 129 + PINCTRL_PIN(42, "GPIO_42"), 130 + PINCTRL_PIN(43, "GPIO_43"), 131 + PINCTRL_PIN(44, "GPIO_44"), 132 + PINCTRL_PIN(45, "GPIO_45"), 133 + PINCTRL_PIN(46, "GPIO_46"), 134 + PINCTRL_PIN(47, "GPIO_47"), 135 + PINCTRL_PIN(48, "GPIO_48"), 136 + PINCTRL_PIN(49, "GPIO_49"), 137 + PINCTRL_PIN(50, "GPIO_50"), 138 + PINCTRL_PIN(51, "GPIO_51"), 139 + PINCTRL_PIN(52, "GPIO_52"), 140 + PINCTRL_PIN(53, "GPIO_53"), 141 + PINCTRL_PIN(54, "GPIO_54"), 142 + PINCTRL_PIN(55, "GPIO_55"), 143 + PINCTRL_PIN(56, "GPIO_56"), 144 + PINCTRL_PIN(57, "GPIO_57"), 145 + PINCTRL_PIN(58, "GPIO_58"), 146 + PINCTRL_PIN(59, "GPIO_59"), 147 + PINCTRL_PIN(60, "GPIO_60"), 148 + PINCTRL_PIN(61, "GPIO_61"), 149 + PINCTRL_PIN(62, "GPIO_62"), 150 + PINCTRL_PIN(63, "GPIO_63"), 151 + PINCTRL_PIN(64, "GPIO_64"), 152 + PINCTRL_PIN(65, "GPIO_65"), 153 + PINCTRL_PIN(66, "GPIO_66"), 154 + PINCTRL_PIN(67, "GPIO_67"), 155 + PINCTRL_PIN(68, "GPIO_68"), 156 + PINCTRL_PIN(69, "GPIO_69"), 157 + PINCTRL_PIN(70, "GPIO_70"), 158 + PINCTRL_PIN(71, "GPIO_71"), 159 + PINCTRL_PIN(72, "GPIO_72"), 160 + PINCTRL_PIN(73, "GPIO_73"), 161 + PINCTRL_PIN(74, "GPIO_74"), 162 + PINCTRL_PIN(75, "GPIO_75"), 163 + PINCTRL_PIN(76, "GPIO_76"), 164 + PINCTRL_PIN(77, "GPIO_77"), 165 + PINCTRL_PIN(78, "GPIO_78"), 166 + PINCTRL_PIN(79, "GPIO_79"), 167 + PINCTRL_PIN(80, "GPIO_80"), 168 + PINCTRL_PIN(81, "GPIO_81"), 169 + PINCTRL_PIN(82, "GPIO_82"), 170 + PINCTRL_PIN(83, "GPIO_83"), 171 + PINCTRL_PIN(84, "GPIO_84"), 172 + PINCTRL_PIN(85, "GPIO_85"), 173 + PINCTRL_PIN(86, "GPIO_86"), 174 + PINCTRL_PIN(87, "GPIO_87"), 175 + PINCTRL_PIN(88, "GPIO_88"), 176 + PINCTRL_PIN(89, "GPIO_89"), 177 + PINCTRL_PIN(90, "GPIO_90"), 178 + PINCTRL_PIN(91, "GPIO_91"), 179 + PINCTRL_PIN(92, "GPIO_92"), 180 + PINCTRL_PIN(93, "GPIO_93"), 181 + PINCTRL_PIN(94, "GPIO_94"), 182 + PINCTRL_PIN(95, "GPIO_95"), 183 + PINCTRL_PIN(96, "GPIO_96"), 184 + PINCTRL_PIN(97, "GPIO_97"), 185 + PINCTRL_PIN(98, "GPIO_98"), 186 + PINCTRL_PIN(99, "GPIO_99"), 187 + PINCTRL_PIN(100, "GPIO_100"), 188 + PINCTRL_PIN(101, "GPIO_101"), 189 + PINCTRL_PIN(102, "GPIO_102"), 190 + PINCTRL_PIN(103, "GPIO_103"), 191 + PINCTRL_PIN(104, "GPIO_104"), 192 + PINCTRL_PIN(105, "GPIO_105"), 193 + PINCTRL_PIN(106, "GPIO_106"), 194 + PINCTRL_PIN(107, "GPIO_107"), 195 + PINCTRL_PIN(108, "SDC1_RCLK"), 196 + PINCTRL_PIN(109, "SDC1_CLK"), 197 + PINCTRL_PIN(110, "SDC1_CMD"), 198 + PINCTRL_PIN(111, "SDC1_DATA"), 199 + }; 200 + 201 + #define DECLARE_MSM_GPIO_PINS(pin) \ 202 + static const unsigned int gpio##pin##_pins[] = { pin } 203 + DECLARE_MSM_GPIO_PINS(0); 204 + DECLARE_MSM_GPIO_PINS(1); 205 + DECLARE_MSM_GPIO_PINS(2); 206 + DECLARE_MSM_GPIO_PINS(3); 207 + DECLARE_MSM_GPIO_PINS(4); 208 + DECLARE_MSM_GPIO_PINS(5); 209 + DECLARE_MSM_GPIO_PINS(6); 210 + DECLARE_MSM_GPIO_PINS(7); 211 + DECLARE_MSM_GPIO_PINS(8); 212 + DECLARE_MSM_GPIO_PINS(9); 213 + DECLARE_MSM_GPIO_PINS(10); 214 + DECLARE_MSM_GPIO_PINS(11); 215 + DECLARE_MSM_GPIO_PINS(12); 216 + DECLARE_MSM_GPIO_PINS(13); 217 + DECLARE_MSM_GPIO_PINS(14); 218 + DECLARE_MSM_GPIO_PINS(15); 219 + DECLARE_MSM_GPIO_PINS(16); 220 + DECLARE_MSM_GPIO_PINS(17); 221 + DECLARE_MSM_GPIO_PINS(18); 222 + DECLARE_MSM_GPIO_PINS(19); 223 + DECLARE_MSM_GPIO_PINS(20); 224 + DECLARE_MSM_GPIO_PINS(21); 225 + DECLARE_MSM_GPIO_PINS(22); 226 + DECLARE_MSM_GPIO_PINS(23); 227 + DECLARE_MSM_GPIO_PINS(24); 228 + DECLARE_MSM_GPIO_PINS(25); 229 + DECLARE_MSM_GPIO_PINS(26); 230 + DECLARE_MSM_GPIO_PINS(27); 231 + DECLARE_MSM_GPIO_PINS(28); 232 + DECLARE_MSM_GPIO_PINS(29); 233 + DECLARE_MSM_GPIO_PINS(30); 234 + DECLARE_MSM_GPIO_PINS(31); 235 + DECLARE_MSM_GPIO_PINS(32); 236 + DECLARE_MSM_GPIO_PINS(33); 237 + DECLARE_MSM_GPIO_PINS(34); 238 + DECLARE_MSM_GPIO_PINS(35); 239 + DECLARE_MSM_GPIO_PINS(36); 240 + DECLARE_MSM_GPIO_PINS(37); 241 + DECLARE_MSM_GPIO_PINS(38); 242 + DECLARE_MSM_GPIO_PINS(39); 243 + DECLARE_MSM_GPIO_PINS(40); 244 + DECLARE_MSM_GPIO_PINS(41); 245 + DECLARE_MSM_GPIO_PINS(42); 246 + DECLARE_MSM_GPIO_PINS(43); 247 + DECLARE_MSM_GPIO_PINS(44); 248 + DECLARE_MSM_GPIO_PINS(45); 249 + DECLARE_MSM_GPIO_PINS(46); 250 + DECLARE_MSM_GPIO_PINS(47); 251 + DECLARE_MSM_GPIO_PINS(48); 252 + DECLARE_MSM_GPIO_PINS(49); 253 + DECLARE_MSM_GPIO_PINS(50); 254 + DECLARE_MSM_GPIO_PINS(51); 255 + DECLARE_MSM_GPIO_PINS(52); 256 + DECLARE_MSM_GPIO_PINS(53); 257 + DECLARE_MSM_GPIO_PINS(54); 258 + DECLARE_MSM_GPIO_PINS(55); 259 + DECLARE_MSM_GPIO_PINS(56); 260 + DECLARE_MSM_GPIO_PINS(57); 261 + DECLARE_MSM_GPIO_PINS(58); 262 + DECLARE_MSM_GPIO_PINS(59); 263 + DECLARE_MSM_GPIO_PINS(60); 264 + DECLARE_MSM_GPIO_PINS(61); 265 + DECLARE_MSM_GPIO_PINS(62); 266 + DECLARE_MSM_GPIO_PINS(63); 267 + DECLARE_MSM_GPIO_PINS(64); 268 + DECLARE_MSM_GPIO_PINS(65); 269 + DECLARE_MSM_GPIO_PINS(66); 270 + DECLARE_MSM_GPIO_PINS(67); 271 + DECLARE_MSM_GPIO_PINS(68); 272 + DECLARE_MSM_GPIO_PINS(69); 273 + DECLARE_MSM_GPIO_PINS(70); 274 + DECLARE_MSM_GPIO_PINS(71); 275 + DECLARE_MSM_GPIO_PINS(72); 276 + DECLARE_MSM_GPIO_PINS(73); 277 + DECLARE_MSM_GPIO_PINS(74); 278 + DECLARE_MSM_GPIO_PINS(75); 279 + DECLARE_MSM_GPIO_PINS(76); 280 + DECLARE_MSM_GPIO_PINS(77); 281 + DECLARE_MSM_GPIO_PINS(78); 282 + DECLARE_MSM_GPIO_PINS(79); 283 + DECLARE_MSM_GPIO_PINS(80); 284 + DECLARE_MSM_GPIO_PINS(81); 285 + DECLARE_MSM_GPIO_PINS(82); 286 + DECLARE_MSM_GPIO_PINS(83); 287 + DECLARE_MSM_GPIO_PINS(84); 288 + DECLARE_MSM_GPIO_PINS(85); 289 + DECLARE_MSM_GPIO_PINS(86); 290 + DECLARE_MSM_GPIO_PINS(87); 291 + DECLARE_MSM_GPIO_PINS(88); 292 + DECLARE_MSM_GPIO_PINS(89); 293 + DECLARE_MSM_GPIO_PINS(90); 294 + DECLARE_MSM_GPIO_PINS(91); 295 + DECLARE_MSM_GPIO_PINS(92); 296 + DECLARE_MSM_GPIO_PINS(93); 297 + DECLARE_MSM_GPIO_PINS(94); 298 + DECLARE_MSM_GPIO_PINS(95); 299 + DECLARE_MSM_GPIO_PINS(96); 300 + DECLARE_MSM_GPIO_PINS(97); 301 + DECLARE_MSM_GPIO_PINS(98); 302 + DECLARE_MSM_GPIO_PINS(99); 303 + DECLARE_MSM_GPIO_PINS(100); 304 + DECLARE_MSM_GPIO_PINS(101); 305 + DECLARE_MSM_GPIO_PINS(102); 306 + DECLARE_MSM_GPIO_PINS(103); 307 + DECLARE_MSM_GPIO_PINS(104); 308 + DECLARE_MSM_GPIO_PINS(105); 309 + DECLARE_MSM_GPIO_PINS(106); 310 + DECLARE_MSM_GPIO_PINS(107); 311 + 312 + static const unsigned int sdc1_rclk_pins[] = { 108 }; 313 + static const unsigned int sdc1_clk_pins[] = { 109 }; 314 + static const unsigned int sdc1_cmd_pins[] = { 110 }; 315 + static const unsigned int sdc1_data_pins[] = { 111 }; 316 + 317 + enum sdx55_functions { 318 + msm_mux_adsp_ext, 319 + msm_mux_atest, 320 + msm_mux_audio_ref, 321 + msm_mux_bimc_dte0, 322 + msm_mux_bimc_dte1, 323 + msm_mux_blsp_i2c1, 324 + msm_mux_blsp_i2c2, 325 + msm_mux_blsp_i2c3, 326 + msm_mux_blsp_i2c4, 327 + msm_mux_blsp_spi1, 328 + msm_mux_blsp_spi2, 329 + msm_mux_blsp_spi3, 330 + msm_mux_blsp_spi4, 331 + msm_mux_blsp_uart1, 332 + msm_mux_blsp_uart2, 333 + msm_mux_blsp_uart3, 334 + msm_mux_blsp_uart4, 335 + msm_mux_char_exec, 336 + msm_mux_coex_uart, 337 + msm_mux_coex_uart2, 338 + msm_mux_cri_trng, 339 + msm_mux_cri_trng0, 340 + msm_mux_cri_trng1, 341 + msm_mux_dbg_out, 342 + msm_mux_ddr_bist, 343 + msm_mux_ddr_pxi0, 344 + msm_mux_ebi0_wrcdc, 345 + msm_mux_ebi2_a, 346 + msm_mux_ebi2_lcd, 347 + msm_mux_emac_gcc0, 348 + msm_mux_emac_gcc1, 349 + msm_mux_emac_pps0, 350 + msm_mux_emac_pps1, 351 + msm_mux_ext_dbg, 352 + msm_mux_gcc_gp1, 353 + msm_mux_gcc_gp2, 354 + msm_mux_gcc_gp3, 355 + msm_mux_gcc_plltest, 356 + msm_mux_gpio, 357 + msm_mux_i2s_mclk, 358 + msm_mux_jitter_bist, 359 + msm_mux_ldo_en, 360 + msm_mux_ldo_update, 361 + msm_mux_mgpi_clk, 362 + msm_mux_m_voc, 363 + msm_mux_native_char, 364 + msm_mux_native_char0, 365 + msm_mux_native_char1, 366 + msm_mux_native_char2, 367 + msm_mux_native_char3, 368 + msm_mux_native_tsens, 369 + msm_mux_native_tsense, 370 + msm_mux_nav_gpio, 371 + msm_mux_pa_indicator, 372 + msm_mux_pcie_clkreq, 373 + msm_mux_pci_e, 374 + msm_mux_pll_bist, 375 + msm_mux_pll_ref, 376 + msm_mux_pll_test, 377 + msm_mux_pri_mi2s, 378 + msm_mux_prng_rosc, 379 + msm_mux_qdss_cti, 380 + msm_mux_qdss_gpio, 381 + msm_mux_qdss_stm, 382 + msm_mux_qlink0_en, 383 + msm_mux_qlink0_req, 384 + msm_mux_qlink0_wmss, 385 + msm_mux_qlink1_en, 386 + msm_mux_qlink1_req, 387 + msm_mux_qlink1_wmss, 388 + msm_mux_spmi_coex, 389 + msm_mux_sec_mi2s, 390 + msm_mux_spmi_vgi, 391 + msm_mux_tgu_ch0, 392 + msm_mux_uim1_clk, 393 + msm_mux_uim1_data, 394 + msm_mux_uim1_present, 395 + msm_mux_uim1_reset, 396 + msm_mux_uim2_clk, 397 + msm_mux_uim2_data, 398 + msm_mux_uim2_present, 399 + msm_mux_uim2_reset, 400 + msm_mux_usb2phy_ac, 401 + msm_mux_vsense_trigger, 402 + msm_mux__, 403 + }; 404 + 405 + static const char * const gpio_groups[] = { 406 + "gpio0", "gpio1", "gpio2", "gpio3", "gpio4", "gpio5", "gpio6", "gpio7", 407 + "gpio8", "gpio9", "gpio10", "gpio11", "gpio12", "gpio13", "gpio14", 408 + "gpio15", "gpio16", "gpio17", "gpio18", "gpio19", "gpio20", "gpio21", 409 + "gpio22", "gpio23", "gpio24", "gpio25", "gpio26", "gpio27", "gpio28", 410 + "gpio29", "gpio30", "gpio31", "gpio32", "gpio33", "gpio34", "gpio35", 411 + "gpio36", "gpio37", "gpio38", "gpio39", "gpio40", "gpio41", "gpio42", 412 + "gpio43", "gpio44", "gpio45", "gpio46", "gpio47", "gpio48", "gpio49", 413 + "gpio50", "gpio51", "gpio52", "gpio52", "gpio53", "gpio53", "gpio54", 414 + "gpio55", "gpio56", "gpio57", "gpio58", "gpio59", "gpio60", "gpio61", 415 + "gpio62", "gpio63", "gpio64", "gpio65", "gpio66", "gpio67", "gpio68", 416 + "gpio69", "gpio70", "gpio71", "gpio72", "gpio73", "gpio74", "gpio75", 417 + "gpio76", "gpio77", "gpio78", "gpio79", "gpio80", "gpio81", "gpio82", 418 + "gpio83", "gpio84", "gpio85", "gpio86", "gpio87", "gpio88", "gpio89", 419 + "gpio90", "gpio91", "gpio92", "gpio93", "gpio94", "gpio95", "gpio96", 420 + "gpio97", "gpio98", "gpio99", "gpio100", "gpio101", "gpio102", 421 + "gpio103", "gpio104", "gpio105", "gpio106", "gpio107", 422 + }; 423 + 424 + static const char * const qdss_stm_groups[] = { 425 + "gpio0", "gpio1", "gpio2", "gpio3", "gpio4", "gpio5", "gpio6", "gpio7", "gpio12", "gpio13", 426 + "gpio14", "gpio15", "gpio16", "gpio17", "gpio18", "gpio19" "gpio20", "gpio21", "gpio22", 427 + "gpio23", "gpio44", "gpio45", "gpio52", "gpio53", "gpio56", "gpio57", "gpio61", "gpio62", 428 + "gpio63", "gpio64", "gpio65", "gpio66", 429 + }; 430 + 431 + static const char * const ddr_pxi0_groups[] = { 432 + "gpio45", "gpio46", 433 + }; 434 + 435 + static const char * const m_voc_groups[] = { 436 + "gpio46", "gpio48", "gpio49", "gpio59", "gpio60", 437 + }; 438 + 439 + static const char * const ddr_bist_groups[] = { 440 + "gpio46", "gpio47", "gpio48", "gpio49", 441 + }; 442 + 443 + static const char * const blsp_spi1_groups[] = { 444 + "gpio52", "gpio62", "gpio71", "gpio80", "gpio81", "gpio82", "gpio83", 445 + }; 446 + 447 + static const char * const pci_e_groups[] = { 448 + "gpio53", 449 + }; 450 + 451 + static const char * const tgu_ch0_groups[] = { 452 + "gpio55", 453 + }; 454 + 455 + static const char * const pcie_clkreq_groups[] = { 456 + "gpio56", 457 + }; 458 + 459 + static const char * const mgpi_clk_groups[] = { 460 + "gpio61", "gpio71", 461 + }; 462 + 463 + static const char * const i2s_mclk_groups[] = { 464 + "gpio62", 465 + }; 466 + 467 + static const char * const audio_ref_groups[] = { 468 + "gpio62", 469 + }; 470 + 471 + static const char * const ldo_update_groups[] = { 472 + "gpio62", 473 + }; 474 + 475 + static const char * const atest_groups[] = { 476 + "gpio63", "gpio64", "gpio65", "gpio66", "gpio67", 477 + }; 478 + 479 + static const char * const uim1_data_groups[] = { 480 + "gpio67", 481 + }; 482 + 483 + static const char * const uim1_present_groups[] = { 484 + "gpio68", 485 + }; 486 + 487 + static const char * const uim1_reset_groups[] = { 488 + "gpio69", 489 + }; 490 + 491 + static const char * const uim1_clk_groups[] = { 492 + "gpio70", 493 + }; 494 + 495 + static const char * const qlink1_en_groups[] = { 496 + "gpio72", 497 + }; 498 + 499 + static const char * const qlink1_req_groups[] = { 500 + "gpio73", 501 + }; 502 + 503 + static const char * const qlink1_wmss_groups[] = { 504 + "gpio74", 505 + }; 506 + 507 + static const char * const coex_uart2_groups[] = { 508 + "gpio75", "gpio76", 509 + }; 510 + 511 + static const char * const spmi_vgi_groups[] = { 512 + "gpio78", "gpio79", 513 + }; 514 + 515 + static const char * const gcc_plltest_groups[] = { 516 + "gpio81", "gpio82", 517 + }; 518 + 519 + static const char * const usb2phy_ac_groups[] = { 520 + "gpio93", 521 + }; 522 + 523 + static const char * const emac_pps1_groups[] = { 524 + "gpio95", 525 + }; 526 + 527 + static const char * const emac_pps0_groups[] = { 528 + "gpio106", 529 + }; 530 + 531 + static const char * const uim2_data_groups[] = { 532 + "gpio0", 533 + }; 534 + 535 + static const char * const ebi0_wrcdc_groups[] = { 536 + "gpio0", "gpio2", 537 + }; 538 + 539 + static const char * const uim2_present_groups[] = { 540 + "gpio1", 541 + }; 542 + 543 + static const char * const blsp_uart1_groups[] = { 544 + "gpio0", "gpio1", "gpio2", "gpio3", "gpio20", "gpio21", "gpio22", 545 + "gpio23", 546 + }; 547 + 548 + static const char * const uim2_reset_groups[] = { 549 + "gpio2", 550 + }; 551 + 552 + static const char * const blsp_i2c1_groups[] = { 553 + "gpio2", "gpio3", "gpio82", "gpio83", 554 + }; 555 + 556 + static const char * const uim2_clk_groups[] = { 557 + "gpio3", 558 + }; 559 + 560 + static const char * const blsp_spi2_groups[] = { 561 + "gpio4", "gpio5", "gpio6", "gpio7", "gpio52", "gpio62", "gpio71", 562 + }; 563 + 564 + static const char * const blsp_uart2_groups[] = { 565 + "gpio4", "gpio5", "gpio6", "gpio7", "gpio63", "gpio64", "gpio65", 566 + "gpio66", 567 + }; 568 + 569 + static const char * const blsp_i2c2_groups[] = { 570 + "gpio6", "gpio7", "gpio65", "gpio66", 571 + }; 572 + 573 + static const char * const char_exec_groups[] = { 574 + "gpio6", "gpio7", 575 + }; 576 + 577 + static const char * const pri_mi2s_groups[] = { 578 + "gpio8", "gpio9", "gpio10", "gpio11", "gpio12", "gpio13", "gpio14", 579 + "gpio15", 580 + }; 581 + 582 + static const char * const blsp_spi3_groups[] = { 583 + "gpio8", "gpio9", "gpio10", "gpio11", "gpio52", "gpio62", "gpio71", 584 + }; 585 + 586 + static const char * const blsp_uart3_groups[] = { 587 + "gpio8", "gpio9", "gpio10", "gpio11", 588 + }; 589 + 590 + static const char * const ext_dbg_groups[] = { 591 + "gpio8", "gpio9", "gpio10", "gpio11", 592 + }; 593 + 594 + static const char * const ldo_en_groups[] = { 595 + "gpio8", 596 + }; 597 + 598 + static const char * const blsp_i2c3_groups[] = { 599 + "gpio10", "gpio11", 600 + }; 601 + 602 + static const char * const gcc_gp3_groups[] = { 603 + "gpio11", 604 + }; 605 + 606 + static const char * const emac_gcc1_groups[] = { 607 + "gpio14", 608 + }; 609 + 610 + static const char * const bimc_dte0_groups[] = { 611 + "gpio14", "gpio59", 612 + }; 613 + 614 + static const char * const native_tsens_groups[] = { 615 + "gpio14", 616 + }; 617 + 618 + static const char * const vsense_trigger_groups[] = { 619 + "gpio14", 620 + }; 621 + 622 + static const char * const emac_gcc0_groups[] = { 623 + "gpio15", 624 + }; 625 + 626 + static const char * const bimc_dte1_groups[] = { 627 + "gpio15", "gpio61", 628 + }; 629 + 630 + static const char * const sec_mi2s_groups[] = { 631 + "gpio16", "gpio17", "gpio18", "gpio19", "gpio20", "gpio21", "gpio22", 632 + "gpio23", 633 + }; 634 + 635 + static const char * const blsp_spi4_groups[] = { 636 + "gpio16", "gpio17", "gpio18", "gpio19", "gpio52", "gpio62", "gpio71", 637 + }; 638 + 639 + static const char * const blsp_uart4_groups[] = { 640 + "gpio16", "gpio17", "gpio18", "gpio19", "gpio20", "gpio21", "gpio22", 641 + "gpio23", 642 + }; 643 + 644 + static const char * const qdss_cti_groups[] = { 645 + "gpio16", "gpio16", "gpio17", "gpio17", "gpio22", "gpio22", "gpio23", 646 + "gpio23", "gpio54", "gpio54", "gpio55", "gpio55", "gpio59", "gpio60", 647 + "gpio94", "gpio94", "gpio95", "gpio95", 648 + }; 649 + 650 + static const char * const blsp_i2c4_groups[] = { 651 + "gpio18", "gpio19", "gpio78", "gpio79", 652 + }; 653 + 654 + static const char * const gcc_gp1_groups[] = { 655 + "gpio18", 656 + }; 657 + 658 + static const char * const jitter_bist_groups[] = { 659 + "gpio19", 660 + }; 661 + 662 + static const char * const gcc_gp2_groups[] = { 663 + "gpio19", 664 + }; 665 + 666 + static const char * const ebi2_a_groups[] = { 667 + "gpio20", 668 + }; 669 + 670 + static const char * const ebi2_lcd_groups[] = { 671 + "gpio21", "gpio22", "gpio23", 672 + }; 673 + 674 + static const char * const pll_bist_groups[] = { 675 + "gpio22", 676 + }; 677 + 678 + static const char * const adsp_ext_groups[] = { 679 + "gpio24", "gpio25", 680 + }; 681 + 682 + static const char * const native_char_groups[] = { 683 + "gpio26", 684 + }; 685 + 686 + static const char * const qlink0_wmss_groups[] = { 687 + "gpio28", 688 + }; 689 + 690 + static const char * const native_char3_groups[] = { 691 + "gpio28", 692 + }; 693 + 694 + static const char * const native_char2_groups[] = { 695 + "gpio29", 696 + }; 697 + 698 + static const char * const native_tsense_groups[] = { 699 + "gpio29", 700 + }; 701 + 702 + static const char * const nav_gpio_groups[] = { 703 + "gpio31", "gpio32", "gpio76", 704 + }; 705 + 706 + static const char * const pll_ref_groups[] = { 707 + "gpio32", 708 + }; 709 + 710 + static const char * const pa_indicator_groups[] = { 711 + "gpio33", 712 + }; 713 + 714 + static const char * const native_char0_groups[] = { 715 + "gpio33", 716 + }; 717 + 718 + static const char * const qlink0_en_groups[] = { 719 + "gpio34", 720 + }; 721 + 722 + static const char * const qlink0_req_groups[] = { 723 + "gpio35", 724 + }; 725 + 726 + static const char * const pll_test_groups[] = { 727 + "gpio35", 728 + }; 729 + 730 + static const char * const cri_trng_groups[] = { 731 + "gpio36", 732 + }; 733 + 734 + static const char * const dbg_out_groups[] = { 735 + "gpio36", 736 + }; 737 + 738 + static const char * const prng_rosc_groups[] = { 739 + "gpio38", 740 + }; 741 + 742 + static const char * const cri_trng0_groups[] = { 743 + "gpio40", 744 + }; 745 + 746 + static const char * const cri_trng1_groups[] = { 747 + "gpio41", 748 + }; 749 + 750 + static const char * const qdss_gpio_groups[] = { 751 + "gpio4", "gpio5", "gpio6", "gpio7", 752 + "gpio12", "gpio13", "gpio14", "gpio15", "gpio16", "gpio17", "gpio18", "gpio19", 753 + "gpio42", "gpio61", "gpio63", "gpio64", "gpio65", "gpio66", 754 + }; 755 + 756 + static const char * const native_char1_groups[] = { 757 + "gpio42", 758 + }; 759 + 760 + static const char * const coex_uart_groups[] = { 761 + "gpio44", "gpio45", 762 + }; 763 + 764 + static const char * const spmi_coex_groups[] = { 765 + "gpio44", "gpio45", 766 + }; 767 + 768 + static const struct msm_function sdx55_functions[] = { 769 + FUNCTION(adsp_ext), 770 + FUNCTION(atest), 771 + FUNCTION(audio_ref), 772 + FUNCTION(bimc_dte0), 773 + FUNCTION(bimc_dte1), 774 + FUNCTION(blsp_i2c1), 775 + FUNCTION(blsp_i2c2), 776 + FUNCTION(blsp_i2c3), 777 + FUNCTION(blsp_i2c4), 778 + FUNCTION(blsp_spi1), 779 + FUNCTION(blsp_spi2), 780 + FUNCTION(blsp_spi3), 781 + FUNCTION(blsp_spi4), 782 + FUNCTION(blsp_uart1), 783 + FUNCTION(blsp_uart2), 784 + FUNCTION(blsp_uart3), 785 + FUNCTION(blsp_uart4), 786 + FUNCTION(char_exec), 787 + FUNCTION(coex_uart), 788 + FUNCTION(coex_uart2), 789 + FUNCTION(cri_trng), 790 + FUNCTION(cri_trng0), 791 + FUNCTION(cri_trng1), 792 + FUNCTION(dbg_out), 793 + FUNCTION(ddr_bist), 794 + FUNCTION(ddr_pxi0), 795 + FUNCTION(ebi0_wrcdc), 796 + FUNCTION(ebi2_a), 797 + FUNCTION(ebi2_lcd), 798 + FUNCTION(emac_gcc0), 799 + FUNCTION(emac_gcc1), 800 + FUNCTION(emac_pps0), 801 + FUNCTION(emac_pps1), 802 + FUNCTION(ext_dbg), 803 + FUNCTION(gcc_gp1), 804 + FUNCTION(gcc_gp2), 805 + FUNCTION(gcc_gp3), 806 + FUNCTION(gcc_plltest), 807 + FUNCTION(gpio), 808 + FUNCTION(i2s_mclk), 809 + FUNCTION(jitter_bist), 810 + FUNCTION(ldo_en), 811 + FUNCTION(ldo_update), 812 + FUNCTION(mgpi_clk), 813 + FUNCTION(m_voc), 814 + FUNCTION(native_char), 815 + FUNCTION(native_char0), 816 + FUNCTION(native_char1), 817 + FUNCTION(native_char2), 818 + FUNCTION(native_char3), 819 + FUNCTION(native_tsens), 820 + FUNCTION(native_tsense), 821 + FUNCTION(nav_gpio), 822 + FUNCTION(pa_indicator), 823 + FUNCTION(pcie_clkreq), 824 + FUNCTION(pci_e), 825 + FUNCTION(pll_bist), 826 + FUNCTION(pll_ref), 827 + FUNCTION(pll_test), 828 + FUNCTION(pri_mi2s), 829 + FUNCTION(prng_rosc), 830 + FUNCTION(qdss_cti), 831 + FUNCTION(qdss_gpio), 832 + FUNCTION(qdss_stm), 833 + FUNCTION(qlink0_en), 834 + FUNCTION(qlink0_req), 835 + FUNCTION(qlink0_wmss), 836 + FUNCTION(qlink1_en), 837 + FUNCTION(qlink1_req), 838 + FUNCTION(qlink1_wmss), 839 + FUNCTION(spmi_coex), 840 + FUNCTION(sec_mi2s), 841 + FUNCTION(spmi_vgi), 842 + FUNCTION(tgu_ch0), 843 + FUNCTION(uim1_clk), 844 + FUNCTION(uim1_data), 845 + FUNCTION(uim1_present), 846 + FUNCTION(uim1_reset), 847 + FUNCTION(uim2_clk), 848 + FUNCTION(uim2_data), 849 + FUNCTION(uim2_present), 850 + FUNCTION(uim2_reset), 851 + FUNCTION(usb2phy_ac), 852 + FUNCTION(vsense_trigger), 853 + }; 854 + 855 + /* Every pin is maintained as a single group, and missing or non-existing pin 856 + * would be maintained as dummy group to synchronize pin group index with 857 + * pin descriptor registered with pinctrl core. 858 + * Clients would not be able to request these dummy pin groups. 859 + */ 860 + static const struct msm_pingroup sdx55_groups[] = { 861 + [0] = PINGROUP(0, uim2_data, blsp_uart1, qdss_stm, ebi0_wrcdc, _, _, _, _, _), 862 + [1] = PINGROUP(1, uim2_present, blsp_uart1, qdss_stm, _, _, _, _, _, _), 863 + [2] = PINGROUP(2, uim2_reset, blsp_uart1, blsp_i2c1, qdss_stm, ebi0_wrcdc, _, _, _, _), 864 + [3] = PINGROUP(3, uim2_clk, blsp_uart1, blsp_i2c1, qdss_stm, _, _, _, _, _), 865 + [4] = PINGROUP(4, blsp_spi2, blsp_uart2, _, qdss_stm, qdss_gpio, _, _, _, _), 866 + [5] = PINGROUP(5, blsp_spi2, blsp_uart2, _, qdss_stm, qdss_gpio, _, _, _, _), 867 + [6] = PINGROUP(6, blsp_spi2, blsp_uart2, blsp_i2c2, char_exec, _, qdss_stm, qdss_gpio, _, _), 868 + [7] = PINGROUP(7, blsp_spi2, blsp_uart2, blsp_i2c2, char_exec, _, qdss_stm, qdss_gpio, _, _), 869 + [8] = PINGROUP(8, pri_mi2s, blsp_spi3, blsp_uart3, ext_dbg, ldo_en, _, _, _, _), 870 + [9] = PINGROUP(9, pri_mi2s, blsp_spi3, blsp_uart3, ext_dbg, _, _, _, _, _), 871 + [10] = PINGROUP(10, pri_mi2s, blsp_spi3, blsp_uart3, blsp_i2c3, ext_dbg, _, _, _, _), 872 + [11] = PINGROUP(11, pri_mi2s, blsp_spi3, blsp_uart3, blsp_i2c3, ext_dbg, gcc_gp3, _, _, _), 873 + [12] = PINGROUP(12, pri_mi2s, _, qdss_stm, qdss_gpio, _, _, _, _, _), 874 + [13] = PINGROUP(13, pri_mi2s, _, qdss_stm, qdss_gpio, _, _, _, _, _), 875 + [14] = PINGROUP(14, pri_mi2s, emac_gcc1, _, _, qdss_stm, qdss_gpio, bimc_dte0, native_tsens, vsense_trigger), 876 + [15] = PINGROUP(15, pri_mi2s, emac_gcc0, _, _, qdss_stm, qdss_gpio, bimc_dte1, _, _), 877 + [16] = PINGROUP(16, sec_mi2s, blsp_spi4, blsp_uart4, qdss_cti, qdss_cti, _, _, qdss_stm, qdss_gpio), 878 + [17] = PINGROUP(17, sec_mi2s, blsp_spi4, blsp_uart4, qdss_cti, qdss_cti, _, qdss_stm, qdss_gpio, _), 879 + [18] = PINGROUP(18, sec_mi2s, blsp_spi4, blsp_uart4, blsp_i2c4, gcc_gp1, qdss_stm, qdss_gpio, _, _), 880 + [19] = PINGROUP(19, sec_mi2s, blsp_spi4, blsp_uart4, blsp_i2c4, jitter_bist, gcc_gp2, _, qdss_stm, qdss_gpio), 881 + [20] = PINGROUP(20, sec_mi2s, ebi2_a, blsp_uart1, blsp_uart4, qdss_stm, _, _, _, _), 882 + [21] = PINGROUP(21, sec_mi2s, ebi2_lcd, blsp_uart1, blsp_uart4, _, qdss_stm, _, _, _), 883 + [22] = PINGROUP(22, sec_mi2s, ebi2_lcd, blsp_uart1, qdss_cti, qdss_cti, blsp_uart4, pll_bist, _, qdss_stm), 884 + [23] = PINGROUP(23, sec_mi2s, ebi2_lcd, qdss_cti, qdss_cti, blsp_uart1, blsp_uart4, qdss_stm, _, _), 885 + [24] = PINGROUP(24, adsp_ext, _, _, _, _, _, _, _, _), 886 + [25] = PINGROUP(25, adsp_ext, _, _, _, _, _, _, _, _), 887 + [26] = PINGROUP(26, _, _, _, native_char, _, _, _, _, _), 888 + [27] = PINGROUP(27, _, _, _, _, _, _, _, _, _), 889 + [28] = PINGROUP(28, qlink0_wmss, _, native_char3, _, _, _, _, _, _), 890 + [29] = PINGROUP(29, _, _, _, native_char2, native_tsense, _, _, _, _), 891 + [30] = PINGROUP(30, _, _, _, _, _, _, _, _, _), 892 + [31] = PINGROUP(31, nav_gpio, _, _, _, _, _, _, _, _), 893 + [32] = PINGROUP(32, nav_gpio, pll_ref, _, _, _, _, _, _, _), 894 + [33] = PINGROUP(33, _, pa_indicator, native_char0, _, _, _, _, _, _), 895 + [34] = PINGROUP(34, qlink0_en, _, _, _, _, _, _, _, _), 896 + [35] = PINGROUP(35, qlink0_req, pll_test, _, _, _, _, _, _, _), 897 + [36] = PINGROUP(36, _, _, cri_trng, dbg_out, _, _, _, _, _), 898 + [37] = PINGROUP(37, _, _, _, _, _, _, _, _, _), 899 + [38] = PINGROUP(38, _, _, prng_rosc, _, _, _, _, _, _), 900 + [39] = PINGROUP(39, _, _, _, _, _, _, _, _, _), 901 + [40] = PINGROUP(40, _, _, cri_trng0, _, _, _, _, _, _), 902 + [41] = PINGROUP(41, _, _, cri_trng1, _, _, _, _, _, _), 903 + [42] = PINGROUP(42, _, qdss_gpio, native_char1, _, _, _, _, _, _), 904 + [43] = PINGROUP(43, _, _, _, _, _, _, _, _, _), 905 + [44] = PINGROUP(44, coex_uart, spmi_coex, _, qdss_stm, _, _, _, _, _), 906 + [45] = PINGROUP(45, coex_uart, spmi_coex, qdss_stm, ddr_pxi0, _, _, _, _, _), 907 + [46] = PINGROUP(46, m_voc, ddr_bist, ddr_pxi0, _, _, _, _, _, _), 908 + [47] = PINGROUP(47, ddr_bist, _, _, _, _, _, _, _, _), 909 + [48] = PINGROUP(48, m_voc, ddr_bist, _, _, _, _, _, _, _), 910 + [49] = PINGROUP(49, m_voc, ddr_bist, _, _, _, _, _, _, _), 911 + [50] = PINGROUP(50, _, _, _, _, _, _, _, _, _), 912 + [51] = PINGROUP(51, _, _, _, _, _, _, _, _, _), 913 + [52] = PINGROUP(52, blsp_spi2, blsp_spi1, blsp_spi3, blsp_spi4, _, _, qdss_stm, _, _), 914 + [53] = PINGROUP(53, pci_e, _, _, qdss_stm, _, _, _, _, _), 915 + [54] = PINGROUP(54, qdss_cti, qdss_cti, _, _, _, _, _, _, _), 916 + [55] = PINGROUP(55, qdss_cti, qdss_cti, tgu_ch0, _, _, _, _, _, _), 917 + [56] = PINGROUP(56, pcie_clkreq, _, qdss_stm, _, _, _, _, _, _), 918 + [57] = PINGROUP(57, _, qdss_stm, _, _, _, _, _, _, _), 919 + [58] = PINGROUP(58, _, _, _, _, _, _, _, _, _), 920 + [59] = PINGROUP(59, qdss_cti, m_voc, bimc_dte0, _, _, _, _, _, _), 921 + [60] = PINGROUP(60, qdss_cti, _, m_voc, _, _, _, _, _, _), 922 + [61] = PINGROUP(61, mgpi_clk, qdss_stm, qdss_gpio, bimc_dte1, _, _, _, _, _), 923 + [62] = PINGROUP(62, i2s_mclk, audio_ref, blsp_spi1, blsp_spi2, blsp_spi3, blsp_spi4, ldo_update, qdss_stm, _), 924 + [63] = PINGROUP(63, blsp_uart2, _, qdss_stm, qdss_gpio, atest, _, _, _, _), 925 + [64] = PINGROUP(64, blsp_uart2, qdss_stm, qdss_gpio, atest, _, _, _, _, _), 926 + [65] = PINGROUP(65, blsp_uart2, blsp_i2c2, _, qdss_stm, qdss_gpio, atest, _, _, _), 927 + [66] = PINGROUP(66, blsp_uart2, blsp_i2c2, qdss_stm, qdss_gpio, atest, _, _, _, _), 928 + [67] = PINGROUP(67, uim1_data, atest, _, _, _, _, _, _, _), 929 + [68] = PINGROUP(68, uim1_present, _, _, _, _, _, _, _, _), 930 + [69] = PINGROUP(69, uim1_reset, _, _, _, _, _, _, _, _), 931 + [70] = PINGROUP(70, uim1_clk, _, _, _, _, _, _, _, _), 932 + [71] = PINGROUP(71, mgpi_clk, blsp_spi1, blsp_spi2, blsp_spi3, blsp_spi4, _, _, _, _), 933 + [72] = PINGROUP(72, qlink1_en, _, _, _, _, _, _, _, _), 934 + [73] = PINGROUP(73, qlink1_req, _, _, _, _, _, _, _, _), 935 + [74] = PINGROUP(74, qlink1_wmss, _, _, _, _, _, _, _, _), 936 + [75] = PINGROUP(75, coex_uart2, _, _, _, _, _, _, _, _), 937 + [76] = PINGROUP(76, coex_uart2, nav_gpio, _, _, _, _, _, _, _), 938 + [77] = PINGROUP(77, _, _, _, _, _, _, _, _, _), 939 + [78] = PINGROUP(78, spmi_vgi, blsp_i2c4, _, _, _, _, _, _, _), 940 + [79] = PINGROUP(79, spmi_vgi, blsp_i2c4, _, _, _, _, _, _, _), 941 + [80] = PINGROUP(80, _, blsp_spi1, _, _, _, _, _, _, _), 942 + [81] = PINGROUP(81, _, blsp_spi1, _, gcc_plltest, _, _, _, _, _), 943 + [82] = PINGROUP(82, _, blsp_spi1, _, blsp_i2c1, gcc_plltest, _, _, _, _), 944 + [83] = PINGROUP(83, _, blsp_spi1, _, blsp_i2c1, _, _, _, _, _), 945 + [84] = PINGROUP(84, _, _, _, _, _, _, _, _, _), 946 + [85] = PINGROUP(85, _, _, _, _, _, _, _, _, _), 947 + [86] = PINGROUP(86, _, _, _, _, _, _, _, _, _), 948 + [87] = PINGROUP(87, _, _, _, _, _, _, _, _, _), 949 + [88] = PINGROUP(88, _, _, _, _, _, _, _, _, _), 950 + [89] = PINGROUP(89, _, _, _, _, _, _, _, _, _), 951 + [90] = PINGROUP(90, _, _, _, _, _, _, _, _, _), 952 + [91] = PINGROUP(91, _, _, _, _, _, _, _, _, _), 953 + [92] = PINGROUP(92, _, _, _, _, _, _, _, _, _), 954 + [93] = PINGROUP(93, _, _, usb2phy_ac, _, _, _, _, _, _), 955 + [94] = PINGROUP(94, qdss_cti, qdss_cti, _, _, _, _, _, _, _), 956 + [95] = PINGROUP(95, qdss_cti, qdss_cti, emac_pps1, _, _, _, _, _, _), 957 + [96] = PINGROUP(96, _, _, _, _, _, _, _, _, _), 958 + [97] = PINGROUP(97, _, _, _, _, _, _, _, _, _), 959 + [98] = PINGROUP(98, _, _, _, _, _, _, _, _, _), 960 + [99] = PINGROUP(99, _, _, _, _, _, _, _, _, _), 961 + [100] = PINGROUP(100, _, _, _, _, _, _, _, _, _), 962 + [101] = PINGROUP(101, _, _, _, _, _, _, _, _, _), 963 + [102] = PINGROUP(102, _, _, _, _, _, _, _, _, _), 964 + [103] = PINGROUP(103, _, _, _, _, _, _, _, _, _), 965 + [104] = PINGROUP(104, _, _, _, _, _, _, _, _, _), 966 + [105] = PINGROUP(105, _, _, _, _, _, _, _, _, _), 967 + [106] = PINGROUP(106, emac_pps0, _, _, _, _, _, _, _, _), 968 + [107] = PINGROUP(107, _, _, _, _, _, _, _, _, _), 969 + [109] = SDC_PINGROUP(sdc1_rclk, 0x9a000, 15, 0), 970 + [110] = SDC_PINGROUP(sdc1_clk, 0x9a000, 13, 6), 971 + [111] = SDC_PINGROUP(sdc1_cmd, 0x9a000, 11, 3), 972 + [112] = SDC_PINGROUP(sdc1_data, 0x9a000, 9, 0), 973 + }; 974 + 975 + static const struct msm_pinctrl_soc_data sdx55_pinctrl = { 976 + .pins = sdx55_pins, 977 + .npins = ARRAY_SIZE(sdx55_pins), 978 + .functions = sdx55_functions, 979 + .nfunctions = ARRAY_SIZE(sdx55_functions), 980 + .groups = sdx55_groups, 981 + .ngroups = ARRAY_SIZE(sdx55_groups), 982 + .ngpios = 108, 983 + }; 984 + 985 + static int sdx55_pinctrl_probe(struct platform_device *pdev) 986 + { 987 + return msm_pinctrl_probe(pdev, &sdx55_pinctrl); 988 + } 989 + 990 + static const struct of_device_id sdx55_pinctrl_of_match[] = { 991 + { .compatible = "qcom,sdx55-pinctrl", }, 992 + { }, 993 + }; 994 + 995 + static struct platform_driver sdx55_pinctrl_driver = { 996 + .driver = { 997 + .name = "sdx55-pinctrl", 998 + .of_match_table = sdx55_pinctrl_of_match, 999 + }, 1000 + .probe = sdx55_pinctrl_probe, 1001 + .remove = msm_pinctrl_remove, 1002 + }; 1003 + 1004 + static int __init sdx55_pinctrl_init(void) 1005 + { 1006 + return platform_driver_register(&sdx55_pinctrl_driver); 1007 + } 1008 + arch_initcall(sdx55_pinctrl_init); 1009 + 1010 + static void __exit sdx55_pinctrl_exit(void) 1011 + { 1012 + platform_driver_unregister(&sdx55_pinctrl_driver); 1013 + } 1014 + module_exit(sdx55_pinctrl_exit); 1015 + 1016 + MODULE_DESCRIPTION("QTI sdx55 pinctrl driver"); 1017 + MODULE_LICENSE("GPL v2"); 1018 + MODULE_DEVICE_TABLE(of, sdx55_pinctrl_of_match);
+2
drivers/pinctrl/qcom/pinctrl-spmi-gpio.c
··· 1129 1129 { .compatible = "qcom,pm8150l-gpio", .data = (void *) 12 }, 1130 1130 { .compatible = "qcom,pm6150-gpio", .data = (void *) 10 }, 1131 1131 { .compatible = "qcom,pm6150l-gpio", .data = (void *) 12 }, 1132 + /* pmx55 has 11 GPIOs with holes on 3, 7, 10, 11 */ 1133 + { .compatible = "qcom,pmx55-gpio", .data = (void *) 11 }, 1132 1134 { }, 1133 1135 }; 1134 1136
+2
drivers/pinctrl/renesas/core.c
··· 315 315 range = NULL; 316 316 break; 317 317 318 + #ifdef CONFIG_PINCTRL_SH_PFC_GPIO 318 319 case PINMUX_TYPE_OUTPUT: 319 320 range = &pfc->info->output; 320 321 break; ··· 323 322 case PINMUX_TYPE_INPUT: 324 323 range = &pfc->info->input; 325 324 break; 325 + #endif /* CONFIG_PINCTRL_SH_PFC_GPIO */ 326 326 327 327 default: 328 328 return -EINVAL;
+4
drivers/pinctrl/renesas/core.h
··· 33 33 sh_pfc_pin_to_bias_reg(const struct sh_pfc *pfc, unsigned int pin, 34 34 unsigned int *bit); 35 35 36 + unsigned int rcar_pinmux_get_bias(struct sh_pfc *pfc, unsigned int pin); 37 + void rcar_pinmux_set_bias(struct sh_pfc *pfc, unsigned int pin, 38 + unsigned int bias); 39 + 36 40 #endif /* __SH_PFC_CORE_H__ */
+1 -1
drivers/pinctrl/renesas/gpio.c
··· 328 328 if (pfc->info->data_regs == NULL) 329 329 return 0; 330 330 331 - /* Find the memory window that contain the GPIO registers. Boards that 331 + /* Find the memory window that contains the GPIO registers. Boards that 332 332 * register a separate GPIO device will not supply a memory resource 333 333 * that covers the data registers. In that case don't try to handle 334 334 * GPIOs.
+8 -47
drivers/pinctrl/renesas/pfc-r8a7778.c
··· 2909 2909 }; 2910 2910 2911 2911 static const struct pinmux_bias_reg pinmux_bias_regs[] = { 2912 - { PINMUX_BIAS_REG("PUPR0", 0x100, "N/A", 0) { 2912 + { PINMUX_BIAS_REG("PUPR0", 0xfffc0100, "N/A", 0) { 2913 2913 [ 0] = RCAR_GP_PIN(0, 6), /* A0 */ 2914 2914 [ 1] = RCAR_GP_PIN(0, 7), /* A1 */ 2915 2915 [ 2] = RCAR_GP_PIN(0, 8), /* A2 */ ··· 2943 2943 [30] = RCAR_GP_PIN(1, 7), /* /EX_CS4 */ 2944 2944 [31] = RCAR_GP_PIN(1, 8), /* /EX_CS5 */ 2945 2945 } }, 2946 - { PINMUX_BIAS_REG("PUPR1", 0x104, "N/A", 0) { 2946 + { PINMUX_BIAS_REG("PUPR1", 0xfffc0104, "N/A", 0) { 2947 2947 [ 0] = RCAR_GP_PIN(0, 0), /* /PRESETOUT */ 2948 2948 [ 1] = RCAR_GP_PIN(0, 5), /* /BS */ 2949 2949 [ 2] = RCAR_GP_PIN(1, 0), /* RD//WR */ ··· 2977 2977 [30] = SH_PFC_PIN_NONE, 2978 2978 [31] = SH_PFC_PIN_NONE, 2979 2979 } }, 2980 - { PINMUX_BIAS_REG("PUPR2", 0x108, "N/A", 0) { 2980 + { PINMUX_BIAS_REG("PUPR2", 0xfffc0108, "N/A", 0) { 2981 2981 [ 0] = RCAR_GP_PIN(1, 22), /* DU0_DR0 */ 2982 2982 [ 1] = RCAR_GP_PIN(1, 23), /* DU0_DR1 */ 2983 2983 [ 2] = RCAR_GP_PIN(1, 24), /* DU0_DR2 */ ··· 3011 3011 [30] = RCAR_GP_PIN(2, 21), /* DU0_CDE */ 3012 3012 [31] = RCAR_GP_PIN(2, 16), /* DU0_DOTCLKOUT1 */ 3013 3013 } }, 3014 - { PINMUX_BIAS_REG("PUPR3", 0x10c, "N/A", 0) { 3014 + { PINMUX_BIAS_REG("PUPR3", 0xfffc010c, "N/A", 0) { 3015 3015 [ 0] = RCAR_GP_PIN(3, 24), /* VI0_CLK */ 3016 3016 [ 1] = RCAR_GP_PIN(3, 25), /* VI0_CLKENB */ 3017 3017 [ 2] = RCAR_GP_PIN(3, 26), /* VI0_FIELD */ ··· 3045 3045 [30] = RCAR_GP_PIN(4, 18), /* ETH_MDIO */ 3046 3046 [31] = RCAR_GP_PIN(4, 19), /* ETH_LINK */ 3047 3047 } }, 3048 - { PINMUX_BIAS_REG("PUPR4", 0x110, "N/A", 0) { 3048 + { PINMUX_BIAS_REG("PUPR4", 0xfffc0110, "N/A", 0) { 3049 3049 [ 0] = RCAR_GP_PIN(3, 6), /* SSI_SCK012 */ 3050 3050 [ 1] = RCAR_GP_PIN(3, 7), /* SSI_WS012 */ 3051 3051 [ 2] = RCAR_GP_PIN(3, 10), /* SSI_SDATA0 */ ··· 3079 3079 [30] = RCAR_GP_PIN(1, 14), /* IRQ2 */ 3080 3080 [31] = RCAR_GP_PIN(1, 15), /* IRQ3 */ 3081 3081 } }, 3082 - { PINMUX_BIAS_REG("PUPR5", 0x114, "N/A", 0) { 3082 + { PINMUX_BIAS_REG("PUPR5", 0xfffc0114, "N/A", 0) { 3083 3083 [ 0] = RCAR_GP_PIN(0, 1), /* PENC0 */ 3084 3084 [ 1] = RCAR_GP_PIN(0, 2), /* PENC1 */ 3085 3085 [ 2] = RCAR_GP_PIN(0, 3), /* USB_OVC0 */ ··· 3116 3116 { /* sentinel */ }, 3117 3117 }; 3118 3118 3119 - static unsigned int r8a7778_pinmux_get_bias(struct sh_pfc *pfc, 3120 - unsigned int pin) 3121 - { 3122 - const struct pinmux_bias_reg *reg; 3123 - void __iomem *addr; 3124 - unsigned int bit; 3125 - 3126 - reg = sh_pfc_pin_to_bias_reg(pfc, pin, &bit); 3127 - if (!reg) 3128 - return PIN_CONFIG_BIAS_DISABLE; 3129 - 3130 - addr = pfc->windows->virt + reg->puen; 3131 - 3132 - if (ioread32(addr) & BIT(bit)) 3133 - return PIN_CONFIG_BIAS_PULL_UP; 3134 - else 3135 - return PIN_CONFIG_BIAS_DISABLE; 3136 - } 3137 - 3138 - static void r8a7778_pinmux_set_bias(struct sh_pfc *pfc, unsigned int pin, 3139 - unsigned int bias) 3140 - { 3141 - const struct pinmux_bias_reg *reg; 3142 - void __iomem *addr; 3143 - unsigned int bit; 3144 - u32 value; 3145 - 3146 - reg = sh_pfc_pin_to_bias_reg(pfc, pin, &bit); 3147 - if (!reg) 3148 - return; 3149 - 3150 - addr = pfc->windows->virt + reg->puen; 3151 - 3152 - value = ioread32(addr) & ~BIT(bit); 3153 - if (bias == PIN_CONFIG_BIAS_PULL_UP) 3154 - value |= BIT(bit); 3155 - iowrite32(value, addr); 3156 - } 3157 - 3158 3119 static const struct sh_pfc_soc_operations r8a7778_pfc_ops = { 3159 - .get_bias = r8a7778_pinmux_get_bias, 3160 - .set_bias = r8a7778_pinmux_set_bias, 3120 + .get_bias = rcar_pinmux_get_bias, 3121 + .set_bias = rcar_pinmux_set_bias, 3161 3122 }; 3162 3123 3163 3124 const struct sh_pfc_soc_info r8a7778_pinmux_info = {
+145 -1
drivers/pinctrl/renesas/pfc-r8a7790.c
··· 2393 2393 static const unsigned int intc_irq3_mux[] = { 2394 2394 IRQ3_MARK, 2395 2395 }; 2396 + 2397 + #ifdef CONFIG_PINCTRL_PFC_R8A7790 2396 2398 /* - MLB+ ------------------------------------------------------------------- */ 2397 2399 static const unsigned int mlb_3pin_pins[] = { 2398 2400 RCAR_GP_PIN(4, 0), RCAR_GP_PIN(4, 1), RCAR_GP_PIN(4, 2), ··· 2402 2400 static const unsigned int mlb_3pin_mux[] = { 2403 2401 MLB_CLK_MARK, MLB_SIG_MARK, MLB_DAT_MARK, 2404 2402 }; 2403 + #endif /* CONFIG_PINCTRL_PFC_R8A7790 */ 2404 + 2405 2405 /* - MMCIF0 ----------------------------------------------------------------- */ 2406 2406 static const unsigned int mmc0_data1_pins[] = { 2407 2407 /* D[0] */ ··· 3870 3866 VI1_R4_MARK, VI1_R5_MARK, 3871 3867 VI1_R6_MARK, VI1_R7_MARK, 3872 3868 }; 3869 + static const union vin_data vin1_data_b_pins = { 3870 + .data24 = { 3871 + /* B */ 3872 + RCAR_GP_PIN(3, 0), RCAR_GP_PIN(3, 1), 3873 + RCAR_GP_PIN(3, 2), RCAR_GP_PIN(3, 3), 3874 + RCAR_GP_PIN(3, 4), RCAR_GP_PIN(3, 5), 3875 + RCAR_GP_PIN(3, 6), RCAR_GP_PIN(3, 7), 3876 + /* G */ 3877 + RCAR_GP_PIN(1, 14), RCAR_GP_PIN(1, 15), 3878 + RCAR_GP_PIN(1, 17), RCAR_GP_PIN(1, 20), 3879 + RCAR_GP_PIN(1, 22), RCAR_GP_PIN(1, 12), 3880 + RCAR_GP_PIN(1, 9), RCAR_GP_PIN(1, 7), 3881 + /* R */ 3882 + RCAR_GP_PIN(0, 27), RCAR_GP_PIN(0, 28), 3883 + RCAR_GP_PIN(0, 29), RCAR_GP_PIN(1, 4), 3884 + RCAR_GP_PIN(1, 5), RCAR_GP_PIN(1, 6), 3885 + RCAR_GP_PIN(1, 10), RCAR_GP_PIN(1, 8), 3886 + }, 3887 + }; 3888 + static const union vin_data vin1_data_b_mux = { 3889 + .data24 = { 3890 + /* B */ 3891 + VI1_DATA0_VI1_B0_B_MARK, VI1_DATA1_VI1_B1_B_MARK, 3892 + VI1_DATA2_VI1_B2_B_MARK, VI1_DATA3_VI1_B3_B_MARK, 3893 + VI1_DATA4_VI1_B4_B_MARK, VI1_DATA5_VI1_B5_B_MARK, 3894 + VI1_DATA6_VI1_B6_B_MARK, VI1_DATA7_VI1_B7_B_MARK, 3895 + /* G */ 3896 + VI1_G0_B_MARK, VI1_G1_B_MARK, 3897 + VI1_G2_B_MARK, VI1_G3_B_MARK, 3898 + VI1_G4_B_MARK, VI1_G5_B_MARK, 3899 + VI1_G6_B_MARK, VI1_G7_B_MARK, 3900 + /* R */ 3901 + VI1_R0_B_MARK, VI1_R1_B_MARK, 3902 + VI1_R2_B_MARK, VI1_R3_B_MARK, 3903 + VI1_R4_B_MARK, VI1_R5_B_MARK, 3904 + VI1_R6_B_MARK, VI1_R7_B_MARK, 3905 + }, 3906 + }; 3907 + static const unsigned int vin1_data18_b_pins[] = { 3908 + /* B */ 3909 + RCAR_GP_PIN(3, 2), RCAR_GP_PIN(3, 3), 3910 + RCAR_GP_PIN(3, 4), RCAR_GP_PIN(3, 5), 3911 + RCAR_GP_PIN(3, 6), RCAR_GP_PIN(3, 7), 3912 + /* G */ 3913 + RCAR_GP_PIN(1, 17), RCAR_GP_PIN(1, 20), 3914 + RCAR_GP_PIN(1, 22), RCAR_GP_PIN(1, 12), 3915 + RCAR_GP_PIN(1, 9), RCAR_GP_PIN(1, 7), 3916 + /* R */ 3917 + RCAR_GP_PIN(0, 29), RCAR_GP_PIN(1, 4), 3918 + RCAR_GP_PIN(1, 5), RCAR_GP_PIN(1, 6), 3919 + RCAR_GP_PIN(1, 10), RCAR_GP_PIN(1, 8), 3920 + }; 3921 + static const unsigned int vin1_data18_b_mux[] = { 3922 + /* B */ 3923 + VI1_DATA2_VI1_B2_B_MARK, VI1_DATA3_VI1_B3_B_MARK, 3924 + VI1_DATA4_VI1_B4_B_MARK, VI1_DATA5_VI1_B5_B_MARK, 3925 + VI1_DATA6_VI1_B6_B_MARK, VI1_DATA7_VI1_B7_B_MARK, 3926 + /* G */ 3927 + VI1_G2_B_MARK, VI1_G3_B_MARK, 3928 + VI1_G4_B_MARK, VI1_G5_B_MARK, 3929 + VI1_G6_B_MARK, VI1_G7_B_MARK, 3930 + /* R */ 3931 + VI1_R2_B_MARK, VI1_R3_B_MARK, 3932 + VI1_R4_B_MARK, VI1_R5_B_MARK, 3933 + VI1_R6_B_MARK, VI1_R7_B_MARK, 3934 + }; 3873 3935 static const unsigned int vin1_sync_pins[] = { 3874 3936 RCAR_GP_PIN(1, 24), /* HSYNC */ 3875 3937 RCAR_GP_PIN(1, 25), /* VSYNC */ ··· 3944 3874 VI1_HSYNC_N_MARK, 3945 3875 VI1_VSYNC_N_MARK, 3946 3876 }; 3877 + static const unsigned int vin1_sync_b_pins[] = { 3878 + RCAR_GP_PIN(1, 24), /* HSYNC */ 3879 + RCAR_GP_PIN(1, 25), /* VSYNC */ 3880 + }; 3881 + static const unsigned int vin1_sync_b_mux[] = { 3882 + VI1_HSYNC_N_B_MARK, 3883 + VI1_VSYNC_N_B_MARK, 3884 + }; 3947 3885 static const unsigned int vin1_field_pins[] = { 3948 3886 RCAR_GP_PIN(1, 13), 3949 3887 }; 3950 3888 static const unsigned int vin1_field_mux[] = { 3951 3889 VI1_FIELD_MARK, 3890 + }; 3891 + static const unsigned int vin1_field_b_pins[] = { 3892 + RCAR_GP_PIN(1, 13), 3893 + }; 3894 + static const unsigned int vin1_field_b_mux[] = { 3895 + VI1_FIELD_B_MARK, 3952 3896 }; 3953 3897 static const unsigned int vin1_clkenb_pins[] = { 3954 3898 RCAR_GP_PIN(1, 26), ··· 3970 3886 static const unsigned int vin1_clkenb_mux[] = { 3971 3887 VI1_CLKENB_MARK, 3972 3888 }; 3889 + static const unsigned int vin1_clkenb_b_pins[] = { 3890 + RCAR_GP_PIN(1, 26), 3891 + }; 3892 + static const unsigned int vin1_clkenb_b_mux[] = { 3893 + VI1_CLKENB_B_MARK, 3894 + }; 3973 3895 static const unsigned int vin1_clk_pins[] = { 3974 3896 RCAR_GP_PIN(2, 9), 3975 3897 }; 3976 3898 static const unsigned int vin1_clk_mux[] = { 3977 3899 VI1_CLK_MARK, 3900 + }; 3901 + static const unsigned int vin1_clk_b_pins[] = { 3902 + RCAR_GP_PIN(3, 15), 3903 + }; 3904 + static const unsigned int vin1_clk_b_mux[] = { 3905 + VI1_CLK_B_MARK, 3978 3906 }; 3979 3907 /* - VIN2 ----------------------------------------------------------------- */ 3980 3908 static const union vin_data vin2_data_pins = { ··· 4055 3959 VI2_R4_MARK, VI2_R5_MARK, 4056 3960 VI2_R6_MARK, VI2_R7_MARK, 4057 3961 }; 3962 + static const unsigned int vin2_g8_pins[] = { 3963 + RCAR_GP_PIN(0, 27), RCAR_GP_PIN(0, 28), 3964 + RCAR_GP_PIN(0, 29), RCAR_GP_PIN(1, 10), 3965 + RCAR_GP_PIN(1, 4), RCAR_GP_PIN(1, 5), 3966 + RCAR_GP_PIN(1, 6), RCAR_GP_PIN(1, 7), 3967 + }; 3968 + static const unsigned int vin2_g8_mux[] = { 3969 + VI2_G0_MARK, VI2_G1_MARK, 3970 + VI2_G2_MARK, VI2_G3_MARK, 3971 + VI2_G4_MARK, VI2_G5_MARK, 3972 + VI2_G6_MARK, VI2_G7_MARK, 3973 + }; 4058 3974 static const unsigned int vin2_sync_pins[] = { 4059 3975 RCAR_GP_PIN(1, 16), /* HSYNC */ 4060 3976 RCAR_GP_PIN(1, 21), /* VSYNC */ ··· 4134 4026 }; 4135 4027 4136 4028 static const struct { 4137 - struct sh_pfc_pin_group common[298]; 4029 + struct sh_pfc_pin_group common[311]; 4030 + #ifdef CONFIG_PINCTRL_PFC_R8A7790 4138 4031 struct sh_pfc_pin_group automotive[1]; 4032 + #endif 4139 4033 } pinmux_groups = { 4140 4034 .common = { 4141 4035 SH_PFC_PIN_GROUP(audio_clk_a), ··· 4420 4310 VIN_DATA_PIN_GROUP(vin1_data, 10), 4421 4311 VIN_DATA_PIN_GROUP(vin1_data, 8), 4422 4312 VIN_DATA_PIN_GROUP(vin1_data, 4), 4313 + VIN_DATA_PIN_GROUP(vin1_data, 24, _b), 4314 + VIN_DATA_PIN_GROUP(vin1_data, 20, _b), 4315 + SH_PFC_PIN_GROUP(vin1_data18_b), 4316 + VIN_DATA_PIN_GROUP(vin1_data, 16, _b), 4317 + VIN_DATA_PIN_GROUP(vin1_data, 12, _b), 4318 + VIN_DATA_PIN_GROUP(vin1_data, 10, _b), 4319 + VIN_DATA_PIN_GROUP(vin1_data, 8, _b), 4320 + VIN_DATA_PIN_GROUP(vin1_data, 4, _b), 4423 4321 SH_PFC_PIN_GROUP(vin1_sync), 4322 + SH_PFC_PIN_GROUP(vin1_sync_b), 4424 4323 SH_PFC_PIN_GROUP(vin1_field), 4324 + SH_PFC_PIN_GROUP(vin1_field_b), 4425 4325 SH_PFC_PIN_GROUP(vin1_clkenb), 4326 + SH_PFC_PIN_GROUP(vin1_clkenb_b), 4426 4327 SH_PFC_PIN_GROUP(vin1_clk), 4328 + SH_PFC_PIN_GROUP(vin1_clk_b), 4427 4329 VIN_DATA_PIN_GROUP(vin2_data, 24), 4428 4330 SH_PFC_PIN_GROUP(vin2_data18), 4429 4331 VIN_DATA_PIN_GROUP(vin2_data, 16), 4430 4332 VIN_DATA_PIN_GROUP(vin2_data, 8), 4431 4333 VIN_DATA_PIN_GROUP(vin2_data, 4), 4334 + SH_PFC_PIN_GROUP(vin2_g8), 4432 4335 SH_PFC_PIN_GROUP(vin2_sync), 4433 4336 SH_PFC_PIN_GROUP(vin2_field), 4434 4337 SH_PFC_PIN_GROUP(vin2_clkenb), ··· 4452 4329 SH_PFC_PIN_GROUP(vin3_clkenb), 4453 4330 SH_PFC_PIN_GROUP(vin3_clk), 4454 4331 }, 4332 + #ifdef CONFIG_PINCTRL_PFC_R8A7790 4455 4333 .automotive = { 4456 4334 SH_PFC_PIN_GROUP(mlb_3pin), 4457 4335 } 4336 + #endif /* CONFIG_PINCTRL_PFC_R8A7790 */ 4458 4337 }; 4459 4338 4460 4339 static const char * const audio_clk_groups[] = { ··· 4600 4475 "intc_irq3", 4601 4476 }; 4602 4477 4478 + #ifdef CONFIG_PINCTRL_PFC_R8A7790 4603 4479 static const char * const mlb_groups[] = { 4604 4480 "mlb_3pin", 4605 4481 }; 4482 + #endif /* CONFIG_PINCTRL_PFC_R8A7790 */ 4606 4483 4607 4484 static const char * const mmc0_groups[] = { 4608 4485 "mmc0_data1", ··· 4911 4784 "vin1_data10", 4912 4785 "vin1_data8", 4913 4786 "vin1_data4", 4787 + "vin1_data24_b", 4788 + "vin1_data20_b", 4789 + "vin1_data18_b", 4790 + "vin1_data16_b", 4791 + "vin1_data12_b", 4792 + "vin1_data10_b", 4793 + "vin1_data8_b", 4794 + "vin1_data4_b", 4914 4795 "vin1_sync", 4796 + "vin1_sync_b", 4915 4797 "vin1_field", 4798 + "vin1_field_b", 4916 4799 "vin1_clkenb", 4800 + "vin1_clkenb_b", 4917 4801 "vin1_clk", 4802 + "vin1_clk_b", 4918 4803 }; 4919 4804 4920 4805 static const char * const vin2_groups[] = { ··· 4935 4796 "vin2_data16", 4936 4797 "vin2_data8", 4937 4798 "vin2_data4", 4799 + "vin2_g8", 4938 4800 "vin2_sync", 4939 4801 "vin2_field", 4940 4802 "vin2_clkenb", ··· 4952 4812 4953 4813 static const struct { 4954 4814 struct sh_pfc_function common[58]; 4815 + #ifdef CONFIG_PINCTRL_PFC_R8A7790 4955 4816 struct sh_pfc_function automotive[1]; 4817 + #endif 4956 4818 } pinmux_functions = { 4957 4819 .common = { 4958 4820 SH_PFC_FUNCTION(audio_clk), ··· 5016 4874 SH_PFC_FUNCTION(vin2), 5017 4875 SH_PFC_FUNCTION(vin3), 5018 4876 }, 4877 + #ifdef CONFIG_PINCTRL_PFC_R8A7790 5019 4878 .automotive = { 5020 4879 SH_PFC_FUNCTION(mlb), 5021 4880 } 4881 + #endif /* CONFIG_PINCTRL_PFC_R8A7790 */ 5022 4882 }; 5023 4883 5024 4884 static const struct pinmux_cfg_reg pinmux_config_regs[] = {
+18
drivers/pinctrl/renesas/pfc-r8a7791.c
··· 1700 1700 PINMUX_GPIO_GP_ALL(), 1701 1701 }; 1702 1702 1703 + #if defined(CONFIG_PINCTRL_PFC_R8A7791) || defined(CONFIG_PINCTRL_PFC_R8A7793) 1703 1704 /* - ADI -------------------------------------------------------------------- */ 1704 1705 static const unsigned int adi_common_pins[] = { 1705 1706 /* ADIDATA, ADICS/SAMP, ADICLK */ ··· 1766 1765 /* ADICHS B 2 */ 1767 1766 ADICHS2_B_MARK, 1768 1767 }; 1768 + #endif /* CONFIG_PINCTRL_PFC_R8A7791 || CONFIG_PINCTRL_PFC_R8A7793 */ 1769 1769 1770 1770 /* - Audio Clock ------------------------------------------------------------ */ 1771 1771 static const unsigned int audio_clk_a_pins[] = { ··· 2555 2553 static const unsigned int intc_irq3_mux[] = { 2556 2554 IRQ3_MARK, 2557 2555 }; 2556 + 2557 + #if defined(CONFIG_PINCTRL_PFC_R8A7791) || defined(CONFIG_PINCTRL_PFC_R8A7793) 2558 2558 /* - MLB+ ------------------------------------------------------------------- */ 2559 2559 static const unsigned int mlb_3pin_pins[] = { 2560 2560 RCAR_GP_PIN(7, 7), RCAR_GP_PIN(7, 8), RCAR_GP_PIN(7, 9), ··· 2564 2560 static const unsigned int mlb_3pin_mux[] = { 2565 2561 MLB_CLK_MARK, MLB_SIG_MARK, MLB_DAT_MARK, 2566 2562 }; 2563 + #endif /* CONFIG_PINCTRL_PFC_R8A7791 || CONFIG_PINCTRL_PFC_R8A7793 */ 2564 + 2567 2565 /* - MMCIF ------------------------------------------------------------------ */ 2568 2566 static const unsigned int mmc_data1_pins[] = { 2569 2567 /* D[0] */ ··· 4458 4452 4459 4453 static const struct { 4460 4454 struct sh_pfc_pin_group common[346]; 4455 + #if defined(CONFIG_PINCTRL_PFC_R8A7791) || defined(CONFIG_PINCTRL_PFC_R8A7793) 4461 4456 struct sh_pfc_pin_group automotive[9]; 4457 + #endif 4462 4458 } pinmux_groups = { 4463 4459 .common = { 4464 4460 SH_PFC_PIN_GROUP(audio_clk_a), ··· 4810 4802 SH_PFC_PIN_GROUP(vin2_clkenb), 4811 4803 SH_PFC_PIN_GROUP(vin2_clk), 4812 4804 }, 4805 + #if defined(CONFIG_PINCTRL_PFC_R8A7791) || defined(CONFIG_PINCTRL_PFC_R8A7793) 4813 4806 .automotive = { 4814 4807 SH_PFC_PIN_GROUP(adi_common), 4815 4808 SH_PFC_PIN_GROUP(adi_chsel0), ··· 4822 4813 SH_PFC_PIN_GROUP(adi_chsel2_b), 4823 4814 SH_PFC_PIN_GROUP(mlb_3pin), 4824 4815 } 4816 + #endif /* CONFIG_PINCTRL_PFC_R8A7791 || CONFIG_PINCTRL_PFC_R8A7793 */ 4825 4817 }; 4826 4818 4819 + #if defined(CONFIG_PINCTRL_PFC_R8A7791) || defined(CONFIG_PINCTRL_PFC_R8A7793) 4827 4820 static const char * const adi_groups[] = { 4828 4821 "adi_common", 4829 4822 "adi_chsel0", ··· 4836 4825 "adi_chsel1_b", 4837 4826 "adi_chsel2_b", 4838 4827 }; 4828 + #endif /* CONFIG_PINCTRL_PFC_R8A7791 || CONFIG_PINCTRL_PFC_R8A7793 */ 4839 4829 4840 4830 static const char * const audio_clk_groups[] = { 4841 4831 "audio_clk_a", ··· 5014 5002 "intc_irq3", 5015 5003 }; 5016 5004 5005 + #if defined(CONFIG_PINCTRL_PFC_R8A7791) || defined(CONFIG_PINCTRL_PFC_R8A7793) 5017 5006 static const char * const mlb_groups[] = { 5018 5007 "mlb_3pin", 5019 5008 }; 5009 + #endif /* CONFIG_PINCTRL_PFC_R8A7791 || CONFIG_PINCTRL_PFC_R8A7793 */ 5020 5010 5021 5011 static const char * const mmc_groups[] = { 5022 5012 "mmc_data1", ··· 5373 5359 5374 5360 static const struct { 5375 5361 struct sh_pfc_function common[58]; 5362 + #if defined(CONFIG_PINCTRL_PFC_R8A7791) || defined(CONFIG_PINCTRL_PFC_R8A7793) 5376 5363 struct sh_pfc_function automotive[2]; 5364 + #endif 5377 5365 } pinmux_functions = { 5378 5366 .common = { 5379 5367 SH_PFC_FUNCTION(audio_clk), ··· 5437 5421 SH_PFC_FUNCTION(vin1), 5438 5422 SH_PFC_FUNCTION(vin2), 5439 5423 }, 5424 + #if defined(CONFIG_PINCTRL_PFC_R8A7791) || defined(CONFIG_PINCTRL_PFC_R8A7793) 5440 5425 .automotive = { 5441 5426 SH_PFC_FUNCTION(adi), 5442 5427 SH_PFC_FUNCTION(mlb), 5443 5428 } 5429 + #endif /* CONFIG_PINCTRL_PFC_R8A7791 || CONFIG_PINCTRL_PFC_R8A7793 */ 5444 5430 }; 5445 5431 5446 5432 static const struct pinmux_cfg_reg pinmux_config_regs[] = {
+2 -43
drivers/pinctrl/renesas/pfc-r8a77950.c
··· 5820 5820 { /* sentinel */ }, 5821 5821 }; 5822 5822 5823 - static unsigned int r8a77950_pinmux_get_bias(struct sh_pfc *pfc, 5824 - unsigned int pin) 5825 - { 5826 - const struct pinmux_bias_reg *reg; 5827 - unsigned int bit; 5828 - 5829 - reg = sh_pfc_pin_to_bias_reg(pfc, pin, &bit); 5830 - if (!reg) 5831 - return PIN_CONFIG_BIAS_DISABLE; 5832 - 5833 - if (!(sh_pfc_read(pfc, reg->puen) & BIT(bit))) 5834 - return PIN_CONFIG_BIAS_DISABLE; 5835 - else if (sh_pfc_read(pfc, reg->pud) & BIT(bit)) 5836 - return PIN_CONFIG_BIAS_PULL_UP; 5837 - else 5838 - return PIN_CONFIG_BIAS_PULL_DOWN; 5839 - } 5840 - 5841 - static void r8a77950_pinmux_set_bias(struct sh_pfc *pfc, unsigned int pin, 5842 - unsigned int bias) 5843 - { 5844 - const struct pinmux_bias_reg *reg; 5845 - u32 enable, updown; 5846 - unsigned int bit; 5847 - 5848 - reg = sh_pfc_pin_to_bias_reg(pfc, pin, &bit); 5849 - if (!reg) 5850 - return; 5851 - 5852 - enable = sh_pfc_read(pfc, reg->puen) & ~BIT(bit); 5853 - if (bias != PIN_CONFIG_BIAS_DISABLE) 5854 - enable |= BIT(bit); 5855 - 5856 - updown = sh_pfc_read(pfc, reg->pud) & ~BIT(bit); 5857 - if (bias == PIN_CONFIG_BIAS_PULL_UP) 5858 - updown |= BIT(bit); 5859 - 5860 - sh_pfc_write(pfc, reg->pud, updown); 5861 - sh_pfc_write(pfc, reg->puen, enable); 5862 - } 5863 - 5864 5823 static const struct sh_pfc_soc_operations r8a77950_pinmux_ops = { 5865 5824 .pin_to_pocctrl = r8a77950_pin_to_pocctrl, 5866 - .get_bias = r8a77950_pinmux_get_bias, 5867 - .set_bias = r8a77950_pinmux_set_bias, 5825 + .get_bias = rcar_pinmux_get_bias, 5826 + .set_bias = rcar_pinmux_set_bias, 5868 5827 }; 5869 5828 5870 5829 const struct sh_pfc_soc_info r8a77950_pinmux_info = {
+87 -47
drivers/pinctrl/renesas/pfc-r8a77951.c
··· 1827 1827 CANFD1_TX_MARK, CANFD1_RX_MARK, 1828 1828 }; 1829 1829 1830 + #ifdef CONFIG_PINCTRL_PFC_R8A77951 1830 1831 /* - DRIF0 --------------------------------------------------------------- */ 1831 1832 static const unsigned int drif0_ctrl_a_pins[] = { 1832 1833 /* CLK, SYNC */ ··· 2042 2041 static const unsigned int drif3_data1_b_mux[] = { 2043 2042 RIF3_D1_B_MARK, 2044 2043 }; 2044 + #endif /* CONFIG_PINCTRL_PFC_R8A77951 */ 2045 2045 2046 2046 /* - DU --------------------------------------------------------------------- */ 2047 2047 static const unsigned int du_rgb666_pins[] = { ··· 3252 3250 PWM6_B_MARK, 3253 3251 }; 3254 3252 3253 + /* - QSPI0 ------------------------------------------------------------------ */ 3254 + static const unsigned int qspi0_ctrl_pins[] = { 3255 + /* QSPI0_SPCLK, QSPI0_SSL */ 3256 + PIN_QSPI0_SPCLK, PIN_QSPI0_SSL, 3257 + }; 3258 + static const unsigned int qspi0_ctrl_mux[] = { 3259 + QSPI0_SPCLK_MARK, QSPI0_SSL_MARK, 3260 + }; 3261 + static const unsigned int qspi0_data2_pins[] = { 3262 + /* QSPI0_MOSI_IO0, QSPI0_MISO_IO1 */ 3263 + PIN_QSPI0_MOSI_IO0, PIN_QSPI0_MISO_IO1, 3264 + }; 3265 + static const unsigned int qspi0_data2_mux[] = { 3266 + QSPI0_MOSI_IO0_MARK, QSPI0_MISO_IO1_MARK, 3267 + }; 3268 + static const unsigned int qspi0_data4_pins[] = { 3269 + /* QSPI0_MOSI_IO0, QSPI0_MISO_IO1 */ 3270 + PIN_QSPI0_MOSI_IO0, PIN_QSPI0_MISO_IO1, 3271 + /* QSPI0_IO2, QSPI0_IO3 */ 3272 + PIN_QSPI0_IO2, PIN_QSPI0_IO3, 3273 + }; 3274 + static const unsigned int qspi0_data4_mux[] = { 3275 + QSPI0_MOSI_IO0_MARK, QSPI0_MISO_IO1_MARK, 3276 + QSPI0_IO2_MARK, QSPI0_IO3_MARK, 3277 + }; 3278 + /* - QSPI1 ------------------------------------------------------------------ */ 3279 + static const unsigned int qspi1_ctrl_pins[] = { 3280 + /* QSPI1_SPCLK, QSPI1_SSL */ 3281 + PIN_QSPI1_SPCLK, PIN_QSPI1_SSL, 3282 + }; 3283 + static const unsigned int qspi1_ctrl_mux[] = { 3284 + QSPI1_SPCLK_MARK, QSPI1_SSL_MARK, 3285 + }; 3286 + static const unsigned int qspi1_data2_pins[] = { 3287 + /* QSPI1_MOSI_IO0, QSPI1_MISO_IO1 */ 3288 + PIN_QSPI1_MOSI_IO0, PIN_QSPI1_MISO_IO1, 3289 + }; 3290 + static const unsigned int qspi1_data2_mux[] = { 3291 + QSPI1_MOSI_IO0_MARK, QSPI1_MISO_IO1_MARK, 3292 + }; 3293 + static const unsigned int qspi1_data4_pins[] = { 3294 + /* QSPI1_MOSI_IO0, QSPI1_MISO_IO1 */ 3295 + PIN_QSPI1_MOSI_IO0, PIN_QSPI1_MISO_IO1, 3296 + /* QSPI1_IO2, QSPI1_IO3 */ 3297 + PIN_QSPI1_IO2, PIN_QSPI1_IO3, 3298 + }; 3299 + static const unsigned int qspi1_data4_mux[] = { 3300 + QSPI1_MOSI_IO0_MARK, QSPI1_MISO_IO1_MARK, 3301 + QSPI1_IO2_MARK, QSPI1_IO3_MARK, 3302 + }; 3303 + 3255 3304 /* - SATA --------------------------------------------------------------------*/ 3256 3305 static const unsigned int sata0_devslp_a_pins[] = { 3257 3306 /* DEVSLP */ ··· 4211 4158 }; 4212 4159 4213 4160 static const struct { 4214 - struct sh_pfc_pin_group common[320]; 4161 + struct sh_pfc_pin_group common[326]; 4162 + #ifdef CONFIG_PINCTRL_PFC_R8A77951 4215 4163 struct sh_pfc_pin_group automotive[30]; 4164 + #endif 4216 4165 } pinmux_groups = { 4217 4166 .common = { 4218 4167 SH_PFC_PIN_GROUP(audio_clk_a_a), ··· 4416 4361 SH_PFC_PIN_GROUP(pwm5_b), 4417 4362 SH_PFC_PIN_GROUP(pwm6_a), 4418 4363 SH_PFC_PIN_GROUP(pwm6_b), 4364 + SH_PFC_PIN_GROUP(qspi0_ctrl), 4365 + SH_PFC_PIN_GROUP(qspi0_data2), 4366 + SH_PFC_PIN_GROUP(qspi0_data4), 4367 + SH_PFC_PIN_GROUP(qspi1_ctrl), 4368 + SH_PFC_PIN_GROUP(qspi1_data2), 4369 + SH_PFC_PIN_GROUP(qspi1_data4), 4419 4370 SH_PFC_PIN_GROUP(sata0_devslp_a), 4420 4371 SH_PFC_PIN_GROUP(sata0_devslp_b), 4421 4372 SH_PFC_PIN_GROUP(scif0_data), ··· 4544 4483 SH_PFC_PIN_GROUP(vin5_clkenb), 4545 4484 SH_PFC_PIN_GROUP(vin5_clk), 4546 4485 }, 4486 + #ifdef CONFIG_PINCTRL_PFC_R8A77951 4547 4487 .automotive = { 4548 4488 SH_PFC_PIN_GROUP(drif0_ctrl_a), 4549 4489 SH_PFC_PIN_GROUP(drif0_data0_a), ··· 4577 4515 SH_PFC_PIN_GROUP(drif3_data0_b), 4578 4516 SH_PFC_PIN_GROUP(drif3_data1_b), 4579 4517 } 4580 - 4518 + #endif /* CONFIG_PINCTRL_PFC_R8A77951 */ 4581 4519 }; 4582 4520 4583 4521 static const char * const audio_clk_groups[] = { ··· 4636 4574 "canfd1_data", 4637 4575 }; 4638 4576 4577 + #ifdef CONFIG_PINCTRL_PFC_R8A77951 4639 4578 static const char * const drif0_groups[] = { 4640 4579 "drif0_ctrl_a", 4641 4580 "drif0_data0_a", ··· 4678 4615 "drif3_data0_b", 4679 4616 "drif3_data1_b", 4680 4617 }; 4618 + #endif /* CONFIG_PINCTRL_PFC_R8A77951 */ 4681 4619 4682 4620 static const char * const du_groups[] = { 4683 4621 "du_rgb666", ··· 4916 4852 "pwm6_b", 4917 4853 }; 4918 4854 4855 + static const char * const qspi0_groups[] = { 4856 + "qspi0_ctrl", 4857 + "qspi0_data2", 4858 + "qspi0_data4", 4859 + }; 4860 + 4861 + static const char * const qspi1_groups[] = { 4862 + "qspi1_ctrl", 4863 + "qspi1_data2", 4864 + "qspi1_data4", 4865 + }; 4866 + 4919 4867 static const char * const sata0_groups[] = { 4920 4868 "sata0_devslp_a", 4921 4869 "sata0_devslp_b", ··· 5116 5040 }; 5117 5041 5118 5042 static const struct { 5119 - struct sh_pfc_function common[53]; 5043 + struct sh_pfc_function common[55]; 5044 + #ifdef CONFIG_PINCTRL_PFC_R8A77951 5120 5045 struct sh_pfc_function automotive[4]; 5046 + #endif 5121 5047 } pinmux_functions = { 5122 5048 .common = { 5123 5049 SH_PFC_FUNCTION(audio_clk), ··· 5153 5075 SH_PFC_FUNCTION(pwm4), 5154 5076 SH_PFC_FUNCTION(pwm5), 5155 5077 SH_PFC_FUNCTION(pwm6), 5078 + SH_PFC_FUNCTION(qspi0), 5079 + SH_PFC_FUNCTION(qspi1), 5156 5080 SH_PFC_FUNCTION(sata0), 5157 5081 SH_PFC_FUNCTION(scif0), 5158 5082 SH_PFC_FUNCTION(scif1), ··· 5178 5098 SH_PFC_FUNCTION(vin4), 5179 5099 SH_PFC_FUNCTION(vin5), 5180 5100 }, 5101 + #ifdef CONFIG_PINCTRL_PFC_R8A77951 5181 5102 .automotive = { 5182 5103 SH_PFC_FUNCTION(drif0), 5183 5104 SH_PFC_FUNCTION(drif1), 5184 5105 SH_PFC_FUNCTION(drif2), 5185 5106 SH_PFC_FUNCTION(drif3), 5186 5107 } 5187 - 5108 + #endif /* CONFIG_PINCTRL_PFC_R8A77951 */ 5188 5109 }; 5189 5110 5190 5111 static const struct pinmux_cfg_reg pinmux_config_regs[] = { ··· 6272 6191 { /* sentinel */ }, 6273 6192 }; 6274 6193 6275 - static unsigned int r8a77951_pinmux_get_bias(struct sh_pfc *pfc, 6276 - unsigned int pin) 6277 - { 6278 - const struct pinmux_bias_reg *reg; 6279 - unsigned int bit; 6280 - 6281 - reg = sh_pfc_pin_to_bias_reg(pfc, pin, &bit); 6282 - if (!reg) 6283 - return PIN_CONFIG_BIAS_DISABLE; 6284 - 6285 - if (!(sh_pfc_read(pfc, reg->puen) & BIT(bit))) 6286 - return PIN_CONFIG_BIAS_DISABLE; 6287 - else if (sh_pfc_read(pfc, reg->pud) & BIT(bit)) 6288 - return PIN_CONFIG_BIAS_PULL_UP; 6289 - else 6290 - return PIN_CONFIG_BIAS_PULL_DOWN; 6291 - } 6292 - 6293 - static void r8a77951_pinmux_set_bias(struct sh_pfc *pfc, unsigned int pin, 6294 - unsigned int bias) 6295 - { 6296 - const struct pinmux_bias_reg *reg; 6297 - u32 enable, updown; 6298 - unsigned int bit; 6299 - 6300 - reg = sh_pfc_pin_to_bias_reg(pfc, pin, &bit); 6301 - if (!reg) 6302 - return; 6303 - 6304 - enable = sh_pfc_read(pfc, reg->puen) & ~BIT(bit); 6305 - if (bias != PIN_CONFIG_BIAS_DISABLE) 6306 - enable |= BIT(bit); 6307 - 6308 - updown = sh_pfc_read(pfc, reg->pud) & ~BIT(bit); 6309 - if (bias == PIN_CONFIG_BIAS_PULL_UP) 6310 - updown |= BIT(bit); 6311 - 6312 - sh_pfc_write(pfc, reg->pud, updown); 6313 - sh_pfc_write(pfc, reg->puen, enable); 6314 - } 6315 - 6316 6194 static const struct sh_pfc_soc_operations r8a77951_pinmux_ops = { 6317 6195 .pin_to_pocctrl = r8a77951_pin_to_pocctrl, 6318 - .get_bias = r8a77951_pinmux_get_bias, 6319 - .set_bias = r8a77951_pinmux_set_bias, 6196 + .get_bias = rcar_pinmux_get_bias, 6197 + .set_bias = rcar_pinmux_set_bias, 6320 6198 }; 6321 6199 6322 6200 #ifdef CONFIG_PINCTRL_PFC_R8A774E1
+87 -45
drivers/pinctrl/renesas/pfc-r8a7796.c
··· 1831 1831 CANFD1_TX_MARK, CANFD1_RX_MARK, 1832 1832 }; 1833 1833 1834 + #if defined(CONFIG_PINCTRL_PFC_R8A77960) || defined(CONFIG_PINCTRL_PFC_R8A77961) 1834 1835 /* - DRIF0 --------------------------------------------------------------- */ 1835 1836 static const unsigned int drif0_ctrl_a_pins[] = { 1836 1837 /* CLK, SYNC */ ··· 2046 2045 static const unsigned int drif3_data1_b_mux[] = { 2047 2046 RIF3_D1_B_MARK, 2048 2047 }; 2048 + #endif /* CONFIG_PINCTRL_PFC_R8A77960 || CONFIG_PINCTRL_PFC_R8A77961 */ 2049 2049 2050 2050 /* - DU --------------------------------------------------------------------- */ 2051 2051 static const unsigned int du_rgb666_pins[] = { ··· 3257 3255 PWM6_B_MARK, 3258 3256 }; 3259 3257 3258 + /* - QSPI0 ------------------------------------------------------------------ */ 3259 + static const unsigned int qspi0_ctrl_pins[] = { 3260 + /* QSPI0_SPCLK, QSPI0_SSL */ 3261 + PIN_QSPI0_SPCLK, PIN_QSPI0_SSL, 3262 + }; 3263 + static const unsigned int qspi0_ctrl_mux[] = { 3264 + QSPI0_SPCLK_MARK, QSPI0_SSL_MARK, 3265 + }; 3266 + static const unsigned int qspi0_data2_pins[] = { 3267 + /* QSPI0_MOSI_IO0, QSPI0_MISO_IO1 */ 3268 + PIN_QSPI0_MOSI_IO0, PIN_QSPI0_MISO_IO1, 3269 + }; 3270 + static const unsigned int qspi0_data2_mux[] = { 3271 + QSPI0_MOSI_IO0_MARK, QSPI0_MISO_IO1_MARK, 3272 + }; 3273 + static const unsigned int qspi0_data4_pins[] = { 3274 + /* QSPI0_MOSI_IO0, QSPI0_MISO_IO1 */ 3275 + PIN_QSPI0_MOSI_IO0, PIN_QSPI0_MISO_IO1, 3276 + /* QSPI0_IO2, QSPI0_IO3 */ 3277 + PIN_QSPI0_IO2, PIN_QSPI0_IO3, 3278 + }; 3279 + static const unsigned int qspi0_data4_mux[] = { 3280 + QSPI0_MOSI_IO0_MARK, QSPI0_MISO_IO1_MARK, 3281 + QSPI0_IO2_MARK, QSPI0_IO3_MARK, 3282 + }; 3283 + /* - QSPI1 ------------------------------------------------------------------ */ 3284 + static const unsigned int qspi1_ctrl_pins[] = { 3285 + /* QSPI1_SPCLK, QSPI1_SSL */ 3286 + PIN_QSPI1_SPCLK, PIN_QSPI1_SSL, 3287 + }; 3288 + static const unsigned int qspi1_ctrl_mux[] = { 3289 + QSPI1_SPCLK_MARK, QSPI1_SSL_MARK, 3290 + }; 3291 + static const unsigned int qspi1_data2_pins[] = { 3292 + /* QSPI1_MOSI_IO0, QSPI1_MISO_IO1 */ 3293 + PIN_QSPI1_MOSI_IO0, PIN_QSPI1_MISO_IO1, 3294 + }; 3295 + static const unsigned int qspi1_data2_mux[] = { 3296 + QSPI1_MOSI_IO0_MARK, QSPI1_MISO_IO1_MARK, 3297 + }; 3298 + static const unsigned int qspi1_data4_pins[] = { 3299 + /* QSPI1_MOSI_IO0, QSPI1_MISO_IO1 */ 3300 + PIN_QSPI1_MOSI_IO0, PIN_QSPI1_MISO_IO1, 3301 + /* QSPI1_IO2, QSPI1_IO3 */ 3302 + PIN_QSPI1_IO2, PIN_QSPI1_IO3, 3303 + }; 3304 + static const unsigned int qspi1_data4_mux[] = { 3305 + QSPI1_MOSI_IO0_MARK, QSPI1_MISO_IO1_MARK, 3306 + QSPI1_IO2_MARK, QSPI1_IO3_MARK, 3307 + }; 3308 + 3260 3309 /* - SCIF0 ------------------------------------------------------------------ */ 3261 3310 static const unsigned int scif0_data_pins[] = { 3262 3311 /* RX, TX */ ··· 4185 4132 }; 4186 4133 4187 4134 static const struct { 4188 - struct sh_pfc_pin_group common[316]; 4135 + struct sh_pfc_pin_group common[322]; 4136 + #if defined(CONFIG_PINCTRL_PFC_R8A77960) || defined(CONFIG_PINCTRL_PFC_R8A77961) 4189 4137 struct sh_pfc_pin_group automotive[30]; 4138 + #endif 4190 4139 } pinmux_groups = { 4191 4140 .common = { 4192 4141 SH_PFC_PIN_GROUP(audio_clk_a_a), ··· 4390 4335 SH_PFC_PIN_GROUP(pwm5_b), 4391 4336 SH_PFC_PIN_GROUP(pwm6_a), 4392 4337 SH_PFC_PIN_GROUP(pwm6_b), 4338 + SH_PFC_PIN_GROUP(qspi0_ctrl), 4339 + SH_PFC_PIN_GROUP(qspi0_data2), 4340 + SH_PFC_PIN_GROUP(qspi0_data4), 4341 + SH_PFC_PIN_GROUP(qspi1_ctrl), 4342 + SH_PFC_PIN_GROUP(qspi1_data2), 4343 + SH_PFC_PIN_GROUP(qspi1_data4), 4393 4344 SH_PFC_PIN_GROUP(scif0_data), 4394 4345 SH_PFC_PIN_GROUP(scif0_clk), 4395 4346 SH_PFC_PIN_GROUP(scif0_ctrl), ··· 4514 4453 SH_PFC_PIN_GROUP(vin5_clkenb), 4515 4454 SH_PFC_PIN_GROUP(vin5_clk), 4516 4455 }, 4456 + #if defined(CONFIG_PINCTRL_PFC_R8A77960) || defined(CONFIG_PINCTRL_PFC_R8A77961) 4517 4457 .automotive = { 4518 4458 SH_PFC_PIN_GROUP(drif0_ctrl_a), 4519 4459 SH_PFC_PIN_GROUP(drif0_data0_a), ··· 4547 4485 SH_PFC_PIN_GROUP(drif3_data0_b), 4548 4486 SH_PFC_PIN_GROUP(drif3_data1_b), 4549 4487 } 4488 + #endif /* CONFIG_PINCTRL_PFC_R8A77960 || CONFIG_PINCTRL_PFC_R8A77961 */ 4550 4489 }; 4551 4490 4552 4491 static const char * const audio_clk_groups[] = { ··· 4606 4543 "canfd1_data", 4607 4544 }; 4608 4545 4546 + #if defined(CONFIG_PINCTRL_PFC_R8A77960) || defined(CONFIG_PINCTRL_PFC_R8A77961) 4609 4547 static const char * const drif0_groups[] = { 4610 4548 "drif0_ctrl_a", 4611 4549 "drif0_data0_a", ··· 4648 4584 "drif3_data0_b", 4649 4585 "drif3_data1_b", 4650 4586 }; 4587 + #endif /* CONFIG_PINCTRL_PFC_R8A77960 || CONFIG_PINCTRL_PFC_R8A77961 */ 4651 4588 4652 4589 static const char * const du_groups[] = { 4653 4590 "du_rgb666", ··· 4886 4821 "pwm6_b", 4887 4822 }; 4888 4823 4824 + static const char * const qspi0_groups[] = { 4825 + "qspi0_ctrl", 4826 + "qspi0_data2", 4827 + "qspi0_data4", 4828 + }; 4829 + 4830 + static const char * const qspi1_groups[] = { 4831 + "qspi1_ctrl", 4832 + "qspi1_data2", 4833 + "qspi1_data4", 4834 + }; 4835 + 4889 4836 static const char * const scif0_groups[] = { 4890 4837 "scif0_data", 4891 4838 "scif0_clk", ··· 5073 4996 }; 5074 4997 5075 4998 static const struct { 5076 - struct sh_pfc_function common[50]; 4999 + struct sh_pfc_function common[52]; 5000 + #if defined(CONFIG_PINCTRL_PFC_R8A77960) || defined(CONFIG_PINCTRL_PFC_R8A77961) 5077 5001 struct sh_pfc_function automotive[4]; 5002 + #endif 5078 5003 } pinmux_functions = { 5079 5004 .common = { 5080 5005 SH_PFC_FUNCTION(audio_clk), ··· 5110 5031 SH_PFC_FUNCTION(pwm4), 5111 5032 SH_PFC_FUNCTION(pwm5), 5112 5033 SH_PFC_FUNCTION(pwm6), 5034 + SH_PFC_FUNCTION(qspi0), 5035 + SH_PFC_FUNCTION(qspi1), 5113 5036 SH_PFC_FUNCTION(scif0), 5114 5037 SH_PFC_FUNCTION(scif1), 5115 5038 SH_PFC_FUNCTION(scif2), ··· 5132 5051 SH_PFC_FUNCTION(vin4), 5133 5052 SH_PFC_FUNCTION(vin5), 5134 5053 }, 5054 + #if defined(CONFIG_PINCTRL_PFC_R8A77960) || defined(CONFIG_PINCTRL_PFC_R8A77961) 5135 5055 .automotive = { 5136 5056 SH_PFC_FUNCTION(drif0), 5137 5057 SH_PFC_FUNCTION(drif1), 5138 5058 SH_PFC_FUNCTION(drif2), 5139 5059 SH_PFC_FUNCTION(drif3), 5140 5060 } 5061 + #endif /* CONFIG_PINCTRL_PFC_R8A77960 || CONFIG_PINCTRL_PFC_R8A77961 */ 5141 5062 }; 5142 5063 5143 5064 static const struct pinmux_cfg_reg pinmux_config_regs[] = { ··· 6221 6138 { /* sentinel */ }, 6222 6139 }; 6223 6140 6224 - static unsigned int r8a7796_pinmux_get_bias(struct sh_pfc *pfc, 6225 - unsigned int pin) 6226 - { 6227 - const struct pinmux_bias_reg *reg; 6228 - unsigned int bit; 6229 - 6230 - reg = sh_pfc_pin_to_bias_reg(pfc, pin, &bit); 6231 - if (!reg) 6232 - return PIN_CONFIG_BIAS_DISABLE; 6233 - 6234 - if (!(sh_pfc_read(pfc, reg->puen) & BIT(bit))) 6235 - return PIN_CONFIG_BIAS_DISABLE; 6236 - else if (sh_pfc_read(pfc, reg->pud) & BIT(bit)) 6237 - return PIN_CONFIG_BIAS_PULL_UP; 6238 - else 6239 - return PIN_CONFIG_BIAS_PULL_DOWN; 6240 - } 6241 - 6242 - static void r8a7796_pinmux_set_bias(struct sh_pfc *pfc, unsigned int pin, 6243 - unsigned int bias) 6244 - { 6245 - const struct pinmux_bias_reg *reg; 6246 - u32 enable, updown; 6247 - unsigned int bit; 6248 - 6249 - reg = sh_pfc_pin_to_bias_reg(pfc, pin, &bit); 6250 - if (!reg) 6251 - return; 6252 - 6253 - enable = sh_pfc_read(pfc, reg->puen) & ~BIT(bit); 6254 - if (bias != PIN_CONFIG_BIAS_DISABLE) 6255 - enable |= BIT(bit); 6256 - 6257 - updown = sh_pfc_read(pfc, reg->pud) & ~BIT(bit); 6258 - if (bias == PIN_CONFIG_BIAS_PULL_UP) 6259 - updown |= BIT(bit); 6260 - 6261 - sh_pfc_write(pfc, reg->pud, updown); 6262 - sh_pfc_write(pfc, reg->puen, enable); 6263 - } 6264 - 6265 6141 static const struct sh_pfc_soc_operations r8a7796_pinmux_ops = { 6266 6142 .pin_to_pocctrl = r8a7796_pin_to_pocctrl, 6267 - .get_bias = r8a7796_pinmux_get_bias, 6268 - .set_bias = r8a7796_pinmux_set_bias, 6143 + .get_bias = rcar_pinmux_get_bias, 6144 + .set_bias = rcar_pinmux_set_bias, 6269 6145 }; 6270 6146 6271 6147 #ifdef CONFIG_PINCTRL_PFC_R8A774A1
+87 -45
drivers/pinctrl/renesas/pfc-r8a77965.c
··· 1847 1847 CANFD1_TX_MARK, CANFD1_RX_MARK, 1848 1848 }; 1849 1849 1850 + #ifdef CONFIG_PINCTRL_PFC_R8A77965 1850 1851 /* - DRIF0 --------------------------------------------------------------- */ 1851 1852 static const unsigned int drif0_ctrl_a_pins[] = { 1852 1853 /* CLK, SYNC */ ··· 2121 2120 static const unsigned int drif3_data1_b_mux[] = { 2122 2121 RIF3_D1_B_MARK, 2123 2122 }; 2123 + #endif /* CONFIG_PINCTRL_PFC_R8A77965 */ 2124 2124 2125 2125 /* - DU --------------------------------------------------------------------- */ 2126 2126 static const unsigned int du_rgb666_pins[] = { ··· 3408 3406 PWM6_B_MARK, 3409 3407 }; 3410 3408 3409 + /* - QSPI0 ------------------------------------------------------------------ */ 3410 + static const unsigned int qspi0_ctrl_pins[] = { 3411 + /* QSPI0_SPCLK, QSPI0_SSL */ 3412 + PIN_QSPI0_SPCLK, PIN_QSPI0_SSL, 3413 + }; 3414 + static const unsigned int qspi0_ctrl_mux[] = { 3415 + QSPI0_SPCLK_MARK, QSPI0_SSL_MARK, 3416 + }; 3417 + static const unsigned int qspi0_data2_pins[] = { 3418 + /* QSPI0_MOSI_IO0, QSPI0_MISO_IO1 */ 3419 + PIN_QSPI0_MOSI_IO0, PIN_QSPI0_MISO_IO1, 3420 + }; 3421 + static const unsigned int qspi0_data2_mux[] = { 3422 + QSPI0_MOSI_IO0_MARK, QSPI0_MISO_IO1_MARK, 3423 + }; 3424 + static const unsigned int qspi0_data4_pins[] = { 3425 + /* QSPI0_MOSI_IO0, QSPI0_MISO_IO1 */ 3426 + PIN_QSPI0_MOSI_IO0, PIN_QSPI0_MISO_IO1, 3427 + /* QSPI0_IO2, QSPI0_IO3 */ 3428 + PIN_QSPI0_IO2, PIN_QSPI0_IO3, 3429 + }; 3430 + static const unsigned int qspi0_data4_mux[] = { 3431 + QSPI0_MOSI_IO0_MARK, QSPI0_MISO_IO1_MARK, 3432 + QSPI0_IO2_MARK, QSPI0_IO3_MARK, 3433 + }; 3434 + /* - QSPI1 ------------------------------------------------------------------ */ 3435 + static const unsigned int qspi1_ctrl_pins[] = { 3436 + /* QSPI1_SPCLK, QSPI1_SSL */ 3437 + PIN_QSPI1_SPCLK, PIN_QSPI1_SSL, 3438 + }; 3439 + static const unsigned int qspi1_ctrl_mux[] = { 3440 + QSPI1_SPCLK_MARK, QSPI1_SSL_MARK, 3441 + }; 3442 + static const unsigned int qspi1_data2_pins[] = { 3443 + /* QSPI1_MOSI_IO0, QSPI1_MISO_IO1 */ 3444 + PIN_QSPI1_MOSI_IO0, PIN_QSPI1_MISO_IO1, 3445 + }; 3446 + static const unsigned int qspi1_data2_mux[] = { 3447 + QSPI1_MOSI_IO0_MARK, QSPI1_MISO_IO1_MARK, 3448 + }; 3449 + static const unsigned int qspi1_data4_pins[] = { 3450 + /* QSPI1_MOSI_IO0, QSPI1_MISO_IO1 */ 3451 + PIN_QSPI1_MOSI_IO0, PIN_QSPI1_MISO_IO1, 3452 + /* QSPI1_IO2, QSPI1_IO3 */ 3453 + PIN_QSPI1_IO2, PIN_QSPI1_IO3, 3454 + }; 3455 + static const unsigned int qspi1_data4_mux[] = { 3456 + QSPI1_MOSI_IO0_MARK, QSPI1_MISO_IO1_MARK, 3457 + QSPI1_IO2_MARK, QSPI1_IO3_MARK, 3458 + }; 3459 + 3411 3460 /* - SATA --------------------------------------------------------------------*/ 3412 3461 static const unsigned int sata0_devslp_a_pins[] = { 3413 3462 /* DEVSLP */ ··· 4432 4379 }; 4433 4380 4434 4381 static const struct { 4435 - struct sh_pfc_pin_group common[318]; 4382 + struct sh_pfc_pin_group common[324]; 4383 + #ifdef CONFIG_PINCTRL_PFC_R8A77965 4436 4384 struct sh_pfc_pin_group automotive[30]; 4385 + #endif 4437 4386 } pinmux_groups = { 4438 4387 .common = { 4439 4388 SH_PFC_PIN_GROUP(audio_clk_a_a), ··· 4637 4582 SH_PFC_PIN_GROUP(pwm5_b), 4638 4583 SH_PFC_PIN_GROUP(pwm6_a), 4639 4584 SH_PFC_PIN_GROUP(pwm6_b), 4585 + SH_PFC_PIN_GROUP(qspi0_ctrl), 4586 + SH_PFC_PIN_GROUP(qspi0_data2), 4587 + SH_PFC_PIN_GROUP(qspi0_data4), 4588 + SH_PFC_PIN_GROUP(qspi1_ctrl), 4589 + SH_PFC_PIN_GROUP(qspi1_data2), 4590 + SH_PFC_PIN_GROUP(qspi1_data4), 4640 4591 SH_PFC_PIN_GROUP(sata0_devslp_a), 4641 4592 SH_PFC_PIN_GROUP(sata0_devslp_b), 4642 4593 SH_PFC_PIN_GROUP(scif0_data), ··· 4763 4702 SH_PFC_PIN_GROUP(vin5_clkenb), 4764 4703 SH_PFC_PIN_GROUP(vin5_clk), 4765 4704 }, 4705 + #ifdef CONFIG_PINCTRL_PFC_R8A77965 4766 4706 .automotive = { 4767 4707 SH_PFC_PIN_GROUP(drif0_ctrl_a), 4768 4708 SH_PFC_PIN_GROUP(drif0_data0_a), ··· 4796 4734 SH_PFC_PIN_GROUP(drif3_data0_b), 4797 4735 SH_PFC_PIN_GROUP(drif3_data1_b), 4798 4736 } 4737 + #endif /* CONFIG_PINCTRL_PFC_R8A77965 */ 4799 4738 }; 4800 4739 4801 4740 static const char * const audio_clk_groups[] = { ··· 4855 4792 "canfd1_data", 4856 4793 }; 4857 4794 4795 + #ifdef CONFIG_PINCTRL_PFC_R8A77965 4858 4796 static const char * const drif0_groups[] = { 4859 4797 "drif0_ctrl_a", 4860 4798 "drif0_data0_a", ··· 4897 4833 "drif3_data0_b", 4898 4834 "drif3_data1_b", 4899 4835 }; 4836 + #endif /* CONFIG_PINCTRL_PFC_R8A77965 */ 4900 4837 4901 4838 static const char * const du_groups[] = { 4902 4839 "du_rgb666", ··· 5135 5070 "pwm6_b", 5136 5071 }; 5137 5072 5073 + static const char * const qspi0_groups[] = { 5074 + "qspi0_ctrl", 5075 + "qspi0_data2", 5076 + "qspi0_data4", 5077 + }; 5078 + 5079 + static const char * const qspi1_groups[] = { 5080 + "qspi1_ctrl", 5081 + "qspi1_data2", 5082 + "qspi1_data4", 5083 + }; 5084 + 5138 5085 static const char * const sata0_groups[] = { 5139 5086 "sata0_devslp_a", 5140 5087 "sata0_devslp_b", ··· 5326 5249 }; 5327 5250 5328 5251 static const struct { 5329 - struct sh_pfc_function common[51]; 5252 + struct sh_pfc_function common[53]; 5253 + #ifdef CONFIG_PINCTRL_PFC_R8A77965 5330 5254 struct sh_pfc_function automotive[4]; 5255 + #endif 5331 5256 } pinmux_functions = { 5332 5257 .common = { 5333 5258 SH_PFC_FUNCTION(audio_clk), ··· 5363 5284 SH_PFC_FUNCTION(pwm4), 5364 5285 SH_PFC_FUNCTION(pwm5), 5365 5286 SH_PFC_FUNCTION(pwm6), 5287 + SH_PFC_FUNCTION(qspi0), 5288 + SH_PFC_FUNCTION(qspi1), 5366 5289 SH_PFC_FUNCTION(sata0), 5367 5290 SH_PFC_FUNCTION(scif0), 5368 5291 SH_PFC_FUNCTION(scif1), ··· 5386 5305 SH_PFC_FUNCTION(vin4), 5387 5306 SH_PFC_FUNCTION(vin5), 5388 5307 }, 5308 + #ifdef CONFIG_PINCTRL_PFC_R8A77965 5389 5309 .automotive = { 5390 5310 SH_PFC_FUNCTION(drif0), 5391 5311 SH_PFC_FUNCTION(drif1), 5392 5312 SH_PFC_FUNCTION(drif2), 5393 5313 SH_PFC_FUNCTION(drif3), 5394 5314 } 5315 + #endif /* CONFIG_PINCTRL_PFC_R8A77965 */ 5395 5316 }; 5396 5317 5397 5318 static const struct pinmux_cfg_reg pinmux_config_regs[] = { ··· 6475 6392 { /* sentinel */ }, 6476 6393 }; 6477 6394 6478 - static unsigned int r8a77965_pinmux_get_bias(struct sh_pfc *pfc, 6479 - unsigned int pin) 6480 - { 6481 - const struct pinmux_bias_reg *reg; 6482 - unsigned int bit; 6483 - 6484 - reg = sh_pfc_pin_to_bias_reg(pfc, pin, &bit); 6485 - if (!reg) 6486 - return PIN_CONFIG_BIAS_DISABLE; 6487 - 6488 - if (!(sh_pfc_read(pfc, reg->puen) & BIT(bit))) 6489 - return PIN_CONFIG_BIAS_DISABLE; 6490 - else if (sh_pfc_read(pfc, reg->pud) & BIT(bit)) 6491 - return PIN_CONFIG_BIAS_PULL_UP; 6492 - else 6493 - return PIN_CONFIG_BIAS_PULL_DOWN; 6494 - } 6495 - 6496 - static void r8a77965_pinmux_set_bias(struct sh_pfc *pfc, unsigned int pin, 6497 - unsigned int bias) 6498 - { 6499 - const struct pinmux_bias_reg *reg; 6500 - u32 enable, updown; 6501 - unsigned int bit; 6502 - 6503 - reg = sh_pfc_pin_to_bias_reg(pfc, pin, &bit); 6504 - if (!reg) 6505 - return; 6506 - 6507 - enable = sh_pfc_read(pfc, reg->puen) & ~BIT(bit); 6508 - if (bias != PIN_CONFIG_BIAS_DISABLE) 6509 - enable |= BIT(bit); 6510 - 6511 - updown = sh_pfc_read(pfc, reg->pud) & ~BIT(bit); 6512 - if (bias == PIN_CONFIG_BIAS_PULL_UP) 6513 - updown |= BIT(bit); 6514 - 6515 - sh_pfc_write(pfc, reg->pud, updown); 6516 - sh_pfc_write(pfc, reg->puen, enable); 6517 - } 6518 - 6519 6395 static const struct sh_pfc_soc_operations r8a77965_pinmux_ops = { 6520 6396 .pin_to_pocctrl = r8a77965_pin_to_pocctrl, 6521 - .get_bias = r8a77965_pinmux_get_bias, 6522 - .set_bias = r8a77965_pinmux_set_bias, 6397 + .get_bias = rcar_pinmux_get_bias, 6398 + .set_bias = rcar_pinmux_set_bias, 6523 6399 }; 6524 6400 6525 6401 #ifdef CONFIG_PINCTRL_PFC_R8A774B1
+87 -45
drivers/pinctrl/renesas/pfc-r8a77990.c
··· 1593 1593 CANFD1_TX_MARK, CANFD1_RX_MARK, 1594 1594 }; 1595 1595 1596 + #ifdef CONFIG_PINCTRL_PFC_R8A77990 1596 1597 /* - DRIF0 --------------------------------------------------------------- */ 1597 1598 static const unsigned int drif0_ctrl_a_pins[] = { 1598 1599 /* CLK, SYNC */ ··· 1786 1785 static const unsigned int drif3_data1_b_mux[] = { 1787 1786 RIF3_D1_B_MARK, 1788 1787 }; 1788 + #endif /* CONFIG_PINCTRL_PFC_R8A77990 */ 1789 1789 1790 1790 /* - DU --------------------------------------------------------------------- */ 1791 1791 static const unsigned int du_rgb666_pins[] = { ··· 2810 2808 PWM6_B_MARK, 2811 2809 }; 2812 2810 2811 + /* - QSPI0 ------------------------------------------------------------------ */ 2812 + static const unsigned int qspi0_ctrl_pins[] = { 2813 + /* QSPI0_SPCLK, QSPI0_SSL */ 2814 + RCAR_GP_PIN(2, 0), RCAR_GP_PIN(2, 5), 2815 + }; 2816 + static const unsigned int qspi0_ctrl_mux[] = { 2817 + QSPI0_SPCLK_MARK, QSPI0_SSL_MARK, 2818 + }; 2819 + static const unsigned int qspi0_data2_pins[] = { 2820 + /* QSPI0_MOSI_IO0, QSPI0_MISO_IO1 */ 2821 + RCAR_GP_PIN(2, 1), RCAR_GP_PIN(2, 2), 2822 + }; 2823 + static const unsigned int qspi0_data2_mux[] = { 2824 + QSPI0_MOSI_IO0_MARK, QSPI0_MISO_IO1_MARK, 2825 + }; 2826 + static const unsigned int qspi0_data4_pins[] = { 2827 + /* QSPI0_MOSI_IO0, QSPI0_MISO_IO1 */ 2828 + RCAR_GP_PIN(2, 1), RCAR_GP_PIN(2, 2), 2829 + /* QSPI0_IO2, QSPI0_IO3 */ 2830 + RCAR_GP_PIN(2, 3), RCAR_GP_PIN(2, 4), 2831 + }; 2832 + static const unsigned int qspi0_data4_mux[] = { 2833 + QSPI0_MOSI_IO0_MARK, QSPI0_MISO_IO1_MARK, 2834 + QSPI0_IO2_MARK, QSPI0_IO3_MARK, 2835 + }; 2836 + /* - QSPI1 ------------------------------------------------------------------ */ 2837 + static const unsigned int qspi1_ctrl_pins[] = { 2838 + /* QSPI1_SPCLK, QSPI1_SSL */ 2839 + RCAR_GP_PIN(2, 6), RCAR_GP_PIN(2, 11), 2840 + }; 2841 + static const unsigned int qspi1_ctrl_mux[] = { 2842 + QSPI1_SPCLK_MARK, QSPI1_SSL_MARK, 2843 + }; 2844 + static const unsigned int qspi1_data2_pins[] = { 2845 + /* QSPI1_MOSI_IO0, QSPI1_MISO_IO1 */ 2846 + RCAR_GP_PIN(2, 7), RCAR_GP_PIN(2, 8), 2847 + }; 2848 + static const unsigned int qspi1_data2_mux[] = { 2849 + QSPI1_MOSI_IO0_MARK, QSPI1_MISO_IO1_MARK, 2850 + }; 2851 + static const unsigned int qspi1_data4_pins[] = { 2852 + /* QSPI1_MOSI_IO0, QSPI1_MISO_IO1 */ 2853 + RCAR_GP_PIN(2, 7), RCAR_GP_PIN(2, 8), 2854 + /* QSPI1_IO2, QSPI1_IO3 */ 2855 + RCAR_GP_PIN(2, 9), RCAR_GP_PIN(2, 10), 2856 + }; 2857 + static const unsigned int qspi1_data4_mux[] = { 2858 + QSPI1_MOSI_IO0_MARK, QSPI1_MISO_IO1_MARK, 2859 + QSPI1_IO2_MARK, QSPI1_IO3_MARK, 2860 + }; 2861 + 2813 2862 /* - SCIF0 ------------------------------------------------------------------ */ 2814 2863 static const unsigned int scif0_data_a_pins[] = { 2815 2864 /* RX, TX */ ··· 3813 3760 }; 3814 3761 3815 3762 static const struct { 3816 - struct sh_pfc_pin_group common[247]; 3763 + struct sh_pfc_pin_group common[253]; 3764 + #ifdef CONFIG_PINCTRL_PFC_R8A77990 3817 3765 struct sh_pfc_pin_group automotive[21]; 3766 + #endif 3818 3767 } pinmux_groups = { 3819 3768 .common = { 3820 3769 SH_PFC_PIN_GROUP(audio_clk_a), ··· 3961 3906 SH_PFC_PIN_GROUP(pwm5_b), 3962 3907 SH_PFC_PIN_GROUP(pwm6_a), 3963 3908 SH_PFC_PIN_GROUP(pwm6_b), 3909 + SH_PFC_PIN_GROUP(qspi0_ctrl), 3910 + SH_PFC_PIN_GROUP(qspi0_data2), 3911 + SH_PFC_PIN_GROUP(qspi0_data4), 3912 + SH_PFC_PIN_GROUP(qspi1_ctrl), 3913 + SH_PFC_PIN_GROUP(qspi1_data2), 3914 + SH_PFC_PIN_GROUP(qspi1_data4), 3964 3915 SH_PFC_PIN_GROUP(scif0_data_a), 3965 3916 SH_PFC_PIN_GROUP(scif0_clk_a), 3966 3917 SH_PFC_PIN_GROUP(scif0_ctrl_a), ··· 4073 4012 SH_PFC_PIN_GROUP(vin5_clk_a), 4074 4013 SH_PFC_PIN_GROUP(vin5_clk_b), 4075 4014 }, 4015 + #ifdef CONFIG_PINCTRL_PFC_R8A77990 4076 4016 .automotive = { 4077 4017 SH_PFC_PIN_GROUP(drif0_ctrl_a), 4078 4018 SH_PFC_PIN_GROUP(drif0_data0_a), ··· 4097 4035 SH_PFC_PIN_GROUP(drif3_data0_b), 4098 4036 SH_PFC_PIN_GROUP(drif3_data1_b), 4099 4037 } 4038 + #endif /* CONFIG_PINCTRL_PFC_R8A77990 */ 4100 4039 }; 4101 4040 4102 4041 static const char * const audio_clk_groups[] = { ··· 4151 4088 "canfd1_data", 4152 4089 }; 4153 4090 4091 + #ifdef CONFIG_PINCTRL_PFC_R8A77990 4154 4092 static const char * const drif0_groups[] = { 4155 4093 "drif0_ctrl_a", 4156 4094 "drif0_data0_a", ··· 4184 4120 "drif3_data0_b", 4185 4121 "drif3_data1_b", 4186 4122 }; 4123 + #endif /* CONFIG_PINCTRL_PFC_R8A77990 */ 4187 4124 4188 4125 static const char * const du_groups[] = { 4189 4126 "du_rgb666", ··· 4370 4305 "pwm6_b", 4371 4306 }; 4372 4307 4308 + static const char * const qspi0_groups[] = { 4309 + "qspi0_ctrl", 4310 + "qspi0_data2", 4311 + "qspi0_data4", 4312 + }; 4313 + 4314 + static const char * const qspi1_groups[] = { 4315 + "qspi1_ctrl", 4316 + "qspi1_data2", 4317 + "qspi1_data4", 4318 + }; 4319 + 4373 4320 static const char * const scif0_groups[] = { 4374 4321 "scif0_data_a", 4375 4322 "scif0_clk_a", ··· 4536 4459 }; 4537 4460 4538 4461 static const struct { 4539 - struct sh_pfc_function common[47]; 4462 + struct sh_pfc_function common[49]; 4463 + #ifdef CONFIG_PINCTRL_PFC_R8A77990 4540 4464 struct sh_pfc_function automotive[4]; 4465 + #endif 4541 4466 } pinmux_functions = { 4542 4467 .common = { 4543 4468 SH_PFC_FUNCTION(audio_clk), ··· 4573 4494 SH_PFC_FUNCTION(pwm4), 4574 4495 SH_PFC_FUNCTION(pwm5), 4575 4496 SH_PFC_FUNCTION(pwm6), 4497 + SH_PFC_FUNCTION(qspi0), 4498 + SH_PFC_FUNCTION(qspi1), 4576 4499 SH_PFC_FUNCTION(scif0), 4577 4500 SH_PFC_FUNCTION(scif1), 4578 4501 SH_PFC_FUNCTION(scif2), ··· 4592 4511 SH_PFC_FUNCTION(vin4), 4593 4512 SH_PFC_FUNCTION(vin5), 4594 4513 }, 4514 + #ifdef CONFIG_PINCTRL_PFC_R8A77990 4595 4515 .automotive = { 4596 4516 SH_PFC_FUNCTION(drif0), 4597 4517 SH_PFC_FUNCTION(drif1), 4598 4518 SH_PFC_FUNCTION(drif2), 4599 4519 SH_PFC_FUNCTION(drif3), 4600 4520 } 4521 + #endif /* CONFIG_PINCTRL_PFC_R8A77990 */ 4601 4522 }; 4602 4523 4603 4524 static const struct pinmux_cfg_reg pinmux_config_regs[] = { ··· 5308 5225 { /* sentinel */ }, 5309 5226 }; 5310 5227 5311 - static unsigned int r8a77990_pinmux_get_bias(struct sh_pfc *pfc, 5312 - unsigned int pin) 5313 - { 5314 - const struct pinmux_bias_reg *reg; 5315 - unsigned int bit; 5316 - 5317 - reg = sh_pfc_pin_to_bias_reg(pfc, pin, &bit); 5318 - if (!reg) 5319 - return PIN_CONFIG_BIAS_DISABLE; 5320 - 5321 - if (!(sh_pfc_read(pfc, reg->puen) & BIT(bit))) 5322 - return PIN_CONFIG_BIAS_DISABLE; 5323 - else if (sh_pfc_read(pfc, reg->pud) & BIT(bit)) 5324 - return PIN_CONFIG_BIAS_PULL_UP; 5325 - else 5326 - return PIN_CONFIG_BIAS_PULL_DOWN; 5327 - } 5328 - 5329 - static void r8a77990_pinmux_set_bias(struct sh_pfc *pfc, unsigned int pin, 5330 - unsigned int bias) 5331 - { 5332 - const struct pinmux_bias_reg *reg; 5333 - u32 enable, updown; 5334 - unsigned int bit; 5335 - 5336 - reg = sh_pfc_pin_to_bias_reg(pfc, pin, &bit); 5337 - if (!reg) 5338 - return; 5339 - 5340 - enable = sh_pfc_read(pfc, reg->puen) & ~BIT(bit); 5341 - if (bias != PIN_CONFIG_BIAS_DISABLE) 5342 - enable |= BIT(bit); 5343 - 5344 - updown = sh_pfc_read(pfc, reg->pud) & ~BIT(bit); 5345 - if (bias == PIN_CONFIG_BIAS_PULL_UP) 5346 - updown |= BIT(bit); 5347 - 5348 - sh_pfc_write(pfc, reg->pud, updown); 5349 - sh_pfc_write(pfc, reg->puen, enable); 5350 - } 5351 - 5352 5228 static const struct sh_pfc_soc_operations r8a77990_pinmux_ops = { 5353 5229 .pin_to_pocctrl = r8a77990_pin_to_pocctrl, 5354 - .get_bias = r8a77990_pinmux_get_bias, 5355 - .set_bias = r8a77990_pinmux_set_bias, 5230 + .get_bias = rcar_pinmux_get_bias, 5231 + .set_bias = rcar_pinmux_set_bias, 5356 5232 }; 5357 5233 5358 5234 #ifdef CONFIG_PINCTRL_PFC_R8A774C0
+1 -1
drivers/pinctrl/renesas/pfc-sh73a0.c
··· 4279 4279 return 3300000; 4280 4280 } 4281 4281 4282 - static struct regulator_ops sh73a0_vccq_mc0_ops = { 4282 + static const struct regulator_ops sh73a0_vccq_mc0_ops = { 4283 4283 .enable = sh73a0_vccq_mc0_enable, 4284 4284 .disable = sh73a0_vccq_mc0_disable, 4285 4285 .is_enabled = sh73a0_vccq_mc0_is_enabled,
+1
drivers/pinctrl/renesas/pinctrl-rza1.c
··· 931 931 case PIN_CONFIG_OUTPUT: /* for DT backwards compatibility */ 932 932 case PIN_CONFIG_OUTPUT_ENABLE: 933 933 pinmux_flags |= MUX_FLAGS_SWIO_OUTPUT; 934 + break; 934 935 default: 935 936 break; 936 937
+54 -14
drivers/pinctrl/renesas/pinctrl.c
··· 26 26 #include "../pinconf.h" 27 27 28 28 struct sh_pfc_pin_config { 29 - unsigned int mux_mark; 30 - bool mux_set; 31 - bool gpio_enabled; 29 + u16 gpio_enabled:1; 30 + u16 mux_mark:15; 32 31 }; 33 32 34 33 struct sh_pfc_pinctrl { ··· 370 371 goto done; 371 372 } 372 373 373 - /* All group pins are configured, mark the pins as mux_set */ 374 + /* All group pins are configured, mark the pins as muxed */ 374 375 for (i = 0; i < grp->nr_pins; ++i) { 375 376 int idx = sh_pfc_get_pin_index(pfc, grp->pins[i]); 376 377 struct sh_pfc_pin_config *cfg = &pmx->configs[idx]; 377 378 378 - cfg->mux_set = true; 379 379 cfg->mux_mark = grp->mux[i]; 380 380 } 381 381 ··· 397 399 spin_lock_irqsave(&pfc->lock, flags); 398 400 399 401 if (!pfc->gpio) { 400 - /* If GPIOs are handled externally the pin mux type need to be 402 + /* If GPIOs are handled externally the pin mux type needs to be 401 403 * set to GPIO here. 402 404 */ 403 405 const struct sh_pfc_pin *pin = &pfc->info->pins[idx]; ··· 430 432 spin_lock_irqsave(&pfc->lock, flags); 431 433 cfg->gpio_enabled = false; 432 434 /* If mux is already set, this configures it here */ 433 - if (cfg->mux_set) 435 + if (cfg->mux_mark) 434 436 sh_pfc_config_mux(pfc, cfg->mux_mark, PINMUX_TYPE_FUNCTION); 435 437 spin_unlock_irqrestore(&pfc->lock, flags); 436 438 } 437 439 440 + #ifdef CONFIG_PINCTRL_SH_PFC_GPIO 438 441 static int sh_pfc_gpio_set_direction(struct pinctrl_dev *pctldev, 439 442 struct pinctrl_gpio_range *range, 440 443 unsigned offset, bool input) ··· 449 450 unsigned int dir; 450 451 int ret; 451 452 452 - /* Check if the requested direction is supported by the pin. Not all SoC 453 - * provide pin config data, so perform the check conditionally. 453 + /* Check if the requested direction is supported by the pin. Not all 454 + * SoCs provide pin config data, so perform the check conditionally. 454 455 */ 455 456 if (pin->configs) { 456 457 dir = input ? SH_PFC_PIN_CFG_INPUT : SH_PFC_PIN_CFG_OUTPUT; ··· 459 460 } 460 461 461 462 spin_lock_irqsave(&pfc->lock, flags); 462 - 463 463 ret = sh_pfc_config_mux(pfc, pin->enum_id, new_type); 464 - if (ret < 0) 465 - goto done; 466 - 467 - done: 468 464 spin_unlock_irqrestore(&pfc->lock, flags); 469 465 return ret; 470 466 } 467 + #else 468 + #define sh_pfc_gpio_set_direction NULL 469 + #endif 471 470 472 471 static const struct pinmux_ops sh_pfc_pinmux_ops = { 473 472 .get_functions_count = sh_pfc_get_functions_count, ··· 826 829 } 827 830 828 831 return pinctrl_enable(pmx->pctl); 832 + } 833 + 834 + unsigned int rcar_pinmux_get_bias(struct sh_pfc *pfc, unsigned int pin) 835 + { 836 + const struct pinmux_bias_reg *reg; 837 + unsigned int bit; 838 + 839 + reg = sh_pfc_pin_to_bias_reg(pfc, pin, &bit); 840 + if (!reg) 841 + return PIN_CONFIG_BIAS_DISABLE; 842 + 843 + if (!(sh_pfc_read(pfc, reg->puen) & BIT(bit))) 844 + return PIN_CONFIG_BIAS_DISABLE; 845 + else if (!reg->pud || (sh_pfc_read(pfc, reg->pud) & BIT(bit))) 846 + return PIN_CONFIG_BIAS_PULL_UP; 847 + else 848 + return PIN_CONFIG_BIAS_PULL_DOWN; 849 + } 850 + 851 + void rcar_pinmux_set_bias(struct sh_pfc *pfc, unsigned int pin, 852 + unsigned int bias) 853 + { 854 + const struct pinmux_bias_reg *reg; 855 + u32 enable, updown; 856 + unsigned int bit; 857 + 858 + reg = sh_pfc_pin_to_bias_reg(pfc, pin, &bit); 859 + if (!reg) 860 + return; 861 + 862 + enable = sh_pfc_read(pfc, reg->puen) & ~BIT(bit); 863 + if (bias != PIN_CONFIG_BIAS_DISABLE) 864 + enable |= BIT(bit); 865 + 866 + if (reg->pud) { 867 + updown = sh_pfc_read(pfc, reg->pud) & ~BIT(bit); 868 + if (bias == PIN_CONFIG_BIAS_PULL_UP) 869 + updown |= BIT(bit); 870 + 871 + sh_pfc_write(pfc, reg->pud, updown); 872 + } 873 + 874 + sh_pfc_write(pfc, reg->puen, enable); 829 875 }
+7 -5
drivers/pinctrl/renesas/sh_pfc.h
··· 34 34 #define SH_PFC_PIN_CFG_NO_GPIO (1 << 31) 35 35 36 36 struct sh_pfc_pin { 37 - u16 pin; 38 - u16 enum_id; 39 37 const char *name; 40 38 unsigned int configs; 39 + u16 pin; 40 + u16 enum_id; 41 41 }; 42 42 43 43 #define SH_PFC_PIN_GROUP_ALIAS(alias, n) \ ··· 270 270 const char *name; 271 271 const struct sh_pfc_soc_operations *ops; 272 272 273 + #ifdef CONFIG_PINCTRL_SH_PFC_GPIO 273 274 struct pinmux_range input; 274 275 struct pinmux_range output; 276 + const struct pinmux_irq *gpio_irq; 277 + unsigned int gpio_irq_size; 278 + #endif 279 + 275 280 struct pinmux_range function; 276 281 277 282 const struct sh_pfc_pin *pins; ··· 299 294 300 295 const u16 *pinmux_data; 301 296 unsigned int pinmux_data_size; 302 - 303 - const struct pinmux_irq *gpio_irq; 304 - unsigned int gpio_irq_size; 305 297 306 298 u32 unlock_reg; 307 299 };
-5
drivers/pinctrl/samsung/pinctrl-s3c24xx.c
··· 108 108 switch (type) { 109 109 case IRQ_TYPE_EDGE_RISING: 110 110 return EINT_EDGE_RISING; 111 - break; 112 111 case IRQ_TYPE_EDGE_FALLING: 113 112 return EINT_EDGE_FALLING; 114 - break; 115 113 case IRQ_TYPE_EDGE_BOTH: 116 114 return EINT_EDGE_BOTH; 117 - break; 118 115 case IRQ_TYPE_LEVEL_HIGH: 119 116 return EINT_LEVEL_HIGH; 120 - break; 121 117 case IRQ_TYPE_LEVEL_LOW: 122 118 return EINT_LEVEL_LOW; 123 - break; 124 119 default: 125 120 return -EINVAL; 126 121 }
+1 -7
drivers/pinctrl/spear/pinctrl-spear300.c
··· 654 654 655 655 static int spear300_pinctrl_probe(struct platform_device *pdev) 656 656 { 657 - int ret; 658 - 659 657 spear3xx_machdata.groups = spear300_pingroups; 660 658 spear3xx_machdata.ngroups = ARRAY_SIZE(spear300_pingroups); 661 659 spear3xx_machdata.functions = spear300_functions; ··· 667 669 668 670 pmx_init_addr(&spear3xx_machdata, PMX_CONFIG_REG); 669 671 670 - ret = spear_pinctrl_probe(pdev, &spear3xx_machdata); 671 - if (ret) 672 - return ret; 673 - 674 - return 0; 672 + return spear_pinctrl_probe(pdev, &spear3xx_machdata); 675 673 } 676 674 677 675 static struct platform_driver spear300_pinctrl_driver = {
+1 -1
drivers/pinctrl/sunxi/pinctrl-sun50i-a100.c
··· 677 677 SUNXI_FUNCTION_IRQ_BANK(0x6, 6, 19)), 678 678 }; 679 679 680 - static const unsigned int a100_irq_bank_map[] = { 0, 1, 2, 3, 4, 5, 6}; 680 + static const unsigned int a100_irq_bank_map[] = { 1, 2, 3, 4, 5, 6, 7}; 681 681 682 682 static const struct sunxi_pinctrl_desc a100_pinctrl_data = { 683 683 .pins = a100_pins,
+5 -4
drivers/pinctrl/sunxi/pinctrl-sunxi.c
··· 1139 1139 if (irq == pctl->irq[bank]) 1140 1140 break; 1141 1141 1142 - if (bank == pctl->desc->irq_banks) 1143 - return; 1142 + WARN_ON(bank == pctl->desc->irq_banks); 1143 + 1144 + chained_irq_enter(chip, desc); 1144 1145 1145 1146 reg = sunxi_irq_status_reg_from_bank(pctl->desc, bank); 1146 1147 val = readl(pctl->membase + reg); ··· 1149 1148 if (val) { 1150 1149 int irqoffset; 1151 1150 1152 - chained_irq_enter(chip, desc); 1153 1151 for_each_set_bit(irqoffset, &val, IRQ_PER_BANK) { 1154 1152 int pin_irq = irq_find_mapping(pctl->domain, 1155 1153 bank * IRQ_PER_BANK + irqoffset); 1156 1154 generic_handle_irq(pin_irq); 1157 1155 } 1158 - chained_irq_exit(chip, desc); 1159 1156 } 1157 + 1158 + chained_irq_exit(chip, desc); 1160 1159 } 1161 1160 1162 1161 static int sunxi_pinctrl_add_function(struct sunxi_pinctrl *pctl,
+2 -2
include/linux/pinctrl/pinctrl.h
··· 51 51 * @id: an ID number for the chip in this range 52 52 * @base: base offset of the GPIO range 53 53 * @pin_base: base pin number of the GPIO range if pins == NULL 54 - * @pins: enumeration of pins in GPIO range or NULL 55 54 * @npins: number of pins in the GPIO range, including the base number 55 + * @pins: enumeration of pins in GPIO range or NULL 56 56 * @gc: an optional pointer to a gpio_chip 57 57 */ 58 58 struct pinctrl_gpio_range { ··· 61 61 unsigned int id; 62 62 unsigned int base; 63 63 unsigned int pin_base; 64 - unsigned const *pins; 65 64 unsigned int npins; 65 + unsigned const *pins; 66 66 struct gpio_chip *gc; 67 67 }; 68 68