From patchwork Mon Jul 15 22:53:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 13733935 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 50F92C3DA59 for ; Mon, 15 Jul 2024 22:54:17 +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:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=/oVAeXy+Ct5G+1nPYNecyb8P9heOVJlam1YHbtiaz9Q=; b=2MFtE3RpA1fn97 K+e1OssZUYCjYGd3QH4oX5byvQ/IsuYlcGocXYOmLWUA6/wEn1MhNsdIQyO/z9RzqexJx3jLbmojA ZmzPRRiEla1a3IQHqx1jGAn5N4ul0Pa+vHFIJ6kxXon3J6JyKzu+/RR/jRMb6UlIeCE4Psgm+Wo/1 mux5iXU6HNjCo0HeGOG1ZbDPsGzq8QEQGoa8LAvxnMfIe1xKnTMecxY29eEKY7WU36HPnHdgdFLQN wBgGv9cffzexeze4NtJp50HZm5ME3Y9R4oB6JM4if+fAN8SB2Yoo5xcIohEGCSPC86nfsGmuTmHXE kb4eM2/XprZCtXE04ihQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sTUaG-00000008dbc-30uv; Mon, 15 Jul 2024 22:54:16 +0000 Received: from mail-northeuropeazlp170120003.outbound.protection.outlook.com ([2a01:111:f403:c200::3] helo=DU2PR03CU002.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sTUaE-00000008db6-1928 for linux-i3c@lists.infradead.org; Mon, 15 Jul 2024 22:54:16 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=qblMoy+lyLnYCp1I1+rQKEd7M6+ebJxKXDSobc1+6tyR690M3T+y0Ko+6WG1aQz4Q7X9frELa/EVvR3tkrO/J7inAxyS+3jOEnljfFvYeE1h/ZR8tBy++2PEsZJBi6+k0hFYbAcCO9A6olkPn9U5Ly5tpGLSe4327HCeKKc00HnRMF0+T7ZQ/Ybh73hQTCACKK5/P0zoZo/pJJGbQK6/s2lFaGGTJiBQgM6J9XEBsFoOGjFW55wXQeQQMLp+VgNPCqYBcc/eeX9iH5JRhZINlHH0geCydBDbVVR6m8+GMlECvQjqw86uUbIW1P3osr+pkJDtbQWD4swQNd38g2Orcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=yPH23LFMgAbUUYmqG73yuG4FV3P9ta+eYzNlAMag3s0=; b=es3riojWIuVYgs9VV+9PZ0awZTxk5Ip/OxkqqNXLLWH6rjXAxNuSkcUSOz5HlC1+lek2RIH6cLe+BjGF0Pq2MbrlqsFykQLZ1Hm73rdsVBR/dNLHW4+/xQujM7zD00wgT+2iJL1G7Vno6T95HrIvzHZO+VRR5G5CFRucS3yyRbqZA1EkjmzcgT2reNesScg2saBvIZ1x27qguhAtmSRAsnMIRYL5RqlbFn14CndDwoBtlnqmFKnlfCoeL9189KB/R1IbdbbIY/kvty0zCBYplWXZpHWzYuKAdA+2bpxeWGXJ/NXaVvyjx8kiRYAXuP1sAYGYN1JH6+i44ie+JtnPKA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=yPH23LFMgAbUUYmqG73yuG4FV3P9ta+eYzNlAMag3s0=; b=i3FN+2TUzRIbwLmgzNtETasd4leULHnrSvhs2fRjibkezZ8sLAfTHAbg4IydicYk0qSa4FqmTPwO30XqRXJzfdsi4qKgGImfi57Xi1lcfLzGUQvBg34Zd0ClSnWBmnsYJv5CmEbmHgHyPJ1w8SAYZVNdUaEf72QCeygsv+Nr2T4= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) by DB9PR04MB8074.eurprd04.prod.outlook.com (2603:10a6:10:24a::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.28; Mon, 15 Jul 2024 22:54:07 +0000 Received: from PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9126:a61e:341d:4b06]) by PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9126:a61e:341d:4b06%4]) with mapi id 15.20.7762.027; Mon, 15 Jul 2024 22:54:07 +0000 From: Frank Li To: krzk@kernel.org Cc: Frank.Li@nxp.com, alexandre.belloni@bootlin.com, conor+dt@kernel.org, devicetree@vger.kernel.org, imx@lists.linux.dev, krzk+dt@kernel.org, linux-i3c@lists.infradead.org, linux-kernel@vger.kernel.org, miquel.raynal@bootlin.com, robh@kernel.org Subject: [PATCH v2 1/1] dt-bindings: i3c: add header for generic I3C flags Date: Mon, 15 Jul 2024 18:53:51 -0400 Message-Id: <20240715225351.3237284-1-Frank.Li@nxp.com> X-Mailer: git-send-email 2.34.1 X-ClientProxiedBy: SJ0PR13CA0096.namprd13.prod.outlook.com (2603:10b6:a03:2c5::11) To PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9642:EE_|DB9PR04MB8074:EE_ X-MS-Office365-Filtering-Correlation-Id: 0d13bcd8-e381-47b3-fd2d-08dca5210859 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|52116014|366016|7416014|1800799024|38350700014; X-Microsoft-Antispam-Message-Info: hJkITxf/DbZfM8POmzhApL6XGiYzItMddHi2iwkJxVbp+yzaOX01iuZQj/Ef8weM0C0/w+6Kye7eeD7oj69WI36Ksc/gd6FZtVyN+hIOMiFxbNKNUSiN7S5gImpweKBMmflNFicOHNHSMNW2pD7OWmj8NBb4NUBTNGX4B0EVesSuPv6Xmv/iOwk9B7qHuihABcY4leJD2WeumoQW8Q/QawasI8D4E3HS/SLjLa8Q96JmC977IPoRfVCj8kbrQkpkiBKjko5yClvyHAKIPkve/sDHvGXBA3piqjrJHOZH2Ebih1ce34eXLdQ6wAzhKGOTGZ87fSZGQwMN05jFHbAFqXdtXExSQx4e0UJ3TJM5LWfNlYEj4JgRjsvfgc+GLy2Qi6mHbVU6cwQMy2H3JQRuNEAYJLjw+zlq5stn5rEZCAAb63FeE2gcY4U5RXFtLO/Qd4i5ZXnPQ/kIyf6MidHgN+7OqrkDBj1PuKyopRBvlZCnCAJUnYaKWJIIx8GoAgww3HKFysW4M6+SXJudNuPHimVEc14QgIChMNNnub4uyNaAhoyCOEBvh5xGGA4UjI7m+ZjEazQy1WMPJe77QOeugBM37wOvhu1vKVeaCORjDhZ8p8f+zWqj/A4qdZjo8AUBiyoOCcOoOjDFESq8X56GPkRsDbMnn2eq+9ugXwWNx4Qh0iH2ZdDOryRvy1gD088toG6WTrteDjT3++Zp8/ZB4H8JnLizdTNM0n58HreGnCGxAd57YiIB0uo1nDxGL4ZzcZcWvu/zh8J/wE3MlTEiLT9tpa3DqsBMQi6uK99PljN+kTuiuTp/IGst31xeCAFkXZN87aeWkeY96p8Y4HBG1Tl4iGTlbdfQ7vzlmP/+MnSBlJZI4yDIJFhkR3sWkZhzYJbiCV86JCLN9EWibIp+hwzWz26cVPJTxSUw9uSmPqlJgT6qDSt9M2cmJFzEIMfFzhN0dZ35vF0K8FNtOSEoyHRHmk+qHwky4YezRMCxPV9PUh04j88an/HuLj321Jsu1ZLAHPX2WF42B4aokCv020oTGLnHe/cLlLLXoTj7MixBwNVJGTxEpfwgyH/h51YQ+/jlqI/OlAlotlTbEWkXTSh5e1mNZbKRMbh1PkZ17PM3+ULSDsJX8eGdlaSvL1+IDJKmL3PjhqWKWpjgcWL/qxdBrBLVUxsykApWQ8NGGgFB0yaomOdACUT9a9nSA71pg4XnnEsxG7mVfP+VjMyyoxHNKyw0bIXwi2hzoLP+3PAx4teL+XT/aFuXO2zDpqtahMAMsKiKhuuwG5QFeB3EM6x21NXRuUhJ5ngTR79cEN2VmPoKv/Gw24SrXZ7/2R8WlxEE9xQOenQvnyk3DwJJ3tp2WsDpBXywFTSxKgq/xPCqACG5jHls9snziuUQnOcS27yTfmxZijdj//pvuGxyJw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR04MB9642.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(376014)(52116014)(366016)(7416014)(1800799024)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: OOuAqtQry5xtF/+WLNlYP1trSvSSFs4pU8JTyd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aZcWeibR9aBDLXLMTsRnlmWNx11PSaYFcSdROP/tgLQSjYG8iz1wzqWj9neqc5FiV+k36QXxV2zmtGZvTd6ZO1jOd+3bkfP+8DuKvScl4158IfDZD+YtcNGBwlaN2F8X28RMywc2bGgUf1q8JQHzVNweEZFe7Y3nw9GgdwWetbBo0fzxxY7K1TwiZUuxienDokUt1guKRD56sESWz3AtvMS+FeReRuoFIjFjHCGifczndXfOYRFdJEK+QQeFZfqnxDN4aW9aDO5pYkxVKoS+gIyT2UC1D9tGVq+D7CeSzSfD+A2oif8M7fDxZDwoyMJnjfpqL9FMshOjNBnzLwHAw1JGXeFKL6xYiTAf7LarVE6xZQDo+ps4tdmHMYm2xjKSiI8nzc77hj8DhDSkaoClkRINupCFT85gKClYe8yHocNOm/ioN+PmBpZbkEmVQVG+2tGg9zN6gd9CvWdTFYe0Hc9ZGf6C3SjFcAXA8cH1k X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0d13bcd8-e381-47b3-fd2d-08dca5210859 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Jul 2024 22:54:07.4085 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: D7hkr72AZ5ZQj/JClLw8RRtHXOHUo67i10mrGgVBHLIurA7pVEgAgiB14QrUM93y++lDzAGxuKi0irBxRv+43w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR04MB8074 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240715_155414_352406_B71897B9 X-CRM114-Status: GOOD ( 13.32 ) X-BeenThere: linux-i3c@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-i3c" Errors-To: linux-i3c-bounces+linux-i3c=archiver.kernel.org@lists.infradead.org From: Carlos Song Add header file for generic I3C flags to avoid hard code in dts file. Signed-off-by: Carlos Song Reviewed-by: Frank Li Acked-by: Jason Liu Signed-off-by: Frank Li Reviewed-by: Krzysztof Kozlowski --- Change from v1 to v2 - use full path for include header - s/MIT/BSD-2-Clause/ --- Documentation/devicetree/bindings/i3c/i3c.yaml | 5 ++++- MAINTAINERS | 1 + include/dt-bindings/i3c/i3c.h | 16 ++++++++++++++++ 3 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 include/dt-bindings/i3c/i3c.h diff --git a/Documentation/devicetree/bindings/i3c/i3c.yaml b/Documentation/devicetree/bindings/i3c/i3c.yaml index 113957ebe9f1d..e25fa72fd7857 100644 --- a/Documentation/devicetree/bindings/i3c/i3c.yaml +++ b/Documentation/devicetree/bindings/i3c/i3c.yaml @@ -91,6 +91,7 @@ patternProperties: - const: 0 - description: | Shall encode the I3C LVR (Legacy Virtual Register): + See include/dt-bindings/i3c/i3c.h bit[31:8]: unused/ignored bit[7:5]: I2C device index. Possible values: * 0: I2C device has a 50 ns spike filter @@ -153,6 +154,8 @@ additionalProperties: true examples: - | + #include + i3c@d040000 { compatible = "cdns,i3c-master"; clocks = <&coreclock>, <&i3csysclock>; @@ -166,7 +169,7 @@ examples: /* I2C device. */ eeprom@57 { compatible = "atmel,24c01"; - reg = <0x57 0x0 0x10>; + reg = <0x57 0x0 (I2C_FM | I2C_FILTER)>; pagesize = <0x8>; }; diff --git a/MAINTAINERS b/MAINTAINERS index 3c4fdf74a3f9d..f0ce22e04d467 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -10479,6 +10479,7 @@ F: Documentation/ABI/testing/sysfs-bus-i3c F: Documentation/devicetree/bindings/i3c/ F: Documentation/driver-api/i3c F: drivers/i3c/ +F: include/dt-bindings/i3c/ F: include/linux/i3c/ IBM Operation Panel Input Driver diff --git a/include/dt-bindings/i3c/i3c.h b/include/dt-bindings/i3c/i3c.h new file mode 100644 index 0000000000000..373439218bba6 --- /dev/null +++ b/include/dt-bindings/i3c/i3c.h @@ -0,0 +1,16 @@ +/* SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause */ +/* + * Copyright 2024 NXP + */ + +#ifndef _DT_BINDINGS_I3C_I3C_H +#define _DT_BINDINGS_I3C_I3C_H + +#define I2C_FM (1 << 4) +#define I2C_FM_PLUS (0 << 4) + +#define I2C_FILTER (0 << 5) +#define I2C_NO_FILTER_HIGH_FREQUENCY (1 << 5) +#define I2C_NO_FILTER_LOW_FREQUENCY (2 << 5) + +#endif