intel_minnow_byt_compatible: include Turbot additions
The pinout for the Low Speed Expansion on the MinnowBoard Turbot is the same as the MinnowBoard MAX A2 desgin, with the exception of pin 26. Pin 26 was changed to provide an MCLK reference clock for I2S. In addition, the D2 LED is now under GPIO control. Add support for these changes. Signed-off-by: Constantin Musca <constantin.musca@intel.com> Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit is contained in:
committed by
Brendan Le Foll
parent
2e5e3eaea2
commit
ba5318fee9
@@ -32,6 +32,7 @@ extern "C" {
|
||||
|
||||
// +1 as pins are "1 indexed"
|
||||
#define MRAA_INTEL_MINNOW_MAX_PINCOUNT (26 + 1)
|
||||
#define MRAA_INTEL_MINNOW_TURBOT_PINCOUNT (27 + 1)
|
||||
|
||||
mraa_board_t*
|
||||
mraa_intel_minnowboard_byt_compatible(mraa_boolean_t);
|
||||
|
||||
@@ -89,7 +89,7 @@ mraa_intel_minnowboard_byt_compatible(mraa_boolean_t turbot)
|
||||
mraa_board_t* b = (mraa_board_t*) calloc(1, sizeof(mraa_board_t));
|
||||
|
||||
struct utsname running_uname;
|
||||
int uname_major, uname_minor, max_pins[27];
|
||||
int uname_major, uname_minor, max_pins[28];
|
||||
|
||||
if (b == NULL) {
|
||||
return NULL;
|
||||
@@ -98,13 +98,13 @@ mraa_intel_minnowboard_byt_compatible(mraa_boolean_t turbot)
|
||||
b->platform_name = PLATFORM_NAME;
|
||||
if (turbot) {
|
||||
b->platform_version = "Turbot";
|
||||
b->gpio_count = b->phy_pin_count = MRAA_INTEL_MINNOW_TURBOT_PINCOUNT;
|
||||
} else {
|
||||
b->platform_version = "Ax";
|
||||
b->gpio_count = b->phy_pin_count = MRAA_INTEL_MINNOW_MAX_PINCOUNT;
|
||||
}
|
||||
b->phy_pin_count = MRAA_INTEL_MINNOW_MAX_PINCOUNT;
|
||||
b->gpio_count = MRAA_INTEL_MINNOW_MAX_PINCOUNT;
|
||||
|
||||
b->pins = (mraa_pininfo_t*) calloc(MRAA_INTEL_MINNOW_MAX_PINCOUNT, sizeof(mraa_pininfo_t));
|
||||
b->pins = (mraa_pininfo_t*) calloc(b->phy_pin_count, sizeof(mraa_pininfo_t));
|
||||
if (b->pins == NULL) {
|
||||
goto error;
|
||||
}
|
||||
@@ -160,7 +160,12 @@ mraa_intel_minnowboard_byt_compatible(mraa_boolean_t turbot)
|
||||
mraa_set_pininfo(b, 24, "PWM1", (mraa_pincapabilities_t){ 1, 0, 1, 0, 0, 0, 0, 0 },
|
||||
249); // Assume BIOS configured for PWM
|
||||
mraa_set_pininfo(b, 25, "S5_4", (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 }, 84);
|
||||
mraa_set_pininfo(b, 26, "IBL8254", (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 }, 208);
|
||||
if (turbot) {
|
||||
mraa_set_pininfo(b, 26, "I2S_MCLK", (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 }, 253);
|
||||
mraa_set_pininfo(b, 27, "S5_22", (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 }, 104);
|
||||
} else {
|
||||
mraa_set_pininfo(b, 26, "IBL8254", (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 }, 208);
|
||||
}
|
||||
|
||||
// Set number of i2c adaptors usable from userspace
|
||||
b->i2c_bus_count = 1;
|
||||
|
||||
Reference in New Issue
Block a user