Am 06.12.2016 um 11:13 schrieb H. Nikolaus Schaller hns@goldelico.com:
Am 06.12.2016 um 10:51 schrieb H. Nikolaus Schaller hns@goldelico.com:
Hi Notaz,
Am 05.12.2016 um 19:11 schrieb Grazvydas Ignotas notasas@gmail.com:
Hi,
as ED is going distribute current prototypes to general public, it would be great if they would be detectable in software to distinguish them from potentially fixed future boards. Probably best if it can be detected by u-boot, so that it can select a DT file with appropriate CPU frequencies, as it sounds like the current prototypes should be fully functional otherwise. It makes no sense to throw those boards away or "deprecate" them, I think the default OS should be able to support them indefinitely.
Yes, that is the plan. Like we auto-detect the 600MHz/1GHz pandoras.
It is just not implemented anywhere... Another open item, not closed because it wasn't essential for me yet.
I currently use different SD cards and either cp the correct DT file or modify uEnv.txt.
The revision detection is done by two GPIOs. They are either floating, pulled up or pulled down by an external 10k resistor. This can be detected by modifying the OMAP PU/PD and check if it is floating or stuck at 0 or 1. Gives 3 values per gpio. So we can detect 9 combinations.
The GPIOs are gpio2_32 and gpio2_33.
There is a table on sheet 28/51 - but it is wrong. So there will be a new version of the PD soon.
s/PD/PDF/
It should be
CPU board Revisions (there were no revisions before 4.9): 4.9: no resistors - summer 2015 5.0: GPIO2_32=PU - dec 2015 5.1: GPIO2_32=PD - sept 2016 5.2: GPIO2_33=PU - mass production 5.3: GPIO2=33=PD 5.4: GPIO2_32+33=PU 5.5: GPIO2_32+33=PD 5.6: GPIO2_32+33=PU+PD 5.7: GPIO2_32+33=PD+PU
Unfortunately there is no generic revision handling method in U-Boot so that we just have to write a gpio driver... Everyone has his own way of getting different device trees loaded. Either by setting some environment variables, by adding a default script compiled into U-Boot, or by adding a boot.scr. All this is quite fragile.
What makes the Pyra even more complex is that we might end up in different revisions for the mainboard and CPU and having them mixed. But let's see if this really is a problem because the kernel can detect almost all chips on the mainboard.
So you could think about submitting a patch for our U-Boot:
http://git.goldelico.com/?p=gta04-uboot.git;a=tree;f=board/goldelico/letux-c...
I just looked into the code and it turns out that I have already implemented a while ago what you propose:
http://git.goldelico.com/?p=gta04-uboot.git;a=blob;f=board/goldelico/letux-c...
Only translating into the proper DTB isn't implemented. And, detecting major mainboard variants is missing in
http://git.goldelico.com/?p=gta04-uboot.git;a=blob;f=board/pandora/pyra%2Blc...
Nothing difficult.
BR, Nikolaus