From: Baolin Wang <baolin.wang@spreadtrum.com>
To: <broonie@kernel.org>, <robh+dt@kernel.org>, <mark.rutland@arm.com>
Cc: <linux-spi@vger.kernel.org>, <devicetree@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <baolin.wang@spreadtrum.com>,
<baolin.wang@linaro.org>
Subject: [PATCH 1/2] dt-bindings: spi: Add Spreadtrum ADI controller documentation
Date: Wed, 6 Sep 2017 14:10:43 +0800 [thread overview]
Message-ID: <ccbb0641fa123021249c7a51cbe2dcd975c41f39.1504677110.git.baolin.wang@spreadtrum.com> (raw)
This patch adds the binding documentation for Spreadtrum ADI
controller device.
Signed-off-by: Baolin Wang <baolin.wang@spreadtrum.com>
---
.../devicetree/bindings/spi/spi-sprd-adi.txt | 44 ++++++++++++++++++++
1 file changed, 44 insertions(+)
create mode 100644 Documentation/devicetree/bindings/spi/spi-sprd-adi.txt
diff --git a/Documentation/devicetree/bindings/spi/spi-sprd-adi.txt b/Documentation/devicetree/bindings/spi/spi-sprd-adi.txt
new file mode 100644
index 0000000..11c5259
--- /dev/null
+++ b/Documentation/devicetree/bindings/spi/spi-sprd-adi.txt
@@ -0,0 +1,44 @@
+Spreadtrum ADI controller based on SPI framework
+
+ADI is the abbreviation of Anolog-Digital interface, which is used to access
+analog chip (such as PMIC) from digital chip. ADI controller follows the SPI
+framework for its hardware implementation is alike to SPI bus and its timing
+is compatile to SPI timing.
+
+ADI controller has 50 channels including 2 software read/write channels and
+48 hardware channels to access analog chip. For hardware channels, we introduce
+one property named "sprd,hw-channels" to configure hardware channels, the first
+value specifies the channel id, and the second value specifies the address which
+is mapped into analog chip space.
+
+Since we have multi-subsystems will use ADI to access analog chip, then we need
+one hardware spinlock to synchronize between the multiple subsystems.
+
+Required properties:
+- compatible: Should be "sprd,sc9860-adi".
+- reg: Offset and length of ADI-SPI controller register space.
+- hwlocks: Reference to a phandle of a hwlock provider node.
+- hwlock-names: Reference to hwlock name strings defined in the same order
+ as the hwlocks.
+- #address-cells: Number of cells required to define a chip select address
+ on the ADI-SPI bus. Should be set to 1.
+- #size-cells: Size of cells required to define a chip select address size
+ on the ADI-SPI bus. Should be set to 0.
+
+Optional properties:
+- sprd,hw-channels: Specify the hardware channel number and mapped address
+ for hardware channel accessing.
+
+SPI slave nodes must be children of the SPI controller node and can contain
+properties described in Documentation/devicetree/bindings/spi/spi-bus.txt.
+
+Example:
+ adi_bus: spi@40030000 {
+ compatible = "sprd,sc9860-adi";
+ reg = <0 0x40030000 0 0x10000>;
+ hwlocks = <&hwlock1 0>;
+ hwlock-names = "adi";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ sprd,hw-channels = <30 0x8c20>;
+ };
--
1.7.9.5
next reply other threads:[~2017-09-06 6:16 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-06 6:10 Baolin Wang [this message]
2017-09-06 6:10 ` [PATCH 2/2] spi: Add ADI driver for Spreadtrum platform Baolin Wang
2017-09-06 15:04 ` Mark Brown
2017-09-07 3:13 ` Baolin Wang
2017-09-07 10:10 ` Mark Brown
2017-09-07 11:21 ` Baolin Wang
2017-09-06 14:59 ` [PATCH 1/2] dt-bindings: spi: Add Spreadtrum ADI controller documentation Mark Brown
2017-09-07 3:29 ` Baolin Wang
2017-09-07 9:54 ` Mark Brown
2017-09-07 11:03 ` Baolin Wang
2017-09-07 11:44 ` Mark Brown
2017-09-08 1:57 ` Baolin Wang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ccbb0641fa123021249c7a51cbe2dcd975c41f39.1504677110.git.baolin.wang@spreadtrum.com \
--to=baolin.wang@spreadtrum.com \
--cc=baolin.wang@linaro.org \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=robh+dt@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®