Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0d1154be authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "ARM: dts: msm: Initial DT changes for apq8009 target"

parents d8698e65 bde65aba
Loading
Loading
Loading
Loading
+61 −0
Original line number Diff line number Diff line
* RPM Log

RPM maintains Ulog in the RPM RAM. A device tree node is added
that will hold the address of the RPM RAM region from where
Ulog is read. The physical address from the RPM RAM region
contains a header where various parameters to read the log are
defined. These parameter's offsets in the header are also stored
as a part of the device tree node.

The required properties for rpm-log are:

- compatible: "qcom,rpm-log"
- reg: Specifies the base physical address and the size of the RPM
	registers from where ulog is read.
	Second register(optional) specifies the offset of the rpm
	log start address pointer. If the second register is available,
	the offset value read is added to the first register address
	to read the ulog message.
- qcom,rpm-addr-phys: RPM reads physical address of the RPM RAM region
		differently when compared to Apps. Physical address of
		the RPM RAM region is at an offset when seen from Apps.
		This property specifies the offset which will get added
		to the physical address of RPM RAM to make it
		accessible to the Apps.
- qcom,offset-version: Offset from the start of the phys_addr_base where version
			information is stored.
- qcom,offset-page-buffer-addr: Offset from the start of the phys_addr_base
				where raw log start address is stored. Raw log
				start address is the start of raw log in the
				RPM address space as it should be seen from rpm.
- qcom,offset-log-len: Offset from the start of the phy_addr_base where log
			length is stored.
- qcom,offset-log-len-mask: Offset from the start of the phy_addr_base where
				log length mask is stored.
- qcom,offset-page-indices: Offset from the start of the phy_addr_base where
				index to the writer is stored.

Example 1:
qcom,rpm-log@fc19dc00 {
	compatible = "qcom,rpm-log";
	reg = <0xfc19dc00 0x2000>;
	qcom,offset-rpm-addr = <0xfc000000>;
	qcom,offset-version = <4>;
	qcom,offset-page-buffer-addr = <36>;
	qcom,offset-log-len = <40>;
	qcom,offset-log-len-mask = <44>;
	qcom,offset-page-indices = <56>;
};

Example 2:
qcom,rpm-log@fc000000 {
	compatible = "qcom,rpm-log";
	reg = <0xfc000000 0x2000>,
		<0xfc190018 0x4>;
	qcom,offset-rpm-addr = <0xfc000000>;
	qcom,offset-version = <4>;
	qcom,offset-page-buffer-addr = <36>;
	qcom,offset-log-len = <40>;
	qcom,offset-log-len-mask = <44>;
	qcom,offset-page-indices = <56>;
};
+26 −0
Original line number Diff line number Diff line
* RPM RBCPR

The RBCPR(Rapid Bridge Core Power Reduction) is  module on RPM that controls
the voltage level on the chip based on feedback received through various
sensors on the chip that allow compensation of the chip process variation,
temperature etc.
RPM maintains RBCPR (Rapid Bridge Core Power Reduction) related stats in
data memory. This module allows users to read those stats.

The required properties for rpm-stats are:

- compatible: "qcom,rpmrbcpr-stats"
- reg: Pointer to the start of the RPM Data Memory. The size of the memory
		is inclusive of the entire RPM data memory.
- qcom,start_offset: The offset at which the RBCPR stats are maintained. The
			driver module reads this parameter to get another offset
			that contain the rbcpr stats.


Example:

qcom,rpm-rbcpr-stats@fc000000 {
	compatible = "qcom,rpmrbcpr-stats";
	reg = <0xfc000000 0x1a0000>;
	qcom,start-offset = <0x190010>;
};
+1 −0
Original line number Diff line number Diff line
@@ -6,6 +6,7 @@ Required properties:
  - compatible: Should be set to one of the following:
	qca,ar3002
	qca,qca6174
	qca,qca9379
	qca,wcn3990
  - qca,bt-reset-gpio: GPIO pin to bring BT Controller out of reset

+246 −0
Original line number Diff line number Diff line
SMB1360 battery charger and fuel gauge

SMB1360 is a single path switch-mode battery charger and
fuel gauge. The charger has a max current rating of 1.5A.
The fuel gauge uses voltage + coulomb counting to report
the state of charge.

The smb1360 interface is via I2C bus.

Required Properties:
- compatible:			Must be "qcom,smb1360-charger-fg"
- reg:				The device 7-bit I2C address.

Optional Properties:

- interrupts			This indicates the IRQ number of the GPIO
				connected to the STAT pin.
- pinctrl-names:		The state name of the pin configuration. Only
				support: "default".
- pinctrl-0:			The phandle of the pin configuration node in
				pinctrl for smb_int_pin.
				For details of pinctrl properties, please refer to:
				"Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt"
- qcom,float-voltage-mv	 	Float Voltage in mV - the maximum voltage up to which
				the battery is charged. Supported range 3460V to 4360V
- qcom,charging-timeout		Maximum duration in minutes that a single charge
				cycle may last.  Supported values are: 0, 192, 384,
				768, and 1536.  A value of 0 means that no
				charge cycle timeout is used and charging can
				continue indefinitely.
- qcom,charging-disabled		Set this if charging should be disabled in the build
				by default. Useful in usecases where battery current
				needs to be profiled even when USB is present.
- qcom,recharge-thresh-mv	Specifies the minimum voltage drop in millivolts
				below the float voltage that is required in
				order to initiate a new charging cycle.
				Supported values are: 50, 100, 200 and 300mV.
- qcom,recharge-disabled		Disabled the auto-recharge function
- qcom,iterm-ma			Specifies the termination current to indicate end-of-charge.
				Possible values in mA - 25, 50, 75, 100, 125, 150, 175, 200
- qcom,iterm-disabled		Disables the termination current feature. This is a bool
				property.
- qcom,chg-inhibit-disabled	Disables the charger-inhibit function.
- qcom,disable-ov-ends-chg-cycle
				The boolean property to indicate if the ov-ends-charge-cycle
				feature is disabled. If the feature is disabled, charging
				could be resumed from battery OV (over voltage) status; otherwise,
				charging cycle will be terminated after battery OV event and
				won't be resumed until disable/enable charging.
- qcom,batt-id-disabled		Disabled the batt-id function. Doing this will
				disable the ability of RID based battery profile selection.
- qcom,fg-delta-soc		The delta in SOC which will generate an interrupt
- qcom,fg-soc-max		SOC value (max) at which an interrupt is generated.
				This can be used to alert the system when the
				battery reaches a specific (maximum) SOC value.
- qcom,fg-soc-min		SOC value (min) at which an interrupt is generated.
				This can be used to alert the system when the
				battery reaches a specific (minimum) SOC value.
- qcom,fg-voltage-min-mv	The minimum volatge at which an interrupt is generated.
				This can be used as an alert mechanism.
- qcom,fg-voltage-empty-mv	The voltage which indicates the battery is empty.
- qcom,thermal-mitigation:	Array of input current limit values for different
				system thermal mitigation level.
- qcom,stat-pulsed-irq:		A boolean flag to indicate the state-irq pin will generate pulse
				signal when interrupt happened. If this property is not specified,
				the default configuration is static level irq.
- qcom,shdn-after-pwroff:	A bool property to configure smb1360 for shutdown at power-off.
- qcom,empty-soc-disabled:	A bool property to indicate whether stop updating empty_soc flag.
				System reports 0% SOC when empty_soc being set.
- qcom,awake-min-soc		A bool property to indicate whether the system is prevented from
				sleeping when SOC is under the min_soc threshold.
- qcom,batt-profile-select	A boolean flag to indicate of battery-profile
				selection is enabled.
- qcom,profile-a-rid-kohm	The battery-ID resistor (RID) in Kohm supported by
				profile-A of SMB1360. This should be specified
				if 'batt-profile-select' is defined.
- qcom,profile-b-rid-kohm	The battery-ID resistor (RID) in Kohm supported by
				profile-B of SMB1360. This should be specified
				if 'batt-profile-select' is defined.
- qcom,batt-id-vref-uv		The reference voltage on the battery-ID line
				specified in micro-volts.
- qcom,batt-id-rpullup-kohm	The pull-up resistor connected on the battery-ID
				(vref) line.
- qcom,smb1360-vadc		VADC device phandle (used for reading the RID)
- qcom,fg-batt-capacity-mah	The new battery capacity to be supported.
				This updates the ACTUAL and NOMINAL CAPACITY
				of the profile.
- qcom,fg-cc-soc-coeff		The CC_TO_SOC_COEFF of the new battery capacity.
				This is updated only if 'fg-batt-capacity-mah'
				is specified. This value is calculated from the
				batt-capacity and then encoded as floating number.
				cc_soc_coeff = HALF_ENCODING(8192 / batt-capacity)
- qcom,fg-cutoff-voltage-mv	This is the minimum allowed system voltage. The
				FG will report SOC = 0 at this volatge. This
				value is in mv.
- qcom,fg-iterm-ma		This is termination current at which the
				Monotonic SOC reports 100. The value passed here
				is negated in the driver (assuming that the iterm
				is always -ve). This value is in mA.
- qcom,fg-ibatt-standby-ma	This is the minimum current value for the SOC to
				be above 0% at the cutoff voltage. This value
				is in mA.
- qcom,fg-cc-to-cv-mv		This is the voltage at which the FG transitions
				from CC to CV. This value should never be
				higher than the float volatge. Its in mV.
- qcom,thermistor-c1-coeff	This is the NTC thermistor C1 coeff for the
				thermistor inside the battery. This value is
				16-bit float encoded value determined from the
				NTC-c1_coeff mapping.
- qcom,otg-batt-curr-limit	This property defines the current threshold draw
				from battery when device working at OTG mode.
				The possible values are: 350, 550, 950, 1500mA.
- qcom,fg-auto-recharge-soc	This property defines the auto recharging SOC threshold.
- qcom,min-icl-100ma		A bool property to set the minimum ICL current
				to 100mA. If this property is not set the minimum
				ICL is set to 500mA in all the scenarios.
- qcom,config-hard-thresholds	This property indicates if cold and hot thresholds need be modified.
				If it's not defined, default temp thresholds will be used. If this
				defined, it's required to specify the "qcom,hot-bat-decidegc" and
				"qcom,cold-bat-decidegc" values. If this defined, the serial properties
				(qcom,otp-hard-jeita-config, qcom,otp-hot-bat-decidegc,
				qcom,otp-cold-bat-decidegc) mustn't be defined.
- qcom,hot-bat-decidegc		Hot battery temperature in decidegC. This property should only be
				defined when "qcom,config-hard-thresholds" defined, and the value
				must be out of range [0, 55].
- qcom,cold-bat-decidegc	Cold battery temperature in decidegC. This property should only be
				defined when "qcom,config-hard-thresholds" defined, and the value
				must be out of range [0, 55].
- qcom,otp-hard-jeita-config	This property indicates if cold and hot thresholds need be modified.
				If it's not defined, default temp thresholds [0, 55] will be used.
				If this defined, it's required to specify the "qcom,otp-hot-bat-decidegc"
				and "qcom,otp-cold-bat-decidegc" values. If this is defined, the serial
				properties (qcom,config-hard-thresholds, qcom,hot-bat-decidegc,
				qcom,cold-bat-decidegc) mustn't be defined.
- qcom,otp-hot-bat-decidegc	Hot battery temperature in decidegC. This property could only be
				defined when qcom,config-otp-hard-jeita exist.
- qcom,otp-cold-bat-decidegc	Cold battery temperature in decidegC. This property could only be
				defined when qcom,config-otp-hard-jeita exist.
- qcom,otp-hard-jeita-hysteresis This property contains two intergers to define the temperature
				hysteresis (in decidegC unit) for hard cold and hard hot.
				This property could only be defined when qcom,config-otp-hard-jeita exist.
- qcom,soft-jeita-supported	This property indicates whether soft jeita supported.
- qcom,warm-bat-decidegc	Warm battery temperature in decidegC. After hitting this threshold,
				"qcom,warm-bat-ma" defines maximum charging current and
				"qcom,warm-bat-mv" defines maximum target voltage.
				This property must be in range [0, 55] if needed.
- qcom,cool-bat-decidegc	Cool battery temperature in decidegC. After hitting this threshold,
				"qcom,cool-bat-ma" defines maximum charging current and
				"qcom,cool-bat-mv" defines maximum target voltage.
				This property must be in range [0, 55] if needed.
- qcom,warm-bat-mv		Maximum warm battery target voltage in milli-volts.
- qcom,cool-bat-mv		Maximum cool battery target voltage in milli-volts.
- qcom,warm-bat-ma		Maximum warm battery charge current in milli-amps.
- qcom,cool-bat-ma		Maximum cool battery charge current in milli-amps.
- qcom,fg-reset-at-pon		This is a bool property which indicates if the
				FG reset at power-on is enabled.
- qcom,fg-reset-thresold-mv	This value indicates the volatge threshold to
				reset the FG. This value is compared against
				the difference between in predicted voltage and
				current voltage. If this value is not specified
				a default value of 50mV is used. Unit is in milli-volts.
- qcom,rsense-10mhom		A bool property to indicate the Rsense resistor
				configuration. If set, the Rsense is 10mOhm else
				its 20mOhm.
- qcom,otg-fet-present		A bool property to indicate that a pMOS FET is present
				to boost the OTG current. On enabling this the max OTG
				current supported is 3x(qcom,otg-batt-curr-limit).
- qcom,otg-fet-enable-gpio	GPIO for enabling and disabling OTG FET.
				Following should be the PMIC gpio configuration:
				{
					qcom,mode = <1>; //Digital output
					qcom,pull = <0>; //Pull up configuration
					qcom,vin-sel = <0>; //Voltage level: VPH_PWR
					qcom,src-sel = <0>; //Pin function: GPIO
					qcom,master-en = <1>; //Enable
				}
				Please go through the documentation for PMIC gpio
				configuration details:
				Documentation/devicetree/bindings/gpio/qpnp-pin.txt
- qcom,parallel-charging-enabled: A bool property which enables SMB1360 to
				operate in the parallel mode. SMB1360 acts
				as the primary charger.
- qcom,max-parallel-current-ma: This is the max charging current which can be
				drawn from the secondary charger. If this is
				not specified this value defaults to 540mA.
				The overall current charging current is
				1500mA(from SMB) + qcom,max-parallel-current-ma.

Example:
	i2c@f9967000 {
		smb1360-chg-fg@1b {
			compatible = "qcom,smb1360-chg-fg";
			reg = <0x1b>;
			interrupt-parent = <&spmi_bus>;
			interrupts = <0x00 0xcd 0>;
			pinctrl-names = "default";
			pinctrl-0 = <&smb_int_default>;

			/* battery-profile selection properties */
			qcom,batt-profile-select;
			qcom,smb1360-vadc = <&pm8916_vadc>;
			qcom,batt-id-vref-uv = <1800000>;
			qcom,batt-id-rpullup-kohm = <100>;
			qcom,profile-a-rid-kohm = <78>;
			qcom,profile-b-rid-kohm = <200>;

			/* battery capacity */
			qcom,fg-batt-capacity-mah = <4000>;
			qcom,fg-cc-soc-coeff = <0x8009>;

			qcom,fg-cutoff-voltage-mv = <3300>;
			qcom,fg-iterm-ma = <100>;
			qcom,fg-ibatt-standby-ma = <200>;
			qcom,fg-cc-to-cv-mv = <4180>;
			qcom,thermistor-c1-coeff = <0x86DB>;

			qcom,float-voltage-mv = <4200>;
			qcom,iterm-ma = <100>;
			qcom,charging-disabled;
			qcom,recharge-thresh-mv = <100>;
			qcom,fg-soc-max = <85>;
			qcom,fg-soc-min = <15>;
			qcom,fg-auto-recharge-soc = <99>;
			qcom,thermal-mitigation = <1500 700 300 0>;
			qcom,config-hard-thresholds;
			qcom,hot-bat-decidegc = <650>;
			qcom,cold-bat-decidegc = <(-100)>;
			qcom,soft-jeita-supported;
			qcom,warm-bat-decidegc = <450>;
			qcom,cool-bat-decidegc = <100>;
			qcom,otp-hard-jeita-config;
			qcom,otp-hot-bat-decidegc = <550>;
			qcom,otp-cold-bat-decidegc = <0>;
			qcom,otp-hard-jeita-hysteresis = <0, 50>;
			qcom,warm-bat-mv = <4100>;
			qcom,cool-bat-mv = <4100>;
			qcom,warm-bat-ma = <750>;
			qcom,cool-bat-ma = <750>;

			qcom,otg-batt-curr-limit = <950>;
			qcom,fg-reset-at-pon;

			qcom,otg-fet-present;
			qcom,otg-fet-enable-gpio = <&pm8916_gpios 3 0>;
		};
	};
+134 −0
Original line number Diff line number Diff line
@@ -1872,6 +1872,140 @@ Example:
		asoc-wsa-codec-prefixes = "SpkrLeft";
	};

* APQ8009 I2S ASoC Machine driver

Required properties:
- compatible : "qcom,apq8009-audio-i2s-codec"
- qcom,model : The user-visible name of this sound card.
- qcom,pinctrl-names : Lists all the possible combinations of the gpio sets
	mentioned in qcom,msm-gpios. Say we have 2^N combinations for N GPIOs,
	this would list all the 2^N combinations.
- pinctrl-names : The combinations of gpio sets from above that are supported in
	the flavor. This can be sometimes same as qcom,pinctrl-names i.e with 2^N
	combinations or will have less incase if some combination is not supported.
- pinctrl-# : Pinctrl states as mentioned in pinctrl-names.
- qcom,audio-routing : A list of the connections between audio components.
	Each entry is a pair of strings, the first being the connection's sink,
	the second being the connection's source.

Optional properties:
- qcom,cdc-us-euro-gpios : GPIO on which gnd/mic swap signal is coming.
- asoc-platform: This is phandle list containing the references to platform device
		nodes that are used as part of the sound card dai-links.
- asoc-platform-names:  This property contains list of platform names. The order of
			the platform names should match to that of the phandle order
			given in "asoc-platform".
- asoc-cpu: This is phandle list containing the references to cpu dai device nodes
	that are used as part of the sound card dai-links.
- asoc-cpu-names: This property contains list of cpu dai names. The order of the
	cpu dai names should match to that of the phandle order given
	in "asoc-cpu". The cpu names are in the form of "%s.%d" form,
	where the id (%d) field represents the back-end AFE port id that
	this CPU dai is associated with.
- asoc-codec: This is phandle list containing the references to codec dai device
	nodes that are used as part of the sound card dai-links.
- asoc-codec-names: This property contains list of codec dai names. The order of the
		codec dai names should match to that of the phandle order given
		in "asoc-codec".
- qcom,wsa-max-devs : Maximum number of WSA881x devices present in the target
- qcom,wsa-devs: This property contains list of wsa codec names. The names
		should comply with the wsa nodes configurations.
- qcom,wsa-aux-dev-prefix: This property contains list of wsa codec prefixes.
- qcom,tdm-i2s-switch-enable: For chipsets where tdm mics are controlled by
			      switch, drive corresponding gpio to output high
			      to enable switch.

Example:
	sound {
		compatible = "qcom,apq8009-audio-i2s-codec";
		qcom,model = "apq8009-tashalite-snd-card";
		qcom,msm-codec-type = "external";
		qcom,msm-mbhc-hphl-swh = <0>;
		qcom,msm-mbhc-gnd-swh = <0>;
		qcom,msm-mclk-freq = <9600000>;
		qcom,msm-hs-micbias-type = "internal";
		qcom,audio-routing =
			"AIF4 VI", "MCLK",
			"RX_BIAS", "MCLK",
			"MADINPUT", "MCLK",
			"AMIC2", "MIC BIAS2",
			"MIC BIAS2", "Headset Mic",
			"DMIC0", "MIC BIAS1",
			"MIC BIAS1", "Digital Mic0",
			"DMIC1", "MIC BIAS1",
			"MIC BIAS1", "Digital Mic1",
			"DMIC2", "MIC BIAS2",
			"MIC BIAS2", "Digital Mic2",
			"DMIC3", "MIC BIAS2",
			"MIC BIAS2", "Digital Mic3",
			"SpkrLeft IN", "SPK1 OUT",
			"SpkrRight IN", "SPK2 OUT";

		qcom,msm-gpios =
			"pri_i2s",
			"quat_i2s";
		qcom,pinctrl-names =
			"all_off",
			"pri_i2s_act",
			"quat_i2s_act",
			"pri_i2s_quat_i2s_act";
		pinctrl-names =
			"all_off",
			"pri_i2s_act",
			"quat_i2s_act",
			"pri_i2s_quat_i2s_act";
		pinctrl-0 = <&pri_mi2s_sleep &pri_mi2s_ws_sleep
			&pri_mi2s_dout_sleep &pri_mi2s_din_sleep
			&quat_mi2s_sleep &quat_mi2s_din_sleep>;
		pinctrl-1 = <&pri_mi2s_active &pri_mi2s_ws_active
			&pri_mi2s_dout_active &pri_mi2s_din_active
			&quat_mi2s_sleep &quat_mi2s_din_sleep>;
		pinctrl-2 = <&pri_mi2s_sleep &pri_mi2s_ws_sleep
			&pri_mi2s_dout_sleep &pri_mi2s_din_sleep
			&quat_mi2s_active &quat_mi2s_din_active>;
		pinctrl-3 = <&pri_mi2s_active &pri_mi2s_ws_active
			&pri_mi2s_dout_active &pri_mi2s_din_active
			&quat_mi2s_active &quat_mi2s_din_active>;

		asoc-platform = <&pcm0>, <&pcm1>, <&voip>, <&voice>,
			<&loopback>, <&compress>, <&hostless>,
			<&afe>, <&lsm>, <&routing>, <&cpe>, <&lpa>;
		asoc-platform-names = "msm-pcm-dsp.0", "msm-pcm-dsp.1",
			"msm-voip-dsp", "msm-pcm-voice", "msm-pcm-loopback",
			"msm-compress-dsp", "msm-pcm-hostless", "msm-pcm-afe",
			"msm-lsm-client", "msm-pcm-routing", "msm-cpe-lsm",
			"msm-pcm-lpa";
		asoc-cpu =  <&dai_pri_auxpcm>, <&dai_hdmi>,<&dai_mi2s0>,
			<&dai_mi2s2>, <&dai_mi2s3>,
			<&sb_0_rx>, <&sb_0_tx>, <&sb_1_rx>, <&sb_1_tx>,
			<&sb_3_rx>, <&sb_3_tx>,
			<&sb_4_rx>, <&sb_4_tx>, <&afe_pcm_rx>,
			<&afe_pcm_tx>, <&afe_proxy_rx>, <&afe_proxy_tx>,
			<&incall_record_rx>, <&incall_record_tx>,
			<&incall_music_rx>, <&incall_music_2_rx>,
			<&bt_sco_rx>,
			<&bt_sco_tx>, <&int_fm_rx>, <&int_fm_tx>;
		asoc-cpu-names = "msm-dai-q6-auxpcm.1", "msm-dai-q6-hdmi.8",
			"msm-dai-q6-mi2s.0",
			"msm-dai-q6-mi2s.2", "msm-dai-q6-mi2s.3",
			"msm-dai-q6-dev.16384", "msm-dai-q6-dev.16385",
			"msm-dai-q6-dev.16386", "msm-dai-q6-dev.16387",
			"msm-dai-q6-dev.16390", "msm-dai-q6-dev.16391",
			"msm-dai-q6-dev.16392", "msm-dai-q6-dev.16393",
			"msm-dai-q6-dev.224",
			"msm-dai-q6-dev.225", "msm-dai-q6-dev.241",
			"msm-dai-q6-dev.240", "msm-dai-q6-dev.32771",
			"msm-dai-q6-dev.32772", "msm-dai-q6-dev.32773",
			"msm-dai-q6-dev.32770",
			"msm-dai-q6-dev.12288", "msm-dai-q6-dev.12289",
			"msm-dai-q6-dev.12292", "msm-dai-q6-dev.12293";
		asoc-codec = <&stub_codec>;
		asoc-codec-names = "msm-stub-codec.1";
		qcom,wsa-max-devs = <2>;
		qcom,wsa-devs = <&wsa881x_213>, <&wsa881x_214>;
		qcom,wsa-aux-dev-prefix = "SpkrLeft", "SpkrRight";
	};

* MSM8909 BG ASoC Machine driver

Required properties:
Loading