From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 288B54968E3 for ; Tue, 9 Jun 2026 15:54:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.53 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781020496; cv=none; b=sluGNHo0uYBzvwmEkpZj1CTzTzdmjuSb3nKEZfPVlyOqW0ioqi1QRREaLEYGLLp7CvN41/vALLUI6+bVSVz4nna1ul2hEYJg87bBaGJIqFQRFpJBhunEWD7OzcIO6RH62pk8AJv+vTjQ6ed654xTd4OUPRJyxHo+jkXRDyvyBcI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781020496; c=relaxed/simple; bh=XQ+Osd1eVbWSATKTXF5HURL8oAvXOjxSQQHOr3GpyMM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=QCEJIcf8LjjNtw1KSxy2AgMr/3OGV2ai0cs7HylDnnTMsf8lgoZBF4kQjaxlcrfNsVetpbKmYANGBEYOBDNSYNGR0YHm5+FJ61aCLx+yPilDBC/MK5rKDTIqgpn6Hj+a0qafVWkU7sYDwaCjzg18Kh6N0l8GRp1lgDAUCTyJh0I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=eQPyTQCh; arc=none smtp.client-ip=209.85.128.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="eQPyTQCh" Received: by mail-wm1-f53.google.com with SMTP id 5b1f17b1804b1-490b4a8e28bso47884545e9.1 for ; Tue, 09 Jun 2026 08:54:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1781020493; x=1781625293; darn=vger.kernel.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=GareA3ERBAa/OnomNTiqG902TF5L3PgbbtUZ1LHV6tA=; b=eQPyTQChFja3ZLgSiLVE7NBZ94LK6flUq7xGGb3s8MbxSY+NEX7aVqYHzeMginwLFH ZBLiOWot/MI+jUH4JxzDsFmk3PloWHc2y5iAq9IAvaPgbl2f6drVGoG/9gZyukrIJqiz 8UQUGwipu2O7MZGDpsvb9eO6PyVG1QDuw0OEDyXuJ+kmu4SrW2MMe4fTTWHg5Ho2wg0r qeP+ea9gbj/d//HIuAdbdP5KJM0ROv8ebabjDrWR4hZCezwQuWzEP/1aEm8jNhQ6TS0m Xe0m643YwCfRkp9gI/nnzytFKN68oG7YrYejR5BVNAc64W6oLOUjtEaOXyLdeHYGQ+tO 69kg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781020493; x=1781625293; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=GareA3ERBAa/OnomNTiqG902TF5L3PgbbtUZ1LHV6tA=; b=lvj6hNWB/uk9V1rT+HGIfnbg1IWnkgU5u8vjB1RF8EWaLCfyMZ54xHWom9/TmQnsYh cv7VZq36Y+GM6uhZiiA3CghhQg5awWaj617CTeM5PtIZc85yg2ZhdSbZO++Q5besCz6o S3/dXJqTTz5vtK2uld9VzrQ5DuUZtiLRUHpHYbQDQ7o/nUTGdrJ2hCalCHrA4vU9S6EO ekRBYGsEfg2MsoUwoMWrK9H44AbrndLm5RTevBtUr2p4GlF5BjrBqXh/za35J3r+LXuN l4pdU5N4b+rXNKKl5rU3JfdG/ppe1/SMq5/bR/yqMvw1FmV1LhSHQUnD/Pqa9iRh97+r 1xkw== X-Forwarded-Encrypted: i=1; AFNElJ8QuJNbGawwoEUGOUitzdsOl45LwT1VmiypNjWLIqhnrD1VBENBcjWW7Sn6YdwVSjG1aePwd40+eDsG@vger.kernel.org X-Gm-Message-State: AOJu0YyrlOXXjGPgNsJykaOY+hsN4nyouwP5Ev4v8GlhxsRscViPq68b +J2BgQxsPoyJMc7VSOKn7w+bnsfSqaABfm2nH7SeMFW9sfJETh8oQRMP X-Gm-Gg: Acq92OH/n4EB+DsTIUK8DwlsUqMg+5Ml+O2Ipwd33kSOCZvd+txBk75/76VUTLNePbN 118TTcBoTUWIUrplSE89hYBJXQBcuYi8FdReNaz4IKgVFQpBAjNlIStPeqyfMDfu4qq7TXPb2+1 yupkmnZ+iSeb+etJTdXOHFvWm+c+VHTSLu1t+fnoR4syyMWmnKhWL6Dik5WyHqgWr6A+zMJPQNl 6NJARWWmNE9DJY04Zr7TpPz5/SFV19yxfJF9mTwYzGsTF7eRzdoeVgkrdQZTrhoekWebENXPX/M 7crxGuh7UY3qTze8EFjwoyqyflrlc72vWWlI1Lid82u3tENTcl+8XCHdjNGxR391FRAvQjeIejN NjGOfSCR3kFyiRnKEJSLZRRkkHVrJZ2isjJEpXdBKbgn4ToES0GDceMtxeEhR8vR46XKlC9TQOw jT3vehvHItjDpIodZnQUpcFyjPDBT5kSHllHWaea4UnX1c63oSnkcvPD8= X-Received: by 2002:a05:600c:1d27:b0:48f:d5b8:5b07 with SMTP id 5b1f17b1804b1-490c25e10f9mr354300715e9.20.1781020493455; Tue, 09 Jun 2026 08:54:53 -0700 (PDT) Received: from taln60.nuvoton.co.il ([212.199.177.18]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-490bc3d663csm545506645e9.11.2026.06.09.08.54.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jun 2026 08:54:51 -0700 (PDT) From: Tomer Maimon To: andrew@codeconstruct.com.au, broonie@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org Cc: openbmc@lists.ozlabs.org, linux-spi@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, avifishman70@gmail.com, tmaimon77@gmail.com, tali.perry1@gmail.com, venture@google.com, yuenn@google.com, benjaminfair@google.com Subject: [PATCH v3 2/2] spi: dt-bindings: nuvoton,npcm750-fiu: Convert to DT schema Date: Tue, 9 Jun 2026 18:54:37 +0300 Message-Id: <20260609155437.3285042-3-tmaimon77@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260609155437.3285042-1-tmaimon77@gmail.com> References: <20260609155437.3285042-1-tmaimon77@gmail.com> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Convert the Nuvoton NPCM FIU binding to DT schema format. Document the required control registers and the optional direct- mapped flash window separately, matching the driver behavior when the direct mapping is not described. Signed-off-by: Tomer Maimon --- .../bindings/spi/nuvoton,npcm-fiu.txt | 58 ------------ .../bindings/spi/nuvoton,npcm750-fiu.yaml | 93 +++++++++++++++++++ 2 files changed, 93 insertions(+), 58 deletions(-) delete mode 100644 Documentation/devicetree/bindings/spi/nuvoton,npcm-fiu.txt create mode 100644 Documentation/devicetree/bindings/spi/nuvoton,npcm750-fiu.yaml diff --git a/Documentation/devicetree/bindings/spi/nuvoton,npcm-fiu.txt b/Documentation/devicetree/bindings/spi/nuvoton,npcm-fiu.txt deleted file mode 100644 index fb38e96d395f..000000000000 --- a/Documentation/devicetree/bindings/spi/nuvoton,npcm-fiu.txt +++ /dev/null @@ -1,58 +0,0 @@ -* Nuvoton FLASH Interface Unit (FIU) SPI Controller - -NPCM FIU supports single, dual and quad communication interface. - -The NPCM7XX supports three FIU modules, -FIU0 and FIUx supports two chip selects, -FIU3 support four chip select. - -The NPCM8XX supports four FIU modules, -FIU0 and FIUx supports two chip selects, -FIU1 and FIU3 supports four chip selects. - -Required properties: - - compatible : "nuvoton,npcm750-fiu" for Poleg NPCM7XX BMC - "nuvoton,npcm845-fiu" for Arbel NPCM8XX BMC - - #address-cells : should be 1. - - #size-cells : should be 0. - - reg : the first contains the register location and length, - the second contains the memory mapping address and length - - reg-names: Should contain the reg names "control" and "memory" - - clocks : phandle of FIU reference clock. - -Required properties in case the pins can be muxed: - - pinctrl-names : a pinctrl state named "default" must be defined. - - pinctrl-0 : phandle referencing pin configuration of the device. - -Optional property: - - nuvoton,spix-mode: enable spix-mode for an expansion bus to an ASIC or CPLD. - -Aliases: -- All the FIU controller nodes should be represented in the aliases node using - the following format 'fiu{n}' where n is a unique number for the alias. - In the NPCM7XX BMC: - fiu0 represent fiu 0 controller - fiu1 represent fiu 3 controller - fiu2 represent fiu x controller - - In the NPCM8XX BMC: - fiu0 represent fiu 0 controller - fiu1 represent fiu 1 controller - fiu2 represent fiu 3 controller - fiu3 represent fiu x controller - -Example: -fiu3: spi@c00000000 { - compatible = "nuvoton,npcm750-fiu"; - #address-cells = <1>; - #size-cells = <0>; - reg = <0xfb000000 0x1000>, <0x80000000 0x10000000>; - reg-names = "control", "memory"; - clocks = <&clk NPCM7XX_CLK_AHB>; - pinctrl-names = "default"; - pinctrl-0 = <&spi3_pins>; - flash@0 { - ... - }; -}; - diff --git a/Documentation/devicetree/bindings/spi/nuvoton,npcm750-fiu.yaml b/Documentation/devicetree/bindings/spi/nuvoton,npcm750-fiu.yaml new file mode 100644 index 000000000000..965904a98785 --- /dev/null +++ b/Documentation/devicetree/bindings/spi/nuvoton,npcm750-fiu.yaml @@ -0,0 +1,93 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/spi/nuvoton,npcm750-fiu.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Nuvoton NPCM Flash Interface Unit (FIU) SPI Controller + +maintainers: + - Tomer Maimon + +allOf: + - $ref: /schemas/spi/spi-controller.yaml# + +description: | + NPCM FIU supports single, dual and quad communication interface. + + The NPCM7XX supports three FIU modules: + FIU0 and FIUx support two chip selects + FIU3 supports four chip selects. + + The NPCM8XX supports four FIU modules: + FIU0 and FIUx support two chip selects + FIU1 and FIU3 support four chip selects. + + The FIU control register block is always required. The direct-mapped + flash window is optional because the controller can still access flash + through the UMA path when that mapping is not described. + + Alias convention: + The '/aliases' node should define: + For NPCM7xx: fiu0=&fiu0; fiu1=&fiu3; fiu2=&fiux; + For NPCM8xx: fiu0=&fiu0; fiu1=&fiu3; fiu2=&fiux; fiu3=&fiu1; + +properties: + compatible: + enum: + - nuvoton,npcm750-fiu # Poleg NPCM7XX + - nuvoton,npcm845-fiu # Arbel NPCM8XX + + reg: + description: + The first resource is the FIU control register block. An optional second + resource describes the direct-mapped flash window used for direct + read/write accesses. + minItems: 1 + items: + - description: FIU control registers + - description: Memory-mapped flash contents + + reg-names: + description: + Resource names for the control registers and optional direct-mapped + flash window. + minItems: 1 + items: + - const: control + - const: memory + + clocks: + maxItems: 1 + description: FIU reference clock. + + nuvoton,spix-mode: + type: boolean + description: Enable SPIX mode for an expansion bus to an ASIC or CPLD. + +required: + - compatible + - reg + - reg-names + - clocks + +unevaluatedProperties: false + +examples: + - | + #include + spi@fb000000 { + compatible = "nuvoton,npcm750-fiu"; + reg = <0xfb000000 0x1000>, <0x80000000 0x10000000>; + reg-names = "control", "memory"; + #address-cells = <1>; + #size-cells = <0>; + clocks = <&clk NPCM7XX_CLK_SPI0>; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + #address-cells = <1>; + #size-cells = <1>; + }; + }; -- 2.34.1