Loading Documentation/devicetree/bindings/usb/msm-ehci-hsic.txt +13 −7 Original line number Diff line number Diff line Loading @@ -135,14 +135,20 @@ SMSC HSIC HUB Required properties : - compatible : should be "qcom,hsic-smsc-hub" - smsc,model-id : should be either <3503> or <4604> depending on hub model - smsc,<gpio-name>-gpio : handle to the GPIO node, see "gpios property" in Documentation/devicetree/bindings/gpio/gpio.txt. Required "gpio-name" is "reset" and optionally - "refclk", "int". - <supply-name>-supply: handle to the regulator device tree node Required "supply-name" is "hub_init" and optionally - "hub_vbus". - smsc,reset-gpio: this output gpio is used to assert/de-assert the hub reset - Sub node for "MSM HSIC EHCI controller". Sub node has the required properties mentioned above. Optional properties : - smsc,int-gpio: this input gpio indicate HUB suspend status and signal remote wakeup interrupt - smsc,refclk-gpio: this gpio is used to supply the reference clock - hub-vbus-supply: this regulator is used to supply the power to downstream ports - hub-int-supply: this regulator is used to bias the interrupt gpio - ext-hub-vddio-supply: this regulator is used to supply the power to one of the hub's VDD. Example SMSC HSIC HUB : hsic_hub { compatible = "qcom,hsic-smsc-hub"; Loading @@ -151,8 +157,8 @@ Example SMSC HSIC HUB : smsc,reset-gpio = <&pm8941_gpios 8 0x00>; smsc,refclk-gpio = <&pm8941_gpios 16 0x00>; smsc,int-gpio = <&msmgpio 50 0x00>; hub_int-supply = <&pm8941_l10>; hub_vbus-supply = <&pm8941_mvs1>; hub-int-supply = <&pm8941_l10>; hub-vbus-supply = <&pm8941_mvs1>; hsic@f9a00000 { compatible = "qcom,hsic-host"; Loading arch/arm/boot/dts/qcom/apq8074-dragonboard.dtsi +2 −2 Original line number Diff line number Diff line /* Copyright (c) 2013, The Linux Foundation. All rights reserved. /* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -73,7 +73,7 @@ /* Dragonboard has an always-on VBUS supply for HSIC hub, * providing a dummy regulator for the hub driver */ hub_vbus-supply = <&vph_pwr_vreg>; hub-vbus-supply = <&vph_pwr_vreg>; hsic_host: hsic@f9a00000 { compatible = "qcom,hsic-host"; Loading drivers/misc/smsc_hub.c +16 −10 Original line number Diff line number Diff line /* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved. /* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -266,7 +266,7 @@ static int msm_hsic_hub_init_gpio(struct hsic_hub *hub, int init) } /* Enable LDO if required for external pull-up */ smsc_hub->int_pad_reg = devm_regulator_get(hub->dev, "hub_int"); smsc_hub->int_pad_reg = devm_regulator_get(hub->dev, "hub-int"); if (IS_ERR(smsc_hub->int_pad_reg)) { dev_dbg(hub->dev, "unable to get ext hub_int reg\n"); } else { Loading Loading @@ -298,6 +298,9 @@ static int msm_hsic_hub_init_vdd(struct hsic_hub *hub, int init) { int ret; if (!of_get_property(hub->dev->of_node, "ext-hub-vddio-supply", NULL)) return 0; if (!init) { if (!IS_ERR(smsc_hub->hsic_hub_reg)) { regulator_disable(smsc_hub->hsic_hub_reg); Loading @@ -308,7 +311,7 @@ static int msm_hsic_hub_init_vdd(struct hsic_hub *hub, int init) return 0; } smsc_hub->hsic_hub_reg = devm_regulator_get(hub->dev, "EXT_HUB_VDDIO"); smsc_hub->hsic_hub_reg = devm_regulator_get(hub->dev, "ext-hub-vddio"); if (IS_ERR(smsc_hub->hsic_hub_reg)) { dev_dbg(hub->dev, "unable to get ext hub vddcx\n"); } else { Loading Loading @@ -416,12 +419,15 @@ static int smsc_hub_probe(struct platform_device *pdev) smsc_hub->dev = &pdev->dev; smsc_hub->pdata = pdata; smsc_hub->hub_vbus_reg = devm_regulator_get(&pdev->dev, "hub_vbus"); if (of_get_property(pdev->dev.of_node, "hub-vbus-supply", NULL)) { smsc_hub->hub_vbus_reg = devm_regulator_get(&pdev->dev, "hub-vbus"); ret = PTR_ERR(smsc_hub->hub_vbus_reg); if (ret == -EPROBE_DEFER) { dev_dbg(&pdev->dev, "failed to get hub_vbus\n"); return ret; } } ret = msm_hsic_hub_init_vdd(smsc_hub, 1); if (ret) { Loading @@ -447,7 +453,7 @@ static int smsc_hub_probe(struct platform_device *pdev) udelay(5); gpio_direction_output(pdata->hub_reset, 1); if (!IS_ERR(smsc_hub->hub_vbus_reg)) { if (!IS_ERR_OR_NULL(smsc_hub->hub_vbus_reg)) { ret = regulator_enable(smsc_hub->hub_vbus_reg); if (ret) { dev_err(&pdev->dev, "unable to enable hub_vbus\n"); Loading Loading @@ -532,7 +538,7 @@ static int smsc_hub_remove(struct platform_device *pdev) } pm_runtime_disable(&pdev->dev); if (!IS_ERR(smsc_hub->hub_vbus_reg)) if (!IS_ERR_OR_NULL(smsc_hub->hub_vbus_reg)) regulator_disable(smsc_hub->hub_vbus_reg); msm_hsic_hub_init_gpio(smsc_hub, 0); msm_hsic_hub_init_clock(smsc_hub, 0); Loading Loading
Documentation/devicetree/bindings/usb/msm-ehci-hsic.txt +13 −7 Original line number Diff line number Diff line Loading @@ -135,14 +135,20 @@ SMSC HSIC HUB Required properties : - compatible : should be "qcom,hsic-smsc-hub" - smsc,model-id : should be either <3503> or <4604> depending on hub model - smsc,<gpio-name>-gpio : handle to the GPIO node, see "gpios property" in Documentation/devicetree/bindings/gpio/gpio.txt. Required "gpio-name" is "reset" and optionally - "refclk", "int". - <supply-name>-supply: handle to the regulator device tree node Required "supply-name" is "hub_init" and optionally - "hub_vbus". - smsc,reset-gpio: this output gpio is used to assert/de-assert the hub reset - Sub node for "MSM HSIC EHCI controller". Sub node has the required properties mentioned above. Optional properties : - smsc,int-gpio: this input gpio indicate HUB suspend status and signal remote wakeup interrupt - smsc,refclk-gpio: this gpio is used to supply the reference clock - hub-vbus-supply: this regulator is used to supply the power to downstream ports - hub-int-supply: this regulator is used to bias the interrupt gpio - ext-hub-vddio-supply: this regulator is used to supply the power to one of the hub's VDD. Example SMSC HSIC HUB : hsic_hub { compatible = "qcom,hsic-smsc-hub"; Loading @@ -151,8 +157,8 @@ Example SMSC HSIC HUB : smsc,reset-gpio = <&pm8941_gpios 8 0x00>; smsc,refclk-gpio = <&pm8941_gpios 16 0x00>; smsc,int-gpio = <&msmgpio 50 0x00>; hub_int-supply = <&pm8941_l10>; hub_vbus-supply = <&pm8941_mvs1>; hub-int-supply = <&pm8941_l10>; hub-vbus-supply = <&pm8941_mvs1>; hsic@f9a00000 { compatible = "qcom,hsic-host"; Loading
arch/arm/boot/dts/qcom/apq8074-dragonboard.dtsi +2 −2 Original line number Diff line number Diff line /* Copyright (c) 2013, The Linux Foundation. All rights reserved. /* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -73,7 +73,7 @@ /* Dragonboard has an always-on VBUS supply for HSIC hub, * providing a dummy regulator for the hub driver */ hub_vbus-supply = <&vph_pwr_vreg>; hub-vbus-supply = <&vph_pwr_vreg>; hsic_host: hsic@f9a00000 { compatible = "qcom,hsic-host"; Loading
drivers/misc/smsc_hub.c +16 −10 Original line number Diff line number Diff line /* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved. /* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -266,7 +266,7 @@ static int msm_hsic_hub_init_gpio(struct hsic_hub *hub, int init) } /* Enable LDO if required for external pull-up */ smsc_hub->int_pad_reg = devm_regulator_get(hub->dev, "hub_int"); smsc_hub->int_pad_reg = devm_regulator_get(hub->dev, "hub-int"); if (IS_ERR(smsc_hub->int_pad_reg)) { dev_dbg(hub->dev, "unable to get ext hub_int reg\n"); } else { Loading Loading @@ -298,6 +298,9 @@ static int msm_hsic_hub_init_vdd(struct hsic_hub *hub, int init) { int ret; if (!of_get_property(hub->dev->of_node, "ext-hub-vddio-supply", NULL)) return 0; if (!init) { if (!IS_ERR(smsc_hub->hsic_hub_reg)) { regulator_disable(smsc_hub->hsic_hub_reg); Loading @@ -308,7 +311,7 @@ static int msm_hsic_hub_init_vdd(struct hsic_hub *hub, int init) return 0; } smsc_hub->hsic_hub_reg = devm_regulator_get(hub->dev, "EXT_HUB_VDDIO"); smsc_hub->hsic_hub_reg = devm_regulator_get(hub->dev, "ext-hub-vddio"); if (IS_ERR(smsc_hub->hsic_hub_reg)) { dev_dbg(hub->dev, "unable to get ext hub vddcx\n"); } else { Loading Loading @@ -416,12 +419,15 @@ static int smsc_hub_probe(struct platform_device *pdev) smsc_hub->dev = &pdev->dev; smsc_hub->pdata = pdata; smsc_hub->hub_vbus_reg = devm_regulator_get(&pdev->dev, "hub_vbus"); if (of_get_property(pdev->dev.of_node, "hub-vbus-supply", NULL)) { smsc_hub->hub_vbus_reg = devm_regulator_get(&pdev->dev, "hub-vbus"); ret = PTR_ERR(smsc_hub->hub_vbus_reg); if (ret == -EPROBE_DEFER) { dev_dbg(&pdev->dev, "failed to get hub_vbus\n"); return ret; } } ret = msm_hsic_hub_init_vdd(smsc_hub, 1); if (ret) { Loading @@ -447,7 +453,7 @@ static int smsc_hub_probe(struct platform_device *pdev) udelay(5); gpio_direction_output(pdata->hub_reset, 1); if (!IS_ERR(smsc_hub->hub_vbus_reg)) { if (!IS_ERR_OR_NULL(smsc_hub->hub_vbus_reg)) { ret = regulator_enable(smsc_hub->hub_vbus_reg); if (ret) { dev_err(&pdev->dev, "unable to enable hub_vbus\n"); Loading Loading @@ -532,7 +538,7 @@ static int smsc_hub_remove(struct platform_device *pdev) } pm_runtime_disable(&pdev->dev); if (!IS_ERR(smsc_hub->hub_vbus_reg)) if (!IS_ERR_OR_NULL(smsc_hub->hub_vbus_reg)) regulator_disable(smsc_hub->hub_vbus_reg); msm_hsic_hub_init_gpio(smsc_hub, 0); msm_hsic_hub_init_clock(smsc_hub, 0); Loading