Age | Commit message (Collapse) | Author | Files | Lines |
|
Set the USBPCTRL0 register from the passed platform data in rcar_usb_phy_init();
don't reset it to 0 in rcar_usb_phy_shutdown() anymore as that does not make
sense. Also, don't allow the driver's probe to succeed when the platform data
are not supplied with a device.
The patch has been tested on the Marzen and BOCK-W boards.
Signed-off-by: Sergei Shtylyov <[email protected]>
Acked-by: Kuninori Morimoto <[email protected]>
Acked-by: Simon Horman <[email protected]>
Acked-by: Felipe Balbi <[email protected]>
Signed-off-by: Simon Horman <[email protected]>
|
|
The memory region that is used by the driver overlaps EHCI and OHCI register
regions for absolutely no reason now -- fix it by adding offset of 0x800 to
the base address, changing the register #define's accordingly. This has extra
positive effect that we now can use devm_ioremap_resource()...
Note that the driver and the SoC code have to be in one patch to keep the code
bisectable...
The patch has been tested on the Marzen board.
Signed-off-by: Sergei Shtylyov <[email protected]>
Acked-by: Kuninori Morimoto <[email protected]>
Acked-by: Felipe Balbi <[email protected]>
Signed-off-by: Simon Horman <[email protected]>
|
|
Now that the EHCI internal buffer setup is done by the platform code, we can
remove such code from this driver as it never really belonged here. We also
no longer need the 2nd memory region now (2nd EHCI controller is simply missing
in e.g. R8A7778 SoC).
The patch has been tested on the Marzen and BOCK-W boards.
Signed-off-by: Sergei Shtylyov <[email protected]>
Acked-by: Kuninori Morimoto <[email protected]>
Acked-by: Felipe Balbi <[email protected]>
Signed-off-by: Simon Horman <[email protected]>
|
|
Addition of the M and N recommended values for the USB3 PHY DPLL.
Sysclk for DRA7xx is 20MHz.
This yields:
Clk = 20MHz * M/(N+1) = 20MHz * 1000 /(7+1) = 2.5 Ghz
Signed-off-by: Ruchika Kharwar <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
|
|
Registered Tegra USB PHY as a separate platform driver.
To synchronize host controller and PHY initialization, used deferred
probe mechanism. As PHY should be initialized before EHCI starts running,
deferred probe of Tegra EHCI driver till PHY probe gets completed.
Got rid of instance number based handling in host driver.
Made use of DT params to get the PHY Pad registers.
Signed-off-by: Venu Byravarasu <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
|
|
Check return values from all GPIO APIs and handle errors accordingly.
Remove the call to clk_disable_unprepare(); this function does not
prepare or enable the clock, so the error path should not disable or
unprepare it.
Signed-off-by: Venu Byravarasu <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
|
|
As GPIO information is avail through DT, used it to get Tegra ULPI
reset GPIO number. Added a new member to tegra_usb_phy structure to
store this number.
Signed-off-by: Venu Byravarasu <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
|
|
Added a new PHY mode to support OTG.
Obtained Tegra USB PHY mode using DT property.
Signed-off-by: Venu Byravarasu <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
|
|
In case if clk_get_sys fails, return correct error value provided by
the API.
Signed-off-by: Venu Byravarasu <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
|
|
This patch adds to enable High Speed Inter Chip on Exynos4X12. Both channels
are controlled by usbphy driver based on the patch series of usbphy driver
submitted by Tomasz Figa.
[1] https://patchwork.kernel.org/patch/2576121
[2] https://patchwork.kernel.org/patch/2576131
[3] https://patchwork.kernel.org/patch/2576141
[4] https://patchwork.kernel.org/patch/2576151
[5] https://patchwork.kernel.org/patch/2576161
[6] https://patchwork.kernel.org/patch/2576171
Signed-off-by: Dongjin Kim <[email protected]>
Cc: Tomasz Figa <[email protected]>
Cc: Kyungmin Park <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
|
|
'nop_xceiv_dt_ids' is always compiled in. Hence use of
of_match_ptr is unnecessary.
Acked-by: Alan Stern <[email protected]>
Signed-off-by: Sachin Kamat <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
|
|
This patch adds driver data for Exynos 4x12 USB 2.0 PHY.
Signed-off-by: Tomasz Figa <[email protected]>
Signed-off-by: Kyungmin Park <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
|
|
To remove unnecessary if statements, this patch introduces phy_enable
and phy_disable callbacks in driver data structure that implement
SoC-specific PHY initialization and deinitialization.
Signed-off-by: Tomasz Figa <[email protected]>
Signed-off-by: Kyungmin Park <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
|
|
This patch extends driver data structure with set_isolation callback,
which allows to remove the need for checking for SoC type in a switch
statement.
Signed-off-by: Tomasz Figa <[email protected]>
Signed-off-by: Kyungmin Park <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
|
|
This patch cleans up handling of reference clock rate in Samsung USB PHY
drivers. It is mostly a cosmetic change but improves error handling in
case of failing to get reference clock or invalid clock rate.
Signed-off-by: Tomasz Figa <[email protected]>
Signed-off-by: Kyungmin Park <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
|
|
There is no need to use devm_clk_get to get a clock that is being put
at the end of the function.
This patch changes the code getting reference clock to use clk_get
instead of useless in this case devm_clk_get.
Signed-off-by: Tomasz Figa <[email protected]>
Signed-off-by: Kyungmin Park <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
|
|
Since phy-samsung-usb library can be used only by phy-samsung-usb2 and
phy-samsung-usb3 drivers, there is no need to give explicit control over
its Kconfig symbol.
This patch makes CONFIG_SAMSUNG_USBPHY symbol hidden and selected
implicitly by CONFIG_SAMSUNG_USB2PHY and CONFIG_SAMSUNG_USB3PHY.
Signed-off-by: Tomasz Figa <[email protected]>
Signed-off-by: Kyungmin Park <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
|
|
Add support for the ab9540 variant of the ab8500 family.
Acked-by: Linus Walleij <[email protected]>
Acked-by: Maxime Coquelin <[email protected]>
Cc: Avinash Kumar <[email protected]>
Cc: Thirupathi Chippakurthy <[email protected]>
Signed-off-by: Fabio Baltieri <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
|
|
Add support for the ab8540 variant of the ab8500 family.
Acked-by: Linus Walleij <[email protected]>
Acked-by: Maxime Coquelin <[email protected]>
Cc: Avinash Kumar <[email protected]>
Signed-off-by: Fabio Baltieri <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
|
|
Introduce a "flags" field in "struct ab8500_usb" to allow controlling
driver features and quirks depending on ab8500 chip variant and
revision.
Acked-by: Linus Walleij <[email protected]>
Acked-by: Maxime Coquelin <[email protected]>
Signed-off-by: Fabio Baltieri <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
|
|
Move each chip's PHY tuning value set code to a separate function to
improve code readability.
Acked-by: Linus Walleij <[email protected]>
Acked-by: Maxime Coquelin <[email protected]>
Signed-off-by: Fabio Baltieri <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
|
|
Add an initial platform_device_id table to the ab8500-usb driver to
allow probing additional variants of the ab8500 family chips.
Acked-by: Linus Walleij <[email protected]>
Acked-by: Maxime Coquelin <[email protected]>
Signed-off-by: Fabio Baltieri <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
|
|
The driver supports both ab8500 and ab8505, but the actual phy tuning
values logic sets ab8500 values:
if (!is_ab8500_2p0_or_earlier(ab->ab8500))
which is supposed to set values for ab8500, but incorrectly results true
for ab8505 too.
Fix this by adding an additional is_ab8500(ab->ab8500) check.
Acked-by: Linus Walleij <[email protected]>
Acked-by: Maxime Coquelin <[email protected]>
Signed-off-by: Fabio Baltieri <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
|
|
Add an ab8500_usb_restart_phy() function called during probe to ensure
that the AB8500 USB phy is initialized properly even when a cable is
connected at probe time.
Without this fix subsequent host reconnections are not detected
properly.
Acked-by: Linus Walleij <[email protected]>
Acked-by: Maxime Coquelin <[email protected]>
Signed-off-by: Sakethram Bommisetti <[email protected]>
Signed-off-by: Fabio Baltieri <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
|
|
Add common clock support code for the ab8500-usb phy driver.
Acked-by: Ulf Hansson <[email protected]>
Acked-by: Linus Walleij <[email protected]>
Acked-by: Maxime Coquelin <[email protected]>
Signed-off-by: Mian Yousaf Kaukab <[email protected]>
Signed-off-by: Fabio Baltieri <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
|
|
Various non functional coding style fixes on ux500_dma.c and
phy-ab8500-usb.c drivers.
Acked-by: Linus Walleij <[email protected]>
Acked-by: Maxime Coquelin <[email protected]>
Signed-off-by: Fabio Baltieri <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
|
|
devm_ioremap_resource does sanity checks on the given resource. No need to
duplicate this in the driver.
Signed-off-by: Wolfram Sang <[email protected]>
|
|
Commit 84ebc10294a3d7be4c66f51070b7aedbaa24de9b (USB: remove
CONFIG_USB_SUSPEND option) failed to remove all of the usages of
USB_SUSPEND throughout the kernel. This patch (as1677) removes the
remaining instances of that symbol.
Signed-off-by: Alan Stern <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
The mxs-phy is missing the phy.type property, why the usb_get_phy helper
function won't be able to find it. This patch adds this missing property.
Signed-off-by: Michael Grzeschik <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
|
|
The Kconfig symbol USB_OTG_UTILS was removed in the v3.10 merge window,
in commit fd89149875 ("usb: phy: remove CONFIG_USB_OTG_UTILS"). But that
symbol popped up again in a few places. Remove it there too.
Acked-by: Paul Zimmerman <[email protected]>
Signed-off-by: Paul Bolle <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
|
|
Upon initialisation (driver probe) a NULL pointer exception
is triggered. This is due to lack of initialisation of
device field in phy structure, which is used by phy
framework in usb_get_phy().
Fix it by initialising the device field.
Signed-off-by: Robert Jarzmik <[email protected]>
Signed-off-by: Kishon Vijay Abraham I <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
|
|
devm_ioremap_resource does sanity checks on the given resource. No need to
duplicate this in the driver.
Acked-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Wolfram Sang <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
|
|
Commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) removes the need to set driver data field to
NULL.
Signed-off-by: Sachin Kamat <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
|
|
Commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) removes the need to set driver data field to
NULL.
Signed-off-by: Sachin Kamat <[email protected]>
Cc: Marek Vasut <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
|
|
Commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) removes the need to set driver data field to
NULL.
Signed-off-by: Sachin Kamat <[email protected]>
Cc: Chao Xie <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
|
|
Commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) removes the need to set driver data field to
NULL.
Signed-off-by: Sachin Kamat <[email protected]>
Cc: Philipp Zabel <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
|
|
Commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) removes the need to set driver data field to
NULL.
Signed-off-by: Sachin Kamat <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
|
|
Pull removal of GENERIC_GPIO from Grant Likely:
"GENERIC_GPIO now synonymous with GPIOLIB. There are no longer any
valid cases for enableing GENERIC_GPIO without GPIOLIB, even though it
is possible to do so which has been causing confusion and breakage.
This branch does the work to completely eliminate GENERIC_GPIO."
* tag 'gpio-for-linus' of git://git.secretlab.ca/git/linux:
gpio: update gpio Chinese documentation
Remove GENERIC_GPIO config option
Convert selectors of GENERIC_GPIO to GPIOLIB
blackfin: force use of gpiolib
m68k: coldfire: use gpiolib
mips: pnx833x: remove requirement for GENERIC_GPIO
openrisc: default GENERIC_GPIO to false
avr32: default GENERIC_GPIO to false
xtensa: remove explicit selection of GENERIC_GPIO
sh: replace CONFIG_GENERIC_GPIO by CONFIG_GPIOLIB
powerpc: remove redundant GENERIC_GPIO selection
unicore32: default GENERIC_GPIO to false
unicore32: remove unneeded select GENERIC_GPIO
arm: plat-orion: use GPIO driver on CONFIG_GPIOLIB
arm: remove redundant GENERIC_GPIO selection
mips: alchemy: require gpiolib
mips: txx9: change GENERIC_GPIO to GPIOLIB
mips: loongson: use GPIO driver on CONFIG_GPIOLIB
mips: remove redundant GENERIC_GPIO select
|
|
The Kconfig entry for USB_OMAP unconditionally selects USB_ISP1301,
which is now only visible when USB_PHY is also enabled.
This adds an appropriate dependency and enables USB_PHY in the omap1
defconfig, avoiding these build warnings:
warning: (USB_OHCI_HCD && USB_OMAP) selects ISP1301_OMAP which has unmet direct dependencies (USB_SUPPORT && USB_PHY && I2C && ARCH_OMAP_OTG)
Also fix a Makefile typo while we're at it.
Signed-off-by: Arnd Bergmann <[email protected]>
Cc: Felipe Balbi <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Both phy-tegra-usb.c and ehci-tegra.c export symbols used by the other one,
which does not work if one of them or both are loadable modules, resulting
in an error like:
drivers/built-in.o: In function `utmi_phy_clk_disable':
drivers/usb/phy/phy-tegra-usb.c:302: undefined reference to `tegra_ehci_set_phcd'
drivers/built-in.o: In function `utmi_phy_clk_enable':
drivers/usb/phy/phy-tegra-usb.c:324: undefined reference to `tegra_ehci_set_phcd'
drivers/built-in.o: In function `utmi_phy_power_on':
drivers/usb/phy/phy-tegra-usb.c:447: undefined reference to `tegra_ehci_set_pts'
This turns the interface into a one-way dependency by letting the tegra ehci
driver pass two function pointers for callbacks that need to be called by
the phy driver.
Signed-off-by: Arnd Bergmann <[email protected]>
Cc: Venu Byravarasu <[email protected]>
Cc: Alan Stern <[email protected]>
Cc: Felipe Balbi <[email protected]>
Cc: Stephen Warren <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
A lot of platform code calls into the usb phy core at the moment, which
does not work if it is built as a loadable module. This will hopefully
change when those platforms are all converted to DT based probing,
but for now, the easiest solution is to change it from "tristate"
to "bool".
This solves at least these ARM allmodconfig build errors:
arch/arm/mach-imx/built-in.o: In function `imx_otg_ulpi_create':
arch/arm/mach-imx/ulpi.c:117: undefined reference to `otg_ulpi_create'
arch/arm/mach-omap2/built-in.o: In function `usbhs_init_phys':
arch/arm/mach-omap2/usb-host.c:652: undefined reference to `usb_bind_phy'
arch/arm/mach-omap2/built-in.o: In function `omap_2430sdp_init':
arch/arm/mach-omap2/board-2430sdp.c:236: undefined reference to `usb_bind_phy'
arch/arm/mach-omap2/built-in.o: In function `omap3_beagle_init':
arch/arm/mach-omap2/board-omap3beagle.c:554: undefined reference to `usb_bind_phy'
arch/arm/mach-omap2/built-in.o: In function `devkit8000_init':
arch/arm/mach-omap2/board-devkit8000.c:596: undefined reference to `usb_bind_phy'
arch/arm/mach-omap2/built-in.o: In function `omap_ldp_init':
arch/arm/mach-omap2/board-ldp.c:379: undefined reference to `usb_bind_phy'
drivers/built-in.o: In function `ab8500_charger_probe':
drivers/power/ab8500_charger.c:3629: undefined reference to `usb_get_phy'
drivers/power/ab8500_charger.c:3706: undefined reference to `usb_put_phy'
drivers/built-in.o: In function `ab8500_charger_remove':
drivers/power/ab8500_charger.c:3411: undefined reference to `usb_put_phy'
Signed-off-by: Arnd Bergmann <[email protected]>
Acked-by: Felipe Balbi <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next
Felipe writes:
usb: urgent fixes for v3.10 merge window
Here are some late urgent fixes for v3.10 merge window.
All of these errors were introduced by recent commits
which are in linux-next.
f_obex, multi and cdc2 gadget drivers have learned to
return a proper error code when something goes wrong.
usb_bind_phy() was mistakenly placed into .init.text
section which caused Section mismatch warnings and undefined
reference compile errors.
f_source_sink had a copy-paste error which is now corrected.
g_zero got a memory leak plugged.
Two defconfigs got fixed to enable the newly introduced
CONFIG_USB_PHY.
|
|
The symbol usb_bind_phy is exported and annotated __init.
It looks like section mismatch. Fix by removing the
__init annotation of usb_bind_phy.
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Denis Efremov <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next
Felipe writes:
usb: patches for v3.10 merge window
Here is the big Gadget & PHY pull request. Many of us have
been really busy lately getting multiple drivers to a better
position.
Since this pull request is so large, I will divide it in sections
so it's easier to grasp what's included.
- cleanups:
. UDC drivers no longer touch gadget->dev, that's now udc-core
responsibility
. Many more UDC drivers converted to usb_gadget_map/unmap_request()
. UDC drivers no longer initialize DMA-related fields from gadget's
device structure
. UDC drivers don't touch gadget.dev.driver directly
. UDC drivers don't assign gadget.dev.release directly
. Removal of some unused DMA_ADDR_INVALID
. Introduction of CONFIG_USB_PHY
. All phy drivers have been moved to drivers/usb/phy and renamed to
a common naming scheme
. Fix PHY layer so it never returns a NULL pointer, also fix all
callers to avoid using IS_ERR_OR_NULL()
. Sparse fixes all over the place
. drivers/usb/otg/ has been deleted
. Marvel drivers (mv_udc, ehci-mv, mv_otg and mv_u3d) improved clock
usage
- new features:
. UDC core now provides a generic way for tracking and reporting
UDC's state (not attached, resuming, suspended, addressed,
default, etc)
. twl4030-usb learned that it shouldn't be enabled during init
. Full DT support for DWC3 has been implemented
. ab8500-usb learned about pinctrl framework
. nop PHY learned about DeviceTree and regulators
. DWC3 learned about suspend/resume
. DWC3 can now be compiled in host-only and gadget-only (as well as
DRD) configurations
. UVC now enables streaming endpoint based on negotiated speed
. isp1301 now implements the PHY API properly
. configfs-based interface for gadget drivers which will lead to
the removal of all code which just combines functions together
to build functional gadget drivers.
. f_serial and f_obex were converted to new configfs interface while
maintaining old interface around.
- non-critical fixes:
. UVC gadget driver got fixes for Endpoint usage and stream calculation
. ab8500-usb fixed unbalanced clock and regulator API usage
. twl4030-usb got a fix for when OMAP3 is booted with cable connected
. fusb300_udc got a fix for DMA usage
. UVC got fixes for two assertions of the USB Video Class Compliance
specification revision 1.1
. build warning issues caused by recent addition of __must_check to
regulator API
These are all changes which deserve a mention, all other changes are related
to these one or minor spelling fixes and other similar tasks.
Signed-of-by: Felipe Balbi <[email protected]>
|
|
Since regulator_enable() is going to be marked as __must_check in the
next merge window, always check regulator_enable() return value and
print a warning if it fails.
Cc: Hema HK <[email protected]>
Signed-off-by: Fabio Baltieri <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
|
|
Since regulator_enable() is going to be marked as __must_check in the
next merge window, always check regulator_enable() return value and
print a warning if it fails.
Reviewed-by: Kalle Jokiniemi <[email protected]>
Signed-off-by: Fabio Baltieri <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
|
|
Since regulator_enable() is going to be marked as __must_check in the
next merge window, always check regulator_enable() return value and
print a warning if it fails.
Cc: Linus Walleij <[email protected]>
Signed-off-by: Fabio Baltieri <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
|
|
Modify ab8500_usb_set_peripheral() and ab8500_usb_set_host() code to
schedule phy_dis_work only when necessary in order to prevent regulator
count mismatch during reboot/shutdown.
Signed-off-by: Sakethram Bommisetti <[email protected]>
Acked-by: Linus Walleij <[email protected]>
Signed-off-by: Fabio Baltieri <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
|
|
ab8500_usb_delayed_work was implemented as a workaroud for the internal
only and now unsupported v1.0 version of AB850. This patch removes the
delayed work and just leave a link status update call at probe time.
Signed-off-by: Sakethram Bommisetti <[email protected]>
Acked-by: Linus Walleij <[email protected]>
Signed-off-by: Fabio Baltieri <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
|
|
Amend the ab8500-usb driver to optionally take a pin control handle and
set the state of the pins to "default" on ab8500_usb_phy_enable and to
"sleep" on ab8500_usb_phy_disable.
The pinctrl handle is released on ab8500_usb_phy_disable because USB
pins are shared with ab8505_micro_usb_iddet driver.
Signed-off-by: Patrice Chotard <[email protected]>
Acked-by: Linus Walleij <[email protected]>
Signed-off-by: Fabio Baltieri <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
|