Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp1775523rwi; Thu, 3 Nov 2022 08:57:21 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6QYyIwR9UjvPPLODhlDyFsE9KLr1CZvSZwfSgyeYXXnQYq9mGB0iyAG+CNj8/WPb5NI/L9 X-Received: by 2002:a05:6402:249b:b0:460:cb11:27d4 with SMTP id q27-20020a056402249b00b00460cb1127d4mr30813124eda.410.1667491041319; Thu, 03 Nov 2022 08:57:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667491041; cv=none; d=google.com; s=arc-20160816; b=tLSnhxjnp5ryVNzE7NQdayO04lGEeC+iduwSTAtnv4goHpWVLW2r9CjN9ckpVIR736 lr9+dvUciJ8XKoyw1dSqMSVhO8IZf8FL0jsHHxzjLS+6Uio1b0SqEKdLoeWyoEpbgwNi Tt557SZKetshUJkJ+ScRAoJzAtEwyV1QEcQIEKQGGFXBUQ7nnLAaSGVbZAkJS6B/6y6t sbow21bOVDGKKmnJBR3Yq8/UoZ5c86mbvblnojI0XslnpMEJQNpkm/Xp/WdCsy++4msG VSTueESbf3QGpx5yjyoI+sCfQL27lX4YQjcVLcscmARm9m56TkI38fms0Bo9K4EQoina yNGQ== 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=f7W935H1KbRw0Ag8QHM/Yn3lqfyL9ka2fjOWNd1WB1I=; b=oZCnQ49cSL02dR/Nx0mH+zPSll3iKZoik/Z6QLDH3uT0L9sDiZPUmHnYB00f/d8R/C QxknOrwlyZCsRZFTtiH76yh5hc5ec9nuiZMGoZyHx0/JlIGr7xRTP6ZOgx+6NOqHHkQF bpuiGJk7m9d3tX71ToenxvogKAru2qwMop5joBBClPeeErG5avLyvpN6FlBqUSNVHDbd xKTch67Yrd7z/Xuetsef2MNdqaKVwuuBSsVQHR1bVUsNbSbmRaoBKH4M+G002bd6c8ms wtKgAUirYCmq/cirzvVLM2J1yLzm5pW9azDL5WW+KA9REdvsFtH3iZNRRLhiUb3hJDOP 0NDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=c6nzyMKW; 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=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w10-20020a05640234ca00b0045a5bd66302si1935635edc.571.2022.11.03.08.56.56; Thu, 03 Nov 2022 08:57:21 -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=@linaro.org header.s=google header.b=c6nzyMKW; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232117AbiKCPXZ (ORCPT + 97 others); Thu, 3 Nov 2022 11:23:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33208 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231544AbiKCPXW (ORCPT ); Thu, 3 Nov 2022 11:23:22 -0400 Received: from mail-qk1-x730.google.com (mail-qk1-x730.google.com [IPv6:2607:f8b0:4864:20::730]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B8401100C for ; Thu, 3 Nov 2022 08:23:20 -0700 (PDT) Received: by mail-qk1-x730.google.com with SMTP id x18so1336450qki.4 for ; Thu, 03 Nov 2022 08:23:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=f7W935H1KbRw0Ag8QHM/Yn3lqfyL9ka2fjOWNd1WB1I=; b=c6nzyMKW9ZnRtwa3zp76mKQ0QUn6sfJTsCuR8G4mpyrAxY54i5HSj7n6qSXMzftZ17 80m8TF5uOv4YXZFb5VC0HmjwMnd6inedHNSNgA/GcUaOnKei0IiD8BOi1vbZsOT3tCrI 2rYW/hQUTMKwCfn/T+utoFWvmmllBQXjZ2ykiqhGEKoT+MMUr/5ktX6RzNjmD+Ui3/H9 fy2n71ovs22yMfa2zo0wpjYYsPnfkDH99eq4X9KS1qirEdUCL8ckTwy/BMhKjCVuj5pf aQFXgOmQYassXRfNcYJx49mTSK1RIhc+rbvLzJdyLlYLDfmWSt5LntqoE0eIHTUc7aCs aKTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=f7W935H1KbRw0Ag8QHM/Yn3lqfyL9ka2fjOWNd1WB1I=; b=UhlaYvpS/hoPt9VvYB0g8kMiMlwRo4axHI2IYJHss3Sy+GKAfcVZdShdEUysrjgSRB juYw3GtsfPiKKadslQEylH61Z9SkmhgcM9ijFtBR0lDs9L5Hf1MHfQDKRIPvcuqX7ZhO XZ0WZALFMBaUfmBVj69FRRvPkpX+PEbBDcDwgZ6iVmgmp5gpuD6aiUOK81vhwSuf65ia K7oVTqESkvRo7l8N0mfrEhQPkFt3U5Y6D1Cl/pZoJyshtOq7c2JWH66rHckg4ocyY4js hSDbq5hXGsQnEsxa2JEvLPVKib1o9piztGdUkntY+3LfvdHD3Z0p5Ghd0lQZ57RT85Ha +l8A== X-Gm-Message-State: ACrzQf0JnFV42fr6BrG1e+pUllINrBjvw48x/yuPuGvZh6FfAaKY2b8j kEZlfmm0qQUsTrITxRwBJXeWIg== X-Received: by 2002:a37:de03:0:b0:6ee:88a2:eb9a with SMTP id h3-20020a37de03000000b006ee88a2eb9amr22330615qkj.241.1667488999874; Thu, 03 Nov 2022 08:23:19 -0700 (PDT) Received: from ?IPV6:2601:586:5000:570:a35d:9f85:e3f7:d9fb? ([2601:586:5000:570:a35d:9f85:e3f7:d9fb]) by smtp.gmail.com with ESMTPSA id h6-20020ac85046000000b003a494b61e67sm675911qtm.46.2022.11.03.08.23.18 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 03 Nov 2022 08:23:19 -0700 (PDT) Message-ID: Date: Thu, 3 Nov 2022 11:23:17 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.1 Subject: Re: [PATCH v2 06/15] dt-bindings: ufs: Add "max-device-gear" property for UFS device Content-Language: en-US To: Manivannan Sadhasivam Cc: martin.petersen@oracle.com, jejb@linux.ibm.com, andersson@kernel.org, vkoul@kernel.org, krzysztof.kozlowski+dt@linaro.org, konrad.dybcio@somainline.org, robh+dt@kernel.org, quic_cang@quicinc.com, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org, linux-scsi@vger.kernel.org, dmitry.baryshkov@linaro.org, ahalaney@redhat.com References: <20221031180217.32512-1-manivannan.sadhasivam@linaro.org> <20221031180217.32512-7-manivannan.sadhasivam@linaro.org> <1fe8fd96-7770-0bda-c970-aa38d030ff3b@linaro.org> <20221103122850.GD8434@thinkpad> From: Krzysztof Kozlowski In-Reply-To: <20221103122850.GD8434@thinkpad> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 On 03/11/2022 08:28, Manivannan Sadhasivam wrote: > On Wed, Nov 02, 2022 at 03:09:50PM -0400, Krzysztof Kozlowski wrote: >> On 31/10/2022 14:02, Manivannan Sadhasivam wrote: >>> The maximum gear supported by the UFS device can be specified using the >>> "max-device-gear" property. This allows the UFS controller to configure the >>> TX/RX gear before starting communication with the UFS device. >> >> This is confusing. The UFS PHY provides gear capability, so what is the >> "device" here? The attached memory? How could it report something else >> than phy? >> > > This is the norm with any storage protocol, right? Both host and device > (memory) can support different speeds and the OEM can choose to put any > combinations (even though it might not be very efficient). > > For instance, > > PHY (G4) -> Device (G3) Yes and look at MMC - no need to define "max mode" supported by eMMC. You define the modes supported by controller but the memory capabilities are being autodetected and negotiated. > > From the host perspective we know what the PHY can support but that's not the > same with the device until probing it. And probing requires using a minimum > supported gear. For sure we can use something like G2/G3 and reinit later but > as I learnt, that approach was rejected by the community when submitted > by Qualcomm earlier. It should be then referenced somewhere as it might be a reason to accept the property. > >> The last sentence also suggests that you statically encode gear to avoid >> runtime negotiation. >> > > Yes, the OEM should know what the max gear speed they want to run, so getting > this info from DT makes sense. Not really if it is auto-detectable. Just because things are static is not the sole reason to put them into DT. The reason is - they are not detectable by OS/firmware thus we must have them in DT to be able to know it. Best regards, Krzysztof