Skip to content

Commit 8deaddf

Browse files
andredkrzk
authored andcommitted
arm64: dts: exynos: gs101-pixel-common: add Maxim MAX77759 PMIC
On Pixel 6 (and Pro), a MAX77759 companion PMIC for USB Type-C applications is used, which contains four functional blocks (at distinct I2C addresses): * top (including GPIO & NVMEM) * charger * fuel gauge * TCPCi This change adds the PMIC and the subnodes for the GPIO expander and NVMEM, and defines the NVMEM layout. The NVMEM layout is declared such that it matches downstream's open-coded configuration [1]. Note: The pinctrl nodes are kept sorted by the 'samsung,pins' property rather than node name, as I think that makes it easier to look at and to add new nodes unambiguously in the future. Its label is prefixed with 'if' (for interface), because there are three PMICs in total in use on Pixel 6 (Pro). Link: https://android.googlesource.com/kernel/google-modules/bms/+/96e729a83817/max77759_maxq.c#67 [1] Signed-off-by: André Draszik <[email protected]> Reviewed-by: Peter Griffin <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Krzysztof Kozlowski <[email protected]>
1 parent 42873b1 commit 8deaddf

File tree

1 file changed

+61
-0
lines changed

1 file changed

+61
-0
lines changed

arch/arm64/boot/dts/exynos/google/gs101-pixel-common.dtsi

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,60 @@
188188
};
189189
};
190190
};
191+
192+
pmic@66 {
193+
compatible = "maxim,max77759";
194+
reg = <0x66>;
195+
196+
pinctrl-0 = <&if_pmic_int>;
197+
pinctrl-names = "default";
198+
interrupts-extended = <&gpa8 3 IRQ_TYPE_LEVEL_LOW>;
199+
200+
interrupt-controller;
201+
#interrupt-cells = <2>;
202+
203+
gpio {
204+
compatible = "maxim,max77759-gpio";
205+
206+
gpio-controller;
207+
#gpio-cells = <2>;
208+
/*
209+
* "Human-readable name [SIGNAL_LABEL]" where the
210+
* latter comes from the schematic
211+
*/
212+
gpio-line-names = "OTG boost [OTG_BOOST_EN]",
213+
"max20339 IRQ [MW_OVP_INT_L]";
214+
215+
interrupt-controller;
216+
#interrupt-cells = <2>;
217+
};
218+
219+
nvmem-0 {
220+
compatible = "maxim,max77759-nvmem";
221+
222+
nvmem-layout {
223+
compatible = "fixed-layout";
224+
#address-cells = <1>;
225+
#size-cells = <1>;
226+
227+
reboot-mode@0 {
228+
reg = <0x0 0x4>;
229+
};
230+
231+
boot-reason@4 {
232+
reg = <0x4 0x4>;
233+
};
234+
235+
shutdown-user-flag@8 {
236+
reg = <0x8 0x1>;
237+
};
238+
239+
rsoc@a {
240+
reg = <0xa 0x2>;
241+
};
242+
};
243+
};
244+
};
191245
};
192246

193247
&pinctrl_far_alive {
@@ -211,6 +265,13 @@
211265
samsung,pin-pud = <GS101_PIN_PULL_UP>;
212266
samsung,pin-drv = <GS101_PIN_DRV_2_5_MA>;
213267
};
268+
269+
if_pmic_int: if-pmic-int-pins {
270+
samsung,pins = "gpa8-3";
271+
samsung,pin-function = <GS101_PIN_FUNC_EINT>;
272+
samsung,pin-pud = <GS101_PIN_PULL_UP>;
273+
samsung,pin-drv = <GS101_PIN_DRV_2_5_MA>;
274+
};
214275
};
215276

216277
&pinctrl_gpio_alive {

0 commit comments

Comments
 (0)