diff --git a/device/ragile/x86_64-ragile_ra-b6510-32c-r0/minigraph.xml b/device/ragile/x86_64-ragile_ra-b6510-32c-r0/minigraph.xml
deleted file mode 100644
index d33d99d6e76..00000000000
--- a/device/ragile/x86_64-ragile_ra-b6510-32c-r0/minigraph.xml
+++ /dev/null
@@ -1,63 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
- switch2
-
-
-
-
-
-
-
-
-
-
-
-
- switch2
- RA-B6510-32C
-
-
-
-
-
-
- switch2
-
-
- DhcpResources
-
-
-
-
- NtpResources
-
- 0.debian.pool.ntp.org;1.debian.pool.ntp.org;2.debian.pool.ntp.org;3.debian.pool.ntp.org
-
-
- SyslogResources
-
-
-
-
- ErspanDestinationIpv4
-
- 2.2.2.2
-
-
-
-
-
-
- switch2
- RA-B6510-32C
-
diff --git a/device/ragile/x86_64-ragile_ra-b6510-32c-r0/pddf/pddf-device.json b/device/ragile/x86_64-ragile_ra-b6510-32c-r0/pddf/pddf-device.json
index 0f337006eda..18c38d626a8 100755
--- a/device/ragile/x86_64-ragile_ra-b6510-32c-r0/pddf/pddf-device.json
+++ b/device/ragile/x86_64-ragile_ra-b6510-32c-r0/pddf/pddf-device.json
@@ -1610,6 +1610,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD1",
"attr_devaddr": "0x30",
"attr_devtype": "cpld",
"attr_offset": "0x10",
@@ -1618,6 +1619,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD1",
"attr_devaddr": "0x30",
"attr_devtype": "cpld",
"attr_offset": "0x14",
@@ -1682,6 +1684,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD1",
"attr_devaddr": "0x30",
"attr_devtype": "cpld",
"attr_offset": "0x10",
@@ -1690,6 +1693,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD1",
"attr_devaddr": "0x30",
"attr_devtype": "cpld",
"attr_offset": "0x14",
@@ -1754,6 +1758,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD1",
"attr_devaddr": "0x30",
"attr_devtype": "cpld",
"attr_offset": "0x10",
@@ -1762,6 +1767,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD1",
"attr_devaddr": "0x30",
"attr_devtype": "cpld",
"attr_offset": "0x14",
@@ -1827,6 +1833,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD1",
"attr_devaddr": "0x30",
"attr_devtype": "cpld",
"attr_offset": "0x10",
@@ -1835,6 +1842,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD1",
"attr_devaddr": "0x30",
"attr_devtype": "cpld",
"attr_offset": "0x14",
@@ -1900,6 +1908,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD1",
"attr_devaddr": "0x30",
"attr_devtype": "cpld",
"attr_offset": "0x10",
@@ -1908,6 +1917,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD1",
"attr_devaddr": "0x30",
"attr_devtype": "cpld",
"attr_offset": "0x14",
@@ -1973,6 +1983,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD1",
"attr_devaddr": "0x30",
"attr_devtype": "cpld",
"attr_offset": "0x10",
@@ -1981,6 +1992,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD1",
"attr_devaddr": "0x30",
"attr_devtype": "cpld",
"attr_offset": "0x14",
@@ -2045,6 +2057,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD1",
"attr_devaddr": "0x30",
"attr_devtype": "cpld",
"attr_offset": "0x30",
@@ -2053,6 +2066,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD1",
"attr_devaddr": "0x30",
"attr_devtype": "cpld",
"attr_offset": "0x14",
@@ -2117,6 +2131,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD1",
"attr_devaddr": "0x30",
"attr_devtype": "cpld",
"attr_offset": "0x10",
@@ -2125,6 +2140,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD1",
"attr_devaddr": "0x30",
"attr_devtype": "cpld",
"attr_offset": "0x14",
@@ -2189,6 +2205,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD1",
"attr_devaddr": "0x30",
"attr_devtype": "cpld",
"attr_offset": "0x11",
@@ -2197,6 +2214,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD1",
"attr_devaddr": "0x30",
"attr_devtype": "cpld",
"attr_offset": "0x15",
@@ -2261,6 +2279,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD1",
"attr_devaddr": "0x30",
"attr_devtype": "cpld",
"attr_offset": "0x11",
@@ -2269,6 +2288,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD1",
"attr_devaddr": "0x30",
"attr_devtype": "cpld",
"attr_offset": "0x15",
@@ -2334,6 +2354,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD1",
"attr_devaddr": "0x30",
"attr_devtype": "cpld",
"attr_offset": "0x11",
@@ -2342,6 +2363,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD1",
"attr_devaddr": "0x30",
"attr_devtype": "cpld",
"attr_offset": "0x15",
@@ -2407,6 +2429,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD1",
"attr_devaddr": "0x30",
"attr_devtype": "cpld",
"attr_offset": "0x11",
@@ -2415,6 +2438,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD1",
"attr_devaddr": "0x30",
"attr_devtype": "cpld",
"attr_offset": "0x15",
@@ -2480,6 +2504,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD1",
"attr_devaddr": "0x30",
"attr_devtype": "cpld",
"attr_offset": "0x11",
@@ -2488,6 +2513,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD1",
"attr_devaddr": "0x30",
"attr_devtype": "cpld",
"attr_offset": "0x15",
@@ -2553,6 +2579,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD1",
"attr_devaddr": "0x30",
"attr_devtype": "cpld",
"attr_offset": "0x11",
@@ -2561,6 +2588,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD1",
"attr_devaddr": "0x30",
"attr_devtype": "cpld",
"attr_offset": "0x15",
@@ -2625,6 +2653,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD1",
"attr_devaddr": "0x30",
"attr_devtype": "cpld",
"attr_offset": "0x11",
@@ -2633,6 +2662,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD1",
"attr_devaddr": "0x30",
"attr_devtype": "cpld",
"attr_offset": "0x15",
@@ -2697,6 +2727,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD1",
"attr_devaddr": "0x30",
"attr_devtype": "cpld",
"attr_offset": "0x11",
@@ -2705,6 +2736,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD1",
"attr_devaddr": "0x30",
"attr_devtype": "cpld",
"attr_offset": "0x15",
@@ -2769,6 +2801,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD2",
"attr_devaddr": "0x31",
"attr_devtype": "cpld",
"attr_offset": "0x10",
@@ -2777,6 +2810,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD2",
"attr_devaddr": "0x31",
"attr_devtype": "cpld",
"attr_offset": "0x14",
@@ -2841,6 +2875,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD2",
"attr_devaddr": "0x31",
"attr_devtype": "cpld",
"attr_offset": "0x10",
@@ -2849,6 +2884,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD2",
"attr_devaddr": "0x31",
"attr_devtype": "cpld",
"attr_offset": "0x14",
@@ -2914,6 +2950,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD2",
"attr_devaddr": "0x31",
"attr_devtype": "cpld",
"attr_offset": "0x10",
@@ -2922,6 +2959,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD2",
"attr_devaddr": "0x31",
"attr_devtype": "cpld",
"attr_offset": "0x14",
@@ -2987,6 +3025,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD2",
"attr_devaddr": "0x31",
"attr_devtype": "cpld",
"attr_offset": "0x10",
@@ -2995,6 +3034,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD2",
"attr_devaddr": "0x31",
"attr_devtype": "cpld",
"attr_offset": "0x14",
@@ -3060,6 +3100,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD2",
"attr_devaddr": "0x31",
"attr_devtype": "cpld",
"attr_offset": "0x10",
@@ -3068,6 +3109,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD2",
"attr_devaddr": "0x31",
"attr_devtype": "cpld",
"attr_offset": "0x14",
@@ -3133,6 +3175,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD2",
"attr_devaddr": "0x31",
"attr_devtype": "cpld",
"attr_offset": "0x10",
@@ -3141,6 +3184,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD2",
"attr_devaddr": "0x31",
"attr_devtype": "cpld",
"attr_offset": "0x14",
@@ -3205,6 +3249,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD2",
"attr_devaddr": "0x31",
"attr_devtype": "cpld",
"attr_offset": "0x10",
@@ -3213,6 +3258,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD2",
"attr_devaddr": "0x31",
"attr_devtype": "cpld",
"attr_offset": "0x14",
@@ -3277,6 +3323,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD2",
"attr_devaddr": "0x31",
"attr_devtype": "cpld",
"attr_offset": "0x10",
@@ -3285,6 +3332,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD2",
"attr_devaddr": "0x31",
"attr_devtype": "cpld",
"attr_offset": "0x14",
@@ -3349,6 +3397,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD2",
"attr_devaddr": "0x31",
"attr_devtype": "cpld",
"attr_offset": "0x11",
@@ -3357,6 +3406,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD2",
"attr_devaddr": "0x31",
"attr_devtype": "cpld",
"attr_offset": "0x15",
@@ -3421,6 +3471,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD2",
"attr_devaddr": "0x31",
"attr_devtype": "cpld",
"attr_offset": "0x11",
@@ -3429,6 +3480,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD2",
"attr_devaddr": "0x31",
"attr_devtype": "cpld",
"attr_offset": "0x15",
@@ -3494,6 +3546,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD2",
"attr_devaddr": "0x31",
"attr_devtype": "cpld",
"attr_offset": "0x11",
@@ -3502,6 +3555,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD2",
"attr_devaddr": "0x31",
"attr_devtype": "cpld",
"attr_offset": "0x15",
@@ -3567,6 +3621,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD2",
"attr_devaddr": "0x31",
"attr_devtype": "cpld",
"attr_offset": "0x11",
@@ -3575,6 +3630,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD2",
"attr_devaddr": "0x31",
"attr_devtype": "cpld",
"attr_offset": "0x15",
@@ -3640,6 +3696,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD2",
"attr_devaddr": "0x31",
"attr_devtype": "cpld",
"attr_offset": "0x11",
@@ -3648,6 +3705,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD2",
"attr_devaddr": "0x31",
"attr_devtype": "cpld",
"attr_offset": "0x15",
@@ -3713,6 +3771,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD2",
"attr_devaddr": "0x31",
"attr_devtype": "cpld",
"attr_offset": "0x11",
@@ -3721,6 +3780,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD2",
"attr_devaddr": "0x31",
"attr_devtype": "cpld",
"attr_offset": "0x15",
@@ -3785,6 +3845,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD2",
"attr_devaddr": "0x31",
"attr_devtype": "cpld",
"attr_offset": "0x11",
@@ -3793,6 +3854,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD2",
"attr_devaddr": "0x31",
"attr_devtype": "cpld",
"attr_offset": "0x15",
@@ -3857,6 +3919,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD2",
"attr_devaddr": "0x31",
"attr_devtype": "cpld",
"attr_offset": "0x11",
@@ -3865,6 +3928,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD2",
"attr_devaddr": "0x31",
"attr_devtype": "cpld",
"attr_offset": "0x15",
diff --git a/device/ragile/x86_64-ragile_ra-b6510-48v8c-r0/RA-B6510-48V8C/sai.profile b/device/ragile/x86_64-ragile_ra-b6510-48v8c-r0/RA-B6510-48V8C/sai.profile
index 042c8060d58..352e8c50b05 100755
--- a/device/ragile/x86_64-ragile_ra-b6510-48v8c-r0/RA-B6510-48V8C/sai.profile
+++ b/device/ragile/x86_64-ragile_ra-b6510-48v8c-r0/RA-B6510-48V8C/sai.profile
@@ -1 +1 @@
-SAI_INIT_CONFIG_FILE=/usr/share/sonic/hwsku/td3-b6510-48vs8cq-48x25G+8x100G.config.bcm
+SAI_INIT_CONFIG_FILE=/usr/share/sonic/hwsku/td3-ra-b6510-48v8c-48x25G+8x100G.config.bcm
diff --git a/device/ragile/x86_64-ragile_ra-b6510-48v8c-r0/RA-B6510-48V8C/td3-ra-b6510-48v8c-48x25G+8x100G.config.bcm b/device/ragile/x86_64-ragile_ra-b6510-48v8c-r0/RA-B6510-48V8C/td3-ra-b6510-48v8c-48x25G+8x100G.config.bcm
new file mode 100644
index 00000000000..27656bd3d46
--- /dev/null
+++ b/device/ragile/x86_64-ragile_ra-b6510-48v8c-r0/RA-B6510-48V8C/td3-ra-b6510-48v8c-48x25G+8x100G.config.bcm
@@ -0,0 +1,402 @@
+cancun_dir=/usr/share/sonic/platform/cancun/sdk_6.5.16/
+l2_mem_entries=32768
+l3_mem_entries=16384
+l3_alpm_enable=2
+ipv6_lpm_128b_enable=0x1
+l2xmsg_mode=0
+l3_max_ecmp_mode=1
+bcm_num_cos=8
+bcm_stat_interval=2000000
+cdma_timeout_usec=3000000
+core_clock_frequency=1525
+dpp_clock_ratio=2:3
+help_cli_enable=1
+ifp_inports_support_enable=1
+#lpm_scaling_enable=1
+max_vp_lags=0
+mem_cache_enable=0
+memlist_enable=1
+miim_intr_enable=0
+module_64ports=1
+oversubscribe_mode=1
+parity_enable=1
+pbmp_gport_stack.0=0x0000000000000000000000000000000000000000000000000000000000000000
+#pbmp_xport_xe.0=0x00000000000000000000000000000000888ffffffffffff9fffffffffffffffe
+pbmp_xport_xe=0x488080808808087f9fe1e1e1fe1e1e1fe
+phy_chain_rx_lane_map_physical{1.0}=0x1032
+phy_chain_tx_lane_map_physical{1.0}=0x0123
+phy_chain_rx_lane_map_physical{5.0}=0x1032
+phy_chain_tx_lane_map_physical{5.0}=0x0123
+phy_chain_rx_lane_map_physical{13.0}=0x1032
+phy_chain_tx_lane_map_physical{13.0}=0x0123
+phy_chain_rx_lane_map_physical{21.0}=0x1032
+phy_chain_tx_lane_map_physical{21.0}=0x0123
+phy_chain_rx_lane_map_physical{29.0}=0x1032
+phy_chain_tx_lane_map_physical{29.0}=0x0123
+phy_chain_rx_lane_map_physical{33.0}=0x1032
+phy_chain_tx_lane_map_physical{33.0}=0x0123
+phy_chain_rx_lane_map_physical{41.0}=0x1032
+phy_chain_tx_lane_map_physical{41.0}=0x0123
+phy_chain_rx_lane_map_physical{49.0}=0x1032
+phy_chain_tx_lane_map_physical{49.0}=0x0123
+phy_chain_rx_lane_map_physical{57.0}=0x1032
+phy_chain_tx_lane_map_physical{57.0}=0x0123
+phy_chain_rx_lane_map_physical{61.0}=0x1032
+phy_chain_tx_lane_map_physical{61.0}=0x0123
+phy_chain_rx_lane_map_physical{65.0}=0x2301
+phy_chain_tx_lane_map_physical{65.0}=0x3210
+phy_chain_rx_lane_map_physical{69.0}=0x2301
+phy_chain_tx_lane_map_physical{69.0}=0x3210
+phy_chain_rx_lane_map_physical{77.0}=0x1032
+phy_chain_tx_lane_map_physical{77.0}=0x3210
+phy_chain_rx_lane_map_physical{85.0}=0x1032
+phy_chain_tx_lane_map_physical{85.0}=0x3210
+phy_chain_rx_lane_map_physical{93.0}=0x1032
+phy_chain_tx_lane_map_physical{93.0}=0x3210
+phy_chain_rx_lane_map_physical{97.0}=0x1032
+phy_chain_tx_lane_map_physical{97.0}=0x3210
+phy_chain_rx_lane_map_physical{105.0}=0x1032
+phy_chain_tx_lane_map_physical{105.0}=0x3210
+phy_chain_rx_lane_map_physical{113.0}=0x1032
+phy_chain_tx_lane_map_physical{113.0}=0x3210
+phy_chain_rx_lane_map_physical{121.0}=0x2031
+phy_chain_tx_lane_map_physical{121.0}=0x3210
+phy_chain_rx_lane_map_physical{125.0}=0x1032
+phy_chain_tx_lane_map_physical{125.0}=0x1203
+phy_chain_tx_polarity_flip_physical{1.0}=0x1
+phy_chain_rx_polarity_flip_physical{1.0}=0x0
+phy_chain_tx_polarity_flip_physical{2.0}=0x0
+phy_chain_rx_polarity_flip_physical{2.0}=0x0
+phy_chain_tx_polarity_flip_physical{3.0}=0x1
+phy_chain_rx_polarity_flip_physical{3.0}=0x0
+phy_chain_tx_polarity_flip_physical{4.0}=0x0
+phy_chain_rx_polarity_flip_physical{4.0}=0x0
+phy_chain_tx_polarity_flip_physical{5.0}=0x1
+phy_chain_rx_polarity_flip_physical{5.0}=0x0
+phy_chain_tx_polarity_flip_physical{6.0}=0x0
+phy_chain_rx_polarity_flip_physical{6.0}=0x0
+phy_chain_tx_polarity_flip_physical{7.0}=0x1
+phy_chain_rx_polarity_flip_physical{7.0}=0x0
+phy_chain_tx_polarity_flip_physical{8.0}=0x0
+phy_chain_rx_polarity_flip_physical{8.0}=0x0
+phy_chain_tx_polarity_flip_physical{13.0}=0x0
+phy_chain_rx_polarity_flip_physical{13.0}=0x0
+phy_chain_tx_polarity_flip_physical{14.0}=0x0
+phy_chain_rx_polarity_flip_physical{14.0}=0x0
+phy_chain_tx_polarity_flip_physical{15.0}=0x0
+phy_chain_rx_polarity_flip_physical{15.0}=0x0
+phy_chain_tx_polarity_flip_physical{16.0}=0x0
+phy_chain_rx_polarity_flip_physical{16.0}=0x0
+phy_chain_tx_polarity_flip_physical{21.0}=0x1
+phy_chain_rx_polarity_flip_physical{21.0}=0x0
+phy_chain_tx_polarity_flip_physical{22.0}=0x0
+phy_chain_rx_polarity_flip_physical{22.0}=0x0
+phy_chain_tx_polarity_flip_physical{23.0}=0x1
+phy_chain_rx_polarity_flip_physical{23.0}=0x0
+phy_chain_tx_polarity_flip_physical{24.0}=0x0
+phy_chain_rx_polarity_flip_physical{24.0}=0x0
+phy_chain_tx_polarity_flip_physical{29.0}=0x0
+phy_chain_rx_polarity_flip_physical{29.0}=0x1
+phy_chain_tx_polarity_flip_physical{30.0}=0x0
+phy_chain_rx_polarity_flip_physical{30.0}=0x1
+phy_chain_tx_polarity_flip_physical{31.0}=0x0
+phy_chain_rx_polarity_flip_physical{31.0}=0x1
+phy_chain_tx_polarity_flip_physical{32.0}=0x0
+phy_chain_rx_polarity_flip_physical{32.0}=0x1
+phy_chain_tx_polarity_flip_physical{33.0}=0x0
+phy_chain_rx_polarity_flip_physical{33.0}=0x0
+phy_chain_tx_polarity_flip_physical{34.0}=0x0
+phy_chain_rx_polarity_flip_physical{34.0}=0x0
+phy_chain_tx_polarity_flip_physical{35.0}=0x0
+phy_chain_rx_polarity_flip_physical{35.0}=0x0
+phy_chain_tx_polarity_flip_physical{36.0}=0x0
+phy_chain_rx_polarity_flip_physical{36.0}=0x0
+phy_chain_tx_polarity_flip_physical{41.0}=0x0
+phy_chain_rx_polarity_flip_physical{41.0}=0x0
+phy_chain_tx_polarity_flip_physical{42.0}=0x0
+phy_chain_rx_polarity_flip_physical{42.0}=0x0
+phy_chain_tx_polarity_flip_physical{43.0}=0x0
+phy_chain_rx_polarity_flip_physical{43.0}=0x0
+phy_chain_tx_polarity_flip_physical{44.0}=0x0
+phy_chain_rx_polarity_flip_physical{44.0}=0x0
+phy_chain_tx_polarity_flip_physical{49.0}=0x0
+phy_chain_rx_polarity_flip_physical{49.0}=0x0
+phy_chain_tx_polarity_flip_physical{50.0}=0x0
+phy_chain_rx_polarity_flip_physical{50.0}=0x0
+phy_chain_tx_polarity_flip_physical{51.0}=0x0
+phy_chain_rx_polarity_flip_physical{51.0}=0x0
+phy_chain_tx_polarity_flip_physical{52.0}=0x0
+phy_chain_rx_polarity_flip_physical{52.0}=0x0
+phy_chain_tx_polarity_flip_physical{57.0}=0x0
+phy_chain_rx_polarity_flip_physical{57.0}=0x0
+phy_chain_tx_polarity_flip_physical{58.0}=0x0
+phy_chain_rx_polarity_flip_physical{58.0}=0x0
+phy_chain_tx_polarity_flip_physical{59.0}=0x0
+phy_chain_rx_polarity_flip_physical{59.0}=0x0
+phy_chain_tx_polarity_flip_physical{60.0}=0x0
+phy_chain_rx_polarity_flip_physical{60.0}=0x0
+phy_chain_tx_polarity_flip_physical{61.0}=0x0
+phy_chain_rx_polarity_flip_physical{61.0}=0x1
+phy_chain_tx_polarity_flip_physical{62.0}=0x0
+phy_chain_rx_polarity_flip_physical{62.0}=0x1
+phy_chain_tx_polarity_flip_physical{63.0}=0x0
+phy_chain_rx_polarity_flip_physical{63.0}=0x1
+phy_chain_tx_polarity_flip_physical{64.0}=0x0
+phy_chain_rx_polarity_flip_physical{64.0}=0x1
+phy_chain_tx_polarity_flip_physical{65.0}=0x0
+phy_chain_rx_polarity_flip_physical{65.0}=0x1
+phy_chain_tx_polarity_flip_physical{66.0}=0x0
+phy_chain_rx_polarity_flip_physical{66.0}=0x1
+phy_chain_tx_polarity_flip_physical{67.0}=0x0
+phy_chain_rx_polarity_flip_physical{67.0}=0x1
+phy_chain_tx_polarity_flip_physical{68.0}=0x0
+phy_chain_rx_polarity_flip_physical{68.0}=0x1
+phy_chain_tx_polarity_flip_physical{69.0}=0x0
+phy_chain_rx_polarity_flip_physical{69.0}=0x0
+phy_chain_tx_polarity_flip_physical{70.0}=0x0
+phy_chain_rx_polarity_flip_physical{70.0}=0x0
+phy_chain_tx_polarity_flip_physical{71.0}=0x0
+phy_chain_rx_polarity_flip_physical{71.0}=0x0
+phy_chain_tx_polarity_flip_physical{72.0}=0x0
+phy_chain_rx_polarity_flip_physical{72.0}=0x0
+phy_chain_tx_polarity_flip_physical{85.0}=0x1
+phy_chain_rx_polarity_flip_physical{85.0}=0x1
+phy_chain_tx_polarity_flip_physical{86.0}=0x0
+phy_chain_rx_polarity_flip_physical{86.0}=0x1
+phy_chain_tx_polarity_flip_physical{87.0}=0x1
+phy_chain_rx_polarity_flip_physical{87.0}=0x1
+phy_chain_tx_polarity_flip_physical{88.0}=0x0
+phy_chain_rx_polarity_flip_physical{88.0}=0x1
+phy_chain_tx_polarity_flip_physical{77.0}=0x1
+phy_chain_rx_polarity_flip_physical{77.0}=0x1
+phy_chain_tx_polarity_flip_physical{78.0}=0x1
+phy_chain_rx_polarity_flip_physical{78.0}=0x0
+phy_chain_tx_polarity_flip_physical{79.0}=0x1
+phy_chain_rx_polarity_flip_physical{79.0}=0x1
+phy_chain_tx_polarity_flip_physical{80.0}=0x1
+phy_chain_rx_polarity_flip_physical{80.0}=0x1
+phy_chain_tx_polarity_flip_physical{97.0}=0x1
+phy_chain_rx_polarity_flip_physical{97.0}=0x0
+phy_chain_tx_polarity_flip_physical{98.0}=0x0
+phy_chain_rx_polarity_flip_physical{98.0}=0x0
+phy_chain_tx_polarity_flip_physical{99.0}=0x1
+phy_chain_rx_polarity_flip_physical{99.0}=0x0
+phy_chain_tx_polarity_flip_physical{100.0}=0x0
+phy_chain_rx_polarity_flip_physical{100.0}=0x0
+phy_chain_tx_polarity_flip_physical{93.0}=0x1
+phy_chain_rx_polarity_flip_physical{93.0}=0x1
+phy_chain_tx_polarity_flip_physical{94.0}=0x1
+phy_chain_rx_polarity_flip_physical{94.0}=0x0
+phy_chain_tx_polarity_flip_physical{95.0}=0x1
+phy_chain_rx_polarity_flip_physical{95.0}=0x1
+phy_chain_tx_polarity_flip_physical{96.0}=0x1
+phy_chain_rx_polarity_flip_physical{96.0}=0x1
+phy_chain_tx_polarity_flip_physical{113.0}=0x1
+phy_chain_rx_polarity_flip_physical{113.0}=0x1
+phy_chain_tx_polarity_flip_physical{114.0}=0x0
+phy_chain_rx_polarity_flip_physical{114.0}=0x1
+phy_chain_tx_polarity_flip_physical{115.0}=0x1
+phy_chain_rx_polarity_flip_physical{115.0}=0x1
+phy_chain_tx_polarity_flip_physical{116.0}=0x0
+phy_chain_rx_polarity_flip_physical{116.0}=0x1
+phy_chain_tx_polarity_flip_physical{105.0}=0x1
+phy_chain_rx_polarity_flip_physical{105.0}=0x1
+phy_chain_tx_polarity_flip_physical{106.0}=0x1
+phy_chain_rx_polarity_flip_physical{106.0}=0x0
+phy_chain_tx_polarity_flip_physical{107.0}=0x1
+phy_chain_rx_polarity_flip_physical{107.0}=0x1
+phy_chain_tx_polarity_flip_physical{108.0}=0x1
+phy_chain_rx_polarity_flip_physical{108.0}=0x1
+phy_chain_tx_polarity_flip_physical{121.0}=0x1
+phy_chain_rx_polarity_flip_physical{121.0}=0x1
+phy_chain_tx_polarity_flip_physical{122.0}=0x0
+phy_chain_rx_polarity_flip_physical{122.0}=0x0
+phy_chain_tx_polarity_flip_physical{123.0}=0x1
+phy_chain_rx_polarity_flip_physical{123.0}=0x0
+phy_chain_tx_polarity_flip_physical{124.0}=0x0
+phy_chain_rx_polarity_flip_physical{124.0}=0x1
+phy_chain_tx_polarity_flip_physical{125.0}=0x0
+phy_chain_rx_polarity_flip_physical{125.0}=0x0
+phy_chain_tx_polarity_flip_physical{126.0}=0x1
+phy_chain_rx_polarity_flip_physical{126.0}=0x1
+phy_chain_tx_polarity_flip_physical{127.0}=0x0
+phy_chain_rx_polarity_flip_physical{127.0}=0x0
+phy_chain_tx_polarity_flip_physical{128.0}=0x0
+phy_chain_rx_polarity_flip_physical{128.0}=0x0
+port_flex_enable=1
+portmap_1=1:25
+portmap_2=2:25
+portmap_3=3:25
+portmap_4=4:25
+portmap_5=5:25
+portmap_6=6:25
+portmap_7=7:25
+portmap_8=8:25
+portmap_13=13:25
+portmap_14=14:25
+portmap_15=15:25
+portmap_16=16:25
+portmap_21=21:25
+portmap_22=22:25
+portmap_23=23:25
+portmap_24=24:25
+portmap_29=29:25
+portmap_30=30:25
+portmap_31=31:25
+portmap_32=32:25
+portmap_33=33:25
+portmap_34=34:25
+portmap_35=35:25
+portmap_36=36:25
+portmap_41=41:25
+portmap_42=42:25
+portmap_43=43:25
+portmap_44=44:25
+portmap_49=49:25
+portmap_50=50:25
+portmap_51=51:25
+portmap_52=52:25
+portmap_57=57:25
+portmap_58=58:25
+portmap_59=59:25
+portmap_60=60:25
+portmap_61=61:25
+portmap_62=62:25
+portmap_63=63:25
+portmap_64=64:25
+portmap_67=65:25
+portmap_68=66:25
+portmap_69=67:25
+portmap_70=68:25
+portmap_71=69:25
+portmap_72=70:25
+portmap_73=71:25
+portmap_74=72:25
+portmap_79=77:100
+portmap_87=85:100
+portmap_95=93:100
+portmap_99=97:100
+portmap_107=105:100
+portmap_115=113:100
+portmap_123=121:100
+portmap_127=125:100
+
+dport_map_port_1=1
+dport_map_port_2=2
+dport_map_port_3=3
+dport_map_port_4=4
+dport_map_port_5=5
+dport_map_port_6=6
+dport_map_port_7=7
+dport_map_port_8=8
+dport_map_port_13=9
+dport_map_port_14=10
+dport_map_port_15=11
+dport_map_port_16=12
+dport_map_port_21=13
+dport_map_port_22=14
+dport_map_port_23=15
+dport_map_port_24=16
+dport_map_port_29=17
+dport_map_port_30=18
+dport_map_port_31=19
+dport_map_port_32=20
+dport_map_port_33=21
+dport_map_port_34=22
+dport_map_port_35=23
+dport_map_port_36=24
+dport_map_port_41=25
+dport_map_port_42=26
+dport_map_port_43=27
+dport_map_port_44=28
+dport_map_port_49=29
+dport_map_port_50=30
+dport_map_port_51=31
+dport_map_port_52=32
+dport_map_port_57=33
+dport_map_port_58=34
+dport_map_port_59=35
+dport_map_port_60=36
+dport_map_port_61=37
+dport_map_port_62=38
+dport_map_port_63=39
+dport_map_port_64=40
+dport_map_port_67=41
+dport_map_port_68=42
+dport_map_port_69=43
+dport_map_port_70=44
+dport_map_port_71=45
+dport_map_port_72=46
+dport_map_port_73=47
+dport_map_port_74=48
+dport_map_port_87=49
+dport_map_port_79=50
+dport_map_port_99=51
+dport_map_port_95=52
+dport_map_port_115=53
+dport_map_port_107=54
+dport_map_port_123=55
+dport_map_port_127=56
+
+serdes_if_type_1=13
+serdes_if_type_2=13
+serdes_if_type_3=13
+serdes_if_type_4=13
+serdes_if_type_5=13
+serdes_if_type_6=13
+serdes_if_type_7=13
+serdes_if_type_8=13
+serdes_if_type_13=13
+serdes_if_type_14=13
+serdes_if_type_15=13
+serdes_if_type_16=13
+serdes_if_type_21=13
+serdes_if_type_22=13
+serdes_if_type_23=13
+serdes_if_type_24=13
+serdes_if_type_29=13
+serdes_if_type_30=13
+serdes_if_type_31=13
+serdes_if_type_32=13
+serdes_if_type_33=13
+serdes_if_type_34=13
+serdes_if_type_35=13
+serdes_if_type_36=13
+serdes_if_type_41=13
+serdes_if_type_42=13
+serdes_if_type_43=13
+serdes_if_type_44=13
+serdes_if_type_49=13
+serdes_if_type_50=13
+serdes_if_type_51=13
+serdes_if_type_52=13
+serdes_if_type_57=13
+serdes_if_type_58=13
+serdes_if_type_59=13
+serdes_if_type_60=13
+serdes_if_type_61=13
+serdes_if_type_62=13
+serdes_if_type_63=13
+serdes_if_type_64=13
+serdes_if_type_67=13
+serdes_if_type_68=13
+serdes_if_type_69=13
+serdes_if_type_70=13
+serdes_if_type_71=13
+serdes_if_type_72=13
+serdes_if_type_73=13
+serdes_if_type_74=13
+serdes_if_type_87=14
+serdes_if_type_79=14
+serdes_if_type_99=14
+serdes_if_type_95=14
+serdes_if_type_115=14
+serdes_if_type_107=14
+serdes_if_type_123=14
+serdes_if_type_127=14
+
+reglist_enable=1
+scache_filename=/tmp/scache
+schan_intr_enable=0
+stable_size=0x5500000
+tdma_timeout_usec=3000000
diff --git a/device/ragile/x86_64-ragile_ra-b6510-48v8c-r0/pddf/pddf-device.json b/device/ragile/x86_64-ragile_ra-b6510-48v8c-r0/pddf/pddf-device.json
index 4fa2582830f..fa97ba4851b 100644
--- a/device/ragile/x86_64-ragile_ra-b6510-48v8c-r0/pddf/pddf-device.json
+++ b/device/ragile/x86_64-ragile_ra-b6510-48v8c-r0/pddf/pddf-device.json
@@ -73,12 +73,12 @@
"CONTROLLERS": [{
"dev_name": "i2c-0",
"dev": "SMBUS0"
- }, {
- "dev_name": "i2c-1",
- "dev": "I2C-GPIO0"
}, {
"dev_name": "i2c-2",
"dev": "SMBUS1"
+ }, {
+ "dev_name": "i2c-1",
+ "dev": "I2C-GPIO0"
}]
}
},
@@ -1337,7 +1337,7 @@
"PORT1": {
"dev_info": {
- "device_type": "QSFP28",
+ "device_type": "SFP28",
"device_name": "PORT1",
"device_parent": "PORT-MUX1"
},
@@ -1389,26 +1389,29 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x30",
- "attr_mask": "0x1",
+ "attr_mask": "0x00",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_txdisable",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x60",
- "attr_mask": "0x1",
+ "attr_mask": "0x00",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x40",
- "attr_mask": "0x1",
+ "attr_mask": "0x00",
"attr_cmpval": "0x0",
"attr_len": "1"
}]
@@ -1417,7 +1420,7 @@
"PORT2": {
"dev_info": {
- "device_type": "QSFP28",
+ "device_type": "SFP28",
"device_name": "PORT2",
"device_parent": "PORT-MUX1"
},
@@ -1469,26 +1472,29 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x30",
- "attr_mask": "0x2",
+ "attr_mask": "0x01",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_txdisable",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x60",
- "attr_mask": "0x2",
+ "attr_mask": "0x01",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x40",
- "attr_mask": "0x2",
+ "attr_mask": "0x01",
"attr_cmpval": "0x0",
"attr_len": "1"
}]
@@ -1497,7 +1503,7 @@
"PORT3": {
"dev_info": {
- "device_type": "QSFP28",
+ "device_type": "SFP28",
"device_name": "PORT3",
"device_parent": "PORT-MUX1"
},
@@ -1549,26 +1555,29 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x30",
- "attr_mask": "0x4",
+ "attr_mask": "0x02",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_txdisable",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x60",
- "attr_mask": "0x4",
+ "attr_mask": "0x02",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x40",
- "attr_mask": "0x4",
+ "attr_mask": "0x02",
"attr_cmpval": "0x0",
"attr_len": "1"
}]
@@ -1578,7 +1587,7 @@
"PORT4": {
"dev_info": {
- "device_type": "QSFP28",
+ "device_type": "SFP28",
"device_name": "PORT4",
"device_parent": "PORT-MUX1"
},
@@ -1630,26 +1639,29 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x30",
- "attr_mask": "0x8",
+ "attr_mask": "0x03",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_txdisable",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x60",
- "attr_mask": "0x8",
+ "attr_mask": "0x03",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x40",
- "attr_mask": "0x8",
+ "attr_mask": "0x03",
"attr_cmpval": "0x0",
"attr_len": "1"
}]
@@ -1659,7 +1671,7 @@
"PORT5": {
"dev_info": {
- "device_type": "QSFP28",
+ "device_type": "SFP28",
"device_name": "PORT5",
"device_parent": "PORT-MUX1"
},
@@ -1711,26 +1723,29 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x30",
- "attr_mask": "0x10",
+ "attr_mask": "0x04",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_txdisable",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x60",
- "attr_mask": "0x10",
+ "attr_mask": "0x04",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x40",
- "attr_mask": "0x10",
+ "attr_mask": "0x04",
"attr_cmpval": "0x0",
"attr_len": "1"
}]
@@ -1740,7 +1755,7 @@
"PORT6": {
"dev_info": {
- "device_type": "QSFP28",
+ "device_type": "SFP28",
"device_name": "PORT6",
"device_parent": "PORT-MUX1"
},
@@ -1792,26 +1807,29 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x30",
- "attr_mask": "0x20",
+ "attr_mask": "0x05",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_txdisable",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x60",
- "attr_mask": "0x20",
+ "attr_mask": "0x05",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x40",
- "attr_mask": "0x20",
+ "attr_mask": "0x05",
"attr_cmpval": "0x0",
"attr_len": "1"
}]
@@ -1820,7 +1838,7 @@
"PORT7": {
"dev_info": {
- "device_type": "QSFP28",
+ "device_type": "SFP28",
"device_name": "PORT7",
"device_parent": "PORT-MUX1"
},
@@ -1872,26 +1890,29 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x30",
- "attr_mask": "0x40",
+ "attr_mask": "0x06",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_txdisable",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x60",
- "attr_mask": "0x40",
+ "attr_mask": "0x06",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x40",
- "attr_mask": "0x40",
+ "attr_mask": "0x06",
"attr_cmpval": "0x0",
"attr_len": "1"
}]
@@ -1900,7 +1921,7 @@
"PORT8": {
"dev_info": {
- "device_type": "QSFP28",
+ "device_type": "SFP28",
"device_name": "PORT8",
"device_parent": "PORT-MUX1"
},
@@ -1952,26 +1973,29 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x30",
- "attr_mask": "0x80",
+ "attr_mask": "0x07",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_txdisable",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x60",
- "attr_mask": "0x80",
+ "attr_mask": "0x07",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x40",
- "attr_mask": "0x80",
+ "attr_mask": "0x07",
"attr_cmpval": "0x0",
"attr_len": "1"
}]
@@ -1980,7 +2004,7 @@
"PORT9": {
"dev_info": {
- "device_type": "QSFP28",
+ "device_type": "SFP28",
"device_name": "PORT9",
"device_parent": "PORT-MUX2"
},
@@ -2032,26 +2056,29 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x31",
- "attr_mask": "0x01",
+ "attr_mask": "0x00",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_txdisable",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x61",
- "attr_mask": "0x01",
+ "attr_mask": "0x00",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x41",
- "attr_mask": "0x01",
+ "attr_mask": "0x00",
"attr_cmpval": "0x0",
"attr_len": "1"
}]
@@ -2060,7 +2087,7 @@
"PORT10": {
"dev_info": {
- "device_type": "QSFP28",
+ "device_type": "SFP28",
"device_name": "PORT10",
"device_parent": "PORT-MUX2"
},
@@ -2112,26 +2139,29 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x31",
- "attr_mask": "0x02",
+ "attr_mask": "0x01",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_txdisable",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x61",
- "attr_mask": "0x02",
+ "attr_mask": "0x01",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x41",
- "attr_mask": "0x02",
+ "attr_mask": "0x01",
"attr_cmpval": "0x0",
"attr_len": "1"
}]
@@ -2141,7 +2171,7 @@
"PORT11": {
"dev_info": {
- "device_type": "QSFP28",
+ "device_type": "SFP28",
"device_name": "PORT11",
"device_parent": "PORT-MUX2"
},
@@ -2193,26 +2223,29 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x31",
- "attr_mask": "0x04",
+ "attr_mask": "0x02",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_txdisable",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x61",
- "attr_mask": "0x04",
+ "attr_mask": "0x02",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x41",
- "attr_mask": "0x04",
+ "attr_mask": "0x02",
"attr_cmpval": "0x0",
"attr_len": "1"
}]
@@ -2222,7 +2255,7 @@
"PORT12": {
"dev_info": {
- "device_type": "QSFP28",
+ "device_type": "SFP28",
"device_name": "PORT12",
"device_parent": "PORT-MUX2"
},
@@ -2274,26 +2307,29 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x31",
- "attr_mask": "0x08",
+ "attr_mask": "0x03",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_txdisable",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x61",
- "attr_mask": "0x08",
+ "attr_mask": "0x03",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x41",
- "attr_mask": "0x08",
+ "attr_mask": "0x03",
"attr_cmpval": "0x0",
"attr_len": "1"
}]
@@ -2303,7 +2339,7 @@
"PORT13": {
"dev_info": {
- "device_type": "QSFP28",
+ "device_type": "SFP28",
"device_name": "PORT13",
"device_parent": "PORT-MUX2"
},
@@ -2355,26 +2391,29 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x31",
- "attr_mask": "0x10",
+ "attr_mask": "0x04",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_txdisable",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x61",
- "attr_mask": "0x10",
+ "attr_mask": "0x04",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x41",
- "attr_mask": "0x10",
+ "attr_mask": "0x04",
"attr_cmpval": "0x0",
"attr_len": "1"
}]
@@ -2384,7 +2423,7 @@
"PORT14": {
"dev_info": {
- "device_type": "QSFP28",
+ "device_type": "SFP28",
"device_name": "PORT14",
"device_parent": "PORT-MUX2"
},
@@ -2436,26 +2475,29 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x31",
- "attr_mask": "0x20",
+ "attr_mask": "0x05",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_txdisable",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x61",
- "attr_mask": "0x20",
+ "attr_mask": "0x05",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x41",
- "attr_mask": "0x20",
+ "attr_mask": "0x05",
"attr_cmpval": "0x0",
"attr_len": "1"
}]
@@ -2464,7 +2506,7 @@
"PORT15": {
"dev_info": {
- "device_type": "QSFP28",
+ "device_type": "SFP28",
"device_name": "PORT15",
"device_parent": "PORT-MUX2"
},
@@ -2516,26 +2558,29 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x31",
- "attr_mask": "0x40",
+ "attr_mask": "0x06",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_txdisable",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x61",
- "attr_mask": "0x40",
+ "attr_mask": "0x06",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x41",
- "attr_mask": "0x40",
+ "attr_mask": "0x06",
"attr_cmpval": "0x0",
"attr_len": "1"
}]
@@ -2544,7 +2589,7 @@
"PORT16": {
"dev_info": {
- "device_type": "QSFP28",
+ "device_type": "SFP28",
"device_name": "PORT16",
"device_parent": "PORT-MUX2"
},
@@ -2596,26 +2641,29 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x31",
- "attr_mask": "0x80",
+ "attr_mask": "0x07",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_txdisable",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x61",
- "attr_mask": "0x80",
+ "attr_mask": "0x07",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x41",
- "attr_mask": "0x80",
+ "attr_mask": "0x07",
"attr_cmpval": "0x0",
"attr_len": "1"
}]
@@ -2624,7 +2672,7 @@
"PORT17": {
"dev_info": {
- "device_type": "QSFP28",
+ "device_type": "SFP28",
"device_name": "PORT17",
"device_parent": "PORT-MUX3"
},
@@ -2676,26 +2724,29 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x32",
- "attr_mask": "0x01",
+ "attr_mask": "0x00",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_txdisable",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x62",
- "attr_mask": "0x01",
+ "attr_mask": "0x00",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x42",
- "attr_mask": "0x01",
+ "attr_mask": "0x00",
"attr_cmpval": "0x0",
"attr_len": "1"
}]
@@ -2704,7 +2755,7 @@
"PORT18": {
"dev_info": {
- "device_type": "QSFP28",
+ "device_type": "SFP28",
"device_name": "PORT18",
"device_parent": "PORT-MUX3"
},
@@ -2756,26 +2807,29 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x32",
- "attr_mask": "0x02",
+ "attr_mask": "0x01",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_txdisable",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x62",
- "attr_mask": "0x02",
+ "attr_mask": "0x01",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x42",
- "attr_mask": "0x02",
+ "attr_mask": "0x01",
"attr_cmpval": "0x0",
"attr_len": "1"
}]
@@ -2785,7 +2839,7 @@
"PORT19": {
"dev_info": {
- "device_type": "QSFP28",
+ "device_type": "SFP28",
"device_name": "PORT19",
"device_parent": "PORT-MUX3"
},
@@ -2837,26 +2891,29 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x32",
- "attr_mask": "0x04",
+ "attr_mask": "0x02",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_txdisable",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x62",
- "attr_mask": "0x04",
+ "attr_mask": "0x02",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x42",
- "attr_mask": "0x04",
+ "attr_mask": "0x02",
"attr_cmpval": "0x0",
"attr_len": "1"
}]
@@ -2866,7 +2923,7 @@
"PORT20": {
"dev_info": {
- "device_type": "QSFP28",
+ "device_type": "SFP28",
"device_name": "PORT20",
"device_parent": "PORT-MUX3"
},
@@ -2918,26 +2975,29 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x32",
- "attr_mask": "0x08",
+ "attr_mask": "0x03",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_txdisable",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x62",
- "attr_mask": "0x08",
+ "attr_mask": "0x03",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x42",
- "attr_mask": "0x08",
+ "attr_mask": "0x03",
"attr_cmpval": "0x0",
"attr_len": "1"
}]
@@ -2947,7 +3007,7 @@
"PORT21": {
"dev_info": {
- "device_type": "QSFP28",
+ "device_type": "SFP28",
"device_name": "PORT21",
"device_parent": "PORT-MUX3"
},
@@ -2999,26 +3059,29 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x32",
- "attr_mask": "0x10",
+ "attr_mask": "0x04",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_txdisable",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x62",
- "attr_mask": "0x10",
+ "attr_mask": "0x04",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x42",
- "attr_mask": "0x10",
+ "attr_mask": "0x04",
"attr_cmpval": "0x0",
"attr_len": "1"
}]
@@ -3028,7 +3091,7 @@
"PORT22": {
"dev_info": {
- "device_type": "QSFP28",
+ "device_type": "SFP28",
"device_name": "PORT22",
"device_parent": "PORT-MUX3"
},
@@ -3080,26 +3143,29 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x32",
- "attr_mask": "0x20",
+ "attr_mask": "0x05",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_txdisable",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x62",
- "attr_mask": "0x20",
+ "attr_mask": "0x05",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x42",
- "attr_mask": "0x20",
+ "attr_mask": "0x05",
"attr_cmpval": "0x0",
"attr_len": "1"
}]
@@ -3108,7 +3174,7 @@
"PORT23": {
"dev_info": {
- "device_type": "QSFP28",
+ "device_type": "SFP28",
"device_name": "PORT23",
"device_parent": "PORT-MUX3"
},
@@ -3160,26 +3226,29 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x32",
- "attr_mask": "0x40",
+ "attr_mask": "0x06",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_txdisable",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x62",
- "attr_mask": "0x40",
+ "attr_mask": "0x06",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x42",
- "attr_mask": "0x40",
+ "attr_mask": "0x06",
"attr_cmpval": "0x0",
"attr_len": "1"
}]
@@ -3188,7 +3257,7 @@
"PORT24": {
"dev_info": {
- "device_type": "QSFP28",
+ "device_type": "SFP28",
"device_name": "PORT24",
"device_parent": "PORT-MUX3"
},
@@ -3240,26 +3309,29 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x32",
- "attr_mask": "0x80",
+ "attr_mask": "0x07",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_txdisable",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x62",
- "attr_mask": "0x80",
+ "attr_mask": "0x07",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x42",
- "attr_mask": "0x80",
+ "attr_mask": "0x07",
"attr_cmpval": "0x0",
"attr_len": "1"
}]
@@ -3268,7 +3340,7 @@
"PORT25": {
"dev_info": {
- "device_type": "QSFP28",
+ "device_type": "SFP28",
"device_name": "PORT25",
"device_parent": "PORT-MUX4"
},
@@ -3320,26 +3392,29 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x30",
- "attr_mask": "0x01",
+ "attr_mask": "0x00",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_txdisable",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x60",
- "attr_mask": "0x01",
+ "attr_mask": "0x00",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x40",
- "attr_mask": "0x01",
+ "attr_mask": "0x00",
"attr_cmpval": "0x0",
"attr_len": "1"
}]
@@ -3348,7 +3423,7 @@
"PORT26": {
"dev_info": {
- "device_type": "QSFP28",
+ "device_type": "SFP28",
"device_name": "PORT26",
"device_parent": "PORT-MUX4"
},
@@ -3400,26 +3475,29 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x30",
- "attr_mask": "0x02",
+ "attr_mask": "0x01",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_txdisable",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x60",
- "attr_mask": "0x02",
+ "attr_mask": "0x01",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x40",
- "attr_mask": "0x02",
+ "attr_mask": "0x01",
"attr_cmpval": "0x0",
"attr_len": "1"
}]
@@ -3429,7 +3507,7 @@
"PORT27": {
"dev_info": {
- "device_type": "QSFP28",
+ "device_type": "SFP28",
"device_name": "PORT27",
"device_parent": "PORT-MUX4"
},
@@ -3481,26 +3559,29 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x30",
- "attr_mask": "0x04",
+ "attr_mask": "0x02",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_txdisable",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x60",
- "attr_mask": "0x04",
+ "attr_mask": "0x02",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x40",
- "attr_mask": "0x04",
+ "attr_mask": "0x02",
"attr_cmpval": "0x0",
"attr_len": "1"
}]
@@ -3510,7 +3591,7 @@
"PORT28": {
"dev_info": {
- "device_type": "QSFP28",
+ "device_type": "SFP28",
"device_name": "PORT28",
"device_parent": "PORT-MUX4"
},
@@ -3562,26 +3643,29 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x30",
- "attr_mask": "0x08",
+ "attr_mask": "0x03",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_txdisable",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x60",
- "attr_mask": "0x08",
+ "attr_mask": "0x03",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x40",
- "attr_mask": "0x08",
+ "attr_mask": "0x03",
"attr_cmpval": "0x0",
"attr_len": "1"
}]
@@ -3591,7 +3675,7 @@
"PORT29": {
"dev_info": {
- "device_type": "QSFP28",
+ "device_type": "SFP28",
"device_name": "PORT29",
"device_parent": "PORT-MUX4"
},
@@ -3643,26 +3727,29 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x30",
- "attr_mask": "0x10",
+ "attr_mask": "0x04",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_txdisable",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x60",
- "attr_mask": "0x10",
+ "attr_mask": "0x04",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x40",
- "attr_mask": "0x10",
+ "attr_mask": "0x04",
"attr_cmpval": "0x0",
"attr_len": "1"
}]
@@ -3672,7 +3759,7 @@
"PORT30": {
"dev_info": {
- "device_type": "QSFP28",
+ "device_type": "SFP28",
"device_name": "PORT30",
"device_parent": "PORT-MUX4"
},
@@ -3724,26 +3811,29 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x30",
- "attr_mask": "0x20",
+ "attr_mask": "0x05",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_txdisable",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x60",
- "attr_mask": "0x20",
+ "attr_mask": "0x05",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x40",
- "attr_mask": "0x20",
+ "attr_mask": "0x05",
"attr_cmpval": "0x0",
"attr_len": "1"
}]
@@ -3752,7 +3842,7 @@
"PORT31": {
"dev_info": {
- "device_type": "QSFP28",
+ "device_type": "SFP28",
"device_name": "PORT31",
"device_parent": "PORT-MUX4"
},
@@ -3804,26 +3894,29 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x30",
- "attr_mask": "0x40",
+ "attr_mask": "0x06",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_txdisable",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x60",
- "attr_mask": "0x40",
+ "attr_mask": "0x06",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x40",
- "attr_mask": "0x40",
+ "attr_mask": "0x06",
"attr_cmpval": "0x0",
"attr_len": "1"
}]
@@ -3832,7 +3925,7 @@
"PORT32": {
"dev_info": {
- "device_type": "QSFP28",
+ "device_type": "SFP28",
"device_name": "PORT32",
"device_parent": "PORT-MUX4"
},
@@ -3884,26 +3977,29 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x30",
- "attr_mask": "0x80",
+ "attr_mask": "0x07",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_txdisable",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x60",
- "attr_mask": "0x80",
+ "attr_mask": "0x07",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x40",
- "attr_mask": "0x80",
+ "attr_mask": "0x07",
"attr_cmpval": "0x0",
"attr_len": "1"
}]
@@ -3912,7 +4008,7 @@
"PORT33": {
"dev_info": {
- "device_type": "QSFP28",
+ "device_type": "SFP28",
"device_name": "PORT33",
"device_parent": "PORT-MUX5"
},
@@ -3964,26 +4060,29 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x31",
- "attr_mask": "0x01",
+ "attr_mask": "0x00",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_txdisable",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x61",
- "attr_mask": "0x01",
+ "attr_mask": "0x00",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x41",
- "attr_mask": "0x01",
+ "attr_mask": "0x00",
"attr_cmpval": "0x0",
"attr_len": "1"
}]
@@ -3992,7 +4091,7 @@
"PORT34": {
"dev_info": {
- "device_type": "QSFP28",
+ "device_type": "SFP28",
"device_name": "PORT34",
"device_parent": "PORT-MUX5"
},
@@ -4044,26 +4143,29 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x31",
- "attr_mask": "0x02",
+ "attr_mask": "0x01",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_txdisable",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x61",
- "attr_mask": "0x02",
+ "attr_mask": "0x01",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x41",
- "attr_mask": "0x02",
+ "attr_mask": "0x01",
"attr_cmpval": "0x0",
"attr_len": "1"
}]
@@ -4073,7 +4175,7 @@
"PORT35": {
"dev_info": {
- "device_type": "QSFP28",
+ "device_type": "SFP28",
"device_name": "PORT35",
"device_parent": "PORT-MUX5"
},
@@ -4125,26 +4227,29 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x31",
- "attr_mask": "0x04",
+ "attr_mask": "0x02",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_txdisable",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x61",
- "attr_mask": "0x04",
+ "attr_mask": "0x02",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x41",
- "attr_mask": "0x04",
+ "attr_mask": "0x02",
"attr_cmpval": "0x0",
"attr_len": "1"
}]
@@ -4154,7 +4259,7 @@
"PORT36": {
"dev_info": {
- "device_type": "QSFP28",
+ "device_type": "SFP28",
"device_name": "PORT36",
"device_parent": "PORT-MUX5"
},
@@ -4206,26 +4311,29 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x31",
- "attr_mask": "0x08",
+ "attr_mask": "0x03",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_txdisable",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x61",
- "attr_mask": "0x08",
+ "attr_mask": "0x03",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x41",
- "attr_mask": "0x08",
+ "attr_mask": "0x03",
"attr_cmpval": "0x0",
"attr_len": "1"
}]
@@ -4235,7 +4343,7 @@
"PORT37": {
"dev_info": {
- "device_type": "QSFP28",
+ "device_type": "SFP28",
"device_name": "PORT37",
"device_parent": "PORT-MUX5"
},
@@ -4287,26 +4395,29 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x31",
- "attr_mask": "0x10",
+ "attr_mask": "0x04",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_txdisable",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x61",
- "attr_mask": "0x10",
+ "attr_mask": "0x04",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x41",
- "attr_mask": "0x10",
+ "attr_mask": "0x04",
"attr_cmpval": "0x0",
"attr_len": "1"
}]
@@ -4316,7 +4427,7 @@
"PORT38": {
"dev_info": {
- "device_type": "QSFP28",
+ "device_type": "SFP28",
"device_name": "PORT38",
"device_parent": "PORT-MUX5"
},
@@ -4368,26 +4479,29 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x31",
- "attr_mask": "0x20",
+ "attr_mask": "0x05",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_txdisable",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x61",
- "attr_mask": "0x20",
+ "attr_mask": "0x05",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x41",
- "attr_mask": "0x20",
+ "attr_mask": "0x05",
"attr_cmpval": "0x0",
"attr_len": "1"
}]
@@ -4396,7 +4510,7 @@
"PORT39": {
"dev_info": {
- "device_type": "QSFP28",
+ "device_type": "SFP28",
"device_name": "PORT39",
"device_parent": "PORT-MUX5"
},
@@ -4448,26 +4562,29 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x31",
- "attr_mask": "0x40",
+ "attr_mask": "0x06",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_txdisable",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x61",
- "attr_mask": "0x40",
+ "attr_mask": "0x06",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x41",
- "attr_mask": "0x40",
+ "attr_mask": "0x06",
"attr_cmpval": "0x0",
"attr_len": "1"
}]
@@ -4476,7 +4593,7 @@
"PORT40": {
"dev_info": {
- "device_type": "QSFP28",
+ "device_type": "SFP28",
"device_name": "PORT40",
"device_parent": "PORT-MUX5"
},
@@ -4528,26 +4645,29 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x31",
- "attr_mask": "0x80",
+ "attr_mask": "0x07",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_txdisable",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x61",
- "attr_mask": "0x80",
+ "attr_mask": "0x07",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x41",
- "attr_mask": "0x80",
+ "attr_mask": "0x07",
"attr_cmpval": "0x0",
"attr_len": "1"
}]
@@ -4556,7 +4676,7 @@
"PORT41": {
"dev_info": {
- "device_type": "QSFP28",
+ "device_type": "SFP28",
"device_name": "PORT41",
"device_parent": "PORT-MUX6"
},
@@ -4608,26 +4728,29 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x32",
- "attr_mask": "0x01",
+ "attr_mask": "0x00",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_txdisable",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x62",
- "attr_mask": "0x01",
+ "attr_mask": "0x00",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x42",
- "attr_mask": "0x01",
+ "attr_mask": "0x00",
"attr_cmpval": "0x0",
"attr_len": "1"
}]
@@ -4636,7 +4759,7 @@
"PORT42": {
"dev_info": {
- "device_type": "QSFP28",
+ "device_type": "SFP28",
"device_name": "PORT42",
"device_parent": "PORT-MUX6"
},
@@ -4688,26 +4811,29 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x32",
- "attr_mask": "0x02",
+ "attr_mask": "0x01",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_txdisable",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x62",
- "attr_mask": "0x02",
+ "attr_mask": "0x01",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x42",
- "attr_mask": "0x02",
+ "attr_mask": "0x01",
"attr_cmpval": "0x0",
"attr_len": "1"
}]
@@ -4717,7 +4843,7 @@
"PORT43": {
"dev_info": {
- "device_type": "QSFP28",
+ "device_type": "SFP28",
"device_name": "PORT43",
"device_parent": "PORT-MUX6"
},
@@ -4769,26 +4895,29 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x32",
- "attr_mask": "0x04",
+ "attr_mask": "0x02",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_txdisable",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x62",
- "attr_mask": "0x04",
+ "attr_mask": "0x02",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x42",
- "attr_mask": "0x04",
+ "attr_mask": "0x02",
"attr_cmpval": "0x0",
"attr_len": "1"
}]
@@ -4798,7 +4927,7 @@
"PORT44": {
"dev_info": {
- "device_type": "QSFP28",
+ "device_type": "SFP28",
"device_name": "PORT44",
"device_parent": "PORT-MUX6"
},
@@ -4850,26 +4979,29 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x32",
- "attr_mask": "0x08",
+ "attr_mask": "0x03",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_txdisable",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x62",
- "attr_mask": "0x08",
+ "attr_mask": "0x03",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x42",
- "attr_mask": "0x08",
+ "attr_mask": "0x03",
"attr_cmpval": "0x0",
"attr_len": "1"
}]
@@ -4879,7 +5011,7 @@
"PORT45": {
"dev_info": {
- "device_type": "QSFP28",
+ "device_type": "SFP28",
"device_name": "PORT45",
"device_parent": "PORT-MUX6"
},
@@ -4931,26 +5063,29 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x32",
- "attr_mask": "0x10",
+ "attr_mask": "0x04",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_txdisable",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x62",
- "attr_mask": "0x10",
+ "attr_mask": "0x04",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x42",
- "attr_mask": "0x10",
+ "attr_mask": "0x04",
"attr_cmpval": "0x0",
"attr_len": "1"
}]
@@ -4960,7 +5095,7 @@
"PORT46": {
"dev_info": {
- "device_type": "QSFP28",
+ "device_type": "SFP28",
"device_name": "PORT46",
"device_parent": "PORT-MUX6"
},
@@ -5012,26 +5147,29 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x32",
- "attr_mask": "0x20",
+ "attr_mask": "0x05",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_txdisable",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x62",
- "attr_mask": "0x20",
+ "attr_mask": "0x05",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x42",
- "attr_mask": "0x20",
+ "attr_mask": "0x05",
"attr_cmpval": "0x0",
"attr_len": "1"
}]
@@ -5040,7 +5178,7 @@
"PORT47": {
"dev_info": {
- "device_type": "QSFP28",
+ "device_type": "SFP28",
"device_name": "PORT47",
"device_parent": "PORT-MUX6"
},
@@ -5092,26 +5230,29 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x32",
- "attr_mask": "0x40",
+ "attr_mask": "0x06",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_txdisable",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x62",
- "attr_mask": "0x40",
+ "attr_mask": "0x06",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x42",
- "attr_mask": "0x40",
+ "attr_mask": "0x06",
"attr_cmpval": "0x0",
"attr_len": "1"
}]
@@ -5120,7 +5261,7 @@
"PORT48": {
"dev_info": {
- "device_type": "QSFP28",
+ "device_type": "SFP28",
"device_name": "PORT48",
"device_parent": "PORT-MUX6"
},
@@ -5172,26 +5313,29 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x32",
- "attr_mask": "0x80",
+ "attr_mask": "0x07",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_txdisable",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x62",
- "attr_mask": "0x80",
+ "attr_mask": "0x07",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x42",
- "attr_mask": "0x80",
+ "attr_mask": "0x07",
"attr_cmpval": "0x0",
"attr_len": "1"
}]
@@ -5252,18 +5396,20 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x33",
- "attr_mask": "0x01",
+ "attr_mask": "0x00",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_reset",
"attr_devaddr": "0x36",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devtype": "cpld",
"attr_offset": "0xb9",
- "attr_mask": "0x01",
+ "attr_mask": "0x00",
"attr_cmpval": "0x0",
"attr_len": "1"
}]
@@ -5324,18 +5470,20 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x33",
- "attr_mask": "0x02",
+ "attr_mask": "0x01",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_reset",
"attr_devaddr": "0x36",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devtype": "cpld",
"attr_offset": "0xb9",
- "attr_mask": "0x02",
+ "attr_mask": "0x01",
"attr_cmpval": "0x0",
"attr_len": "1"
}]
@@ -5397,18 +5545,20 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x33",
- "attr_mask": "0x04",
+ "attr_mask": "0x02",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_reset",
"attr_devaddr": "0x36",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devtype": "cpld",
"attr_offset": "0xb9",
- "attr_mask": "0x04",
+ "attr_mask": "0x02",
"attr_cmpval": "0x0",
"attr_len": "1"
}]
@@ -5470,18 +5620,20 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x33",
- "attr_mask": "0x08",
+ "attr_mask": "0x03",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_reset",
"attr_devaddr": "0x36",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devtype": "cpld",
"attr_offset": "0xb9",
- "attr_mask": "0x08",
+ "attr_mask": "0x03",
"attr_cmpval": "0x0",
"attr_len": "1"
}]
@@ -5543,18 +5695,20 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x33",
- "attr_mask": "0x10",
+ "attr_mask": "0x04",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_reset",
"attr_devaddr": "0x36",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devtype": "cpld",
"attr_offset": "0xb9",
- "attr_mask": "0x10",
+ "attr_mask": "0x04",
"attr_cmpval": "0x0",
"attr_len": "1"
}]
@@ -5616,18 +5770,20 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x33",
- "attr_mask": "0x20",
+ "attr_mask": "0x05",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_reset",
"attr_devaddr": "0x36",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devtype": "cpld",
"attr_offset": "0xb9",
- "attr_mask": "0x20",
+ "attr_mask": "0x05",
"attr_cmpval": "0x0",
"attr_len": "1"
}]
@@ -5688,18 +5844,20 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x33",
- "attr_mask": "0x40",
+ "attr_mask": "0x06",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_reset",
"attr_devaddr": "0x36",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devtype": "cpld",
"attr_offset": "0xb9",
- "attr_mask": "0x40",
+ "attr_mask": "0x06",
"attr_cmpval": "0x0",
"attr_len": "1"
}]
@@ -5760,18 +5918,20 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x33",
- "attr_mask": "0x80",
+ "attr_mask": "0x07",
"attr_cmpval": "0x0",
"attr_len": "1"
}, {
"attr_name": "xcvr_reset",
"attr_devaddr": "0x36",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devtype": "cpld",
"attr_offset": "0xb9",
- "attr_mask": "0x80",
+ "attr_mask": "0x07",
"attr_cmpval": "0x0",
"attr_len": "1"
}]
diff --git a/device/ragile/x86_64-ragile_ra-b6510-48v8c-r0/plugins/eeprom.py b/device/ragile/x86_64-ragile_ra-b6510-48v8c-r0/plugins/eeprom.py
new file mode 100755
index 00000000000..cf7215e0c9a
--- /dev/null
+++ b/device/ragile/x86_64-ragile_ra-b6510-48v8c-r0/plugins/eeprom.py
@@ -0,0 +1,25 @@
+try:
+ import os
+ import sys
+ import json
+ sys.path.append('/usr/share/sonic/platform/plugins')
+ import pddfparse
+ #from sonic_eeprom import eeprom_base
+ from sonic_eeprom import eeprom_tlvinfo
+except ImportError as e:
+ raise ImportError(str(e) + "- required module not found")
+
+
+class board(eeprom_tlvinfo.TlvInfoDecoder):
+ _TLV_INFO_MAX_LEN = 256
+
+ def __init__(self, name, path, cpld_root, ro):
+ global pddf_obj
+ global plugin_data
+ with open(os.path.join(os.path.dirname(os.path.realpath(__file__)) + '/../pddf/pd-plugin.json')) as pd:
+ plugin_data = json.load(pd)
+
+ pddf_obj = pddfparse.PddfParse()
+ # system EEPROM always has device name EEPROM1
+ self.eeprom_path = pddf_obj.get_path("EEPROM1", "eeprom")
+ super(board, self).__init__(self.eeprom_path, 0, '', True)
diff --git a/device/ragile/x86_64-ragile_ra-b6510-48v8c-r0/plugins/fanutil.py b/device/ragile/x86_64-ragile_ra-b6510-48v8c-r0/plugins/fanutil.py
new file mode 100755
index 00000000000..f34c260035e
--- /dev/null
+++ b/device/ragile/x86_64-ragile_ra-b6510-48v8c-r0/plugins/fanutil.py
@@ -0,0 +1,199 @@
+# Sample pddf_fanutil file
+# All the supported FAN SysFS aattributes are
+#- fan_present
+#- fan_direction
+#- fan_input
+#- fan_pwm
+#- fan_fault
+# where idx is in the range [1-12]
+#
+
+
+import os.path
+import sys
+sys.path.append('/usr/share/sonic/platform/plugins')
+import pddfparse
+import json
+
+try:
+ from sonic_fan.fan_base import FanBase
+except ImportError as e:
+ raise ImportError(str(e) + "- required module not found")
+
+
+class FanUtil(FanBase):
+ """PDDF generic FAN util class"""
+
+ def __init__(self):
+ FanBase.__init__(self)
+ global pddf_obj
+ global plugin_data
+ with open(os.path.join(os.path.dirname(os.path.realpath(__file__)) + '/../pddf/pd-plugin.json')) as pd:
+ plugin_data = json.load(pd)
+
+ pddf_obj = pddfparse.PddfParse()
+ self.platform = pddf_obj.get_platform()
+
+ self.num_fans = (self.platform['num_fantrays'] * self.platform['num_fans_pertray'])
+
+ def get_num_fans(self):
+ return self.num_fans
+
+ def get_presence(self, idx):
+ # 1 based fan index
+ if idx < 1 or idx > self.num_fans:
+ print("Invalid fan index %d\n" % idx)
+ return False
+
+ attr_name = "fan" + str(idx) + "_present"
+ output = pddf_obj.get_attr_name_output("FAN-CTRL", attr_name)
+ if not output:
+ return False
+
+ mode = output['mode']
+ presence = output['status'].rstrip()
+
+ vmap = plugin_data['FAN']['present'][mode]['valmap']
+
+ if presence in vmap:
+ status = vmap[presence]
+ else:
+ status = False
+
+ return status
+
+ def get_status(self, idx):
+ # 1 based fan index
+ if idx < 1 or idx > self.num_fans:
+ print("Invalid fan index %d\n" % idx)
+ return False
+
+ speed = self.get_speed(idx)
+ status = True if (speed != 0) else False
+ return status
+
+ def get_direction(self, idx):
+ # 1 based fan index
+ if idx < 1 or idx > self.num_fans:
+ print("Invalid fan index %d\n" % idx)
+ return None
+
+ attr = "fan" + str(idx) + "_direction"
+ output = pddf_obj.get_attr_name_output("FAN-CTRL", attr)
+ if not output:
+ return None
+
+ mode = output['mode']
+ val = output['status']
+
+ val = val.rstrip()
+ vmap = plugin_data['FAN']['direction'][mode]['valmap']
+
+ if val in vmap:
+ direction = vmap[val]
+ else:
+ direction = val
+
+ return direction
+
+ def get_directions(self):
+ num_fan = self.get_num_fan()
+
+ for i in range(1, num_fan+1):
+ attr = "fan" + str(i) + "_direction"
+ output = pddf_obj.get_attr_name_output("FAN-CTRL", attr)
+ if not output:
+ return None
+
+ mode = output['mode']
+ val = output['status']
+
+ val = val.rstrip()
+ vmap = plugin_data['FAN']['direction'][mode]['valmap']
+
+ direction = vmap[str(val)]
+
+ print("FAN-%d direction is %s" % (i, direction))
+
+ return 0
+
+ def get_speed(self, idx):
+ # 1 based fan index
+ if idx < 1 or idx > self.num_fans:
+ print("Invalid fan index %d\n" % idx)
+ return 0
+
+ attr = "fan" + str(idx) + "_input"
+ output = pddf_obj.get_attr_name_output("FAN-CTRL", attr)
+ if not output:
+ return 0
+
+ #mode = output['mode']
+ val = output['status'].rstrip()
+
+ if val.isalpha():
+ return 0
+ else:
+ rpm_speed = int(float(val))
+
+ return rpm_speed
+
+ def get_speeds(self):
+ num_fan = self.get_num_fan()
+ ret = "FAN_INDEX\t\tRPM\n"
+
+ for i in range(1, num_fan+1):
+ attr1 = "fan" + str(i) + "_input"
+ output = pddf_obj.get_attr_name_output("FAN-CTRL", attr1)
+ if not output:
+ return ""
+
+ #mode = output['mode']
+ val = output['status'].rstrip()
+
+ if val.isalpha():
+ frpm = 0
+ else:
+ frpm = int(val)
+
+ ret += "FAN-%d\t\t\t%d\n" % (i, frpm)
+
+ return ret
+
+ def set_speed(self, val):
+ if val < 0 or val > 100:
+ print("Error: Invalid speed %d. Please provide a valid speed percentage" % val)
+ return False
+
+ num_fan = self.num_fans
+ if 'duty_cycle_to_pwm' not in plugin_data['FAN']:
+ print("Setting fan speed is not allowed !")
+ return False
+ else:
+ duty_cycle_to_pwm = eval(plugin_data['FAN']['duty_cycle_to_pwm'])
+ pwm = duty_cycle_to_pwm(val)
+ print("New Speed: %d%% - PWM value to be set is %d\n" % (val, pwm))
+
+ for i in range(1, num_fan+1):
+ attr = "fan" + str(i) + "_pwm"
+ node = pddf_obj.get_path("FAN-CTRL", attr)
+ if node is None:
+ return False
+ try:
+ with open(node, 'w') as f:
+ f.write(str(pwm))
+ except IOError:
+ return False
+
+ return True
+
+ def dump_sysfs(self):
+ return pddf_obj.cli_dump_dsysfs('fan')
+
+ def get_change_event(self):
+ """
+ TODO: This function need to be implemented
+ when decide to support monitoring FAN(fand)
+ on this platform.
+ """
+ raise NotImplementedError
diff --git a/device/ragile/x86_64-ragile_ra-b6510-48v8c-r0/plugins/ledutil.py b/device/ragile/x86_64-ragile_ra-b6510-48v8c-r0/plugins/ledutil.py
new file mode 100755
index 00000000000..5f9e2e99dbf
--- /dev/null
+++ b/device/ragile/x86_64-ragile_ra-b6510-48v8c-r0/plugins/ledutil.py
@@ -0,0 +1,59 @@
+import sys
+sys.path.append('/usr/share/sonic/platform/plugins')
+import pddfparse
+
+
+class LedUtil:
+ color_map = {
+ "STATUS_LED_COLOR_GREEN": "on",
+ "STATUS_LED_COLOR_RED": "faulty",
+ "STATUS_LED_COLOR_OFF": "off"
+ }
+
+ def __init__(self):
+ global pddf_obj
+ pddf_obj = pddfparse.PddfParse()
+ self.path = "pddf/devices/led"
+ self.cur_state_path = "pddf/devices/led/cur_state"
+
+ def set_status_led(self, led_device_name, color, color_state="SOLID"):
+ if (not led_device_name in list(pddf_obj.data.keys())):
+ status = "ERROR: " + led_device_name + " is not configured"
+ return (status)
+
+ if (not color in list(self.color_map.keys())):
+ status = "ERROR: Invalid color"
+ return (status)
+
+ index = pddf_obj.data[led_device_name]['dev_attr']['index']
+ pddf_obj.create_attr('device_name', led_device_name, self.path)
+ pddf_obj.create_attr('index', index, self.path)
+ pddf_obj.create_attr(
+ 'color', self.color_map[color], self.cur_state_path)
+ pddf_obj.create_attr('color_state', color_state, self.cur_state_path)
+ pddf_obj.create_attr('dev_ops', 'set_status', self.path)
+ return ("Executed")
+
+ def get_status_led(self, led_device_name):
+ if (not led_device_name in list(pddf_obj.data.keys())):
+ status = "ERROR: " + led_device_name + " is not configured"
+ return (status)
+
+ index = pddf_obj.data[led_device_name]['dev_attr']['index']
+ pddf_obj.create_attr('device_name', led_device_name, self.path)
+ pddf_obj.create_attr('index', index, self.path)
+ pddf_obj.create_attr('dev_ops', 'get_status', self.path)
+ color_f = "/sys/kernel/" + self.cur_state_path + "/color"
+ color_state_f = "/sys/kernel/" + self.cur_state_path + "/color_state"
+
+ try:
+ with open(color_f, 'r') as f:
+ color = f.read().strip("\r\n")
+ with open(color_state_f, 'r') as f:
+ color_state = f.read().strip("\r\n")
+ except IOError:
+ status = "ERROR :" + color_f + " open failed"
+ return (status)
+ status = "%s-%s:\t%s %s\n" % (led_device_name,
+ index, color, color_state)
+ return (status)
diff --git a/device/ragile/x86_64-ragile_ra-b6510-48v8c-r0/plugins/psuutil.py b/device/ragile/x86_64-ragile_ra-b6510-48v8c-r0/plugins/psuutil.py
new file mode 100755
index 00000000000..dccb1ac1a15
--- /dev/null
+++ b/device/ragile/x86_64-ragile_ra-b6510-48v8c-r0/plugins/psuutil.py
@@ -0,0 +1,270 @@
+#
+# Sample pddf_psuutil file
+#
+# All the supported PSU SysFS aattributes are
+#- psu_present
+#- psu_model_name
+#- psu_power_good
+#- psu_mfr_id
+#- psu_serial_num
+#- psu_fan_dir
+#- psu_v_out
+#- psu_i_out
+#- psu_p_out
+#- psu_fan1_speed_rpm
+#
+
+import os.path
+import sys
+sys.path.append('/usr/share/sonic/platform/plugins')
+import pddfparse
+import json
+
+try:
+ from sonic_psu.psu_base import PsuBase
+except ImportError as e:
+ raise ImportError(str(e) + "- required module not found")
+
+
+class PsuUtil(PsuBase):
+ """PDDF generic PSU util class"""
+
+ def __init__(self):
+ PsuBase.__init__(self)
+ global pddf_obj
+ global plugin_data
+ with open(os.path.join(os.path.dirname(os.path.realpath(__file__)) + '/../pddf/pd-plugin.json')) as pd:
+ plugin_data = json.load(pd)
+
+ pddf_obj = pddfparse.PddfParse()
+ self.platform = pddf_obj.get_platform()
+
+ def get_num_psus(self):
+ return int(self.platform['num_psus'])
+
+ def get_psu_status(self, index):
+ if index is None:
+ return False
+
+ device = "PSU" + "%d" % index
+ output = pddf_obj.get_attr_name_output(device, "psu_power_good")
+ if not output:
+ return False
+
+ mode = output['mode']
+ val = output['status']
+
+ val = val.rstrip()
+ vmap = plugin_data['PSU']['psu_power_good'][mode]['valmap']
+
+ if val in vmap:
+ return vmap[val]
+ else:
+ return False
+
+ def get_psu_presence(self, index):
+ if index is None:
+ return False
+
+ status = 0
+ device = "PSU" + "%d" % index
+ output = pddf_obj.get_attr_name_output(device, "psu_present")
+ if not output:
+ return False
+
+ mode = output['mode']
+ status = output['status']
+
+ vmap = plugin_data['PSU']['psu_present'][mode]['valmap']
+
+ if status.rstrip('\n') in vmap:
+ return vmap[status.rstrip('\n')]
+ else:
+ return False
+
+ def get_powergood_status(self, idx):
+ if idx is None:
+ return False
+
+ if idx < 1 or idx > self.platform['num_psus']:
+ print("Invalid index %d\n" % idx)
+ return False
+
+ device = "PSU"+"%d" % (idx)
+ output = pddf_obj.get_attr_name_output(device, "psu_power_good")
+ if not output:
+ return False
+
+ mode = output['mode']
+ status = output['status']
+
+ vmap = plugin_data['PSU']['psu_power_good'][mode]['valmap']
+
+ if status.rstrip('\n') in vmap:
+ return vmap[status.rstrip('\n')]
+ else:
+ return False
+
+ def get_model(self, idx):
+ if idx is None:
+ return None
+
+ if idx < 1 or idx > self.platform['num_psus']:
+ print("Invalid index %d\n" % idx)
+ return None
+
+ device = "PSU"+"%d" % (idx)
+ output = pddf_obj.get_attr_name_output(device, "psu_model_name")
+ if not output:
+ return None
+
+ model = output['status']
+
+ # strip_non_ascii
+ stripped = (c for c in model if 0 < ord(c) < 127)
+ model = ''.join(stripped)
+
+ return model.rstrip('\n')
+
+ def get_mfr_id(self, idx):
+ if idx is None:
+ return None
+
+ if idx < 1 or idx > self.platform['num_psus']:
+ print("Invalid index %d\n" % idx)
+ return None
+
+ device = "PSU"+"%d" % (idx)
+ output = pddf_obj.get_attr_name_output(device, "psu_mfr_id")
+ if not output:
+ return None
+
+ mfr = output['status']
+
+ return mfr.rstrip('\n')
+
+ def get_serial(self, idx):
+ if idx is None:
+ return None
+
+ if idx < 1 or idx > self.platform['num_psus']:
+ print("Invalid index %d\n" % idx)
+ return None
+
+ device = "PSU"+"%d" % (idx)
+ output = pddf_obj.get_attr_name_output(device, "psu_serial_num")
+ if not output:
+ return None
+
+ serial = output['status']
+
+ return serial.rstrip('\n')
+
+ def get_direction(self, idx):
+ if idx is None:
+ return None
+
+ if idx < 1 or idx > self.platform['num_psus']:
+ print("Invalid index %d\n" % idx)
+ return None
+
+ device = "PSU"+"%d" % (idx)
+ output = pddf_obj.get_attr_name_output(device, "psu_fan_dir")
+ if not output:
+ return None
+
+ mode = output['mode']
+ direction = output['status'].rstrip('\n')
+
+ vmap = plugin_data['PSU']['psu_fan_dir'][mode]['valmap']
+ if direction in vmap:
+ airflow_dir_real = vmap[direction]
+ else:
+ airflow_dir_real = direction
+
+ return airflow_dir_real
+
+ def get_output_voltage(self, idx):
+ if idx is None:
+ return 0.0
+
+ if idx < 1 or idx > self.platform['num_psus']:
+ print("Invalid index %d\n" % idx)
+ return 0.0
+
+ device = "PSU"+"%d" % (idx)
+ output = pddf_obj.get_attr_name_output(device, "psu_v_out")
+ if not output:
+ return 0.0
+
+ v_out = output['status']
+
+ # value returned by the psu driver is in mV
+ return float(v_out)/1000
+
+ def get_output_current(self, idx):
+ if idx is None:
+ return 0.0
+
+ if idx < 1 or idx > self.platform['num_psus']:
+ print("Invalid index %d\n" % idx)
+ return 0.0
+
+ device = "PSU"+"%d" % (idx)
+ output = pddf_obj.get_attr_name_output(device, "psu_i_out")
+ if not output:
+ return 0.0
+
+ i_out = output['status']
+
+ # current in mA
+ return float(i_out)/1000
+
+ def get_output_power(self, idx):
+ if idx is None:
+ return 0.0
+
+ if idx < 1 or idx > self.platform['num_psus']:
+ print("Invalid index %d\n" % idx)
+ return 0.0
+
+ device = "PSU"+"%d" % (idx)
+ output = pddf_obj.get_attr_name_output(device, "psu_p_out")
+ if not output:
+ return 0.0
+
+ p_out = output['status']
+
+ # power is returned in micro watts
+ return float(p_out)/1000000
+
+ def get_fan_rpm(self, idx, fan_idx):
+ if idx is None or fan_idx is None:
+ return 0
+
+ if idx < 1 or idx > self.platform['num_psus']:
+ print("Invalid index %d\n" % idx)
+ return 0
+
+ device = "PSU"+"%d" % (idx)
+ num_fans = pddf_obj.get_num_psu_fans(device)
+
+ if fan_idx < 1 or fan_idx > num_fans:
+ print("Invalid PSU-fan index %d\n" % fan_idx)
+ return 0
+
+ output = pddf_obj.get_attr_name_output(device, "psu_fan"+str(fan_idx)+"_speed_rpm")
+ if not output:
+ return 0
+
+ #mode = output['mode']
+ output['status'] = output['status'].rstrip()
+ if output['status'].isalpha():
+ return 0
+ else:
+ speed = int(output['status'])
+
+ return speed
+
+ def dump_sysfs(self):
+ return pddf_obj.cli_dump_dsysfs('psu')
diff --git a/device/ragile/x86_64-ragile_ra-b6510-48v8c-r0/plugins/sfputil.py b/device/ragile/x86_64-ragile_ra-b6510-48v8c-r0/plugins/sfputil.py
new file mode 100755
index 00000000000..1ca92561082
--- /dev/null
+++ b/device/ragile/x86_64-ragile_ra-b6510-48v8c-r0/plugins/sfputil.py
@@ -0,0 +1,236 @@
+import os.path
+import sys
+sys.path.append('/usr/share/sonic/platform/plugins')
+import pddfparse
+import json
+
+try:
+ import time
+ from ctypes import create_string_buffer
+ from sonic_sfp.sfputilbase import SfpUtilBase
+except ImportError as e:
+ raise ImportError(str(e) + "- required module not found")
+
+
+class SfpUtil(SfpUtilBase):
+ """Platform generic PDDF SfpUtil class"""
+
+ _port_to_eeprom_mapping = {}
+ _port_start = 0
+ _port_end = 0
+ _port_to_type_mapping = {}
+ _qsfp_ports = []
+ _sfp_ports = []
+
+ def __init__(self):
+ SfpUtilBase.__init__(self)
+ global pddf_obj
+ global plugin_data
+ with open(os.path.join(os.path.dirname(os.path.realpath(__file__)) + '/../pddf/pd-plugin.json')) as pd:
+ plugin_data = json.load(pd)
+
+ pddf_obj = pddfparse.PddfParse()
+ self.platform = pddf_obj.get_platform()
+ self._port_start = 0
+ self._port_end = self.get_num_ports()
+
+ for port_num in range(self._port_start, self._port_end):
+ device = "PORT" + "%d" % (port_num+1)
+ port_eeprom_path = pddf_obj.get_path(device, "eeprom")
+ self._port_to_eeprom_mapping[port_num] = port_eeprom_path
+ port_type = pddf_obj.get_device_type(device)
+ self._port_to_type_mapping[port_num] = port_type
+ self.populate_port_type(port_num)
+
+ def get_num_ports(self):
+ return int(self.platform['num_ports'])
+
+ def is_valid_port(self, port_num):
+ if port_num < self._port_start or port_num > self._port_end:
+ return False
+ else:
+ return True
+
+ def get_presence(self, port_num):
+ if port_num < self._port_start or port_num > self._port_end:
+ return False
+
+ device = "PORT" + "%d" % (port_num+1)
+ output = pddf_obj.get_attr_name_output(device, 'xcvr_present')
+ if not output:
+ return False
+
+ #mode = output['mode']
+ modpres = output['status'].rstrip()
+ if 'XCVR' in plugin_data:
+ if 'xcvr_present' in plugin_data['XCVR']:
+ ptype = self._port_to_type_mapping[port_num]
+ vtype = 'valmap-'+ptype
+ if vtype in plugin_data['XCVR']['xcvr_present']:
+ vmap = plugin_data['XCVR']['xcvr_present'][vtype]
+ if modpres in vmap:
+ return vmap[modpres]
+ else:
+ return False
+ # if plugin_data doesn't specify anything regarding Transceivers
+ if modpres == '1':
+ return True
+
+ return False
+
+ def populate_port_type(self, port):
+ if self._port_to_type_mapping[port] == 'QSFP' or self._port_to_type_mapping[port] == 'QSFP28':
+ self._qsfp_ports.append(port)
+ elif self._port_to_type_mapping[port] == 'SFP' or self._port_to_type_mapping[port] == 'SFP28':
+ self._sfp_ports.append(port)
+
+ @property
+ def port_start(self):
+ return self._port_start
+
+ @property
+ def port_end(self):
+ return (self._port_end - 1)
+
+ @property
+ def port_to_eeprom_mapping(self):
+ return self._port_to_eeprom_mapping
+
+ @property
+ def qsfp_ports(self):
+ return self._qsfp_ports
+
+ def reset(self, port_num):
+ if port_num < self._port_start or port_num > self._port_end:
+ return False
+
+ device = "PORT" + "%d" % (port_num+1)
+ port_ps = pddf_obj.get_path(device, "xcvr_reset")
+ if port_ps is None:
+ return False
+
+ try:
+ reg_file = open(port_ps, 'w')
+ except IOError as e:
+ print("Error: unable to open file: %s" % str(e))
+ return False
+
+ try:
+ reg_file.seek(0)
+ reg_file.write('1')
+ time.sleep(1)
+ reg_file.seek(0)
+ reg_file.write('0')
+ reg_file.close()
+ return True
+ except IOError as e:
+ return False
+
+ def get_low_power_mode(self, port_num):
+ # Check for invalid port_num
+ if port_num < self._port_start or port_num > self._port_end:
+ return False
+
+ if not self.get_presence(port_num):
+ return False
+
+ device = "PORT" + "%d" % (port_num+1)
+ output = pddf_obj.get_attr_name_output(device, 'xcvr_lpmode')
+ if not output:
+ if port_num not in self.qsfp_ports:
+ return False # Read from eeprom only for QSFP ports
+ try:
+ eeprom = None
+ eeprom = open(self.port_to_eeprom_mapping[port_num], "rb")
+ # check for valid connector type
+ eeprom.seek(2)
+ ctype = eeprom.read(1)
+ if ctype in ['21', '23']:
+ return False
+
+ eeprom.seek(93)
+ lpmode = ord(eeprom.read(1))
+
+ if ((lpmode & 0x3) == 0x3):
+ return True # Low Power Mode if "Power override" bit is 1 and "Power set" bit is 1
+ else:
+ # High Power Mode if one of the following conditions is matched:
+ # 1. "Power override" bit is 0
+ # 2. "Power override" bit is 1 and "Power set" bit is 0
+ return False
+ except IOError as e:
+ print("Error: unable to open file: %s" % str(e))
+ return False
+ finally:
+ if eeprom is not None:
+ eeprom.close()
+ time.sleep(0.01)
+ else:
+ #mode = output['mode']
+ status = int(output['status'].rstrip())
+
+ if status == 1:
+ return True
+ else:
+ return False
+
+ def set_low_power_mode(self, port_num, lpmode):
+ # Check for invalid port_num
+ if port_num < self._port_start or port_num > self._port_end:
+ return False
+
+ if not self.get_presence(port_num):
+ return False # Port is not present, unable to set the eeprom
+
+ device = "PORT" + "%d" % (port_num+1)
+ port_ps = pddf_obj.get_path(device, "xcvr_lpmode")
+ if port_ps is None:
+ if port_num not in self.qsfp_ports:
+ return False # Write to eeprom only for QSFP ports
+ try:
+ eeprom = None
+ eeprom = open(self.port_to_eeprom_mapping[port_num], "r+b")
+ # check for valid connector type
+ eeprom.seek(2)
+ ctype = eeprom.read(1)
+ if ctype in ['21', '23']:
+ return False
+
+ # Fill in write buffer
+ regval = 0x3 if lpmode else 0x1 # 0x3:Low Power Mode, 0x1:High Power Mode
+ buffer = create_string_buffer(1)
+ buffer[0] = chr(regval)
+
+ # Write to eeprom
+ eeprom.seek(93)
+ eeprom.write(buffer[0])
+ return True
+ except IOError as e:
+ print("Error: unable to open file: %s" % str(e))
+ return False
+ finally:
+ if eeprom is not None:
+ eeprom.close()
+ time.sleep(0.01)
+ else:
+ try:
+ f = open(port_ps, 'w')
+ if lpmode:
+ f.write('1')
+ else:
+ f.write('0')
+ f.close()
+ return True
+ except IOError as e:
+ return False
+
+ def get_transceiver_change_event(self):
+ """
+ TODO: This function need to be implemented
+ when decide to support monitoring SFP(Xcvrd)
+ on this platform.
+ """
+ raise NotImplementedError
+
+ def dump_sysfs(self):
+ return pddf_obj.cli_dump_dsysfs('xcvr')
diff --git a/device/ragile/x86_64-ragile_ra-b6510-48v8c-r0/plugins/sysstatutil.py b/device/ragile/x86_64-ragile_ra-b6510-48v8c-r0/plugins/sysstatutil.py
new file mode 100755
index 00000000000..af4dd591536
--- /dev/null
+++ b/device/ragile/x86_64-ragile_ra-b6510-48v8c-r0/plugins/sysstatutil.py
@@ -0,0 +1,82 @@
+import os.path
+import sys
+sys.path.append('/usr/share/sonic/platform/plugins')
+import pddfparse
+import json
+
+
+class SYSStatusUtil():
+ """Platform-specific SYSStatus class"""
+
+ def __init__(self):
+ global pddf_obj
+ global plugin_data
+ with open(os.path.join(os.path.dirname(os.path.realpath(__file__)) + '/../pddf/pd-plugin.json')) as pd:
+ plugin_data = json.load(pd)
+
+ pddf_obj = pddfparse.PddfParse()
+
+ def get_board_info(self):
+ device = "SYSSTATUS"
+ node = pddf_obj.get_path(device, "board_info")
+ if node is None:
+ return False
+ try:
+ with open(node, 'r') as f:
+ status = f.read()
+ print("board_info : %s" % status)
+ except IOError:
+ return False
+
+ def get_cpld_versio(self):
+ device = "SYSSTATUS"
+ node = pddf_obj.get_path(device, "cpld1_version")
+ if node is None:
+ return False
+ try:
+ with open(node, 'r') as f:
+ status = f.read()
+ print("cpld1_version : %s" % status)
+ except IOError:
+ return False
+
+ def get_power_module_status(self):
+ device = "SYSSTATUS"
+ node = pddf_obj.get_path(device, "power_module_status")
+ if node is None:
+ return False
+ try:
+ with open(node, 'r') as f:
+ status = f.read()
+ print("power_module_status : %s" % status)
+ except IOError:
+ return False
+
+ def get_system_reset_status(self):
+ device = "SYSSTATUS"
+ for i in range(1, 8):
+ node = pddf_obj.get_path(device, "system_reset"+str(i))
+ if node is None:
+ return False
+ try:
+ with open(node, 'r') as f:
+ status = f.read()
+ print("system_reset%s : %s" % (i, status))
+ except IOError:
+ print("system_reset%s not supported" % i)
+
+ def get_misc_status(self):
+ device = "SYSSTATUS"
+ for i in range(1, 3):
+ node = pddf_obj.get_path(device, "misc"+str(i))
+ if node is None:
+ return False
+ try:
+ with open(node, 'r') as f:
+ status = f.read()
+ print("misc%s : %s" % (i, status))
+ except IOError:
+ print("system_reset%s not supported" % i)
+
+ def dump_sysfs(self):
+ return pddf_obj.cli_dump_dsysfs('sys-status')
diff --git a/device/ragile/x86_64-ragile_ra-b6510-48v8c-r0/plugins/thermalutil.py b/device/ragile/x86_64-ragile_ra-b6510-48v8c-r0/plugins/thermalutil.py
new file mode 100755
index 00000000000..6aef47b7e92
--- /dev/null
+++ b/device/ragile/x86_64-ragile_ra-b6510-48v8c-r0/plugins/thermalutil.py
@@ -0,0 +1,75 @@
+import os.path
+import sys
+import json
+sys.path.append('/usr/share/sonic/platform/plugins')
+import pddfparse
+
+
+class ThermalUtil:
+ def __init__(self):
+ global pddf_obj
+ global plugin_data
+ with open(os.path.join(os.path.dirname(os.path.realpath(__file__)) + '/../pddf/pd-plugin.json')) as pd:
+ plugin_data = json.load(pd)
+
+ pddf_obj = pddfparse.PddfParse()
+ self.platform = pddf_obj.get_platform()
+ self.num_thermals = self.platform['num_temps']
+ self.info = []
+
+ def get_num_thermals(self):
+ return (self.num_thermals)
+
+ def get_thermal_info(self):
+ list = []
+ pddf_obj.get_device_list(list, "TEMP_SENSOR")
+ list.sort()
+ for dev in list:
+ data = {}
+ device_name = dev['dev_info']['device_name']
+ topo_info = dev['i2c']['topo_info']
+ label = "%s-i2c-%d-%x" % (topo_info['dev_type'],
+ int(topo_info['parent_bus'], 0), int(topo_info['dev_addr'], 0))
+ attr_list = dev['i2c']['attr_list']
+ data['device_name'] = device_name
+ data['label'] = label
+ for attr in attr_list:
+ attr_name = attr['attr_name']
+ node = pddf_obj.get_path(device_name, attr_name)
+ if node is None:
+ return False
+ try:
+ with open(node, 'r') as f:
+ attr_value = int(f.read())
+ except IOError:
+ return False
+ data[attr_name] = attr_value/float(1000)
+ self.info.append(data)
+
+ def show_thermal_temp_values(self, idx):
+ if idx < 1 or idx > self.num_thermals:
+ print("Invalid temperature sensor idx %d" % idx)
+ return None
+ self.get_thermal_info()
+ thermal_name = "TEMP"+"%d" % idx
+ label = ""
+ value = ""
+ for temp in self.info:
+ if thermal_name == temp['device_name']:
+ label = temp['label']
+ value = "temp1\t %+.1f C (high = %+.1f C, hyst = %+.1f C)" % (
+ temp['temp1_input'], temp['temp1_max'], temp['temp1_max_hyst'])
+ else:
+ continue
+
+ return (label, value)
+
+ def show_temp_values(self):
+ self.get_thermal_info()
+ for temp in self.info:
+ print(temp['label'])
+ print("temp1\t %+.1f C (high = %+.1f C, hyst = %+.1f C)" %
+ (temp['temp1_input'], temp['temp1_max'], temp['temp1_max_hyst']))
+
+ def dump_sysfs(self):
+ return pddf_obj.cli_dump_dsysfs('temp-sensors')
diff --git a/device/ragile/x86_64-ragile_ra-b6510-48v8c-r0/pmon_daemon_control.json b/device/ragile/x86_64-ragile_ra-b6510-48v8c-r0/pmon_daemon_control.json
index 590def37b27..50c21289d26 100644
--- a/device/ragile/x86_64-ragile_ra-b6510-48v8c-r0/pmon_daemon_control.json
+++ b/device/ragile/x86_64-ragile_ra-b6510-48v8c-r0/pmon_daemon_control.json
@@ -1,5 +1,3 @@
{
- "skip_ledd": true,
- "skip_xcvrd": false,
- "skip_psud": false
-}
\ No newline at end of file
+ "skip_ledd": true
+}
diff --git a/device/ragile/x86_64-ragile_ra-b6910-64c-r0/minigraph.xml b/device/ragile/x86_64-ragile_ra-b6910-64c-r0/minigraph.xml
deleted file mode 100644
index e6b05e40060..00000000000
--- a/device/ragile/x86_64-ragile_ra-b6910-64c-r0/minigraph.xml
+++ /dev/null
@@ -1,63 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
- switch2
-
-
-
-
-
-
-
-
-
-
-
-
- switch2
- RA-B6910-64C
-
-
-
-
-
-
- switch2
-
-
- DhcpResources
-
-
-
-
- NtpResources
-
- 0.debian.pool.ntp.org;1.debian.pool.ntp.org;2.debian.pool.ntp.org;3.debian.pool.ntp.org
-
-
- SyslogResources
-
-
-
-
- ErspanDestinationIpv4
-
- 2.2.2.2
-
-
-
-
-
-
- switch2
- RA-B6910-64C
-
diff --git a/device/ragile/x86_64-ragile_ra-b6910-64c-r0/pddf/pddf-device.json b/device/ragile/x86_64-ragile_ra-b6910-64c-r0/pddf/pddf-device.json
index 3f5aae68c54..a5cf533a7f9 100644
--- a/device/ragile/x86_64-ragile_ra-b6910-64c-r0/pddf/pddf-device.json
+++ b/device/ragile/x86_64-ragile_ra-b6910-64c-r0/pddf/pddf-device.json
@@ -73,12 +73,12 @@
"CONTROLLERS": [{
"dev_name": "i2c-0",
"dev": "SMBUS0"
- }, {
- "dev_name": "i2c-1",
- "dev": "I2C-GPIO0"
}, {
"dev_name": "i2c-2",
"dev": "SMBUS1"
+ }, {
+ "dev_name": "i2c-1",
+ "dev": "I2C-GPIO0"
}]
}
},
@@ -1370,6 +1370,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x30",
@@ -1378,6 +1379,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x40",
@@ -1451,6 +1453,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x30",
@@ -1459,6 +1462,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x40",
@@ -1532,6 +1536,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x30",
@@ -1540,6 +1545,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x40",
@@ -1614,6 +1620,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x30",
@@ -1622,6 +1629,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x40",
@@ -1696,6 +1704,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x30",
@@ -1704,6 +1713,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x40",
@@ -1778,6 +1788,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x30",
@@ -1786,6 +1797,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x40",
@@ -1859,6 +1871,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x30",
@@ -1867,6 +1880,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x40",
@@ -1940,6 +1954,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x30",
@@ -1948,6 +1963,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x40",
@@ -2021,6 +2037,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x31",
@@ -2029,6 +2046,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x41",
@@ -2102,6 +2120,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x31",
@@ -2110,6 +2129,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x41",
@@ -2184,6 +2204,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x31",
@@ -2192,6 +2213,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x41",
@@ -2266,6 +2288,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x31",
@@ -2274,6 +2297,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x41",
@@ -2348,6 +2372,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x31",
@@ -2356,6 +2381,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x41",
@@ -2430,6 +2456,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x31",
@@ -2438,6 +2465,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x41",
@@ -2511,6 +2539,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x31",
@@ -2519,6 +2548,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x41",
@@ -2592,6 +2622,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x31",
@@ -2600,6 +2631,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x41",
@@ -2673,6 +2705,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x30",
@@ -2681,6 +2714,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x40",
@@ -2754,6 +2788,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x30",
@@ -2762,6 +2797,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x40",
@@ -2836,6 +2872,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x30",
@@ -2844,6 +2881,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x40",
@@ -2918,6 +2956,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x30",
@@ -2926,6 +2965,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x40",
@@ -3000,6 +3040,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x30",
@@ -3008,6 +3049,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x40",
@@ -3082,6 +3124,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x30",
@@ -3090,6 +3133,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x40",
@@ -3163,6 +3207,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x30",
@@ -3171,6 +3216,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x40",
@@ -3244,6 +3290,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x30",
@@ -3252,6 +3299,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x40",
@@ -3325,6 +3373,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x31",
@@ -3333,6 +3382,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x41",
@@ -3406,6 +3456,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x31",
@@ -3414,6 +3465,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x41",
@@ -3488,6 +3540,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x31",
@@ -3496,6 +3549,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x41",
@@ -3570,6 +3624,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x31",
@@ -3578,6 +3633,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x41",
@@ -3652,6 +3708,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x31",
@@ -3660,6 +3717,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x41",
@@ -3734,6 +3792,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x31",
@@ -3742,6 +3801,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x41",
@@ -3815,6 +3875,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x31",
@@ -3823,6 +3884,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x41",
@@ -3896,6 +3958,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x31",
@@ -3904,6 +3967,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x41",
@@ -3977,6 +4041,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x32",
@@ -3985,6 +4050,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x42",
@@ -4058,6 +4124,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x32",
@@ -4066,6 +4133,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x42",
@@ -4140,6 +4208,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x32",
@@ -4148,6 +4217,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x42",
@@ -4222,6 +4292,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x32",
@@ -4230,6 +4301,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x42",
@@ -4304,6 +4376,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x32",
@@ -4312,6 +4385,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x42",
@@ -4386,6 +4460,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x32",
@@ -4394,6 +4469,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x42",
@@ -4467,6 +4543,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x32",
@@ -4475,6 +4552,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x42",
@@ -4548,6 +4626,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x32",
@@ -4556,6 +4635,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x42",
@@ -4629,6 +4709,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x33",
@@ -4637,6 +4718,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x43",
@@ -4710,6 +4792,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x33",
@@ -4718,6 +4801,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x43",
@@ -4792,6 +4876,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x33",
@@ -4800,6 +4885,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x43",
@@ -4874,6 +4960,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x33",
@@ -4882,6 +4969,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x43",
@@ -4956,6 +5044,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x33",
@@ -4964,6 +5053,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x43",
@@ -5038,6 +5128,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x33",
@@ -5046,6 +5137,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x43",
@@ -5119,6 +5211,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x33",
@@ -5127,6 +5220,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x43",
@@ -5200,6 +5294,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x33",
@@ -5208,6 +5303,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
"attr_devaddr": "0x34",
"attr_devtype": "cpld",
"attr_offset": "0x43",
@@ -5281,6 +5377,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x32",
@@ -5289,6 +5386,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x42",
@@ -5362,6 +5460,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x32",
@@ -5370,6 +5469,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x42",
@@ -5444,6 +5544,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x32",
@@ -5452,6 +5553,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x42",
@@ -5526,6 +5628,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x32",
@@ -5534,6 +5637,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x42",
@@ -5608,6 +5712,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x32",
@@ -5616,6 +5721,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x42",
@@ -5690,6 +5796,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x32",
@@ -5698,6 +5805,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x42",
@@ -5771,6 +5879,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x32",
@@ -5779,6 +5888,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x42",
@@ -5852,6 +5962,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x32",
@@ -5860,6 +5971,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x42",
@@ -5933,6 +6045,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x33",
@@ -5941,6 +6054,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x43",
@@ -6014,6 +6128,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x33",
@@ -6022,6 +6137,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x43",
@@ -6095,6 +6211,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x33",
@@ -6103,6 +6220,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x43",
@@ -6176,6 +6294,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x33",
@@ -6184,6 +6303,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x43",
@@ -6257,6 +6377,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x33",
@@ -6265,6 +6386,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x43",
@@ -6338,6 +6460,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x33",
@@ -6346,6 +6469,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x43",
@@ -6419,6 +6543,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x33",
@@ -6427,6 +6552,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x43",
@@ -6500,6 +6626,7 @@
},
"attr_list": [{
"attr_name": "xcvr_present",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x33",
@@ -6508,6 +6635,7 @@
"attr_len": "1"
}, {
"attr_name": "xcvr_intr_status",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
"attr_devaddr": "0x36",
"attr_devtype": "cpld",
"attr_offset": "0x43",
diff --git a/device/ragile/x86_64-ragile_ra-b6910-64c-r0/pmon_daemon_control.json b/device/ragile/x86_64-ragile_ra-b6910-64c-r0/pmon_daemon_control.json
index b8d554f3a8b..94592fa8ceb 100644
--- a/device/ragile/x86_64-ragile_ra-b6910-64c-r0/pmon_daemon_control.json
+++ b/device/ragile/x86_64-ragile_ra-b6910-64c-r0/pmon_daemon_control.json
@@ -1,5 +1,3 @@
{
- "skip_ledd": true,
- "skip_xcvrd": false,
- "skip_psud": false
-}
\ No newline at end of file
+ "skip_ledd": true
+}
diff --git a/device/ragile/x86_64-ragile_ra-b6920-4s-r0/minigraph.xml b/device/ragile/x86_64-ragile_ra-b6920-4s-r0/minigraph.xml
deleted file mode 100644
index 4aa22016c11..00000000000
--- a/device/ragile/x86_64-ragile_ra-b6920-4s-r0/minigraph.xml
+++ /dev/null
@@ -1,63 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
- switch2
-
-
-
-
-
-
-
-
-
-
-
-
- switch2
- RA-B6920-4S
-
-
-
-
-
-
- switch2
-
-
- DhcpResources
-
-
-
-
- NtpResources
-
- 0.debian.pool.ntp.org;1.debian.pool.ntp.org;2.debian.pool.ntp.org;3.debian.pool.ntp.org
-
-
- SyslogResources
-
-
-
-
- ErspanDestinationIpv4
-
- 2.2.2.2
-
-
-
-
-
-
- switch2
- RA-B6920-4S
-
diff --git a/platform/broadcom/platform-modules-ragile.mk b/platform/broadcom/platform-modules-ragile.mk
index 74ce1b04f47..12236b1e72c 100644
--- a/platform/broadcom/platform-modules-ragile.mk
+++ b/platform/broadcom/platform-modules-ragile.mk
@@ -4,7 +4,7 @@ export RAGILE_RA_B6510_48V8C_PLATFORM_MODULE_VERSION
RAGILE_RA_B6510_48V8C_PLATFORM_MODULE = platform-modules-ragile-ra-b6510-48v8c_$(RAGILE_RA_B6510_48V8C_PLATFORM_MODULE_VERSION)_amd64.deb
$(RAGILE_RA_B6510_48V8C_PLATFORM_MODULE)_SRC_PATH = $(PLATFORM_PATH)/sonic-platform-modules-ragile
-$(RAGILE_RA_B6510_48V8C_PLATFORM_MODULE)_DEPENDS += $(LINUX_HEADERS) $(LINUX_HEADERS_COMMON)
+$(RAGILE_RA_B6510_48V8C_PLATFORM_MODULE)_DEPENDS += $(LINUX_HEADERS) $(LINUX_HEADERS_COMMON) $(PDDF_PLATFORM_MODULE)
$(RAGILE_RA_B6510_48V8C_PLATFORM_MODULE)_PLATFORM = x86_64-ragile_ra-b6510-48v8c-r0
SONIC_DPKG_DEBS += $(RAGILE_RA_B6510_48V8C_PLATFORM_MODULE)
SONIC_STRETCH_DEBS += $(RAGILE_RA_B6510_48V8C_PLATFORM_MODULE)
diff --git a/platform/broadcom/rules.mk b/platform/broadcom/rules.mk
index 5f3172ca030..938d741d188 100644
--- a/platform/broadcom/rules.mk
+++ b/platform/broadcom/rules.mk
@@ -14,7 +14,7 @@ include $(PLATFORM_PATH)/platform-modules-cel.mk
include $(PLATFORM_PATH)/platform-modules-juniper.mk
#include $(PLATFORM_PATH)/platform-modules-brcm-xlr-gts.mk
#include $(PLATFORM_PATH)/platform-modules-ruijie.mk
-#include $(PLATFORM_PATH)/platform-modules-ragile.mk
+include $(PLATFORM_PATH)/platform-modules-ragile.mk
include $(PLATFORM_PATH)/docker-syncd-brcm.mk
include $(PLATFORM_PATH)/docker-syncd-brcm-rpc.mk
include $(PLATFORM_PATH)/docker-saiserver-brcm.mk
diff --git a/platform/broadcom/sonic-platform-modules-ragile/common/lib/eepromutil/fantlv.py b/platform/broadcom/sonic-platform-modules-ragile/common/lib/eepromutil/fantlv.py
index 38beb068f44..2d434d1ad2a 100644
--- a/platform/broadcom/sonic-platform-modules-ragile/common/lib/eepromutil/fantlv.py
+++ b/platform/broadcom/sonic-platform-modules-ragile/common/lib/eepromutil/fantlv.py
@@ -13,7 +13,7 @@ class fan_tlv(object):
FLAG = 0x7E #new version E2PROM mark as 0x7E
HW_VER = 0X01 # consists of master version and revised version
TYPE = 0xf1 # hardware type define
- TLV_LEN = 00 # vaild data length(16bit)
+ TLV_LEN = 00 # vaild data length(16bit)
_FAN_TLV_HDR_LEN = 6
_FAN_TLV_CRC_LEN = 2
diff --git a/platform/broadcom/sonic-platform-modules-ragile/common/modules/csu550.c b/platform/broadcom/sonic-platform-modules-ragile/common/modules/csu550.c
index 3df7c73ecad..b1d1a984721 100755
--- a/platform/broadcom/sonic-platform-modules-ragile/common/modules/csu550.c
+++ b/platform/broadcom/sonic-platform-modules-ragile/common/modules/csu550.c
@@ -29,8 +29,15 @@
#include
#include
#include
+#include
#include "pmbus.h"
+struct pmbus_device_info {
+ int pages;
+ u32 flags;
+};
+
+static const struct i2c_device_id pmbus_id[];
/*
* Find sensor groups and status registers on each page.
@@ -114,7 +121,7 @@ static int pmbus_identify(struct i2c_client *client,
}
if (pmbus_check_byte_register(client, 0, PMBUS_VOUT_MODE)) {
- int vout_mode;
+ int vout_mode, i;
vout_mode = pmbus_read_byte_data(client, 0, PMBUS_VOUT_MODE);
if (vout_mode >= 0 && vout_mode != 0xff) {
@@ -123,6 +130,11 @@ static int pmbus_identify(struct i2c_client *client,
break;
case 1:
info->format[PSC_VOLTAGE_OUT] = vid;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 10, 0)
+ for (i = 0; i < info->pages; i++) {
+ info->vrm_version[i] = vr11;
+ }
+#endif
break;
case 2:
info->format[PSC_VOLTAGE_OUT] = direct;
@@ -156,6 +168,7 @@ static int pmbus_identify(struct i2c_client *client,
return ret;
}
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 10, 0)
static int pmbus_probe(struct i2c_client *client, const struct i2c_device_id *id)
{
struct pmbus_driver_info *info;
@@ -182,7 +195,34 @@ static int pmbus_probe(struct i2c_client *client, const struct i2c_device_id *id
return pmbus_do_probe(client, id, info);
}
+#else
+static int pmbus_probe(struct i2c_client *client)
+{
+ struct pmbus_driver_info *info;
+ struct pmbus_platform_data *pdata = NULL;
+ struct device *dev = &client->dev;
+ struct pmbus_device_info *device_info;
+ info = devm_kzalloc(dev, sizeof(struct pmbus_driver_info), GFP_KERNEL);
+ if (!info)
+ return -ENOMEM;
+
+ device_info = (struct pmbus_device_info *)i2c_match_id(pmbus_id, client)->driver_data;
+ if (device_info->flags & PMBUS_SKIP_STATUS_CHECK) {
+ pdata = devm_kzalloc(dev, sizeof(struct pmbus_platform_data), GFP_KERNEL);
+ if (!pdata) {
+ return -ENOMEM;
+ }
+ pdata->flags = PMBUS_SKIP_STATUS_CHECK;
+ }
+
+ info->pages = device_info->pages;
+ info->identify = pmbus_identify;
+ dev->platform_data = pdata;
+
+ return pmbus_do_probe(client, info);
+}
+#endif
static const struct i2c_device_id pmbus_id[] = {
{"csu550", 0},
{"csu800", 1},
@@ -194,8 +234,11 @@ MODULE_DEVICE_TABLE(i2c, pmbus_id);
/* This is the driver that will be inserted */
static struct i2c_driver pmbus_driver = {
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 10, 0)
.probe = pmbus_probe,
- .remove = pmbus_do_remove,
+#else
+ .probe_new = pmbus_probe,
+#endif
.id_table = pmbus_id,
.driver = {
.name = "pmbus",
diff --git a/platform/broadcom/sonic-platform-modules-ragile/common/modules/fpga_i2c_ocores.c b/platform/broadcom/sonic-platform-modules-ragile/common/modules/fpga_i2c_ocores.c
index 81068a14029..7857f854d60 100755
--- a/platform/broadcom/sonic-platform-modules-ragile/common/modules/fpga_i2c_ocores.c
+++ b/platform/broadcom/sonic-platform-modules-ragile/common/modules/fpga_i2c_ocores.c
@@ -25,10 +25,10 @@
#include
#include
#include
-#include
+#include "fpga_i2c_ocores.h"
#include
#include
-
+#include
struct ocores_i2c {
void __iomem *base;
@@ -835,8 +835,13 @@ static int rg_ocores_i2c_probe(struct platform_device *pdev)
/* add in known devices to the bus */
if (pdata) {
- for (i = 0; i < pdata->num_devices; i++)
+ for (i = 0; i < pdata->num_devices; i++) {
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 10, 0)
+ i2c_new_client_device(&i2c->adap, pdata->devices + i);
+#else
i2c_new_device(&i2c->adap, pdata->devices + i);
+#endif
+ }
}
oc_debug_sysfs_init(pdev);
diff --git a/platform/broadcom/sonic-platform-modules-ragile/common/modules/fpga_pcie_i2c.c b/platform/broadcom/sonic-platform-modules-ragile/common/modules/fpga_pcie_i2c.c
index 82ae9f558f5..669198ca59f 100755
--- a/platform/broadcom/sonic-platform-modules-ragile/common/modules/fpga_pcie_i2c.c
+++ b/platform/broadcom/sonic-platform-modules-ragile/common/modules/fpga_pcie_i2c.c
@@ -11,9 +11,9 @@
#include
#include
-#include
-#include
-#include
+#include "fpga_i2c_ocores.h"
+#include "fpga_pcie_i2c.h"
+#include "fpga_reg_defs.h"
#include
#include
diff --git a/platform/broadcom/sonic-platform-modules-ragile/common/modules/i2c-mux-pca954x.c b/platform/broadcom/sonic-platform-modules-ragile/common/modules/i2c-mux-pca954x.c
index f7b6bb952bf..16d92717c24 100755
--- a/platform/broadcom/sonic-platform-modules-ragile/common/modules/i2c-mux-pca954x.c
+++ b/platform/broadcom/sonic-platform-modules-ragile/common/modules/i2c-mux-pca954x.c
@@ -40,7 +40,13 @@
#include
#include
#include
+#include
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 10, 0)
+#include
+#include
+#else
#include
+#endif
#include
#include
#include
@@ -86,14 +92,15 @@ struct chip_desc {
} muxtype;
};
-
-
-
struct pca954x {
const struct chip_desc *chip;
u8 last_chan; /* last register value */
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 10, 0)
+ s32 idle_state;
+#else
u8 deselect;
+#endif
struct i2c_client *client;
struct irq_domain *irq;
@@ -157,7 +164,20 @@ static const struct i2c_device_id pca954x_id[] = {
{ }
};
MODULE_DEVICE_TABLE(i2c, pca954x_id);
-
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 10, 0)
+static const struct of_device_id pca954x_of_match[] = {
+ { .compatible = "nxp,pca9540", .data = &chips[pca_9540] },
+ { .compatible = "nxp,pca9542", .data = &chips[pca_9542] },
+ { .compatible = "nxp,pca9543", .data = &chips[pca_9543] },
+ { .compatible = "nxp,pca9544", .data = &chips[pca_9544] },
+ { .compatible = "nxp,pca9545", .data = &chips[pca_9545] },
+ { .compatible = "nxp,pca9546", .data = &chips[pca_9546] },
+ { .compatible = "nxp,pca9547", .data = &chips[pca_9547] },
+ { .compatible = "nxp,pca9548", .data = &chips[pca_9548] },
+ {}
+};
+MODULE_DEVICE_TABLE(of, pca954x_of_match);
+#else
#ifdef CONFIG_OF
static const struct of_device_id pca954x_of_match[] = {
{ .compatible = "nxp,pca9540", .data = &chips[pca_9540] },
@@ -172,6 +192,7 @@ static const struct of_device_id pca954x_of_match[] = {
};
MODULE_DEVICE_TABLE(of, pca954x_of_match);
#endif
+#endif
/* Write to mux register. Don't use i2c_transfer()/i2c_smbus_xfer()
for this as they will try to lock adapter a second time */
@@ -204,6 +225,17 @@ static int pca954x_reg_write(struct i2c_adapter *adap,
return ret;
}
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 10, 0)
+static u8 pca954x_regval(struct pca954x *data, u8 chan)
+{
+ /* We make switches look like muxes, not sure how to be smarter. */
+ if (data->chip->muxtype == pca954x_ismux)
+ return chan | data->chip->enable;
+ else
+ return 1 << chan;
+}
+#endif
+
static int pca954x_setmuxflag(struct i2c_client *client, int flag)
{
struct i2c_adapter *adap = to_i2c_adapter(client->dev.parent);
@@ -218,12 +250,15 @@ static int pca954x_select_chan(struct i2c_mux_core *muxc, u32 chan)
const struct chip_desc *chip = data->chip;
u8 regval;
int ret = 0;
-
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 10, 0)
+ regval = pca954x_regval(data, chan);
+#else
/* we make switches look like muxes, not sure how to be smarter */
if (chip->muxtype == pca954x_ismux)
regval = chan | chip->enable;
else
regval = 1 << chan;
+#endif
/* Only select the channel if its different from the last channel */
if (data->last_chan != regval) {
@@ -1132,6 +1167,122 @@ static int pca954x_do_reset(struct i2c_adapter *adap,
ret = 0;
return ret;
}
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 10, 0)
+static int pca954x_deselect_mux(struct i2c_mux_core *muxc, u32 chan)
+{
+ struct pca954x *data = i2c_mux_priv(muxc);
+ struct i2c_client *client = data->client;
+ s32 idle_state;
+ int ret, rv;
+ struct i2c_client * new_client;
+
+ idle_state = READ_ONCE(data->idle_state);
+ if (idle_state >= 0)
+ /* Set the mux back to a predetermined channel */
+ return pca954x_select_chan(muxc, idle_state);
+
+ if (idle_state == MUX_IDLE_DISCONNECT) {
+ /* Deselect active channel */
+ data->last_chan = 0;
+ ret = pca954x_reg_write(muxc->parent, client,
+ data->last_chan);
+ if (ret < 0) {
+ new_client =(struct i2c_client *) client;
+ dev_warn(&new_client->dev, "pca954x close chn failed, do reset.\n");
+ rv = pca954x_do_reset(client->adapter, client, chan);
+ if (rv == 0) {
+ ret = 0;
+ }
+ }
+ return ret;
+ }
+
+ /* otherwise leave as-is */
+
+ return 0;
+}
+
+static ssize_t idle_state_show(struct device *dev,
+ struct device_attribute *attr,
+ char *buf)
+{
+ struct i2c_client *client = to_i2c_client(dev);
+ struct i2c_mux_core *muxc = i2c_get_clientdata(client);
+ struct pca954x *data = i2c_mux_priv(muxc);
+
+ return sprintf(buf, "%d\n", READ_ONCE(data->idle_state));
+}
+
+static ssize_t idle_state_store(struct device *dev,
+ struct device_attribute *attr,
+ const char *buf, size_t count)
+{
+ struct i2c_client *client = to_i2c_client(dev);
+ struct i2c_mux_core *muxc = i2c_get_clientdata(client);
+ struct pca954x *data = i2c_mux_priv(muxc);
+ int val;
+ int ret;
+
+ ret = kstrtoint(buf, 0, &val);
+ if (ret < 0)
+ return ret;
+
+ if (val != MUX_IDLE_AS_IS && val != MUX_IDLE_DISCONNECT &&
+ (val < 0 || val >= data->chip->nchans))
+ return -EINVAL;
+
+ i2c_lock_bus(muxc->parent, I2C_LOCK_SEGMENT);
+
+ WRITE_ONCE(data->idle_state, val);
+ /*
+ * Set the mux into a state consistent with the new
+ * idle_state.
+ */
+ if (data->last_chan || val != MUX_IDLE_DISCONNECT)
+ ret = pca954x_deselect_mux(muxc, 0);
+
+ i2c_unlock_bus(muxc->parent, I2C_LOCK_SEGMENT);
+
+ return ret < 0 ? ret : count;
+}
+
+static DEVICE_ATTR_RW(idle_state);
+
+static irqreturn_t pca954x_irq_handler(int irq, void *dev_id)
+{
+ struct pca954x *data = dev_id;
+ unsigned long pending;
+ int ret, i;
+
+ ret = i2c_smbus_read_byte(data->client);
+ if (ret < 0)
+ return IRQ_NONE;
+
+ pending = (ret >> PCA954X_IRQ_OFFSET) & (BIT(data->chip->nchans) - 1);
+ for_each_set_bit(i, &pending, data->chip->nchans)
+ handle_nested_irq(irq_linear_revmap(data->irq, i));
+
+ return IRQ_RETVAL(pending);
+}
+
+static int pca954x_init(struct i2c_client *client, struct pca954x *data)
+{
+ int ret;
+
+ if (data->idle_state >= 0)
+ data->last_chan = pca954x_regval(data, data->idle_state);
+ else
+ data->last_chan = 0; /* Disconnect multiplexer */
+
+ ret = i2c_smbus_write_byte(client, data->last_chan);
+ if (ret < 0)
+ data->last_chan = 0;
+
+ return ret;
+}
+
+#else
static int pca954x_deselect_mux(struct i2c_mux_core *muxc, u32 chan)
{
struct pca954x *data = i2c_mux_priv(muxc);
@@ -1178,6 +1329,7 @@ static irqreturn_t pca954x_irq_handler(int irq, void *dev_id)
}
return handled ? IRQ_HANDLED : IRQ_NONE;
}
+#endif
static void pca954x_irq_mask(struct irq_data *idata)
{
@@ -1274,7 +1426,9 @@ static int pca954x_probe(struct i2c_client *client,
const struct i2c_device_id *id)
{
struct i2c_adapter *adap = to_i2c_adapter(client->dev.parent);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 10, 0)
struct pca954x_platform_data *pdata = dev_get_platdata(&client->dev);
+#endif
struct device_node *of_node = client->dev.of_node;
bool idle_disconnect_dt;
struct gpio_desc *gpio;
@@ -1302,7 +1456,25 @@ static int pca954x_probe(struct i2c_client *client,
gpio = devm_gpiod_get_optional(&client->dev, "reset", GPIOD_OUT_LOW);
if (IS_ERR(gpio))
return PTR_ERR(gpio);
-
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 10, 0)
+ data->idle_state = MUX_IDLE_AS_IS;
+ if (device_property_read_u32(&client->dev, "idle-state", &data->idle_state)) {
+ if (device_property_read_bool(&client->dev, "i2c-mux-idle-disconnect"))
+ data->idle_state = MUX_IDLE_DISCONNECT;
+ }
+
+ /*
+ * Write the mux register at addr to verify
+ * that the mux is in fact present. This also
+ * initializes the mux to a channel
+ * or disconnected state.
+ */
+ ret = pca954x_init(client, data);
+ if (ret < 0) {
+ dev_warn(&client->dev, "probe failed\n");
+ return -ENODEV;
+ }
+#else
/* Write the mux register at addr to verify
* that the mux is in fact present. This also
* initializes the mux to disconnected state.
@@ -1311,7 +1483,7 @@ static int pca954x_probe(struct i2c_client *client,
dev_warn(&client->dev, "probe failed\n");
return -ENODEV;
}
-
+#endif
match = of_match_device(of_match_ptr(pca954x_of_match), &client->dev);
if (match)
data->chip = of_device_get_match_data(&client->dev);
@@ -1329,6 +1501,9 @@ static int pca954x_probe(struct i2c_client *client,
/* Now create an adapter for each channel */
for (num = 0; num < data->chip->nchans; num++) {
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 10, 0)
+ ret = i2c_mux_add_adapter(muxc, 0, num, 0);
+#else
bool idle_disconnect_pd = false;
force = 0; /* dynamic adap number */
@@ -1347,10 +1522,17 @@ static int pca954x_probe(struct i2c_client *client,
idle_disconnect_dt) << num;
ret = i2c_mux_add_adapter(muxc, force, num, class);
+#endif
if (ret)
goto fail_del_adapters;
}
-
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 10, 0)
+ /*
+ * The attr probably isn't going to be needed in most cases,
+ * so don't fail completely on error.
+ */
+ device_create_file(&client->dev, &dev_attr_idle_state);
+#endif
dev_info(&client->dev,
"registered %d multiplexed busses for I2C %s %s\n",
num, data->chip->muxtype == pca954x_ismux
@@ -1376,7 +1558,9 @@ static int pca954x_remove(struct i2c_client *client)
}
irq_domain_remove(data->irq);
}
-
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 10, 0)
+ device_remove_file(&client->dev, &dev_attr_idle_state);
+#endif
i2c_mux_del_adapters(muxc);
return 0;
}
@@ -1387,9 +1571,18 @@ static int pca954x_resume(struct device *dev)
struct i2c_client *client = to_i2c_client(dev);
struct i2c_mux_core *muxc = i2c_get_clientdata(client);
struct pca954x *data = i2c_mux_priv(muxc);
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 10, 0)
+ int ret;
+ ret = pca954x_init(client, data);
+ if (ret < 0)
+ dev_err(&client->dev, "failed to verify mux presence\n");
+
+ return ret;
+#else
data->last_chan = 0;
return i2c_smbus_write_byte(client, 0);
+#endif
}
#endif
diff --git a/platform/broadcom/sonic-platform-modules-ragile/common/modules/i2c-mux-pca9641.c b/platform/broadcom/sonic-platform-modules-ragile/common/modules/i2c-mux-pca9641.c
index 501cfef8a91..4988fcc7f2c 100755
--- a/platform/broadcom/sonic-platform-modules-ragile/common/modules/i2c-mux-pca9641.c
+++ b/platform/broadcom/sonic-platform-modules-ragile/common/modules/i2c-mux-pca9641.c
@@ -23,7 +23,12 @@
#include
#include
#include
+#include
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 10, 0)
+#include
+#else
#include
+#endif
/*
* The PCA9541 is a bus master selector. It supports two I2C masters connected
@@ -546,7 +551,9 @@ static int pca9541_probe(struct i2c_client *client,
const struct i2c_device_id *id)
{
struct i2c_adapter *adap = client->adapter;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 10, 0)
struct pca954x_platform_data *pdata = dev_get_platdata(&client->dev);
+#endif
struct i2c_mux_core *muxc;
struct pca9541 *data;
int force;
@@ -573,11 +580,11 @@ static int pca9541_probe(struct i2c_client *client,
}
/* Create mux adapter */
-
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 10, 0)
force = 0;
if (pdata)
force = pdata->modes[0].adap_id;
-
+#endif
if (detect_id == 0) {
muxc = i2c_mux_alloc(adap, &client->dev, 1, sizeof(*data),
I2C_MUX_ARBITRATOR,
@@ -589,8 +596,11 @@ static int pca9541_probe(struct i2c_client *client,
data->client = client;
i2c_set_clientdata(client, muxc);
-
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 10, 0)
+ ret = i2c_mux_add_adapter(muxc, 0, 0, 0);
+#else
ret = i2c_mux_add_adapter(muxc, force, 0, 0);
+#endif
if (ret)
return ret;
} else {
diff --git a/platform/broadcom/sonic-platform-modules-ragile/common/modules/lpc_cpld_i2c_ocores.c b/platform/broadcom/sonic-platform-modules-ragile/common/modules/lpc_cpld_i2c_ocores.c
index 7115fdabec1..e15bed475d2 100755
--- a/platform/broadcom/sonic-platform-modules-ragile/common/modules/lpc_cpld_i2c_ocores.c
+++ b/platform/broadcom/sonic-platform-modules-ragile/common/modules/lpc_cpld_i2c_ocores.c
@@ -25,10 +25,11 @@
#include
#include
#include
-#include
+#include "lpc_cpld_i2c_ocores.h"
#include
#include
#include
+#include
#define OCORES_FLAG_POLL BIT(0)
@@ -768,8 +769,13 @@ static int rg_ocores_i2c_probe(struct platform_device *pdev)
/* add in known devices to the bus */
if (pdata) {
LPC_CPLD_I2C_DEBUG_VERBOSE("i2c device %d.\n", pdata->num_devices);
- for (i = 0; i < pdata->num_devices; i++)
+ for (i = 0; i < pdata->num_devices; i++) {
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 10, 0)
+ i2c_new_client_device(&i2c->adap, pdata->devices + i);
+#else
i2c_new_device(&i2c->adap, pdata->devices + i);
+#endif
+ }
}
oc_debug_sysfs_init(pdev);
diff --git a/platform/broadcom/sonic-platform-modules-ragile/common/modules/pmbus.h b/platform/broadcom/sonic-platform-modules-ragile/common/modules/pmbus.h
index 39b778a4734..cd5550ab41b 100755
--- a/platform/broadcom/sonic-platform-modules-ragile/common/modules/pmbus.h
+++ b/platform/broadcom/sonic-platform-modules-ragile/common/modules/pmbus.h
@@ -24,6 +24,7 @@
#include
#include
+#include
/*
* Registers
@@ -35,6 +36,8 @@ enum pmbus_regs {
PMBUS_CLEAR_FAULTS = 0x03,
PMBUS_PHASE = 0x04,
+ PMBUS_WRITE_PROTECT = 0x10,
+
PMBUS_CAPABILITY = 0x19,
PMBUS_QUERY = 0x1A,
@@ -130,6 +133,23 @@ enum pmbus_regs {
PMBUS_MFR_DATE = 0x9D,
PMBUS_MFR_SERIAL = 0x9E,
+ PMBUS_MFR_VIN_MIN = 0xA0,
+ PMBUS_MFR_VIN_MAX = 0xA1,
+ PMBUS_MFR_IIN_MAX = 0xA2,
+ PMBUS_MFR_PIN_MAX = 0xA3,
+ PMBUS_MFR_VOUT_MIN = 0xA4,
+ PMBUS_MFR_VOUT_MAX = 0xA5,
+ PMBUS_MFR_IOUT_MAX = 0xA6,
+ PMBUS_MFR_POUT_MAX = 0xA7,
+
+ PMBUS_IC_DEVICE_ID = 0xAD,
+ PMBUS_IC_DEVICE_REV = 0xAE,
+
+ PMBUS_MFR_MAX_TEMP_1 = 0xC0,
+ PMBUS_MFR_MAX_TEMP_2 = 0xC1,
+ PMBUS_MFR_MAX_TEMP_3 = 0xC2,
+
+
/*
* Virtual registers.
* Useful to support attributes which are not supported by standard PMBus
@@ -217,6 +237,19 @@ enum pmbus_regs {
PMBUS_VIRT_PWM_ENABLE_2,
PMBUS_VIRT_PWM_ENABLE_3,
PMBUS_VIRT_PWM_ENABLE_4,
+ /* Samples for average
+ *
+ * Drivers wanting to expose functionality for changing the number of
+ * samples used for average values should implement support in
+ * {read,write}_word_data callback for either PMBUS_VIRT_SAMPLES if it
+ * applies to all types of measurements, or any number of specific
+ * PMBUS_VIRT_*_SAMPLES registers to allow for individual control.
+ */
+ PMBUS_VIRT_SAMPLES,
+ PMBUS_VIRT_IN_SAMPLES,
+ PMBUS_VIRT_CURR_SAMPLES,
+ PMBUS_VIRT_POWER_SAMPLES,
+ PMBUS_VIRT_TEMP_SAMPLES,
};
/*
@@ -224,6 +257,15 @@ enum pmbus_regs {
*/
#define PB_OPERATION_CONTROL_ON BIT(7)
+/*
+ * WRITE_PROTECT
+ */
+#define PB_WP_ALL BIT(7) /* all but WRITE_PROTECT */
+#define PB_WP_OP BIT(6) /* all but WP, OPERATION, PAGE */
+#define PB_WP_VOUT BIT(5) /* all but WP, OPERATION, PAGE, VOUT, ON_OFF */
+
+#define PB_WP_ANY (PB_WP_ALL | PB_WP_OP | PB_WP_VOUT)
+
/*
* CAPABILITY
*/
@@ -347,7 +389,7 @@ enum pmbus_sensor_classes {
};
#define PMBUS_PAGES 32 /* Per PMBus specification */
-
+#define PMBUS_PHASES 8 /* Maximum number of phases per page */
/* Functionality bit mask */
#define PMBUS_HAVE_VIN BIT(0)
#define PMBUS_HAVE_VCAP BIT(1)
@@ -371,16 +413,23 @@ enum pmbus_sensor_classes {
#define PMBUS_HAVE_STATUS_VMON BIT(19)
#define PMBUS_HAVE_PWM12 BIT(20)
#define PMBUS_HAVE_PWM34 BIT(21)
-
+#define PMBUS_HAVE_SAMPLES BIT(22)
+#define PMBUS_PHASE_VIRTUAL BIT(30)
#define PMBUS_PAGE_VIRTUAL BIT(31)
enum pmbus_data_format { linear = 0, direct, vid };
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 10, 0)
+enum vrm_version { vr11 = 0, vr12, vr13, imvp9, amd625mv };
+#else
enum vrm_version { vr11 = 0, vr12, vr13 };
+#endif
struct pmbus_driver_info {
int pages; /* Total number of pages */
enum pmbus_data_format format[PSC_NUM_CLASSES];
enum vrm_version vrm_version[PMBUS_PAGES];
+ u8 phases[PMBUS_PAGES];/* Number of phases per page */
+ u32 pfunc[PMBUS_PHASES];/* Functionality, per phase */
/*
* Support one set of coefficients for each sensor type
* Used for chips providing data in direct mode.
@@ -417,6 +466,7 @@ struct pmbus_driver_info {
/* Regulator functionality, if supported by this chip driver. */
int num_regulators;
const struct regulator_desc *reg_desc;
+ const struct attribute_group **groups;
};
/* Regulator ops */
@@ -450,8 +500,12 @@ int pmbus_update_byte_data(struct i2c_client *client, int page, u8 reg,
void pmbus_clear_faults(struct i2c_client *client);
bool pmbus_check_byte_register(struct i2c_client *client, int page, int reg);
bool pmbus_check_word_register(struct i2c_client *client, int page, int reg);
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 10, 0)
+int pmbus_do_probe(struct i2c_client *client, struct pmbus_driver_info *info);
+#else
int pmbus_do_probe(struct i2c_client *client, const struct i2c_device_id *id,
struct pmbus_driver_info *info);
+#endif
int pmbus_do_remove(struct i2c_client *client);
const struct pmbus_driver_info *pmbus_get_driver_info(struct i2c_client
*client);
diff --git a/platform/broadcom/sonic-platform-modules-ragile/common/modules/ragile_common_module.c b/platform/broadcom/sonic-platform-modules-ragile/common/modules/ragile_common_module.c
index e4fc735643d..f28852ec331 100755
--- a/platform/broadcom/sonic-platform-modules-ragile/common/modules/ragile_common_module.c
+++ b/platform/broadcom/sonic-platform-modules-ragile/common/modules/ragile_common_module.c
@@ -37,9 +37,6 @@ module_param(g_common_debug_verbose, int, S_IRUGO | S_IWUSR);
int dfd_get_my_card_type(void)
{
- int type;
- int cnt;
-
if (dfd_my_type != 0) {
RAGILE_COMMON_DEBUG_VERBOSE("my_type = 0x%x\r\n", dfd_my_type);
return dfd_my_type;
diff --git a/platform/broadcom/sonic-platform-modules-ragile/debian/platform-modules-ragile-ra-b6910-64c.install b/platform/broadcom/sonic-platform-modules-ragile/debian/platform-modules-ragile-ra-b6910-64c.install
new file mode 100644
index 00000000000..770cabc331e
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-ragile/debian/platform-modules-ragile-ra-b6910-64c.install
@@ -0,0 +1 @@
+ra-b6910-64c/scripts/pddf_post_driver_install.sh /usr/local/bin
diff --git a/platform/broadcom/sonic-platform-modules-ragile/debian/platform-modules-ragile-ra-b6910-64c.postinst b/platform/broadcom/sonic-platform-modules-ragile/debian/platform-modules-ragile-ra-b6910-64c.postinst
new file mode 100755
index 00000000000..0d9d6a34d2a
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-ragile/debian/platform-modules-ragile-ra-b6910-64c.postinst
@@ -0,0 +1,17 @@
+#!/bin/sh
+# postinst
+
+kernel_version=$(uname -r)
+
+if [ -e /boot/System.map-${kernel_version} ]; then
+ depmod -a -F /boot/System.map-${kernel_version} ${kernel_version} || true
+fi
+
+# enable platform-service
+depmod -a
+# systemctl enable platform-modules-ra-b6510-48v8c.service
+# systemctl start platform-modules-ra-b6510-48v8c.service
+systemctl enable pddf-platform-init.service
+systemctl start pddf-platform-init.service
+
+#DEBHELPER#
diff --git a/platform/broadcom/sonic-platform-modules-ragile/ra-b6510-32c/Makefile b/platform/broadcom/sonic-platform-modules-ragile/ra-b6510-32c/Makefile
index 46415e74ab7..f197dce8cdd 100755
--- a/platform/broadcom/sonic-platform-modules-ragile/ra-b6510-32c/Makefile
+++ b/platform/broadcom/sonic-platform-modules-ragile/ra-b6510-32c/Makefile
@@ -8,6 +8,9 @@ INSTALL_SCRIPT_DIR = $(SUB_BUILD_DIR)/usr/local/bin
INSTALL_SERVICE_DIR = $(SUB_BUILD_DIR)/lib/systemd/system/
KBUILD_EXTRA_SYMBOLS += $(DIR_KERNEL_SRC)/Module.symvers
+ifeq "5.10.0" "$(word 1, $(sort 5.10.0 $(KERNEL_VERSION)))"
+KBUILD_EXTRA_SYMBOLS += $(PWD)/../../../pddf/i2c/Module.symvers.PDDF
+endif
export KBUILD_EXTRA_SYMBOLS
all:
diff --git a/platform/broadcom/sonic-platform-modules-ragile/ra-b6510-32c/modules/driver/pddf_custom_led_module.c b/platform/broadcom/sonic-platform-modules-ragile/ra-b6510-32c/modules/driver/pddf_custom_led_module.c
index 5776735ef4f..c5cba17b475 100644
--- a/platform/broadcom/sonic-platform-modules-ragile/ra-b6510-32c/modules/driver/pddf_custom_led_module.c
+++ b/platform/broadcom/sonic-platform-modules-ragile/ra-b6510-32c/modules/driver/pddf_custom_led_module.c
@@ -22,12 +22,13 @@
#include
#include
#include
-#include "pddf_led_defs.h"
-#include "pddf_client_defs.h"
#include
#include
#include
+#include
#include
+#include "../../../../../pddf/i2c/modules/include/pddf_led_defs.h"
+#include "../../../../../pddf/i2c/modules/include/pddf_client_defs.h"
#define DEBUG 0
LED_OPS_DATA sys_led_ops_data[1]={0};
@@ -48,11 +49,16 @@ LED_OPS_DATA* dev_list[LED_TYPE_MAX] = {
int num_psus = 0;
int num_fantrays = 0;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 10, 0)
+extern int board_i2c_cpld_read_new(unsigned short cpld_addr, char *name, u8 reg);
+extern int board_i2c_cpld_write_new(unsigned short cpld_addr, char *name, u8 reg, u8 value);
+#else
extern int board_i2c_cpld_read(unsigned short cpld_addr, u8 reg);
extern int board_i2c_cpld_write(unsigned short cpld_addr, u8 reg, u8 value);
+extern void *get_device_table(char *name);
+#endif
extern ssize_t show_pddf_data(struct device *dev, struct device_attribute *da, char *buf);
extern ssize_t store_pddf_data(struct device *dev, struct device_attribute *da, const char *buf, size_t count);
-extern void *get_device_table(char *name);
static LED_STATUS find_state_index(const char* state_str) {
int index;
@@ -151,6 +157,7 @@ static void print_led_data(LED_OPS_DATA *ptr, LED_STATUS state)
}
}
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 10, 0)
int get_sys_val(LED_OPS_DATA *ops_ptr, uint32_t *sys_val)
{
int ret;
@@ -184,7 +191,7 @@ int get_sys_val(LED_OPS_DATA *ops_ptr, uint32_t *sys_val)
return ret;
}
-
+#endif
ssize_t get_status_led(struct device_attribute *da)
{
@@ -203,6 +210,7 @@ ssize_t get_status_led(struct device_attribute *da)
temp_data_ptr->device_name, temp_data_ptr->index);
return (-1);
}
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 10, 0)
ret = get_sys_val(ops_ptr, &sys_val);
if (ret < 0) {
pddf_dbg(LED, KERN_ERR "ERROR %s: Cannot get sys val\n", __func__);
@@ -210,7 +218,11 @@ ssize_t get_status_led(struct device_attribute *da)
}
/* keep ret as old value */
ret = 0;
-
+#else
+ sys_val = board_i2c_cpld_read_new(ops_ptr->swpld_addr, ops_ptr->device_name, ops_ptr->swpld_addr_offset);
+ if (sys_val < 0)
+ return sys_val;
+#endif
strcpy(temp_data.cur_state.color, "None");
for (state=0; statedata[state].bits.mask_bits);
@@ -228,6 +240,7 @@ ssize_t get_status_led(struct device_attribute *da)
return(ret);
}
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 10, 0)
int set_sys_val(LED_OPS_DATA *ops_ptr, uint32_t new_val)
{
int ret;
@@ -257,6 +270,7 @@ int set_sys_val(LED_OPS_DATA *ops_ptr, uint32_t new_val)
return ret;
}
+#endif
ssize_t set_status_led(struct device_attribute *da)
{
@@ -288,12 +302,18 @@ ssize_t set_status_led(struct device_attribute *da)
}
if(ops_ptr->data[cur_state].swpld_addr != 0x0) {
- ret = get_sys_val(ops_ptr, &sys_val);
- if (ret < 0) {
- pddf_dbg(LED, KERN_ERR "ERROR %s: Cannot get sys val\n", __func__);
- return (-1);
- }
-
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 10, 0)
+ ret = get_sys_val(ops_ptr, &sys_val);
+ if (ret < 0) {
+ pddf_dbg(LED, KERN_ERR "ERROR %s: Cannot get sys val\n", __func__);
+ return (-1);
+ }
+#else
+ sys_val = board_i2c_cpld_read_new(ops_ptr->swpld_addr, ops_ptr->device_name, ops_ptr->swpld_addr_offset);
+ if (sys_val < 0) {
+ return sys_val;
+ }
+#endif
new_val = (sys_val & ops_ptr->data[cur_state].bits.mask_bits) |
(ops_ptr->data[cur_state].value << ops_ptr->data[cur_state].bits.pos);
@@ -303,16 +323,24 @@ ssize_t set_status_led(struct device_attribute *da)
return (-1);
}
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 10, 0)
ret = set_sys_val(ops_ptr, new_val);
if (ret < 0) {
pddf_dbg(LED, KERN_ERR "ERROR %s: Cannot set sys val\n", __func__);
return (-1);
}
+#else
+ board_i2c_cpld_write_new(ops_ptr->swpld_addr, ops_ptr->device_name, ops_ptr->swpld_addr_offset, new_val);
+#endif
pddf_dbg(LED, KERN_INFO "Set color:%s; 0x%x:0x%x sys_val:0x%x new_val:0x%x read:0x%x\n",
LED_STATUS_STR[cur_state],
ops_ptr->swpld_addr, ops_ptr->swpld_addr_offset,
sys_val, new_val,
- ret = board_i2c_cpld_read(ops_ptr->swpld_addr, ops_ptr->swpld_addr_offset));
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 10, 0)
+ ret = board_i2c_cpld_read(ops_ptr->swpld_addr, ops_ptr->swpld_addr_offset));
+#else
+ ret = board_i2c_cpld_read_new(ops_ptr->swpld_addr, ops_ptr->device_name, ops_ptr->swpld_addr_offset));
+#endif
if (ret < 0)
{
pddf_dbg(LED, KERN_ERR "PDDF_LED ERROR %s: Error %d in reading from cpld(0x%x) offset 0x%x\n", __FUNCTION__, ret, ops_ptr->swpld_addr, ops_ptr->swpld_addr_offset);
diff --git a/platform/broadcom/sonic-platform-modules-ragile/ra-b6510-48v8c/Makefile b/platform/broadcom/sonic-platform-modules-ragile/ra-b6510-48v8c/Makefile
index 9e262d7c095..bc2010b78e3 100755
--- a/platform/broadcom/sonic-platform-modules-ragile/ra-b6510-48v8c/Makefile
+++ b/platform/broadcom/sonic-platform-modules-ragile/ra-b6510-48v8c/Makefile
@@ -8,6 +8,9 @@ INSTALL_SCRIPT_DIR = $(SUB_BUILD_DIR)/usr/local/bin
INSTALL_SERVICE_DIR = $(SUB_BUILD_DIR)/lib/systemd/system/
KBUILD_EXTRA_SYMBOLS += $(DIR_KERNEL_SRC)/Module.symvers
+ifeq "5.10.0" "$(word 1, $(sort 5.10.0 $(KERNEL_VERSION)))"
+KBUILD_EXTRA_SYMBOLS += $(PWD)/../../../pddf/i2c/Module.symvers.PDDF
+endif
export KBUILD_EXTRA_SYMBOLS
all:
diff --git a/platform/broadcom/sonic-platform-modules-ragile/ra-b6510-48v8c/sonic_platform/chassis.py b/platform/broadcom/sonic-platform-modules-ragile/ra-b6510-48v8c/sonic_platform/chassis.py
index 4783c96b180..f2ee80783a7 100644
--- a/platform/broadcom/sonic-platform-modules-ragile/ra-b6510-48v8c/sonic_platform/chassis.py
+++ b/platform/broadcom/sonic-platform-modules-ragile/ra-b6510-48v8c/sonic_platform/chassis.py
@@ -6,17 +6,14 @@
try:
import time
- import subprocess
from sonic_platform_pddf_base.pddf_chassis import PddfChassis
- from rgutil.logutil import Logger
+ from sonic_platform.fan_drawer import FanDrawer
except ImportError as e:
raise ImportError(str(e) + "- required module not found")
PORT_START = 0
-PORT_END = 55
PORTS_IN_BLOCK = 56
-
-logger = Logger("CHASSIS", syslog=True)
+FAN_NUM_PER_DRAWER = 1
class Chassis(PddfChassis):
"""
@@ -30,14 +27,16 @@ class Chassis(PddfChassis):
def __init__(self, pddf_data=None, pddf_plugin_data=None):
PddfChassis.__init__(self, pddf_data, pddf_plugin_data)
- self.enable_read = "i2cset -f -y 2 0x35 0x2a 0x01"
- self.disable_read = "i2cset -f -y 2 0x35 0x2a 0x00"
- self.enable_write = "i2cset -f -y 2 0x35 0x2b 0x00"
- self.disable_write = "i2cset -f -y 2 0x35 0x2b 0x01"
- self.enable_erase = "i2cset -f -y 2 0x35 0x2c 0x01"
- self.disable_erase = "i2cset -f -y 2 0x35 0x2c 0x00"
- self.read_value = "i2cget -f -y 2 0x35 0x25"
- self.write_value = "i2cset -f -y 2 0x35 0x21 0x0a"
+ # fan drawer
+ temp = []
+ drawer_index = 0
+ for idx, fan in enumerate(self.get_all_fans()):
+ temp.append(fan)
+ if (idx + 1) % FAN_NUM_PER_DRAWER == 0:
+ drawer = FanDrawer(drawer_index + 1, temp)
+ self.get_all_fan_drawers().append(drawer)
+ temp = []
+ drawer_index += 1
def get_reboot_cause(self):
"""
@@ -49,32 +48,6 @@ def get_reboot_cause(self):
is "REBOOT_CAUSE_HARDWARE_OTHER", the second string can be used
to pass a description of the reboot cause.
"""
- try:
- is_power_loss = False
- # enable read
- subprocess.getstatusoutput(self.disable_write)
- subprocess.getstatusoutput(self.enable_read)
- ret, log = subprocess.getstatusoutput(self.read_value)
- if ret == 0 and "0x0a" in log:
- is_power_loss = True
-
- # erase i2c and e2
- subprocess.getstatusoutput(self.enable_erase)
- time.sleep(1)
- subprocess.getstatusoutput(self.disable_erase)
- # clear data
- subprocess.getstatusoutput(self.enable_write)
- subprocess.getstatusoutput(self.disable_read)
- subprocess.getstatusoutput(self.disable_write)
- subprocess.getstatusoutput(self.enable_read)
- # enable write and set data
- subprocess.getstatusoutput(self.enable_write)
- subprocess.getstatusoutput(self.disable_read)
- subprocess.getstatusoutput(self.write_value)
- if is_power_loss:
- return(self.REBOOT_CAUSE_POWER_LOSS, None)
- except Exception as e:
- logger.error(str(e))
return (self.REBOOT_CAUSE_NON_HARDWARE, None)
diff --git a/platform/broadcom/sonic-platform-modules-ragile/ra-b6510-48v8c/sonic_platform/fan_drawer.py b/platform/broadcom/sonic-platform-modules-ragile/ra-b6510-48v8c/sonic_platform/fan_drawer.py
index 4ff45cb8129..2f83b66df94 100644
--- a/platform/broadcom/sonic-platform-modules-ragile/ra-b6510-48v8c/sonic_platform/fan_drawer.py
+++ b/platform/broadcom/sonic-platform-modules-ragile/ra-b6510-48v8c/sonic_platform/fan_drawer.py
@@ -1,8 +1,5 @@
#
-# fan_drawer_base.py
-#
-# Abstract base class for implementing a platform-specific class with which
-# to interact with a fan drawer module in SONiC
+# fan_drawer
#
try:
@@ -12,9 +9,6 @@
class FanDrawer(FanDrawerBase):
- """
- Abstract base class for interfacing with a fan drawer
- """
# Device type definition. Note, this is a constant.
DEVICE_TYPE = "fan_drawer"
@@ -31,7 +25,7 @@ def get_name(self):
string: The name of the device
"""
- return "fan {}".format(self._index)
+ return "fan drawer {}".format(self._index)
def get_num_fans(self):
"""
@@ -59,13 +53,17 @@ def set_status_led(self, color):
Returns:
bool: True if status LED state is set successfully, False if not
"""
- return self._fan_list[self._index].set_status_led(color)
+ if self.get_num_fans() > 0:
+ return self._fan_list[0].set_status_led(color)
+ return False
- def get_status_led(self, color):
+ def get_status_led(self):
"""
Gets the state of the fan drawer LED
Returns:
A string, one of the predefined STATUS_LED_COLOR_* strings above
"""
- return self._fan_list[self._index].get_status_led(color)
+ if self.get_num_fans() > 0:
+ return self._fan_list[0].get_status_led()
+ return "N/A"
diff --git a/platform/broadcom/sonic-platform-modules-ragile/ra-b6510-48v8c/sonic_platform/sfp.py b/platform/broadcom/sonic-platform-modules-ragile/ra-b6510-48v8c/sonic_platform/sfp.py
index a216a37afcf..ea8e256fe6e 100644
--- a/platform/broadcom/sonic-platform-modules-ragile/ra-b6510-48v8c/sonic_platform/sfp.py
+++ b/platform/broadcom/sonic-platform-modules-ragile/ra-b6510-48v8c/sonic_platform/sfp.py
@@ -1,8 +1,31 @@
+#!/usr/bin/env python
+
try:
+ #from sonic_platform_pddf_base.pddf_sfp import *
+ from sonic_platform_base.sonic_sfp.sff8436 import sff8436InterfaceId
+ from sonic_platform_base.sonic_sfp.sff8436 import sff8436Dom
+ from sonic_platform_base.sonic_sfp.sff8472 import sff8472InterfaceId
+ from sonic_platform_base.sonic_sfp.sff8472 import sff8472Dom
from sonic_platform_pddf_base.pddf_sfp import PddfSfp
+ from sonic_platform_pddf_base.pddf_sfp import SFP_VOLT_OFFSET
+ from sonic_platform_pddf_base.pddf_sfp import SFP_VOLT_WIDTH
+ from sonic_platform_pddf_base.pddf_sfp import SFP_CHANNL_MON_OFFSET
+ from sonic_platform_pddf_base.pddf_sfp import SFP_CHANNL_MON_WIDTH
+ from sonic_platform_pddf_base.pddf_sfp import SFP_TEMPE_OFFSET
+ from sonic_platform_pddf_base.pddf_sfp import SFP_TEMPE_WIDTH
+ from sonic_platform_pddf_base.pddf_sfp import QSFP_DOM_REV_OFFSET
+ from sonic_platform_pddf_base.pddf_sfp import QSFP_DOM_REV_WIDTH
+ from sonic_platform_pddf_base.pddf_sfp import QSFP_CHANNL_MON_OFFSET
+ from sonic_platform_pddf_base.pddf_sfp import QSFP_CHANNL_MON_WITH_TX_POWER_WIDTH
except ImportError as e:
raise ImportError (str(e) + "- required module not found")
+XCVR_DOM_CAPABILITY_OFFSET = 92
+XCVR_DOM_CAPABILITY_WIDTH = 2
+QSFP_VERSION_COMPLIANCE_OFFSET = 1
+QSFP_VERSION_COMPLIANCE_WIDTH = 2
+QSFP_OPTION_VALUE_OFFSET = 192
+QSFP_OPTION_VALUE_WIDTH = 4
class Sfp(PddfSfp):
"""
@@ -11,5 +34,254 @@ class Sfp(PddfSfp):
def __init__(self, index, pddf_data=None, pddf_plugin_data=None):
PddfSfp.__init__(self, index, pddf_data, pddf_plugin_data)
+ self.dom_supported = False
+ self.__dom_capability_detect()
+
+ def __dom_capability_detect(self):
+ self.dom_supported = False
+ self.dom_temp_supported = False
+ self.dom_volt_supported = False
+ self.dom_rx_power_supported = False
+ self.dom_tx_power_supported = False
+ self.qsfp_page3_available = False
+ self.calibration = 0
+ if not self.get_presence():
+ return
+
+ if self.is_osfp_port:
+ # Not implement
+ return
+ elif self.is_qsfp_port:
+ self.calibration = 1
+ sfpi_obj = sff8436InterfaceId()
+ if sfpi_obj is None:
+ self.dom_supported = False
+ offset = 128
+
+ # QSFP capability byte parse, through this byte can know whether it support tx_power or not.
+ # TODO: in the future when decided to migrate to support SFF-8636 instead of SFF-8436,
+ # need to add more code for determining the capability and version compliance
+ # in SFF-8636 dom capability definitions evolving with the versions.
+ qsfp_dom_capability_raw = self.__read_eeprom_specific_bytes(
+ (offset + XCVR_DOM_CAPABILITY_OFFSET), XCVR_DOM_CAPABILITY_WIDTH)
+ if qsfp_dom_capability_raw is not None:
+ qsfp_version_compliance_raw = self.__read_eeprom_specific_bytes(
+ QSFP_VERSION_COMPLIANCE_OFFSET, QSFP_VERSION_COMPLIANCE_WIDTH)
+ qsfp_version_compliance = int(
+ qsfp_version_compliance_raw[0], 16)
+ dom_capability = sfpi_obj.parse_dom_capability(
+ qsfp_dom_capability_raw, 0)
+ if qsfp_version_compliance >= 0x08:
+ self.dom_temp_supported = dom_capability['data']['Temp_support']['value'] == 'On'
+ self.dom_volt_supported = dom_capability['data']['Voltage_support']['value'] == 'On'
+ self.dom_rx_power_supported = dom_capability['data']['Rx_power_support']['value'] == 'On'
+ self.dom_tx_power_supported = dom_capability['data']['Tx_power_support']['value'] == 'On'
+ else:
+ self.dom_temp_supported = True
+ self.dom_volt_supported = True
+ self.dom_rx_power_supported = dom_capability['data']['Rx_power_support']['value'] == 'On'
+ self.dom_tx_power_supported = True
+
+ self.dom_supported = True
+ self.calibration = 1
+ sfpd_obj = sff8436Dom()
+ if sfpd_obj is None:
+ return None
+ qsfp_option_value_raw = self.__read_eeprom_specific_bytes(
+ QSFP_OPTION_VALUE_OFFSET, QSFP_OPTION_VALUE_WIDTH)
+ if qsfp_option_value_raw is not None:
+ optional_capability = sfpd_obj.parse_option_params(
+ qsfp_option_value_raw, 0)
+ self.dom_tx_disable_supported = optional_capability[
+ 'data']['TxDisable']['value'] == 'On'
+ dom_status_indicator = sfpd_obj.parse_dom_status_indicator(
+ qsfp_version_compliance_raw, 1)
+ self.qsfp_page3_available = dom_status_indicator['data']['FlatMem']['value'] == 'Off'
+ else:
+ self.dom_supported = False
+ self.dom_temp_supported = False
+ self.dom_volt_supported = False
+ self.dom_rx_power_supported = False
+ self.dom_tx_power_supported = False
+ self.calibration = 0
+ self.qsfp_page3_available = False
+ else:
+ sfpi_obj = sff8472InterfaceId()
+ if sfpi_obj is None:
+ return None
+ sfp_dom_capability_raw = self.__read_eeprom_specific_bytes(
+ XCVR_DOM_CAPABILITY_OFFSET, XCVR_DOM_CAPABILITY_WIDTH)
+ if sfp_dom_capability_raw is not None:
+ sfp_dom_capability = int(sfp_dom_capability_raw[0], 16)
+ self.dom_supported = (sfp_dom_capability & 0x40 != 0)
+ if self.dom_supported:
+ self.dom_temp_supported = True
+ self.dom_volt_supported = True
+ self.dom_rx_power_supported = True
+ self.dom_tx_power_supported = True
+ if sfp_dom_capability & 0x20 != 0:
+ self.calibration = 1
+ elif sfp_dom_capability & 0x10 != 0:
+ self.calibration = 2
+ else:
+ self.calibration = 0
+ else:
+ self.dom_temp_supported = False
+ self.dom_volt_supported = False
+ self.dom_rx_power_supported = False
+ self.dom_tx_power_supported = False
+ self.calibration = 0
+ self.dom_tx_disable_supported = (
+ int(sfp_dom_capability_raw[1], 16) & 0x40 != 0)
# Provide the functions/variables below for which implementation is to be overwritten
+
+ def __read_eeprom_specific_bytes(self, offset, num_bytes):
+ eeprom_raw = []
+ if not self.get_presence():
+ return None
+ for i in range(0, num_bytes):
+ eeprom_raw.append("0x00")
+
+ try:
+ with open(self.eeprom_path, mode="rb", buffering=0) as eeprom:
+ eeprom.seek(offset)
+ raw = eeprom.read(num_bytes)
+ except Exception as e:
+ print("Error: Unable to open eeprom_path: %s" % (str(e)))
+ return None
+
+ try:
+ if len(raw) == 0:
+ return None
+ for n in range(0, num_bytes):
+ eeprom_raw[n] = hex(raw[n])[2:].zfill(2)
+ except Exception as e:
+ print("Error: Exception info: %s" % (str(e)))
+ return None
+
+ return eeprom_raw
+
+ def get_transceiver_bulk_status(self):
+ # check present status
+ if not self.get_presence():
+ return None
+ self.__dom_capability_detect()
+
+ xcvr_dom_info_dict = dict.fromkeys(self.dom_dict_keys, 'N/A')
+
+ if self.is_osfp_port:
+ # Below part is added to avoid fail xcvrd, shall be implemented later
+ pass
+ elif self.is_qsfp_port:
+ # QSFPs
+ xcvr_dom_info_dict = super(Sfp, self).get_transceiver_bulk_status()
+
+ # pddf_sfp "qsfp_tx_power_support != 'on'" is wrong
+
+ offset = 0
+ sfpd_obj = sff8436Dom()
+ if sfpd_obj is None:
+ return None
+
+ qsfp_dom_rev_raw = self.__read_eeprom_specific_bytes((offset + QSFP_DOM_REV_OFFSET), QSFP_DOM_REV_WIDTH)
+ if qsfp_dom_rev_raw is not None:
+ qsfp_dom_rev_data = sfpd_obj.parse_sfp_dom_rev(qsfp_dom_rev_raw, 0)
+ else:
+ return None
+
+ dom_channel_monitor_data = {}
+ qsfp_dom_rev = qsfp_dom_rev_data['data']['dom_rev']['value']
+
+ if (qsfp_dom_rev[0:8] == 'SFF-8636' and self.dom_tx_power_supported is True):
+ dom_channel_monitor_raw = self.__read_eeprom_specific_bytes(
+ (offset + QSFP_CHANNL_MON_OFFSET), QSFP_CHANNL_MON_WITH_TX_POWER_WIDTH)
+ if dom_channel_monitor_raw is not None:
+ dom_channel_monitor_data = sfpd_obj.parse_channel_monitor_params_with_tx_power(
+ dom_channel_monitor_raw, 0)
+ else:
+ return None
+
+ xcvr_dom_info_dict['tx1power'] = dom_channel_monitor_data['data']['TX1Power']['value']
+ xcvr_dom_info_dict['tx2power'] = dom_channel_monitor_data['data']['TX2Power']['value']
+ xcvr_dom_info_dict['tx3power'] = dom_channel_monitor_data['data']['TX3Power']['value']
+ xcvr_dom_info_dict['tx4power'] = dom_channel_monitor_data['data']['TX4Power']['value']
+ else:
+ # SFPs
+ offset = 256
+ if not self.dom_supported:
+ return xcvr_dom_info_dict
+
+ sfpd_obj = sff8472Dom()
+ if sfpd_obj is None:
+ return None
+
+ sfpd_obj._calibration_type = self.calibration
+
+ dom_temperature_raw = self.__read_eeprom_specific_bytes((offset + SFP_TEMPE_OFFSET), SFP_TEMPE_WIDTH)
+ if dom_temperature_raw is not None:
+ dom_temperature_data = sfpd_obj.parse_temperature(dom_temperature_raw, 0)
+ else:
+ return None
+
+ dom_voltage_raw = self.__read_eeprom_specific_bytes((offset + SFP_VOLT_OFFSET), SFP_VOLT_WIDTH)
+ if dom_voltage_raw is not None:
+ dom_voltage_data = sfpd_obj.parse_voltage(dom_voltage_raw, 0)
+ else:
+ return None
+
+ dom_channel_monitor_raw = self.__read_eeprom_specific_bytes(
+ (offset + SFP_CHANNL_MON_OFFSET), SFP_CHANNL_MON_WIDTH)
+ if dom_channel_monitor_raw is not None:
+ dom_channel_monitor_data = sfpd_obj.parse_channel_monitor_params(dom_channel_monitor_raw, 0)
+ else:
+ return None
+
+ xcvr_dom_info_dict['temperature'] = dom_temperature_data['data']['Temperature']['value']
+ xcvr_dom_info_dict['voltage'] = dom_voltage_data['data']['Vcc']['value']
+ xcvr_dom_info_dict['rx1power'] = dom_channel_monitor_data['data']['RXPower']['value']
+ xcvr_dom_info_dict['rx2power'] = 'N/A'
+ xcvr_dom_info_dict['rx3power'] = 'N/A'
+ xcvr_dom_info_dict['rx4power'] = 'N/A'
+ xcvr_dom_info_dict['tx1bias'] = dom_channel_monitor_data['data']['TXBias']['value']
+ xcvr_dom_info_dict['tx2bias'] = 'N/A'
+ xcvr_dom_info_dict['tx3bias'] = 'N/A'
+ xcvr_dom_info_dict['tx4bias'] = 'N/A'
+ xcvr_dom_info_dict['tx1power'] = dom_channel_monitor_data['data']['TXPower']['value']
+ xcvr_dom_info_dict['tx2power'] = 'N/A'
+ xcvr_dom_info_dict['tx3power'] = 'N/A'
+ xcvr_dom_info_dict['tx4power'] = 'N/A'
+
+ xcvr_dom_info_dict['rx_los'] = self.get_rx_los()
+ xcvr_dom_info_dict['tx_fault'] = self.get_tx_fault()
+ xcvr_dom_info_dict['reset_status'] = self.get_reset_status()
+ xcvr_dom_info_dict['lp_mode'] = self.get_lpmode()
+
+ return xcvr_dom_info_dict
+
+ def get_transceiver_threshold_info(self):
+ # check present status
+ if not self.get_presence():
+ return None
+ self.__dom_capability_detect()
+
+ xcvr_dom_threshold_info_dict = dict.fromkeys(self.threshold_dict_keys, 'N/A')
+
+ if self.is_osfp_port:
+ # Below part is added to avoid fail xcvrd, shall be implemented later
+ pass
+ elif self.is_qsfp_port:
+ # QSFPs
+ if not self.dom_supported or not self.qsfp_page3_available:
+ return xcvr_dom_threshold_info_dict
+
+ return super(Sfp, self).get_transceiver_threshold_info()
+
+ else:
+ # SFPs
+ if not self.dom_supported:
+ return xcvr_dom_threshold_info_dict
+
+ return super(Sfp, self).get_transceiver_threshold_info()
+
+ return xcvr_dom_threshold_info_dict
diff --git a/platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/Makefile b/platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/Makefile
index 9e262d7c095..bc2010b78e3 100755
--- a/platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/Makefile
+++ b/platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/Makefile
@@ -8,6 +8,9 @@ INSTALL_SCRIPT_DIR = $(SUB_BUILD_DIR)/usr/local/bin
INSTALL_SERVICE_DIR = $(SUB_BUILD_DIR)/lib/systemd/system/
KBUILD_EXTRA_SYMBOLS += $(DIR_KERNEL_SRC)/Module.symvers
+ifeq "5.10.0" "$(word 1, $(sort 5.10.0 $(KERNEL_VERSION)))"
+KBUILD_EXTRA_SYMBOLS += $(PWD)/../../../pddf/i2c/Module.symvers.PDDF
+endif
export KBUILD_EXTRA_SYMBOLS
all:
diff --git a/platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/setup.py b/platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/setup.py
index 0ed22d77062..f36055fb4e6 100644
--- a/platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/setup.py
+++ b/platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/setup.py
@@ -13,7 +13,8 @@
packages=[
'sonic_platform',
'rgutil',
- 'eepromutil'
+ 'eepromutil',
+ 'sonic_pcie',
],
classifiers=[
'Development Status :: 3 - Alpha',
diff --git a/platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/sonic_pcie/__init__.py b/platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/sonic_pcie/__init__.py
new file mode 100644
index 00000000000..73e2a89c8d7
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/sonic_pcie/__init__.py
@@ -0,0 +1 @@
+__all__ = ["pcie_common"]
\ No newline at end of file
diff --git a/platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/sonic_pcie/pcie_common.py b/platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/sonic_pcie/pcie_common.py
new file mode 100644
index 00000000000..56e9d8664a2
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/sonic_pcie/pcie_common.py
@@ -0,0 +1,107 @@
+# pcie_common.py
+# Common PCIE check interfaces for SONIC
+#
+
+import os
+import yaml
+import subprocess
+import re
+import sys
+from copy import deepcopy
+try:
+ from .pcie import PcieBase
+except ImportError as e:
+ raise ImportError(str(e) + "- required module not found")
+
+
+class PcieUtil(PcieBase):
+ """Platform-specific PCIEutil class"""
+ # got the config file path
+ def __init__(self, path):
+ self.config_path = path
+
+ # load the config file
+ def load_config_file(self):
+ config_file = self.config_path + "/" + "pcie.yaml"
+ try:
+ with open(config_file) as conf_file:
+ self.confInfo = yaml.load(conf_file)
+ except IOError as e:
+ print("Error: {}".format(str(e)))
+ print("Not found config file, please add a config file manually, or generate it by running [pcieutil pcie_generate]")
+ sys.exit()
+
+ # load current PCIe device
+ def get_pcie_device(self):
+ pciDict = {}
+ pciList = []
+ p1 = "^(\w+):(\w+)\.(\w)\s(.*)\s*\(*.*\)*"
+ p2 = "^.*:.*:.*:(\w+)\s*\(*.*\)*"
+ command1 = "sudo lspci"
+ command2 = "sudo lspci -n"
+ # run command 1
+ proc1 = subprocess.Popen(command1, shell=True, universal_newlines=True, stdout=subprocess.PIPE)
+ output1 = proc1.stdout.readlines()
+ proc1.communicate()
+ # run command 2
+ proc2 = subprocess.Popen(command2, shell=True, universal_newlines=True, stdout=subprocess.PIPE)
+ output2 = proc2.stdout.readlines()
+ proc2.communicate()
+
+ if proc1.returncode > 0:
+ for line1 in output1:
+ print(line1.strip())
+ return
+ elif proc2.returncode > 0:
+ for line2 in output2:
+ print(line2.strip())
+ return
+ else:
+ for (line1, line2) in zip(output1, output2):
+ pciDict.clear()
+ match1 = re.search(p1, line1.strip())
+ match2 = re.search(p2, line2.strip())
+ if match1 and match2:
+ Bus = match1.group(1)
+ Dev = match1.group(2)
+ Fn = match1.group(3)
+ Name = match1.group(4)
+ Id = match2.group(1)
+ pciDict["name"] = Name
+ pciDict["bus"] = Bus
+ pciDict["dev"] = Dev
+ pciDict["fn"] = Fn
+ pciDict["id"] = Id
+ pciList.append(pciDict)
+ pciDict = deepcopy(pciDict)
+ else:
+ print("CAN NOT MATCH PCIe DEVICE")
+ return pciList
+
+ # check the sysfs tree for each PCIe device
+ def check_pcie_sysfs(self, domain=0, bus=0, device=0, func=0):
+ dev_path = os.path.join('/sys/bus/pci/devices', '%04x:%02x:%02x.%d' % (domain, bus, device, func))
+ if os.path.exists(dev_path):
+ return True
+ return False
+
+ # check the current PCIe device with config file and return the result
+ def get_pcie_check(self):
+ self.load_config_file()
+ for item_conf in self.confInfo:
+ bus_conf = item_conf["bus"]
+ dev_conf = item_conf["dev"]
+ fn_conf = item_conf["fn"]
+ if self.check_pcie_sysfs(bus=int(bus_conf, base=16), device=int(dev_conf, base=16), func=int(fn_conf, base=16)):
+ item_conf["result"] = "Passed"
+ else:
+ item_conf["result"] = "Failed"
+ return self.confInfo
+
+ # generate the config file with current pci device
+ def dump_conf_yaml(self):
+ curInfo = self.get_pcie_device()
+ with open(self.config_path + "/" + "pcie.yaml", "w") as conf_file:
+ yaml.dump(curInfo, conf_file, default_flow_style=False)
+ return
+
diff --git a/platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/sonic_platform/chassis.py b/platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/sonic_platform/chassis.py
index f4750f4abd5..1bcfb3f2409 100644
--- a/platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/sonic_platform/chassis.py
+++ b/platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/sonic_platform/chassis.py
@@ -8,17 +8,14 @@
try:
import time
- import subprocess
from sonic_platform_pddf_base.pddf_chassis import PddfChassis
- from rgutil.logutil import Logger
+ from sonic_platform.fan_drawer import FanDrawer
except ImportError as e:
raise ImportError(str(e) + "- required module not found")
PORT_START = 0
-PORT_END = 55
PORTS_IN_BLOCK = 56
-
-logger = Logger("CHASSIS", syslog=True)
+FAN_NUM_PER_DRAWER = 1
class Chassis(PddfChassis):
"""
@@ -32,14 +29,16 @@ class Chassis(PddfChassis):
def __init__(self, pddf_data=None, pddf_plugin_data=None):
PddfChassis.__init__(self, pddf_data, pddf_plugin_data)
- self.enable_read = "i2cset -f -y 2 0x35 0x2a 0x01"
- self.disable_read = "i2cset -f -y 2 0x35 0x2a 0x00"
- self.enable_write = "i2cset -f -y 2 0x35 0x2b 0x00"
- self.disable_write = "i2cset -f -y 2 0x35 0x2b 0x01"
- self.enable_erase = "i2cset -f -y 2 0x35 0x2c 0x01"
- self.disable_erase = "i2cset -f -y 2 0x35 0x2c 0x00"
- self.read_value = "i2cget -f -y 2 0x35 0x25"
- self.write_value = "i2cset -f -y 2 0x35 0x21 0x0a"
+ # fan drawer
+ temp = []
+ drawer_index = 0
+ for idx, fan in enumerate(self.get_all_fans()):
+ temp.append(fan)
+ if (idx + 1) % FAN_NUM_PER_DRAWER == 0:
+ drawer = FanDrawer(drawer_index + 1, temp)
+ self.get_all_fan_drawers().append(drawer)
+ temp = []
+ drawer_index += 1
def get_reboot_cause(self):
"""
@@ -51,32 +50,6 @@ def get_reboot_cause(self):
is "REBOOT_CAUSE_HARDWARE_OTHER", the second string can be used
to pass a description of the reboot cause.
"""
- try:
- is_power_loss = False
- # enable read
- subprocess.getstatusoutput(self.disable_write)
- subprocess.getstatusoutput(self.enable_read)
- ret, log = subprocess.getstatusoutput(self.read_value)
- if ret == 0 and "0x0a" in log:
- is_power_loss = True
-
- # erase i2c and e2
- subprocess.getstatusoutput(self.enable_erase)
- time.sleep(1)
- subprocess.getstatusoutput(self.disable_erase)
- # clear data
- subprocess.getstatusoutput(self.enable_write)
- subprocess.getstatusoutput(self.disable_read)
- subprocess.getstatusoutput(self.disable_write)
- subprocess.getstatusoutput(self.enable_read)
- # enable write and set data
- subprocess.getstatusoutput(self.enable_write)
- subprocess.getstatusoutput(self.disable_read)
- subprocess.getstatusoutput(self.write_value)
- if is_power_loss:
- return(self.REBOOT_CAUSE_POWER_LOSS, None)
- except Exception as e:
- logger.error(str(e))
return (self.REBOOT_CAUSE_NON_HARDWARE, None)
diff --git a/platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/sonic_platform/fan_drawer.py b/platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/sonic_platform/fan_drawer.py
index 4ff45cb8129..2f83b66df94 100644
--- a/platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/sonic_platform/fan_drawer.py
+++ b/platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/sonic_platform/fan_drawer.py
@@ -1,8 +1,5 @@
#
-# fan_drawer_base.py
-#
-# Abstract base class for implementing a platform-specific class with which
-# to interact with a fan drawer module in SONiC
+# fan_drawer
#
try:
@@ -12,9 +9,6 @@
class FanDrawer(FanDrawerBase):
- """
- Abstract base class for interfacing with a fan drawer
- """
# Device type definition. Note, this is a constant.
DEVICE_TYPE = "fan_drawer"
@@ -31,7 +25,7 @@ def get_name(self):
string: The name of the device
"""
- return "fan {}".format(self._index)
+ return "fan drawer {}".format(self._index)
def get_num_fans(self):
"""
@@ -59,13 +53,17 @@ def set_status_led(self, color):
Returns:
bool: True if status LED state is set successfully, False if not
"""
- return self._fan_list[self._index].set_status_led(color)
+ if self.get_num_fans() > 0:
+ return self._fan_list[0].set_status_led(color)
+ return False
- def get_status_led(self, color):
+ def get_status_led(self):
"""
Gets the state of the fan drawer LED
Returns:
A string, one of the predefined STATUS_LED_COLOR_* strings above
"""
- return self._fan_list[self._index].get_status_led(color)
+ if self.get_num_fans() > 0:
+ return self._fan_list[0].get_status_led()
+ return "N/A"
diff --git a/platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/sonic_platform/pcie.py b/platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/sonic_platform/pcie.py
new file mode 100644
index 00000000000..d61925e5ff8
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/sonic_platform/pcie.py
@@ -0,0 +1,43 @@
+#
+# pcie_base.py
+#
+# Abstract base class for implementing platform-specific
+# PCIE functionality for SONiC
+#
+
+try:
+ import abc
+ from sonic_pcie import PcieUtil
+except ImportError as e:
+ raise ImportError (str(e) + " - required module not found")
+
+class PcieBase(object):
+ def __init__(self, path):
+ """
+ Constructor
+ Args:
+ pcieutil file and config file path
+ """
+ self.pcie_util = PcieUtil(path)
+
+
+ @abc.abstractmethod
+ def get_pcie_device(self):
+ """
+ get current device pcie info
+
+ Returns:
+ A list including pcie device info
+ """
+ return self.pcie_util.get_pcie_device()
+
+
+ @abc.abstractmethod
+ def get_pcie_check(self):
+ """
+ Check Pcie device with config file
+
+ Returns:
+ A list including pcie device and test result info
+ """
+ return self.pcie_util.get_pcie_check()
diff --git a/platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/sonic_platform/sfp.py b/platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/sonic_platform/sfp.py
index d9b6e491bef..ea8e256fe6e 100644
--- a/platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/sonic_platform/sfp.py
+++ b/platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/sonic_platform/sfp.py
@@ -1,10 +1,31 @@
#!/usr/bin/env python
try:
+ #from sonic_platform_pddf_base.pddf_sfp import *
+ from sonic_platform_base.sonic_sfp.sff8436 import sff8436InterfaceId
+ from sonic_platform_base.sonic_sfp.sff8436 import sff8436Dom
+ from sonic_platform_base.sonic_sfp.sff8472 import sff8472InterfaceId
+ from sonic_platform_base.sonic_sfp.sff8472 import sff8472Dom
from sonic_platform_pddf_base.pddf_sfp import PddfSfp
+ from sonic_platform_pddf_base.pddf_sfp import SFP_VOLT_OFFSET
+ from sonic_platform_pddf_base.pddf_sfp import SFP_VOLT_WIDTH
+ from sonic_platform_pddf_base.pddf_sfp import SFP_CHANNL_MON_OFFSET
+ from sonic_platform_pddf_base.pddf_sfp import SFP_CHANNL_MON_WIDTH
+ from sonic_platform_pddf_base.pddf_sfp import SFP_TEMPE_OFFSET
+ from sonic_platform_pddf_base.pddf_sfp import SFP_TEMPE_WIDTH
+ from sonic_platform_pddf_base.pddf_sfp import QSFP_DOM_REV_OFFSET
+ from sonic_platform_pddf_base.pddf_sfp import QSFP_DOM_REV_WIDTH
+ from sonic_platform_pddf_base.pddf_sfp import QSFP_CHANNL_MON_OFFSET
+ from sonic_platform_pddf_base.pddf_sfp import QSFP_CHANNL_MON_WITH_TX_POWER_WIDTH
except ImportError as e:
raise ImportError (str(e) + "- required module not found")
+XCVR_DOM_CAPABILITY_OFFSET = 92
+XCVR_DOM_CAPABILITY_WIDTH = 2
+QSFP_VERSION_COMPLIANCE_OFFSET = 1
+QSFP_VERSION_COMPLIANCE_WIDTH = 2
+QSFP_OPTION_VALUE_OFFSET = 192
+QSFP_OPTION_VALUE_WIDTH = 4
class Sfp(PddfSfp):
"""
@@ -13,5 +34,254 @@ class Sfp(PddfSfp):
def __init__(self, index, pddf_data=None, pddf_plugin_data=None):
PddfSfp.__init__(self, index, pddf_data, pddf_plugin_data)
+ self.dom_supported = False
+ self.__dom_capability_detect()
+
+ def __dom_capability_detect(self):
+ self.dom_supported = False
+ self.dom_temp_supported = False
+ self.dom_volt_supported = False
+ self.dom_rx_power_supported = False
+ self.dom_tx_power_supported = False
+ self.qsfp_page3_available = False
+ self.calibration = 0
+ if not self.get_presence():
+ return
+
+ if self.is_osfp_port:
+ # Not implement
+ return
+ elif self.is_qsfp_port:
+ self.calibration = 1
+ sfpi_obj = sff8436InterfaceId()
+ if sfpi_obj is None:
+ self.dom_supported = False
+ offset = 128
+
+ # QSFP capability byte parse, through this byte can know whether it support tx_power or not.
+ # TODO: in the future when decided to migrate to support SFF-8636 instead of SFF-8436,
+ # need to add more code for determining the capability and version compliance
+ # in SFF-8636 dom capability definitions evolving with the versions.
+ qsfp_dom_capability_raw = self.__read_eeprom_specific_bytes(
+ (offset + XCVR_DOM_CAPABILITY_OFFSET), XCVR_DOM_CAPABILITY_WIDTH)
+ if qsfp_dom_capability_raw is not None:
+ qsfp_version_compliance_raw = self.__read_eeprom_specific_bytes(
+ QSFP_VERSION_COMPLIANCE_OFFSET, QSFP_VERSION_COMPLIANCE_WIDTH)
+ qsfp_version_compliance = int(
+ qsfp_version_compliance_raw[0], 16)
+ dom_capability = sfpi_obj.parse_dom_capability(
+ qsfp_dom_capability_raw, 0)
+ if qsfp_version_compliance >= 0x08:
+ self.dom_temp_supported = dom_capability['data']['Temp_support']['value'] == 'On'
+ self.dom_volt_supported = dom_capability['data']['Voltage_support']['value'] == 'On'
+ self.dom_rx_power_supported = dom_capability['data']['Rx_power_support']['value'] == 'On'
+ self.dom_tx_power_supported = dom_capability['data']['Tx_power_support']['value'] == 'On'
+ else:
+ self.dom_temp_supported = True
+ self.dom_volt_supported = True
+ self.dom_rx_power_supported = dom_capability['data']['Rx_power_support']['value'] == 'On'
+ self.dom_tx_power_supported = True
+
+ self.dom_supported = True
+ self.calibration = 1
+ sfpd_obj = sff8436Dom()
+ if sfpd_obj is None:
+ return None
+ qsfp_option_value_raw = self.__read_eeprom_specific_bytes(
+ QSFP_OPTION_VALUE_OFFSET, QSFP_OPTION_VALUE_WIDTH)
+ if qsfp_option_value_raw is not None:
+ optional_capability = sfpd_obj.parse_option_params(
+ qsfp_option_value_raw, 0)
+ self.dom_tx_disable_supported = optional_capability[
+ 'data']['TxDisable']['value'] == 'On'
+ dom_status_indicator = sfpd_obj.parse_dom_status_indicator(
+ qsfp_version_compliance_raw, 1)
+ self.qsfp_page3_available = dom_status_indicator['data']['FlatMem']['value'] == 'Off'
+ else:
+ self.dom_supported = False
+ self.dom_temp_supported = False
+ self.dom_volt_supported = False
+ self.dom_rx_power_supported = False
+ self.dom_tx_power_supported = False
+ self.calibration = 0
+ self.qsfp_page3_available = False
+ else:
+ sfpi_obj = sff8472InterfaceId()
+ if sfpi_obj is None:
+ return None
+ sfp_dom_capability_raw = self.__read_eeprom_specific_bytes(
+ XCVR_DOM_CAPABILITY_OFFSET, XCVR_DOM_CAPABILITY_WIDTH)
+ if sfp_dom_capability_raw is not None:
+ sfp_dom_capability = int(sfp_dom_capability_raw[0], 16)
+ self.dom_supported = (sfp_dom_capability & 0x40 != 0)
+ if self.dom_supported:
+ self.dom_temp_supported = True
+ self.dom_volt_supported = True
+ self.dom_rx_power_supported = True
+ self.dom_tx_power_supported = True
+ if sfp_dom_capability & 0x20 != 0:
+ self.calibration = 1
+ elif sfp_dom_capability & 0x10 != 0:
+ self.calibration = 2
+ else:
+ self.calibration = 0
+ else:
+ self.dom_temp_supported = False
+ self.dom_volt_supported = False
+ self.dom_rx_power_supported = False
+ self.dom_tx_power_supported = False
+ self.calibration = 0
+ self.dom_tx_disable_supported = (
+ int(sfp_dom_capability_raw[1], 16) & 0x40 != 0)
# Provide the functions/variables below for which implementation is to be overwritten
+
+ def __read_eeprom_specific_bytes(self, offset, num_bytes):
+ eeprom_raw = []
+ if not self.get_presence():
+ return None
+ for i in range(0, num_bytes):
+ eeprom_raw.append("0x00")
+
+ try:
+ with open(self.eeprom_path, mode="rb", buffering=0) as eeprom:
+ eeprom.seek(offset)
+ raw = eeprom.read(num_bytes)
+ except Exception as e:
+ print("Error: Unable to open eeprom_path: %s" % (str(e)))
+ return None
+
+ try:
+ if len(raw) == 0:
+ return None
+ for n in range(0, num_bytes):
+ eeprom_raw[n] = hex(raw[n])[2:].zfill(2)
+ except Exception as e:
+ print("Error: Exception info: %s" % (str(e)))
+ return None
+
+ return eeprom_raw
+
+ def get_transceiver_bulk_status(self):
+ # check present status
+ if not self.get_presence():
+ return None
+ self.__dom_capability_detect()
+
+ xcvr_dom_info_dict = dict.fromkeys(self.dom_dict_keys, 'N/A')
+
+ if self.is_osfp_port:
+ # Below part is added to avoid fail xcvrd, shall be implemented later
+ pass
+ elif self.is_qsfp_port:
+ # QSFPs
+ xcvr_dom_info_dict = super(Sfp, self).get_transceiver_bulk_status()
+
+ # pddf_sfp "qsfp_tx_power_support != 'on'" is wrong
+
+ offset = 0
+ sfpd_obj = sff8436Dom()
+ if sfpd_obj is None:
+ return None
+
+ qsfp_dom_rev_raw = self.__read_eeprom_specific_bytes((offset + QSFP_DOM_REV_OFFSET), QSFP_DOM_REV_WIDTH)
+ if qsfp_dom_rev_raw is not None:
+ qsfp_dom_rev_data = sfpd_obj.parse_sfp_dom_rev(qsfp_dom_rev_raw, 0)
+ else:
+ return None
+
+ dom_channel_monitor_data = {}
+ qsfp_dom_rev = qsfp_dom_rev_data['data']['dom_rev']['value']
+
+ if (qsfp_dom_rev[0:8] == 'SFF-8636' and self.dom_tx_power_supported is True):
+ dom_channel_monitor_raw = self.__read_eeprom_specific_bytes(
+ (offset + QSFP_CHANNL_MON_OFFSET), QSFP_CHANNL_MON_WITH_TX_POWER_WIDTH)
+ if dom_channel_monitor_raw is not None:
+ dom_channel_monitor_data = sfpd_obj.parse_channel_monitor_params_with_tx_power(
+ dom_channel_monitor_raw, 0)
+ else:
+ return None
+
+ xcvr_dom_info_dict['tx1power'] = dom_channel_monitor_data['data']['TX1Power']['value']
+ xcvr_dom_info_dict['tx2power'] = dom_channel_monitor_data['data']['TX2Power']['value']
+ xcvr_dom_info_dict['tx3power'] = dom_channel_monitor_data['data']['TX3Power']['value']
+ xcvr_dom_info_dict['tx4power'] = dom_channel_monitor_data['data']['TX4Power']['value']
+ else:
+ # SFPs
+ offset = 256
+ if not self.dom_supported:
+ return xcvr_dom_info_dict
+
+ sfpd_obj = sff8472Dom()
+ if sfpd_obj is None:
+ return None
+
+ sfpd_obj._calibration_type = self.calibration
+
+ dom_temperature_raw = self.__read_eeprom_specific_bytes((offset + SFP_TEMPE_OFFSET), SFP_TEMPE_WIDTH)
+ if dom_temperature_raw is not None:
+ dom_temperature_data = sfpd_obj.parse_temperature(dom_temperature_raw, 0)
+ else:
+ return None
+
+ dom_voltage_raw = self.__read_eeprom_specific_bytes((offset + SFP_VOLT_OFFSET), SFP_VOLT_WIDTH)
+ if dom_voltage_raw is not None:
+ dom_voltage_data = sfpd_obj.parse_voltage(dom_voltage_raw, 0)
+ else:
+ return None
+
+ dom_channel_monitor_raw = self.__read_eeprom_specific_bytes(
+ (offset + SFP_CHANNL_MON_OFFSET), SFP_CHANNL_MON_WIDTH)
+ if dom_channel_monitor_raw is not None:
+ dom_channel_monitor_data = sfpd_obj.parse_channel_monitor_params(dom_channel_monitor_raw, 0)
+ else:
+ return None
+
+ xcvr_dom_info_dict['temperature'] = dom_temperature_data['data']['Temperature']['value']
+ xcvr_dom_info_dict['voltage'] = dom_voltage_data['data']['Vcc']['value']
+ xcvr_dom_info_dict['rx1power'] = dom_channel_monitor_data['data']['RXPower']['value']
+ xcvr_dom_info_dict['rx2power'] = 'N/A'
+ xcvr_dom_info_dict['rx3power'] = 'N/A'
+ xcvr_dom_info_dict['rx4power'] = 'N/A'
+ xcvr_dom_info_dict['tx1bias'] = dom_channel_monitor_data['data']['TXBias']['value']
+ xcvr_dom_info_dict['tx2bias'] = 'N/A'
+ xcvr_dom_info_dict['tx3bias'] = 'N/A'
+ xcvr_dom_info_dict['tx4bias'] = 'N/A'
+ xcvr_dom_info_dict['tx1power'] = dom_channel_monitor_data['data']['TXPower']['value']
+ xcvr_dom_info_dict['tx2power'] = 'N/A'
+ xcvr_dom_info_dict['tx3power'] = 'N/A'
+ xcvr_dom_info_dict['tx4power'] = 'N/A'
+
+ xcvr_dom_info_dict['rx_los'] = self.get_rx_los()
+ xcvr_dom_info_dict['tx_fault'] = self.get_tx_fault()
+ xcvr_dom_info_dict['reset_status'] = self.get_reset_status()
+ xcvr_dom_info_dict['lp_mode'] = self.get_lpmode()
+
+ return xcvr_dom_info_dict
+
+ def get_transceiver_threshold_info(self):
+ # check present status
+ if not self.get_presence():
+ return None
+ self.__dom_capability_detect()
+
+ xcvr_dom_threshold_info_dict = dict.fromkeys(self.threshold_dict_keys, 'N/A')
+
+ if self.is_osfp_port:
+ # Below part is added to avoid fail xcvrd, shall be implemented later
+ pass
+ elif self.is_qsfp_port:
+ # QSFPs
+ if not self.dom_supported or not self.qsfp_page3_available:
+ return xcvr_dom_threshold_info_dict
+
+ return super(Sfp, self).get_transceiver_threshold_info()
+
+ else:
+ # SFPs
+ if not self.dom_supported:
+ return xcvr_dom_threshold_info_dict
+
+ return super(Sfp, self).get_transceiver_threshold_info()
+
+ return xcvr_dom_threshold_info_dict
diff --git a/platform/broadcom/sonic-platform-modules-ragile/ra-b6920-4s/Makefile b/platform/broadcom/sonic-platform-modules-ragile/ra-b6920-4s/Makefile
index 46415e74ab7..f197dce8cdd 100755
--- a/platform/broadcom/sonic-platform-modules-ragile/ra-b6920-4s/Makefile
+++ b/platform/broadcom/sonic-platform-modules-ragile/ra-b6920-4s/Makefile
@@ -8,6 +8,9 @@ INSTALL_SCRIPT_DIR = $(SUB_BUILD_DIR)/usr/local/bin
INSTALL_SERVICE_DIR = $(SUB_BUILD_DIR)/lib/systemd/system/
KBUILD_EXTRA_SYMBOLS += $(DIR_KERNEL_SRC)/Module.symvers
+ifeq "5.10.0" "$(word 1, $(sort 5.10.0 $(KERNEL_VERSION)))"
+KBUILD_EXTRA_SYMBOLS += $(PWD)/../../../pddf/i2c/Module.symvers.PDDF
+endif
export KBUILD_EXTRA_SYMBOLS
all:
diff --git a/platform/broadcom/sonic-platform-modules-ragile/ra-b6920-4s/modules/driver/pddf_custom_led_module.c b/platform/broadcom/sonic-platform-modules-ragile/ra-b6920-4s/modules/driver/pddf_custom_led_module.c
index 97ca23a9232..1c8010bc7d7 100644
--- a/platform/broadcom/sonic-platform-modules-ragile/ra-b6920-4s/modules/driver/pddf_custom_led_module.c
+++ b/platform/broadcom/sonic-platform-modules-ragile/ra-b6920-4s/modules/driver/pddf_custom_led_module.c
@@ -27,6 +27,7 @@
#include
#include
#include
+#include
#include
#define DEBUG 0
@@ -48,11 +49,16 @@ LED_OPS_DATA* dev_list[LED_TYPE_MAX] = {
int num_psus = 0;
int num_fantrays = 0;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 10, 0)
+extern int board_i2c_cpld_read_new(unsigned short cpld_addr, char *name, u8 reg);
+extern int board_i2c_cpld_write_new(unsigned short cpld_addr, char *name, u8 reg, u8 value);
+#else
extern int board_i2c_cpld_read(unsigned short cpld_addr, u8 reg);
extern int board_i2c_cpld_write(unsigned short cpld_addr, u8 reg, u8 value);
+extern void *get_device_table(char *name);
+#endif
extern ssize_t show_pddf_data(struct device *dev, struct device_attribute *da, char *buf);
extern ssize_t store_pddf_data(struct device *dev, struct device_attribute *da, const char *buf, size_t count);
-extern void *get_device_table(char *name);
static LED_STATUS find_state_index(const char* state_str) {
int index;
@@ -151,6 +157,7 @@ static void print_led_data(LED_OPS_DATA *ptr, LED_STATUS state)
}
}
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 10, 0)
int get_sys_val(LED_OPS_DATA *ops_ptr, uint32_t *sys_val)
{
int ret;
@@ -187,8 +194,8 @@ int get_sys_val(LED_OPS_DATA *ops_ptr, uint32_t *sys_val)
return ret;
}
-
-
+#endif
+
ssize_t get_status_led(struct device_attribute *da)
{
int ret=0;
@@ -206,6 +213,7 @@ ssize_t get_status_led(struct device_attribute *da)
temp_data_ptr->device_name, temp_data_ptr->index);
return (-1);
}
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 10, 0)
ret = get_sys_val(ops_ptr, &sys_val);
if (ret < 0) {
pddf_dbg(LED, KERN_ERR "ERROR %s: Cannot get sys val\n", __func__);
@@ -213,7 +221,11 @@ ssize_t get_status_led(struct device_attribute *da)
}
/* keep ret as old value */
ret = 0;
-
+#else
+ sys_val = board_i2c_cpld_read_new(ops_ptr->swpld_addr, ops_ptr->device_name, ops_ptr->swpld_addr_offset);
+ if (sys_val < 0)
+ return sys_val;
+#endif
strcpy(temp_data.cur_state.color, "None");
for (state=0; statedata[state].bits.mask_bits);
@@ -232,6 +244,7 @@ ssize_t get_status_led(struct device_attribute *da)
return(ret);
}
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 10, 0)
int set_sys_val(LED_OPS_DATA *ops_ptr, uint32_t new_val)
{
int ret;
@@ -266,6 +279,7 @@ int set_sys_val(LED_OPS_DATA *ops_ptr, uint32_t new_val)
return ret;
}
+#endif
ssize_t set_status_led(struct device_attribute *da)
{
@@ -297,12 +311,18 @@ ssize_t set_status_led(struct device_attribute *da)
}
if(ops_ptr->data[cur_state].swpld_addr != 0x0) {
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 10, 0)
ret = get_sys_val(ops_ptr, &sys_val);
if (ret < 0) {
pddf_dbg(LED, KERN_ERR "ERROR %s: Cannot get sys val\n", __func__);
return (-1);
}
-
+#else
+ sys_val = board_i2c_cpld_read_new(ops_ptr->swpld_addr, ops_ptr->device_name, ops_ptr->swpld_addr_offset);
+ if (sys_val < 0) {
+ return sys_val;
+ }
+#endif
new_val = (sys_val & ops_ptr->data[cur_state].bits.mask_bits) |
(ops_ptr->data[cur_state].value << ops_ptr->data[cur_state].bits.pos);
@@ -312,16 +332,24 @@ ssize_t set_status_led(struct device_attribute *da)
return (-1);
}
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 10, 0)
ret = set_sys_val(ops_ptr, new_val);
if (ret < 0) {
pddf_dbg(LED, KERN_ERR "ERROR %s: Cannot set sys val\n", __func__);
return (-1);
}
+#else
+ board_i2c_cpld_write_new(ops_ptr->swpld_addr, ops_ptr->device_name, ops_ptr->swpld_addr_offset, new_val);
+#endif
pddf_dbg(LED, KERN_INFO "Set color:%s; 0x%x:0x%x sys_val:0x%x new_val:0x%x read:0x%x\n",
LED_STATUS_STR[cur_state],
ops_ptr->swpld_addr, ops_ptr->swpld_addr_offset,
sys_val, new_val,
- ret = board_i2c_cpld_read(ops_ptr->swpld_addr, ops_ptr->swpld_addr_offset));
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 10, 0)
+ ret = board_i2c_cpld_read(ops_ptr->swpld_addr, ops_ptr->swpld_addr_offset));
+#else
+ ret = board_i2c_cpld_read_new(ops_ptr->swpld_addr, ops_ptr->device_name, ops_ptr->swpld_addr_offset));
+#endif
if (ret < 0)
{
pddf_dbg(LED, KERN_ERR "PDDF_LED ERROR %s: Error %d in reading from cpld(0x%x) offset 0x%x\n", __FUNCTION__, ret, ops_ptr->swpld_addr, ops_ptr->swpld_addr_offset);
diff --git a/platform/pddf/platform-modules-pddf.mk b/platform/pddf/platform-modules-pddf.mk
index 5947c180656..b1bd4564397 100644
--- a/platform/pddf/platform-modules-pddf.mk
+++ b/platform/pddf/platform-modules-pddf.mk
@@ -9,4 +9,5 @@ $(PDDF_PLATFORM_MODULE)_SRC_PATH = $(PLATFORM_PDDF_PATH)/i2c
$(PDDF_PLATFORM_MODULE)_DEPENDS += $(LINUX_HEADERS) $(LINUX_HEADERS_COMMON)
SONIC_DPKG_DEBS += $(PDDF_PLATFORM_MODULE)
+
SONIC_STRETCH_DEBS += $(PDDF_PLATFORM_MODULE)