arm64: dts: ti: k3-j7200-som-p0: Add support for CAN instance 0 in main domain
authorBhavya Kapoor <b-kapoor@ti.com>
Tue, 30 Jan 2024 10:20:43 +0000 (15:50 +0530)
committerVignesh Raghavendra <vigneshr@ti.com>
Mon, 5 Feb 2024 14:49:13 +0000 (20:19 +0530)
CAN instance 0 in the main domain is brought on the J7200 SoM through
header J1. Thus, Add transceiver dt node to add support for this CAN
instance.

Also, add the mux dt nodes to route CAN High and Low lines coming
from the SoC to the Common Processor Board.

Signed-off-by: Bhavya Kapoor <b-kapoor@ti.com>
Link: https://lore.kernel.org/r/20240130102044.120483-3-b-kapoor@ti.com
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
arch/arm64/boot/dts/ti/k3-j7200-som-p0.dtsi

index 228efcc170afddae948d9c81e61fd65595c64261..1a9b414cb8e04a25b344e3b50c3ca2e1ac5a7380 100644 (file)
@@ -5,6 +5,8 @@
 
 /dts-v1/;
 
+#include <dt-bindings/gpio/gpio.h>
+
 #include "k3-j7200.dtsi"
 
 / {
                        no-map;
                };
        };
+
+       mux0: mux-controller {
+               compatible = "gpio-mux";
+               #mux-state-cells = <1>;
+               mux-gpios = <&exp_som 1 GPIO_ACTIVE_HIGH>;
+       };
+
+       mux1: mux-controller {
+               compatible = "gpio-mux";
+               #mux-state-cells = <1>;
+               mux-gpios = <&exp_som 2 GPIO_ACTIVE_HIGH>;
+       };
+
+       transceiver0: can-phy0 {
+               /* standby pin has been grounded by default */
+               compatible = "ti,tcan1042";
+               #phy-cells = <0>;
+               max-bitrate = <5000000>;
+       };
 };
 
 &wkup_pmx0 {
                        J721E_IOPAD(0xd8, PIN_INPUT_PULLUP, 0) /* (W2) I2C0_SDA */
                >;
        };
+
+       main_mcan0_pins_default: main-mcan0-default-pins {
+               pinctrl-single,pins = <
+                       J721E_IOPAD(0x24, PIN_INPUT, 0) /* (V20) MCAN0_RX */
+                       J721E_IOPAD(0x20, PIN_OUTPUT, 0) /* (V18) MCAN0_TX */
+               >;
+       };
 };
 
 &hbmc {
                };
        };
 };
+
+&main_mcan0 {
+       status = "okay";
+       pinctrl-0 = <&main_mcan0_pins_default>;
+       pinctrl-names = "default";
+       phys = <&transceiver0>;
+};