Linux GPIO subsystem development
 help / color / mirror / Atom feed
* [PATCH v2] arm64: dts: qcom: sda660-inforce-ifc6560: fix ADV7535 interrupt pin
@ 2026-10-19 14:30 Dmitry Baryshkov
  2026-10-19 15:33 ` sashiko-bot
  0 siblings, 1 reply; 2+ messages in thread
From: Dmitry Baryshkov @ 2026-10-19 14:30 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Abel Vesa, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Linus Walleij,
	Bartosz Golaszewski, Marijn Suijten, Dmitry Baryshkov
  Cc: linux-arm-msm, devicetree, linux-kernel, linux-gpio, Abel Vesa

Probing the ADV7535 HDMI bridge fails on the IFC6560:

  gpio gpiochip3: (800f000.spmi:pmic@2:gpio@c000): gpiochip_lock_as_irq: tried to flag a GPIO set as output for IRQ
  gpio gpiochip3: (800f000.spmi:pmic@2:gpio@c000): unable to lock HW IRQ 10 for IRQ

The bridge's interrupt line is PM660L GPIO11, but the board never
configures that pad. pmic_gpio_populate() reads back the state left by
the bootloader, which is PMIC_GPIO_MODE_DIGITAL_OUTPUT, so
pmic_gpio_get_direction() reports GPIO_LINE_DIRECTION_OUT and
gpiochip_lock_as_irq() refuses the line. Requesting the interrupt then
fails and the bridge does not probe.

Add a default pinctrl state switching the pad to digital input, applied
by pinctrl_bind_pins() before the driver requests the interrupt. The
ADV7535 INT pin is open-drain and pulled up on the board, so leave the
internal bias disabled.

Fixes: 34279d6e3f32 ("arm64: dts: qcom: sdm660: Add initial Inforce IFC6560 board support")
Reviewed-by: Abel Vesa <abel.vesa@oss.qualcomm.com>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
---
Changes in v2:
- Dropped extra empty line (Konrad)
- Added a note about pull-up for the IRQ line present on the PCB.
- Link to v1: https://patch.msgid.link/20260920-ifc6560-adv-v1-1-89b1435d00c2@oss.qualcomm.com
---
 arch/arm64/boot/dts/qcom/sda660-inforce-ifc6560.dts | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sda660-inforce-ifc6560.dts b/arch/arm64/boot/dts/qcom/sda660-inforce-ifc6560.dts
index 9e14f53b552e..10b454cc4218 100644
--- a/arch/arm64/boot/dts/qcom/sda660-inforce-ifc6560.dts
+++ b/arch/arm64/boot/dts/qcom/sda660-inforce-ifc6560.dts
@@ -170,6 +170,9 @@ adv7533: hdmi@39 {
 		interrupt-parent = <&pm660l_gpios>;
 		interrupts = <11 IRQ_TYPE_EDGE_FALLING>;
 
+		pinctrl-0 = <&adv7533_int_default>;
+		pinctrl-names = "default";
+
 		clocks = <&rpmcc RPM_SMD_BB_CLK2>;
 		clock-names = "cec";
 		/*
@@ -285,6 +288,16 @@ sw_ctrl_default: sw-ctrl-default-state {
 	};
 };
 
+&pm660l_gpios {
+	adv7533_int_default: adv7533-int-default-state {
+		pins = "gpio11";
+		function = "normal";
+		input-enable;
+		/* pull-up on board */
+		bias-disable;
+	};
+};
+
 &qusb2phy0 {
 	status = "okay";
 

---
base-commit: 2efb7a11f1aa4d2dc285fe2680cca22cb9f72f64
change-id: 20260920-ifc6560-adv-b8ed1242008b

Best regards,
--  
With best wishes
Dmitry


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] arm64: dts: qcom: sda660-inforce-ifc6560: fix ADV7535 interrupt pin
  2026-10-19 14:30 [PATCH v2] arm64: dts: qcom: sda660-inforce-ifc6560: fix ADV7535 interrupt pin Dmitry Baryshkov
@ 2026-10-19 15:33 ` sashiko-bot
  0 siblings, 0 replies; 2+ messages in thread
From: sashiko-bot @ 2026-10-19 15:33 UTC (permalink / raw)
  To: Dmitry Baryshkov; +Cc: devicetree, linux-gpio, robh, conor+dt

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] arm64: dts: qcom: missing output-disable in adv7533_int_default
--

commit 18e53f95f5fe825b6b2171c0f9241c69a999af55
Author: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>

arm64: dts: qcom: sda660-inforce-ifc6560: fix ADV7535 interrupt pin

This commit adds a default pinctrl state for the ADV7535 HDMI bridge on the
Inforce IFC6560 board to configure PM660L GPIO11 as a digital input with
internal bias disabled.

> diff --git a/arch/arm64/boot/dts/qcom/sda660-inforce-ifc6560.dts b/arch/arm64/boot/dts/qcom/sda660-inforce-ifc6560.dts
> index 9e14f53b552eb..10b454cc4218a 100644
> --- a/arch/arm64/boot/dts/qcom/sda660-inforce-ifc6560.dts
> +++ b/arch/arm64/boot/dts/qcom/sda660-inforce-ifc6560.dts

[ ... ]

> @@ -285,6 +288,16 @@ sw_ctrl_default: sw-ctrl-default-state {
>  	};
>  };
>  
> +&pm660l_gpios {
> +	adv7533_int_default: adv7533-int-default-state {
> +		pins = "gpio11";
> +		function = "normal";
> +		input-enable;
> +		/* pull-up on board */
> +		bias-disable;
> +	};
> +};
> +

[Severity: High]
Does adv7533-int-default-state also need output-disable?

When the bootloader leaves the pin in PMIC_GPIO_MODE_DIGITAL_OUTPUT,
pmic_gpio_populate() in drivers/pinctrl/qcom/pinctrl-spmi-gpio.c sets
pad->output_enabled = true:

	case PMIC_GPIO_MODE_DIGITAL_OUTPUT:
		pad->input_enabled = false;
		pad->output_enabled = true;
		break;

In pmic_gpio_config_set(), PIN_CONFIG_INPUT_ENABLE only updates
pad->input_enabled and leaves pad->output_enabled untouched unless
PIN_CONFIG_OUTPUT_ENABLE (output-disable) is also passed:

		case PIN_CONFIG_INPUT_ENABLE:
			pad->input_enabled = arg ? true : false;
			break;
		case PIN_CONFIG_OUTPUT_ENABLE:
			pad->output_enabled = arg ? true : false;
			break;

With both flags true, pmic_gpio_config_set() programs the mode to
PMIC_GPIO_MODE_DIGITAL_INPUT_OUTPUT rather than PMIC_GPIO_MODE_DIGITAL_INPUT:

	if (pad->analog_pass)
		val = PMIC_GPIO_MODE_ANALOG_PASS_THRU;
	else if (pad->output_enabled && pad->input_enabled)
		val = PMIC_GPIO_MODE_DIGITAL_INPUT_OUTPUT;
	else if (pad->output_enabled)
		val = PMIC_GPIO_MODE_DIGITAL_OUTPUT;
	else
		val = PMIC_GPIO_MODE_DIGITAL_INPUT;

Additionally, since commit 19fc4240358b ("pinctrl: qcom: spmi-gpio: make
direction changes exclusive"), pmic_gpio_get_direction() checks
pad->output_enabled:

	return pad->output_enabled ? GPIO_LINE_DIRECTION_OUT : GPIO_LINE_DIRECTION_IN;

Without output-disable to clear pad->output_enabled, won't the PMIC output
buffer remain active on the open-drain interrupt line and cause
pmic_gpio_get_direction() to still report GPIO_LINE_DIRECTION_OUT to
gpiochip_lock_as_irq()?

>  &qusb2phy0 {
>  	status = "okay";
>

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261019-ifc6560-adv-v2-1-ade625df3fe3@oss.qualcomm.com?part=1

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-10-19 15:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-19 14:30 [PATCH v2] arm64: dts: qcom: sda660-inforce-ifc6560: fix ADV7535 interrupt pin Dmitry Baryshkov
2026-10-19 15:33 ` sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox