ARM: vf-colibri: add SPI support and enable MCP2515 CAN
authorBhuvanchandra DV <bhuvanchandra.dv@toradex.com>
Thu, 29 Jan 2015 16:27:45 +0000 (21:57 +0530)
committerShawn Guo <shawn.guo@linaro.org>
Mon, 30 Mar 2015 08:38:50 +0000 (16:38 +0800)
MCP2515 CAN controller is available on Colibri Evaluation board.
Hence enable MCP2515 CAN.

Acked-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
arch/arm/boot/dts/vf-colibri-eval-v3.dtsi
arch/arm/boot/dts/vf-colibri.dtsi

index 36cafbfa1bfacd58bd9e6ebbfeaf8a18c23ff018..606753eb72c8f67d9551b19bfed61137b2ab07c2 100644 (file)
                bootargs = "console=ttyLP0,115200";
        };
 
+       clk16m: clk16m {
+               compatible = "fixed-clock";
+               #clock-cells = <0>;
+               clock-frequency = <16000000>;
+       };
+
        regulators {
                compatible = "simple-bus";
                #address-cells = <1>;
        status  = "okay";
 };
 
+&dspi1 {
+       status = "okay";
+
+       mcp2515can: can@0 {
+               compatible = "microchip,mcp2515";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_can_int>;
+               reg = <0>;
+               clocks = <&clk16m>;
+               spi-max-frequency = <10000000>;
+               interrupt-parent = <&gpio1>;
+               interrupts = <11 GPIO_ACTIVE_LOW>;
+       };
+};
+
 &esdhc1 {
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_esdhc1>;
 &usbh1 {
        vbus-supply = <&usbh_vbus_reg>;
 };
+
+&iomuxc {
+       vf610-colibri {
+               pinctrl_can_int: can_int {
+                       fsl,pins = <
+                               VF610_PAD_PTB21__GPIO_43        0x22ed
+                       >;
+               };
+       };
+};
index 5c2b7320856dc0efc49c12cf7ff5575bf94a05dc..fbef0828e9303ca54d3a2304b0d4b2cf26bea417 100644 (file)
        status = "okay";
 };
 
+&dspi1 {
+       bus-num = <1>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_dspi1>;
+};
+
 &edma0 {
        status = "okay";
 };
                        >;
                };
 
+               pinctrl_dspi1: dspi1grp {
+                       fsl,pins = <
+                               VF610_PAD_PTD5__DSPI1_CS0               0x33e2
+                               VF610_PAD_PTD6__DSPI1_SIN               0x33e1
+                               VF610_PAD_PTD7__DSPI1_SOUT              0x33e2
+                               VF610_PAD_PTD8__DSPI1_SCK               0x33e2
+                       >;
+               };
+
                pinctrl_esdhc1: esdhc1grp {
                        fsl,pins = <
                                VF610_PAD_PTA24__ESDHC1_CLK     0x31ef