[arm64][Nokia-7215-A1]Add support for Nokia-7215-A1 platform (#13795)
Add new Nokia build target and establish an arm64 build: Platform: arm64-nokia_ixs7215_52xb-r0 HwSKU: Nokia-7215-A1 ASIC: marvell Port Config: 48x1G + 4x10G How I did it - Change make files for saiserver and syncd to use Bulleseye kernel - Change Marvell SAI version to 1.11.0-1 - Add Prestera make files to build kernel, Flattened Device Tree blob and ramdisk for arm64 platforms - Provide device and platform related files for new platform support (arm64-nokia_ixs7215_52xb-r0).
This commit is contained in:
parent
fa95ebcaae
commit
c5d0507224
@ -0,0 +1 @@
|
||||
8668dc21ae107bff2d5e4242fe532e38
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1 @@
|
||||
6d7161d3d4fdf922d5f26243642d8110
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1 @@
|
||||
75737f56687883d181ea3da8d1c24da6
|
@ -0,0 +1,871 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<data xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" version="2023-01-23-1.03" profile="Askpp" dsig="md5">
|
||||
<askppplt:ASK-PP xmlns:askppplt="urn:marvell:askpp:yang">
|
||||
<askppplt:typedefs>
|
||||
<askppplt:typedef>
|
||||
<askppplt:name>std-string</askppplt:name>
|
||||
<askppplt:type>string</askppplt:type>
|
||||
<askppplt:description>standard string.</askppplt:description>
|
||||
<askppplt:min>1</askppplt:min>
|
||||
<askppplt:max>100</askppplt:max>
|
||||
</askppplt:typedef>
|
||||
<askppplt:typedef>
|
||||
<askppplt:name>queue-id-type</askppplt:name>
|
||||
<askppplt:type>uint32</askppplt:type>
|
||||
<askppplt:description>Queue id</askppplt:description>
|
||||
<askppplt:min>0</askppplt:min>
|
||||
<askppplt:max>7</askppplt:max>
|
||||
</askppplt:typedef>
|
||||
<askppplt:typedef>
|
||||
<askppplt:name>precent-type</askppplt:name>
|
||||
<askppplt:type>uint32</askppplt:type>
|
||||
<askppplt:description>Precent</askppplt:description>
|
||||
<askppplt:min>0</askppplt:min>
|
||||
<askppplt:max>100</askppplt:max>
|
||||
</askppplt:typedef>
|
||||
<askppplt:typedef>
|
||||
<askppplt:name>phaThreadId-type</askppplt:name>
|
||||
<askppplt:type>uint32</askppplt:type>
|
||||
<askppplt:description>Thread id</askppplt:description>
|
||||
<askppplt:min>1</askppplt:min>
|
||||
<askppplt:max>255</askppplt:max>
|
||||
</askppplt:typedef>
|
||||
<askppplt:typedef>
|
||||
<askppplt:name>routing-mode-type</askppplt:name>
|
||||
<askppplt:type>enumeration</askppplt:type>
|
||||
<askppplt:description>Specifies routing mode.</askppplt:description>
|
||||
<askppplt:enum>
|
||||
<askppplt:name>POLICY_BASED_ROUTING_ONLY</askppplt:name>
|
||||
<askppplt:description>PBR only</askppplt:description>
|
||||
<askppplt:value>0</askppplt:value>
|
||||
</askppplt:enum>
|
||||
<askppplt:enum>
|
||||
<askppplt:name>TCAM_ROUTER_BASED</askppplt:name>
|
||||
<askppplt:description>Router engine or PBR</askppplt:description>
|
||||
<askppplt:value>1</askppplt:value>
|
||||
</askppplt:enum>
|
||||
</askppplt:typedef>
|
||||
<askppplt:typedef>
|
||||
<askppplt:name>shared-table-mode-type</askppplt:name>
|
||||
<askppplt:type>enumeration</askppplt:type>
|
||||
<askppplt:description>Specifies table sharing modes for L3 (LPM), L2 (FDB), EM (Exact Match)</askppplt:description>
|
||||
<askppplt:enum>
|
||||
<askppplt:name>MID_L3_MID_L2_NO_EM</askppplt:name>
|
||||
<askppplt:description>MID_L3_MID_L2_NO_EM</askppplt:description>
|
||||
<askppplt:value>0</askppplt:value>
|
||||
</askppplt:enum>
|
||||
<askppplt:enum>
|
||||
<askppplt:name>MID_L3_MID_L2_MIN_EM</askppplt:name>
|
||||
<askppplt:description>MID_L3_MID_L2_MIN_EM</askppplt:description>
|
||||
<askppplt:value>1</askppplt:value>
|
||||
</askppplt:enum>
|
||||
<askppplt:enum>
|
||||
<askppplt:name>LOW_MAX_L3_MID_LOW_L2_NO_EM</askppplt:name>
|
||||
<askppplt:description>LOW_MAX_L3_MID_LOW_L2_NO_EM</askppplt:description>
|
||||
<askppplt:value>2</askppplt:value>
|
||||
</askppplt:enum>
|
||||
<askppplt:enum>
|
||||
<askppplt:name>MAX_L3_MIN_L2_NO_EM</askppplt:name>
|
||||
<askppplt:description>MAX_L3_MIN_L2_NO_EM</askppplt:description>
|
||||
<askppplt:value>3</askppplt:value>
|
||||
</askppplt:enum>
|
||||
</askppplt:typedef>
|
||||
<askppplt:typedef>
|
||||
<askppplt:name>pha-firmware-image-id-type</askppplt:name>
|
||||
<askppplt:type>enumeration</askppplt:type>
|
||||
<askppplt:description>Specifies supported Pha image id</askppplt:description>
|
||||
<askppplt:enum>
|
||||
<askppplt:name>DEFAULT</askppplt:name>
|
||||
<askppplt:description>Default PHA firmware image ID</askppplt:description>
|
||||
<askppplt:value>0</askppplt:value>
|
||||
</askppplt:enum>
|
||||
<askppplt:enum>
|
||||
<askppplt:name>01</askppplt:name>
|
||||
<askppplt:description>01 firmware image ID</askppplt:description>
|
||||
<askppplt:value>1</askppplt:value>
|
||||
</askppplt:enum>
|
||||
<askppplt:enum>
|
||||
<askppplt:name>02</askppplt:name>
|
||||
<askppplt:description>02 PHA firmware image ID</askppplt:description>
|
||||
<askppplt:value>2</askppplt:value>
|
||||
</askppplt:enum>
|
||||
</askppplt:typedef>
|
||||
<askppplt:typedef>
|
||||
<askppplt:name>pha-firmware-thread-type</askppplt:name>
|
||||
<askppplt:type>enumeration</askppplt:type>
|
||||
<askppplt:description>Specifies supported Pha thread type</askppplt:description>
|
||||
<askppplt:enum>
|
||||
<askppplt:name>IOAM_INGRESS_SWITCH_IPV4</askppplt:name>
|
||||
<askppplt:description>IOAM_INGRESS_SWITCH_IPV4</askppplt:description>
|
||||
<askppplt:value>1</askppplt:value>
|
||||
</askppplt:enum>
|
||||
<askppplt:enum>
|
||||
<askppplt:name>IOAM_INGRESS_SWITCH_IPV6</askppplt:name>
|
||||
<askppplt:description>IOAM_INGRESS_SWITCH_IPV6</askppplt:description>
|
||||
<askppplt:value>2</askppplt:value>
|
||||
</askppplt:enum>
|
||||
<askppplt:enum>
|
||||
<askppplt:name>IOAM_TRANSIT_SWITCH_IPV4</askppplt:name>
|
||||
<askppplt:description>IOAM_TRANSIT_SWITCH_IPV4</askppplt:description>
|
||||
<askppplt:value>3</askppplt:value>
|
||||
</askppplt:enum>
|
||||
<askppplt:enum>
|
||||
<askppplt:name>IOAM_TRANSIT_SWITCH_IPV6</askppplt:name>
|
||||
<askppplt:description>IOAM_TRANSIT_SWITCH_IPV6</askppplt:description>
|
||||
<askppplt:value>4</askppplt:value>
|
||||
</askppplt:enum>
|
||||
<askppplt:enum>
|
||||
<askppplt:name>INT_IOAM_MIRRORING</askppplt:name>
|
||||
<askppplt:description>INT_IOAM_MIRRORING</askppplt:description>
|
||||
<askppplt:value>5</askppplt:value>
|
||||
</askppplt:enum>
|
||||
<askppplt:enum>
|
||||
<askppplt:name>INT_IOAM_EGRESS_SWITCH</askppplt:name>
|
||||
<askppplt:description>INT_IOAM_EGRESS_SWITCH</askppplt:description>
|
||||
<askppplt:value>6</askppplt:value>
|
||||
</askppplt:enum>
|
||||
<askppplt:enum>
|
||||
<askppplt:name>MPLS_SR_NO_EL</askppplt:name>
|
||||
<askppplt:description>MPLS_SR_NO_EL</askppplt:description>
|
||||
<askppplt:value>7</askppplt:value>
|
||||
</askppplt:enum>
|
||||
<askppplt:enum>
|
||||
<askppplt:name>MPLS_SR_ONE_EL</askppplt:name>
|
||||
<askppplt:description>MPLS_SR_ONE_EL</askppplt:description>
|
||||
<askppplt:value>8</askppplt:value>
|
||||
</askppplt:enum>
|
||||
<askppplt:enum>
|
||||
<askppplt:name>MPLS_SR_TWO_EL</askppplt:name>
|
||||
<askppplt:description>MPLS_SR_TWO_EL</askppplt:description>
|
||||
<askppplt:value>9</askppplt:value>
|
||||
</askppplt:enum>
|
||||
<askppplt:enum>
|
||||
<askppplt:name>MPLS_SR_THREE_EL</askppplt:name>
|
||||
<askppplt:description>MPLS_SR_THREE_EL</askppplt:description>
|
||||
<askppplt:value>10</askppplt:value>
|
||||
</askppplt:enum>
|
||||
<askppplt:enum>
|
||||
<askppplt:name>UNIFIED_SR</askppplt:name>
|
||||
<askppplt:description>UNIFIED_SR</askppplt:description>
|
||||
<askppplt:value>11</askppplt:value>
|
||||
</askppplt:enum>
|
||||
<askppplt:enum>
|
||||
<askppplt:name>CLASSIFIER_NSH_OVER_ETHERNET</askppplt:name>
|
||||
<askppplt:description>CLASSIFIER_NSH_OVER_ETHERNET</askppplt:description>
|
||||
<askppplt:value>12</askppplt:value>
|
||||
</askppplt:enum>
|
||||
<askppplt:enum>
|
||||
<askppplt:name>CLASSIFIER_NSH_OVER_VXLAN_GPE</askppplt:name>
|
||||
<askppplt:description>CLASSIFIER_NSH_OVER_VXLAN_GPE</askppplt:description>
|
||||
<askppplt:value>13</askppplt:value>
|
||||
</askppplt:enum>
|
||||
<askppplt:enum>
|
||||
<askppplt:name>SFF_NSH_VXLAN_GPE_TO_ETHERNET</askppplt:name>
|
||||
<askppplt:description>SFF_NSH_VXLAN_GPE_TO_ETHERNET</askppplt:description>
|
||||
<askppplt:value>14</askppplt:value>
|
||||
</askppplt:enum>
|
||||
<askppplt:enum>
|
||||
<askppplt:name>SFF_NSH_ETHERNET_TO_VXLAN_GPE</askppplt:name>
|
||||
<askppplt:description>SFF_NSH_ETHERNET_TO_VXLAN_GPE</askppplt:description>
|
||||
<askppplt:value>15</askppplt:value>
|
||||
</askppplt:enum>
|
||||
<askppplt:enum>
|
||||
<askppplt:name>IOAM_EGRESS_SWITCH_IPV6</askppplt:name>
|
||||
<askppplt:description>IOAM_EGRESS_SWITCH_IPV6</askppplt:description>
|
||||
<askppplt:value>16</askppplt:value>
|
||||
</askppplt:enum>
|
||||
<askppplt:enum>
|
||||
<askppplt:name>SRV6_END_NODE</askppplt:name>
|
||||
<askppplt:description>SRV6_END_NODE</askppplt:description>
|
||||
<askppplt:value>17</askppplt:value>
|
||||
</askppplt:enum>
|
||||
<askppplt:enum>
|
||||
<askppplt:name>SRV6_PENULTIMATE_END_NODE</askppplt:name>
|
||||
<askppplt:description>SRV6_PENULTIMATE_END_NODE</askppplt:description>
|
||||
<askppplt:value>18</askppplt:value>
|
||||
</askppplt:enum>
|
||||
<askppplt:enum>
|
||||
<askppplt:name>SRV6_SRC_NODE_1_SEGMENT</askppplt:name>
|
||||
<askppplt:description>SRV6_SRC_NODE_1_SEGMENT</askppplt:description>
|
||||
<askppplt:value>19</askppplt:value>
|
||||
</askppplt:enum>
|
||||
<askppplt:enum>
|
||||
<askppplt:name>SRV6_SRC_NODE_FIRST_PASS_2_3_SEGMENTS</askppplt:name>
|
||||
<askppplt:description>SRV6_SRC_NODE_FIRST_PASS_2_3_SEGMENTS</askppplt:description>
|
||||
<askppplt:value>20</askppplt:value>
|
||||
</askppplt:enum>
|
||||
<askppplt:enum>
|
||||
<askppplt:name>SRV6_SRC_NODE_SECOND_PASS_3_SEGMENTS</askppplt:name>
|
||||
<askppplt:description>SRV6_SRC_NODE_SECOND_PASS_3_SEGMENTS</askppplt:description>
|
||||
<askppplt:value>21</askppplt:value>
|
||||
</askppplt:enum>
|
||||
<askppplt:enum>
|
||||
<askppplt:name>SRV6_SRC_NODE_SECOND_PASS_2_SEGMENTS</askppplt:name>
|
||||
<askppplt:description>SRV6_SRC_NODE_SECOND_PASS_2_SEGMENTS</askppplt:description>
|
||||
<askppplt:value>22</askppplt:value>
|
||||
</askppplt:enum>
|
||||
<askppplt:enum>
|
||||
<askppplt:name>SGT_NETWORK_ADD_MSB</askppplt:name>
|
||||
<askppplt:description>SGT_NETWORK_ADD_MSB</askppplt:description>
|
||||
<askppplt:value>23</askppplt:value>
|
||||
</askppplt:enum>
|
||||
<askppplt:enum>
|
||||
<askppplt:name>SGT_NETWORK_FIX</askppplt:name>
|
||||
<askppplt:description>SGT_NETWORK_FIX</askppplt:description>
|
||||
<askppplt:value>24</askppplt:value>
|
||||
</askppplt:enum>
|
||||
<askppplt:enum>
|
||||
<askppplt:name>SGT_NETWORK_REMOVE</askppplt:name>
|
||||
<askppplt:description>SGT_NETWORK_REMOVE</askppplt:description>
|
||||
<askppplt:value>25</askppplt:value>
|
||||
</askppplt:enum>
|
||||
<askppplt:enum>
|
||||
<askppplt:name>SGT_EDSA_FIX</askppplt:name>
|
||||
<askppplt:description>SGT_EDSA_FIX</askppplt:description>
|
||||
<askppplt:value>26</askppplt:value>
|
||||
</askppplt:enum>
|
||||
<askppplt:enum>
|
||||
<askppplt:name>SGT_EDSA_REMOVE</askppplt:name>
|
||||
<askppplt:description>SGT_EDSA_REMOVE</askppplt:description>
|
||||
<askppplt:value>27</askppplt:value>
|
||||
</askppplt:enum>
|
||||
<askppplt:enum>
|
||||
<askppplt:name>SGT_GBP_FIX_IPV4</askppplt:name>
|
||||
<askppplt:description>SGT_GBP_FIX_IPV4</askppplt:description>
|
||||
<askppplt:value>28</askppplt:value>
|
||||
</askppplt:enum>
|
||||
<askppplt:enum>
|
||||
<askppplt:name>SGT_GBP_FIX_IPV6</askppplt:name>
|
||||
<askppplt:description>SGT_GBP_FIX_IPV6</askppplt:description>
|
||||
<askppplt:value>29</askppplt:value>
|
||||
</askppplt:enum>
|
||||
<askppplt:enum>
|
||||
<askppplt:name>SGT_GBP_REMOVE_IPV4</askppplt:name>
|
||||
<askppplt:description>SGT_GBP_REMOVE_IPV4</askppplt:description>
|
||||
<askppplt:value>30</askppplt:value>
|
||||
</askppplt:enum>
|
||||
<askppplt:enum>
|
||||
<askppplt:name>SGT_GBP_REMOVE_IPV6</askppplt:name>
|
||||
<askppplt:description>SGT_GBP_REMOVE_IPV6</askppplt:description>
|
||||
<askppplt:value>31</askppplt:value>
|
||||
</askppplt:enum>
|
||||
<askppplt:enum>
|
||||
<askppplt:name>PTP_PHY_1_STEP</askppplt:name>
|
||||
<askppplt:description>PTP_PHY_1_STEP</askppplt:description>
|
||||
<askppplt:value>32</askppplt:value>
|
||||
</askppplt:enum>
|
||||
<askppplt:enum>
|
||||
<askppplt:name>EGRESS_MIRRORING_METADATA</askppplt:name>
|
||||
<askppplt:description>EGRESS_MIRRORING_METADATA</askppplt:description>
|
||||
<askppplt:value>33</askppplt:value>
|
||||
</askppplt:enum>
|
||||
<askppplt:enum>
|
||||
<askppplt:name>CC_ERSPAN_TYPE_II_TRG_DEV_LC_IPV4</askppplt:name>
|
||||
<askppplt:description>CC_ERSPAN_TYPE_II_TRG_DEV_LC_IPV4</askppplt:description>
|
||||
<askppplt:value>34</askppplt:value>
|
||||
</askppplt:enum>
|
||||
<askppplt:enum>
|
||||
<askppplt:name>CC_ERSPAN_TYPE_II_TRG_DEV_LC_IPV6</askppplt:name>
|
||||
<askppplt:description>CC_ERSPAN_TYPE_II_TRG_DEV_LC_IPV6</askppplt:description>
|
||||
<askppplt:value>35</askppplt:value>
|
||||
</askppplt:enum>
|
||||
<askppplt:enum>
|
||||
<askppplt:name>CC_ERSPAN_TYPE_II_TRG_DEV_DIRECT_IPV4</askppplt:name>
|
||||
<askppplt:description>CC_ERSPAN_TYPE_II_TRG_DEV_DIRECT_IPV4</askppplt:description>
|
||||
<askppplt:value>36</askppplt:value>
|
||||
</askppplt:enum>
|
||||
<askppplt:enum>
|
||||
<askppplt:name>CC_ERSPAN_TYPE_II_TRG_DEV_DIRECT_IPV6</askppplt:name>
|
||||
<askppplt:description>CC_ERSPAN_TYPE_II_TRG_DEV_DIRECT_IPV6</askppplt:description>
|
||||
<askppplt:value>37</askppplt:value>
|
||||
</askppplt:enum>
|
||||
<askppplt:enum>
|
||||
<askppplt:name>CC_ERSPAN_TYPE_II_SRC_DEV</askppplt:name>
|
||||
<askppplt:description>CC_ERSPAN_TYPE_II_SRC_DEV</askppplt:description>
|
||||
<askppplt:value>38</askppplt:value>
|
||||
</askppplt:enum>
|
||||
<askppplt:enum>
|
||||
<askppplt:name>VXLAN_GBP_SOURCE_GROUP_POLICY_ID</askppplt:name>
|
||||
<askppplt:description>VXLAN_GBP_SOURCE_GROUP_POLICY_ID</askppplt:description>
|
||||
<askppplt:value>39</askppplt:value>
|
||||
</askppplt:enum>
|
||||
<askppplt:enum>
|
||||
<askppplt:name>SRV6_BEST_EFFORT</askppplt:name>
|
||||
<askppplt:description>SRV6_BEST_EFFORT</askppplt:description>
|
||||
<askppplt:value>40</askppplt:value>
|
||||
</askppplt:enum>
|
||||
<askppplt:enum>
|
||||
<askppplt:name>SRV6_SRC_NODE_1_CONTAINER</askppplt:name>
|
||||
<askppplt:description>SRV6_SRC_NODE_1_CONTAINER</askppplt:description>
|
||||
<askppplt:value>41</askppplt:value>
|
||||
</askppplt:enum>
|
||||
<askppplt:enum>
|
||||
<askppplt:name>SRV6_SRC_NODE_FIRST_PASS_2_3_CONTAINERS</askppplt:name>
|
||||
<askppplt:description>SRV6_SRC_NODE_FIRST_PASS_2_3_CONTAINERS</askppplt:description>
|
||||
<askppplt:value>42</askppplt:value>
|
||||
</askppplt:enum>
|
||||
<askppplt:enum>
|
||||
<askppplt:name>SRV6_SRC_NODE_SECOND_PASS_2_CONTAINERS</askppplt:name>
|
||||
<askppplt:description>SRV6_SRC_NODE_SECOND_PASS_2_CONTAINERS</askppplt:description>
|
||||
<askppplt:value>43</askppplt:value>
|
||||
</askppplt:enum>
|
||||
<askppplt:enum>
|
||||
<askppplt:name>SRV6_SRC_NODE_SECOND_PASS_3_CONTAINERS</askppplt:name>
|
||||
<askppplt:description>SRV6_SRC_NODE_SECOND_PASS_3_CONTAINERS</askppplt:description>
|
||||
<askppplt:value>44</askppplt:value>
|
||||
</askppplt:enum>
|
||||
<askppplt:enum>
|
||||
<askppplt:name>SRV6_END_NODE_COC32_GSID</askppplt:name>
|
||||
<askppplt:description>SRV6_END_NODE_COC32_GSID</askppplt:description>
|
||||
<askppplt:value>45</askppplt:value>
|
||||
</askppplt:enum>
|
||||
<askppplt:enum>
|
||||
<askppplt:name>IPV4_TTL_INCREMENT</askppplt:name>
|
||||
<askppplt:description>IPV4_TTL_INCREMENT</askppplt:description>
|
||||
<askppplt:value>46</askppplt:value>
|
||||
</askppplt:enum>
|
||||
<askppplt:enum>
|
||||
<askppplt:name>IPV6_HOP_LIMIT_INCREMENT</askppplt:name>
|
||||
<askppplt:description>IPV6_HOP_LIMIT_INCREMENT</askppplt:description>
|
||||
<askppplt:value>47</askppplt:value>
|
||||
</askppplt:enum>
|
||||
<askppplt:enum>
|
||||
<askppplt:name>CLEAR_OUTGOING_MTAG_COMMAND</askppplt:name>
|
||||
<askppplt:description>CLEAR_OUTGOING_MTAG_COMMAND</askppplt:description>
|
||||
<askppplt:value>48</askppplt:value>
|
||||
</askppplt:enum>
|
||||
<askppplt:enum>
|
||||
<askppplt:name>SFLOW_V5_IPV4</askppplt:name>
|
||||
<askppplt:description>SFLOW_V5_IPV4</askppplt:description>
|
||||
<askppplt:value>49</askppplt:value>
|
||||
</askppplt:enum>
|
||||
<askppplt:enum>
|
||||
<askppplt:name>SFLOW_V5_IPV6</askppplt:name>
|
||||
<askppplt:description>SFLOW_V5_IPV6</askppplt:description>
|
||||
<askppplt:value>50</askppplt:value>
|
||||
</askppplt:enum>
|
||||
<askppplt:enum>
|
||||
<askppplt:name>SLS</askppplt:name>
|
||||
<askppplt:description>SLS</askppplt:description>
|
||||
<askppplt:value>51</askppplt:value>
|
||||
</askppplt:enum>
|
||||
</askppplt:typedef>
|
||||
<askppplt:typedef>
|
||||
<askppplt:name>trunk-member-mode-type</askppplt:name>
|
||||
<askppplt:type>enumeration</askppplt:type>
|
||||
<askppplt:description>Specifies supported Pha image id</askppplt:description>
|
||||
<askppplt:enum>
|
||||
<askppplt:name>NATIVE</askppplt:name>
|
||||
<askppplt:description>NATIVE
|
||||
* the trunk members are filled
|
||||
* according to the order given by application.
|
||||
* Regular trunk may hold max of 8 members.
|
||||
* Cascade trunk may hold :
|
||||
* max of 64 members</askppplt:description>
|
||||
<askppplt:value>0</askppplt:value>
|
||||
</askppplt:enum>
|
||||
<askppplt:enum>
|
||||
<askppplt:name>FLEX</askppplt:name>
|
||||
<askppplt:description>FLEX
|
||||
* A mode to allows flexibility for
|
||||
* each Regular trunk to state it's max number of members (before starting to add members).
|
||||
* (this mode not effect 'cascade trunk' members)
|
||||
* Regular trunk may hold : max of 4K members. (each trunk set it's own limit)
|
||||
* Cascade trunk may hold : max of 64 members.</askppplt:description>
|
||||
<askppplt:value>2</askppplt:value>
|
||||
</askppplt:enum>
|
||||
</askppplt:typedef>
|
||||
<askppplt:typedef>
|
||||
<askppplt:name>number-physical-port-type</askppplt:name>
|
||||
<askppplt:type>enumeration</askppplt:type>
|
||||
<askppplt:description>ac5x 128, falcon 64,128,256, 512, 1024</askppplt:description>
|
||||
<askppplt:enum>
|
||||
<askppplt:name>no-ports</askppplt:name>
|
||||
<askppplt:description>no-ports</askppplt:description>
|
||||
<askppplt:value>0</askppplt:value>
|
||||
</askppplt:enum>
|
||||
<askppplt:enum>
|
||||
<askppplt:name>64-ports</askppplt:name>
|
||||
<askppplt:description>64-ports</askppplt:description>
|
||||
<askppplt:value>64</askppplt:value>
|
||||
</askppplt:enum>
|
||||
<askppplt:enum>
|
||||
<askppplt:name>128-ports</askppplt:name>
|
||||
<askppplt:description>128-ports</askppplt:description>
|
||||
<askppplt:value>128</askppplt:value>
|
||||
</askppplt:enum>
|
||||
<askppplt:enum>
|
||||
<askppplt:name>256-ports</askppplt:name>
|
||||
<askppplt:description>256-ports</askppplt:description>
|
||||
<askppplt:value>256</askppplt:value>
|
||||
</askppplt:enum>
|
||||
<askppplt:enum>
|
||||
<askppplt:name>512-ports</askppplt:name>
|
||||
<askppplt:description>512-ports</askppplt:description>
|
||||
<askppplt:value>512</askppplt:value>
|
||||
</askppplt:enum>
|
||||
<askppplt:enum>
|
||||
<askppplt:name>1024-ports</askppplt:name>
|
||||
<askppplt:description>1024-ports</askppplt:description>
|
||||
<askppplt:value>1024</askppplt:value>
|
||||
</askppplt:enum>
|
||||
</askppplt:typedef>
|
||||
<askppplt:typedef>
|
||||
<askppplt:name>serdes-ref-clock-type</askppplt:name>
|
||||
<askppplt:type>enumeration</askppplt:type>
|
||||
<askppplt:description>Specifies serdes refernce clock.</askppplt:description>
|
||||
<askppplt:enum>
|
||||
<askppplt:name>external_25_single_ended</askppplt:name>
|
||||
<askppplt:description>EXTERNAL_25_SINGLE_ENDED</askppplt:description>
|
||||
<askppplt:value>0</askppplt:value>
|
||||
</askppplt:enum>
|
||||
<askppplt:enum>
|
||||
<askppplt:name>external_125_single_ended</askppplt:name>
|
||||
<askppplt:description>EXTERNAL_125_SINGLE_ENDED</askppplt:description>
|
||||
<askppplt:value>1</askppplt:value>
|
||||
</askppplt:enum>
|
||||
<askppplt:enum>
|
||||
<askppplt:name>external_125_diff</askppplt:name>
|
||||
<askppplt:description>EXTERNAL_125_DIFF</askppplt:description>
|
||||
<askppplt:value>2</askppplt:value>
|
||||
</askppplt:enum>
|
||||
<askppplt:enum>
|
||||
<askppplt:name>external_156_25_single_ended</askppplt:name>
|
||||
<askppplt:description>EXTERNAL_156_25_SINGLE_ENDED</askppplt:description>
|
||||
<askppplt:value>3</askppplt:value>
|
||||
</askppplt:enum>
|
||||
<askppplt:enum>
|
||||
<askppplt:name>external_156_25_diff</askppplt:name>
|
||||
<askppplt:description>EXTERNAL_156_25_DIFF</askppplt:description>
|
||||
<askppplt:value>4</askppplt:value>
|
||||
</askppplt:enum>
|
||||
<askppplt:enum>
|
||||
<askppplt:name>internal_125</askppplt:name>
|
||||
<askppplt:description>INTERNAL_125</askppplt:description>
|
||||
<askppplt:value>5</askppplt:value>
|
||||
</askppplt:enum>
|
||||
</askppplt:typedef>
|
||||
<askppplt:typedef>
|
||||
<askppplt:name>cpu-port-id-type</askppplt:name>
|
||||
<askppplt:type>uint32</askppplt:type>
|
||||
<askppplt:description>CPU port id</askppplt:description>
|
||||
<askppplt:min>0</askppplt:min>
|
||||
<askppplt:max>7</askppplt:max>
|
||||
</askppplt:typedef>
|
||||
<askppplt:typedef>
|
||||
<askppplt:name>rx-buffer-size-type</askppplt:name>
|
||||
<askppplt:type>uint32</askppplt:type>
|
||||
<askppplt:description>Rx Buffer size</askppplt:description>
|
||||
<askppplt:min>64</askppplt:min>
|
||||
<askppplt:max>10240</askppplt:max>
|
||||
</askppplt:typedef>
|
||||
<askppplt:typedef>
|
||||
<askppplt:name>tx-sdma-queue-mode-type</askppplt:name>
|
||||
<askppplt:type>enumeration</askppplt:type>
|
||||
<askppplt:description>Specifies TX queue mode.</askppplt:description>
|
||||
<askppplt:enum>
|
||||
<askppplt:name>Normal</askppplt:name>
|
||||
<askppplt:description>Application</askppplt:description>
|
||||
<askppplt:value>0</askppplt:value>
|
||||
</askppplt:enum>
|
||||
<askppplt:enum>
|
||||
<askppplt:name>Packet_Generator</askppplt:name>
|
||||
<askppplt:description>Traffic generator</askppplt:description>
|
||||
<askppplt:value>1</askppplt:value>
|
||||
</askppplt:enum>
|
||||
</askppplt:typedef>
|
||||
<askppplt:typedef>
|
||||
<askppplt:name>alloc-method-type</askppplt:name>
|
||||
<askppplt:type>enumeration</askppplt:type>
|
||||
<askppplt:description>Specifies Buffers allocation method.</askppplt:description>
|
||||
<askppplt:enum>
|
||||
<askppplt:name>Dynamic_Alloc</askppplt:name>
|
||||
<askppplt:description>Dynamic</askppplt:description>
|
||||
<askppplt:value>0</askppplt:value>
|
||||
</askppplt:enum>
|
||||
<askppplt:enum>
|
||||
<askppplt:name>Static_Alloc</askppplt:name>
|
||||
<askppplt:description>Static</askppplt:description>
|
||||
<askppplt:value>1</askppplt:value>
|
||||
</askppplt:enum>
|
||||
</askppplt:typedef>
|
||||
<askppplt:typedef>
|
||||
<askppplt:name>au_mesage_lenght-type</askppplt:name>
|
||||
<askppplt:type>enumeration</askppplt:type>
|
||||
<askppplt:description>Specifies Buffers allocation method.</askppplt:description>
|
||||
<askppplt:enum>
|
||||
<askppplt:name>4_words</askppplt:name>
|
||||
<askppplt:description>4 Words</askppplt:description>
|
||||
<askppplt:value>0</askppplt:value>
|
||||
</askppplt:enum>
|
||||
<askppplt:enum>
|
||||
<askppplt:name>8_words</askppplt:name>
|
||||
<askppplt:description>8 Words</askppplt:description>
|
||||
<askppplt:value>1</askppplt:value>
|
||||
</askppplt:enum>
|
||||
</askppplt:typedef>
|
||||
<askppplt:typedef>
|
||||
<askppplt:name>boolean-type</askppplt:name>
|
||||
<askppplt:type>enumeration</askppplt:type>
|
||||
<askppplt:description>Boolean 32 bits , due to bing endian</askppplt:description>
|
||||
<askppplt:enum>
|
||||
<askppplt:name>false</askppplt:name>
|
||||
<askppplt:description>False</askppplt:description>
|
||||
<askppplt:value>0</askppplt:value>
|
||||
</askppplt:enum>
|
||||
<askppplt:enum>
|
||||
<askppplt:name>true</askppplt:name>
|
||||
<askppplt:description>True</askppplt:description>
|
||||
<askppplt:value>1</askppplt:value>
|
||||
</askppplt:enum>
|
||||
</askppplt:typedef>
|
||||
</askppplt:typedefs>
|
||||
<askppplt:PPInit>
|
||||
<askppplt:PP-name askppplt:type="std-string">AC5X-RD</askppplt:PP-name>
|
||||
<askppplt:Phase1>
|
||||
<askppplt:coreClock askppplt:type="uint32">4294967295</askppplt:coreClock>
|
||||
<askppplt:serdesRefClock askppplt:type="serdes-ref-clock-type">external_25_single_ended</askppplt:serdesRefClock>
|
||||
<askppplt:isrAddrCompletionRegionsBmp askppplt:type="uint32">2</askppplt:isrAddrCompletionRegionsBmp>
|
||||
<askppplt:appAddrCompletionRegionsBmp askppplt:type="uint32">60</askppplt:appAddrCompletionRegionsBmp>
|
||||
<askppplt:maxNumOfPhyPortsToUse askppplt:type="number-physical-port-type">128-ports</askppplt:maxNumOfPhyPortsToUse>
|
||||
<askppplt:tcamParityCalcEnable askppplt:type="boolean-type">false</askppplt:tcamParityCalcEnable>
|
||||
<askppplt:apEnable askppplt:type="boolean-type">false</askppplt:apEnable>
|
||||
<askppplt:numOfDataIntegrityElements askppplt:type="uint32">0</askppplt:numOfDataIntegrityElements>
|
||||
</askppplt:Phase1>
|
||||
<askppplt:Phase2>
|
||||
<askppplt:useMultiNetIfSdma askppplt:type="boolean-type">true</askppplt:useMultiNetIfSdma>
|
||||
<askppplt:auqCfg>
|
||||
<askppplt:auDescNum askppplt:type="uint32">4096</askppplt:auDescNum>
|
||||
</askppplt:auqCfg>
|
||||
<askppplt:fuqCfg>
|
||||
<askppplt:fuDescNum askppplt:type="uint32">2048</askppplt:fuDescNum>
|
||||
</askppplt:fuqCfg>
|
||||
<askppplt:multiNetIfCfg>
|
||||
<askppplt:rxSdmaQueuesConfig-list>
|
||||
<askppplt:rx_sdma_cpu_port askppplt:type="cpu-port-id-type">0</askppplt:rx_sdma_cpu_port>
|
||||
<askppplt:rx_sdma_cpu_queue askppplt:type="queue-id-type">0</askppplt:rx_sdma_cpu_queue>
|
||||
<askppplt:buffAllocMethod askppplt:type="alloc-method-type">Static_Alloc</askppplt:buffAllocMethod>
|
||||
<askppplt:numOfRxDesc askppplt:type="uint32">20</askppplt:numOfRxDesc>
|
||||
<askppplt:numOfRxBuff askppplt:type="uint32">20</askppplt:numOfRxBuff>
|
||||
<askppplt:buffSize askppplt:type="rx-buffer-size-type">2048</askppplt:buffSize>
|
||||
<askppplt:buffHeaderOffset askppplt:type="uint32">0</askppplt:buffHeaderOffset>
|
||||
</askppplt:rxSdmaQueuesConfig-list>
|
||||
<askppplt:rxSdmaQueuesConfig-list>
|
||||
<askppplt:rx_sdma_cpu_port askppplt:type="cpu-port-id-type">1</askppplt:rx_sdma_cpu_port>
|
||||
<askppplt:rx_sdma_cpu_queue askppplt:type="queue-id-type">7</askppplt:rx_sdma_cpu_queue>
|
||||
<askppplt:buffAllocMethod askppplt:type="alloc-method-type">Static_Alloc</askppplt:buffAllocMethod>
|
||||
<askppplt:numOfRxDesc askppplt:type="uint32">20</askppplt:numOfRxDesc>
|
||||
<askppplt:numOfRxBuff askppplt:type="uint32">20</askppplt:numOfRxBuff>
|
||||
<askppplt:buffSize askppplt:type="rx-buffer-size-type">2048</askppplt:buffSize>
|
||||
<askppplt:buffHeaderOffset askppplt:type="uint32">0</askppplt:buffHeaderOffset>
|
||||
</askppplt:rxSdmaQueuesConfig-list>
|
||||
<askppplt:rxSdmaQueuesConfig-list>
|
||||
<askppplt:rx_sdma_cpu_port askppplt:type="cpu-port-id-type">1</askppplt:rx_sdma_cpu_port>
|
||||
<askppplt:rx_sdma_cpu_queue askppplt:type="queue-id-type">6</askppplt:rx_sdma_cpu_queue>
|
||||
<askppplt:buffAllocMethod askppplt:type="alloc-method-type">Static_Alloc</askppplt:buffAllocMethod>
|
||||
<askppplt:numOfRxDesc askppplt:type="uint32">20</askppplt:numOfRxDesc>
|
||||
<askppplt:numOfRxBuff askppplt:type="uint32">20</askppplt:numOfRxBuff>
|
||||
<askppplt:buffSize askppplt:type="rx-buffer-size-type">2048</askppplt:buffSize>
|
||||
<askppplt:buffHeaderOffset askppplt:type="uint32">0</askppplt:buffHeaderOffset>
|
||||
</askppplt:rxSdmaQueuesConfig-list>
|
||||
<askppplt:rxSdmaQueuesConfig-list>
|
||||
<askppplt:rx_sdma_cpu_port askppplt:type="cpu-port-id-type">1</askppplt:rx_sdma_cpu_port>
|
||||
<askppplt:rx_sdma_cpu_queue askppplt:type="queue-id-type">5</askppplt:rx_sdma_cpu_queue>
|
||||
<askppplt:buffAllocMethod askppplt:type="alloc-method-type">Static_Alloc</askppplt:buffAllocMethod>
|
||||
<askppplt:numOfRxDesc askppplt:type="uint32">20</askppplt:numOfRxDesc>
|
||||
<askppplt:numOfRxBuff askppplt:type="uint32">20</askppplt:numOfRxBuff>
|
||||
<askppplt:buffSize askppplt:type="rx-buffer-size-type">2048</askppplt:buffSize>
|
||||
<askppplt:buffHeaderOffset askppplt:type="uint32">0</askppplt:buffHeaderOffset>
|
||||
</askppplt:rxSdmaQueuesConfig-list>
|
||||
<askppplt:rxSdmaQueuesConfig-list>
|
||||
<askppplt:rx_sdma_cpu_port askppplt:type="cpu-port-id-type">1</askppplt:rx_sdma_cpu_port>
|
||||
<askppplt:rx_sdma_cpu_queue askppplt:type="queue-id-type">4</askppplt:rx_sdma_cpu_queue>
|
||||
<askppplt:buffAllocMethod askppplt:type="alloc-method-type">Static_Alloc</askppplt:buffAllocMethod>
|
||||
<askppplt:numOfRxDesc askppplt:type="uint32">20</askppplt:numOfRxDesc>
|
||||
<askppplt:numOfRxBuff askppplt:type="uint32">20</askppplt:numOfRxBuff>
|
||||
<askppplt:buffSize askppplt:type="rx-buffer-size-type">2048</askppplt:buffSize>
|
||||
<askppplt:buffHeaderOffset askppplt:type="uint32">0</askppplt:buffHeaderOffset>
|
||||
</askppplt:rxSdmaQueuesConfig-list>
|
||||
<askppplt:rxSdmaQueuesConfig-list>
|
||||
<askppplt:rx_sdma_cpu_port askppplt:type="cpu-port-id-type">1</askppplt:rx_sdma_cpu_port>
|
||||
<askppplt:rx_sdma_cpu_queue askppplt:type="queue-id-type">3</askppplt:rx_sdma_cpu_queue>
|
||||
<askppplt:buffAllocMethod askppplt:type="alloc-method-type">Static_Alloc</askppplt:buffAllocMethod>
|
||||
<askppplt:numOfRxDesc askppplt:type="uint32">20</askppplt:numOfRxDesc>
|
||||
<askppplt:numOfRxBuff askppplt:type="uint32">20</askppplt:numOfRxBuff>
|
||||
<askppplt:buffSize askppplt:type="rx-buffer-size-type">2048</askppplt:buffSize>
|
||||
<askppplt:buffHeaderOffset askppplt:type="uint32">0</askppplt:buffHeaderOffset>
|
||||
</askppplt:rxSdmaQueuesConfig-list>
|
||||
<askppplt:rxSdmaQueuesConfig-list>
|
||||
<askppplt:rx_sdma_cpu_port askppplt:type="cpu-port-id-type">1</askppplt:rx_sdma_cpu_port>
|
||||
<askppplt:rx_sdma_cpu_queue askppplt:type="queue-id-type">2</askppplt:rx_sdma_cpu_queue>
|
||||
<askppplt:buffAllocMethod askppplt:type="alloc-method-type">Static_Alloc</askppplt:buffAllocMethod>
|
||||
<askppplt:numOfRxDesc askppplt:type="uint32">20</askppplt:numOfRxDesc>
|
||||
<askppplt:numOfRxBuff askppplt:type="uint32">20</askppplt:numOfRxBuff>
|
||||
<askppplt:buffSize askppplt:type="rx-buffer-size-type">2048</askppplt:buffSize>
|
||||
<askppplt:buffHeaderOffset askppplt:type="uint32">0</askppplt:buffHeaderOffset>
|
||||
</askppplt:rxSdmaQueuesConfig-list>
|
||||
<askppplt:rxSdmaQueuesConfig-list>
|
||||
<askppplt:rx_sdma_cpu_port askppplt:type="cpu-port-id-type">1</askppplt:rx_sdma_cpu_port>
|
||||
<askppplt:rx_sdma_cpu_queue askppplt:type="queue-id-type">1</askppplt:rx_sdma_cpu_queue>
|
||||
<askppplt:buffAllocMethod askppplt:type="alloc-method-type">Static_Alloc</askppplt:buffAllocMethod>
|
||||
<askppplt:numOfRxDesc askppplt:type="uint32">20</askppplt:numOfRxDesc>
|
||||
<askppplt:numOfRxBuff askppplt:type="uint32">20</askppplt:numOfRxBuff>
|
||||
<askppplt:buffSize askppplt:type="rx-buffer-size-type">2048</askppplt:buffSize>
|
||||
<askppplt:buffHeaderOffset askppplt:type="uint32">0</askppplt:buffHeaderOffset>
|
||||
</askppplt:rxSdmaQueuesConfig-list>
|
||||
<askppplt:rxSdmaQueuesConfig-list>
|
||||
<askppplt:rx_sdma_cpu_port askppplt:type="cpu-port-id-type">1</askppplt:rx_sdma_cpu_port>
|
||||
<askppplt:rx_sdma_cpu_queue askppplt:type="queue-id-type">0</askppplt:rx_sdma_cpu_queue>
|
||||
<askppplt:buffAllocMethod askppplt:type="alloc-method-type">Static_Alloc</askppplt:buffAllocMethod>
|
||||
<askppplt:numOfRxDesc askppplt:type="uint32">20</askppplt:numOfRxDesc>
|
||||
<askppplt:numOfRxBuff askppplt:type="uint32">20</askppplt:numOfRxBuff>
|
||||
<askppplt:buffSize askppplt:type="rx-buffer-size-type">2048</askppplt:buffSize>
|
||||
<askppplt:buffHeaderOffset askppplt:type="uint32">0</askppplt:buffHeaderOffset>
|
||||
</askppplt:rxSdmaQueuesConfig-list>
|
||||
<askppplt:rxSdmaQueuesConfig-list>
|
||||
<askppplt:rx_sdma_cpu_port askppplt:type="cpu-port-id-type">0</askppplt:rx_sdma_cpu_port>
|
||||
<askppplt:rx_sdma_cpu_queue askppplt:type="queue-id-type">7</askppplt:rx_sdma_cpu_queue>
|
||||
<askppplt:buffAllocMethod askppplt:type="alloc-method-type">Static_Alloc</askppplt:buffAllocMethod>
|
||||
<askppplt:numOfRxDesc askppplt:type="uint32">20</askppplt:numOfRxDesc>
|
||||
<askppplt:numOfRxBuff askppplt:type="uint32">20</askppplt:numOfRxBuff>
|
||||
<askppplt:buffSize askppplt:type="rx-buffer-size-type">2048</askppplt:buffSize>
|
||||
<askppplt:buffHeaderOffset askppplt:type="uint32">0</askppplt:buffHeaderOffset>
|
||||
</askppplt:rxSdmaQueuesConfig-list>
|
||||
<askppplt:rxSdmaQueuesConfig-list>
|
||||
<askppplt:rx_sdma_cpu_port askppplt:type="cpu-port-id-type">0</askppplt:rx_sdma_cpu_port>
|
||||
<askppplt:rx_sdma_cpu_queue askppplt:type="queue-id-type">6</askppplt:rx_sdma_cpu_queue>
|
||||
<askppplt:buffAllocMethod askppplt:type="alloc-method-type">Static_Alloc</askppplt:buffAllocMethod>
|
||||
<askppplt:numOfRxDesc askppplt:type="uint32">20</askppplt:numOfRxDesc>
|
||||
<askppplt:numOfRxBuff askppplt:type="uint32">20</askppplt:numOfRxBuff>
|
||||
<askppplt:buffSize askppplt:type="rx-buffer-size-type">2048</askppplt:buffSize>
|
||||
<askppplt:buffHeaderOffset askppplt:type="uint32">0</askppplt:buffHeaderOffset>
|
||||
</askppplt:rxSdmaQueuesConfig-list>
|
||||
<askppplt:rxSdmaQueuesConfig-list>
|
||||
<askppplt:rx_sdma_cpu_port askppplt:type="cpu-port-id-type">0</askppplt:rx_sdma_cpu_port>
|
||||
<askppplt:rx_sdma_cpu_queue askppplt:type="queue-id-type">5</askppplt:rx_sdma_cpu_queue>
|
||||
<askppplt:buffAllocMethod askppplt:type="alloc-method-type">Static_Alloc</askppplt:buffAllocMethod>
|
||||
<askppplt:numOfRxDesc askppplt:type="uint32">20</askppplt:numOfRxDesc>
|
||||
<askppplt:numOfRxBuff askppplt:type="uint32">20</askppplt:numOfRxBuff>
|
||||
<askppplt:buffSize askppplt:type="rx-buffer-size-type">2048</askppplt:buffSize>
|
||||
<askppplt:buffHeaderOffset askppplt:type="uint32">0</askppplt:buffHeaderOffset>
|
||||
</askppplt:rxSdmaQueuesConfig-list>
|
||||
<askppplt:rxSdmaQueuesConfig-list>
|
||||
<askppplt:rx_sdma_cpu_port askppplt:type="cpu-port-id-type">0</askppplt:rx_sdma_cpu_port>
|
||||
<askppplt:rx_sdma_cpu_queue askppplt:type="queue-id-type">4</askppplt:rx_sdma_cpu_queue>
|
||||
<askppplt:buffAllocMethod askppplt:type="alloc-method-type">Static_Alloc</askppplt:buffAllocMethod>
|
||||
<askppplt:numOfRxDesc askppplt:type="uint32">20</askppplt:numOfRxDesc>
|
||||
<askppplt:numOfRxBuff askppplt:type="uint32">20</askppplt:numOfRxBuff>
|
||||
<askppplt:buffSize askppplt:type="rx-buffer-size-type">2048</askppplt:buffSize>
|
||||
<askppplt:buffHeaderOffset askppplt:type="uint32">0</askppplt:buffHeaderOffset>
|
||||
</askppplt:rxSdmaQueuesConfig-list>
|
||||
<askppplt:rxSdmaQueuesConfig-list>
|
||||
<askppplt:rx_sdma_cpu_port askppplt:type="cpu-port-id-type">0</askppplt:rx_sdma_cpu_port>
|
||||
<askppplt:rx_sdma_cpu_queue askppplt:type="queue-id-type">3</askppplt:rx_sdma_cpu_queue>
|
||||
<askppplt:buffAllocMethod askppplt:type="alloc-method-type">Static_Alloc</askppplt:buffAllocMethod>
|
||||
<askppplt:numOfRxDesc askppplt:type="uint32">20</askppplt:numOfRxDesc>
|
||||
<askppplt:numOfRxBuff askppplt:type="uint32">20</askppplt:numOfRxBuff>
|
||||
<askppplt:buffSize askppplt:type="rx-buffer-size-type">2048</askppplt:buffSize>
|
||||
<askppplt:buffHeaderOffset askppplt:type="uint32">0</askppplt:buffHeaderOffset>
|
||||
</askppplt:rxSdmaQueuesConfig-list>
|
||||
<askppplt:rxSdmaQueuesConfig-list>
|
||||
<askppplt:rx_sdma_cpu_port askppplt:type="cpu-port-id-type">0</askppplt:rx_sdma_cpu_port>
|
||||
<askppplt:rx_sdma_cpu_queue askppplt:type="queue-id-type">2</askppplt:rx_sdma_cpu_queue>
|
||||
<askppplt:buffAllocMethod askppplt:type="alloc-method-type">Static_Alloc</askppplt:buffAllocMethod>
|
||||
<askppplt:numOfRxDesc askppplt:type="uint32">20</askppplt:numOfRxDesc>
|
||||
<askppplt:numOfRxBuff askppplt:type="uint32">20</askppplt:numOfRxBuff>
|
||||
<askppplt:buffSize askppplt:type="rx-buffer-size-type">2048</askppplt:buffSize>
|
||||
<askppplt:buffHeaderOffset askppplt:type="uint32">0</askppplt:buffHeaderOffset>
|
||||
</askppplt:rxSdmaQueuesConfig-list>
|
||||
<askppplt:rxSdmaQueuesConfig-list>
|
||||
<askppplt:rx_sdma_cpu_port askppplt:type="cpu-port-id-type">0</askppplt:rx_sdma_cpu_port>
|
||||
<askppplt:rx_sdma_cpu_queue askppplt:type="queue-id-type">1</askppplt:rx_sdma_cpu_queue>
|
||||
<askppplt:buffAllocMethod askppplt:type="alloc-method-type">Static_Alloc</askppplt:buffAllocMethod>
|
||||
<askppplt:numOfRxDesc askppplt:type="uint32">20</askppplt:numOfRxDesc>
|
||||
<askppplt:numOfRxBuff askppplt:type="uint32">20</askppplt:numOfRxBuff>
|
||||
<askppplt:buffSize askppplt:type="rx-buffer-size-type">2048</askppplt:buffSize>
|
||||
<askppplt:buffHeaderOffset askppplt:type="uint32">0</askppplt:buffHeaderOffset>
|
||||
</askppplt:rxSdmaQueuesConfig-list>
|
||||
<askppplt:txSdmaQueuesConfig-list>
|
||||
<askppplt:tx_sdma_cpu_port askppplt:type="cpu-port-id-type">0</askppplt:tx_sdma_cpu_port>
|
||||
<askppplt:tx_sdma_cpu_queue askppplt:type="queue-id-type">0</askppplt:tx_sdma_cpu_queue>
|
||||
<askppplt:buffAndDescAllocMethod askppplt:type="alloc-method-type">Static_Alloc</askppplt:buffAndDescAllocMethod>
|
||||
<askppplt:queueMode askppplt:type="tx-sdma-queue-mode-type">Normal</askppplt:queueMode>
|
||||
<askppplt:numOfTxDesc askppplt:type="uint32">20</askppplt:numOfTxDesc>
|
||||
<askppplt:numOfTxBuff askppplt:type="uint32">0</askppplt:numOfTxBuff>
|
||||
<askppplt:TxBuffSize askppplt:type="rx-buffer-size-type">128</askppplt:TxBuffSize>
|
||||
</askppplt:txSdmaQueuesConfig-list>
|
||||
<askppplt:txSdmaQueuesConfig-list>
|
||||
<askppplt:tx_sdma_cpu_port askppplt:type="cpu-port-id-type">0</askppplt:tx_sdma_cpu_port>
|
||||
<askppplt:tx_sdma_cpu_queue askppplt:type="queue-id-type">1</askppplt:tx_sdma_cpu_queue>
|
||||
<askppplt:buffAndDescAllocMethod askppplt:type="alloc-method-type">Static_Alloc</askppplt:buffAndDescAllocMethod>
|
||||
<askppplt:queueMode askppplt:type="tx-sdma-queue-mode-type">Normal</askppplt:queueMode>
|
||||
<askppplt:numOfTxDesc askppplt:type="uint32">20</askppplt:numOfTxDesc>
|
||||
<askppplt:numOfTxBuff askppplt:type="uint32">0</askppplt:numOfTxBuff>
|
||||
<askppplt:TxBuffSize askppplt:type="rx-buffer-size-type">128</askppplt:TxBuffSize>
|
||||
</askppplt:txSdmaQueuesConfig-list>
|
||||
<askppplt:txSdmaQueuesConfig-list>
|
||||
<askppplt:tx_sdma_cpu_port askppplt:type="cpu-port-id-type">0</askppplt:tx_sdma_cpu_port>
|
||||
<askppplt:tx_sdma_cpu_queue askppplt:type="queue-id-type">2</askppplt:tx_sdma_cpu_queue>
|
||||
<askppplt:buffAndDescAllocMethod askppplt:type="alloc-method-type">Static_Alloc</askppplt:buffAndDescAllocMethod>
|
||||
<askppplt:queueMode askppplt:type="tx-sdma-queue-mode-type">Normal</askppplt:queueMode>
|
||||
<askppplt:numOfTxDesc askppplt:type="uint32">20</askppplt:numOfTxDesc>
|
||||
<askppplt:numOfTxBuff askppplt:type="uint32">0</askppplt:numOfTxBuff>
|
||||
<askppplt:TxBuffSize askppplt:type="rx-buffer-size-type">128</askppplt:TxBuffSize>
|
||||
</askppplt:txSdmaQueuesConfig-list>
|
||||
<askppplt:txSdmaQueuesConfig-list>
|
||||
<askppplt:tx_sdma_cpu_port askppplt:type="cpu-port-id-type">0</askppplt:tx_sdma_cpu_port>
|
||||
<askppplt:tx_sdma_cpu_queue askppplt:type="queue-id-type">3</askppplt:tx_sdma_cpu_queue>
|
||||
<askppplt:buffAndDescAllocMethod askppplt:type="alloc-method-type">Static_Alloc</askppplt:buffAndDescAllocMethod>
|
||||
<askppplt:queueMode askppplt:type="tx-sdma-queue-mode-type">Normal</askppplt:queueMode>
|
||||
<askppplt:numOfTxDesc askppplt:type="uint32">20</askppplt:numOfTxDesc>
|
||||
<askppplt:numOfTxBuff askppplt:type="uint32">0</askppplt:numOfTxBuff>
|
||||
<askppplt:TxBuffSize askppplt:type="rx-buffer-size-type">128</askppplt:TxBuffSize>
|
||||
</askppplt:txSdmaQueuesConfig-list>
|
||||
<askppplt:txSdmaQueuesConfig-list>
|
||||
<askppplt:tx_sdma_cpu_port askppplt:type="cpu-port-id-type">0</askppplt:tx_sdma_cpu_port>
|
||||
<askppplt:tx_sdma_cpu_queue askppplt:type="queue-id-type">4</askppplt:tx_sdma_cpu_queue>
|
||||
<askppplt:buffAndDescAllocMethod askppplt:type="alloc-method-type">Static_Alloc</askppplt:buffAndDescAllocMethod>
|
||||
<askppplt:queueMode askppplt:type="tx-sdma-queue-mode-type">Normal</askppplt:queueMode>
|
||||
<askppplt:numOfTxDesc askppplt:type="uint32">20</askppplt:numOfTxDesc>
|
||||
<askppplt:numOfTxBuff askppplt:type="uint32">0</askppplt:numOfTxBuff>
|
||||
<askppplt:TxBuffSize askppplt:type="rx-buffer-size-type">128</askppplt:TxBuffSize>
|
||||
</askppplt:txSdmaQueuesConfig-list>
|
||||
<askppplt:txSdmaQueuesConfig-list>
|
||||
<askppplt:tx_sdma_cpu_port askppplt:type="cpu-port-id-type">0</askppplt:tx_sdma_cpu_port>
|
||||
<askppplt:tx_sdma_cpu_queue askppplt:type="queue-id-type">5</askppplt:tx_sdma_cpu_queue>
|
||||
<askppplt:buffAndDescAllocMethod askppplt:type="alloc-method-type">Static_Alloc</askppplt:buffAndDescAllocMethod>
|
||||
<askppplt:queueMode askppplt:type="tx-sdma-queue-mode-type">Normal</askppplt:queueMode>
|
||||
<askppplt:numOfTxDesc askppplt:type="uint32">20</askppplt:numOfTxDesc>
|
||||
<askppplt:numOfTxBuff askppplt:type="uint32">0</askppplt:numOfTxBuff>
|
||||
<askppplt:TxBuffSize askppplt:type="rx-buffer-size-type">128</askppplt:TxBuffSize>
|
||||
</askppplt:txSdmaQueuesConfig-list>
|
||||
<askppplt:txSdmaQueuesConfig-list>
|
||||
<askppplt:tx_sdma_cpu_port askppplt:type="cpu-port-id-type">0</askppplt:tx_sdma_cpu_port>
|
||||
<askppplt:tx_sdma_cpu_queue askppplt:type="queue-id-type">6</askppplt:tx_sdma_cpu_queue>
|
||||
<askppplt:buffAndDescAllocMethod askppplt:type="alloc-method-type">Static_Alloc</askppplt:buffAndDescAllocMethod>
|
||||
<askppplt:queueMode askppplt:type="tx-sdma-queue-mode-type">Normal</askppplt:queueMode>
|
||||
<askppplt:numOfTxDesc askppplt:type="uint32">20</askppplt:numOfTxDesc>
|
||||
<askppplt:numOfTxBuff askppplt:type="uint32">0</askppplt:numOfTxBuff>
|
||||
<askppplt:TxBuffSize askppplt:type="rx-buffer-size-type">128</askppplt:TxBuffSize>
|
||||
</askppplt:txSdmaQueuesConfig-list>
|
||||
<askppplt:txSdmaQueuesConfig-list>
|
||||
<askppplt:tx_sdma_cpu_port askppplt:type="cpu-port-id-type">0</askppplt:tx_sdma_cpu_port>
|
||||
<askppplt:tx_sdma_cpu_queue askppplt:type="queue-id-type">7</askppplt:tx_sdma_cpu_queue>
|
||||
<askppplt:buffAndDescAllocMethod askppplt:type="alloc-method-type">Static_Alloc</askppplt:buffAndDescAllocMethod>
|
||||
<askppplt:queueMode askppplt:type="tx-sdma-queue-mode-type">Normal</askppplt:queueMode>
|
||||
<askppplt:numOfTxDesc askppplt:type="uint32">20</askppplt:numOfTxDesc>
|
||||
<askppplt:numOfTxBuff askppplt:type="uint32">0</askppplt:numOfTxBuff>
|
||||
<askppplt:TxBuffSize askppplt:type="rx-buffer-size-type">128</askppplt:TxBuffSize>
|
||||
</askppplt:txSdmaQueuesConfig-list>
|
||||
<askppplt:txSdmaQueuesConfig-list>
|
||||
<askppplt:tx_sdma_cpu_port askppplt:type="cpu-port-id-type">1</askppplt:tx_sdma_cpu_port>
|
||||
<askppplt:tx_sdma_cpu_queue askppplt:type="queue-id-type">0</askppplt:tx_sdma_cpu_queue>
|
||||
<askppplt:buffAndDescAllocMethod askppplt:type="alloc-method-type">Static_Alloc</askppplt:buffAndDescAllocMethod>
|
||||
<askppplt:queueMode askppplt:type="tx-sdma-queue-mode-type">Normal</askppplt:queueMode>
|
||||
<askppplt:numOfTxDesc askppplt:type="uint32">20</askppplt:numOfTxDesc>
|
||||
<askppplt:numOfTxBuff askppplt:type="uint32">0</askppplt:numOfTxBuff>
|
||||
<askppplt:TxBuffSize askppplt:type="rx-buffer-size-type">128</askppplt:TxBuffSize>
|
||||
</askppplt:txSdmaQueuesConfig-list>
|
||||
<askppplt:txSdmaQueuesConfig-list>
|
||||
<askppplt:tx_sdma_cpu_port askppplt:type="cpu-port-id-type">1</askppplt:tx_sdma_cpu_port>
|
||||
<askppplt:tx_sdma_cpu_queue askppplt:type="queue-id-type">1</askppplt:tx_sdma_cpu_queue>
|
||||
<askppplt:buffAndDescAllocMethod askppplt:type="alloc-method-type">Static_Alloc</askppplt:buffAndDescAllocMethod>
|
||||
<askppplt:queueMode askppplt:type="tx-sdma-queue-mode-type">Normal</askppplt:queueMode>
|
||||
<askppplt:numOfTxDesc askppplt:type="uint32">20</askppplt:numOfTxDesc>
|
||||
<askppplt:numOfTxBuff askppplt:type="uint32">0</askppplt:numOfTxBuff>
|
||||
<askppplt:TxBuffSize askppplt:type="rx-buffer-size-type">128</askppplt:TxBuffSize>
|
||||
</askppplt:txSdmaQueuesConfig-list>
|
||||
<askppplt:txSdmaQueuesConfig-list>
|
||||
<askppplt:tx_sdma_cpu_port askppplt:type="cpu-port-id-type">1</askppplt:tx_sdma_cpu_port>
|
||||
<askppplt:tx_sdma_cpu_queue askppplt:type="queue-id-type">2</askppplt:tx_sdma_cpu_queue>
|
||||
<askppplt:buffAndDescAllocMethod askppplt:type="alloc-method-type">Static_Alloc</askppplt:buffAndDescAllocMethod>
|
||||
<askppplt:queueMode askppplt:type="tx-sdma-queue-mode-type">Normal</askppplt:queueMode>
|
||||
<askppplt:numOfTxDesc askppplt:type="uint32">20</askppplt:numOfTxDesc>
|
||||
<askppplt:numOfTxBuff askppplt:type="uint32">0</askppplt:numOfTxBuff>
|
||||
<askppplt:TxBuffSize askppplt:type="rx-buffer-size-type">128</askppplt:TxBuffSize>
|
||||
</askppplt:txSdmaQueuesConfig-list>
|
||||
<askppplt:txSdmaQueuesConfig-list>
|
||||
<askppplt:tx_sdma_cpu_port askppplt:type="cpu-port-id-type">1</askppplt:tx_sdma_cpu_port>
|
||||
<askppplt:tx_sdma_cpu_queue askppplt:type="queue-id-type">3</askppplt:tx_sdma_cpu_queue>
|
||||
<askppplt:buffAndDescAllocMethod askppplt:type="alloc-method-type">Static_Alloc</askppplt:buffAndDescAllocMethod>
|
||||
<askppplt:queueMode askppplt:type="tx-sdma-queue-mode-type">Normal</askppplt:queueMode>
|
||||
<askppplt:numOfTxDesc askppplt:type="uint32">20</askppplt:numOfTxDesc>
|
||||
<askppplt:numOfTxBuff askppplt:type="uint32">0</askppplt:numOfTxBuff>
|
||||
<askppplt:TxBuffSize askppplt:type="rx-buffer-size-type">128</askppplt:TxBuffSize>
|
||||
</askppplt:txSdmaQueuesConfig-list>
|
||||
<askppplt:txSdmaQueuesConfig-list>
|
||||
<askppplt:tx_sdma_cpu_port askppplt:type="cpu-port-id-type">1</askppplt:tx_sdma_cpu_port>
|
||||
<askppplt:tx_sdma_cpu_queue askppplt:type="queue-id-type">4</askppplt:tx_sdma_cpu_queue>
|
||||
<askppplt:buffAndDescAllocMethod askppplt:type="alloc-method-type">Static_Alloc</askppplt:buffAndDescAllocMethod>
|
||||
<askppplt:queueMode askppplt:type="tx-sdma-queue-mode-type">Normal</askppplt:queueMode>
|
||||
<askppplt:numOfTxDesc askppplt:type="uint32">20</askppplt:numOfTxDesc>
|
||||
<askppplt:numOfTxBuff askppplt:type="uint32">0</askppplt:numOfTxBuff>
|
||||
<askppplt:TxBuffSize askppplt:type="rx-buffer-size-type">128</askppplt:TxBuffSize>
|
||||
</askppplt:txSdmaQueuesConfig-list>
|
||||
<askppplt:txSdmaQueuesConfig-list>
|
||||
<askppplt:tx_sdma_cpu_port askppplt:type="cpu-port-id-type">1</askppplt:tx_sdma_cpu_port>
|
||||
<askppplt:tx_sdma_cpu_queue askppplt:type="queue-id-type">5</askppplt:tx_sdma_cpu_queue>
|
||||
<askppplt:buffAndDescAllocMethod askppplt:type="alloc-method-type">Static_Alloc</askppplt:buffAndDescAllocMethod>
|
||||
<askppplt:queueMode askppplt:type="tx-sdma-queue-mode-type">Normal</askppplt:queueMode>
|
||||
<askppplt:numOfTxDesc askppplt:type="uint32">20</askppplt:numOfTxDesc>
|
||||
<askppplt:numOfTxBuff askppplt:type="uint32">0</askppplt:numOfTxBuff>
|
||||
<askppplt:TxBuffSize askppplt:type="rx-buffer-size-type">128</askppplt:TxBuffSize>
|
||||
</askppplt:txSdmaQueuesConfig-list>
|
||||
<askppplt:txSdmaQueuesConfig-list>
|
||||
<askppplt:tx_sdma_cpu_port askppplt:type="cpu-port-id-type">1</askppplt:tx_sdma_cpu_port>
|
||||
<askppplt:tx_sdma_cpu_queue askppplt:type="queue-id-type">6</askppplt:tx_sdma_cpu_queue>
|
||||
<askppplt:buffAndDescAllocMethod askppplt:type="alloc-method-type">Static_Alloc</askppplt:buffAndDescAllocMethod>
|
||||
<askppplt:queueMode askppplt:type="tx-sdma-queue-mode-type">Normal</askppplt:queueMode>
|
||||
<askppplt:numOfTxDesc askppplt:type="uint32">20</askppplt:numOfTxDesc>
|
||||
<askppplt:numOfTxBuff askppplt:type="uint32">0</askppplt:numOfTxBuff>
|
||||
<askppplt:TxBuffSize askppplt:type="rx-buffer-size-type">128</askppplt:TxBuffSize>
|
||||
</askppplt:txSdmaQueuesConfig-list>
|
||||
<askppplt:txSdmaQueuesConfig-list>
|
||||
<askppplt:tx_sdma_cpu_port askppplt:type="cpu-port-id-type">1</askppplt:tx_sdma_cpu_port>
|
||||
<askppplt:tx_sdma_cpu_queue askppplt:type="queue-id-type">7</askppplt:tx_sdma_cpu_queue>
|
||||
<askppplt:buffAndDescAllocMethod askppplt:type="alloc-method-type">Static_Alloc</askppplt:buffAndDescAllocMethod>
|
||||
<askppplt:queueMode askppplt:type="tx-sdma-queue-mode-type">Normal</askppplt:queueMode>
|
||||
<askppplt:numOfTxDesc askppplt:type="uint32">20</askppplt:numOfTxDesc>
|
||||
<askppplt:numOfTxBuff askppplt:type="uint32">0</askppplt:numOfTxBuff>
|
||||
<askppplt:TxBuffSize askppplt:type="rx-buffer-size-type">128</askppplt:TxBuffSize>
|
||||
</askppplt:txSdmaQueuesConfig-list>
|
||||
</askppplt:multiNetIfCfg>
|
||||
<askppplt:internal>
|
||||
<askppplt:fuqUseSeparate askppplt:type="boolean-type">false</askppplt:fuqUseSeparate>
|
||||
<askppplt:useSecondaryAuq askppplt:type="boolean-type">false</askppplt:useSecondaryAuq>
|
||||
<askppplt:noTraffic2CPU askppplt:type="boolean-type">false</askppplt:noTraffic2CPU>
|
||||
<askppplt:netifSdmaPortGroupId askppplt:type="uint32">0</askppplt:netifSdmaPortGroupId>
|
||||
<askppplt:auMessageLength askppplt:type="au_mesage_lenght-type">8_words</askppplt:auMessageLength>
|
||||
<askppplt:useDoubleAuq askppplt:type="boolean-type">false</askppplt:useDoubleAuq>
|
||||
</askppplt:internal>
|
||||
</askppplt:Phase2>
|
||||
<askppplt:LogicalInit>
|
||||
<askppplt:routingMode askppplt:type="routing-mode-type">TCAM_ROUTER_BASED</askppplt:routingMode>
|
||||
<askppplt:maxNumOfPbrEntries askppplt:type="uint32">0</askppplt:maxNumOfPbrEntries>
|
||||
<askppplt:sharedTableMode askppplt:type="shared-table-mode-type">MID_L3_MID_L2_NO_EM</askppplt:sharedTableMode>
|
||||
<askppplt:ingressDropEnable askppplt:type="boolean-type">true</askppplt:ingressDropEnable>
|
||||
</askppplt:LogicalInit>
|
||||
<askppplt:LibInit>
|
||||
<askppplt:initBridge askppplt:type="boolean-type">true</askppplt:initBridge>
|
||||
<askppplt:initMirror askppplt:type="boolean-type">true</askppplt:initMirror>
|
||||
<askppplt:initNetIf askppplt:type="boolean-type">true</askppplt:initNetIf>
|
||||
<askppplt:initPhy askppplt:type="boolean-type">true</askppplt:initPhy>
|
||||
<askppplt:initPort askppplt:type="boolean-type">true</askppplt:initPort>
|
||||
<askppplt:initTrunk askppplt:type="boolean-type">true</askppplt:initTrunk>
|
||||
<askppplt:Trunk-params>
|
||||
<askppplt:maxNumberOfTrunks askppplt:type="uint32">511</askppplt:maxNumberOfTrunks>
|
||||
<askppplt:trunkMembersMode askppplt:type="trunk-member-mode-type">FLEX</askppplt:trunkMembersMode>
|
||||
</askppplt:Trunk-params>
|
||||
<askppplt:initPcl askppplt:type="boolean-type">true</askppplt:initPcl>
|
||||
<askppplt:initTcam askppplt:type="boolean-type">true</askppplt:initTcam>
|
||||
<askppplt:initPolicer askppplt:type="boolean-type">true</askppplt:initPolicer>
|
||||
<askppplt:initPha askppplt:type="boolean-type">true</askppplt:initPha>
|
||||
<askppplt:Pha-params>
|
||||
<askppplt:packetOrderChangeEnable askppplt:type="boolean-type">false</askppplt:packetOrderChangeEnable>
|
||||
<askppplt:phaFwImageId askppplt:type="pha-firmware-image-id-type">01</askppplt:phaFwImageId>
|
||||
<askppplt:phaFwImageIdVersion askppplt:type="uint32">0</askppplt:phaFwImageIdVersion>
|
||||
</askppplt:Pha-params>
|
||||
</askppplt:LibInit>
|
||||
</askppplt:PPInit>
|
||||
</askppplt:ASK-PP>
|
||||
</data>
|
@ -0,0 +1 @@
|
||||
ac4217e114fbd773ddbc6e0053948000
|
@ -0,0 +1,328 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<data xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" version="2023-01-23-1.03" profile="SAI" dsig="md5">
|
||||
<SAIplt:SAI xmlns:SAIplt="urn:marvell:SAI:yang">
|
||||
<SAIplt:typedefs>
|
||||
<SAIplt:typedef>
|
||||
<SAIplt:name>device-id-type</SAIplt:name>
|
||||
<SAIplt:type>uint32</SAIplt:type>
|
||||
<SAIplt:description>Device ID 0..1023</SAIplt:description>
|
||||
<SAIplt:min>0</SAIplt:min>
|
||||
<SAIplt:max>1023</SAIplt:max>
|
||||
</SAIplt:typedef>
|
||||
<SAIplt:typedef>
|
||||
<SAIplt:name>port-id-type</SAIplt:name>
|
||||
<SAIplt:type>uint32</SAIplt:type>
|
||||
<SAIplt:description>Interface number</SAIplt:description>
|
||||
<SAIplt:min>0</SAIplt:min>
|
||||
<SAIplt:max>1023</SAIplt:max>
|
||||
</SAIplt:typedef>
|
||||
<SAIplt:typedef>
|
||||
<SAIplt:name>logDest-type</SAIplt:name>
|
||||
<SAIplt:type>enumeration</SAIplt:type>
|
||||
<SAIplt:description>Logging Feature Options</SAIplt:description>
|
||||
<SAIplt:enum>
|
||||
<SAIplt:name>SAI_LOG_SYSLOG</SAIplt:name>
|
||||
<SAIplt:description>SYSLOG {Syslog service should be running to use this option}</SAIplt:description>
|
||||
<SAIplt:value>0</SAIplt:value>
|
||||
</SAIplt:enum>
|
||||
<SAIplt:enum>
|
||||
<SAIplt:name>SAI_LOG_CONSOLE</SAIplt:name>
|
||||
<SAIplt:description>CONSOLE</SAIplt:description>
|
||||
<SAIplt:value>1</SAIplt:value>
|
||||
</SAIplt:enum>
|
||||
<SAIplt:enum>
|
||||
<SAIplt:name>SAI_LOG_FILE</SAIplt:name>
|
||||
<SAIplt:description>FILE {Warning !!! Use with caution. Can cause disk full issues}</SAIplt:description>
|
||||
<SAIplt:value>2</SAIplt:value>
|
||||
</SAIplt:enum>
|
||||
</SAIplt:typedef>
|
||||
<SAIplt:typedef>
|
||||
<SAIplt:name>log-dest-file-path-type</SAIplt:name>
|
||||
<SAIplt:type>string</SAIplt:type>
|
||||
<SAIplt:description>A string with path to file for logging feature</SAIplt:description>
|
||||
<SAIplt:min>2</SAIplt:min>
|
||||
<SAIplt:max>30</SAIplt:max>
|
||||
</SAIplt:typedef>
|
||||
</SAIplt:typedefs>
|
||||
<SAIplt:ASK-BOARD-Profile-Name SAIplt:type="string">ASK-Board-AC5X-xb.xml</SAIplt:ASK-BOARD-Profile-Name>
|
||||
<SAIplt:Features>
|
||||
<SAIplt:RoCE SAIplt:type="boolean">false</SAIplt:RoCE>
|
||||
</SAIplt:Features>
|
||||
<SAIplt:Ports>
|
||||
<SAIplt:port-list>
|
||||
<SAIplt:sai_port_id SAIplt:type="port-id-type">0</SAIplt:sai_port_id>
|
||||
<SAIplt:sdk_device_id SAIplt:type="device-id-type">0</SAIplt:sdk_device_id>
|
||||
<SAIplt:sdk_port_id SAIplt:type="port-id-type">0</SAIplt:sdk_port_id>
|
||||
</SAIplt:port-list>
|
||||
<SAIplt:port-list>
|
||||
<SAIplt:sai_port_id SAIplt:type="port-id-type">1</SAIplt:sai_port_id>
|
||||
<SAIplt:sdk_device_id SAIplt:type="device-id-type">0</SAIplt:sdk_device_id>
|
||||
<SAIplt:sdk_port_id SAIplt:type="port-id-type">1</SAIplt:sdk_port_id>
|
||||
</SAIplt:port-list>
|
||||
<SAIplt:port-list>
|
||||
<SAIplt:sai_port_id SAIplt:type="port-id-type">2</SAIplt:sai_port_id>
|
||||
<SAIplt:sdk_device_id SAIplt:type="device-id-type">0</SAIplt:sdk_device_id>
|
||||
<SAIplt:sdk_port_id SAIplt:type="port-id-type">2</SAIplt:sdk_port_id>
|
||||
</SAIplt:port-list>
|
||||
<SAIplt:port-list>
|
||||
<SAIplt:sai_port_id SAIplt:type="port-id-type">3</SAIplt:sai_port_id>
|
||||
<SAIplt:sdk_device_id SAIplt:type="device-id-type">0</SAIplt:sdk_device_id>
|
||||
<SAIplt:sdk_port_id SAIplt:type="port-id-type">3</SAIplt:sdk_port_id>
|
||||
</SAIplt:port-list>
|
||||
<SAIplt:port-list>
|
||||
<SAIplt:sai_port_id SAIplt:type="port-id-type">4</SAIplt:sai_port_id>
|
||||
<SAIplt:sdk_device_id SAIplt:type="device-id-type">0</SAIplt:sdk_device_id>
|
||||
<SAIplt:sdk_port_id SAIplt:type="port-id-type">4</SAIplt:sdk_port_id>
|
||||
</SAIplt:port-list>
|
||||
<SAIplt:port-list>
|
||||
<SAIplt:sai_port_id SAIplt:type="port-id-type">5</SAIplt:sai_port_id>
|
||||
<SAIplt:sdk_device_id SAIplt:type="device-id-type">0</SAIplt:sdk_device_id>
|
||||
<SAIplt:sdk_port_id SAIplt:type="port-id-type">5</SAIplt:sdk_port_id>
|
||||
</SAIplt:port-list>
|
||||
<SAIplt:port-list>
|
||||
<SAIplt:sai_port_id SAIplt:type="port-id-type">6</SAIplt:sai_port_id>
|
||||
<SAIplt:sdk_device_id SAIplt:type="device-id-type">0</SAIplt:sdk_device_id>
|
||||
<SAIplt:sdk_port_id SAIplt:type="port-id-type">6</SAIplt:sdk_port_id>
|
||||
</SAIplt:port-list>
|
||||
<SAIplt:port-list>
|
||||
<SAIplt:sai_port_id SAIplt:type="port-id-type">7</SAIplt:sai_port_id>
|
||||
<SAIplt:sdk_device_id SAIplt:type="device-id-type">0</SAIplt:sdk_device_id>
|
||||
<SAIplt:sdk_port_id SAIplt:type="port-id-type">7</SAIplt:sdk_port_id>
|
||||
</SAIplt:port-list>
|
||||
<SAIplt:port-list>
|
||||
<SAIplt:sai_port_id SAIplt:type="port-id-type">8</SAIplt:sai_port_id>
|
||||
<SAIplt:sdk_device_id SAIplt:type="device-id-type">0</SAIplt:sdk_device_id>
|
||||
<SAIplt:sdk_port_id SAIplt:type="port-id-type">8</SAIplt:sdk_port_id>
|
||||
</SAIplt:port-list>
|
||||
<SAIplt:port-list>
|
||||
<SAIplt:sai_port_id SAIplt:type="port-id-type">9</SAIplt:sai_port_id>
|
||||
<SAIplt:sdk_device_id SAIplt:type="device-id-type">0</SAIplt:sdk_device_id>
|
||||
<SAIplt:sdk_port_id SAIplt:type="port-id-type">9</SAIplt:sdk_port_id>
|
||||
</SAIplt:port-list>
|
||||
<SAIplt:port-list>
|
||||
<SAIplt:sai_port_id SAIplt:type="port-id-type">10</SAIplt:sai_port_id>
|
||||
<SAIplt:sdk_device_id SAIplt:type="device-id-type">0</SAIplt:sdk_device_id>
|
||||
<SAIplt:sdk_port_id SAIplt:type="port-id-type">10</SAIplt:sdk_port_id>
|
||||
</SAIplt:port-list>
|
||||
<SAIplt:port-list>
|
||||
<SAIplt:sai_port_id SAIplt:type="port-id-type">11</SAIplt:sai_port_id>
|
||||
<SAIplt:sdk_device_id SAIplt:type="device-id-type">0</SAIplt:sdk_device_id>
|
||||
<SAIplt:sdk_port_id SAIplt:type="port-id-type">11</SAIplt:sdk_port_id>
|
||||
</SAIplt:port-list>
|
||||
<SAIplt:port-list>
|
||||
<SAIplt:sai_port_id SAIplt:type="port-id-type">12</SAIplt:sai_port_id>
|
||||
<SAIplt:sdk_device_id SAIplt:type="device-id-type">0</SAIplt:sdk_device_id>
|
||||
<SAIplt:sdk_port_id SAIplt:type="port-id-type">12</SAIplt:sdk_port_id>
|
||||
</SAIplt:port-list>
|
||||
<SAIplt:port-list>
|
||||
<SAIplt:sai_port_id SAIplt:type="port-id-type">13</SAIplt:sai_port_id>
|
||||
<SAIplt:sdk_device_id SAIplt:type="device-id-type">0</SAIplt:sdk_device_id>
|
||||
<SAIplt:sdk_port_id SAIplt:type="port-id-type">13</SAIplt:sdk_port_id>
|
||||
</SAIplt:port-list>
|
||||
<SAIplt:port-list>
|
||||
<SAIplt:sai_port_id SAIplt:type="port-id-type">14</SAIplt:sai_port_id>
|
||||
<SAIplt:sdk_device_id SAIplt:type="device-id-type">0</SAIplt:sdk_device_id>
|
||||
<SAIplt:sdk_port_id SAIplt:type="port-id-type">14</SAIplt:sdk_port_id>
|
||||
</SAIplt:port-list>
|
||||
<SAIplt:port-list>
|
||||
<SAIplt:sai_port_id SAIplt:type="port-id-type">15</SAIplt:sai_port_id>
|
||||
<SAIplt:sdk_device_id SAIplt:type="device-id-type">0</SAIplt:sdk_device_id>
|
||||
<SAIplt:sdk_port_id SAIplt:type="port-id-type">15</SAIplt:sdk_port_id>
|
||||
</SAIplt:port-list>
|
||||
<SAIplt:port-list>
|
||||
<SAIplt:sai_port_id SAIplt:type="port-id-type">16</SAIplt:sai_port_id>
|
||||
<SAIplt:sdk_device_id SAIplt:type="device-id-type">0</SAIplt:sdk_device_id>
|
||||
<SAIplt:sdk_port_id SAIplt:type="port-id-type">16</SAIplt:sdk_port_id>
|
||||
</SAIplt:port-list>
|
||||
<SAIplt:port-list>
|
||||
<SAIplt:sai_port_id SAIplt:type="port-id-type">17</SAIplt:sai_port_id>
|
||||
<SAIplt:sdk_device_id SAIplt:type="device-id-type">0</SAIplt:sdk_device_id>
|
||||
<SAIplt:sdk_port_id SAIplt:type="port-id-type">17</SAIplt:sdk_port_id>
|
||||
</SAIplt:port-list>
|
||||
<SAIplt:port-list>
|
||||
<SAIplt:sai_port_id SAIplt:type="port-id-type">18</SAIplt:sai_port_id>
|
||||
<SAIplt:sdk_device_id SAIplt:type="device-id-type">0</SAIplt:sdk_device_id>
|
||||
<SAIplt:sdk_port_id SAIplt:type="port-id-type">18</SAIplt:sdk_port_id>
|
||||
</SAIplt:port-list>
|
||||
<SAIplt:port-list>
|
||||
<SAIplt:sai_port_id SAIplt:type="port-id-type">19</SAIplt:sai_port_id>
|
||||
<SAIplt:sdk_device_id SAIplt:type="device-id-type">0</SAIplt:sdk_device_id>
|
||||
<SAIplt:sdk_port_id SAIplt:type="port-id-type">19</SAIplt:sdk_port_id>
|
||||
</SAIplt:port-list>
|
||||
<SAIplt:port-list>
|
||||
<SAIplt:sai_port_id SAIplt:type="port-id-type">20</SAIplt:sai_port_id>
|
||||
<SAIplt:sdk_device_id SAIplt:type="device-id-type">0</SAIplt:sdk_device_id>
|
||||
<SAIplt:sdk_port_id SAIplt:type="port-id-type">20</SAIplt:sdk_port_id>
|
||||
</SAIplt:port-list>
|
||||
<SAIplt:port-list>
|
||||
<SAIplt:sai_port_id SAIplt:type="port-id-type">21</SAIplt:sai_port_id>
|
||||
<SAIplt:sdk_device_id SAIplt:type="device-id-type">0</SAIplt:sdk_device_id>
|
||||
<SAIplt:sdk_port_id SAIplt:type="port-id-type">21</SAIplt:sdk_port_id>
|
||||
</SAIplt:port-list>
|
||||
<SAIplt:port-list>
|
||||
<SAIplt:sai_port_id SAIplt:type="port-id-type">22</SAIplt:sai_port_id>
|
||||
<SAIplt:sdk_device_id SAIplt:type="device-id-type">0</SAIplt:sdk_device_id>
|
||||
<SAIplt:sdk_port_id SAIplt:type="port-id-type">22</SAIplt:sdk_port_id>
|
||||
</SAIplt:port-list>
|
||||
<SAIplt:port-list>
|
||||
<SAIplt:sai_port_id SAIplt:type="port-id-type">23</SAIplt:sai_port_id>
|
||||
<SAIplt:sdk_device_id SAIplt:type="device-id-type">0</SAIplt:sdk_device_id>
|
||||
<SAIplt:sdk_port_id SAIplt:type="port-id-type">23</SAIplt:sdk_port_id>
|
||||
</SAIplt:port-list>
|
||||
<SAIplt:port-list>
|
||||
<SAIplt:sai_port_id SAIplt:type="port-id-type">24</SAIplt:sai_port_id>
|
||||
<SAIplt:sdk_device_id SAIplt:type="device-id-type">0</SAIplt:sdk_device_id>
|
||||
<SAIplt:sdk_port_id SAIplt:type="port-id-type">24</SAIplt:sdk_port_id>
|
||||
</SAIplt:port-list>
|
||||
<SAIplt:port-list>
|
||||
<SAIplt:sai_port_id SAIplt:type="port-id-type">25</SAIplt:sai_port_id>
|
||||
<SAIplt:sdk_device_id SAIplt:type="device-id-type">0</SAIplt:sdk_device_id>
|
||||
<SAIplt:sdk_port_id SAIplt:type="port-id-type">25</SAIplt:sdk_port_id>
|
||||
</SAIplt:port-list>
|
||||
<SAIplt:port-list>
|
||||
<SAIplt:sai_port_id SAIplt:type="port-id-type">26</SAIplt:sai_port_id>
|
||||
<SAIplt:sdk_device_id SAIplt:type="device-id-type">0</SAIplt:sdk_device_id>
|
||||
<SAIplt:sdk_port_id SAIplt:type="port-id-type">26</SAIplt:sdk_port_id>
|
||||
</SAIplt:port-list>
|
||||
<SAIplt:port-list>
|
||||
<SAIplt:sai_port_id SAIplt:type="port-id-type">27</SAIplt:sai_port_id>
|
||||
<SAIplt:sdk_device_id SAIplt:type="device-id-type">0</SAIplt:sdk_device_id>
|
||||
<SAIplt:sdk_port_id SAIplt:type="port-id-type">27</SAIplt:sdk_port_id>
|
||||
</SAIplt:port-list>
|
||||
<SAIplt:port-list>
|
||||
<SAIplt:sai_port_id SAIplt:type="port-id-type">28</SAIplt:sai_port_id>
|
||||
<SAIplt:sdk_device_id SAIplt:type="device-id-type">0</SAIplt:sdk_device_id>
|
||||
<SAIplt:sdk_port_id SAIplt:type="port-id-type">28</SAIplt:sdk_port_id>
|
||||
</SAIplt:port-list>
|
||||
<SAIplt:port-list>
|
||||
<SAIplt:sai_port_id SAIplt:type="port-id-type">29</SAIplt:sai_port_id>
|
||||
<SAIplt:sdk_device_id SAIplt:type="device-id-type">0</SAIplt:sdk_device_id>
|
||||
<SAIplt:sdk_port_id SAIplt:type="port-id-type">29</SAIplt:sdk_port_id>
|
||||
</SAIplt:port-list>
|
||||
<SAIplt:port-list>
|
||||
<SAIplt:sai_port_id SAIplt:type="port-id-type">30</SAIplt:sai_port_id>
|
||||
<SAIplt:sdk_device_id SAIplt:type="device-id-type">0</SAIplt:sdk_device_id>
|
||||
<SAIplt:sdk_port_id SAIplt:type="port-id-type">30</SAIplt:sdk_port_id>
|
||||
</SAIplt:port-list>
|
||||
<SAIplt:port-list>
|
||||
<SAIplt:sai_port_id SAIplt:type="port-id-type">31</SAIplt:sai_port_id>
|
||||
<SAIplt:sdk_device_id SAIplt:type="device-id-type">0</SAIplt:sdk_device_id>
|
||||
<SAIplt:sdk_port_id SAIplt:type="port-id-type">31</SAIplt:sdk_port_id>
|
||||
</SAIplt:port-list>
|
||||
<SAIplt:port-list>
|
||||
<SAIplt:sai_port_id SAIplt:type="port-id-type">32</SAIplt:sai_port_id>
|
||||
<SAIplt:sdk_device_id SAIplt:type="device-id-type">0</SAIplt:sdk_device_id>
|
||||
<SAIplt:sdk_port_id SAIplt:type="port-id-type">32</SAIplt:sdk_port_id>
|
||||
</SAIplt:port-list>
|
||||
<SAIplt:port-list>
|
||||
<SAIplt:sai_port_id SAIplt:type="port-id-type">33</SAIplt:sai_port_id>
|
||||
<SAIplt:sdk_device_id SAIplt:type="device-id-type">0</SAIplt:sdk_device_id>
|
||||
<SAIplt:sdk_port_id SAIplt:type="port-id-type">33</SAIplt:sdk_port_id>
|
||||
</SAIplt:port-list>
|
||||
<SAIplt:port-list>
|
||||
<SAIplt:sai_port_id SAIplt:type="port-id-type">34</SAIplt:sai_port_id>
|
||||
<SAIplt:sdk_device_id SAIplt:type="device-id-type">0</SAIplt:sdk_device_id>
|
||||
<SAIplt:sdk_port_id SAIplt:type="port-id-type">34</SAIplt:sdk_port_id>
|
||||
</SAIplt:port-list>
|
||||
<SAIplt:port-list>
|
||||
<SAIplt:sai_port_id SAIplt:type="port-id-type">35</SAIplt:sai_port_id>
|
||||
<SAIplt:sdk_device_id SAIplt:type="device-id-type">0</SAIplt:sdk_device_id>
|
||||
<SAIplt:sdk_port_id SAIplt:type="port-id-type">35</SAIplt:sdk_port_id>
|
||||
</SAIplt:port-list>
|
||||
<SAIplt:port-list>
|
||||
<SAIplt:sai_port_id SAIplt:type="port-id-type">36</SAIplt:sai_port_id>
|
||||
<SAIplt:sdk_device_id SAIplt:type="device-id-type">0</SAIplt:sdk_device_id>
|
||||
<SAIplt:sdk_port_id SAIplt:type="port-id-type">36</SAIplt:sdk_port_id>
|
||||
</SAIplt:port-list>
|
||||
<SAIplt:port-list>
|
||||
<SAIplt:sai_port_id SAIplt:type="port-id-type">37</SAIplt:sai_port_id>
|
||||
<SAIplt:sdk_device_id SAIplt:type="device-id-type">0</SAIplt:sdk_device_id>
|
||||
<SAIplt:sdk_port_id SAIplt:type="port-id-type">37</SAIplt:sdk_port_id>
|
||||
</SAIplt:port-list>
|
||||
<SAIplt:port-list>
|
||||
<SAIplt:sai_port_id SAIplt:type="port-id-type">38</SAIplt:sai_port_id>
|
||||
<SAIplt:sdk_device_id SAIplt:type="device-id-type">0</SAIplt:sdk_device_id>
|
||||
<SAIplt:sdk_port_id SAIplt:type="port-id-type">38</SAIplt:sdk_port_id>
|
||||
</SAIplt:port-list>
|
||||
<SAIplt:port-list>
|
||||
<SAIplt:sai_port_id SAIplt:type="port-id-type">39</SAIplt:sai_port_id>
|
||||
<SAIplt:sdk_device_id SAIplt:type="device-id-type">0</SAIplt:sdk_device_id>
|
||||
<SAIplt:sdk_port_id SAIplt:type="port-id-type">39</SAIplt:sdk_port_id>
|
||||
</SAIplt:port-list>
|
||||
<SAIplt:port-list>
|
||||
<SAIplt:sai_port_id SAIplt:type="port-id-type">40</SAIplt:sai_port_id>
|
||||
<SAIplt:sdk_device_id SAIplt:type="device-id-type">0</SAIplt:sdk_device_id>
|
||||
<SAIplt:sdk_port_id SAIplt:type="port-id-type">40</SAIplt:sdk_port_id>
|
||||
</SAIplt:port-list>
|
||||
<SAIplt:port-list>
|
||||
<SAIplt:sai_port_id SAIplt:type="port-id-type">41</SAIplt:sai_port_id>
|
||||
<SAIplt:sdk_device_id SAIplt:type="device-id-type">0</SAIplt:sdk_device_id>
|
||||
<SAIplt:sdk_port_id SAIplt:type="port-id-type">41</SAIplt:sdk_port_id>
|
||||
</SAIplt:port-list>
|
||||
<SAIplt:port-list>
|
||||
<SAIplt:sai_port_id SAIplt:type="port-id-type">42</SAIplt:sai_port_id>
|
||||
<SAIplt:sdk_device_id SAIplt:type="device-id-type">0</SAIplt:sdk_device_id>
|
||||
<SAIplt:sdk_port_id SAIplt:type="port-id-type">42</SAIplt:sdk_port_id>
|
||||
</SAIplt:port-list>
|
||||
<SAIplt:port-list>
|
||||
<SAIplt:sai_port_id SAIplt:type="port-id-type">43</SAIplt:sai_port_id>
|
||||
<SAIplt:sdk_device_id SAIplt:type="device-id-type">0</SAIplt:sdk_device_id>
|
||||
<SAIplt:sdk_port_id SAIplt:type="port-id-type">43</SAIplt:sdk_port_id>
|
||||
</SAIplt:port-list>
|
||||
<SAIplt:port-list>
|
||||
<SAIplt:sai_port_id SAIplt:type="port-id-type">44</SAIplt:sai_port_id>
|
||||
<SAIplt:sdk_device_id SAIplt:type="device-id-type">0</SAIplt:sdk_device_id>
|
||||
<SAIplt:sdk_port_id SAIplt:type="port-id-type">44</SAIplt:sdk_port_id>
|
||||
</SAIplt:port-list>
|
||||
<SAIplt:port-list>
|
||||
<SAIplt:sai_port_id SAIplt:type="port-id-type">45</SAIplt:sai_port_id>
|
||||
<SAIplt:sdk_device_id SAIplt:type="device-id-type">0</SAIplt:sdk_device_id>
|
||||
<SAIplt:sdk_port_id SAIplt:type="port-id-type">45</SAIplt:sdk_port_id>
|
||||
</SAIplt:port-list>
|
||||
<SAIplt:port-list>
|
||||
<SAIplt:sai_port_id SAIplt:type="port-id-type">46</SAIplt:sai_port_id>
|
||||
<SAIplt:sdk_device_id SAIplt:type="device-id-type">0</SAIplt:sdk_device_id>
|
||||
<SAIplt:sdk_port_id SAIplt:type="port-id-type">46</SAIplt:sdk_port_id>
|
||||
</SAIplt:port-list>
|
||||
<SAIplt:port-list>
|
||||
<SAIplt:sai_port_id SAIplt:type="port-id-type">47</SAIplt:sai_port_id>
|
||||
<SAIplt:sdk_device_id SAIplt:type="device-id-type">0</SAIplt:sdk_device_id>
|
||||
<SAIplt:sdk_port_id SAIplt:type="port-id-type">47</SAIplt:sdk_port_id>
|
||||
</SAIplt:port-list>
|
||||
<SAIplt:port-list>
|
||||
<SAIplt:sai_port_id SAIplt:type="port-id-type">48</SAIplt:sai_port_id>
|
||||
<SAIplt:sdk_device_id SAIplt:type="device-id-type">0</SAIplt:sdk_device_id>
|
||||
<SAIplt:sdk_port_id SAIplt:type="port-id-type">48</SAIplt:sdk_port_id>
|
||||
</SAIplt:port-list>
|
||||
<SAIplt:port-list>
|
||||
<SAIplt:sai_port_id SAIplt:type="port-id-type">49</SAIplt:sai_port_id>
|
||||
<SAIplt:sdk_device_id SAIplt:type="device-id-type">0</SAIplt:sdk_device_id>
|
||||
<SAIplt:sdk_port_id SAIplt:type="port-id-type">49</SAIplt:sdk_port_id>
|
||||
</SAIplt:port-list>
|
||||
<SAIplt:port-list>
|
||||
<SAIplt:sai_port_id SAIplt:type="port-id-type">50</SAIplt:sai_port_id>
|
||||
<SAIplt:sdk_device_id SAIplt:type="device-id-type">0</SAIplt:sdk_device_id>
|
||||
<SAIplt:sdk_port_id SAIplt:type="port-id-type">50</SAIplt:sdk_port_id>
|
||||
</SAIplt:port-list>
|
||||
<SAIplt:port-list>
|
||||
<SAIplt:sai_port_id SAIplt:type="port-id-type">51</SAIplt:sai_port_id>
|
||||
<SAIplt:sdk_device_id SAIplt:type="device-id-type">0</SAIplt:sdk_device_id>
|
||||
<SAIplt:sdk_port_id SAIplt:type="port-id-type">51</SAIplt:sdk_port_id>
|
||||
</SAIplt:port-list>
|
||||
</SAIplt:Ports>
|
||||
<SAIplt:Scaling>
|
||||
<SAIplt:max_lag_members SAIplt:type="uint32">8</SAIplt:max_lag_members>
|
||||
<SAIplt:max_route_ipv4 SAIplt:type="uint32">0</SAIplt:max_route_ipv4>
|
||||
<SAIplt:max_route_ipv6 SAIplt:type="uint32">0</SAIplt:max_route_ipv6>
|
||||
<SAIplt:max_Nh_Ecmp_Mbr_Per_Grp SAIplt:type="uint32">64</SAIplt:max_Nh_Ecmp_Mbr_Per_Grp>
|
||||
<SAIplt:max_ipv4_tunnel SAIplt:type="uint32">8</SAIplt:max_ipv4_tunnel>
|
||||
<SAIplt:max_ipv6_tunnel SAIplt:type="uint32">8</SAIplt:max_ipv6_tunnel>
|
||||
<SAIplt:max_tti SAIplt:type="uint32">1024</SAIplt:max_tti>
|
||||
<SAIplt:wred_size SAIplt:type="uint32">0</SAIplt:wred_size>
|
||||
<SAIplt:max_nat SAIplt:type="uint32">0</SAIplt:max_nat>
|
||||
</SAIplt:Scaling>
|
||||
<SAIplt:Logging>
|
||||
<SAIplt:log_dest SAIplt:type="logDest-type">SAI_LOG_SYSLOG</SAIplt:log_dest>
|
||||
</SAIplt:Logging>
|
||||
</SAIplt:SAI>
|
||||
</data>
|
@ -0,0 +1,212 @@
|
||||
{
|
||||
"interfaces": {
|
||||
"Ethernet0": {
|
||||
"default_brkout_mode": "1x1G",
|
||||
"port_type": "RJ45"
|
||||
},
|
||||
"Ethernet1": {
|
||||
"default_brkout_mode": "1x1G",
|
||||
"port_type": "RJ45"
|
||||
},
|
||||
"Ethernet2": {
|
||||
"default_brkout_mode": "1x1G",
|
||||
"port_type": "RJ45"
|
||||
},
|
||||
"Ethernet3": {
|
||||
"default_brkout_mode": "1x1G",
|
||||
"port_type": "RJ45"
|
||||
},
|
||||
"Ethernet4": {
|
||||
"default_brkout_mode": "1x1G",
|
||||
"port_type": "RJ45"
|
||||
},
|
||||
"Ethernet5": {
|
||||
"default_brkout_mode": "1x1G",
|
||||
"port_type": "RJ45"
|
||||
},
|
||||
"Ethernet6": {
|
||||
"default_brkout_mode": "1x1G",
|
||||
"port_type": "RJ45"
|
||||
},
|
||||
"Ethernet7": {
|
||||
"default_brkout_mode": "1x1G",
|
||||
"port_type": "RJ45"
|
||||
},
|
||||
"Ethernet8": {
|
||||
"default_brkout_mode": "1x1G",
|
||||
"port_type": "RJ45"
|
||||
},
|
||||
"Ethernet9": {
|
||||
"default_brkout_mode": "1x1G",
|
||||
"port_type": "RJ45"
|
||||
},
|
||||
"Ethernet10": {
|
||||
"default_brkout_mode": "1x1G",
|
||||
"port_type": "RJ45"
|
||||
},
|
||||
"Ethernet11": {
|
||||
"default_brkout_mode": "1x1G",
|
||||
"port_type": "RJ45"
|
||||
},
|
||||
"Ethernet12": {
|
||||
"default_brkout_mode": "1x1G",
|
||||
"port_type": "RJ45"
|
||||
},
|
||||
"Ethernet13": {
|
||||
"default_brkout_mode": "1x1G",
|
||||
"port_type": "RJ45"
|
||||
},
|
||||
"Ethernet14": {
|
||||
"default_brkout_mode": "1x1G",
|
||||
"port_type": "RJ45"
|
||||
},
|
||||
"Ethernet15": {
|
||||
"default_brkout_mode": "1x1G",
|
||||
"port_type": "RJ45"
|
||||
},
|
||||
"Ethernet16": {
|
||||
"default_brkout_mode": "1x1G",
|
||||
"port_type": "RJ45"
|
||||
},
|
||||
"Ethernet17": {
|
||||
"default_brkout_mode": "1x1G",
|
||||
"port_type": "RJ45"
|
||||
},
|
||||
"Ethernet18": {
|
||||
"default_brkout_mode": "1x1G",
|
||||
"port_type": "RJ45"
|
||||
},
|
||||
"Ethernet19": {
|
||||
"default_brkout_mode": "1x1G",
|
||||
"port_type": "RJ45"
|
||||
},
|
||||
"Ethernet20": {
|
||||
"default_brkout_mode": "1x1G",
|
||||
"port_type": "RJ45"
|
||||
},
|
||||
"Ethernet21": {
|
||||
"default_brkout_mode": "1x1G",
|
||||
"port_type": "RJ45"
|
||||
},
|
||||
"Ethernet22": {
|
||||
"default_brkout_mode": "1x1G",
|
||||
"port_type": "RJ45"
|
||||
},
|
||||
"Ethernet23": {
|
||||
"default_brkout_mode": "1x1G",
|
||||
"port_type": "RJ45"
|
||||
},
|
||||
"Ethernet24": {
|
||||
"default_brkout_mode": "1x1G",
|
||||
"port_type": "RJ45"
|
||||
},
|
||||
"Ethernet25": {
|
||||
"default_brkout_mode": "1x1G",
|
||||
"port_type": "RJ45"
|
||||
},
|
||||
"Ethernet26": {
|
||||
"default_brkout_mode": "1x1G",
|
||||
"port_type": "RJ45"
|
||||
},
|
||||
"Ethernet27": {
|
||||
"default_brkout_mode": "1x1G",
|
||||
"port_type": "RJ45"
|
||||
},
|
||||
"Ethernet28": {
|
||||
"default_brkout_mode": "1x1G",
|
||||
"port_type": "RJ45"
|
||||
},
|
||||
"Ethernet29": {
|
||||
"default_brkout_mode": "1x1G",
|
||||
"port_type": "RJ45"
|
||||
},
|
||||
"Ethernet30": {
|
||||
"default_brkout_mode": "1x1G",
|
||||
"port_type": "RJ45"
|
||||
},
|
||||
"Ethernet31": {
|
||||
"default_brkout_mode": "1x1G",
|
||||
"port_type": "RJ45"
|
||||
},
|
||||
"Ethernet32": {
|
||||
"default_brkout_mode": "1x1G",
|
||||
"port_type": "RJ45"
|
||||
},
|
||||
"Ethernet33": {
|
||||
"default_brkout_mode": "1x1G",
|
||||
"port_type": "RJ45"
|
||||
},
|
||||
"Ethernet34": {
|
||||
"default_brkout_mode": "1x1G",
|
||||
"port_type": "RJ45"
|
||||
},
|
||||
"Ethernet35": {
|
||||
"default_brkout_mode": "1x1G",
|
||||
"port_type": "RJ45"
|
||||
},
|
||||
"Ethernet36": {
|
||||
"default_brkout_mode": "1x1G",
|
||||
"port_type": "RJ45"
|
||||
},
|
||||
"Ethernet37": {
|
||||
"default_brkout_mode": "1x1G",
|
||||
"port_type": "RJ45"
|
||||
},
|
||||
"Ethernet38": {
|
||||
"default_brkout_mode": "1x1G",
|
||||
"port_type": "RJ45"
|
||||
},
|
||||
"Ethernet39": {
|
||||
"default_brkout_mode": "1x1G",
|
||||
"port_type": "RJ45"
|
||||
},
|
||||
"Ethernet40": {
|
||||
"default_brkout_mode": "1x1G",
|
||||
"port_type": "RJ45"
|
||||
},
|
||||
"Ethernet41": {
|
||||
"default_brkout_mode": "1x1G",
|
||||
"port_type": "RJ45"
|
||||
},
|
||||
"Ethernet42": {
|
||||
"default_brkout_mode": "1x1G",
|
||||
"port_type": "RJ45"
|
||||
},
|
||||
"Ethernet43": {
|
||||
"default_brkout_mode": "1x1G",
|
||||
"port_type": "RJ45"
|
||||
},
|
||||
"Ethernet44": {
|
||||
"default_brkout_mode": "1x1G",
|
||||
"port_type": "RJ45"
|
||||
},
|
||||
"Ethernet45": {
|
||||
"default_brkout_mode": "1x1G",
|
||||
"port_type": "RJ45"
|
||||
},
|
||||
"Ethernet46": {
|
||||
"default_brkout_mode": "1x1G",
|
||||
"port_type": "RJ45"
|
||||
},
|
||||
"Ethernet47": {
|
||||
"default_brkout_mode": "1x1G",
|
||||
"port_type": "RJ45"
|
||||
},
|
||||
"Ethernet48": {
|
||||
"default_brkout_mode": "1x10G",
|
||||
"port_type": "SFP+"
|
||||
},
|
||||
"Ethernet49": {
|
||||
"default_brkout_mode": "1x10G",
|
||||
"port_type": "SFP+"
|
||||
},
|
||||
"Ethernet50": {
|
||||
"default_brkout_mode": "1x10G",
|
||||
"port_type": "SFP+"
|
||||
},
|
||||
"Ethernet51": {
|
||||
"default_brkout_mode": "1x10G",
|
||||
"port_type": "SFP+"
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,53 @@
|
||||
# name lanes alias index speed
|
||||
Ethernet0 0 etp1 1 1000
|
||||
Ethernet1 1 etp2 2 1000
|
||||
Ethernet2 2 etp3 3 1000
|
||||
Ethernet3 3 etp4 4 1000
|
||||
Ethernet4 4 etp5 5 1000
|
||||
Ethernet5 5 etp6 6 1000
|
||||
Ethernet6 6 etp7 7 1000
|
||||
Ethernet7 7 etp8 8 1000
|
||||
Ethernet8 8 etp9 9 1000
|
||||
Ethernet9 9 etp10 10 1000
|
||||
Ethernet10 10 etp11 11 1000
|
||||
Ethernet11 11 etp12 12 1000
|
||||
Ethernet12 12 etp13 13 1000
|
||||
Ethernet13 13 etp14 14 1000
|
||||
Ethernet14 14 etp15 15 1000
|
||||
Ethernet15 15 etp16 16 1000
|
||||
Ethernet16 16 etp17 17 1000
|
||||
Ethernet17 17 etp18 18 1000
|
||||
Ethernet18 18 etp19 19 1000
|
||||
Ethernet19 19 etp20 20 1000
|
||||
Ethernet20 20 etp21 21 1000
|
||||
Ethernet21 21 etp22 22 1000
|
||||
Ethernet22 22 etp23 23 1000
|
||||
Ethernet23 23 etp24 24 1000
|
||||
Ethernet24 24 etp25 25 1000
|
||||
Ethernet25 25 etp26 26 1000
|
||||
Ethernet26 26 etp27 27 1000
|
||||
Ethernet27 27 etp28 28 1000
|
||||
Ethernet28 28 etp29 29 1000
|
||||
Ethernet29 29 etp30 30 1000
|
||||
Ethernet30 30 etp31 31 1000
|
||||
Ethernet31 31 etp32 32 1000
|
||||
Ethernet32 32 etp33 33 1000
|
||||
Ethernet33 33 etp34 34 1000
|
||||
Ethernet34 34 etp35 35 1000
|
||||
Ethernet35 35 etp36 36 1000
|
||||
Ethernet36 36 etp37 37 1000
|
||||
Ethernet37 37 etp38 38 1000
|
||||
Ethernet38 38 etp39 39 1000
|
||||
Ethernet39 39 etp40 40 1000
|
||||
Ethernet40 40 etp41 41 1000
|
||||
Ethernet41 41 etp42 42 1000
|
||||
Ethernet42 42 etp43 43 1000
|
||||
Ethernet43 43 etp44 44 1000
|
||||
Ethernet44 44 etp45 45 1000
|
||||
Ethernet45 45 etp46 46 1000
|
||||
Ethernet46 46 etp47 47 1000
|
||||
Ethernet47 47 etp48 48 1000
|
||||
Ethernet48 48 etp49 49 10000
|
||||
Ethernet49 49 etp50 50 10000
|
||||
Ethernet50 50 etp51 51 10000
|
||||
Ethernet51 51 etp52 52 10000
|
@ -0,0 +1 @@
|
||||
switchMacAddress=XX:XX:XX:XX:XX:XX
|
@ -0,0 +1,5 @@
|
||||
mode=1
|
||||
hwId=AC5XRD
|
||||
switchProfile=/usr/share/sonic/hwsku/SAI-AC5X-xb.xml
|
||||
SAI_INIT_CONFIG_FILE=/usr/share/sonic/hwsku/profile.ini
|
||||
|
1
device/nokia/arm64-nokia_ixs7215_52xb-r0/default_sku
Normal file
1
device/nokia/arm64-nokia_ixs7215_52xb-r0/default_sku
Normal file
@ -0,0 +1 @@
|
||||
Nokia-7215-A1 l2
|
1
device/nokia/arm64-nokia_ixs7215_52xb-r0/installer.conf
Normal file
1
device/nokia/arm64-nokia_ixs7215_52xb-r0/installer.conf
Normal file
@ -0,0 +1 @@
|
||||
VAR_LOG_SIZE=4096
|
244
device/nokia/arm64-nokia_ixs7215_52xb-r0/platform.json
Normal file
244
device/nokia/arm64-nokia_ixs7215_52xb-r0/platform.json
Normal file
@ -0,0 +1,244 @@
|
||||
{
|
||||
"chassis": {
|
||||
"name": "7215 IXS-A1",
|
||||
"components": [
|
||||
{
|
||||
"name": "System-CPLD"
|
||||
},
|
||||
{
|
||||
"name": "U-Boot"
|
||||
}
|
||||
],
|
||||
"fans": [
|
||||
{
|
||||
"name": "Fan1"
|
||||
},
|
||||
{
|
||||
"name": "Fan2"
|
||||
}
|
||||
],
|
||||
"fan_drawers": [
|
||||
{
|
||||
"name": "drawer1",
|
||||
"max_consumed_power": false,
|
||||
"fans": [
|
||||
{
|
||||
"name": "Fan1"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "drawer2",
|
||||
"max_consumed_power": false,
|
||||
"fans": [
|
||||
{
|
||||
"name": "Fan2"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"psus": [
|
||||
{
|
||||
"name": "PSU1",
|
||||
"current": false,
|
||||
"power": false,
|
||||
"max_power": false,
|
||||
"voltage_high_threshold": false,
|
||||
"voltage_low_threshold": false,
|
||||
"temperature": false
|
||||
},
|
||||
{
|
||||
"name": "PSU2",
|
||||
"current": false,
|
||||
"power": false,
|
||||
"max_power": false,
|
||||
"voltage_high_threshold": false,
|
||||
"voltage_low_threshold": false,
|
||||
"temperature": false
|
||||
}
|
||||
],
|
||||
"thermals": [
|
||||
{
|
||||
"name": "PCB BACK",
|
||||
"controllable": false,
|
||||
"low-threshold": false,
|
||||
"low-crit-threshold": false,
|
||||
"high-crit-threshold": false
|
||||
},
|
||||
{
|
||||
"name": "PCB FRONT",
|
||||
"controllable": false,
|
||||
"low-threshold": false,
|
||||
"low-crit-threshold": false,
|
||||
"high-crit-threshold": false
|
||||
},
|
||||
{
|
||||
"name": "CPU Core",
|
||||
"controllable": false,
|
||||
"low-threshold": false,
|
||||
"high-threshold": false,
|
||||
"low-crit-threshold": false,
|
||||
"high-crit-threshold": false
|
||||
}
|
||||
],
|
||||
"sfps": [
|
||||
{
|
||||
"name": "Ethernet0"
|
||||
},
|
||||
{
|
||||
"name": "Ethernet1"
|
||||
},
|
||||
{
|
||||
"name": "Ethernet2"
|
||||
},
|
||||
{
|
||||
"name": "Ethernet3"
|
||||
},
|
||||
{
|
||||
"name": "Ethernet4"
|
||||
},
|
||||
{
|
||||
"name": "Ethernet5"
|
||||
},
|
||||
{
|
||||
"name": "Ethernet6"
|
||||
},
|
||||
{
|
||||
"name": "Ethernet7"
|
||||
},
|
||||
{
|
||||
"name": "Ethernet8"
|
||||
},
|
||||
{
|
||||
"name": "Ethernet9"
|
||||
},
|
||||
{
|
||||
"name": "Ethernet10"
|
||||
},
|
||||
{
|
||||
"name": "Ethernet11"
|
||||
},
|
||||
{
|
||||
"name": "Ethernet12"
|
||||
},
|
||||
{
|
||||
"name": "Ethernet13"
|
||||
},
|
||||
{
|
||||
"name": "Ethernet14"
|
||||
},
|
||||
{
|
||||
"name": "Ethernet15"
|
||||
},
|
||||
{
|
||||
"name": "Ethernet16"
|
||||
},
|
||||
{
|
||||
"name": "Ethernet17"
|
||||
},
|
||||
{
|
||||
"name": "Ethernet18"
|
||||
},
|
||||
{
|
||||
"name": "Ethernet19"
|
||||
},
|
||||
{
|
||||
"name": "Ethernet20"
|
||||
},
|
||||
{
|
||||
"name": "Ethernet21"
|
||||
},
|
||||
{
|
||||
"name": "Ethernet22"
|
||||
},
|
||||
{
|
||||
"name": "Ethernet23"
|
||||
},
|
||||
{
|
||||
"name": "Ethernet24"
|
||||
},
|
||||
{
|
||||
"name": "Ethernet25"
|
||||
},
|
||||
{
|
||||
"name": "Ethernet26"
|
||||
},
|
||||
{
|
||||
"name": "Ethernet27"
|
||||
},
|
||||
{
|
||||
"name": "Ethernet28"
|
||||
},
|
||||
{
|
||||
"name": "Ethernet29"
|
||||
},
|
||||
{
|
||||
"name": "Ethernet30"
|
||||
},
|
||||
{
|
||||
"name": "Ethernet31"
|
||||
},
|
||||
{
|
||||
"name": "Ethernet32"
|
||||
},
|
||||
{
|
||||
"name": "Ethernet33"
|
||||
},
|
||||
{
|
||||
"name": "Ethernet34"
|
||||
},
|
||||
{
|
||||
"name": "Ethernet35"
|
||||
},
|
||||
{
|
||||
"name": "Ethernet36"
|
||||
},
|
||||
{
|
||||
"name": "Ethernet37"
|
||||
},
|
||||
{
|
||||
"name": "Ethernet38"
|
||||
},
|
||||
{
|
||||
"name": "Ethernet39"
|
||||
},
|
||||
{
|
||||
"name": "Ethernet40"
|
||||
},
|
||||
{
|
||||
"name": "Ethernet41"
|
||||
},
|
||||
{
|
||||
"name": "Ethernet42"
|
||||
},
|
||||
{
|
||||
"name": "Ethernet43"
|
||||
},
|
||||
{
|
||||
"name": "Ethernet44"
|
||||
},
|
||||
{
|
||||
"name": "Ethernet45"
|
||||
},
|
||||
{
|
||||
"name": "Ethernet46"
|
||||
},
|
||||
{
|
||||
"name": "Ethernet47"
|
||||
},
|
||||
{
|
||||
"name": "Ethernet48"
|
||||
},
|
||||
{
|
||||
"name": "Ethernet49"
|
||||
},
|
||||
{
|
||||
"name": "Ethernet50"
|
||||
},
|
||||
{
|
||||
"name": "Ethernet51"
|
||||
}
|
||||
]
|
||||
},
|
||||
"interfaces": {}
|
||||
}
|
1
device/nokia/arm64-nokia_ixs7215_52xb-r0/platform_asic
Normal file
1
device/nokia/arm64-nokia_ixs7215_52xb-r0/platform_asic
Normal file
@ -0,0 +1 @@
|
||||
marvell-arm64
|
@ -0,0 +1,10 @@
|
||||
{
|
||||
"chassis": {
|
||||
"7215 IXS-A1": {
|
||||
"component": {
|
||||
"U-Boot": { },
|
||||
"System-CPLD": { }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
11
device/nokia/arm64-nokia_ixs7215_52xb-r0/platform_reboot
Executable file
11
device/nokia/arm64-nokia_ixs7215_52xb-r0/platform_reboot
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
function SafePwrCycle() {
|
||||
sync ; sync
|
||||
sudo umount -fa > /dev/null 2&>1
|
||||
|
||||
# Write CPLD register to initiate cold reboot
|
||||
sudo echo 0 > /sys/bus/i2c/devices/i2c-0/0-0041/cold_reset
|
||||
}
|
||||
|
||||
SafePwrCycle
|
13
device/nokia/arm64-nokia_ixs7215_52xb-r0/plugins/eeprom.py
Normal file
13
device/nokia/arm64-nokia_ixs7215_52xb-r0/plugins/eeprom.py
Normal file
@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
try:
|
||||
from sonic_eeprom import eeprom_tlvinfo
|
||||
except ImportError as 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 = "/etc/sonic/eeprom"
|
||||
super(board, self).__init__(self.eeprom_path, 0, '', True)
|
32
device/nokia/arm64-nokia_ixs7215_52xb-r0/plugins/psuutil.py
Executable file
32
device/nokia/arm64-nokia_ixs7215_52xb-r0/plugins/psuutil.py
Executable file
@ -0,0 +1,32 @@
|
||||
try:
|
||||
import sonic_platform.platform
|
||||
import sonic_platform.chassis
|
||||
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)
|
||||
self.chassis = sonic_platform.platform.Platform().get_chassis()
|
||||
|
||||
def get_num_psus(self):
|
||||
MAX_PSUS = 2
|
||||
return MAX_PSUS
|
||||
|
||||
def get_psu_status(self, index):
|
||||
# print " psuUtil redirect to PMON 2.0 "
|
||||
if self.chassis is not None:
|
||||
return self.chassis.get_psu(index-1).get_status()
|
||||
else:
|
||||
return False
|
||||
|
||||
def get_psu_presence(self, index):
|
||||
# print " psuUtil redirect to PMON 2.0 "
|
||||
if self.chassis is not None:
|
||||
return self.chassis.get_psu(index-1).get_presence()
|
||||
else:
|
||||
return False
|
@ -0,0 +1,4 @@
|
||||
try:
|
||||
from sonic_ssd import SsdUtil
|
||||
except ImportError:
|
||||
from sonic_platform_base.sonic_ssd.ssd_generic import SsdUtil
|
12
device/nokia/arm64-nokia_ixs7215_52xb-r0/sensors.conf
Normal file
12
device/nokia/arm64-nokia_ixs7215_52xb-r0/sensors.conf
Normal file
@ -0,0 +1,12 @@
|
||||
chip "tmp75a-i2c-*-48"
|
||||
label temp1 "back temp sensor"
|
||||
set temp1_max 65
|
||||
set temp1_crit 75
|
||||
|
||||
chip "tmp75a-i2c-*-49"
|
||||
label temp1 "front temp sensor"
|
||||
set temp2_max 65
|
||||
set temp2_crit 75
|
||||
|
||||
chip "armada_thermal-*"
|
||||
ignore temp1
|
@ -0,0 +1,16 @@
|
||||
{
|
||||
"services_to_ignore": [],
|
||||
"devices_to_ignore": [
|
||||
"asic",
|
||||
"psu.temperature",
|
||||
"fan",
|
||||
"psu"
|
||||
],
|
||||
"user_defined_checkers": [],
|
||||
"polling_interval": 60,
|
||||
"led_color": {
|
||||
"fault": "amber",
|
||||
"normal": "green",
|
||||
"booting": "blinking green"
|
||||
}
|
||||
}
|
65
device/nokia/arm64-nokia_ixs7215_52xb-r0/thermal_policy.json
Normal file
65
device/nokia/arm64-nokia_ixs7215_52xb-r0/thermal_policy.json
Normal file
@ -0,0 +1,65 @@
|
||||
{
|
||||
"thermal_control_algorithm": {
|
||||
"run_at_boot_up": "false",
|
||||
"fan_speed_when_suspend": "50"
|
||||
},
|
||||
"info_types": [
|
||||
{
|
||||
"type": "fan_info"
|
||||
},
|
||||
{
|
||||
"type": "thermal_info"
|
||||
},
|
||||
{
|
||||
"type": "chassis_info"
|
||||
}
|
||||
],
|
||||
"policies": [
|
||||
{
|
||||
"name": "any fan absence",
|
||||
"conditions": [
|
||||
{
|
||||
"type": "fan.any.absence"
|
||||
}
|
||||
],
|
||||
"actions": [
|
||||
{
|
||||
"type": "thermal_control.control",
|
||||
"status": "false"
|
||||
},
|
||||
{
|
||||
"type": "fan.all.set_speed",
|
||||
"speed": "100"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "all fan presence",
|
||||
"conditions": [
|
||||
{
|
||||
"type": "fan.all.presence"
|
||||
}
|
||||
],
|
||||
"actions": [
|
||||
{
|
||||
"type": "thermal.temp_check_and_set_all_fan_speed",
|
||||
"default_speed": "50",
|
||||
"hightemp_speed": "100"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "temp over high critical threshold",
|
||||
"conditions": [
|
||||
{
|
||||
"type": "thermal.over.high_critical_threshold"
|
||||
}
|
||||
],
|
||||
"actions": [
|
||||
{
|
||||
"type": "switch.shutdown"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
@ -12,3 +12,4 @@ ofpart
|
||||
mtdswap
|
||||
mtd_blkdevs
|
||||
adt7475
|
||||
i2c-dev
|
@ -3,7 +3,7 @@
|
||||
DOCKER_SAISERVER_MRVL = docker-saiserver-mrvl.gz
|
||||
$(DOCKER_SAISERVER_MRVL)_PATH = $(PLATFORM_PATH)/docker-saiserver-mrvl
|
||||
$(DOCKER_SAISERVER_MRVL)_DEPENDS += $(SAISERVER)
|
||||
$(DOCKER_SAISERVER_MRVL)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE_BUSTER)
|
||||
$(DOCKER_SAISERVER_MRVL)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE_BULLSEYE)
|
||||
SONIC_DOCKER_IMAGES += $(DOCKER_SAISERVER_MRVL)
|
||||
|
||||
$(DOCKER_SAISERVER_MRVL)_CONTAINER_NAME = saiserver
|
||||
|
@ -15,7 +15,8 @@ RUN apt-get purge -y syncd
|
||||
RUN apt-get update \
|
||||
&& apt-get -y install \
|
||||
net-tools \
|
||||
python-pip \
|
||||
python3-pip \
|
||||
python3-setuptools \
|
||||
build-essential \
|
||||
libssl-dev \
|
||||
libffi-dev \
|
||||
@ -24,7 +25,7 @@ RUN apt-get update \
|
||||
cmake \
|
||||
libqt5core5a \
|
||||
libqt5network5 \
|
||||
libboost-atomic1.71.0
|
||||
libboost-atomic1.74.0
|
||||
|
||||
RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; } ; \
|
||||
{% for deb in docker_syncd_mrvl_rpc_debs.split(' ') -%}
|
||||
@ -41,9 +42,9 @@ RUN wget https://github.com/nanomsg/nanomsg/archive/1.0.0.tar.gz \
|
||||
&& cd .. \
|
||||
&& rm -fr nanomsg-1.0.0 \
|
||||
&& rm -f 1.0.0.tar.gz \
|
||||
&& pip install cffi==1.7.0 \
|
||||
&& pip install --upgrade cffi==1.7.0 \
|
||||
&& pip install nnpy \
|
||||
&& pip3 install cffi==1.7.0 \
|
||||
&& pip3 install --upgrade cffi==1.7.0 \
|
||||
&& pip3 install nnpy \
|
||||
&& mkdir -p /opt \
|
||||
&& cd /opt \
|
||||
&& wget https://raw.githubusercontent.com/p4lang/ptf/master/ptf_nn/ptf_nn_agent.py \
|
||||
|
@ -1,7 +1,7 @@
|
||||
# docker image for mrvl syncd
|
||||
|
||||
DOCKER_SYNCD_PLATFORM_CODE = mrvl
|
||||
include $(PLATFORM_PATH)/../template/docker-syncd-base.mk
|
||||
include $(PLATFORM_PATH)/../template/docker-syncd-bullseye.mk
|
||||
|
||||
$(DOCKER_SYNCD_BASE)_DEPENDS += $(SYNCD)
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
{% from "dockers/dockerfile-macros.j2" import install_debian_packages %}
|
||||
FROM docker-config-engine-buster-{{DOCKER_USERNAME}}:{{DOCKER_USERTAG}}
|
||||
FROM docker-config-engine-bullseye-{{DOCKER_USERNAME}}:{{DOCKER_USERTAG}}
|
||||
|
||||
ARG docker_container_name
|
||||
|
||||
|
@ -1,6 +0,0 @@
|
||||
# linux kernel package for marvell arm64
|
||||
|
||||
# Add platform specific DTB
|
||||
LINUX_KERNEL_DTB = linux-image-4.9.168-arm64.deb
|
||||
$(LINUX_KERNEL_DTB)_URL = https://github.com/Marvell-switching/sonic-marvell-binaries/raw/master/arm64/kernel/$(LINUX_KERNEL_DTB)
|
||||
SONIC_ONLINE_DEBS += $(LINUX_KERNEL_DTB)
|
@ -1,10 +0,0 @@
|
||||
.ONESHELL:
|
||||
SHELL = /bin/bash
|
||||
.SHELLFLAGS += -e
|
||||
|
||||
LINUX_KERNEL_MRVL_URL = https://github.com/Marvell-switching/sonic-marvell-binaries/raw/master/arm64/kernel/$(LINUX_KERNEL_DTB)
|
||||
|
||||
$(addprefix $(DEST)/, $(LINUX_KERNEL_DTB)): $(DEST)/% :
|
||||
# get deb package
|
||||
wget -O $(DEST)/$(LINUX_KERNEL_DTB) $(LINUX_KERNEL_MRVL_URL)
|
||||
|
@ -4,7 +4,8 @@ SONIC_ONE_IMAGE = sonic-marvell-arm64.bin
|
||||
$(SONIC_ONE_IMAGE)_MACHINE = marvell-arm64
|
||||
$(SONIC_ONE_IMAGE)_IMAGE_TYPE = onie
|
||||
$(SONIC_ONE_IMAGE)_INSTALLS += $(SYSTEMD_SONIC_GENERATOR)
|
||||
$(SONIC_ONE_IMAGE)_INSTALLS += $(LINUX_KERNEL_DTB)
|
||||
$(SONIC_ONE_IMAGE)_INSTALLS += $(MRVL_PRESTERA_DEB)
|
||||
$(SONIC_ONE_IMAGE)_LAZY_INSTALLS += $(NOKIA_7215_PLATFORM)
|
||||
ifeq ($(INSTALL_DEBUG_TOOLS),y)
|
||||
$(SONIC_ONE_IMAGE)_DOCKERS += $(SONIC_INSTALL_DOCKER_DBG_IMAGES)
|
||||
$(SONIC_ONE_IMAGE)_DOCKERS += $(filter-out $(patsubst %-$(DBG_IMAGE_MARK).gz,%.gz, $(SONIC_INSTALL_DOCKER_DBG_IMAGES)), $(SONIC_INSTALL_DOCKER_IMAGES))
|
||||
|
23
platform/marvell-arm64/platform-nokia.mk
Normal file
23
platform/marvell-arm64/platform-nokia.mk
Normal file
@ -0,0 +1,23 @@
|
||||
# Nokia Platform
|
||||
|
||||
NOKIA_7215_PLATFORM_VERSION = 1.0
|
||||
export NOKIA_7215_PLATFORM_VERSION
|
||||
SONIC_KERNEL_DEB_PKG = $(LINUX_KERNEL)
|
||||
export SONIC_KERNEL_DEB_PKG
|
||||
|
||||
NOKIA_7215_PLATFORM = sonic-platform-nokia-7215_$(NOKIA_7215_PLATFORM_VERSION)_$(CONFIGURED_ARCH).deb
|
||||
$(NOKIA_7215_PLATFORM)_SRC_PATH = $(PLATFORM_PATH)/sonic-platform-nokia
|
||||
$(NOKIA_7215_PLATFORM)_DEPENDS += $(LINUX_HEADERS) $(LINUX_HEADERS_COMMON)
|
||||
$(NOKIA_7215_PLATFORM)_PLATFORM = arm64-nokia_ixs7215_52xb-r0
|
||||
|
||||
MPATH := $($(NOKIA_7215_PLATFORM)_SRC_PATH)
|
||||
DEP_FILES := $(SONIC_COMMON_FILES_LIST) platform/marvell-arm64/platform-nokia.mk
|
||||
DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST)
|
||||
DEP_FILES += $(shell git ls-files $(MPATH))
|
||||
|
||||
$(NOKIA_7215_PLATFORM)_CACHE_MODE := GIT_CONTENT_SHA
|
||||
$(NOKIA_7215_PLATFORM)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST)
|
||||
$(NOKIA_7215_PLATFORM)_DEP_FILES := $(DEP_FILES)
|
||||
|
||||
SONIC_DPKG_DEBS += $(NOKIA_7215_PLATFORM)
|
||||
|
11
platform/marvell-arm64/prestera.mk
Normal file
11
platform/marvell-arm64/prestera.mk
Normal file
@ -0,0 +1,11 @@
|
||||
# Marvell Prestera
|
||||
|
||||
export MRVL_PRESTERA_VER = 1.0
|
||||
export MRVL_PRESTERA = mrvlprestera_$(MRVL_PRESTERA_VER)_$(PLATFORM_ARCH)
|
||||
export MRVL_PRESTERA_DEB = $(MRVL_PRESTERA).deb
|
||||
export MRVL_PRESTERA_SRC_URL = https://github.com/Marvell-switching/mrvl-prestera.git
|
||||
export MRVL_PRESTERA_SRC_TAG = MRVL_PRESTERA_DRIVER_1.3
|
||||
|
||||
$(MRVL_PRESTERA_DEB)_SRC_PATH = $(PLATFORM_PATH)/prestera
|
||||
$(MRVL_PRESTERA_DEB)_DEPENDS += $(LINUX_HEADERS) $(LINUX_HEADERS_COMMON)
|
||||
SONIC_DPKG_DEBS += $(MRVL_PRESTERA_DEB)
|
5
platform/marvell-arm64/prestera/debian/changelog
Normal file
5
platform/marvell-arm64/prestera/debian/changelog
Normal file
@ -0,0 +1,5 @@
|
||||
mrvlprestera (1.0) unstable; urgency=low
|
||||
|
||||
* Prestera switch driver
|
||||
|
||||
-- Marvell <pnaregundi@marvell.com> Fri, 19 Feb 2021 10:39:18 +0800
|
1
platform/marvell-arm64/prestera/debian/compat
Normal file
1
platform/marvell-arm64/prestera/debian/compat
Normal file
@ -0,0 +1 @@
|
||||
9
|
15
platform/marvell-arm64/prestera/debian/control
Normal file
15
platform/marvell-arm64/prestera/debian/control
Normal file
@ -0,0 +1,15 @@
|
||||
Source: mrvlprestera
|
||||
Section: unknown
|
||||
Priority: optional
|
||||
Maintainer: Marvell <pnaregundi@marvell.com>
|
||||
Build-Depends: debhelper (>=9)
|
||||
Standards-Version: 3.9.6
|
||||
Homepage: <insert the upstream URL, if relevant>
|
||||
#Vcs-Git: git://anonscm.debian.org/collab-maint/mrvlprestera.git
|
||||
#Vcs-Browser: https://anonscm.debian.org/cgit/collab-maint/mrvlprestera.git
|
||||
|
||||
Package: mrvlprestera
|
||||
Architecture: arm64
|
||||
Homepage: <insert the upstream URL, if relevant>
|
||||
Description:
|
||||
kernel modules for prestera switch driver
|
@ -0,0 +1,3 @@
|
||||
mrvl-prestera/drivers/generic/cpssEnabler/linuxNoKernelModule/drivers/mvMbusDrv.ko /lib/modules/KVERSION/kernel/extra
|
||||
mrvl-prestera/drivers/generic/cpssEnabler/linuxNoKernelModule/drivers/mvIntDrv.ko /lib/modules/KVERSION/kernel/extra
|
||||
mrvl-prestera/platform/arm64/* /
|
55
platform/marvell-arm64/prestera/debian/rules
Executable file
55
platform/marvell-arm64/prestera/debian/rules
Executable file
@ -0,0 +1,55 @@
|
||||
#!/usr/bin/make -f
|
||||
|
||||
include /usr/share/dpkg/pkg-info.mk
|
||||
|
||||
PACKAGE_PRE_NAME := mrvlprestera
|
||||
ifneq ($(CROSS_BUILD_ENVIRON), y)
|
||||
KVERSION ?= $(shell uname -r)
|
||||
endif
|
||||
KERNEL_SRC := /lib/modules/$(KVERSION)
|
||||
MOD_SRC_DIR:= $(shell pwd)
|
||||
MODULE_DIR := mrvl-prestera/drivers/generic/cpssEnabler/linuxNoKernelModule/drivers
|
||||
|
||||
%:
|
||||
dh $@ --with systemd,python2,python3 --buildsystem=pybuild
|
||||
|
||||
clean:
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
dh_clean
|
||||
|
||||
build:
|
||||
# get sources
|
||||
rm -rf mrvl-prestera || true
|
||||
git clone -b ${MRVL_PRESTERA_SRC_TAG} ${MRVL_PRESTERA_SRC_URL}
|
||||
sed "s/KVERSION/${KVERSION}/g" /sonic/platform/marvell-arm64/prestera/debian/mrvlprestera.install.template > /sonic/platform/marvell-arm64/prestera/debian/mrvlprestera.install
|
||||
|
||||
make modules -C $(KERNEL_SRC)/build M=$(MOD_SRC_DIR)/$(MODULE_DIR)/
|
||||
|
||||
binary: binary-arch binary-indep
|
||||
# Nothing to do
|
||||
|
||||
binary-arch:
|
||||
# Nothing to do
|
||||
|
||||
binary-indep:
|
||||
dh_testdir
|
||||
dh_installdirs
|
||||
|
||||
# Resuming debhelper scripts
|
||||
dh_testroot
|
||||
dh_install
|
||||
dh_installchangelogs
|
||||
dh_installdocs
|
||||
dh_systemd_enable
|
||||
dh_installinit
|
||||
dh_systemd_start
|
||||
dh_link
|
||||
dh_fixperms
|
||||
dh_compress
|
||||
dh_strip
|
||||
dh_installdeb
|
||||
dh_gencontrol
|
||||
dh_md5sums
|
||||
dh_builddeb
|
||||
.PHONY: build binary binary-arch binary-indep clean
|
@ -5,7 +5,8 @@ include $(PLATFORM_PATH)/docker-syncd-mrvl-rpc.mk
|
||||
include $(PLATFORM_PATH)/docker-saiserver-mrvl.mk
|
||||
include $(PLATFORM_PATH)/libsaithrift-dev.mk
|
||||
include $(PLATFORM_PATH)/one-image.mk
|
||||
include $(PLATFORM_PATH)/linux-kernel-arm64.mk
|
||||
include $(PLATFORM_PATH)/prestera.mk
|
||||
include $(PLATFORM_PATH)/platform-nokia.mk
|
||||
|
||||
SONIC_ALL += $(SONIC_ONE_IMAGE) \
|
||||
$(DOCKER_FPM) \
|
||||
|
@ -1,7 +1,7 @@
|
||||
# Marvell SAI
|
||||
|
||||
export MRVL_SAI_VERSION = 1.5.1
|
||||
export MRVL_SAI = mrvllibsai_$(PLATFORM_ARCH)_$(MRVL_SAI_VERSION).deb
|
||||
export MRVL_SAI_VERSION = 1.11.0-1
|
||||
export MRVL_SAI = mrvllibsai_$(MRVL_SAI_VERSION)_$(PLATFORM_ARCH).deb
|
||||
|
||||
$(MRVL_SAI)_SRC_PATH = $(PLATFORM_PATH)/sai
|
||||
$(eval $(call add_conflict_package,$(MRVL_SAI),$(LIBSAIVS_DEV)))
|
||||
|
@ -6,4 +6,4 @@ MRVL_SAI_URL = https://github.com/Marvell-switching/sonic-marvell-binaries/raw/m
|
||||
|
||||
$(addprefix $(DEST)/, $(MRVL_SAI)): $(DEST)/% :
|
||||
# get deb package
|
||||
wget -O $(DEST)/$(MRVL_SAI) $(MRVL_SAI_URL)
|
||||
wget -O $(DEST)/$(MRVL_SAI) $(MRVL_SAI_URL) || rm -f $(DEST)/$(MRVL_SAI)
|
||||
|
@ -0,0 +1 @@
|
||||
obj-m:= nokia_7215_ixs_a1_cpld.o
|
@ -0,0 +1,645 @@
|
||||
/*
|
||||
* CPLD driver for Nokia-7215-IXS-A1 Router
|
||||
*
|
||||
* Copyright (C) 2023 Nokia Corporation.
|
||||
* Natarajan Subbiramani <natarajan.subbiramani.ext@nokia.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 3 of the License, or
|
||||
* 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.
|
||||
* see <http://www.gnu.org/licenses/>
|
||||
*
|
||||
* Based on ad7414.c
|
||||
* Copyright 2006 Stefan Roese <sr at denx.de>, DENX Software Engineering
|
||||
*
|
||||
* 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/i2c.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/err.h>
|
||||
#include <linux/hwmon.h>
|
||||
#include <linux/hwmon-sysfs.h>
|
||||
#include <linux/of_device.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/mutex.h>
|
||||
|
||||
#define DRIVER_NAME "nokia_7215_a1_cpld"
|
||||
|
||||
// REG ADDRESS-MAP
|
||||
#define BOARD_ID_REG 0x00
|
||||
#define RESET_CAUSE_REG 0x01
|
||||
#define CPLD_VERSION_REG 0x02
|
||||
#define SFP_PRESENCE_REG 0x03
|
||||
#define SFP_LOS_REG 0x04
|
||||
#define SFP_TX_DISABLE_REG 0x05
|
||||
#define MAC_INIT_STATUS_REG 0x06
|
||||
#define SYSTEM_STATUS_LED_CONTROL_REG 0x07
|
||||
#define POWER_AND_FAN_LED_CONTROL_REG 0x08
|
||||
#define SFP_TX_FAULT_STATUS_REG 0x09
|
||||
#define PSU1_PSU2_DEVICE_STATUS_REG 0x0A
|
||||
#define FAN_ENABLE_REG 0x0B
|
||||
#define USB_POWER_ENABLE_REG 0x0C
|
||||
#define SFP_LED_TEST_REG 0x0F
|
||||
#define RESET_REG 0x10
|
||||
#define PHY_IRQ_LIVE_STATE_REG 0x11
|
||||
#define MISC_IRQ_LIVE_STATE_REG 0x12
|
||||
#define INTERRUPT_REG 0x13
|
||||
#define INTERRUPT_MASK_REG 0x14
|
||||
#define PHY_INT_STATUS_REG 0x15
|
||||
#define MISC_INT_STATUS_REG 0x16
|
||||
#define PHY_INT_MASK_REG 0x17
|
||||
#define MISC_INT_MASK_REG 0x18
|
||||
#define GPIO_DIRECTION_REG 0x19
|
||||
#define GPIO_DATA_IN_REG 0x1A
|
||||
#define GPIO_DATA_OUT_REG 0x1B
|
||||
#define SCRATCH_REG 0xFE
|
||||
|
||||
//REG BIT FIELD POSITIONS
|
||||
#define RESET_CAUSE_REG_COLD_RESET 0x1
|
||||
#define RESET_CAUSE_REG_WARM_RESET 0x2
|
||||
#define RESET_CAUSE_REG_WDOG_RESET 0x4
|
||||
#define RESET_CAUSE_REG_SYS_RESET 0x8
|
||||
|
||||
#define SFP_PRESENCE_REG_SFP49 0x0
|
||||
#define SFP_PRESENCE_REG_SFP50 0x1
|
||||
#define SFP_PRESENCE_REG_SFP51 0x2
|
||||
#define SFP_PRESENCE_REG_SFP52 0x3
|
||||
|
||||
#define SFP_LOS_REG_SFP49 0x0
|
||||
#define SFP_LOS_REG_SFP50 0x1
|
||||
#define SFP_LOS_REG_SFP51 0x2
|
||||
#define SFP_LOS_REG_SFP52 0x3
|
||||
|
||||
#define SFP_TX_DISABLE_REG_SFP49 0x0
|
||||
#define SFP_TX_DISABLE_REG_SFP50 0x1
|
||||
#define SFP_TX_DISABLE_REG_SFP51 0x2
|
||||
#define SFP_TX_DISABLE_REG_SFP52 0x3
|
||||
#define SFP_TX_DISABLE_REG_LED_MUX 0x4
|
||||
|
||||
#define MAC_INIT_STATUS_REG_INIT_DONE 0x2
|
||||
|
||||
enum system_status_led_mode {
|
||||
SYSTEM_STATUS_LED_OFF,
|
||||
SYSTEM_STATUS_LED_AMBER,
|
||||
SYSTEM_STATUS_LED_GREEN,
|
||||
SYSTEM_STATUS_LED_AMBERBLINK8,
|
||||
SYSTEM_STATUS_LED_GREENBLINK4,
|
||||
SYSTEM_STATUS_LED_AMBERBLINK4,
|
||||
SYSTEM_STATUS_LED_GREENBLINK1,
|
||||
SYSTEM_STATUS_LED_COLORTOGGLE,
|
||||
SYSTEM_STATUS_LED_INVALID
|
||||
};
|
||||
|
||||
char *system_status_led_mode_str[]={"off", "amber", "green", "blink8-amber", "blink4-green",
|
||||
"blink4-amber", "blink1-green", "toggle", "invalid"};
|
||||
|
||||
#define POWER_LED_OFFSET 6
|
||||
#define FAN_LED_OFFSET 4
|
||||
enum power_fan_led_mode {
|
||||
POWER_FAN_LED_OFF,
|
||||
POWER_FAN_LED_GREEN,
|
||||
POWER_FAN_LED_AMBER,
|
||||
POWER_FAN_LED_GREEN_BLINK,
|
||||
POWER_FAN_INVALID
|
||||
};
|
||||
char *power_fan_led_mode_str[]={"off", "green", "amber", "blink-green", "invalid"};
|
||||
|
||||
#define SFP_TX_FAULT_STATUS_SFP49 0x0
|
||||
#define SFP_TX_FAULT_STATUS_SFP50 0x1
|
||||
#define SFP_TX_FAULT_STATUS_SFP51 0x2
|
||||
#define SFP_TX_FAULT_STATUS_SFP52 0x3
|
||||
|
||||
#define PSU1_POWERGOOD 2
|
||||
#define PSU2_POWERGOOD 3
|
||||
|
||||
#define FAN1_ENABLE 0
|
||||
#define FAN2_ENABLE 1
|
||||
|
||||
#define USB_POWER_ENABLE 0
|
||||
|
||||
#define RESET_REG_WARM_RESET 0x0
|
||||
#define RESET_REG_COLD_RESET 0x4
|
||||
#define RESET_REG_I2CMUX_RESET 0x6
|
||||
#define RESET_REG_ZL_RESET 0x7
|
||||
|
||||
static const unsigned short cpld_address_list[] = {0x41, I2C_CLIENT_END};
|
||||
|
||||
struct cpld_data {
|
||||
struct i2c_client *client;
|
||||
struct mutex update_lock;
|
||||
int mb_hw_version;
|
||||
int cpld_version;
|
||||
};
|
||||
|
||||
static int nokia_7215_ixs_a1_cpld_read(struct cpld_data *data, u8 reg)
|
||||
{
|
||||
int val=0;
|
||||
struct i2c_client *client=data->client;
|
||||
|
||||
mutex_lock(&data->update_lock);
|
||||
val = i2c_smbus_read_byte_data(client, reg);
|
||||
if (val < 0) {
|
||||
dev_err(&client->dev, "CPLD READ ERROR: reg(0x%02x) err %d\n", reg, val);
|
||||
}
|
||||
mutex_unlock(&data->update_lock);
|
||||
|
||||
return val;
|
||||
}
|
||||
|
||||
static void nokia_7215_ixs_a1_cpld_write(struct cpld_data *data, u8 reg, u8 value)
|
||||
{
|
||||
int res=0;
|
||||
struct i2c_client *client=data->client;
|
||||
|
||||
mutex_lock(&data->update_lock);
|
||||
res = i2c_smbus_write_byte_data(client, reg, value);
|
||||
if (res < 0) {
|
||||
dev_err(&client->dev, "CPLD WRITE ERROR: reg(0x%02x) err %d\n", reg, res);
|
||||
}
|
||||
mutex_unlock(&data->update_lock);
|
||||
}
|
||||
|
||||
static ssize_t show_mainboard_hwversion(struct device *dev, struct device_attribute *devattr, char *buf)
|
||||
{
|
||||
struct cpld_data *data = dev_get_drvdata(dev);
|
||||
return sprintf(buf,"0x%02x\n",data->mb_hw_version);
|
||||
}
|
||||
|
||||
static ssize_t show_last_reset_cause(struct device *dev, struct device_attribute *devattr, char *buf)
|
||||
{
|
||||
struct cpld_data *data = dev_get_drvdata(dev);
|
||||
u8 val=0;
|
||||
char *reason=NULL;
|
||||
val = nokia_7215_ixs_a1_cpld_read(data, RESET_CAUSE_REG);
|
||||
switch (val) {
|
||||
case RESET_CAUSE_REG_COLD_RESET:
|
||||
reason="cold reset";
|
||||
break;
|
||||
case RESET_CAUSE_REG_WARM_RESET:
|
||||
reason="warm reset";
|
||||
break;
|
||||
case RESET_CAUSE_REG_WDOG_RESET:
|
||||
reason="wdog reset";
|
||||
break;
|
||||
case RESET_CAUSE_REG_SYS_RESET:
|
||||
reason="sys reset";
|
||||
break;
|
||||
default:
|
||||
reason="unknown";
|
||||
break;
|
||||
}
|
||||
return sprintf(buf,"0x%02x %s\n",val, reason);
|
||||
}
|
||||
|
||||
static ssize_t show_cpld_version(struct device *dev, struct device_attribute *devattr, char *buf)
|
||||
{
|
||||
struct cpld_data *data = dev_get_drvdata(dev);
|
||||
return sprintf(buf,"0x%02x\n",data->cpld_version);
|
||||
}
|
||||
|
||||
static ssize_t show_sfp_present(struct device *dev, struct device_attribute *devattr, char *buf)
|
||||
{
|
||||
struct cpld_data *data = dev_get_drvdata(dev);
|
||||
struct sensor_device_attribute *sda = to_sensor_dev_attr(devattr);
|
||||
u8 val=0;
|
||||
val = nokia_7215_ixs_a1_cpld_read(data, SFP_PRESENCE_REG);
|
||||
|
||||
/* If the bit is set, SFP is not present. So, we are toggling intentionally */
|
||||
return sprintf(buf,"%d\n",(val>>sda->index) & 0x1 ? 0:1);
|
||||
}
|
||||
|
||||
static ssize_t show_sfp_los(struct device *dev, struct device_attribute *devattr, char *buf)
|
||||
{
|
||||
struct cpld_data *data = dev_get_drvdata(dev);
|
||||
struct sensor_device_attribute *sda = to_sensor_dev_attr(devattr);
|
||||
u8 val=0;
|
||||
val = nokia_7215_ixs_a1_cpld_read(data, SFP_LOS_REG);
|
||||
|
||||
/* If the bit is set, LOS condition */
|
||||
return sprintf(buf,"%d\n",(val>>sda->index) & 0x1 ? 1:0);
|
||||
}
|
||||
|
||||
static ssize_t show_sfp_tx_disable(struct device *dev, struct device_attribute *devattr, char *buf)
|
||||
{
|
||||
struct cpld_data *data = dev_get_drvdata(dev);
|
||||
struct sensor_device_attribute *sda = to_sensor_dev_attr(devattr);
|
||||
u8 val=0;
|
||||
val = nokia_7215_ixs_a1_cpld_read(data, SFP_TX_DISABLE_REG);
|
||||
|
||||
/* If the bit is set, Tx is disabled */
|
||||
return sprintf(buf,"%d\n",(val>>sda->index) & 0x1 ? 1:0);
|
||||
}
|
||||
|
||||
static ssize_t set_sfp_tx_disable(struct device *dev, struct device_attribute *devattr, const char *buf, size_t count)
|
||||
{
|
||||
struct cpld_data *data = dev_get_drvdata(dev);
|
||||
struct sensor_device_attribute *sda = to_sensor_dev_attr(devattr);
|
||||
u8 reg_val=0, usr_val=0, mask;
|
||||
int ret=kstrtou8(buf,10, &usr_val);
|
||||
if (ret != 0) {
|
||||
return ret;
|
||||
}
|
||||
if (usr_val > 1) {
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
mask = (~(1 << sda->index)) & 0xFF;
|
||||
reg_val = nokia_7215_ixs_a1_cpld_read(data, SFP_TX_DISABLE_REG);
|
||||
reg_val = reg_val & mask;
|
||||
|
||||
usr_val = usr_val << sda->index;
|
||||
|
||||
nokia_7215_ixs_a1_cpld_write(data, SFP_TX_DISABLE_REG, (reg_val|usr_val));
|
||||
|
||||
return count;
|
||||
|
||||
}
|
||||
|
||||
static ssize_t show_system_led_status(struct device *dev, struct device_attribute *devattr, char *buf)
|
||||
{
|
||||
struct cpld_data *data = dev_get_drvdata(dev);
|
||||
u8 val=0;
|
||||
val = nokia_7215_ixs_a1_cpld_read(data, SYSTEM_STATUS_LED_CONTROL_REG);
|
||||
if (val > SYSTEM_STATUS_LED_INVALID) {
|
||||
val = SYSTEM_STATUS_LED_INVALID;
|
||||
}
|
||||
return sprintf(buf,"%s\n",system_status_led_mode_str[val]);
|
||||
}
|
||||
|
||||
static ssize_t set_system_led_status(struct device *dev, struct device_attribute *devattr, const char *buf, size_t count)
|
||||
{
|
||||
struct cpld_data *data = dev_get_drvdata(dev);
|
||||
int mode;
|
||||
|
||||
for(mode=SYSTEM_STATUS_LED_OFF; mode<SYSTEM_STATUS_LED_INVALID; mode++) {
|
||||
if(strncmp(buf, system_status_led_mode_str[mode],strlen(system_status_led_mode_str[mode]))==0) {
|
||||
nokia_7215_ixs_a1_cpld_write(data, SYSTEM_STATUS_LED_CONTROL_REG, mode);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
static ssize_t show_power_fan_led_status(struct device *dev, struct device_attribute *devattr, char *buf)
|
||||
{
|
||||
struct cpld_data *data = dev_get_drvdata(dev);
|
||||
struct sensor_device_attribute *sda = to_sensor_dev_attr(devattr);
|
||||
u8 val = nokia_7215_ixs_a1_cpld_read(data, POWER_AND_FAN_LED_CONTROL_REG);
|
||||
val = (val >> sda->index) & 0x3;
|
||||
return sprintf(buf,"%s\n",power_fan_led_mode_str[val]);
|
||||
}
|
||||
|
||||
static ssize_t set_power_fan_led_status(struct device *dev, struct device_attribute *devattr, const char *buf, size_t count)
|
||||
{
|
||||
struct cpld_data *data = dev_get_drvdata(dev);
|
||||
struct sensor_device_attribute *sda = to_sensor_dev_attr(devattr);
|
||||
u8 reg_val=0, mask=0, usr_val=0;
|
||||
int i;
|
||||
|
||||
mask = (~(0x3 << sda->index)) & 0xFF;
|
||||
reg_val = nokia_7215_ixs_a1_cpld_read(data, POWER_AND_FAN_LED_CONTROL_REG);
|
||||
reg_val = reg_val & mask;
|
||||
|
||||
for(i=POWER_FAN_LED_OFF; i<POWER_FAN_INVALID; i++) {
|
||||
if(strncmp(buf, power_fan_led_mode_str[i],strlen(power_fan_led_mode_str[i]))==0) {
|
||||
usr_val = i << sda->index;
|
||||
nokia_7215_ixs_a1_cpld_write(data, POWER_AND_FAN_LED_CONTROL_REG, reg_val|usr_val);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
static ssize_t show_sfp_tx_fault(struct device *dev, struct device_attribute *devattr, char *buf)
|
||||
{
|
||||
struct cpld_data *data = dev_get_drvdata(dev);
|
||||
struct sensor_device_attribute *sda = to_sensor_dev_attr(devattr);
|
||||
u8 val=0;
|
||||
val = nokia_7215_ixs_a1_cpld_read(data, SFP_TX_FAULT_STATUS_REG);
|
||||
|
||||
/* If the bit is set, TX fault condition */
|
||||
return sprintf(buf,"%d\n",(val>>sda->index) & 0x1 ? 1:0);
|
||||
}
|
||||
|
||||
|
||||
static ssize_t show_psu_pg_status(struct device *dev, struct device_attribute *devattr, char *buf)
|
||||
{
|
||||
struct cpld_data *data = dev_get_drvdata(dev);
|
||||
struct sensor_device_attribute *sda = to_sensor_dev_attr(devattr);
|
||||
u8 val=0;
|
||||
val = nokia_7215_ixs_a1_cpld_read(data, PSU1_PSU2_DEVICE_STATUS_REG);
|
||||
|
||||
/* If the bit is set, psu power is good */
|
||||
return sprintf(buf,"%d\n",(val>>sda->index) & 0x1 ? 1:0);
|
||||
}
|
||||
|
||||
static ssize_t show_fan_enable_status(struct device *dev, struct device_attribute *devattr, char *buf)
|
||||
{
|
||||
struct cpld_data *data = dev_get_drvdata(dev);
|
||||
struct sensor_device_attribute *sda = to_sensor_dev_attr(devattr);
|
||||
u8 val=0;
|
||||
val = nokia_7215_ixs_a1_cpld_read(data, FAN_ENABLE_REG);
|
||||
|
||||
/* If the bit is set, fan is disabled. So, toggling intentionally */
|
||||
return sprintf(buf,"%d\n",(val>>sda->index) & 0x1 ? 0:1);
|
||||
}
|
||||
|
||||
static ssize_t set_fan_enable_status(struct device *dev, struct device_attribute *devattr, const char *buf, size_t count)
|
||||
{
|
||||
struct cpld_data *data = dev_get_drvdata(dev);
|
||||
struct sensor_device_attribute *sda = to_sensor_dev_attr(devattr);
|
||||
u8 reg_val=0, usr_val=0, mask;
|
||||
int ret=kstrtou8(buf,10, &usr_val);
|
||||
if (ret != 0) {
|
||||
return ret;
|
||||
}
|
||||
if (usr_val > 1) {
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
mask = (~(1 << sda->index)) & 0xFF;
|
||||
reg_val = nokia_7215_ixs_a1_cpld_read(data, RESET_REG);
|
||||
reg_val = reg_val & mask;
|
||||
|
||||
usr_val = !usr_val; // If the bit is set, fan is disabled. So, toggling intentionally
|
||||
usr_val = usr_val << sda->index;
|
||||
|
||||
nokia_7215_ixs_a1_cpld_write(data, FAN_ENABLE_REG, (reg_val|usr_val));
|
||||
|
||||
return count;
|
||||
|
||||
}
|
||||
|
||||
static ssize_t show_usb_enable_status(struct device *dev, struct device_attribute *devattr, char *buf)
|
||||
{
|
||||
struct cpld_data *data = dev_get_drvdata(dev);
|
||||
struct sensor_device_attribute *sda = to_sensor_dev_attr(devattr);
|
||||
u8 val=0;
|
||||
val = nokia_7215_ixs_a1_cpld_read(data, USB_POWER_ENABLE_REG);
|
||||
|
||||
/* If the bit is set, usb power is disabled. So, toggling intentionally */
|
||||
return sprintf(buf,"%d\n",(val>>sda->index) & 0x1 ? 0:1);
|
||||
}
|
||||
|
||||
static ssize_t set_usb_enable_status(struct device *dev, struct device_attribute *devattr, const char *buf, size_t count)
|
||||
{
|
||||
struct cpld_data *data = dev_get_drvdata(dev);
|
||||
u8 usr_val=0;
|
||||
int ret=kstrtou8(buf,16, &usr_val);
|
||||
if (ret != 0) {
|
||||
return ret;
|
||||
}
|
||||
if(usr_val > 1) {
|
||||
return -EINVAL;
|
||||
}
|
||||
/* If the bit is set, usb power is disabled. So, toggling intentionally */
|
||||
usr_val = !usr_val;
|
||||
|
||||
nokia_7215_ixs_a1_cpld_write(data, USB_POWER_ENABLE_REG, usr_val);
|
||||
return count;
|
||||
}
|
||||
|
||||
static ssize_t show_sfp_ledtest_status(struct device *dev, struct device_attribute *devattr, char *buf)
|
||||
{
|
||||
struct cpld_data *data = dev_get_drvdata(dev);
|
||||
u8 val = nokia_7215_ixs_a1_cpld_read(data, SFP_LED_TEST_REG);
|
||||
return sprintf(buf,"0x%02x\n",val);
|
||||
}
|
||||
|
||||
static ssize_t set_sfp_ledtest_status(struct device *dev, struct device_attribute *devattr, const char *buf, size_t count)
|
||||
{
|
||||
struct cpld_data *data = dev_get_drvdata(dev);
|
||||
u8 usr_val=0;
|
||||
int ret=kstrtou8(buf,16, &usr_val);
|
||||
if (ret != 0) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
nokia_7215_ixs_a1_cpld_write(data, SFP_LED_TEST_REG, usr_val);
|
||||
return count;
|
||||
}
|
||||
|
||||
static ssize_t show_reset_reg(struct device *dev, struct device_attribute *devattr, char *buf)
|
||||
{
|
||||
struct cpld_data *data = dev_get_drvdata(dev);
|
||||
struct sensor_device_attribute *sda = to_sensor_dev_attr(devattr);
|
||||
u8 val=0;
|
||||
val = nokia_7215_ixs_a1_cpld_read(data, RESET_REG);
|
||||
|
||||
return sprintf(buf,"0x%02x\n",(val>>sda->index) & 0x1 ? 1:0);
|
||||
}
|
||||
|
||||
static ssize_t set_reset_reg(struct device *dev, struct device_attribute *devattr, const char *buf, size_t count)
|
||||
{
|
||||
struct cpld_data *data = dev_get_drvdata(dev);
|
||||
struct sensor_device_attribute *sda = to_sensor_dev_attr(devattr);
|
||||
u8 reg_val=0, usr_val=0, mask;
|
||||
int ret=kstrtou8(buf,10, &usr_val);
|
||||
if (ret != 0) {
|
||||
return ret;
|
||||
}
|
||||
if (usr_val > 1) {
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
mask = (~(1 << sda->index)) & 0xFF;
|
||||
reg_val = nokia_7215_ixs_a1_cpld_read(data, RESET_REG);
|
||||
reg_val = reg_val & mask;
|
||||
|
||||
usr_val = usr_val << sda->index;
|
||||
|
||||
nokia_7215_ixs_a1_cpld_write(data, RESET_REG, (reg_val|usr_val));
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
|
||||
/* sysfs attributes */
|
||||
static SENSOR_DEVICE_ATTR(mbhwversion, S_IRUGO, show_mainboard_hwversion, NULL, 0);
|
||||
static SENSOR_DEVICE_ATTR(last_reset_cause, S_IRUGO, show_last_reset_cause, NULL, 0);
|
||||
static SENSOR_DEVICE_ATTR(cpldversion, S_IRUGO, show_cpld_version, NULL, 0);
|
||||
static SENSOR_DEVICE_ATTR(sfp49_present, S_IRUGO, show_sfp_present, NULL, SFP_PRESENCE_REG_SFP49);
|
||||
static SENSOR_DEVICE_ATTR(sfp50_present, S_IRUGO, show_sfp_present, NULL, SFP_PRESENCE_REG_SFP50);
|
||||
static SENSOR_DEVICE_ATTR(sfp51_present, S_IRUGO, show_sfp_present, NULL, SFP_PRESENCE_REG_SFP51);
|
||||
static SENSOR_DEVICE_ATTR(sfp52_present, S_IRUGO, show_sfp_present, NULL, SFP_PRESENCE_REG_SFP52);
|
||||
static SENSOR_DEVICE_ATTR(sfp49_los, S_IRUGO, show_sfp_los, NULL, SFP_LOS_REG_SFP49);
|
||||
static SENSOR_DEVICE_ATTR(sfp50_los, S_IRUGO, show_sfp_los, NULL, SFP_LOS_REG_SFP50);
|
||||
static SENSOR_DEVICE_ATTR(sfp51_los, S_IRUGO, show_sfp_los, NULL, SFP_LOS_REG_SFP51);
|
||||
static SENSOR_DEVICE_ATTR(sfp52_los, S_IRUGO, show_sfp_los, NULL, SFP_LOS_REG_SFP52);
|
||||
static SENSOR_DEVICE_ATTR(sfp49_tx_disable, S_IRUGO | S_IWUSR, show_sfp_tx_disable, set_sfp_tx_disable, SFP_LOS_REG_SFP49);
|
||||
static SENSOR_DEVICE_ATTR(sfp50_tx_disable, S_IRUGO | S_IWUSR, show_sfp_tx_disable, set_sfp_tx_disable, SFP_LOS_REG_SFP50);
|
||||
static SENSOR_DEVICE_ATTR(sfp51_tx_disable, S_IRUGO | S_IWUSR, show_sfp_tx_disable, set_sfp_tx_disable, SFP_LOS_REG_SFP51);
|
||||
static SENSOR_DEVICE_ATTR(sfp52_tx_disable, S_IRUGO | S_IWUSR, show_sfp_tx_disable, set_sfp_tx_disable, SFP_LOS_REG_SFP52);
|
||||
static SENSOR_DEVICE_ATTR(system_led, S_IRUGO | S_IWUSR, show_system_led_status, set_system_led_status, 0);
|
||||
static SENSOR_DEVICE_ATTR(psu_led, S_IRUGO | S_IWUSR, show_power_fan_led_status, set_power_fan_led_status, POWER_LED_OFFSET);
|
||||
static SENSOR_DEVICE_ATTR(fan_led, S_IRUGO | S_IWUSR, show_power_fan_led_status, set_power_fan_led_status, FAN_LED_OFFSET);
|
||||
static SENSOR_DEVICE_ATTR(sfp49_tx_fault, S_IRUGO, show_sfp_tx_fault, NULL, SFP_TX_FAULT_STATUS_SFP49);
|
||||
static SENSOR_DEVICE_ATTR(sfp50_tx_fault, S_IRUGO, show_sfp_tx_fault, NULL, SFP_TX_FAULT_STATUS_SFP50);
|
||||
static SENSOR_DEVICE_ATTR(sfp51_tx_fault, S_IRUGO, show_sfp_tx_fault, NULL, SFP_TX_FAULT_STATUS_SFP51);
|
||||
static SENSOR_DEVICE_ATTR(sfp52_tx_fault, S_IRUGO, show_sfp_tx_fault, NULL, SFP_TX_FAULT_STATUS_SFP52);
|
||||
static SENSOR_DEVICE_ATTR(psu1_power_good, S_IRUGO, show_psu_pg_status, NULL, PSU1_POWERGOOD);
|
||||
static SENSOR_DEVICE_ATTR(psu2_power_good, S_IRUGO, show_psu_pg_status, NULL, PSU2_POWERGOOD);
|
||||
static SENSOR_DEVICE_ATTR(fan1_enable, S_IRUGO | S_IWUSR, show_fan_enable_status, set_fan_enable_status, FAN1_ENABLE);
|
||||
static SENSOR_DEVICE_ATTR(fan2_enable, S_IRUGO | S_IWUSR, show_fan_enable_status, set_fan_enable_status, FAN2_ENABLE);
|
||||
static SENSOR_DEVICE_ATTR(usb_power_enable, S_IRUGO | S_IWUSR, show_usb_enable_status, set_usb_enable_status, 0);
|
||||
static SENSOR_DEVICE_ATTR(sfp_led_test, S_IRUGO | S_IWUSR, show_sfp_ledtest_status, set_sfp_ledtest_status, 0);
|
||||
static SENSOR_DEVICE_ATTR(warm_reset, S_IRUGO | S_IWUSR, show_reset_reg, set_reset_reg, RESET_REG_WARM_RESET);
|
||||
static SENSOR_DEVICE_ATTR(cold_reset, S_IRUGO | S_IWUSR, show_reset_reg, set_reset_reg, RESET_REG_COLD_RESET);
|
||||
static SENSOR_DEVICE_ATTR(i2cmux_reset, S_IRUGO | S_IWUSR, show_reset_reg, set_reset_reg, RESET_REG_I2CMUX_RESET);
|
||||
static SENSOR_DEVICE_ATTR(zarlink_reset, S_IRUGO | S_IWUSR, show_reset_reg, set_reset_reg, RESET_REG_ZL_RESET);
|
||||
|
||||
static struct attribute *nokia_7215_ixs_a1_cpld_attributes[] = {
|
||||
&sensor_dev_attr_mbhwversion.dev_attr.attr,
|
||||
&sensor_dev_attr_last_reset_cause.dev_attr.attr,
|
||||
&sensor_dev_attr_cpldversion.dev_attr.attr,
|
||||
&sensor_dev_attr_sfp49_present.dev_attr.attr,
|
||||
&sensor_dev_attr_sfp50_present.dev_attr.attr,
|
||||
&sensor_dev_attr_sfp51_present.dev_attr.attr,
|
||||
&sensor_dev_attr_sfp52_present.dev_attr.attr,
|
||||
&sensor_dev_attr_sfp49_los.dev_attr.attr,
|
||||
&sensor_dev_attr_sfp50_los.dev_attr.attr,
|
||||
&sensor_dev_attr_sfp51_los.dev_attr.attr,
|
||||
&sensor_dev_attr_sfp52_los.dev_attr.attr,
|
||||
&sensor_dev_attr_sfp49_tx_disable.dev_attr.attr,
|
||||
&sensor_dev_attr_sfp50_tx_disable.dev_attr.attr,
|
||||
&sensor_dev_attr_sfp51_tx_disable.dev_attr.attr,
|
||||
&sensor_dev_attr_sfp52_tx_disable.dev_attr.attr,
|
||||
&sensor_dev_attr_system_led.dev_attr.attr,
|
||||
&sensor_dev_attr_psu_led.dev_attr.attr,
|
||||
&sensor_dev_attr_fan_led.dev_attr.attr,
|
||||
&sensor_dev_attr_sfp49_tx_fault.dev_attr.attr,
|
||||
&sensor_dev_attr_sfp50_tx_fault.dev_attr.attr,
|
||||
&sensor_dev_attr_sfp51_tx_fault.dev_attr.attr,
|
||||
&sensor_dev_attr_sfp52_tx_fault.dev_attr.attr,
|
||||
&sensor_dev_attr_psu1_power_good.dev_attr.attr,
|
||||
&sensor_dev_attr_psu2_power_good.dev_attr.attr,
|
||||
&sensor_dev_attr_fan1_enable.dev_attr.attr,
|
||||
&sensor_dev_attr_fan2_enable.dev_attr.attr,
|
||||
&sensor_dev_attr_usb_power_enable.dev_attr.attr,
|
||||
&sensor_dev_attr_sfp_led_test.dev_attr.attr,
|
||||
&sensor_dev_attr_warm_reset.dev_attr.attr,
|
||||
&sensor_dev_attr_cold_reset.dev_attr.attr,
|
||||
&sensor_dev_attr_i2cmux_reset.dev_attr.attr,
|
||||
&sensor_dev_attr_zarlink_reset.dev_attr.attr,
|
||||
NULL
|
||||
};
|
||||
|
||||
static const struct attribute_group nokia_7215_ixs_a1_cpld_group = {
|
||||
.attrs = nokia_7215_ixs_a1_cpld_attributes,
|
||||
};
|
||||
|
||||
|
||||
static int nokia_7215_ixs_a1_cpld_probe(struct i2c_client *client,
|
||||
const struct i2c_device_id *dev_id)
|
||||
{
|
||||
int status;
|
||||
struct cpld_data *data=NULL;
|
||||
|
||||
if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_BYTE_DATA)) {
|
||||
dev_err(&client->dev, "CPLD PROBE ERROR: i2c_check_functionality failed (0x%x)\n", client->addr);
|
||||
status = -EIO;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
dev_info(&client->dev, "Nokia-7215-IXS-A1 CPLD chip found.\n");
|
||||
data = kzalloc(sizeof(struct cpld_data), GFP_KERNEL);
|
||||
|
||||
if (!data) {
|
||||
dev_err(&client->dev, "CPLD PROBE ERROR: Can't allocate memory\n");
|
||||
status = -ENOMEM;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
data->client = client;
|
||||
i2c_set_clientdata(client, data);
|
||||
mutex_init(&data->update_lock);
|
||||
|
||||
status = sysfs_create_group(&client->dev.kobj, &nokia_7215_ixs_a1_cpld_group);
|
||||
if (status) {
|
||||
dev_err(&client->dev, "CPLD INIT ERROR: Cannot create sysfs\n");
|
||||
goto exit;
|
||||
}
|
||||
|
||||
data->mb_hw_version = nokia_7215_ixs_a1_cpld_read(data, BOARD_ID_REG);
|
||||
data->cpld_version = nokia_7215_ixs_a1_cpld_read(data, CPLD_VERSION_REG);
|
||||
|
||||
return 0;
|
||||
|
||||
exit:
|
||||
return status;
|
||||
}
|
||||
|
||||
static int nokia_7215_ixs_a1_cpld_remove(struct i2c_client *client)
|
||||
{
|
||||
struct cpld_data *data = i2c_get_clientdata(client);
|
||||
sysfs_remove_group(&client->dev.kobj, &nokia_7215_ixs_a1_cpld_group);
|
||||
kfree(data);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct of_device_id nokia_7215_ixs_a1_cpld_of_ids[] = {
|
||||
{
|
||||
.compatible = "nokia,7215_a1_cpld",
|
||||
.data = (void *) 0,
|
||||
},
|
||||
{ },
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, nokia_7215_ixs_a1_cpld_of_ids);
|
||||
|
||||
static const struct i2c_device_id nokia_7215_ixs_a1_cpld_ids[] = {
|
||||
{ DRIVER_NAME, 0 },
|
||||
{}
|
||||
};
|
||||
MODULE_DEVICE_TABLE(i2c, nokia_7215_ixs_a1_cpld_ids);
|
||||
|
||||
static struct i2c_driver nokia_7215_ixs_a1_cpld_driver = {
|
||||
.driver = {
|
||||
.name = DRIVER_NAME,
|
||||
.of_match_table = of_match_ptr(nokia_7215_ixs_a1_cpld_of_ids),
|
||||
},
|
||||
.probe = nokia_7215_ixs_a1_cpld_probe,
|
||||
.remove = nokia_7215_ixs_a1_cpld_remove,
|
||||
.id_table = nokia_7215_ixs_a1_cpld_ids,
|
||||
.address_list = cpld_address_list,
|
||||
};
|
||||
|
||||
|
||||
|
||||
static int __init nokia_7215_ixs_a1_cpld_init(void)
|
||||
{
|
||||
return i2c_add_driver(&nokia_7215_ixs_a1_cpld_driver);
|
||||
}
|
||||
|
||||
static void __exit nokia_7215_ixs_a1_cpld_exit(void)
|
||||
{
|
||||
i2c_del_driver(&nokia_7215_ixs_a1_cpld_driver);
|
||||
}
|
||||
|
||||
MODULE_AUTHOR("Nokia");
|
||||
MODULE_DESCRIPTION("NOKIA-7215-IXS-A1 CPLD driver");
|
||||
MODULE_LICENSE("GPL");
|
||||
|
||||
module_init(nokia_7215_ixs_a1_cpld_init);
|
||||
module_exit(nokia_7215_ixs_a1_cpld_exit);
|
@ -0,0 +1,56 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Platform init script
|
||||
|
||||
# Load required kernel-mode drivers
|
||||
load_kernel_drivers() {
|
||||
#placeholder for now
|
||||
echo "Loading Kernel Drivers"
|
||||
sudo insmod /lib/modules/5.10.0-18-2-arm64/nokia_7215_ixs_a1_cpld.ko
|
||||
}
|
||||
|
||||
nokia_7215_profile()
|
||||
{
|
||||
MAC_ADDR=$(sudo decode-syseeprom -m)
|
||||
sed -i "s/switchMacAddress=.*/switchMacAddress=$MAC_ADDR/g" /usr/share/sonic/device/arm64-nokia_ixs7215_52xb-r0/Nokia-7215-A1/profile.ini
|
||||
sudo ifconfig eth0 hw ether $MAC_ADDR
|
||||
echo "Nokia-7215-A1: Updating switch mac address ${MAC_ADDR}"
|
||||
}
|
||||
|
||||
# - Main entry
|
||||
|
||||
# Install kernel drivers required for i2c bus access
|
||||
load_kernel_drivers
|
||||
|
||||
|
||||
# LOGIC to enumerate SFP eeprom devices - send 0x50 to kernel i2c driver - initialize devices
|
||||
# the mux may be enumerated at number 4 or 5 so we check for the mux and skip if needed
|
||||
# Get list of the mux channels
|
||||
# Enumerate the SFP eeprom device on each mux channel
|
||||
#echo optoe2 0x50 > /sys/bus/i2c/devices/i2c-0/new_device
|
||||
|
||||
# Enumerate system eeprom
|
||||
echo 24c64 0x53 > /sys/class/i2c-adapter/i2c-0/new_device
|
||||
sleep 2
|
||||
chmod 644 /sys/class/i2c-adapter/i2c-0/0-0053/eeprom
|
||||
|
||||
# Enumerate power monitor
|
||||
echo ina230 0x40 > /sys/bus/i2c/devices/i2c-0/new_device
|
||||
|
||||
# Enumerate fan
|
||||
echo emc2305 0x2e > /sys/bus/i2c/devices/i2c-0/new_device
|
||||
|
||||
# Enumerate RTC
|
||||
echo m41t11 0x68 > /sys/bus/i2c/devices/i2c-0/new_device
|
||||
|
||||
# Enumerate Thermals
|
||||
|
||||
echo tmp75 0x48 > /sys/bus/i2c/devices/i2c-0/new_device
|
||||
echo tmp75 0x49 > /sys/bus/i2c/devices/i2c-0/new_device
|
||||
|
||||
echo nokia_7215_a1_cpld 0x41 > /sys/bus/i2c/devices/i2c-0/new_device
|
||||
|
||||
# Ensure switch is programmed with base MAC addr
|
||||
nokia_7215_profile
|
||||
|
||||
exit 0
|
@ -0,0 +1,33 @@
|
||||
#!/bin/bash
|
||||
|
||||
fw_uboot_env_cfg()
|
||||
{
|
||||
echo "Setting up U-Boot environment..."
|
||||
MACH_FILE="/host/machine.conf"
|
||||
PLATFORM=`sed -n 's/onie_platform=\(.*\)/\1/p' $MACH_FILE`
|
||||
|
||||
FW_ENV_DEFAULT='/dev/mtd0 0x400000 0x10000 0x10000'
|
||||
|
||||
echo $FW_ENV_DEFAULT > /etc/fw_env.config
|
||||
}
|
||||
|
||||
update_modulelist()
|
||||
{
|
||||
MODULE_FILE="/etc/modules-load.d/marvell.conf"
|
||||
if grep -Fxq "mvMbusDrv" $MODULE_FILE
|
||||
then
|
||||
echo "Module list up to date"
|
||||
else
|
||||
echo "mvMbusDrv" >> $MODULE_FILE
|
||||
modprobe mvMbusDrv
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
main()
|
||||
{
|
||||
fw_uboot_env_cfg
|
||||
update_modulelist
|
||||
}
|
||||
|
||||
main $@
|
@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=Nokia-7215 Platform Service
|
||||
After=sysinit.target
|
||||
Before=pmon.service
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/local/bin/nokia-7215-init.sh
|
||||
StandardOutput=tty
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
15
platform/marvell-arm64/sonic-platform-nokia/7215/setup.py
Executable file
15
platform/marvell-arm64/sonic-platform-nokia/7215/setup.py
Executable file
@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import os
|
||||
from setuptools import setup
|
||||
os.listdir
|
||||
|
||||
setup(
|
||||
name='sonic_platform',
|
||||
version='1.0',
|
||||
description='Module to initialize Nokia IXS 7215 platforms',
|
||||
|
||||
packages=['sonic_platform','sonic_platform.test'],
|
||||
package_dir={'sonic_platform': '7215/sonic_platform'},
|
||||
)
|
||||
|
@ -0,0 +1,3 @@
|
||||
__all__ = ["platform", "chassis"]
|
||||
from sonic_platform import *
|
||||
|
@ -0,0 +1,451 @@
|
||||
#############################################################################
|
||||
#
|
||||
# Module contains an implementation of SONiC Platform Base API and
|
||||
# provides the platform information
|
||||
#
|
||||
#############################################################################
|
||||
|
||||
try:
|
||||
import os
|
||||
import time
|
||||
import sys
|
||||
import glob
|
||||
from sonic_platform_base.chassis_base import ChassisBase
|
||||
from sonic_platform.sfp import Sfp
|
||||
from sonic_platform.eeprom import Eeprom
|
||||
from sonic_platform.fan import Fan
|
||||
from .fan_drawer import RealDrawer
|
||||
from sonic_platform.psu import Psu
|
||||
from sonic_platform.thermal import Thermal
|
||||
from sonic_platform.component import Component
|
||||
from sonic_py_common import logger
|
||||
from sonic_py_common.general import getstatusoutput_noshell
|
||||
except ImportError as e:
|
||||
raise ImportError(str(e) + "- required module not found")
|
||||
|
||||
MAX_SELECT_DELAY = 3600
|
||||
COPPER_PORT_START = 1
|
||||
COPPER_PORT_END = 48
|
||||
SFP_PORT_START = 49
|
||||
SFP_PORT_END = 52
|
||||
PORT_END = 52
|
||||
MAX_7215_COMPONENT=2
|
||||
|
||||
# Device counts
|
||||
MAX_7215_FAN_DRAWERS = 2
|
||||
MAX_7215_FANS_PER_DRAWER = 1
|
||||
MAX_7215_PSU = 2
|
||||
MAX_7215_THERMAL = 3
|
||||
CPLD_DIR = "/sys/bus/i2c/devices/0-0041/"
|
||||
|
||||
SYSLOG_IDENTIFIER = "chassis"
|
||||
sonic_logger = logger.Logger(SYSLOG_IDENTIFIER)
|
||||
|
||||
|
||||
class Chassis(ChassisBase):
|
||||
"""
|
||||
Nokia platform-specific Chassis class
|
||||
Derived from Dell S6000 platform.
|
||||
customized for the 7215 platform.
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
ChassisBase.__init__(self)
|
||||
self.system_led_supported_color = ['off', 'amber', 'green', 'amber_blink', 'green_blink']
|
||||
# Port numbers for SFP List Initialization
|
||||
self.COPPER_PORT_START = COPPER_PORT_START
|
||||
self.COPPER_PORT_END = COPPER_PORT_END
|
||||
self.SFP_PORT_START = SFP_PORT_START
|
||||
self.SFP_PORT_END = SFP_PORT_END
|
||||
self.PORT_END = PORT_END
|
||||
|
||||
# for non-sfp ports create dummy objects for copper / non-sfp ports
|
||||
for index in range(self.COPPER_PORT_START, self.COPPER_PORT_END+1):
|
||||
sfp_node = Sfp(index, 'COPPER', 'N/A', 'N/A')
|
||||
self._sfp_list.append(sfp_node)
|
||||
|
||||
"""
|
||||
# Verify optoe2 driver SFP eeprom devices were enumerated and exist
|
||||
# then create the sfp nodes
|
||||
eeprom_path = "/sys/class/i2c-adapter/i2c-{0}/{0}-0050/eeprom"
|
||||
mux_dev = sorted(glob.glob("/sys/class/i2c-adapter/i2c-0/i2c-[0-9]"))
|
||||
y = 0
|
||||
for index in range(self.SFP_PORT_START, self.SFP_PORT_END+1):
|
||||
mux_dev_num = mux_dev[y]
|
||||
port_i2c_map = mux_dev_num[-1]
|
||||
y = y + 1
|
||||
port_eeprom_path = eeprom_path.format(port_i2c_map)
|
||||
if not os.path.exists(port_eeprom_path):
|
||||
sonic_logger.log_info("path %s didnt exist" % port_eeprom_path)
|
||||
sfp_node = Sfp(index, 'SFP', port_eeprom_path, port_i2c_map)
|
||||
self._sfp_list.append(sfp_node)
|
||||
self.sfp_event_initialized = False
|
||||
"""
|
||||
|
||||
# Instantiate system eeprom object
|
||||
self._eeprom = Eeprom()
|
||||
|
||||
# Construct lists fans, power supplies, thermals & components
|
||||
drawer_num = MAX_7215_FAN_DRAWERS
|
||||
fan_num_per_drawer = MAX_7215_FANS_PER_DRAWER
|
||||
drawer_ctor = RealDrawer
|
||||
fan_index = 0
|
||||
for drawer_index in range(drawer_num):
|
||||
drawer = drawer_ctor(drawer_index)
|
||||
self._fan_drawer_list.append(drawer)
|
||||
for index in range(fan_num_per_drawer):
|
||||
fan = Fan(fan_index, drawer)
|
||||
fan_index += 1
|
||||
drawer._fan_list.append(fan)
|
||||
self._fan_list.append(fan)
|
||||
|
||||
for i in range(MAX_7215_PSU):
|
||||
psu = Psu(i)
|
||||
self._psu_list.append(psu)
|
||||
|
||||
for i in range(MAX_7215_THERMAL):
|
||||
thermal = Thermal(i)
|
||||
self._thermal_list.append(thermal)
|
||||
|
||||
for i in range(MAX_7215_COMPONENT):
|
||||
component = Component(i)
|
||||
self._component_list.append(component)
|
||||
|
||||
def _read_sysfs_file(self, sysfs_file):
|
||||
# On successful read, returns the value read from given
|
||||
# reg_name and on failure returns 'ERR'
|
||||
rv = 'ERR'
|
||||
|
||||
if (not os.path.isfile(sysfs_file)):
|
||||
return rv
|
||||
try:
|
||||
with open(sysfs_file, 'r') as fd:
|
||||
rv = fd.read()
|
||||
except Exception as e:
|
||||
rv = 'ERR'
|
||||
|
||||
rv = rv.rstrip('\r\n')
|
||||
rv = rv.lstrip(" ")
|
||||
return rv
|
||||
|
||||
def _write_sysfs_file(self, sysfs_file, value):
|
||||
# On successful write, the value read will be written on
|
||||
# reg_name and on failure returns 'ERR'
|
||||
rv = 'ERR'
|
||||
|
||||
if (not os.path.isfile(sysfs_file)):
|
||||
return rv
|
||||
try:
|
||||
with open(sysfs_file, 'w') as fd:
|
||||
rv = fd.write(str(value))
|
||||
except Exception as e:
|
||||
rv = 'ERR'
|
||||
|
||||
# Ensure that the write operation has succeeded
|
||||
if ((self._read_sysfs_file(sysfs_file)) != value ):
|
||||
time.sleep(3)
|
||||
if ((self._read_sysfs_file(sysfs_file)) != value ):
|
||||
rv = 'ERR'
|
||||
|
||||
return rv
|
||||
|
||||
def get_sfp(self, index):
|
||||
"""
|
||||
Retrieves sfp represented by (1-based) index <index>
|
||||
Args:
|
||||
index: An integer, the index (1-based) of the sfp to retrieve.
|
||||
The index should be the sequence of physical SFP ports in a
|
||||
chassis starting from 1.
|
||||
|
||||
Returns:
|
||||
An object dervied from SfpBase representing the specified sfp
|
||||
"""
|
||||
sfp = None
|
||||
|
||||
try:
|
||||
# The index will start from 1
|
||||
sfp = self._sfp_list[index-1]
|
||||
except IndexError:
|
||||
sys.stderr.write("SFP index {} out of range (1-{})\n".format(
|
||||
index, len(self._sfp_list)))
|
||||
return sfp
|
||||
|
||||
def get_name(self):
|
||||
"""
|
||||
Retrieves the name of the chassis
|
||||
Returns:
|
||||
string: The name of the chassis
|
||||
"""
|
||||
return self._eeprom.modelstr()
|
||||
|
||||
def get_presence(self):
|
||||
"""
|
||||
Retrieves the presence of the chassis
|
||||
Returns:
|
||||
bool: True if chassis is present, False if not
|
||||
"""
|
||||
return True
|
||||
|
||||
def get_model(self):
|
||||
"""
|
||||
Retrieves the model number (or part number) of the chassis
|
||||
Returns:
|
||||
string: Model/part number of chassis
|
||||
"""
|
||||
return self._eeprom.part_number_str()
|
||||
|
||||
def get_serial(self):
|
||||
"""
|
||||
Retrieves the serial number of the chassis (Service tag)
|
||||
Returns:
|
||||
string: Serial number of chassis
|
||||
"""
|
||||
return self._eeprom.serial_str()
|
||||
|
||||
def get_status(self):
|
||||
"""
|
||||
Retrieves the operational status of the chassis
|
||||
Returns:
|
||||
bool: A boolean value, True if chassis is operating properly
|
||||
False if not
|
||||
"""
|
||||
return True
|
||||
|
||||
def get_base_mac(self):
|
||||
"""
|
||||
Retrieves the base MAC address for the chassis
|
||||
|
||||
Returns:
|
||||
A string containing the MAC address in the format
|
||||
'XX:XX:XX:XX:XX:XX'
|
||||
"""
|
||||
return self._eeprom.base_mac_addr()
|
||||
|
||||
def get_serial_number(self):
|
||||
"""
|
||||
Retrieves the hardware serial number for the chassis
|
||||
|
||||
Returns:
|
||||
A string containing the hardware serial number for this
|
||||
chassis.
|
||||
"""
|
||||
return self._eeprom.serial_number_str()
|
||||
|
||||
def get_revision(self):
|
||||
"""
|
||||
Retrieves the hardware revision of the chassis
|
||||
|
||||
Returns:
|
||||
string: Revision value of chassis
|
||||
"""
|
||||
#Revision is always 0 for 7215-IXS-A1
|
||||
return str(0)
|
||||
|
||||
def get_system_eeprom_info(self):
|
||||
"""
|
||||
Retrieves the full content of system EEPROM information for the
|
||||
chassis
|
||||
|
||||
Returns:
|
||||
A dictionary where keys are the type code defined in
|
||||
OCP ONIE TlvInfo EEPROM format and values are their
|
||||
corresponding values.
|
||||
"""
|
||||
return self._eeprom.system_eeprom_info()
|
||||
|
||||
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.
|
||||
"""
|
||||
# The ixs7215 CPLD does not have a hardware reboot cause register so
|
||||
# the hardware portion of reboot cause can't be implemented
|
||||
|
||||
return (ChassisBase.REBOOT_CAUSE_NON_HARDWARE, None)
|
||||
|
||||
def get_watchdog(self):
|
||||
"""
|
||||
Retrieves hardware watchdog device on this chassis
|
||||
|
||||
Returns:
|
||||
An object derived from WatchdogBase representing the hardware
|
||||
watchdog device
|
||||
"""
|
||||
try:
|
||||
if self._watchdog is None:
|
||||
from sonic_platform.watchdog import WatchdogImplBase
|
||||
watchdog_device_path = "/dev/watchdog0"
|
||||
self._watchdog = WatchdogImplBase(watchdog_device_path)
|
||||
except Exception as e:
|
||||
sonic_logger.log_warning(" Fail to load watchdog {}".format(repr(e)))
|
||||
|
||||
return self._watchdog
|
||||
|
||||
def get_change_event(self, timeout=0):
|
||||
"""
|
||||
Returns a nested dictionary containing all devices which have
|
||||
experienced a change at chassis level
|
||||
|
||||
Args:
|
||||
timeout: Timeout in milliseconds (optional). If timeout == 0,
|
||||
this method will block until a change is detected.
|
||||
|
||||
Returns:
|
||||
(bool, dict):
|
||||
- True if call successful, False if not;
|
||||
- A nested dictionary where key is a device type,
|
||||
value is a dictionary with key:value pairs in the format of
|
||||
{'device_id':'device_event'},
|
||||
where device_id is the device ID for this device and
|
||||
device_event,
|
||||
status='1' represents device inserted,
|
||||
status='0' represents device removed.
|
||||
Ex. {'fan':{'0':'0', '2':'1'}, 'sfp':{'11':'0'}}
|
||||
indicates that fan 0 has been removed, fan 2
|
||||
has been inserted and sfp 11 has been removed.
|
||||
"""
|
||||
# Initialize SFP event first
|
||||
if not self.sfp_event_initialized:
|
||||
from sonic_platform.sfp_event import sfp_event
|
||||
self.sfp_event = sfp_event()
|
||||
self.sfp_event.initialize()
|
||||
self.MAX_SELECT_EVENT_RETURNED = self.PORT_END
|
||||
self.sfp_event_initialized = True
|
||||
|
||||
wait_for_ever = (timeout == 0)
|
||||
port_dict = {}
|
||||
if wait_for_ever:
|
||||
# xrcvd will call this monitor loop in the "SYSTEM_READY" state
|
||||
# logger.log_info(" wait_for_ever get_change_event %d" % timeout)
|
||||
timeout = MAX_SELECT_DELAY
|
||||
while True:
|
||||
status = self.sfp_event.check_sfp_status(port_dict, timeout)
|
||||
if not port_dict == {}:
|
||||
break
|
||||
else:
|
||||
# At boot up and in "INIT" state call from xrcvd will have timeout
|
||||
# value return true without change after timeout and will
|
||||
# transition to "SYSTEM_READY"
|
||||
status = self.sfp_event.check_sfp_status(port_dict, timeout)
|
||||
|
||||
if status:
|
||||
return True, {'sfp': port_dict}
|
||||
else:
|
||||
return True, {'sfp': {}}
|
||||
|
||||
def get_thermal_manager(self):
|
||||
from .thermal_manager import ThermalManager
|
||||
return ThermalManager
|
||||
|
||||
def initizalize_system_led(self):
|
||||
return True
|
||||
|
||||
def set_status_led(self, color):
|
||||
"""
|
||||
Sets the state of the system LED
|
||||
|
||||
Args:
|
||||
color: A string representing the color with which to set the
|
||||
system LED
|
||||
|
||||
Returns:
|
||||
bool: True if system LED state is set successfully, False if not
|
||||
"""
|
||||
if color not in self.system_led_supported_color:
|
||||
return False
|
||||
|
||||
if (color == 'off'):
|
||||
value = 'off'
|
||||
elif (color == 'amber'):
|
||||
value ='amber'
|
||||
elif (color == 'green'):
|
||||
value ='green'
|
||||
elif (color == 'amber_blink'):
|
||||
value = 'blink4-amber'
|
||||
elif (color == 'green_blink'):
|
||||
value = 'blink4-green'
|
||||
else:
|
||||
return False
|
||||
# Write sys led
|
||||
status = self._write_sysfs_file(CPLD_DIR+"system_led", value)
|
||||
|
||||
if status == "ERR":
|
||||
return False
|
||||
|
||||
return True
|
||||
|
||||
def get_status_led(self):
|
||||
"""
|
||||
Gets the state of the system LED
|
||||
|
||||
Returns:
|
||||
A string, one of the valid LED color strings which could be vendor
|
||||
specified.
|
||||
"""
|
||||
# Read sys led
|
||||
value = self._read_sysfs_file(CPLD_DIR+"system_led")
|
||||
|
||||
if value == 'off':
|
||||
color = 'off'
|
||||
elif value == 'amber':
|
||||
color = 'amber'
|
||||
elif value == 'green':
|
||||
color = 'green'
|
||||
elif value == 'blink4-amber':
|
||||
color = 'amber_blink'
|
||||
elif value == 'blink4-green':
|
||||
color = 'green_blink'
|
||||
else:
|
||||
return None
|
||||
|
||||
return color
|
||||
|
||||
def get_watchdog(self):
|
||||
"""
|
||||
Retrieves hardware watchdog device on this chassis
|
||||
|
||||
Returns:
|
||||
An object derived from WatchdogBase representing the hardware
|
||||
watchdog device
|
||||
|
||||
Note:
|
||||
We overload this method to ensure that watchdog is only initialized
|
||||
when it is referenced. Currently, only one daemon can open the
|
||||
watchdog. To initialize watchdog in the constructor causes multiple
|
||||
daemon try opening watchdog when loading and constructing a chassis
|
||||
object and fail. By doing so we can eliminate that risk.
|
||||
"""
|
||||
try:
|
||||
if self._watchdog is None:
|
||||
from sonic_platform.watchdog import WatchdogImplBase
|
||||
watchdog_device_path = "/dev/watchdog0"
|
||||
self._watchdog = WatchdogImplBase(watchdog_device_path)
|
||||
except Exception as e:
|
||||
sonic_logger.log_warning(" Fail to load watchdog {}".format(repr(e)))
|
||||
|
||||
return self._watchdog
|
||||
|
||||
def get_position_in_parent(self):
|
||||
"""
|
||||
Retrieves 1-based relative physical position in parent device. If the agent
|
||||
cannot determine the parent-relative position
|
||||
for some reason, or if the associated value of entPhysicalContainedIn is '0',
|
||||
then the value '-1' is returned
|
||||
Returns:
|
||||
integer: The 1-based relative physical position in parent device or -1 if
|
||||
cannot determine the position
|
||||
"""
|
||||
return -1
|
||||
|
||||
def is_replaceable(self):
|
||||
"""
|
||||
Indicate whether this device is replaceable.
|
||||
Returns:
|
||||
bool: True if it is replaceable.
|
||||
"""
|
||||
return False
|
@ -0,0 +1,220 @@
|
||||
########################################################################
|
||||
# NOKIA IXS7215
|
||||
#
|
||||
# Module contains an implementation of SONiC Platform Base API and
|
||||
# provides the Components' (e.g., BIOS, CPLD, FPGA, etc.) available in
|
||||
# the platform
|
||||
#
|
||||
########################################################################
|
||||
|
||||
try:
|
||||
import sys
|
||||
import os
|
||||
import time
|
||||
import subprocess
|
||||
import ntpath
|
||||
from sonic_platform_base.component_base import ComponentBase
|
||||
from sonic_py_common.general import getstatusoutput_noshell, getstatusoutput_noshell_pipe
|
||||
except ImportError as e:
|
||||
raise ImportError(str(e) + "- required module not found")
|
||||
|
||||
|
||||
if sys.version_info[0] < 3:
|
||||
import commands as cmd
|
||||
else:
|
||||
import subprocess as cmd
|
||||
|
||||
|
||||
CPLD_DIR = "/sys/bus/i2c/devices/0-0041/"
|
||||
|
||||
class Component(ComponentBase):
|
||||
"""Nokia platform-specific Component class"""
|
||||
|
||||
CHASSIS_COMPONENTS = [
|
||||
["System-CPLD", "Used for managing SFPs, LEDs, PSUs and FANs "],
|
||||
["U-Boot", "Performs initialization during booting"],
|
||||
]
|
||||
CPLD_UPDATE_COMMAND1 = ['cp', '/usr/sbin/vme', '/tmp']
|
||||
CPLD_UPDATE_COMMAND2 = ['cp', '', '/tmp']
|
||||
CPLD_UPDATE_COMMAND3 = ['cd', '/tmp']
|
||||
CPLD_UPDATE_COMMAND4 = ['./vme', '']
|
||||
|
||||
def __init__(self, component_index):
|
||||
self.index = component_index
|
||||
self.name = self.CHASSIS_COMPONENTS[self.index][0]
|
||||
self.description = self.CHASSIS_COMPONENTS[self.index][1]
|
||||
|
||||
def _get_command_result(self, cmdline):
|
||||
try:
|
||||
proc = subprocess.Popen(cmdline.split(), stdout=subprocess.PIPE,
|
||||
stderr=subprocess.STDOUT)
|
||||
stdout = proc.communicate()[0]
|
||||
proc.wait()
|
||||
result = stdout.rstrip('\n')
|
||||
except OSError:
|
||||
result = None
|
||||
|
||||
return result
|
||||
|
||||
def _read_sysfs_file(self, sysfs_file):
|
||||
# On successful read, returns the value read from given
|
||||
# reg_name and on failure returns 'ERR'
|
||||
rv = 'ERR'
|
||||
|
||||
if (not os.path.isfile(sysfs_file)):
|
||||
return rv
|
||||
try:
|
||||
with open(sysfs_file, 'r') as fd:
|
||||
rv = fd.read()
|
||||
except Exception as e:
|
||||
rv = 'ERR'
|
||||
|
||||
rv = rv.rstrip('\r\n')
|
||||
rv = rv.lstrip(" ")
|
||||
return rv
|
||||
|
||||
def _write_sysfs_file(self, sysfs_file, value):
|
||||
# On successful write, the value read will be written on
|
||||
# reg_name and on failure returns 'ERR'
|
||||
rv = 'ERR'
|
||||
|
||||
if (not os.path.isfile(sysfs_file)):
|
||||
return rv
|
||||
try:
|
||||
with open(sysfs_file, 'w') as fd:
|
||||
rv = fd.write(str(value))
|
||||
except Exception as e:
|
||||
rv = 'ERR'
|
||||
|
||||
# Ensure that the write operation has succeeded
|
||||
if (int(self._read_sysfs_file(sysfs_file)) != value ):
|
||||
time.sleep(3)
|
||||
if (int(self._read_sysfs_file(sysfs_file)) != value ):
|
||||
rv = 'ERR'
|
||||
|
||||
return rv
|
||||
|
||||
def _get_cpld_version(self, cpld_number):
|
||||
|
||||
cpld_version = self._read_sysfs_file(CPLD_DIR+"cpldversion")
|
||||
|
||||
return str(int(cpld_version, 16))
|
||||
|
||||
def get_name(self):
|
||||
"""
|
||||
Retrieves the name of the component
|
||||
|
||||
Returns:
|
||||
A string containing the name of the component
|
||||
"""
|
||||
return self.name
|
||||
|
||||
def get_model(self):
|
||||
"""
|
||||
Retrieves the part number of the component
|
||||
Returns:
|
||||
string: Part number of component
|
||||
"""
|
||||
return 'NA'
|
||||
|
||||
def get_serial(self):
|
||||
"""
|
||||
Retrieves the serial number of the component
|
||||
Returns:
|
||||
string: Serial number of component
|
||||
"""
|
||||
return 'NA'
|
||||
|
||||
def get_presence(self):
|
||||
"""
|
||||
Retrieves the presence of the component
|
||||
Returns:
|
||||
bool: True if present, False if not
|
||||
"""
|
||||
return True
|
||||
|
||||
def get_status(self):
|
||||
"""
|
||||
Retrieves the operational status of the component
|
||||
Returns:
|
||||
bool: True if component is operating properly, False if not
|
||||
"""
|
||||
return True
|
||||
|
||||
def get_position_in_parent(self):
|
||||
"""
|
||||
Retrieves 1-based relative physical position in parent device.
|
||||
Returns:
|
||||
integer: The 1-based relative physical position in parent
|
||||
device or -1 if cannot determine the position
|
||||
"""
|
||||
return -1
|
||||
|
||||
def is_replaceable(self):
|
||||
"""
|
||||
Indicate whether component is replaceable.
|
||||
Returns:
|
||||
bool: True if it is replaceable.
|
||||
"""
|
||||
return False
|
||||
|
||||
def get_description(self):
|
||||
"""
|
||||
Retrieves the description of the component
|
||||
|
||||
Returns:
|
||||
A string containing the description of the component
|
||||
"""
|
||||
return self.description
|
||||
|
||||
def get_firmware_version(self):
|
||||
"""
|
||||
Retrieves the firmware version of the component
|
||||
|
||||
Returns:
|
||||
A string containing the firmware version of the component
|
||||
"""
|
||||
if self.index == 0:
|
||||
return self._get_cpld_version(self.index)
|
||||
|
||||
if self.index == 1:
|
||||
cmdstatus, uboot_version = cmd.getstatusoutput('grep --null-data ^U-Boot /dev/mtd0ro | cut -d" " -f2')
|
||||
return uboot_version
|
||||
|
||||
def install_firmware(self, image_path):
|
||||
"""
|
||||
Installs firmware to the component
|
||||
|
||||
Args:
|
||||
image_path: A string, path to firmware image
|
||||
|
||||
Returns:
|
||||
A boolean, True if install was successful, False if not
|
||||
"""
|
||||
image_name = ntpath.basename(image_path)
|
||||
print(" ixs7215 - install cpld {}".format(image_name))
|
||||
|
||||
# check whether the image file exists
|
||||
if not os.path.isfile(image_path):
|
||||
print("ERROR: the cpld image {} doesn't exist ".format(image_path))
|
||||
return False
|
||||
|
||||
self.CPLD_UPDATE_COMMAND2[1] = image_path
|
||||
self.CPLD_UPDATE_COMMAND4[1] = image_name
|
||||
|
||||
success_flag = False
|
||||
|
||||
try:
|
||||
subprocess.check_call(self.CPLD_UPDATE_COMMAND1, stderr=subprocess.STDOUT)
|
||||
subprocess.check_call(self.CPLD_UPDATE_COMMAND2, stderr=subprocess.STDOUT)
|
||||
subprocess.check_call(self.CPLD_UPDATE_COMMAND3, stderr=subprocess.STDOUT)
|
||||
subprocess.check_call(self.CPLD_UPDATE_COMMAND4, stderr=subprocess.STDOUT)
|
||||
success_flag = True
|
||||
except subprocess.CalledProcessError as e:
|
||||
print("ERROR: Failed to upgrade CPLD: rc={}".format(e.returncode))
|
||||
|
||||
if success_flag:
|
||||
print("INFO: Refresh or power cycle is required to finish CPLD installation")
|
||||
|
||||
return success_flag
|
||||
|
@ -0,0 +1,175 @@
|
||||
########################################################################
|
||||
# Nokia IXS7215
|
||||
#
|
||||
# Module contains platform specific implementation of SONiC Platform
|
||||
# Base API and provides the EEPROMs' information.
|
||||
#
|
||||
# The different EEPROMs available are as follows:
|
||||
# - System EEPROM : Contains Serial number, Service tag, Base MA
|
||||
# address, etc. in ONIE TlvInfo EEPROM format.
|
||||
########################################################################
|
||||
|
||||
|
||||
try:
|
||||
from sonic_platform_base.sonic_eeprom.eeprom_tlvinfo import TlvInfoDecoder
|
||||
from sonic_py_common import logger
|
||||
except ImportError as e:
|
||||
raise ImportError(str(e) + "- required module not found")
|
||||
|
||||
sonic_logger = logger.Logger('eeprom')
|
||||
|
||||
class Eeprom(TlvInfoDecoder):
|
||||
"""Nokia platform-specific EEPROM class"""
|
||||
|
||||
I2C_DIR = "/sys/class/i2c-adapter/"
|
||||
|
||||
def __init__(self, is_psu=False, psu_index=0, is_fan=False, fan_index=0):
|
||||
self.is_psu_eeprom = is_psu
|
||||
self.is_fan_eeprom = is_fan
|
||||
self.is_sys_eeprom = not (is_psu | is_fan)
|
||||
|
||||
self.start_offset = 0
|
||||
self.eeprom_path = self.I2C_DIR + "i2c-0/0-0053/eeprom"
|
||||
# System EEPROM is in ONIE TlvInfo EEPROM format
|
||||
super(Eeprom, self).__init__(self.eeprom_path,
|
||||
self.start_offset, '', True)
|
||||
self._load_system_eeprom()
|
||||
|
||||
if self.is_psu_eeprom:
|
||||
self.index = psu_index
|
||||
self.part_number = '1'
|
||||
self.model_str = 'PJT-12V100WBBA'
|
||||
|
||||
if self.is_fan_eeprom:
|
||||
self.index = fan_index
|
||||
self.part_number = '1'
|
||||
self.model_str = 'FFB0412UHN-BC2EA12'
|
||||
|
||||
|
||||
def _load_system_eeprom(self):
|
||||
"""
|
||||
Reads the system EEPROM and retrieves the values corresponding
|
||||
to the codes defined as per ONIE TlvInfo EEPROM format and fills
|
||||
them in a dictionary.
|
||||
"""
|
||||
try:
|
||||
# Read System EEPROM as per ONIE TlvInfo EEPROM format.
|
||||
self.eeprom_data = self.read_eeprom()
|
||||
except Exception as e:
|
||||
sonic_logger.log_warning("Unable to read system eeprom")
|
||||
self.base_mac = 'NA'
|
||||
self.serial_number = 'NA'
|
||||
self.part_number = 'NA'
|
||||
self.model_str = 'NA'
|
||||
self.serial = 'NA'
|
||||
self.eeprom_tlv_dict = dict()
|
||||
else:
|
||||
eeprom = self.eeprom_data
|
||||
self.eeprom_tlv_dict = dict()
|
||||
|
||||
if not self.is_valid_tlvinfo_header(eeprom):
|
||||
sonic_logger.log_warning("Invalid system eeprom TLV header")
|
||||
self.base_mac = 'NA'
|
||||
self.serial_number = 'NA'
|
||||
self.part_number = 'NA'
|
||||
self.model_str = 'NA'
|
||||
self.serial = 'NA'
|
||||
return
|
||||
|
||||
total_length = (eeprom[9] << 8) | eeprom[10]
|
||||
tlv_index = self._TLV_INFO_HDR_LEN
|
||||
tlv_end = self._TLV_INFO_HDR_LEN + total_length
|
||||
|
||||
while (tlv_index + 2) < len(eeprom) and tlv_index < tlv_end:
|
||||
if not self.is_valid_tlv(eeprom[tlv_index:]):
|
||||
break
|
||||
|
||||
tlv = eeprom[tlv_index:tlv_index + 2
|
||||
+ eeprom[tlv_index + 1]]
|
||||
code = "0x%02X" % (tlv[0])
|
||||
|
||||
if tlv[0] == self._TLV_CODE_VENDOR_EXT:
|
||||
value = str((tlv[2] << 24) | (tlv[3] << 16) |
|
||||
(tlv[4]<< 8) | tlv[5])
|
||||
value += str(tlv[6:6 + tlv[1]])
|
||||
else:
|
||||
name, value = self.decoder(None, tlv)
|
||||
|
||||
self.eeprom_tlv_dict[code] = value
|
||||
if eeprom[tlv_index] == self._TLV_CODE_CRC_32:
|
||||
break
|
||||
|
||||
tlv_index += eeprom[tlv_index+1] + 2
|
||||
|
||||
self.base_mac = self.eeprom_tlv_dict.get(
|
||||
"0x%X" % (self._TLV_CODE_MAC_BASE), 'NA')
|
||||
self.serial_number = self.eeprom_tlv_dict.get(
|
||||
"0x%X" % (self._TLV_CODE_SERIAL_NUMBER), 'NA')
|
||||
self.part_number = self.eeprom_tlv_dict.get(
|
||||
"0x%X" % (self._TLV_CODE_PART_NUMBER), 'NA')
|
||||
self.model_str = self.eeprom_tlv_dict.get(
|
||||
"0x%X" % (self._TLV_CODE_PRODUCT_NAME), 'NA')
|
||||
self.serial = self.eeprom_tlv_dict.get(
|
||||
"0x%X" % (self._TLV_CODE_SERVICE_TAG), 'NA')
|
||||
|
||||
def _get_eeprom_field(self, field_name):
|
||||
"""
|
||||
For a field name specified in the EEPROM format, returns the
|
||||
presence of the field and the value for the same.
|
||||
"""
|
||||
field_start = 0
|
||||
for field in self.format:
|
||||
field_end = field_start + field[2]
|
||||
if field[0] == field_name:
|
||||
return (True, self.eeprom_data[field_start:field_end])
|
||||
field_start = field_end
|
||||
|
||||
return (False, None)
|
||||
|
||||
def serial_number_str(self):
|
||||
"""
|
||||
Returns the serial number.
|
||||
"""
|
||||
return self.serial_number
|
||||
|
||||
def part_number_str(self):
|
||||
"""
|
||||
Returns the part number.
|
||||
"""
|
||||
return self.part_number
|
||||
|
||||
def airflow_fan_type(self):
|
||||
"""
|
||||
Returns the airflow fan type.
|
||||
"""
|
||||
if self.is_psu_eeprom:
|
||||
return int(self.psu_type.encode('hex'), 16)
|
||||
if self.is_fan_eeprom:
|
||||
return int(self.fan_type.encode('hex'), 16)
|
||||
|
||||
# System EEPROM specific methods
|
||||
def base_mac_addr(self):
|
||||
"""
|
||||
Returns the base MAC address found in the system EEPROM.
|
||||
"""
|
||||
return self.base_mac
|
||||
|
||||
def modelstr(self):
|
||||
"""
|
||||
Returns the Model name.
|
||||
"""
|
||||
return self.model_str
|
||||
|
||||
def serial_str(self):
|
||||
"""
|
||||
Returns the servicetag number.
|
||||
"""
|
||||
return self.serial
|
||||
|
||||
def system_eeprom_info(self):
|
||||
"""
|
||||
Returns a dictionary, where keys are the type code defined in
|
||||
ONIE EEPROM format and values are their corresponding values
|
||||
found in the system EEPROM.
|
||||
"""
|
||||
return self.eeprom_tlv_dict
|
@ -0,0 +1,308 @@
|
||||
########################################################################
|
||||
# Nokia IXS7215
|
||||
#
|
||||
# Module contains an implementation of SONiC Platform Base API and
|
||||
# provides the Fans' information which are available in the platform
|
||||
#
|
||||
########################################################################
|
||||
|
||||
|
||||
try:
|
||||
import os
|
||||
import time
|
||||
from sonic_platform_base.fan_base import FanBase
|
||||
from sonic_platform.eeprom import Eeprom
|
||||
from sonic_py_common import logger
|
||||
except ImportError as e:
|
||||
raise ImportError(str(e) + "- required module not found")
|
||||
|
||||
MAX_IXS7215_FAN_SPEED = 23000
|
||||
WORKING_IXS7215_FAN_SPEED = 2300
|
||||
|
||||
sonic_logger = logger.Logger('fan')
|
||||
|
||||
|
||||
class Fan(FanBase):
|
||||
"""Nokia platform-specific Fan class"""
|
||||
|
||||
def __init__(self, fan_index, fan_drawer, psu_fan=False, dependency=None):
|
||||
self.is_psu_fan = psu_fan
|
||||
i2c_path = "/sys/bus/i2c/devices/0-002e/hwmon/"
|
||||
hwmon_node = os.listdir(i2c_path)[0]
|
||||
EMC2302_DIR = i2c_path + hwmon_node + '/'
|
||||
|
||||
if not self.is_psu_fan:
|
||||
# Fan is 1-based in Nokia platforms
|
||||
self.index = fan_index + 1
|
||||
self.fan_drawer = fan_drawer
|
||||
self.set_fan_speed_reg = EMC2302_DIR+"pwm{}".format(self.index)
|
||||
self.get_fan_speed_reg = EMC2302_DIR+"fan{}_input".format(self.index)
|
||||
self.max_fan_speed = MAX_IXS7215_FAN_SPEED
|
||||
|
||||
# Fan eeprom
|
||||
self.eeprom = Eeprom(is_fan=True, fan_index=self.index)
|
||||
else:
|
||||
# this is a PSU Fan
|
||||
self.index = fan_index
|
||||
self.dependency = dependency
|
||||
|
||||
def _read_sysfs_file(self, sysfs_file):
|
||||
# On successful read, returns the value read from given
|
||||
# reg_name and on failure returns 'ERR'
|
||||
rv = 'ERR'
|
||||
|
||||
if (not os.path.isfile(sysfs_file)):
|
||||
return rv
|
||||
try:
|
||||
with open(sysfs_file, 'r') as fd:
|
||||
rv = fd.read()
|
||||
except Exception as e:
|
||||
rv = 'ERR'
|
||||
|
||||
rv = rv.rstrip('\r\n')
|
||||
rv = rv.lstrip(" ")
|
||||
return rv
|
||||
|
||||
def _write_sysfs_file(self, sysfs_file, value):
|
||||
# On successful write, the value read will be written on
|
||||
# reg_name and on failure returns 'ERR'
|
||||
rv = 'ERR'
|
||||
|
||||
if (not os.path.isfile(sysfs_file)):
|
||||
return rv
|
||||
try:
|
||||
with open(sysfs_file, 'w') as fd:
|
||||
rv = fd.write(str(value))
|
||||
except Exception as e:
|
||||
rv = 'ERR'
|
||||
|
||||
# Ensure that the write operation has succeeded
|
||||
if (int(self._read_sysfs_file(sysfs_file)) != value ):
|
||||
time.sleep(3)
|
||||
if (int(self._read_sysfs_file(sysfs_file)) != value ):
|
||||
rv = 'ERR'
|
||||
|
||||
return rv
|
||||
|
||||
def get_name(self):
|
||||
"""
|
||||
Retrieves the name of the Fan
|
||||
|
||||
Returns:
|
||||
string: The name of the Fan
|
||||
"""
|
||||
if not self.is_psu_fan:
|
||||
return "Fan{}".format(self.index)
|
||||
else:
|
||||
return "PSU{} Fan".format(self.index)
|
||||
|
||||
def get_presence(self):
|
||||
"""
|
||||
Retrieves the presence of the Fan Unit
|
||||
|
||||
Returns:
|
||||
bool: True if Fan is present, False if not
|
||||
"""
|
||||
#Fixed Fan's on 7215-IXS-A1, Always return True
|
||||
return True
|
||||
|
||||
def get_model(self):
|
||||
"""
|
||||
Retrieves the model number of the Fan
|
||||
|
||||
Returns:
|
||||
string: Model number of Fan. Use part number for this.
|
||||
"""
|
||||
return self.eeprom.part_number_str()
|
||||
|
||||
def get_serial(self):
|
||||
"""
|
||||
Retrieves the serial number of the Fan
|
||||
|
||||
Returns:
|
||||
string: Serial number of Fan
|
||||
"""
|
||||
return self.eeprom.serial_number_str()
|
||||
|
||||
def get_part_number(self):
|
||||
"""
|
||||
Retrieves the part number of the Fan
|
||||
|
||||
Returns:
|
||||
string: Part number of Fan
|
||||
"""
|
||||
return self.eeprom.part_number_str()
|
||||
|
||||
def get_service_tag(self):
|
||||
"""
|
||||
Retrieves the service tag of the Fan
|
||||
|
||||
Returns:
|
||||
string: Service Tag of Fan
|
||||
"""
|
||||
return self.eeprom.serial_str()
|
||||
|
||||
def get_status(self):
|
||||
"""
|
||||
Retrieves the operational status of the Fan
|
||||
|
||||
Returns:
|
||||
bool: True if Fan is operating properly, False if not
|
||||
"""
|
||||
status = False
|
||||
|
||||
fan_speed = self._read_sysfs_file(self.get_fan_speed_reg)
|
||||
if (fan_speed != 'ERR'):
|
||||
if (int(fan_speed) > WORKING_IXS7215_FAN_SPEED):
|
||||
status = True
|
||||
|
||||
return status
|
||||
|
||||
def get_direction(self):
|
||||
"""
|
||||
Retrieves the fan airflow direction
|
||||
Possible fan directions (relative to port-side of device)
|
||||
Returns:
|
||||
A string, either FAN_DIRECTION_INTAKE or
|
||||
FAN_DIRECTION_EXHAUST depending on fan direction
|
||||
"""
|
||||
|
||||
return 'intake'
|
||||
|
||||
def get_position_in_parent(self):
|
||||
"""
|
||||
Retrieves 1-based relative physical position in parent device
|
||||
Returns:
|
||||
integer: The 1-based relative physical position in parent device
|
||||
"""
|
||||
return self.index
|
||||
|
||||
def is_replaceable(self):
|
||||
"""
|
||||
Indicate whether this device is replaceable.
|
||||
Returns:
|
||||
bool: True if it is replaceable.
|
||||
"""
|
||||
return False
|
||||
|
||||
|
||||
def get_speed(self):
|
||||
"""
|
||||
Retrieves the speed of a Front FAN in the tray in revolutions per
|
||||
minute defined by 1-based index
|
||||
:param index: An integer, 1-based index of the FAN to query speed
|
||||
:return: integer, denoting front FAN speed
|
||||
"""
|
||||
speed = 0
|
||||
|
||||
fan_speed = self._read_sysfs_file(self.get_fan_speed_reg)
|
||||
if (fan_speed != 'ERR'):
|
||||
speed_in_rpm = int(fan_speed)
|
||||
else:
|
||||
speed_in_rpm = 0
|
||||
|
||||
speed = 100*speed_in_rpm//MAX_IXS7215_FAN_SPEED
|
||||
if speed > 100:
|
||||
speed = 100
|
||||
|
||||
return speed
|
||||
|
||||
def get_speed_tolerance(self):
|
||||
"""
|
||||
Retrieves the speed tolerance of the fan
|
||||
|
||||
Returns:
|
||||
An integer, the percentage of variance from target speed
|
||||
which is considered tolerable
|
||||
"""
|
||||
if self.get_presence():
|
||||
# The tolerance value is fixed as 25% for this platform
|
||||
tolerance = 25
|
||||
else:
|
||||
tolerance = 0
|
||||
|
||||
return tolerance
|
||||
|
||||
def set_speed(self, speed):
|
||||
"""
|
||||
Set fan speed to expected value
|
||||
Args:
|
||||
speed: An integer, the percentage of full fan speed to set
|
||||
fan to, in the range 0 (off) to 100 (full speed)
|
||||
Returns:
|
||||
bool: True if set success, False if fail.
|
||||
"""
|
||||
if self.is_psu_fan:
|
||||
return False
|
||||
|
||||
# Set current fan duty cycle
|
||||
# - 0x00 : fan off
|
||||
# - 0x40 : 25% duty cycle
|
||||
# - 0x80 : 50% duty cycle (default)
|
||||
# - 0xff : 100% duty cycle (full speed)
|
||||
if speed in range(0, 6):
|
||||
fandutycycle = 0x00
|
||||
elif speed in range(6, 41):
|
||||
fandutycycle = 64
|
||||
elif speed in range(41, 76):
|
||||
fandutycycle = 128
|
||||
elif speed in range(76, 101):
|
||||
fandutycycle = 255
|
||||
else:
|
||||
return False
|
||||
|
||||
rv = self._write_sysfs_file(self.set_fan_speed_reg, fandutycycle)
|
||||
if (rv != 'ERR'):
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
|
||||
def set_status_led(self, color):
|
||||
"""
|
||||
Set led to expected color
|
||||
Args:
|
||||
color: A string representing the color with which to set the
|
||||
fan module status LED
|
||||
Returns:
|
||||
bool: True if set success, False if fail.
|
||||
|
||||
off , red and green are the only settings 7215 fans
|
||||
"""
|
||||
# No Individual Status LED for 7215-IXS-A1
|
||||
return False
|
||||
|
||||
def get_status_led(self):
|
||||
"""
|
||||
Gets the state of the fan status LED
|
||||
|
||||
Returns:
|
||||
A string, one of the predefined STATUS_LED_COLOR_* strings.
|
||||
"""
|
||||
if self.get_status():
|
||||
return self.STATUS_LED_COLOR_GREEN
|
||||
else:
|
||||
return self.STATUS_LED_COLOR_OFF
|
||||
|
||||
def get_target_speed(self):
|
||||
"""
|
||||
Retrieves the target (expected) speed of the fan
|
||||
|
||||
Returns:
|
||||
An integer, the percentage of full fan speed, in the range 0
|
||||
(off) to 100 (full speed)
|
||||
"""
|
||||
speed = 0
|
||||
|
||||
fan_duty = self._read_sysfs_file(self.set_fan_speed_reg)
|
||||
if (fan_duty != 'ERR'):
|
||||
dutyspeed = int(fan_duty)
|
||||
if dutyspeed == 0:
|
||||
speed = 0
|
||||
elif dutyspeed == 64:
|
||||
speed = 25
|
||||
elif dutyspeed == 128:
|
||||
speed = 50
|
||||
elif dutyspeed == 255:
|
||||
speed = 100
|
||||
|
||||
return speed
|
@ -0,0 +1,102 @@
|
||||
#############################################################################
|
||||
# Nokia
|
||||
#
|
||||
# Module contains an implementation of SONiC Platform Base API and
|
||||
# provides the Fan Drawer status which is available in the platform
|
||||
#
|
||||
#############################################################################
|
||||
|
||||
try:
|
||||
from sonic_platform_base.fan_drawer_base import FanDrawerBase
|
||||
from sonic_py_common import logger
|
||||
except ImportError as e:
|
||||
raise ImportError(str(e) + "- required module not found")
|
||||
|
||||
sonic_logger = logger.Logger('fan_drawer')
|
||||
|
||||
class NokiaFanDrawer(FanDrawerBase):
|
||||
def __init__(self, index):
|
||||
super(NokiaFanDrawer, self).__init__()
|
||||
self._index = index + 1
|
||||
self._led = None
|
||||
|
||||
def get_index(self):
|
||||
return self._index
|
||||
|
||||
def get_presence(self):
|
||||
return self._fan_list[0].get_presence()
|
||||
|
||||
def get_model(self):
|
||||
"""
|
||||
Retrieves the model number of the Fan Drawer
|
||||
Returns:
|
||||
string: Part number of Fan Drawer
|
||||
"""
|
||||
return self._fan_list[0].get_model()
|
||||
|
||||
def get_serial(self):
|
||||
"""
|
||||
Retrieves the serial number of the Fan Drawer
|
||||
Returns:
|
||||
string: Serial number of Fan
|
||||
"""
|
||||
return self._fan_list[0].get_serial()
|
||||
|
||||
def get_status(self):
|
||||
"""
|
||||
Retrieves the operational status of the Fan Drawer
|
||||
Returns:
|
||||
bool: True if Fan is operating properly, False if not
|
||||
"""
|
||||
return self._fan_list[0].get_status()
|
||||
|
||||
def get_direction(self):
|
||||
return 'intake'
|
||||
|
||||
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[0].set_status_led(color)
|
||||
|
||||
def get_status_led(self):
|
||||
"""
|
||||
Gets the state of the fan drawer LED
|
||||
|
||||
Returns:
|
||||
A string, one of the predefined STATUS_LED_COLOR_* strings
|
||||
"""
|
||||
return self._fan_list[0].get_status_led()
|
||||
|
||||
def is_replaceable(self):
|
||||
"""
|
||||
Indicate whether this device is replaceable.
|
||||
Returns:
|
||||
bool: True if it is replaceable.
|
||||
"""
|
||||
return False
|
||||
|
||||
def get_position_in_parent(self):
|
||||
"""
|
||||
Retrieves 1-based relative physical position in parent device
|
||||
Returns:
|
||||
integer: The 1-based relative physical position in parent device
|
||||
"""
|
||||
return self._index
|
||||
|
||||
|
||||
# For Nokia platforms with fan drawer(s)
|
||||
class RealDrawer(NokiaFanDrawer):
|
||||
def __init__(self, index):
|
||||
super(RealDrawer, self).__init__(index)
|
||||
self._name = 'drawer{}'.format(self._index)
|
||||
|
||||
def get_name(self):
|
||||
return self._name
|
@ -0,0 +1,22 @@
|
||||
#############################################################################
|
||||
#
|
||||
# Module contains an implementation of SONiC Platform Base API and
|
||||
# provides the platform information
|
||||
#
|
||||
#############################################################################
|
||||
|
||||
try:
|
||||
from sonic_platform_base.platform_base import PlatformBase
|
||||
from sonic_platform.chassis import Chassis
|
||||
except ImportError as e:
|
||||
raise ImportError(str(e) + "- required module not found")
|
||||
|
||||
|
||||
class Platform(PlatformBase):
|
||||
"""
|
||||
Nokia platform-specific class
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
PlatformBase.__init__(self)
|
||||
self._chassis = Chassis()
|
@ -0,0 +1,297 @@
|
||||
########################################################################
|
||||
# Nokia IXS7215
|
||||
#
|
||||
# Module contains an implementation of SONiC Platform Base API and
|
||||
# provides the PSUs' information which are available in the platform
|
||||
#
|
||||
########################################################################
|
||||
|
||||
try:
|
||||
import os
|
||||
import time
|
||||
from sonic_platform_base.psu_base import PsuBase
|
||||
from sonic_py_common import logger
|
||||
from sonic_platform.eeprom import Eeprom
|
||||
from sonic_py_common.general import getstatusoutput_noshell
|
||||
except ImportError as e:
|
||||
raise ImportError(str(e) + "- required module not found")
|
||||
|
||||
sonic_logger = logger.Logger('psu')
|
||||
INA230_DIR = "/sys/bus/i2c/devices/0-0040/iio:device0/"
|
||||
CPLD_DIR = "/sys/bus/i2c/devices/0-0041/"
|
||||
|
||||
class Psu(PsuBase):
|
||||
"""Nokia platform-specific PSU class for 7215 """
|
||||
|
||||
def __init__(self, psu_index):
|
||||
PsuBase.__init__(self)
|
||||
# PSU is 1-based in Nokia platforms
|
||||
self.index = psu_index + 1
|
||||
self._fan_list = []
|
||||
|
||||
|
||||
# PSU eeprom
|
||||
self.eeprom = Eeprom(is_psu=True, psu_index=self.index)
|
||||
|
||||
def _read_sysfs_file(self, sysfs_file):
|
||||
# On successful read, returns the value read from given
|
||||
# reg_name and on failure returns 'ERR'
|
||||
rv = 'ERR'
|
||||
|
||||
if (not os.path.isfile(sysfs_file)):
|
||||
return rv
|
||||
try:
|
||||
with open(sysfs_file, 'r') as fd:
|
||||
rv = fd.read()
|
||||
except Exception as e:
|
||||
rv = 'ERR'
|
||||
|
||||
rv = rv.rstrip('\r\n')
|
||||
rv = rv.lstrip(" ")
|
||||
return rv
|
||||
|
||||
def _write_sysfs_file(self, sysfs_file, value):
|
||||
# On successful write, the value read will be written on
|
||||
# reg_name and on failure returns 'ERR'
|
||||
rv = 'ERR'
|
||||
|
||||
if (not os.path.isfile(sysfs_file)):
|
||||
return rv
|
||||
try:
|
||||
with open(sysfs_file, 'w') as fd:
|
||||
rv = fd.write(str(value))
|
||||
except Exception as e:
|
||||
rv = 'ERR'
|
||||
|
||||
# Ensure that the write operation has succeeded
|
||||
if ((self._read_sysfs_file(sysfs_file)) != value ):
|
||||
time.sleep(3)
|
||||
if ((self._read_sysfs_file(sysfs_file)) != value ):
|
||||
rv = 'ERR'
|
||||
|
||||
return rv
|
||||
|
||||
def _get_active_psus(self):
|
||||
"""
|
||||
Retrieves the operational status of the PSU and
|
||||
calculates number of active PSU's
|
||||
|
||||
Returns:
|
||||
Integer: Number of active PSU's
|
||||
"""
|
||||
active_psus = 0
|
||||
psu1_good = self._read_sysfs_file(CPLD_DIR+"psu1_power_good")
|
||||
psu2_good = self._read_sysfs_file(CPLD_DIR+"psu2_power_good")
|
||||
|
||||
active_psus = int(psu1_good) + int(psu2_good)
|
||||
|
||||
return active_psus
|
||||
|
||||
def get_name(self):
|
||||
"""
|
||||
Retrieves the name of the device
|
||||
|
||||
Returns:
|
||||
string: The name of the device
|
||||
"""
|
||||
return "PSU{}".format(self.index)
|
||||
|
||||
def get_presence(self):
|
||||
"""
|
||||
Retrieves the presence of the Power Supply Unit (PSU)
|
||||
|
||||
Returns:
|
||||
bool: True if PSU is present, False if not
|
||||
"""
|
||||
#Fixed PSU's on 7215-IXS-A1, Always return True
|
||||
|
||||
return True
|
||||
|
||||
def get_model(self):
|
||||
"""
|
||||
Retrieves the part number of the PSU
|
||||
|
||||
Returns:
|
||||
string: Part number of PSU
|
||||
"""
|
||||
return self.eeprom.modelstr()
|
||||
|
||||
def get_serial(self):
|
||||
"""
|
||||
Retrieves the serial number of the PSU
|
||||
|
||||
Returns:
|
||||
string: Serial number of PSU
|
||||
"""
|
||||
return self.eeprom.serial_number_str()
|
||||
|
||||
def get_revision(self):
|
||||
"""
|
||||
Retrieves the HW revision of the PSU
|
||||
|
||||
Returns:
|
||||
string: HW revision of PSU
|
||||
"""
|
||||
return self.eeprom.part_number_str()
|
||||
|
||||
def get_part_number(self):
|
||||
"""
|
||||
Retrieves the part number of the PSU
|
||||
|
||||
Returns:
|
||||
string: Part number of PSU
|
||||
"""
|
||||
return self.eeprom.part_number_str()
|
||||
|
||||
def get_status(self):
|
||||
"""
|
||||
Retrieves the operational status of the PSU
|
||||
|
||||
Returns:
|
||||
bool: True if PSU is operating properly, False if not
|
||||
"""
|
||||
psu_sysfs_str=CPLD_DIR+"psu{}_power_good".format(self.index)
|
||||
psu_status = self._read_sysfs_file(psu_sysfs_str)
|
||||
|
||||
if psu_status == '1':
|
||||
return True
|
||||
|
||||
return False
|
||||
|
||||
def get_voltage(self):
|
||||
"""
|
||||
Retrieves current PSU voltage output
|
||||
|
||||
Returns:
|
||||
A float number, the output voltage in volts,
|
||||
e.g. 12.1
|
||||
"""
|
||||
if(self.get_status()):
|
||||
psu_voltage = self._read_sysfs_file(INA230_DIR+"in_voltage1_scale")
|
||||
else:
|
||||
psu_voltage = 0.0
|
||||
|
||||
psu_voltage = float(psu_voltage)*10
|
||||
|
||||
return psu_voltage
|
||||
|
||||
def get_current(self):
|
||||
"""
|
||||
Retrieves present electric current supplied by PSU
|
||||
|
||||
Returns:
|
||||
A float number, the electric current in amperes, e.g 15.4
|
||||
"""
|
||||
num_psus = self._get_active_psus()
|
||||
if(self.get_status()):
|
||||
psu_current = self._read_sysfs_file(INA230_DIR+"in_current3_scale")
|
||||
psu_current = (float(psu_current)*10)/num_psus
|
||||
else:
|
||||
psu_current = 0.0
|
||||
|
||||
return psu_current
|
||||
|
||||
def get_power(self):
|
||||
"""
|
||||
Retrieves current energy supplied by PSU
|
||||
|
||||
Returns:
|
||||
A float number, the power in watts, e.g. 302.6
|
||||
"""
|
||||
psu_voltage = self.get_voltage()
|
||||
psu_current = self.get_current()
|
||||
psu_power = psu_voltage * psu_current
|
||||
|
||||
return psu_power
|
||||
|
||||
def get_position_in_parent(self):
|
||||
"""
|
||||
Retrieves 1-based relative physical position in parent device
|
||||
Returns:
|
||||
integer: The 1-based relative physical position in parent device
|
||||
"""
|
||||
return self.index
|
||||
|
||||
def is_replaceable(self):
|
||||
"""
|
||||
Indicate whether this device is replaceable.
|
||||
Returns:
|
||||
bool: True if it is replaceable.
|
||||
"""
|
||||
return False
|
||||
|
||||
def get_powergood_status(self):
|
||||
"""
|
||||
Retrieves the powergood status of PSU
|
||||
Returns:
|
||||
A boolean, True if PSU has stablized its output voltages and
|
||||
passed all its internal self-tests, False if not.
|
||||
"""
|
||||
psu_sysfs_str=CPLD_DIR+"psu{}_power_good".format(self.index)
|
||||
psu_pg_status = self._read_sysfs_file(psu_sysfs_str)
|
||||
|
||||
if psu_pg_status == '1':
|
||||
return True
|
||||
|
||||
return False
|
||||
|
||||
def get_status_led(self):
|
||||
"""
|
||||
Gets the state of the PSU status LED
|
||||
|
||||
Returns:
|
||||
A string, one of the predefined STATUS_LED_COLOR_* strings.
|
||||
"""
|
||||
if self.get_powergood_status():
|
||||
return self.STATUS_LED_COLOR_GREEN
|
||||
else:
|
||||
return self.STATUS_LED_COLOR_OFF
|
||||
|
||||
def set_status_led(self, color):
|
||||
"""
|
||||
Sets the state of the PSU status LED
|
||||
Args:
|
||||
color: A string representing the color with which to set the
|
||||
PSU status LED
|
||||
Returns:
|
||||
bool: True if status LED state is set successfully, False if
|
||||
not
|
||||
"""
|
||||
# No Individual Status LED for 7215-IXS-A1
|
||||
return False
|
||||
|
||||
def get_status_master_led(self):
|
||||
"""
|
||||
Gets the state of the front panel PSU status LED
|
||||
|
||||
Returns:
|
||||
A string, one of the predefined STATUS_LED_COLOR_* strings.
|
||||
"""
|
||||
psu_led = self._read_sysfs_file(CPLD_DIR+"psu_led")
|
||||
|
||||
if psu_led == "green":
|
||||
return self.STATUS_LED_COLOR_GREEN
|
||||
elif psu_led == "amber":
|
||||
return self.STATUS_LED_COLOR_AMBER
|
||||
else:
|
||||
return None
|
||||
|
||||
def set_status_master_led(self, color):
|
||||
"""
|
||||
Sets the state of the front panel PSU status LED
|
||||
|
||||
Returns:
|
||||
bool: True if status LED state is set successfully, False if
|
||||
not
|
||||
"""
|
||||
if color == self.STATUS_LED_COLOR_GREEN:
|
||||
status = self._write_sysfs_file(CPLD_DIR+"psu_led", "green")
|
||||
elif color == self.STATUS_LED_COLOR_AMBER:
|
||||
status = self._write_sysfs_file(CPLD_DIR+"psu_led", "amber")
|
||||
else:
|
||||
return False
|
||||
|
||||
if status == "ERR":
|
||||
return False
|
||||
|
||||
return True
|
@ -0,0 +1,218 @@
|
||||
# Name: sfp.py, version: 1.0
|
||||
#
|
||||
# Description: Module contains the definitions of SFP related APIs
|
||||
# for Nokia IXR 7250 platform.
|
||||
#
|
||||
# Copyright (c) 2023, Nokia
|
||||
# All rights reserved.
|
||||
#
|
||||
|
||||
try:
|
||||
from sonic_platform_base.sonic_xcvr.sfp_optoe_base import SfpOptoeBase
|
||||
from sonic_py_common.logger import Logger
|
||||
from sonic_py_common import device_info
|
||||
from sonic_py_common.general import getstatusoutput_noshell
|
||||
|
||||
except ImportError as e:
|
||||
raise ImportError(str(e) + "- required module not found")
|
||||
|
||||
import subprocess as cmd
|
||||
|
||||
smbus_present = 1
|
||||
|
||||
try:
|
||||
import smbus
|
||||
except ImportError as e:
|
||||
smbus_present = 0
|
||||
|
||||
COPPER_TYPE = "COPPER"
|
||||
SFP_TYPE = "SFP"
|
||||
|
||||
# SFP PORT numbers
|
||||
SFP_PORT_START = 49
|
||||
SFP_PORT_END = 52
|
||||
|
||||
logger = Logger()
|
||||
|
||||
class Sfp(SfpOptoeBase):
|
||||
"""
|
||||
Nokia IXR-7215 Platform-specific Sfp refactor class
|
||||
"""
|
||||
instances = []
|
||||
|
||||
# Paths
|
||||
PLATFORM_ROOT_PATH = "/usr/share/sonic/device"
|
||||
PMON_HWSKU_PATH = "/usr/share/sonic/hwsku"
|
||||
HOST_CHK_CMD = "docker > /dev/null 2>&1"
|
||||
|
||||
PLATFORM = "armhf-nokia_ixs7215_52x-r0"
|
||||
HWSKU = "Nokia-7215"
|
||||
|
||||
port_to_i2c_mapping = 0
|
||||
|
||||
# def __init__(self, index, sfp_type, stub):
|
||||
def __init__(self, index, sfp_type, eeprom_path, port_i2c_map):
|
||||
SfpOptoeBase.__init__(self)
|
||||
|
||||
self.index = index
|
||||
self.port_num = index
|
||||
self.sfp_type = sfp_type
|
||||
self.eeprom_path = eeprom_path
|
||||
self.port_to_i2c_mapping = port_i2c_map
|
||||
self.name = sfp_type + str(index-1)
|
||||
self.port_name = sfp_type + str(index)
|
||||
self.port_to_eeprom_mapping = {}
|
||||
|
||||
self.port_to_eeprom_mapping[index] = eeprom_path
|
||||
|
||||
self._version_info = device_info.get_sonic_version_info()
|
||||
self.lastPresence = False
|
||||
|
||||
logger.log_debug("Sfp __init__ index {} setting name to {} and eeprom_path to {}".format(index, self.name, self.eeprom_path))
|
||||
|
||||
Sfp.instances.append(self)
|
||||
|
||||
def get_eeprom_path(self):
|
||||
return self.eeprom_path
|
||||
|
||||
def get_presence(self):
|
||||
"""
|
||||
Retrieves the presence
|
||||
Returns:
|
||||
bool: True if is present, False if not
|
||||
"""
|
||||
if self.sfp_type == COPPER_TYPE:
|
||||
return False
|
||||
|
||||
if smbus_present == 0: # if called from sfputil outside of pmon
|
||||
# cmdstatus, sfpstatus = cmd.getstatusoutput('sudo i2cget -y 0 0x41 0x3')
|
||||
cmdstatus, sfpstatus = getstatusoutput_noshell(['sudo', 'i2cget', '-y', '0', '0x41', '0x3'])
|
||||
sfpstatus = int(sfpstatus, 16)
|
||||
else:
|
||||
bus = smbus.SMBus(0)
|
||||
DEVICE_ADDRESS = 0x41
|
||||
DEVICE_REG = 0x3
|
||||
sfpstatus = bus.read_byte_data(DEVICE_ADDRESS, DEVICE_REG)
|
||||
|
||||
pos = [1, 2, 4, 8]
|
||||
bit_pos = pos[self.index-SFP_PORT_START]
|
||||
sfpstatus = sfpstatus & (bit_pos)
|
||||
|
||||
if sfpstatus == 0:
|
||||
return True
|
||||
|
||||
return False
|
||||
|
||||
def get_name(self):
|
||||
"""
|
||||
Retrieves the name of the device
|
||||
Returns:
|
||||
string: The name of the device
|
||||
"""
|
||||
return self.name
|
||||
|
||||
def get_position_in_parent(self):
|
||||
"""
|
||||
Retrieves 1-based relative physical position in parent device.
|
||||
Returns:
|
||||
integer: The 1-based relative physical position in parent device or
|
||||
-1 if cannot determine the position
|
||||
"""
|
||||
return -1
|
||||
|
||||
def is_replaceable(self):
|
||||
"""
|
||||
Indicate whether this device is replaceable.
|
||||
Returns:
|
||||
bool: True if it is replaceable.
|
||||
"""
|
||||
|
||||
if self.sfp_type == "SFP":
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
|
||||
def _get_error_code(self):
|
||||
"""
|
||||
Get error code of the SFP module
|
||||
|
||||
Returns:
|
||||
The error code
|
||||
"""
|
||||
return NotImplementedError
|
||||
|
||||
def get_error_description(self):
|
||||
"""
|
||||
Get error description
|
||||
|
||||
Args:
|
||||
error_code: The error code returned by _get_error_code
|
||||
|
||||
Returns:
|
||||
The error description
|
||||
"""
|
||||
if not self.get_presence():
|
||||
error_description = self.SFP_STATUS_UNPLUGGED
|
||||
else:
|
||||
error_description = self.SFP_STATUS_OK
|
||||
|
||||
return error_description
|
||||
# return NotImplementedError
|
||||
|
||||
def get_reset_status(self):
|
||||
"""
|
||||
Retrieves the reset status of SFP
|
||||
Returns:
|
||||
A Boolean, True if reset enabled, False if disabled
|
||||
"""
|
||||
if self.sfp_type == COPPER_TYPE:
|
||||
return False
|
||||
if self.sfp_type == SFP_TYPE:
|
||||
return False
|
||||
|
||||
def get_status(self):
|
||||
"""
|
||||
Retrieves the operational status of the device
|
||||
"""
|
||||
reset = self.get_reset_status()
|
||||
|
||||
if reset is True:
|
||||
status = False
|
||||
else:
|
||||
status = True
|
||||
|
||||
return status
|
||||
|
||||
def reset(self):
|
||||
"""
|
||||
Reset SFP.
|
||||
Returns:
|
||||
A boolean, True if successful, False if not
|
||||
"""
|
||||
# RJ45 and SFP ports not resettable
|
||||
return False
|
||||
|
||||
def set_lpmode(self, lpmode):
|
||||
"""
|
||||
Sets the lpmode (low power mode) of SFP
|
||||
Args:
|
||||
lpmode: A Boolean, True to enable lpmode, False to disable it
|
||||
Note : lpmode can be overridden by set_power_override
|
||||
Returns:
|
||||
A boolean, True if lpmode is set successfully, False if not
|
||||
"""
|
||||
if self.sfp_type == COPPER_TYPE:
|
||||
return False
|
||||
if self.sfp_type == SFP_TYPE:
|
||||
return False
|
||||
|
||||
def get_lpmode(self):
|
||||
"""
|
||||
Retrieves the lpmode (low power mode) status of this SFP
|
||||
Returns:
|
||||
A Boolean, True if lpmode is enabled, False if disabled
|
||||
"""
|
||||
if self.sfp_type == COPPER_TYPE:
|
||||
return False
|
||||
if self.sfp_type == SFP_TYPE:
|
||||
return False
|
@ -0,0 +1,112 @@
|
||||
'''
|
||||
listen for the SFP change event and return to chassis.
|
||||
'''
|
||||
import time
|
||||
from sonic_py_common import logger
|
||||
from sonic_py_common.general import getstatusoutput_noshell
|
||||
|
||||
smbus_present = 1
|
||||
|
||||
try:
|
||||
import smbus
|
||||
except ImportError as e:
|
||||
smbus_present = 0
|
||||
|
||||
# system level event/error
|
||||
EVENT_ON_ALL_SFP = '-1'
|
||||
SYSTEM_NOT_READY = 'system_not_ready'
|
||||
SYSTEM_READY = 'system_become_ready'
|
||||
SYSTEM_FAIL = 'system_fail'
|
||||
|
||||
# SFP PORT numbers
|
||||
SFP_PORT_START = 49
|
||||
SFP_PORT_END = 52
|
||||
|
||||
SYSLOG_IDENTIFIER = "sfp_event"
|
||||
sonic_logger = logger.Logger(SYSLOG_IDENTIFIER)
|
||||
|
||||
|
||||
class sfp_event:
|
||||
''' Listen to plugin/plugout cable events '''
|
||||
|
||||
def __init__(self):
|
||||
self.handle = None
|
||||
|
||||
def initialize(self):
|
||||
self.modprs_register = 0
|
||||
# Get Transceiver status
|
||||
time.sleep(5)
|
||||
self.modprs_register = self._get_transceiver_status()
|
||||
sonic_logger.log_info("Initial SFP presence=%d" % self.modprs_register)
|
||||
|
||||
def deinitialize(self):
|
||||
if self.handle is None:
|
||||
return
|
||||
|
||||
def _get_transceiver_status(self):
|
||||
if smbus_present == 0:
|
||||
sonic_logger.log_info(" PMON - smbus ERROR - DEBUG sfp_event ")
|
||||
cmdstatus, sfpstatus = getstatusoutput_noshell(['sudo', 'i2cget', '-y', '0', '0x41', '0x3'])
|
||||
sfpstatus = int(sfpstatus, 16)
|
||||
else:
|
||||
bus = smbus.SMBus(0)
|
||||
DEVICE_ADDRESS = 0x41
|
||||
DEVICE_REG = 0x3
|
||||
sfpstatus = bus.read_byte_data(DEVICE_ADDRESS, DEVICE_REG)
|
||||
|
||||
sfpstatus = ~sfpstatus
|
||||
sfpstatus = sfpstatus & 0xF
|
||||
|
||||
return sfpstatus
|
||||
|
||||
def check_sfp_status(self, port_change, timeout):
|
||||
"""
|
||||
check_sfp_status called from get_change_event, this will return correct
|
||||
status of all 4 SFP ports if there is a change in any of them
|
||||
"""
|
||||
start_time = time.time()
|
||||
port = SFP_PORT_START
|
||||
forever = False
|
||||
|
||||
if timeout == 0:
|
||||
forever = True
|
||||
elif timeout > 0:
|
||||
timeout = timeout / float(1000) # Convert to secs
|
||||
else:
|
||||
return False, {}
|
||||
end_time = start_time + timeout
|
||||
|
||||
if (start_time > end_time):
|
||||
return False, {} # Time wrap or possibly incorrect timeout
|
||||
|
||||
while (timeout >= 0):
|
||||
# Check for OIR events and return updated port_change
|
||||
reg_value = self._get_transceiver_status()
|
||||
if (reg_value != self.modprs_register):
|
||||
changed_ports = (self.modprs_register ^ reg_value)
|
||||
while (port >= SFP_PORT_START and port <= SFP_PORT_END):
|
||||
# Mask off the bit corresponding to our port
|
||||
mask = (1 << port-SFP_PORT_START)
|
||||
if (changed_ports & mask):
|
||||
# ModPrsL is active high
|
||||
if reg_value & mask == 0:
|
||||
port_change[port] = '0'
|
||||
else:
|
||||
port_change[port] = '1'
|
||||
port += 1
|
||||
|
||||
# Update reg value
|
||||
self.modprs_register = reg_value
|
||||
return True, port_change
|
||||
|
||||
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, {}
|
||||
return False, {}
|
@ -0,0 +1 @@
|
||||
This directory contains unit tests of the Platform API 2.0
|
@ -0,0 +1,72 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
try:
|
||||
import sonic_platform.platform
|
||||
import sonic_platform.chassis
|
||||
except ImportError as e:
|
||||
raise ImportError(str(e) + "- required module not found")
|
||||
|
||||
|
||||
def main():
|
||||
print("-----------------")
|
||||
print("Chassis Unit Test")
|
||||
print("-----------------")
|
||||
|
||||
chassis = sonic_platform.platform.Platform().get_chassis()
|
||||
print(" Chassis name: {}".format(chassis.get_name()))
|
||||
|
||||
print(" Chassis presence: {}".format(chassis.get_presence()))
|
||||
|
||||
print(" Chassis model: {}".format(chassis.get_model()))
|
||||
|
||||
print(" Chassis serial: {}".format(chassis.get_serial()))
|
||||
|
||||
print(" Chassis revision: {}".format(chassis.get_revision()))
|
||||
|
||||
print(" Chassis status: {}".format(chassis.get_status()))
|
||||
|
||||
print(" Chassis base_mac: {}".format(chassis.get_base_mac()))
|
||||
|
||||
print(" Chassis reboot cause: {}\n".format(chassis.get_reboot_cause()))
|
||||
|
||||
print(" Chassis watchdog: {}".format(chassis.get_watchdog()))
|
||||
|
||||
print(" Chassis num_components: {}".format(chassis.get_num_components()))
|
||||
|
||||
print(" Chassis all_components: {}\n".format(chassis.get_all_components()))
|
||||
|
||||
print(" Chassis num_modules: {}".format(chassis.get_num_modules()))
|
||||
|
||||
print(" Chassis all_modules: {}\n".format(chassis.get_all_modules()))
|
||||
|
||||
print(" Chassis num_fans: {}".format(chassis.get_num_fans()))
|
||||
|
||||
print(" Chassis all_fans: {}\n".format(chassis.get_all_fans()))
|
||||
|
||||
print(" Chassis num_psus: {}".format(chassis.get_num_psus()))
|
||||
|
||||
print(" Chassis all_psus: {}\n".format(chassis.get_all_psus()))
|
||||
|
||||
print(" Chassis num_thermals: {}".format(chassis.get_num_thermals()))
|
||||
|
||||
print(" Chassis all_thermals: {}\n".format(chassis.get_all_thermals()))
|
||||
|
||||
print(" Chassis num_sfps: {}".format(chassis.get_num_sfps()))
|
||||
|
||||
print(" Chassis all_sfps: {}\n".format(chassis.get_all_sfps()))
|
||||
|
||||
print(" Chassis eeprom: {}".format(chassis.get_eeprom()))
|
||||
|
||||
print(" Chassis system_eeprom_info: {}\n".format(chassis.get_system_eeprom_info()))
|
||||
|
||||
print(" Chassis get_status_led start : {}\n".format(chassis.get_status_led()))
|
||||
chassis.set_status_led('amber')
|
||||
print(" Chassis get_status_led amber: {}\n".format(chassis.get_status_led()))
|
||||
chassis.set_status_led('green')
|
||||
print(" Chassis get_status_led green: {}\n".format(chassis.get_status_led()))
|
||||
|
||||
return
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
@ -0,0 +1,22 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
from sonic_platform.chassis import Chassis
|
||||
|
||||
|
||||
def main():
|
||||
print("---------------------------")
|
||||
print("Chassis Component Unit Test")
|
||||
print("---------------------------")
|
||||
|
||||
chassis = Chassis()
|
||||
|
||||
for component in chassis.get_all_components():
|
||||
print(" Name: {}".format(component.get_name()))
|
||||
print(" Description: {}".format(component.get_description()))
|
||||
print(" FW version: {}\n".format(component.get_firmware_version()))
|
||||
|
||||
return
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
@ -0,0 +1,25 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
from sonic_platform.chassis import Chassis
|
||||
|
||||
|
||||
def main():
|
||||
print("------------------------")
|
||||
print("Chassis eeprom Unit Test")
|
||||
print("------------------------")
|
||||
|
||||
chassis = Chassis()
|
||||
|
||||
eeprom = chassis.get_eeprom()
|
||||
|
||||
print(" Model: {}, Service Tag: {}".format(eeprom.modelstr(),
|
||||
eeprom.serial_str()))
|
||||
print(" Part#: {}, Serial#: {}".format(eeprom.part_number_str(),
|
||||
eeprom.serial_number_str()))
|
||||
print(" Base MAC: {}".format(eeprom.base_mac_addr()))
|
||||
|
||||
return
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
@ -0,0 +1,32 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
from sonic_platform.chassis import Chassis
|
||||
|
||||
|
||||
def main():
|
||||
print("---------------------")
|
||||
print("Chassis Fan Unit Test")
|
||||
print("---------------------")
|
||||
|
||||
chassis = Chassis()
|
||||
|
||||
for fan in chassis.get_all_fans():
|
||||
if not fan.get_presence():
|
||||
print(" Name: {} not present".format(fan.get_name()))
|
||||
else:
|
||||
print(" Name:", fan.get_name())
|
||||
print(" Presence: {}, Status: {}, LED: {}".format(fan.get_presence(),
|
||||
fan.get_status(),
|
||||
fan.get_status_led()))
|
||||
print(" Model: {}, Serial#: {}".format(fan.get_model(),
|
||||
fan.get_serial()))
|
||||
print(" Part#: {}, Service Tag: {}".format(fan.get_part_number(),
|
||||
fan.get_service_tag()))
|
||||
print(" Direction: {}, Speed: {}%, Target Speed: {}%\n".format(fan.get_direction(),
|
||||
str(fan.get_speed()),
|
||||
str(fan.get_target_speed())))
|
||||
return
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
@ -0,0 +1,40 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
from sonic_platform.chassis import Chassis
|
||||
|
||||
|
||||
def main():
|
||||
print("---------------------")
|
||||
print("Chassis PSU Unit Test")
|
||||
print("---------------------")
|
||||
|
||||
chassis = Chassis()
|
||||
|
||||
for psu in chassis.get_all_psus():
|
||||
if not psu.get_presence():
|
||||
print(" Name: {} not present".format(psu.get_name()))
|
||||
else:
|
||||
print(" Name:", psu.get_name())
|
||||
print(" Presence: {}, Status: {}, LED: {}".format(psu.get_presence(),
|
||||
psu.get_status(),
|
||||
psu.get_status_led()))
|
||||
print(" Model: {}, Serial#: {}, Part#: {}".format(psu.get_model(),
|
||||
psu.get_serial(),
|
||||
psu.get_part_number()))
|
||||
try:
|
||||
current = psu.get_current()
|
||||
except NotImplementedError:
|
||||
current = "NA"
|
||||
try:
|
||||
power = psu.get_power()
|
||||
except NotImplementedError:
|
||||
power = "NA"
|
||||
|
||||
print(" Voltage: {}, Current: {}, Power: {}\n".format(psu.get_voltage(),
|
||||
current,
|
||||
power))
|
||||
return
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
@ -0,0 +1,56 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
try:
|
||||
from sonic_platform.chassis import Chassis
|
||||
except ImportError as e:
|
||||
raise ImportError(str(e) + "- required module not found")
|
||||
|
||||
|
||||
def main():
|
||||
print("---------------------")
|
||||
print("Chassis SFP Unit Test")
|
||||
print("---------------------")
|
||||
|
||||
chassis = Chassis()
|
||||
|
||||
PORT_START = 1
|
||||
PORT_END = 52
|
||||
|
||||
for physical_port in range(PORT_START, PORT_END+1):
|
||||
print(" ")
|
||||
print(" SFP transceiver tests PORT = ", physical_port)
|
||||
name = chassis.get_sfp(physical_port).get_name()
|
||||
print(" SFP transceiver tests NAME = ", name)
|
||||
|
||||
presence = chassis.get_sfp(physical_port).get_presence()
|
||||
print("TEST 1 - sfp presence [ True ] ", physical_port, presence)
|
||||
|
||||
status = chassis.get_sfp(physical_port).get_reset_status()
|
||||
print("TEST 2 - sfp reset status [ False ] ", physical_port, status)
|
||||
|
||||
txdisable = chassis.get_sfp(physical_port).get_tx_disable()
|
||||
print("TEST 3 - sfp tx_disable [ False ] ", physical_port, txdisable)
|
||||
|
||||
rxlos = chassis.get_sfp(physical_port).get_rx_los()
|
||||
print("TEST 4 - sfp status rxlos [ False ] ", physical_port, rxlos)
|
||||
|
||||
txfault = chassis.get_sfp(physical_port).get_tx_fault()
|
||||
print("TEST 5 - sfp status txfault [ False ] ", physical_port, txfault)
|
||||
|
||||
lpmode = chassis.get_sfp(physical_port).get_lpmode()
|
||||
print("TEST 6 - sfp enable lpmode [ False ] ", physical_port, lpmode)
|
||||
|
||||
trans_info = chassis.get_sfp(physical_port).get_transceiver_info()
|
||||
print("TEST 7 - sfp transceiver info for port:", physical_port, trans_info)
|
||||
|
||||
trans_status = chassis.get_sfp(physical_port).get_transceiver_bulk_status()
|
||||
print("TEST 8 - sfp bulk status for port:", physical_port, trans_status)
|
||||
|
||||
threshold = chassis.get_sfp(physical_port).get_transceiver_threshold_info()
|
||||
print("TEST 9 - sfp bulk status for port:", physical_port, threshold)
|
||||
|
||||
return
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
@ -0,0 +1,50 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
from sonic_platform.chassis import Chassis
|
||||
|
||||
def main():
|
||||
print("-------------------------")
|
||||
print("Chassis Thermal Unit Test")
|
||||
print("-------------------------")
|
||||
|
||||
chassis = Chassis()
|
||||
|
||||
for thermal in chassis.get_all_thermals():
|
||||
if not thermal.get_presence():
|
||||
print(" Name: {} not present".format(thermal.get_name()))
|
||||
else:
|
||||
print(" Name:", thermal.get_name())
|
||||
print(" Presence: {}, Status: {}".format(thermal.get_presence(),
|
||||
thermal.get_status()))
|
||||
print(" Model: {}, Serial#: {}".format(thermal.get_model(),
|
||||
thermal.get_serial()))
|
||||
print(" Temperature(C): {}".format(thermal.get_temperature()))
|
||||
|
||||
try:
|
||||
low_thresh = thermal.get_low_threshold()
|
||||
except NotImplementedError:
|
||||
low_thresh = "NA"
|
||||
try:
|
||||
high_thresh = thermal.get_high_threshold()
|
||||
except NotImplementedError:
|
||||
high_thresh = "NA"
|
||||
|
||||
print(" Low Threshold(C): {}, High Threshold(C): {}".format(low_thresh,
|
||||
high_thresh))
|
||||
|
||||
try:
|
||||
crit_low_thresh = thermal.get_low_critical_threshold()
|
||||
except NotImplementedError:
|
||||
crit_low_thresh = "NA"
|
||||
try:
|
||||
crit_high_thresh = thermal.get_high_critical_threshold()
|
||||
except NotImplementedError:
|
||||
crit_high_thresh = "NA"
|
||||
|
||||
print(" Crit Low Threshold(C): {}, Crit High Threshold(C): {}\n".format(crit_low_thresh,
|
||||
crit_high_thresh))
|
||||
return
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
@ -0,0 +1,22 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
from sonic_platform.chassis import Chassis
|
||||
|
||||
|
||||
def main():
|
||||
print("---------------------")
|
||||
print("Chassis Watchdog Test")
|
||||
print("---------------------")
|
||||
|
||||
chassis = Chassis()
|
||||
|
||||
watchdog = chassis.get_watchdog()
|
||||
|
||||
print(" Armed: {}".format(watchdog.is_armed()))
|
||||
print(" Time Left: {}".format(watchdog.get_remaining_time()))
|
||||
|
||||
return
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
@ -0,0 +1,244 @@
|
||||
########################################################################
|
||||
# Nokia IXS7215-A1
|
||||
#
|
||||
# Module contains an implementation of SONiC Platform Base API and
|
||||
# provides the Thermals' information which are available in the platform
|
||||
#
|
||||
########################################################################
|
||||
|
||||
|
||||
try:
|
||||
import os
|
||||
from sonic_platform_base.thermal_base import ThermalBase
|
||||
from sonic_py_common import logger
|
||||
except ImportError as e:
|
||||
raise ImportError(str(e) + "- required module not found")
|
||||
|
||||
sonic_logger = logger.Logger('thermal')
|
||||
|
||||
class Thermal(ThermalBase):
|
||||
"""Nokia platform-specific Thermal class"""
|
||||
|
||||
I2C_CLASS_DIR = "/sys/class/i2c-adapter/"
|
||||
I2C_DEV_MAPPING = (['i2c-0/0-0048/hwmon/', 1],
|
||||
['i2c-0/0-0049/hwmon/', 1])
|
||||
|
||||
HWMON_CLASS_DIR = "/sys/class/hwmon/hwmon0/"
|
||||
|
||||
THERMAL_NAME = ("PCB BACK", "PCB FRONT", "CPU Core")
|
||||
|
||||
def __init__(self, thermal_index):
|
||||
ThermalBase.__init__(self)
|
||||
self.index = thermal_index + 1
|
||||
self.is_psu_thermal = False
|
||||
self.dependency = None
|
||||
self._minimum = None
|
||||
self._maximum = None
|
||||
self.thermal_high_threshold_file = None
|
||||
# PCB temperature sensors
|
||||
if self.index < 3:
|
||||
i2c_path = self.I2C_CLASS_DIR + self.I2C_DEV_MAPPING[self.index - 1][0]
|
||||
sensor_index = self.I2C_DEV_MAPPING[self.index - 1][1]
|
||||
sensor_high_suffix = None
|
||||
sensor_high_crit_suffix = "max"
|
||||
hwmon_node = os.listdir(i2c_path)[0]
|
||||
self.SENSOR_DIR = i2c_path + hwmon_node + '/'
|
||||
|
||||
# SOC temperature sensor
|
||||
else:
|
||||
dev_path = self.HWMON_CLASS_DIR
|
||||
sensor_index = 1
|
||||
sensor_high_suffix = None
|
||||
sensor_high_crit_suffix = "crit"
|
||||
self.SENSOR_DIR = dev_path
|
||||
|
||||
# sysfs file for current temperature value
|
||||
self.thermal_temperature_file = self.SENSOR_DIR \
|
||||
+ "temp{}_input".format(sensor_index)
|
||||
|
||||
# sysfs file for high threshold value if supported for this sensor
|
||||
if sensor_high_suffix:
|
||||
self.thermal_high_threshold_file = self.SENSOR_DIR \
|
||||
+ "temp{}_{}".format(sensor_index, sensor_high_suffix)
|
||||
else:
|
||||
self.thermal_high_threshold_file = None
|
||||
|
||||
# sysfs file for crit high threshold value if supported for this sensor
|
||||
if sensor_high_crit_suffix:
|
||||
self.thermal_high_crit_threshold_file = self.SENSOR_DIR \
|
||||
+ "temp{}_{}".format(sensor_index, sensor_high_crit_suffix)
|
||||
else:
|
||||
self.thermal_high_crit_threshold_file = None
|
||||
|
||||
def _read_sysfs_file(self, sysfs_file):
|
||||
# On successful read, returns the value read from given
|
||||
# sysfs_file and on failure returns 'ERR'
|
||||
rv = 'ERR'
|
||||
|
||||
if (not os.path.isfile(sysfs_file)):
|
||||
return rv
|
||||
|
||||
try:
|
||||
with open(sysfs_file, 'r') as fd:
|
||||
rv = fd.read()
|
||||
except Exception as e:
|
||||
rv = 'ERR'
|
||||
|
||||
rv = rv.rstrip('\r\n')
|
||||
rv = rv.lstrip(" ")
|
||||
return rv
|
||||
|
||||
def get_name(self):
|
||||
"""
|
||||
Retrieves the name of the thermal
|
||||
|
||||
Returns:
|
||||
string: The name of the thermal
|
||||
"""
|
||||
return self.THERMAL_NAME[self.index - 1]
|
||||
|
||||
def get_presence(self):
|
||||
"""
|
||||
Retrieves the presence of the thermal
|
||||
|
||||
Returns:
|
||||
bool: True if thermal is present, False if not
|
||||
"""
|
||||
if self.dependency:
|
||||
return self.dependency.get_presence()
|
||||
else:
|
||||
return True
|
||||
|
||||
def get_model(self):
|
||||
"""
|
||||
Retrieves the model number (or part number) of the Thermal
|
||||
|
||||
Returns:
|
||||
string: Model/part number of Thermal
|
||||
"""
|
||||
return 'NA'
|
||||
|
||||
def get_serial(self):
|
||||
"""
|
||||
Retrieves the serial number of the Thermal
|
||||
|
||||
Returns:
|
||||
string: Serial number of Thermal
|
||||
"""
|
||||
return 'NA'
|
||||
|
||||
def get_status(self):
|
||||
"""
|
||||
Retrieves the operational status of the thermal
|
||||
|
||||
Returns:
|
||||
A boolean value, True if thermal is operating properly,
|
||||
False if not
|
||||
"""
|
||||
if self.dependency:
|
||||
return self.dependency.get_status()
|
||||
else:
|
||||
return True
|
||||
|
||||
def get_temperature(self):
|
||||
"""
|
||||
Retrieves current temperature reading from thermal
|
||||
|
||||
Returns:
|
||||
A float number of current temperature in Celsius up to
|
||||
nearest thousandth of one degree Celsius, e.g. 30.125
|
||||
"""
|
||||
thermal_temperature = self._read_sysfs_file(
|
||||
self.thermal_temperature_file)
|
||||
if (thermal_temperature != 'ERR'):
|
||||
thermal_temperature = float(thermal_temperature) / 1000
|
||||
if self._minimum is None or self._minimum > thermal_temperature:
|
||||
self._minimum = thermal_temperature
|
||||
if self._maximum is None or self._maximum < thermal_temperature:
|
||||
self._maximum = thermal_temperature
|
||||
else:
|
||||
thermal_temperature = 0
|
||||
|
||||
return float("{:.3f}".format(thermal_temperature))
|
||||
|
||||
def get_high_threshold(self):
|
||||
"""
|
||||
Retrieves the high threshold temperature of thermal
|
||||
|
||||
Returns:
|
||||
A float number, the high threshold temperature of thermal in
|
||||
Celsius up to nearest thousandth of one degree Celsius,
|
||||
e.g. 30.125
|
||||
"""
|
||||
# Not implemented for this sensor
|
||||
if not self.thermal_high_threshold_file:
|
||||
raise NotImplementedError
|
||||
|
||||
thermal_high_threshold = self._read_sysfs_file(
|
||||
self.thermal_high_threshold_file)
|
||||
if (thermal_high_threshold != 'ERR'):
|
||||
thermal_high_threshold = float(thermal_high_threshold) / 1000
|
||||
else:
|
||||
thermal_high_threshold = 0.0
|
||||
|
||||
return float("{:.3f}".format(thermal_high_threshold))
|
||||
|
||||
def set_high_threshold(self, temperature):
|
||||
"""
|
||||
Sets the high threshold temperature of thermal
|
||||
|
||||
Args :
|
||||
temperature: A float number up to nearest thousandth of one
|
||||
degree Celsius, e.g. 30.125
|
||||
Returns:
|
||||
A boolean, True if threshold is set successfully, False if
|
||||
not
|
||||
"""
|
||||
# Thermal threshold values are pre-defined based on HW.
|
||||
return False
|
||||
|
||||
def get_high_critical_threshold(self):
|
||||
"""
|
||||
Retrieves the high critical threshold temperature of thermal
|
||||
|
||||
Returns:
|
||||
A float number, the high critical threshold temperature of thermal in Celsius
|
||||
up to nearest thousandth of one degree Celsius, e.g. 30.125
|
||||
"""
|
||||
|
||||
# Not implemented for this sensor
|
||||
if not self.thermal_high_crit_threshold_file:
|
||||
raise NotImplementedError
|
||||
|
||||
thermal_high_crit_threshold = self._read_sysfs_file(
|
||||
self.thermal_high_crit_threshold_file)
|
||||
if (thermal_high_crit_threshold != 'ERR'):
|
||||
thermal_high_crit_threshold = float(thermal_high_crit_threshold) / 1000
|
||||
else:
|
||||
thermal_high_crit_threshold = 0.0
|
||||
|
||||
return float("{:.3f}".format(thermal_high_crit_threshold))
|
||||
|
||||
def get_minimum_recorded(self):
|
||||
self.get_temperature()
|
||||
return self._minimum
|
||||
|
||||
def get_maximum_recorded(self):
|
||||
self.get_temperature()
|
||||
return self._maximum
|
||||
|
||||
def get_position_in_parent(self):
|
||||
"""
|
||||
Retrieves 1-based relative physical position in parent device
|
||||
Returns:
|
||||
integer: The 1-based relative physical position in parent device
|
||||
"""
|
||||
return self.index
|
||||
|
||||
def is_replaceable(self):
|
||||
"""
|
||||
Indicate whether this device is replaceable.
|
||||
Returns:
|
||||
bool: True if it is replaceable.
|
||||
"""
|
||||
return False
|
@ -0,0 +1,192 @@
|
||||
from sonic_platform_base.sonic_thermal_control.thermal_action_base import ThermalPolicyActionBase
|
||||
from sonic_platform_base.sonic_thermal_control.thermal_json_object import thermal_json_object
|
||||
|
||||
from sonic_py_common import logger
|
||||
|
||||
sonic_logger = logger.Logger('thermal_actions')
|
||||
|
||||
|
||||
class SetFanSpeedAction(ThermalPolicyActionBase):
|
||||
"""
|
||||
Base thermal action class to set speed for fans
|
||||
"""
|
||||
# JSON field definition
|
||||
JSON_FIELD_SPEED = 'speed'
|
||||
JSON_FIELD_DEFAULT_SPEED = 'default_speed'
|
||||
JSON_FIELD_HIGHTEMP_SPEED = 'hightemp_speed'
|
||||
|
||||
def __init__(self):
|
||||
"""
|
||||
Constructor of SetFanSpeedAction
|
||||
"""
|
||||
self.default_speed = 50
|
||||
self.hightemp_speed = 100
|
||||
self.speed = self.default_speed
|
||||
|
||||
def load_from_json(self, json_obj):
|
||||
"""
|
||||
Construct SetFanSpeedAction via JSON. JSON example:
|
||||
{
|
||||
"type": "fan.all.set_speed"
|
||||
"speed": "100"
|
||||
}
|
||||
:param json_obj: A JSON object representing a SetFanSpeedAction action.
|
||||
:return:
|
||||
"""
|
||||
if SetFanSpeedAction.JSON_FIELD_SPEED in json_obj:
|
||||
speed = float(json_obj[SetFanSpeedAction.JSON_FIELD_SPEED])
|
||||
if speed < 0 or speed > 100:
|
||||
raise ValueError('SetFanSpeedAction invalid speed value {} in JSON policy file, valid value should be [0, 100]'.
|
||||
format(speed))
|
||||
self.speed = float(json_obj[SetFanSpeedAction.JSON_FIELD_SPEED])
|
||||
else:
|
||||
raise ValueError('SetFanSpeedAction missing mandatory field {} in JSON policy file'.
|
||||
format(SetFanSpeedAction.JSON_FIELD_SPEED))
|
||||
|
||||
@classmethod
|
||||
def set_all_fan_speed(cls, thermal_info_dict, speed):
|
||||
from .thermal_infos import FanInfo
|
||||
if FanInfo.INFO_NAME in thermal_info_dict and isinstance(thermal_info_dict[FanInfo.INFO_NAME], FanInfo):
|
||||
fan_info_obj = thermal_info_dict[FanInfo.INFO_NAME]
|
||||
for fan in fan_info_obj.get_presence_fans():
|
||||
fan.set_speed(int(speed))
|
||||
|
||||
|
||||
@thermal_json_object('fan.all.set_speed')
|
||||
class SetAllFanSpeedAction(SetFanSpeedAction):
|
||||
"""
|
||||
Action to set speed for all fans
|
||||
"""
|
||||
def execute(self, thermal_info_dict):
|
||||
"""
|
||||
Set speed for all fans
|
||||
:param thermal_info_dict: A dictionary stores all thermal information.
|
||||
:return:
|
||||
"""
|
||||
SetAllFanSpeedAction.set_all_fan_speed(thermal_info_dict, self.speed)
|
||||
|
||||
|
||||
@thermal_json_object('thermal.temp_check_and_set_all_fan_speed')
|
||||
class ThermalRecoverAction(SetFanSpeedAction):
|
||||
"""
|
||||
Action to check thermal sensor temperature change status and set speed for all fans
|
||||
"""
|
||||
|
||||
def load_from_json(self, json_obj):
|
||||
"""
|
||||
Construct ThermalRecoverAction via JSON. JSON example:
|
||||
{
|
||||
"type": "thermal.temp_check_and_set_all_fan_speed"
|
||||
"default_speed": "50"
|
||||
"hightemp_speed": "100"
|
||||
}
|
||||
:param json_obj: A JSON object representing a ThermalRecoverAction action.
|
||||
:return:
|
||||
"""
|
||||
if SetFanSpeedAction.JSON_FIELD_DEFAULT_SPEED in json_obj:
|
||||
default_speed = float(json_obj[SetFanSpeedAction.JSON_FIELD_DEFAULT_SPEED])
|
||||
if default_speed < 0 or default_speed > 100:
|
||||
raise ValueError('SetFanSpeedAction invalid default speed value {} in JSON policy file, valid value should be [0, 100]'.
|
||||
format(default_speed))
|
||||
self.default_speed = float(json_obj[SetFanSpeedAction.JSON_FIELD_DEFAULT_SPEED])
|
||||
else:
|
||||
raise ValueError('SetFanSpeedAction missing mandatory field {} in JSON policy file'.
|
||||
format(SetFanSpeedAction.JSON_FIELD_DEFAULT_SPEED))
|
||||
|
||||
if SetFanSpeedAction.JSON_FIELD_HIGHTEMP_SPEED in json_obj:
|
||||
hightemp_speed = float(json_obj[SetFanSpeedAction.JSON_FIELD_HIGHTEMP_SPEED])
|
||||
if hightemp_speed < 0 or hightemp_speed > 100:
|
||||
raise ValueError('SetFanSpeedAction invalid hightemp speed value {} in JSON policy file, valid value should be [0, 100]'.
|
||||
format(hightemp_speed))
|
||||
self.hightemp_speed = float(json_obj[SetFanSpeedAction.JSON_FIELD_HIGHTEMP_SPEED])
|
||||
else:
|
||||
raise ValueError('SetFanSpeedAction missing mandatory field {} in JSON policy file'.
|
||||
format(SetFanSpeedAction.JSON_FIELD_HIGHTEMP_SPEED))
|
||||
|
||||
sonic_logger.log_warning("ThermalRecoverAction: default: {}, hightemp: {}".format(self.default_speed, self.hightemp_speed))
|
||||
|
||||
def execute(self, thermal_info_dict):
|
||||
"""
|
||||
Check check thermal sensor temperature change status and set speed for all fans
|
||||
:param thermal_info_dict: A dictionary stores all thermal information.
|
||||
:return:
|
||||
"""
|
||||
from .thermal_infos import ThermalInfo
|
||||
if ThermalInfo.INFO_NAME in thermal_info_dict and \
|
||||
isinstance(thermal_info_dict[ThermalInfo.INFO_NAME], ThermalInfo):
|
||||
|
||||
thermal_info_obj = thermal_info_dict[ThermalInfo.INFO_NAME]
|
||||
if thermal_info_obj.is_warm_up_and_over_high_threshold():
|
||||
ThermalRecoverAction.set_all_fan_speed(thermal_info_dict, self.hightemp_speed)
|
||||
elif thermal_info_obj.is_cool_down_and_below_low_threshold():
|
||||
ThermalRecoverAction.set_all_fan_speed(thermal_info_dict, self.default_speed)
|
||||
|
||||
|
||||
@thermal_json_object('switch.shutdown')
|
||||
class SwitchPolicyAction(ThermalPolicyActionBase):
|
||||
"""
|
||||
Base class for thermal action. Once all thermal conditions in a thermal policy are matched,
|
||||
all predefined thermal action will be executed.
|
||||
"""
|
||||
def execute(self, thermal_info_dict):
|
||||
"""
|
||||
Take action when thermal condition matches. For example, adjust speed of fan or shut
|
||||
down the switch.
|
||||
:param thermal_info_dict: A dictionary stores all thermal information.
|
||||
:return:
|
||||
"""
|
||||
sonic_logger.log_warning("Alarm for temperature critical is detected, reboot Device")
|
||||
# import os
|
||||
# os.system('reboot')
|
||||
|
||||
|
||||
@thermal_json_object('thermal_control.control')
|
||||
class ControlThermalAlgoAction(ThermalPolicyActionBase):
|
||||
"""
|
||||
Action to control the thermal control algorithm
|
||||
"""
|
||||
# JSON field definition
|
||||
JSON_FIELD_STATUS = 'status'
|
||||
|
||||
def __init__(self):
|
||||
self.status = True
|
||||
|
||||
def load_from_json(self, json_obj):
|
||||
"""
|
||||
Construct ControlThermalAlgoAction via JSON. JSON example:
|
||||
{
|
||||
"type": "thermal_control.control"
|
||||
"status": "true"
|
||||
}
|
||||
:param json_obj: A JSON object representing a ControlThermalAlgoAction action.
|
||||
:return:
|
||||
"""
|
||||
if ControlThermalAlgoAction.JSON_FIELD_STATUS in json_obj:
|
||||
status_str = json_obj[ControlThermalAlgoAction.JSON_FIELD_STATUS].lower()
|
||||
if status_str == 'true':
|
||||
self.status = True
|
||||
elif status_str == 'false':
|
||||
self.status = False
|
||||
else:
|
||||
raise ValueError('Invalid {} field value, please specify true of false'.
|
||||
format(ControlThermalAlgoAction.JSON_FIELD_STATUS))
|
||||
else:
|
||||
raise ValueError('ControlThermalAlgoAction '
|
||||
'missing mandatory field {} in JSON policy file'.
|
||||
format(ControlThermalAlgoAction.JSON_FIELD_STATUS))
|
||||
|
||||
def execute(self, thermal_info_dict):
|
||||
"""
|
||||
Disable thermal control algorithm
|
||||
:param thermal_info_dict: A dictionary stores all thermal information.
|
||||
:return:
|
||||
"""
|
||||
from .thermal_infos import ChassisInfo
|
||||
if ChassisInfo.INFO_NAME in thermal_info_dict:
|
||||
chassis_info_obj = thermal_info_dict[ChassisInfo.INFO_NAME]
|
||||
chassis = chassis_info_obj.get_chassis()
|
||||
thermal_manager = chassis.get_thermal_manager()
|
||||
if self.status:
|
||||
thermal_manager.start_thermal_control_algorithm()
|
||||
else:
|
||||
thermal_manager.stop_thermal_control_algorithm()
|
@ -0,0 +1,81 @@
|
||||
from sonic_platform_base.sonic_thermal_control.thermal_condition_base import ThermalPolicyConditionBase
|
||||
from sonic_platform_base.sonic_thermal_control.thermal_json_object import thermal_json_object
|
||||
|
||||
|
||||
class FanCondition(ThermalPolicyConditionBase):
|
||||
def get_fan_info(self, thermal_info_dict):
|
||||
from .thermal_infos import FanInfo
|
||||
if FanInfo.INFO_NAME in thermal_info_dict and isinstance(thermal_info_dict[FanInfo.INFO_NAME], FanInfo):
|
||||
return thermal_info_dict[FanInfo.INFO_NAME]
|
||||
else:
|
||||
return None
|
||||
|
||||
|
||||
@thermal_json_object('fan.any.absence')
|
||||
class AnyFanAbsenceCondition(FanCondition):
|
||||
def is_match(self, thermal_info_dict):
|
||||
fan_info_obj = self.get_fan_info(thermal_info_dict)
|
||||
return len(fan_info_obj.get_absence_fans()) > 0 if fan_info_obj else False
|
||||
|
||||
|
||||
@thermal_json_object('fan.all.absence')
|
||||
class AllFanAbsenceCondition(FanCondition):
|
||||
def is_match(self, thermal_info_dict):
|
||||
fan_info_obj = self.get_fan_info(thermal_info_dict)
|
||||
return len(fan_info_obj.get_presence_fans()) == 0 if fan_info_obj else False
|
||||
|
||||
|
||||
@thermal_json_object('fan.all.presence')
|
||||
class AllFanPresenceCondition(FanCondition):
|
||||
def is_match(self, thermal_info_dict):
|
||||
fan_info_obj = self.get_fan_info(thermal_info_dict)
|
||||
return len(fan_info_obj.get_absence_fans()) == 0 if fan_info_obj else False
|
||||
|
||||
|
||||
class ThermalCondition(ThermalPolicyConditionBase):
|
||||
def get_thermal_info(self, thermal_info_dict):
|
||||
from .thermal_infos import ThermalInfo
|
||||
if ThermalInfo.INFO_NAME in thermal_info_dict and isinstance(thermal_info_dict[ThermalInfo.INFO_NAME], ThermalInfo):
|
||||
return thermal_info_dict[ThermalInfo.INFO_NAME]
|
||||
else:
|
||||
return None
|
||||
|
||||
|
||||
@thermal_json_object('thermal.over.high_critical_threshold')
|
||||
class ThermalOverHighCriticalCondition(ThermalCondition):
|
||||
def is_match(self, thermal_info_dict):
|
||||
thermal_info_obj = self.get_thermal_info(thermal_info_dict)
|
||||
if thermal_info_obj:
|
||||
return thermal_info_obj.is_over_high_critical_threshold()
|
||||
else:
|
||||
return False
|
||||
|
||||
|
||||
class PsuCondition(ThermalPolicyConditionBase):
|
||||
def get_psu_info(self, thermal_info_dict):
|
||||
from .thermal_infos import PsuInfo
|
||||
if PsuInfo.INFO_NAME in thermal_info_dict and isinstance(thermal_info_dict[PsuInfo.INFO_NAME], PsuInfo):
|
||||
return thermal_info_dict[PsuInfo.INFO_NAME]
|
||||
else:
|
||||
return None
|
||||
|
||||
|
||||
@thermal_json_object('psu.any.absence')
|
||||
class AnyPsuAbsenceCondition(PsuCondition):
|
||||
def is_match(self, thermal_info_dict):
|
||||
psu_info_obj = self.get_psu_info(thermal_info_dict)
|
||||
return len(psu_info_obj.get_absence_psus()) > 0 if psu_info_obj else False
|
||||
|
||||
|
||||
@thermal_json_object('psu.all.absence')
|
||||
class AllPsuAbsenceCondition(PsuCondition):
|
||||
def is_match(self, thermal_info_dict):
|
||||
psu_info_obj = self.get_psu_info(thermal_info_dict)
|
||||
return len(psu_info_obj.get_presence_psus()) == 0 if psu_info_obj else False
|
||||
|
||||
|
||||
@thermal_json_object('psu.all.presence')
|
||||
class AllPsuPresenceCondition(PsuCondition):
|
||||
def is_match(self, thermal_info_dict):
|
||||
psu_info_obj = self.get_psu_info(thermal_info_dict)
|
||||
return len(psu_info_obj.get_absence_psus()) == 0 if psu_info_obj else False
|
@ -0,0 +1,210 @@
|
||||
from sonic_platform_base.sonic_thermal_control.thermal_info_base import ThermalPolicyInfoBase
|
||||
from sonic_platform_base.sonic_thermal_control.thermal_json_object import thermal_json_object
|
||||
|
||||
|
||||
@thermal_json_object('fan_info')
|
||||
class FanInfo(ThermalPolicyInfoBase):
|
||||
"""
|
||||
Fan information needed by thermal policy
|
||||
"""
|
||||
|
||||
# Fan information name
|
||||
INFO_NAME = 'fan_info'
|
||||
|
||||
def __init__(self):
|
||||
self._absence_fans = set()
|
||||
self._presence_fans = set()
|
||||
self._status_changed = False
|
||||
|
||||
def collect(self, chassis):
|
||||
"""
|
||||
Collect absence and presence fans.
|
||||
:param chassis: The chassis object
|
||||
:return:
|
||||
"""
|
||||
self._status_changed = False
|
||||
for fan in chassis.get_all_fans():
|
||||
if fan.get_presence() and fan not in self._presence_fans:
|
||||
self._presence_fans.add(fan)
|
||||
self._status_changed = True
|
||||
if fan in self._absence_fans:
|
||||
self._absence_fans.remove(fan)
|
||||
elif not fan.get_presence() and fan not in self._absence_fans:
|
||||
self._absence_fans.add(fan)
|
||||
self._status_changed = True
|
||||
if fan in self._presence_fans:
|
||||
self._presence_fans.remove(fan)
|
||||
|
||||
def get_absence_fans(self):
|
||||
"""
|
||||
Retrieves absence fans
|
||||
:return: A set of absence fans
|
||||
"""
|
||||
return self._absence_fans
|
||||
|
||||
def get_presence_fans(self):
|
||||
"""
|
||||
Retrieves presence fans
|
||||
:return: A set of presence fans
|
||||
"""
|
||||
return self._presence_fans
|
||||
|
||||
def is_status_changed(self):
|
||||
"""
|
||||
Retrieves if the status of fan information changed
|
||||
:return: True if status changed else False
|
||||
"""
|
||||
return self._status_changed
|
||||
|
||||
|
||||
@thermal_json_object('thermal_info')
|
||||
class ThermalInfo(ThermalPolicyInfoBase):
|
||||
"""
|
||||
Thermal information needed by thermal policy
|
||||
"""
|
||||
|
||||
# Fan information name
|
||||
INFO_NAME = 'thermal_info'
|
||||
|
||||
def __init__(self):
|
||||
self.init = False
|
||||
self._old_avg_temp = 0
|
||||
self._current_avg_temp = 0
|
||||
self._high_crital_threshold = 75
|
||||
self._high_threshold = 45
|
||||
self._low_threshold = 40
|
||||
|
||||
def collect(self, chassis):
|
||||
"""
|
||||
Collect thermal sensor temperature change status
|
||||
:param chassis: The chassis object
|
||||
:return:
|
||||
"""
|
||||
self._temps = []
|
||||
self._over_high_critical_threshold = False
|
||||
self._warm_up_and_over_high_threshold = False
|
||||
self._cool_down_and_below_low_threshold = False
|
||||
|
||||
# Calculate average temp within the device
|
||||
temp = 0
|
||||
num_of_thermals = chassis.get_num_thermals()
|
||||
for index in range(num_of_thermals):
|
||||
self._temps.insert(index, chassis.get_thermal(index).get_temperature())
|
||||
temp += self._temps[index]
|
||||
|
||||
self._current_avg_temp = temp / num_of_thermals
|
||||
|
||||
# Special case if first time
|
||||
if self.init is False:
|
||||
self._old_avg_temp = self._current_avg_temp
|
||||
self.init = True
|
||||
|
||||
# Check if new average temp exceeds high threshold value
|
||||
if self._current_avg_temp >= self._old_avg_temp and self._current_avg_temp >= self._high_threshold:
|
||||
self._warm_up_and_over_high_threshold = True
|
||||
|
||||
# Check if new average temp exceeds low threshold value
|
||||
if self._current_avg_temp <= self._old_avg_temp and self._current_avg_temp <= self._low_threshold:
|
||||
self._cool_down_and_below_low_threshold = True
|
||||
|
||||
self._old_avg_temp = self._current_avg_temp
|
||||
|
||||
def is_warm_up_and_over_high_threshold(self):
|
||||
"""
|
||||
Retrieves if the temperature is warm up and over high threshold
|
||||
:return: True if the temperature is warm up and over high threshold else False
|
||||
"""
|
||||
return self._warm_up_and_over_high_threshold
|
||||
|
||||
def is_cool_down_and_below_low_threshold(self):
|
||||
"""
|
||||
Retrieves if the temperature is cold down and below low threshold
|
||||
:return: True if the temperature is cold down and below low threshold else False
|
||||
"""
|
||||
return self._cool_down_and_below_low_threshold
|
||||
|
||||
def is_over_high_critical_threshold(self):
|
||||
"""
|
||||
Retrieves if the temperature is over high critical threshold
|
||||
:return: True if the temperature is over high critical threshold else False
|
||||
"""
|
||||
return self._over_high_critical_threshold
|
||||
|
||||
|
||||
@thermal_json_object('psu_info')
|
||||
class PsuInfo(ThermalPolicyInfoBase):
|
||||
"""
|
||||
PSU information needed by thermal policy
|
||||
"""
|
||||
INFO_NAME = 'psu_info'
|
||||
|
||||
def __init__(self):
|
||||
self._absence_psus = set()
|
||||
self._presence_psus = set()
|
||||
self._status_changed = False
|
||||
|
||||
def collect(self, chassis):
|
||||
"""
|
||||
Collect absence and presence PSUs.
|
||||
:param chassis: The chassis object
|
||||
:return:
|
||||
"""
|
||||
self._status_changed = False
|
||||
for psu in chassis.get_all_psus():
|
||||
if psu.get_presence() and psu.get_powergood_status() and psu not in self._presence_psus:
|
||||
self._presence_psus.add(psu)
|
||||
self._status_changed = True
|
||||
if psu in self._absence_psus:
|
||||
self._absence_psus.remove(psu)
|
||||
elif (not psu.get_presence() or not psu.get_powergood_status()) and psu not in self._absence_psus:
|
||||
self._absence_psus.add(psu)
|
||||
self._status_changed = True
|
||||
if psu in self._presence_psus:
|
||||
self._presence_psus.remove(psu)
|
||||
|
||||
def get_absence_psus(self):
|
||||
"""
|
||||
Retrieves presence PSUs
|
||||
:return: A set of absence PSUs
|
||||
"""
|
||||
return self._absence_psus
|
||||
|
||||
def get_presence_psus(self):
|
||||
"""
|
||||
Retrieves presence PSUs
|
||||
:return: A set of presence fans
|
||||
"""
|
||||
return self._presence_psus
|
||||
|
||||
def is_status_changed(self):
|
||||
"""
|
||||
Retrieves if the status of PSU information changed
|
||||
:return: True if status changed else False
|
||||
"""
|
||||
return self._status_changed
|
||||
|
||||
|
||||
@thermal_json_object('chassis_info')
|
||||
class ChassisInfo(ThermalPolicyInfoBase):
|
||||
"""
|
||||
Chassis information needed by thermal policy
|
||||
"""
|
||||
INFO_NAME = 'chassis_info'
|
||||
|
||||
def __init__(self):
|
||||
self._chassis = None
|
||||
|
||||
def collect(self, chassis):
|
||||
"""
|
||||
Collect platform chassis.
|
||||
:param chassis: The chassis object
|
||||
:return:
|
||||
"""
|
||||
self._chassis = chassis
|
||||
|
||||
def get_chassis(self):
|
||||
"""
|
||||
Retrieves platform chassis object
|
||||
:return: A platform chassis object.
|
||||
"""
|
||||
return self._chassis
|
@ -0,0 +1,49 @@
|
||||
from sonic_platform_base.sonic_thermal_control.thermal_manager_base import ThermalManagerBase
|
||||
from .thermal_actions import *
|
||||
from .thermal_conditions import *
|
||||
from .thermal_infos import *
|
||||
|
||||
|
||||
class ThermalManager(ThermalManagerBase):
|
||||
THERMAL_ALGORITHM_CONTROL_PATH = '/var/run/hw-management/config/suspend'
|
||||
|
||||
@classmethod
|
||||
def start_thermal_control_algorithm(cls):
|
||||
"""
|
||||
Start thermal control algorithm
|
||||
|
||||
Returns:
|
||||
bool: True if set success, False if fail.
|
||||
"""
|
||||
cls._control_thermal_control_algorithm(False)
|
||||
|
||||
@classmethod
|
||||
def stop_thermal_control_algorithm(cls):
|
||||
"""
|
||||
Stop thermal control algorithm
|
||||
|
||||
Returns:
|
||||
bool: True if set success, False if fail.
|
||||
"""
|
||||
cls._control_thermal_control_algorithm(True)
|
||||
|
||||
@classmethod
|
||||
def _control_thermal_control_algorithm(cls, suspend):
|
||||
"""
|
||||
Control thermal control algorithm
|
||||
|
||||
Args:
|
||||
suspend: Bool, indicate suspend the algorithm or not
|
||||
|
||||
Returns:
|
||||
bool: True if set success, False if fail.
|
||||
"""
|
||||
status = True
|
||||
write_value = 1 if suspend else 0
|
||||
try:
|
||||
with open(cls.THERMAL_ALGORITHM_CONTROL_PATH, 'w') as control_file:
|
||||
control_file.write(str(write_value))
|
||||
except (ValueError, IOError):
|
||||
status = False
|
||||
|
||||
return status
|
@ -0,0 +1,182 @@
|
||||
"""
|
||||
Module contains an implementation of SONiC Platform Base API and
|
||||
provides access to hardware watchdog
|
||||
"""
|
||||
|
||||
import os
|
||||
import fcntl
|
||||
import array
|
||||
|
||||
from sonic_platform_base.watchdog_base import WatchdogBase
|
||||
from sonic_py_common import logger
|
||||
|
||||
""" ioctl constants """
|
||||
IO_READ = 0x80000000
|
||||
IO_SIZE_INT = 0x00040000
|
||||
IO_READ_WRITE = 0xC0000000
|
||||
IO_TYPE_WATCHDOG = ord('W') << 8
|
||||
|
||||
WDR_INT = IO_READ | IO_SIZE_INT | IO_TYPE_WATCHDOG
|
||||
WDWR_INT = IO_READ_WRITE | IO_SIZE_INT | IO_TYPE_WATCHDOG
|
||||
|
||||
""" Watchdog ioctl commands """
|
||||
WDIOC_SETOPTIONS = 4 | WDR_INT
|
||||
WDIOC_KEEPALIVE = 5 | WDR_INT
|
||||
WDIOC_SETTIMEOUT = 6 | WDWR_INT
|
||||
WDIOC_GETTIMEOUT = 7 | WDR_INT
|
||||
WDIOC_GETTIMELEFT = 10 | WDR_INT
|
||||
|
||||
""" Watchdog status constants """
|
||||
WDIOS_DISABLECARD = 0x0001
|
||||
WDIOS_ENABLECARD = 0x0002
|
||||
|
||||
""" watchdog sysfs """
|
||||
WD_SYSFS_PATH = "/sys/class/watchdog/"
|
||||
|
||||
WD_COMMON_ERROR = -1
|
||||
|
||||
sonic_logger = logger.Logger()
|
||||
|
||||
|
||||
class WatchdogImplBase(WatchdogBase):
|
||||
"""
|
||||
Base class that implements common logic for interacting
|
||||
with watchdog using ioctl commands
|
||||
"""
|
||||
|
||||
def __init__(self, wd_device_path):
|
||||
"""
|
||||
Open a watchdog handle
|
||||
@param wd_device_path Path to watchdog device
|
||||
"""
|
||||
|
||||
self.watchdog_path = wd_device_path
|
||||
self.watchdog = os.open(self.watchdog_path, os.O_WRONLY)
|
||||
|
||||
# Opening a watchdog descriptor starts
|
||||
# watchdog timer; by default it should be stopped
|
||||
self._disablewatchdog()
|
||||
self.armed = False
|
||||
self.timeout = self._gettimeout()
|
||||
|
||||
def disarm(self):
|
||||
"""
|
||||
Disarm the hardware watchdog
|
||||
|
||||
Returns:
|
||||
A boolean, True if watchdog is disarmed successfully, False
|
||||
if not
|
||||
"""
|
||||
sonic_logger.log_info(" Debug disarm watchdog ")
|
||||
|
||||
try:
|
||||
self._disablewatchdog()
|
||||
self.armed = False
|
||||
self.timeout = 0
|
||||
except IOError:
|
||||
return False
|
||||
|
||||
return True
|
||||
|
||||
def _disablewatchdog(self):
|
||||
"""
|
||||
Turn off the watchdog timer
|
||||
"""
|
||||
|
||||
req = array.array('h', [WDIOS_DISABLECARD])
|
||||
fcntl.ioctl(self.watchdog, WDIOC_SETOPTIONS, req, False)
|
||||
|
||||
def _settimeout(self, seconds):
|
||||
"""
|
||||
Set watchdog timer timeout
|
||||
@param seconds - timeout in seconds
|
||||
@return is the actual set timeout
|
||||
"""
|
||||
|
||||
req = array.array('I', [seconds])
|
||||
fcntl.ioctl(self.watchdog, WDIOC_SETTIMEOUT, req, True)
|
||||
|
||||
return int(req[0])
|
||||
|
||||
def _gettimeout(self):
|
||||
"""
|
||||
Get watchdog timeout
|
||||
@return watchdog timeout
|
||||
"""
|
||||
|
||||
req = array.array('I', [0])
|
||||
fcntl.ioctl(self.watchdog, WDIOC_GETTIMEOUT, req, True)
|
||||
|
||||
return int(req[0])
|
||||
|
||||
def _gettimeleft(self):
|
||||
"""
|
||||
Get time left before watchdog timer expires
|
||||
@return time left in seconds
|
||||
"""
|
||||
|
||||
req = array.array('I', [0])
|
||||
fcntl.ioctl(self.watchdog, WDIOC_GETTIMELEFT, req, True)
|
||||
|
||||
return int(req[0])
|
||||
|
||||
def arm(self, seconds):
|
||||
"""
|
||||
Implements arm WatchdogBase API
|
||||
"""
|
||||
sonic_logger.log_info(" Debug arm watchdog4 ")
|
||||
ret = WD_COMMON_ERROR
|
||||
if seconds < 0:
|
||||
return ret
|
||||
|
||||
try:
|
||||
if self.timeout != seconds:
|
||||
self.timeout = self._settimeout(seconds)
|
||||
if self.armed:
|
||||
self._keepalive()
|
||||
else:
|
||||
sonic_logger.log_info(" Debug arm watchdog5 ")
|
||||
self._enablewatchdog()
|
||||
self.armed = True
|
||||
ret = self.timeout
|
||||
except IOError:
|
||||
pass
|
||||
|
||||
return ret
|
||||
|
||||
def _enablewatchdog(self):
|
||||
"""
|
||||
Turn on the watchdog timer
|
||||
"""
|
||||
|
||||
req = array.array('h', [WDIOS_ENABLECARD])
|
||||
fcntl.ioctl(self.watchdog, WDIOC_SETOPTIONS, req, False)
|
||||
|
||||
def _keepalive(self):
|
||||
"""
|
||||
Keep alive watchdog timer
|
||||
"""
|
||||
|
||||
fcntl.ioctl(self.watchdog, WDIOC_KEEPALIVE)
|
||||
|
||||
def is_armed(self):
|
||||
"""
|
||||
Implements is_armed WatchdogBase API
|
||||
"""
|
||||
|
||||
return self.armed
|
||||
|
||||
def get_remaining_time(self):
|
||||
"""
|
||||
Implements get_remaining_time WatchdogBase API
|
||||
"""
|
||||
|
||||
timeleft = WD_COMMON_ERROR
|
||||
|
||||
if self.armed:
|
||||
try:
|
||||
timeleft = self._gettimeleft()
|
||||
except IOError:
|
||||
pass
|
||||
|
||||
return timeleft
|
@ -0,0 +1,49 @@
|
||||
|
||||
import os
|
||||
|
||||
# pylint: disable=import-error
|
||||
from sonic_platform_base.sonic_ssd.ssd_base import SsdBase
|
||||
from sonic_platform_base.sonic_ssd.ssd_generic import SsdUtil as SsdUtilDefault
|
||||
|
||||
class EmmcUtil(SsdBase):
|
||||
def __init__(self, diskdev):
|
||||
self.diskdev = diskdev
|
||||
self.path = os.path.join('/sys/block', os.path.basename(diskdev))
|
||||
|
||||
def _readDeviceEntry(self, entry, default=None):
|
||||
path = os.path.join(self.path, 'device', entry)
|
||||
try:
|
||||
with open(path, encoding='utf8') as f:
|
||||
return f.read().rstrip()
|
||||
except OSError:
|
||||
return default
|
||||
|
||||
def _isSlc(self):
|
||||
return bool(self._readDeviceEntry('enhanced_area_offset'))
|
||||
|
||||
def get_health(self):
|
||||
data = self._readDeviceEntry('life_time')
|
||||
if data is None:
|
||||
raise NotImplementedError
|
||||
value = int(data.split()[0 if self._isSlc() else 1], 0)
|
||||
return float(100 - (10 * (value - 1)))
|
||||
|
||||
def get_temperature(self):
|
||||
return 'N/A'
|
||||
|
||||
def get_model(self):
|
||||
return self._readDeviceEntry('name')
|
||||
|
||||
def get_firmware(self):
|
||||
return self._readDeviceEntry('fwrev')
|
||||
|
||||
def get_serial(self):
|
||||
return self._readDeviceEntry('serial')
|
||||
|
||||
def get_vendor_output(self):
|
||||
return ''
|
||||
|
||||
def SsdUtil(diskdev):
|
||||
if os.path.basename(diskdev).startswith('mmcblk'):
|
||||
return EmmcUtil(diskdev)
|
||||
return SsdUtilDefault(diskdev)
|
5
platform/marvell-arm64/sonic-platform-nokia/debian/changelog
Executable file
5
platform/marvell-arm64/sonic-platform-nokia/debian/changelog
Executable file
@ -0,0 +1,5 @@
|
||||
sonic-platform-nokia-7215 (1.0) unstable; urgency=low
|
||||
|
||||
* Add support for nokia-7215.
|
||||
|
||||
-- Nokia <pavan.prakash@nokia.com> Fri, 20 Jan 2023 09:35:58 +0800
|
@ -0,0 +1 @@
|
||||
9
|
13
platform/marvell-arm64/sonic-platform-nokia/debian/control
Executable file
13
platform/marvell-arm64/sonic-platform-nokia/debian/control
Executable file
@ -0,0 +1,13 @@
|
||||
Source: sonic-platform-nokia-7215
|
||||
Section: unknown
|
||||
Priority: optional
|
||||
Maintainer: Nokia <pavan.prakash@nokia.com>
|
||||
Build-Depends: debhelper (>=9)
|
||||
Standards-Version: 3.9.6
|
||||
Homepage: <insert the upstream URL, if relevant>
|
||||
|
||||
Package: sonic-platform-nokia-7215
|
||||
Architecture: arm64
|
||||
Depends: ${misc:Depends}
|
||||
Description: <insert up to 60 chars description>
|
||||
<insert long description, indented with spaces>
|
74
platform/marvell-arm64/sonic-platform-nokia/debian/rules
Executable file
74
platform/marvell-arm64/sonic-platform-nokia/debian/rules
Executable file
@ -0,0 +1,74 @@
|
||||
#!/usr/bin/make -f
|
||||
# See debhelper(7) (uncomment to enable)
|
||||
# output every command that modifies files on the build system.
|
||||
#export DH_VERBOSE = 1
|
||||
|
||||
include /usr/share/dpkg/pkg-info.mk
|
||||
#--------------------------------------------------------
|
||||
|
||||
PACKAGE_PRE_NAME := sonic-platform-nokia
|
||||
ifneq ($(CROSS_BUILD_ENVIRON), y)
|
||||
KVERSION ?= $(shell uname -r)
|
||||
endif
|
||||
KERNEL_SRC := /lib/modules/$(KVERSION)
|
||||
MOD_SRC_DIR:= $(shell pwd)
|
||||
MODULE_DIRS:= 7215
|
||||
UTILS_DIR := utils
|
||||
MODULE_DIR:= modules
|
||||
SERVICE_DIR := service
|
||||
PLATFORM_DIR := sonic_platform
|
||||
|
||||
%:
|
||||
dh $@ --with systemd,python3 --buildsystem=pybuild
|
||||
|
||||
clean:
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
dh_clean
|
||||
|
||||
build:
|
||||
(for mod in $(MODULE_DIRS); do \
|
||||
make modules -C $(KERNEL_SRC)/build M=$(MOD_SRC_DIR)/$${mod}/modules || exit 1; \
|
||||
python3 $${mod}/setup.py bdist_wheel -d $(MOD_SRC_DIR)/$${mod}; \
|
||||
done)
|
||||
|
||||
binary: binary-arch binary-indep
|
||||
# Nothing to do
|
||||
|
||||
binary-arch:
|
||||
# Nothing to do
|
||||
|
||||
binary-indep:
|
||||
dh_testdir
|
||||
dh_installdirs
|
||||
|
||||
# Custom package commands
|
||||
(for mod in $(MODULE_DIRS); do \
|
||||
dh_installdirs -p$(PACKAGE_PRE_NAME)-$${mod} /$(KERNEL_SRC)/$(INSTALL_MOD_DIR); \
|
||||
dh_installdirs -p$(PACKAGE_PRE_NAME)-$${mod} /usr/local/bin; \
|
||||
dh_installdirs -p$(PACKAGE_PRE_NAME)-$${mod} /boot; \
|
||||
dh_installdirs -p$(PACKAGE_PRE_NAME)-$${mod} /lib/systemd/system; \
|
||||
cp $(MOD_SRC_DIR)/$${mod}/$(SERVICE_DIR)/*.service debian/$(PACKAGE_PRE_NAME)-$${mod}/lib/systemd/system/; \
|
||||
cp $(MOD_SRC_DIR)/$${mod}/$(UTILS_DIR)/* debian/$(PACKAGE_PRE_NAME)-$${mod}/usr/local/bin/; \
|
||||
cp $(MOD_SRC_DIR)/$${mod}/$(MODULE_DIR)/*.ko debian/$(PACKAGE_PRE_NAME)-$${mod}/$(KERNEL_SRC)/$(INSTALL_MOD_DIR); \
|
||||
python3 $${mod}/setup.py install --root=$(MOD_SRC_DIR)/debian/$(PACKAGE_PRE_NAME)-$${mod} --install-layout=deb; \
|
||||
done)
|
||||
|
||||
# Resuming debhelper scripts
|
||||
dh_testroot
|
||||
dh_install
|
||||
dh_installchangelogs
|
||||
dh_installdocs
|
||||
dh_systemd_enable
|
||||
dh_installinit
|
||||
dh_systemd_start
|
||||
dh_link
|
||||
dh_fixperms
|
||||
dh_compress
|
||||
dh_strip
|
||||
dh_installdeb
|
||||
dh_gencontrol
|
||||
dh_md5sums
|
||||
dh_builddeb
|
||||
|
||||
.PHONY: build binary binary-arch binary-indep clean
|
@ -0,0 +1,4 @@
|
||||
7215/scripts/nokia-7215_plt_setup.sh usr/local/bin
|
||||
7215/scripts/nokia-7215-init.sh usr/local/bin
|
||||
7215/service/nokia-7215init.service etc/systemd/system
|
||||
7215/sonic_platform-1.0-py3-none-any.whl usr/share/sonic/device/arm64-nokia_ixs7215_52xb-r0
|
@ -0,0 +1,44 @@
|
||||
#!/bin/sh
|
||||
# postinst script for sonic-platform-nokia-7215
|
||||
#
|
||||
# see: dh_installdeb(1)
|
||||
|
||||
set -e
|
||||
|
||||
# summary of how this script can be called:
|
||||
# * <postinst> `configure' <most-recently-configured-version>
|
||||
# * <old-postinst> `abort-upgrade' <new version>
|
||||
# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
|
||||
# <new-version>
|
||||
# * <postinst> `abort-remove'
|
||||
# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
|
||||
# <failed-install-package> <version> `removing'
|
||||
# <conflicting-package> <version>
|
||||
# for details, see https://www.debian.org/doc/debian-policy/ or
|
||||
# the debian-policy package
|
||||
|
||||
|
||||
case "$1" in
|
||||
configure)
|
||||
sh /usr/local/bin/nokia-7215_plt_setup.sh
|
||||
chmod a+x /usr/local/bin/nokia-7215-init.sh
|
||||
systemctl enable nokia-7215init.service
|
||||
systemctl start nokia-7215init.service
|
||||
|
||||
;;
|
||||
|
||||
abort-upgrade|abort-remove|abort-deconfigure)
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "postinst called with unknown argument \`$1'" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# dh_installdeb will replace this with shell code automatically
|
||||
# generated by other debhelper scripts.
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
exit 0
|
@ -5,48 +5,51 @@
|
||||
#address-cells = <1>;
|
||||
|
||||
images {
|
||||
kernel@0 {
|
||||
description = "Linux Kernel";
|
||||
data = /incbin/("/boot/vmlinuz-4.9.0-9-2-arm64");
|
||||
kernel_ac5x {
|
||||
description = "Linux Kernel for AC5x";
|
||||
data = /incbin/("/boot/vmlinuz-5.10.0-18-2-arm64");
|
||||
type = "kernel";
|
||||
arch = "arm64";
|
||||
os = "linux";
|
||||
compression = "none";
|
||||
load = <0x6000000>;
|
||||
entry = <0x6000000>;
|
||||
load = <0x2 0x2080000>;
|
||||
entry = <0x2 0x2080000>;
|
||||
hash@1 {
|
||||
algo = "sha1";
|
||||
};
|
||||
};
|
||||
fdt@0 {
|
||||
description = "Flattened Device Tree blob";
|
||||
data = /incbin/("/boot/armada-7020-comexpress.dtb");
|
||||
fdt_ac5x {
|
||||
description = "Flattened Device Tree blob for AC5x";
|
||||
data = /incbin/("/boot/ac5x.dtb");
|
||||
type = "flat_dt";
|
||||
arch = "arm64";
|
||||
compression = "none";
|
||||
load = <0x2 0x1000000>;
|
||||
hash@1 {
|
||||
algo = "sha1";
|
||||
};
|
||||
};
|
||||
ramdisk@0 {
|
||||
description = "ramdisk";
|
||||
data = /incbin/("/boot/initrd.img-4.9.0-9-2-arm64");
|
||||
ramdisk_ac5x {
|
||||
description = "ramdisk for AC5x";
|
||||
data = /incbin/("/boot/initrd.img-5.10.0-18-2-arm64");
|
||||
type = "ramdisk";
|
||||
arch = "arm64";
|
||||
os = "linux";
|
||||
compression = "gzip";
|
||||
load = <0x2 0x6000000>;
|
||||
entry = <0x2 0x6000000>;
|
||||
hash@1 {
|
||||
algo = "sha1";
|
||||
};
|
||||
};
|
||||
};
|
||||
configurations {
|
||||
default = "conf@1";
|
||||
conf@1 {
|
||||
description = "Boot Linux kernel with FDT blob + ramdisk";
|
||||
kernel = "kernel@0";
|
||||
fdt = "fdt@0";
|
||||
ramdisk = "ramdisk@0";
|
||||
default = "conf_ac5x";
|
||||
conf_ac5x {
|
||||
description = "Boot Linux kernel with FDT blob + ramdisk for RD_AC5x";
|
||||
kernel = "kernel_ac5x";
|
||||
fdt = "fdt_ac5x";
|
||||
ramdisk = "ramdisk_ac5x";
|
||||
hash@1 {
|
||||
algo = "sha1";
|
||||
};
|
||||
|
@ -600,18 +600,19 @@ def get_system_mac(namespace=None):
|
||||
machine_vars = get_machine_info()
|
||||
(mac, err) = run_command(syseeprom_cmd)
|
||||
hw_mac_entry_outputs.append((mac, err))
|
||||
if machine_vars is not None and machine_key in machine_vars:
|
||||
hwsku = machine_vars[machine_key]
|
||||
profile_cmd0 = ['cat', HOST_DEVICE_PATH + '/' + platform + '/' + hwsku + '/profile.ini']
|
||||
profile_cmd1 = ['grep', 'switchMacAddress']
|
||||
profile_cmd2 = ['cut', '-f2', '-d', '=']
|
||||
(mac, err) = run_command_pipe(profile_cmd0, profile_cmd1, profile_cmd2)
|
||||
else:
|
||||
profile_cmd = ["false"]
|
||||
(mac, err) = run_command(profile_cmd)
|
||||
hw_mac_entry_outputs.append((mac, err))
|
||||
(mac, err) = run_command_pipe(iplink_cmd0, iplink_cmd1, iplink_cmd2)
|
||||
hw_mac_entry_outputs.append((mac, err))
|
||||
if not mac:
|
||||
if machine_vars is not None and machine_key in machine_vars:
|
||||
hwsku = machine_vars[machine_key]
|
||||
profile_cmd0 = ['cat', HOST_DEVICE_PATH + '/' + platform + '/' + hwsku + '/profile.ini']
|
||||
profile_cmd1 = ['grep', 'switchMacAddress']
|
||||
profile_cmd2 = ['cut', '-f2', '-d', '=']
|
||||
(mac, err) = run_command_pipe(profile_cmd0, profile_cmd1, profile_cmd2)
|
||||
else:
|
||||
profile_cmd = ["false"]
|
||||
(mac, err) = run_command(profile_cmd)
|
||||
hw_mac_entry_outputs.append((mac, err))
|
||||
(mac, err) = run_command_pipe(iplink_cmd0, iplink_cmd1, iplink_cmd2)
|
||||
hw_mac_entry_outputs.append((mac, err))
|
||||
elif (version_info['asic_type'] == 'cisco-8000'):
|
||||
# Try to get valid MAC from profile.ini first, else fetch it from syseeprom or eth0
|
||||
platform = get_platform()
|
||||
|
Loading…
Reference in New Issue
Block a user