aboutsummaryrefslogtreecommitdiff
path: root/dts/upstream/src/arm64/qcom/sc7180-trogdor-parade-ps8640.dtsi
blob: bede23369fedec7daae7bb163a7f688ef9d9169a (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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
 * Google Trogdor dts fragment for the boards with Parade ps8640 edp bridge
 *
 * Copyright 2021 Google LLC.
 */

#include <dt-bindings/gpio/gpio.h>

/ {
	pp3300_brij_ps8640: pp3300-brij-ps8640-regulator {
		compatible = "regulator-fixed";
		status = "okay";
		regulator-name = "pp3300_brij_ps8640";

		regulator-min-microvolt = <3300000>;
		regulator-max-microvolt = <3300000>;

		gpio = <&tlmm 32 GPIO_ACTIVE_HIGH>;
		enable-active-high;

		pinctrl-names = "default";
		pinctrl-0 = <&en_pp3300_edp_brij_ps8640>;

		vin-supply = <&pp3300_a>;
	};
};

/*
 * ADDITIONS TO FIXED REGULATORS DEFINED IN PARENT DEVICE TREE FILES
 *
 * Sort order matches the order in the parent files (parents before children).
 */

&pp3300_dx_edp {
	off-on-delay-us = <500000>;

	/*
	 * It's nicer to start with this regulator enabled. The
	 * bootloader may have left it on and it's nice not to cause an
	 * extra power cycle of the touchscreen and eDP panel at bootup.
	 * This should help speed bootup because we have off-on-delay-us.
	 */
	regulator-boot-on;
};

/* ADDITIONS TO NODES DEFINED IN PARENT DEVICE TREE FILES */

edp_brij_i2c: &i2c2 {
	status = "okay";
	clock-frequency = <400000>;

	ps8640_bridge: bridge@8 {
		compatible = "parade,ps8640";
		reg = <0x8>;

		powerdown-gpios = <&tlmm 104 GPIO_ACTIVE_LOW>;
		reset-gpios = <&tlmm 11 GPIO_ACTIVE_LOW>;

		pinctrl-names = "default";
		pinctrl-0 = <&edp_brij_en>, <&edp_brij_ps8640_rst>;

		vdd12-supply = <&pp1200_brij>;
		vdd33-supply = <&pp3300_brij_ps8640>;

		ports {
			#address-cells = <1>;
			#size-cells = <0>;

			port@0 {
				reg = <0>;
				ps8640_in: endpoint {
					remote-endpoint = <&mdss_dsi0_out>;
				};
			};

			port@1 {
				reg = <1>;
				ps8640_out: endpoint {
					remote-endpoint = <&panel_in_edp>;
				};
			};
		};

		aux-bus {
			panel: panel {
				/* Compatible will be filled in per-board */
				power-supply = <&pp3300_dx_edp>;
				backlight = <&backlight>;

				port {
					panel_in_edp: endpoint {
						remote-endpoint = <&ps8640_out>;
					};
				};
			};
		};
	};
};

&mdss_dsi0_out {
	remote-endpoint = <&ps8640_in>;
};

&tlmm {
	edp_brij_ps8640_rst: edp-brij-ps8640-rst-state {
		pins = "gpio11";
		function = "gpio";
		drive-strength = <2>;
		bias-disable;
	};

	en_pp3300_edp_brij_ps8640: en-pp3300-edp-brij-ps8640-state {
		pins = "gpio32";
		function = "gpio";
		drive-strength = <2>;
		bias-disable;
	};
};