[PATCH] PCI: dwc: meson: Fix reset GPIO initial state

Neil Armstrong neil.armstrong at linaro.org
Tue Jun 16 00:10:59 PDT 2026


On 6/16/26 09:07, Ronald Claveau via B4 Relay wrote:
> From: Ronald Claveau <linux-kernel-dev at aliel.fr>
> 
> Commit 4d3186a525b3 ("PCI: amlogic: Fix reset assertion via gpio
> descriptor") inverted the reset assertion logic to use proper gpio
> descriptor semantics, and moved the polarity configuration to the
> device tree as GPIO_ACTIVE_LOW. However, the initial GPIO state
> "GPIOD_OUT_LOW" was not updated accordingly.
> 
> Change GPIOD_OUT_LOW to GPIOD_OUT_HIGH to get the right behaviour.
> 
> With GPIOD_OUT_LOW:
> 
>      ahci 0000:01:00.0: enabling device (0000 -> 0002)
>      ahci 0000:01:00.0: SSS flag set, parallel bus scan disabled
>      ahci 0000:01:00.0: Controller reset failed (0xffffffff)
>      ahci 0000:01:00.0: probe with driver ahci failed with error -5
> 
> With this fix:
> 
>      ahci 0000:01:00.0: enabling device (0000 -> 0002)
>      ahci 0000:01:00.0: AHCI vers 0001.0300, 32 command slots, 6 Gbps,
>                         SATA mode
>      ahci 0000:01:00.0: 1/1 ports implemented (port mask 0x1)
>      ahci 0000:01:00.0: flags: 64bit ncq led clo only pio ccc
> 
> Fixes: 4d3186a525b3 ("PCI: amlogic: Fix reset assertion via gpio descriptor")
> Signed-off-by: Ronald Claveau <linux-kernel-dev at aliel.fr>
> ---
>   drivers/pci/controller/dwc/pci-meson.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/pci/controller/dwc/pci-meson.c b/drivers/pci/controller/dwc/pci-meson.c
> index 0694084f612b7..15ed59b8764fb 100644
> --- a/drivers/pci/controller/dwc/pci-meson.c
> +++ b/drivers/pci/controller/dwc/pci-meson.c
> @@ -400,7 +400,7 @@ static int meson_pcie_probe(struct platform_device *pdev)
>   		return PTR_ERR(mp->phy);
>   	}
>   
> -	mp->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW);
> +	mp->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_HIGH);
>   	if (IS_ERR(mp->reset_gpio)) {
>   		dev_err(dev, "get reset gpio failed\n");
>   		return PTR_ERR(mp->reset_gpio);
> 
> ---
> base-commit: abe651837cb394f76d738a7a747322fca3bf17ba
> change-id: 20260616-fix-meson-pcie-reset-gpio-2b9e188668c5
> 
> Best regards,

Reviewed-by: Neil Armstrong <neil.armstrong at linaro.org>

Thanks,
Neil



More information about the linux-arm-kernel mailing list