From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 946ACC4727D for ; Tue, 22 Sep 2020 00:49:46 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 319FD23A61 for ; Tue, 22 Sep 2020 00:49:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="wRxC4Ttc"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=intel.onmicrosoft.com header.i=@intel.onmicrosoft.com header.b="oOJNFVn+" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 319FD23A61 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:In-Reply-To:References:Message-ID:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=kjtcXQOl6ggFN2bFBNso1rXA+pBXuV8ge6WMZV04jw0=; b=wRxC4Ttc9lS16geJpCBQRNBDA adnw3mfrVwue3sXhFifWd5cYahzQfGQDJDO+mdL/711g7BKCbTfCaeL/h6hcKwkMGJJCoUfdIMkTQ 3mTIa2MXcioQQGYOHymRLBuQ9/v3elcBylzUd8HDIivoIsxfRZcqIySbNr7OBoSswoEHf5hWZiOxg 4akGMM0in9RydZNwxgeoiC6lO6O/YVaceTlDuUXgLyfiJwetgE/k8KRF1sesJU35fbJmg3Mn4OhZs 2+kZodNfHffL2WwdorjKEGDeXAKuQX1HoVkPG4NmavmRACm+2tfES1clTazuqXpkK4S9ZNIuX3m3X uxUL7d1Wg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kKWTS-0003Wx-L9; Tue, 22 Sep 2020 00:48:02 +0000 Received: from mga11.intel.com ([192.55.52.93]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kKWTP-0003Vr-Go for linux-arm-kernel@lists.infradead.org; Tue, 22 Sep 2020 00:48:00 +0000 IronPort-SDR: 68OByIoIrZ+/+a1EI8Wadha7FEFUnldkRA9czVfsypYrbDj9sj4CwM3+wFx2PfNAL2EJAbr13V 5E9qjGD2Ljhw== X-IronPort-AV: E=McAfee;i="6000,8403,9751"; a="157883078" X-IronPort-AV: E=Sophos;i="5.77,288,1596524400"; d="scan'208";a="157883078" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Sep 2020 17:47:53 -0700 IronPort-SDR: ZnWnj4bsVotIpVfcYSaNi9Hti7G+tq+4T8uwPN4hRpNP3ovkfydDpj+YmFAuVLdQ/PGl7Hcry5 WFOcMFRmlErg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,288,1596524400"; d="scan'208";a="510350882" Received: from fmsmsx604.amr.corp.intel.com ([10.18.126.84]) by fmsmga006.fm.intel.com with ESMTP; 21 Sep 2020 17:47:53 -0700 Received: from fmsmsx609.amr.corp.intel.com (10.18.126.89) by fmsmsx604.amr.corp.intel.com (10.18.126.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Mon, 21 Sep 2020 17:47:52 -0700 Received: from fmsmsx608.amr.corp.intel.com (10.18.126.88) by fmsmsx609.amr.corp.intel.com (10.18.126.89) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Mon, 21 Sep 2020 17:47:52 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx608.amr.corp.intel.com (10.18.126.88) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5 via Frontend Transport; Mon, 21 Sep 2020 17:47:52 -0700 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.171) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.1713.5; Mon, 21 Sep 2020 17:47:47 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FexBKDNJCuc7Jr8IYFlY4n8j/Ulr6PesgoeIHBB1KBLpWKngBQozwiijvY1J1kHmVODxqjJSropTdLGXyIgkqM+IYFqrSZbArKsesRC4mrKu0KYuzuuaou2+L0P6Ni9G2uum6LQknU2R5y8y0gLFbYZtouHy0HLNgpAFvr6qTw0DGtt0CY4d7DLZMXk7WbBDrhEtHDJSYqQG3lSCYBdphcxMVOcYT2/WZDdulJQPfPkb6ctnXv1w2HhlRo9jOIVcDK8acrbsIeb9LWwdim5rsPQIvhle1mb5cNv+D6ob6k3/oqdAZ6WsWa1M3G3bvSWSrlul7u7YXfTvQhM/cbA9kg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=8XdWYUSzq3OWcAb96ikFcZEJtoTmVk01MAOqNNUBrF8=; b=gWCzrWNoCgAuLaD/SPAiXG9vGNxThgHqcfpm2BFNZAocade3pLZPttJz5TdEJzy5sWg2GXTNDQf0VP6qAZu7uQz+vuMA6LvIhY42NbgEctXySw9dLTPIlm21GGamuM1XEdUebl+oXb3vbTPNzui4eSuHzu9x6jzzHSoS6io4k4UqD6vsJdMR00iEVbH2j6B/M4B+Uf/5HQ3cCi3+8YbN0GYYh1WER3KHun+OrUP0j98XZAC9uuT9Gn86pQlCUX99+adPlxjjPde8jg/InsOQLmWmmFoaRPQma+w+JUgapoaykfib0kgn8Sgcje2N1gtpAs2gYXlGmgqepfSxK1F/ZA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=8XdWYUSzq3OWcAb96ikFcZEJtoTmVk01MAOqNNUBrF8=; b=oOJNFVn+x2AmgmWXSZEWDhJJNV33Ftb0d7ZeGVFDgkBL4mBrAxZVi8FguPJ+oBzrMqQBzQ7Bk+awt57t2dbfoIXqFkWFF5cHdK2dLifDJr03DzavpYfqISqvJMfeH6VXG7ncDOVxSFRNIcAiBsrS01KKJR+eZCTF67P8EXCb5yQ= Received: from BYAPR11MB3015.namprd11.prod.outlook.com (2603:10b6:a03:86::14) by BY5PR11MB4071.namprd11.prod.outlook.com (2603:10b6:a03:18c::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3348.15; Tue, 22 Sep 2020 00:47:37 +0000 Received: from BYAPR11MB3015.namprd11.prod.outlook.com ([fe80::c180:fe9a:f947:4ca0]) by BYAPR11MB3015.namprd11.prod.outlook.com ([fe80::c180:fe9a:f947:4ca0%7]) with mapi id 15.20.3391.024; Tue, 22 Sep 2020 00:47:37 +0000 From: "Zulkifli, Muhammad Husaini" To: Michal Simek , "Hunter, Adrian" , "ulf.hansson@linaro.org" , "linux-mmc@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , Arnd Bergmann Subject: RE: [PATCH v1 1/1] mmc: sdhci-of-arasan: Enable UHS-1 support for Keem Bay SOC Thread-Topic: [PATCH v1 1/1] mmc: sdhci-of-arasan: Enable UHS-1 support for Keem Bay SOC Thread-Index: AQHWimLCf5qN36I7DEm2Cbc0P5ffRKloHlGggAAF+4CACp6YAA== Date: Tue, 22 Sep 2020 00:47:37 +0000 Message-ID: References: <20200914051214.13918-1-muhammad.husaini.zulkifli@intel.com> <20200914051214.13918-2-muhammad.husaini.zulkifli@intel.com> <21d34b75-5947-e115-7c9a-6d068375bbdd@xilinx.com> <452d5580-a1d6-c509-2760-80bde1f84ef9@xilinx.com> In-Reply-To: <452d5580-a1d6-c509-2760-80bde1f84ef9@xilinx.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.5.1.3 dlp-product: dlpe-windows dlp-reaction: no-action authentication-results: xilinx.com; dkim=none (message not signed) header.d=none;xilinx.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [42.189.182.175] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: bca8386f-17dd-4399-10d2-08d85e911a50 x-ms-traffictypediagnostic: BY5PR11MB4071: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 2qdUxzBv9P1603qKZBVPL4hxIbVcV9DkTqo4q50G2sEkZJKULUvjZ3++5TzEuSEYf02fkPEEF2uhy/lSUr9fGCM5qRAWDXXN5jNwDRGeQanh2FiyZeSs8oDGfjYCPwQ+op2xIri78bpL0XDOG1XH346aMvHuCMf3/DdAOhZiOIht541I59pKABdQrhtdKnF0oogN8dfn/tCpek/lckPP0QsgOEAvSiooVGnEqn6ntUQHeXAvfovP5ZqVDfMrt5QWU7qKgRWDu1YUaKFZ7JuynSWEq7Wbn+N1uKNEX/SHlfASoeT6/NyLnaO7YeHMEO1XRUjlLQtQSa/FrtSBVmtNew== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB3015.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(39860400002)(136003)(376002)(346002)(366004)(396003)(7696005)(8676002)(86362001)(4326008)(64756008)(186003)(110136005)(316002)(71200400001)(2906002)(83380400001)(478600001)(66556008)(5660300002)(8936002)(6506007)(66476007)(107886003)(53546011)(52536014)(54906003)(55016002)(9686003)(76116006)(66446008)(33656002)(66946007)(26005); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: ytRPETHvjKy+w0TFiomgvFRmNjbXJ8HABrhDpdUxpf9fYRtIUHBUoLqP4K0bhRLNwz9KfAPYYC7tY2Jx3e2j0Rqd88WwxkPZYUfsz+3AGiaNQgHFRpdtM/I8+SuKnilLfbY3eEbvaHlc+OtDovke0raO44g/Cb/EvZANrcI5OJBTgOKssUA/HSzQWgVjIcahhZhedp8GKmHcLMAHELjL//dcnV1zkPBG9S/QTOCeREgCEYAJdWZaknQPks1iIa+8mfa10ylFLXUri8j6WrwPIShhHX7zs70/B4o6JaEuAe7Y9KLMOzGy4obaTDaEpfWObvp+l8ju32VkBd9a3wM1xYWUq8v03YUBEcX7Y0JwwEAyGTa3yOWplOoK02V+M1uY9pz0mjwC4fnw6PXj3sYuqhpxPJsRFWEWL/yEXCHaFnymgXgCtcBg5uPd7e8BKddLAo3sTkMvG8iYQqBzC5RG77tTLfusJuOwJ2xZnn0sDPtAD6BkV+HT2xnp0sRtVM4jQQEdPdN4XG/bQY9XFPruMKmI+Ul+7gZxgnfWT7b9cy9wXvNq3lwRLJd4YPRHcNjdqMQwIIv4LDrUbJ35qjbe2h8oRhiN1q0OjWmvfMEbUIwGLsm2Cac6GhCUnA01zr08lq09Hk/1x56X6hNuc5fRVA== MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB3015.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: bca8386f-17dd-4399-10d2-08d85e911a50 X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Sep 2020 00:47:37.6309 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: PEjWy6ju4LmyHopoVm3HKyqRLNpFllokOQlASX6XOkeDbxRJ2tP76izZef3T5OkvHLa6yAtL6kny90BslJuPNYROb9w4neeXch6REMEnCB0oO2BGlQQie2z03+mw24a4 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR11MB4071 X-OriginatorOrg: intel.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200921_204759_869658_6162C080 X-CRM114-Status: GOOD ( 31.41 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Raja Subramanian, Lakshmi Bai" , "Wan Mohamad, Wan Ahmad Zainie" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org -----Original Message----- From: Michal Simek Sent: Monday, September 14, 2020 9:40 PM To: Zulkifli, Muhammad Husaini ; Michal Simek ; Hunter, Adrian ; ulf.hansson@linaro.org; linux-mmc@vger.kernel.org; linux-arm-kernel@lists.infradead.org; linux-kernel@vger.kernel.org; Arnd Bergmann Cc: Raja Subramanian, Lakshmi Bai ; Wan Mohamad, Wan Ahmad Zainie Subject: Re: [PATCH v1 1/1] mmc: sdhci-of-arasan: Enable UHS-1 support for Keem Bay SOC Hi, On 14. 09. 20 15:26, Zulkifli, Muhammad Husaini wrote: > HI Michal, > > Thanks for the comments. > I replied inline > > -----Original Message----- > From: Michal Simek > Sent: Monday, September 14, 2020 2:46 PM > To: Zulkifli, Muhammad Husaini ; > Hunter, Adrian ; michal.simek@xilinx.com; > ulf.hansson@linaro.org; linux-mmc@vger.kernel.org; > linux-arm-kernel@lists.infradead.org; linux-kernel@vger.kernel.org; > Arnd Bergmann > Cc: Raja Subramanian, Lakshmi Bai > > Subject: Re: [PATCH v1 1/1] mmc: sdhci-of-arasan: Enable UHS-1 support > for Keem Bay SOC > > Hi, +Arnd, > > On 14. 09. 20 7:12, muhammad.husaini.zulkifli@intel.com wrote: >> From: Muhammad Husaini Zulkifli >> >> Voltage switching sequence is needed to support UHS-1 interface as >> Keem Bay EVM is using external voltage regulator to switch between >> 1.8V and 3.3V. >> >> Signed-off-by: Muhammad Husaini Zulkifli >> >> Reviewed-by: Andy Shevchenko >> Reviewed-by: Adrian Hunter >> --- >> drivers/mmc/host/sdhci-of-arasan.c | 140 >> +++++++++++++++++++++++++++++ >> 1 file changed, 140 insertions(+) >> >> diff --git a/drivers/mmc/host/sdhci-of-arasan.c >> b/drivers/mmc/host/sdhci-of-arasan.c >> index f186fbd016b1..c133408d0c74 100644 >> --- a/drivers/mmc/host/sdhci-of-arasan.c >> +++ b/drivers/mmc/host/sdhci-of-arasan.c >> @@ -16,7 +16,9 @@ >> */ >> >> #include >> +#include >> #include >> +#include >> #include >> #include >> #include >> @@ -41,6 +43,11 @@ >> #define SDHCI_ITAPDLY_ENABLE 0x100 >> #define SDHCI_OTAPDLY_ENABLE 0x40 >> >> +/* Setting for Keem Bay IO Pad 1.8 Voltage Selection */ >> +#define KEEMBAY_AON_SIP_FUNC_ID 0x8200ff26 >> +#define KEEMBAY_AON_SET_1V8_VOLT 0x01 >> +#define KEEMBAY_AON_SET_3V3_VOLT 0x00 >> + >> /* Default settings for ZynqMP Clock Phases */ >> #define ZYNQMP_ICLK_PHASE {0, 63, 63, 0, 63, 0, 0, 183, 54, 0, 0} >> #define ZYNQMP_OCLK_PHASE {0, 72, 60, 0, 60, 72, 135, 48, 72, 135, >> 0} @@ -150,6 +157,7 @@ struct sdhci_arasan_data { >> struct regmap *soc_ctl_base; >> const struct sdhci_arasan_soc_ctl_map *soc_ctl_map; >> unsigned int quirks; >> + struct gpio_desc *uhs_gpio; >> >> /* Controller does not have CD wired and will not function normally without */ >> #define SDHCI_ARASAN_QUIRK_FORCE_CDTEST BIT(0) >> @@ -361,6 +369,121 @@ static int sdhci_arasan_voltage_switch(struct mmc_host *mmc, >> return -EINVAL; >> } >> >> +static int sdhci_arasan_keembay_set_voltage(int volt) { #if >> +IS_ENABLED(CONFIG_HAVE_ARM_SMCCC) >> + struct arm_smccc_res res; >> + >> + arm_smccc_smc(KEEMBAY_AON_SIP_FUNC_ID, volt, 0, 0, 0, 0, 0, 0, &res); >> + if (res.a0) >> + return -EINVAL; >> + return 0; > > I am just curious about calling this smc directly from device driver. I see that several drivers are doing this but isn't it better to hide these in firmware driver? > [Husaini] In order to change the voltage selection for IO Pads voltage switching level control, I need to access/write to AON register. > Due to security concern, U-Boot Team provided an interface using this SIP Service for me to call during kernel driver voltage switching operation. I expect U-Boot team is any internal team not U-Boot upstream folks. [Husaini] I requote my statement. It is ATF that provided the services. They are in the process of upstreaming the code as well. That is a great idea to hide these in firmware driver. I created one firmware driver under /drivers/firmware. This firmware driver provide an api for device driver to call for the operations. > Also the part of FUNC_ID is smc32, sip service call (0x82000000) function identifier which is likely something what should be used as macro in shared location that others can use it too. > [Husaini] The only thing provided was the FUNC_ID value and argument. > > Another part is that based on description you are talking to external voltage regulator without using regulator framework at all. Isn't it better just to create firmware based regulator for this purpose? > [Husaini] This is for Keembay specific and we did not use regulator framework. > During the voltage switching, this SIP function need to be executed to change the Keem Bay IO Pad Switching Level Control to 1.8V for UHS or 3.3v for default mode. > To be specific, below line of code must come together during the voltage switching operation. > > For 1.8V > + /* Set VDDIO_B voltage to Low for 1.8V */ > + gpiod_set_value_cansleep(sdhci_arasan->uhs_gpio, 0); > + > + ret = sdhci_arasan_keembay_set_voltage(KEEMBAY_AON_SET_1V8_VOLT); > + if (ret) > + return ret; > > For 3.3V > /* Set VDDIO_B voltage to High for 3.3V */ > + gpiod_set_value_cansleep(sdhci_arasan->uhs_gpio, 1); > + > + ret = sdhci_arasan_keembay_set_voltage(KEEMBAY_AON_SET_3V3_VOLT); > + if (ret) > + return ret; I understand that you need to change voltage here but I don't think the code you have written is how this should be done. I understand that this is the quickest and direct way how to do it but I don't think this is done via proper interface. I pretty much dislike that you are putting Func IDs to drivers instead of adding them to central place that it is visible what your platform needs. [Husaini] let me rephase my sentences . I make some confusion here and in commit message. To summarize there are 2 places to final generate the IO Voltage. 1) Setting the V_VDDIO_B . AON Register for IO PADS Voltage Switching Level Control. This register defines the IO Voltage for particular GPIOs pin for clk,cmd,data1-2. 2) Setting the GPIO expander pin value to drive either 1.8V or 3.3V. SD card IO can operate at 3.3V (default) or 1.8V. Keem Bay has a bank of IO that can be switched between 3.3V or 1.8V for this reason. The output V_VDDIO_B_MAIN be either 3.3v (in) or 1.8v(in), depending on the state of GPIO expander PIN value. The final IO voltage is set by V_VDDIO_B (= V_VDDIO_B_MAIN after passing through voltage sense resistor). I will use the gpio consumer interface to specify a direction and value for the gpio expander pin. Is this OK with these 2 implementation? > > Or was there any agreement to put these stuff directly to the driver? > [Husaini] There is an agreement between IO Team and U-boot team to use > this kind of implementation to support this UHS-1 Mode features for keem bay for voltage switching sequence. What you do internally is completely different story compare to how this should be done properly and I think this is just wrong way to go. You should at least create firmware driver and even check if this feature you are asking about is available and provided by firmware. [Husaini] Noted. Follow your advices by creating a firmware driver. Thanks, Michal _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel