Message ID | 20230413223051.24455-5-jm@ti.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1361544vqo; Thu, 13 Apr 2023 15:37:22 -0700 (PDT) X-Google-Smtp-Source: AKy350ZLFG8dkDQtEFVms37DgYS9rMXCMfNN9NHcEWQ0yjet4Cpfs+HdqtwTBTJCm2c9+E9DiMeW X-Received: by 2002:a05:6a20:3423:b0:e7:56ad:5a40 with SMTP id i35-20020a056a20342300b000e756ad5a40mr3357227pzd.36.1681425442670; Thu, 13 Apr 2023 15:37:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681425442; cv=none; d=google.com; s=arc-20160816; b=H58X1itDTGIrqD467EHQjSDJN2zjzaqvjBOxn20rg+SZVYY2a1xGY9BwVscO8JF5Xk C1pilrWyrk9PZXwrIA2CLPEvufW9j5AI9EeWp7Q3sdGA7KGQFxh0EPbCSPz5PuRRv4iH W6g/OJRScsx+xwiqHFCIYwzL/oKIPPS8HlKGGjkpLeTC8x2AAaT5aJBO+QsMG98/qOwP Kp8bYHn6zoQJvTcxvEbEnfMcC/sHEdmYbOT6idRTWWszce1N01sugQBB3320KpM21w+m 7YBkobmHjAO/UjI2JV2N/612x4rA3jhukrDEOwgpJlR13kNX0PH+BZUtVeZQiU/hPJPo uazw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=OEDwhwZYUg5c6D6b0NeNY00UKEjgXiSxHW2Wae+XH3Q=; b=s07QAy8AvE/8x2EDCuxbeFqk0yfvRrrtn1LltXRqgrM5yqSW7Vw+uG7WuXnAfohx0X KS3x3N2P5yy8Ir+TMkGxmLtFd0Z+fdCYqvBL6KITBd/p5n5Dao2w/7Qg+ODXCl22sRUx 3hSFcBtGnphNHmOLKYsolhrIHUZv1/TONgCQ2+uOH0hRx8XwMejLbsZRERgQhZh4efE3 MFebqM66ERVIvKGfoYRser0DEU0ggtu61GoxttV2/5/YjVa4zmuRms/CdV6T/mz2DkHP fU9QG+BbVleacOSNqEqaQrcdSzDHdYNzrfYHQbRVmj5bEM74AUs6K4opTYqpx2AgxUok D2Jg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=BXGfjo50; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i190-20020a6387c7000000b00517ac1a9a63si2990889pge.129.2023.04.13.15.37.10; Thu, 13 Apr 2023 15:37:22 -0700 (PDT) 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=@ti.com header.s=ti-com-17Q1 header.b=BXGfjo50; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230251AbjDMWbY (ORCPT <rfc822;peter110.wang@gmail.com> + 99 others); Thu, 13 Apr 2023 18:31:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47050 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229924AbjDMWbO (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 13 Apr 2023 18:31:14 -0400 Received: from lelv0143.ext.ti.com (lelv0143.ext.ti.com [198.47.23.248]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A690C86AC; Thu, 13 Apr 2023 15:31:13 -0700 (PDT) Received: from fllv0034.itg.ti.com ([10.64.40.246]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 33DMUqUC021540; Thu, 13 Apr 2023 17:30:52 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1681425052; bh=OEDwhwZYUg5c6D6b0NeNY00UKEjgXiSxHW2Wae+XH3Q=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=BXGfjo50zmrFTwH5KS3e4n2hyX4WGBEx8IJaKFJWH3gNHDHy8kOZtHWs+oSrawi5o CXdpBsDic+2TQRA+JpydvVhrEvKU77g5S30q6oAgeaEIbO/ftDrcCogVVQLMySVJH7 U9dLlozDD46bzmNnV91AHItM4rOWg50f/n83mP0Q= Received: from DFLE105.ent.ti.com (dfle105.ent.ti.com [10.64.6.26]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 33DMUqDM074970 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 13 Apr 2023 17:30:52 -0500 Received: from DFLE107.ent.ti.com (10.64.6.28) by DFLE105.ent.ti.com (10.64.6.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16; Thu, 13 Apr 2023 17:30:52 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DFLE107.ent.ti.com (10.64.6.28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16 via Frontend Transport; Thu, 13 Apr 2023 17:30:52 -0500 Received: from a0498204.dal.design.ti.com (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 33DMUpa7063427; Thu, 13 Apr 2023 17:30:52 -0500 From: Judith Mendez <jm@ti.com> To: Chandrasekar Ramakrishnan <rcsekar@samsung.com> CC: Nishanth Menon <nm@ti.com>, Vignesh Raghavendra <vigneshr@ti.com>, Andrew Davis <afd@ti.com>, Wolfgang Grandegger <wg@grandegger.com>, Marc Kleine-Budde <mkl@pengutronix.de>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, <linux-can@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <devicetree@vger.kernel.org>, <netdev@vger.kernel.org>, Schuyler Patton <spatton@ti.com> Subject: [RFC PATCH 4/5] arm64: dts: ti: Enable multiple MCAN for AM62x in MCU MCAN overlay Date: Thu, 13 Apr 2023 17:30:50 -0500 Message-ID: <20230413223051.24455-5-jm@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230413223051.24455-1-jm@ti.com> References: <20230413223051.24455-1-jm@ti.com> MIME-Version: 1.0 Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 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,URIBL_BLOCKED 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1763102365019026600?= X-GMAIL-MSGID: =?utf-8?q?1763102365019026600?= |
Series |
Enable multiple MCAN on AM62x
|
|
Commit Message
Judith Mendez
April 13, 2023, 10:30 p.m. UTC
Enable two MCAN in MCU domain. AM62x does not have on-board CAN
transcievers, so instead of changing the DTB permanently, add
MCU MCAN nodes and transceiver nodes to a MCU MCAN overlay.
If there are no hardware interrupts rounted to the GIC interrupt
controller for MCAN IP, A53 Linux will not receive hardware
interrupts. If an hrtimer is used to generate software interrupts,
the two required interrupt attributes in the MCAN node do not have
to be included.
Signed-off-by: Judith Mendez <jm@ti.com>
---
arch/arm64/boot/dts/ti/Makefile | 2 +-
.../boot/dts/ti/k3-am625-sk-mcan-mcu.dtso | 75 +++++++++++++++++++
2 files changed, 76 insertions(+), 1 deletion(-)
create mode 100644 arch/arm64/boot/dts/ti/k3-am625-sk-mcan-mcu.dtso
Comments
On 14/04/2023 00:30, Judith Mendez wrote: > Enable two MCAN in MCU domain. AM62x does not have on-board CAN > transcievers, so instead of changing the DTB permanently, add > MCU MCAN nodes and transceiver nodes to a MCU MCAN overlay. > > If there are no hardware interrupts rounted to the GIC interrupt > controller for MCAN IP, A53 Linux will not receive hardware > interrupts. If an hrtimer is used to generate software interrupts, > the two required interrupt attributes in the MCAN node do not have > to be included. > > Signed-off-by: Judith Mendez <jm@ti.com> > --- > arch/arm64/boot/dts/ti/Makefile | 2 +- > .../boot/dts/ti/k3-am625-sk-mcan-mcu.dtso | 75 +++++++++++++++++++ > 2 files changed, 76 insertions(+), 1 deletion(-) > create mode 100644 arch/arm64/boot/dts/ti/k3-am625-sk-mcan-mcu.dtso > > diff --git a/arch/arm64/boot/dts/ti/Makefile b/arch/arm64/boot/dts/ti/Makefile > index abe15e76b614..c76be3888e4d 100644 > --- a/arch/arm64/boot/dts/ti/Makefile > +++ b/arch/arm64/boot/dts/ti/Makefile > @@ -9,7 +9,7 @@ > # alphabetically. > > # Boards with AM62x SoC > -k3-am625-sk-mcan-dtbs := k3-am625-sk.dtb k3-am625-sk-mcan-main.dtbo > +k3-am625-sk-mcan-dtbs := k3-am625-sk.dtb k3-am625-sk-mcan-main.dtbo k3-am625-sk-mcan-mcu.dtbo > dtb-$(CONFIG_ARCH_K3) += k3-am625-beagleplay.dtb > dtb-$(CONFIG_ARCH_K3) += k3-am625-sk.dtb > dtb-$(CONFIG_ARCH_K3) += k3-am625-sk-mcan.dtb > diff --git a/arch/arm64/boot/dts/ti/k3-am625-sk-mcan-mcu.dtso b/arch/arm64/boot/dts/ti/k3-am625-sk-mcan-mcu.dtso > new file mode 100644 > index 000000000000..777705aea546 > --- /dev/null > +++ b/arch/arm64/boot/dts/ti/k3-am625-sk-mcan-mcu.dtso > @@ -0,0 +1,75 @@ > +// SPDX-License-Identifier: GPL-2.0 > +/** > + * DT overlay for MCAN in MCU domain on AM625 SK > + * > + * Copyright (C) 2022 Texas Instruments Incorporated - https://www.ti.com/ > + */ > + > +/dts-v1/; > +/plugin/; > + > +#include <dt-bindings/pinctrl/k3.h> > +#include <dt-bindings/soc/ti,sci_pm_domain.h> > + > + > +&{/} { > + transceiver2: can-phy1 { > + compatible = "ti,tcan1042"; > + #phy-cells = <0>; > + max-bitrate = <5000000>; > + }; > + > + transceiver3: can-phy2 { > + compatible = "ti,tcan1042"; > + #phy-cells = <0>; > + max-bitrate = <5000000>; > + }; > +}; > + > +&mcu_pmx0 { > + mcu_mcan1_pins_default: mcu-mcan1-pins-default { > + pinctrl-single,pins = < > + AM62X_IOPAD(0x038, PIN_INPUT, 0) /* (B3) MCU_MCAN0_RX */ > + AM62X_IOPAD(0x034, PIN_OUTPUT, 0) /* (D6) MCU_MCAN0_TX */ > + >; > + }; > + > + mcu_mcan2_pins_default: mcu-mcan2-pins-default { > + pinctrl-single,pins = < > + AM62X_IOPAD(0x040, PIN_INPUT, 0) /* (D4) MCU_MCAN1_RX */ > + AM62X_IOPAD(0x03C, PIN_OUTPUT, 0) /* (E5) MCU_MCAN1_TX */ > + >; > + }; > +}; > + > +&cbass_mcu { > + mcu_mcan1: can@4e00000 { > + compatible = "bosch,m_can"; > + reg = <0x00 0x4e00000 0x00 0x8000>, > + <0x00 0x4e08000 0x00 0x200>; > + reg-names = "message_ram", "m_can"; > + power-domains = <&k3_pds 188 TI_SCI_PD_EXCLUSIVE>; > + clocks = <&k3_clks 188 6>, <&k3_clks 188 1>; > + clock-names = "hclk", "cclk"; > + bosch,mram-cfg = <0x0 128 64 64 64 64 32 32>; > + pinctrl-names = "default"; > + pinctrl-0 = <&mcu_mcan1_pins_default>; > + phys = <&transceiver2>; > + status = "okay"; okay is by default. Why do you need it? Best regards, Krzysztof
On 10:01-20230414, Krzysztof Kozlowski wrote: > On 14/04/2023 00:30, Judith Mendez wrote: > > Enable two MCAN in MCU domain. AM62x does not have on-board CAN > > transcievers, so instead of changing the DTB permanently, add > > MCU MCAN nodes and transceiver nodes to a MCU MCAN overlay. > > > > If there are no hardware interrupts rounted to the GIC interrupt > > controller for MCAN IP, A53 Linux will not receive hardware > > interrupts. If an hrtimer is used to generate software interrupts, > > the two required interrupt attributes in the MCAN node do not have > > to be included. > > > > Signed-off-by: Judith Mendez <jm@ti.com> > > --- > > arch/arm64/boot/dts/ti/Makefile | 2 +- > > .../boot/dts/ti/k3-am625-sk-mcan-mcu.dtso | 75 +++++++++++++++++++ > > 2 files changed, 76 insertions(+), 1 deletion(-) > > create mode 100644 arch/arm64/boot/dts/ti/k3-am625-sk-mcan-mcu.dtso > > > > diff --git a/arch/arm64/boot/dts/ti/Makefile b/arch/arm64/boot/dts/ti/Makefile > > index abe15e76b614..c76be3888e4d 100644 > > --- a/arch/arm64/boot/dts/ti/Makefile > > +++ b/arch/arm64/boot/dts/ti/Makefile > > @@ -9,7 +9,7 @@ > > # alphabetically. > > > > # Boards with AM62x SoC > > -k3-am625-sk-mcan-dtbs := k3-am625-sk.dtb k3-am625-sk-mcan-main.dtbo > > +k3-am625-sk-mcan-dtbs := k3-am625-sk.dtb k3-am625-sk-mcan-main.dtbo k3-am625-sk-mcan-mcu.dtbo > > dtb-$(CONFIG_ARCH_K3) += k3-am625-beagleplay.dtb > > dtb-$(CONFIG_ARCH_K3) += k3-am625-sk.dtb > > dtb-$(CONFIG_ARCH_K3) += k3-am625-sk-mcan.dtb > > diff --git a/arch/arm64/boot/dts/ti/k3-am625-sk-mcan-mcu.dtso b/arch/arm64/boot/dts/ti/k3-am625-sk-mcan-mcu.dtso > > new file mode 100644 > > index 000000000000..777705aea546 > > --- /dev/null > > +++ b/arch/arm64/boot/dts/ti/k3-am625-sk-mcan-mcu.dtso > > @@ -0,0 +1,75 @@ > > +// SPDX-License-Identifier: GPL-2.0 > > +/** > > + * DT overlay for MCAN in MCU domain on AM625 SK > > + * > > + * Copyright (C) 2022 Texas Instruments Incorporated - https://www.ti.com/ > > + */ > > + > > +/dts-v1/; > > +/plugin/; > > + > > +#include <dt-bindings/pinctrl/k3.h> > > +#include <dt-bindings/soc/ti,sci_pm_domain.h> NAK. > > + > > + > > +&{/} { > > + transceiver2: can-phy1 { > > + compatible = "ti,tcan1042"; > > + #phy-cells = <0>; > > + max-bitrate = <5000000>; > > + }; > > + > > + transceiver3: can-phy2 { > > + compatible = "ti,tcan1042"; > > + #phy-cells = <0>; > > + max-bitrate = <5000000>; > > + }; > > +}; > > + > > +&mcu_pmx0 { > > + mcu_mcan1_pins_default: mcu-mcan1-pins-default { > > + pinctrl-single,pins = < > > + AM62X_IOPAD(0x038, PIN_INPUT, 0) /* (B3) MCU_MCAN0_RX */ > > + AM62X_IOPAD(0x034, PIN_OUTPUT, 0) /* (D6) MCU_MCAN0_TX */ > > + >; > > + }; > > + > > + mcu_mcan2_pins_default: mcu-mcan2-pins-default { > > + pinctrl-single,pins = < > > + AM62X_IOPAD(0x040, PIN_INPUT, 0) /* (D4) MCU_MCAN1_RX */ > > + AM62X_IOPAD(0x03C, PIN_OUTPUT, 0) /* (E5) MCU_MCAN1_TX */ > > + >; > > + }; > > +}; > > + > > +&cbass_mcu { > > + mcu_mcan1: can@4e00000 { > > + compatible = "bosch,m_can"; > > + reg = <0x00 0x4e00000 0x00 0x8000>, > > + <0x00 0x4e08000 0x00 0x200>; > > + reg-names = "message_ram", "m_can"; > > + power-domains = <&k3_pds 188 TI_SCI_PD_EXCLUSIVE>; > > + clocks = <&k3_clks 188 6>, <&k3_clks 188 1>; > > + clock-names = "hclk", "cclk"; > > + bosch,mram-cfg = <0x0 128 64 64 64 64 32 32>; > > + pinctrl-names = "default"; > > + pinctrl-0 = <&mcu_mcan1_pins_default>; > > + phys = <&transceiver2>; > > + status = "okay"; > > okay is by default. Why do you need it? mcan is not functional without pinmux, so it has been disabled by default in SoC. this overlay is supposed to enable it. But this is done entirely wrongly. The mcu_mcan1 should first be added to the SoC.dtsi as disabled, then set to okay with pinctrl and transciever in the overlay.
On 14/04/2023 20:29, Nishanth Menon wrote: >>> + >>> +&cbass_mcu { >>> + mcu_mcan1: can@4e00000 { >>> + compatible = "bosch,m_can"; >>> + reg = <0x00 0x4e00000 0x00 0x8000>, >>> + <0x00 0x4e08000 0x00 0x200>; >>> + reg-names = "message_ram", "m_can"; >>> + power-domains = <&k3_pds 188 TI_SCI_PD_EXCLUSIVE>; >>> + clocks = <&k3_clks 188 6>, <&k3_clks 188 1>; >>> + clock-names = "hclk", "cclk"; >>> + bosch,mram-cfg = <0x0 128 64 64 64 64 32 32>; >>> + pinctrl-names = "default"; >>> + pinctrl-0 = <&mcu_mcan1_pins_default>; >>> + phys = <&transceiver2>; >>> + status = "okay"; >> >> okay is by default. Why do you need it? > > mcan is not functional without pinmux, so it has been disabled by > default in SoC. this overlay is supposed to enable it. But this is done > entirely wrongly. Ah, so this is override of existing node? Why not overriding by label/phandle? Best regards, Krzysztof
On 22:44-20230414, Krzysztof Kozlowski wrote: > On 14/04/2023 20:29, Nishanth Menon wrote: > >>> + > >>> +&cbass_mcu { > >>> + mcu_mcan1: can@4e00000 { > >>> + compatible = "bosch,m_can"; > >>> + reg = <0x00 0x4e00000 0x00 0x8000>, > >>> + <0x00 0x4e08000 0x00 0x200>; > >>> + reg-names = "message_ram", "m_can"; > >>> + power-domains = <&k3_pds 188 TI_SCI_PD_EXCLUSIVE>; > >>> + clocks = <&k3_clks 188 6>, <&k3_clks 188 1>; > >>> + clock-names = "hclk", "cclk"; > >>> + bosch,mram-cfg = <0x0 128 64 64 64 64 32 32>; > >>> + pinctrl-names = "default"; > >>> + pinctrl-0 = <&mcu_mcan1_pins_default>; > >>> + phys = <&transceiver2>; > >>> + status = "okay"; > >> > >> okay is by default. Why do you need it? > > > > mcan is not functional without pinmux, so it has been disabled by > > default in SoC. this overlay is supposed to enable it. But this is done > > entirely wrongly. > > Ah, so this is override of existing node? Why not overriding by > label/phandle? Yep, that is how it should be done (as every other node is done for mcan): a) SoC.dtsi -> introduce mcu_mcan1, disabled since no transciever or pinmux, set status = "disabled"; b) overlay -> use the label and provide the missing properties, set status = "okay"; The series definitely needs a respin.
Hello, all On 4/14/2023 5:11 PM, Nishanth Menon wrote: > On 22:44-20230414, Krzysztof Kozlowski wrote: >> On 14/04/2023 20:29, Nishanth Menon wrote: >>>>> + >>>>> +&cbass_mcu { >>>>> + mcu_mcan1: can@4e00000 { >>>>> + compatible = "bosch,m_can"; >>>>> + reg = <0x00 0x4e00000 0x00 0x8000>, >>>>> + <0x00 0x4e08000 0x00 0x200>; >>>>> + reg-names = "message_ram", "m_can"; >>>>> + power-domains = <&k3_pds 188 TI_SCI_PD_EXCLUSIVE>; >>>>> + clocks = <&k3_clks 188 6>, <&k3_clks 188 1>; >>>>> + clock-names = "hclk", "cclk"; >>>>> + bosch,mram-cfg = <0x0 128 64 64 64 64 32 32>; >>>>> + pinctrl-names = "default"; >>>>> + pinctrl-0 = <&mcu_mcan1_pins_default>; >>>>> + phys = <&transceiver2>; >>>>> + status = "okay"; >>>> >>>> okay is by default. Why do you need it? >>> >>> mcan is not functional without pinmux, so it has been disabled by >>> default in SoC. this overlay is supposed to enable it. But this is done >>> entirely wrongly. >> >> Ah, so this is override of existing node? Why not overriding by >> label/phandle? > > Yep, that is how it should be done (as every other node is done for > mcan): > a) SoC.dtsi -> introduce mcu_mcan1, disabled since no transciever or > pinmux, set status = "disabled"; > b) overlay -> use the label and provide the missing properties, set > status = "okay"; > > The series definitely needs a respin. > Thanks for your feedback, I will definitely fix and send out a v2 with this update. Thanks, Judith
diff --git a/arch/arm64/boot/dts/ti/Makefile b/arch/arm64/boot/dts/ti/Makefile index abe15e76b614..c76be3888e4d 100644 --- a/arch/arm64/boot/dts/ti/Makefile +++ b/arch/arm64/boot/dts/ti/Makefile @@ -9,7 +9,7 @@ # alphabetically. # Boards with AM62x SoC -k3-am625-sk-mcan-dtbs := k3-am625-sk.dtb k3-am625-sk-mcan-main.dtbo +k3-am625-sk-mcan-dtbs := k3-am625-sk.dtb k3-am625-sk-mcan-main.dtbo k3-am625-sk-mcan-mcu.dtbo dtb-$(CONFIG_ARCH_K3) += k3-am625-beagleplay.dtb dtb-$(CONFIG_ARCH_K3) += k3-am625-sk.dtb dtb-$(CONFIG_ARCH_K3) += k3-am625-sk-mcan.dtb diff --git a/arch/arm64/boot/dts/ti/k3-am625-sk-mcan-mcu.dtso b/arch/arm64/boot/dts/ti/k3-am625-sk-mcan-mcu.dtso new file mode 100644 index 000000000000..777705aea546 --- /dev/null +++ b/arch/arm64/boot/dts/ti/k3-am625-sk-mcan-mcu.dtso @@ -0,0 +1,75 @@ +// SPDX-License-Identifier: GPL-2.0 +/** + * DT overlay for MCAN in MCU domain on AM625 SK + * + * Copyright (C) 2022 Texas Instruments Incorporated - https://www.ti.com/ + */ + +/dts-v1/; +/plugin/; + +#include <dt-bindings/pinctrl/k3.h> +#include <dt-bindings/soc/ti,sci_pm_domain.h> + + +&{/} { + transceiver2: can-phy1 { + compatible = "ti,tcan1042"; + #phy-cells = <0>; + max-bitrate = <5000000>; + }; + + transceiver3: can-phy2 { + compatible = "ti,tcan1042"; + #phy-cells = <0>; + max-bitrate = <5000000>; + }; +}; + +&mcu_pmx0 { + mcu_mcan1_pins_default: mcu-mcan1-pins-default { + pinctrl-single,pins = < + AM62X_IOPAD(0x038, PIN_INPUT, 0) /* (B3) MCU_MCAN0_RX */ + AM62X_IOPAD(0x034, PIN_OUTPUT, 0) /* (D6) MCU_MCAN0_TX */ + >; + }; + + mcu_mcan2_pins_default: mcu-mcan2-pins-default { + pinctrl-single,pins = < + AM62X_IOPAD(0x040, PIN_INPUT, 0) /* (D4) MCU_MCAN1_RX */ + AM62X_IOPAD(0x03C, PIN_OUTPUT, 0) /* (E5) MCU_MCAN1_TX */ + >; + }; +}; + +&cbass_mcu { + mcu_mcan1: can@4e00000 { + compatible = "bosch,m_can"; + reg = <0x00 0x4e00000 0x00 0x8000>, + <0x00 0x4e08000 0x00 0x200>; + reg-names = "message_ram", "m_can"; + power-domains = <&k3_pds 188 TI_SCI_PD_EXCLUSIVE>; + clocks = <&k3_clks 188 6>, <&k3_clks 188 1>; + clock-names = "hclk", "cclk"; + bosch,mram-cfg = <0x0 128 64 64 64 64 32 32>; + pinctrl-names = "default"; + pinctrl-0 = <&mcu_mcan1_pins_default>; + phys = <&transceiver2>; + status = "okay"; + }; + + mcu_mcan2: can@4e10000 { + compatible = "bosch,m_can"; + reg = <0x00 0x4e10000 0x00 0x8000>, + <0x00 0x4e18000 0x00 0x200>; + reg-names = "message_ram", "m_can"; + power-domains = <&k3_pds 189 TI_SCI_PD_EXCLUSIVE>; + clocks = <&k3_clks 189 6>, <&k3_clks 189 1>; + clock-names = "hclk", "cclk"; + bosch,mram-cfg = <0x0 128 64 64 64 64 32 32>; + pinctrl-names = "default"; + pinctrl-0 = <&mcu_mcan2_pins_default>; + phys = <&transceiver3>; + status = "okay"; + }; +};