|
| 1 | +# Copyright (c) 2024 Texas Instruments |
| 2 | +# SPDX-License-Identifier: Apache-2.0 |
| 3 | + |
| 4 | +description: | |
| 5 | + TI MSPM0 pinctrl node. |
| 6 | +
|
| 7 | + Device pin configuration should be placed in the child nodes of this node. |
| 8 | + Populate the 'pinmux' field with a pair consisting of a pin number and its IO |
| 9 | + functions. |
| 10 | +
|
| 11 | + The node has the 'pinctrl' node label set in your SoC's devicetree, |
| 12 | + so you can modify it like this: |
| 13 | +
|
| 14 | + &pinctrl { |
| 15 | + /* your modifications go here */ |
| 16 | + }; |
| 17 | +
|
| 18 | + All device pin configurations should be placed in child nodes of the |
| 19 | + 'pinctrl' node, as in the i2c0 example shown at the end. |
| 20 | +
|
| 21 | + Here is a list of |
| 22 | + supported standard pin properties: |
| 23 | +
|
| 24 | + - bias-disable: Disable pull-up/down. |
| 25 | + - bias-pull-down: Enable pull-down resistor. |
| 26 | + - bias-pull-up: Enable pull-up resistor. |
| 27 | + - drive-open-drain: Output driver is open-drain. |
| 28 | + - drive-open-drain: Output driver is open-source. |
| 29 | + - drive-strength: Maximum current that can be sourced from the pin. |
| 30 | + - input-enable: enable input. |
| 31 | + - ti,invert-enable: enable logical inversion of a digital input or output |
| 32 | + - ti,hysteresis-enable: enable hysteresis control on open-drain pins |
| 33 | +
|
| 34 | + An example for MSPM0 family, include the chip level pinctrl |
| 35 | + DTSI file in the board level DTS: |
| 36 | +
|
| 37 | + #include <dt-bindings/pinctrl/mspm0-pinctrl.h> |
| 38 | +
|
| 39 | + We want to configure the I2C pins to open drain, with pullup enabled |
| 40 | + and input enabled. |
| 41 | +
|
| 42 | + To change a pin's pinctrl default properties add a reference to the |
| 43 | + pin in the board's DTS file or in the project overlay and set the |
| 44 | + properties. |
| 45 | +
|
| 46 | + &i2c1 { |
| 47 | + pinctrl-0 = <&i2c1_scl_pb2_pull_up &i2c1_sda_pb3_pull_up>; |
| 48 | + pinctrl-names = "default"; |
| 49 | + } |
| 50 | +
|
| 51 | + The i2c1_scl_pb2_pull_up corresponds to the following pin configuration in |
| 52 | + the board dts file: |
| 53 | +
|
| 54 | + &pinctrl { |
| 55 | + i2c1_scl_pb2_pull_up: i2c1_scl_pb2_pull_up { |
| 56 | + pinmux = <MSP_PINMUX(15,MSPM0_PIN_FUNCTION_4)>; |
| 57 | + input-enable; |
| 58 | + bias-pull-up; |
| 59 | + drive-open-drain; |
| 60 | + }; |
| 61 | + }; |
| 62 | +
|
| 63 | + Pin pb2 refers to the device pin name that one would see printed on the |
| 64 | + launchpad, and the number 15 in the pinmux define refers to the PINCMx. |
| 65 | +
|
| 66 | + These are obtained from the device-specific datasheet. |
| 67 | +
|
| 68 | +compatible: "ti,mspm0-pinctrl" |
| 69 | + |
| 70 | +include: base.yaml |
| 71 | + |
| 72 | +properties: |
| 73 | + reg: |
| 74 | + required: true |
| 75 | + |
| 76 | +child-binding: |
| 77 | + description: | |
| 78 | + This binding gives a base representation of the MSPM0 |
| 79 | + pins configuration. |
| 80 | +
|
| 81 | + include: |
| 82 | + - name: pincfg-node.yaml |
| 83 | + property-allowlist: |
| 84 | + - bias-disable |
| 85 | + - bias-pull-down |
| 86 | + - bias-pull-up |
| 87 | + - drive-open-drain |
| 88 | + - drive-open-source |
| 89 | + - drive-strength |
| 90 | + - input-enable |
| 91 | + |
| 92 | + properties: |
| 93 | + pinmux: |
| 94 | + required: true |
| 95 | + type: int |
| 96 | + description: | |
| 97 | + MSPM0 pin's configuration (IO pin, IO function). |
| 98 | +
|
| 99 | + drive-strength: |
| 100 | + enum: |
| 101 | + - 6 |
| 102 | + - 20 |
| 103 | + default: 6 |
| 104 | + description: | |
| 105 | + The drive strength controls the maximum output drive strength sunk or |
| 106 | + sourced by an I/O pin. |
| 107 | + 6: max 6 mA (SoC default) |
| 108 | + 20: max 20 mA on high-drive capable IOs only (HDIO). |
| 109 | +
|
| 110 | + ti,invert-enable: |
| 111 | + type: boolean |
| 112 | + description: | |
| 113 | + Enables inversion of the input or output using the internal |
| 114 | + inversion capability of the GPIO |
| 115 | +
|
| 116 | + ti,hysteresis-enable: |
| 117 | + type: boolean |
| 118 | + description: | |
| 119 | + Enables the hysteresis control for access to CMOS logic |
| 120 | + (on open-drain capable pins) |
0 commit comments