mirror of
https://xff.cz/git/u-boot/
synced 2025-09-01 16:52:14 +02:00
arm64: a37xx: pci: Make PCIe Reset GPIO DT compatible with Linux kernel DT
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>
This commit is contained in:
@@ -159,6 +159,6 @@
|
|||||||
&pcie0 {
|
&pcie0 {
|
||||||
pinctrl-names = "default";
|
pinctrl-names = "default";
|
||||||
pinctrl-0 = <&pcie_pins>;
|
pinctrl-0 = <&pcie_pins>;
|
||||||
reset-gpio = <&gpiosb 3 GPIO_ACTIVE_HIGH>;
|
reset-gpios = <&gpiosb 3 GPIO_ACTIVE_LOW>;
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
@@ -145,6 +145,6 @@
|
|||||||
&pcie0 {
|
&pcie0 {
|
||||||
pinctrl-names = "default";
|
pinctrl-names = "default";
|
||||||
pinctrl-0 = <&pcie_pins>;
|
pinctrl-0 = <&pcie_pins>;
|
||||||
reset-gpio = <&gpiosb 3 GPIO_ACTIVE_HIGH>;
|
reset-gpios = <&gpiosb 3 GPIO_ACTIVE_LOW>;
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
@@ -172,6 +172,6 @@
|
|||||||
&pcie0 {
|
&pcie0 {
|
||||||
pinctrl-names = "default";
|
pinctrl-names = "default";
|
||||||
pinctrl-0 = <&pcie_pins>;
|
pinctrl-0 = <&pcie_pins>;
|
||||||
reset-gpio = <&gpiosb 3 GPIO_ACTIVE_HIGH>;
|
reset-gpios = <&gpiosb 3 GPIO_ACTIVE_LOW>;
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
};
|
};
|
||||||
|
@@ -616,7 +616,7 @@ static int pcie_advk_probe(struct udevice *dev)
|
|||||||
#if CONFIG_IS_ENABLED(DM_GPIO)
|
#if CONFIG_IS_ENABLED(DM_GPIO)
|
||||||
struct gpio_desc reset_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);
|
GPIOD_IS_OUT);
|
||||||
/*
|
/*
|
||||||
* Issue reset to add-in card through the dedicated GPIO.
|
* 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)) {
|
if (dm_gpio_is_valid(&reset_gpio)) {
|
||||||
dev_dbg(pcie->dev, "Toggle PCIE Reset GPIO ...\n");
|
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);
|
dm_gpio_set_value(&reset_gpio, 1);
|
||||||
|
mdelay(200);
|
||||||
|
dm_gpio_set_value(&reset_gpio, 0);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
dev_dbg(pcie->dev, "PCIE Reset on GPIO support is missing\n");
|
dev_dbg(pcie->dev, "PCIE Reset on GPIO support is missing\n");
|
||||||
|
Reference in New Issue
Block a user