BigNeilM
Posts: 25
Joined: Sun Jul 15, 2012 12:45 pm
Location: Cambridge

Pi Zer0 seems not to be using HAT eeprom

Sat Nov 28, 2015 7:26 pm

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

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 3695
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: Pi Zer0 seems not to be using HAT eeprom

Sat Nov 28, 2015 7:55 pm

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.

BigNeilM
Posts: 25
Joined: Sun Jul 15, 2012 12:45 pm
Location: Cambridge

Re: Pi Zer0 seems not to be using HAT eeprom

Sat Nov 28, 2015 10:56 pm

Hey Phil,

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

BigNeilM
Posts: 25
Joined: Sun Jul 15, 2012 12:45 pm
Location: Cambridge

Re: Pi Zer0 seems not to be using HAT eeprom

Mon Nov 30, 2015 11:14 am

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?
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

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 3695
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: Pi Zer0 seems not to be using HAT eeprom

Mon Nov 30, 2015 11:23 am

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...

BigNeilM
Posts: 25
Joined: Sun Jul 15, 2012 12:45 pm
Location: Cambridge

Re: Pi Zer0 seems not to be using HAT eeprom

Mon Nov 30, 2015 12:19 pm

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>;
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

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 3695
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: Pi Zer0 seems not to be using HAT eeprom

Mon Nov 30, 2015 12:30 pm

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.

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 3695
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: Pi Zer0 seems not to be using HAT eeprom

Mon Nov 30, 2015 12:33 pm

model = "Raspberry Pi ? Rev 1.2";
Although the firmware recognises the Pi Zero, it doesn't have identification strings for it. This will change in a future release.

BigNeilM
Posts: 25
Joined: Sun Jul 15, 2012 12:45 pm
Location: Cambridge

Re: Pi Zer0 seems not to be using HAT eeprom

Mon Nov 30, 2015 12:53 pm

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.

BigNeilM
Posts: 25
Joined: Sun Jul 15, 2012 12:45 pm
Location: Cambridge

Re: Pi Zer0 seems not to be using HAT eeprom

Mon Nov 30, 2015 1:00 pm

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

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 3695
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: Pi Zer0 seems not to be using HAT eeprom

Mon Nov 30, 2015 1:18 pm

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:

Code: Select all

sudo vcdbg log msg |& grep -v gpioman | grep -iv hdmi

BigNeilM
Posts: 25
Joined: Sun Jul 15, 2012 12:45 pm
Location: Cambridge

Re: Pi Zer0 seems not to be using HAT eeprom

Mon Nov 30, 2015 1:46 pm

Yay! Thanks, Phil. That seems to be working. :D
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

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 3695
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: Pi Zer0 seems not to be using HAT eeprom

Tue Dec 01, 2015 11:57 am

The latest rpi-update firmware includes the corrected dt-blob, so I suggest you update and delete the external dt-blob.

BigNeilM
Posts: 25
Joined: Sun Jul 15, 2012 12:45 pm
Location: Cambridge

Re: Pi Zer0 seems not to be using HAT eeprom

Thu Dec 03, 2015 1:30 pm

Thanks again. :D
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

Return to “Device Tree”