diff mbox series

[06/12] nvmem: sunxi-sid: add support for A64/H5's SID controller

Message ID 20171009132641.27169-7-srinivas.kandagatla@linaro.org
State Superseded
Headers show
Series nvmem: patches set-1 for v4.15 | expand

Commit Message

Srinivas Kandagatla Oct. 9, 2017, 1:26 p.m. UTC
From: Icenowy Zheng <icenowy@aosc.io>


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>

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>

---
 Documentation/devicetree/bindings/nvmem/allwinner,sunxi-sid.txt | 1 +
 drivers/nvmem/sunxi_sid.c                                       | 6 ++++++
 2 files changed, 7 insertions(+)

-- 
2.11.0

Comments

Greg KH Oct. 20, 2017, 1:36 p.m. UTC | #1
On Mon, Oct 09, 2017 at 03:26:35PM +0200, srinivas.kandagatla@linaro.org wrote:
> From: Icenowy Zheng <icenowy@aosc.io>

> 

> 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>

> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>

> ---

>  Documentation/devicetree/bindings/nvmem/allwinner,sunxi-sid.txt | 1 +

>  drivers/nvmem/sunxi_sid.c                                       | 6 ++++++

>  2 files changed, 7 insertions(+)


I need a DT maintainer's ack for this, right?

thanks,

greg k-h
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/nvmem/allwinner,sunxi-sid.txt b/Documentation/devicetree/bindings/nvmem/allwinner,sunxi-sid.txt
index ef06d061913c..6ea0836939ee 100644
--- a/Documentation/devicetree/bindings/nvmem/allwinner,sunxi-sid.txt
+++ b/Documentation/devicetree/bindings/nvmem/allwinner,sunxi-sid.txt
@@ -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
 
diff --git a/drivers/nvmem/sunxi_sid.c b/drivers/nvmem/sunxi_sid.c
index 1c3b5cf89212..99bd54d85fcb 100644
--- a/drivers/nvmem/sunxi_sid.c
+++ b/drivers/nvmem/sunxi_sid.c
@@ -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);