From patchwork Thu Dec 1 15:18:14 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Horman X-Patchwork-Id: 701560 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 3tV1Bs1hQjz9t9x for ; Fri, 2 Dec 2016 02:18:29 +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="krxHymQ0"; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933498AbcLAPSZ (ORCPT ); Thu, 1 Dec 2016 10:18:25 -0500 Received: from kirsty.vergenet.net ([202.4.237.240]:48239 "EHLO kirsty.vergenet.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933485AbcLAPSY (ORCPT ); Thu, 1 Dec 2016 10:18:24 -0500 Received: from penelope.kanocho.kobe.vergenet.net (52D9BC73.cm-11-1c.dynamic.ziggo.nl [82.217.188.115]) by kirsty.vergenet.net (Postfix) with ESMTPSA id 0A93725BECB; Fri, 2 Dec 2016 02:18:21 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=verge.net.au; s=mail; t=1480605501; bh=izUYLTSG9qGkWO9s3LLfgaUkxZ64gWhSVFzACrrj1QA=; h=From:To:Cc:Subject:Date:From; b=krxHymQ0bD7amLxMA07XbLoXlag06fEfWrVshc1wgy7bU6iboHcaNgxmL8JCQj/09 dOvlxuGzmP4L+C1J2C/+C+PAqasPDHzlRAbiEfWLhlxHaldZ4/atLKpe0ptb5Gjd9s XdZ88+rZYy+A/YV0SYRhils0yKR4sAnyKa85jOIM= Received: by penelope.kanocho.kobe.vergenet.net (Postfix, from userid 7100) id 85CBC6061F; Thu, 1 Dec 2016 16:18:17 +0100 (CET) From: Simon Horman To: Wolfram Sang Cc: Magnus Damm , linux-i2c@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org, Simon Horman Subject: [PATCH/RFC i2c/for-next] i2c: rcar: Add per-Generation fallback bindings Date: Thu, 1 Dec 2016 16:18:14 +0100 Message-Id: <1480605494-32460-1-git-send-email-horms+renesas@verge.net.au> X-Mailer: git-send-email 2.7.0.rc3.207.g0ac5344 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 2 and Gen 3. But beyond that its not clear what the relationship between IP blocks might be. For example, I believe that r8a7790 is older than r8a7791 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. Also deprecate renesas,i2c-rcar. It seems poorly named as it is only compatible with R-Car Gen 1. It also appears unused in mainline. Signed-off-by: Simon Horman --- Documentation/devicetree/bindings/i2c/i2c-rcar.txt | 32 ++++++++++++++-------- 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/Documentation/devicetree/bindings/i2c/i2c-rcar.txt b/Documentation/devicetree/bindings/i2c/i2c-rcar.txt index 239632a0d709..8c679b17c4c6 100644 --- a/Documentation/devicetree/bindings/i2c/i2c-rcar.txt +++ b/Documentation/devicetree/bindings/i2c/i2c-rcar.txt @@ -1,17 +1,25 @@ I2C for R-Car platforms Required properties: -- compatible: Must be one of - "renesas,i2c-rcar" - "renesas,i2c-r8a7778" - "renesas,i2c-r8a7779" - "renesas,i2c-r8a7790" - "renesas,i2c-r8a7791" - "renesas,i2c-r8a7792" - "renesas,i2c-r8a7793" - "renesas,i2c-r8a7794" - "renesas,i2c-r8a7795" - "renesas,i2c-r8a7796" +- compatible: + "renesas,i2c-r8a7778" if the device is a part of a R8A7778 SoC. + "renesas,i2c-r8a7779" if the device is a part of a R8A7797 SoC. + "renesas,i2c-r8a7790" if the device is a part of a R8A7790 SoC. + "renesas,i2c-r8a7791" if the device is a part of a R8A7791 SoC. + "renesas,i2c-r8a7792" if the device is a part of a R8A7792 SoC. + "renesas,i2c-r8a7793" if the device is a part of a R8A7793 SoC. + "renesas,i2c-r8a7794" if the device is a part of a R8A7794 SoC. + "renesas,i2c-r8a7795" if the device is a part of a R8A7795 SoC. + "renesas,i2c-r8a7796" if the device is a part of a R8A7796 SoC. + "renesas,i2c-rcar-gen1" for a generic R-Car Gen1 compatible device. + "renesas,i2c-rcar-gen2" for a generic R-Car Gen2 compatible device. + "renesas,i2c-rcar-gen3" for a generic R-Car Gen3 compatible device. + "renesas,i2c-rcar" (deprecated) + + When compatible with the generic version, nodes must list the + SoC-specific version corresponding to the platform first followed + by the generic version. + - reg: physical base address of the controller and length of memory mapped region. - interrupts: interrupt specifier. @@ -33,7 +41,7 @@ Examples : i2c0: i2c@e6508000 { #address-cells = <1>; #size-cells = <0>; - compatible = "renesas,i2c-r8a7791"; + compatible = "renesas,i2c-r8a7791", "renesas,i2c-rcar-gen2"; reg = <0 0xe6508000 0 0x40>; interrupts = <0 287 IRQ_TYPE_LEVEL_HIGH>; clocks = <&mstp9_clks R8A7791_CLK_I2C0>;