From patchwork Tue Oct 4 09:31:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Quan Nguyen X-Patchwork-Id: 612403 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BD664C433FE for ; Tue, 4 Oct 2022 09:37:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230186AbiJDJhz (ORCPT ); Tue, 4 Oct 2022 05:37:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49736 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230110AbiJDJhb (ORCPT ); Tue, 4 Oct 2022 05:37:31 -0400 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on20713.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe59::713]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1344959252; Tue, 4 Oct 2022 02:33:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ggtOuspWmbsYq67riWFIiTTafctsw/gNhiX7hpbCMp6kp79gestLQ6uSmOElmJtpjpbRh4mrTJnb8wXWsz1RLhyV55+Kv292PEJvw0Tg4JPVejrN51L7YL79+n+lOyY1gWgR8I578nU4hiCeHtjKfmq0AaopNSccffyMenUZ5TA+UuG1+Mw28R2fdeeu583JLVv9ibQVPUOpCwzOQiwp6CftxnaPcOOT8pCk+rUhK3Pnu5jkHwFSnGOutdnYQ6XWTeJL8fI7c1qc2+TuUtJdv0jC2ZnPrXG9cK015seZ1Pg0CtMU/KdmCIwrYHDj4NSkY424hnH3ZQSuag96KnO+ag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=3TUMvTNE7ZOA26Snq3JCd6YliAo5iu1MMM78QQ4h3Rk=; b=B/pigH2OA7VZTH1UJFf6Lkiqqx1sx0woruO1GAx5hMiqFq5B9vcTo3mHWsD9EnBaqzAvNClCOX9VPk1C+fHStMPggyu/y7rhKEUC1o16XA7MRU/ohzSAypVQ13ld9gG5Im9j5vmwFnjwztf/M1qEjeVlbA/e7Tc/oWCgSztvNCiFAGriI8ND+HLwbNrfMhA1x0aOrYyAbWHBBDBl2rKADGYvsIVEoK7dEArRNQr48EMRPkGd921uTd636RY2SCgCvTGOjyui0dSVZmmIRvpd45DPU9X4PSg498713OREYP7dQH5o3/p31qj2k8tjxF6AKGLBGaQsdEyngvm3Txpu5Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=os.amperecomputing.com; dmarc=pass action=none header.from=os.amperecomputing.com; dkim=pass header.d=os.amperecomputing.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=os.amperecomputing.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=3TUMvTNE7ZOA26Snq3JCd6YliAo5iu1MMM78QQ4h3Rk=; b=eHQnlxK45cmyWYDa4kXzTsCpFwvOeFOp+L5v0nMV/1ff0AdGTh82NooKfy4on8SSYwf37WwZfPJ9OtmsxPO9t46VevOnBw9OkEBhSZD3TfSSoXbaVDDbkt69Xc1B18hTm9XRguWfNqauUCTuAYlGMwEiLD72sjGyZYBH+M42kpA= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=os.amperecomputing.com; Received: from SJ0PR01MB7282.prod.exchangelabs.com (2603:10b6:a03:3f2::24) by PH7PR01MB7703.prod.exchangelabs.com (2603:10b6:510:1d6::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5676.28; Tue, 4 Oct 2022 09:31:39 +0000 Received: from SJ0PR01MB7282.prod.exchangelabs.com ([fe80::7d50:e907:8e2e:1ff0]) by SJ0PR01MB7282.prod.exchangelabs.com ([fe80::7d50:e907:8e2e:1ff0%3]) with mapi id 15.20.5676.031; Tue, 4 Oct 2022 09:31:39 +0000 From: Quan Nguyen To: Randy Dunlap , Wolfram Sang , Corey Minyard , Rob Herring , Krzysztof Kozlowski , Brendan Higgins , Benjamin Herrenschmidt , Joel Stanley , Andrew Jeffery , openipmi-developer@lists.sourceforge.net, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org, openbmc@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org, linux-aspeed@lists.ozlabs.org, Open Source Submission Cc: Phong Vo , thang@os.amperecomputing.com, Quan Nguyen , Rob Herring Subject: [PATCH v10 2/3] bindings: ipmi: Add binding for SSIF BMC driver Date: Tue, 4 Oct 2022 16:31:05 +0700 Message-Id: <20221004093106.1653317-3-quan@os.amperecomputing.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221004093106.1653317-1-quan@os.amperecomputing.com> References: <20221004093106.1653317-1-quan@os.amperecomputing.com> X-ClientProxiedBy: SG2P153CA0029.APCP153.PROD.OUTLOOK.COM (2603:1096:4:c7::16) To SJ0PR01MB7282.prod.exchangelabs.com (2603:10b6:a03:3f2::24) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR01MB7282:EE_|PH7PR01MB7703:EE_ X-MS-Office365-Filtering-Correlation-Id: c4a71c54-c827-4924-3162-08daa5eb3d7e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Ci6AywFsOdJmeIZ5GqRM8e7p9TQ5ipySVcJVTqsroF8EsqIW5PfttmhzEh7GDS5hM4M7mCqQaKypj/vgZdTSGe/GvmOb2kFUVtao7bbQutUTCAQujsGp5mFXKFiVqiyLFW9kgaa1CCtHiXV//O1S6tpPkdwivD8adksfGvWVV/QOO8kNvVNHCxsDUSy3kLkh/KSV0LcKG9dXsc3OR9fRQ5m0HqSZj16ftrQNzv4DThxM5NlC05GLnA3PyDW6ARZjpkrHX3tZ7cY5/Ly36RekNKcLeFmwqjyF4N2I/dYC2ha+i0fPy4VCC0KQiXnN+5FS1/N/C5fasYJ3ikjgraR7G+n5NEb0j+i3Gvpi9o+oL148L6of0HF8d6Or2Pk+eEe6WBTMrYXOOZq0OsgKIKT91FPoJmndTfnRDNAcZ+rQV+PfiJtdQepy6Owvok7ZMUM85CC75n7kl8HOFg6ykiAjTU6j5+azoHR5/nLlmSC10fZyyX0iLpTaZdTsXM8gZbGF66sI71UoAcn8GPLGxSLFkD82aX1u83G3xUaY53EMUAeAItSbId12ImnAFaDLqeLkkG/ua0wSHhsMvfE6oEBnHS2ggQ7+bQ6ONjsUPl3KHHtbEUR5/0iux+iB1ezezeqFC+kukfGsPJK+F/Ihyf6rZHd3kdJg02bQl24C1MscJO0OLq/xh4LlGEyneABMy4KqeTIhTOpKQnY9Sef47AqZQ9NDPYAv+TN9BVbhruT8Z6THsuwisysH6wtcVTHgjIfDjQ9Rh274GV2wq5hRGlBanytfbtTI6sT2tFY+8/rwLw0GgPgme6L3Wgx/GYccg4X1w3rkbeIpRceOxIl8dlA79znylqNt7HzRGwKiWeM4nvc= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR01MB7282.prod.exchangelabs.com; PTR:; CAT:NONE; SFS:(13230022)(4636009)(366004)(396003)(376002)(39850400004)(136003)(346002)(451199015)(1076003)(966005)(110136005)(186003)(478600001)(6486002)(6506007)(83380400001)(6666004)(52116002)(6512007)(2906002)(5660300002)(54906003)(2616005)(38350700002)(38100700002)(4326008)(8676002)(66556008)(66476007)(26005)(66946007)(316002)(921005)(41300700001)(7416002)(86362001)(8936002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: TET2uh6ieznKx5il4v5AVd9XjQViP4AeriR5cX3jBMmc0S/4PkYx383uVQOTd4ttNlJSrQhJtbUuraBc350RApbCxpZ5cWZbjz+ie6540VxLygJHVF7+CdeEx7ivWFv4Hb5oXq0and4Qzgb5px2qeDATfOD/ckK/FHVhA+nEnenCr806aVStctL+/SnJuNy5lvJtMYklTSQiDYIgcEx+qDs631ScJvvytxOZFQSVMuJBw+f1grbvuMyp3BA9XIc7oRitwZrhakdh4/h28RlTMWjVxzk4UTQQ8/iyqnUiOfAMIM08bKzRL8n/1Sxxg9jzPb/JHsgVh0ooOt8NyYhBUMx6euMfgJnIZi9RpLghOvk8t+dPdXl9BPcNhJLlKkznR2q5iCAWh2dD/gzsE9NDH2MACNH9czeg6eyDsKm/LK82xwSH7w1O9V7zb4+zVq0IiwTHnty87UlvWjsaLZmpBORLb7mOIIlvZu4YGJOH7J7sZXQww0Vx9LVLhX6SZe8Vt9tevHRZ8/4weiNYDA001CKJ070Ts+qr2UD9OTTfphH9h6eX/6JrXb5zWSN3sie5NM0HEuALOiy/LSdkz+7v9/SlUpiu1/7KWGW3hm+Z/T2YDS2tzasOgfBWabWEaYygs147U1bUqOYEmgabsf6hbgJ4RET9lUDdD6P8drWw2iYMWZRPofPF88uvSz/gTHAeR+L0mkwwvmZIFS+ohatPfqlyphijzMnOEw2L6kAjnqAPC9/E+REUKdpDPGX5cN3Zkau49Bh0lvUQwQIcc1fuU6Z0I9TJbYuPaPNTxYB+m2N3RxHncZu5X3K0aiPExJsUdXqazUYdX5SIzsQp5LdhD3P4NQFOhQhlV4cl4IhZS70BB8N8DFQ6ci1X4FLRJS56jn6S3CXgvFETF5HFl9raKflvFHgmwCJ8muHrNxzsDb5aVDlo33ilt5crLmGvyJ5P+uD9LT3Fow0IJGjuO5pTxrhbT8DBYpAmZvFmpj7NIMN/Oaffth136uwzwLDuOnqB3Wii87Vvj6GtSA9gus2op9eGmsDFTCCje3SkyyvuvHL8p+pRFtEfzW42OYh+qna1UYET6ePS5crKgvKhrwwOr9J1OsbvFFMlJobS034UZOTUivql7PdARmAgRDAeNGA//5KeeM/Kk81lI7G7XxtFCdkS2D3GJkCqBiJDj2uO/vwBlG1eazKTaFmCY/Xkf36VwCdcnqpnjhE+rTM5W9Itoe4FNvQrJwHjYxDBNnnPQfSs3H0pT5Vb2jGM2db8d0hvDhymCNQJoLY6aA9KG+myrUc3jK6DbVPES2c1k++/qKUWWhw3lDGwvUuusNIp3R4QM7c9qNyhEQ0SqFMx5BPaC4pGUUGtgAYXXcwjz4E+S6754nlM1XIPp92AOhKyiJKzSgF1HoENNXAobZH6O8m96sUSrM9Rvcb8DEmLETJb6nV200ODDPMK4Jwc09JLUDzEXV/hzWa/A1OSZvBysAhDNdSAclpHDO6Z3eHKqU24GYiQ0FqErYhZNvdnf0yRLY5ikSAf+SMsP/GKAxhBUGSz6PCbX08Mb3GysgCRgNtMRqHoC+jnz5y60GPLU7DW+OQXwkyX5/+hD6oU0JZ3Rn1RYXRiep1bC1kgPP1rveyprpo= X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-Network-Message-Id: c4a71c54-c827-4924-3162-08daa5eb3d7e X-MS-Exchange-CrossTenant-AuthSource: SJ0PR01MB7282.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Oct 2022 09:31:39.6423 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3bc2b170-fd94-476d-b0ce-4229bdc904a7 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: vO07yTEtfJXvpd0DvX8/J7UjNvpwfMDII/2NfzFj+3enu1sMgjjsvvj1o/+PPW2eCWqp2hAd8LwP9ZjPKpXkkGvAhUkIL9majm0N0WwhRkM= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR01MB7703 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add device tree binding document for the SSIF BMC driver. Signed-off-by: Quan Nguyen Reviewed-by: Rob Herring --- v10: + None v9: + Update missing Reviewed-by tag from v7 [Rob] v8: + None v7: + Change compatible string from "ampere,ssif-bmc" to "ssif-bmc" [Jae] v6: + None v5: + None v4: + Fix warning with dt_binding_check [Rob] + Change aspeed-ssif-bmc.yaml to ssif-bmc.yaml [Quan] v3: + Switched to use DT schema format [Rob] v2: + None --- .../devicetree/bindings/ipmi/ssif-bmc.yaml | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 Documentation/devicetree/bindings/ipmi/ssif-bmc.yaml diff --git a/Documentation/devicetree/bindings/ipmi/ssif-bmc.yaml b/Documentation/devicetree/bindings/ipmi/ssif-bmc.yaml new file mode 100644 index 000000000000..02b662d780bb --- /dev/null +++ b/Documentation/devicetree/bindings/ipmi/ssif-bmc.yaml @@ -0,0 +1,38 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/ipmi/ssif-bmc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: SSIF IPMI BMC interface + +description: SSIF IPMI BMC device bindings + +maintainers: + - Quan Nguyen + +properties: + compatible: + enum: + - ssif-bmc + + reg: + maxItems: 1 + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + ssif-bmc@10 { + compatible = "ssif-bmc"; + reg = <0x10>; + }; + }; From patchwork Tue Oct 4 09:31:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Quan Nguyen X-Patchwork-Id: 612404 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BA181C433F5 for ; Tue, 4 Oct 2022 09:36:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229992AbiJDJgV (ORCPT ); Tue, 4 Oct 2022 05:36:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38260 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229747AbiJDJfl (ORCPT ); Tue, 4 Oct 2022 05:35:41 -0400 Received: from NAM04-MW2-obe.outbound.protection.outlook.com (mail-mw2nam04on20728.outbound.protection.outlook.com [IPv6:2a01:111:f400:7e8c::728]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 87C261705D; Tue, 4 Oct 2022 02:33:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Cz/IFy/648WNwrRV8iSMgB8JvRc8xD7mI2oRrPIURRCkqtxWp4cO1yytVkeNDSttHnNfYEERQzfW6Ro86Mumb2jJ5uEKwv/aHuPb52WnHp4yF/cBOBkpKh2HoIBBhA4HQQnBeBSHxz0ivIuj2zTjyAxMUy0W11GfNYbiCVT8A4KwpFSkahd6PfRhl/bSrMhdvM7Ro4q5UM1R4VeLF7AGBxYaCwCHgShkn0uIfAd3Y6pfDK9Wca2CuS0HYgRv1B6IoWOD2b8rkDkOWKiSZZZyHVfkKbalUE2SmLJbw7SqtLXGaXGT54MSf+6+/JYCgoU2L0V+72u7XC/zxJa/hkQckg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=JarapY2F3PHBxMk0AMW5ZyebXunpeBj40CKtflfqha8=; b=jONLhwbSb9CQdWkUIZb38uTxH0SQFMWPg6akfWgiiapN6rlVLrHgUMN9aXpB4JBDDQk0TYj1kIAMM2evjgPYkVwH/p8olpqocqP+ki72iq9QiCwMuBftr3bnuq0VP6zTDy6UThqd2y3ozrH+Aa42PnjX/G5piX1BM43LLGEg5rfa/2ANLHeMY4HP5BuuO34YXRE6F4A+xheOF2LCjY3GW2a4AHtf+YnVbQc5wHusyRbp9aHWNU+v95lbgTlAVm9OXzRh43jYFtDx57jHdTIF+CMtT6LF6okAxf1tS9DKVp24ljOiCDk2vUa7jyza6Dkp1VA7O1pXp80urWAP+emSYA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=os.amperecomputing.com; dmarc=pass action=none header.from=os.amperecomputing.com; dkim=pass header.d=os.amperecomputing.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=os.amperecomputing.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=JarapY2F3PHBxMk0AMW5ZyebXunpeBj40CKtflfqha8=; b=cX9GarOM7Cj5qaj33eILSLU2fk5WoTZ3bMKI2Pza4rdqDLe3JHHd6JpNQmNiXwqB6LtFdv5i2r4yTJzLAlmGF2bRZO8w0qKEBedE144O4UkDRcoHTZ+RCEKINx9BytmYluCbdbONRkF6dgOEgSm+uxII/VcVPIOTPxthAS2UUaQ= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=os.amperecomputing.com; Received: from SJ0PR01MB7282.prod.exchangelabs.com (2603:10b6:a03:3f2::24) by BL0PR0102MB3428.prod.exchangelabs.com (2603:10b6:207:1a::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5676.15; Tue, 4 Oct 2022 09:31:45 +0000 Received: from SJ0PR01MB7282.prod.exchangelabs.com ([fe80::7d50:e907:8e2e:1ff0]) by SJ0PR01MB7282.prod.exchangelabs.com ([fe80::7d50:e907:8e2e:1ff0%3]) with mapi id 15.20.5676.031; Tue, 4 Oct 2022 09:31:45 +0000 From: Quan Nguyen To: Randy Dunlap , Wolfram Sang , Corey Minyard , Rob Herring , Krzysztof Kozlowski , Brendan Higgins , Benjamin Herrenschmidt , Joel Stanley , Andrew Jeffery , openipmi-developer@lists.sourceforge.net, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org, openbmc@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org, linux-aspeed@lists.ozlabs.org, Open Source Submission Cc: Phong Vo , thang@os.amperecomputing.com, Quan Nguyen Subject: [PATCH v10 3/3] i2c: aspeed: Assert NAK when slave is busy Date: Tue, 4 Oct 2022 16:31:06 +0700 Message-Id: <20221004093106.1653317-4-quan@os.amperecomputing.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221004093106.1653317-1-quan@os.amperecomputing.com> References: <20221004093106.1653317-1-quan@os.amperecomputing.com> X-ClientProxiedBy: SG2P153CA0029.APCP153.PROD.OUTLOOK.COM (2603:1096:4:c7::16) To SJ0PR01MB7282.prod.exchangelabs.com (2603:10b6:a03:3f2::24) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR01MB7282:EE_|BL0PR0102MB3428:EE_ X-MS-Office365-Filtering-Correlation-Id: 73f470da-8426-461e-2569-08daa5eb40ae X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: vrcgAjpsFyAzHV+SFNRsam6VEoWUSkMxcKNoEDSGivWR9dnRCgX2HW6JmLJbgq3wA8a4Cy19Cpfmo2x6uV5OWADTg0vSq9nAYA4200VvMwLfl5Yi1G2qkleKqwMd7cIZ/jStIkV/CB7edxJ0/ky93oFQORPBhNVPXqCtyVPXT/03TfnFPz7zK3syy9CacWhB8F0Gqcq0tJW6Emxx07vH10IsZNGZ0h/W5tod+tN+rxQMl5fEj/CgU1BCjTH948Kwg2fdT7In5AkuQBB4Uknom+SvC5TdGaxEGJ6uWfUe3UCcNYkDXYSem3PwADIyS+82oiTPUHkyLui9lZaqQ2gDjBARa7lZMuLeYsTD0BT1bmKmYOHsWRyTc92TKdNHTwDfMbHJUdesrVxwRSGp+YxmIbhvKTE7B88Muj4Ls78UDles26Zp3W9Hir4OiH4LtH/118badCfg0gnBAR0NcbIH0N7woyhwWQnt7iFVJXo28A0LkBlJK8nlBzUsxsIgKDLsDlzF/SsFnSUikkbZAYBDd66wZr+wX5NrWh8HVUaMgzjTJJJae7KrXubCrFK3eeMM94ZW7qjg9yZVX4QLMa27AFqoRR8+Bwmu6CEruIswu/5vgnOeR49Gdbz0RruILgsbPolJImNrbXh5iCcOc1MUNcMN/DRfL6I+T3vWvv5uohdGKt8bnuJ+bWJRt6ILktw87qTeGNOgkDTdr08SGQ7efGOpIvkeyzxBkoycS8KEpCwoxhr6V3EEM9MFwH/oLbSuoaeKY0OTwqarwD2Dw0FZ91DGLEbZmeehSNjEXZj951w= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR01MB7282.prod.exchangelabs.com; PTR:; CAT:NONE; SFS:(13230022)(4636009)(396003)(39850400004)(366004)(376002)(346002)(136003)(451199015)(54906003)(110136005)(6666004)(8936002)(5660300002)(6506007)(921005)(52116002)(7416002)(107886003)(478600001)(6486002)(38100700002)(186003)(2616005)(1076003)(38350700002)(86362001)(26005)(83380400001)(6512007)(2906002)(66946007)(316002)(8676002)(66476007)(66556008)(4326008)(41300700001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: UkNe4ya916KBcBaZzOv0VgbZl7Jjg8peNjsln6zK7oMPwYFR8ZYyEthy7gp1e/ZYv/G/8nqYsfG6/6+oQ+oUFEyOJQc1L5F4r1nSBPIo+3zPKoRmh1kaCIP30yXby6FiCeC85soX7z3m+xfeFkarif9kJcYl0KNs8tF8wQcLiKKMH5yjX9CfAUAK+eVWqdwUfQ3HEW35ljv+k41hTiJv9WOKGM28G6r8vO02pPlVWKlQEleWJzjxgoZGpoouAmpcddci1wYbZTEJ79FUszCHf8ry7LrEAniFwWrB/14arNq0j3bEXx03xvisIEsfqBvHvct/L/CfpUVOS5qVzLw00WQ1rqqE21h/njClX2vXH8sLu3oAUdZ0wdk5AEXGVx/sa6BsSRpl2h3o8jjuSCLsvBvrkSGnxGejo3Na3gBypTHrw97EdGYvgKQT5sv8qSKFqU9LUlZ72vIBeOwCUav9NT+p9ku6qKtRmqAV4LvIQd/Nwi8LXtaO29PCLRlA3bNar4oehLlO7Wuq1QL+EGlONxe9fqEP/Dsddn7reZlAH5GsAhYnVvUV3BGw6ZOUp8cAApOyps2eySxojbM4KR8DIHtG8FhATrr7M8acrfe9mdGhTDMMwHNnPgS/G6NUkBtTlfcazPRl9lKjg50hAWmLwNdg1l9vgjQv2cYvqwl8czH9WQxw19ABpEhtVhMQ8Rv4VKXLDMoiwBWm8mV8aYtMocIlTtrlADVOiD3tMMt4rVu6iU2IT6mEe5MU0HSe4L43O7SCuRk/wT0hRBhEAYEqT2qxLmxja++ZI00Z7D1CCheK2ZVITvFcxaZAgLPYKxtqYYtVPG27gFNhCykDH6agqk7sDxZcEtEz4yVVciX5JgJ4E0I1Dba1jB5eGtDRLSkB9fE7KaYjbdcYRIbHH8bEU8w8BhsDlZCc7KrXCrs1rSEF++aiORz/7Q2NBvrCJHzPNx3kO0FG+Z1XQgA7PaOVLA9YsasErHapBLE/HXFhroOLzVxEEoUwqiprOveRjmmmgrgpRbTlgsK28SJCMyS3rqTmBS5XGKH5PMM769CeB21szf6JDVUKpftqJYiLYdKUVEXRfkTYnTFOd0Buxbz70BgXn0KogNQDgfR9+zC5uAxqXZ4flDMOFUfe3y8q88LGgeEsFqjUb8Jvc6qbEnaSs4CqmCrmWm4iFFa5R3rj4EZ7+aqqpIIvx9W9vxA3kCzWn4G28JCLH4TSgdDlVggOPMTI/ZyzQkB39PTRGdmxOzTfRoiqiGBll2PiaV49McudtMIrvIZilHynzenDztaEX67INj12cP62m+fUdLnpOxgGk+BdgmdtFw3Nv09x2wD8MRPo7tPxw9DTi5bLYg8VXwik//ikfIdaDKe77CFMn1a4SQ/FG35PYCdIRkrlLJCr2X3OSyZqRkmGtyV4L9EqAxYZrvFOK4+Q31gLJkNKo9uaEkvF2jQgD4BCIqhnCG8/LG7ZZm8uczpQWNXBpF+Am+gTrv52wuqUHamdOwzHTbeT0W5hg/1yy1MHlxs80FYfIBmrBYdV0d+UZZ1RS6rtnHBJCDzrgE7TTen8FbEgHasGcAVIs1G7huFDrHsuS+CQvD55pUmmahSYaZFb6q26umdcKr/QhmHfXsQLfRuv8Ec= X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-Network-Message-Id: 73f470da-8426-461e-2569-08daa5eb40ae X-MS-Exchange-CrossTenant-AuthSource: SJ0PR01MB7282.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Oct 2022 09:31:45.0679 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3bc2b170-fd94-476d-b0ce-4229bdc904a7 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: TzDuQI7feM3Mt0VRKP9bnAaRUi0ViXA5FXEyjW97UP2BEWM+5cENn8oLirsFEZJwG3NOM9Ta7kH7CES0PhgIsbJKgiUT6Pw/kMC1XwKzmpA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR0102MB3428 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On I2C_SLAVE_WRITE_REQUESTED event, Slave already ACK'ed on the address phase. But as the backend driver is busy and unable to process any request from Master, issue RxCmdLast for Slave to auto send NACK on next incoming byte. Signed-off-by: Quan Nguyen --- v10: + Issuing RxCmdLast command for all errnos [Wolfram] v9: + Update commit message and add comment to explain the effect of issuing RxCmdLast when Slave busy [Quan] v7 -> v8: + None v6: + New introduced in v6 [Quan] --- drivers/i2c/busses/i2c-aspeed.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/i2c/busses/i2c-aspeed.c b/drivers/i2c/busses/i2c-aspeed.c index 185dedfebbac..c64c381b69b7 100644 --- a/drivers/i2c/busses/i2c-aspeed.c +++ b/drivers/i2c/busses/i2c-aspeed.c @@ -244,6 +244,7 @@ static u32 aspeed_i2c_slave_irq(struct aspeed_i2c_bus *bus, u32 irq_status) u32 command, irq_handled = 0; struct i2c_client *slave = bus->slave; u8 value; + int ret; if (!slave) return 0; @@ -311,7 +312,13 @@ static u32 aspeed_i2c_slave_irq(struct aspeed_i2c_bus *bus, u32 irq_status) break; case ASPEED_I2C_SLAVE_WRITE_REQUESTED: bus->slave_state = ASPEED_I2C_SLAVE_WRITE_RECEIVED; - i2c_slave_event(slave, I2C_SLAVE_WRITE_REQUESTED, &value); + ret = i2c_slave_event(slave, I2C_SLAVE_WRITE_REQUESTED, &value); + /* + * Slave ACK's on this address phase already but as the backend driver + * returns an errno, the bus driver should nack the next incoming byte. + */ + if (ret < 0) + writel(ASPEED_I2CD_M_S_RX_CMD_LAST, bus->base + ASPEED_I2C_CMD_REG); break; case ASPEED_I2C_SLAVE_WRITE_RECEIVED: i2c_slave_event(slave, I2C_SLAVE_WRITE_RECEIVED, &value);