You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a section explaining how to allocate custom SRAM regions for ICSSG
Ethernet. Also improve existing documentation for SRAM.
Signed-off-by: MD Danish Anwar <[email protected]>
Copy file name to clipboardExpand all lines: source/linux/Foundational_Components/PRU-ICSS/Linux_Drivers/PRU_ICSSG_Ethernet.rst
+43-18Lines changed: 43 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -877,30 +877,55 @@ Time Senstive Network (TSN) Offload Support
877
877
SRAM Requirement
878
878
################
879
879
880
-
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.
880
+
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.
881
881
882
-
SRAM Required for each ICSSG instance (per two ports) is as below.
882
+
For each ICSSG instance, the SRAM required needs to be contiguous.
883
+
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.
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.
893
889
894
-
.. ifconfig:: CONFIG_part_variant in ('AM64X')
890
+
Follow these steps to allocate a custom SRAM region:
- Define a dedicated SRAM subregion in the SoC's main device tree file
893
+
- Update your board-specific device tree to point the ICSSG Ethernet driver to this custom SRAM region
901
894
902
-
For each ICSSG instance, the SRAM required needs to be contiguous.
903
-
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.
895
+
Example configuration:
896
+
897
+
First, define the ethernet-specific SRAM region within the on-chip SRAM node:
898
+
899
+
.. code-block:: dts
900
+
901
+
/* In arch/arm64/boot/dts/ti/k3-am64-main.dtsi */
902
+
&cbass_main {
903
+
oc_sram: sram@70000000 {
904
+
/* existing properties */
905
+
906
+
ethernet_sram: ethernet-sram@00000 {
907
+
compatible = "mmio-sram";
908
+
reg = <0x00000 0x40000>; /* 256KB allocation */
909
+
pool;
910
+
};
911
+
};
912
+
};
913
+
914
+
Then, in your board-specific device tree, update the ICSSG node to use this custom SRAM region:
915
+
916
+
.. code-block:: dts
917
+
918
+
/* In arch/arm64/boot/dts/ti/k3-am64-<board>.dts */
919
+
&icssg1_eth {
920
+
/* Replace the default SRAM reference */
921
+
/* sram = <&oc_sram>; */ /* Original line (remove or comment out) */
922
+
sram = <ðernet_sram>; /* New custom SRAM region */
923
+
};
924
+
925
+
.. note::
926
+
927
+
- The custom SRAM region must be at least 256KB per ICSSG instance
928
+
- The allocation must be contiguous and 64KB aligned
0 commit comments