From patchwork Wed Jan 25 01:01:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kunihiko Hayashi X-Patchwork-Id: 47989 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp23876wrn; Tue, 24 Jan 2023 17:03:29 -0800 (PST) X-Google-Smtp-Source: AMrXdXtRIyWJYIPLDU51neHXdOSmNwKpdpBjNfFmkCD/r+8zGWQIID4BmQ7a3z/WMP0vsiAfvAYO X-Received: by 2002:a17:906:1112:b0:84d:28d6:3179 with SMTP id h18-20020a170906111200b0084d28d63179mr30937419eja.0.1674608609185; Tue, 24 Jan 2023 17:03:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674608609; cv=none; d=google.com; s=arc-20160816; b=Qh2XS1xbMRO3JLYSO5lo9agukgUhv3Rcx+6fKOwS/cgbCOG7ZoDDWyGChcmF9Zz394 9vskRG3cS6xySlqnMgQMPxkObgWg9DhPA+sE+oteNNexjZQ85rIW8MAKawzi1BN+LlUT hz+egC5SXWLbZuqH99l9SUKMJ83Gi2dezRHYyWtu8i6HzEaEmiRAUTD+xXMBQG2rkTpi kqTJryEI0wNTIYJOOKgFI3unO59/gUbmKmgrR2aUzm8h+3PmHKyVJFrgqlNWbnqdWzoS jnAxsBI5k42YTZCAg8Tt3m372QyPjgJQT5o1P59OxG9L+Y4wxqtymv69CuxZ2HZQ9VSX t1kw== 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; bh=KUEZp4L8Wy/wQnOaKyILfCxwT1Eu4+0xmsJ/jxfamik=; b=IraVrhY9CJE/Mx7Dx0ahcmtmbue/z7GZlstKWDgTMf/tfsw/d6UPqQ7FxTzLhO1ufJ QIIiC88E5rRv70qVlWPWRgfFvElPosCrRjk8hAtn367yKkI6uhXutFdukqBfikcO28bV o7lsmvJtvoyO3aieERclBWndCuzegUd516ECtphv1oMt/5Bl4fd1Jp8nOUf4crCPwKF7 iyG5WSg5xhn203VqBV5k7IyBnlF6nQNHG2a6SR/bEcfZCMccAhyodva56o1LOHtal4hJ 2G+E/DJEahZhw5Dp0hs3qNNIyfUmiUpaZXKDBh1PALCw4tBlRtw3gN8qjdDky9xn8862 cUGA== ARC-Authentication-Results: i=1; mx.google.com; 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 et18-20020a170907295200b008779fa662casi4186960ejc.619.2023.01.24.17.03.05; Tue, 24 Jan 2023 17:03:29 -0800 (PST) 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; 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 S234144AbjAYBCV (ORCPT + 99 others); Tue, 24 Jan 2023 20:02:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57202 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233948AbjAYBCT (ORCPT ); Tue, 24 Jan 2023 20:02:19 -0500 Received: from mx.socionext.com (mx.socionext.com [202.248.49.38]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 41C1222A27; Tue, 24 Jan 2023 17:02:15 -0800 (PST) Received: from unknown (HELO iyokan2-ex.css.socionext.com) ([172.31.9.54]) by mx.socionext.com with ESMTP; 25 Jan 2023 10:02:14 +0900 Received: from mail.mfilter.local (m-filter-1 [10.213.24.61]) by iyokan2-ex.css.socionext.com (Postfix) with ESMTP id A1C9F2058B4F; Wed, 25 Jan 2023 10:02:14 +0900 (JST) Received: from 172.31.9.51 (172.31.9.51) by m-FILTER with ESMTP; Wed, 25 Jan 2023 10:02:17 +0900 Received: from plum.e01.socionext.com (unknown [10.212.243.119]) by kinkan2.css.socionext.com (Postfix) with ESMTP id D4E243D53; Wed, 25 Jan 2023 10:02:13 +0900 (JST) From: Kunihiko Hayashi To: Ulf Hansson , Rob Herring , Krzysztof Kozlowski , Masami Hiramatsu Cc: linux-mmc@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Kunihiko Hayashi Subject: [PATCH 1/5] dt-bindings: mmc: uniphier-sd: Add socionext,syscon-uhs-mode property Date: Wed, 25 Jan 2023 10:01:57 +0900 Message-Id: <20230125010201.28246-2-hayashi.kunihiko@socionext.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230125010201.28246-1-hayashi.kunihiko@socionext.com> References: <20230125010201.28246-1-hayashi.kunihiko@socionext.com> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS 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?1755954396955305029?= X-GMAIL-MSGID: =?utf-8?q?1755954396955305029?= UHS mode control is included in the interface logic represented by syscon. To refer this, add new property "socionext,syscon-uhs-mode". Signed-off-by: Kunihiko Hayashi Acked-by: Krzysztof Kozlowski --- .../devicetree/bindings/mmc/socionext,uniphier-sd.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Documentation/devicetree/bindings/mmc/socionext,uniphier-sd.yaml b/Documentation/devicetree/bindings/mmc/socionext,uniphier-sd.yaml index a586fad0a46b..313621d0d9f5 100644 --- a/Documentation/devicetree/bindings/mmc/socionext,uniphier-sd.yaml +++ b/Documentation/devicetree/bindings/mmc/socionext,uniphier-sd.yaml @@ -55,6 +55,16 @@ properties: minItems: 1 maxItems: 3 + socionext,syscon-uhs-mode: + $ref: /schemas/types.yaml#/definitions/phandle-array + items: + - items: + - description: phandle to syscon that configures uhs mode + - description: ID of SD instance + description: + A phandle to syscon with one argument that configures uhs mode. + The argument is the ID of SD instance. + allOf: - $ref: mmc-controller.yaml From patchwork Wed Jan 25 01:01:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kunihiko Hayashi X-Patchwork-Id: 47992 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp24895wrn; Tue, 24 Jan 2023 17:05:35 -0800 (PST) X-Google-Smtp-Source: AMrXdXsxP1NUvww49C8/sSqyH+DWgNhQqhjr3rVBTmULa9sB+6s4WvkiUns5NAyMBqPDX72WAVPu X-Received: by 2002:aa7:de9a:0:b0:482:d62c:cde with SMTP id j26-20020aa7de9a000000b00482d62c0cdemr46225879edv.13.1674608735370; Tue, 24 Jan 2023 17:05:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674608735; cv=none; d=google.com; s=arc-20160816; b=RJxVu1dHhYcDeyJhIGLrdSUguyXWhfL2ZpDTHclBWQhHOSYXjAlLQwDpBr1qdB6v/t 5KoNO5UxPQsE+ufsUo1055ya/dwDgIGfNhSUIH7vaXPrvu5pMuEo3nXnnmyI57zAxqW5 5QTQC2A3AGNCJ6Q/Ziu4lIHMZJ4nQi6E10xeVkaf1/QiGjFbwi+0UhnvIQ2/P0zzw5sS /sKqOCl6VYfKRoOaAskk9E9irisxpxD9xX7GYxOqSjIgrgzPdn4dC0TwWlExoWZEh264 d2whIkPksR5s8aIxrCkmhpeBOF7myJm5oMS4V02nzvkJVpwSjenvtSzh4vygkH2mmV9f /YNw== 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; bh=rAyOEtLWLIJZUjLwp3Dq0C0tHXbpXnj9tkAhDaIWlYg=; b=T1PLbUxhcTWs9KOu0ZuCOkSb5c4siCeHws0SWw8yLezcXFp3ub8HwLc4wWqmfsR2KV 1Q7PNOMyxDVkefBGvcC18YUj0UwmyaxCP6WeBJzC+/OijVV+DXmptDbyqyk7xdjlbBfM uT+1o24LvZ1/FHux7eZfF+U1GeDuFJtda2xl8FDrNS5GntFWEWNOX+yeOa/mN4a8J54Z 3qkmtsdxQ+VWkhNV5rSJCnxKeRsnPixs6zPpn/s45f+Gc3MuQ0ujpb3orBLXKeiz6zUL JHqkupjZOlcZL8q2QXQccq2jxgesbwlle19n/vAVZr4Gq7LBiKYwxPkRZJJvV/Z2EMSF wleQ== ARC-Authentication-Results: i=1; mx.google.com; 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 n9-20020a056402514900b004a08f080500si2802156edd.441.2023.01.24.17.04.40; Tue, 24 Jan 2023 17:05:35 -0800 (PST) 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; 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 S234859AbjAYBCd (ORCPT + 99 others); Tue, 24 Jan 2023 20:02:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57420 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234311AbjAYBCY (ORCPT ); Tue, 24 Jan 2023 20:02:24 -0500 Received: from mx.socionext.com (mx.socionext.com [202.248.49.38]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 703402412E; Tue, 24 Jan 2023 17:02:16 -0800 (PST) Received: from unknown (HELO kinkan2-ex.css.socionext.com) ([172.31.9.52]) by mx.socionext.com with ESMTP; 25 Jan 2023 10:02:15 +0900 Received: from mail.mfilter.local (m-filter-2 [10.213.24.62]) by kinkan2-ex.css.socionext.com (Postfix) with ESMTP id C45752059054; Wed, 25 Jan 2023 10:02:15 +0900 (JST) Received: from 172.31.9.51 (172.31.9.51) by m-FILTER with ESMTP; Wed, 25 Jan 2023 10:02:14 +0900 Received: from plum.e01.socionext.com (unknown [10.212.243.119]) by kinkan2.css.socionext.com (Postfix) with ESMTP id 538A33D53; Wed, 25 Jan 2023 10:02:15 +0900 (JST) From: Kunihiko Hayashi To: Ulf Hansson , Rob Herring , Krzysztof Kozlowski , Masami Hiramatsu Cc: linux-mmc@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Kunihiko Hayashi Subject: [PATCH 2/5] mmc: uniphier-sd: Add control of UHS mode using SD interface logic Date: Wed, 25 Jan 2023 10:01:58 +0900 Message-Id: <20230125010201.28246-3-hayashi.kunihiko@socionext.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230125010201.28246-1-hayashi.kunihiko@socionext.com> References: <20230125010201.28246-1-hayashi.kunihiko@socionext.com> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS 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?1755954529443110073?= X-GMAIL-MSGID: =?utf-8?q?1755954529443110073?= Transition of UHS mode needs to control the register in SD interface logic. Add access to the register in the logic using the regmap from "socionext,syscon-uhs-mode" property. Define the start_signal_voltage_switch function only if UHS mode is available. Signed-off-by: Kunihiko Hayashi --- drivers/mmc/host/uniphier-sd.c | 61 +++++++++++++++++++++++++++++++--- 1 file changed, 56 insertions(+), 5 deletions(-) diff --git a/drivers/mmc/host/uniphier-sd.c b/drivers/mmc/host/uniphier-sd.c index 3a8defdcca77..c9766d6a690f 100644 --- a/drivers/mmc/host/uniphier-sd.c +++ b/drivers/mmc/host/uniphier-sd.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include @@ -15,6 +16,7 @@ #include #include #include +#include #include #include "tmio_mmc.h" @@ -48,6 +50,11 @@ #define UNIPHIER_SD_DMA_ADDR_L 0x440 #define UNIPHIER_SD_DMA_ADDR_H 0x444 +/* SD control */ +#define UNIPHIER_SDCTRL_CHOFFSET 0x200 +#define UNIPHIER_SDCTRL_MODE 0x30 +#define UNIPHIER_SDCTRL_MODE_UHS1MOD BIT(15) + /* * IP is extended to support various features: built-in DMA engine, * 1/1024 divisor, etc. @@ -66,6 +73,8 @@ struct uniphier_sd_priv { struct reset_control *rst_hw; struct dma_chan *chan; enum dma_data_direction dma_dir; + struct regmap *sdctrl_regmap; + u32 sdctrl_ch; unsigned long clk_rate; unsigned long caps; }; @@ -420,6 +429,23 @@ static void uniphier_sd_hw_reset(struct mmc_host *mmc) usleep_range(300, 1000); } +static void uniphier_sd_uhs_enable(struct tmio_mmc_host *host, bool uhs_en) +{ + struct uniphier_sd_priv *priv = uniphier_sd_priv(host); + unsigned int offset; + u32 val; + + if (!(host->mmc->caps & MMC_CAP_UHS)) + return; + + val = (uhs_en) ? UNIPHIER_SDCTRL_MODE_UHS1MOD : 0; + + offset = UNIPHIER_SDCTRL_CHOFFSET * priv->sdctrl_ch + + UNIPHIER_SDCTRL_MODE; + regmap_write_bits(priv->sdctrl_regmap, offset, + UNIPHIER_SDCTRL_MODE_UHS1MOD, val); +} + static void uniphier_sd_set_clock(struct tmio_mmc_host *host, unsigned int clock) { @@ -500,14 +526,17 @@ static int uniphier_sd_start_signal_voltage_switch(struct mmc_host *mmc, struct uniphier_sd_priv *priv = uniphier_sd_priv(host); struct pinctrl_state *pinstate = NULL; u32 val, tmp; + bool uhs_en; switch (ios->signal_voltage) { case MMC_SIGNAL_VOLTAGE_330: val = UNIPHIER_SD_VOLT_330; + uhs_en = false; break; case MMC_SIGNAL_VOLTAGE_180: val = UNIPHIER_SD_VOLT_180; pinstate = priv->pinstate_uhs; + uhs_en = true; break; default: return -ENOTSUPP; @@ -523,12 +552,19 @@ static int uniphier_sd_start_signal_voltage_switch(struct mmc_host *mmc, else pinctrl_select_default_state(mmc_dev(mmc)); + uniphier_sd_uhs_enable(host, uhs_en); + return 0; } -static int uniphier_sd_uhs_init(struct tmio_mmc_host *host, - struct uniphier_sd_priv *priv) +static int uniphier_sd_uhs_init(struct tmio_mmc_host *host) { + struct uniphier_sd_priv *priv = uniphier_sd_priv(host); + struct device *dev = &host->pdev->dev; + struct device_node *np = dev->of_node; + struct of_phandle_args args; + int ret; + priv->pinctrl = devm_pinctrl_get(mmc_dev(host->mmc)); if (IS_ERR(priv->pinctrl)) return PTR_ERR(priv->pinctrl); @@ -537,8 +573,20 @@ static int uniphier_sd_uhs_init(struct tmio_mmc_host *host, if (IS_ERR(priv->pinstate_uhs)) return PTR_ERR(priv->pinstate_uhs); - host->ops.start_signal_voltage_switch = - uniphier_sd_start_signal_voltage_switch; + ret = of_parse_phandle_with_fixed_args(np, + "socionext,syscon-uhs-mode", + 1, 0, &args); + if (ret) { + dev_err(dev, "Can't get syscon-uhs-mode property\n"); + return ret; + } + priv->sdctrl_regmap = syscon_node_to_regmap(args.np); + of_node_put(args.np); + if (IS_ERR(priv->sdctrl_regmap)) { + dev_err(dev, "Can't map syscon-uhs-mode\n"); + return PTR_ERR(priv->sdctrl_regmap); + } + priv->sdctrl_ch = args.args[0]; return 0; } @@ -601,12 +649,15 @@ static int uniphier_sd_probe(struct platform_device *pdev) } if (host->mmc->caps & MMC_CAP_UHS) { - ret = uniphier_sd_uhs_init(host, priv); + ret = uniphier_sd_uhs_init(host); if (ret) { dev_warn(dev, "failed to setup UHS (error %d). Disabling UHS.", ret); host->mmc->caps &= ~MMC_CAP_UHS; + } else { + host->ops.start_signal_voltage_switch = + uniphier_sd_start_signal_voltage_switch; } } From patchwork Wed Jan 25 01:01:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kunihiko Hayashi X-Patchwork-Id: 47990 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp24054wrn; Tue, 24 Jan 2023 17:03:50 -0800 (PST) X-Google-Smtp-Source: AMrXdXsrc9W4fVnSVYx4qmw7oFb3H1LdmXUjpzNc9oyFAgjhPJlZPAbK4wwEK6F0ylgfK9odJ57L X-Received: by 2002:a17:906:33cb:b0:86d:7c0e:c816 with SMTP id w11-20020a17090633cb00b0086d7c0ec816mr39098031eja.27.1674608630649; Tue, 24 Jan 2023 17:03:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674608630; cv=none; d=google.com; s=arc-20160816; b=FFkMicuEE+CixnX9lez/+AfOrjda16f/yzkT1w3HlI8tUmz5wlh2yqFM/s7vQwm7SX KrP3+1SWV1h9d9gVnQAoiQNtFEcJm+hz19zEu8WytBsGUzjuIAzWm5s798FNDnKi28KO a/5fuVpEf1lCl6b9xZ4Hqebk3kuEYck9ywaJ3zEfZBd2z0GeS0k740Crq5EJhA9ACc/m wXsRlxc5W1SEeQg3THbI+yuj8p7a8PqiNwZ4Nd48H61JWpYMhIz0/ZMMNhe0hWHwnBZq uGZ0vlIyTSqDi07v7hWGsQgWR38ehPTEw395bncEmicXx/2fPfp2DDXEe/RYcS6/CviG PEQQ== 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; bh=3zBaZEyihAqxr1i26nZHCjJOLkvwI8vCNLkQ7k0OP80=; b=lgydld1CUvRk3/Dx/ukiTgkJoAb0ZYD9xxCsFX3om5AcX53tg8OyZl4Lo26FvjGWym CFngsY/IpTwxhs3ixMoneD66Ev7SfarrSoiROLaBLd0aHbkGIkI9YepwEf0sTUx4H/wZ tlxIsd1/08ey7z0W86joSLQT/uwFKzo3f3B+xpy5PiksYpFaqHp2tAX3pFceYXCItn5s lk7/1aVvhRb5pEiGlT1BGJxqzoDqPhHuKS+krxzcWDudVNjEKrH06meiC1tjQ15eUpL4 RCJ7Qz0n8npptl4wncP5mpDOe1+fUvpnRMF39xtSxh4U3PwuWPJwPl0mz5oNrhxbFrNw VGdw== ARC-Authentication-Results: i=1; mx.google.com; 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 vl7-20020a17090730c700b0084d4b90896fsi3634867ejb.245.2023.01.24.17.03.22; Tue, 24 Jan 2023 17:03:50 -0800 (PST) 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; 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 S234640AbjAYBC2 (ORCPT + 99 others); Tue, 24 Jan 2023 20:02:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57408 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234403AbjAYBCY (ORCPT ); Tue, 24 Jan 2023 20:02:24 -0500 Received: from mx.socionext.com (mx.socionext.com [202.248.49.38]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3C7572330B; Tue, 24 Jan 2023 17:02:17 -0800 (PST) Received: from unknown (HELO iyokan2-ex.css.socionext.com) ([172.31.9.54]) by mx.socionext.com with ESMTP; 25 Jan 2023 10:02:16 +0900 Received: from mail.mfilter.local (m-filter-1 [10.213.24.61]) by iyokan2-ex.css.socionext.com (Postfix) with ESMTP id AFF9D2058B4F; Wed, 25 Jan 2023 10:02:16 +0900 (JST) Received: from 172.31.9.51 (172.31.9.51) by m-FILTER with ESMTP; Wed, 25 Jan 2023 10:02:19 +0900 Received: from plum.e01.socionext.com (unknown [10.212.243.119]) by kinkan2.css.socionext.com (Postfix) with ESMTP id 118003D53; Wed, 25 Jan 2023 10:02:16 +0900 (JST) From: Kunihiko Hayashi To: Ulf Hansson , Rob Herring , Krzysztof Kozlowski , Masami Hiramatsu Cc: linux-mmc@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Kunihiko Hayashi Subject: [PATCH 3/5] mmc: uniphier-sd: Add control to switch UHS speed Date: Wed, 25 Jan 2023 10:01:59 +0900 Message-Id: <20230125010201.28246-4-hayashi.kunihiko@socionext.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230125010201.28246-1-hayashi.kunihiko@socionext.com> References: <20230125010201.28246-1-hayashi.kunihiko@socionext.com> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS 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?1755954419414249706?= X-GMAIL-MSGID: =?utf-8?q?1755954419414249706?= SD interface logic has the register to switch UHS speed. The default is up to SDR25 and to support SDR50 or faster, add uniphier_sd_speed_switch() function to switch the speed mode. Signed-off-by: Kunihiko Hayashi --- drivers/mmc/host/uniphier-sd.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/drivers/mmc/host/uniphier-sd.c b/drivers/mmc/host/uniphier-sd.c index c9766d6a690f..61acd69fac0e 100644 --- a/drivers/mmc/host/uniphier-sd.c +++ b/drivers/mmc/host/uniphier-sd.c @@ -54,6 +54,7 @@ #define UNIPHIER_SDCTRL_CHOFFSET 0x200 #define UNIPHIER_SDCTRL_MODE 0x30 #define UNIPHIER_SDCTRL_MODE_UHS1MOD BIT(15) +#define UNIPHIER_SDCTRL_MODE_SDRSEL BIT(14) /* * IP is extended to support various features: built-in DMA engine, @@ -429,6 +430,25 @@ static void uniphier_sd_hw_reset(struct mmc_host *mmc) usleep_range(300, 1000); } +static void uniphier_sd_speed_switch(struct tmio_mmc_host *host) +{ + struct uniphier_sd_priv *priv = uniphier_sd_priv(host); + unsigned int offset; + u32 val = 0; + + if (!(host->mmc->caps & MMC_CAP_UHS)) + return; + + if (host->mmc->ios.timing == MMC_TIMING_UHS_SDR50 || + host->mmc->ios.timing == MMC_TIMING_UHS_SDR104) + val = UNIPHIER_SDCTRL_MODE_SDRSEL; + + offset = UNIPHIER_SDCTRL_CHOFFSET * priv->sdctrl_ch + + UNIPHIER_SDCTRL_MODE; + regmap_write_bits(priv->sdctrl_regmap, offset, + UNIPHIER_SDCTRL_MODE_SDRSEL, val); +} + static void uniphier_sd_uhs_enable(struct tmio_mmc_host *host, bool uhs_en) { struct uniphier_sd_priv *priv = uniphier_sd_priv(host); @@ -459,6 +479,8 @@ static void uniphier_sd_set_clock(struct tmio_mmc_host *host, tmp &= ~CLK_CTL_SCLKEN; writel(tmp, host->ctl + (CTL_SD_CARD_CLK_CTL << 1)); + uniphier_sd_speed_switch(host); + if (clock == 0) return; From patchwork Wed Jan 25 01:02:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kunihiko Hayashi X-Patchwork-Id: 47991 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp24422wrn; Tue, 24 Jan 2023 17:04:34 -0800 (PST) X-Google-Smtp-Source: AMrXdXu6rBksTbfmgebbM3D1NRZayd63nONiY+txX/2Nurlt9vb4U5Z8ATDfJUod/yY9JAYv0fFO X-Received: by 2002:a05:6402:ea2:b0:479:971e:5da8 with SMTP id h34-20020a0564020ea200b00479971e5da8mr30895340eda.13.1674608674186; Tue, 24 Jan 2023 17:04:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674608674; cv=none; d=google.com; s=arc-20160816; b=eJZN1q35kCiv0B8PLNEszijAQuz0kjtMC97X3cJQj1rF1YgAIY/RRTGnYKH9h/8JXC iXxlTuWOu/EylkBKlGHfrsJKu+DpXJtF01QfDd4X5kvXoI/s0VF7ChgvRW9t7CmxU6MC LCJ+53m0eSc5eGvbMPBry7OsiEEAiXoIQqx+sNc/Nzl4bkWNP6B8GNBmKX+dfkmX2+XQ +pcyDtoenJnmAHAMsW0lVqyzrxjqzvgcZaKkmQL8haL81HqqGrvkra1YCZT15ysHuhJj OV7JlYlitZv893ksp9JSyIQCZf0DOTaZsP6OFxpCNtn7RCmw5bENL8uC1F5ntf9zFRi+ KkDA== 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; bh=B5ztRU4QIKJW8PKm2HWFv8PWsSzhSwZ2S8YiHTrQ7Fk=; b=pUo0vbrukCo4eeHT6n2344QhWsFNiOeyyjPuF8w/PcF8NPtSHF75vxfXXVtpdiP/Ke 9pALsWNRVaxfag81AOPvTlKnrGcQGFt8ggBze8px8b17CetTvKLPMh1fdVzGr6VH6b7j 8VkYQSnzItP8g7IcLbfgtx74JqG3TdyBwvfio+Yox65L/np8xOonTFWc76hqBP6jApjY 3j0CqB5I9AVHwzMal+4sAX10cJHII/R0W8IeOMoaJNJH4XYMbKSlWm4ejjHsqoto0erH sa5bJIEP3nad3yhTL13gLUoKmEvpEXsWdC0ubzzeLFfQKaDt5NHXmlidZKRohPx/1ThH vhwg== ARC-Authentication-Results: i=1; mx.google.com; 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 e14-20020a056402088e00b004917c8c661csi4634401edy.243.2023.01.24.17.04.06; Tue, 24 Jan 2023 17:04:34 -0800 (PST) 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; 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 S234431AbjAYBCb (ORCPT + 99 others); Tue, 24 Jan 2023 20:02:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57418 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233948AbjAYBCY (ORCPT ); Tue, 24 Jan 2023 20:02:24 -0500 Received: from mx.socionext.com (mx.socionext.com [202.248.49.38]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id BC13222A27; Tue, 24 Jan 2023 17:02:19 -0800 (PST) Received: from unknown (HELO kinkan2-ex.css.socionext.com) ([172.31.9.52]) by mx.socionext.com with ESMTP; 25 Jan 2023 10:02:17 +0900 Received: from mail.mfilter.local (m-filter-2 [10.213.24.62]) by kinkan2-ex.css.socionext.com (Postfix) with ESMTP id 522DD2059054; Wed, 25 Jan 2023 10:02:17 +0900 (JST) Received: from 172.31.9.51 (172.31.9.51) by m-FILTER with ESMTP; Wed, 25 Jan 2023 10:02:15 +0900 Received: from plum.e01.socionext.com (unknown [10.212.243.119]) by kinkan2.css.socionext.com (Postfix) with ESMTP id CB6E43D53; Wed, 25 Jan 2023 10:02:16 +0900 (JST) From: Kunihiko Hayashi To: Ulf Hansson , Rob Herring , Krzysztof Kozlowski , Masami Hiramatsu Cc: linux-mmc@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Kunihiko Hayashi Subject: [PATCH 4/5] ARM: dts: uniphier: Add syscon-uhs-mode to SD node Date: Wed, 25 Jan 2023 10:02:00 +0900 Message-Id: <20230125010201.28246-5-hayashi.kunihiko@socionext.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230125010201.28246-1-hayashi.kunihiko@socionext.com> References: <20230125010201.28246-1-hayashi.kunihiko@socionext.com> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS 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?1755954464744539145?= X-GMAIL-MSGID: =?utf-8?q?1755954464744539145?= Add sociopnext,syscon-uhs-mode prpperty to the SD node to refer the handle of the control logic node. Signed-off-by: Kunihiko Hayashi --- arch/arm/boot/dts/uniphier-ld4.dtsi | 3 ++- arch/arm/boot/dts/uniphier-pro4.dtsi | 3 ++- arch/arm/boot/dts/uniphier-pro5.dtsi | 3 ++- arch/arm/boot/dts/uniphier-pxs2.dtsi | 3 ++- arch/arm/boot/dts/uniphier-sld8.dtsi | 3 ++- 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/arch/arm/boot/dts/uniphier-ld4.dtsi b/arch/arm/boot/dts/uniphier-ld4.dtsi index 9dceff12a633..78cb3f5f514c 100644 --- a/arch/arm/boot/dts/uniphier-ld4.dtsi +++ b/arch/arm/boot/dts/uniphier-ld4.dtsi @@ -207,7 +207,7 @@ smpctrl@59801000 { reg = <0x59801000 0x400>; }; - mioctrl@59810000 { + mioctrl: mioctrl@59810000 { compatible = "socionext,uniphier-ld4-mioctrl", "simple-mfd", "syscon"; reg = <0x59810000 0x800>; @@ -272,6 +272,7 @@ sd: mmc@5a400000 { sd-uhs-sdr12; sd-uhs-sdr25; sd-uhs-sdr50; + socionext,syscon-uhs-mode = <&mioctrl 0>; }; emmc: mmc@5a500000 { diff --git a/arch/arm/boot/dts/uniphier-pro4.dtsi b/arch/arm/boot/dts/uniphier-pro4.dtsi index a309e64c57c8..2c7434574bc6 100644 --- a/arch/arm/boot/dts/uniphier-pro4.dtsi +++ b/arch/arm/boot/dts/uniphier-pro4.dtsi @@ -241,7 +241,7 @@ smpctrl@59801000 { reg = <0x59801000 0x400>; }; - mioctrl@59810000 { + mioctrl: mioctrl@59810000 { compatible = "socionext,uniphier-pro4-mioctrl", "simple-mfd", "syscon"; reg = <0x59810000 0x800>; @@ -307,6 +307,7 @@ sd: mmc@5a400000 { sd-uhs-sdr12; sd-uhs-sdr25; sd-uhs-sdr50; + socionext,syscon-uhs-mode = <&mioctrl 0>; }; emmc: mmc@5a500000 { diff --git a/arch/arm/boot/dts/uniphier-pro5.dtsi b/arch/arm/boot/dts/uniphier-pro5.dtsi index 100edd7438d8..2ac78c3ebd17 100644 --- a/arch/arm/boot/dts/uniphier-pro5.dtsi +++ b/arch/arm/boot/dts/uniphier-pro5.dtsi @@ -341,7 +341,7 @@ smpctrl@59801000 { reg = <0x59801000 0x400>; }; - sdctrl@59810000 { + sdctrl: sdctrl@59810000 { compatible = "socionext,uniphier-pro5-sdctrl", "simple-mfd", "syscon"; reg = <0x59810000 0x400>; @@ -696,6 +696,7 @@ sd: mmc@68800000 { sd-uhs-sdr12; sd-uhs-sdr25; sd-uhs-sdr50; + socionext,syscon-uhs-mode = <&sdctrl 0>; }; }; }; diff --git a/arch/arm/boot/dts/uniphier-pxs2.dtsi b/arch/arm/boot/dts/uniphier-pxs2.dtsi index ca4dccf56a67..13331eb1caa3 100644 --- a/arch/arm/boot/dts/uniphier-pxs2.dtsi +++ b/arch/arm/boot/dts/uniphier-pxs2.dtsi @@ -422,7 +422,7 @@ smpctrl@59801000 { reg = <0x59801000 0x400>; }; - sdctrl@59810000 { + sdctrl: sdctrl@59810000 { compatible = "socionext,uniphier-pxs2-sdctrl", "simple-mfd", "syscon"; reg = <0x59810000 0x400>; @@ -486,6 +486,7 @@ sd: mmc@5a400000 { sd-uhs-sdr12; sd-uhs-sdr25; sd-uhs-sdr50; + socionext,syscon-uhs-mode = <&sdctrl 0>; }; soc_glue: soc-glue@5f800000 { diff --git a/arch/arm/boot/dts/uniphier-sld8.dtsi b/arch/arm/boot/dts/uniphier-sld8.dtsi index 67b12dfe513b..af7488e2eb16 100644 --- a/arch/arm/boot/dts/uniphier-sld8.dtsi +++ b/arch/arm/boot/dts/uniphier-sld8.dtsi @@ -211,7 +211,7 @@ smpctrl@59801000 { reg = <0x59801000 0x400>; }; - mioctrl@59810000 { + mioctrl: mioctrl@59810000 { compatible = "socionext,uniphier-sld8-mioctrl", "simple-mfd", "syscon"; reg = <0x59810000 0x800>; @@ -276,6 +276,7 @@ sd: mmc@5a400000 { sd-uhs-sdr12; sd-uhs-sdr25; sd-uhs-sdr50; + socionext,syscon-uhs-mode = <&mioctrl 0>; }; emmc: mmc@5a500000 { From patchwork Wed Jan 25 01:02:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kunihiko Hayashi X-Patchwork-Id: 47993 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp24899wrn; Tue, 24 Jan 2023 17:05:36 -0800 (PST) X-Google-Smtp-Source: AMrXdXtN588/WK53TeyhAh+w+jJxVwUn0yIKuQgbrKk+t6Rb7GPET6AyQr5FRNSDXITUOQGYYowm X-Received: by 2002:a17:906:ae86:b0:84d:3d88:dff3 with SMTP id md6-20020a170906ae8600b0084d3d88dff3mr30112509ejb.25.1674608735853; Tue, 24 Jan 2023 17:05:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674608735; cv=none; d=google.com; s=arc-20160816; b=dwE0tLIHC9mKjqeQSDoIT0Tfleap7dDl2Dg1LgeQst46DNP/9VzvSdYDTUk8MOFB5T Nb2kxE11ZkMfkPMhju1T+UtR4MIQY4sBKcYkBK7XnwfT4C4JXxpUGTuD9kuwGm5uECxB 4YwEra+IWY0AWBjWCYiygz9uZ4sX+ANm3xlINcz9SCKPi5lup5wm+khNZOE4I8iW3h2H ggzuK5BHu5DmPNNJ1k9v8Qc/cSkq9DSFMVXDZMJljKpavFlRAjTF2gh1foG3wxtx2MB5 4FHlvW50XQw5NaY+02KOzZSusQUZgdpdY9G8zH2KhHKzc02Xh189OF8sbNsjFIHLUeUu xeUQ== 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; bh=3UL9zNE7bqvbmnoxwAyGrI8oVtDi76218bPI2uqgd/A=; b=tFFg+dpFDmmjqvJDpzzU95Z3QjH7XPLK8fjaLMx6lGjiNQUtm+3Be5hI/z8k5ufvH3 x5cmfrGfzOsdr4jpd9qUBvrtc+j2tQrZJgw2FszI7NlFTtkkdhF8eZmNLIyCm24NwdDW hoaHLlufjTyoRRWym5X/RdJsrs1Yuv9d1OxOLtlXuyiybonOJeq3/BonCe9Br9kxXDzy 2ssRUay481L/0IPecbrqIliVxQbbTvI2fZg0d+q67VTJ/U2izNhfWctuzIAcC35qg1uR uKnb9t02qm0KoHj2T/WzhR4TQv+qh/dZp0o1hDRUtJJOwFF6S33x7qyuch7b3T6sRI9H IsoQ== ARC-Authentication-Results: i=1; mx.google.com; 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 24-20020a170906209800b007c0d88f1614si4003040ejq.342.2023.01.24.17.05.11; Tue, 24 Jan 2023 17:05:35 -0800 (PST) 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; 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 S234941AbjAYBCh (ORCPT + 99 others); Tue, 24 Jan 2023 20:02:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57448 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234627AbjAYBC2 (ORCPT ); Tue, 24 Jan 2023 20:02:28 -0500 Received: from mx.socionext.com (mx.socionext.com [202.248.49.38]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6D55B51C43; Tue, 24 Jan 2023 17:02:23 -0800 (PST) Received: from unknown (HELO kinkan2-ex.css.socionext.com) ([172.31.9.52]) by mx.socionext.com with ESMTP; 25 Jan 2023 10:02:19 +0900 Received: from mail.mfilter.local (m-filter-2 [10.213.24.62]) by kinkan2-ex.css.socionext.com (Postfix) with ESMTP id 70E242059054; Wed, 25 Jan 2023 10:02:19 +0900 (JST) Received: from 172.31.9.51 (172.31.9.51) by m-FILTER with ESMTP; Wed, 25 Jan 2023 10:02:18 +0900 Received: from plum.e01.socionext.com (unknown [10.212.243.119]) by kinkan2.css.socionext.com (Postfix) with ESMTP id CD4813D53; Wed, 25 Jan 2023 10:02:18 +0900 (JST) From: Kunihiko Hayashi To: Ulf Hansson , Rob Herring , Krzysztof Kozlowski , Masami Hiramatsu Cc: linux-mmc@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Kunihiko Hayashi Subject: [PATCH 5/5] arm64: dts: uniphier: Add syscon-uhs-mode to SD node Date: Wed, 25 Jan 2023 10:02:01 +0900 Message-Id: <20230125010201.28246-6-hayashi.kunihiko@socionext.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230125010201.28246-1-hayashi.kunihiko@socionext.com> References: <20230125010201.28246-1-hayashi.kunihiko@socionext.com> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS 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?1755954530034444031?= X-GMAIL-MSGID: =?utf-8?q?1755954530034444031?= Add sociopnext,syscon-uhs-mode prpperty to the SD node to refer the handle of the control logic node. Signed-off-by: Kunihiko Hayashi --- arch/arm64/boot/dts/socionext/uniphier-ld20.dtsi | 3 ++- arch/arm64/boot/dts/socionext/uniphier-pxs3.dtsi | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/socionext/uniphier-ld20.dtsi b/arch/arm64/boot/dts/socionext/uniphier-ld20.dtsi index 9308458f9611..687a29c9d459 100644 --- a/arch/arm64/boot/dts/socionext/uniphier-ld20.dtsi +++ b/arch/arm64/boot/dts/socionext/uniphier-ld20.dtsi @@ -548,7 +548,7 @@ smpctrl@59801000 { reg = <0x59801000 0x400>; }; - sdctrl@59810000 { + sdctrl: sdctrl@59810000 { compatible = "socionext,uniphier-ld20-sdctrl", "simple-mfd", "syscon"; reg = <0x59810000 0x400>; @@ -611,6 +611,7 @@ sd: mmc@5a400000 { resets = <&sd_rst 0>; bus-width = <4>; cap-sd-highspeed; + socionext,syscon-uhs-mode = <&sdctrl 0>; }; soc_glue: soc-glue@5f800000 { diff --git a/arch/arm64/boot/dts/socionext/uniphier-pxs3.dtsi b/arch/arm64/boot/dts/socionext/uniphier-pxs3.dtsi index b0c29510a7da..4c18f54abb15 100644 --- a/arch/arm64/boot/dts/socionext/uniphier-pxs3.dtsi +++ b/arch/arm64/boot/dts/socionext/uniphier-pxs3.dtsi @@ -370,7 +370,7 @@ smpctrl@59801000 { reg = <0x59801000 0x400>; }; - sdctrl@59810000 { + sdctrl: sdctrl@59810000 { compatible = "socionext,uniphier-pxs3-sdctrl", "simple-mfd", "syscon"; reg = <0x59810000 0x400>; @@ -437,6 +437,7 @@ sd: mmc@5a400000 { sd-uhs-sdr12; sd-uhs-sdr25; sd-uhs-sdr50; + socionext,syscon-uhs-mode = <&sdctrl 0>; }; soc_glue: soc-glue@5f800000 {