/Zephyr-latest/include/zephyr/drivers/ |
D | mdio.h | 44 int (*read)(const struct device *dev, uint8_t prtad, uint8_t regad, 48 int (*write)(const struct device *dev, uint8_t prtad, uint8_t regad, 52 int (*read_c45)(const struct device *dev, uint8_t prtad, uint8_t devad, 56 int (*write_c45)(const struct device *dev, uint8_t prtad, uint8_t devad, 115 __syscall int mdio_read(const struct device *dev, uint8_t prtad, uint8_t regad, 118 static inline int z_impl_mdio_read(const struct device *dev, uint8_t prtad, in z_impl_mdio_read() argument 128 return api->read(dev, prtad, regad, data); in z_impl_mdio_read() 148 __syscall int mdio_write(const struct device *dev, uint8_t prtad, uint8_t regad, 151 static inline int z_impl_mdio_write(const struct device *dev, uint8_t prtad, in z_impl_mdio_write() argument 161 return api->write(dev, prtad, regad, data); in z_impl_mdio_write() [all …]
|
/Zephyr-latest/drivers/mdio/ |
D | mdio_sam.c | 42 static int mdio_transfer(const struct device *dev, uint8_t prtad, uint8_t regad, in mdio_transfer() argument 56 | GMAC_MAN_PHYA(prtad) in mdio_transfer() 81 static int mdio_sam_read(const struct device *dev, uint8_t prtad, uint8_t regad, in mdio_sam_read() argument 84 return mdio_transfer(dev, prtad, regad, MDIO_OP_C22_READ, false, in mdio_sam_read() 88 static int mdio_sam_write(const struct device *dev, uint8_t prtad, in mdio_sam_write() argument 91 return mdio_transfer(dev, prtad, regad, MDIO_OP_C22_WRITE, false, in mdio_sam_write() 95 static int mdio_sam_read_c45(const struct device *dev, uint8_t prtad, in mdio_sam_read_c45() argument 100 err = mdio_transfer(dev, prtad, devad, MDIO_OP_C45_ADDRESS, true, in mdio_sam_read_c45() 103 err = mdio_transfer(dev, prtad, devad, MDIO_OP_C45_READ, true, in mdio_sam_read_c45() 110 static int mdio_sam_write_c45(const struct device *dev, uint8_t prtad, in mdio_sam_write_c45() argument [all …]
|
D | mdio_adin2111.c | 58 static int mdio_adin2111_read_c45(const struct device *dev, uint8_t prtad, in mdio_adin2111_read_c45() argument 68 cmd = (prtad & 0x1FU) << 21; in mdio_adin2111_read_c45() 98 static int mdio_adin2111_write_c45(const struct device *dev, uint8_t prtad, in mdio_adin2111_write_c45() argument 109 cmd = (prtad & 0x1FU) << 21; in mdio_adin2111_write_c45() 132 static int mdio_adin2111_read(const struct device *dev, uint8_t prtad, in mdio_adin2111_read() argument 142 cmd |= (prtad & 0x1FU) << 21; in mdio_adin2111_read() 154 static int mdio_adin2111_write(const struct device *dev, uint8_t prtad, in mdio_adin2111_write() argument 164 cmd |= (prtad & 0x1FU) << 21; in mdio_adin2111_write()
|
D | mdio_esp32.c | 33 static int mdio_transfer(const struct device *dev, uint8_t prtad, uint8_t regad, in mdio_transfer() argument 49 emac_hal_set_phy_cmd(&dev_data->hal, prtad, regad, write); in mdio_transfer() 76 static int mdio_esp32_read(const struct device *dev, uint8_t prtad, uint8_t regad, in mdio_esp32_read() argument 79 return mdio_transfer(dev, prtad, regad, false, 0, data); in mdio_esp32_read() 83 static int mdio_esp32_write(const struct device *dev, uint8_t prtad, in mdio_esp32_write() argument 86 return mdio_transfer(dev, prtad, regad, true, data, NULL); in mdio_esp32_write()
|
D | mdio_nxp_s32_gmac.c | 38 static int mdio_nxp_s32_read_c45(const struct device *dev, uint8_t prtad, uint8_t devad, in mdio_nxp_s32_read_c45() argument 50 status = Gmac_Ip_MDIOReadMMD(cfg->instance, prtad, devad, regad, regval, in mdio_nxp_s32_read_c45() 58 static int mdio_nxp_s32_write_c45(const struct device *dev, uint8_t prtad, uint8_t devad, in mdio_nxp_s32_write_c45() argument 70 status = Gmac_Ip_MDIOWriteMMD(cfg->instance, prtad, devad, regad, regval, in mdio_nxp_s32_write_c45() 78 static int mdio_nxp_s32_read_c22(const struct device *dev, uint8_t prtad, in mdio_nxp_s32_read_c22() argument 90 status = Gmac_Ip_MDIORead(cfg->instance, prtad, regad, regval, in mdio_nxp_s32_read_c22() 98 static int mdio_nxp_s32_write_c22(const struct device *dev, uint8_t prtad, in mdio_nxp_s32_write_c22() argument 110 status = Gmac_Ip_MDIOWrite(cfg->instance, prtad, regad, regval, in mdio_nxp_s32_write_c22()
|
D | mdio_gpio.c | 76 static int mdio_gpio_transfer(const struct device *dev, uint8_t prtad, uint8_t devad, uint8_t rw, in mdio_gpio_transfer() argument 93 mdio_gpio_write(dev_cfg, prtad, 5); in mdio_gpio_transfer() 115 static int mdio_gpio_read_mmi(const struct device *dev, uint8_t prtad, uint8_t devad, in mdio_gpio_read_mmi() argument 118 return mdio_gpio_transfer(dev, prtad, devad, MDIO_GPIO_READ_OP, 0, data); in mdio_gpio_read_mmi() 121 static int mdio_gpio_write_mmi(const struct device *dev, uint8_t prtad, uint8_t devad, in mdio_gpio_write_mmi() argument 124 return mdio_gpio_transfer(dev, prtad, devad, MDIO_GPIO_WRITE_OP, data, NULL); in mdio_gpio_write_mmi()
|
D | mdio_litex_liteeth.c | 98 static int mdio_litex_transfer(const struct device *dev, uint8_t prtad, uint8_t devad, uint8_t rw, in mdio_litex_transfer() argument 114 mdio_litex_write(dev_cfg, prtad, 5); in mdio_litex_transfer() 134 static int mdio_litex_read_mmi(const struct device *dev, uint8_t prtad, uint8_t devad, in mdio_litex_read_mmi() argument 137 return mdio_litex_transfer(dev, prtad, devad, LITEX_MDIO_READ_OP, 0, data); in mdio_litex_read_mmi() 140 static int mdio_litex_write_mmi(const struct device *dev, uint8_t prtad, uint8_t devad, in mdio_litex_write_mmi() argument 143 return mdio_litex_transfer(dev, prtad, devad, LITEX_MDIO_WRITE_OP, data, NULL); in mdio_litex_write_mmi()
|
D | mdio_nxp_s32_netc.c | 26 static int nxp_s32_mdio_read(const struct device *dev, uint8_t prtad, in nxp_s32_mdio_read() argument 34 status = Netc_EthSwt_Ip_ReadTrcvRegister(cfg->instance, prtad, regad, regval); in nxp_s32_mdio_read() 40 static int nxp_s32_mdio_write(const struct device *dev, uint8_t prtad, in nxp_s32_mdio_write() argument 48 status = Netc_EthSwt_Ip_WriteTrcvRegister(cfg->instance, prtad, regad, regval); in nxp_s32_mdio_write()
|
D | mdio_stm32_hal.c | 33 static int mdio_stm32_read(const struct device *dev, uint8_t prtad, in mdio_stm32_read() argument 43 ret = HAL_ETH_ReadPHYRegister(heth, prtad, regad, &read); in mdio_stm32_read() 56 static int mdio_stm32_write(const struct device *dev, uint8_t prtad, in mdio_stm32_write() argument 65 ret = HAL_ETH_WritePHYRegister(heth, prtad, regad, data); in mdio_stm32_write()
|
D | mdio_dwcxgmac.c | 86 static int mdio_transfer(const struct device *dev, uint8_t prtad, uint8_t devad, uint8_t rw, in mdio_transfer() argument 109 reg_data |= BIT(prtad); in mdio_transfer() 114 CORE_MDIO_SINGLE_COMMAND_ADDRESS_PA_SET(prtad); in mdio_transfer() 143 static int mdio_dwcxgmac_read(const struct device *dev, uint8_t prtad, uint8_t regad, in mdio_dwcxgmac_read() argument 146 return mdio_transfer(dev, prtad, regad, MDIO_READ_CMD, 0, data); in mdio_dwcxgmac_read() 149 static int mdio_dwcxgmac_write(const struct device *dev, uint8_t prtad, uint8_t regad, in mdio_dwcxgmac_write() argument 152 return mdio_transfer(dev, prtad, regad, MDIO_WRITE_CMD, data, NULL); in mdio_dwcxgmac_write()
|
D | mdio_nxp_imx_netc.c | 29 static int nxp_imx_netc_mdio_read(const struct device *dev, uint8_t prtad, uint8_t regad, in nxp_imx_netc_mdio_read() argument 36 result = NETC_MDIORead(&data->handle, prtad, regad, regval); in nxp_imx_netc_mdio_read() 42 static int nxp_imx_netc_mdio_write(const struct device *dev, uint8_t prtad, uint8_t regad, in nxp_imx_netc_mdio_write() argument 49 result = NETC_MDIOWrite(&data->handle, prtad, regad, regval); in nxp_imx_netc_mdio_write()
|
D | mdio_renesas_ra.c | 34 static int renesas_ra_mdio_read(const struct device *dev, uint8_t prtad, uint8_t regad, in renesas_ra_mdio_read() argument 41 dev_data->ether_phy_ctrl.phy_lsi_address = prtad; in renesas_ra_mdio_read() 58 static int renesas_ra_mdio_write(const struct device *dev, uint8_t prtad, uint8_t regad, in renesas_ra_mdio_write() argument 64 dev_data->ether_phy_ctrl.phy_lsi_address = prtad; in renesas_ra_mdio_write()
|
D | mdio_nxp_enet.c | 64 uint8_t prtad, uint8_t regad, uint16_t *read_data) in nxp_enet_mdio_read() argument 90 ENET_MMFR_PA(prtad) | in nxp_enet_mdio_read() 114 uint8_t prtad, uint8_t regad, uint16_t write_data) in nxp_enet_mdio_write() argument 140 ENET_MMFR_PA(prtad) | in nxp_enet_mdio_write()
|
/Zephyr-latest/drivers/ethernet/ |
D | eth_smsc91x.c | 859 static int mdio_smsc_read(const struct device *dev, uint8_t prtad, uint8_t devad, uint16_t *data) in mdio_smsc_read() argument 866 *data = smsc_miibus_readreg(sc, prtad, devad); in mdio_smsc_read() 871 static int mdio_smsc_write(const struct device *dev, uint8_t prtad, uint8_t devad, uint16_t data) in mdio_smsc_write() argument 878 smsc_miibus_writereg(sc, prtad, devad, data); in mdio_smsc_write()
|