#include <stdint.h>
#include "no_os_util.h"
#include "no_os_mdio.h"
Go to the source code of this file.
|
#define | MAX24287_REG(page, addr) (((page) << 5) | ((addr) & 0x1f)) |
|
#define | MAX24287_PAGE(addr) ((addr) >> 5) |
|
#define | MAX24287_ADDR(addr) ((addr) & 0x1f) |
|
#define | MAX24287_BMCR 0 |
|
#define | MAX24287_DP_RST_MASK NO_OS_BIT(15) |
|
#define | MAX24287_AN_EN_MASK NO_OS_BIT(12) |
|
#define | MAX24287_AN_START_MASK NO_OS_BIT(9) |
|
#define | MAX24287_BMSR 1 |
|
#define | MAX24287_LINK_ST_MASK NO_OS_BIT(2) |
|
#define | MAX24287_ID1 2 |
|
#define | MAX24287_ID2 3 |
|
#define | MAX24287_AN_ADV 4 |
|
#define | MAX24287_AN_ADV_W_MASK NO_OS_BIT(0) |
|
#define | MAX24287_LK_MASK NO_OS_BIT(15) |
|
#define | MAX24287_DPLX_MASK NO_OS_BIT(12) |
|
#define | MAX24287_SPD_MASK NO_OS_GENMASK(11, 10) |
|
#define | MAX24287_AN_RX 5 |
|
#define | MAX24287_AN_EXP 6 |
|
#define | MAX24287_AN_RX_PAGE NO_OS_BIT(1) |
|
#define | MAX24287_EXT_STAT 15 |
|
#define | MAX24287_JIT_DIAG 16 |
|
#define | MAX24287_PCSCR 17 |
|
#define | MAX24287_WD_DIS_MASK NO_OS_BIT(6) |
|
#define | MAX24287_BASEX_MASK NO_OS_BIT(4) |
|
#define | MAX24287_EN_CDET_MASK NO_OS_BIT(0) |
|
#define | MAX24287_GMIICR 18 |
|
#define | MAX24287_GMIICR_W_MASK NO_OS_BIT(7) |
|
#define | MAX24287_GMIICR_SPD_MASK NO_OS_GENMASK(15, 14) |
|
#define | MAX24287_GMIICR_DTE_DCE_MASK NO_OS_BIT(12) |
|
#define | MAX24287_GMIICR_DDR_MASK NO_OS_BIT(11) |
|
#define | MAX24287_GMIICR_TXCLK_EN_MASK NO_OS_BIT(10) |
|
#define | MAX24287_CR 19 |
|
#define | MAX24287_IR 20 |
|
#define | MAX24287_PAGE_IE NO_OS_BIT(10) |
|
#define | MAX24287_ID MAX24287_REG(1, 16) |
|
#define | MAX24287_GPIOCR1 MAX24287_REG(1, 17) |
|
#define | MAX24287_RST_MASK NO_OS_BIT(15) |
|
#define | MAX24287_GPO1_SEL NO_OS_GENMASK(14, 12) |
|
#define | MAX24287_GPO2_SEL NO_OS_GENMASK(11, 9) |
|
#define | MAX24287_GPIO1_SEL NO_OS_GENMASK(8, 6) |
|
#define | MAX24287_GPIO2_SEL NO_OS_GENMASK(5, 3) |
|
#define | MAX24287_GPIO3_SEL NO_OS_GENMASK(2, 0) |
|
#define | MAX24287_GPIOCR2 MAX24287_REG(1, 18) |
|
#define | MAX24287_GPIOSR MAX24287_REG(1, 19) |
|
#define | MAX24287_PTPCR1 MAX24287_REG(2, 16) |
|
#define | MAX24287_PTPCR1_W_MASK NO_OS_BIT(14) |
|
#define | MAX24287_PLL_PWDN_MASK NO_OS_BIT(5) |
|
#define | MAX24287_TX_PWDN_MASK NO_OS_BIT(3) |
|
#define | MAX24287_RX_PWDN_MASK NO_OS_BIT(2) |
|
#define | MAX24287_PAGESEL 31 |
|
#define | MAX24287_PAGE_MASK NO_OS_GENMASK(1, 0) |
|
|
enum | max24287_parallel {
MAX24287_TBI,
MAX24287_RTBI,
MAX24287_GMII,
MAX24287_RGMII,
MAX24287_MII
} |
|
enum | max24287_serial {
MAX24287_SGMII,
MAX24287_1000BASEX
} |
|
enum | max24287_speed {
MAX24287_10_HALFDUPLEX,
MAX24287_10_FULLDUPLEX,
MAX24287_100_HALFDUPLEX,
MAX24287_100_FULLDUPLEX,
MAX24287_1000_HALFDUPLEX,
MAX24287_1000_FULLDUPLEX,
MAX24287_1250_HALFDUPLEX,
MAX24287_1250_FULLDUPLEX
} |
|
|
int | max24287_init (struct max24287_desc **dev, struct max24287_init_param *param) |
|
int | max24287_remove (struct max24287_desc *dev) |
|
int | max24287_write (struct max24287_desc *dev, uint8_t addr, uint16_t val) |
|
int | max24287_read (struct max24287_desc *dev, uint8_t addr, uint16_t *val) |
|
int | max24287_write_bits (struct max24287_desc *dev, uint8_t addr, uint16_t val, uint16_t bitmask) |
|
int | max24287_hard_reset (struct max24287_desc *dev) |
|
int | max24287_soft_reset (struct max24287_desc *dev) |
|
int | max24287_config_parallel (struct max24287_desc *dev, enum max24287_parallel par, enum max24287_speed speed) |
|
int | max24287_get_config_parallel (struct max24287_desc *dev, enum max24287_parallel *par, enum max24287_speed *speed) |
|
int | max24287_config_serial (struct max24287_desc *dev, enum max24287_serial ser, enum max24287_speed speed) |
|
int | max24287_get_config_serial (struct max24287_desc *dev, enum max24287_serial *ser, enum max24287_speed *speed) |
|
int | max24287_config_link (struct max24287_desc *dev, bool up) |
|
bool | max24287_link_is_up (struct max24287_desc *dev) |
|
void | max24287_regmap (struct max24287_desc *dev) |
|
◆ MAX24287_ADDR
#define MAX24287_ADDR |
( |
|
addr | ) |
((addr) & 0x1f) |
◆ MAX24287_AN_ADV
#define MAX24287_AN_ADV 4 |
◆ MAX24287_AN_ADV_W_MASK
◆ MAX24287_AN_EN_MASK
◆ MAX24287_AN_EXP
#define MAX24287_AN_EXP 6 |
◆ MAX24287_AN_RX
◆ MAX24287_AN_RX_PAGE
◆ MAX24287_AN_START_MASK
◆ MAX24287_BASEX_MASK
◆ MAX24287_BMCR
◆ MAX24287_BMSR
◆ MAX24287_CR
◆ MAX24287_DP_RST_MASK
◆ MAX24287_DPLX_MASK
◆ MAX24287_EN_CDET_MASK
◆ MAX24287_EXT_STAT
#define MAX24287_EXT_STAT 15 |
◆ MAX24287_GMIICR
#define MAX24287_GMIICR 18 |
◆ MAX24287_GMIICR_DDR_MASK
#define MAX24287_GMIICR_DDR_MASK NO_OS_BIT(11) |
◆ MAX24287_GMIICR_DTE_DCE_MASK
#define MAX24287_GMIICR_DTE_DCE_MASK NO_OS_BIT(12) |
◆ MAX24287_GMIICR_SPD_MASK
◆ MAX24287_GMIICR_TXCLK_EN_MASK
#define MAX24287_GMIICR_TXCLK_EN_MASK NO_OS_BIT(10) |
◆ MAX24287_GMIICR_W_MASK
◆ MAX24287_GPIO1_SEL
◆ MAX24287_GPIO2_SEL
◆ MAX24287_GPIO3_SEL
◆ MAX24287_GPIOCR1
◆ MAX24287_GPIOCR2
◆ MAX24287_GPIOSR
◆ MAX24287_GPO1_SEL
◆ MAX24287_GPO2_SEL
◆ MAX24287_ID
◆ MAX24287_ID1
◆ MAX24287_ID2
◆ MAX24287_IR
◆ MAX24287_JIT_DIAG
#define MAX24287_JIT_DIAG 16 |
◆ MAX24287_LINK_ST_MASK
◆ MAX24287_LK_MASK
◆ MAX24287_PAGE
#define MAX24287_PAGE |
( |
|
addr | ) |
((addr) >> 5) |
◆ MAX24287_PAGE_IE
◆ MAX24287_PAGE_MASK
◆ MAX24287_PAGESEL
#define MAX24287_PAGESEL 31 |
◆ MAX24287_PCSCR
#define MAX24287_PCSCR 17 |
◆ MAX24287_PLL_PWDN_MASK
◆ MAX24287_PTPCR1
◆ MAX24287_PTPCR1_W_MASK
◆ MAX24287_REG
#define MAX24287_REG |
( |
|
page, |
|
|
|
addr |
|
) |
| (((page) << 5) | ((addr) & 0x1f)) |
◆ MAX24287_RST_MASK
◆ MAX24287_RX_PWDN_MASK
◆ MAX24287_SPD_MASK
◆ MAX24287_TX_PWDN_MASK
◆ MAX24287_WD_DIS_MASK
◆ max24287_parallel
Enumerator |
---|
MAX24287_TBI | |
MAX24287_RTBI | |
MAX24287_GMII | |
MAX24287_RGMII | |
MAX24287_MII | |
◆ max24287_serial
Enumerator |
---|
MAX24287_SGMII | |
MAX24287_1000BASEX | |
◆ max24287_speed
Enumerator |
---|
MAX24287_10_HALFDUPLEX | |
MAX24287_10_FULLDUPLEX | |
MAX24287_100_HALFDUPLEX | |
MAX24287_100_FULLDUPLEX | |
MAX24287_1000_HALFDUPLEX | |
MAX24287_1000_FULLDUPLEX | |
MAX24287_1250_HALFDUPLEX | |
MAX24287_1250_FULLDUPLEX | |
◆ max24287_config_link()
◆ max24287_config_parallel()
◆ max24287_config_serial()
◆ max24287_get_config_parallel()
◆ max24287_get_config_serial()
◆ max24287_hard_reset()
◆ max24287_init()
◆ max24287_link_is_up()
◆ max24287_read()
int max24287_read |
( |
struct max24287_desc * |
dev, |
|
|
uint8_t |
addr, |
|
|
uint16_t * |
val |
|
) |
| |
◆ max24287_regmap()
◆ max24287_remove()
◆ max24287_soft_reset()
◆ max24287_write()
int max24287_write |
( |
struct max24287_desc * |
dev, |
|
|
uint8_t |
addr, |
|
|
uint16_t |
val |
|
) |
| |
◆ max24287_write_bits()
int max24287_write_bits |
( |
struct max24287_desc * |
dev, |
|
|
uint8_t |
addr, |
|
|
uint16_t |
val, |
|
|
uint16_t |
bitmask |
|
) |
| |