Age | Commit message (Collapse) | Author | Files | Lines |
|
This patch adds support to set the power line polarity for i.MX SoCs.
To let the USB controller control the power it may be necessary to
configure the polarity of the power line. So far the polarity was
configured by Bootloader or alternatively the power line was muxed
as gpio and driven by a regulator.
Also make use of of_property_read_bool.
Signed-off-by: Philipp Puschmann <[email protected]>
Signed-off-by: Peter Chen <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Those 2 headers files are not required now.
Signed-off-by: Jun Li <[email protected]>
Signed-off-by: Peter Chen <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
During the static checker, "data->usbmisc_data" may be NULL.
Fix it by adding this pointer judgement before using.
Reported-by: Dan Carpenter <[email protected]>
Signed-off-by: Peter Chen <[email protected]>
Cc: stable <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
The polarity of the over current detection pin isn't configured on i.MX6/7
if it's unspecified in the device tree. So the actual configuration depends
on bootloader behavior which is bad.
So encourage users to fix their device tree by issuing a warning in this
case.
Signed-off-by: Uwe Kleine-König <[email protected]>
Signed-off-by: Peter Chen <[email protected]>
|
|
The status quo on i.MX6 is that if "over-current-active-high" is
specified in the device tree this is configured as expected. If
the property is missing polarity isn't changed and so the
polarity is kept as setup by the bootloader. Reset default is
active high, so active low can only be used with help by the
bootloader. On i.MX7 it is similar, but there disabling of
over current detection has a similar inconsistency.
This patch introduces a new property that allows to explicitly
configure for active low over current detection and consistently
sets this up. In the absence of an explicit configuration the
bit is kept as is. On i.MX7 over current detection is used unless
disabled in the device tree.
Signed-off-by: Uwe Kleine-König <[email protected]>
Signed-off-by: Peter Chen <[email protected]>
|
|
To support imx HSIC, there are some special requirement:
- The HSIC pad is 1.2v, it may need to supply from external
- The data/strobe pin needs to be pulled down first, and after
host mode is initialized, the strobe pin needs to be pulled up
- During the USB suspend/resume, special setting is needed
Reviewed-by: Frieder Schrempf <[email protected]>
Tested-by: Frieder Schrempf <[email protected]>
Signed-off-by: Peter Chen <[email protected]>
|
|
The SPDX-License-Identifier is set to GPL-2.0+, which correspond to
MODULE_LICENSE "GPL".
Signed-off-by: Marcus Folkesson <[email protected]>
Signed-off-by: Peter Chen <[email protected]>
|
|
Use preprocessor conditionals for CONFIG_PM and CONFIG_PM_SLEEP is
not necessary since SET_SYSTEM_SLEEP_PM_OPS and SET_RUNTIME_PM_OPS does
that internally.
It is also the preferred way according to our coding style guidelines.
Signed-off-by: Marcus Folkesson <[email protected]>
Signed-off-by: Peter Chen <[email protected]>
|
|
Workaround introduced for i.MX53 in be9cae2479f48 ("usb: chipidea:
imx: Fix ULPI on imx53") seems to be applicable in case of i.MX51 as
well. Running latest kernel on ZII RDU1 Board (imx51-zii-rdu1.dts)
exhibits a kernel frozen on PORTSC access and applying the workaround
resolves the issue.
Fixes: be9cae2479f4 ("usb: chipidea: imx: Fix ULPI on imx53")
Cc: Peter Chen <[email protected]>
Cc: Lucas Stach <[email protected]>
Cc: Chris Healy <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Reviewed-by: Fabio Estevam <[email protected]>
Signed-off-by: Andrey Smirnov <[email protected]>
Tested-By: Nikita Yushchenko <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Traditionally, PORTSC should be set before initializing ULPI phys. But
setting PORTSC before powering on the phy results in a kernel freeze
on imx53 based GE PPD. As a workaround this initializes the phy early
in the imx platform code and disables phy power management from the
core.
Signed-off-by: Fabien Lahoudere <[email protected]>
Signed-off-by: Sebastian Reichel <[email protected]>
Signed-off-by: Peter Chen <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Some trivial cleanups, that do not change functionality.
Signed-off-by: Sebastian Reichel <[email protected]>
Signed-off-by: Peter Chen <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Now that the SPDX tag is in all USB files, that identifies the license
in a specific and legally-defined manner. So the extra GPL text wording
can be removed as it is no longer needed at all.
This is done on a quest to remove the 700+ different ways that files in
the kernel describe the GPL license text. And there's unneeded stuff
like the address (sometimes incorrect) for the FSF which is never
needed.
No copyright headers or other non-license-description text was removed.
Cc: Thierry Reding <[email protected]>
Cc: Jonathan Hunter <[email protected]>
Acked-by: Peter Chen <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
It's good to have SPDX identifiers in all files to make it easier to
audit the kernel tree for correct licenses.
Update the drivers/usb/ and include/linux/usb* files with the correct
SPDX license identifier based on the license text in the file itself.
The SPDX identifier is a legally binding shorthand, which can be used
instead of the full boiler plate text.
This work is based on a script and data from Thomas Gleixner, Philippe
Ombredanne, and Kate Stewart.
Cc: Thomas Gleixner <[email protected]>
Cc: Kate Stewart <[email protected]>
Cc: Philippe Ombredanne <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Acked-by: Felipe Balbi <[email protected]>
Acked-by: Johan Hovold <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
In order to use ULPI phy with usb host 2 and 3, we need to configure
controller register to enable ULPI features.
Each USB controller have different behaviour, so in order to avoid to have
several "swicth(data->index)" and lock/unlock, we prefer to get the index
switch and then test for features if they exist for this index.
This patch also remove useless test of reg and val. Those two values cannot
be NULL.
Signed-off-by: Fabien Lahoudere <[email protected]>
Signed-off-by: Peter Chen <[email protected]>
|
|
imx usb over current polarity is low active by default, with
over-current-active-high property added, user can config it to be high
active. Meanwhile keep this setting unchanged for existing platforms
so new platform must set the right value for active low by its usbmisc
init function if over current is enabled.
Signed-off-by: Li Jun <[email protected]>
Signed-off-by: Peter Chen <[email protected]>
|
|
For each platform devices which is created by device tree, the default
DMA mask is set by of_dma_configure when the device are created. So
delete the redundant code at driver.
Signed-off-by: Peter Chen <[email protected]>
|
|
Avoid printing an error if adding the device failes with return
value EPROBE_DEFFER. This may happen e.g. due to missing GPIO for
the vbus-supply regulator.
Signed-off-by: Stefan Agner <[email protected]>
Signed-off-by: Peter Chen <[email protected]>
|
|
This reverts commit e765bfb73ff7.
In the most of cases, we only use one transaction per frame and the
frame rate may be high, If the platforms want to support multiple
transactions but less frame rate cases like [1] and [2], it can set
"non-zero-ttctrl-ttha" at dts.
[1] http://www.spinics.net/lists/linux-usb/msg123125.html
[2] http://www.spinics.net/lists/linux-usb/msg118679.html
Signed-off-by: Peter Chen <[email protected]>
|
|
Until now the imx23 uses the imx27 platform flag. But the
imx23 needs the flag CI_HDRC_TURN_VBUS_EARLY_ON, too. So
fix this by adding a separate platform flag.
Suggested-by: Peter Chen <[email protected]>
Signed-off-by: Stefan Wahren <[email protected]>
Signed-off-by: Peter Chen <[email protected]>
|
|
disable wakeup irq during shutdown, otherwise kexec fails for
kernels that setup irq handlers before resetting the hardware
Signed-off-by: Andreas Fenkart <[email protected]>
Signed-off-by: Peter Chen <[email protected]>
|
|
of_match_device could return NULL, and so cause a NULL pointer
dereference later.
Reported-by: coverity (CID 1324138)
Signed-off-by: LABBE Corentin <[email protected]>
Signed-off-by: Peter Chen <[email protected]>
|
|
Some i.mx platforms need three clocks to let controller work, but
others only need one, refine clock operation to adapt for all
platforms, it fixes a regression found at i.mx27.
Signed-off-by: Peter Chen <[email protected]>
Tested-by: Fabio Estevam <[email protected]>
Cc: <[email protected]> #v4.1+
|
|
Add imx6ul usb support.
Signed-off-by: Peter chen <[email protected]>
Signed-off-by: Li Jun <[email protected]>
Signed-off-by: Peter Chen <[email protected]>
|
|
Add imx7d usb support.
Signed-off-by: Peter Chen <[email protected]>
Signed-off-by: Li Jun <[email protected]>
|
|
Use imx6sx instead of imx6sl's platform flags for imx6sx.
Fixes: e14db48dfcf3 ("usb: chipidea: imx: add runtime power management support")
Cc: <[email protected]> # v4.1+
Signed-off-by: Li Jun <[email protected]>
Signed-off-by: Peter Chen <[email protected]>
|
|
Stream mode enable is known for better performance, this stream mode
enable patch has been passed with stress tests at device mode for
imx6sl and imx6sx, and no issue is found.
Signed-off-by: Peter Chen <[email protected]>
|
|
If usbmisc hasn't probed yet, defer the probe.
It's not enough to check if the platform device for the OF node of the
usbmisc has been registered, but it also needs to have been probed
already before we can call imx_usbmisc_init().
This can happen if the order in which devices are probed change due to
async probing or on-demand probing of dependencies.
Signed-off-by: Tomeu Vizoso <[email protected]>
|
|
For i.mx platform, set ttctrl.ttha with non-zero value only affects
sitd, and ehci core makes sure the schedule is not full when accepts
new request, so it will not occur the transaction which will acorss
the SoF.
Signed-off-by: Peter Chen <[email protected]>
|
|
Some usb PHYs need power supply from vbus to make it work, eg mxs-phy, if
there is no vbus, USB PHY will not in correct state when the controller starts
to work, for host, this requires vbus should be turned on before setting port
power(PP) of ehci, to work with this kind of USB PHY design, this patch adds
a flag CI_HDRC_TURN_VBUS_EARLY_ON, can be checked by host driver to turn on
vbus while start host.
Signed-off-by: Li Jun <[email protected]>
Signed-off-by: Peter Chen <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Enable USB as system wakeup source, and each platform needs to implement
imx_usbmisc_set_wakeup in usbmisc_imx.c to support.
Signed-off-by: Peter Chen <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Add runtime pm support for imx, only imx6 series are supported and tested.
Signed-off-by: Peter Chen <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Move struct imx_usbmisc_data NULL pointer judgement from caller to
each API, it can simplify the caller.
Signed-off-by: Peter Chen <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
It is meaningless the glue layer driver has its own platform flag
which is the same meaning with common platform flag.
Signed-off-by: Peter Chen <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
Pull driver core update from Greg KH:
"Here's the set of driver core patches for 3.19-rc1.
They are dominated by the removal of the .owner field in platform
drivers. They touch a lot of files, but they are "simple" changes,
just removing a line in a structure.
Other than that, a few minor driver core and debugfs changes. There
are some ath9k patches coming in through this tree that have been
acked by the wireless maintainers as they relied on the debugfs
changes.
Everything has been in linux-next for a while"
* tag 'driver-core-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (324 commits)
Revert "ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries"
fs: debugfs: add forward declaration for struct device type
firmware class: Deletion of an unnecessary check before the function call "vunmap"
firmware loader: fix hung task warning dump
devcoredump: provide a one-way disable function
device: Add dev_<level>_once variants
ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries
ath: use seq_file api for ath9k debugfs files
debugfs: add helper function to create device related seq_file
drivers/base: cacheinfo: remove noisy error boot message
Revert "core: platform: add warning if driver has no owner"
drivers: base: support cpu cache information interface to userspace via sysfs
drivers: base: add cpu_device_create to support per-cpu devices
topology: replace custom attribute macros with standard DEVICE_ATTR*
cpumask: factor out show_cpumap into separate helper function
driver core: Fix unbalanced device reference in drivers_probe
driver core: fix race with userland in device_add()
sysfs/kernfs: make read requests on pre-alloc files use the buffer.
sysfs/kernfs: allow attributes to request write buffer be pre-allocated.
fs: sysfs: return EGBIG on write if offset is larger than file size
...
|
|
Now, USB PHY is mandatory for chipidea core, the flag
CI_HDRC_REQUIRE_TRANSCEIVER is useless.
Signed-off-by: Peter Chen <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Add basic system power management support
Signed-off-by: Peter Chen <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
MM core code already complains when devm_kzalloc() fails, so no need to print
the error locally.
Signed-off-by: Fabio Estevam <[email protected]>
Signed-off-by: Peter Chen <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This patch modify the generic code handling PHYs to allow them to be
supplied from the drivers. This adds checks to ensure no PHY was already
there when looking for one in the generic code. This also makes sure we
do not modify its state in the generic HCD functions, it was provided by
the driver.
Signed-off-by: Antoine Tenart <[email protected]>
Acked-by: Alan Stern <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
|
|
A platform_driver does not need to set an owner, it will be populated by the
driver core.
Signed-off-by: Wolfram Sang <[email protected]>
|
|
This adds Vybrid VF610 SoC support. The IP is very similar to i.MX6,
however, the non-core registers are spread in two different register
areas. Hence we support multiple instances of the USB misc driver
and add the driver instance to the imx_usbmisc_data structure.
Signed-off-by: Peter Chen <[email protected]>
Signed-off-by: Stefan Agner <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
-ENODEV is interpreted by the generic driver probing function as a
non-matching driver. This leads to a missing probe failure message.
Also a missing USB PHY is more of an invalid configuration of the usb
driver because it is necessary.
This patch returns -EINVAL if devm_usb_get_phy_by_phandle() returned -ENODEV.
Signed-off-by: Markus Pargmann <[email protected]>
Signed-off-by: Peter Chen <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Use dev_name() for ci_hdrc name to distinguish USBs
Signed-off-by: Peter Chen <[email protected]>
Signed-off-by: Alexander Shiyan <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Due to imx28 needs ARM swp instruction for writing, we set
CI_HDRC_IMX28_WRITE_FIX for imx28.
This patch is needed for stable tree 3.11+
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Peter Chen <[email protected]>
Signed-off-by: Marc Kleine-Budde <[email protected]>
Tested-by: Marc Kleine-Budde <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This reverts commit 30666249eae3b04875d514dea557d1ab1468c006, as it
depended on a previous patch that I rejected, causing a build error
here. Sorry about that.
Reported-by: kbuild test robot <[email protected]>
Cc: Peter Chen <[email protected]>
Cc: Marc Kleine-Budde <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Due to imx28 needs ARM swp instruction for writing, we set
CI_HDRC_IMX28_WRITE_FIX for imx28.
Signed-off-by: Peter Chen <[email protected]>
Signed-off-by: Marc Kleine-Budde <[email protected]>
Tested-by: Marc Kleine-Budde <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Pull DMA mask updates from Russell King:
"This series cleans up the handling of DMA masks in a lot of drivers,
fixing some bugs as we go.
Some of the more serious errors include:
- drivers which only set their coherent DMA mask if the attempt to
set the streaming mask fails.
- drivers which test for a NULL dma mask pointer, and then set the
dma mask pointer to a location in their module .data section -
which will cause problems if the module is reloaded.
To counter these, I have introduced two helper functions:
- dma_set_mask_and_coherent() takes care of setting both the
streaming and coherent masks at the same time, with the correct
error handling as specified by the API.
- dma_coerce_mask_and_coherent() which resolves the problem of
drivers forcefully setting DMA masks. This is more a marker for
future work to further clean these locations up - the code which
creates the devices really should be initialising these, but to fix
that in one go along with this change could potentially be very
disruptive.
The last thing this series does is prise away some of Linux's addition
to "DMA addresses are physical addresses and RAM always starts at
zero". We have ARM LPAE systems where all system memory is above 4GB
physical, hence having DMA masks interpreted by (eg) the block layers
as describing physical addresses in the range 0..DMAMASK fails on
these platforms. Santosh Shilimkar addresses this in this series; the
patches were copied to the appropriate people multiple times but were
ignored.
Fixing this also gets rid of some ARM weirdness in the setup of the
max*pfn variables, and brings ARM into line with every other Linux
architecture as far as those go"
* 'for-linus-dma-masks' of git://git.linaro.org/people/rmk/linux-arm: (52 commits)
ARM: 7805/1: mm: change max*pfn to include the physical offset of memory
ARM: 7797/1: mmc: Use dma_max_pfn(dev) helper for bounce_limit calculations
ARM: 7796/1: scsi: Use dma_max_pfn(dev) helper for bounce_limit calculations
ARM: 7795/1: mm: dma-mapping: Add dma_max_pfn(dev) helper function
ARM: 7794/1: block: Rename parameter dma_mask to max_addr for blk_queue_bounce_limit()
ARM: DMA-API: better handing of DMA masks for coherent allocations
ARM: 7857/1: dma: imx-sdma: setup dma mask
DMA-API: firmware/google/gsmi.c: avoid direct access to DMA masks
DMA-API: dcdbas: update DMA mask handing
DMA-API: dma: edma.c: no need to explicitly initialize DMA masks
DMA-API: usb: musb: use platform_device_register_full() to avoid directly messing with dma masks
DMA-API: crypto: remove last references to 'static struct device *dev'
DMA-API: crypto: fix ixp4xx crypto platform device support
DMA-API: others: use dma_set_coherent_mask()
DMA-API: staging: use dma_set_coherent_mask()
DMA-API: usb: use new dma_coerce_mask_and_coherent()
DMA-API: usb: use dma_set_coherent_mask()
DMA-API: parport: parport_pc.c: use dma_coerce_mask_and_coherent()
DMA-API: net: octeon: use dma_coerce_mask_and_coherent()
DMA-API: net: nxp/lpc_eth: use dma_coerce_mask_and_coherent()
...
|
|
Acked-by: Felipe Balbi <[email protected]>
Acked-by: Nicolas Ferre <[email protected]>
Signed-off-by: Russell King <[email protected]>
|
|
The correct way for a driver to specify the coherent DMA mask is
not to directly access the field in the struct device, but to use
dma_set_coherent_mask(). Only arch and bus code should access this
member directly.
Convert all direct write accesses to using the correct API.
Acked-by: Felipe Balbi <[email protected]>
Acked-by: Nicolas Ferre <[email protected]>
Signed-off-by: Russell King <[email protected]>
|
|
Since the PHY operations are moved to core, delete the related
code at glue layer.
Signed-off-by: Peter Chen <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
If not, the PHY will be active even the controller is not in use.
We find this issue due to the PHY's clock refcount is not correct
due to -EPROBE_DEFER return after phy's init.
Signed-off-by: Peter Chen <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|