|
11 | 11 | # 11. qsfp_cages - number of QSFP cages |
12 | 12 | # 12. QSFP_I2C_ADDR - array of integer, I2C address for all QSFP cages |
13 | 13 | # 13. card_name - name of the card |
14 | | -proc dts_network_mod { base_mac base_pcs base_pmd ports ETH_PORT_SPEED ETH_PORT_CHAN ETH_PORT_LANES ETH_PORT_RX_MTU ETH_PORT_TX_MTU eth_ip_name qsfp_cages QSFP_I2C_ADDR card_name {i2c_custom_ctrls {}}} { |
| 14 | +proc dts_network_mod { base_mac base_pcs base_pmd ports ETH_PORT_SPEED ETH_PORT_CHAN ETH_PORT_LANES ETH_PORT_RX_MTU ETH_PORT_TX_MTU eth_ip_name qsfp_cages QSFP_I2C_ADDR card_name ETH_STREAMS_MODE {i2c_custom_ctrls {}}} { |
15 | 15 |
|
16 | 16 | # use upvar to pass an array |
17 | 17 | upvar $ETH_PORT_SPEED port_speed |
@@ -64,12 +64,18 @@ proc dts_network_mod { base_mac base_pcs base_pmd ports ETH_PORT_SPEED ETH_PORT_ |
64 | 64 | } |
65 | 65 | append ret "regarr$ei:" [dts_pcs_regs $ei [expr $base_pcs + $MGMT_PORT_OFF * $p + $MGMT_CHAN_OFF * $ch]] |
66 | 66 | append ret "pcspma$ei:" [dts_mgmt $ei "$port_speed($p)G" "regarr$ei" $pcspma_params] |
| 67 | + |
| 68 | + if {$ETH_STREAMS_MODE == 1} { |
| 69 | + set rx_stream $ei |
| 70 | + } else { |
| 71 | + set rx_stream $p |
| 72 | + } |
67 | 73 | if {$ETH_MAC_BYPASS} { |
68 | | - append ret [dts_eth_channel $ei $pmd_id -1 -1 $ei $eth_lanes] |
| 74 | + append ret [dts_eth_channel $ei $pmd_id -1 -1 $ei $eth_lanes $rx_stream] |
69 | 75 | } else { |
70 | 76 | append ret "txmac$ei:" [dts_tx_mac_lite $ei $port_speed($p) [expr $base_mac + $p * $PORTS_OFF + $ch * $CHAN_OFF + $TX_RX_MAC_OFF * 0] $port_tx_mtu($p)] |
71 | 77 | append ret "rxmac$ei:" [dts_rx_mac_lite $ei $port_speed($p) [expr $base_mac + $p * $PORTS_OFF + $ch * $CHAN_OFF + $TX_RX_MAC_OFF * 1] $port_rx_mtu($p)] |
72 | | - append ret [dts_eth_channel $ei $pmd_id $ei $ei $ei $eth_lanes] |
| 78 | + append ret [dts_eth_channel $ei $pmd_id $ei $ei $ei $eth_lanes $rx_stream] |
73 | 79 | } |
74 | 80 | incr ei |
75 | 81 | } |
@@ -116,10 +122,12 @@ proc dts_pmd_ctrl {no base} { |
116 | 122 | # 4. txmac_num - number of txmac used by channel |
117 | 123 | # 5. phy_num - number of PCS/PMA used by channel |
118 | 124 | # 6. lines - indexes of serial lines used by channel |
119 | | -proc dts_eth_channel {no pmd rxmac_num txmac_num phy_num lines} { |
| 125 | +# 7. rx_stream - stream ID in NDK application core |
| 126 | +proc dts_eth_channel {no pmd rxmac_num txmac_num phy_num lines rx_stream} { |
120 | 127 | set ret "" |
121 | 128 | append ret "eth$no {" |
122 | 129 | append ret "compatible = \"netcope,eth\";" |
| 130 | + append ret "rx_stream = <$rx_stream>;" |
123 | 131 | append ret "pmd = <&pmd$pmd>;" |
124 | 132 | if {$phy_num != -1} {append ret "pcspma = <&pcspma$phy_num>;"} |
125 | 133 | if {$rxmac_num != -1} {append ret "rxmac = <&rxmac$rxmac_num>;"} |
|
0 commit comments