Home | History | Annotate | Line # | Download | only in dts
      1 /* $NetBSD: rk3399-rockpro64.dts,v 1.15 2023/08/30 21:26:05 rjs Exp $ */
      2 
      3 /*-
      4  * Copyright (c) 2019,2021 Jared McNeill <jmcneill (at) invisible.ca>
      5  * All rights reserved.
      6  *
      7  * Redistribution and use in source and binary forms, with or without
      8  * modification, are permitted provided that the following conditions
      9  * are met:
     10  * 1. Redistributions of source code must retain the above copyright
     11  *    notice, this list of conditions and the following disclaimer.
     12  * 2. Redistributions in binary form must reproduce the above copyright
     13  *    notice, this list of conditions and the following disclaimer in the
     14  *    documentation and/or other materials provided with the distribution.
     15  *
     16  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
     17  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
     18  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
     19  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
     20  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
     21  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
     22  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
     23  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
     24  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     25  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     26  * SUCH DAMAGE.
     27  */
     28 
     29 #include "../../../external/gpl2/dts/dist/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dts"
     30 #include "rk3399-crypto.dtsi"
     31 
     32 / {
     33 	backlight: lcd-backlight {
     34 		compatible = "pwm-backlight";
     35 		pwms = <&pwm0 0 25000 0>;
     36 		brightness-levels = <
     37 			  0   1   2   3   4   5   6   7
     38 			  8   9  10  11  12  13  14  15
     39 			 16  17  18  19  20  21  22  23
     40 			 24  25  26  27  28  29  30  31
     41 			 32  33  34  35  36  37  38  39
     42 			 40  41  42  43  44  45  46  47
     43 			 48  49  50  51  52  53  54  55
     44 			 56  57  58  59  60  61  62  63
     45 			 64  65  66  67  68  69  70  71
     46 			 72  73  74  75  76  77  78  79
     47 			 80  81  82  83  84  85  86  87
     48 			 88  89  90  91  92  93  94  95
     49 			 96  97  98  99 100 101 102 103
     50 			104 105 106 107 108 109 110 111
     51 			112 113 114 115 116 117 118 119
     52 			120 121 122 123 124 125 126 127
     53 			128 129 130 131 132 133 134 135
     54 			136 137 138 139 140 141 142 143
     55 			144 145 146 147 148 149 150 151
     56 			152 153 154 155 156 157 158 159
     57 			160 161 162 163 164 165 166 167
     58 			168 169 170 171 172 173 174 175
     59 			176 177 178 179 180 181 182 183
     60 			184 185 186 187 188 189 190 191
     61 			192 193 194 195 196 197 198 199
     62 			200 201 202 203 204 205 206 207
     63 			208 209 210 211 212 213 214 215
     64 			216 217 218 219 220 221 222 223
     65 			224 225 226 227 228 229 230 231
     66 			232 233 234 235 236 237 238 239
     67 			240 241 242 243 244 245 246 247
     68 			248 249 250 251 252 253 254 255>;
     69 		default-brightness-level = <200>;
     70 		status = "disabled";
     71 	};
     72 
     73 	edp_panel: edp-panel {
     74 		compatible = "simple-panel";
     75 		backlight = <&backlight>;
     76 		power-supply = <&vcc3v3_s0>;
     77 		pinctrl-names = "default";
     78 		pinctrl-0 = <&edp_panel_en>;
     79 		enable-gpios = <&gpio1 RK_PA0 GPIO_ACTIVE_HIGH>;
     80 		prepare-delay-ms = <20>;
     81 		enable-delay-ms = <20>;
     82 		status = "disabled";
     83 
     84 		ports {
     85 			#address-cells = <1>;
     86 			#size-cells = <0>;
     87 
     88 			port@0 {
     89 				reg = <0>;
     90 				#address-cells = <1>;
     91 				#size-cells = <0>;
     92 
     93 				panel_in_edp: endpoint@0 {
     94 					reg = <0>;
     95 					remote-endpoint = <&edp_out_panel>;
     96 				};
     97 			};
     98 		};
     99 	};
    100 
    101 	edp@ff970000 {
    102 		ports {
    103 			edp_out: port@1 {
    104 				reg = <1>;
    105 				#address-cells = <1>;
    106 				#size-cells = <0>;
    107 
    108 				edp_out_panel: endpoint@0 {
    109 					reg = <0>;
    110 					remote-endpoint = <&panel_in_edp>;
    111 				};
    112 			};
    113 		};
    114 	};
    115 
    116 	fan: pwm-fan {
    117 	 	cooling-levels = <0 100 150 200 255>;
    118 	};
    119 
    120 #if 0
    121 	edp@ff970000 {
    122 		status = "okay";
    123 	};
    124 
    125 	edp-panel {
    126 		status = "okay";
    127 	};
    128 
    129 	pwm@ff420000 {
    130 		status = "okay";
    131 	};
    132 
    133 	lcd-backlight {
    134 		status = "okay";
    135 	};
    136 #endif
    137 };
    138 
    139 &pinctrl {
    140 	lcd_panel {
    141 		edp_panel_en: edp-panel-en {
    142 			rockchip,pins = <1 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>;
    143 		};
    144 	};
    145 };
    146 
    147 &pcie0 {
    148 	bus-scan-delay-ms = <1000>;
    149 };
    150