From patchwork Wed Apr 26 10:49:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Mergnat X-Patchwork-Id: 87812 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp151176vqo; Wed, 26 Apr 2023 03:58:31 -0700 (PDT) X-Google-Smtp-Source: AKy350YlmST4l5ThBInEP4VExjKu/2i0CgXpvGQtH5Q6CPrwUYOO6JmjiM1F3djOlS6mjffI0By7 X-Received: by 2002:a17:90a:8a91:b0:246:9932:18a2 with SMTP id x17-20020a17090a8a9100b00246993218a2mr20326262pjn.31.1682506710818; Wed, 26 Apr 2023 03:58:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682506710; cv=none; d=google.com; s=arc-20160816; b=qwk8o+lnvg+tPkc1xpty3wKfsB1Tj4Sybygcnw1W+KEIYP3VKxRYKEpIj4NAGfozaY I+UVI7Lys3UQM2pnatUCDXJ5/GMRanttfJZX3BSvfu5qhbCdK8gQDUh3G/GEK6AUEslb j59B4rfREhMh3W/ACOp15ENhTtxNjazjGRZ8ZpAeP5qXe+D07DyDl4gGQhD2Augr/V11 x2SUWnUvT8qPMJiMat7qOnIJDve67SSIFM2+YSfeTIxli165+x3G7HZO7XZUh7hkzF7p HvMp6d0Af7deFIMIQRQAey2PM73cW7vR49pIKXmfAioBFG0xRqFQvkeirEnO+2XU71dt DzcA== 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=MHZCc6iP5cyLl1hYj/g5I+gkLg+6HSQEelOpwfLOUMc=; b=TLSRDD0K0Kvj7QrQ0ZhkXRPsy1NzS3mFTpYjv08S9BjquC6q0MUvlyyZMprCiGjJUo Y8qQ8kWPMxqUm8b2hnkHrunxrOD1HtHY2Xn4QehW9jGPVYAg91dYSYpezxyv1PMpWxlI ZrnUF+/81BuAiqft87Nya0LhDERVnptMjkuZt9Op6dRzc2TJt+3Ox/T0Ii+rU9eciLUk XQC1GZ8FFq5Nt69fCDjvvQkGQFmOywtQxJtWpdJWefkaXyqHRk7AW0NseQaQz6r/6QKC Em3wmn4qafNHLe0kcBHo1e3ZRkYqCOQg3NHrHj2F5OWH3ZlZej4hBIzl8u8kjNx0BHoP 3VhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20221208.gappssmtp.com header.s=20221208 header.b=Pie75K4s; 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 e2-20020a170902cf4200b0019937768786si16905369plg.290.2023.04.26.03.57.53; Wed, 26 Apr 2023 03:58:30 -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=Pie75K4s; 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 S240650AbjDZKuM (ORCPT + 99 others); Wed, 26 Apr 2023 06:50:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42446 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240486AbjDZKtq (ORCPT ); Wed, 26 Apr 2023 06:49:46 -0400 Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com [IPv6:2a00:1450:4864:20::32a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E406C114 for ; Wed, 26 Apr 2023 03:49:44 -0700 (PDT) Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-3f199696149so30998705e9.0 for ; Wed, 26 Apr 2023 03:49:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20221208.gappssmtp.com; s=20221208; t=1682506183; x=1685098183; 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=MHZCc6iP5cyLl1hYj/g5I+gkLg+6HSQEelOpwfLOUMc=; b=Pie75K4s8BIhiYlJtqo1aE33z9rRXKp084j6G7Y2Ilh2Ph6Rgn1HkDVTomOwlo+cSG rGxapLjA39BkiPoer7JDCuJSZf0dntpYgt1/BHq6Sc6gGJQ8JzPbkMLO7gjCpo4qhdRP W5QYOkT1CEwSt4M5gTyZXkn0PnF/BTxMXENZ5DEMlRw7Qf9J3zLNuqZBvRxke1STito4 O4WR+cOiMnOZqDl9gyfVm0+GX8Gxj+3uTRWsqqBuXYNkN/q5ZdR4hlxl4a1ZINI799AQ QLZBP+ZbvVMXgBKF0IYPzm97622vw8ase2z3m0PqbCStnx9t9hTZfJx4GwVTk4iXjNvo cT9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682506183; x=1685098183; 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=MHZCc6iP5cyLl1hYj/g5I+gkLg+6HSQEelOpwfLOUMc=; b=UAdEhe3pUT9F4yq5NIrH354lfDgjXsMDPSXyNJ7GjZG9Cfj1PQEvw/pBMfdvHBdil7 mQq6uXVwl/8tnTiz8+3OjWMk8Gx2To7191MQFjcPtZ9Wb4BMzfz9nW9J7/jhZH6SBkic BXxRujCZT9p80IHlD+oeGuwV4YynYWyxr44N7BsUcH3CQooJW5g/dTq3Htpz0vRzvtyq ugsnMUH5Uu27Jo/jso4VnzKpoyyqR0PTu314dWb/3cUJjovC0q9RKzMtK+kcCMycN/+v zocdYeKEAJ0kUnP9XIiE8H2CtVWcVLDgpEOlpbw5tSKcdQEIU8hBaRX0MNkMat/loVoW U8vg== X-Gm-Message-State: AAQBX9f4YmvdTHgcXgtTSm4q4SF5n9gOnYBhNfO7npw/F3ohGSW9U5oW EFZ1khuZMCGaxNYtE09Rvq0I/w== X-Received: by 2002:a05:600c:21d7:b0:3f1:7a57:45cd with SMTP id x23-20020a05600c21d700b003f17a5745cdmr12735166wmj.28.1682506183332; Wed, 26 Apr 2023 03:49:43 -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 25-20020a05600c025900b003ed2c0a0f37sm17601988wmj.35.2023.04.26.03.49.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Apr 2023 03:49:42 -0700 (PDT) From: Alexandre Mergnat Date: Wed, 26 Apr 2023 12:49:06 +0200 Subject: [PATCH v6 06/12] arm64: dts: mediatek: add mmc support for mt8365-evk MIME-Version: 1.0 Message-Id: <20230203-evk-board-support-v6-6-8d6b1cfe7f29@baylibre.com> References: <20230203-evk-board-support-v6-0-8d6b1cfe7f29@baylibre.com> In-Reply-To: <20230203-evk-board-support-v6-0-8d6b1cfe7f29@baylibre.com> To: Catalin Marinas , Will Deacon , Wim Van Sebroeck , Guenter Roeck , Rob Herring , Krzysztof Kozlowski , Matthias Brugger , AngeloGioacchino Del Regno 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=5035; i=amergnat@baylibre.com; h=from:subject:message-id; bh=KUgwewXk1EivxDw0z0iI41cPCEtipZA2btoK/tgfO1Y=; b=owEBbQKS/ZANAwAKAStGSZ1+MdRFAcsmYgBkSQG/umbZhwtoBekc0Z2zrbAmgbW+PJfC5PmhHcFL +xNsY1uJAjMEAAEKAB0WIQQjG17X8+qqcA5g/osrRkmdfjHURQUCZEkBvwAKCRArRkmdfjHURZxAD/ sH7glPjJVGqd4zDlFQlqHk13vRY2wKNLumy5NScLHrqU4b8P5vqMZLUhfdIGJhLB6NFBeX9pjFkJB7 kH57Z9R8WsDVGc3sv5HnICc27mRmrXjMIS9zRIrrxxMigydLfTv2Zcbog3V9NIjJ1JcN4vrNxdLsev SafpnNi6Uy+D+9VO0YUfKtgFrq0ikbQ5HAw4qi3vOYK95kJnNLFn9XvxbIgAvEjaO0qIo6tmDQzUoq mLoue4Tyb5UqU76XNSnqzTWPedGP4Qa8pGVJUxGTrREE7RuVpPZ0imjO+I90VPzYJRvrgXo2nU6UOC KWEYbEfulOeMhGKwsC/d0e1Zf8jjoIVjhrnsMsv8+A3StGJItSiPIB8ldZWRx1mJxI5GbnsSQLu7Cd 9Um7SlmVN1m8Mr/AkPWQn4TlgUGvoY1mYunNULMHZR9wETEZ8s+8yXT1vsrzrme0iDoWQ+0D5RmZhu 85drnIja/FVz5kyT8P/Jz+jasaHVRoff9U/9EpAE/tz5Gc5M3VVLTh14eT8eXWmjc6qlsde7SaQYPY DjdO8Rrex4qHi4+8L6VpdEly8Ht1zKi91c4Jo2BKfuvjFAFWM0c/MQ8Pqr12xR1xQysB6/22d4ka5f HpvxhpEViJ/H7Mnh/N4aKA1gPPbZ3UYkYRYTxv3mo4z7eUNEgVzAWaih4RZg== 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=ham 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?1764236156944907612?= X-GMAIL-MSGID: =?utf-8?q?1764236156944907612?= - Add EMMC support on mmc0 (internal memory) - Add SD-UHS support on mmc1 (external memory) Reviewed-by: AngeloGioacchino Del Regno Tested-by: Kevin Hilman Signed-off-by: Alexandre Mergnat --- arch/arm64/boot/dts/mediatek/mt8365-evk.dts | 138 ++++++++++++++++++++++++++++ 1 file changed, 138 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8365-evk.dts b/arch/arm64/boot/dts/mediatek/mt8365-evk.dts index a238bd0092d2..cd920d09c3fe 100644 --- a/arch/arm64/boot/dts/mediatek/mt8365-evk.dts +++ b/arch/arm64/boot/dts/mediatek/mt8365-evk.dts @@ -95,6 +95,42 @@ &i2c0 { status = "okay"; }; +&mmc0 { + assigned-clock-parents = <&topckgen CLK_TOP_MSDCPLL>; + assigned-clocks = <&topckgen CLK_TOP_MSDC50_0_SEL>; + bus-width = <8>; + cap-mmc-highspeed; + cap-mmc-hw-reset; + hs400-ds-delay = <0x12012>; + max-frequency = <200000000>; + mmc-hs200-1_8v; + mmc-hs400-1_8v; + no-sd; + no-sdio; + non-removable; + pinctrl-0 = <&mmc0_default_pins>; + pinctrl-1 = <&mmc0_uhs_pins>; + pinctrl-names = "default", "state_uhs"; + vmmc-supply = <&mt6357_vemc_reg>; + vqmmc-supply = <&mt6357_vio18_reg>; + status = "okay"; +}; + +&mmc1 { + bus-width = <4>; + cap-sd-highspeed; + cd-gpios = <&pio 76 GPIO_ACTIVE_LOW>; + max-frequency = <200000000>; + pinctrl-0 = <&mmc1_default_pins>; + pinctrl-1 = <&mmc1_uhs_pins>; + pinctrl-names = "default", "state_uhs"; + sd-uhs-sdr104; + sd-uhs-sdr50; + vmmc-supply = <&mt6357_vmch_reg>; + vqmmc-supply = <&mt6357_vio18_reg>; + status = "okay"; +}; + &mt6357_pmic { interrupts-extended = <&pio 145 IRQ_TYPE_LEVEL_HIGH>; interrupt-controller; @@ -118,6 +154,108 @@ pins { }; }; + mmc0_default_pins: mmc0-default-pins { + clk-pins { + pinmux = ; + bias-pull-down; + }; + + cmd-dat-pins { + pinmux = , + , + , + , + , + , + , + , + ; + input-enable; + bias-pull-up; + }; + + rst-pins { + pinmux = ; + bias-pull-up; + }; + }; + + mmc0_uhs_pins: mmc0-uhs-pins { + clk-pins { + pinmux = ; + drive-strength = ; + bias-pull-down = ; + }; + + cmd-dat-pins { + pinmux = , + , + , + , + , + , + , + , + ; + input-enable; + drive-strength = ; + bias-pull-up = ; + }; + + ds-pins { + pinmux = ; + drive-strength = ; + bias-pull-down = ; + }; + + rst-pins { + pinmux = ; + drive-strength = ; + bias-pull-up; + }; + }; + + mmc1_default_pins: mmc1-default-pins { + cd-pins { + pinmux = ; + bias-pull-up; + }; + + clk-pins { + pinmux = ; + bias-pull-down = ; + }; + + cmd-dat-pins { + pinmux = , + , + , + , + ; + input-enable; + bias-pull-up = ; + }; + }; + + mmc1_uhs_pins: mmc1-uhs-pins { + clk-pins { + pinmux = ; + drive-strength = ; + bias-pull-down = ; + }; + + cmd-dat-pins { + pinmux = , + , + , + , + ; + input-enable; + drive-strength = ; + bias-pull-up = ; + }; + }; + uart0_pins: uart0-pins { pins { pinmux = ,