Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp604883rdg; Thu, 12 Oct 2023 15:36:44 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGDDol+A4aLO4aGzsINiY9lMH3bBavLBYP0jgWvGExSBqk4w3bnRyQbaU0WJ7KDULzYSpxE X-Received: by 2002:a05:6a00:cc1:b0:68b:bf33:2957 with SMTP id b1-20020a056a000cc100b0068bbf332957mr25483706pfv.22.1697150204645; Thu, 12 Oct 2023 15:36:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697150204; cv=none; d=google.com; s=arc-20160816; b=wzyEElJVXiO4vBhV/CaBauTNr87O52w8JVca0suDCegsUfn7gFQTKP3QEQ0P7NCi8R 0uh32HHnHeklo1OMhos3I5ZUPeQJwZz2IXOJ7wb0+h5RU1jIM5cb4iL2JAYNoaF/ow7X sJg/wX4bNoaAAXk5dsKVu2Wc7SAK7C41dDtiM33MfbcOZTix9rlZJzidRmpaigcyIj7a BNNrNbX/1dxSnWVOG0oOhl/xXXHSjMfdrhhpa+K04U+JaP44evz7BRPdfR4LcTv64QaZ Haq3X50lb22zRRR02kE9nipkgg6lQ0BO5jdlA3HlKYh/MKcwDuGLqO+dWfDmOYgKxRSe E6gw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=tqJlehcmenMJKM/lRPSpwuiQHgzEckA+N7fF4C2GzPM=; fh=4OsP5L1B9pUAL+M4LarVIcTAoEa8QdmflUFnWk97NDA=; b=MzO+R5bd2HZfHDbdx0ViVDry4byZ52My2t98Zpdh0kX7wq8C2AMCKvYB5AHCfPwr2d LpdanBPgRJ9+OqlJhZXcinLgFpqEpiO83Bgr/7h3u6yMa2SSk5ADmmp5s0XSJTHrPSJZ sgBDRG/W8biu0LHcp2+9fJmYPB6WJQ6PQ2esSB8DBuGIyYUAVw8ddSHjEzr+32uO4vjb eW2yfE5oPR7ESnQdEwXwWc4oh7ZW9r9BCrHnX1Bmv2LIFDmprJXlxl1ao85nxJo9srCL TLGbDzTHs1ZUIg4gQwiKFUk6f4c+/v0eTJONqwxaI3QcM5qt4bVtILRuk0caFSP49YCk vnqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=v+kANZss; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id f7-20020a056a001ac700b0068a3a7f88f9si16054035pfv.128.2023.10.12.15.36.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Oct 2023 15:36:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=v+kANZss; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 857EB808E549; Thu, 12 Oct 2023 15:35:58 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1443053AbjJLWff (ORCPT + 99 others); Thu, 12 Oct 2023 18:35:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49750 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1442438AbjJLWf1 (ORCPT ); Thu, 12 Oct 2023 18:35:27 -0400 Received: from mail-lj1-x232.google.com (mail-lj1-x232.google.com [IPv6:2a00:1450:4864:20::232]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4FB50DD for ; Thu, 12 Oct 2023 15:35:26 -0700 (PDT) Received: by mail-lj1-x232.google.com with SMTP id 38308e7fff4ca-2c5087d19a6so59881fa.0 for ; Thu, 12 Oct 2023 15:35:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697150124; x=1697754924; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=tqJlehcmenMJKM/lRPSpwuiQHgzEckA+N7fF4C2GzPM=; b=v+kANZss6YBdV6eFFe+RAJoB4T+27iaybTpm5sfZiB4cxEaLJSGZTQiZ1vCnlBgpzf 39dAox+yWHneDJFOlSlt02dtDfE2aU6q5PgjHyp9Ljhy/dxTevd9iPs9dyHh8fpU4ltr vePUczpweFeTFW8CG1ClC75/yUaZ3ehb4t7nlFW18dtShUAChZoyaCWaGtyekRICR8q+ ilOWgpHP7nR8vSIIkorl0D9rXBVwhjI/hfipPg9MKNcQisgtr5XR6poMq0JVF9Vd0At0 N7OZyzXb7J8mtGNh11V+7eywGQanopsTTzsJU1SVezBWApuoqqXt940jhjjUGPK8bgez tdlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697150124; x=1697754924; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tqJlehcmenMJKM/lRPSpwuiQHgzEckA+N7fF4C2GzPM=; b=METr9hEysOGDgWJVhIJvd6VFKyDDIvHRUkfhqBg8EGHAQuZzkmq4POtvXykJGsNDXP 1FFd9pmuGonoc5NE4xX0U4Ncn1CZo0EtgnxuFYTuTE9JL9ug/6DPGJD1egty8dZcEsUJ vqYMrujhwP/MIoLzBKg2OaCJ8JHayYkbkcY7NOZ+8Wc6dddWQ3lV7yaMmvw7kVtzVM1E YA0tcT23e4lG8UqqNE7CWgKKpNNVW07/0L2bQ//fUzOinemp9BivI+bHPrTtplQossxq lSbHfkKG3b/d5gTLKoGyPfiNe/CdeeBaIkJnn5gezPkF3jrWgpXToJBawYF87lHiK345 SSoA== X-Gm-Message-State: AOJu0YzfqkfrXpfU5XlEtfiRzIRFCRTf7kTjiVMf+tzSm5XCM5TqMTeI QmR8QQ7cDAq430op5sHccQHbbg== X-Received: by 2002:a2e:95d5:0:b0:2c0:298d:32df with SMTP id y21-20020a2e95d5000000b002c0298d32dfmr24561108ljh.9.1697150124454; Thu, 12 Oct 2023 15:35:24 -0700 (PDT) Received: from [192.168.1.2] (c-21d3225c.014-348-6c756e10.bbcust.telenor.se. [92.34.211.33]) by smtp.gmail.com with ESMTPSA id x21-20020a05651c105500b002bcb89e92dcsm3811671ljm.6.2023.10.12.15.35.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Oct 2023 15:35:24 -0700 (PDT) From: Linus Walleij Date: Fri, 13 Oct 2023 00:35:16 +0200 Subject: [PATCH 3/3] RFC: net: dsa: mv88e6xxx: Register mdio-external MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20231013-marvell-88e6152-wan-led-v1-3-0712ba99857c@linaro.org> References: <20231013-marvell-88e6152-wan-led-v1-0-0712ba99857c@linaro.org> In-Reply-To: <20231013-marvell-88e6152-wan-led-v1-0-0712ba99857c@linaro.org> To: Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Russell King , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: Christian Marangi , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Linus Walleij X-Mailer: b4 0.12.3 X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Thu, 12 Oct 2023 15:35:58 -0700 (PDT) Make it legal to have a subnode just named "mdio-external" and have that be recognized immediately as the external MDIO bus, register it and return. Only fallback to the old method with a compatible in the external bus node if this doesn't work. This is the result of deprecating the old DT method of providing a node "mdio1" with a compatible string. Signed-off-by: Linus Walleij --- drivers/net/dsa/mv88e6xxx/chip.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c index 52a99d8bada0..05f6776885f6 100644 --- a/drivers/net/dsa/mv88e6xxx/chip.c +++ b/drivers/net/dsa/mv88e6xxx/chip.c @@ -3676,7 +3676,21 @@ static int mv88e6xxx_mdios_register(struct mv88e6xxx_chip *chip) if (err) return err; - /* Walk the device tree, and see if there are any other nodes + /* If the optional external bus is explicitly named as such, + * just register it and be done with this. + */ + child = of_get_child_by_name(np, "mdio-external"); + if (child) { + err = mv88e6xxx_mdio_register(chip, child, true); + of_node_put(child); + if (err) + return err; + return 0; + } + + /* Deprecated binding with compatible: + * + * Walk the device tree, and see if there are any other nodes * which say they are compatible with the external mdio * bus. */ -- 2.41.0