mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
USB/PHY patches for 4.19-rc1
Here is the big USB and phy driver patch set for 4.19-rc1. Nothing huge but there was a lot of work that happened this development cycle: - lots of type-c work, with drivers graduating out of staging, and displayport support being added. - new PHY drivers - the normal collection of gadget driver updates and fixes - code churn to work on the urb handling path, using irqsave() everywhere in anticipation of making this codepath a lot simpler in the future. - usbserial driver fixes and reworks - other misc changes Full details are in the shortlog. All of these have been in linux-next with no reported issues for a while. Signed-off-by: Greg Kroah-Hartman <[email protected]> -----BEGIN PGP SIGNATURE----- iG0EABECAC0WIQT0tgzFv3jCIUoxPcsxR9QN2y37KQUCW3hBPA8cZ3JlZ0Brcm9h aC5jb20ACgkQMUfUDdst+yloNwCggMZi9m8Krjq7d7aLw5oJJex/nIAAn0jeADOT NpoCgrtGHjwrATxN5/Ke =jXa3 -----END PGP SIGNATURE----- Merge tag 'usb-4.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB/PHY updates from Greg KH: "Here is the big USB and phy driver patch set for 4.19-rc1. Nothing huge but there was a lot of work that happened this development cycle: - lots of type-c work, with drivers graduating out of staging, and displayport support being added. - new PHY drivers - the normal collection of gadget driver updates and fixes - code churn to work on the urb handling path, using irqsave() everywhere in anticipation of making this codepath a lot simpler in the future. - usbserial driver fixes and reworks - other misc changes All of these have been in linux-next with no reported issues for a while" * tag 'usb-4.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (159 commits) USB: serial: pl2303: add a new device id for ATEN usb: renesas_usbhs: Kconfig: convert to SPDX identifiers usb: dwc3: gadget: Check MaxPacketSize from descriptor usb: dwc2: Turn on uframe_sched on "stm32f4x9_fsotg" platforms usb: dwc2: Turn on uframe_sched on "amlogic" platforms usb: dwc2: Turn on uframe_sched on "his" platforms usb: dwc2: Turn on uframe_sched on "bcm" platforms usb: dwc2: gadget: ISOC's starting flow improvement usb: dwc2: Make dwc2_readl/writel functions endianness-agnostic. usb: dwc3: core: Enable AutoRetry feature in the controller usb: dwc3: Set default mode for dwc_usb31 usb: gadget: udc: renesas_usb3: Add register of usb role switch usb: dwc2: replace ioread32/iowrite32_rep with dwc2_readl/writel_rep usb: dwc2: Modify dwc2_readl/writel functions prototype usb: dwc3: pci: Intel Merrifield can be host usb: dwc3: pci: Supply device properties via driver data arm64: dts: dwc3: description of incr burst type usb: dwc3: Enable undefined length INCR burst type usb: dwc3: add global soc bus configuration reg0 usb: dwc3: Describe 'wakeup_work' field of struct dwc3_pci ...
This commit is contained in:
commit
5695d5d197
165 changed files with 5847 additions and 1813 deletions
62
include/dt-bindings/usb/pd.h
Normal file
62
include/dt-bindings/usb/pd.h
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
#ifndef __DT_POWER_DELIVERY_H
|
||||
#define __DT_POWER_DELIVERY_H
|
||||
|
||||
/* Power delivery Power Data Object definitions */
|
||||
#define PDO_TYPE_FIXED 0
|
||||
#define PDO_TYPE_BATT 1
|
||||
#define PDO_TYPE_VAR 2
|
||||
#define PDO_TYPE_APDO 3
|
||||
|
||||
#define PDO_TYPE_SHIFT 30
|
||||
#define PDO_TYPE_MASK 0x3
|
||||
|
||||
#define PDO_TYPE(t) ((t) << PDO_TYPE_SHIFT)
|
||||
|
||||
#define PDO_VOLT_MASK 0x3ff
|
||||
#define PDO_CURR_MASK 0x3ff
|
||||
#define PDO_PWR_MASK 0x3ff
|
||||
|
||||
#define PDO_FIXED_DUAL_ROLE (1 << 29) /* Power role swap supported */
|
||||
#define PDO_FIXED_SUSPEND (1 << 28) /* USB Suspend supported (Source) */
|
||||
#define PDO_FIXED_HIGHER_CAP (1 << 28) /* Requires more than vSafe5V (Sink) */
|
||||
#define PDO_FIXED_EXTPOWER (1 << 27) /* Externally powered */
|
||||
#define PDO_FIXED_USB_COMM (1 << 26) /* USB communications capable */
|
||||
#define PDO_FIXED_DATA_SWAP (1 << 25) /* Data role swap supported */
|
||||
#define PDO_FIXED_VOLT_SHIFT 10 /* 50mV units */
|
||||
#define PDO_FIXED_CURR_SHIFT 0 /* 10mA units */
|
||||
|
||||
#define PDO_FIXED_VOLT(mv) ((((mv) / 50) & PDO_VOLT_MASK) << PDO_FIXED_VOLT_SHIFT)
|
||||
#define PDO_FIXED_CURR(ma) ((((ma) / 10) & PDO_CURR_MASK) << PDO_FIXED_CURR_SHIFT)
|
||||
|
||||
#define PDO_FIXED(mv, ma, flags) \
|
||||
(PDO_TYPE(PDO_TYPE_FIXED) | (flags) | \
|
||||
PDO_FIXED_VOLT(mv) | PDO_FIXED_CURR(ma))
|
||||
|
||||
#define VSAFE5V 5000 /* mv units */
|
||||
|
||||
#define PDO_BATT_MAX_VOLT_SHIFT 20 /* 50mV units */
|
||||
#define PDO_BATT_MIN_VOLT_SHIFT 10 /* 50mV units */
|
||||
#define PDO_BATT_MAX_PWR_SHIFT 0 /* 250mW units */
|
||||
|
||||
#define PDO_BATT_MIN_VOLT(mv) ((((mv) / 50) & PDO_VOLT_MASK) << PDO_BATT_MIN_VOLT_SHIFT)
|
||||
#define PDO_BATT_MAX_VOLT(mv) ((((mv) / 50) & PDO_VOLT_MASK) << PDO_BATT_MAX_VOLT_SHIFT)
|
||||
#define PDO_BATT_MAX_POWER(mw) ((((mw) / 250) & PDO_PWR_MASK) << PDO_BATT_MAX_PWR_SHIFT)
|
||||
|
||||
#define PDO_BATT(min_mv, max_mv, max_mw) \
|
||||
(PDO_TYPE(PDO_TYPE_BATT) | PDO_BATT_MIN_VOLT(min_mv) | \
|
||||
PDO_BATT_MAX_VOLT(max_mv) | PDO_BATT_MAX_POWER(max_mw))
|
||||
|
||||
#define PDO_VAR_MAX_VOLT_SHIFT 20 /* 50mV units */
|
||||
#define PDO_VAR_MIN_VOLT_SHIFT 10 /* 50mV units */
|
||||
#define PDO_VAR_MAX_CURR_SHIFT 0 /* 10mA units */
|
||||
|
||||
#define PDO_VAR_MIN_VOLT(mv) ((((mv) / 50) & PDO_VOLT_MASK) << PDO_VAR_MIN_VOLT_SHIFT)
|
||||
#define PDO_VAR_MAX_VOLT(mv) ((((mv) / 50) & PDO_VOLT_MASK) << PDO_VAR_MAX_VOLT_SHIFT)
|
||||
#define PDO_VAR_MAX_CURR(ma) ((((ma) / 10) & PDO_CURR_MASK) << PDO_VAR_MAX_CURR_SHIFT)
|
||||
|
||||
#define PDO_VAR(min_mv, max_mv, max_ma) \
|
||||
(PDO_TYPE(PDO_TYPE_VAR) | PDO_VAR_MIN_VOLT(min_mv) | \
|
||||
PDO_VAR_MAX_VOLT(max_mv) | PDO_VAR_MAX_CURR(max_ma))
|
||||
|
||||
#endif /* __DT_POWER_DELIVERY_H */
|
||||
Loading…
Reference in a new issue