Skip to content

Commit 115830f

Browse files
atrivedi-tsavoritesiAshish Trivedi
and
Ashish Trivedi
authored
FIR-595: Update configs to add modules required for virtualization and ethernet port (non functional for dummy interface) (#13)
* @FIR-595: Reducded the lower UDMA reserved area to only 256 MB * @FIR-595: Enabled nttables and iptables * @FIR-592: Moved the 128 MB reserved area to 0x60000000 * @FIR-595: Enable VXLAN and Wireguard * @FIR-595: Reverted the dtsi file * @FIR-595: Removed duplicate configs * @FIR-595: Added VXLAN and UDP Tunnel support to dumy interfaces * @FIR-595: Added debug prints * @FIR-595: Adding change to bring up eth0 * @FIR-595: Reverted changes to udp_tunnel_nic.c and dummy.c * @FIR-595: Addressed review comments and minimized diffs for eth0 --------- Co-authored-by: Ashish Trivedi <atrivedi@fpga2.tsavoritesi.net>
1 parent d49f67c commit 115830f

File tree

3 files changed

+266
-1
lines changed

3 files changed

+266
-1
lines changed
Lines changed: 206 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,206 @@
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@88000000 {
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 0x00040000>,
22+
<0x00000001 0x04040050 0x84040050 0x00000010>,
23+
<0x00000001 0x04040040 0x84040040 0x00000010>;
24+
25+
26+
qsfp_eth0: qsfp-eth0 {
27+
compatible = "sff,qsfp";
28+
i2c-bus = <&i2c0>;
29+
qsfpdd_initmode-gpio = <&qsfpdd_ctrl_pio 1 GPIO_ACTIVE_HIGH>;
30+
qsfpdd_modseln-gpio = <&qsfpdd_ctrl_pio 2 GPIO_ACTIVE_LOW>;
31+
qsfpdd_modprsn-gpio = <&qsfpdd_status_pio 0 GPIO_ACTIVE_LOW>;
32+
qsfpdd_resetn-gpio = <&qsfpdd_ctrl_pio 0 GPIO_ACTIVE_HIGH>;
33+
qsfpdd_intn-gpio = <&qsfpdd_status_pio 1 GPIO_ACTIVE_LOW>;
34+
agilex_hps_spim = <&qsfpdd_ctrl_pio 3 GPIO_ACTIVE_HIGH>;
35+
maximum-power-milliwatt = <1000>;
36+
status = "disable";
37+
/* status = "okay"; */
38+
};
39+
40+
qsfpdd_status_pio: gpio@4040050 {
41+
compatible = "altr,pio-1.0";
42+
reg = <0x00000001 0x04040050 0x10>;
43+
interrupt-parent = <&intc>;
44+
interrupts = <0 22 4>;
45+
altr,gpio-bank-width = <4>;
46+
altr,interrupt-type = <2>;
47+
48+
altr,interrupt_type = <2>;
49+
#gpio-cells = <2>;
50+
gpio-controller;
51+
status = "okay";
52+
/*status = "disable";*/
53+
};
54+
55+
qsfpdd_ctrl_pio: gpio@4040040 {
56+
compatible = "altr,pio-1.0";
57+
reg = <0x00000001 0x04040040 0x10>;
58+
interrupt-parent = <&intc>;
59+
interrupts = <0 23 4>;
60+
altr,gpio-bank-width = <4>;
61+
altr,interrupt-type = <2>;
62+
altr,interrupt_type = <2>;
63+
#gpio-cells = <2>;
64+
gpio-controller;
65+
status = "okay";
66+
/*status = "disable"; */
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+
ptp_clockcleaner: ptp_clockcleaner {
80+
compatible = "intel, freq-steering-zl-i2c";
81+
dpll-name = "zl30733";
82+
interface = "i2c";
83+
bus-num = <1>;
84+
bus-address = <0x70>;
85+
};
86+
87+
tod_0_clk: tod_0_clk {
88+
compatible = "intel, tod";
89+
reg-names = "tod_ctrl",
90+
"pps_ctrl";
91+
reg = <0x84040000 0x00000040>,
92+
<0x84040100 0x00000040>;
93+
interrupt-parent = <&intc>;
94+
interrupt-names = "pps_irq";
95+
interrupts = <0 19 4>;
96+
clocks = <&tod_in_clock>;
97+
clock-names = "tod_clock";
98+
status = "okay";
99+
altr,has-ptp-clockcleaner;
100+
clock-cleaner = <&ptp_clockcleaner>;
101+
};
102+
103+
hssiss_0_hssiss: hssiss_0_hssiss {
104+
compatible = "intel, hssiss-1.0";
105+
reg-names = "sscsr";
106+
reg = <0x88000000 0x04000000>;
107+
reset-mode ="reg";
108+
};
109+
hssi_0_eth: hssi_0_eth@88000000 {
110+
reg-names = "tx_pref" ,
111+
"tx_csr" ,
112+
"tx_fifo" ,
113+
"rx_pref" ,
114+
"rx_csr" ,
115+
"rx_fifo" ;
116+
117+
reg = <0x8c480000 0x00000020>,
118+
<0x8c480020 0x00000020>,
119+
<0x8c480040 0x00000020>,
120+
<0x8c480080 0x00000020>,
121+
<0x8c4800A0 0x00000020>,
122+
<0x8c4800C0 0x00000010>;
123+
124+
compatible = "altr,hssi-ftile-1.0";
125+
tile_chan = <0x8>;
126+
hssi_port = <0x8>;
127+
phy-mode = "10gbase-r";
128+
tod = <&tod_0_clk>;
129+
hssiss = <&hssiss_0_hssiss>;
130+
pma_type = <0x0>; // FGT - 0x00, FHT = 0x1000
131+
altr,tx-pma-delay-ns = <0xD>;
132+
altr,rx-pma-delay-ns = <0x8>;
133+
altr,tx-pma-delay-fns = <0x24D>;
134+
altr,rx-pma-delay-fns = <0x3E97>;
135+
altr,tx-external-phy-delay-ns = <0x0>;
136+
altr,rx-external-phy-delay-ns = <0x0>;
137+
fec-cw-pos-rx = <0x0>;
138+
fec-type="no-fec";
139+
interrupt-parent = <&intc>;
140+
interrupt-names = "tx_irq", "rx_irq";
141+
interrupts = <0 24 4>, <0 25 4>;
142+
qsfp-lane = <0x0>;
143+
rx-fifo-depth = <0x4000>;
144+
tx-fifo-depth = <0x1000>;
145+
rx-fifo-almost-full = <0x2000>;
146+
rx-fifo-almost-empty = <0x1000>;
147+
altr,has-ptp;
148+
ptp_accu_mode = "Advanced";
149+
ptp_tx_routing_adj = <0xDE9F>; //56,991
150+
ptp_rx_routing_adj = <0xD625>; //54,821
151+
status = "okay";
152+
fixed-link {
153+
speed =<10000>;
154+
full-duplex;
155+
};
156+
};
157+
hssi_1_eth: hssi_1_eth@88000000 {
158+
reg-names = "tx_pref" ,
159+
"tx_csr" ,
160+
"tx_fifo" ,
161+
"rx_pref" ,
162+
"rx_csr" ,
163+
"rx_fifo" ;
164+
165+
reg = <0x8c4C0000 0x00000020>,
166+
<0x8c4C0020 0x00000020>,
167+
<0x8c4C0040 0x00000020>,
168+
<0x8c4C0080 0x00000020>,
169+
<0x8c4C00A0 0x00000020>,
170+
<0x8c4C00C0 0x00000010>;
171+
172+
compatible = "altr,hssi-ftile-1.0";
173+
tile_chan = <0x9>;
174+
hssi_port = <0x9>;
175+
phy-mode = "10gbase-r";
176+
tod = <&tod_0_clk>;
177+
hssiss = <&hssiss_0_hssiss>;
178+
pma_type = <0x0>; // FGT - 0x00, FHT = 0x1000
179+
altr,tx-pma-delay-ns = <0xD>;
180+
altr,rx-pma-delay-ns = <0x8>;
181+
altr,tx-pma-delay-fns = <0x24D>;
182+
altr,rx-pma-delay-fns = <0x3E97>;
183+
altr,tx-external-phy-delay-ns = <0x0>;
184+
altr,rx-external-phy-delay-ns = <0x0>;
185+
fec-cw-pos-rx = <0x0>;
186+
fec-type="no-fec";
187+
interrupt-parent = <&intc>;
188+
interrupt-names = "tx_irq", "rx_irq";
189+
interrupts = <0 26 4>, <0 27 4>;
190+
qsfp-lane = <0x0>;
191+
rx-fifo-depth = <0x4000>;
192+
tx-fifo-depth = <0x1000>;
193+
rx-fifo-almost-full = <0x2000>;
194+
rx-fifo-almost-empty = <0x1000>;
195+
altr,has-ptp;
196+
ptp_accu_mode = "Advanced";
197+
ptp_tx_routing_adj = <0xDE3C>; //56,892
198+
ptp_rx_routing_adj = <0xD73F>; //55,103
199+
status = "okay";
200+
fixed-link {
201+
speed =<10000>;
202+
full-duplex;
203+
};
204+
};
205+
};
206+
};

arch/arm64/boot/dts/intel/socfpga_agilex_bittware.dts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
*/
55
#include "socfpga_agilex_bittware.dtsi"
66
#include "socfpga_agilex_pcie_root_port.dtsi"
7+
#include "fm87_ftile_10g_2port_ptp.dtsi"
8+
79
/ {
810
model = "SoCFPGA Agilex BittWare";
911

@@ -48,7 +50,7 @@
4850
};
4951

5052
&gmac2 {
51-
status = "disabled";
53+
status = "okay";
5254
phy-mode = "rgmii";
5355
phy-handle = <&phy0>;
5456

arch/arm64/configs/defconfig

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1606,3 +1606,60 @@ CONFIG_BLK_DEV_NVME=y
16061606
#CONFIG_NVME_HWMON=y
16071607
#CONFIG_NVME_FC=y
16081608
CONFIG_DUMMY=m
1609+
1610+
##########################################
1611+
# For Flannel enable config flags
1612+
# For NFT tables, STP, VXLAN and Wireguard
1613+
#########################################
1614+
CONFIG_CFS_BANDWIDTH=y
1615+
CONFIG_NETFILTER_NETLINK=m
1616+
CONFIG_NETFILTER_XT_MATCH_OWNER=m
1617+
CONFIG_NET_SCH_HFSC=m
1618+
CONFIG_NET_SCH_FQ_CODEL=m
1619+
CONFIG_NET_UDP_TUNNEL=m
1620+
CONFIG_NF_DUP_NETDEV=m
1621+
CONFIG_NF_LOG_BRIDGE=m
1622+
CONFIG_NF_TABLES_ARP=y
1623+
CONFIG_NF_TABLES_BRIDGE=y
1624+
CONFIG_NF_TABLES_INET=y
1625+
CONFIG_NF_TABLES_IPV4=y
1626+
CONFIG_NF_TABLES_IPV6=y
1627+
CONFIG_NF_TABLES=m
1628+
CONFIG_NF_TABLES_NETDEV=y
1629+
CONFIG_NFT_BRIDGE_REJECT=m
1630+
CONFIG_NFT_CHAIN_NAT_IPV4=m
1631+
CONFIG_NFT_CHAIN_ROUTE_IPV4=m
1632+
CONFIG_NFT_CHAIN_ROUTE_IPV6=m
1633+
CONFIG_NFT_COMPAT=m
1634+
CONFIG_NFT_COUNTER=m
1635+
CONFIG_NFT_CT=m
1636+
CONFIG_NFT_DUP_IPV4=m
1637+
CONFIG_NFT_DUP_IPV6=m
1638+
CONFIG_NFT_DUP_NETDEV=m
1639+
CONFIG_NFT_FIB_INET=m
1640+
CONFIG_NFT_FIB_IPV4=m
1641+
CONFIG_NFT_FIB_IPV6=m
1642+
CONFIG_NFT_FIB_NETDEV=m
1643+
CONFIG_NFT_FWD_NETDEV=m
1644+
CONFIG_NFT_HASH=m
1645+
CONFIG_NFT_LIMIT=m
1646+
CONFIG_NFT_LOG=m
1647+
CONFIG_NFT_MASQ_IPV4=m
1648+
CONFIG_NFT_MASQ=m
1649+
CONFIG_NFT_NAT=m
1650+
CONFIG_NFT_NUMGEN=m
1651+
CONFIG_NFT_QUEUE=m
1652+
CONFIG_NFT_QUOTA=m
1653+
CONFIG_NFT_REDIR_IPV4=m
1654+
CONFIG_NFT_REDIR=m
1655+
CONFIG_NFT_REJECT=m
1656+
CONFIG_NFT_REJECT_INET=m
1657+
CONFIG_NFT_REJECT_IPV4=m
1658+
CONFIG_NFT_REJECT_IPV6=m
1659+
CONFIG_NFT_CONNLIMIT=m
1660+
CONFIG_NFT_TUNNEL=m
1661+
CONFIG_NFT_OBJREF=m
1662+
CONFIG_NFT_QUEUE=m
1663+
CONFIG_STP=m
1664+
CONFIG_VXLAN=m
1665+
CONFIG_WIREGUARD=m

0 commit comments

Comments
 (0)