From: Larisa Ileana Grigore <larisa.grigore@oss.nxp.com>
To: Frank Li <Frank.li@oss.nxp.com>
Cc: NXP S32 Linux Team <s32@nxp.com>,
Alim Akhtar <alim.akhtar@samsung.com>,
Avri Altman <avri.altman@sandisk.com>,
Bart Van Assche <bvanassche@acm.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>, Frank Li <Frank.Li@nxp.com>,
Sascha Hauer <s.hauer@pengutronix.de>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
Fabio Estevam <festevam@gmail.com>,
"James E . J . Bottomley" <James.Bottomley@hansenpartnership.com>,
"Martin K . Petersen" <martin.petersen@oracle.com>,
Sai Krishna Potthuri <sai.krishna.potthuri@amd.com>,
Ajay Neeli <ajay.neeli@amd.com>,
Manivannan Sadhasivam <mani@kernel.org>,
Pedro Sousa <pedrom.sousa@synopsys.com>,
clizzi@redhat.com, aruizrui@redhat.com, eballetb@redhat.com,
echanude@redhat.com, linux-scsi@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org,
linux-arm-msm@vger.kernel.org
Subject: Re: [PATCH 06/10] dt-bindings: ufs: Add compatibles for S32N79 Host Controller platform driver
Date: Thu, 27 Aug 2026 17:36:27 +0300 [thread overview]
Message-ID: <ccacc3bc-7f81-4363-a273-a6076e468618@oss.nxp.com> (raw)
In-Reply-To: <ao75lU2zYDeOZi2f@SMW015318>
On 8/26/2026 5:35 PM, Frank Li wrote:
> On Wed, Aug 26, 2026 at 03:40:44PM +0200, Larisa Grigore wrote:
>> [You don't often get email from larisa.grigore@oss.nxp.com. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
>>
>> Document the device tree binding for the NXP S32N79 DWC-based UFS host
>> controller which is compliant with JESD-223D "Universal Flash Storage Host
>> Controller Interface" v3.0.
>>
>> The controller requires access to the SCM register block and the core
>> clock rate when M-PHY initialization is performed. Add the optional
>> nxp,mphy-boot-mode property to select the M-PHY firmware execution
>> environment.
>> Currently, the M-PHY firmware can only run from ROM. If the property is
>> omitted, M-PHY initialization is assumed to be handled externally.
>>
>> Signed-off-by: Larisa Grigore <larisa.grigore@oss.nxp.com>
>> ---
>> .../bindings/ufs/nxp,s32n7-ufshc.yaml | 99 +++++++++++++++++++
>> 1 file changed, 99 insertions(+)
>> create mode 100644 Documentation/devicetree/bindings/ufs/nxp,s32n7-ufshc.yaml
>>
>> diff --git a/Documentation/devicetree/bindings/ufs/nxp,s32n7-ufshc.yaml b/Documentation/devicetree/bindings/ufs/nxp,s32n7-ufshc.yaml
>> new file mode 100644
>> index 000000000000..d9d5669be313
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/ufs/nxp,s32n7-ufshc.yaml
>> @@ -0,0 +1,99 @@
>> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
>> +%YAML 1.2
>> +---
>> +$id: http://devicetree.org/schemas/ufs/nxp,s32n7-ufshc.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: NXP S32N79 Universal Flash Storage (UFS) Controller
>> +
>> +maintainers:
>> + - Larisa Grigore <larisa.grigore@oss.nxp.com>
>> +
>> +# Select only our matches, not all jedec,ufs
>> +select:
>> + properties:
>> + compatible:
>> + contains:
>> + const: nxp,s32n79-ufshc
>> + required:
>> + - compatible
>> +
>> +properties:
>> + compatible:
>> + items:
>> + - const: nxp,s32n79-ufshc
>> + - const: jedec,ufs-3.0
>
> Any place actually use this fallback?
You're right Frank! I will switch to `jedec,ufs-2.0` in v2.
>
>> +
>> + reg:
>> + minItems: 1
>> + items:
>> + - description: UFS Host Controller registers
>> + - description: System Control Module registers
>> +
>> + reg-names:
>> + description: |
>> + Names for the register regions. The first entry must be "ufshc".
>> + The second entry "scm" is mandatory only when nxp,mphy-boot-mode
>> + property is present.
>
> you already us if - else branch to restrict this limition, needn't
> description here.
Thank you! Will drop reg-names description in v2.
>> + minItems: 1
>> + items:
>> + - const: ufshc
>> + - const: scm
>> +
>> + clocks:
>> + maxItems: 1
>> + description: UFS core clock
>> +
>> + clock-names:
>> + items:
>> + - const: core_clk
>
> Needn't suffix _clk, just "core", generally needn't clock-names if only
> one clocks.
I will rename it to "core" in v2, if that works for you.
>> +
>> + nxp,mphy-boot-mode:
>> + description: |
>> + MPHY initialization mode. Defines how the MPHY firmware should be
>> + initialized and executed during UFS controller startup.
>> + If this property is not specified, MPHY initialization will be skipped.
>> + $ref: /schemas/types.yaml#/definitions/string
>> + enum:
>> + - rom
>
> why not use standard "phy" property, if no "phy" means ROM init it.
First, apologies for not including enough background in the commit message.
On the S32N79, the M-PHY firmware can be brought up in one of three
ways, selected through the SoC's SCM MPHY_RAM_CONFIG_STATUS register:
1. running MPHY from internal FW ROM,
2. running MPHY from a (modified) FW ROM copy in external SRAM, or
3. running MPHY from a FW image in external SRAM.
`nxp,mphy-boot-mode` was introduced to select which of these boot
sequences the controller driver programs. Today only option 1, "rom", is
implemented and validated, but the property was meant to leave room for
the two SRAM-based modes.
Given this setup, what would you suggest as the appropriate DT
representation? I would greatly appreciate any guidance you can provide.
> Frank
>> +
>> +required:
>> + - compatible
>> + - reg
>> +
>> +allOf:
>> + - $ref: ufs-common.yaml
>> + - if:
>> + required:
>> + - nxp,mphy-boot-mode
>> + then:
>> + properties:
>> + reg:
>> + minItems: 2
>> + reg-names:
>> + minItems: 2
>> + required:
>> + - reg-names
>> + - clocks
>> + - clock-names
>> + else:
>> + properties:
>> + reg:
>> + maxItems: 1
>> + reg-names:
>> + maxItems: 1
>> +
>> +unevaluatedProperties: false
>> +
>> +examples:
>> + - |
>> + ufshc@4ac80000 {
>> + compatible = "nxp,s32n79-ufshc", "jedec,ufs-3.0";
>> + reg = <0x4ac80000 0x1000>, <0x4ac40000 0x1000>;
>> + reg-names = "ufshc", "scm";
>> + interrupt-parent = <&irqsteer_coss>;
>> + interrupts = <211>;
>> + clocks = <&sys_clk>;
>> + clock-names = "core_clk";
>> + nxp,mphy-boot-mode = "rom";
>> + };
>> --
>> 2.43.0
>>
>>
next prev parent reply other threads:[~2026-08-27 14:36 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-26 13:40 [PATCH 00/10] Add S32N79RDB UFS support Larisa Grigore
2026-08-26 13:40 ` [PATCH 01/10] ufs: unipro: Move Tx/Rx FSM state definitions to unipro.h Larisa Grigore
2026-08-26 15:05 ` Frank Li
2026-08-27 13:59 ` Larisa Ileana Grigore
2026-08-26 13:40 ` [PATCH 02/10] ufs: unipro: Add TX/RX FSM state attributes Larisa Grigore
2026-08-26 15:09 ` Frank Li
2026-08-26 13:40 ` [PATCH 03/10] ufs: host: Add common Hibern8 TX FSM polling helper Larisa Grigore
2026-08-26 15:17 ` Frank Li
2026-08-26 15:33 ` Bart Van Assche
2026-08-27 14:03 ` Larisa Ileana Grigore
2026-08-27 9:14 ` Bough Chen
2026-08-27 14:10 ` Larisa Ileana Grigore
2026-08-27 15:00 ` Stanley Jhu
2026-08-26 13:40 ` [PATCH 04/10] scsi: ufs: Move Versal2 M-PHY CREG access helpers into ufshcd-dwc Larisa Grigore
2026-08-26 15:20 ` Frank Li
2026-08-27 14:11 ` Larisa Ileana Grigore
2026-08-26 15:36 ` Bart Van Assche
2026-08-27 14:13 ` Larisa Ileana Grigore
2026-08-27 10:47 ` Bough Chen
2026-08-26 13:40 ` [PATCH 05/10] scsi: ufs: dwc: Export common clock divider and link status helpers Larisa Grigore
2026-08-26 15:22 ` Frank Li
2026-08-26 13:40 ` [PATCH 06/10] dt-bindings: ufs: Add compatibles for S32N79 Host Controller platform driver Larisa Grigore
2026-08-26 14:35 ` Frank Li
2026-08-26 15:57 ` Conor Dooley
2026-08-27 14:37 ` Larisa Ileana Grigore
2026-08-27 14:36 ` Larisa Ileana Grigore [this message]
2026-08-27 14:45 ` Frank Li
2026-08-27 15:09 ` Larisa Ileana Grigore
2026-08-26 13:40 ` [PATCH 07/10] scsi: ufs: Add NXP S32N79 UFS host controller driver Larisa Grigore
2026-08-26 14:01 ` sashiko-bot
2026-08-26 15:49 ` Frank Li
2026-08-27 14:44 ` Larisa Ileana Grigore
2026-08-26 13:40 ` [PATCH 08/10] arm64: dts: freescale: s32n79: Add UFS host controller Larisa Grigore
2026-08-26 13:40 ` [PATCH 09/10] arm64: dts: freescale: s32n79-rdb: Enable UFS Larisa Grigore
2026-08-26 13:40 ` [PATCH 10/10] MAINTAINERS: Add NXP S32N7 UFS host controller entry Larisa Grigore
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ccacc3bc-7f81-4363-a273-a6076e468618@oss.nxp.com \
--to=larisa.grigore@oss.nxp.com \
--cc=Frank.Li@nxp.com \
--cc=Frank.li@oss.nxp.com \
--cc=James.Bottomley@hansenpartnership.com \
--cc=ajay.neeli@amd.com \
--cc=alim.akhtar@samsung.com \
--cc=aruizrui@redhat.com \
--cc=avri.altman@sandisk.com \
--cc=bvanassche@acm.org \
--cc=clizzi@redhat.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=eballetb@redhat.com \
--cc=echanude@redhat.com \
--cc=festevam@gmail.com \
--cc=imx@lists.linux.dev \
--cc=kernel@pengutronix.de \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=mani@kernel.org \
--cc=martin.petersen@oracle.com \
--cc=pedrom.sousa@synopsys.com \
--cc=robh@kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=s32@nxp.com \
--cc=sai.krishna.potthuri@amd.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox