/openbmc/linux/include/linux/phy/ |
H A D | phy.h | 3 * phy.h -- generic phy header file 19 #include <linux/phy/phy-dp.h> 20 #include <linux/phy/phy-lvds.h> 21 #include <linux/phy/phy-mipi-dphy.h> 23 struct phy; 55 * union phy_configure_opts - Opaque generic phy configuration 58 * the MIPI_DPHY phy mode. 62 * the LVDS phy mode. 71 * struct phy_ops - set of function pointers for performing phy operations 72 * @init: operation to be performed for initializing phy [all …]
|
/openbmc/linux/drivers/phy/ |
H A D | phy-core.c | 3 * phy-core.c -- Generic Phy framework. 18 #include <linux/phy/phy.h> 32 struct phy *phy = *(struct phy **)res; in devm_phy_release() local 34 phy_put(dev, phy); in devm_phy_release() 46 struct phy *phy in devm_phy_consume() local 53 struct phy **phy = res; devm_phy_match() local 66 phy_create_lookup(struct phy * phy,const char * con_id,const char * dev_id) phy_create_lookup() argument 98 phy_remove_lookup(struct phy * phy,const char * con_id,const char * dev_id) phy_remove_lookup() argument 150 phy_pm_runtime_get(struct phy * phy) phy_pm_runtime_get() argument 168 phy_pm_runtime_get_sync(struct phy * phy) phy_pm_runtime_get_sync() argument 186 phy_pm_runtime_put(struct phy * phy) phy_pm_runtime_put() argument 198 phy_pm_runtime_put_sync(struct phy * phy) phy_pm_runtime_put_sync() argument 210 phy_pm_runtime_allow(struct phy * phy) phy_pm_runtime_allow() argument 222 phy_pm_runtime_forbid(struct phy * phy) phy_pm_runtime_forbid() argument 245 phy_init(struct phy * phy) phy_init() argument 285 phy_exit(struct phy * phy) phy_exit() argument 322 phy_power_on(struct phy * phy) phy_power_on() argument 372 phy_power_off(struct phy * phy) phy_power_off() argument 399 phy_set_mode_ext(struct phy * phy,enum phy_mode mode,int submode) phy_set_mode_ext() argument 416 phy_set_media(struct phy * phy,enum phy_media media) phy_set_media() argument 431 phy_set_speed(struct phy * phy,int speed) phy_set_speed() argument 446 phy_reset(struct phy * phy) phy_reset() argument 477 phy_calibrate(struct phy * phy) phy_calibrate() argument 503 phy_configure(struct phy * phy,union phy_configure_opts * opts) phy_configure() argument 537 phy_validate(struct phy * phy,enum phy_mode mode,int submode,union phy_configure_opts * opts) phy_validate() argument 571 struct phy *phy = NULL; _of_phy_get() local 619 struct phy *phy = NULL; of_phy_get() local 644 of_phy_put(struct phy * phy) of_phy_put() argument 666 phy_put(struct device * dev,struct phy * phy) phy_put() argument 681 devm_phy_put(struct device * dev,struct phy * phy) devm_phy_put() argument 706 struct phy *phy; of_phy_simple_xlate() local 737 struct phy *phy; phy_get() local 783 struct phy **ptr, *phy; devm_phy_get() local 816 struct phy *phy = devm_phy_get(dev, string); devm_phy_optional_get() local 838 struct phy **ptr, *phy; devm_of_phy_get() local 880 struct phy *phy = devm_of_phy_get(dev, np, con_id); devm_of_phy_optional_get() local 908 struct phy **ptr, *phy; devm_of_phy_get_by_index() local 953 struct phy *phy; phy_create() local 1029 struct phy **ptr, *phy; devm_phy_create() local 1053 phy_destroy(struct phy * phy) phy_destroy() argument 1068 devm_phy_destroy(struct device * dev,struct phy * phy) devm_phy_destroy() argument 1229 struct phy *phy; phy_release() local [all...] |
H A D | Kconfig | 3 # PHY 6 menu "PHY Subsystem" 9 bool "PHY Core" 11 Generic PHY support. 13 This framework is designed to provide a generic interface for PHY 15 API by which phy drivers can create PHY using the phy framework and 16 phy users can obtain reference to the PHY. All the users of this 23 Generic MIPI D-PHY support. 25 Provides a number of helpers a core functions for MIPI D-PHY 29 tristate "NXP LPC18xx/43xx SoC USB OTG PHY driver" [all …]
|
/openbmc/u-boot/include/ |
H A D | generic-phy.h | 13 * struct phy - A handle to (allowing control of) a single phy port. 15 * Clients provide storage for phy handles. The content of the structure is 16 * managed solely by the PHY API and PHY drivers. A phy struct is 17 * initialized by "get"ing the phy struct. The phy struct is passed to all 18 * other phy APIs to identify which PHY port to operate upon. 20 * @dev: The device which implements the PHY port. 21 * @id: The PHY ID within the provider. 24 struct phy { struct 30 * struct udevice_ops - set of function pointers for phy operations argument 31 * @init: operation to be performed for initializing phy (optional) [all …]
|
/openbmc/u-boot/drivers/phy/ |
H A D | Kconfig | 2 menu "PHY Subsystem" 4 config PHY config 5 bool "PHY Core" 8 PHY support. 10 This framework is designed to provide a generic interface for PHY 11 devices. PHY devices are dedicated hardware that handle the physical 16 PHY, power on/off the PHY, and reset the PHY. It's meant to be as 21 bool "PHY Core in SPL" 24 PHY support in SPL. 26 This framework is designed to provide a generic interface for PHY [all …]
|
/openbmc/linux/drivers/scsi/libsas/ |
H A D | sas_phy.c | 3 * Serial Attached SCSI (SAS) Phy class 15 /* ---------- Phy events ---------- */ 20 struct asd_sas_phy *phy = ev->phy; in sas_phye_loss_of_signal() local 22 phy->error = 0; in sas_phye_loss_of_signal() 23 sas_deform_port(phy, 1); in sas_phye_loss_of_signal() 29 struct asd_sas_phy *phy = ev->phy; in sas_phye_oob_done() local 31 phy->error = 0; in sas_phye_oob_done() 37 struct asd_sas_phy *phy = ev->phy; in sas_phye_oob_error() local 38 struct sas_ha_struct *sas_ha = phy->ha; in sas_phye_oob_error() 39 struct asd_sas_port *port = phy->port; in sas_phye_oob_error() [all …]
|
/openbmc/linux/drivers/net/ |
H A D | sungem_phy.c | 3 * PHY drivers for the sungem ethernet driver. 35 /* Link modes of the BCM5400 PHY */ 47 static inline int __sungem_phy_read(struct mii_phy* phy, int id, int reg) in __sungem_phy_read() argument 49 return phy->mdio_read(phy->dev, id, reg); in __sungem_phy_read() 52 static inline void __sungem_phy_write(struct mii_phy* phy, int id, int reg, int val) in __sungem_phy_write() argument 54 phy->mdio_write(phy->dev, id, reg, val); in __sungem_phy_write() 57 static inline int sungem_phy_read(struct mii_phy* phy, int reg) in sungem_phy_read() argument 59 return phy->mdio_read(phy->dev, phy->mii_id, reg); in sungem_phy_read() 62 static inline void sungem_phy_write(struct mii_phy* phy, int reg, int val) in sungem_phy_write() argument 64 phy->mdio_write(phy->dev, phy->mii_id, reg, val); in sungem_phy_write() [all …]
|
/openbmc/linux/drivers/net/ethernet/ibm/emac/ |
H A D | phy.c | 3 * drivers/net/ethernet/ibm/emac/phy.c 5 * Driver for PowerPC 4xx on-chip ethernet controller, PHY support. 30 #include "phy.h" 35 static inline int _phy_read(struct mii_phy *phy, int reg) in _phy_read() argument 37 return phy->mdio_read(phy->dev, phy->address, reg); in _phy_read() 40 static inline void _phy_write(struct mii_phy *phy, int reg, int val) in _phy_write() argument 42 phy->mdio_write(phy->dev, phy->address, reg, val); in _phy_write() 45 static inline int gpcs_phy_read(struct mii_phy *phy, int reg) in gpcs_phy_read() argument 47 return phy->mdio_read(phy->dev, phy->gpcs_address, reg); in gpcs_phy_read() 50 static inline void gpcs_phy_write(struct mii_phy *phy, int reg, int val) in gpcs_phy_write() argument [all …]
|
/openbmc/linux/drivers/phy/hisilicon/ |
H A D | phy-hi3670-pcie.c | 3 * PCIe phy driver for Kirin 970 25 #include <linux/phy/phy.h> 44 /* PCIe PHY registers */ 168 static inline void hi3670_apb_phy_writel(struct hi3670_pcie_phy *phy, u32 val, in hi3670_apb_phy_writel() argument 171 writel(val, phy->base + APB_PHY_START_ADDR + reg); in hi3670_apb_phy_writel() 174 static inline u32 hi3670_apb_phy_readl(struct hi3670_pcie_phy *phy, u32 reg) in hi3670_apb_phy_readl() argument 176 return readl(phy->base + APB_PHY_START_ADDR + reg); in hi3670_apb_phy_readl() 179 static inline void hi3670_apb_phy_updatel(struct hi3670_pcie_phy *phy, in hi3670_apb_phy_updatel() argument 184 regval = hi3670_apb_phy_readl(phy, reg); in hi3670_apb_phy_updatel() 187 hi3670_apb_phy_writel(phy, regval, reg); in hi3670_apb_phy_updatel() [all …]
|
/openbmc/linux/drivers/net/phy/ |
H A D | phy_led_triggers.c | 4 #include <linux/phy.h> 8 static struct phy_led_trigger *phy_speed_to_led_trigger(struct phy_device *phy, in phy_speed_to_led_trigger() argument 13 for (i = 0; i < phy->phy_num_led_triggers; i++) { in phy_speed_to_led_trigger() 14 if (phy->phy_led_triggers[i].speed == speed) in phy_speed_to_led_trigger() 15 return &phy->phy_led_triggers[i]; in phy_speed_to_led_trigger() 20 static void phy_led_trigger_no_link(struct phy_device *phy) in phy_led_trigger_no_link() argument 22 if (phy->last_triggered) { in phy_led_trigger_no_link() 23 led_trigger_event(&phy->last_triggered->trigger, LED_OFF); in phy_led_trigger_no_link() 24 led_trigger_event(&phy->led_link_trigger->trigger, LED_OFF); in phy_led_trigger_no_link() 25 phy->last_triggered = NULL; in phy_led_trigger_no_link() [all …]
|
/openbmc/linux/Documentation/driver-api/phy/ |
H A D | phy.rst | 2 PHY subsystem 7 This document explains the Generic PHY Framework along with the APIs provided, 13 *PHY* is the abbreviation for physical layer. It is used to connect a device 14 to the physical medium e.g., the USB controller has a PHY to provide functions 17 controllers have PHY functionality embedded into it and others use an external 18 PHY. Other peripherals that use PHY include Wireless LAN, Ethernet, 21 The intention of creating this framework is to bring the PHY drivers spread 22 all over the Linux kernel to drivers/phy to increase code re-use and for 25 This framework will be of use only to devices that use external PHY (PHY 28 Registering/Unregistering the PHY provider [all …]
|
/openbmc/linux/drivers/phy/ti/ |
H A D | phy-dm816x-usb.c | 15 #include <linux/phy/phy.h> 23 * phy as being SR70LX Synopsys USB 2.0 OTG nanoPHY. It also seems at 33 * Finally, the phy on dm814x and am335x is different from dm816x. 36 #define DM816X_USB_CTRL_PHYSLEEP1 BIT(1) /* Enable the first phy */ 37 #define DM816X_USB_CTRL_PHYSLEEP0 BIT(0) /* Enable the second phy */ 48 struct usb_phy phy; member 72 static int dm816x_usb_phy_init(struct phy *x) in dm816x_usb_phy_init() 74 struct dm816x_usb_phy *phy = phy_get_drvdata(x); in dm816x_usb_phy_init() local 77 if (clk_get_rate(phy->refclk) != 24000000) in dm816x_usb_phy_init() 78 dev_warn(phy->dev, "nonstandard phy refclk\n"); in dm816x_usb_phy_init() [all …]
|
H A D | phy-omap-usb2.c | 3 * omap-usb2.c - USB PHY, talking to USB controller on TI SoCs. 17 #include <linux/phy/omap_control_phy.h> 18 #include <linux/phy/omap_usb.h> 19 #include <linux/phy/phy.h> 54 struct usb_phy phy; member 70 #define phy_to_omapusb(x) container_of((x), struct omap_usb, phy) 92 * omap_usb2_set_comparator() - links the comparator present in the system with this phy 94 * @comparator: the companion phy(comparator) for this phy 96 * The phy companion driver should call this API passing the phy_companion 97 * filled with set_vbus and start_srp to be used by usb phy. [all …]
|
H A D | phy-ti-pipe3.c | 3 * phy-ti-pipe3 - PIPE3 PHY driver. 12 #include <linux/phy/phy.h> 19 #include <linux/phy/omap_control_phy.h> 299 static struct pipe3_dpll_params *ti_pipe3_get_dpll_params(struct ti_pipe3 *phy) in ti_pipe3_get_dpll_params() argument 302 struct pipe3_dpll_map *dpll_map = phy->dpll_map; in ti_pipe3_get_dpll_params() 304 rate = clk_get_rate(phy->sys_clk); in ti_pipe3_get_dpll_params() 311 dev_err(phy->dev, "No DPLL configuration for %lu Hz SYS CLK\n", rate); in ti_pipe3_get_dpll_params() 316 static int ti_pipe3_enable_clocks(struct ti_pipe3 *phy); 317 static void ti_pipe3_disable_clocks(struct ti_pipe3 *phy); 319 static int ti_pipe3_power_off(struct phy *x) in ti_pipe3_power_off() [all …]
|
/openbmc/linux/drivers/phy/ralink/ |
H A D | phy-ralink-usb.c | 17 #include <linux/phy/phy.h> 56 struct phy *phy; member 61 static void u2_phy_w32(struct ralink_usb_phy *phy, u32 val, u32 reg) in u2_phy_w32() argument 63 writel(val, phy->base + reg); in u2_phy_w32() 66 static u32 u2_phy_r32(struct ralink_usb_phy *phy, u32 reg) in u2_phy_r32() argument 68 return readl(phy->base + reg); in u2_phy_r32() 71 static void ralink_usb_phy_init(struct ralink_usb_phy *phy) in ralink_usb_phy_init() argument 73 u2_phy_r32(phy, OFS_U2_PHY_AC2); in ralink_usb_phy_init() 74 u2_phy_r32(phy, OFS_U2_PHY_ACR0); in ralink_usb_phy_init() 75 u2_phy_r32(phy, OFS_U2_PHY_DCR0); in ralink_usb_phy_init() [all …]
|
H A D | phy-mt7621-pci.c | 3 * Mediatek MT7621 PCI PHY Driver 7 #include <dt-bindings/phy/phy.h> 13 #include <linux/phy/phy.h> 66 * struct mt7621_pci_phy - Mt7621 Pcie PHY core 69 * @phy: pointer to the kernel PHY device 72 * @has_dual_port: if the phy has dual ports. 79 struct phy *phy; member 86 static inline void mt7621_phy_rmw(struct mt7621_pci_phy *phy, in mt7621_phy_rmw() argument 98 regmap_read(phy->regmap, reg, &val); in mt7621_phy_rmw() 101 regmap_write(phy->regmap, reg, val); in mt7621_phy_rmw() [all …]
|
/openbmc/linux/drivers/media/platform/ti/cal/ |
H A D | cal-camerarx.c | 33 static inline u32 camerarx_read(struct cal_camerarx *phy, u32 offset) in camerarx_read() argument 35 return ioread32(phy->base + offset); in camerarx_read() 38 static inline void camerarx_write(struct cal_camerarx *phy, u32 offset, u32 val) in camerarx_write() argument 40 iowrite32(val, phy->base + offset); in camerarx_write() 48 static s64 cal_camerarx_get_ext_link_freq(struct cal_camerarx *phy) in cal_camerarx_get_ext_link_freq() argument 50 struct v4l2_mbus_config_mipi_csi2 *mipi_csi2 = &phy->endpoint.bus.mipi_csi2; in cal_camerarx_get_ext_link_freq() 58 state = v4l2_subdev_get_locked_active_state(&phy->subdev); in cal_camerarx_get_ext_link_freq() 60 fmt = v4l2_subdev_get_pad_format(&phy->subdev, state, CAL_CAMERARX_PAD_SINK); in cal_camerarx_get_ext_link_freq() 68 freq = v4l2_get_link_freq(phy->source->ctrl_handler, bpp, 2 * num_lanes); in cal_camerarx_get_ext_link_freq() 70 phy_err(phy, "failed to get link freq for subdev '%s'\n", in cal_camerarx_get_ext_link_freq() [all …]
|
/openbmc/linux/drivers/gpu/drm/i915/display/ |
H A D | intel_combo_phy.c | 55 icl_get_procmon_ref_values(struct drm_i915_private *dev_priv, enum phy phy) in icl_get_procmon_ref_values() argument 59 val = intel_de_read(dev_priv, ICL_PORT_COMP_DW3(phy)); in icl_get_procmon_ref_values() 78 enum phy phy) in icl_set_procmon_ref_values() argument 82 procmon = icl_get_procmon_ref_values(dev_priv, phy); in icl_set_procmon_ref_values() 84 intel_de_rmw(dev_priv, ICL_PORT_COMP_DW1(phy), in icl_set_procmon_ref_values() 87 intel_de_write(dev_priv, ICL_PORT_COMP_DW9(phy), procmon->dw9); in icl_set_procmon_ref_values() 88 intel_de_write(dev_priv, ICL_PORT_COMP_DW10(phy), procmon->dw10); in icl_set_procmon_ref_values() 92 enum phy phy, i915_reg_t reg, u32 mask, in check_phy_reg() argument 99 "Combo PHY %c reg %08x state mismatch: " in check_phy_reg() 101 phy_name(phy), in check_phy_reg() [all …]
|
H A D | intel_combo_phy_regs.h | 17 #define _ICL_COMBOPHY(phy) _PICK(phy, _ICL_COMBOPHY_A, \ argument 24 #define _ICL_PORT_CL_DW(dw, phy) (_ICL_COMBOPHY(phy) + \ argument 27 #define ICL_PORT_CL_DW5(phy) _MMIO(_ICL_PORT_CL_DW(5, phy)) argument 31 #define ICL_PORT_CL_DW10(phy) _MMIO(_ICL_PORT_CL_DW(10, phy)) argument 48 #define ICL_PORT_CL_DW12(phy) _MMIO(_ICL_PORT_CL_DW(12, phy)) argument 53 #define _ICL_PORT_COMP_DW(dw, phy) (_ICL_COMBOPHY(phy) + \ argument 56 #define ICL_PORT_COMP_DW0(phy) _MMIO(_ICL_PORT_COMP_DW(0, phy)) argument 59 #define ICL_PORT_COMP_DW1(phy) _MMIO(_ICL_PORT_COMP_DW(1, phy)) argument 61 #define ICL_PORT_COMP_DW3(phy) _MMIO(_ICL_PORT_COMP_DW(3, phy)) argument 73 #define ICL_PORT_COMP_DW8(phy) _MMIO(_ICL_PORT_COMP_DW(8, phy)) argument [all …]
|
/openbmc/linux/drivers/phy/allwinner/ |
H A D | phy-sun9i-usb.c | 3 * Allwinner sun9i USB phy driver 7 * Based on phy-sun4i-usb.c from 18 #include <linux/phy/phy.h> 36 struct phy *phy; member 44 static void sun9i_usb_phy_passby(struct sun9i_usb_phy *phy, int enable) in sun9i_usb_phy_passby() argument 52 if (phy->type == USBPHY_INTERFACE_MODE_HSIC) in sun9i_usb_phy_passby() 56 reg_value = readl(phy->pmu); in sun9i_usb_phy_passby() 63 writel(reg_value, phy->pmu); in sun9i_usb_phy_passby() 66 static int sun9i_usb_phy_init(struct phy *_phy) in sun9i_usb_phy_init() 68 struct sun9i_usb_phy *phy = phy_get_drvdata(_phy); in sun9i_usb_phy_init() local [all …]
|
H A D | phy-sun50i-usb3.c | 3 * Allwinner sun50i(H6) USB 3.0 phy driver 7 * Based on phy-sun9i-usb.c, which is: 21 #include <linux/phy/phy.h> 38 /* PHY External Control Register */ 43 /* PHY Tune High Register */ 56 struct phy *phy; member 62 static void sun50i_usb3_phy_open(struct sun50i_usb3_phy *phy) in sun50i_usb3_phy_open() argument 66 val = readl(phy->regs + SUNXI_PHY_EXTERNAL_CONTROL); in sun50i_usb3_phy_open() 69 writel(val, phy->regs + SUNXI_PHY_EXTERNAL_CONTROL); in sun50i_usb3_phy_open() 71 val = readl(phy->regs + SUNXI_PIPE_CLOCK_CONTROL); in sun50i_usb3_phy_open() [all …]
|
/openbmc/linux/drivers/net/ethernet/intel/igb/ |
H A D | e1000_phy.c | 31 * igb_check_reset_block - Check if PHY reset is blocked 34 * Read the PHY management control register and check whether a PHY reset 48 * igb_get_phy_id - Retrieve the PHY ID and revision 51 * Reads the PHY registers and stores the PHY ID and possibly the PHY 56 struct e1000_phy_info *phy = &hw->phy; in igb_get_phy_id() local 60 /* ensure PHY page selection to fix misconfigured i210 */ in igb_get_phy_id() 62 phy->ops.write_reg(hw, I347AT4_PAGE_SELECT, 0); in igb_get_phy_id() 64 ret_val = phy->ops.read_reg(hw, PHY_ID1, &phy_id); in igb_get_phy_id() 68 phy->id = (u32)(phy_id << 16); in igb_get_phy_id() 70 ret_val = phy->ops.read_reg(hw, PHY_ID2, &phy_id); in igb_get_phy_id() [all …]
|
/openbmc/linux/arch/arm64/boot/dts/microchip/ |
H A D | sparx5_pcb135_board.dtsi | 212 phy0: ethernet-phy@0 { 215 phy1: ethernet-phy@1 { 218 phy2: ethernet-phy@2 { 221 phy3: ethernet-phy@3 { 224 phy4: ethernet-phy@4 { 227 phy5: ethernet-phy@5 { 230 phy6: ethernet-phy@6 { 233 phy7: ethernet-phy@7 { 236 phy8: ethernet-phy@8 { 239 phy9: ethernet-phy@9 { [all …]
|
/openbmc/linux/drivers/phy/samsung/ |
H A D | phy-samsung-ufs.c | 3 * UFS PHY driver for Samsung SoC 18 #include <linux/phy/phy.h> 22 #include "phy-samsung-ufs.h" 24 #define for_each_phy_lane(phy, i) \ argument 25 for (i = 0; i < (phy)->lane_cnt; i++) 31 static void samsung_ufs_phy_config(struct samsung_ufs_phy *phy, in samsung_ufs_phy_config() argument 39 writel(cfg->val, (phy)->reg_pma + cfg->off_0); in samsung_ufs_phy_config() 43 writel(cfg->val, (phy)->reg_pma + cfg->off_1); in samsung_ufs_phy_config() 48 static int samsung_ufs_phy_wait_for_lock_acq(struct phy *phy) in samsung_ufs_phy_wait_for_lock_acq() argument 50 struct samsung_ufs_phy *ufs_phy = get_samsung_ufs_phy(phy); in samsung_ufs_phy_wait_for_lock_acq() [all …]
|
/openbmc/linux/drivers/phy/qualcomm/ |
H A D | phy-qcom-ipq4019-usb.c | 17 #include <linux/phy/phy.h> 23 struct phy *phy; member 29 static int ipq4019_ss_phy_power_off(struct phy *_phy) in ipq4019_ss_phy_power_off() 31 struct ipq4019_usb_phy *phy = phy_get_drvdata(_phy); in ipq4019_ss_phy_power_off() local 33 reset_control_assert(phy->por_rst); in ipq4019_ss_phy_power_off() 39 static int ipq4019_ss_phy_power_on(struct phy *_phy) in ipq4019_ss_phy_power_on() 41 struct ipq4019_usb_phy *phy = phy_get_drvdata(_phy); in ipq4019_ss_phy_power_on() local 45 reset_control_deassert(phy->por_rst); in ipq4019_ss_phy_power_on() 55 static int ipq4019_hs_phy_power_off(struct phy *_phy) in ipq4019_hs_phy_power_off() 57 struct ipq4019_usb_phy *phy = phy_get_drvdata(_phy); in ipq4019_hs_phy_power_off() local [all …]
|