diff --git a/platforms/beacon_led/chassis_port_locator_led_hld.md b/platforms/beacon_led/chassis_port_locator_led_hld.md
index 775668ea0ab8..73eb4c5aeede 100644
--- a/platforms/beacon_led/chassis_port_locator_led_hld.md
+++ b/platforms/beacon_led/chassis_port_locator_led_hld.md
@@ -24,19 +24,26 @@
* [System Reboot](#system-reboot)
* [Config Reload](#config-reload)
* [Scalability](#Scalability)
+* [Limitations](#Limitations)
* [Unit Test](#Unit-Test)
* [Internal Design Information](#internal-design)
-# Revision
+# List of Tables
-Rev | Date | Author | Change Description
-:---: | :-----: | :------: | :---------
-1.0 | 12/16/20 | Precy Lee | Initial version
-2.0 | 04/15/2021 | Dante (Kuo-Jung) Su | added port_led |
-2.0 | 05/15/2021 | Precy Lee | Added Chassis Locator LED timer support |
+* [Table 1: Abbreviations](#table-1-abbreviations)
+* [Table 2: Chassis Locator LED supported list](#table-2-chassis-locator-led-supported-list)
+* [Table 3: Port Locator LED supported list](#table-3-port-locator-led-supported-list)
+# Revision
+Rev | Date | Author | Change Description
+:---: | :-----: | :------: | :---------
+1.0 | 12/16/2020 | Precy Lee | Initial version
+2.0 | 04/15/2021 | Dante Su | added port_led
+2.0 | 05/15/2021 | Precy Lee | Added Chassis Locator LED timer support
+2.1 | 08/13/2021 | Dante Su | Updated Port Locator for SAI, database, CLI, limitations and detailed supported platform list
+2.2 | 10/13/2021 | Dante Su | Updated Port Locator LED behavior as per requests, add details of Broadcom port-locator firmware
# About this Manual
@@ -251,17 +258,22 @@ new file, chassisutil.py, is created in the plugins. When a ChassisUtil class is
- The normal port LED indication will be disabled if the port-locator is enabled on anyone of the interfaces.
- The blink rate will be 1 second on followed by 1 second off.
-- The LED of interfaces that are linked up will have their LEDs solidly lit only if port-locator is not enabled on that interface.
-- The LED of interfaces that are linked down will have their LEDs solidly extinguished.
+- The interfaces that are linked up will have their LEDs solidly lit if port-locator is disabled on that interface.
+- The interfaces that are linked down will have their LEDs solidly extinguished if port-locator is disabled on that interface.
- Traffic present on any interface will not blink the LED to indicate traffic.
-- A port-locator enabled interface will blink and not light solid if link is up.
-
-In the case that an interface has two LEDs, one for link and a second for activity,
+- A port-locator enabled interface will blink and not light solid regardless of the link state.
+- In the case that an interface has two LEDs, one for link and a second for activity,
only the link LED is used for the port-locator function. The activity LED will be
-turned off while the port-locator feature is active.
+turned off while the port-locator firmware is active.
+- In the case that an interface has one LED for both link and activity, the LED will not
+blink if activity is present on the interface while the port-locator firmware is active.
-In the case that an interface has one LED for link and activity, the LED will not
-blink if activity is present on the interface while the port-locator feature is active.
+| **Port-Locator** | **Link Status** | **SOLID OFF** | **SOLID ON** | **BLINKING** |
+|:----------------:|:---------------:|:-------------:|:-------------:|:------------:|
+| Disabled | DOWN | X | | |
+| Disabled | UP | | X | |
+| Enabled | DOWN | | | X |
+| Enabled | UP | | | X |
Port Locator support can be divided into the following components:
@@ -272,6 +284,30 @@ vendor-independent way of controlling forwarding elements, such as
a switching ASIC, an NPU or a software switch in a uniform manner,
and new SAI port attributes will be introduced for port-locator.
+##### SAI Profile
+
+- **SAI_LED_PORT_LOCATOR_FW_FILE**
+
+ This key provides the path to custom port-locator firmware, and it defaults to **'/usr/share/sonic/platform/port-locator.bin'**.
+ If the firmware does not exist, the generic port-locator firmware will be activated and the platform configuration must be supplied via SAI_LED_PORT_LOCATOR_CONFIG_FILE
+
+- **SAI_LED_PORT_LOCATOR_CONFIG_FILE**
+
+ This key provides the path to the platform-specific config file for the generic port-locator firmware, and it's unused in the case of custom port-locator firmware.
+ It defaults to **'/usr/share/sonic/platform/port-locator.soc'**
+
+Note: Either one of the above file must be present on the platform to enable the port-locator support.
+
+##### SAI Attributes
+
+- SAI_PORT_ATTR_LED_LOCATOR_MODE
+
+ This attribute is to activate/de-activate the locator mode on the port. Setting this attribute to activate the locator mode on the port will only toggle the BLINKING behavior in the locator mode, it will not activate the port-locator firmware mode.
+
+- SAI_SWITCH_ATTR_LED_LOCATOR_MODE
+
+ This attribute is to activate/de-activate the port-locator firmware, the LED behavior of all switch ports will be affected, and the normal operation firmware should be restored upon device reset or port-locator disabled.
+
#### SWitch State Service (SWSS)
The SWitch State Service (SWSS) is a collection of software that provides a database
@@ -295,15 +331,39 @@ will only be availble in this CLI.
#### APPL_DB
-The **port_locator** attribute will be newly introduced into the **PORT_TABLE** of **APPL_DB**.
+##### PORT_TABLE
+The **port_locator** attribute of the **PORT_TABLE** serves as requests to orchagent and syncd/SAI, and the port-locator firmware will be activated if either one of the port is in locator mode.
+
+e.g.
+```
+ "PORT_TABLE:Ethernet16": {
+ "type": "hash",
+ "value": {
+ ...... omitted ......
+ "port_locator": "on|off",
+ ...... omitted ......
+ }
+ },
+```
+
+##### PORT_LOCATOR
+
+This table serves as requests from CLI to the port-locator daemon in the pmon, which is responsible for the expiration timeout checks and actually send out the requests to orchagent for the port-locator mode.
+If the **expired** is not specified or an empty string, it will never be expired.
+If the **expired** is a malformed datetime string, it will be expired immediately.
+
+Note: The port-locator expiration timer is vulnerable to the time-shift operations (e.g. NTP or manually updated), please either disable all the port-locator or reset the device after any date and time updates.
+
+e.g.
```
- "PORT_TABLE:Ethernet16": {
- "type": "hash",
- "value": {
- "port_locator": "on",
- }
- },
+ "PORT_LOCATOR:Ethernet16": {
+ "type": "hash",
+ "value": {
+ "mode": "on|off",
+ "expired": "YYYY-mm-dd HH:MM:SS"
+ }
+ },
```
# CLI:
@@ -540,19 +600,45 @@ sonic# interface port-locator Ethernet 4-64
sonic# no interface port-locator Ethernet 4-64
```
+To enable/disable the port-locator on Ethernet4,Ethernet9...Ethernet12, please use the following command.
+
+```
+sonic# interface port-locator Ethernet 4,9-12
+sonic# no interface port-locator Ethernet 4,9-12
+```
+
**show interface port-locator**
This command displays which interface or interfaces currently have the port-locator mode enabled.
```
-sonic-cli# show interface port-locator
+sonic# show interface port-locator
+
+Interface Locator Mode Expiration Time
+-------------- ------------ -------------------
+Eth1/1 Disabled
+Eth1/2 Disabled
+Eth1/3 Disabled
+Eth1/4 Enabled
+Eth1/5 Enabled
+Eth1/6 Enabled
+Eth1/7 Enabled 2021-08-13 02:52:46
+Eth1/8 Disabled
+......
+```
+
+To disply only the port-locator status of the ports in a particular ranges.
-Interface Locator Mode
------------ --------
-Ethernet0 Enable
-Ethernet1 Disable
-Ethernet2 Enable
-Ethernet3 Disable
+```
+sonic# show interface port-locator Eth 1/4-1/6,1/12
+
+Interface Locator Mode Expiration Time
+-------------- ------------ -------------------
+Eth1/4 Enabled
+Eth1/5 Enabled
+Eth1/6 Enabled
+Eth1/12 Disabled
+sonic#
```
## Data Models:
@@ -693,6 +779,18 @@ Chassis Locator LED state and Port Locatr LED state remain the same after config
No impact to scalability. Existing scale numbers will be supported with both features.
+# Limitations
+
+## Chassis Locator LED
+
+- Not every platform supports Chassis Locator LED. Please refer to the Table 2 for the supported platform list.
+
+## Port Locator LED
+
+- As of now, only the Broadcom CMCIx platform (e.g.TH3/TD3/TD4) is supported.
+- It's known issue that Accton platforms are using compact special coding for the LED bitstream, hence it's not going to be supported by the generic port-locator firmware, a platform-specific custom firmware will be necessary in this case.
+- The port-locator expiration timer is vulnerable to the time-shift operations (e.g. NTP or manually updated), please either disable all the port-locator or reset the device after any date and time updates.
+
# Unit Test
**Chassis Locater LED**
@@ -715,8 +813,18 @@ Run each unit test on both Chassis Locator LED supported platforms and unsupport
The following is the list of unit test cases:
-* Verify port-locator CLI configuration commands.
-* Verify port-locator CLI show commands.
+* Verify port-locator KLISH configuration commands to all ports.
+* Verify port-locator KLISH configuration commands to one port.
+* Verify port-locator KLISH configuration commands to the ports in a particular range.
+* Verify port-locator KLISH show commands to all ports.
+* Verify port-locator KLISH show commands to one port.
+* Verify port-locator KLISH show commands to the ports in a particular range.
+* Verify port-locator firmware platform configurations.
+* Verify port-locator firmware should be activated if either one of the port is in locator mode.
+* Verify port-locator firmware should be de-activated if none of the port is in locator mode.
+* Verify port-locator expiration timer support to one port.
+* Verify port-locator expiration timer support to all ports.
+* Verify port-locator expiration timer support to the ports in a particular range.
# Internal Design Information:
@@ -763,11 +871,340 @@ For example, AS4630-54NP platform does not have the LOC LED, therefore, PRI LED
## Port Locator LED Supported Platforms
-This feature will only be available on Broadcom CMICx platforms, and the accurate switch silicon family are listed below:
+Not every platform supports Port Locator LED. Please refer to the Table 3 for the supported platform list.
+As of now, only the Broadcom CMCIx platform (e.g.TH3/TD3/TD4) is supported, we'll circle back on CMICd platform(TH/TH2/TD2) support later.
+
+### Table 3: Port Locator LED supported list
+| **Vendor** | **Platform** | **Port Locator Support** | **Custom Firmware** | **Note** |
+|:------------|:---------------|:--------------------------|:--------------------|:-------------|
+| Accton | AS7712-32X | No | | TH |
+| Accton | AS5712-54X | No | | TD2 |
+| Accton | AS7326-56X | Yes | Yes | |
+| Accton | AS7816-64X | No | | TH2 |
+| Accton | AS9716-32D | Yes | Yes | |
+| Accton | AS7726-32X | Yes | Yes | |
+| Accton | AS5835-54X | Yes | Yes | |
+| Accton | AS5835-54T | Yes | Yes | |
+| Accton | AS4630-54NP | Yes | Yes | |
+| Dell | Z9100 | No | | TH |
+| Dell | S6100 | No | | TH |
+| Dell | S5232 | Yes | No | |
+| Dell | Z9332 | Yes | No | |
+| Dell | Z9264 | No | | TH2 |
+| Dell | N3248TE | Yes (Not Ready) | | Awaits DELL development support |
+| Dell | S5212 | Yes (Not Ready) | No | Awaits DELL development support |
+| Dell | S5224 | Yes (Not Ready) | No | Awaits DELL development support |
+| Dell | S5248 | Yes (Not Ready) | No | Awaits DELL development support |
+| Dell | S5296 | Yes (Not Ready) | No | Awaits DELL development support |
+| Dell | Z9432 | Yes | No | |
+| Dell | S6000 | No | | TH |
+| Quanta | IX7t (SLX9250) | Yes | No | |
+| Quanta | IX8f (SLX9150) | Yes | No | |
+| Quanta | IX4 | No | | TH2 |
+| Quanta | IX7 | Yes | No | |
+| Quanta | IX7_BWDE | Yes | No | |
+| Quanta | IX8 | Yes | No | |
+| Quanta | IX8-B | Yes | No | |
+| Quanta | IX8A_BWDE | Yes | No | |
+| Quanta | IX9 | Yes | No | |
+
+## Port Locator LED - Custom Firmware Developer Guide
+
+While there is a generic port-locator firmware available in the Broadcom SAI, it only works if the
+platform-specific LED hardware design strictly maintain 1:1 mapping between physical ports and LED ports.
+This could be easily identified by the SAI built-in command, **xled plcfg**, that's to help users quickly
+generate the **port-locator.soc** for the generic firmware.
+
+### A platform that can be supported by the generic port-locator firmware
+
+Here is a case that each physical ports could be mapped to different LED ports (Pattern RAM)
+
+Instructions to generate the port-locator.soc:
+
+- Disable all ports on the DUT
+- Issue **bcmsh** to break into Broadcom Debug Shell (DO NOT USE **bcmcmd** for this!!!)
+- Issue **xled plcfg**, and answer 'y' to start the testing.
+- Review the logs, manually create the port-locator.soc in the platform folder
+
+```
+admin@sonic:~$ sudo config interface startup Ethernet0-999
+admin@sonic:~$ bcmsh
+drivshell>xled plcfg
+xled plcfg
+Is the custom_led.bin activated? [y/n]y
+y
+phys 1 --> patt 1 (0x3 -> 0x2)
+phys 5 --> patt 5 (0x3 -> 0x2)
+phys 9 --> patt 9 (0x3 -> 0x2)
+phys 13 --> patt 13 (0x3 -> 0x2)
+phys 17 --> patt 17 (0x3 -> 0x2)
+phys 21 --> patt 21 (0x3 -> 0x2)
+phys 25 --> patt 25 (0x3 -> 0x2)
+phys 29 --> patt 29 (0x3 -> 0x2)
+phys 33 --> patt 33 (0x3 -> 0x2)
+phys 37 --> patt 37 (0x3 -> 0x2)
+phys 41 --> patt 41 (0x3 -> 0x2)
+phys 45 --> patt 45 (0x3 -> 0x2)
+phys 49 --> patt 49 (0x3 -> 0x2)
+phys 53 --> patt 53 (0x3 -> 0x2)
+phys 57 --> patt 57 (0x3 -> 0x2)
+phys 61 --> patt 61 (0x3 -> 0x2)
+phys 129 --> patt 129 (0x3 -> 0x2)
+phys 65 --> patt 65 (0x3 -> 0x2)
+phys 69 --> patt 69 (0x3 -> 0x2)
+phys 73 --> patt 73 (0x3 -> 0x2)
+phys 77 --> patt 77 (0x3 -> 0x2)
+phys 81 --> patt 81 (0x3 -> 0x2)
+phys 85 --> patt 85 (0x3 -> 0x2)
+phys 89 --> patt 89 (0x3 -> 0x2)
+phys 93 --> patt 93 (0x3 -> 0x2)
+phys 97 --> patt 97 (0x3 -> 0x2)
+phys 101 --> patt 101 (0x3 -> 0x2)
+phys 105 --> patt 105 (0x3 -> 0x2)
+phys 109 --> patt 109 (0x3 -> 0x2)
+phys 113 --> patt 113 (0x3 -> 0x2)
+phys 117 --> patt 117 (0x3 -> 0x2)
+phys 121 --> patt 121 (0x3 -> 0x2)
+phys 125 --> patt 125 (0x3 -> 0x2)
+phys 128 --> patt 130 (0x3 -> 0x1) <--- 2nd pattern observed on physical port 128
+
+
+ACCU_BASE: 0x00009000
+PATT_BASE: 0x0000a000
+
+
+rc.soc:
+
+# LED interface controls
+config add sai_led_intf_enable_0=1
+config add sai_led_intf_head_0=1
+config add sai_led_intf_tail_0=64
+config add sai_led_intf_bits_0=2
+
+config add sai_led_intf_enable_1=1
+config add sai_led_intf_head_1=65
+config add sai_led_intf_tail_1=130
+config add sai_led_intf_bits_1=2
+
+# LED data patterns for ON/OFF
+config add sai_led_patt_off_0=0x3
+config add sai_led_patt_on_0=0x2 <--- Only the 1st pattern is generated automatically, please have it updated manually
+
+# Physical Port --> LED Port (1-based indexing)
+# QSFP [1-4]
+config add sai_led_portmap_1=2
+config add sai_led_portmap_2=3
+config add sai_led_portmap_3=4
+config add sai_led_portmap_4=5
+# QSFP [5-8]
+config add sai_led_portmap_5=6
+config add sai_led_portmap_6=7
+config add sai_led_portmap_7=8
+config add sai_led_portmap_8=9
+...... omitted ......
+# QSFP [45-48]
+config add sai_led_portmap_45=46
+config add sai_led_portmap_46=47
+config add sai_led_portmap_47=48
+config add sai_led_portmap_48=49
+# QSFP [49-52]
+config add sai_led_portmap_49=50
+config add sai_led_portmap_50=51
+config add sai_led_portmap_51=52
+config add sai_led_portmap_52=53
+# QSFP [53-56]
+config add sai_led_portmap_53=54
+config add sai_led_portmap_54=55
+config add sai_led_portmap_55=56
+config add sai_led_portmap_56=57
+# QSFP [57-60]
+config add sai_led_portmap_57=58
+config add sai_led_portmap_58=59
+config add sai_led_portmap_59=60
+config add sai_led_portmap_60=61
+# QSFP [61-64]
+config add sai_led_portmap_61=62
+config add sai_led_portmap_62=63
+config add sai_led_portmap_63=64
+config add sai_led_portmap_64=65
+# 1-lane port [129-129]
+config add sai_led_portmap_129=130
+# QSFP [65-68]
+config add sai_led_portmap_65=66
+config add sai_led_portmap_66=67
+config add sai_led_portmap_67=68
+config add sai_led_portmap_68=69
+...... omitted ......
+NOTE: Please review the generated script and have it updated if necessary
+drivshell>
+```
+
+The port-locator.soc needs to be manually updated as below
+
+```
+# LED interface controls
+config add sai_led_intf_enable_0=1
+config add sai_led_intf_head_0=1
+config add sai_led_intf_tail_0=64
+config add sai_led_intf_bits_0=2
+
+config add sai_led_intf_enable_1=1
+config add sai_led_intf_head_1=65
+config add sai_led_intf_tail_1=130
+config add sai_led_intf_bits_1=2
+
+# LED data patterns for ON/OFF
+config add sai_led_patt_off_0=0x3
+config add sai_led_patt_on_0=0x2
+config add sai_led_patt_off_1=0x3 <-- This must be done manually!!
+config add sai_led_patt_on_1=0x1 <-- This must be done manually!!
+
+# Physical Port --> LED Port (1-based indexing)
+# QSFP [1-4]
+config add sai_led_portmap_1=2
+config add sai_led_portmap_2=3
+config add sai_led_portmap_3=4
+config add sai_led_portmap_4=5
+...... omitted ......
+# 1-lane port [128-128]
+config add sai_led_portmap_128=131
+config add sai_led_pattmap_128=1 <-- This must be done manually!!
+...... omitted ......
+```
+
+Properties of the port-locator.soc
-- Broadcom TD4-X11
-- Broadcom TD3-X7
-- Broadcom TD3-X3(i.e. HX5)
-- Broadcom TH3
-- Broadcom TD3-X5 (i.e. MV2)
+| Property | Description |
+|:---------|:------------|
+|sai_led_intf_enable_[led-interface-id]=[value] | 1 for enabled, otherwise disabled |
+|sai_led_intf_head_[led-interface-id]=[value] | The 1st (inclusive) word index of PATTERN RAM |
+|sai_led_intf_tail_[led-interface-id]=[value] | The last (inclusive) word index of PATTERN RAM |
+|sai_led_intf_bits_[led-interface-id]=[value] | The number of bits will be shifted out (LSB) |
+|sai_led_patt_off_[pattern-id]=[value] | The id of the data pattern to turn OFF the LED |
+|sai_led_patt_on_[pattern-id]=[value] | The id of the data pattern to turn ON the LED |
+|sai_led_portmap_[physical-port-id]=[led-port-id] | Mapping Broadcom Physical Port to LED Port |
+|sai_led_pattmap_[physical-port-id]=[led-port-id] | Selecting which data pattern should be adapted for the physical port|
+### A platform that's NOT compatible with the generic port-locator firmware
+
+Here is a case that multiple physical ports share the same LED port (Pattern RAM) with different
+bitmask values for each port.
+
+```
+drivshell>xled plcfg
+xled plcfg
+Is the custom_led.bin activated? [y/n]y
+y
+phys 1 --> patt 0 (0xfff -> 0xffb)
+phys 2 --> patt 0 (0xfff -> 0xffe)
+phys 3 --> patt 0 (0xfff -> 0xfbf)
+phys 4 --> patt 0 (0xfff -> 0xfef)
+phys 5 --> patt 0 (0xfff -> 0xbff)
+phys 6 --> patt 0 (0xfff -> 0xeff)
+phys 7 --> patt 1 (0xfff -> 0xffb)
+phys 8 --> patt 1 (0xfff -> 0xffe)
+phys 9 --> patt 1 (0xfff -> 0xfbf)
+phys 10 --> patt 1 (0xfff -> 0xfef)
+phys 11 --> patt 1 (0xfff -> 0xbff)
+phys 12 --> patt 1 (0xfff -> 0xeff)
+phys 13 --> patt 2 (0xfff -> 0xffb)
+phys 14 --> patt 2 (0xfff -> 0xffe)
+phys 15 --> patt 2 (0xfff -> 0xfbf)
+phys 16 --> patt 2 (0xfff -> 0xfef)
+phys 17 --> patt 2 (0xfff -> 0xbff)
+phys 18 --> patt 2 (0xfff -> 0xeff)
+phys 19 --> patt 3 (0xfff -> 0xffb)
+phys 20 --> patt 3 (0xfff -> 0xffe)
+phys 21 --> patt 3 (0xfff -> 0xfbf)
+phys 22 --> patt 3 (0xfff -> 0xfef)
+phys 23 --> patt 3 (0xfff -> 0xbff)
+phys 24 --> patt 3 (0xfff -> 0xeff)
+phys 29 --> patt 70 (0xfff -> 0xffd)
+phys 33 --> patt 71 (0xfff -> 0xffd)
+phys 37 --> patt 69 (0xfff -> 0xffd)
+phys 38 --> patt 69 (0xfff -> 0xfef)
+phys 39 --> patt 69 (0xfff -> 0xf7f)
+phys 40 --> patt 69 (0xfff -> 0xbff)
+phys 41 --> patt 74 (0xfff -> 0xffd)
+phys 42 --> patt 74 (0xfff -> 0xfef)
+phys 43 --> patt 74 (0xfff -> 0xf7f)
+phys 44 --> patt 74 (0xfff -> 0xbff)
+phys 45 --> patt 73 (0xfff -> 0xffd)
+phys 49 --> patt 72 (0xfff -> 0xffd)
+phys 53 --> patt 64 (0xfff -> 0xffb)
+phys 54 --> patt 64 (0xfff -> 0xffe)
+phys 55 --> patt 64 (0xfff -> 0xfbf)
+phys 56 --> patt 64 (0xfff -> 0xfef)
+phys 57 --> patt 64 (0xfff -> 0xbff)
+phys 58 --> patt 64 (0xfff -> 0xeff)
+phys 59 --> patt 65 (0xfff -> 0xffb)
+phys 60 --> patt 65 (0xfff -> 0xffe)
+phys 61 --> patt 65 (0xfff -> 0xfbf)
+phys 62 --> patt 65 (0xfff -> 0xfef)
+phys 63 --> patt 65 (0xfff -> 0xbff)
+phys 64 --> patt 65 (0xfff -> 0xeff)
+phys 65 --> patt 66 (0xfff -> 0xffb)
+phys 66 --> patt 66 (0xfff -> 0xffe)
+phys 67 --> patt 66 (0xfff -> 0xfbf)
+phys 68 --> patt 66 (0xfff -> 0xfef)
+phys 69 --> patt 66 (0xfff -> 0xbff)
+phys 70 --> patt 66 (0xfff -> 0xeff)
+phys 71 --> patt 67 (0xfff -> 0xffb)
+phys 72 --> patt 67 (0xfff -> 0xffe)
+phys 73 --> patt 67 (0xfff -> 0xfbf)
+phys 74 --> patt 67 (0xfff -> 0xfef)
+phys 75 --> patt 67 (0xfff -> 0xbff)
+phys 76 --> patt 67 (0xfff -> 0xeff)
+
+...... omitted ......
+
+NOTE: Please review the generated script and have it updated if necessary
+drivshell>
+```
+
+In case that generic port-locator firmware is not suitable to the target platform,
+a custom port-locator firmware will be necessary, and it should be placed in the **platform** folder
+
+e.g.
+```
+ds952811@qemu:sonic-buildimage$ ls -l device/accton/x86_64-accton_as5835_54t-r0/port-locator.bin
+-rwxrwxr-x 1 ds952811 ds952811 608 Aug 16 12:26 device/accton/x86_64-accton_as5835_54t-r0/port-locator.bin
+```
+
+Here is an pseudo code for your reference
+
+```
+#include
+
+/* Check for locator mode */
+#define LED_LOCATOR(ctrl, port) (*(uint16 *)((ctrl)->pat_ram_base + ((512 + (port) - 1) << 2)) & 0x8000)
+
+/* Fetch the port status from the ACCU_RAM */
+#define READ_LED_ACCU_DATA(base, port) (*((uint16 *)(base + (((port) - 1) * sizeof(uint32)))))
+
+void custom_led_handler(soc_led_custom_handler_ctrl_t *ctrl, uint32 activity_count)
+{
+ ......
+ accu_val = READ_LED_ACCU_DATA(ctrl->accu_ram_base, port);
+ if (LED_LOCATOR(ctrl, port))
+ {
+ if ((activity_count >> 5) & 1)
+ {
+ /* LED ON */
+ }
+ else
+ {
+ /* LED OFF */
+ }
+ }
+ else if ((accu_val & LED_OUTPUT_LINK_UP) && (accu_val & LED_OUTPUT_LINK_ENABLE))
+ {
+ /* LED ON */
+ }
+ else
+ {
+ /* LED OFF */
+ }
+ ......
+}
+```