1/*
2 * Copyright (c) 2023 Renesas Electronics Corporation
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7 #include <zephyr/dt-bindings/gpio/gpio.h>
8 #include <zephyr/dt-bindings/display/panel.h>
9
10/ {
11	chosen {
12		zephyr,display = &lcdc;
13		zephyr,touch = &display_touch;
14	};
15
16	lvgl_pointer {
17		input = <&display_touch>;
18		status = "okay";
19		swap-xy;
20	};
21};
22
23&pinctrl {
24	i2c2_default: i2c2_default {
25		group1 {
26			pinmux = <SMARTBOND_PINMUX(I2C2_SDA, 0, 19)>,
27				 <SMARTBOND_PINMUX(I2C2_SCL, 0, 18)>;
28			bias-pull-up;
29		};
30	};
31
32	i2c2_sleep: i2c2_sleep {
33		group1 {
34			pinmux = <SMARTBOND_PINMUX(GPIO, 0, 19)>,
35				 <SMARTBOND_PINMUX(GPIO, 0, 18)>;
36			bias-pull-up;
37		};
38	};
39};
40
41&i2c2 {
42	clock-frequency = <400000>;
43	status = "okay";
44
45	display_touch: ft6206@38 {
46		compatible = "focaltech,ft5336";
47		status = "okay";
48		reg = <0x38>;
49		int-gpios = <&gpio0 31 GPIO_ACTIVE_LOW>;
50	};
51};
52
53&lcdc {
54	status = "okay";
55	pinctrl-0 = <&display_controller_default>;
56	pinctrl-1 = <&display_controller_sleep>;
57	pinctrl-names = "default", "sleep";
58	width = <480>;
59	height = <272>;
60	disp-gpios = <&gpio0 25 GPIO_ACTIVE_HIGH>;
61	pixel-format = <PANEL_PIXEL_FORMAT_RGB_565>;
62
63	/*
64	 * Panel settings for the NHD-4.3-480272EF-ASXP-CTP
65	 * display panel model which integrates the SC7283
66	 * driver IC.
67	 */
68	display-timings {
69		compatible = "zephyr,panel-timing";
70		hsync-len = <2>;
71		hfront-porch = <2>;
72		hback-porch = <3>;
73		vsync-len = <2>;
74		vfront-porch = <2>;
75		vback-porch = <2>;
76		hsync-active = <0>;
77		vsync-active = <0>;
78		de-active = <1>;
79		pixelclk-active = <1>;
80		clock-frequency = <12000000>;
81	};
82};
83