OSDN Git Service

ARM: dts: msm: Enable CAN controller for msm8996 CV2X boards
authorGustavo Solaira <gustavos@codeaurora.org>
Wed, 23 Aug 2017 18:30:39 +0000 (11:30 -0700)
committerGustavo Solaira <gustavos@codeaurora.org>
Wed, 6 Sep 2017 17:45:33 +0000 (10:45 -0700)
Add a device tree node for the SPI CAN controller to enable
a CAN network interface for msm8996 CV2X boards.

Change-Id: Ib9c1d63bf86e3b823aa8d762065ed374bdfeaa0e
Signed-off-by: Gustavo Solaira <gustavos@codeaurora.org>
arch/arm/boot/dts/qcom/msm8996-cv2x.dtsi
arch/arm/boot/dts/qcom/msm8996-pinctrl.dtsi

index d18344e..3dfc577 100644 (file)
 &spi_9 {
        status = "okay";
 
-       /* CAN controller */
-       spi@0 {
-               compatible = "nxp,mpc57xx";
+       can-controller@0 {
+               compatible = "nxp,mpc5746c";
                reg = <0>;
-               spi-max-frequency = <19200000>;
+               spi-max-frequency = <9600000>;
+               interrupt-parent = <&tlmm>;
+               interrupts = <78 0>;
+               reset-gpio = <&tlmm 71 GPIO_ACTIVE_LOW>;
+               bits-per-word = <8>;
+               reset-delay-msec = <100>;
+               pinctrl-names = "active", "sleep";
+               pinctrl-0 = <&can_rst_on>;
+               pinctrl-1 = <&can_rst_off>;
        };
 };
 
        status = "okay";
 };
 
-&tlmm {
-       /* Set these up as hogs */
-       pinctrl-names = "default";
-       pinctrl-0 = <&can_reset_gpio>;
-};
-
 &pm8994_gpios {
        gpio@c700 { /* GPIO 8 - WLAN_EN */
                qcom,mode = <1>;                /* Digital output*/
index d800fda..244901b 100644 (file)
                                };
                };
 
-               can_reset_gpio: can_reset_gpio {
-                       mux {
-                               pins = "gpio71";
-                               function = "gpio";
+               can_reset {
+                       can_rst_on: rst_on {
+                               mux {
+                                       pins = "gpio71";
+                                       function = "gpio";
+                               };
+
+                               config {
+                                       pins = "gpio71";
+                                       drive-strength = <2>; /* 2 mA */
+                                       bias-pull-up;
+                               };
                        };
 
-                       config {
-                               pins = "gpio71";
-                               drive-strength = <2>;
-                               output-high;
-                               bias-pull-up;
+                       can_rst_off: rst_off {
+                               mux {
+                                       pins = "gpio71";
+                                       function = "gpio";
+                               };
+
+                               config {
+                                       pins = "gpio71";
+                                       drive-strength = <2>; /* 2 mA */
+                                       bias-pull-up;
+                                       output-high;
+                               };
                        };
                };
        };