Pi Zer0 seems not to be using HAT eeprom
Anyone else seeing this? Latest Raspbian, on an APLus, the right thing happens. Put the SD card in a Pi Zer0 and it seems not to get the additional DT data from the HAT eeprom to set up the GPIO. Can manually configure them in e.g. a python program using RPi.GPIO. Tried it with my E-paper HAT and with the sense HAT (which has an eeprom so I'm assuming it's correctly configured) and neither seem to be doing the right thing on the Zer0. Am I missing something?
Neil Matthews
Lost count how many of As, Bs, APluses, BPluses, Pi2s and now a couple of Zer0s.
Get your E-paper HAT at www.percheron-electronics.uk/shop
Lost count how many of As, Bs, APluses, BPluses, Pi2s and now a couple of Zer0s.

Get your E-paper HAT at www.percheron-electronics.uk/shop
-
- Raspberry Pi Engineer & Forum Moderator
- Posts: 3673
- Joined: Mon Sep 29, 2014 1:07 pm
- Location: Cambridge
Re: Pi Zer0 seems not to be using HAT eeprom
No, you're not missing anything - something is definitely wrong with the Pi Zero's HAT support, and it will be investigated as a priority. I imagine a small change to the firmware will fix the problem, but at the moment this is just a guess.
Re: Pi Zer0 seems not to be using HAT eeprom
Hey Phil,
Thanks for confirming I'm not going mad.
Cheers, Neil
Thanks for confirming I'm not going mad.

Cheers, Neil
Neil Matthews
Lost count how many of As, Bs, APluses, BPluses, Pi2s and now a couple of Zer0s.
Get your E-paper HAT at www.percheron-electronics.uk/shop
Lost count how many of As, Bs, APluses, BPluses, Pi2s and now a couple of Zer0s.

Get your E-paper HAT at www.percheron-electronics.uk/shop
Re: Pi Zer0 seems not to be using HAT eeprom
Just poking around in /boot there seem to be dtb files for rpi-b, rpi-b-plus, rpi-cm and rpi-2-b.
Should there be a new one for the Pi Zer0 or does it use the rpi-b-plus version, like the APlus does?
Should there be a new one for the Pi Zer0 or does it use the rpi-b-plus version, like the APlus does?
Neil Matthews
Lost count how many of As, Bs, APluses, BPluses, Pi2s and now a couple of Zer0s.
Get your E-paper HAT at www.percheron-electronics.uk/shop
Lost count how many of As, Bs, APluses, BPluses, Pi2s and now a couple of Zer0s.

Get your E-paper HAT at www.percheron-electronics.uk/shop
-
- Raspberry Pi Engineer & Forum Moderator
- Posts: 3673
- Joined: Mon Sep 29, 2014 1:07 pm
- Location: Cambridge
Re: Pi Zer0 seems not to be using HAT eeprom
The Pi Zero is closest to a B+, so the firmware loads bcm2708-rpi-b-plus.dtb.
Update: I've got a Zero on my desk attached to a HAT and a 'scope, and I can see the I2C lines wiggling plausibly, and yet it isn't seeing the EEPROM...
Update: I've got a Zero on my desk attached to a HAT and a 'scope, and I can see the I2C lines wiggling plausibly, and yet it isn't seeing the EEPROM...
Re: Pi Zer0 seems not to be using HAT eeprom
Don't know if it's significant but dtc -I fs /proc/device-tree gives:
model = "Raspberry Pi ? Rev 1.2";
compatible = "brcm,bcm2708";
memreserve = <0x1c000000 0x4000000>;
#address-cells = <0x1>;
#size-cells = <0x1>;
interrupt-parent = <0x1>;
model = "Raspberry Pi ? Rev 1.2";
compatible = "brcm,bcm2708";
memreserve = <0x1c000000 0x4000000>;
#address-cells = <0x1>;
#size-cells = <0x1>;
interrupt-parent = <0x1>;
Neil Matthews
Lost count how many of As, Bs, APluses, BPluses, Pi2s and now a couple of Zer0s.
Get your E-paper HAT at www.percheron-electronics.uk/shop
Lost count how many of As, Bs, APluses, BPluses, Pi2s and now a couple of Zer0s.

Get your E-paper HAT at www.percheron-electronics.uk/shop
-
- Raspberry Pi Engineer & Forum Moderator
- Posts: 3673
- Joined: Mon Sep 29, 2014 1:07 pm
- Location: Cambridge
Re: Pi Zer0 seems not to be using HAT eeprom
Got it. There's a mistake in the dt-blob.bin - the one that's built into the firmware ELFs.
Try putting this dt-blob.bin in the root of your SD card and rebooting.
Try putting this dt-blob.bin in the root of your SD card and rebooting.
-
- Raspberry Pi Engineer & Forum Moderator
- Posts: 3673
- Joined: Mon Sep 29, 2014 1:07 pm
- Location: Cambridge
Re: Pi Zer0 seems not to be using HAT eeprom
Although the firmware recognises the Pi Zero, it doesn't have identification strings for it. This will change in a future release.model = "Raspberry Pi ? Rev 1.2";
Re: Pi Zer0 seems not to be using HAT eeprom
I put your dt-blob.bin in / and rebooted with a hat attached. Still not seeing it as far as I can see. On the Pi2 dtc -I fs /proc/device-tree gives this:
model = "Raspberry Pi 2 Model B Rev 1.1";
compatible = "brcm,bcm2709";
memreserve = <0x3b000000 0x4000000>;
#address-cells = <0x1>;
#size-cells = <0x1>;
interrupt-parent = <0x1>;
axi {
dma {
broadcom,channels = <0x7f35>;
};
usb {
hub {
ethernet {
mac-address = [b8 27 eb 57 3d 45];
};
};
};
sdhci {
clock-frequency = <0xee6b280>;
};
uart0 {
clock-frequency = <0x2dc6c0>;
};
vc_mem {
reg = <0x3dc00000 0x3f000000 0xc0000000>;
};
};
hat {
product_id = "0x0001";
product_ver = "0x0005";
uuid = "8ead279b-9d9a-4807-b3ed-63573bc56175";
vendor = "Percheron Electronics Limited";
product = "E-paper HAT";
};
soc {
compatible = "simple-bus";
........
On the Pi Zer0 the hat { } section is missing.
model = "Raspberry Pi 2 Model B Rev 1.1";
compatible = "brcm,bcm2709";
memreserve = <0x3b000000 0x4000000>;
#address-cells = <0x1>;
#size-cells = <0x1>;
interrupt-parent = <0x1>;
axi {
dma {
broadcom,channels = <0x7f35>;
};
usb {
hub {
ethernet {
mac-address = [b8 27 eb 57 3d 45];
};
};
};
sdhci {
clock-frequency = <0xee6b280>;
};
uart0 {
clock-frequency = <0x2dc6c0>;
};
vc_mem {
reg = <0x3dc00000 0x3f000000 0xc0000000>;
};
};
hat {
product_id = "0x0001";
product_ver = "0x0005";
uuid = "8ead279b-9d9a-4807-b3ed-63573bc56175";
vendor = "Percheron Electronics Limited";
product = "E-paper HAT";
};
soc {
compatible = "simple-bus";
........
On the Pi Zer0 the hat { } section is missing.
Re: Pi Zer0 seems not to be using HAT eeprom
Tried making it executable, just in case and rebooted. No change, I'm afraid.
Neil Matthews
Lost count how many of As, Bs, APluses, BPluses, Pi2s and now a couple of Zer0s.
Get your E-paper HAT at www.percheron-electronics.uk/shop
Lost count how many of As, Bs, APluses, BPluses, Pi2s and now a couple of Zer0s.

Get your E-paper HAT at www.percheron-electronics.uk/shop
-
- Raspberry Pi Engineer & Forum Moderator
- Posts: 3673
- Joined: Mon Sep 29, 2014 1:07 pm
- Location: Cambridge
Re: Pi Zer0 seems not to be using HAT eeprom
When I said "the root of the SD Card" I meant from the perspective of a host computer, i.e. in the root of the VFAT partition. From the Pi's perspective this is /boot.
If that still doesn't work, please post the output from:
If that still doesn't work, please post the output from:
Code: Select all
sudo vcdbg log msg |& grep -v gpioman | grep -iv hdmi
Re: Pi Zer0 seems not to be using HAT eeprom
Yay! Thanks, Phil. That seems to be working. 

Neil Matthews
Lost count how many of As, Bs, APluses, BPluses, Pi2s and now a couple of Zer0s.
Get your E-paper HAT at www.percheron-electronics.uk/shop
Lost count how many of As, Bs, APluses, BPluses, Pi2s and now a couple of Zer0s.

Get your E-paper HAT at www.percheron-electronics.uk/shop
-
- Raspberry Pi Engineer & Forum Moderator
- Posts: 3673
- Joined: Mon Sep 29, 2014 1:07 pm
- Location: Cambridge
Re: Pi Zer0 seems not to be using HAT eeprom
The latest rpi-update firmware includes the corrected dt-blob, so I suggest you update and delete the external dt-blob.
Re: Pi Zer0 seems not to be using HAT eeprom
Thanks again. 

Neil Matthews
Lost count how many of As, Bs, APluses, BPluses, Pi2s and now a couple of Zer0s.
Get your E-paper HAT at www.percheron-electronics.uk/shop
Lost count how many of As, Bs, APluses, BPluses, Pi2s and now a couple of Zer0s.

Get your E-paper HAT at www.percheron-electronics.uk/shop