Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1362354pxf; Fri, 19 Mar 2021 05:45:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy+CJmi4N/w9bY4jDJQVHaaq4WHzg8ak9h23p1fosuvfsP7jlk/ewEjEFnkUM0Hh85W75GX X-Received: by 2002:a17:907:10ce:: with SMTP id rv14mr4233638ejb.56.1616157942318; Fri, 19 Mar 2021 05:45:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616157942; cv=none; d=google.com; s=arc-20160816; b=Dtqdkj6B/FkXVcv8+sgTDajmSpWuPaVuJWDahns5iMDHRgv7AjoGve26N9iwaSl1zq /lrVERwbGglEWDtTAVOAkB0ps1FJTOfC0Kunhv6uMauRb4+TKsBq7pomHUsmtdfgY/sh B9nCWnGrUlvmaI3ZhTe1M5NKRQOcE07V0Z+8c1oQJTL6pEZVwcwtBEpW6JiPGNcw9cDI UbaMi2lfvbKLNeFxOhIJ9t0gWkE+xT/bBgKb0ONqQDS3TeCXBNchkYgvt/eGi8vVm14U iZlQNmSaSeYv6QKyBYmPCDtOLftK3gnPWXcgDshAZB1YcRSnrE+s2EQfjgHGu3lr+2Tl z3Pw== 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=KB54fOhsld/S5ai/vVLFxys6NRBlg2nUGMA2bidbaEWc4JfxK0GbG/l55AG32XpMIl Vw3JbhCCY4CbZzo3/lYsOxHFFPAAcfSYsJGfoTIMy2DGxr1TyRcyhUdPSMLEZZcMpj1B tTlIWyMdo+0cY/KjtwvpMkujpC7rbUvRIKZ6yA74rC/1ZlB6HpMxjDP/c2Cm9qGlN2Vj 1SGf5XwYGSfeN9/u6aLRLXWK/gjVcPHQ6VJ0seFI1OquEoZ8iNqIRJLHotD5LnLLbZlD EIr/K9Ww1l8Y0Ft+/oyTuBiwCGAusd5XCvbS0cx7v4Eax319PEFsYPHz18OiFY3BBZpY XDFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=k3jnPGdt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id j12si4142314edp.565.2021.03.19.05.45.19; Fri, 19 Mar 2021 05:45:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=k3jnPGdt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S230250AbhCSMoZ (ORCPT + 99 others); Fri, 19 Mar 2021 08:44:25 -0400 Received: from fllv0016.ext.ti.com ([198.47.19.142]:37394 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230153AbhCSMn5 (ORCPT ); Fri, 19 Mar 2021 08:43:57 -0400 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 12JCfoGu048316; Fri, 19 Mar 2021 07:41:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1616157710; bh=OsKa0EDwQKMOxN4rn2UsJ4wTaESxeSKXJwtpa+eVAPs=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=k3jnPGdtyJQDQ5BiVcth5uTqShAx9i5BpdE2iqVG0ZD5mZS6TZLUl75HejOJalRfS kDdd7pjMFLc1/nPY9xaZWBtLSrdoWGuXVNnOYLXL4KG32CxKXhpjpWnNEGhGXavavQ g1u4BI2aWhv41+LKL4D8SzkJUqeqm+1sgiy1klJM= Received: from DFLE104.ent.ti.com (dfle104.ent.ti.com [10.64.6.25]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 12JCfo2S124321 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 19 Mar 2021 07:41:50 -0500 Received: from DFLE114.ent.ti.com (10.64.6.35) 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.2176.2; Fri, 19 Mar 2021 07:41:49 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) 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.2176.2 via Frontend Transport; Fri, 19 Mar 2021 07:41:49 -0500 Received: from a0393678-ssd.dhcp.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 12JCfTf5011913; Fri, 19 Mar 2021 07:41:46 -0500 From: Kishon Vijay Abraham I To: Kishon Vijay Abraham I , Vinod Koul , Rob Herring , Philipp Zabel , Swapnil Jakhade CC: , , , Lokesh Vutla Subject: [PATCH v7 04/13] phy: ti: j721e-wiz: Get PHY properties only for "phy" or "link" subnode Date: Fri, 19 Mar 2021 18:11:19 +0530 Message-ID: <20210319124128.13308-5-kishon@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210319124128.13308-1-kishon@ti.com> References: <20210319124128.13308-1-kishon@ti.com> MIME-Version: 1.0 Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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(+) 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, -- 2.17.1