/Linux-v6.1/drivers/net/mdio/ |
D | Kconfig | 1 # SPDX-License-Identifier: GPL-2.0-only 3 # MDIO Layer Configuration 7 tristate "MDIO bus device drivers" 9 MDIO devices and driver infrastructure code. 20 loadable module or built-in. 27 FWNODE MDIO bus (Ethernet PHY) accessors 35 OpenFirmware MDIO bus (Ethernet PHY) accessors 42 ACPI MDIO bus (Ethernet PHY) accessors 50 tristate "Allwinner sun4i MDIO interface support" 53 This driver supports the MDIO interface found in the network [all …]
|
D | mdio-bcm-unimac.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 * Broadcom UniMAC MDIO bus controller driver 5 * Copyright (C) 2014-2017 Broadcom 17 #include <linux/platform_data/mdio-bcm-unimac.h> 50 * peripheral registers for CPU-native byte order. in unimac_mdio_readl() 53 return __raw_readl(priv->base + offset); in unimac_mdio_readl() 55 return readl_relaxed(priv->base + offset); in unimac_mdio_readl() 62 __raw_writel(val, priv->base + offset); in unimac_mdio_writel() 64 writel_relaxed(val, priv->base + offset); in unimac_mdio_writel() 91 } while (--timeout); in unimac_mdio_poll() [all …]
|
D | mdio-bcm-iproc.c | 1 // SPDX-License-Identifier: GPL-2.0 52 } while (timeout--); in iproc_mdio_wait_for_idle() 54 return -ETIMEDOUT; in iproc_mdio_wait_for_idle() 66 static int iproc_mdio_read(struct mii_bus *bus, int phy_id, int reg) in iproc_mdio_read() argument 68 struct iproc_mdio_priv *priv = bus->priv; in iproc_mdio_read() 72 rc = iproc_mdio_wait_for_idle(priv->base); in iproc_mdio_read() 83 writel(cmd, priv->base + MII_DATA_OFFSET); in iproc_mdio_read() 85 rc = iproc_mdio_wait_for_idle(priv->base); in iproc_mdio_read() 89 cmd = readl(priv->base + MII_DATA_OFFSET) & MII_DATA_MASK; in iproc_mdio_read() 94 static int iproc_mdio_write(struct mii_bus *bus, int phy_id, in iproc_mdio_write() argument [all …]
|
D | mdio-gpio.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * GPIO based MDIO bitbang driver. 7 * by Laurent Pinchart <laurentp@cse-semaphore.com> 22 #include <linux/mdio-bitbang.h> 23 #include <linux/mdio-gpio.h> 26 #include <linux/platform_data/mdio-gpio.h> 32 struct gpio_desc *mdc, *mdio, *mdo; member 38 bitbang->mdc = devm_gpiod_get_index(dev, NULL, MDIO_GPIO_MDC, in mdio_gpio_get_data() 40 if (IS_ERR(bitbang->mdc)) in mdio_gpio_get_data() 41 return PTR_ERR(bitbang->mdc); in mdio_gpio_get_data() [all …]
|
/Linux-v6.1/drivers/net/ethernet/xilinx/ |
D | xilinx_axienet_mdio.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * MDIO bus driver for the Xilinx Axi Ethernet device 6 * Copyright (c) 2010 - 2011 Michal Simek <monstr@monstr.eu> 7 * Copyright (c) 2010 - 2011 PetaLogix 9 * Copyright (c) 2010 - 2012 Xilinx, Inc. All rights reserved. 23 /* Wait till MDIO interface is ready to accept a new transaction.*/ 33 /* Enable the MDIO MDC. Called prior to a read/write operation */ 37 ((u32)lp->mii_clk_div | XAE_MDIO_MC_MDIOEN_MASK)); in axienet_mdio_mdc_enable() 40 /* Disable the MDIO MDC. Called after a read/write operation*/ 51 * axienet_mdio_read - MDIO interface read function [all …]
|
/Linux-v6.1/drivers/net/phy/ |
D | mdio_bus.c | 1 // SPDX-License-Identifier: GPL-2.0+ 2 /* MDIO Bus interface 39 #include <trace/events/mdio.h> 41 #include "mdio-boardinfo.h" 46 mdiodev->reset_gpio = gpiod_get_optional(&mdiodev->dev, in mdiobus_register_gpiod() 48 if (IS_ERR(mdiodev->reset_gpio)) in mdiobus_register_gpiod() 49 return PTR_ERR(mdiodev->reset_gpio); in mdiobus_register_gpiod() 51 if (mdiodev->reset_gpio) in mdiobus_register_gpiod() 52 gpiod_set_consumer_name(mdiodev->reset_gpio, "PHY reset"); in mdiobus_register_gpiod() 61 reset = reset_control_get_optional_exclusive(&mdiodev->dev, "phy"); in mdiobus_register_reset() [all …]
|
/Linux-v6.1/drivers/net/ethernet/hisilicon/ |
D | hns_mdio.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * Copyright (c) 2014-2015 Hisilicon Limited. 23 #define MDIO_DRV_NAME "Hi-HNS_MDIO" 24 #define MDIO_BUS_NAME "Hisilicon MII Bus" 38 u8 __iomem *vbase; /* mdio reg base address */ 43 /* mdio reg */ 101 mdio_write_reg((a)->vbase, (reg), (value)) 126 mdio_set_reg_field((dev)->vbase, (reg), (mask), (shift), (val)) 137 mdio_get_reg_field((dev)->vbase, (reg), (mask), (shift)) 140 mdio_get_reg_field((dev)->vbase, (reg), 0x1ull, (bit)) [all …]
|
/Linux-v6.1/drivers/net/ethernet/freescale/ |
D | fsl_pq_mdio.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * Freescale PowerQUICC Ethernet Driver -- MIIM bus implementation 4 * Provides Bus interface for MIIM regs 9 * Copyright 2002-2004, 2008-2009 Freescale Semiconductor, Inc. 50 u32 ieventm; /* MDIO Interrupt event register (for etsec2)*/ 51 u32 imaskm; /* MDIO Interrupt mask register (for etsec2)*/ 53 u32 emapm; /* MDIO Event mapping register (for etsec2)*/ 70 * Per-device-type data. Each type of device tree node that we support gets 88 * Write value to the PHY at mii_id at register regnum, on the bus attached 89 * to the local interface, which may be different from the generic mdio bus [all …]
|
D | xgmac_mdio.c | 2 * QorIQ 10G MDIO Controller 20 #include <linux/mdio.h> 33 __be32 mdio_stat; /* MDIO configuration and status */ 34 __be32 mdio_ctl; /* MDIO control */ 35 __be32 mdio_data; /* MDIO data */ 36 __be32 mdio_addr; /* MDIO address */ 82 * Wait until the MDIO bus is free 90 /* Wait till the bus is free */ in xgmac_wait_until_free() 92 while ((xgmac_read32(®s->mdio_stat, is_little_endian) & in xgmac_wait_until_free() 95 timeout--; in xgmac_wait_until_free() [all …]
|
/Linux-v6.1/include/linux/ |
D | mdio.h | 1 /* SPDX-License-Identifier: GPL-2.0-only */ 3 * linux/mdio.h: definitions for MDIO (clause 45) transceivers 4 * Copyright 2006-2009 Solarflare Communications Inc. 9 #include <uapi/linux/mdio.h> 39 struct mii_bus *bus; member 46 /* Bus address of the MDIO device (0-31) */ 60 /* struct mdio_driver_common: Common to all MDIO drivers */ 73 /* struct mdio_driver: Generic MDIO driver */ 79 * up device-specific structures, if any 98 static inline void mdiodev_set_drvdata(struct mdio_device *mdio, void *data) in mdiodev_set_drvdata() argument [all …]
|
/Linux-v6.1/drivers/net/ethernet/arc/ |
D | emac_mdio.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Copyright (C) 2004-2013 Synopsys, Inc. (www.synopsys.com) 5 * MDIO implementation for ARC EMAC 15 /* Number of seconds we wait for "MDIO complete" flag to appear */ 19 * arc_mdio_complete_wait - Waits until MDIO transaction is completed. 22 * returns: 0 on success, -ETIMEDOUT on a timeout. 34 /* Reset "MDIO complete" flag */ in arc_mdio_complete_wait() 42 return -ETIMEDOUT; in arc_mdio_complete_wait() 46 * arc_mdio_read - MDIO interface read function. 47 * @bus: Pointer to MII bus structure. [all …]
|
/Linux-v6.1/Documentation/devicetree/bindings/net/ |
D | mdio.yaml | 1 # SPDX-License-Identifier: GPL-2.0 3 --- 4 $id: http://devicetree.org/schemas/net/mdio.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: MDIO Bus Generic Binding 10 - Andrew Lunn <andrew@lunn.ch> 11 - Florian Fainelli <f.fainelli@gmail.com> 12 - Heiner Kallweit <hkallweit1@gmail.com> 15 These are generic properties that can apply to any MDIO bus. Any 16 MDIO bus must have a list of child nodes, one per device on the [all …]
|
D | mdio-mux-mmioreg.yaml | 1 # SPDX-License-Identifier: GPL-2.0 3 --- 4 $id: http://devicetree.org/schemas/net/mdio-mux-mmioreg.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: Properties for an MDIO bus multiplexer controlled by a memory-mapped device 10 - Andrew Lunn <andrew@lunn.ch> 13 This is a special case of a MDIO bus multiplexer. A memory-mapped device, 14 like an FPGA, is used to control which child bus is connected. The mdio-mux 15 node must be a child of the memory-mapped device. The driver currently only 16 supports devices with 8, 16 or 32-bit registers. [all …]
|
D | brcm,unimac-mdio.yaml | 1 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 3 --- 4 $id: http://devicetree.org/schemas/net/brcm,unimac-mdio.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: Broadcom UniMAC MDIO bus controller 10 - Doug Berger <opendmb@gmail.com> 11 - Florian Fainelli <f.fainelli@gmail.com> 12 - Rafał Miłecki <rafal@milecki.pl> 15 - $ref: mdio.yaml# 20 - brcm,genet-mdio-v1 [all …]
|
D | mdio-mux.yaml | 1 # SPDX-License-Identifier: GPL-2.0 3 --- 4 $id: http://devicetree.org/schemas/net/mdio-mux.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: Common MDIO bus multiplexer/switch properties. 10 - Andrew Lunn <andrew@lunn.ch> 13 An MDIO bus multiplexer/switch will have several child busses that are 14 numbered uniquely in a device dependent manner. The nodes for an MDIO 15 bus multiplexer/switch will have one child node for each child bus. 18 mdio-parent-bus: [all …]
|
D | mdio-mux-meson-g12a.txt | 1 Properties for the MDIO bus multiplexer/glue of Amlogic G12a SoC family. 3 This is a special case of a MDIO bus multiplexer. It allows to choose between 4 the internal mdio bus leading to the embedded 10/100 PHY or the external 5 MDIO bus. 8 - compatible : amlogic,g12a-mdio-mux 9 - reg: physical address and length of the multiplexer/glue registers 10 - clocks: list of clock phandle, one for each entry clock-names. 11 - clock-names: should contain the following: 18 mdio_mux: mdio-multiplexer@4c000 { 19 compatible = "amlogic,g12a-mdio-mux"; [all …]
|
D | cavium-mdio.txt | 1 * System Management Interface (SMI) / MDIO 4 - compatible: One of: 6 "cavium,octeon-3860-mdio": Compatibility with all cn3XXX, cn5XXX 9 "cavium,thunder-8890-mdio": Compatibility with all cn8XXX SOCs. 11 - reg: The base address of the MDIO bus controller register bank. 13 - #address-cells: Must be <1>. 15 - #size-cells: Must be <0>. MDIO addresses have no size component. 17 Typically an MDIO bus might have several children. 20 mdio@1180000001800 { 21 compatible = "cavium,octeon-3860-mdio"; [all …]
|
D | allwinner,sun8i-a83t-emac.yaml | 1 # SPDX-License-Identifier: GPL-2.0 3 --- 4 $id: http://devicetree.org/schemas/net/allwinner,sun8i-a83t-emac.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Chen-Yu Tsai <wens@csie.org> 11 - Maxime Ripard <mripard@kernel.org> 16 - const: allwinner,sun8i-a83t-emac 17 - const: allwinner,sun8i-h3-emac 18 - const: allwinner,sun8i-r40-gmac 19 - const: allwinner,sun8i-v3s-emac [all …]
|
D | brcm,bcm6368-mdio-mux.yaml | 1 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 3 --- 4 $id: http://devicetree.org/schemas/net/brcm,bcm6368-mdio-mux.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: Broadcom BCM6368 MDIO bus multiplexer 10 - Álvaro Fernández Rojas <noltari@gmail.com> 13 This MDIO bus multiplexer defines buses that could be internal as well as 14 external to SoCs. When child bus is selected, one needs to select these two 15 properties as well to generate desired MDIO transaction on appropriate bus. 18 - $ref: mdio-mux.yaml# [all …]
|
D | brcm,mdio-mux-iproc.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/net/brcm,mdio-mux-iproc.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: MDIO bus multiplexer found in Broadcom iProc based SoCs. 10 - Florian Fainelli <f.fainelli@gmail.com> 13 This MDIO bus multiplexer defines buses that could be internal as well as 14 external to SoCs and could accept MDIO transaction compatible to C-22 or 15 C-45 Clause. When child bus is selected, one needs to select these two 16 properties as well to generate desired MDIO transaction on appropriate bus. [all …]
|
D | hisilicon-hns-mdio.txt | 1 Hisilicon MDIO bus controller 4 - compatible: can be one of: 5 "hisilicon,hns-mdio" 6 "hisilicon,mdio" 7 "hisilicon,hns-mdio" is recommended to be used for hip05 and later SOCs, 8 while "hisilicon,mdio" is optional for backwards compatibility only on 10 - reg: The base address of the MDIO bus controller register bank. 11 - #address-cells: Must be <1>. 12 - #size-cells: Must be <0>. MDIO addresses have no size component. 14 Typically an MDIO bus might have several children. [all …]
|
D | fsl-tsec-phy.txt | 1 * MDIO IO device 3 The MDIO is a bus to which the PHY devices are connected. For each 4 device that exists on this bus, a child node should be created. See 5 the definition of the PHY node in booting-without-of.txt for an example 9 - reg : Offset and length of the register set for the device, and optionally 14 - compatible : Should define the compatible device type for the 15 mdio. Currently supported strings/devices are: 16 - "fsl,gianfar-tbi" 17 - "fsl,gianfar-mdio" 18 - "fsl,etsec2-tbi" [all …]
|
/Linux-v6.1/Documentation/firmware-guide/acpi/dsd/ |
D | phy.rst | 1 .. SPDX-License-Identifier: GPL-2.0 4 MDIO bus and PHYs in ACPI 7 The PHYs on an MDIO bus [phy] are probed and registered using 11 on the MDIO bus have to be referenced. 14 for connecting PHYs on the MDIO bus [dsd-properties-rules] to the MAC layer. 17 Properties UUID For _DSD" [dsd-guide] document and the 18 daffd814-6eba-4d8c-8a91-bc9bbf4aa301 UUID must be used in the Device 21 phy-handle 22 ---------- 23 For each MAC node, a device property "phy-handle" is used to reference [all …]
|
/Linux-v6.1/drivers/net/dsa/ |
D | lan9303_mdio.c | 1 // SPDX-License-Identifier: GPL-2.0-only 10 #include <linux/mdio.h> 16 /* Generate phy-addr and -reg from the input address */ 25 static void lan9303_mdio_real_write(struct mdio_device *mdio, int reg, u16 val) in lan9303_mdio_real_write() argument 27 mdio->bus->write(mdio->bus, PHY_ADDR(reg), PHY_REG(reg), val); in lan9303_mdio_real_write() 35 mutex_lock(&sw_dev->device->bus->mdio_lock); in lan9303_mdio_write() 36 lan9303_mdio_real_write(sw_dev->device, reg, val & 0xffff); in lan9303_mdio_write() 37 lan9303_mdio_real_write(sw_dev->device, reg + 2, (val >> 16) & 0xffff); in lan9303_mdio_write() 38 mutex_unlock(&sw_dev->device->bus->mdio_lock); in lan9303_mdio_write() 43 static u16 lan9303_mdio_real_read(struct mdio_device *mdio, int reg) in lan9303_mdio_real_read() argument [all …]
|
/Linux-v6.1/drivers/net/usb/ |
D | ax88172a.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 9 * Copyright (C) 2003-2006 David Hollis <dhollis@davehollis.com> 12 * Copyright (c) 2002-2003 TiVo Inc. 19 struct mii_bus *mdio; member 31 struct phy_device *phydev = netdev->phydev; in ax88172a_adjust_link() 33 struct ax88172a_private *priv = dev->driver_priv; in ax88172a_adjust_link() 36 if (phydev->link) { in ax88172a_adjust_link() 39 if (phydev->duplex == DUPLEX_HALF) in ax88172a_adjust_link() 42 if (phydev->speed != SPEED_100) in ax88172a_adjust_link() 46 if (mode != priv->oldmode) { in ax88172a_adjust_link() [all …]
|