1# 2# Copyright (c) 2021, Weidmueller Interface GmbH & Co. KG 3# SPDX-License-Identifier: Apache-2.0 4# 5 6description: Xilinx GEM Ethernet controller 7 8compatible: "xlnx,gem" 9 10include: ethernet-controller.yaml 11 12properties: 13 reg: 14 required: true 15 16 interrupts: 17 required: true 18 19 clock-frequency: 20 type: int 21 required: true 22 description: | 23 Specifies the base clock frequency from which the GEM's TX clock 24 frequency will be derived using two dividers in the respective GEM's 25 clock control register in the CRL_APB. The GEM's TX clock frequency 26 is determined by the current link speed reported by the PHY, to 27 which it will be adjusted at run-time. Therefore, the value of this 28 item must be set to the clock frequency of the PLL supplying the 29 respective GEM's TX clock - by default, this is the IO PLL. 30 31 mdc-divider: 32 type: int 33 required: true 34 description: | 35 The MDC clock divider for the respective GEM. This is the divider 36 applied to the LPD_LSBUS clock in order to derive MDIO interface 37 clock driving communications with the attached PHY. Refer to the 38 ZynqMP register documentation (ug1087), network_config (GEM) Register 39 Description, bits [20:18] to determine the appropriate divider for 40 the current target's LPD LSBUS clock frequency. 41 42 init-mdio-phy: 43 type: boolean 44 description: | 45 Activates the management of a PHY associated with the controller in- 46 stance. If this parameter is activated at the board level, the de- 47 fault values of the associated parameters mdio-phy-address, phy-poll- 48 interval, link-speed and advertise-lower-link-speeds should be checked 49 and overwritten at the board level if required. 50 51 mdio-phy-address: 52 type: int 53 required: true 54 description: | 55 The address on the MDIO bus of the PHY associated with the controller 56 instance. Set the address to 0 for auto-detection (first responding 57 PHY will be claimed by the driver, watch out in case of shared MDIO 58 use), or to a fixed address between 1 and 32. 59 60 phy-poll-interval: 61 type: int 62 required: true 63 description: | 64 PHY status polling interval in milliseconds for a driver instance 65 managing an associated PHY. 66 67 link-speed: 68 type: int 69 required: true 70 description: | 71 Nominal link speed. If no PHY is managed by an instance of this driver, 72 the respective controller will be configured to match the link speed 73 specified here. If a PHY is managed by the driver, advertisement of 74 the link speed specified here will be requested. If the optional pro- 75 perty advertise-lower-link-speeds is set, advertisement of the link 76 speed specified here plus any valid link speed below this value will 77 be requested. 78 enum: 79 - 1 80 - 2 81 - 3 82 83 advertise-lower-link-speeds: 84 type: boolean 85 description: | 86 Indicates to a driver instance which manages an associated PHY on 87 the MDIO bus to include link speeds lower than the nominal value 88 set in the link-speed property in the advertisement when requesting 89 link speed auto-negotiation with a peer system. 90 91 handle-rx-in-isr: 92 type: boolean 93 description: | 94 Moves the handling of the frame received interrupt including the 95 transfer of packet data from the DMA to network packet buffers and 96 the subsequent propagation of the received packets to the network 97 stack into the context of the ISR. Due to the unpredictability of 98 the runtime of the ISR whenever large amounts of data are received, 99 handling of the RX interrupt is normally deferred to the context 100 of the system work queue. 101 102 handle-tx-in-workq: 103 type: boolean 104 description: | 105 Moves the handling of the frame transmission done interrupt into the 106 context of the system work queue. By default, TX done handling is per- 107 formed in the context of the ISR, as it only involves a limited number 108 of memory accesses. This option CAN NOT be used if any component ex- 109 ists within the current system setup that triggers the transmission 110 of packets from within the context of the system work queue! 111 112 amba-ahb-dbus-width: 113 type: int 114 required: true 115 description: AMBA AHB data bus width. 116 enum: 117 - 0 118 - 1 119 - 2 120 121 amba-ahb-burst-length: 122 type: int 123 required: true 124 description: AMBA AHB burst length for DMA operations. 125 enum: 126 - 1 127 - 4 128 - 8 129 - 16 130 131 hw-rx-buffer-size: 132 type: int 133 required: true 134 description: | 135 Hardware RX buffer size, scalable between 1 kB and 8 kB, where the full 136 8 kB should be the default. 137 enum: 138 - 0 139 - 1 140 - 2 141 - 3 142 143 hw-rx-buffer-offset: 144 type: int 145 required: true 146 description: | 147 Data offset in the hardware RX packet buffer (in bytes). Valid range is 148 0-3 bytes. 149 150 hw-tx-buffer-size-full: 151 type: boolean 152 description: | 153 When set, the hardware TX data buffer will make use of the full 4 kB 154 that are available. If unset, the hardware TX data buffer will be 155 limited to 2 kB. 156 157 rx-buffer-descriptors: 158 type: int 159 required: true 160 description: | 161 The number of descriptors to be allocated in the RX buffer descriptor 162 ring. Must be <= 255. 163 164 rx-buffer-size: 165 type: int 166 required: true 167 description: | 168 The size of each receive data buffer, must be a multiple of 8, highest 169 valid value is 16320, values less than 64 are not really useful. 170 171 tx-buffer-descriptors: 172 type: int 173 required: true 174 description: | 175 The number of descriptors to be allocated in the TX buffer descriptor 176 ring. Must be <= 255. 177 178 tx-buffer-size: 179 type: int 180 required: true 181 description: | 182 The size of each transmit data buffer, highest valid value is 16380, 183 values less than 64 are not really useful. 184 185 ignore-ipg-rxer: 186 type: boolean 187 description: | 188 Optional feature flag - Ignore IPG rx_er. When set, rx_er has no 189 effect on the GEM's operation when rx_dv is low. Set this when using 190 the RGMII wrapper in half-duplex mode. 191 192 disable-reject-nsp: 193 type: boolean 194 description: | 195 Optional feature flag - Receive bad preamble. When set, frames with 196 non-standard preamble will not be rejected. 197 198 ipg-stretch: 199 type: boolean 200 description: | 201 Optional feature flag - Enable IPG stretch. When set, the transmit 202 IPG can be increased above 96 bit times depending on the previous 203 frame length using the IPG stretch register. 204 205 sgmii-mode: 206 type: boolean 207 description: | 208 Optional feature flag - Enable SGMII mode. Changes the behaviour of 209 the auto-negotiation advertisement and link partner ability registers 210 to meet the requirements of SGMII and reduces the duration of the link 211 timer from 10 ms to 1.6 ms. 212 213 disable-reject-fcs-crc-errors: 214 type: boolean 215 description: | 216 Optional feature flag - Disable rejection of FCS/CRC errors. 217 When set, frames with FCS/CRC errors will not be rejected. FCS error 218 statistics will still be collected for frames with bad FCS and FCS 219 status will be recorded in the frame's DMA descriptor. This option 220 should not be activated for normal operation. 221 222 rx-halfdup-while-tx: 223 type: boolean 224 description: | 225 Optional feature flag - Enable frames to be received in half-duplex 226 mode while transmitting. 227 228 rx-checksum-offload: 229 type: boolean 230 description: | 231 Optional feature flag - Enable RX IP/TCP/UDP checksum offload to 232 hardware. Frames with bad IP, TCP or UDP checksums will be discarded. 233 This option is NOT supported by the QEMU implementation of the GEM! 234 235 tx-checksum-offload: 236 type: boolean 237 description: | 238 Optional feature flag - Enable TX IP/TCP/UDP checksum offload to 239 hardware. This option is NOT supported by the QEMU implementation 240 of the GEM! 241 242 disable-pause-copy: 243 type: boolean 244 description: | 245 Optional feature flag - Do not copy received pause frames to memory. 246 Set this option in order to prevent valid pause frames from being 247 copied to memory. When set, pause frames are not copied to memory 248 regardless of the state of the copy all frames bit, whether a hash 249 match is found or whether a type ID match is identified. If a desti- 250 nation address match is found the pause frame will be copied to 251 memory. Note that valid pause frames received will still increment 252 pause statistics and pause the transmission of frames as required. 253 254 discard-rx-fcs: 255 type: boolean 256 description: | 257 Optional feature flag - Remove FCS of received frames. 258 When set, received frames will be written to memory without their 259 frame check sequence (last 4 bytes). The frame length indicated will 260 be reduced by four bytes in this mode. 261 262 discard-rx-length-errors: 263 type: boolean 264 description: | 265 Optional feature flag - Discard frames with length field errors. 266 When set, frames with a measured length shorter than the extracted 267 length field (as indicated by bytes 13 and 14 in a non-VLAN tagged 268 frame) will be discarded. This only applies to frames with a length 269 field less than 0x0600. 270 271 pause-frame: 272 type: boolean 273 description: | 274 Optional feature flag - Enable pause. When set, transmission will 275 pause if a non zero 802.3 classic pause frame is received and PFC 276 has not been negotiated. 277 278 tbi: 279 type: boolean 280 description: | 281 Optional feature flag - Enable TBI. When set, the TBI interface is en- 282 bled instead of the GMII/MII interface. 283 284 ext-address-match: 285 type: boolean 286 description: | 287 Optional feature flag - Enable external address match. When set, the 288 external address match interface can be used to copy frames to memory. 289 290 long-frame-rx-support: 291 type: boolean 292 description: | 293 Optional feature flag - Enable reception of 1536 byte frames. 294 Normally, the GEM rejects any frame above 1518 bytes. 295 296 unicast-hash: 297 type: boolean 298 description: | 299 Optional feature flag - Enable unicast hash. When set, unicast frames 300 will be accepted when the 6 bit hash function of the destination 301 address points to a bit that is set in the hash register. 302 303 multicast-hash: 304 type: boolean 305 description: | 306 Optional feature flag - Enable multicast hash. When set, multicast 307 frames will be accepted when the 6 bit hash function of the desti- 308 nation address points to a bit that is set in the hash register. 309 310 reject-broadcast: 311 type: boolean 312 description: | 313 Optional feature flag - Reject broadcast frames. When set, frames 314 addressed to the all-ones broadcast address will be rejected. 315 316 promiscuous-mode: 317 type: boolean 318 description: | 319 Optional feature flag - Enable promiscuous mode. When set, all valid 320 frames will be accepted. 321 322 discard-non-vlan: 323 type: boolean 324 description: Optional feature flag - Discard non-VLAN frames. When set, 325 only VLAN tagged frames will be passed to the address matching logic. 326 327 full-duplex: 328 type: boolean 329 description: | 330 Optional feature flag - Enables full duplex reception and transmission. 331 332 discard-rx-frame-ahb-unavail: 333 type: boolean 334 description: | 335 Optional feature flag - Discard received packets when no AHB resource 336 is available. 337 338 ahb-packet-endian-swap: 339 type: boolean 340 description: | 341 Optional feature flag - Enable AHB packet data endianness swap to big 342 endian. If this flag is not set, data will be little endian. 343 344 ahb-md-endian-swap: 345 type: boolean 346 description: | 347 Optional feature flag - Enable AHB management descriptor data endian- 348 ness swap to big endian. If this flag is not set, data will be little 349 endian. 350