Commit 1f140ff4 authored by Sebastian Reichel's avatar Sebastian Reichel
Browse files

Merge tag 'tags/tcpm-pps-4.18' into psy-next



Tag/Merge point for adding typeC power supply support

This is a signed tag/merge point to handle the cross-tree merge of the
USB and power supply subsystems for the patch series:
	Subject: [PATCH v8 0/6] typec: tcpm: Add sink side support for PPS

It is based on the usb.git tree, in the usb-next branch, for merging in
4.18-rc1.

Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.co.uk>
parents a78c0c30 0c718676
Loading
Loading
Loading
Loading
+18 −0
Original line number Diff line number Diff line
@@ -236,3 +236,21 @@ Description:
		Supported values are 0 - 15.
		More information on how besl values map to microseconds can be found in
		USB 2.0 ECN Errata for Link Power Management, section 4.10)

What:		/sys/bus/usb/devices/.../rx_lanes
Date:		March 2018
Contact:	Mathias Nyman <mathias.nyman@linux.intel.com>
Description:
		Number of rx lanes the device is using.
		USB 3.2 adds Dual-lane support, 2 rx and 2 tx lanes over Type-C.
		Inter-Chip SSIC devices support asymmetric lanes up to 4 lanes per
		direction. Devices before USB 3.2 are single lane (rx_lanes = 1)

What:		/sys/bus/usb/devices/.../tx_lanes
Date:		March 2018
Contact:	Mathias Nyman <mathias.nyman@linux.intel.com>
Description:
		Number of tx lanes the device is using.
		USB 3.2 adds Dual-lane support, 2 rx and 2 tx -lanes over Type-C.
		Inter-Chip SSIC devices support asymmetric lanes up to 4 lanes per
		direction. Devices before USB 3.2 are single lane (tx_lanes = 1)
+455 −0
Original line number Diff line number Diff line
===== General Properties =====

What:		/sys/class/power_supply/<supply_name>/manufacturer
Date:		May 2007
Contact:	linux-pm@vger.kernel.org
Description:
		Reports the name of the device manufacturer.

		Access: Read
		Valid values: Represented as string

What:		/sys/class/power_supply/<supply_name>/model_name
Date:		May 2007
Contact:	linux-pm@vger.kernel.org
Description:
		Reports the name of the device model.

		Access: Read
		Valid values: Represented as string

What:		/sys/class/power_supply/<supply_name>/serial_number
Date:		January 2008
Contact:	linux-pm@vger.kernel.org
Description:
		Reports the serial number of the device.

		Access: Read
		Valid values: Represented as string

What:		/sys/class/power_supply/<supply_name>/type
Date:		May 2010
Contact:	linux-pm@vger.kernel.org
Description:
		Describes the main type of the supply.

		Access: Read
		Valid values: "Battery", "UPS", "Mains", "USB"

===== Battery Properties =====

What:		/sys/class/power_supply/<supply_name>/capacity
Date:		May 2007
Contact:	linux-pm@vger.kernel.org
Description:
		Fine grain representation of battery capacity.
		Access: Read
		Valid values: 0 - 100 (percent)

What:		/sys/class/power_supply/<supply_name>/capacity_alert_max
Date:		July 2012
Contact:	linux-pm@vger.kernel.org
Description:
		Maximum battery capacity trip-wire value where the supply will
		notify user-space of the event. This is normally used for the
		battery discharging scenario where user-space needs to know the
		battery has dropped to an upper level so it can take
		appropriate action (e.g. warning user that battery level is
		low).

		Access: Read, Write
		Valid values: 0 - 100 (percent)

What:		/sys/class/power_supply/<supply_name>/capacity_alert_min
Date:		July 2012
Contact:	linux-pm@vger.kernel.org
Description:
		Minimum battery capacity trip-wire value where the supply will
		notify user-space of the event. This is normally used for the
		battery discharging scenario where user-space needs to know the
		battery has dropped to a lower level so it can take
		appropriate action (e.g. warning user that battery level is
		critically low).

		Access: Read, Write
		Valid values: 0 - 100 (percent)

What:		/sys/class/power_supply/<supply_name>/capacity_level
Date:		June 2009
Contact:	linux-pm@vger.kernel.org
Description:
		Coarse representation of battery capacity.

		Access: Read
		Valid values: "Unknown", "Critical", "Low", "Normal", "High",
			      "Full"

What:		/sys/class/power_supply/<supply_name>/current_avg
Date:		May 2007
Contact:	linux-pm@vger.kernel.org
Description:
		Reports an average IBAT current reading for the battery, over a
		fixed period. Normally devices will provide a fixed interval in
		which they average readings to smooth out the reported value.

		Access: Read
		Valid values: Represented in microamps

What:		/sys/class/power_supply/<supply_name>/current_max
Date:		October 2010
Contact:	linux-pm@vger.kernel.org
Description:
		Reports the maximum IBAT current allowed into the battery.

		Access: Read
		Valid values: Represented in microamps

What:		/sys/class/power_supply/<supply_name>/current_now
Date:		May 2007
Contact:	linux-pm@vger.kernel.org
Description:
		Reports an instant, single IBAT current reading for the battery.
		This value is not averaged/smoothed.

		Access: Read
		Valid values: Represented in microamps

What:		/sys/class/power_supply/<supply_name>/charge_type
Date:		July 2009
Contact:	linux-pm@vger.kernel.org
Description:
		Represents the type of charging currently being applied to the
		battery.

		Access: Read
		Valid values: "Unknown", "N/A", "Trickle", "Fast"

What:		/sys/class/power_supply/<supply_name>/charge_term_current
Date:		July 2014
Contact:	linux-pm@vger.kernel.org
Description:
		Reports the charging current value which is used to determine
		when the battery is considered full and charging should end.

		Access: Read
		Valid values: Represented in microamps

What:		/sys/class/power_supply/<supply_name>/health
Date:		May 2007
Contact:	linux-pm@vger.kernel.org
Description:
		Reports the health of the battery or battery side of charger
		functionality.

		Access: Read
		Valid values: "Unknown", "Good", "Overheat", "Dead",
			      "Over voltage", "Unspecified failure", "Cold",
			      "Watchdog timer expire", "Safety timer expire"

What:		/sys/class/power_supply/<supply_name>/precharge_current
Date:		June 2017
Contact:	linux-pm@vger.kernel.org
Description:
		Reports the charging current applied during pre-charging phase
		for a battery charge cycle.

		Access: Read
		Valid values: Represented in microamps

What:		/sys/class/power_supply/<supply_name>/present
Date:		May 2007
Contact:	linux-pm@vger.kernel.org
Description:
		Reports whether a battery is present or not in the system.

		Access: Read
		Valid values:
			0: Absent
			1: Present

What:		/sys/class/power_supply/<supply_name>/status
Date:		May 2007
Contact:	linux-pm@vger.kernel.org
Description:
		Represents the charging status of the battery. Normally this
		is read-only reporting although for some supplies this can be
		used to enable/disable charging to the battery.

		Access: Read, Write
		Valid values: "Unknown", "Charging", "Discharging",
			      "Not charging", "Full"

What:		/sys/class/power_supply/<supply_name>/technology
Date:		May 2007
Contact:	linux-pm@vger.kernel.org
Description:
		Describes the battery technology supported by the supply.

		Access: Read
		Valid values: "Unknown", "NiMH", "Li-ion", "Li-poly", "LiFe",
			      "NiCd", "LiMn"

What:		/sys/class/power_supply/<supply_name>/temp
Date:		May 2007
Contact:	linux-pm@vger.kernel.org
Description:
		Reports the current TBAT battery temperature reading.

		Access: Read
		Valid values: Represented in 1/10 Degrees Celsius

What:		/sys/class/power_supply/<supply_name>/temp_alert_max
Date:		July 2012
Contact:	linux-pm@vger.kernel.org
Description:
		Maximum TBAT temperature trip-wire value where the supply will
		notify user-space of the event. This is normally used for the
		battery charging scenario where user-space needs to know the
		battery temperature has crossed an upper threshold so it can
		take appropriate action (e.g. warning user that battery level is
		critically high, and charging has stopped).

		Access: Read
		Valid values: Represented in 1/10 Degrees Celsius

What:		/sys/class/power_supply/<supply_name>/temp_alert_min
Date:		July 2012
Contact:	linux-pm@vger.kernel.org
Description:
		Minimum TBAT temperature trip-wire value where the supply will
		notify user-space of the event. This is normally used for the
		battery charging scenario where user-space needs to know the
		battery temperature has crossed a lower threshold so it can take
		appropriate action (e.g. warning user that battery level is
		high, and charging current has been reduced accordingly to
		remedy the situation).

		Access: Read
		Valid values: Represented in 1/10 Degrees Celsius

What:		/sys/class/power_supply/<supply_name>/temp_max
Date:		July 2014
Contact:	linux-pm@vger.kernel.org
Description:
		Reports the maximum allowed TBAT battery temperature for
		charging.

		Access: Read
		Valid values: Represented in 1/10 Degrees Celsius

What:		/sys/class/power_supply/<supply_name>/temp_min
Date:		July 2014
Contact:	linux-pm@vger.kernel.org
Description:
		Reports the minimum allowed TBAT battery temperature for
		charging.

		Access: Read
		Valid values: Represented in 1/10 Degrees Celsius

What:		/sys/class/power_supply/<supply_name>/voltage_avg,
Date:		May 2007
Contact:	linux-pm@vger.kernel.org
Description:
		Reports an average VBAT voltage reading for the battery, over a
		fixed period. Normally devices will provide a fixed interval in
		which they average readings to smooth out the reported value.

		Access: Read
		Valid values: Represented in microvolts

What:		/sys/class/power_supply/<supply_name>/voltage_max,
Date:		January 2008
Contact:	linux-pm@vger.kernel.org
Description:
		Reports the maximum safe VBAT voltage permitted for the battery,
		during charging.

		Access: Read
		Valid values: Represented in microvolts

What:		/sys/class/power_supply/<supply_name>/voltage_min,
Date:		January 2008
Contact:	linux-pm@vger.kernel.org
Description:
		Reports the minimum safe VBAT voltage permitted for the battery,
		during discharging.

		Access: Read
		Valid values: Represented in microvolts

What:		/sys/class/power_supply/<supply_name>/voltage_now,
Date:		May 2007
Contact:	linux-pm@vger.kernel.org
Description:
		Reports an instant, single VBAT voltage reading for the battery.
		This value is not averaged/smoothed.

		Access: Read
		Valid values: Represented in microvolts

===== USB Properties =====

What: 		/sys/class/power_supply/<supply_name>/current_avg
Date:		May 2007
Contact:	linux-pm@vger.kernel.org
Description:
		Reports an average IBUS current reading over a fixed period.
		Normally devices will provide a fixed interval in which they
		average readings to smooth out the reported value.

		Access: Read
		Valid values: Represented in microamps


What: 		/sys/class/power_supply/<supply_name>/current_max
Date:		October 2010
Contact:	linux-pm@vger.kernel.org
Description:
		Reports the maximum IBUS current the supply can support.

		Access: Read
		Valid values: Represented in microamps

What: 		/sys/class/power_supply/<supply_name>/current_now
Date:		May 2007
Contact:	linux-pm@vger.kernel.org
Description:
		Reports the IBUS current supplied now. This value is generally
		read-only reporting, unless the 'online' state of the supply
		is set to be programmable, in which case this value can be set
		within the reported min/max range.

		Access: Read, Write
		Valid values: Represented in microamps

What:		/sys/class/power_supply/<supply_name>/input_current_limit
Date:		July 2014
Contact:	linux-pm@vger.kernel.org
Description:
		Details the incoming IBUS current limit currently set in the
		supply. Normally this is configured based on the type of
		connection made (e.g. A configured SDP should output a maximum
		of 500mA so the input current limit is set to the same value).

		Access: Read, Write
		Valid values: Represented in microamps

What:		/sys/class/power_supply/<supply_name>/online,
Date:		May 2007
Contact:	linux-pm@vger.kernel.org
Description:
		Indicates if VBUS is present for the supply. When the supply is
		online, and the supply allows it, then it's possible to switch
		between online states (e.g. Fixed -> Programmable for a PD_PPS
		USB supply so voltage and current can be controlled).

		Access: Read, Write
		Valid values:
			0: Offline
			1: Online Fixed - Fixed Voltage Supply
			2: Online Programmable - Programmable Voltage Supply

What:		/sys/class/power_supply/<supply_name>/temp
Date:		May 2007
Contact:	linux-pm@vger.kernel.org
Description:
		Reports the current supply temperature reading. This would
		normally be the internal temperature of the device itself (e.g
		TJUNC temperature of an IC)

		Access: Read
		Valid values: Represented in 1/10 Degrees Celsius

What:		/sys/class/power_supply/<supply_name>/temp_alert_max
Date:		July 2012
Contact:	linux-pm@vger.kernel.org
Description:
		Maximum supply temperature trip-wire value where the supply will
		notify user-space of the event. This is normally used for the
		charging scenario where user-space needs to know the supply
		temperature has crossed an upper threshold so it can take
		appropriate action (e.g. warning user that the supply
		temperature is critically high, and charging has stopped to
		remedy the situation).

		Access: Read
		Valid values: Represented in 1/10 Degrees Celsius

What:		/sys/class/power_supply/<supply_name>/temp_alert_min
Date:		July 2012
Contact:	linux-pm@vger.kernel.org
Description:
		Minimum supply temperature trip-wire value where the supply will
		notify user-space of the event. This is normally used for the
		charging scenario where user-space needs to know the supply
		temperature has crossed a lower threshold so it can take
		appropriate action (e.g. warning user that the supply
		temperature is high, and charging current has been reduced
		accordingly to remedy the situation).

		Access: Read
		Valid values: Represented in 1/10 Degrees Celsius

What:		/sys/class/power_supply/<supply_name>/temp_max
Date:		July 2014
Contact:	linux-pm@vger.kernel.org
Description:
		Reports the maximum allowed supply temperature for operation.

		Access: Read
		Valid values: Represented in 1/10 Degrees Celsius

What:		/sys/class/power_supply/<supply_name>/temp_min
Date:		July 2014
Contact:	linux-pm@vger.kernel.org
Description:
		Reports the mainimum allowed supply temperature for operation.

		Access: Read
		Valid values: Represented in 1/10 Degrees Celsius

What: 		/sys/class/power_supply/<supply_name>/usb_type
Date:		March 2018
Contact:	linux-pm@vger.kernel.org
Description:
		Reports what type of USB connection is currently active for
		the supply, for example it can show if USB-PD capable source
		is attached.

		Access: Read-Only
		Valid values: "Unknown", "SDP", "DCP", "CDP", "ACA", "C", "PD",
			      "PD_DRP", "PD_PPS", "BrickID"

What: 		/sys/class/power_supply/<supply_name>/voltage_max
Date:		January 2008
Contact:	linux-pm@vger.kernel.org
Description:
		Reports the maximum VBUS voltage the supply can support.

		Access: Read
		Valid values: Represented in microvolts

What: 		/sys/class/power_supply/<supply_name>/voltage_min
Date:		January 2008
Contact:	linux-pm@vger.kernel.org
Description:
		Reports the minimum VBUS voltage the supply can support.

		Access: Read
		Valid values: Represented in microvolts

What: 		/sys/class/power_supply/<supply_name>/voltage_now
Date:		May 2007
Contact:	linux-pm@vger.kernel.org
Description:
		Reports the VBUS voltage supplied now. This value is generally
		read-only reporting, unless the 'online' state of the supply
		is set to be programmable, in which case this value can be set
		within the reported min/max range.

		Access: Read, Write
		Valid values: Represented in microvolts

===== Device Specific Properties =====

What:		/sys/class/power/ds2760-battery.*/charge_now
Date:		May 2010
KernelVersion:	2.6.35
+6 −0
Original line number Diff line number Diff line
@@ -76,6 +76,10 @@ Optional properties:
  needs to make sure it does not send more than 90%
  maximum_periodic_data_per_frame. The use case is multiple transactions, but
  less frame rate.
- mux-controls: The mux control for toggling host/device output of this
  controller. It's expected that a mux state of 0 indicates device mode and a
  mux state of 1 indicates host mode.
- mux-control-names: Shall be "usb_switch" if mux-controls is specified.

i.mx specific properties
- fsl,usbmisc: phandler of non-core register device, with one
@@ -102,4 +106,6 @@ Example:
		rx-burst-size-dword = <0x10>;
		extcon = <0>, <&usb_id>;
		phy-clkgate-delay-us = <400>;
		mux-controls = <&usb_switch>;
		mux-control-names = "usb_switch";
	};
+0 −6
Original line number Diff line number Diff line
@@ -6,12 +6,6 @@ Required properties :
- interrupts             : Interrupt specifier

Optional properties :
- fcs,max-sink-microvolt : Maximum voltage to negotiate when configured as sink
- fcs,max-sink-microamp  : Maximum current to negotiate when configured as sink
- fcs,max-sink-microwatt : Maximum power to negotiate when configured as sink
			   If this is less then max-sink-microvolt *
			   max-sink-microamp then the configured current will
			   be clamped.
- fcs,operating-sink-microwatt :
			   Minimum amount of power accepted from a sink
			   when negotiating
+17 −0
Original line number Diff line number Diff line
Richtek RT1711H TypeC PD Controller.

Required properties:
 - compatible : Must be "richtek,rt1711h".
 - reg : Must be 0x4e, it's slave address of RT1711H.
 - interrupt-parent : the phandle for the interrupt controller that
   provides interrupts for this device.
 - interrupts : <a b> where a is the interrupt number and b represents an
   encoding of the sense and level information for the interrupt.

Example :
rt1711h@4e {
	compatible = "richtek,rt1711h";
	reg = <0x4e>;
	interrupt-parent = <&gpio26>;
	interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
};
Loading