Skip to content

Commit

Permalink
LFU-834-2 pinctrl: nxp: Add support for vendor defined pinctrl config
Browse files Browse the repository at this point in the history
iMX94 has special muxing options for certain pins. Add new vendor
defined pinctrl type to SCMI pinctrl driver to handle these pins.
The MUX value field in the IOMUX table is extended to 16 bits where
the lower 8 bits represent the current IOMUX value and the upper
8 bits represent the new extended mux added in iMX94.

Signed-off-by: Ranjani Vaidyanathan <ranjani.vaidyanathan@nxp.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
  • Loading branch information
Ranjani Vaidyanathan authored and Ye Li committed Feb 26, 2025
1 parent bcc7add commit aa755bd
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion drivers/pinctrl/nxp/pinctrl-scmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
#define PINCTRL_TYPE_CONFIG 193
#define PINCTRL_TYPE_DAISY_ID 194
#define PINCTRL_TYPE_DAISY_CFG 195
#define PINCTRL_TYPE_EXT 196

#define PINCTRL_NUM_CFGS_SHIFT 2

static int imx_pinconf_scmi_set(struct udevice *dev, u32 mux_ofs, u32 mux, u32 config_val,
Expand All @@ -47,8 +49,13 @@ static int imx_pinconf_scmi_set(struct udevice *dev, u32 mux_ofs, u32 mux, u32 c
};
if (mux_ofs != 0) {
in.configs[num_cfgs].type = PINCTRL_TYPE_MUX;
in.configs[num_cfgs].val = mux;
in.configs[num_cfgs].val = mux & 0xFF;
num_cfgs++;
if (mux & 0xFF00){
in.configs[num_cfgs].type = PINCTRL_TYPE_EXT;
in.configs[num_cfgs].val = (mux & 0xFF00) >> 8;
num_cfgs++;
}
}
if (config_val != 0) {
in.configs[num_cfgs].type = PINCTRL_TYPE_CONFIG;
Expand Down

0 comments on commit aa755bd

Please sign in to comment.