From: Richard GENOUD <richard.genoud@bootlin.com>
To: "Jernej Škrabec" <jernej.skrabec@gmail.com>,
"Miquel Raynal" <miquel.raynal@bootlin.com>,
"Richard Weinberger" <richard@nod.at>,
"Vignesh Raghavendra" <vigneshr@ti.com>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Chen-Yu Tsai" <wens@csie.org>,
"Samuel Holland" <samuel@sholland.org>
Cc: "Wentao Liang" <vulab@iscas.ac.cn>,
"Uwe Kleine-König" <u.kleine-koenig@baylibre.com>,
"Maxime Ripard" <mripard@kernel.org>,
"Thomas Petazzoni" <thomas.petazzoni@bootlin.com>,
linux-mtd@lists.infradead.org, devicetree@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 03/15] arm64: dts: allwinner: h616: add NAND controller
Date: Mon, 13 Oct 2025 13:59:28 +0200 [thread overview]
Message-ID: <893f8b18-265e-4351-8d91-bd81f04c6eed@bootlin.com> (raw)
In-Reply-To: <4682810.LvFx2qVVIh@jernej-laptop>
Le 11/10/2025 à 12:33, Jernej Škrabec a écrit :
> Dne petek, 10. oktober 2025 ob 10:40:30 Srednjeevropski poletni čas je Richard Genoud napisal(a):
>> The H616 has a NAND controller quite similar to the A10/A23 ones, but
>> with some register differences, more clocks (for ECC and MBUS), more ECC
>> strengths, so this requires a new compatible string.
>>
>> This patch adds the NAND controller node and pins in the device tree.
>>
>> Signed-off-by: Richard Genoud <richard.genoud@bootlin.com>
>> ---
>> .../arm64/boot/dts/allwinner/sun50i-h616.dtsi | 50 +++++++++++++++++++
>> 1 file changed, 50 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
>> index ceedae9e399b..60626eba7f7c 100644
>> --- a/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
>> +++ b/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
>> @@ -278,6 +278,37 @@ ir_rx_pin: ir-rx-pin {
>> function = "ir_rx";
>> };
>>
>> + nand_pins: nand-pins {
>> + pins = "PC0", "PC1", "PC2", "PC5", "PC8", "PC9",
>> + "PC10", "PC11", "PC12", "PC13", "PC14",
>> + "PC15", "PC16";
>> + function = "nand0";
>> + };
>> +
>> + nand_cs0_pin: nand-cs0-pin {
>> + pins = "PC4";
>> + function = "nand0";
>> + bias-pull-up;
>> + };
>> +
>> + nand_cs1_pin: nand-cs1-pin {
>> + pins = "PC3";
>> + function = "nand0";
>> + bias-pull-up;
>> + };
>> +
>> + nand_rb0_pin: nand-rb0-pin {
>> + pins = "PC6";
>> + function = "nand0";
>> + bias-pull-up;
>> + };
>> +
>> + nand_rb1_pin: nand-rb1-pin {
>> + pins = "PC7";
>> + function = "nand0";
>> + bias-pull-up;
>> + };
>> +
>> mmc0_pins: mmc0-pins {
>> pins = "PF0", "PF1", "PF2", "PF3",
>> "PF4", "PF5";
>> @@ -440,6 +471,25 @@ mmc2: mmc@4022000 {
>> #size-cells = <0>;
>> };
>>
>> + nfc: nand-controller@4011000 {
>
> Nodes are sorted by memory address. So this one should be moved before
> mmc2 and possibly others.
Indeed.
I'll fix that.
>
>> + compatible = "allwinner,sun50i-h616-nand-controller";
>> + reg = <0x04011000 0x1000>;
>> + interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
>> + clocks = <&ccu CLK_BUS_NAND>, <&ccu CLK_NAND0>,
>> + <&ccu CLK_NAND1>, <&ccu CLK_MBUS_NAND>;
>> + clock-names = "ahb", "mod", "ecc", "mbus";
>> + resets = <&ccu RST_BUS_NAND>;
>> + reset-names = "ahb";
>> + dmas = <&dma 10>;
>> + dma-names = "rxtx";
>> + pinctrl-names = "default";
>> + pinctrl-0 = <&nand_pins>, <&nand_cs0_pin>,
>> + <&nand_cs1_pin>, <&nand_rb0_pin>,
>> + <&nand_rb1_pin>;
>
> Are you sure that each nand device will use exactly this pin configuration?
> IIUC, not all chips will have two CS and two RB pins. If so, pinctrl nodes
> should be moved to device DT and pins subnodes should be marked with
> /omit-if-no-ref/.
You're right, all pins may not be used.
Thanks!
>
> Best regards,
> Jernej
>
>> + #address-cells = <1>;
>> + #size-cells = <0>;
>> + };
>> +
>> uart0: serial@5000000 {
>> compatible = "snps,dw-apb-uart";
>> reg = <0x05000000 0x400>;
>>
--
Richard Genoud, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
next prev parent reply other threads:[~2025-10-13 11:59 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-10 8:40 [PATCH 00/15] Introduce Allwinner H6/H616 NAND controller support Richard Genoud
2025-10-10 8:40 ` [PATCH 01/15] mtd: rawnand: sunxi: Remove superfluous register readings Richard Genoud
2025-10-11 10:15 ` Jernej Škrabec
2025-10-10 8:40 ` [PATCH 02/15] dt-bindings: mtd: sunxi: Add new compatible Richard Genoud
2025-10-10 8:45 ` Krzysztof Kozlowski
2025-10-10 10:16 ` Richard GENOUD
2025-10-10 8:49 ` Krzysztof Kozlowski
2025-10-10 10:18 ` Richard GENOUD
2025-10-11 10:27 ` Jernej Škrabec
2025-10-13 11:56 ` Richard GENOUD
2025-10-10 8:40 ` [PATCH 03/15] arm64: dts: allwinner: h616: add NAND controller Richard Genoud
2025-10-10 8:47 ` Krzysztof Kozlowski
2025-10-10 10:22 ` Richard GENOUD
2025-10-10 10:24 ` Krzysztof Kozlowski
2025-10-11 10:33 ` Jernej Škrabec
2025-10-13 11:59 ` Richard GENOUD [this message]
2025-10-10 8:40 ` [PATCH 04/15] mtd: nand: sunxi: move ecc strenghts in sunxi_nfc_caps Richard Genoud
2025-10-11 10:41 ` Jernej Škrabec
2025-10-13 12:00 ` Richard GENOUD
2025-10-10 8:40 ` [PATCH 05/15] mtd: nand: sunxi: introduce reg_ecc_err_cnt " Richard Genoud
2025-10-10 8:40 ` [PATCH 06/15] mtd: nand: sunxi: introduce reg_user_data " Richard Genoud
2025-10-10 8:40 ` [PATCH 07/15] mtd: nand: sunxi: rework pattern found registers Richard Genoud
2025-10-10 8:40 ` [PATCH 08/15] mtd: nand: sunxi: add has_ecc_block_512 capability Richard Genoud
2025-10-10 8:40 ` [PATCH 09/15] mtd: nand: sunxi: introduce ecc_mode_mask in sunxi_nfc_caps Richard Genoud
2025-10-10 8:40 ` [PATCH 10/15] mtd: nand: sunxi: introduce random en/dir " Richard Genoud
2025-10-10 8:40 ` [PATCH 11/15] mtd: nand: sunxi: introduce reg_pat_id " Richard Genoud
2025-10-10 8:40 ` [PATCH 12/15] mtd: nand: sunxi: introduce reg_spare_area " Richard Genoud
2025-10-10 8:40 ` [PATCH 13/15] mtd: nand: sunxi: introduce ecc_err_mask " Richard Genoud
2025-10-10 8:40 ` [PATCH 14/15] mtd: nand: sunxi: introduce sram_size " Richard Genoud
2025-10-10 8:40 ` [PATCH 15/15] mtd: rawnand: sunxi: Add support for H616 nand controller Richard Genoud
2025-10-11 1:00 ` kernel test robot
2025-10-11 10:48 ` Jernej Škrabec
2025-10-13 12:01 ` Richard GENOUD
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=893f8b18-265e-4351-8d91-bd81f04c6eed@bootlin.com \
--to=richard.genoud@bootlin.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=jernej.skrabec@gmail.com \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=linux-sunxi@lists.linux.dev \
--cc=miquel.raynal@bootlin.com \
--cc=mripard@kernel.org \
--cc=richard@nod.at \
--cc=robh@kernel.org \
--cc=samuel@sholland.org \
--cc=thomas.petazzoni@bootlin.com \
--cc=u.kleine-koenig@baylibre.com \
--cc=vigneshr@ti.com \
--cc=vulab@iscas.ac.cn \
--cc=wens@csie.org \
/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