1/* 2 * (C) Copyright 2018 Rockchip Electronics Co., Ltd 3 * 4 * SPDX-License-Identifier: GPL-2.0+ 5 */ 6 7/dts-v1/; 8#include "rk3308.dtsi" 9#include <dt-bindings/input/input.h> 10#include <linux/media-bus-format.h> 11 12/ { 13 model = "Rockchip RK3308 EVB"; 14 compatible = "rockchip,rk3308-evb", "rockchip,rk3308"; 15 16 chosen { 17 stdout-path = "serial2:1500000n8"; 18 }; 19 20 adc-keys0 { 21 compatible = "adc-keys"; 22 io-channels = <&saradc 0>; 23 io-channel-names = "buttons"; 24 poll-interval = <100>; 25 keyup-threshold-microvolt = <1800000>; 26 27 vol-up-key { 28 linux,code = <KEY_VOLUMEUP>; 29 label = "volume up"; 30 press-threshold-microvolt = <18000>; 31 }; 32 }; 33 34 adc-keys1 { 35 compatible = "adc-keys"; 36 io-channels = <&saradc 1>; 37 io-channel-names = "buttons"; 38 poll-interval = <100>; 39 keyup-threshold-microvolt = <1800000>; 40 41 esc-key { 42 linux,code = <KEY_MUTE>; 43 label = "mute"; 44 press-threshold-microvolt = <1130000>; 45 }; 46 47 home-key { 48 linux,code = <KEY_MODE>; 49 label = "mode"; 50 press-threshold-microvolt = <901000>; 51 }; 52 53 menu-key { 54 linux,code = <KEY_PLAY>; 55 label = "play"; 56 press-threshold-microvolt = <624000>; 57 }; 58 59 vol-down-key { 60 linux,code = <KEY_VOLUMEDOWN>; 61 label = "volume down"; 62 press-threshold-microvolt = <300000>; 63 }; 64 65 vol-up-key { 66 linux,code = <KEY_VOLUMEUP>; 67 label = "volume up"; 68 press-threshold-microvolt = <18000>; 69 }; 70 }; 71 72 backlight: backlight { 73 status = "disabled"; 74 compatible = "pwm-backlight"; 75 pwms = <&pwm1 0 25000 0>; 76 brightness-levels = < 77 0 1 2 3 4 5 6 7 78 8 9 10 11 12 13 14 15 79 16 17 18 19 20 21 22 23 80 24 25 26 27 28 29 30 31 81 32 33 34 35 36 37 38 39 82 40 41 42 43 44 45 46 47 83 48 49 50 51 52 53 54 55 84 56 57 58 59 60 61 62 63 85 64 65 66 67 68 69 70 71 86 72 73 74 75 76 77 78 79 87 80 81 82 83 84 85 86 87 88 88 89 90 91 92 93 94 95 89 96 97 98 99 100 101 102 103 90 104 105 106 107 108 109 110 111 91 112 113 114 115 116 117 118 119 92 120 121 122 123 124 125 126 127 93 128 129 130 131 132 133 134 135 94 136 137 138 139 140 141 142 143 95 144 145 146 147 148 149 150 151 96 152 153 154 155 156 157 158 159 97 160 161 162 163 164 165 166 167 98 168 169 170 171 172 173 174 175 99 176 177 178 179 180 181 182 183 100 184 185 186 187 188 189 190 191 101 192 193 194 195 196 197 198 199 102 200 201 202 203 204 205 206 207 103 208 209 210 211 212 213 214 215 104 216 217 218 219 220 221 222 223 105 224 225 226 227 228 229 230 231 106 232 233 234 235 236 237 238 239 107 240 241 242 243 244 245 246 247 108 248 249 250 251 252 253 254 255>; 109 default-brightness-level = <200>; 110 }; 111 112 panel: panel { 113 compatible = "simple-panel"; 114 bus-format = <MEDIA_BUS_FMT_RGB666_1X18>; 115 backlight = <&backlight>; 116 /* enable-gpios = <&gpio0 RK_PB7 GPIO_ACTIVE_LOW>; */ 117 enable-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_LOW>; 118 enable-delay-ms = <20>; 119 reset-gpios = <&gpio0 RK_PC4 GPIO_ACTIVE_LOW>; 120 reset-value = <0>; 121 reset-delay-ms = <10>; 122 prepare-delay-ms = <20>; 123 unprepare-delay-ms = <20>; 124 disable-delay-ms = <20>; 125 /* spi-sdo-gpios = <&gpio3 RK_PD2 GPIO_ACTIVE_HIGH>; */ 126 spi-sdi-gpios = <&gpio1 RK_PC7 GPIO_ACTIVE_HIGH>; 127 spi-scl-gpios = <&gpio1 RK_PD0 GPIO_ACTIVE_HIGH>; 128 spi-cs-gpios = <&gpio1 RK_PD1 GPIO_ACTIVE_HIGH>; 129 width-mm = <217>; 130 height-mm = <136>; 131 rockchip,data-mapping = "vesa"; 132 rockchip,data-width = <18>; 133 rockchip,output = "rgb"; 134 status = "disabled"; 135 pinctrl-names = "default"; 136 pinctrl-0 = <&spi_init_cmd>; 137 rockchip,cmd-type = "spi"; 138 139 /* type:0 is cmd, 1 is data */ 140 panel-init-sequence = [ 141 /* type delay num val1 val2 val3 */ 142 00 00 01 e0 143 01 00 01 00 144 01 00 01 07 145 01 00 01 0f 146 01 00 01 0d 147 01 00 01 1b 148 01 00 01 0a 149 01 00 01 3c 150 01 00 01 78 151 01 00 01 4a 152 01 00 01 07 153 01 00 01 0e 154 01 00 01 09 155 01 00 01 1b 156 01 00 01 1e 157 01 00 01 0f 158 00 00 01 e1 159 01 00 01 00 160 01 00 01 22 161 01 00 01 24 162 01 00 01 06 163 01 00 01 12 164 01 00 01 07 165 01 00 01 36 166 01 00 01 47 167 01 00 01 47 168 01 00 01 06 169 01 00 01 0a 170 01 00 01 07 171 01 00 01 30 172 01 00 01 37 173 01 00 01 0f 174 175 00 00 01 c0 176 01 00 01 10 177 01 00 01 10 178 179 00 00 01 c1 180 01 00 01 41 181 182 00 00 01 c5 183 01 00 01 00 184 01 00 01 22 185 01 00 01 80 186 187 00 00 01 36 188 01 00 01 48 189 190 00 00 01 3a /* interface mode control */ 191 01 00 01 66 192 193 00 00 01 b0 /* interface mode control */ 194 01 00 01 00 195 196 00 00 01 b1 /* frame rate 70hz */ 197 01 00 01 b0 198 01 00 01 11 199 00 00 01 b4 200 01 00 01 02 201 00 00 01 B6 /* RGB/MCU Interface Control */ 202 01 00 01 32 /* 02 mcu, 32 rgb */ 203 01 00 01 02 204 205 00 00 01 b7 206 01 00 01 c6 207 208 00 00 01 be 209 01 00 01 00 210 01 00 01 04 211 212 00 00 01 e9 213 01 00 01 00 214 215 00 00 01 f7 216 01 00 01 a9 217 01 00 01 51 218 01 00 01 2c 219 01 00 01 82 220 221 00 78 01 11 222 00 00 01 29 223 ]; 224 225 panel-exit-sequence = [ 226 /* type delay num val1 val2 val3 */ 227 00 0a 01 28 228 00 78 01 10 229 ]; 230 231 display-timings { 232 native-mode = <&kd050fwfba002_timing>; 233 234 kd050fwfba002_timing: timing0 { 235 clock-frequency = <11000000>; 236 hactive = <320>; 237 vactive = <480>; 238 hback-porch = <10>; 239 hfront-porch = <4>; 240 vback-porch = <10>; 241 vfront-porch = <4>; 242 hsync-len = <20>; 243 vsync-len = <20>; 244 hsync-active = <0>; 245 vsync-active = <0>; 246 de-active = <0>; 247 pixelclk-active = <0>; 248 }; 249 }; 250 251 port { 252 panel_in_rgb: endpoint { 253 remote-endpoint = <&rgb_out_panel>; 254 }; 255 }; 256 }; 257 258 vdd_log: vdd_core: vdd-core { 259 compatible = "pwm-regulator"; 260 pwms = <&pwm0 0 5000 1>; 261 regulator-name = "vdd_core"; 262 regulator-min-microvolt = <847000>; 263 regulator-max-microvolt = <1366000>; 264 regulator-init-microvolt = <1044000>; 265 regulator-always-on; 266 regulator-boot-on; 267 status = "okay"; 268 }; 269 270}; 271 272&emmc { 273 cap-mmc-highspeed; 274 mmc-hs200-1_8v; 275 supports-emmc; 276 non-removable; 277 num-slots = <1>; 278 status = "okay"; 279}; 280 281&pwm0 { 282 status = "okay"; 283}; 284 285&saradc { 286 status = "okay"; 287}; 288 289&u2phy { 290 status = "okay"; 291}; 292 293&u2phy_otg { 294 status = "okay"; 295}; 296 297&u2phy_host { 298 status = "okay"; 299}; 300 301&usb_host0_ehci { 302 status = "okay"; 303}; 304 305&usb_host0_ohci { 306 status = "okay"; 307}; 308 309&usb20_otg { 310 status = "okay"; 311}; 312 313&rgb { 314 status = "disabled"; 315}; 316 317&route_rgb { 318 status = "disabled"; 319}; 320 321&vop { 322 status = "disabled"; 323}; 324 325&rgb { 326 status = "disabled"; 327 328 ports { 329 rgb_out: port@1 { 330 reg = <1>; 331 #address-cells = <1>; 332 #size-cells = <0>; 333 334 rgb_out_panel: endpoint@0 { 335 reg = <0>; 336 remote-endpoint = <&panel_in_rgb>; 337 }; 338 }; 339 }; 340}; 341 342&pinctrl { 343 spi_panel { 344 spi_init_cmd: spi-init-cmd { 345 rockchip,pins = 346 /* spi sdi */ 347 <1 RK_PC7 RK_FUNC_GPIO &pcfg_pull_none>, 348 /* spi scl */ 349 <1 RK_PD0 RK_FUNC_GPIO &pcfg_pull_none>, 350 /* spi cs */ 351 <1 RK_PD1 RK_FUNC_GPIO &pcfg_pull_none>; 352 }; 353 }; 354}; 355