nvmem: sunxi-sid: add support for A64/H5's SID controller
authorIcenowy Zheng <icenowy@aosc.io>
Tue, 24 Oct 2017 09:54:34 +0000 (10:54 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 Nov 2017 13:19:06 +0000 (14:19 +0100)
Allwinner A64/H5 SoCs come with a SID controller like the one in H3, but
without the silicon bug that makes the initial value at 0x200 wrong, so
the value at 0x200 can be directly read.

Add support for this kind of SID controller.

Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Documentation/devicetree/bindings/nvmem/allwinner,sunxi-sid.txt
drivers/nvmem/sunxi_sid.c

index ef06d061913cfc1aa2d488073b53f9800fd33cd9..6ea0836939ee10ecb75fae0702e4b3d218ebdcf7 100644 (file)
@@ -5,6 +5,7 @@ Required properties:
   "allwinner,sun4i-a10-sid"
   "allwinner,sun7i-a20-sid"
   "allwinner,sun8i-h3-sid"
+  "allwinner,sun50i-a64-sid"
 
 - reg: Should contain registers location and length
 
index 1c3b5cf892123db41f65e7e2bad4109ccfadfe2d..99bd54d85fcbab9a30a4a5f952a8e82a0388dca1 100644 (file)
@@ -198,10 +198,16 @@ static const struct sunxi_sid_cfg sun8i_h3_cfg = {
        .need_register_readout = true,
 };
 
+static const struct sunxi_sid_cfg sun50i_a64_cfg = {
+       .value_offset = 0x200,
+       .size = 0x100,
+};
+
 static const struct of_device_id sunxi_sid_of_match[] = {
        { .compatible = "allwinner,sun4i-a10-sid", .data = &sun4i_a10_cfg },
        { .compatible = "allwinner,sun7i-a20-sid", .data = &sun7i_a20_cfg },
        { .compatible = "allwinner,sun8i-h3-sid", .data = &sun8i_h3_cfg },
+       { .compatible = "allwinner,sun50i-a64-sid", .data = &sun50i_a64_cfg },
        {/* sentinel */},
 };
 MODULE_DEVICE_TABLE(of, sunxi_sid_of_match);