Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp2014020lqa; Tue, 30 Apr 2024 06:15:42 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUQhwfCEgTA5wMON2ufEzMvlQv2zVYpTLluZs5QcnVlVe0thrE9oXz2mnuoy3tbcV4t57C2V4vNu1R8iaOeFZOZZ2uoae584fFnZ6jxRQ== X-Google-Smtp-Source: AGHT+IHYsRdMpPHGLwvo+DcR1ZNcZztSnsBnOr0L4AGvjVv93iMRyhQO2QaRg1FYTA+Sm/+Hq89o X-Received: by 2002:a05:6a20:dd93:b0:1a7:23c0:24e7 with SMTP id kw19-20020a056a20dd9300b001a723c024e7mr11210817pzb.42.1714482942332; Tue, 30 Apr 2024 06:15:42 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714482942; cv=pass; d=google.com; s=arc-20160816; b=B32uexc/KaWtcIi+xwuv/UMxXiI9nf14IJIFEfOuDuAyTQm2kGZdmCyAaLvrmA7/qG rxtN8bAn8WAfLF9KwYbgdL0MefVV/CCDwem7PMoZJrQW/67W1KKtFSeDkooS5P7IeatA qDHKHFhVhy/X7mfDvKpx8wefFD0HftsQUeGLrwcRGTT2pbjUuLc6nasyjwWpMl0BLDSz BW44fx+pwkQBmBYdWsp+L7Xk40fBQDNwANhDQ4KpYgeZWRyfcD3pWyEVt8Dy0+VXwu2F 2i4yzHK2FS86Nl4yy+70Qom85d+4JnyauBDYY996zXAIcC30NH9DvdZxnajcuVc/Tjbs RwOQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=vNdyiWs0x6rJrsBCMraD3865GiI0ITcITr7GM/VZIZI=; fh=Cvew2bAa7hL+zZWynwnZv2bujaD7YVxO0OIR42WNyGQ=; b=ACNJtTzbLY1mx2Y9OdNLeXlxuYMEtrQpo1fYGPuZjAyY4NX+kwnWzIFumcxLFc1+Hv nRywWmfuk62NpLlPTgKMuF6X20h1VzV20fP1OzNldowByrQzHoh/lvjbN809zqeozOyw Jp7YB1WrsGPD7e6KyPfifQw+dB8LOG0NLXIW6TZH6P29yoluXJJJBN6ywIJjJSxECPX5 w7/JqISAO/1bR6Fj0t32LP05MWzE2Eod0S/gIqsNuD2usj4lGSNhRjEmluXggNE7Q2PO T0Oqqyr+3bjxjz7Y2+vGKRWZKsGUaFhB21/db9UO7k5yzijpjDyzkcI47JX0FBxsk/Zo a4HQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=XpFMj+Tu; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-163972-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-163972-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id d15-20020a65620f000000b005f76fa3ebb9si21516041pgv.396.2024.04.30.06.15.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Apr 2024 06:15:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-163972-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=XpFMj+Tu; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-163972-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-163972-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id EC812281013 for ; Tue, 30 Apr 2024 13:15:41 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 74076171E57; Tue, 30 Apr 2024 13:15:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="XpFMj+Tu" Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8ECCE171650; Tue, 30 Apr 2024 13:15:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.23.249 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714482928; cv=none; b=P6z8JIhk8POAgomV9EgobifOgeN+tmA83U+d1intePXjm02f4WfeJLQM3+tAfGNldEtyPHVSfisdKzSSNBz6fBnnaOjP4OQOtjBNlQf/fFrrw6bhQ6TWVeR9lCRjqeQswLYJezqyFyEuGRL9yPfghnDOtfFfsSczwImYByTivbU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714482928; c=relaxed/simple; bh=757iCYoIsKkUcdsP57iRDgmlBFTQS9/413EFwB/892I=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=Sz/2lMW14XdOvAD6cAHAkETueiaVzCEzLn0x/Oo84jGYK/RnpSf++2aGH5+VRiZSFLH35ygyuY7cANF5Ams4QNWmtCne48F73z+Y5kxiRvU+LVImgHRvd6Z5Egeivv6Yb+PPzWuZjyCHZFwgZd+shbjJNZtji5uxLv5gwWwlWug= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=XpFMj+Tu; arc=none smtp.client-ip=198.47.23.249 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 43UDFHF6090073; Tue, 30 Apr 2024 08:15:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1714482917; bh=vNdyiWs0x6rJrsBCMraD3865GiI0ITcITr7GM/VZIZI=; h=From:To:CC:Subject:Date; b=XpFMj+Tu42b26EP9+JPjhaaDhm260BpvTsDauabG2EOTlrk+1QTvvhMbi7OH1aEkJ 3wkKKV+TvDN/ovf6OoSlmz11ypE9Rd8ozVxWmTT7wQzS/DC+Qa+H16bPEas/xdaBBH 3rprYhXpjAlSxS/UAeoBSiL4aBxO9pp3n6079vNo= Received: from DLEE115.ent.ti.com (dlee115.ent.ti.com [157.170.170.26]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 43UDFHAg025359 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 30 Apr 2024 08:15:17 -0500 Received: from DLEE103.ent.ti.com (157.170.170.33) by DLEE115.ent.ti.com (157.170.170.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Tue, 30 Apr 2024 08:15:17 -0500 Received: from lelvsmtp6.itg.ti.com (10.180.75.249) by DLEE103.ent.ti.com (157.170.170.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Tue, 30 Apr 2024 08:15:17 -0500 Received: from uda0510294.dhcp.ti.com (uda0510294.dhcp.ti.com [10.24.69.66]) by lelvsmtp6.itg.ti.com (8.15.2/8.15.2) with ESMTP id 43UDFD5n026323; Tue, 30 Apr 2024 08:15:14 -0500 From: Beleswar Padhi To: CC: , , , , , , , , , Subject: [PATCH v4] arm64: dts: ti: k3-j721e-sk: Add support for multiple CAN instances Date: Tue, 30 Apr 2024 18:45:12 +0530 Message-ID: <20240430131512.1327283-1-b-padhi@ti.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 CAN instance 0 in the mcu domain is brought on the J721E-SK board through header J1. Thus, add its respective transceiver 1 dt node to add support for this CAN instance. CAN instances 0, 5 and 9 in the main domain are brought on the J721E-SK board through headers J5, J6 and J2 respectively. Thus, add their respective transceivers 2, 3 and 4 dt nodes to add support for these CAN instances. Signed-off-by: Beleswar Padhi --- Test logs: https://gist.github.com/3V3RYONE/2144fa883bf3a390981d25572971fcf3 v4: Changelog: 1) Made transceiver ID and can-phy ID in sync for all applicable nodes Link to v3: https://lore.kernel.org/all/20240412112025.201639-1-b-padhi@ti.com/ v3: Changelog: 1) Updated board name in capital letters in commit message description 2) Updated test logs to include communication between all applicable CAN instances Link to v2: https://lore.kernel.org/linux-arm-kernel/20240325103405.182692-1-b-padhi@ti.com/ v2: Changelog: 1) Re-ordered status = "okay" property to the end of all applicable dt nodes following kernel documentation Link to v1: https://lore.kernel.org/linux-arm-kernel/20240315124728.490331-1-b-padhi@ti.com/ arch/arm64/boot/dts/ti/k3-j721e-sk.dts | 116 +++++++++++++++++++++++++ 1 file changed, 116 insertions(+) diff --git a/arch/arm64/boot/dts/ti/k3-j721e-sk.dts b/arch/arm64/boot/dts/ti/k3-j721e-sk.dts index 0c4575ad8d7c..02e6c49b7090 100644 --- a/arch/arm64/boot/dts/ti/k3-j721e-sk.dts +++ b/arch/arm64/boot/dts/ti/k3-j721e-sk.dts @@ -210,6 +210,42 @@ vdd_sd_dv_alt: gpio-regulator-tps659411 { <3300000 0x1>; }; + transceiver1: can-phy1 { + compatible = "ti,tcan1042"; + #phy-cells = <0>; + max-bitrate = <5000000>; + pinctrl-names = "default"; + pinctrl-0 = <&mcu_mcan0_gpio_pins_default>; + standby-gpios = <&wkup_gpio0 3 GPIO_ACTIVE_HIGH>; + }; + + transceiver2: can-phy2 { + compatible = "ti,tcan1042"; + #phy-cells = <0>; + max-bitrate = <5000000>; + pinctrl-names = "default"; + pinctrl-0 = <&main_mcan0_gpio_pins_default>; + standby-gpios = <&main_gpio0 65 GPIO_ACTIVE_HIGH>; + }; + + transceiver3: can-phy3 { + compatible = "ti,tcan1042"; + #phy-cells = <0>; + max-bitrate = <5000000>; + pinctrl-names = "default"; + pinctrl-0 = <&main_mcan5_gpio_pins_default>; + standby-gpios = <&main_gpio0 66 GPIO_ACTIVE_HIGH>; + }; + + transceiver4: can-phy4 { + compatible = "ti,tcan1042"; + #phy-cells = <0>; + max-bitrate = <5000000>; + pinctrl-names = "default"; + pinctrl-0 = <&main_mcan9_gpio_pins_default>; + standby-gpios = <&main_gpio0 67 GPIO_ACTIVE_HIGH>; + }; + dp_pwr_3v3: fixedregulator-dp-prw { compatible = "regulator-fixed"; regulator-name = "dp-pwr"; @@ -367,6 +403,45 @@ J721E_IOPAD(0x164, PIN_OUTPUT, 7) /* (V29) RGMII5_TD2 */ >; }; + main_mcan0_pins_default: main-mcan0-default-pins { + pinctrl-single,pins = < + J721E_IOPAD(0x208, PIN_INPUT, 0) /* (W5) MCAN0_RX */ + J721E_IOPAD(0x20c, PIN_OUTPUT, 0) /* (W6) MCAN0_TX */ + >; + }; + + main_mcan0_gpio_pins_default: main-mcan0-gpio-default-pins { + pinctrl-single,pins = < + J721E_IOPAD(0x108, PIN_INPUT, 7) /* (AD27) PRG0_PRU1_GPO2.GPIO0_65 */ + >; + }; + + main_mcan5_pins_default: main-mcan5-default-pins { + pinctrl-single,pins = < + J721E_IOPAD(0x050, PIN_INPUT, 6) /* (AE21) PRG1_PRU0_GPO18.MCAN5_RX */ + J721E_IOPAD(0x04c, PIN_OUTPUT, 6) /* (AJ21) PRG1_PRU0_GPO17.MCAN5_TX */ + >; + }; + + main_mcan5_gpio_pins_default: main-mcan5-gpio-default-pins { + pinctrl-single,pins = < + J721E_IOPAD(0x10c, PIN_INPUT, 7) /* (AC25) PRG0_PRU1_GPO3.GPIO0_66 */ + >; + }; + + main_mcan9_pins_default: main-mcan9-default-pins { + pinctrl-single,pins = < + J721E_IOPAD(0x0d0, PIN_INPUT, 6) /* (AC27) PRG0_PRU0_GPO8.MCAN9_RX */ + J721E_IOPAD(0x0cc, PIN_OUTPUT, 6) /* (AC28) PRG0_PRU0_GPO7.MCAN9_TX */ + >; + }; + + main_mcan9_gpio_pins_default: main-mcan9-gpio-default-pins { + pinctrl-single,pins = < + J721E_IOPAD(0x110, PIN_INPUT, 7) /* (AD29) PRG0_PRU1_GPO4.GPIO0_67 */ + >; + }; + dp0_pins_default: dp0-default-pins { pinctrl-single,pins = < J721E_IOPAD(0x1c4, PIN_INPUT, 5) /* SPI0_CS1.DP0_HPD */ @@ -555,6 +630,19 @@ J721E_WKUP_IOPAD(0xfc, PIN_INPUT_PULLUP, 0) /* (H24) WKUP_I2C0_SDA */ >; }; + mcu_mcan0_pins_default: mcu-mcan0-default-pins { + pinctrl-single,pins = < + J721E_WKUP_IOPAD(0x0ac, PIN_INPUT, 0) /* (C29) MCU_MCAN0_RX */ + J721E_WKUP_IOPAD(0x0a8, PIN_OUTPUT, 0) /* (D29) MCU_MCAN0_TX */ + >; + }; + + mcu_mcan0_gpio_pins_default: mcu-mcan0-gpio-default-pins { + pinctrl-single,pins = < + J721E_WKUP_IOPAD(0x0bc, PIN_INPUT, 7) /* (F27) WKUP_GPIO0_3 */ + >; + }; + /* Reset for M.2 M Key slot on PCIe1 */ mkey_reset_pins_default: mkey-reset-pns-default-pins { pinctrl-single,pins = < @@ -1108,6 +1196,34 @@ &pcie1_rc { num-lanes = <2>; }; +&mcu_mcan0 { + pinctrl-names = "default"; + pinctrl-0 = <&mcu_mcan0_pins_default>; + phys = <&transceiver1>; + status = "okay"; +}; + +&main_mcan0 { + pinctrl-names = "default"; + pinctrl-0 = <&main_mcan0_pins_default>; + phys = <&transceiver2>; + status = "okay"; +}; + +&main_mcan5 { + pinctrl-names = "default"; + pinctrl-0 = <&main_mcan5_pins_default>; + phys = <&transceiver3>; + status = "okay"; +}; + +&main_mcan9 { + pinctrl-names = "default"; + pinctrl-0 = <&main_mcan9_pins_default>; + phys = <&transceiver4>; + status = "okay"; +}; + &ufs_wrapper { status = "disabled"; }; -- 2.34.1