From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.zeus03.de (zeus03.de [194.117.254.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 618D923E25B for ; Wed, 11 Jun 2025 09:39:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=194.117.254.33 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749634802; cv=none; b=oUxjm+x5qXKyNLHSk4JLPzi+9pSFfWa6y21xZBlcRs5D0Z2cacicRRK/29tCg8uIB9oMun3BUDwEPktX4L+3Cjp6U6ZTERxWwuZKygGWStrrKwzmCXNnTLpRr4ruEpqiRHrusaGisevHDPvaDeEzyQEyt6sqx2qS0+3M6lU1dRU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749634802; c=relaxed/simple; bh=pylqExaVbzuPRBOMc0m95Zov5zzpQxFn1nbBao6wpDk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=AcI0X2oRXHS/mh6q7fIjrAp3NNF5QXZY2v6grPWKLC3W02TmlOleB+ibKsLPs5entZsESKsuNkcO2+r8PvftLT7QfcazI2JbcnYjcnt59rwUwWFS6G2m155EUgA3ZU+05h4X5M1+EiBD3eKBCLKg2swzMRx91w9HVwN12ak4L5k= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sang-engineering.com; spf=pass smtp.mailfrom=sang-engineering.com; dkim=pass (2048-bit key) header.d=sang-engineering.com header.i=@sang-engineering.com header.b=YdzzHKyv; arc=none smtp.client-ip=194.117.254.33 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sang-engineering.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sang-engineering.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sang-engineering.com header.i=@sang-engineering.com header.b="YdzzHKyv" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= sang-engineering.com; h=from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; s=k1; bh=bysa6RPUhrdcas6jzH05PzOQ18+rCet3llSc5uNlw5c=; b=YdzzHK yvGEZPxshpyLlf4ORRphrakdyVFV1rvaFTf/svhSzE9ySXol9d6AsrZ0WkGPINuo uCsXrjEzjpnmjmIvu/36gLDNZ/uBuJ6QehvSSzlanfeaUaeRITydJLy4rJXXFyG1 uNbs/6W3bRsUa0RxG0ZlvK4nus9G+P2Vuu+LK+5LgtHvmsJfrp8v/rBtbmWQTYJs ItOeFpSJfl9It4HTdBOP1Fns8EVZN4go5HBNm41bAwHxQ+kPDPpj80jBhBnysHd9 /AtcPGDyNbOzwy7fno1JqzXNLnPUdlX6lmD+ZxvJcRacYOWLnoTLlUHKzMJP34In D6wkVLmGPAY4H+Gg== Received: (qmail 3186425 invoked from network); 11 Jun 2025 11:39:51 +0200 Received: by mail.zeus03.de with UTF8SMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 11 Jun 2025 11:39:51 +0200 X-UD-Smtp-Session: l3s3148p1@diU5mEg39LAgAwDPXy2/ACpZfVCNKldR From: Wolfram Sang To: linux-renesas-soc@vger.kernel.org Cc: Tommaso Merciai , Wolfram Sang , Alexandre Belloni , Frank Li , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Geert Uytterhoeven , Magnus Damm , linux-i3c@lists.infradead.org, devicetree@vger.kernel.org Subject: [PATCH RFC 3/7] dt-bindings: i3c: renesas,i3c: Add binding for Renesas I3C controller Date: Wed, 11 Jun 2025 11:39:27 +0200 Message-ID: <20250611093934.4208-4-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250611093934.4208-1-wsa+renesas@sang-engineering.com> References: <20250611093934.4208-1-wsa+renesas@sang-engineering.com> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Tommaso Merciai Available in RZ/G3S and G3E SoCs. The G3S has 17 interrupts, the G3E 16 with the "HDR exit" interrupt missing. This interrupt is put to the end of the list, so we can handle the difference using "minItems" instead of defining a separate interrupt list per SoC. Signed-off-by: Tommaso Merciai Signed-off-by: Wolfram Sang --- Tommaso also did a version with two interrupt lists and using 'oneOf'. I prefer this version but maybe the other one is preferred upstream? .../devicetree/bindings/i3c/renesas,i3c.yaml | 186 ++++++++++++++++++ 1 file changed, 186 insertions(+) create mode 100644 Documentation/devicetree/bindings/i3c/renesas,i3c.yaml diff --git a/Documentation/devicetree/bindings/i3c/renesas,i3c.yaml b/Documentation/devicetree/bindings/i3c/renesas,i3c.yaml new file mode 100644 index 000000000000..e6e6c57bb56c --- /dev/null +++ b/Documentation/devicetree/bindings/i3c/renesas,i3c.yaml @@ -0,0 +1,186 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/i3c/renesas,i3c.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Renesas I3C Bus Interface + +maintainers: + - Wolfram Sang + - Tommaso Merciai + +properties: + compatible: + items: + - enum: + - renesas,r9a08g045-i3c # RZ/G3S + - renesas,r9a09g047-i3c # RZ/G3E + - const: renesas,i3c + + reg: + maxItems: 1 + + interrupts: + items: + - description: Non-recoverable internal error interrupt + - description: Normal transfer error interrupt + - description: Normal transfer abort interrupt + - description: Normal response status buffer full interrupt + - description: Normal command buffer empty interrupt + - description: Normal IBI status buffer full interrupt + - description: Normal Rx data buffer full interrupt + - description: Normal Tx data buffer empty interrupt + - description: Normal receive status buffer full interrupt + - description: START condition detection interrupt + - description: STOP condition detection interrupt + - description: Transmit end interrupt + - description: NACK detection interrupt + - description: Arbitration lost interrupt + - description: Timeout detection interrupt + - description: Wake-up condition detection interrupt + - description: HDR Exit Pattern detection interrupt + minItems: 16 + + interrupt-names: + items: + - const: ierr + - const: terr + - const: abort + - const: resp + - const: cmd + - const: ibi + - const: rx + - const: tx + - const: rcv + - const: st + - const: sp + - const: tend + - const: nack + - const: al + - const: tmo + - const: wu + - const: exit + minItems: 16 + + clocks: + oneOf: + - items: + - description: APB bus clock + - description: transfer clock + - items: + - description: APB bus clock + - description: SFRs clock + - description: transfer clock + + clock-names: + oneOf: + - items: + - const: pclk + - const: tclk + - items: + - const: pclk + - const: pclkrw + - const: tclk + + power-domains: + maxItems: 1 + + resets: + items: + - description: Reset signal + - description: APB interface reset signal/SCAN reset signal + + reset-names: + items: + - const: presetn + - const: tresetn + +required: + - compatible + - reg + - interrupts + - interrupt-names + - clock-names + - clocks + - power-domains + - resets + - reset-names + +allOf: + - $ref: i3c.yaml# + + - if: + properties: + compatible: + contains: + const: renesas,r9a08g045-i3c + then: + properties: + clocks: + maxItems: 2 + clock-names: + maxItems: 2 + interrupts: + minItems: 17 + interrupt-names: + minItems: 17 + + - if: + properties: + compatible: + contains: + const: renesas,r9a09g047-i3c + then: + properties: + clocks: + minItems: 3 + clock-names: + minItems: 3 + interrupts: + maxItems: 16 + interrupt-names: + maxItems: 16 + +unevaluatedProperties: false + +examples: + - | + #include + #include + + i3c@1005b000 { + compatible = "renesas,r9a08g045-i3c", "renesas,i3c"; + reg = <0x1005b000 0x1000>; + clocks = <&cpg CPG_MOD R9A08G045_I3C_PCLK>, + <&cpg CPG_MOD R9A08G045_I3C_TCLK>; + clock-names = "pclk", "tclk"; + interrupts = , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + ; + interrupt-names = "ierr", "terr", "abort", "resp", + "cmd", "ibi", "rx", "tx", "rcv", + "st", "sp", "tend", "nack", + "al", "tmo", "wu", "exit"; + resets = <&cpg R9A08G045_I3C_PRESETN>, + <&cpg R9A08G045_I3C_TRESETN>; + reset-names = "presetn", "tresetn"; + power-domains = <&cpg>; + #address-cells = <3>; + #size-cells = <0>; + }; +... -- 2.47.2