o Provide a "regular-pi1" hardware mapping that should work with

both, Raspberry Pi1 Revision 1 and 2.
  Fixes #172
This commit is contained in:
Henner Zeller 2016-10-17 19:47:07 -07:00
parent da05f01bdb
commit 24ecf1d839
3 changed files with 38 additions and 1 deletions

View file

@ -331,6 +331,10 @@ sudo update-initramfs -u
Reboot and confirm that the module is not loaded.
### I have a Pi1 Revision1 and top part of Panel doesn't show green
Use `--led-gpio-mapping=regular-pi1`
### Logic level voltage not sufficient
Some panels don't interpret the 3.3V logic level well, or the RPi output drivers
have trouble driving longer cables, in particular with

View file

@ -20,6 +20,7 @@ TARGET=librgbmatrix
# regular # Following this project wiring and using these PCBs
# adafruit-hat # If you have a RGB matrix HAT from Adafruit
# adafruit-hat-pwm # If you have an Adafruit HAT with PWM hardware mod.
# regular-pi1 # If you have an old Pi1 and regular didn't work.
# classic # (deprecated) Classic Pi1/2/. Not used anymore.
# classic-pi1 # (deprecated) Classic pinout on Rasperry Pi 1
HARDWARE_DESC?=regular

View file

@ -42,7 +42,7 @@ struct HardwareMapping matrix_hardware_mappings[] = {
/* Parallel chain 0, RGB for both sub-panels */
.p0_r1 = GPIO_BIT(11), /* masks: SPI0_SCKL */
.p0_g1 = GPIO_BIT(27), /* Not on RPi1, Rev1 */
.p0_g1 = GPIO_BIT(27), /* Not on RPi1, Rev1; use "regular-pi1" instead */
.p0_b1 = GPIO_BIT(7), /* masks: SPI0_CE1 */
.p0_r2 = GPIO_BIT(8), /* masks: SPI0_CE0 */
.p0_g2 = GPIO_BIT(9), /* masks: SPI0_MISO */
@ -114,6 +114,38 @@ struct HardwareMapping matrix_hardware_mappings[] = {
.p0_b2 = GPIO_BIT(23),
},
/*
* The regular pin-out, but for Raspberry Pi1. The very first Pi1 Rev1 uses
* the same pin for GPIO-21 as later Pis use GPIO-27. Make it work for both.
*/
{
.name = "regular-pi1",
.output_enable = GPIO_BIT(18),
.clock = GPIO_BIT(17),
.strobe = GPIO_BIT(4),
/* Address lines */
.a = GPIO_BIT(22),
.b = GPIO_BIT(23),
.c = GPIO_BIT(24),
.d = GPIO_BIT(25),
.e = GPIO_BIT(15), /* RxD kept free unless 1:64 */
/* Parallel chain 0, RGB for both sub-panels */
.p0_r1 = GPIO_BIT(11), /* masks: SPI0_SCKL */
/* On Pi1 Rev1, the pin other Pis have GPIO27, these have GPIO21. So make
* this work for both Rev1 and Rev2.
*/
.p0_g1 = GPIO_BIT(21) | GPIO_BIT(27),
.p0_b1 = GPIO_BIT(7), /* masks: SPI0_CE1 */
.p0_r2 = GPIO_BIT(8), /* masks: SPI0_CE0 */
.p0_g2 = GPIO_BIT(9), /* masks: SPI0_MISO */
.p0_b2 = GPIO_BIT(10), /* masks: SPI0_MOSI */
/* No more chains - there are not enough GPIO */
},
/*
* Classic: Early forms of this library had this as default mapping, mostly
* derived from the 26 GPIO-header version so that it also can work