Skip to content

Commit 77dcab7

Browse files
NeilChen93henrikbrixandersen
authored andcommitted
boards: nxp: frdm_mcxa156: Support flexio for NXP frdm_mcxa156 board
Support flexio for NXP frdm_mcxa156 board. Signed-off-by: Neil Chen <[email protected]>
1 parent 009269f commit 77dcab7

File tree

4 files changed

+87
-0
lines changed

4 files changed

+87
-0
lines changed

boards/nxp/frdm_mcxa156/board.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,11 @@ static int frdm_mcxa156_init(void)
155155
CLOCK_AttachClk(kFRO_HF_DIV_to_FLEXCAN0);
156156
#endif
157157

158+
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(flexio0))
159+
CLOCK_SetClockDiv(kCLOCK_DivFLEXIO0, 1u);
160+
CLOCK_AttachClk(kFRO_HF_to_FLEXIO0);
161+
#endif
162+
158163
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(lpadc0))
159164
CLOCK_SetClockDiv(kCLOCK_DivADC0, 1u);
160165
CLOCK_AttachClk(kFRO12M_to_ADC0);

boards/nxp/frdm_mcxa156/doc/index.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,11 @@ The FRDM-MCXA156 board configuration supports the following hardware features:
6464
+-----------+------------+-------------------------------------+
6565
| FLEXCAN | on-chip | CAN |
6666
+-----------+------------+-------------------------------------+
67+
| FLEXIO | on-chip | flexio |
68+
+-----------+------------+-------------------------------------+
69+
| DISPLAY | on-chip | flexio; MIPI-DBI. Tested with |
70+
| | | :ref:`lcd_par_s035` |
71+
+-----------+------------+-------------------------------------+
6772
| I2C | on-chip | i2c |
6873
+-----------+------------+-------------------------------------+
6974
| LPCMP | on-chip | sensor(comparator) |

boards/nxp/frdm_mcxa156/frdm_mcxa156-pinctrl.dtsi

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,46 @@
3232
input-enable;
3333
};
3434
};
35+
pinmux_flexio_lcd: pinmux_flexio_lcd {
36+
group0 {
37+
pinmux = <FLEXIO0_D0_P0_16>,
38+
<FLEXIO0_D1_P0_17>,
39+
<FLEXIO0_D2_P0_18>,
40+
<FLEXIO0_D3_P0_19>,
41+
<FLEXIO0_D4_P0_20>,
42+
<FLEXIO0_D5_P0_21>,
43+
<FLEXIO0_D6_P0_22>,
44+
<FLEXIO0_D7_P0_23>,
45+
<FLEXIO0_D8_P2_0>,
46+
<FLEXIO0_D9_P2_1>,
47+
<FLEXIO0_D10_P4_2>,
48+
<FLEXIO0_D11_P4_3>,
49+
<FLEXIO0_D12_P4_4>,
50+
<FLEXIO0_D13_P4_5>,
51+
<FLEXIO0_D14_P4_6>,
52+
<FLEXIO0_D15_P4_7>,
53+
<P2_17>,
54+
<P2_19>,
55+
<P3_0>;
56+
slew-rate = "fast";
57+
drive-strength = "low";
58+
input-enable;
59+
};
60+
group1 {
61+
pinmux = <FLEXIO0_D28_P2_20>;
62+
slew-rate = "fast";
63+
drive-strength = "low";
64+
input-enable;
65+
bias-pull-up;
66+
};
67+
group2 {
68+
pinmux = <FLEXIO0_D31_P2_23>;
69+
slew-rate = "slow";
70+
drive-strength = "low";
71+
input-enable;
72+
bias-pull-up;
73+
};
74+
};
3575
pinmux_flexpwm0_pwm0: pinmux_flexpwm0_pwm0 {
3676
group0 {
3777
pinmux = <PWM0_A0_P3_6>,

boards/nxp/frdm_mcxa156/frdm_mcxa156.dts

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,18 @@
6666
};
6767
};
6868

69+
/*
70+
* This node describes the GPIO pins of the LCD-PAR-S035 panel 8080 interface.
71+
*/
72+
nxp_lcd_8080_connector: lcd-8080-connector {
73+
compatible = "nxp,lcd-8080";
74+
#gpio-cells = <2>;
75+
gpio-map-mask = <0xffffffff 0xffffffc0>;
76+
gpio-map-pass-thru = <0 0x3f>;
77+
gpio-map = <9 0 &gpio2 15 0>, /* Pin 9, LCD touch INT */
78+
<10 0 &gpio3 22 0>, /* Pin 10, LCD backlight control */
79+
<11 0 &gpio3 0 0>; /* Pin 11, LCD and touch reset */
80+
};
6981
};
7082

7183
&gpio0 {
@@ -115,6 +127,31 @@
115127
pinctrl-names = "default";
116128
};
117129

130+
&flexio0 {
131+
status = "okay";
132+
};
133+
134+
nxp_8080_touch_panel_i2c: &lpi2c2 {
135+
pinctrl-0 = <&pinmux_lpi2c2>;
136+
pinctrl-names = "default";
137+
};
138+
139+
zephyr_mipi_dbi_parallel: &flexio0_lcd {
140+
/* DMA channels 0, muxed to FlexIO TX */
141+
dmas = <&edma0 0 71>;
142+
dma-names = "tx";
143+
shifters-count = <4>;
144+
timers-count = <1>;
145+
enwr-pin = <31>;
146+
rd-pin = <28>;
147+
data-pin-start = <0>;
148+
reset-gpios = <&gpio3 0 GPIO_ACTIVE_HIGH>;
149+
cs-gpios = <&gpio2 19 GPIO_ACTIVE_HIGH>;
150+
rs-gpios = <&gpio2 17 GPIO_ACTIVE_HIGH>;
151+
pinctrl-0 = <&pinmux_flexio_lcd>;
152+
pinctrl-names = "default";
153+
};
154+
118155
&flexpwm0_pwm0 {
119156
status = "okay";
120157
pinctrl-0 = <&pinmux_flexpwm0_pwm0>;

0 commit comments

Comments
 (0)