Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 12 additions & 10 deletions lib/rpio.js
Original file line number Diff line number Diff line change
Expand Up @@ -589,27 +589,29 @@ function detect_pinmap()
return true;
}

/*
* Banana Pi M2 Zero (H2+)
* Banana Pi M2P Zero (H2+) (40 pin)
*/
if ((m = model.match(/^sun8iw7p1/)) ||
(m = model.match(/Banana Pi BPI-M2-Zero/))) {
soctype = rpio.prototype.SOC_SUNXI;
pinmap = 'PINMAP_BPI_M2Z';
return true;
}
/*
* Orange Pi Zero (H2+)
*
* XXX: According to linux-sunxi.org sun8iw7p may match 40-pin models?
* Zw1d: And it does. That's why BPI-M2-Zero definition was moved above
* and sun8iw7p1 was added.
*/
if ((m = model.match(/^sun8iw7p/)) ||
(m = model.match(/Orange Pi Zero/))) {
soctype = rpio.prototype.SOC_SUNXI;
pinmap = 'PINMAP_OPI_26';
return true;
}

/*
* Banana Pi M2 Zero (H2+)
*/
if (m = model.match(/Banana Pi BPI-M2-Zero/)) {
soctype = rpio.prototype.SOC_SUNXI;
pinmap = 'PINMAP_BPI_M2Z';
return true;
}

/*
* Banana Pi M2 Ultra (R40, V40)
*/
Expand Down