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.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS 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 64E01C4320A for ; Sat, 24 Jul 2021 17:03:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3C0FA60EB1 for ; Sat, 24 Jul 2021 17:03:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229905AbhGXQWm (ORCPT ); Sat, 24 Jul 2021 12:22:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49086 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229530AbhGXQWm (ORCPT ); Sat, 24 Jul 2021 12:22:42 -0400 Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9A02DC061575; Sat, 24 Jul 2021 10:03:13 -0700 (PDT) Received: by mail-wr1-x42c.google.com with SMTP id n12so2193643wrr.2; Sat, 24 Jul 2021 10:03:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=yDHcOTToBqs7w6wQps432x/oWcA2vi+afsM+JxLzc90=; b=XxUNVGUnSVvHCNaM/cYzYmkYEE9sPe2ia/RwP6nCogXwL2wQhU0gdGBgHxfL0CmkYs SEmzaxC5DDvYNL65H9CsWyN9vbSFc9gPfa5RkVcqbuTGmmE1evShaAr+gUBsHG6xmwEZ eqlPAD9wVn4Agd8l4IN4HCi+UY1PveznjXGtlhW5Bl20e17ugjHsQfuLOd3kFiJTbhfc rs3i3AIoTbglAQcqBeo6e1wtc9WKfWRRkNPAyZmI+r6wTiHOeamjNwHr3gAxkK96lMn/ 64f6OcklHDP1g8wa1LOI4G/zdhTFNxKpi3xG6N/0ZxB1Z03hntMTutybV7Q8JpBnubsl EHww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=yDHcOTToBqs7w6wQps432x/oWcA2vi+afsM+JxLzc90=; b=WgQ6w8C+yYsyr8OBbOamD2HNh3zyQiTHgr7Y06sdAiMAictxdgcE3F11wuLCB6pv/2 yebtv2bvU3xrVDaGOswsJjoc0gslGTIzAoQUN3CKNkFovec7U1/YdFXF/IgCWqqrTYd9 7fiQeaJ/VkPFxXArNANFpCxZCINAd2CwKzPD9aDuphqph1H+r1IkDiX7clZMVJvmrKcA INWKnXAbNdAYyF0wFbgFzd7hpd+Iu1sIvKjLztJoRSTh3yP8E80Q30eckh+Ea3fZRON0 COlLZSA2eKfhz5Hd1hSi7S4svj5Dn/H+vqYb5DX1ZZnha1llgSFyGbFLy52YQlpa6wmy tv2Q== X-Gm-Message-State: AOAM533mXFvXumljIGuWDXR3ThvgQNQ3lmtjQbpE+uFLMfUsO/BKGl9i +jrcAddK39hMaKc/rC18M2U= X-Google-Smtp-Source: ABdhPJze+QN1Vh7PNyKNbw8GNjjkhbsAZayu/kZkcomPcbckVlUgTtWNGicCK0BlIjNFq40KmxLjhQ== X-Received: by 2002:a5d:438c:: with SMTP id i12mr10762739wrq.99.1627146192044; Sat, 24 Jul 2021 10:03:12 -0700 (PDT) Received: from skbuf ([82.76.66.29]) by smtp.gmail.com with ESMTPSA id e3sm36706806wra.15.2021.07.24.10.03.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 24 Jul 2021 10:03:11 -0700 (PDT) Date: Sat, 24 Jul 2021 20:03:10 +0300 From: Vladimir Oltean To: Florian Fainelli 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 Subject: Re: [PATCH net-next] ARM: dts: imx6qdl: Remove unnecessary mdio #address-cells/#size-cells Message-ID: <20210724170310.ylouwttmutkpin42@skbuf> References: <20210723112835.31743-1-festevam@gmail.com> <20210723130851.6tfl4ijl7hkqzchm@skbuf> <9455e5b8-d994-732f-2c3d-88c7a98aaf86@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9455e5b8-d994-732f-2c3d-88c7a98aaf86@gmail.com> Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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? 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. 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=-5.7 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, SPF_HELO_NONE,URIBL_BLOCKED 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 1B13FC4338F for ; Sat, 24 Jul 2021 17:05:13 +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 DCDCC60C51 for ; Sat, 24 Jul 2021 17:05:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org DCDCC60C51 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-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=L0ljFrpZAYOO82IuldFsMTaMss1ZykJPa5Z1L2akH2o=; b=HUDwtE37bijz1g LBupUKgfGbzthqmG555yyr2SbqUEfDX0eAeFHLxjP2sLB6+UdXDWubsaJVJ1oT7fB0zjV2lllwvIg tRWr8HzaZARM6gels//f9KRvwkL2Xkbz/JvcgPz9ut9YjhWbfwc8KsZDrZLxTLP2chbWIa+HHZBRP b5aI8wsw8T1S2w9uUqWvg80K8Atqjz0d01v4TgkPpcVGUjBCV53iuJpgD7ZFDeHU6oCOxx5B/thQP dOoiB5Q4k3tDKwjV6ff5nCjtwdZau00pFMe/fZCaweCfEXlTRwkjHsijTmGy+tU5R+doRprZ6IR7g bSKtfxdrHFC6Kau+zD8Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m7L3X-007U39-EM; Sat, 24 Jul 2021 17:03:19 +0000 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m7L3S-007U2E-AR for linux-arm-kernel@lists.infradead.org; Sat, 24 Jul 2021 17:03:15 +0000 Received: by mail-wr1-x434.google.com with SMTP id w12so5681799wro.13 for ; Sat, 24 Jul 2021 10:03:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=yDHcOTToBqs7w6wQps432x/oWcA2vi+afsM+JxLzc90=; b=XxUNVGUnSVvHCNaM/cYzYmkYEE9sPe2ia/RwP6nCogXwL2wQhU0gdGBgHxfL0CmkYs SEmzaxC5DDvYNL65H9CsWyN9vbSFc9gPfa5RkVcqbuTGmmE1evShaAr+gUBsHG6xmwEZ eqlPAD9wVn4Agd8l4IN4HCi+UY1PveznjXGtlhW5Bl20e17ugjHsQfuLOd3kFiJTbhfc rs3i3AIoTbglAQcqBeo6e1wtc9WKfWRRkNPAyZmI+r6wTiHOeamjNwHr3gAxkK96lMn/ 64f6OcklHDP1g8wa1LOI4G/zdhTFNxKpi3xG6N/0ZxB1Z03hntMTutybV7Q8JpBnubsl EHww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=yDHcOTToBqs7w6wQps432x/oWcA2vi+afsM+JxLzc90=; b=ig5MrPR0OHqoRrPrA8SAxLbJm8cu8qG0Fb5ZQMTaFOPnIcYrVRIPlnoEGXyzcrKBbw vJ7cewulo6Nv+p8V0FkVpPUez4kJkmCv3NGZL9groZB+wL1mXJKV2cyQVeHOyQ1TW5hZ +coJjOmFDrEQvbXFaWwrmN2TI/JDYQsWC0FjfrA2EQqHUxBExjDp7Qa7PuV3vb1DNF8f 9Ff6FxwGKXiBwIIQEZyyDIYcOiH9FdPk9cP2fUukhk3WSmcL11fCeNLf5vJyq+JSM3Vt Tlxv0YDoNmRFbtmLefTw/T/K6QJnEt6mvDOjQx2TvBfrKMx9E/O1Gqau3Evv2ukUsKVG tu/Q== X-Gm-Message-State: AOAM533qZi1YIrWiOpH8tChCb5S+l66F97pvbMVZQGWlnpQ5COvoRD89 n1WWuVNS/hR5KAcUxChXqjw= X-Google-Smtp-Source: ABdhPJze+QN1Vh7PNyKNbw8GNjjkhbsAZayu/kZkcomPcbckVlUgTtWNGicCK0BlIjNFq40KmxLjhQ== X-Received: by 2002:a5d:438c:: with SMTP id i12mr10762739wrq.99.1627146192044; Sat, 24 Jul 2021 10:03:12 -0700 (PDT) Received: from skbuf ([82.76.66.29]) by smtp.gmail.com with ESMTPSA id e3sm36706806wra.15.2021.07.24.10.03.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 24 Jul 2021 10:03:11 -0700 (PDT) Date: Sat, 24 Jul 2021 20:03:10 +0300 From: Vladimir Oltean To: Florian Fainelli 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 Subject: Re: [PATCH net-next] ARM: dts: imx6qdl: Remove unnecessary mdio #address-cells/#size-cells Message-ID: <20210724170310.ylouwttmutkpin42@skbuf> References: <20210723112835.31743-1-festevam@gmail.com> <20210723130851.6tfl4ijl7hkqzchm@skbuf> <9455e5b8-d994-732f-2c3d-88c7a98aaf86@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <9455e5b8-d994-732f-2c3d-88c7a98aaf86@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210724_100314_427798_137E2FF2 X-CRM114-Status: GOOD ( 24.10 ) 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-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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? 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. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel