Received: by 2002:a05:6358:701b:b0:131:369:b2a3 with SMTP id 27csp4213553rwo; Tue, 25 Jul 2023 02:26:49 -0700 (PDT) X-Google-Smtp-Source: APBJJlFpBG1LlLsiGx02b232kZJAirQT3vuy2cdz19PTDvprToo6ypLhOSpbZRGceEUUvJBIRcyz X-Received: by 2002:a17:907:763b:b0:98e:933:28fe with SMTP id jy27-20020a170907763b00b0098e093328femr11195127ejc.66.1690277209661; Tue, 25 Jul 2023 02:26:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690277209; cv=none; d=google.com; s=arc-20160816; b=z/XrLrt/xpK/qAYHJvulHB6u2CV+2Urgx/ra6TVEP8PHcDBpdlbm5KfCX6KlDtpJQa AUBWk/URMGXC+pg2GPt/kvCPsOMhfC+mrS4PiKRw8MfRrFAVqFvOEdOa0w/967+INo3p cTGhsnPqbE6nnhedO6HXWs0gaI3YGrDKXt6uiD5IYFK82YBPMDqDVCK2wFns4lUGfZuj ZJ559wX9ZWKKvWrRFWSPpjM7Cj8Qwt0p6ucjuNzLUgdu/xcB9o/FvXijEYAV5rkAJiCl /GHYhT5BVRiatemMauq6cXT8F2eeGRjRrtr1wmxxFp3YIyAylAO8B8RtVfccbEzq3g9G mkjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=PYv2F9TGO+8iiuiu+JUOxxqpOZW3GXXXquvGVj3k/sY=; fh=NHv1syU6Vh4q/PRSb7jnBXhjaeJgSWp/eA4b7UJsdTg=; b=I1Mbn6/EENBYetytON5yvr5tAlPm7fgaF4TA7RNAir6c/NVZVrD4iIR8l+x4cKn08K KRv4wCfrHRjMrzljAUq4+fuLK7jxJScLjxipUAmSIXPJLssad/LHVI8BxfNL7X30F70Q 0jQ/vFLtgtOH7Y9jITxgxQfCwWmGdO/f2hoPLl4UUSBlqf98ioA5Noc38FscQ4mhCrX8 nDYiIQ6OH/fU1i8F6Yjma0qD9zZv23C3hMOiN+uk8xbEV04neBdIT7BuGatIv4sQJ1sx gO0Rz+L/xcAFdjkdjHcN9f9iENGwj1puUgduaVZ87poWGo9gN/7yz+bnqOz1CNEV4bcO iS4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b="RfbCii/0"; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d13-20020a1709064c4d00b00997c3561696si7844594ejw.577.2023.07.25.02.26.25; Tue, 25 Jul 2023 02:26:49 -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="RfbCii/0"; 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 S229568AbjGYJAR (ORCPT + 99 others); Tue, 25 Jul 2023 05:00:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44596 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232574AbjGYJAB (ORCPT ); Tue, 25 Jul 2023 05:00:01 -0400 Received: from fllv0015.ext.ti.com (fllv0015.ext.ti.com [198.47.19.141]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 19E3E98; Tue, 25 Jul 2023 01:59:59 -0700 (PDT) Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 36P8xeSs107055; Tue, 25 Jul 2023 03:59:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1690275580; bh=PYv2F9TGO+8iiuiu+JUOxxqpOZW3GXXXquvGVj3k/sY=; h=From:To:CC:Subject:Date; b=RfbCii/09/IMnbxREzTK3YLKHZxyUc70obzKQjQI7jyKuO2K6i9XhBPuIbI7JgQLm 85Tz6E5jJAyvN8b9h+zZNuwC1twBEx66RPH4N8Y3BD1ANvmPa8YPlIx0em/Lo+CH6F M2ZcoOJCEOuWI0I4ND2TaBsFrr0glRQtF/Mz28UU= Received: from DFLE103.ent.ti.com (dfle103.ent.ti.com [10.64.6.24]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 36P8xePH031419 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 25 Jul 2023 03:59:40 -0500 Received: from DFLE108.ent.ti.com (10.64.6.29) by DFLE103.ent.ti.com (10.64.6.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Tue, 25 Jul 2023 03:59:40 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DFLE108.ent.ti.com (10.64.6.29) 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, 25 Jul 2023 03:59:40 -0500 Received: from localhost (ileaxei01-snat.itg.ti.com [10.180.69.5]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 36P8xdKm117679; Tue, 25 Jul 2023 03:59:40 -0500 From: Bhavya Kapoor To: , , CC: , , , , , , , Subject: [PATCH v6] arm64: dts: ti: k3-j721s2: Add support for CAN instances 3 and 5 in main domain Date: Tue, 25 Jul 2023 14:29:39 +0530 Message-ID: <20230725085939.536766-1-b-kapoor@ti.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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,T_SCC_BODY_TEXT_LINE,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: X-Mailing-List: linux-kernel@vger.kernel.org CAN instances 3 and 5 in the main domain are brought on the common processor board through header J27 and J28. The CAN High and Low lines from the SoC are routed through a mux on the SoM. The select lines need to be set for the CAN signals to get connected to the transceivers on the common processor board. Threfore, add respective mux, transceiver dt nodes to add support for these CAN instances. Reviewed-by: Udit Kumar Signed-off-by: Bhavya Kapoor --- changelog v5->v6: - Changed node names for pins to match with json schema conversion Link to v5 : https://lore.kernel.org/all/20230724111751.86422-1-b-kapoor@ti.com/ .../dts/ti/k3-j721s2-common-proc-board.dts | 46 +++++++++++++++++++ arch/arm64/boot/dts/ti/k3-j721s2-som-p0.dtsi | 12 +++++ 2 files changed, 58 insertions(+) diff --git a/arch/arm64/boot/dts/ti/k3-j721s2-common-proc-board.dts b/arch/arm64/boot/dts/ti/k3-j721s2-common-proc-board.dts index 04d4739d7245..a2c5ccd6897f 100644 --- a/arch/arm64/boot/dts/ti/k3-j721s2-common-proc-board.dts +++ b/arch/arm64/boot/dts/ti/k3-j721s2-common-proc-board.dts @@ -29,6 +29,8 @@ aliases { can0 = &main_mcan16; can1 = &mcu_mcan0; can2 = &mcu_mcan1; + can3 = &main_mcan3; + can4 = &main_mcan5; }; evm_12v0: fixedregulator-evm12v0 { @@ -109,6 +111,22 @@ transceiver2: can-phy2 { standby-gpios = <&wkup_gpio0 2 GPIO_ACTIVE_HIGH>; }; + transceiver3: can-phy3 { + compatible = "ti,tcan1043"; + #phy-cells = <0>; + max-bitrate = <5000000>; + standby-gpios = <&exp2 7 GPIO_ACTIVE_LOW>; + enable-gpios = <&exp2 6 GPIO_ACTIVE_HIGH>; + mux-states = <&mux0 1>; + }; + + transceiver4: can-phy4 { + compatible = "ti,tcan1042"; + #phy-cells = <0>; + max-bitrate = <5000000>; + standby-gpios = <&exp_som 7 GPIO_ACTIVE_HIGH>; + mux-states = <&mux1 1>; + }; }; &main_pmx0 { @@ -152,6 +170,20 @@ main_usbss0_pins_default: main-usbss0-default-pins { J721S2_IOPAD(0x0ec, PIN_OUTPUT, 6) /* (AG25) TIMER_IO1.USB0_DRVVBUS */ >; }; + + main_mcan3_pins_default: main-mcan3-default-pins { + pinctrl-single,pins = < + J721S2_IOPAD(0x080, PIN_INPUT, 0) /* (U26) MCASP0_AXR4.MCAN3_RX */ + J721S2_IOPAD(0x07c, PIN_OUTPUT, 0) /* (T27) MCASP0_AXR3.MCAN3_TX */ + >; + }; + + main_mcan5_pins_default: main-mcan5-default-pins { + pinctrl-single,pins = < + J721S2_IOPAD(0x03c, PIN_INPUT, 0) /* (U27) MCASP0_AFSX.MCAN5_RX */ + J721S2_IOPAD(0x038, PIN_OUTPUT, 0) /* (AB28) MCASP0_ACLKX.MCAN5_TX */ + >; + }; }; &wkup_pmx2 { @@ -460,3 +492,17 @@ adc { ti,adc-channels = <0 1 2 3 4 5 6 7>; }; }; + +&main_mcan3 { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&main_mcan3_pins_default>; + phys = <&transceiver3>; +}; + +&main_mcan5 { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&main_mcan5_pins_default>; + phys = <&transceiver4>; +}; diff --git a/arch/arm64/boot/dts/ti/k3-j721s2-som-p0.dtsi b/arch/arm64/boot/dts/ti/k3-j721s2-som-p0.dtsi index d57dd43da0ef..594766482071 100644 --- a/arch/arm64/boot/dts/ti/k3-j721s2-som-p0.dtsi +++ b/arch/arm64/boot/dts/ti/k3-j721s2-som-p0.dtsi @@ -31,6 +31,18 @@ secure_ddr: optee@9e800000 { }; }; + mux0: mux-controller { + compatible = "gpio-mux"; + #mux-state-cells = <1>; + mux-gpios = <&exp_som 1 GPIO_ACTIVE_HIGH>; + }; + + mux1: mux-controller { + compatible = "gpio-mux"; + #mux-state-cells = <1>; + mux-gpios = <&exp_som 2 GPIO_ACTIVE_HIGH>; + }; + transceiver0: can-phy0 { /* standby pin has been grounded by default */ compatible = "ti,tcan1042"; -- 2.34.1