This repository has been archived on 2025-03-20. You can view files and clone it, but cannot push or open issues or pull requests.
sonic-buildimage/platform/broadcom/sonic-platform-modules-juniper/qfx5210/utils
ciju-juniper fdcb69d048 [devices]: Adding platform support for Juniper QFX5210 (#3270)
This switch has 64 QSFP28 (40G/100G) ports, 2 SFP+ (1G/10G) ports
on Broadcom Tomahawk II chipset. CPU used in QFX5210-64C-S is
Intel Broadwell-DE. The machine has Redundant and hot-swappable
Power Supply (1+1) and also has Redundant and hot swappable fans (3+1).

Signed-off-by: Ciju Rajan K <crajank@juniper.net>
2019-09-06 07:52:45 -07:00
..
juniper_qfx5210_monitor.py [devices]: Adding platform support for Juniper QFX5210 (#3270) 2019-09-06 07:52:45 -07:00
juniper_qfx5210_util.py [devices]: Adding platform support for Juniper QFX5210 (#3270) 2019-09-06 07:52:45 -07:00
platform_poweroff [devices]: Adding platform support for Juniper QFX5210 (#3270) 2019-09-06 07:52:45 -07:00
README [devices]: Adding platform support for Juniper QFX5210 (#3270) 2019-09-06 07:52:45 -07:00

Copyright (c) 2019, Juniper Networks, Inc.
All rights reserved.

Front panel LEDs
================
There are 4 system LEDs in the front panel. Master, System, Alarm, & Beacon.
LED controls can be found under /sys/class/leds. The sysfs interface & 
colour mappings are as follows:

For master LED: /sys/class/leds/master/brightness
  0 => off
  1 => green

For system LED: /sys/class/leds/system/brightness
  0 => off
  1 => green

For alarm LED: /sys/class/leds/alarm/brightness
  0 => off
  1 => amber
  2 => red

For beacon LED: /sys/class/leds/beacon/brightness
  0 => off
  1 => blue
  
For any of the above LEDs, max_brightness file can tell the maximum value 
accepted.

System FANs
===========
There are 4 fans and each of the fan has 2 fan modules. Overall there are 
8 fans in the system. 

Fan controls can be found in /sys/bus/i2c/devices/17-0068. All the fans 
are controlled by one duty cycle value, ranges from 0 to 100

Fan duty cycle can be controlled through /sys/bus/i2c/devices/17-0068/pwm1

Fan module presence is given by /sys/bus/i2c/devices/17-0068/fan[1-4]_present 
file. A value of '1' indicate that fan is present & a value of '0' otherwise.

Fan rotation direction is given by /sys/bus/i2c/devices/17-0068/fan[1-4]_direction.
A value of '0' indicate the direction is AFO (Front to back airflow) or Airflow 
out. A value of '1' indicate that direction is AFI (Back to front airflow) or 
Airflow in.

Fan speed is given by fan[1-4]_input

Temperature sensors
===================
There are 6 temperature sensors. The readings are available in 
/sys/bus/i2c/devices/{0}-00{1}/hwmon/hwmon*/temp1_input

System PSUs
===========
There are two independent PSUs. These are controlled by a dedicated CPLD. 
The status registers are mapped under /sys/bus/i2c/devices/9-0050 and 
/sys/bus/i2c/devices/10-0053.

SFPs
====
There are 64 QSFP+ modules supported in qfx5210 platform. EEPORMs will be 
mapped under /sys/bus/i2c/devices/[25-88]-0050/ sysfs directory

Sensor details
==============
LM75 supported sensor modules will be available under 'sensors' command. 
If you want to get all the sensor data including the SFPs & LEDs, you can 
invoke 'sudo juniper_qfx5210_util.py show'

Platform poweroff
=================
Linux poweroff commands such as 'poweroff', 'shutdown', 'halt', etc. will not
power off qfx5210 platform as there are custom CPLDs control the power off 
sequences. Use the command 'sudo platform_poweroff' to power off qfx5210 
platform

Platform monitoring daemon
==========================
“juniper_qfx5210_monitor.py” is the platform monitoring script. 
It implements the qfx5210 EM policy. This script will run as system service 
and monitor the temperature sensors in every 20 seconds. Based on the EM 
policy thresholds, it controls the fan rpm, manage alarm leds, and 
shutdown the box.