From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.3 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B43E7C4338F for ; Sat, 24 Jul 2021 19:16:10 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 709AC60E0C for ; Sat, 24 Jul 2021 19:16:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 709AC60E0C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:Cc:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=C/y9zmOFzAc2dwQmSNockDfliXzuHCoAMA2FrYMe3C8=; b=g50MCYNRh9D+Y+XSK6KF7xYgch sLNNjIrP99eDsxojoIlTFWF9f6i+IeiQJVvicGTBfCQkQecMk4l5nu4ksk2Zf11HEuaWZ0yP+1Ure OYYEJsrlcmMO2a4VmqNqrtSoKPAP+0bZ5ILx4UJ2qtCzS8eIhICzfX/iRpNCoEL13C6rqcEfUIqNz i/9uCZgFszhf1k01mSsrfxqWTW8Hcoou0XzO2RSD3MQImfUg7vxkt/uHuQIOO0Pi0D8lRd46Zc78M qflFhQNWgWwUBBmKpv21lLhGrTv/GtRGxcVj8moLVC+4sEdzFtfNv0D+t+9u22bhsosIpZfK/+0Zz o28ZBQXw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m7N6G-007jbk-QD; Sat, 24 Jul 2021 19:14:16 +0000 Received: from mail-oi1-x235.google.com ([2607:f8b0:4864:20::235]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m7N6C-007jb4-L3 for linux-arm-kernel@lists.infradead.org; Sat, 24 Jul 2021 19:14:14 +0000 Received: by mail-oi1-x235.google.com with SMTP id o185so5874913oih.13 for ; Sat, 24 Jul 2021 12:14:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=qx1yiC1mpqZRSFpc9Zv+T1UxYq3BIIEvRd3B/4MOl0U=; b=jXefAtq1LFYdWaVoEvJM4zNjFf+LD/LueA4RfLIhLg72Zdep0ndkihcdrYDR4xUSJt B7S7Eeh5BMWbk+Cy7t65hbauNTjWjJl7aj6Enxrp43kzgul8aGBbMF7HqLcXxuoP2e68 8oRV2VXvL0/XJIYsIjXJdMkZSaYdNJlSiH3KghlDMFgboPJ4qBLNmwzibwNVfDxhmjiX i+77tSOZGjDMbNGRp+MTR+G3Yd8CvlBz1saqb4zr4fypGNTTKN2VFXizvBnx7yfK6pMx 53GPpcgJ9kR6JCy0G7V43JY+W107zQvtywvJTUASTKHtu5MnEzgpFmkJvalqtVQosU6r mkkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=qx1yiC1mpqZRSFpc9Zv+T1UxYq3BIIEvRd3B/4MOl0U=; b=SqciQYilmd5hih8FpyJxn1vIGHfUbIds1380YfLNoXTo6YfsnN/XFfwYeL/A8WvPfR yMdVR/dUQjaqVCFslHAaYEonc0u8j2AmjK/LwnzK10iBoOnciyz52e6ezZgwE1YP1ikK 7+x3P1mT/RUZMzU711vqmtR3dcySA16H2KIg+X1KPDlrvbhcOzV2GTsXFGUkNVvup2Xi Y2BzSUCDXfggUJH4vy7WguCnV+gadEaydcFMwurk/VB8ea5JI6OKCyNCCQpjwYYuC9yj RtbBc64TtNWBFJ2djj2PY8EaMlF0+NLuvpTEmMT8aOtVwa4PkGp4xrBAU5Ue01PYGjl7 WbYA== X-Gm-Message-State: AOAM531b6AF9pzmS0q/UCAiX0/u4y0n4uL7LLeeLtOqOBNHOEMDuW0qo Iy4fPxHcZWzPn671461IKtw= X-Google-Smtp-Source: ABdhPJw7Ge2EZtTsCUr+eUd/8r5D2QmnKUJyaVXFlbr/0QykfCAiWqEVC/GG4HMZW2v1Pf6353dIFg== X-Received: by 2002:a05:6808:2089:: with SMTP id s9mr6867168oiw.156.1627154051652; Sat, 24 Jul 2021 12:14:11 -0700 (PDT) Received: from ?IPv6:2600:1700:dfe0:49f0:9102:63b8:1d59:9075? ([2600:1700:dfe0:49f0:9102:63b8:1d59:9075]) by smtp.gmail.com with ESMTPSA id d20sm4706328otq.67.2021.07.24.12.14.10 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 24 Jul 2021 12:14:11 -0700 (PDT) Subject: Re: [PATCH net-next] ARM: dts: imx6qdl: Remove unnecessary mdio #address-cells/#size-cells To: Vladimir Oltean Cc: Fabio Estevam , davem@davemloft.net, shawnguo@kernel.org, linux-arm-kernel@lists.infradead.org, qiangqing.zhang@nxp.com, robh+dt@kernel.org, netdev@vger.kernel.org, devicetree@vger.kernel.org References: <20210723112835.31743-1-festevam@gmail.com> <20210723130851.6tfl4ijl7hkqzchm@skbuf> <9455e5b8-d994-732f-2c3d-88c7a98aaf86@gmail.com> <20210724170310.ylouwttmutkpin42@skbuf> From: Florian Fainelli Message-ID: <6e280dae-2c94-efb9-8d34-a12cce89b6f4@gmail.com> Date: Sat, 24 Jul 2021 12:14:09 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: <20210724170310.ylouwttmutkpin42@skbuf> Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210724_121412_776575_B51C791C X-CRM114-Status: GOOD ( 27.11 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 7/24/2021 10:03 AM, Vladimir Oltean wrote: > On Sat, Jul 24, 2021 at 09:37:35AM -0700, Florian Fainelli wrote: >> On 7/23/2021 6:08 AM, Vladimir Oltean wrote: >>> Hi Fabio, >>> >>> On Fri, Jul 23, 2021 at 08:28:35AM -0300, Fabio Estevam wrote: >>>> Since commit dabb5db17c06 ("ARM: dts: imx6qdl: move phy properties into >>>> phy device node") the following W=1 dtc warnings are seen: >>>> >>>> arch/arm/boot/dts/imx6qdl-aristainetos2.dtsi:323.7-334.4: Warning (avoid_unnecessary_addr_size): /soc/bus@2100000/ethernet@2188000/mdio: unnecessary #address-cells/#size-cells without "ranges" or child "reg" property >>>> >>>> Remove the unnecessary mdio #address-cells/#size-cells to fix it. >>>> >>>> Fixes: dabb5db17c06 ("ARM: dts: imx6qdl: move phy properties into phy device node") >>>> Signed-off-by: Fabio Estevam >>>> --- >>> >>> Are you actually sure this is the correct fix? If I look at mdio.yaml, I >>> think it is pretty clear that the "ethernet-phy" subnode of the MDIO >>> controller must have an "@[0-9a-f]+$" pattern, and a "reg" property. If >> >> It is valid to omit the "reg" property of an Ethernet PHY which the kernel >> will then dynamically scan for. If you know the Ethernet PHY address it's >> obviously better to set it so you avoid scanning and the time spent in doing >> that. The boot loader could (should?) also provide that information to the >> kernel for the same reasons. > > Interesting, but brittle I suppose (it only works reliably with a single > PHY on a shared MDIO bus). NXP has "QDS" boards for internal development > and these have multi-port riser cards with various PHYs for various > SERDES protocols, and we have a really hard time describing the hardware > in DT (we currently use overlays applied by U-Boot), so we would like > some sort of auto-detection of PHYs if that was possible, but I think > that for anything except the simplest of cases it isn't. For example > what happens if you unbind and rebind two net devices in a different > order - they will connect to a PHY at a different address, won't they? Oh yes, it is fraught with peril in most cases, however for some simple cases like dedicated MDIO bus and single Ethernet PHY on the bus this works quite nicely. We have a bunch of reference boards that allow us to connect either a MTSIF or RGMII daughter card and we scan the MDIO bus in the boot loader if the networking stack is initialized (in which case the DT gets patched accordingly), else, we leave it to Linux to probe for the PHY. > > Anyway, I was wrong, ok, but I think the point still stands that > according to mdio.yaml this DT description is not valid. So after your > explanation, it is the DT schema that we should update. Yes, the "reg" property is technically optional, however #address-cells and #size-cells are not, or rather they only are useful if "reg" is provided so it can be checked accordingly, humm. -- Florian _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel