/*
* Copyright (C) 2010 Google, Inc.
- * Copyright (c) 2010-2013, NVIDIA CORPORATION. All rights reserved.
+ * Copyright (c) 2010-2014, NVIDIA CORPORATION. All rights reserved.
*
* This software is licensed under the terms of the GNU General Public
* License version 2, as published by the Free Software Foundation, and
TEGRA_USB_VIRTUAL_ID = 3,
};
+/**
+ *
+ * Set the maximum voltage that can be supplied
+ * over USB vbus that the board supports if we use
+ * a quick charge 2 wall charger.
+ * a low value means longer charge time
+ * a too high value will blow up the board.
+ * if not sure what board supports use 5V.
+ * Allowed values:
+ * TEGRA_USB_QC2_5V
+ * TEGRA_USB_QC2_9V
+ * TEGRA_USB_QC2_12V
+ * TEGRA_USB_QC2_20V (probably not safe)
+ *
+ * specify the maximum current that the internal charger
+ * can draw from an external wall charger
+ */
+enum tegra_usb_qc2_voltage {
+ TEGRA_USB_QC2_5V = 0,
+ TEGRA_USB_QC2_9V = 1,
+ TEGRA_USB_QC2_12V = 2,
+ TEGRA_USB_QC2_20V = 3,
+};
+
+
/**
* configuration structure for setting up utmi phy
*/
int vbus_pmu_irq;
int vbus_gpio;
int dcp_current_limit_ma;
+ int qc2_current_limit_ma;
bool charging_supported;
bool remote_wakeup_supported;
bool is_xhci;
enum tegra_usb_id_detection id_det_type;
enum tegra_usb_phy_interface phy_intf;
enum tegra_usb_operation_mode op_mode;
+ enum tegra_usb_qc2_voltage qc2_voltage;
union {
struct tegra_usb_dev_mode_data dev;
/*
* Copyright (c) 2010 Google, Inc.
- * Copyright (c) 2011-2013, NVIDIA CORPORATION. All rights reserved.
+ * Copyright (c) 2011-2014, NVIDIA CORPORATION. All rights reserved.
*
* This software is licensed under the terms of the GNU General Public
* License version 2, as published by the Free Software Foundation, and
*/
bool tegra_usb_phy_charger_detected(struct tegra_usb_phy *phy);
+/**
+ * Indicates whether qc2 charger is connected or not
+ * if QuickCharge 2 DCP returns true
+ * if standard CDP/DCP returns false
+ */
+bool tegra_usb_phy_qc2_charger_detected(struct tegra_usb_phy *phy,
+ int max_voltage);
+
/**
* Indicates whether nvidia proprietary charger is connected or not
* if nvidia proprietary charger is detected then returns true else false