From patchwork Fri Dec 9 10:50:50 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Horman X-Patchwork-Id: 704406 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3tZpv22W0sz9rxw for ; Fri, 9 Dec 2016 21:51:26 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=verge.net.au header.i=@verge.net.au header.b="HeOaSXcM"; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933027AbcLIKvL (ORCPT ); Fri, 9 Dec 2016 05:51:11 -0500 Received: from kirsty.vergenet.net ([202.4.237.240]:52639 "EHLO kirsty.vergenet.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932963AbcLIKvH (ORCPT ); Fri, 9 Dec 2016 05:51:07 -0500 Received: from penelope.kanocho.kobe.vergenet.net (unknown [217.111.208.18]) by kirsty.vergenet.net (Postfix) with ESMTPSA id 61A6125B800; Fri, 9 Dec 2016 21:50:57 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=verge.net.au; s=mail; t=1481280657; bh=fa6BvR/IonFWJuyl3o4onoCkUJGTzOBETGsLn8me7sE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HeOaSXcM+ISb6enkWRa1zDAnd73emc7ctLFQxQWySIGhFFnZs+f5D6bNxmx+AvB3q NjfjAuJUFeMSQJOi9pTQzGDAtYcfnvcGEeUR954soTW5GwLcUSscVSkhe4QIj7tEqk 3FtoNDHM3+pdf51qEXOeTP1kEuqPPEz4XQYS1BKY= Received: by penelope.kanocho.kobe.vergenet.net (Postfix, from userid 7100) id D80CD60644; Fri, 9 Dec 2016 11:50:53 +0100 (CET) From: Simon Horman To: Thomas Gleixner , Jason Cooper , Marc Zyngier Cc: Rob Herring , Magnus Damm , linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, devicetree@vger.kernel.org, Simon Horman Subject: [PATCH 2/2] irqchip/renesas-intc-irqpin: Add R-Car Gen1 fallback binding Date: Fri, 9 Dec 2016 11:50:50 +0100 Message-Id: <1481280650-9258-3-git-send-email-horms+renesas@verge.net.au> X-Mailer: git-send-email 2.7.0.rc3.207.g0ac5344 In-Reply-To: <1481280650-9258-1-git-send-email-horms+renesas@verge.net.au> References: <1481280650-9258-1-git-send-email-horms+renesas@verge.net.au> Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org In the case of Renesas R-Car hardware we know that there are generations of SoCs, e.g. Gen 1, Gen 2 and Gen 3. But beyond that its not clear what the relationship between IP blocks might be. For example, I believe that r8a7779 is older than r8a7778 but that doesn't imply that the latter is a descendant of the former or vice versa. We can, however, by examining the documentation and behaviour of the hardware at run-time observe that the current driver implementation appears to be compatible with the IP blocks on SoCs within a given generation. For the above reasons and convenience when enabling new SoCs a per-generation fallback compatibility string scheme being adopted for drivers for Renesas SoCs. Signed-off-by: Simon Horman --- .../interrupt-controller/renesas,intc-irqpin.txt | 44 ++++++++++++---------- drivers/irqchip/irq-renesas-intc-irqpin.c | 2 + 2 files changed, 26 insertions(+), 20 deletions(-) diff --git a/Documentation/devicetree/bindings/interrupt-controller/renesas,intc-irqpin.txt b/Documentation/devicetree/bindings/interrupt-controller/renesas,intc-irqpin.txt index 772c550d3b4b..e5a5251be9f5 100644 --- a/Documentation/devicetree/bindings/interrupt-controller/renesas,intc-irqpin.txt +++ b/Documentation/devicetree/bindings/interrupt-controller/renesas,intc-irqpin.txt @@ -2,13 +2,19 @@ DT bindings for the R-/SH-Mobile irqpin controller Required properties: -- compatible: has to be "renesas,intc-irqpin-", "renesas,intc-irqpin" - as fallback. - Examples with soctypes are: +- compatible: - "renesas,intc-irqpin-r8a7740" (R-Mobile A1) - "renesas,intc-irqpin-r8a7778" (R-Car M1A) - "renesas,intc-irqpin-r8a7779" (R-Car H1) - "renesas,intc-irqpin-sh73a0" (SH-Mobile AG5) + - "renesas,rcar-gen1-intc-irqpin" (generic R-Car Gen1 compatible device) + - "renesas,intc-irqpin" (generic device) + + When compatible with a generic R-Car version, nodes must list the + SoC-specific version corresponding to the platform first followed by + the generic R-Car version. + + "renesas,intc-irqpin" must be present and last. - reg: Base address and length of each register bank used by the external IRQ pins driven by the interrupt controller hardware module. The base @@ -39,24 +45,22 @@ Optional properties: Example ------- - irqpin1: interrupt-controller@e6900004 { - compatible = "renesas,intc-irqpin-r8a7740", + irqpin0: interrupt-controller@fe78001c { + compatible = "renesas,intc-irqpin-r8a7779", + "renesas,rcar-gen1-intc-irqpin", "renesas,intc-irqpin"; #interrupt-cells = <2>; + status = "disabled"; interrupt-controller; - reg = <0xe6900004 4>, - <0xe6900014 4>, - <0xe6900024 1>, - <0xe6900044 1>, - <0xe6900064 1>; - interrupts = <0 149 IRQ_TYPE_LEVEL_HIGH - 0 149 IRQ_TYPE_LEVEL_HIGH - 0 149 IRQ_TYPE_LEVEL_HIGH - 0 149 IRQ_TYPE_LEVEL_HIGH - 0 149 IRQ_TYPE_LEVEL_HIGH - 0 149 IRQ_TYPE_LEVEL_HIGH - 0 149 IRQ_TYPE_LEVEL_HIGH - 0 149 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&mstp2_clks R8A7740_CLK_INTCA>; - power-domains = <&pd_a4s>; + reg = <0xfe78001c 4>, + <0xfe780010 4>, + <0xfe780024 4>, + <0xfe780044 4>, + <0xfe780064 4>, + <0xfe780000 4>; + interrupts = ; + sense-bitfield-width = <2>; }; diff --git a/drivers/irqchip/irq-renesas-intc-irqpin.c b/drivers/irqchip/irq-renesas-intc-irqpin.c index 5fe1207a079c..70095b61a90a 100644 --- a/drivers/irqchip/irq-renesas-intc-irqpin.c +++ b/drivers/irqchip/irq-renesas-intc-irqpin.c @@ -378,6 +378,8 @@ static const struct of_device_id intc_irqpin_dt_ids[] = { .data = &intc_irqpin_irlm_r8a777x }, { .compatible = "renesas,intc-irqpin-r8a7779", .data = &intc_irqpin_irlm_r8a777x }, + { .compatible = "renesas,rcar-gen1-intc-irqpin", + .data = &intc_irqpin_irlm_r8a777x }, { .compatible = "renesas,intc-irqpin-r8a7740", .data = &intc_irqpin_rmobile }, { .compatible = "renesas,intc-irqpin-sh73a0",