According to R-Car Gen3 HW manual rev1.00, R-Car M3-N has two CAN
interfaces, similar to H3, M3-W and other SoCs from the same family.

Add CAN placeholder nodes to avoid below DTC errors:
Error: arch/arm64/boot/dts/renesas/ulcb-kf.dtsi:19.1-6 Label or path can0 not 
found
Error: arch/arm64/boot/dts/renesas/ulcb-kf.dtsi:25.1-6 Label or path can1 not 
found

These errors occur *after* the addition of r8a77965-m3nulcb-kf.dts.
Fix them beforehand.

CAN support is inspired from below commits:
 - v4.7 commit 308b7e4ba62e ("arm64: dts: r8a7795: Add CAN support")
 - v4.11 commit 909c16252415 ("arm64: dts: r8a7796: Add CAN support")
 - v4.12 commit bec0948e810f ("arm64: dts: r8a7796: Add reset control 
properties")

Signed-off-by: Eugeniu Rosca <ero...@de.adit-jv.com>
---
Changes in v2:
 - [Kieran Bingham] Improved commit description:
   - Referenced the newer HW manual rev1.00 instead of rev0.55E.
   - Kept the "true story" behind the patch. Just made it more clear.
 - [Geert Uytterhoeven] Replaced CAN0 and CAN1 nodes with placeholders
   (no CAN testing was done to validate the DTS configuration).
---
 arch/arm64/boot/dts/renesas/r8a77965.dtsi | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/arch/arm64/boot/dts/renesas/r8a77965.dtsi 
b/arch/arm64/boot/dts/renesas/r8a77965.dtsi
index 486aecacb22a..4da479d3c226 100644
--- a/arch/arm64/boot/dts/renesas/r8a77965.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a77965.dtsi
@@ -656,6 +656,22 @@
                        status = "disabled";
                };
 
+               can0: can@e6c30000 {
+                       compatible = "renesas,can-r8a77965",
+                                    "renesas,rcar-gen3-can";
+                       reg = <0 0xe6c30000 0 0x1000>;
+                       /* placeholder */
+                       status = "disabled";
+               };
+
+               can1: can@e6c38000 {
+                       compatible = "renesas,can-r8a77965",
+                                    "renesas,rcar-gen3-can";
+                       reg = <0 0xe6c38000 0 0x1000>;
+                       /* placeholder */
+                       status = "disabled";
+               };
+
                pwm0: pwm@e6e30000 {
                        compatible = "renesas,pwm-r8a77965", "renesas,pwm-rcar";
                        reg = <0 0xe6e30000 0 8>;
-- 
2.18.0

Reply via email to