[EXT] [PATCH 1/2] arm64: a37xx: pci: Make PCIe Reset GPIO DT compatible with Linux kernel DT

Stefan Roese
2020-08-20T05:09:34Z

Hi Kosta,

AFAICT, this mail does not contain any info from you. I can only
assume, that you wanted to send a Reviewed-by tag. If yes, then
please double-check which mails did not work and resend them with
the correct tags. As they are automatically collected by patchwork.

Thanks,
Stefan

On 19.08.20 19:28, Kostya Porotchkin wrote:
>
>
> ________________________________________
> From: Pali Roh?r <pali@kernel.org>
> Sent: Wednesday, August 19, 2020 16:57
> To: Stefan Roese; Kostya Porotchkin
> Cc: u-boot at lists.denx.de
> Subject: [EXT] [PATCH 1/2] arm64: a37xx: pci: Make PCIe Reset GPIO DT compatible with Linux kernel DT
>
> External Email
>
> ----------------------------------------------------------------------
> Change active-high to active-low and change DT property name from
> reset-gpio to reset-gpios. This format of gpio reset is used by
> pci-aardvark driver in Linux kernel.
>
> Signed-off-by: Pali Roh?r <pali@kernel.org>
> Reviewed-by: Konstantin Porotchkin <kostap@marvell.com>
> ---
> arch/arm/dts/armada-3720-db.dts | 2 +-
> arch/arm/dts/armada-3720-espressobin.dts | 2 +-
> arch/arm/dts/armada-3720-turris-mox.dts | 2 +-
> drivers/pci/pci-aardvark.c | 6 +++---
> 4 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/arch/arm/dts/armada-3720-db.dts b/arch/arm/dts/armada-3720-db.dts
> index 1b219c423b..1b1b66b94d 100644
> --- a/arch/arm/dts/armada-3720-db.dts
> +++ b/arch/arm/dts/armada-3720-db.dts
> @@ -159,6 +159,6 @@
> &pcie0 {
> pinctrl-names = "default";
> pinctrl-0 = <&pcie_pins>;
> - reset-gpio = <&gpiosb 3 GPIO_ACTIVE_HIGH>;
> + reset-gpios = <&gpiosb 3 GPIO_ACTIVE_LOW>;
> status = "okay";
> };
> diff --git a/arch/arm/dts/armada-3720-espressobin.dts b/arch/arm/dts/armada-3720-espressobin.dts
> index 84e2c2adba..f10a953ec5 100644
> --- a/arch/arm/dts/armada-3720-espressobin.dts
> +++ b/arch/arm/dts/armada-3720-espressobin.dts
> @@ -145,6 +145,6 @@
> &pcie0 {
> pinctrl-names = "default";
> pinctrl-0 = <&pcie_pins>;
> - reset-gpio = <&gpiosb 3 GPIO_ACTIVE_HIGH>;
> + reset-gpios = <&gpiosb 3 GPIO_ACTIVE_LOW>;
> status = "okay";
> };
> diff --git a/arch/arm/dts/armada-3720-turris-mox.dts b/arch/arm/dts/armada-3720-turris-mox.dts
> index 0f0a6ce65d..974270cc8c 100644
> --- a/arch/arm/dts/armada-3720-turris-mox.dts
> +++ b/arch/arm/dts/armada-3720-turris-mox.dts
> @@ -172,6 +172,6 @@
> &pcie0 {
> pinctrl-names = "default";
> pinctrl-0 = <&pcie_pins>;
> - reset-gpio = <&gpiosb 3 GPIO_ACTIVE_HIGH>;
> + reset-gpios = <&gpiosb 3 GPIO_ACTIVE_LOW>;
> status = "disabled";
> };
> diff --git a/drivers/pci/pci-aardvark.c b/drivers/pci/pci-aardvark.c
> index 711b930d0f..5b3f23c184 100644
> --- a/drivers/pci/pci-aardvark.c
> +++ b/drivers/pci/pci-aardvark.c
> @@ -616,7 +616,7 @@ static int pcie_advk_probe(struct udevice *dev)
> #if CONFIG_IS_ENABLED(DM_GPIO)
> struct gpio_desc reset_gpio;
>
> - gpio_request_by_name(dev, "reset-gpio", 0, &reset_gpio,
> + gpio_request_by_name(dev, "reset-gpios", 0, &reset_gpio,
> GPIOD_IS_OUT);
> /*
> * Issue reset to add-in card through the dedicated GPIO.
> @@ -633,9 +633,9 @@ static int pcie_advk_probe(struct udevice *dev)
> */
> if (dm_gpio_is_valid(&reset_gpio)) {
> dev_dbg(pcie->dev, "Toggle PCIE Reset GPIO ...\n");
> - dm_gpio_set_value(&reset_gpio, 0);
> - mdelay(200);
> dm_gpio_set_value(&reset_gpio, 1);
> + mdelay(200);
> + dm_gpio_set_value(&reset_gpio, 0);
> }
> #else
> dev_dbg(pcie->dev, "PCIE Reset on GPIO support is missing\n");
> --
> 2.20.1
>

Viele Gr??e,
Stefan

--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr at denx.de