summaryrefslogtreecommitdiff
path: root/dts/gs201-felix-wcharger.dtsi
blob: 087b07785e90f5a6a4133ab151d0eb73d5e8d31c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Wireless Charger device tree entries.
 *
 * Copyright 2022 Google Inc.
 */

#include <dt-bindings/pinctrl/samsung.h>
#include <dt-bindings/interrupt-controller/irq.h>

/ {
	fragment@wlc {
		target-path = "/";
		__overlay__ {
			google,charger {
				google,wlc-power-supply = "wireless";
			};
		};
	};
};

&pinctrl_0 {
	/* XIENT_25 P9412 Wireless Charger Interrupt */
	wc_irq: wc_irq {
		samsung,pins = "gpa9-5"; /* QI_INT_R */
		samsung,pin-function = <EXYNOS_PIN_FUNC_EINT>;
		samsung,pin-pud = <EXYNOS_PIN_PULL_UP>;
		samsung,pin-drv = <GS101_PIN_DRV_2_5_MA>;
	};
};

&pinctrl_4 {
	/* XAPC_GPIO0 P9412 Wireless Charger Enable */
	wc_en: wc_en {
		samsung,pins = "gpp0-0"; /* QI_EN_L */
		samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>;
		samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
		samsung,pin-con-pdn = <EXYNOS_PIN_PDN_PREV>;
		samsung,pin-pud-pdn = <EXYNOS_PIN_PULL_NONE>;
	};
};

&hsi2c_15 {
	p9222@61 {
		dev-name = "p9222";
		compatible = "idt,p9222";
		reg = <0x61>;
		status = "ok";

		/* Support p9412 GPIO */
		idt,has_p9412_gpio;

		idt,has_rtx = <0>;

		google,power_mitigate_threshold = <90>;
		google,has-sw-ramp;
		google,epp_dcicl_default_ma = <750000>;

		pinctrl-names = "default";
		pinctrl-0 = <&wc_irq &wc_en>;

		idt,gpio_wlc_en = <&gpp0 0 GPIO_ACTIVE_LOW>;
		idt,gpio_qi_vbus_en = <&s2mpg12_gpio 2 GPIO_ACTIVE_HIGH>;
		idt,gpio_qien = <&gpp0 0 GPIO_ACTIVE_LOW>;
		idt,irq_gpio = <&gpa9 5 GPIO_ACTIVE_LOW>;
		idt,gpio_slct = <&s2mpg12_gpio 0 GPIO_ACTIVE_HIGH>;
		idt,gpio_slct_value = <0>;
		idt,max_vout_mv = <10000>;  /* max voltage in mV */
		google,epp_rp_value = <11000>; /* mW */
		google,epp_rp_low_value = <10000>; /* mW */

		google,q_value = <37>;
		fod = [A8 24 88 29 A3 04 92 24 A1 F8 A0 01 01 01 FF 19];
		fod_epp = [8B 60 99 21 95 20 98 0E 95 14 97 0B 01 01 FF 19];
		fod_epp_comp = [99 7f 99 7f 95 7e 98 6c 95 72 97 69 01 01 FF 19];
		google,fod_fsw_base;
		google,fod_fsw_high_thres = <141>;
		google,fod_fsw_low_thres = <140>;
		google,light_load;      /* Calibration light load */
		google,ll-bpp-vout-not-set;
		google,bpp-cep-on-dl;

		google,alignment_scalar_low_current = <200>;
		google,alignment_scalar_high_current = <100>;
		google,alignment_offset_low_current = <129000>;
		google,alignment_offset_high_current = <139000>;
		google,alignment_current_threshold = <500>;

		p9xxx_gpio: p9xxx_gpio {
			gpio-controller;
			#gpio-cells = <2>;
			ngpios = <16>;
		};
	};
};