Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1901287imm; Tue, 22 May 2018 11:09:13 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpkKy2vieQL+wXjf8p3pmVkq1t0AhEf9RwnHBIJdqCJL6RmB3r2du1uCFEC5DW9YLzp6Wqy X-Received: by 2002:a65:5244:: with SMTP id q4-v6mr19748133pgp.201.1527012553050; Tue, 22 May 2018 11:09:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527012553; cv=none; d=google.com; s=arc-20160816; b=jfpZ6ubw0DzkZA/c+2S50flbo5PAmVc0igvbEPPOGPYDvEGha0D9sqeY1QyVK8r3Gm wk7qMHX7UrRWstQb6prxSPflBIpDAfebs+jovZZEFuH9rg7WOsDVrWTmuLYfoqaQmQ1q tfos0Rp78hbWOseILvGhVqTDhvKPYu3FPVJ7S2Kd1DbdgxrFiSTP7EaSqkiMCZq6zd2i sVPmHTE2WYOIQXNwuc6ptjLRegeUleJjbAqq9iSsq7ze3eYTgId+S93N0/Y2bQlXlvKI SelEuHWT4C3cll7Eo4ZMi5aDoVgT1LCyVCs4cf2E6f/rrvPqR/GQN9PuWKNU1Tf13V9w 4voQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=+Il4fnSsyxoxO+tgPUTakza1Jb4xJ7G9eSfrOK1YENE=; b=uVwVIljMhdznsyeSCqCVWBNbzWXBjv5+mxNnzPgVyByoichESGOVVxF2oXVFzEmSQC 75+KYe2FC0oBIyyggASONwEE6FULymBVINTaeHla7e/h+IFyaHC10CKyno42kWyX23EV v75qisSBqGqgkWbLzBrzdS/d+6/iII9c1BEFaA1f+Coak7Xas+G1ZHOVZkqUPcMZKP9/ S3BnNwuOPcJwbNBZBJo4dU3Hr2an1QBH/12HfQBkOVXo1vuIo2FAAvcuc89pW87RMXjc Gk7eD/qoMTRLq7xJeN7VphVJ7Y1q8zY8WCk8VD2shQ0TbU7Tsq6oizvfA0u8klJKL5pr UASw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m11-v6si16557751pls.497.2018.05.22.11.08.53; Tue, 22 May 2018 11:09:13 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751443AbeEVSIm (ORCPT + 99 others); Tue, 22 May 2018 14:08:42 -0400 Received: from mail-yw0-f195.google.com ([209.85.161.195]:44035 "EHLO mail-yw0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751278AbeEVSIk (ORCPT ); Tue, 22 May 2018 14:08:40 -0400 Received: by mail-yw0-f195.google.com with SMTP id l142-v6so5833670ywc.11; Tue, 22 May 2018 11:08:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=+Il4fnSsyxoxO+tgPUTakza1Jb4xJ7G9eSfrOK1YENE=; b=JZPdO8c764iFsvNkpR2QIoc+pRIPZ8pIGWL9j76+62wIxwJEB6y0ApkPWDRUknEpwR 1W29ycxLC+KSYYaKwIeeOAIN4sbkH+4oHZAgSOk7QjUX6gFB4vk6lvKN9ehnTecULLVa 2S7IdxGdcjjEASO+KItwGZ3ptUs3l4CP7OMKdwYsAV3J5nRov0rz8oujHWyTlY2glgp8 5Pd3qrw7aVve8yfMIT9axbRgOlNIQS0ycRAfF3StG3xE58RsksO8QSlgEtXtbJBvO6sW L0XKHr5/1WLmgBnEhE2SE0EOd+LrIjUmzHcv36ID5uCtg+I7p1G7qC0WYLBHFjHqbILv 35gQ== X-Gm-Message-State: ALKqPwdRkbVhNGxBeHttJDAQbn+FtDxEpNzRR7tVid/F9GMRjpAeSaaH G+bX4k4nHvCOJMu1W0c84g== X-Received: by 2002:a0d:e401:: with SMTP id n1-v6mr65814ywe.478.1527012519857; Tue, 22 May 2018 11:08:39 -0700 (PDT) Received: from localhost (24-223-123-72.static.usa-companies.net. [24.223.123.72]) by smtp.gmail.com with ESMTPSA id l207-v6sm7149571ywc.43.2018.05.22.11.08.39 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 22 May 2018 11:08:39 -0700 (PDT) Date: Tue, 22 May 2018 13:08:38 -0500 From: Rob Herring To: Saravana Kannan Cc: MyungJoo Ham , Kyungmin Park , Chanwoo Choi , Mark Rutland , Rajendra Nayak , Amit Kucheria , linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] PM / devfreq: Add support for QCOM devfreq firmware Message-ID: <20180522180838.GA13423@rob-hp-laptop> References: <1526629965-28729-1-git-send-email-skannan@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1526629965-28729-1-git-send-email-skannan@codeaurora.org> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 18, 2018 at 12:52:40AM -0700, Saravana Kannan wrote: > The firmware present in some QCOM chipsets offloads the steps necessary for > changing the frequency of some devices (Eg: L3). This driver implements the > devfreq interface for this firmware so that various governors could be used > to scale the frequency of these devices. > > Each client (say cluster 0 and cluster 1) that wants to vote for a > particular device's frequency (say, L3 frequency) is represented as a > separate voter device (qcom,devfreq-fw-voter) that's a child of the > firmware device (qcom,devfreq-fw). > > Signed-off-by: Saravana Kannan > --- > .../bindings/devfreq/devfreq-qcom-fw.txt | 41 +++ > drivers/devfreq/Kconfig | 14 + > drivers/devfreq/Makefile | 1 + > drivers/devfreq/devfreq_qcom_fw.c | 330 +++++++++++++++++++++ > 4 files changed, 386 insertions(+) > create mode 100644 Documentation/devicetree/bindings/devfreq/devfreq-qcom-fw.txt > create mode 100644 drivers/devfreq/devfreq_qcom_fw.c > > diff --git a/Documentation/devicetree/bindings/devfreq/devfreq-qcom-fw.txt b/Documentation/devicetree/bindings/devfreq/devfreq-qcom-fw.txt > new file mode 100644 > index 0000000..f882a0b > --- /dev/null > +++ b/Documentation/devicetree/bindings/devfreq/devfreq-qcom-fw.txt > @@ -0,0 +1,41 @@ > +QCOM Devfreq firmware device > + > +Some Qualcomm Technologies, Inc. (QTI) chipsets have a firmware that > +offloads the steps for frequency switching. It provides a table of > +supported frequencies and a register to request one of the supported > +freqencies. > + > +The qcom,devfreq-fw represents this firmware as a device. Sometimes, > +multiple entities want to vote on the frequency request that is sent to the > +firmware. The qcom,devfreq-fw-voter represents these voters as child > +devices of the corresponding qcom,devfreq-fw device. > + > +Required properties: > +- compatible: Must be "qcom,devfreq-fw" or "qcom,devfreq-fw-voter" No versions of firmware? > +Only for qcom,devfreq-fw: > +- reg: Pairs of physical base addresses and region sizes of > + memory mapped registers. Registers? Is this firmware or h/w block? > +- reg-names: Names of the bases for the above registers. > + Required register regions are: > + - "en-base": address of register to check if the > + firmware is enabled. > + - "ftbl-base": address region for the frequency > + table. > + - "perf-base": address of register to request a > + frequency. > + > +Example: > + > + qcom,devfreq-l3 { > + compatible = "qcom,devfreq-fw"; > + reg-names = "en-base", "ftbl-base", "perf-base"; > + reg = <0x18321000 0x4>, <0x18321110 0x600>, <0x18321920 0x4>; > + > + qcom,cpu0-l3 { > + compatible = "qcom,devfreq-fw-voter"; There's no point in these nodes. They don't have any properties or resources. > + }; > + > + qcom,cpu4-l3 { > + compatible = "qcom,devfreq-fw-voter"; > + }; > + };