From patchwork Wed Dec 20 20:35:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Jernej_=C5=A0krabec?= X-Patchwork-Id: 13500439 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 85AC2C3DA6E for ; Wed, 20 Dec 2023 20:36:42 +0000 (UTC) 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:MIME-Version:Message-ID:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=ojsvuUUMDDTOpU2B3skl87krXiZp/XWgMlewi4gqODg=; b=EeJLyYYXRB2mxi wZMTMvX5V9agZmjfWOIqkIM6VH3V5PCoT/3ClOOowcC0nAX3WCDUP0qCobqMT1XQQnzWHh1v5KIEj a8jh1cqXyAbKaWIMOkSGGhdfXrDlQXnj8lnsezEYViThBNb+zej2L+6TTaRv9fpgU+vWfeIWPKs9b 00lw8UJav5M8yzkzRx1YUcNG6XBUe99KUVGIkLA25YDMtU5TClIWOVPk9gx4JUe/5ZXOT1/zHkESM a0ztR/MAF+pPyWQAl+XaHmAqYaNXFjoKQ49L7J4veyOltk6B13wEhMXR3in+KvbXQevKVv055m+Ac Rj2yUl79VZpaHHVsH9Xg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rG3If-000qsf-01; Wed, 20 Dec 2023 20:36:17 +0000 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rG3Ic-000qrr-0o for linux-arm-kernel@lists.infradead.org; Wed, 20 Dec 2023 20:36:15 +0000 Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-40c2bb872e2so1009415e9.3 for ; Wed, 20 Dec 2023 12:36:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1703104570; x=1703709370; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=Gab6lAEWInYI2on8pVOUw7Ug3N1N4atZPO1lxaglfow=; b=XBscdqewWb4n01NkLxxWoGllOjVDLnVd0vIEs7Hnh2SQeUSoO5rmrA23WA2YZgTxy1 nkBKp8K5XSX/mTabxcnU2HE5FixPKIJtN5zXPkOphdjmwvQf1ken8keFLfK/cm7K3G17 QRpxkMiUB83T7LOovV6SWMCYvikPwcGPfnnbNIpNUrZDpOMjUbl0rP833o1VlOtoppdW ss3X3a4q3YcKzW3A5qISPjAXr9frlO9Zxkj9Qc71FcGIjU7i9wrPZTDqQnfF5mP1aOCN 7BlHYV/byzpUyaljWvQnewBKGquUDBfX5XJLiv1OFD5iDMFfT/YKz4FOiVbJhtuVHwO1 gddw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703104570; x=1703709370; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Gab6lAEWInYI2on8pVOUw7Ug3N1N4atZPO1lxaglfow=; b=NPCVJKDfalxZgrNHRcD2jEE3JPMvHytxgKeh9lSLk9Z5J00AgNUk0REPZRkPy+UohE sYh8zm6pc6EkLlduAOWxqJyYs2y0ulXZLGOSUifFk/bIGojqXt5xDbtQUR25ujQbXAOq iYwdm7M+auEEV/dKRFYlv+tEbLSI1dAgBvNauB/g/RrOAJQXhpWOgVkIcWokZg89l9Xe IJZjuNDwh3x3/dOWZB7WGmV062f0c6JObbY2JYVDr4rd/CIJawyCa6JwlAxa3NB8lWJ1 oL8WkRwQhryrWN1M7FoGSxthsWiofcCpuSCwE6y87sJbPo/JKHGYF0hz2K2I8uZMsNXy 4oEw== X-Gm-Message-State: AOJu0Ywgd0Hl7uUHoUBmCaXPV8mqhiBkZ7q4KFb4MJiHLZMJjBAAVkhp SpD4BKnnP3LbzotlxuY1qYg= X-Google-Smtp-Source: AGHT+IG7/pATF5SbDyVvRmck3xB4G+FEKhoLKpI3NCY4qj24Tl8dGaUxllvbsMityLj5lXSpUtPePA== X-Received: by 2002:a05:600c:1387:b0:40d:1a5f:8abd with SMTP id u7-20020a05600c138700b0040d1a5f8abdmr64059wmf.291.1703104569941; Wed, 20 Dec 2023 12:36:09 -0800 (PST) Received: from localhost.localdomain (82-149-12-148.dynamic.telemach.net. [82.149.12.148]) by smtp.gmail.com with ESMTPSA id v14-20020a05600c444e00b0040c58e410a3sm8703224wmn.14.2023.12.20.12.36.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Dec 2023 12:36:09 -0800 (PST) From: Jernej Skrabec To: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, wens@csie.org, samuel@sholland.org, andrew@lunn.ch, hkallweit1@gmail.com, linux@armlinux.org.uk, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Jernej Skrabec Subject: [PATCH v5 0/3] arm64: add ethernet to orange pi 3 & one plus Date: Wed, 20 Dec 2023 21:35:34 +0100 Message-ID: <20231220203537.83479-1-jernej.skrabec@gmail.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231220_123614_292938_6F0D3FB7 X-CRM114-Status: UNSURE ( 8.88 ) X-CRM114-Notice: Please train this message. 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This is continuation of the work done by Corentin: https://lore.kernel.org/linux-sunxi/20221115073603.3425396-1-clabbe@baylibre.com/ In short, Orange Pi 3 and Orange Pi One Plus boards have ethernet PHYs which are powered by two voltage regulators. They have to be powered on in correct order or otherwise they are not functional. Please see link above for previous discussion on how to achieve that. Best regards, Jernej changes since v1: - Add regulator_bulk_get_all for ease handling of PHY regulators - Removed all conversion patches to keep DT compatibility. Changes since v2: - removed use of regulator-names and regulators list. Changes since v3: - fixes kbuild robot report Changes since v4: - dropped merged patches - reworked PHY powering on/off patch - added Orange Pi One Plus patch, since it has same issue Corentin Labbe (1): phy: handle optional regulator for PHY Jernej Skrabec (1): arm64: dts: allwinner: orange-pi-one-plus: Fix ethernet Ondrej Jirman (1): arm64: dts: allwinner: orange-pi-3: Enable ethernet .../dts/allwinner/sun50i-h6-orangepi-3.dts | 40 ++++++++++++++ .../allwinner/sun50i-h6-orangepi-one-plus.dts | 29 +++++++--- drivers/net/mdio/fwnode_mdio.c | 53 ++++++++++++++++++- drivers/net/phy/phy_device.c | 6 +++ include/linux/phy.h | 3 ++ 5 files changed, 122 insertions(+), 9 deletions(-)