~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/linux/usb/tegra_usb_phy.h

Version: ~ [ linux-6.11-rc3 ] ~ [ linux-6.10.4 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.45 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.104 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.164 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.223 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.281 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.319 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 // SPDX-License-Identifier: GPL-2.0
  2 /*
  3  * Copyright (C) 2010 Google, Inc.
  4  */
  5 
  6 #ifndef __TEGRA_USB_PHY_H
  7 #define __TEGRA_USB_PHY_H
  8 
  9 #include <linux/clk.h>
 10 #include <linux/regmap.h>
 11 #include <linux/reset.h>
 12 #include <linux/usb/otg.h>
 13 
 14 struct gpio_desc;
 15 
 16 /*
 17  * utmi_pll_config_in_car_module: true if the UTMI PLL configuration registers
 18  *     should be set up by clk-tegra, false if by the PHY code
 19  * has_hostpc: true if the USB controller has the HOSTPC extension, which
 20  *     changes the location of the PHCD and PTS fields
 21  * requires_usbmode_setup: true if the USBMODE register needs to be set to
 22  *      enter host mode
 23  * requires_extra_tuning_parameters: true if xcvr_hsslew, hssquelch_level
 24  *      and hsdiscon_level should be set for adequate signal quality
 25  * requires_pmc_ao_power_up: true if USB AO is powered down by default
 26  */
 27 
 28 struct tegra_phy_soc_config {
 29         bool utmi_pll_config_in_car_module;
 30         bool has_hostpc;
 31         bool requires_usbmode_setup;
 32         bool requires_extra_tuning_parameters;
 33         bool requires_pmc_ao_power_up;
 34 };
 35 
 36 struct tegra_utmip_config {
 37         u8 hssync_start_delay;
 38         u8 elastic_limit;
 39         u8 idle_wait_delay;
 40         u8 term_range_adj;
 41         bool xcvr_setup_use_fuses;
 42         u8 xcvr_setup;
 43         u8 xcvr_lsfslew;
 44         u8 xcvr_lsrslew;
 45         u8 xcvr_hsslew;
 46         u8 hssquelch_level;
 47         u8 hsdiscon_level;
 48 };
 49 
 50 enum tegra_usb_phy_port_speed {
 51         TEGRA_USB_PHY_PORT_SPEED_FULL = 0,
 52         TEGRA_USB_PHY_PORT_SPEED_LOW,
 53         TEGRA_USB_PHY_PORT_SPEED_HIGH,
 54 };
 55 
 56 struct tegra_xtal_freq;
 57 
 58 struct tegra_usb_phy {
 59         int irq;
 60         int instance;
 61         const struct tegra_xtal_freq *freq;
 62         void __iomem *regs;
 63         void __iomem *pad_regs;
 64         struct clk *clk;
 65         struct clk *pll_u;
 66         struct clk *pad_clk;
 67         struct regulator *vbus;
 68         struct regmap *pmc_regmap;
 69         enum usb_dr_mode mode;
 70         void *config;
 71         const struct tegra_phy_soc_config *soc_config;
 72         struct usb_phy *ulpi;
 73         struct usb_phy u_phy;
 74         bool is_legacy_phy;
 75         bool is_ulpi_phy;
 76         struct gpio_desc *reset_gpio;
 77         struct reset_control *pad_rst;
 78         bool wakeup_enabled;
 79         bool pad_wakeup;
 80         bool powered_on;
 81 };
 82 
 83 void tegra_usb_phy_preresume(struct usb_phy *phy);
 84 
 85 void tegra_usb_phy_postresume(struct usb_phy *phy);
 86 
 87 void tegra_ehci_phy_restore_start(struct usb_phy *phy,
 88                                  enum tegra_usb_phy_port_speed port_speed);
 89 
 90 void tegra_ehci_phy_restore_end(struct usb_phy *phy);
 91 
 92 #endif /* __TEGRA_USB_PHY_H */
 93 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php