|
| 1 | +# Copyright (c) 2022 NXP |
| 2 | +# SPDX-License-Identifier: Apache-2.0 |
| 3 | + |
| 4 | +description: | |
| 5 | + The node has the 'pinctrl' node label set in MCUX RT SoC's devicetree. These |
| 6 | + nodes can be autogenerated using the MCUXpresso config tools combined with |
| 7 | + the rt_dts_gen.py script in NXP's HAL. The mux, mode, input, daisy, and cfg |
| 8 | + fields in a group select the pins to be configured, and the remaining |
| 9 | + devicetree properties set configuration values for those pins |
| 10 | + for example, here is an group configuring LPUART1 pins: |
| 11 | +
|
| 12 | + group0 { |
| 13 | + pinmux = <&iomuxc_gpio_ad_b0_12_lpuart1_tx, |
| 14 | + &iomuxc_gpio_ad_b0_13_lpuart1_rx>; |
| 15 | + drive-strength = "r0-6"; |
| 16 | + slew-rate = "slow"; |
| 17 | + nxp,speed = "100-mhz"; |
| 18 | + }; |
| 19 | +
|
| 20 | + Note that the mux, mode, input, daisy, and cfg values must be aligned for |
| 21 | + correct configuration |
| 22 | + This will select GPIO_AD_B0_12 as LPUART1 TX, and GPIO_AD_B0_13 as LPUART1 RX. |
| 23 | + Both pins will be configured with a weak latch, drive strength of "r0-6", |
| 24 | + slow slew rate, and 100 MHZ speed. |
| 25 | + Note that the soc level iomuxc dts file can be examined to find the possible |
| 26 | + pinmux options. Here are the affects of each property on the |
| 27 | + IOMUXC SW_PAD_CTL register: |
| 28 | + input-schmitt-enable: HYS=1 |
| 29 | + drive-open-drain: ODE=1 |
| 30 | + input-enable: SION=1 (in SW_MUX_CTL_PAD register) |
| 31 | + bias-pull-down: PUE=1, PUS=<bias-pull-down-value> |
| 32 | + bias-pull-up: PUE=1, PUS=<bias-pull-up-value> |
| 33 | + bias-disable: PKE=0 |
| 34 | + slew-rate: SRE=<enum_idx> |
| 35 | + drive-strength: DSE=<enum_idx> |
| 36 | + nxp,speed: SPEED=<enum_idx> |
| 37 | +
|
| 38 | + If only required properties are supplied, the pin will have the following |
| 39 | + configuration: |
| 40 | + HYS=0, |
| 41 | + ODE=0, |
| 42 | + SION=0, |
| 43 | + PUE=0, |
| 44 | + PUS=0, |
| 45 | + PKE=1, |
| 46 | + SRE=<slew-rate>, |
| 47 | + DSE=<drive-strength>, |
| 48 | + SPEED=<nxp,speed> |
| 49 | +
|
| 50 | +
|
| 51 | +compatible: "nxp,mcux-rt-pinctrl" |
| 52 | + |
| 53 | +include: |
| 54 | + - name: base.yaml |
| 55 | + - name: pincfg-node-group.yaml |
| 56 | + child-binding: |
| 57 | + child-binding: |
| 58 | + property-allowlist: |
| 59 | + - input-schmitt-enable |
| 60 | + - drive-open-drain |
| 61 | + - input-enable |
| 62 | + - bias-disable |
| 63 | + - bias-pull-down |
| 64 | + - bias-pull-up |
| 65 | + |
| 66 | +child-binding: |
| 67 | + description: MCUX RT pin controller pin group |
| 68 | + child-binding: |
| 69 | + description: | |
| 70 | + MCUX RT pin controller pin configuration node. |
| 71 | + properties: |
| 72 | + pinmux: |
| 73 | + required: true |
| 74 | + type: phandles |
| 75 | + description: | |
| 76 | + Pin mux selections for this group. See the soc level iomuxc DTSI file |
| 77 | + for a defined list of these options. |
| 78 | + drive-strength: |
| 79 | + required: true |
| 80 | + type: string |
| 81 | + enum: |
| 82 | + - "disabled" |
| 83 | + - "r0" |
| 84 | + - "r0-2" |
| 85 | + - "r0-3" |
| 86 | + - "r0-4" |
| 87 | + - "r0-5" |
| 88 | + - "r0-6" |
| 89 | + - "r0-7" |
| 90 | + description: | |
| 91 | + Pin output drive strength. Sets the DSE field in the IOMUXC peripheral. |
| 92 | + the drive strength is expressed as a output impedance at a given voltage, |
| 93 | + but maximum current values can be calculated from these impedances |
| 94 | + for a specific load impedance. |
| 95 | + 000 DSE_0_output_driver_disabled_ — output driver disabled |
| 96 | + 001 DSE_1_R0_1 — 157 Ohm impedance @3.3V, 260 Ohm impedance @1.8V |
| 97 | + 010 DSE_2_R0_2 — 78 Ohm @3.3V, 130 Ohm @1.8V |
| 98 | + 011 DSE_3_R0_3 — 53 Ohm @3.3V, 88 Ohm @1.8V |
| 99 | + 100 DSE_4_R0_4 — 39 Ohm @3.3V, 65 Ohm @1.8V |
| 100 | + 101 DSE_5_R0_5 — 32 Ohm @3.3V, 52 Ohm @1.8V |
| 101 | + 110 DSE_6_R0_6 — 32 Ohm @3.3V, 43 Ohm @1.8V |
| 102 | + 111 DSE_7_R0_7 — 26 Ohm @3.3V, 37 Ohm @1.8V |
| 103 | + bias-pull-up-value: |
| 104 | + required: false |
| 105 | + type: string |
| 106 | + default: "47k" |
| 107 | + enum: |
| 108 | + - "unused" |
| 109 | + - "47k" |
| 110 | + - "100k" |
| 111 | + - "22k" |
| 112 | + description: | |
| 113 | + Select the value of the pull up resistor present on this pin |
| 114 | + Corresponds to the PUS field in the IOMUXC peripheral. |
| 115 | + 47k resistor selected as default due to this being the default pullup |
| 116 | + value on most SOC pins |
| 117 | + 00 Unused- no change will be applied to pin |
| 118 | + 01 PUS_1_47K_Ohm_Pull_Up — 47K Ohm Pull Up |
| 119 | + 10 PUS_2_100K_Ohm_Pull_Up — 100K Ohm Pull Up |
| 120 | + 11 PUS_2_22K_Ohm_Pull_Up — 22K Ohm Pull Up |
| 121 | +
|
| 122 | + bias-pull-down-value: |
| 123 | + required: false |
| 124 | + type: string |
| 125 | + default: "100k" |
| 126 | + enum: |
| 127 | + - "100k" |
| 128 | + description: | |
| 129 | + Select the value of the pull up resistor present on this pin |
| 130 | + Corresponds to the PUS field in the IOMUXC peripheral. 100k is |
| 131 | + currently the only supported pull down resistance. |
| 132 | + 00 PUS_0_100K_Ohm_Pull_Down - 100K Ohm Pull Down |
| 133 | + slew-rate: |
| 134 | + required: true |
| 135 | + type: string |
| 136 | + enum: |
| 137 | + - "slow" |
| 138 | + - "fast" |
| 139 | + description: | |
| 140 | + Select slew rate for pin. Corresponds to SRE field in IOMUXC peripheral |
| 141 | + 0 SRE_0_Slow_Slew_Rate — Slow Slew Rate |
| 142 | + 1 SRE_1_Fast_Slew_Rate — Fast Slew Rate |
| 143 | + nxp,speed: |
| 144 | + required: false |
| 145 | + type: string |
| 146 | + enum: |
| 147 | + - "50-mhz" |
| 148 | + - "100-mhz" |
| 149 | + - "150-mhz" |
| 150 | + - "200-mhz" |
| 151 | + description: | |
| 152 | + Sets pin speed. Corresponds to SPEED field in IOMUXC peripheral |
| 153 | + 00 SPEED_0_low_50MHz_ — low(50MHz) |
| 154 | + 01 SPEED_1_medium_100MHz_ — medium(100MHz) |
| 155 | + 10 SPEED_2_medium_150MHz_ — medium(150MHz) |
| 156 | + 11 SPEED_3_max_200MHz_ — max(200MHz) |
0 commit comments