Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2351255rwb; Sat, 19 Nov 2022 14:15:00 -0800 (PST) X-Google-Smtp-Source: AA0mqf4PPuN6lgW9xw6YY0/XJ6av0C5ydGv4e61u/YgwVNGFR7U2KYPztyWCli/F0Ot8YRn4f01r X-Received: by 2002:a63:4e5e:0:b0:44e:74d0:e843 with SMTP id o30-20020a634e5e000000b0044e74d0e843mr501982pgl.95.1668896100560; Sat, 19 Nov 2022 14:15:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668896100; cv=none; d=google.com; s=arc-20160816; b=WLRTGlMSf05GLUvRZ66ZPKUkx4vSHARJqKujCfLI7BKyWSWnuDdRaSIgEelU/9Vmcz QTpteuRxbSPOKRL5O+jR1hIQgVD3AyN6CYWY9gpzO6m0dysk0DH4VEAM9kjX+Q9BWnnr AThdwxMjXq9QpgyR96Z644QDVyqjceuhquGMn/ocGXTIL5nNeYKzInb1Za+33rV6jsy3 O2ieZFHKm/FADweL3RPSn5+nPQXvMapOaOFud2Hfze8LILT5Spa/EF6SBV3nWFkB4IoW fvDJUQFo8psJxInbUk2/9Jg2btZ0+sGFmdlxJHXAdLxQikHh1GW6PJ15bV1TlB0HHQNu AbLw== 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 :dkim-signature; bh=jZkwUGyeGgLpD7/abMkmVR6RIxjNUyy5XUkE4m7mSEI=; b=SpOBqS79pI+nGSMjvjFYw5YTza4QO8JIQMiriCAhWYIQm5abijcu+wlnOGwh5H+9TP iWO2zCTTXwOPIIUWel+NzdNkli7PNzxuFazhEgMtVFUAU3uJZqtGPb/JbcjTNWuka1Zi NnpLvNM34+zltcToDo6Iex8KNlaAdDHVAPrSvGY+SlK2DqmNV2qSC6bistbyE/QXti3Y RgyYFrghEDusjRDEwH0ulgWpKSaswDG5LwEClMnf1Z2TjK+3bTiGhs1bYrn5FeS8KHZ1 d9fU11beehuHvKTGLQ3qmCC3yTZd4LnJhoWRt9Fr4uE0LPTALEXDNV73qIRgpgaurhsC yQug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TQG76VVz; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m13-20020a637d4d000000b0043a20d57b46si7676294pgn.826.2022.11.19.14.14.47; Sat, 19 Nov 2022 14:15:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-crypto-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; dkim=pass header.i=@linaro.org header.s=google header.b=TQG76VVz; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-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 S233576AbiKSWMo (ORCPT + 99 others); Sat, 19 Nov 2022 17:12:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44814 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230471AbiKSWMn (ORCPT ); Sat, 19 Nov 2022 17:12:43 -0500 Received: from mail-lf1-x12d.google.com (mail-lf1-x12d.google.com [IPv6:2a00:1450:4864:20::12d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 426A115805 for ; Sat, 19 Nov 2022 14:12:42 -0800 (PST) Received: by mail-lf1-x12d.google.com with SMTP id j16so13568948lfe.12 for ; Sat, 19 Nov 2022 14:12:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=jZkwUGyeGgLpD7/abMkmVR6RIxjNUyy5XUkE4m7mSEI=; b=TQG76VVzCrE6jw2YN1c8BaP66oklivB3/nG6CKm4jPuxtNLKSc7+NVm6kvve9rhyCa wey7z33kLAsDP0UpYXzwbPXrmtEhM8cmaGGTTL/1ekcuWU+LcZX3i2RTsBbXg17r4fZd oFHvQE9nOsWywrJejrCNTsxLOkl6YdkjRTATH2HwJOSEYajPhmAL16rgC/FPqfTYXfRE OCfHrhp9H6wjxe5aqiQlgh/1PB7j/6TmQ0q8uP4AStAukwrbFUFzN1NFSMqUlGsb+ttT mcr1YGtAuO0F70hMi1vJcFliKgJr8eC+SmxRvxsP6NRpAMgrX8txjB7HB86l81Lo78Nu IIlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jZkwUGyeGgLpD7/abMkmVR6RIxjNUyy5XUkE4m7mSEI=; b=tH4Q/GAMo0UbU7DuSVVgFuBuu8u9X7xzsi0JQl8BrTVTX5zQGSJpr9KDffxVDYgzqb 6bbLBidlWiKHyGjASpsok9jpEVjluF+wZBUWrcPgrh7Fc4KdMpJ1edtV5UrbfGjSADYz GMHhIlCEhNHO2fq1K8n58X1+LsCv5X00w6KvRqhBbJWWBqWCKvbF3i5/YwEBRTGNZWjN LNoZ6y1u3XWDgfPX4rQjKvakiRNlUXWnkBVFla7jMuu68DK/wLM7e20raUtz7BGUXKAp hyFVMhcwoQVqWfu1YBUkLIRbO2Qq+VpEBrvh+6HmNgiQV/WmrHdG9IgtgYsSOMuw6nIK Wvnw== X-Gm-Message-State: ANoB5pnIFsKwrPdRqnP5TVdJhPnyD3yEyiiIKB8WqOC5ad4geprSZsOy OzCFsqiya9TfCqZMOf/BDuu6axWKqoWKug== X-Received: by 2002:ac2:47fc:0:b0:4a2:2f31:12bf with SMTP id b28-20020ac247fc000000b004a22f3112bfmr4400296lfp.550.1668895961509; Sat, 19 Nov 2022 14:12:41 -0800 (PST) Received: from Fecusia.lan (c-05d8225c.014-348-6c756e10.bbcust.telenor.se. [92.34.216.5]) by smtp.gmail.com with ESMTPSA id u3-20020a05651220c300b00496d3e6b131sm1234254lfr.234.2022.11.19.14.12.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 19 Nov 2022 14:12:40 -0800 (PST) From: Linus Walleij To: linux-crypto@vger.kernel.org, Herbert Xu , "David S . Miller" Cc: phone-devel@vger.kernel.org, Stefan Hansson , Lionel Debieve , Maxime Coquelin , Alexandre Torgue , Linus Walleij , devicetree@vger.kernel.org Subject: [PATCH v1 1/4] dt-bindings: crypto: Let STM32 define Ux500 CRYP Date: Sat, 19 Nov 2022 23:12:16 +0100 Message-Id: <20221119221219.1232541-2-linus.walleij@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221119221219.1232541-1-linus.walleij@linaro.org> References: <20221119221219.1232541-1-linus.walleij@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham 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: X-Mailing-List: linux-crypto@vger.kernel.org This adds device tree bindings for the Ux500 CRYP block as a compatible in the STM32 CRYP bindings. The Ux500 CRYP binding has been used for ages in the kernel device tree for Ux500 but was never documented, so fill in the gap by making it a sibling of the STM32 CRYP block, which is what it is. The relationship to the existing STM32 CRYP block is pretty obvious when looking at the register map, and I have written patches to reuse the STM32 CRYP driver on the Ux500. The two properties added are DMA channels and power domain. Power domains are a generic SoC feature and the STM32 variant also has DMA channels. Cc: devicetree@vger.kernel.org Cc: Lionel Debieve Cc: Maxime Coquelin Cc: Alexandre Torgue Signed-off-by: Linus Walleij --- This was previously sent out as an open question but nothing happened, now I send it as part of the STM32 bindings, in a series making the Linux STM32 driver use the STM32 driver. --- .../bindings/crypto/st,stm32-cryp.yaml | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/Documentation/devicetree/bindings/crypto/st,stm32-cryp.yaml b/Documentation/devicetree/bindings/crypto/st,stm32-cryp.yaml index ed23bf94a8e0..69614ab51f81 100644 --- a/Documentation/devicetree/bindings/crypto/st,stm32-cryp.yaml +++ b/Documentation/devicetree/bindings/crypto/st,stm32-cryp.yaml @@ -6,12 +6,18 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# title: STMicroelectronics STM32 CRYP bindings +description: The STM32 CRYP block is built on the CRYP block found in + the STn8820 SoC introduced in 2007, and subsequently used in the U8500 + SoC in 2010. + maintainers: - Lionel Debieve properties: compatible: enum: + - st,stn8820-cryp + - stericsson,ux500-cryp - st,stm32f756-cryp - st,stm32mp1-cryp @@ -27,6 +33,19 @@ properties: resets: maxItems: 1 + dmas: + items: + - description: mem2cryp DMA channel + - description: cryp2mem DMA channel + + dma-names: + items: + - const: mem2cryp + - const: cryp2mem + + power-domains: + maxItems: 1 + required: - compatible - reg @@ -48,4 +67,17 @@ examples: resets = <&rcc CRYP1_R>; }; + - | + #include + #include + #include + #include + cryp@a03cb000 { + compatible = "stericsson,ux500-cryp"; + reg = <0xa03cb000 0x1000>; + interrupts = ; + clocks = <&prcc_pclk 6 2>; + power-domains = <&pm_domains DOMAIN_VAPE>; + }; + ... -- 2.38.1