Message ID | 20221122201232.107065-2-tmaimon77@gmail.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp2419010wrr; Tue, 22 Nov 2022 12:15:10 -0800 (PST) X-Google-Smtp-Source: AA0mqf5jRevcosATM4Hpwazw+3WAcyGkHFDJw2LdtrfYnUFfdclKcZHkaWWqi/wvgpAZJAV3aE2o X-Received: by 2002:a17:906:b46:b0:7ad:a030:4816 with SMTP id v6-20020a1709060b4600b007ada0304816mr9054878ejg.765.1669148109885; Tue, 22 Nov 2022 12:15:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669148109; cv=none; d=google.com; s=arc-20160816; b=mzMGhuidPExqMjnOk0MgyHUh8yveqnEQI3wHWspcpE+y9Sy6adToJQ/dy/v/HKKjPZ YsPuk8BXBtjibIX+B//uDLyFq88pWN5YoMzMlKNVkbTTuixv5xC8w1KKBHneuEflNlWx 7fiNIhecpheDjrNSEnVYSd3wGukmT23NQxfCUOKzHBf9+6qhyvmFIkYT7Woj3M+vhmeI A3O0gdi9HPM/7+aoJrgEVS6tXL8bo39YGZquP8C01BMPRiJWvrbbwhQnHv48CDP2CqP6 +kFfme2WB+nnVfmaaedxsPY7QkWJ3BiW6luSbXvqWvgiqTwkcjzUDPOs1zXMAYduunYr U6bA== 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; bh=vD0H5GgU8XE18Wb8QE1cx6hyyX8CS24rUYvZRSBVQ1k=; b=uaeNQdayRcMFDUjHMLKOJwaA3emrttLHz6EJaKvfNoKtO/pzJDy41XRzNY+dyaTewQ de0a2Zc2verFLtghqY+7EXLyXR6PLhxhXWIY7llDnZVnLSUZAlxvbwdOvs9ZAVlkylYp fiNKkP104tpVA3flpMWB39JUM5LHIIV47ZYbx3do9anPaZOXVMmDXXmDrhg3tNUI/pra TmTMvWr8Y09rpKdJj82CArLzs7ItKeLP28UGY3bLqD38b+HmQ09tkHcmfTtAlTW8yonW ht2ojuUC3e5zU06xHLDfFTrqTCD90ai2afshmX69KE55lTtzA3DVS+3hTajWF+4Ot0uJ J5CA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k9-20020a17090646c900b007a7d22b9e0bsi10962047ejs.133.2022.11.22.12.14.45; Tue, 22 Nov 2022 12:15:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234773AbiKVUMw (ORCPT <rfc822;cjcooper78@gmail.com> + 99 others); Tue, 22 Nov 2022 15:12:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53638 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234753AbiKVUMq (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 22 Nov 2022 15:12:46 -0500 Received: from maillog.nuvoton.com (maillog.nuvoton.com [202.39.227.15]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B96326452 for <linux-kernel@vger.kernel.org>; Tue, 22 Nov 2022 12:12:38 -0800 (PST) Received: from NTHCCAS01.nuvoton.com (NTHCCAS01.nuvoton.com [10.1.8.28]) by maillog.nuvoton.com (Postfix) with ESMTP id 534581C81189; Wed, 23 Nov 2022 04:12:37 +0800 (CST) Received: from NTHCCAS03.nuvoton.com (10.1.20.28) by NTHCCAS01.nuvoton.com (10.1.8.28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.7; Wed, 23 Nov 2022 04:12:37 +0800 Received: from NTHCCAS04.nuvoton.com (10.1.8.29) by NTHCCAS03.nuvoton.com (10.1.20.28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1847.3; Wed, 23 Nov 2022 04:12:36 +0800 Received: from taln60.nuvoton.co.il (10.191.1.180) by NTHCCAS04.nuvoton.com (10.1.12.25) with Microsoft SMTP Server id 15.1.2176.2 via Frontend Transport; Wed, 23 Nov 2022 04:12:36 +0800 Received: by taln60.nuvoton.co.il (Postfix, from userid 10070) id BDD6363A1B; Tue, 22 Nov 2022 22:12:35 +0200 (IST) From: Tomer Maimon <tmaimon77@gmail.com> To: <avifishman70@gmail.com>, <tali.perry1@gmail.com>, <joel@jms.id.au>, <venture@google.com>, <yuenn@google.com>, <benjaminfair@google.com>, <arnd@arndb.de>, <hasegawa-hitomi@fujitsu.com>, <marcan@marcan.st>, <nicolas.ferre@microchip.com>, <conor.dooley@microchip.com>, <heiko@sntech.de>, <sven@svenpeter.dev>, <briannorris@chromium.org>, <robh+dt@kernel.org>, <krzysztof.kozlowski+dt@linaro.org> CC: <openbmc@lists.ozlabs.org>, <linux-kernel@vger.kernel.org>, <devicetree@vger.kernel.org>, Tomer Maimon <tmaimon77@gmail.com> Subject: [PATCH v1 1/2] dt-binding: soc: nuvoton: Add NPCM BPC LPC documentation Date: Tue, 22 Nov 2022 22:12:31 +0200 Message-ID: <20221122201232.107065-2-tmaimon77@gmail.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20221122201232.107065-1-tmaimon77@gmail.com> References: <20221122201232.107065-1-tmaimon77@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=0.5 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FORGED_GMAIL_RCVD,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,NML_ADSP_CUSTOM_MED,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750228648640402590?= X-GMAIL-MSGID: =?utf-8?q?1750228648640402590?= |
Series |
soc: add NPCM LPC BPC driver support
|
|
Commit Message
Tomer Maimon
Nov. 22, 2022, 8:12 p.m. UTC
Added device tree binding documentation for Nuvoton BMC NPCM BIOS Post
Code (BPC).
The NPCM BPC monitoring two configurable I/O addresses written by the
host on Low Pin Count (LPC) bus.
Signed-off-by: Tomer Maimon <tmaimon77@gmail.com>
---
.../bindings/soc/nuvoton/npcm-lpc-bpc.yaml | 112 ++++++++++++++++++
1 file changed, 112 insertions(+)
create mode 100644 Documentation/devicetree/bindings/soc/nuvoton/npcm-lpc-bpc.yaml
Comments
On 22/11/2022 21:12, Tomer Maimon wrote: 1. Subject: drop second, redundant "documentation" (dt-bindings are documentation). 2. Use subject prefixes matching the subsystem (git log --oneline -- ...). > Added device tree binding documentation for Nuvoton BMC NPCM BIOS Post > Code (BPC). > > The NPCM BPC monitoring two configurable I/O addresses written by the > host on Low Pin Count (LPC) bus. > > Signed-off-by: Tomer Maimon <tmaimon77@gmail.com> > --- > .../bindings/soc/nuvoton/npcm-lpc-bpc.yaml | 112 ++++++++++++++++++ > 1 file changed, 112 insertions(+) > create mode 100644 Documentation/devicetree/bindings/soc/nuvoton/npcm-lpc-bpc.yaml > > diff --git a/Documentation/devicetree/bindings/soc/nuvoton/npcm-lpc-bpc.yaml b/Documentation/devicetree/bindings/soc/nuvoton/npcm-lpc-bpc.yaml > new file mode 100644 > index 000000000000..2c8e66546891 > --- /dev/null > +++ b/Documentation/devicetree/bindings/soc/nuvoton/npcm-lpc-bpc.yaml Filename should match compatibles, at least in the "vendor,device" style, so for example: nuvoton,lpc.yaml > @@ -0,0 +1,112 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/soc/nuvoton/npcm-lpc-bpc.yaml# LPC is a generic bus, so this should not be in "soc" directory. Where? Depends what is this... Generic bus bindings could be in "bus" directory or dedicated "lpc", if we have more of these. > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Nuvoton Low Pin Count (LPC) Bus Controller > + > +maintainers: > + - Tomer Maimon <tmaimon77@gmail.com> > + > +description: > + The Low Pin Count (LPC) is a low bandwidth bus that is used to connect > + peripherals around the CPU and to replace the Industry Standard Architecture > + (ISA) bus. You need to decide whether you describe here bus, bus controller or device on the bus. > + > + The Nuvoton NPCM LPC bus is a bridge of host CPU to a several of peripheral > + devices. LPC bus is a bridge? It's either incorrect or so generic that every bus is a "bridge"? > + > +properties: > + compatible: > + items: > + - enum: > + - nuvoton,npcm750-lpc > + - nuvoton,npcm845-lpc > + - const: simple-mfd > + - const: syscon > + > + reg: > + maxItems: 1 > + > + "#address-cells": > + const: 1 > + > + "#size-cells": > + const: 1 > + > + ranges: true > + > +patternProperties: > + "^lpc_bpc@[0-9a-f]+$": No underscores in node names. Generic node names, so maybe "bpc" This also does not match your example at all. > + type: object > + additionalProperties: false > + > + description: > + Nuvoton BMC NPCM BIOS Post Code (BPC) monitoring two configurable I/O > + addresses written by the host on the Low Pin Count (LPC) bus, the capure typo: capture > + data stored in 128-word FIFO. > + > + NPCM BPC supports capture double words, when using capture > + double word only I/O address 1 is monitored. This sentence is not grammatically correct. BPC supports capturing double words when using double word capturing? Aren't these two sentences? > + > + properties: > + compatible: > + items: No items here. > + - enum: > + - nuvoton,npcm750-lpc-bpc > + - nuvoton,npcm845-lpc-bpc > + > + reg: > + maxItems: 1 > + > + interrupts: > + maxItems: 1 > + > + nuvoton,monitor-ports: > + $ref: /schemas/types.yaml#/definitions/uint32-array > + description: > + Contain monitor I/O addresses, at least one monitor I/O address Contains But you need to explain what are these... I/O addresses on the bus? > + required. > + > + nuvoton,bpc-en-dwcapture: > + description: If present, Enable capture double words support. Is it the same as reg-io-width? > + type: boolean > + > + required: > + - compatible > + - reg > + - interrupts > + - nuvoton,monitor-ports > + > +required: > + - compatible > + - reg > + - "#address-cells" > + - "#size-cells" > + - ranges > + > +additionalProperties: > + type: object No, only bus schemas could have it. Here additionalProperties: false. It seems there are already few LPC controllers and all are put in different places: Documentation/devicetree/bindings/mfd/aspeed-lpc.yaml Documentation/devicetree/bindings/arm/hisilicon/low-pin-count.yaml Maybe Rob why this was made not really as two bindings - for bus controller and devices? Best regards, Krzysztof
Hi Krzysztof, Thanks a lot for your comments. On Wed, 23 Nov 2022 at 12:03, Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote: > > On 22/11/2022 21:12, Tomer Maimon wrote: > > 1. Subject: drop second, redundant "documentation" (dt-bindings are > documentation). O.K. > > 2. Use subject prefixes matching the subsystem (git log --oneline -- ...). this is what I did dt-binding: soc: nuvoton... do you mean dt-binding: nuvoton. > > > Added device tree binding documentation for Nuvoton BMC NPCM BIOS Post > > Code (BPC). > > > > The NPCM BPC monitoring two configurable I/O addresses written by the > > host on Low Pin Count (LPC) bus. > > > > Signed-off-by: Tomer Maimon <tmaimon77@gmail.com> > > --- > > .../bindings/soc/nuvoton/npcm-lpc-bpc.yaml | 112 ++++++++++++++++++ > > 1 file changed, 112 insertions(+) > > create mode 100644 Documentation/devicetree/bindings/soc/nuvoton/npcm-lpc-bpc.yaml > > > > diff --git a/Documentation/devicetree/bindings/soc/nuvoton/npcm-lpc-bpc.yaml b/Documentation/devicetree/bindings/soc/nuvoton/npcm-lpc-bpc.yaml > > new file mode 100644 > > index 000000000000..2c8e66546891 > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/soc/nuvoton/npcm-lpc-bpc.yaml > > Filename should match compatibles, at least in the "vendor,device" > style, so for example: nuvoton,lpc.yaml > > > @@ -0,0 +1,112 @@ > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > > +%YAML 1.2 > > +--- > > +$id: http://devicetree.org/schemas/soc/nuvoton/npcm-lpc-bpc.yaml# > > LPC is a generic bus, so this should not be in "soc" directory. Where? > Depends what is this... Generic bus bindings could be in "bus" directory > or dedicated "lpc", if we have more of these. The BPC can run also on the eSPI bus therefore I think it better to remove the LPC and describe only the BPC module it self. > > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > + > > +title: Nuvoton Low Pin Count (LPC) Bus Controller > > + > > +maintainers: > > + - Tomer Maimon <tmaimon77@gmail.com> > > + > > +description: > > + The Low Pin Count (LPC) is a low bandwidth bus that is used to connect > > + peripherals around the CPU and to replace the Industry Standard Architecture > > + (ISA) bus. > > You need to decide whether you describe here bus, bus controller or > device on the bus. > > > + > > + The Nuvoton NPCM LPC bus is a bridge of host CPU to a several of peripheral > > + devices. > > LPC bus is a bridge? It's either incorrect or so generic that every bus > is a "bridge"? > > > + > > +properties: > > + compatible: > > + items: > > + - enum: > > + - nuvoton,npcm750-lpc > > + - nuvoton,npcm845-lpc > > + - const: simple-mfd > > + - const: syscon > > + > > + reg: > > + maxItems: 1 > > + > > + "#address-cells": > > + const: 1 > > + > > + "#size-cells": > > + const: 1 > > + > > + ranges: true > > + > > +patternProperties: > > + "^lpc_bpc@[0-9a-f]+$": > > No underscores in node names. Generic node names, so maybe "bpc" > > This also does not match your example at all. > > > > + type: object > > + additionalProperties: false > > + > > + description: > > + Nuvoton BMC NPCM BIOS Post Code (BPC) monitoring two configurable I/O > > + addresses written by the host on the Low Pin Count (LPC) bus, the capure > > typo: capture > > > + data stored in 128-word FIFO. > > + > > + NPCM BPC supports capture double words, when using capture > > + double word only I/O address 1 is monitored. > > This sentence is not grammatically correct. BPC supports capturing > double words when using double word capturing? Aren't these two sentences? > > > + > > + properties: > > + compatible: > > + items: > > No items here. > > > + - enum: > > + - nuvoton,npcm750-lpc-bpc > > + - nuvoton,npcm845-lpc-bpc > > + > > + reg: > > + maxItems: 1 > > + > > + interrupts: > > + maxItems: 1 > > + > > + nuvoton,monitor-ports: > > + $ref: /schemas/types.yaml#/definitions/uint32-array > > + description: > > + Contain monitor I/O addresses, at least one monitor I/O address > > Contains > > But you need to explain what are these... I/O addresses on the bus? > > > + required. > > + > > + nuvoton,bpc-en-dwcapture: > > + description: If present, Enable capture double words support. > > Is it the same as reg-io-width? > > > + type: boolean > > + > > + required: > > + - compatible > > + - reg > > + - interrupts > > + - nuvoton,monitor-ports > > + > > +required: > > + - compatible > > + - reg > > + - "#address-cells" > > + - "#size-cells" > > + - ranges > > + > > +additionalProperties: > > + type: object > > No, only bus schemas could have it. Here additionalProperties: false. > > It seems there are already few LPC controllers and all are put in > different places: > Documentation/devicetree/bindings/mfd/aspeed-lpc.yaml > Documentation/devicetree/bindings/arm/hisilicon/low-pin-count.yaml > > Maybe Rob why this was made not really as two bindings - for bus > controller and devices? As mention above, next patch I will describe only the BPC device. > > Best regards, > Krzysztof > In general, I waiting for Arnd approval for adding the NPCM BPC driver to SoC. After Arnd approval, I will send a new patch revision. Best regards, Tomer
On 24/11/2022 16:38, Tomer Maimon wrote: > Hi Krzysztof, > > Thanks a lot for your comments. > > On Wed, 23 Nov 2022 at 12:03, Krzysztof Kozlowski > <krzysztof.kozlowski@linaro.org> wrote: >> >> On 22/11/2022 21:12, Tomer Maimon wrote: >> >> 1. Subject: drop second, redundant "documentation" (dt-bindings are >> documentation). > O.K. >> >> 2. Use subject prefixes matching the subsystem (git log --oneline -- ...). > this is what I did dt-binding: soc: nuvoton... do you mean dt-binding: nuvoton. You didn't run the command, did you? >> >>> Added device tree binding documentation for Nuvoton BMC NPCM BIOS Post >>> Code (BPC). >>> (...) >> >> No, only bus schemas could have it. Here additionalProperties: false. >> >> It seems there are already few LPC controllers and all are put in >> different places: >> Documentation/devicetree/bindings/mfd/aspeed-lpc.yaml >> Documentation/devicetree/bindings/arm/hisilicon/low-pin-count.yaml >> >> Maybe Rob why this was made not really as two bindings - for bus >> controller and devices? > As mention above, next patch I will describe only the BPC device. >> >> Best regards, >> Krzysztof >> > > In general, I waiting for Arnd approval for adding the NPCM BPC driver to SoC. > After Arnd approval, I will send a new patch revision. To be clear - bindings must be accepted (Reviewed or Acked) before driver is. Best regards, Krzysztof
hi Krzysztof, Thanks for your comments. On Thu, 24 Nov 2022 at 18:18, Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote: > > On 24/11/2022 16:38, Tomer Maimon wrote: > > Hi Krzysztof, > > > > Thanks a lot for your comments. > > > > On Wed, 23 Nov 2022 at 12:03, Krzysztof Kozlowski > > <krzysztof.kozlowski@linaro.org> wrote: > >> > >> On 22/11/2022 21:12, Tomer Maimon wrote: > >> > >> 1. Subject: drop second, redundant "documentation" (dt-bindings are > >> documentation). > > O.K. > >> > >> 2. Use subject prefixes matching the subsystem (git log --oneline -- ...). > > this is what I did dt-binding: soc: nuvoton... do you mean dt-binding: nuvoton. > > You didn't run the command, did you? I did run this command "git log --oneline Documentation/devicetree/bindings/soc" and I got this log list e47206d71e67 dt-binding: soc: nuvoton: Add NPCM BPC LPC documentation 121494030c53 dt-bindings: soc: add i.MX93 mediamix blk ctrl 4fed4d20c59b dt-bindings: soc: add i.MX93 SRC c7ebd54158d3 dt-bindings: soc: imx: add i.MX8MP vpu blk ctrl 2345fc8dc2ec dt-bindings: soc: imx: add interconnect property for i.MX8MM vpu blk ctrl c1d9381ce430 dt-bindings: soc: imx: drop minItems for i.MX8MM vpu blk ctrl f3894f969cf5 dt-bindings: soc: mediatek: Add display mutex support for MT6795 b2d7616e13c4 dt-bindings: soc: qcom: apr: add missing properties 301628d80501 ASoC: dt-bindings: qcom,q6adm: convert to dtschema 7b0ad4629d1f ASoC: dt-bindings: qcom,q6asm: convert to dtschema b2496de1dfdd dt-bindings: soc: qcom: apr: correct service children most of the subjects are similar to what I did, if it is not correct please let me know exactly what to write (beside the word documentation that I will remove) > > >> > >>> Added device tree binding documentation for Nuvoton BMC NPCM BIOS Post > >>> Code (BPC). > >>> > > > (...) > > > >> > >> No, only bus schemas could have it. Here additionalProperties: false. > >> > >> It seems there are already few LPC controllers and all are put in > >> different places: > >> Documentation/devicetree/bindings/mfd/aspeed-lpc.yaml > >> Documentation/devicetree/bindings/arm/hisilicon/low-pin-count.yaml > >> > >> Maybe Rob why this was made not really as two bindings - for bus > >> controller and devices? > > As mention above, next patch I will describe only the BPC device. > >> > >> Best regards, > >> Krzysztof > >> > > > > In general, I waiting for Arnd approval for adding the NPCM BPC driver to SoC. > > After Arnd approval, I will send a new patch revision. > > > To be clear - bindings must be accepted (Reviewed or Acked) before > driver is. > > Best regards, > Krzysztof > Best regards, Tomer
On 29/11/2022 17:44, Tomer Maimon wrote: > hi Krzysztof, > > Thanks for your comments. > > On Thu, 24 Nov 2022 at 18:18, Krzysztof Kozlowski > <krzysztof.kozlowski@linaro.org> wrote: >> >> On 24/11/2022 16:38, Tomer Maimon wrote: >>> Hi Krzysztof, >>> >>> Thanks a lot for your comments. >>> >>> On Wed, 23 Nov 2022 at 12:03, Krzysztof Kozlowski >>> <krzysztof.kozlowski@linaro.org> wrote: >>>> >>>> On 22/11/2022 21:12, Tomer Maimon wrote: >>>> >>>> 1. Subject: drop second, redundant "documentation" (dt-bindings are >>>> documentation). >>> O.K. >>>> >>>> 2. Use subject prefixes matching the subsystem (git log --oneline -- ...). >>> this is what I did dt-binding: soc: nuvoton... do you mean dt-binding: nuvoton. >> >> You didn't run the command, did you? > I did run this command "git log --oneline > Documentation/devicetree/bindings/soc" and I got this log list > e47206d71e67 dt-binding: soc: nuvoton: Add NPCM BPC LPC documentation > 121494030c53 dt-bindings: soc: add i.MX93 mediamix blk ctrl > 4fed4d20c59b dt-bindings: soc: add i.MX93 SRC > c7ebd54158d3 dt-bindings: soc: imx: add i.MX8MP vpu blk ctrl > 2345fc8dc2ec dt-bindings: soc: imx: add interconnect property for > i.MX8MM vpu blk ctrl > c1d9381ce430 dt-bindings: soc: imx: drop minItems for i.MX8MM vpu blk ctrl > f3894f969cf5 dt-bindings: soc: mediatek: Add display mutex support for MT6795 > b2d7616e13c4 dt-bindings: soc: qcom: apr: add missing properties > 301628d80501 ASoC: dt-bindings: qcom,q6adm: convert to dtschema > 7b0ad4629d1f ASoC: dt-bindings: qcom,q6asm: convert to dtschema > b2496de1dfdd dt-bindings: soc: qcom: apr: correct service children > > most of the subjects are similar to what I did, if it is not correct > please let me know exactly what to write (beside the word > documentation that I will remove) None of them have "dt-binding", so fix that part. Best regards, Krzysztof
Thanks for your clarification On Wed, 30 Nov 2022 at 10:27, Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote: > > On 29/11/2022 17:44, Tomer Maimon wrote: > > hi Krzysztof, > > > > Thanks for your comments. > > > > On Thu, 24 Nov 2022 at 18:18, Krzysztof Kozlowski > > <krzysztof.kozlowski@linaro.org> wrote: > >> > >> On 24/11/2022 16:38, Tomer Maimon wrote: > >>> Hi Krzysztof, > >>> > >>> Thanks a lot for your comments. > >>> > >>> On Wed, 23 Nov 2022 at 12:03, Krzysztof Kozlowski > >>> <krzysztof.kozlowski@linaro.org> wrote: > >>>> > >>>> On 22/11/2022 21:12, Tomer Maimon wrote: > >>>> > >>>> 1. Subject: drop second, redundant "documentation" (dt-bindings are > >>>> documentation). > >>> O.K. > >>>> > >>>> 2. Use subject prefixes matching the subsystem (git log --oneline -- ...). > >>> this is what I did dt-binding: soc: nuvoton... do you mean dt-binding: nuvoton. > >> > >> You didn't run the command, did you? > > I did run this command "git log --oneline > > Documentation/devicetree/bindings/soc" and I got this log list > > e47206d71e67 dt-binding: soc: nuvoton: Add NPCM BPC LPC documentation > > 121494030c53 dt-bindings: soc: add i.MX93 mediamix blk ctrl > > 4fed4d20c59b dt-bindings: soc: add i.MX93 SRC > > c7ebd54158d3 dt-bindings: soc: imx: add i.MX8MP vpu blk ctrl > > 2345fc8dc2ec dt-bindings: soc: imx: add interconnect property for > > i.MX8MM vpu blk ctrl > > c1d9381ce430 dt-bindings: soc: imx: drop minItems for i.MX8MM vpu blk ctrl > > f3894f969cf5 dt-bindings: soc: mediatek: Add display mutex support for MT6795 > > b2d7616e13c4 dt-bindings: soc: qcom: apr: add missing properties > > 301628d80501 ASoC: dt-bindings: qcom,q6adm: convert to dtschema > > 7b0ad4629d1f ASoC: dt-bindings: qcom,q6asm: convert to dtschema > > b2496de1dfdd dt-bindings: soc: qcom: apr: correct service children > > > > most of the subjects are similar to what I did, if it is not correct > > please let me know exactly what to write (beside the word > > documentation that I will remove) > > None of them have "dt-binding", so fix that part. > > Best regards, > Krzysztof >
On Wed, Nov 23, 2022 at 11:03:28AM +0100, Krzysztof Kozlowski wrote: > On 22/11/2022 21:12, Tomer Maimon wrote: > > 1. Subject: drop second, redundant "documentation" (dt-bindings are > documentation). > > 2. Use subject prefixes matching the subsystem (git log --oneline -- ...). > > > Added device tree binding documentation for Nuvoton BMC NPCM BIOS Post > > Code (BPC). > > > > The NPCM BPC monitoring two configurable I/O addresses written by the > > host on Low Pin Count (LPC) bus. > > > > Signed-off-by: Tomer Maimon <tmaimon77@gmail.com> > > --- > > .../bindings/soc/nuvoton/npcm-lpc-bpc.yaml | 112 ++++++++++++++++++ > > 1 file changed, 112 insertions(+) > > create mode 100644 Documentation/devicetree/bindings/soc/nuvoton/npcm-lpc-bpc.yaml > > > > diff --git a/Documentation/devicetree/bindings/soc/nuvoton/npcm-lpc-bpc.yaml b/Documentation/devicetree/bindings/soc/nuvoton/npcm-lpc-bpc.yaml > > new file mode 100644 > > index 000000000000..2c8e66546891 > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/soc/nuvoton/npcm-lpc-bpc.yaml > > Filename should match compatibles, at least in the "vendor,device" > style, so for example: nuvoton,lpc.yaml > > > @@ -0,0 +1,112 @@ > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > > +%YAML 1.2 > > +--- > > +$id: http://devicetree.org/schemas/soc/nuvoton/npcm-lpc-bpc.yaml# > > LPC is a generic bus, so this should not be in "soc" directory. Where? > Depends what is this... Generic bus bindings could be in "bus" directory > or dedicated "lpc", if we have more of these. > > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > + > > +title: Nuvoton Low Pin Count (LPC) Bus Controller > > + > > +maintainers: > > + - Tomer Maimon <tmaimon77@gmail.com> > > + > > +description: > > + The Low Pin Count (LPC) is a low bandwidth bus that is used to connect > > + peripherals around the CPU and to replace the Industry Standard Architecture > > + (ISA) bus. > > You need to decide whether you describe here bus, bus controller or > device on the bus. > > > + > > + The Nuvoton NPCM LPC bus is a bridge of host CPU to a several of peripheral > > + devices. > > LPC bus is a bridge? It's either incorrect or so generic that every bus > is a "bridge"? > > > + > > +properties: > > + compatible: > > + items: > > + - enum: > > + - nuvoton,npcm750-lpc > > + - nuvoton,npcm845-lpc > > + - const: simple-mfd > > + - const: syscon > > + > > + reg: > > + maxItems: 1 > > + > > + "#address-cells": > > + const: 1 ISA type bus is 2 cells. > > + > > + "#size-cells": > > + const: 1 > > + > > + ranges: true > > + > > +patternProperties: > > + "^lpc_bpc@[0-9a-f]+$": > > No underscores in node names. Generic node names, so maybe "bpc" > > This also does not match your example at all. > > > > + type: object > > + additionalProperties: false > > + > > + description: > > + Nuvoton BMC NPCM BIOS Post Code (BPC) monitoring two configurable I/O > > + addresses written by the host on the Low Pin Count (LPC) bus, the capure > > typo: capture > > > + data stored in 128-word FIFO. > > + > > + NPCM BPC supports capture double words, when using capture > > + double word only I/O address 1 is monitored. > > This sentence is not grammatically correct. BPC supports capturing > double words when using double word capturing? Aren't these two sentences? > > > + > > + properties: > > + compatible: > > + items: > > No items here. > > > + - enum: > > + - nuvoton,npcm750-lpc-bpc > > + - nuvoton,npcm845-lpc-bpc > > + > > + reg: > > + maxItems: 1 > > + > > + interrupts: > > + maxItems: 1 > > + > > + nuvoton,monitor-ports: > > + $ref: /schemas/types.yaml#/definitions/uint32-array > > + description: > > + Contain monitor I/O addresses, at least one monitor I/O address > > Contains > > But you need to explain what are these... I/O addresses on the bus? What does 'reg' contain then? > > > + required. > > + > > + nuvoton,bpc-en-dwcapture: > > + description: If present, Enable capture double words support. > > Is it the same as reg-io-width? > > > + type: boolean > > + > > + required: > > + - compatible > > + - reg > > + - interrupts > > + - nuvoton,monitor-ports > > + > > +required: > > + - compatible > > + - reg > > + - "#address-cells" > > + - "#size-cells" > > + - ranges > > + > > +additionalProperties: > > + type: object > > No, only bus schemas could have it. Here additionalProperties: false. > > It seems there are already few LPC controllers and all are put in > different places: > Documentation/devicetree/bindings/mfd/aspeed-lpc.yaml > Documentation/devicetree/bindings/arm/hisilicon/low-pin-count.yaml Always the 3rd instance that gets to restructure things... > Maybe Rob why this was made not really as two bindings - for bus > controller and devices? This schema should certainly be split between LPC and BPC. As LPC is logically ISA bus, there is an ISA bus schema in dtschema already which should be referenced. Rob
diff --git a/Documentation/devicetree/bindings/soc/nuvoton/npcm-lpc-bpc.yaml b/Documentation/devicetree/bindings/soc/nuvoton/npcm-lpc-bpc.yaml new file mode 100644 index 000000000000..2c8e66546891 --- /dev/null +++ b/Documentation/devicetree/bindings/soc/nuvoton/npcm-lpc-bpc.yaml @@ -0,0 +1,112 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/soc/nuvoton/npcm-lpc-bpc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Nuvoton Low Pin Count (LPC) Bus Controller + +maintainers: + - Tomer Maimon <tmaimon77@gmail.com> + +description: + The Low Pin Count (LPC) is a low bandwidth bus that is used to connect + peripherals around the CPU and to replace the Industry Standard Architecture + (ISA) bus. + + The Nuvoton NPCM LPC bus is a bridge of host CPU to a several of peripheral + devices. + +properties: + compatible: + items: + - enum: + - nuvoton,npcm750-lpc + - nuvoton,npcm845-lpc + - const: simple-mfd + - const: syscon + + reg: + maxItems: 1 + + "#address-cells": + const: 1 + + "#size-cells": + const: 1 + + ranges: true + +patternProperties: + "^lpc_bpc@[0-9a-f]+$": + type: object + additionalProperties: false + + description: + Nuvoton BMC NPCM BIOS Post Code (BPC) monitoring two configurable I/O + addresses written by the host on the Low Pin Count (LPC) bus, the capure + data stored in 128-word FIFO. + + NPCM BPC supports capture double words, when using capture + double word only I/O address 1 is monitored. + + properties: + compatible: + items: + - enum: + - nuvoton,npcm750-lpc-bpc + - nuvoton,npcm845-lpc-bpc + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + nuvoton,monitor-ports: + $ref: /schemas/types.yaml#/definitions/uint32-array + description: + Contain monitor I/O addresses, at least one monitor I/O address + required. + + nuvoton,bpc-en-dwcapture: + description: If present, Enable capture double words support. + type: boolean + + required: + - compatible + - reg + - interrupts + - nuvoton,monitor-ports + +required: + - compatible + - reg + - "#address-cells" + - "#size-cells" + - ranges + +additionalProperties: + type: object + +examples: + - | + #include <dt-bindings/interrupt-controller/irq.h> + #include <dt-bindings/interrupt-controller/arm-gic.h> + + lpc: lpc@f0007000 { + compatible = "nuvoton,npcm750-lpc", "simple-mfd", "syscon"; + reg = <0xf0007000 0x1000>; + + #address-cells = <1>; + #size-cells = <1>; + ranges = <0x0 0xf0007000 0x1000>; + + lpc_snoop: lpc-snoop@40 { + compatible = "nuvoton,npcm750-lpc-bpc"; + reg = <0x40 0x20>; + interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>; + nuvoton,monitor-ports = <0x80>; + }; + }; +...