1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Google Trogdor dts fragment for the boards with Parade ps8640 edp bridge
4 *
5 * Copyright 2021 Google LLC.
6 */
7
8#include <dt-bindings/gpio/gpio.h>
9
10/ {
11	pp3300_brij_ps8640: pp3300-brij-ps8640 {
12		compatible = "regulator-fixed";
13		status = "okay";
14		regulator-name = "pp3300_brij_ps8640";
15
16		regulator-min-microvolt = <3300000>;
17		regulator-max-microvolt = <3300000>;
18
19		gpio = <&tlmm 32 GPIO_ACTIVE_HIGH>;
20		enable-active-high;
21
22		pinctrl-names = "default";
23		pinctrl-0 = <&en_pp3300_edp_brij_ps8640>;
24
25		vin-supply = <&pp3300_a>;
26	};
27};
28
29&dsi0_out {
30	remote-endpoint = <&ps8640_in>;
31};
32
33edp_brij_i2c: &i2c2 {
34	status = "okay";
35	clock-frequency = <400000>;
36
37	ps8640_bridge: bridge@8 {
38		compatible = "parade,ps8640";
39		reg = <0x8>;
40
41		powerdown-gpios = <&tlmm 104 GPIO_ACTIVE_LOW>;
42		reset-gpios = <&tlmm 11 GPIO_ACTIVE_LOW>;
43
44		pinctrl-names = "default";
45		pinctrl-0 = <&edp_brij_en>, <&edp_brij_ps8640_rst>;
46
47		vdd12-supply = <&pp1200_brij>;
48		vdd33-supply = <&pp3300_brij_ps8640>;
49
50		ports {
51			#address-cells = <1>;
52			#size-cells = <0>;
53
54			port@0 {
55				reg = <0>;
56				ps8640_in: endpoint {
57					remote-endpoint = <&dsi0_out>;
58				};
59			};
60
61			port@1 {
62				reg = <1>;
63				ps8640_out: endpoint {
64					remote-endpoint = <&panel_in_edp>;
65				};
66			};
67		};
68
69		aux-bus {
70			panel: panel {
71				/* Compatible will be filled in per-board */
72				power-supply = <&pp3300_dx_edp>;
73				backlight = <&backlight>;
74
75				port {
76					panel_in_edp: endpoint {
77						remote-endpoint = <&ps8640_out>;
78					};
79				};
80			};
81		};
82	};
83};
84
85&tlmm {
86	edp_brij_ps8640_rst: edp-brij-ps8640-rst {
87		pinmux {
88			pins = "gpio11";
89			function = "gpio";
90		};
91
92		pinconf {
93			pins = "gpio11";
94			drive-strength = <2>;
95			bias-disable;
96		};
97	};
98
99	en_pp3300_edp_brij_ps8640: en-pp3300-edp-brij-ps8640 {
100		pinmux {
101			pins = "gpio32";
102			function = "gpio";
103		};
104
105		pinconf {
106			pins = "gpio32";
107			drive-strength = <2>;
108			bias-disable;
109		};
110	};
111};
112