Skip to content

Commit fce0316

Browse files
committed
boards: nxp: frdm_mcxaxx6: add FlexIO parallel LCD support
Enable the LCD-PAR-S035 8080 parallel display shield on the FRDM-MCXA266 and FRDM-MCXA366 boards. - Add the FlexIO MIPI-DBI parallel LCD (nxp,mipi-dbi-flexio-lcdif) node to both board device trees, wiring the WR/RD/data/reset/CS/RS signals and the FlexIO LCD pinmux. - Add an nxp,lcd-8080 connector to board_common.dtsi describing the touch interrupt, backlight and reset GPIOs. - Enable lpi2c3 as the 8080 touch panel I2C bus and add the required pinctrl groups for both boards. - Enable the PORT/GPIO clocking needed by the display in board.c. - Register frdm_mcxa266 and frdm_mcxa366 with the lcd_par_s035_8080 shield in the display sample and display_check test. Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
1 parent 697b323 commit fce0316

8 files changed

Lines changed: 148 additions & 1 deletion

File tree

boards/nxp/frdm_mcxaxx6/board.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ void board_early_init_hook(void)
314314
#endif
315315

316316
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(flexio0))
317-
CLOCK_SetClockDiv(kCLOCK_DivFLEXIO0, 2u);
317+
CLOCK_SetClockDiv(kCLOCK_DivFLEXIO0, 1u);
318318
CLOCK_AttachClk(kFRO_HF_to_FLEXIO0);
319319
RESET_ReleasePeripheralReset(kFLEXIO0_RST_SHIFT_RSTn);
320320
#endif

boards/nxp/frdm_mcxaxx6/board_common.dtsi

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,19 @@
101101
<ARDUINO_HEADER_R3_D14 0 &gpio1 8 0>, /* SDA */
102102
<ARDUINO_HEADER_R3_D15 0 &gpio1 9 0>; /* SCL */
103103
};
104+
105+
nxp_lcd_8080_connector: lcd-8080-connector {
106+
compatible = "nxp,lcd-8080";
107+
#gpio-cells = <2>;
108+
gpio-map-mask = <0xffffffff 0xffffffc0>;
109+
gpio-map-pass-thru = <0 0x3f>;
110+
gpio-map = <9 0 &gpio2 24 0>, /* Touch INT */
111+
<10 0 &gpio4 4 0>, /* Backlight */
112+
<11 0 &gpio4 3 0>; /* Reset */
113+
};
104114
};
105115

116+
106117
/* Port configurations */
107118
&porta {
108119
status = "okay";

boards/nxp/frdm_mcxaxx6/frdm_mcxa266-pinctrl.dtsi

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,4 +153,47 @@
153153
drive-strength = "low";
154154
};
155155
};
156+
157+
pinmux_flexio_lcd: pinmux_flexio_lcd {
158+
group0 {
159+
pinmux = <FLEXIO0_D16_P2_8>,
160+
<FLEXIO0_D17_P2_9>,
161+
<FLEXIO0_D18_P2_10>,
162+
<FLEXIO0_D19_P2_11>,
163+
<FLEXIO0_D20_P3_12>,
164+
<FLEXIO0_D21_P3_13>,
165+
<FLEXIO0_D22_P2_14>,
166+
<FLEXIO0_D23_P1_15>,
167+
<FLEXIO0_D24_P3_24>,
168+
<FLEXIO0_D25_P3_25>,
169+
<FLEXIO0_D26_P2_18>,
170+
<FLEXIO0_D27_P1_19>,
171+
<FLEXIO0_D28_P3_20>,
172+
<FLEXIO0_D29_P3_29>,
173+
<FLEXIO0_D30_P2_22>,
174+
<FLEXIO0_D31_P3_23>;
175+
drive-strength = "low";
176+
slew-rate = "fast";
177+
input-enable;
178+
};
179+
180+
group1 {
181+
pinmux = <FLEXIO0_D7_P0_7>;
182+
drive-strength = "low";
183+
slew-rate = "fast";
184+
input-enable;
185+
bias-pull-up;
186+
};
187+
188+
group2 {
189+
pinmux = <FLEXIO0_D8_P4_0>;
190+
drive-strength = "low";
191+
slew-rate = "fast";
192+
input-enable;
193+
bias-pull-up;
194+
};
195+
196+
};
156197
};
198+
199+

boards/nxp/frdm_mcxaxx6/frdm_mcxa266.dts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,33 @@
4646

4747
&flexio0 {
4848
status = "okay";
49+
50+
zephyr_mipi_dbi_parallel: flexio-lcd {
51+
compatible = "nxp,mipi-dbi-flexio-lcdif";
52+
#address-cells = <1>;
53+
#size-cells = <0>;
54+
dmas = <&edma0 0 71>;
55+
dma-names = "tx";
56+
shifters-count = <4>;
57+
timers-count = <1>;
58+
enwr-pin = <7>;
59+
rd-pin = <8>;
60+
data-pin-start = <16>;
61+
reset-gpios = <&gpio4 3 GPIO_ACTIVE_HIGH>;
62+
cs-gpios = <&gpio3 16 GPIO_ACTIVE_HIGH>;
63+
rs-gpios = <&gpio4 1 GPIO_ACTIVE_HIGH>;
64+
pinctrl-0 = <&pinmux_flexio_lcd>;
65+
pinctrl-names = "default";
66+
};
67+
};
68+
69+
nxp_8080_touch_panel_i2c: &lpi2c3 {
70+
status = "okay";
4971
};
5072

5173
zephyr_udc0: &usb {
5274
status = "okay";
5375
num-bidir-endpoints = <8>;
5476
};
77+
78+

boards/nxp/frdm_mcxaxx6/frdm_mcxa366-pinctrl.dtsi

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,4 +186,47 @@
186186
drive-strength = "low";
187187
};
188188
};
189+
190+
pinmux_flexio_lcd: pinmux_flexio_lcd {
191+
group0 {
192+
pinmux = <FLEXIO0_D16_P2_8>,
193+
<FLEXIO0_D17_P2_9>,
194+
<FLEXIO0_D18_P2_10>,
195+
<FLEXIO0_D19_P2_11>,
196+
<FLEXIO0_D20_P3_12>,
197+
<FLEXIO0_D21_P3_13>,
198+
<FLEXIO0_D22_P2_14>,
199+
<FLEXIO0_D23_P1_15>,
200+
<FLEXIO0_D24_P3_24>,
201+
<FLEXIO0_D25_P3_25>,
202+
<FLEXIO0_D26_P2_18>,
203+
<FLEXIO0_D27_P1_19>,
204+
<FLEXIO0_D28_P3_20>,
205+
<FLEXIO0_D29_P3_29>,
206+
<FLEXIO0_D30_P2_22>,
207+
<FLEXIO0_D31_P3_23>;
208+
drive-strength = "low";
209+
slew-rate = "fast";
210+
input-enable;
211+
};
212+
213+
group1 {
214+
pinmux = <FLEXIO0_D7_P0_7>;
215+
drive-strength = "low";
216+
slew-rate = "fast";
217+
input-enable;
218+
bias-pull-up;
219+
};
220+
221+
group2 {
222+
pinmux = <FLEXIO0_D8_P4_0>;
223+
drive-strength = "low";
224+
slew-rate = "fast";
225+
input-enable;
226+
bias-pull-up;
227+
};
228+
229+
};
189230
};
231+
232+

boards/nxp/frdm_mcxaxx6/frdm_mcxa366.dts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,28 @@
5757

5858
&flexio0 {
5959
status = "okay";
60+
61+
zephyr_mipi_dbi_parallel: flexio-lcd {
62+
compatible = "nxp,mipi-dbi-flexio-lcdif";
63+
#address-cells = <1>;
64+
#size-cells = <0>;
65+
dmas = <&edma0 0 71>;
66+
dma-names = "tx";
67+
shifters-count = <4>;
68+
timers-count = <1>;
69+
enwr-pin = <7>;
70+
rd-pin = <8>;
71+
data-pin-start = <16>;
72+
reset-gpios = <&gpio4 3 GPIO_ACTIVE_HIGH>;
73+
cs-gpios = <&gpio3 16 GPIO_ACTIVE_HIGH>;
74+
rs-gpios = <&gpio4 1 GPIO_ACTIVE_HIGH>;
75+
pinctrl-0 = <&pinmux_flexio_lcd>;
76+
pinctrl-names = "default";
77+
};
78+
};
79+
80+
nxp_8080_touch_panel_i2c: &lpi2c3 {
81+
status = "okay";
6082
};
6183

6284
zephyr_udc0: &usb {

samples/drivers/display/tests.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,8 @@ tests:
111111
- platform:frdm_mcxn236/mcxn236:SHIELD=lcd_par_s035_8080
112112
- platform:frdm_mcxa156/mcxa156:SHIELD=lcd_par_s035_8080
113113
- platform:frdm_mcxa577:SHIELD=lcd_par_s035_8080
114+
- platform:frdm_mcxa266/mcxa266:SHIELD=lcd_par_s035_8080
115+
- platform:frdm_mcxa366/mcxa366:SHIELD=lcd_par_s035_8080
114116
- platform:frdm_rw612/rw612:SHIELD=lcd_par_s035_spi
115117
- platform:ek_ra8d1:SHIELD=rtkmipilcdb00000be
116118
- platform:ek_ra8d1:SHIELD=rtk7eka6m3b00001bu

tests/drivers/display/display_check/tests.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ tests:
9999
- platform:frdm_mcxn236/mcxn236:SHIELD=lcd_par_s035_8080
100100
- platform:frdm_mcxa156/mcxa156:SHIELD=lcd_par_s035_8080
101101
- platform:frdm_mcxa577:SHIELD=lcd_par_s035_8080
102+
- platform:frdm_mcxa266/mcxa266:SHIELD=lcd_par_s035_8080
103+
- platform:frdm_mcxa366/mcxa366:SHIELD=lcd_par_s035_8080
102104
- platform:frdm_rw612/rw612:SHIELD=lcd_par_s035_spi
103105
- platform:ek_ra8d1:SHIELD=rtkmipilcdb00000be
104106
- platform:ek_ra8d1:SHIELD=rtk7eka6m3b00001bu

0 commit comments

Comments
 (0)