[RFC PATCH 00/16] Introduce ICSSG Ethernet driver
MD Danish Anwar
danishanwar at ti.com
Tue Dec 19 11:34:02 CET 2023
Introduce ICSSG PRUETH support in uboot. The ICSSG driver is used in TI
AM654 SR2.0.
The ICSSG PRU Sub-system runs on EMAC firmware. This series Introduces
support for ICSSG driver in uboot. This series also adds the driver's
dependencies.
The ICSSG2 node is added in device tree overlay so that it remains in
sync with linux kernel.
The series introduces device tree and config changes and AM65x
to enable ICSSG driver. The series also enables SPL_LOAD_FIT_APPLY_OVERLAY
for AM65x in order to load overlay over spl.
This series has been tested on AM65x SR2.0, and the ICSSG interface is
able to ping / dhcp and boot kernel using tftp in uboot.
To use ICSSG2 ethernet, the ICSSG firmware needs to be loaded to PRU RPROC
cores and RPROC cores need to be booted with the firmware. This step is
done inside driver in kernel as kernel supports APIs like
rproc_set_firmware() and rproc_fw_boot(). But as u-boot doesn't have these
APIs, the same needs to be done via u-boot cmds.
To make sure icssg-eth works we need to
do below steps.
1. Initialize rproc cores i.e. rproc_init()
2. Load $firmware_file from partition '1:2' (root) on device (mmc in this
example)
3. Load the firmware file to rproc cores passing. i.e. rproc_load()
taking rproc_id, loadaddr and file size as arguments.
4. Start rproc cores. i.e. rproc_start() taking rproc_id as arguments
The above steps are done by running the below commands at u-boot prompt.
=> setenv start_icssg2 'rproc start 14; rproc start 15; rproc start 16; rproc start 17; rproc start 18; rproc start 19'
=> setenv stop_icssg2 'rproc stop 14; rproc stop 15; rproc stop 16; rproc stop 17; rproc stop 18; rproc stop 19'
=> setenv firmware_dir '/lib/firmware/ti-pruss'
=> setenv get_firmware_mmc 'load mmc ${bootpart} ${loadaddr} ${firmware_dir}/${firmware_file}'
=> setenv init_icssg2 'setenv ethact icssg2-eth; setenv autoload no; rproc init; setenv loadaddr 0x80000000; \
setenv firmware_file am65x-sr2-pru0-prueth-fw.elf; run get_firmware_mmc; rproc load 14 0x80000000 ${filesize}; \
setenv loadaddr 0x89000000; setenv firmware_file am65x-sr2-rtu0-prueth-fw.elf; run get_firmware_mmc; rproc load 15 0x89000000 ${filesize}; \
setenv loadaddr 0x90000000; setenv firmware_file am65x-sr2-txpru0-prueth-fw.elf; run get_firmware_mmc; rproc load 16 0x90000000 ${filesize}; \
setenv loadaddr 0x80000000; setenv firmware_file am65x-sr2-pru1-prueth-fw.elf; run get_firmware_mmc; rproc load 17 0x80000000 ${filesize}; \
setenv loadaddr 0x89000000; setenv firmware_file am65x-sr2-rtu1-prueth-fw.elf; run get_firmware_mmc; rproc load 18 0x89000000 ${filesize}; \
setenv loadaddr 0x90000000; setenv firmware_file am65x-sr2-txpru1-prueth-fw.elf; run get_firmware_mmc; rproc load 19 0x90000000 ${filesize}; \
run start_icssg2;'
=> run init_icssg2
=> dhcp
k3-navss-ringacc ringacc at 3c000000: Ring Accelerator probed rings:818, gp-rings[304,100] sci-dev-id:187
k3-navss-ringacc ringacc at 3c000000: dma-ring-reset-quirk: disabled
prueth icssg2-eth: K3 ICSSG: rflow_id_base: 8, chn_name = rx0
link up on port 0, speed 1000, full duplex
BOOTP broadcast 1
BOOTP broadcast 2
BOOTP broadcast 3
DHCP client bound to address 192.168.4.58 (1020 ms)
Thanks and Regards,
MD Danish Anwar
MD Danish Anwar (16):
dma: ti: k3-udma: Use ring_idx to pair k3 nav rings
net: ti: icssg: Add Firmware Interface for ICSSG Ethernet driver.
net: ti: icssg: Add Firmware config and classification APIs.
net: ti: icssg: Add icssg queues APIs and macros
net: ti: icssg: Add ICSSG ethernet driver
net: ti: icssg: Add support sending FDB command to update rx_flow_id
net: ti: icssg: Enforce pinctrl state on the MDIO child node
arm: dts: k3-am65: Add additional regs for DMA components
arm: dts: k3-am65: Add cfg reg region to ringacc node
arm: dts: k3-am65-main: Add ICSSG IEP nodes
arm: dts: k3-am654-base-board: Add ICSSG2 Ethernet support
arm: dts: k3-am65x-binman: Add ICSSG2 overlay and configuration
configs: am65x_evm_a53: Enable ICSSG Driver
configs: am65x_evm_a53_defconfig: add SPL_LOAD_FIT_APPLY_OVERLAY
tools/fdtgrep: Include __symbols__ table
board: ti: am65x: Add check for k3-am654-icssg2 in
board_fit_config_match()
arch/arm/dts/Makefile | 3 +-
arch/arm/dts/k3-am65-main.dtsi | 49 ++-
arch/arm/dts/k3-am65-mcu.dtsi | 13 +-
arch/arm/dts/k3-am654-icssg2.dtso | 145 +++++++
arch/arm/dts/k3-am65x-binman.dtsi | 85 ++++
board/ti/am65x/evm.c | 11 +-
configs/am65x_evm_a53_defconfig | 4 +
drivers/dma/ti/k3-udma.c | 11 +-
drivers/net/ti/Kconfig | 9 +
drivers/net/ti/Makefile | 1 +
drivers/net/ti/icss_mii_rt.h | 192 +++++++++
drivers/net/ti/icssg_classifier.c | 376 +++++++++++++++++
drivers/net/ti/icssg_config.c | 469 +++++++++++++++++++++
drivers/net/ti/icssg_config.h | 195 +++++++++
drivers/net/ti/icssg_prueth.c | 654 ++++++++++++++++++++++++++++++
drivers/net/ti/icssg_prueth.h | 89 ++++
drivers/net/ti/icssg_queues.c | 51 +++
drivers/net/ti/icssg_switch_map.h | 209 ++++++++++
tools/fdtgrep.c | 8 +
19 files changed, 2559 insertions(+), 15 deletions(-)
create mode 100644 arch/arm/dts/k3-am654-icssg2.dtso
create mode 100644 drivers/net/ti/icss_mii_rt.h
create mode 100644 drivers/net/ti/icssg_classifier.c
create mode 100644 drivers/net/ti/icssg_config.c
create mode 100644 drivers/net/ti/icssg_config.h
create mode 100644 drivers/net/ti/icssg_prueth.c
create mode 100644 drivers/net/ti/icssg_prueth.h
create mode 100644 drivers/net/ti/icssg_queues.c
create mode 100644 drivers/net/ti/icssg_switch_map.h
base:commit: a6f86132e30a407c7f96461df53c62fbe52e2b54
--
2.34.1
More information about the U-Boot
mailing list