Skip to content

Commit 7339709

Browse files
NET:ETH:ALTERA: SM Ethernet 10G : Base branch creation
Altera Ethernet X-Tile drivers with support for Agilex5 Ethernet transceivers Signed-off-by: Krishna Kumar S R <[email protected]>
2 parents 7b49765 + 48b6571 commit 7339709

File tree

103 files changed

+29670
-125
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+29670
-125
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
* Intel QSFP Memory controller subsystem
2+
3+
Required properties:
4+
- compatible: Should be "intel,qsfp-mem"
5+
- reg: Address and length of the register set for the device. It contains
6+
the information of registers in the same order as described by reg-names
7+
- reg-names: Should contain the reg names
8+
9+
Example:
10+
11+
qsfp_eth0: qsfp-eth0 {
12+
compatible = "intel,qsfp-mem";
13+
reg-names = "qsfp-mem-controller";
14+
reg = <0x00000001 0x80112000 0x00001000>,
15+
status = "okay";
16+
};

SECURITY.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Security Policy #
2+
Intel is committed to rapidly addressing security vulnerabilities affecting our customers and providing clear guidance on the solution, impact, severity and mitigation.
3+
4+
## Reporting a Vulnerability ##
5+
Please report any security vulnerabilities in this project **[utilizing the guidelines here](https://www.intel.com/content/www/ us/en/security-center/vulnerability-handling-guidelines.html)**.

arch/arm64/boot/dts/intel/Makefile

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,19 @@
11
# SPDX-License-Identifier: GPL-2.0-only
2-
dtb-$(CONFIG_ARCH_INTEL_SOCFPGA) += socfpga_agilex_n6000.dtb \
2+
dtb-$(CONFIG_ARCH_INTEL_SOCFPGA) += socfpga_n6000_10G_ptp.dtb \
3+
socfpga_agilex5_eth_1p10g.dtb \
4+
socfpga_n6000_10G_rel3_ptp.dtb \
5+
socfpga_n6000_25G_ptp.dtb \
6+
socfpga_n6000_25G_rel3_ptp.dtb \
7+
socfpga_fm87_ftile_10g.dtb \
8+
socfpga_agilex_n6000.dtb \
39
socfpga_agilex_socdk.dtb \
410
socfpga_agilex_socdk_atfboot.dtb \
11+
socfpga_fm87_ftile_10g_1port.dtb \
12+
socfpga_fm87_ftile_25g_ptp.dtb \
13+
socfpga_fm87_ftile_10g_2port_ptp.dtb \
14+
socfpga_fm87_ftile_25g_2port_ptp.dtb \
15+
socfpga_fm87_ftile_25g_2port_mcq_ptp.dtb \
16+
socfpga_fm87_ftile_25g_1port_mcq_ptp.dtb \
517
socfpga_agilex_socdk_nand.dtb \
618
socfpga_agilex3_socdk.dtb \
719
socfpga_agilex5_socdk.dtb \
Lines changed: 207 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,207 @@
1+
// SPDX-License-Identifier: GPL-2.0
2+
/*
3+
* Copyright(C) 2022, Intel Corporation
4+
*/
5+
6+
/ {
7+
model = "SoCFPGA Agilex SoCDK";
8+
9+
aliases {
10+
serial0 = &uart0;
11+
ethernet0 = &gmac0;
12+
ethernet1 = &gmac1;
13+
ethernet2 = &gmac2;
14+
};
15+
16+
chosen {
17+
stdout-path = "serial0:115200n8";
18+
};
19+
20+
leds {
21+
compatible = "gpio-leds";
22+
hps0 {
23+
label = "hps_led0";
24+
gpios = <&portb 20 GPIO_ACTIVE_HIGH>;
25+
};
26+
27+
hps1 {
28+
label = "hps_led1";
29+
gpios = <&portb 19 GPIO_ACTIVE_HIGH>;
30+
};
31+
32+
hps2 {
33+
label = "hps_led2";
34+
gpios = <&portb 21 GPIO_ACTIVE_HIGH>;
35+
};
36+
};
37+
38+
memory {
39+
device_type = "memory";
40+
/* We expect the bootloader to fill in the reg */
41+
reg = <0 0 0 0>;
42+
};
43+
};
44+
45+
&gpio1 {
46+
status = "okay";
47+
};
48+
49+
&gmac0 {
50+
status = "okay";
51+
phy-mode = "rgmii";
52+
phy-handle = <&phy0>;
53+
54+
max-frame-size = <9000>;
55+
56+
mdio0 {
57+
#address-cells = <1>;
58+
#size-cells = <0>;
59+
compatible = "snps,dwmac-mdio";
60+
phy0: ethernet-phy@0 {
61+
reg = <4>;
62+
63+
txd0-skew-ps = <0>; /* -420ps */
64+
txd1-skew-ps = <0>; /* -420ps */
65+
txd2-skew-ps = <0>; /* -420ps */
66+
txd3-skew-ps = <0>; /* -420ps */
67+
rxd0-skew-ps = <420>; /* 0ps */
68+
rxd1-skew-ps = <420>; /* 0ps */
69+
rxd2-skew-ps = <420>; /* 0ps */
70+
rxd3-skew-ps = <420>; /* 0ps */
71+
txen-skew-ps = <0>; /* -420ps */
72+
txc-skew-ps = <900>; /* 0ps */
73+
rxdv-skew-ps = <420>; /* 0ps */
74+
rxc-skew-ps = <1680>; /* 780ps */
75+
};
76+
};
77+
};
78+
79+
&mmc {
80+
status = "okay";
81+
cap-sd-highspeed;
82+
broken-cd;
83+
bus-width = <4>;
84+
};
85+
86+
&osc1 {
87+
clock-frequency = <25000000>;
88+
};
89+
90+
&uart0 {
91+
status = "okay";
92+
};
93+
94+
&uart1 {
95+
status = "okay";
96+
};
97+
98+
&usb0 {
99+
status = "okay";
100+
disable-over-current;
101+
};
102+
103+
&watchdog0 {
104+
status = "okay";
105+
};
106+
107+
&qspi {
108+
status = "okay";
109+
flash@0 {
110+
#address-cells = <1>;
111+
#size-cells = <1>;
112+
compatible = "micron,mt25qu02g", "jedec,spi-nor";
113+
reg = <0>;
114+
spi-max-frequency = <100000000>;
115+
116+
m25p,fast-read;
117+
cdns,page-size = <256>;
118+
cdns,block-size = <16>;
119+
cdns,read-delay = <2>;
120+
cdns,tshsl-ns = <50>;
121+
cdns,tsd2d-ns = <50>;
122+
cdns,tchsh-ns = <4>;
123+
cdns,tslch-ns = <4>;
124+
125+
partitions {
126+
compatible = "fixed-partitions";
127+
#address-cells = <1>;
128+
#size-cells = <1>;
129+
130+
qspi_boot: partition@0 {
131+
label = "Boot and fpga data";
132+
reg = <0x0 0x03FE0000>;
133+
};
134+
135+
qspi_rootfs: partition@3FE0000 {
136+
label = "Root Filesystem - JFFS2";
137+
reg = <0x03FE0000 0x0C020000>;
138+
};
139+
};
140+
};
141+
};
142+
143+
&temp_volt {
144+
voltage {
145+
#address-cells = <1>;
146+
#size-cells = <0>;
147+
input@2 {
148+
label = "0.8V VCC";
149+
reg = <2>;
150+
};
151+
152+
input@3 {
153+
label = "1.8V VCCIO_SDM";
154+
reg = <3>;
155+
};
156+
157+
input@4 {
158+
label = "1.8V VCCPT";
159+
reg = <4>;
160+
};
161+
162+
input@5 {
163+
label = "1.2V VCCCRCORE";
164+
reg = <5>;
165+
};
166+
167+
input@6 {
168+
label = "0.9V VCCH";
169+
reg = <6>;
170+
};
171+
172+
input@7 {
173+
label = "0.8V VCCL";
174+
reg = <7>;
175+
};
176+
};
177+
178+
temperature {
179+
#address-cells = <1>;
180+
#size-cells = <0>;
181+
182+
input@0 {
183+
label = "Main Die SDM";
184+
reg = <0x0>;
185+
};
186+
187+
input@10000 {
188+
label = "Main Die corner bottom left max";
189+
reg = <0x10000>;
190+
};
191+
192+
input@20000 {
193+
label = "Main Die corner top left max";
194+
reg = <0x20000>;
195+
};
196+
197+
input@30000 {
198+
label = "Main Die corner bottom right max";
199+
reg = <0x30000>;
200+
};
201+
202+
input@40000 {
203+
label = "Main Die corner top right max";
204+
reg = <0x40000>;
205+
};
206+
};
207+
};
Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
// SPDX-License-Identifier: GPL-2.0
2+
/*
3+
* Copyright(C) 2022, Intel Corporation
4+
*/
5+
6+
/* Add this piece of dtsi fragment as #include "fm87_ftile_25g_ptp.dtsi"
7+
* in the file socfpga_fm87_ftile_25g_ptp.dts. Compile it in the kernel along with
8+
* socfpga_agilex.dtsi
9+
*/
10+
11+
/{
12+
soc {
13+
agilex_hps_bridges: bus@80000000 {
14+
compatible = "simple-bus";
15+
reg = <0x80000000 0x60000000>,
16+
<0xf9000000 0x00100000>;
17+
reg-names = "axi_h2f", "axi_h2f_lw";
18+
#address-cells = <2>;
19+
#size-cells = <1>;
20+
ranges = <0x00000000 0x00000000 0xf9000000 0x00001000>,
21+
<0x00000001 0x00000000 0x80000000 0x04000000>,
22+
<0x00000001 0x00000000 0x84040000 0x00000040>,
23+
<0x00000001 0x00000000 0x84040100 0x00000140>,
24+
<0x00000001 0x04040050 0x84040050 0x00000010>,
25+
<0x00000001 0x04040040 0x84040040 0x00000010>,
26+
<0x00000001 0x00000000 0x84050000 0x00010000>,
27+
<0x00000001 0x00000000 0x84060000 0x00010000>,
28+
<0x00000001 0x00000000 0x84070000 0x00010000>;
29+
30+
31+
qsfp_eth0: qsfp-eth0 {
32+
compatible = "sff,qsfp";
33+
i2c-bus = <&i2c0>;
34+
qsfpdd_initmode-gpio = <&qsfpdd_ctrl_pio 1 GPIO_ACTIVE_HIGH>;
35+
qsfpdd_modseln-gpio = <&qsfpdd_ctrl_pio 2 GPIO_ACTIVE_LOW>;
36+
qsfpdd_modprsn-gpio = <&qsfpdd_status_pio 0 GPIO_ACTIVE_LOW>;
37+
qsfpdd_resetn-gpio = <&qsfpdd_ctrl_pio 0 GPIO_ACTIVE_HIGH>;
38+
qsfpdd_intn-gpio = <&qsfpdd_status_pio 1 GPIO_ACTIVE_LOW>;
39+
agilex_hps_spim = <&qsfpdd_ctrl_pio 3 GPIO_ACTIVE_HIGH>;
40+
maximum-power-milliwatt = <1000>;
41+
status = "okay";
42+
};
43+
44+
qsfpdd_status_pio: gpio@4040050 {
45+
compatible = "altr,pio-1.0";
46+
reg = <0x00000001 0x04040050 0x10>;
47+
interrupt-parent = <&intc>;
48+
interrupts = <0 22 4>;
49+
altr,gpio-bank-width = <4>;
50+
altr,interrupt-type = <2>;
51+
#gpio-cells = <2>;
52+
gpio-controller;
53+
status = "okay";
54+
};
55+
56+
qsfpdd_ctrl_pio: gpio@4040040 {
57+
compatible = "altr,pio-1.0";
58+
reg = <0x00000001 0x04040040 0x10>;
59+
interrupt-parent = <&intc>;
60+
interrupts = <0 23 4>;
61+
altr,gpio-bank-width = <4>;
62+
altr,interrupt-type = <2>;
63+
altr,interrupt_type = <2>;
64+
#gpio-cells = <2>;
65+
gpio-controller;
66+
status = "okay";
67+
};
68+
};
69+
70+
clocks {
71+
tod_in_clock: tod_in_clock {
72+
#clock-cells = <0>;
73+
compatible = "fixed-clock";
74+
clock-frequency = <156250000>;
75+
clock-output-names = "tod_in_clock";
76+
};
77+
};
78+
79+
hssiss_0_hssiss: hssiss_0_hssiss {
80+
compatible = "intel, hssiss-1.0";
81+
reg-names = "sscsr";
82+
reg = <0x80000000 0x04000000>;
83+
reset-mode ="reg";
84+
};
85+
86+
hssi_0_eth: hssi_0_eth {
87+
compatible = "altr,hssi-ftile-1.0";
88+
#address-cells = <1>;
89+
#size-cells = <1>;
90+
ranges;
91+
tile_chan = <0x8>;
92+
hssi_port = <0x8>;
93+
phy-mode = "10gbase-r";
94+
hssiss = <&hssiss_0_hssiss>;
95+
pma_type = <0x0>; // FGT - 0x00, FHT = 0x1000
96+
monitor_poll_interval = <10>;
97+
ui-adj-interval=<250>;
98+
altr,tx-pma-delay-ns = <0xD>;
99+
altr,rx-pma-delay-ns = <0x8>;
100+
altr,tx-pma-delay-fns = <0x24D>;
101+
altr,rx-pma-delay-fns = <0x3E97>;
102+
altr,tx-external-phy-delay-ns = <0x0>;
103+
altr,rx-external-phy-delay-ns = <0x0>;
104+
fec-cw-pos-rx = <0x0>;
105+
fec-type="no-fec";
106+
interrupt-parent = <&intc>;
107+
interrupt-names = "dma0_tx_irq", "dma0_rx_irq";
108+
interrupts = <0 24 4>, <0 25 4>;
109+
qsfp-lane = <0x0>;
110+
status = "okay";
111+
num_channels = <1>;
112+
fixed-link {
113+
speed =<10000>;
114+
full-duplex;
115+
};
116+
dma_0 {
117+
reg-names = "tx_pref",
118+
"tx_csr",
119+
"tx_fifo",
120+
"rx_pref",
121+
"rx_csr",
122+
"rx_fifo";
123+
reg = <0x84480000 0x00000020>,
124+
<0x84480020 0x00000020>,
125+
<0x84480040 0x00000020>,
126+
<0x84480080 0x00000020>,
127+
<0x844800A0 0x00000020>,
128+
<0x844800C0 0x00000010>;
129+
rx-fifo-depth = <0x4000>;
130+
tx-fifo-depth = <0x1000>;
131+
rx-fifo-almost-full = <0x2000>;
132+
rx-fifo-almost-empty = <0x1000>;
133+
};
134+
};
135+
};
136+
};

0 commit comments

Comments
 (0)