devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
To: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
	vkoul@kernel.org, broonie@kernel.org
Cc: bgoswami@codeaurora.org, plai@codeaurora.org, robh+dt@kernel.org,
	devicetree@vger.kernel.org, lgirdwood@gmail.com,
	alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/4] dt-bindings: soundwire: add slave bindings
Date: Thu, 8 Aug 2019 17:48:56 +0100	[thread overview]
Message-ID: <cdd2bded-551c-65f5-ca29-d2bb825bdaba@linaro.org> (raw)
In-Reply-To: <d346b2af-f285-4c53-b706-46a129ab7951@linux.intel.com>


On 08/08/2019 16:58, Pierre-Louis Bossart wrote:
> 
>> +++ b/Documentation/devicetree/bindings/soundwire/slave.txt
>> @@ -0,0 +1,46 @@
>> +SoundWire slave device bindings.
>> +
>> +SoundWire is a 2-pin multi-drop interface with data and clock line.
>> +It facilitates development of low cost, efficient, high performance 
>> systems.
>> +
>> +SoundWire slave devices:
>> +Every SoundWire controller node can contain zero or more child nodes
>> +representing slave devices on the bus. Every SoundWire slave device is
>> +uniquely determined by the enumeration address containing 5 fields:
>> +SoundWire Version, Instance ID, Manufacturer ID, Part ID and Class ID
>> +for a device. Addition to below required properties, child nodes can
>> +have device specific bindings.
> 
> In case the controller supports multiple links, what's the encoding then?
> in the MIPI DisCo spec there is a linkId field in the _ADR encoding that 
> helps identify which link the Slave device is connected to
>  >> +
>> +Required property for SoundWire child node if it is present:
>> +- compatible:     "sdwVER,MFD,PID,CID". The textual representation of
>> +          SoundWire Enumeration address comprising SoundWire
>> +          Version, Manufacturer ID, Part ID and Class ID,
>> +          shall be in lower-case hexadecimal with leading
>> +          zeroes suppressed.
>> +          Version number '0x10' represents SoundWire 1.0
>> +          Version number '0x11' represents SoundWire 1.1
>> +          ex: "sdw10,0217,2010,0"
>> +
>> +- sdw-instance-id: Should be ('Instance ID') from SoundWire
>> +          Enumeration Address. Instance ID is for the cases
>> +          where multiple Devices of the same type or Class
>> +          are attached to the bus.
> 
> so it is actually required if you have a single Slave device? Or is it 
> only required when you have more than 1 device of the same type?
> 

This is mandatory for any slave device!

> FWIW in the MIPI DisCo spec we kept the instanceID as part of the _ADR, 
> so it's implicitly mandatory (and ignored by the bus if there is only 
> one device of the same time)
> 
>> +
>> +SoundWire example for Qualcomm's SoundWire controller:
>> +
>> +soundwire@c2d0000 {
>> +    compatible = "qcom,soundwire-v1.5.0"
>> +    reg = <0x0c2d0000 0x2000>;
>> +
>> +    spkr_left:wsa8810-left{
>> +        compatible = "sdw10,0217,2010,0";
>> +        sdw-instance-id = <1>;
>> +        ...
>> +    };
>> +
>> +    spkr_right:wsa8810-right{
>> +        compatible = "sdw10,0217,2010,0";
>> +        sdw-instance-id = <2>;
> 
> Isn't the MIPI encoding reported in the Dev_ID0..5 registers 0-based?
> 
>> +        ...
>> +    };
>> +};
>>
> 
> And now that I think of it, wouldn't it be simpler for everyone if we 
> aligned on that MIPI DisCo public spec? e.g. you'd have one property 
> with a 64-bit number that follows the MIPI spec. No special encoding 
> necessary for device tree cases, your DT blob would use this:

Thanks for the suggestion, adding 64 device bits as compatible string 
should take care of linkID too. I will give that a go!

> 
> soundwire@c2d0000 {
>      compatible = "qcom,soundwire-v1.5.0"
>      reg = <0x0c2d0000 0x2000>;
> 
>      spkr_left:wsa8810-left{
>          compatible = "sdw00 00 10 02 17 20 10 00"
>      }
> 
>      spkr_right:wsa8810-right{
>          compatible = "sdw0000100217201100"
>      }
> }
> 
> We could use parentheses if it makes people happier, but the information 
> from the MIPI DisCo spec can be used as is, and provide a means for spec 
> changes via reserved bits.

  reply	other threads:[~2019-08-08 16:48 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-08 14:45 [PATCH v2 0/4] ASoC: codecs: Add WSA881x Smart Speaker amplifier support Srinivas Kandagatla
2019-08-08 14:45 ` [PATCH v2 1/4] dt-bindings: soundwire: add slave bindings Srinivas Kandagatla
2019-08-08 15:58   ` Pierre-Louis Bossart
2019-08-08 16:48     ` Srinivas Kandagatla [this message]
2019-08-08 19:52       ` Mark Brown
2019-08-09  4:54         ` Vinod Koul
2019-08-09  8:25           ` Srinivas Kandagatla
2019-08-09  5:00   ` Vinod Koul
2019-08-08 14:45 ` [PATCH v2 2/4] soundwire: core: add device tree support for slave devices Srinivas Kandagatla
2019-08-08 15:00   ` Pierre-Louis Bossart
2019-08-08 15:17     ` Srinivas Kandagatla
2019-08-09  5:46       ` Vinod Koul
2019-08-09  8:24         ` Srinivas Kandagatla
2019-08-09  5:07   ` Vinod Koul
2019-08-09  8:24     ` Srinivas Kandagatla
2019-08-08 14:45 ` [PATCH v2 3/4] dt-bindings: ASoC: Add WSA881x bindings Srinivas Kandagatla
2019-08-08 14:45 ` [PATCH v2 4/4] ASoC: codecs: add wsa881x amplifier support Srinivas Kandagatla
2019-08-08 15:18   ` [alsa-devel] " Pierre-Louis Bossart
2019-08-08 16:20     ` Srinivas Kandagatla
2019-08-08 16:29       ` Pierre-Louis Bossart
2019-08-09  4:56 ` [PATCH v2 0/4] ASoC: codecs: Add WSA881x Smart Speaker " Vinod Koul

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=cdd2bded-551c-65f5-ca29-d2bb825bdaba@linaro.org \
    --to=srinivas.kandagatla@linaro.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=bgoswami@codeaurora.org \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=plai@codeaurora.org \
    --cc=robh+dt@kernel.org \
    --cc=vkoul@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;
as well as URLs for NNTP newsgroup(s).