diff options
| author | Gustavo Solaira <gustavos@codeaurora.org> | 2017-08-23 11:30:39 -0700 |
|---|---|---|
| committer | Gustavo Solaira <gustavos@codeaurora.org> | 2017-09-06 10:45:33 -0700 |
| commit | be06210b35c32dc674b98e52232d3e5f647ba021 (patch) | |
| tree | 7ca62fc935869c19239841ee32f376bb334907ca /arch | |
| parent | 79be912c145f417489b20116f85a51b3e60cbe60 (diff) | |
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: Gustavo Solaira <gustavos@codeaurora.org>
Diffstat (limited to 'arch')
| -rw-r--r-- | arch/arm/boot/dts/qcom/msm8996-cv2x.dtsi | 21 | ||||
| -rw-r--r-- | arch/arm/boot/dts/qcom/msm8996-pinctrl.dtsi | 33 |
2 files changed, 35 insertions, 19 deletions
diff --git a/arch/arm/boot/dts/qcom/msm8996-cv2x.dtsi b/arch/arm/boot/dts/qcom/msm8996-cv2x.dtsi index d18344eb3daf..3dfc57752ea0 100644 --- a/arch/arm/boot/dts/qcom/msm8996-cv2x.dtsi +++ b/arch/arm/boot/dts/qcom/msm8996-cv2x.dtsi @@ -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*/ diff --git a/arch/arm/boot/dts/qcom/msm8996-pinctrl.dtsi b/arch/arm/boot/dts/qcom/msm8996-pinctrl.dtsi index d800fdaae3de..244901bd5cef 100644 --- a/arch/arm/boot/dts/qcom/msm8996-pinctrl.dtsi +++ b/arch/arm/boot/dts/qcom/msm8996-pinctrl.dtsi @@ -2745,17 +2745,32 @@ }; }; - 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; + }; }; }; }; |
