mbox series

[0/7] Really implement Qualcomm LAB/IBB regulators

Message ID 20210109132921.140932-1-angelogioacchino.delregno@somainline.org
Headers show
Series Really implement Qualcomm LAB/IBB regulators | expand

Message

AngeloGioacchino Del Regno Jan. 9, 2021, 1:29 p.m. UTC
Okay, the title may be a little "aggressive"? However, the qcom-labibb
driver wasn't really .. doing much.
The current form of this driver is only taking care of enabling or
disabling the regulators, which is pretty useless if they were not
pre-set from the bootloader, which sets them only if continuous
splash is enabled.
Moreover, some bootloaders are setting a higher voltage and/or a higher
current limit compared to what's actually required by the attached
hardware (which is, in 99.9% of the cases, a display) and this produces
a higher power consumption, higher heat output and a risk of actually
burning the display if kept up for a very long time: for example, this
is true on at least some Sony Xperia MSM8998 (Yoshino platform) and
especially on some Sony Xperia SDM845 (Tama platform) smartphones.

In any case, the main reason why this change was necessary for us is
that, during the bringup of Sony Xperia MSM8998 phones, we had an issue
with the bootloader not turning on the display and not setting the lab
and ibb regulators before booting the kernel, making it impossible to
powerup the display.

With this said, this patchset enables setting voltage, current limiting,
overcurrent and short-circuit protection.. and others, on the LAB/IBB
regulators.
Each commit in this patch series provides as many informations as
possible about what's going on and testing methodology.

AngeloGioacchino Del Regno (7):
  regulator: qcom-labibb: Implement voltage selector ops
  regulator: qcom-labibb: Implement current limiting
  regulator: qcom-labibb: Implement pull-down, softstart, active
    discharge
  dt-bindings: regulator: qcom-labibb: Document soft start properties
  regulator: qcom-labibb: Implement short-circuit and over-current IRQs
  dt-bindings: regulator: qcom-labibb: Document SCP/OCP interrupts
  arm64: dts: pmi8998: Add the right interrupts for LAB/IBB SCP and OCP

 .../regulator/qcom-labibb-regulator.yaml      |  28 +-
 arch/arm64/boot/dts/qcom/pmi8998.dtsi         |   8 +-
 drivers/regulator/qcom-labibb-regulator.c     | 636 +++++++++++++++++-
 3 files changed, 660 insertions(+), 12 deletions(-)

Comments

Rob Herring (Arm) Jan. 10, 2021, 5:18 p.m. UTC | #1
On Sat, 09 Jan 2021 14:29:18 +0100, AngeloGioacchino Del Regno wrote:
> Document properties to configure soft start and discharge resistor
> for LAB and IBB respectively.
> 
> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org>
> ---
>  .../bindings/regulator/qcom-labibb-regulator.yaml         | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 

My bot found errors running 'make dt_binding_check' on your patch:

yamllint warnings/errors:

dtschema/dtc warnings/errors:
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/regulator/qcom-labibb-regulator.yaml: properties:ibb:properties:qcom,discharge-resistor-kohms: 'oneOf' conditional failed, one must be fixed:
	'type' is a required property
	Additional properties are not allowed ('default', 'enum' were unexpected)
	Additional properties are not allowed ('default' was unexpected)
	/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/regulator/qcom-labibb-regulator.yaml: properties:ibb:properties:qcom,discharge-resistor-kohms: 'oneOf' conditional failed, one must be fixed:
		'$ref' is a required property
		'allOf' is a required property
	300 is not of type 'string'
	64 is not of type 'string'
	32 is not of type 'string'
	16 is not of type 'string'
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/regulator/qcom-labibb-regulator.yaml: ignoring, error in schema: properties: ibb: properties: qcom,discharge-resistor-kohms
warning: no schema found in file: ./Documentation/devicetree/bindings/regulator/qcom-labibb-regulator.yaml

See https://patchwork.ozlabs.org/patch/1424112

This check can fail if there are any dependencies. The base for a patch
series is generally the most recent rc1.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit.
AngeloGioacchino Del Regno Jan. 10, 2021, 6:01 p.m. UTC | #2
Il 10/01/21 18:18, Rob Herring ha scritto:
> On Sat, 09 Jan 2021 14:29:18 +0100, AngeloGioacchino Del Regno wrote:

>> Document properties to configure soft start and discharge resistor

>> for LAB and IBB respectively.

>>

>> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org>

>> ---

>>   .../bindings/regulator/qcom-labibb-regulator.yaml         | 8 ++++++++

>>   1 file changed, 8 insertions(+)

>>

> 

> My bot found errors running 'make dt_binding_check' on your patch:

> 

> yamllint warnings/errors:

> 

> dtschema/dtc warnings/errors:

> /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/regulator/qcom-labibb-regulator.yaml: properties:ibb:properties:qcom,discharge-resistor-kohms: 'oneOf' conditional failed, one must be fixed:

> 	'type' is a required property

> 	Additional properties are not allowed ('default', 'enum' were unexpected)

> 	Additional properties are not allowed ('default' was unexpected)

> 	/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/regulator/qcom-labibb-regulator.yaml: properties:ibb:properties:qcom,discharge-resistor-kohms: 'oneOf' conditional failed, one must be fixed:

> 		'$ref' is a required property

> 		'allOf' is a required property

> 	300 is not of type 'string'

> 	64 is not of type 'string'

> 	32 is not of type 'string'

> 	16 is not of type 'string'

> /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/regulator/qcom-labibb-regulator.yaml: ignoring, error in schema: properties: ibb: properties: qcom,discharge-resistor-kohms

> warning: no schema found in file: ./Documentation/devicetree/bindings/regulator/qcom-labibb-regulator.yaml

> 

> See https://patchwork.ozlabs.org/patch/1424112

> 

> This check can fail if there are any dependencies. The base for a patch

> series is generally the most recent rc1.

> 

> If you already ran 'make dt_binding_check' and didn't see the above

> error(s), then make sure 'yamllint' is installed and dt-schema is up to

> date:

> 

> pip3 install dtschema --upgrade

> 

> Please check and re-submit.


Fixing ASAP.