From patchwork Thu May 25 08:33:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Mergnat X-Patchwork-Id: 13255012 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 A5EE8C7EE32 for ; Thu, 25 May 2023 09:35:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=21sgxyywgbmhgk/Ve+LU4uP54gwzQ24rV+EZbQmdloE=; b=FtKu6nE3MOMUc3IfwWf5e1he83 8wCOWi/0MH5zRARSGBcVHx4Go2PIg5LKqn+Of6s/EBfsyM1mDpORTIaBoIDmAViVtOSQJBwvy2zbA 0KN4I/90eXG2a2m9vPCsGvarxJYPtNYqdPQ5/kbMFXyQ+EiVrngZ22mp39k89KtTMFT9oREg6vkr4 o/HxwxsnnHqCsOxK4V3Yt9AgHZsGo/m2qjnZlsdDj09L0QHWa4Dssfo7V2zwE2btvqa9XV7Qqxi6D 3V1ijoHpZbRYlcAxzrEADUNDYVkHZVuANJs5s1Ixfamgz0pPEuvv8q9I2gdLC8q6YPT6F7d9UV1CM dTLi3NtA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q27NZ-00G9n0-2U; Thu, 25 May 2023 09:35:29 +0000 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q26Q8-00G0RY-2n for linux-mediatek@lists.infradead.org; Thu, 25 May 2023 08:34:06 +0000 Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-3f6dfc4dffaso512505e9.0 for ; Thu, 25 May 2023 01:34:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20221208.gappssmtp.com; s=20221208; t=1685003641; x=1687595641; 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=21sgxyywgbmhgk/Ve+LU4uP54gwzQ24rV+EZbQmdloE=; b=oSbo7Tg1JHYrJqvIZp66F5Ub8DggOo4HbscgWfKT0Ui997PWVUKszbKsZXW59fdjFq WxU8PnTQuEcBMi6s4HC9IFjvqZ4EzZCqz2HSeWw/8IzcVUuhVbX5zQS5kszG6AknD3sD fRLnweyOb7mApmqPJIEKfv80JGg3XHvH37ogoRzzP5Ik/Wuq87yki4ljYJ+zl0Aj4jm9 hwD8pVCXer93cL54d7WbnhpvU2+W7CN5gm8wwO5A3v5X8uSphTcupw0Mj974Z437LTzx PmUYTEPsLImZMexhdNjLBqgPgWrwaitXZPe+4rNXqrMNUwbJMz95CnnkKir1Uw7cI1c7 In6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685003641; x=1687595641; 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=21sgxyywgbmhgk/Ve+LU4uP54gwzQ24rV+EZbQmdloE=; b=lI0G/UOKjd7iOfmRevR4tFz0NjKq89uymh91h0rANbEALQSpCFfpSgM19ul1aOtdun pVqOqCsG3u1dZaAX+SDcDnfnCFw69PQHM6DBbB+fCb9v+xz5q+Yd0cFKcY5OpwVonXgp iySbMn1cRDDwx8k+EhI17BLx5mHJAQgSyNtkpni6bv+ZclTY9lPrkvysBMoJffumz36G zIVoDCBwhtXAOukAyHh7FCetkjk0pP5n2G08mmMGg4kVO4LagHn22hpiLPOf6ZL+WfHq 3GwR51/iotz0QjaKQLA9GmNfQ9oQgvGN8qowUksuJXCikzT5gr7HOep35ZJ2lKWpeLMl t1aA== X-Gm-Message-State: AC+VfDxI8a+M89o2L+x/97D4ThTHTm9cYeJwRzy3xndbKv+ph+6kC0+y NNzANT/CFkNiZXJmx9bKljlOKg== X-Google-Smtp-Source: ACHHUZ60vZmppbo1C69IRWqcbhZqc1t8qjPj+2xpbwp4QzkZPSmbOesqmgUpvqXUK9vJq3VRpD9brg== X-Received: by 2002:a05:600c:2304:b0:3f4:2bb3:a5c9 with SMTP id 4-20020a05600c230400b003f42bb3a5c9mr1906034wmo.8.1685003641741; Thu, 25 May 2023 01:34:01 -0700 (PDT) Received: from [127.0.1.1] (158.22.5.93.rev.sfr.net. [93.5.22.158]) by smtp.googlemail.com with ESMTPSA id o3-20020a5d6843000000b003095a329e90sm945809wrw.97.2023.05.25.01.34.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 May 2023 01:34:01 -0700 (PDT) From: Alexandre Mergnat Date: Thu, 25 May 2023 10:33:16 +0200 Subject: [PATCH v8 07/10] arm64: dts: mediatek: add ethernet support for mt8365-evk MIME-Version: 1.0 Message-Id: <20230203-evk-board-support-v8-7-7019f3fd0adf@baylibre.com> References: <20230203-evk-board-support-v8-0-7019f3fd0adf@baylibre.com> In-Reply-To: <20230203-evk-board-support-v8-0-7019f3fd0adf@baylibre.com> To: Catalin Marinas , Will Deacon , Wim Van Sebroeck , Guenter Roeck , Rob Herring , Krzysztof Kozlowski , Matthias Brugger , AngeloGioacchino Del Regno , Conor Dooley Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-watchdog@vger.kernel.org, devicetree@vger.kernel.org, linux-mediatek@lists.infradead.org, Alexandre Mergnat , Kevin Hilman X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=2249; i=amergnat@baylibre.com; h=from:subject:message-id; bh=U+Xs+VxtYFwUGhR18YiqTjcMEMzYJRNse3ci95tZvgA=; b=owEBbQKS/ZANAwAKAStGSZ1+MdRFAcsmYgBkbx1vMkOP5L8x//cPNHtpPDsMNnba4MKariCWnjnC vFJk/COJAjMEAAEKAB0WIQQjG17X8+qqcA5g/osrRkmdfjHURQUCZG8dbwAKCRArRkmdfjHURSTIEA CnP+Sp9PCcyYKQpGswvuSybT/Qu8Ldh8ib2w+5v/Fg2qP3mNArkJ4dKp3xkQ18OFAaC9tD4Mg2+JRp tN6kVnrVQXzOaYLAdLU84jZ/c2+/QKWklrvL3L3tWx+RaCQPzulHag0DnOByHmI4wDLRCYxHhpFKQM GPEhXcf4rcqWPqDx7mk5552FDu2YHLIkIajwh//clAKRFU/KixwanPXGooo253UVaHSgKFssZ+onro 4vvzA15OFWR6YvK7H7G5J3buTpMyMUgM6nNK+sZMAYBB7rmnKlDPkjWUmSk0QPq/93AHB9Bw04Dxgl 71xi9vsNEm0bLA9rnmg/SnsY84PJ7JyyYK4yUiBSDlVpT25J9n8pY+usn3e4Kjm8OXW8tp/VILWDVL 4eiUaZ17+eGfxQ+G8drgeY0zySuTzBTBiYOzWsh1JauL02zjs9xMqSB7LAK+OObR7jzw09pF4ggFek bSD7MrHt5le9WKbs6SDOC1NNb3DbFQJRgQfj1p+mVTz0PDoEDV0N0BLL3/w80RtXTfvjq53qa3//7q ZISN8IzDUKu+TxO8/ikTSaoEfT6E+Ni4y6TtnIbdB23vtTIrVyFPgt4QhtuaXS0P1F/kzs2NE5WKnT b5DhDcy34NN1+b1Jr5ESIteKC8eATq/40dGIet6Pr+cuDuePJnv97wA6zy1A== X-Developer-Key: i=amergnat@baylibre.com; a=openpgp; fpr=231B5ED7F3EAAA700E60FE8B2B46499D7E31D445 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230525_013404_909591_A4C25412 X-CRM114-Status: GOOD ( 10.88 ) X-BeenThere: linux-mediatek@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-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org - Enable "vibr" and "vsim2" regulators to power the ethernet chip. Tested-by: Kevin Hilman Signed-off-by: Alexandre Mergnat --- arch/arm64/boot/dts/mediatek/mt8365-evk.dts | 48 +++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8365-evk.dts b/arch/arm64/boot/dts/mediatek/mt8365-evk.dts index 1a5769c397c2..86524cbf4354 100644 --- a/arch/arm64/boot/dts/mediatek/mt8365-evk.dts +++ b/arch/arm64/boot/dts/mediatek/mt8365-evk.dts @@ -88,6 +88,29 @@ optee_reserved: optee@43200000 { }; }; +ðernet { + pinctrl-0 = <ðernet_pins>; + pinctrl-names = "default"; + phy-handle = <ð_phy>; + phy-mode = "rmii"; + /* + * Ethernet and HDMI (DSI0) are sharing pins. + * Only one can be enabled at a time and require the physical switch + * SW2101 to be set on LAN position + * mt6357_vibr_reg and mt6357_vsim2_reg are needed to supply ethernet + */ + status = "disabled"; + + mdio { + #address-cells = <1>; + #size-cells = <0>; + + eth_phy: ethernet-phy@0 { + reg = <0>; + }; + }; +}; + &i2c0 { clock-frequency = <100000>; pinctrl-0 = <&i2c0_pins>; @@ -138,6 +161,31 @@ &mt6357_pmic { }; &pio { + ethernet_pins: ethernet-pins { + phy_reset_pins { + pinmux = ; + }; + + rmii_pins { + pinmux = , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + ; + }; + }; + gpio_keys: gpio-keys-pins { pins { pinmux = ;