From patchwork Tue Dec 22 07:05:10 2020 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: 346607 Delivered-To: patch@linaro.org Received: by 2002:a02:85a7:0:0:0:0:0 with SMTP id d36csp5095771jai; Mon, 21 Dec 2020 23:07:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJzv/pejwhGxl+daCtWq6QnAdDAjQx2l/bC/ZoUFvwhNH/RENxPsZ826GNOX8zQJsI35S54Y X-Received: by 2002:a17:907:6e6:: with SMTP id yh6mr18943676ejb.512.1608620873115; Mon, 21 Dec 2020 23:07:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608620873; cv=none; d=google.com; s=arc-20160816; b=TAFWheBjuIHeJMyeW2YdcP7F3ax4qIngLXTeT8TlOXtlBqyewvQNoO6R68GxPo09kD +Xh/EPHBNcaGNNYL/6HfMpG5sueBkvVLiCrnZHsovZxM8Rn10o88oS4zmUZwRljUQlqW m2rUlVqetsYb/Ufk72fxlPOxl0TQBklxXGkBf/kTTXO+6F1u6E2LPlW4FHb9GtbuLChT AR9SjV7vWlUu/j6lXGHaw110AtKK1wMkMxCm6zCMs9RjoIPVplsNkrfb+rLYz/Oe88C3 ZImo/Vqx88/tMckrXIvVVhp9wA5M/fbNoDMHwzLBe/IFkuqsY2XM9raKszptw8dunKL8 cGvw== 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=FjCTHLq/sEj9KXmxRwSejCjWFaAdBEX/mJW7iTNR8qs=; b=sWg/RH2bAhThX2n/LNx0uyUpaUUf0M7pjyFmUi4ENhY0jBSOKBu7WME24Mgb0SxRI5 6EtkTef86VZtIYeWoegVp8zaU7ZUlh3tU4K0szGIaGCgXBQawVIQr8Ln7TbsNjq1kiGO sjw4GxTM9irquz/kwsp8oEFPzilcbdjqVDcuv0Mp8ayk7kbTGyvZAKWdxOTnHxJ5adta dn2H740DvWVcOQdPYvxrsWB3PdMP0FBjEL28+BwdI4hc350wmIsWwIB6MRHw6070g+R2 hUehpeM8UAS5rORT+hlpUhnUMUlrthDrYeZEM/czSIwGQDwsdjKZPeIlcX89RZ2Kv/fw qDcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=kqL+3iEV; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-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. [23.128.96.18]) by mx.google.com with ESMTP id h4si1408831edf.490.2020.12.21.23.07.52; Mon, 21 Dec 2020 23:07:53 -0800 (PST) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=kqL+3iEV; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-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 S1726146AbgLVHG3 (ORCPT + 7 others); Tue, 22 Dec 2020 02:06:29 -0500 Received: from fllv0015.ext.ti.com ([198.47.19.141]:53870 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726123AbgLVHG2 (ORCPT ); Tue, 22 Dec 2020 02:06:28 -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 0BM75fna064140; Tue, 22 Dec 2020 01:05:41 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1608620741; bh=FjCTHLq/sEj9KXmxRwSejCjWFaAdBEX/mJW7iTNR8qs=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=kqL+3iEVg69buo1X5wufY3l41SA7r7u0t9UODIe3lYXbGfLIIUgLzr4vaQVHDL4uu 2fsmCu+ikzM6lX+fHL/zOt+LjizHmXPvIQQEkPybq2HCaVyVwIDxt9gLVxb6S5Hatc H5du1xUNhFs6y/fCI6oY4g+qfB5PAVNnF95+schA= Received: from DFLE101.ent.ti.com (dfle101.ent.ti.com [10.64.6.22]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 0BM75fc1108684 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 22 Dec 2020 01:05:41 -0600 Received: from DFLE100.ent.ti.com (10.64.6.21) 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.1979.3; Tue, 22 Dec 2020 01:05:40 -0600 Received: from fllv0039.itg.ti.com (10.64.41.19) 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.1979.3 via Frontend Transport; Tue, 22 Dec 2020 01:05:41 -0600 Received: from a0393678-ssd.dal.design.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id 0BM75N7D050344; Tue, 22 Dec 2020 01:05:38 -0600 From: Kishon Vijay Abraham I To: Kishon Vijay Abraham I , Vinod Koul , Rob Herring , Swapnil Jakhade , , , CC: Nishanth Menon , Philipp Zabel Subject: [PATCH v2 04/14] phy: ti: j721e-wiz: Get PHY properties only for "phy" or "link" subnode Date: Tue, 22 Dec 2020 12:35:10 +0530 Message-ID: <20201222070520.28132-5-kishon@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201222070520.28132-1-kishon@ti.com> References: <20201222070520.28132-1-kishon@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org "serdes" node (child node of WIZ) can have sub-nodes for representing links or it can have sub-nodes for representing the various clocks within the serdes. Instead of trying to read "reg" from every child node used for assigning "lane_phy_type", read only if the child node's name is "phy" or "link" subnode. Ideally all PHY dt nodes should have node name as "phy", however existing devicetree used "link" as subnode. So in order to maintain old DT compatibility get PHY properties for "phy" or "link" subnode. Signed-off-by: Kishon Vijay Abraham I --- drivers/phy/ti/phy-j721e-wiz.c | 4 ++++ 1 file changed, 4 insertions(+) -- 2.17.1 diff --git a/drivers/phy/ti/phy-j721e-wiz.c b/drivers/phy/ti/phy-j721e-wiz.c index a75433b459dd..2a03191eac64 100644 --- a/drivers/phy/ti/phy-j721e-wiz.c +++ b/drivers/phy/ti/phy-j721e-wiz.c @@ -787,6 +787,10 @@ static int wiz_get_lane_phy_types(struct device *dev, struct wiz *wiz) u32 reg, num_lanes = 1, phy_type = PHY_NONE; int ret, i; + if (!(of_node_name_eq(subnode, "phy") || + of_node_name_eq(subnode, "link"))) + continue; + ret = of_property_read_u32(subnode, "reg", ®); if (ret) { dev_err(dev,