linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Lechner <david@lechnology.com>
To: Roger Quadros <rogerq@ti.com>, tony@atomide.com
Cc: robh+dt@kernel.org, bcousson@baylibre.com, ssantosh@kernel.org,
	ohad@wizery.com, bjorn.andersson@linaro.org, s-anna@ti.com,
	nsekhar@ti.com, t-kristo@ti.com, nsaulnier@ti.com,
	jreeder@ti.com, m-karicheri2@ti.com, woods.technical@gmail.com,
	linux-omap@vger.kernel.org, linux-remoteproc@vger.kernel.org,
	linux-kernel@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH 01/17] dt-bindings: remoteproc: Add TI PRUSS bindings
Date: Wed, 28 Nov 2018 09:42:19 -0600	[thread overview]
Message-ID: <ee02b7d3-e7fd-2f4a-4213-d556d364194b@lechnology.com> (raw)
In-Reply-To: <5BFD5F83.3070807@ti.com>

On 11/27/18 9:15 AM, Roger Quadros wrote:
> 
> On 26/11/18 23:14, David Lechner wrote:
>> On 11/22/18 5:38 AM, Roger Quadros wrote:
>>> From: Suman Anna <s-anna@ti.com>
>>>
>>> This patch adds the bindings for the Programmable Real-Time Unit
>>> and Industrial Communication Subsystem (PRU-ICSS) present on various
>>> TI SoCs. The IP is present on multiple TI SoC architecture families
>>> including the OMAP architecture SoCs such as AM33xx, AM437x and
>>> AM57xx; and on a Keystone 2 architecture based 66AK2G SoC. It is
>>> also present on the Davinci based OMAPL138 SoCs and K3 architecture
>>> based AM65x SoCs as well (not covered for now). Details have been
>>> added to include bindings for various core sub-modules like the PRU
>>> Cores, the PRUSS Interrupt Controller, and other sub-modules used
>>> for Industrial Communication purposes, covering the MDIO, MII_RT
>>> and the IEP sub-modules. The binding mostly uses standard DT
>>> properties.
>>>
>>> Signed-off-by: Suman Anna <s-anna@ti.com>
>>> Signed-off-by: Roger Quadros <rogerq@ti.com>
>>> ---
>>>    .../devicetree/bindings/soc/ti/ti,pruss.txt        | 360 +++++++++++++++++++++
>>>    1 file changed, 360 insertions(+)
>>>    create mode 100644 Documentation/devicetree/bindings/soc/ti/ti,pruss.txt
>>>
>>> diff --git a/Documentation/devicetree/bindings/soc/ti/ti,pruss.txt b/Documentation/devicetree/bindings/soc/ti/ti,pruss.txt
>>> new file mode 100644
>>> index 0000000..24fedad
>>> --- /dev/null
>>> +++ b/Documentation/devicetree/bindings/soc/ti/ti,pruss.txt
>>
>> ...
>>
>>> +
>>> +PRU-ICSS SoC Bus Parent Node
>>> +=============================
>>> +This node represents the integration of the PRU-ICSS IP into a SoC, and is
>>> +required for all SoCs. The PRU-ICSS parent nodes need to be defined as child
>>> +nodes of this node.
>>> +
>>> +Required Properties:
>>> +--------------------
>>> +- compatible     : should be one of,
>>> +                       "ti,am3356-pruss-soc-bus" for AM335x family of SoCs
>>> +                       "ti,am4376-pruss-soc-bus" for AM437x family of SoCs
>>> +                       "ti,am5728-pruss-soc-bus" for AM57xx family of SoCs
>>> +                       "ti,k2g-pruss-soc-bus" for 66AK2G family of SoCs
>>> +- reg            : address and size of the PRUSS CFG sub-module registers
>>> +                   dictating the interconnect configuration
>>
>> I haven't looked into Tony's suggestion of using ti-sysc yet, so this may be a
>> moot point, but how will this work with AM18xx that does not have a PRUSS CFG
>> register? It seems to me that reg here should be the address and size of the
>> entire PRUSS IP block and the CFG register should be a syscon node or something
>> like that.
> 
> The reg property description is incorrect in the patch. It should have been
> 
> reg		: address of SYSCFG register.
> 
> The SYSCFG register is used to enable and reset the module.
> 
> But based on Tony's suggestion this wrapper driver will change to ti,sysc for
> OMAP like SoCs.
> 
> For AM18xx it could be a simple wrapper driver that just populates the children?

I suppose that could work. I will look into it (perhaps after seeing what you
come up with in v2).

> 
>>
>>> +- #address-cells : should be 1
>>> +- #size-cells    : should be 1
>>> +- ranges         : standard ranges definition
>>> +
>>
>> ...
>>
>>> +
>>> +PRUSS INTC Child Node
>>> +======================
>>> +Each PRUSS has a single interrupt controller instance that is common to both
>>> +the PRU cores. Each interrupt controller can detect 64 input events which are
>>> +then mapped to 10 possible output interrupts through two levels of mapping. The
>>> +input events can be triggered by either the PRUs and/or various other PRUSS
>>> +internal and external peripherals. The first 2 output interrupts are fed
>>> +exclusively to the internal PRU cores, with the remaining 8 connected to
>>> +external interrupt controllers including the MPU.
>>
>> FYI, on AM18xx, there is a PRUSSEVTSEL bit in CFGCHIP3[3] (already a syscon node
>> in the device tree) that allows selecting one of two groups of 32 input events
>> out of this group of 64. This is perhaps getting out of the scope of this patch
>> series, but I just want to make sure we end up with something that can be easily
>> extended for this case. For example, I was thinking that this binding could be
>> modified so that #interrupt-cells could be 1 or 2. If it is 2, then the first
>> cell specifies the PRUSSEVTSEL value and the second value is the event number.
>>
> 
> this is da850.dtsi correct?

Yes.

> 
> As PRUSSEVTSEL is not SYSEVENT specific but applies to all the SYSEVENTs at a time.
> I don't think interrupt-cells is the right place to specify this.
> 
> Can it be set in DT in the board file? But this can't change once booted so maybe restrictive.

I guess the way I see this is that it is like specifying the bank and index for
a GPIO. If you only specify the system event number, then it is not clear which
event you mean - it could be one of two events. You have to also specify the
PRUSSEVTSEL value (one could call this the bank or group, I suppose) to fully
describe the system event.

> 
> If runtime change is required it can only be done before a PRU boots.
> 
> How about providing this info in the resource table and/or application DT node?

This seems like this would make it easy to end up with a broken interrupts
if you accidentally try to use interrupts from both groups. Instead this
could be implemented in the irqchip driver such that the first interrupt
(system event) requested gets to select the group. If any interrupts from
the other group are requested later, they can just return an error. Any
interrupts in the same group as the first can be requested successfully.

  reply	other threads:[~2018-11-28 15:42 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-22 11:38 [PATCH 00/17] Add support for TI PRU ICSS Roger Quadros
2018-11-22 11:38 ` [PATCH 01/17] dt-bindings: remoteproc: Add TI PRUSS bindings Roger Quadros
2018-11-23 16:24   ` Tony Lindgren
2018-11-26  7:47     ` Roger Quadros
2018-11-26 19:35       ` Tony Lindgren
2018-11-26 21:14   ` David Lechner
2018-11-26 23:41     ` Tony Lindgren
2018-11-27 15:15     ` Roger Quadros
2018-11-28 15:42       ` David Lechner [this message]
2018-11-29  8:49         ` Roger Quadros
2018-11-29 16:18           ` David Lechner
2018-11-22 11:38 ` [PATCH 02/17] soc: ti: pruss: Define platform data for PRUSS bus driver Roger Quadros
2018-11-22 11:38 ` [PATCH 03/17] soc: ti: pruss: Add pruss_soc_bus platform driver Roger Quadros
2018-11-22 11:39 ` [PATCH 04/17] soc: ti: pruss: Fix system suspend/MStandby config issues Roger Quadros
2018-11-22 11:39 ` [PATCH 05/17] soc: ti: pruss: Configure SYSCFG properly during probe/remove Roger Quadros
2018-11-23 16:26   ` Tony Lindgren
2018-11-22 11:39 ` [PATCH 06/17] soc: ti: pruss: Add a platform driver for PRUSS in TI SoCs Roger Quadros
2018-11-26 21:15   ` David Lechner
2018-11-27 15:17     ` Roger Quadros
2018-11-22 11:39 ` [PATCH 07/17] soc: ti: pruss: enable OCP master ports in SYSCFG always Roger Quadros
2018-11-23 16:35   ` Tony Lindgren
2018-11-22 11:39 ` [PATCH 08/17] soc: ti: pruss: Add a PRUSS irqchip driver for PRUSS interrupts Roger Quadros
2018-11-23 16:37   ` Tony Lindgren
2018-11-26  8:09     ` Roger Quadros
2018-11-26 19:33       ` Tony Lindgren
2018-12-12 15:48         ` Roger Quadros
2018-12-12 17:25           ` Tony Lindgren
2018-11-26  8:09     ` Roger Quadros
2018-11-26 21:17   ` David Lechner
2018-11-27 15:39     ` Roger Quadros
2018-11-28 15:46       ` David Lechner
2018-11-22 11:39 ` [PATCH 09/17] soc: ti: pruss: add pruss_{request,release}_mem_region() API Roger Quadros
2018-11-26 21:18   ` David Lechner
2018-11-22 11:39 ` [PATCH 10/17] soc: ti: pruss_intc: Add API to trigger a PRU sysevent Roger Quadros
2018-11-26 21:18   ` David Lechner
2018-11-22 11:39 ` [PATCH 11/17] soc: ti: pruss: add pruss_get()/put() API Roger Quadros
2018-11-23  2:47   ` kbuild test robot
2018-11-23  9:41     ` Roger Quadros
2018-11-23  8:20   ` Arnd Bergmann
2018-11-23  8:58     ` Tero Kristo
2018-11-23  9:40     ` Roger Quadros
2018-11-26 21:18   ` David Lechner
2018-11-22 11:39 ` [PATCH 12/17] soc: ti: pruss: add pruss_cfg_read()/update() API Roger Quadros
2018-11-22 11:39 ` [PATCH 13/17] soc: ti: pruss: export pruss_intc_configure/unconfigure APIs Roger Quadros
2018-11-26 21:19   ` David Lechner
2018-11-22 11:39 ` [PATCH 14/17] ARM: OMAP2+: use pdata quirks for PRUSS reset lines on AM335x Roger Quadros
2018-11-23 16:40   ` Tony Lindgren
2018-11-22 11:39 ` [PATCH 15/17] ARM: dts: AM33xx: Add the PRU-ICSS DT nodes Roger Quadros
2018-11-26 16:37   ` David Lechner
2018-11-22 11:39 ` [PATCH 16/17] ARM: dts: AM33xx: Add PRU system events for virtio Roger Quadros
2018-11-22 11:39 ` [PATCH 17/17] ARM: dts: am335x-*: Enable PRU-ICSS nodes Roger Quadros
2018-11-26 16:45   ` David Lechner
2018-12-03  2:04 ` [PATCH 00/17] Add support for TI PRU ICSS Derald D. Woods

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ee02b7d3-e7fd-2f4a-4213-d556d364194b@lechnology.com \
    --to=david@lechnology.com \
    --cc=bcousson@baylibre.com \
    --cc=bjorn.andersson@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jreeder@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-remoteproc@vger.kernel.org \
    --cc=m-karicheri2@ti.com \
    --cc=nsaulnier@ti.com \
    --cc=nsekhar@ti.com \
    --cc=ohad@wizery.com \
    --cc=robh+dt@kernel.org \
    --cc=rogerq@ti.com \
    --cc=s-anna@ti.com \
    --cc=ssantosh@kernel.org \
    --cc=t-kristo@ti.com \
    --cc=tony@atomide.com \
    --cc=woods.technical@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).