Commit Graph

24 Commits

Author SHA1 Message Date
jostar-yang
b39b7a3f2d
[Accton/PDDF] Support pddf to as4630/as7816/as7326 (#10340)
Why I did it
Support pddf to as4630/as7816/as7326

How I did it
Send needed file to the PR for these platform

How to verify it
Test sensors and show platform cmd.
root@as7326-56x-3:/home/admin# show platform psustatus
PSU Model Serial HW Rev Voltage (V) Current (A) Power (W) Status LED

PSU 1 FSF045-611 FSF0451912000505 N/A 12.06 5.50 66.00 OK green
PSU 2 FSF045-611 FSF0451912000568 N/A 12.00 5.50 66.00 OK green

root@as7326-56x-3:/home/admin# sensors
lm75-i2c-15-4a
Adapter: i2c-1-mux (chan_id 6)
Main Board Temperature: +35.5 C (high = +80.0 C, hyst = +75.0 C)

lm75-i2c-15-4b
Adapter: i2c-1-mux (chan_id 6)
CPU Board Temperature: +29.0 C (high = +80.0 C, hyst = +75.0 C)

fan_ctrl-i2c-11-66
Adapter: i2c-1-mux (chan_id 2)
fan1: 9100 RPM
fan2: 9400 RPM
fan3: 9300 RPM
fan4: 9600 RPM
fan5: 9000 RPM
fan6: 9100 RPM
fan7: 9100 RPM
fan8: 9300 RPM
fan9: 9200 RPM
fan10: 9400 RPM
fan11: 9200 RPM
fan12: 9400 RPM

pch_haswell-virtual-0
Adapter: Virtual device
temp1: +43.0 C

psu_pmbus-i2c-17-59
Adapter: i2c-1-mux (chan_id 0)
in3: +12.06 V
fan1: 6272 RPM
temp1: +37.0 C
power2: 60.00 W
curr2: +6.00 A

lm75-i2c-15-49
Adapter: i2c-1-mux (chan_id 6)
Main Board Temperature: +40.0 C (high = +80.0 C, hyst = +75.0 C)

lm75-i2c-15-48
Adapter: i2c-1-mux (chan_id 6)
Main Board Temperature: +39.0 C (high = +80.0 C, hyst = +75.0 C)

psu_pmbus-i2c-13-5b
Adapter: i2c-1-mux (chan_id 4)
in3: +12.00 V
fan1: 6144 RPM
temp1: +36.0 C
power2: 66.00 W
curr2: +5.50 A

coretemp-isa-0000
Adapter: ISA adapter
Package id 0: +50.0 C (high = +82.0 C, crit = +104.0 C)
Core 0: +50.0 C (high = +82.0 C, crit = +104.0 C)
Core 1: +50.0 C (high = +82.0 C, crit = +104.0 C)
Core 2: +50.0 C (high = +82.0 C, crit = +104.0 C)
Core 3: +50.0 C (high = +82.0 C, crit = +104.0 C)

Signed-off-by: Jostar Yang <jostar_yang@accton.com.tw>
2022-04-01 09:55:04 -07:00
Jeff Henning
ad6200029f
Edgecore 4630/5835/7326/7816 API2.0 platform support (#10053)
* Initial pass of EdgeCore platform changes.

* Remove libevent dependency from lldpd.

* Remove python2 dependencies python3.7 force from platform install script.

* Include usbmount support changes.

* Add missing 4630 install file.

* Update a few file permissions.  Add umask line to Makefile.  Specify python3.9 in install script.

* Misc platform updates:
- Add missing fan drawer component to sonic_platform
- Remove kernel version specification from Makefile
- Update to 4630 utility

* - Fix file permissions on source files
- Fix compile issue with 4630 driver modules (set_fs, get_fs, no longer supported in kernel 5.10)

* Fix missing/extra parens in 4630 util script.

* Fix indentation in fanutil.py.

* Integrate deltas from Edgecore to ec_platform branch.

* Installer update from Edgecore to resolve smbus serial console errors.

* Update stable_size for warm boot.

* Fix SFP dictionary key to match xcvrd.

* - Add missing define in event.py files needed for xcvrd
- Fix SFP info dict key for 7xxx switches

* 5835 platform file updates including installer and 5835 utility.

* 5835 fix for DMAR errors on serial console.

* Don't skip starting thermalctld in the pmon container.

* Revert several changes that were not related to platform.

* Run thermalctld in pmon container.

* Don't disable thermalctld in the pmon container.

* Fix prints/parens in 7816 install utility.

* - Incorporate 7816 changes from Edgecore
- Fix 7326 driver file using old kernel function

* Update kernel modules to use kernel_read().

* Fix compile errors with 7816 and 7326 driver modules.

* Fix some indents preventing platform files from loading.

* Update 7816 platform sfp dictionary to match field names in xcvrd.

* Add missing service and util files for 7816.

* Update file names, etc. based on full SKU for 7816.

* Delete pddf files not needed.  These were causing conflicts with API2.0
implementation.

* Remove pddf files suggested by Edgecore that were preventing API2.0 support from starting.

* Install API2.0 file instead of pddf.

* Update 7326 mac service file to not use pddf.  Fix syntax errors in 7326 utility script.

* Fix sonic_platform setup file for 7326.

* Fix syntax errors in python scripts.

* Updates to 7326 platform files.

* Fix some tab errors pulled down from master merge.

* Remove pddf files that were added from previous merge.

* Updates for 5835.

* Fix missing command byte for 5835 psu status.

* Fix permission bits on 4630 service files.

* Update platforms to use new SFP refactoring.

* Fix unused var warnings.
2022-03-18 06:17:08 +05:30
SeanWu
a5515b5297
[Accton] Enable pca954x i2c mux idle_disconnect for 5.10 kernel (#9745)
Enable pca954x idle_disconnect to avoid possible I2C device address conflict.

How I did it
Change pca954x device_attr idle_state to -2 (MUX_IDLE_DISCONNECT).

How to verify it
Cat pca954x device_attr idle_state and confirm the value is -2.

Signed-off-by: Sean Wu <sean_wu@edge-core.com>
2022-01-12 13:43:47 -08:00
Qi Luo
add9b651b6
Add platform_asic file to each platform folder in sonic-device-data based package (#8542)
#### Why I did it
Add platform_asic file to each platform folder in sonic-device-data package. The file content will be used as the ground truth of mapping from PLATFORM_STRING to switch ASIC family.

One use case of the mapping is to prevent installing a wrong image, which targets for other ASIC platforms. For example, currently we have several ONIE images naming as sonic-*.bin, it's easy to mistakenly install the wrong image. With this mapping built into image, we could fetch the ONIE platform string, and figure out which ASIC it is using, and check we are installing the correct image.

After this PR merged, each platform vendor has to add one mandatory text file  `device/PLATFORM_VENDOR/PLATFORM_STRING/platform_asic`, with the content of the platform's switch ASIC family.

I will update https://github.com/Azure/SONiC/wiki/Porting-Guide after this PR is merged.

You can get a list of the ASIC platforms by `ls -b platform | cat`. Currently the options are
```
barefoot
broadcom
cavium
centec
centec-arm64
generic
innovium
marvell
marvell-arm64
marvell-armhf
mellanox
nephos
p4
vs
```

Also support
```
broadcom-dnx
```

#### How I did it

#### How to verify it
Test one image on DUT. And check the folders under `/usr/share/sonic/device`
2021-10-08 19:27:48 -07:00
SeanWu
9b4ed6e6df
[accton] Add sensors.conf to multiple models (#7494)
#### Why I did it
Improve readability of `show environment` output.

#### How I did it
In all sensors.conf, give the customized labels according to HW specifications for each model.

Signed-off-by: Sean Wu <sean_wu@edge-core.com>
2021-05-12 12:42:20 -07:00
jostar-yang
b4b9e4234f
[as7816-64x] Add to support PDDF (#7077)
Add PDDF support for Accton as7816-64x platform

Co-authored-by: Jostar Yang <jostar_yang@accton.com.tw>
2021-04-14 14:40:52 -07:00
Joe LeVeque
7f4ab8fbd8
[sonic-utilities] Update submodule; Build and install as a Python 3 wheel (#5926)
Submodule updates include the following commits:

* src/sonic-utilities 9dc58ea...f9eb739 (18):
  > Remove unnecessary calls to str.encode() now that the package is Python 3; Fix deprecation warning (#1260)
  > [generate_dump] Ignoring file/directory not found Errors (#1201)
  > Fixed porstat rate and util issues (#1140)
  > fix error: interface counters is mismatch after warm-reboot (#1099)
  > Remove unnecessary calls to str.decode() now that the package is Python 3 (#1255)
  > [acl-loader] Make list sorting compliant with Python 3 (#1257)
  > Replace hard-coded fast-reboot with variable. And some typo corrections (#1254)
  > [configlet][portconfig] Remove calls to dict.has_key() which is not available in Python 3 (#1247)
  > Remove unnecessary conversions to list() and calls to dict.keys() (#1243)
  > Clean up LGTM alerts (#1239)
  > Add 'requests' as install dependency in setup.py (#1240)
  > Convert to Python 3 (#1128)
  > Fix mock SonicV2Connector in python3: use decode_responses mode so caller code will be the same as python2 (#1238)
  > [tests] Do not trim from PATH if we did not append to it; Clean up/fix shebangs in scripts (#1233)
  > Updates to bgp config and show commands with BGP_INTERNAL_NEIGHBOR table (#1224)
  > [cli]: NAT show commands newline issue after migrated to Python3 (#1204)
  > [doc]: Update Command-Reference.md (#1231)
  > Added 'import sys' in feature.py file (#1232)

* src/sonic-py-swsssdk 9d9f0c6...1664be9 (2):
  > Fix: no need to decode() after redis client scan, so it will work for both python2 and python3 (#96)
  > FieldValueMap `contains`(`in`)  will also work when migrated to libswsscommon(C++ with SWIG wrapper) (#94)

- Also fix Python 3-related issues:
    - Use integer (floor) division in config_samples.py (sonic-config-engine)
    - Replace print statement with print function in eeprom.py plugin for x86_64-kvm_x86_64-r0 platform
    - Update all platform plugins to be compatible with both Python 2 and Python 3
    - Remove shebangs from plugins files which are not intended to be executable
    - Replace tabs with spaces in Python plugin files and fix alignment, because Python 3 is more strict
    - Remove trailing whitespace from plugins files
2020-11-25 10:28:36 -08:00
abdosi
a6a10f05b7
In SAI 3.5 by default we are supporting 256 Group with 64 Memeber each. (#5400)
However in SAI 3.7 default behaviout got changes to 128 Group and 128
    Memeber each.

    This change is to make sure we are using same ECMP Group/Memeber Per
    Group for 3.7 also so that behaviour is consistent.

Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
2020-09-22 11:21:12 -07:00
abdosi
b6efb49817
Update bcm soc property bcm_num_cos from 8 to 10 (#5314)
as needed by SAI 3.7 and above. Without this change
Warmboot fails from 3.5 to 3.7 as Braodcoam Datastructure
gets corrupted after warm-boot.

Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
2020-09-04 07:40:17 -07:00
brandonchuang
8793814d53
[Device] Disabled thermalctld for Accton platforms (#5276)
Disable thermalctld on Accton platforms until support is added as to avoid logs flooding

Signed-off-by: brandon_chuang <brandon_chuang@edge-core.com>
2020-08-31 17:09:19 -07:00
ChiouRung Haung
3f061da48f
[device/accton]: rename the config.bcm due to that it just allow 1st row of TH2 to be breakout (#4295)
- What I did
  1. Rename the config.bcm to th2-as7816-64x25G-48x100G_row1.config.bcm,
     due to that it just allow 1st row of TH2 to be breakout
  2. Add port_flex_enable to support dynamic port breakout.
  3. Remove the loopback port due to it would make syncd terminate.
     => The port_config.ini doesn't include the loopback ports.
        When portsorch start, it would compare the ports in SDK and port_config.ini.
        Portsorch would remove the loopback ports due to the loopback ports didn't been defined in port_config.ini
        But the broadcom SAI doesn't support remove port for th2.
        So it would return fail and syncd would terminate.

- How I did it

- How to verify it
  Run with the new SONiC image and syncd would not terminate

Signed-off-by: chiourung_huang <chiourung_huang@edge-core.com>
2020-05-21 02:23:39 -07:00
jostar-yang
a6efbaed97
[device]Add check exception case when read port present fail (#4107)
Modify get_psu_presence(). Move read() and close() to "try: ... except IOError:" To avoid when read
port present sysfs fail. This exception will let sfputil.py to exit. So "sfputil show eeprom" can't show other port status.
2020-02-07 07:53:55 -08:00
brandonchuang
47a9a614bd [device] Add pmon_daemon_control.json for accton (#3340)
Add pmon_daemon_control.json for accton devices which do not need led_control

Signed-off-by: brandon_chuang <brandon_chuang@edge-core.com>
2019-08-15 01:27:38 -07:00
Roy Lee
efe9438c61 [Accton] Correct port index and offer the default speed. (#3213)
* [as5712-54x]
Verified with index from 1.
Add qsfp_event() for command "show interaface trancerver".
Signed-off-by: roy_lee <roy_lee@accton.com>

* [as6712-32x]
Add default port speed.
Verified with index from 1.

Signed-off-by: roy_lee <roy_lee@accton.com>

* [as7726-32x]
Add default port speed.
Verified with index from 1.
Signed-off-by: roy_lee <roy_lee@accton.com>

* [as7712-32x]
Add default port speed.
Verified with index from 1.
Signed-off-by: roy_lee <roy_lee@accton.com>

* [as5812-54x]
Add default port speed.
Verified with index from 1.

Signed-off-by: roy_lee <roy_lee@accton.com>

* [as5712-54x]
Update port-config with 1-based index.
Signed-off-by: roy_lee <roy_lee@accton.com>

* [as5812-54x]
Somehow the service may block, use type=simple to work-around.
Add syslog function for monitor.
Signed-off-by: roy_lee <roy_lee@accton.com>

* [as7716-32x]
Update port-config with 1-based index.
Signed-off-by: roy_lee <roy_lee@accton.com>

* [as7816-64x]
Update port-config with 1-based index.
Implement sfputil change_event.
Signed-off-by: roy_lee <roy_lee@accton.com>

* [as7326-56x]
Update port-config with 1-based index.
Implement sfputil change_event.

Signed-off-by: roy_lee <roy_lee@accton.com>

* Remove debug code.
Signed-off-by: roy_lee <roy_lee@accton.com>

* [as7312-54x]
Update port-config with 1-based index and default port speed.

Signed-off-by: roy_lee <roy_lee@accton.com>
2019-07-24 12:14:43 -07:00
Steven LU
083f8586c7 [device]: Adjust port-mapping to allow 1st row of TH2 to be breakout (#3144) 2019-07-16 08:35:05 -07:00
brandonchuang
4ce3cc864a [devices]: Add lpmode in sfputil.py for Accton AS7816 (#2989)
Signed-off-by: brandon_chuang <brandon_chuang@edge-core.com>
2019-06-12 01:37:29 -07:00
Roy Lee
ae82c073aa [Platform] [Accton] Validate mii-tool access on management port. (#2318)
* Add kernel cmdline, tg3.short_preamble=1 tg3.bcm5718s_reset=1, to validate mdio to external PHY.
Signed-off-by: roy_lee <roy_lee@accton.com>

* Push submodule, sonic-linux-kernel, to patch of tg3 short_preamble.
Signed-off-by: roy_lee <roy_lee@accton.com>

* Restore to former version, for this platform is not maintained by Accton.
Signed-off-by: roy_lee <roy_lee@accton.com>
2018-12-04 10:13:46 -08:00
Taoyu Li
018b5899be [updategraph] add support to use preset config instead of default minigraph (#2050)
* [updategraph] add support to use preset config instead of default minigraph

* Fix variable case

* Remove default minigraph case

* Remove default minigraphs and add default_sku files
2018-09-21 22:01:10 -07:00
Kebo Liu
ac7e06debd [devices]: add stubs for new API in SfpUtilBase for all devices (#2038) 2018-09-12 09:40:29 -07:00
Ying Xie
e7ef637a09
[config-bcm] move broadcom config files to device folder (#1947)
- Future versions of SAI packages will stop carrying these files.

Signed-off-by: Ying Xie <ying.xie@microsoft.com>
2018-08-20 10:11:11 -07:00
Roy Lee
763461eeac [devices]: As7816 64x validate sfputil psuutil (#1466) 2018-03-07 00:33:33 -08:00
Polly Hsu
f5090d25da [device]: Add a new supported device AS7816-64X (#1426)
* Switch Vendor: Edge-core
* Switch SKU: AS7816-64X
* ASIC Vendor: Broadcom
* Swich ASIC: Tomahawk2
* Port Configuration: 64x100G
* SONiC Image: SONiC-ONIE-Broadcom

Signed-off-by: Polly Hsu <polly_hsu@edge-core.com>
2018-02-27 12:50:02 -08:00
Taoyu Li
6f12ff286d [minigraph]: Set hostname in all default minigraphs to 'sonic' (#1333) 2018-01-23 18:16:15 -08:00
Roy Lee
683562cf2f [Accton AS7816-64X] Add new platform and device for AS7816-64X. (#1260)
Signed-off-by: roylee123 <roy_lee@accton.com>
2017-12-22 10:06:21 -08:00