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=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no 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 ECF89C28CBC for ; Sun, 3 May 2020 15:02:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D0AF82073E for ; Sun, 3 May 2020 15:02:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728718AbgECPBs (ORCPT ); Sun, 3 May 2020 11:01:48 -0400 Received: from muru.com ([72.249.23.125]:52668 "EHLO muru.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728002AbgECPBs (ORCPT ); Sun, 3 May 2020 11:01:48 -0400 Received: from atomide.com (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id 5955480BF; Sun, 3 May 2020 15:02:34 +0000 (UTC) Date: Sun, 3 May 2020 08:01:43 -0700 From: Tony Lindgren To: Paul Cercueil Cc: "H. Nikolaus Schaller" , David Airlie , Daniel Vetter , Rob Herring , Mark Rutland , =?utf-8?Q?Beno=C3=AEt?= Cousson , Ralf Baechle , Paul Burton , James Hogan , Kukjin Kim , Krzysztof Kozlowski , Maxime Ripard , Chen-Yu Tsai , Thomas Bogendoerfer , Jonathan Bakker , Philipp Rossak , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, openpvrsgx-devgroup@letux.org, letux-kernel@openphoenux.org, kernel@pyra-handheld.com, linux-mips@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org Subject: Re: [PATCH v7 01/12] dt-bindings: add img,pvrsgx.yaml for Imagination GPUs Message-ID: <20200503150143.GG37466@atomide.com> References: <3a451e360fed84bc40287678b4d6be13821cfbc0.1587760454.git.hns@goldelico.com> <28138EC0-0FA5-4F97-B528-3442BF087C7A@goldelico.com> <3D8B59D6-83E3-4FE6-9C99-E2E5616A8139@goldelico.com> <8EER9Q.C206SXNSICP7@crapouillou.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8EER9Q.C206SXNSICP7@crapouillou.net> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org * Paul Cercueil [200503 14:19]: > You have a new SoC with a SGX, and you only need to enable one clock to get > it to work. So you create a devicetree node which receives only one clock. > > Turns out, that the bootloader was enabling the other 3 clocks, and since > the last release, it doesn't anymore. You're left with having to support a > broken devicetree. > > That's the kind of problem that can be easily avoided by enforcing the > number of clocks that have to be provided. The number of clocks depends on how it's wired for the SoC. On omaps, there's are no controls for additinoal SGX clocks. Sure some of the clocks may be routed to multple places internally by the wrapper module. But we have no control over that. If we wanted to specify just the "fck" clock on omaps, then we can do it with something like this: allOf: - if: properites: compatible: enum: - "ti,omap4-sgx544-112" - "ti,omap5-sgx544-116" - "ti,dra7-sgx544-116" then: properties: clocks: minItems: 1 maxItems: 1 clock-names: const: fck required: - clocks - clock-names There's no need for the SGX driver to toggle the "fck" here, it's all done by PM runtime alreaedy so we would be just tweaking the usage count for it. But hey, showing the clock rate might be nice. Or maybe we want to at some point scale it, so no problem specifying it. For omap3, we should then specify "fck" and "ick". On omap4 and later, there's no separate control over the "ick". Then for the other SoCs, you can specify whatever clocks you need there. Regards, Tony