Re: Re: NextThing C.H.I.P. v1.0 - Debian Stretch Installer from USB
- To: debian-arm@lists.debian.org
- Subject: Re: Re: NextThing C.H.I.P. v1.0 - Debian Stretch Installer from USB
- From: Pablo Rath <pablo@parobalth.org>
- Date: Thu, 4 Jun 2020 13:27:01 +0200
- Message-id: <[🔎] 20200604112701.j6yrhhj4ote3ci67@cherry>
- In-reply-to: <20200527194944.rdf5cytlw4emyah4@cherry>
- References: <20170622194606.GA3960@pabbook> <0fd1b773c59f70c591a636bba6c482044a4f71d8.camel@bes.tel> <20200521102524.etpsyrq4nskkv2wr@cherry> <3d10c0b8b95b1bb93a5e0c5059095c1a96aa7995.camel@bes.tel> <20200526102032.puxxue7f2nexf6fj@cherry> <87v9ki1sbl.fsf@ponder> <20200527194944.rdf5cytlw4emyah4@cherry>
On Wed, May 27, 2020 at 09:49:44PM +0200, Pablo Rath wrote:
> On Tue, May 26, 2020 at 11:09:34AM -0700, Vagrant Cascadian wrote:
>
> >
> > How did you flash it?
I have made some progress in the last couple of days so you can safely
ignore my last message from Wed, May 27, 2020 at 09:49:44PM +0200.
It is still a work in progress but worth sharing. Hopefully I can do further
testing in the next couple of days and report back.
Flashing NAND with mainline U-Boot works with changes in CHIP_defconfig and
sun5i-r8-chip.dts. I used git tag v2020.04.
First patch nand support into the device tree (source from an older
version of the device tree) I think "nfc" was removed when ubifs dropped
support for CHIPs MLC NAND.
Second activate mtd-driver in CHIP_defconfig and add some NAND specific
parameters. I "borrowed" some lines fro CHIP_pro_defconfig. Then
commented some out again so a more minimal CHIP_defconfig is surely possible. I am going to do a few tests in the next couple of days. My working current setup is:
diff --cc arch/arm/dts/sun5i-r8-chip.dts
index 879a4b0f3b,879a4b0f3b..f1cad4cf30
--- a/arch/arm/dts/sun5i-r8-chip.dts
+++ b/arch/arm/dts/sun5i-r8-chip.dts
@@@ -175,6 -175,6 +175,20 @@@
status = "okay";
};
++&nfc {
++ pinctrl-names = "default";
++ pinctrl-0 = <&nand_pins_a &nand_cs0_pins_a &nand_rb0_pins_a>;
++ status = "okay";
++
++ nand@0 {
++ #address-cells = <2>;
++ #size-cells = <2>;
++ reg = <0>;
++ allwinner,rb = <0>;
++ nand-ecc-mode = "hw";
++ };
++};
++
&ohci0 {
status = "okay";
};
diff --cc configs/CHIP_defconfig
index a373dfd078,a373dfd078..d320714d45
--- a/configs/CHIP_defconfig
+++ b/configs/CHIP_defconfig
@@@ -6,11 -6,11 +6,23 @@@ CONFIG_DRAM_TIMINGS_DDR3_800E_1066G_133
CONFIG_USB0_VBUS_PIN="PB10"
CONFIG_VIDEO_COMPOSITE=y
CONFIG_SPL_I2C_SUPPORT=y
++CONFIG_CMD_MTDPARTS=y
++CONFIG_MTDIDS_DEFAULT="nand0=sunxi-nand.0"
++#CONFIG_MTDPARTS_DEFAULT="mtdparts=sunxi-nand.0:256k(spl),256k(spl-backup),2m(uboot),2m(uboot-backup),-(UBI)"
CONFIG_CMD_DFU=y
CONFIG_CMD_USB_MASS_STORAGE=y
CONFIG_DEFAULT_DEVICE_TREE="sun5i-r8-chip"
++#CONFIG_ENV_IS_IN_MMC=y
CONFIG_DFU_RAM=y
# CONFIG_MMC is not set
++CONFIG_MTD=y
++CONFIG_MTD_RAW_NAND=y
++CONFIG_SYS_NAND_BLOCK_SIZE=4194304
++CONFIG_SYS_NAND_PAGE_SIZE=16384
++CONFIG_SYS_NAND_OOBSIZE=1664
++CONFIG_NAND_SUNXI_SPL_USABLE_PAGE_SIZE=4096
++#CONFIG_NAND_SUNXI_SPL_ECC_STRENGTH=64/1024
++CONFIG_SYS_NAND_U_BOOT_OFFS=0x800000
CONFIG_AXP_ALDO3_VOLT=3300
CONFIG_AXP_ALDO4_VOLT=3300
CONFIG_CONS_INDEX=2
Flash like described in README.nand
(https://gitlab.denx.de/u-boot/u-boot/-/blob/master/board/sunxi/README.nand)
*BUT* the mainline version in spl/sunxi-spl-with-ecc.bin did not work
for me (U-Boot SPL hangs while booting from NAND).
I used spl/sunxi-spl-with-ecc.bin from NTCs U-Boot repo instead. So there is
either a code difference between tools/sunxi-spl-image-builder in mainline
U-Boot and NTCs U-Boot repo or just how it is called and/or further
processed. I am going to do some further tests starting with
CHIP-tools/chip-create-nand-images.sh and NTCs U-boot source.
kind regards
Pablo
Reply to: