SDM670 Pin Control Driver
Subsystems (6)
cover SDM670 Pin Control Driver
This patch series adds the driver for the Qualcomm Snapdragon 670 TLMM (Top-Level Mode Multiplexer).
This is not ready yet because the dummy pingroups cause debugfs to misbehave. I might be able to find tile values that are safe enough but it would be easier if there was already a way to declare a dummy pingroup.
.../bindings/pinctrl/qcom,sdm670-pinctrl.yaml | 128 ++ drivers/pinctrl/qcom/Kconfig | 9 + drivers/pinctrl/qcom/Makefile | 1 + drivers/pinctrl/qcom/pinctrl-sdm670.c | 1368 ++++++++++++++++++++ 4 files changed, 1506 insertions(+)
PATCH 1/2 dt-bindings: pinctrl: qcom: add sdm670 pinctrl
There is a new driver for the Snapdragon 670 TLMM (Top-Level Mode Multiplexer). Document it.
Adapted from qcom,sm6350-pinctrl.yaml in the same directory at commit c09acbc499e8 ("dt-bindings: pinctrl: use pinctrl.yaml").
--- .../bindings/pinctrl/qcom,sdm670-pinctrl.yaml | 128 ++++++++++++++++++ 1 file changed, 128 insertions(+) create mode 100644 Documentation/devicetree/bindings/pinctrl/qcom,sdm670-pinctrl.yaml
Documentation/devicetree/bindings/pinctrl/qcom,sdm670-pinctrl.yaml new file +128 -0
@@ -0,0 +1,128 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/pinctrl/qcom,sdm670-pinctrl.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm Technologies, Inc. SDM670 TLMM block + +maintainers: + - Richard Acayan <[email protected]> + +description: | + This binding describes the Top Level Mode Multiplexer (TLMM) block found + in the SDM670 platform. + +allOf: + - $ref: "pinctrl.yaml#" + - $ref: /schemas/pinctrl/qcom,tlmm-common.yaml# + +properties: + compatible: + const: qcom,sdm670-pinctrl + + reg: + maxItems: 1 + + interrupts: true + interrupt-controller: true + '#interrupt-cells': true + gpio-controller: true + gpio-reserved-ranges: true + '#gpio-cells': true + gpio-ranges: true + wakeup-parent: true + +required: + - compatible + - reg + +additionalProperties: false + +patternProperties: + '-state$': + oneOf: + - $ref: "#/$defs/qcom-sdm670-tlmm-state" + - patternProperties: + ".*": + $ref: "#/$defs/qcom-sdm670-tlmm-state" + +$defs: + qcom-sdm670-tlmm-state: + type: object + description: + Pinctrl node's client devices use subnodes for desired pin configuration. + Client device subnodes use below standard properties. + $ref: "qcom,tlmm-common.yaml#/$defs/qcom-tlmm-state" + + properties: + pins: + description: + List of gpio pins affected by the properties specified in this + subnode. + items: + oneOf: + - pattern: "^gpio([0-9]|[1-9][0-9]|1[0-4][0-9]|15[01])$" + - enum: [ sdc1_rclk, sdc1_clk, sdc1_cmd, sdc1_data, sdc2_clk, + sdc2_cmd, sdc2_data ] + minItems: 1 + maxItems: 36 + + function: + description: + Specify the alternative function to be configured for the specified + pins. + + enum: [ adsp_ext, agera_pll, atest_char, atest_tsens, atest_tsens2, atest_usb1, atest_usb10, + atest_usb11, atest_usb12, atest_usb13, atest_usb2, atest_usb20, atest_usb21, + atest_usb22, atest_usb23, cam_mclk, cci_async, cci_i2c, cci_timer0, cci_timer1, + cci_timer2, cci_timer3, cci_timer4, copy_gp, copy_phase, dbg_out, ddr_bist, + ddr_pxi0, ddr_pxi1, ddr_pxi2, ddr_pxi3, edp_hot, edp_lcd, gcc_gp1, gcc_gp2, gcc_gp3, + gp_pdm0, gp_pdm1, gp_pdm2, gpio, gps_tx, jitter_bist, ldo_en, ldo_update, + lpass_slimbus, m_voc, mdp_vsync, mdp_vsync0, mdp_vsync1, mdp_vsync2, mdp_vsync3, + mss_lte, nav_pps, pa_indicator, pci_e0, pci_e1, phase_flag, pll_bist, pll_bypassnl, + pll_reset, pri_mi2s, pri_mi2s_ws, prng_rosc, qdss_cti, qdss, qlink_enable, + qlink_request, qua_mi2s, qup0, qup1, qup10, qup11, qup12, qup13, qup14, qup15, qup2, + qup3, qup4, qup5, qup6, qup7, qup8, qup9, qup_l4, qup_l5, qup_l6, sdc4_clk, + sdc4_cmd, sdc4_data, sd_write, sec_mi2s, ter_mi2s, tgu_ch0, tgu_ch1, tgu_ch2, + tgu_ch3, tsif1_clk, tsif1_data, tsif1_en, tsif1_error, tsif1_sync, tsif2_clk, + tsif2_data, tsif2_en, tsif2_error, tsif2_sync, uim1_clk, uim1_data, uim1_present, + uim1_reset, uim2_clk, uim2_data, uim2_present, uim2_reset, uim_batt, usb_phy, vfr_1, + vsense_trigger, wlan1_adc0, wlan1_adc1, wlan2_adc0, wlan2_adc1, wsa_clk, wsa_data, ] + + + bias-disable: true + bias-pull-down: true + bias-pull-up: true + drive-strength: true + input-enable: true + output-high: true + output-low: true + + required: + - pins + - function + + additionalProperties: false + +examples: + - | + #include <dt-bindings/interrupt-controller/arm-gic.h> + pinctrl@3400000 { + compatible = "qcom,sdm670-pinctrl"; + reg = <0x03400000 0x300000>; + interrupts = <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + gpio-ranges = <&tlmm 0 0 151>; + + qup-i2c9-state { + pinmux { + pins = "gpio6", "gpio7"; + function = "qup9"; + }; + }; + }; +...
Signature · 1 line
2.37.3
Bjorn Andersson
maintainerRe: [PATCH 1/2] dt-bindings: pinctrl: qcom: add sdm670 pinctrl
Quoted 55 lines · Richard Acayan
There is a new driver for the Snapdragon 670 TLMM (Top-Level Mode Multiplexer). Document it.
Adapted from qcom,sm6350-pinctrl.yaml in the same directory at commit
c09acbc499e8("dt-bindings: pinctrl: usepinctrl.yaml").Signed-off-by Richard Acayan <[email protected]>--- .../bindings/pinctrl/qcom,sdm670-pinctrl.yaml | 128 ++++++++++++++++++ 1 file changed, 128 insertions(+) create mode 100644 Documentation/devicetree/bindings/pinctrl/qcom,sdm670-pinctrl.yamlDocumentation/devicetree/bindings/pinctrl/qcom,sdm670-pinctrl.yaml new file +37
-0@@ -0,0 +1,128 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/pinctrl/qcom,sdm670-pinctrl.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm Technologies, Inc. SDM670 TLMM block + +maintainers: + - Richard Acayan <[email protected]> + +description: | + This binding describes the Top Level Mode Multiplexer (TLMM) block found + in the SDM670 platform. + +allOf: + - $ref: "pinctrl.yaml#" + - $ref: /schemas/pinctrl/qcom,tlmm-common.yaml# + +properties: + compatible: + const: qcom,sdm670-pinctrl + + reg: + maxItems: 1 + + interrupts: true + interrupt-controller: true + '#interrupt-cells': true + gpio-controller: true + gpio-reserved-ranges: true + '#gpio-cells': true + gpio-ranges: true + wakeup-parent: true + +required: + - compatible
Documentation/devicetree/bindings/pinctrl/qcom,sdm670-pinctrl.yaml line 47
Quoted 10 lines
Documentation/devicetree/bindings/pinctrl/qcom,sdm670-pinctrl.yaml new file +10
-0+ - reg + +additionalProperties: false + +patternProperties: + '-state$': + oneOf: + - $ref: "#/$defs/qcom-sdm670-tlmm-state" + - patternProperties: + ".*":
Please see
https://lore.kernel.org/linux-arm-msm/[email protected]/
Quoted 8 lines
Documentation/devicetree/bindings/pinctrl/qcom,sdm670-pinctrl.yaml new file +8
-0+ $ref: "#/$defs/qcom-sdm670-tlmm-state" + +$defs: + qcom-sdm670-tlmm-state: + type: object + description: + Pinctrl node's client devices use subnodes for desired pin configuration. + Client device subnodes use below standard properties.
Documentation/devicetree/bindings/pinctrl/qcom,sdm670-pinctrl.yaml line 65
Quoted 10 lines
Documentation/devicetree/bindings/pinctrl/qcom,sdm670-pinctrl.yaml new file +10
-0+ $ref: "qcom,tlmm-common.yaml#/$defs/qcom-tlmm-state" + + properties: + pins: + description: + List of gpio pins affected by the properties specified in this + subnode. + items: + oneOf: + - pattern: "^gpio([0-9]|[1-9][0-9]|1[0-4][0-9]|15[01])$"
You only have gpio0 through gpio149 in the implementation, so the last 15[01] is not applicable.
Documentation/devicetree/bindings/pinctrl/qcom,sdm670-pinctrl.yaml line 67
Quoted 2 lines
Documentation/devicetree/bindings/pinctrl/qcom,sdm670-pinctrl.yaml new file +2
-0+ - enum: [ sdc1_rclk, sdc1_clk, sdc1_cmd, sdc1_data, sdc2_clk, + sdc2_cmd, sdc2_data ]
You're missing ufs_reset in this list.
Documentation/devicetree/bindings/pinctrl/qcom,sdm670-pinctrl.yaml line 71
Quoted 4 lines
Documentation/devicetree/bindings/pinctrl/qcom,sdm670-pinctrl.yaml new file +4
-0+ minItems: 1 + maxItems: 36 + + function:
Please see
https://lore.kernel.org/linux-arm-msm/[email protected]/
Regards,
Bjorn
Quoted 60 lines
Documentation/devicetree/bindings/pinctrl/qcom,sdm670-pinctrl.yaml new file +57
-0+ description: + Specify the alternative function to be configured for the specified + pins. + + enum: [ adsp_ext, agera_pll, atest_char, atest_tsens, atest_tsens2, atest_usb1, atest_usb10, + atest_usb11, atest_usb12, atest_usb13, atest_usb2, atest_usb20, atest_usb21, + atest_usb22, atest_usb23, cam_mclk, cci_async, cci_i2c, cci_timer0, cci_timer1, + cci_timer2, cci_timer3, cci_timer4, copy_gp, copy_phase, dbg_out, ddr_bist, + ddr_pxi0, ddr_pxi1, ddr_pxi2, ddr_pxi3, edp_hot, edp_lcd, gcc_gp1, gcc_gp2, gcc_gp3, + gp_pdm0, gp_pdm1, gp_pdm2, gpio, gps_tx, jitter_bist, ldo_en, ldo_update, + lpass_slimbus, m_voc, mdp_vsync, mdp_vsync0, mdp_vsync1, mdp_vsync2, mdp_vsync3, + mss_lte, nav_pps, pa_indicator, pci_e0, pci_e1, phase_flag, pll_bist, pll_bypassnl, + pll_reset, pri_mi2s, pri_mi2s_ws, prng_rosc, qdss_cti, qdss, qlink_enable, + qlink_request, qua_mi2s, qup0, qup1, qup10, qup11, qup12, qup13, qup14, qup15, qup2, + qup3, qup4, qup5, qup6, qup7, qup8, qup9, qup_l4, qup_l5, qup_l6, sdc4_clk, + sdc4_cmd, sdc4_data, sd_write, sec_mi2s, ter_mi2s, tgu_ch0, tgu_ch1, tgu_ch2, + tgu_ch3, tsif1_clk, tsif1_data, tsif1_en, tsif1_error, tsif1_sync, tsif2_clk, + tsif2_data, tsif2_en, tsif2_error, tsif2_sync, uim1_clk, uim1_data, uim1_present, + uim1_reset, uim2_clk, uim2_data, uim2_present, uim2_reset, uim_batt, usb_phy, vfr_1, + vsense_trigger, wlan1_adc0, wlan1_adc1, wlan2_adc0, wlan2_adc1, wsa_clk, wsa_data, ] + + + bias-disable: true + bias-pull-down: true + bias-pull-up: true + drive-strength: true + input-enable: true + output-high: true + output-low: true + + required: + - pins + - function + + additionalProperties: false + +examples: + - | + #include <dt-bindings/interrupt-controller/arm-gic.h> + pinctrl@3400000 { + compatible = "qcom,sdm670-pinctrl"; + reg = <0x03400000 0x300000>; + interrupts = <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + gpio-ranges = <&tlmm 0 0 151>; + + qup-i2c9-state { + pinmux { + pins = "gpio6", "gpio7"; + function = "qup9"; + }; + }; + }; +...Signature · 1 line
2.37.3
PATCH 2/2 pinctrl: qcom: add sdm670 pinctrl
In reply to Richard AcayanThe Snapdragon 670 has a Top-Level Mode Multiplexer (TLMM) for various features. Add a driver to support it.
--- drivers/pinctrl/qcom/Kconfig | 9 + drivers/pinctrl/qcom/Makefile | 1 + drivers/pinctrl/qcom/pinctrl-sdm670.c | 1368 +++++++++++++++++++++++++ 3 files changed, 1378 insertions(+) create mode 100644 drivers/pinctrl/qcom/pinctrl-sdm670.c
drivers/pinctrl/qcom/Kconfig +9 -0
@@ -283,6 +283,15 @@ config PINCTRL_SDM660 Qualcomm Technologies Inc TLMM block found on the Qualcomm Technologies Inc SDM660 platform. +config PINCTRL_SDM670 + tristate "Qualcomm Technologies Inc SDM670 pin controller driver" + depends on (OF || ACPI) + depends on PINCTRL_MSM + help + This is the pinctrl, pinmux, pinconf and gpiolib driver for the + Qualcomm Technologies Inc TLMM block found on the Qualcomm + Technologies Inc SDM670 platform. + config PINCTRL_SDM845 tristate "Qualcomm Technologies Inc SDM845 pin controller driver" depends on (OF || ACPI)
drivers/pinctrl/qcom/Makefile +1 -0
@@ -33,6 +33,7 @@ obj-$(CONFIG_PINCTRL_SC7280_LPASS_LPI) += pinctrl-sc7280-lpass-lpi.o obj-$(CONFIG_PINCTRL_SC8180X) += pinctrl-sc8180x.o obj-$(CONFIG_PINCTRL_SC8280XP) += pinctrl-sc8280xp.o obj-$(CONFIG_PINCTRL_SDM660) += pinctrl-sdm660.o +obj-$(CONFIG_PINCTRL_SDM670) += pinctrl-sdm670.o obj-$(CONFIG_PINCTRL_SDM845) += pinctrl-sdm845.o obj-$(CONFIG_PINCTRL_SDX55) += pinctrl-sdx55.o obj-$(CONFIG_PINCTRL_SM6115) += pinctrl-sm6115.o
drivers/pinctrl/qcom/pinctrl-sdm670.c new file +1368 -0
1,368 lines not on this page · raw message
Signature · 1 line
2.37.3
Bjorn Andersson
maintainerRe: [PATCH 2/2] pinctrl: qcom: add sdm670 pinctrl
Quoted 16 lines · Richard Acayan
The Snapdragon 670 has a Top-Level Mode Multiplexer (TLMM) for various features. Add a driver to support it.
Signed-off-by Richard Acayan <[email protected]>--- drivers/pinctrl/qcom/Kconfig | 9 + drivers/pinctrl/qcom/Makefile | 1 + drivers/pinctrl/qcom/pinctrl-sdm670.c | 1368 +++++++++++++++++++++++++ 3 files changed, 1378 insertions(+) create mode 100644 drivers/pinctrl/qcom/pinctrl-sdm670.cdrivers/pinctrl/qcom/Kconfig +0
-0
drivers/pinctrl/qcom/Kconfig config PINCTRL_SDM660 · line 288
Quoted 6 lines
drivers/pinctrl/qcom/Kconfig +3
-0@@ -283,6 +283,15 @@ config PINCTRL_SDM660 Qualcomm Technologies Inc TLMM block found on the Qualcomm Technologies Inc SDM660 platform. +config PINCTRL_SDM670 + tristate "Qualcomm Technologies Inc SDM670 pin controller driver" + depends on (OF || ACPI)
I believe you can drop ACPI from this?
Quoted 86 lines
drivers/pinctrl/qcom/Kconfig +6
-0+ depends on PINCTRL_MSM + help + This is the pinctrl, pinmux, pinconf and gpiolib driver for the + Qualcomm Technologies Inc TLMM block found on the Qualcomm + Technologies Inc SDM670 platform. + config PINCTRL_SDM845 tristate "Qualcomm Technologies Inc SDM845 pin controller driver" depends on (OF || ACPI)drivers/pinctrl/qcom/Makefile +1
-0@@ -33,6 +33,7 @@ obj-$(CONFIG_PINCTRL_SC7280_LPASS_LPI) += pinctrl-sc7280-lpass-lpi.o obj-$(CONFIG_PINCTRL_SC8180X) += pinctrl-sc8180x.o obj-$(CONFIG_PINCTRL_SC8280XP) += pinctrl-sc8280xp.o obj-$(CONFIG_PINCTRL_SDM660) += pinctrl-sdm660.o +obj-$(CONFIG_PINCTRL_SDM670) += pinctrl-sdm670.o obj-$(CONFIG_PINCTRL_SDM845) += pinctrl-sdm845.o obj-$(CONFIG_PINCTRL_SDX55) += pinctrl-sdx55.o obj-$(CONFIG_PINCTRL_SM6115) += pinctrl-sm6115.odrivers/pinctrl/qcom/pinctrl-sdm670.c new file +59
-0@@ -0,0 +1,1368 @@ +// SPDX-License-Identifier: GPL-2.0 +/* +* Copyright (c) 2017-2018, The Linux Foundation. All rights reserved. +* Copyright (c) 2022, Richard Acayan. All rights reserved. +*/ + +#include <linux/module.h> +#include <linux/of.h> +#include <linux/platform_device.h> +#include <linux/pinctrl/pinctrl.h> + +#include "pinctrl-msm.h" + +#define FUNCTION (fname) \ + [msm_mux_##fname] = { \ + .name = #fname, \ + .groups = fname##_groups, \ + .ngroups = ARRAY_SIZE(fname##_groups), \ + } + +#define NORTH 0x00500000 +#define SOUTH 0x00900000 +#define WEST 0x00100000 + +#define REG_SIZE 0x1000 +#define PINGROUP(id, base, f1, f2, f3, f4, f5, f6, f7, f8, f9) \ + { \ + .name = "gpio" #id, \ + .pins = gpio##id##_pins, \ + .npins = ARRAY_SIZE(gpio##id##_pins), \ + .funcs = (int[]){ \ + msm_mux_gpio, /* gpio mode */ \ + msm_mux_##f1, \ + msm_mux_##f2, \ + msm_mux_##f3, \ + msm_mux_##f4, \ + msm_mux_##f5, \ + msm_mux_##f6, \ + msm_mux_##f7, \ + msm_mux_##f8, \ + msm_mux_##f9 \ + }, \ + .nfuncs = 10, \ + .ctl_reg = base + REG_SIZE * id, \ + .io_reg = base + 0x4 + REG_SIZE * id, \ + .intr_cfg_reg = base + 0x8 + REG_SIZE * id, \ + .intr_status_reg = base + 0xc + REG_SIZE * id, \ + .intr_target_reg = base + 0x8 + REG_SIZE * id, \ + .mux_bit = 2, \ + .pull_bit = 0, \ + .drv_bit = 6, \ + .oe_bit = 9, \ + .in_bit = 0, \ + .out_bit = 1, \ + .intr_enable_bit = 0, \ + .intr_status_bit = 0, \ + .intr_target_bit = 5, \ + .intr_target_kpss_val = 3, \ + .intr_raw_status_bit = 4, \
drivers/pinctrl/qcom/pinctrl-sdm670.c line 69
Quoted 10 lines
drivers/pinctrl/qcom/pinctrl-sdm670.c new file +10
-0+ .intr_polarity_bit = 1, \ + .intr_detection_bit = 2, \ + .intr_detection_width = 2, \ + } + +/* +* A dummy pingroup is a pin group that cannot be assigned a function and has +* no registers to control or monitor it. +*/ +#define PINGROUP_DUMMY (id) \
This isn't overly pretty, but I don't have a better suggestion for describing holes in the gpio range.
Quoted 23 lines
drivers/pinctrl/qcom/pinctrl-sdm670.c new file +23
-0+ { \ + .name = "gpio" #id, \ + .pins = gpio##id##_pins, \ + .npins = ARRAY_SIZE(gpio##id##_pins), \ + .ctl_reg = 0, \ + .io_reg = 0, \ + .intr_cfg_reg = 0, \ + .intr_status_reg = 0, \ + .intr_target_reg = 0, \ + .mux_bit = -1, \ + .pull_bit = -1, \ + .drv_bit = -1, \ + .oe_bit = -1, \ + .in_bit = -1, \ + .out_bit = -1, \ + .intr_enable_bit = -1, \ + .intr_status_bit = -1, \ + .intr_target_bit = -1, \ + .intr_raw_status_bit = -1, \ + .intr_polarity_bit = -1, \ + .intr_detection_bit = -1, \ + .intr_detection_width = -1, \ + }
[..]
Quoted 4 lines
+/* Every pin is maintained as a single group, and missing or non-existing pin
+ * would be maintained as dummy group to synchronize pin group index with
+ * pin descriptor registered with pinctrl core.
+ * Clients would not be able to request these dummy pin groups.
The client wouldn't be able to define pinmux/pinconf, but I'm not able to spot anything that would prevent a client from referencing the gpio?
Perhaps I'm missing something?
Otherwise, I think you should be able to specify reserved_gpios in sdm670_pinctrl and list the dummy items. This would ensure that the gpio code as well treat them as absent.
drivers/pinctrl/qcom/pinctrl-sdm670.c line 1155
Quoted 11 lines
+ */
drivers/pinctrl/qcom/pinctrl-sdm670.c new file +10
-0+static const struct msm_pingroup sdm670_groups[] = { +PINGROUP (0 ,SOUTH , qup0, _, _, _, _, _, _, _, _), +PINGROUP (1 ,SOUTH , qup0, _, _, _, _, _, _, _, _), +PINGROUP (2 ,SOUTH , qup0, _, _, _, _, _, _, _, _), +PINGROUP (3 ,SOUTH , qup0, _, _, _, _, _, _, _, _), +PINGROUP (4 ,NORTH , qup9, qdss_cti, _, _, _, _, _, _, _), +PINGROUP (5 ,NORTH , qup9, qdss_cti, _, _, _, _, _, _, _), +PINGROUP (6 ,NORTH , qup9, _, ddr_pxi0, _, _, _, _, _, _), +PINGROUP (7 ,NORTH , qup9, ddr_bist, _, atest_tsens2, vsense_trigger, + atest_usb1, ddr_pxi0, _, _),
Please unwrap all these lines, it's easier to read that way.
Quoted 175 lines
drivers/pinctrl/qcom/pinctrl-sdm670.c new file +175
-0+PINGROUP (8 ,WEST , qup_l4, gp_pdm1, ddr_bist, _, _, _, _, _, _), +PINGROUP (9 ,WEST , qup_l5, ddr_bist, _, _, _, _, _, _, _), +PINGROUP (10 ,NORTH , mdp_vsync, qup_l6, ddr_bist, wlan2_adc1, + atest_usb11, ddr_pxi2, _, _, _), +PINGROUP (11 ,NORTH , mdp_vsync, edp_lcd, dbg_out, wlan2_adc0, + atest_usb10, ddr_pxi2, _, _, _), +PINGROUP (12 ,SOUTH , mdp_vsync, m_voc, tsif1_sync, ddr_pxi3, _, _, _, _, + _), +PINGROUP (13 ,WEST , cam_mclk, pll_bypassnl, qdss, ddr_pxi3, _, _, _, _, + _), +PINGROUP (14 ,WEST , cam_mclk, pll_reset, qdss, _, _, _, _, _, _), +PINGROUP (15 ,WEST , cam_mclk, qdss, _, _, _, _, _, _, _), +PINGROUP (16 ,WEST , cam_mclk, qdss, _, _, _, _, _, _, _), +PINGROUP (17 ,WEST , cci_i2c, qup1, qdss, _, _, _, _, _, _), +PINGROUP (18 ,WEST , cci_i2c, qup1, _, qdss, _, _, _, _, _), +PINGROUP (19 ,WEST , cci_i2c, qup1, _, qdss, _, _, _, _, _), +PINGROUP (20 ,WEST , cci_i2c, qup1, _, qdss, _, _, _, _, _), +PINGROUP (21 ,WEST , cci_timer0, gcc_gp2, qdss, _, _, _, _, _, _), +PINGROUP (22 ,WEST , cci_timer1, gcc_gp3, qdss, _, _, _, _, _, _), +PINGROUP (23 ,WEST , cci_timer2, qdss, _, _, _, _, _, _, _), +PINGROUP (24 ,WEST , cci_timer3, cci_async, qdss, _, _, _, _, _, _), +PINGROUP (25 ,WEST , cci_timer4, cci_async, qdss, _, _, _, _, _, _), +PINGROUP (26 ,WEST , cci_async, qdss, jitter_bist, _, _, _, _, _, _), +PINGROUP (27 ,WEST , qup2, qdss, pll_bist, _, _, _, _, _, _), +PINGROUP (28 ,WEST , qup2, qdss, agera_pll, _, _, _, _, _, _), +PINGROUP (29 ,WEST , qup2, _, phase_flag, qdss, atest_tsens, _, _, _, _), +PINGROUP (30 ,WEST , qup2, phase_flag, qdss, _, _, _, _, _, _), +PINGROUP (31 ,WEST , qup11, qup14, _, _, _, _, _, _, _), +PINGROUP (32 ,WEST , qup11, qup14, _, _, _, _, _, _, _), +PINGROUP (33 ,WEST , qup11, qup14, _, _, _, _, _, _, _), +PINGROUP (34 ,WEST , qup11, qup14, _, _, _, _, _, _, _), +PINGROUP (35 ,NORTH , pci_e0, qup_l4, jitter_bist, _, _, _, _, _, _), +PINGROUP (36 ,NORTH , pci_e0, qup_l5, pll_bist, _, _, _, _, _, _), +PINGROUP (37 ,NORTH , qup_l6, agera_pll, _, _, _, _, _, _, _), +PINGROUP (38 ,NORTH , usb_phy, _, _, _, _, _, _, _, _), +PINGROUP (39 ,NORTH , lpass_slimbus, _, _, _, _, _, _, _, _), +PINGROUP (40 ,NORTH , sd_write, tsif1_error, _, _, _, _, _, _, _), +PINGROUP (41 ,SOUTH , qup3, _, qdss, _, _, _, _, _, _), +PINGROUP (42 ,SOUTH , qup3, _, qdss, _, _, _, _, _, _), +PINGROUP (43 ,SOUTH , qup3, _, qdss, _, _, _, _, _, _), +PINGROUP (44 ,SOUTH , qup3, _, qdss, _, _, _, _, _, _), +PINGROUP (45 ,SOUTH , qup6, _, _, _, _, _, _, _, _), +PINGROUP (46 ,SOUTH , qup6, _, _, _, _, _, _, _, _), +PINGROUP (47 ,SOUTH , qup6, _, _, _, _, _, _, _, _), +PINGROUP (48 ,SOUTH , qup6, _, _, _, _, _, _, _, _), +PINGROUP (49 ,NORTH , qup12, _, _, _, _, _, _, _, _), +PINGROUP (50 ,NORTH , qup12, _, _, _, _, _, _, _, _), +PINGROUP (51 ,NORTH , qup12, qdss_cti, _, _, _, _, _, _, _), +PINGROUP (52 ,NORTH , qup12, phase_flag, qdss_cti, _, _, _, _, _, _), +PINGROUP (53 ,NORTH , qup10, phase_flag, _, _, _, _, _, _, _), +PINGROUP (54 ,NORTH , qup10, gp_pdm0, phase_flag, _, wlan1_adc1, + atest_usb13, ddr_pxi1, _, _), +PINGROUP (55 ,NORTH , qup10, phase_flag, _, wlan1_adc0, atest_usb12, + ddr_pxi1, _, _, _), +PINGROUP (56 ,NORTH , qup10, phase_flag, _, _, _, _, _, _, _), +PINGROUP (57 ,NORTH , qua_mi2s, gcc_gp1, phase_flag, _, _, _, _, _, _), +PINGROUP_DUMMY (58 ), +PINGROUP_DUMMY (59 ), +PINGROUP_DUMMY (60 ), +PINGROUP_DUMMY (61 ), +PINGROUP_DUMMY (62 ), +PINGROUP_DUMMY (63 ), +PINGROUP_DUMMY (64 ), +PINGROUP (65 ,NORTH , pri_mi2s, qup8, wsa_clk, _, _, _, _, _, _), +PINGROUP (66 ,NORTH , pri_mi2s_ws, qup8, wsa_data, gp_pdm1, _, _, _, _, + _), +PINGROUP (67 ,NORTH , pri_mi2s, qup8, _, atest_usb2, _, _, _, _, _), +PINGROUP (68 ,NORTH , pri_mi2s, qup8, _, atest_usb23, _, _, _, _, _), +PINGROUP_DUMMY (69 ), +PINGROUP_DUMMY (70 ), +PINGROUP_DUMMY (71 ), +PINGROUP_DUMMY (72 ), +PINGROUP_DUMMY (73 ), +PINGROUP_DUMMY (74 ), +PINGROUP (75 ,NORTH , ter_mi2s, phase_flag, qdss, atest_usb22, qup_l4, _, + _, _, _), +PINGROUP (76 ,NORTH , ter_mi2s, phase_flag, qdss, atest_usb21, qup_l5, _, + _, _, _), +PINGROUP (77 ,NORTH , ter_mi2s, phase_flag, qdss, atest_usb20, qup_l6, _, + _, _, _), +PINGROUP (78 ,NORTH , ter_mi2s, gcc_gp1, _, _, _, _, _, _, _), +PINGROUP (79 ,NORTH , sec_mi2s, gp_pdm2, _, qdss, _, _, _, _, _), +PINGROUP (80 ,NORTH , sec_mi2s, _, qdss, _, _, _, _, _, _), +PINGROUP (81 ,NORTH , sec_mi2s, qup15, _, _, _, _, _, _, _), +PINGROUP (82 ,NORTH , sec_mi2s, qup15, _, _, _, _, _, _, _), +PINGROUP (83 ,NORTH , sec_mi2s, qup15, _, _, _, _, _, _, _), +PINGROUP (84 ,NORTH , qup15, _, _, _, _, _, _, _, _), +PINGROUP (85 ,SOUTH , qup5, _, _, _, _, _, _, _, _), +PINGROUP (86 ,SOUTH , qup5, copy_gp, _, _, _, _, _, _, _), +PINGROUP (87 ,SOUTH , qup5, _, _, _, _, _, _, _, _), +PINGROUP (88 ,SOUTH , qup5, _, _, _, _, _, _, _, _), +PINGROUP (89 ,SOUTH , tsif1_clk, qup4, tgu_ch3, phase_flag, _, _, _, _, + _), +PINGROUP (90 ,SOUTH , tsif1_en, mdp_vsync0, qup4, mdp_vsync1, mdp_vsync2, + mdp_vsync3, tgu_ch0, phase_flag, qdss_cti), +PINGROUP (91 ,SOUTH , tsif1_data, sdc4_cmd, qup4, tgu_ch1, _, qdss_cti, + _, _, _), +PINGROUP (92 ,SOUTH , tsif2_error, sdc4_data, qup4, vfr_1, tgu_ch2, _, _, _, + _), +PINGROUP (93 ,SOUTH , tsif2_clk, sdc4_clk, qup7, _, qdss, _, _, _, _), +PINGROUP (94 ,SOUTH , tsif2_en, sdc4_data, qup7, _, _, _, _, _, _), +PINGROUP (95 ,SOUTH , tsif2_data, sdc4_data, qup7, gp_pdm0, _, _, _, _, _), +PINGROUP (96 ,SOUTH , tsif2_sync, sdc4_data, qup7, phase_flag, _, _, _, _, + _), +PINGROUP (97 ,WEST , _, _, mdp_vsync, ldo_en, _, _, _, _, _), +PINGROUP (98 ,WEST , _, mdp_vsync, ldo_update, _, _, _, _, _, _), +PINGROUP (99 ,NORTH , phase_flag, prng_rosc, _, _, _, _, _, _, _), +PINGROUP (100 ,WEST , phase_flag, _, _, _, _, _, _, _, _), +PINGROUP (101 ,WEST , _, phase_flag, _, _, _, _, _, _, _), +PINGROUP (102 ,WEST , pci_e1, prng_rosc, _, _, _, _, _, _, _), +PINGROUP (103 ,WEST , pci_e1, copy_phase, _, _, _, _, _, _, _), +PINGROUP_DUMMY (104 ), +PINGROUP (105 ,NORTH , uim2_data, qup13, qup_l4, _, _, _, _, _, _), +PINGROUP (106 ,NORTH , uim2_clk, qup13, qup_l5, _, _, _, _, _, _), +PINGROUP (107 ,NORTH , uim2_reset, qup13, qup_l6, _, _, _, _, _, _), +PINGROUP (108 ,NORTH , uim2_present, qup13, _, _, _, _, _, _, _), +PINGROUP (109 ,NORTH , uim1_data, _, _, _, _, _, _, _, _), +PINGROUP (110 ,NORTH , uim1_clk, _, _, _, _, _, _, _, _), +PINGROUP (111 ,NORTH , uim1_reset, _, _, _, _, _, _, _, _), +PINGROUP (112 ,NORTH , uim1_present, _, _, _, _, _, _, _, _), +PINGROUP (113 ,NORTH , uim_batt, edp_hot, _, _, _, _, _, _, _), +PINGROUP (114 ,WEST , _, nav_pps, nav_pps, gps_tx, _, _, _, _, _), +PINGROUP (115 ,WEST , _, nav_pps, nav_pps, gps_tx, _, _, _, _, _), +PINGROUP (116 ,SOUTH , _, _, _, _, _, _, _, _, _), +PINGROUP (117 ,NORTH , _, qdss, atest_char, _, _, _, _, _, _), +PINGROUP (118 ,NORTH , adsp_ext, _, qdss, atest_char, _, _, _, _, _), +PINGROUP (119 ,NORTH , _, qdss, atest_char, _, _, _, _, _, _), +PINGROUP (120 ,NORTH , _, qdss, atest_char, _, _, _, _, _, _), +PINGROUP (121 ,NORTH , _, qdss, atest_char, _, _, _, _, _, _), +PINGROUP (122 ,NORTH , _, qdss, _, _, _, _, _, _, _), +PINGROUP (123 ,NORTH , qup_l4, _, qdss, _, _, _, _, _, _), +PINGROUP (124 ,NORTH , qup_l5, _, qdss, _, _, _, _, _, _), +PINGROUP (125 ,NORTH , qup_l6, _, _, _, _, _, _, _, _), +PINGROUP (126 ,NORTH , _, _, _, _, _, _, _, _, _), +PINGROUP (127 ,WEST , _, _, _, _, _, _, _, _, _), +PINGROUP (128 ,WEST , nav_pps, nav_pps, gps_tx, _, _, _, _, _, _), +PINGROUP (129 ,WEST , nav_pps, nav_pps, gps_tx, _, _, _, _, _, _), +PINGROUP (130 ,WEST , qlink_request, _, _, _, _, _, _, _, _), +PINGROUP (131 ,WEST , qlink_enable, _, _, _, _, _, _, _, _), +PINGROUP (132 ,WEST , _, _, _, _, _, _, _, _, _), +PINGROUP (133 ,NORTH , _, _, _, _, _, _, _, _, _), +PINGROUP (134 ,NORTH , _, _, _, _, _, _, _, _, _), +PINGROUP (135 ,WEST , _, pa_indicator, _, _, _, _, _, _, _), +PINGROUP (136 ,WEST , _, _, _, _, _, _, _, _, _), +PINGROUP (137 ,WEST , _, _, phase_flag, _, _, _, _, _, _), +PINGROUP (138 ,WEST , _, _, phase_flag, _, _, _, _, _, _), +PINGROUP (139 ,WEST , _, phase_flag, _, _, _, _, _, _, _), +PINGROUP (140 ,WEST , _, _, phase_flag, _, _, _, _, _, _), +PINGROUP (141 ,WEST , _, phase_flag, _, _, _, _, _, _, _), +PINGROUP (142 ,WEST , _, phase_flag, _, _, _, _, _, _, _), +PINGROUP (143 ,WEST , _, nav_pps, nav_pps, gps_tx, phase_flag, _, _, _, + _), +PINGROUP (144 ,SOUTH , mss_lte, _, _, _, _, _, _, _, _), +PINGROUP (145 ,SOUTH , mss_lte, gps_tx, _, _, _, _, _, _, _), +PINGROUP (146 ,WEST , _, _, _, _, _, _, _, _, _), +PINGROUP (147 ,WEST , _, _, _, _, _, _, _, _, _), +PINGROUP (148 ,WEST , _, _, _, _, _, _, _, _, _), +PINGROUP (149 ,WEST , _, _, _, _, _, _, _, _, _), +UFS_RESET (ufs_reset,0x99d000 ), +SDC_QDSD_PINGROUP (sdc1_rclk,0x99000 ,15 ,0 ), +SDC_QDSD_PINGROUP (sdc1_clk,0x99000 ,13 ,6 ), +SDC_QDSD_PINGROUP (sdc1_cmd,0x99000 ,11 ,3 ), +SDC_QDSD_PINGROUP (sdc1_data,0x99000 ,9 ,0 ), +SDC_QDSD_PINGROUP (sdc2_clk,0x9a000 ,14 ,6 ), +SDC_QDSD_PINGROUP (sdc2_cmd,0x9a000 ,11 ,3 ), + SDC_QDSD_PINGROUP(sdc2_data, 0x9a000, 9, 0), +}; + +static const struct msm_pinctrl_soc_data sdm670_pinctrl = { + .pins = sdm670_pins, + .npins =ARRAY_SIZE (sdm670_pins), + .functions = sdm670_functions, + .nfunctions =ARRAY_SIZE (sdm670_functions), + .groups = sdm670_groups, + .ngroups = ARRAY_SIZE(sdm670_groups),
drivers/pinctrl/qcom/pinctrl-sdm670.c line 1340
Quoted 10 lines
drivers/pinctrl/qcom/pinctrl-sdm670.c new file +10
-0+ .ngpios = 151, +}; + +static int sdm670_pinctrl_probe (struct platform_device *pdev) +{ +return msm_pinctrl_probe (pdev, &sdm670_pinctrl); +} + +static const struct of_device_id sdm670_pinctrl_of_match[] = { + { .compatible ="qcom,sdm670-pinctrl" , },
Forgot to mention this on the binding, but please make this qcom,sdm670-tlmm.
Quoted 16 lines
drivers/pinctrl/qcom/pinctrl-sdm670.c new file +16
-0+ { }, +}; + +static struct platform_driver sdm670_pinctrl_driver = { + .driver = { + .name ="sdm670-pinctrl" , + .of_match_table = sdm670_pinctrl_of_match, + }, + .probe = sdm670_pinctrl_probe, + .remove = msm_pinctrl_remove, +}; + +static int __init sdm670_pinctrl_init (void ) +{ +return platform_driver_register (&sdm670_pinctrl_driver); +}
drivers/pinctrl/qcom/pinctrl-sdm670.c line 1366
Quoted 10 lines
drivers/pinctrl/qcom/pinctrl-sdm670.c new file +10
-0+arch_initcall (sdm670_pinctrl_init); + +static void __exit sdm670_pinctrl_exit(void) +{ +platform_driver_unregister (&sdm670_pinctrl_driver); +} +module_exit (sdm670_pinctrl_exit); + +MODULE_AUTHOR ("Richard Acayan <[email protected]>" ); +MODULE_DESCRIPTION ("QTI sdm670 pinctrl driver" );
Perhaps spell out "Qualcomm SDM670 TLMM pinctrl driver".
drivers/pinctrl/qcom/pinctrl-sdm670.c line 1368
Quoted 2 lines
drivers/pinctrl/qcom/pinctrl-sdm670.c new file +2
-0+MODULE_LICENSE ("GPL" ); +MODULE_DEVICE_TABLE (of, sdm670_pinctrl_of_match);
It's nice to have the MODULE_DEVICE_TABLE next to the of_device_id table.
Regards,
Bjorn
Re: [PATCH 2/2] pinctrl: qcom: add sdm670 pinctrl
Quoted 8 lines
Quoted 8 lines
drivers/pinctrl/qcom/Kconfig +0
-0@@ -283,6 +283,15 @@ config PINCTRL_SDM660 Qualcomm Technologies Inc TLMM block found on the Qualcomm Technologies Inc SDM660 platform.
Quoted 5 lines
drivers/pinctrl/qcom/Kconfig config PINCTRL_SDM660 · line 288
Quoted 3 lines
drivers/pinctrl/qcom/Kconfig +3
-0+config PINCTRL_SDM670 + tristate "Qualcomm Technologies Inc SDM670 pin controller driver" + depends on (OF || ACPI)I believe you can drop ACPI from this?
Yes, I adapted this driver from the SDM845 driver and removed the ACPI features but forgot to remove the config dependency.
Quoted 15 lines
Quoted 4 lines
drivers/pinctrl/qcom/Kconfig +4
-0+ depends on PINCTRL_MSM + help + This is the pinctrl, pinmux, pinconf and gpiolib driver for the + Qualcomm Technologies Inc TLMM block found on the Qualcommdrivers/pinctrl/qcom/Kconfig config PINCTRL_SDM660
Quoted 10 lines
drivers/pinctrl/qcom/Kconfig +6
-0+ Technologies Inc SDM670 platform. + config PINCTRL_SDM845 tristate "Qualcomm Technologies Inc SDM845 pin controller driver" depends on (OF || ACPI) +/* Every pin is maintained as a single group, and missing or non-existing pin + * would be maintained as dummy group to synchronize pin group index with + * pin descriptor registered with pinctrl core. + * Clients would not be able to request these dummy pin groups.
Quoted 4 lines
The client wouldn't be able to define pinmux/pinconf, but I'm not able to spot anything that would prevent a client from referencing the gpio?
Perhaps I'm missing something?
No, you're not. I kept this comment because I saw it in other pinctrl drivers and thought it was standard:
~/linux $ grep dummy -RC1 drivers/pinctrl/qcom/
drivers/pinctrl/qcom/pinctrl-qcs404.c-/* Every pin is maintained as a single group, and missing or non-existing pin drivers/pinctrl/qcom/pinctrl-qcs404.c: * would be maintained as dummy group to synchronize pin group index with drivers/pinctrl/qcom/pinctrl-qcs404.c- * pin descriptor registered with pinctrl core. drivers/pinctrl/qcom/pinctrl-qcs404.c: * Clients would not be able to request these dummy pin groups. drivers/pinctrl/qcom/pinctrl-qcs404.c- */
--
drivers/pinctrl/qcom/pinctrl-sc7180.c-/* Every pin is maintained as a single group, and missing or non-existing pin drivers/pinctrl/qcom/pinctrl-sc7180.c: * would be maintained as dummy group to synchronize pin group index with drivers/pinctrl/qcom/pinctrl-sc7180.c- * pin descriptor registered with pinctrl core. drivers/pinctrl/qcom/pinctrl-sc7180.c: * Clients would not be able to request these dummy pin groups. drivers/pinctrl/qcom/pinctrl-sc7180.c- */
--
drivers/pinctrl/qcom/pinctrl-sc7280.c-/* Every pin is maintained as a single group, and missing or non-existing pin drivers/pinctrl/qcom/pinctrl-sc7280.c: * would be maintained as dummy group to synchronize pin group index with drivers/pinctrl/qcom/pinctrl-sc7280.c- * pin descriptor registered with pinctrl core. drivers/pinctrl/qcom/pinctrl-sc7280.c: * Clients would not be able to request these dummy pin groups. drivers/pinctrl/qcom/pinctrl-sc7280.c- */
--
drivers/pinctrl/qcom/pinctrl-sdx55.c-/* Every pin is maintained as a single group, and missing or non-existing pin drivers/pinctrl/qcom/pinctrl-sdx55.c: * would be maintained as dummy group to synchronize pin group index with drivers/pinctrl/qcom/pinctrl-sdx55.c- * pin descriptor registered with pinctrl core. drivers/pinctrl/qcom/pinctrl-sdx55.c: * Clients would not be able to request these dummy pin groups. drivers/pinctrl/qcom/pinctrl-sdx55.c- */
--
drivers/pinctrl/qcom/pinctrl-sdx65.c-/* Every pin is maintained as a single group, and missing or non-existing pin drivers/pinctrl/qcom/pinctrl-sdx65.c: * would be maintained as dummy group to synchronize pin group index with drivers/pinctrl/qcom/pinctrl-sdx65.c- * pin descriptor registered with pinctrl core. drivers/pinctrl/qcom/pinctrl-sdx65.c: * Clients would not be able to request these dummy pin groups. drivers/pinctrl/qcom/pinctrl-sdx65.c- */
--
drivers/pinctrl/qcom/pinctrl-sm6115.c-/* Every pin is maintained as a single group, and missing or non-existing pin drivers/pinctrl/qcom/pinctrl-sm6115.c: * would be maintained as dummy group to synchronize pin group index with drivers/pinctrl/qcom/pinctrl-sm6115.c- * pin descriptor registered with pinctrl core. drivers/pinctrl/qcom/pinctrl-sm6115.c: * Clients would not be able to request these dummy pin groups. drivers/pinctrl/qcom/pinctrl-sm6115.c- */
--
drivers/pinctrl/qcom/pinctrl-sm8350.c-/* Every pin is maintained as a single group, and missing or non-existing pin drivers/pinctrl/qcom/pinctrl-sm8350.c: * would be maintained as dummy group to synchronize pin group index with drivers/pinctrl/qcom/pinctrl-sm8350.c- * pin descriptor registered with pinctrl core. drivers/pinctrl/qcom/pinctrl-sm8350.c: * Clients would not be able to request these dummy pin groups. drivers/pinctrl/qcom/pinctrl-sm8350.c- */
--
drivers/pinctrl/qcom/pinctrl-qcm2290.c-/* Every pin is maintained as a single group, and missing or non-existing pin drivers/pinctrl/qcom/pinctrl-qcm2290.c: * would be maintained as dummy group to synchronize pin group index with drivers/pinctrl/qcom/pinctrl-qcm2290.c- * pin descriptor registered with pinctrl core. drivers/pinctrl/qcom/pinctrl-qcm2290.c: * Clients would not be able to request these dummy pin groups. drivers/pinctrl/qcom/pinctrl-qcm2290.c- */
--
drivers/pinctrl/qcom/pinctrl-sm6125.c- * Every pin is maintained as a single group, and missing or non-existing pin drivers/pinctrl/qcom/pinctrl-sm6125.c: * would be maintained as dummy group to synchronize pin group index with drivers/pinctrl/qcom/pinctrl-sm6125.c- * pin descriptor registered with pinctrl core. drivers/pinctrl/qcom/pinctrl-sm6125.c: * Clients would not be able to request these dummy pin groups. drivers/pinctrl/qcom/pinctrl-sm6125.c- */
--
drivers/pinctrl/qcom/pinctrl-sm6350.c- * Every pin is maintained as a single group, and missing or non-existing pin drivers/pinctrl/qcom/pinctrl-sm6350.c: * would be maintained as dummy group to synchronize pin group index with drivers/pinctrl/qcom/pinctrl-sm6350.c- * pin descriptor registered with pinctrl core. drivers/pinctrl/qcom/pinctrl-sm6350.c: * Clients would not be able to request these dummy pin groups. drivers/pinctrl/qcom/pinctrl-sm6350.c- */
--
drivers/pinctrl/qcom/pinctrl-sm8150.c- * Every pin is maintained as a single group, and missing or non-existing pin drivers/pinctrl/qcom/pinctrl-sm8150.c: * would be maintained as dummy group to synchronize pin group index with drivers/pinctrl/qcom/pinctrl-sm8150.c- * pin descriptor registered with pinctrl core. drivers/pinctrl/qcom/pinctrl-sm8150.c: * Clients would not be able to request these dummy pin groups. drivers/pinctrl/qcom/pinctrl-sm8150.c- */
--
drivers/pinctrl/qcom/pinctrl-sm8450.c-/* Every pin is maintained as a single group, and missing or non-existing pin drivers/pinctrl/qcom/pinctrl-sm8450.c: * would be maintained as dummy group to synchronize pin group index with drivers/pinctrl/qcom/pinctrl-sm8450.c- * pin descriptor registered with pinctrl core. drivers/pinctrl/qcom/pinctrl-sm8450.c: * Clients would not be able to request these dummy pin groups. drivers/pinctrl/qcom/pinctrl-sm8450.c- */
--
drivers/pinctrl/qcom/pinctrl-sdm845.c-/* Every pin is maintained as a single group, and missing or non-existing pin drivers/pinctrl/qcom/pinctrl-sdm845.c: * would be maintained as dummy group to synchronize pin group index with drivers/pinctrl/qcom/pinctrl-sdm845.c- * pin descriptor registered with pinctrl core. drivers/pinctrl/qcom/pinctrl-sdm845.c: * Clients would not be able to request these dummy pin groups. drivers/pinctrl/qcom/pinctrl-sdm845.c- */
--
drivers/pinctrl/qcom/pinctrl-sm6375.c- * Every pin is maintained as a single group, and missing or non-existing pin drivers/pinctrl/qcom/pinctrl-sm6375.c: * would be maintained as dummy group to synchronize pin group index with drivers/pinctrl/qcom/pinctrl-sm6375.c- * pin descriptor registered with pinctrl core. drivers/pinctrl/qcom/pinctrl-sm6375.c: * Clients would not be able to request these dummy pin groups. drivers/pinctrl/qcom/pinctrl-sm6375.c- */
--
drivers/pinctrl/qcom/pinctrl-sm8250.c-/* Every pin is maintained as a single group, and missing or non-existing pin drivers/pinctrl/qcom/pinctrl-sm8250.c: * would be maintained as dummy group to synchronize pin group index with drivers/pinctrl/qcom/pinctrl-sm8250.c- * pin descriptor registered with pinctrl core. drivers/pinctrl/qcom/pinctrl-sm8250.c: * Clients would not be able to request these dummy pin groups. drivers/pinctrl/qcom/pinctrl-sm8250.c- */
--
drivers/pinctrl/qcom/pinctrl-sc8180x.c-/* Every pin is maintained as a single group, and missing or non-existing pin drivers/pinctrl/qcom/pinctrl-sc8180x.c: * would be maintained as dummy group to synchronize pin group index with drivers/pinctrl/qcom/pinctrl-sc8180x.c- * pin descriptor registered with pinctrl core. drivers/pinctrl/qcom/pinctrl-sc8180x.c: * Clients would not be able to request these dummy pin groups. drivers/pinctrl/qcom/pinctrl-sc8180x.c- */
Since this driver has dummy pingroups, it is a bit confusing to see this inaccurate information because it is relevant. I'll rewrite the comment so that it makes sense.
Quoted 3 lines
Otherwise, I think you should be able to specify
reserved_gpiosinsdm670_pinctrland list the dummy items. This would ensure that the gpio code as well treat them as absent.
Yes, as long as I can reserve pins 0, 1, 2, 3, 81, 82, 83, and 84 for the Pixel 3a. However, I think reserved_gpios overrides the DT schema where it would be sensible to add it:
drivers/pinctrl/qcom/pinctrl-msm.c:690:
/* Driver provided reserved list overrides DT and ACPI */
Perhaps I should omit the dummy pingroups from the driver and try to handle the gpio numbers discrepency on the DT side, like:
gpio-ranges = <&tlmm 0 0 58>, <&tlmm 65 59 4>, ...
I don't see this being done anywhere else but it should clear up the debugfs problems I was having.
Quoted 4 lines
Quoted 4 lines
+ */
drivers/pinctrl/qcom/Kconfig +3
-0+static const struct msm_pingroup sdm670_groups[] = { + PINGROUP(0, SOUTH, qup0, _, _, _, _, _, _, _, _), + PINGROUP(1, SOUTH, qup0, _, _, _, _, _, _, _, _),