Skip to contentSkip to conversation

J721E DTS Sync with Kernel v6.5-rc1

PATCH Superseded Neha Malcom Francis 4 participants 25 messages Sep 7, 2023 – Sep 12, 2023

Subsystems (4)

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

v2 cover J721E DTS Sync with Kernel v6.5-rc1

This series aims to sync kernel.org v6.5-rc1 DTS with that of U-Boot. It also includes cleanups where necessary along with certain changes to ensure boot is unaffected.

Same as with other board series that have taken up this effort, cleanup of mcu_ringacc and mcu_udmap are dependent on MCU Ringacc [1] and DMA
[2] fixes. This will be taken up after their merge to Linux.

[1] https://lore.kernel.org/all/[email protected]/
[2] https://lore.kernel.org/all/[email protected]/

Changes in v2:
- Nishanth:
- synced k3-j721e-som-0.dtsi 6.5-rc1
- delete tick-timer from -u-boot.dtsi
- remove unnecessary aliases
- remove SERDES overrides in U-Boot
- formatting changes
- drop repeated nodes and properties in U-Boot dts
- drop nodes and properties not related to U-Boot from U-Boot dts
- drop all /delete-property/ from U-Boot dts by adding needed dev-data and ensuring it works for J721E that follows legacy boot flow
- add dev-data for mcu_timer0 (new patch)
- push clk_k3 probe to happen before TIFS comes up (new patch)
- get TISCI revision only if TIFS/SYSFW is up (new patch)

Neha Malcom Francis (7):
drivers: misc: k3_avs: Add linux compatible to maintain sync
arm: mach-k3: j721e: dev-data: Add mcu_timer0 ID
arm: mach-k3: j721e_init: Move clk_k3 probe before loading TIFS
drivers: firmware: ti_sci: Get SCI revision only if TIFS/SYSFW is up
configs: j721e: Remove HBMC_AM654 config
arm: dts: k3-j721e-r5: Clean up inclusion hierarchy
arm: dts: k3-j721e: Sync with v6.5-rc1

 .../k3-j721e-common-proc-board-u-boot.dtsi    | 146 +--
 arch/arm/dts/k3-j721e-common-proc-board.dts   | 483 ++++++---
 arch/arm/dts/k3-j721e-main.dtsi               | 974 ++++++++++++++++--
 arch/arm/dts/k3-j721e-mcu-wakeup.dtsi         | 280 ++++-
 .../k3-j721e-r5-common-proc-board-u-boot.dtsi |  29 -
 .../arm/dts/k3-j721e-r5-common-proc-board.dts | 340 +-----
 arch/arm/dts/k3-j721e-r5-sk-u-boot.dtsi       |  31 -
 arch/arm/dts/k3-j721e-r5-sk.dts               | 565 +---------
 arch/arm/dts/k3-j721e-sk-u-boot.dtsi          | 177 +---
 arch/arm/dts/k3-j721e-sk.dts                  | 663 +++++++++---
 arch/arm/dts/k3-j721e-som-p0.dtsi             | 226 ++--
 arch/arm/dts/k3-j721e-thermal.dtsi            |  75 ++
 arch/arm/dts/k3-j721e.dtsi                    |  32 +-
 arch/arm/mach-k3/j721e/dev-data.c             |   1 +
 arch/arm/mach-k3/j721e_init.c                 |  24 +-
 configs/j721e_evm_a72_defconfig               |   1 -
 configs/j721e_evm_r5_defconfig                |   1 -
 drivers/firmware/ti_sci.c                     |   9 +-
 drivers/misc/k3_avs.c                         |   1 +
 19 files changed, 2401 insertions(+), 1657 deletions(-)
 delete mode 100644 arch/arm/dts/k3-j721e-r5-common-proc-board-u-boot.dtsi
 delete mode 100644 arch/arm/dts/k3-j721e-r5-sk-u-boot.dtsi
 create mode 100644 arch/arm/dts/k3-j721e-thermal.dtsi
Signature · 1 line
2.34.1
#1 lore raw

PATCH v2 1/7 drivers: misc: k3_avs: Add linux compatible to maintain sync

The U-Boot AVS driver works on the VTM (Voltage and Thermal Management) module, also used by the Linux TI Bandgap temperature sensor driver (drivers/thermal/k3_j72xx_bandgap.c). Although the purpose and functionalities that these two implement are different, the hardware is the same, so ensure that their compatibles are in sync. Thus, add ti,j721e-vtm compatible to the AVS driver.

---
 drivers/misc/k3_avs.c | 1 +
 1 file changed, 1 insertion(+)
drivers/misc/k3_avs.c +1 -0
index 840148d090..3008cf9810 100644
@@ -382,6 +382,7 @@ static struct vd_config am654_vd_config = {
 static const struct udevice_id k3_avs_ids[] = {
 	{ .compatible = "ti,am654-avs", .data = (ulong)&am654_vd_config },
 	{ .compatible = "ti,j721e-avs", .data = (ulong)&j721e_vd_config },
+	{ .compatible = "ti,j721e-vtm", .data = (ulong)&j721e_vd_config },
 	{}
 };
 
Signature · 1 line
2.34.1
maintainer
#2 lore raw

Re: [PATCH v2 1/7] drivers: misc: k3_avs: Add linux compatible to maintain sync

Quoted 27 lines · Neha Malcom Francis

The U-Boot AVS driver works on the VTM (Voltage and Thermal Management) module, also used by the Linux TI Bandgap temperature sensor driver (drivers/thermal/k3_j72xx_bandgap.c). Although the purpose and functionalities that these two implement are different, the hardware is the same, so ensure that their compatibles are in sync. Thus, add ti,j721e-vtm compatible to the AVS driver.

---
 drivers/misc/k3_avs.c | 1 +
 1 file changed, 1 insertion(+)
drivers/misc/k3_avs.c +1 -0
index 840148d090..3008cf9810 100644
@@ -382,6 +382,7 @@ static struct vd_config am654_vd_config = {
 static const struct udevice_id k3_avs_ids[] = {
 	{ .compatible = "ti,am654-avs", .data = (ulong)&am654_vd_config },
 	{ .compatible = "ti,j721e-avs", .data = (ulong)&j721e_vd_config },
+	{ .compatible = "ti,j721e-vtm", .data = (ulong)&j721e_vd_config },
 	{}
 };
 
Signature · 1 line
2.34.1

https://lore.kernel.org/all/[email protected]/

we are going to end up creating a dependency nightmare.

Can we just do a single series(might be just a single patch) for compatible additions for k3_avs.c and make the dts syncs dependent on this?

Signature · 3 lines
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D
#3 lore raw

Re: [PATCH v2 1/7] drivers: misc: k3_avs: Add linux compatible to maintain sync

Quoted 30 lines · Nishanth Menon
Quoted 27 lines · Neha Malcom Francis

The U-Boot AVS driver works on the VTM (Voltage and Thermal Management) module, also used by the Linux TI Bandgap temperature sensor driver (drivers/thermal/k3_j72xx_bandgap.c). Although the purpose and functionalities that these two implement are different, the hardware is the same, so ensure that their compatibles are in sync. Thus, add ti,j721e-vtm compatible to the AVS driver.

---
 drivers/misc/k3_avs.c | 1 +
 1 file changed, 1 insertion(+)
drivers/misc/k3_avs.c +1 -0
index 840148d090..3008cf9810 100644
@@ -382,6 +382,7 @@ static struct vd_config am654_vd_config = {
 static const struct udevice_id k3_avs_ids[] = {
 	{ .compatible = "ti,am654-avs", .data = (ulong)&am654_vd_config },
 	{ .compatible = "ti,j721e-avs", .data = (ulong)&j721e_vd_config },
+	{ .compatible = "ti,j721e-vtm", .data = (ulong)&j721e_vd_config },
 	{}
 };
 
Signature · 1 line
2.34.1

https://lore.kernel.org/all/[email protected]/

Quoted 5 lines

we are going to end up creating a dependency nightmare.

Can we just do a single series(might be just a single patch) for compatible additions for k3_avs.c and make the dts syncs dependent on this?

I submitted one here if this works:
https://lore.kernel.org/u-boot/[email protected]/T/#u

-Reid

Quoted 4 lines
Signature · 3 lines
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D
#4 lore raw

Re: [PATCH v2 1/7] drivers: misc: k3_avs: Add linux compatible to maintain sync

Hi Reid

Quoted 33 lines · reidt
Quoted 32 lines · Nishanth Menon
Quoted 27 lines · Neha Malcom Francis

The U-Boot AVS driver works on the VTM (Voltage and Thermal Management) module, also used by the Linux TI Bandgap temperature sensor driver (drivers/thermal/k3_j72xx_bandgap.c). Although the purpose and functionalities that these two implement are different, the hardware is the same, so ensure that their compatibles are in sync. Thus, add ti,j721e-vtm compatible to the AVS driver.

---
  drivers/misc/k3_avs.c | 1 +
  1 file changed, 1 insertion(+)
drivers/misc/k3_avs.c +1 -0
index 840148d090..3008cf9810 100644
@@ -382,6 +382,7 @@ static struct vd_config am654_vd_config = {
  static const struct udevice_id k3_avs_ids[] = {
  	{ .compatible = "ti,am654-avs", .data = (ulong)&am654_vd_config },
  	{ .compatible = "ti,j721e-avs", .data = (ulong)&j721e_vd_config },
+	{ .compatible = "ti,j721e-vtm", .data = (ulong)&j721e_vd_config },
  	{}
  };
 
Signature · 1 line
2.34.1

https://lore.kernel.org/all/[email protected]/

we are going to end up creating a dependency nightmare.

Quoted 9 lines
Quoted 3 lines

Can we just do a single series(might be just a single patch) for compatible additions for k3_avs.c and make the dts syncs dependent on this?

I submitted one here if this works:
https://lore.kernel.org/u-boot/[email protected]/T/#u

-Reid

Thanks for sending the patch! I'll omit this patch from the next version.

Quoted 4 lines
Quoted 4 lines
Signature · 3 lines
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D
Signature · 2 lines
Thanking You
Neha Malcom Francis
#5 lore raw

PATCH v2 2/7 arm: mach-k3: j721e: dev-data: Add mcu_timer0 ID

In reply to Neha Malcom Francis

U-Boot uses mcu_timer0 as the tick-timer, so add it to device list.

---
 arch/arm/mach-k3/j721e/dev-data.c | 1 +
 1 file changed, 1 insertion(+)
arch/arm/mach-k3/j721e/dev-data.c +1 -0
index 97f017f8af..b0adb1857b 100644
@@ -56,6 +56,7 @@ static struct ti_dev soc_dev_list[] = {
 	PSC_DEV(4, &soc_lpsc_list[8]),
 	PSC_DEV(202, &soc_lpsc_list[9]),
 	PSC_DEV(203, &soc_lpsc_list[10]),
+	PSC_DEV(35, &soc_lpsc_list[11]),
 	PSC_DEV(102, &soc_lpsc_list[11]),
 	PSC_DEV(103, &soc_lpsc_list[11]),
 	PSC_DEV(104, &soc_lpsc_list[11]),
Signature · 1 line
2.34.1
Reviewed-by on v2 2/7
#6 lore raw

Re: [PATCH v2 2/7] arm: mach-k3: j721e: dev-data: Add mcu_timer0 ID

Hi Neha,

Quoted 12 lines · Neha Malcom Francis

U-Boot uses mcu_timer0 as the tick-timer, so add it to device list.

---
 arch/arm/mach-k3/j721e/dev-data.c | 1 +
 1 file changed, 1 insertion(+)
arch/arm/mach-k3/j721e/dev-data.c +0 -0
index 97f017f8af..b0adb1857b 100644

arch/arm/mach-k3/j721e/dev-data.c static struct ti_dev soc_dev_list[] = { · line 59

Quoted 4 lines
arch/arm/mach-k3/j721e/dev-data.c +1 -0
@@ -56,6 +56,7 @@ static struct ti_dev soc_dev_list[] = {
 	PSC_DEV(4, &soc_lpsc_list[8]),
 	PSC_DEV(202, &soc_lpsc_list[9]),
 	PSC_DEV(203, &soc_lpsc_list[10]),
+	PSC_DEV(35, &soc_lpsc_list[11]),

Confirmed the LPSC ID and the DEV ID for MCU_TIMER0.

Regards,
Manorit

Quoted 6 lines
arch/arm/mach-k3/j721e/dev-data.c +0 -0
 	PSC_DEV(102, &soc_lpsc_list[11]),
 	PSC_DEV(103, &soc_lpsc_list[11]),
 	PSC_DEV(104, &soc_lpsc_list[11]),
Signature · 1 line
2.34.1
#7 lore raw

PATCH v2 3/7 arm: mach-k3: j721e_init: Move clk_k3 probe before loading TIFS

In reply to Neha Malcom Francis

Since we need to configure required clocks before TIFS is loaded, move clk_k3 driver probe before k3_sysfw_loader.

---
 arch/arm/mach-k3/j721e_init.c | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)
arch/arm/mach-k3/j721e_init.c +12 -12
index b6164575b7..b1f7e25ed0 100644
@@ -228,6 +228,18 @@ void board_init_f(ulong dummy)
 	if (!ret)
 		pinctrl_select_state(dev, "default");
 
+	/*
+	 * Force probe of clk_k3 driver here to ensure basic default clock
+	 * configuration is always done.
+	 */
+	if (IS_ENABLED(CONFIG_SPL_CLK_K3)) {
+		ret = uclass_get_device_by_driver(UCLASS_CLK,
+						  DM_DRIVER_GET(ti_clk),
+						  &dev);
+		if (ret)
+			panic("Failed to initialize clk-k3!\n");
+	}
+
 	/*
 	 * Load, start up, and configure system controller firmware. Provide
 	 * the U-Boot console init function to the SYSFW post-PM configuration
@@ -241,18 +253,6 @@ void board_init_f(ulong dummy)
 	do_dt_magic();
 #endif
 
-	/*
-	 * Force probe of clk_k3 driver here to ensure basic default clock
-	 * configuration is always done.
-	 */
-	if (IS_ENABLED(CONFIG_SPL_CLK_K3)) {
-		ret = uclass_get_device_by_driver(UCLASS_CLK,
-						  DM_DRIVER_GET(ti_clk),
-						  &dev);
-		if (ret)
-			panic("Failed to initialize clk-k3!\n");
-	}
-
 	/* Prepare console output */
 	preloader_console_init();
 
Signature · 1 line
2.34.1
maintainer
#8 lore raw

Re: [PATCH v2 3/7] arm: mach-k3: j721e_init: Move clk_k3 probe before loading TIFS

Quoted 2 lines · Neha Malcom Francis

Since we need to configure required clocks before TIFS is loaded, move clk_k3 driver probe before k3_sysfw_loader.

This needs further elaboration. what kind of clocks are we talking about? what is the call sequence that is involved that this is solving?

Quoted 51 lines
---
 arch/arm/mach-k3/j721e_init.c | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)
arch/arm/mach-k3/j721e_init.c +12 -12
index b6164575b7..b1f7e25ed0 100644
@@ -228,6 +228,18 @@ void board_init_f(ulong dummy)
 	if (!ret)
 		pinctrl_select_state(dev, "default");
 
+	/*
+	 * Force probe of clk_k3 driver here to ensure basic default clock
+	 * configuration is always done.
+	 */
+	if (IS_ENABLED(CONFIG_SPL_CLK_K3)) {
+		ret = uclass_get_device_by_driver(UCLASS_CLK,
+						  DM_DRIVER_GET(ti_clk),
+						  &dev);
+		if (ret)
+			panic("Failed to initialize clk-k3!\n");
+	}
+
 	/*
 	 * Load, start up, and configure system controller firmware. Provide
 	 * the U-Boot console init function to the SYSFW post-PM configuration
@@ -241,18 +253,6 @@ void board_init_f(ulong dummy)
 	do_dt_magic();
 #endif
 
-	/*
-	 * Force probe of clk_k3 driver here to ensure basic default clock
-	 * configuration is always done.
-	 */
-	if (IS_ENABLED(CONFIG_SPL_CLK_K3)) {
-		ret = uclass_get_device_by_driver(UCLASS_CLK,
-						  DM_DRIVER_GET(ti_clk),
-						  &dev);
-		if (ret)
-			panic("Failed to initialize clk-k3!\n");
-	}
-
 	/* Prepare console output */
 	preloader_console_init();
 
Signature · 1 line
2.34.1
Signature · 3 lines
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D
#9 lore raw

Re: [PATCH v2 3/7] arm: mach-k3: j721e_init: Move clk_k3 probe before loading TIFS

Hi Nishanth

Quoted 7 lines · Nishanth Menon
Quoted 2 lines · Neha Malcom Francis

Since we need to configure required clocks before TIFS is loaded, move clk_k3 driver probe before k3_sysfw_loader.

This needs further elaboration. what kind of clocks are we talking about? what is the call sequence that is involved that this is solving?

When setting up our boot media to take in the TIFS binary (sysfw.itb) in legacy boot flow (followed by J721E) what we end up doing is a get_timer() which by call stack will eventually call dm_timer_init() and then get our "tick-timer" in our case mcu_timer0. Now mcu_timer0 uses k3_clks (clock-controller) and k3_pds (power controller) from the dmsc node that forces probe of the ti_sci driver (for TIFS that hasn't been loaded yet!).

So we have two issues that need to be solved here, one of not having set the required devices and clocks before we even stat to probe their dependent devices, and two of handling how ti_sci reacts when TIFS is not even up yet. This patch solves the former.

Would this be excessive detailing for a commit message?

Quoted 52 lines
Quoted 51 lines
---
  arch/arm/mach-k3/j721e_init.c | 24 ++++++++++++------------
  1 file changed, 12 insertions(+), 12 deletions(-)
arch/arm/mach-k3/j721e_init.c +12 -12
index b6164575b7..b1f7e25ed0 100644
@@ -228,6 +228,18 @@ void board_init_f(ulong dummy)
  	if (!ret)
  		pinctrl_select_state(dev, "default");
 
+	/*
+	 * Force probe of clk_k3 driver here to ensure basic default clock
+	 * configuration is always done.
+	 */
+	if (IS_ENABLED(CONFIG_SPL_CLK_K3)) {
+		ret = uclass_get_device_by_driver(UCLASS_CLK,
+						  DM_DRIVER_GET(ti_clk),
+						  &dev);
+		if (ret)
+			panic("Failed to initialize clk-k3!\n");
+	}
+
  	/*
  	 * Load, start up, and configure system controller firmware. Provide
  	 * the U-Boot console init function to the SYSFW post-PM configuration
@@ -241,18 +253,6 @@ void board_init_f(ulong dummy)
  	do_dt_magic();
  #endif
 
-	/*
-	 * Force probe of clk_k3 driver here to ensure basic default clock
-	 * configuration is always done.
-	 */
-	if (IS_ENABLED(CONFIG_SPL_CLK_K3)) {
-		ret = uclass_get_device_by_driver(UCLASS_CLK,
-						  DM_DRIVER_GET(ti_clk),
-						  &dev);
-		if (ret)
-			panic("Failed to initialize clk-k3!\n");
-	}
-
  	/* Prepare console output */
  	preloader_console_init();
 
Signature · 1 line
2.34.1
Signature · 2 lines
Thanking You
Neha Malcom Francis
#10 lore raw

PATCH v2 4/7 drivers: firmware: ti_sci: Get SCI revision only if TIFS/SYSFW is up

In reply to Neha Malcom Francis

While setting up necessary dependent clocks and power domains, we end up probing the ti_sci driver before TIFS/SYSFW has been loaded in the case of legacy boot flow devices. This leads to panic when getting the SCI revision. Return the revision only if it is combined boot flow. Also ensure that after TIFS/SYSFW comes up we run ti_sci_cmd_get_revision again so we print the revision right.

---
 drivers/firmware/ti_sci.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
drivers/firmware/ti_sci.c +8 -1
index 72f572d824..6a85d202f2 100644
@@ -2703,6 +2703,9 @@ struct ti_sci_handle *ti_sci_get_handle_from_sysfw(struct udevice *sci_dev)
 	if (!handle)
 		return ERR_PTR(-EINVAL);
 
+	/* May have been skipped in case TIFS/SYSFW had come up later */
+	ti_sci_cmd_get_revision(handle);
+
 	return handle;
 }
 
@@ -2825,7 +2828,11 @@ static int ti_sci_probe(struct udevice *dev)
 	list_add_tail(&info->list, &ti_sci_list);
 	ti_sci_setup_ops(info);
 
-	ret = ti_sci_cmd_get_revision(&info->handle);
+	/* Get SCI revision ONLY if we are real */
+	if (!IS_ENABLED(CONFIG_K3_DM_FW))
+		ret = ti_sci_cmd_get_revision(&info->handle);
+	else
+		ret = 0;
 
 	INIT_LIST_HEAD(&info->dev_list);
 
Signature · 1 line
2.34.1
maintainer
#11 lore raw

Re: [PATCH v2 4/7] drivers: firmware: ti_sci: Get SCI revision only if TIFS/SYSFW is up

Quoted 4 lines · Neha Malcom Francis

While setting up necessary dependent clocks and power domains, we end up probing the ti_sci driver before TIFS/SYSFW has been loaded in the case of legacy boot flow devices. This leads to panic when getting the SCI revision. Return the revision only if it is combined boot flow. Also

Not clear description of the problem.

Quoted 13 lines

ensure that after TIFS/SYSFW comes up we run ti_sci_cmd_get_revision again so we print the revision right.

---
 drivers/firmware/ti_sci.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
drivers/firmware/ti_sci.c +0 -0
index 72f572d824..6a85d202f2 100644

drivers/firmware/ti_sci.c struct ti_sci_handle *ti_sci_get_handle_from_sysfw(struct udevice *sci_dev) · line 2706

Quoted 4 lines
drivers/firmware/ti_sci.c +1 -0
@@ -2703,6 +2703,9 @@ struct ti_sci_handle *ti_sci_get_handle_from_sysfw(struct udevice *sci_dev)
 	if (!handle)
 		return ERR_PTR(-EINVAL);
 
+	/* May have been skipped in case TIFS/SYSFW had come up later */

Very confusing comment.

drivers/firmware/ti_sci.c struct ti_sci_handle *ti_sci_get_handle_from_sysfw(struct udevice *sci_dev) · line 2707

Quoted 1 line
drivers/firmware/ti_sci.c +1 -0
+	ti_sci_cmd_get_revision(handle);

should this be protected with if (IS_ENABLED(CONFIG_K3_DM_FW) ?

Since getting the handle is where the entire flow happens, why not do it here always?

what if ti_sci_cmd_get_revision fails? there is no error handling here.

Quoted 20 lines
drivers/firmware/ti_sci.c +6 -1
+
 	return handle;
 }
 
@@ -2825,7 +2828,11 @@ static int ti_sci_probe(struct udevice *dev)
 	list_add_tail(&info->list, &ti_sci_list);
 	ti_sci_setup_ops(info);
 
-	ret = ti_sci_cmd_get_revision(&info->handle);
+	/* Get SCI revision ONLY if we are real */
+	if (!IS_ENABLED(CONFIG_K3_DM_FW))
+		ret = ti_sci_cmd_get_revision(&info->handle);
+	else
+		ret = 0;
 
 	INIT_LIST_HEAD(&info->dev_list);
 
Signature · 1 line
2.34.1
Signature · 3 lines
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D
#12 lore raw

Re: [PATCH v2 4/7] drivers: firmware: ti_sci: Get SCI revision only if TIFS/SYSFW is up

Hi Nishanth

Quoted 7 lines · Nishanth Menon
Quoted 4 lines · Neha Malcom Francis

While setting up necessary dependent clocks and power domains, we end up probing the ti_sci driver before TIFS/SYSFW has been loaded in the case of legacy boot flow devices. This leads to panic when getting the SCI revision. Return the revision only if it is combined boot flow. Also

Not clear description of the problem.

Hmm okay I will modify this and the earlier commit message to give a clearer picture.

Quoted 17 lines
Quoted 17 lines

ensure that after TIFS/SYSFW comes up we run ti_sci_cmd_get_revision again so we print the revision right.

---
  drivers/firmware/ti_sci.c | 9 ++++++++-
  1 file changed, 8 insertions(+), 1 deletion(-)
drivers/firmware/ti_sci.c +0 -0
index 72f572d824..6a85d202f2 100644
@@ -2703,6 +2703,9 @@ struct ti_sci_handle *ti_sci_get_handle_from_sysfw(struct udevice *sci_dev)
  	if (!handle)
  		return ERR_PTR(-EINVAL);
 
Quoted 3 lines

drivers/firmware/ti_sci.c struct ti_sci_handle *ti_sci_get_handle_from_sysfw(struct udevice *sci_dev) · line 2706

Quoted 1 line
drivers/firmware/ti_sci.c +1 -0
+	/* May have been skipped in case TIFS/SYSFW had come up later */

Very confusing comment.

Understood, will change that.

Quoted 7 lines

drivers/firmware/ti_sci.c struct ti_sci_handle *ti_sci_get_handle_from_sysfw(struct udevice *sci_dev) · line 2707

Quoted 1 line
drivers/firmware/ti_sci.c +1 -0
+	ti_sci_cmd_get_revision(handle);

should this be protected with if (IS_ENABLED(CONFIG_K3_DM_FW) ?

Since getting the handle is where the entire flow happens, why not do it here always?

This is a valid point, I am in the process of making sure there's no other consequences to getting the revision this late for platforms with other boot devices, if this gets an all clear, I will push it here for the next version, else I will explain why I couldn't.

Quoted 1 line

what if ti_sci_cmd_get_revision fails? there is no error handling here.

Yes that would be a consequence since ti_sci_probe, the logic it was written; used reading the version as an "all okay return 0" for the TIFS/SYSFW binary.

But now after moving, ti_sci_get_handle_from_sysfw happens after k3_sysfw_loader so we're not checking binary sanity early on in the case of combined boot

I'm hesitant that we are checking version way later after k3_sysfw_loader for combined platforms and if that is something we want? But there is an advantage(?) that it will run every time someone tries to get a handle for doing anything with TISCI and that would be a kind of check (?) if the binary is good? Correct me if I'm wrong in thinking that.

Quoted 21 lines
Quoted 20 lines
drivers/firmware/ti_sci.c +6 -1
+
  	return handle;
  }
 
@@ -2825,7 +2828,11 @@ static int ti_sci_probe(struct udevice *dev)
  	list_add_tail(&info->list, &ti_sci_list);
  	ti_sci_setup_ops(info);
 
-	ret = ti_sci_cmd_get_revision(&info->handle);
+	/* Get SCI revision ONLY if we are real */
+	if (!IS_ENABLED(CONFIG_K3_DM_FW))
+		ret = ti_sci_cmd_get_revision(&info->handle);
+	else
+		ret = 0;
 
  	INIT_LIST_HEAD(&info->dev_list);
 
Signature · 1 line
2.34.1
Signature · 2 lines
Thanking You
Neha Malcom Francis
#13 lore raw

Re: [PATCH v2 4/7] drivers: firmware: ti_sci: Get SCI revision only if TIFS/SYSFW is up

Hi Neha,

Quoted 9 lines · Neha Malcom Francis

Hi Nishanth

Quoted 6 lines · Nishanth Menon
Quoted 4 lines · Neha Malcom Francis

While setting up necessary dependent clocks and power domains, we end up probing the ti_sci driver before TIFS/SYSFW has been loaded in the case of legacy boot flow devices. This leads to panic when getting the SCI revision. Return the revision only if it is combined boot flow. Also

Quoted 5 lines
Quoted 1 line

Not clear description of the problem.

Hmm okay I will modify this and the earlier commit message to give a clearer picture.

I still don't understand why we are coming to the TISCI driver to contact M4/DM for setting up the power domains and clocks, if this would have been the case then even the normal J721E wouldn't have been working and it shouldn't have been dependent on the DT Sync to uncover this issue. Could you elaborate more w.r.t this patch?

From what I understand is that even if we end up coming here, we shouldn't be hitting the panic as the previous patch sets up the necessary clock (mcu_timer0) and at the worst - we would just end up polling to get a response and if we don't, we would fail and we shouldn't be getting a panic. I believe this is how the J721E would've been working before the sync but am not sure what is breaking after the sync. Maybe this helps in uncovering the real issue that we still have, I believe we should still be looking at why the timer is failing and causing this probe to fail.

Regards,
Manorit

Quoted 72 lines
Quoted 9 lines
Quoted 9 lines

ensure that after TIFS/SYSFW comes up we run ti_sci_cmd_get_revision again so we print the revision right.

---
  drivers/firmware/ti_sci.c | 9 ++++++++-
  1 file changed, 8 insertions(+), 1 deletion(-)
Quoted 10 lines

drivers/firmware/ti_sci.c struct ti_sci_handle *ti_sci_get_handle_from_sysfw(struct udevice *sci_dev) · line 2705

Quoted 8 lines
drivers/firmware/ti_sci.c +1 -0
index 72f572d824..6a85d202f2 100644
@@ -2703,6 +2703,9 @@ struct ti_sci_handle *ti_sci_get_handle_from_sysfw(struct udevice *sci_dev)
  	if (!handle)
  		return ERR_PTR(-EINVAL);
+	/* May have been skipped in case TIFS/SYSFW had come up later */

Very confusing comment.

Understood, will change that.

Quoted 7 lines

drivers/firmware/ti_sci.c struct ti_sci_handle *ti_sci_get_handle_from_sysfw(struct udevice *sci_dev) · line 2707

Quoted 1 line
drivers/firmware/ti_sci.c +1 -0
+	ti_sci_cmd_get_revision(handle);

should this be protected with if (IS_ENABLED(CONFIG_K3_DM_FW) ?

Since getting the handle is where the entire flow happens, why not do it here always?

This is a valid point, I am in the process of making sure there's no other consequences to getting the revision this late for platforms with other boot devices, if this gets an all clear, I will push it here for the next version, else I will explain why I couldn't.

Quoted 1 line

what if ti_sci_cmd_get_revision fails? there is no error handling here.

Yes that would be a consequence since ti_sci_probe, the logic it was written; used reading the version as an "all okay return 0" for the TIFS/SYSFW binary.

But now after moving, ti_sci_get_handle_from_sysfw happens after k3_sysfw_loader so we're not checking binary sanity early on in the case of combined boot

I'm hesitant that we are checking version way later after k3_sysfw_loader for combined platforms and if that is something we want? But there is an advantage(?) that it will run every time someone tries to get a handle for doing anything with TISCI and that would be a kind of check (?) if the binary is good? Correct me if I'm wrong in thinking that.

Quoted 17 lines
Quoted 16 lines
drivers/firmware/ti_sci.c +6 -1
+
  	return handle;
  }
@@ -2825,7 +2828,11 @@ static int ti_sci_probe(struct udevice *dev)
  	list_add_tail(&info->list, &ti_sci_list);
  	ti_sci_setup_ops(info);
-	ret = ti_sci_cmd_get_revision(&info->handle);
+	/* Get SCI revision ONLY if we are real */
+	if (!IS_ENABLED(CONFIG_K3_DM_FW))
+		ret = ti_sci_cmd_get_revision(&info->handle);
+	else
+		ret = 0;
  	INIT_LIST_HEAD(&info->dev_list);
Signature · 1 line
2.34.1
Signature · 2 lines
Thanking You
Neha Malcom Francis
#14 lore raw

Re: [PATCH v2 4/7] drivers: firmware: ti_sci: Get SCI revision only if TIFS/SYSFW is up

Hi Manorit

Quoted 18 lines · Manorit Chawdhry

Hi Neha,

Quoted 9 lines · Neha Malcom Francis

Hi Nishanth

Quoted 6 lines · Nishanth Menon
Quoted 4 lines · Neha Malcom Francis

While setting up necessary dependent clocks and power domains, we end up probing the ti_sci driver before TIFS/SYSFW has been loaded in the case of legacy boot flow devices. This leads to panic when getting the SCI revision. Return the revision only if it is combined boot flow. Also

Quoted 5 lines
Quoted 1 line

Not clear description of the problem.

Hmm okay I will modify this and the earlier commit message to give a clearer picture.

Quoted 6 lines

I still don't understand why we are coming to the TISCI driver to contact M4/DM for setting up the power domains and clocks, if this would have been the case then even the normal J721E wouldn't have been working and it shouldn't have been dependent on the DT Sync to uncover this issue. Could you elaborate more w.r.t this patch?

We were using /delete-property/ to remove every instance of k3_clks and k3_pds before TIFS/SYSFW came up so it was never probing the TISCI driver.

Quoted 5 lines

From what I understand is that even if we end up coming here, we
shouldn't be hitting the panic as the previous patch sets up the necessary clock (mcu_timer0) and at the worst - we would just end up polling to get a response and if we don't, we would fail and we shouldn't be getting a panic. I believe this is how the J721E would've

So earlier we never reached here because of above mentioned reason, now we do with the last patch. While probing ti_sci we invoke ti_sci_cmd_get_revision that returns -61 (ENODATA) and we reach panic like this:

get_timer --> get_ticks --> dm_timer_init (tries to get timer, fails for above reason) --> panic

Quoted 80 lines

been working before the sync but am not sure what is breaking after the sync. Maybe this helps in uncovering the real issue that we still have, I believe we should still be looking at why the timer is failing and causing this probe to fail.

Regards,
Manorit

Quoted 72 lines
Quoted 9 lines
Quoted 9 lines

ensure that after TIFS/SYSFW comes up we run ti_sci_cmd_get_revision again so we print the revision right.

---
   drivers/firmware/ti_sci.c | 9 ++++++++-
   1 file changed, 8 insertions(+), 1 deletion(-)
Quoted 10 lines

drivers/firmware/ti_sci.c struct ti_sci_handle *ti_sci_get_handle_from_sysfw(struct udevice *sci_dev) · line 2705

Quoted 8 lines
drivers/firmware/ti_sci.c +1 -0
index 72f572d824..6a85d202f2 100644
@@ -2703,6 +2703,9 @@ struct ti_sci_handle *ti_sci_get_handle_from_sysfw(struct udevice *sci_dev)
   	if (!handle)
   		return ERR_PTR(-EINVAL);
+	/* May have been skipped in case TIFS/SYSFW had come up later */

Very confusing comment.

Understood, will change that.

Quoted 7 lines

drivers/firmware/ti_sci.c struct ti_sci_handle *ti_sci_get_handle_from_sysfw(struct udevice *sci_dev) · line 2707

Quoted 1 line
drivers/firmware/ti_sci.c +1 -0
+	ti_sci_cmd_get_revision(handle);

should this be protected with if (IS_ENABLED(CONFIG_K3_DM_FW) ?

Since getting the handle is where the entire flow happens, why not do it here always?

This is a valid point, I am in the process of making sure there's no other consequences to getting the revision this late for platforms with other boot devices, if this gets an all clear, I will push it here for the next version, else I will explain why I couldn't.

Quoted 1 line

what if ti_sci_cmd_get_revision fails? there is no error handling here.

Yes that would be a consequence since ti_sci_probe, the logic it was written; used reading the version as an "all okay return 0" for the TIFS/SYSFW binary.

But now after moving, ti_sci_get_handle_from_sysfw happens after k3_sysfw_loader so we're not checking binary sanity early on in the case of combined boot

I'm hesitant that we are checking version way later after k3_sysfw_loader for combined platforms and if that is something we want? But there is an advantage(?) that it will run every time someone tries to get a handle for doing anything with TISCI and that would be a kind of check (?) if the binary is good? Correct me if I'm wrong in thinking that.

Quoted 17 lines
Quoted 16 lines
drivers/firmware/ti_sci.c +6 -1
+
   	return handle;
   }
@@ -2825,7 +2828,11 @@ static int ti_sci_probe(struct udevice *dev)
   	list_add_tail(&info->list, &ti_sci_list);
   	ti_sci_setup_ops(info);
-	ret = ti_sci_cmd_get_revision(&info->handle);
+	/* Get SCI revision ONLY if we are real */
+	if (!IS_ENABLED(CONFIG_K3_DM_FW))
+		ret = ti_sci_cmd_get_revision(&info->handle);
+	else
+		ret = 0;
   	INIT_LIST_HEAD(&info->dev_list);
Signature · 1 line
2.34.1
Signature · 2 lines
Thanking You
Neha Malcom Francis
Signature · 2 lines
Thanking You
Neha Malcom Francis
#15 lore raw

PATCH v2 5/7 configs: j721e: Remove HBMC_AM654 config

In reply to Neha Malcom Francis

Remove config as kernel commit d93036b47f35 ("arm64: dts: ti:
k3-j721e-mcu-wakeup: Add HyperBus node") is impacting boot. Its dependent patch [1] has not yet been merged to kernel, similar fix will be needed in U-Boot.

[1] https://lore.kernel.org/all/[email protected]/

---
 configs/j721e_evm_a72_defconfig | 1 -
 configs/j721e_evm_r5_defconfig  | 1 -
 2 files changed, 2 deletions(-)
configs/j721e_evm_a72_defconfig +0 -1
index 214fa8b2f3..beea948c4e 100644
@@ -140,7 +140,6 @@ CONFIG_CFI_FLASH=y
 CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
 CONFIG_FLASH_CFI_MTD=y
 CONFIG_SYS_FLASH_CFI=y
-CONFIG_HBMC_AM654=y
 CONFIG_SYS_MAX_FLASH_BANKS_DETECT=y
 CONFIG_DM_SPI_FLASH=y
 CONFIG_SPI_FLASH_STMICRO=y
configs/j721e_evm_r5_defconfig +0 -1
index cf7bc872b5..d974be275f 100644
@@ -127,7 +127,6 @@ CONFIG_CFI_FLASH=y
 CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
 CONFIG_FLASH_CFI_MTD=y
 CONFIG_SYS_FLASH_CFI=y
-CONFIG_HBMC_AM654=y
 CONFIG_DM_SPI_FLASH=y
 CONFIG_SPI_FLASH_SFDP_SUPPORT=y
 CONFIG_SPI_FLASH_STMICRO=y
Signature · 1 line
2.34.1
maintainer
#16 lore raw

Re: [PATCH v2 5/7] configs: j721e: Remove HBMC_AM654 config

Quoted 6 lines · Neha Malcom Francis

Remove config as kernel commit d93036b47f35 ("arm64: dts: ti:
k3-j721e-mcu-wakeup: Add HyperBus node") is impacting boot. Its dependent patch [1] has not yet been merged to kernel, similar fix will be needed in U-Boot.

[1] https://lore.kernel.org/all/[email protected]/

So, fix the kernel, why do this in u-boot? The rationale in the commit message should clearly state why we do in u-boot.

Quoted 34 lines
---
 configs/j721e_evm_a72_defconfig | 1 -
 configs/j721e_evm_r5_defconfig  | 1 -
 2 files changed, 2 deletions(-)
configs/j721e_evm_a72_defconfig +0 -1
index 214fa8b2f3..beea948c4e 100644
@@ -140,7 +140,6 @@ CONFIG_CFI_FLASH=y
 CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
 CONFIG_FLASH_CFI_MTD=y
 CONFIG_SYS_FLASH_CFI=y
-CONFIG_HBMC_AM654=y
 CONFIG_SYS_MAX_FLASH_BANKS_DETECT=y
 CONFIG_DM_SPI_FLASH=y
 CONFIG_SPI_FLASH_STMICRO=y
configs/j721e_evm_r5_defconfig +0 -1
index cf7bc872b5..d974be275f 100644
@@ -127,7 +127,6 @@ CONFIG_CFI_FLASH=y
 CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
 CONFIG_FLASH_CFI_MTD=y
 CONFIG_SYS_FLASH_CFI=y
-CONFIG_HBMC_AM654=y
 CONFIG_DM_SPI_FLASH=y
 CONFIG_SPI_FLASH_SFDP_SUPPORT=y
 CONFIG_SPI_FLASH_STMICRO=y
Signature · 1 line
2.34.1
Signature · 3 lines
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D
#17 lore raw

Re: [PATCH v2 5/7] configs: j721e: Remove HBMC_AM654 config

Hi Nishanth

Quoted 11 lines · Nishanth Menon
Quoted 6 lines · Neha Malcom Francis

Remove config as kernel commit d93036b47f35 ("arm64: dts: ti:
k3-j721e-mcu-wakeup: Add HyperBus node") is impacting boot. Its dependent patch [1] has not yet been merged to kernel, similar fix will be needed in U-Boot.

[1] https://lore.kernel.org/all/[email protected]/

So, fix the kernel, why do this in u-boot? The rationale in the commit message should clearly state why we do in u-boot.

Will explain better in the commit message.

Quoted 35 lines
Quoted 34 lines
---
  configs/j721e_evm_a72_defconfig | 1 -
  configs/j721e_evm_r5_defconfig  | 1 -
  2 files changed, 2 deletions(-)
configs/j721e_evm_a72_defconfig +0 -1
index 214fa8b2f3..beea948c4e 100644
@@ -140,7 +140,6 @@ CONFIG_CFI_FLASH=y
  CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
  CONFIG_FLASH_CFI_MTD=y
  CONFIG_SYS_FLASH_CFI=y
-CONFIG_HBMC_AM654=y
  CONFIG_SYS_MAX_FLASH_BANKS_DETECT=y
  CONFIG_DM_SPI_FLASH=y
  CONFIG_SPI_FLASH_STMICRO=y
configs/j721e_evm_r5_defconfig +0 -1
index cf7bc872b5..d974be275f 100644
@@ -127,7 +127,6 @@ CONFIG_CFI_FLASH=y
  CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
  CONFIG_FLASH_CFI_MTD=y
  CONFIG_SYS_FLASH_CFI=y
-CONFIG_HBMC_AM654=y
  CONFIG_DM_SPI_FLASH=y
  CONFIG_SPI_FLASH_SFDP_SUPPORT=y
  CONFIG_SPI_FLASH_STMICRO=y
Signature · 1 line
2.34.1
Signature · 2 lines
Thanking You
Neha Malcom Francis
#18 lore raw

PATCH v2 6/7 arm: dts: k3-j721e-r5: Clean up inclusion hierarchy

In reply to Neha Malcom Francis

Get rid of k3-j721e-r5-*-u-boot.dtsi as it is not necessary. Change the inclusion hierarchy to be as follows:

	k3-j721e-<board>.dts---
			       -
			        -->k3-j721e-r5-<board>.dts
			       -

k3-j721e-<board>-u-boot.dtsi---

Reason for explicitly mentioning the inclusion of -u-boot.dtsi in code although it could've been automatically done by U-Boot is to resolve some of the dependencies that R5 file requires.

Also remove duplicate phandles while making this shift as well as remove firmware-loader as it serves no purpose without "phandlepart" property.

---
 .../k3-j721e-r5-common-proc-board-u-boot.dtsi | 29 ------------
 .../arm/dts/k3-j721e-r5-common-proc-board.dts | 38 +++------------
 arch/arm/dts/k3-j721e-r5-sk-u-boot.dtsi       | 31 ------------
 arch/arm/dts/k3-j721e-r5-sk.dts               | 47 ++++---------------
 4 files changed, 16 insertions(+), 129 deletions(-)
 delete mode 100644 arch/arm/dts/k3-j721e-r5-common-proc-board-u-boot.dtsi
 delete mode 100644 arch/arm/dts/k3-j721e-r5-sk-u-boot.dtsi
arch/arm/dts/k3-j721e-r5-common-proc-board-u-boot.dtsi deleted +0 -29
deleted file mode 100644
index f9746d33ec..0000000000
@@ -1,29 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-/*
- * Copyright (C) 2020 Texas Instruments Incorporated - http://www.ti.com/
- */
-
-#include "k3-j721e-common-proc-board-u-boot.dtsi"
-
-/ {
-	chosen {
-		firmware-loader = &fs_loader0;
-	};
-
-	aliases {
-		remoteproc0 = &sysctrler;
-		remoteproc1 = &a72_0;
-	};
-
-	fs_loader0: fs_loader@0 {
-		bootph-all;
-		compatible = "u-boot,fs-loader";
-	};
-};
-
-&tps659413a {
-	esm: esm {
-		compatible = "ti,tps659413-esm";
-		bootph-pre-ram;
-	};
-};
arch/arm/dts/k3-j721e-r5-common-proc-board.dts +7 -31
index 32f71e9b6a..7bb5ce775c 100644
@@ -5,10 +5,10 @@
 
 /dts-v1/;
 
-#include "k3-j721e-som-p0.dtsi"
+#include "k3-j721e-common-proc-board.dts"
 #include "k3-j721e-ddr-evm-lp4-4266.dtsi"
 #include "k3-j721e-ddr.dtsi"
-#include "k3-j721e-binman.dtsi"
+#include "k3-j721e-common-proc-board-u-boot.dtsi"
 #include <dt-bindings/phy/phy-cadence.h>
 
 / {
@@ -198,27 +198,6 @@
 		>;
 	};
 
-	main_usbss0_pins_default: main_usbss0_pins_default {
-		pinctrl-single,pins = <
-			J721E_IOPAD(0x290, PIN_OUTPUT, 0) /* (U6) USB0_DRVVBUS */
-			J721E_IOPAD(0x210, PIN_INPUT, 7) /* (W3) MCAN1_RX.GPIO1_3 */
-		>;
-	};
-
-	main_mmc1_pins_default: main_mmc1_pins_default {
-		pinctrl-single,pins = <
-			J721E_IOPAD(0x254, PIN_INPUT, 0) /* (R29) MMC1_CMD */
-			J721E_IOPAD(0x250, PIN_INPUT, 0) /* (P25) MMC1_CLK */
-			J721E_IOPAD(0x2ac, PIN_INPUT, 0) /* (P25) MMC1_CLKLB */
-			J721E_IOPAD(0x24c, PIN_INPUT, 0) /* (R24) MMC1_DAT0 */
-			J721E_IOPAD(0x248, PIN_INPUT, 0) /* (P24) MMC1_DAT1 */
-			J721E_IOPAD(0x244, PIN_INPUT, 0) /* (R25) MMC1_DAT2 */
-			J721E_IOPAD(0x240, PIN_INPUT, 0) /* (R26) MMC1_DAT3 */
-			J721E_IOPAD(0x258, PIN_INPUT, 0) /* (P23) MMC1_SDCD */
-			J721E_IOPAD(0x25c, PIN_INPUT, 0) /* (R28) MMC1_SDWP */
-		>;
-	};
-
 	main_i2c0_pins_default: main-i2c0-pins-default {
 		pinctrl-single,pins = <
 			J721E_IOPAD(0x220, PIN_INPUT_PULLUP, 0) /* (AC5) I2C0_SCL */
@@ -300,6 +279,11 @@
 				bootph-pre-ram;
 			};
 		};
+
+		esm: esm {
+			compatible = "ti,tps659413-esm";
+			bootph-pre-ram;
+		};
 	};
 };
 
@@ -424,14 +408,6 @@
 	assigned-clocks = <&serdes0 CDNS_SIERRA_PLL_CMNLC>, <&serdes0 CDNS_SIERRA_PLL_CMNLC1>;
 	assigned-clock-parents = <&wiz0_pll1_refclk>, <&wiz0_pll1_refclk>;
 
-	serdes0_pcie_link: link@0 {
-		reg = <0>;
-		cdns,num-lanes = <1>;
-		#phy-cells = <0>;
-		cdns,phy-type = <PHY_TYPE_PCIE>;
-		resets = <&serdes_wiz0 1>;
-	};
-
 	serdes0_qsgmii_link: phy@1 {
 		reg = <1>;
 		cdns,num-lanes = <1>;
arch/arm/dts/k3-j721e-r5-sk-u-boot.dtsi deleted +0 -31
deleted file mode 100644
index 733d69cd00..0000000000
@@ -1,31 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-/*
- * Copyright (C) 2021 Texas Instruments Incorporated - https://www.ti.com/
- */
-
-#include "k3-j721e-sk-u-boot.dtsi"
-
-/ {
-	chosen {
-		firmware-loader = &fs_loader0;
-	};
-
-	aliases {
-		remoteproc0 = &sysctrler;
-		remoteproc1 = &a72_0;
-		remoteproc2 = &main_r5fss0_core0;
-		remoteproc3 = &main_r5fss0_core1;
-	};
-
-	fs_loader0: fs_loader@0 {
-		bootph-all;
-		compatible = "u-boot,fs-loader";
-	};
-};
-
-&tps659412 {
-	esm: esm {
-		compatible = "ti,tps659413-esm";
-		bootph-pre-ram;
-	};
-};
arch/arm/dts/k3-j721e-r5-sk.dts +9 -38

82 lines not on this page · raw message

Signature · 1 line
2.34.1
#19 lore raw

PATCH v2 7/7 arm: dts: k3-j721e: Sync with v6.5-rc1

In reply to Neha Malcom Francis

Sync k3-j721e DTS with kernel.org v6.5-rc1.

---
 .../k3-j721e-common-proc-board-u-boot.dtsi    | 146 +--
 arch/arm/dts/k3-j721e-common-proc-board.dts   | 483 ++++++---
 arch/arm/dts/k3-j721e-main.dtsi               | 974 ++++++++++++++++--
 arch/arm/dts/k3-j721e-mcu-wakeup.dtsi         | 280 ++++-
 .../arm/dts/k3-j721e-r5-common-proc-board.dts | 302 +-----
 arch/arm/dts/k3-j721e-r5-sk.dts               | 522 +---------
 arch/arm/dts/k3-j721e-sk-u-boot.dtsi          | 177 +---
 arch/arm/dts/k3-j721e-sk.dts                  | 663 +++++++++---
 arch/arm/dts/k3-j721e-som-p0.dtsi             | 226 ++--
 arch/arm/dts/k3-j721e-thermal.dtsi            |  75 ++
 arch/arm/dts/k3-j721e.dtsi                    |  32 +-
 11 files changed, 2365 insertions(+), 1515 deletions(-)
 create mode 100644 arch/arm/dts/k3-j721e-thermal.dtsi
arch/arm/dts/k3-j721e-common-proc-board-u-boot.dtsi +49 -97
index 540c847eb3..4cca01be61 100644
@@ -7,15 +7,7 @@
 #include "k3-j721e-binman.dtsi"
 
 / {
-	chosen {
-		stdout-path = "serial2:115200n8";
-		tick-timer = &timer1;
-	};
-
 	aliases {
-		ethernet0 = &cpsw_port1;
-		spi0 = &ospi0;
-		spi1 = &ospi1;
 		remoteproc0 = &mcu_r5fss0_core0;
 		remoteproc1 = &mcu_r5fss0_core1;
 		remoteproc2 = &main_r5fss0_core0;
@@ -25,61 +17,49 @@
 		remoteproc6 = &c66_0;
 		remoteproc7 = &c66_1;
 		remoteproc8 = &c71_0;
-		i2c0 = &wkup_i2c0;
-		i2c1 = &mcu_i2c0;
-		i2c2 = &mcu_i2c1;
-		i2c3 = &main_i2c0;
 	};
 };
 
-&cbass_main{
+&cbass_main {
 	bootph-pre-ram;
+};
 
-	main_navss: bus@30000000 {
-		bootph-pre-ram;
-	};
+&main_navss {
+	bootph-pre-ram;
 };
 
 &cbass_mcu_wakeup {
 	bootph-pre-ram;
 
-	timer1: timer@40400000 {
-		compatible = "ti,omap5430-timer";
-		reg = <0x0 0x40400000 0x0 0x80>;
-		ti,timer-alwon;
-		clock-frequency = <250000000>;
+	chipid@43000014 {
 		bootph-pre-ram;
 	};
+};
 
-	mcu_navss: bus@28380000 {
-		bootph-pre-ram;
+&mcu_navss {
+	bootph-pre-ram;
+};
 
-		ringacc@2b800000 {
-			reg =	<0x0 0x2b800000 0x0 0x400000>,
-				<0x0 0x2b000000 0x0 0x400000>,
-				<0x0 0x28590000 0x0 0x100>,
-				<0x0 0x2a500000 0x0 0x40000>,
-				<0x0 0x28440000 0x0 0x40000>;
-			reg-names = "rt", "fifos", "proxy_gcfg", "proxy_target", "cfg";
-			bootph-pre-ram;
-		};
-
-		dma-controller@285c0000 {
-			reg =	<0x0 0x285c0000 0x0 0x100>,
-				<0x0 0x284c0000 0x0 0x4000>,
-				<0x0 0x2a800000 0x0 0x40000>,
-				<0x0 0x284a0000 0x0 0x4000>,
-				<0x0 0x2aa00000 0x0 0x40000>,
-				<0x0 0x28400000 0x0 0x2000>;
-			reg-names = "gcfg", "rchan", "rchanrt", "tchan",
-					    "tchanrt", "rflow";
-			bootph-pre-ram;
-		};
-	};
+&mcu_ringacc {
+	reg =	<0x0 0x2b800000 0x0 0x400000>,
+		<0x0 0x2b000000 0x0 0x400000>,
+		<0x0 0x28590000 0x0 0x100>,
+		<0x0 0x2a500000 0x0 0x40000>,
+		<0x0 0x28440000 0x0 0x40000>;
+	reg-names = "rt", "fifos", "proxy_gcfg", "proxy_target", "cfg";
+	bootph-pre-ram;
+};
 
-	chipid@43000014 {
-		bootph-pre-ram;
-	};
+&mcu_udmap {
+	reg =	<0x0 0x285c0000 0x0 0x100>,
+		<0x0 0x284c0000 0x0 0x4000>,
+		<0x0 0x2a800000 0x0 0x40000>,
+		<0x0 0x284a0000 0x0 0x4000>,
+		<0x0 0x2aa00000 0x0 0x40000>,
+		<0x0 0x28400000 0x0 0x2000>;
+	reg-names = "gcfg", "rchan", "rchanrt", "tchan",
+		    "tchanrt", "rflow";
+	bootph-pre-ram;
 };
 
 &secure_proxy_main {
@@ -130,9 +110,16 @@
 	bootph-pre-ram;
 };
 
-&wiz3_pll1_refclk {
-	assigned-clocks = <&wiz3_pll1_refclk>, <&wiz3_pll0_refclk>;
-	assigned-clock-parents = <&k3_clks 295 0>, <&k3_clks 295 9>;
+&wkup_uart0_pins_default {
+	bootph-pre-ram;
+};
+
+&mcu_uart0_pins_default {
+	bootph-pre-ram;
+};
+
+&main_uart0_pins_default {
+	bootph-pre-ram;
 };
 
 &main_usbss0_pins_default {
@@ -148,19 +135,6 @@
 	bootph-pre-ram;
 };
 
-&mcu_cpsw {
-	reg = <0x0 0x46000000 0x0 0x200000>,
-	      <0x0 0x40f00200 0x0 0x2>;
-	reg-names = "cpsw_nuss", "mac_efuse";
-	/delete-property/ ranges;
-
-	cpsw-phy-sel@40f04040 {
-		compatible = "ti,am654-cpsw-phy-sel";
-		reg= <0x0 0x40f04040 0x0 0x4>;
-		reg-names = "gmii-sel";
-	};
-};
-
 &main_mmc1_pins_default {
 	bootph-pre-ram;
 };
@@ -169,8 +143,14 @@
 	bootph-pre-ram;
 };
 
+&wkup_uart0 {
+	bootph-pre-ram;
+	status = "okay";
+};
+
 &wkup_i2c0 {
 	bootph-pre-ram;
+	status = "okay";
 };
 
 &main_i2c0 {
@@ -181,6 +161,10 @@
 	bootph-pre-ram;
 };
 
+&main_esm {
+	bootph-pre-ram;
+};
+
 &exp2 {
 	bootph-pre-ram;
 };
@@ -194,11 +178,7 @@
 };
 
 &hbmc {
-	bootph-pre-ram;
-
-	flash@0,0 {
-		bootph-pre-ram;
-	};
+	status = "disabled";
 };
 
 &hbmc_mux {
@@ -244,31 +224,3 @@
 &main_r5fss1 {
 	ti,cluster-mode = <0>;
 };
-
-&wiz3_pll1_refclk {
-	assigned-clocks = <&wiz3_pll1_refclk>, <&wiz3_pll0_refclk>;
-	assigned-clock-parents = <&k3_clks 295 0>, <&k3_clks 295 9>;
-};
-
-&serdes_ln_ctrl {
-	u-boot,mux-autoprobe;
-};
-
-&usb_serdes_mux {
-	u-boot,mux-autoprobe;
-};
-
-&serdes0 {
-	/delete-property/ assigned-clocks;
-	/delete-property/ assigned-clock-parents;
-};
-
-&serdes0_pcie_link {
-	assigned-clocks = <&serdes0 CDNS_SIERRA_PLL_CMNLC>;
-	assigned-clock-parents = <&wiz0_pll1_refclk>;
-};
-
-&serdes0_qsgmii_link {
-	assigned-clocks = <&serdes0 CDNS_SIERRA_PLL_CMNLC1>;
-	assigned-clock-parents = <&wiz0_pll1_refclk>;
-};
arch/arm/dts/k3-j721e-common-proc-board.dts +344 -139

753 lines not on this page · raw message

arch/arm/dts/k3-j721e-main.dtsi +878 -96

1,378 lines not on this page · raw message

arch/arm/dts/k3-j721e-mcu-wakeup.dtsi +268 -12

367 lines not on this page · raw message

arch/arm/dts/k3-j721e-r5-common-proc-board.dts +22 -280

293 lines not on this page · raw message

arch/arm/dts/k3-j721e-r5-sk.dts +25 -497

522 lines not on this page · raw message

arch/arm/dts/k3-j721e-sk-u-boot.dtsi +41 -136

177 lines not on this page · raw message

arch/arm/dts/k3-j721e-sk.dts +494 -169

663 lines not on this page · raw message

arch/arm/dts/k3-j721e-som-p0.dtsi +157 -69

226 lines not on this page · raw message

arch/arm/dts/k3-j721e-thermal.dtsi new file +75 -0

75 lines not on this page · raw message

arch/arm/dts/k3-j721e.dtsi +12 -20
index f0587fde14..a200810df5 100644

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.34.1

Part of the diff is not shown here. View the raw message.

Reviewed-by on v2 7/7
#20 lore raw

Re: [PATCH v2 7/7] arm: dts: k3-j721e: Sync with v6.5-rc1

Hi Neha,

Quoted 23 lines · Neha Malcom Francis

Sync k3-j721e DTS with kernel.org v6.5-rc1.

---
 .../k3-j721e-common-proc-board-u-boot.dtsi    | 146 +--
 arch/arm/dts/k3-j721e-common-proc-board.dts   | 483 ++++++---
 arch/arm/dts/k3-j721e-main.dtsi               | 974 ++++++++++++++++--
 arch/arm/dts/k3-j721e-mcu-wakeup.dtsi         | 280 ++++-
 .../arm/dts/k3-j721e-r5-common-proc-board.dts | 302 +-----
 arch/arm/dts/k3-j721e-r5-sk.dts               | 522 +---------
 arch/arm/dts/k3-j721e-sk-u-boot.dtsi          | 177 +---
 arch/arm/dts/k3-j721e-sk.dts                  | 663 +++++++++---
 arch/arm/dts/k3-j721e-som-p0.dtsi             | 226 ++--
 arch/arm/dts/k3-j721e-thermal.dtsi            |  75 ++
 arch/arm/dts/k3-j721e.dtsi                    |  32 +-
 11 files changed, 2365 insertions(+), 1515 deletions(-)
 create mode 100644 arch/arm/dts/k3-j721e-thermal.dtsi
arch/arm/dts/k3-j721e-common-proc-board-u-boot.dtsi +0 -0
index 540c847eb3..4cca01be61 100644
@@ -7,15 +7,7 @@

[..]

arch/arm/dts/k3-j721e-common-proc-board-u-boot.dtsi line 19

Quoted 12 lines
arch/arm/dts/k3-j721e-common-proc-board-u-boot.dtsi +0 -4
-
 	aliases {
-		ethernet0 = &cpsw_port1;
-		spi0 = &ospi0;
-		spi1 = &ospi1;
 		remoteproc0 = &mcu_r5fss0_core0;
 		remoteproc1 = &mcu_r5fss0_core1;
 		remoteproc2 = &main_r5fss0_core0;
@@ -25,61 +17,49 @@
 		remoteproc6 = &c66_0;
 		remoteproc7 = &c66_1;
 		remoteproc8 = &c71_0;

I don't think these aliases are used anywhere, they can be removed ig.

Quoted 6 lines
arch/arm/dts/k3-j721e-common-proc-board-u-boot.dtsi +0 -4
-		i2c0 = &wkup_i2c0;
-		i2c1 = &mcu_i2c0;
-		i2c2 = &mcu_i2c1;
-		i2c3 = &main_i2c0;
 	};
 };

[..]

Quoted 4 lines
arch/arm/dts/k3-j721e-common-proc-board.dts +0 -0
index 1b600547c0..c1cbbae761 100644

[..]

Quoted 4 lines
arch/arm/dts/k3-j721e-main.dtsi +0 -0
index cf3482376c..2ded1ee1a8 100644

[..]

arch/arm/dts/k3-j721e-r5-common-proc-board.dts

Quoted 5 lines
arch/arm/dts/k3-j721e-r5-common-proc-board.dts +0 -0
index 7bb5ce775c..0452e94b6d 100644
@@ -12,16 +12,15 @@

-};

arch/arm/dts/k3-j721e-r5-common-proc-board.dts line 66

Quoted 7 lines
arch/arm/dts/k3-j721e-r5-common-proc-board.dts +1 -4
-
-&wkup_uart0 {
+&secure_proxy_mcu {
 	bootph-pre-ram;
-	pinctrl-names = "default";
-	pinctrl-0 = <&wkup_uart0_pins_default>;
 	status = "okay";

Am not sure if this should be okay or did I break something in my series by not setting this as okay, will see what Nishanth has to comment regarding this.

Quoted 31 lines
arch/arm/dts/k3-j721e-r5-common-proc-board.dts +7 -16
 };
 
-&wkup_gpio0 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&wkup_gpio_pins_default>;
+&cbass_mcu_wakeup {
+	sysctrler: sysctrler {
+		bootph-pre-ram;
+		compatible = "ti,am654-system-controller";
+		mboxes= <&secure_proxy_mcu 4>, <&secure_proxy_mcu 5>;
+		mbox-names = "tx", "rx";
+	};
 };
 
 &mcu_uart0 {
-	/delete-property/ power-domains;
-	/delete-property/ clocks;
-	/delete-property/ clock-names;
-	pinctrl-names = "default";
-	pinctrl-0 = <&mcu_uart0_pins_default>;
-	status = "okay";
 	clock-frequency = <48000000>;
 };
 
-&main_uart0 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&main_uart0_pins_default>;
-	status = "okay";
-	power-domains = <&k3_pds 146 TI_SCI_PD_SHARED>;
-};
-

arch/arm/dts/k3-j721e-r5-common-proc-board.dts line 84

Quoted 10 lines
arch/arm/dts/k3-j721e-r5-common-proc-board.dts +1 -7
 &main_sdhci0 {
-	/delete-property/ power-domains;
-	/delete-property/ assigned-clocks;
-	/delete-property/ assigned-clock-parents;
-	clock-names = "clk_xin";
-	clocks = <&clk_200mhz>;
-	ti,driver-strength-ohm = <50>;
-	non-removable;
+	clock-frequency = <200000000>;
 	bus-width = <8>;

This property will need to be removed too I believe.

Quoted 29 lines

};

&main_sdhci1 {

arch/arm/dts/k3-j721e-r5-common-proc-board.dts +1 -18
-	/delete-property/ power-domains;
-	/delete-property/ assigned-clocks;
-	/delete-property/ assigned-clock-parents;
-	pinctrl-names = "default";
-	pinctrl-0 = <&main_mmc1_pins_default>;
-	clock-names = "clk_xin";
-	clocks = <&clk_200mhz>;
-	ti,driver-strength-ohm = <50>;
+	clock-frequency = <19200000>;
 };
 
 &wkup_i2c0 {
@@ -293,96 +124,35 @@
 };
 
 &usbss0 {
-	/delete-property/ power-domains;
-	/delete-property/ assigned-clocks;
-	/delete-property/ assigned-clock-parents;
-	clocks = <&clk_19_2mhz>;
-	clock-names = "ref";
-	pinctrl-names = "default";
-	pinctrl-0 = <&main_usbss0_pins_default>;
-	ti,vbus-divider;
-};
-

[..]

arch/arm/dts/k3-j721e-r5-sk.dts

Quoted 4 lines
arch/arm/dts/k3-j721e-r5-sk.dts +0 -0
index 1cc64d07f7..f5eb29a861 100644

With the above comments.

Regards,
Manorit

#21 lore raw

Re: [PATCH v2 7/7] arm: dts: k3-j721e: Sync with v6.5-rc1

Hi Manorit

Quoted 27 lines · Manorit Chawdhry

Hi Neha,

Quoted 23 lines · Neha Malcom Francis

Sync k3-j721e DTS with kernel.org v6.5-rc1.

---
  .../k3-j721e-common-proc-board-u-boot.dtsi    | 146 +--
  arch/arm/dts/k3-j721e-common-proc-board.dts   | 483 ++++++---
  arch/arm/dts/k3-j721e-main.dtsi               | 974 ++++++++++++++++--
  arch/arm/dts/k3-j721e-mcu-wakeup.dtsi         | 280 ++++-
  .../arm/dts/k3-j721e-r5-common-proc-board.dts | 302 +-----
  arch/arm/dts/k3-j721e-r5-sk.dts               | 522 +---------
  arch/arm/dts/k3-j721e-sk-u-boot.dtsi          | 177 +---
  arch/arm/dts/k3-j721e-sk.dts                  | 663 +++++++++---
  arch/arm/dts/k3-j721e-som-p0.dtsi             | 226 ++--
  arch/arm/dts/k3-j721e-thermal.dtsi            |  75 ++
  arch/arm/dts/k3-j721e.dtsi                    |  32 +-
  11 files changed, 2365 insertions(+), 1515 deletions(-)

create mode 100644 arch/arm/dts/k3-j721e-thermal.dtsi

arch/arm/dts/k3-j721e-common-proc-board-u-boot.dtsi +0 -0
index 540c847eb3..4cca01be61 100644
@@ -7,15 +7,7 @@

[..]

Quoted 15 lines

arch/arm/dts/k3-j721e-common-proc-board-u-boot.dtsi line 19

Quoted 12 lines
arch/arm/dts/k3-j721e-common-proc-board-u-boot.dtsi +0 -4
-
  	aliases {
-		ethernet0 = &cpsw_port1;
-		spi0 = &ospi0;
-		spi1 = &ospi1;
  		remoteproc0 = &mcu_r5fss0_core0;
  		remoteproc1 = &mcu_r5fss0_core1;
  		remoteproc2 = &main_r5fss0_core0;
@@ -25,61 +17,49 @@
  		remoteproc6 = &c66_0;
  		remoteproc7 = &c66_1;
  		remoteproc8 = &c71_0;

I don't think these aliases are used anywhere, they can be removed ig.

I kept them from v1 review comment by Nishanth that remoteproc aliases have not been taken in upstream kernel [1]

Quoted 28 lines
Quoted 6 lines
arch/arm/dts/k3-j721e-common-proc-board-u-boot.dtsi +0 -4
-		i2c0 = &wkup_i2c0;
-		i2c1 = &mcu_i2c0;
-		i2c2 = &mcu_i2c1;
-		i2c3 = &main_i2c0;
  	};
  };

[..]

Quoted 4 lines
arch/arm/dts/k3-j721e-common-proc-board.dts +0 -0
index 1b600547c0..c1cbbae761 100644

[..]

Quoted 4 lines
arch/arm/dts/k3-j721e-main.dtsi +0 -0
index cf3482376c..2ded1ee1a8 100644

[..]

arch/arm/dts/k3-j721e-r5-common-proc-board.dts

Quoted 5 lines
arch/arm/dts/k3-j721e-r5-common-proc-board.dts +0 -0
index 7bb5ce775c..0452e94b6d 100644
@@ -12,16 +12,15 @@

-};

Quoted 12 lines

arch/arm/dts/k3-j721e-r5-common-proc-board.dts line 66

Quoted 7 lines
arch/arm/dts/k3-j721e-r5-common-proc-board.dts +1 -4
-
-&wkup_uart0 {
+&secure_proxy_mcu {
  	bootph-pre-ram;
-	pinctrl-names = "default";
-	pinctrl-0 = <&wkup_uart0_pins_default>;
  	status = "okay";

Am not sure if this should be okay or did I break something in my series by not setting this as okay, will see what Nishanth has to comment regarding this.

Looking at k3-j721e-r5-common-proc-board.dts before sync, I see that the status was set to okay. I will look into whether it's in use any where or not.

Quoted 35 lines
Quoted 35 lines
arch/arm/dts/k3-j721e-r5-common-proc-board.dts +7 -19
  };
 
-&wkup_gpio0 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&wkup_gpio_pins_default>;
+&cbass_mcu_wakeup {
+	sysctrler: sysctrler {
+		bootph-pre-ram;
+		compatible = "ti,am654-system-controller";
+		mboxes= <&secure_proxy_mcu 4>, <&secure_proxy_mcu 5>;
+		mbox-names = "tx", "rx";
+	};
  };
 
  &mcu_uart0 {
-	/delete-property/ power-domains;
-	/delete-property/ clocks;
-	/delete-property/ clock-names;
-	pinctrl-names = "default";
-	pinctrl-0 = <&mcu_uart0_pins_default>;
-	status = "okay";
  	clock-frequency = <48000000>;
  };
 
-&main_uart0 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&main_uart0_pins_default>;
-	status = "okay";
-	power-domains = <&k3_pds 146 TI_SCI_PD_SHARED>;
-};
-
  &main_sdhci0 {
-	/delete-property/ power-domains;
-	/delete-property/ assigned-clocks;
-	/delete-property/ assigned-clock-parents;
Quoted 9 lines

arch/arm/dts/k3-j721e-r5-common-proc-board.dts line 84

Quoted 6 lines
arch/arm/dts/k3-j721e-r5-common-proc-board.dts +1 -4
-	clock-names = "clk_xin";
-	clocks = <&clk_200mhz>;
-	ti,driver-strength-ohm = <50>;
-	non-removable;
+	clock-frequency = <200000000>;
  	bus-width = <8>;

This property will need to be removed too I believe.

Yes I see it's not used in the U-Boot driver, will remove it.

Quoted 31 lines
Quoted 29 lines
  };
  
  &main_sdhci1 {
arch/arm/dts/k3-j721e-r5-common-proc-board.dts +1 -18
-	/delete-property/ power-domains;
-	/delete-property/ assigned-clocks;
-	/delete-property/ assigned-clock-parents;
-	pinctrl-names = "default";
-	pinctrl-0 = <&main_mmc1_pins_default>;
-	clock-names = "clk_xin";
-	clocks = <&clk_200mhz>;
-	ti,driver-strength-ohm = <50>;
+	clock-frequency = <19200000>;
  };
 
  &wkup_i2c0 {
@@ -293,96 +124,35 @@
  };
 
  &usbss0 {
-	/delete-property/ power-domains;
-	/delete-property/ assigned-clocks;
-	/delete-property/ assigned-clock-parents;
-	clocks = <&clk_19_2mhz>;
-	clock-names = "ref";
-	pinctrl-names = "default";
-	pinctrl-0 = <&main_usbss0_pins_default>;
-	ti,vbus-divider;
-};
-

[..]

Quoted 9 lines

arch/arm/dts/k3-j721e-r5-sk.dts

Quoted 4 lines
arch/arm/dts/k3-j721e-r5-sk.dts +0 -0
index 1cc64d07f7..f5eb29a861 100644

With the above comments.

Thanks for the review!

Quoted 2 lines

Regards,
Manorit

[1] https://lore.kernel.org/lkml/20230822215042.yjaqtwhuhls57pbu@glamour/T/

Signature · 2 lines
Thanking You
Neha Malcom Francis
maintainer
#22 lore raw

Re: [PATCH v2 7/7] arm: dts: k3-j721e: Sync with v6.5-rc1

In reply to Neha Malcom Francis
Quoted 39 lines · Neha Malcom Francis

Sync k3-j721e DTS with kernel.org v6.5-rc1.

---
 .../k3-j721e-common-proc-board-u-boot.dtsi    | 146 +--
 arch/arm/dts/k3-j721e-common-proc-board.dts   | 483 ++++++---
 arch/arm/dts/k3-j721e-main.dtsi               | 974 ++++++++++++++++--
 arch/arm/dts/k3-j721e-mcu-wakeup.dtsi         | 280 ++++-
 .../arm/dts/k3-j721e-r5-common-proc-board.dts | 302 +-----
 arch/arm/dts/k3-j721e-r5-sk.dts               | 522 +---------
 arch/arm/dts/k3-j721e-sk-u-boot.dtsi          | 177 +---
 arch/arm/dts/k3-j721e-sk.dts                  | 663 +++++++++---
 arch/arm/dts/k3-j721e-som-p0.dtsi             | 226 ++--
 arch/arm/dts/k3-j721e-thermal.dtsi            |  75 ++
 arch/arm/dts/k3-j721e.dtsi                    |  32 +-
 11 files changed, 2365 insertions(+), 1515 deletions(-)
 create mode 100644 arch/arm/dts/k3-j721e-thermal.dtsi
arch/arm/dts/k3-j721e-common-proc-board-u-boot.dtsi +0 -8
index 540c847eb3..4cca01be61 100644
@@ -7,15 +7,7 @@
 #include "k3-j721e-binman.dtsi"
 
 / {
-	chosen {
-		stdout-path = "serial2:115200n8";
-		tick-timer = &timer1;
-	};
-
 	aliases {
-		ethernet0 = &cpsw_port1;
-		spi0 = &ospi0;
-		spi1 = &ospi1;
 		remoteproc0 = &mcu_r5fss0_core0;
 		remoteproc1 = &mcu_r5fss0_core1;
 		remoteproc2 = &main_r5fss0_core0;

arch/arm/dts/k3-j721e-common-proc-board-u-boot.dtsi line 20

Quoted 8 lines
arch/arm/dts/k3-j721e-common-proc-board-u-boot.dtsi +0 -4
@@ -25,61 +17,49 @@
 		remoteproc6 = &c66_0;
 		remoteproc7 = &c66_1;
 		remoteproc8 = &c71_0;
-		i2c0 = &wkup_i2c0;
-		i2c1 = &mcu_i2c0;
-		i2c2 = &mcu_i2c1;
-		i2c3 = &main_i2c0;
 	};

As Manorit mentioned, drop the aliases

[...]

arch/arm/dts/k3-j721e-r5-common-proc-board.dts line 12

Quoted 6 lines
arch/arm/dts/k3-j721e-r5-common-proc-board.dts +0 -0
index 7bb5ce775c..0452e94b6d 100644
@@ -12,16 +12,15 @@
 #include <dt-bindings/phy/phy-cadence.h>

What are you using from phy-cadence.h?

Quoted 1 line

This file has:
* tps659413 -> Should come in from upstream kernel please.
* flash@0 -> are intentionally changing properties here? if so document why - same with ospi nodes (reg)
* hbmc is still retained. Though the node is disabled in u-boot.dtsi

[...]

arch/arm/dts/k3-j721e-r5-sk.dts line 17

Quoted 13 lines
arch/arm/dts/k3-j721e-r5-sk.dts +3 -1
index 1cc64d07f7..f5eb29a861 100644
@@ -11,151 +11,13 @@
 #include "k3-j721e-sk-u-boot.dtsi"
 
 / {
-	model = "Texas Instruments J721E SK R5";
+	chosen {
+		tick-timer = &mcu_timer0;
+	};
 

we have tps659412 defined here - should have come in from upstream kernel.org
[...]

arch/arm/dts/k3-j721e-r5-sk.dts line 18

Quoted 1 line
arch/arm/dts/k3-j721e-r5-sk.dts +0 -0
 	flash@0{
	please fix that space before {

arch/arm/dts/k3-j721e-r5-sk.dts line 134

Quoted 11 lines
arch/arm/dts/k3-j721e-r5-sk.dts +0 -10
-		compatible = "jedec,spi-nor";
-		reg = <0x0>;
-		spi-tx-bus-width = <8>;
-		spi-rx-bus-width = <8>;
-		spi-max-frequency = <25000000>;
-		cdns,tshsl-ns = <60>;
-		cdns,tsd2d-ns = <60>;
-		cdns,tchsh-ns = <60>;
-		cdns,tslch-ns = <60>;
-		cdns,read-delay = <4>;
 		cdns,phy-mode;

Why do we need this anymore?

Quoted 4 lines
arch/arm/dts/k3-j721e-r5-sk.dts +0 -0
 		#address-cells = <1>;
 		#size-cells = <1>;
 	};
 };

[...]

arch/arm/dts/k3-j721e-sk-u-boot.dtsi line 7

Quoted 6 lines
arch/arm/dts/k3-j721e-sk-u-boot.dtsi +0 -0
index 205dacff4d..e4bd71913c 100644
@@ -7,14 +7,7 @@
 #include "k3-j721e-binman.dtsi"

You dont need to include ti-dp83867.h anymore.

Quoted 14 lines
arch/arm/dts/k3-j721e-sk-u-boot.dtsi +0 -7
 / {
-	chosen {
-		stdout-path = "serial2:115200n8";
-		tick-timer = &timer1;
-	};
-
 	aliases {
-		ethernet0 = &cpsw_port1;
-		spi0 = &ospi0;
 		remoteproc0 = &mcu_r5fss0_core0;
 		remoteproc1 = &mcu_r5fss0_core1;
 		remoteproc2 = &main_r5fss0_core0;

arch/arm/dts/k3-j721e-sk-u-boot.dtsi line 30

Quoted 7 lines
arch/arm/dts/k3-j721e-sk-u-boot.dtsi +0 -4
@@ -24,61 +17,49 @@
 		remoteproc6 = &c66_0;
 		remoteproc7 = &c66_1;
 		remoteproc8 = &c71_0;
-		i2c0 = &wkup_i2c0;
-		i2c1 = &mcu_i2c0;
-		i2c2 = &main_i2c0;
-		mmc1 = &main_sdhci1;  /* SD Card */

Same comment as before - drop all these aliases.

[...]

Quoted 13 lines
arch/arm/dts/k3-j721e-sk-u-boot.dtsi +11 -1
+&mcu_ringacc {
+	reg =	<0x0 0x2b800000 0x0 0x400000>,
+		<0x0 0x2b000000 0x0 0x400000>,
+		<0x0 0x28590000 0x0 0x100>,
+		<0x0 0x2a500000 0x0 0x40000>,
+		<0x0 0x28440000 0x0 0x40000>;
+		reg-names = "rt", "fifos", "proxy_gcfg", "proxy_target", "cfg";
+		bootph-pre-ram;
+};
 
-	chipid@43000014 {
+&mcu_udmap {
+	reg =	<0x0 0x285c0000 0x0 0x100>,

arch/arm/dts/k3-j721e-sk-u-boot.dtsi line 63

Quoted 10 lines
arch/arm/dts/k3-j721e-sk-u-boot.dtsi +7 -1
+		<0x0 0x284c0000 0x0 0x4000>,
+		<0x0 0x2a800000 0x0 0x40000>,
+		<0x0 0x284a0000 0x0 0x4000>,
+		<0x0 0x2aa00000 0x0 0x40000>,
+		<0x0 0x28400000 0x0 0x2000>;
+		reg-names = "gcfg", "rchan", "rchanrt", "tchan",
+			    "tchanrt", "rflow";
 		bootph-pre-ram;
-	};
 };

NOTE: v6.6-rc1 has been tagged yesterday - so it is probably time for us to sync with that and drop these.

[...]

Signature · 3 lines
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D
#23 lore raw

Re: [PATCH v2 7/7] arm: dts: k3-j721e: Sync with v6.5-rc1

Hi Nishanth

Quoted 173 lines · Nishanth Menon
Quoted 39 lines · Neha Malcom Francis

Sync k3-j721e DTS with kernel.org v6.5-rc1.

---
  .../k3-j721e-common-proc-board-u-boot.dtsi    | 146 +--
  arch/arm/dts/k3-j721e-common-proc-board.dts   | 483 ++++++---
  arch/arm/dts/k3-j721e-main.dtsi               | 974 ++++++++++++++++--
  arch/arm/dts/k3-j721e-mcu-wakeup.dtsi         | 280 ++++-
  .../arm/dts/k3-j721e-r5-common-proc-board.dts | 302 +-----
  arch/arm/dts/k3-j721e-r5-sk.dts               | 522 +---------
  arch/arm/dts/k3-j721e-sk-u-boot.dtsi          | 177 +---
  arch/arm/dts/k3-j721e-sk.dts                  | 663 +++++++++---
  arch/arm/dts/k3-j721e-som-p0.dtsi             | 226 ++--
  arch/arm/dts/k3-j721e-thermal.dtsi            |  75 ++
  arch/arm/dts/k3-j721e.dtsi                    |  32 +-
  11 files changed, 2365 insertions(+), 1515 deletions(-)

create mode 100644 arch/arm/dts/k3-j721e-thermal.dtsi

arch/arm/dts/k3-j721e-common-proc-board-u-boot.dtsi +0 -8
index 540c847eb3..4cca01be61 100644
@@ -7,15 +7,7 @@
  #include "k3-j721e-binman.dtsi"
 
  / {
-	chosen {
-		stdout-path = "serial2:115200n8";
-		tick-timer = &timer1;
-	};
-
  	aliases {
-		ethernet0 = &cpsw_port1;
-		spi0 = &ospi0;
-		spi1 = &ospi1;
  		remoteproc0 = &mcu_r5fss0_core0;
  		remoteproc1 = &mcu_r5fss0_core1;
  		remoteproc2 = &main_r5fss0_core0;

arch/arm/dts/k3-j721e-common-proc-board-u-boot.dtsi line 20

Quoted 8 lines
arch/arm/dts/k3-j721e-common-proc-board-u-boot.dtsi +0 -4
@@ -25,61 +17,49 @@
  		remoteproc6 = &c66_0;
  		remoteproc7 = &c66_1;
  		remoteproc8 = &c71_0;
-		i2c0 = &wkup_i2c0;
-		i2c1 = &mcu_i2c0;
-		i2c2 = &mcu_i2c1;
-		i2c3 = &main_i2c0;
  	};

As Manorit mentioned, drop the aliases

[...]

arch/arm/dts/k3-j721e-r5-common-proc-board.dts line 12

Quoted 6 lines
arch/arm/dts/k3-j721e-r5-common-proc-board.dts +0 -0
index 7bb5ce775c..0452e94b6d 100644
@@ -12,16 +12,15 @@
  #include <dt-bindings/phy/phy-cadence.h>

What are you using from phy-cadence.h?

Quoted 1 line

This file has:
* tps659413 -> Should come in from upstream kernel please.
* flash@0 -> are intentionally changing properties here? if so document why - same with ospi nodes (reg)
* hbmc is still retained. Though the node is disabled in u-boot.dtsi

[...]

arch/arm/dts/k3-j721e-r5-sk.dts line 17

Quoted 13 lines
arch/arm/dts/k3-j721e-r5-sk.dts +3 -1
index 1cc64d07f7..f5eb29a861 100644
@@ -11,151 +11,13 @@
  #include "k3-j721e-sk-u-boot.dtsi"
 
  / {
-	model = "Texas Instruments J721E SK R5";
+	chosen {
+		tick-timer = &mcu_timer0;
+	};
 

we have tps659412 defined here - should have come in from upstream kernel.org
[...]

arch/arm/dts/k3-j721e-r5-sk.dts line 18

Quoted 1 line
arch/arm/dts/k3-j721e-r5-sk.dts +0 -0
  	flash@0{
	please fix that space before {

arch/arm/dts/k3-j721e-r5-sk.dts line 134

Quoted 11 lines
arch/arm/dts/k3-j721e-r5-sk.dts +0 -10
-		compatible = "jedec,spi-nor";
-		reg = <0x0>;
-		spi-tx-bus-width = <8>;
-		spi-rx-bus-width = <8>;
-		spi-max-frequency = <25000000>;
-		cdns,tshsl-ns = <60>;
-		cdns,tsd2d-ns = <60>;
-		cdns,tchsh-ns = <60>;
-		cdns,tslch-ns = <60>;
-		cdns,read-delay = <4>;
  		cdns,phy-mode;

Why do we need this anymore?

Quoted 4 lines
arch/arm/dts/k3-j721e-r5-sk.dts +0 -0
  		#address-cells = <1>;
  		#size-cells = <1>;
  	};
  };

[...]

arch/arm/dts/k3-j721e-sk-u-boot.dtsi line 7

Quoted 6 lines
arch/arm/dts/k3-j721e-sk-u-boot.dtsi +0 -0
index 205dacff4d..e4bd71913c 100644
@@ -7,14 +7,7 @@
  #include "k3-j721e-binman.dtsi"

You dont need to include ti-dp83867.h anymore.

Quoted 14 lines
arch/arm/dts/k3-j721e-sk-u-boot.dtsi +0 -7
  / {
-	chosen {
-		stdout-path = "serial2:115200n8";
-		tick-timer = &timer1;
-	};
-
  	aliases {
-		ethernet0 = &cpsw_port1;
-		spi0 = &ospi0;
  		remoteproc0 = &mcu_r5fss0_core0;
  		remoteproc1 = &mcu_r5fss0_core1;
  		remoteproc2 = &main_r5fss0_core0;

arch/arm/dts/k3-j721e-sk-u-boot.dtsi line 30

Quoted 7 lines
arch/arm/dts/k3-j721e-sk-u-boot.dtsi +0 -4
@@ -24,61 +17,49 @@
  		remoteproc6 = &c66_0;
  		remoteproc7 = &c66_1;
  		remoteproc8 = &c71_0;
-		i2c0 = &wkup_i2c0;
-		i2c1 = &mcu_i2c0;
-		i2c2 = &main_i2c0;
-		mmc1 = &main_sdhci1;  /* SD Card */

Same comment as before - drop all these aliases.

[...]

Quoted 13 lines
arch/arm/dts/k3-j721e-sk-u-boot.dtsi +11 -1
+&mcu_ringacc {
+	reg =	<0x0 0x2b800000 0x0 0x400000>,
+		<0x0 0x2b000000 0x0 0x400000>,
+		<0x0 0x28590000 0x0 0x100>,
+		<0x0 0x2a500000 0x0 0x40000>,
+		<0x0 0x28440000 0x0 0x40000>;
+		reg-names = "rt", "fifos", "proxy_gcfg", "proxy_target", "cfg";
+		bootph-pre-ram;
+};
 
-	chipid@43000014 {
+&mcu_udmap {
+	reg =	<0x0 0x285c0000 0x0 0x100>,

arch/arm/dts/k3-j721e-sk-u-boot.dtsi line 63

Quoted 10 lines
arch/arm/dts/k3-j721e-sk-u-boot.dtsi +7 -1
+		<0x0 0x284c0000 0x0 0x4000>,
+		<0x0 0x2a800000 0x0 0x40000>,
+		<0x0 0x284a0000 0x0 0x4000>,
+		<0x0 0x2aa00000 0x0 0x40000>,
+		<0x0 0x28400000 0x0 0x2000>;
+		reg-names = "gcfg", "rchan", "rchanrt", "tchan",
+			    "tchanrt", "rflow";
  		bootph-pre-ram;
-	};
  };

NOTE: v6.6-rc1 has been tagged yesterday - so it is probably time for us to sync with that and drop these.

Quoted 1 line

[...]

Thanks for all the comments, I'll take these into account and also sync with v6.6-rc1 for v3.

Quoted 1 line
Signature · 2 lines
Thanking You
Neha Malcom Francis
#24 lore raw

Re: [PATCH v2 7/7] arm: dts: k3-j721e: Sync with v6.5-rc1

In reply to Nishanth Menon

Hi Nishanth

Quoted 4 lines · Nishanth Menon
Quoted 3 lines · Neha Malcom Francis

Sync k3-j721e DTS with kernel.org v6.5-rc1.

[...]

Quoted 3 lines

This file has:
* tps659413 -> Should come in from upstream kernel please.

[...]

Quoted 5 lines
Quoted 1 line

we have tps659412 defined here - should have come in from upstream kernel.org
[...]

Regarding the PMIC nodes, these have not yet been upstreamed, effort is ongoing [1]. Will move these out from U-Boot once they have been merged.

[1] https://lore.kernel.org/all/[email protected]/

Signature · 2 lines
Thanking You
Neha Malcom Francis