Skip to content

pinctrl: qcom: Allow eGPIO ownership independent of the mux function

Pankaj Patil linux-arm-msm linux-devicetree linux-gpio lkml 1 version In review

Get series with b4
b4 am [email protected] change-id 20261102-egpio_fix-ddf4c2a4f24e

Versions newest first

  1. v1 Latest2 patches 10 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2dt-bindings: pinctrl: qcom: Add qcom,remote-owned for ownership updateDocumentation/devicetree/bindings/pinctrl/qcom,tlmm-common.yaml+7 -08 replies
2/2pinctrl: qcom: Add qcom,remote-owned pin configuration supportdrivers/pinctrl/qcom/pinctrl-msm.c+73 -82 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] pinctrl: qcom: Allow eGPIO ownership independent of the mux function

eGPIO capable TLMM pins can be handed over to a remote subsystem, which then drives the pin instead of the application processor. The eGPIO present bit describes whether a pin is capable of being owned remotely and the enable bit selects the owner; neither is tied to the pin's mux function.

The only way to express this today is to select the virtual "egpio" function which transfers the ownership to remote io whereas the single-valued "function" property e.g - gpio, qup0_se0 claim the ownership for APPS. There is no way to describe both the pin's normal mux function and enable remote ownership where as the hardware programming guide(HPG) mentions no such exclusion. Boards that need a pin muxed to it's real function while the remote subsystem drives it is permitted behavior according to the HPG.

This series adds a "qcom,remote-owned" boolean flag to the TLMM pin configuration, describing ownership on its own. Its presence hands the listed pins to their remote owner, and its absence leaves the ownership to APPS.

cam_sensor_suspend_rst4: cam-sensor-suspend-rst4 {
		/* RESET REAR */
		config {
			pins = "gpio239";
			bias-pull-down; /* PULL DOWN */
			drive-strength = <12>; /* 12 MA */
			output-low;
			qcom,remote-owned;
		};

		mux {
			pins = "gpio239";
			function = "gpio";
		};
	};

Pinconf-generic emits the mux mapping ahead of the config mapping, the flag is applied after msm_pinmux_set_mux() has claimed the pin, so the combination above ends up muxed to gpio and owned remotely.

---
Pankaj Patil (2):
dt-bindings: pinctrl: qcom: Add qcom,remote-owned for ownership update
pinctrl: qcom: Add qcom,remote-owned pin configuration support

 .../bindings/pinctrl/qcom,tlmm-common.yaml         |  7 ++
 drivers/pinctrl/qcom/pinctrl-msm.c                 | 81 +++++++++++++++++++---
 2 files changed, 80 insertions(+), 8 deletions(-)

---
base-commit: d6bcfc94eb4da6e089c5473970cd96727292fd97
change-id: 20261102-egpio_fix-ddf4c2a4f24e

Best regards,

Signature · 1 line
Pankaj Patil <[email protected]>