boards: frdm_mcxn947: Add Display support

Add support for the LCD-PAR-S035 display over the
FlexIO interface.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
This commit is contained in:
Mahesh Mahadevan 2024-04-16 13:41:30 -05:00 committed by Anas Nashif
commit b2d1e4505f
5 changed files with 72 additions and 0 deletions

View file

@ -302,6 +302,11 @@ static int frdm_mcxn947_init(void)
CLOCK_SetupClk16KClocking(kCLOCK_Clk16KToVsys);
#endif
#if DT_NODE_HAS_STATUS(DT_NODELABEL(flexio0), okay)
CLOCK_SetClkDiv(kCLOCK_DivFlexioClk, 1u);
CLOCK_AttachClk(kPLL0_to_FLEXIO);
#endif
/* Set SystemCoreClock variable. */
SystemCoreClock = CLOCK_INIT_CORE_CLOCK;

View file

@ -96,6 +96,11 @@ The FRDM-MCXN947 board configuration supports the following hardware features:
+-----------+------------+-------------------------------------+
| LPTMR | on-chip | counter |
+-----------+------------+-------------------------------------+
| FLEXIO | on-chip | flexio |
+-----------+------------+-------------------------------------+
| DISPLAY | on-chip | flexio; MIPI-DBI. Tested with |
| | | :ref:`lcd_par_s035` |
+-----------+------------+-------------------------------------+
Targets available
==================

View file

@ -148,6 +148,7 @@
input-enable;
};
};
pinmux_lpadc0: pinmux_lpadc0 {
group0 {
pinmux = <ADC0_A2_PIO4_23>,
@ -176,4 +177,45 @@
input-enable;
};
};
pinmux_flexio_lcd: pinmux_flexio_lcd {
group0 {
pinmux = <FLEXIO0_D16_PIO2_8>,
<FLEXIO0_D17_PIO2_9>,
<FLEXIO0_D18_PIO2_10>,
<FLEXIO0_D19_PIO2_11>,
<FLEXIO0_D20_PIO4_12>,
<FLEXIO0_D21_PIO4_13>,
<FLEXIO0_D22_PIO4_14>,
<FLEXIO0_D23_PIO4_15>,
<FLEXIO0_D24_PIO4_16>,
<FLEXIO0_D25_PIO4_17>,
<FLEXIO0_D26_PIO4_18>,
<FLEXIO0_D27_PIO4_19>,
<FLEXIO0_D28_PIO4_20>,
<FLEXIO0_D29_PIO4_21>,
<FLEXIO0_D30_PIO4_22>,
<FLEXIO0_D31_PIO4_23>,
<PIO0_7>,
<PIO0_12>,
<PIO4_7>;
slew-rate = "fast";
drive-strength = "low";
input-enable;
};
group1 {
pinmux = <FLEXIO0_D0_PIO0_8>;
slew-rate = "fast";
drive-strength = "low";
input-enable;
bias-pull-up;
};
group2 {
pinmux = <FLEXIO0_D1_PIO0_9>;
slew-rate = "slow";
drive-strength = "low";
input-enable;
bias-pull-up;
};
};
};

View file

@ -196,6 +196,22 @@
pinctrl-names = "default";
};
nxp_flexio_lcd: &flexio0_lcd {
/* DMA channels 0, muxed to FlexIO TX */
dmas = <&edma0 0 61>;
dma-names = "tx";
shifters-count = <8>;
timers-count = <1>;
enwr-pin = <1>;
rd-pin = <0>;
data-pin-start = <16>;
reset-gpios = <&gpio4 7 GPIO_ACTIVE_HIGH>;
cs-gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
rs-gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
pinctrl-0 = <&pinmux_flexio_lcd>;
pinctrl-names = "default";
};
&lpcmp0 {
pinctrl-0 = <&pinmux_lpcmp0>;
pinctrl-names = "default";

View file

@ -178,3 +178,7 @@ zephyr_udc0: &usb1 {
&lptmr0 {
status = "okay";
};
&flexio0 {
status = "okay";
};