/* * Copyright (c) 2016 Fuzhou Rockchip Electronics Co., Ltd * Copyright (c) 2017 Theobroma Systemd Design und Consulting GmbH * * This file is dual-licensed: you can use it either under the terms * of the GPL or the X11 license, at your option. Note that this dual * licensing only applies to this file, and not this project as a * whole. * * a) This file is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This file is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * Or, alternatively, * * b) Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation * files (the "Software"), to deal in the Software without * restriction, including without limitation the rights to use, * copy, modify, merge, publish, distribute, sublicense, and/or * sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following * conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE. */ /* * Theobroma Systems RK3399-Q7 "Puma" with MIPI-DSI enabled instead of HDMI */ #include "rk3399-puma.dts" / { backlight: backlight { compatible = "gpio-backlight"; // GPIO4_C2 = Q7_LVDS_BLT_CTRL. Set high to enable the backlight. Use PWM to regulate brightness. gpios = <&gpio4 18 GPIO_ACTIVE_HIGH>; default-on; }; }; &hdmi { status = "disabled"; }; &route_hdmi { status = "disabled"; }; &route_mipi { status = "okay"; // default in rk3399-linux.dtsi: connect = <&vopb_out_mipi>; }; &mipi_dsi { status = "okay"; panel { compatible ="simple-panel-dsi"; reg = <0>; backlight = <&backlight>; // GPIO2_A2 = SEL_EDP_1V8. Set low to switch the hardware mux from eDP to DSI. enable-gpios = <&gpio2 2 GPIO_ACTIVE_LOW>; // GPIO4_D6 = LVDS_PPEN. Set low to send the panel into reset. reset-gpios = <&gpio4 30 GPIO_ACTIVE_LOW>; // Keep reset low for X milliseconds reset-delay-ms = <10>; dsi,flags = <(MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST | MIPI_DSI_MODE_VIDEO_SYNC_PULSE)>; dsi,format = ; dsi,lanes = <4>; status = "okay"; panel-init-sequence = [ 15 01 02 cd aa 15 01 02 30 00 15 01 02 5e 03 15 01 02 32 00 15 01 02 33 25 15 01 02 65 08 15 01 02 3a 10 15 01 02 36 49 15 01 02 67 82 15 01 02 69 27 15 01 02 6c 27 15 01 02 6d 14 39 01 09 55 09 09 09 09 09 09 09 09 39 01 11 56 09 09 09 09 09 09 09 09 09 09 09 09 09 09 09 09 15 01 02 6b 00 15 01 02 58 08 15 01 02 73 30 15 01 02 74 10 15 01 02 77 00 15 01 02 68 00 15 01 02 28 28 39 01 05 57 00 00 09 09 15 01 02 41 46 15 01 02 4e 50 15 01 02 4f 55 15 01 02 63 04 39 01 14 53 1f 1a 17 13 12 12 14 15 15 10 0d 0b 0b 0c 0d 0a 08 03 00 39 01 14 54 1f 1a 17 13 12 12 14 15 15 10 0d 0b 0b 0c 0d 0a 08 03 00 15 01 02 29 10 15 01 02 2e 03 15 01 02 78 67 15 01 02 76 36 15 01 02 47 18 15 01 02 2d 31 15 01 02 50 d0 15 01 02 48 66 15 01 02 3f 00 15 01 02 31 01 15 01 02 4d 00 ]; display-timings { native-mode = <&timing0>; timing0: timing0 { clock-frequency = <71900000>; hactive = <800>; vactive = <1280>; hback-porch = <24>; hfront-porch = <72>; vback-porch = <10>; vfront-porch = <12>; hsync-len = <24>; vsync-len = <2>; hsync-active = <0>; vsync-active = <0>; de-active = <1>; pixelclk-active = <1>; }; }; }; }; &i2c1 { gsl1680 { compatible = "silead,gsl1680"; reg = <0x40>; // GPIO2_B3 = CSI_MCLK = gpio2 23 interrupt-parent = <&gpio2>; interrupts = <23 IRQ_TYPE_LEVEL_LOW>; // TODO THIS IS PROBABLY WRONG // GPIO1_C7 = LVDS_BLEN = gpio1 23 power-gpios = <&gpio1 23 GPIO_ACTIVE_HIGH>; touchscreen-size-x = <1720>; touchscreen-size-y = <1150>; touchscreen-swapped-x-y; touchscreen-inverted-x; touchscreen-inverted-y; silead,max-fingers = <5>; // Place into /lib/firmware/silead firmware-name = "elcom-plain.fw"; }; };