From patchwork Thu Dec 24 11:16:16 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: 351883 Delivered-To: patch@linaro.org Received: by 2002:a02:85a7:0:0:0:0:0 with SMTP id d36csp6933126jai; Thu, 24 Dec 2020 03:18:56 -0800 (PST) X-Google-Smtp-Source: ABdhPJxpc2Q3GwkhIW08ZuQGK2DPA29OOkBETmhH+J9yJ6ttHZOJDlGQNXHlPuUTIAiAYbJfX3Cf X-Received: by 2002:aa7:c84c:: with SMTP id g12mr27779815edt.193.1608808736644; Thu, 24 Dec 2020 03:18:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608808736; cv=none; d=google.com; s=arc-20160816; b=ycBZ8LRHjyDXjAbCEhesnyYUb3u044F9J/g8jv32z7IAY2MxJSqKC/VnagnZ2KpN8j Cwqxx2Va0ClbJfMUcXR7Gl0XBnN1JDFSG1idTfI93Zl3UYdnTHA7s013EUjeqkLkCa0c RTDaJ0rbjIAqaapooGix3VX/Uh6iuq81xjZIC7qobwtpeEQkT0ivd7xNNxEYPEk93zWR bmKlNDmA1/EjEp741XJsGvQjC5ZZ4OhBJKqBlWr+NBu5AO/qh5gtyP1Bpue1qg02+ggS ppCmSXgdHqEmOqt3cYO6GOgi+/FBVm1dJKmzumyBE085W7BTiqLKv0Bp/HlATpV9IZoK KIsg== 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=K6uuufoorbTz3/Y3e0IGgqdVc8dFQJEddbnsXUVnHUA07g/EC2XrY7xNmMLuVdoksh DR1QPOtX3dt2sfs3rVg9x1/Ts4lCtthCE9DfSUEamaXe8AhAY0QLBP5ctlteuMZr+/IL qq08gc20Ez3YAIduENJLZgzAw4iyq5mN/1SUBwrt48+k7vo1dqsRaMYVivzKO6yCDFb1 1p5bKvPrVf5mV1qpp7DnFEdR3BxmsLyqfLH+sa72cgFi5PNiR8OkX9xyz3I7CBT7FwPf rP5VfdyXctNhBUMS7OdqwwGj9m60ybLIGUjxmgjacxRMul0htn0tV70L8iqx8OTqxQr+ IAWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=X3+dSNCP; 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 c4si11409789ejk.182.2020.12.24.03.18.56; Thu, 24 Dec 2020 03:18:56 -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=X3+dSNCP; 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 S1728341AbgLXLRr (ORCPT + 7 others); Thu, 24 Dec 2020 06:17:47 -0500 Received: from fllv0015.ext.ti.com ([198.47.19.141]:35612 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726746AbgLXLRq (ORCPT ); Thu, 24 Dec 2020 06:17:46 -0500 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 0BOBH0Tp076156; Thu, 24 Dec 2020 05:17:00 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1608808620; bh=FjCTHLq/sEj9KXmxRwSejCjWFaAdBEX/mJW7iTNR8qs=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=X3+dSNCPUoYrOSo+cUtMslyKIXOcB/rqFWb59dEjOAR7Y25Q7KVS5t0yeMy59nyne bwDSu9xokFEVMA2Ufysi8vq1FZ618JK0q0bQdgdlfJD9sMWThMZBQJPq9xq0lALIot xX+xhTLTOjbbAdTlv4THcPCNSk1gBIiRAIW4ubs4= Received: from DFLE105.ent.ti.com (dfle105.ent.ti.com [10.64.6.26]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 0BOBH0V5093262 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 24 Dec 2020 05:17:00 -0600 Received: from DFLE104.ent.ti.com (10.64.6.25) by DFLE105.ent.ti.com (10.64.6.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3; Thu, 24 Dec 2020 05:16:59 -0600 Received: from fllv0040.itg.ti.com (10.64.41.20) 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.1979.3 via Frontend Transport; Thu, 24 Dec 2020 05:16:59 -0600 Received: from a0393678-ssd.dal.design.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 0BOBGWGA116630; Thu, 24 Dec 2020 05:16:55 -0600 From: Kishon Vijay Abraham I To: Kishon Vijay Abraham I , Vinod Koul , Rob Herring , Nishanth Menon , Philipp Zabel CC: , , Subject: [PATCH v3 04/15] phy: ti: j721e-wiz: Get PHY properties only for "phy" or "link" subnode Date: Thu, 24 Dec 2020 16:46:16 +0530 Message-ID: <20201224111627.32590-5-kishon@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201224111627.32590-1-kishon@ti.com> References: <20201224111627.32590-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,