xref: /freebsd/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-ti-sn65dsi86.dtsi (revision fac71e4e09885bb2afa3d984a0c239a52e1a7418)
1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Google Trogdor dts fragment for the boards with TI sn65dsi86 edp bridge
4 *
5 * Copyright 2021 Google LLC.
6 */
7
8#include <dt-bindings/gpio/gpio.h>
9
10/*
11 * ADDITIONS TO FIXED REGULATORS DEFINED IN PARENT DEVICE TREE FILES
12 *
13 * Sort order matches the order in the parent files (parents before children).
14 */
15
16&pp3300_dx_edp {
17	off-on-delay-us = <500000>;
18
19	/*
20	 * It's nicer to start with this regulator enabled. The
21	 * bootloader may have left it on and it's nice not to cause an
22	 * extra power cycle of the touchscreen and eDP panel at bootup.
23	 * This should help speed bootup because we have off-on-delay-us.
24	 */
25	regulator-boot-on;
26};
27
28/* ADDITIONS TO NODES DEFINED IN PARENT DEVICE TREE FILES */
29
30&dsi0_out {
31	remote-endpoint = <&sn65dsi86_in>;
32};
33
34edp_brij_i2c: &i2c2 {
35	status = "okay";
36	clock-frequency = <400000>;
37
38	sn65dsi86_bridge: bridge@2d {
39		compatible = "ti,sn65dsi86";
40		reg = <0x2d>;
41		pinctrl-names = "default";
42		pinctrl-0 = <&edp_brij_en>, <&edp_brij_irq>;
43		gpio-controller;
44		#gpio-cells = <2>;
45
46		interrupt-parent = <&tlmm>;
47		interrupts = <11 IRQ_TYPE_LEVEL_HIGH>;
48
49		enable-gpios = <&tlmm 104 GPIO_ACTIVE_HIGH>;
50
51		vpll-supply = <&pp1800_edp_vpll>;
52		vccio-supply = <&pp1800_brij_vccio>;
53		vcca-supply = <&pp1200_brij>;
54		vcc-supply = <&pp1200_brij>;
55
56		clocks = <&rpmhcc RPMH_LN_BB_CLK3>;
57		clock-names = "refclk";
58
59		no-hpd;
60
61		ports {
62			#address-cells = <1>;
63			#size-cells = <0>;
64
65			port@0 {
66				reg = <0>;
67				sn65dsi86_in: endpoint {
68					remote-endpoint = <&dsi0_out>;
69				};
70			};
71
72			port@1 {
73				reg = <1>;
74				sn65dsi86_out: endpoint {
75					data-lanes = <0 1>;
76					remote-endpoint = <&panel_in_edp>;
77				};
78			};
79		};
80
81		aux-bus {
82			panel: panel {
83				/* Compatible will be filled in per-board */
84				power-supply = <&pp3300_dx_edp>;
85				backlight = <&backlight>;
86				hpd-gpios = <&sn65dsi86_bridge 2 GPIO_ACTIVE_HIGH>;
87
88				port {
89					panel_in_edp: endpoint {
90						remote-endpoint = <&sn65dsi86_out>;
91					};
92				};
93			};
94		};
95	};
96};
97
98&tlmm {
99	edp_brij_irq: edp-brij-irq-state {
100		pins = "gpio11";
101		function = "gpio";
102		drive-strength = <2>;
103		bias-pull-down;
104	};
105};
106