[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Re: NextThing C.H.I.P. v1.0 - Debian Stretch Installer from USB

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_MMC is not set

Flash like described in 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

Reply to: