Zephyr API Documentation
4.0.0
A Scalable Open Source RTOS
4.0.0
Toggle main menu visibility
Main Page
Related Pages
Topics
Data Structures
Data Structures
Data Structure Index
Data Fields
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
Enumerator
Files
File List
Globals
All
$
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Variables
$
a
b
c
d
f
g
h
i
k
l
m
n
o
p
r
s
t
u
x
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Macros
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
▼
Zephyr API Documentation
►
Introduction
Deprecated List
►
Topics
►
Data Structures
▼
Files
▼
File List
►
doc
►
kernel
►
lib
►
subsys
▼
zephyr
►
acpi
►
app_memory
►
arch
►
audio
►
bluetooth
►
canbus
►
console
►
crypto
►
data
►
debug
►
devicetree
►
dfu
►
display
►
drivers
►
dsp
►
dt-bindings
►
fs
►
input
►
internal
►
ipc
►
kernel
►
linker
►
llext
►
logging
►
lorawan
►
math
►
mem_mgmt
►
mgmt
►
misc
►
modbus
►
modem
►
multi_heap
▼
net
►
conn_mgr
►
http
►
prometheus
buf.h
►
canbus.h
►
capture.h
►
coap.h
►
coap_client.h
►
coap_link_format.h
►
coap_mgmt.h
►
coap_service.h
►
conn_mgr_connectivity.h
►
conn_mgr_connectivity_impl.h
►
conn_mgr_monitor.h
►
dhcpv4.h
►
dhcpv4_server.h
►
dhcpv6.h
►
dns_resolve.h
►
dns_sd.h
►
dsa.h
dummy.h
►
ethernet.h
►
ethernet_bridge.h
►
ethernet_mgmt.h
►
ethernet_vlan.h
►
gptp.h
►
hostname.h
►
icmp.h
►
ieee802154.h
►
ieee802154_ie.h
►
ieee802154_mgmt.h
ieee802154_pkt.h
►
ieee802154_radio.h
►
ieee802154_radio_openthread.h
►
igmp.h
►
ipv4_autoconf.h
►
lldp.h
loopback.h
►
lwm2m.h
►
lwm2m_path.h
►
mdio.h
►
mdns_responder.h
►
mii.h
►
mld.h
►
mqtt.h
►
mqtt_sn.h
►
net_config.h
►
net_context.h
►
net_core.h
►
net_event.h
►
net_if.h
►
net_ip.h
►
net_l2.h
►
net_linkaddr.h
►
net_mgmt.h
net_offload.h
►
net_pkt.h
►
net_pkt_filter.h
►
net_stats.h
►
net_time.h
►
net_timeout.h
►
offloaded_netdev.h
►
openthread.h
►
phy.h
►
ppp.h
►
promiscuous.h
►
ptp.h
►
ptp_time.h
►
sntp.h
►
socket.h
►
socket_net_mgmt.h
►
socket_offload.h
socket_poll.h
►
socket_select.h
►
socket_service.h
socket_types.h
►
socketcan.h
►
socketcan_utils.h
►
socketutils.h
►
tftp.h
►
tls_credentials.h
►
trickle.h
udp.h
►
virtual.h
virtual_mgmt.h
►
websocket.h
►
wifi.h
►
wifi_credentials.h
►
wifi_mgmt.h
►
wifi_nm.h
►
wifi_utils.h
►
zperf.h
►
platform
►
pm
►
posix
►
random
►
retention
►
rtio
►
sd
►
sensing
►
settings
►
shell
►
sip_svc
►
stats
►
storage
►
sys
►
task_wdt
►
timing
►
toolchain
►
tracing
►
usb
►
usb_c
►
xen
►
zbus
►
zvfs
►
bindesc.h
►
cache.h
►
device.h
►
devicetree.h
►
fatal.h
►
fatal_types.h
►
init.h
►
irq.h
►
irq_multilevel.h
►
irq_nextlevel.h
►
irq_offload.h
►
kernel.h
kernel_includes.h
►
kernel_structs.h
►
kernel_version.h
►
net_buf.h
►
shared_irq.h
►
smf.h
►
spinlock.h
►
sw_isr_table.h
►
sys_clock.h
►
syscall.h
►
toolchain.h
types.h
►
Globals
•
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Modules
Pages
Loading...
Searching...
No Matches
mii.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2016 Piotr Mienkowski
3
* Copyright 2022 NXP
4
*
5
* SPDX-License-Identifier: Apache-2.0
6
*/
7
12
#ifndef ZEPHYR_INCLUDE_NET_MII_H_
13
#define ZEPHYR_INCLUDE_NET_MII_H_
14
24
/* MII management registers */
26
#define MII_BMCR 0x0
28
#define MII_BMSR 0x1
30
#define MII_PHYID1R 0x2
32
#define MII_PHYID2R 0x3
34
#define MII_ANAR 0x4
36
#define MII_ANLPAR 0x5
38
#define MII_ANER 0x6
40
#define MII_ANNPTR 0x7
42
#define MII_ANLPRNPR 0x8
44
#define MII_1KTCR 0x9
46
#define MII_1KSTSR 0xa
48
#define MII_MMD_ACR 0xd
50
#define MII_MMD_AADR 0xe
52
#define MII_ESTAT 0xf
53
54
/* Basic Mode Control Register (BMCR) bit definitions */
56
#define MII_BMCR_RESET (1 << 15)
58
#define MII_BMCR_LOOPBACK (1 << 14)
60
#define MII_BMCR_SPEED_LSB (1 << 13)
62
#define MII_BMCR_AUTONEG_ENABLE (1 << 12)
64
#define MII_BMCR_POWER_DOWN (1 << 11)
66
#define MII_BMCR_ISOLATE (1 << 10)
68
#define MII_BMCR_AUTONEG_RESTART (1 << 9)
70
#define MII_BMCR_DUPLEX_MODE (1 << 8)
72
#define MII_BMCR_SPEED_MSB (1 << 6)
74
#define MII_BMCR_SPEED_MASK (1 << 6 | 1 << 13)
76
#define MII_BMCR_SPEED_10 (0 << 6 | 0 << 13)
78
#define MII_BMCR_SPEED_100 (0 << 6 | 1 << 13)
80
#define MII_BMCR_SPEED_1000 (1 << 6 | 0 << 13)
81
82
/* Basic Mode Status Register (BMSR) bit definitions */
84
#define MII_BMSR_100BASE_T4 (1 << 15)
86
#define MII_BMSR_100BASE_X_FULL (1 << 14)
88
#define MII_BMSR_100BASE_X_HALF (1 << 13)
90
#define MII_BMSR_10_FULL (1 << 12)
92
#define MII_BMSR_10_HALF (1 << 11)
94
#define MII_BMSR_100BASE_T2_FULL (1 << 10)
96
#define MII_BMSR_100BASE_T2_HALF (1 << 9)
98
#define MII_BMSR_EXTEND_STATUS (1 << 8)
100
#define MII_BMSR_MF_PREAMB_SUPPR (1 << 6)
102
#define MII_BMSR_AUTONEG_COMPLETE (1 << 5)
104
#define MII_BMSR_REMOTE_FAULT (1 << 4)
106
#define MII_BMSR_AUTONEG_ABILITY (1 << 3)
108
#define MII_BMSR_LINK_STATUS (1 << 2)
110
#define MII_BMSR_JABBER_DETECT (1 << 1)
112
#define MII_BMSR_EXTEND_CAPAB (1 << 0)
113
114
/* Auto-negotiation Advertisement Register (ANAR) bit definitions */
115
/* Auto-negotiation Link Partner Ability Register (ANLPAR) bit definitions */
117
#define MII_ADVERTISE_NEXT_PAGE (1 << 15)
119
#define MII_ADVERTISE_LPACK (1 << 14)
121
#define MII_ADVERTISE_REMOTE_FAULT (1 << 13)
123
#define MII_ADVERTISE_ASYM_PAUSE (1 << 11)
125
#define MII_ADVERTISE_PAUSE (1 << 10)
127
#define MII_ADVERTISE_100BASE_T4 (1 << 9)
129
#define MII_ADVERTISE_100_FULL (1 << 8)
131
#define MII_ADVERTISE_100_HALF (1 << 7)
133
#define MII_ADVERTISE_10_FULL (1 << 6)
135
#define MII_ADVERTISE_10_HALF (1 << 5)
137
#define MII_ADVERTISE_SEL_MASK (0x1F << 0)
139
#define MII_ADVERTISE_SEL_IEEE_802_3 0x01
140
141
/* 1000BASE-T Control Register bit definitions */
143
#define MII_ADVERTISE_1000_FULL (1 << 9)
145
#define MII_ADVERTISE_1000_HALF (1 << 8)
146
148
#define MII_ADVERTISE_ALL (MII_ADVERTISE_10_HALF | MII_ADVERTISE_10_FULL |\
149
MII_ADVERTISE_100_HALF | MII_ADVERTISE_100_FULL |\
150
MII_ADVERTISE_SEL_IEEE_802_3)
148
#define MII_ADVERTISE_ALL (MII_ADVERTISE_10_HALF | MII_ADVERTISE_10_FULL |\
…
151
152
/* Extended Status Register bit definitions */
154
#define MII_ESTAT_1000BASE_X_FULL (1 << 15)
156
#define MII_ESTAT_1000BASE_X_HALF (1 << 14)
158
#define MII_ESTAT_1000BASE_T_FULL (1 << 13)
160
#define MII_ESTAT_1000BASE_T_HALF (1 << 12)
161
162
/* MMD Access Control Register (MII_MMD_ACR) Register bit definitions */
164
#define MII_MMD_ACR_DEVAD_MASK (0x1F << 0)
166
#define MII_MMD_ACR_ADDR (0x00 << 14)
167
#define MII_MMD_ACR_DATA_NO_POS_INC (0x01 << 14)
168
#define MII_MMD_ACR_DATA_RW_POS_INC (0x10 << 14)
169
#define MII_MMD_ACR_DATA_W_POS_INC (0x11 << 14)
170
175
#endif
/* ZEPHYR_INCLUDE_NET_MII_H_ */
zephyr
net
mii.h
Generated on Sat Nov 16 2024 04:55:04 for Zephyr API Documentation by
1.12.0