Skip to content

Commit ef80ade

Browse files
danish-tipraneethbajjuri
authored andcommitted
feat(PRU-ICSS): Add firmware name handling
The ICSSG driver reads the firmware names from device tree. Add documentation on how these name are read. Signed-off-by: MD Danish Anwar <[email protected]>
1 parent b562e53 commit ef80ade

File tree

1 file changed

+64
-0
lines changed

1 file changed

+64
-0
lines changed

source/linux/Foundational_Components/PRU-ICSS/Linux_Drivers/PRU_ICSSG_Ethernet.rst

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -901,3 +901,67 @@ SRAM Required for each ICSSG instance (per two ports) is as below.
901901

902902
For each ICSSG instance, the SRAM required needs to be contiguous.
903903
PRUETH only uses the required amount of SRAM from the SRAM/MSMC pool. If PRUETH doesn't get the required amount of SRAM, the prueth_probe() API will return with -ENOMEM error.
904+
905+
Firmware name handling
906+
######################
907+
908+
Starting from Processor SDK v11.01, the ICSSG PRUETH driver reads firmware names from the device tree instead of using hard-coded values. This change improves flexibility and maintainability, especially when supporting different SoCs or firmware versions.
909+
910+
**How driver reads firmware names:**
911+
912+
- Specify the firmware names for each core (PRU, RTU, TX_PRU) and for each slice (MAC port) using the device tree property `firmware-name`.
913+
- The device tree specifies only the EMAC (Ethernet MAC) firmware names.
914+
- The driver reads these names at probe time and stores them internally.
915+
916+
- For other supported modes (SWITCH, HSR and PRP), the driver generates the firmware names dynamically by replacing the string in the EMAC firmware name:
917+
918+
- The driver replaces `"eth"` with `"sw"` for SWITCH mode.
919+
- The driver replaces `"eth"` with `"hsr"` for HSR mode.
920+
- The driver replaces `"eth"` with `"prp"` for PRP mode.
921+
922+
923+
**Device tree example:**
924+
925+
.. ifconfig:: CONFIG_part_variant in ('AM65X')
926+
927+
.. code-block:: dts
928+
929+
icssg2_eth: icssg2-eth@... {
930+
...
931+
firmware-name =
932+
"ti-pruss/am65x-sr2-pru0-prueth-fw.elf",
933+
"ti-pruss/am65x-sr2-rtu0-prueth-fw.elf",
934+
"ti-pruss/am65x-sr2-txpru0-prueth-fw.elf",
935+
"ti-pruss/am65x-sr2-pru1-prueth-fw.elf",
936+
"ti-pruss/am65x-sr2-rtu1-prueth-fw.elf",
937+
"ti-pruss/am65x-sr2-txpru1-prueth-fw.elf";
938+
...
939+
};
940+
941+
.. ifconfig:: CONFIG_part_variant in ('AM64X')
942+
943+
.. code-block:: dts
944+
945+
icssg1_eth: icssg1-eth@... {
946+
...
947+
firmware-name =
948+
"ti-pruss/am64x-sr2-pru0-prueth-fw.elf",
949+
"ti-pruss/am64x-sr2-rtu0-prueth-fw.elf",
950+
"ti-pruss/am64x-sr2-txpru0-prueth-fw.elf",
951+
"ti-pruss/am64x-sr2-pru1-prueth-fw.elf",
952+
"ti-pruss/am64x-sr2-rtu1-prueth-fw.elf",
953+
"ti-pruss/am64x-sr2-txpru1-prueth-fw.elf";
954+
...
955+
};
956+
957+
.. note::
958+
959+
- This approach is compatible with earlier versions as the existing device
960+
trees already provide the ``firmware-name`` property.
961+
- To use a different firmware version, simply update the
962+
``firmware-name`` property in your device tree.
963+
- The driver will automatically handle the correct firmware names for all
964+
supported modes.
965+
966+
For more details, refer to the upstream commit:
967+
https://patch.msgid.link/[email protected]

0 commit comments

Comments
 (0)