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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D0A66C433EF for ; Tue, 22 Feb 2022 18:15:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=sYVhaAJb21Qe8gbCNllRmoUk31eWC6QAUfsxR/zjbPw=; b=cT16yfKoU/+Tn0 sL29Q8KF6v4jRRsEwoMQPs1Kl3Fvl9tHa3DbMHZI1UM1ICCnEGCDe1mGMrP+CjH6nl7TUSAoLm7gf SUn3v0kB9uShEv7K6SKDC7oa4x6eUWjRfayYeiWzdgQln/zgUlHTY/YMnoeUUfxpA1L6wd013LZus QEtWcSNbjRX9z/jIF7fgTRkMSkAsBCUTjV5BbQnAHCTzkgLizCBImKaNG0yqTWqDoVdfPgGcE9Mv6 BA+zo7g/DXlHFF7/RKXAF+z9OXpUvgsWDXCTm5K/PQAIcXwvq7EuEGlYdDmdnH4vTGIgrPQBhLK/E hzHy01o/3YUhnhq96p7Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nMZgA-00BA5f-P0; Tue, 22 Feb 2022 18:14:26 +0000 Received: from mail-oi1-x229.google.com ([2607:f8b0:4864:20::229]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nMZg7-00BA45-6z for linux-arm-kernel@lists.infradead.org; Tue, 22 Feb 2022 18:14:24 +0000 Received: by mail-oi1-x229.google.com with SMTP id l25so9799337oic.13 for ; Tue, 22 Feb 2022 10:14:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=LVnQOEdOfsSROklcR4dN5XSqlK3ehHzd57yMiFQiZEw=; b=gACc9RkTQBgrInQOVXfQ1pKbHWcF+vW7yEcgUKHfbJNaSRgH0VSAeKEPmgvoPrsGtM 1OHOpOzefMJ6TeAtuAiFsTjcl2Z9l/sYaFMYHKdbQPiC1OAZZrnJ783k277cmUAHT3Ak cpk2Wqa53ywX5ZF0emDkit0q3oOUM3KphJLlH5nz/ouLpXXye4c+4fATKRJl6SNpHWGk BiqWCZVClbCg7zcgsHIHRxq8t0cu1KJSPZT06YHqjR46WEnl8XruiaDoUWfA1ygDLGUh j3BYR4yVxu5WbWo7sy10d0FagAti8sZxg5eSabztkpnrb6Tsoa782kR5Ws+gEaC70TFs Cj4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=LVnQOEdOfsSROklcR4dN5XSqlK3ehHzd57yMiFQiZEw=; b=qHY3IEXpy55K32ywJXk+5LSKY+64F026ghIR15+PXyquuRo2aFKzs8OaNgKVZ00bV8 +jGZcf7QguyO9kq+seUjP2eThOoLZd86DhHb1vFFu0zUKA4xyhgQCC5QqYmzc2d8R2or jt0qbXsBRG7vy4N6USsXjez8oyci50QvGOnVbqIz8rws4skoEHohCGduusKDBTRxU8OB MkYCZy6Qmoytg/d7mQpGZiXDbnlr18ytBOECChQdaQIptc9UWEXLMtvayy6M19//mKOo JvzhI08gjNY/pNihNCMG5e/Rdb6RNU4TgGiF31sgbtRoJJMTyH2+7pyf7iqVXNNiN0J2 a9tg== X-Gm-Message-State: AOAM5311QhQKs9l843T/n4b7dC5RO+ze9t2Pg/L5DryyHzcu2kz360Y4 BcTkkdXci4+/3/Ekb2qo1JMWsA== X-Google-Smtp-Source: ABdhPJx7kZEQxrj35Gmb41f+nvIkI4s49gKjv/NLrazcdAlObCeL+cSnEQ3LUMdDYmBlxChh3xHItg== X-Received: by 2002:aca:ba83:0:b0:2d4:13f1:8530 with SMTP id k125-20020acaba83000000b002d413f18530mr2556490oif.169.1645553661373; Tue, 22 Feb 2022 10:14:21 -0800 (PST) Received: from ripper ([2600:1700:a0:3dc8:205:1bff:fec0:b9b3]) by smtp.gmail.com with ESMTPSA id c14sm7909698ots.71.2022.02.22.10.14.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Feb 2022 10:14:20 -0800 (PST) Date: Tue, 22 Feb 2022 10:16:21 -0800 From: Bjorn Andersson To: Krzysztof Kozlowski Cc: Alim Akhtar , Avri Altman , Rob Herring , Andy Gross , Wei Xu , Nishanth Menon , Vignesh Raghavendra , Tero Kristo , "James E.J. Bottomley" , "Martin K. Petersen" , Jan Kotas , Li Wei , Stanley Chu , Yaniv Gardi , linux-scsi@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-mediatek@lists.infradead.org Subject: Re: [PATCH v2 09/15] scsi: ufs: deprecate 'freq-table-hz' property Message-ID: References: <20220222145854.358646-1-krzysztof.kozlowski@canonical.com> <20220222145854.358646-10-krzysztof.kozlowski@canonical.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220222145854.358646-10-krzysztof.kozlowski@canonical.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220222_101423_294970_7FC69D0B X-CRM114-Status: GOOD ( 23.59 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 On Tue 22 Feb 06:58 PST 2022, Krzysztof Kozlowski wrote: > The 'freq-table-hz' is not correct in DT schema, because '-hz' suffix > defines uint32 type, not an array. Therefore deprecate 'freq-table-hz' > and use 'freq-table' instead. > Patch looks good in itself, but why don't we use opp-table to describe the performance states? In particular looking at the two columns of frequencies for various Qualcomm boards they require different performance-states. A concrete example is sm8350.dtsi, which specifies 75MHz and 300MHz as the first frequency pair. The lower level requires the VDD_CX power rail to be at least &rpmhpd_opp_low_svs, the higher frequency has a required-opps of &rpmhpd_opp_nom. As this isn't possible to express in the current binding we've just been forced to always run at a higher voltage level and kept this in the todo list. But rather than migrating freq-table-hz to freq-table and then having to introduce an opp table to express the power constraints, could we perhaps skip the intermediate step? Or would you have any other suggestion about how we can represent the required-opps level together with the freq-table (if that's what we want to stick with). Regards, Bjorn > Signed-off-by: Krzysztof Kozlowski > --- > drivers/scsi/ufs/ufshcd-pltfrm.c | 21 +++++++++++++-------- > 1 file changed, 13 insertions(+), 8 deletions(-) > > diff --git a/drivers/scsi/ufs/ufshcd-pltfrm.c b/drivers/scsi/ufs/ufshcd-pltfrm.c > index 87975d1a21c8..2b192477d158 100644 > --- a/drivers/scsi/ufs/ufshcd-pltfrm.c > +++ b/drivers/scsi/ufs/ufshcd-pltfrm.c > @@ -47,8 +47,9 @@ static int ufshcd_parse_clock_info(struct ufs_hba *hba) > if (cnt <= 0) > goto out; > > - if (!of_get_property(np, "freq-table-hz", &len)) { > - dev_info(dev, "freq-table-hz property not specified\n"); > + if (!of_get_property(np, "freq-table", &len) || > + !of_get_property(np, "freq-table-hz", &len)) { > + dev_info(dev, "freq-table property not specified\n"); > goto out; > } > > @@ -57,7 +58,7 @@ static int ufshcd_parse_clock_info(struct ufs_hba *hba) > > sz = len / sizeof(*clkfreq); > if (sz != 2 * cnt) { > - dev_err(dev, "%s len mismatch\n", "freq-table-hz"); > + dev_err(dev, "%s len mismatch\n", "freq-table"); > ret = -EINVAL; > goto out; > } > @@ -69,12 +70,16 @@ static int ufshcd_parse_clock_info(struct ufs_hba *hba) > goto out; > } > > - ret = of_property_read_u32_array(np, "freq-table-hz", > + ret = of_property_read_u32_array(np, "freq-table", > clkfreq, sz); > if (ret && (ret != -EINVAL)) { > - dev_err(dev, "%s: error reading array %d\n", > - "freq-table-hz", ret); > - return ret; > + ret = of_property_read_u32_array(np, "freq-table-hz", > + clkfreq, sz); > + if (ret && (ret != -EINVAL)) { > + dev_err(dev, "%s: error reading array %d\n", > + "freq-table", ret); > + return ret; > + } > } > > for (i = 0; i < sz; i += 2) { > @@ -99,7 +104,7 @@ static int ufshcd_parse_clock_info(struct ufs_hba *hba) > > if (!strcmp(name, "ref_clk")) > clki->keep_link_active = true; > - dev_dbg(dev, "%s: min %u max %u name %s\n", "freq-table-hz", > + dev_dbg(dev, "%s: min %u max %u name %s\n", "freq-table", > clki->min_freq, clki->max_freq, clki->name); > list_add_tail(&clki->list, &hba->clk_list_head); > } > -- > 2.32.0 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel