Difference between revisions of "Talk:Qualcomm Snapdragon 800/801 (MSM8974)"

From postmarketOS
Jump to navigation Jump to search
(add coincell section)
Line 15: Line 15:
  
 
[[User:Z3ntu|Z3ntu]] ([[User talk:Z3ntu|talk]]) 21:57, 20 February 2021 (UTC)
 
[[User:Z3ntu|Z3ntu]] ([[User talk:Z3ntu|talk]]) 21:57, 20 February 2021 (UTC)
 +
 +
== Coincell ==
 +
 +
A capacitor (or actual coin cell) that stores some energy, e.g. for keeping the RTC alive when the battery is temporarily removed. A component of the pm8941 charges this capacitor, controlled by the downstream driver <code>drivers/platform/msm/qpnp-coincell.c</code> .
 +
 +
<pre>
 +
pm8941_coincell: qcom,coincell@2800 {
 +
compatible = "qcom,qpnp-coincell";
 +
reg = <0x2800 0x100>;
 +
};
 +
</pre>
 +
 +
In mainline the properties <code>qcom,rset-ohms</code> and <code>qcom,vset-millivolts</code> are required to be set while downstream has them optional and keeps the hardware defaults if not set explicitely. Fortunately the downstream driver prints the values after probe is done, so figuring out the correct value is easy.
 +
<pre>
 +
[    2.578974] qpnp_coincell_charger_show_state: enabled=Y, voltage=3000 mV, resistance=2100 ohm
 +
</pre>
 +
From that you can set the mainline dt properties:
 +
<pre>
 +
qcom,rset-ohms = <2100>;
 +
qcom,vset-millivolts = <3000>;
 +
</pre>

Revision as of 10:28, 21 February 2021

Chip variants

Basically there's MSM8x74 = Snapdragon 800; MSM8x74AA, MSM8x74AB & MSM8x74AC = Snapdragon 801. In the 801 variants the only difference seems to be the lower/higher frequencies of various components (e.g. GPU). Compared to Snapdragon 800 there seem to be a bit more major differences though in clock configuration for example.

Search for `cpu_is_msm8974pro` in arch/arm/mach-msm/clock-8974.c to find the clock differences.

Example: Fairphone 2, MSM8974PRO-AA in Android Settings, /sys/devices/soc0/revision: "1.1", /sys/devices/soc0/soc_id: "217"

BUT Mainline seems to ONLY call the -AC variant 'pro', see drivers/soc/qcom/socinfo.c (search for "74PRO"), these are called PRO-AC on downstream (and others PRO-AA, PRO-AB), so PRO-A* seems to be Snapdragon 801 while the non-PRO (downstream) are 800

There are also the naming variant MSM8974AB-AA, MSM8974AB-AB & MSM8974AB-AC where the first AB = PRO = Snapdragon 801; apparently AA & AC are kind of variants of the AB base variant, so AB base variant + AA more specific variant.

For Snapdragon 800 there's also a v1 and v2 (which also have different clock configs for example); Snapdragon 801 is also sometimes called v3 but that seems to be more marketing than something the processor says (in socinfo)

Z3ntu (talk) 21:57, 20 February 2021 (UTC)

Coincell

A capacitor (or actual coin cell) that stores some energy, e.g. for keeping the RTC alive when the battery is temporarily removed. A component of the pm8941 charges this capacitor, controlled by the downstream driver drivers/platform/msm/qpnp-coincell.c .

	pm8941_coincell: qcom,coincell@2800 {
		compatible = "qcom,qpnp-coincell";
		reg = <0x2800 0x100>;
	};

In mainline the properties qcom,rset-ohms and qcom,vset-millivolts are required to be set while downstream has them optional and keeps the hardware defaults if not set explicitely. Fortunately the downstream driver prints the values after probe is done, so figuring out the correct value is easy.

[    2.578974] qpnp_coincell_charger_show_state: enabled=Y, voltage=3000 mV, resistance=2100 ohm

From that you can set the mainline dt properties:

			qcom,rset-ohms = <2100>;
			qcom,vset-millivolts = <3000>;