Profile

Cover photo
Marek Vašut
Works at DENX Software Engineering GmbH.
Attends Charles University in Prague
Lives in Prague
270 followers|421,970 views
AboutPosts

Stream

Marek Vašut

Shared publicly  - 
3
Arnd Bergmann's profile photoRob Herring's profile photo
2 comments
 
+Arnd Bergmann One step closer to DT world domination.
Add a comment...

Marek Vašut

Shared publicly  - 
5
Måns Rullgård's profile photoMarek Vašut's profile photo
3 comments
 
Paging +Marcin Juszkiewicz​
Add a comment...

Marek Vašut

Shared publicly  - 
 
High-speed internet connection in CZ, +Marcin Juszkiewicz​
4
Måns Rullgård's profile photoAttila Kinali's profile photoMarek Vašut's profile photoJoel Fernandes's profile photo
4 comments
 
96ms? That's a life time!
Add a comment...

Marek Vašut

Shared publicly  - 
 
Nom!!!
 ·  Translate
4
Matt Sealey's profile photoMarek Vašut's profile photoRobert Berger's profile photoNikolai Kondrashov (spbnick)'s profile photo
6 comments
 
Natto! Bleh :)
Add a comment...

Marek Vašut

Shared publicly  - 
4
Attila Kinali's profile photoMarek Vašut's profile photo
2 comments
 
Back to the future !
Add a comment...

Marek Vašut

Shared publicly  - 
 
So I bought an Arduino, to join the cool kids etc. That's the board on the left ...

The story goes something like this ... first, I discovered the U-Boot is ancient garbage of the 1.1.x vintage with billion hacks. OK, this is something I kinda expected and this clearly needs to be fixed.

Arduino is apparently open hardware or something, so I started looking for schematics to find JTAG. Well, turns out the schematics of the MIPS part are not really available, but there are schematics of some compatible bit. Turns out, JTAG is not routed from the CPU and I really don't feel like hotairing this horrid package. So it boils down to plan B.

Plan B is to solder patchwires onto the SPI NOR, disconnect CS from the CPU, route the SPI NOR signals through an FPGA and ultimately write SPI NOR emulator for the FPGA This is extra convenient, since I can just push new testing U-Boot builds into this emulator via ethernet. But since I didn't feel like breaking some cute FPGA, I dug out MCVEVK prototype. The upside of this MCV prototype is also that it has Cyclone V C6, which has some 5 Mib of block RAM in the FPGA. That's enough to store 256kiB big U-Boot image and some, convenient.

MCVEVK prototype behaved exactly like a prototype should, it was broken. So first thing I had to do was to fix it. I ported U-Boot to it, added SoCFPGA NAND support (it's posted to U-Boot ML now), since the prototype used NAND instead of eMMC. And so on, usual U-Boot porting chores to get the ARM part running, so I can use it to load the emulated SPI NOR content from ethernet via the HPS2FPGA bridge to the FPGA block RAM.

Writing the emulator was kinda trivial, by applying signaltap to the SPI NOR signals and observing how the original firmware behaves, I figured that the SPI NOR controller only ever sends on opcode and reads 256 Bytes block afterward. Moreover, it seems like at some point, the SPI NOR starts running at higher clock speed, which the FPGA does no longer appreciate, but this can be fixed by keeping the AHB clock low.

Turns out, implementing emulation of that one SPI NOR instruction is enough to get me all the way to board_init_f() in U-Boot running from the FPGA-emulated SPI NOR.
14
1
Nikolai Kondrashov (spbnick)'s profile photoMarek Vašut's profile photoMatt Sealey's profile photoNanik T's profile photo
5 comments
 
Sure, if you have one just hanging around on your desk :) but what about the rest of us? :)
Add a comment...
Have him in circles
270 people
Rogerio Pimentel's profile photo
Sevenx Wasly's profile photo
Tom Warren's profile photo
Irena Vašutová's profile photo
Matt Ranostaj's profile photo
Мага Магаев's profile photo
Josef Petřík's profile photo
Martin Děcký's profile photo
Stepan Balcar's profile photo

Marek Vašut

Shared publicly  - 
 
 
[Bunnie Huang] is now officially the person who wrote the book on electronics manufacturing in Shenzhen, China. His Crowd Supply campaign for The Essential Guide to Electronics in Shenzhen has blown way past the initial goal. [Bunnie] is the first person…
View original post
1
Add a comment...

Marek Vašut

Shared publicly  - 
7
Add a comment...

Marek Vašut

Shared publicly  - 
 
The conference always starts with #opticalexperiments , thus time with +Marcin Juszkiewicz​ .
10
Drew Fustini (pdp7)'s profile photoMarek Vašut's profile photo
2 comments
Add a comment...

Marek Vašut

Shared publicly  - 
7
Måns Rullgård's profile photoJiri Kastner's profile photoAttila Kinali's profile photo
3 comments
 
+Måns Rullgård​ that should read #JIHAD!
Add a comment...

Marek Vašut

Shared publicly  - 
 
Arduino is becoming usable ...

U-Boot 2016.01-00303-g8d08e8d (Jan 28 2016 - 00:33:41 +0100)

Atheros AR9330 rev 1
Model: Arduino Yun Board
DRAM:  64 MiB
Using default environment

In:    serial
Out:   serial
Err:   serial
Net:   eth0: eth@0x19000000, eth1: eth@0x1a000000
Hit any key to stop autoboot:  0 
=> 
=> 
=> usb reset
resetting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... Device NOT ready
   Request Sense returned 02 3A 00
3 USB Device(s) found
=> 
=> 
=> usb info
1: Hub,  USB Revision 2.0
 - u-boot EHCI Host Controller 
 - Class: Hub
 - PacketSize: 64  Configurations: 1
 - Vendor: 0x0000  Product 0x0000 Version 1.0
   Configuration: 1
   - Interfaces: 1 Self Powered 0mA
     Interface: 0
     - Alternate Setting 0, Endpoints: 1
     - Class Hub
     - Endpoint 1 In Interrupt MaxPacket 2048 Interval 255ms

2: Hub,  USB Revision 2.0
 -  USB2.0Hub 
 - Class: Hub
 - PacketSize: 64  Configurations: 1
 - Vendor: 0x058f  Product 0x6254 Version 1.0
   Configuration: 1
   - Interfaces: 1 Self Powered Remote Wakeup 100mA
     Interface: 0
     - Alternate Setting 0, Endpoints: 1
     - Class Hub
     - Endpoint 1 In Interrupt MaxPacket 1 Interval 12ms

3: Mass Storage,  USB Revision 2.0
 - Generic Mass Storage Device 058F0O1111B1
 - Class: (from Interface) Mass Storage
 - PacketSize: 64  Configurations: 1
 - Vendor: 0x058f  Product 0x6366 Version 1.0
   Configuration: 1
   - Interfaces: 1 Bus Powered 100mA
     Interface: 0
     - Alternate Setting 0, Endpoints: 2
     - Class Mass Storage, Transp. SCSI, Bulk only
     - Endpoint 1 Out Bulk MaxPacket 512
     - Endpoint 2 In Bulk MaxPacket 512

=>
=> 
=> ping 192.168.1.1
Using eth@0x19000000 device
host 192.168.1.1 is alive
=> 
=> 
=> 
=> ver

U-Boot 2016.01-00303-g8d08e8d (Jan 28 2016 - 00:33:41 +0100)
mips-linux-gcc (GCC) 4.8.2
GNU ld (GNU Binutils) 2.24
5
Stephen Warren's profile photoMarek Vašut's profile photo
2 comments
 
Please stop putting weird ideas into my head :-)
Add a comment...

Marek Vašut

Shared publicly  - 
 
 
This is the funniest thing you'll see today :)

#GeekHumor
6 comments on original post
10
1
Joel Fernandes's profile photo
Add a comment...
People
Have him in circles
270 people
Rogerio Pimentel's profile photo
Sevenx Wasly's profile photo
Tom Warren's profile photo
Irena Vašutová's profile photo
Matt Ranostaj's profile photo
Мага Магаев's profile photo
Josef Petřík's profile photo
Martin Děcký's profile photo
Stepan Balcar's profile photo
Places
Map of the places this user has livedMap of the places this user has livedMap of the places this user has lived
Currently
Prague
Links
Work
Employment
  • DENX Software Engineering GmbH.
    Contractor, 2011 - present
Education
  • Charles University in Prague
    present
Basic Information
Gender
Male