From patchwork Fri Feb 24 10:24:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ravi Gunasekaran X-Patchwork-Id: 61242 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp827804wrd; Fri, 24 Feb 2023 02:39:21 -0800 (PST) X-Google-Smtp-Source: AK7set/s987W+IXYQLw9usCJtiT4JFZygZHP3c6RDv6EP7YWo0ablkP2/d0NnpZTdgPne7eemiGg X-Received: by 2002:a17:90b:388a:b0:235:82d0:3a36 with SMTP id mu10-20020a17090b388a00b0023582d03a36mr18542525pjb.41.1677235161121; Fri, 24 Feb 2023 02:39:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677235161; cv=none; d=google.com; s=arc-20160816; b=jXX2xQkF+i3Yycf4TJ8okb+izw4xxef0ys2b0xhjc5FcAU1PyleI+c/6kt+raDzm+7 Swde2dToPsi7mzHvAdazkYpFdde/MhSjaOS1SrbnI3KNv4E4jJcuIVnNUSzbZizGCtMu vhbEGwLB6QI0Z6ZrCwi6ZJktDJRygVOIgLacqb6ToT+2fJz/hUzUdvDXZAYCHIOinyfy +aJmJVyLIfhKp+VB8wrHVpFXNW6BEmRaLRsKal+GLcF6BNnfgcQXXA3MWmIQLsr6amzG FRcQSSEqStY4ezKFE/KakZHsrAa9c0EA+IOiZ8GD91gWeTkq6wSzBrcFvtzU/uXnP9rF CGmQ== 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=iBEcollxNDut7UqeP0yJeTdIgs1H/qFEAp45USoOXEM=; b=UcAGvNIA4Xa7giFdPzPqrDEGHKnHyVLXe/sEp6/EnVp3B91tPYVgOl8q+cqVqhS/1U wCSJ7K7NZ06S/Udo52BNYbaVJDuYcR2+K8RIK30V8IUfX+3B2Nmwx+IV5/L4DOunBGt5 hdo1BDa8VEtGqdtr9vyyFf01UWkIb68Ivt/SS6Y3P3L7HmzMPb19c1ziuH3UVJhOBufQ A8vRQIV+9XgRaB+jv5n8z2woBJ3RiY4DeHJjWKmC5uN4ZLbNHb9PBFxNNttwCMd+Mhl7 /AONO07d5SW32CQ/F/FZBxCbeNTMBnLSHU4UQDXSkDEi9di/RgLUJAUpZHcLOIHTn29o E7DQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=OB9ZGjQ8; 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 cp13-20020a17090afb8d00b002349fd50c3bsi2242711pjb.40.2023.02.24.02.39.08; Fri, 24 Feb 2023 02:39:21 -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=@ti.com header.s=ti-com-17Q1 header.b=OB9ZGjQ8; 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 S229844AbjBXK1C (ORCPT + 99 others); Fri, 24 Feb 2023 05:27:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51926 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229769AbjBXK07 (ORCPT ); Fri, 24 Feb 2023 05:26:59 -0500 Received: from fllv0016.ext.ti.com (fllv0016.ext.ti.com [198.47.19.142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E75E74A1ED; Fri, 24 Feb 2023 02:26:20 -0800 (PST) Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 31OAOosU036008; Fri, 24 Feb 2023 04:24:50 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1677234290; bh=iBEcollxNDut7UqeP0yJeTdIgs1H/qFEAp45USoOXEM=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=OB9ZGjQ87s3KFBzXgcbjuiBDl1JVMjD/h7uc0wM7qaFC7EEYOx8ZH3cJYwozAU4pb w6iXWfG/BKU4OAA4Ags1b25FsF/TS5YhujilvDlsX4CTdhaONBd9BE0b5emRi7oVah xfY7FoUChaunvZTY0sG0P6C/1bhu2rHhH7uC5lXs= Received: from DFLE110.ent.ti.com (dfle110.ent.ti.com [10.64.6.31]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 31OAOohj045636 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 24 Feb 2023 04:24:50 -0600 Received: from DFLE113.ent.ti.com (10.64.6.34) by DFLE110.ent.ti.com (10.64.6.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16; Fri, 24 Feb 2023 04:24:50 -0600 Received: from lelv0326.itg.ti.com (10.180.67.84) by DFLE113.ent.ti.com (10.64.6.34) 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; Fri, 24 Feb 2023 04:24:50 -0600 Received: from uda0500640.dal.design.ti.com (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 31OAOcXc016652; Fri, 24 Feb 2023 04:24:47 -0600 From: Ravi Gunasekaran To: , , , , , , , , CC: , , Subject: [PATCH v11 2/8] arm64: dts: ti: k3-j721s2-main: Add SERDES and WIZ device tree node Date: Fri, 24 Feb 2023 15:54:32 +0530 Message-ID: <20230224102438.6541-3-r-gunasekaran@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230224102438.6541-1-r-gunasekaran@ti.com> References: <20230224102438.6541-1-r-gunasekaran@ti.com> MIME-Version: 1.0 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 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?1758708536387067482?= X-GMAIL-MSGID: =?utf-8?q?1758708536387067482?= From: Matt Ranostay Add dt node for the single instance of WIZ (SERDES wrapper) and SERDES module shared by PCIe, eDP and USB. Signed-off-by: Matt Ranostay Signed-off-by: Ravi Gunasekaran --- I had reviewed this patch in the v7 series [0]. Since I'm taking over upstreaming this series, I removed the self Reviewed-by tag. [0] - https://lore.kernel.org/lkml/4173e0c6-61d9-5b79-44ec-317870de070b@ti.com/ Changes from v10: * Fixed dtbs warnings by adding "reg" property to the mux-controller nodes * Documented the reason for disabling the nodes by default * Removed Link tag from commit message Changes from v9: * Disabled serdes related nodes by default in common DT file Changes from v8: * No change Changes from v7: * Updated mux-controller node name Changes from v6: * Fixed the incorrect "compatible" property Changes from v5: * Removed Cc tag from commit message Changes from v4: * No change Changes from v3: * No change Changes from v2: * Reworked SERDES + WIZ enablement patchset to use properies for clocks defines versus entire devicetree nodes. Results in cleaner code that doesn't break dt-schema or the driver functionality. Changes from v1: * Update mux-controller node name arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi | 69 ++++++++++++++++++++++ 11 file changed, 69 insertions(+) diff --git a/arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi b/arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi index c6b5ffbcbc73..c9b90ffb4f7c 100644 --- a/arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi +++ b/arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi @@ -5,6 +5,17 @@ * Copyright (C) 2021 Texas Instruments Incorporated - https://www.ti.com/ */ +#include +#include + +/ { + serdes_refclk: clock-cmnrefclk { + #clock-cells = <0>; + compatible = "fixed-clock"; + clock-frequency = <0>; + }; +}; + &cbass_main { msmc_ram: sram@70000000 { compatible = "mmio-sram"; @@ -39,6 +50,14 @@ #mux-control-cells = <1>; mux-reg-masks = <0x0 0x8000000>; /* USB0 to SERDES0 lane 1/3 mux */ }; + + serdes_ln_ctrl: mux-controller@80 { + compatible = "mmio-mux"; + reg = <0x80 0x10>; + #mux-control-cells = <1>; + mux-reg-masks = <0x80 0x3>, <0x84 0x3>, /* SERDES0 lane0/1 select */ + <0x88 0x3>, <0x8c 0x3>; /* SERDES0 lane2/3 select */ + }; }; gic500: interrupt-controller@1800000 { @@ -802,6 +821,56 @@ }; }; + serdes_wiz0: wiz@5060000 { + compatible = "ti,j721s2-wiz-10g"; + #address-cells = <1>; + #size-cells = <1>; + power-domains = <&k3_pds 365 TI_SCI_PD_EXCLUSIVE>; + clocks = <&k3_clks 365 0>, <&k3_clks 365 3>, <&serdes_refclk>; + clock-names = "fck", "core_ref_clk", "ext_ref_clk"; + num-lanes = <4>; + #reset-cells = <1>; + #clock-cells = <1>; + ranges = <0x5060000 0x0 0x5060000 0x10000>; + + assigned-clocks = <&k3_clks 365 3>; + assigned-clock-parents = <&k3_clks 365 7>; + + /* + * Disable the node by default in the common include file. + * And enable it in the board specific DT file where the + * pinmux property is added. + */ + status = "disabled"; + + serdes0: serdes@5060000 { + compatible = "ti,j721e-serdes-10g"; + reg = <0x05060000 0x00010000>; + reg-names = "torrent_phy"; + resets = <&serdes_wiz0 0>; + reset-names = "torrent_reset"; + clocks = <&serdes_wiz0 TI_WIZ_PLL0_REFCLK>, + <&serdes_wiz0 TI_WIZ_PHY_EN_REFCLK>; + clock-names = "refclk", "phy_en_refclk"; + assigned-clocks = <&serdes_wiz0 TI_WIZ_PLL0_REFCLK>, + <&serdes_wiz0 TI_WIZ_PLL1_REFCLK>, + <&serdes_wiz0 TI_WIZ_REFCLK_DIG>; + assigned-clock-parents = <&k3_clks 365 3>, + <&k3_clks 365 3>, + <&k3_clks 365 3>; + #address-cells = <1>; + #size-cells = <0>; + #clock-cells = <1>; + + /* + * Disable the node by default in the common include + * file. And enable it in the board specific DT file + * where the pinmux property is added. + */ + status = "disabled"; + }; + }; + main_mcan0: can@2701000 { compatible = "bosch,m_can"; reg = <0x00 0x02701000 0x00 0x200>,