FYI
lcdproc driver for Raspberry Pi hd44780 needs an update to support the new Raspberry Pi 2.
Couple of things
/proc/cpuinfo shows a different string
now
Hardware : BCM2709
Revision : a01041
i.e. h/w has changed from BCM2708 to BCM2709
That is an easy enough change to make
perhaps change in server/drivers/hd44780-rpi.c
if (strcmp(hw, "BCM2708") != 0) || rev == 0) {
to
if (((strcmp(hw, "BCM2708") != 0) && (strcmp(hw, "BCM2709") != 0)) || rev == 0) {
However, looks like the GPIO base address has changed as well.
These are #define in server/drivers/hd44780-rpi.c
currently sets
#define BCM2835_PERI_BASE 0x20000000
and then other defines generated as that plus something.
So they need to become variables and then set at run time depending on the device
I /think/ the base becomes 0x3F000000
I just made a quick hack by changing the base definition along with the 1st change above and I now have screen output - but cannot use that because then it would not work for older devices.
Last edit: Paul Webster 2015-02-03
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Since the announcement of the RPi2 I was curious if changes will be necessary. Thank you for updating.
I have some additional questions: The RPi B+ and RPi2 have more pins than previous models. Can the B+ model be detected by the hardware revision? What is the revision on the RPi2?
I may want to add the additional pins into the gpio_pins mapping table.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Another idea ... /proc/iomem (on Raspbian at least) contains lots of things - including
20200000-20200fff : bcm2708_gpio
My RPi2 is not connected at the moment - but I saw that it had the same setting but with the updated value.
So - could check for that - and if present store it in the new variable I added (converting from the hex value of course) ... and if not found then drop into the new code I put in .
Am pretty sure it was bcm2708 on RPi2 as well - despite bcm2709 being reported via /proc/cpuinfo "Hardware"
That should make it more future proof and also not rely on something that might not be in older versions of Raspbian or other Linux on RPi.
Last edit: Paul Webster 2015-02-08
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Interesting ... on a B+ with Device Tree enabled ... there is a different value available
cat /proc/iomem | grep soc
20200000-202000b3 : /soc/gpio
but no
bcm2708_gpio
I have an old B, a B+ and a 2B sitting here ... so am going to experiment.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
FYI
lcdproc driver for Raspberry Pi hd44780 needs an update to support the new Raspberry Pi 2.
Couple of things
/proc/cpuinfo shows a different string
now
Hardware : BCM2709
Revision : a01041
i.e. h/w has changed from BCM2708 to BCM2709
That is an easy enough change to make
perhaps change in server/drivers/hd44780-rpi.c
if (strcmp(hw, "BCM2708") != 0) || rev == 0) {
to
if (((strcmp(hw, "BCM2708") != 0) && (strcmp(hw, "BCM2709") != 0)) || rev == 0) {
However, looks like the GPIO base address has changed as well.
These are #define in server/drivers/hd44780-rpi.c
currently sets
#define BCM2835_PERI_BASE 0x20000000
and then other defines generated as that plus something.
So they need to become variables and then set at run time depending on the device
I /think/ the base becomes 0x3F000000
I just made a quick hack by changing the base definition along with the 1st change above and I now have screen output - but cannot use that because then it would not work for older devices.
Last edit: Paul Webster 2015-02-03
I have now submitted patch #21 for this.
First time submitting a patch to sourceforge so do let me know if I have done it correctly.
Since the announcement of the RPi2 I was curious if changes will be necessary. Thank you for updating.
I have some additional questions: The RPi B+ and RPi2 have more pins than previous models. Can the B+ model be detected by the hardware revision? What is the revision on the RPi2?
I may want to add the additional pins into the gpio_pins mapping table.
Yes- see the list of revisions here
http://elinux.org/RPi_HardwareHistory
Another idea ... /proc/iomem (on Raspbian at least) contains lots of things - including
20200000-20200fff : bcm2708_gpio
My RPi2 is not connected at the moment - but I saw that it had the same setting but with the updated value.
So - could check for that - and if present store it in the new variable I added (converting from the hex value of course) ... and if not found then drop into the new code I put in .
Am pretty sure it was bcm2708 on RPi2 as well - despite bcm2709 being reported via /proc/cpuinfo "Hardware"
That should make it more future proof and also not rely on something that might not be in older versions of Raspbian or other Linux on RPi.
Last edit: Paul Webster 2015-02-08
Interesting ... on a B+ with Device Tree enabled ... there is a different value available
cat /proc/iomem | grep soc
20200000-202000b3 : /soc/gpio
but no
bcm2708_gpio
I have an old B, a B+ and a 2B sitting here ... so am going to experiment.
Would you mind posting the 'Hardware' and 'Revision' lines from /proc/cpuinfo of your B, B+ and 2B models? And what OS are you using? Rasbian?
I have a new patch that gets the start address from /proc/iomem ... will upload it in a few minutes