From patchwork Wed Mar 10 15:45:49 2021 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: 396738 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp483401jai; Wed, 10 Mar 2021 07:47:22 -0800 (PST) X-Google-Smtp-Source: ABdhPJy2fPB2rUstsRNS1uvMtw7RUok2omIq6zNanaxFFyPp5Hhs1V2HdOJ1gmJyX4HqJNw7GvYx X-Received: by 2002:a05:6402:3596:: with SMTP id y22mr4036504edc.207.1615391242807; Wed, 10 Mar 2021 07:47:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615391242; cv=none; d=google.com; s=arc-20160816; b=qvskyKjoBqTc3kiQkESbf0JwbBSXei78UXHwA1OZuFpKKf4GIVlNBXf+0uIlnxXVOM 7t5cAGMHxipqdMdSQYBkvVowFQtWr1pluQsCZC3PeAZ8sF05uEvHwPPadgoCDjNE4PuF GDlsT9c9dt3FHC+JrTLKwHIVzfD5oglAgBl1G0GvJpGYmODgxGhMiTMW7S7wAnNFhhwf Nc6jctYQLPhbMJdv14bDVoqrM0+xVC8m/Gq8l2jeiVkqT4C4zasG6bI+JRqzpmiDtjW5 s2BBQCRtAQ9lS2TTl6upOY9uNCmbB6apuq3IT+D9VtDRPLyOQvNk99bXICR4xd+HZuXg NhXQ== 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=OsKa0EDwQKMOxN4rn2UsJ4wTaESxeSKXJwtpa+eVAPs=; b=q9i9RlFSvUmjP5+Q0PL0n5FyEiSTq58+e0SUASG2lZB2xwANQPm1yPZ7bNI74hI/zh +Qum7GRw3YRlm6BeEarZRBfkjIT2nlY+77j1sUNF82PAuC4Rr8UmwmMustHX+I3C7S9A QOEP0+ra/aO39q6tTlzn4ZXE/pE9qsKWFBPcklO3TloZ7vYY7loSimrHymBlEjNUV7Lv hWgTnT8/Bcs4SrrINQMudmvC4n5hsp09WwxHSBunNaLN1Snmi5HGClZKZ5Gq60GnUpPy cl6KcJMbzFHlbJcMgHdTV97Ft7+GN/MYdWfw9dx1/YyGy87G5FkBxaiqDOsG9TMq+txP M0SQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=AtZ3bIh+; 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 t3si4576077ejy.142.2021.03.10.07.47.22; Wed, 10 Mar 2021 07:47:22 -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=AtZ3bIh+; 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 S233212AbhCJPqm (ORCPT + 6 others); Wed, 10 Mar 2021 10:46:42 -0500 Received: from fllv0015.ext.ti.com ([198.47.19.141]:43792 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233219AbhCJPqX (ORCPT ); Wed, 10 Mar 2021 10:46:23 -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 12AFkIfu117261; Wed, 10 Mar 2021 09:46:18 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1615391178; bh=OsKa0EDwQKMOxN4rn2UsJ4wTaESxeSKXJwtpa+eVAPs=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=AtZ3bIh+10iAM0fNznHbBw845yGKpgVo6EJCd1H/v5rBVjZAOwqWEstKb6FHgGDaS UrynFz4tR41Z9P+zZb9Sr/X8XMjRl4yKhARUDnVI6jArytn985vi+bgShPRJR6GEZE mZvxlDFHGfHgH6ShRNormwBW+zzrj7iY5jdXBENw= Received: from DLEE105.ent.ti.com (dlee105.ent.ti.com [157.170.170.35]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 12AFkIKE014694 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 10 Mar 2021 09:46:18 -0600 Received: from DLEE107.ent.ti.com (157.170.170.37) by DLEE105.ent.ti.com (157.170.170.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Wed, 10 Mar 2021 09:46:18 -0600 Received: from lelv0326.itg.ti.com (10.180.67.84) by DLEE107.ent.ti.com (157.170.170.37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2 via Frontend Transport; Wed, 10 Mar 2021 09:46:18 -0600 Received: from a0393678-ssd.dhcp.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 12AFk2KS066370; Wed, 10 Mar 2021 09:46:15 -0600 From: Kishon Vijay Abraham I To: Kishon Vijay Abraham I , Vinod Koul , Rob Herring , Philipp Zabel , Swapnil Jakhade CC: , , Lokesh Vutla Subject: [PATCH v6 04/13] phy: ti: j721e-wiz: Get PHY properties only for "phy" or "link" subnode Date: Wed, 10 Mar 2021 21:15:49 +0530 Message-ID: <20210310154558.32078-5-kishon@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210310154558.32078-1-kishon@ti.com> References: <20210310154558.32078-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 1bb73822f44a..659597645201 100644 --- a/drivers/phy/ti/phy-j721e-wiz.c +++ b/drivers/phy/ti/phy-j721e-wiz.c @@ -1102,6 +1102,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,