From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1006EEB64DD for ; Wed, 5 Jul 2023 20:18:17 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6880A863E9; Wed, 5 Jul 2023 22:17:49 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=lespocky.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 5607F863A4; Wed, 5 Jul 2023 22:17:46 +0200 (CEST) Received: from mout.kundenserver.de (mout.kundenserver.de [217.72.192.73]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id D1BEC863C0 for ; Wed, 5 Jul 2023 22:17:42 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=lespocky.de Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=alex@home.lespocky.de Received: from methusalix.internal.home.lespocky.de ([89.245.58.120]) by mrelayeu.kundenserver.de (mreue109 [213.165.67.113]) with ESMTPSA (Nemesis) id 1Mj8eB-1pkqO91aXF-00f9Pq; Wed, 05 Jul 2023 22:17:32 +0200 Received: from lemmy.internal.home.lespocky.de ([192.168.243.178] helo=lemmy.home.lespocky.de) by methusalix.internal.home.lespocky.de with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qH8wL-0005Aa-Qz; Wed, 05 Jul 2023 22:17:31 +0200 Received: (nullmailer pid 322482 invoked by uid 2001); Wed, 05 Jul 2023 20:17:29 -0000 From: Alexander Dahl To: Eugen Hristev Cc: Alexander Dahl , Durai Manickam KR , Sergiu Moga , u-boot@lists.denx.de Subject: [PATCH 5/5] ARM: dts: at91: sam9x60-curiosity: Add raw NAND flash Date: Wed, 5 Jul 2023 22:17:01 +0200 Message-Id: <20230705201701.322372-6-post@lespocky.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230705201701.322372-1-post@lespocky.de> References: <20230705201701.322372-1-post@lespocky.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scan-Signature: 81b6417274a1088b3d603ece0814ceac X-Provags-ID: V03:K1:zse8lkkO2BWefVTZJ4KFoOlBDMsSi2eQHC24KAsH/UDZ+rHP88J AQMnCYH3cnevCjF2sI5+VZ+Jk0WQHzgUeiEXkD3zlbPRqYhflGKxPQiKmxhSm5CqgJuSUJg 2I6K1l0h6XkGa4Tr2caaKBAsQVxoFYyyonutwlYkOLIAPlg1yHVL6CicaMKqxWrvlJw6+LL cNDIAzaJahZ1fhc5jNlwg== UI-OutboundReport: notjunk:1;M01:P0:ilZMYeSpH74=;MTyZ0S4R3e3RAkp2TsRl8dpGzEl TF3ctLNOYjAJWTPZ+YZ73IipTGLyYkqhGtdZTUXYcEmd+Pu6Vui8R6AztaGTqBpv448dqwNlY LuT6GCdBVwciOez54yCyldZISUNGPL2tpkpb4uQbxTx6nEcUzRX9+dEsQGwaz+SKQ/zncpVwb FOZ+N2xtL1S+s9g+eBlXoKWywxcMTtqOMnAdHoQ0wLBSTuFUhGHgGnCsHdKMvXIOwkmLEcMsB QyFw9AaKnIoQJS784jv6Hm2nKhKe/iSUf1nvkM6LHCC71+ITfq+PRfQfgZbXdMPVNKqbO2PIK 33EAApqUEDb/oBHRsGJXLJ/2QX/KfNJICUle8CpPtYSlOq/Ua3m1BBun7vdAZPAWFIt5v8oaY imvVfpufMCGfKsFGFWsTCCM0zSMgrOYOJaAOD6CcPi73oDZnU2mY5+Dt5X2QSEGYsmP4mrDQm t8tgpijsFSiB9gctSoqF5hRwWzlU+P2vb8Irpr56/pcm024vj3VFq+RLOkQ2FdQokPFuLYguC mwLbtGFSlM/0GAJ/KD1rBjiQis45pYAPNF55Ar7CI8W3Vg5ST7sKJtwUfgPd3qqLihObsOJNC mJsMro2wacDXD6b/Dr38uGkjiZd5UgN0HWsDfPGnEL9WELXFYmk/5M2klkvpNx3ezeDuw4YO8 5Vb6w0efTJRpfSHeLfHXrO5iEB97QQ5FzaF74MvJ0w== X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean From: Alexander Dahl Basically the same as on sam9x60-ek. Same as in Linux. NAND flash is correctly detected when booting into U-Boot: U-Boot 2023.07-rc6-00005-g12719f75dc-dirty (Jul 05 2023 - 13:06:35 +0000) CPU: SAM9X60 128MiB DDR2 SiP Crystal frequency: 24 MHz CPU clock : 600 MHz Master clock : 200 MHz Model: Microchip SAM9X60 Curiosity DRAM: 128 MiB Core: 145 devices, 22 uclasses, devicetree: separate NAND: 512 MiB MMC: sdhci-host@80000000: 0, sdhci-host@90000000: 1 Loading Environment from FAT... Unable to read "uboot.env" from mmc0:1... In: serial Out: serial Err: serial Net: eth0: ethernet@f802c000 Hit any key to stop autoboot: 0 Signed-off-by: Alexander Dahl --- arch/arm/dts/at91-sam9x60_curiosity.dts | 103 ++++++++++++++++++++++++ 1 file changed, 103 insertions(+) diff --git a/arch/arm/dts/at91-sam9x60_curiosity.dts b/arch/arm/dts/at91-sam9x60_curiosity.dts index fb59405b24..2547b4527c 100644 --- a/arch/arm/dts/at91-sam9x60_curiosity.dts +++ b/arch/arm/dts/at91-sam9x60_curiosity.dts @@ -46,6 +46,71 @@ }; }; +&ebi { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_ebi_addr_nand &pinctrl_ebi_data_0_7>; + status = "okay"; + + nand_controller: nand-controller { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_nand_oe_we &pinctrl_nand_cs &pinctrl_nand_rb>; + status = "okay"; + + nand@3 { + reg = <0x3 0x0 0x800000>; + rb-gpios = <&pioD 5 GPIO_ACTIVE_HIGH>; + cs-gpios = <&pioD 4 GPIO_ACTIVE_HIGH>; + nand-bus-width = <8>; + nand-ecc-mode = "hw"; + nand-ecc-strength = <8>; + nand-ecc-step-size = <512>; + nand-on-flash-bbt; + label = "atmel_nand"; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + at91bootstrap@0 { + label = "at91bootstrap"; + reg = <0x0 0x40000>; + }; + + uboot@40000 { + label = "u-boot"; + reg = <0x40000 0xc0000>; + }; + + ubootenvred@100000 { + label = "U-Boot Env Redundant"; + reg = <0x100000 0x40000>; + }; + + ubootenv@140000 { + label = "U-Boot Env"; + reg = <0x140000 0x40000>; + }; + + dtb@180000 { + label = "device tree"; + reg = <0x180000 0x80000>; + }; + + kernel@200000 { + label = "kernel"; + reg = <0x200000 0x600000>; + }; + + rootfs@800000 { + label = "rootfs"; + reg = <0x800000 0x1f800000>; + }; + }; + }; + }; +}; + &flx0 { atmel,flexcom-mode = ; status = "okay"; @@ -74,6 +139,26 @@ }; &pinctrl { + ebi { + pinctrl_ebi_data_0_7: ebi-data-lsb-0 { + atmel,pins = + ; + }; + + pinctrl_ebi_addr_nand: ebi-addr-0 { + atmel,pins = + ; + }; + }; + flexcom { pinctrl_flx0: flx0_default { atmel,pins = @@ -82,6 +167,24 @@ }; }; + nand { + pinctrl_nand_oe_we: nand-oe-we-0 { + atmel,pins = + ; + }; + + pinctrl_nand_rb: nand-rb-0 { + atmel,pins = + ; + }; + + pinctrl_nand_cs: nand-cs-0 { + atmel,pins = + ; + }; + }; + pinctrl_onewire_tm_default: onewire_tm_default { atmel,pins = ; -- 2.30.2