Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp795006iob; Wed, 18 May 2022 13:10:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxJkWenFB4JZPJkg7KTYq9RjAV00W2hGyj6wZzQds6cIu8FHkPJJF/29l8ZbOPdiH5G+jNa X-Received: by 2002:a05:6a00:4099:b0:518:2529:3b8d with SMTP id bw25-20020a056a00409900b0051825293b8dmr1054037pfb.60.1652904611175; Wed, 18 May 2022 13:10:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652904611; cv=none; d=google.com; s=arc-20160816; b=Z+7PUGyPvmgLMIF8QVQf/2xbgj4Gg/rVB6OvK91E17d8L/C+dk3v2LjIZNKRWxdRKq cBSC8i1MoXwR9jxDx/Xp/yKlHYS9+rADkWWeq6VW618PFe53lCxAbPR/SivoB1CFiVu2 xcBEaX/mA+SQ/YY6dBUpKwbC+lMTFUeCsVT03Csy4uciyPkAxaZlbHALzSSkDTXBTs98 0rfHv0EbuwpVo4syphvKwXO3tuwbUPqNXZp39gub9C5is7N+hFRhGIgbHTQGlQDDBXSo HatO27bRMCsjLzSxKNaJ4mlkqb9bV0a6rPqXSSyyHwl82KCEgF965qn3L8u9MzN69vk8 YkXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=UQvDOEplxNi18/Jxa8yZiTJ2YNZLIpsMwzvuZh33DE4=; b=F16zRaQ4jzDavA6IDu+Vh83MwmdsGoq9crSIsQ5Wz1+dST4ykeVgk0oKlXiwqRifug J+paf2/NkNqMXyEzDKKMEv4AknM19IUjewvTTObLzB5a4nCY1+NRS082lHbzoI/36lZ3 GVK54o8EYHYip53A8ljMEsx7ELqgrbFadPPvOv/MeRLgfMB4+KBb5U86xo2Sd3cmKBnG MKIhq0wYfA8jsN7aLgPQfq3KpEYa03MIDxLAa5lrtacdX8oA4u/sLU9BBe4wl/TtbyEu ABLZvpvLpwgxIhCugUpaQyvgU40uTpXgTbmTn8545kz4gp+OSVmyAXkMN8nOTnr6zgqu YkRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=lb2LXhnv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id x15-20020a656aaf000000b003f24070f336si4837586pgu.211.2022.05.18.13.10.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 May 2022 13:10:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=lb2LXhnv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 8942123F3A6; Wed, 18 May 2022 13:10:04 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242366AbiERUJu (ORCPT + 99 others); Wed, 18 May 2022 16:09:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46782 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242350AbiERUJt (ORCPT ); Wed, 18 May 2022 16:09:49 -0400 Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C1798205259 for ; Wed, 18 May 2022 13:09:47 -0700 (PDT) Received: by mail-wm1-x334.google.com with SMTP id a14-20020a7bc1ce000000b00393fb52a386so3802756wmj.1 for ; Wed, 18 May 2022 13:09:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=UQvDOEplxNi18/Jxa8yZiTJ2YNZLIpsMwzvuZh33DE4=; b=lb2LXhnv3KRqu2NBVbbFYLjc9vviV+NW9xcex3N3B4BXG48hS8qT6t+rByuDUgWlwm Lk7CO2bbUQm7wjKqB7CRZTsZh5Mn8VkSK1JB9ctk81t1iMnHrewBL5bLjaU+NvNf3YlQ SE2q8xOJXLgD488r22FnpoXL69/kvIrYLWGBtJXlHW8/Kxi7cUwZfE573ZgEAnoh42FJ ST/AbhiIDDYtd/Uj2POZ79FWKKwVCIhmhytQs10O14g9ncj4zWiPpGhkKDKgabLKdAos KXQNnpNCj8p/BEoQ/hvkw7prPMMwfZB5zJ/YJwDDvb2pQdHOLmLbJKmu6Y90XFAUE2jY SBCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=UQvDOEplxNi18/Jxa8yZiTJ2YNZLIpsMwzvuZh33DE4=; b=A++IQ2DP+XdNelN8pl2noLnzKUzR4RLevzYJ1hr9EIxTNIi5HeaIPDISQftuaeD87F Knj/gduEgD1Hx9orQYtVHN/nLx7AUn4RSpLELpowNtqiYR/kaSXYzBgzruqaWlIZV5Qc P7sZPSF/+2EQKYDlBrbjLC6aMDo2eeQCBYk2olECrky+rvlDiS/TxIFM74MCW70t3Tzt 4ymXMJBotIQCfWiIStYeEEFtGVLiryJi1YDX8A/xymNvgb6NsaQa4M6vJVxy3vc0MsM7 i2nac6X2DULptRV/RDw/kvkv7V1a98NpS2CSKmZ6SKyUM0LCWNrklc/pXmbyByHd9cc/ E5PA== X-Gm-Message-State: AOAM532ZvdrWGgOn6tpVdJqyIwY2fRID2iIHLNgBmcF1vLskI0zXR4mU 4OTlRBxvNDl35XqO+hGBTeRqXw== X-Received: by 2002:a05:600c:1e0f:b0:394:7759:64f3 with SMTP id ay15-20020a05600c1e0f00b00394775964f3mr1388874wmb.19.1652904586352; Wed, 18 May 2022 13:09:46 -0700 (PDT) Received: from localhost.localdomain (laubervilliers-658-1-213-31.w90-63.abo.wanadoo.fr. [90.63.244.31]) by smtp.googlemail.com with ESMTPSA id o23-20020a05600c511700b0039456c00ba7sm6859281wms.1.2022.05.18.13.09.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 May 2022 13:09:45 -0700 (PDT) From: Corentin Labbe To: andrew@lunn.ch, broonie@kernel.org, calvin.johnson@oss.nxp.com, davem@davemloft.net, edumazet@google.com, hkallweit1@gmail.com, jernej.skrabec@gmail.com, krzysztof.kozlowski+dt@linaro.org, kuba@kernel.org, lgirdwood@gmail.com, linux@armlinux.org.uk, pabeni@redhat.com, robh+dt@kernel.org, samuel@sholland.org, wens@csie.org Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@lists.linux.dev, netdev@vger.kernel.org, Corentin Labbe Subject: [PATCH v2 0/5] arm64: add ethernet to orange pi 3 Date: Wed, 18 May 2022 20:09:34 +0000 Message-Id: <20220518200939.689308-1-clabbe@baylibre.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello 2 sunxi board still does not have ethernet working, orangepi 1+ and orangepi 3. This is due to the fact thoses boards have a PHY which need 2 regulators. A first attempt was made to support them was made by adding support in stmmac driver: https://lore.kernel.org/lkml/20190820145343.29108-6-megous@megous.com/ Proposal rejected, since regulators need to be handled by the PHY core. This serie try to handle this. This serie was tested on whole range of board and PHY architecture: - internal PHY * sun8i-h3-orangepi-pc - external PHY * sun50i-h6-pine-h64 * sun8i-r40-bananapi-m2-ultra * sun8i-a83t-bananapi-m3 * sun50i-a64-bananapi-m64 * sun50i-h6-orangepi-3 * sun50i-h5-nanopi-neo-plus2 The resume/suspend of PHY was tested. Regards changes since v1: - Add regulator_bulk_get_all for ease handling of PHY regulators - Removed all convertion patchs to keep DT compatibility. Corentin Labbe (4): regulator: Add of_get_regulator_from_list regulator: Add regulator_bulk_get_all phy: handle optional regulator for PHY dt-bindings: net: Add documentation for optional regulators Ondřej Jirman (1): arm64: dts: allwinner: orange-pi-3: Enable ethernet .../devicetree/bindings/net/ethernet-phy.yaml | 9 ++ .../dts/allwinner/sun50i-h6-orangepi-3.dts | 38 ++++++++ drivers/net/mdio/Kconfig | 1 + drivers/net/mdio/fwnode_mdio.c | 34 ++++++- drivers/net/phy/phy_device.c | 10 ++ drivers/regulator/core.c | 93 ++++++++++++++++++- include/linux/phy.h | 3 + include/linux/regulator/consumer.h | 2 + 8 files changed, 182 insertions(+), 8 deletions(-) -- 2.35.1