From 10ae1f32e786119ac07eef5ec9785d6e594a9041 Mon Sep 17 00:00:00 2001 From: paavaanan Date: Fri, 22 Jun 2018 23:18:44 +0530 Subject: [PATCH] [devices]: DellEMC new platform support for z9264f - 64x100 (#26) * Added new platform support DellEMC - Z92264f - 64x100 * Includes changes with Makefiles, sfputil, eeprom and default minigraph * Led support for Z9264f platform * Includes changes on default minigraph * ipmitool implementation in pmon docker. platform_sensors script is inclued in pmon startup --- .../DellEMC-Z9264f/port_config.ini | 65 + .../DellEMC-Z9264f/sai.profile | 1 + .../installer.conf | 3 + .../led_proc_init.soc | 111 ++ .../minigraph.xml | 1541 +++++++++++++++++ .../plugins/eeprom.py | 22 + .../plugins/psuutil.py | 97 ++ .../plugins/sfputil.py | 192 ++ dockers/docker-platform-monitor/Dockerfile.j2 | 2 +- files/build_templates/docker_image_ctl.j2 | 11 + platform/broadcom/one-image.mk | 1 + platform/broadcom/platform-modules-dell.mk | 9 +- platform/broadcom/sonic-platform-modules-dell | 2 +- 13 files changed, 2054 insertions(+), 3 deletions(-) create mode 100644 device/dell/x86_64-dellemc_z9264f_c3538-r0/DellEMC-Z9264f/port_config.ini create mode 100644 device/dell/x86_64-dellemc_z9264f_c3538-r0/DellEMC-Z9264f/sai.profile create mode 100644 device/dell/x86_64-dellemc_z9264f_c3538-r0/installer.conf create mode 100644 device/dell/x86_64-dellemc_z9264f_c3538-r0/led_proc_init.soc create mode 100644 device/dell/x86_64-dellemc_z9264f_c3538-r0/minigraph.xml create mode 100644 device/dell/x86_64-dellemc_z9264f_c3538-r0/plugins/eeprom.py create mode 100644 device/dell/x86_64-dellemc_z9264f_c3538-r0/plugins/psuutil.py create mode 100644 device/dell/x86_64-dellemc_z9264f_c3538-r0/plugins/sfputil.py diff --git a/device/dell/x86_64-dellemc_z9264f_c3538-r0/DellEMC-Z9264f/port_config.ini b/device/dell/x86_64-dellemc_z9264f_c3538-r0/DellEMC-Z9264f/port_config.ini new file mode 100644 index 000000000000..2ae02b21b49c --- /dev/null +++ b/device/dell/x86_64-dellemc_z9264f_c3538-r0/DellEMC-Z9264f/port_config.ini @@ -0,0 +1,65 @@ +# name lanes alias index +Ethernet0 49,50,51,52 hundredGigE1/1 0 +Ethernet4 53,54,55,56 hundredGigE1/2 1 +Ethernet8 65,66,67,68 hundredGigE1/3 2 +Ethernet12 69,70,71,72 hundredGigE1/4 3 +Ethernet16 81,82,83,84 hundredGigE1/5 4 +Ethernet20 85,86,87,88 hundredGigE1/6 5 +Ethernet24 97,98,99,100 hundredGigE1/7 6 +Ethernet28 101,102,103,104 hundredGigE1/8 7 +Ethernet32 1,2,3,4 hundredGigE1/9 8 +Ethernet36 5,6,7,8 hundredGigE1/10 9 +Ethernet40 17,18,19,20 hundredGigE1/11 10 +Ethernet44 21,22,23,24 hundredGigE1/12 11 +Ethernet48 33,34,35,36 hundredGigE1/13 12 +Ethernet52 37,38,39,40 hundredGigE1/14 13 +Ethernet56 113,114,115,116 hundredGigE1/15 14 +Ethernet60 117,118,119,120 hundredGigE1/16 15 +Ethernet64 133,134,135,136 hundredGigE1/17 16 +Ethernet68 129,130,131,132 hundredGigE1/18 17 +Ethernet72 213,214,215,216 hundredGigE1/19 18 +Ethernet76 209,210,211,212 hundredGigE1/20 19 +Ethernet80 229,230,231,232 hundredGigE1/21 20 +Ethernet84 225,226,227,228 hundredGigE1/22 21 +Ethernet88 245,246,247,248 hundredGigE1/23 22 +Ethernet92 241,242,243,244 hundredGigE1/24 23 +Ethernet96 149,150,151,152 hundredGigE1/25 24 +Ethernet100 145,146,147,148 hundredGigE1/26 25 +Ethernet104 165,166,167,168 hundredGigE1/27 26 +Ethernet108 161,162,163,164 hundredGigE1/28 27 +Ethernet112 181,182,183,184 hundredGigE1/29 28 +Ethernet116 177,178,179,180 hundredGigE1/30 29 +Ethernet120 197,198,199,200 hundredGigE1/31 30 +Ethernet124 193,194,195,196 hundredGigE1/32 31 +Ethernet128 61,62,63,64 hundredGigE1/33 32 +Ethernet132 57,58,59,60 hundredGigE1/34 33 +Ethernet136 77,78,79,80 hundredGigE1/35 34 +Ethernet140 73,74,75,76 hundredGigE1/36 35 +Ethernet144 93,94,95,96 hundredGigE1/37 36 +Ethernet148 89,90,91,92 hundredGigE1/38 37 +Ethernet152 109,110,111,112 hundredGigE1/39 38 +Ethernet156 105,106,107,108 hundredGigE1/40 39 +Ethernet160 13,14,15,16 hundredGigE1/41 40 +Ethernet164 9,10,11,12 hundredGigE1/42 41 +Ethernet168 29,30,31,32 hundredGigE1/43 42 +Ethernet172 25,26,27,28 hundredGigE1/44 43 +Ethernet176 45,46,47,48 hundredGigE1/45 44 +Ethernet180 41,42,43,44 hundredGigE1/46 45 +Ethernet184 125,126,127,128 hundredGigE1/47 46 +Ethernet188 121,122,123,124 hundredGigE1/48 47 +Ethernet192 137,138,139,140 hundredGigE1/49 48 +Ethernet196 141,142,143,144 hundredGigE1/50 49 +Ethernet200 217,218,219,220 hundredGigE1/51 50 +Ethernet204 221,222,223,224 hundredGigE1/52 51 +Ethernet208 233,234,235,236 hundredGigE1/53 52 +Ethernet212 237,238,239,240 hundredGigE1/54 53 +Ethernet216 249,250,251,252 hundredGigE1/55 54 +Ethernet220 253,254,255,256 hundredGigE1/56 55 +Ethernet224 153,154,155,156 hundredGigE1/57 56 +Ethernet228 157,158,159,160 hundredGigE1/58 57 +Ethernet232 169,170,171,172 hundredGigE1/59 58 +Ethernet236 173,174,175,176 hundredGigE1/60 59 +Ethernet240 185,186,187,188 hundredGigE1/61 60 +Ethernet244 189,190,191,192 hundredGigE1/62 61 +Ethernet248 201,202,203,204 hundredGigE1/63 62 +Ethernet252 205,206,207,208 hundredGigE1/64 63 diff --git a/device/dell/x86_64-dellemc_z9264f_c3538-r0/DellEMC-Z9264f/sai.profile b/device/dell/x86_64-dellemc_z9264f_c3538-r0/DellEMC-Z9264f/sai.profile new file mode 100644 index 000000000000..a1755e764616 --- /dev/null +++ b/device/dell/x86_64-dellemc_z9264f_c3538-r0/DellEMC-Z9264f/sai.profile @@ -0,0 +1 @@ +SAI_INIT_CONFIG_FILE=/etc/bcm/th2-z9264f-64x100G.config.bcm diff --git a/device/dell/x86_64-dellemc_z9264f_c3538-r0/installer.conf b/device/dell/x86_64-dellemc_z9264f_c3538-r0/installer.conf new file mode 100644 index 000000000000..925a32fc0c3a --- /dev/null +++ b/device/dell/x86_64-dellemc_z9264f_c3538-r0/installer.conf @@ -0,0 +1,3 @@ +CONSOLE_PORT=0x3f8 +CONSOLE_DEV=0 +CONSOLE_SPEED=115200 diff --git a/device/dell/x86_64-dellemc_z9264f_c3538-r0/led_proc_init.soc b/device/dell/x86_64-dellemc_z9264f_c3538-r0/led_proc_init.soc new file mode 100644 index 000000000000..d38282b6508e --- /dev/null +++ b/device/dell/x86_64-dellemc_z9264f_c3538-r0/led_proc_init.soc @@ -0,0 +1,111 @@ +# LED microprocessor initialization for DellEMC-Z9264f + +m CMIC_LEDUP0_PORT_ORDER_REMAP_0_3 REMAP_PORT_3=32 REMAP_PORT_2=33 REMAP_PORT_1=34 REMAP_PORT_0=35 +m CMIC_LEDUP0_PORT_ORDER_REMAP_4_7 REMAP_PORT_7=36 REMAP_PORT_6=37 REMAP_PORT_5=38 REMAP_PORT_4=39 +m CMIC_LEDUP0_PORT_ORDER_REMAP_8_11 REMAP_PORT_11=4 REMAP_PORT_10=5 REMAP_PORT_9=6 REMAP_PORT_8=7 +m CMIC_LEDUP0_PORT_ORDER_REMAP_12_15 REMAP_PORT_15=0 REMAP_PORT_14=1 REMAP_PORT_13=2 REMAP_PORT_12=3 +m CMIC_LEDUP0_PORT_ORDER_REMAP_16_19 REMAP_PORT_19=56 REMAP_PORT_18=57 REMAP_PORT_17=58 REMAP_PORT_16=59 +m CMIC_LEDUP0_PORT_ORDER_REMAP_20_23 REMAP_PORT_23=60 REMAP_PORT_22=61 REMAP_PORT_21=62 REMAP_PORT_20=63 +m CMIC_LEDUP0_PORT_ORDER_REMAP_24_27 REMAP_PORT_27=28 REMAP_PORT_26=29 REMAP_PORT_25=30 REMAP_PORT_24=31 +m CMIC_LEDUP0_PORT_ORDER_REMAP_28_31 REMAP_PORT_31=24 REMAP_PORT_30=25 REMAP_PORT_29=26 REMAP_PORT_28=27 +m CMIC_LEDUP0_PORT_ORDER_REMAP_32_35 REMAP_PORT_35=48 REMAP_PORT_34=49 REMAP_PORT_33=50 REMAP_PORT_32=51 +m CMIC_LEDUP0_PORT_ORDER_REMAP_36_39 REMAP_PORT_39=52 REMAP_PORT_38=53 REMAP_PORT_37=54 REMAP_PORT_36=55 +m CMIC_LEDUP0_PORT_ORDER_REMAP_40_43 REMAP_PORT_43=20 REMAP_PORT_42=21 REMAP_PORT_41=22 REMAP_PORT_40=23 +m CMIC_LEDUP0_PORT_ORDER_REMAP_44_47 REMAP_PORT_47=16 REMAP_PORT_46=17 REMAP_PORT_45=18 REMAP_PORT_44=19 +m CMIC_LEDUP0_PORT_ORDER_REMAP_48_51 REMAP_PORT_51=40 REMAP_PORT_50=41 REMAP_PORT_49=42 REMAP_PORT_48=43 +m CMIC_LEDUP0_PORT_ORDER_REMAP_52_55 REMAP_PORT_55=44 REMAP_PORT_54=45 REMAP_PORT_53=46 REMAP_PORT_52=47 +m CMIC_LEDUP0_PORT_ORDER_REMAP_56_59 REMAP_PORT_59=12 REMAP_PORT_58=13 REMAP_PORT_57=14 REMAP_PORT_56=15 +m CMIC_LEDUP0_PORT_ORDER_REMAP_60_63 REMAP_PORT_63=8 REMAP_PORT_62=9 REMAP_PORT_61=10 REMAP_PORT_60=11 +m CMIC_LEDUP1_PORT_ORDER_REMAP_0_3 REMAP_PORT_3=0 REMAP_PORT_2=1 REMAP_PORT_1=2 REMAP_PORT_0=3 +m CMIC_LEDUP1_PORT_ORDER_REMAP_4_7 REMAP_PORT_7=4 REMAP_PORT_6=5 REMAP_PORT_5=6 REMAP_PORT_4=7 +m CMIC_LEDUP1_PORT_ORDER_REMAP_8_11 REMAP_PORT_9=38 REMAP_PORT_8=39 REMAP_PORT_11=36 REMAP_PORT_10=37 +m CMIC_LEDUP1_PORT_ORDER_REMAP_12_15 REMAP_PORT_15=32 REMAP_PORT_14=33 REMAP_PORT_13=34 REMAP_PORT_12=35 +m CMIC_LEDUP1_PORT_ORDER_REMAP_16_19 REMAP_PORT_19=8 REMAP_PORT_18=9 REMAP_PORT_17=10 REMAP_PORT_16=11 +m CMIC_LEDUP1_PORT_ORDER_REMAP_20_23 REMAP_PORT_23=12 REMAP_PORT_22=13 REMAP_PORT_21=14 REMAP_PORT_20=15 +m CMIC_LEDUP1_PORT_ORDER_REMAP_24_27 REMAP_PORT_27=44 REMAP_PORT_26=45 REMAP_PORT_25=46 REMAP_PORT_24=47 +m CMIC_LEDUP1_PORT_ORDER_REMAP_28_31 REMAP_PORT_31=40 REMAP_PORT_30=41 REMAP_PORT_29=42 REMAP_PORT_28=43 +m CMIC_LEDUP1_PORT_ORDER_REMAP_32_35 REMAP_PORT_35=16 REMAP_PORT_34=17 REMAP_PORT_33=18 REMAP_PORT_32=19 +m CMIC_LEDUP1_PORT_ORDER_REMAP_36_39 REMAP_PORT_39=20 REMAP_PORT_38=21 REMAP_PORT_37=22 REMAP_PORT_36=23 +m CMIC_LEDUP1_PORT_ORDER_REMAP_40_43 REMAP_PORT_43=52 REMAP_PORT_42=53 REMAP_PORT_41=54 REMAP_PORT_40=55 +m CMIC_LEDUP1_PORT_ORDER_REMAP_44_47 REMAP_PORT_47=48 REMAP_PORT_46=49 REMAP_PORT_45=50 REMAP_PORT_44=51 +m CMIC_LEDUP1_PORT_ORDER_REMAP_48_51 REMAP_PORT_51=24 REMAP_PORT_50=25 REMAP_PORT_49=26 REMAP_PORT_48=27 +m CMIC_LEDUP1_PORT_ORDER_REMAP_52_55 REMAP_PORT_55=28 REMAP_PORT_54=29 REMAP_PORT_53=30 REMAP_PORT_52=31 +m CMIC_LEDUP1_PORT_ORDER_REMAP_56_59 REMAP_PORT_59=60 REMAP_PORT_58=61 REMAP_PORT_57=62 REMAP_PORT_56=63 +m CMIC_LEDUP1_PORT_ORDER_REMAP_60_63 REMAP_PORT_63=56 REMAP_PORT_62=57 REMAP_PORT_61=58 REMAP_PORT_60=59 +m CMIC_LEDUP2_PORT_ORDER_REMAP_0_3 REMAP_PORT_3=60 REMAP_PORT_2=61 REMAP_PORT_1=62 REMAP_PORT_0=63 +m CMIC_LEDUP2_PORT_ORDER_REMAP_4_7 REMAP_PORT_7=56 REMAP_PORT_6=57 REMAP_PORT_5=58 REMAP_PORT_4=59 +m CMIC_LEDUP2_PORT_ORDER_REMAP_8_11 REMAP_PORT_11=24 REMAP_PORT_10=25 REMAP_PORT_9=26 REMAP_PORT_8=27 +m CMIC_LEDUP2_PORT_ORDER_REMAP_12_15 REMAP_PORT_15=28 REMAP_PORT_14=29 REMAP_PORT_13=30 REMAP_PORT_12=31 +m CMIC_LEDUP2_PORT_ORDER_REMAP_16_19 REMAP_PORT_19=52 REMAP_PORT_18=53 REMAP_PORT_17=54 REMAP_PORT_16=55 +m CMIC_LEDUP2_PORT_ORDER_REMAP_20_23 REMAP_PORT_23=48 REMAP_PORT_22=49 REMAP_PORT_21=50 REMAP_PORT_20=51 +m CMIC_LEDUP2_PORT_ORDER_REMAP_24_27 REMAP_PORT_27=16 REMAP_PORT_26=17 REMAP_PORT_25=18 REMAP_PORT_24=19 +m CMIC_LEDUP2_PORT_ORDER_REMAP_28_31 REMAP_PORT_31=20 REMAP_PORT_30=21 REMAP_PORT_29=22 REMAP_PORT_28=23 +m CMIC_LEDUP2_PORT_ORDER_REMAP_32_35 REMAP_PORT_35=44 REMAP_PORT_34=45 REMAP_PORT_33=46 REMAP_PORT_32=47 +m CMIC_LEDUP2_PORT_ORDER_REMAP_36_39 REMAP_PORT_39=40 REMAP_PORT_38=41 REMAP_PORT_37=42 REMAP_PORT_36=43 +m CMIC_LEDUP2_PORT_ORDER_REMAP_40_43 REMAP_PORT_43=8 REMAP_PORT_42=9 REMAP_PORT_41=10 REMAP_PORT_40=11 +m CMIC_LEDUP2_PORT_ORDER_REMAP_44_47 REMAP_PORT_47=12 REMAP_PORT_46=13 REMAP_PORT_45=14 REMAP_PORT_44=15 +m CMIC_LEDUP2_PORT_ORDER_REMAP_48_51 REMAP_PORT_51=36 REMAP_PORT_50=37 REMAP_PORT_49=38 REMAP_PORT_48=39 +m CMIC_LEDUP2_PORT_ORDER_REMAP_52_55 REMAP_PORT_55=32 REMAP_PORT_54=33 REMAP_PORT_53=34 REMAP_PORT_52=35 +m CMIC_LEDUP2_PORT_ORDER_REMAP_56_59 REMAP_PORT_59=0 REMAP_PORT_58=1 REMAP_PORT_57=2 REMAP_PORT_56=3 +m CMIC_LEDUP2_PORT_ORDER_REMAP_60_63 REMAP_PORT_63=4 REMAP_PORT_62=5 REMAP_PORT_61=6 REMAP_PORT_60=7 +m CMIC_LEDUP3_PORT_ORDER_REMAP_0_3 REMAP_PORT_3=28 REMAP_PORT_2=29 REMAP_PORT_1=30 REMAP_PORT_0=31 +m CMIC_LEDUP3_PORT_ORDER_REMAP_4_7 REMAP_PORT_7=24 REMAP_PORT_6=25 REMAP_PORT_5=26 REMAP_PORT_4=27 +m CMIC_LEDUP3_PORT_ORDER_REMAP_8_11 REMAP_PORT_11=56 REMAP_PORT_10=57 REMAP_PORT_9=58 REMAP_PORT_8=59 +m CMIC_LEDUP3_PORT_ORDER_REMAP_12_15 REMAP_PORT_15=60 REMAP_PORT_14=61 REMAP_PORT_13=62 REMAP_PORT_12=63 +m CMIC_LEDUP3_PORT_ORDER_REMAP_16_19 REMAP_PORT_19=4 REMAP_PORT_18=5 REMAP_PORT_17=6 REMAP_PORT_16=7 +m CMIC_LEDUP3_PORT_ORDER_REMAP_20_23 REMAP_PORT_23=0 REMAP_PORT_22=1 REMAP_PORT_21=2 REMAP_PORT_20=3 +m CMIC_LEDUP3_PORT_ORDER_REMAP_24_27 REMAP_PORT_27=32 REMAP_PORT_26=33 REMAP_PORT_25=34 REMAP_PORT_24=35 +m CMIC_LEDUP3_PORT_ORDER_REMAP_28_31 REMAP_PORT_31=36 REMAP_PORT_30=37 REMAP_PORT_29=38 REMAP_PORT_28=39 +m CMIC_LEDUP3_PORT_ORDER_REMAP_32_35 REMAP_PORT_35=12 REMAP_PORT_34=13 REMAP_PORT_33=14 REMAP_PORT_32=15 +m CMIC_LEDUP3_PORT_ORDER_REMAP_36_39 REMAP_PORT_39=8 REMAP_PORT_38=9 REMAP_PORT_37=10 REMAP_PORT_36=11 +m CMIC_LEDUP3_PORT_ORDER_REMAP_40_43 REMAP_PORT_43=40 REMAP_PORT_42=41 REMAP_PORT_41=42 REMAP_PORT_40=43 +m CMIC_LEDUP3_PORT_ORDER_REMAP_44_47 REMAP_PORT_47=44 REMAP_PORT_46=45 REMAP_PORT_45=46 REMAP_PORT_44=47 +m CMIC_LEDUP3_PORT_ORDER_REMAP_48_51 REMAP_PORT_51=20 REMAP_PORT_50=21 REMAP_PORT_49=22 REMAP_PORT_48=23 +m CMIC_LEDUP3_PORT_ORDER_REMAP_52_55 REMAP_PORT_55=16 REMAP_PORT_54=17 REMAP_PORT_53=18 REMAP_PORT_52=19 +m CMIC_LEDUP3_PORT_ORDER_REMAP_56_59 REMAP_PORT_59=48 REMAP_PORT_58=49 REMAP_PORT_57=50 REMAP_PORT_56=51 +m CMIC_LEDUP3_PORT_ORDER_REMAP_60_63 REMAP_PORT_63=52 REMAP_PORT_62=53 REMAP_PORT_61=54 REMAP_PORT_60=55 +m CMIC_LEDUP4_PORT_ORDER_REMAP_0_3 REMAP_PORT_3=1 REMAP_PORT_1=0 + +led 0 stop +led 0 prog \ + 02 00 60 FE 2E FE 67 1C 86 FE 06 FE D2 40 71 04 \ + 12 FF 85 05 D2 05 71 1A 52 00 3A 80 32 08 97 71 \ + 23 77 4B 32 00 32 01 B7 97 75 32 12 BC FE FE 02 \ + 0A 50 12 BC FE FE 95 75 3C 85 77 44 16 FF DA 02 \ + 71 4B 77 44 22 0F 87 22 0E 87 57 22 0E 87 22 0E \ + 87 57 22 0E 87 22 0F 87 57 00 00 00 00 00 00 00 +led 0 auto on +led 0 start + +led 1 stop +led 1 prog \ + 02 00 60 FE 2E FE 67 1C 86 FE 06 FE D2 40 71 04 \ + 12 FF 85 05 D2 05 71 1A 52 00 3A 80 32 08 97 71 \ + 23 77 4B 32 00 32 01 B7 97 75 32 12 BC FE FE 02 \ + 0A 50 12 BC FE FE 95 75 3C 85 77 44 16 FF DA 02 \ + 71 4B 77 44 22 0F 87 22 0E 87 57 22 0E 87 22 0E \ + 87 57 22 0E 87 22 0F 87 57 00 00 00 00 00 00 00 +led 1 auto on +led 1 start + +led 2 stop +led 2 prog \ + 02 00 60 FE 2E FE 67 1C 86 FE 06 FE D2 40 71 04 \ + 12 FF 85 05 D2 05 71 1A 52 00 3A 80 32 08 97 71 \ + 23 77 4B 32 00 32 01 B7 97 75 32 12 BC FE FE 02 \ + 0A 50 12 BC FE FE 95 75 3C 85 77 44 16 FF DA 02 \ + 71 4B 77 44 22 0F 87 22 0E 87 57 22 0E 87 22 0E \ + 87 57 22 0E 87 22 0F 87 57 00 00 00 00 00 00 00 +led 2 auto on +led 2 start + +led 3 stop +led 3 prog \ + 02 00 60 FE 2E FE 67 1C 86 FE 06 FE D2 40 71 04 \ + 12 FF 85 05 D2 05 71 1A 52 00 3A 80 32 08 97 71 \ + 23 77 4B 32 00 32 01 B7 97 75 32 12 BC FE FE 02 \ + 0A 50 12 BC FE FE 95 75 3C 85 77 44 16 FF DA 02 \ + 71 4B 77 44 22 0F 87 22 0E 87 57 22 0E 87 22 0E \ + 87 57 22 0E 87 22 0F 87 57 00 00 00 00 00 00 00 +led 3 auto on +led 3 start diff --git a/device/dell/x86_64-dellemc_z9264f_c3538-r0/minigraph.xml b/device/dell/x86_64-dellemc_z9264f_c3538-r0/minigraph.xml new file mode 100644 index 000000000000..ba95944260df --- /dev/null +++ b/device/dell/x86_64-dellemc_z9264f_c3538-r0/minigraph.xml @@ -0,0 +1,1541 @@ + + + + + + ARISTA01T0 + 10.0.0.33 + sonic + 10.0.0.32 + 1 + 10 + 3 + + + ARISTA01T0 + FC00::42 + sonic + FC00::41 + 1 + 10 + 3 + + + sonic + 10.0.0.0 + ARISTA01T2 + 10.0.0.1 + 1 + 10 + 3 + + + sonic + FC00::1 + ARISTA01T2 + FC00::2 + 1 + 10 + 3 + + + ARISTA02T0 + 10.0.0.35 + sonic + 10.0.0.34 + 1 + 10 + 3 + + + ARISTA02T0 + FC00::46 + sonic + FC00::45 + 1 + 10 + 3 + + + sonic + 10.0.0.2 + ARISTA02T2 + 10.0.0.3 + 1 + 10 + 3 + + + ARISTA04T1 + FC00::1A + sonic + FC00::19 + 1 + 180 + 60 + + + + + 65100 + sonic + + +
10.0.0.33
+ + +
+ +
10.0.0.1
+ + +
+ + BGPPeer +
10.0.0.5
+ + +
+ + BGPPeer +
10.0.0.9
+ + +
+ + BGPPeer +
10.0.0.13
+ + +
+ + BGPPeer +
FC00::2
+ + +
+ +
10.0.0.27
+ + +
+ +
10.0.0.61
+ + +
+ +
10.0.0.29
+ + +
+ +
10.0.0.63
+ + +
+ +
10.0.0.31
+ + +
+
+ +
+ + 64001 + ARISTA01T0 + + + + 65200 + ARISTA01T2 + + + + 64002 + ARISTA02T0 + + + + 65200 + ARISTA02T2 + + + + 64003 + ARISTA03T0 + + +
+
+ + + + + + HostIP + Loopback0 + + 10.1.0.32/32 + + 10.1.0.32/32 + + + HostIP1 + Loopback0 + + FC00:1::32/128 + + FC00:1::32/128 + + + + + + + + sonic + + + + + IPInterface + + hundredGigE1/1 + 10.0.0.1/31 + + + + hundredGigE1/1 + FC00::1/1 + + + + hundredGigE1/2 + 10.0.0.3/31 + + + + hundredGigE1/1 + FC00::1/5 + + + + hundredGigE1/3 + 10.0.0.5/31 + + + + hundredGigE1/1 + FC00::1/9 + + + + hundredGigE1/4 + 10.0.0.7/31 + + + + hundredGigE1/1 + FC00::1/D + + + + hundredGigE1/5 + 10.0.0.9/31 + + + + hundredGigE1/1 + FC00::1/11 + + + + hundredGigE1/6 + 10.0.0.11/31 + + + + hundredGigE1/1 + FC00::1/15 + + + + hundredGigE1/7 + 10.0.0.13/31 + + + + hundredGigE1/1 + FC00::1/19 + + + + hundredGigE1/8 + 10.0.0.15/31 + + + + hundredGigE1/1 + FC00::1/1D + + + + hundredGigE1/9 + 10.0.0.17/31 + + + + hundredGigE1/1 + FC00::1/21 + + + + hundredGigE1/10 + 10.0.0.19/31 + + + + hundredGigE1/1 + FC00::1/25 + + + + hundredGigE1/11 + 10.0.0.21/31 + + + + hundredGigE1/1 + FC00::1/29 + + + + hundredGigE1/12 + 10.0.0.23/31 + + + + hundredGigE1/1 + FC00::1/2D + + + + hundredGigE1/13 + 10.0.0.25/31 + + + + hundredGigE1/1 + FC00::1/31 + + + + hundredGigE1/14 + 10.0.0.27/31 + + + + hundredGigE1/1 + FC00::1/35 + + + + hundredGigE1/15 + 10.0.0.29/31 + + + + hundredGigE1/1 + FC00::1/39 + + + + hundredGigE1/16 + 10.0.0.31/31 + + + + hundredGigE1/1 + FC00::1/3D + + + + hundredGigE1/17 + 10.0.0.33/31 + + + + hundredGigE1/1 + FC00::1/41 + + + + hundredGigE1/18 + 10.0.0.35/31 + + + + hundredGigE1/1 + FC00::1/45 + + + + hundredGigE1/19 + 10.0.0.37/31 + + + + hundredGigE1/1 + FC00::1/49 + + + + hundredGigE1/20 + 10.0.0.39/31 + + + + hundredGigE1/1 + FC00::1/4D + + + + hundredGigE1/21 + 10.0.0.41/31 + + + + hundredGigE1/1 + FC00::1/51 + + + + hundredGigE1/22 + 10.0.0.43/31 + + + + hundredGigE1/1 + FC00::1/55 + + + + hundredGigE1/23 + 10.0.0.45/31 + + + + hundredGigE1/1 + FC00::1/59 + + + + hundredGigE1/24 + 10.0.0.47/31 + + + + hundredGigE1/1 + FC00::1/5D + + + + hundredGigE1/25 + 10.0.0.49/31 + + + + hundredGigE1/1 + FC00::1/61 + + + + hundredGigE1/26 + 10.0.0.51/31 + + + + hundredGigE1/1 + FC00::1/65 + + + + hundredGigE1/27 + 10.0.0.53/31 + + + + hundredGigE1/1 + FC00::1/69 + + + + hundredGigE1/28 + 10.0.0.55/31 + + + + hundredGigE1/1 + FC00::1/6D + + + + hundredGigE1/29 + 10.0.0.57/31 + + + + hundredGigE1/1 + FC00::1/71 + + + + hundredGigE1/30 + 10.0.0.59/31 + + + + hundredGigE1/1 + FC00::1/75 + + + IPInterface + + hundredGigE1/31 + 10.0.0.61/31 + + + + hundredGigE1/1 + FC00::1/79 + + + IPInterface + + hundredGigE1/32 + 10.0.0.63/31 + + + + hundredGigE1/1 + FC00::1/7D + + + IPInterface + + hundredGigE1/33 + 10.0.0.65/31 + + + + hundredGigE1/1 + FC00::1/81 + + + + hundredGigE1/34 + 10.0.0.67/31 + + + + hundredGigE1/1 + FC00::1/85 + + + IPInterface + + hundredGigE1/35 + 10.0.0.69/31 + + + + hundredGigE1/1 + FC00::1/89 + + + IPInterface + + hundredGigE1/36 + 10.0.0.71/31 + + + + hundredGigE1/1 + FC00::1/8D + + + IPInterface + + hundredGigE1/37 + 10.0.0.73/31 + + + + hundredGigE1/1 + FC00::1/91 + + + + hundredGigE1/38 + 10.0.0.75/31 + + + + hundredGigE1/1 + FC00::1/95 + + + + hundredGigE1/39 + 10.0.0.77/31 + + + + hundredGigE1/1 + FC00::1/99 + + + + hundredGigE1/40 + 10.0.0.79/31 + + + + hundredGigE1/1 + FC00::1/9D + + + + hundredGigE1/41 + 10.0.0.81/31 + + + + hundredGigE1/1 + FC00::1/A1 + + + + hundredGigE1/42 + 10.0.0.83/31 + + + + hundredGigE1/1 + FC00::1/A5 + + + + hundredGigE1/43 + 10.0.0.85/31 + + + + hundredGigE1/1 + FC00::1/A9 + + + + hundredGigE1/44 + 10.0.0.87/31 + + + + hundredGigE1/1 + FC00::1/AD + + + + hundredGigE1/45 + 10.0.0.89/31 + + + + hundredGigE1/1 + FC00::1/B1 + + + + hundredGigE1/46 + 10.0.0.91/31 + + + + hundredGigE1/1 + FC00::1/B5 + + + + hundredGigE1/47 + 10.0.0.93/31 + + + + hundredGigE1/1 + FC00::1/B9 + + + + hundredGigE1/48 + 10.0.0.95/31 + + + + hundredGigE1/1 + FC00::1/BD + + + + hundredGigE1/49 + 10.0.0.97/31 + + + + hundredGigE1/1 + FC00::1/C1 + + + + hundredGigE1/50 + 10.0.0.99/31 + + + + hundredGigE1/1 + FC00::1/C5 + + + + hundredGigE1/51 + 10.0.0.101/31 + + + + hundredGigE1/1 + FC00::1/C9 + + + + hundredGigE1/52 + 10.0.0.103/31 + + + + hundredGigE1/1 + FC00::1/CD + + + + hundredGigE1/53 + 10.0.0.105/31 + + + + hundredGigE1/1 + FC00::1/D1 + + + + hundredGigE1/54 + 10.0.0.107/31 + + + + hundredGigE1/1 + FC00::1/D5 + + + + hundredGigE1/55 + 10.0.0.109/31 + + + + hundredGigE1/1 + FC00::1/D9 + + + + hundredGigE1/56 + 10.0.0.111/31 + + + + hundredGigE1/1 + FC00::1/DD + + + + hundredGigE1/57 + 10.0.0.113/31 + + + + hundredGigE1/1 + FC00::1/E1 + + + + hundredGigE1/58 + 10.0.0.115/31 + + + + hundredGigE1/1 + FC00::1/E5 + + + + hundredGigE1/59 + 10.0.0.117/31 + + + + hundredGigE1/1 + FC00::1/E9 + + + + hundredGigE1/60 + 10.0.0.119/31 + + + + hundredGigE1/1 + FC00::1/ED + + + + hundredGigE1/61 + 10.0.0.121/31 + + + + hundredGigE1/1 + FC00::1/F1 + + + + hundredGigE1/62 + 10.0.0.123/31 + + + + hundredGigE1/1 + FC00::1/F5 + + + + hundredGigE1/63 + 10.0.0.125/31 + + + + hundredGigE1/1 + FC00::1/F9 + + + + hundredGigE1/64 + 10.0.0.127/31 + + + + hundredGigE1/1 + FC00::1/FD + + + + + + + + + + + + DeviceInterfaceLink + true + 100000 + ARISTA01T1 + Ethernet1 + true + sonic + hundredGigE1/1 + + + DeviceInterfaceLink + true + 100000 + ARISTA01T1 + Ethernet2 + true + sonic + hundredGigE1/2 + + + DeviceInterfaceLink + true + 100000 + ARISTA01T1 + Ethernet3 + true + sonic + hundredGigE1/3 + + + DeviceInterfaceLink + true + 100000 + ARISTA01T1 + Ethernet4 + true + sonic + hundredGigE1/4 + + + DeviceInterfaceLink + true + 100000 + ARISTA01T1 + Ethernet5 + true + sonic + hundredGigE1/5 + + + DeviceInterfaceLink + true + 100000 + ARISTA01T1 + Ethernet6 + true + sonic + hundredGigE1/6 + + + DeviceInterfaceLink + true + 100000 + ARISTA01T1 + Ethernet7 + true + sonic + hundredGigE1/7 + + + DeviceInterfaceLink + true + 100000 + ARISTA01T1 + Ethernet8 + true + sonic + hundredGigE1/8 + + + DeviceInterfaceLink + true + 100000 + ARISTA01T1 + Ethernet9 + true + sonic + hundredGigE1/9 + + + DeviceInterfaceLink + true + 100000 + ARISTA01T1 + Ethernet10 + true + sonic + hundredGigE1/10 + + + DeviceInterfaceLink + true + 100000 + ARISTA01T1 + Ethernet11 + true + sonic + hundredGigE1/11 + + + DeviceInterfaceLink + true + 100000 + ARISTA01T1 + Ethernet12 + true + sonic + hundredGigE1/12 + + + DeviceInterfaceLink + true + 100000 + ARISTA01T1 + Ethernet13 + true + sonic + hundredGigE1/13 + + + DeviceInterfaceLink + true + 100000 + ARISTA01T1 + Ethernet14 + true + sonic + hundredGigE1/14 + + + DeviceInterfaceLink + true + 100000 + ARISTA01T1 + Ethernet15 + true + sonic + hundredGigE1/15 + + + DeviceInterfaceLink + true + 100000 + ARISTA01T1 + Ethernet16 + true + sonic + hundredGigE1/16 + + + DeviceInterfaceLink + true + 100000 + ARISTA01T1 + Ethernet17 + true + sonic + hundredGigE1/17 + + + DeviceInterfaceLink + true + 100000 + ARISTA01T1 + Ethernet18 + true + sonic + hundredGigE1/18 + + + DeviceInterfaceLink + true + 100000 + ARISTA01T1 + Ethernet19 + true + sonic + hundredGigE1/19 + + + DeviceInterfaceLink + true + 100000 + ARISTA01T1 + Ethernet20 + true + sonic + hundredGigE1/20 + + + DeviceInterfaceLink + true + 100000 + ARISTA01T1 + Ethernet21 + true + sonic + hundredGigE1/21 + + + DeviceInterfaceLink + true + 100000 + ARISTA01T1 + Ethernet22 + true + sonic + hundredGigE1/22 + + + DeviceInterfaceLink + true + 100000 + ARISTA01T1 + Ethernet23 + true + sonic + hundredGigE1/23 + + + DeviceInterfaceLink + true + 100000 + ARISTA01T1 + Ethernet24 + true + sonic + hundredGigE1/24 + + + DeviceInterfaceLink + true + 100000 + ARISTA01T1 + Ethernet25 + true + sonic + hundredGigE1/25 + + + DeviceInterfaceLink + true + 100000 + ARISTA01T1 + Ethernet26 + true + sonic + hundredGigE1/26 + + + DeviceInterfaceLink + true + 100000 + ARISTA01T1 + Ethernet27 + true + sonic + hundredGigE1/27 + + + DeviceInterfaceLink + true + 100000 + ARISTA01T1 + Ethernet28 + true + sonic + hundredGigE1/28 + + + DeviceInterfaceLink + true + 100000 + ARISTA01T1 + Ethernet29 + true + sonic + hundredGigE1/29 + + + DeviceInterfaceLink + true + 100000 + ARISTA01T1 + Ethernet30 + true + sonic + hundredGigE1/30 + + + DeviceInterfaceLink + true + 100000 + ARISTA01T1 + Ethernet31 + true + sonic + hundredGigE1/31 + + + DeviceInterfaceLink + true + 100000 + ARISTA01T1 + Ethernet32 + true + sonic + hundredGigE1/32 + + + DeviceInterfaceLink + true + 100000 + ARISTA01T1 + Ethernet33 + true + sonic + hundredGigE1/33 + + + DeviceInterfaceLink + true + 100000 + ARISTA01T1 + Ethernet34 + true + sonic + hundredGigE1/34 + + + DeviceInterfaceLink + true + 100000 + ARISTA01T1 + Ethernet35 + true + sonic + hundredGigE1/35 + + + DeviceInterfaceLink + true + 100000 + ARISTA01T1 + Ethernet36 + true + sonic + hundredGigE1/36 + + + DeviceInterfaceLink + true + 100000 + ARISTA01T1 + Ethernet37 + true + sonic + hundredGigE1/37 + + + DeviceInterfaceLink + true + 100000 + ARISTA01T1 + Ethernet38 + true + sonic + hundredGigE1/38 + + + DeviceInterfaceLink + true + 100000 + ARISTA01T1 + Ethernet39 + true + sonic + hundredGigE1/39 + + + DeviceInterfaceLink + true + 100000 + ARISTA01T1 + Ethernet40 + true + sonic + hundredGigE1/40 + + + DeviceInterfaceLink + true + 100000 + ARISTA01T1 + Ethernet41 + true + sonic + hundredGigE1/41 + + + DeviceInterfaceLink + true + 100000 + ARISTA01T1 + Ethernet42 + true + sonic + hundredGigE1/42 + + + DeviceInterfaceLink + true + 100000 + ARISTA01T1 + Ethernet43 + true + sonic + hundredGigE1/43 + + + DeviceInterfaceLink + true + 100000 + ARISTA01T1 + Ethernet44 + true + sonic + hundredGigE1/44 + + + DeviceInterfaceLink + true + 100000 + ARISTA01T1 + Ethernet45 + true + sonic + hundredGigE1/45 + + + DeviceInterfaceLink + true + 100000 + ARISTA01T1 + Ethernet46 + true + sonic + hundredGigE1/46 + + + DeviceInterfaceLink + true + 100000 + ARISTA01T1 + Ethernet47 + true + sonic + hundredGigE1/47 + + + DeviceInterfaceLink + true + 100000 + ARISTA01T1 + Ethernet48 + true + sonic + hundredGigE1/48 + + + DeviceInterfaceLink + true + 100000 + ARISTA01T1 + Ethernet49 + true + sonic + hundredGigE1/49 + + + DeviceInterfaceLink + true + 100000 + ARISTA01T1 + Ethernet50 + true + sonic + hundredGigE1/50 + + + DeviceInterfaceLink + true + 100000 + ARISTA01T1 + Ethernet51 + true + sonic + hundredGigE1/51 + + + DeviceInterfaceLink + true + 100000 + ARISTA01T1 + Ethernet52 + true + sonic + hundredGigE1/52 + + + DeviceInterfaceLink + true + 100000 + ARISTA01T1 + Ethernet53 + true + sonic + hundredGigE1/53 + + + DeviceInterfaceLink + true + 100000 + ARISTA01T1 + Ethernet54 + true + sonic + hundredGigE1/54 + + + DeviceInterfaceLink + true + 100000 + ARISTA01T1 + Ethernet55 + true + sonic + hundredGigE1/55 + + + DeviceInterfaceLink + true + 100000 + ARISTA01T1 + Ethernet56 + true + sonic + hundredGigE1/56 + + + DeviceInterfaceLink + true + 100000 + ARISTA01T1 + Ethernet57 + true + sonic + hundredGigE1/57 + + + DeviceInterfaceLink + true + 100000 + ARISTA01T1 + Ethernet58 + true + sonic + hundredGigE1/58 + + + DeviceInterfaceLink + true + 100000 + ARISTA01T1 + Ethernet59 + true + sonic + hundredGigE1/59 + + + DeviceInterfaceLink + true + 100000 + ARISTA01T1 + Ethernet60 + true + sonic + hundredGigE1/60 + + + DeviceInterfaceLink + true + 100000 + ARISTA01T1 + Ethernet61 + true + sonic + hundredGigE1/61 + + + DeviceInterfaceLink + true + 100000 + ARISTA01T1 + Ethernet62 + true + sonic + hundredGigE1/62 + + + DeviceInterfaceLink + true + 100000 + ARISTA01T1 + Ethernet63 + true + sonic + hundredGigE1/63 + + + DeviceInterfaceLink + true + 100000 + ARISTA01T1 + Ethernet64 + true + sonic + hundredGigE1/64 + + + + + sonic + DellEMC-Z9264f + + 10.11.150.26 + + + + + + + + sonic + + + DhcpResources + + + + + SnmpResources + + 10.0.0.9 + + + SyslogResources + + 10.0.0.5;10.0.0.6 + + + ErspanDestinationIpv4 + + 10.0.0.7 + + + + + + + sonic + DellEMC-Z9264f +
diff --git a/device/dell/x86_64-dellemc_z9264f_c3538-r0/plugins/eeprom.py b/device/dell/x86_64-dellemc_z9264f_c3538-r0/plugins/eeprom.py new file mode 100644 index 000000000000..37ce00a0ca6c --- /dev/null +++ b/device/dell/x86_64-dellemc_z9264f_c3538-r0/plugins/eeprom.py @@ -0,0 +1,22 @@ +#!/usr/bin/env python + +############################################################################# +# DellEMC Z9264f +# +# Platform and model specific eeprom subclass, inherits from the base class, +# and provides the followings: +# - the eeprom format definition +# - specific encoder/decoder if there is special need +############################################################################# + +try: + from sonic_eeprom import eeprom_tlvinfo +except ImportError, e: + raise ImportError (str(e) + "- required module not found") + + +class board(eeprom_tlvinfo.TlvInfoDecoder): + + def __init__(self, name, path, cpld_root, ro): + self.eeprom_path = "/sys/class/i2c-adapter/i2c-0/0-0053/eeprom" + super(board, self).__init__(self.eeprom_path, 0, '', True) diff --git a/device/dell/x86_64-dellemc_z9264f_c3538-r0/plugins/psuutil.py b/device/dell/x86_64-dellemc_z9264f_c3538-r0/plugins/psuutil.py new file mode 100644 index 000000000000..d3fe5cf64240 --- /dev/null +++ b/device/dell/x86_64-dellemc_z9264f_c3538-r0/plugins/psuutil.py @@ -0,0 +1,97 @@ +# +# psuutil.py +# Platform-specific PSU status interface for SONiC +# + + +import os.path +import logging +import commands + + +Z9264F_MAX_PSUS = 2 +IPMI_SENSOR_DATA = "ipmitool sdr list" +PSU_PRESENCE = "PSU{0}_state" +# Use this for older firmware +# PSU_PRESENCE="PSU{0}_prsnt" +ipmi_sdr_list = "" + + +try: + from sonic_psu.psu_base import PsuBase +except ImportError as e: + raise ImportError(str(e) + "- required module not found") + + +class PsuUtil(PsuBase): + """Platform-specific PSUutil class""" + + def __init__(self): + PsuBase.__init__(self) + + # Fetch a BMC register + def get_pmc_register(self, reg_name): + + status = 1 + global ipmi_sdr_list + ipmi_dev_node = "/dev/pmi0" + + ipmi_cmd = IPMI_SENSOR_DATA + status, ipmi_sdr_list = commands.getstatusoutput(ipmi_cmd) + + if status: + logging.error('Failed to execute:' + ipmi_sdr_list) + sys.exit(0) + + for item in ipmi_sdr_list.split("\n"): + if reg_name in item: + output = item.strip() + + if not output: + print('\nFailed to fetch: ' + reg_name + ' sensor ') + sys.exit(0) + + output = output.split('|')[1] + + logging.basicConfig(level=logging.DEBUG) + return output + + + + def get_num_psus(self): + """ + Retrieves the number of PSUs available on the device + :return: An integer, the number of PSUs available on the device + """ + Z9264F_MAX_PSUS = 2 + return Z9264F_MAX_PSUS + + def get_psu_status(self, index): + """ + Retrieves the oprational status of power supply unit (PSU) defined + by index + :param index: An integer, index of the PSU of which to query status + :return: Boolean, True if PSU is operating properly, False if PSU is\ + faulty + """ + #Until psu_status is implemented this is hardcoded temporarily + + status = 1 + return status + + + def get_psu_presence(self, index): + """ + Retrieves the presence status of power supply unit (PSU) defined + by index + :param index: An integer, index of the PSU of which to query status + :return: Boolean, True if PSU is plugged, False if not + """ + status = 0 + psu_reg_name = PSU_PRESENCE.format(index) + psu_status = int(self.get_pmc_register(psu_reg_name),16) + if (psu_status != 'ERR'): + # Check for PSU presence + if (psu_status): + status = 1 + return status diff --git a/device/dell/x86_64-dellemc_z9264f_c3538-r0/plugins/sfputil.py b/device/dell/x86_64-dellemc_z9264f_c3538-r0/plugins/sfputil.py new file mode 100644 index 000000000000..84a5e153b304 --- /dev/null +++ b/device/dell/x86_64-dellemc_z9264f_c3538-r0/plugins/sfputil.py @@ -0,0 +1,192 @@ +# sfputil.py +# +# Platform-specific SFP transceiver interface for SONiC +# + +try: + import struct + import sys + import getopt + import time + from sonic_sfp.sfputilbase import SfpUtilBase + from os import * + from mmap import * + +except ImportError as e: + raise ImportError("%s - required module not found" % str(e)) + + +class SfpUtil(SfpUtilBase): + """Platform-specific SfpUtil class""" + + PORT_START = 0 + PORT_END = 63 + PORTS_IN_BLOCK = 32 + + BASE_RES_PATH = "/sys/bus/pci/devices/0000:04:00.0/resource0" + + _port_to_eeprom_mapping = {} + + @property + def port_start(self): + return self.PORT_START + + @property + def port_end(self): + return self.PORT_END + + @property + def qsfp_ports(self): + return range(0, self.PORTS_IN_BLOCK + 1) + + @property + def port_to_eeprom_mapping(self): + return self._port_to_eeprom_mapping + + def pci_mem_read(self, mm, offset): + mm.seek(offset) + read_data_stream=mm.read(4) + reg_val=struct.unpack('I',read_data_stream) + mem_val = str(reg_val)[1:-2] + # print "reg_val read:%x"%reg_val + return mem_val + + def pci_mem_write(self, mm, offset, data): + mm.seek(offset) + # print "data to write:%x"%data + mm.write(struct.pack('I',data)) + + def pci_set_value(self, resource, val, offset): + fd=open(resource,O_RDWR) + mm=mmap(fd,0) + return self.pci_mem_write(mm,offset,val) + + def pci_get_value(self, resource, offset): + fd=open(resource,O_RDWR) + mm=mmap(fd,0) + return self.pci_mem_read(mm, offset) + + def __init__(self): + eeprom_path = "/sys/class/i2c-adapter/i2c-{0}/{0}-0050/eeprom" + + for x in range(0, self.port_end + 1): + port_num = x + 2 + self.port_to_eeprom_mapping[x] = eeprom_path.format( + port_num) + port_num = 0 + + SfpUtilBase.__init__(self) + + def get_presence(self, port_num): + # Check for invalid port_num + if port_num < self.port_start or port_num > self.port_end: + return False + + # Port offset starts with 0x4004 + port_offset = 16388 + ((port_num) * 16) + + status = self.pci_get_value(self.BASE_RES_PATH, port_offset) + reg_value = int(status) + + # Absence of status throws error + if (reg_value == "" ): + return False + + # Mask off 4th bit for presence + mask = (1 << 4) + + # ModPrsL is active low + if reg_value & mask == 0: + return True + + 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 + + # Port offset starts with 0x4000 + port_offset = 16384 + ((port_num) * 16) + + status = self.pci_get_value(self.BASE_RES_PATH, port_offset) + reg_value = int(status) + + # Absence of status throws error + if (reg_value == "" ): + return False + + # Mask off 4th bit for presence + mask = (1 << 6) + + # LPMode is active high + if reg_value & mask == 0: + return False + + return True + + 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 + + # Port offset starts with 0x4000 + port_offset = 16384 + ((port_num) * 16) + + status = self.pci_get_value(self.BASE_RES_PATH, port_offset) + reg_value = int(status) + + # Absence of status throws error + if (reg_value == "" ): + return False + + # Mask off 4th bit for presence + mask = (1 << 6) + + # LPMode is active high; set or clear the bit accordingly + if lpmode is True: + reg_value = reg_value | mask + else: + reg_value = reg_value & ~mask + + # Convert our register value back to a hex string and write back + status = self.pci_set_value(self.BASE_RES_PATH, reg_value, port_offset) + + return True + + def reset(self, port_num): + + # Check for invalid port_num + if port_num < self.port_start or port_num > self.port_end: + return False + + # Port offset starts with 0x4000 + port_offset = 16384 + ((port_num) * 16) + + status = self.pci_get_value(self.BASE_RES_PATH, port_offset) + reg_value = int(status) + + # Absence of status throws error + if (reg_value == "" ): + return False + + # Mask off 4th bit for presence + mask = (1 << 6) + + # ResetL is active low + reg_value = reg_value & ~mask + + # Convert our register value back to a hex string and write back + status = self.pci_set_value(self.BASE_RES_PATH, reg_value, port_offset) + + # Sleep 1 second to allow it to settle + time.sleep(1) + + reg_value = reg_value | mask + + # Convert our register value back to a hex string and write back + status = self.pci_set_value(self.BASE_RES_PATH, reg_value, port_offset) + + return True diff --git a/dockers/docker-platform-monitor/Dockerfile.j2 b/dockers/docker-platform-monitor/Dockerfile.j2 index c53ed494c474..d7cb6a46f5f3 100755 --- a/dockers/docker-platform-monitor/Dockerfile.j2 +++ b/dockers/docker-platform-monitor/Dockerfile.j2 @@ -10,7 +10,7 @@ ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update # Install required packages -RUN apt-get install -y python-pip libpython2.7 sensord fancontrol +RUN apt-get install -y python-pip libpython2.7 sensord fancontrol ipmitool {% if docker_platform_monitor_debs.strip() -%} # Copy locally-built Debian package dependencies diff --git a/files/build_templates/docker_image_ctl.j2 b/files/build_templates/docker_image_ctl.j2 index 1216013e63c2..77b3fbe7e74f 100644 --- a/files/build_templates/docker_image_ctl.j2 +++ b/files/build_templates/docker_image_ctl.j2 @@ -21,6 +21,17 @@ function postStartAction() rm -fr /host/fast-reboot fi docker exec swss touch /ready # signal swssconfig.sh to go +{%- elif docker_container_name == "pmon" %} + + DEVPATH="/usr/share/sonic/device" + REBOOT="platform_reboot" + PSENSOR="/usr/local/bin/platform_sensors.py" + if [ -d ${DEVPATH}/${PLATFORM} ] && [ -f $PSENSOR ]; then + exist=`docker exec -i pmon ls /usr/bin/platform_sensors.py "$@" 2>/dev/null` + if [ -z "$exist" ]; then + docker cp $PSENSOR pmon:/usr/bin/ + fi + fi {%- elif docker_container_name == "snmp" %} docker exec -i database redis-cli -n 6 HSET 'DEVICE_METADATA|localhost' chassis_serial_number $(decode-syseeprom -s) {%- else %} diff --git a/platform/broadcom/one-image.mk b/platform/broadcom/one-image.mk index b009706a7850..26ac0506aa71 100755 --- a/platform/broadcom/one-image.mk +++ b/platform/broadcom/one-image.mk @@ -5,6 +5,7 @@ $(SONIC_ONE_IMAGE)_MACHINE = broadcom $(SONIC_ONE_IMAGE)_IMAGE_TYPE = onie $(SONIC_ONE_IMAGE)_INSTALLS += $(BRCM_OPENNSL_KERNEL) $(SONIC_ONE_IMAGE)_LAZY_INSTALLS += $(DELL_S6000_PLATFORM_MODULE) \ + $(DELL_Z9264F_PLATFORM_MODULE) \ $(DELL_Z9100_PLATFORM_MODULE) \ $(DELL_S6100_PLATFORM_MODULE) \ $(INGRASYS_S8900_54XC_PLATFORM_MODULE) \ diff --git a/platform/broadcom/platform-modules-dell.mk b/platform/broadcom/platform-modules-dell.mk index a6b2a9c2c365..a2d051ffd911 100644 --- a/platform/broadcom/platform-modules-dell.mk +++ b/platform/broadcom/platform-modules-dell.mk @@ -1,8 +1,10 @@ -# Dell Z9100 and S6100 Platform modules +# Dell Z9100, S6100, Z9264F Platform modules +DELL_Z9264F_PLATFORM_MODULE_VERSION = 1.1 DELL_Z9100_PLATFORM_MODULE_VERSION = 1.1 DELL_S6100_PLATFORM_MODULE_VERSION = 1.1 +export DELL_Z9264F_PLATFORM_MODULE_VERSION export DELL_Z9100_PLATFORM_MODULE_VERSION export DELL_S6100_PLATFORM_MODULE_VERSION @@ -16,4 +18,9 @@ DELL_S6100_PLATFORM_MODULE = platform-modules-s6100_$(DELL_S6100_PLATFORM_MODULE $(DELL_S6100_PLATFORM_MODULE)_PLATFORM = x86_64-dell_s6100_c2538-r0 $(eval $(call add_extra_package,$(DELL_Z9100_PLATFORM_MODULE),$(DELL_S6100_PLATFORM_MODULE))) +DELL_Z9264F_PLATFORM_MODULE = platform-modules-z9264f_$(DELL_Z9264F_PLATFORM_MODULE_VERSION)_amd64.deb +$(DELL_Z9264F_PLATFORM_MODULE)_PLATFORM = x86_64-dellemc_z9264f_c3538-r0 +$(eval $(call add_extra_package,$(DELL_Z9100_PLATFORM_MODULE),$(DELL_Z9264F_PLATFORM_MODULE))) + + SONIC_STRETCH_DEBS += $(DELL_Z9100_PLATFORM_MODULE) diff --git a/platform/broadcom/sonic-platform-modules-dell b/platform/broadcom/sonic-platform-modules-dell index 31993888a172..6cfea2267688 160000 --- a/platform/broadcom/sonic-platform-modules-dell +++ b/platform/broadcom/sonic-platform-modules-dell @@ -1 +1 @@ -Subproject commit 31993888a17291eb28ef674d6e2c973c539e806d +Subproject commit 6cfea2267688b7fb5cd11a867057ed264a01502c