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 X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_DKIMWL_WL_HIGH autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5A9A6C4321A for ; Mon, 10 Jun 2019 23:48:49 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 2E6FA206C3 for ; Mon, 10 Jun 2019 23:48:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ksYcZrXK"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="m9+B2HLD" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2E6FA206C3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Message-Id:Date:To:Subject:From: References:In-Reply-To:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=EJkgxq9sI5Mb81YSF8PQNrq0Mpbe5q1Zrn8BEtgLGXM=; b=ksYcZrXK+8QwS+ JF6xNdAYpqQthL98YHM+pfJI2HnV3yReQKHHxdVZZFbtP6PeyuVZuyJb2xEBbnLz+TY3Ty0Z2JZzL bEE/EnnL9RaMLb8Lk1GNNJYMxlGzQKDOBZ+KvJrX1/6TwHueQVrWJw1p3czbKYnU8fb5V+dwPXLJx YDv1mS5VmPoYWrXTjGkXIicnEgvWP1Pf4YOFO9AgxYz2BP67adBWw6tx07GjQAU8KbtYjFnvx4/Co RPDV4Uomkkj7AGiHer2aYAUoK15CPNiVyCfWO/F0khxsR0ttrovkaTfxQhT7cr1ayLt34xit9vyZ1 L3+tsPC6+wy2f4rZB3AA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1haU1w-000145-I6; Mon, 10 Jun 2019 23:48:48 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1haU1t-00013X-Jc for linux-arm-kernel@lists.infradead.org; Mon, 10 Jun 2019 23:48:46 +0000 Received: from kernel.org (unknown [104.132.0.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id CC289206C3; Mon, 10 Jun 2019 23:48:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1560210524; bh=72gAQp6W+mB42Owmu65aph68iaCWcwF69xAsJoCk818=; h=In-Reply-To:References:From:Cc:Subject:To:Date:From; b=m9+B2HLDSuwzf1/BR+YsFuY5vV0CzkU7xlGpUQv9GqHMTKKQSCoi64iopdgJidRIt 1t5ny+47b5u70b/lsK0mQzQ5SpZ/+DA6Sr4DRnz45ROxuLbaQSSNOObaijhg3oGvrr wpFEZGnlWxtrMlkLWxbZViM6Ht4yBcSBJhJxu53Q= MIME-Version: 1.0 In-Reply-To: References: <20190606031526.xknv5qdoqufim6tr@vireshk-i7> From: Stephen Boyd Subject: Re: [RFC] devfreq: Add generic devfreq-dt driver To: Leonard Crestez , Viresh Kumar User-Agent: alot/0.8.1 Date: Mon, 10 Jun 2019 16:48:44 -0700 Message-Id: <20190610234844.CC289206C3@mail.kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190610_164845_683807_8ED69CC2 X-CRM114-Status: GOOD ( 15.15 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Aisheng Dong , Jacky Bai , Anson Huang , "linux-pm@vger.kernel.org" , Michael Turquette , "Rafael J. Wysocki" , Krzysztof Kozlowski , "linux-clk@vger.kernel.org" , Chanwoo Choi , Kyungmin Park , MyungJoo Ham , Alexandre Bailon , "kernel@pengutronix.de" , Fabio Estevam , Shawn Guo , Georgi Djakov , "linux-arm-kernel@lists.infradead.org" , dl-linux-imx Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Quoting Leonard Crestez (2019-06-10 15:13:19) > On 6/6/2019 6:15 AM, Viresh Kumar wrote: > > On 05-06-19, 15:31, Leonard Crestez wrote: > >> +static const struct of_device_id devfreq_dt_of_match[] = { > >> + { .compatible = "generic-devfreq", }, > >> + { /* sentinel */ }, > >> +}; > >> +MODULE_DEVICE_TABLE(of, devfreq_dt_of_match); > > > > DT can't contain nodes for any virtual devices, this will have similar > > problems to cpufreq-dt. How is this driver going to get probed ? Who > > will create the device ? > > CPUs are special devices, I'm not sure the same issues apply here. > > If a SOC has multiple buses or frequency domains which can be scaled up > and down then those can be treated as "real" devices and probing them > from DT seems entirely reasonable. DT could look like this: > > + noc1 { > + compatible = "fsl,imx8mm-noc", "generic-devfreq"; > + clocks = <&clk IMX8MM_CLK_NOC1>; > + operating-points-v2 = <&noc1_opp_table>; > + }; > + > + noc1_opp_table: noc1-opp-table { > + compatible = "operating-points-v2"; > + > + opp-150M { > + opp-hz = /bits/ 64 <150000000>; > + }; > + opp-750M { > + opp-hz = /bits/ 64 <750000000>; > + }; > + }; > > Instead of a "generic-devfreq" fallback the compatible list of > devfreq-dt could contain a large number of unrelated compat strings. > This would be vaguely similar to the white/black lists from cpufreq-dt-plat. This still looks very much "virtual" because the NoC node doesn't have a 'reg' property. Is there anything the driver will do besides change the frequency of the clk based on the OPP table? If not, then it still looks like this is a node for the sake of making devfreq happy to probe via DT. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel