How to Configure Device Tree for Rocktech RK050HR18 TFT Display on PX30
The RK050HR18 is a 5.0-inch TFT LCD display from Rocktech, designed for industrial and embedded applications. It features an 800x480 resolution, RGB 24-bit interface, and capacitive touch based on the GT911 controller.
This article demonstrates how to configure the device tree on Rockchip PX30 platform to enable full support for this display, including backlight and touch.
Product Overview
- Model: RK050HR18
- Size: 5.0"
- Resolution: 800 × 480 pixels
- Interface: RGB 24-bit
- Brightness: 350 nits (typ.)
- Touch Panel: Capacitive, GT911 I2C
📂 View DTS on GitHub
Device Tree Configuration
1. LCD Panel Node
&lcd {
status = "okay";
compatible = "rocktech,rk050hr18";
backlight = &backlight;
power-supply = &vcc3v3_lcd;
enable-gpios = &gpio1 RK_PA5 GPIO_ACTIVE_HIGH;
pinctrl-names = "default";
pinctrl-0 = &lcd_panel_en;
port {
lcd_in: endpoint {
remote-endpoint = &rgb_out;
};
};
};
2. RGB Interface
&vopb_out_rgb {
status = "okay";
rgb_out: endpoint {
remote-endpoint = &lcd_in;
};
};
3. PWM Backlight Control
backlight: backlight {
compatible = "pwm-backlight";
pwms = &pwm1 0 25000 0;
brightness-levels = <0 100="" 150="" 200="" 255="" 50="">;
default-brightness-level = <3>;
power-supply = &vcc5v0_lcd;
enable-gpios = &gpio1 RK_PB0 GPIO_ACTIVE_HIGH;
};
3>0>
4. GT911 Touch Panel Node
&i2c1 {
gt911@5d {
compatible = "goodix,gt911";
reg = <0x5d>;
interrupt-parent = &gpio0;
interrupts = ;
reset-gpios = &gpio1 RK_PB1 GPIO_ACTIVE_LOW;
irq-gpios = &gpio0 RK_PA4 GPIO_ACTIVE_HIGH;
touchscreen-size-x = <800>;
touchscreen-size-y = <480>;
status = "okay";
};
};
480>800> 0x5d>
Tips for Successful Integration
- Ensure that PWM1 is not used by other peripherals
- Check pinmux settings for all GPIOs used by LCD or touch
- Use a logic analyzer or oscilloscope to verify RGB and I2C signals if display does not light up
- Adjust timing settings in the panel node for different refresh rates
Conclusion
The RK050HR18 is a reliable industrial display well-suited for embedded Linux applications. With proper device tree configuration and driver support, Rockchip PX30 boards can drive this display with full backlight and touch functionality.
Comments
Post a Comment