|
【Linux】
aio-3399j的lvds驱动在buildroot下可以显示,在ubuntu下面无法显示
发表于 2022-2-17 16:19:38
浏览:5726
|
回复:7
打印
只看该作者
[复制链接]
楼主
自己修改了rk3399-firefly-aio-lvds.dts文件,
ubuntu编译流程如下:
./build.sh aio-3399j-lvds-ubuntu.mk
./build.sh
编译信息如下:
TARGET_ARCH=arm64
TARGET_PLATFORM=rk3399
TARGET_UBOOT_CONFIG=firefly-rk3399
TARGET_SPL_CONFIG=
TARGET_KERNEL_CONFIG=firefly_linux_defconfig
TARGET_KERNEL_DTS=rk3399-firefly-aio-lvds
TARGET_TOOLCHAIN_CONFIG=
TARGET_BUILDROOT_CONFIG=
TARGET_RECOVERY_CONFIG=
TARGET_PCBA_CONFIG=rockchip_rk3399_pcba
TARGET_RAMBOOT_CONFIG=
编译出文件 AIO-3399J-LVDS-UBUNTU-18.04-GPT-20220217-1450.img,使用烧写工具烧录之后lvds屏幕有白色竖线,不显示桌面;
buildroot编译流程如下:
./build.sh aio-3399j-lvds-buildroot.mk
./build.sh
编译信息如下:
TARGET_ARCH=arm64
TARGET_PLATFORM=rk3399
TARGET_UBOOT_CONFIG=firefly-rk3399
TARGET_SPL_CONFIG=
TARGET_KERNEL_CONFIG=firefly_linux_defconfig
TARGET_KERNEL_DTS=rk3399-firefly-aio-lvds
TARGET_TOOLCHAIN_CONFIG=
TARGET_BUILDROOT_CONFIG=rockchip_rk3399
TARGET_RECOVERY_CONFIG=rockchip_rk3399_recovery
TARGET_PCBA_CONFIG=rockchip_rk3399_pcba
TARGET_RAMBOOT_CONFIG=
编译出文件 AIO-3399J-LVDS-BUILDROOT-GPT-20220216-1751.img,使用烧写工具烧录之后lvds屏幕可以正常显示;
两种编译方式都是在同一个环境下,也没有更改任何东西;
如果先烧写ubuntu的镜像,然后使用下载镜像功能单独烧写buildroot的boot.img的话系统也可以正常启动,但是屏幕还是不亮,设备树和内核不应该只包含在boot.img中吗?
由于一些原因需要使用ubuntu系统,这种情况如何排查呢,排查了几天毫无头绪,使用dtc工具反编译两个系统的 /sys/firmware/fdt 文件除了memreserve不太一样,其余都是一样的,所以可能是什么问题导致的?
dts内容如下:- /*
- * 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,
- * 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 "rk3399-firefly-port.dtsi"
- #include <dt-bindings/sensor-dev.h>
- #include <dt-bindings/display/media-bus-format.h>
- / {
- model = "AIO-3399J Board LVDS HSX101H40C (Linux Opensource)";
- compatible = "rockchip,rk3399-firefly", "rockchip,rk3399";
- test-power {
- status = "okay";
- };
- /delete-node/ vcc-sd;
- sdmmc_pwrseq: sdmmc-pwrseq {
- compatible = "mmc-pwrseq-simple";
- clocks = <&rk808 1>;
- clock-names = "ext_clock";
- pinctrl-names = "default";
- pinctrl-0 = <&sdcard_enable_h>;
- /*
- * On the module itself this is one of these (depending
- * on the actual card populated):
- * - SDIO_RESET_L_WL_REG_ON
- * - PDN (power down when low)
- */
- reset-gpios = <&gpio1 20 GPIO_ACTIVE_LOW>; /* GPIO1_C4 */
- };
- lcd_en:lcd-en-regulator {
- compatible = "regulator-fixed";
- enable-active-high;
- gpio = <&gpio1 4 GPIO_ACTIVE_HIGH>;
- pinctrl-names = "default";
- pinctrl-0 = <&lcd_panel_lcd_en>;
- regulator-name = "lcd_en";
- regulator-always-on;
- };
- leds {
- compatible = "gpio-leds";
- work {
- gpios = <&gpio2 7 GPIO_ACTIVE_HIGH>;
- default-state = "on";
- };
- user {
- gpios = <&gpio2 2 GPIO_ACTIVE_HIGH>;
- default-state = "off";
- };
- };
- };
- &backlight {
- status = "okay";
- pwms = <&pwm0 0 25000 1>;
- enable-gpios = <&gpio1 1 GPIO_ACTIVE_HIGH>;
- brightness-levels = </*
- 0 1 2 3 4 5 6 7
- 8 9 10 11 12 13 14 15
- 16 17 18 19 20 21 22 23
- 24 25 26 27 28 29 30 31
- 32 33 34 35*/36 37 38 39
- 40 41 42 43 44 45 46 47
- 48 49 50 51 52 53 54 55
- 56 57 58 59 60 61 62 63
- 64 65 66 67 68 69 70 71
- 72 73 74 75 76 77 78 79
- 80 81 82 83 84 85 86 87
- 88 89 90 91 92 93 94 95
- 96 97 98 99 100 101 102 103
- 104 105 106 107 108 109 110 111
- 112 113 114 115 116 117 118 119
- 120 121 122 123 124 125 126 127
- 128 129 130 131 132 133 134 135
- 136 137 138 139 140 141 142 143
- 144 145 146 147 148 149 150 151
- 152 153 154 155 156 157 158 159
- 160 161 162 163 164 165 166 167
- 168 169 170 171 172 173 174 175
- 176 177 178 179 180 181 182 183
- 184 185 186 187 188 189 190 191
- 192 193 194 195 196 197 198 199
- 200 201 202 203 204 205 206 207
- 208 209 210 211 212 213 214 215
- 216 217 218 219 220 221 222 223
- 224 225 226 227 228 229 230 231
- 232 233 234 235 236 237 238 239
- 240 241 242 243 244 245 246 247
- 248 249 250 251 252 253 254 255>;
- default-brightness-level = <200>;
- };
- &dsi {
- status = "okay";
- rockchip,lane-rate = <780>; //lvds_clock*6*2
- dsi_panel: panel {
- compatible ="simple-panel-dsi";
- reg = <0>;
- backlight = <&backlight>;
- enable-gpios = <&gpio3 16 GPIO_ACTIVE_HIGH>;
- reset-gpios = <&gpio2 27 GPIO_ACTIVE_LOW>;
- 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>;
- bus-format = <MEDIA_BUS_FMT_RGB666_1X18>;
- dsi,lanes = <4>;
- dsi,channel = <0>;
- enable-delay-ms = <35>;
- prepare-delay-ms = <6>;
- unprepare-delay-ms = <0>;
- disable-delay-ms = <20>;
- size,width = <120>;
- size,height = <170>;
- power-supply = <&lcd_en>;
- status = "okay";
- /*
- panel-init-sequence = [
- 29 02 06 3C 01 06 00 05 00
- 29 02 06 14 01 04 00 00 00
- 29 02 06 64 01 07 00 00 00
- 29 02 06 68 01 07 00 00 00
- 29 02 06 6C 01 07 00 00 00
- 29 02 06 70 01 07 00 00 00
- 29 02 06 34 01 1F 00 00 00
- 29 02 06 10 02 1F 00 00 00
- 29 02 06 04 01 01 00 00 00
- 29 02 06 04 02 01 00 00 00
- 29 02 06 50 04 20 01 F0 03
- 29 02 06 54 04 0A 00 46 00
- 29 02 06 58 04 00 04 2C 01
- 29 02 06 5C 04 0A 00 00 00
- 29 02 06 60 04 00 03 1C 00
- 29 02 06 64 04 01 00 00 00
- 29 02 06 A0 04 06 80 44 00
- 29 02 06 A0 04 06 80 04 00
- 29 02 06 04 05 04 00 00 00
- 29 02 06 9C 04 41 01 00 00
- ];
- */
- panel-init-sequence = [
- 29 02 06 3C 01 09 00 07 00
- 29 02 06 14 01 06 00 00 00
- 29 02 06 64 01 0B 00 00 00
- 29 02 06 68 01 0B 00 00 00
- 29 02 06 6C 01 0B 00 00 00
- 29 02 06 70 01 0B 00 00 00
- 29 02 06 34 01 1F 00 00 00
- 29 02 06 10 02 1F 00 00 00
- 29 02 06 04 01 01 00 00 00
- 29 02 06 04 02 01 00 00 00
- 29 02 06 50 04 30 01 F0 03
- 29 02 06 54 04 0A 00 46 00 //hsync_len = 0x0A hback_porch =0x32
- 29 02 06 58 04 00 04 2C 01 //hactive = 0x320 hfront_porch=0x32
- 29 02 06 5C 04 0A 00 00 00 //vsync_len = 0x12 vback_porch =0x0A
- 29 02 06 60 04 00 03 1C 00 //vactive = 0x500 vfront_porch=0x0A
- 29 02 06 64 04 01 00 00 00
- 29 02 06 A0 04 06 80 44 00
- 29 02 06 A0 04 06 80 04 00
- 29 02 06 04 05 04 00 00 00
- 29 02 06 80 04 00 01 02 03
- 29 02 06 84 04 04 07 05 08
- 29 02 06 88 04 09 0A 0E 0F
- 29 02 06 8C 04 0B 0C 0D 10
- 29 02 06 90 04 16 17 11 12
- 29 02 06 94 04 13 14 15 1B
- 29 02 06 98 04 18 19 1A 06
- 29 02 06 9C 04 31 04 00 00
- ];
- panel-exit-sequence = [
- 05 05 01 28
- 05 78 01 10
- ];
- disp_timings: display-timings {
- native-mode = <&timing0>;
- timing0: timing0 {
- clock-frequency = <65000000>; //@60
- hactive = <1024>;
- vactive = <768>;
- hsync-len = <10>;
- hback-porch = <70>;
- hfront-porch = <300>;
- vsync-len = <10>;
- vback-porch = <0>;
- vfront-porch = <28>;
- hsync-active = <0>;
- vsync-active = <0>;
- de-active = <0>;
- pixelclk-active = <0>;
- };
- };
- };
- };
- &route_dsi {
- status = "okay";
- logo,mode = "center";
- };
- &dsi_in_vopl {
- status = "okay";
- };
- &cdn_dp {
- status = "disabled";
- };
- &hdmi_dp_sound {
- status = "okay";
- };
- &i2c4 {
- status = "okay";
- gsl3680: gsl3680@41 {
- compatible = "gslX680";
- reg = <0x41>;
- screen_max_x = <800>;
- screen_max_y = <1280>;
- touch-gpio = <&gpio4 27 IRQ_TYPE_LEVEL_LOW>;
- reset-gpio = <&gpio0 12 GPIO_ACTIVE_HIGH>;
- gsl,fw = <1>;
- flip-x = <1>;
- flip-y = <0>;
- swap-xy = <0>;
- };
- sensor@4c {
- status = "disabled";
- compatible = "gs_mc3230";
- reg = <0x4c>;
- type = <SENSOR_TYPE_ACCEL>;
- irq_enable = <0>;
- poll_delay_ms = <30>;
- layout = <1>;
- };
- };
- &rt5640 {
- aux-det-adc-value = <1000>;
- io-channels = <&saradc 4>, <&saradc 2>;
- io-channel-names = "hp-det", "aux-det";
- };
- &sdmmc {
- /delete-property/ vmmc-supply;
- mmc-pwrseq = <&sdmmc_pwrseq>;
- };
- &spi1 {
- status = "okay";
- };
- &spi_wk2xxx {
- status = "okay";
- };
- &fusb0 {
- status = "disabled";
- };
- &tcphy0 {
- status = "okay";
- /delete-property/ extcon;
- };
- &u2phy0 {
- status = "okay";
- /delete-property/ extcon;
- u2phy0_otg: otg-port {
- rockchip,vbus-always-on;
- vbus-5v-gpios = <&gpio1 3 GPIO_ACTIVE_HIGH>;
- status = "okay";
- };
- };
- &usbdrd3_0 {
- status = "okay";
- /delete-property/ extcon;
- };
- &usbdrd_dwc3_0 {
- status = "okay";
- dr_mode = "host";
- };
- &vcc3v3_pcie {
- gpio = <&gpio0 13 GPIO_ACTIVE_HIGH>;
- };
- &pcie0 {
- ep-gpios = <&gpio4 25 GPIO_ACTIVE_HIGH>;
- };
- &vcc3v3_3g {
- gpio = <&gpio2 6 GPIO_ACTIVE_HIGH>;
- };
- &uart4 {
- status = "disabled";
- };
- &dp_in_vopb {
- status = "disabled";
- };
- &hdmi_in_vopb {
- status = "disabled";
- };
- &wdt {
- status = "disabled";
- };
- &pinctrl {
- leds {
- led_power: led-power {
- rockchip,pins =
- <2 7 RK_FUNC_GPIO &pcfg_pull_none>;
- };
- led_user: led-user {
- rockchip,pins =
- <2 2 RK_FUNC_GPIO &pcfg_pull_none>;
- };
- };
- pcie {
- pcie_drv: pcie-drv {
- rockchip,pins =
- <0 13 RK_FUNC_GPIO &pcfg_pull_none>;
- };
- pcie_3g_drv: pcie-3g-drv {
- rockchip,pins =
- <2 6 RK_FUNC_GPIO &pcfg_pull_up>;
- };
- };
- sdmmc-pwrseq {
- sdcard_enable_h: sdcard-enable-h {
- rockchip,pins =
- <1 20 RK_FUNC_GPIO &pcfg_pull_none>;
- };
- };
- lcd-panel {
- lcd_panel_lcd_en:lcd-panel-lcd-en {
- rockchip,pins = <1 4 RK_FUNC_GPIO &pcfg_pull_down>;
- };
- };
- };
复制代码
|
|