mbox series

[0/5] arm64: dts: qcom: add and enable the pmi8998 RRADC

Message ID 20221016180330.1912214-1-caleb.connolly@linaro.org
Headers show
Series arm64: dts: qcom: add and enable the pmi8998 RRADC | expand

Message

Caleb Connolly Oct. 16, 2022, 6:03 p.m. UTC
This contains patches 6 through 10 of the series adding a driver
for the RRADC
https://lore.kernel.org/linux-arm-msm/20220429220904.137297-1-caleb.connolly@linaro.org/

The driver and DT bindings have been in mainline for a while.

This introduces a new dtbs_check warning which is fixed in
https://lore.kernel.org/linux-arm-msm/20221016175757.1911016-1-caleb.connolly@linaro.org/
and depends on Luca's series:
https://lore.kernel.org/linux-arm-msm/20220925211744.133947-2-luca@z3ntu.xyz/

  -Caleb

Caleb Connolly (4):
  arm64: dts: qcom: pmi8998: add rradc node
  arm64: dts: qcom: sdm845-oneplus: enable rradc
  arm64: dts: qcom: sdm845-db845c: enable rradc
  arm64: dts: qcom: sdm845-xiaomi-beryllium: enable rradc

Jami Kettunen (1):
  arm64: dts: qcom: msm8998-oneplus-common: enable RRADC

 arch/arm64/boot/dts/qcom/msm8998-oneplus-common.dtsi | 4 ++++
 arch/arm64/boot/dts/qcom/pmi8998.dtsi                | 8 ++++++++
 arch/arm64/boot/dts/qcom/sdm845-db845c.dts           | 4 ++++
 arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi  | 4 ++++
 arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium.dts | 4 ++++
 5 files changed, 24 insertions(+)

Comments

Krzysztof Kozlowski Oct. 17, 2022, 5:22 p.m. UTC | #1
On 17/10/2022 11:29, Caleb Connolly wrote:

>>> +		pmi8998_rradc: adc@4500 {
>>> +			compatible = "qcom,pmi8998-rradc";
>>> +			reg = <0x4500>;
>>> +			#io-channel-cells = <1>;
>>> +
>>> +			status = "disabled";
>>
>> Why disabling it? It does not need any external/board resources, so
>> maybe it should be just like other adcs - enabled by default? What does
>> it measure? What is its input?
> 
> The RRADC mostly reports values which only make sense on mobile devices, battery 
> ID and temperature, USB and DC input voltage/current as well as a (duplicate?) 
> die temperature of the PMIC - I guess closer to the SMB/FG block.
> 
> When I last tested the DC input readings didn't work on db845c, as it just 
> produces the 4.2v you'd get from a battery.

If it is connected to some line - e.g. to the battery - then it is
operational and there is no reason to disable it.


Best regards,
Krzysztof
Bjorn Andersson Nov. 7, 2022, 3:11 a.m. UTC | #2
On Sun, 16 Oct 2022 19:03:24 +0100, Caleb Connolly wrote:
> This contains patches 6 through 10 of the series adding a driver
> for the RRADC
> https://lore.kernel.org/linux-arm-msm/20220429220904.137297-1-caleb.connolly@linaro.org/
> 
> The driver and DT bindings have been in mainline for a while.
> 
> This introduces a new dtbs_check warning which is fixed in
> https://lore.kernel.org/linux-arm-msm/20221016175757.1911016-1-caleb.connolly@linaro.org/
> and depends on Luca's series:
> https://lore.kernel.org/linux-arm-msm/20220925211744.133947-2-luca@z3ntu.xyz/
> 
> [...]

Applied, thanks!

[1/5] arm64: dts: qcom: pmi8998: add rradc node
      commit: 1cb78978d34e1b65bbb912d8265eb95713ae7a45
[2/5] arm64: dts: qcom: sdm845-oneplus: enable rradc
      commit: 868985181a69df53321035d96aa668d90f6cd5cb
[3/5] arm64: dts: qcom: sdm845-db845c: enable rradc
      commit: e779eb99859cc26d051f6fc723d2bd2d5990a812
[4/5] arm64: dts: qcom: sdm845-xiaomi-beryllium: enable rradc
      commit: 53c54069d9ffd556b52893077324e628655cd591
[5/5] arm64: dts: qcom: msm8998-oneplus-common: enable RRADC
      commit: aac16a9d247e5496361bfe20d651f2c1333eb5dc

Best regards,
Caleb Connolly Nov. 7, 2022, 3:23 a.m. UTC | #3
On 07/11/2022 03:11, Bjorn Andersson wrote:
> On Sun, 16 Oct 2022 19:03:24 +0100, Caleb Connolly wrote:
>> This contains patches 6 through 10 of the series adding a driver
>> for the RRADC
>> https://lore.kernel.org/linux-arm-msm/20220429220904.137297-1-caleb.connolly@linaro.org/
>>
>> The driver and DT bindings have been in mainline for a while.
>>
>> This introduces a new dtbs_check warning which is fixed in
>> https://lore.kernel.org/linux-arm-msm/20221016175757.1911016-1-caleb.connolly@linaro.org/
>> and depends on Luca's series:
>> https://lore.kernel.org/linux-arm-msm/20220925211744.133947-2-luca@z3ntu.xyz/
>>
>> [...]
> 
> Applied, thanks!

Hi Bjorn,

Apologies, I should have left a reply about re-spinning this; it's 
been dropped to a single patch as Krzysztof suggested in [1] and is 
currently pending a v4 (v3 can be found at [2]).

The changes aren't major, actually just enabling it by default rather 
than per-device. If it would need to be reverted I could instead send 
a followup to do this as well as add the missing dt bindings.

[1]: 
https://lore.kernel.org/linux-arm-msm/5929051d-d2be-5b51-0cf9-294affa51df2@linaro.org/
[2]: 
https://lore.kernel.org/linux-arm-msm/20221017190902.2282899-1-caleb.connolly@linaro.org/

> 
> [1/5] arm64: dts: qcom: pmi8998: add rradc node
>        commit: 1cb78978d34e1b65bbb912d8265eb95713ae7a45
> [2/5] arm64: dts: qcom: sdm845-oneplus: enable rradc
>        commit: 868985181a69df53321035d96aa668d90f6cd5cb
> [3/5] arm64: dts: qcom: sdm845-db845c: enable rradc
>        commit: e779eb99859cc26d051f6fc723d2bd2d5990a812
> [4/5] arm64: dts: qcom: sdm845-xiaomi-beryllium: enable rradc
>        commit: 53c54069d9ffd556b52893077324e628655cd591
> [5/5] arm64: dts: qcom: msm8998-oneplus-common: enable RRADC
>        commit: aac16a9d247e5496361bfe20d651f2c1333eb5dc
> 
> Best regards,