Commit Graph

92 Commits

Author SHA1 Message Date
Saikrishna Arcot
3a3b45db3a Update Accton platform module for Bullseye and 5.10 kernel
Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
2021-11-10 15:27:22 -08:00
jostar-yang
753ea80d23
[AS7326-56X] Fix led drv bug (#8541)
CPLD offset in led drv is incorrect. 

#### How to verify it

echo 1  > brightness, show green on in DIAG led
echo 3  > brightness, show red on in DIAG led
echo 4  > brightness, show blue on in DIAG led
echo 5  > brightness, show green blinking in DIAG led

Signed-off-by: Jostar Yang <jostar_yang@accton.com.tw>
2021-08-21 18:13:51 -07:00
jostar-yang
76ed66ca29
[AS4630-54PE] Add SFP reset and lpmode sysfs (#8450)
Add QSFP reset and lpmode sysfs

Signed-off-by: Jostar Yang <jostar_yang@accton.com.tw>
2021-08-14 23:58:17 -07:00
jostar-yang
4f9de40d07
[AS5835-54X] Modify util to support python3 (#8285)
Modify accton_as5835_54x_util.py to support python3 and remove not needed code.

Signed-off-by: Jostar Yang <jostar_yang@accton.com.tw>
2021-08-12 23:36:19 -07:00
jostar-yang
3127a6fd00
[AS9716-32D] Modify util to support python3 and remove extra code (#8213)
Signed-off-by: Jostar Yang <jostar_yang@accton.com.tw>
2021-07-29 08:24:25 -07:00
jostar-yang
5e435e05a4
[Accton/PDDF] Add get_sfp() to chassis to handle port idx (#7980)
* Modify index start from 1 in in get_change_event()

Co-authored-by: Jostar Yang <jostar_yang@accton.com.tw>
2021-07-24 18:31:45 -07:00
jostar-yang
24cc827b73
[as4630-54pe] Modify to read correct psu SN and ID (#5389)
Co-authored-by: Jostar Yang <jostar_yang@accton.com.tw>
2021-07-24 16:45:07 -07:00
jostar-yang
3e7228d45c
[AS9716-32D]Support multi PSU SN in PDDF (#8214)
Add needed code to pddf_custom_psu.c to deal with multi PSU and get SN.

How to verify it
Plugin new PSU (3Y) and test,

```
root@sonic:/sys/bus/i2c/drivers/psu/9-0050# cat psu_serial_num
S0A000X601919000013
root@sonic:/sys/bus/i2c/drivers/psu/9-0050# cat psu_model_name
YESM1300AM
root@sonic:/home/admin# pddf_psuutil mfrinfo
PSU Status Manufacturer ID Model Serial Fan Airflow Direction

PSU1 NOT OK 3Y POWER YESM1300AM S0A000X601919000007 exhaust
PSU2 OK 3Y POWER YESM1300AM S0A000X601919000013 exhaust
```

Co-authored-by: Jostar Yang <jostar_yang@accton.com.tw>
2021-07-24 16:30:11 -07:00
jostar-yang
f929c3bd03
[AS7816-64x] Modify util to support python3 (#8253)
Signed-off-by: Jostar Yang <jostar_yang@accton.com.tw>
2021-07-24 16:21:50 -07:00
jostar-yang
1d8149471e
[AS7726-32X] Modify util.py to support python3 (#8166)
Co-authored-by: Jostar Yang <jostar_yang@accton.com.tw>
2021-07-16 08:00:30 -07:00
jostar-yang
2d83004a6d
[AS4630-54PE] Modify util.py to python3 and remove code (#8033)
Modify accton_as4630_54pe_util.py to support Python3 and remove not need code.

Signed-off-by: Jostar Yang <jostar_yang@accton.com.tw>
2021-07-14 01:30:08 -07:00
jostar-yang
f547cadf28
[as7726-32x] Fix module_reset sysfs (#7715)
Fix modules_reset sysfs due to need to do revert.

Signed-off-by: Jostar Yang <jostar_yang@accton.com.tw>
2021-06-08 09:46:38 -07:00
jostar-yang
0c5c4872dc
[as5835-54x] Add to support API2.0 (#6480)
Add platform API 2.0 support for as5835-54x platform
2021-05-28 10:50:49 -07:00
ChiouRung Haung
8e44b9e38e
[Minipack] Modify fbfpgaiomodule.c to support both python2 and python3 (#7604)
Modify fbfpgaiomodule.c to support both python2 and python3

Signed-off-by: chiourung_huang <chiourung_huang@edge-core.com>
2021-05-18 13:16:02 -07:00
ec-michael-shih
a070f1a239
[Platform] Accton add to support as9726-32d platform. (#7479)
Add support for Accton as9726-32d platform

This pull request is based on as9716-32d, so I reference as9716-32d to create new model: as9726-32d.
This module do not need led driver to control led, FPGA can handle it.
I also implement API2.0(sonic_platform) for this model, CPLD driver, PSU driver, Fan driver to control these HW behavior.
2021-05-11 19:06:36 -07:00
jostar-yang
93ceb3933e
[as7726-32x] Support PDDF (#7398)
Add PDDF support for Accton as7726-32x platform

Signed-off-by: Jostar Yang <jostar_yang@accton.com.tw>
2021-04-27 11:01:40 -07:00
jostar-yang
ee728aab7b
[as7326-56x] Add to support PDDF (#7176)
Support PDDF on the as7326-56x platfrom

Signed-off-by: Jostar Yang <jostar_yang@accton.com.tw>
2021-04-15 09:39:15 -07:00
jostar-yang
6641a6b1a1
[as9716-32d] Add to support PDDF (#6902)
Add PDDF support for Accton as9716-32d platform

Co-authored-by: Jostar Yang <jostar_yang@accton.com.tw>
2021-04-14 14:43:52 -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
ec-michael-shih
66e3e51f70
[Platform] Accton add to support as4630-54te platform. (#6683)
Add support for Accton as4630-54te platform
2021-02-25 10:47:38 -08:00
jostar-yang
c54a03fade
[as7312-54x] Support platform API2.0 (#6272)
Add platform 2.0 support for Accton as7312-54x platform
2021-02-09 10:02:09 -08:00
Roy Lee
b6a6c0c6b2
[device/accton/as4630-54pe] Fix accton driver not been installed (#6321)
Accton util applies lsmod to check if drivers are installed.
But lsmod may return error on startup and skip module installation.

Signed-off-by: roy_lee <roy_lee@edge-core.com>
2021-02-06 13:56:16 -08:00
Roy Lee
c9d3e25115
[device/accton]: As7816-64x, fix memory leakage on accton fan monitor. (#6168)
It's been reported that accton fan monitor process keeps consuming memory after few days.
The amount of memory occupied increases in linear and never leased.

Signed-off-by: roy_lee <roy_lee@edge-core.com>
2021-01-15 08:06:21 -08:00
jostar-yang
bbd6967c82
[as7326-54x] Remove not need executable flag (#6326)
Remove executable bit from the service files
2021-01-12 10:40:51 -08:00
brandonchuang
c4156b8745
[device/accton] Fix accton driver not been installed (#6327)
Accton util applies lsmod to check if drivers are installed.
But lsmod may return error on startup and skip module installation.

Signed-off-by: Brandon Chuang <brandon_chuang@edge-core.com>
2021-01-02 08:02:30 -08:00
Roy Lee
54681f169f
[device/accton] AS****_54X, validate accton util to set sfp's tx_disable (#5941)
bug fix: #5914

Validated for tx_disable function of SFP+ on AS7312-54X, AS5812-54X, AS5712-54x, and AS5812-54x.

Signed-off-by: roy_lee <roy_lee@edge-core.com>
2020-12-17 22:35:59 -08:00
Joe LeVeque
23247514f9
Fix a number of LGTM alerts (#5952)
Fix 259 alerts reported by the LGTM tool:

- 245 for Unused import
- 7 for Testing equality to None
- 5 for Duplicate key in dict literal
- 1 for Module is imported more than once
- 1 for Unused local variable
2020-11-20 10:58:48 -08:00
Roy Lee
ce6286eb84
[device/accton] Remove the use of python pickle package (#5475)
Pickle is applied to save the order of i2c adapters at installation.
With pickle removed, it just checks the order of i2c buses every time it needs.
2020-11-04 16:24:53 -08:00
Roy Lee
6f9acee89b
[device][as7816-64x] Update fan speed reading. (#5102)
Original converting from register is wrong, it makes the fan speed much higher than it is. Change the way fan speed is calculated from CPLD.

Signed-off-by: roy_lee <roy_lee@accton.com>
2020-08-13 10:50:31 -07:00
jostar-yang
9c22d19b76
[as5835-54x] Modify qsfp port reset to normal state (#5161)
HW set qsfp port to reset at default. so need SW to set to normal when boot.

1. Modify cpld driver to invert reset offset value
2. Set to normal when boot.
2020-08-12 16:18:31 -07:00
kuanyu99
f2af8aa8a9
[accton/as5835-54x] Fix sfp related function like tx_disable (#4763)
**- Why I did it**

The tx_disable function isn't work for the accton_ax5835-54x device.

**- How I did it**
Fix the incorrect path of the sfp node path inside the util file.

**- How to verify it**

Test with
"sudo accton_as5835_54x_util.py show"
"sudo accton_as5835_54x_util.py set sfp"

There should see correct value for module_present and module_tx_disable. And should able to set it.

Signed-off-by: kuanyu_chen <kuanyu_chen@edge-core.com>
2020-06-18 10:52:06 -07:00
jostar-yang
f532fb95a9
[accton/as4630-54pe] Fix ypeb-1200am psu_fan dir issue (#4626)
3y Power YPEB-1200am PSU doens't support read fan_dir from pmbus register

Check with vendor this PUS type only support F2B fan direction. So add to show "F2B"
when red psu_fan_dir sysfs.
2020-05-26 12:49:51 -07:00
dereksun01
506e9546c9
[device] Upgrade as4630_54pe for new platform (#4268)
- Add port auto-negotiation attribute.
- Add CPLD command to disable mode.
2020-05-01 05:27:32 -07:00
jostar-yang
9129378097
[accton/as9716-32d] add support get_transceiver_change_event (#4105)
Co-authored-by: Jostar Yang <jostar_yang@accton.com.tw>
2020-04-22 22:54:48 -07:00
Guohan Lu
207e32a9f2 [platform-modules]: fix compile issues for platform driver under 4.19
1. undefine led_classdev_register as it is defined in leds.h
2. header file location change
   a. linux/i2c/pmbus.h -> linux/pmbus.h
   b. linux/i2c-mux-gpio.h -> linux/platform_data/i2c-mux-gpio.h
   c. linux/i2c/pca954x.h -> linux/platform_data/pca954x.h
2020-04-17 04:51:51 +00:00
Joe LeVeque
7405f8cfea
[Accton AS4630-54PE] Fix Python indentation error (#4393)
Fix Python indentation error
Add newline at EOF
2020-04-08 23:04:13 -07:00
jostar-yang
592abec5d9
[as4630-54pe]Put correct fanuilt.py file (#4321) 2020-03-25 11:58:19 -07:00
jostar-yang
c9059992a0
[AS9716-32D]:Support 0x57 and 0x56 eeprom (#4103)
* [AS9716-32D]:Support 0x57 and 0x56 eeprom

* Add checking sysfs use 0x57 or 0x56

Co-authored-by: Jostar Yang <jostar_yang@accton.com.tw>
2020-03-21 14:26:55 -07:00
jostar-yang
427ed1f29a
[platform]:Fix as7726 read thermal sensor issue (#4135)
Due to linux create hwmonN node number, N isn't fixed. So modify to use "" to let thermal.py can correct sysfs. For example, use /sys/bus/i2c/devices/55-0048/hwmon/hwmon/temp1_input to instead of /sys/bus/i2c/devices/55-0048/hwmon/hwmon4/temp1_input
2020-02-12 17:55:58 -08:00
CharlieChenEC
099f9b0a6a [devices]:start opennsl modules after platform handle mac service on AS7326-56X/AS7726-56X (#3726)
AS7326-56X and AS7726-56X use the same design so both devices have the same problem.
The detailed description below takes AS7326-56X as the example to explain.

Original implementation:
- In platform/broadcom/sonic-platform-modules-accton/as7326-56x/service/as7326-platform-handle_mac.service,
  it executes the script file "accton_handle_idt.sh".
- In "accton_handle_idt.sh", it modifies the content of the script file "/etc/init.d/opennsl-modules"
  to insert the lines to execute "idt_init.sh" before the command to load broadcom linux kernel module "linux-kernel-bde.ko".
- The script "idt_init.sh" cannot be executed at the first boot of SONiC after installing SONiC under ONIE. This is the reason why all of the ports does not work.

New implementation:
- Let "as7326-platform-handle_mac.service" execute "idt_init.sh".
- Change the content of "as7326-platform-handle_mac.service" to define the service type as "oneshot". Add the settings to ensure "as7326-platform-handle_mac.service" is executed before "opennsl-modules.service".
  By setting the service type as "oneshot", it is guaranteed that "opennsl-modules.services" is started only when the forked process to execute the script file "idt_init.sh" is terminated

Signed-off-by: charlie_chen <charlie_chen@edge-core.com>
2019-11-09 10:23:18 -08:00
Guohan Lu
e877e471c0 [devices]: fix debian/control for accton platform modules
the bug was introduced by commit ac2908ef03

Signed-off-by: Guohan Lu <gulv@microsoft.com>
2019-11-09 05:03:07 +00:00
jostar-yang
ac2908ef03 [devices]: Add thermal plan to as4630_54pe (#3665) 2019-11-07 21:53:21 -08:00
dereksun01
6c0ab4b926 [device] accton device of as5812_54t supports SAI and modify as5812_54t periphery (#3663)
- Support as5812_54t SAI.
- Modify as5812_54t periphery.

Signed-off-by: derek_sun <derek_sun@edge-core.com>
2019-11-07 16:24:42 -08:00
brandonchuang
7d4093d6ed [device/platform] Add reset in sfputil.py for Accton AS7326-56X (#3685)
Add reset in sfputil.py for as7326-56x.

Signed-off-by: brandon_chuang <brandon_chuang@edge-core.com>
2019-11-06 18:57:08 -08:00
Roy Lee
4d8a01c26c [device] as4630-54pe: update sfputil for get_transceiver_change_event. (#3315)
Signed-off-by: roy_lee <roy_lee@accton.com>
2019-10-16 18:01:38 -07:00
Roy Lee
9179990ba1 [device][accton] Add as5812-54t. (#3428)
* Verified as5812_54t platfrom, except SDK and monitor.
Signed-off-by: roy_lee <roy_lee@accton.com>

* Add as5812-54t to build its debian package.
Signed-off-by: roy_lee <roy_lee@accton.com>

* Use the right cpld read/write api.
Signed-off-by: roy_lee <roy_lee@accton.com>

* Update device paths.
Signed-off-by: roy_lee <roy_lee@accton.com>

* update psu driver, correct python lib location.
Signed-off-by: roy_lee <roy_lee@accton.com>

* Give a default return value.
Signed-off-by: roy_lee <roy_lee@accton.com>
2019-09-10 22:07:13 -07:00
jostar-yang
d47ec5268c [devices]: Add to support thermal plan in as9716 platform (#3409) 2019-09-06 15:11:46 -07:00
jostar-yang
ff6437eaaa [devices]: Add support fpga drv and pimutility for minipack platform (#3053) 2019-08-15 00:50:13 -07:00
Roy Lee
e19e661080 [device] as5712-54x, add more entries for sensors (#3328)
* Change psu driver to comfort to lm-sensors.
Signed-off-by: roy_lee <roy_lee@accton.com>

* Duplicate fan attributes with naming conforming to lm-sensors.
Replace psu drivers.
Signed-off-by: roy_lee <roy_lee@accton.com>

* Revise cpr_4011_4mxx.c to support lm-sensors.
Signed-off-by: roy_lee <roy_lee@accton.com>
2019-08-15 00:48:19 -07:00
Roy Lee
b45c1aca73 [device] Adding platform support for Accton as7315-27xb (#3301)
This switch has 27 fiber ports, 4x25G, 20x10G , and 3x100G ports ports.
CPU: Intel ® Atom™ Processor C3508,1.6GHz
BMC: None
MAC: Broadcom BCM88470 (Qumran AX).
MISC: Support IEEE1588v2, hot-swappable PSU, hot-swappable fan tray.

But notice here, BCM88470 is not supported for SAI now.
So the syncd container is not running so far.

Signed-off-by: roy_lee <roy_lee@accton.com>
2019-08-08 01:13:46 -07:00