Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1326501rwd; Wed, 7 Jun 2023 14:38:57 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4EB800OohIhGwrKCBWuBnGfydaf+RNEdfzTLjPokoNv2qzthT1H0yqRc/Xccfh6aJDArRJ X-Received: by 2002:a17:90a:192:b0:256:2ccf:45aa with SMTP id 18-20020a17090a019200b002562ccf45aamr3193952pjc.25.1686173936911; Wed, 07 Jun 2023 14:38:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686173936; cv=none; d=google.com; s=arc-20160816; b=Bv9Oixsz1LXwLAeS9qFNZYEY7p/RTPVkFkJEwkwD+56zncwuLjG1CNcwQYGma8xgdo eDCrXiR2mqtTtJpPAzjJCOKE/eHz1hQRwq+8vDqpZaKImo1/akVSeFs7UYAQhFXfcxfL f5OSQcySZ1Vk6B8sZbo16PWUQ8oNSR7OH+UXAM9clJDRN6LpnbYxytBbKOAX92JyjgNE gYiK2tnfrQMfqgqe0Wti5mNj1g3RLeZT4BY2GX0m1jPfR7TYn1yJRd9TuT4E1mr2uAck 1YUaeoGvmMuX7pSnT8DjpsbyXUyZk2cF8Xuo++/gzeZX93cZhfJlp09MbvveE/0TUgzr gwww== 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=ZYzm10ARzicI/VkalxH9IaqGb8tcNyA0d5VD1WYq+Ig=; b=DMsSnnBFOTFzTSgFN19WLQqX0/BDRtK2btLlD0S4PMKehRMUGnEZqWdOtYx/Zwj4je TtaQpPyYu9UdfYrEV+8q3hsDzfzMLa4cB4vtc138SHSWnlT1MS6cit1lW6Xmi/EmvLyg k8Lp+SSiL1YI3hied6NeRqb8pbOTTeH/9VcdqRyKad6I774XJHIQcHMdzv9OiimQ7q/X nRPrBqmDWfb0QCp4OrnVWwzJYbRz63CcG1UlNv/UMMVOTlGyTM70YvX/qqTG6y4ItTYK ZVpOm867t91ltsmG7EnuaBPznYQ5hJxxKKH/plkwWfL92PnFCZvRhc9dO7aCJSW4oace e/Rw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sberdevices.ru header.s=mail header.b=tFuV+yAW; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=sberdevices.ru Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nn5-20020a17090b38c500b0025346cf794dsi1705515pjb.134.2023.06.07.14.38.44; Wed, 07 Jun 2023 14:38:56 -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=@sberdevices.ru header.s=mail header.b=tFuV+yAW; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=sberdevices.ru Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232568AbjFGURR (ORCPT + 99 others); Wed, 7 Jun 2023 16:17:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41872 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231611AbjFGUQ7 (ORCPT ); Wed, 7 Jun 2023 16:16:59 -0400 Received: from mx.sberdevices.ru (mx.sberdevices.ru [45.89.227.171]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0D9871BD3; Wed, 7 Jun 2023 13:16:58 -0700 (PDT) Received: from s-lin-edge02.sberdevices.ru (localhost [127.0.0.1]) by mx.sberdevices.ru (Postfix) with ESMTP id 3BC105FD73; Wed, 7 Jun 2023 23:16:56 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sberdevices.ru; s=mail; t=1686169016; bh=ZYzm10ARzicI/VkalxH9IaqGb8tcNyA0d5VD1WYq+Ig=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; b=tFuV+yAWUo7Q0sYLMKf2M4BuNmvcVlg643acSfnG19o9ztjGz5c14v0md6UFe1hum L5M1cTrJFMmA02ElgVAKzuP1Em/6iGgBbpzRzlWwDeO5UGtddWkkrcQd1DTCLMJpCz zNpERrZdP4tvAosYgpSoCL2LI7p4m3pxq7hfZ5s7YTtKxlRXK5cnTz/6LVLQJ4yyBg 4TamtmB64oysLQ02Qu9uFe9+erDwZCkLMYD//roEmxlIBPUFRW1AOZUA2yqSAengyx vP60/8mI6Haow3vDD9UT5F1RtRXPYNsSxVafXtXjVKGKJfbYfBhvXDFJ7A6SAJxChj CpF4yCInn2Qrg== Received: from S-MS-EXCH01.sberdevices.ru (S-MS-EXCH01.sberdevices.ru [172.16.1.4]) by mx.sberdevices.ru (Postfix) with ESMTP; Wed, 7 Jun 2023 23:16:56 +0300 (MSK) From: Dmitry Rokosov To: , , , , , , , , CC: , , , , , , , , Jan Dakinevich , Dmitry Rokosov Subject: [PATCH v1 6/6] arm64: dts: meson: a1: add eMMC controller and its pins Date: Wed, 7 Jun 2023 23:16:41 +0300 Message-ID: <20230607201641.20982-7-ddrokosov@sberdevices.ru> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20230607201641.20982-1-ddrokosov@sberdevices.ru> References: <20230607201641.20982-1-ddrokosov@sberdevices.ru> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.16.1.6] X-ClientProxiedBy: S-MS-EXCH01.sberdevices.ru (172.16.1.4) To S-MS-EXCH01.sberdevices.ru (172.16.1.4) X-KSMG-Rule-ID: 4 X-KSMG-Message-Action: clean X-KSMG-AntiSpam-Status: not scanned, disabled by settings X-KSMG-AntiSpam-Interceptor-Info: not scanned X-KSMG-AntiPhishing: not scanned, disabled by settings X-KSMG-AntiVirus: Kaspersky Secure Mail Gateway, version 1.1.2.30, bases: 2023/06/07 16:55:00 #21454472 X-KSMG-AntiVirus-Status: Clean, skipped 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_NONE, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 From: Jan Dakinevich The definition is inspired by a similar one for AXG SoC family. 'sdio_pins' and 'sdio_clk_gate_pins' pinctrls are supposed to be used as "default" and "clk-gate" in board-specific device trees. 'meson-gx' driver during initialization sets clock to safe low-frequency value (400kHz). However, both source clocks ("clkin0" and "clkin1") are high-frequency by default, and using of eMMC's internal divider is not enough to achieve so low values. To provide low-frequency source, reparent "sd_emmc_sel2" clock using 'assigned-clocks' property. Signed-off-by: Jan Dakinevich Signed-off-by: Dmitry Rokosov --- arch/arm64/boot/dts/amlogic/meson-a1.dtsi | 43 +++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/arch/arm64/boot/dts/amlogic/meson-a1.dtsi b/arch/arm64/boot/dts/amlogic/meson-a1.dtsi index 3eb6aa9c00e0..a25170c61462 100644 --- a/arch/arm64/boot/dts/amlogic/meson-a1.dtsi +++ b/arch/arm64/boot/dts/amlogic/meson-a1.dtsi @@ -134,6 +134,32 @@ mux { bias-pull-down; }; }; + + sdio_pins: sdio { + mux-0 { + groups = "sdcard_d0_x", + "sdcard_d1_x", + "sdcard_d2_x", + "sdcard_d3_x", + "sdcard_cmd_x"; + function = "sdcard"; + bias-pull-up; + }; + + mux-1 { + groups = "sdcard_clk_x"; + function = "sdcard"; + bias-disable; + }; + }; + + sdio_clk_gate_pins: sdio_clk_gate { + mux { + groups = "sdcard_clk_x"; + function = "sdcard"; + bias-pull-down; + }; + }; }; uart_AO: serial@1c00 { @@ -200,6 +226,23 @@ usb2_phy1: phy@4000 { #phy-cells = <0>; power-domains = <&pwrc PWRC_USB_ID>; }; + + sd_emmc: sd@10000 { + compatible = "amlogic,meson-axg-mmc"; + reg = <0x0 0x10000 0x0 0x800>; + interrupts = ; + clocks = <&clkc_periphs CLKID_SD_EMMC_A>, + <&clkc_periphs CLKID_SD_EMMC>, + <&clkc_pll CLKID_FCLK_DIV2>; + clock-names = "core", + "clkin0", + "clkin1"; + assigned-clocks = <&clkc_periphs CLKID_SD_EMMC_SEL2>; + assigned-clock-parents = <&xtal>; + resets = <&reset RESET_SD_EMMC_A>; + power-domains = <&pwrc PWRC_SD_EMMC_ID>; + status = "disabled"; + }; }; gic: interrupt-controller@ff901000 { -- 2.36.0