Received: by 2002:a25:b323:0:0:0:0:0 with SMTP id l35csp2529177ybj; Mon, 23 Sep 2019 05:29:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqxySFcHiuv0MAUu7nbdfnc2XBHhVayabCLnuasxOdpF487OsoIvtaUwzBBuh27ATN1eQrz8 X-Received: by 2002:a17:906:3e96:: with SMTP id a22mr14212417ejj.268.1569241757869; Mon, 23 Sep 2019 05:29:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569241757; cv=none; d=google.com; s=arc-20160816; b=M3GU1GbeKrDREhUzzyORCSxtehA6xAc2nTMJou2Two1GkQ7/9CFW/KF6errdjZd7f3 UrVdgbr6Snd5QCSyBQmoD48hdqZHz0owmbtIyiHzYi2OUmZDxBp8LU/wrX4D1f5JUJ9i yGpLPXm+//VGPrnjVyzkvPKrgpmT1j9hFBexH+X6E1jLqvie3XmYtspNbApyD9XS5J9m FaCydc10o3HdXbpFu0hZLJt9kCFgyrraza8+l6Qf8Emvb+ZdLuDzJxlRjuYPl26FjyzF 2adzlujxXAbjxq/f/X3r+UR1UxB2HL0hPQw872o0+svtlDeTlpV2lZvYbsxlmCYMt2O8 c+KQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:user-agent:subject:from:to:cc :references:in-reply-to:content-transfer-encoding:mime-version :message-id:dkim-signature; bh=G6ArsEBvUBRFvndBKzVZmq8gvZ8T+N7qYPjPD+3Z5yo=; b=zLU0NIkA5F6y0Qf2DHDY8Q+bB3d+/F3fbzVSyNLlO8HhcDfANna/6gHRbONoMm8tH7 KdS4xddRiiuflCvW8Bq0WABymTHYALGnAX17d3G+KQmBA8shHbCet1CMN105fR+eiD/M mOrJJNhxrGedcAxSz4ZXpSmo5qhJF+h2By88rb2LnuMf/160erSzZaiTwpJ4TMK+nyMf lL8Oy4OuTYTUv0HOjZwGF/Femais8SdZa7vZ8U6BdcHdVjb9/t9TJrb8uvGBDzrhfvZr ZWaJETd6WccDHjn4N8fVflM34t1h+ue6yHl1ht7+S/SgDRvKU5ZHHLQqCSbM2O88pNt9 8+Aw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=nRlHbGH5; 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 u3si6029797edy.48.2019.09.23.05.28.52; Mon, 23 Sep 2019 05:29:17 -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=nRlHbGH5; 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 S2390897AbfITWU2 (ORCPT + 99 others); Fri, 20 Sep 2019 18:20:28 -0400 Received: from mail-pl1-f194.google.com ([209.85.214.194]:37445 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726368AbfITWU2 (ORCPT ); Fri, 20 Sep 2019 18:20:28 -0400 Received: by mail-pl1-f194.google.com with SMTP id b10so3832350plr.4 for ; Fri, 20 Sep 2019 15:20:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=message-id:mime-version:content-transfer-encoding:in-reply-to :references:cc:to:from:subject:user-agent:date; bh=G6ArsEBvUBRFvndBKzVZmq8gvZ8T+N7qYPjPD+3Z5yo=; b=nRlHbGH5wNwG5+TmN8Kv4+cFBbowXlpJ1u8t4kt1EkGEUblzPAiKYRS3o8mTTeSuWK jiQgSAlVukgSn/p9gKZzwOy0fFtmRQdU3027Bytif2lW1DugSKor9x03okTp0yc2RCXH +AUJjbXZcdcM1CTFdNGGh1ksWA14j1kdNkTgE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:mime-version :content-transfer-encoding:in-reply-to:references:cc:to:from:subject :user-agent:date; bh=G6ArsEBvUBRFvndBKzVZmq8gvZ8T+N7qYPjPD+3Z5yo=; b=mvmuPrhM1n1VJ5TxGkcYa8ezY/wg9cBmCxTPJFt7bPjQ/G3P/PwLm+8ci/P3asR96g O+cMgQhAH1yG2KH4WrDZxCZKvK1RaCrYig+Yc5oJG3vUkWvm2M3zztxogoAIgEwCvx1o kk7uyUfKyXffgpnzmMeH+uXSBCDCg0qYU4HBYYHFQSskg+Kcrkv2l4mzfSHd216uEoHM VPcHtqNgpD11BEeSU6lcizYBF8ke0OQAOLyP6S0RLsK7lyVJMtau9yrUcouYKjSYZDqp Qyi4V8vVRGQYSk0MtD/MFCCmXnYXhfj3zgRNhxNIC9x+yEh1eqxaqb+Q1ha1HRFBGuIA rHHQ== X-Gm-Message-State: APjAAAWdwQ7bFVbDqL0r2ev9NyfcTxnyVDG91Fpx/NzPTEFfZoy7U715 A5s+zK/vrjnZyvywQ59VWfz7VQ== X-Received: by 2002:a17:902:a9c7:: with SMTP id b7mr19438785plr.133.1569018027798; Fri, 20 Sep 2019 15:20:27 -0700 (PDT) Received: from chromium.org ([2620:15c:202:1:fa53:7765:582b:82b9]) by smtp.gmail.com with ESMTPSA id p88sm3152333pjp.22.2019.09.20.15.20.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Sep 2019 15:20:26 -0700 (PDT) Message-ID: <5d8550aa.1c69fb81.39edc.83fc@mx.google.com> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: <20190917215020.GA15853@codeaurora.org> References: <20190829181203.2660-1-ilina@codeaurora.org> <20190829181203.2660-6-ilina@codeaurora.org> <5d6d1b72.1c69fb81.ee88.efcf@mx.google.com> <102c9268-c4ce-6133-3b0a-67c2fcba1e7a@arm.com> <20190903170722.GA31716@codeaurora.org> <5d71a247.1c69fb81.2146f.7ed2@mx.google.com> <20190913195326.GA3293@codeaurora.org> <20190917215020.GA15853@codeaurora.org> Cc: Rob Herring , evgreen@chromium.org, linus.walleij@linaro.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, bjorn.andersson@linaro.org, mkshah@codeaurora.org, linux-gpio@vger.kernel.org, rnayak@codeaurora.org, devicetree@vger.kernel.org, maz@kernel.org, sibis@codeaurora.org To: Lina Iyer From: Stephen Boyd Subject: Re: [PATCH RFC 05/14] dt-bindings/interrupt-controller: pdc: add SPI config register User-Agent: alot/0.8.1 Date: Fri, 20 Sep 2019 15:20:25 -0700 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Lina Iyer (2019-09-17 14:50:20) > On Fri, Sep 13 2019 at 13:53 -0600, Lina Iyer wrote: > >On Thu, Sep 05 2019 at 18:03 -0600, Stephen Boyd wrote: > >>Quoting Lina Iyer (2019-09-03 10:07:22) > >>>On Mon, Sep 02 2019 at 07:58 -0600, Marc Zyngier wrote: > >>>>On 02/09/2019 14:38, Rob Herring wrote: > >>>>> On Thu, Aug 29, 2019 at 12:11:54PM -0600, Lina Iyer wrote: > >>>These are not GIC registers but located on the PDC interface to the GI= C. > >>>They may or may not be secure access controlled, depending on the SoC. > >>> > >> > >>It looks like it falls under this "mailbox" device which is really the > >>catch all bucket for bits with no home besides they're related to the > >>apps CPUs/subsystem. > >> > >Thanks for pointing to this. > >> apss_shared: mailbox@17990000 { > >> compatible =3D "qcom,sdm845-apss-shared"; > >> reg =3D <0 0x17990000 0 0x1000>; > >But this doesn't seem correct. The registers in this page are all not > >mailbox door bell registers. We should restrict the space allocated to > >the mbox to 0xC or something, definitely, not the whole page. They all > >cannot be treated as a mailbox registers. Well the binding is already done and this is the compatible string for this node and register region. Sounds like this node is a mailbox plus some more stuff in the same page. > >> #mbox-cells =3D <1>; > >> }; > >> > >>Can you point to this node with a phandle and then parse the reg > >>property out of it to use in the scm readl/writel APIs? Maybe it can be > >>a two cell property with <&apps_shared 0xf0> to indicate the offset to > >>the registers to read/write? In non-secure mode presumably we need to > >>also write these registers? Good news is that there's a regmap for this > >>driver already, so maybe that can be acquired from the pdc driver. > >> > >The register space collection seems to be mix of different types of > >application processor registers that should probably not be grouped up > >under one subsystem. A single regmap doesn't seem correct either. Why isn't a single regmap correct? The PDC driver should be able to use it to read/write into this register space. The lock on the regmap will need to be changed to a raw lock though for RT. Otherwise it looks OK to me.