Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2304483pxj; Sun, 9 May 2021 22:48:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyElLSabXK4SHNyxgnngSRJ4KibIzToB0SPDGE7Xz0OmGkUQnlp4LD6nY+Mxq3P2J3UVuCD X-Received: by 2002:aa7:d408:: with SMTP id z8mr27137873edq.286.1620625731811; Sun, 09 May 2021 22:48:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620625731; cv=none; d=google.com; s=arc-20160816; b=geQ3dpcU/w+MBFry/DHFxh8L1SU4L2i0E9AN2fz0SAYLXI4MiletnTIXCttpWUCkeV 7QvIRCo3jY0FXKM6Yh/KVV4Dz5lpuKeBcUGZ1C8GEDE2jJm6EowUIDLCi1x0N1QU/XZO g0ruyaIBZctDp7ZAEWjUO+/9JiULTzhIsnJnkpRsak9H0v7+GV+JSswdbCPm9AKqPE8U bThGVv5g/n+KXW7VARk9n/AOMJzBxViGiKZatgPkhqQeloWDskyXdYtuynHtLfTx2EV1 U6kp/ibxZCKXAAX29VpLTNuyeSqz4a71zSSMCK8/GeA3fjm0CMvBA9kfuNLSyYCXVnT+ B8pA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-signature; bh=cnao/xXDBi5UtisNNxs5pmuioumkhfUO3U6beHJwaRg=; b=xkfVqAPsK+ZtzMG+qC4Jb8ejffo9LKnUWABjNDjzZPGiOCg1w4iv5HcZjkfBi1Jg7J 4NPrEy5L1/9w1KJcxl0WnpO6msu65LDLOQ77s1rZXhJgdSEZNVD5CTLDP6UnF78zNLwM /oD7gh1tRsgb6V6lRg+ldmQGgWCmrtT6N09o/hSp11OEBz8NERWwSsB11EY97ct4wVdL n0sLnFVLO1EKm7uTVZCKu4J3DUhJm+kuM2YmvzXRBQ0PRYr9nmG58HgzPFJwsVpS4V8n zJ4WpTXT6wuqGlZPeHOO0xtca3Tf+WxpSwppyh3yf5yMDMqPFLhkTTc/2UDoF6wPGUWc 3dNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@aj.id.au header.s=fm2 header.b=e5nklvh4; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=Cirz+97x; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g7si10220916edy.361.2021.05.09.22.48.29; Sun, 09 May 2021 22:48:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@aj.id.au header.s=fm2 header.b=e5nklvh4; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=Cirz+97x; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230031AbhEJFp2 (ORCPT + 99 others); Mon, 10 May 2021 01:45:28 -0400 Received: from new1-smtp.messagingengine.com ([66.111.4.221]:57071 "EHLO new1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229608AbhEJFp1 (ORCPT ); Mon, 10 May 2021 01:45:27 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailnew.nyi.internal (Postfix) with ESMTP id DA1A85803EE; Mon, 10 May 2021 01:44:22 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Mon, 10 May 2021 01:44:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aj.id.au; h=from :to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm2; bh=cnao/xXDBi5Ut isNNxs5pmuioumkhfUO3U6beHJwaRg=; b=e5nklvh4SQ4zz8l9uTze8tyOci7DB eUXY4h43tR+/ZsmfQ30jJg9np4SCLUSgCRKSUOfvBU7Od8yXTEZQ1sDu+L2R8C+h f7wrwy964O7rDooG/h1vboXRS7rHw67w3qHFUIX19tMMo7jyzznFj7NBbbdseJTg idBwerMitl0fXc/OZQk45D3bnGZeDVXtuAmlDWnACfwMbAqyUqqKXQbYWVT4wyDN 7L3PgYBsj82lta3P4Ac5vA7QzmzRak4kdGM8SLHLLYYKNiyMvdIs1QSmPDQKUw+Q iOf0FXr4NkwR6EIAY1NjMYKBruly69c/Ud1EV5d6oJg56sRxCx5evyGgQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; bh=cnao/xXDBi5UtisNNxs5pmuioumkhfUO3U6beHJwaRg=; b=Cirz+97x R4YGgjnQZ9/WWXFqWUVWzD/y1eDzp1To7E4wAjat3cjmhZM4XOkhWdzEbFj40atQ 61LJ+ZU/k0uMnmAUOXQHu97/Mo3V0v8vIXJ2F7mvVbYVj8aSi2OfEeGomaG7hLaH s0kpmVriEKLYIVLdUqArHqfyQ+vii/hEpGEDMzT75Jm/v+8AHrPo8M9zOtOg82nU J6LOHBYdCsbi8BZxdq3jSLXks54zqTnl0XOd1aqOfYyn1TDsADsO9FTMrGdC+HIb vhWsU7Ri7gHQWO0sBL+9tzRs71OVwziDbTd/Tj3HRDjI4jB3bLpHii2Pwx0tg7C5 LICKFhH+cI1y3Q== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrvdegjedgleeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpeetnhgurhgv ficulfgvfhhfvghrhicuoegrnhgurhgvfiesrghjrdhiugdrrghuqeenucggtffrrghtth gvrhhnpeeluedvvedtgffggefggfeugeevgffhjeefiedtvdehvdfhtefftefffeeihfev vdenucffohhmrghinhepuggvvhhitggvthhrvggvrdhorhhgnecukfhppedvtdefrdehje drvdduhedrkeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhr ohhmpegrnhgurhgvfiesrghjrdhiugdrrghu X-ME-Proxy: Received: from localhost.localdomain (unknown [203.57.215.8]) by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 10 May 2021 01:44:16 -0400 (EDT) From: Andrew Jeffery To: openipmi-developer@lists.sourceforge.net, openbmc@lists.ozlabs.org, minyard@acm.org Cc: devicetree@vger.kernel.org, tmaimon77@gmail.com, linux-aspeed@lists.ozlabs.org, avifishman70@gmail.com, venture@google.com, linux-kernel@vger.kernel.org, tali.perry1@gmail.com, robh+dt@kernel.org, chiawei_wang@aspeedtech.com, linux-arm-kernel@lists.infradead.org, benjaminfair@google.com, arnd@arndb.de, zweiss@equinix.com, Rob Herring Subject: [PATCH v3 12/16] dt-bindings: ipmi: Convert ASPEED KCS binding to schema Date: Mon, 10 May 2021 15:12:09 +0930 Message-Id: <20210510054213.1610760-13-andrew@aj.id.au> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210510054213.1610760-1-andrew@aj.id.au> References: <20210510054213.1610760-1-andrew@aj.id.au> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Given the deprecated binding, improve the ability to detect issues in the platform devicetrees. Further, a subsequent patch will introduce a new interrupts property for specifying SerIRQ behaviour, so convert before we do any further additions. Signed-off-by: Andrew Jeffery Reviewed-by: Rob Herring Reviewed-by: Zev Weiss --- .../bindings/ipmi/aspeed,ast2400-kcs-bmc.yaml | 92 +++++++++++++++++++ .../bindings/ipmi/aspeed-kcs-bmc.txt | 33 ------- 2 files changed, 92 insertions(+), 33 deletions(-) create mode 100644 Documentation/devicetree/bindings/ipmi/aspeed,ast2400-kcs-bmc.yaml delete mode 100644 Documentation/devicetree/bindings/ipmi/aspeed-kcs-bmc.txt diff --git a/Documentation/devicetree/bindings/ipmi/aspeed,ast2400-kcs-bmc.yaml b/Documentation/devicetree/bindings/ipmi/aspeed,ast2400-kcs-bmc.yaml new file mode 100644 index 000000000000..697ca575454f --- /dev/null +++ b/Documentation/devicetree/bindings/ipmi/aspeed,ast2400-kcs-bmc.yaml @@ -0,0 +1,92 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/ipmi/aspeed,ast2400-kcs-bmc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: ASPEED BMC KCS Devices + +maintainers: + - Andrew Jeffery + +description: | + The Aspeed BMC SoCs typically use the Keyboard-Controller-Style (KCS) + interfaces on the LPC bus for in-band IPMI communication with their host. + +properties: + compatible: + oneOf: + - description: Channel ID derived from reg + items: + enum: + - aspeed,ast2400-kcs-bmc-v2 + - aspeed,ast2500-kcs-bmc-v2 + - aspeed,ast2600-kcs-bmc + + - description: Old-style with explicit channel ID, no reg + deprecated: true + items: + enum: + - aspeed,ast2400-kcs-bmc + - aspeed,ast2500-kcs-bmc + + interrupts: + maxItems: 1 + + reg: + # maxItems: 3 + items: + - description: IDR register + - description: ODR register + - description: STR register + + aspeed,lpc-io-reg: + $ref: '/schemas/types.yaml#/definitions/uint32-array' + minItems: 1 + maxItems: 2 + description: | + The host CPU LPC IO data and status addresses for the device. For most + channels the status address is derived from the data address, but the + status address may be optionally provided. + + kcs_chan: + deprecated: true + $ref: '/schemas/types.yaml#/definitions/uint32' + description: The LPC channel number in the controller + + kcs_addr: + deprecated: true + $ref: '/schemas/types.yaml#/definitions/uint32' + description: The host CPU IO map address + +required: + - compatible + - interrupts + +additionalProperties: false + +allOf: + - if: + properties: + compatible: + contains: + enum: + - aspeed,ast2400-kcs-bmc + - aspeed,ast2500-kcs-bmc + then: + required: + - kcs_chan + - kcs_addr + else: + required: + - reg + - aspeed,lpc-io-reg + +examples: + - | + kcs3: kcs@24 { + compatible = "aspeed,ast2600-kcs-bmc"; + reg = <0x24 0x1>, <0x30 0x1>, <0x3c 0x1>; + aspeed,lpc-io-reg = <0xca2>; + interrupts = <8>; + }; diff --git a/Documentation/devicetree/bindings/ipmi/aspeed-kcs-bmc.txt b/Documentation/devicetree/bindings/ipmi/aspeed-kcs-bmc.txt deleted file mode 100644 index 193e71ca96b0..000000000000 --- a/Documentation/devicetree/bindings/ipmi/aspeed-kcs-bmc.txt +++ /dev/null @@ -1,33 +0,0 @@ -# Aspeed KCS (Keyboard Controller Style) IPMI interface - -The Aspeed SOCs (AST2400 and AST2500) are commonly used as BMCs -(Baseboard Management Controllers) and the KCS interface can be -used to perform in-band IPMI communication with their host. - -## v1 -Required properties: -- compatible : should be one of - "aspeed,ast2400-kcs-bmc" - "aspeed,ast2500-kcs-bmc" -- interrupts : interrupt generated by the controller -- kcs_chan : The LPC channel number in the controller -- kcs_addr : The host CPU IO map address - -## v2 -Required properties: -- compatible : should be one of - "aspeed,ast2400-kcs-bmc-v2" - "aspeed,ast2500-kcs-bmc-v2" -- reg : The address and size of the IDR, ODR and STR registers -- interrupts : interrupt generated by the controller -- aspeed,lpc-io-reg : The host CPU LPC IO address for the device - -Example: - - kcs3: kcs@24 { - compatible = "aspeed,ast2500-kcs-bmc-v2"; - reg = <0x24 0x1>, <0x30 0x1>, <0x3c 0x1>; - aspeed,lpc-reg = <0xca2>; - interrupts = <8>; - status = "okay"; - }; -- 2.27.0