Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit be06210b authored by Gustavo Solaira's avatar Gustavo Solaira
Browse files

ARM: dts: msm: Enable CAN controller for msm8996 CV2X boards



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: default avatarGustavo Solaira <gustavos@codeaurora.org>
parent 79be912c
Loading
Loading
Loading
Loading
+11 −10
Original line number Diff line number Diff line
@@ -216,11 +216,18 @@
&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>;
	};
};

@@ -400,12 +407,6 @@
	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*/
+24 −9
Original line number Diff line number Diff line
@@ -2745,7 +2745,8 @@
				};
		};

		can_reset_gpio: can_reset_gpio {
		can_reset {
			can_rst_on: rst_on {
				mux {
					pins = "gpio71";
					function = "gpio";
@@ -2753,10 +2754,24 @@

				config {
					pins = "gpio71";
				drive-strength = <2>;
				output-high;
					drive-strength = <2>; /* 2 mA */
					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;
				};
			};
		};
	};
};