diff mbox series

[26/30,v2] soc: ixp4xx: Add DT bindings for IXP4xx NPE

Message ID 20190221154458.23763-27-linus.walleij@linaro.org
State Superseded
Headers show
Series None | expand

Commit Message

Linus Walleij Feb. 21, 2019, 3:44 p.m. UTC
This adds DT bindings for the Intel IXP4xx Network Processing
Engine (NPE). These are three firmware-executing units found in
the IXP4xx SoC. These bindings use YAML.

Cc: devicetree@vger.kernel.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

---
 ...ntel,ixp4xx-network-processing-engine.yaml | 44 +++++++++++++++++++
 1 file changed, 44 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/firmware/intel,ixp4xx-network-processing-engine.yaml

-- 
2.20.1

Comments

Rob Herring Feb. 21, 2019, 9:48 p.m. UTC | #1
On Thu, Feb 21, 2019 at 9:46 AM Linus Walleij <linus.walleij@linaro.org> wrote:
>

> This adds DT bindings for the Intel IXP4xx Network Processing

> Engine (NPE). These are three firmware-executing units found in

> the IXP4xx SoC. These bindings use YAML.

>

> Cc: devicetree@vger.kernel.org

> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

> ---

>  ...ntel,ixp4xx-network-processing-engine.yaml | 44 +++++++++++++++++++

>  1 file changed, 44 insertions(+)

>  create mode 100644 Documentation/devicetree/bindings/firmware/intel,ixp4xx-network-processing-engine.yaml

>

> diff --git a/Documentation/devicetree/bindings/firmware/intel,ixp4xx-network-processing-engine.yaml b/Documentation/devicetree/bindings/firmware/intel,ixp4xx-network-processing-engine.yaml

> new file mode 100644

> index 000000000000..8cb136c376fb

> --- /dev/null

> +++ b/Documentation/devicetree/bindings/firmware/intel,ixp4xx-network-processing-engine.yaml

> @@ -0,0 +1,44 @@

> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)

> +# Copyright 2019 Linaro Ltd.

> +%YAML 1.2

> +---

> +$id: "http://devicetree.org/schemas/firmware/intel-ixp4xx-network-processing-engine.yaml#"


firmware? firmware/ is for things like psci, optee, etc. I'm not sure
this fits as it has some sort of h/w interface. Wouldn't networking be
a better fit?

> +$schema: "http://devicetree.org/meta-schemas/core.yaml#"

> +

> +title: Intel IXP4xx Network Processing Engine

> +

> +maintainers:

> +  - Linus Walleij <linus.walleij@linaro.org>

> +

> +description: |

> +  On the IXP4xx SoCs, the Network Processing Engine (NPE) is a small

> +  processor that can load a firmware to perform offloading of networking

> +  and crypto tasks. It also manages the MDIO bus to the ethernet PHYs

> +  on the IXP4xx platform. All IXP4xx platforms have three NPEs at

> +  consecutive memory locations. They are all included in the same

> +  device node since they are not independent of each other.

> +

> +properties:

> +  compatible:

> +    oneOf:


oneOf can be dropped.

> +      - items:

> +          - const: intel,ixp4xx-network-processing-engine

> +

> +  reg:

> +    minItems: 3

> +    maxItems: 3


These 2 lines can be dropped. If not specified, they are automatically
added based on how many 'items'.

> +    items:

> +      - description: NPE0 register range

> +      - description: NPE1 register range

> +      - description: NPE2 register range

> +

> +required:

> +  - compatible

> +  - reg

> +

> +examples:

> +  - |

> +    npe@c8006000 {

> +         compatible = "intel,ixp4xx-network-processing-engine";

> +         reg = <0xc8006000 0x1000>, <0xc8007000 0x1000>, <0xc8008000 0x1000>;

> +    };

> --

> 2.20.1

>
Linus Walleij Feb. 22, 2019, 10:37 a.m. UTC | #2
On Thu, Feb 21, 2019 at 10:48 PM Rob Herring <robh@kernel.org> wrote:

> > +$id: "http://devicetree.org/schemas/firmware/intel-ixp4xx-network-processing-engine.yaml#"

>

> firmware? firmware/ is for things like psci, optee, etc. I'm not sure

> this fits as it has some sort of h/w interface. Wouldn't networking be

> a better fit?


You would think so, but the NPE, despite being named something
with "network" and primarily intended for that is also used for e.g.
crypto acceleration which is generic and can as well be used for
disk encryption. Intel names it a "hardware multi-threaded
processor engine".

Each unit has quite elaborate microcode and is clearly containing
its own CPU somekindof, it clearly has a Harvard architecture.

Yours,
Linus Walleij
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/firmware/intel,ixp4xx-network-processing-engine.yaml b/Documentation/devicetree/bindings/firmware/intel,ixp4xx-network-processing-engine.yaml
new file mode 100644
index 000000000000..8cb136c376fb
--- /dev/null
+++ b/Documentation/devicetree/bindings/firmware/intel,ixp4xx-network-processing-engine.yaml
@@ -0,0 +1,44 @@ 
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+# Copyright 2019 Linaro Ltd.
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/firmware/intel-ixp4xx-network-processing-engine.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+
+title: Intel IXP4xx Network Processing Engine
+
+maintainers:
+  - Linus Walleij <linus.walleij@linaro.org>
+
+description: |
+  On the IXP4xx SoCs, the Network Processing Engine (NPE) is a small
+  processor that can load a firmware to perform offloading of networking
+  and crypto tasks. It also manages the MDIO bus to the ethernet PHYs
+  on the IXP4xx platform. All IXP4xx platforms have three NPEs at
+  consecutive memory locations. They are all included in the same
+  device node since they are not independent of each other.
+
+properties:
+  compatible:
+    oneOf:
+      - items:
+          - const: intel,ixp4xx-network-processing-engine
+
+  reg:
+    minItems: 3
+    maxItems: 3
+    items:
+      - description: NPE0 register range
+      - description: NPE1 register range
+      - description: NPE2 register range
+
+required:
+  - compatible
+  - reg
+
+examples:
+  - |
+    npe@c8006000 {
+         compatible = "intel,ixp4xx-network-processing-engine";
+         reg = <0xc8006000 0x1000>, <0xc8007000 0x1000>, <0xc8008000 0x1000>;
+    };