How to get the list of all entity reference fields and their params?
Here is my custom function that gets id's of all files referenced entities and their parents. Also get's all field names, entity types and bundles of entityreference fields.

function _my_module_get_entityreferences_settings() {
  $child_ids = $field_names = $settings = array();

  // Get all entityreference field names
  $query = db_select('field_config', 'f');
  $query-&gt;fields('f', array('field_name'));
  $query-&gt;condition('f.type', 'entityreference');
  $query-&gt;distinct();
  $rows = $query-&gt;execute();

  foreach ($rows as $row) {
    $field_name = $row-&gt;field_name;
    $field_names[] = $field_name;
  }

  // Loop all entityreference fields. Get all child and parent Ids
  foreach ($field_names as $field_name) {
    $table = 'field_data_' . $field_name;
    $target_id = $field_name . '_target_id';

    $query = db_select($table, 'f');
    $query-&gt;fields('f', array('entity_id', $target_id, 'entity_type', 'bundle'));
    $query-&gt;distinct();
    $rows = $query-&gt;execute();

    foreach ($rows as $row) {
      $settings[$row-&gt;entity_type][$row-&gt;bundle][$field_name] = $field_name;
      $child_ids[$row-&gt;{$target_id}] = array(
        'id' =&gt; $row-&gt;{$target_id},
        'parent' =&gt; $row-&gt;entity_id,
      );
    }
  }

  return array(
    'childs' =&gt; $child_ids,
    'settings' =&gt; $settings,
  );
}


Maybe you don't need all this stuff. When you get $field_names array you can use

$field = field_info_field($field_name);


to get settings of current field. You can find here referenced bundles, field type, handler_settings etc.