Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp30052375rwd; Wed, 5 Jul 2023 23:35:20 -0700 (PDT) X-Google-Smtp-Source: APBJJlHqJ6XLyUEtGdT5Tn8YgdB3TkvFFu/wbJhcwYn9niGXMZsST2tTYktASbBlRUyC+9+hdePM X-Received: by 2002:a05:6a21:9991:b0:130:898:632b with SMTP id ve17-20020a056a21999100b001300898632bmr1523421pzb.2.1688625320506; Wed, 05 Jul 2023 23:35:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688625320; cv=none; d=google.com; s=arc-20160816; b=iXPYshRmxmbQ/6duhOVmvhDFNWPtlNyR6BxhS9vWCaHibHRjuNMk1NmgLQgpMqKhNL nKeoLzplCkxMplCrQ30YvtowzhkWpGpABDSNKh8BetV6BVKzrPaY8rJvG/NrRTLx4Twr C/2SK2A0C6sBdmIwmxJzPcigbHNQtxqMvi3Y1cYWqtQZuDeT7uIhCWLegJqRG+i5Oi7J bR4qjmwrXlTFBqWse5KQeHtBY+G5xlDtMUs6Y8j5FQ2W/2cpGuw2QElyPzRZAXOrRE/+ Uz8GacfGVnkDwjWjLbPSyM8mfCBfD+b1KvmrGf3ahFBsd/ZO739Y4SPncvkw0Ym7zzGu /eDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=Pqu4vTxoeW2yTwRCEetSQZvh47NKMtjn0RrXMB1JAGg=; fh=rZyXQPYYg20xWYi6aHe6OoMMZpJtFwF0u79OkewKT6I=; b=lnmuqniFVeREc3Ztr/YAnshS7/+jz4cOdyhorhEuLHP16GFReVQNf0zG7cdShaVAEU SIxUXKr2/QXIJIjSQKiCIh4Ota1dmgRlhtbOASwIvjKq1zl96UfCavCR46YG4nu7AbTe v/TMh5zEw5NgPalwVaTYcGJcz3qqq0Az3NfYY6ZJUHq/kKsq5pTYo6ldyLtiV5gPBo5M r2A78LybfDlhLMYxANTr6MDWP0upw6wP6lc7zgP8dT0PPJbARevcWDCdZ44fVIZ+P0nh 8u9CJb5TVp6w8IOGLYmgn7tkUQg7ArBTk9YXymY1xfcddUOUTHz7FDr/PLOdGs1oDSvR R1og== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=IMm0i5vs; 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 v10-20020a63f20a000000b00553b64eb254si813360pgh.854.2023.07.05.23.35.01; Wed, 05 Jul 2023 23:35:20 -0700 (PDT) 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=IMm0i5vs; 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 S233603AbjGFG2f (ORCPT + 99 others); Thu, 6 Jul 2023 02:28:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49864 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233386AbjGFG2f (ORCPT ); Thu, 6 Jul 2023 02:28:35 -0400 Received: from mail-ej1-x636.google.com (mail-ej1-x636.google.com [IPv6:2a00:1450:4864:20::636]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3E0881B6 for ; Wed, 5 Jul 2023 23:28:32 -0700 (PDT) Received: by mail-ej1-x636.google.com with SMTP id a640c23a62f3a-99384a80af7so31034366b.2 for ; Wed, 05 Jul 2023 23:28:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1688624910; x=1691216910; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=Pqu4vTxoeW2yTwRCEetSQZvh47NKMtjn0RrXMB1JAGg=; b=IMm0i5vst50fxhAZuaHOTFSeWrHCZJmzOQXq5fOhXu+9uQCvIB9O7TT34TXrIdSe3Y cnP9xeFqhrL8cIlCb42uuzkarigw/qjWBTcPQ3/VxZUa8JeYXFP/AQgK0HryW/h65huJ DqaJOkv9C4Y9VEbUxH/JiwjH8iwIGllme0bQTt1rJgive4qogrJHvgYlMGy/VN4PmUOO pHiwJtL+3nTeZfTEpyZLrLS4DN0XG8RwL6pGKp+Tw1PcFI0GQcD+cuqEMZGZwQu2N5va ODXvyEUV63nanS3AeixIksRLBwWHN2OvMN9Mk6q264SOOa6D5p8+HUXIKEAOjNXLyjhp rYpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688624910; x=1691216910; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Pqu4vTxoeW2yTwRCEetSQZvh47NKMtjn0RrXMB1JAGg=; b=bpKx89NvBff5/1ZZS0TX8MFta38VBsbC8grGPJdh61aP/pv1gtEYpUuKMyWtequ+Sk j1l7QW3GSChpVQBjcFC0UPmijc1RYnhgXK1EI7XAQYy6NK8WoRPSlKHVO4R3FxxmKpaf HqxiVsO8LRWQNTRQmqgvGaZ0NwkwB8chtyo/J192WF8lSctXIVWp0HZdB1fj1zVeDsZe YqHEGKknoSorf7RtnhWuNWBi5JAzb9vudf70DBTX67Tlv2A/+5IbvpV8pjQYegcT58pA hop8pKcGFAD9HiHeaWCL3pIqLbrxSiSdyOVtM4ZSfKhwSMKa7VMoQ8CddKm5WA85gEyb i86g== X-Gm-Message-State: ABy/qLaJOvVUzqei7UOa6FsuoNVyMV9lM9JXolU7Am/NaJlolmnTo0Ng wpbZn611Jiqtp48cJmBxrbSUWQ== X-Received: by 2002:a17:906:10cf:b0:991:8328:50e3 with SMTP id v15-20020a17090610cf00b00991832850e3mr696668ejv.9.1688624910680; Wed, 05 Jul 2023 23:28:30 -0700 (PDT) Received: from [192.168.1.20] ([178.197.219.26]) by smtp.gmail.com with ESMTPSA id lf20-20020a170906ae5400b009920e9a3a73sm372590ejb.115.2023.07.05.23.28.26 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 05 Jul 2023 23:28:30 -0700 (PDT) Message-ID: Date: Thu, 6 Jul 2023 08:28:25 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [PATCH 02/10] dt-bindings: bus: add device tree bindings for RIFSC Content-Language: en-US To: Gatien Chevallier , Oleksii_Moisieiev@epam.com, gregkh@linuxfoundation.org, herbert@gondor.apana.org.au, davem@davemloft.net, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, alexandre.torgue@foss.st.com, vkoul@kernel.org, jic23@kernel.org, olivier.moysan@foss.st.com, arnaud.pouliquen@foss.st.com, mchehab@kernel.org, fabrice.gasnier@foss.st.com, andi.shyti@kernel.org, ulf.hansson@linaro.org, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, hugues.fruchet@foss.st.com, lee@kernel.org, will@kernel.org, catalin.marinas@arm.com, arnd@kernel.org, richardcochran@gmail.com Cc: linux-crypto@vger.kernel.org, devicetree@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, dmaengine@vger.kernel.org, linux-i2c@vger.kernel.org, linux-iio@vger.kernel.org, alsa-devel@alsa-project.org, linux-media@vger.kernel.org, linux-mmc@vger.kernel.org, netdev@vger.kernel.org, linux-phy@lists.infradead.org, linux-serial@vger.kernel.org, linux-spi@vger.kernel.org, linux-usb@vger.kernel.org References: <20230705172759.1610753-1-gatien.chevallier@foss.st.com> <20230705172759.1610753-3-gatien.chevallier@foss.st.com> From: Krzysztof Kozlowski In-Reply-To: <20230705172759.1610753-3-gatien.chevallier@foss.st.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 On 05/07/2023 19:27, Gatien Chevallier wrote: > Document RIFSC (RIF security controller). RIFSC is a firewall controller > composed of different kinds of hardware resources. > > Signed-off-by: Gatien Chevallier A nit, subject: drop second/last, redundant "device tree bindings for". The "dt-bindings" prefix is already stating that these are bindings. 4 words of your 6 word subject is meaningless... > --- > .../bindings/bus/st,stm32-rifsc.yaml | 101 ++++++++++++++++++ > 1 file changed, 101 insertions(+) > create mode 100644 Documentation/devicetree/bindings/bus/st,stm32-rifsc.yaml > > diff --git a/Documentation/devicetree/bindings/bus/st,stm32-rifsc.yaml b/Documentation/devicetree/bindings/bus/st,stm32-rifsc.yaml > new file mode 100644 > index 000000000000..68d585ed369c > --- /dev/null > +++ b/Documentation/devicetree/bindings/bus/st,stm32-rifsc.yaml Filename like compatible, unless you know list of compatibles will grow... but then add them. > @@ -0,0 +1,101 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/bus/st,stm32-rifsc.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: STM32 Resource isolation framework security controller bindings Drop bindings > + > +maintainers: > + - Gatien Chevallier > + > +description: | > + Resource isolation framework (RIF) is a comprehensive set of hardware blocks > + designed to enforce and manage isolation of STM32 hardware resources like > + memory and peripherals. > + > + The RIFSC (RIF security controller) is composed of three sets of registers, > + each managing a specific set of hardware resources: > + - RISC registers associated with RISUP logic (resource isolation device unit > + for peripherals), assign all non-RIF aware peripherals to zero, one or > + any security domains (secure, privilege, compartment). > + - RIMC registers: associated with RIMU logic (resource isolation master > + unit), assign all non RIF-aware bus master to one security domain by > + setting secure, privileged and compartment information on the system bus. > + Alternatively, the RISUP logic controlling the device port access to a > + peripheral can assign target bus attributes to this peripheral master port > + (supported attribute: CID). > + - RISC registers associated with RISAL logic (resource isolation device unit > + for address space - Lite version), assign address space subregions to one > + security domains (secure, privilege, compartment). > + > +properties: > + compatible: > + const: st,stm32mp25-rifsc > + > + reg: > + maxItems: 1 > + > + "#address-cells": > + const: 1 > + > + "#size-cells": > + const: 1 > + > + "#feature-domain-cells": > + const: 1 > + > + ranges: true > + > + feature-domain-controller: true > + > +patternProperties: > + "^.*@[0-9a-f]+$": > + description: Peripherals > + type: object > + properties: > + feature-domains: > + minItems: 1 > + maxItems: 2 > + description: > + The first argument must always be a phandle that references to the > + firewall controller of the peripheral. The second can contain the > + platform specific firewall ID of the peripheral. It does not make much sense to me to have hierarchy parent-child and via phandle at the same time. You express the similar relationship twice. > + > +required: > + - compatible > + - reg > + - "#address-cells" > + - "#size-cells" > + - feature-domain-controller > + - "#feature-domain-cells" > + - ranges > + > +additionalProperties: false > + > +examples: > + - | > + // In this example, the usart2 device refers to rifsc as its domain > + // controller. > + // Access rights are verified before creating devices. > + > + #include > + > + rifsc: rifsc-bus@42080000 { > + compatible = "st,stm32mp25-rifsc"; > + reg = <0x42080000 0x1000>; > + #address-cells = <1>; > + #size-cells = <1>; > + ranges; > + feature-domain-controller; > + #feature-domain-cells = <1>; > + > + usart2: serial@400e0000 { > + compatible = "st,stm32h7-uart"; > + reg = <0x400e0000 0x400>; > + interrupts = ; > + clocks = <&ck_flexgen_08>; > + feature-domains = <&rifsc 32>; > + status = "disabled"; No status in the examples. > + }; > + }; Best regards, Krzysztof