From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 24BDA213E7E; Wed, 22 Jan 2025 15:22:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737559372; cv=none; b=cjniRUZOlGpmO904hDiP12sdT1uENH7REg/c89C78uzT8GxFrcU+h5fYX2xF8QFSTC6OXuZL92Z/rBVTWy3/lAaYV3tg+EdtG/p0D3J/7H7UK2A0YqJZ5843huSFnOFYW6rMLeJ4W+YJO0bvh3x28nglJ8nL2qXtM7ESqLepirE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737559372; c=relaxed/simple; bh=Y00duup1jJKmtkaj3i0tYDb8m+2/E7Bi7a8rp6BYPFw=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=O5oQKI+TdriRBjFprVJ2Npb6O51Mc+KuRy/4woW1w7UbGFvyRoLWuR4zaafEWn4sPMgrks8BQg+gETeEA+kjxNUxRo2IAHxVOiSPo33P9mFMrbUPzj2JUKqJfRZNTFAnPxhNK7PTAiEkK6SLWWzMHeIlnSwa3eZAopbC3zststg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Ygj4y3rB; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Ygj4y3rB" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 613A8C4CED2; Wed, 22 Jan 2025 15:22:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1737559371; bh=Y00duup1jJKmtkaj3i0tYDb8m+2/E7Bi7a8rp6BYPFw=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=Ygj4y3rBrdeaLoQHFUVqAygjtYNUjae2PsUFgTLTxncRai5H8j6JtyQzRmzGppkPB Ecez321gFPwKW0OQzvB5yZ4HMUBqxl3PtD/UN8EcYmkLCVgvrCGoQxVeCRPlyF5pgj VELe95m4GPHJMi1Jzu5qomMNZWDv9enz/TREzrvyC/SVwaHcY7SwNiBkgyHGc0uyNp sE2DCPd6LPQ+UHizeSuWURP8CC8Qhx6ad0byKRt5jmxXwl0cTBJdZMs6VDU+yti7e9 C2YM8vUTWtWe7qVUsenetDSRLzcFY/xn9ACCqrsSYYL7laRf9mWpWsFueGlUmopKqj WHFokOtfkezhQ== Message-ID: <920a7917-e7ba-4380-8401-2de318e60b74@kernel.org> Date: Wed, 22 Jan 2025 16:22:43 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 3/9] dt-bindings: misc: Add STM32 Octo Memory Manager controller To: patrice.chotard@foss.st.com, Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Alexandre Torgue , Philipp Zabel , Maxime Coquelin , Greg Kroah-Hartman , Arnd Bergmann , Catalin Marinas , Will Deacon Cc: linux-spi@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, christophe.kerello@foss.st.com References: <20250122141037.953934-1-patrice.chotard@foss.st.com> <20250122141037.953934-4-patrice.chotard@foss.st.com> From: Krzysztof Kozlowski Content-Language: en-US Autocrypt: addr=krzk@kernel.org; keydata= xsFNBFVDQq4BEAC6KeLOfFsAvFMBsrCrJ2bCalhPv5+KQF2PS2+iwZI8Bp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vuEyjzBmdq2esyE6zIqftdo4MOJho8uctOiWbwNNq2U9pPWmu 4vXVFBYIGmpyNPYzRm0QPwARAQABwsF8BBgBCgAmAhsMFiEEm9B+DgxR+NWWd7dUG5NDfTtB YpsFAmA872oFCRRflLYACgkQG5NDfTtBYpvScw/9GrqBrVLuJoJ52qBBKUBDo4E+5fU1bjt0 Gv0nh/hNJuecuRY6aemU6HOPNc2t8QHMSvwbSF+Vp9ZkOvrM36yUOufctoqON+wXrliEY0J4 ksR89ZILRRAold9Mh0YDqEJc1HmuxYLJ7lnbLYH1oui8bLbMBM8S2Uo9RKqV2GROLi44enVt vdrDvo+CxKj2K+d4cleCNiz5qbTxPUW/cgkwG0lJc4I4sso7l4XMDKn95c7JtNsuzqKvhEVS oic5by3fbUnuI0cemeizF4QdtX2uQxrP7RwHFBd+YUia7zCcz0//rv6FZmAxWZGy5arNl6Vm lQqNo7/Poh8WWfRS+xegBxc6hBXahpyUKphAKYkah+m+I0QToCfnGKnPqyYIMDEHCS/RfqA5 t8F+O56+oyLBAeWX7XcmyM6TGeVfb+OZVMJnZzK0s2VYAuI0Rl87FBFYgULdgqKV7R7WHzwD uZwJCLykjad45hsWcOGk3OcaAGQS6NDlfhM6O9aYNwGL6tGt/6BkRikNOs7VDEa4/HlbaSJo 7FgndGw1kWmkeL6oQh7wBvYll2buKod4qYntmNKEicoHGU+x91Gcan8mCoqhJkbqrL7+nXG2 5Q/GS5M9RFWS+nYyJh+c3OcfKqVcZQNANItt7+ULzdNJuhvTRRdC3g9hmCEuNSr+CLMdnRBY fv0= In-Reply-To: <20250122141037.953934-4-patrice.chotard@foss.st.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 22/01/2025 15:10, patrice.chotard@foss.st.com wrote: > From: Patrice Chotard > > Add bindings for STM32 Octo Memory Manager (OMM) controller. > > OMM manages: > - the muxing between 2 OSPI busses and 2 output ports. > There are 4 possible muxing configurations: > - direct mode (no multiplexing): OSPI1 output is on port 1 and OSPI2 > output is on port 2 > - OSPI1 and OSPI2 are multiplexed over the same output port 1 > - swapped mode (no multiplexing), OSPI1 output is on port 2, > OSPI2 output is on port 1 > - OSPI1 and OSPI2 are multiplexed over the same output port 2 > - the split of the memory area shared between the 2 OSPI instances. > - chip select selection override. > - the time between 2 transactions in multiplexed mode. > > Signed-off-by: Patrice Chotard > --- > .../bindings/misc/st,stm32-omm.yaml | 194 ++++++++++++++++++ > 1 file changed, 194 insertions(+) > create mode 100644 Documentation/devicetree/bindings/misc/st,stm32-omm.yaml All my other comments apply. Also: This cannot be misc. Depending what this is, either dedicated subsystem like memory or soc. > > diff --git a/Documentation/devicetree/bindings/misc/st,stm32-omm.yaml b/Documentation/devicetree/bindings/misc/st,stm32-omm.yaml > new file mode 100644 > index 000000000000..ef8f5d2c526c > --- /dev/null > +++ b/Documentation/devicetree/bindings/misc/st,stm32-omm.yaml > @@ -0,0 +1,194 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/misc/st,stm32-omm.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: STM32 Octo Memory Manager (OMM) > + > +maintainers: > + - Patrice Chotard > + > +description: | > + The STM32 Octo Memory Manager is a low-level interface that enables an > + efficient OCTOSPI pin assignment with a full I/O matrix (before alternate > + function map) and multiplex of single/dual/quad/octal SPI interfaces over > + the same bus. It Supports up to: > + - Two single/dual/quad/octal SPI interfaces > + - Two ports for pin assignment > + > +properties: > + compatible: > + const: st,stm32mp25-omm > + > + "#address-cells": > + const: 2 > + > + "#size-cells": > + const: 1 > + > + ranges: > + description: | > + Reflects the memory layout with four integer values per OSPI instance. > + Format: > + 0 > + > + reg: > + items: > + - description: registers Well, why here is entirely different syntax? Anyway, useless description. Say something useful > + - description: memory mapping This is a bit better but still confusing. Memory mapping of what? Virtual memory? This is vague to me. > + > + reg-names: > + items: > + - const: omm > + - const: omm_mm Not useful names. Drop prefixes and then you end up with empty first entry :/ > + > + memory-region: > + description: Phandle to a node describing memory-map region to be used. Constraints. > + > + memory-region-names: > + minItems: 1 Nope, you just said one phandle? > + items: > + - const: mm_ospi1 > + - const: mm_ospi2 Drop redundant parts. If name is just 1 or 2, then just drop xxx-names > + > + clocks: > + maxItems: 1 > + > + resets: > + maxItems: 1 > + > + access-controllers: > + minItems: 1 > + maxItems: 2 > + > + st,syscfg-amcr: > + $ref: /schemas/types.yaml#/definitions/phandle-array > + description: | > + The Address Mapping Control Register (AMCR) is used to split the 256MB > + memory map area shared between the 2 OSPI instance. The Octo Memory > + Manager sets the AMCR depending of the memory-region configuration. > + Format is phandle to syscfg / register offset within syscfg / memory split > + bitmask. > + The memory split bitmask description is: > + - 000: OCTOSPI1 (256 Mbytes), OCTOSPI2 unmapped > + - 001: OCTOSPI1 (192 Mbytes), OCTOSPI2 (64 Mbytes) > + - 010: OCTOSPI1 (128 Mbytes), OCTOSPI2 (128 Mbytes) > + - 011: OCTOSPI1 (64 Mbytes), OCTOSPI2 (192 Mbytes) > + - 1xx: OCTOSPI1 unmapped, OCTOSPI2 (256 Mbytes) > + items: > + minItems: 3 > + maxItems: 3 > + > + st,omm-req2ack-ns: > + description: | > + In multiplexed mode (MUXEN = 1), this field defines the time in > + nanoseconds between two transactions. > + > + st,omm-cssel-ovr: > + $ref: /schemas/types.yaml#/definitions/uint32 > + description: | > + Configure the chip select selector override for the 2 OCTOSPIs. > + The 2 bits mask muxing description is: > + -bit 0: Chip select selector override setting for OCTOSPI1 > + 0x0: the chip select signal from OCTOSPI1 is sent to NCS1 > + 0x1: the chip select signal from OCTOSPI1 is sent to NCS2 > + -bit 1: Chip select selector override setting for OCTOSPI2 > + 0x0: the chip select signal from OCTOSPI2 is sent to NCS1 > + 0x1: the chip select signal from OCTOSPI2 is sent to NCS2 > + > + st,omm-mux: > + $ref: /schemas/types.yaml#/definitions/uint32 > + description: | > + Configure the muxing between the 2 OCTOSPIs busses and the 2 output ports. > + The muxing 2 bits mask description is: > + - 0x0: direct mode, default > + - 0x1: mux OCTOSPI1 and OCTOSPI2 to port 1 > + - 0x2: swapped mode > + - 0x3: mux OCTOSPI1 and OCTOSPI2 to port 2 > + > + power-domains: > + maxItems: 1 > + > +patternProperties: > + "^spi@[a-f0-9]+$": > + type: object > + $ref: "/schemas/spi/st,stm32-ospi.yaml#" Drop quotes. Look at your other $ref and keep things consistent. Best regards, Krzysztof