Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp1138263ybi; Tue, 16 Jul 2019 10:10:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqw4S1C2D8ol7xnFGPX2WLRfim6Zmx5c7J3RzyHjElKNdSmfTPBXgz3dK9OmDTWbCXc09AiH X-Received: by 2002:a63:5f09:: with SMTP id t9mr1366294pgb.351.1563297007611; Tue, 16 Jul 2019 10:10:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563297007; cv=none; d=google.com; s=arc-20160816; b=WWpSuvr9zUhVTdne5Affd29ov2VkbGcx2eYq7iFFCdcCbV7/iF9IBzd7OzTkI5iF4/ aO07Bc6ZVzFdRVI8m+FSR/9qlxr9k8ZZL/f3OtXF5S05GrTJbupkJ9fIlsD3EL7QpLs2 zEcqIk2okEcA5K8NMVrEVIgioNB+5gJnvTDaCVZgirB8hzJEIzCtvzh4QRD5GYrEhX1Y Gewce1G5Dgo3BY/qlmmaCldcz/4bnXLYijhHkIxJJ+2J6bVD29Bo19PsKL1LOctNgN6F s0w3hHMKRlLqrm1jEE0wQaHjAxHoaQKIsFu/lOSW14KvSlwJz1WmhPbZgPSv6rZfaAQH nYvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=VQ/fp5ABUyt0fOaHGKlhXyBUzQD3cI800FDzOaTcw8o=; b=0gAEHy5vjUIBO5F6sXgFci2+Dvgu0H49f1w1KkTpAp8yQ6bSCfJNTsLqcMkOHBH8/u PjTdKdOH67+kvIhZ1fXhHpylZivGMQWXkSY4gL34dliIAnDCb5Gg2pkcX1BrOR5Vwezw mZ+3gZIc+t+5xCbhqvfksxE1dO/rX3jBNR3EEJ4M+XWY8Nm6gtkDamgV3ous0BCmIR+S SRSlibk7xfh8OHYMWZsFyQqhzt3yY9GQa5yznviC0Rx8i5U9SxiKt94LDgTYOd+b8Mvb cdOGcyAIj1q+e4nOqS+/qE9gesz0mPXDqRLyoR+V/U2BfBYL2mc1XEDfmtK5Pvcxnalz +6zg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b="yd5g/CAL"; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o75si18876459pje.87.2019.07.16.10.09.51; Tue, 16 Jul 2019 10:10:07 -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=@ti.com header.s=ti-com-17Q1 header.b="yd5g/CAL"; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388150AbfGPRJX (ORCPT + 99 others); Tue, 16 Jul 2019 13:09:23 -0400 Received: from fllv0015.ext.ti.com ([198.47.19.141]:44156 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725926AbfGPRJX (ORCPT ); Tue, 16 Jul 2019 13:09:23 -0400 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id x6GH7wGu022595; Tue, 16 Jul 2019 12:07:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1563296879; bh=VQ/fp5ABUyt0fOaHGKlhXyBUzQD3cI800FDzOaTcw8o=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=yd5g/CALb31GGT87CeoGnogbhZ/u8y5VHXCC2ySvjip0C0JxwGiCfWx5k3o6XuSsq nJ/1uakbglW4rgoUvz+E3GC2qf+LEKFIrzkBmVEiv8RD2yhCwHGLcsJwFGowMwGhXz EC4HfAzbmWLuC5Nwe0BqmE0yyr2DA0Dglgg8Cjqg= Received: from DLEE114.ent.ti.com (dlee114.ent.ti.com [157.170.170.25]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x6GH7w4v032498 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 16 Jul 2019 12:07:58 -0500 Received: from DLEE106.ent.ti.com (157.170.170.36) by DLEE114.ent.ti.com (157.170.170.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Tue, 16 Jul 2019 12:07:58 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DLEE106.ent.ti.com (157.170.170.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Tue, 16 Jul 2019 12:07:58 -0500 Received: from [128.247.58.153] (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id x6GH7wZu122924; Tue, 16 Jul 2019 12:07:58 -0500 Subject: Re: [PATCH 1/6] dt-bindings: irqchip: Add PRUSS interrupt controller bindings To: David Lechner , "Andrew F. Davis" , Marc Zyngier , Rob Herring , Thomas Gleixner , Jason Cooper CC: Tony Lindgren , Roger Quadros , Lokesh Vutla , Grygorii Strashko , Sekhar Nori , Murali Karicheri , , , , References: <20190708035243.12170-1-s-anna@ti.com> <20190708035243.12170-2-s-anna@ti.com> <53868885-a78d-448a-1f2a-03a16251d028@ti.com> From: Suman Anna Message-ID: <2eb76f94-3d01-2620-89a0-207a4084be1b@ti.com> Date: Tue, 16 Jul 2019 12:07:58 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 8bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi David, On 7/10/19 12:08 PM, David Lechner wrote: > >>>> +- interrupts           : all the interrupts generated towards the >>>> main host >>>> +                         processor in the SoC. The format depends >>>> on the >>>> +                         interrupt specifier for the particular >>>> SoC's ARM GIC >>>> +                         parent interrupt controller. A shared >>>> interrupt can >>>> +                         be skipped if the desired destination and >>>> usage is by >>>> +                         a different processor/device. >>>> +- interrupt-names      : should use one of the following names for >>>> each valid >>>> +                         interrupt connected to ARM GIC, the name >>>> should match >>>> +                         the corresponding host interrupt number, >>>> +                             "host0", "host1", "host2", "host3", >>>> "host4", >>>> +                             "host5", "host6" or "host7" >>>> +- interrupt-controller : mark this node as an interrupt controller >>>> +- #interrupt-cells     : should be 1. Client users shall use the >>>> PRU System >>>> +                         event number (the interrupt source that >>>> the client >>>> +                         is interested in) as the value of the >>>> interrupts >>>> +                         property in their node >>>> + >>>> +Optional Properties: >>>> +-------------------- >>>> +The following properties are _required_ only for some SoCs. If none >>>> of the below >>>> +properties are defined, it implies that all the host interrupts 2 >>>> through 9 are >>>> +connected exclusively to the ARM GIC. >>>> + >>>> +- ti,irqs-reserved     : an array of 8-bit elements of host >>>> interrupts between >>>> +                         0 and 7 (corresponding to PRUSS INTC >>>> output interrupts >>>> +                         2 through 9) that are not connected to the >>>> ARM GIC. >>> >>> The reason for 0-7 mapping to 2-9 is not instantly clear to someone >>> reading this. If you respin this could you note that reason is >>> interrupts 0 and 1 are always routed back into the PRUSS. >> >> Yeah, this is always going to be somewhat confusing since the driver has >> to deal with all hosts from channel-mapping perspective, but only the 8 >> interrupts at most that reach MPU for handling interrupts. TRM has >> >> Anyway, I have already mentioned the first 2 interrupt routing in the >> first paragraph above. >> >> Thinking more >>> on that, the same is true for interrupt 7 ("host5") on AM437x/66AK2G yet >>> we don't skip that in the naming.. now that we have the reserved IRQ >>> mechanism above, why not leave the one-to-one interrupt to name mapping, >>> but always have at least the first two marked as reserved for all the >>> current devices: >>> >>> ti,irqs-reserved = /bits/ 8 <0 1>; >>> >>> Then any "hostx" listed as reserved need not be present in the host >>> interrupts property array. To me that would solve the "managing >>> interrupts not targeting the Linux running core" problem and keep the >>> names consistent, e.g.: >> >> I had actually used the interrupt-names always starting from "host2" >> through "host9" (names from PRU perspective) previously, and I have >> changed this to start indexing from 0 in this series to address an >> internal review comment from Grygorii and to align with TRM. All the >> TRMs (except for AM572x) actually use the names/signals "host_intr0", >> "host_intr1".."host_intr7" etc for the interrupts going towards MPU. >> Maybe I should actually rename the interrupt-names to be host_intrX >> instead of hostX to avoid confusion and be exactly aligned with the TRM >> names. I will file a bug against AM57xx TRM to align the names with all >> other SoC TRMs. >> >> I am using "output interrupt lines" to imply names w.r.t PRU vs "host >> interrupt" to imply ARM GIC names. >> >> regards >> Suman >> > > FWIW, the AM1808 TRM only uses PRU_EVTOUT0 to PRU_EVTOUT7 and does not > mention "host" in relation to these interrupts. The AM3xxx and AM4xxx > also use similar names (PRU_ICSS_EVTOUT0, PRU_ICSS1_EVTOUT0) although > they do mention that the source is "pr1_host[0] output/events exported > from PRU_ICSS1". (Also, the older processors have AINTC instead of GIC). Indeed, EVTOUT was only used in the Interrupts chapter on AM1808, AM335x and AM437x. These TRMs are only getting very infrequent updates, so I doubt we will have these names synchronized to the other SoCs. The descriptions in PRUSS INTC sections themselves always use the term host interrupts for all host events, but the output signals get re-indexed to 0, which tends to be confusing. > > Maybe to help clarify here we could mention "event" in the docs: > > > +- interrupt-names      : should use one of the following names for each > valid > +                         host event interrupt connected to ARM interrupt > +                         controller,the name should match the > corresponding > +                         host event interrupt number, Yeah, I like your rewording. Will update for the next version. > +                             "host0", "host1", "host2", "host3", "host4", > +                             "host5", "host6" or "host7" I will be updating these names as well to add either a int or intr suffix. > > > > ... > >>>> + >>>> +Example: >>>> +-------- >>>> + >>>> +1.    /* AM33xx PRU-ICSS */ >>>> +    pruss: pruss@0 { > > I don't suppose there is a generic name that could be used here > instead of pruss? It seems like there should be one for remote > processors that aren't DSPs or other specialized processors. > Yeah, there is none. It is the overall PRU subsystem, the individual cores are called PRU. The subsystems are usually referred to as PRUSS, PRU-ICSS and ICSSG (on the newer K3 SoCs), so I simply chose the shorter pruss. regards Suman