xref: /freebsd/sys/contrib/device-tree/Bindings/net/amd-xgbe.txt (revision c66ec88fed842fbaad62c30d510644ceb7bd2d71)
1*c66ec88fSEmmanuel Vadot* AMD 10GbE driver (amd-xgbe)
2*c66ec88fSEmmanuel Vadot
3*c66ec88fSEmmanuel VadotRequired properties:
4*c66ec88fSEmmanuel Vadot- compatible: Should be "amd,xgbe-seattle-v1a"
5*c66ec88fSEmmanuel Vadot- reg: Address and length of the register sets for the device
6*c66ec88fSEmmanuel Vadot   - MAC registers
7*c66ec88fSEmmanuel Vadot   - PCS registers
8*c66ec88fSEmmanuel Vadot   - SerDes Rx/Tx registers
9*c66ec88fSEmmanuel Vadot   - SerDes integration registers (1/2)
10*c66ec88fSEmmanuel Vadot   - SerDes integration registers (2/2)
11*c66ec88fSEmmanuel Vadot- interrupts: Should contain the amd-xgbe interrupt(s). The first interrupt
12*c66ec88fSEmmanuel Vadot  listed is required and is the general device interrupt. If the optional
13*c66ec88fSEmmanuel Vadot  amd,per-channel-interrupt property is specified, then one additional
14*c66ec88fSEmmanuel Vadot  interrupt for each DMA channel supported by the device should be specified.
15*c66ec88fSEmmanuel Vadot  The last interrupt listed should be the PCS auto-negotiation interrupt.
16*c66ec88fSEmmanuel Vadot- clocks:
17*c66ec88fSEmmanuel Vadot   - DMA clock for the amd-xgbe device (used for calculating the
18*c66ec88fSEmmanuel Vadot     correct Rx interrupt watchdog timer value on a DMA channel
19*c66ec88fSEmmanuel Vadot     for coalescing)
20*c66ec88fSEmmanuel Vadot   - PTP clock for the amd-xgbe device
21*c66ec88fSEmmanuel Vadot- clock-names: Should be the names of the clocks
22*c66ec88fSEmmanuel Vadot   - "dma_clk" for the DMA clock
23*c66ec88fSEmmanuel Vadot   - "ptp_clk" for the PTP clock
24*c66ec88fSEmmanuel Vadot- phy-mode: See ethernet.txt file in the same directory
25*c66ec88fSEmmanuel Vadot
26*c66ec88fSEmmanuel VadotOptional properties:
27*c66ec88fSEmmanuel Vadot- dma-coherent: Present if dma operations are coherent
28*c66ec88fSEmmanuel Vadot- amd,per-channel-interrupt: Indicates that Rx and Tx complete will generate
29*c66ec88fSEmmanuel Vadot  a unique interrupt for each DMA channel - this requires an additional
30*c66ec88fSEmmanuel Vadot  interrupt be configured for each DMA channel
31*c66ec88fSEmmanuel Vadot- amd,speed-set: Speed capabilities of the device
32*c66ec88fSEmmanuel Vadot    0 - 1GbE and 10GbE (default)
33*c66ec88fSEmmanuel Vadot    1 - 2.5GbE and 10GbE
34*c66ec88fSEmmanuel Vadot
35*c66ec88fSEmmanuel VadotThe MAC address will be determined using the optional properties defined in
36*c66ec88fSEmmanuel Vadotethernet.txt.
37*c66ec88fSEmmanuel Vadot
38*c66ec88fSEmmanuel VadotThe following optional properties are represented by an array with each
39*c66ec88fSEmmanuel Vadotvalue corresponding to a particular speed. The first array value represents
40*c66ec88fSEmmanuel Vadotthe setting for the 1GbE speed, the second value for the 2.5GbE speed and
41*c66ec88fSEmmanuel Vadotthe third value for the 10GbE speed.  All three values are required if the
42*c66ec88fSEmmanuel Vadotproperty is used.
43*c66ec88fSEmmanuel Vadot- amd,serdes-blwc: Baseline wandering correction enablement
44*c66ec88fSEmmanuel Vadot    0 - Off
45*c66ec88fSEmmanuel Vadot    1 - On
46*c66ec88fSEmmanuel Vadot- amd,serdes-cdr-rate: CDR rate speed selection
47*c66ec88fSEmmanuel Vadot- amd,serdes-pq-skew: PQ (data sampling) skew
48*c66ec88fSEmmanuel Vadot- amd,serdes-tx-amp: TX amplitude boost
49*c66ec88fSEmmanuel Vadot- amd,serdes-dfe-tap-config: DFE taps available to run
50*c66ec88fSEmmanuel Vadot- amd,serdes-dfe-tap-enable: DFE taps to enable
51*c66ec88fSEmmanuel Vadot
52*c66ec88fSEmmanuel VadotExample:
53*c66ec88fSEmmanuel Vadot	xgbe@e0700000 {
54*c66ec88fSEmmanuel Vadot		compatible = "amd,xgbe-seattle-v1a";
55*c66ec88fSEmmanuel Vadot		reg = <0 0xe0700000 0 0x80000>,
56*c66ec88fSEmmanuel Vadot		      <0 0xe0780000 0 0x80000>,
57*c66ec88fSEmmanuel Vadot		      <0 0xe1240800 0 0x00400>,
58*c66ec88fSEmmanuel Vadot		      <0 0xe1250000 0 0x00060>,
59*c66ec88fSEmmanuel Vadot		      <0 0xe1250080 0 0x00004>;
60*c66ec88fSEmmanuel Vadot		interrupt-parent = <&gic>;
61*c66ec88fSEmmanuel Vadot		interrupts = <0 325 4>,
62*c66ec88fSEmmanuel Vadot			     <0 326 1>, <0 327 1>, <0 328 1>, <0 329 1>,
63*c66ec88fSEmmanuel Vadot			     <0 323 4>;
64*c66ec88fSEmmanuel Vadot		amd,per-channel-interrupt;
65*c66ec88fSEmmanuel Vadot		clocks = <&xgbe_dma_clk>, <&xgbe_ptp_clk>;
66*c66ec88fSEmmanuel Vadot		clock-names = "dma_clk", "ptp_clk";
67*c66ec88fSEmmanuel Vadot		phy-mode = "xgmii";
68*c66ec88fSEmmanuel Vadot		mac-address = [ 02 a1 a2 a3 a4 a5 ];
69*c66ec88fSEmmanuel Vadot		amd,speed-set = <0>;
70*c66ec88fSEmmanuel Vadot		amd,serdes-blwc = <1>, <1>, <0>;
71*c66ec88fSEmmanuel Vadot		amd,serdes-cdr-rate = <2>, <2>, <7>;
72*c66ec88fSEmmanuel Vadot		amd,serdes-pq-skew = <10>, <10>, <30>;
73*c66ec88fSEmmanuel Vadot		amd,serdes-tx-amp = <15>, <15>, <10>;
74*c66ec88fSEmmanuel Vadot		amd,serdes-dfe-tap-config = <3>, <3>, <1>;
75*c66ec88fSEmmanuel Vadot		amd,serdes-dfe-tap-enable = <0>, <0>, <127>;
76*c66ec88fSEmmanuel Vadot	};
77