Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp1368343rdb; Mon, 2 Oct 2023 07:34:16 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFq9NPuktEeiW9WKCyG94jFun/OJ/SEeGKMsj2xQbQo2HRYxRF5KeRuyKpHEgLNTT1KYRXJ X-Received: by 2002:a05:6a20:1613:b0:154:edaf:f410 with SMTP id l19-20020a056a20161300b00154edaff410mr11228254pzj.58.1696257255686; Mon, 02 Oct 2023 07:34:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696257255; cv=none; d=google.com; s=arc-20160816; b=Urw9EBfjccCAA1FABT6/ksM1pSTvbeed8lir2RWD2IHBSGF6hnrPfRSXsQ/GhmT5XC sC+5aGAc6I/GSVkUtOWSXvq1KDCrfkjayGyCtAjJL8P9Gz+EQ1VziJfIAF8CtrUcWghM a39nvDrXnjEylD3r2EqDmLoZwcykUHh0tvS9NjSJw24HkUEqm1Wf74cfAbh8iwgbx9h+ 6Mojhh+HrhRLH53SWOUxnEGHo4BkiQrbVE/93qvjnzU6NyIl59HRUfqZ1gNXizQKpvcD cj98nx7fxBFNMf/aGZ3op8z5swx6xM7KoPfPL310s/ROxVEH8b9nugGaUMjb9WfawtRh M2eg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=hegxgNO6/eJmMi3xYv5xPqS6nCUbQPuKqJAOsVw9YZU=; fh=9gJ1IjOnsmDzkkUbps8ER5SB0LjwXIsy8qyrU5g1QtA=; b=pDFf6Y92I0+FulDAgmMxpJ/lpsoj1KHwLE7FKZzXwuZNkaMWxvXbbxWS0m+M4iAAqL uSn4OzCcxjw4Mc1Fm8VjzZtDgemZfZAz86CpsslY3/oz60q7ENuku0SfjkIofoQGOZIC r1i9OwI2zJq3J5oUA//18CA9UxAtTFvTMeqOYh5cQ5F74Df3q8DFFjU1GH4+Pp8IUR/K NJwDuxrGuq4JaTnvxwqSIPKT8ucTExR7eiedwbcR0ts+9AtbYPXWkTyQLaT8+CqDNpPX FBTFrm/XFycEIrzADjmU2tAJhNHgTmNyZ3lYwOxLNMMMP0ac1khn4uSEDlM0C9gXSMad vjJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=exODTJck; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id t5-20020a628105000000b0068fb5cbcef2si26398921pfd.117.2023.10.02.07.34.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Oct 2023 07:34:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=exODTJck; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id F085380BF1E3; Mon, 2 Oct 2023 02:14:54 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236012AbjJBJOq (ORCPT + 99 others); Mon, 2 Oct 2023 05:14:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49100 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235965AbjJBJOo (ORCPT ); Mon, 2 Oct 2023 05:14:44 -0400 Received: from mail-lf1-x12a.google.com (mail-lf1-x12a.google.com [IPv6:2a00:1450:4864:20::12a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0816899 for ; Mon, 2 Oct 2023 02:14:40 -0700 (PDT) Received: by mail-lf1-x12a.google.com with SMTP id 2adb3069b0e04-50308217223so24748953e87.3 for ; Mon, 02 Oct 2023 02:14:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1696238078; x=1696842878; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=hegxgNO6/eJmMi3xYv5xPqS6nCUbQPuKqJAOsVw9YZU=; b=exODTJckfjOSaiP0BD1SXvH0KxA+TQrsM2Rjzu+cjpjTmb5f3S46nXUzjzQAFoVfMr roPw3hrJN1P7VrOjTQ5pDeprwdI4PumNichevxqtioAPKeIFCuTMm6td/o7lZctdHRJg GNg/dHhvn819wXHNIQ8KttSgeWG6q7wwy5apTx7BKQWyTM768XU800qJNmoIxX8Ka1xy rnNpNMvsfSmtKiF/ZeLqVHLivmTVrx5IHOyqJNlirbmgTAQSbfpXXVg6ItkEFb2P6gbV mOwXOK6NfwNMPfORUybfYFVjOGPscuzUnWxlMXJn/ZF77/2iMseuHBbb4m3NN0cPm79r Ncbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696238078; x=1696842878; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=hegxgNO6/eJmMi3xYv5xPqS6nCUbQPuKqJAOsVw9YZU=; b=oL0ssnuRbMeCQO0OyJZUs95p8psCZSOwHExZw1jH2rSuSQZafNTOe3K9ZKePfgSLOq z/l/jNWMQdQcHArEU4mvdSbYdxeWSA2gFS50B2DTlDQinar9EjD/MfR2WMwCSlpqGMSh okPz/HZThznwVBCj/v7GggRzEBFzXDF4WTuY51BSU/WECujUKWvngfkTvir/4N2YXbg4 2Zar2svrMaGm0uxZkNoctYlNdHZvBvw1n3W1WLJc/bcUADARiN3Ucq+nMcOwK4Wo9ywS gtjg8Txmb6gB/D6V2KIa1DMwGs05vMf+bj99bTmZmQw/eHIUYxnO9C0pdejeP0oCyFP6 ckXw== X-Gm-Message-State: AOJu0YyyY4eBFzfOEvUnz9AOkSKGAV71DmeypbQReVe914dyB91Fw8ou ke7FAUoDb8lH7mA8cZlmBHQqyXw2CJkfFXIc4L4= X-Received: by 2002:a05:6512:693:b0:4ff:7e80:4f1d with SMTP id t19-20020a056512069300b004ff7e804f1dmr11149698lfe.57.1696238078052; Mon, 02 Oct 2023 02:14:38 -0700 (PDT) Received: from [172.30.204.164] (UNUSED.212-182-62-129.lubman.net.pl. [212.182.62.129]) by smtp.gmail.com with ESMTPSA id j5-20020a05651231c500b0050482d4727fsm2210852lfe.233.2023.10.02.02.14.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 02 Oct 2023 02:14:37 -0700 (PDT) Message-ID: <3267eb4b-7154-200a-ec10-d795acc029f1@linaro.org> Date: Mon, 2 Oct 2023 11:14:36 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: [PATCH] arm64: dts: qcom: qcm6490-fairphone-fp5: Enable UFS Content-Language: en-US To: Luca Weiss , Andy Gross , Bjorn Andersson , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Nitin Rawat Cc: ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org References: <20230929-fp5-ufs-v1-1-122941e28b06@fairphone.com> From: Konrad Dybcio In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=0.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Mon, 02 Oct 2023 02:14:55 -0700 (PDT) On 10/2/23 09:02, Luca Weiss wrote: > On Fri Sep 29, 2023 at 3:12 PM CEST, Konrad Dybcio wrote: >> On 29.09.2023 11:52, Luca Weiss wrote: >>> Enable the UFS phy and controller so that we can access the internal >>> storage of the phone. >>> >>> At the same time we need to bump the minimum voltage used for UFS VCC, >>> otherwise it doesn't initialize properly. The new range is taken from >>> the vcc-voltage-level property downstream. >>> >>> See also the following link for more information about the VCCQ/VCCQ2: >>> https://gerrit-public.fairphone.software/plugins/gitiles/kernel/msm-extra/devicetree/+/1590a3739e7dc29d2597307881553236d492f188/fp5/yupik-idp-pm7250b.dtsi#207 >>> >>> Signed-off-by: Luca Weiss >>> --- >>> I'm not 100% convinced about the regulator range change. For sure with >>> the original voltage range the UFS fails to initialize, but looking at >>> downstream kernel during runtime (debugfs) we see the VCC voltage >>> switches between 2.4V (idle?) and 2.952V (active?). But even with this >>> change in mainline the regulator would always stay at 2.504V which is >>> for sure lower than the downstream operating voltage of 2.952V. Behavior >>> wise I don't see a difference between ~2.5V and ~2.9V. >>> >>> Should I just constrain the regulator here to min=max=2.952V? Or just >>> say it's okay as-is? >>> >>> Depends on: https://lore.kernel.org/linux-arm-msm/20230927081858.15961-1-quic_nitirawa@quicinc.com/ >>> --- >> There's a little funny hack inside the driver >> >> #if defined(CONFIG_SCSI_UFSHCD_QTI) >> if (vreg->low_voltage_sup && !vreg->low_voltage_active && on) >> min_uV = vreg->max_uV; >> #endif >> >> so, when the ufs is in use, it's pinned to vmax > > Hi Konrad, > > Are you implying I *should* or *should not* pin the voltage range to > 2.952V-2.952V for mainline? Neither, voltage scaling should be implemented :P But for now, pinning it to 2.952 const is the right temporary solution, as having working UFS is generally better than one that can only idle in a stable manner :D Konrad