[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240916-max20339-dts-v1-2-2f7ed7c24e83@linaro.org>
Date: Mon, 16 Sep 2024 17:58:27 +0100
From: André Draszik <andre.draszik@...aro.org>
To: Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will@...nel.org>, Peter Griffin <peter.griffin@...aro.org>,
Rob Herring <robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>, Alim Akhtar <alim.akhtar@...sung.com>
Cc: Tudor Ambarus <tudor.ambarus@...aro.org>,
Will McVicker <willmcvicker@...gle.com>, kernel-team@...roid.com,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
linux-samsung-soc@...r.kernel.org, devicetree@...r.kernel.org,
André Draszik <andre.draszik@...aro.org>
Subject: [PATCH 2/3] arm64: dts: exynos: gs101-oriole: enable max20339 OVP
Enable the Maxim max20339 OVP with load switches.
This is the first device behind the USB plug and can gate all incoming
power as well as protecting the input path from overvoltages.
Its load switches are used for wireless charging and for OTG.
Regulator and GPIO line names have been chosen to match the schematic.
Note that its interrupt line is connected to a Maxim max77759 and
supplies are connected to a PMIC and to a boost regulator controlled by
that PMIC, none of which we have drivers or DTS entries for at this
stage, so those parts have been left out.
Signed-off-by: André Draszik <andre.draszik@...aro.org>
---
arch/arm64/boot/dts/exynos/google/gs101-oriole.dts | 51 ++++++++++++++++++++++
1 file changed, 51 insertions(+)
diff --git a/arch/arm64/boot/dts/exynos/google/gs101-oriole.dts b/arch/arm64/boot/dts/exynos/google/gs101-oriole.dts
index 387fb779bd29..a3276aa91091 100644
--- a/arch/arm64/boot/dts/exynos/google/gs101-oriole.dts
+++ b/arch/arm64/boot/dts/exynos/google/gs101-oriole.dts
@@ -68,6 +68,12 @@ ufs_0_fixed_vcc_reg: regulator-1 {
regulator-boot-on;
enable-active-high;
};
+
+ /* This represents Vbus coming from the USB Type-C connector */
+ reg_src_ppvar_usbc_vbus: regulator-src-ppvar-usbc-vbus {
+ compatible = "regulator-fixed";
+ regulator-name = "src_ppvar_usbc_vbus";
+ };
};
&ext_24_5m {
@@ -90,6 +96,51 @@ eeprom: eeprom@50 {
&hsi2c_12 {
status = "okay";
/* TODO: add the devices once drivers exist */
+
+ ovp: ovp@35 {
+ compatible = "maxim,max20339";
+ reg = <0x35>;
+ /* TODO: add interrupt once driver for max77759-gpio exists */
+ /* TODO: Update this once PMIC is implemented (PP1800_L2M_ALIVE) */
+ dig-supply = <®_placeholder>;
+
+ insw-supply = <®_src_ppvar_usbc_vbus>;
+ /* TODO: update this once boost regulator exists */
+ lsw1-supply = <®_placeholder>;
+ lsw2-supply = <®_placeholder>;
+
+ gpio {
+ gpio-controller;
+ #gpio-cells = <2>;
+ /*
+ * "Human-readable name [SIGNAL_LABEL]" where the
+ * latter comes from the schematic
+ */
+ gpio-line-names = "Vin valid [SRC_PPVAR_USBC_VBUS]";
+ };
+
+ regulators {
+ insw_reg: insw {
+ regulator-name = "PPVAR_VBUS_OVP";
+ regulator-active-discharge = <0>;
+ regulator-min-microvolt = <5850000>;
+ regulator-max-microvolt = <14500000>;
+ regulator-ov-protection-microvolt = <14500000>;
+ };
+ lsw1_reg: lsw1 {
+ regulator-name = "PPVAR_VBUS_OVP_LSW1";
+ regulator-oc-protection-microamp = <1460000>;
+ regulator-ov-protection-microvolt = <1>;
+ shunt-resistor-micro-ohms = <120000000>;
+ };
+ lsw2_reg: lsw2 {
+ regulator-name = "PPVAR_QI_VOUT_TX";
+ regulator-oc-protection-microamp = <1230000>;
+ regulator-ov-protection-microvolt = <1>;
+ shunt-resistor-micro-ohms = <143000000>;
+ };
+ };
+ };
};
&pinctrl_far_alive {
--
2.46.0.662.g92d0881bb0-goog
Powered by blists - more mailing lists