From cd0de9bd8070421887f450e478d7b7631d4d6b99 Mon Sep 17 00:00:00 2001 From: Jishnu Prakash Date: Sun, 10 Jan 2021 23:08:47 +0530 Subject: [PATCH 1/2] dt-bindings: qpnp-lcdb-regulator: Add support for PM7325B LCDB Add compatible string for PM7325B LCDB device. Remove pmic-revid property as it is not used on kernel 5.4. Add pwrup-delay-ms, qcom,bst-ps-threshold-mv and qcom,pwrup-config properties for PM7325B. Update qcom,bst-ilim-ma, qcom,ncp-ilim-ma and qcom,ldo-ilim-ma for PM7325B. Change-Id: I66b3bfd1782f41eb44cca08adce2a02bada0727c --- bindings/regulator/qpnp-lcdb-regulator.txt | 46 ++++++++++++++++------ 1 file changed, 34 insertions(+), 12 deletions(-) diff --git a/bindings/regulator/qpnp-lcdb-regulator.txt b/bindings/regulator/qpnp-lcdb-regulator.txt index 5016aacd157a..ca63521841e0 100644 --- a/bindings/regulator/qpnp-lcdb-regulator.txt +++ b/bindings/regulator/qpnp-lcdb-regulator.txt @@ -24,17 +24,13 @@ First Level Node - LCDB module "qcom,lcdb-pm660" "qcom,lcdb-pmi632" "qcom,lcdb-pm6150l" + "qcom,lcdb-pm7325b" - reg Usage: required Value type: Definition: Base address of the LCDB SPMI peripheral. -- qcom,pmic-revid - Usage: required - Value type: - Definition: Phandle to the PMIC's revid node - - qcom,voltage-step-ramp Usage: optional Value type: @@ -49,6 +45,23 @@ First Level Node - LCDB module Definition: Required to control the LDO power down delay. Possible values are 0, 1, 4, 8. +- qcom,pwrup-delay-ms + Usage: optional + Value type: + Definition: Required to control the LDO power up delay. + Possible values are 0, 1, 4, 8. + +- qcom,pwrup-config + Usage: optional + Value type: + Definition: Controls the order of powering up BOOST, LDO AND NCP + blocks. Appilcable for PM7325B. Possible values are: 0, 1, 2, 3, 4. + 0 - Boost, LDO, NCP + 1 - Boost, LDO + 2 - Boost, NCP + 3 - Boost only + 4 - Boost, NCP, LDO + Touch-to-wake (TTW) properties: TTW supports 2 modes of operation - HW and SW. In the HW mode the enable/disable @@ -141,8 +154,9 @@ Properties below are specific to LDO bias only. - qcom,ldo-ilim-ma Usage: optional Value type: - Definition: Current limit (in mA) of the LDO bias. - Possible values are 110, 160, 210, 260, 310, 360, 410, 460. + Definition: Current limit (in mA) of the LDO bias. For PM7325B, possible + values are 35, 175, 280, 420, 455, 595, 700, 840. For other PMICs, + possible values are 110, 160, 210, 260, 310, 360, 410, 460. - qcom,ldo-soft-start-us Usage: optional @@ -150,7 +164,6 @@ Properties below are specific to LDO bias only. Definition: Soft-start time (in uS) of the LDO bias. Possible values are 0, 500, 1000, 2000. - NCP subnode properties: Properties below are specific to NCP bias only. @@ -180,8 +193,9 @@ Properties below are specific to NCP bias only. - qcom,ncp-ilim-ma Usage: optional Value type: - Definition: Current limit (in mA) of the NCP bias. - Possible values are 260, 460, 640, 810. + Definition: Current limit (in mA) of the NCP bias. For PM7325B, possible + values are 700, 80, 900, 1000. For other PMICs, possible values + are 260, 460, 640, 810. - qcom,ncp-soft-start-us Usage: optional @@ -221,11 +235,19 @@ Properties below are specific to BOOST subnode only. Definition: Current threshold (in mA) at which pulse-skip is entered. Possible values are 50, 60, 70, 80. +- qcom,bst-ps-threshold-mv + Usage: optional + Value type: + Definition: Current threshold (in mv) at which pulse-skip is entered. + Applicable for PM7325B. Possible values are 360, 384, 408, 432, + 456, 480, 504, 528. + - qcom,bst-ilim-ma Usage: optional Value type: - Definition: Current limit (in mA) of the BOOST rail. - Possible values are 200 to 1600mA in 200mA steps. + Definition: Current limit (in mA) of the BOOST rail. For PM7325B, possible + possible values are 1130 to 2250mA in 160mA steps. For other PMICs, + possible values are 200 to 1600mA in 200mA steps. - qcom,bst-headroom-mv Usage: optional From d022bac3e7248341c7d2aa23edfca99c27876dcf Mon Sep 17 00:00:00 2001 From: Jishnu Prakash Date: Thu, 24 Dec 2020 10:34:30 +0530 Subject: [PATCH 2/2] ARM: dts: msm: Add LCDB and WLED devices for PM7325B Add LCDB and WLED devices for PM7325B with configurations required for yupik panel. Change-Id: Ie54f34737e4edeba6995c2272e7dfb4c76d556fe --- qcom/pm7325b.dtsi | 59 +++++++++++++++++++++++++++++++++++++++++++++ qcom/yupik-idp.dtsi | 6 +++++ 2 files changed, 65 insertions(+) diff --git a/qcom/pm7325b.dtsi b/qcom/pm7325b.dtsi index 0ca5f7732a39..4fd41e4bdcd8 100644 --- a/qcom/pm7325b.dtsi +++ b/qcom/pm7325b.dtsi @@ -35,6 +35,65 @@ qcom,vib-ldo-volt-uv = <3000000>; qcom,disable-overdrive; }; + + pm7325b_lcdb: qcom,lcdb@fd00 { + compatible = "qcom,lcdb-pm7325b"; + #address-cells = <1>; + #size-cells = <0>; + reg = <0xfd00>; + interrupts = <0x3 0xfd 0x1 IRQ_TYPE_EDGE_RISING>; + interrupt-names = "sc-irq"; + + lcdb_ldo_vreg: ldo { + label = "ldo"; + regulator-name = "lcdb_ldo"; + regulator-min-microvolt = <4400000>; + regulator-max-microvolt = <6000000>; + }; + + lcdb_ncp_vreg: ncp { + label = "ncp"; + regulator-name = "lcdb_ncp"; + regulator-min-microvolt = <4400000>; + regulator-max-microvolt = <6000000>; + }; + + lcdb_bst_vreg: bst { + label = "bst"; + regulator-name = "lcdb_bst"; + regulator-min-microvolt = <4700000>; + regulator-max-microvolt = <6400000>; + }; + }; + + pm7325b_wled: qcom,wled@d800 { + compatible = "qcom,pm7325b-spmi-wled"; + reg = <0xfb00>, <0xfc00>; + reg-names = "wled-ctrl-base", "wled-sink-base"; + label = "backlight"; + interrupts = <0x3 0xfb 0x1 IRQ_TYPE_EDGE_RISING>, + <0x3 0xfb 0x4 IRQ_TYPE_EDGE_BOTH>, + <0x3 0xfb 0x5 IRQ_TYPE_EDGE_BOTH>; + interrupt-names = "ovp-irq", "pre-flash-irq", + "flash-irq"; + qcom,auto-calibration; + + wled_flash: qcom,wled-flash { + label = "flash"; + qcom,default-led-trigger = "wled_flash"; + }; + + wled_torch: qcom,wled-torch { + label = "torch"; + qcom,default-led-trigger = "wled_torch"; + qcom,wled-torch-timer = <1200>; + }; + + wled_switch: qcom,wled-switch { + label = "switch"; + qcom,default-led-trigger = "wled_switch"; + }; + }; }; }; diff --git a/qcom/yupik-idp.dtsi b/qcom/yupik-idp.dtsi index 92d4c51d29d2..5081bc580461 100644 --- a/qcom/yupik-idp.dtsi +++ b/qcom/yupik-idp.dtsi @@ -181,6 +181,12 @@ }; }; +&pm7325b_wled { + qcom,string-cfg = <3>; + qcom,leds-per-string = <8>; + qcom,fs-current-limit = <22500>; +}; + &spmi_debug_bus { status = "ok"; };