Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
Marek Vasut | 53fdab2 | 2011-11-08 23:18:13 +0000 | [diff] [blame] | 2 | /* |
| 3 | * Freescale i.MX28 GPIO control code |
| 4 | * |
| 5 | * Copyright (C) 2011 Marek Vasut <marek.vasut@gmail.com> |
| 6 | * on behalf of DENX Software Engineering GmbH |
Marek Vasut | 53fdab2 | 2011-11-08 23:18:13 +0000 | [diff] [blame] | 7 | */ |
| 8 | |
| 9 | #include <common.h> |
Simon Glass | 0f2af88 | 2020-05-10 11:40:05 -0600 | [diff] [blame] | 10 | #include <log.h> |
Simon Glass | 9bc1564 | 2020-02-03 07:36:16 -0700 | [diff] [blame] | 11 | #include <malloc.h> |
Simon Glass | 4dcacfc | 2020-05-10 11:40:13 -0600 | [diff] [blame] | 12 | #include <linux/bitops.h> |
Masahiro Yamada | 56a931c | 2016-09-21 11:28:55 +0900 | [diff] [blame] | 13 | #include <linux/errno.h> |
Marek Vasut | 53fdab2 | 2011-11-08 23:18:13 +0000 | [diff] [blame] | 14 | #include <asm/io.h> |
| 15 | #include <asm/arch/iomux.h> |
| 16 | #include <asm/arch/imx-regs.h> |
| 17 | |
| 18 | #if defined(CONFIG_MX23) |
| 19 | #define PINCTRL_BANKS 3 |
| 20 | #define PINCTRL_DOUT(n) (0x0500 + ((n) * 0x10)) |
| 21 | #define PINCTRL_DIN(n) (0x0600 + ((n) * 0x10)) |
| 22 | #define PINCTRL_DOE(n) (0x0700 + ((n) * 0x10)) |
| 23 | #define PINCTRL_PIN2IRQ(n) (0x0800 + ((n) * 0x10)) |
| 24 | #define PINCTRL_IRQEN(n) (0x0900 + ((n) * 0x10)) |
| 25 | #define PINCTRL_IRQSTAT(n) (0x0c00 + ((n) * 0x10)) |
| 26 | #elif defined(CONFIG_MX28) |
| 27 | #define PINCTRL_BANKS 5 |
| 28 | #define PINCTRL_DOUT(n) (0x0700 + ((n) * 0x10)) |
| 29 | #define PINCTRL_DIN(n) (0x0900 + ((n) * 0x10)) |
| 30 | #define PINCTRL_DOE(n) (0x0b00 + ((n) * 0x10)) |
| 31 | #define PINCTRL_PIN2IRQ(n) (0x1000 + ((n) * 0x10)) |
| 32 | #define PINCTRL_IRQEN(n) (0x1100 + ((n) * 0x10)) |
| 33 | #define PINCTRL_IRQSTAT(n) (0x1400 + ((n) * 0x10)) |
| 34 | #else |
| 35 | #error "Please select CONFIG_MX23 or CONFIG_MX28" |
| 36 | #endif |
| 37 | |
| 38 | #define GPIO_INT_FALL_EDGE 0x0 |
| 39 | #define GPIO_INT_LOW_LEV 0x1 |
| 40 | #define GPIO_INT_RISE_EDGE 0x2 |
| 41 | #define GPIO_INT_HIGH_LEV 0x3 |
| 42 | #define GPIO_INT_LEV_MASK (1 << 0) |
| 43 | #define GPIO_INT_POL_MASK (1 << 1) |
| 44 | |
| 45 | void mxs_gpio_init(void) |
| 46 | { |
| 47 | int i; |
| 48 | |
| 49 | for (i = 0; i < PINCTRL_BANKS; i++) { |
| 50 | writel(0, MXS_PINCTRL_BASE + PINCTRL_PIN2IRQ(i)); |
| 51 | writel(0, MXS_PINCTRL_BASE + PINCTRL_IRQEN(i)); |
| 52 | /* Use SCT address here to clear the IRQSTAT bits */ |
| 53 | writel(0xffffffff, MXS_PINCTRL_BASE + PINCTRL_IRQSTAT(i) + 8); |
| 54 | } |
| 55 | } |
| 56 | |
Lukasz Majewski | e5c207c | 2019-06-19 17:31:05 +0200 | [diff] [blame] | 57 | #if !CONFIG_IS_ENABLED(DM_GPIO) |
Joe Hershberger | f8928f1 | 2011-11-11 15:55:36 -0600 | [diff] [blame] | 58 | int gpio_get_value(unsigned gpio) |
Marek Vasut | 53fdab2 | 2011-11-08 23:18:13 +0000 | [diff] [blame] | 59 | { |
Joe Hershberger | f8928f1 | 2011-11-11 15:55:36 -0600 | [diff] [blame] | 60 | uint32_t bank = PAD_BANK(gpio); |
Marek Vasut | 53fdab2 | 2011-11-08 23:18:13 +0000 | [diff] [blame] | 61 | uint32_t offset = PINCTRL_DIN(bank); |
Otavio Salvador | 5309b00 | 2012-08-05 09:05:30 +0000 | [diff] [blame] | 62 | struct mxs_register_32 *reg = |
| 63 | (struct mxs_register_32 *)(MXS_PINCTRL_BASE + offset); |
Marek Vasut | 53fdab2 | 2011-11-08 23:18:13 +0000 | [diff] [blame] | 64 | |
Joe Hershberger | f8928f1 | 2011-11-11 15:55:36 -0600 | [diff] [blame] | 65 | return (readl(®->reg) >> PAD_PIN(gpio)) & 1; |
Marek Vasut | 53fdab2 | 2011-11-08 23:18:13 +0000 | [diff] [blame] | 66 | } |
| 67 | |
Joe Hershberger | f8928f1 | 2011-11-11 15:55:36 -0600 | [diff] [blame] | 68 | void gpio_set_value(unsigned gpio, int value) |
Marek Vasut | 53fdab2 | 2011-11-08 23:18:13 +0000 | [diff] [blame] | 69 | { |
Joe Hershberger | f8928f1 | 2011-11-11 15:55:36 -0600 | [diff] [blame] | 70 | uint32_t bank = PAD_BANK(gpio); |
Marek Vasut | 53fdab2 | 2011-11-08 23:18:13 +0000 | [diff] [blame] | 71 | uint32_t offset = PINCTRL_DOUT(bank); |
Otavio Salvador | 5309b00 | 2012-08-05 09:05:30 +0000 | [diff] [blame] | 72 | struct mxs_register_32 *reg = |
| 73 | (struct mxs_register_32 *)(MXS_PINCTRL_BASE + offset); |
Marek Vasut | 53fdab2 | 2011-11-08 23:18:13 +0000 | [diff] [blame] | 74 | |
| 75 | if (value) |
Joe Hershberger | f8928f1 | 2011-11-11 15:55:36 -0600 | [diff] [blame] | 76 | writel(1 << PAD_PIN(gpio), ®->reg_set); |
Marek Vasut | 53fdab2 | 2011-11-08 23:18:13 +0000 | [diff] [blame] | 77 | else |
Joe Hershberger | f8928f1 | 2011-11-11 15:55:36 -0600 | [diff] [blame] | 78 | writel(1 << PAD_PIN(gpio), ®->reg_clr); |
Marek Vasut | 53fdab2 | 2011-11-08 23:18:13 +0000 | [diff] [blame] | 79 | } |
| 80 | |
Joe Hershberger | f8928f1 | 2011-11-11 15:55:36 -0600 | [diff] [blame] | 81 | int gpio_direction_input(unsigned gpio) |
Marek Vasut | 53fdab2 | 2011-11-08 23:18:13 +0000 | [diff] [blame] | 82 | { |
Joe Hershberger | f8928f1 | 2011-11-11 15:55:36 -0600 | [diff] [blame] | 83 | uint32_t bank = PAD_BANK(gpio); |
Marek Vasut | 53fdab2 | 2011-11-08 23:18:13 +0000 | [diff] [blame] | 84 | uint32_t offset = PINCTRL_DOE(bank); |
Otavio Salvador | 5309b00 | 2012-08-05 09:05:30 +0000 | [diff] [blame] | 85 | struct mxs_register_32 *reg = |
| 86 | (struct mxs_register_32 *)(MXS_PINCTRL_BASE + offset); |
Marek Vasut | 53fdab2 | 2011-11-08 23:18:13 +0000 | [diff] [blame] | 87 | |
Joe Hershberger | f8928f1 | 2011-11-11 15:55:36 -0600 | [diff] [blame] | 88 | writel(1 << PAD_PIN(gpio), ®->reg_clr); |
Marek Vasut | 53fdab2 | 2011-11-08 23:18:13 +0000 | [diff] [blame] | 89 | |
| 90 | return 0; |
| 91 | } |
| 92 | |
Joe Hershberger | f8928f1 | 2011-11-11 15:55:36 -0600 | [diff] [blame] | 93 | int gpio_direction_output(unsigned gpio, int value) |
Marek Vasut | 53fdab2 | 2011-11-08 23:18:13 +0000 | [diff] [blame] | 94 | { |
Joe Hershberger | f8928f1 | 2011-11-11 15:55:36 -0600 | [diff] [blame] | 95 | uint32_t bank = PAD_BANK(gpio); |
Marek Vasut | 53fdab2 | 2011-11-08 23:18:13 +0000 | [diff] [blame] | 96 | uint32_t offset = PINCTRL_DOE(bank); |
Otavio Salvador | 5309b00 | 2012-08-05 09:05:30 +0000 | [diff] [blame] | 97 | struct mxs_register_32 *reg = |
| 98 | (struct mxs_register_32 *)(MXS_PINCTRL_BASE + offset); |
Marek Vasut | 53fdab2 | 2011-11-08 23:18:13 +0000 | [diff] [blame] | 99 | |
Joe Hershberger | f8928f1 | 2011-11-11 15:55:36 -0600 | [diff] [blame] | 100 | gpio_set_value(gpio, value); |
Marek Vasut | 53fdab2 | 2011-11-08 23:18:13 +0000 | [diff] [blame] | 101 | |
Michael Heimpold | 041487c | 2013-11-03 22:59:26 +0100 | [diff] [blame] | 102 | writel(1 << PAD_PIN(gpio), ®->reg_set); |
| 103 | |
Marek Vasut | 53fdab2 | 2011-11-08 23:18:13 +0000 | [diff] [blame] | 104 | return 0; |
| 105 | } |
| 106 | |
Joe Hershberger | f8928f1 | 2011-11-11 15:55:36 -0600 | [diff] [blame] | 107 | int gpio_request(unsigned gpio, const char *label) |
Marek Vasut | 53fdab2 | 2011-11-08 23:18:13 +0000 | [diff] [blame] | 108 | { |
Joe Hershberger | f8928f1 | 2011-11-11 15:55:36 -0600 | [diff] [blame] | 109 | if (PAD_BANK(gpio) >= PINCTRL_BANKS) |
| 110 | return -1; |
Marek Vasut | 53fdab2 | 2011-11-08 23:18:13 +0000 | [diff] [blame] | 111 | |
| 112 | return 0; |
| 113 | } |
| 114 | |
Joe Hershberger | f8928f1 | 2011-11-11 15:55:36 -0600 | [diff] [blame] | 115 | int gpio_free(unsigned gpio) |
Marek Vasut | 53fdab2 | 2011-11-08 23:18:13 +0000 | [diff] [blame] | 116 | { |
Joe Hershberger | f8928f1 | 2011-11-11 15:55:36 -0600 | [diff] [blame] | 117 | return 0; |
Marek Vasut | 53fdab2 | 2011-11-08 23:18:13 +0000 | [diff] [blame] | 118 | } |
Måns Rullgård | a7ec686 | 2015-12-15 22:27:57 +0000 | [diff] [blame] | 119 | |
| 120 | int name_to_gpio(const char *name) |
| 121 | { |
| 122 | unsigned bank, pin; |
| 123 | char *end; |
| 124 | |
| 125 | bank = simple_strtoul(name, &end, 10); |
| 126 | |
| 127 | if (!*end || *end != ':') |
| 128 | return bank; |
| 129 | |
| 130 | pin = simple_strtoul(end + 1, NULL, 10); |
| 131 | |
| 132 | return (bank << MXS_PAD_BANK_SHIFT) | (pin << MXS_PAD_PIN_SHIFT); |
| 133 | } |
Simon Glass | fa4689a | 2019-12-06 21:41:35 -0700 | [diff] [blame] | 134 | #else /* DM_GPIO */ |
Lukasz Majewski | e5c207c | 2019-06-19 17:31:05 +0200 | [diff] [blame] | 135 | #include <dm.h> |
| 136 | #include <asm/gpio.h> |
Lukasz Majewski | 70a3030 | 2019-09-05 09:55:01 +0200 | [diff] [blame] | 137 | #include <dt-structs.h> |
Lukasz Majewski | e5c207c | 2019-06-19 17:31:05 +0200 | [diff] [blame] | 138 | #include <asm/arch/gpio.h> |
| 139 | #define MXS_MAX_GPIO_PER_BANK 32 |
| 140 | |
Lukasz Majewski | 70a3030 | 2019-09-05 09:55:01 +0200 | [diff] [blame] | 141 | #ifdef CONFIG_MX28 |
| 142 | #define dtd_fsl_imx_gpio dtd_fsl_imx28_gpio |
| 143 | #else /* CONFIG_MX23 */ |
| 144 | #define dtd_fsl_imx_gpio dtd_fsl_imx23_gpio |
| 145 | #endif |
| 146 | |
Lukasz Majewski | e5c207c | 2019-06-19 17:31:05 +0200 | [diff] [blame] | 147 | DECLARE_GLOBAL_DATA_PTR; |
| 148 | /* |
| 149 | * According to i.MX28 Reference Manual: |
| 150 | * 'i.MX28 Applications Processor Reference Manual, Rev. 1, 2010' |
| 151 | * The i.MX28 has following number of GPIOs available: |
| 152 | * Bank 0: 0-28 -> 29 PINS |
| 153 | * Bank 1: 0-31 -> 32 PINS |
| 154 | * Bank 2: 0-27 -> 28 PINS |
| 155 | * Bank 3: 0-30 -> 31 PINS |
| 156 | * Bank 4: 0-20 -> 21 PINS |
| 157 | */ |
| 158 | |
Lukasz Majewski | 70a3030 | 2019-09-05 09:55:01 +0200 | [diff] [blame] | 159 | struct mxs_gpio_platdata { |
| 160 | #if CONFIG_IS_ENABLED(OF_PLATDATA) |
| 161 | struct dtd_fsl_imx_gpio dtplat; |
| 162 | #endif |
| 163 | unsigned int bank; |
| 164 | int gpio_ranges; |
| 165 | }; |
| 166 | |
Lukasz Majewski | e5c207c | 2019-06-19 17:31:05 +0200 | [diff] [blame] | 167 | struct mxs_gpio_priv { |
| 168 | unsigned int bank; |
| 169 | }; |
| 170 | |
| 171 | static int mxs_gpio_get_value(struct udevice *dev, unsigned offset) |
| 172 | { |
| 173 | struct mxs_gpio_priv *priv = dev_get_priv(dev); |
| 174 | struct mxs_register_32 *reg = |
| 175 | (struct mxs_register_32 *)(MXS_PINCTRL_BASE + |
| 176 | PINCTRL_DIN(priv->bank)); |
| 177 | |
| 178 | return (readl(®->reg) >> offset) & 1; |
| 179 | } |
| 180 | |
| 181 | static int mxs_gpio_set_value(struct udevice *dev, unsigned offset, |
| 182 | int value) |
| 183 | { |
| 184 | struct mxs_gpio_priv *priv = dev_get_priv(dev); |
| 185 | struct mxs_register_32 *reg = |
| 186 | (struct mxs_register_32 *)(MXS_PINCTRL_BASE + |
| 187 | PINCTRL_DOUT(priv->bank)); |
| 188 | if (value) |
| 189 | writel(BIT(offset), ®->reg_set); |
| 190 | else |
| 191 | writel(BIT(offset), ®->reg_clr); |
| 192 | |
| 193 | return 0; |
| 194 | } |
| 195 | |
| 196 | static int mxs_gpio_direction_input(struct udevice *dev, unsigned offset) |
| 197 | { |
| 198 | struct mxs_gpio_priv *priv = dev_get_priv(dev); |
| 199 | struct mxs_register_32 *reg = |
| 200 | (struct mxs_register_32 *)(MXS_PINCTRL_BASE + |
| 201 | PINCTRL_DOE(priv->bank)); |
| 202 | |
| 203 | writel(BIT(offset), ®->reg_clr); |
| 204 | |
| 205 | return 0; |
| 206 | } |
| 207 | |
| 208 | static int mxs_gpio_direction_output(struct udevice *dev, unsigned offset, |
| 209 | int value) |
| 210 | { |
| 211 | struct mxs_gpio_priv *priv = dev_get_priv(dev); |
| 212 | struct mxs_register_32 *reg = |
| 213 | (struct mxs_register_32 *)(MXS_PINCTRL_BASE + |
| 214 | PINCTRL_DOE(priv->bank)); |
| 215 | |
| 216 | mxs_gpio_set_value(dev, offset, value); |
| 217 | |
| 218 | writel(BIT(offset), ®->reg_set); |
| 219 | |
| 220 | return 0; |
| 221 | } |
| 222 | |
| 223 | static int mxs_gpio_get_function(struct udevice *dev, unsigned offset) |
| 224 | { |
| 225 | struct mxs_gpio_priv *priv = dev_get_priv(dev); |
| 226 | struct mxs_register_32 *reg = |
| 227 | (struct mxs_register_32 *)(MXS_PINCTRL_BASE + |
| 228 | PINCTRL_DOE(priv->bank)); |
| 229 | bool is_output = !!(readl(®->reg) >> offset); |
| 230 | |
| 231 | return is_output ? GPIOF_OUTPUT : GPIOF_INPUT; |
| 232 | } |
| 233 | |
| 234 | static const struct dm_gpio_ops gpio_mxs_ops = { |
| 235 | .direction_input = mxs_gpio_direction_input, |
| 236 | .direction_output = mxs_gpio_direction_output, |
| 237 | .get_value = mxs_gpio_get_value, |
| 238 | .set_value = mxs_gpio_set_value, |
| 239 | .get_function = mxs_gpio_get_function, |
| 240 | }; |
| 241 | |
| 242 | static int mxs_gpio_probe(struct udevice *dev) |
| 243 | { |
Lukasz Majewski | 70a3030 | 2019-09-05 09:55:01 +0200 | [diff] [blame] | 244 | struct mxs_gpio_platdata *plat = dev_get_platdata(dev); |
Lukasz Majewski | e5c207c | 2019-06-19 17:31:05 +0200 | [diff] [blame] | 245 | struct mxs_gpio_priv *priv = dev_get_priv(dev); |
| 246 | struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev); |
Lukasz Majewski | e5c207c | 2019-06-19 17:31:05 +0200 | [diff] [blame] | 247 | char name[16], *str; |
Lukasz Majewski | e5c207c | 2019-06-19 17:31:05 +0200 | [diff] [blame] | 248 | |
Lukasz Majewski | 70a3030 | 2019-09-05 09:55:01 +0200 | [diff] [blame] | 249 | #if CONFIG_IS_ENABLED(OF_PLATDATA) |
| 250 | struct dtd_fsl_imx_gpio *dtplat = &plat->dtplat; |
| 251 | priv->bank = (unsigned int)dtplat->reg[0]; |
| 252 | uc_priv->gpio_count = dtplat->gpio_ranges[3]; |
| 253 | #else |
| 254 | priv->bank = (unsigned int)plat->bank; |
| 255 | uc_priv->gpio_count = plat->gpio_ranges; |
| 256 | #endif |
Lukasz Majewski | e5c207c | 2019-06-19 17:31:05 +0200 | [diff] [blame] | 257 | snprintf(name, sizeof(name), "GPIO%d_", priv->bank); |
| 258 | str = strdup(name); |
| 259 | if (!str) |
| 260 | return -ENOMEM; |
| 261 | |
| 262 | uc_priv->bank_name = str; |
| 263 | |
Lukasz Majewski | 70a3030 | 2019-09-05 09:55:01 +0200 | [diff] [blame] | 264 | debug("%s: %s: %d pins base: 0x%x\n", __func__, uc_priv->bank_name, |
| 265 | uc_priv->gpio_count, priv->bank); |
| 266 | |
| 267 | return 0; |
| 268 | } |
| 269 | |
| 270 | #if CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA) |
| 271 | static int mxs_ofdata_to_platdata(struct udevice *dev) |
| 272 | { |
| 273 | struct mxs_gpio_platdata *plat = dev->platdata; |
| 274 | struct fdtdec_phandle_args args; |
| 275 | int node = dev_of_offset(dev); |
| 276 | int ret; |
| 277 | |
Masahiro Yamada | a89b4de | 2020-07-17 14:36:48 +0900 | [diff] [blame] | 278 | plat->bank = dev_read_addr(dev); |
Lukasz Majewski | 70a3030 | 2019-09-05 09:55:01 +0200 | [diff] [blame] | 279 | if (plat->bank == FDT_ADDR_T_NONE) { |
| 280 | printf("%s: No 'reg' property defined!\n", __func__); |
| 281 | return -EINVAL; |
| 282 | } |
| 283 | |
Lukasz Majewski | e5c207c | 2019-06-19 17:31:05 +0200 | [diff] [blame] | 284 | ret = fdtdec_parse_phandle_with_args(gd->fdt_blob, node, "gpio-ranges", |
| 285 | NULL, 3, 0, &args); |
| 286 | if (ret) |
| 287 | printf("%s: 'gpio-ranges' not defined - using default!\n", |
| 288 | __func__); |
| 289 | |
Lukasz Majewski | 70a3030 | 2019-09-05 09:55:01 +0200 | [diff] [blame] | 290 | plat->gpio_ranges = ret == 0 ? args.args[2] : MXS_MAX_GPIO_PER_BANK; |
Lukasz Majewski | e5c207c | 2019-06-19 17:31:05 +0200 | [diff] [blame] | 291 | |
| 292 | return 0; |
| 293 | } |
| 294 | |
| 295 | static const struct udevice_id mxs_gpio_ids[] = { |
| 296 | { .compatible = "fsl,imx23-gpio" }, |
| 297 | { .compatible = "fsl,imx28-gpio" }, |
| 298 | { } |
| 299 | }; |
Lukasz Majewski | 70a3030 | 2019-09-05 09:55:01 +0200 | [diff] [blame] | 300 | #endif |
Lukasz Majewski | e5c207c | 2019-06-19 17:31:05 +0200 | [diff] [blame] | 301 | |
Walter Lozano | 2901ac6 | 2020-06-25 01:10:04 -0300 | [diff] [blame] | 302 | U_BOOT_DRIVER(fsl_imx23_gpio) = { |
Lukasz Majewski | 70a3030 | 2019-09-05 09:55:01 +0200 | [diff] [blame] | 303 | .name = "fsl_imx23_gpio", |
Lukasz Majewski | e5c207c | 2019-06-19 17:31:05 +0200 | [diff] [blame] | 304 | .id = UCLASS_GPIO, |
| 305 | .ops = &gpio_mxs_ops, |
| 306 | .probe = mxs_gpio_probe, |
| 307 | .priv_auto_alloc_size = sizeof(struct mxs_gpio_priv), |
Lukasz Majewski | 70a3030 | 2019-09-05 09:55:01 +0200 | [diff] [blame] | 308 | .platdata_auto_alloc_size = sizeof(struct mxs_gpio_platdata), |
| 309 | #if CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA) |
Lukasz Majewski | e5c207c | 2019-06-19 17:31:05 +0200 | [diff] [blame] | 310 | .of_match = mxs_gpio_ids, |
Lukasz Majewski | 70a3030 | 2019-09-05 09:55:01 +0200 | [diff] [blame] | 311 | .ofdata_to_platdata = mxs_ofdata_to_platdata, |
| 312 | #endif |
Lukasz Majewski | e5c207c | 2019-06-19 17:31:05 +0200 | [diff] [blame] | 313 | }; |
Walter Lozano | 48e5b04 | 2020-06-25 01:10:06 -0300 | [diff] [blame] | 314 | |
| 315 | U_BOOT_DRIVER_ALIAS(fsl_imx23_gpio, fsl_imx28_gpio) |
Simon Glass | fa4689a | 2019-12-06 21:41:35 -0700 | [diff] [blame] | 316 | #endif /* DM_GPIO */ |