Skip to contentSkip to conversation

Add support for Ethernet Boot on SK-AM62

PATCH Superseded Chintan Vankar 3 participants 16 messages Aug 12, 2024 – Aug 14, 2024

Subsystems (6)

v4 of 6 Superseded Latest is v6 →

lore
Share & tools
lore
#0 lore raw

v4 cover Add support for Ethernet Boot on SK-AM62

This series enables Ethernet Boot on SK-AM62 device.

This series is based on commit 'f4f845b85926' of origin/next branch of U-Boot.

Link to v3:
https://lore.kernel.org/r/[email protected]/

Logs for Ethernet Boot for AM625-SK:
https://gist.github.com/chintanv133/07bcb1473301581aab6d4e951d9c6572

Changes from v3 to v4:
- Updated config files by enabling architecture specific configs and default device tree config to fix buildman failure as pointed by Tom.
- Updated [PATCH v3 10/10] by syncing "k3-am62x-sk-common.dtsi" file with Linux v6.11-rc3.

Chintan Vankar (2):
common: spl: spl: Init DRAM size in R5/A53 SPL
dts: upstream: src: arm64: ti: k3-am62x-sk-common: Sync DT with Linux

    v6.11-rc3

Kishon Vijay Abraham I (6):
firmware: ti_sci: Add No-OP for "RX_FL_CFG"
soc: ti: k3-navss-ringacc: Initialize base address of ring cfg
registers
dma: ti: k3-udma: Add support for native configuration of chan/flow
arm: mach-k3: am62x: am625_init: Probe AM65 CPSW NUSS
configs: am62: Add configs for enabling ETHBOOT in R5SPL
configs: am62: Enable configs required for Ethboot

Siddharth Vadapalli (1):
arm: dts: k3-am625-r5-sk: Enable DM services for main_pktdma

Vignesh Raghavendra (1):
soc: ti: k3-navss-ringacc: Fix reset ring API

 arch/arm/dts/k3-am625-r5-sk.dts               |  5 +++
 arch/arm/mach-k3/am62x/am625_init.c           | 10 ++++++
 common/spl/spl.c                              |  2 +-
 configs/am62x_evm_a53_ethboot_defconfig       | 17 ++++++++++
 configs/am62x_evm_r5_ethboot_defconfig        | 25 +++++++++++++++
 drivers/dma/ti/k3-udma.c                      |  6 ++++
 drivers/firmware/ti_sci.c                     |  8 ++++-
 drivers/soc/ti/k3-navss-ringacc-u-boot.c      |  9 +++++-
 drivers/soc/ti/k3-navss-ringacc.c             | 17 +++++++++-
 .../src/arm64/ti/k3-am62x-sk-common.dtsi      | 32 ++++++++++---------
 10 files changed, 112 insertions(+), 19 deletions(-)
 create mode 100644 configs/am62x_evm_a53_ethboot_defconfig
 create mode 100644 configs/am62x_evm_r5_ethboot_defconfig
Signature · 1 line
2.34.1
#1 lore raw

PATCH v4 1/10 common: spl: spl: Init DRAM size in R5/A53 SPL

Initialize DRAM size in SPL stage since networking requires DDR to be initialized.

---

Link to v3:
https://lore.kernel.org/r/[email protected]/

Changes from v3 to v4:
- No changes.

 common/spl/spl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
common/spl/spl.c +1 -1
index d6a364de6e..c9e86297c5 100644
@@ -720,7 +720,7 @@ void board_init_r(gd_t *dummy1, ulong dummy2)
 		initr_watchdog();
 
 	if (IS_ENABLED(CONFIG_SPL_OS_BOOT) || CONFIG_IS_ENABLED(HANDOFF) ||
-	    IS_ENABLED(CONFIG_SPL_ATF))
+	    IS_ENABLED(CONFIG_SPL_ATF) || IS_ENABLED(CONFIG_SPL_NET))
 		dram_init_banksize();
 
 	if (CONFIG_IS_ENABLED(PCI) && !(gd->flags & GD_FLG_DM_DEAD)) {
Signature · 1 line
2.34.1
#2 lore raw

PATCH v4 2/10 firmware: ti_sci: Add No-OP for "RX_FL_CFG"

In reply to Chintan Vankar

From: Kishon Vijay Abraham I <[email protected]>

RX_FL_CFG message should not be forwarded to TIFS and should be handled within R5 SPL (when DM services are not available). Add a no-op function to not handle RX_FL_CFG messages.

---

Link to v3:
https://lore.kernel.org/r/[email protected]/

Changes from v3 to v4:
- No changes.

 drivers/firmware/ti_sci.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
drivers/firmware/ti_sci.c +7 -1
index e591333ba3..719cfa771b 100644
@@ -2450,6 +2450,12 @@ fail:
 	return ret;
 }
 
+static int ti_sci_cmd_rm_udmap_rx_flow_cfg_noop(const struct ti_sci_handle *handle,
+						const struct ti_sci_msg_rm_udmap_flow_cfg *params)
+{
+	return 0;
+}
+
 /**
  * ti_sci_cmd_set_fwl_region() - Request for configuring a firewall region
  * @handle:    pointer to TI SCI handle
@@ -2895,7 +2901,7 @@ static __maybe_unused int ti_sci_dm_probe(struct udevice *dev)
 	udmap_ops = &ops->rm_udmap_ops;
 	udmap_ops->tx_ch_cfg = ti_sci_cmd_rm_udmap_tx_ch_cfg;
 	udmap_ops->rx_ch_cfg = ti_sci_cmd_rm_udmap_rx_ch_cfg;
-	udmap_ops->rx_flow_cfg = ti_sci_cmd_rm_udmap_rx_flow_cfg;
+	udmap_ops->rx_flow_cfg = ti_sci_cmd_rm_udmap_rx_flow_cfg_noop;
 
 	return ret;
 }
Signature · 1 line
2.34.1
#3 lore raw

PATCH v4 3/10 soc: ti: k3-navss-ringacc: Initialize base address of ring cfg registers

In reply to Chintan Vankar

From: Kishon Vijay Abraham I <[email protected]>

Initialize base address of ring config registers required to natively setup ring cfg registers in the absence of Device Manager (DM) services at R5 SPL stage. Since register property is defined as "ring" for PKTDMA and "cfg" for UDMA, configure base address of ring configuration register accordingly.

---

Link to v3:
https://lore.kernel.org/r/[email protected]/

Changes from v3 to v4:
- No changes.

 drivers/soc/ti/k3-navss-ringacc.c | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)
drivers/soc/ti/k3-navss-ringacc.c +16 -1
index b2643a30d3..14114a6583 100644
@@ -1028,8 +1028,8 @@ static int k3_nav_ringacc_init(struct udevice *dev, struct k3_nav_ringacc *ringa
 struct k3_nav_ringacc *k3_ringacc_dmarings_init(struct udevice *dev,
 						struct k3_ringacc_init_data *data)
 {
+	void __iomem *base_rt, *base_cfg;
 	struct k3_nav_ringacc *ringacc;
-	void __iomem *base_rt;
 	int i;
 
 	ringacc = devm_kzalloc(dev, sizeof(*ringacc), GFP_KERNEL);
@@ -1047,6 +1047,20 @@ struct k3_nav_ringacc *k3_ringacc_dmarings_init(struct udevice *dev,
 	if (!base_rt)
 		return ERR_PTR(-EINVAL);
 
+	/*
+	 * Since register property is defined as "ring" for PKTDMA and
+	 * "cfg" for UDMA, configure base address of ring configuration
+	 * register accordingly.
+	 */
+	base_cfg = dev_remap_addr_name(dev, "ring");
+	pr_debug("ring %p\n", base_cfg);
+	if (!base_cfg) {
+		base_cfg = dev_remap_addr_name(dev, "cfg");
+		pr_debug("cfg %p\n", base_cfg);
+		if (!base_cfg)
+			return ERR_PTR(-EINVAL);
+	}
+
 	ringacc->rings = devm_kzalloc(dev,
 				      sizeof(*ringacc->rings) *
 				      ringacc->num_rings * 2,
@@ -1061,6 +1075,7 @@ struct k3_nav_ringacc *k3_ringacc_dmarings_init(struct udevice *dev,
 	for (i = 0; i < ringacc->num_rings; i++) {
 		struct k3_nav_ring *ring = &ringacc->rings[i];
 
+		ring->cfg = base_cfg + KNAV_RINGACC_CFG_REGS_STEP * i;
 		ring->rt = base_rt + K3_DMARING_RING_RT_REGS_STEP * i;
 		ring->parent = ringacc;
 		ring->ring_id = i;
Signature · 1 line
2.34.1
#4 lore raw

PATCH v4 4/10 soc: ti: k3-navss-ringacc: Fix reset ring API

In reply to Chintan Vankar

From: Vignesh Raghavendra <[email protected]>

Expectation of k3_ringacc_ring_reset_raw() is to reset the ring to requested size and not to 0. Fix this.

---

Link to v3:
https://lore.kernel.org/r/[email protected]/

Changes from v3 to v4:
- No changes.

 drivers/soc/ti/k3-navss-ringacc-u-boot.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
drivers/soc/ti/k3-navss-ringacc-u-boot.c +8 -1
index f958239c2a..5d650b9de7 100644
@@ -25,9 +25,16 @@ struct k3_nav_ring_cfg_regs {
 #define KNAV_RINGACC_CFG_RING_SIZE_ELSIZE_MASK		GENMASK(26, 24)
 #define KNAV_RINGACC_CFG_RING_SIZE_ELSIZE_SHIFT		(24)
 
+#define KNAV_RINGACC_CFG_RING_SIZE_MASK			GENMASK(15, 0)
+
 static void k3_ringacc_ring_reset_raw(struct k3_nav_ring *ring)
 {
-	writel(0, &ring->cfg->size);
+	u32 reg;
+
+	reg = readl(&ring->cfg->size);
+	reg &= KNAV_RINGACC_CFG_RING_SIZE_MASK;
+	reg |= ring->size;
+	writel(reg, &ring->cfg->size);
 }
 
 static void k3_ringacc_ring_reconfig_qmode_raw(struct k3_nav_ring *ring, enum k3_nav_ring_mode mode)
Signature · 1 line
2.34.1
#5 lore raw

PATCH v4 5/10 dma: ti: k3-udma: Add support for native configuration of chan/flow

In reply to Chintan Vankar

From: Kishon Vijay Abraham I <[email protected]>

In absence of Device Manager (DM) services such as at R5 SPL stage, driver will have to natively setup TCHAN/RCHAN/RFLOW cfg registers. Existing UDMA driver performed the above mentioned configuration for UDMA. Add similar configuration for PKTDMA here.

---

Link to v3:
https://lore.kernel.org/r/[email protected]/

Changes from v3 to v4:
- No changes.

 drivers/dma/ti/k3-udma.c | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/dma/ti/k3-udma.c +6 -0
index b7e674f218..e23d09e6b8 100644
@@ -2118,6 +2118,9 @@ static int bcdma_tisci_tx_channel_config(struct udma_chan *uc)
 	if (ret)
 		dev_err(ud->dev, "tchan%d cfg failed %d\n", tchan->id, ret);
 
+	if (IS_ENABLED(CONFIG_K3_DM_FW))
+		udma_alloc_tchan_raw(uc);
+
 	return ret;
 }
 
@@ -2166,6 +2169,9 @@ static int pktdma_tisci_rx_channel_config(struct udma_chan *uc)
 		dev_err(ud->dev, "flow%d config failed: %d\n", uc->rflow->id,
 			ret);
 
+	if (IS_ENABLED(CONFIG_K3_DM_FW))
+		udma_alloc_rchan_raw(uc);
+
 	return ret;
 }
 
Signature · 1 line
2.34.1
#6 lore raw

PATCH v4 6/10 arm: mach-k3: am62x: am625_init: Probe AM65 CPSW NUSS

In reply to Chintan Vankar

From: Kishon Vijay Abraham I <[email protected]>

In order to support Ethernet boot on AM62x, probe AM65 CPSW NUSS driver in board_init_f().

---

Link to v4:
https://lore.kernel.org/r/[email protected]/

Changes from v3 to v4:
- No changes.

 arch/arm/mach-k3/am62x/am625_init.c | 10 ++++++++++
 1 file changed, 10 insertions(+)
arch/arm/mach-k3/am62x/am625_init.c +10 -0
index 72a752d38e..0182c153a6 100644
@@ -280,6 +280,16 @@ void board_init_f(ulong dummy)
 		if (ret)
 			panic("DRAM init failed: %d\n", ret);
 	}
+
+	if (IS_ENABLED(CONFIG_SPL_ETH) && IS_ENABLED(CONFIG_TI_AM65_CPSW_NUSS) &&
+	    spl_boot_device() == BOOT_DEVICE_ETHERNET) {
+		struct udevice *cpswdev;
+
+		if (uclass_get_device_by_driver(UCLASS_MISC, DM_DRIVER_GET(am65_cpsw_nuss),
+						&cpswdev))
+			printf("Failed to probe am65_cpsw_nuss driver\n");
+	}
+
 	spl_enable_cache();
 
 	fixup_a53_cpu_freq_by_speed_grade();
Signature · 1 line
2.34.1
#7 lore raw

Re: [PATCH v4 06/10] arm: mach-k3: am62x: am625_init: Probe AM65 CPSW NUSS

Quoted 28 lines · Chintan Vankar

From: Kishon Vijay Abraham I <[email protected]>

In order to support Ethernet boot on AM62x, probe AM65 CPSW NUSS driver in board_init_f().

---

Link to v4:
https://lore.kernel.org/r/[email protected]/

Changes from v3 to v4:
- No changes.

  arch/arm/mach-k3/am62x/am625_init.c | 10 ++++++++++
  1 file changed, 10 insertions(+)
arch/arm/mach-k3/am62x/am625_init.c +1 -0
index 72a752d38e..0182c153a6 100644
@@ -280,6 +280,16 @@ void board_init_f(ulong dummy)
  		if (ret)
  			panic("DRAM init failed: %d\n", ret);
  	}
+

arch/arm/mach-k3/am62x/am625_init.c void board_init_f(ulong dummy) · line 293

Quoted 10 lines
arch/arm/mach-k3/am62x/am625_init.c +9 -0
+	if (IS_ENABLED(CONFIG_SPL_ETH) && IS_ENABLED(CONFIG_TI_AM65_CPSW_NUSS) &&
+	    spl_boot_device() == BOOT_DEVICE_ETHERNET) {
+		struct udevice *cpswdev;
+
+		if (uclass_get_device_by_driver(UCLASS_MISC, DM_DRIVER_GET(am65_cpsw_nuss),
+						&cpswdev))
+			printf("Failed to probe am65_cpsw_nuss driver\n");
+	}
+
  	spl_enable_cache();

Any reason you added this before enabling caches?

Andrew

Quoted 2 lines
arch/arm/mach-k3/am62x/am625_init.c +0 -0
  	fixup_a53_cpu_freq_by_speed_grade();
#8 lore raw

Re: [PATCH v4 06/10] arm: mach-k3: am62x: am625_init: Probe AM65 CPSW NUSS

Quoted 44 lines · Andrew Davis
Quoted 32 lines · Chintan Vankar

From: Kishon Vijay Abraham I <[email protected]>

In order to support Ethernet boot on AM62x, probe AM65 CPSW NUSS driver in board_init_f().

---

Link to v4:
https://lore.kernel.org/r/[email protected]/

Changes from v3 to v4:
- No changes.

  arch/arm/mach-k3/am62x/am625_init.c | 10 ++++++++++

  1 file changed, 10 insertions(+)
arch/arm/mach-k3/am62x/am625_init.c +2 -0
index 72a752d38e..0182c153a6 100644
@@ -280,6 +280,16 @@ void board_init_f(ulong dummy)
           if (ret)
               panic("DRAM init failed: %d\n", ret);
       }
+
+    if (IS_ENABLED(CONFIG_SPL_ETH) && 

IS_ENABLED(CONFIG_TI_AM65_CPSW_NUSS) &&
+        spl_boot_device() == BOOT_DEVICE_ETHERNET) { +        struct udevice *cpswdev;

Quoted 8 lines

+
+        if (uclass_get_device_by_driver(UCLASS_MISC, DM_DRIVER_GET(am65_cpsw_nuss),
+                        &cpswdev))
+            printf("Failed to probe am65_cpsw_nuss driver\n"); +    }
+
      spl_enable_cache();

Any reason you added this before enabling caches?

Quoted 2 lines

Andrew

There is no specific reason for it, I can probe CPSW driver after enabling cache also.

Quoted 1 line
Quoted 1 line

      fixup_a53_cpu_freq_by_speed_grade();

#9 lore raw

Re: [PATCH v4 06/10] arm: mach-k3: am62x: am625_init: Probe AM65 CPSW NUSS

Quoted 45 lines · Chintan Vankar
Quoted 42 lines · Andrew Davis
Quoted 28 lines · Chintan Vankar

From: Kishon Vijay Abraham I <[email protected]>

In order to support Ethernet boot on AM62x, probe AM65 CPSW NUSS driver in board_init_f().

---

Link to v4:
https://lore.kernel.org/r/[email protected]/

Changes from v3 to v4:
- No changes.

  arch/arm/mach-k3/am62x/am625_init.c | 10 ++++++++++

  1 file changed, 10 insertions(+)
arch/arm/mach-k3/am62x/am625_init.c +1 -0
index 72a752d38e..0182c153a6 100644
@@ -280,6 +280,16 @@ void board_init_f(ulong dummy)
           if (ret)
               panic("DRAM init failed: %d\n", ret);
       }
+

arch/arm/mach-k3/am62x/am625_init.c void board_init_f(ulong dummy) · line 293

Quoted 10 lines
arch/arm/mach-k3/am62x/am625_init.c +9 -0
+    if (IS_ENABLED(CONFIG_SPL_ETH) && IS_ENABLED(CONFIG_TI_AM65_CPSW_NUSS) &&
+        spl_boot_device() == BOOT_DEVICE_ETHERNET) {
+        struct udevice *cpswdev;
+
+        if (uclass_get_device_by_driver(UCLASS_MISC, DM_DRIVER_GET(am65_cpsw_nuss),
+                        &cpswdev))
+            printf("Failed to probe am65_cpsw_nuss driver\n");
+    }
+
       spl_enable_cache();

Any reason you added this before enabling caches?

Quoted 6 lines
Quoted 2 lines

Andrew

There is no specific reason for it, I can probe CPSW driver after enabling cache also.

Let's do that then. We enable caches right after enabling DRAM to keep the amount of non-cached DDR accesses low.

Andrew

Quoted 1 line
Quoted 1 line
Quoted 1 line
arch/arm/mach-k3/am62x/am625_init.c +0 -0
       fixup_a53_cpu_freq_by_speed_grade();
#10 lore raw

PATCH v4 7/10 configs: am62: Add configs for enabling ETHBOOT in R5SPL

In reply to Chintan Vankar

From: Kishon Vijay Abraham I <[email protected]>

Add configs for enabling ETHBOOT in R5SPL.

---

Link to v3:
https://lore.kernel.org/r/[email protected]/

Changes from v3 to v4:
- Updated config files by enabling architecture specific configs and default device tree config to fix buildman failure as pointed by Tom.

 configs/am62x_evm_r5_ethboot_defconfig | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)
 create mode 100644 configs/am62x_evm_r5_ethboot_defconfig
configs/am62x_evm_r5_ethboot_defconfig new file +25 -0
new file mode 100644
index 0000000000..0d82374390
@@ -0,0 +1,25 @@
+#include<configs/am62x_evm_r5_defconfig>
+
+CONFIG_ARM=y
+CONFIG_ARCH_K3=y
+CONFIG_SOC_K3_AM625=y
+CONFIG_TARGET_AM625_R5_EVM=y
+CONFIG_DEFAULT_DEVICEC_TREE="k3-am625-r5-sk"
+CONFIG_SPL_GPIO=y
+CONFIG_SPL_MMC=n
+CONFIG_SPL_BOARD_INIT=y
+CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN=0x200000
+CONFIG_SPL_BSS_MAX_SIZE=0X3100
+CONFIG_SPL_DMA=y
+CONFIG_SPL_ENV_SUPPORT=y
+CONFIG_SPL_ETH=y
+CONFIG_SPL_I2C=y
+CONFIG_SPL_NET=y
+CONFIG_SPL_NET_VCI_STRING="AM62X U-Boot R5 SPL"
+CONFIG_CMD_DHCP=y
+CONFIG_SPL_SYSCON=y
+CONFIG_DMA_CHANNELS=y
+CONFIG_TI_K3_NAVSS_UDMA=y
+CONFIG_DM_I2C=y
+CONFIG_PHY_TI_DP83867=y
+CONFIG_TI_AM65_CPSW_NUSS=y
Signature · 1 line
2.34.1
#11 lore raw

PATCH v4 8/10 configs: am62: Enable configs required for Ethboot

In reply to Chintan Vankar

From: Kishon Vijay Abraham I <[email protected]>

Enable config options needed to support Ethernet boot on AM62x SK.

---

Link to v3:
https://lore.kernel.org/r/[email protected]/

Changes from v3 to v4:
- Updated config files by enabling architecture specific configs and default device tree config to fix buildman failure as pointed by Tom.

 configs/am62x_evm_a53_ethboot_defconfig | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 configs/am62x_evm_a53_ethboot_defconfig
configs/am62x_evm_a53_ethboot_defconfig new file +17 -0
new file mode 100644
index 0000000000..9d3c6b889f
@@ -0,0 +1,17 @@
+#include <configs/am62x_evm_a53_defconfig>
+
+CONFIG_ARM=y
+CONFIG_ARCH_K3=y
+CONFIG_SOC_K3_AM625=y
+CONFIG_TARGET_AM625_A53_EVM=y
+CONFIG_DEFAULT_DEVICE_TREE="ti/k3-am625-sk"
+CONFIG_SPL_STACK_R_ADDR=0x83000000
+CONFIG_SPL_SIZE_LIMIT=0x80000
+CONFIG_SPL_DRIVERS_MISC=y
+CONFIG_SPL_BOARD_INIT=y
+CONFIG_SPL_DMA=y
+CONFIG_SPL_ENV_SUPPORT=y
+CONFIG_SPL_ETH=y
+CONFIG_SPL_NET=y
+CONFIG_SPL_NET_VCI_STRING="AM62X U-Boot A53 SPL"
+CONFIG_SPL_SYSCON=y
Signature · 1 line
2.34.1
#12 lore raw

PATCH v4 9/10 arm: dts: k3-am625-r5-sk: Enable DM services for main_pktdma

In reply to Chintan Vankar

From: Siddharth Vadapalli <[email protected]>

Enable DM services for main_pktdma during R5 SPL stage.

---

Link to v4:
- https://lore.kernel.org/r/[email protected]/

Changes from v3 to v4:
- No changes.

 arch/arm/dts/k3-am625-r5-sk.dts | 5 +++++
 1 file changed, 5 insertions(+)
arch/arm/dts/k3-am625-r5-sk.dts +5 -0
index 6b9f40e555..0912b953db 100644
@@ -83,3 +83,8 @@
 	reg = <0x00 0x0fc40000 0x00 0x100>,
 	      <0x00 0x60000000 0x00 0x08000000>;
 };
+
+&main_pktdma {
+	ti,sci = <&dm_tifs>;
+	bootph-all;
+};
Signature · 1 line
2.34.1
#13 lore raw

PATCH v4 10/10 dts: upstream: src: arm64: ti: k3-am62x-sk-common: Sync DT with Linux v6.11-rc3

In reply to Chintan Vankar

Sync Device tree nodes with Linux v6.11-rc3.

[ upstream commit: ba50141137fae205a731005e70687f4a52289050 ]

---

Link to v3:
- This link is for the patch which was equivalent to this patch, from this version the node is moved to DT file equivalent to Linux as a part of DT sync.
https://lore.kernel.org/r/[email protected]/

Changes from v3 to v4:
- Updated this patch by syncing "k3-am62x-sk-common.dtsi" file with Linux v6.11-rc3 compared to previous version.

 .../src/arm64/ti/k3-am62x-sk-common.dtsi      | 32 ++++++++++---------
 1 file changed, 17 insertions(+), 15 deletions(-)
dts/upstream/src/arm64/ti/k3-am62x-sk-common.dtsi +17 -15
index 3c45782ab2..44ff67b6bf 100644
@@ -48,6 +48,14 @@
 			pmsg-size = <0x8000>;
 		};
 
+		/* global cma region */
+		linux,cma {
+			compatible = "shared-dma-pool";
+			reusable;
+			size = <0x00 0x8000000>;
+			linux,cma-default;
+		};
+
 		secure_tfa_ddr: tfa@9e780000 {
 			reg = <0x00 0x9e780000 0x00 0x80000>;
 			alignment = <0x1000>;
@@ -128,6 +136,10 @@
 	};
 };
 
+&phy_gmii_sel {
+	bootph-all;
+};
+
 &main_pmx0 {
 	/* First pad number is ALW package and second is AMC package */
 	main_uart0_pins_default: main-uart0-default-pins {
@@ -156,6 +168,7 @@
 	};
 
 	main_i2c1_pins_default: main-i2c1-default-pins {
+		bootph-all;
 		pinctrl-single,pins = <
 			AM62X_IOPAD(0x1e8, PIN_INPUT_PULLUP, 0) /* (B17/A17) I2C1_SCL */
 			AM62X_IOPAD(0x1ec, PIN_INPUT_PULLUP, 0) /* (A17/A16) I2C1_SDA */
@@ -335,15 +348,9 @@
 			self-powered;
 			data-role = "dual";
 			power-role = "sink";
-			ports {
-				#address-cells = <1>;
-				#size-cells = <0>;
-
-				port@0 {
-					reg = <0>;
-					usb_con_hs: endpoint {
-						remote-endpoint = <&usb0_hs_ep>;
-					};
+			port {
+				usb_con_hs: endpoint {
+					remote-endpoint = <&usb0_hs_ep>;
 				};
 			};
 		};
@@ -470,12 +477,9 @@
 
 &usb0 {
 	bootph-all;
-	#address-cells = <1>;
-	#size-cells = <0>;
 	usb-role-switch;
 
-	port@0 {
-		reg = <0>;
+	port {
 		usb0_hs_ep: endpoint {
 		    remote-endpoint = <&usb_con_hs>;
 	       };
@@ -504,8 +508,6 @@
 	       0 0 0 0
 	       0 0 0 0
 	>;
-	tx-num-evt = <32>;
-	rx-num-evt = <32>;
 };
 
 &dss {
Signature · 1 line
2.34.1
#14 lore raw

Re: [PATCH v4 10/10] dts: upstream: src: arm64: ti: k3-am62x-sk-common: Sync DT with Linux v6.11-rc3

Hi Chintan,

Quoted 3 lines · Chintan Vankar

Sync Device tree nodes with Linux v6.11-rc3.

You don't need to manually sync DT files but...

Quoted 2 lines

[ upstream commit: ba50141137fae205a731005e70687f4a52289050 ]

...rather cherry pick required commits from upstream as the one you have mentioned. Refer DT docs [1] for instructions.

[1] https://docs.u-boot.org/en/latest/develop/devicetree/control.html#resyncing-with-devicetree-rebasing

-Sumit

Quoted 99 lines

---

Link to v3:
- This link is for the patch which was equivalent to this patch, from this version the node is moved to DT file equivalent to Linux as a part of DT sync.
https://lore.kernel.org/r/[email protected]/

Changes from v3 to v4:
- Updated this patch by syncing "k3-am62x-sk-common.dtsi" file with Linux v6.11-rc3 compared to previous version.

 .../src/arm64/ti/k3-am62x-sk-common.dtsi      | 32 ++++++++++---------
 1 file changed, 17 insertions(+), 15 deletions(-)
dts/upstream/src/arm64/ti/k3-am62x-sk-common.dtsi +17 -16
index 3c45782ab2..44ff67b6bf 100644
@@ -48,6 +48,14 @@
                        pmsg-size = <0x8000>;
                };
 
+               /* global cma region */
+               linux,cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x00 0x8000000>;
+                       linux,cma-default;
+               };
+
                secure_tfa_ddr: tfa@9e780000 {
                        reg = <0x00 0x9e780000 0x00 0x80000>;
                        alignment = <0x1000>;
@@ -128,6 +136,10 @@
        };
 };
 
+&phy_gmii_sel {
+       bootph-all;
+};
+
 &main_pmx0 {
        /* First pad number is ALW package and second is AMC package */
        main_uart0_pins_default: main-uart0-default-pins {
@@ -156,6 +168,7 @@
        };
 
        main_i2c1_pins_default: main-i2c1-default-pins {
+               bootph-all;
                pinctrl-single,pins = <
                        AM62X_IOPAD(0x1e8, PIN_INPUT_PULLUP, 0) /* (B17/A17) I2C1_SCL */
                        AM62X_IOPAD(0x1ec, PIN_INPUT_PULLUP, 0) /* (A17/A16) I2C1_SDA */
@@ -335,15 +348,9 @@
                        self-powered;
                        data-role = "dual";
                        power-role = "sink";
-                       ports {
-                               #address-cells = <1>;
-                               #size-cells = <0>;
-
-                               port@0 {
-                                       reg = <0>;
-                                       usb_con_hs: endpoint {
-                                               remote-endpoint = <&usb0_hs_ep>;
-                                       };
+                       port {
+                               usb_con_hs: endpoint {
+                                       remote-endpoint = <&usb0_hs_ep>;
                                };
                        };
                };
@@ -470,12 +477,9 @@
 
 &usb0 {
        bootph-all;
-       #address-cells = <1>;
-       #size-cells = <0>;
        usb-role-switch;
 
-       port@0 {
-               reg = <0>;
+       port {
                usb0_hs_ep: endpoint {
                    remote-endpoint = <&usb_con_hs>;
               };
@@ -504,8 +508,6 @@
               0 0 0 0
               0 0 0 0
        >;
-       tx-num-evt = <32>;
-       rx-num-evt = <32>;
 };
 
 &dss {
--

2.34.1

#15 lore raw

Re: [PATCH v4 10/10] dts: upstream: src: arm64: ti: k3-am62x-sk-common: Sync DT with Linux v6.11-rc3

Quoted 9 lines · Sumit Garg

Hi Chintan,

Quoted 3 lines · Chintan Vankar

Sync Device tree nodes with Linux v6.11-rc3.

You don't need to manually sync DT files but...

Quoted 8 lines
Quoted 2 lines

[ upstream commit: ba50141137fae205a731005e70687f4a52289050 ]

...rather cherry pick required commits from upstream as the one you have mentioned. Refer DT docs [1] for instructions.

[1] https://docs.u-boot.org/en/latest/develop/devicetree/control.html#resyncing-with-devicetree-rebasing

Thank you Sumit for pointing this out. I will cherry pick the required commit from devicetree-rebasing repo and send it in a next version.

Quoted 101 lines

-Sumit

Quoted 99 lines

---

Link to v3:
- This link is for the patch which was equivalent to this patch, from this version the node is moved to DT file equivalent to Linux as a part of DT sync.
https://lore.kernel.org/r/[email protected]/

Changes from v3 to v4:
- Updated this patch by syncing "k3-am62x-sk-common.dtsi" file with Linux v6.11-rc3 compared to previous version.

  .../src/arm64/ti/k3-am62x-sk-common.dtsi      | 32 ++++++++++---------
  1 file changed, 17 insertions(+), 15 deletions(-)
dts/upstream/src/arm64/ti/k3-am62x-sk-common.dtsi +17 -16
index 3c45782ab2..44ff67b6bf 100644
@@ -48,6 +48,14 @@
                         pmsg-size = <0x8000>;
                 };
 
+               /* global cma region */
+               linux,cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x00 0x8000000>;
+                       linux,cma-default;
+               };
+
                 secure_tfa_ddr: tfa@9e780000 {
                         reg = <0x00 0x9e780000 0x00 0x80000>;
                         alignment = <0x1000>;
@@ -128,6 +136,10 @@
         };
  };
 
+&phy_gmii_sel {
+       bootph-all;
+};
+
  &main_pmx0 {
         /* First pad number is ALW package and second is AMC package */
         main_uart0_pins_default: main-uart0-default-pins {
@@ -156,6 +168,7 @@
         };
 
         main_i2c1_pins_default: main-i2c1-default-pins {
+               bootph-all;
                 pinctrl-single,pins = <
                         AM62X_IOPAD(0x1e8, PIN_INPUT_PULLUP, 0) /* (B17/A17) I2C1_SCL */
                         AM62X_IOPAD(0x1ec, PIN_INPUT_PULLUP, 0) /* (A17/A16) I2C1_SDA */
@@ -335,15 +348,9 @@
                         self-powered;
                         data-role = "dual";
                         power-role = "sink";
-                       ports {
-                               #address-cells = <1>;
-                               #size-cells = <0>;
-
-                               port@0 {
-                                       reg = <0>;
-                                       usb_con_hs: endpoint {
-                                               remote-endpoint = <&usb0_hs_ep>;
-                                       };
+                       port {
+                               usb_con_hs: endpoint {
+                                       remote-endpoint = <&usb0_hs_ep>;
                                 };
                         };
                 };
@@ -470,12 +477,9 @@
 
  &usb0 {
         bootph-all;
-       #address-cells = <1>;
-       #size-cells = <0>;
         usb-role-switch;
 
-       port@0 {
-               reg = <0>;
+       port {
                 usb0_hs_ep: endpoint {
                     remote-endpoint = <&usb_con_hs>;
                };
@@ -504,8 +508,6 @@
                0 0 0 0
                0 0 0 0
         >;
-       tx-num-evt = <32>;
-       rx-num-evt = <32>;
  };
 
  &dss {
--

2.34.1