Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * Copyright (c) 2016 Fuzhou Rockchip Electronics Co., Ltd
- *
- * 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.
- */
- /dts-v1/;
- #include "em3399-boardcon-base.dtsi"
- #include "rk3399-android.dtsi"
- #include "rk3399-vop-clk-set.dtsi"
- #include <dt-bindings/input/input.h>
- / {
- model = "Rockchip RK3399 Excavator Board edp (Android)";
- compatible = "rockchip,android", "rockchip,em3399-boardcon", "rockchip,rk3399";
- vcc_lcd: vcc-lcd {
- compatible = "regulator-fixed";
- regulator-name = "vcc_lcd";
- gpio = <&gpio4 30 GPIO_ACTIVE_HIGH>;
- startup-delay-us = <20000>;
- enable-active-high;
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- regulator-boot-on;
- vin-supply = <&vcc5v0_sys>;
- };
- panel: panel {
- compatible = "simple-panel";
- backlight = <&backlight>;
- power-supply = <&vcc_lcd>;
- // enable-gpios = <&gpio1 13 GPIO_ACTIVE_HIGH>;
- prepare-delay-ms = <20>;
- enable-delay-ms = <20>;
- display-timings {
- native-mode = <&timing0>;
- timing0: timing0 {
- clock-frequency = <150000000>;
- hactive = <1920>;
- vactive = <1200>;
- hfront-porch = <12>;
- hsync-len = <16>;
- hback-porch = <48>;
- vfront-porch = <8>;
- vsync-len = <4>;
- vback-porch = <8>;
- hsync-active = <0>;
- vsync-active = <0>;
- de-active = <0>;
- pixelclk-active = <0>;
- };
- };
- ports {
- panel_in: endpoint {
- remote-endpoint = <&edp_out>;
- };
- };
- };
- test-power {
- status = "okay";
- };
- rt5651-sound {
- status = "disabled";
- };
- rockchip-rt5651-sound {
- compatible = "rockchip,rockchip-rt5651-sound";
- rockchip,cpu = <&i2s0>;
- rockchip,codec = <&rt5651>;
- status = "okay";
- };
- hdmiin-sound {
- compatible = "rockchip,rockchip-rt5651-tc358749x-sound";
- rockchip,cpu = <&i2s0>;
- rockchip,codec = <&rt5651 &rt5651 &tc358749x>;
- status = "disabled";
- };
- };
- &backlight {
- status = "okay";
- enable-gpios = <&gpio4 29 GPIO_ACTIVE_HIGH>;
- };
- &edp {
- status = "disabled";
- force-hpd;
- ports {
- port@1 {
- reg = <1>;
- edp_out: endpoint {
- remote-endpoint = <&panel_in>;
- };
- };
- };
- };
- &edp_in_vopl {
- status = "disabled";
- };
- &dsi_in_vopl {
- status = "disabled";
- };
- &dsi_in_vopb {
- status = "okay";
- };
- &dsi {
- status = "okay";
- rockchip,lane-rate = <600>;
- panel@0 {
- compatible ="simple-panel-dsi";
- reg = <0>;
- backlight = <&backlight>;
- power-supply = <&vcc3v3_s0>;
- enable-gpios = <&gpio3 10 GPIO_ACTIVE_HIGH>;
- //enable-delay-ms = <30>;
- width-mm = <136>;
- height-mm = <216>;
- dsi,flags = <(MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST |
- MIPI_DSI_MODE_LPM | MIPI_DSI_MODE_EOT_PACKET)>;
- dsi,format = <MIPI_DSI_FMT_RGB888>;
- dsi,lanes = <4>;
- panel-init-sequence = [
- //Page0
- 15 00 02 E0 00
- //--- PASSWORD ----//
- 15 00 02 E1 93
- 15 00 02 E2 65
- 15 00 02 E3 F8
- 15 00 02 80 03
- //--- Sequence Ctrl ----//
- 15 00 02 70 10
- 15 00 02 71 13
- 15 00 02 72 06
- 15 00 02 75 03
- //--- Page4 ----//
- 15 00 02 E0 04
- 15 00 02 2D 03
- //--- Page1 ----//
- 15 00 02 E0 01
- //--- BIST MODE ----//
- // 15 00 02 4A 35
- //Set VCOM
- 15 00 02 00 00
- 15 00 02 01 5A
- //Set VCOM_Reverse
- 15 00 02 03 00
- 15 00 02 04 58
- //Set Gamma Power
- 15 00 02 17 00
- 15 00 02 18 EF
- 15 00 02 19 01
- 15 00 02 1A 00
- 15 00 02 1B EF
- 15 00 02 1C 01
- //Set Gate Power
- 15 00 02 1F 7A
- 15 00 02 20 24
- 15 00 02 21 24
- 15 00 02 22 4E
- // 15 00 02 24 F8
- // 15 00 02 26 D3
- //SetPanel
- 15 00 02 37 59
- 15 00 02 35 2C
- //SET RGBCYC
- 15 00 02 38 05
- 15 00 02 39 08
- 15 00 02 3A 10
- 15 00 02 3C 88
- 15 00 02 3D FF
- 15 00 02 3E FF
- 15 00 02 3F 7F
- //Set TCON
- 15 00 02 40 06
- 15 00 02 41 A0
- 15 00 02 43 14
- 15 00 02 44 0F
- 15 00 02 45 24
- // 15 00 02 4A 80
- //--- power voltage ----//
- 15 00 02 55 01
- 15 00 02 56 01
- 15 00 02 57 89
- 15 00 02 58 0A
- 15 00 02 59 0A //VCL = -2.5V
- 15 00 02 5A 39 //VGH = 18.4V 2D_VGH = 16V
- 15 00 02 5B 10 //VGL = -10.2V
- 15 00 02 5C 16
- //--- Gamma ----//
- 15 00 02 5D 7A
- 15 00 02 5E 65
- 15 00 02 5F 56
- 15 00 02 60 49
- 15 00 02 61 43
- 15 00 02 62 33
- 15 00 02 63 35
- 15 00 02 64 1C
- 15 00 02 65 33
- 15 00 02 66 30
- 15 00 02 67 2E
- 15 00 02 68 4A
- 15 00 02 69 36
- 15 00 02 6A 3D
- 15 00 02 6B 2F
- 15 00 02 6C 2D
- 15 00 02 6D 23
- 15 00 02 6E 15
- 15 00 02 6F 04
- 15 00 02 70 7A
- 15 00 02 71 65
- 15 00 02 72 56
- 15 00 02 73 49
- 15 00 02 74 43
- 15 00 02 75 33
- 15 00 02 76 35
- 15 00 02 77 1C
- 15 00 02 78 33
- 15 00 02 79 30
- 15 00 02 7A 2E
- 15 00 02 7B 4A
- 15 00 02 7C 36
- 15 00 02 7D 3D
- 15 00 02 7E 2F
- 15 00 02 7F 2D
- 15 00 02 80 23
- 15 00 02 81 15
- 15 00 02 82 04
- //Page2, for GIP
- 15 00 02 E0 02
- //GIP_L Pin mapping
- 15 00 02 00 1E
- 15 00 02 01 1F
- 15 00 02 02 57
- 15 00 02 03 58
- 15 00 02 04 48
- 15 00 02 05 4A
- 15 00 02 06 44
- 15 00 02 07 46
- 15 00 02 08 40
- 15 00 02 09 1F
- 15 00 02 0A 1F
- 15 00 02 0B 1F
- 15 00 02 0C 1F
- 15 00 02 0D 1F
- 15 00 02 0E 1F
- 15 00 02 0F 42
- 15 00 02 10 1F
- 15 00 02 11 1F
- 15 00 02 12 1F
- 15 00 02 13 1F
- 15 00 02 14 1F
- 15 00 02 15 1F
- //GIP_R Pin mapping
- 15 00 02 16 1E
- 15 00 02 17 1F
- 15 00 02 18 57
- 15 00 02 19 58
- 15 00 02 1A 49
- 15 00 02 1B 4B
- 15 00 02 1C 45
- 15 00 02 1D 47
- 15 00 02 1E 41
- 15 00 02 1F 1F
- 15 00 02 20 1F
- 15 00 02 21 1F
- 15 00 02 22 1F
- 15 00 02 23 1F
- 15 00 02 24 1F
- 15 00 02 25 43
- 15 00 02 26 1F
- 15 00 02 27 1F
- 15 00 02 28 1F
- 15 00 02 29 1F
- 15 00 02 2A 1F
- 15 00 02 2B 1F
- //GIP_L_GS Pin mapping
- 15 00 02 2C 1F
- 15 00 02 2D 1E
- 15 00 02 2E 17
- 15 00 02 2F 18
- 15 00 02 30 07
- 15 00 02 31 05
- 15 00 02 32 0B
- 15 00 02 33 09
- 15 00 02 34 03
- 15 00 02 35 1F
- 15 00 02 36 1F
- 15 00 02 37 1F
- 15 00 02 38 1F
- 15 00 02 39 1F
- 15 00 02 3A 1F
- 15 00 02 3B 01
- 15 00 02 3C 1F
- 15 00 02 3D 1F
- 15 00 02 3E 1F
- 15 00 02 3F 1F
- 15 00 02 40 1F
- 15 00 02 41 1F
- //GIP_R_GS Pin mapping
- 15 00 02 42 1F
- 15 00 02 43 1E
- 15 00 02 44 17
- 15 00 02 45 18
- 15 00 02 46 06
- 15 00 02 47 04
- 15 00 02 48 0A
- 15 00 02 49 08
- 15 00 02 4A 02
- 15 00 02 4B 1F
- 15 00 02 4C 1F
- 15 00 02 4D 1F
- 15 00 02 4E 1F
- 15 00 02 4F 1F
- 15 00 02 50 1F
- 15 00 02 51 00
- 15 00 02 52 1F
- 15 00 02 53 1F
- 15 00 02 54 1F
- 15 00 02 55 1F
- 15 00 02 56 1F
- 15 00 02 57 1F
- //GIP Timing
- 15 00 02 58 40
- 15 00 02 59 00
- 15 00 02 5A 00
- 15 00 02 5B 30
- 15 00 02 5C 05
- 15 00 02 5D 30
- 15 00 02 5E 01
- 15 00 02 5F 02
- 15 00 02 60 30
- 15 00 02 61 03
- 15 00 02 62 04
- 15 00 02 63 6A
- 15 00 02 64 6A
- 15 00 02 65 75
- 15 00 02 66 0D
- 15 00 02 67 73
- 15 00 02 68 09
- 15 00 02 69 6A
- 15 00 02 6A 6A
- 15 00 02 6B 08
- 15 00 02 6C 00
- 15 00 02 6D 04
- 15 00 02 6E 00
- 15 00 02 6F 88
- 15 00 02 70 00
- 15 00 02 71 00
- 15 00 02 72 06
- 15 00 02 73 7B
- 15 00 02 74 00
- 15 00 02 75 BC
- 15 00 02 76 00
- 15 00 02 77 0D
- 15 00 02 78 23
- 15 00 02 79 00
- 15 00 02 7A 00
- 15 00 02 7B 00
- 15 00 02 7C 00
- 15 00 02 7D 03
- 15 00 02 7E 7B
- //Page4
- 15 00 02 E0 04
- 15 00 02 2B 2B
- 15 00 02 2E 44
- //Page0
- 15 00 02 E0 00
- 15 00 02 E6 02
- 15 00 02 E7 02
- 05 78 01 11
- 05 05 01 29
- // 15 00 02 35 00
- ];
- display-timings {
- native-mode = <&timing1>;
- timing1: timing1 {
- clock-frequency = <68000000>;
- hactive = <800>;
- vactive = <1280>;
- hfront-porch = <30>;
- hback-porch = <20>;
- hsync-len = <20>;
- vfront-porch = <20>;
- vback-porch = <12>;
- vsync-len = <4>;
- hsync-active = <1>;
- vsync-active = <1>;
- de-active = <0>;
- pixelclk-active = <0>;
- };
- };
- };
- };
- &route_dsi {
- status = "okay";
- connect = <&vopb_out_dsi>;
- };
- &hdmi {
- status = "okay";
- };
- &hdmi_in_vopb {
- status = "disabled";
- };
- &rt5651 {
- status = "okay";
- };
- &cdn_dp {
- status = "okay";
- extcon = <&fusb0>;
- phys = <&tcphy0_dp>;
- };
- &dp_sound {
- status = "okay";
- };
- &hdmi_sound {
- status = "okay";
- };
- &dp_in_vopb {
- status = "disabled";
- };
- &i2s2 {
- status = "okay";
- };
- &i2c2 {
- status = "okay";
- gsl3673: gsl3673@40 {
- status = "disabled";
- compatible = "GSL,GSL3673";
- reg = <0x40>;
- screen_max_x = <1536>;
- screen_max_y = <2048>;
- irq_gpio_number = <&gpio1 20 IRQ_TYPE_LEVEL_LOW>;
- rst_gpio_number = <&gpio4 22 GPIO_ACTIVE_HIGH>;
- };
- tc358749x: tc358749x@0f {
- compatible = "toshiba,tc358749x";
- reg = <0x0f>;
- //power-gpios = <&gpio2 6 GPIO_ACTIVE_HIGH>;
- //power18-gpios = <&gpio2 9 GPIO_ACTIVE_HIGH>;
- //power33-gpios = <&gpio2 5 GPIO_ACTIVE_HIGH>;
- //csi-ctl-gpios = <&gpio2 10 GPIO_ACTIVE_HIGH>;
- stanby-gpios = <&gpio2 6 GPIO_ACTIVE_HIGH>;
- reset-gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>;
- int-gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
- pinctrl-names = "default";
- pinctrl-0 = <&hdmiin_gpios>;
- // status = "okay";
- status = "disabled";
- };
- };
- &i2c6 {
- status = "okay";
- gt928: gt928@5d {
- compatible = "goodix,gt9xx";
- reg = <0x5d>;
- max-x = <1280>;
- max-y = <800>;
- tp-size = <89>;
- touch-gpio = <&gpio3 28 GPIO_ACTIVE_LOW>;
- reset-gpio = <&gpio4 22 GPIO_ACTIVE_LOW>;
- };
- cw2015@62 {
- status = "disabled";
- compatible = "cw201x";
- reg = <0x62>;
- bat_config_info = <0x15 0x42 0x60 0x59 0x52 0x58 0x4D 0x48
- 0x48 0x44 0x44 0x46 0x49 0x48 0x32 0x24
- 0x20 0x17 0x13 0x0F 0x19 0x3E 0x51 0x45
- 0x08 0x76 0x0B 0x85 0x0E 0x1C 0x2E 0x3E
- 0x4D 0x52 0x52 0x57 0x3D 0x1B 0x6A 0x2D
- 0x25 0x43 0x52 0x87 0x8F 0x91 0x94 0x52
- 0x82 0x8C 0x92 0x96 0xFF 0x7B 0xBB 0xCB
- 0x2F 0x7D 0x72 0xA5 0xB5 0xC1 0x46 0xAE>;
- monitor_sec = <5>;
- virtual_power = <0>;
- };
- };
- &isp0 {
- status = "okay";
- };
- &isp1 {
- status = "okay";
- };
- &isp0_mmu {
- status = "okay";
- };
- &isp1_mmu {
- status = "okay";
- };
- &vopb {
- assigned-clocks = <&cru DCLK_VOP0_DIV>;
- assigned-clock-parents = <&cru PLL_CPLL>;
- };
- &vopl {
- assigned-clocks = <&cru DCLK_VOP1_DIV>;
- assigned-clock-parents = <&cru PLL_VPLL>;
- };
- &pcie_phy {
- status = "okay";
- };
- &pcie0 {
- status = "okay";
- };
- &route_edp {
- status = "okay";
- };
- &pwm3 {
- status = "okay";
- interrupts = <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH 0>;
- compatible = "rockchip,remotectl-pwm";
- remote_pwm_id = <3>;
- handle_cpu_id = <1>;
- ir_key1 {
- rockchip,usercode = <0x4040>;
- rockchip,key_table =
- <0xf2 KEY_REPLY>,
- <0xba KEY_BACK>,
- <0xf4 KEY_UP>,
- <0xf1 KEY_DOWN>,
- <0xef KEY_LEFT>,
- <0xee KEY_RIGHT>,
- <0xbd KEY_HOME>,
- <0xea KEY_VOLUMEUP>,
- <0xe3 KEY_VOLUMEDOWN>,
- <0xe2 KEY_SEARCH>,
- <0xb2 KEY_POWER>,
- <0xbc KEY_MUTE>,
- <0xec KEY_MENU>,
- <0xbf 0x190>,
- <0xe0 0x191>,
- <0xe1 0x192>,
- <0xe9 183>,
- <0xe6 248>,
- <0xe8 185>,
- <0xe7 186>,
- <0xf0 388>,
- <0xbe 0x175>;
- };
- ir_key2 {
- rockchip,usercode = <0xff00>;
- rockchip,key_table =
- <0xf9 KEY_HOME>,
- <0xbf KEY_BACK>,
- <0xfb KEY_MENU>,
- <0xaa KEY_REPLY>,
- <0xb9 KEY_UP>,
- <0xe9 KEY_DOWN>,
- <0xb8 KEY_LEFT>,
- <0xea KEY_RIGHT>,
- <0xeb KEY_VOLUMEDOWN>,
- <0xef KEY_VOLUMEUP>,
- <0xf7 KEY_MUTE>,
- <0xe7 KEY_POWER>,
- <0xfc KEY_POWER>,
- <0xa9 KEY_VOLUMEDOWN>,
- <0xa8 KEY_VOLUMEDOWN>,
- <0xe0 KEY_VOLUMEDOWN>,
- <0xa5 KEY_VOLUMEDOWN>,
- <0xab 183>,
- <0xb7 388>,
- <0xf8 184>,
- <0xaf 185>,
- <0xed KEY_VOLUMEDOWN>,
- <0xee 186>,
- <0xb3 KEY_VOLUMEDOWN>,
- <0xf1 KEY_VOLUMEDOWN>,
- <0xf2 KEY_VOLUMEDOWN>,
- <0xf3 KEY_SEARCH>,
- <0xb4 KEY_VOLUMEDOWN>,
- <0xbe KEY_SEARCH>;
- };
- ir_key3 {
- rockchip,usercode = <0x1dcc>;
- rockchip,key_table =
- <0xee KEY_REPLY>,
- <0xf0 KEY_BACK>,
- <0xf8 KEY_UP>,
- <0xbb KEY_DOWN>,
- <0xef KEY_LEFT>,
- <0xed KEY_RIGHT>,
- <0xfc KEY_HOME>,
- <0xf1 KEY_VOLUMEUP>,
- <0xfd KEY_VOLUMEDOWN>,
- <0xb7 KEY_SEARCH>,
- <0xff KEY_POWER>,
- <0xf3 KEY_MUTE>,
- <0xbf KEY_MENU>,
- <0xf9 0x191>,
- <0xf5 0x192>,
- <0xb3 388>,
- <0xbe KEY_1>,
- <0xba KEY_2>,
- <0xb2 KEY_3>,
- <0xbd KEY_4>,
- <0xf9 KEY_5>,
- <0xb1 KEY_6>,
- <0xfc KEY_7>,
- <0xf8 KEY_8>,
- <0xb0 KEY_9>,
- <0xb6 KEY_0>,
- <0xb5 KEY_BACKSPACE>;
- };
- };
- &pinctrl {
- lcd-panel {
- lcd_panel_reset: lcd-panel-reset {
- rockchip,pins = <3 10 RK_FUNC_GPIO &pcfg_pull_up>;
- };
- };
- hdmiin {
- hdmiin_gpios: hdmiin_gpios {
- rockchip,pins =
- <2 5 RK_FUNC_GPIO &pcfg_pull_none>,
- <2 6 RK_FUNC_GPIO &pcfg_pull_none>,
- <2 7 RK_FUNC_GPIO &pcfg_pull_none>,
- <2 8 RK_FUNC_GPIO &pcfg_pull_none>,
- <0 8 RK_FUNC_GPIO &pcfg_pull_none>,
- <0 13 RK_FUNC_GPIO &pcfg_pull_none>;
- };
- };
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement