From patchwork Tue Dec 19 18:10:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Agner X-Patchwork-Id: 10123905 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id CC9AF6019C for ; Tue, 19 Dec 2017 18:14:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B5B58294B4 for ; Tue, 19 Dec 2017 18:14:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AA990294C9; Tue, 19 Dec 2017 18:14:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id BA7B3294C3 for ; Tue, 19 Dec 2017 18:14:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=okKq6dMtxBDd4lU3o1CsoJoBLu5N46Czeypjoc1rRso=; b=AzBkV89jn+w6xajqEhs+ZS5M4n 4dsFSgxK6biyQ3R66WjsTsnNc7xMshce37BJCDlGMXfVQXTsilZYf3EJA4C3Pg6pePWBxUv4k+lgk 1l2MPVfOAKpd8DyIRTkYFW5LDCLYim3OXkz5BZRVBtV/sDhbvTXMH52A1mNEN74BNmR2zasxM6Hra voWQVcK4PA023gbf8i0CuduKIx/DbjuJyyoyBdTF1ZvxrvZ224D6eC4M26rOdItmKOLjICOaZtt1r 65iF+AJtjSKUWXufJmq4IRwZ5AfAMv6c+b1zPJio2BSJXoky08VLtC11wc+KExZO2mTtvvwmX9PPc 79gCtynQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eRMPi-00069K-GD; Tue, 19 Dec 2017 18:14:50 +0000 Received: from mail.kmu-office.ch ([2a02:418:6a02::a2]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eRMME-000402-VB for linux-arm-kernel@lists.infradead.org; Tue, 19 Dec 2017 18:11:32 +0000 Received: from trochilidae.toradex.int (unknown [IPv6:2001:1620:c6e:10::3]) by mail.kmu-office.ch (Postfix) with ESMTPSA id 233065C3ACC; Tue, 19 Dec 2017 19:04:37 +0100 (CET) From: Stefan Agner To: shawnguo@kernel.org, kernel@pengutronix.de Subject: [PATCH v3 8/9] ARM: dts: imx7-colibri: add MCP2515 CAN controller Date: Tue, 19 Dec 2017 19:10:37 +0100 Message-Id: <20171219181038.1369-8-stefan@agner.ch> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20171219181038.1369-1-stefan@agner.ch> References: <20171219181038.1369-1-stefan@agner.ch> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=agner.ch; s=dkim; t=1513706677; bh=AeCXPal0DKRtXG2VOSHXdB0ltiTHwV+u7G04jB4SVF0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=LsrXmuK0e6fMv+g9FvOI0uN8fUcgVsc7dtsLWGiR4PqvG5xoG9oMNIlBrnhn2mrbEaNot8I//SVb9kUZprmi3DnGkiOvGGhyvNQjfdbPkeZ3Vgaees/aThMn6zC1H5jTCX0hRSb7xh0zeZQTJWtvRNQ6k2u4y+VnIpWXJHDfHOY= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171219_101115_858433_FE9B9036 X-CRM114-Status: UNSURE ( 9.93 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Stefan Agner , robh+dt@kernel.org, fabio.estevam@nxp.com, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The Colibri Evaluation Carrier Board provides a MCP2515 CAN controller connected via SPI. Note that the i.MX 7 provides an internal CAN controller which is much better suited for CAN operations. Using the MCP2515 with a Colibri iMX7 module is mainly useful to test the SPI interface. Signed-off-by: Stefan Agner Reviewed-by: Fabio Estevam --- Changes since v1: - Changed label and node name for MCP2515 - Drop num-cs from ecspi3 arch/arm/boot/dts/imx7-colibri-eval-v3.dtsi | 25 +++++++++++++++++++++++++ arch/arm/boot/dts/imx7-colibri.dtsi | 13 ++++++++++++- 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/imx7-colibri-eval-v3.dtsi b/arch/arm/boot/dts/imx7-colibri-eval-v3.dtsi index 87c23b769a08..e2b99bb48250 100644 --- a/arch/arm/boot/dts/imx7-colibri-eval-v3.dtsi +++ b/arch/arm/boot/dts/imx7-colibri-eval-v3.dtsi @@ -45,6 +45,13 @@ stdout-path = "serial0:115200n8"; }; + /* fixed crystal dedicated to mpc258x */ + clk16m: clk16m { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <16000000>; + }; + panel: panel { compatible = "edt,et057090dhu"; backlight = <&bl>; @@ -99,6 +106,24 @@ status = "okay"; }; +&ecspi3 { + status = "okay"; + + mcp2515: can@0 { + compatible = "microchip,mcp2515"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_can_int>; + reg = <0>; + clocks = <&clk16m>; + interrupt-parent = <&gpio5>; + interrupts = <2 IRQ_TYPE_EDGE_FALLING>; + spi-max-frequency = <10000000>; + vdd-supply = <®_3v3>; + xceiver-supply = <®_5v0>; + status = "okay"; + }; +}; + &fec1 { status = "okay"; }; diff --git a/arch/arm/boot/dts/imx7-colibri.dtsi b/arch/arm/boot/dts/imx7-colibri.dtsi index 689ff6822634..c28a483b786d 100644 --- a/arch/arm/boot/dts/imx7-colibri.dtsi +++ b/arch/arm/boot/dts/imx7-colibri.dtsi @@ -92,6 +92,12 @@ cpu-supply = <®_DCDC2>; }; +&ecspi3 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_ecspi3 &pinctrl_ecspi3_cs>; + cs-gpios = <&gpio4 11 GPIO_ACTIVE_HIGH>; +}; + &fec1 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_enet1>; @@ -313,7 +319,6 @@ fsl,pins = < MX7D_PAD_ENET1_RGMII_RD3__GPIO7_IO3 0x74 /* SODIMM 55 */ MX7D_PAD_ENET1_RGMII_RD2__GPIO7_IO2 0x74 /* SODIMM 63 */ - MX7D_PAD_SD1_RESET_B__GPIO5_IO2 0X14 /* SODIMM 73 */ MX7D_PAD_SAI1_RX_SYNC__GPIO6_IO16 0x14 /* SODIMM 77 */ MX7D_PAD_EPDC_DATA09__GPIO2_IO9 0x14 /* SODIMM 89 */ MX7D_PAD_EPDC_DATA08__GPIO2_IO8 0x74 /* SODIMM 91 */ @@ -400,6 +405,12 @@ >; }; + pinctrl_can_int: can-int-grp { + fsl,pins = < + MX7D_PAD_SD1_RESET_B__GPIO5_IO2 0X14 /* SODIMM 73 */ + >; + }; + pinctrl_enet1: enet1grp { fsl,pins = < MX7D_PAD_ENET1_CRS__GPIO7_IO14 0x14