/openbmc/linux/drivers/usb/common/ |
H A D | ulpi.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * ulpi.c - USB ULPI PHY bus 10 #include <linux/ulpi/interface.h> 11 #include <linux/ulpi/driver.h> 12 #include <linux/ulpi/regs.h> 19 #include <linux/clk/clk-conf.h> 21 /* -------------------------------------------------------------------------- */ 23 int ulpi_read(struct ulpi *ulpi, u8 addr) in ulpi_read() argument 25 return ulpi->ops->read(ulpi->dev.parent, addr); in ulpi_read() 29 int ulpi_write(struct ulpi *ulpi, u8 addr, u8 val) in ulpi_write() argument [all …]
|
/openbmc/u-boot/drivers/usb/ulpi/ |
H A D | ulpi.c | 1 // SPDX-License-Identifier: GPL-2.0+ 10 * linux/drivers/usb/otg/ulpi.c 11 * Generic ULPI USB transceiver support 24 #include <usb/ulpi.h> 27 #define ULPI_TEST_VALUE 0x55 /* 0x55 == 0b01010101 */ 29 static struct ulpi_regs *ulpi = (struct ulpi_regs *)0; variable 37 for (i = 0; i < 2; i++, tval <<= 1) { in ulpi_integrity_check() 38 err = ulpi_write(ulpi_vp, &ulpi->scratch, tval); in ulpi_integrity_check() 42 val = ulpi_read(ulpi_vp, &ulpi->scratch); in ulpi_integrity_check() 44 printf("ULPI integrity check failed\n"); in ulpi_integrity_check() [all …]
|
H A D | ulpi-viewport.c | 1 // SPDX-License-Identifier: GPL-2.0 18 #include <usb/ulpi.h> 20 /* ULPI viewport control bits */ 27 * Wait for the ULPI request to complete 29 * @ulpi_viewport - the address of the viewport 30 * @mask - expected value to wait for 32 * returns 0 on mask match, ULPI_ERROR on time out. 39 while (--timeout) { in ulpi_wait() 40 if ((readl(ulpi_vp->viewport_addr) & mask) == 0) in ulpi_wait() 41 return 0; in ulpi_wait() [all …]
|
H A D | omap-ulpi-viewport.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * OMAP ulpi viewport support 4 * Based on drivers/usb/ulpi/ulpi-viewport.c 6 * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com 12 #include <usb/ulpi.h> 19 * Wait for having ulpi in done state 25 while (--timeout) { in ulpi_wait() 26 if (!(readl(ulpi_vp->viewport_addr) & mask)) in ulpi_wait() 27 return 0; in ulpi_wait() 36 * Issue a ULPI read/write request [all …]
|
/openbmc/linux/drivers/phy/qualcomm/ |
H A D | phy-qcom-usb-hsic.c | 1 // SPDX-License-Identifier: GPL-2.0-only 6 #include <linux/ulpi/driver.h> 7 #include <linux/ulpi/regs.h> 10 #include <linux/pinctrl/pinctrl-state.h> 14 #define ULPI_HSIC_CFG 0x30 15 #define ULPI_HSIC_IO_CAL 0x33 18 struct ulpi *ulpi; member 29 struct ulpi *ulpi = uphy->ulpi; in qcom_usb_hsic_phy_power_on() local 33 ret = clk_prepare_enable(uphy->phy_clk); in qcom_usb_hsic_phy_power_on() 37 ret = clk_prepare_enable(uphy->cal_clk); in qcom_usb_hsic_phy_power_on() [all …]
|
H A D | phy-qcom-usb-hs.c | 1 // SPDX-License-Identifier: GPL-2.0-only 6 #include <linux/ulpi/driver.h> 7 #include <linux/ulpi/regs.h> 16 #define ULPI_PWR_CLK_MNG_REG 0x88 17 # define ULPI_PWR_OTG_COMP_DISABLE BIT(0) 19 #define ULPI_MISC_A 0x96 21 # define ULPI_MISC_A_VBUSVLDEXT BIT(0) 30 struct ulpi *ulpi; member 49 if (!uphy->vbus_edev) { in qcom_usb_hs_phy_set_mode() 50 u8 val = 0; in qcom_usb_hs_phy_set_mode() [all …]
|
/openbmc/linux/drivers/phy/ti/ |
H A D | phy-tusb1210.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * tusb1210.c - TUSB1210 USB ULPI PHY driver 12 #include <linux/ulpi/driver.h> 13 #include <linux/ulpi/regs.h> 20 #define TUSB1211_POWER_CONTROL 0x3d 21 #define TUSB1211_POWER_CONTROL_SET 0x3e 22 #define TUSB1211_POWER_CONTROL_CLEAR 0x3f 23 #define TUSB1211_POWER_CONTROL_SW_CONTROL BIT(0) 27 #define TUSB1210_VENDOR_SPECIFIC2 0x80 28 #define TUSB1210_VENDOR_SPECIFIC2_IHSTX_MASK GENMASK(3, 0) [all …]
|
/openbmc/linux/drivers/usb/dwc3/ |
H A D | ulpi.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * ulpi.c - DesignWare USB3 Controller's ULPI PHY interface 12 #include <linux/ulpi/regs.h> 36 reg = dwc3_readl(dwc->regs, DWC3_GUSB2PHYCFG(0)); in dwc3_ulpi_busyloop() 40 while (count--) { in dwc3_ulpi_busyloop() 42 reg = dwc3_readl(dwc->regs, DWC3_GUSB2PHYACC(0)); in dwc3_ulpi_busyloop() 44 return 0; in dwc3_ulpi_busyloop() 48 return -ETIMEDOUT; in dwc3_ulpi_busyloop() 58 dwc3_writel(dwc->regs, DWC3_GUSB2PHYACC(0), reg); in dwc3_ulpi_read() 64 reg = dwc3_readl(dwc->regs, DWC3_GUSB2PHYACC(0)); in dwc3_ulpi_read() [all …]
|
/openbmc/linux/drivers/usb/chipidea/ |
H A D | ulpi.c | 1 // SPDX-License-Identifier: GPL-2.0 8 #include <linux/ulpi/interface.h> 23 while (usec--) { in ci_ulpi_wait() 25 return 0; in ci_ulpi_wait() 30 return -ETIMEDOUT; in ci_ulpi_wait() 38 hw_write(ci, OP_ULPI_VIEWPORT, 0xffffffff, ULPI_WRITE | ULPI_WAKEUP); in ci_ulpi_read() 43 hw_write(ci, OP_ULPI_VIEWPORT, 0xffffffff, ULPI_RUN | ULPI_ADDR(addr)); in ci_ulpi_read() 56 hw_write(ci, OP_ULPI_VIEWPORT, 0xffffffff, ULPI_WRITE | ULPI_WAKEUP); in ci_ulpi_write() 61 hw_write(ci, OP_ULPI_VIEWPORT, 0xffffffff, in ci_ulpi_write() 68 if (ci->platdata->phy_mode != USBPHY_INTERFACE_MODE_ULPI) in ci_ulpi_init() [all …]
|
/openbmc/u-boot/drivers/usb/host/ |
H A D | ehci-zynq.c | 1 // SPDX-License-Identifier: GPL-2.0+ 14 #include <usb/ehci-ci.h> 15 #include <usb/ulpi.h> 28 priv->ehci = (struct usb_ehci *)devfdt_get_addr_ptr(dev); in ehci_zynq_ofdata_to_platdata() 29 if (!priv->ehci) in ehci_zynq_ofdata_to_platdata() 30 return -EINVAL; in ehci_zynq_ofdata_to_platdata() 32 return 0; in ehci_zynq_ofdata_to_platdata() 42 /* Used for writing the ULPI data address */ in ehci_zynq_probe() 43 struct ulpi_regs *ulpi = (struct ulpi_regs *)0; in ehci_zynq_probe() local 46 hccr = (struct ehci_hccr *)((uint32_t)&priv->ehci->caplength); in ehci_zynq_probe() [all …]
|
H A D | ehci-tegra.c | 1 // SPDX-License-Identifier: GPL-2.0+ 4 * Copyright (c) 2009-2015 NVIDIA Corporation 12 #include <asm-generic/gpio.h> 14 #include <asm/arch-tegra/usb.h> 15 #include <asm/arch-tegra/clk_rst.h> 17 #include <usb/ulpi.h> 22 #define USB1_ADDR_MASK 0xFFFF0000 24 #define HOSTPC1_DEVLC 0x84 25 #define HOSTPC1_PSPD(x) (((x) >> 25) & 0x3) 41 PARAM_ENABLE_DELAY_COUNT, /* PLL-U Enable Delay Count */ [all …]
|
H A D | ehci-mx5.c | 1 // SPDX-License-Identifier: GPL-2.0+ 11 #include <usb/ehci-ci.h> 13 #include <asm/arch/imx-regs.h> 18 #define MX5_USBOTHER_REGS_OFFSET 0x800 21 #define MXC_OTG_OFFSET 0 22 #define MXC_H1_OFFSET 0x200 23 #define MXC_H2_OFFSET 0x400 24 #define MXC_H3_OFFSET 0x600 26 #define MXC_USBCTRL_OFFSET 0 27 #define MXC_USB_PHY_CTR_FUNC_OFFSET 0x8 [all …]
|
/openbmc/linux/drivers/usb/phy/ |
H A D | phy-ulpi.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 * Generic ULPI USB transceiver support 18 #include <linux/usb/ulpi.h> 33 /* ULPI hardcoded IDs, used for probing */ 35 ULPI_INFO(ULPI_ID(0x04cc, 0x1504), "NXP ISP1504"), 36 ULPI_INFO(ULPI_ID(0x0424, 0x0006), "SMSC USB331x"), 37 ULPI_INFO(ULPI_ID(0x0424, 0x0007), "SMSC USB3320"), 38 ULPI_INFO(ULPI_ID(0x0424, 0x0009), "SMSC USB334x"), 39 ULPI_INFO(ULPI_ID(0x0451, 0x1507), "TI TUSB1210"), 47 if (phy->flags & ULPI_OTG_ID_PULLUP) in ulpi_set_otg_flags() [all …]
|
/openbmc/u-boot/include/usb/ |
H A D | ulpi.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 3 * Generic ULPI interface. 12 * linux/include/linux/usb/ulpi.h 28 * ulpi view port address and 39 * Initialize the ULPI transciever and check the interface integrity. 40 * @ulpi_vp - structure containing ULPI viewport data 42 * returns 0 on success, ULPI_ERROR on failure. 48 * @speed - ULPI_FC_HIGH_SPEED, ULPI_FC_FULL_SPEED (default), 50 * returns 0 on success, ULPI_ERROR on failure. 56 * @ext_power - external VBUS supply is used (default is false) [all …]
|
/openbmc/u-boot/arch/arm/mach-tegra/tegra114/ |
H A D | pinmux.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 * Copyright (c) 2010-2014, NVIDIA CORPORATION. All rights reserved. 24 /* Offset 0x3000 */ 25 PIN(ULPI_DATA0_PO1, SPI3, HSI, UARTA, ULPI), 26 PIN(ULPI_DATA1_PO2, SPI3, HSI, UARTA, ULPI), 27 PIN(ULPI_DATA2_PO3, SPI3, HSI, UARTA, ULPI), 28 PIN(ULPI_DATA3_PO4, SPI3, HSI, UARTA, ULPI), 29 PIN(ULPI_DATA4_PO5, SPI2, HSI, UARTA, ULPI), 30 PIN(ULPI_DATA5_PO6, SPI2, HSI, UARTA, ULPI), 31 PIN(ULPI_DATA6_PO7, SPI2, HSI, UARTA, ULPI), [all …]
|
/openbmc/u-boot/arch/arm/mach-tegra/tegra124/ |
H A D | pinmux.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 * Copyright (c) 2013-2014, NVIDIA CORPORATION. All rights reserved. 24 /* Offset 0x3000 */ 25 PIN(ULPI_DATA0_PO1, SPI3, HSI, UARTA, ULPI), 26 PIN(ULPI_DATA1_PO2, SPI3, HSI, UARTA, ULPI), 27 PIN(ULPI_DATA2_PO3, SPI3, HSI, UARTA, ULPI), 28 PIN(ULPI_DATA3_PO4, SPI3, HSI, UARTA, ULPI), 29 PIN(ULPI_DATA4_PO5, SPI2, HSI, UARTA, ULPI), 30 PIN(ULPI_DATA5_PO6, SPI2, HSI, UARTA, ULPI), 31 PIN(ULPI_DATA6_PO7, SPI2, HSI, UARTA, ULPI), [all …]
|
/openbmc/linux/drivers/phy/tegra/ |
H A D | xusb-tegra124.c | 1 // SPDX-License-Identifier: GPL-2.0-only 21 #define FUSE_SKU_CALIB_HS_CURR_LEVEL_PADX_SHIFT(x) ((x) ? 15 : 0) 22 #define FUSE_SKU_CALIB_HS_CURR_LEVEL_PAD_MASK 0x3f 24 #define FUSE_SKU_CALIB_HS_IREF_CAP_MASK 0x3 26 #define FUSE_SKU_CALIB_HS_SQUELCH_LEVEL_MASK 0x3 28 #define FUSE_SKU_CALIB_HS_TERM_RANGE_ADJ_MASK 0xf 30 #define XUSB_PADCTL_USB2_PORT_CAP 0x008 32 #define XUSB_PADCTL_USB2_PORT_CAP_PORT_CAP_MASK 0x3 33 #define XUSB_PADCTL_USB2_PORT_CAP_DISABLED 0x0 34 #define XUSB_PADCTL_USB2_PORT_CAP_HOST 0x1 [all …]
|
H A D | xusb.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Copyright (c) 2014-2022, NVIDIA CORPORATION. All rights reserved. 31 if (args->args_count != 0) in tegra_xusb_pad_of_xlate() 32 return ERR_PTR(-EINVAL); in tegra_xusb_pad_of_xlate() 34 for (i = 0; i < pad->soc->num_lanes; i++) { in tegra_xusb_pad_of_xlate() 35 if (!pad->lanes[i]) in tegra_xusb_pad_of_xlate() 38 if (pad->lanes[i]->dev.of_node == args->np) { in tegra_xusb_pad_of_xlate() 39 phy = pad->lanes[i]; in tegra_xusb_pad_of_xlate() 45 phy = ERR_PTR(-ENODEV); in tegra_xusb_pad_of_xlate() 53 .compatible = "nvidia,tegra124-xusb-padctl", [all …]
|
/openbmc/linux/include/linux/mfd/ |
H A D | motorola-cpcap.h | 1 /* SPDX-License-Identifier: GPL-2.0-only */ 6 * Copyright (C) 2007-2009 Motorola, Inc. 17 #define CPCAP_VENDOR_ST 0 21 #define CPCAP_REVISION_MINOR(r) ((r) & 0xf) 23 #define CPCAP_REVISION_1_0 0x08 24 #define CPCAP_REVISION_1_1 0x09 25 #define CPCAP_REVISION_2_0 0x10 26 #define CPCAP_REVISION_2_1 0x11 29 #define CPCAP_REG_INT1 0x0000 /* Interrupt 1 */ 30 #define CPCAP_REG_INT2 0x0004 /* Interrupt 2 */ [all …]
|
/openbmc/linux/Documentation/devicetree/bindings/phy/ |
H A D | nvidia,tegra20-usb-phy.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/phy/nvidia,tegra20-usb-phy.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Dmitry Osipenko <digetx@gmail.com> 11 - Jon Hunter <jonathanh@nvidia.com> 12 - Thierry Reding <thierry.reding@gmail.com> 17 - items: 18 - enum: 19 - nvidia,tegra124-usb-phy [all …]
|
/openbmc/u-boot/drivers/phy/ |
H A D | msm8916-usbh-phy.c | 1 // SPDX-License-Identifier: GPL-2.0+ 8 #include <generic-phy.h> 9 #include <usb/ehci-ci.h> 10 #include <usb/ulpi.h> 14 #define ULPI_MISC_A_READ 0x96 15 #define ULPI_MISC_A_SET 0x97 16 #define ULPI_MISC_A_CLEAR 0x98 17 #define ULPI_MISC_A_VBUSVLDEXT BIT(0) 25 struct ulpi_viewport ulpi_vp; /* ULPI Viewport */ 30 struct msm_phy_priv *priv = dev_get_priv(phy->dev); in msm_phy_power_on() [all …]
|
/openbmc/linux/Documentation/devicetree/bindings/usb/ |
H A D | fsl-usb.txt | 9 - compatible : Should be "fsl-usb2-mph" for multi port host USB 10 controllers, or "fsl-usb2-dr" for dual role USB controllers 11 or "fsl,mpc5121-usb2-dr" for dual role USB controllers of MPC5121. 13 also be mentioned (for eg. fsl-usb2-dr-v2.2 for bsc9132). 14 - phy_type : For multi port host USB controllers, should be one of 15 "ulpi", or "serial". For dual role USB controllers, should be 16 one of "ulpi", "utmi", "utmi_wide", or "serial". 17 - reg : Offset and length of the register set for the device 18 - port0 : boolean; if defined, indicates port0 is connected for 19 fsl-usb2-mph compatible controllers. Either this property or [all …]
|
H A D | snps,dwc3.yaml | 1 # SPDX-License-Identifier: GPL-2.0 3 --- 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Felipe Balbi <balbi@kernel.org> 14 be presented as a standalone DT node with an optional vendor-specific 18 - $ref: usb-drd.yaml# 19 - if: 25 - dr_mode 29 $ref: usb-xhci.yaml# 35 - const: snps,dwc3 [all …]
|
/openbmc/linux/arch/powerpc/platforms/83xx/ |
H A D | usb_831x.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 28 int ret = 0; in mpc831x_usb_cfg() 33 np = of_find_compatible_node(NULL, NULL, "fsl-usb2-dr"); in mpc831x_usb_cfg() 35 return -ENODEV; in mpc831x_usb_cfg() 39 immap = ioremap(get_immrbase(), 0x1000); in mpc831x_usb_cfg() 42 return -ENOMEM; in mpc831x_usb_cfg() 47 if (immr_node && (of_device_is_compatible(immr_node, "fsl,mpc8315-immr") || in mpc831x_usb_cfg() 48 of_device_is_compatible(immr_node, "fsl,mpc8308-immr"))) in mpc831x_usb_cfg() 57 /* Configure pin mux for ULPI. There is no pin mux for UTMI */ in mpc831x_usb_cfg() 58 if (prop && !strcmp(prop, "ulpi")) { in mpc831x_usb_cfg() [all …]
|
/openbmc/linux/include/linux/usb/ |
H A D | ulpi.h | 1 // SPDX-License-Identifier: GPL-2.0 3 * ulpi.h -- ULPI defines and function prorotypes 12 #include <linux/ulpi/regs.h> 14 /*-------------------------------------------------------------------------*/ 17 * ULPI Flags 19 #define ULPI_OTG_ID_PULLUP (1 << 0) 49 /*-------------------------------------------------------------------------*/
|