Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -877,30 +877,55 @@
SRAM Requirement
################

The ICSSG Ethernet driver supports multiple instances of ICSSG each of which has two slices. Each ICSSG instance supports two Ethernet interfaces i.e. one per slice.
The Industrial Communication SubSystem Gigabit (ICSSG) Ethernet driver supports multiple ICSSG instances. Each ICSSG instance has two slices. Each ICSSG instance supports up to two Ethernet interfaces, one per slice. Each ICSSG instance requires 256KB of Static Random-Access Memory (SRAM), regardless of whether the ICSSG instance is implementing single Ethernet Media Access Control (EMAC) (one port), dual EMAC (two ports), or dual EMAC + switch mode.

Check warning on line 880 in source/linux/Foundational_Components/PRU-ICSS/Linux_Drivers/PRU_ICSSG_Ethernet.rst

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [RedHat.SentenceLength] Try to keep sentences to an average of 32 words or fewer. Raw Output: {"message": "[RedHat.SentenceLength] Try to keep sentences to an average of 32 words or fewer.", "location": {"path": "source/linux/Foundational_Components/PRU-ICSS/Linux_Drivers/PRU_ICSSG_Ethernet.rst", "range": {"start": {"line": 880, "column": 218}}}, "severity": "INFO"}

Check warning on line 880 in source/linux/Foundational_Components/PRU-ICSS/Linux_Drivers/PRU_ICSSG_Ethernet.rst

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [RedHat.SimpleWords] Use simple language. Consider using 'many' rather than 'multiple'. Raw Output: {"message": "[RedHat.SimpleWords] Use simple language. Consider using 'many' rather than 'multiple'.", "location": {"path": "source/linux/Foundational_Components/PRU-ICSS/Linux_Drivers/PRU_ICSSG_Ethernet.rst", "range": {"start": {"line": 880, "column": 81}}}, "severity": "INFO"}

SRAM Required for each ICSSG instance (per two ports) is as below.
For each ICSSG instance, the SRAM required needs to be contiguous.
PRUETH only uses the required amount of SRAM from the SRAM pool. If PRUETH does not get the required amount of SRAM, the prueth_probe() API will return with -ENOMEM error.

.. ifconfig:: CONFIG_part_variant in ('AM65X')
Allocating custom SRAM region

Check warning on line 885 in source/linux/Foundational_Components/PRU-ICSS/Linux_Drivers/PRU_ICSSG_Ethernet.rst

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [RedHat.Headings] Use sentence-style capitalization in 'Allocating custom SRAM region'. Raw Output: {"message": "[RedHat.Headings] Use sentence-style capitalization in 'Allocating custom SRAM region'.", "location": {"path": "source/linux/Foundational_Components/PRU-ICSS/Linux_Drivers/PRU_ICSSG_Ethernet.rst", "range": {"start": {"line": 885, "column": 1}}}, "severity": "INFO"}
*****************************

+------------------+--------------------------+-----------------------------------+
| SoC | Mode | SRAM Required per ICSSG instance |
+==================+==========================+===================================+
| AM65X SR 2.0 | Emac Mode | 192 KB |
+------------------+--------------------------+-----------------------------------+
| AM65X SR 2.0 | Emac Mode + Switch Mode | 256 KB |
+------------------+----------------------+---+-----------------------------------+
By default, the ICSSG Ethernet driver uses the standard on-chip SRAM pool for its operation. However, in situations where this SRAM region is already allocated for other cores or purposes, you can define a custom SRAM region specifically for ICSSG Ethernet usage.

.. ifconfig:: CONFIG_part_variant in ('AM64X')
Follow these steps to allocate a custom SRAM region:

Check warning on line 890 in source/linux/Foundational_Components/PRU-ICSS/Linux_Drivers/PRU_ICSSG_Ethernet.rst

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [RedHat.SimpleWords] Use simple language. Consider using 'assign' or 'divide' rather than 'allocate'. Raw Output: {"message": "[RedHat.SimpleWords] Use simple language. Consider using 'assign' or 'divide' rather than 'allocate'.", "location": {"path": "source/linux/Foundational_Components/PRU-ICSS/Linux_Drivers/PRU_ICSSG_Ethernet.rst", "range": {"start": {"line": 890, "column": 23}}}, "severity": "INFO"}

+-----------+--------------------------+-----------------------------------+
| SoC | Mode | SRAM Required per ICSSG Instance |
+===========+==========================+===================================+
| AM64X | Emac Mode | 192 KB |
+-----------+--------------------------+-----------------------------------+
- Define a dedicated SRAM subregion in the SoC's main device tree file

Check warning on line 892 in source/linux/Foundational_Components/PRU-ICSS/Linux_Drivers/PRU_ICSSG_Ethernet.rst

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [RedHat.Spelling] Verify the word 'SoC's'. It is not in the American English spelling dictionary used by Vale. Raw Output: {"message": "[RedHat.Spelling] Verify the word 'SoC's'. It is not in the American English spelling dictionary used by Vale.", "location": {"path": "source/linux/Foundational_Components/PRU-ICSS/Linux_Drivers/PRU_ICSSG_Ethernet.rst", "range": {"start": {"line": 892, "column": 44}}}, "severity": "WARNING"}
- Update your board-specific device tree to point the ICSSG Ethernet driver to this custom SRAM region

For each ICSSG instance, the SRAM required needs to be contiguous.
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.
Example configuration:

First, define the ethernet-specific SRAM region within the on-chip SRAM node:

.. code-block:: dts

/* In arch/arm64/boot/dts/ti/k3-am64-main.dtsi */
&cbass_main {
oc_sram: sram@70000000 {
/* existing properties */

ethernet_sram: ethernet-sram@00000 {
compatible = "mmio-sram";
reg = <0x00000 0x40000>; /* 256KB allocation */
pool;
};
};
};

Then, in your board-specific device tree, update the ICSSG node to use this custom SRAM region:

.. code-block:: dts

/* In arch/arm64/boot/dts/ti/k3-am64-<board>.dts */
&icssg1_eth {
/* Replace the default SRAM reference */
/* sram = <&oc_sram>; */ /* Original line (remove or comment out) */
sram = <&ethernet_sram>; /* New custom SRAM region */
};

.. note::

- The custom SRAM region must be at least 256KB per ICSSG instance
- The allocation must be contiguous and 64KB aligned

Firmware name handling
######################
Expand Down