Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
Philipp Tomsich | fcc1d63 | 2017-05-05 19:21:38 +0200 | [diff] [blame] | 2 | /* |
| 3 | * eFuse driver for Rockchip devices |
| 4 | * |
| 5 | * Copyright 2017, Theobroma Systems Design und Consulting GmbH |
| 6 | * Written by Philipp Tomsich <philipp.tomsich@theobroma-systems.com> |
Philipp Tomsich | fcc1d63 | 2017-05-05 19:21:38 +0200 | [diff] [blame] | 7 | */ |
| 8 | |
| 9 | #include <common.h> |
| 10 | #include <asm/io.h> |
| 11 | #include <command.h> |
| 12 | #include <display_options.h> |
| 13 | #include <dm.h> |
| 14 | #include <linux/bitops.h> |
| 15 | #include <linux/delay.h> |
Jonas Karlman | c018965 | 2023-02-22 22:44:40 +0000 | [diff] [blame] | 16 | #include <linux/iopoll.h> |
Jonas Karlman | 26ed385 | 2023-02-22 22:44:39 +0000 | [diff] [blame] | 17 | #include <malloc.h> |
Philipp Tomsich | fcc1d63 | 2017-05-05 19:21:38 +0200 | [diff] [blame] | 18 | #include <misc.h> |
| 19 | |
Jonas Karlman | 26ed385 | 2023-02-22 22:44:39 +0000 | [diff] [blame] | 20 | #define EFUSE_CTRL 0x0000 |
Jonas Karlman | dececbb | 2023-02-22 22:44:40 +0000 | [diff] [blame] | 21 | #define RK3036_A_SHIFT 8 |
| 22 | #define RK3036_A_MASK GENMASK(15, 8) |
| 23 | #define RK3036_ADDR(n) ((n) << RK3036_A_SHIFT) |
Jonas Karlman | 836f4ec | 2023-02-22 22:44:40 +0000 | [diff] [blame] | 24 | #define RK3128_A_SHIFT 7 |
| 25 | #define RK3128_A_MASK GENMASK(15, 7) |
| 26 | #define RK3128_ADDR(n) ((n) << RK3128_A_SHIFT) |
Jonas Karlman | 14ad36d | 2023-02-22 22:44:40 +0000 | [diff] [blame] | 27 | #define RK3288_A_SHIFT 6 |
| 28 | #define RK3288_A_MASK GENMASK(15, 6) |
| 29 | #define RK3288_ADDR(n) ((n) << RK3288_A_SHIFT) |
Jonas Karlman | 26ed385 | 2023-02-22 22:44:39 +0000 | [diff] [blame] | 30 | #define RK3399_A_SHIFT 16 |
| 31 | #define RK3399_A_MASK GENMASK(25, 16) |
| 32 | #define RK3399_ADDR(n) ((n) << RK3399_A_SHIFT) |
| 33 | #define RK3399_STROBSFTSEL BIT(9) |
| 34 | #define RK3399_RSB BIT(7) |
| 35 | #define RK3399_PD BIT(5) |
Jonas Karlman | 14ad36d | 2023-02-22 22:44:40 +0000 | [diff] [blame] | 36 | #define EFUSE_PGENB BIT(3) |
| 37 | #define EFUSE_LOAD BIT(2) |
| 38 | #define EFUSE_STROBE BIT(1) |
| 39 | #define EFUSE_CSB BIT(0) |
Jonas Karlman | 26ed385 | 2023-02-22 22:44:39 +0000 | [diff] [blame] | 40 | #define EFUSE_DOUT 0x0004 |
Jonas Karlman | c018965 | 2023-02-22 22:44:40 +0000 | [diff] [blame] | 41 | #define RK3328_INT_STATUS 0x0018 |
| 42 | #define RK3328_INT_FINISH BIT(0) |
| 43 | #define RK3328_DOUT 0x0020 |
| 44 | #define RK3328_AUTO_CTRL 0x0024 |
| 45 | #define RK3328_AUTO_RD BIT(1) |
| 46 | #define RK3328_AUTO_ENB BIT(0) |
Philipp Tomsich | fcc1d63 | 2017-05-05 19:21:38 +0200 | [diff] [blame] | 47 | |
Simon Glass | b75b15b | 2020-12-03 16:55:23 -0700 | [diff] [blame] | 48 | struct rockchip_efuse_plat { |
Philipp Tomsich | fcc1d63 | 2017-05-05 19:21:38 +0200 | [diff] [blame] | 49 | void __iomem *base; |
Philipp Tomsich | fcc1d63 | 2017-05-05 19:21:38 +0200 | [diff] [blame] | 50 | }; |
| 51 | |
Jonas Karlman | 26ed385 | 2023-02-22 22:44:39 +0000 | [diff] [blame] | 52 | struct rockchip_efuse_data { |
| 53 | int (*read)(struct udevice *dev, int offset, void *buf, int size); |
Jonas Karlman | c018965 | 2023-02-22 22:44:40 +0000 | [diff] [blame] | 54 | int offset; |
Jonas Karlman | 26ed385 | 2023-02-22 22:44:39 +0000 | [diff] [blame] | 55 | int size; |
| 56 | int block_size; |
| 57 | }; |
| 58 | |
Philipp Tomsich | fcc1d63 | 2017-05-05 19:21:38 +0200 | [diff] [blame] | 59 | #if defined(DEBUG) |
Jonas Karlman | 26ed385 | 2023-02-22 22:44:39 +0000 | [diff] [blame] | 60 | static int dump_efuse(struct cmd_tbl *cmdtp, int flag, |
| 61 | int argc, char *const argv[]) |
Philipp Tomsich | fcc1d63 | 2017-05-05 19:21:38 +0200 | [diff] [blame] | 62 | { |
Philipp Tomsich | fcc1d63 | 2017-05-05 19:21:38 +0200 | [diff] [blame] | 63 | struct udevice *dev; |
Jonas Karlman | 26ed385 | 2023-02-22 22:44:39 +0000 | [diff] [blame] | 64 | u8 data[4]; |
| 65 | int ret, i; |
Philipp Tomsich | fcc1d63 | 2017-05-05 19:21:38 +0200 | [diff] [blame] | 66 | |
Philipp Tomsich | fcc1d63 | 2017-05-05 19:21:38 +0200 | [diff] [blame] | 67 | ret = uclass_get_device_by_driver(UCLASS_MISC, |
Simon Glass | 65130cd | 2020-12-28 20:34:56 -0700 | [diff] [blame] | 68 | DM_DRIVER_GET(rockchip_efuse), &dev); |
Philipp Tomsich | fcc1d63 | 2017-05-05 19:21:38 +0200 | [diff] [blame] | 69 | if (ret) { |
| 70 | printf("%s: no misc-device found\n", __func__); |
| 71 | return 0; |
| 72 | } |
| 73 | |
Jonas Karlman | 26ed385 | 2023-02-22 22:44:39 +0000 | [diff] [blame] | 74 | for (i = 0; true; i += sizeof(data)) { |
| 75 | ret = misc_read(dev, i, &data, sizeof(data)); |
John Keeping | db63528 | 2023-03-27 12:01:09 +0100 | [diff] [blame] | 76 | if (ret <= 0) |
Jonas Karlman | 26ed385 | 2023-02-22 22:44:39 +0000 | [diff] [blame] | 77 | return 0; |
Philipp Tomsich | fcc1d63 | 2017-05-05 19:21:38 +0200 | [diff] [blame] | 78 | |
Jonas Karlman | 26ed385 | 2023-02-22 22:44:39 +0000 | [diff] [blame] | 79 | print_buffer(i, data, 1, sizeof(data), sizeof(data)); |
| 80 | } |
Philipp Tomsich | fcc1d63 | 2017-05-05 19:21:38 +0200 | [diff] [blame] | 81 | |
| 82 | return 0; |
| 83 | } |
| 84 | |
| 85 | U_BOOT_CMD( |
Jonas Karlman | 26ed385 | 2023-02-22 22:44:39 +0000 | [diff] [blame] | 86 | dump_efuse, 1, 1, dump_efuse, |
| 87 | "Dump the content of the efuse", |
Philipp Tomsich | fcc1d63 | 2017-05-05 19:21:38 +0200 | [diff] [blame] | 88 | "" |
| 89 | ); |
| 90 | #endif |
| 91 | |
Jonas Karlman | dececbb | 2023-02-22 22:44:40 +0000 | [diff] [blame] | 92 | static int rockchip_rk3036_efuse_read(struct udevice *dev, int offset, |
| 93 | void *buf, int size) |
| 94 | { |
| 95 | struct rockchip_efuse_plat *efuse = dev_get_plat(dev); |
| 96 | u8 *buffer = buf; |
| 97 | |
| 98 | /* Switch to read mode */ |
| 99 | writel(EFUSE_LOAD, efuse->base + EFUSE_CTRL); |
| 100 | udelay(2); |
| 101 | |
| 102 | while (size--) { |
| 103 | clrsetbits_le32(efuse->base + EFUSE_CTRL, RK3036_A_MASK, |
| 104 | RK3036_ADDR(offset++)); |
| 105 | udelay(2); |
| 106 | setbits_le32(efuse->base + EFUSE_CTRL, EFUSE_STROBE); |
| 107 | udelay(2); |
| 108 | *buffer++ = (u8)(readl(efuse->base + EFUSE_DOUT) & 0xFF); |
| 109 | clrbits_le32(efuse->base + EFUSE_CTRL, EFUSE_STROBE); |
| 110 | udelay(2); |
| 111 | } |
| 112 | |
| 113 | /* Switch to inactive mode */ |
| 114 | writel(0x0, efuse->base + EFUSE_CTRL); |
| 115 | |
| 116 | return 0; |
| 117 | } |
| 118 | |
Jonas Karlman | 836f4ec | 2023-02-22 22:44:40 +0000 | [diff] [blame] | 119 | static int rockchip_rk3128_efuse_read(struct udevice *dev, int offset, |
| 120 | void *buf, int size) |
| 121 | { |
| 122 | struct rockchip_efuse_plat *efuse = dev_get_plat(dev); |
| 123 | u8 *buffer = buf; |
| 124 | |
| 125 | /* Switch to read mode */ |
| 126 | writel(EFUSE_LOAD, efuse->base + EFUSE_CTRL); |
| 127 | udelay(2); |
| 128 | |
| 129 | while (size--) { |
| 130 | clrsetbits_le32(efuse->base + EFUSE_CTRL, RK3128_A_MASK, |
| 131 | RK3128_ADDR(offset++)); |
| 132 | udelay(2); |
| 133 | setbits_le32(efuse->base + EFUSE_CTRL, EFUSE_STROBE); |
| 134 | udelay(2); |
| 135 | *buffer++ = (u8)(readl(efuse->base + EFUSE_DOUT) & 0xFF); |
| 136 | clrbits_le32(efuse->base + EFUSE_CTRL, EFUSE_STROBE); |
| 137 | udelay(2); |
| 138 | } |
| 139 | |
| 140 | /* Switch to inactive mode */ |
| 141 | writel(0x0, efuse->base + EFUSE_CTRL); |
| 142 | |
| 143 | return 0; |
| 144 | } |
| 145 | |
Jonas Karlman | 14ad36d | 2023-02-22 22:44:40 +0000 | [diff] [blame] | 146 | static int rockchip_rk3288_efuse_read(struct udevice *dev, int offset, |
| 147 | void *buf, int size) |
| 148 | { |
| 149 | struct rockchip_efuse_plat *efuse = dev_get_plat(dev); |
| 150 | u8 *buffer = buf; |
| 151 | |
| 152 | /* Switch to read mode */ |
| 153 | writel(EFUSE_CSB, efuse->base + EFUSE_CTRL); |
| 154 | writel(EFUSE_LOAD | EFUSE_PGENB, efuse->base + EFUSE_CTRL); |
| 155 | udelay(2); |
| 156 | |
| 157 | while (size--) { |
| 158 | clrsetbits_le32(efuse->base + EFUSE_CTRL, RK3288_A_MASK, |
| 159 | RK3288_ADDR(offset++)); |
| 160 | udelay(2); |
| 161 | setbits_le32(efuse->base + EFUSE_CTRL, EFUSE_STROBE); |
| 162 | udelay(2); |
| 163 | *buffer++ = (u8)(readl(efuse->base + EFUSE_DOUT) & 0xFF); |
| 164 | clrbits_le32(efuse->base + EFUSE_CTRL, EFUSE_STROBE); |
| 165 | udelay(2); |
| 166 | } |
| 167 | |
| 168 | /* Switch to standby mode */ |
| 169 | writel(EFUSE_CSB | EFUSE_PGENB, efuse->base + EFUSE_CTRL); |
| 170 | |
| 171 | return 0; |
| 172 | } |
| 173 | |
Jonas Karlman | c018965 | 2023-02-22 22:44:40 +0000 | [diff] [blame] | 174 | static int rockchip_rk3328_efuse_read(struct udevice *dev, int offset, |
| 175 | void *buf, int size) |
| 176 | { |
| 177 | struct rockchip_efuse_plat *efuse = dev_get_plat(dev); |
| 178 | u32 status, *buffer = buf; |
| 179 | int ret; |
| 180 | |
| 181 | while (size--) { |
| 182 | writel(RK3328_AUTO_RD | RK3328_AUTO_ENB | RK3399_ADDR(offset++), |
| 183 | efuse->base + RK3328_AUTO_CTRL); |
| 184 | udelay(1); |
| 185 | |
| 186 | ret = readl_poll_sleep_timeout(efuse->base + RK3328_INT_STATUS, |
| 187 | status, (status & RK3328_INT_FINISH), 1, 50); |
| 188 | if (ret) |
| 189 | return ret; |
| 190 | |
| 191 | *buffer++ = readl(efuse->base + RK3328_DOUT); |
| 192 | writel(RK3328_INT_FINISH, efuse->base + RK3328_INT_STATUS); |
| 193 | } |
| 194 | |
| 195 | return 0; |
| 196 | } |
| 197 | |
Philipp Tomsich | fcc1d63 | 2017-05-05 19:21:38 +0200 | [diff] [blame] | 198 | static int rockchip_rk3399_efuse_read(struct udevice *dev, int offset, |
| 199 | void *buf, int size) |
| 200 | { |
Jonas Karlman | 26ed385 | 2023-02-22 22:44:39 +0000 | [diff] [blame] | 201 | struct rockchip_efuse_plat *efuse = dev_get_plat(dev); |
| 202 | u32 *buffer = buf; |
Philipp Tomsich | fcc1d63 | 2017-05-05 19:21:38 +0200 | [diff] [blame] | 203 | |
Jonas Karlman | 26ed385 | 2023-02-22 22:44:39 +0000 | [diff] [blame] | 204 | /* Switch to array read mode */ |
Jonas Karlman | 14ad36d | 2023-02-22 22:44:40 +0000 | [diff] [blame] | 205 | writel(EFUSE_LOAD | EFUSE_PGENB | RK3399_STROBSFTSEL | RK3399_RSB, |
Jonas Karlman | 26ed385 | 2023-02-22 22:44:39 +0000 | [diff] [blame] | 206 | efuse->base + EFUSE_CTRL); |
Philipp Tomsich | fcc1d63 | 2017-05-05 19:21:38 +0200 | [diff] [blame] | 207 | udelay(1); |
Jonas Karlman | 26ed385 | 2023-02-22 22:44:39 +0000 | [diff] [blame] | 208 | |
| 209 | while (size--) { |
| 210 | setbits_le32(efuse->base + EFUSE_CTRL, |
Jonas Karlman | 14ad36d | 2023-02-22 22:44:40 +0000 | [diff] [blame] | 211 | EFUSE_STROBE | RK3399_ADDR(offset++)); |
Philipp Tomsich | fcc1d63 | 2017-05-05 19:21:38 +0200 | [diff] [blame] | 212 | udelay(1); |
Jonas Karlman | 26ed385 | 2023-02-22 22:44:39 +0000 | [diff] [blame] | 213 | *buffer++ = readl(efuse->base + EFUSE_DOUT); |
Jonas Karlman | 14ad36d | 2023-02-22 22:44:40 +0000 | [diff] [blame] | 214 | clrbits_le32(efuse->base + EFUSE_CTRL, EFUSE_STROBE); |
Philipp Tomsich | fcc1d63 | 2017-05-05 19:21:38 +0200 | [diff] [blame] | 215 | udelay(1); |
Philipp Tomsich | fcc1d63 | 2017-05-05 19:21:38 +0200 | [diff] [blame] | 216 | } |
| 217 | |
Jonas Karlman | 26ed385 | 2023-02-22 22:44:39 +0000 | [diff] [blame] | 218 | /* Switch to power-down mode */ |
Jonas Karlman | 14ad36d | 2023-02-22 22:44:40 +0000 | [diff] [blame] | 219 | writel(RK3399_PD | EFUSE_CSB, efuse->base + EFUSE_CTRL); |
Philipp Tomsich | fcc1d63 | 2017-05-05 19:21:38 +0200 | [diff] [blame] | 220 | |
| 221 | return 0; |
| 222 | } |
| 223 | |
| 224 | static int rockchip_efuse_read(struct udevice *dev, int offset, |
| 225 | void *buf, int size) |
| 226 | { |
Jonas Karlman | 26ed385 | 2023-02-22 22:44:39 +0000 | [diff] [blame] | 227 | const struct rockchip_efuse_data *data = |
| 228 | (void *)dev_get_driver_data(dev); |
| 229 | u32 block_start, block_end, block_offset, blocks; |
| 230 | u8 *buffer; |
| 231 | int ret; |
| 232 | |
| 233 | if (offset < 0 || !buf || size <= 0 || offset + size > data->size) |
| 234 | return -EINVAL; |
| 235 | |
| 236 | if (!data->read) |
| 237 | return -ENOSYS; |
| 238 | |
Jonas Karlman | c018965 | 2023-02-22 22:44:40 +0000 | [diff] [blame] | 239 | offset += data->offset; |
| 240 | |
John Keeping | db63528 | 2023-03-27 12:01:09 +0100 | [diff] [blame] | 241 | if (data->block_size <= 1) { |
| 242 | ret = data->read(dev, offset, buf, size); |
| 243 | goto done; |
| 244 | } |
Jonas Karlman | 26ed385 | 2023-02-22 22:44:39 +0000 | [diff] [blame] | 245 | |
| 246 | block_start = offset / data->block_size; |
| 247 | block_offset = offset % data->block_size; |
| 248 | block_end = DIV_ROUND_UP(offset + size, data->block_size); |
| 249 | blocks = block_end - block_start; |
| 250 | |
| 251 | buffer = calloc(blocks, data->block_size); |
| 252 | if (!buffer) |
| 253 | return -ENOMEM; |
| 254 | |
| 255 | ret = data->read(dev, block_start, buffer, blocks); |
| 256 | if (!ret) |
| 257 | memcpy(buf, buffer + block_offset, size); |
| 258 | |
| 259 | free(buffer); |
John Keeping | db63528 | 2023-03-27 12:01:09 +0100 | [diff] [blame] | 260 | |
| 261 | done: |
| 262 | return ret < 0 ? ret : size; |
Philipp Tomsich | fcc1d63 | 2017-05-05 19:21:38 +0200 | [diff] [blame] | 263 | } |
| 264 | |
| 265 | static const struct misc_ops rockchip_efuse_ops = { |
| 266 | .read = rockchip_efuse_read, |
| 267 | }; |
| 268 | |
Simon Glass | aad29ae | 2020-12-03 16:55:21 -0700 | [diff] [blame] | 269 | static int rockchip_efuse_of_to_plat(struct udevice *dev) |
Philipp Tomsich | fcc1d63 | 2017-05-05 19:21:38 +0200 | [diff] [blame] | 270 | { |
Simon Glass | b75b15b | 2020-12-03 16:55:23 -0700 | [diff] [blame] | 271 | struct rockchip_efuse_plat *plat = dev_get_plat(dev); |
Philipp Tomsich | fcc1d63 | 2017-05-05 19:21:38 +0200 | [diff] [blame] | 272 | |
Philipp Tomsich | 3b50596 | 2017-09-12 17:32:26 +0200 | [diff] [blame] | 273 | plat->base = dev_read_addr_ptr(dev); |
Jonas Karlman | 26ed385 | 2023-02-22 22:44:39 +0000 | [diff] [blame] | 274 | |
Philipp Tomsich | fcc1d63 | 2017-05-05 19:21:38 +0200 | [diff] [blame] | 275 | return 0; |
| 276 | } |
| 277 | |
Jonas Karlman | dececbb | 2023-02-22 22:44:40 +0000 | [diff] [blame] | 278 | static const struct rockchip_efuse_data rk3036_data = { |
| 279 | .read = rockchip_rk3036_efuse_read, |
| 280 | .size = 0x20, |
| 281 | }; |
| 282 | |
Jonas Karlman | 836f4ec | 2023-02-22 22:44:40 +0000 | [diff] [blame] | 283 | static const struct rockchip_efuse_data rk3128_data = { |
| 284 | .read = rockchip_rk3128_efuse_read, |
| 285 | .size = 0x40, |
| 286 | }; |
| 287 | |
Jonas Karlman | 14ad36d | 2023-02-22 22:44:40 +0000 | [diff] [blame] | 288 | static const struct rockchip_efuse_data rk3288_data = { |
| 289 | .read = rockchip_rk3288_efuse_read, |
| 290 | .size = 0x20, |
Jonas Karlman | c018965 | 2023-02-22 22:44:40 +0000 | [diff] [blame] | 291 | }; |
| 292 | |
| 293 | static const struct rockchip_efuse_data rk3328_data = { |
| 294 | .read = rockchip_rk3328_efuse_read, |
| 295 | .offset = 0x60, |
| 296 | .size = 0x20, |
| 297 | .block_size = 4, |
Jonas Karlman | 14ad36d | 2023-02-22 22:44:40 +0000 | [diff] [blame] | 298 | }; |
| 299 | |
Jonas Karlman | 26ed385 | 2023-02-22 22:44:39 +0000 | [diff] [blame] | 300 | static const struct rockchip_efuse_data rk3399_data = { |
| 301 | .read = rockchip_rk3399_efuse_read, |
| 302 | .size = 0x80, |
| 303 | .block_size = 4, |
| 304 | }; |
| 305 | |
Philipp Tomsich | fcc1d63 | 2017-05-05 19:21:38 +0200 | [diff] [blame] | 306 | static const struct udevice_id rockchip_efuse_ids[] = { |
Jonas Karlman | 26ed385 | 2023-02-22 22:44:39 +0000 | [diff] [blame] | 307 | { |
Jonas Karlman | dececbb | 2023-02-22 22:44:40 +0000 | [diff] [blame] | 308 | .compatible = "rockchip,rk3036-efuse", |
| 309 | .data = (ulong)&rk3036_data, |
| 310 | }, |
| 311 | { |
Jonas Karlman | 14ad36d | 2023-02-22 22:44:40 +0000 | [diff] [blame] | 312 | .compatible = "rockchip,rk3066a-efuse", |
| 313 | .data = (ulong)&rk3288_data, |
| 314 | }, |
| 315 | { |
Jonas Karlman | 836f4ec | 2023-02-22 22:44:40 +0000 | [diff] [blame] | 316 | .compatible = "rockchip,rk3128-efuse", |
| 317 | .data = (ulong)&rk3128_data, |
| 318 | }, |
| 319 | { |
Jonas Karlman | 14ad36d | 2023-02-22 22:44:40 +0000 | [diff] [blame] | 320 | .compatible = "rockchip,rk3188-efuse", |
| 321 | .data = (ulong)&rk3288_data, |
| 322 | }, |
| 323 | { |
| 324 | .compatible = "rockchip,rk3228-efuse", |
| 325 | .data = (ulong)&rk3288_data, |
| 326 | }, |
| 327 | { |
| 328 | .compatible = "rockchip,rk3288-efuse", |
| 329 | .data = (ulong)&rk3288_data, |
| 330 | }, |
| 331 | { |
Jonas Karlman | c018965 | 2023-02-22 22:44:40 +0000 | [diff] [blame] | 332 | .compatible = "rockchip,rk3328-efuse", |
| 333 | .data = (ulong)&rk3328_data, |
| 334 | }, |
| 335 | { |
Jonas Karlman | 26ed385 | 2023-02-22 22:44:39 +0000 | [diff] [blame] | 336 | .compatible = "rockchip,rk3399-efuse", |
| 337 | .data = (ulong)&rk3399_data, |
| 338 | }, |
Philipp Tomsich | fcc1d63 | 2017-05-05 19:21:38 +0200 | [diff] [blame] | 339 | {} |
| 340 | }; |
| 341 | |
| 342 | U_BOOT_DRIVER(rockchip_efuse) = { |
| 343 | .name = "rockchip_efuse", |
| 344 | .id = UCLASS_MISC, |
| 345 | .of_match = rockchip_efuse_ids, |
Simon Glass | aad29ae | 2020-12-03 16:55:21 -0700 | [diff] [blame] | 346 | .of_to_plat = rockchip_efuse_of_to_plat, |
Jonas Karlman | 26ed385 | 2023-02-22 22:44:39 +0000 | [diff] [blame] | 347 | .plat_auto = sizeof(struct rockchip_efuse_plat), |
Philipp Tomsich | fcc1d63 | 2017-05-05 19:21:38 +0200 | [diff] [blame] | 348 | .ops = &rockchip_efuse_ops, |
| 349 | }; |