ODROID-G12: Fix otg_host_mode overlay.

The current kernel does not suppport for delete-property
in overlay dts.

Change-Id: I027dd5d0eca17c9084f1a0326290944fe82ab982
This commit is contained in:
Chris
2021-06-28 14:45:13 +09:00
parent 6899f2df14
commit 0b17b549ee
3 changed files with 11 additions and 10 deletions

View File

@@ -26,8 +26,8 @@
status = "okay";
portnum = <1>;
otg = <0>;
gpio-vbus-power = "";
gpios = <>;
gpio-vbus-power;
gpios;
};
};
};

View File

@@ -26,8 +26,8 @@
status = "okay";
portnum = <1>;
otg = <0>;
gpio-vbus-power = "";
gpios = <>;
gpio-vbus-power;
gpios;
};
};
};

View File

@@ -536,13 +536,14 @@ static int amlogic_new_usb3_v2_probe(struct platform_device *pdev)
u32 u3_hhi_mem_pd_shift = 0;
u32 u3_hhi_mem_pd_mask = 0;
u32 u3_ctrl_iso_shift = 0;
int len = 0;
#if defined(CONFIG_ARCH_MESON64_ODROID_COMMON)
struct gpio_desc *huben_gd = NULL;
struct gpio_desc *hubrst_gd = NULL;
#endif
gpio_name = of_get_property(dev->of_node, "gpio-vbus-power", NULL);
if (gpio_name) {
gpio_name = of_get_property(dev->of_node, "gpio-vbus-power", &len);
if (gpio_name && len != 0) {
gpio_vbus_power_pin = 1;
usb_gd = gpiod_get_index(&pdev->dev,
NULL, 0, GPIOD_OUT_LOW);
@@ -551,8 +552,8 @@ static int amlogic_new_usb3_v2_probe(struct platform_device *pdev)
}
#if defined(CONFIG_ARCH_MESON64_ODROID_COMMON)
gpio_name = of_get_property(dev->of_node, "hub-en", NULL);
if (gpio_name) {
gpio_name = of_get_property(dev->of_node, "hub-en", &len);
if (gpio_name && len != 0) {
huben_gd = gpiod_get_index(&pdev->dev,
NULL, 1, GPIOD_OUT_HIGH);
if (IS_ERR(huben_gd))
@@ -562,8 +563,8 @@ static int amlogic_new_usb3_v2_probe(struct platform_device *pdev)
gpiod_put(huben_gd);
}
gpio_name = of_get_property(dev->of_node, "hub-rst", NULL);
if (gpio_name) {
gpio_name = of_get_property(dev->of_node, "hub-rst", &len);
if (gpio_name && len != 0) {
hubrst_gd = gpiod_get_index(&pdev->dev,
NULL, 2, GPIOD_OUT_HIGH);
if (IS_ERR(hubrst_gd))