Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp4321577ybv; Sun, 16 Feb 2020 19:27:23 -0800 (PST) X-Google-Smtp-Source: APXvYqz0R1sb1soLqzOf+f8K8cDp63xcB5pObQcPeyx/r6/P9KoIjuaac61S9d7I1QYMaGjBKiLn X-Received: by 2002:a9d:6290:: with SMTP id x16mr10285137otk.343.1581910043083; Sun, 16 Feb 2020 19:27:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581910043; cv=none; d=google.com; s=arc-20160816; b=uzEW/FBdIweHLtx4Z4QQV74S878iAZEaxn6ch95kdrackGkx3HS49er0qcCsQRpwBk kE+RTNm9IKUSvGEOKh0wyfnHfKkGeKvpJcpNZOsSyb4BnrBmzBo4pxoPI3CXvxbUJNji l9VQ9K/j/kV4FvSSppzK6+Ehym8FH2T1H4TGmaj+24m+FGzuU8qCBOxxO+UrAhSti6kr CleH6VfHcwd+stbx4x4uPFN3X46bByeccum09fj1YhPDe1fgbAPb+9eB6EDVjL+oMnKG puPuBLnc+djV9VLTUDYqYdN1A6F9oi5TuRXDcVK/3WnunyoZwEn4C5/AzysfNG2SUZjQ KYLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=zKI2p89JMWjlKJlz2Y0qQ0nyLJ1Epqu08uYbpGudP/E=; b=amPlwdcfFklC3EThqEuXyEHofp3pwmav4UoWOipWs3rRrHrWP3KcN4akamAnkgJXxg ztU82PhnN39xApCNqb3SB3LgF5S6WIKd1vfBnV4oN1qm1LOJJYfj6Z8nzV3cAlgg59eW +M0gZlGjCnqB+0BGcD4dtwnJBGWWGsu5zUYVNHb088ESbnyiXyY349IOmAHQ/2AbjV2c vj/pwXUL3uxCoLodAosY/b3MANWMOwvHxorJAPi+6dQFXHfu5aD1GAN4UVfGUYxkd3+T 97drVYaSFDNZH+DajK1qn0odmO05gdrFe6HpJJVwnhQfNGko5qu74E+hEbuIqnvIkliI DJow== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l10si6733185oth.243.2020.02.16.19.27.11; Sun, 16 Feb 2020 19:27:23 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728158AbgBQD0z (ORCPT + 99 others); Sun, 16 Feb 2020 22:26:55 -0500 Received: from inva020.nxp.com ([92.121.34.13]:46250 "EHLO inva020.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728087AbgBQD0r (ORCPT ); Sun, 16 Feb 2020 22:26:47 -0500 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 3E1FB1A1F30; Mon, 17 Feb 2020 04:26:45 +0100 (CET) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 37F211A1F3D; Mon, 17 Feb 2020 04:26:35 +0100 (CET) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 87FD0402E5; Mon, 17 Feb 2020 11:26:23 +0800 (SGT) From: Joakim Zhang To: mturquette@baylibre.com, sboyd@kernel.org, robh+dt@kernel.org, mark.rutland@arm.com, shawnguo@kernel.org, s.hauer@pengutronix.de Cc: kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, Anson.Huang@nxp.com, leonard.crestez@nxp.com, daniel.baluta@nxp.com, aisheng.dong@nxp.com, peng.fan@nxp.com, fugang.duan@nxp.com, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Joakim Zhang Subject: [PATCH 7/7] arch: arm64: dts: imx8qxp: add device node for CAN in ADMA SS Date: Mon, 17 Feb 2020 11:19:21 +0800 Message-Id: <1581909561-12058-8-git-send-email-qiangqing.zhang@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1581909561-12058-1-git-send-email-qiangqing.zhang@nxp.com> References: <1581909561-12058-1-git-send-email-qiangqing.zhang@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add device node for CAN in ADMA SS. Signed-off-by: Joakim Zhang --- arch/arm64/boot/dts/freescale/imx8qxp-mek.dts | 47 +++++++++++++++ arch/arm64/boot/dts/freescale/imx8qxp.dtsi | 59 +++++++++++++++++++ 2 files changed, 106 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8qxp-mek.dts b/arch/arm64/boot/dts/freescale/imx8qxp-mek.dts index f88402ee650c..72a45dd7129e 100644 --- a/arch/arm64/boot/dts/freescale/imx8qxp-mek.dts +++ b/arch/arm64/boot/dts/freescale/imx8qxp-mek.dts @@ -28,6 +28,25 @@ gpio = <&lsio_gpio4 19 GPIO_ACTIVE_HIGH>; enable-active-high; }; + + reg_can_en: regulator-can-en { + compatible = "regulator-fixed"; + regulator-name = "can-en"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + gpio = <&pca6416 3 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; + + reg_can_stby: regulator-can-stby { + compatible = "regulator-fixed"; + regulator-name = "can-stby"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + gpio = <&pca6416 5 GPIO_ACTIVE_HIGH>; + enable-active-high; + vin-supply = <®_can_en>; + }; }; &cm40_i2c { @@ -80,6 +99,20 @@ }; }; +&adma_flexcan0 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_flexcan0>; + xceiver-supply = <®_can_stby>; + status = "okay"; +}; + +&adma_flexcan1 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_flexcan1>; + xceiver-supply = <®_can_stby>; + status = "okay"; +}; + &adma_i2c1 { #address-cells = <1>; #size-cells = <0>; @@ -207,6 +240,20 @@ >; }; + pinctrl_flexcan0: flexcan0grp { + fsl,pins = < + IMX8QXP_FLEXCAN0_TX_ADMA_FLEXCAN0_TX 0x00000021 + IMX8QXP_FLEXCAN0_RX_ADMA_FLEXCAN0_RX 0x00000021 + >; + }; + + pinctrl_flexcan1: flexcan1grp { + fsl,pins = < + IMX8QXP_FLEXCAN1_TX_ADMA_FLEXCAN1_TX 0x00000021 + IMX8QXP_FLEXCAN1_RX_ADMA_FLEXCAN1_RX 0x00000021 + >; + }; + pinctrl_ioexp_rst: ioexp_rst_grp { fsl,pins = < IMX8QXP_SPI2_SDO_LSIO_GPIO1_IO01 0x06000021 diff --git a/arch/arm64/boot/dts/freescale/imx8qxp.dtsi b/arch/arm64/boot/dts/freescale/imx8qxp.dtsi index cd10519eced7..f549e33d1c82 100644 --- a/arch/arm64/boot/dts/freescale/imx8qxp.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8qxp.dtsi @@ -34,6 +34,9 @@ serial1 = &adma_lpuart1; serial2 = &adma_lpuart2; serial3 = &adma_lpuart3; + can0 = &adma_flexcan0; + can1 = &adma_flexcan1; + can2 = &adma_flexcan2; }; cpus { @@ -384,6 +387,62 @@ power-domains = <&pd IMX_SC_R_I2C_3>; status = "disabled"; }; + + adma_flexcan0: can@5a8d0000 { + compatible = "fsl,imx8qxp-flexcan", "fsl,imx8qm-flexcan"; + reg = <0x5a8d0000 0x10000>; + interrupts = ; + interrupt-parent = <&gic>; + clocks = <&adma_lpcg IMX_ADMA_LPCG_CAN0_IPG_CLK>, + <&adma_lpcg IMX_ADMA_LPCG_CAN0_IPG_PE_CLK>; + clock-names = "ipg", "per"; + assigned-clocks = <&clk IMX_ADMA_CAN0_CLK>; + assigned-clock-rates = <40000000>; + power-domains = <&pd IMX_SC_R_CAN_0>; + /* SLSlice[4] */ + fsl,clk-source = <0>; + status = "disabled"; + }; + + adma_flexcan1: can@5a8e0000 { + compatible = "fsl,imx8qxp-flexcan", "fsl,imx8qm-flexcan"; + reg = <0x5a8e0000 0x10000>; + interrupts = ; + interrupt-parent = <&gic>; + /* CAN0 clock and PD is shared among all CAN instances + * as CAN1 shares CAN0's clock and to enable CAN0's + * clock it has to be powered on. + */ + clocks = <&adma_lpcg IMX_ADMA_LPCG_CAN0_IPG_CLK>, + <&adma_lpcg IMX_ADMA_LPCG_CAN0_IPG_PE_CLK>; + clock-names = "ipg", "per"; + assigned-clocks = <&clk IMX_ADMA_CAN0_CLK>; + assigned-clock-rates = <40000000>; + power-domains = <&pd IMX_SC_R_CAN_1>; + /* SLSlice[4] */ + fsl,clk-source = <0>; + status = "disabled"; + }; + + adma_flexcan2: can@5a8f0000 { + compatible = "fsl,imx8qxp-flexcan", "fsl,imx8qm-flexcan"; + reg = <0x5a8f0000 0x10000>; + interrupts = ; + interrupt-parent = <&gic>; + /* CAN0 clock and PD is shared among all CAN instances + * as CAN2 shares CAN0's clock and to enable CAN0's + * clock it has to be powered on. + */ + clocks = <&adma_lpcg IMX_ADMA_LPCG_CAN0_IPG_CLK>, + <&adma_lpcg IMX_ADMA_LPCG_CAN0_IPG_PE_CLK>; + clock-names = "ipg", "per"; + assigned-clocks = <&clk IMX_ADMA_CAN0_CLK>; + assigned-clock-rates = <40000000>; + power-domains = <&pd IMX_SC_R_CAN_2>; + /* SLSlice[4] */ + fsl,clk-source = <0>; + status = "disabled"; + }; }; conn_subsys: bus@5b000000 { -- 2.17.1