All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/5] Add Qcom PM6125 PMIC, and use in Sony Xperia Seine PDX201
@ 2022-09-19 20:48 Marijn Suijten
  2022-09-19 20:48 ` [PATCH v3 1/5] dt-bindings: mfd: qcom-spmi-pmic: Add pm6125 compatible Marijn Suijten
                   ` (5 more replies)
  0 siblings, 6 replies; 9+ messages in thread
From: Marijn Suijten @ 2022-09-19 20:48 UTC (permalink / raw)
  To: phone-devel, Andy Gross, Bjorn Andersson, Konrad Dybcio
  Cc: ~postmarketos/upstreaming, AngeloGioacchino Del Regno,
	Martin Botka, Jami Kettunen, Marijn Suijten, Lee Jones,
	Rob Herring, Krzysztof Kozlowski, Stephen Boyd, linux-arm-msm,
	devicetree, linux-kernel

This series adds initial support for the PM6125 PMIC, and its power key
handling and thermal monitoring capabilities are configured for Sony's
PDX201 (Xperia 10II).

One patch for pm660 is included to fix a node address mismatch with its
reg field.

Changes since v2:
- Rebased on v6.0-rc6 to drop dependent DT patches;
- Dropped iio patch which has already been picked into Jonathan's tree;
- Added qcom,pm6125 compatible in new yaml-ified SPMI-PMIC dt-bindings.

v2: https://lore.kernel.org/linux-arm-msm/20220805135729.1037079-1-marijn.suijten@somainline.org/T/#u

Changes since v1:
- Dropped both pinctrl patches that have already been applied;
- Add -us suffix to qcom,hw-settle-time properties on ADC TM5 nodes
  (this suffix is not present on regular ADC5/VADC nodes);
- Add -state suffix to pm6125_gpio pinctrl nodes;
- Use PMIC_GPIO_FUNC_NORMAL instead of the string-literal "normal";
- Removed #address-cells and #size-cells from empty pmic@1 node;
- Removed ADC5_AMUX_THM3 / ADC5_GPIO2_100K_PU channels from the ADC5
  patch, these are unused on my board and hence untested.

v1: https://lore.kernel.org/phone-devel/20220511220613.1015472-1-marijn.suijten@somainline.org/T/#u

Marijn Suijten (5):
  dt-bindings: mfd: qcom-spmi-pmic: Add pm6125 compatible
  arm64: dts: qcom: pm660: Use unique ADC5_VCOIN address in node name
  arm64: dts: qcom: Add PM6125 PMIC
  arm64: dts: qcom: sm6125-seine: Include PM6125 and configure PON
  arm64: dts: qcom: sm6125-seine: Configure additional trinket
    thermistors

 .../bindings/mfd/qcom,spmi-pmic.yaml          |   1 +
 arch/arm64/boot/dts/qcom/pm6125.dtsi          | 154 +++++++++++++++++
 arch/arm64/boot/dts/qcom/pm660.dtsi           |   2 +-
 .../qcom/sm6125-sony-xperia-seine-pdx201.dts  | 162 +++++++++++++++++-
 4 files changed, 317 insertions(+), 2 deletions(-)
 create mode 100644 arch/arm64/boot/dts/qcom/pm6125.dtsi

--
2.37.3


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH v3 1/5] dt-bindings: mfd: qcom-spmi-pmic: Add pm6125 compatible
  2022-09-19 20:48 [PATCH v3 0/5] Add Qcom PM6125 PMIC, and use in Sony Xperia Seine PDX201 Marijn Suijten
@ 2022-09-19 20:48 ` Marijn Suijten
  2022-09-20  8:36   ` Krzysztof Kozlowski
  2022-09-26  7:57   ` Lee Jones
  2022-09-19 20:48 ` [PATCH v3 2/5] arm64: dts: qcom: pm660: Use unique ADC5_VCOIN address in node name Marijn Suijten
                   ` (4 subsequent siblings)
  5 siblings, 2 replies; 9+ messages in thread
From: Marijn Suijten @ 2022-09-19 20:48 UTC (permalink / raw)
  To: phone-devel, Andy Gross, Bjorn Andersson, Konrad Dybcio
  Cc: ~postmarketos/upstreaming, AngeloGioacchino Del Regno,
	Martin Botka, Jami Kettunen, Marijn Suijten, Lee Jones,
	Rob Herring, Krzysztof Kozlowski, Stephen Boyd, linux-arm-msm,
	devicetree, linux-kernel

Document support for the pm6125, typically paired with the sm6125 SoC.

Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>
---
 Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml b/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml
index 65cbc6dee545..a6ee8c7f7738 100644
--- a/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml
+++ b/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml
@@ -35,6 +35,7 @@ properties:
       - enum:
           - qcom,pm660
           - qcom,pm660l
+          - qcom,pm6125
           - qcom,pm6150
           - qcom,pm6150l
           - qcom,pm6350
-- 
2.37.3


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH v3 2/5] arm64: dts: qcom: pm660: Use unique ADC5_VCOIN address in node name
  2022-09-19 20:48 [PATCH v3 0/5] Add Qcom PM6125 PMIC, and use in Sony Xperia Seine PDX201 Marijn Suijten
  2022-09-19 20:48 ` [PATCH v3 1/5] dt-bindings: mfd: qcom-spmi-pmic: Add pm6125 compatible Marijn Suijten
@ 2022-09-19 20:48 ` Marijn Suijten
  2022-09-19 20:48 ` [PATCH v3 3/5] arm64: dts: qcom: Add PM6125 PMIC Marijn Suijten
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 9+ messages in thread
From: Marijn Suijten @ 2022-09-19 20:48 UTC (permalink / raw)
  To: phone-devel, Andy Gross, Bjorn Andersson, Konrad Dybcio
  Cc: ~postmarketos/upstreaming, AngeloGioacchino Del Regno,
	Martin Botka, Jami Kettunen, Marijn Suijten, Lee Jones,
	Rob Herring, Krzysztof Kozlowski, Stephen Boyd, linux-arm-msm,
	devicetree, linux-kernel

The register address in the node name is shadowing vph_pwr@83, whereas
the ADC5_VCOIN register resolves to 0x85.  Fix this copy-paste
discrepancy.

Fixes: 4bf097540506 ("arm64: dts: qcom: pm660: Add VADC and temp alarm nodes")
Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org>
---
 arch/arm64/boot/dts/qcom/pm660.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/pm660.dtsi b/arch/arm64/boot/dts/qcom/pm660.dtsi
index d0eefbb51663..d8c9ece20cd9 100644
--- a/arch/arm64/boot/dts/qcom/pm660.dtsi
+++ b/arch/arm64/boot/dts/qcom/pm660.dtsi
@@ -163,7 +163,7 @@ vadc_vph_pwr: vph_pwr@83 {
 				qcom,pre-scaling = <1 3>;
 			};
 
-			vcoin: vcoin@83 {
+			vcoin: vcoin@85 {
 				reg = <ADC5_VCOIN>;
 				qcom,decimation = <1024>;
 				qcom,pre-scaling = <1 3>;
-- 
2.37.3


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH v3 3/5] arm64: dts: qcom: Add PM6125 PMIC
  2022-09-19 20:48 [PATCH v3 0/5] Add Qcom PM6125 PMIC, and use in Sony Xperia Seine PDX201 Marijn Suijten
  2022-09-19 20:48 ` [PATCH v3 1/5] dt-bindings: mfd: qcom-spmi-pmic: Add pm6125 compatible Marijn Suijten
  2022-09-19 20:48 ` [PATCH v3 2/5] arm64: dts: qcom: pm660: Use unique ADC5_VCOIN address in node name Marijn Suijten
@ 2022-09-19 20:48 ` Marijn Suijten
  2022-09-19 20:48 ` [PATCH v3 4/5] arm64: dts: qcom: sm6125-seine: Include PM6125 and configure PON Marijn Suijten
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 9+ messages in thread
From: Marijn Suijten @ 2022-09-19 20:48 UTC (permalink / raw)
  To: phone-devel, Andy Gross, Bjorn Andersson, Konrad Dybcio
  Cc: ~postmarketos/upstreaming, AngeloGioacchino Del Regno,
	Martin Botka, Jami Kettunen, Marijn Suijten, Lee Jones,
	Rob Herring, Krzysztof Kozlowski, Stephen Boyd, linux-arm-msm,
	devicetree, linux-kernel

This PMIC is commonly used on boards with an SM6125 SoC and looks very
similar in layout to the PM6150.

Downstream declares more nodes to be available, but these have been
omitted from this patch: the pwm/lpg block is unused on my reference
device making it impossible to test/validate, and the spmi-clkdiv does
not have a single device-tree binding using this driver yet, hence
inclusion is better postponed until ie. audio which uses these clocks is
brought up.

Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org>
Reviewed-by: Konrad Dybcio <konrad.dybcio@somainline.org>
---
 arch/arm64/boot/dts/qcom/pm6125.dtsi | 154 +++++++++++++++++++++++++++
 1 file changed, 154 insertions(+)
 create mode 100644 arch/arm64/boot/dts/qcom/pm6125.dtsi

diff --git a/arch/arm64/boot/dts/qcom/pm6125.dtsi b/arch/arm64/boot/dts/qcom/pm6125.dtsi
new file mode 100644
index 000000000000..1c8ccda26ffb
--- /dev/null
+++ b/arch/arm64/boot/dts/qcom/pm6125.dtsi
@@ -0,0 +1,154 @@
+// SPDX-License-Identifier: BSD-3-Clause
+
+#include <dt-bindings/iio/qcom,spmi-vadc.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/input/linux-event-codes.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/spmi/spmi.h>
+
+/ {
+	thermal-zones {
+		pm6125-thermal {
+			polling-delay-passive = <100>;
+			polling-delay = <0>;
+
+			thermal-sensors = <&pm6125_temp>;
+
+			trips {
+				trip0 {
+					temperature = <95000>;
+					hysteresis = <0>;
+					type = "passive";
+				};
+
+				trip1 {
+					temperature = <115000>;
+					hysteresis = <0>;
+					type = "hot";
+				};
+
+				trip2 {
+					temperature = <145000>;
+					hysteresis = <0>;
+					type = "critical";
+				};
+			};
+		};
+	};
+};
+
+&spmi_bus {
+	pmic@0 {
+		compatible = "qcom,pm6125", "qcom,spmi-pmic";
+		reg = <0x0 SPMI_USID>;
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		pm6125_pon: pon@800 {
+			compatible = "qcom,pm8998-pon";
+			reg = <0x800>;
+			mode-bootloader = <0x2>;
+			mode-recovery = <0x1>;
+
+			pon_pwrkey: pwrkey {
+				compatible = "qcom,pm8941-pwrkey";
+				interrupts = <0x0 0x8 0x0 IRQ_TYPE_EDGE_BOTH>;
+				debounce = <15625>;
+				linux,code = <KEY_POWER>;
+				bias-pull-up;
+				status = "disabled";
+			};
+
+			pon_resin: resin {
+				compatible = "qcom,pm8941-resin";
+				interrupts = <0x0 0x8 0x1 IRQ_TYPE_EDGE_BOTH>;
+				debounce = <15625>;
+				bias-pull-up;
+				status = "disabled";
+			};
+		};
+
+		pm6125_temp: temp-alarm@2400 {
+			compatible = "qcom,spmi-temp-alarm";
+			reg = <0x2400>;
+			interrupts = <0x0 0x24 0x0 IRQ_TYPE_EDGE_RISING>;
+			io-channels = <&pm6125_adc ADC5_DIE_TEMP>;
+			io-channel-names = "thermal";
+			#thermal-sensor-cells = <0>;
+		};
+
+		pm6125_adc: adc@3100 {
+			compatible = "qcom,spmi-adc5";
+			reg = <0x3100>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
+			#io-channel-cells = <1>;
+
+			ref-gnd@0 {
+				reg = <ADC5_REF_GND>;
+				qcom,pre-scaling = <1 1>;
+			};
+
+			vref-1p25@1 {
+				reg = <ADC5_1P25VREF>;
+				qcom,pre-scaling = <1 1>;
+			};
+
+			die-temp@6 {
+				reg = <ADC5_DIE_TEMP>;
+				qcom,pre-scaling = <1 1>;
+			};
+
+			vph-pwr@83 {
+				reg = <ADC5_VPH_PWR>;
+				qcom,pre-scaling = <1 3>;
+			};
+
+			vcoin@85 {
+				reg = <ADC5_VCOIN>;
+				qcom,pre-scaling = <1 3>;
+			};
+
+			xo-therm@4c {
+				reg = <ADC5_XO_THERM_100K_PU>;
+				qcom,pre-scaling = <1 1>;
+				qcom,hw-settle-time = <200>;
+				qcom,ratiometric;
+			};
+		};
+
+		pm6125_adc_tm: adc-tm@3500 {
+			compatible = "qcom,spmi-adc-tm5";
+			reg = <0x3500>;
+			interrupts = <0x0 0x35 0x0 IRQ_TYPE_EDGE_RISING>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			#thermal-sensor-cells = <1>;
+			status = "disabled";
+		};
+
+		pm6125_rtc: rtc@6000 {
+			compatible = "qcom,pm8941-rtc";
+			reg = <0x6000>, <0x6100>;
+			reg-names = "rtc", "alarm";
+			interrupts = <0x0 0x61 0x1 IRQ_TYPE_EDGE_RISING>;
+			status = "disabled";
+		};
+
+		pm6125_gpio: gpio@c000 {
+			compatible = "qcom,pm6125-gpio", "qcom,spmi-gpio";
+			reg = <0xc000>;
+			gpio-controller;
+			gpio-ranges = <&pm6125_gpio 0 0 9>;
+			#gpio-cells = <2>;
+			interrupt-controller;
+			#interrupt-cells = <2>;
+		};
+	};
+
+	pmic@1 {
+		compatible = "qcom,pm6125", "qcom,spmi-pmic";
+		reg = <0x1 SPMI_USID>;
+	};
+};
-- 
2.37.3


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH v3 4/5] arm64: dts: qcom: sm6125-seine: Include PM6125 and configure PON
  2022-09-19 20:48 [PATCH v3 0/5] Add Qcom PM6125 PMIC, and use in Sony Xperia Seine PDX201 Marijn Suijten
                   ` (2 preceding siblings ...)
  2022-09-19 20:48 ` [PATCH v3 3/5] arm64: dts: qcom: Add PM6125 PMIC Marijn Suijten
@ 2022-09-19 20:48 ` Marijn Suijten
  2022-09-19 20:48 ` [PATCH v3 5/5] arm64: dts: qcom: sm6125-seine: Configure additional trinket thermistors Marijn Suijten
  2022-09-19 21:00 ` [PATCH v3 0/5] Add Qcom PM6125 PMIC, and use in Sony Xperia Seine PDX201 Marijn Suijten
  5 siblings, 0 replies; 9+ messages in thread
From: Marijn Suijten @ 2022-09-19 20:48 UTC (permalink / raw)
  To: phone-devel, Andy Gross, Bjorn Andersson, Konrad Dybcio
  Cc: ~postmarketos/upstreaming, AngeloGioacchino Del Regno,
	Martin Botka, Jami Kettunen, Marijn Suijten, Lee Jones,
	Rob Herring, Krzysztof Kozlowski, Stephen Boyd, linux-arm-msm,
	devicetree, linux-kernel

The Sony Xperia Seine board uses the PM6125; include it and configure
the PON buttons that provide the power and volume-up key.

Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org>
---
 .../boot/dts/qcom/sm6125-sony-xperia-seine-pdx201.dts | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/sm6125-sony-xperia-seine-pdx201.dts b/arch/arm64/boot/dts/qcom/sm6125-sony-xperia-seine-pdx201.dts
index 0aad2e94e757..e01ea35f9a62 100644
--- a/arch/arm64/boot/dts/qcom/sm6125-sony-xperia-seine-pdx201.dts
+++ b/arch/arm64/boot/dts/qcom/sm6125-sony-xperia-seine-pdx201.dts
@@ -6,8 +6,8 @@
 /dts-v1/;
 
 #include "sm6125.dtsi"
+#include "pm6125.dtsi"
 #include <dt-bindings/gpio/gpio.h>
-#include <dt-bindings/input/input.h>
 #include <dt-bindings/input/gpio-keys.h>
 
 / {
@@ -86,6 +86,15 @@ &hsusb_phy1 {
 	status = "okay";
 };
 
+&pon_pwrkey {
+	status = "okay";
+};
+
+&pon_resin {
+	status = "okay";
+	linux,code = <KEY_VOLUMEUP>;
+};
+
 &sdc2_off_state {
 	sd-cd {
 		pins = "gpio98";
-- 
2.37.3


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH v3 5/5] arm64: dts: qcom: sm6125-seine: Configure additional trinket thermistors
  2022-09-19 20:48 [PATCH v3 0/5] Add Qcom PM6125 PMIC, and use in Sony Xperia Seine PDX201 Marijn Suijten
                   ` (3 preceding siblings ...)
  2022-09-19 20:48 ` [PATCH v3 4/5] arm64: dts: qcom: sm6125-seine: Include PM6125 and configure PON Marijn Suijten
@ 2022-09-19 20:48 ` Marijn Suijten
  2022-09-19 21:00 ` [PATCH v3 0/5] Add Qcom PM6125 PMIC, and use in Sony Xperia Seine PDX201 Marijn Suijten
  5 siblings, 0 replies; 9+ messages in thread
From: Marijn Suijten @ 2022-09-19 20:48 UTC (permalink / raw)
  To: phone-devel, Andy Gross, Bjorn Andersson, Konrad Dybcio
  Cc: ~postmarketos/upstreaming, AngeloGioacchino Del Regno,
	Martin Botka, Jami Kettunen, Marijn Suijten, Lee Jones,
	Rob Herring, Krzysztof Kozlowski, Stephen Boyd, linux-arm-msm,
	devicetree, linux-kernel

In addition to PMIC-specific (pm6125) thermistors downstream extends
this set with the rf-pa0/rf-pa1, quiet, camera-flash and UFS/eMMC
thermistors in sm6125 (trinket) board and seine-specific DT files.  All
thermistors report sensible temperature readings in userspace.

The sensors are also added to their respective Thermal Monitor node,
with thermal zones to match where applicable: emmc-ufs and camera-flash
are not available on the TM5 block, hence cannot be configured with a
tripping point and will not have a thermal zone.

Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org>
---
 .../qcom/sm6125-sony-xperia-seine-pdx201.dts  | 151 ++++++++++++++++++
 1 file changed, 151 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sm6125-sony-xperia-seine-pdx201.dts b/arch/arm64/boot/dts/qcom/sm6125-sony-xperia-seine-pdx201.dts
index e01ea35f9a62..5d41def2ccc9 100644
--- a/arch/arm64/boot/dts/qcom/sm6125-sony-xperia-seine-pdx201.dts
+++ b/arch/arm64/boot/dts/qcom/sm6125-sony-xperia-seine-pdx201.dts
@@ -9,6 +9,7 @@
 #include "pm6125.dtsi"
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/gpio-keys.h>
+#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
 
 / {
 	/* required for bootloader to select correct board */
@@ -80,12 +81,162 @@ cmdline_mem: memory@ffd00000 {
 			no-map;
 		};
 	};
+
+	thermal-zones {
+		rf-pa0-thermal {
+			polling-delay-passive = <0>;
+			polling-delay = <0>;
+			thermal-sensors = <&pm6125_adc_tm 0>;
+
+			trips {
+				active-config0 {
+					temperature = <125000>;
+					hysteresis = <1000>;
+					type = "critical";
+				};
+			};
+		};
+
+		quiet-thermal {
+			polling-delay-passive = <0>;
+			polling-delay = <5000>;
+			thermal-sensors = <&pm6125_adc_tm 1>;
+
+			trips {
+				active-config0 {
+					temperature = <125000>;
+					hysteresis = <1000>;
+					type = "critical";
+				};
+			};
+		};
+
+		xo-thermal {
+			polling-delay-passive = <0>;
+			polling-delay = <0>;
+			thermal-sensors = <&pm6125_adc_tm 2>;
+
+			trips {
+				active-config0 {
+					temperature = <125000>;
+					hysteresis = <1000>;
+					type = "critical";
+				};
+			};
+		};
+
+		rf-pa1-thermal {
+			polling-delay-passive = <0>;
+			polling-delay = <0>;
+			thermal-sensors = <&pm6125_adc_tm 3>;
+
+			trips {
+				active-config0 {
+					temperature = <125000>;
+					hysteresis = <1000>;
+					type = "critical";
+				};
+			};
+		};
+	};
 };
 
 &hsusb_phy1 {
 	status = "okay";
 };
 
+&pm6125_adc {
+	pinctrl-names = "default";
+	pinctrl-0 = <&camera_flash_therm &emmc_ufs_therm &rf_pa1_therm>;
+
+	rf-pa0-therm@4d {
+		reg = <ADC5_AMUX_THM1_100K_PU>;
+		qcom,ratiometric;
+		qcom,hw-settle-time = <200>;
+		qcom,pre-scaling = <1 1>;
+	};
+
+	quiet-therm@4e {
+		reg = <ADC5_AMUX_THM2_100K_PU>;
+		qcom,ratiometric;
+		qcom,hw-settle-time = <200>;
+		qcom,pre-scaling = <1 1>;
+	};
+
+	camera-flash-therm@52 {
+		reg = <ADC5_GPIO1_100K_PU>;
+		qcom,ratiometric;
+		qcom,hw-settle-time = <200>;
+		qcom,pre-scaling = <1 1>;
+	};
+
+	emmc-ufs-therm@54 {
+		reg = <ADC5_GPIO3_100K_PU>;
+		qcom,ratiometric;
+		qcom,hw-settle-time = <200>;
+		qcom,pre-scaling = <1 1>;
+	};
+
+	rf-pa1-therm@55 {
+		reg = <ADC5_GPIO4_100K_PU>;
+		qcom,ratiometric;
+		qcom,hw-settle-time = <200>;
+		qcom,pre-scaling = <1 1>;
+	};
+};
+
+&pm6125_adc_tm {
+	status = "okay";
+
+	rf-pa0-therm@0 {
+		reg = <0>;
+		io-channels = <&pm6125_adc ADC5_AMUX_THM1_100K_PU>;
+		qcom,ratiometric;
+		qcom,hw-settle-time-us = <200>;
+	};
+
+	quiet-therm@1 {
+		reg = <1>;
+		io-channels = <&pm6125_adc ADC5_AMUX_THM2_100K_PU>;
+		qcom,ratiometric;
+		qcom,hw-settle-time-us = <200>;
+	};
+
+	xo-therm@2 {
+		reg = <2>;
+		io-channels = <&pm6125_adc ADC5_XO_THERM_100K_PU>;
+		qcom,ratiometric;
+		qcom,hw-settle-time-us = <200>;
+	};
+
+	rf-pa1-therm@3 {
+		reg = <3>;
+		io-channels = <&pm6125_adc ADC5_GPIO4_100K_PU>;
+		qcom,ratiometric;
+		qcom,hw-settle-time-us = <200>;
+	};
+};
+
+&pm6125_gpio {
+	camera_flash_therm: camera-flash-therm-state {
+		pins = "gpio3";
+		function = PMIC_GPIO_FUNC_NORMAL;
+		bias-high-impedance;
+	};
+
+	emmc_ufs_therm: emmc-ufs-therm-state {
+		pins = "gpio6";
+		function = PMIC_GPIO_FUNC_NORMAL;
+		bias-high-impedance;
+	};
+
+	rf_pa1_therm: rf-pa1-therm-state {
+		pins = "gpio7";
+		function = PMIC_GPIO_FUNC_NORMAL;
+		bias-high-impedance;
+	};
+};
+
 &pon_pwrkey {
 	status = "okay";
 };
-- 
2.37.3


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH v3 0/5] Add Qcom PM6125 PMIC, and use in Sony Xperia Seine PDX201
  2022-09-19 20:48 [PATCH v3 0/5] Add Qcom PM6125 PMIC, and use in Sony Xperia Seine PDX201 Marijn Suijten
                   ` (4 preceding siblings ...)
  2022-09-19 20:48 ` [PATCH v3 5/5] arm64: dts: qcom: sm6125-seine: Configure additional trinket thermistors Marijn Suijten
@ 2022-09-19 21:00 ` Marijn Suijten
  5 siblings, 0 replies; 9+ messages in thread
From: Marijn Suijten @ 2022-09-19 21:00 UTC (permalink / raw)
  To: phone-devel, Andy Gross, Bjorn Andersson, Konrad Dybcio
  Cc: ~postmarketos/upstreaming, AngeloGioacchino Del Regno,
	Martin Botka, Jami Kettunen, Lee Jones, Rob Herring,
	Krzysztof Kozlowski, Stephen Boyd, linux-arm-msm, devicetree,
	linux-kernel

On 2022-09-19 22:48:21, Marijn Suijten wrote:
> This series adds initial support for the PM6125 PMIC, and its power key
> handling and thermal monitoring capabilities are configured for Sony's
> PDX201 (Xperia 10II).
> 
> One patch for pm660 is included to fix a node address mismatch with its
> reg field.
> 
> Changes since v2:
> - Rebased on v6.0-rc6 to drop dependent DT patches;
> - Dropped iio patch which has already been picked into Jonathan's tree;
> - Added qcom,pm6125 compatible in new yaml-ified SPMI-PMIC dt-bindings.

And

    - Renamed `pm6125_gpio: gpios@c000` node to `gpio`;

of course, as requested by Krzysztof.

- Marijn

> 
> v2: https://lore.kernel.org/linux-arm-msm/20220805135729.1037079-1-marijn.suijten@somainline.org/T/#u
> 
> Changes since v1:
> - Dropped both pinctrl patches that have already been applied;
> - Add -us suffix to qcom,hw-settle-time properties on ADC TM5 nodes
>   (this suffix is not present on regular ADC5/VADC nodes);
> - Add -state suffix to pm6125_gpio pinctrl nodes;
> - Use PMIC_GPIO_FUNC_NORMAL instead of the string-literal "normal";
> - Removed #address-cells and #size-cells from empty pmic@1 node;
> - Removed ADC5_AMUX_THM3 / ADC5_GPIO2_100K_PU channels from the ADC5
>   patch, these are unused on my board and hence untested.
> 
> v1: https://lore.kernel.org/phone-devel/20220511220613.1015472-1-marijn.suijten@somainline.org/T/#u
> 
> Marijn Suijten (5):
>   dt-bindings: mfd: qcom-spmi-pmic: Add pm6125 compatible
>   arm64: dts: qcom: pm660: Use unique ADC5_VCOIN address in node name
>   arm64: dts: qcom: Add PM6125 PMIC
>   arm64: dts: qcom: sm6125-seine: Include PM6125 and configure PON
>   arm64: dts: qcom: sm6125-seine: Configure additional trinket
>     thermistors
> 
>  .../bindings/mfd/qcom,spmi-pmic.yaml          |   1 +
>  arch/arm64/boot/dts/qcom/pm6125.dtsi          | 154 +++++++++++++++++
>  arch/arm64/boot/dts/qcom/pm660.dtsi           |   2 +-
>  .../qcom/sm6125-sony-xperia-seine-pdx201.dts  | 162 +++++++++++++++++-
>  4 files changed, 317 insertions(+), 2 deletions(-)
>  create mode 100644 arch/arm64/boot/dts/qcom/pm6125.dtsi
> 
> --
> 2.37.3
> 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v3 1/5] dt-bindings: mfd: qcom-spmi-pmic: Add pm6125 compatible
  2022-09-19 20:48 ` [PATCH v3 1/5] dt-bindings: mfd: qcom-spmi-pmic: Add pm6125 compatible Marijn Suijten
@ 2022-09-20  8:36   ` Krzysztof Kozlowski
  2022-09-26  7:57   ` Lee Jones
  1 sibling, 0 replies; 9+ messages in thread
From: Krzysztof Kozlowski @ 2022-09-20  8:36 UTC (permalink / raw)
  To: Marijn Suijten, phone-devel, Andy Gross, Bjorn Andersson, Konrad Dybcio
  Cc: ~postmarketos/upstreaming, AngeloGioacchino Del Regno,
	Martin Botka, Jami Kettunen, Lee Jones, Rob Herring,
	Krzysztof Kozlowski, Stephen Boyd, linux-arm-msm, devicetree,
	linux-kernel

On 19/09/2022 22:48, Marijn Suijten wrote:
> Document support for the pm6125, typically paired with the sm6125 SoC.
> 
> Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>


Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>


Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v3 1/5] dt-bindings: mfd: qcom-spmi-pmic: Add pm6125 compatible
  2022-09-19 20:48 ` [PATCH v3 1/5] dt-bindings: mfd: qcom-spmi-pmic: Add pm6125 compatible Marijn Suijten
  2022-09-20  8:36   ` Krzysztof Kozlowski
@ 2022-09-26  7:57   ` Lee Jones
  1 sibling, 0 replies; 9+ messages in thread
From: Lee Jones @ 2022-09-26  7:57 UTC (permalink / raw)
  To: Marijn Suijten
  Cc: phone-devel, Andy Gross, Bjorn Andersson, Konrad Dybcio,
	~postmarketos/upstreaming, AngeloGioacchino Del Regno,
	Martin Botka, Jami Kettunen, Rob Herring, Krzysztof Kozlowski,
	Stephen Boyd, linux-arm-msm, devicetree, linux-kernel

On Mon, 19 Sep 2022, Marijn Suijten wrote:

> Document support for the pm6125, typically paired with the sm6125 SoC.
> 
> Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>
> ---
>  Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml | 1 +
>  1 file changed, 1 insertion(+)

Doesn't apply cleanly.  Please rebase.

> diff --git a/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml b/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml
> index 65cbc6dee545..a6ee8c7f7738 100644
> --- a/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml
> +++ b/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml
> @@ -35,6 +35,7 @@ properties:
>        - enum:
>            - qcom,pm660
>            - qcom,pm660l
> +          - qcom,pm6125
>            - qcom,pm6150
>            - qcom,pm6150l
>            - qcom,pm6350

-- 
Lee Jones [李琼斯]

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2022-09-26  8:00 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-19 20:48 [PATCH v3 0/5] Add Qcom PM6125 PMIC, and use in Sony Xperia Seine PDX201 Marijn Suijten
2022-09-19 20:48 ` [PATCH v3 1/5] dt-bindings: mfd: qcom-spmi-pmic: Add pm6125 compatible Marijn Suijten
2022-09-20  8:36   ` Krzysztof Kozlowski
2022-09-26  7:57   ` Lee Jones
2022-09-19 20:48 ` [PATCH v3 2/5] arm64: dts: qcom: pm660: Use unique ADC5_VCOIN address in node name Marijn Suijten
2022-09-19 20:48 ` [PATCH v3 3/5] arm64: dts: qcom: Add PM6125 PMIC Marijn Suijten
2022-09-19 20:48 ` [PATCH v3 4/5] arm64: dts: qcom: sm6125-seine: Include PM6125 and configure PON Marijn Suijten
2022-09-19 20:48 ` [PATCH v3 5/5] arm64: dts: qcom: sm6125-seine: Configure additional trinket thermistors Marijn Suijten
2022-09-19 21:00 ` [PATCH v3 0/5] Add Qcom PM6125 PMIC, and use in Sony Xperia Seine PDX201 Marijn Suijten

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.