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: 98888 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp209446vqr; Thu, 25 May 2023 01:41:58 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5hbC01nu0nj1t8mKqk2nnq1D9m1fLEhLP+5nnx7G5J5XQcWVS9c2hY43eBp4cBA8rZc2Sc X-Received: by 2002:a05:6a20:9390:b0:10f:1e5d:9045 with SMTP id x16-20020a056a20939000b0010f1e5d9045mr1311963pzh.45.1685004117754; Thu, 25 May 2023 01:41:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685004117; cv=none; d=google.com; s=arc-20160816; b=RUejw78XGv3kSHoGvR8CNc1TIAYjqksuStkPVo1wtv2aih2tgS5mw1Q1+WjgqQ4wyu CT/zYL6Ip9y/KQPqJfQTD2Cf2Sc/+e5d86U3FujvSpXAYrEzAfAHv1aL9rPu7S/WX/DC M3f2povmRyKVIiykd+mBbWvDolwn7VDTkSXw8rPLU05cgs9EnSgXl/VG/JJQ5UyXwY2w pXoFU9WP6iLvK4lTYVi0VVNVtDiAJoXzjVtYXuve1Tla7OcM5NhfI8OHhGYLagIZ7hQj 3OLqCFQZN1kbYUgtgu7ShWi8o8HyTu5/iaKDtLXpBuNlRC+mcSN0brCiefa050AeUBLC Jbnw== 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=21sgxyywgbmhgk/Ve+LU4uP54gwzQ24rV+EZbQmdloE=; b=l6WBkwljDwZSFYTbRrPK9hSUz3PKxdFL/nrxMPhlOWx5kJEFmFguLVZaggYJ4T4qWU ieEsCJAUDDf6y4ponnieVEL8z3JdoWrFFKYO69q7Bx9+Wtfr9ZY1xgbkcsmTbpCBSqzX zkA9V5FhnJsLCaf6ZWh67X53e/82tnZNaaMiKqThU15g5duiuPV13YXTKa5vtYAlmIRq 5gZtVu5Eaq5rB/l/8OhBLm0CSdlDok49OhRnheCsjGBaOLr1gWcSJUxlefhkCklSKyhi g1mdEK2QoeS3081urwTKmG8Ldp6/gsVbgMDpARKecaPCPjrSTscMWf3Mz7S96rgyd1eQ cwmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20221208.gappssmtp.com header.s=20221208 header.b=oSbo7Tg1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r13-20020a65498d000000b005344b36c64asi640596pgs.786.2023.05.25.01.41.45; Thu, 25 May 2023 01:41:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20221208.gappssmtp.com header.s=20221208 header.b=oSbo7Tg1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240238AbjEYIfU (ORCPT + 99 others); Thu, 25 May 2023 04:35:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58140 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240167AbjEYIer (ORCPT ); Thu, 25 May 2023 04:34:47 -0400 Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8073D1A4 for ; Thu, 25 May 2023 01:34:16 -0700 (PDT) Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-3f603ff9c02so2143735e9.2 for ; Thu, 25 May 2023 01:34:16 -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=i2iPZ5+zaWrAB2tYNdU/GCjdhKeRv2PSS6x1X0fuF5UoH9bTKPllyRCC2uaQZoz0wz XZRSBCa9wCA28slbNzc8OUhCuldrTcPuOtbtI41tMxbO/aim30ar8gB30OS9yU+atRki jTMoWUAw+1S+zIR9CdfiQfB9xQmPQKTHiCoeGvXYMwhrcneL5zjWVYLH1gKiHJl+MAfd OidQpNldW0EWkReq3gWR7by1DzhvsOD9AYnKXHWjEaK057KXc1SIig8ovJuCDKlbnPeN aue12U/7PKomLoyL4txnMQpfr8bArO/wpbwOwKa5HO7nVXizEd+nXIS0uWH0jGg02bYs v+0Q== X-Gm-Message-State: AC+VfDzR5Fkq4ARgvwQWr6AGmFUlGhSU19wySiTioN5Ciu4T8rqHpnBY nJdfheuckz7K5SbdXuUcXk3LfkhktC3Mj4ZwCCk= 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-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766854877652797020?= X-GMAIL-MSGID: =?utf-8?q?1766854877652797020?= - Enable "vibr" and "vsim2" regulators to power the ethernet chip. Tested-by: Kevin Hilman Signed-off-by: Alexandre Mergnat Reviewed-by: AngeloGioacchino Del Regno --- 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 = ;