From a93a8f84a12a865d8fd102615cc3740ff708aec1 Mon Sep 17 00:00:00 2001 From: Pavan-Nokia <120486223+Pavan-Nokia@users.noreply.github.com> Date: Mon, 4 Mar 2024 13:53:00 -0500 Subject: [PATCH] [Nokia-7215-A1]Update Nokia-7215-A1 Platform (#18147) 1) Update Nokia-7215-A1 platform to address UT and OC test failures 2) Enable watchdog service 3) EZB files for SAI upgrade --- .../Nokia-7215-A1/ASK-Board-AC5X-xb.md5 | 2 +- .../Nokia-7215-A1/ASK-Board-AC5X-xb.xml | 718 ++++++++---------- .../Nokia-7215-A1/ASK-L1-AC5X-xb.md5 | 2 +- .../Nokia-7215-A1/ASK-L1-AC5X-xb.xml | 2 +- .../Nokia-7215-A1/ASK-PP-AC5X-xb.md5 | 2 +- .../Nokia-7215-A1/ASK-PP-AC5X-xb.xml | 24 +- .../Nokia-7215-A1/SAI-AC5X-xb.md5 | 2 +- .../Nokia-7215-A1/SAI-AC5X-xb.xml | 138 +++- .../installer.conf | 1 - .../arm64-nokia_ixs7215_52xb-r0/pcie.yaml | 10 + .../arm64-nokia_ixs7215_52xb-r0/platform.json | 11 +- .../platform_reboot | 10 +- .../pmon_daemon_control.json | 3 - .../system_health_monitoring_config.json | 4 +- .../7215/modules/Makefile | 2 +- .../7215/modules/ac5_thermal_sensor.c | 218 ------ .../7215/modules/cn9130_cpu_thermal_sensor.c | 242 ++++++ .../7215/scripts/cpu_wdt.py | 46 ++ .../7215/service/cpu_wdt.service | 8 + .../7215/sonic_platform/chassis.py | 23 +- .../7215/sonic_platform/component.py | 2 +- .../7215/sonic_platform/eeprom.py | 3 +- .../7215/sonic_platform/fan.py | 34 +- .../7215/sonic_platform/psu.py | 34 +- .../7215/sonic_platform/sfp.py | 2 +- .../7215/sonic_platform/thermal.py | 75 +- .../7215/sonic_platform/thermal_infos.py | 33 +- .../7215/sonic_platform/watchdog.py | 161 ++-- .../sonic-platform-nokia/debian/rules | 2 +- .../debian/sonic-platform-nokia-7215.install | 2 + .../debian/sonic-platform-nokia-7215.postinst | 3 + 31 files changed, 1034 insertions(+), 785 deletions(-) create mode 100644 device/nokia/arm64-nokia_ixs7215_52xb-r0/pcie.yaml mode change 100644 => 100755 device/nokia/arm64-nokia_ixs7215_52xb-r0/platform_reboot delete mode 100644 device/nokia/arm64-nokia_ixs7215_52xb-r0/pmon_daemon_control.json delete mode 100644 platform/marvell-arm64/sonic-platform-nokia/7215/modules/ac5_thermal_sensor.c create mode 100644 platform/marvell-arm64/sonic-platform-nokia/7215/modules/cn9130_cpu_thermal_sensor.c create mode 100755 platform/marvell-arm64/sonic-platform-nokia/7215/scripts/cpu_wdt.py create mode 100644 platform/marvell-arm64/sonic-platform-nokia/7215/service/cpu_wdt.service diff --git a/device/nokia/arm64-nokia_ixs7215_52xb-r0/Nokia-7215-A1/ASK-Board-AC5X-xb.md5 b/device/nokia/arm64-nokia_ixs7215_52xb-r0/Nokia-7215-A1/ASK-Board-AC5X-xb.md5 index 64cb21addf..fe63caf784 100644 --- a/device/nokia/arm64-nokia_ixs7215_52xb-r0/Nokia-7215-A1/ASK-Board-AC5X-xb.md5 +++ b/device/nokia/arm64-nokia_ixs7215_52xb-r0/Nokia-7215-A1/ASK-Board-AC5X-xb.md5 @@ -1 +1 @@ -ee44e299ca857b9f0abf2e804ec4850f \ No newline at end of file +4983b60d1d68623c202b91093f3730db \ No newline at end of file diff --git a/device/nokia/arm64-nokia_ixs7215_52xb-r0/Nokia-7215-A1/ASK-Board-AC5X-xb.xml b/device/nokia/arm64-nokia_ixs7215_52xb-r0/Nokia-7215-A1/ASK-Board-AC5X-xb.xml index 08936c1339..20cdef069c 100644 --- a/device/nokia/arm64-nokia_ixs7215_52xb-r0/Nokia-7215-A1/ASK-Board-AC5X-xb.xml +++ b/device/nokia/arm64-nokia_ixs7215_52xb-r0/Nokia-7215-A1/ASK-Board-AC5X-xb.xml @@ -1,5 +1,5 @@ - + @@ -82,9 +82,9 @@ device-id-type uint32 - Device ID 0..1023 + Device ID 0..1 0 - 1023 + 1 port-mapping-type @@ -111,11 +111,9 @@ txq-port-number-type uint32 - 0 - 8 queues are configured per port (legacy mode), -1...16 - the number of queues configured per port - SIP 5 : Bobcat2,BobK:0..71 ;Bobcat3: 0..576 ;Aldrin2:0..99 + TXq port number 0 - 576 + 99 phy-smi-interface-type @@ -162,12 +160,14 @@ alaska-88E3140 - Specifies PHY identifier 88E3140, used for Copper with speeds of 100M/1G/10G. Uses with FW SolarFlare next generation. + Specifies PHY identifier 88E3140, used for Copper with speeds of 100M/1G/10G. +Uses with FW SolarFlare next generation. 5 alaska-88E3240 - Specifies PHY identifier 88E3240, used for Copper with speeds of 100M/1G/10G. Uses with FW, SolarFlare next generation. + Specifies PHY identifier 88E3240, used for Copper with speeds of 100M/1G/10G. +Uses with FW, SolarFlare next generation. 6 @@ -177,7 +177,8 @@ alaska-88E3220 - Specifies PHY identifier 88E3220, used for Combo port with speeds of 100M/1G/10G. Uses FW, SolarFlare next generation. + Specifies PHY identifier 88E3220, used for Combo port with speeds of 100M/1G/10G. +Uses FW, SolarFlare next generation. 8 @@ -212,17 +213,20 @@ alaska-88E1780 - Specifies PHY identifier 88E1780, Integrated Octal 10/100/1000 Mbps Energy Efficient Ethernet Transceiver + Specifies PHY identifier 88E1780, Integrated Octal 10/100/1000 Mbps Energy +Efficient Ethernet Transceiver 15 alaska-88E2540 - Specifies PHY identifier 88E2540, 4 ports 10/100/1000/2.5G/5GBASE-T Ethernet Transceiver with IEEE 1588v2 PTP Support + Specifies PHY identifier 88E2540, 4 ports 10/100/1000/2.5G/5GBASE-T Ethernet +Transceiver with IEEE 1588v2 PTP Support 16 alaska-88E2580 - Specifies PHY identifier 88E12580, Octal 10/100/1000/2.5G/5GBASE-T Ethernet Transceiver with IEEE 1588v2 PTP Support + Specifies PHY identifier 88E12580, Octal 10/100/1000/2.5G/5GBASE-T Ethernet Transceiver +with IEEE 1588v2 PTP Support 17 @@ -510,7 +514,7 @@ uint32 serdes lane 0 - 255 + 7 cpu-type @@ -589,12 +593,12 @@ lowercase characters. sip5 - SIP5: AC5, AC3x + SIP5: AC3x 5 sip6 - SIP6: Falcon, AC5x, AC5P + SIP6: Falcon, AC5x 6 @@ -665,12 +669,28 @@ lowercase characters. 1 + + asic-type + enumeration + ASIC Type + + ASIC_AC3X + AC3X + 0 + + + ASIC_AC5X + AC5X + 1 + + + ASIC_AC5X AC5X-xb linux-static linux-static autoscan - internal + external pex_eagle 0 @@ -683,10 +703,8 @@ lowercase characters. ethernet_mac 0 - 0 false - NETWORK alaska-88E1780 0 @@ -704,10 +722,8 @@ lowercase characters. ethernet_mac 1 - 0 false - NETWORK alaska-88E1780 0 @@ -725,10 +741,8 @@ lowercase characters. ethernet_mac 2 - 0 false - NETWORK alaska-88E1780 0 @@ -746,10 +760,8 @@ lowercase characters. ethernet_mac 3 - 0 false - NETWORK alaska-88E1780 0 @@ -767,10 +779,8 @@ lowercase characters. ethernet_mac 4 - 0 false - NETWORK alaska-88E1780 0 @@ -788,10 +798,8 @@ lowercase characters. ethernet_mac 5 - 0 false - NETWORK alaska-88E1780 0 @@ -809,10 +817,8 @@ lowercase characters. ethernet_mac 6 - 0 false - NETWORK alaska-88E1780 0 @@ -830,10 +836,8 @@ lowercase characters. ethernet_mac 7 - 0 false - NETWORK alaska-88E1780 0 @@ -851,10 +855,8 @@ lowercase characters. ethernet_mac 8 - 0 false - NETWORK alaska-88E1780 1 @@ -872,10 +874,8 @@ lowercase characters. ethernet_mac 9 - 0 false - NETWORK alaska-88E1780 1 @@ -893,10 +893,8 @@ lowercase characters. ethernet_mac 10 - 0 false - NETWORK alaska-88E1780 1 @@ -914,10 +912,8 @@ lowercase characters. ethernet_mac 11 - 0 false - NETWORK alaska-88E1780 1 @@ -935,10 +931,8 @@ lowercase characters. ethernet_mac 12 - 0 false - NETWORK alaska-88E1780 1 @@ -956,10 +950,8 @@ lowercase characters. ethernet_mac 13 - 0 false - NETWORK alaska-88E1780 1 @@ -977,10 +969,8 @@ lowercase characters. ethernet_mac 14 - 0 false - NETWORK alaska-88E1780 1 @@ -998,10 +988,8 @@ lowercase characters. ethernet_mac 15 - 0 false - NETWORK alaska-88E1780 1 @@ -1019,10 +1007,8 @@ lowercase characters. ethernet_mac 16 - 0 false - NETWORK alaska-88E1780 2 @@ -1040,10 +1026,8 @@ lowercase characters. ethernet_mac 17 - 0 false - NETWORK alaska-88E1780 2 @@ -1061,10 +1045,8 @@ lowercase characters. ethernet_mac 18 - 0 false - NETWORK alaska-88E1780 2 @@ -1082,10 +1064,8 @@ lowercase characters. ethernet_mac 19 - 0 false - NETWORK alaska-88E1780 2 @@ -1103,10 +1083,8 @@ lowercase characters. ethernet_mac 20 - 0 false - NETWORK alaska-88E1780 2 @@ -1124,10 +1102,8 @@ lowercase characters. ethernet_mac 21 - 0 false - NETWORK alaska-88E1780 2 @@ -1145,10 +1121,8 @@ lowercase characters. ethernet_mac 22 - 0 false - NETWORK alaska-88E1780 2 @@ -1166,10 +1140,8 @@ lowercase characters. ethernet_mac 23 - 0 false - NETWORK alaska-88E1780 2 @@ -1187,10 +1159,8 @@ lowercase characters. ethernet_mac 24 - 0 false - NETWORK alaska-88E1780 3 @@ -1208,10 +1178,8 @@ lowercase characters. ethernet_mac 25 - 0 false - NETWORK alaska-88E1780 3 @@ -1229,10 +1197,8 @@ lowercase characters. ethernet_mac 26 - 0 false - NETWORK alaska-88E1780 3 @@ -1250,10 +1216,8 @@ lowercase characters. ethernet_mac 27 - 0 false - NETWORK alaska-88E1780 3 @@ -1271,10 +1235,8 @@ lowercase characters. ethernet_mac 28 - 0 false - NETWORK alaska-88E1780 3 @@ -1292,10 +1254,8 @@ lowercase characters. ethernet_mac 29 - 0 false - NETWORK alaska-88E1780 3 @@ -1313,10 +1273,8 @@ lowercase characters. ethernet_mac 30 - 0 false - NETWORK alaska-88E1780 3 @@ -1334,10 +1292,8 @@ lowercase characters. ethernet_mac 31 - 0 false - NETWORK alaska-88E1780 3 @@ -1355,10 +1311,8 @@ lowercase characters. ethernet_mac 32 - 0 false - NETWORK alaska-88E1780 4 @@ -1371,309 +1325,13 @@ lowercase characters. false - - 33 - - ethernet_mac - 33 - 0 - false - - NETWORK - - alaska-88E1780 - 4 - 9 - 1 - - - - 63 - false - - - - 34 - - ethernet_mac - 34 - 0 - false - - NETWORK - - alaska-88E1780 - 4 - 10 - 1 - - - - 63 - false - - - - 35 - - ethernet_mac - 35 - 0 - false - - NETWORK - - alaska-88E1780 - 4 - 11 - 1 - - - - 63 - false - - - - 36 - - ethernet_mac - 36 - 0 - false - - NETWORK - - alaska-88E1780 - 4 - 12 - 1 - - - - 63 - false - - - - 37 - - ethernet_mac - 37 - 0 - false - - NETWORK - - alaska-88E1780 - 4 - 13 - 1 - - - - 63 - false - - - - 38 - - ethernet_mac - 38 - 0 - false - - NETWORK - - alaska-88E1780 - 4 - 14 - 1 - - - - 63 - false - - - - 39 - - ethernet_mac - 39 - 0 - false - - NETWORK - - alaska-88E1780 - 4 - 15 - 1 - - - - 63 - false - - - - 40 - - ethernet_mac - 40 - 0 - false - - NETWORK - - alaska-88E1780 - 5 - 16 - 1 - - - - 63 - false - - - - 41 - - ethernet_mac - 41 - 0 - false - - NETWORK - - alaska-88E1780 - 5 - 17 - 1 - - - - 63 - false - - - - 42 - - ethernet_mac - 42 - 0 - false - - NETWORK - - alaska-88E1780 - 5 - 18 - 1 - - - - 63 - false - - - - 43 - - ethernet_mac - 43 - 0 - false - - NETWORK - - alaska-88E1780 - 5 - 19 - 1 - - - - 63 - false - - - - 44 - - ethernet_mac - 44 - 0 - false - - NETWORK - - alaska-88E1780 - 6 - 20 - 1 - - - - 63 - false - - - - 45 - - ethernet_mac - 45 - 0 - false - - NETWORK - - alaska-88E1780 - 6 - 21 - 1 - - - - 63 - false - - - - 46 - - ethernet_mac - 46 - 0 - false - - NETWORK - - alaska-88E1780 - 6 - 22 - 1 - - - - 63 - false - - 47 ethernet_mac 47 - 0 false - NETWORK alaska-88E1780 6 @@ -1686,15 +1344,279 @@ lowercase characters. false + + 46 + + ethernet_mac + 46 + false + + + alaska-88E1780 + 6 + 22 + 1 + + + + 63 + false + + + + 45 + + ethernet_mac + 45 + false + + + alaska-88E1780 + 6 + 21 + 1 + + + + 63 + false + + + + 44 + + ethernet_mac + 44 + false + + + alaska-88E1780 + 6 + 20 + 1 + + + + 63 + false + + + + 43 + + ethernet_mac + 43 + false + + + alaska-88E1780 + 5 + 19 + 1 + + + + 63 + false + + + + 42 + + ethernet_mac + 42 + false + + + alaska-88E1780 + 5 + 18 + 1 + + + + 63 + false + + + + 41 + + ethernet_mac + 41 + false + + + alaska-88E1780 + 5 + 17 + 1 + + + + 63 + false + + + + 40 + + ethernet_mac + 40 + false + + + alaska-88E1780 + 5 + 16 + 1 + + + + 63 + false + + + + 39 + + ethernet_mac + 39 + false + + + alaska-88E1780 + 4 + 15 + 1 + + + + 63 + false + + + + 38 + + ethernet_mac + 38 + false + + + alaska-88E1780 + 4 + 14 + 1 + + + + 63 + false + + + + 37 + + ethernet_mac + 37 + false + + + alaska-88E1780 + 4 + 13 + 1 + + + + 63 + false + + + + 36 + + ethernet_mac + 36 + false + + + alaska-88E1780 + 4 + 12 + 1 + + + + 63 + false + + + + 35 + + ethernet_mac + 35 + false + + + alaska-88E1780 + 4 + 11 + 1 + + + + 63 + false + + + + 34 + + ethernet_mac + 34 + false + + + alaska-88E1780 + 4 + 10 + 1 + + + + 63 + false + + + + 33 + + ethernet_mac + 33 + false + + + alaska-88E1780 + 4 + 9 + 1 + + + + 63 + false + + 48 ethernet_mac 49 - 0 false - NETWORK NA @@ -1703,7 +1625,7 @@ lowercase characters. 0 2 - false + true false @@ -1713,10 +1635,8 @@ lowercase characters. ethernet_mac 48 - 0 false - NETWORK NA @@ -1725,7 +1645,7 @@ lowercase characters. 1 2 - false + true false @@ -1735,10 +1655,8 @@ lowercase characters. ethernet_mac 51 - 0 false - NETWORK NA @@ -1747,7 +1665,7 @@ lowercase characters. 0 2 - false + true false @@ -1757,10 +1675,8 @@ lowercase characters. ethernet_mac 50 - 0 false - NETWORK NA @@ -1769,30 +1685,26 @@ lowercase characters. 1 2 - false + true false - - 60 - - cpu_sdma - 55 - 0 - false - - NETWORK - 63 cpu_sdma 54 - 0 false - NETWORK + + + 60 + + cpu_sdma + 55 + false + 0 diff --git a/device/nokia/arm64-nokia_ixs7215_52xb-r0/Nokia-7215-A1/ASK-L1-AC5X-xb.md5 b/device/nokia/arm64-nokia_ixs7215_52xb-r0/Nokia-7215-A1/ASK-L1-AC5X-xb.md5 index e8daa7b6f3..6ea0d96347 100644 --- a/device/nokia/arm64-nokia_ixs7215_52xb-r0/Nokia-7215-A1/ASK-L1-AC5X-xb.md5 +++ b/device/nokia/arm64-nokia_ixs7215_52xb-r0/Nokia-7215-A1/ASK-L1-AC5X-xb.md5 @@ -1 +1 @@ -8d006b7a29c75f81b641df68102a6aa3 \ No newline at end of file +48c76e16726ad2b1cb797c55c477fc30 \ No newline at end of file diff --git a/device/nokia/arm64-nokia_ixs7215_52xb-r0/Nokia-7215-A1/ASK-L1-AC5X-xb.xml b/device/nokia/arm64-nokia_ixs7215_52xb-r0/Nokia-7215-A1/ASK-L1-AC5X-xb.xml index 534b218554..e00ba03147 100644 --- a/device/nokia/arm64-nokia_ixs7215_52xb-r0/Nokia-7215-A1/ASK-L1-AC5X-xb.xml +++ b/device/nokia/arm64-nokia_ixs7215_52xb-r0/Nokia-7215-A1/ASK-L1-AC5X-xb.xml @@ -1,5 +1,5 @@ - + diff --git a/device/nokia/arm64-nokia_ixs7215_52xb-r0/Nokia-7215-A1/ASK-PP-AC5X-xb.md5 b/device/nokia/arm64-nokia_ixs7215_52xb-r0/Nokia-7215-A1/ASK-PP-AC5X-xb.md5 index de23afe955..bcd85e67a6 100644 --- a/device/nokia/arm64-nokia_ixs7215_52xb-r0/Nokia-7215-A1/ASK-PP-AC5X-xb.md5 +++ b/device/nokia/arm64-nokia_ixs7215_52xb-r0/Nokia-7215-A1/ASK-PP-AC5X-xb.md5 @@ -1 +1 @@ -b42f2a2be9da6c7752c0807f9dee48bf \ No newline at end of file +d36319f76733ae8593e31f3231599936 \ No newline at end of file diff --git a/device/nokia/arm64-nokia_ixs7215_52xb-r0/Nokia-7215-A1/ASK-PP-AC5X-xb.xml b/device/nokia/arm64-nokia_ixs7215_52xb-r0/Nokia-7215-A1/ASK-PP-AC5X-xb.xml index ad457fe7db..cd948edc27 100644 --- a/device/nokia/arm64-nokia_ixs7215_52xb-r0/Nokia-7215-A1/ASK-PP-AC5X-xb.xml +++ b/device/nokia/arm64-nokia_ixs7215_52xb-r0/Nokia-7215-A1/ASK-PP-AC5X-xb.xml @@ -1,5 +1,5 @@ - + @@ -357,28 +357,28 @@ NATIVE 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 +* 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 0 FLEX 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. +* 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. 2 number-physical-port-type enumeration - ac5x 128, falcon 64,128,256, 512, 1024 + AC3X/AC5X 128, falcon 64, 128, 256, 512, 1024 no-ports no-ports diff --git a/device/nokia/arm64-nokia_ixs7215_52xb-r0/Nokia-7215-A1/SAI-AC5X-xb.md5 b/device/nokia/arm64-nokia_ixs7215_52xb-r0/Nokia-7215-A1/SAI-AC5X-xb.md5 index 951dd3007b..dd43b58571 100644 --- a/device/nokia/arm64-nokia_ixs7215_52xb-r0/Nokia-7215-A1/SAI-AC5X-xb.md5 +++ b/device/nokia/arm64-nokia_ixs7215_52xb-r0/Nokia-7215-A1/SAI-AC5X-xb.md5 @@ -1 +1 @@ -b43a871130f9e59ac21a74940574558f \ No newline at end of file +1ff8c65eb4b5dfff5d2c9be67401c723 \ No newline at end of file diff --git a/device/nokia/arm64-nokia_ixs7215_52xb-r0/Nokia-7215-A1/SAI-AC5X-xb.xml b/device/nokia/arm64-nokia_ixs7215_52xb-r0/Nokia-7215-A1/SAI-AC5X-xb.xml index 5e374fdb06..d88939c000 100644 --- a/device/nokia/arm64-nokia_ixs7215_52xb-r0/Nokia-7215-A1/SAI-AC5X-xb.xml +++ b/device/nokia/arm64-nokia_ixs7215_52xb-r0/Nokia-7215-A1/SAI-AC5X-xb.xml @@ -1,13 +1,13 @@ - + device-id-type uint32 - Device ID 0..1023 + Device ID 0..1 0 - 1023 + 1 port-id-type @@ -22,7 +22,7 @@ Logging Feature Options SAI_LOG_SYSLOG - SYSLOG {Syslog service should be running to use this option} + SYSLOG {Syslog service should be running to use this option} 0 @@ -32,7 +32,7 @@ SAI_LOG_FILE - FILE {Warning !!! Use with caution. Can cause disk full issues} + FILE {Warning !!! Use with caution. Can cause disk full issues} 2 @@ -43,11 +43,93 @@ 2 30 + + acl-feature-name-type + enumeration + + + port-sFlow + SFlow over Port + 0 + + + port-counters-ipv4-ipv6 + Port ipv4/ipv6 counters + 1 + + + control-acl + ACLs for control packet handling + 2 + + + + ingress-acl-stage-type + enumeration + + + disabled + Feature not enabled + 0 + + + IPCL0 + Stage IPCL0 + 1 + + + IPCL1 + Stage IPCL1 + 2 + + + + egress-acl-stage-type + enumeration + + + disabled + Feature not enabled + 0 + + + EPCL0 + Stage EPCL0 + 2 + + + + feature-priority-type + uint32 + Feature priority + 2 + 15 + + + hit-number-type + uint32 + Hit/lookup number + 0 + 3 + + + asic-type + enumeration + ASIC Type + + ASIC_AC3X + AC3X + 0 + + + ASIC_AC5X + AC5X + 1 + + + ASIC_AC5X ASK-Board-AC5X-xb.xml - - false - 0 @@ -310,7 +392,7 @@ 51 - + 8 0 0 @@ -320,9 +402,45 @@ 1024 0 0 - + SAI_LOG_SYSLOG + + control-acl + 2 + + IPCL0 + 1 + + + EPCL0 + 0 + + + + port-sFlow + 3 + + IPCL0 + 0 + + + EPCL0 + 0 + + + + port-counters-ipv4-ipv6 + 4 + + IPCL0 + 3 + + + EPCL0 + 0 + + \ No newline at end of file diff --git a/device/nokia/arm64-nokia_ixs7215_52xb-r0/installer.conf b/device/nokia/arm64-nokia_ixs7215_52xb-r0/installer.conf index 3d02aab20d..bcce80934d 100644 --- a/device/nokia/arm64-nokia_ixs7215_52xb-r0/installer.conf +++ b/device/nokia/arm64-nokia_ixs7215_52xb-r0/installer.conf @@ -1,2 +1 @@ -VAR_LOG_SIZE=4096 ONIE_PLATFORM_EXTRA_CMDLINE_LINUX="default_hugepagesz=32M hugepages=4 loglevel=4" diff --git a/device/nokia/arm64-nokia_ixs7215_52xb-r0/pcie.yaml b/device/nokia/arm64-nokia_ixs7215_52xb-r0/pcie.yaml new file mode 100644 index 0000000000..865f9090ee --- /dev/null +++ b/device/nokia/arm64-nokia_ixs7215_52xb-r0/pcie.yaml @@ -0,0 +1,10 @@ +- bus: '00' + dev: '00' + fn: '0' + id: '0110' + name: 'PCI bridge: Marvell Technology Group Ltd. 88F60x0/88F70x0/88F80x0/CN913x ARM SoC' +- bus: '01' + dev: '00' + fn: '0' + id: '9821' + name: 'Ethernet controller: Marvell Technology Group Ltd. Device 9821' diff --git a/device/nokia/arm64-nokia_ixs7215_52xb-r0/platform.json b/device/nokia/arm64-nokia_ixs7215_52xb-r0/platform.json index 0ddd1f3958..89a7a3e9dd 100644 --- a/device/nokia/arm64-nokia_ixs7215_52xb-r0/platform.json +++ b/device/nokia/arm64-nokia_ixs7215_52xb-r0/platform.json @@ -97,17 +97,22 @@ "high-crit-threshold": false }, { - "name": "AC5X CORE", + "name": "PCB MID", "controllable": false, "low-threshold": false, "low-crit-threshold": false, "high-crit-threshold": false }, { - "name": "OOB PHY", + "name": "ASIC", + "controllable": false, + "low-threshold": false, + "low-crit-threshold": false + }, + { + "name": "CPU CORE", "controllable": false, "low-threshold": false, - "high-threshold": false, "low-crit-threshold": false } ], diff --git a/device/nokia/arm64-nokia_ixs7215_52xb-r0/platform_reboot b/device/nokia/arm64-nokia_ixs7215_52xb-r0/platform_reboot old mode 100644 new mode 100755 index b99b9bcfe9..aeb9f87f15 --- a/device/nokia/arm64-nokia_ixs7215_52xb-r0/platform_reboot +++ b/device/nokia/arm64-nokia_ixs7215_52xb-r0/platform_reboot @@ -1,11 +1,13 @@ #!/bin/bash -function SafePwrCycle() { +function SafeReboot() { 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 + # Turn off watchdog monitor gpio for correct reboot-cause + sudo echo 1 > /sys/class/gpio/gpio41/value + cat /sys/bus/i2c/devices/0-0041/last_reset_cause > /dev/null 2&>1 + exec /sbin/reboot } -SafePwrCycle +SafeReboot diff --git a/device/nokia/arm64-nokia_ixs7215_52xb-r0/pmon_daemon_control.json b/device/nokia/arm64-nokia_ixs7215_52xb-r0/pmon_daemon_control.json deleted file mode 100644 index f6445f8759..0000000000 --- a/device/nokia/arm64-nokia_ixs7215_52xb-r0/pmon_daemon_control.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "skip_pcied": true -} diff --git a/device/nokia/arm64-nokia_ixs7215_52xb-r0/system_health_monitoring_config.json b/device/nokia/arm64-nokia_ixs7215_52xb-r0/system_health_monitoring_config.json index b4c438a104..d5f3a7b983 100644 --- a/device/nokia/arm64-nokia_ixs7215_52xb-r0/system_health_monitoring_config.json +++ b/device/nokia/arm64-nokia_ixs7215_52xb-r0/system_health_monitoring_config.json @@ -2,9 +2,7 @@ "services_to_ignore": [], "devices_to_ignore": [ "asic", - "psu.temperature", - "fan", - "psu" + "psu.temperature" ], "user_defined_checkers": [], "polling_interval": 60, diff --git a/platform/marvell-arm64/sonic-platform-nokia/7215/modules/Makefile b/platform/marvell-arm64/sonic-platform-nokia/7215/modules/Makefile index 73d6e5f388..d82a871c1c 100644 --- a/platform/marvell-arm64/sonic-platform-nokia/7215/modules/Makefile +++ b/platform/marvell-arm64/sonic-platform-nokia/7215/modules/Makefile @@ -1 +1 @@ -obj-m:= nokia_7215_ixs_a1_cpld.o ac5_thermal_sensor.o +obj-m:= nokia_7215_ixs_a1_cpld.o cn9130_cpu_thermal_sensor.o diff --git a/platform/marvell-arm64/sonic-platform-nokia/7215/modules/ac5_thermal_sensor.c b/platform/marvell-arm64/sonic-platform-nokia/7215/modules/ac5_thermal_sensor.c deleted file mode 100644 index faf4402ffe..0000000000 --- a/platform/marvell-arm64/sonic-platform-nokia/7215/modules/ac5_thermal_sensor.c +++ /dev/null @@ -1,218 +0,0 @@ -/* - * HWMON Driver for AC5x thermal sensor - * - * Author: Natarajan Subbiramani - * - * 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. - */ - -#include -#include -#include -#include -#include -#include -#include -#include - -#define AC5_DEFAULT_TEMP_CRIT 100000 -#define AC5_DEFAULT_TEMP_MAX 110000 - -#define AC5_TEMP_BASE_ADDR 0x944F80D0 -static unsigned long thermal_base_addr=AC5_TEMP_BASE_ADDR; -module_param(thermal_base_addr, ulong, 0444); -MODULE_PARM_DESC(thermal_base_addr, - "Initialize the base address of the thermal sensor"); - -struct ac5_thermal_data { - struct device *dev; - struct device *hwmon_dev; - uint8_t * __iomem temp_base; - int temp_input; - int temp_crit; - int temp_max; -}; - -static long ac5_thermal_read_reg_in_mcelcius(struct device *dev, struct ac5_thermal_data *data) -{ - volatile uint8_t * __iomem temp_base = data->temp_base; - uint32_t regval; - long output=data->temp_max; - - //STOP MEASUREMENT - writel(0xF0F01034, temp_base); - - //delay for 1ms - mdelay(1); - - //Read thermal value - regval = readl(temp_base+0xC); - - //RE-START MEASUREMENT - writel(0xF0F01035, temp_base); - - //Validate data - if(regval & 0x10000) { - //Calibrate it to milli-celcius - output = (regval>> 6) & 0x3FF; - output = ((output*42)-27250)*10; - } - - return output; -} -static int ac5_thermal_read(struct device *dev, enum hwmon_sensor_types type, - u32 attr, int channel, long *val) -{ - struct ac5_thermal_data *data = dev_get_drvdata(dev); - - switch (type) { - case hwmon_temp: - switch (attr) { - case hwmon_temp_input: - *val = ac5_thermal_read_reg_in_mcelcius(dev, data); - break; - case hwmon_temp_crit: - *val = data->temp_crit; - break; - case hwmon_temp_max: - *val = data->temp_max; - break; - default: - return -EINVAL; - } - break; - default: - return -EINVAL; - } - return 0; -} - -static int ac5_thermal_write(struct device *dev, enum hwmon_sensor_types type, - u32 attr, int channel, long val) -{ - struct ac5_thermal_data *data = dev_get_drvdata(dev); - switch (type) { - case hwmon_temp: - switch (attr) { - case hwmon_temp_crit: - data->temp_crit = val; - break; - case hwmon_temp_max: - data->temp_max = val; - break; - default: - return -EINVAL; - } - break; - default: - return -EINVAL; - } - return 0; -} - - -static umode_t ac5_thermal_is_visible(const void *data, enum hwmon_sensor_types type, - u32 attr, int channel) -{ - switch (type) { - case hwmon_temp: - switch (attr) { - case hwmon_temp_input: - return 0444; - case hwmon_temp_crit: - case hwmon_temp_max: - return 0644; - } - break; - default: - break; - } - return 0; -} - -static const struct hwmon_channel_info *ac5_thermal_info[] = { - HWMON_CHANNEL_INFO(temp, - HWMON_T_INPUT | HWMON_T_MAX | HWMON_T_CRIT), - NULL -}; - -static const struct hwmon_ops ac5_thermal_hwmon_ops = { - .is_visible = ac5_thermal_is_visible, - .read = ac5_thermal_read, - .write = ac5_thermal_write, -}; - -static const struct hwmon_chip_info ac5_thermal_chip_info = { - .ops = &ac5_thermal_hwmon_ops, - .info = ac5_thermal_info, -}; - -static const struct file_operations fops = { - .owner = THIS_MODULE, -}; - -struct miscdevice ac5_thermal_misc_device = { - .minor = TEMP_MINOR, - .name = "ac5_thermal", - .fops = &fops, -}; - -static int __init ac5_thermal_init_misc_driver(void) -{ - struct device *dev; - struct ac5_thermal_data *thermal_data; - int err; - void * __iomem reg; - - err = misc_register(&ac5_thermal_misc_device); - if (err) { - pr_err("ac5_thermal misc_register failed!!!\n"); - return err; - } - - dev = ac5_thermal_misc_device.this_device; - thermal_data = devm_kzalloc(dev, sizeof(struct ac5_thermal_data), GFP_KERNEL); - if (!thermal_data) - return -ENOMEM; - - thermal_data->dev = dev; - thermal_data->temp_crit = AC5_DEFAULT_TEMP_CRIT; - thermal_data->temp_max = AC5_DEFAULT_TEMP_MAX; - - thermal_data->hwmon_dev = devm_hwmon_device_register_with_info(dev, ac5_thermal_misc_device.name, - thermal_data, &ac5_thermal_chip_info, - NULL); - if (IS_ERR(thermal_data->hwmon_dev)) { - dev_err(dev, "%s: hwmon registration failed.\n", ac5_thermal_misc_device.name); - return PTR_ERR(thermal_data->hwmon_dev); - } - - reg = devm_ioremap(dev, thermal_base_addr, 16); - if (IS_ERR(reg)) { - dev_err(dev, "%s: base addr remap failed\n", ac5_thermal_misc_device.name); - return PTR_ERR(reg); - } - thermal_data->temp_base = reg; - /*Enable measurement*/ - writel(0xF0F01035, thermal_data->temp_base); - writel(0x0584e680, thermal_data->temp_base+8); - - dev_info(dev, "%s: initialized. base_addr: 0x%lx\n", dev_name(thermal_data->hwmon_dev), thermal_base_addr); - - return 0; -} - -static void __exit ac5_thermal_exit_misc_driver(void) -{ - misc_deregister(&ac5_thermal_misc_device); -} - -module_init(ac5_thermal_init_misc_driver); -module_exit(ac5_thermal_exit_misc_driver); - -MODULE_AUTHOR("Natarajan Subbiramani "); -MODULE_DESCRIPTION("AC5 Thermal sensor Driver"); -MODULE_LICENSE("GPL"); diff --git a/platform/marvell-arm64/sonic-platform-nokia/7215/modules/cn9130_cpu_thermal_sensor.c b/platform/marvell-arm64/sonic-platform-nokia/7215/modules/cn9130_cpu_thermal_sensor.c new file mode 100644 index 0000000000..e11e281579 --- /dev/null +++ b/platform/marvell-arm64/sonic-platform-nokia/7215/modules/cn9130_cpu_thermal_sensor.c @@ -0,0 +1,242 @@ +/* + * HWMON Driver for CN9130 thermal sensor + * + * Author: Natarajan Subbiramani + * + * 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. + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#define CN9130_DEFAULT_TEMP_CRIT 100000 +#define CN9130_DEFAULT_TEMP_MAX 106000 + +#define CN9130_TEMP_BASE_ADDR 0xF06F8080 +#define CN9130_TSEN_REG_CTRL_0_OFFSET 0x4 +#define CN9130_TSEN_REG_CTRL_1_OFFSET 0x8 +#define CN9130_TSEN_REG_STATUS_OFFSET 0xC +#define CN9130_TSEN_SENSOR_MAX_ID 6 +static unsigned long thermal_base_addr=CN9130_TEMP_BASE_ADDR; +module_param(thermal_base_addr, ulong, 0444); +MODULE_PARM_DESC(thermal_base_addr, + "Initialize the base address of the thermal sensor"); + +struct cn9130_thermal_data { + struct device *dev; + struct device *hwmon_dev; + uint8_t * __iomem temp_base; + int temp_input; + int temp_crit; + int temp_max; +}; + +static long cn9130_thermal_read_reg_in_mcelcius(struct device *dev, struct cn9130_thermal_data *data) +{ + volatile uint8_t * __iomem temp_base = data->temp_base; + uint32_t regval; + uint32_t status_regval=0; + uint32_t output=data->temp_max; + + //STOP MEASUREMENT + regval = readl(temp_base+CN9130_TSEN_REG_CTRL_0_OFFSET); + regval &= ~( 1 << 0); //TSEN_STOP + writel(regval, temp_base+CN9130_TSEN_REG_CTRL_0_OFFSET); + + //delay for 1ms + mdelay(1); + + //Read thermal value + status_regval = readl(temp_base+CN9130_TSEN_REG_STATUS_OFFSET); + dev_dbg(dev, "%s: cn9130_thermal_read_reg_in_mcelcius: addr: 0x%lx value:0x%x\n", dev_name(data->hwmon_dev), temp_base+CN9130_TSEN_REG_STATUS_OFFSET, status_regval); + + //START MEASUREMENT + regval = readl(temp_base+CN9130_TSEN_REG_CTRL_0_OFFSET); + regval |= 1 << 0; //TSEN_START + writel(regval, temp_base+CN9130_TSEN_REG_CTRL_0_OFFSET); + + //Validate data + if(status_regval &= 0x3ff) { + //Convert it to milli-celcius + output = 150000 - (~(status_regval-1) & 0x3ff) * 423; + } + + return output; +} +static int cn9130_thermal_read(struct device *dev, enum hwmon_sensor_types type, + u32 attr, int channel, long *val) +{ + struct cn9130_thermal_data *data = dev_get_drvdata(dev); + + switch (type) { + case hwmon_temp: + switch (attr) { + case hwmon_temp_input: + *val = cn9130_thermal_read_reg_in_mcelcius(dev, data); + break; + case hwmon_temp_crit: + *val = data->temp_crit; + break; + case hwmon_temp_max: + *val = data->temp_max; + break; + default: + return -EINVAL; + } + break; + default: + return -EINVAL; + } + return 0; +} + +static int cn9130_thermal_write(struct device *dev, enum hwmon_sensor_types type, + u32 attr, int channel, long val) +{ + struct cn9130_thermal_data *data = dev_get_drvdata(dev); + switch (type) { + case hwmon_temp: + switch (attr) { + case hwmon_temp_crit: + data->temp_crit = val; + break; + case hwmon_temp_max: + data->temp_max = val; + break; + default: + return -EINVAL; + } + break; + default: + return -EINVAL; + } + return 0; +} + + +static umode_t cn9130_thermal_is_visible(const void *data, enum hwmon_sensor_types type, + u32 attr, int channel) +{ + switch (type) { + case hwmon_temp: + switch (attr) { + case hwmon_temp_input: + return 0444; + case hwmon_temp_crit: + case hwmon_temp_max: + return 0644; + } + break; + default: + break; + } + return 0; +} + +static const struct hwmon_channel_info *cn9130_thermal_info[] = { + HWMON_CHANNEL_INFO(temp, + HWMON_T_INPUT | HWMON_T_MAX | HWMON_T_CRIT), + NULL +}; + +static const struct hwmon_ops cn9130_thermal_hwmon_ops = { + .is_visible = cn9130_thermal_is_visible, + .read = cn9130_thermal_read, + .write = cn9130_thermal_write, +}; + +static const struct hwmon_chip_info cn9130_thermal_chip_info = { + .ops = &cn9130_thermal_hwmon_ops, + .info = cn9130_thermal_info, +}; + +static const struct file_operations fops = { + .owner = THIS_MODULE, +}; + +struct miscdevice cn9130_thermal_device = { + .minor = TEMP_MINOR, + .name = "cn9130_thermal", + .fops = &fops, +}; + +static int __init cn9130_thermal_init_driver(void) +{ + struct device *dev; + struct cn9130_thermal_data *thermal_data; + int err; + void * __iomem reg; + uint32_t regval=0; + + err = misc_register(&cn9130_thermal_device); + if (err) { + pr_err("cn9130_thermal misc_register failed!!!\n"); + return err; + } + + dev = cn9130_thermal_device.this_device; + thermal_data = devm_kzalloc(dev, sizeof(struct cn9130_thermal_data), GFP_KERNEL); + if (!thermal_data) + return -ENOMEM; + + thermal_data->dev = dev; + thermal_data->temp_crit = CN9130_DEFAULT_TEMP_CRIT; + thermal_data->temp_max = CN9130_DEFAULT_TEMP_MAX; + + thermal_data->hwmon_dev = devm_hwmon_device_register_with_info(dev, cn9130_thermal_device.name, + thermal_data, &cn9130_thermal_chip_info, + NULL); + if (IS_ERR(thermal_data->hwmon_dev)) { + dev_err(dev, "%s: hwmon registration failed.\n", cn9130_thermal_device.name); + return PTR_ERR(thermal_data->hwmon_dev); + } + + reg = devm_ioremap(dev, thermal_base_addr, 16); + if (IS_ERR(reg)) { + dev_err(dev, "%s: base addr remap failed\n", cn9130_thermal_device.name); + return PTR_ERR(reg); + } + thermal_data->temp_base = reg; + + /*Enable measurement*/ + regval = readl(thermal_data->temp_base+CN9130_TSEN_REG_CTRL_0_OFFSET); + regval |= 1 << 2; //TSEN_EN + writel(regval, thermal_data->temp_base+CN9130_TSEN_REG_CTRL_0_OFFSET); + mdelay(10); + + // Set temperature reading zone as max reading + regval = readl(thermal_data->temp_base+CN9130_TSEN_REG_CTRL_1_OFFSET); + regval &= ~(0x7 << 21); + regval |= (CN9130_TSEN_SENSOR_MAX_ID & 0x7) << 21; + writel(regval, thermal_data->temp_base+CN9130_TSEN_REG_CTRL_1_OFFSET); + + //START MEASUREMENT + regval = readl(thermal_data->temp_base+CN9130_TSEN_REG_CTRL_0_OFFSET); + regval |= 1 << 0; //TSEN_START + writel(regval, thermal_data->temp_base+CN9130_TSEN_REG_CTRL_0_OFFSET); + + dev_info(dev, "%s: initialized. base_addr: 0x%lx virt_addr:0x%lx\n", dev_name(thermal_data->hwmon_dev), thermal_base_addr, thermal_data->temp_base); + + return 0; +} + +static void __exit cn9101_thermal_exit_driver(void) +{ + misc_deregister(&cn9130_thermal_device); +} + +module_init(cn9130_thermal_init_driver); +module_exit(cn9101_thermal_exit_driver); + +MODULE_AUTHOR("Natarajan Subbiramani "); +MODULE_DESCRIPTION("CN9130 CPU Thermal sensor Driver"); +MODULE_LICENSE("GPL"); diff --git a/platform/marvell-arm64/sonic-platform-nokia/7215/scripts/cpu_wdt.py b/platform/marvell-arm64/sonic-platform-nokia/7215/scripts/cpu_wdt.py new file mode 100755 index 0000000000..b23cd46566 --- /dev/null +++ b/platform/marvell-arm64/sonic-platform-nokia/7215/scripts/cpu_wdt.py @@ -0,0 +1,46 @@ +#!/usr/bin/python + +from sonic_platform.chassis import Chassis +from sonic_py_common import logger +import time +import os +import signal +import sys + + +TIMEOUT=180 +KEEPALIVE=60 +sonic_logger = logger.Logger('Watchdog') +sonic_logger.set_min_log_priority_info() +time.sleep(60) +chassis = Chassis() +watchdog = chassis.get_watchdog() + +def stopWdtService(signal, frame): + watchdog._disablewatchdog() + sonic_logger.log_notice("CPUWDT Disabled: watchdog armed=%s" % watchdog.is_armed() ) + sys.exit() + +def main(): + + signal.signal(signal.SIGHUP, signal.SIG_IGN) + signal.signal(signal.SIGINT, stopWdtService) + signal.signal(signal.SIGTERM, stopWdtService) + + watchdog.arm(TIMEOUT) + sonic_logger.log_notice("CPUWDT Enabled: watchdog armed=%s" % watchdog.is_armed() ) + + + while True: + time.sleep(KEEPALIVE) + watchdog._keepalive() + sonic_logger.log_info("CPUWDT keepalive") + done + + stopWdtService + + return + + +if __name__ == '__main__': + main() diff --git a/platform/marvell-arm64/sonic-platform-nokia/7215/service/cpu_wdt.service b/platform/marvell-arm64/sonic-platform-nokia/7215/service/cpu_wdt.service new file mode 100644 index 0000000000..761deec569 --- /dev/null +++ b/platform/marvell-arm64/sonic-platform-nokia/7215/service/cpu_wdt.service @@ -0,0 +1,8 @@ +[Unit] +Description=CPU WDT +After=nokia-7215init.service +[Service] +ExecStart=/usr/local/bin/cpu_wdt.py + +[Install] +WantedBy=multi-user.target diff --git a/platform/marvell-arm64/sonic-platform-nokia/7215/sonic_platform/chassis.py b/platform/marvell-arm64/sonic-platform-nokia/7215/sonic_platform/chassis.py index 11eeb15106..19007a3b4d 100644 --- a/platform/marvell-arm64/sonic-platform-nokia/7215/sonic_platform/chassis.py +++ b/platform/marvell-arm64/sonic-platform-nokia/7215/sonic_platform/chassis.py @@ -35,7 +35,7 @@ MAX_7215_COMPONENT=2 MAX_7215_FAN_DRAWERS = 2 MAX_7215_FANS_PER_DRAWER = 1 MAX_7215_PSU = 2 -MAX_7215_THERMAL = 4 +MAX_7215_THERMAL = 5 CPLD_DIR = "/sys/bus/i2c/devices/0-0041/" SYSLOG_IDENTIFIER = "chassis" @@ -92,7 +92,7 @@ class Chassis(ChassisBase): 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 = Fan(fan_index, drawer, self.get_model()) fan_index += 1 drawer._fan_list.append(fan) self._fan_list.append(fan) @@ -259,10 +259,21 @@ class Chassis(ChassisBase): 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) + value = self._read_sysfs_file(CPLD_DIR+"last_reset_cause") + thermal = self._read_sysfs_file(CPLD_DIR+"temp_event_status") + if (value == 'cold_reset'): + reboot_cause=(ChassisBase.REBOOT_CAUSE_POWER_LOSS, "Cold Reset") + elif (value == 'warm_reset'): + reboot_cause=(ChassisBase.REBOOT_CAUSE_HARDWARE_OTHER, "Warm Reset") + elif (value == 'wdog_reset'): + reboot_cause=(ChassisBase.REBOOT_CAUSE_WATCHDOG, None) + elif (value == 'thermal_reset'): + reboot_cause=(ChassisBase.REBOOT_CAUSE_THERMAL_OVERLOAD_OTHER, thermal) + else: + reboot_cause=(ChassisBase.REBOOT_CAUSE_NON_HARDWARE, None) + #unmask temperature event + self._write_sysfs_file(CPLD_DIR+"temp_event_mask", 0) + return reboot_cause def get_watchdog(self): """ diff --git a/platform/marvell-arm64/sonic-platform-nokia/7215/sonic_platform/component.py b/platform/marvell-arm64/sonic-platform-nokia/7215/sonic_platform/component.py index cda5abc3c2..f4d0129119 100644 --- a/platform/marvell-arm64/sonic-platform-nokia/7215/sonic_platform/component.py +++ b/platform/marvell-arm64/sonic-platform-nokia/7215/sonic_platform/component.py @@ -175,7 +175,7 @@ class Component(ComponentBase): 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') + cmdstatus, uboot_version = cmd.getstatusoutput('grep --null-data ^U-Boot /dev/mtd0ro | cut -d" " -f4') return uboot_version def install_firmware(self, image_path): diff --git a/platform/marvell-arm64/sonic-platform-nokia/7215/sonic_platform/eeprom.py b/platform/marvell-arm64/sonic-platform-nokia/7215/sonic_platform/eeprom.py index 4abfad47be..b9f770abf9 100644 --- a/platform/marvell-arm64/sonic-platform-nokia/7215/sonic_platform/eeprom.py +++ b/platform/marvell-arm64/sonic-platform-nokia/7215/sonic_platform/eeprom.py @@ -41,8 +41,7 @@ class Eeprom(TlvInfoDecoder): self.index = psu_index self.part_number = '1' self.model_str = 'PJT-12V100WBBA' - self.serial_number = 'NA' - self.serial_number = 'NA' + self.serial_number = 'NA' if self.is_fan_eeprom: self.index = fan_index diff --git a/platform/marvell-arm64/sonic-platform-nokia/7215/sonic_platform/fan.py b/platform/marvell-arm64/sonic-platform-nokia/7215/sonic_platform/fan.py index aa4a51a95d..b86370dc0e 100644 --- a/platform/marvell-arm64/sonic-platform-nokia/7215/sonic_platform/fan.py +++ b/platform/marvell-arm64/sonic-platform-nokia/7215/sonic_platform/fan.py @@ -16,8 +16,8 @@ try: except ImportError as e: raise ImportError(str(e) + "- required module not found") -MAX_IXS7215_FAN_SPEED = 24000 -WORKING_IXS7215_FAN_SPEED = 2400 +MAX_IXS7215_FAN_SPEED = 23000 +WORKING_IXS7215_FAN_SPEED = 2300 sonic_logger = logger.Logger('fan') @@ -26,10 +26,10 @@ 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): + def __init__(self, fan_index, fan_drawer, chassis_model, psu_fan=False, dependency=None): self.is_psu_fan = psu_fan EMC2302_DIR = " " - i2c_path = "/sys/bus/i2c/devices/0-002e/hwmon/" + i2c_path = "/sys/bus/i2c/devices/0-002f/hwmon/" if(os.path.exists(i2c_path)): hwmon_node = os.listdir(i2c_path)[0] EMC2302_DIR = i2c_path + hwmon_node + '/' @@ -38,6 +38,7 @@ class Fan(FanBase): # Fan is 1-based in Nokia platforms self.index = fan_index + 1 self.fan_drawer = fan_drawer + self.chassis_model = chassis_model 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 @@ -116,7 +117,16 @@ class Fan(FanBase): Returns: string: Model number of Fan. Use part number for this. """ - return self.eeprom.part_number_str() + return self.eeprom.modelstr() + + def get_chassis_model(self): + """ + Retrieves the model number of the Fan + + Returns: + string: Model number of Fan. Use part number for this. + """ + return self.chassis_model def get_serial(self): """ @@ -169,8 +179,14 @@ class Fan(FanBase): A string, either FAN_DIRECTION_INTAKE or FAN_DIRECTION_EXHAUST depending on fan direction """ + ch_model=self.get_chassis_model() + #compare first 8 characters of chassis molel string + if(ch_model[:8]=='3HE18723'): + direction = 'intake' + else: + direction = 'exhaust' - return 'intake' + return direction def get_position_in_parent(self): """ @@ -219,8 +235,10 @@ class Fan(FanBase): which is considered tolerable """ if self.get_presence(): - # The tolerance value is fixed as 25% for this platform - tolerance = 50 + if self.get_target_speed()<50: + tolerance=60 + else: + tolerance = 25 else: tolerance = 0 diff --git a/platform/marvell-arm64/sonic-platform-nokia/7215/sonic_platform/psu.py b/platform/marvell-arm64/sonic-platform-nokia/7215/sonic_platform/psu.py index eb8aeeaedf..8249954932 100644 --- a/platform/marvell-arm64/sonic-platform-nokia/7215/sonic_platform/psu.py +++ b/platform/marvell-arm64/sonic-platform-nokia/7215/sonic_platform/psu.py @@ -19,6 +19,8 @@ except ImportError as e: sonic_logger = logger.Logger('psu') INA230_DIR = "/sys/bus/i2c/devices/0-0040/iio:device0/" CPLD_DIR = "/sys/bus/i2c/devices/0-0041/" +PSU_GPIO_DIR = ["/sys/class/gpio/gpio61/value", "/sys/class/gpio/gpio62/value"] + class Psu(PsuBase): """Nokia platform-specific PSU class for 7215 """ @@ -32,6 +34,8 @@ class Psu(PsuBase): # PSU eeprom self.eeprom = Eeprom(is_psu=True, psu_index=self.index) + self.MAX_VOLTAGE = 14 + self.MIN_VOLTAGE = 10 def _read_sysfs_file(self, sysfs_file): # On successful read, returns the value read from given @@ -80,8 +84,8 @@ class Psu(PsuBase): 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") + psu1_good = self._read_sysfs_file(PSU_GPIO_DIR[0]) + psu2_good = self._read_sysfs_file(PSU_GPIO_DIR[1]) active_psus = int(psu1_good) + int(psu2_good) @@ -150,7 +154,7 @@ class Psu(PsuBase): Returns: bool: True if PSU is operating properly, False if not """ - psu_sysfs_str=CPLD_DIR+"psu{}_power_good".format(self.index) + psu_sysfs_str=PSU_GPIO_DIR[self.index-1] psu_status = self._read_sysfs_file(psu_sysfs_str) if psu_status == '1': @@ -212,6 +216,26 @@ class Psu(PsuBase): """ return self.index + def get_voltage_high_threshold(self): + """ + Retrieves the high threshold PSU voltage output + + Returns: + A float number, the high threshold output voltage in volts, + e.g. 12.1 + """ + return self.MAX_VOLTAGE + + def get_voltage_low_threshold(self): + """ + Retrieves the low threshold PSU voltage output + + Returns: + A float number, the low threshold output voltage in volts, + e.g. 12.1 + """ + return self.MIN_VOLTAGE + def is_replaceable(self): """ Indicate whether this device is replaceable. @@ -227,7 +251,7 @@ class Psu(PsuBase): 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_sysfs_str=PSU_GPIO_DIR[self.index-1] psu_pg_status = self._read_sysfs_file(psu_sysfs_str) if psu_pg_status == '1': @@ -294,4 +318,4 @@ class Psu(PsuBase): if status == "ERR": return False - return True \ No newline at end of file + return True diff --git a/platform/marvell-arm64/sonic-platform-nokia/7215/sonic_platform/sfp.py b/platform/marvell-arm64/sonic-platform-nokia/7215/sonic_platform/sfp.py index 4cb96ed470..b682080e18 100644 --- a/platform/marvell-arm64/sonic-platform-nokia/7215/sonic_platform/sfp.py +++ b/platform/marvell-arm64/sonic-platform-nokia/7215/sonic_platform/sfp.py @@ -30,7 +30,7 @@ logger = Logger() class Sfp(SfpOptoeBase): """ - Nokia IXR-7215 Platform-specific Sfp refactor class + Nokia IXS-7215 Platform-specific Sfp refactor class """ instances = [] diff --git a/platform/marvell-arm64/sonic-platform-nokia/7215/sonic_platform/thermal.py b/platform/marvell-arm64/sonic-platform-nokia/7215/sonic_platform/thermal.py index 5a8a084cfc..20c15452b6 100644 --- a/platform/marvell-arm64/sonic-platform-nokia/7215/sonic_platform/thermal.py +++ b/platform/marvell-arm64/sonic-platform-nokia/7215/sonic_platform/thermal.py @@ -10,6 +10,7 @@ try: import os from sonic_platform_base.thermal_base import ThermalBase + from swsscommon.swsscommon import SonicV2Connector from sonic_py_common import logger except ImportError as e: raise ImportError(str(e) + "- required module not found") @@ -21,12 +22,13 @@ class Thermal(ThermalBase): I2C_CLASS_DIR = "/sys/class/i2c-adapter/" I2C_DEV_MAPPING = (['i2c-0/0-0048/hwmon/', 1], - ['i2c-0/0-0049/hwmon/', 1]) + ['i2c-0/0-0049/hwmon/', 1], + ['i2c-0/0-004a/hwmon/', 1]) - HWMON_CLASS_DIR = "/sys/class/hwmon/hwmon0/" - AC5X_THERMAL_DIR = "/sys/class/hwmon/hwmon1/" + CN9130_THERMAL_DIR = "/sys/class/hwmon/hwmon1/" + ASIC_TEMP_INFO = "ASIC_TEMPERATURE_INFO" - THERMAL_NAME = ("PCB BACK", "PCB FRONT", "AC5X CORE", "OOB PHY") + THERMAL_NAME = ("PCB BACK", "PCB FRONT", "PCB MID", "ASIC", "CPU CORE") def __init__(self, thermal_index): ThermalBase.__init__(self) @@ -37,7 +39,7 @@ class Thermal(ThermalBase): self._maximum = None self.thermal_high_threshold_file = None # PCB temperature sensors - if self.index < 3: + if self.index < 4: 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 = "max" @@ -45,24 +47,26 @@ class Thermal(ThermalBase): hwmon_node = os.listdir(i2c_path)[0] self.SENSOR_DIR = i2c_path + hwmon_node + '/' - # SOC temperature sensor - elif self.index == 3: - dev_path = self.AC5X_THERMAL_DIR - sensor_index = 1 - sensor_high_suffix = "max" - sensor_high_crit_suffix = None - self.SENSOR_DIR = dev_path - # - else: - dev_path = self.HWMON_CLASS_DIR - sensor_index = 1 + #ASIC temperature sensor + elif self.index == 4: sensor_high_suffix = None - sensor_high_crit_suffix = "crit" + sensor_high_crit_suffix = None + self.sensor_high_threshold = 100.0 + self.sensor_crit_threshold = 110.0 + self.SENSOR_DIR = None + + # CPU CN9130 temperature sensor + elif self.index == 5: + dev_path = self.CN9130_THERMAL_DIR + sensor_index = 1 + sensor_high_suffix = "crit" + sensor_high_crit_suffix = "max" self.SENSOR_DIR = dev_path # sysfs file for current temperature value - self.thermal_temperature_file = self.SENSOR_DIR \ - + "temp{}_input".format(sensor_index) + if self.SENSOR_DIR: + 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: @@ -156,16 +160,23 @@ class Thermal(ThermalBase): 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 + #read from state_db for asic temperature + if self.index == 4: + db = SonicV2Connector() + db.connect(db.STATE_DB) + data_dict = db.get_all(db.STATE_DB, self.ASIC_TEMP_INFO) + thermal_temperature = float(data_dict['maximum_temperature']) else: - thermal_temperature = 0 + thermal_temperature = self._read_sysfs_file(self.thermal_temperature_file) + if (thermal_temperature != 'ERR'): + thermal_temperature = float(thermal_temperature) / 1000 + else: + thermal_temperature = 0 + + 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 return float("{:.3f}".format(thermal_temperature)) @@ -178,12 +189,13 @@ class Thermal(ThermalBase): Celsius up to nearest thousandth of one degree Celsius, e.g. 30.125 """ + if self.index == 4: + return float("{:.3f}".format(self.sensor_high_threshold)) # 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) + 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: @@ -213,7 +225,8 @@ class Thermal(ThermalBase): A float number, the high critical threshold temperature of thermal in Celsius up to nearest thousandth of one degree Celsius, e.g. 30.125 """ - + if self.index == 4: + return float("{:.3f}".format(self.sensor_crit_threshold)) # Not implemented for this sensor if not self.thermal_high_crit_threshold_file: raise NotImplementedError diff --git a/platform/marvell-arm64/sonic-platform-nokia/7215/sonic_platform/thermal_infos.py b/platform/marvell-arm64/sonic-platform-nokia/7215/sonic_platform/thermal_infos.py index cf9b0cdee6..0f03ee7a4f 100644 --- a/platform/marvell-arm64/sonic-platform-nokia/7215/sonic_platform/thermal_infos.py +++ b/platform/marvell-arm64/sonic-platform-nokia/7215/sonic_platform/thermal_infos.py @@ -73,14 +73,22 @@ class ThermalInfo(ThermalPolicyInfoBase): self._current_threshold_level = 0 self._num_fan_levels = 3 self._high_crital_threshold = 75 - self._level_up_threshold = [[31,39,58,46], - [39,46,65,54], - [51,57,77,68]] + #THERMAL_NAME ("PCB BACK", "PCB FRONT", "PCB MID", "ASIC", "CPU CORE") + self._f2b_level_up_threshold = [[38,30,37,60,77], + [51,44,50,72,90], + [61,57,61,77,94]] - self._level_down_threshold = [[24,31,47,40], - [31,38,53,46], - [48,54,72,63]] - + self._f2b_level_down_threshold = [[29,24,29,50,64], + [40,37,40,59,75], + [58,54,58,72,90]] + + self._b2f_level_up_threshold = [[30,38,41,65,71], + [43,50,54,76,86], + [53,59,61,79,92]] + + self._b2f_level_down_threshold = [[22,30,33,54,60], + [37,44,46,62,73], + [51,57,58,75,90]] def collect(self, chassis): """ Collect thermal sensor temperature change status @@ -99,6 +107,13 @@ class ThermalInfo(ThermalPolicyInfoBase): for index in range(num_of_thermals): self._temps.insert(index, chassis.get_thermal(index).get_temperature()) + fan_direction=chassis.get_fan(1).get_direction() + if(fan_direction == "intake"): + level_up_threshold=self._f2b_level_up_threshold + level_down_threshold=self._f2b_level_down_threshold + else: + level_up_threshold=self._b2f_level_up_threshold + level_down_threshold=self._b2f_level_down_threshold # Find current required threshold level max_level =0 @@ -106,10 +121,10 @@ class ThermalInfo(ThermalPolicyInfoBase): for index in range(num_of_thermals): for level in range(self._num_fan_levels): - if self._temps[index]>self._level_up_threshold[level][index]: + if self._temps[index]>level_up_threshold[level][index]: if max_levellevel: min_level[index]=level diff --git a/platform/marvell-arm64/sonic-platform-nokia/7215/sonic_platform/watchdog.py b/platform/marvell-arm64/sonic-platform-nokia/7215/sonic_platform/watchdog.py index cf655448d6..052a276af4 100644 --- a/platform/marvell-arm64/sonic-platform-nokia/7215/sonic_platform/watchdog.py +++ b/platform/marvell-arm64/sonic-platform-nokia/7215/sonic_platform/watchdog.py @@ -6,9 +6,8 @@ provides access to hardware watchdog import os import fcntl import array - +import time from sonic_platform_base.watchdog_base import WatchdogBase -from sonic_py_common import logger """ ioctl constants """ IO_WRITE = 0x40000000 @@ -34,13 +33,12 @@ WDIOS_DISABLECARD = 0x0001 WDIOS_ENABLECARD = 0x0002 """ watchdog sysfs """ -WD_SYSFS_PATH = "/sys/class/watchdog/" +WD_SYSFS_PATH = "/sys/class/watchdog/watchdog0/" +WD_GPIO_PATH = "/sys/class/gpio/gpio41/value" +CPLD_DIR = "/sys/bus/i2c/devices/0-0041/" WD_COMMON_ERROR = -1 -sonic_logger = logger.Logger() - - class WatchdogImplBase(WatchdogBase): """ Base class that implements common logic for interacting @@ -53,34 +51,53 @@ class WatchdogImplBase(WatchdogBase): @param wd_device_path Path to watchdog device """ super(WatchdogImplBase, self).__init__() - + + self.watchdog="" 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.watchdog_gpio_reg = WD_GPIO_PATH + self.wd_state_reg = WD_SYSFS_PATH+"state" + self.wd_timeout_reg = WD_SYSFS_PATH+"timeout" + self.wd_timeleft_reg = WD_SYSFS_PATH+"timeleft" + 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 ") + 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: - self._disablewatchdog() - self.armed = False - self.timeout = 0 - except IOError: - return False + with open(sysfs_file, 'r') as fd: + rv = fd.read() + except Exception as e: + rv = 'ERR' - return True + 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 _disablewatchdog(self): """ @@ -89,6 +106,23 @@ class WatchdogImplBase(WatchdogBase): req = array.array('h', [WDIOS_DISABLECARD]) fcntl.ioctl(self.watchdog, WDIOC_SETOPTIONS, req, False) + self._write_sysfs_file(self.watchdog_gpio_reg, 1) + self._read_sysfs_file(CPLD_DIR+"last_reset_cause") + + 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 _settimeout(self, seconds): """ @@ -107,11 +141,10 @@ class WatchdogImplBase(WatchdogBase): Get watchdog timeout @return watchdog timeout """ + timeout=0 + timeout=self._read_sysfs_file(self.wd_timeout_reg) - req = array.array('I', [0]) - fcntl.ioctl(self.watchdog, WDIOC_GETTIMEOUT, req, True) - - return int(req[0]) + return timeout def _gettimeleft(self): """ @@ -128,47 +161,62 @@ class WatchdogImplBase(WatchdogBase): """ Implements arm WatchdogBase API """ - sonic_logger.log_info(" Debug arm watchdog4 ") - ret = WD_COMMON_ERROR - if seconds < 0: - return ret + ret = WD_COMMON_ERROR + if (seconds < 0 or seconds > 340 ): + return ret + # Stop the watchdog service to gain access of watchdog file pointer + if self.is_armed(): + os.popen("systemctl stop cpu_wdt.service") + time.sleep(2) + if not self.watchdog: + self.watchdog = os.open(self.watchdog_path, os.O_WRONLY) try: if self.timeout != seconds: self.timeout = self._settimeout(seconds) - if self.armed: + if self.is_armed(): self._keepalive() else: - sonic_logger.log_info(" Debug arm watchdog5 ") self._enablewatchdog() - self.armed = True ret = self.timeout except IOError: pass - + if(ret == seconds): + self._write_sysfs_file(self.watchdog_gpio_reg, 0) return ret - def _enablewatchdog(self): - """ - Turn on the watchdog timer + def disarm(self): """ + Implements disarm WatchdogBase API - req = array.array('h', [WDIOS_ENABLECARD]) - fcntl.ioctl(self.watchdog, WDIOC_SETOPTIONS, req, False) - - def _keepalive(self): + Returns: + A boolean, True if watchdog is disarmed successfully, False + if not """ - Keep alive watchdog timer - """ - - fcntl.ioctl(self.watchdog, WDIOC_KEEPALIVE) + + if self.is_armed(): + os.popen("systemctl stop cpu_wdt.service") + time.sleep(2) + if not self.watchdog: + self.watchdog = os.open(self.watchdog_path, os.O_WRONLY) + try: + self._disablewatchdog() + self.timeout = 0 + except IOError: + return False + return True def is_armed(self): """ Implements is_armed WatchdogBase API """ + status = False - return self.armed + state = self._read_sysfs_file(self.wd_state_reg) + if (state != 'inactive'): + status = True + + return status def get_remaining_time(self): """ @@ -177,10 +225,7 @@ class WatchdogImplBase(WatchdogBase): timeleft = WD_COMMON_ERROR - if self.armed: - try: - timeleft = self._gettimeleft() - except IOError: - pass + if self.is_armed(): + timeleft=self._read_sysfs_file(self.wd_timeleft_reg) - return timeleft + return int(timeleft) diff --git a/platform/marvell-arm64/sonic-platform-nokia/debian/rules b/platform/marvell-arm64/sonic-platform-nokia/debian/rules index 27015185a1..de6ed670d0 100755 --- a/platform/marvell-arm64/sonic-platform-nokia/debian/rules +++ b/platform/marvell-arm64/sonic-platform-nokia/debian/rules @@ -33,7 +33,7 @@ build: (for mod in $(MODULE_DIRS); do \ cd $(MOD_SRC_DIR)/../$(PRESTERA_MODULE_SRC)/; \ make clean; \ - make modules -C $(KERNEL_SRC)/build M=`pwd` CONFIG_KM_MVMBUS=y CONFIG_KM_MVINT=y || exit 1; \ + make modules -C $(KERNEL_SRC)/build M=`pwd` CONFIG_KM_MVPCI=y CONFIG_KM_MVINT=y || exit 1; \ mkdir $(MOD_SRC_DIR)/$${mod}/$(MRVL_MODULE_DIR); \ cp *.ko $(MOD_SRC_DIR)/$${mod}/$(MRVL_MODULE_DIR)/; \ cd $(MOD_SRC_DIR); \ diff --git a/platform/marvell-arm64/sonic-platform-nokia/debian/sonic-platform-nokia-7215.install b/platform/marvell-arm64/sonic-platform-nokia/debian/sonic-platform-nokia-7215.install index ec9e8d9f60..efa3c696be 100644 --- a/platform/marvell-arm64/sonic-platform-nokia/debian/sonic-platform-nokia-7215.install +++ b/platform/marvell-arm64/sonic-platform-nokia/debian/sonic-platform-nokia-7215.install @@ -1,4 +1,6 @@ 7215/scripts/nokia-7215-init.sh usr/local/bin +7215/scripts/cpu_wdt.py usr/local/bin 7215/service/nokia-7215init.service etc/systemd/system +7215/service/cpu_wdt.service etc/systemd/system 7215/sonic_platform-1.0-py3-none-any.whl usr/share/sonic/device/arm64-nokia_ixs7215_52xb-r0 ../mrvl-prestera/platform/arm64/ac5x/* / diff --git a/platform/marvell-arm64/sonic-platform-nokia/debian/sonic-platform-nokia-7215.postinst b/platform/marvell-arm64/sonic-platform-nokia/debian/sonic-platform-nokia-7215.postinst index e48b6feee7..949cd1a289 100644 --- a/platform/marvell-arm64/sonic-platform-nokia/debian/sonic-platform-nokia-7215.postinst +++ b/platform/marvell-arm64/sonic-platform-nokia/debian/sonic-platform-nokia-7215.postinst @@ -26,6 +26,9 @@ case "$1" in systemctl enable nokia-7215init.service systemctl start nokia-7215init.service + systemctl enable cpu_wdt.service + systemctl start cpu_wdt.service + ;; abort-upgrade|abort-remove|abort-deconfigure)