Latest Post
Mango-IMX6 7인치 감압식 LCD 터치 구동하기

 

1.    Mango-IMX6 7인치 감압식 LCD 터치 구동하기

 

 

 

1.1.    Mango-IMX6Q 1.2 버전

 

 

<1.2버전 보드>

이미지를 다운로드 받는다

$ wget http://crztech.iptime.org:8080/Release/mango-imx6q/linux/kernel-3.10.53/20160216/mango-imx6q-image-160216.tgz

 

$tar xf mango-imx6q-image-160216.tgz

 

$ cd image

$ cp imx6q-sabresd-tsc2007.dtb imx6q-sabresd.dtb

 

 

 

1.2.    Mango-IMX6Q 1.3 버전

 

 

<1.3 버전 보드>

커널 소스 수정

LCD Back Light GPIO : SD1_DAT2(GPIO1_19, PWM2)

LCD Power EN GPIO: ENET_TXD0 (GPIO1_30)

 

arch/arm/boot/dts/imx6qdl-sabresd.dtsi

 

             lcd@0 {

                           compatible = "fsl,lcd";

                           ipu_id = <0>;

                           disp_id = <0>;

                           default_ifmt = "BGR24";

                           pinctrl-names = "default";

                           pinctrl-0 = <&pinctrl_ipu1_1>;

                           power_en_gpio = <&gpio1 30 0>; /* Power EN */

                           backlight_ctl_gpio = <&gpio1 19 0>; /* Backlight  CTRL */

                           status = "okay";

             };

 

             pwm-backlight {

                           compatible = "pwm-backlight";

                           pwms = <&pwm2 0 50000>;

                           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

                                        >;

                           default-brightness-level = <94>;

             };

 

&pwm1 {

             pinctrl-names = "default";

             pinctrl-0 = <&pinctrl_pwm1_1>;

             status = "disabled";

};

 

&pwm2 {

             pinctrl-names = "default";

             pinctrl-0 = <&pinctrl_pwm2_1>;

             status = "okay";

};

 

 

#if 0

             mango-ts@38 {

                           compatible = "mango,mango-ts";

                 reg = <0x38>;

                 pinctrl-names = "default";

                 pinctrl-0 = <&pinctrl_mango_ts>;

                 interrupt-parent = <&gpio3>;

                 interrupts = <26 0>;

                          resets = <&mango_ts_reset>;

             };

#else

   touchscreen: tsc2007@4a {

       compatible = "ti,tsc2007";

       reg = <0x4a>;

                pinctrl-names = "default";

                pinctrl-0 = <&pinctrl_mango_ts>;

       interrupt-parent = <&gpio3>;

       interrupts = <26 0>;

       gpios = <&gpio3 26 GPIO_ACTIVE_LOW>;

       ti,x-plate-ohms = <660>;

       linux,wakeup;

   };

#endif

 

arch/arm/boot/dts/imx6qdl.dtsi 파일 수정

             pwm2 {

                           pinctrl_pwm2_1: pwm2grp-1 {

                           fsl,pins = <

                                                     MX6QDL_PAD_SD1_DAT2__PWM2_OUT 0x1b0b1

                                        >;

                           };

             };

 

수정을 합니다.

커널을 컴파일 합니다.

 

$ ./build_kernel

 

SD card Linux PC에 삽입 후 Write를 합니다.

 [icanjji@icanjji-Samsung-DeskTop-System image]$ dmesg | tail

[9858808.684792] usb 2-1.4: new full-speed USB device number 7 using ehci_hcd

[9858808.779530] cp210x 2-1.4:1.0: cp210x converter detected

[9858808.852309] usb 2-1.4: reset full-speed USB device number 7 using ehci_hcd

[9858808.945045] usb 2-1.4: cp210x converter now attached to ttyUSB0

[9906472.618868] sd 184:0:0:0: [sdg] 15628288 512-byte logical blocks: (8.00 GB/7.45 GiB)

[9906472.620360] sd 184:0:0:0: [sdg] No Caching mode page present

[9906472.620364] sd 184:0:0:0: [sdg] Assuming drive cache: write through

[9906472.622477] sd 184:0:0:0: [sdg] No Caching mode page present

[9906472.622481] sd 184:0:0:0: [sdg] Assuming drive cache: write through

[9906472.623242]  sdg: sdg1

 

1.3.    이미지 Write 방법

 

 

u-boot, kernel, 파일 시스템 모두 Write 방법

$ sudo ./sdwriter sdg imx6q

 

u-boot와 커널, dtb  파일만 Write 방법

$ sudo ./sdwriter sdg imx6q bin

 

 

1.4.    테스트 방법

 

 

Micro SD Card를 보드에 삽입

부팅 스위치

SW1 : 2ON , 나머지 OFF

SW2: 3,4,5 ON , 나머지 OFF

 

전원을 인가 합니다.

 

Debug 터미널 창에서 아무키나 누른 후 설정을 합니다.

U-Boot 2014.04-08648-g9d7bf9b-dirty (Jan 20 2016 - 17:47:14)

 

CPU:   Freescale i.MX6Q rev1.5 at 792 MHz

CPU:   Temperature 25 C, calibration data: 0x5484b969

Reset cause: POR

Board: MX6-SabreSD

I2C:   ready

DRAM:  2 GiB

MMC:   FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 2

*** Warning - bad CRC, using default environment

 

Display: Mango-AT070 (800x480)

In:    serial

Out:   serial

Err:   serial

mmc2 is current device

unsupported boot devices

check_and_clean: reg 0, flag_set 0

Fastboot: Normal

SATA isn't buildin

Net:   FEC [PRIME]

Warning: failed to set MAC address

 

Normal Boot

Hit any key to stop autoboot:  0

=>

=>

=>

=>

=> setenv mmcargs 'setenv bootargs console=${console},${baudrate} ${smp} root=${mmcroot} video=mxcfb0:dev=lcd,MANGO-PRESS7,fbpix=BGR32,bpp=32'

=> save

Saving Environment to MMC...

Writing to MMC(2)... done

=> reset

 

 

setenv mmcargs 'setenv bootargs console=${console},${baudrate} ${smp} root=${mmcroot} video=mxcfb0:dev=lcd,MANGO-PRESS7,fbpix=BGR32,bpp=32'

 

 

 

커널 부팅 메시지에 아래와 같이 출력이 되면 인식이 된 것입니다.

input: TSC2007 Touchscreen as /devices/soc0/soc.1/2100000.aips-bus/21a4000.i2c/i2c-1/1-004a/input/input0

i2c-core: driver [mango-ts] using legacy suspend method

i2c-core: driver [mango-ts] using legacy resume method

i2c-core: driver [isl29023] using legacy suspend method

i2c-core: driver [isl29023] using legacy resume method

 

테스트 명령

ts_calibrate

ts_test

 

Comments 0
:    :    :
이름 / 2014-11-20 / ★★★☆☆ [수정 / 삭제]

내용

Recent Comments
공수래  |  ★★★★☆
안드로이드에서도 지원됩니까?
PDH  |  ★☆☆☆☆
사이트 점검, 첨부 파일 점검하세요. 되는게 없네요.
PDH  |  ★★☆☆☆
파일 안열립니다. 다시 올려주세요.
mangouser90  |  ★★★★★
망고보드 사용자인데요 회로도 좀 부탁드립니다.
yoonms  |  ★★★★★
망고보드및 책을 구입하였으나 참고할 도면이 필요합니다.
koths133  |  ★★★★☆
보드 데이터시트는 제공 안하나요?