3mdeb / hardware-presale-validation

This repository aims to gather all tests related to supported devices. Tests are written in the Robot Framework and should be performed on the dedicated test stand.
0 stars 0 forks source link

RTE pre-sale validation test 7. SPI Header #2

Closed Stanislaw-bnk closed 3 months ago

Stanislaw-bnk commented 4 months ago

@BeataZdunczyk @macpijan O ile udało mi się zestawić całe środowisko testowe i przejść testy 1-6 z tej instrukcji: https://gitlab.com/3mdeb/rte/docs/-/blob/master/docs/rte_presale_validation.md#4-builtin-uart-pinout to już punkt 7. SPI Header jest dla mnie zbyt niezrozumiały. Poświęciłem już sporo czasu, próbując go przejść, jednak bez skutku. Filip sugerował nawet, że coś może być nie tak z SPI na RTE. Prosiłbym o wskazanie osoby, która mogłaby zaktualizować punkt 7 tej instrukcji w ten sposób, aby mogła go przejść osoba "nietechniczna" dla której takie zwroty jak Make sure that GPIO405 specifying a value of SPI VCC Pin voltage is set correctly mogą okazać się niezrozumiałe. Zgodnie z nowymi założeniami, instrukcja walidacji sprzętu który trafi do sklepu powinna być tak napisana, żeby osoba, która nigdy nie miała go w ręku mogła krok po kroku podążać za instrukcją i przejść przez test. Wiem, że ta instrukcja nie była raczej pisana z taką myślą (było to dawno temu, jeszcze przez zespół TAT), ale trzeba by to było zaktualizować. Temat jest dość pilny, gdyż dwóch klientów z niecierpliwością czeka na te płytki, jednym z nich jest Nitrokey. @rafkoch cc

BeataZdunczyk commented 4 months ago

@Stanislaw-bnk umówiliśmy się, że przetestujecie RTE z Filipem i w wyniku szkolenia poprawisz instrukcję tak, by była zrozumiała. Dodaj proszę: https://github.com/3mdeb/hardware-presale-validation/issues/1#issuecomment-2114280824

@mkopec spójrz proszę na punkt 7, by @Stanislaw-bnk mógł dokończyć testy. P.S to nie jest publiczne repozytorium = angielski?

Stanislaw-bnk commented 4 months ago

Nie jestem w stanie za bardzo poprawić tej instrukcji, bo nie mogę jej poprawnie przejść, do tego podobno nie wszystkie kroki są tam potrzebne, np. użycie DediProga, jednak ja tego nie jestem w stanie stwierdzić. Największy problem, to czy na pewno ta funkcjonalność w ogóle działa na RTE? Jedno RTE, które przekazałem Filipowi wcześniej (potrzebował do racka), wróciło z opisem SPI Dead? Jeżeli są tam jakieś błędy w projekcie, to bardzo ważne aby zostały poprawione przed zleceniem realizacji drugiej transzy tego zamówienia. Jedna rzecz, którą na ten moment na pewno trzeba poprawić to brak przycisku Reset button @miczyg1 cc

mkopec commented 4 months ago

Make sure that GPIO405 specifying a value of SPI VCC Pin voltage is set correctly

Tutaj chodzi o to, że należy się upewnić, czy napięcie sygnału SPI Vcc jest prawidłowe dla platformy z którą testujesz. Powinno to być opisane w theory of operation platformy, a jak nie to nalezy wygooglać kod z chipu, znaleźc datasheet i sprawdzić jakie napięcie przyjmuje. Napięcie steruje się GPIO 405, jest to opsane w https://docs.dasharo.com/transparent-validation/rte/v1.1.0/specification/#spi-header user can choose the voltage level for Vcc SPI - either 1.8V or 3.3 V:

ale na pewno można lepiej sformułowac ten punkt instrukcji :)

pietrushnic commented 4 months ago

@BeataZdunczyk @Stanislaw-bnk @mkopec this is public repository, please use English further on.

macpijan commented 4 months ago

@Stanislaw-bnk As discussed offline, I propose to remove the content of step no 7 and replace it with the following:

  1. Connect the chip directly to RTE via jumper wires (no clip).
  2. Check if chip is detected by executing on RTE:
wget https://raw.githubusercontent.com/3mdeb/RteCtrl/master/scripts/flash.sh
chmod +x ./flash.sh
./flash.sh probe

PASS if you can find line: Found Winbond flash chip "W25Q128.V..M" (16384 kB, SPI) on ch341a_spi.

FAIL if you can find line: No EEPROM/flash device found.

  1. If previous step fails, we cannot do much more. If PASSED, we can:

a) erase chip

./flash.sh erase

b) write firmware

wget https://3mdeb.com/open-source-firmware/Dasharo/asus_kgpe-d16/v0.4.0/asus_kgpe-d16_v0.4.0_16M_vboot_notpm.rom
./flash.sh write asus_kgpe-d16_v0.4.0_16M_vboot_notpm.rom

c) read firmware

./flash.sh read read.rom
sha256sum read.rom asus_kgpe-d16_v0.4.0_16M_vboot_notpm.rom

PASS if sha256 returns the same content for both files. FAIL if any of the step fails.

Stanislaw-bnk commented 4 months ago

@macpijan While trying ./flash.sh probe on another RTE i get following input:

root@rte:~# chmod +x ./flash.sh
root@rte:~# ./flash.sh probe                                                    
set SPI Vcc to 3.3V                                                             
SPI lines ON                                                                    
SPI Vcc ON                                                                      
Probing ...                                                                     
flashrom v1.3.0 on Linux 5.4.69 (armv7l)                                        
flashrom is free software, get the source code at https://flashrom.org          

Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns).               
Found SST flash chip "unknown SST SPI chip" (0 kB, SPI) on linux_spi.           
===                                                                             
This flash part has status NOT WORKING for operations: PROBE READ ERASE WRITE   
This flash part has status UNTESTED for operations: WP                          
The test status of this chip may have been updated in the latest development    
version of flashrom. If you are running the latest development version,         
please email a report to flashrom@flashrom.org if any of the above operations   
work correctly for you with this flash chip. Please include the flashrom log    
file for all operations you tested (see the man page for details), and mention  
which mainboard or programmer you tested in the subject line.                   
Thanks for your help!                                                           
No operations were specified.                                                   
SPI Vcc OFF                                                                     
SPI lines OFF          
Stanislaw-bnk commented 4 months ago

a) Erasing chip seems to work:

root@rte:~# ./flash.sh erase                                                    
set SPI Vcc to 3.3V                                                             
SPI lines ON                                                                    
SPI Vcc ON                                                                      
Erasing chip ...                                                                
flashrom v1.3.0 on Linux 5.4.69 (armv7l)                                        
flashrom is free software, get the source code at https://flashrom.org          

Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns).               
Found SST flash chip "unknown SST SPI chip" (0 kB, SPI) on linux_spi.    

b) write firmware

root@rte:~# ./flash.sh write asus_kgpe-d16_v0.4.0_16M_vboot_notpm.rom           
set SPI Vcc to 3.3V                                                             
SPI lines ON                                                                    
SPI Vcc ON                                                                      
Writing ...                                                                     
flashrom v1.3.0 on Linux 5.4.69 (armv7l)                                        
flashrom is free software, get the source code at https://flashrom.org          

Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns).               
Found SST flash chip "unknown SST SPI chip" (0 kB, SPI) on linux_spi.   

c) read firmware

Command line (5 args): flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=16000 V
Initializing linux_spi programmer                                               
Using device /dev/spidev1.0                                                     
Using 16000kHz clock                                                            
get_max_kernel_buf_size: Using value from /sys/module/spidev/parameters/bufsiz .
linux_spi_init: max_kernel_buf_size: 4096                                       
The following protocols are supported: SPI.   

So i guess this is a PASS.

miczyg1 commented 3 months ago

Whenever there is an unknown chip, or the chip could not be found, this is a fail.

Stanislaw-bnk commented 3 months ago

@macpijan This solution for test 7 works. I will update the process with the provided information.