From patchwork Mon Apr 17 07:55:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 84036 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1951146vqo; Mon, 17 Apr 2023 00:58:49 -0700 (PDT) X-Google-Smtp-Source: AKy350YR5LGy8HTLSu5a2SHjpie8BPR3/R45bG42ONe6fzufpUXzWeonJaqJBF/6Jya5fA2RAZ78 X-Received: by 2002:a17:902:8684:b0:1a6:6a7c:9fde with SMTP id g4-20020a170902868400b001a66a7c9fdemr10383863plo.14.1681718328892; Mon, 17 Apr 2023 00:58:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681718328; cv=none; d=google.com; s=arc-20160816; b=MV57+AUflU8hZsZ9PUDK/bALTqtglWnZwsyXbecOxbL0cJHFh/kWc8d2Y5pb6AhvCI J74Oj/xteqeZlBVEOdauY0eTWbwgOXEhAw/YCNl6oIZRBRp44EysFnVBpU2ZV4x/lKQZ 0G8eNW2Nn4aVcCLXpnJoEF8hBQ5yH/lNVSVGh12q0XEQAsFZ3MLUQCxgELMioqXHL4pO ypVxyUKWHJfOgtnlBKMdWxUX3yNhcLhB5BMAA/gl9PuObj5vjgwZx+pli1reLjYAqqd2 RuhlTuwwYyBXgjyFhnJT0A9Q7YBz4ihs7CaLi2zJjOS/wDpiLS9BFgnkmAOb8pNEr95A Jc5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=o2kEZXqS3DdorsV7KBvalbCQQT9rGiidMVD8f+P+zW8=; b=sJyTzzwyaXDIT40ZLjucQiFj+dyROjnV9Ts28MWNdI3yEE0M+T5E4Uq4bVSJ25eyLw pNkN+MnNKiiUAyn5V8jW5mqnqY9C6OgCG8lQ2CGIskkik6CJftXEnErDhMXqg0paFjbO XyAYWMU3qGnNdNOovinifuhW/0FTuPNw8twJha4Ocn30x+TFwAHBYnlVo8ebogWF/Qbs DVFSrhHKVYSlqv+OgQOUHpnuI6gcsyv5G/iAWt8YpzgnTQKjzYf8Maf45nB5f5vYP+7m yTCrrcN6LM5W13Ukjj6Rv/SUyrCmTB+d48Nt/1FCq0OvVIa5Z7BY68xK4VDCPcnShXCG AOpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cszasHJq; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l13-20020a170903244d00b001a68986a3d6si11266046pls.408.2023.04.17.00.58.34; Mon, 17 Apr 2023 00:58:48 -0700 (PDT) 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; dkim=pass header.i=@linaro.org header.s=google header.b=cszasHJq; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230516AbjDQH4H (ORCPT + 99 others); Mon, 17 Apr 2023 03:56:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42112 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230479AbjDQHz6 (ORCPT ); Mon, 17 Apr 2023 03:55:58 -0400 Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 052FE2D53 for ; Mon, 17 Apr 2023 00:55:56 -0700 (PDT) Received: by mail-lf1-x136.google.com with SMTP id 2adb3069b0e04-4ec816c9b62so1187411e87.2 for ; Mon, 17 Apr 2023 00:55:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1681718154; x=1684310154; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=o2kEZXqS3DdorsV7KBvalbCQQT9rGiidMVD8f+P+zW8=; b=cszasHJqTYYYiVgMtunipV+yzyUhFzSLNhUSkwJDjzdL7jFJrC3sW5CWMmi297UZuk icxBUMV5s1ZlZ3lqmVzkwG02nMxJ6IXkEO26lhcMrSMSIQTM71BrUKYMkURHWrY6ZnKI bAVlqFHdMatGCfWMnFwelhVbkjVURlAIXTqiWVJhGu8myBWN+i9tHfHpmFR0NSKQGGud rkycl4wBZ3xdjEtnSM+p7sCoqwxTUDCrsMvfS03lNPgWMM9FCJlAe6K70IrzW+VLH3DA Xj6hQQfit2+FZiMRguB3LIuZ9asqaQCfhECdLQI7rljKFlEP08FJMzEBr2y1RJOH1FNS HyiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681718154; x=1684310154; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=o2kEZXqS3DdorsV7KBvalbCQQT9rGiidMVD8f+P+zW8=; b=lqtWnQ/A16JjT3qFBMZYYhHoPeJV9pgSmB1eDdczF1+GGLMnPAV7YP7A9g8wo+nTeJ s3BrnwzQhx0ALaYhp5kQd1ZTt69YNqbmHwspRU1E4rnuy1168+U/hE3VHTvzgLPSXZRe 4Dneg5swpCOqCONvWDpqpoAjn3pTktoWlVy9L5rGeOSMA4ZwnD56nwumT5aO6VaOEWfD RdozQKiJfbPPDtoFTXxwnnV7cFEDB0/7dZgqLPvq0M8mGCUtyDI7MQcfqW9brS4ooFs0 Sf/1SnGZKShLNtlE/0UU+B6d4rnN0mAfqie1Wb5JfAUUzUD7YYeot77O23W9eliiaBXs sRVw== X-Gm-Message-State: AAQBX9drLPa7JUM4tLwydtcIk/kykFDJSc2X6SrgW0MDPoyrqOIyDlCo hOCYVGqlmuJ4uDoupIaEq56qoQ== X-Received: by 2002:a19:c502:0:b0:4ec:8087:88bb with SMTP id w2-20020a19c502000000b004ec808788bbmr1805886lfe.3.1681718154207; Mon, 17 Apr 2023 00:55:54 -0700 (PDT) Received: from [192.168.1.2] (c-05d8225c.014-348-6c756e10.bbcust.telenor.se. [92.34.216.5]) by smtp.gmail.com with ESMTPSA id p2-20020a19f002000000b004eb274b3a43sm1952547lfc.134.2023.04.17.00.55.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Apr 2023 00:55:53 -0700 (PDT) From: Linus Walleij Date: Mon, 17 Apr 2023 09:55:46 +0200 Subject: [PATCH 1/7] dt-bindings: dma: dma40: Prefer to pass sram through phandle MIME-Version: 1.0 Message-Id: <20230417-ux500-dma40-cleanup-v1-1-b26324956e47@linaro.org> References: <20230417-ux500-dma40-cleanup-v1-0-b26324956e47@linaro.org> In-Reply-To: <20230417-ux500-dma40-cleanup-v1-0-b26324956e47@linaro.org> To: Vinod Koul , Rob Herring , Krzysztof Kozlowski Cc: dmaengine@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Linus Walleij X-Mailer: b4 0.12.2 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,T_SCC_BODY_TEXT_LINE 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-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1763409478628837322?= X-GMAIL-MSGID: =?utf-8?q?1763409478628837322?= Extend the DMA40 bindings so that we can pass two SRAM segments as phandles instead of directly referring to the memory address in the second reg cell. This enables more granular control over the SRAM, and adds the optiona LCLA SRAM segment as well. Deprecate the old way of passing LCPA as a second reg cell, make sram compulsory. Signed-off-by: Linus Walleij --- .../devicetree/bindings/dma/stericsson,dma40.yaml | 35 +++++++++++++++++----- 1 file changed, 27 insertions(+), 8 deletions(-) diff --git a/Documentation/devicetree/bindings/dma/stericsson,dma40.yaml b/Documentation/devicetree/bindings/dma/stericsson,dma40.yaml index 64845347f44d..4fe0df937171 100644 --- a/Documentation/devicetree/bindings/dma/stericsson,dma40.yaml +++ b/Documentation/devicetree/bindings/dma/stericsson,dma40.yaml @@ -112,14 +112,23 @@ properties: - const: stericsson,dma40 reg: - items: - - description: DMA40 memory base - - description: LCPA memory base + oneOf: + - items: + - description: DMA40 memory base + - items: + - description: DMA40 memory base + - description: LCPA memory base, deprecated, use eSRAM pool instead + deprecated: true + reg-names: - items: - - const: base - - const: lcpa + oneOf: + - items: + - const: base + - items: + - const: base + - const: lcpa + deprecated: true interrupts: maxItems: 1 @@ -127,6 +136,14 @@ properties: clocks: maxItems: 1 + sram: + $ref: '/schemas/types.yaml#/definitions/phandle-array' + items: + maxItems: 2 + description: + List of phandles for the SRAM used by the DMA40 block, the first + phandle is the LCPA memory, the second is the LCLA memory. + memcpy-channels: $ref: /schemas/types.yaml#/definitions/uint32-array description: Array of u32 elements indicating which channels on the DMA @@ -138,6 +155,7 @@ required: - reg - interrupts - clocks + - sram - memcpy-channels additionalProperties: false @@ -149,8 +167,9 @@ examples: #include dma-controller@801c0000 { compatible = "stericsson,db8500-dma40", "stericsson,dma40"; - reg = <0x801c0000 0x1000>, <0x40010000 0x800>; - reg-names = "base", "lcpa"; + reg = <0x801c0000 0x1000>; + reg-names = "base"; + sram = <&lcpa>, <&lcla>; interrupts = ; #dma-cells = <3>; memcpy-channels = <56 57 58 59 60>;