Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1265906ybl; Wed, 4 Dec 2019 21:13:50 -0800 (PST) X-Google-Smtp-Source: APXvYqxqQI1HU53StPw14j8KAr+1OttR6rFISBQA39woHDQ1KihXjJJozOZ4qtxxeYcIru+rDI5S X-Received: by 2002:a05:6808:8ed:: with SMTP id d13mr5454035oic.93.1575522830157; Wed, 04 Dec 2019 21:13:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575522830; cv=none; d=google.com; s=arc-20160816; b=r6yEhATgiWoevNC8CIvfVyEp3YSwtS/v3bTY3irItzENiArWDiF82BOu2At7XfNKNo 9iaJWk/GoQyhS+fI7l2pBA1mPY0i4dpeVObMmQxrGLryZzh43HSJmWzUP87vWbuIIqp7 2+/9u3QRX61pFqSOt5o1eUU+oUA6W2mvdRagFAa223I0KLmIVI70xkofyRqzLQLbh24h 9SDt9r58UkIbz+sbAl0toC3FNps17MaMo7vtnwayIpUmJLYHGJiPj3CfnkXdDTS+iqF4 5ddbePBnJRdNqQt/Dnjwyr7Ciqjkz2TzCqHzP+J/h/ADq9rTV2GZ8yrlbSCJ3WXVVnzf PxHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:subject:cc:to:from:date:references :in-reply-to:message-id:mime-version:user-agent:dkim-signature :dkim-signature; bh=OcGOcjgbjDbXhRFRmTxXVWekMCp8pr9sY/eGCy50+pc=; b=VI9EV1nc0T6DD8Yd6H81JM3lWnP6Ha8ZooExIj0wJBNDmGYeQjURoM3IEyoX0AiOId xGVXrXnLPFDWQjuP9bmbuDgPwb5LFm8yFSFwOblPX9S0OXYBlzaChmaCNqjK/7pwIm1p frEhdzXU2WwtKMtaskJs7SuPDzEkUIORztecHykxsljBF5EJ3izkLqv3dLYkFPukBRba K069gl8C9v9ma/eIbbb15yGiKJ5f5Qp2vK4b77GWfnm97a2SAYcBUX7S7Jh50OHvG9lU 13N1pCMuy7ML+J1B5FdhDMIzrbFK45oLjR3TwGZxvoUaqGLYqZY+CuQgi3uFuOnmiKeQ waMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@aj.id.au header.s=fm1 header.b=IGgGGX6n; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=VME74QkL; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u9si4329309oib.55.2019.12.04.21.13.34; Wed, 04 Dec 2019 21:13:50 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@aj.id.au header.s=fm1 header.b=IGgGGX6n; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=VME74QkL; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725927AbfLEFM1 (ORCPT + 99 others); Thu, 5 Dec 2019 00:12:27 -0500 Received: from new1-smtp.messagingengine.com ([66.111.4.221]:52283 "EHLO new1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725283AbfLEFM0 (ORCPT ); Thu, 5 Dec 2019 00:12:26 -0500 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailnew.nyi.internal (Postfix) with ESMTP id 38BB51139; Thu, 5 Dec 2019 00:12:25 -0500 (EST) Received: from imap2 ([10.202.2.52]) by compute4.internal (MEProxy); Thu, 05 Dec 2019 00:12:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aj.id.au; h= mime-version:message-id:in-reply-to:references:date:from:to:cc :subject:content-type; s=fm1; bh=OcGOcjgbjDbXhRFRmTxXVWekMCp8pr9 sY/eGCy50+pc=; b=IGgGGX6nygzYeMRAuPtYZw3fiM0jvZb9PtW2O25Fg0pmjgn UVQC50cgtaBSI6cLxgZ3A+TbwgAd02qhI5z9bLJLsfAUipsJx6TChIwebpF9UUab cJJZ+oWYn5bkgosbpuoupFO5JqycFjcK2IewpP07vYnu6uF9nrwvVXYv0l/fkJcF skfECRNxr15xRbLyrpnJl9tzeg+vUrhA2NjV1VK3z7s7SrFmd4A5T2bsC4PKGe3+ YsIA9Vp4cMhPdFZ3O82yrr27GoP35csRuMxY4wpcyfMbvta6Za1e5LABYpJXOyp7 B9xfz3qQqd/sz/kj26hUot9xtgh76Mb0QphLfyw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type: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=fm1; bh=OcGOcj gbjDbXhRFRmTxXVWekMCp8pr9sY/eGCy50+pc=; b=VME74QkLeVUgjLL9EdP3nx jdqmJ4I7jplAb8AZesVe4aXcvuy6a3pKBHXLd1u98LA39Io4PVTbDNhFInPvlNFN DAQ7tvSiS7BfG3YJlc2GLbvTtYAykQGbN57Neznky3DeDImYdQ8fnHrn9CYI4nwq qt/8BCJtutVQ7sO5ERTAB6IjhtvU+Q+cFrg43QeR5BKC0EPfBLxYUYK+FQYGuMS5 Mfs1ev+/SUnfd+Mp2A4pVOVt1gOCyfflw/79wIEU8p6YI3ZnJofqt9bUR9jrrZ4n vm/CvPurJeo1yyLcUpjnEG8kj11zxDeSnRNhqYu81KIV6v9Rqncbmr/3SToREmuw == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrudektddgjeelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvffutgesthdtredtreerjeenucfhrhhomhepfdetnhgu rhgvficulfgvfhhfvghrhidfuceorghnughrvgifsegrjhdrihgurdgruheqnecurfgrrh grmhepmhgrihhlfhhrohhmpegrnhgurhgvfiesrghjrdhiugdrrghunecuvehluhhsthgv rhfuihiivgeptd X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id 740ECE00A2; Thu, 5 Dec 2019 00:12:22 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.1.7-612-g13027cc-fmstable-20191203v1 Mime-Version: 1.0 Message-Id: <40d554c0-de62-4d45-bbcc-dd3a3aa12a65@www.fastmail.com> In-Reply-To: References: <3da2492c244962c27b21aad87bfa6bf74f568f1d.1575376664.git-series.andrew@aj.id.au> Date: Thu, 05 Dec 2019 15:43:39 +1030 From: "Andrew Jeffery" To: "Rob Herring" Cc: openipmi-developer@lists.sourceforge.net, "Corey Minyard" , "Mark Rutland" , "Joel Stanley" , "Arnd Bergmann" , "Greg Kroah-Hartman" , devicetree@vger.kernel.org, "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" , linux-aspeed@lists.ozlabs.org, "linux-kernel@vger.kernel.org" Subject: =?UTF-8?Q?Re:_[PATCH_1/3]_dt-bindings:_ipmi:_aspeed:_Introduce_a_v2_bind?= =?UTF-8?Q?ing_for_KCS?= Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 4 Dec 2019, at 01:01, Rob Herring wrote: > On Tue, Dec 3, 2019 at 6:36 AM Andrew Jeffery wrote: > > > > The v2 binding utilises reg and renames some of the v1 properties. > > > > Signed-off-by: Andrew Jeffery > > --- > > Documentation/devicetree/bindings/ipmi/aspeed-kcs-bmc.txt | 20 +++++--- > > 1 file changed, 14 insertions(+), 6 deletions(-) > > > > diff --git a/Documentation/devicetree/bindings/ipmi/aspeed-kcs-bmc.txt b/Documentation/devicetree/bindings/ipmi/aspeed-kcs-bmc.txt > > index d98a9bf45d6c..76b180ebbde4 100644 > > --- a/Documentation/devicetree/bindings/ipmi/aspeed-kcs-bmc.txt > > +++ b/Documentation/devicetree/bindings/ipmi/aspeed-kcs-bmc.txt > > @@ -1,9 +1,10 @@ > > -* Aspeed KCS (Keyboard Controller Style) IPMI interface > > +# 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" > > @@ -12,14 +13,21 @@ Required properties: > > - 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 > > +- slave-reg : The host CPU IO map address > > aspeed,slave-reg I don't agree, as it's not an aspeed-specific behaviour. This property controls where the device appears in the host's LPC IO address space, which is a common problem for any LPC IO device exposed by the BMC to the host. > > > > > Example: > > > > - kcs3: kcs3@0 { > > - compatible = "aspeed,ast2500-kcs-bmc"; > > - reg = <0x0 0x80>; > > + kcs3: kcs@24 { > > + compatible = "aspeed,ast2500-kcs-bmc-v2"; > > + reg = <0x24 0x1>, <0x30 0x1>, <0x3c 0x1>; > > What are the other registers in this address space? I'm not so sure > this is an improvement if you end up with a bunch of nodes with single > registers. Put into practice the bindings give the following patch: on the AST2500: diff --git a/arch/arm/boot/dts/aspeed-g5.dtsi b/arch/arm/boot/dts/aspeed-g5.dtsi index e8feb8b66a2f..5d51f469cbf0 100644 --- a/arch/arm/boot/dts/aspeed-g5.dtsi +++ b/arch/arm/boot/dts/aspeed-g5.dtsi @@ -399,22 +399,22 @@ #size-cells = <1>; ranges = <0x0 0x0 0x80>; - kcs1: kcs1@0 { - compatible = "aspeed,ast2500-kcs-bmc"; + kcs1: kcs@24 { + compatible = "aspeed,ast2500-kcs-bmc-v2"; + reg = <0x24 0x1>, <0x30 0x1>, <0x3c 0x1>; interrupts = <8>; - kcs_chan = <1>; status = "disabled"; }; - kcs2: kcs2@0 { - compatible = "aspeed,ast2500-kcs-bmc"; + kcs2: kcs@28 { + compatible = "aspeed,ast2500-kcs-bmc-v2"; + reg = <0x28 0x1>, <0x34 0x1>, <0x40 0x1>; interrupts = <8>; - kcs_chan = <2>; status = "disabled"; }; - kcs3: kcs3@0 { - compatible = "aspeed,ast2500-kcs-bmc"; + kcs3: kcs@2c { + compatible = "aspeed,ast2500-kcs-bmc-v2"; + reg = <0x2c 0x1>, <0x38 0x1>, <0x44 0x1>; interrupts = <8>; - kcs_chan = <3>; status = "disabled"; }; }; @@ -428,10 +428,10 @@ #size-cells = <1>; ranges = <0x0 0x80 0x1e0>; - kcs4: kcs4@0 { - compatible = "aspeed,ast2500-kcs-bmc"; + kcs4: kcs@94 { + compatible = "aspeed,ast2500-kcs-bmc-v2"; + reg = <0x94 0x1>, <0x98 0x1>, <0x9c 0x1>; interrupts = <8>; - kcs_chan = <4>; status = "disabled"; }; The aim is to fix these warnings which appear for every aspeed-based devicetree: arch/arm/boot/dts/aspeed-g5.dtsi:376.19-381.8: Warning (unit_address_vs_reg): /ahb/apb/lpc@1e789000/lpc-bmc@0/kcs1@0: node has a unit name, but no reg property arch/arm/boot/dts/aspeed-g5.dtsi:382.19-387.8: Warning (unit_address_vs_reg): /ahb/apb/lpc@1e789000/lpc-bmc@0/kcs2@0: node has a unit name, but no reg property arch/arm/boot/dts/aspeed-g5.dtsi:388.19-393.8: Warning (unit_address_vs_reg): /ahb/apb/lpc@1e789000/lpc-bmc@0/kcs3@0: node has a unit name, but no reg property arch/arm/boot/dts/aspeed-g5.dtsi:405.19-410.8: Warning (unit_address_vs_reg): /ahb/apb/lpc@1e789000/lpc-host@80/kcs4@0: node has a unit name, but no reg property arch/arm/boot/dts/aspeed-g5.dtsi:376.19-381.8: Warning (unique_unit_address): /ahb/apb/lpc@1e789000/lpc-bmc@0/kcs1@0: duplicate unit-address (also used in node /ahb/apb/lpc@1e789000/lpc-bmc@0/kcs2@0) arch/arm/boot/dts/aspeed-g5.dtsi:376.19-381.8: Warning (unique_unit_address): /ahb/apb/lpc@1e789000/lpc-bmc@0/kcs1@0: duplicate unit-address (also used in node /ahb/apb/lpc@1e789000/lpc-bmc@0/kcs3@0) arch/arm/boot/dts/aspeed-g5.dtsi:382.19-387.8: Warning (unique_unit_address): /ahb/apb/lpc@1e789000/lpc-bmc@0/kcs2@0: duplicate unit-address (also used in node /ahb/apb/lpc@1e789000/lpc-bmc@0/kcs3@0) arch/arm/boot/dts/aspeed-g5.dtsi:405.19-410.8: Warning (unique_unit_address): /ahb/apb/lpc@1e789000/lpc-host@80/kcs4@0: duplicate unit-address (also used in node /ahb/apb/lpc@1e789000/lpc-host@80/lpc-ctrl@0) Andrew