* [PATCH v2 0/4] USB3503: correct GPIOs polarity and update the driver [not found] <CGME20191211144647eucas1p23d85dee21029f864076eece98aadd525@eucas1p2.samsung.com> @ 2019-12-11 14:46 ` Marek Szyprowski [not found] ` <CGME20191211144648eucas1p2065aac523ce190a5c0e6e2b5b11bd5ce@eucas1p2.samsung.com> ` (3 more replies) 0 siblings, 4 replies; 8+ messages in thread From: Marek Szyprowski @ 2019-12-11 14:46 UTC (permalink / raw) To: linux-usb, linux-samsung-soc, linux-mediatek, linux-kernel, linux-arm-kernel Cc: Marek Szyprowski, Greg Kroah-Hartman, Krzysztof Kozlowski, Matthias Brugger, Maxime Ripard, Chen-Yu Tsai, Andy Gross, Bjorn Andersson, Stefan Agner, Chunfeng Yun, Bartlomiej Zolnierkiewicz Dear All, A few days ago a patch for USB3503 driver has been posted (see v1 in the changelog below), which changes the GPIO API used by the driver to the new one (descriptor based). It turned out that this conversion broke USB HUB operation on some boards (observed on Arndale5250). Further analysis revealed that the existing code ignored the GPIO polarity flags in the device tree. On the other hand the current GPIO polarity flags used by various boards were simply incorrect, as it was not possible to test them properly. This patchset provides some standardisation for the GPIO polarity flags for USB3503 chips in various DTS files and adds matching logic to USB3503 driver. For more information and rationale behind this approach, see the thread linked as v1 below. This patchset has been tested on the following boards: Odroid X2, U3, XU and Arndale5250. The patch for USB3503 driver should be merged one release later than the DTS changes to keep the affected boards working in meantime. Best regards Marek Szyprowski Samsung R&D Institute Poland Changelog: v2: - added DTS fixes, assumed that RESET GPIO should be ACTIVE_LOW and all other GPIOs ACTIVE_HIGH - integrated a fixup for USB3503 driver inverting the logic behind the RESET GPIO to match the standardised GPIOs polarity v1: https://lore.kernel.org/linux-usb/20191205145633.187511-1-linus.walleij@linaro.org/T/ - initial version, contains only USB3503 driver patch Patch summary: Linus Walleij (1): usb: usb3503: Convert to use GPIO descriptors Marek Szyprowski (3): ARM: dts: exynos: Correct USB3503 GPIOs polarity ARM: dts: qcom: Correct USB3503 GPIOs polarity ARM: dts: sun8i: a83t: Correct USB3503 GPIOs polarity .../boot/dts/exynos4412-odroid-common.dtsi | 2 +- arch/arm/boot/dts/exynos5250-arndale.dts | 2 +- arch/arm/boot/dts/exynos5410-odroidxu.dts | 2 +- .../dts/qcom-mdm9615-wp8548-mangoh-green.dts | 2 +- .../boot/dts/sun8i-a83t-cubietruck-plus.dts | 2 +- drivers/usb/misc/usb3503.c | 94 +++++++------------ include/linux/platform_data/usb3503.h | 3 - 7 files changed, 40 insertions(+), 67 deletions(-) -- 2.17.1 ^ permalink raw reply [flat|nested] 8+ messages in thread
[parent not found: <CGME20191211144648eucas1p2065aac523ce190a5c0e6e2b5b11bd5ce@eucas1p2.samsung.com>]
* [PATCH v2 1/4] ARM: dts: exynos: Correct USB3503 GPIOs polarity [not found] ` <CGME20191211144648eucas1p2065aac523ce190a5c0e6e2b5b11bd5ce@eucas1p2.samsung.com> @ 2019-12-11 14:46 ` Marek Szyprowski 2019-12-12 20:21 ` Krzysztof Kozlowski 0 siblings, 1 reply; 8+ messages in thread From: Marek Szyprowski @ 2019-12-11 14:46 UTC (permalink / raw) To: linux-usb, linux-samsung-soc, linux-mediatek, linux-kernel, linux-arm-kernel Cc: Marek Szyprowski, Greg Kroah-Hartman, Krzysztof Kozlowski, Matthias Brugger, Maxime Ripard, Chen-Yu Tsai, Andy Gross, Bjorn Andersson, Stefan Agner, Chunfeng Yun, Bartlomiej Zolnierkiewicz Current USB3503 driver ignores GPIO polarity and always operates as if the GPIO lines were flagged as ACTIVE_HIGH. Fix the polarity for the existing USB3503 chip applications to match the chip specification and common convention for naming the pins. The only pin, which has to be ACTIVE_LOW is the reset pin. The remaining are ACTIVE_HIGH. This change allows later to fix the USB3503 driver to properly use generic GPIO bindings and read polarity from DT. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> --- arch/arm/boot/dts/exynos4412-odroid-common.dtsi | 2 +- arch/arm/boot/dts/exynos5250-arndale.dts | 2 +- arch/arm/boot/dts/exynos5410-odroidxu.dts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm/boot/dts/exynos4412-odroid-common.dtsi b/arch/arm/boot/dts/exynos4412-odroid-common.dtsi index ea55f377d17c..9c39e82e4ecb 100644 --- a/arch/arm/boot/dts/exynos4412-odroid-common.dtsi +++ b/arch/arm/boot/dts/exynos4412-odroid-common.dtsi @@ -267,7 +267,7 @@ intn-gpios = <&gpx3 0 GPIO_ACTIVE_HIGH>; connect-gpios = <&gpx3 4 GPIO_ACTIVE_HIGH>; - reset-gpios = <&gpx3 5 GPIO_ACTIVE_HIGH>; + reset-gpios = <&gpx3 5 GPIO_ACTIVE_LOW>; initial-mode = <1>; }; diff --git a/arch/arm/boot/dts/exynos5250-arndale.dts b/arch/arm/boot/dts/exynos5250-arndale.dts index d6c85efdb465..3eddf5dbcf7b 100644 --- a/arch/arm/boot/dts/exynos5250-arndale.dts +++ b/arch/arm/boot/dts/exynos5250-arndale.dts @@ -154,7 +154,7 @@ compatible = "smsc,usb3503a"; reset-gpios = <&gpx3 5 GPIO_ACTIVE_LOW>; - connect-gpios = <&gpd1 7 GPIO_ACTIVE_LOW>; + connect-gpios = <&gpd1 7 GPIO_ACTIVE_HIGH>; }; }; diff --git a/arch/arm/boot/dts/exynos5410-odroidxu.dts b/arch/arm/boot/dts/exynos5410-odroidxu.dts index e0db251e253f..4f9297ae0763 100644 --- a/arch/arm/boot/dts/exynos5410-odroidxu.dts +++ b/arch/arm/boot/dts/exynos5410-odroidxu.dts @@ -170,7 +170,7 @@ intn-gpios = <&gpx0 7 GPIO_ACTIVE_HIGH>; connect-gpios = <&gpx0 6 GPIO_ACTIVE_HIGH>; - reset-gpios = <&gpx1 4 GPIO_ACTIVE_HIGH>; + reset-gpios = <&gpx1 4 GPIO_ACTIVE_LOW>; initial-mode = <1>; clock-names = "refclk"; -- 2.17.1 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH v2 1/4] ARM: dts: exynos: Correct USB3503 GPIOs polarity 2019-12-11 14:46 ` [PATCH v2 1/4] ARM: dts: exynos: Correct USB3503 GPIOs polarity Marek Szyprowski @ 2019-12-12 20:21 ` Krzysztof Kozlowski 0 siblings, 0 replies; 8+ messages in thread From: Krzysztof Kozlowski @ 2019-12-12 20:21 UTC (permalink / raw) To: Marek Szyprowski Cc: linux-usb, linux-samsung-soc, linux-mediatek, linux-kernel, linux-arm-kernel, Greg Kroah-Hartman, Matthias Brugger, Maxime Ripard, Chen-Yu Tsai, Andy Gross, Bjorn Andersson, Stefan Agner, Chunfeng Yun, Bartlomiej Zolnierkiewicz On Wed, Dec 11, 2019 at 03:46:35PM +0100, Marek Szyprowski wrote: > Current USB3503 driver ignores GPIO polarity and always operates as if the > GPIO lines were flagged as ACTIVE_HIGH. Fix the polarity for the existing > USB3503 chip applications to match the chip specification and common > convention for naming the pins. The only pin, which has to be ACTIVE_LOW > is the reset pin. The remaining are ACTIVE_HIGH. This change allows later > to fix the USB3503 driver to properly use generic GPIO bindings and read > polarity from DT. > Thanks, applied (for v5.6). Best regards, Krzysztof ^ permalink raw reply [flat|nested] 8+ messages in thread
[parent not found: <CGME20191211144649eucas1p1b882634306383e225dbab70629d2f222@eucas1p1.samsung.com>]
* [PATCH v2 2/4] ARM: dts: qcom: Correct USB3503 GPIOs polarity [not found] ` <CGME20191211144649eucas1p1b882634306383e225dbab70629d2f222@eucas1p1.samsung.com> @ 2019-12-11 14:46 ` Marek Szyprowski 0 siblings, 0 replies; 8+ messages in thread From: Marek Szyprowski @ 2019-12-11 14:46 UTC (permalink / raw) To: linux-usb, linux-samsung-soc, linux-mediatek, linux-kernel, linux-arm-kernel Cc: Marek Szyprowski, Greg Kroah-Hartman, Krzysztof Kozlowski, Matthias Brugger, Maxime Ripard, Chen-Yu Tsai, Andy Gross, Bjorn Andersson, Stefan Agner, Chunfeng Yun, Bartlomiej Zolnierkiewicz Current USB3503 driver ignores GPIO polarity and always operates as if the GPIO lines were flagged as ACTIVE_HIGH. Fix the polarity for the existing USB3503 chip applications to match the chip specification and common convention for naming the pins. The only pin, which has to be ACTIVE_LOW is the reset pin. The remaining are ACTIVE_HIGH. This change allows later to fix the USB3503 driver to properly use generic GPIO bindings and read polarity from DT. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> --- arch/arm/boot/dts/qcom-mdm9615-wp8548-mangoh-green.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/qcom-mdm9615-wp8548-mangoh-green.dts b/arch/arm/boot/dts/qcom-mdm9615-wp8548-mangoh-green.dts index 26160c324802..942e3a2cac35 100644 --- a/arch/arm/boot/dts/qcom-mdm9615-wp8548-mangoh-green.dts +++ b/arch/arm/boot/dts/qcom-mdm9615-wp8548-mangoh-green.dts @@ -143,7 +143,7 @@ compatible = "smsc,usb3503a"; reg = <0x8>; connect-gpios = <&gpioext2 1 GPIO_ACTIVE_HIGH>; - intn-gpios = <&gpioext2 0 GPIO_ACTIVE_LOW>; + intn-gpios = <&gpioext2 0 GPIO_ACTIVE_HIGH>; initial-mode = <1>; }; }; -- 2.17.1 ^ permalink raw reply related [flat|nested] 8+ messages in thread
[parent not found: <CGME20191211144649eucas1p2ec8ca5bec84c179a5cbf01a285e82837@eucas1p2.samsung.com>]
* [PATCH v2 3/4] ARM: dts: sun8i: a83t: Correct USB3503 GPIOs polarity [not found] ` <CGME20191211144649eucas1p2ec8ca5bec84c179a5cbf01a285e82837@eucas1p2.samsung.com> @ 2019-12-11 14:46 ` Marek Szyprowski 0 siblings, 0 replies; 8+ messages in thread From: Marek Szyprowski @ 2019-12-11 14:46 UTC (permalink / raw) To: linux-usb, linux-samsung-soc, linux-mediatek, linux-kernel, linux-arm-kernel Cc: Marek Szyprowski, Greg Kroah-Hartman, Krzysztof Kozlowski, Matthias Brugger, Maxime Ripard, Chen-Yu Tsai, Andy Gross, Bjorn Andersson, Stefan Agner, Chunfeng Yun, Bartlomiej Zolnierkiewicz Current USB3503 driver ignores GPIO polarity and always operates as if the GPIO lines were flagged as ACTIVE_HIGH. Fix the polarity for the existing USB3503 chip applications to match the chip specification and common convention for naming the pins. The only pin, which has to be ACTIVE_LOW is the reset pin. The remaining are ACTIVE_HIGH. This change allows later to fix the USB3503 driver to properly use generic GPIO bindings and read polarity from DT. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> --- arch/arm/boot/dts/sun8i-a83t-cubietruck-plus.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/sun8i-a83t-cubietruck-plus.dts b/arch/arm/boot/dts/sun8i-a83t-cubietruck-plus.dts index fb928503ad45..d9be511f054f 100644 --- a/arch/arm/boot/dts/sun8i-a83t-cubietruck-plus.dts +++ b/arch/arm/boot/dts/sun8i-a83t-cubietruck-plus.dts @@ -101,7 +101,7 @@ initial-mode = <1>; /* initialize in HUB mode */ disabled-ports = <1>; intn-gpios = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */ - reset-gpios = <&pio 4 16 GPIO_ACTIVE_HIGH>; /* PE16 */ + reset-gpios = <&pio 4 16 GPIO_ACTIVE_LOW>; /* PE16 */ connect-gpios = <&pio 4 17 GPIO_ACTIVE_HIGH>; /* PE17 */ refclk-frequency = <19200000>; }; -- 2.17.1 ^ permalink raw reply related [flat|nested] 8+ messages in thread
[parent not found: <CGME20191211144650eucas1p221857c5e96ee4b5730fad80e105933ac@eucas1p2.samsung.com>]
* [PATCH v2 4/4] usb: usb3503: Convert to use GPIO descriptors [not found] ` <CGME20191211144650eucas1p221857c5e96ee4b5730fad80e105933ac@eucas1p2.samsung.com> @ 2019-12-11 14:46 ` Marek Szyprowski 0 siblings, 0 replies; 8+ messages in thread From: Marek Szyprowski @ 2019-12-11 14:46 UTC (permalink / raw) To: linux-usb, linux-samsung-soc, linux-mediatek, linux-kernel, linux-arm-kernel Cc: Marek Szyprowski, Greg Kroah-Hartman, Krzysztof Kozlowski, Matthias Brugger, Maxime Ripard, Chen-Yu Tsai, Andy Gross, Bjorn Andersson, Stefan Agner, Chunfeng Yun, Bartlomiej Zolnierkiewicz, Linus Walleij From: Linus Walleij <linus.walleij@linaro.org> This converts the USB3503 to pick GPIO descriptors from the device tree instead of iteratively picking out GPIO number references and then referencing these from the global GPIO numberspace. The USB3503 is only used from device tree among the in-tree platforms. If board files would still desire to use it they can provide machine descriptor tables. Make sure to preserve semantics such as the reset delay introduced by Stefan. Cc: Chunfeng Yun <chunfeng.yun@mediatek.com> Cc: Marek Szyprowski <m.szyprowski@samsung.com> Cc: Stefan Agner <stefan@agner.ch> Cc: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> [mszyprow: invert the logic behind reset GPIO line] Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> --- drivers/usb/misc/usb3503.c | 94 ++++++++++----------------- include/linux/platform_data/usb3503.h | 3 - 2 files changed, 35 insertions(+), 62 deletions(-) diff --git a/drivers/usb/misc/usb3503.c b/drivers/usb/misc/usb3503.c index 72f39a9751b5..116bd789e568 100644 --- a/drivers/usb/misc/usb3503.c +++ b/drivers/usb/misc/usb3503.c @@ -7,11 +7,10 @@ #include <linux/clk.h> #include <linux/i2c.h> -#include <linux/gpio.h> +#include <linux/gpio/consumer.h> #include <linux/delay.h> #include <linux/slab.h> #include <linux/module.h> -#include <linux/of_gpio.h> #include <linux/platform_device.h> #include <linux/platform_data/usb3503.h> #include <linux/regmap.h> @@ -47,19 +46,19 @@ struct usb3503 { struct device *dev; struct clk *clk; u8 port_off_mask; - int gpio_intn; - int gpio_reset; - int gpio_connect; + struct gpio_desc *intn; + struct gpio_desc *reset; + struct gpio_desc *connect; bool secondary_ref_clk; }; static int usb3503_reset(struct usb3503 *hub, int state) { - if (!state && gpio_is_valid(hub->gpio_connect)) - gpio_set_value_cansleep(hub->gpio_connect, 0); + if (!state && hub->connect) + gpiod_set_value_cansleep(hub->connect, 0); - if (gpio_is_valid(hub->gpio_reset)) - gpio_set_value_cansleep(hub->gpio_reset, state); + if (hub->reset) + gpiod_set_value_cansleep(hub->reset, !state); /* Wait T_HUBINIT == 4ms for hub logic to stabilize */ if (state) @@ -115,8 +114,8 @@ static int usb3503_connect(struct usb3503 *hub) } } - if (gpio_is_valid(hub->gpio_connect)) - gpio_set_value_cansleep(hub->gpio_connect, 1); + if (hub->connect) + gpiod_set_value_cansleep(hub->connect, 1); hub->mode = USB3503_MODE_HUB; dev_info(dev, "switched to HUB mode\n"); @@ -163,13 +162,11 @@ static int usb3503_probe(struct usb3503 *hub) int err; u32 mode = USB3503_MODE_HUB; const u32 *property; + enum gpiod_flags flags; int len; if (pdata) { hub->port_off_mask = pdata->port_off_mask; - hub->gpio_intn = pdata->gpio_intn; - hub->gpio_connect = pdata->gpio_connect; - hub->gpio_reset = pdata->gpio_reset; hub->mode = pdata->initial_mode; } else if (np) { u32 rate = 0; @@ -230,59 +227,38 @@ static int usb3503_probe(struct usb3503 *hub) } } - hub->gpio_intn = of_get_named_gpio(np, "intn-gpios", 0); - if (hub->gpio_intn == -EPROBE_DEFER) - return -EPROBE_DEFER; - hub->gpio_connect = of_get_named_gpio(np, "connect-gpios", 0); - if (hub->gpio_connect == -EPROBE_DEFER) - return -EPROBE_DEFER; - hub->gpio_reset = of_get_named_gpio(np, "reset-gpios", 0); - if (hub->gpio_reset == -EPROBE_DEFER) - return -EPROBE_DEFER; of_property_read_u32(np, "initial-mode", &mode); hub->mode = mode; } - if (hub->port_off_mask && !hub->regmap) - dev_err(dev, "Ports disabled with no control interface\n"); - - if (gpio_is_valid(hub->gpio_intn)) { - int val = hub->secondary_ref_clk ? GPIOF_OUT_INIT_LOW : - GPIOF_OUT_INIT_HIGH; - err = devm_gpio_request_one(dev, hub->gpio_intn, val, - "usb3503 intn"); - if (err) { - dev_err(dev, - "unable to request GPIO %d as interrupt pin (%d)\n", - hub->gpio_intn, err); - return err; - } - } - - if (gpio_is_valid(hub->gpio_connect)) { - err = devm_gpio_request_one(dev, hub->gpio_connect, - GPIOF_OUT_INIT_LOW, "usb3503 connect"); - if (err) { - dev_err(dev, - "unable to request GPIO %d as connect pin (%d)\n", - hub->gpio_connect, err); - return err; - } - } - - if (gpio_is_valid(hub->gpio_reset)) { - err = devm_gpio_request_one(dev, hub->gpio_reset, - GPIOF_OUT_INIT_LOW, "usb3503 reset"); + if (hub->secondary_ref_clk) + flags = GPIOD_OUT_LOW; + else + flags = GPIOD_OUT_HIGH; + hub->intn = devm_gpiod_get_optional(dev, "intn", flags); + if (IS_ERR(hub->intn)) + return PTR_ERR(hub->intn); + if (hub->intn) + gpiod_set_consumer_name(hub->intn, "usb3503 intn"); + + hub->connect = devm_gpiod_get_optional(dev, "connect", GPIOD_OUT_LOW); + if (IS_ERR(hub->connect)) + return PTR_ERR(hub->connect); + if (hub->connect) + gpiod_set_consumer_name(hub->connect, "usb3503 connect"); + + hub->reset = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_HIGH); + if (IS_ERR(hub->reset)) + return PTR_ERR(hub->reset); + if (hub->reset) { /* Datasheet defines a hardware reset to be at least 100us */ usleep_range(100, 10000); - if (err) { - dev_err(dev, - "unable to request GPIO %d as reset pin (%d)\n", - hub->gpio_reset, err); - return err; - } + gpiod_set_consumer_name(hub->reset, "usb3503 reset"); } + if (hub->port_off_mask && !hub->regmap) + dev_err(dev, "Ports disabled with no control interface\n"); + usb3503_switch_mode(hub, hub->mode); dev_info(dev, "%s: probed in %s mode\n", __func__, diff --git a/include/linux/platform_data/usb3503.h b/include/linux/platform_data/usb3503.h index e049d51c1353..d01ef97ddf36 100644 --- a/include/linux/platform_data/usb3503.h +++ b/include/linux/platform_data/usb3503.h @@ -17,9 +17,6 @@ enum usb3503_mode { struct usb3503_platform_data { enum usb3503_mode initial_mode; u8 port_off_mask; - int gpio_intn; - int gpio_connect; - int gpio_reset; }; #endif -- 2.17.1 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v2 0/4 RESEND] USB3503: correct GPIOs polarity and update the driver @ 2019-12-11 14:50 Marek Szyprowski [not found] ` <CGME20191211145213eucas1p2c438f848ba705fa407331bb31b03b626@eucas1p2.samsung.com> 0 siblings, 1 reply; 8+ messages in thread From: Marek Szyprowski @ 2019-12-11 14:50 UTC (permalink / raw) To: linux-usb, linux-samsung-soc, linux-mediatek, linux-kernel, linux-arm-kernel Cc: Marek Szyprowski, Greg Kroah-Hartman, Krzysztof Kozlowski, Matthias Brugger, Maxime Ripard, Chen-Yu Tsai, Andy Gross, Bjorn Andersson, Stefan Agner, Chunfeng Yun, Linus Walleij, Bartlomiej Zolnierkiewicz Dear All, A few days ago a patch for USB3503 driver has been posted (see v1 in the changelog below), which changes the GPIO API used by the driver to the new one (descriptor based). It turned out that this conversion broke USB HUB operation on some boards (observed on Arndale5250). Further analysis revealed that the existing code ignored the GPIO polarity flags in the device tree. On the other hand the current GPIO polarity flags used by various boards were simply incorrect, as it was not possible to test them properly. This patchset provides some standardisation for the GPIO polarity flags for USB3503 chips in various DTS files and adds matching logic to USB3503 driver. For more information and rationale behind this approach, see the thread linked as v1 below. This patchset has been tested on the following boards: Odroid X2, U3, XU and Arndale5250. The patch for USB3503 driver should be merged one release later than the DTS changes to keep the affected boards working in meantime. Best regards Marek Szyprowski Samsung R&D Institute Poland Changelog: v2 resend: - resend reason: missed some important people on CC: v2: - added DTS fixes, assumed that RESET GPIO should be ACTIVE_LOW and all other GPIOs ACTIVE_HIGH - integrated a fixup for USB3503 driver inverting the logic behind the RESET GPIO to match the standardised GPIOs polarity v1: https://lore.kernel.org/linux-usb/20191205145633.187511-1-linus.walleij@linaro.org/T/ - initial version, contains only USB3503 driver patch Patch summary: Linus Walleij (1): usb: usb3503: Convert to use GPIO descriptors Marek Szyprowski (3): ARM: dts: exynos: Correct USB3503 GPIOs polarity ARM: dts: qcom: Correct USB3503 GPIOs polarity ARM: dts: sun8i: a83t: Correct USB3503 GPIOs polarity .../boot/dts/exynos4412-odroid-common.dtsi | 2 +- arch/arm/boot/dts/exynos5250-arndale.dts | 2 +- arch/arm/boot/dts/exynos5410-odroidxu.dts | 2 +- .../dts/qcom-mdm9615-wp8548-mangoh-green.dts | 2 +- .../boot/dts/sun8i-a83t-cubietruck-plus.dts | 2 +- drivers/usb/misc/usb3503.c | 94 +++++++------------ include/linux/platform_data/usb3503.h | 3 - 7 files changed, 40 insertions(+), 67 deletions(-) -- 2.17.1 ^ permalink raw reply [flat|nested] 8+ messages in thread
[parent not found: <CGME20191211145213eucas1p2c438f848ba705fa407331bb31b03b626@eucas1p2.samsung.com>]
* [PATCH v2 2/4] ARM: dts: qcom: Correct USB3503 GPIOs polarity [not found] ` <CGME20191211145213eucas1p2c438f848ba705fa407331bb31b03b626@eucas1p2.samsung.com> @ 2019-12-11 14:52 ` Marek Szyprowski 2019-12-18 5:42 ` Bjorn Andersson 0 siblings, 1 reply; 8+ messages in thread From: Marek Szyprowski @ 2019-12-11 14:52 UTC (permalink / raw) To: linux-usb, linux-samsung-soc, linux-mediatek, linux-kernel, linux-arm-kernel Cc: Marek Szyprowski, Greg Kroah-Hartman, Krzysztof Kozlowski, Matthias Brugger, Maxime Ripard, Chen-Yu Tsai, Andy Gross, Bjorn Andersson, Stefan Agner, Chunfeng Yun, Linus Walleij, Bartlomiej Zolnierkiewicz Current USB3503 driver ignores GPIO polarity and always operates as if the GPIO lines were flagged as ACTIVE_HIGH. Fix the polarity for the existing USB3503 chip applications to match the chip specification and common convention for naming the pins. The only pin, which has to be ACTIVE_LOW is the reset pin. The remaining are ACTIVE_HIGH. This change allows later to fix the USB3503 driver to properly use generic GPIO bindings and read polarity from DT. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> --- arch/arm/boot/dts/qcom-mdm9615-wp8548-mangoh-green.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/qcom-mdm9615-wp8548-mangoh-green.dts b/arch/arm/boot/dts/qcom-mdm9615-wp8548-mangoh-green.dts index 26160c324802..942e3a2cac35 100644 --- a/arch/arm/boot/dts/qcom-mdm9615-wp8548-mangoh-green.dts +++ b/arch/arm/boot/dts/qcom-mdm9615-wp8548-mangoh-green.dts @@ -143,7 +143,7 @@ compatible = "smsc,usb3503a"; reg = <0x8>; connect-gpios = <&gpioext2 1 GPIO_ACTIVE_HIGH>; - intn-gpios = <&gpioext2 0 GPIO_ACTIVE_LOW>; + intn-gpios = <&gpioext2 0 GPIO_ACTIVE_HIGH>; initial-mode = <1>; }; }; -- 2.17.1 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH v2 2/4] ARM: dts: qcom: Correct USB3503 GPIOs polarity 2019-12-11 14:52 ` [PATCH v2 2/4] ARM: dts: qcom: Correct USB3503 GPIOs polarity Marek Szyprowski @ 2019-12-18 5:42 ` Bjorn Andersson 0 siblings, 0 replies; 8+ messages in thread From: Bjorn Andersson @ 2019-12-18 5:42 UTC (permalink / raw) To: Marek Szyprowski Cc: linux-usb, linux-samsung-soc, linux-mediatek, linux-kernel, linux-arm-kernel, Greg Kroah-Hartman, Krzysztof Kozlowski, Matthias Brugger, Maxime Ripard, Chen-Yu Tsai, Andy Gross, Stefan Agner, Chunfeng Yun, Linus Walleij, Bartlomiej Zolnierkiewicz On Wed 11 Dec 06:52 PST 2019, Marek Szyprowski wrote: > Current USB3503 driver ignores GPIO polarity and always operates as if the > GPIO lines were flagged as ACTIVE_HIGH. Fix the polarity for the existing > USB3503 chip applications to match the chip specification and common > convention for naming the pins. The only pin, which has to be ACTIVE_LOW > is the reset pin. The remaining are ACTIVE_HIGH. This change allows later > to fix the USB3503 driver to properly use generic GPIO bindings and read > polarity from DT. > > Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Acked-by: Bjorn Andersson <bjorn.andersson@linaro.org> > --- > arch/arm/boot/dts/qcom-mdm9615-wp8548-mangoh-green.dts | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/arm/boot/dts/qcom-mdm9615-wp8548-mangoh-green.dts b/arch/arm/boot/dts/qcom-mdm9615-wp8548-mangoh-green.dts > index 26160c324802..942e3a2cac35 100644 > --- a/arch/arm/boot/dts/qcom-mdm9615-wp8548-mangoh-green.dts > +++ b/arch/arm/boot/dts/qcom-mdm9615-wp8548-mangoh-green.dts > @@ -143,7 +143,7 @@ > compatible = "smsc,usb3503a"; > reg = <0x8>; > connect-gpios = <&gpioext2 1 GPIO_ACTIVE_HIGH>; > - intn-gpios = <&gpioext2 0 GPIO_ACTIVE_LOW>; > + intn-gpios = <&gpioext2 0 GPIO_ACTIVE_HIGH>; > initial-mode = <1>; > }; > }; > -- > 2.17.1 > ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2019-12-18 5:42 UTC | newest] Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <CGME20191211144647eucas1p23d85dee21029f864076eece98aadd525@eucas1p2.samsung.com> 2019-12-11 14:46 ` [PATCH v2 0/4] USB3503: correct GPIOs polarity and update the driver Marek Szyprowski [not found] ` <CGME20191211144648eucas1p2065aac523ce190a5c0e6e2b5b11bd5ce@eucas1p2.samsung.com> 2019-12-11 14:46 ` [PATCH v2 1/4] ARM: dts: exynos: Correct USB3503 GPIOs polarity Marek Szyprowski 2019-12-12 20:21 ` Krzysztof Kozlowski [not found] ` <CGME20191211144649eucas1p1b882634306383e225dbab70629d2f222@eucas1p1.samsung.com> 2019-12-11 14:46 ` [PATCH v2 2/4] ARM: dts: qcom: " Marek Szyprowski [not found] ` <CGME20191211144649eucas1p2ec8ca5bec84c179a5cbf01a285e82837@eucas1p2.samsung.com> 2019-12-11 14:46 ` [PATCH v2 3/4] ARM: dts: sun8i: a83t: " Marek Szyprowski [not found] ` <CGME20191211144650eucas1p221857c5e96ee4b5730fad80e105933ac@eucas1p2.samsung.com> 2019-12-11 14:46 ` [PATCH v2 4/4] usb: usb3503: Convert to use GPIO descriptors Marek Szyprowski 2019-12-11 14:50 [PATCH v2 0/4 RESEND] USB3503: correct GPIOs polarity and update the driver Marek Szyprowski [not found] ` <CGME20191211145213eucas1p2c438f848ba705fa407331bb31b03b626@eucas1p2.samsung.com> 2019-12-11 14:52 ` [PATCH v2 2/4] ARM: dts: qcom: Correct USB3503 GPIOs polarity Marek Szyprowski 2019-12-18 5:42 ` Bjorn Andersson
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).