blob: 400e12668229d138dfb1ac0e262f870e53a15216 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
Peng Fanf70bf2b2017-02-22 16:21:49 +08002/*
3 * Copyright (C) 2016 Freescale Semiconductor, Inc.
4 *
5 * Peng Fan <peng.fan@nxp.com>
Peng Fanf70bf2b2017-02-22 16:21:49 +08006 */
7
Simon Glass11c89f32017-05-17 17:18:03 -06008#include <dm.h>
Peng Fanf70bf2b2017-02-22 16:21:49 +08009#include <dm/pinctrl.h>
10
11#include "pinctrl-imx.h"
12
Peng Fan7f0fb442017-08-14 18:09:17 +080013static struct imx_pinctrl_soc_info imx7ulp_pinctrl_soc_info0 = {
Tom Rini364d0022023-01-10 11:19:45 -050014 .flags = ZERO_OFFSET_VALID | SHARE_MUX_CONF_REG | CFG_IBE_OBE,
Peng Fanf70bf2b2017-02-22 16:21:49 +080015};
16
Peng Fan7f0fb442017-08-14 18:09:17 +080017static struct imx_pinctrl_soc_info imx7ulp_pinctrl_soc_info1 = {
Tom Rini364d0022023-01-10 11:19:45 -050018 .flags = ZERO_OFFSET_VALID | SHARE_MUX_CONF_REG | CFG_IBE_OBE,
Peng Fan7f0fb442017-08-14 18:09:17 +080019};
20
Peng Fanf70bf2b2017-02-22 16:21:49 +080021static const struct udevice_id imx7ulp_pinctrl_match[] = {
Peng Fan7f0fb442017-08-14 18:09:17 +080022 { .compatible = "fsl,imx7ulp-iomuxc-0", .data = (ulong)&imx7ulp_pinctrl_soc_info0 },
23 { .compatible = "fsl,imx7ulp-iomuxc-1", .data = (ulong)&imx7ulp_pinctrl_soc_info1 },
Peng Fanf70bf2b2017-02-22 16:21:49 +080024 { /* sentinel */ }
25};
26
Marek Vasut5b213c32025-01-24 15:50:51 +010027static const struct pinctrl_ops imx7ulp_pinctrl_ops = {
Marek Vasut964d87c2025-01-24 15:50:56 +010028 .set_state = imx_pinctrl_set_state_mmio,
Marek Vasut4646bd92025-01-24 15:50:50 +010029};
30
Peng Fanf70bf2b2017-02-22 16:21:49 +080031U_BOOT_DRIVER(imx7ulp_pinctrl) = {
32 .name = "imx7ulp-pinctrl",
33 .id = UCLASS_PINCTRL,
34 .of_match = of_match_ptr(imx7ulp_pinctrl_match),
Marek Vasutf19a47f2025-01-24 15:50:54 +010035 .probe = imx_pinctrl_probe_mmio,
Marek Vasuta81f0d62025-01-24 15:50:55 +010036 .remove = imx_pinctrl_remove_mmio,
Simon Glass8a2b47f2020-12-03 16:55:17 -070037 .priv_auto = sizeof(struct imx_pinctrl_priv),
Marek Vasut5b213c32025-01-24 15:50:51 +010038 .ops = &imx7ulp_pinctrl_ops,
Peng Fanf70bf2b2017-02-22 16:21:49 +080039 .flags = DM_FLAG_PRE_RELOC,
Peng Fanf70bf2b2017-02-22 16:21:49 +080040};