/linux/drivers/phy/ |
H A D | phy-core.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * phy-core.c -- Generic Phy framework. 5 * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com 18 #include <linux/phy/phy.h> 25 .name = "phy", 37 struct phy *phy = *(struct phy **)res; in devm_phy_release() local 39 phy_put(dev, phy); in devm_phy_release() 51 struct phy *phy = *(struct phy **)res; in devm_phy_consume() local 53 phy_destroy(phy); in devm_phy_consume() 58 struct phy **phy = res; in devm_phy_match() local [all …]
|
H A D | Kconfig | 1 # SPDX-License-Identifier: GPL-2.0-only 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 [all …]
|
H A D | phy-snps-eusb2.c | 1 // SPDX-License-Identifier: GPL-2.0 11 #include <linux/phy/phy.h> 158 int (*phy_init)(struct phy *p); 164 struct phy *phy; member 175 struct phy *repeater; 180 static int snps_eusb2_hsphy_set_mode(struct phy *p, enum phy_mode mode, int submode) in snps_eusb2_hsphy_set_mode() 182 struct snps_eusb2_hsphy *phy = phy_get_drvdata(p); in snps_eusb2_hsphy_set_mode() local 184 phy->mode = mode; in snps_eusb2_hsphy_set_mode() 186 return phy_set_mode_ext(phy->repeater, mode, submode); in snps_eusb2_hsphy_set_mode() 203 static void qcom_eusb2_default_parameters(struct snps_eusb2_hsphy *phy) in qcom_eusb2_default_parameters() argument [all …]
|
/linux/include/linux/phy/ |
H A D | phy.h | 1 /* SPDX-License-Identifier: GPL-2.0-or-later */ 3 * phy.h -- generic phy header file 5 * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com 19 #include <linux/phy/phy-dp.h> 20 #include <linux/phy/phy-hdmi.h> 21 #include <linux/phy/phy-lvds.h> 22 #include <linux/phy/phy-mipi-dphy.h> 24 struct phy; 57 * union phy_configure_opts - Opaque generic phy configuration 60 * the MIPI_DPHY phy mode. [all …]
|
/linux/drivers/scsi/libsas/ |
H A D | sas_phy.c | 1 // SPDX-License-Identifier: GPL-2.0 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, true); 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() [all …]
|
H A D | sas_port.c | 1 // SPDX-License-Identifier: GPL-2.0 15 static bool phy_is_wideport_member(struct asd_sas_port *port, struct asd_sas_phy *phy) in phy_is_wideport_member() argument 17 struct sas_ha_struct *sas_ha = phy->ha; in phy_is_wideport_member() 19 if (memcmp(port->attached_sas_addr, phy->attached_sas_addr, in phy_is_wideport_member() 20 SAS_ADDR_SIZE) != 0 || (sas_ha->strict_wide_ports && in phy_is_wideport_member() 21 memcmp(port->sas_addr, phy->sas_addr, SAS_ADDR_SIZE) != 0)) in phy_is_wideport_member() 26 static void sas_resume_port(struct asd_sas_phy *phy) in sas_resume_port() argument 29 struct asd_sas_port *port = phy->port; in sas_resume_port() 30 struct sas_ha_struct *sas_ha = phy->ha; in sas_resume_port() 31 struct sas_internal *si = to_sas_internal(sas_ha->shost->transportt); in sas_resume_port() [all …]
|
/linux/Documentation/translations/zh_CN/driver-api/phy/ |
H A D | phy.rst | 1 .. SPDX-License-Identifier: GPL-2.0 2 .. include:: ../../disclaimer-zh_CN.rst 4 :Original: Documentation/driver-api/phy/phy.rst 16 本文档解释了 PHY 的通用框架和提供的API,以及使用方法。 21 *PHY* 是物理层的缩写,它被用来把设备连接到一个物理媒介,例如USB控制器 22 有一个提供序列化、反序列化、编码、解码和负责获取所需的数据传输速率的 PHY。 23 注意,有些USB控制器内嵌了 PHY 的功能,其它的则使用了一个外置的PHY,此外 24 使用 PHY 的设备还有无线网、以太网、SATA等(控制器)。 26 创建这个框架的目的是将遍布 Linux 内核的 PHY 驱动程序融入到 drivers/phy, 29 该框架仅适用于使用外部 PHY(PHY 功能未嵌入控制器内)的设备。 [all …]
|
/linux/drivers/net/ |
H A D | sungem_phy.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * PHY drivers for the sungem ethernet driver. 7 * (c) 2002-2007, Benjamin Herrenscmidt (benh@kernel.crashing.org) 10 * - Add support for PHYs that provide an IRQ line 11 * - Eventually moved the entire polling state machine in 14 * - On LXT971 & BCM5201, Apple uses some chip specific regs 17 * - Apple has some additional power management code for some 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() [all …]
|
/linux/drivers/net/ethernet/ibm/emac/ |
H A D | phy.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * drivers/net/ethernet/ibm/emac/phy.c 5 * Driver for PowerPC 4xx on-chip ethernet controller, PHY support. 18 * (c) 2004-2005, Eugene Surovegin <ebs@ebshome.net> 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 [all …]
|
/linux/Documentation/devicetree/bindings/phy/ |
H A D | qcom,sc8280xp-qmp-pcie-phy.yaml | 1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/phy/qcom,sc8280xp-qmp-pcie-phy.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: Qualcomm QMP PHY controller (PCIe, SC8280XP) 10 - Vinod Koul <vkoul@kernel.org> 13 The QMP PHY controller supports physical layer functionality for a number of 19 - qcom,qcs615-qmp-gen3x1-pcie-phy 20 - qcom,qcs8300-qmp-gen4x2-pcie-phy 21 - qcom,sa8775p-qmp-gen4x2-pcie-phy [all …]
|
H A D | samsung,usb3-drd-phy.yaml | 1 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 3 --- 4 $id: http://devicetree.org/schemas/phy/samsung,usb3-drd-phy.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: Samsung Exynos SoC USB 3.0 DRD PHY USB 2.0 PHY 10 - Krzysztof Kozlowski <krzk@kernel.org> 11 - Marek Szyprowski <m.szyprowski@samsung.com> 12 - Sylwester Nawrocki <s.nawrocki@samsung.com> 15 For samsung,exynos5250-usbdrd-phy and samsung,exynos5420-usbdrd-phy 16 compatible PHYs, the second cell in the PHY specifier identifies the [all …]
|
/linux/drivers/phy/ralink/ |
H A D | phy-ralink-usb.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 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() [all …]
|
H A D | phy-mt7621-pci.c | 1 // SPDX-License-Identifier: GPL-2.0+ 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() [all …]
|
/linux/drivers/net/phy/ |
H A D | phy_led_triggers.c | 1 // SPDX-License-Identifier: GPL-2.0+ 4 #include <linux/phy.h> 8 #include "phylib-internal.h" 10 static struct phy_led_trigger *phy_speed_to_led_trigger(struct phy_device *phy, in phy_speed_to_led_trigger() argument 15 for (i = 0; i < phy->phy_num_led_triggers; i++) { in phy_speed_to_led_trigger() 16 if (phy->phy_led_triggers[i].speed == speed) in phy_speed_to_led_trigger() 17 return &phy->phy_led_triggers[i]; in phy_speed_to_led_trigger() 22 static void phy_led_trigger_no_link(struct phy_device *phy) in phy_led_trigger_no_link() argument 24 if (phy->last_triggered) { in phy_led_trigger_no_link() 25 led_trigger_event(&phy->last_triggered->trigger, LED_OFF); in phy_led_trigger_no_link() [all …]
|
/linux/drivers/nfc/pn544/ |
H A D | i2c.c | 1 // SPDX-License-Identifier: GPL-2.0-only 10 #include <linux/crc-ccitt.h> 132 #define PN544_FW_I2C_WRITE_DATA_MAX_LEN MIN((PN544_FW_I2C_MAX_PAYLOAD -\ 136 #define PN544_FW_SECURE_CHUNK_WRITE_DATA_MAX_LEN (PN544_FW_I2C_MAX_PAYLOAD -\ 183 16, 1, (skb)->data, (skb)->len, 0); \ 186 static void pn544_hci_i2c_platform_init(struct pn544_i2c_phy *phy) in pn544_hci_i2c_platform_init() argument 192 nfc_info(&phy->i2c_dev->dev, "Detecting nfc_en polarity\n"); in pn544_hci_i2c_platform_init() 195 gpiod_set_value_cansleep(phy->gpiod_fw, 0); in pn544_hci_i2c_platform_init() 198 phy->en_polarity = polarity; in pn544_hci_i2c_platform_init() 200 while (retry--) { in pn544_hci_i2c_platform_init() [all …]
|
/linux/drivers/phy/allwinner/ |
H A D | phy-sun9i-usb.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * Allwinner sun9i USB phy driver 5 * Copyright (C) 2014-2015 Chen-Yu Tsai <wens@csie.org> 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() [all …]
|
H A D | phy-sun50i-usb3.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 * Allwinner sun50i(H6) USB 3.0 phy driver 7 * Based on phy-sun9i-usb.c, which is: 9 * Copyright (C) 2014-2015 Chen-Yu Tsai <wens@csie.org> 13 * Copyright (c) 2010-2015 Allwinner Technology Co., Ltd. 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 [all …]
|
/linux/drivers/net/ethernet/intel/igb/ |
H A D | e1000_phy.c | 1 // SPDX-License-Identifier: GPL-2.0 2 /* Copyright(c) 2007 - 2018 Intel Corporation. */ 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() 61 if ((hw->mac.type == e1000_i210) || (hw->mac.type == e1000_i211)) in igb_get_phy_id() 62 phy->ops.write_reg(hw, I347AT4_PAGE_SELECT, 0); in igb_get_phy_id() [all …]
|
/linux/arch/arm64/boot/dts/microchip/ |
H A D | sparx5_pcb135_board.dtsi | 1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 6 /dts-v1/; 10 gpio-restart { 11 compatible = "gpio-restart"; 16 i2c0_imux: i2c-mux { 17 compatible = "i2c-mux-pinctrl"; 18 #address-cells = <1>; 19 #size-cells = <0>; 20 i2c-parent = <&i2c0>; 24 compatible = "gpio-leds"; [all …]
|
/linux/drivers/net/wireless/mediatek/mt76/ |
H A D | channel.c | 1 // SPDX-License-Identifier: ISC 12 mlink = kzalloc(dev->drv->link_data_size, GFP_KERNEL); in mt76_alloc_mlink() 16 mlink->mvif = mvif; in mt76_alloc_mlink() 22 mt76_phy_update_channel(struct mt76_phy *phy, in mt76_phy_update_channel() argument 25 phy->radar_enabled = conf->radar_enabled; in mt76_phy_update_channel() 26 phy->main_chandef = conf->def; in mt76_phy_update_channel() 27 phy->chanctx = (struct mt76_chanctx *)conf->drv_priv; in mt76_phy_update_channel() 29 return __mt76_set_channel(phy, &phy->main_chandef, false); in mt76_phy_update_channel() 35 struct mt76_chanctx *ctx = (struct mt76_chanctx *)conf->drv_priv; in mt76_add_chanctx() 36 struct mt76_phy *phy = hw->priv; in mt76_add_chanctx() local [all …]
|
/linux/drivers/phy/starfive/ |
H A D | phy-jh7110-usb.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 * StarFive JH7110 USB 2.0 PHY driver 15 #include <linux/phy/phy.h> 30 struct phy *phy; member 38 static void usb2_set_ls_keepalive(struct jh7110_usb2_phy *phy, bool set) in usb2_set_ls_keepalive() argument 42 /* Host mode enable the LS speed keep-alive signal */ in usb2_set_ls_keepalive() 43 val = readl(phy->regs + USB_LS_KEEPALIVE_OFF); in usb2_set_ls_keepalive() 49 writel(val, phy->regs + USB_LS_KEEPALIVE_OFF); in usb2_set_ls_keepalive() 52 static int usb2_phy_set_mode(struct phy *_phy, in usb2_phy_set_mode() 55 struct jh7110_usb2_phy *phy = phy_get_drvdata(_phy); in usb2_phy_set_mode() local [all …]
|
/linux/drivers/net/ethernet/chelsio/cxgb3/ |
H A D | ael1002.c | 2 * Copyright (c) 2005-2008 Chelsio, Inc. All rights reserved. 14 * - Redistributions of source code must retain the above 18 * - Redistributions in binary form must reproduce the above 62 /* PHY module I2C device address */ 68 /* PHY transceiver type */ 84 static int set_phy_regs(struct cphy *phy, const struct reg_val *rv) in set_phy_regs() argument 88 for (err = 0; rv->mmd_addr && !err; rv++) { in set_phy_regs() 89 if (rv->clear_bits == 0xffff) in set_phy_regs() 90 err = t3_mdio_write(phy, rv->mmd_addr, rv->reg_addr, in set_phy_regs() 91 rv->set_bits); in set_phy_regs() [all …]
|
/linux/drivers/phy/qualcomm/ |
H A D | phy-qcom-ipq4019-usb.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 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() [all …]
|
/linux/drivers/gpu/drm/sun4i/ |
H A D | sun8i_hdmi_phy.c | 1 // SPDX-License-Identifier: GPL-2.0+ 127 static void sun8i_hdmi_phy_set_polarity(struct sun8i_hdmi_phy *phy, in sun8i_hdmi_phy_set_polarity() argument 132 if (mode->flags & DRM_MODE_FLAG_NHSYNC) in sun8i_hdmi_phy_set_polarity() 135 if (mode->flags & DRM_MODE_FLAG_NVSYNC) in sun8i_hdmi_phy_set_polarity() 138 regmap_update_bits(phy->regs, SUN8I_HDMI_PHY_DBG_CTRL_REG, in sun8i_hdmi_phy_set_polarity() 146 unsigned int clk_rate = mode->crtc_clock * 1000; in sun8i_a83t_hdmi_phy_config() 147 struct sun8i_hdmi_phy *phy = data; in sun8i_a83t_hdmi_phy_config() local 149 sun8i_hdmi_phy_set_polarity(phy, mode); in sun8i_a83t_hdmi_phy_config() 151 regmap_update_bits(phy->regs, SUN8I_HDMI_PHY_REXT_CTRL_REG, in sun8i_a83t_hdmi_phy_config() 211 struct sun8i_hdmi_phy *phy = data; in sun8i_a83t_hdmi_phy_disable() local [all …]
|
/linux/drivers/nfc/pn533/ |
H A D | usb.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * Driver for NXP PN533 NFC Chip - USB transport layer 6 * Copyright (C) 2012-2013 Tieto Poland 61 struct pn533_usb_phy *phy = urb->context; in pn533_recv_response() local 64 if (!urb->status) { in pn533_recv_response() 65 skb = alloc_skb(urb->actual_length, GFP_ATOMIC); in pn533_recv_response() 67 nfc_err(&phy->udev->dev, "failed to alloc memory\n"); in pn533_recv_response() 69 skb_put_data(skb, urb->transfer_buffer, in pn533_recv_response() 70 urb->actual_length); in pn533_recv_response() 74 pn533_recv_frame(phy->priv, skb, urb->status); in pn533_recv_response() [all …]
|