Introduce ICSSG Ethernet driver
Subsystems (4)
cover Introduce ICSSG Ethernet driver
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@3c000000: Ring Accelerator probed rings:818, gp-rings[304,100] sci-dev-id:187 k3-navss-ringacc ringacc@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
Signature · 1 line
2.34.1
RFC PATCH 1/16 dma: ti: k3-udma: Use ring_idx to pair k3 nav rings
Use ring_idx to pair rings. ring_idx will be same as tx flow_id for all non-negative flow_ids. For negative flow_ids, ring_idx will be tchan->id added with bchan_cnt.
--- drivers/dma/ti/k3-udma.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)
drivers/dma/ti/k3-udma.c +9 -2
@@ -876,13 +876,20 @@ static int udma_alloc_tx_resources(struct udma_chan *uc) {struct k3_nav_ring_cfg ring_cfg;struct udma_dev *ud = uc->ud; -int ret; +struct udma_tchan *tchan; +int ring_idx, ret; ret =udma_get_tchan (uc);if (ret)return ret; - ret =k3_nav_ringacc_request_rings_pair (ud->ringacc, uc->tchan->id,-1 , + tchan = uc->tchan; +if (tchan->tflow_id >=0 ) + ring_idx = tchan->tflow_id; +else + ring_idx = ud->bchan_cnt + tchan->id; + + ret =k3_nav_ringacc_request_rings_pair (ud->ringacc, ring_idx,-1 , &uc->tchan->t_ring, &uc->tchan->tc_ring);if (ret) {
Signature · 1 line
2.34.1
RFC PATCH 2/16 net: ti: icssg: Add Firmware Interface for ICSSG Ethernet driver.
In reply to MD Danish AnwarAdd firmware interface related headers and macros for ICSSG Ethernet driver. These macros will be later used by the ICSSG ethernet driver.
--- drivers/net/ti/icssg_switch_map.h | 209 ++++++++++++++++++++++++++++++ 1 file changed, 209 insertions(+) create mode 100644 drivers/net/ti/icssg_switch_map.h
drivers/net/ti/icssg_switch_map.h new file +209 -0
@@ -0,0 +1,209 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* Texas Instruments ICSSG Ethernet driver +* +* Copyright (C) 2020 Texas Instruments Incorporated - https://www.ti.com/ +* +*/ + +#ifndef __NET_TI_ICSSG_SWITCH_MAP_H +#define __NET_TI_ICSSG_SWITCH_MAP_H + +/*Time after which FDB entries are checked for aged out values. Value in nanoseconds*/ +#define FDB_AGEING_TIMEOUT_OFFSET 0x0014 + +/*default VLAN tag for Host Port*/ +#define HOST_PORT_DF_VLAN_OFFSET 0x001C + +/*Same as HOST_PORT_DF_VLAN_OFFSET*/ +#define EMAC_ICSSG_SWITCH_PORT0_DEFAULT_VLAN_OFFSET HOST_PORT_DF_VLAN_OFFSET + +/*default VLAN tag for P1 Port*/ +#define P1_PORT_DF_VLAN_OFFSET 0x0020 + +/*Same as P1_PORT_DF_VLAN_OFFSET*/ +#define EMAC_ICSSG_SWITCH_PORT1_DEFAULT_VLAN_OFFSET P1_PORT_DF_VLAN_OFFSET + +/*default VLAN tag for P2 Port*/ +#define P2_PORT_DF_VLAN_OFFSET 0x0024 + +/*Same as P2_PORT_DF_VLAN_OFFSET*/ +#define EMAC_ICSSG_SWITCH_PORT2_DEFAULT_VLAN_OFFSET P2_PORT_DF_VLAN_OFFSET + +/*VLAN-FID Table offset. 4096 VIDs. 2B per VID = 8KB = 0x2000*/ +#define VLAN_STATIC_REG_TABLE_OFFSET 0x0100 + +/*VLAN-FID Table offset for EMAC*/ +#define EMAC_ICSSG_SWITCH_DEFAULT_VLAN_TABLE_OFFSET VLAN_STATIC_REG_TABLE_OFFSET + +/*packet descriptor Q reserved memory*/ +#define PORT_DESC0_HI 0x2104 + +/*packet descriptor Q reserved memory*/ +#define PORT_DESC0_LO 0x2F6C + +/*packet descriptor Q reserved memory*/ +#define PORT_DESC1_HI 0x3DD4 + +/*packet descriptor Q reserved memory*/ +#define PORT_DESC1_LO 0x4C3C + +/*packet descriptor Q reserved memory*/ +#define HOST_DESC0_HI 0x5AA4 + +/*packet descriptor Q reserved memory*/ +#define HOST_DESC0_LO 0x5F0C + +/*packet descriptor Q reserved memory*/ +#define HOST_DESC1_HI 0x6374 + +/*packet descriptor Q reserved memory*/ +#define HOST_DESC1_LO 0x67DC + +/*special packet descriptor Q reserved memory*/ +#define HOST_SPPD0 0x7AAC + +/*special packet descriptor Q reserved memory*/ +#define HOST_SPPD1 0x7EAC + +/*_Small_Description_*/ +#define TIMESYNC_FW_WC_CYCLECOUNT_OFFSET 0x83EC + +/*IEP count hi roll over count*/ +#define TIMESYNC_FW_WC_HI_ROLLOVER_COUNT_OFFSET 0x83F4 + +/*_Small_Description_*/ +#define TIMESYNC_FW_WC_COUNT_HI_SW_OFFSET_OFFSET 0x83F8 + +/*Set clock descriptor*/ +#define TIMESYNC_FW_WC_SETCLOCK_DESC_OFFSET 0x83FC + +/*_Small_Description_*/ +#define TIMESYNC_FW_WC_SYNCOUT_REDUCTION_FACTOR_OFFSET 0x843C + +/*_Small_Description_*/ +#define TIMESYNC_FW_WC_SYNCOUT_REDUCTION_COUNT_OFFSET 0x8440 + +/*_Small_Description_*/ +#define TIMESYNC_FW_WC_SYNCOUT_START_TIME_CYCLECOUNT_OFFSET 0x8444 + +/*Control variable to generate SYNC1*/ +#define TIMESYNC_FW_WC_ISOM_PIN_SIGNAL_EN_OFFSET 0x844C + +/*SystemTime Sync0 periodicity*/ +#define TIMESYNC_FW_ST_SYNCOUT_PERIOD_OFFSET 0x8450 + +/*pktTxDelay for P1 = link speed dependent p1 mac delay + p1 phy delay*/ +#define TIMESYNC_FW_WC_PKTTXDELAY_P1_OFFSET 0x8454 + +/*pktTxDelay for P2 = link speed dependent p2 mac delay + p2 phy delay*/ +#define TIMESYNC_FW_WC_PKTTXDELAY_P2_OFFSET 0x8458 + +/*Set clock operation done signal for next task*/ +#define TIMESYNC_FW_SIG_PNFW_OFFSET 0x845C + +/*Set clock operation done signal for next task*/ +#define TIMESYNC_FW_SIG_TIMESYNCFW_OFFSET 0x8460 + +/*New list is copied at this time*/ +#define TAS_CONFIG_CHANGE_TIME 0x000C + +/*config change error counter*/ +#define TAS_CONFIG_CHANGE_ERROR_COUNTER 0x0014 + +/*TAS List update pending flag*/ +#define TAS_CONFIG_PENDING 0x0018 + +/*TAS list update trigger flag*/ +#define TAS_CONFIG_CHANGE 0x0019 + +/*List length for new TAS schedule*/ +#define TAS_ADMIN_LIST_LENGTH 0x001A + +/*Currently active TAS list index*/ +#define TAS_ACTIVE_LIST_INDEX 0x001B + +/*Cycle time for the new TAS schedule*/ +#define TAS_ADMIN_CYCLE_TIME 0x001C + +/*Cycle counts remaining till the TAS list update*/ +#define TAS_CONFIG_CHANGE_CYCLE_COUNT 0x0020 + +/*Base Flow ID for sending packets to Host for Slice0*/ +#define PSI_L_REGULAR_FLOW_ID_BASE_OFFSET 0x0024 + +/*Same as PSI_L_REGULAR_FLOW_ID_BASE_OFFSET*/ +#define EMAC_ICSSG_SWITCH_PSI_L_REGULAR_FLOW_ID_BASE_OFFSET PSI_L_REGULAR_FLOW_ID_BASE_OFFSET + +/*Base Flow ID for sending mgmt and Tx TS to Host for Slice0*/ +#define PSI_L_MGMT_FLOW_ID_OFFSET 0x0026 + +/*Same as PSI_L_MGMT_FLOW_ID_OFFSET*/ +#define EMAC_ICSSG_SWITCH_PSI_L_MGMT_FLOW_ID_BASE_OFFSET PSI_L_MGMT_FLOW_ID_OFFSET + +/*Queue number for Special packets written here*/ +#define SPL_PKT_DEFAULT_PRIORITY 0x0028 + +/*Express Preemptible Queue Mask*/ +#define EXPRESS_PRE_EMPTIVE_Q_MASK 0x0029 + +/*Port1/Port2 Default Queue number for untagged packets, only 1B is used*/ +#define QUEUE_NUM_UNTAGGED 0x002A + +/*Stores the table used for priority regeneration. 1B per PCP/Queue*/ +#define PORT_Q_PRIORITY_REGEN_OFFSET 0x002C + +/* For marking Packet as priority/express (this feature is disabled) or +* cut-through/S&F. +*/ +#define EXPRESS_PRE_EMPTIVE_Q_MAP 0x0034 + +/*Stores the table used for priority mapping. 1B per PCP/Queue*/ +#define PORT_Q_PRIORITY_MAPPING_OFFSET 0x003C + +/*TAS gate mask for windows list0*/ +#define TAS_GATE_MASK_LIST0 0x0100 + +/*TAS gate mask for windows list1*/ +#define TAS_GATE_MASK_LIST1 0x0350 + +/*Memory to Enable/Disable Preemption on TX side*/ +#define PRE_EMPTION_ENABLE_TX 0x05A0 + +/*Active State of Preemption on TX side*/ +#define PRE_EMPTION_ACTIVE_TX 0x05A1 + +/*Memory to Enable/Disable Verify State Machine Preemption*/ +#define PRE_EMPTION_ENABLE_VERIFY 0x05A2 + +/*Verify Status of State Machine*/ +#define PRE_EMPTION_VERIFY_STATUS 0x05A3 + +/*Non Final Fragment Size supported by Link Partner*/ +#define PRE_EMPTION_ADD_FRAG_SIZE_REMOTE 0x05A4 + +/*Non Final Fragment Size supported by Firmware*/ +#define PRE_EMPTION_ADD_FRAG_SIZE_LOCAL 0x05A6 + +/*Time in ms the State machine waits for respond packet*/ +#define PRE_EMPTION_VERIFY_TIME 0x05A8 + +/*Memory used for R30 related management commands*/ +#define MGR_R30_CMD_OFFSET 0x05AC + +/*HW Buffer Pool0 base address*/ +#define BUFFER_POOL_0_ADDR_OFFSET 0x05BC + +/*16B for Host Egress MSMC Q (Pre-emptible) context*/ +#define HOST_RX_Q_PRE_CONTEXT_OFFSET 0x0684 + +/*Buffer for 8 FDB entries to be added by 'Add Multiple FDB entries IOCTL*/ +#define FDB_CMD_BUFFER 0x0894 + +/*16B for Host Egress MSMC Q (Express) context*/ +#define HOST_RX_Q_EXP_CONTEXT_OFFSET 0x0940 + +/*Start of 32 bits PA_STAT counters*/ +#define PA_STAT_32b_START_OFFSET 0x0080 + +#endif +/* __NET_TI_ICSSG_SWITCH_MAP_H */
Signature · 1 line
2.34.1
RFC PATCH 3/16 net: ti: icssg: Add Firmware config and classification APIs.
In reply to MD Danish AnwarAdd icssg_config.h / .c and icssg_classifier.c files. These are firmware configuration and classification related files. Add MII helper APIs and MACROs. These APIs and MACROs will be later used by ICSSG Ethernet driver. Also introduce icssg_prueth.h which has definition of prueth related structures.
--- drivers/net/ti/icss_mii_rt.h | 192 ++++++++++++++ drivers/net/ti/icssg_classifier.c | 376 ++++++++++++++++++++++++++++ drivers/net/ti/icssg_config.c | 403 ++++++++++++++++++++++++++++++ drivers/net/ti/icssg_config.h | 177 +++++++++++++ drivers/net/ti/icssg_prueth.h | 78 ++++++ 5 files changed, 1226 insertions(+) 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.h
drivers/net/ti/icss_mii_rt.h new file +192 -0
@@ -0,0 +1,192 @@ +/* SPDX-License-Identifier: GPL-2.0 */ + +/* PRU-ICSS MII_RT register definitions +* +* Copyright (C) 2015-2020 Texas Instruments Incorporated - http://www.ti.com +*/ + +#ifndef __NET_PRUSS_MII_RT_H__ +#define __NET_PRUSS_MII_RT_H__ + +#include <regmap.h> + +/* PRUSS_MII_RT Registers */ +#define PRUSS_MII_RT_RXCFG0 0x0 +#define PRUSS_MII_RT_RXCFG1 0x4 +#define PRUSS_MII_RT_TXCFG0 0x10 +#define PRUSS_MII_RT_TXCFG1 0x14 +#define PRUSS_MII_RT_TX_CRC0 0x20 +#define PRUSS_MII_RT_TX_CRC1 0x24 +#define PRUSS_MII_RT_TX_IPG0 0x30 +#define PRUSS_MII_RT_TX_IPG1 0x34 +#define PRUSS_MII_RT_PRS0 0x38 +#define PRUSS_MII_RT_PRS1 0x3c +#define PRUSS_MII_RT_RX_FRMS0 0x40 +#define PRUSS_MII_RT_RX_FRMS1 0x44 +#define PRUSS_MII_RT_RX_PCNT0 0x48 +#define PRUSS_MII_RT_RX_PCNT1 0x4c +#define PRUSS_MII_RT_RX_ERR0 0x50 +#define PRUSS_MII_RT_RX_ERR1 0x54 + +/* PRUSS_MII_RT_RXCFG0/1 bits */ +#define PRUSS_MII_RT_RXCFG_RX_ENABLE BIT(0) +#define PRUSS_MII_RT_RXCFG_RX_DATA_RDY_MODE_DIS BIT(1) +#define PRUSS_MII_RT_RXCFG_RX_CUT_PREAMBLE BIT(2) +#define PRUSS_MII_RT_RXCFG_RX_MUX_SEL BIT(3) +#define PRUSS_MII_RT_RXCFG_RX_L2_EN BIT(4) +#define PRUSS_MII_RT_RXCFG_RX_BYTE_SWAP BIT(5) +#define PRUSS_MII_RT_RXCFG_RX_AUTO_FWD_PRE BIT(6) +#define PRUSS_MII_RT_RXCFG_RX_L2_EOF_SCLR_DIS BIT(9) + +/* PRUSS_MII_RT_TXCFG0/1 bits */ +#define PRUSS_MII_RT_TXCFG_TX_ENABLE BIT(0) +#define PRUSS_MII_RT_TXCFG_TX_AUTO_PREAMBLE BIT(1) +#define PRUSS_MII_RT_TXCFG_TX_EN_MODE BIT(2) +#define PRUSS_MII_RT_TXCFG_TX_BYTE_SWAP BIT(3) +#define PRUSS_MII_RT_TXCFG_TX_MUX_SEL BIT(8) +#define PRUSS_MII_RT_TXCFG_PRE_TX_AUTO_SEQUENCE BIT(9) +#define PRUSS_MII_RT_TXCFG_PRE_TX_AUTO_ESC_ERR BIT(10) +#define PRUSS_MII_RT_TXCFG_TX_32_MODE_EN BIT(11) +#define PRUSS_MII_RT_TXCFG_TX_IPG_WIRE_CLK_EN BIT(12)/* SR2.0 onwards */ + +#define PRUSS_MII_RT_TXCFG_TX_START_DELAY_SHIFT 16 +#define PRUSS_MII_RT_TXCFG_TX_START_DELAY_MASK GENMASK(25, 16) + +#define PRUSS_MII_RT_TXCFG_TX_CLK_DELAY_SHIFT 28 +#define PRUSS_MII_RT_TXCFG_TX_CLK_DELAY_MASK GENMASK(30, 28) + +/* PRUSS_MII_RT_TX_IPG0/1 bits */ +#define PRUSS_MII_RT_TX_IPG_IPG_SHIFT 0 +#define PRUSS_MII_RT_TX_IPG_IPG_MASK GENMASK(9, 0) + +/* PRUSS_MII_RT_PRS0/1 bits */ +#define PRUSS_MII_RT_PRS_COL BIT(0) +#define PRUSS_MII_RT_PRS_CRS BIT(1) + +/* PRUSS_MII_RT_RX_FRMS0/1 bits */ +#define PRUSS_MII_RT_RX_FRMS_MIN_FRM_SHIFT 0 +#define PRUSS_MII_RT_RX_FRMS_MIN_FRM_MASK GENMASK(15, 0) + +#define PRUSS_MII_RT_RX_FRMS_MAX_FRM_SHIFT 16 +#define PRUSS_MII_RT_RX_FRMS_MAX_FRM_MASK GENMASK(31, 16) + +/* Min/Max in MII_RT_RX_FRMS */ +/* For EMAC and Switch */ +#define PRUSS_MII_RT_RX_FRMS_MAX (VLAN_ETH_FRAME_LEN + ETH_FCS_LEN) +#define PRUSS_MII_RT_RX_FRMS_MIN_FRM (64) + +/* for HSR and PRP */ +#define PRUSS_MII_RT_RX_FRMS_MAX_FRM_LRE (PRUSS_MII_RT_RX_FRMS_MAX + \ + ICSS_LRE_TAG_RCT_SIZE) +/* PRUSS_MII_RT_RX_PCNT0/1 bits */ +#define PRUSS_MII_RT_RX_PCNT_MIN_PCNT_SHIFT 0 +#define PRUSS_MII_RT_RX_PCNT_MIN_PCNT_MASK GENMASK(3, 0) + +#define PRUSS_MII_RT_RX_PCNT_MAX_PCNT_SHIFT 4 +#define PRUSS_MII_RT_RX_PCNT_MAX_PCNT_MASK GENMASK(7, 4) + +/* PRUSS_MII_RT_RX_ERR0/1 bits */ +#define PRUSS_MII_RT_RX_ERR_MIN_PCNT_ERR BIT(0) +#define PRUSS_MII_RT_RX_ERR_MAX_PCNT_ERR BIT(1) +#define PRUSS_MII_RT_RX_ERR_MIN_FRM_ERR BIT(2) +#define PRUSS_MII_RT_RX_ERR_MAX_FRM_ERR BIT(3) + +#define ICSSG_CFG_OFFSET 0 +#define RGMII_CFG_OFFSET 4 + +/* Constant to choose between MII0 and MII1 */ +#define ICSS_MII0 0 +#define ICSS_MII1 1 + +/* ICSSG_CFG Register bits */ +#define ICSSG_CFG_SGMII_MODE BIT(16) +#define ICSSG_CFG_TX_PRU_EN BIT(11) +#define ICSSG_CFG_RX_SFD_TX_SOF_EN BIT(10) +#define ICSSG_CFG_RTU_PRU_PSI_SHARE_EN BIT(9) +#define ICSSG_CFG_IEP1_TX_EN BIT(8) +#define ICSSG_CFG_MII1_MODE GENMASK(6, 5) +#define ICSSG_CFG_MII1_MODE_SHIFT 5 +#define ICSSG_CFG_MII0_MODE GENMASK(4, 3) +#define ICSSG_CFG_MII0_MODE_SHIFT 3 +#define ICSSG_CFG_RX_L2_G_EN BIT(2) +#define ICSSG_CFG_TX_L2_EN BIT(1) +#define ICSSG_CFG_TX_L1_EN BIT(0) + +enum mii_mode {MII_MODE_MII =0 ,MII_MODE_RGMII ,MII_MODE_SGMII }; + +/* RGMII CFG Register bits */ +#define RGMII_CFG_INBAND_EN_MII0 BIT(16) +#define RGMII_CFG_GIG_EN_MII0 BIT(17) +#define RGMII_CFG_INBAND_EN_MII1 BIT(20) +#define RGMII_CFG_GIG_EN_MII1 BIT(21) +#define RGMII_CFG_FULL_DUPLEX_MII0 BIT(18) +#define RGMII_CFG_FULL_DUPLEX_MII1 BIT(22) +#define RGMII_CFG_SPEED_MII0 GENMASK(2, 1) +#define RGMII_CFG_SPEED_MII1 GENMASK(6, 5) +#define RGMII_CFG_SPEED_MII0_SHIFT 1 +#define RGMII_CFG_SPEED_MII1_SHIFT 5 +#define RGMII_CFG_FULLDUPLEX_MII0 BIT(3) +#define RGMII_CFG_FULLDUPLEX_MII1 BIT(7) +#define RGMII_CFG_FULLDUPLEX_MII0_SHIFT 3 +#define RGMII_CFG_FULLDUPLEX_MII1_SHIFT 7 +#define RGMII_CFG_SPEED_10M 0 +#define RGMII_CFG_SPEED_100M 1 +#define RGMII_CFG_SPEED_1G 2 + +static inline void icssg_mii_update_ipg (struct regmap *mii_rt,int mii,u32 ipg) +{ +u32 val; + +if (mii ==ICSS_MII0 ) { +regmap_write (mii_rt,PRUSS_MII_RT_TX_IPG0 , ipg); + }else { +/* Errata workaround: IEP1 is not read by h/w unless IEP0 is written */ +regmap_read (mii_rt,PRUSS_MII_RT_TX_IPG0 , &val); +regmap_write (mii_rt,PRUSS_MII_RT_TX_IPG1 , ipg); +regmap_write (mii_rt,PRUSS_MII_RT_TX_IPG0 , val); + } +} + +static inline void icssg_update_rgmii_cfg (struct regmap *miig_rt,int speed, +bool full_duplex,int slice,struct prueth *priv) +{ +u32 gig_en_mask, gig_val =0 , full_duplex_mask, full_duplex_val =0 ; +u32 inband_en_mask, inband_val =0 ; + + gig_en_mask = (slice ==ICSS_MII0 ) ?RGMII_CFG_GIG_EN_MII0 : +RGMII_CFG_GIG_EN_MII1 ; +if (speed ==SPEED_1000 ) + gig_val = gig_en_mask; +regmap_update_bits (miig_rt,RGMII_CFG_OFFSET , gig_en_mask, gig_val); + + inband_en_mask = (slice ==ICSS_MII0 ) ?RGMII_CFG_INBAND_EN_MII0 : +RGMII_CFG_INBAND_EN_MII1 ; +if (speed ==SPEED_10 &&phy_interface_is_rgmii (priv->phydev)) + inband_val = inband_en_mask; +regmap_update_bits (miig_rt,RGMII_CFG_OFFSET , inband_en_mask, inband_val); + + full_duplex_mask = (slice ==ICSS_MII0 ) ?RGMII_CFG_FULL_DUPLEX_MII0 : +RGMII_CFG_FULL_DUPLEX_MII1 ; +if (full_duplex) + full_duplex_val = full_duplex_mask; +regmap_update_bits (miig_rt,RGMII_CFG_OFFSET , full_duplex_mask, + full_duplex_val); +} + +static inline void icssg_miig_set_interface_mode (struct regmap *miig_rt,int mii,int phy_if) +{ +u32 val, mask, shift; + + mask = mii ==ICSS_MII0 ?ICSSG_CFG_MII0_MODE :ICSSG_CFG_MII1_MODE ; + shift = mii ==ICSS_MII0 ?ICSSG_CFG_MII0_MODE_SHIFT :ICSSG_CFG_MII1_MODE_SHIFT ; + + val =MII_MODE_RGMII ; +if (phy_if ==PHY_INTERFACE_MODE_MII ) + val =MII_MODE_MII ; + + val <<= shift; +regmap_update_bits (miig_rt,ICSSG_CFG_OFFSET , mask, val); +regmap_read (miig_rt,ICSSG_CFG_OFFSET , &val); +} + +#endif /* __NET_PRUSS_MII_RT_H__ */
drivers/net/ti/icssg_classifier.c new file +376 -0
376 lines not on this page · raw message
drivers/net/ti/icssg_config.c new file +403 -0
403 lines not on this page · raw message
drivers/net/ti/icssg_config.h new file +177 -0
177 lines not on this page · raw message
drivers/net/ti/icssg_prueth.h new file +78 -0
78 lines not on this page · raw message
Signature · 1 line
2.34.1
RFC PATCH 4/16 net: ti: icssg: Add icssg queues APIs and macros
In reply to MD Danish AnwarAdd icssg_queue.c file. This file introduces macros and APIs related to ICSSG queues. These will be used by ICSSG Ethernet driver.
--- drivers/net/ti/icssg_prueth.h | 5 ++++ drivers/net/ti/icssg_queues.c | 51 +++++++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 drivers/net/ti/icssg_queues.c
drivers/net/ti/icssg_prueth.h +5 -0
@@ -75,4 +75,9 @@ void icssg_config_ipg(struct prueth *prueth, int speed, int mii);int icssg_config (struct prueth *prueth);int emac_set_port_state (struct prueth *prueth,enum icssg_port_state_cmd cmd); +/* Buffer queue helpers */ +int icssg_queue_pop (struct prueth *prueth,u8 queue); +void icssg_queue_push (struct prueth *prueth,int queue,u16 addr); +u32 icssg_queue_level (struct prueth *prueth,int queue); +#endif /* __NET_TI_ICSSG_PRUETH_H */
drivers/net/ti/icssg_queues.c new file +51 -0
51 lines not on this page · raw message
Signature · 1 line
2.34.1
RFC PATCH 5/16 net: ti: icssg: Add ICSSG ethernet driver
In reply to MD Danish AnwarThis is the PURSS Ethernet driver for TI AM654 Sr2.0 and laterSoCs with the ICSSG PRU Sub-system running EMAC firmware. This driver caters to either of the slices(pru/rtu pair) of the icssg subsystem.
One and exactly one of the slices is supported as the u-boot ethernet supports probing one interface at a time.
--- drivers/net/ti/Kconfig | 8 + drivers/net/ti/Makefile | 1 + drivers/net/ti/icssg_prueth.c | 589 ++++++++++++++++++++++++++++++++++ 3 files changed, 598 insertions(+) create mode 100644 drivers/net/ti/icssg_prueth.c
drivers/net/ti/Kconfig +8 -0
@@ -49,3 +49,11 @@ config TI_AM65_CPSW_NUSS help This driver supports TI K3 MCU CPSW Nuss Ethernet controller in Texas Instruments K3 AM65x SoCs. + +config TI_ICSSG_PRUETH + bool "TI Gigabit PRU Ethernet driver" + depends on ARCH_K3 + select PHYLIB + help + Support Gigabit Ethernet ports over the ICSSG PRU Subsystem + This subsystem is available starting with the AM65 platform.
drivers/net/ti/Makefile +1 -0
@@ -6,3 +6,4 @@ obj-$(CONFIG_DRIVER_TI_CPSW) += cpsw.o cpsw-common.o cpsw_mdio.o obj-$(CONFIG_DRIVER_TI_EMAC) += davinci_emac.o obj-$(CONFIG_DRIVER_TI_KEYSTONE_NET) += keystone_net.o cpsw_mdio.o obj-$(CONFIG_TI_AM65_CPSW_NUSS) += am65-cpsw-nuss.o cpsw_mdio.o +obj-$(CONFIG_TI_ICSSG_PRUETH) += icssg_prueth.o cpsw_mdio.o icssg_classifier.o icssg_config.o icssg_queues.o
drivers/net/ti/icssg_prueth.c new file +589 -0
589 lines not on this page · raw message
Signature · 1 line
2.34.1
RFC PATCH 6/16 net: ti: icssg: Add support sending FDB command to update rx_flow_id
In reply to MD Danish AnwarICSSG firmware supports FDB commands. Add support to send FDB commands from driver. Once rx_flow_id is obtained from dma, let firmware know that we are using this rx_flow_id by sending a FDB command.
--- drivers/net/ti/icssg_config.c | 66 +++++++++++++++++++++++++++++++++++ drivers/net/ti/icssg_config.h | 18 ++++++++++ drivers/net/ti/icssg_prueth.c | 6 ++++ drivers/net/ti/icssg_prueth.h | 6 ++++ 4 files changed, 96 insertions(+)
drivers/net/ti/icssg_config.c +66 -0
@@ -9,6 +9,7 @@#include "icssg_switch_map.h" #include "icss_mii_rt.h" #include <dm/device_compat.h> +#include <linux/iopoll.h> /* TX IPG Values to be set for 100M and 1G link speeds. These values are * in ocp_clk cycles. So need change if ocp_clk is changed for a specific
@@ -401,3 +402,68 @@ int emac_set_port_state(struct prueth *prueth,return ret; } + +int icssg_send_fdb_msg (struct prueth *prueth,struct mgmt_cmd *cmd, +struct mgmt_cmd_rsp *rsp) +{ +int slice = prueth->slice; +int ret, addr; + + addr =icssg_queue_pop (prueth, slice ==0 ? +ICSSG_CMD_POP_SLICE0 :ICSSG_CMD_POP_SLICE1 ); +if (addr <0 ) +return addr; + +/* First 4 bytes have FW owned buffer linking info which should +* not be touched +*/ +memcpy_toio ((void __iomem *)prueth->shram.pa + addr +4 , cmd,sizeof (*cmd)); +icssg_queue_push (prueth, slice ==0 ? +ICSSG_CMD_PUSH_SLICE0 :ICSSG_CMD_PUSH_SLICE1 , addr); + ret =read_poll_timeout (icssg_queue_pop, addr, addr >=0 , +2000 ,20000000 , prueth, slice ==0 ? +ICSSG_RSP_POP_SLICE0 :ICSSG_RSP_POP_SLICE1 ); + +if (ret) { +dev_err (prueth->dev,"Timedout sending HWQ message\n" ); +return ret; + } + +memcpy_fromio (rsp, (void __iomem *)prueth->shram.pa + addr,sizeof (*rsp)); +/* Return buffer back for to pool */ +icssg_queue_push (prueth, slice ==0 ? +ICSSG_RSP_PUSH_SLICE0 :ICSSG_RSP_PUSH_SLICE1 , addr); + +return 0 ; +} + +int emac_fdb_flow_id_updated (struct prueth *prueth) +{ +struct mgmt_cmd_rsp fdb_cmd_rsp = {0 }; +int slice = prueth->slice; +struct mgmt_cmd fdb_cmd = {0 }; +int ret =0 ; + + fdb_cmd.header =ICSSG_FW_MGMT_CMD_HEADER ; + fdb_cmd.type =ICSSG_FW_MGMT_FDB_CMD_TYPE_RX_FLOW ; + fdb_cmd.seqnum = ++(prueth->icssg_hwcmdseq); + fdb_cmd.param =0 ; + + fdb_cmd.param |= (slice <<4 ); + fdb_cmd.cmd_args[0 ] =0 ; + + ret =icssg_send_fdb_msg (prueth, &fdb_cmd, &fdb_cmd_rsp); +if (ret) +return ret; + +if (fdb_cmd.seqnum != fdb_cmd_rsp.seqnum) { +dev_err (prueth->dev,"seqnum doesn't match, cmd.seqnum %d != rsp.seqnum %d\n" , + fdb_cmd.seqnum, fdb_cmd_rsp.seqnum); +return -EINVAL ; + } + +if (fdb_cmd_rsp.status ==1 ) +return 0 ; + +return -EINVAL ; +}
drivers/net/ti/icssg_config.h +18 -0
@@ -80,6 +80,7 @@ struct icssg_rxq_ctx {#define ICSSG_FW_MGMT_FDB_CMD_TYPE 0x03#define ICSSG_FW_MGMT_CMD_TYPE 0x04#define ICSSG_FW_MGMT_PKT 0x80000000 +#define ICSSG_FW_MGMT_FDB_CMD_TYPE_RX_FLOW 0x05struct icssg_r30_cmd {u32 cmd[4 ];
@@ -156,6 +157,23 @@ struct icssg_setclock_desc {u32 CMP0_new; } __packed; +struct mgmt_cmd { +u8 param; +u8 seqnum; +u8 type; +u8 header; +u32 cmd_args[3 ]; +} __packed; + +struct mgmt_cmd_rsp { +u32 reserved; +u8 status; +u8 seqnum; +u8 type; +u8 header; +u32 cmd_args[3 ]; +} __packed; +#define ICSSG_CMD_POP_SLICE0 56#define ICSSG_CMD_POP_SLICE1 60
drivers/net/ti/icssg_prueth.c +6 -0
@@ -225,6 +225,12 @@ static int prueth_start(struct udevice *dev)dev_info (dev,"K3 ICSSG: rflow_id_base: %u, chn_name = %s\n" , dma_rx_cfg_data->flow_id_base, chn_name); + ret =emac_fdb_flow_id_updated (priv); +if (ret) { +dev_err (dev,"Failed to update Rx Flow ID %d" , ret); + goto phy_fail; + } + ret =phy_startup (priv->phydev);if (ret) {dev_err (dev,"phy_startup failed\n" );
drivers/net/ti/icssg_prueth.h +6 -0
@@ -68,6 +68,7 @@ struct prueth {bool mdio_manual_mode;int speed;int duplex; +u8 icssg_hwcmdseq; };/* config helpers */
@@ -80,4 +81,9 @@ int icssg_queue_pop(struct prueth *prueth, u8 queue);void icssg_queue_push (struct prueth *prueth,int queue,u16 addr);u32 icssg_queue_level (struct prueth *prueth,int queue); +/* FDB helpers */ +int icssg_send_fdb_msg (struct prueth *prueth,struct mgmt_cmd *cmd, +struct mgmt_cmd_rsp *rsp); +int emac_fdb_flow_id_updated (struct prueth *prueth); +#endif /* __NET_TI_ICSSG_PRUETH_H */
Signature · 1 line
2.34.1
RFC PATCH 7/16 net: ti: icssg: Enforce pinctrl state on the MDIO child node
In reply to MD Danish AnwarThe binding represents the MDIO controller as a child device tree node of the MAC device tree node.
The U-Boot driver mostly ignores that child device tree node and just hardcodes the resources it uses to support both the MAC and MDIO in a single driver.
However, some resources like pinctrl muxing states are thus ignored. This has been a problem with some device trees that will put some pinctrl states on the MDIO device tree node.
Let's rework the driver a bit to create a dummy MDIO driver that we will then get during our initialization to force the core to select the right muxing.
--- drivers/net/ti/Kconfig | 1 + drivers/net/ti/icssg_prueth.c | 59 +++++++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+)
drivers/net/ti/Kconfig +1 -0
@@ -53,6 +53,7 @@ config TI_AM65_CPSW_NUSS config TI_ICSSG_PRUETH bool "TI Gigabit PRU Ethernet driver" depends on ARCH_K3 + imply DM_MDIO select PHYLIB help Support Gigabit Ethernet ports over the ICSSG PRU Subsystem
drivers/net/ti/icssg_prueth.c +59 -0
77 lines not on this page · raw message
Signature · 1 line
2.34.1
RFC PATCH 8/16 arm: dts: k3-am65: Add additional regs for DMA components
In reply to MD Danish AnwarAdd additional reg properties for UDMA and RingAcc nodes which are mostly used by bootloader components before Device Manager firmware services are available, in order to setup DMA transfers.
--- arch/arm/dts/k3-am65-main.dtsi | 8 ++++++-- arch/arm/dts/k3-am65-mcu.dtsi | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-)
arch/arm/dts/k3-am65-main.dtsi +6 -2
@@ -616,8 +616,12 @@ compatible = "ti,am654-navss-main-udmap"; reg = <0x0 0x31150000 0x0 0x100>, <0x0 0x34000000 0x0 0x100000>, - <0x0 0x35000000 0x0 0x100000>; - reg-names = "gcfg", "rchanrt", "tchanrt"; + <0x0 0x35000000 0x0 0x100000>, + <0x0 0x30b00000 0x0 0x20000>, + <0x0 0x30c00000 0x0 0x8000>, + <0x0 0x30d00000 0x0 0x4000>; + reg-names = "gcfg", "rchanrt", "tchanrt", + "tchan", "rchan", "rflow"; msi-parent = <&inta_main_udmass>; #dma-cells = <1>;
arch/arm/dts/k3-am65-mcu.dtsi +6 -2
@@ -142,8 +142,12 @@ compatible = "ti,am654-navss-mcu-udmap"; reg = <0x0 0x285c0000 0x0 0x100>, <0x0 0x2a800000 0x0 0x40000>, - <0x0 0x2aa00000 0x0 0x40000>; - reg-names = "gcfg", "rchanrt", "tchanrt"; + <0x0 0x2aa00000 0x0 0x40000>, + <0x0 0x284a0000 0x0 0x4000>, + <0x0 0x284c0000 0x0 0x4000>, + <0x0 0x28400000 0x0 0x2000>; + reg-names = "gcfg", "rchanrt", "tchanrt", + "tchan", "rchan", "rflow"; msi-parent = <&inta_main_udmass>; #dma-cells = <1>;
Signature · 1 line
2.34.1
RFC PATCH 9/16 arm: dts: k3-am65: Add cfg reg region to ringacc node
In reply to MD Danish AnwarAdd register range of ringacc cfg node to k3-am65* dtsi files. This is normally under Device Management firmware control but some entities like bootloader have to access directly and thus required to be present in DT.
--- arch/arm/dts/k3-am65-main.dtsi | 5 +++-- arch/arm/dts/k3-am65-mcu.dtsi | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-)
arch/arm/dts/k3-am65-main.dtsi +3 -2
@@ -603,8 +603,9 @@ reg = <0x0 0x3c000000 0x0 0x400000>, <0x0 0x38000000 0x0 0x400000>, <0x0 0x31120000 0x0 0x100>, - <0x0 0x33000000 0x0 0x40000>; - reg-names = "rt", "fifos", "proxy_gcfg", "proxy_target"; + <0x0 0x33000000 0x0 0x40000>, + <0x0 0x31080000 0x0 0x40000>; + reg-names = "rt", "fifos", "proxy_gcfg", "proxy_target", "cfg"; ti,num-rings = <818>; ti,sci-rm-range-gp-rings = <0x1>; /* GP ring range */ ti,sci = <&dmsc>;
arch/arm/dts/k3-am65-mcu.dtsi +3 -2
@@ -129,8 +129,9 @@ reg = <0x0 0x2b800000 0x0 0x400000>, <0x0 0x2b000000 0x0 0x400000>, <0x0 0x28590000 0x0 0x100>, - <0x0 0x2a500000 0x0 0x40000>; - reg-names = "rt", "fifos", "proxy_gcfg", "proxy_target"; + <0x0 0x2a500000 0x0 0x40000>, + <0x0 0x28440000 0x0 0x40000>; + reg-names = "rt", "fifos", "proxy_gcfg", "proxy_target", "cfg"; ti,num-rings = <286>; ti,sci-rm-range-gp-rings = <0x1>; /* GP ring range */ ti,sci = <&dmsc>;
Signature · 1 line
2.34.1
RFC PATCH 10/16 arm: dts: k3-am65-main: Add ICSSG IEP nodes
In reply to MD Danish AnwarThe ICSSG IP on AM65x SoCs have two Industrial Ethernet Peripherals (IEPs) to manage/generate Industrial Ethernet functions such as time stamping. Each IEP sub-module is sourced from an internal clock mux that can be sourced from either of the IP instance's ICSSG_IEP_GCLK or ICSSG_ICLK. Add the IEP nodes for all the ICSSG instances.
--- arch/arm/dts/k3-am65-main.dtsi | 36 ++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+)
arch/arm/dts/k3-am65-main.dtsi +36 -0
@@ -969,6 +969,18 @@ }; }; + icssg0_iep0: iep@2e000 { + compatible = "ti,am654-icss-iep"; + reg = <0x2e000 0x1000>; + clocks = <&icssg0_iepclk_mux>; + }; + + icssg0_iep1: iep@2f000 { + compatible = "ti,am654-icss-iep"; + reg = <0x2f000 0x1000>; + clocks = <&icssg0_iepclk_mux>; + }; + icssg0_mii_rt: mii-rt@32000 { compatible = "ti,pruss-mii", "syscon"; reg = <0x32000 0x100>;
@@ -1110,6 +1122,18 @@ }; }; + icssg1_iep0: iep@2e000 { + compatible = "ti,am654-icss-iep"; + reg = <0x2e000 0x1000>; + clocks = <&icssg1_iepclk_mux>; + }; + + icssg1_iep1: iep@2f000 { + compatible = "ti,am654-icss-iep"; + reg = <0x2f000 0x1000>; + clocks = <&icssg1_iepclk_mux>; + }; + icssg1_mii_rt: mii-rt@32000 { compatible = "ti,pruss-mii", "syscon"; reg = <0x32000 0x100>;
@@ -1256,6 +1280,18 @@ reg = <0x32000 0x100>; }; + icssg2_iep0: iep@2e000 { + compatible = "ti,am654-icss-iep"; + reg = <0x2e000 0x1000>; + clocks = <&icssg2_iepclk_mux>; + }; + + icssg2_iep1: iep@2f000 { + compatible = "ti,am654-icss-iep"; + reg = <0x2f000 0x1000>; + clocks = <&icssg2_iepclk_mux>; + }; + icssg2_mii_g_rt: mii-g-rt@33000 { compatible = "ti,pruss-mii-g", "syscon"; reg = <0x33000 0x1000>;
Signature · 1 line
2.34.1
Re: [RFC PATCH 10/16] arm: dts: k3-am65-main: Add ICSSG IEP nodes
Quoted 10 lines · MD Danish Anwar
The ICSSG IP on AM65x SoCs have two Industrial Ethernet Peripherals (IEPs) to manage/generate Industrial Ethernet functions such as time stamping. Each IEP sub-module is sourced from an internal clock mux that can be sourced from either of the IP instance's
ICSSG_IEP_GCLKorICSSG_ICLK. Add the IEP nodes for all the ICSSG instances.Signed-off-by MD Danish Anwar <[email protected]>--- arch/arm/dts/k3-am65-main.dtsi | 36 ++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+)
What's the status of all of the DT side of this, upstream?
Signature · 1 line
Tom
Re: [RFC PATCH 10/16] arm: dts: k3-am65-main: Add ICSSG IEP nodes
Hi Tom,
Quoted 8 lines · Tom Rini
Quoted 6 lines · MD Danish Anwar
The ICSSG IP on AM65x SoCs have two Industrial Ethernet Peripherals (IEPs) to manage/generate Industrial Ethernet functions such as time stamping. Each IEP sub-module is sourced from an internal clock mux that can be sourced from either of the IP instance's
ICSSG_IEP_GCLKorICSSG_ICLK. Add the IEP nodes for all the ICSSG instances.
Quoted 7 lines
Quoted 4 lines
Signed-off-by MD Danish Anwar <[email protected]>--- arch/arm/dts/k3-am65-main.dtsi | 36 ++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+)What's the status of all of the DT side of this, upstream?
All of the DT patches are already part of upstream linux kernel except for patch 08/16. This patch is currently in linux-next and will be in linux in 6.8-rc1.
Signature · 2 lines
Thanks and Regards, Danish
Nishanth Menon
NAKRe: [RFC PATCH 10/16] arm: dts: k3-am65-main: Add ICSSG IEP nodes
Quoted 16 lines · MD Danish Anwar
Hi Tom,
Quoted 13 lines · Tom Rini
Quoted 10 lines · MD Danish Anwar
The ICSSG IP on AM65x SoCs have two Industrial Ethernet Peripherals (IEPs) to manage/generate Industrial Ethernet functions such as time stamping. Each IEP sub-module is sourced from an internal clock mux that can be sourced from either of the IP instance's
ICSSG_IEP_GCLKorICSSG_ICLK. Add the IEP nodes for all the ICSSG instances.Signed-off-by MD Danish Anwar <[email protected]>--- arch/arm/dts/k3-am65-main.dtsi | 36 ++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+)
Quoted 7 lines
Quoted 2 lines
What's the status of all of the DT side of this, upstream?
All of the DT patches are already part of upstream linux kernel except for patch 08/16. This patch is currently in linux-next and will be in linux in 6.8-rc1.
NAK.
Send a sync at 6.8-rc1 and then start working - DONOT SEND patches modifying SoC dtsi or evm files directly in u-boot.
I think you need to start talking to other folks in the team who have have received the same feedback.
Signature · 3 lines
Regards, Nishanth Menon Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D
Re: [RFC PATCH 10/16] arm: dts: k3-am65-main: Add ICSSG IEP nodes
Quoted 25 lines · Nishanth Menon
Quoted 16 lines · MD Danish Anwar
Hi Tom,
Quoted 13 lines · Tom Rini
Quoted 10 lines · MD Danish Anwar
The ICSSG IP on AM65x SoCs have two Industrial Ethernet Peripherals (IEPs) to manage/generate Industrial Ethernet functions such as time stamping. Each IEP sub-module is sourced from an internal clock mux that can be sourced from either of the IP instance's
ICSSG_IEP_GCLKorICSSG_ICLK. Add the IEP nodes for all the ICSSG instances.Signed-off-by MD Danish Anwar <[email protected]>--- arch/arm/dts/k3-am65-main.dtsi | 36 ++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+)Quoted 7 lines
Quoted 2 lines
What's the status of all of the DT side of this, upstream?
All of the DT patches are already part of upstream linux kernel except for patch 08/16. This patch is currently in linux-next and will be in linux in 6.8-rc1.
Quoted 5 lines
NAK.
Send a sync at 6.8-rc1 and then start working - DONOT SEND patches modifying SoC dtsi or evm files directly in u-boot.
Sorry. I wasn't aware of this. I will resend this only after the changes are in mainline linux.
Quoted 3 lines
I think you need to start talking to other folks in the team who have have received the same feedback.
Sure Nishant. Will do.
Signature · 2 lines
Thanks and Regards, Md Danish Anwar
RFC PATCH 11/16 arm: dts: k3-am654-base-board: Add ICSSG2 Ethernet support
In reply to MD Danish AnwarICSSG2 provides dual Gigabit Ethernet support.
Add ICSSG2 ethernet node to an overlay k3-am654-icssg2.dtso
--- arch/arm/dts/Makefile | 3 +- arch/arm/dts/k3-am654-icssg2.dtso | 145 ++++++++++++++++++++++++++++++ 2 files changed, 147 insertions(+), 1 deletion(-) create mode 100644 arch/arm/dts/k3-am654-icssg2.dtso
arch/arm/dts/Makefile +2 -1
@@ -1396,7 +1396,8 @@ dtb-$(CONFIG_SOC_K3_AM654) += \ k3-am6548-iot2050-advanced-pg2.dtb \ k3-am6548-iot2050-advanced-m2.dtb \ k3-am6548-iot2050-advanced-m2-bkey-usb3-overlay.dtbo \ - k3-am6548-iot2050-advanced-m2-bkey-ekey-pcie-overlay.dtbo + k3-am6548-iot2050-advanced-m2-bkey-ekey-pcie-overlay.dtbo \ + k3-am654-icssg2.dtbo dtb-$(CONFIG_SOC_K3_J721E) += k3-j721e-common-proc-board.dtb \ k3-j721e-r5-common-proc-board.dtb \ k3-j7200-common-proc-board.dtb \
arch/arm/dts/k3-am654-icssg2.dtso new file +145 -0
145 lines not on this page · raw message
Signature · 1 line
2.34.1
Re: [RFC PATCH 11/16] arm: dts: k3-am654-base-board: Add ICSSG2 Ethernet support
arch/arm/dts/k3-am654-icssg2.dtso
Quoted 29 lines · MD Danish Anwar
ICSSG2 provides dual Gigabit Ethernet support.
Add ICSSG2 ethernet node to an overlay k3-am654-icssg2.dtsoSigned-off-by MD Danish Anwar <[email protected]>--- arch/arm/dts/Makefile | 3 +- arch/arm/dts/k3-am654-icssg2.dtso | 145 ++++++++++++++++++++++++++++++ 2 files changed, 147 insertions(+), 1 deletion(-) create mode 100644 arch/arm/dts/k3-am654-icssg2.dtsoarch/arm/dts/Makefile +2
-1@@ -1396,7 +1396,8 @@ dtb-$(CONFIG_SOC_K3_AM654) += \ k3-am6548-iot2050-advanced-pg2.dtb \ k3-am6548-iot2050-advanced-m2.dtb \ k3-am6548-iot2050-advanced-m2-bkey-usb3-overlay.dtbo \ - k3-am6548-iot2050-advanced-m2-bkey-ekey-pcie-overlay.dtbo + k3-am6548-iot2050-advanced-m2-bkey-ekey-pcie-overlay.dtbo \ + k3-am654-icssg2.dtbo dtb-$(CONFIG_SOC_K3_J721E) += k3-j721e-common-proc-board.dtb \ k3-j721e-r5-common-proc-board.dtb \ k3-j7200-common-proc-board.dtb \arch/arm/dts/k3-am654-icssg2.dtso new file +0
-0
Why is this an overlay file? Isn't ICSSG2 part of base board?
Quoted 146 lines
arch/arm/dts/k3-am654-icssg2.dtso new file +145
-0@@ -0,0 +1,145 @@ +// SPDX-License-Identifier: GPL-2.0 +/** + * DT overlay for enabling ICSSG2 on AM654 EVM + * + * Copyright (C) 2018-2023 Texas Instruments Incorporated - https://www.ti.com/ + */ + +/dts-v1/; +/plugin/; + +#include <dt-bindings/net/ti-dp83867.h> +#include "k3-pinctrl.h" + +&{/} { + aliases { + ethernet1 = "/icssg2-eth/ethernet-ports/port@0"; + ethernet2 = "/icssg2-eth/ethernet-ports/port@1"; + }; + + /* Ethernet node on PRU-ICSSG2 */ + icssg2_eth: icssg2-eth { + compatible = "ti,am654-icssg-prueth"; + pinctrl-names = "default"; + pinctrl-0 = <&icssg2_rgmii_pins_default>; + sram = <&msmc_ram>; + ti,prus = <&pru2_0>, <&rtu2_0>, <&tx_pru2_0>, + <&pru2_1>, <&rtu2_1>, <&tx_pru2_1>; + firmware-name = "ti-pruss/am65x-sr2-pru0-prueth-fw.elf", + "ti-pruss/am65x-sr2-rtu0-prueth-fw.elf", + "ti-pruss/am65x-sr2-txpru0-prueth-fw.elf", + "ti-pruss/am65x-sr2-pru1-prueth-fw.elf", + "ti-pruss/am65x-sr2-rtu1-prueth-fw.elf", + "ti-pruss/am65x-sr2-txpru1-prueth-fw.elf"; + + ti,pruss-gp-mux-sel = <2>, /* MII mode */ + <2>, + <2>, + <2>, /* MII mode */ + <2>, + <2>; + + ti,mii-g-rt = <&icssg2_mii_g_rt>; + ti,mii-rt = <&icssg2_mii_rt>; + ti,iep = <&icssg2_iep0>, <&icssg2_iep1>; + + interrupt-parent = <&icssg2_intc>; + interrupts = <24 0 2>, <25 1 3>; + interrupt-names = "tx_ts0", "tx_ts1"; + + dmas = <&main_udmap 0xc300>, /* egress slice 0 */ + <&main_udmap 0xc301>, /* egress slice 0 */ + <&main_udmap 0xc302>, /* egress slice 0 */ + <&main_udmap 0xc303>, /* egress slice 0 */ + <&main_udmap 0xc304>, /* egress slice 1 */ + <&main_udmap 0xc305>, /* egress slice 1 */ + <&main_udmap 0xc306>, /* egress slice 1 */ + <&main_udmap 0xc307>, /* egress slice 1 */ + <&main_udmap 0x4300>, /* ingress slice 0 */ + <&main_udmap 0x4301>; /* ingress slice 1 */ + + dma-names = "tx0-0", "tx0-1", "tx0-2", "tx0-3", + "tx1-0", "tx1-1", "tx1-2", "tx1-3", + "rx0", "rx1"; + ethernet-ports { + #address-cells = <1>; + #size-cells = <0>; + icssg2_emac0: port@0 { + reg = <0>; + phy-handle = <&icssg2_phy0>; + phy-mode = "rgmii-id"; + ti,syscon-rgmii-delay = <&scm_conf 0x4120>; + /* Filled in by bootloader */ + local-mac-address = [00 00 00 00 00 00]; + }; + icssg2_emac1: port@1 { + reg = <1>; + phy-handle = <&icssg2_phy1>; + phy-mode = "rgmii-id"; + ti,syscon-rgmii-delay = <&scm_conf 0x4124>; + /* Filled in by bootloader */ + local-mac-address = [00 00 00 00 00 00]; + }; + }; + }; +}; + +&main_pmx0 { + + icssg2_mdio_pins_default: icssg2-mdio-default-pins { + pinctrl-single,pins = < + AM65X_IOPAD(0x0094, PIN_INPUT, 2) /* (AC19) PRG2_PRU0_GPO7.PRG2_MDIO0_MDIO */ + AM65X_IOPAD(0x00c8, PIN_OUTPUT, 2) /* (AE15) PRG2_PRU1_GPO7.PRG2_MDIO0_MDC */ + >; + }; + + icssg2_rgmii_pins_default: icssg2-rgmii-default-pins { + pinctrl-single,pins = < + AM65X_IOPAD(0x00ac, PIN_INPUT, 2) /* (AH15) PRG2_PRU1_GPO0.PRG2_RGMII2_RD0 */ + AM65X_IOPAD(0x00b0, PIN_INPUT, 2) /* (AC16) PRG2_PRU1_GPO1.PRG2_RGMII2_RD1 */ + AM65X_IOPAD(0x00b4, PIN_INPUT, 2) /* (AD17) PRG2_PRU1_GPO2.PRG2_RGMII2_RD2 */ + AM65X_IOPAD(0x00b8, PIN_INPUT, 2) /* (AH14) PRG2_PRU1_GPO3.PRG2_RGMII2_RD3 */ + AM65X_IOPAD(0x00cc, PIN_OUTPUT, 2) /* (AD15) PRG2_PRU1_GPO8.PRG2_RGMII2_TD0 */ + AM65X_IOPAD(0x00d0, PIN_OUTPUT, 2) /* (AF14) PRG2_PRU1_GPO9.PRG2_RGMII2_TD1 */ + AM65X_IOPAD(0x00d4, PIN_OUTPUT, 2) /* (AC15) PRG2_PRU1_GPO10.PRG2_RGMII2_TD2 */ + AM65X_IOPAD(0x00d8, PIN_OUTPUT, 2) /* (AD14) PRG2_PRU1_GPO11.PRG2_RGMII2_TD3 */ + AM65X_IOPAD(0x00dc, PIN_INPUT, 2) /* (AE14) PRG2_PRU1_GPO16.PRG2_RGMII2_TXC */ + AM65X_IOPAD(0x00c4, PIN_OUTPUT, 2) /* (AC17) PRG2_PRU1_GPO6.PRG2_RGMII2_TX_CTL */ + AM65X_IOPAD(0x00c0, PIN_INPUT, 2) /* (AG15) PRG2_PRU1_GPO5.PRG2_RGMII2_RXC */ + AM65X_IOPAD(0x00bc, PIN_INPUT, 2) /* (AG14) PRG2_PRU1_GPO4.PRG2_RGMII2_RX_CTL */ + + AM65X_IOPAD(0x0078, PIN_INPUT, 2) /* (AF18) PRG2_PRU0_GPO0.PRG2_RGMII1_RD0 */ + AM65X_IOPAD(0x007c, PIN_INPUT, 2) /* (AE18) PRG2_PRU0_GPO1.PRG2_RGMII1_RD1 */ + AM65X_IOPAD(0x0080, PIN_INPUT, 2) /* (AH17) PRG2_PRU0_GPO2.PRG2_RGMII1_RD2 */ + AM65X_IOPAD(0x0084, PIN_INPUT, 2) /* (AG18) PRG2_PRU0_GPO3.PRG2_RGMII1_RD3 */ + AM65X_IOPAD(0x0098, PIN_OUTPUT, 2) /* (AH16) PRG2_PRU0_GPO8.PRG2_RGMII1_TD0 */ + AM65X_IOPAD(0x009c, PIN_OUTPUT, 2) /* (AG16) PRG2_PRU0_GPO9.PRG2_RGMII1_TD1 */ + AM65X_IOPAD(0x00a0, PIN_OUTPUT, 2) /* (AF16) PRG2_PRU0_GPO10.PRG2_RGMII1_TD2 */ + AM65X_IOPAD(0x00a4, PIN_OUTPUT, 2) /* (AE16) PRG2_PRU0_GPO11.PRG2_RGMII1_TD3 */ + AM65X_IOPAD(0x00a8, PIN_INPUT, 2) /* (AD16) PRG2_PRU0_GPO16.PRG2_RGMII1_TXC */ + AM65X_IOPAD(0x0090, PIN_OUTPUT, 2) /* (AE17) PRG2_PRU0_GPO6.PRG2_RGMII1_TX_CTL */ + AM65X_IOPAD(0x008c, PIN_INPUT, 2) /* (AF17) PRG2_PRU0_GPO5.PRG2_RGMII1_RXC */ + AM65X_IOPAD(0x0088, PIN_INPUT, 2) /* (AG17) PRG2_PRU0_GPO4.PRG2_RGMII1_RX_CTL */ + >; + }; +}; + +&icssg2_mdio { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&icssg2_mdio_pins_default>; + #address-cells = <1>; + #size-cells = <0>; + + icssg2_phy0: ethernet-phy@0 { + reg = <0>; + ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>; + ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>; + }; + + icssg2_phy1: ethernet-phy@3 { + reg = <3>; + ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>; + ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>; + }; +};
Signature · 2 lines
cheers, -roger
Re: [RFC PATCH 11/16] arm: dts: k3-am654-base-board: Add ICSSG2 Ethernet support
Quoted 26 lines · Roger Quadros
Quoted 23 lines · MD Danish Anwar
ICSSG2 provides dual Gigabit Ethernet support.
Add ICSSG2 ethernet node to an overlay k3-am654-icssg2.dtsoSigned-off-by MD Danish Anwar <[email protected]>--- arch/arm/dts/Makefile | 3 +- arch/arm/dts/k3-am654-icssg2.dtso | 145 ++++++++++++++++++++++++++++++ 2 files changed, 147 insertions(+), 1 deletion(-) create mode 100644 arch/arm/dts/k3-am654-icssg2.dtsoarch/arm/dts/Makefile +2
-1@@ -1396,7 +1396,8 @@ dtb-$(CONFIG_SOC_K3_AM654) += \ k3-am6548-iot2050-advanced-pg2.dtb \ k3-am6548-iot2050-advanced-m2.dtb \ k3-am6548-iot2050-advanced-m2-bkey-usb3-overlay.dtbo \ - k3-am6548-iot2050-advanced-m2-bkey-ekey-pcie-overlay.dtbo + k3-am6548-iot2050-advanced-m2-bkey-ekey-pcie-overlay.dtbo \ + k3-am654-icssg2.dtbo dtb-$(CONFIG_SOC_K3_J721E) += k3-j721e-common-proc-board.dtb \ k3-j721e-r5-common-proc-board.dtb \
Quoted 9 lines
arch/arm/dts/k3-am654-icssg2.dtso
Quoted 6 lines
arch/arm/dts/Makefile +0
-0k3-j7200-common-proc-board.dtb \arch/arm/dts/k3-am654-icssg2.dtso new file +0
-0Why is this an overlay file? Isn't ICSSG2 part of base board?
It was decided during linux upstreaming [1] of this patch that ICSSG2 node should be added in overlay (suggested by 'Andrew Davis <[email protected]>'). As this node is in overlay in upstream linux, I kept it in overlay in upstream uboot as well.
[1] https://lore.kernel.org/all/[email protected]/
Quoted 8 lines
Quoted 8 lines
arch/arm/dts/k3-am654-icssg2.dtso new file +7
-0@@ -0,0 +1,145 @@ +// SPDX-License-Identifier: GPL-2.0 +/** + * DT overlay for enabling ICSSG2 on AM654 EVM + * + * Copyright (C) 2018-2023 Texas Instruments Incorporated - https://www.ti.com/ + */ +
[ ... ]
Signature · 2 lines
Thanks and Regards, Md Danish Anwar
RFC PATCH 12/16 arm: dts: k3-am65x-binman: Add ICSSG2 overlay and configuration
In reply to MD Danish AnwarAdd ICSSG2 overlay and configuration to tispl and u-boot images.
--- arch/arm/dts/k3-am65x-binman.dtsi | 85 +++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+)
arch/arm/dts/k3-am65x-binman.dtsi +85 -0
@@ -98,6 +98,8 @@ #define SPL_AM654_EVM_DTB "spl/dts/k3-am654-base-board.dtb" #define AM654_EVM_DTB "u-boot.dtb" +#define AM654_EVM_ICSSG2_DTBO "arch/arm/dts/k3-am654-icssg2.dtbo" + &binman { ti-spl { insert-template = <&ti_spl_template>;
@@ -124,6 +126,20 @@ filename = SPL_AM654_EVM_DTB; }; }; + + fdt-1 { + description = "k3-am654-icssg2 overlay"; + type = "flat_dt"; + arch = "arm"; + compression = "none"; + ti-secure { + content = <&spl_am65x_evm_icssg2_dtb>; + keyfile = "custMpk.pem"; + }; + spl_am65x_evm_icssg2_dtb: blob-ext { + filename = AM654_EVM_ICSSG2_DTBO; + }; + }; }; configurations {
@@ -135,6 +151,13 @@ loadables = "tee", "dm", "spl"; fdt = "fdt-0"; }; + + conf-1 { + description = "k3-am654-icssg2"; + firmware = "atf"; + loadables = "tee", "dm", "spl"; + fdt = "fdt-0", "fdt-1"; + }; }; }; };
@@ -168,6 +191,24 @@ }; }; + fdt-1 { + description = "k3-am654-icssg2 overlay"; + type = "flat_dt"; + arch = "arm"; + compression = "none"; + ti-secure { + content = <&am65x_evm_icssg2_dtb>; + keyfile = "custMpk.pem"; + + }; + am65x_evm_icssg2_dtb: blob-ext { + filename = AM654_EVM_ICSSG2_DTBO; + }; + hash { + algo = "crc32"; + }; + }; + }; configurations {
@@ -179,6 +220,13 @@ loadables = "uboot"; fdt = "fdt-0"; }; + + conf-1 { + description = "k3-am654-icssg2"; + firmware = "uboot"; + loadables = "uboot"; + fdt = "fdt-0", "fdt-1"; + }; }; }; };
@@ -205,6 +253,16 @@ filename = SPL_AM654_EVM_DTB; }; }; + + fdt-1 { + description = "k3-am654-icssg2 overlay"; + type = "flat_dt"; + arch = "arm"; + compression = "none"; + blob { + filename = AM654_EVM_ICSSG2_DTBO; + }; + }; }; configurations {
@@ -216,6 +274,13 @@ loadables = "tee", "dm", "spl"; fdt = "fdt-0"; }; + + conf-1 { + description = "k3-am654-icssg2"; + firmware = "atf"; + loadables = "tee", "dm", "spl"; + fdt = "fdt-0", "fdt-1"; + }; }; }; };
@@ -243,6 +308,19 @@ algo = "crc32"; }; }; + + fdt-1 { + description = "k3-am654-icssg2"; + type = "flat_dt"; + arch = "arm"; + compression = "none"; + blob { + filename = AM654_EVM_ICSSG2_DTBO; + }; + hash { + algo = "crc32"; + }; + }; }; configurations {
@@ -254,6 +332,13 @@ loadables = "uboot"; fdt = "fdt-0"; }; + + conf-1 { + description = "k3-am654-icssg2"; + firmware = "uboot"; + loadables = "uboot"; + fdt = "fdt-0", "fdt-1"; + }; }; }; };
Signature · 1 line
2.34.1
Re: [RFC PATCH 12/16] arm: dts: k3-am65x-binman: Add ICSSG2 overlay and configuration
Quoted 27 lines · MD Danish Anwar
Add ICSSG2 overlay and configuration to tispl and u-boot images.
Signed-off-by MD Danish Anwar <[email protected]>--- arch/arm/dts/k3-am65x-binman.dtsi | 85 +++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+)arch/arm/dts/k3-am65x-binman.dtsi +5
-0@@ -98,6 +98,8 @@ #define SPL_AM654_EVM_DTB "spl/dts/k3-am654-base-board.dtb" #define AM654_EVM_DTB "u-boot.dtb" +#define AM654_EVM_ICSSG2_DTBO "arch/arm/dts/k3-am654-icssg2.dtbo" + &binman { ti-spl { insert-template = <&ti_spl_template>;@@ -124,6 +126,20 @@ filename = SPL_AM654_EVM_DTB; }; }; + + fdt-1 { + description = "k3-am654-icssg2 overlay";
arch/arm/dts/k3-am65x-binman.dtsi line 141
Quoted 10 lines
arch/arm/dts/k3-am65x-binman.dtsi +10
-0+ type = "flat_dt"; + arch = "arm"; + compression = "none"; + ti-secure { + content = <&spl_am65x_evm_icssg2_dtb>; + keyfile = "custMpk.pem"; + }; + spl_am65x_evm_icssg2_dtb: blob-ext { + filename = AM654_EVM_ICSSG2_DTBO; + };
This is wrong.
ICSSG2 Ethernet should be part of the fdt-0 configuration as the 2 Ethernet ports on the board are hardwired to ICSSG2. Not having them working by default is an invalid configuration.
Quoted 122 lines
arch/arm/dts/k3-am65x-binman.dtsi +70
-0+ }; }; configurations {@@ -135,6 +151,13 @@ loadables = "tee", "dm", "spl"; fdt = "fdt-0"; }; + + conf-1 { + description = "k3-am654-icssg2"; + firmware = "atf"; + loadables = "tee", "dm", "spl"; + fdt = "fdt-0", "fdt-1"; + }; }; }; };@@ -168,6 +191,24 @@ }; }; + fdt-1 { + description = "k3-am654-icssg2 overlay"; + type = "flat_dt"; + arch = "arm"; + compression = "none"; + ti-secure { + content = <&am65x_evm_icssg2_dtb>; + keyfile = "custMpk.pem"; + + }; + am65x_evm_icssg2_dtb: blob-ext { + filename = AM654_EVM_ICSSG2_DTBO; + }; + hash { + algo = "crc32"; + }; + }; + }; configurations {@@ -179,6 +220,13 @@ loadables = "uboot"; fdt = "fdt-0"; }; + + conf-1 { + description = "k3-am654-icssg2"; + firmware = "uboot"; + loadables = "uboot"; + fdt = "fdt-0", "fdt-1"; + }; }; }; };@@ -205,6 +253,16 @@ filename = SPL_AM654_EVM_DTB; }; }; + + fdt-1 { + description = "k3-am654-icssg2 overlay"; + type = "flat_dt"; + arch = "arm"; + compression = "none"; + blob { + filename = AM654_EVM_ICSSG2_DTBO; + }; + }; }; configurations {@@ -216,6 +274,13 @@ loadables = "tee", "dm", "spl"; fdt = "fdt-0"; }; + + conf-1 { + description = "k3-am654-icssg2"; + firmware = "atf"; + loadables = "tee", "dm", "spl"; + fdt = "fdt-0", "fdt-1"; + }; }; }; };@@ -243,6 +308,19 @@ algo = "crc32"; }; }; + + fdt-1 { + description = "k3-am654-icssg2"; + type = "flat_dt"; + arch = "arm"; + compression = "none"; + blob { + filename = AM654_EVM_ICSSG2_DTBO; + }; + hash { + algo = "crc32"; + }; + }; }; configurations {@@ -254,6 +332,13 @@ loadables = "uboot"; fdt = "fdt-0"; }; + + conf-1 { + description = "k3-am654-icssg2"; + firmware = "uboot"; + loadables = "uboot"; + fdt = "fdt-0", "fdt-1"; + }; }; }; };
Signature · 2 lines
cheers, -roger
Re: [RFC PATCH 12/16] arm: dts: k3-am65x-binman: Add ICSSG2 overlay and configuration
Quoted 43 lines · Roger Quadros
Quoted 27 lines · MD Danish Anwar
Add ICSSG2 overlay and configuration to tispl and u-boot images.
Signed-off-by MD Danish Anwar <[email protected]>--- arch/arm/dts/k3-am65x-binman.dtsi | 85 +++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+)arch/arm/dts/k3-am65x-binman.dtsi +5
-0@@ -98,6 +98,8 @@ #define SPL_AM654_EVM_DTB "spl/dts/k3-am654-base-board.dtb" #define AM654_EVM_DTB "u-boot.dtb" +#define AM654_EVM_ICSSG2_DTBO "arch/arm/dts/k3-am654-icssg2.dtbo" + &binman { ti-spl { insert-template = <&ti_spl_template>;@@ -124,6 +126,20 @@ filename = SPL_AM654_EVM_DTB; }; }; + + fdt-1 { + description = "k3-am654-icssg2 overlay";arch/arm/dts/k3-am65x-binman.dtsi line 141
Quoted 10 lines
arch/arm/dts/k3-am65x-binman.dtsi +10
-0+ type = "flat_dt"; + arch = "arm"; + compression = "none"; + ti-secure { + content = <&spl_am65x_evm_icssg2_dtb>; + keyfile = "custMpk.pem"; + }; + spl_am65x_evm_icssg2_dtb: blob-ext { + filename = AM654_EVM_ICSSG2_DTBO; + };This is wrong.
Quoted 4 lines
ICSSG2 Ethernet should be part of the fdt-0 configuration as the 2 Ethernet ports on the board are hardwired to ICSSG2. Not having them working by default is an invalid configuration.
ICSSG2 ethernet ports should be enabled by default. But the ICSSG2 nodes is added in the overlay file (k3-am654-icssg2.dtso) in kernel so they are added in same overlay file in u-boot as well.
I am keeping,
fdt-0 as k3-am654-base-board dtb,
fdt-1 as k3-am654-icssg2 dtbo,
conf-0 as k3-am654-base-board and
conf-1 as k3-am654-icssg2.
Do you want me to keep k3-am654-icssg2 dtbo as fdt-0 and k3-am654-base-board as fdt-1? I tried doing this but this results into u-boot getting stuck. The tispl and u-boot images are not able to load if I swap fdt-0 and fdt-1 , and conf-0 and conf-1.
If the current combination doesn't look OK, please let me know what should be the correct combinations for fdt-0, fdt-1, conf-0 and conf-1.
Quoted 123 lines
Quoted 122 lines
arch/arm/dts/k3-am65x-binman.dtsi +70
-0+ }; }; configurations {@@ -135,6 +151,13 @@ loadables = "tee", "dm", "spl"; fdt = "fdt-0"; }; + + conf-1 { + description = "k3-am654-icssg2"; + firmware = "atf"; + loadables = "tee", "dm", "spl"; + fdt = "fdt-0", "fdt-1"; + }; }; }; };s@@ -168,6 +191,24 @@ }; }; + fdt-1 { + description = "k3-am654-icssg2 overlay"; + type = "flat_dt"; + arch = "arm"; + compression = "none"; + ti-secure { + content = <&am65x_evm_icssg2_dtb>; + keyfile = "custMpk.pem"; + + }; + am65x_evm_icssg2_dtb: blob-ext { + filename = AM654_EVM_ICSSG2_DTBO; + }; + hash { + algo = "crc32"; + }; + }; + }; configurations {@@ -179,6 +220,13 @@ loadables = "uboot"; fdt = "fdt-0"; }; + + conf-1 { + description = "k3-am654-icssg2"; + firmware = "uboot"; + loadables = "uboot"; + fdt = "fdt-0", "fdt-1"; + }; }; }; };@@ -205,6 +253,16 @@ filename = SPL_AM654_EVM_DTB; }; }; + + fdt-1 { + description = "k3-am654-icssg2 overlay"; + type = "flat_dt"; + arch = "arm"; + compression = "none"; + blob { + filename = AM654_EVM_ICSSG2_DTBO; + }; + }; }; configurations {@@ -216,6 +274,13 @@ loadables = "tee", "dm", "spl"; fdt = "fdt-0"; }; + + conf-1 { + description = "k3-am654-icssg2"; + firmware = "atf"; + loadables = "tee", "dm", "spl"; + fdt = "fdt-0", "fdt-1"; + }; }; }; };@@ -243,6 +308,19 @@ algo = "crc32"; }; }; + + fdt-1 { + description = "k3-am654-icssg2"; + type = "flat_dt"; + arch = "arm"; + compression = "none"; + blob { + filename = AM654_EVM_ICSSG2_DTBO; + }; + hash { + algo = "crc32"; + }; + }; }; configurations {@@ -254,6 +332,13 @@ loadables = "uboot"; fdt = "fdt-0"; }; + + conf-1 { + description = "k3-am654-icssg2"; + firmware = "uboot"; + loadables = "uboot"; + fdt = "fdt-0", "fdt-1"; + }; }; }; };
Signature · 2 lines
Thanks and Regards, Danish
Re: [RFC PATCH 12/16] arm: dts: k3-am65x-binman: Add ICSSG2 overlay and configuration
Hi Roger,
Quoted 59 lines · MD Danish Anwar
Quoted 43 lines · Roger Quadros
Quoted 27 lines · MD Danish Anwar
Add ICSSG2 overlay and configuration to tispl and u-boot images.
Signed-off-by MD Danish Anwar <[email protected]>--- arch/arm/dts/k3-am65x-binman.dtsi | 85 +++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+)arch/arm/dts/k3-am65x-binman.dtsi +5
-0@@ -98,6 +98,8 @@ #define SPL_AM654_EVM_DTB "spl/dts/k3-am654-base-board.dtb" #define AM654_EVM_DTB "u-boot.dtb" +#define AM654_EVM_ICSSG2_DTBO "arch/arm/dts/k3-am654-icssg2.dtbo" + &binman { ti-spl { insert-template = <&ti_spl_template>;@@ -124,6 +126,20 @@ filename = SPL_AM654_EVM_DTB; }; }; + + fdt-1 { + description = "k3-am654-icssg2 overlay";arch/arm/dts/k3-am65x-binman.dtsi line 141
Quoted 10 lines
arch/arm/dts/k3-am65x-binman.dtsi +10
-0+ type = "flat_dt"; + arch = "arm"; + compression = "none"; + ti-secure { + content = <&spl_am65x_evm_icssg2_dtb>; + keyfile = "custMpk.pem"; + }; + spl_am65x_evm_icssg2_dtb: blob-ext { + filename = AM654_EVM_ICSSG2_DTBO; + };This is wrong.
Quoted 4 lines
ICSSG2 Ethernet should be part of the fdt-0 configuration as the 2 Ethernet ports on the board are hardwired to ICSSG2. Not having them working by default is an invalid configuration.
ICSSG2 ethernet ports should be enabled by default. But the ICSSG2 nodes is added in the overlay file (k3-am654-icssg2.dtso) in kernel so they are added in same overlay file in u-boot as well.
I am keeping,
fdt-0 as k3-am654-base-board dtb,
fdt-1 as k3-am654-icssg2 dtbo,
conf-0 as k3-am654-base-board and
conf-1 as k3-am654-icssg2.
Quoted 8 lines
Do you want me to keep k3-am654-icssg2 dtbo as fdt-0 and k3-am654-base-board as fdt-1? I tried doing this but this results into u-boot getting stuck. The tispl and u-boot images are not able to load if I swap fdt-0 and fdt-1 , and conf-0 and conf-1.
If the current combination doesn't look OK, please let me know what should be the correct combinations for fdt-0, fdt-1, conf-0 and conf-1.
Can you please comment on this. I'll send v2 with all the suggested changes once you confirm the correct fdt and configurations.
<snip>
Signature · 2 lines
Thanks and Regards, Danish
Re: [RFC PATCH 12/16] arm: dts: k3-am65x-binman: Add ICSSG2 overlay and configuration
Quoted 67 lines · MD Danish Anwar
Hi Roger,
Quoted 64 lines · MD Danish Anwar
Quoted 43 lines · Roger Quadros
Quoted 27 lines · MD Danish Anwar
Add ICSSG2 overlay and configuration to tispl and u-boot images.
Signed-off-by MD Danish Anwar <[email protected]>--- arch/arm/dts/k3-am65x-binman.dtsi | 85 +++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+)arch/arm/dts/k3-am65x-binman.dtsi +5
-0@@ -98,6 +98,8 @@ #define SPL_AM654_EVM_DTB "spl/dts/k3-am654-base-board.dtb" #define AM654_EVM_DTB "u-boot.dtb" +#define AM654_EVM_ICSSG2_DTBO "arch/arm/dts/k3-am654-icssg2.dtbo" + &binman { ti-spl { insert-template = <&ti_spl_template>;@@ -124,6 +126,20 @@ filename = SPL_AM654_EVM_DTB; }; }; + + fdt-1 { + description = "k3-am654-icssg2 overlay";arch/arm/dts/k3-am65x-binman.dtsi line 141
Quoted 10 lines
arch/arm/dts/k3-am65x-binman.dtsi +10
-0+ type = "flat_dt"; + arch = "arm"; + compression = "none"; + ti-secure { + content = <&spl_am65x_evm_icssg2_dtb>; + keyfile = "custMpk.pem"; + }; + spl_am65x_evm_icssg2_dtb: blob-ext { + filename = AM654_EVM_ICSSG2_DTBO; + };This is wrong.
Quoted 4 lines
ICSSG2 Ethernet should be part of the fdt-0 configuration as the 2 Ethernet ports on the board are hardwired to ICSSG2. Not having them working by default is an invalid configuration.
ICSSG2 ethernet ports should be enabled by default. But the ICSSG2 nodes is added in the overlay file (k3-am654-icssg2.dtso) in kernel so they are added in same overlay file in u-boot as well.
I am keeping,
fdt-0 as k3-am654-base-board dtb,
fdt-1 as k3-am654-icssg2 dtbo,
conf-0 as k3-am654-base-board and
conf-1 as k3-am654-icssg2.Do you want me to keep k3-am654-icssg2 dtbo as fdt-0 and k3-am654-base-board as fdt-1? I tried doing this but this results into u-boot getting stuck. The tispl and u-boot images are not able to load if I swap fdt-0 and fdt-1 , and conf-0 and conf-1.
Quoted 7 lines
Quoted 3 lines
If the current combination doesn't look OK, please let me know what should be the correct combinations for fdt-0, fdt-1, conf-0 and conf-1.
Can you please comment on this. I'll send v2 with all the suggested changes once you confirm the correct fdt and configurations.
Sorry, I missed this.
fdt-0 = k3-am654-base-board dtb
fdt-1 = k3-am654-icssg2 dtbo
conf-0 = fdt-0 and ftd-1
as icssg2 ethernet is present on the base board, and should be part of the base board configuration.
Signature · 2 lines
cheers, -roger
Re: [RFC PATCH 12/16] arm: dts: k3-am65x-binman: Add ICSSG2 overlay and configuration
Quoted 75 lines · Roger Quadros
Quoted 67 lines · MD Danish Anwar
Hi Roger,
Quoted 64 lines · MD Danish Anwar
Quoted 43 lines · Roger Quadros
Quoted 27 lines · MD Danish Anwar
Add ICSSG2 overlay and configuration to tispl and u-boot images.
Signed-off-by MD Danish Anwar <[email protected]>--- arch/arm/dts/k3-am65x-binman.dtsi | 85 +++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+)arch/arm/dts/k3-am65x-binman.dtsi +5
-0@@ -98,6 +98,8 @@ #define SPL_AM654_EVM_DTB "spl/dts/k3-am654-base-board.dtb" #define AM654_EVM_DTB "u-boot.dtb" +#define AM654_EVM_ICSSG2_DTBO "arch/arm/dts/k3-am654-icssg2.dtbo" + &binman { ti-spl { insert-template = <&ti_spl_template>;@@ -124,6 +126,20 @@ filename = SPL_AM654_EVM_DTB; }; }; + + fdt-1 { + description = "k3-am654-icssg2 overlay";arch/arm/dts/k3-am65x-binman.dtsi line 141
Quoted 10 lines
arch/arm/dts/k3-am65x-binman.dtsi +10
-0+ type = "flat_dt"; + arch = "arm"; + compression = "none"; + ti-secure { + content = <&spl_am65x_evm_icssg2_dtb>; + keyfile = "custMpk.pem"; + }; + spl_am65x_evm_icssg2_dtb: blob-ext { + filename = AM654_EVM_ICSSG2_DTBO; + };This is wrong.
Quoted 4 lines
ICSSG2 Ethernet should be part of the fdt-0 configuration as the 2 Ethernet ports on the board are hardwired to ICSSG2. Not having them working by default is an invalid configuration.
ICSSG2 ethernet ports should be enabled by default. But the ICSSG2 nodes is added in the overlay file (k3-am654-icssg2.dtso) in kernel so they are added in same overlay file in u-boot as well.
I am keeping,
fdt-0 as k3-am654-base-board dtb,
fdt-1 as k3-am654-icssg2 dtbo,
conf-0 as k3-am654-base-board and
conf-1 as k3-am654-icssg2.Do you want me to keep k3-am654-icssg2 dtbo as fdt-0 and k3-am654-base-board as fdt-1? I tried doing this but this results into u-boot getting stuck. The tispl and u-boot images are not able to load if I swap fdt-0 and fdt-1 , and conf-0 and conf-1.
Quoted 7 lines
Quoted 3 lines
If the current combination doesn't look OK, please let me know what should be the correct combinations for fdt-0, fdt-1, conf-0 and conf-1.
Can you please comment on this. I'll send v2 with all the suggested changes once you confirm the correct fdt and configurations.
Quoted 7 lines
Sorry, I missed this.
fdt-0 = k3-am654-base-board dtb
fdt-1 = k3-am654-icssg2 dtboconf-0 = fdt-0 and ftd-1
What about conf-1? Should I leave it as it is(currently conf-1 is fdt-0 and fdt-1)?
Quoted 2 lines
as icssg2 ethernet is present on the base board, and should be part of the base board configuration.
Signature · 2 lines
Thanks and Regards, Danish
Re: [RFC PATCH 12/16] arm: dts: k3-am65x-binman: Add ICSSG2 overlay and configuration
Quoted 80 lines · MD Danish Anwar
Quoted 77 lines · Roger Quadros
Quoted 67 lines · MD Danish Anwar
Hi Roger,
Quoted 64 lines · MD Danish Anwar
Quoted 43 lines · Roger Quadros
Quoted 27 lines · MD Danish Anwar
Add ICSSG2 overlay and configuration to tispl and u-boot images.
Signed-off-by MD Danish Anwar <[email protected]>--- arch/arm/dts/k3-am65x-binman.dtsi | 85 +++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+)arch/arm/dts/k3-am65x-binman.dtsi +5
-0@@ -98,6 +98,8 @@ #define SPL_AM654_EVM_DTB "spl/dts/k3-am654-base-board.dtb" #define AM654_EVM_DTB "u-boot.dtb" +#define AM654_EVM_ICSSG2_DTBO "arch/arm/dts/k3-am654-icssg2.dtbo" + &binman { ti-spl { insert-template = <&ti_spl_template>;@@ -124,6 +126,20 @@ filename = SPL_AM654_EVM_DTB; }; }; + + fdt-1 { + description = "k3-am654-icssg2 overlay";arch/arm/dts/k3-am65x-binman.dtsi line 141
Quoted 10 lines
arch/arm/dts/k3-am65x-binman.dtsi +10
-0+ type = "flat_dt"; + arch = "arm"; + compression = "none"; + ti-secure { + content = <&spl_am65x_evm_icssg2_dtb>; + keyfile = "custMpk.pem"; + }; + spl_am65x_evm_icssg2_dtb: blob-ext { + filename = AM654_EVM_ICSSG2_DTBO; + };This is wrong.
Quoted 4 lines
ICSSG2 Ethernet should be part of the fdt-0 configuration as the 2 Ethernet ports on the board are hardwired to ICSSG2. Not having them working by default is an invalid configuration.
ICSSG2 ethernet ports should be enabled by default. But the ICSSG2 nodes is added in the overlay file (k3-am654-icssg2.dtso) in kernel so they are added in same overlay file in u-boot as well.
I am keeping,
fdt-0 as k3-am654-base-board dtb,
fdt-1 as k3-am654-icssg2 dtbo,
conf-0 as k3-am654-base-board and
conf-1 as k3-am654-icssg2.Do you want me to keep k3-am654-icssg2 dtbo as fdt-0 and k3-am654-base-board as fdt-1? I tried doing this but this results into u-boot getting stuck. The tispl and u-boot images are not able to load if I swap fdt-0 and fdt-1 , and conf-0 and conf-1.
Quoted 7 lines
Quoted 3 lines
If the current combination doesn't look OK, please let me know what should be the correct combinations for fdt-0, fdt-1, conf-0 and conf-1.
Can you please comment on this. I'll send v2 with all the suggested changes once you confirm the correct fdt and configurations.
Sorry, I missed this.
Quoted 8 lines
Quoted 5 lines
fdt-0 = k3-am654-base-board dtb
fdt-1 = k3-am654-icssg2 dtboconf-0 = fdt-0 and ftd-1
What about conf-1? Should I leave it as it is(currently conf-1 is fdt-0 and fdt-1)?
I don't think we need conf-1.
Quoted 4 lines
Quoted 3 lines
as icssg2 ethernet is present on the base board, and should be part of the base board configuration.
Signature · 2 lines
cheers, -roger
RFC PATCH 13/16 configs: am65x_evm_a53: Enable ICSSG Driver
In reply to MD Danish AnwarEnable ICSSG driver in am65x_evm_a53_defconfig
--- configs/am65x_evm_a53_defconfig | 1 + 1 file changed, 1 insertion(+)
configs/am65x_evm_a53_defconfig +1 -0
@@ -130,6 +130,7 @@ CONFIG_PHY_FIXED=y CONFIG_E1000=y CONFIG_CMD_E1000=y CONFIG_TI_AM65_CPSW_NUSS=y +CONFIG_TI_ICSSG_PRUETH=y CONFIG_PCI_KEYSTONE=y CONFIG_PHY=y CONFIG_SPL_PHY=y
Signature · 1 line
2.34.1
RFC PATCH 14/16 configs: am65x_evm_a53_defconfig: add SPL_LOAD_FIT_APPLY_OVERLAY
In reply to MD Danish AnwarWe want SPL to apply DTB overlays (e.g. NAND card overlay) so enable SPL_LOAD_FIT_APPLY_OVERLAY.
Increase SPL_LOAD_FIT_APPLY_OVERLAY_BUF_SZ and SPL_STACK_R_MALLOC_SIMPLE_LEN. Without this SPL hangs.
--- configs/am65x_evm_a53_defconfig | 3 +++ 1 file changed, 3 insertions(+)
configs/am65x_evm_a53_defconfig +3 -0
@@ -70,6 +70,9 @@ CONFIG_CMD_I2C=y CONFIG_CMD_MMC=y CONFIG_CMD_PCI=y CONFIG_CMD_REMOTEPROC=y +CONFIG_SPL_LOAD_FIT_APPLY_OVERLAY=y +CONFIG_SPL_LOAD_FIT_APPLY_OVERLAY_BUF_SZ=0x100000 +CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN=0x1000000 CONFIG_CMD_USB=y CONFIG_CMD_TIME=y CONFIG_MTDIDS_DEFAULT="nor0=47040000.spi.0"
Signature · 1 line
2.34.1
Re: [RFC PATCH 14/16] configs: am65x_evm_a53_defconfig: add SPL_LOAD_FIT_APPLY_OVERLAY
Quoted 15 lines · MD Danish Anwar
We want SPL to apply DTB overlays (e.g. NAND card overlay) so enable
SPL_LOAD_FIT_APPLY_OVERLAY.
IncreaseSPL_LOAD_FIT_APPLY_OVERLAY_BUF_SZandSPL_STACK_R_MALLOC_SIMPLE_LEN. Without this SPL hangs.Signed-off-by MD Danish Anwar <[email protected]>--- configs/am65x_evm_a53_defconfig | 3 +++ 1 file changed, 3 insertions(+)configs/am65x_evm_a53_defconfig +0
-0
configs/am65x_evm_a53_defconfig CONFIG_CMD_I2C=y · line 75
Quoted 6 lines
configs/am65x_evm_a53_defconfig +3
-0@@ -70,6 +70,9 @@ CONFIG_CMD_I2C=y CONFIG_CMD_MMC=y CONFIG_CMD_PCI=y CONFIG_CMD_REMOTEPROC=y +CONFIG_SPL_LOAD_FIT_APPLY_OVERLAY=y +CONFIG_SPL_LOAD_FIT_APPLY_OVERLAY_BUF_SZ=0x100000 +CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN=0x1000000
This change to 16MB is not required. I suppose default is 4MB. Did you face issues with it?
Quoted 3 lines
configs/am65x_evm_a53_defconfig +0
-0CONFIG_CMD_USB=y CONFIG_CMD_TIME=y CONFIG_MTDIDS_DEFAULT="nor0=47040000.spi.0"
Signature · 2 lines
cheers, -roger
Re: [RFC PATCH 14/16] configs: am65x_evm_a53_defconfig: add SPL_LOAD_FIT_APPLY_OVERLAY
Roger,
Quoted 13 lines · Roger Quadros
Quoted 10 lines · MD Danish Anwar
We want SPL to apply DTB overlays (e.g. NAND card overlay) so enable
SPL_LOAD_FIT_APPLY_OVERLAY.
IncreaseSPL_LOAD_FIT_APPLY_OVERLAY_BUF_SZandSPL_STACK_R_MALLOC_SIMPLE_LEN. Without this SPL hangs.Signed-off-by MD Danish Anwar <[email protected]>--- configs/am65x_evm_a53_defconfig | 3 +++ 1 file changed, 3 insertions(+)
Quoted 15 lines
configs/am65x_evm_a53_defconfig CONFIG_CMD_I2C=y · line 75
Quoted 11 lines
configs/am65x_evm_a53_defconfig +3
-0@@ -70,6 +70,9 @@ CONFIG_CMD_I2C=y CONFIG_CMD_MMC=y CONFIG_CMD_PCI=y CONFIG_CMD_REMOTEPROC=y +CONFIG_SPL_LOAD_FIT_APPLY_OVERLAY=y +CONFIG_SPL_LOAD_FIT_APPLY_OVERLAY_BUF_SZ=0x100000 +CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN=0x1000000This change to 16MB is not required. I suppose default is 4MB. Did you face issues with it?
Without these I see below error in uboot,
U-Boot SPL 2024.01-rc5-00539-gdc3afd4d5b (Dec 21 2023 - 11:23:56 +0530) SYSFW ABI: 3.1 (firmware rev 0x0009 '9.1.6--v09.01.06 (Kool Koala)') Trying to boot from MMC2spl_register_fat_device: fat register err - -1spl_load_image_fat: error reading image u-boot.img, err - -1
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###
The only way to recover from here is to do a power cycle reset. But when you boot again, the issue is seen again. So I think these changes are also needed. Without this, SPL doesn't work properly.
Quoted 4 lines
Quoted 3 lines
configs/am65x_evm_a53_defconfig +0
-0CONFIG_CMD_USB=y CONFIG_CMD_TIME=y CONFIG_MTDIDS_DEFAULT="nor0=47040000.spi.0"
Signature · 2 lines
Thanks and Regards, Danish
RFC PATCH 15/16 tools/fdtgrep: Include __symbols__ table
In reply to MD Danish AnwarThis is required for overlays to work at SPL.
Loading of symbol table depends on DT Overlay support in SPL so make it compile-time dependent. Without this SPL fails to boot some platforms where this feature is not enabled (e.g. dra71-evm.)
Without including the <linux/kconfig.h> file, the symbol CONFIG_SPL_LOAD_FIT_APPLY_OVERLAY will not be visible and we will never include the symbol table.
So include <linux/kconfig.h>
Due to some reason it needs to be included after [#include "fdt_host.h"] otherwise it causes a build error.
--- tools/fdtgrep.c | 8 ++++++++ 1 file changed, 8 insertions(+)
tools/fdtgrep.c +8 -0
@@ -22,6 +22,8 @@#include "fdt_host.h" #include "libfdt_internal.h" +#include <linux/kconfig.h> +/* Define DEBUG to get some debugging output on stderr */ #ifdef DEBUG #define debug(a, b...) fprintf(stderr, a, ## b)
@@ -1234,6 +1236,12 @@ int main(int argc, char *argv[]) disp.fout = stdout; } +if (IS_ENABLED (CONFIG_SPL_LOAD_FIT_APPLY_OVERLAY )) { +/* include symbol table */ +if (value_add (&disp, &disp.value_head,FDT_IS_NODE ,1 ,"/__symbols__" )) +usage ("Cannot add __symbols__ value" ); + } +/* Run the grep and output the results */ ret =do_fdtgrep (&disp, filename);if (disp.output_fname)
Signature · 1 line
2.34.1
Re: [RFC PATCH 15/16] tools/fdtgrep: Include __symbols__ table
Hi,
Quoted 49 lines · MD Danish Anwar
This is required for overlays to work at SPL.
Loading of symbol table depends on DT Overlay support in SPL so make it compile-time dependent. Without this SPL fails to boot some platforms where this feature is not enabled (e.g. dra71-evm.)
Without including the <
linux/kconfig.h> file, the symbolCONFIG_SPL_LOAD_FIT_APPLY_OVERLAYwill not be visible and we will never include the symbol table.So include <
linux/kconfig.h>Due to some reason it needs to be included after [#include "
fdt_host.h"] otherwise it causes a build error.Signed-off-by MD Danish Anwar <[email protected]>--- tools/fdtgrep.c | 8 ++++++++ 1 file changed, 8 insertions(+)tools/fdtgrep.c +8
-1@@ -22,6 +22,8 @@#include "fdt_host.h" #include "libfdt_internal.h" +#include <linux/kconfig.h> +/* Define DEBUG to get some debugging output on stderr */ #ifdef DEBUG #define debug(a, b...) fprintf(stderr, a, ## b)@@ -1234,6 +1236,12 @@ int main(int argc, char *argv[]) disp.fout = stdout; } +if (IS_ENABLED (CONFIG_SPL_LOAD_FIT_APPLY_OVERLAY )) { +/* include symbol table */ +if (value_add (&disp, &disp.value_head,FDT_IS_NODE ,1 ,"/__symbols__" )) +usage ("Cannot add __symbols__ value" ); + } +/* Run the grep and output the results */ ret =do_fdtgrep (&disp, filename);if (disp.output_fname) --
Quoted 2 lines
2.34.1
I may have replied elsewhere, but please use a new fdtgrep option for this.
Regards,
Simon
Re: [RFC PATCH 15/16] tools/fdtgrep: Include __symbols__ table
Hi Simon,
Quoted 57 lines · Simon Glass
Hi,
Quoted 49 lines · MD Danish Anwar
This is required for overlays to work at SPL.
Loading of symbol table depends on DT Overlay support in SPL so make it compile-time dependent. Without this SPL fails to boot some platforms where this feature is not enabled (e.g. dra71-evm.)
Without including the <
linux/kconfig.h> file, the symbolCONFIG_SPL_LOAD_FIT_APPLY_OVERLAYwill not be visible and we will never include the symbol table.So include <
linux/kconfig.h>Due to some reason it needs to be included after [#include "
fdt_host.h"] otherwise it causes a build error.Signed-off-by MD Danish Anwar <[email protected]>--- tools/fdtgrep.c | 8 ++++++++ 1 file changed, 8 insertions(+)tools/fdtgrep.c +8
-1@@ -22,6 +22,8 @@#include "fdt_host.h" #include "libfdt_internal.h" +#include <linux/kconfig.h> +/* Define DEBUG to get some debugging output on stderr */ #ifdef DEBUG #define debug(a, b...) fprintf(stderr, a, ## b)@@ -1234,6 +1236,12 @@ int main(int argc, char *argv[]) disp.fout = stdout; } +if (IS_ENABLED (CONFIG_SPL_LOAD_FIT_APPLY_OVERLAY )) { +/* include symbol table */ +if (value_add (&disp, &disp.value_head,FDT_IS_NODE ,1 ,"/__symbols__" )) +usage ("Cannot add __symbols__ value" ); + } +/* Run the grep and output the results */ ret =do_fdtgrep (&disp, filename);if (disp.output_fname) --Quoted 2 lines
2.34.1
I may have replied elsewhere, but please use a new fdtgrep option for this.
Quoted 2 lines
Regards,
Simon
This patch is actually not needed. Without this patch also I am able to apply overlays at SPL. Even without this patch I see symbols table getting included while using fdtgrep tool. I will drop this patch in v2.
Signature · 2 lines
Thanks and Regards, Danish
RFC PATCH 16/16 board: ti: am65x: Add check for k3-am654-icssg2 in board_fit_config_match()
In reply to MD Danish AnwarWhen CONFIG_TI_ICSSG_PRUETH is enabled, add config name check for the icssg2 overlay in board_fit_config_match() API.
--- board/ti/am65x/evm.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)
board/ti/am65x/evm.c +7 -4
@@ -90,10 +90,13 @@ int dram_init_banksize(void)#ifdef CONFIG_SPL_LOAD_FIT int board_fit_config_name_match (const char *name) { -#ifdef CONFIG_TARGET_AM654_A53_EVM -if (!strcmp (name,"k3-am654-base-board" )) -return 0 ; -#endif +if (IS_ENABLED (CONFIG_TI_ICSSG_PRUETH )) { +if (!strcmp (name,"k3-am654-icssg2" )) +return 0 ; + }else { +if (!strcmp (name,"k3-am654-base-board" )) +return 0 ; + }return -1 ; }
Signature · 1 line
2.34.1