This patch set adds LPC BIOS Post code (BPC) support for the
Nuvoton NPCM Baseboard Management Controller (BMC).
Nuvoton BMC NPCM LPC BIOS Post Code (BPC) monitoring two
configurable I/O addresses written by the host on the
Low Pin Count (LPC) bus, the capture data stored in 128-word FIFO.
NPCM BPC can support capture double words.
The NPCM LPC BPC driver tested on NPCM750 Olympus board and NPCM845 EVB.
Tomer Maimon (2):
dt-binding: soc: nuvoton: Add NPCM BPC LPC documentation
soc: nuvoton: add NPCM LPC BPC driver
.../bindings/soc/nuvoton/npcm-lpc-bpc.yaml | 112 +++++
drivers/soc/Kconfig | 1 +
drivers/soc/Makefile | 1 +
drivers/soc/nuvoton/Kconfig | 24 ++
drivers/soc/nuvoton/Makefile | 3 +
drivers/soc/nuvoton/npcm-lpc-bpc.c | 396 ++++++++++++++++++
6 files changed, 537 insertions(+)
create mode 100644 Documentation/devicetree/bindings/soc/nuvoton/npcm-lpc-bpc.yaml
create mode 100644 drivers/soc/nuvoton/Kconfig
create mode 100644 drivers/soc/nuvoton/Makefile
create mode 100644 drivers/soc/nuvoton/npcm-lpc-bpc.c
--
2.33.0
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 <[email protected]>
---
.../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
@@ -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 <[email protected]>
+
+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>;
+ };
+ };
+...
--
2.33.0
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 <[email protected]>
> ---
> .../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 <[email protected]>
> +
> +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
<[email protected]> 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 <[email protected]>
> > ---
> > .../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 <[email protected]>
> > +
> > +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
> <[email protected]> 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
<[email protected]> 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
> > <[email protected]> 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
> <[email protected]> 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
>>> <[email protected]> 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
<[email protected]> 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
> > <[email protected]> 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
> >>> <[email protected]> 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 <[email protected]>
> > ---
> > .../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 <[email protected]>
> > +
> > +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