Commit graph

873,075 commits

Author SHA1 Message Date
Mayank Rana
c5c5b41399 usb: gadget: rndis: Add packet filter handling for hw accelerated path
Call flow control API when RNDIS packet filter control message is
received. This allows to call the registered flow control call back
from rndis clients supporting hw accelerated path.

CRs-Fixed: 1013824
Change-Id: I87793e31d4db10acf1103127a2d1ad942d253c67
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
2019-10-28 22:36:19 -07:00
Mayank Rana
8d0058d89c USB: rndis: Honor dl_max_packet_size value sent by host
This change starts using dl_max_packet_size value sent by host
as part of USB RNDIS init message communication. Using default
dl_max_packet_size value results into low throughput with more
data loss on host side as host side RNDIS can't support
de-aggregation (applicable for Linux Host RNDIS driver) or it
ignores received more data then host side RNDIS can handle. To
use fine tune dl_max_packet_size for better throughput, driver
selects minimum value between host supported dl_max_packet_size
and default size (i.e. 9216 bytes as RNDIS IN aggregation size).

Change-Id: I00c81bc905a032867c537536b01bf32584c37e63
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
Signed-off-by: Jack Pham <jackp@codeaurora.org>
2019-10-28 22:36:18 -07:00
Hemant Kumar
f645ecc002 usb: gadget: rndis: Add new rndis parameters
Add pkt_alignment_factor rndis parameter. This
parameter along with max_pkt_per_xfer allow rndis
function driver to aggregate more than one IP packets
per transfer. This is done by calling newly added API
rndis_set_pkt_alignment_factor().

Change-Id: Ic9c543c388f872452e708a3a26be4ae82b54c082
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
Signed-off-by: Jack Pham <jackp@codeaurora.org>
2019-10-28 22:36:18 -07:00
Hemant Kumar
56a743ea1e usb: gadget: Add support for rndis flow control callback
Allow registration for data flow control call back from
rndis functions supporting different transport i.e.
BAM2BAM_IPA, GSI_IPA.

Change-Id: I09df5f7f81e9d9ed0cfd5e54d481db87727bbc75
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
Signed-off-by: Jack Pham <jackp@codeaurora.org>
2019-10-28 22:36:17 -07:00
Vamsi Krishna Samavedam
8beabf5115 usb: Add support for rndis uplink aggregation
RNDIS protocol supports data aggregation on uplink and can help
reduce mips by reducing number of interrupts on device. Throughput
also improved by 20-30%. Aggregation is disabled by setting
aggregation packet size to 1. To help better UL throughput, set
as ul aggregation support to 3 rndis packets by default. It can be
configured via sysfs device attribute ul_max_pkt_per_xfer.

Change-Id: I689d37824e71835ed50bf15c3e35a0eced8f116d
Signed-off-by: Vamsi Krishna Samavedam <vskrishn@codeaurora.org>
Signed-off-by: Xerox Lin <xerox_lin@htc.com>
Signed-off-by: Jack Pham <jackp@codeaurora.org>
2019-10-28 22:36:16 -07:00
Jack Pham
dbd3ab67a5 usb: dwc3-msm: Allow xo_clk to be optional
Some instances of USB controller get XO directly from the
pad and hence don't need a GCC clock to enable it. Allow
xo_clk to be optional if not specified in DT.

Speaking of optional clocks, remove the NULL checks and allow
clk_* APIs to get called unconditionally, since they already
handle NULL pointers. Finally remove the clk_put() call for
xo_clk since it is already devm managed.

Change-Id: I1864219b89c7a636989f44fa7d6640bf5f156453
Signed-off-by: Jack Pham <jackp@codeaurora.org>
2019-10-28 22:36:15 -07:00
Jack Pham
af34613293 usb: dwc3-msm: Get usb power_supply from device tree
Not all instances of the controller should be tied to the
USB power_supply. For example in cases of multiple instances,
we do not want all instances manipulating the SDP current
draw by setting the power_supply property, as there is only
usually only a single charger instance.

Replace power_supply lookup by "usb" name to a phandle lookup.
DT must specify a "qcom,usb-charger" property pointing to the
charger instance.

Change-Id: Ibd90337782b23f5e1a1a1c2af5a48c49be37823d
Signed-off-by: Jack Pham <jackp@codeaurora.org>
2019-10-28 22:36:15 -07:00
Jack Pham
505da987be usb: dwc3-msm: Add usb_ep_autoconfig_by_name
Add a helper function which a function driver such as f_gsi can
use to choose an endpoint by name, eg ep1in-gsi.

Change-Id: Id9fd42e423cb1c99c7c98a761dec0cd8bf150b82
Signed-off-by: Jack Pham <jackp@codeaurora.org>
2019-10-28 22:34:38 -07:00
Elson Roy Serrao
5c3cf2427c usb: dwc3: Enable PHY deep low power mode in L1 suspend
Currently controller is enabling only shallow low power mode during
L1 suspend in host mode. Power savings can be improved by allowing
deep low power mode allowing PLL to be turned OFF. Configuring
the GUCTL1 register to enable this feature.

Change-Id: Iea6cfa2c9085a01f45a9f0d633c80368ad085806
Signed-off-by: Elson Roy Serrao <eserrao@codeaurora.org>
Signed-off-by: Jack Pham <jackp@codeaurora.org>
2019-10-28 22:33:23 -07:00
qctecmdr
b7c7d57e85 Merge "soc: qcom: Add snapshot of IPC IRQ bridge driver" 2019-10-28 22:18:20 -07:00
Akshay Pandit
dd62a46e9f msm: ipa3: Ratelimit the error logs for pkts with invalid status
Ratelimit the logs indicating invalid packet status fields.
Support DL Frag rule status opcode. The logs introduces
delay during modem ssr.

Change-Id: I92ebf8776dd0e81653c968985818124cbe539d5f
Signed-off-by: Akshay Pandit <pandit@codeaurora.org>
2019-10-28 22:06:54 -07:00
Jack Pham
16817354bf usb: dwc3: Add DWC3 MSM driver
This change adds the driver for the USB controller on QTI MSM
devices.  This is a snapshot of the driver from msm-4.19 as of
commit 104eef6e1fe8 ("platform: msm: Remove unused local count
variable").

In addition to the msm-4.19 version, this change includes several
fixups to address the following:

  - Building dwc3-msm as a module. It is easiest to just merge
    dbm.c into dwc3-msm.c.
  - Coccinelle warnings, such as assigning 0/1 to a boolean and
    missing newlines from log strings.
  - Conversion of defunct msm_bus API to the interconnect bus
    scaling API.
  - Remove dead host controller handling as it depends on a
    USB_BUS_DIED notification added to usbcore on downstream and
    has not yet been mainlined on this kernel. We will either have
    to bring in the atomic notifier or switch to listening to the
    "ERROR=DEAD" uevent and take action from userspace.
  - Remove extcon blocking notifier and MED_HIGH_CURRENT.
  - Remove usage of PM_QOS_REQ_AFFINE_IRQ as PM QoS support for
    specifying IRQ/CPU affinity is not supported upstream. Just
    request a QoS level for all cores.
  - Endpoints' ep_type EP_TYPE_GSI is now reflected in dep->gsi
  - dwc3_stop_active_transfer() takes a dep directly and added
    an additional parameter to skip IOC
  - Remove RESTART_USB_SESSION notification as the usb_gadget_ops
    restart_session is not supported in upstream
  - dwc3_request->started replaced by DWC3_REQUEST_STATUS_STARTED
  - Switch USB_DR_MODE_DRD enum back to USB_DR_MODE_OTG
  - Directly write GUSB3PIPECTL_SUSPHY and DEVTEN registers instead
    of needing APIs from core
  - Remove clk_set_flags. These aren't needed now.
  - Remove FLOAT charger handling.

Change-Id: I9a13cb5bae2f5c1e98906d1cb52134c2dea0bc80
Signed-off-by: Jack Pham <jackp@codeaurora.org>
2019-10-28 21:49:34 -07:00
qctecmdr
eabf380163 Merge "usb: dwc3: Stop active transfer on control endpoints" 2019-10-28 21:31:48 -07:00
qctecmdr
ccc11220e7 Merge "usb: dwc3: Disable the irq before clearing run_stop bit" 2019-10-28 20:52:45 -07:00
qctecmdr
df67e52b3a Merge "dwc3: gadget: Take copy of dwc->gadget_driver before releasing lock" 2019-10-28 20:16:02 -07:00
qctecmdr
f79c5887a7 Merge "usb: dwc3: gadget: Enable SUSPEND event after CONNECT DONE" 2019-10-28 19:37:38 -07:00
qctecmdr
b8e7366b19 Merge "usb: dwc3: Check return value for debugfs_create_dir()" 2019-10-28 19:01:56 -07:00
qctecmdr
08baf0afb0 Merge "usb: dwc3: gadget: Ensure no control transfers in progress when stopping" 2019-10-28 18:27:33 -07:00
qctecmdr
f8d14ce83a Merge "usb: dwc3: gadget: Fix runtime PM vote from pull_up handler" 2019-10-28 17:50:56 -07:00
qctecmdr
79600075fb Merge "usb: dwc3: Avoid NULL pointer access" 2019-10-28 17:12:01 -07:00
qctecmdr
dd5ffe4e30 Merge "usb: dwc3: request 2mA VBUS current when suspending" 2019-10-28 16:23:05 -07:00
qctecmdr
ca12b166a0 Merge "usb: dwc3: Add support for PM suspend and hibernation in host mode" 2019-10-28 15:41:38 -07:00
qctecmdr
10004e7945 Merge "usb: dwc3: ep0: Fail enqueue() when racing with vbus_sess disconnect" 2019-10-28 15:02:03 -07:00
Isaac J. Manjarres
e058371a0b of: reserved-memory: Bypass rmem initialization check for carveouts
Pure carveouts (i.e. memory that is completely unmanaged by the
kernel) do not have any initialization routines associated
with them. So, ignore them when checking if a region has already
been initialized by the reserved memory framework.

Change-Id: Ied0db066a372751f40327460e583a81ad5b5429f
Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
2019-10-28 14:32:14 -07:00
qctecmdr
9c6f55fcd1 Merge "dwc3: gadget: Don't queue USB request if pull up is getting disabled" 2019-10-28 14:27:55 -07:00
Sumukh Hallymysore Ravindra
4f5d895ef8 msm: synx: Porting synx driver to 5.x kernel
Synx driver manages synchronization and dependency
handling across heterogeneous cores.

Modified kernel APIs with support for kernel clients.
Changes to synx handle creation, synx object handling
and cleanup.

Support for building synx driver as loadable module.

Change-Id: I2d70d753872467895ef4cf5a85326b7a92310986
Signed-off-by: Sumukh Hallymysore Ravindra <shallymy@codeaurora.org>
2019-10-28 14:02:38 -07:00
qctecmdr
310a5c3075 Merge "usb: dwc3: Fix USB gadget initialization sequence" 2019-10-28 13:39:03 -07:00
qctecmdr
6d73fbad77 Merge "usb: dwc3: Avoid NULL pointer access in dwc3_calc_trbs_left" 2019-10-28 13:03:02 -07:00
qctecmdr
8d79cb85f0 Merge "usb: dwc3: Do not traverse list using list_for_each_safe" 2019-10-28 12:27:37 -07:00
Chris Lew
fa7d36a701 net: qrtr: Use proper endianness when logging
The qrtr v1 packet header has values that are changed to le32. Use the
le32_to_cpu() macro before using any values from the header struct.

Change-Id: I84731380c22f1cd8e89f9a594e6da0279feb8c2b
Signed-off-by: Chris Lew <clew@codeaurora.org>
2019-10-28 12:20:40 -07:00
Mayank Rana
5bd60c1a18 usb: phy: Add snapshot of QTI USB PHY drivers
This change adds USB PHY drivers for high speed and super speed/plus
functionality on QTI MSM platforms. This snapshot is taken as of
msm-4.19 commit <8197f81ffc14> ("Merge "msm: kgsl: Correct HFI
acknowledgment failure condition"").

Change-Id: Iede74fa0fd037a0741ee3269d78adb372600ea8d
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
2019-10-28 11:57:54 -07:00
qctecmdr
3c7ed8087d Merge "usb: dwc3: gadget: delay clearing run/stop when setup just arrived" 2019-10-28 11:47:22 -07:00
Mayank Rana
d08e05220b platform: msm: Add snapshot of USB BAM driver
This change adds snapshot of USB BAM driver which allows USB BAM to
communicate with other peripherals' (e.g. QDSS or IPA) BAM.

This snapshot is taken as of msm-4.19 kernel commit <b318a6e04625>
("Merge "msm: ipa4: Fix to use common PM handle for coalescing and
default pipe"").

Change-Id: I747e4defab668d44bdc956e318492dd30880a166
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
2019-10-28 11:42:12 -07:00
Jack Pham
45960fc74a usb: gadget: Add snapshot of USB CDEV function driver
This change adds USB CDEV function driver which creates USB
character device to provide DUN and NMEA functionality.
This snapshot is taken as of msm-4.19 commit 104eef6e1fe8 ("platform:
msm: Remove unused local count variable").

Change-Id: I2a20aec1c21a506f8981e907bc0f0f58fff7fe58
Signed-off-by: Jack Pham <jackp@codeaurora.org>
2019-10-28 11:37:07 -07:00
Mayank Rana
8a07131c08 usb: gadget: Add snapshot of CCID function driver
This USB CCID function driver will be a transport layer between the
userspace CCID component and the Windows Host. Data and control
commands from the Windows Host will be sent to the userspace component
and vice-versa. This snapshot is taken as of msm-4.19 commit 104eef6e1fe8
("platform: msm: Remove unused local count variable").

Change-Id: I47301a318cb04c814699abf3e5ed5a9aecd7fbee
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
2019-10-28 11:37:02 -07:00
qctecmdr
dc87488bd4 Merge "dwc3: gadget: Stop active transfer pending on ep0 out/in during reset" 2019-10-28 11:08:09 -07:00
qctecmdr
c2e15eef58 Merge "usb: dwc3: Fix incorrect ep0 state on reset" 2019-10-28 10:32:57 -07:00
qctecmdr
a7d5a85aa0 Merge "usb: dwc3: resize txfifo of IN/INT endpoint before enabling it" 2019-10-28 09:55:51 -07:00
qctecmdr
4c196dd091 Merge "usb: dwc3: Add QTI MSM platform specific feature and other changes" 2019-10-28 09:24:14 -07:00
Konstantin Dorfman
78200d8ba0 soc: qcom: spss_utils: add spss_utils as DLKM for GKI
This change converts statically compiled platform driver into kernel
module.

Change-Id: Iee2c47dd895931f6c8f1982bc34b868287b994f6
Signed-off-by: Konstantin Dorfman <kdorfman@codeaurora.org>
2019-10-28 14:39:26 +02:00
Konstantin Dorfman
d50cfdc312 soc: qcom: add secure processor subsystem (spss) utils driver
The spss-util driver provides utilities required for the Secure
Processor Subsystem (SPSS). It provides the fuse state for key selection
and the SPSS HW version.

Add snapshot for spss-util driver from msm-4.19 commit a7793b40172f
("soc: qcom: spss_utils: fix spss SSR when IAR not active").

Change-Id: I6531cae56cec9d062fa03c573bcd70207d10f1a2
Signed-off-by: Konstantin Dorfman <kdorfman@codeaurora.org>
2019-10-28 13:29:59 +02:00
Lina Iyer
0e0dea9d35 defconfig: enable power drivers for lahaina
Enable LPM, RPMH, DDR and SoC sleep stats drivers for Lahaina.

Change-Id: Ide0902129c544d51b1fbba36a030b2abfe16c2dc
Signed-off-by: Lina Iyer <ilina@codeaurora.org>
2019-10-28 13:00:29 +05:30
Maulik Shah
3f8c900abd cpuidle: lpm-levels: Update functions to static
Update function definition to declare as static.

Change-Id: Id1f74aa53267e128c40cc8397928baa58cbaa2db
Signed-off-by: Maulik Shah <mkshah@codeaurora.org>
2019-10-28 13:00:25 +05:30
qctecmdr
86cb2da52a Merge "ASoC: Add a debug message to track widget power up/down" 2019-10-27 20:51:11 -07:00
Zhen Kong
2a61b52cc9 shmbridge: Add shmbridge driver snapshot for lahaina
Add snapshot for qtee_shmbridge from msm-4.19 commit 4260f49233b7
("drivers: soc: qcom: enable shared memory bridge in hypervisor").

Change-Id: I3247eedc0fbcebd3db212e8835d8a68090123ee4
Signed-off-by: Zhen Kong <zkong@codeaurora.org>
2019-10-27 20:50:06 -07:00
qctecmdr
f53b149a86 Merge "ASoC: Change info logs to debug" 2019-10-27 20:13:16 -07:00
Tingwei Zhang
79a2734194 coresight: csr: Add msr support
SWAO msr has been moved to SWAO csr. Add the support in driver
to program it.

Change-Id: Ied618265a117a5fcd385524e1ec9aa4ce4e84deb
Signed-off-by: Tingwei Zhang <tingwei@codeaurora.org>
2019-10-27 19:40:54 -07:00
qctecmdr
6c77d64802 Merge "msm: qdsp6v2: Add timestamp support for compress capture" 2019-10-27 19:32:59 -07:00
qctecmdr
18dc13d57e Merge "msm: ipa3: Query stats from Q6 NLO PROD/CONS" 2019-10-27 02:42:23 -07:00
Jack Pham
669a7f8d4f usb: dwc3: Allow dwc_usb31 to operate in dual-role
According to the comment in dwc3_get_dr_mode() controller
revisions > 3.30a, including dwc_usb31, do not support OTG.
However, dual-role switching can still be supported with the
use of an extcon or usb_role_switch driver, so there is no
need to restrict the operation to host-only or peripheral-only.

Change-Id: I7dea9ff15f5ac15f673c4569ffe401981de04f22
Signed-off-by: Jack Pham <jackp@codeaurora.org>
2019-10-26 23:24:03 -07:00