This repository has been archived by the owner on Mar 1, 2023. It is now read-only.
forked from sonic-net/sonic-buildimage
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from project-arlo/master
update brcm_poc from latest of master
- Loading branch information
Showing
142 changed files
with
1,943 additions
and
2,442 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
# OS-generated files | ||
.DS_Store | ||
|
||
# Build system related | ||
.platform | ||
.screen | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
device/arista/x86_64-arista_7170_64c/Arista-7170-64C/switch-tna-sai.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{ | ||
"instance": 0, | ||
"chip_list": [ | ||
{ | ||
"id": "asic-0", | ||
"chip_family": "Tofino", | ||
"instance": 0, | ||
"pcie_sysfs_prefix": "/sys/devices/pci0000:00/0000:00:03.0/0000:05:00.0", | ||
"pcie_domain": 0, | ||
"pcie_bus": 5, | ||
"pcie_fn": 0, | ||
"pcie_dev": 0, | ||
"pcie_int_mode": 1, | ||
"sds_fw_path": "share/tofino_sds_fw/avago/firmware" | ||
} | ||
], | ||
"p4_devices": [ | ||
{ | ||
"device-id": 0, | ||
"p4_programs": [ | ||
{ | ||
"p4_pipelines": [ | ||
{ | ||
"p4_pipeline_name": "pipe", | ||
"config": "share/tofinopd/switch/pipe/tofino.bin", | ||
"context": "share/tofinopd/switch/pipe/context.json" | ||
} | ||
], | ||
"program-name": "switch", | ||
"switchsai": "lib/libswitchsai.so", | ||
"bfrt-config": "share/tofinopd/switch/bf-rt.json", | ||
"model_json_path" : "share/switch/aug_model.json", | ||
"switchapi_port_add": false, | ||
"non_default_port_ppgs": 5 | ||
} | ||
] | ||
} | ||
] | ||
} |
39 changes: 39 additions & 0 deletions
39
device/arista/x86_64-arista_7170_64c/Arista-7170-Q59S20/switch-tna-sai.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{ | ||
"instance": 0, | ||
"chip_list": [ | ||
{ | ||
"id": "asic-0", | ||
"chip_family": "Tofino", | ||
"instance": 0, | ||
"pcie_sysfs_prefix": "/sys/devices/pci0000:00/0000:00:03.0/0000:05:00.0", | ||
"pcie_domain": 0, | ||
"pcie_bus": 5, | ||
"pcie_fn": 0, | ||
"pcie_dev": 0, | ||
"pcie_int_mode": 1, | ||
"sds_fw_path": "share/tofino_sds_fw/avago/firmware" | ||
} | ||
], | ||
"p4_devices": [ | ||
{ | ||
"device-id": 0, | ||
"p4_programs": [ | ||
{ | ||
"p4_pipelines": [ | ||
{ | ||
"p4_pipeline_name": "pipe", | ||
"config": "share/tofinopd/switch/pipe/tofino.bin", | ||
"context": "share/tofinopd/switch/pipe/context.json" | ||
} | ||
], | ||
"program-name": "switch", | ||
"switchsai": "lib/libswitchsai.so", | ||
"bfrt-config": "share/tofinopd/switch/bf-rt.json", | ||
"model_json_path" : "share/switch/aug_model.json", | ||
"switchapi_port_add": false, | ||
"non_default_port_ppgs": 5 | ||
} | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 61 additions & 0 deletions
61
device/celestica/x86_64-cel_e1031-r0/sonic_platform/psu.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
#!/usr/bin/env python | ||
|
||
############################################################################# | ||
# Celestica | ||
# | ||
# Module contains an implementation of SONiC Platform Base API and | ||
# provides the PSUs status which are available in the platform | ||
# | ||
############################################################################# | ||
|
||
import os.path | ||
import sonic_platform | ||
|
||
try: | ||
from sonic_platform_base.psu_base import PsuBase | ||
from sonic_platform.fan import Fan | ||
except ImportError as e: | ||
raise ImportError(str(e) + "- required module not found") | ||
|
||
FAN_E1031_SPEED_PATH = "/sys/class/hwmon/hwmon{}/fan1_input" | ||
FAN_MAX_RPM = 11000 | ||
|
||
|
||
class Psu(PsuBase): | ||
"""Platform-specific Psu class""" | ||
|
||
def __init__(self, psu_index): | ||
PsuBase.__init__(self) | ||
self.index = psu_index | ||
|
||
def get_fan(self): | ||
""" | ||
Retrieves object representing the fan module contained in this PSU | ||
Returns: | ||
An object dervied from FanBase representing the fan module | ||
contained in this PSU | ||
""" | ||
fan_speed_path = FAN_E1031_SPEED_PATH.format( | ||
str(self.index+3)) | ||
try: | ||
with open(fan_speed_path) as fan_speed_file: | ||
fan_speed_rpm = int(fan_speed_file.read()) | ||
except IOError: | ||
fan_speed = 0 | ||
|
||
fan_speed = float(fan_speed_rpm)/FAN_MAX_RPM * 100 | ||
fan = Fan(0) | ||
fan.fan_speed = int(fan_speed) if int(fan_speed) <= 100 else 100 | ||
return fan | ||
|
||
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 | ||
Note: Only support green and off | ||
Returns: | ||
bool: True if status LED state is set successfully, False if not | ||
""" | ||
# Hardware not supported | ||
return False |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.