/linux/include/linux/usb/ |
H A D | otg.h | 2 /* USB OTG (On The Go) defines */ 28 int (*set_host)(struct usb_otg *otg, struct usb_bus *host); 31 int (*set_peripheral)(struct usb_otg *otg, 35 int (*set_vbus)(struct usb_otg *otg, bool enabled); 38 int (*start_srp)(struct usb_otg *otg); 41 int (*start_hnp)(struct usb_otg *otg); 46 * struct usb_otg_caps - describes the otg capabilities of the device 47 * @otg_rev: The OTG revision number the device is compliant with, it's 64 otg_start_hnp(struct usb_otg *otg) in otg_start_hnp() argument 66 if (otg && otg->start_hnp) in otg_start_hnp() [all …]
|
H A D | otg-fsm.h | 16 #define OTG_STS_SELECTOR 0xF000 /* OTG status selector, according to 17 * OTG and EH 2.0 Chapter 6.2.3 22 * OTG and EH 2.0 Charpter 6.2.3 29 /* Standard OTG timers */ 49 * struct otg_fsm - OTG state machine according to the OTG spec 51 * OTG hardware Inputs 57 * @power_up: TRUE when the OTG device first powers up its USB system and 76 * @test_device: TRUE when the B-device switches to B-Host and detects an OTG 88 * Auxiliary inputs (OTG v1.3 only. Obsolete now.) 95 * OTG Output status. Read only for users. Updated by OTG FSM helpers defined [all …]
|
/linux/Documentation/devicetree/bindings/usb/ |
H A D | usb-drd.yaml | 7 title: Generic USB OTG Controller 13 otg-rev: 15 Tells usb driver the release number of the OTG and EH supplement with 17 decimal (i.e. 2.0 is 0200H). This property is used if any real OTG 18 features (HNP/SRP/ADP) is enabled. If ADP is required, otg-rev should be 27 should default to OTG. 29 enum: [host, peripheral, otg] 30 default: otg 34 Tells OTG controllers we want to disable OTG HNP. Normally HNP is the 35 basic function of real OTG except you want it to be a srp-capable only B [all …]
|
H A D | dwc2.yaml | 7 title: DesignWare HS OTG USB 2.0 controller 21 - const: ingenic,jz4775-otg 22 - const: ingenic,jz4780-otg 23 - const: ingenic,x1000-otg 24 - const: ingenic,x1600-otg 25 - const: ingenic,x1700-otg 26 - const: ingenic,x1830-otg 27 - const: ingenic,x2000-otg 59 - const: amcc,dwc-otg 60 - const: apm,apm82181-dwc-otg [all …]
|
H A D | cdns,usb3.yaml | 18 - description: OTG controller registers 24 - const: otg 33 - description: OTG/DRD controller interrupt 42 - const: otg 103 reg-names = "otg", "xhci", "dev"; 107 interrupt-names = "host", "peripheral", "otg"; 109 dr_mode = "otg";
|
/linux/drivers/gpu/drm/amd/display/dc/dccg/dcn31/ |
H A D | dcn31_dccg.h | 47 DCCG_SRII(PIXEL_RATE_CNTL, OTG, 0),\ 48 DCCG_SRII(PIXEL_RATE_CNTL, OTG, 1),\ 49 DCCG_SRII(PIXEL_RATE_CNTL, OTG, 2),\ 50 DCCG_SRII(PIXEL_RATE_CNTL, OTG, 3),\ 113 DCCG_SFII(OTG, PIXEL_RATE_CNTL, DTBCLK_DTO, ENABLE, 0, mask_sh),\ 114 DCCG_SFII(OTG, PIXEL_RATE_CNTL, DTBCLK_DTO, ENABLE, 1, mask_sh),\ 115 DCCG_SFII(OTG, PIXEL_RATE_CNTL, DTBCLK_DTO, ENABLE, 2, mask_sh),\ 116 DCCG_SFII(OTG, PIXEL_RATE_CNTL, DTBCLK_DTO, ENABLE, 3, mask_sh),\ 117 DCCG_SFII(OTG, PIXEL_RATE_CNTL, DTBCLKDTO, ENABLE_STATUS, 0, mask_sh),\ 118 DCCG_SFII(OTG, PIXEL_RATE_CNTL, DTBCLKDTO, ENABLE_STATUS, 1, mask_sh),\ [all …]
|
/linux/drivers/usb/phy/ |
H A D | phy-generic.c | 18 #include <linux/usb/otg.h> 78 static int nop_set_vbus(struct usb_otg *otg, bool enable) in nop_set_vbus() argument 81 struct usb_phy_generic *nop = dev_get_drvdata(otg->usb_phy->dev); in nop_set_vbus() 104 struct usb_otg *otg = nop->phy.otg; in nop_gpio_vbus_thread() local 114 otg->state = OTG_STATE_B_PERIPHERAL; in nop_gpio_vbus_thread() 118 otg->gadget); in nop_gpio_vbus_thread() 121 otg->state = OTG_STATE_B_IDLE; in nop_gpio_vbus_thread() 125 otg->gadget); in nop_gpio_vbus_thread() 168 static int nop_set_peripheral(struct usb_otg *otg, struct usb_gadget *gadget) in nop_set_peripheral() argument 170 if (!otg) in nop_set_peripheral() [all …]
|
H A D | Kconfig | 19 Enable this to support the USB OTG transceiver in AB8500 chip. 24 tristate "Freescale USB OTG Transceiver Driver" 29 Enable this to support Freescale USB OTG transceiver. 68 Enable this to support the USB OTG transceiver on TWL6030 70 and OTG SRP events capabilities. For all other transceiver functionality 86 NOT support role switch. OTG devices that can do role switch 91 tristate "OMAP USB OTG controller driver" 94 Enable this to support some transceivers on OMAP1 platforms. OTG 98 will be called phy-omap-otg. 124 and OTG drivers (to be selected separately). [all …]
|
/linux/drivers/gpu/drm/amd/display/dc/dccg/dcn32/ |
H A D | dcn32_dccg.h | 80 DCCG_SFII(OTG, PIXEL_RATE_CNTL, DTBCLK_DTO, ENABLE, 0, mask_sh),\ 81 DCCG_SFII(OTG, PIXEL_RATE_CNTL, DTBCLK_DTO, ENABLE, 1, mask_sh),\ 82 DCCG_SFII(OTG, PIXEL_RATE_CNTL, DTBCLK_DTO, ENABLE, 2, mask_sh),\ 83 DCCG_SFII(OTG, PIXEL_RATE_CNTL, DTBCLK_DTO, ENABLE, 3, mask_sh),\ 84 DCCG_SFII(OTG, PIXEL_RATE_CNTL, DTBCLKDTO, ENABLE_STATUS, 0, mask_sh),\ 85 DCCG_SFII(OTG, PIXEL_RATE_CNTL, DTBCLKDTO, ENABLE_STATUS, 1, mask_sh),\ 86 DCCG_SFII(OTG, PIXEL_RATE_CNTL, DTBCLKDTO, ENABLE_STATUS, 2, mask_sh),\ 87 DCCG_SFII(OTG, PIXEL_RATE_CNTL, DTBCLKDTO, ENABLE_STATUS, 3, mask_sh),\ 88 DCCG_SFII(OTG, PIXEL_RATE_CNTL, PIPE, DTO_SRC_SEL, 0, mask_sh),\ 89 DCCG_SFII(OTG, PIXEL_RATE_CNTL, PIPE, DTO_SRC_SEL, 1, mask_sh),\ [all …]
|
/linux/drivers/gpu/drm/amd/display/dc/dccg/dcn35/ |
H A D | dcn35_dccg.h | 102 DCCG_SFII(OTG, PIXEL_RATE_CNTL, DTBCLK_DTO, ENABLE, 0, mask_sh),\ 103 DCCG_SFII(OTG, PIXEL_RATE_CNTL, DTBCLK_DTO, ENABLE, 1, mask_sh),\ 104 DCCG_SFII(OTG, PIXEL_RATE_CNTL, DTBCLK_DTO, ENABLE, 2, mask_sh),\ 105 DCCG_SFII(OTG, PIXEL_RATE_CNTL, DTBCLK_DTO, ENABLE, 3, mask_sh),\ 106 DCCG_SFII(OTG, PIXEL_RATE_CNTL, DTBCLKDTO, ENABLE_STATUS, 0, mask_sh),\ 107 DCCG_SFII(OTG, PIXEL_RATE_CNTL, DTBCLKDTO, ENABLE_STATUS, 1, mask_sh),\ 108 DCCG_SFII(OTG, PIXEL_RATE_CNTL, DTBCLKDTO, ENABLE_STATUS, 2, mask_sh),\ 109 DCCG_SFII(OTG, PIXEL_RATE_CNTL, DTBCLKDTO, ENABLE_STATUS, 3, mask_sh),\ 110 DCCG_SFII(OTG, PIXEL_RATE_CNTL, PIPE, DTO_SRC_SEL, 0, mask_sh),\ 111 DCCG_SFII(OTG, PIXEL_RATE_CNTL, PIPE, DTO_SRC_SEL, 1, mask_sh),\ [all …]
|
/linux/drivers/gpu/drm/amd/display/dc/dccg/dcn314/ |
H A D | dcn314_dccg.h | 52 DCCG_SRII(PIXEL_RATE_CNTL, OTG, 0),\ 53 DCCG_SRII(PIXEL_RATE_CNTL, OTG, 1),\ 54 DCCG_SRII(PIXEL_RATE_CNTL, OTG, 2),\ 55 DCCG_SRII(PIXEL_RATE_CNTL, OTG, 3),\ 111 DCCG_SFII(OTG, PIXEL_RATE_CNTL, DTBCLK_DTO, ENABLE, 0, mask_sh),\ 112 DCCG_SFII(OTG, PIXEL_RATE_CNTL, DTBCLK_DTO, ENABLE, 1, mask_sh),\ 113 DCCG_SFII(OTG, PIXEL_RATE_CNTL, DTBCLK_DTO, ENABLE, 2, mask_sh),\ 114 DCCG_SFII(OTG, PIXEL_RATE_CNTL, DTBCLK_DTO, ENABLE, 3, mask_sh),\ 115 DCCG_SFII(OTG, PIXEL_RATE_CNTL, DTBCLKDTO, ENABLE_STATUS, 0, mask_sh),\ 116 DCCG_SFII(OTG, PIXEL_RATE_CNTL, DTBCLKDTO, ENABLE_STATUS, 1, mask_sh),\ [all …]
|
/linux/drivers/gpu/drm/amd/include/ivsrcid/dcn/ |
H A D | irqsrcs_dcn_1_0.h | 528 #define DCN_1_0__SRCID__OTG1_CPU_SS_INT 0x17 // D1: OTG Static Screen interrupt OTG… 531 #define DCN_1_0__SRCID__OTG1_RANGE_TIMING_UPDATE 0x17 // D1 : OTG range timing OTG1_IHC_RANGE_T… 534 #define DCN_1_0__SRCID__OTG2_CPU_SS_INT 0x17 // D2 : OTG Static Screen interrupt OTG2_IHC_CPU_SS_IN… 537 #define DCN_1_0__SRCID__OTG2_RANGE_TIMING_UPDATE 0x17 // D2 : OTG range timing OTG2_IHC_RANGE_TIMIN… 540 #define DCN_1_0__SRCID__OTG3_CPU_SS_INT 0x17 // D3 : OTG Static Screen interrupt OTG3_IHC_CPU_SS_IN… 543 #define DCN_1_0__SRCID__OTG3_RANGE_TIMING_UPDATE 0x17 // D3 : OTG range timing OTG3_IHC_RANGE_TIMIN… 546 #define DCN_1_0__SRCID__OTG4_CPU_SS_INT 0x17 // D4 : OTG Static Screen interrupt OTG4_IHC_CPU_SS_IN… 549 #define DCN_1_0__SRCID__OTG4_RANGE_TIMING_UPDATE 0x17 // D4 : OTG range timing OTG4_IHC_RANGE_TIMIN… 552 #define DCN_1_0__SRCID__OTG5_CPU_SS_INT 0x17 // D5 : OTG Static Screen interrupt OTG5_IHC_CPU_SS_IN… 555 #define DCN_1_0__SRCID__OTG5_RANGE_TIMING_UPDATE 0x17 // D5 : OTG range timing OTG5_IHC_RANGE_TIMIN… [all …]
|
/linux/drivers/phy/samsung/ |
H A D | phy-exynos5250-usb2.c | 199 u32 otg; in exynos5250_power_on() local 211 /* OTG configuration */ in exynos5250_power_on() 212 otg = readl(drv->reg_phy + EXYNOS_5250_USBOTGSYS); in exynos5250_power_on() 214 otg &= ~EXYNOS_5250_USBOTGSYS_FSEL_MASK; in exynos5250_power_on() 215 otg |= drv->ref_reg_val << EXYNOS_5250_USBOTGSYS_FSEL_SHIFT; in exynos5250_power_on() 217 otg &= ~(EXYNOS_5250_USBOTGSYS_FORCE_SUSPEND | in exynos5250_power_on() 220 otg |= EXYNOS_5250_USBOTGSYS_PHY_SW_RST | in exynos5250_power_on() 225 otg &= ~EXYNOS_5250_USBOTGSYS_REFCLKSEL_MASK; in exynos5250_power_on() 226 otg |= EXYNOS_5250_REFCLKSEL_CLKCORE << in exynos5250_power_on() 228 writel(otg, drv->reg_phy + EXYNOS_5250_USBOTGSYS); in exynos5250_power_on() [all …]
|
/linux/drivers/usb/common/ |
H A D | usb-otg-fsm.c | 3 * OTG Finite State Machine from OTG spec 18 #include <linux/usb/otg.h> 19 #include <linux/usb/otg-fsm.h> 74 if (fsm->otg->gadget) in otg_leave_state() 75 fsm->otg->gadget->host_request_flag = 0; in otg_leave_state() 105 if (fsm->otg->gadget) in otg_leave_state() 106 fsm->otg->gadget->host_request_flag = 0; in otg_leave_state() 125 enum usb_otg_state state = fsm->otg->state; in otg_hnp_polling_work() 132 udev = usb_hub_find_child(fsm->otg->host->root_hub, 1); in otg_hnp_polling_work() 134 dev_err(fsm->otg->host->controller, in otg_hnp_polling_work() [all …]
|
/linux/drivers/gpu/drm/amd/display/dc/dccg/dcn303/ |
H A D | dcn303_dccg.h | 38 DCCG_SRII(PIXEL_RATE_CNTL, OTG, 0),\ 39 DCCG_SRII(PIXEL_RATE_CNTL, OTG, 1) 59 DCCG_SFII(OTG, PIXEL_RATE_CNTL, OTG, ADD_PIXEL, 0, mask_sh),\ 60 DCCG_SFII(OTG, PIXEL_RATE_CNTL, OTG, ADD_PIXEL, 1, mask_sh),\ 61 DCCG_SFII(OTG, PIXEL_RATE_CNTL, OTG, DROP_PIXEL, 0, mask_sh),\ 62 DCCG_SFII(OTG, PIXEL_RATE_CNTL, OTG, DROP_PIXEL, 1, mask_sh)
|
/linux/drivers/phy/ti/ |
H A D | phy-dm816x-usb.c | 22 * phy as being SR70LX Synopsys USB 2.0 OTG nanoPHY. It also seems at 52 static int dm816x_usb_phy_set_host(struct usb_otg *otg, struct usb_bus *host) in dm816x_usb_phy_set_host() argument 54 otg->host = host; in dm816x_usb_phy_set_host() 56 otg->state = OTG_STATE_UNDEFINED; in dm816x_usb_phy_set_host() 61 static int dm816x_usb_phy_set_peripheral(struct usb_otg *otg, in dm816x_usb_phy_set_peripheral() argument 64 otg->gadget = gadget; in dm816x_usb_phy_set_peripheral() 66 otg->state = OTG_STATE_UNDEFINED; in dm816x_usb_phy_set_peripheral() 177 struct usb_otg *otg; in dm816x_usb_phy_probe() local 203 otg = devm_kzalloc(&pdev->dev, sizeof(*otg), GFP_KERNEL); in dm816x_usb_phy_probe() 204 if (!otg) in dm816x_usb_phy_probe() [all …]
|
H A D | phy-omap-usb2.c | 116 static int omap_usb_set_vbus(struct usb_otg *otg, bool enabled) in omap_usb_set_vbus() argument 118 struct omap_usb *phy = phy_to_omapusb(otg->usb_phy); in omap_usb_set_vbus() 126 static int omap_usb_start_srp(struct usb_otg *otg) in omap_usb_start_srp() argument 128 struct omap_usb *phy = phy_to_omapusb(otg->usb_phy); in omap_usb_start_srp() 136 static int omap_usb_set_host(struct usb_otg *otg, struct usb_bus *host) in omap_usb_set_host() argument 138 otg->host = host; in omap_usb_set_host() 140 otg->state = OTG_STATE_UNDEFINED; in omap_usb_set_host() 145 static int omap_usb_set_peripheral(struct usb_otg *otg, in omap_usb_set_peripheral() argument 148 otg->gadget = gadget; in omap_usb_set_peripheral() 150 otg->state = OTG_STATE_UNDEFINED; in omap_usb_set_peripheral() [all …]
|
/linux/drivers/gpu/drm/amd/display/dc/optc/dcn20/ |
H A D | dcn20_optc.c | 56 /* opp instance for OTG. For DCN1.0, ODM is remoed. in optc2_enable_crtc() 80 * optc2_set_gsl() - Assign OTG to GSL groups, 93 * In each group (assign an OTG to a group by setting OTG_GSLX_EN = 1, in optc2_set_gsl() 191 * Program OTG register MASTER_UPDATE_LOCK_DB_X/Y to the position before DP frame start in optc2_set_odm_combine() 264 /* accessing slave OTG registers */ in optc2_align_vblanks() 274 /* disable slave OTG */ in optc2_align_vblanks() 283 /* assign slave OTG to be controlled by master update lock */ in optc2_align_vblanks() 287 /* accessing master OTG registers */ in optc2_align_vblanks() 293 /* unlocking master OTG */ in optc2_align_vblanks() 301 /* calculate when to enable slave OTG */ in optc2_align_vblanks() [all …]
|
/linux/Documentation/driver-api/usb/ |
H A D | gadget.rst | 28 - USB "On-The-Go" (OTG) support, in conjunction with updates to the 32 API. This helps the OTG support, and looks forward to more-symmetric 151 OTG-capable systems will also need to include a standard Linux-USB host 153 (HCDs), *USB Device Drivers* to support the OTG "Targeted Peripheral 154 List", and so forth. There will also be an *OTG Controller Driver*, 157 new OTG protocols (HNP and SRP). Roles switch (host to peripheral, or 262 configurations, unless the hardware prevents such operation. For OTG 263 devices, each configuration descriptor includes an OTG descriptor. 271 allowed by that configuration. For OTG devices, setting a 296 Note that the lifecycle above can be slightly different for OTG devices. [all …]
|
/linux/Documentation/devicetree/bindings/phy/ |
H A D | rockchip,inno-usb2phy.yaml | 62 Phandle to the extcon device providing the cable state for the otg phy. 106 otg-port: 121 - const: otg-mux 123 - const: otg-bvalid 124 - const: otg-id 143 - otg-port 162 otg-port: 178 otg-port: 241 u2phy0_otg: otg-port { 245 interrupt-names = "otg-bvalid", "otg-id", "linestate";
|
H A D | allwinner,suniv-f1c100s-usb-phy.yaml | 29 description: USB OTG PHY bus clock 36 description: USB OTG reset 43 description: GPIO to the USB OTG ID pin 47 description: GPIO to the USB OTG VBUS detect pin 50 description: Power supply to detect the USB OTG VBUS 53 description: Regulator controlling USB OTG VBUS
|
H A D | allwinner,sun8i-v3s-usb-phy.yaml | 32 description: USB OTG PHY bus clock 39 description: USB OTG reset 46 description: GPIO to the USB OTG ID pin 50 description: GPIO to the USB OTG VBUS detect pin 53 description: Power supply to detect the USB OTG VBUS 56 description: Regulator controlling USB OTG VBUS
|
/linux/drivers/usb/musb/ |
H A D | mpfs.c | 65 musb->xceiv->otg->default_a = 1; in mpfs_musb_set_vbus() 66 musb->xceiv->otg->state = OTG_STATE_A_WAIT_VRISE; in mpfs_musb_set_vbus() 76 musb->xceiv->otg->default_a = 0; in mpfs_musb_set_vbus() 77 musb->xceiv->otg->state = OTG_STATE_B_IDLE; in mpfs_musb_set_vbus() 86 usb_otg_state_string(musb->xceiv->otg->state), in mpfs_musb_set_vbus() 101 * We poll because PolarFire SoC won't expose several OTG-critical in otg_timer() 106 usb_otg_state_string(musb->xceiv->otg->state)); in otg_timer() 109 switch (musb->xceiv->otg->state) { in otg_timer() 116 musb->xceiv->otg->state = OTG_STATE_B_IDLE; in otg_timer() 120 musb->xceiv->otg->state = OTG_STATE_A_IDLE; in otg_timer() [all …]
|
H A D | tusb6010.c | 3 * TUSB6010 USB 2.0 OTG Dual Role controller 324 /* This is used by gadget drivers, and OTG transceiver logic, allowing 346 if (x->otg->default_a || mA < (musb->min_power << 1)) in tusb_draw_power() 465 switch (musb->xceiv->otg->state) { in musb_do_idle() 471 usb_otg_state_string(musb->xceiv->otg->state)); in musb_do_idle() 525 && (musb->xceiv->otg->state == OTG_STATE_A_WAIT_BCON))) { in tusb_musb_try_idle() 527 usb_otg_state_string(musb->xceiv->otg->state)); in tusb_musb_try_idle() 544 usb_otg_state_string(musb->xceiv->otg->state), in tusb_musb_try_idle() 561 struct usb_otg *otg = musb->xceiv->otg; in tusb_musb_set_vbus() local 574 otg->default_a = 1; in tusb_musb_set_vbus() [all …]
|
/linux/drivers/usb/core/ |
H A D | Kconfig | 43 no more than 30 seconds (as required by the USB OTG spec). 60 bool "OTG support" 63 The most notable feature of USB OTG is support for a 73 bool "Rely on OTG and EH Targeted Peripherals List" 79 USB OTG and EH specification for all devices not on your product's 88 external hubs. OTG hosts are allowed to reduce hardware 90 are "Embedded Hosts" that don't offer OTG support. 93 tristate "USB 2.0 OTG FSM implementation" 97 Implements OTG Finite State Machine as specified in On-The-Go
|