Skip to contentSkip to conversation

arm64: dts: ti: use ti,am62-mcan compatible for m_can devices

PATCH New Kendall Willis 2 participants 7 messages Sep 12

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

v3 cover arm64: dts: ti: use ti,am62-mcan compatible for m_can devices

This series prepends "ti,am62-mcan" compatible to the m_can devices in the TI AM62 family of devices. By adding this compatible, this series adds out-of-band wakeup support for m_can devices.

Dependency
----------
This series depends on the "can: m_can: introduce ti,am62-mcan compatible for out-of-band wakeup" [1] series which implements the "ti,am62-mcan" compatible in the m_can driver and dt bindings.

Testing
-------
Tested suspend/resume with CAN wakeup on AM62P SK EVM.

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

---
Changes in v3:
- Renamed compatible from "ti,am62-m_can" to "ti,am62-mcan".
- Extended coverage to main domain m_can nodes in addition to MCU domain nodes.
- Link to v2: https://lore.kernel.org/r/[email protected]

Changes in v2:
- Removed "out-band-wakeup" device tree property.
- Add "ti,am62-m_can" compatible to m_can devices.
- Link to v1: https://lore.kernel.org/r/[email protected]

---
Kendall Willis (3):
arm64: dts: ti: k3-am62: use ti,am62-mcan compatible for m_can devices
arm64: dts: ti: k3-am62a: use ti,am62-mcan compatible for m_can devices
arm64: dts: ti: k3-am62p: use ti,am62-mcan compatible for m_can devices

 arch/arm64/boot/dts/ti/k3-am62-main.dtsi               | 2 +-
 arch/arm64/boot/dts/ti/k3-am62-mcu.dtsi                | 4 ++--
 arch/arm64/boot/dts/ti/k3-am62a-main.dtsi              | 2 +-
 arch/arm64/boot/dts/ti/k3-am62a-mcu.dtsi               | 4 ++--
 arch/arm64/boot/dts/ti/k3-am62p-j722s-common-main.dtsi | 4 ++--
 arch/arm64/boot/dts/ti/k3-am62p-j722s-common-mcu.dtsi  | 4 ++--
 6 files changed, 10 insertions(+), 10 deletions(-)

---
base-commit: df2908090cda368b01ff43709f51890076c56157
change-id: 20260819-smth-6fb189fc148f

Best regards,

Signature · 1 line
Kendall Willis <[email protected]>
#1 lore raw

PATCH v3 1/3 arm64: dts: ti: k3-am62: use ti,am62-mcan compatible for m_can devices

Prepend "ti,am62-mcan" to the m_can device compatible property since this compatible adds out-of-band wakeup functionality. The m_can pins can be a wakeup source in the deepest low power states, despite being in power domains which are OFF during deeper low power states since it has the out-of-band wakeup capability.

---
 arch/arm64/boot/dts/ti/k3-am62-main.dtsi | 2 +-
 arch/arm64/boot/dts/ti/k3-am62-mcu.dtsi  | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
arch/arm64/boot/dts/ti/k3-am62-main.dtsi +1 -1
index c5ee263d34a62ef46b416ffa45bc2ec5c28d010a..4c7e793d84a0e0f2ad3084ae41ae7ba97e8e2b62 100644
@@ -933,7 +933,7 @@ eqep2: counter@23220000 {
 	};
 
 	main_mcan0: can@20701000 {
-		compatible = "bosch,m_can";
+		compatible = "ti,am62-mcan", "bosch,m_can";
 		reg = <0x00 0x20701000 0x00 0x200>,
 		      <0x00 0x20708000 0x00 0x8000>;
 		reg-names = "m_can", "message_ram";
arch/arm64/boot/dts/ti/k3-am62-mcu.dtsi +2 -2
index 68e906796aefebc5eaaa5a231e56105a9cdd13e5..a21e3b889159b2ed8ea05af8543a589e96ff143d 100644
@@ -152,7 +152,7 @@ mcu_rti0: watchdog@4880000 {
 	};
 
 	mcu_mcan0: can@4e08000 {
-		compatible = "bosch,m_can";
+		compatible = "ti,am62-mcan", "bosch,m_can";
 		reg = <0x00 0x4e08000 0x00 0x200>,
 		      <0x00 0x4e00000 0x00 0x8000>;
 		reg-names = "m_can", "message_ram";
@@ -164,7 +164,7 @@ mcu_mcan0: can@4e08000 {
 	};
 
 	mcu_mcan1: can@4e18000 {
-		compatible = "bosch,m_can";
+		compatible = "ti,am62-mcan", "bosch,m_can";
 		reg = <0x00 0x4e18000 0x00 0x200>,
 		      <0x00 0x4e10000 0x00 0x8000>;
 		reg-names = "m_can", "message_ram";
Signature · 1 line
2.34.1
#2 lore raw

Re: [PATCH v3 1/3] arm64: dts: ti: k3-am62: use ti,am62-mcan compatible for m_can devices

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Low] The compatible string 'ti,am62-mcan' is used in the device tree but is not documented in the…

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The compatible string 'ti,am62-mcan' is used in the device tree but is not documented in the dt-bindings, causing dtbs validation failures. --

commit 38209444ad0c4e93f314506da051123caab882d5
Author: Kendall Willis <[email protected]>

arm64: dts: ti: k3-am62: use ti,am62-mcan compatible for m_can devices

This commit prepends the ti,am62-mcan compatible string to m_can devices in the AM62 device trees to indicate out-of-band wakeup capabilities.

arch/arm64/boot/dts/ti/k3-am62-main.dtsi eqep2: counter@23220000 { · line 936

Quoted 10 lines
arch/arm64/boot/dts/ti/k3-am62-main.dtsi +1 -1
index c5ee263d34a62..4c7e793d84a0e 100644
@@ -933,7 +933,7 @@ eqep2: counter@23220000 {
 	};
 
 	main_mcan0: can@20701000 {
-		compatible = "bosch,m_can";
+		compatible = "ti,am62-mcan", "bosch,m_can";

[Severity: Low]
Is the ti,am62-mcan compatible string documented in the dt-bindings?

Running make dtbs_check on the generated device trees for k3-am62 platforms will fail validation because the dt-binding for bosch,m_can strictly requires the compatible property to be const: bosch,m_can and does not accept the new ti,am62-mcan string or an array of strings.

Does this patch depend on a separate dt-bindings update that needs to be applied first, or should the bosch,m_can binding be updated alongside this change?

[ ... ]

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
#3 lore raw

PATCH v3 2/3 arm64: dts: ti: k3-am62a: use ti,am62-mcan compatible for m_can devices

In reply to Kendall Willis

Prepend "ti,am62-mcan" to the m_can device compatible property since this compatible adds out-of-band wakeup functionality. The m_can pins can be a wakeup source in the deepest low power states, despite being in power domains which are OFF during deeper low power states since it has the out-of-band wakeup capability.

---
 arch/arm64/boot/dts/ti/k3-am62a-main.dtsi | 2 +-
 arch/arm64/boot/dts/ti/k3-am62a-mcu.dtsi  | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
arch/arm64/boot/dts/ti/k3-am62a-main.dtsi +1 -1
index 9e5b75a4e88e23c74270b667a0a02d5efd931532..1552029fe4d4945b8fbe87792719c7ec7335bebb 100644
@@ -848,7 +848,7 @@ mailbox0_cluster3: mailbox@29030000 {
 	};
 
 	main_mcan0: can@20701000 {
-		compatible = "bosch,m_can";
+		compatible = "ti,am62-mcan", "bosch,m_can";
 		reg = <0x00 0x20701000 0x00 0x200>,
 		      <0x00 0x20708000 0x00 0x8000>;
 		reg-names = "m_can", "message_ram";
arch/arm64/boot/dts/ti/k3-am62a-mcu.dtsi +2 -2
index d22caa7c346b35dcb11163a5e73e17790ff751dd..b9a66e884434132dbfe93811578ca436e8c6103f 100644
@@ -152,7 +152,7 @@ mcu_rti0: watchdog@4880000 {
 	};
 
 	mcu_mcan0: can@4e08000 {
-		compatible = "bosch,m_can";
+		compatible = "ti,am62-mcan", "bosch,m_can";
 		reg = <0x00 0x4e08000 0x00 0x200>,
 		      <0x00 0x4e00000 0x00 0x8000>;
 		reg-names = "m_can", "message_ram";
@@ -164,7 +164,7 @@ mcu_mcan0: can@4e08000 {
 	};
 
 	mcu_mcan1: can@4e18000 {
-		compatible = "bosch,m_can";
+		compatible = "ti,am62-mcan", "bosch,m_can";
 		reg = <0x00 0x4e18000 0x00 0x200>,
 		      <0x00 0x4e10000 0x00 0x8000>;
 		reg-names = "m_can", "message_ram";
Signature · 1 line
2.34.1
#4 lore raw

Re: [PATCH v3 2/3] arm64: dts: ti: k3-am62a: use ti,am62-mcan compatible for m_can devices

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Low] The newly added devicetree compatible string 'ti,am62-mcan' is undocumented in the DT bindings…

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The newly added devicetree compatible string 'ti,am62-mcan' is undocumented in the DT bindings, causing schema validation violations. --

commit 92a95f8fe8cc6fc6551c41c8019698e288ff900b
Author: Kendall Willis <[email protected]>

arm64: dts: ti: k3-am62a: use ti,am62-mcan compatible for m_can devices

Prepends the "ti,am62-mcan" compatible to the m_can devices in the k3-am62a-main and k3-am62a-mcu device trees to support out-of-band wakeup. This enables the m_can pins to serve as wakeup sources even when power domains are off during deep low power states.

arch/arm64/boot/dts/ti/k3-am62a-main.dtsi mailbox0_cluster3: mailbox@29030000 { · line 851

Quoted 10 lines
arch/arm64/boot/dts/ti/k3-am62a-main.dtsi +1 -1
index 9e5b75a4e88e2..1552029fe4d49 100644
@@ -848,7 +848,7 @@ mailbox0_cluster3: mailbox@29030000 {
 	};
 
 	main_mcan0: can@20701000 {
-		compatible = "bosch,m_can";
+		compatible = "ti,am62-mcan", "bosch,m_can";

[Severity: Low]
Does this new compatible string cause schema validation regressions during dtbs_check? It appears that "ti,am62-mcan" has not been added to the DT bindings documentation.

Quoted 2 lines
arch/arm64/boot/dts/ti/k3-am62a-main.dtsi +0 -0
 		reg = <0x00 0x20701000 0x00 0x200>,
 		      <0x00 0x20708000 0x00 0x8000>;

[ ... ]

arch/arm64/boot/dts/ti/k3-am62a-mcu.dtsi mcu_rti0: watchdog@4880000 { · line 155

Quoted 10 lines
arch/arm64/boot/dts/ti/k3-am62a-mcu.dtsi +1 -1
index d22caa7c346b3..b9a66e8844341 100644
@@ -152,7 +152,7 @@ mcu_rti0: watchdog@4880000 {
 	};
 
 	mcu_mcan0: can@4e08000 {
-		compatible = "bosch,m_can";
+		compatible = "ti,am62-mcan", "bosch,m_can";

[Severity: Low]
Are we missing a corresponding update to the bosch,m_can.yaml binding file to document this new string for mcu_mcan0 and mcu_mcan1 as well?

Quoted 3 lines
arch/arm64/boot/dts/ti/k3-am62a-mcu.dtsi +0 -0
 		reg = <0x00 0x4e08000 0x00 0x200>,
 		      <0x00 0x4e00000 0x00 0x8000>;
 		reg-names = "m_can", "message_ram";
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=2
#5 lore raw

PATCH v3 3/3 arm64: dts: ti: k3-am62p: use ti,am62-mcan compatible for m_can devices

In reply to Kendall Willis

Prepend "ti,am62-mcan" to the m_can device compatible property since this compatible adds out-of-band wakeup functionality. The m_can pins can be a wakeup source in the deepest low power states, despite being in power domains which are OFF during deeper low power states since it has the out-of-band wakeup capability.

---
 arch/arm64/boot/dts/ti/k3-am62p-j722s-common-main.dtsi | 4 ++--
 arch/arm64/boot/dts/ti/k3-am62p-j722s-common-mcu.dtsi  | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
arch/arm64/boot/dts/ti/k3-am62p-j722s-common-main.dtsi +2 -2
index f130c7cb998d797f918e5017b4434496dca6067c..9e8d9246f61699c0788a50d21c1f3fd0f39b1741 100644
@@ -883,7 +883,7 @@ eqep2: counter@23220000 {
 	};
 
 	main_mcan0: can@20701000 {
-		compatible = "bosch,m_can";
+		compatible = "ti,am62-mcan", "bosch,m_can";
 		reg = <0x00 0x20701000 0x00 0x200>,
 		      <0x00 0x20708000 0x00 0x8000>;
 		reg-names = "m_can", "message_ram";
@@ -898,7 +898,7 @@ main_mcan0: can@20701000 {
 	};
 
 	main_mcan1: can@20711000 {
-		compatible = "bosch,m_can";
+		compatible = "ti,am62-mcan", "bosch,m_can";
 		reg = <0x00 0x20711000 0x00 0x200>,
 		      <0x00 0x20718000 0x00 0x8000>;
 		reg-names = "m_can", "message_ram";
arch/arm64/boot/dts/ti/k3-am62p-j722s-common-mcu.dtsi +2 -2
index 5288c959f3c1aecfde363f9e2440253545591171..3db8b63ef01fefd5177272a7e895317dc6d5921b 100644
@@ -154,7 +154,7 @@ mcu_rti0: watchdog@4880000 {
 	};
 
 	mcu_mcan0: can@4e08000 {
-		compatible = "bosch,m_can";
+		compatible = "ti,am62-mcan", "bosch,m_can";
 		reg = <0x00 0x4e08000 0x00 0x200>,
 		      <0x00 0x4e00000 0x00 0x8000>;
 		reg-names = "m_can", "message_ram";
@@ -169,7 +169,7 @@ mcu_mcan0: can@4e08000 {
 	};
 
 	mcu_mcan1: can@4e18000 {
-		compatible = "bosch,m_can";
+		compatible = "ti,am62-mcan", "bosch,m_can";
 		reg = <0x00 0x4e18000 0x00 0x200>,
 		      <0x00 0x4e10000 0x00 0x8000>;
 		reg-names = "m_can", "message_ram";
Signature · 1 line
2.34.1
#6 lore raw

Re: [PATCH v3 3/3] arm64: dts: ti: k3-am62p: use ti,am62-mcan compatible for m_can devices

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Low] The new compatible string 'ti,am62-mcan' is not documented or permitted by the corresponding device…

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The new compatible string 'ti,am62-mcan' is not documented or permitted by the corresponding device tree binding schema. --

commit c9a5bd5e593b159b3d44f9ab0c75ab2dacec0f49
Author: Kendall Willis <[email protected]>

arm64: dts: ti: k3-am62p: use ti,am62-mcan compatible for m_can devices

This commit prepends the "ti,am62-mcan" compatible string to the m_can devices in the device tree for the AM62p. The new compatible string adds out-of-band wakeup functionality.

arch/arm64/boot/dts/ti/k3-am62p-j722s-common-main.dtsi eqep2: counter@23220000 { · line 886

Quoted 10 lines
arch/arm64/boot/dts/ti/k3-am62p-j722s-common-main.dtsi +1 -1
index f130c7cb998d7..9e8d9246f6169 100644
@@ -883,7 +883,7 @@ eqep2: counter@23220000 {
 	};
 
 	main_mcan0: can@20701000 {
-		compatible = "bosch,m_can";
+		compatible = "ti,am62-mcan", "bosch,m_can";

[Severity: Low]
Does this change cause make dtbs_check to fail for the main_mcan0 and main_mcan1 nodes?

Looking at Documentation/devicetree/bindings/net/can/bosch,m_can.yaml, the schema expects the compatible property to be exactly the constant string:

compatible:
const: bosch,m_can

Without updating the device tree binding schema to permit the new "ti,am62-mcan" string alongside "bosch,m_can", it appears the schema validation will reject these nodes.

[ ... ]

arch/arm64/boot/dts/ti/k3-am62p-j722s-common-mcu.dtsi mcu_rti0: watchdog@4880000 { · line 157

Quoted 10 lines
arch/arm64/boot/dts/ti/k3-am62p-j722s-common-mcu.dtsi +1 -1
index 5288c959f3c1a..3db8b63ef01fe 100644
@@ -154,7 +154,7 @@ mcu_rti0: watchdog@4880000 {
 	};
 
 	mcu_mcan0: can@4e08000 {
-		compatible = "bosch,m_can";
+		compatible = "ti,am62-mcan", "bosch,m_can";

[Severity: Low]
Will this also trigger a dtbs_check validation failure for the mcu_mcan0 and mcu_mcan1 nodes?

The same schema documentation issue applies here. Is there a missing prerequisite patch to update the yaml binding?

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=3