Received: by 10.192.165.156 with SMTP id m28csp1469943imm; Mon, 16 Apr 2018 23:03:08 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/Oj5ZFAArpwnfWVbklOvZpUaxaQCFX0IGRTgwboQ0iJ+MIIKyCr5mn96uc9RJId+OY2w5d X-Received: by 10.101.97.15 with SMTP id z15mr690272pgu.393.1523944988349; Mon, 16 Apr 2018 23:03:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523944988; cv=none; d=google.com; s=arc-20160816; b=wT9EfBGclaxIDQWtzVTLszZOgan5soLRz5WIfSYebI6/14aA5QOCcCzYcTFtIaOCEJ 77nRjmn0kNA6Xzi5471bExZo9ItRCvUKn146rgOIk7L+pVB6uJ6VdAP3PtNLL71W6lbk D5wdgtmlBQvuZiy7lPYiLlCLOKvQbfn4rd9XM2CAHjqZZLywae7kKEHUS6eeo1Bj8cMm A1iuF5bNfQt6RDC7LJzUVIJGpnd4O//wA6eG8sORdzQzFENCyXbzAXlXGHWcDX2X+B1k KDFynIDAgeZE3urkFpAUlcna9NcaS6jGH/irZcPAXMLna+zo+sDJ4OraXbLwI1UoHXLU XGWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:subject:user-agent:message-id :references:cc:in-reply-to:from:to:content-transfer-encoding :mime-version:dkim-signature:arc-authentication-results; bh=+7tXyvqNWQEmI6lN1WfnYQpWFIINlYk42Tdr7kOvSVY=; b=JsT+yqX78sF3aObS30bDV1Ori7mN0rpw5Xs5x0zsEpDp2zy/rhBevaplSWLn+FUgRq L8+BX7hIGDLEvGHgwGlPwx2WWg9hVqv+2SE2Hemq3Pfu6q7tdggSZuMPKO6r0gO1grDI PQSURuyBhoo3PPBjAmjOEh826ldCH7xj8lQTfsPpJ8p3B07BJmQ6dA7aqwWAtd3yiWE8 EMoLzgYXhSdGtkbWoQM7IH15G4xt+GcCHrJpBwBtSRbtE5aS+AozD3XFsjHMp33KoJ7b h8gx/r9OU0jFNvWP4O6h6SVblgbrf6cDP4zLMzzVVX6u02KJCiPyqbNsaef/KlWiXLQl HaLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Lq1bjc0J; 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=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v14si11127519pgq.266.2018.04.16.23.02.53; Mon, 16 Apr 2018 23:03:08 -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; dkim=pass header.i=@chromium.org header.s=google header.b=Lq1bjc0J; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751211AbeDQGBs (ORCPT + 99 others); Tue, 17 Apr 2018 02:01:48 -0400 Received: from mail-pf0-f173.google.com ([209.85.192.173]:42717 "EHLO mail-pf0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750988AbeDQGBp (ORCPT ); Tue, 17 Apr 2018 02:01:45 -0400 Received: by mail-pf0-f173.google.com with SMTP id o16so11653161pfk.9 for ; Mon, 16 Apr 2018 23:01:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:content-transfer-encoding:to:from:in-reply-to:cc :references:message-id:user-agent:subject:date; bh=+7tXyvqNWQEmI6lN1WfnYQpWFIINlYk42Tdr7kOvSVY=; b=Lq1bjc0JHsxEBk7olhmjgxAlpv121RvNmT5YaqvAjTKVT6ZLsfSE8q9GUzR5WEaiOX mGaQUg6KlwUldNYa8vQvo7qYxO2U7gG6XvCK2cEqvThWqFrflAW7OW3473DO7CyPB5lJ A/A473TAmY1vFYtE7gGg4bxDwr7N2vpsoQtAk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:content-transfer-encoding:to:from :in-reply-to:cc:references:message-id:user-agent:subject:date; bh=+7tXyvqNWQEmI6lN1WfnYQpWFIINlYk42Tdr7kOvSVY=; b=b5r0KmXH6ZiI4FJoEOvnFpkZuPFc4DbtiIPK0z0jnaSqrOnQht90rfFE5XrY1lKaxj rncYaCz26UiFrCfM9jS8nKjBUfXgTtk7SRL76yCTnfz5AfzysU4W+MjWsA0mevWnf2lC 3PCbc5SOMPVbcki7xBwmt/PV2gEjHvwuMoUAid7JFPSJ8VBHtT4Wov6yypv3+Yrk3J5G iD56d4zNQ5wXppx+JXKDUDyhOZwhJ3cjmh2CuSO3BxgR9VDnS/T7N1G4TML0yR1NU81N vmQwWV1f9XTKplh1Ty9tuNcY/aOAYNtKXu14is8DY6GcDXD7NOvHGwVaY5qD392mNIrt Eh5w== X-Gm-Message-State: ALQs6tCCGTJcA9SQbUY+2/NPDps4VesSoKb+bLxuuCRp31mb+Gs500uw XVRe0ffm3S2Pmv1AVCdKxxcp0g== X-Received: by 10.99.119.206 with SMTP id s197mr696583pgc.272.1523944905022; Mon, 16 Apr 2018 23:01:45 -0700 (PDT) Received: from localhost ([2620:0:1000:1511:d30e:62c6:f82c:ff40]) by smtp.gmail.com with ESMTPSA id e190sm25443910pfe.171.2018.04.16.23.01.44 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 16 Apr 2018 23:01:44 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable To: Lina Iyer From: Stephen Boyd In-Reply-To: <20180416160818.GC1209@codeaurora.org> Cc: andy.gross@linaro.org, david.brown@linaro.org, linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org, rnayak@codeaurora.org, bjorn.andersson@linaro.org, linux-kernel@vger.kernel.org, evgreen@chromium.org, dianders@chromium.org, devicetree@vger.kernel.org References: <20180405161834.3850-1-ilina@codeaurora.org> <20180405161834.3850-3-ilina@codeaurora.org> <152306368031.94378.14957212064809086345@swboyd.mtv.corp.google.com> <20180409160800.GC19682@codeaurora.org> <152346054406.180276.4468371342222361883@swboyd.mtv.corp.google.com> <20180411212431.GG19682@codeaurora.org> <152365923361.51482.7839380101584600308@swboyd.mtv.corp.google.com> <20180416160818.GC1209@codeaurora.org> Message-ID: <152394490349.51482.12712738252386761377@swboyd.mtv.corp.google.com> User-Agent: alot/0.7 Subject: Re: [PATCH v5 02/10] dt-bindings: introduce RPMH RSC bindings for Qualcomm SoCs Date: Mon, 16 Apr 2018 23:01:43 -0700 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Lina Iyer (2018-04-16 09:08:18) > On Fri, Apr 13 2018 at 16:40 -0600, Stephen Boyd wrote: > >Well it seems like an RSC contains many DRVs and those DRVs contain many > >TCSes. This is what I get after talking with Bjorn on IRC. > > > > +--------------------------------------------------+ (0x00000) > > | | > > | DRV #0 | > > | | > > |---------- --------------| (tcs-offset = (0xd00)) > > | DRV0_TCS0 | > > | common space | > > | cmd sequencer | 0xd00 + 0x14 > > | | > > | DRV0_TCS1 | > > | common space | 0xd00 + 0x2a0 > > | cmd sequencer | 0xd00 + 0x2a= 0 + 0x14 > > | | > > | DRV0_TCS2 | > > | | > > | | > > +--------------------------------------------------+ (0x10000) > > | | > > | DRV #1 | > > | | > > |---------- --------------| (tcs-offset) > > | DRV1_TCS0 | > > | DRV1_TCS1 | > > | DRV1_TCS2 | > > +--------------------------------------------------+ (0x20000) > > | | > > | DRV #2 | > > | | > > |---------- --------------| > > | DRV2_TCS0 | > > | DRV2_TCS1 | > > | DRV2_TCS2 | > > | DRV2_TCS3 | > > | DRV2_TCS4 | > > | DRV2_TCS5 | > > +--------------------------------------------------+ > > > >I think I understand it now. There aren't any "RSC common" registers > >that are common to the entire RSC. Instead, everything goes into a DRV, > >or into a common TCS space, or into a TCS "queue". > > > >> >Put another way, even if the "apps" RSC is complicated, we should be > >> >describing it to the best of our abilities in the binding so that when > >> >it is used by non-linux OSes things still work by simply tweaking the > >> >drv-id that we use to pick the right things out of the node. > >> > > >> >Or we're describing the RSC but it's really a container node that > >> >doesn't do much besides hold DRVs? So this is described at the wrong > >> >level? > >> What we are describing is a DRV, but a standalone DRV alone is useless > >> without the necessary RSC registers. So its a unique RSC+DRV combinati= on > >> that is represented here. > >> > > > >If my understanding is correct up there then the binding could either > >describe a single RSC DRV, or it could describe all the RSC DRV > >instances and interrupts going into the RSC "block" and then we can use > >drv-id to pick the offset we jump to. > > > Your understanding is correct. > = > >I imagine we don't have any practical use-case for the entire RSC space > >because there aren't any common RSC registers to deal with. > Not true. So then my understanding is not correct! :/ > = > >So we've > >boiled this all down to describing one DRV and then I wonder why we care > >about having drv-id at all? It looks to be used to check for a max > >number of TCS, but that's already described by DT so it doesn't seem > >very useful to double check what the hardware can tells us. > > > There is also a number of commands per TCS (NCPT), that may way vary > between different RSCs. The RSC of the application processor has 16 > commands in each TCS, but that is variable. I am not saying it cannot be > described in DT, but it is something I read from the common RSC > registers, currently. > Also, I will using common/DRV0 registers to write wakeup time value, > when the processor subsystem goes into power down. This is not DRV2 > register, but is a DRV0 register that we will have special access to. > The patches for those I intend to publish, when we have support for > sleep/suspend with this new architecture. So the address of the start of > the RSC (=3DDRV0) is necessary. > = > >Long story short, we can remove drv-id and just describe drvs by > >themselves? > Yes, we may. As long as I have a way to describe the register addresss > of the start of the DRV (0x20000 for DRV#2) and the tcs-offset (0xd00), > we can work with the RSC-DRV in the driver. > = From=20this new information it seems like we need to know about all the DRVs in the RSC then. So let's go back to my previous binding proposal describing all of them and having the qcom,drv-id property describe which one to use most of the time and hardcode the assumption to use DRV0 in the driver when we need to do things for sleep/suspend? Then we're back to describing the whole RSC and configuring the picker to pick the right DRV depending on firmware configuration.