Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp2073565pxb; Mon, 23 Aug 2021 11:25:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy5DNFWcz6bSBTQkxv+PnmObWk3WfB+WPfCM87FZzlvrXzzI1UiN5OxkEiF9Ud7URW/vV5+ X-Received: by 2002:a92:cb04:: with SMTP id s4mr23953202ilo.130.1629743112312; Mon, 23 Aug 2021 11:25:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629743112; cv=none; d=google.com; s=arc-20160816; b=KyzTzArfSCKDM4V8REobh7Pmxqipt04Kono4Lim5g1kWS1jqyE5MhA1vqI+GuUqD/U Of2Pc7lt/UoBqSZ5ATkYd8GXXqh7vGo5W5hibzXi7HvciSbWFxFZHtmiJlQI4F6bFsy5 5SXYsfOBK+zh5VEht47jKIDMB5FexZKpXWhGq1CR2bKcOUWX+AxxQwOZOdN8n2+anxYR hv4rY3i8rs65nbJkJYf3p+yuM24ePTFKZNxGHO5mhQB4cMTJIa3zaVILZKk9uoK7864L /ekhnofOm0OCqWAsxAJlvZiBZpE9mfkmYnObV7Ey3NnrGT+Da9zpQ9QuHWWus29QSJ1u YQ/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=rukoF0zTAyPgRjsb/qETsAXh6HDn8z2HPuAWUcpMQpw=; b=Pge2n1W2ADUfDmUnSo693rUJg3S/a7dv04WBok0szEEbcsdKesCeH+1q8qN+dIBNR4 B830Sz09BP335nJAzGP7VGRAbFWDSFbjsNpdptK96Ep2D5NwOADwW+zULfYOQ/+aTwjk qPHDnMxA1x7eIdVarhXAU6g8B7kw5+qoCUxhGygd7xJfBnVl/TYljHcWEoTUeRVDU296 6Bu4w09bonkiPqo2Tcm35inVHq/+sv8KWEMkB2vYjP5O5ChdgbEY0K8BNZEf4y9ZjZbv 07slj2Ml4CUzvTIlbIfDNddtbMzP3EnjayQHAsDHdf8986W4SuCBL8z3Dma22qydJbex BcRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=mrRHQszk; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z4si13673055ilh.138.2021.08.23.11.24.58; Mon, 23 Aug 2021 11:25:12 -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=@google.com header.s=20161025 header.b=mrRHQszk; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231829AbhHWSXy (ORCPT + 99 others); Mon, 23 Aug 2021 14:23:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56296 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231270AbhHWSXv (ORCPT ); Mon, 23 Aug 2021 14:23:51 -0400 Received: from mail-yb1-xb31.google.com (mail-yb1-xb31.google.com [IPv6:2607:f8b0:4864:20::b31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C558FC061757 for ; Mon, 23 Aug 2021 11:23:08 -0700 (PDT) Received: by mail-yb1-xb31.google.com with SMTP id k65so35787609yba.13 for ; Mon, 23 Aug 2021 11:23:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=rukoF0zTAyPgRjsb/qETsAXh6HDn8z2HPuAWUcpMQpw=; b=mrRHQszk4xM/P0iqPOgIvzHk9Gi79/0pgATlZnfPGDvzxyVjOuDAzTGWx2032SoaZN h0ILJaEukh+Jswu65Fn+bOFsV40J9CeZkSjhLr/C96wRAK+7XGkP7ULhInEZcHuj4/q7 AQM0+2tatgJ0VZu2EuQR5AcGZn3CIrLSMRq+0Ja4L+8azEnIHTXDNn0kQIWOqJDqQiLI QH66OIKdJicFgCoGAWLnzR6JXD6qMjQLOvG/YjctJOrPpywQqldUASRaXoTC8SQsrqpe 0XkMnm7ujPcD7C0mEu35y2JkjBqw5Pc/Xejsaw6mK6iXWiplXQLe7OSUZqgE/gD+HL7E 2mAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=rukoF0zTAyPgRjsb/qETsAXh6HDn8z2HPuAWUcpMQpw=; b=D74IoadrnR0svHwgh4ohrQ9wvJTtio1up9N/xilRvGIUqvfcaAxQBG1qeQi0q+hWQ8 DkWf3q4V5wRLecj7udwb7Y+O+Ylkd9zE4/rOl4mwdCL/n8aCkVBvREaRUog+3VeZptxI Cn1rMkHVhGRZrmcBQA7EvUWwgs1r8bK0KeO19dQcu+x7X9jrtM33liZzj08F947kVICe Yb+X3iy1SG/8wgYMtp9kVI/QMVRsCDWcKeT3b0ht3WTuDU2VUBhfB0fhqS946Iqr9o5T ZPDUJu+dxX0tM5b1mYgREvmqyNaKyCSuF7io3TRA1gK0664g8rnfOq8IB4g5pgdBSwD/ O2rw== X-Gm-Message-State: AOAM530ibcUo6L1VPbBlYyL8c7zxCPyzyOSV/jv4zHp4Y77AHu/a/IuP VF/hYkY/+ZkvCcF0cE91IZzRLaf4Rs63P7xgbqIUWw== X-Received: by 2002:a25:c64f:: with SMTP id k76mr45962791ybf.412.1629742987747; Mon, 23 Aug 2021 11:23:07 -0700 (PDT) MIME-Version: 1.0 References: <20210818021717.3268255-1-saravanak@google.com> <0a2c4106-7f48-2bb5-048e-8c001a7c3fda@samsung.com> In-Reply-To: <0a2c4106-7f48-2bb5-048e-8c001a7c3fda@samsung.com> From: Saravana Kannan Date: Mon, 23 Aug 2021 11:22:31 -0700 Message-ID: Subject: Re: [PATCH v2] of: property: fw_devlink: Add support for "phy-handle" property To: Marek Szyprowski Cc: Rob Herring , Frank Rowand , Andrew Lunn , netdev@vger.kernel.org, kernel-team@android.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Neil Armstrong , linux-amlogic@lists.infradead.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 23, 2021 at 5:08 AM Marek Szyprowski wrote: > > Hi, > > On 18.08.2021 04:17, Saravana Kannan wrote: > > Allows tracking dependencies between Ethernet PHYs and their consumers. > > > > Cc: Andrew Lunn > > Cc: netdev@vger.kernel.org > > Signed-off-by: Saravana Kannan > > This patch landed recently in linux-next as commit cf4b94c8530d ("of: > property: fw_devlink: Add support for "phy-handle" property"). It breaks > ethernet operation on my Amlogic-based ARM64 boards: Odroid C4 > (arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts) and N2 > (meson-g12b-odroid-n2.dts) as well as Khadas VIM3/VIM3l > (meson-g12b-a311d-khadas-vim3.dts and meson-sm1-khadas-vim3l.dts). > > In case of OdroidC4 I see the following entries in the > /sys/kernel/debug/devices_deferred: > > ff64c000.mdio-multiplexer > ff3f0000.ethernet > > Let me know if there is anything I can check to help debugging this issue. I'm fairly certain you are hitting this issue because the PHY device doesn't have a compatible property. And so the device link dependency is propagated up to the mdio bus. But busses as suppliers aren't good because busses never "probe". PHY seems to be one of those cases where it's okay to have the compatible property but also okay to not have it. You can confirm my theory by checking for the list of suppliers under ff64c000.mdio-multiplexer. You'd see mdio@0 (ext_mdio) and if you look at the "status" file under the folder it should be "dormant". If you add a compatible property that fits the formats a PHY node can have, that should also fix your issue (not the solution though). I'll send out a fix this week (once you confirm my analysis). Thanks for reporting it. -Saravana > > > --- > > v1 -> v2: > > - Fixed patch to address my misunderstanding of how PHYs get > > initialized. > > > > drivers/of/property.c | 2 ++ > > 1 file changed, 2 insertions(+) > > > > diff --git a/drivers/of/property.c b/drivers/of/property.c > > index 931340329414..0c0dc2e369c0 100644 > > --- a/drivers/of/property.c > > +++ b/drivers/of/property.c > > @@ -1291,6 +1291,7 @@ DEFINE_SIMPLE_PROP(pwms, "pwms", "#pwm-cells") > > DEFINE_SIMPLE_PROP(resets, "resets", "#reset-cells") > > DEFINE_SIMPLE_PROP(leds, "leds", NULL) > > DEFINE_SIMPLE_PROP(backlight, "backlight", NULL) > > +DEFINE_SIMPLE_PROP(phy_handle, "phy-handle", NULL) > > DEFINE_SUFFIX_PROP(regulators, "-supply", NULL) > > DEFINE_SUFFIX_PROP(gpio, "-gpio", "#gpio-cells") > > > > @@ -1379,6 +1380,7 @@ static const struct supplier_bindings of_supplier_bindings[] = { > > { .parse_prop = parse_resets, }, > > { .parse_prop = parse_leds, }, > > { .parse_prop = parse_backlight, }, > > + { .parse_prop = parse_phy_handle, }, > > { .parse_prop = parse_gpio_compat, }, > > { .parse_prop = parse_interrupts, }, > > { .parse_prop = parse_regulators, }, > > Best regards > -- > Marek Szyprowski, PhD > Samsung R&D Institute Poland >