From: srinivas.kandagatla@linaro.org
To: gregkh@linuxfoundation.org, broonie@kernel.org,
alsa-devel@alsa-project.org
Cc: mark.rutland@arm.com, michael.opdenacker@free-electrons.com,
poeschel@lemonage.de, srinivas.kandagatla@linaro.org,
andreas.noever@gmail.com, arnd@arndb.de, vinod.koul@intel.com,
bp@suse.de, devicetree@vger.kernel.org, james.hogan@imgtec.com,
pawel.moll@arm.com, linux-arm-msm@vger.kernel.org,
sharon.dvir1@mail.huji.ac.il, robh+dt@kernel.org,
sdharia@codeaurora.org, alan@linux.intel.com, treding@nvidia.com,
mathieu.poirier@linaro.org, jkosina@suse.cz,
linux-kernel@vger.kernel.org, daniel@ffwll.ch, joe@perches.com,
davem@davemloft.net
Subject: [PATCH v8 01/13] Documentation: Add SLIMbus summary
Date: Thu, 30 Nov 2017 17:41:48 +0000 [thread overview]
Message-ID: <20171130174200.6684-2-srinivas.kandagatla@linaro.org> (raw)
In-Reply-To: <20171130174200.6684-1-srinivas.kandagatla@linaro.org>
From: Sagar Dharia <sdharia@codeaurora.org>
SLIMbus (Serial Low Power Interchip Media Bus) is a specification
developed by MIPI (Mobile Industry Processor Interface) alliance.
SLIMbus is a 2-wire implementation, which is used to communicate with
peripheral components like audio-codec.
The summary of SLIMbus and API is documented in the 'summary' file.
Signed-off-by: Sagar Dharia <sdharia@codeaurora.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
Documentation/driver-api/slimbus/index.rst | 15 ++++
Documentation/driver-api/slimbus/summary.rst | 108 +++++++++++++++++++++++++++
2 files changed, 123 insertions(+)
create mode 100644 Documentation/driver-api/slimbus/index.rst
create mode 100644 Documentation/driver-api/slimbus/summary.rst
diff --git a/Documentation/driver-api/slimbus/index.rst b/Documentation/driver-api/slimbus/index.rst
new file mode 100644
index 000000000000..586f979659e6
--- /dev/null
+++ b/Documentation/driver-api/slimbus/index.rst
@@ -0,0 +1,15 @@
+=====================
+SLIMbus Documentation
+=====================
+
+.. toctree::
+ :maxdepth: 1
+
+ summary
+
+.. only:: subproject
+
+ Indices
+ =======
+
+ * :ref:`genindex`
diff --git a/Documentation/driver-api/slimbus/summary.rst b/Documentation/driver-api/slimbus/summary.rst
new file mode 100644
index 000000000000..ba165611725a
--- /dev/null
+++ b/Documentation/driver-api/slimbus/summary.rst
@@ -0,0 +1,108 @@
+============================
+Linux kernel SLIMbus support
+============================
+
+Overview
+========
+
+What is SLIMbus?
+----------------
+SLIMbus (Serial Low Power Interchip Media Bus) is a specification developed by
+MIPI (Mobile Industry Processor Interface) alliance. The bus uses master/slave
+configuration, and is a 2-wire multi-drop implementation (clock, and data).
+
+Currently, SLIMbus is used to interface between application processors of SoCs
+(System-on-Chip) and peripheral components (typically codec).SLIMbus uses
+Time-Division-Multiplexing to accommodate multiple data channels, and
+a control channel.
+
+The control channel is used for various control functions such as bus
+management, configuration and status updates.These messages can be unicast (e.g.
+reading/writing device specific values), or multicast (e.g. data channel
+reconfiguration sequence is a broadcast message announced to all devices)
+
+A data channel is used for data-transfer between 2 SLIMbus devices. Data
+channel uses dedicated ports on the device.
+
+Hardware description:
+---------------------
+SLIMbus specification has different types of device classifications based on
+their capabilities.
+A manager device is responsible for enumeration, configuration, and dynamic
+channel allocation. Every bus has 1 active manager.
+
+A generic device is a device providing application functionality (e.g. codec).
+
+Framer device is responsible for clocking the bus, and transmitting frame-sync
+and framing information on the bus.
+
+Each SLIMbus component has an interface device for monitoring physical layer.
+
+Typically each SoC contains SLIMbus component having 1 manager, 1 framer device,
+1 generic device (for data channel support), and 1 interface device.
+External peripheral SLIMbus component usually has 1 generic device (for
+functionality/data channel support), and an associated interface device.
+The generic device's registers are mapped as 'value elements' so that they can
+be written/read using SLIMbus control channel exchanging control/status type of
+information.
+In case there are multiple framer devices on the same bus, manager device is
+responsible to select the active-framer for clocking the bus.
+
+Per specification, SLIMbus uses "clock gears" to do power management based on
+current frequency and bandwidth requirements. There are 10 clock gears and each
+gear changes the SLIMbus frequency to be twice its previous gear.
+
+Each device has a 6-byte enumeration-address and the manager assigns every
+device with a 1-byte logical address after the devices report presence on the
+bus.
+
+Software description:
+---------------------
+There are 2 types of SLIMbus drivers:
+
+slim_controller represents a 'controller' for SLIMbus. This driver should
+implement duties needed by the SoC (manager device, associated
+interface device for monitoring the layers and reporting errors, default
+framer device).
+
+slim_device represents the 'generic device/component' for SLIMbus, and a
+slim_driver should implement driver for that slim_device.
+
+Device notifications to the driver:
+-----------------------------------
+Since SLIMbus devices have mechanisms for reporting their presence, the
+framework allows drivers to bind when corresponding devices report their
+presence on the bus.
+However, it is possible that the driver needs to be probed
+first so that it can enable corresponding SLIMbus device (e.g. power it up and/or
+take it out of reset). To support that behavior, the framework allows drivers
+to probe first as well (e.g. using standard DeviceTree compatbility field).
+This creates the necessity for the driver to know when the device is functional
+(i.e. reported present). device_up callback is used for that reason when the
+device reports present and is assigned a logical address by the controller.
+
+Similarly, SLIMbus devices 'report absent' when they go down. A 'device_down'
+callback notifies the driver when the device reports absent and its logical
+address assignment is invalidated by the controller.
+
+Another notification "boot_device" is used to notify the slim_driver when
+controller resets the bus. This notification allows the driver to take necessary
+steps to boot the device so that it's functional after the bus has been reset.
+
+Clock-pause:
+------------
+SLIMbus mandates that a reconfiguration sequence (known as clock-pause) be
+broadcast to all active devices on the bus before the bus can enter low-power
+mode. Controller uses this sequence when it decides to enter low-power mode so
+that corresponding clocks and/or power-rails can be turned off to save power.
+Clock-pause is exited by waking up framer device (if controller driver initiates
+exiting low power mode), or by toggling the data line (if a slave device wants
+to initiate it).
+
+Messaging APIs:
+---------------
+The framework supports APIs to exchange control-information with a SLIMbus
+device. APIs can be synchronous or asynchronous.
+From controller's perspective, multiple buffers can be queued to/from
+hardware for sending/receiving data using slim_ctrl_buf circular buffer.
+The header file <linux/slimbus.h> has more documentation about messaging APIs.
--
2.15.0
next prev parent reply other threads:[~2017-11-30 17:41 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-30 17:41 [PATCH v8 00/13] Introduce framework for SLIMbus device driver srinivas.kandagatla
2017-11-30 17:41 ` srinivas.kandagatla [this message]
2017-12-01 10:27 ` [PATCH v8 01/13] Documentation: Add SLIMbus summary Jonathan Neuschäfer
2017-12-05 22:01 ` Srinivas Kandagatla
2017-11-30 17:41 ` [PATCH v8 02/13] dt-bindings: Add SLIMbus bindings srinivas.kandagatla
2017-11-30 17:41 ` [PATCH v8 03/13] slimbus: Add SLIMbus bus type srinivas.kandagatla
2017-11-30 17:41 ` [PATCH v8 04/13] slimbus: core: Add slim controllers support srinivas.kandagatla
2017-11-30 17:41 ` [PATCH v8 05/13] slimbus: core: add support to device tree helper srinivas.kandagatla
2017-11-30 17:41 ` [PATCH v8 06/13] slimbus: Add messaging APIs to slimbus framework srinivas.kandagatla
2017-11-30 17:41 ` [PATCH v8 07/13] slimbus: Add support for 'clock-pause' feature srinivas.kandagatla
2017-11-30 19:25 ` Philippe Ombredanne
2017-12-01 9:51 ` Greg Kroah-Hartman
2017-12-01 9:54 ` Srinivas Kandagatla
2017-11-30 17:41 ` [PATCH v8 08/13] regmap: add SLIMbus support srinivas.kandagatla
2017-11-30 17:41 ` [PATCH v8 09/13] slimbus: core: add common defines required for controllers srinivas.kandagatla
2017-11-30 17:41 ` [PATCH v8 10/13] dt-bindings: Add qcom slimbus controller bindings srinivas.kandagatla
[not found] ` <20171130174200.6684-11-srinivas.kandagatla-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2017-12-04 21:28 ` Rob Herring
2017-12-05 22:03 ` Srinivas Kandagatla
2017-11-30 17:41 ` [PATCH v8 11/13] slimbus: qcom: Add Qualcomm Slimbus controller driver srinivas.kandagatla
2017-11-30 17:41 ` [PATCH v8 12/13] slimbus: qcom: Add runtime-pm support using clock-pause srinivas.kandagatla
2017-11-30 17:42 ` [PATCH v8 13/13] MAINTAINERS: Add SLIMbus maintainer srinivas.kandagatla
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=20171130174200.6684-2-srinivas.kandagatla@linaro.org \
--to=srinivas.kandagatla@linaro.org \
--cc=alan@linux.intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=andreas.noever@gmail.com \
--cc=arnd@arndb.de \
--cc=bp@suse.de \
--cc=broonie@kernel.org \
--cc=daniel@ffwll.ch \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=james.hogan@imgtec.com \
--cc=jkosina@suse.cz \
--cc=joe@perches.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mathieu.poirier@linaro.org \
--cc=michael.opdenacker@free-electrons.com \
--cc=pawel.moll@arm.com \
--cc=poeschel@lemonage.de \
--cc=robh+dt@kernel.org \
--cc=sdharia@codeaurora.org \
--cc=sharon.dvir1@mail.huji.ac.il \
--cc=treding@nvidia.com \
--cc=vinod.koul@intel.com \
/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;
as well as URLs for NNTP newsgroup(s).