aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/chipidea/bits.h
AgeCommit message (Collapse)AuthorFilesLines
2020-03-16USB: chipidea: Use the correct style for SPDX License IdentifierNishad Kamdar1-1/+1
This patch corrects the SPDX License Identifier style in header files related to ChipIdea Highspeed Dual Role Controller. For C header files Documentation/process/license-rules.rst mandates C-like comments (opposed to C source files where C++ style should be used). Changes made by using a script provided by Joe Perches here: https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flkml.org%2Flkml%2F2019%2F2%2F7%2F46&amp;data=02%7C01%7CPeter.Chen%40nxp.com%7Cbea69ff84b574ca6b48e08d7c8cf58cf%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C637198665199494622&amp;sdata=bk1n4%2BvnrfRS6ZDrps%2BuXiImdzaxKZ00YskBg6pjtn4%3D&amp;reserved=0. Suggested-by: Joe Perches <[email protected]> Signed-off-by: Nishad Kamdar <[email protected]> Signed-off-by: Peter Chen <[email protected]>
2017-11-07USB: chipidea: Remove redundant license textGreg Kroah-Hartman1-4/+0
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]>
2017-11-04USB: add SPDX identifiers to all remaining files in drivers/usb/Greg Kroah-Hartman1-0/+1
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]>
2015-08-14usb: chipidea: add tx/rx burst size configuration interfacePeter Chen1-0/+4
The user can adjust it through dts or platform data Signed-off-by: Peter Chen <[email protected]>
2015-08-14usb: chipidea: add ahb burst configuration interfacePeter Chen1-0/+3
The users can change it through dts or platform data if they want to change the default value. Signed-off-by: Peter Chen <[email protected]>
2015-08-14usb: chipidea: add ttctrl.ttha control interfacePeter Chen1-0/+5
The register of ttctrl.ttha describes like below: - Internal TT Hub Address Representation - RW - Default = 0000000b This field is used to match against the Hub Address field in QH & siTD to determine if the packet is routed to the internal TT for directly attached FS/LS devices. If the Hub Address in the QH or siTD does not match this address then the packet will be broadcast on the High Speed ports destined for a downstream High Speed hub with the address in the QH/siTD. In silicon RTL, this entry only affects QH and siTD, and the hub.addr at both QH and siTD are 0 in ehci core for chipidea (with hcd->has_tt = 1). So, for QH, if the "usage_tt" flag at RTL is 0, set CI_HDRC_SET_NON_ZERO_TTHA will not affect QH (with non-hs device); for siTD, set this flag will change remaining space requirement for the last transaction from 1023 bytes to 188 bytes, it can increase the number of transactions within one frame, ehci periodic schedule code will not queue the packet if the frame space is full, so it is safe to set this flag for siTD. With this flag, it can fix the problem Alan Stern reported below: http://www.spinics.net/lists/linux-usb/msg123125.html And may fix Michael Tessier's problem too. http://www.spinics.net/lists/linux-usb/msg118679.html CC: [email protected] CC: [email protected] Signed-off-by: Peter Chen <[email protected]>
2015-03-18usb: chipidea: support runtime power management for otg fsm modeLi Jun1-0/+1
This patch adds runtime power management support for otg fsm mode, since A-device in a_idle state cannot detect data pulse irq after suspended, here enable wakeup by connection before suspend to make it can be resumed by DP; and handle wakeup from that state like SRP. Signed-off-by: Li Jun <[email protected]> Signed-off-by: Peter Chen <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-03-18usb: chipidea: add chipidea revision informationPeter Chen1-0/+10
Define ci_get_revision API to know the controller revision information according to chipidea 1.1a, 2.0a and 2.5a spec. Besides, add one entry at struct ci_hdrc to indicate revision information, it can be used for adding different code for revisions, eg kinds of errata. Reviewed-by: Stefan Agner <[email protected]> Signed-off-by: Peter Chen <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-04-24usb: chipidea: OTG fsm timers initializationLi Jun1-0/+1
This patch adds OTG fsm timers initialization, which use controller's 1ms interrupt as timeout counter, also adds some local timers which are not in otg_fsm_timer list. Signed-off-by: Peter Chen <[email protected]> Signed-off-by: Li Jun <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-04-24usb: chipidea: add OTG fsm operation functions implementationLi Jun1-0/+9
Add OTG HNP and SRP operation functions implementation: - charge vbus - drive vbus - connection signaling - drive sof - start data pulse - add fsm timer - delete fsm timer - start host - start gadget Signed-off-by: Peter Chen <[email protected]> Signed-off-by: Li Jun <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-02-24usb: chipidea: udc: add maximum-speed = full-speed optionMichael Grzeschik1-0/+2
This patch makes it possible to set the chipidea udc into full-speed only mode. It is set by the oftree property "maximum-speed = full-speed". Signed-off-by: Peter Chen <[email protected]> Signed-off-by: Michael Grzeschik <[email protected]> Signed-off-by: Marc Kleine-Budde <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-09-30usb: chipidea: add ci_hdrc_enter_lpm APIPeter Chen1-0/+1
This API is used to let the PHY enter/leave low power mode. Before the controller going to work(at probe/resume), it needs to let the PHY leave low power mode. After the controller stopping working(at remove/suspend), it needs to let the PHY enter low power mode to save power consumption. Signed-off-by: Peter Chen <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-08-14usb: chipidea: otg: add otg file used to access otgscPeter Chen1-0/+10
This file is mainly used to access otgsc currently, it may add otg related things in the future. Tested-by: Marek Vasut <[email protected]> Signed-off-by: Peter Chen <[email protected]> Signed-off-by: Alexander Shishkin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-07-29usb: chipidea: cast PORTSC_PTS and DEVLC_PTS macrosFabio Estevam1-2/+2
Fix the following build warnings on x86: drivers/usb/chipidea/core.c: In function 'hw_phymode_configure': drivers/usb/chipidea/core.c:226:3: warning: large integer implicitly truncated to unsigned type [-Woverflow] drivers/usb/chipidea/core.c:230:3: warning: large integer implicitly truncated to unsigned type [-Woverflow] drivers/usb/chipidea/core.c:243:3: warning: large integer implicitly truncated to unsigned type [-Woverflow] drivers/usb/chipidea/core.c:246:3: warning: large integer implicitly truncated to unsigned type [-Woverflow] Reported-by: Felipe Balbi <[email protected]> Signed-off-by: Fabio Estevam <[email protected]> Signed-off-by: Alexander Shishkin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-06-17usb: chipidea: add PTW, PTS and STS handlingMichael Grzeschik1-1/+15
This patch makes it possible to configure the PTW, PTS and STS bits inside the portsc register for host and device mode before the driver starts and the phy can be addressed as hardware implementation is designed. Signed-off-by: Michael Grzeschik <[email protected]> Signed-off-by: Marc Kleine-Budde <[email protected]> Signed-off-by: Sascha Hauer <[email protected]> Signed-off-by: Alexander Shishkin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-05-11usb: chipidea: add host roleAlexander Shishkin1-0/+1
This adds EHCI host support to the chipidea driver. We want it to be part of the hdrc driver and not a standalone (sub-)driver module, as the structure of ehci-hcd.c suggests, so for chipidea controller we hack it to not provide platform-related code, but only the ehci hcd. The ehci-platform driver won't work for us here too, because the controller uses the same registers for both device and host mode and also otg-related bits, so it's not really possible to put ehci registers into a separate resource. This is not a pretty solution, but the alternative is exporting symbols from the chipidea driver to a ehci-chipidea driver and doing all the module refcounting. Signed-off-by: Alexander Shishkin <[email protected]> Cc: Alan Stern <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-05-11usb: chipidea: use common definition for USBMODE bitsAlexander Shishkin1-4/+4
Some of the bits of USBMODE register are defined in <usb/ehci_def.h>, use them instead of having our own definitions. Signed-off-by: Alexander Shishkin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-05-11usb: chipidea: add support for rolesAlexander Shishkin1-0/+18
Add some generic code for roles and implement simple role switching based on ID pin state and/or a sysfs file. At this, we also rename the device to ci_hdrc, which is what it is. The "manual" switch is made into a sysfs file and not debugfs, because it might be useful even in non-debug context. For some boards, like sheevaplug, it seems to be the only way to switch roles without modifying the hardware, since the ID pin is always grounded. Signed-off-by: Alexander Shishkin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-05-11usb: chipidea: split the driver code into unitsAlexander Shishkin1-0/+71
Split the driver into the following parts: * core -- resources, register access, capabilities, etc; * udc -- device controller functionality; * debug -- logging events. Signed-off-by: Alexander Shishkin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>