From patchwork Tue Nov 22 10:54:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vivek Yadav X-Patchwork-Id: 24711 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp2606042wrr; Tue, 22 Nov 2022 21:35:47 -0800 (PST) X-Google-Smtp-Source: AA0mqf63EUzubxQWhIpsT9A3czzLsyDVz8fSj350ShoDBBVcwFOYK11M2CS32HWygjPFJZlrycAs X-Received: by 2002:a05:6402:2946:b0:468:febe:ebab with SMTP id ed6-20020a056402294600b00468febeebabmr22157461edb.337.1669181746900; Tue, 22 Nov 2022 21:35:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669181746; cv=none; d=google.com; s=arc-20160816; b=d4zT/EmXIxSz69vCfBuADrNNWguxJ81vX9HGJfyJ83f8koZi/9BmbC20qMhs7oZIJe MmMYlOz1Pdtk2CjiIY2uSV0vjhx1Je/OrL4OYjAhv2gbtslloBwW9mz7R/dJZmGWpMcy oVTLrQFjvyztdLoU14mqg2atWm1m5BA+ri4XRrsYn6XogltCMVpmXEctsGMXDgudVZGK R/By0KAB3Qkxgyu4h+sL3ZvzNdbMkfBIyocvR5QiutYttUrZDbsYn/KcDkp61j7X+ghk GBWjMfTFIVdAdT9o+VYHuh0b+Ds8bJwD5qJGBYxNHNtV7Q57puDw/m0LZ/aeUXNlpSBx zt6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:dlp-filter:cms-type:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature:dkim-filter; bh=zxEW4aRMNY+I/kBJaywdBjCo9sOxx8Km7j9aqHAo5dA=; b=Uz957hCB82Ds/l9PMYEz28D+CSUT+puJooB/KpgM3FBPJfatUwKFYEmqtoQkFvNs6f CRHviVaQS30AiVfuWU6GoBxwvnzYU9RXb5U10Bg1JJYRJz8FpTaznYmvO9JpGVaVyQf0 XVQ3P94W1tJPVJg4wTf3eXxe22Roz8Ei3mFPtJymFr9eRqAkduKApu91M4w1f9I5VQwV wiWlUcrx/a15OC2EoBwaqiU3riwMFDLozc9ycvqnI2fWhQr7IFd4GRjf+4eGIG8GQAgg f7eKkJLUO8L63dnsOa2mlRBsLNTqKe/BS13dIYqyRIwjfNRnxb2+HQ6of8l7NKs67wCq cA3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=N3xv1MSV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g12-20020a1709065d0c00b0078315844537si15245056ejt.378.2022.11.22.21.35.22; Tue, 22 Nov 2022 21:35:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=N3xv1MSV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235853AbiKWFbO (ORCPT + 99 others); Wed, 23 Nov 2022 00:31:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53006 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235803AbiKWFbC (ORCPT ); Wed, 23 Nov 2022 00:31:02 -0500 Received: from mailout2.samsung.com (mailout2.samsung.com [203.254.224.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2A9F4ED70A for ; Tue, 22 Nov 2022 21:30:58 -0800 (PST) Received: from epcas5p4.samsung.com (unknown [182.195.41.42]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20221123053056epoutp02de8a669989fb3c2d90b6faf9fb60287f~qH7DwtFBb1215312153epoutp02S for ; Wed, 23 Nov 2022 05:30:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20221123053056epoutp02de8a669989fb3c2d90b6faf9fb60287f~qH7DwtFBb1215312153epoutp02S DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1669181456; bh=zxEW4aRMNY+I/kBJaywdBjCo9sOxx8Km7j9aqHAo5dA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=N3xv1MSVXXMVKmGc9pQXYtr6a95+WWRkh6SqcfB6rMvYKEX+jK4SfPgIvLBlhwY4E ATXqsm1mG+PA57j+xLZ/6neI5dPeAlujkW5bBMwCy5Yz6UMQNP0oWpsAXu+uZ72mgE rxG9oazgZuDoBtEIYSU8h5avtNs2YQyVUWXMFJs0= Received: from epsnrtp2.localdomain (unknown [182.195.42.163]) by epcas5p1.samsung.com (KnoxPortal) with ESMTP id 20221123053056epcas5p1301c275ddcbdaea62ae9a8108af57075~qH7DYM08H2401924019epcas5p1T; Wed, 23 Nov 2022 05:30:56 +0000 (GMT) Received: from epsmges5p3new.samsung.com (unknown [182.195.38.177]) by epsnrtp2.localdomain (Postfix) with ESMTP id 4NH8qL1yPqz4x9Q3; Wed, 23 Nov 2022 05:30:54 +0000 (GMT) Received: from epcas5p4.samsung.com ( [182.195.41.42]) by epsmges5p3new.samsung.com (Symantec Messaging Gateway) with SMTP id 07.77.56352.D00BD736; Wed, 23 Nov 2022 14:30:54 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas5p2.samsung.com (KnoxPortal) with ESMTPA id 20221122105027epcas5p2237c5bc9ab02cf12f6e0f603c5bb90c4~p4ov8AEnc2771827718epcas5p2b; Tue, 22 Nov 2022 10:50:27 +0000 (GMT) Received: from epsmgms1p2.samsung.com (unknown [182.195.42.42]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20221122105027epsmtrp169d1cede51b1841bb5ee1c8979606b4e~p4ov6-EoG0938009380epsmtrp1z; Tue, 22 Nov 2022 10:50:27 +0000 (GMT) X-AuditID: b6c32a4b-383ff7000001dc20-5d-637db00d7ce5 Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p2.samsung.com (Symantec Messaging Gateway) with SMTP id 47.8B.18644.379AC736; Tue, 22 Nov 2022 19:50:27 +0900 (KST) Received: from cheetah.sa.corp.samsungelectronics.net (unknown [107.109.115.53]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20221122105024epsmtip16d9c1b80cccb7f2649509e879aa615ed~p4osxvLtU0765207652epsmtip1c; Tue, 22 Nov 2022 10:50:24 +0000 (GMT) From: Vivek Yadav To: rcsekar@samsung.com, krzysztof.kozlowski+dt@linaro.org, wg@grandegger.com, mkl@pengutronix.de, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, pankaj.dubey@samsung.com, ravi.patel@samsung.com, alim.akhtar@samsung.com, linux-fsd@tesla.com, robh+dt@kernel.org Cc: linux-can@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, devicetree@vger.kernel.org, aswani.reddy@samsung.com, sriranjani.p@samsung.com, Vivek Yadav Subject: [PATCH v3 2/2] arm64: dts: fsd: Add MCAN device node Date: Tue, 22 Nov 2022 16:24:55 +0530 Message-Id: <20221122105455.39294-3-vivek.2311@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20221122105455.39294-1-vivek.2311@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA0VTe0xTVxz23Ht7Wx4lN4XhsdmguWFjMoFWW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118cvwSJMEzmn5roX7IrYESv/uulyileM2/6iW3ZyVW9PflKt Pi4bcWcPR9199pNp/2yWrGV5fuX67Z6dPWkGfVNOLZwoIaSwxzc9qaJ6m/BC0yM3t/q9K9zR Vmczveb81TNKdc5SbeJZy3l/MZ5b7bD92eFVB5u4GnqDXnwOPuIxcarG5O0KTaLnLqdf1TpZ FyO8/WiNdu8//h1vnW/8UGIpzkg01GIuKk4EAGRmXl4PAwAA X-CMS-MailID: 20221122105027epcas5p2237c5bc9ab02cf12f6e0f603c5bb90c4 X-Msg-Generator: CA X-Sendblock-Type: REQ_APPROVE CMS-TYPE: 105P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20221122105027epcas5p2237c5bc9ab02cf12f6e0f603c5bb90c4 References: <20221122105455.39294-1-vivek.2311@samsung.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750263919666002898?= X-GMAIL-MSGID: =?utf-8?q?1750263919666002898?= Add MCAN device node and enable the same for FSD platform. This also adds the required pin configuration for the same. Signed-off-by: Sriranjani P Signed-off-by: Vivek Yadav Reviewed-by: Pankaj Dubey --- arch/arm64/boot/dts/tesla/fsd-evb.dts | 16 +++++ arch/arm64/boot/dts/tesla/fsd-pinctrl.dtsi | 28 +++++++++ arch/arm64/boot/dts/tesla/fsd.dtsi | 68 ++++++++++++++++++++++ 3 files changed, 112 insertions(+) diff --git a/arch/arm64/boot/dts/tesla/fsd-evb.dts b/arch/arm64/boot/dts/tesla/fsd-evb.dts index 1db6ddf03f01..af3862e9fe3b 100644 --- a/arch/arm64/boot/dts/tesla/fsd-evb.dts +++ b/arch/arm64/boot/dts/tesla/fsd-evb.dts @@ -34,6 +34,22 @@ clock-frequency = <24000000>; }; +&m_can0 { + status = "okay"; +}; + +&m_can1 { + status = "okay"; +}; + +&m_can2 { + status = "okay"; +}; + +&m_can3 { + status = "okay"; +}; + &serial_0 { status = "okay"; }; diff --git a/arch/arm64/boot/dts/tesla/fsd-pinctrl.dtsi b/arch/arm64/boot/dts/tesla/fsd-pinctrl.dtsi index d0abb9aa0e9e..bb5289ebfef3 100644 --- a/arch/arm64/boot/dts/tesla/fsd-pinctrl.dtsi +++ b/arch/arm64/boot/dts/tesla/fsd-pinctrl.dtsi @@ -339,6 +339,34 @@ samsung,pin-pud = ; samsung,pin-drv = ; }; + + m_can0_bus: m-can0-bus-pins { + samsung,pins = "gpd0-0", "gpd0-1"; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; + }; + + m_can1_bus: m-can1-bus-pins { + samsung,pins = "gpd0-2", "gpd0-3"; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; + }; + + m_can2_bus: m-can2-bus-pins { + samsung,pins = "gpd0-4", "gpd0-5"; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; + }; + + m_can3_bus: m-can3-bus-pins { + samsung,pins = "gpd0-6", "gpd0-7"; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; + }; }; &pinctrl_pmu { diff --git a/arch/arm64/boot/dts/tesla/fsd.dtsi b/arch/arm64/boot/dts/tesla/fsd.dtsi index f35bc5a288c2..dfdb32514887 100644 --- a/arch/arm64/boot/dts/tesla/fsd.dtsi +++ b/arch/arm64/boot/dts/tesla/fsd.dtsi @@ -755,6 +755,74 @@ interrupts = ; }; + m_can0: can@14088000 { + compatible = "bosch,m_can"; + reg = <0x0 0x14088000 0x0 0x0200>, + <0x0 0x14080000 0x0 0x8000>; + reg-names = "m_can", "message_ram"; + interrupts = , + ; + interrupt-names = "int0", "int1"; + pinctrl-names = "default"; + pinctrl-0 = <&m_can0_bus>; + clocks = <&clock_peric PERIC_MCAN0_IPCLKPORT_PCLK>, + <&clock_peric PERIC_MCAN0_IPCLKPORT_CCLK>; + clock-names = "hclk", "cclk"; + bosch,mram-cfg = <0x0 128 64 64 64 64 32 32>; + status = "disabled"; + }; + + m_can1: can@14098000 { + compatible = "bosch,m_can"; + reg = <0x0 0x14098000 0x0 0x0200>, + <0x0 0x14090000 0x0 0x8000>; + reg-names = "m_can", "message_ram"; + interrupts = , + ; + interrupt-names = "int0", "int1"; + pinctrl-names = "default"; + pinctrl-0 = <&m_can1_bus>; + clocks = <&clock_peric PERIC_MCAN1_IPCLKPORT_PCLK>, + <&clock_peric PERIC_MCAN1_IPCLKPORT_CCLK>; + clock-names = "hclk", "cclk"; + bosch,mram-cfg = <0x0 128 64 64 64 64 32 32>; + status = "disabled"; + }; + + m_can2: can@140a8000 { + compatible = "bosch,m_can"; + reg = <0x0 0x140a8000 0x0 0x0200>, + <0x0 0x140a0000 0x0 0x8000>; + reg-names = "m_can", "message_ram"; + interrupts = , + ; + interrupt-names = "int0", "int1"; + pinctrl-names = "default"; + pinctrl-0 = <&m_can2_bus>; + clocks = <&clock_peric PERIC_MCAN2_IPCLKPORT_PCLK>, + <&clock_peric PERIC_MCAN2_IPCLKPORT_CCLK>; + clock-names = "hclk", "cclk"; + bosch,mram-cfg = <0x0 128 64 64 64 64 32 32>; + status = "disabled"; + }; + + m_can3: can@140b8000 { + compatible = "bosch,m_can"; + reg = <0x0 0x140b8000 0x0 0x0200>, + <0x0 0x140b0000 0x0 0x8000>; + reg-names = "m_can", "message_ram"; + interrupts = , + ; + interrupt-names = "int0", "int1"; + pinctrl-names = "default"; + pinctrl-0 = <&m_can3_bus>; + clocks = <&clock_peric PERIC_MCAN3_IPCLKPORT_PCLK>, + <&clock_peric PERIC_MCAN3_IPCLKPORT_CCLK>; + clock-names = "hclk", "cclk"; + bosch,mram-cfg = <0x0 128 64 64 64 64 32 32>; + status = "disabled"; + }; + spi_0: spi@14140000 { compatible = "tesla,fsd-spi"; reg = <0x0 0x14140000 0x0 0x100>;