On Wed, 2014-01-22 at 13:39 +0100, Matti Laakso wrote: > > The Home Hub 2B has both nand and nor flash connected to the ebu, plus > > an ath9k pci wireless card, and the main difficulty is getting all three > > working at the same time without interfering with each other. The nand > > driver currently in trunk works fine, provided that open-drain is > > enabled on the ebu cs1 pin, and provided that wireless is off. However, > > the only way to get the nor chip to work reliably seems to be disable > > open-drain on ebu cs1, at which point the nand driver generates jffs2 > > errors. Regardless whether open-drain is enabled or not, switching on > > wireless also causes jffs2 errors. > > Based on my experience with the boards with NOR only, the EBU_CS1 pin > should always be driven (i.e., not open-drain) for the flash not to get > corrupted by PCI. If it is not driven, it takes some time for the pin to > be pulled up (depending on the pull-up resistors), and the flash chip > may still be enabled when the PCI transfers start. > > As far as I can see, the problem here is that for two flash chips you > need two chip select signals. IIRC, the EBU always uses GPIO23 > (EBU_CS1), no matter whether you use NAND or NOR. So you likely need > another GPIO to select between NAND and NOR, which you have to toggle > manually. Does the original firmware have access to both NAND and NOR > simultaneously? Or does the original bootloader disable NOR before > booting the firmware? > > Matti Laakso > _______________________________________________ > openwrt-devel mailing list > openwrt-devel@lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Interesting! I had assumed either that there was a cs0 pin, but that it did not appear anywhere in the sources because it was not reconfigurable in the way cs1 is, or else (but I don't know enough about electronics to know whether this is feasible in practice) that both nand and nor on the HH2B were connected to cs1, one of them directly and the other through an inverter, so that whenever one was selected the other was deselected. On the HH2B nor contains the uboot and the uboot environment, nand contains everything else. I don't think the original bootloader disables the nor, because uboot can be reflashed from within the factory firmware. But I am slightly puzzled that there is no trace of the nor driver loading in the bootlog on the wiki. I no longer have the original firmware binary to check again for myself. I'll have to have a closer look at the sources (which are not complete) and see if I can work out what is going on. Ben _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel