[platform/ragile] support ra-b6910-64c (#7950)
What I did it Add new platform x86_64-ragile_ra-b6910-64c-r0 (Tomahawk 3) ASIC Vendor: Broadcom Switch ASIC: Tomahawk 3 Port Config: 64x100G -How I did it Provide device and platform related files. -How to verify it show platform fan show platform ssdhealth show platform psustatus show platform summary show platform syseeprom show platform temperature show interface status
This commit is contained in:
parent
7e02f7b4ba
commit
8514a484cd
@ -0,0 +1,65 @@
|
|||||||
|
# name lanes alias index speed
|
||||||
|
Ethernet1 9,10,11,12 hundredGigE1 0 100000
|
||||||
|
Ethernet2 13,14,15,16 hundredGigE2 1 100000
|
||||||
|
Ethernet3 25,26,27,28 hundredGigE3 2 100000
|
||||||
|
Ethernet4 29,30,31,32 hundredGigE4 3 100000
|
||||||
|
Ethernet5 41,42,43,44 hundredGigE5 4 100000
|
||||||
|
Ethernet6 45,46,47,48 hundredGigE6 5 100000
|
||||||
|
Ethernet7 57,58,59,60 hundredGigE7 6 100000
|
||||||
|
Ethernet8 61,62,63,64 hundredGigE8 7 100000
|
||||||
|
Ethernet9 73,74,75,76 hundredGigE9 8 100000
|
||||||
|
Ethernet10 77,78,79,80 hundredGigE10 9 100000
|
||||||
|
Ethernet11 89,90,91,92 hundredGigE11 10 100000
|
||||||
|
Ethernet12 93,94,95,96 hundredGigE12 11 100000
|
||||||
|
Ethernet13 105,106,107,108 hundredGigE13 12 100000
|
||||||
|
Ethernet14 109,110,111,112 hundredGigE14 13 100000
|
||||||
|
Ethernet15 121,122,123,124 hundredGigE15 14 100000
|
||||||
|
Ethernet16 125,126,127,128 hundredGigE16 15 100000
|
||||||
|
Ethernet17 137,138,139,140 hundredGigE17 16 100000
|
||||||
|
Ethernet18 141,142,143,144 hundredGigE18 17 100000
|
||||||
|
Ethernet19 153,154,155,156 hundredGigE19 18 100000
|
||||||
|
Ethernet20 157,158,159,160 hundredGigE20 19 100000
|
||||||
|
Ethernet21 169,170,171,172 hundredGigE21 20 100000
|
||||||
|
Ethernet22 173,174,175,176 hundredGigE22 21 100000
|
||||||
|
Ethernet23 185,186,187,188 hundredGigE23 22 100000
|
||||||
|
Ethernet24 189,190,191,192 hundredGigE24 23 100000
|
||||||
|
Ethernet25 201,202,203,204 hundredGigE25 24 100000
|
||||||
|
Ethernet26 205,206,207,208 hundredGigE26 25 100000
|
||||||
|
Ethernet27 217,218,219,220 hundredGigE27 26 100000
|
||||||
|
Ethernet28 221,222,223,224 hundredGigE28 27 100000
|
||||||
|
Ethernet29 233,234,235,236 hundredGigE29 28 100000
|
||||||
|
Ethernet30 237,238,239,240 hundredGigE30 29 100000
|
||||||
|
Ethernet31 249,250,251,252 hundredGigE31 30 100000
|
||||||
|
Ethernet32 253,254,255,256 hundredGigE32 31 100000
|
||||||
|
Ethernet33 1,2,3,4 hundredGigE33 32 100000
|
||||||
|
Ethernet34 5,6,7,8 hundredGigE34 33 100000
|
||||||
|
Ethernet35 17,18,19,20 hundredGigE35 34 100000
|
||||||
|
Ethernet36 21,22,23,24 hundredGigE36 35 100000
|
||||||
|
Ethernet37 33,34,35,36 hundredGigE37 36 100000
|
||||||
|
Ethernet38 37,38,39,40 hundredGigE38 37 100000
|
||||||
|
Ethernet39 49,50,51,52 hundredGigE39 38 100000
|
||||||
|
Ethernet40 53,54,55,56 hundredGigE40 39 100000
|
||||||
|
Ethernet41 65,66,67,68 hundredGigE41 40 100000
|
||||||
|
Ethernet42 69,70,71,72 hundredGigE42 41 100000
|
||||||
|
Ethernet43 81,82,83,84 hundredGigE43 42 100000
|
||||||
|
Ethernet44 85,86,87,88 hundredGigE44 43 100000
|
||||||
|
Ethernet45 97,98,99,100 hundredGigE45 44 100000
|
||||||
|
Ethernet46 101,102,103,104 hundredGigE46 45 100000
|
||||||
|
Ethernet47 113,114,115,116 hundredGigE47 46 100000
|
||||||
|
Ethernet48 117,118,119,120 hundredGigE48 47 100000
|
||||||
|
Ethernet49 129,130,131,132 hundredGigE49 48 100000
|
||||||
|
Ethernet50 133,134,135,136 hundredGigE50 49 100000
|
||||||
|
Ethernet51 145,146,147,148 hundredGigE51 50 100000
|
||||||
|
Ethernet52 149,150,151,152 hundredGigE52 51 100000
|
||||||
|
Ethernet53 161,162,163,164 hundredGigE53 52 100000
|
||||||
|
Ethernet54 165,166,167,168 hundredGigE54 53 100000
|
||||||
|
Ethernet55 177,178,179,180 hundredGigE55 54 100000
|
||||||
|
Ethernet56 181,182,183,184 hundredGigE56 55 100000
|
||||||
|
Ethernet57 193,194,195,196 hundredGigE57 56 100000
|
||||||
|
Ethernet58 197,198,199,200 hundredGigE58 57 100000
|
||||||
|
Ethernet59 209,210,211,212 hundredGigE59 58 100000
|
||||||
|
Ethernet60 213,214,215,216 hundredGigE60 59 100000
|
||||||
|
Ethernet61 225,226,227,228 hundredGigE61 60 100000
|
||||||
|
Ethernet62 229,230,231,232 hundredGigE62 61 100000
|
||||||
|
Ethernet63 241,242,243,244 hundredGigE63 62 100000
|
||||||
|
Ethernet64 245,246,247,248 hundredGigE64 63 100000
|
@ -0,0 +1 @@
|
|||||||
|
SAI_INIT_CONFIG_FILE=/usr/share/sonic/hwsku/th2-ra-b6910-64c-64x100G.config.bcm
|
@ -0,0 +1,976 @@
|
|||||||
|
core_clock_frequency=1700
|
||||||
|
dpp_clock_ratio=2:3
|
||||||
|
table_dma_enable=1
|
||||||
|
tslam_dma_enable=1
|
||||||
|
tdma_intr_enable=0
|
||||||
|
tslam_intr_enable=0
|
||||||
|
miim_intr_enable=0
|
||||||
|
portmap_1=9:100
|
||||||
|
#portmap_2=10:25:i
|
||||||
|
#portmap_3=11:25:i
|
||||||
|
#portmap_4=12:25:i
|
||||||
|
portmap_5=13:100
|
||||||
|
#portmap_6=14:25:i
|
||||||
|
#portmap_7=15:25:i
|
||||||
|
#portmap_8=16:25:i
|
||||||
|
portmap_9=1:100
|
||||||
|
#portmap_10=2:25:i
|
||||||
|
#portmap_11=3:25:i
|
||||||
|
#portmap_12=4:25:i
|
||||||
|
portmap_13=5:100
|
||||||
|
#portmap_14=6:25:i
|
||||||
|
#portmap_15=7:25:i
|
||||||
|
#portmap_16=8:25:i
|
||||||
|
portmap_17=25:100
|
||||||
|
#portmap_18=26:25:i
|
||||||
|
#portmap_19=27:25:i
|
||||||
|
#portmap_20=28:25:i
|
||||||
|
portmap_21=29:100
|
||||||
|
portmap_22=17:100
|
||||||
|
portmap_23=21:100
|
||||||
|
portmap_24=41:100
|
||||||
|
portmap_25=45:100
|
||||||
|
portmap_26=33:100
|
||||||
|
portmap_27=37:100
|
||||||
|
portmap_28=57:100
|
||||||
|
portmap_29=61:100
|
||||||
|
portmap_30=49:100
|
||||||
|
portmap_31=53:100
|
||||||
|
|
||||||
|
portmap_34=73:100
|
||||||
|
#portmap_35=74:25:i
|
||||||
|
#portmap_36=75:25:i
|
||||||
|
#portmap_37=76:25:i
|
||||||
|
portmap_38=77:100
|
||||||
|
#portmap_39=78:25:i
|
||||||
|
#portmap_40=79:25:i
|
||||||
|
#portmap_41=80:25:i
|
||||||
|
portmap_42=65:100
|
||||||
|
#portmap_43=66:25:i
|
||||||
|
#portmap_44=67:25:i
|
||||||
|
#portmap_45=68:25:i
|
||||||
|
portmap_46=69:100
|
||||||
|
#portmap_47=70:25:i
|
||||||
|
#portmap_48=71:25:i
|
||||||
|
#portmap_49=72:25:i
|
||||||
|
portmap_50=89:100
|
||||||
|
#portmap_51=90:25:i
|
||||||
|
#portmap_52=91:25:i
|
||||||
|
#portmap_53=92:25:i
|
||||||
|
portmap_54=93:100
|
||||||
|
portmap_55=81:100
|
||||||
|
portmap_56=85:100
|
||||||
|
portmap_57=105:100
|
||||||
|
portmap_58=109:100
|
||||||
|
portmap_59=97:100
|
||||||
|
portmap_60=101:100
|
||||||
|
portmap_61=121:100
|
||||||
|
portmap_62=125:100
|
||||||
|
portmap_63=113:100
|
||||||
|
portmap_64=117:100
|
||||||
|
|
||||||
|
portmap_68=137:100
|
||||||
|
#portmap_69=138:25:i
|
||||||
|
#portmap_70=139:25:i
|
||||||
|
#portmap_71=140:25:i
|
||||||
|
portmap_72=141:100
|
||||||
|
#portmap_73=142:25:i
|
||||||
|
#portmap_74=143:25:i
|
||||||
|
#portmap_75=144:25:i
|
||||||
|
portmap_76=129:100
|
||||||
|
#portmap_77=130:25:i
|
||||||
|
#portmap_78=131:25:i
|
||||||
|
#portmap_79=132:25:i
|
||||||
|
portmap_80=133:100
|
||||||
|
#portmap_81=134:25:i
|
||||||
|
#portmap_82=135:25:i
|
||||||
|
#portmap_83=136:25:i
|
||||||
|
portmap_84=153:100
|
||||||
|
#portmap_85=154:25:i
|
||||||
|
#portmap_86=155:25:i
|
||||||
|
#portmap_87=156:25:i
|
||||||
|
portmap_88=157:100
|
||||||
|
portmap_89=145:100
|
||||||
|
portmap_90=149:100
|
||||||
|
portmap_91=169:100
|
||||||
|
portmap_92=173:100
|
||||||
|
portmap_93=161:100
|
||||||
|
portmap_94=165:100
|
||||||
|
portmap_95=185:100
|
||||||
|
portmap_96=189:100
|
||||||
|
portmap_97=177:100
|
||||||
|
portmap_98=181:100
|
||||||
|
|
||||||
|
portmap_102=201:100
|
||||||
|
#portmap_103=202:25:i
|
||||||
|
#portmap_104=203:25:i
|
||||||
|
#portmap_105=204:25:i
|
||||||
|
portmap_106=205:100
|
||||||
|
#portmap_107=206:25:i
|
||||||
|
#portmap_108=207:25:i
|
||||||
|
#portmap_109=208:25:i
|
||||||
|
portmap_110=193:100
|
||||||
|
#portmap_111=194:25:i
|
||||||
|
#portmap_112=195:25:i
|
||||||
|
#portmap_113=196:25:i
|
||||||
|
portmap_114=197:100
|
||||||
|
#portmap_115=198:25:i
|
||||||
|
#portmap_116=199:25:i
|
||||||
|
#portmap_117=200:25:i
|
||||||
|
portmap_118=217:100
|
||||||
|
#portmap_119=218:25:i
|
||||||
|
#portmap_120=219:25:i
|
||||||
|
#portmap_121=220:25:i
|
||||||
|
portmap_122=221:100
|
||||||
|
portmap_123=209:100
|
||||||
|
portmap_124=213:100
|
||||||
|
portmap_125=233:100
|
||||||
|
portmap_126=237:100
|
||||||
|
portmap_127=225:100
|
||||||
|
portmap_128=229:100
|
||||||
|
portmap_129=249:100
|
||||||
|
portmap_130=253:100
|
||||||
|
portmap_131=241:100
|
||||||
|
portmap_132=245:100
|
||||||
|
|
||||||
|
pbmp_xport_xe=0x3ffc444447ff111113ffc44444ffe22222
|
||||||
|
oversubscribe_mode=1
|
||||||
|
|
||||||
|
port_flex_enable=1
|
||||||
|
#L2/L3 only use dedicated table (8K) each
|
||||||
|
#FPEM occupy 2 banks
|
||||||
|
#fpem_mem_entries=65536
|
||||||
|
l3_mem_entries=49152
|
||||||
|
l2_mem_entries=32768
|
||||||
|
l3_alpm_enable=2
|
||||||
|
ipv6_lpm_128b_enable=1
|
||||||
|
|
||||||
|
l2xmsg_mode=0
|
||||||
|
|
||||||
|
phy_chain_tx_lane_map_physical{1.0}=0x0213
|
||||||
|
phy_chain_tx_lane_map_physical{5.0}=0x0123
|
||||||
|
phy_chain_tx_lane_map_physical{9.0}=0x2130
|
||||||
|
phy_chain_tx_lane_map_physical{13.0}=0x3012
|
||||||
|
phy_chain_tx_lane_map_physical{17.0}=0x0213
|
||||||
|
phy_chain_tx_lane_map_physical{21.0}=0x1203
|
||||||
|
phy_chain_tx_lane_map_physical{25.0}=0x2130
|
||||||
|
phy_chain_tx_lane_map_physical{29.0}=0x1230
|
||||||
|
phy_chain_tx_lane_map_physical{33.0}=0x1302
|
||||||
|
phy_chain_tx_lane_map_physical{37.0}=0x1203
|
||||||
|
phy_chain_tx_lane_map_physical{41.0}=0x1302
|
||||||
|
phy_chain_tx_lane_map_physical{45.0}=0x3021
|
||||||
|
phy_chain_tx_lane_map_physical{49.0}=0x3012
|
||||||
|
phy_chain_tx_lane_map_physical{53.0}=0x1302
|
||||||
|
phy_chain_tx_lane_map_physical{57.0}=0x0213
|
||||||
|
phy_chain_tx_lane_map_physical{61.0}=0x3021
|
||||||
|
phy_chain_tx_lane_map_physical{65.0}=0x3012
|
||||||
|
phy_chain_tx_lane_map_physical{69.0}=0x0213
|
||||||
|
phy_chain_tx_lane_map_physical{73.0}=0x1302
|
||||||
|
phy_chain_tx_lane_map_physical{77.0}=0x3021
|
||||||
|
phy_chain_tx_lane_map_physical{81.0}=0x3012
|
||||||
|
phy_chain_tx_lane_map_physical{85.0}=0x1302
|
||||||
|
phy_chain_tx_lane_map_physical{89.0}=0x0213
|
||||||
|
phy_chain_tx_lane_map_physical{93.0}=0x3021
|
||||||
|
phy_chain_tx_lane_map_physical{97.0}=0x3012
|
||||||
|
phy_chain_tx_lane_map_physical{101.0}=0x3120
|
||||||
|
phy_chain_tx_lane_map_physical{105.0}=0x3210
|
||||||
|
phy_chain_tx_lane_map_physical{109.0}=0x0213
|
||||||
|
phy_chain_tx_lane_map_physical{113.0}=0x1230
|
||||||
|
phy_chain_tx_lane_map_physical{117.0}=0x3120
|
||||||
|
phy_chain_tx_lane_map_physical{121.0}=0x0321
|
||||||
|
phy_chain_tx_lane_map_physical{125.0}=0x0213
|
||||||
|
phy_chain_tx_lane_map_physical{129.0}=0x2103
|
||||||
|
phy_chain_tx_lane_map_physical{133.0}=0x1302
|
||||||
|
phy_chain_tx_lane_map_physical{137.0}=0x1230
|
||||||
|
phy_chain_tx_lane_map_physical{141.0}=0x3120
|
||||||
|
phy_chain_tx_lane_map_physical{145.0}=0x2103
|
||||||
|
phy_chain_tx_lane_map_physical{149.0}=0x0213
|
||||||
|
phy_chain_tx_lane_map_physical{153.0}=0x0123
|
||||||
|
phy_chain_tx_lane_map_physical{157.0}=0x2103
|
||||||
|
phy_chain_tx_lane_map_physical{161.0}=0x3012
|
||||||
|
phy_chain_tx_lane_map_physical{165.0}=0x3210
|
||||||
|
phy_chain_tx_lane_map_physical{169.0}=0x2031
|
||||||
|
phy_chain_tx_lane_map_physical{173.0}=0x1230
|
||||||
|
phy_chain_tx_lane_map_physical{177.0}=0x3012
|
||||||
|
phy_chain_tx_lane_map_physical{181.0}=0x1032
|
||||||
|
phy_chain_tx_lane_map_physical{185.0}=0x3120
|
||||||
|
phy_chain_tx_lane_map_physical{189.0}=0x2103
|
||||||
|
phy_chain_tx_lane_map_physical{193.0}=0x3012
|
||||||
|
phy_chain_tx_lane_map_physical{197.0}=0x3210
|
||||||
|
phy_chain_tx_lane_map_physical{201.0}=0x2031
|
||||||
|
phy_chain_tx_lane_map_physical{205.0}=0x2103
|
||||||
|
phy_chain_tx_lane_map_physical{209.0}=0x3012
|
||||||
|
phy_chain_tx_lane_map_physical{213.0}=0x1032
|
||||||
|
phy_chain_tx_lane_map_physical{217.0}=0x3120
|
||||||
|
phy_chain_tx_lane_map_physical{221.0}=0x0213
|
||||||
|
phy_chain_tx_lane_map_physical{225.0}=0x3120
|
||||||
|
phy_chain_tx_lane_map_physical{229.0}=0x2031
|
||||||
|
phy_chain_tx_lane_map_physical{233.0}=0x1203
|
||||||
|
phy_chain_tx_lane_map_physical{237.0}=0x3210
|
||||||
|
phy_chain_tx_lane_map_physical{241.0}=0x3021
|
||||||
|
phy_chain_tx_lane_map_physical{245.0}=0x2031
|
||||||
|
phy_chain_tx_lane_map_physical{249.0}=0x0213
|
||||||
|
phy_chain_tx_lane_map_physical{253.0}=0x2103
|
||||||
|
|
||||||
|
phy_chain_rx_lane_map_physical{1.0}=0x2301
|
||||||
|
phy_chain_rx_lane_map_physical{5.0}=0x1032
|
||||||
|
phy_chain_rx_lane_map_physical{9.0}=0x2103
|
||||||
|
phy_chain_rx_lane_map_physical{13.0}=0x2301
|
||||||
|
phy_chain_rx_lane_map_physical{17.0}=0x1032
|
||||||
|
phy_chain_rx_lane_map_physical{21.0}=0x2031
|
||||||
|
phy_chain_rx_lane_map_physical{25.0}=0x0321
|
||||||
|
phy_chain_rx_lane_map_physical{29.0}=0x1032
|
||||||
|
phy_chain_rx_lane_map_physical{33.0}=0x3102
|
||||||
|
phy_chain_rx_lane_map_physical{37.0}=0x3102
|
||||||
|
phy_chain_rx_lane_map_physical{41.0}=0x2130
|
||||||
|
phy_chain_rx_lane_map_physical{45.0}=0x2031
|
||||||
|
phy_chain_rx_lane_map_physical{49.0}=0x3102
|
||||||
|
phy_chain_rx_lane_map_physical{53.0}=0x0231
|
||||||
|
phy_chain_rx_lane_map_physical{57.0}=0x3021
|
||||||
|
phy_chain_rx_lane_map_physical{61.0}=0x2031
|
||||||
|
phy_chain_rx_lane_map_physical{65.0}=0x3102
|
||||||
|
phy_chain_rx_lane_map_physical{69.0}=0x3102
|
||||||
|
phy_chain_rx_lane_map_physical{73.0}=0x2130
|
||||||
|
phy_chain_rx_lane_map_physical{77.0}=0x2031
|
||||||
|
phy_chain_rx_lane_map_physical{81.0}=0x3102
|
||||||
|
phy_chain_rx_lane_map_physical{85.0}=0x0231
|
||||||
|
phy_chain_rx_lane_map_physical{89.0}=0x3021
|
||||||
|
phy_chain_rx_lane_map_physical{93.0}=0x2031
|
||||||
|
phy_chain_rx_lane_map_physical{97.0}=0x0231
|
||||||
|
phy_chain_rx_lane_map_physical{101.0}=0x0132
|
||||||
|
phy_chain_rx_lane_map_physical{105.0}=0x3012
|
||||||
|
phy_chain_rx_lane_map_physical{109.0}=0x3210
|
||||||
|
phy_chain_rx_lane_map_physical{113.0}=0x2301
|
||||||
|
phy_chain_rx_lane_map_physical{117.0}=0x1023
|
||||||
|
phy_chain_rx_lane_map_physical{121.0}=0x0321
|
||||||
|
phy_chain_rx_lane_map_physical{125.0}=0x2310
|
||||||
|
phy_chain_rx_lane_map_physical{129.0}=0x2301
|
||||||
|
phy_chain_rx_lane_map_physical{133.0}=0x2310
|
||||||
|
phy_chain_rx_lane_map_physical{137.0}=0x2103
|
||||||
|
phy_chain_rx_lane_map_physical{141.0}=0x2310
|
||||||
|
phy_chain_rx_lane_map_physical{145.0}=0x2301
|
||||||
|
phy_chain_rx_lane_map_physical{149.0}=0x1023
|
||||||
|
phy_chain_rx_lane_map_physical{153.0}=0x2103
|
||||||
|
phy_chain_rx_lane_map_physical{157.0}=0x0213
|
||||||
|
phy_chain_rx_lane_map_physical{161.0}=0x0231
|
||||||
|
phy_chain_rx_lane_map_physical{165.0}=0x0231
|
||||||
|
phy_chain_rx_lane_map_physical{169.0}=0x0132
|
||||||
|
phy_chain_rx_lane_map_physical{173.0}=0x0213
|
||||||
|
phy_chain_rx_lane_map_physical{177.0}=0x0231
|
||||||
|
phy_chain_rx_lane_map_physical{181.0}=0x3102
|
||||||
|
phy_chain_rx_lane_map_physical{185.0}=0x3201
|
||||||
|
phy_chain_rx_lane_map_physical{189.0}=0x0213
|
||||||
|
phy_chain_rx_lane_map_physical{193.0}=0x0231
|
||||||
|
phy_chain_rx_lane_map_physical{197.0}=0x0231
|
||||||
|
phy_chain_rx_lane_map_physical{201.0}=0x0132
|
||||||
|
phy_chain_rx_lane_map_physical{205.0}=0x0213
|
||||||
|
phy_chain_rx_lane_map_physical{209.0}=0x0231
|
||||||
|
phy_chain_rx_lane_map_physical{213.0}=0x3102
|
||||||
|
phy_chain_rx_lane_map_physical{217.0}=0x3201
|
||||||
|
phy_chain_rx_lane_map_physical{221.0}=0x0213
|
||||||
|
phy_chain_rx_lane_map_physical{225.0}=0x0213
|
||||||
|
phy_chain_rx_lane_map_physical{229.0}=0x0123
|
||||||
|
phy_chain_rx_lane_map_physical{233.0}=0x3012
|
||||||
|
phy_chain_rx_lane_map_physical{237.0}=0x3210
|
||||||
|
phy_chain_rx_lane_map_physical{241.0}=0x2301
|
||||||
|
phy_chain_rx_lane_map_physical{245.0}=0x0123
|
||||||
|
phy_chain_rx_lane_map_physical{249.0}=0x1320
|
||||||
|
phy_chain_rx_lane_map_physical{253.0}=0x2301
|
||||||
|
|
||||||
|
|
||||||
|
phy_chain_rx_polarity_flip_physical{1.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{2.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{3.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{4.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{5.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{6.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{7.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{8.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{9.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{10.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{11.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{12.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{13.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{14.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{15.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{16.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{17.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{18.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{19.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{20.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{21.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{22.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{23.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{24.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{25.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{26.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{27.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{28.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{29.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{30.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{31.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{32.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{33.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{34.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{35.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{36.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{37.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{38.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{39.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{40.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{41.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{42.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{43.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{44.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{45.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{46.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{47.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{48.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{49.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{50.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{51.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{52.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{53.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{54.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{55.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{56.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{57.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{58.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{59.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{60.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{61.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{62.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{63.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{64.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{65.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{66.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{67.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{68.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{69.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{70.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{71.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{72.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{73.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{74.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{75.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{76.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{77.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{78.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{79.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{80.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{81.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{82.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{83.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{84.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{85.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{86.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{87.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{88.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{89.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{90.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{91.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{92.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{93.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{94.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{95.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{96.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{97.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{98.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{99.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{100.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{101.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{102.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{103.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{104.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{105.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{106.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{107.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{108.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{109.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{110.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{111.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{112.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{113.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{114.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{115.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{116.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{117.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{118.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{119.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{120.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{121.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{122.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{123.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{124.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{125.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{126.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{127.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{128.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{129.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{130.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{131.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{132.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{133.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{134.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{135.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{136.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{137.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{138.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{139.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{140.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{141.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{142.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{143.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{144.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{145.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{146.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{147.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{148.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{149.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{150.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{151.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{152.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{153.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{154.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{155.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{156.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{157.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{158.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{159.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{160.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{161.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{162.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{163.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{164.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{165.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{166.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{167.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{168.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{169.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{170.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{171.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{172.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{173.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{174.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{175.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{176.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{177.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{178.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{179.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{180.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{181.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{182.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{183.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{184.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{185.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{186.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{187.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{188.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{189.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{190.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{191.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{192.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{193.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{194.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{195.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{196.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{197.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{198.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{199.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{200.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{201.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{202.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{203.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{204.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{205.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{206.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{207.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{208.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{209.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{210.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{211.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{212.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{213.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{214.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{215.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{216.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{217.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{218.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{219.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{220.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{221.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{222.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{223.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{224.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{225.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{226.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{227.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{228.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{229.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{230.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{231.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{232.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{233.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{234.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{235.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{236.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{237.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{238.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{239.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{240.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{241.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{242.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{243.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{244.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{245.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{246.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{247.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{248.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{249.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{250.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{251.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{252.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{253.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{254.0}=0x1
|
||||||
|
phy_chain_rx_polarity_flip_physical{255.0}=0x0
|
||||||
|
phy_chain_rx_polarity_flip_physical{256.0}=0x1
|
||||||
|
|
||||||
|
|
||||||
|
phy_chain_tx_polarity_flip_physical{1.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{2.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{3.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{4.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{5.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{6.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{7.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{8.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{9.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{10.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{11.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{12.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{13.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{14.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{15.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{16.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{17.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{18.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{19.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{20.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{21.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{22.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{23.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{24.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{25.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{26.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{27.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{28.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{29.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{30.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{31.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{32.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{33.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{34.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{35.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{36.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{37.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{38.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{39.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{40.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{41.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{42.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{43.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{44.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{45.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{46.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{47.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{48.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{49.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{50.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{51.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{52.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{53.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{54.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{55.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{56.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{57.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{58.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{59.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{60.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{61.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{62.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{63.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{64.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{65.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{66.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{67.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{68.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{69.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{70.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{71.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{72.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{73.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{74.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{75.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{76.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{77.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{78.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{79.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{80.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{81.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{82.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{83.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{84.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{85.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{86.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{87.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{88.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{89.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{90.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{91.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{92.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{93.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{94.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{95.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{96.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{97.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{98.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{99.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{100.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{101.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{102.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{103.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{104.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{105.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{106.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{107.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{108.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{109.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{110.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{111.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{112.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{113.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{114.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{115.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{116.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{117.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{118.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{119.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{120.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{121.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{122.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{123.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{124.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{125.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{126.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{127.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{128.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{129.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{130.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{131.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{132.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{133.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{134.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{135.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{136.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{137.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{138.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{139.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{140.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{141.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{142.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{143.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{144.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{145.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{146.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{147.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{148.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{149.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{150.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{151.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{152.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{153.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{154.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{155.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{156.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{157.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{158.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{159.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{160.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{161.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{162.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{163.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{164.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{165.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{166.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{167.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{168.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{169.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{170.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{171.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{172.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{173.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{174.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{175.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{176.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{177.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{178.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{179.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{180.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{181.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{182.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{183.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{184.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{185.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{186.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{187.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{188.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{189.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{190.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{191.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{192.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{193.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{194.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{195.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{196.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{197.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{198.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{199.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{200.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{201.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{202.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{203.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{204.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{205.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{206.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{207.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{208.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{209.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{210.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{211.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{212.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{213.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{214.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{215.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{216.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{217.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{218.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{219.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{220.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{221.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{222.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{223.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{224.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{225.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{226.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{227.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{228.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{229.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{230.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{231.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{232.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{233.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{234.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{235.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{236.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{237.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{238.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{239.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{240.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{241.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{242.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{243.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{244.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{245.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{246.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{247.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{248.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{249.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{250.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{251.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{252.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{253.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{254.0}=0x1
|
||||||
|
phy_chain_tx_polarity_flip_physical{255.0}=0x0
|
||||||
|
phy_chain_tx_polarity_flip_physical{256.0}=0x1
|
||||||
|
|
||||||
|
|
||||||
|
serdes_driver_current_lane0=0xf
|
||||||
|
serdes_driver_current_lane1=0xf
|
||||||
|
serdes_driver_current_lane2=0xf
|
||||||
|
serdes_driver_current_lane3=0xf
|
||||||
|
|
||||||
|
dport_map_port_1=1
|
||||||
|
dport_map_port_5=2
|
||||||
|
dport_map_port_17=3
|
||||||
|
dport_map_port_21=4
|
||||||
|
dport_map_port_24=5
|
||||||
|
dport_map_port_25=6
|
||||||
|
dport_map_port_28=7
|
||||||
|
dport_map_port_29=8
|
||||||
|
dport_map_port_34=9
|
||||||
|
dport_map_port_38=10
|
||||||
|
dport_map_port_50=11
|
||||||
|
dport_map_port_54=12
|
||||||
|
dport_map_port_57=13
|
||||||
|
dport_map_port_58=14
|
||||||
|
dport_map_port_61=15
|
||||||
|
dport_map_port_62=16
|
||||||
|
dport_map_port_68=17
|
||||||
|
dport_map_port_72=18
|
||||||
|
dport_map_port_84=19
|
||||||
|
dport_map_port_88=20
|
||||||
|
dport_map_port_91=21
|
||||||
|
dport_map_port_92=22
|
||||||
|
dport_map_port_95=23
|
||||||
|
dport_map_port_96=24
|
||||||
|
dport_map_port_102=25
|
||||||
|
dport_map_port_106=26
|
||||||
|
dport_map_port_118=27
|
||||||
|
dport_map_port_122=28
|
||||||
|
dport_map_port_125=29
|
||||||
|
dport_map_port_126=30
|
||||||
|
dport_map_port_129=31
|
||||||
|
dport_map_port_130=32
|
||||||
|
dport_map_port_9=33
|
||||||
|
dport_map_port_13=34
|
||||||
|
dport_map_port_22=35
|
||||||
|
dport_map_port_23=36
|
||||||
|
dport_map_port_26=37
|
||||||
|
dport_map_port_27=38
|
||||||
|
dport_map_port_30=39
|
||||||
|
dport_map_port_31=40
|
||||||
|
dport_map_port_42=41
|
||||||
|
dport_map_port_46=42
|
||||||
|
dport_map_port_55=43
|
||||||
|
dport_map_port_56=44
|
||||||
|
dport_map_port_59=45
|
||||||
|
dport_map_port_60=46
|
||||||
|
dport_map_port_63=47
|
||||||
|
dport_map_port_64=48
|
||||||
|
dport_map_port_76=49
|
||||||
|
dport_map_port_80=50
|
||||||
|
dport_map_port_89=51
|
||||||
|
dport_map_port_90=52
|
||||||
|
dport_map_port_93=53
|
||||||
|
dport_map_port_94=54
|
||||||
|
dport_map_port_97=55
|
||||||
|
dport_map_port_98=56
|
||||||
|
dport_map_port_110=57
|
||||||
|
dport_map_port_114=58
|
||||||
|
dport_map_port_123=59
|
||||||
|
dport_map_port_124=60
|
||||||
|
dport_map_port_127=61
|
||||||
|
dport_map_port_128=62
|
||||||
|
dport_map_port_131=63
|
||||||
|
dport_map_port_132=64
|
||||||
|
|
||||||
|
serdes_if_type_1=14
|
||||||
|
serdes_if_type_5=14
|
||||||
|
serdes_if_type_17=14
|
||||||
|
serdes_if_type_21=14
|
||||||
|
serdes_if_type_24=14
|
||||||
|
serdes_if_type_25=14
|
||||||
|
serdes_if_type_28=14
|
||||||
|
serdes_if_type_29=14
|
||||||
|
serdes_if_type_34=14
|
||||||
|
serdes_if_type_38=14
|
||||||
|
serdes_if_type_50=14
|
||||||
|
serdes_if_type_54=14
|
||||||
|
serdes_if_type_57=14
|
||||||
|
serdes_if_type_58=14
|
||||||
|
serdes_if_type_61=14
|
||||||
|
serdes_if_type_62=14
|
||||||
|
serdes_if_type_68=14
|
||||||
|
serdes_if_type_72=14
|
||||||
|
serdes_if_type_84=14
|
||||||
|
serdes_if_type_88=14
|
||||||
|
serdes_if_type_91=14
|
||||||
|
serdes_if_type_92=14
|
||||||
|
serdes_if_type_95=14
|
||||||
|
serdes_if_type_96=14
|
||||||
|
serdes_if_type_102=14
|
||||||
|
serdes_if_type_106=14
|
||||||
|
serdes_if_type_118=14
|
||||||
|
serdes_if_type_122=14
|
||||||
|
serdes_if_type_125=14
|
||||||
|
serdes_if_type_126=14
|
||||||
|
serdes_if_type_129=14
|
||||||
|
serdes_if_type_130=14
|
||||||
|
serdes_if_type_9=14
|
||||||
|
serdes_if_type_13=14
|
||||||
|
serdes_if_type_22=14
|
||||||
|
serdes_if_type_23=14
|
||||||
|
serdes_if_type_26=14
|
||||||
|
serdes_if_type_27=14
|
||||||
|
serdes_if_type_30=14
|
||||||
|
serdes_if_type_31=14
|
||||||
|
serdes_if_type_42=14
|
||||||
|
serdes_if_type_46=14
|
||||||
|
serdes_if_type_55=14
|
||||||
|
serdes_if_type_56=14
|
||||||
|
serdes_if_type_59=14
|
||||||
|
serdes_if_type_60=14
|
||||||
|
serdes_if_type_63=14
|
||||||
|
serdes_if_type_64=14
|
||||||
|
serdes_if_type_76=14
|
||||||
|
serdes_if_type_80=14
|
||||||
|
serdes_if_type_89=14
|
||||||
|
serdes_if_type_90=14
|
||||||
|
serdes_if_type_93=14
|
||||||
|
serdes_if_type_94=14
|
||||||
|
serdes_if_type_97=14
|
||||||
|
serdes_if_type_98=14
|
||||||
|
serdes_if_type_110=14
|
||||||
|
serdes_if_type_114=14
|
||||||
|
serdes_if_type_123=14
|
||||||
|
serdes_if_type_124=14
|
||||||
|
serdes_if_type_127=14
|
||||||
|
serdes_if_type_128=14
|
||||||
|
|
||||||
|
###################user module area ###################
|
||||||
|
|
||||||
|
bcm_tunnel_term_compatible_mode=1
|
||||||
|
bcm_num_cos=8
|
||||||
|
mmu_lossless=0
|
||||||
|
mmu_config_override=0
|
||||||
|
|
||||||
|
buf.prigroup.guarantee=0
|
||||||
|
buf.prigroup.device_headroom_enable=1
|
||||||
|
buf.prigroup.pool_resume=1664B
|
||||||
|
buf.prigroup.pool_scale=8
|
||||||
|
|
||||||
|
buf.prigroup.port_guarantee_enable=1
|
||||||
|
buf.prigroup.port_max_enable=1
|
||||||
|
buf.prigroup.flow_control_enable=0
|
||||||
|
|
||||||
|
buf.queue.pool_scale=8
|
||||||
|
buf.mqueue.pool_scale=0.125
|
||||||
|
buf.queue.pool_scale_hg=8
|
||||||
|
buf.mqueue.pool_scale_hg=8
|
||||||
|
buf.mqueue.pool_scale_cpu=0.015625
|
||||||
|
buf.queue.qgroup_guarantee_enable=0
|
||||||
|
profile_pg_1hdrm_8shared=0
|
||||||
|
|
||||||
|
buf.map.pri.prigroup=0,1,2,3,4,5,6,7,0,1,2,3,4,5,6,7
|
||||||
|
num_queues_pci=46
|
||||||
|
num_queues_uc0=1
|
||||||
|
num_queues_uc1=1
|
||||||
|
flow_init_mode=1
|
||||||
|
# Protobuf relateed properties
|
||||||
|
ctr_evict_enable=0
|
||||||
|
udp_port=22000
|
||||||
|
# Exact match related properties
|
||||||
|
multi_hash_recurse_depth_exact_match=2
|
||||||
|
robust_hash_seed_exact_match=0x12345
|
||||||
|
# E-INT related properties
|
||||||
|
my_udp_port_int=5566
|
||||||
|
server_udp_port_int=7788
|
||||||
|
probe_marker1_int=0xAAAAAAAA
|
||||||
|
probe_marker2_int=0xBBBBBBBB
|
||||||
|
hoplimit_int=8
|
||||||
|
lb_port_pipe0_int=1
|
||||||
|
lb_port_pipe1_int=67
|
||||||
|
ing_origin_id_device_id_mask=0x7FFF80
|
||||||
|
egr_origin_id_device_id_mask=0x7FFF80
|
||||||
|
port_count_in_pb_stream=1
|
||||||
|
|
1
device/ragile/x86_64-ragile_ra-b6910-64c-r0/bcm.rc
Normal file
1
device/ragile/x86_64-ragile_ra-b6910-64c-r0/bcm.rc
Normal file
@ -0,0 +1 @@
|
|||||||
|
rcload /usr/share/sonic/platform/led_proc_init.soc
|
1
device/ragile/x86_64-ragile_ra-b6910-64c-r0/default_sku
Normal file
1
device/ragile/x86_64-ragile_ra-b6910-64c-r0/default_sku
Normal file
@ -0,0 +1 @@
|
|||||||
|
RA-B6910-64C t1
|
122
device/ragile/x86_64-ragile_ra-b6910-64c-r0/dev.xml
Normal file
122
device/ragile/x86_64-ragile_ra-b6910-64c-r0/dev.xml
Normal file
@ -0,0 +1,122 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
### type 1 result/1000
|
||||||
|
type 2 result/100
|
||||||
|
type 3 read bit
|
||||||
|
### property need check must add int front
|
||||||
|
-->
|
||||||
|
<catalog>
|
||||||
|
<fans>
|
||||||
|
<fan id="fan1" >
|
||||||
|
<property name="present" location="2-0037/fan_present" type="3" bit="0" decode="fanpresent" default="0"/>
|
||||||
|
<property name="status" location="2-0037/fan_status" type="3" bit="0" decode="fanstatus" default="1"/>
|
||||||
|
<property name="hw_version" location="3-0053/fan_hw_version" type="0" bit="0"/>
|
||||||
|
<property name="fan_type" location="3-0053/fan_type"/>
|
||||||
|
<property name="sn" location="3-0053/fan_sn"/>
|
||||||
|
<property name="Speed" location="2-0037/hwmon/*/fan1_input"/>
|
||||||
|
</fan>
|
||||||
|
<fan id="fan2" >
|
||||||
|
<property name="present" location="2-0037/fan_present" type="3" bit="1" decode="fanpresent" default="0" />
|
||||||
|
<property name="status" location="2-0037/fan_status" type="3" bit="1" decode="fanstatus" default="1"/>
|
||||||
|
<property name="hw_version" location="4-0053/fan_hw_version" type="0" bit="0"/>
|
||||||
|
<property name="fan_type" location="4-0053/fan_type"/>
|
||||||
|
<property name="sn" location="4-0053/fan_sn"/>
|
||||||
|
<property name="Speed" location="2-0037/hwmon/*/fan2_input"/>
|
||||||
|
</fan>
|
||||||
|
<fan id="fan3" >
|
||||||
|
<property name="present" location="2-0037/fan_present" type="3" bit="2" decode="fanpresent" default="0"/>
|
||||||
|
<property name="status" location="2-0037/fan_status" type="3" bit="2" decode="fanstatus" default="1"/>
|
||||||
|
<property name="hw_version" location="5-0053/fan_hw_version" type="0" bit="0"/>
|
||||||
|
<property name="fan_type" location="5-0053/fan_type"/>
|
||||||
|
<property name="sn" location="5-0053/fan_sn"/>
|
||||||
|
<property name="Speed" location="2-0037/hwmon/*/fan3_input"/>
|
||||||
|
</fan>
|
||||||
|
<!--fan id="fan4" >
|
||||||
|
<property name="present" location="2-0037/fan_present" type="3" bit="3" decode="fanpresent" default="0"/>
|
||||||
|
<property name="status" location="2-0037/fan_status" type="3" bit="3" decode="fanstatus" default="1"/>
|
||||||
|
<property name="hw_version" location="6-0053/fan_hw_version" type="0" bit="0"/>
|
||||||
|
<property name="fan_type" location="6-0053/fan_type"/>
|
||||||
|
<property name="sn" location="6-0053/fan_sn"/>
|
||||||
|
<property name="Speed" location="2-0037/hwmon/*/fan4_input"/>
|
||||||
|
</fan -->
|
||||||
|
</fans>
|
||||||
|
<temps>
|
||||||
|
<temp id="air_inlet" >
|
||||||
|
<property name="temp1_input" location="/2-0048/hwmon/*/temp1_input" type="1"/>
|
||||||
|
<property name="temp1_max" location="/2-0048/hwmon/*/temp1_max" type="1" />
|
||||||
|
<property name="temp1_max_hyst" location="/2-0048/hwmon/*/temp1_max_hyst" type="1" />
|
||||||
|
</temp>
|
||||||
|
<temp id="air_outlet" >
|
||||||
|
<property name="temp1_input" location="/2-0049/hwmon/*/temp1_input" type="1" />
|
||||||
|
<property name="temp1_max" location="/2-0049/hwmon/*/temp1_max" type="1" />
|
||||||
|
<property name="temp1_max_hyst" location="/2-0049/hwmon/*/temp1_max_hyst" type="1" />
|
||||||
|
</temp>
|
||||||
|
<temp id="air_hotlet" >
|
||||||
|
<property name="temp1_input" location="/2-004a/hwmon/*/temp1_input" type="1"/>
|
||||||
|
<property name="temp1_max" location="/2-004a/hwmon/*/temp1_max" type="1"/>
|
||||||
|
<property name="temp1_max_hyst" location="/2-004a/hwmon/*/temp1_max_hyst" type="1"/>
|
||||||
|
</temp>
|
||||||
|
</temps>
|
||||||
|
<psus>
|
||||||
|
<psu id="psu1" >
|
||||||
|
<property name="present" location="2-0037/psu_status" type="3" bit="0" decode="psucheck" default="0"/>
|
||||||
|
<property name="status" location="2-0037/psu_status" type="3" bit="1" decode="psustatus" default="1"/>
|
||||||
|
<property name="sn" location="7-0050/psu_sn" />
|
||||||
|
<property name="in_current" location="7-0058/hwmon/*/curr1_input" type="1" />
|
||||||
|
<property name="in_voltage" location="7-0058/hwmon/*/in1_input" type="1"/>
|
||||||
|
<property name="out_voltage" location="7-0058/hwmon/*/in2_input" type="1" />
|
||||||
|
<property name="out_current" location="7-0058/hwmon/*/curr2_input" type="1" />
|
||||||
|
<property name="temp" location="7-0058/hwmon/*/temp1_input" type="1"/>
|
||||||
|
<property name="hw" location="7-0050/psu_hw" />
|
||||||
|
<property name="type1" location="7-0050/psu_type" decode="psutype"/>
|
||||||
|
<property name="fan_speed" location="7-0058/hwmon/*/fan1_input" />
|
||||||
|
<property name="in_power" location="7-0058/hwmon/*/power1_input" type="5"/>
|
||||||
|
<property name="out_power" location="7-0058/hwmon/*/power2_input" type="5"/>
|
||||||
|
</psu>
|
||||||
|
<psu id="psu2" >
|
||||||
|
<property name="present" location="2-0037/psu_status" type="3" bit="4" decode="psucheck" default="0"/>
|
||||||
|
<property name="status" location="2-0037/psu_status" type="3" bit="5" decode="psustatus" default="1"/>
|
||||||
|
<property name="sn" location="8-0053/psu_sn" />
|
||||||
|
<property name="in_current" location="8-005b/hwmon/*/curr1_input" type="1" />
|
||||||
|
<property name="in_voltage" location="8-005b/hwmon/*/in1_input" type="1"/>
|
||||||
|
<property name="out_voltage" location="8-005b/hwmon/*/in2_input" type="1" />
|
||||||
|
<property name="out_current" location="8-005b/hwmon/*/curr2_input" type="1" />
|
||||||
|
<property name="temp" location="8-005b/hwmon/*/temp1_input" type="1"/>
|
||||||
|
<property name="hw" location="8-0053/psu_hw" />
|
||||||
|
<property name="type1" location="8-0053/psu_type" decode="psutype"/>
|
||||||
|
<property name="fan_speed" location="8-005b/hwmon/*/fan1_input" />
|
||||||
|
<property name="in_power" location="8-005b/hwmon/*/power1_input" type="5"/>
|
||||||
|
<property name="out_power" location="8-005b/hwmon/*/power2_input" type="5"/>
|
||||||
|
</psu>
|
||||||
|
</psus>
|
||||||
|
<cpus location="/sys/class/hwmon/hwmon0"/>
|
||||||
|
<ports_rx>
|
||||||
|
<mgmt_rx id="mgmt" sender="eth0" >
|
||||||
|
<property name="mgmt" location="/eth0/statistics/rx_packets" type="4"/>
|
||||||
|
</mgmt_rx>
|
||||||
|
</ports_rx>
|
||||||
|
<decode>
|
||||||
|
<fanpresent>
|
||||||
|
<code key="1" value="ABSENT"/>
|
||||||
|
<code key="0" value="PRESENT"/>
|
||||||
|
</fanpresent>
|
||||||
|
<fanstatus>
|
||||||
|
<code key="1" value="OK"/>
|
||||||
|
<code key="0" value="NOT OK"/>
|
||||||
|
</fanstatus>
|
||||||
|
<psucheck>
|
||||||
|
<code key="1" value="ABSENT"/>
|
||||||
|
<code key="0" value="PRESENT"/>
|
||||||
|
</psucheck>
|
||||||
|
<psustatus>
|
||||||
|
<code key="1" value="OK"/>
|
||||||
|
<code key="0" value="NOT OK"/>
|
||||||
|
</psustatus>
|
||||||
|
|
||||||
|
<psutype>
|
||||||
|
<code key="CSU800AP-3-300" value="RG-PA800I-F"/>
|
||||||
|
<code key="DPS-850AB-16 A" value="RG-PA800I-F"/>
|
||||||
|
</psutype>
|
||||||
|
</decode>
|
||||||
|
</catalog>
|
||||||
|
|
@ -0,0 +1 @@
|
|||||||
|
CONSOLE_SPEED=115200
|
@ -0,0 +1,23 @@
|
|||||||
|
|
||||||
|
led 0 stop
|
||||||
|
led 0 prog 02 01 60 F1 02 00 60 F2 06 E1 80 D2 21 71 10 E0 60 E1 E9 D2 10 75 18 81 61 E3 02 34 67 5C 02 30 67 5C 02 3C 67 5C 02 38 67 5C 02 24 67 5C 02 20 67 5C 02 2C 67 5C 02 28 67 5C 02 14 67 5C 02 10 67 5C 02 1C 67 5C 02 18 67 5C 02 04 67 5C 02 00 67 5C 02 0C 67 5C 02 08 67 5C 3A 40 28 67 67 75 CA 67 75 71 D8 77 D1 12 A0 F8 15 1A 00 57 12 A0 F8 15 1A 02 57 32 00 32 01 B7 97 57 26 F2 87 26 F2 87 26 F2 87 26 F1 87 57 26 F2 87 26 F1 87 26 F1 87 26 F1 87 57 26 F2 87 26 F2 87 26 F2 87 26 F2 87 57 26 F2 87 26 F1 87 26 F1 87 26 F2 87 57 26 F2 87 26 F2 87 26 F2 87 26 E3 87 57 26 F2 87 26 F1 87 26 F1 87 26 E3 87 57 67 6E 71 7C 77 89 57 67 6E 71 96 77 A3 57 67 6E 71 B0 77 BD 57 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
|
||||||
|
led 0 start
|
||||||
|
led auto on
|
||||||
|
|
||||||
|
led 1 stop
|
||||||
|
led 1 prog 02 01 60 F1 02 00 60 F2 06 E1 80 D2 21 71 10 E0 60 E1 E9 D2 10 75 18 81 61 E3 02 34 67 5C 02 30 67 5C 02 3C 67 5C 02 38 67 5C 02 24 67 5C 02 20 67 5C 02 2C 67 5C 02 28 67 5C 02 14 67 5C 02 10 67 5C 02 1C 67 5C 02 18 67 5C 02 04 67 5C 02 00 67 5C 02 0C 67 5C 02 08 67 5C 3A 40 28 67 67 75 CA 67 75 71 D8 77 D1 12 A0 F8 15 1A 00 57 12 A0 F8 15 1A 02 57 32 00 32 01 B7 97 57 26 F2 87 26 F2 87 26 F2 87 26 F1 87 57 26 F2 87 26 F1 87 26 F1 87 26 F1 87 57 26 F2 87 26 F2 87 26 F2 87 26 F2 87 57 26 F2 87 26 F1 87 26 F1 87 26 F2 87 57 26 F2 87 26 F2 87 26 F2 87 26 E3 87 57 26 F2 87 26 F1 87 26 F1 87 26 E3 87 57 67 6E 71 7C 77 89 57 67 6E 71 96 77 A3 57 67 6E 71 B0 77 BD 57 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
|
||||||
|
led 1 start
|
||||||
|
led auto on
|
||||||
|
|
||||||
|
led 2 stop
|
||||||
|
led 2 prog 02 01 60 F1 02 00 60 F2 06 E1 80 D2 21 71 10 E0 60 E1 E9 D2 10 75 18 81 61 E3 02 34 67 5C 02 30 67 5C 02 3C 67 5C 02 38 67 5C 02 24 67 5C 02 20 67 5C 02 2C 67 5C 02 28 67 5C 02 14 67 5C 02 10 67 5C 02 1C 67 5C 02 18 67 5C 02 04 67 5C 02 00 67 5C 02 0C 67 5C 02 08 67 5C 3A 40 28 67 67 75 CA 67 75 71 D8 77 D1 12 A0 F8 15 1A 00 57 12 A0 F8 15 1A 02 57 32 00 32 01 B7 97 57 26 F2 87 26 F2 87 26 F2 87 26 F1 87 57 26 F2 87 26 F1 87 26 F1 87 26 F1 87 57 26 F2 87 26 F2 87 26 F2 87 26 F2 87 57 26 F2 87 26 F1 87 26 F1 87 26 F2 87 57 26 F2 87 26 F2 87 26 F2 87 26 E3 87 57 26 F2 87 26 F1 87 26 F1 87 26 E3 87 57 67 6E 71 7C 77 89 57 67 6E 71 96 77 A3 57 67 6E 71 B0 77 BD 57 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
|
||||||
|
led 2 start
|
||||||
|
led auto on
|
||||||
|
|
||||||
|
led 3 stop
|
||||||
|
led 3 prog 02 01 60 F1 02 00 60 F2 06 E1 80 D2 21 71 10 E0 60 E1 E9 D2 10 75 18 81 61 E3 02 34 67 5C 02 30 67 5C 02 3C 67 5C 02 38 67 5C 02 24 67 5C 02 20 67 5C 02 2C 67 5C 02 28 67 5C 02 14 67 5C 02 10 67 5C 02 1C 67 5C 02 18 67 5C 02 04 67 5C 02 00 67 5C 02 0C 67 5C 02 08 67 5C 3A 40 28 67 67 75 CA 67 75 71 D8 77 D1 12 A0 F8 15 1A 00 57 12 A0 F8 15 1A 02 57 32 00 32 01 B7 97 57 26 F2 87 26 F2 87 26 F2 87 26 F1 87 57 26 F2 87 26 F1 87 26 F1 87 26 F1 87 57 26 F2 87 26 F2 87 26 F2 87 26 F2 87 57 26 F2 87 26 F1 87 26 F1 87 26 F2 87 57 26 F2 87 26 F2 87 26 F2 87 26 E3 87 57 26 F2 87 26 F1 87 26 F1 87 26 E3 87 57 67 6E 71 7C 77 89 57 67 6E 71 96 77 A3 57 67 6E 71 B0 77 BD 57 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
|
||||||
|
led 3 start
|
||||||
|
|
||||||
|
led auto on
|
||||||
|
|
||||||
|
linkscan spbm=all force=all interval=250000
|
63
device/ragile/x86_64-ragile_ra-b6910-64c-r0/minigraph.xml
Normal file
63
device/ragile/x86_64-ragile_ra-b6910-64c-r0/minigraph.xml
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
<DeviceMiniGraph xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="Microsoft.Search.Autopilot.Evolution">
|
||||||
|
<CpgDec>
|
||||||
|
</CpgDec>
|
||||||
|
<DpgDec>
|
||||||
|
<DeviceDataPlaneInfo>
|
||||||
|
<IPSecTunnels/>
|
||||||
|
<LoopbackIPInterfaces/>
|
||||||
|
<ManagementIPInterfaces xmlns:a="http://schemas.datacontract.org/2004/07/Microsoft.Search.Autopilot.Evolution">
|
||||||
|
</ManagementIPInterfaces>
|
||||||
|
<MplsInterfaces/>
|
||||||
|
<MplsTeInterfaces/>
|
||||||
|
<RsvpInterfaces/>
|
||||||
|
<Hostname>switch2</Hostname>
|
||||||
|
<PortChannelInterfaces/>
|
||||||
|
<VlanInterfaces/>
|
||||||
|
<IPInterfaces/>
|
||||||
|
<DataAcls/>
|
||||||
|
<AclInterfaces/>
|
||||||
|
<DownstreamSummaries/>
|
||||||
|
<DownstreamSummarySet xmlns:a="http://schemas.datacontract.org/2004/07/Microsoft.Search.Autopilot.Evolution"/>
|
||||||
|
</DeviceDataPlaneInfo>
|
||||||
|
</DpgDec>
|
||||||
|
<PngDec>
|
||||||
|
<Devices>
|
||||||
|
<Device i:type="LeafRouter">
|
||||||
|
<Hostname>switch2</Hostname>
|
||||||
|
<HwSku>RA-B6910-64C</HwSku>
|
||||||
|
</Device>
|
||||||
|
</Devices>
|
||||||
|
</PngDec>
|
||||||
|
<MetadataDeclaration>
|
||||||
|
<Devices xmlns:a="http://schemas.datacontract.org/2004/07/Microsoft.Search.Autopilot.Evolution">
|
||||||
|
<a:DeviceMetadata>
|
||||||
|
<a:Name>switch2</a:Name>
|
||||||
|
<a:Properties>
|
||||||
|
<a:DeviceProperty>
|
||||||
|
<a:Name>DhcpResources</a:Name>
|
||||||
|
<a:Reference i:nil="true"/>
|
||||||
|
<a:Value></a:Value>
|
||||||
|
</a:DeviceProperty>
|
||||||
|
<a:DeviceProperty>
|
||||||
|
<a:Name>NtpResources</a:Name>
|
||||||
|
<a:Reference i:nil="true"/>
|
||||||
|
<a:Value>0.debian.pool.ntp.org;1.debian.pool.ntp.org;2.debian.pool.ntp.org;3.debian.pool.ntp.org</a:Value>
|
||||||
|
</a:DeviceProperty>
|
||||||
|
<a:DeviceProperty>
|
||||||
|
<a:Name>SyslogResources</a:Name>
|
||||||
|
<a:Reference i:nil="true"/>
|
||||||
|
<a:Value></a:Value>
|
||||||
|
</a:DeviceProperty>
|
||||||
|
<a:DeviceProperty>
|
||||||
|
<a:Name>ErspanDestinationIpv4</a:Name>
|
||||||
|
<a:Reference i:nil="true"/>
|
||||||
|
<a:Value>2.2.2.2</a:Value>
|
||||||
|
</a:DeviceProperty>
|
||||||
|
</a:Properties>
|
||||||
|
</a:DeviceMetadata>
|
||||||
|
</Devices>
|
||||||
|
<Properties xmlns:a="http://schemas.datacontract.org/2004/07/Microsoft.Search.Autopilot.Evolution"/>
|
||||||
|
</MetadataDeclaration>
|
||||||
|
<Hostname>switch2</Hostname>
|
||||||
|
<HwSku>RA-B6910-64C</HwSku>
|
||||||
|
</DeviceMiniGraph>
|
223
device/ragile/x86_64-ragile_ra-b6910-64c-r0/monitor.py
Normal file
223
device/ragile/x86_64-ragile_ra-b6910-64c-r0/monitor.py
Normal file
@ -0,0 +1,223 @@
|
|||||||
|
#!/usr/bin/python
|
||||||
|
# -*- coding: UTF-8 -*-
|
||||||
|
# * onboard temperature sensors
|
||||||
|
# * FAN trays
|
||||||
|
# * PSU
|
||||||
|
#
|
||||||
|
import os
|
||||||
|
import xml.etree.ElementTree as ET
|
||||||
|
import glob
|
||||||
|
|
||||||
|
MAILBOX_DIR = "/sys/bus/i2c/devices/"
|
||||||
|
PORTS_DIR = "/sys/class/net/"
|
||||||
|
CONFIG_NAME = "dev.xml"
|
||||||
|
|
||||||
|
def getPMCreg(location):
|
||||||
|
retval = 'ERR'
|
||||||
|
if (not os.path.isfile(location)):
|
||||||
|
return "%s %s notfound"% (retval , location)
|
||||||
|
try:
|
||||||
|
with open(location, 'r') as fd:
|
||||||
|
retval = fd.read()
|
||||||
|
except Exception as error:
|
||||||
|
pass
|
||||||
|
|
||||||
|
retval = retval.rstrip('\r\n')
|
||||||
|
retval = retval.lstrip(" ")
|
||||||
|
return retval
|
||||||
|
|
||||||
|
# Get a mailbox register
|
||||||
|
def get_pmc_register(reg_name):
|
||||||
|
retval = 'ERR'
|
||||||
|
if reg_name[0:4] == "/rif" or reg_name[0:4] == "/ma1" or reg_name[0:4] == "/eth":
|
||||||
|
mb_reg_file = PORTS_DIR + reg_name
|
||||||
|
else:
|
||||||
|
mb_reg_file = MAILBOX_DIR + reg_name
|
||||||
|
filepath = glob.glob(mb_reg_file)
|
||||||
|
if(len(filepath) == 0):
|
||||||
|
return "%s %s notfound"% (retval , mb_reg_file)
|
||||||
|
# when multimatch use the first one
|
||||||
|
mb_reg_file = filepath[0]
|
||||||
|
if (not os.path.isfile(mb_reg_file)):
|
||||||
|
#print mb_reg_file, 'not found !'
|
||||||
|
return "%s %s notfound"% (retval , mb_reg_file)
|
||||||
|
try:
|
||||||
|
with open(mb_reg_file, 'r') as fd:
|
||||||
|
retval = fd.read()
|
||||||
|
except Exception as error:
|
||||||
|
pass
|
||||||
|
|
||||||
|
retval = retval.rstrip('\r\n')
|
||||||
|
retval = retval.lstrip(" ")
|
||||||
|
return retval
|
||||||
|
|
||||||
|
class checktype():
|
||||||
|
def __init__(self, test1):
|
||||||
|
self.test1 = test1
|
||||||
|
@staticmethod
|
||||||
|
def check(name,location, bit, value, tips , err1):
|
||||||
|
psu_status = int(get_pmc_register(location),16)
|
||||||
|
val = (psu_status & (1<< bit)) >> bit
|
||||||
|
if (val != value):
|
||||||
|
err1["errmsg"] = tips
|
||||||
|
err1["code"] = -1
|
||||||
|
return -1
|
||||||
|
else:
|
||||||
|
err1["errmsg"] = "none"
|
||||||
|
err1["code"] = 0
|
||||||
|
return 0
|
||||||
|
@staticmethod
|
||||||
|
def getValue(location, bit , type):
|
||||||
|
value_t = get_pmc_register(location)
|
||||||
|
if value_t.startswith("ERR") :
|
||||||
|
return value_t
|
||||||
|
if (type == 1):
|
||||||
|
return float(value_t)/1000
|
||||||
|
elif (type == 2):
|
||||||
|
return float(value_t)/100
|
||||||
|
elif (type == 3):
|
||||||
|
psu_status = int(value_t,16)
|
||||||
|
return (psu_status & (1<< bit)) >> bit
|
||||||
|
elif (type == 4):
|
||||||
|
return int(value_t,10)
|
||||||
|
elif (type == 5):
|
||||||
|
return float(value_t)/1000/1000
|
||||||
|
else:
|
||||||
|
return value_t;
|
||||||
|
#######temp
|
||||||
|
@staticmethod
|
||||||
|
def getTemp(self, name, location , ret_t):
|
||||||
|
ret2 = self.getValue(location + "temp1_input" ," " ,1);
|
||||||
|
ret3 = self.getValue(location + "temp1_max" ," ", 1);
|
||||||
|
ret4 = self.getValue(location + "temp1_max_hyst" ," ", 1);
|
||||||
|
ret_t["temp1_input"] = ret2
|
||||||
|
ret_t["temp1_max"] = ret3
|
||||||
|
ret_t["temp1_max_hyst"] = ret4
|
||||||
|
@staticmethod
|
||||||
|
def getLM75(name, location, result):
|
||||||
|
c1=checktype
|
||||||
|
r1={}
|
||||||
|
c1.getTemp(c1, name, location, r1)
|
||||||
|
result[name] = r1
|
||||||
|
##########PSU
|
||||||
|
|
||||||
|
|
||||||
|
class status():
|
||||||
|
def __init__(self, productname):
|
||||||
|
self.productname = productname
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def getETroot(filename):
|
||||||
|
tree = ET.parse(filename)
|
||||||
|
root = tree.getroot()
|
||||||
|
return root;
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def getDecodValue(collection, decode):
|
||||||
|
decodes = collection.find('decode')
|
||||||
|
testdecode = decodes.find(decode)
|
||||||
|
test={}
|
||||||
|
for neighbor in testdecode.iter('code'):
|
||||||
|
test[neighbor.attrib["key"]]=neighbor.attrib["value"]
|
||||||
|
return test
|
||||||
|
@staticmethod
|
||||||
|
def getfileValue(location):
|
||||||
|
return checktype.getValue(location," "," ")
|
||||||
|
@staticmethod
|
||||||
|
def getETValue(a, filename, tagname):
|
||||||
|
root = status.getETroot(filename)
|
||||||
|
for neighbor in root.iter(tagname):
|
||||||
|
prob_t = {}
|
||||||
|
prob_t = neighbor.attrib
|
||||||
|
prob_t['errcode']= 0
|
||||||
|
prob_t['errmsg'] = ''
|
||||||
|
for pros in neighbor.iter("property"):
|
||||||
|
ret = dict(neighbor.attrib.items() + pros.attrib.items())
|
||||||
|
if ('type' not in ret.keys()):
|
||||||
|
val = "0";
|
||||||
|
else:
|
||||||
|
val = ret["type"]
|
||||||
|
if ('bit' not in ret.keys()):
|
||||||
|
bit = "0";
|
||||||
|
else:
|
||||||
|
bit = ret["bit"]
|
||||||
|
s = checktype.getValue(ret["location"], int(bit),int(val))
|
||||||
|
if isinstance(s, str) and s.startswith("ERR"):
|
||||||
|
prob_t['errcode']= -1
|
||||||
|
prob_t['errmsg']= s
|
||||||
|
if ('default' in ret.keys()):
|
||||||
|
rt = status.getDecodValue(root,ret['decode'])
|
||||||
|
prob_t['errmsg']= rt[str(s)]
|
||||||
|
if str(s) != ret["default"]:
|
||||||
|
prob_t['errcode']= -1
|
||||||
|
break;
|
||||||
|
else:
|
||||||
|
if ('decode' in ret.keys()):
|
||||||
|
rt = status.getDecodValue(root,ret['decode'])
|
||||||
|
if(ret['decode'] == "psutype" and s.replace("\x00","").rstrip() not in rt.keys()):
|
||||||
|
prob_t['errcode']= -1
|
||||||
|
prob_t['errmsg'] = '%s'% ("Not supported PSU type")
|
||||||
|
else:
|
||||||
|
s = rt[str(s).replace("\x00","").rstrip()]
|
||||||
|
name = ret["name"]
|
||||||
|
prob_t[name]=str(s)
|
||||||
|
a.append(prob_t)
|
||||||
|
@staticmethod
|
||||||
|
def getCPUValue(a, filename, tagname):
|
||||||
|
root = status.getETroot(filename)
|
||||||
|
for neighbor in root.iter(tagname):
|
||||||
|
location = neighbor.attrib["location"]
|
||||||
|
L=[]
|
||||||
|
for dirpath, dirnames, filenames in os.walk(location):
|
||||||
|
for file in filenames :
|
||||||
|
if file.endswith("input"):
|
||||||
|
L.append(os.path.join(dirpath, file))
|
||||||
|
L =sorted(L,reverse=False)
|
||||||
|
for i in range(len(L)):
|
||||||
|
prob_t = {}
|
||||||
|
prob_t["name"] = getPMCreg("%s/temp%d_label"%(location,i+1))
|
||||||
|
prob_t["temp"] = float(getPMCreg("%s/temp%d_input"%(location,i+1)))/1000
|
||||||
|
prob_t["alarm"] = float(getPMCreg("%s/temp%d_crit_alarm"%(location,i+1)))/1000
|
||||||
|
prob_t["crit"] = float(getPMCreg("%s/temp%d_crit"%(location,i+1)))/1000
|
||||||
|
prob_t["max"] = float(getPMCreg("%s/temp%d_max"%(location,i+1)))/1000
|
||||||
|
a.append(prob_t)
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def getFileName():
|
||||||
|
return os.path.dirname(os.path.realpath(__file__)) + "/"+ CONFIG_NAME
|
||||||
|
@staticmethod
|
||||||
|
def getFan(ret):
|
||||||
|
_filename = status.getFileName()
|
||||||
|
_tagname = "fan"
|
||||||
|
status.getvalue(ret, _filename, _tagname)
|
||||||
|
@staticmethod
|
||||||
|
def checkFan(ret):
|
||||||
|
_filename = status.getFileName()
|
||||||
|
# _filename = "/usr/local/bin/" + status.getFileName()
|
||||||
|
_tagname = "fan"
|
||||||
|
status.getETValue(ret, _filename, _tagname)
|
||||||
|
@staticmethod
|
||||||
|
def getTemp(ret):
|
||||||
|
_filename = status.getFileName()
|
||||||
|
#_filename = "/usr/local/bin/" + status.getFileName()
|
||||||
|
_tagname = "temp"
|
||||||
|
status.getETValue(ret, _filename, _tagname)
|
||||||
|
@staticmethod
|
||||||
|
def getPsu(ret):
|
||||||
|
_filename = status.getFileName()
|
||||||
|
# _filename = "/usr/local/bin/" + status.getFileName()
|
||||||
|
_tagname = "psu"
|
||||||
|
status.getETValue(ret, _filename, _tagname)
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def getcputemp(ret):
|
||||||
|
_filename = status.getFileName()
|
||||||
|
_tagname = "cpus"
|
||||||
|
status.getCPUValue(ret, _filename, _tagname)
|
||||||
|
@staticmethod
|
||||||
|
def getMgmtRx(ret):
|
||||||
|
_filename = status.getFileName()
|
||||||
|
_tagname = "mgmt_rx"
|
||||||
|
status.getETValue(ret, _filename, _tagname)
|
||||||
|
|
||||||
|
|
429
device/ragile/x86_64-ragile_ra-b6910-64c-r0/pcie.yaml
Normal file
429
device/ragile/x86_64-ragile_ra-b6910-64c-r0/pcie.yaml
Normal file
@ -0,0 +1,429 @@
|
|||||||
|
- bus: '00'
|
||||||
|
dev: '00'
|
||||||
|
fn: '0'
|
||||||
|
id: 6f00
|
||||||
|
name: 'Host bridge: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon D DMI2
|
||||||
|
(rev 03)'
|
||||||
|
- bus: '00'
|
||||||
|
dev: '01'
|
||||||
|
fn: '0'
|
||||||
|
id: 6f02
|
||||||
|
name: 'PCI bridge: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon D PCI
|
||||||
|
Express Root Port 1 (rev 03)'
|
||||||
|
- bus: '00'
|
||||||
|
dev: '01'
|
||||||
|
fn: '1'
|
||||||
|
id: 6f03
|
||||||
|
name: 'PCI bridge: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon D PCI
|
||||||
|
Express Root Port 1 (rev 03)'
|
||||||
|
- bus: '00'
|
||||||
|
dev: '02'
|
||||||
|
fn: '0'
|
||||||
|
id: 6f04
|
||||||
|
name: 'PCI bridge: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon D PCI
|
||||||
|
Express Root Port 2 (rev 03)'
|
||||||
|
- bus: '00'
|
||||||
|
dev: '02'
|
||||||
|
fn: '2'
|
||||||
|
id: 6f06
|
||||||
|
name: 'PCI bridge: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon D PCI
|
||||||
|
Express Root Port 2 (rev 03)'
|
||||||
|
- bus: '00'
|
||||||
|
dev: '03'
|
||||||
|
fn: '0'
|
||||||
|
id: 6f08
|
||||||
|
name: 'PCI bridge: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon D PCI
|
||||||
|
Express Root Port 3 (rev 03)'
|
||||||
|
- bus: '00'
|
||||||
|
dev: '05'
|
||||||
|
fn: '0'
|
||||||
|
id: 6f28
|
||||||
|
name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
|
||||||
|
D Map/VTd_Misc/System Management (rev 03)'
|
||||||
|
- bus: '00'
|
||||||
|
dev: '05'
|
||||||
|
fn: '1'
|
||||||
|
id: 6f29
|
||||||
|
name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
|
||||||
|
D IIO Hot Plug (rev 03)'
|
||||||
|
- bus: '00'
|
||||||
|
dev: '05'
|
||||||
|
fn: '2'
|
||||||
|
id: 6f2a
|
||||||
|
name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
|
||||||
|
D IIO RAS/Control Status/Global Errors (rev 03)'
|
||||||
|
- bus: '00'
|
||||||
|
dev: '05'
|
||||||
|
fn: '4'
|
||||||
|
id: 6f2c
|
||||||
|
name: 'PIC: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon D I/O APIC (rev
|
||||||
|
03)'
|
||||||
|
- bus: '00'
|
||||||
|
dev: '14'
|
||||||
|
fn: '0'
|
||||||
|
id: 8c31
|
||||||
|
name: 'USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB
|
||||||
|
xHCI (rev 05)'
|
||||||
|
- bus: '00'
|
||||||
|
dev: '16'
|
||||||
|
fn: '0'
|
||||||
|
id: 8c3a
|
||||||
|
name: 'Communication controller: Intel Corporation 8 Series/C220 Series Chipset
|
||||||
|
Family MEI Controller #1 (rev 04)'
|
||||||
|
- bus: '00'
|
||||||
|
dev: '16'
|
||||||
|
fn: '1'
|
||||||
|
id: 8c3b
|
||||||
|
name: 'Communication controller: Intel Corporation 8 Series/C220 Series Chipset
|
||||||
|
Family MEI Controller #2 (rev 04)'
|
||||||
|
- bus: '00'
|
||||||
|
dev: 1c
|
||||||
|
fn: '0'
|
||||||
|
id: 8c10
|
||||||
|
name: 'PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express
|
||||||
|
Root Port #1 (rev d5)'
|
||||||
|
- bus: '00'
|
||||||
|
dev: 1d
|
||||||
|
fn: '0'
|
||||||
|
id: 8c26
|
||||||
|
name: 'USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB
|
||||||
|
EHCI #1 (rev 05)'
|
||||||
|
- bus: '00'
|
||||||
|
dev: 1f
|
||||||
|
fn: '0'
|
||||||
|
id: 8c54
|
||||||
|
name: 'ISA bridge: Intel Corporation C224 Series Chipset Family Server Standard
|
||||||
|
SKU LPC Controller (rev 05)'
|
||||||
|
- bus: '00'
|
||||||
|
dev: 1f
|
||||||
|
fn: '2'
|
||||||
|
id: 8c02
|
||||||
|
name: 'SATA controller: Intel Corporation 8 Series/C220 Series Chipset Family 6-port
|
||||||
|
SATA Controller 1 [AHCI mode] (rev 05)'
|
||||||
|
- bus: '00'
|
||||||
|
dev: 1f
|
||||||
|
fn: '3'
|
||||||
|
id: 8c22
|
||||||
|
name: 'SMBus: Intel Corporation 8 Series/C220 Series Chipset Family SMBus Controller
|
||||||
|
(rev 05)'
|
||||||
|
- bus: '01'
|
||||||
|
dev: '00'
|
||||||
|
fn: '0'
|
||||||
|
id: '1533'
|
||||||
|
name: 'Ethernet controller: Intel Corporation I210 Gigabit Network Connection (rev
|
||||||
|
03)'
|
||||||
|
- bus: '03'
|
||||||
|
dev: '00'
|
||||||
|
fn: '0'
|
||||||
|
id: 6f50
|
||||||
|
name: 'System peripheral: Intel Corporation Xeon Processor D Family QuickData Technology
|
||||||
|
Register DMA Channel 0'
|
||||||
|
- bus: '03'
|
||||||
|
dev: '00'
|
||||||
|
fn: '1'
|
||||||
|
id: 6f51
|
||||||
|
name: 'System peripheral: Intel Corporation Xeon Processor D Family QuickData Technology
|
||||||
|
Register DMA Channel 1'
|
||||||
|
- bus: '03'
|
||||||
|
dev: '00'
|
||||||
|
fn: '2'
|
||||||
|
id: 6f52
|
||||||
|
name: 'System peripheral: Intel Corporation Xeon Processor D Family QuickData Technology
|
||||||
|
Register DMA Channel 2'
|
||||||
|
- bus: '03'
|
||||||
|
dev: '00'
|
||||||
|
fn: '3'
|
||||||
|
id: 6f53
|
||||||
|
name: 'System peripheral: Intel Corporation Xeon Processor D Family QuickData Technology
|
||||||
|
Register DMA Channel 3'
|
||||||
|
- bus: '04'
|
||||||
|
dev: '00'
|
||||||
|
fn: '0'
|
||||||
|
id: 15ab
|
||||||
|
name: 'Ethernet controller: Intel Corporation Ethernet Connection X552 10 GbE Backplane'
|
||||||
|
- bus: '04'
|
||||||
|
dev: '00'
|
||||||
|
fn: '1'
|
||||||
|
id: 15ab
|
||||||
|
name: 'Ethernet controller: Intel Corporation Ethernet Connection X552 10 GbE Backplane'
|
||||||
|
- bus: '07'
|
||||||
|
dev: '00'
|
||||||
|
fn: '0'
|
||||||
|
id: b873
|
||||||
|
name: 'Ethernet controller: Broadcom Limited Device b873 (rev 01)'
|
||||||
|
- bus: ff
|
||||||
|
dev: 0b
|
||||||
|
fn: '0'
|
||||||
|
id: 6f81
|
||||||
|
name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
|
||||||
|
D R3 QPI Link 0/1 (rev 03)'
|
||||||
|
- bus: ff
|
||||||
|
dev: 0b
|
||||||
|
fn: '1'
|
||||||
|
id: 6f36
|
||||||
|
name: 'Performance counters: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
|
||||||
|
D R3 QPI Link 0/1 (rev 03)'
|
||||||
|
- bus: ff
|
||||||
|
dev: 0b
|
||||||
|
fn: '2'
|
||||||
|
id: 6f37
|
||||||
|
name: 'Performance counters: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
|
||||||
|
D R3 QPI Link 0/1 (rev 03)'
|
||||||
|
- bus: ff
|
||||||
|
dev: 0b
|
||||||
|
fn: '3'
|
||||||
|
id: 6f76
|
||||||
|
name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
|
||||||
|
D R3 QPI Link Debug (rev 03)'
|
||||||
|
- bus: ff
|
||||||
|
dev: 0c
|
||||||
|
fn: '0'
|
||||||
|
id: 6fe0
|
||||||
|
name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
|
||||||
|
D Caching Agent (rev 03)'
|
||||||
|
- bus: ff
|
||||||
|
dev: 0c
|
||||||
|
fn: '1'
|
||||||
|
id: 6fe1
|
||||||
|
name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
|
||||||
|
D Caching Agent (rev 03)'
|
||||||
|
- bus: ff
|
||||||
|
dev: 0c
|
||||||
|
fn: '2'
|
||||||
|
id: 6fe2
|
||||||
|
name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
|
||||||
|
D Caching Agent (rev 03)'
|
||||||
|
- bus: ff
|
||||||
|
dev: 0c
|
||||||
|
fn: '3'
|
||||||
|
id: 6fe3
|
||||||
|
name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
|
||||||
|
D Caching Agent (rev 03)'
|
||||||
|
- bus: ff
|
||||||
|
dev: 0f
|
||||||
|
fn: '0'
|
||||||
|
id: 6ff8
|
||||||
|
name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
|
||||||
|
D Caching Agent (rev 03)'
|
||||||
|
- bus: ff
|
||||||
|
dev: 0f
|
||||||
|
fn: '4'
|
||||||
|
id: 6ffc
|
||||||
|
name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
|
||||||
|
D Caching Agent (rev 03)'
|
||||||
|
- bus: ff
|
||||||
|
dev: 0f
|
||||||
|
fn: '5'
|
||||||
|
id: 6ffd
|
||||||
|
name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
|
||||||
|
D Caching Agent (rev 03)'
|
||||||
|
- bus: ff
|
||||||
|
dev: 0f
|
||||||
|
fn: '6'
|
||||||
|
id: 6ffe
|
||||||
|
name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
|
||||||
|
D Caching Agent (rev 03)'
|
||||||
|
- bus: ff
|
||||||
|
dev: '10'
|
||||||
|
fn: '0'
|
||||||
|
id: 6f1d
|
||||||
|
name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
|
||||||
|
D R2PCIe Agent (rev 03)'
|
||||||
|
- bus: ff
|
||||||
|
dev: '10'
|
||||||
|
fn: '1'
|
||||||
|
id: 6f34
|
||||||
|
name: 'Performance counters: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
|
||||||
|
D R2PCIe Agent (rev 03)'
|
||||||
|
- bus: ff
|
||||||
|
dev: '10'
|
||||||
|
fn: '5'
|
||||||
|
id: 6f1e
|
||||||
|
name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
|
||||||
|
D Ubox (rev 03)'
|
||||||
|
- bus: ff
|
||||||
|
dev: '10'
|
||||||
|
fn: '6'
|
||||||
|
id: 6f7d
|
||||||
|
name: 'Performance counters: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
|
||||||
|
D Ubox (rev 03)'
|
||||||
|
- bus: ff
|
||||||
|
dev: '10'
|
||||||
|
fn: '7'
|
||||||
|
id: 6f1f
|
||||||
|
name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
|
||||||
|
D Ubox (rev 03)'
|
||||||
|
- bus: ff
|
||||||
|
dev: '12'
|
||||||
|
fn: '0'
|
||||||
|
id: 6fa0
|
||||||
|
name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
|
||||||
|
D Home Agent 0 (rev 03)'
|
||||||
|
- bus: ff
|
||||||
|
dev: '12'
|
||||||
|
fn: '1'
|
||||||
|
id: 6f30
|
||||||
|
name: 'Performance counters: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
|
||||||
|
D Home Agent 0 (rev 03)'
|
||||||
|
- bus: ff
|
||||||
|
dev: '13'
|
||||||
|
fn: '0'
|
||||||
|
id: 6fa8
|
||||||
|
name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
|
||||||
|
D Memory Controller 0 - Target Address/Thermal/RAS (rev 03)'
|
||||||
|
- bus: ff
|
||||||
|
dev: '13'
|
||||||
|
fn: '1'
|
||||||
|
id: 6f71
|
||||||
|
name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
|
||||||
|
D Memory Controller 0 - Target Address/Thermal/RAS (rev 03)'
|
||||||
|
- bus: ff
|
||||||
|
dev: '13'
|
||||||
|
fn: '2'
|
||||||
|
id: 6faa
|
||||||
|
name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
|
||||||
|
D Memory Controller 0 - Channel Target Address Decoder (rev 03)'
|
||||||
|
- bus: ff
|
||||||
|
dev: '13'
|
||||||
|
fn: '3'
|
||||||
|
id: 6fab
|
||||||
|
name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
|
||||||
|
D Memory Controller 0 - Channel Target Address Decoder (rev 03)'
|
||||||
|
- bus: ff
|
||||||
|
dev: '13'
|
||||||
|
fn: '4'
|
||||||
|
id: 6fac
|
||||||
|
name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
|
||||||
|
D Memory Controller 0 - Channel Target Address Decoder (rev 03)'
|
||||||
|
- bus: ff
|
||||||
|
dev: '13'
|
||||||
|
fn: '5'
|
||||||
|
id: 6fad
|
||||||
|
name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
|
||||||
|
D Memory Controller 0 - Channel Target Address Decoder (rev 03)'
|
||||||
|
- bus: ff
|
||||||
|
dev: '13'
|
||||||
|
fn: '6'
|
||||||
|
id: 6fae
|
||||||
|
name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
|
||||||
|
D DDRIO Channel 0/1 Broadcast (rev 03)'
|
||||||
|
- bus: ff
|
||||||
|
dev: '13'
|
||||||
|
fn: '7'
|
||||||
|
id: 6faf
|
||||||
|
name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
|
||||||
|
D DDRIO Global Broadcast (rev 03)'
|
||||||
|
- bus: ff
|
||||||
|
dev: '14'
|
||||||
|
fn: '0'
|
||||||
|
id: 6fb0
|
||||||
|
name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
|
||||||
|
D Memory Controller 0 - Channel 0 Thermal Control (rev 03)'
|
||||||
|
- bus: ff
|
||||||
|
dev: '14'
|
||||||
|
fn: '1'
|
||||||
|
id: 6fb1
|
||||||
|
name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
|
||||||
|
D Memory Controller 0 - Channel 1 Thermal Control (rev 03)'
|
||||||
|
- bus: ff
|
||||||
|
dev: '14'
|
||||||
|
fn: '2'
|
||||||
|
id: 6fb2
|
||||||
|
name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
|
||||||
|
D Memory Controller 0 - Channel 0 Error (rev 03)'
|
||||||
|
- bus: ff
|
||||||
|
dev: '14'
|
||||||
|
fn: '3'
|
||||||
|
id: 6fb3
|
||||||
|
name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
|
||||||
|
D Memory Controller 0 - Channel 1 Error (rev 03)'
|
||||||
|
- bus: ff
|
||||||
|
dev: '14'
|
||||||
|
fn: '4'
|
||||||
|
id: 6fbc
|
||||||
|
name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
|
||||||
|
D DDRIO Channel 0/1 Interface (rev 03)'
|
||||||
|
- bus: ff
|
||||||
|
dev: '14'
|
||||||
|
fn: '5'
|
||||||
|
id: 6fbd
|
||||||
|
name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
|
||||||
|
D DDRIO Channel 0/1 Interface (rev 03)'
|
||||||
|
- bus: ff
|
||||||
|
dev: '14'
|
||||||
|
fn: '6'
|
||||||
|
id: 6fbe
|
||||||
|
name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
|
||||||
|
D DDRIO Channel 0/1 Interface (rev 03)'
|
||||||
|
- bus: ff
|
||||||
|
dev: '14'
|
||||||
|
fn: '7'
|
||||||
|
id: 6fbf
|
||||||
|
name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
|
||||||
|
D DDRIO Channel 0/1 Interface (rev 03)'
|
||||||
|
- bus: ff
|
||||||
|
dev: '15'
|
||||||
|
fn: '0'
|
||||||
|
id: 6fb4
|
||||||
|
name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
|
||||||
|
D Memory Controller 0 - Channel 2 Thermal Control (rev 03)'
|
||||||
|
- bus: ff
|
||||||
|
dev: '15'
|
||||||
|
fn: '1'
|
||||||
|
id: 6fb5
|
||||||
|
name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
|
||||||
|
D Memory Controller 0 - Channel 3 Thermal Control (rev 03)'
|
||||||
|
- bus: ff
|
||||||
|
dev: '15'
|
||||||
|
fn: '2'
|
||||||
|
id: 6fb6
|
||||||
|
name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
|
||||||
|
D Memory Controller 0 - Channel 2 Error (rev 03)'
|
||||||
|
- bus: ff
|
||||||
|
dev: '15'
|
||||||
|
fn: '3'
|
||||||
|
id: 6fb7
|
||||||
|
name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
|
||||||
|
D Memory Controller 0 - Channel 3 Error (rev 03)'
|
||||||
|
- bus: ff
|
||||||
|
dev: 1e
|
||||||
|
fn: '0'
|
||||||
|
id: 6f98
|
||||||
|
name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
|
||||||
|
D Power Control Unit (rev 03)'
|
||||||
|
- bus: ff
|
||||||
|
dev: 1e
|
||||||
|
fn: '1'
|
||||||
|
id: 6f99
|
||||||
|
name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
|
||||||
|
D Power Control Unit (rev 03)'
|
||||||
|
- bus: ff
|
||||||
|
dev: 1e
|
||||||
|
fn: '2'
|
||||||
|
id: 6f9a
|
||||||
|
name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
|
||||||
|
D Power Control Unit (rev 03)'
|
||||||
|
- bus: ff
|
||||||
|
dev: 1e
|
||||||
|
fn: '3'
|
||||||
|
id: 6fc0
|
||||||
|
name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
|
||||||
|
D Power Control Unit (rev 03)'
|
||||||
|
- bus: ff
|
||||||
|
dev: 1e
|
||||||
|
fn: '4'
|
||||||
|
id: 6f9c
|
||||||
|
name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
|
||||||
|
D Power Control Unit (rev 03)'
|
||||||
|
- bus: ff
|
||||||
|
dev: 1f
|
||||||
|
fn: '0'
|
||||||
|
id: 6f88
|
||||||
|
name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
|
||||||
|
D Power Control Unit (rev 03)'
|
||||||
|
- bus: ff
|
||||||
|
dev: 1f
|
||||||
|
fn: '2'
|
||||||
|
id: 6f8a
|
||||||
|
name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
|
||||||
|
D Power Control Unit (rev 03)'
|
@ -0,0 +1,67 @@
|
|||||||
|
{
|
||||||
|
"XCVR": {
|
||||||
|
"xcvr_present": {
|
||||||
|
"i2c": {
|
||||||
|
"valmap-SFP28": {
|
||||||
|
"1": true,
|
||||||
|
"0": false
|
||||||
|
},
|
||||||
|
"valmap-QSFP28": {
|
||||||
|
"1": true,
|
||||||
|
"0": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
"PSU": {
|
||||||
|
"psu_present": {
|
||||||
|
"i2c": {
|
||||||
|
"valmap": {
|
||||||
|
"1": true,
|
||||||
|
"0": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
"psu_power_good": {
|
||||||
|
"i2c": {
|
||||||
|
"valmap": {
|
||||||
|
"1": true,
|
||||||
|
"0": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
"psu_fan_dir": {
|
||||||
|
"i2c": {
|
||||||
|
"valmap": {
|
||||||
|
"F2B": "EXHAUST",
|
||||||
|
"B2F": "INTAKE"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"PSU_FAN_MAX_SPEED": "18000"
|
||||||
|
},
|
||||||
|
|
||||||
|
"FAN": {
|
||||||
|
"direction": {
|
||||||
|
"i2c": {
|
||||||
|
"valmap": {
|
||||||
|
"1": "INTAKE",
|
||||||
|
"0": "EXHAUST"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"present": {
|
||||||
|
"i2c": {
|
||||||
|
"valmap": {
|
||||||
|
"1": true,
|
||||||
|
"0": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"duty_cycle_to_pwm": "lambda dc: dc*255/100",
|
||||||
|
"pwm_to_duty_cycle": "lambda pwm: pwm*100/255"
|
||||||
|
}
|
||||||
|
}
|
7012
device/ragile/x86_64-ragile_ra-b6910-64c-r0/pddf/pddf-device.json
Normal file
7012
device/ragile/x86_64-ragile_ra-b6910-64c-r0/pddf/pddf-device.json
Normal file
File diff suppressed because it is too large
Load Diff
25
device/ragile/x86_64-ragile_ra-b6910-64c-r0/plugins/eeprom.py
Executable file
25
device/ragile/x86_64-ragile_ra-b6910-64c-r0/plugins/eeprom.py
Executable file
@ -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)
|
199
device/ragile/x86_64-ragile_ra-b6910-64c-r0/plugins/fanutil.py
Executable file
199
device/ragile/x86_64-ragile_ra-b6910-64c-r0/plugins/fanutil.py
Executable file
@ -0,0 +1,199 @@
|
|||||||
|
# Sample pddf_fanutil file
|
||||||
|
# All the supported FAN SysFS aattributes are
|
||||||
|
#- fan<idx>_present
|
||||||
|
#- fan<idx>_direction
|
||||||
|
#- fan<idx>_input
|
||||||
|
#- fan<idx>_pwm
|
||||||
|
#- fan<idx>_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
|
59
device/ragile/x86_64-ragile_ra-b6910-64c-r0/plugins/ledutil.py
Executable file
59
device/ragile/x86_64-ragile_ra-b6910-64c-r0/plugins/ledutil.py
Executable file
@ -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)
|
270
device/ragile/x86_64-ragile_ra-b6910-64c-r0/plugins/psuutil.py
Executable file
270
device/ragile/x86_64-ragile_ra-b6910-64c-r0/plugins/psuutil.py
Executable file
@ -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')
|
236
device/ragile/x86_64-ragile_ra-b6910-64c-r0/plugins/sfputil.py
Executable file
236
device/ragile/x86_64-ragile_ra-b6910-64c-r0/plugins/sfputil.py
Executable file
@ -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')
|
82
device/ragile/x86_64-ragile_ra-b6910-64c-r0/plugins/sysstatutil.py
Executable file
82
device/ragile/x86_64-ragile_ra-b6910-64c-r0/plugins/sysstatutil.py
Executable file
@ -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')
|
75
device/ragile/x86_64-ragile_ra-b6910-64c-r0/plugins/thermalutil.py
Executable file
75
device/ragile/x86_64-ragile_ra-b6910-64c-r0/plugins/thermalutil.py
Executable file
@ -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')
|
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"skip_ledd": true,
|
||||||
|
"skip_xcvrd": false,
|
||||||
|
"skip_psud": false
|
||||||
|
}
|
21
device/ragile/x86_64-ragile_ra-b6910-64c-r0/sensors.conf
Normal file
21
device/ragile/x86_64-ragile_ra-b6910-64c-r0/sensors.conf
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
# libsensors configuration file
|
||||||
|
# ----------------------------------------------
|
||||||
|
#
|
||||||
|
|
||||||
|
bus "i2c-2" "i2c-0-mux (chan_id 0)"
|
||||||
|
|
||||||
|
chip "lm75-i2c-2-48"
|
||||||
|
label temp1 "LM75_0 air_inlet"
|
||||||
|
set temp1_max 80
|
||||||
|
set temp1_max_hyst 75
|
||||||
|
|
||||||
|
chip "lm75-i2c-2-49"
|
||||||
|
label temp1 "LM75_1 air_outlet"
|
||||||
|
set temp1_max 80
|
||||||
|
set temp1_max_hyst 75
|
||||||
|
|
||||||
|
chip "lm75-i2c-2-4a"
|
||||||
|
label temp1 "LM75_2 hottest"
|
||||||
|
set temp1_max 80
|
||||||
|
set temp1_max_hyst 75
|
||||||
|
|
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"eeprom": {"bus": 2, "loc": "0057"}
|
||||||
|
}
|
@ -0,0 +1,60 @@
|
|||||||
|
{
|
||||||
|
"components": [
|
||||||
|
{
|
||||||
|
"name": "CPLD1 (MAC Board A)",
|
||||||
|
"firmware_version": {
|
||||||
|
"bus": 2,
|
||||||
|
"addr": 51,
|
||||||
|
"offset": 0,
|
||||||
|
"size": 4,
|
||||||
|
"way": 1,
|
||||||
|
"format": 7,
|
||||||
|
"sep": "/"
|
||||||
|
},
|
||||||
|
"desc": "Used for managing IO modules, SFP+ modules and system LEDs",
|
||||||
|
"slot": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "CPLD2 (MAC Board B)",
|
||||||
|
"firmware_version": {
|
||||||
|
"bus": 2,
|
||||||
|
"addr": 53,
|
||||||
|
"offset": 0,
|
||||||
|
"size": 4,
|
||||||
|
"way": 1,
|
||||||
|
"format": 7,
|
||||||
|
"sep": "/"
|
||||||
|
},
|
||||||
|
"desc": "Used for managing IO modules, SFP+ modules and system LEDs",
|
||||||
|
"slot": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "CPLD3 (CONNECT Board A)",
|
||||||
|
"firmware_version": {
|
||||||
|
"bus": 2,
|
||||||
|
"addr": 55,
|
||||||
|
"offset": 0,
|
||||||
|
"size": 4,
|
||||||
|
"way": 1,
|
||||||
|
"format": 7,
|
||||||
|
"sep": "/"
|
||||||
|
},
|
||||||
|
"desc": "Used for managing IO modules, SFP+ modules and system LEDs",
|
||||||
|
"slot": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "CPLD4 (CPU Board)",
|
||||||
|
"firmware_version": {
|
||||||
|
"bus": 0,
|
||||||
|
"addr": 13,
|
||||||
|
"offset": 0,
|
||||||
|
"size": 4,
|
||||||
|
"way": 1,
|
||||||
|
"format": 7,
|
||||||
|
"sep": "/"
|
||||||
|
},
|
||||||
|
"desc": "Used for managing IO modules, SFP+ modules and system LEDs",
|
||||||
|
"slot": 1
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
@ -0,0 +1,152 @@
|
|||||||
|
{
|
||||||
|
"fans": [
|
||||||
|
{
|
||||||
|
"name": "fan1",
|
||||||
|
"e2loc": {"bus": 3, "addr": 83, "way": "i2c", "size": "256"},
|
||||||
|
"present": {
|
||||||
|
"loc": "/sys/bus/i2c/devices/2-0037/fan_present",
|
||||||
|
"format": 2,
|
||||||
|
"bit": 0
|
||||||
|
},
|
||||||
|
"status": {
|
||||||
|
"loc": "/sys/bus/i2c/devices/2-0037/fan_status",
|
||||||
|
"format": 2,
|
||||||
|
"bit": 0
|
||||||
|
},
|
||||||
|
"hw_version": {"loc": "/sys/bus/i2c/devices/3-0053/fan_hw_version"},
|
||||||
|
"sn": {"loc": "/sys/bus/i2c/devices/3-0053/fan_sn"},
|
||||||
|
"led": {
|
||||||
|
"loc": "/sys/bus/i2c/devices/0-0032/fan0_led",
|
||||||
|
"format": 6,
|
||||||
|
"mask": 11
|
||||||
|
},
|
||||||
|
"led_colors": {
|
||||||
|
"green": 9,
|
||||||
|
"red": 10,
|
||||||
|
"amber": 3
|
||||||
|
},
|
||||||
|
"rotors": [
|
||||||
|
{
|
||||||
|
"speed_getter": {
|
||||||
|
"loc": "/sys/bus/i2c/devices/2-0037/hwmon/*/fan1_input"
|
||||||
|
},
|
||||||
|
"speed_setter": {
|
||||||
|
"loc": "/sys/bus/i2c/devices/0-0032/fan_speed_set"
|
||||||
|
},
|
||||||
|
"speed_max": 23000
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "fan2",
|
||||||
|
"e2loc": {"bus": 4, "addr": 83, "way": "i2c", "size": "256"},
|
||||||
|
"present": {
|
||||||
|
"loc": "/sys/bus/i2c/devices/2-0037/fan_present",
|
||||||
|
"format": 2,
|
||||||
|
"bit": 1
|
||||||
|
},
|
||||||
|
"status": {
|
||||||
|
"loc": "/sys/bus/i2c/devices/2-0037/fan_status",
|
||||||
|
"format": 2,
|
||||||
|
"bit": 1
|
||||||
|
},
|
||||||
|
"hw_version": {"loc": "/sys/bus/i2c/devices/4-0053/fan_hw_version"},
|
||||||
|
"sn": {"loc": "/sys/bus/i2c/devices/4-0053/fan_sn"},
|
||||||
|
"led": {
|
||||||
|
"loc": "/sys/bus/i2c/devices/0-0032/fan1_led",
|
||||||
|
"format": 6,
|
||||||
|
"mask": 11
|
||||||
|
},
|
||||||
|
"led_colors": {
|
||||||
|
"green": 9,
|
||||||
|
"red": 10,
|
||||||
|
"amber": 3
|
||||||
|
},
|
||||||
|
"rotors": [
|
||||||
|
{
|
||||||
|
"speed_getter": {
|
||||||
|
"loc": "/sys/bus/i2c/devices/2-0037/hwmon/*/fan2_input"
|
||||||
|
},
|
||||||
|
"speed_setter": {
|
||||||
|
"loc": "/sys/bus/i2c/devices/0-0032/fan_speed_set"
|
||||||
|
},
|
||||||
|
"speed_max": 23000
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "fan3",
|
||||||
|
"e2loc": {"bus": 3, "addr": 83, "way": "i2c", "size": "256"},
|
||||||
|
"present": {
|
||||||
|
"loc": "/sys/bus/i2c/devices/2-0037/fan_present",
|
||||||
|
"format": 2,
|
||||||
|
"bit": 2
|
||||||
|
},
|
||||||
|
"status": {
|
||||||
|
"loc": "/sys/bus/i2c/devices/2-0037/fan_status",
|
||||||
|
"format": 2,
|
||||||
|
"bit": 2
|
||||||
|
},
|
||||||
|
"hw_version": {"loc": "/sys/bus/i2c/devices/5-0053/fan_hw_version"},
|
||||||
|
"sn": {"loc": "/sys/bus/i2c/devices/5-0053/fan_sn"},
|
||||||
|
"led": {
|
||||||
|
"loc": "/sys/bus/i2c/devices/0-0032/fan2_led",
|
||||||
|
"format": 6,
|
||||||
|
"mask": 11
|
||||||
|
},
|
||||||
|
"led_colors": {
|
||||||
|
"green": 9,
|
||||||
|
"red": 10,
|
||||||
|
"amber": 3
|
||||||
|
},
|
||||||
|
"rotors": [
|
||||||
|
{
|
||||||
|
"speed_getter": {
|
||||||
|
"loc": "/sys/bus/i2c/devices/2-0037/hwmon/*/fan3_input"
|
||||||
|
},
|
||||||
|
"speed_setter": {
|
||||||
|
"loc": "/sys/bus/i2c/devices/0-0032/fan_speed_set"
|
||||||
|
},
|
||||||
|
"speed_max": 23000
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "fan4",
|
||||||
|
"e2loc": {"bus": 3, "addr": 83, "way": "i2c", "size": "256"},
|
||||||
|
"present": {
|
||||||
|
"loc": "/sys/bus/i2c/devices/2-0037/fan_present",
|
||||||
|
"format": 2,
|
||||||
|
"bit": 3
|
||||||
|
},
|
||||||
|
"status": {
|
||||||
|
"loc": "/sys/bus/i2c/devices/2-0037/fan_status",
|
||||||
|
"format": 2,
|
||||||
|
"bit": 3
|
||||||
|
},
|
||||||
|
"hw_version": {"loc": "/sys/bus/i2c/devices/6-0053/fan_hw_version"},
|
||||||
|
"sn": {"loc": "/sys/bus/i2c/devices/6-0053/fan_sn"},
|
||||||
|
"led": {
|
||||||
|
"loc": "/sys/bus/i2c/devices/0-0032/fan3_led",
|
||||||
|
"format": 6,
|
||||||
|
"mask": 11
|
||||||
|
},
|
||||||
|
"led_colors":{
|
||||||
|
"green": 9,
|
||||||
|
"red": 10,
|
||||||
|
"amber": 3
|
||||||
|
},
|
||||||
|
"rotors": [
|
||||||
|
{
|
||||||
|
"speed_getter": {
|
||||||
|
"loc": "/sys/bus/i2c/devices/2-0037/hwmon/*/fan4_input"
|
||||||
|
},
|
||||||
|
"speed_setter": {
|
||||||
|
"loc": "/sys/bus/i2c/devices/0-0032/fan_speed_set"
|
||||||
|
},
|
||||||
|
"speed_max": 23000
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
@ -0,0 +1,134 @@
|
|||||||
|
{
|
||||||
|
"psus": [
|
||||||
|
{
|
||||||
|
"name": "psu1",
|
||||||
|
"present": {
|
||||||
|
"loc": "/sys/bus/i2c/devices/2-0037/psu_status",
|
||||||
|
"format": 2,
|
||||||
|
"bit": 0
|
||||||
|
},
|
||||||
|
"status": {
|
||||||
|
"loc": "/sys/bus/i2c/devices/2-0037/psu_status",
|
||||||
|
"format": 2,
|
||||||
|
"bit": 1
|
||||||
|
},
|
||||||
|
"sn": {"loc": "/sys/bus/i2c/devices/7-0050/psu_sn"},
|
||||||
|
"in_current": {
|
||||||
|
"loc": "/sys/bus/i2c/devices/7-0058/hwmon/*/curr1_input",
|
||||||
|
"format": 4
|
||||||
|
},
|
||||||
|
"in_voltage": {
|
||||||
|
"loc": "/sys/bus/i2c/devices/7-0058/hwmon/*/in1_input",
|
||||||
|
"format": 4
|
||||||
|
},
|
||||||
|
"out_voltage": {
|
||||||
|
"loc": "/sys/bus/i2c/devices/7-0058/hwmon/*/in2_input",
|
||||||
|
"format": 4
|
||||||
|
},
|
||||||
|
"out_current": {
|
||||||
|
"loc": "/sys/bus/i2c/devices/7-0058/hwmon/*/curr2_input",
|
||||||
|
"format": 4
|
||||||
|
},
|
||||||
|
"temperature": {
|
||||||
|
"loc": "/sys/bus/i2c/devices/7-0058/hwmon/*/temp1_input",
|
||||||
|
"format": 4
|
||||||
|
},
|
||||||
|
"hw_version": {"loc": "/sys/bus/i2c/devices/7-0050/psu_hw"},
|
||||||
|
"psu_type": {"loc": "/sys/bus/i2c/devices/7-0050/psu_type"},
|
||||||
|
"fans": [
|
||||||
|
{
|
||||||
|
"name": "psu_fan1",
|
||||||
|
"present": {
|
||||||
|
"loc": "/sys/bus/i2c/devices/7-0058/hwmon/*/fan1_fault"
|
||||||
|
},
|
||||||
|
"status": {
|
||||||
|
"loc": "/sys/bus/i2c/devices/2-0037/psu_status",
|
||||||
|
"format": 2,
|
||||||
|
"bit": 1
|
||||||
|
},
|
||||||
|
"rotors": [
|
||||||
|
{
|
||||||
|
"speed_getter": {
|
||||||
|
"loc": "/sys/bus/i2c/devices/7-0058/hwmon/*/fan1_input"
|
||||||
|
},
|
||||||
|
"speed_max": 28000
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"in_power": {
|
||||||
|
"loc": "/sys/bus/i2c/devices/7-0058/hwmon/*/power1_input",
|
||||||
|
"format": 5
|
||||||
|
},
|
||||||
|
"out_power": {
|
||||||
|
"loc": "/sys/bus/i2c/devices/7-0058/hwmon/*/power2_input",
|
||||||
|
"format": 5
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "psu2",
|
||||||
|
"present": {
|
||||||
|
"loc": "/sys/bus/i2c/devices/2-0037/psu_status",
|
||||||
|
"format": 2,
|
||||||
|
"bit": 4
|
||||||
|
},
|
||||||
|
"status": {
|
||||||
|
"loc": "/sys/bus/i2c/devices/2-0037/psu_status",
|
||||||
|
"format": 2,
|
||||||
|
"bit": 5
|
||||||
|
},
|
||||||
|
"sn": {"loc": "/sys/bus/i2c/devices/8-0053/psu_sn"},
|
||||||
|
"in_current": {
|
||||||
|
"loc": "/sys/bus/i2c/devices/8-005b/hwmon/*/curr1_input",
|
||||||
|
"format": 4
|
||||||
|
},
|
||||||
|
"in_voltage": {
|
||||||
|
"loc": "/sys/bus/i2c/devices/8-005b/hwmon/*/in1_input",
|
||||||
|
"format": 4
|
||||||
|
},
|
||||||
|
"out_voltage": {
|
||||||
|
"loc": "/sys/bus/i2c/devices/8-005b/hwmon/*/in2_input",
|
||||||
|
"format": 4
|
||||||
|
},
|
||||||
|
"out_current": {
|
||||||
|
"loc": "/sys/bus/i2c/devices/8-005b/hwmon/*/curr2_input",
|
||||||
|
"format": 4
|
||||||
|
},
|
||||||
|
"temperature": {
|
||||||
|
"loc": "/sys/bus/i2c/devices/8-005b/hwmon/*/temp1_input",
|
||||||
|
"format": 4
|
||||||
|
},
|
||||||
|
"hw_version": {"loc": "/sys/bus/i2c/devices/8-0053/psu_hw"},
|
||||||
|
"psu_type": {"loc": "/sys/bus/i2c/devices/8-0053/psu_type"},
|
||||||
|
"fans": [
|
||||||
|
{
|
||||||
|
"name": "psu_fan1",
|
||||||
|
"present": {
|
||||||
|
"loc": "/sys/bus/i2c/devices/8-005b/hwmon/*/fan1_fault"
|
||||||
|
},
|
||||||
|
"status": {
|
||||||
|
"loc": "/sys/bus/i2c/devices/2-0037/psu_status",
|
||||||
|
"format": 2,
|
||||||
|
"bit": 5
|
||||||
|
},
|
||||||
|
"rotors": [
|
||||||
|
{
|
||||||
|
"speed_getter": {
|
||||||
|
"loc": "/sys/bus/i2c/devices/8-005b/hwmon/*/fan1_input"
|
||||||
|
},
|
||||||
|
"speed_max": 28000
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"in_power": {
|
||||||
|
"loc": "/sys/bus/i2c/devices/8-005b/hwmon/*/power1_input",
|
||||||
|
"format": 5
|
||||||
|
},
|
||||||
|
"out_power": {
|
||||||
|
"loc": "/sys/bus/i2c/devices/8-005b/hwmon/*/power2_input",
|
||||||
|
"format": 5
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
@ -0,0 +1,130 @@
|
|||||||
|
{"thermals": [
|
||||||
|
{
|
||||||
|
"name": "INLET TEMP",
|
||||||
|
"high": {
|
||||||
|
"loc": "/sys/bus/i2c/devices/2-0048/hwmon/*/temp1_max",
|
||||||
|
"format": 4
|
||||||
|
},
|
||||||
|
"low": null,
|
||||||
|
"crit_low": null,
|
||||||
|
"crit_high": null,
|
||||||
|
"temperature": {
|
||||||
|
"loc": "/sys/bus/i2c/devices/2-0048/hwmon/*/temp1_input",
|
||||||
|
"format": 4
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "OUTLET TEMP",
|
||||||
|
"high": {
|
||||||
|
"loc": "/sys/bus/i2c/devices/2-0049/hwmon/*/temp1_max",
|
||||||
|
"format": 4
|
||||||
|
},
|
||||||
|
"low": null,
|
||||||
|
"crit_low": null,
|
||||||
|
"crit_high": null,
|
||||||
|
"temperature": {
|
||||||
|
"loc": "/sys/bus/i2c/devices/2-0049/hwmon/*/temp1_input",
|
||||||
|
"format": 4
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "BOARD TEMP",
|
||||||
|
"high": {
|
||||||
|
"loc": "/sys/bus/i2c/devices/2-004a/hwmon/*/temp1_max",
|
||||||
|
"format": 4
|
||||||
|
},
|
||||||
|
"low": null,
|
||||||
|
"crit_low": null,
|
||||||
|
"crit_high": null,
|
||||||
|
"temperature": {
|
||||||
|
"loc": "/sys/bus/i2c/devices/2-004a/hwmon/*/temp1_input",
|
||||||
|
"format": 4
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "PHYSICAL ID 0",
|
||||||
|
"high": {
|
||||||
|
"loc": "/sys/class/hwmon/hwmon0/temp1_max",
|
||||||
|
"format": 4
|
||||||
|
},
|
||||||
|
"low": null,
|
||||||
|
"crit_low": null,
|
||||||
|
"crit_high": {
|
||||||
|
"loc": "/sys/class/hwmon/hwmon0/temp1_crit",
|
||||||
|
"format": 4
|
||||||
|
},
|
||||||
|
"temperature": {
|
||||||
|
"loc": "/sys/class/hwmon/hwmon0/temp1_input",
|
||||||
|
"format": 4
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "CPU CORE 0",
|
||||||
|
"high": {
|
||||||
|
"loc": "/sys/class/hwmon/hwmon0/temp2_max",
|
||||||
|
"format": 4
|
||||||
|
},
|
||||||
|
"low": null,
|
||||||
|
"crit_low": null,
|
||||||
|
"crit_high": {
|
||||||
|
"loc": "/sys/class/hwmon/hwmon0/temp2_crit",
|
||||||
|
"format": 4
|
||||||
|
},
|
||||||
|
"temperature": {
|
||||||
|
"loc": "/sys/class/hwmon/hwmon0/temp2_input",
|
||||||
|
"format": 4
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "CPU CORE 1",
|
||||||
|
"high": {
|
||||||
|
"loc": "/sys/class/hwmon/hwmon0/temp3_max",
|
||||||
|
"format": 4
|
||||||
|
},
|
||||||
|
"low": null,
|
||||||
|
"crit_low": null,
|
||||||
|
"crit_high": {
|
||||||
|
"loc": "/sys/class/hwmon/hwmon0/temp3_crit",
|
||||||
|
"format": 4
|
||||||
|
},
|
||||||
|
"temperature": {
|
||||||
|
"loc": "/sys/class/hwmon/hwmon0/temp3_input",
|
||||||
|
"format": 4
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "CPU CORE 2",
|
||||||
|
"high": {
|
||||||
|
"loc": "/sys/class/hwmon/hwmon0/temp4_max",
|
||||||
|
"format": 4
|
||||||
|
},
|
||||||
|
"low": null,
|
||||||
|
"crit_low": null,
|
||||||
|
"crit_high": {
|
||||||
|
"loc": "/sys/class/hwmon/hwmon0/temp4_crit",
|
||||||
|
"format": 4
|
||||||
|
},
|
||||||
|
"temperature": {
|
||||||
|
"loc": "/sys/class/hwmon/hwmon0/temp4_input",
|
||||||
|
"format": 4
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "CPU CORE 3",
|
||||||
|
"high": {
|
||||||
|
"loc": "/sys/class/hwmon/hwmon0/temp5_max",
|
||||||
|
"format": 4
|
||||||
|
},
|
||||||
|
"low": null,
|
||||||
|
"crit_low": null,
|
||||||
|
"crit_high": {
|
||||||
|
"loc": "/sys/class/hwmon/hwmon0/temp5_crit",
|
||||||
|
"format": 4
|
||||||
|
},
|
||||||
|
"temperature": {
|
||||||
|
"loc": "/sys/class/hwmon/hwmon0/temp5_input",
|
||||||
|
"format": 4
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
43
device/ragile/x86_64-ragile_ra-b6910-64c-r0/systest.py
Normal file
43
device/ragile/x86_64-ragile_ra-b6910-64c-r0/systest.py
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
#!/usr/bin/python3
|
||||||
|
# -*- coding: UTF-8 -*-
|
||||||
|
"""
|
||||||
|
* onboard temperature sensors
|
||||||
|
* FAN trays
|
||||||
|
* PSU
|
||||||
|
"""
|
||||||
|
import time
|
||||||
|
import datetime
|
||||||
|
from monitor import status
|
||||||
|
|
||||||
|
def doWork():
|
||||||
|
a=[];
|
||||||
|
'''
|
||||||
|
return: [{'status': '1', 'hw_version': '1.00', 'errcode': 0, 'fan_type': 'M6510-FAN-F', 'errmsg': 'OK', 'Speed': '9778', 'id': 'fan1', 'present': '0', 'sn': '1000000000014'},
|
||||||
|
{'id': 'fan2', 'errmsg': 'not present', 'errcode': -1},
|
||||||
|
{'id': 'fan3', 'errmsg': 'not present', 'errcode': -1},
|
||||||
|
{'id': 'fan4', 'errmsg': 'not present', 'errcode': -1}
|
||||||
|
]
|
||||||
|
description: 1.get id
|
||||||
|
2.errcode equal 0 : dev normal
|
||||||
|
not equal 0 : get errmsg
|
||||||
|
3.other message add when all check success
|
||||||
|
'''
|
||||||
|
status.checkFan(a)
|
||||||
|
#status.getTemp(a)
|
||||||
|
#status.getPsu(a)
|
||||||
|
|
||||||
|
nowTime=datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')
|
||||||
|
print(nowTime)
|
||||||
|
print(a)
|
||||||
|
def run(interval):
|
||||||
|
while True:
|
||||||
|
try:
|
||||||
|
time_remaining = interval - time.time()%interval
|
||||||
|
time.sleep(time_remaining)
|
||||||
|
doWork()
|
||||||
|
except Exception as e:
|
||||||
|
print(e)
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
interval = 1
|
||||||
|
run(interval)
|
@ -70,6 +70,7 @@ $(SONIC_ONE_IMAGE)_LAZY_INSTALLS += $(DELL_S6000_PLATFORM_MODULE) \
|
|||||||
$(DELTA_AGC032_PLATFORM_MODULE) \
|
$(DELTA_AGC032_PLATFORM_MODULE) \
|
||||||
$(RUIJIE_B6510_48VS8CQ_PLATFORM_MODULE) \
|
$(RUIJIE_B6510_48VS8CQ_PLATFORM_MODULE) \
|
||||||
$(RAGILE_RA_B6510_48V8C_PLATFORM_MODULE) \
|
$(RAGILE_RA_B6510_48V8C_PLATFORM_MODULE) \
|
||||||
|
$(RAGILE_RA_B6910_64C_PLATFORM_MODULE) \
|
||||||
$(NOKIA_IXR7250_PLATFORM_MODULE)
|
$(NOKIA_IXR7250_PLATFORM_MODULE)
|
||||||
$(SONIC_ONE_IMAGE)_LAZY_BUILD_INSTALLS = $(BRCM_OPENNSL_KERNEL) $(BRCM_DNX_OPENNSL_KERNEL)
|
$(SONIC_ONE_IMAGE)_LAZY_BUILD_INSTALLS = $(BRCM_OPENNSL_KERNEL) $(BRCM_DNX_OPENNSL_KERNEL)
|
||||||
ifeq ($(INSTALL_DEBUG_TOOLS),y)
|
ifeq ($(INSTALL_DEBUG_TOOLS),y)
|
||||||
|
@ -8,3 +8,12 @@ $(RAGILE_RA_B6510_48V8C_PLATFORM_MODULE)_DEPENDS += $(LINUX_HEADERS) $(LINUX_HEA
|
|||||||
$(RAGILE_RA_B6510_48V8C_PLATFORM_MODULE)_PLATFORM = x86_64-ragile_ra-b6510-48v8c-r0
|
$(RAGILE_RA_B6510_48V8C_PLATFORM_MODULE)_PLATFORM = x86_64-ragile_ra-b6510-48v8c-r0
|
||||||
SONIC_DPKG_DEBS += $(RAGILE_RA_B6510_48V8C_PLATFORM_MODULE)
|
SONIC_DPKG_DEBS += $(RAGILE_RA_B6510_48V8C_PLATFORM_MODULE)
|
||||||
SONIC_STRETCH_DEBS += $(RAGILE_RA_B6510_48V8C_PLATFORM_MODULE)
|
SONIC_STRETCH_DEBS += $(RAGILE_RA_B6510_48V8C_PLATFORM_MODULE)
|
||||||
|
|
||||||
|
## RA-B6910-64C
|
||||||
|
RAGILE_RA_B6910_64C_PLATFORM_MODULE_VERSION = 1.0
|
||||||
|
export RAGILE_RA_B6910_64C_PLATFORM_MODULE_VERSION
|
||||||
|
|
||||||
|
RAGILE_RA_B6910_64C_PLATFORM_MODULE = platform-modules-ragile-ra-b6910-64c_$(RAGILE_RA_B6910_64C_PLATFORM_MODULE_VERSION)_amd64.deb
|
||||||
|
$(RAGILE_RA_B6910_64C_PLATFORM_MODULE)_PLATFORM = x86_64-ragile_ra-b6910-64c-r0
|
||||||
|
$(eval $(call add_extra_package,$(RAGILE_RA_B6510_48V8C_PLATFORM_MODULE),$(RAGILE_RA_B6910_64C_PLATFORM_MODULE)))
|
||||||
|
|
||||||
|
@ -1413,7 +1413,7 @@ def fac_fans_setmac_tlv(ret):
|
|||||||
print("\n*******************************\n")
|
print("\n*******************************\n")
|
||||||
|
|
||||||
util_show_fanse2(fans)
|
util_show_fanse2(fans)
|
||||||
if getInputCheck("check input correctly or not(Yes/No):") == True:
|
if getInputCheck("check input correctly or not(Yes/No):") == True:
|
||||||
for fan in fans:
|
for fan in fans:
|
||||||
log_debug("ouput fan")
|
log_debug("ouput fan")
|
||||||
fac_fan_setmac(fan)
|
fac_fan_setmac(fan)
|
||||||
|
@ -7,3 +7,7 @@ Standards-Version: 3.9.3
|
|||||||
Package: platform-modules-ragile-ra-b6510-48v8c
|
Package: platform-modules-ragile-ra-b6510-48v8c
|
||||||
Architecture: amd64
|
Architecture: amd64
|
||||||
Description: kernel modules for platform devices such as fan, led, sfp
|
Description: kernel modules for platform devices such as fan, led, sfp
|
||||||
|
|
||||||
|
Package: platform-modules-ragile-ra-b6910-64c
|
||||||
|
Architecture: amd64
|
||||||
|
Description: kernel modules for platform devices such as fan, led, sfp
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
currentdir = $(shell pwd)
|
currentdir = $(shell pwd)
|
||||||
|
|
||||||
MODULE_DIRS := ra-b6510-48v8c
|
MODULE_DIRS := ra-b6510-48v8c
|
||||||
|
MODULE_DIRS += ra-b6910-64c
|
||||||
|
|
||||||
export MODULE_DIRS
|
export MODULE_DIRS
|
||||||
|
15
platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/LICENSE
Executable file
15
platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/LICENSE
Executable file
@ -0,0 +1,15 @@
|
|||||||
|
Copyright (C) 2016 Microsoft, Inc
|
||||||
|
Copyright (C) 2018 Ragile Network Corporation
|
||||||
|
This program is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public License
|
||||||
|
as published by the Free Software Foundation; either version 2
|
||||||
|
of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
5
platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/MAINTAINERS
Executable file
5
platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/MAINTAINERS
Executable file
@ -0,0 +1,5 @@
|
|||||||
|
# See the SONiC project governance document for more information
|
||||||
|
|
||||||
|
Name = "support"
|
||||||
|
Email = "support@ragile.com"
|
||||||
|
Mailinglist = sonicproject@googlegroups.com
|
25
platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/Makefile
Executable file
25
platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/Makefile
Executable file
@ -0,0 +1,25 @@
|
|||||||
|
PWD = $(shell pwd)
|
||||||
|
DIR_KERNEL_SRC = $(PWD)/modules/driver
|
||||||
|
EXTRA_CFLAGS:= -I$(M)/include
|
||||||
|
EXTRA_CFLAGS+= -Wall
|
||||||
|
SUB_BUILD_DIR = $(PWD)/build
|
||||||
|
INSTALL_DIR = $(SUB_BUILD_DIR)/$(KERNEL_SRC)/$(INSTALL_MOD_DIR)
|
||||||
|
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
|
||||||
|
export KBUILD_EXTRA_SYMBOLS
|
||||||
|
|
||||||
|
all:
|
||||||
|
$(MAKE) -C $(KBUILD_OUTPUT) M=$(DIR_KERNEL_SRC) modules
|
||||||
|
@if [ ! -d ${INSTALL_DIR} ]; then mkdir -p ${INSTALL_DIR} ;fi
|
||||||
|
cp -r $(DIR_KERNEL_SRC)/*.ko $(INSTALL_DIR)
|
||||||
|
@if [ ! -d ${INSTALL_SCRIPT_DIR} ]; then mkdir -p ${INSTALL_SCRIPT_DIR} ;fi
|
||||||
|
cp -r $(PWD)/config/* $(INSTALL_SCRIPT_DIR)
|
||||||
|
@if [ ! -d ${INSTALL_SERVICE_DIR} ]; then mkdir -p ${INSTALL_SERVICE_DIR} ;fi
|
||||||
|
cp $(PWD)/systemd/*.service $(INSTALL_SERVICE_DIR)
|
||||||
|
clean:
|
||||||
|
rm -f ${DIR_KERNEL_SRC}/*.o ${DIR_KERNEL_SRC}/*.ko ${DIR_KERNEL_SRC}/*.mod.c ${DIR_KERNEL_SRC}/.*.cmd
|
||||||
|
rm -f ${DIR_KERNEL_SRC}/Module.markers ${DIR_KERNEL_SRC}/Module.symvers ${DIR_KERNEL_SRC}/modules.order
|
||||||
|
rm -rf ${DIR_KERNEL_SRC}/.tmp_versions
|
||||||
|
rm -rf $(SUB_BUILD_DIR)
|
1
platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/README.md
Executable file
1
platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/README.md
Executable file
@ -0,0 +1 @@
|
|||||||
|
Device drivers for support of ragile platform for the SONiC project
|
@ -0,0 +1,420 @@
|
|||||||
|
#!/usr/bin/python
|
||||||
|
# -*- coding: UTF-8 -*-
|
||||||
|
from ragilecommon import *
|
||||||
|
PCA9548START = -1
|
||||||
|
PCA9548BUSEND = -2
|
||||||
|
|
||||||
|
RAGILE_CARDID = 0x0000404c
|
||||||
|
RAGILE_PRODUCTNAME = "RA-B6910-64C"
|
||||||
|
|
||||||
|
fanlevel = {
|
||||||
|
"tips": ["LOW", "MEDIUM", "HIGH"],
|
||||||
|
"level": [75, 150, 255],
|
||||||
|
"low_speed": [750, 4250, 6750],
|
||||||
|
"high_speed": [4500, 7500, 10000],
|
||||||
|
}
|
||||||
|
|
||||||
|
# fit with pddf
|
||||||
|
fanloc = [
|
||||||
|
{
|
||||||
|
"name": "FAN1/FAN2/FAN3/FAN4",
|
||||||
|
"location": "2-0066/fan1_pwm",
|
||||||
|
"childfans": [
|
||||||
|
{"name": "FAN1", "location": "2-0066/fan1_input"},
|
||||||
|
{"name": "FAN2", "location": "2-0066/fan2_input"},
|
||||||
|
{"name": "FAN3", "location": "2-0066/fan3_input"},
|
||||||
|
{"name": "FAN4", "location": "2-0066/fan4_input"},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
]
|
||||||
|
|
||||||
|
CPLDVERSIONS = [
|
||||||
|
{"bus": 2, "devno": 0x33, "name": "MAC BOARD CPLD-A"},
|
||||||
|
{"bus": 2, "devno": 0x35, "name": "MAC BOARD CPLD-B"},
|
||||||
|
{"bus": 2, "devno": 0x37, "name": "CONNECT BOARD CPLD-A"},
|
||||||
|
{"bus": 0, "devno": 0x0d, "name": "CPU BOARD CPLD"},
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
MONITOR_TEMP_MIN = 34
|
||||||
|
MONITOR_K = 14
|
||||||
|
MONITOR_MAC_IN = 35
|
||||||
|
MONITOR_DEFAULT_SPEED = 0x80
|
||||||
|
MONITOR_MAX_SPEED = 0xFF
|
||||||
|
MONITOR_MIN_SPEED = 0x33
|
||||||
|
MONITOR_MAC_ERROR_SPEED = 0XBB
|
||||||
|
MONITOR_FAN_TOTAL_NUM = 3
|
||||||
|
MONITOR_MAC_UP_TEMP = 40
|
||||||
|
MONITOR_MAC_LOWER_TEMP = -40
|
||||||
|
MONITOR_MAC_MAX_TEMP = 100
|
||||||
|
|
||||||
|
MONITOR_FALL_TEMP = 2
|
||||||
|
MONITOR_MAC_WARNING_THRESHOLD = 100
|
||||||
|
MONITOR_OUTTEMP_WARNING_THRESHOLD = 85
|
||||||
|
MONITOR_BOARDTEMP_WARNING_THRESHOLD = 85
|
||||||
|
MONITOR_CPUTEMP_WARNING_THRESHOLD = 85
|
||||||
|
MONITOR_INTEMP_WARNING_THRESHOLD = 70
|
||||||
|
|
||||||
|
MONITOR_MAC_CRITICAL_THRESHOLD = 105
|
||||||
|
MONITOR_OUTTEMP_CRITICAL_THRESHOLD = 90
|
||||||
|
MONITOR_BOARDTEMP_CRITICAL_THRESHOLD = 90
|
||||||
|
MONITOR_CPUTEMP_CRITICAL_THRESHOLD = 100
|
||||||
|
MONITOR_INTEMP_CRITICAL_THRESHOLD = 80
|
||||||
|
MONITOR_CRITICAL_NUM = 2
|
||||||
|
MONITOR_SHAKE_TIME = 10
|
||||||
|
MONITOR_INTERVAL = 60
|
||||||
|
|
||||||
|
|
||||||
|
MONITOR_SYS_LED = [{"bus": 2, "devno": 0x35, "addr": 0xb2, "yellow": 0x03, "red": 0x02, "green": 0x01}]
|
||||||
|
|
||||||
|
MONITOR_SYS_FAN_LED =[
|
||||||
|
{"bus": 2, "devno": 0x35, "addr": 0xb4, "yellow": 0x06, "red": 0x02, "green": 0x04},
|
||||||
|
]
|
||||||
|
|
||||||
|
MONITOR_FANS_LED = [
|
||||||
|
{"bus": 2, "devno": 0x32, "addr": 0x23, "green": 0x09, "red": 0x0a},
|
||||||
|
{"bus": 2, "devno": 0x32, "addr": 0x24, "green": 0x09, "red": 0x0a},
|
||||||
|
{"bus": 2, "devno": 0x32, "addr": 0x25, "green": 0x09, "red": 0x0a}
|
||||||
|
]
|
||||||
|
|
||||||
|
MONITOR_SYS_PSU_LED = [
|
||||||
|
{"bus": 2, "devno": 0x35, "addr": 0xb3, "yellow": 0x06, "red": 0x02, "green": 0x04},
|
||||||
|
]
|
||||||
|
|
||||||
|
MONITOR_FAN_STATUS = [
|
||||||
|
{'status': 'green' , 'minOkNum': 3, 'maxOkNum': 3},
|
||||||
|
{'status': 'yellow', 'minOkNum': 2, 'maxOkNum': 2},
|
||||||
|
{'status': 'red' , 'minOkNum': 0, 'maxOkNum': 1},
|
||||||
|
]
|
||||||
|
|
||||||
|
MONITOR_PSU_STATUS = [
|
||||||
|
{'status': 'green' , 'minOkNum': 2, 'maxOkNum': 2},
|
||||||
|
{'status': 'yellow', 'minOkNum': 1, 'maxOkNum': 1},
|
||||||
|
{'status': 'red' , 'minOkNum': 0, 'maxOkNum': 0},
|
||||||
|
]
|
||||||
|
|
||||||
|
MONITOR_DEV_STATUS = {
|
||||||
|
"temperature": [
|
||||||
|
{"name": "lm75in", "location": "/sys/bus/i2c/devices/2-0048/hwmon/*/temp1_input"},
|
||||||
|
{"name": "lm75out", "location": "/sys/bus/i2c/devices/2-0049/hwmon/*/temp1_input"},
|
||||||
|
{"name": "lm75hot", "location": "/sys/bus/i2c/devices/2-004a/hwmon/*/temp1_input"},
|
||||||
|
{"name": "cpu", "location": "/sys/class/hwmon/hwmon0"},
|
||||||
|
],
|
||||||
|
"fans": [
|
||||||
|
{
|
||||||
|
"name": "fan1",
|
||||||
|
"presentstatus": {"bus": 2, "loc": 0x37, "offset": 0x30, 'bit': 0},
|
||||||
|
"rollstatus": [
|
||||||
|
{"name": "motor1", "bus": 2, "loc": 0x37, "offset": 0x31, 'bit': 0},
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "fan2",
|
||||||
|
"presentstatus": {"bus": 2, "loc": 0x37, "offset": 0x30, 'bit': 1},
|
||||||
|
"rollstatus": [
|
||||||
|
{"name": "motor1", "bus": 2, "loc": 0x37, "offset": 0x31, 'bit': 1},
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "fan3",
|
||||||
|
"presentstatus": {"bus": 2, "loc": 0x37, "offset": 0x30, 'bit': 2},
|
||||||
|
"rollstatus": [
|
||||||
|
{"name": "motor1", "bus": 2, "loc": 0x37, "offset": 0x31, 'bit': 2},
|
||||||
|
]
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"psus": [
|
||||||
|
{"name": "psu1", "bus": 2, "loc": 0x37, "offset": 0x51, "gettype": "i2c", 'presentbit': 0, 'statusbit': 1, 'alertbit': 2},
|
||||||
|
{"name": "psu2", "bus": 2, "loc": 0x37, "offset": 0x51, "gettype": "i2c", 'presentbit': 4, 'statusbit': 5, 'alertbit': 6},
|
||||||
|
],
|
||||||
|
}
|
||||||
|
|
||||||
|
MONITOR_DEV_STATUS_DECODE = {
|
||||||
|
'fanpresent': {0: 'PRESENT', 1: 'ABSENT', 'okval': 0},
|
||||||
|
'fanroll' : {0: 'STALL' , 1: 'ROLL', 'okval': 1},
|
||||||
|
'psupresent': {0: 'PRESENT', 1: 'ABSENT', 'okval': 0},
|
||||||
|
'psuoutput' : {0: 'FAULT' , 1: 'NORMAL', 'okval': 1},
|
||||||
|
'psualert' : {0: 'FAULT' , 1: 'NORMAL', 'okval': 1},
|
||||||
|
}
|
||||||
|
###################################################################
|
||||||
|
|
||||||
|
|
||||||
|
MAC_AVS_PARAM = {
|
||||||
|
0x68: 0x03c0,
|
||||||
|
0x69: 0x03bc,
|
||||||
|
0x6a: 0x03b6,
|
||||||
|
0x6b: 0x03b0,
|
||||||
|
0x6c: 0x03aa,
|
||||||
|
0x6d: 0x03a3,
|
||||||
|
0x6e: 0x039d,
|
||||||
|
0x6f: 0x0397,
|
||||||
|
0x70: 0x0391,
|
||||||
|
0x71: 0x038a,
|
||||||
|
0x72: 0x0384,
|
||||||
|
0x73: 0x037e,
|
||||||
|
0x74: 0x0379,
|
||||||
|
0x75: 0x0371,
|
||||||
|
0x76: 0x036b,
|
||||||
|
0x77: 0x0365,
|
||||||
|
0x78: 0x035f,
|
||||||
|
0x79: 0x0358,
|
||||||
|
0x7a: 0x0352,
|
||||||
|
0x7b: 0x034c,
|
||||||
|
0x7c: 0x0348
|
||||||
|
}
|
||||||
|
|
||||||
|
MAC_DEFAULT_PARAM = {
|
||||||
|
"type": 1,
|
||||||
|
"default": 0x74,
|
||||||
|
"loopaddr": 0x00,
|
||||||
|
"loop": 0x00,
|
||||||
|
"open": 0x00,
|
||||||
|
"close": 0x40,
|
||||||
|
"bus": 2,
|
||||||
|
"devno": 0x60,
|
||||||
|
"addr": 0x21,
|
||||||
|
"protectaddr": 0x10,
|
||||||
|
"sdkreg": "DMU_PCU_OTP_CONFIG_8",
|
||||||
|
"sdkcmd": "scdcmd",
|
||||||
|
"sdkcmdargs": ["-t", 5],
|
||||||
|
"sdktype": 1,
|
||||||
|
"macregloc": 24,
|
||||||
|
"mask": 0xff
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
DEVICE = []
|
||||||
|
DRIVERLISTS = []
|
||||||
|
|
||||||
|
"""
|
||||||
|
DRIVERLISTS = [
|
||||||
|
{"name": "i2c_dev", "delay": 0},
|
||||||
|
{"name": "i2c_algo_bit", "delay": 0},
|
||||||
|
{"name": "i2c_gpio", "delay": 0},
|
||||||
|
{"name": "i2c_mux", "delay": 0},
|
||||||
|
{"name": "i2c_mux_pca9641", "delay": 0},
|
||||||
|
{"name": "i2c_mux_pca954x force_create_bus=1", "delay": 0}, # force_deselect_on_exit=1
|
||||||
|
{"name": "lm75", "delay": 0},
|
||||||
|
{"name": "optoe", "delay": 0},
|
||||||
|
{"name": "at24", "delay": 0},
|
||||||
|
{"name": "rg_sff", "delay": 0},
|
||||||
|
{"name": "ragile_b6510_platform", "delay": 0},
|
||||||
|
{"name": "ragile_platform", "delay": 0},
|
||||||
|
{"name": "rg_avs", "delay": 0},
|
||||||
|
{"name": "rg_cpld", "delay": 0},
|
||||||
|
{"name": "rg_fan", "delay": 0},
|
||||||
|
{"name": "rg_psu", "delay": 0},
|
||||||
|
{"name": "pmbus_core", "delay": 0},
|
||||||
|
{"name": "csu550", "delay": 0},
|
||||||
|
{"name": "rg_gpio_xeon", "delay": 0},
|
||||||
|
{"name": "firmware_driver", "delay": 0},
|
||||||
|
{"name": "firmware_bin", "delay": 0},
|
||||||
|
{"name": "ragile_common dfd_my_type=0x404c", "delay": 0},
|
||||||
|
{"name": "lpc_dbg", "delay": 0},
|
||||||
|
]
|
||||||
|
|
||||||
|
DEVICE = [
|
||||||
|
{"name": "pca9641", "bus": 0, "loc": 0x10},
|
||||||
|
{"name": "pca9548", "bus": 2, "loc": 0x70},
|
||||||
|
{"name": "lm75", "bus": 2, "loc": 0x48},
|
||||||
|
{"name": "lm75", "bus": 2, "loc": 0x49},
|
||||||
|
{"name": "lm75", "bus": 2, "loc": 0x4a},
|
||||||
|
{"name": "24c02", "bus": 2, "loc": 0x57},
|
||||||
|
{"name": "rg_cpld", "bus": 0, "loc": 0x32},
|
||||||
|
{"name": "rg_cpld", "bus": 1, "loc": 0x34},
|
||||||
|
{"name": "rg_cpld", "bus": 1, "loc": 0x36},
|
||||||
|
{"name": "rg_cpld", "bus": 2, "loc": 0x33},
|
||||||
|
{"name": "rg_cpld", "bus": 2, "loc": 0x35},
|
||||||
|
{"name": "rg_cpld", "bus": 2, "loc": 0x37},
|
||||||
|
{"name": "rg_avs", "bus": 2, "loc": 0x60},
|
||||||
|
{"name": "pca9548", "bus": 1, "loc": 0x70},
|
||||||
|
{"name": "pca9548", "bus": 1, "loc": 0x71},
|
||||||
|
{"name": "pca9548", "bus": 1, "loc": 0x72},
|
||||||
|
{"name": "pca9548", "bus": 1, "loc": 0x73},
|
||||||
|
{"name": "pca9548", "bus": 1, "loc": 0x74},
|
||||||
|
{"name": "pca9548", "bus": 1, "loc": 0x75},
|
||||||
|
{"name": "pca9548", "bus": 1, "loc": 0x76},
|
||||||
|
{"name": "pca9548", "bus": 1, "loc": 0x77},
|
||||||
|
{"name": "rg_fan", "bus": 3, "loc": 0x53},
|
||||||
|
{"name": "rg_fan", "bus": 4, "loc": 0x53},
|
||||||
|
{"name": "rg_fan", "bus": 5, "loc": 0x53},
|
||||||
|
|
||||||
|
{"name": "rg_psu", "bus": 7, "loc": 0x50},
|
||||||
|
{"name": "dps550", "bus": 7, "loc": 0x58},
|
||||||
|
{"name": "rg_psu", "bus": 8, "loc": 0x53},
|
||||||
|
{"name": "dps550", "bus": 8, "loc": 0x5b},
|
||||||
|
|
||||||
|
{"name": "optoe1", "bus": 11, "loc": 0x50},
|
||||||
|
{"name": "optoe1", "bus": 12, "loc": 0x50},
|
||||||
|
{"name": "optoe1", "bus": 13, "loc": 0x50},
|
||||||
|
{"name": "optoe1", "bus": 14, "loc": 0x50},
|
||||||
|
{"name": "optoe1", "bus": 15, "loc": 0x50},
|
||||||
|
{"name": "optoe1", "bus": 16, "loc": 0x50},
|
||||||
|
{"name": "optoe1", "bus": 17, "loc": 0x50},
|
||||||
|
{"name": "optoe1", "bus": 18, "loc": 0x50},
|
||||||
|
{"name": "optoe1", "bus": 19, "loc": 0x50},
|
||||||
|
{"name": "optoe1", "bus": 20, "loc": 0x50},
|
||||||
|
{"name": "optoe1", "bus": 21, "loc": 0x50},
|
||||||
|
{"name": "optoe1", "bus": 22, "loc": 0x50},
|
||||||
|
{"name": "optoe1", "bus": 23, "loc": 0x50},
|
||||||
|
{"name": "optoe1", "bus": 24, "loc": 0x50},
|
||||||
|
{"name": "optoe1", "bus": 25, "loc": 0x50},
|
||||||
|
{"name": "optoe1", "bus": 26, "loc": 0x50},
|
||||||
|
{"name": "optoe1", "bus": 27, "loc": 0x50},
|
||||||
|
{"name": "optoe1", "bus": 28, "loc": 0x50},
|
||||||
|
{"name": "optoe1", "bus": 29, "loc": 0x50},
|
||||||
|
{"name": "optoe1", "bus": 30, "loc": 0x50},
|
||||||
|
{"name": "optoe1", "bus": 31, "loc": 0x50},
|
||||||
|
{"name": "optoe1", "bus": 32, "loc": 0x50},
|
||||||
|
{"name": "optoe1", "bus": 33, "loc": 0x50},
|
||||||
|
{"name": "optoe1", "bus": 34, "loc": 0x50},
|
||||||
|
{"name": "optoe1", "bus": 35, "loc": 0x50},
|
||||||
|
{"name": "optoe1", "bus": 36, "loc": 0x50},
|
||||||
|
{"name": "optoe1", "bus": 37, "loc": 0x50},
|
||||||
|
{"name": "optoe1", "bus": 38, "loc": 0x50},
|
||||||
|
{"name": "optoe1", "bus": 39, "loc": 0x50},
|
||||||
|
{"name": "optoe1", "bus": 40, "loc": 0x50},
|
||||||
|
{"name": "optoe1", "bus": 41, "loc": 0x50},
|
||||||
|
{"name": "optoe1", "bus": 42, "loc": 0x50},
|
||||||
|
{"name": "optoe1", "bus": 43, "loc": 0x50},
|
||||||
|
{"name": "optoe1", "bus": 44, "loc": 0x50},
|
||||||
|
{"name": "optoe1", "bus": 45, "loc": 0x50},
|
||||||
|
{"name": "optoe1", "bus": 46, "loc": 0x50},
|
||||||
|
{"name": "optoe1", "bus": 47, "loc": 0x50},
|
||||||
|
{"name": "optoe1", "bus": 48, "loc": 0x50},
|
||||||
|
{"name": "optoe1", "bus": 49, "loc": 0x50},
|
||||||
|
{"name": "optoe1", "bus": 50, "loc": 0x50},
|
||||||
|
{"name": "optoe1", "bus": 51, "loc": 0x50},
|
||||||
|
{"name": "optoe1", "bus": 52, "loc": 0x50},
|
||||||
|
{"name": "optoe1", "bus": 53, "loc": 0x50},
|
||||||
|
{"name": "optoe1", "bus": 54, "loc": 0x50},
|
||||||
|
{"name": "optoe1", "bus": 55, "loc": 0x50},
|
||||||
|
{"name": "optoe1", "bus": 56, "loc": 0x50},
|
||||||
|
{"name": "optoe1", "bus": 57, "loc": 0x50},
|
||||||
|
{"name": "optoe1", "bus": 58, "loc": 0x50},
|
||||||
|
{"name": "optoe1", "bus": 59, "loc": 0x50},
|
||||||
|
{"name": "optoe1", "bus": 60, "loc": 0x50},
|
||||||
|
{"name": "optoe1", "bus": 61, "loc": 0x50},
|
||||||
|
{"name": "optoe1", "bus": 62, "loc": 0x50},
|
||||||
|
{"name": "optoe1", "bus": 63, "loc": 0x50},
|
||||||
|
{"name": "optoe1", "bus": 64, "loc": 0x50},
|
||||||
|
{"name": "optoe1", "bus": 65, "loc": 0x50},
|
||||||
|
{"name": "optoe1", "bus": 66, "loc": 0x50},
|
||||||
|
{"name": "optoe1", "bus": 67, "loc": 0x50},
|
||||||
|
{"name": "optoe1", "bus": 68, "loc": 0x50},
|
||||||
|
{"name": "optoe1", "bus": 69, "loc": 0x50},
|
||||||
|
{"name": "optoe1", "bus": 70, "loc": 0x50},
|
||||||
|
{"name": "optoe1", "bus": 71, "loc": 0x50},
|
||||||
|
{"name": "optoe1", "bus": 72, "loc": 0x50},
|
||||||
|
{"name": "optoe1", "bus": 73, "loc": 0x50},
|
||||||
|
{"name": "optoe1", "bus": 74, "loc": 0x50},
|
||||||
|
]
|
||||||
|
|
||||||
|
INIT_PARAM = [
|
||||||
|
{"loc": "1-0034/sfp_enable", "value": "01"},
|
||||||
|
{"loc": "2-0035/sfp_enable2", "value": "ff"},
|
||||||
|
{"loc": "2-0033/mac_led", "value": "ff"},
|
||||||
|
{"loc": "1-0034/sfp_txdis1", "value": "00"},
|
||||||
|
{"loc": "1-0034/sfp_txdis2", "value": "00"},
|
||||||
|
{"loc": "1-0034/sfp_txdis3", "value": "00"},
|
||||||
|
{"loc": "1-0036/sfp_txdis4", "value": "00"},
|
||||||
|
{"loc": "1-0036/sfp_txdis5", "value": "00"},
|
||||||
|
{"loc": "1-0036/sfp_txdis6", "value": "00"},
|
||||||
|
|
||||||
|
{"loc": "1-0034/sfp_led1_yellow", "value": "00"},
|
||||||
|
{"loc": "1-0034/sfp_led3_yellow", "value": "00"},
|
||||||
|
{"loc": "1-0036/sfp_led4_yellow", "value": "00"},
|
||||||
|
{"loc": "1-0036/sfp_led6_yellow", "value": "00"},
|
||||||
|
{"loc": "1-0034/sfp_led2_yellow", "value": "00"},
|
||||||
|
{"loc": "1-0034/sfp_led8_yellow", "value": "00"},
|
||||||
|
{"loc": "1-0036/sfp_led5_yellow", "value": "00"},
|
||||||
|
{"loc": "1-0036/sfp_led7_yellow", "value": "00"},
|
||||||
|
]
|
||||||
|
"""
|
||||||
|
|
||||||
|
INIT_PARAM = [
|
||||||
|
{
|
||||||
|
"name": "sfp_enable",
|
||||||
|
"bus": 1,
|
||||||
|
"devaddr": 0x34,
|
||||||
|
"offset": 0xa1,
|
||||||
|
"val": 0x01,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "sfp_eanble2",
|
||||||
|
"bus": 2,
|
||||||
|
"devaddr": 0x35,
|
||||||
|
"offset": 0xa0,
|
||||||
|
"val": 0xff,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "mac_led",
|
||||||
|
"bus": 2,
|
||||||
|
"devaddr": 0x33,
|
||||||
|
"offset": 0xa0,
|
||||||
|
"val": 0xff,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "sfp_led1_yellow",
|
||||||
|
"bus": 1,
|
||||||
|
"devaddr": 0x34,
|
||||||
|
"offset": 0xa6,
|
||||||
|
"val": 0x00,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "sfp_led2_yellow",
|
||||||
|
"bus": 1,
|
||||||
|
"devaddr": 0x34,
|
||||||
|
"offset": 0xa7,
|
||||||
|
"val": 0x00,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "sfp_led3_yellow",
|
||||||
|
"bus": 1,
|
||||||
|
"devaddr": 0x34,
|
||||||
|
"offset": 0xa8,
|
||||||
|
"val": 0x00,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "sfp_led4_yellow",
|
||||||
|
"bus": 1,
|
||||||
|
"devaddr": 0x36,
|
||||||
|
"offset": 0xa6,
|
||||||
|
"val": 0x00,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "sfp_led5_yellow",
|
||||||
|
"bus": 1,
|
||||||
|
"devaddr": 0x36,
|
||||||
|
"offset": 0xa7,
|
||||||
|
"val": 0x00,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "sfp_led6_yellow",
|
||||||
|
"bus": 1,
|
||||||
|
"devaddr": 0x36,
|
||||||
|
"offset": 0xa8,
|
||||||
|
"val": 0x00,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "sfp_led7_yellow",
|
||||||
|
"bus": 1,
|
||||||
|
"devaddr": 0x36,
|
||||||
|
"offset": 0xa9,
|
||||||
|
"val": 0x00,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "sfp_led8_yellow",
|
||||||
|
"bus": 1,
|
||||||
|
"devaddr": 0x34,
|
||||||
|
"offset": 0xa8,
|
||||||
|
"val": 0x00,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "fan_speed_set",
|
||||||
|
"bus": 0,
|
||||||
|
"devaddr": 0x32,
|
||||||
|
"offset": 0x15,
|
||||||
|
"val": 0x80,
|
||||||
|
},
|
||||||
|
]
|
@ -0,0 +1 @@
|
|||||||
|
obj-m := rg_cpld.o
|
@ -0,0 +1,509 @@
|
|||||||
|
/*
|
||||||
|
* rg_cpld.c - A driver for control rg_cpld base on rg_cpld.c
|
||||||
|
*
|
||||||
|
* Copyright (c) 1998, 1999 Frodo Looijaard <frodol@dds.nl>
|
||||||
|
* Copyright (c) 2018 support <support@ragile.com>
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <linux/module.h>
|
||||||
|
#include <linux/init.h>
|
||||||
|
#include <linux/slab.h>
|
||||||
|
#include <linux/jiffies.h>
|
||||||
|
#include <linux/i2c.h>
|
||||||
|
#include <linux/hwmon.h>
|
||||||
|
#include <linux/hwmon-sysfs.h>
|
||||||
|
#include <linux/err.h>
|
||||||
|
#include <linux/mutex.h>
|
||||||
|
#include <linux/fs.h>
|
||||||
|
#include <linux/uaccess.h>
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
DBG_START,
|
||||||
|
DBG_VERBOSE,
|
||||||
|
DBG_KEY,
|
||||||
|
DBG_WARN,
|
||||||
|
DBG_ERROR,
|
||||||
|
DBG_END,
|
||||||
|
} dbg_level_t;
|
||||||
|
|
||||||
|
static int debuglevel=0;
|
||||||
|
module_param(debuglevel, int, S_IRUGO);
|
||||||
|
|
||||||
|
#define DBG_DEBUG(fmt, arg...) do { \
|
||||||
|
if ( debuglevel > DBG_START && debuglevel < DBG_ERROR) { \
|
||||||
|
printk(KERN_INFO "[DEBUG]:<%s, %d>:"fmt, __FUNCTION__, __LINE__, ##arg); \
|
||||||
|
} else if ( debuglevel >= DBG_ERROR ) { \
|
||||||
|
printk(KERN_ERR "[DEBUG]:<%s, %d>:"fmt, __FUNCTION__, __LINE__, ##arg); \
|
||||||
|
} else { } \
|
||||||
|
} while (0)
|
||||||
|
|
||||||
|
#define DBG_ERROR(fmt, arg...) do { \
|
||||||
|
if ( debuglevel > DBG_START) { \
|
||||||
|
printk(KERN_ERR "[ERROR]:<%s, %d>:"fmt, __FUNCTION__, __LINE__, ##arg); \
|
||||||
|
} \
|
||||||
|
} while (0)
|
||||||
|
|
||||||
|
/* static const unsigned short rg_i2c_cpld[] = { 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, I2C_CLIENT_END }; */
|
||||||
|
|
||||||
|
#define CPLD_SIZE 256
|
||||||
|
#define CPLD_I2C_RETRY_TIMES 3
|
||||||
|
#define COMMON_STR_LEN (256)
|
||||||
|
|
||||||
|
struct cpld_data {
|
||||||
|
struct i2c_client *client;
|
||||||
|
struct device *hwmon_dev;
|
||||||
|
struct mutex update_lock;
|
||||||
|
char valid; /* !=0 if registers are valid */
|
||||||
|
unsigned long last_updated; /* In jiffies */
|
||||||
|
u8 data[CPLD_SIZE]; /* Register value */
|
||||||
|
};
|
||||||
|
|
||||||
|
static s32 cpld_i2c_smbus_read_byte_data(const struct i2c_client *client, u8 command)
|
||||||
|
{
|
||||||
|
int try;
|
||||||
|
s32 ret;
|
||||||
|
|
||||||
|
ret = -1;
|
||||||
|
for (try = 0; try < CPLD_I2C_RETRY_TIMES; try++) {
|
||||||
|
if ((ret = i2c_smbus_read_byte_data(client, command) ) >= 0 )
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
static s32 cpld_i2c_smbus_read_i2c_block_data(const struct i2c_client *client,
|
||||||
|
u8 command, u8 length, u8 *values)
|
||||||
|
{
|
||||||
|
int try;
|
||||||
|
s32 ret;
|
||||||
|
|
||||||
|
ret = -1;
|
||||||
|
for (try = 0; try < CPLD_I2C_RETRY_TIMES; try++) {
|
||||||
|
if ((ret = i2c_smbus_read_i2c_block_data(client, command, length, values) ) >= 0 )
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
static ssize_t show_fan_rpm_value(struct device *dev, struct device_attribute *da, char *buf)
|
||||||
|
{
|
||||||
|
struct cpld_data *data = dev_get_drvdata(dev);
|
||||||
|
struct i2c_client *client = data->client;
|
||||||
|
int index = to_sensor_dev_attr_2(da)->index;
|
||||||
|
uint8_t size;
|
||||||
|
s32 status;
|
||||||
|
s32 ret_t;
|
||||||
|
|
||||||
|
ret_t = 0;
|
||||||
|
status = -1;
|
||||||
|
size = 0;
|
||||||
|
mutex_lock(&data->update_lock);
|
||||||
|
status = cpld_i2c_smbus_read_byte_data(client, index);
|
||||||
|
if (status < 0) {
|
||||||
|
mutex_unlock(&data->update_lock);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
data->data[0] = status;
|
||||||
|
status = cpld_i2c_smbus_read_byte_data(client, index + 1);
|
||||||
|
if (status < 0) {
|
||||||
|
mutex_unlock(&data->update_lock);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
data->data[1] = status;
|
||||||
|
DBG_DEBUG("cpld reg pos:0x%x value:0x%x\n", index, data->data[0]);
|
||||||
|
DBG_DEBUG("cpld reg pos:0x%x value:0x%x\n", index + 1, data->data[1]);
|
||||||
|
ret_t = (data->data[1] << 8) + data->data[0] ;
|
||||||
|
if (ret_t == 0 ) {
|
||||||
|
size = snprintf(buf, CPLD_SIZE, "%d\n", ret_t);
|
||||||
|
} else if (ret_t == 0xffff) {
|
||||||
|
size = snprintf(buf, CPLD_SIZE, "%d\n", 0);
|
||||||
|
} else {
|
||||||
|
size = snprintf(buf, CPLD_SIZE, "%d\n", 15000000 / ret_t);
|
||||||
|
}
|
||||||
|
mutex_unlock(&data->update_lock);
|
||||||
|
return size;
|
||||||
|
}
|
||||||
|
|
||||||
|
static ssize_t set_cpld_sysfs_value(struct device *dev, struct device_attribute *da, const char *buf, size_t
|
||||||
|
count)
|
||||||
|
{
|
||||||
|
struct sensor_device_attribute *attr = to_sensor_dev_attr(da);
|
||||||
|
struct i2c_client *client = to_i2c_client(dev);
|
||||||
|
struct cpld_data *data = i2c_get_clientdata(client);
|
||||||
|
unsigned long val;
|
||||||
|
int err;
|
||||||
|
|
||||||
|
err = kstrtoul(buf, 16, &val);
|
||||||
|
if (err)
|
||||||
|
return err;
|
||||||
|
if ((val < 0) || (val > 0xff)) {
|
||||||
|
DBG_ERROR("please enter 0x00 ~ 0xff\n");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
mutex_lock(&data->update_lock);
|
||||||
|
data->data[0] = (u8)val;
|
||||||
|
DBG_DEBUG("pos: 0x%02x count = %ld, data = 0x%02x\n", attr->index, count, data->data[0]);
|
||||||
|
i2c_smbus_write_byte_data(client, attr->index, data->data[0]);
|
||||||
|
mutex_unlock(&data->update_lock);
|
||||||
|
|
||||||
|
return count;
|
||||||
|
}
|
||||||
|
|
||||||
|
static ssize_t show_cpld_version(struct device *dev, struct device_attribute *da, char *buf)
|
||||||
|
{
|
||||||
|
struct i2c_client *client = to_i2c_client(dev);
|
||||||
|
struct cpld_data *data = i2c_get_clientdata(client);
|
||||||
|
s32 status;
|
||||||
|
|
||||||
|
status = -1;
|
||||||
|
mutex_lock(&data->update_lock);
|
||||||
|
status = cpld_i2c_smbus_read_i2c_block_data(client, 0, 4, data->data);
|
||||||
|
if (status < 0) {
|
||||||
|
mutex_unlock(&data->update_lock);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
mutex_unlock(&data->update_lock);
|
||||||
|
return snprintf(buf, COMMON_STR_LEN, "%02x %02x %02x %02x \n",
|
||||||
|
data->data[0], data->data[1], data->data[2], data->data[3]);
|
||||||
|
}
|
||||||
|
|
||||||
|
static ssize_t show_cpld_sysfs_value(struct device *dev, struct device_attribute *da, char *buf)
|
||||||
|
{
|
||||||
|
struct sensor_device_attribute *attr = to_sensor_dev_attr(da);
|
||||||
|
struct i2c_client *client = to_i2c_client(dev);
|
||||||
|
struct cpld_data *data = i2c_get_clientdata(client);
|
||||||
|
s32 status;
|
||||||
|
|
||||||
|
status = -1;
|
||||||
|
mutex_lock(&data->update_lock);
|
||||||
|
status = cpld_i2c_smbus_read_byte_data(client, attr->index);
|
||||||
|
if (status < 0) {
|
||||||
|
mutex_unlock(&data->update_lock);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
data->data[0] = status;
|
||||||
|
DBG_DEBUG("cpld reg pos:0x%x value:0x%02x\n", attr->index, data->data[0]);
|
||||||
|
mutex_unlock(&data->update_lock);
|
||||||
|
return snprintf(buf, COMMON_STR_LEN, "%02x\n", data->data[0]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* common */
|
||||||
|
static SENSOR_DEVICE_ATTR(cpld_version, S_IRUGO | S_IWUSR, show_cpld_version, NULL, 0);
|
||||||
|
/*0x37 hwmon*/
|
||||||
|
static SENSOR_DEVICE_ATTR(fan1_input, S_IRUGO | S_IWUSR ,show_fan_rpm_value, NULL, 0x1B);
|
||||||
|
static SENSOR_DEVICE_ATTR(fan2_input, S_IRUGO | S_IWUSR ,show_fan_rpm_value, NULL, 0x1D);
|
||||||
|
static SENSOR_DEVICE_ATTR(fan3_input, S_IRUGO | S_IWUSR ,show_fan_rpm_value, NULL, 0x1F);
|
||||||
|
//static SENSOR_DEVICE_ATTR(fan4_input, S_IRUGO | S_IWUSR ,show_fan_rpm_value, NULL, 0x21);
|
||||||
|
/* 0x32 */
|
||||||
|
static SENSOR_DEVICE_ATTR(fan_speed_set, S_IRUGO | S_IWUSR, show_cpld_sysfs_value, set_cpld_sysfs_value, 0x15);
|
||||||
|
static SENSOR_DEVICE_ATTR(fan0_led, S_IRUGO | S_IWUSR, show_cpld_sysfs_value, set_cpld_sysfs_value, 0x23);
|
||||||
|
static SENSOR_DEVICE_ATTR(fan1_led, S_IRUGO | S_IWUSR, show_cpld_sysfs_value, set_cpld_sysfs_value, 0x24);
|
||||||
|
static SENSOR_DEVICE_ATTR(fan2_led, S_IRUGO | S_IWUSR, show_cpld_sysfs_value, set_cpld_sysfs_value, 0x25);
|
||||||
|
static SENSOR_DEVICE_ATTR(fan3_led, S_IRUGO | S_IWUSR, show_cpld_sysfs_value, set_cpld_sysfs_value, 0x26);
|
||||||
|
static SENSOR_DEVICE_ATTR(broad_back_lct, S_IRUGO | S_IWUSR, show_cpld_sysfs_value, set_cpld_sysfs_value, 0x68);
|
||||||
|
static SENSOR_DEVICE_ATTR(broad_back_sys, S_IRUGO | S_IWUSR, show_cpld_sysfs_value, set_cpld_sysfs_value, 0x72);
|
||||||
|
/* 0x37 */
|
||||||
|
static SENSOR_DEVICE_ATTR(fan_present, S_IRUGO | S_IWUSR, show_cpld_sysfs_value, NULL, 0x30);
|
||||||
|
static SENSOR_DEVICE_ATTR(fan_status, S_IRUGO | S_IWUSR, show_cpld_sysfs_value, NULL, 0x31);
|
||||||
|
static SENSOR_DEVICE_ATTR(psu_status, S_IRUGO | S_IWUSR, show_cpld_sysfs_value, NULL, 0x51);
|
||||||
|
/* 0x33 */
|
||||||
|
static SENSOR_DEVICE_ATTR(mac_led, S_IRUGO | S_IWUSR, show_cpld_sysfs_value, set_cpld_sysfs_value, 0xa0);
|
||||||
|
static SENSOR_DEVICE_ATTR(broad_front_lct, S_IRUGO | S_IWUSR, show_cpld_sysfs_value, set_cpld_sysfs_value, 0x2a);
|
||||||
|
static SENSOR_DEVICE_ATTR(broad_front_bmc, S_IRUGO| S_IWUSR, show_cpld_sysfs_value, set_cpld_sysfs_value, 0xb1);
|
||||||
|
static SENSOR_DEVICE_ATTR(broad_front_cpu, S_IRUGO| S_IWUSR, show_cpld_sysfs_value, set_cpld_sysfs_value, 0xb2);
|
||||||
|
static SENSOR_DEVICE_ATTR(broad_front_pwr, S_IRUGO| S_IWUSR, show_cpld_sysfs_value, set_cpld_sysfs_value, 0xb3);
|
||||||
|
static SENSOR_DEVICE_ATTR(broad_front_fan, S_IRUGO| S_IWUSR, show_cpld_sysfs_value, set_cpld_sysfs_value, 0xb4);
|
||||||
|
/* 0x34 */
|
||||||
|
static SENSOR_DEVICE_ATTR(sfp_presence1, S_IRUGO| S_IWUSR, show_cpld_sysfs_value, NULL, 0x30);
|
||||||
|
static SENSOR_DEVICE_ATTR(sfp_presence2, S_IRUGO| S_IWUSR, show_cpld_sysfs_value, NULL, 0x31);
|
||||||
|
static SENSOR_DEVICE_ATTR(sfp_presence3, S_IRUGO| S_IWUSR, show_cpld_sysfs_value, NULL, 0x32);
|
||||||
|
static SENSOR_DEVICE_ATTR(sfp_presence8, S_IRUGO| S_IWUSR, show_cpld_sysfs_value, NULL, 0x33);
|
||||||
|
static SENSOR_DEVICE_ATTR(sfp_enable, S_IRUGO| S_IWUSR, show_cpld_sysfs_value, set_cpld_sysfs_value, 0xa1);
|
||||||
|
static SENSOR_DEVICE_ATTR(sfp_led1_red, S_IRUGO | S_IWUSR, show_cpld_sysfs_value, set_cpld_sysfs_value, 0xa2);
|
||||||
|
static SENSOR_DEVICE_ATTR(sfp_led2_red, S_IRUGO | S_IWUSR, show_cpld_sysfs_value, set_cpld_sysfs_value, 0xa3);
|
||||||
|
static SENSOR_DEVICE_ATTR(sfp_led3_red, S_IRUGO | S_IWUSR, show_cpld_sysfs_value, set_cpld_sysfs_value, 0xa4);
|
||||||
|
static SENSOR_DEVICE_ATTR(sfp_led8_red, S_IRUGO | S_IWUSR, show_cpld_sysfs_value, set_cpld_sysfs_value, 0xa5);
|
||||||
|
static SENSOR_DEVICE_ATTR(sfp_led1_yellow, S_IRUGO | S_IWUSR, show_cpld_sysfs_value, set_cpld_sysfs_value, 0xa6);
|
||||||
|
static SENSOR_DEVICE_ATTR(sfp_led2_yellow, S_IRUGO | S_IWUSR, show_cpld_sysfs_value, set_cpld_sysfs_value, 0xa7);
|
||||||
|
static SENSOR_DEVICE_ATTR(sfp_led3_yellow, S_IRUGO | S_IWUSR, show_cpld_sysfs_value, set_cpld_sysfs_value, 0xa8);
|
||||||
|
static SENSOR_DEVICE_ATTR(sfp_led8_yellow, S_IRUGO | S_IWUSR, show_cpld_sysfs_value, set_cpld_sysfs_value, 0xa9);
|
||||||
|
static SENSOR_DEVICE_ATTR(sfp_txdis1, S_IRUGO| S_IWUSR, show_cpld_sysfs_value, set_cpld_sysfs_value, 0x60);
|
||||||
|
static SENSOR_DEVICE_ATTR(sfp_txdis2, S_IRUGO| S_IWUSR, show_cpld_sysfs_value, set_cpld_sysfs_value, 0x61);
|
||||||
|
static SENSOR_DEVICE_ATTR(sfp_txdis3, S_IRUGO| S_IWUSR, show_cpld_sysfs_value, set_cpld_sysfs_value, 0x62);
|
||||||
|
/* 0x35 */
|
||||||
|
static SENSOR_DEVICE_ATTR(sfp_enable2, S_IRUGO | S_IWUSR ,show_cpld_sysfs_value, set_cpld_sysfs_value, 0xa0);
|
||||||
|
/* 0x36 */
|
||||||
|
static SENSOR_DEVICE_ATTR(sfp_presence4, S_IRUGO | S_IWUSR ,show_cpld_sysfs_value, NULL, 0x30);
|
||||||
|
static SENSOR_DEVICE_ATTR(sfp_presence5, S_IRUGO | S_IWUSR ,show_cpld_sysfs_value, NULL, 0x31);
|
||||||
|
static SENSOR_DEVICE_ATTR(sfp_presence6, S_IRUGO | S_IWUSR ,show_cpld_sysfs_value, NULL, 0x32);
|
||||||
|
static SENSOR_DEVICE_ATTR(sfp_presence7, S_IRUGO | S_IWUSR ,show_cpld_sysfs_value, NULL, 0x33);
|
||||||
|
static SENSOR_DEVICE_ATTR(sfp_led4_red, S_IRUGO | S_IWUSR ,show_cpld_sysfs_value, set_cpld_sysfs_value, 0xa2);
|
||||||
|
static SENSOR_DEVICE_ATTR(sfp_led5_red, S_IRUGO | S_IWUSR ,show_cpld_sysfs_value, set_cpld_sysfs_value, 0xa3);
|
||||||
|
static SENSOR_DEVICE_ATTR(sfp_led6_red, S_IRUGO | S_IWUSR ,show_cpld_sysfs_value, set_cpld_sysfs_value, 0xa4);
|
||||||
|
static SENSOR_DEVICE_ATTR(sfp_led7_red, S_IRUGO | S_IWUSR ,show_cpld_sysfs_value, set_cpld_sysfs_value, 0xa5);
|
||||||
|
static SENSOR_DEVICE_ATTR(sfp_led4_yellow, S_IRUGO | S_IWUSR ,show_cpld_sysfs_value, set_cpld_sysfs_value, 0xa6);
|
||||||
|
static SENSOR_DEVICE_ATTR(sfp_led5_yellow, S_IRUGO | S_IWUSR ,show_cpld_sysfs_value, set_cpld_sysfs_value, 0xa7);
|
||||||
|
static SENSOR_DEVICE_ATTR(sfp_led6_yellow, S_IRUGO | S_IWUSR ,show_cpld_sysfs_value, set_cpld_sysfs_value, 0xa8);
|
||||||
|
static SENSOR_DEVICE_ATTR(sfp_led7_yellow, S_IRUGO | S_IWUSR ,show_cpld_sysfs_value, set_cpld_sysfs_value, 0xa9);
|
||||||
|
static SENSOR_DEVICE_ATTR(sfp_txdis4, S_IRUGO | S_IWUSR ,show_cpld_sysfs_value, set_cpld_sysfs_value, 0x60);
|
||||||
|
static SENSOR_DEVICE_ATTR(sfp_txdis5, S_IRUGO | S_IWUSR ,show_cpld_sysfs_value, set_cpld_sysfs_value, 0x61);
|
||||||
|
static SENSOR_DEVICE_ATTR(sfp_txdis6, S_IRUGO | S_IWUSR ,show_cpld_sysfs_value, set_cpld_sysfs_value, 0x62);
|
||||||
|
|
||||||
|
static SENSOR_DEVICE_ATTR(sfp_reset1, S_IRUGO | S_IWUSR ,show_cpld_sysfs_value, set_cpld_sysfs_value, 0xb9);
|
||||||
|
static SENSOR_DEVICE_ATTR(sfp_reset2, S_IRUGO | S_IWUSR ,show_cpld_sysfs_value, set_cpld_sysfs_value, 0xba);
|
||||||
|
static SENSOR_DEVICE_ATTR(sfp_reset3, S_IRUGO | S_IWUSR ,show_cpld_sysfs_value, set_cpld_sysfs_value, 0xbb);
|
||||||
|
static SENSOR_DEVICE_ATTR(sfp_reset4, S_IRUGO | S_IWUSR ,show_cpld_sysfs_value, set_cpld_sysfs_value, 0xbc);
|
||||||
|
|
||||||
|
static struct attribute *cpld32_sysfs_attrs[] = {
|
||||||
|
&sensor_dev_attr_fan_speed_set.dev_attr.attr,
|
||||||
|
&sensor_dev_attr_fan0_led.dev_attr.attr,
|
||||||
|
&sensor_dev_attr_fan1_led.dev_attr.attr,
|
||||||
|
&sensor_dev_attr_fan2_led.dev_attr.attr,
|
||||||
|
&sensor_dev_attr_fan3_led.dev_attr.attr,
|
||||||
|
&sensor_dev_attr_broad_back_lct.dev_attr.attr,
|
||||||
|
&sensor_dev_attr_broad_back_sys.dev_attr.attr,
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct attribute *cpld37_sysfs_attrs[] = {
|
||||||
|
&sensor_dev_attr_fan_present.dev_attr.attr,
|
||||||
|
&sensor_dev_attr_fan_status.dev_attr.attr,
|
||||||
|
&sensor_dev_attr_psu_status.dev_attr.attr,
|
||||||
|
&sensor_dev_attr_cpld_version.dev_attr.attr,
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct attribute *cpld33_sysfs_attrs[] = {
|
||||||
|
&sensor_dev_attr_mac_led.dev_attr.attr,
|
||||||
|
&sensor_dev_attr_broad_front_lct.dev_attr.attr,
|
||||||
|
&sensor_dev_attr_broad_front_bmc.dev_attr.attr,
|
||||||
|
&sensor_dev_attr_broad_front_cpu.dev_attr.attr,
|
||||||
|
&sensor_dev_attr_broad_front_pwr.dev_attr.attr,
|
||||||
|
&sensor_dev_attr_broad_front_fan.dev_attr.attr,
|
||||||
|
&sensor_dev_attr_cpld_version.dev_attr.attr,
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct attribute *cpld34_sysfs_attrs[] = {
|
||||||
|
&sensor_dev_attr_sfp_presence1.dev_attr.attr,
|
||||||
|
&sensor_dev_attr_sfp_presence2.dev_attr.attr,
|
||||||
|
&sensor_dev_attr_sfp_presence3.dev_attr.attr,
|
||||||
|
&sensor_dev_attr_sfp_presence8.dev_attr.attr,
|
||||||
|
&sensor_dev_attr_sfp_enable.dev_attr.attr,
|
||||||
|
&sensor_dev_attr_sfp_led1_red.dev_attr.attr,
|
||||||
|
&sensor_dev_attr_sfp_led2_red.dev_attr.attr,
|
||||||
|
&sensor_dev_attr_sfp_led3_red.dev_attr.attr,
|
||||||
|
&sensor_dev_attr_sfp_led8_red.dev_attr.attr,
|
||||||
|
&sensor_dev_attr_sfp_led1_yellow.dev_attr.attr,
|
||||||
|
&sensor_dev_attr_sfp_led2_yellow.dev_attr.attr,
|
||||||
|
&sensor_dev_attr_sfp_led3_yellow.dev_attr.attr,
|
||||||
|
&sensor_dev_attr_sfp_led8_yellow.dev_attr.attr,
|
||||||
|
&sensor_dev_attr_sfp_txdis1.dev_attr.attr,
|
||||||
|
&sensor_dev_attr_sfp_txdis2.dev_attr.attr,
|
||||||
|
&sensor_dev_attr_sfp_txdis3.dev_attr.attr,
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct attribute *cpld36_sysfs_attrs[] = {
|
||||||
|
&sensor_dev_attr_sfp_presence4.dev_attr.attr,
|
||||||
|
&sensor_dev_attr_sfp_presence5.dev_attr.attr,
|
||||||
|
&sensor_dev_attr_sfp_presence6.dev_attr.attr,
|
||||||
|
&sensor_dev_attr_sfp_presence7.dev_attr.attr,
|
||||||
|
&sensor_dev_attr_sfp_led4_red.dev_attr.attr,
|
||||||
|
&sensor_dev_attr_sfp_led5_red.dev_attr.attr,
|
||||||
|
&sensor_dev_attr_sfp_led6_red.dev_attr.attr,
|
||||||
|
&sensor_dev_attr_sfp_led7_red.dev_attr.attr,
|
||||||
|
&sensor_dev_attr_sfp_led4_yellow.dev_attr.attr,
|
||||||
|
&sensor_dev_attr_sfp_led5_yellow.dev_attr.attr,
|
||||||
|
&sensor_dev_attr_sfp_led6_yellow.dev_attr.attr,
|
||||||
|
&sensor_dev_attr_sfp_led7_yellow.dev_attr.attr,
|
||||||
|
&sensor_dev_attr_sfp_txdis4.dev_attr.attr,
|
||||||
|
&sensor_dev_attr_sfp_txdis5.dev_attr.attr,
|
||||||
|
&sensor_dev_attr_sfp_txdis6.dev_attr.attr,
|
||||||
|
&sensor_dev_attr_sfp_reset1.dev_attr.attr,
|
||||||
|
&sensor_dev_attr_sfp_reset2.dev_attr.attr,
|
||||||
|
&sensor_dev_attr_sfp_reset3.dev_attr.attr,
|
||||||
|
&sensor_dev_attr_sfp_reset4.dev_attr.attr,
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct attribute *cpld35_sysfs_attrs[] = {
|
||||||
|
&sensor_dev_attr_sfp_enable2.dev_attr.attr,
|
||||||
|
&sensor_dev_attr_broad_front_lct.dev_attr.attr,
|
||||||
|
&sensor_dev_attr_broad_front_bmc.dev_attr.attr,
|
||||||
|
&sensor_dev_attr_broad_front_cpu.dev_attr.attr,
|
||||||
|
&sensor_dev_attr_broad_front_pwr.dev_attr.attr,
|
||||||
|
&sensor_dev_attr_broad_front_fan.dev_attr.attr,
|
||||||
|
&sensor_dev_attr_cpld_version.dev_attr.attr,
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
|
||||||
|
static const struct attribute_group cpld32_sysfs_group = {
|
||||||
|
.attrs = cpld32_sysfs_attrs,
|
||||||
|
};
|
||||||
|
|
||||||
|
static const struct attribute_group cpld37_sysfs_group = {
|
||||||
|
.attrs = cpld37_sysfs_attrs,
|
||||||
|
};
|
||||||
|
|
||||||
|
static const struct attribute_group cpld33_sysfs_group = {
|
||||||
|
.attrs = cpld33_sysfs_attrs,
|
||||||
|
};
|
||||||
|
|
||||||
|
static const struct attribute_group cpld34_sysfs_group = {
|
||||||
|
.attrs = cpld34_sysfs_attrs,
|
||||||
|
};
|
||||||
|
|
||||||
|
static const struct attribute_group cpld36_sysfs_group = {
|
||||||
|
.attrs = cpld36_sysfs_attrs,
|
||||||
|
};
|
||||||
|
|
||||||
|
static const struct attribute_group cpld35_sysfs_group = {
|
||||||
|
.attrs = cpld35_sysfs_attrs,
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct attribute *cpld_hwmon_attrs[] = {
|
||||||
|
&sensor_dev_attr_fan1_input.dev_attr.attr,
|
||||||
|
&sensor_dev_attr_fan2_input.dev_attr.attr,
|
||||||
|
&sensor_dev_attr_fan3_input.dev_attr.attr,
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
ATTRIBUTE_GROUPS(cpld_hwmon);
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
static int cpld_detect(struct i2c_client *new_client, struct i2c_board_info *info)
|
||||||
|
{
|
||||||
|
struct i2c_adapter *adapter = new_client->adapter;
|
||||||
|
int conf;
|
||||||
|
DBG_DEBUG("=========cpld_detect(0x%x)===========\n", new_client->addr);
|
||||||
|
if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA |
|
||||||
|
I2C_FUNC_SMBUS_WORD_DATA))
|
||||||
|
return -ENODEV;
|
||||||
|
conf = i2c_smbus_read_byte_data(new_client, 0);
|
||||||
|
if (!conf) {
|
||||||
|
return -ENODEV;
|
||||||
|
}
|
||||||
|
strlcpy(info->type, "rg_cpld", I2C_NAME_SIZE);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
static int cpld_probe(struct i2c_client *client, const struct i2c_device_id *id)
|
||||||
|
{
|
||||||
|
struct cpld_data *data;
|
||||||
|
int status;
|
||||||
|
|
||||||
|
status = -1;
|
||||||
|
DBG_DEBUG("=========cpld_probe(0x%x)===========\n", client->addr);
|
||||||
|
data = devm_kzalloc(&client->dev, sizeof(struct cpld_data), GFP_KERNEL);
|
||||||
|
if (!data) {
|
||||||
|
return -ENOMEM;
|
||||||
|
}
|
||||||
|
|
||||||
|
data->client = client;
|
||||||
|
i2c_set_clientdata(client, data);
|
||||||
|
mutex_init(&data->update_lock);
|
||||||
|
|
||||||
|
switch (client->addr) {
|
||||||
|
case 0x32:
|
||||||
|
status = sysfs_create_group(&client->dev.kobj, &cpld32_sysfs_group);
|
||||||
|
break;
|
||||||
|
case 0x37:
|
||||||
|
status = sysfs_create_group(&client->dev.kobj, &cpld37_sysfs_group);
|
||||||
|
if (status != 0) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
data->hwmon_dev = hwmon_device_register_with_groups(&client->dev, client->name, data, cpld_hwmon_groups);
|
||||||
|
if (IS_ERR(data->hwmon_dev)) {
|
||||||
|
sysfs_remove_group(&client->dev.kobj, &cpld37_sysfs_group);
|
||||||
|
return PTR_ERR(data->hwmon_dev);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 0x33:
|
||||||
|
status = sysfs_create_group(&client->dev.kobj, &cpld33_sysfs_group);
|
||||||
|
break;
|
||||||
|
case 0x34:
|
||||||
|
status = sysfs_create_group(&client->dev.kobj, &cpld34_sysfs_group);
|
||||||
|
break;
|
||||||
|
case 0x35:
|
||||||
|
status = sysfs_create_group(&client->dev.kobj, &cpld35_sysfs_group);
|
||||||
|
break;
|
||||||
|
case 0x36:
|
||||||
|
status = sysfs_create_group(&client->dev.kobj, &cpld36_sysfs_group);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (status !=0) {
|
||||||
|
DBG_ERROR("%s %d sysfs_create_group err\n", __func__, __LINE__);
|
||||||
|
}
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int cpld_remove(struct i2c_client *client)
|
||||||
|
{
|
||||||
|
struct cpld_data *data = i2c_get_clientdata(client);
|
||||||
|
DBG_DEBUG("=========cpld_probe(0x%x)===========\n", client->addr);
|
||||||
|
switch (client->addr) {
|
||||||
|
case 0x32:
|
||||||
|
sysfs_remove_group(&client->dev.kobj, &cpld32_sysfs_group);
|
||||||
|
break;
|
||||||
|
case 0x37:
|
||||||
|
hwmon_device_unregister(data->hwmon_dev);
|
||||||
|
sysfs_remove_group(&client->dev.kobj, &cpld37_sysfs_group);
|
||||||
|
break;
|
||||||
|
case 0x33:
|
||||||
|
sysfs_remove_group(&client->dev.kobj, &cpld33_sysfs_group);
|
||||||
|
break;
|
||||||
|
case 0x34:
|
||||||
|
sysfs_remove_group(&client->dev.kobj, &cpld34_sysfs_group);
|
||||||
|
break;
|
||||||
|
case 0x35:
|
||||||
|
sysfs_remove_group(&client->dev.kobj, &cpld35_sysfs_group);
|
||||||
|
break;
|
||||||
|
case 0x36:
|
||||||
|
sysfs_remove_group(&client->dev.kobj, &cpld36_sysfs_group);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static const struct i2c_device_id cpld_id[] = {
|
||||||
|
{ "rg_cpld", 0 },
|
||||||
|
{}
|
||||||
|
};
|
||||||
|
MODULE_DEVICE_TABLE(i2c, cpld_id);
|
||||||
|
|
||||||
|
static struct i2c_driver rg_cpld_driver = {
|
||||||
|
.class = I2C_CLASS_HWMON,
|
||||||
|
.driver = {
|
||||||
|
.name = "rg_cpld",
|
||||||
|
},
|
||||||
|
.probe = cpld_probe,
|
||||||
|
.remove = cpld_remove,
|
||||||
|
.id_table = cpld_id,
|
||||||
|
/* .detect = cpld_detect, */
|
||||||
|
/* .address_list = rg_i2c_cpld, */
|
||||||
|
};
|
||||||
|
|
||||||
|
module_i2c_driver(rg_cpld_driver);
|
||||||
|
MODULE_AUTHOR("support <support@ragile.com>");
|
||||||
|
MODULE_DESCRIPTION("ragile CPLD driver");
|
||||||
|
MODULE_LICENSE("GPL");
|
@ -0,0 +1,31 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
count=10
|
||||||
|
while [ $count -gt 0 ]
|
||||||
|
do
|
||||||
|
lsmod | grep 9641 >/dev/null 2>&1
|
||||||
|
if [ $? -eq 0 ]
|
||||||
|
then
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
count=$(( count - 1 ))
|
||||||
|
sleep 1
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ $count -eq 0 ]
|
||||||
|
then
|
||||||
|
# mod not loaded
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -d "/sys/bus/i2c/devices/i2c-2" ]
|
||||||
|
then
|
||||||
|
echo pca9541 0x10 > /sys/bus/i2c/devices/i2c-0/new_device
|
||||||
|
if [ $? -ne 0 ]
|
||||||
|
then
|
||||||
|
exit $?
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
|
@ -0,0 +1,32 @@
|
|||||||
|
from setuptools import setup
|
||||||
|
|
||||||
|
setup(
|
||||||
|
name='sonic-platform',
|
||||||
|
version='1.0',
|
||||||
|
description='SONiC platform API implementation on RAGILE Platforms',
|
||||||
|
license='Apache 2.0',
|
||||||
|
author='SONiC Team',
|
||||||
|
author_email='support@ragile.com',
|
||||||
|
url='',
|
||||||
|
maintainer='RAGILE SUPPORT TEAM',
|
||||||
|
maintainer_email='',
|
||||||
|
packages=[
|
||||||
|
'sonic_platform',
|
||||||
|
'rgutil',
|
||||||
|
'eepromutil'
|
||||||
|
],
|
||||||
|
classifiers=[
|
||||||
|
'Development Status :: 3 - Alpha',
|
||||||
|
'Environment :: Plugins',
|
||||||
|
'Intended Audience :: Developers',
|
||||||
|
'Intended Audience :: Information Technology',
|
||||||
|
'Intended Audience :: System Administrators',
|
||||||
|
'License :: OSI Approved :: Apache Software License',
|
||||||
|
'Natural Language :: English',
|
||||||
|
'Operating System :: POSIX :: Linux',
|
||||||
|
'Programming Language :: Python :: 3.7',
|
||||||
|
'Topic :: Utilities',
|
||||||
|
],
|
||||||
|
keywords='sonic SONiC platform PLATFORM',
|
||||||
|
)
|
||||||
|
|
@ -0,0 +1,4 @@
|
|||||||
|
# All the derived classes for PDDF
|
||||||
|
__all__ = ["platform", "chassis", "sfp", "psu", "thermal", "fan"]
|
||||||
|
from . import platform
|
||||||
|
|
@ -0,0 +1,137 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
#############################################################################
|
||||||
|
# PDDF
|
||||||
|
# Module contains an implementation of SONiC Chassis API
|
||||||
|
#
|
||||||
|
#############################################################################
|
||||||
|
|
||||||
|
try:
|
||||||
|
import time
|
||||||
|
import subprocess
|
||||||
|
from sonic_platform_pddf_base.pddf_chassis import PddfChassis
|
||||||
|
from rgutil.logutil import Logger
|
||||||
|
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)
|
||||||
|
|
||||||
|
class Chassis(PddfChassis):
|
||||||
|
"""
|
||||||
|
PDDF Platform-specific Chassis class
|
||||||
|
"""
|
||||||
|
|
||||||
|
SFP_STATUS_INSERTED = "1"
|
||||||
|
SFP_STATUS_REMOVED = "0"
|
||||||
|
port_dict = {}
|
||||||
|
|
||||||
|
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"
|
||||||
|
|
||||||
|
def get_reboot_cause(self):
|
||||||
|
"""
|
||||||
|
Retrieves the cause of the previous reboot
|
||||||
|
Returns:
|
||||||
|
A tuple (string, string) where the first element is a string
|
||||||
|
containing the cause of the previous reboot. This string must be
|
||||||
|
one of the predefined strings in this class. If the first string
|
||||||
|
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)
|
||||||
|
|
||||||
|
def get_change_event(self, timeout=0):
|
||||||
|
change_event_dict = {"fan": {}, "sfp": {}}
|
||||||
|
sfp_status, sfp_change_dict = self.get_transceiver_change_event(timeout)
|
||||||
|
change_event_dict["sfp"] = sfp_change_dict
|
||||||
|
if sfp_status is True:
|
||||||
|
return True, change_event_dict
|
||||||
|
|
||||||
|
return False, {}
|
||||||
|
|
||||||
|
def get_transceiver_change_event(self, timeout=0):
|
||||||
|
start_time = time.time()
|
||||||
|
currernt_port_dict = {}
|
||||||
|
forever = False
|
||||||
|
|
||||||
|
if timeout == 0:
|
||||||
|
forever = True
|
||||||
|
elif timeout > 0:
|
||||||
|
timeout = timeout / float(1000) # Convert to secs
|
||||||
|
else:
|
||||||
|
print("get_transceiver_change_event:Invalid timeout value", timeout)
|
||||||
|
return False, {}
|
||||||
|
|
||||||
|
end_time = start_time + timeout
|
||||||
|
if start_time > end_time:
|
||||||
|
print(
|
||||||
|
"get_transceiver_change_event:" "time wrap / invalid timeout value",
|
||||||
|
timeout,
|
||||||
|
)
|
||||||
|
return False, {} # Time wrap or possibly incorrect timeout
|
||||||
|
|
||||||
|
while timeout >= 0:
|
||||||
|
# Check for OIR events and return updated port_dict
|
||||||
|
for index in range(PORT_START, PORTS_IN_BLOCK):
|
||||||
|
if self._sfp_list[index].get_presence():
|
||||||
|
currernt_port_dict[index] = self.SFP_STATUS_INSERTED
|
||||||
|
else:
|
||||||
|
currernt_port_dict[index] = self.SFP_STATUS_REMOVED
|
||||||
|
if currernt_port_dict == self.port_dict:
|
||||||
|
if forever:
|
||||||
|
time.sleep(1)
|
||||||
|
else:
|
||||||
|
timeout = end_time - time.time()
|
||||||
|
if timeout >= 1:
|
||||||
|
time.sleep(1) # We poll at 1 second granularity
|
||||||
|
else:
|
||||||
|
if timeout > 0:
|
||||||
|
time.sleep(timeout)
|
||||||
|
return True, {}
|
||||||
|
else:
|
||||||
|
# Update reg value
|
||||||
|
self.port_dict = currernt_port_dict
|
||||||
|
print(self.port_dict)
|
||||||
|
return True, self.port_dict
|
||||||
|
print("get_transceiver_change_event: Should not reach here.")
|
||||||
|
return False, {}
|
@ -0,0 +1,44 @@
|
|||||||
|
import os
|
||||||
|
import yaml
|
||||||
|
|
||||||
|
from sonic_py_common import device_info
|
||||||
|
|
||||||
|
|
||||||
|
class Common:
|
||||||
|
|
||||||
|
DEVICE_PATH = '/usr/share/sonic/device/'
|
||||||
|
PMON_PLATFORM_PATH = '/usr/share/sonic/platform/'
|
||||||
|
CONFIG_DIR = 'sonic_platform_config'
|
||||||
|
|
||||||
|
HOST_CHK_CMD = "docker > /dev/null 2>&1"
|
||||||
|
|
||||||
|
def __init__(self):
|
||||||
|
(self.platform, self.hwsku) = device_info.get_platform_and_hwsku()
|
||||||
|
|
||||||
|
def is_host(self):
|
||||||
|
return os.system(self.HOST_CHK_CMD) == 0
|
||||||
|
|
||||||
|
def load_json_file(self, path):
|
||||||
|
"""
|
||||||
|
Retrieves the json object from json file path
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
A json object
|
||||||
|
"""
|
||||||
|
with open(path, 'r') as f:
|
||||||
|
json_data = yaml.safe_load(f)
|
||||||
|
|
||||||
|
return json_data
|
||||||
|
|
||||||
|
def get_config_path(self, config_name):
|
||||||
|
"""
|
||||||
|
Retrieves the path to platform api config directory
|
||||||
|
|
||||||
|
Args:
|
||||||
|
config_name: A string containing the name of config file.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
A string containing the path to json file
|
||||||
|
"""
|
||||||
|
return os.path.join(self.DEVICE_PATH, self.platform, self.CONFIG_DIR, config_name) if self.is_host() else os.path.join(self.PMON_PLATFORM_PATH, self.CONFIG_DIR, config_name)
|
||||||
|
|
@ -0,0 +1,14 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
try:
|
||||||
|
from sonic_platform_pddf_base.pddf_eeprom import PddfEeprom
|
||||||
|
except ImportError as e:
|
||||||
|
raise ImportError(str(e) + "- required module not found")
|
||||||
|
|
||||||
|
|
||||||
|
class Eeprom(PddfEeprom):
|
||||||
|
|
||||||
|
def __init__(self, pddf_data=None, pddf_plugin_data=None):
|
||||||
|
PddfEeprom.__init__(self, pddf_data, pddf_plugin_data)
|
||||||
|
|
||||||
|
# Provide the functions/variables below for which implementation is to be overwritten
|
@ -0,0 +1,39 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
|
||||||
|
try:
|
||||||
|
from sonic_platform_pddf_base.pddf_fan import PddfFan
|
||||||
|
except ImportError as e:
|
||||||
|
raise ImportError(str(e) + "- required module not found")
|
||||||
|
|
||||||
|
|
||||||
|
class Fan(PddfFan):
|
||||||
|
"""PDDF Platform-Specific Fan class"""
|
||||||
|
|
||||||
|
def __init__(self, tray_idx, fan_idx=0, pddf_data=None, pddf_plugin_data=None, is_psu_fan=False, psu_index=0):
|
||||||
|
# idx is 0-based
|
||||||
|
PddfFan.__init__(self, tray_idx, fan_idx, pddf_data, pddf_plugin_data, is_psu_fan, psu_index)
|
||||||
|
|
||||||
|
# Provide the functions/variables below for which implementation is to be overwritten
|
||||||
|
# Since psu_fan airflow direction cant be read from sysfs, it is fixed as 'F2B' or 'intake'
|
||||||
|
def get_direction(self):
|
||||||
|
"""
|
||||||
|
Retrieves the direction of fan
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
A string, either FAN_DIRECTION_INTAKE or FAN_DIRECTION_EXHAUST
|
||||||
|
depending on fan direction
|
||||||
|
"""
|
||||||
|
return self.FAN_DIRECTION_EXHAUST
|
||||||
|
|
||||||
|
def get_speed_rpm(self):
|
||||||
|
if self.is_psu_fan:
|
||||||
|
return super().get_speed_rpm()
|
||||||
|
else:
|
||||||
|
divisor = 15000000
|
||||||
|
mask_low = 0xff
|
||||||
|
ret = super().get_speed_rpm()
|
||||||
|
# revert ret
|
||||||
|
ret = (ret >> 8) + ((ret & mask_low) << 8)
|
||||||
|
return int(divisor/ret)
|
||||||
|
|
@ -0,0 +1,71 @@
|
|||||||
|
#
|
||||||
|
# fan_drawer_base.py
|
||||||
|
#
|
||||||
|
# Abstract base class for implementing a platform-specific class with which
|
||||||
|
# to interact with a fan drawer module in SONiC
|
||||||
|
#
|
||||||
|
|
||||||
|
try:
|
||||||
|
from sonic_platform_base.fan_drawer_base import FanDrawerBase
|
||||||
|
except ImportError as e:
|
||||||
|
raise ImportError(str(e) + "- required module not found")
|
||||||
|
|
||||||
|
|
||||||
|
class FanDrawer(FanDrawerBase):
|
||||||
|
"""
|
||||||
|
Abstract base class for interfacing with a fan drawer
|
||||||
|
"""
|
||||||
|
# Device type definition. Note, this is a constant.
|
||||||
|
DEVICE_TYPE = "fan_drawer"
|
||||||
|
|
||||||
|
def __init__(self, index, fan_list):
|
||||||
|
FanDrawerBase.__init__(self)
|
||||||
|
|
||||||
|
self._fan_list = fan_list
|
||||||
|
self._index = index
|
||||||
|
|
||||||
|
def get_name(self):
|
||||||
|
"""
|
||||||
|
Retrieves the name of the device
|
||||||
|
Returns:
|
||||||
|
string: The name of the device
|
||||||
|
"""
|
||||||
|
|
||||||
|
return "fan {}".format(self._index)
|
||||||
|
|
||||||
|
def get_num_fans(self):
|
||||||
|
"""
|
||||||
|
Retrieves the number of fans available on this fan drawer
|
||||||
|
Returns:
|
||||||
|
An integer, the number of fan modules available on this fan drawer
|
||||||
|
"""
|
||||||
|
return len(self._fan_list)
|
||||||
|
|
||||||
|
def get_all_fans(self):
|
||||||
|
"""
|
||||||
|
Retrieves all fan modules available on this fan drawer
|
||||||
|
Returns:
|
||||||
|
A list of objects derived from FanBase representing all fan
|
||||||
|
modules available on this fan drawer
|
||||||
|
"""
|
||||||
|
return self._fan_list
|
||||||
|
|
||||||
|
def set_status_led(self, color):
|
||||||
|
"""
|
||||||
|
Sets the state of the fan drawer status LED
|
||||||
|
Args:
|
||||||
|
color: A string representing the color with which to set the
|
||||||
|
fan drawer status LED
|
||||||
|
Returns:
|
||||||
|
bool: True if status LED state is set successfully, False if not
|
||||||
|
"""
|
||||||
|
return self._fan_list[self._index].set_status_led(color)
|
||||||
|
|
||||||
|
def get_status_led(self, color):
|
||||||
|
"""
|
||||||
|
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)
|
||||||
|
|
@ -0,0 +1,25 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
#############################################################################
|
||||||
|
# PDDF
|
||||||
|
# Module contains an implementation of SONiC Platform Base API and
|
||||||
|
# provides the platform information
|
||||||
|
#
|
||||||
|
#############################################################################
|
||||||
|
|
||||||
|
|
||||||
|
try:
|
||||||
|
from sonic_platform_pddf_base.pddf_platform import PddfPlatform
|
||||||
|
except ImportError as e:
|
||||||
|
raise ImportError(str(e) + "- required module not found")
|
||||||
|
|
||||||
|
|
||||||
|
class Platform(PddfPlatform):
|
||||||
|
"""
|
||||||
|
PDDF Platform-Specific Platform Class
|
||||||
|
"""
|
||||||
|
|
||||||
|
def __init__(self):
|
||||||
|
PddfPlatform.__init__(self)
|
||||||
|
|
||||||
|
# Provide the functions/variables below for which implementation is to be overwritten
|
@ -0,0 +1,36 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
try:
|
||||||
|
from sonic_platform_pddf_base.pddf_psu import PddfPsu
|
||||||
|
except ImportError as e:
|
||||||
|
raise ImportError (str(e) + "- required module not found")
|
||||||
|
|
||||||
|
|
||||||
|
class Psu(PddfPsu):
|
||||||
|
"""PDDF Platform-Specific PSU class"""
|
||||||
|
|
||||||
|
PLATFORM_PSU_CAPACITY = 1200
|
||||||
|
|
||||||
|
def __init__(self, index, pddf_data=None, pddf_plugin_data=None):
|
||||||
|
PddfPsu.__init__(self, index, pddf_data, pddf_plugin_data)
|
||||||
|
|
||||||
|
# Provide the functions/variables below for which implementation is to be overwritten
|
||||||
|
def get_maximum_supplied_power(self):
|
||||||
|
"""
|
||||||
|
Retrieves the maximum supplied power by PSU (or PSU capacity)
|
||||||
|
Returns:
|
||||||
|
A float number, the maximum power output in Watts.
|
||||||
|
e.g. 1200.1
|
||||||
|
"""
|
||||||
|
return float(self.PLATFORM_PSU_CAPACITY)
|
||||||
|
|
||||||
|
def get_type(self):
|
||||||
|
"""
|
||||||
|
Gets the type of the PSU
|
||||||
|
Returns:
|
||||||
|
A string, the type of PSU (AC/DC)
|
||||||
|
"""
|
||||||
|
return "DC"
|
||||||
|
|
@ -0,0 +1,17 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
try:
|
||||||
|
from sonic_platform_pddf_base.pddf_sfp import PddfSfp
|
||||||
|
except ImportError as e:
|
||||||
|
raise ImportError (str(e) + "- required module not found")
|
||||||
|
|
||||||
|
|
||||||
|
class Sfp(PddfSfp):
|
||||||
|
"""
|
||||||
|
PDDF Platform-Specific Sfp class
|
||||||
|
"""
|
||||||
|
|
||||||
|
def __init__(self, index, pddf_data=None, pddf_plugin_data=None):
|
||||||
|
PddfSfp.__init__(self, index, pddf_data, pddf_plugin_data)
|
||||||
|
|
||||||
|
# Provide the functions/variables below for which implementation is to be overwritten
|
@ -0,0 +1,17 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
|
||||||
|
try:
|
||||||
|
from sonic_platform_pddf_base.pddf_thermal import PddfThermal
|
||||||
|
except ImportError as e:
|
||||||
|
raise ImportError(str(e) + "- required module not found")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class Thermal(PddfThermal):
|
||||||
|
"""PDDF Platform-Specific Thermal class"""
|
||||||
|
|
||||||
|
def __init__(self, index, pddf_data=None, pddf_plugin_data=None):
|
||||||
|
PddfThermal.__init__(self, index, pddf_data, pddf_plugin_data)
|
||||||
|
|
||||||
|
# Provide the functions/variables below for which implementation is to be overwritten
|
@ -0,0 +1,23 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
#############################################################################
|
||||||
|
#
|
||||||
|
# Module contains an implementation of platform specific watchdog API's
|
||||||
|
#
|
||||||
|
#############################################################################
|
||||||
|
|
||||||
|
try:
|
||||||
|
from sonic_platform_pddf_base.pddf_watchdog import PddfWatchdog
|
||||||
|
except ImportError as e:
|
||||||
|
raise ImportError(str(e) + "- required module not found")
|
||||||
|
|
||||||
|
class Watchdog(PddfWatchdog):
|
||||||
|
"""
|
||||||
|
PDDF Platform-specific Chassis class
|
||||||
|
"""
|
||||||
|
|
||||||
|
def __init__(self):
|
||||||
|
PddfWatchdog.__init__(self)
|
||||||
|
self.timeout= 180
|
||||||
|
|
||||||
|
# Provide the functions/variables below for which implementation is to be overwritten
|
@ -0,0 +1 @@
|
|||||||
|
../../../../pddf/i2c/service/pddf-platform-init.service
|
@ -257,3 +257,32 @@ appl_param_module_id
|
|||||||
serdes_lane_config_cl72_auto_polarity_en
|
serdes_lane_config_cl72_auto_polarity_en
|
||||||
serdes_lane_config_cl72_restart_timeout_en
|
serdes_lane_config_cl72_restart_timeout_en
|
||||||
bist_enable
|
bist_enable
|
||||||
|
mmu_config_override
|
||||||
|
buf.prigroup.guarantee
|
||||||
|
buf.prigroup.device_headroom_enable
|
||||||
|
buf.prigroup.pool_resume
|
||||||
|
buf.prigroup.pool_scale
|
||||||
|
buf.prigroup.port_guarantee_enable
|
||||||
|
buf.prigroup.port_max_enable
|
||||||
|
buf.prigroup.flow_control_enable
|
||||||
|
buf.queue.pool_scale
|
||||||
|
buf.mqueue.pool_scale
|
||||||
|
buf.queue.pool_scale
|
||||||
|
buf.mqueue.pool_scale
|
||||||
|
buf.mqueue.pool_scale_cpu
|
||||||
|
buf.queue.qgroup_guarantee_enable
|
||||||
|
profile_pg_1hdrm_8shared
|
||||||
|
buf.map.pri.prigroup
|
||||||
|
udp_port
|
||||||
|
multi_hash_recurse_depth_exact_match
|
||||||
|
robust_hash_seed_exact_match
|
||||||
|
my_udp_port_int
|
||||||
|
server_udp_port_int
|
||||||
|
probe_marker1_int
|
||||||
|
probe_marker2_int
|
||||||
|
hoplimit_int
|
||||||
|
lb_port_pipe0_int
|
||||||
|
lb_port_pipe1_int
|
||||||
|
ing_origin_id_device_id_mask
|
||||||
|
egr_origin_id_device_id_mask
|
||||||
|
port_count_in_pb_stream
|
||||||
|
Loading…
Reference in New Issue
Block a user