From patchwork Tue Apr 8 15:42:31 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurentiu Mihalcea X-Patchwork-Id: 14043234 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6AD88C369A2 for ; Tue, 8 Apr 2025 15:46:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=GbtPn6g2ba6LqMlbQ/ymd85CrpL3SBE6bf/tvrNqLXQ=; b=IWvrB4Eu6fWdNVmE7fgbn71My9 vWQcmxDHYIKm6/Hiwy6CbVQEVN09Hp/XEwMz/pRGGHgfvf5xIAf7kMDIDbxMHFfTX2TOZxbC4d7pZ TtUZe6XIbriKpIDgt/xbhyFqurUMI3IFCoVZFXKH3kRPSwgKvo6W+S/5iyqrrSkwRSQJ5J45o6THg 1R4SXeTbuBOA5vuPBs0zYPKjhNZ1AlzD0E48MUSFX1Y9Hfb6aoB95gwL3WjNtnygZTSbIM+TRipV1 CfwVGPs1uV6Sy7HZfzt0MsqkgYvbq/Y6sasPUFxiqJxO9i6FkOCAKLq7vwbje1QyilHiqu2Q8k6Vj qA5k6tAA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1u2B9k-00000004gLj-1Aoh; Tue, 08 Apr 2025 15:46:32 +0000 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1u2B6E-00000004flv-2EAC for linux-arm-kernel@lists.infradead.org; Tue, 08 Apr 2025 15:42:59 +0000 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-43edecbfb46so27323545e9.0 for ; Tue, 08 Apr 2025 08:42:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1744126973; x=1744731773; darn=lists.infradead.org; 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=GbtPn6g2ba6LqMlbQ/ymd85CrpL3SBE6bf/tvrNqLXQ=; b=AhSkOh17cwHLvj3M2UpMq3r1XsJ8b3Ph6uOmnfNgJJp/pBaoM7CDJtwkMQWywIdkfE GyJ7tat7wPcI1NO8Q6G6MqE1Objj5Ir+DFHrf0y9+U5bMALxdLuvGsGmdc5Xasfj+1C3 +7BcV9m485dLCx1Tcni3lsiL0xKfBiQnckB40EvNn5Iw7QY7eWWDVfPpgCvwlxPA1co1 teq2M6Hz/10dG1UF3qPvOs3heS7c8EbIr0OVmOf7AOX2fb8X1eD/bN/Gpmw6B9XSDisY +4RlFIMK6TFmQCA3YwS+qlRBZ6lmZbvIBdrQv7OKK4e0WmrC/rh/4GmVuRACsEMKBW+Q L2mg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1744126973; x=1744731773; 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=GbtPn6g2ba6LqMlbQ/ymd85CrpL3SBE6bf/tvrNqLXQ=; b=YGkY2iLyDlwgpsE9Vyo9+VBPXYlEnKju2TALDog/dj9XwU1HAKRPtYRNskEol+n9qY 3hQx8wYB/+nMOhWz2pLEKsqAR0H5MJFymzjHSrWccXmXc9m8Y5LVh0nKh6/qC8VzNGdT 5VE1u3yxSsLpjWpiF19+WNpUz/mQbhC2Z5lZQgfxRyTUpyvkfmxBnWfs1bXeXBj14G96 XvJOGPZBtlewyhq3RE45FIqwhg1YIRc8NLHakR+JEInkhVQYwSWrKS36kw5YzndRhZsi Q6AK9C0M/ASaVBDZxDBz1dtva6xO24wwtmRtr0J7rf8NS2Fm5U9q/ElixsqAlcXBcMda utGQ== X-Forwarded-Encrypted: i=1; AJvYcCWUnmoca0cr9CtDUywiPwK0ErWZ+vq+ZDXyGj9hMa89Vxxj77Z27pYThqbsttWmw/e7jTLXg/nUKudmBZSG2lgE@lists.infradead.org X-Gm-Message-State: AOJu0Yw4dnB1YsZ8+YXD9NZEeUvCkcIfQYN7P2e4fnytGRbbysus9Wo0 R63BT0S9ctqJrAVDgoBIqQWBe9AE5fHqtF9D2W36TwL+8kzGSpJJ X-Gm-Gg: ASbGncsOlk4ROPI752+tzJAvPwLUjDWRyz12WumzdKKtlqmjr6EI9C4g7zS/HDgkhKd 2Jk8EWhH3EAWhyR59zSqqLPEpwlXvtxvjZTsxPckYaR2IkbeKZrQkuKgHka/hpIC8aWm2OlI2nL UIPIn9hjWPagpt+Rr2XZIMt9/tzAKY/tbhbtVutxz4vWTxtmB6yYJ/eDojp7f1wh1hcPCsxW2jo HDhaFOIOYmyEg5D6mppXFkQchBQlAjOh5s1wNAljiT8lrfZGfUl23D10k2wZ4rj2KuJSjLdQo17 dYpcbXv+RbTxB5r9D7MF9qOMCIcjGFLMvAEKWNF1pR+FKFqO9T3jJQng8yiCfhthbtyQbVvhwuA bzRSvqSo= X-Google-Smtp-Source: AGHT+IFk7cvDwgAw3nFZfm84dQ1FS2LuGuxYv+hFlv1TribSda71cj+K9r2JkQI9n5O3/VthOjyvmw== X-Received: by 2002:a05:600c:6986:b0:43d:a90:9f1 with SMTP id 5b1f17b1804b1-43ecf822cf4mr136552845e9.6.1744126972777; Tue, 08 Apr 2025 08:42:52 -0700 (PDT) Received: from playground.localdomain ([82.79.237.110]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43ec34be2e6sm164476675e9.18.2025.04.08.08.42.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Apr 2025 08:42:52 -0700 (PDT) From: Laurentiu Mihalcea To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Fabio Estevam , Daniel Baluta , Shengjiu Wang , Frank Li , Marco Felsch , Marc Kleine-Budde , Alexander Stein Cc: Pengutronix Kernel Team , devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v5 1/6] dt-bindings: bus: document the IMX AIPSTZ bridge Date: Tue, 8 Apr 2025 11:42:31 -0400 Message-Id: <20250408154236.49421-2-laurentiumihalcea111@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250408154236.49421-1-laurentiumihalcea111@gmail.com> References: <20250408154236.49421-1-laurentiumihalcea111@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250408_084254_570178_CDC6E014 X-CRM114-Status: GOOD ( 14.16 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Laurentiu Mihalcea Add documentation for IMX AIPSTZ bridge. Co-developed-by: Daniel Baluta Signed-off-by: Daniel Baluta Signed-off-by: Laurentiu Mihalcea Reviewed-by: Rob Herring (Arm) --- .../bindings/bus/fsl,imx8mp-aipstz.yaml | 104 ++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100644 Documentation/devicetree/bindings/bus/fsl,imx8mp-aipstz.yaml diff --git a/Documentation/devicetree/bindings/bus/fsl,imx8mp-aipstz.yaml b/Documentation/devicetree/bindings/bus/fsl,imx8mp-aipstz.yaml new file mode 100644 index 000000000000..3e2ada7fcdf9 --- /dev/null +++ b/Documentation/devicetree/bindings/bus/fsl,imx8mp-aipstz.yaml @@ -0,0 +1,104 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/bus/fsl,imx8mp-aipstz.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Secure AHB to IP Slave bus (AIPSTZ) bridge + +description: + The secure AIPS bridge (AIPSTZ) acts as a bridge for AHB masters issuing + transactions to IP Slave peripherals. Additionally, this module offers access + control configurations meant to restrict which peripherals a master can + access. + +maintainers: + - Laurentiu Mihalcea + +properties: + compatible: + const: fsl,imx8mp-aipstz + + reg: + maxItems: 1 + + power-domains: + maxItems: 1 + + "#address-cells": + const: 1 + + "#size-cells": + const: 1 + + "#access-controller-cells": + const: 3 + description: + First cell - consumer type (master or peripheral) + Second cell - consumer ID + Third cell - configuration value + + ranges: true + +# borrowed from simple-bus.yaml, no additional requirements for children +patternProperties: + "@(0|[1-9a-f][0-9a-f]*)$": + type: object + additionalProperties: true + properties: + reg: + items: + minItems: 2 + maxItems: 4 + minItems: 1 + maxItems: 1024 + ranges: + oneOf: + - items: + minItems: 3 + maxItems: 7 + minItems: 1 + maxItems: 1024 + - $ref: /schemas/types.yaml#/definitions/flag + anyOf: + - required: + - reg + - required: + - ranges + +required: + - compatible + - reg + - power-domains + - "#address-cells" + - "#size-cells" + - "#access-controller-cells" + - ranges + +additionalProperties: false + +examples: + - | + #include + #include + + bus@30df0000 { + compatible = "fsl,imx8mp-aipstz"; + reg = <0x30df0000 0x10000>; + ranges = <0x30c00000 0x30c00000 0x400000>; + power-domains = <&pgc_audio>; + #address-cells = <1>; + #size-cells = <1>; + #access-controller-cells = <3>; + + dma-controller@30e00000 { + compatible = "fsl,imx8mp-sdma", "fsl,imx8mq-sdma"; + reg = <0x30e00000 0x10000>; + #dma-cells = <3>; + clocks = <&audio_blk_ctrl IMX8MP_CLK_AUDIOMIX_SDMA3_ROOT>, + <&clk IMX8MP_CLK_AUDIO_ROOT>; + clock-names = "ipg", "ahb"; + interrupts = ; + fsl,sdma-ram-script-name = "imx/sdma/sdma-imx7d.bin"; + }; + }; From patchwork Tue Apr 8 15:42:32 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurentiu Mihalcea X-Patchwork-Id: 14043235 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 50D63C369A4 for ; Tue, 8 Apr 2025 15:48:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=gu5G8CnhO94dSAWaShWe9FJyZsw97QYskm73IppyfbE=; b=LM6nz6ehbHqxPyfvH3KQ4yU8Gp t2TwhRwOKCL08aNdW+QGYomRxeClUWcdBpvnRsBxEXi94ruxq+/h4MGiVhANM76NVYlZdRz4rB5bZ Fkb/jIJIQGAfpzf7J6p1OJXpjCO20TaCjdl6thEorvpH1hsPFyO/vAI7wcGOdHriZyWCBY5hDfNiG tFj5/njq+q+I/LzqEFUZO/CycdOO99fdLuIJnil2zUao54SJFUtgkupulnaf5/TDGDlaIvdRFev7v 6HAT5TieVp97YMbksHyEGslSivLZGYdf+EZWQsTQ/NtI1e3MqshIuIanbbgl1FldCP2x2UUgbthD/ 03OAlcDg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1u2BBU-00000004geF-0dzy; Tue, 08 Apr 2025 15:48:20 +0000 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1u2B6G-00000004fmo-2WLI for linux-arm-kernel@lists.infradead.org; Tue, 08 Apr 2025 15:42:59 +0000 Received: by mail-wr1-x430.google.com with SMTP id ffacd0b85a97d-39ac56756f6so4881630f8f.2 for ; Tue, 08 Apr 2025 08:42:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1744126975; x=1744731775; darn=lists.infradead.org; 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=gu5G8CnhO94dSAWaShWe9FJyZsw97QYskm73IppyfbE=; b=kQPXyS7iRgFtvBcE8+VkxLJG1/X4ttyeGhDcGIkqQb0VdtFkfq3SEb80cLru/D7XMx e27wEQx9bfhCKZgtpB3soOYPUwWKLejoxKcAqBzjQ5yxisbpjf+LCJLjLtM+/qkjR9oI HD4j2jzyOU878Yj3a43gbvk18Yoi/GLgxzmlfULhoujZSPH/+Q8i02nNm87eWQELo76T BXPXZrZsErtSjmPWw52PLrnxpqpOTJiU9x7d4U/BuNfoSJANcoE0fiYlFXLAy1YHxtOB YXKF9cxMyBDcON9vmOEwbqMNsOtx+fv33GCX3pbwa8lt1+tnsZkZSsqWhMgQ7vi/xaX4 VR1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1744126975; x=1744731775; 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=gu5G8CnhO94dSAWaShWe9FJyZsw97QYskm73IppyfbE=; b=SNzln5QU+PDuUXzvRLS5c1M7ajPTcK+N9wBH4O858OvqrFZT0pgBM1RLxZZkIueN76 kMg9Bs+mtI4oHW4aDiFaOQBC36XovyKu+9U9ZKGwJhyk72deV20GrGQEbLXWNJv22I91 9pzTZuY8+kh4626hU1Yx2RJoxzcHTSMDJFEc9GInlOTj0hL6XMDpZu/ALjEnbOCZJpqz T3FFnzRTTGgUzSVgp05hHKqlrKMqXzT/CDPlNgY/gRaXaQeEfQLv8K6DlyHjwsE6iPTY k//XZZjyzMMdDlHQO7pmguV31MDVYcGUXfa4tJaUhbHo4Q2HA+ZnYB+0pvDHXRydwfnB mBQQ== X-Forwarded-Encrypted: i=1; AJvYcCXoDxY+f+a/B+yvw4fLhnDC49fhuYZRnud4EXFaNFCWfG0w8JzNkSXvuRDiPYJRQDM7VjbTrABaW41aq3XwDh3I@lists.infradead.org X-Gm-Message-State: AOJu0Yw4TOvvMdK9VjAdUyuxIWDMI/YVZZiFs3ZghdvsZyy49vwZAEGs /Z2TkLTlnQcxkweDBNXztMXJRsQsEltjzkSikRNNbgtj12AUnLAz X-Gm-Gg: ASbGncu/qk6UVJ0JmEVxK9vXSLu8ilFzSFDewrO9iQYng1asLiCa5QqsbWzisGbqUCw HLf9/LdPbkcdUmi4QKtfhcumHdlgsUnfR7oV+devJKBn6Q2sWLoVNaMM7jD5EYGlPexd7ZP+tdA WsAr5W3keEG+JUMkk7QOGTCz3CNQaDCEUUPwVfQnJtCCQC9939+QDErOi7rJ8e8z3zlNOAnxVdC jS3nep0H3uMEx49powv8LVlTruiKMugdg1bUOoQ2Fm6zlKiN013JVB/eoUDgjNXmIw76nhxgZKK bbsObCqKoadr6yzjcSbLLB3oPmriv3CiFBAIOCKpyJx/uvJ4n12NnnhaK3RMV24L70hqoB7R/7K Hzi5E4BQ= X-Google-Smtp-Source: AGHT+IEYi6zlzoKa/yDqzOVKsn45DDMykY+WgG+Uz9FkgPjhijbvcZRMIAXjw/tOkhVFBEr3GkyMnA== X-Received: by 2002:a5d:64e6:0:b0:39c:1efb:ec93 with SMTP id ffacd0b85a97d-39cba98b7edmr15444584f8f.48.1744126974756; Tue, 08 Apr 2025 08:42:54 -0700 (PDT) Received: from playground.localdomain ([82.79.237.110]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43ec34be2e6sm164476675e9.18.2025.04.08.08.42.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Apr 2025 08:42:54 -0700 (PDT) From: Laurentiu Mihalcea To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Fabio Estevam , Daniel Baluta , Shengjiu Wang , Frank Li , Marco Felsch , Marc Kleine-Budde , Alexander Stein Cc: Pengutronix Kernel Team , devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v5 2/6] dt-bindings: dsp: fsl,dsp: document 'access-controllers' property Date: Tue, 8 Apr 2025 11:42:32 -0400 Message-Id: <20250408154236.49421-3-laurentiumihalcea111@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250408154236.49421-1-laurentiumihalcea111@gmail.com> References: <20250408154236.49421-1-laurentiumihalcea111@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250408_084256_640626_3084F7AD X-CRM114-Status: GOOD ( 10.56 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Laurentiu Mihalcea Some DSP instances may have their access to certain peripherals conditioned by a bus access controller such as the one from the AIPSTZ bridge. Add the optional 'access-controllers' property, which may be used in such cases. Signed-off-by: Laurentiu Mihalcea Reviewed-by: Frank Li Acked-by: Rob Herring (Arm) --- Documentation/devicetree/bindings/dsp/fsl,dsp.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Documentation/devicetree/bindings/dsp/fsl,dsp.yaml b/Documentation/devicetree/bindings/dsp/fsl,dsp.yaml index b8693e4b4b0d..e610b7636a08 100644 --- a/Documentation/devicetree/bindings/dsp/fsl,dsp.yaml +++ b/Documentation/devicetree/bindings/dsp/fsl,dsp.yaml @@ -91,6 +91,9 @@ properties: - const: runstall - const: softreset + access-controllers: + maxItems: 1 + required: - compatible - reg From patchwork Tue Apr 8 15:42:33 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurentiu Mihalcea X-Patchwork-Id: 14043246 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8C4EDC369A5 for ; Tue, 8 Apr 2025 15:50:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=3+/ol304EYZFzmHf5qWZCvTKblJaCdBMbBu4cFrdM28=; b=e7TfnAwbZm3Vwfv93JSyIjVkAp A4jBbU3YFq/K8ceeC3jU3QFBAhRorRu83C+rdfJl6OBvLYQzqefvFQOwZ6CRPFSxkohBJ8hKTMXEt 1TEwQ0UKX4ArMYdm6fA+lwNHpBWLwuIDsDFoZjXeCJLl+XHg4nmlJn+q/NL73g0/1TRfIjc8hJlOt NE4Re1KRjLJRREbsT7mN+UpB1qM1gY9Tq+kchepPIUqrqEuXU6vKL2DwRugf865xEaxQ0ESKF3SSU 3cmDTSJH5KdNNg/qQ6KfPf1edgDmxEy2EFspFRXBNV16ylzFzBtqdQI/Z8I5AoEXlDdmyZrVpowqV axDQJPRQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1u2BDH-00000004gzJ-0pfn; Tue, 08 Apr 2025 15:50:11 +0000 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1u2B6J-00000004fnq-1Ifz for linux-arm-kernel@lists.infradead.org; Tue, 08 Apr 2025 15:43:01 +0000 Received: by mail-wr1-x42e.google.com with SMTP id ffacd0b85a97d-3914a5def6bso3441084f8f.1 for ; Tue, 08 Apr 2025 08:42:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1744126977; x=1744731777; darn=lists.infradead.org; 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=3+/ol304EYZFzmHf5qWZCvTKblJaCdBMbBu4cFrdM28=; b=Jv1yXdPeV1exnIu2D7xA3GyuerSpmwgeEHvT1JjJQvw1bGaYPRx1sl6I/sWCyBm243 hCIqt3qeLaPessBF/YxJOikp+FHqD+KU6RyHmeCU92SzWylsJkAAMqfY0PyKzKvC/6CO YKsSGtefN7j00fRRbJQd2Z4iwkIRS54DB2YYImJqStVhDByQN7jQbukO2ffaVLjIn1PI Sq2+sZrcQHA8cGalCCCnjFDEFMd93CV8AEYK1NZfVJQR1qm8T5hpyxHgrhIDVN17ygbu YBVGt7HqY9LKuRqQEME9w3GwgaOeBKBAFAG+fawVHQUrNG9B+Ss8jdQOaFWe+iOAHcTT C3jQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1744126977; x=1744731777; 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=3+/ol304EYZFzmHf5qWZCvTKblJaCdBMbBu4cFrdM28=; b=OjtfgdtqxjwVwmZET9SrkpeGWoSh4mmDMtie0Y5JX89kl57tADsx4OeJMOf00u4W8V YlWHM0l/UAfIKlUMVsuEoGp6OwRNXw+ciRJWbBbX9h8V3iKbXircsCoXGWwIy8ctDFi2 qI3Mps1nW0kblGdMDXUJAoL2RRNgAFmZ+Z7Eed+DMMkCxD8VIOBZAeTlR8Ej++EdgwGB Av4QXiE/8awQ1vTgssJuBCHyp3dId12JLr/tfV+AXd9ChNtgcMGJ7wOdvjaD2pDCTbUQ tzEL1i41LQZ/wIFMG+drfMdEunLlPJK5oXtbbT7eFQfNL49rd24+XQ4W3QJRaOfxHi0c cAmw== X-Forwarded-Encrypted: i=1; AJvYcCXUDQpYA8vzJAuxsg6cEcxa0IuI8jAmJfyUt9zllO+xeyNKL3zyetl1zXlNFK/C9cfawKNxIAI+C+S5rgK0YlNW@lists.infradead.org X-Gm-Message-State: AOJu0Yz+HnGY2ZqJHBnSY0EOG21lsh2h1BSJGPDlQVtub9kFOnyV2pu/ ooFDyvKK50fPFNt+7MoVNbT2KCwhxCuqHTR4AvGkxl0x+NkG7g8M X-Gm-Gg: ASbGncs14OxkF9q7KBeymavPZ1gjTLNOqsODaci+AlrHvVShkB9f9KdJGJyeCPMbmh1 XNWxXLc4xFOi7zHLjQb77yBTxdt20FhwsmpzEfnn//46aTf+63XaqSbkY/eNUAjJFyRZXKYKZSb 4SqjR+zVOVwPIXOTbh7imRN/roxp53TZjTln6fxRa/lM0CY5176LDEgvIoAEcXNvBGnjowIZFze E8evSoY2MhycDJ95I56hLm7gyMdo2SshrrBbAIa7akpFRMimFpYze6qKp/+0jBX4NapVDI4T5Kd DZHEx/pQIxm0ci2/AtjVtAXISrVtCAiPCvBENz8APWVPesRsRNSQKKivb/bVJdJ8XSPsI/AwvIl mfFxOyxfL+Sy9dholXg== X-Google-Smtp-Source: AGHT+IG0AMxcw+cd08RKS5cdUE5DuDrHXtBsG7uCqS+Lpu1Nku8qrLyC5cK51TsZmHFhPyplpfJWLw== X-Received: by 2002:a05:6000:290a:b0:391:4bfd:6d5 with SMTP id ffacd0b85a97d-39cba93cf03mr14625191f8f.52.1744126977343; Tue, 08 Apr 2025 08:42:57 -0700 (PDT) Received: from playground.localdomain ([82.79.237.110]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43ec34be2e6sm164476675e9.18.2025.04.08.08.42.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Apr 2025 08:42:56 -0700 (PDT) From: Laurentiu Mihalcea To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Fabio Estevam , Daniel Baluta , Shengjiu Wang , Frank Li , Marco Felsch , Marc Kleine-Budde , Alexander Stein Cc: Pengutronix Kernel Team , devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v5 3/6] bus: add driver for IMX AIPSTZ bridge Date: Tue, 8 Apr 2025 11:42:33 -0400 Message-Id: <20250408154236.49421-4-laurentiumihalcea111@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250408154236.49421-1-laurentiumihalcea111@gmail.com> References: <20250408154236.49421-1-laurentiumihalcea111@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250408_084259_357182_A519EEB6 X-CRM114-Status: GOOD ( 24.03 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Laurentiu Mihalcea The secure AHB to IP Slave (AIPSTZ) bus bridge provides access control configurations meant to restrict access to certain peripherals. Some of the configurations include: 1) Marking masters as trusted for R/W. Based on this (and the configuration of the accessed peripheral), the bridge may choose to abort the R/W transactions issued by certain masters. 2) Allowing/disallowing write accesses to peripherals. Add driver for this IP. Since there's currently no framework for access controllers (and since there's currently no need for having flexibility w.r.t the configurations) all this driver does is it applies a relaxed, "default" configuration, in which all masters are trusted for R/W. Note that some instances of this IP (e.g: AIPSTZ5 on i.MX8MP) may be tied to a power domain and may lose their configuration when the domain is powered off. This is why the configuration has to be restored when the domain is powered on. Co-developed-by: Daniel Baluta Signed-off-by: Daniel Baluta Signed-off-by: Laurentiu Mihalcea --- drivers/bus/Kconfig | 6 +++ drivers/bus/Makefile | 1 + drivers/bus/imx-aipstz.c | 92 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 99 insertions(+) create mode 100644 drivers/bus/imx-aipstz.c diff --git a/drivers/bus/Kconfig b/drivers/bus/Kconfig index ff669a8ccad9..fe7600283e70 100644 --- a/drivers/bus/Kconfig +++ b/drivers/bus/Kconfig @@ -87,6 +87,12 @@ config HISILICON_LPC Driver to enable I/O access to devices attached to the Low Pin Count bus on the HiSilicon Hip06/7 SoC. +config IMX_AIPSTZ + tristate "Support for IMX Secure AHB to IP Slave bus (AIPSTZ) bridge" + depends on ARCH_MXC + help + Enable support for IMX AIPSTZ bridge. + config IMX_WEIM bool "Freescale EIM DRIVER" depends on ARCH_MXC || COMPILE_TEST diff --git a/drivers/bus/Makefile b/drivers/bus/Makefile index cddd4984d6af..8e693fe8a03a 100644 --- a/drivers/bus/Makefile +++ b/drivers/bus/Makefile @@ -15,6 +15,7 @@ obj-$(CONFIG_FSL_MC_BUS) += fsl-mc/ obj-$(CONFIG_BT1_APB) += bt1-apb.o obj-$(CONFIG_BT1_AXI) += bt1-axi.o +obj-$(CONFIG_IMX_AIPSTZ) += imx-aipstz.o obj-$(CONFIG_IMX_WEIM) += imx-weim.o obj-$(CONFIG_INTEL_IXP4XX_EB) += intel-ixp4xx-eb.o obj-$(CONFIG_MIPS_CDMM) += mips_cdmm.o diff --git a/drivers/bus/imx-aipstz.c b/drivers/bus/imx-aipstz.c new file mode 100644 index 000000000000..44db40dae71b --- /dev/null +++ b/drivers/bus/imx-aipstz.c @@ -0,0 +1,92 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright 2025 NXP + */ + +#include +#include +#include +#include +#include +#include + +#define IMX_AIPSTZ_MPR0 0x0 + +struct imx_aipstz_config { + u32 mpr0; +}; + +static void imx_aipstz_apply_default(void __iomem *base, + const struct imx_aipstz_config *default_cfg) +{ + writel(default_cfg->mpr0, base + IMX_AIPSTZ_MPR0); +} + +static int imx_aipstz_probe(struct platform_device *pdev) +{ + const struct imx_aipstz_config *default_cfg; + void __iomem *base; + + base = devm_platform_get_and_ioremap_resource(pdev, 0, NULL); + if (IS_ERR(base)) + return dev_err_probe(&pdev->dev, -ENOMEM, + "failed to get/ioremap AC memory\n"); + + default_cfg = of_device_get_match_data(&pdev->dev); + + imx_aipstz_apply_default(base, default_cfg); + + dev_set_drvdata(&pdev->dev, base); + + pm_runtime_set_active(&pdev->dev); + devm_pm_runtime_enable(&pdev->dev); + + return devm_of_platform_populate(&pdev->dev); +} + +static int imx_aipstz_runtime_resume(struct device *dev) +{ + const struct imx_aipstz_config *default_cfg; + void __iomem *base; + + base = dev_get_drvdata(dev); + default_cfg = of_device_get_match_data(dev); + + /* restore potentially lost configuration during domain power-off */ + imx_aipstz_apply_default(base, default_cfg); + + return 0; +} + +static const struct dev_pm_ops imx_aipstz_pm_ops = { + RUNTIME_PM_OPS(NULL, imx_aipstz_runtime_resume, NULL) + SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume) +}; + +/* + * following configuration is equivalent to: + * masters 0-7 => trusted for R/W + use AHB's HPROT[1] to det. privilege + */ +static const struct imx_aipstz_config imx8mp_aipstz_default_cfg = { + .mpr0 = 0x77777777, +}; + +static const struct of_device_id imx_aipstz_of_ids[] = { + { .compatible = "fsl,imx8mp-aipstz", .data = &imx8mp_aipstz_default_cfg }, + { } +}; +MODULE_DEVICE_TABLE(of, imx_aipstz_of_ids); + +static struct platform_driver imx_aipstz_of_driver = { + .probe = imx_aipstz_probe, + .driver = { + .name = "imx-aipstz", + .of_match_table = imx_aipstz_of_ids, + .pm = pm_ptr(&imx_aipstz_pm_ops), + }, +}; +module_platform_driver(imx_aipstz_of_driver); + +MODULE_LICENSE("GPL"); +MODULE_DESCRIPTION("IMX secure AHB to IP Slave bus (AIPSTZ) bridge driver"); +MODULE_AUTHOR("Laurentiu Mihalcea "); From patchwork Tue Apr 8 15:42:34 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurentiu Mihalcea X-Patchwork-Id: 14043247 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5EC6DC369A2 for ; Tue, 8 Apr 2025 15:52:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=wDMY9SZRBf4/sxBsgjkGyJScAm+G1kZtC9xjm4IFOEk=; b=oDn6cnzFJ6Npl7ekXVyAnV5Jz4 BXY0qbWEBJRkrVFSdNCSQYbHIq5n0S7/G6prPqNhnk06Yyz1z+60lqO2ghdMmCwruu2+etwsxfbaq KukYtGJ/qjGp6cSgRMYqzKPzhh+EhaU77mFGy0Z1NZIjtVF96U+LWsStyNFEKOa1ghNVVbQUh110y BOBLP9X52FT7nc8LJLxmjen+Jc35ylsvIUE6kuqCBQNO4SgpQuS7ivgO2sO9Bw4QrRnHrwPafuBA9 cO7HCFfJGJR0sC1h5HkklharggP9IiaYQf0iAz4iuzaWueGSJZnHNmuPBI9zsa5raXswEXVXnxfbL mjnxohGQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1u2BF1-00000004hLV-450A; Tue, 08 Apr 2025 15:51:59 +0000 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1u2B6L-00000004foW-3fZf for linux-arm-kernel@lists.infradead.org; Tue, 08 Apr 2025 15:43:03 +0000 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-43d07ca6a80so29865755e9.1 for ; Tue, 08 Apr 2025 08:43:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1744126980; x=1744731780; darn=lists.infradead.org; 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=wDMY9SZRBf4/sxBsgjkGyJScAm+G1kZtC9xjm4IFOEk=; b=HbpMikaFHK950YgWFlNZ9kR/6GH5xdzUOJ0k+mvlkvjZcHYsIfd5oMh4G9q5Rd1094 gCyYiF79fU2WIVm/4I9u7SYS1iBVM3hZ7/jKZ/B9nlS4Jsa/MEa9M5Bbjsx98+yhMZRJ P5ZwEbLLm1JEYRjCj8wb57nj88dRXXJDOVQ+XtQZTmSw7ameB2tClYX/46oXt55QkI9h BauT14+qsY02gUgpgG6dvbYVLL/1CqsM01ptCkp+M2N+dQJETy2iIx41PdUAwrfqjnX0 nqLpLtkv/cCnf2UXLtaFTFb7l4Ik3S8pz4IEHXUU6Io9+k3NV0jOTG32aR0jq7tls8N/ 637A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1744126980; x=1744731780; 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=wDMY9SZRBf4/sxBsgjkGyJScAm+G1kZtC9xjm4IFOEk=; b=EXoDOxLLlTPTYwPADMYn37CWf/aXHJa+hjHTfnNRXyBoc4ioIvZhShUqjd2gRuABBg ObXcOFfMrGg4LrSOGrInvkMryGxc1YhHkkzezxjcf47FJCCNv+XighRAMFznFddiRwRC QUM4Zxq63gSj2Pc/pnuaY1gVDov5MncpjvMT4u6QIlEu24uRyg25tZw85Lvtr2eRnvKe AA+InKczj2VscDHAJxXAvDhvLElfwTILIQ+vfUdwR8aY2oJQ2DYCFf0lyBgKC0GTC8gC 7P26HM+tbUk8ei/cpWrCU+wKCjW2IiAEeWxqiRtcBlFoWAUDexb58HY8c7rsjgAwYgZG 4Fwg== X-Forwarded-Encrypted: i=1; AJvYcCWRoWW9Jks+mfpgRdyUvKFG4b9uqkKswOXN2mqc6pe3TiPlLF8HKq4kQikF/2zebr1dbbANwKvhCDwi5cAasCYJ@lists.infradead.org X-Gm-Message-State: AOJu0Yw9mYMZnTd64pKthNn5b3CpV4S70aEFqpsd+t2BwRqmHWWKe6pI IItpht2VeGgkIezbooYwJrK04rngWhbrhccsxoqzqdjnAEB2Hn0A X-Gm-Gg: ASbGnctdacTrgaxOsKGpl/MAJTg4JfZJ/5Qf04JGUbMi9gwsU5HhUueYCPvZvwDFn0i xgVJFBe8xtt2FT4aPIQlUDrelINo33jmow5zEAcYEw/L6IBI7ZpvxqRIQkD2dtFF8g652LPcM9P /0EBGuuVqaVQBuKk+LpuaN943n14y2fYgP9C6W8U2JDLxZITbFpH0vmNDpeKadogdRQ0RNiwjhN ihaMUsp8Nqp/35ETRcNW3qSkG5yxr4bH7bX0HR7wX/53Zp3YDMDyMPH0HAUy8/k04jJo5+jp9rt VylnTy96Y0eAmI7aCzMPT/2UdLYSAt0nk+o3O14LY9092jsXSAzgoPhrgI3YJH+u3kkzYAfOnGE APSGA9ao= X-Google-Smtp-Source: AGHT+IGK0ruPX4WysFV+SZLwQ89r5QOiFeAdeHiZNygg9R+OkQB5zmqWtRPqwT+0SEhCLeJWSD9ebQ== X-Received: by 2002:a05:600c:8411:b0:43d:d06:3798 with SMTP id 5b1f17b1804b1-43ecf9fe1f0mr141672885e9.20.1744126979744; Tue, 08 Apr 2025 08:42:59 -0700 (PDT) Received: from playground.localdomain ([82.79.237.110]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43ec34be2e6sm164476675e9.18.2025.04.08.08.42.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Apr 2025 08:42:59 -0700 (PDT) From: Laurentiu Mihalcea To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Fabio Estevam , Daniel Baluta , Shengjiu Wang , Frank Li , Marco Felsch , Marc Kleine-Budde , Alexander Stein Cc: Pengutronix Kernel Team , devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v5 4/6] arm64: dts: imx8mp: convert 'aips5' to 'aipstz5' Date: Tue, 8 Apr 2025 11:42:34 -0400 Message-Id: <20250408154236.49421-5-laurentiumihalcea111@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250408154236.49421-1-laurentiumihalcea111@gmail.com> References: <20250408154236.49421-1-laurentiumihalcea111@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250408_084301_915022_069627EB X-CRM114-Status: GOOD ( 15.03 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Laurentiu Mihalcea AIPS5 is actually AIPSTZ5 as it offers some security-related configurations. Since these configurations need to be applied before accessing any of the peripherals on the bus, it's better to make AIPSTZ5 be their parent instead of keeping AIPS5 and adding a child node for AIPSTZ5. Also, because of the security configurations, the address space of the bus has to be changed to that of the configuration registers. Finally, since AIPSTZ5 belongs to the AUDIOMIX power domain, add the missing 'power-domains' property. The domain needs to be powered on before attempting to configure the security-related registers. The DT node name is not changed to avoid potential issues with DTs in which this node is referenced. Co-developed-by: Daniel Baluta Signed-off-by: Daniel Baluta Signed-off-by: Laurentiu Mihalcea Reviewed-by: Frank Li --- arch/arm64/boot/dts/freescale/imx8mp.dtsi | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi b/arch/arm64/boot/dts/freescale/imx8mp.dtsi index ce6793b2d57e..aa7940c65f2d 100644 --- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi @@ -1399,12 +1399,14 @@ eqos: ethernet@30bf0000 { }; }; - aips5: bus@30c00000 { - compatible = "fsl,aips-bus", "simple-bus"; - reg = <0x30c00000 0x400000>; + aips5: bus@30df0000 { + compatible = "fsl,imx8mp-aipstz"; + reg = <0x30df0000 0x10000>; + power-domains = <&pgc_audio>; #address-cells = <1>; #size-cells = <1>; - ranges; + #access-controller-cells = <3>; + ranges = <0x30c00000 0x30c00000 0x400000>; spba-bus@30c00000 { compatible = "fsl,spba-bus", "simple-bus"; From patchwork Tue Apr 8 15:42:35 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurentiu Mihalcea X-Patchwork-Id: 14043248 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D4D1AC369A2 for ; Tue, 8 Apr 2025 15:53:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=maaEXNzrca1Kg4OV2OKYRdvmHiFVuGZqAVh5fMF8Ylk=; b=I9u1eJBsHLun4zkxSFXBL/fjC9 8YAbosFiAEtRRSxD8+yZCb6zI+OQLar4ZtSt7XvOOOA8QmTsV+DtwqsMW4GsEIt9yIos5VZVOKA2U z5BsRoJAZZpNfLyaDw4n2Gc56bvhicThZQmqBubbZ3nDxESTlVUrtvQjkMldSlnfOQJIb1jvTGwt7 Yo+YQ4E9JXJkI5mGivFWcp8Phn6DQ11Y+TXmvYXqMV1tNzwlVUw2jQSw2nGYiEXmsPkRkZdqwWHR1 I6rdT3SxyF9mjYCkqgWerjjoT/EzRthkfi9tkmp8ImbBBKZYMrs4GH3LPCc592luyG3v2TDwm8Vw+ X1YnAixQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1u2BGl-00000004hfg-2ypF; Tue, 08 Apr 2025 15:53:47 +0000 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1u2B6N-00000004fpL-2bZE for linux-arm-kernel@lists.infradead.org; Tue, 08 Apr 2025 15:43:05 +0000 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-4394a0c65fcso53750925e9.1 for ; Tue, 08 Apr 2025 08:43:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1744126982; x=1744731782; darn=lists.infradead.org; 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=maaEXNzrca1Kg4OV2OKYRdvmHiFVuGZqAVh5fMF8Ylk=; b=jjuXelSqEkSKEwMLpIGNUm7lZNE3dSstWQLdns7QVkSe2hIXe07Jcz7/NmKnaBzZQI v7daXb+msVSW/fQjk6P/oPkvyhNPasOjn1z7N+BtCryr73xC5uJ2nb3McHqQdx5I3TPa NT/BMMHjWQfft+hyrkkMQID41G+JZI78xjrGBms3E1D+mbvD/Ig8YCpKrL8bYZqOGo66 46XjHpgfUEmiJbEKDMpEiQqt2QNXqh6mGfc1ELTUrLemv5PYIQd6lcdlc3AxlJ3sUhGb wDdEA0dg4jCvZTppYQRBONzRkMq2xM/NB6JUwh+H+sr1Ja++VJlnb61DTw4MTMNG7K2s x/nw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1744126982; x=1744731782; 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=maaEXNzrca1Kg4OV2OKYRdvmHiFVuGZqAVh5fMF8Ylk=; b=dF0E66OdZIgcc5UA4u9BBColxOuzG+UTCE/ansq1GQcAiKo+6hUUnT0jvnDJYxsqr/ kLFlDajnJq035sh6p1gZpppEYH6GoKRyKWvTb+lyDL5OOPZHb3dcs7KxJP3skcVKzEdu fOtzULFHg+mFgQa0/8MFPpSOjcyobMTlPveXArZ5y0e+dob+2lHAn4cBCoQ+HoaynIOE nXYcT5msZ7CgjhHjd1MW8c1EbrtuNVInOtzKCwHkr+i4EfbDkeyQUDtUn41DlHFlgJgI bloTdTRHoG25aW1dbxDNPTF0eRx126aI/VsyCNGAoWuQ/SWRg1PctiXOeaCsDzPNj/4E xR8g== X-Forwarded-Encrypted: i=1; AJvYcCVgO0seRys6Kvm4xwdYPy+uwIQwYTqa43LZeJNvCw4lAcJcrDAPX38GHC9IrgHOl9oY8LOBH4InR1AoBCB7J0Tr@lists.infradead.org X-Gm-Message-State: AOJu0YwQX4OOXsgxn4YsjYuwEasQPKbINRUJEvw/SSJ5jW8bWIsLkaR8 zgek8zhPRcyaDjflsUiR7jWsacKpVLDVmg8pWZUuPhuqtSjUP1Bn X-Gm-Gg: ASbGncvdiCxLOB+YscfRnZ0RYr/RmIIVsAQpuJOG2vfxaufA0s9Fvf74Kqg5TrZTkUW aWTjObPna/+XrxuLb/Pu+eYz2kPXdDAcOBj2wAJv3Srq0wdGP93+9UaeR0MZLYruI32eP6tHjpQ fJdgNgEk4odwjLG0FZTwMwm6HJFF7b9Pi1tSyzFUR1z07TBLdQ9Ye+CFhETtUtkAlNQdxVn2sJF uoXhfF7+Bkuk3p0aazZtnGmOKuCeaPmvvzuHFzFv11LX14AT2Vyhf/x/XyPkk4viWqMdN67KOXP edfb6hvwCbnOCbdEVemXWZOx8MvjVPsFDbVIlVrulmowV88xI5hquiO+YGNEUvkQCN4AdsuyRRo H+PEsyHmXQ53O2NcfOw== X-Google-Smtp-Source: AGHT+IFOFcncwKUYi57UNaeAvO+49/JOi3agiI45bF7fu89GYair4F29jldwkpCUEx5THNXGOXM2Mg== X-Received: by 2002:a05:600c:1549:b0:43c:efed:732d with SMTP id 5b1f17b1804b1-43ecf8f2f4bmr173448545e9.16.1744126981776; Tue, 08 Apr 2025 08:43:01 -0700 (PDT) Received: from playground.localdomain ([82.79.237.110]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43ec34be2e6sm164476675e9.18.2025.04.08.08.43.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Apr 2025 08:43:01 -0700 (PDT) From: Laurentiu Mihalcea To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Fabio Estevam , Daniel Baluta , Shengjiu Wang , Frank Li , Marco Felsch , Marc Kleine-Budde , Alexander Stein Cc: Pengutronix Kernel Team , devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v5 5/6] arm64: dts: imx8mp: add aipstz-related definitions Date: Tue, 8 Apr 2025 11:42:35 -0400 Message-Id: <20250408154236.49421-6-laurentiumihalcea111@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250408154236.49421-1-laurentiumihalcea111@gmail.com> References: <20250408154236.49421-1-laurentiumihalcea111@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250408_084303_660080_02FD4714 X-CRM114-Status: GOOD ( 15.02 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Laurentiu Mihalcea Add header file with AIPSTZ-related definitions: consumer types, master/peripheral configuration bits, and master ID definitions. Signed-off-by: Laurentiu Mihalcea --- arch/arm64/boot/dts/freescale/imx8mp-aipstz.h | 39 +++++++++++++++++++ arch/arm64/boot/dts/freescale/imx8mp.dtsi | 1 + 2 files changed, 40 insertions(+) create mode 100644 arch/arm64/boot/dts/freescale/imx8mp-aipstz.h diff --git a/arch/arm64/boot/dts/freescale/imx8mp-aipstz.h b/arch/arm64/boot/dts/freescale/imx8mp-aipstz.h new file mode 100644 index 000000000000..b816cb6ee9d0 --- /dev/null +++ b/arch/arm64/boot/dts/freescale/imx8mp-aipstz.h @@ -0,0 +1,39 @@ +/* SPDX-License-Identifier: (GPL-2.0-only OR MIT) */ +/* + * Copyright 2025 NXP + */ + +#ifndef __IMX8MP_AIPSTZ_H +#define __IMX8MP_AIPSTZ_H + +/* consumer type - master or peripheral */ +#define IMX8MP_AIPSTZ_MASTER 0x0 +#define IMX8MP_AIPSTZ_PERIPH 0x1 + +/* master configuration options */ +#define IMX8MP_AIPSTZ_MPL (1 << 0) +#define IMX8MP_AIPSTZ_MTW (1 << 1) +#define IMX8MP_AIPSTZ_MTR (1 << 2) +#define IMX8MP_AIPSTZ_MBW (1 << 3) + +/* peripheral configuration options */ +#define IMX8MP_AIPSTZ_TP (1 << 0) +#define IMX8MP_AIPSTZ_WP (1 << 1) +#define IMX8MP_AIPSTZ_SP (1 << 2) +#define IMX8MP_AIPSTZ_BW (1 << 3) + +/* master ID definitions */ +#define IMX8MP_AIPSTZ_EDMA 0 /* AUDIOMIX EDMA */ +#define IMX8MP_AIPSTZ_CA53 1 /* Cortex-A53 cluster */ +#define IMX8MP_AIPSTZ_SDMA2 3 /* AUDIOMIX SDMA2 */ +#define IMX8MP_AIPSTZ_SDMA3 3 /* AUDIOMIX SDMA3 */ +#define IMX8MP_AIPSTZ_HIFI4 5 /* HIFI4 DSP */ +#define IMX8MP_AIPSTZ_CM7 6 /* Cortex-M7 */ + +/* helper macros */ +#define IMX8MP_AIPSTZ_HIFI4_T_RW_PL \ + IMX8MP_AIPSTZ_MASTER \ + IMX8MP_AIPSTZ_HIFI4 \ + (IMX8MP_AIPSTZ_MPL | IMX8MP_AIPSTZ_MTW | IMX8MP_AIPSTZ_MTR) + +#endif /* __IMX8MP_AIPSTZ_H */ diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi b/arch/arm64/boot/dts/freescale/imx8mp.dtsi index aa7940c65f2d..ebbc99f9ceba 100644 --- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi @@ -12,6 +12,7 @@ #include #include +#include "imx8mp-aipstz.h" #include "imx8mp-pinfunc.h" / { From patchwork Tue Apr 8 15:42:36 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurentiu Mihalcea X-Patchwork-Id: 14043308 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D3B8DC369A2 for ; Tue, 8 Apr 2025 15:55:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=rtG6uWcIXl5lH7IBHhdVeY4nZALvB6ooRyYGRnxDiL0=; b=IIXF79i8gdVdcXrm3Ir0f3567Q 2fnFRkXGlFL2mN02GskZkFJ0oBz2uWT1F1IGWiQHuG9Ra0PSY6jhdFdBMatEW+gS9GqEQGRJj4ZH2 QWsrm5088A3FEDRr3sjDWCPcrjXGZVwJyDaTO7f9p18lC+zQfCypXOfcxI2KPv5dsIL1DfsxKQxli 9DssD4fW49CVsoRe988DFN8E7dX0KjcZ6ZBqBU7B4BEjnC/kwFhtvYxrzMHMaCZ4Dx6FRFwFH+oAu Ul7Zw99UA1m+wJdrHJRevruwjh/I4zepEj+SrMqCiU+iD6icG+KHxFZjTpFZbeA0rX8fUGhJPECD/ Hkkd+ITg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1u2BIV-00000004i5l-29l5; Tue, 08 Apr 2025 15:55:35 +0000 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1u2B6P-00000004fpq-2u2J for linux-arm-kernel@lists.infradead.org; Tue, 08 Apr 2025 15:43:07 +0000 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-43d2d952eb1so38941075e9.1 for ; Tue, 08 Apr 2025 08:43:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1744126984; x=1744731784; darn=lists.infradead.org; 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=rtG6uWcIXl5lH7IBHhdVeY4nZALvB6ooRyYGRnxDiL0=; b=QkaQ/s7AHNO1b2MG2F9XT955sRwMAmcBUGPLj4LGMl+nAb4EdfhAo85g96MLHwp1H2 ncUs/mExXePLjOsBKzt7gNKU6Gwez5T19+h/LEpvx2CrG56on88/SKVoh1kzbenzeCUP YVfNERBYd7M6uqgIVZurB6jD+5ZORcNanbuVjU8WTCGoVm+bp0oDE1BEGkICGOWpUdMq LlRzlzjqj9JrtqOHCc2oJ+Y8t+2IVzm7cJ43+xCxXU2b7t3RPDUkEcQ/YYlbKy//d+um Ibaw/l96HCdpHtFXwhJK3jhdxr1mDDBKn3KXsYziLLeQ778OGFNX5qRI6XV4cud9EJoo Wn2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1744126984; x=1744731784; 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=rtG6uWcIXl5lH7IBHhdVeY4nZALvB6ooRyYGRnxDiL0=; b=LhO6eavJT5bN+w4+k3nl3NWAoh43CtSKamgGqIDlZdp1qchlXTXITemYugErH/tmnh IGR8GBNMfnzb++5gKHECItAbWbQKSE9aN3y/vBNsO3/+cBUifIX/pBxfCqierYlVUTEw izlyCEXjBTRB0uRPnha3S4Czj0euIWe+wdX9cRGPgPi5i0VRh2MlInOdqFfNkom3gh21 UHuy/ftTnrjuYyamOxx1voKnmShffmp6sar9OZAI2o0Fq/IENEAY2PZY/KBC8OdtZlxr kdvPOyPK/uqVUL5vSlqt0BV5D79gRWhs/4OdgaUkPxynbBuKZLhY0AmCCemkYRXLht88 K1ug== X-Forwarded-Encrypted: i=1; AJvYcCUCpBzR3ZD+F3sH4Ct9yFsTxcJqle/pDJo3EZC+ELQpgnXpbceK9PkgoOY3tDxF5tjl9T05TBl2frlFH1HWGI1R@lists.infradead.org X-Gm-Message-State: AOJu0YyTd574L8QB0KKN3jK/O+ukMRHNWcsqmeb66EBGWe4TQZeXvo4x uaY3sI5rNxXi39Y7yGf4t1impO4be00pcBE4kIKHqIy+dPsW6Gq0 X-Gm-Gg: ASbGnctQ5oqS+foXWXt19tj07XDGfNpavQQoH3Cv0M/FUn+LNe8Izb003MLcN4xb04t fB+N0OkEaXP/2ZPx9C+qvNUohxuKoSDathIrSMac50o3xcRrvHA7SmoHYzFE1KW796UyCmYfzpU Pm97cFKSKrYC6sUIiN6KoGJlcMQlXrcrsyImDgLynZGz9r1G20t7XffZIURtwLogoyRKgeM1JDc ne6/pfDzfacQ5z7EWTEtqVrHO1Atg7R18Xuf/EDF2mzAeVTfuAGcmerGhI2L5RdYNE5I15cQ0q/ a4Bwj7gsswWV+GJayU8YyuQlMOJt8QvCbFQW7Y6MaEf4lySLA1Iigc2do1qcwbyA7eOPvDiINbB IXvDLb2Y= X-Google-Smtp-Source: AGHT+IH2pIjwLHd99OaOkEDJZzV3BxzBXMBL7iQPz/Uj8BamXLBLhgF6w37q7JaR9mEFlWaWbAKHNw== X-Received: by 2002:a05:600c:3489:b0:43c:f0ae:da7 with SMTP id 5b1f17b1804b1-43ee0617025mr127689295e9.7.1744126983675; Tue, 08 Apr 2025 08:43:03 -0700 (PDT) Received: from playground.localdomain ([82.79.237.110]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43ec34be2e6sm164476675e9.18.2025.04.08.08.43.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Apr 2025 08:43:03 -0700 (PDT) From: Laurentiu Mihalcea To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Fabio Estevam , Daniel Baluta , Shengjiu Wang , Frank Li , Marco Felsch , Marc Kleine-Budde , Alexander Stein Cc: Pengutronix Kernel Team , devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v5 6/6] arm64: dts: imx8mp: make 'dsp' node depend on 'aips5' Date: Tue, 8 Apr 2025 11:42:36 -0400 Message-Id: <20250408154236.49421-7-laurentiumihalcea111@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250408154236.49421-1-laurentiumihalcea111@gmail.com> References: <20250408154236.49421-1-laurentiumihalcea111@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250408_084305_730499_E2D5B77B X-CRM114-Status: GOOD ( 12.22 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Laurentiu Mihalcea The DSP needs to access peripherals on AIPSTZ5 (to communicate with the AP using AUDIOMIX MU, for instance). To do so, the security-related registers of the bridge have to be configured before the DSP is started. Enforce a dependency on AIPSTZ5 by adding the 'access-controllers' property to the 'dsp' node. Signed-off-by: Laurentiu Mihalcea Reviewed-by: Frank Li --- arch/arm64/boot/dts/freescale/imx8mp.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi b/arch/arm64/boot/dts/freescale/imx8mp.dtsi index ebbc99f9ceba..f0f0ff5edea6 100644 --- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi @@ -2425,6 +2425,7 @@ dsp: dsp@3b6e8000 { mboxes = <&mu2 2 0>, <&mu2 2 1>, <&mu2 3 0>, <&mu2 3 1>; memory-region = <&dsp_reserved>; + access-controllers = <&aips5 IMX8MP_AIPSTZ_HIFI4_T_RW_PL>; status = "disabled"; }; };