Commit a82da1f1416f287d4dbdfcbe2e245be73b5d2568

Authored by Eric Lee
1 parent 2887c5a3e3
Exists in v3.2_SBC_SMARTMEN

Set i2c1 (pin 37 and pin 38 of P1 connector as GPIOs

Showing 1 changed file with 11 additions and 1 deletions Side-by-side Diff

arch/arm/mach-omap2/board-am335xevm.c
... ... @@ -1254,6 +1254,10 @@
1254 1254 #define SMARC_GPIO9 GPIO_TO_PIN(2, 1)
1255 1255 #define SMARC_GPIO10 GPIO_TO_PIN(3, 7)
1256 1256 #define SMARC_GPIO11 GPIO_TO_PIN(3, 8)
  1257 +/* pin 37 of P1 in SBC-SMART-MEN */
  1258 +#define SMARC_GPIO12 GPIO_TO_PIN(0, 15)
  1259 +/* pin 38 of P1 in SBC-SMART-MEN */
  1260 +#define SMARC_GPIO13 GPIO_TO_PIN(0, 14)
1257 1261 /*
1258 1262 * setup SMARC GPIO
1259 1263 * GPIO0-GPIO5 is recommended for use as output and GPIO6-GPIO11 as inputs by
... ... @@ -1299,6 +1303,11 @@
1299 1303 /* GPIO11*/
1300 1304 gpio_request(SMARC_GPIO11, "GPIO11");
1301 1305 gpio_direction_input(SMARC_GPIO11);
  1306 +/* SBC-SMART-MEN configure i2c1 as GPIOs, default set as Output High*/
  1307 + gpio_request(SMARC_GPIO12, "GPIO12");
  1308 + gpio_direction_output(SMARC_GPIO12, 1);
  1309 + gpio_request(SMARC_GPIO13, "GPIO13");
  1310 + gpio_direction_output(SMARC_GPIO13, 1);
1302 1311 return;
1303 1312 }
1304 1313  
... ... @@ -2417,7 +2426,8 @@
2417 2426 {uart2_init, DEV_ON_BASEBOARD, PROFILE_NONE},
2418 2427 {uart0_init, DEV_ON_BASEBOARD, PROFILE_NONE},
2419 2428 {d_can_init, DEV_ON_BASEBOARD, PROFILE_NONE},
2420   - {i2c1_init, DEV_ON_BASEBOARD, PROFILE_NONE},
  2429 +/* SBC-SMART-MEN configure i2c1 as GPIOs */
  2430 +/* {i2c1_init, DEV_ON_BASEBOARD, PROFILE_NONE}, */
2421 2431 {i2c2_init, DEV_ON_BASEBOARD, PROFILE_NONE},
2422 2432 {spi0_init, DEV_ON_BASEBOARD, PROFILE_NONE},
2423 2433 {spi1_init, DEV_ON_BASEBOARD, PROFILE_NONE},