Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp2449754ybl; Thu, 9 Jan 2020 13:00:49 -0800 (PST) X-Google-Smtp-Source: APXvYqxQqSU6IY2J48w5JO4l/PAJ+tpWbWzOol2nvyBBbv+8hkiQCGKhjNVeYw5Bz7da0iQt61xl X-Received: by 2002:aca:a883:: with SMTP id r125mr5062551oie.56.1578603649824; Thu, 09 Jan 2020 13:00:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578603649; cv=none; d=google.com; s=arc-20160816; b=VJPaMpbXk+TmELADKbGN0nfGSrSkzTHVM2ipS50aOThvyOnkzzInvhyrZuyfgj1zlM OEGxidIP9Y6nnaFd4D8rnh55kVzaIV6nRxojfnf95lXFLbNzRqqccrJr+ZsEdKEgLObo T4pD3zsuoegHjMHXZegqAmY7iAS2FLfZvDLi6RpgcQB2FPaCZSoQnH5E6X2IvWBgm75p 7e+Xcv3Itj9vtpCbs5C9yG+2Ghn43JK0QT9cerjNvkn70NjzZ0Y/5ZVQyMWsvNv1rZyQ wu2Y+Xm3La4wyMQntv2v0y0RwVpHHmv/PaU/MRRZIkUCff4BI/1pPvHxwxjd9jGetoVK Akew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=jpb2Egt8UMiMahOxchyDZq0Q4lbWN+FysXiH4AGPGAg=; b=qC0k0E7SJL/ioBX9kQLDnbyS8OeGyYaGCmcN83uyiCYJ7HlSWZGzEGCj4EwrDxg5op BVzbGeHtoqBr3Bs+2gbM2LUX4Xl980IAQCZh+CeMNV2+NWfuN7aIRflEnzh4o/pieadI auiUKDokJaaoZ+CVXSVGCdmN4PkzVHVQXkswvcm2PikxmM8HVpL5RUKde3NtZJeXrReD cXpK7s7UhEB7rII6meeyQ+ZGFBY596tYvfLJikS9/eA4O80X4pL9miWZR8hx0b6hvLbh JzQB5dOozzBds/lEwRYkJ/S3tTnUGJb+TrChIVo72HRgg4x/3weX/rFbU71ckKuVq/W4 5fxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=2CosUSQh; 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=pass (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 m3si4664057otf.42.2020.01.09.13.00.38; Thu, 09 Jan 2020 13:00:49 -0800 (PST) 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; dkim=pass header.i=@kernel.org header.s=default header.b=2CosUSQh; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387935AbgAIQ4p (ORCPT + 99 others); Thu, 9 Jan 2020 11:56:45 -0500 Received: from mail.kernel.org ([198.145.29.99]:59922 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731320AbgAIQ4n (ORCPT ); Thu, 9 Jan 2020 11:56:43 -0500 Received: from mail-qk1-f178.google.com (mail-qk1-f178.google.com [209.85.222.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8C9EA2075D; Thu, 9 Jan 2020 16:56:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578589002; bh=9oyg27saFaqgN0kNufIh+bWG6/4Iwy6kaQ1n0BzczVk=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=2CosUSQhDeszdClob89wkM5qUuLn+NGmxavbwwJtOjFrz9J9rb5rJcMgFQI1xDAQ4 fUXa0Ef1aePHujZvmpoUW/06Em/BF7VVOjDi5q5fkKIAJuUjWK6nHJS6vh0B+JXDfJ atgBkzj5WtLXXdJkwB2Qpsf8KlWlFaaxn/mc4FF0= Received: by mail-qk1-f178.google.com with SMTP id r14so6552712qke.13; Thu, 09 Jan 2020 08:56:42 -0800 (PST) X-Gm-Message-State: APjAAAWloDLS5fQEZE4v7aOsCtA5Rup0GXo5SQg8RtAKLM93Amf5aA4m vCrzxnTi1CKTJIrJyR7rKHx71dJPQ1VRecow0A== X-Received: by 2002:a05:620a:1eb:: with SMTP id x11mr10791122qkn.254.1578589001636; Thu, 09 Jan 2020 08:56:41 -0800 (PST) MIME-Version: 1.0 References: <20200108052337.65916-1-drinkcat@chromium.org> <20200108052337.65916-5-drinkcat@chromium.org> <20200108132302.GA3817@sirena.org.uk> In-Reply-To: From: Rob Herring Date: Thu, 9 Jan 2020 10:56:29 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 4/7] drm/panfrost: Add support for a second regulator for the GPU To: Nicolas Boichat Cc: Mark Brown , David Airlie , Daniel Vetter , Mark Rutland , Matthias Brugger , Tomeu Vizoso , Steven Price , Alyssa Rosenzweig , Liam Girdwood , dri-devel , Devicetree List , lkml , linux-arm Mailing List , "moderated list:ARM/Mediatek SoC support" , Hsin-Yi Wang Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 8, 2020 at 4:52 PM Nicolas Boichat wrote: > > On Wed, Jan 8, 2020 at 9:23 PM Mark Brown wrote: > > > > On Wed, Jan 08, 2020 at 01:23:34PM +0800, Nicolas Boichat wrote: > > > > > Some GPUs, namely, the bifrost/g72 part on MT8183, have a second > > > regulator for their SRAM, let's add support for that. > > > > > + pfdev->regulator_sram = devm_regulator_get_optional(pfdev->dev, "sram"); > > > + if (IS_ERR(pfdev->regulator_sram)) { > > > > This supply is required for the devices that need it so I'd therefore > > expect the driver to request the supply non-optionally based on the > > compatible string rather than just hoping that a missing regulator isn't > > important. > > That'd be a bit awkward to match, though... Currently all bifrost > share the same compatible "arm,mali-bifrost", and it'd seem > weird/wrong to match "mediatek,mt8183-mali" in this driver? I have no > idea if any other Mali implementation will require a second regulator, > but with the MT8183 we do need it, see below. The current number of supported bifrost platforms is 0. It's only a matter of time until SoC specific compatibles need to be used in the driver. This is why we require them. It could very well be that all bifrost implementations need 2 supplies. On chip RAMs are very frequently a separate thing which are synthesized differently from logic. At least within a specific IP model, I somewhat doubt there's a variable number of supplies. It could be possible to connect both to the same supply, but the correct way to handle that is both -supply properties point to the same regulator. Rob