From patchwork Mon Mar 8 05:07:23 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: 395332 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp1421899jai; Sun, 7 Mar 2021 21:08:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJxPfsQE3j1kbF1VNBpa+AHMOcBLZAjdFD1sAb5508FVKxsQ5CgDvKTJPXqRpAyh6pCuoKaQ X-Received: by 2002:a17:906:30da:: with SMTP id b26mr13116006ejb.376.1615180134264; Sun, 07 Mar 2021 21:08:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615180134; cv=none; d=google.com; s=arc-20160816; b=gFg5mhJ84kp7NOTxJHvWTIRUuE3XngmRjpjUsh6cY1KDjewwuRvn6agL6fr5KqwyBz jumMDr0WFORWVxCzJVRpvJFuUfeW4hu/MaaIcod/QtUR07GrJF4e/sbuEU/dXN4LOCdO UMHfHn3Uf7ZEV8f8EFQW6ZWMLp59XoP0jelu2Noaf/+OReUyx0ABgMoQCI0FmJz0Wr+8 6+SYR8Fypyk/Ea0UBqeVHIVQ4Hby79AcRuQMVgSbgw6L5E+yYI2j262XQtmmtT1HC8KF IfgCMDEbOzc26DyhJU6WVelrSh2ix8NckWgB6JJEdeJimYgv5eKDJmPpg8fXiGLMFuJW YS1A== 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=gPRutQjvwUgiRvZyPK7jICJ0WKK94UXq5Yy215HrBSg+V9nyti5v5EpeilIluNqVyS 7GZA7qHBdqLgkMVJGBqslju808JOvlfuQWKAj1mjSLlZknHIKtDQBtR8eleIzlC9Pk+Y 2ViTX8wSXgzotXLzOh3y6VO/4Y4EYuN0qY7JgUDqQa/ZqWG18cT09bB99lNeKDo//ioS xd5Ky7rpKh1F5nA17dGl6y/yV9VgrY2kG36H4uq3BPMcjclFBaZtPj7W/GbVoa2rKZ/z //LXK8lMi7886HIPIxnDqfNwx1fAYyJcbNFSAsjD3Wik0qX/GStlk8GFrd++XQK6nA7l LZyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=ypAwe6Um; 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 w26si6504740ejn.699.2021.03.07.21.08.54; Sun, 07 Mar 2021 21:08:54 -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=ypAwe6Um; 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 S234294AbhCHFIR (ORCPT + 6 others); Mon, 8 Mar 2021 00:08:17 -0500 Received: from fllv0015.ext.ti.com ([198.47.19.141]:36280 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234263AbhCHFIB (ORCPT ); Mon, 8 Mar 2021 00:08:01 -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 12857uJS077195; Sun, 7 Mar 2021 23:07:56 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1615180076; bh=OsKa0EDwQKMOxN4rn2UsJ4wTaESxeSKXJwtpa+eVAPs=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=ypAwe6Um9TfNu1TEIq711pOm40jXtAglwNi/i2VI9FsciMMhZZbalT3Y5uNJT7Wp1 brFFnEpPxxlsFPTp3K0pvu+QrpgxjCyHSON736Za8B08Qo+cnNq1wBkW41C9/IxLv5 ys0dX2vv36gLUCjTV7xuiA09Vs7UHo8hb8g7/zms= Received: from DFLE100.ent.ti.com (dfle100.ent.ti.com [10.64.6.21]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 12857ucf068310 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Sun, 7 Mar 2021 23:07:56 -0600 Received: from DFLE114.ent.ti.com (10.64.6.35) 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; Sun, 7 Mar 2021 23:07:56 -0600 Received: from lelv0327.itg.ti.com (10.180.67.183) 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.1979.3 via Frontend Transport; Sun, 7 Mar 2021 23:07:56 -0600 Received: from a0393678-ssd.dhcp.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 12857aL2086547; Sun, 7 Mar 2021 23:07:53 -0600 From: Kishon Vijay Abraham I To: Kishon Vijay Abraham I , Vinod Koul , Rob Herring , Philipp Zabel , Swapnil Jakhade CC: , , Lokesh Vutla Subject: [PATCH v5 04/13] phy: ti: j721e-wiz: Get PHY properties only for "phy" or "link" subnode Date: Mon, 8 Mar 2021 10:37:23 +0530 Message-ID: <20210308050732.7140-5-kishon@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210308050732.7140-1-kishon@ti.com> References: <20210308050732.7140-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,