Zephyr API Documentation  3.0.0
A Scalable Open Source RTOS
3.0.0
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
xlnx_gem.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2021, Weidmueller Interface GmbH & Co. KG
3 * SPDX-License-Identifier: Apache-2.0
4 */
5
6#ifndef ZEPHYR_INCLUDE_DT_BINDINGS_ETHERNET_XLNX_GEM_H_
7#define ZEPHYR_INCLUDE_DT_BINDINGS_ETHERNET_XLNX_GEM_H_
8
9/* PHY auto-detection alias */
10#define XLNX_GEM_PHY_AUTO_DETECT 0
11
12/* MDC divider values */
13/* The following values are supported by both the Zynq-7000 and the ZynqMP */
14#define XLNX_GEM_MDC_DIVIDER_8 0 /* cpu_1x or LPD_LSBUS_CLK < 20 MHz */
15#define XLNX_GEM_MDC_DIVIDER_16 1 /* cpu_1x or LPD_LSBUS_CLK 20 - 40 MHz */
16#define XLNX_GEM_MDC_DIVIDER_32 2 /* cpu_1x or LPD_LSBUS_CLK 40 - 80 MHz */
17/*
18 * According to the ZynqMP's gem.network_config register documentation,
19 * divider /32 is to be used for a 100 MHz LPD LSBUS clock.
20 */
21/* The following values are supported by the Zynq-7000 only */
22#define XLNX_GEM_MDC_DIVIDER_48 3 /* cpu_1x 80 - 120 MHz */
23#define XLNX_GEM_MDC_DIVIDER_64 4 /* cpu_1x 120 - 160 MHz */
24#define XLNX_GEM_MDC_DIVIDER_96 5 /* cpu_1x 160 - 240 MHz */
25#define XLNX_GEM_MDC_DIVIDER_128 6 /* cpu_1x 240 - 320 MHz */
26#define XLNX_GEM_MDC_DIVIDER_224 7 /* cpu_1x 320 - 540 MHz */
27
28/* Link speed values */
29#define XLNX_GEM_LINK_SPEED_10MBIT 1
30#define XLNX_GEM_LINK_SPEED_100MBIT 2
31#define XLNX_GEM_LINK_SPEED_1GBIT 3
32
33/* AMBA AHB data bus width */
34#define XLNX_GEM_AMBA_AHB_DBUS_WIDTH_32BIT 0
35#define XLNX_GEM_AMBA_AHB_DBUS_WIDTH_64BIT 1
36#define XLNX_GEM_AMBA_AHB_DBUS_WIDTH_128BIT 2
37
38/* AMBA AHB burst length */
39#define XLNX_GEM_AMBA_AHB_BURST_SINGLE 1
40#define XLNX_GEM_AMBA_AHB_BURST_INCR4 4
41#define XLNX_GEM_AMBA_AHB_BURST_INCR8 8
42#define XLNX_GEM_AMBA_AHB_BURST_INCR16 16
43
44/* Hardware RX buffer size */
45#define XLNX_GEM_HW_RX_BUFFER_SIZE_1KB 0
46#define XLNX_GEM_HW_RX_BUFFER_SIZE_2KB 1
47#define XLNX_GEM_HW_RX_BUFFER_SIZE_4KB 2
48#define XLNX_GEM_HW_RX_BUFFER_SIZE_8KB 3
49
50#endif /* ZEPHYR_INCLUDE_DT_BINDINGS_ETHERNET_XLNX_GEM_H_ */