Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp740218iog; Wed, 29 Jun 2022 09:14:12 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sxiIVVAejoHglyTAjKbNwLAjdVffYviYvbTGUXrGnqVzlSJLq9t2oZXA+Hr0K2a0WJIdoI X-Received: by 2002:a17:90b:1b11:b0:1ed:37b0:be25 with SMTP id nu17-20020a17090b1b1100b001ed37b0be25mr4536484pjb.99.1656519252659; Wed, 29 Jun 2022 09:14:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656519252; cv=none; d=google.com; s=arc-20160816; b=Hvvq5muZKjW5YqgSzB5U5SxfhbQNPjOvxu6ql0RtRPYxpJj+sqvMNN5JMA323bffMu wHQd1V4Orgk5d+r1w/mUZQmlBEMlEOUWs9NXd/cMKmoCDBpD/pnfibMQhCvkOMNnPu3d uGjrcK/oQEywsesaJKVL1xwd4larWLOU0wcKXbZ+LyjQUQKf+dyULzazX6YJQu3p8sWP iQX8jGUOkNMlc4/udvkahBAAwhwKs1VqXhxDCmWFWq8JqilXCmI3rc6xC8EBO8nrl8X3 SAb+VvnL2l1aPjKLoqw6DjvQySEtbwNL3oKmPsyAOBd2UeKMxi4lSjsKiHGLo30GLFVG LHjA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=mYJIUDUt2i3lSUH3tS/tZioYqiC3fwwfiTPBirPrFF8=; b=Rwc3/NNhr8b2BdyV+FYCTDZGeVg25zAbrUWcUab2bF+qJ3RB8qiT0XWV9YHc1P+tV7 oxd6xGZMYMvO/X0/UeY2Gv5l+NILq8oDlp5A7bbccEWdE7UMCxnrJ4kca/JqAh2YdaPf bwi154IZR/Z3Nl16k/66Vlw68oos6+F2XEvCczD86g4MLc6CSxGMSkaf5zAOr2ozDI2Z ykrLJkfztu36Kparr7oWKEm0PIuqLse27PwGzUXyWecZf0eQIJIkZSETwUwAt7zDOFAT 75IoGDvelsVDbj2t/hUrfN9A+qhYk6f1S7KjLUEfuQJCrzqgDkCC2ZSyZmcomnPIlUYm 50IA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=Vp86zMw2; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id kx18-20020a17090b229200b001ece66ac462si3875572pjb.33.2022.06.29.09.13.54; Wed, 29 Jun 2022 09:14:12 -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=@collabora.com header.s=mail header.b=Vp86zMw2; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229654AbiF2QBT (ORCPT + 99 others); Wed, 29 Jun 2022 12:01:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40652 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234252AbiF2QAa (ORCPT ); Wed, 29 Jun 2022 12:00:30 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B691221E11; Wed, 29 Jun 2022 09:00:29 -0700 (PDT) Received: from notapiano.myfiosgateway.com (pool-98-113-53-228.nycmny.fios.verizon.net [98.113.53.228]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: nfraprado) by madras.collabora.co.uk (Postfix) with ESMTPSA id 692CD660198D; Wed, 29 Jun 2022 17:00:27 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1656518428; bh=etvqQ1Sf4L9KOJ6PfLg/qIPZJ2SbAA+l1UyPzPWGVwY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Vp86zMw2GSlDu1PAFaueC5lnum0u0hTa4z3UyfBNZDukkMJJnem88oC876mYn+2TP ob9W5WbSl0j237TWLhuN2RXo7IDzA5pQhTGJLWba2FrqQqekpRsV7RPlgF3wGF+PPS V14L4WzyEPibYHKM5/ShK6sp2PwEW8EB0x+cz2idB0kC0/wdSRSn1skW6RlvpbsO5i N3G09TpbZ1h0EjWdrOvpQ9rvmZaoeQEK9AbR6zh9UIoueBG/rjFggRLSk16tIx5q1V mfttr/sLp8bVGga4vW5c3mAiQxYso0bWbL0+tk95f2shNXYgXJIE97CDTwjbgCQOt5 hwmcC3ZuCoBMg== From: =?UTF-8?q?N=C3=ADcolas=20F=2E=20R=2E=20A=2E=20Prado?= To: Matthias Brugger Cc: AngeloGioacchino Del Regno , kernel@collabora.com, Chen-Yu Tsai , =?UTF-8?q?N=C3=ADcolas=20F=2E=20R=2E=20A=2E=20Prado?= , Krzysztof Kozlowski , Rob Herring , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org Subject: [PATCH v4 17/19] arm64: dts: mediatek: asurada: Enable MMC Date: Wed, 29 Jun 2022 11:59:54 -0400 Message-Id: <20220629155956.1138955-18-nfraprado@collabora.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220629155956.1138955-1-nfraprado@collabora.com> References: <20220629155956.1138955-1-nfraprado@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 Enable both MMC controllers present on Asurada. MMC0 is for non-removable internal memory, while MMC1 is an SD card slot. MMC1 isn't used on all machines, but in those cases the CD interrupt is never triggered and thus it is basically as if it was disabled. Signed-off-by: NĂ­colas F. R. A. Prado Reviewed-by: AngeloGioacchino Del Regno --- Changes in v4: - Added this patch .../boot/dts/mediatek/mt8192-asurada.dtsi | 149 ++++++++++++++++++ 1 file changed, 149 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi b/arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi index d56c73e37633..7b89f6e552c5 100644 --- a/arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi @@ -170,6 +170,46 @@ &i2c7 { pinctrl-0 = <&i2c7_pins>; }; +&mmc0 { + status = "okay"; + + pinctrl-names = "default", "state_uhs"; + pinctrl-0 = <&mmc0_default_pins>; + pinctrl-1 = <&mmc0_uhs_pins>; + bus-width = <8>; + max-frequency = <200000000>; + vmmc-supply = <&mt6359_vemc_1_ldo_reg>; + vqmmc-supply = <&mt6359_vufs_ldo_reg>; + cap-mmc-highspeed; + mmc-hs200-1_8v; + mmc-hs400-1_8v; + supports-cqe; + cap-mmc-hw-reset; + mmc-hs400-enhanced-strobe; + hs400-ds-delay = <0x12814>; + no-sdio; + no-sd; + non-removable; +}; + +&mmc1 { + status = "okay"; + + pinctrl-names = "default", "state_uhs"; + pinctrl-0 = <&mmc1_default_pins>; + pinctrl-1 = <&mmc1_uhs_pins>; + bus-width = <4>; + max-frequency = <200000000>; + cd-gpios = <&pio 17 GPIO_ACTIVE_LOW>; + vmmc-supply = <&mt6360_ldo5_reg>; + vqmmc-supply = <&mt6360_ldo3_reg>; + cap-sd-highspeed; + sd-uhs-sdr50; + sd-uhs-sdr104; + no-sdio; + no-mmc; +}; + /* for CORE */ &mt6359_vgpu11_buck_reg { regulator-always-on; @@ -503,6 +543,115 @@ pins-bus { }; }; + mmc0_default_pins: mmc0-default-pins { + pins-cmd-dat { + pinmux = , + , + , + , + , + , + , + , + ; + input-enable; + drive-strength = <8>; + bias-pull-up = ; + }; + + pins-clk { + pinmux = ; + drive-strength = <8>; + bias-pull-down = ; + }; + + pins-rst { + pinmux = ; + drive-strength = <8>; + bias-pull-down = ; + }; + }; + + mmc0_uhs_pins: mmc0-uhs-pins { + pins-cmd-dat { + pinmux = , + , + , + , + , + , + , + , + ; + input-enable; + drive-strength = <10>; + bias-pull-up = ; + }; + + pins-clk { + pinmux = ; + drive-strength = <10>; + bias-pull-down = ; + }; + + pins-rst { + pinmux = ; + drive-strength = <8>; + bias-pull-down = ; + }; + + pins-ds { + pinmux = ; + drive-strength = <10>; + bias-pull-down = ; + }; + }; + + mmc1_default_pins: mmc1-default-pins { + pins-cmd-dat { + pinmux = , + , + , + , + ; + input-enable; + drive-strength = <8>; + bias-pull-up = ; + }; + + pins-clk { + pinmux = ; + drive-strength = <8>; + bias-pull-down = ; + }; + + pins-insert { + pinmux = ; + input-enable; + bias-pull-up; + }; + }; + + mmc1_uhs_pins: mmc1-uhs-pins { + pins-cmd-dat { + pinmux = , + , + , + , + ; + input-enable; + drive-strength = <8>; + bias-pull-up = ; + }; + + pins-clk { + pinmux = ; + input-enable; + drive-strength = <8>; + bias-pull-down = ; + }; + }; + pcie_pins: pcie-default-pins { pins-pcie-wake { pinmux = ; -- 2.36.1