1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21#ifndef __FSL_PHY_H__
22#define __FSL_PHY_H__
23
24#include <net.h>
25#include <miiphy.h>
26#include <asm/fsl_enet.h>
27
28
29#define PHY_EXT_PAGE_ACCESS 0x1f
30
31
32#define MIIMCFG_RESET_MGMT 0x80000000
33#define MIIMCFG_MGMT_CLOCK_SELECT 0x00000007
34#define MIIMCFG_INIT_VALUE 0x00000003
35
36
37#define MIIMCOM_READ_CYCLE 0x00000001
38#define MIIMCOM_SCAN_CYCLE 0x00000002
39
40
41#define MIIMADD_PHY_ADDR_SHIFT 8
42
43
44#define MIIMIND_BUSY 0x00000001
45#define MIIMIND_NOTVALID 0x00000004
46
47void tsec_local_mdio_write(struct tsec_mii_mng *phyregs, int port_addr,
48 int dev_addr, int reg, int value);
49int tsec_local_mdio_read(struct tsec_mii_mng *phyregs, int port_addr,
50 int dev_addr, int regnum);
51int tsec_phy_read(struct mii_dev *bus, int addr, int dev_addr, int regnum);
52int tsec_phy_write(struct mii_dev *bus, int addr, int dev_addr, int regnum,
53 u16 value);
54
55struct fsl_pq_mdio_info {
56 struct tsec_mii_mng *regs;
57 char *name;
58};
59int fsl_pq_mdio_init(bd_t *bis, struct fsl_pq_mdio_info *info);
60
61#endif
62