From patchwork Thu May 20 22:30:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 443326 Delivered-To: patch@linaro.org Received: by 2002:a02:7a1b:0:0:0:0:0 with SMTP id a27csp387233jac; Thu, 20 May 2021 15:32:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxGdd0XRdlPnhVIOmATMt8oICY+xouk8TDZRx4W/OMWmyXNc+FGAthlWEK2n27unU7rHoTW X-Received: by 2002:a17:906:1cda:: with SMTP id i26mr7021513ejh.412.1621549952328; Thu, 20 May 2021 15:32:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621549952; cv=none; d=google.com; s=arc-20160816; b=yrMrz5mMezhkcTtB9CJeiqqnY8Gl1smzpcM3FCMsZwAUlqYqU9V6I70SDz6UubBEy9 SYYVsGOFs2fIFPQI70qB8cWipfY67vqcvM0K1i60LwIGzibCwENeOFEd2FEDSTgxKAGD P2GRtS9RgbfVUqAjzUq0+NOVlUNnPtZdHLakJdJo6ZS+0PfxLk1GV08vX6X3TLQyR2jx Hh7oXJ+12w8FCG6rQagbtmNpXQ90XvTjKx1bTbZv24SVC/CK5H4sCXSQz0Zt8K+rChop kzJO/Mo/N2TwTTzwHLmi+z6h3VBBIEmk/TeJfFtYMLKVSlqDYuClHTqDfJd6v8++iGU0 iTQg== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=majFJUgE6kbtYjouc7u3aeKZBiY0X2qXxJpyVqBgA4I=; b=tuFCNsuNMkgcNslnFsZjxQ7bwW44Il9JgpoAChCNE56qez904hu18X5fpJJ2NsuCdi /JwEia7sAJDAdJnL4u1BK96ca1UVtraWvdZHAmNT3LX4JC0MA1GibQwgtSGShK8NNfbR gPuYjFjZbsvI90DsgT/1ohP72OfQY0wPfzoAIr29+CLTLvBUHGWubgXp5qUs81G61k9M Ne3EIiVt06SB+wNCygrWEjnMUjzxciwzHhBS2yFaCpc19dUxlHJxtXJZsL27DYErVb89 Gw+DZuWmIOJH34IeWvIzhXpk9Ck/XBOyAYLHo453h+h+b5wED09wikFKOSGUz+wo30n4 Z2Ng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XnpflCuk; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s14si3250647edd.602.2021.05.20.15.32.31; Thu, 20 May 2021 15:32:32 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-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=@linaro.org header.s=google header.b=XnpflCuk; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231501AbhETWdt (ORCPT + 7 others); Thu, 20 May 2021 18:33:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52414 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230145AbhETWds (ORCPT ); Thu, 20 May 2021 18:33:48 -0400 Received: from mail-lj1-x22b.google.com (mail-lj1-x22b.google.com [IPv6:2a00:1450:4864:20::22b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C570DC061574 for ; Thu, 20 May 2021 15:32:26 -0700 (PDT) Received: by mail-lj1-x22b.google.com with SMTP id c15so21698067ljr.7 for ; Thu, 20 May 2021 15:32:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=majFJUgE6kbtYjouc7u3aeKZBiY0X2qXxJpyVqBgA4I=; b=XnpflCukL3R8O7gOwis5wc0/1nMU+hWZZD/NxnL5PK9KubcLSaxNlLa6ludwyULWKU +vofbgqXilPhT8p5D7380JWthBPiUSIonE/sPEY4TEHJLTWYf4miV7b79WgrORtoj6y5 w6WF7Nie7BRZBhtZv5V1Yqa+Iva/DT1D+INgcy9+yECEI8/965ED+t91hx66ocib8qUY hip3V/kf+An7ywyS2DEUasoGzJrYOVgGGUY4G6Dv7cybkpoNudYOgvbMLo/tNKUAWLwR G7mzQbciqu0jJcRpPcY3Rsr7ci8xihgA3CjapxKTFwMugd7xlWPTxddiVyJtDopdJ0hP nc8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=majFJUgE6kbtYjouc7u3aeKZBiY0X2qXxJpyVqBgA4I=; b=T5ZQKlCFKv6z+ManPG14POPDrec9ndVtLf0w5gAex1AD905UD+BULusg6BMjep4yEp 5f+aS4RgG7VizeR+mJAit6P7ocSbjXtnCzam//9A+4MzexGRKkOGYXNgyGMwPk4coaS2 dacZUXlePcUMWZ4QkzslVdFUjgoLQ6E1y2dMUft8dibaNL2yRGL+iKghdCkXeIoI2Rdq GeWnyjelpm2CFF0ZQ7Yq8yNAXz9ooHyqQs9SQ/nGtB3SD+qymW4m+AVKjCEtLosvCqHW 4zQXe3m2t9H84TcmJfE0fYhBWg+SGQtLH6FFIF/zDFnK57LLdsWNHlh4tbGRx/y2AY8g hNWg== X-Gm-Message-State: AOAM53258WlM3r1v4k2TZkBFrL2SDa/3JnxwpCTvGDSmv+z5E/seR3wg UcbFH4Qt+ndUm6vX4JUnYEPDfA== X-Received: by 2002:a2e:8ec5:: with SMTP id e5mr4661883ljl.325.1621549945045; Thu, 20 May 2021 15:32:25 -0700 (PDT) Received: from localhost.localdomain (c-fdcc225c.014-348-6c756e10.bbcust.telenor.se. [92.34.204.253]) by smtp.gmail.com with ESMTPSA id v1sm419601lfg.141.2021.05.20.15.32.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 May 2021 15:32:24 -0700 (PDT) From: Linus Walleij To: linux-crypto@vger.kernel.org, Herbert Xu , "David S . Miller" , Corentin Labbe Cc: linux-arm-kernel@lists.infradead.org, Imre Kaloz , Krzysztof Halasa , Arnd Bergmann , Linus Walleij , devicetree@vger.kernel.org Subject: [PATCH 2/3 v2] crypto: ixp4xx: Add DT bindings Date: Fri, 21 May 2021 00:30:20 +0200 Message-Id: <20210520223020.731925-1-linus.walleij@linaro.org> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org This adds device tree bindings for the ixp4xx crypto engine. Cc: Corentin Labbe Cc: devicetree@vger.kernel.org Signed-off-by: Linus Walleij --- ChangeLog v1->v2: - Drop the phandle to self, just add an NPE instance number instead. - Add the crypto node to the NPE binding. - Move the example over to the NPE binding where it appears in context. --- .../bindings/crypto/intel,ixp4xx-crypto.yaml | 46 +++++++++++++++++++ ...ntel,ixp4xx-network-processing-engine.yaml | 13 +++++- 2 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 Documentation/devicetree/bindings/crypto/intel,ixp4xx-crypto.yaml -- 2.31.1 diff --git a/Documentation/devicetree/bindings/crypto/intel,ixp4xx-crypto.yaml b/Documentation/devicetree/bindings/crypto/intel,ixp4xx-crypto.yaml new file mode 100644 index 000000000000..79e9d23be1f4 --- /dev/null +++ b/Documentation/devicetree/bindings/crypto/intel,ixp4xx-crypto.yaml @@ -0,0 +1,46 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +# Copyright 2018 Linaro Ltd. +%YAML 1.2 +--- +$id: "http://devicetree.org/schemas/crypto/intel,ixp4xx-crypto.yaml#" +$schema: "http://devicetree.org/meta-schemas/core.yaml#" + +title: Intel IXP4xx cryptographic engine + +maintainers: + - Linus Walleij + +description: | + The Intel IXP4xx cryptographic engine makes use of the IXP4xx NPE + (Network Processing Engine). Since it is not a device on its own + it is defined as a subnode of the NPE, if crypto support is + available on the platform. + +properties: + compatible: + const: intel,ixp4xx-crypto + + intel,npe: + $ref: /schemas/types.yaml#/definitions/uint32 + minimum: 0 + maximum: 3 + description: phandle to the NPE this ethernet instance is using + and the instance to use in the second cell + + queue-rx: + $ref: /schemas/types.yaml#/definitions/phandle-array + maxItems: 1 + description: phandle to the RX queue on the NPE + + queue-txready: + $ref: /schemas/types.yaml#/definitions/phandle-array + maxItems: 1 + description: phandle to the TX READY queue on the NPE + +required: + - compatible + - intel,npe + - queue-rx + - queue-txready + +additionalProperties: false diff --git a/Documentation/devicetree/bindings/firmware/intel,ixp4xx-network-processing-engine.yaml b/Documentation/devicetree/bindings/firmware/intel,ixp4xx-network-processing-engine.yaml index 1bd2870c3a9c..add46ae6c461 100644 --- a/Documentation/devicetree/bindings/firmware/intel,ixp4xx-network-processing-engine.yaml +++ b/Documentation/devicetree/bindings/firmware/intel,ixp4xx-network-processing-engine.yaml @@ -30,6 +30,10 @@ properties: - description: NPE1 register range - description: NPE2 register range + crypto: + type: object + description: optional node for the embedded crypto engine + required: - compatible - reg @@ -38,8 +42,15 @@ additionalProperties: false examples: - | - npe@c8006000 { + npe: npe@c8006000 { compatible = "intel,ixp4xx-network-processing-engine"; reg = <0xc8006000 0x1000>, <0xc8007000 0x1000>, <0xc8008000 0x1000>; + + crypto { + compatible = "intel,ixp4xx-crypto"; + intel,npe = <2>; + queue-rx = <&qmgr 30>; + queue-txready = <&qmgr 29>; + }; }; ...