kernel: update nvmem subsystem to the latest upstream
[openwrt/staging/dedeckeh.git] / target / linux / generic / backport-5.10 / 808-v5.18-0005-nvmem-sunxi_sid-Add-support-for-D1-variant.patch
1 From 07ae4fde9efada7878e1383d6ccc7da70315ca23 Mon Sep 17 00:00:00 2001
2 From: Samuel Holland <samuel@sholland.org>
3 Date: Sun, 20 Feb 2022 15:15:20 +0000
4 Subject: [PATCH] nvmem: sunxi_sid: Add support for D1 variant
5
6 D1 has a smaller eFuse block than some other recent SoCs, and it no
7 longer requires a workaround to read the eFuse data.
8
9 Signed-off-by: Samuel Holland <samuel@sholland.org>
10 Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
11 Link: https://lore.kernel.org/r/20220220151527.17216-7-srinivas.kandagatla@linaro.org
12 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
13 ---
14 drivers/nvmem/sunxi_sid.c | 6 ++++++
15 1 file changed, 6 insertions(+)
16
17 --- a/drivers/nvmem/sunxi_sid.c
18 +++ b/drivers/nvmem/sunxi_sid.c
19 @@ -184,6 +184,11 @@ static const struct sunxi_sid_cfg sun8i_
20 .need_register_readout = true,
21 };
22
23 +static const struct sunxi_sid_cfg sun20i_d1_cfg = {
24 + .value_offset = 0x200,
25 + .size = 0x100,
26 +};
27 +
28 static const struct sunxi_sid_cfg sun50i_a64_cfg = {
29 .value_offset = 0x200,
30 .size = 0x100,
31 @@ -200,6 +205,7 @@ static const struct of_device_id sunxi_s
32 { .compatible = "allwinner,sun7i-a20-sid", .data = &sun7i_a20_cfg },
33 { .compatible = "allwinner,sun8i-a83t-sid", .data = &sun50i_a64_cfg },
34 { .compatible = "allwinner,sun8i-h3-sid", .data = &sun8i_h3_cfg },
35 + { .compatible = "allwinner,sun20i-d1-sid", .data = &sun20i_d1_cfg },
36 { .compatible = "allwinner,sun50i-a64-sid", .data = &sun50i_a64_cfg },
37 { .compatible = "allwinner,sun50i-h5-sid", .data = &sun50i_a64_cfg },
38 { .compatible = "allwinner,sun50i-h6-sid", .data = &sun50i_h6_cfg },