From patchwork Thu Feb 15 16:52:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Th=C3=A9o_Lebrun?= X-Patchwork-Id: 13558846 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 41924C48BC4 for ; Thu, 15 Feb 2024 16:53:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Kx4DIskm0YLrnI7C2nouoz4bMiP1MlYxD0jaELzylu4=; b=dOXT7n2As7STyO WCRGCE4FuTnbzXyS41Ak3WcMgQa8ovSXJ/wKhPSy8XpFAbTkSfW0Fvhjc0Kes/T3IbdPqFNfj6PIT LkRtvfLV7dw+abiZUrG25Bd9OP4C4RCo0tPN0rJFVBHSlPGKYX1CWEcx0zEPUBDZ8gSnl4SaGjcr9 h2chJwRVEXC60RG4rmql7fv+7JvanS19D2u09pGG/gwnh916OnwfubYrk24BSDK5RKGaSmhksnxRZ UV7oUVaTyBZ4EDLu8FmTt/qIOOavJIf8jFrJh7mOaaZGheLlp9hRoJ4FEUOytOhWOfpLbosoLQ6PB M6f6iLDEQddqd/tchhng==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1raeye-0000000H3Lu-0lzn; Thu, 15 Feb 2024 16:52:48 +0000 Received: from relay4-d.mail.gandi.net ([217.70.183.196]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1raeyT-0000000H3Du-3Vgq for linux-arm-kernel@lists.infradead.org; Thu, 15 Feb 2024 16:52:42 +0000 Received: by mail.gandi.net (Postfix) with ESMTPSA id F0D07E000D; Thu, 15 Feb 2024 16:52:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1708015954; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=7cLPcJTMJ7JxzGdy5rlF5zI68DecSO20reEkIrekyHo=; b=l50vrPRPj0n5yakq096garlZj22Yam4gfE7JxPoei3WBEOqIEPeo9GYdhiQKJqukq+LgmI uQ8jerdAEg2uJnLIbvOzwz9ETiDCjaLtlwkcp4kaGmYOlQ7epTBI0YYc+57pvTucbBOU3n k/rsShn7ujuo0XRBseBrQ2cuTKy2RaH63zQnOs2nzD/Nk2/l6qWEvRbH2pGqRI6l1r1kM6 nmDxo/Y/Xs4nr7MY6a7dtGJdXS3DvDZF3m78Jr37NsuHag71yAXmYSO9i3Sn0F+4i4Ac+3 wNZixGWyPElqSGHQeLnrocczYIxk/UEmG24Bha2KaiUECWg0P8/zuf5a5E4e5Q== From: =?utf-8?q?Th=C3=A9o_Lebrun?= Date: Thu, 15 Feb 2024 17:52:09 +0100 Subject: [PATCH 02/13] dt-bindings: i2c: nomadik: add mobileye,eyeq5-i2c bindings and example MIME-Version: 1.0 Message-Id: <20240215-mbly-i2c-v1-2-19a336e91dca@bootlin.com> References: <20240215-mbly-i2c-v1-0-19a336e91dca@bootlin.com> In-Reply-To: <20240215-mbly-i2c-v1-0-19a336e91dca@bootlin.com> To: Linus Walleij , Andi Shyti , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Thomas Bogendoerfer Cc: linux-arm-kernel@lists.infradead.org, linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, Gregory Clement , Vladimir Kondratiev , Thomas Petazzoni , Tawfik Bayouk , =?utf-8?q?Th=C3=A9o_Lebrun?= X-Mailer: b4 0.12.4 X-GND-Sasl: theo.lebrun@bootlin.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240215_085238_273958_05F8006C X-CRM114-Status: GOOD ( 10.64 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add EyeQ5 bindings to the existing Nomadik I2C dt-bindings. Add the two EyeQ5-specific properties behind a conditional. Add an example for this compatible. Signed-off-by: Théo Lebrun --- .../devicetree/bindings/i2c/st,nomadik-i2c.yaml | 44 ++++++++++++++++++++-- 1 file changed, 40 insertions(+), 4 deletions(-) diff --git a/Documentation/devicetree/bindings/i2c/st,nomadik-i2c.yaml b/Documentation/devicetree/bindings/i2c/st,nomadik-i2c.yaml index e6b95e3765ac..eaade14b6d4c 100644 --- a/Documentation/devicetree/bindings/i2c/st,nomadik-i2c.yaml +++ b/Documentation/devicetree/bindings/i2c/st,nomadik-i2c.yaml @@ -14,9 +14,6 @@ description: The Nomadik I2C host controller began its life in the ST maintainers: - Linus Walleij -allOf: - - $ref: /schemas/i2c/i2c-controller.yaml# - # Need a custom select here or 'arm,primecell' will match on lots of nodes select: properties: @@ -24,6 +21,7 @@ select: contains: enum: - st,nomadik-i2c + - mobileye,eyeq5-i2c required: - compatible @@ -39,6 +37,10 @@ properties: - const: stericsson,db8500-i2c - const: st,nomadik-i2c - const: arm,primecell + # The variant found on Mobileye EyeQ5 + - items: + - const: mobileye,eyeq5-i2c + - const: arm,primecell reg: maxItems: 1 @@ -55,7 +57,7 @@ properties: - items: - const: mclk - const: apb_pclk - # Clock name in DB8500 + # Clock name in DB8500 or EyeQ5 - items: - const: i2cclk - const: apb_pclk @@ -83,6 +85,25 @@ required: unevaluatedProperties: false +allOf: + - $ref: /schemas/i2c/i2c-controller.yaml# + - if: + properties: + compatible: + contains: + const: mobileye,eyeq5-i2c + then: + properties: + mobileye,olb: + $ref: /schemas/types.yaml#/definitions/phandle + description: A phandle to the OLB syscon. + mobileye,id: + $ref: /schemas/types.yaml#/definitions/uint32 + description: Platform-wide controller ID (integer starting from zero). + required: + - mobileye,olb + - mobileye,id + examples: - | #include @@ -116,5 +137,20 @@ examples: clocks = <&i2c0clk>, <&pclki2c0>; clock-names = "mclk", "apb_pclk"; }; + - | + #include + i2c@300000 { + compatible = "mobileye,eyeq5-i2c", "arm,primecell"; + reg = <0x300000 0x1000>; + interrupt-parent = <&gic>; + interrupts = ; + clock-frequency = <400000>; + #address-cells = <1>; + #size-cells = <0>; + clocks = <&i2c_ser_clk>, <&i2c_clk>; + clock-names = "i2cclk", "apb_pclk"; + mobileye,olb = <&olb>; + mobileye,id = <0>; + }; ...