summaryrefslogtreecommitdiffstats
path: root/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0174-arm64-dts-renesas-ulcb-vb2-Drive-CAN-controller-rese.patch
blob: ae8eb8b0a209190cfe2cf3a43becaa4448f424b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
From fb760e67e0336587583eb32cf77bbdf4b4e1fc74 Mon Sep 17 00:00:00 2001
From: Andrey Gusakov <andrey.gusakov@cogentembedded.com>
Date: Tue, 28 May 2019 19:55:13 +0300
Subject: [PATCH] arm64: dts: renesas: ulcb-vb2: Drive CAN controller reset
 through regulators

This uses regulators instead of GPIO hogs for controlling CAN
reset pins on VideoBox v2 which fixes CAN cold-start issues.

Signed-off-by: Andrey Gusakov <andrey.gusakov@cogentembedded.com>
Signed-off-by: Valentine Barshak <valentine.barshak@cogentembedded.com>
---
 arch/arm64/boot/dts/renesas/ulcb-vb2.dtsi | 32 +++++++++++++++++++------------
 1 file changed, 20 insertions(+), 12 deletions(-)

diff --git a/arch/arm64/boot/dts/renesas/ulcb-vb2.dtsi b/arch/arm64/boot/dts/renesas/ulcb-vb2.dtsi
index 1610949..5831d12 100644
--- a/arch/arm64/boot/dts/renesas/ulcb-vb2.dtsi
+++ b/arch/arm64/boot/dts/renesas/ulcb-vb2.dtsi
@@ -94,6 +94,24 @@
 		regulator-always-on;
 	};
 
+	can2_power: regulator@11 {
+		compatible = "regulator-fixed";
+		regulator-name = "can2_power";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		gpio = <&gpio_ext_pwr 8 GPIO_ACTIVE_HIGH>;
+		enable-active-high;
+	};
+
+	can3_power: regulator@12 {
+		compatible = "regulator-fixed";
+		regulator-name = "can3_power";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		gpio = <&gpio_ext_pwr 9 GPIO_ACTIVE_HIGH>;
+		enable-active-high;
+	};
+
 	/delete-node/sound;
 
 	rsnd_ak4613: sound@0 {
@@ -187,6 +205,7 @@
 			interrupt-parent = <&gpio0>;
 			interrupts = <15 GPIO_ACTIVE_LOW>;
 			spi-max-frequency = <10000000>;
+			vdd-supply = <&can2_power>;
 		};
 		spican1: spidev@1 {
 			compatible = "microchip,mcp2515";
@@ -195,6 +214,7 @@
 			interrupt-parent = <&gpio1>;
 			interrupts = <5 GPIO_ACTIVE_LOW>;
 			spi-max-frequency = <10000000>;
+			vdd-supply = <&can3_power>;
 		};
 	};
 };
@@ -1147,12 +1167,6 @@
 					output-high;
 					line-name = "can2_120R_load";
 				};
-				can2_rst {
-					gpio-hog;
-					gpios = <8 GPIO_ACTIVE_HIGH>;
-					output-high;
-					line-name = "can2_rst";
-				};
 				/* CAN3 */
 				can3_stby {
 					gpio-hog;
@@ -1166,12 +1180,6 @@
 					output-high;
 					line-name = "can3_120R_load";
 				};
-				can3_rst {
-					gpio-hog;
-					gpios = <9 GPIO_ACTIVE_HIGH>;
-					output-high;
-					line-name = "can3_rst";
-				};
 			};
 		};
 
-- 
2.7.4