From patchwork Thu Nov 28 10:46:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kishon Vijay Abraham I X-Patchwork-Id: 180392 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp7346585ilf; Thu, 28 Nov 2019 02:47:57 -0800 (PST) X-Google-Smtp-Source: APXvYqyxZy2/vtDJlw6amcMdFaRGTZQSeKrXXILk96KS5LbxR8g54hEz9EMd/5imfAB+2JX+H6ZI X-Received: by 2002:aa7:da0e:: with SMTP id r14mr37590518eds.49.1574938077422; Thu, 28 Nov 2019 02:47:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574938077; cv=none; d=google.com; s=arc-20160816; b=opq+hqpSFSxykNIHie0YzL4iRbBvfdSXAAaPYPheiHh6xP2qSVyoKc9kd7ktJGieJh Qf2YRbNG13xShmeQuDgRpqI3bqnSAuWyydoU6ZEOt9JfBz2JoRKx+Ozr1DYVHhOYG1cI 2i87ZLxJRo60POBkczLoXddoEyWhsK9MhmVhVbS+zta0nutc34YrW3YNVtxB2m0b5WNI lO7HuEOcQPrO4w8Abm0InvSkYdBXq1hLpW2gMr2KYa05YzanoWf7YDxkKvJzbMudG75Z 5QK/HjnVktTQQ65kAYBYtyhm4XxHTuuM0hWxAiAbZcXsVItGI4TwN8pNZuYG1EedRyO0 w79w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=agcoWtKSTenRqtUlTyzEyGcBRm6Q0+Ai3WNO3BmnFjE=; b=NF1/2/7wKVh0g+e5atXSoHz44K2jx22ZgWTFWixP4PCr5yM4wWRHUE6nJG68sPowW+ 7cJG+stZxB72E+M7ysYp36JyMLanxkgVPVloxSqKOa/i8IBU0MQlOO3c6mIY+hDwqjYY dbLi7kmgBFv7OcBevr6dsfMfS5u6HYzoP0NNbTenl4F2fU6d3B7JJYgU3DzZC0qbuQIw /Yxy38KqL7iIYH+WN1qiBhXo7rBa3s392+8jzntW1Rn3JssxOrPqGyk+fZBMoS6ia+WS xXX4tz3KAfe1jWTdLvG2iKbhOsfjSGeP42XwDxi8QrJkygJaArMNz0xJz3fybWLeknNp r7tw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b="bP5Ky/rG"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k20si10800630ejj.21.2019.11.28.02.47.57; Thu, 28 Nov 2019 02:47:57 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b="bP5Ky/rG"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1727111AbfK1Kry (ORCPT + 26 others); Thu, 28 Nov 2019 05:47:54 -0500 Received: from fllv0016.ext.ti.com ([198.47.19.142]:58034 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727079AbfK1Krw (ORCPT ); Thu, 28 Nov 2019 05:47:52 -0500 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id xASAll4A096685; Thu, 28 Nov 2019 04:47:47 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1574938067; bh=agcoWtKSTenRqtUlTyzEyGcBRm6Q0+Ai3WNO3BmnFjE=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=bP5Ky/rGWNRIJXiEqUEJ3ULSyhXE+Rtzp8Zic6HwXGobf24j5w9oaqrGKcqZ3L/8y Tj2pAvhUnCDG+LRGvFaNIvTBWip7QGaV3oLNydvX6bJdm6YURNewSW/8KylHoPrslk Gdd9nJHaazzctcWjYQhH6H1rD18OSwoM1Nb4gJPo= Received: from DFLE112.ent.ti.com (dfle112.ent.ti.com [10.64.6.33]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id xASAllbp126409 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 28 Nov 2019 04:47:47 -0600 Received: from DFLE100.ent.ti.com (10.64.6.21) by DFLE112.ent.ti.com (10.64.6.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3; Thu, 28 Nov 2019 04:47:47 -0600 Received: from fllv0040.itg.ti.com (10.64.41.20) by DFLE100.ent.ti.com (10.64.6.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3 via Frontend Transport; Thu, 28 Nov 2019 04:47:47 -0600 Received: from a0393678ub.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id xASAlX41098163; Thu, 28 Nov 2019 04:47:44 -0600 From: Kishon Vijay Abraham I To: Kishon Vijay Abraham I , Rob Herring , Anil Varughese , Roger Quadros , Jyri Sarha CC: , Subject: [PATCH v3 04/14] phy: cadence: Sierra: Add support for SERDES_16G used in J721E SoC Date: Thu, 28 Nov 2019 16:16:38 +0530 Message-ID: <20191128104648.21894-5-kishon@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191128104648.21894-1-kishon@ti.com> References: <20191128104648.21894-1-kishon@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org SERDES_16G in TI's J721E SoC uses Cadence Sierra PHY. Add support to use Cadence Sierra driver in J721E SoC. Signed-off-by: Kishon Vijay Abraham I --- drivers/phy/cadence/phy-cadence-sierra.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) -- 2.17.1 diff --git a/drivers/phy/cadence/phy-cadence-sierra.c b/drivers/phy/cadence/phy-cadence-sierra.c index c60809f615af..d3b0dac2db77 100644 --- a/drivers/phy/cadence/phy-cadence-sierra.c +++ b/drivers/phy/cadence/phy-cadence-sierra.c @@ -553,11 +553,25 @@ static const struct cdns_sierra_data cdns_map_sierra = { cdns_usb_regs }; +static const struct cdns_sierra_data cdns_ti_map_sierra = { + SIERRA_MACRO_ID, + 0x0, + 0x1, + ARRAY_SIZE(cdns_pcie_regs), + ARRAY_SIZE(cdns_usb_regs), + cdns_pcie_regs, + cdns_usb_regs +}; + static const struct of_device_id cdns_sierra_id_table[] = { { .compatible = "cdns,sierra-phy-t0", .data = &cdns_map_sierra, }, + { + .compatible = "ti,sierra-phy-t0", + .data = &cdns_ti_map_sierra, + }, {} }; MODULE_DEVICE_TABLE(of, cdns_sierra_id_table); From patchwork Thu Nov 28 10:46:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kishon Vijay Abraham I X-Patchwork-Id: 180393 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp7346593ilf; Thu, 28 Nov 2019 02:47:57 -0800 (PST) X-Google-Smtp-Source: APXvYqwaBBa7ZKnbMrq+FXcF1tb0yxhKYRwdeHMmXbxZXfvBwbTV1avqK8kLQaoYMD2AmqLRPqPv X-Received: by 2002:aa7:d8c4:: with SMTP id k4mr905406eds.299.1574938077852; Thu, 28 Nov 2019 02:47:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574938077; cv=none; d=google.com; s=arc-20160816; b=zGP6p4IThl1jaStoiCzDjoh8Ir/HTQ2Ra89qTkv5rZfHdP3Pl20aho/Qw5994ZALRi NSjtzurb01+75V76yn4z66geoenr6QjXzRvlLwygkT00GOsrU8JCjUabWUn+ptK4dkFo F9/ywAEnueiegM+3JjrTnjFoMcDcyVmAWxB6ilBjm2cDzDcerptdM0WOe1zmPIyN2PAI Y9dj8yTeTYHRiCr8yF5uMLEUN1RFc466XCJ3F4TuvCTRpwcfdzVR+YLETdAjwbn2AnN6 F4Lo7VmT2BNkxdqRUN0FDOJBzeoA4qcveTjqfBVzH2kne8FRsIf9d+67L60FqKZnwxdp G22g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=KgCdmhuOnIHUcH9TRzqb5Eaq1xWjKMdqrGjEhzQdvbA=; b=WB4v44P1VDBQs85nfmVYGJS7wHNGN2I5Mn9nRJh9aRySVpcxexNBDsMczkSg4DkEHw b2aRRnhWgo7bOumfs9AurtUQGc0rulUZPtwigtHPU7fqTaojcG5ObTFW5y2nRq12iRg+ Kt2ZFnOY1P6SOxYsmPxsDXrtDQU07bEFffd0R19SjbMok4Bb48ScYtqCK3GndIiGiFKZ cRnrmLt+O0RmmtVo4up0zWN8FV3LyajbsbQrJP5MeqxeRaVwdUZB9LKL5HGC8jOdjmFW yfAHU5+BQMB1dWGotbA3d4M4ntktJPh5S7IkodhdH6307ikF5cR8Ry4s8MWvA7kvIaq3 nPkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=aYTpBBll; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k20si10800630ejj.21.2019.11.28.02.47.57; Thu, 28 Nov 2019 02:47:57 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=aYTpBBll; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1727139AbfK1Kr4 (ORCPT + 26 others); Thu, 28 Nov 2019 05:47:56 -0500 Received: from fllv0016.ext.ti.com ([198.47.19.142]:58040 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727091AbfK1Krx (ORCPT ); Thu, 28 Nov 2019 05:47:53 -0500 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id xASAloJN096691; Thu, 28 Nov 2019 04:47:50 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1574938070; bh=KgCdmhuOnIHUcH9TRzqb5Eaq1xWjKMdqrGjEhzQdvbA=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=aYTpBBllxSotKLUS+3aoeu31JUJNmHMGX1d6IHWfltmRBfws9iWrTeRUXljYo1SXt R2jejvIr6vx1FrTi1wGnJAGTixTXhsQw2Si7nlkNPPaGvchV8BSNWlQ1sVohXV4X0Z Lip9z23+0APbFNPUbFTt0YZZjvMY43x2lz9NUtZ8= Received: from DFLE114.ent.ti.com (dfle114.ent.ti.com [10.64.6.35]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTP id xASAlo7A118143; Thu, 28 Nov 2019 04:47:50 -0600 Received: from DFLE102.ent.ti.com (10.64.6.23) by DFLE114.ent.ti.com (10.64.6.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3; Thu, 28 Nov 2019 04:47:49 -0600 Received: from fllv0040.itg.ti.com (10.64.41.20) by DFLE102.ent.ti.com (10.64.6.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3 via Frontend Transport; Thu, 28 Nov 2019 04:47:49 -0600 Received: from a0393678ub.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id xASAlX42098163; Thu, 28 Nov 2019 04:47:47 -0600 From: Kishon Vijay Abraham I To: Kishon Vijay Abraham I , Rob Herring , Anil Varughese , Roger Quadros , Jyri Sarha CC: , Subject: [PATCH v3 05/14] phy: cadence: Sierra: Make cdns_sierra_phy_init() as phy_ops Date: Thu, 28 Nov 2019 16:16:39 +0530 Message-ID: <20191128104648.21894-6-kishon@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191128104648.21894-1-kishon@ti.com> References: <20191128104648.21894-1-kishon@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Instead of invoking cdns_sierra_phy_init() from probe, add it in phy_ops so that it's initialized when the PHY consumer invokes phy_init() Signed-off-by: Kishon Vijay Abraham I --- drivers/phy/cadence/phy-cadence-sierra.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) -- 2.17.1 diff --git a/drivers/phy/cadence/phy-cadence-sierra.c b/drivers/phy/cadence/phy-cadence-sierra.c index d3b0dac2db77..bc2ae260359c 100644 --- a/drivers/phy/cadence/phy-cadence-sierra.c +++ b/drivers/phy/cadence/phy-cadence-sierra.c @@ -176,7 +176,7 @@ static struct regmap_config cdns_sierra_phy_config_ctrl_config = { .reg_read = cdns_regmap_read, }; -static void cdns_sierra_phy_init(struct phy *gphy) +static int cdns_sierra_phy_init(struct phy *gphy) { struct cdns_sierra_inst *ins = phy_get_drvdata(gphy); struct cdns_sierra_phy *phy = dev_get_drvdata(gphy->dev.parent); @@ -185,6 +185,10 @@ static void cdns_sierra_phy_init(struct phy *gphy) struct cdns_reg_pairs *vals; u32 num_regs; + /* Initialise the PHY registers, unless auto configured */ + if (phy->autoconf) + return 0; + if (ins->phy_type == PHY_TYPE_PCIE) { num_regs = phy->init_data->pcie_regs; vals = phy->init_data->pcie_vals; @@ -192,7 +196,7 @@ static void cdns_sierra_phy_init(struct phy *gphy) num_regs = phy->init_data->usb_regs; vals = phy->init_data->usb_vals; } else { - return; + return -EINVAL; } for (i = 0; i < ins->num_lanes; i++) { for (j = 0; j < num_regs ; j++) { @@ -200,6 +204,8 @@ static void cdns_sierra_phy_init(struct phy *gphy) regmap_write(regmap, vals[j].off, vals[j].val); } } + + return 0; } static int cdns_sierra_phy_on(struct phy *gphy) @@ -218,6 +224,7 @@ static int cdns_sierra_phy_off(struct phy *gphy) } static const struct phy_ops ops = { + .init = cdns_sierra_phy_init, .power_on = cdns_sierra_phy_on, .power_off = cdns_sierra_phy_off, .owner = THIS_MODULE, @@ -438,10 +445,6 @@ static int cdns_sierra_phy_probe(struct platform_device *pdev) sp->phys[node].phy = gphy; phy_set_drvdata(gphy, &sp->phys[node]); - /* Initialise the PHY registers, unless auto configured */ - if (!sp->autoconf) - cdns_sierra_phy_init(gphy); - node++; } sp->nsubnodes = node; From patchwork Thu Nov 28 10:46:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kishon Vijay Abraham I X-Patchwork-Id: 180396 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp7346719ilf; Thu, 28 Nov 2019 02:48:07 -0800 (PST) X-Google-Smtp-Source: APXvYqye/ZxDuu6TfhFuxIp+7FsMvyP5PcBEpx1xZDz9WkGO3Dj4EuazJnMLNIVXRaP652p4NkJg X-Received: by 2002:a50:fa4a:: with SMTP id c10mr37028380edq.51.1574938087558; Thu, 28 Nov 2019 02:48:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574938087; cv=none; d=google.com; s=arc-20160816; b=M+C8EgXZTO6rTeiqu+EhAblVHTpkX/8IAerLInYKNn1l3r+olpA31O9/kv1nk3/3/e 1dAA7RaLNZg8WKLoETXpgywuoBP5BN0ytVF8QRD9ggbAOXjC0g/igbkCKRy5/XBo3fB/ KpK9/kw5ULiF8S+NR51ZwxUoCZU1rzOFC1QCLInjnTXvPu2FH+RKPwXNAoboJnMW/3HM 6oHBkc2COmviMvpf84EZnmkx99Ua9r2HF5c86oc1RES5N4VKA46M1U30HAZwCDWO5E/m d+kuhrDO5BlSmz1djc4Lgu61S8Qqit5BN94c2huvbWK8KMspakoBtRT1W6sx+/15ZJza BdjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=Zekc0AXiObZrPPvegTp4K5GUPS8IXJOxaEdMQ6wwWA0=; b=rRmgBatFpt3q+9CSZm9rs8W3ASZVdp8UdaYkAUpC/oAfozLtFLWdU4ThfDk3FLQpqj /mUXq3LS8IcCrnFC6c0D3+jum0W8bVdTJCVlOHjpsldyu92pQM4ODGSSoM3WNNCHYVlY lU2VJq1Btus1F07vF+2NI/USWhf1Qf0Jb4nDHpRPYIARzESBSJ/94yEZr+aJVm8X3UzJ nT4Hj0TRDFRjD+8Shdqnt7BZSIScWly3W+yiDSFvzOH3u2a83XMOYKu5MZ3X4FvSaS43 mYjrvJxYAiP1EJ+Yh8PoJM2FtN5IpFENO/VRq53oUQTi3W0166DZEuA9UX17Z+UgKUff rq0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=krMbgEcL; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n12si5460306edb.376.2019.11.28.02.48.07; Thu, 28 Nov 2019 02:48:07 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=krMbgEcL; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1727217AbfK1KsG (ORCPT + 26 others); Thu, 28 Nov 2019 05:48:06 -0500 Received: from fllv0015.ext.ti.com ([198.47.19.141]:52836 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727188AbfK1KsE (ORCPT ); Thu, 28 Nov 2019 05:48:04 -0500 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id xASAm0D6114654; Thu, 28 Nov 2019 04:48:00 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1574938081; bh=Zekc0AXiObZrPPvegTp4K5GUPS8IXJOxaEdMQ6wwWA0=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=krMbgEcLxdkTf3KrYNRLt5BllBEsKHNLdHRzfHARm3CmbQKzx/MSk8jZysBmqpGJV FnKP33u7vTJgJ9rNbM+qTUlaYdvV797ycxBeIOxSNRXKovKoBN8XligWoV27R+uglP wbu/zrfNj1F+5OwLDLPBQQV1gf61hRxOY69evEDg= Received: from DFLE104.ent.ti.com (dfle104.ent.ti.com [10.64.6.25]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id xASAm01M126552 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 28 Nov 2019 04:48:00 -0600 Received: from DFLE113.ent.ti.com (10.64.6.34) by DFLE104.ent.ti.com (10.64.6.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3; Thu, 28 Nov 2019 04:48:00 -0600 Received: from fllv0040.itg.ti.com (10.64.41.20) 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.1847.3 via Frontend Transport; Thu, 28 Nov 2019 04:48:00 -0600 Received: from a0393678ub.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id xASAlX46098163; Thu, 28 Nov 2019 04:47:58 -0600 From: Kishon Vijay Abraham I To: Kishon Vijay Abraham I , Rob Herring , Anil Varughese , Roger Quadros , Jyri Sarha CC: , Subject: [PATCH v3 09/14] phy: cadence: Sierra: Check for PLL lock during PHY power on Date: Thu, 28 Nov 2019 16:16:43 +0530 Message-ID: <20191128104648.21894-10-kishon@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191128104648.21894-1-kishon@ti.com> References: <20191128104648.21894-1-kishon@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Check for PLL lock during PHY power on. Signed-off-by: Kishon Vijay Abraham I --- drivers/phy/cadence/phy-cadence-sierra.c | 33 +++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) -- 2.17.1 diff --git a/drivers/phy/cadence/phy-cadence-sierra.c b/drivers/phy/cadence/phy-cadence-sierra.c index 497c83827670..62bff4b043f0 100644 --- a/drivers/phy/cadence/phy-cadence-sierra.c +++ b/drivers/phy/cadence/phy-cadence-sierra.c @@ -55,6 +55,7 @@ #define SIERRA_PLLCTRL_SUBRATE_PREG 0x03A #define SIERRA_PLLCTRL_GEN_D_PREG 0x03E #define SIERRA_PLLCTRL_CPGAIN_MODE_PREG 0x03F +#define SIERRA_PLLCTRL_STATUS_PREG 0x044 #define SIERRA_CLKPATH_BIASTRIM_PREG 0x04B #define SIERRA_DFE_BIASTRIM_PREG 0x04C #define SIERRA_DRVCTRL_ATTEN_PREG 0x06A @@ -141,11 +142,14 @@ #define SIERRA_MACRO_ID 0x00007364 #define SIERRA_MAX_LANES 4 +#define PLL_LOCK_TIME 100000 static const struct reg_field macro_id_type = REG_FIELD(SIERRA_MACRO_ID_REG, 0, 15); static const struct reg_field phy_pll_cfg_1 = REG_FIELD(SIERRA_PHY_PLL_CFG, 1, 1); +static const struct reg_field pllctrl_lock = + REG_FIELD(SIERRA_PLLCTRL_STATUS_PREG, 0, 0); struct cdns_sierra_inst { struct phy *phy; @@ -192,6 +196,7 @@ struct cdns_sierra_phy { struct regmap *regmap_common_cdb; struct regmap_field *macro_id_type; struct regmap_field *phy_pll_cfg_1; + struct regmap_field *pllctrl_lock[SIERRA_MAX_LANES]; struct clk *clk; int nsubnodes; bool autoconf; @@ -291,10 +296,25 @@ static int cdns_sierra_phy_init(struct phy *gphy) static int cdns_sierra_phy_on(struct phy *gphy) { + struct cdns_sierra_phy *sp = dev_get_drvdata(gphy->dev.parent); struct cdns_sierra_inst *ins = phy_get_drvdata(gphy); + struct device *dev = sp->dev; + u32 val; + int ret; /* Take the PHY lane group out of reset */ - return reset_control_deassert(ins->lnk_rst); + ret = reset_control_deassert(ins->lnk_rst); + if (ret) { + dev_err(dev, "Failed to take the PHY lane out of reset\n"); + return ret; + } + + ret = regmap_field_read_poll_timeout(sp->pllctrl_lock[ins->mlane], + val, val, 1000, PLL_LOCK_TIME); + if (ret < 0) + dev_err(dev, "PLL lock of lane failed\n"); + + return ret; } static int cdns_sierra_phy_off(struct phy *gphy) @@ -350,6 +370,7 @@ static int cdns_regfield_init(struct cdns_sierra_phy *sp) struct device *dev = sp->dev; struct regmap_field *field; struct regmap *regmap; + int i; regmap = sp->regmap_common_cdb; field = devm_regmap_field_alloc(dev, regmap, macro_id_type); @@ -367,6 +388,16 @@ static int cdns_regfield_init(struct cdns_sierra_phy *sp) } sp->phy_pll_cfg_1 = field; + for (i = 0; i < SIERRA_MAX_LANES; i++) { + regmap = sp->regmap_lane_cdb[i]; + field = devm_regmap_field_alloc(dev, regmap, pllctrl_lock); + if (IS_ERR(field)) { + dev_err(dev, "P%d_ENABLE reg field init failed\n", i); + return PTR_ERR(field); + } + sp->pllctrl_lock[i] = field; + } + return 0; } From patchwork Thu Nov 28 10:46:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kishon Vijay Abraham I X-Patchwork-Id: 180397 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp7346773ilf; Thu, 28 Nov 2019 02:48:10 -0800 (PST) X-Google-Smtp-Source: APXvYqwmO0Xb2AUv14h0w0JVXFywOvFZ5nb2BTzTg1M1kStzo/9VcwU3WFfnyUr2JudCVVXK6TO5 X-Received: by 2002:aa7:cac7:: with SMTP id l7mr37768188edt.196.1574938090764; Thu, 28 Nov 2019 02:48:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574938090; cv=none; d=google.com; s=arc-20160816; b=Lcec5BjdFokHPk1qPgz1xYerTVmck3tT1tZhSnJe+PRbf+6zbxmxCqkRB9TvIGD7lR sQRsZM43nVDr3xc5mEXXOV0cKJf/9lgGFqjyyQnzlkDado5n9QyUJ0Tyihu6nkR9HOqt lm18AL4y59IWl5uyfUAzzbHD0V5tnG4cR+WzYb4q5WO02iP7wz2GfXeZgh1B8UmdZ/86 4/bxL4NQKP3pNojw203SYZD4Ji4qDPNrvNi0RQlTK1cuaR1huGJGAegZa7kMb00iBKWP wydnczDCA1IbQqP7qZMhe7iT4aGxIQkSST/9//xUpUHw8wIc0tQx1WRxkbCi20eMIxfO TRdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=uk33OX2/IRV4qk5zeJOpsDKsk+aZEVFfOmbpkxiarpY=; b=rGkzbXKeXwA1UQzqAs2u0K8R4hggrqFhMjYY5WnXc7Y++H9CbGv95+dwjnnpctyLw1 lyCbAGEMbSzUCXh2ImN+z82RlymNFKu81Ms6ZSZGcgCk97Cn7MwXdlFtuQYIO+qxtlVC l1zTtaljIil1wHTxckZ31yssqJGW/OwmzydhzZqLj+SmrLwnTpm9EAWpF509NjFut7Cx +Uf+uV9yfmhd6YkSMDtU9NHM2672a7MJUgFGoSRucvGi/+r/wVn5SO5Ql09OuEZAqouR h3mlaFRFYkuNWwoQl/OoFfxE3Nq7SO3crdNbpZs4KyMia8YJOokd67HAQykba/ZZ6kDh XQkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=ELP+WsRY; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n12si5460306edb.376.2019.11.28.02.48.10; Thu, 28 Nov 2019 02:48:10 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=ELP+WsRY; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1727235AbfK1KsJ (ORCPT + 26 others); Thu, 28 Nov 2019 05:48:09 -0500 Received: from lelv0142.ext.ti.com ([198.47.23.249]:33140 "EHLO lelv0142.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727218AbfK1KsG (ORCPT ); Thu, 28 Nov 2019 05:48:06 -0500 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id xASAm3t8019551; Thu, 28 Nov 2019 04:48:03 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1574938083; bh=uk33OX2/IRV4qk5zeJOpsDKsk+aZEVFfOmbpkxiarpY=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=ELP+WsRYhYM4ZjZqM86jEMcvGcEkGvCyTpgDDJzP2xlBUI3EaUtBplUnk75bHAbx7 s5tHceJAnmIFopgvxM3BhEoQtJO40UU53KuFSYUYpEFXU5yzi6QGtufeVh/OQ7yzOk R7rVYs5HQ317PpqfpBWjFRNdLhlKBAjFGTrSdWXQ= Received: from DFLE114.ent.ti.com (dfle114.ent.ti.com [10.64.6.35]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id xASAm3o6015324 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 28 Nov 2019 04:48:03 -0600 Received: from DFLE101.ent.ti.com (10.64.6.22) by DFLE114.ent.ti.com (10.64.6.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3; Thu, 28 Nov 2019 04:48:03 -0600 Received: from fllv0040.itg.ti.com (10.64.41.20) by DFLE101.ent.ti.com (10.64.6.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3 via Frontend Transport; Thu, 28 Nov 2019 04:48:03 -0600 Received: from a0393678ub.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id xASAlX47098163; Thu, 28 Nov 2019 04:48:01 -0600 From: Kishon Vijay Abraham I To: Kishon Vijay Abraham I , Rob Herring , Anil Varughese , Roger Quadros , Jyri Sarha CC: , Subject: [PATCH v3 10/14] phy: cadence: Sierra: Change MAX_LANES of Sierra to 16 Date: Thu, 28 Nov 2019 16:16:44 +0530 Message-ID: <20191128104648.21894-11-kishon@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191128104648.21894-1-kishon@ti.com> References: <20191128104648.21894-1-kishon@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Sierra SERDES IP supports upto 16 lanes (though not all of it will be enabled in a platform). Allow Sierra driver to support a maximum of upto 16 lanes. Signed-off-by: Kishon Vijay Abraham I --- drivers/phy/cadence/phy-cadence-sierra.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) -- 2.17.1 diff --git a/drivers/phy/cadence/phy-cadence-sierra.c b/drivers/phy/cadence/phy-cadence-sierra.c index 62bff4b043f0..665a6dbc7816 100644 --- a/drivers/phy/cadence/phy-cadence-sierra.c +++ b/drivers/phy/cadence/phy-cadence-sierra.c @@ -141,7 +141,7 @@ #define SIERRA_PHY_PLL_CFG 0xe #define SIERRA_MACRO_ID 0x00007364 -#define SIERRA_MAX_LANES 4 +#define SIERRA_MAX_LANES 16 #define PLL_LOCK_TIME 100000 static const struct reg_field macro_id_type = @@ -199,6 +199,7 @@ struct cdns_sierra_phy { struct regmap_field *pllctrl_lock[SIERRA_MAX_LANES]; struct clk *clk; int nsubnodes; + u32 num_lanes; bool autoconf; }; @@ -235,6 +236,18 @@ static struct regmap_config cdns_sierra_lane_cdb_config[] = { SIERRA_LANE_CDB_REGMAP_CONF("1"), SIERRA_LANE_CDB_REGMAP_CONF("2"), SIERRA_LANE_CDB_REGMAP_CONF("3"), + SIERRA_LANE_CDB_REGMAP_CONF("4"), + SIERRA_LANE_CDB_REGMAP_CONF("5"), + SIERRA_LANE_CDB_REGMAP_CONF("6"), + SIERRA_LANE_CDB_REGMAP_CONF("7"), + SIERRA_LANE_CDB_REGMAP_CONF("8"), + SIERRA_LANE_CDB_REGMAP_CONF("9"), + SIERRA_LANE_CDB_REGMAP_CONF("10"), + SIERRA_LANE_CDB_REGMAP_CONF("11"), + SIERRA_LANE_CDB_REGMAP_CONF("12"), + SIERRA_LANE_CDB_REGMAP_CONF("13"), + SIERRA_LANE_CDB_REGMAP_CONF("14"), + SIERRA_LANE_CDB_REGMAP_CONF("15"), }; static struct regmap_config cdns_sierra_common_cdb_config = { @@ -548,6 +561,8 @@ static int cdns_sierra_phy_probe(struct platform_device *pdev) } } + sp->num_lanes += sp->phys[node].num_lanes; + gphy = devm_phy_create(dev, child, &ops); if (IS_ERR(gphy)) { @@ -561,6 +576,11 @@ static int cdns_sierra_phy_probe(struct platform_device *pdev) } sp->nsubnodes = node; + if (sp->num_lanes > SIERRA_MAX_LANES) { + dev_err(dev, "Invalid lane configuration\n"); + goto put_child2; + } + /* If more than one subnode, configure the PHY as multilink */ if (!sp->autoconf && sp->nsubnodes > 1) regmap_field_write(sp->phy_pll_cfg_1, 0x1); From patchwork Thu Nov 28 10:46:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kishon Vijay Abraham I X-Patchwork-Id: 180398 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp7346827ilf; Thu, 28 Nov 2019 02:48:14 -0800 (PST) X-Google-Smtp-Source: APXvYqysqsI3T4FnBKamz4P2dP6Tq6FlRkpAWPlQxr9EkSCybqiDMfo+pxImH6Gh9JwAKckQlqdS X-Received: by 2002:a50:f612:: with SMTP id c18mr38159821edn.285.1574938093951; Thu, 28 Nov 2019 02:48:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574938093; cv=none; d=google.com; s=arc-20160816; b=TEPn+g1DwqNm0hDj73OHdrZOJxFsjME9tORp27KUoDc30ZM7fYyREnQNJE2v/v0mhG W6XJkFCJR3KXXK2+m9t8VhBJXrwz43Xf1Taw6ksWthSDjZgw92vA1fNNLHrvn1YP6Ioc TGm4qQvJLZ/IWMrR30wT6b1AVnru+1upPZVEbrERu13t2nSRqF6ERBhOMQg6ZeVhrcGs GPBo6Lcj/+ES2kCZX2buzQMVOKcQV/HNZvFrgQs/Oq9i9hOCEKTAKOC8t7nJ0fWgqjOV M9JykYRP773M0NodaxNye79dwD64jkHBFjuNoSD0WfKu6k2OuUPcerXQ37DmQ5f3HsWY m/rw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=hOJHDmL6AFhdHJjk4PXU1SdyLIBqNQCFUPS9hn289rg=; b=N7BnJO4gOhOFfxLubltdhW6SzW+G3LGIBjKve/14XgBwH4SsbQq3H1IEuUxuU2dmM5 ECFGOqBIuxfRREfEVbx9B2KLhmnmesygBXgdA4c9a8wTwO9w/pzC0RdBoRhMIj65jpdq VExhIccTQHErxnVhCmXPznlPKYU+YRxpJvnaXhkC05D520IXp06loscOcrlig7LsvY8p /p4pt4X7rTm/uotrI1KGMU/Ty8TJjsBQXZzTrESIwBHVoQdHTu9rD5guXIEe7Vjrt8hM aCcgt8+02DMD2ehFSPQdJgW54NB3UotiJso/Q5+epCWF7ZDPfW2QNSpN1Q9iQUtmDPf8 SeZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=hgdAwN8e; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l15si11287897ejd.187.2019.11.28.02.48.13; Thu, 28 Nov 2019 02:48:13 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=hgdAwN8e; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1727258AbfK1KsK (ORCPT + 26 others); Thu, 28 Nov 2019 05:48:10 -0500 Received: from fllv0015.ext.ti.com ([198.47.19.141]:52848 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727230AbfK1KsJ (ORCPT ); Thu, 28 Nov 2019 05:48:09 -0500 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id xASAm6gY114676; Thu, 28 Nov 2019 04:48:06 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1574938086; bh=hOJHDmL6AFhdHJjk4PXU1SdyLIBqNQCFUPS9hn289rg=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=hgdAwN8eh+t3k3UEvu7HX8YbGcgi6f817P1ZaYdxKreP1IExtX8nuDgNcQaNzNJZG xskP9sk1ycITzFjZDpyFSRLwiVKeuFHH25GrFBJh8JToK81VmJ+UpKUICpYP+U/jr+ Tzjz0ptUIMqL/cGhQIwWEobwWkjvuVq/0aDD+LQs= Received: from DFLE114.ent.ti.com (dfle114.ent.ti.com [10.64.6.35]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTP id xASAm64N118738; Thu, 28 Nov 2019 04:48:06 -0600 Received: from DFLE111.ent.ti.com (10.64.6.32) by DFLE114.ent.ti.com (10.64.6.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3; Thu, 28 Nov 2019 04:48:06 -0600 Received: from fllv0040.itg.ti.com (10.64.41.20) by DFLE111.ent.ti.com (10.64.6.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3 via Frontend Transport; Thu, 28 Nov 2019 04:48:05 -0600 Received: from a0393678ub.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id xASAlX48098163; Thu, 28 Nov 2019 04:48:03 -0600 From: Kishon Vijay Abraham I To: Kishon Vijay Abraham I , Rob Herring , Anil Varughese , Roger Quadros , Jyri Sarha CC: , Subject: [PATCH v3 11/14] phy: cadence: Sierra: Set cmn_refclk_dig_div/cmn_refclk1_dig_div frequency to 25MHz Date: Thu, 28 Nov 2019 16:16:45 +0530 Message-ID: <20191128104648.21894-12-kishon@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191128104648.21894-1-kishon@ti.com> References: <20191128104648.21894-1-kishon@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Set cmn_refclk_dig_div/cmn_refclk1_dig_div frequency to 25MHz as specified in "Common Module Clock Configurations" of the Cadence Sierra 16FFC Multi-Protocol PHY PMA Specification. It is set to 25MHz since the only user of Cadence Sierra SERDES, TI J721E SoC provides input clock frequency of 100MHz. For other frequencies, cmn_refclk_dig_div/cmn_refclk1_dig_div should be configured based on the "Common Module Clock Configurations". Signed-off-by: Kishon Vijay Abraham I --- drivers/phy/cadence/phy-cadence-sierra.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) -- 2.17.1 diff --git a/drivers/phy/cadence/phy-cadence-sierra.c b/drivers/phy/cadence/phy-cadence-sierra.c index 665a6dbc7816..82466d0e9b38 100644 --- a/drivers/phy/cadence/phy-cadence-sierra.c +++ b/drivers/phy/cadence/phy-cadence-sierra.c @@ -198,6 +198,8 @@ struct cdns_sierra_phy { struct regmap_field *phy_pll_cfg_1; struct regmap_field *pllctrl_lock[SIERRA_MAX_LANES]; struct clk *clk; + struct clk *cmn_refclk_dig_div; + struct clk *cmn_refclk1_dig_div; int nsubnodes; u32 num_lanes; bool autoconf; @@ -279,6 +281,8 @@ static int cdns_sierra_phy_init(struct phy *gphy) if (phy->autoconf) return 0; + clk_set_rate(phy->cmn_refclk_dig_div, 25000000); + clk_set_rate(phy->cmn_refclk1_dig_div, 25000000); if (ins->phy_type == PHY_TYPE_PCIE) { num_cmn_regs = phy->init_data->pcie_cmn_regs; num_ln_regs = phy->init_data->pcie_ln_regs; @@ -468,6 +472,7 @@ static int cdns_sierra_phy_probe(struct platform_device *pdev) struct resource *res; int i, ret, node = 0; void __iomem *base; + struct clk *clk; struct device_node *dn = dev->of_node, *child; if (of_get_child_count(dn) == 0) @@ -523,6 +528,22 @@ static int cdns_sierra_phy_probe(struct platform_device *pdev) return PTR_ERR(sp->apb_rst); } + clk = devm_clk_get_optional(dev, "cmn_refclk_dig_div"); + if (IS_ERR(clk)) { + dev_err(dev, "cmn_refclk_dig_div clock not found\n"); + ret = PTR_ERR(clk); + return ret; + } + sp->cmn_refclk_dig_div = clk; + + clk = devm_clk_get_optional(dev, "cmn_refclk1_dig_div"); + if (IS_ERR(clk)) { + dev_err(dev, "cmn_refclk1_dig_div clock not found\n"); + ret = PTR_ERR(clk); + return ret; + } + sp->cmn_refclk1_dig_div = clk; + ret = clk_prepare_enable(sp->clk); if (ret) return ret; From patchwork Thu Nov 28 10:46:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kishon Vijay Abraham I X-Patchwork-Id: 180399 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp7346874ilf; Thu, 28 Nov 2019 02:48:17 -0800 (PST) X-Google-Smtp-Source: APXvYqzad2M+gVLpAafMrRC0FwCZT57s52AyiDumLuAq1DwS1d4Q+hKTCujpLSv8YFrdqCtZF10q X-Received: by 2002:a17:906:ccc6:: with SMTP id ot6mr54498298ejb.137.1574938097207; Thu, 28 Nov 2019 02:48:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574938097; cv=none; d=google.com; s=arc-20160816; b=zP5xS05kSvROhAKA9YR/dcXzitVPxjLBdx3i756Zgp9mZSyWKZExeABEdx6SOvrHSs l1SHfQsns5Nyg3ubAz0jyQoMhxRCGmZRJGGH/53SyqNwPjmbPzCOeI9U5utSMZ6RdoGB HLRG7l55QaTqXEKbjHy00qmIWyPA3FXkoL6TPgLc0vmjAkcZ84G6ysWq6HxAFuj62HEN 5q/m+ozWeLyRl6k7XzrEH5AxVnW7WO59eG5J7JT3lmkn5k8hlxFEY786Z2knsabBwzZP j9rUgt8L9RUTceR7rDs0xuzrs/zsD4IbtqKH1WM2eDj04qtI4NfhyGlrpdke6Lx3wlbq 1ZKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=HnvQVBmnp47FnJbchzKE+jfH8rWFeTqVgl7/AlfabmE=; b=iRTo8qvSPxNbohLAQQFKeLqvSGxVMhInx22zHL/E/n3Kaulosc+l01VIhKz6YsEPvs 9DXnZdlPQtIZf4YKuFwN6SEVsXmglnJ7pvl+kmCGG04tlb1YX77V5zSWTHMMdrON+Ird +s+WFFlif+gnlCTGRqCvqsj2FNvwP1gYY9fbNDlivX6vuiDp9cLtXUihJHYcbk/mIK37 jQv5a1hFQiwuGx1DHSiPEB5jWSMy9hEpaAW+teOIOWsPiNrFw5RYiWtos/3kAfo/TjNQ TEDajF3A9DsqDWKTlDd5Gs6tpy6vEc8sz6pnDDK2LlA3Yv2rNm3q9wd63dybEv0ahOs7 rNVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=YQ4G4EFJ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d18si3138262edr.167.2019.11.28.02.48.17; Thu, 28 Nov 2019 02:48:17 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=YQ4G4EFJ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1727286AbfK1KsO (ORCPT + 26 others); Thu, 28 Nov 2019 05:48:14 -0500 Received: from lelv0142.ext.ti.com ([198.47.23.249]:33162 "EHLO lelv0142.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727230AbfK1KsM (ORCPT ); Thu, 28 Nov 2019 05:48:12 -0500 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id xASAm9pQ019582; Thu, 28 Nov 2019 04:48:09 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1574938089; bh=HnvQVBmnp47FnJbchzKE+jfH8rWFeTqVgl7/AlfabmE=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=YQ4G4EFJ50ZHmrSNCOQ7k7Oom+cQvG2BDSLBdLklUhtWuBNwaqEiS/vczXS7xQonJ vfe7q0CJDm4C3YRm+YnuK1bGrfrLYzceuXHOLRkIYPLe8FZItHc3xlZnVG1yMvHw4J WR99HmHmsN1iG7/9dGrw2VNZkxu0nSX5mhC5dCh8= Received: from DFLE114.ent.ti.com (dfle114.ent.ti.com [10.64.6.35]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id xASAm8G7015736 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 28 Nov 2019 04:48:09 -0600 Received: from DFLE101.ent.ti.com (10.64.6.22) by DFLE114.ent.ti.com (10.64.6.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3; Thu, 28 Nov 2019 04:48:08 -0600 Received: from fllv0040.itg.ti.com (10.64.41.20) by DFLE101.ent.ti.com (10.64.6.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3 via Frontend Transport; Thu, 28 Nov 2019 04:48:08 -0600 Received: from a0393678ub.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id xASAlX49098163; Thu, 28 Nov 2019 04:48:06 -0600 From: Kishon Vijay Abraham I To: Kishon Vijay Abraham I , Rob Herring , Anil Varughese , Roger Quadros , Jyri Sarha CC: , Subject: [PATCH v3 12/14] phy: cadence: Sierra: Use correct dev pointer in cdns_sierra_phy_remove() Date: Thu, 28 Nov 2019 16:16:46 +0530 Message-ID: <20191128104648.21894-13-kishon@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191128104648.21894-1-kishon@ti.com> References: <20191128104648.21894-1-kishon@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org commit 44d30d622821d3b ("phy: cadence: Add driver for Sierra PHY"), incorrectly used parent device pointer to get driver data. Fix it here. Signed-off-by: Kishon Vijay Abraham I --- drivers/phy/cadence/phy-cadence-sierra.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.17.1 diff --git a/drivers/phy/cadence/phy-cadence-sierra.c b/drivers/phy/cadence/phy-cadence-sierra.c index 82466d0e9b38..eb87f1a0a596 100644 --- a/drivers/phy/cadence/phy-cadence-sierra.c +++ b/drivers/phy/cadence/phy-cadence-sierra.c @@ -625,7 +625,7 @@ static int cdns_sierra_phy_probe(struct platform_device *pdev) static int cdns_sierra_phy_remove(struct platform_device *pdev) { - struct cdns_sierra_phy *phy = dev_get_drvdata(pdev->dev.parent); + struct cdns_sierra_phy *phy = platform_get_drvdata(pdev); int i; reset_control_assert(phy->phy_rst); From patchwork Thu Nov 28 10:46:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kishon Vijay Abraham I X-Patchwork-Id: 180400 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp7346903ilf; Thu, 28 Nov 2019 02:48:18 -0800 (PST) X-Google-Smtp-Source: APXvYqzdwp99Z+DddtV9vpE6CEY6ZZYjqXDP/i19XovJf/b4bRuyBvzO9B0tTxeFu8gwIISoaMGR X-Received: by 2002:a17:906:9417:: with SMTP id q23mr54794305ejx.37.1574938098678; Thu, 28 Nov 2019 02:48:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574938098; cv=none; d=google.com; s=arc-20160816; b=zrkQInP/PQj0u0fcpha60l8YM3DEiEJ1L7cccTL43QIM1VEaDaNJToAHlQQWAz4iO0 17DauK0a+aK1Dk7N36v7h0UFtoxYG0gNBMLOmsNky40fv7jms4e8Jt6Hud5GQ9VjCuyT 4xL4+ODNN2ix3SPfnXGbXpMeK2aPGrISPiOF9Uv6k93SQqhBbYeVo5HBgdTStZg2Rp1U ynWirUtt+mwN7X7ffLzLldJiE4BLTucgPuZ98MVKk64XMEwFycScndk0KREVVlVc6g3Z 8CN/47XZKlXobf0lGbBfmfgYpMzPT1FYPXCJjqKzGEev3rsKyLoDh/e4Svde5fRSnt5H wEqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=A4eexwBxx9jDaE/igS84TVvW6d3QjFYRQu1H+O5DrHo=; b=PID+Vxfvxg6fi2tRSEzbstR3BWMIsI6Rox7TrRL6nbBgTnErjqxYSCX/F/CobuUKKv GxKwiA/sBLOPjLNK6juIP600glj4Sv/EGpesSZNAuS4EIytgFFD2vB6kuHW1ccIcQC/o nva2RHlVqZwiQU2WbpcOuElNeI2I27GjiVe/ioxB50phd9JABIzFo14CBp5XcP6PxRri IjKkkRJaTVMcMzLqbO9ZhQwi3LMAOlM1wUZw0NovnMgvo54/TzdzWNfdhKv8Jak8SRHi RLwP/JztWYwpIHP5IkQ1WQNfSaivYJSmqfzVYJBlFacEedGevFC7ClIvp104sa07SCRh i54A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=Ssa7qyeS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l64si13908211edl.306.2019.11.28.02.48.18; Thu, 28 Nov 2019 02:48:18 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=Ssa7qyeS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1727303AbfK1KsP (ORCPT + 26 others); Thu, 28 Nov 2019 05:48:15 -0500 Received: from lelv0142.ext.ti.com ([198.47.23.249]:33186 "EHLO lelv0142.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727275AbfK1KsO (ORCPT ); Thu, 28 Nov 2019 05:48:14 -0500 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id xASAmBNe019608; Thu, 28 Nov 2019 04:48:11 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1574938091; bh=A4eexwBxx9jDaE/igS84TVvW6d3QjFYRQu1H+O5DrHo=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=Ssa7qyeSHEZPQWpbi7lkaQxmxAu2vl5COTKtmcw//tGxMt+LJmeax1/C1xAtI1pDn AET8Cn0vxiONe759BuEwz6kr71t+pCwkK3OSP10czlWYq/twOV3EVJ8MJUBAYTb0E8 6+H0gZn+epbz06pRi15OicQZ1TyF4s2Gcz2TspqM= Received: from DLEE113.ent.ti.com (dlee113.ent.ti.com [157.170.170.24]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id xASAmBCU126939 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 28 Nov 2019 04:48:11 -0600 Received: from DLEE102.ent.ti.com (157.170.170.32) by DLEE113.ent.ti.com (157.170.170.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3; Thu, 28 Nov 2019 04:48:11 -0600 Received: from fllv0040.itg.ti.com (10.64.41.20) by DLEE102.ent.ti.com (157.170.170.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3 via Frontend Transport; Thu, 28 Nov 2019 04:48:11 -0600 Received: from a0393678ub.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id xASAlX4A098163; Thu, 28 Nov 2019 04:48:09 -0600 From: Kishon Vijay Abraham I To: Kishon Vijay Abraham I , Rob Herring , Anil Varughese , Roger Quadros , Jyri Sarha CC: , Subject: [PATCH v3 13/14] dt-bindings: phy: Document WIZ (SERDES wrapper) bindings Date: Thu, 28 Nov 2019 16:16:47 +0530 Message-ID: <20191128104648.21894-14-kishon@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191128104648.21894-1-kishon@ti.com> References: <20191128104648.21894-1-kishon@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add DT binding documentation for WIZ (SERDES wrapper). WIZ is *NOT* a PHY but a wrapper used to configure some of the input signals to the SERDES. It is used with both Sierra(16G) and Torrent(10G) serdes. Signed-off-by: Kishon Vijay Abraham I [jsarha@ti.com: Add separate compatible for Sierra(16G) and Torrent(10G) SERDES] Signed-off-by: Jyri Sarha --- .../bindings/phy/ti,phy-j721e-wiz.yaml | 158 ++++++++++++++++++ 1 file changed, 158 insertions(+) create mode 100644 Documentation/devicetree/bindings/phy/ti,phy-j721e-wiz.yaml -- 2.17.1 diff --git a/Documentation/devicetree/bindings/phy/ti,phy-j721e-wiz.yaml b/Documentation/devicetree/bindings/phy/ti,phy-j721e-wiz.yaml new file mode 100644 index 000000000000..5cd6f907f6af --- /dev/null +++ b/Documentation/devicetree/bindings/phy/ti,phy-j721e-wiz.yaml @@ -0,0 +1,158 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +# Copyright (C) 2019 Texas Instruments Incorporated - http://www.ti.com/ +%YAML 1.2 +--- +$id: "http://devicetree.org/schemas/phy/ti,phy-j721e-wiz.yaml#" +$schema: "http://devicetree.org/meta-schemas/core.yaml#" + +title: TI J721E WIZ (SERDES Wrapper) + +maintainers: + - Kishon Vijay Abraham I + +properties: + compatible: + enum: + - ti,j721e-wiz-16g + - ti,j721e-wiz-10g + + power-domains: + maxItems: 1 + + clocks: + maxItems: 3 + description: clock-specifier to represent input to the WIZ + + clock-names: + items: + - const: fck + - const: core_ref_clk + - const: ext_ref_clk + + num-lanes: + minimum: 1 + maximum: 4 + + "#address-cells": + const: 1 + + "#size-cells": + const: 1 + + "#reset-cells": + const: 1 + + ranges: true + + assigned-clocks: + maxItems: 2 + + assigned-clock-parents: + maxItems: 2 + +patternProperties: + "^pll[0|1]_refclk$": + type: object + description: | + WIZ node should have subnodes for each of the PLLs present in + the SERDES. + + "^cmn_refclk1?_dig_div$": + type: object + description: | + WIZ node should have subnodes for each of the PMA common refclock + provided by the SERDES. + + "^refclk_dig$": + type: object + description: | + WIZ node should have subnode for refclk_dig to select the reference + clock source for the reference clock used in the PHY and PMA digital + logic. + + "^serdes@[0-9a-f]+$": + type: object + description: | + WIZ node should have '1' subnode for the SERDES. It could be either + Sierra SERDES or Torrent SERDES. Sierra SERDES should follow the + bindings specified in + Documentation/devicetree/bindings/phy/phy-cadence-sierra.txt + Torrent SERDES should follow the bindings specified in + Documentation/devicetree/bindings/phy/phy-cadence-dp.txt + +required: + - compatible + - power-domains + - clocks + - clock-names + - num-lanes + - "#address-cells" + - "#size-cells" + - "#reset-cells" + - ranges + +examples: + - | + #include + + wiz@5000000 { + compatible = "ti,j721e-wiz-16g"; + #address-cells = <1>; + #size-cells = <1>; + power-domains = <&k3_pds 292 TI_SCI_PD_EXCLUSIVE>; + clocks = <&k3_clks 292 5>, <&k3_clks 292 11>, <&dummy_cmn_refclk>; + clock-names = "fck", "core_ref_clk", "ext_ref_clk"; + assigned-clocks = <&k3_clks 292 11>, <&k3_clks 292 0>; + assigned-clock-parents = <&k3_clks 292 15>, <&k3_clks 292 4>; + num-lanes = <2>; + #reset-cells = <1>; + ranges = <0x5000000 0x0 0x5000000 0x10000>; + + pll0_refclk { + clocks = <&k3_clks 293 13>, <&dummy_cmn_refclk>; + clock-output-names = "wiz1_pll0_refclk"; + #clock-cells = <0>; + assigned-clocks = <&wiz1_pll0_refclk>; + assigned-clock-parents = <&k3_clks 293 13>; + }; + + pll1_refclk { + clocks = <&k3_clks 293 0>, <&dummy_cmn_refclk1>; + clock-output-names = "wiz1_pll1_refclk"; + #clock-cells = <0>; + assigned-clocks = <&wiz1_pll1_refclk>; + assigned-clock-parents = <&k3_clks 293 0>; + }; + + cmn_refclk_dig_div { + clocks = <&wiz1_refclk_dig>; + clock-output-names = "wiz1_cmn_refclk_dig_div"; + #clock-cells = <0>; + }; + + cmn_refclk1_dig_div { + clocks = <&wiz1_pll1_refclk>; + clock-output-names = "wiz1_cmn_refclk1_dig_div"; + #clock-cells = <0>; + }; + + refclk_dig { + clocks = <&k3_clks 292 11>, <&k3_clks 292 0>, <&dummy_cmn_refclk>, <&dummy_cmn_refclk1>; + clock-output-names = "wiz0_refclk_dig"; + #clock-cells = <0>; + assigned-clocks = <&wiz0_refclk_dig>; + assigned-clock-parents = <&k3_clks 292 11>; + }; + + serdes@5000000 { + compatible = "cdns,ti,sierra-phy-t0"; + reg-names = "serdes"; + reg = <0x5000000 0x10000>; + #address-cells = <1>; + #size-cells = <0>; + resets = <&serdes_wiz0 0>; + reset-names = "sierra_reset"; + clocks = <&wiz0_cmn_refclk_dig_div>, <&wiz0_cmn_refclk1_dig_div>; + clock-names = "cmn_refclk_dig_div", "cmn_refclk1_dig_div"; + }; + };