Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3691812imm; Mon, 18 Jun 2018 02:23:31 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLHef5d1oyrkBzyLWvq0mMY9jEF4cnGJttW5YirP2JcCrfRkoCBqHKlwPrfRegW6YPdjDZn X-Received: by 2002:a65:64d3:: with SMTP id t19-v6mr10357162pgv.148.1529313810926; Mon, 18 Jun 2018 02:23:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529313810; cv=none; d=google.com; s=arc-20160816; b=OCngEoDpCZtEc9szbHSRAZnpnySo4i1Xt0oKw2PhPeRel91RpwmZW84NdXm3OBT265 rYMN7fB6XSrtMOZpK1mcC43wcCzukfCtBFqS3CwzbjjduwYtYrKRkobEIbw6hmdyz7WF QgRKu+sbEJK3zeNeyCaWeNw4Q4g5KFZe/WvLeyHR2LKiR0T+kevPfnDZAWcF9ZW5a+ex vNWfHLxBK8UOKNSqZqUou35YfMzeDHzG6uvj55na56P/C4pXeq1QZ1P7Gpx5dXnqC9Ez 5V505lIqK7tsCYcit/uBgUD9yr9oby77fYAng6wXOQ5sze2IJDi6b0DSyzGEXOFjzg5Y WtBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:organization:from:references:to:subject:cc :arc-authentication-results; bh=ySuwlM3W/1YKdaH1Uduclq1OO5xaMmGTk5bq6CnxePg=; b=OAiDN8Mq9HXxxSOhFujMLZVt98uk3nsU0ZRseFJlefdT+8WHSQSpCYOIYNWVoU24zR svdBVEFVlZhulv83bRXWD/wLX42T377tRt7rJmTmYLDRrCA9PkkoiFAB07+CROolykK/ SwFcvXjLIguSHLVW1UId4/sybGxg782L0ZfXr10XGcqZJ5oWwQMJq0zjgS9SE977cSku 4GKWhnO0h0K20faXH18ZWP8hyKVcD4Ty69p1rliI8mCftTZUAg2sMNU/6ogq1Ul0PIN8 rLU7bQjW2J2/B7rXLi0g3S1XNvI9yxzmxFmYHWyXkawAQ2OuIik9Wpt69NmCxvIXHTbG yYNA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w2-v6si14909963ply.395.2018.06.18.02.23.17; Mon, 18 Jun 2018 02:23:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966636AbeFRJVv (ORCPT + 99 others); Mon, 18 Jun 2018 05:21:51 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:57968 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966708AbeFRJVr (ORCPT ); Mon, 18 Jun 2018 05:21:47 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id B0FE91596; Mon, 18 Jun 2018 02:21:46 -0700 (PDT) Received: from [10.1.210.28] (e107155-lin.cambridge.arm.com [10.1.210.28]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C20E63F25D; Mon, 18 Jun 2018 02:21:43 -0700 (PDT) Cc: Sudeep Holla , LKML , Linux PM list , "Rafael J. Wysocki" , Viresh Kumar , Stephen Boyd , Rajendra Nayak , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Rob Herring , Saravana Kannan Subject: Re: [PATCH v4 1/2] dt-bindings: cpufreq: Introduce QCOM CPUFREQ FW bindings To: Taniya Das , Amit Kucheria References: <1528801355-18719-1-git-send-email-tdas@codeaurora.org> <1528801355-18719-2-git-send-email-tdas@codeaurora.org> <0f3f0223-3539-dc66-5300-8f30d827445d@arm.com> <7abb2da6-c130-117a-5404-d07bb132d915@codeaurora.org> <32e8f874-a58b-8ba3-7a53-dc89cb34f7d9@codeaurora.org> From: Sudeep Holla Organization: ARM Message-ID: Date: Mon, 18 Jun 2018 10:21:41 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <32e8f874-a58b-8ba3-7a53-dc89cb34f7d9@codeaurora.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 15/06/18 18:40, Taniya Das wrote: > > > On 6/15/2018 5:29 PM, Amit Kucheria wrote: [...] >> A future version of the HW engine, or more likely, a firmware >> revision, will make more functionality available. Say, this needs >> access to another register or two. This will require changing the DT >> bindings. Instead, if you map the entire address space, you can just >> add offsets to the new registers. >> >> So in this case, I think you should define the following addresses >> (size 0x1400) for the two frequency domains >> >> 0x17d43000, 0x1400 (power cluster) >> 0x17d45800, 0x1400 (perf cluster) >> >> And in the driver simply add offsets as follows: >> >> #define ENABLE_OFFSET               0x0 >> #define LUT_OFFSET                      0x110 >> #define PERF_DESIRED_OFFSET 0x920 >> > > The offsets could vary across versions of this IP and that is the reason > to provide them through the DT and not define any such offsets. > Just get compatibles to identify the version of the hardware if it can't be probed and detected. Please don't use DT to get the addresses of each register you use in the driver. That's neither scalable nor nice solution to the problem. -- Regards, Sudeep