]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
arm64: a37xx: pci: Make PCIe Reset GPIO DT compatible with Linux kernel DT
authorPali Rohár <pali@kernel.org>
Wed, 19 Aug 2020 13:57:06 +0000 (15:57 +0200)
committerStefan Roese <sr@denx.de>
Mon, 31 Aug 2020 12:45:53 +0000 (14:45 +0200)
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: Stefan Roese <sr@denx.de>
Reviewed-by: Konstantin Porotchkin <kostap@marvell.com>
Tested-by: Andre Heider <a.heider@gmail.com>
arch/arm/dts/armada-3720-db.dts
arch/arm/dts/armada-3720-espressobin.dts
arch/arm/dts/armada-3720-turris-mox.dts
drivers/pci/pci-aardvark.c

index 1b219c423bd796ac24794542f3d325eeadb35178..1b1b66b94de689d4ae722d0061bd77f6080de445 100644 (file)
 &pcie0 {
        pinctrl-names = "default";
        pinctrl-0 = <&pcie_pins>;
-       reset-gpio = <&gpiosb 3 GPIO_ACTIVE_HIGH>;
+       reset-gpios = <&gpiosb 3 GPIO_ACTIVE_LOW>;
        status = "okay";
 };
index 50381e979e8647c9acb84d941223fa7e10cb5faa..2ace52e812fd5591bef4b5b303ed99a2f6fed381 100644 (file)
 &pcie0 {
        pinctrl-names = "default";
        pinctrl-0 = <&pcie_pins>;
-       reset-gpio = <&gpiosb 3 GPIO_ACTIVE_HIGH>;
+       reset-gpios = <&gpiosb 3 GPIO_ACTIVE_LOW>;
        status = "okay";
 };
index 0f0a6ce65d86a81f262c9f1e69d1b76322acb8ae..974270cc8c6820f8b05825450304484a8067b92f 100644 (file)
 &pcie0 {
        pinctrl-names = "default";
        pinctrl-0 = <&pcie_pins>;
-       reset-gpio = <&gpiosb 3 GPIO_ACTIVE_HIGH>;
+       reset-gpios = <&gpiosb 3 GPIO_ACTIVE_LOW>;
        status = "disabled";
 };
index 711b930d0f9fb4d5018e91b5589f25148ff27602..5b3f23c18442deafd9b3d5f6c7cf6210edce3c5f 100644 (file)
@@ -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");