linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
To: Vinod Koul <vkoul@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Cc: Bjorn Andersson <bjorn.andersson@linaro.org>,
	linux-arm-msm@vger.kernel.org, Rob Herring <robh+dt@kernel.org>,
	Andy Gross <agross@kernel.org>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 5/6] arm64: dts: qcom: sm8250: move wcd938x node out of soc node
Date: Tue, 29 Mar 2022 09:44:28 +0100	[thread overview]
Message-ID: <ae78d199-a782-75ed-5178-c9757be79f5d@linaro.org> (raw)
In-Reply-To: <YkHssmiGup+LdIBC@matsya>



On 28/03/2022 18:13, Vinod Koul wrote:
> On 28-03-22, 17:21, Krzysztof Kozlowski wrote:
>> On 28/03/2022 16:30, Vinod Koul wrote:
>>> The soc node expects all the nodes to have unit addresses. The wcd codec
>>> node does not have that which causes warnings:
>>>
>>> arch/arm64/boot/dts/qcom/sm8250-mtp.dts:631.17-648.4:
>>> Warning (simple_bus_reg): /soc@0/codec: missing or empty reg/ranges property
>>>
>>> Move wcd node out of soc to fix this
>>>
>>> Signed-off-by: Vinod Koul <vkoul@kernel.org>
>>> ---
>>>   arch/arm64/boot/dts/qcom/sm8250-mtp.dts | 40 ++++++++++++-------------
>>>   1 file changed, 19 insertions(+), 21 deletions(-)
>>>
>>> diff --git a/arch/arm64/boot/dts/qcom/sm8250-mtp.dts b/arch/arm64/boot/dts/qcom/sm8250-mtp.dts
>>> index fb99cc2827c7..3876a94b49a9 100644
>>> --- a/arch/arm64/boot/dts/qcom/sm8250-mtp.dts
>>> +++ b/arch/arm64/boot/dts/qcom/sm8250-mtp.dts
>>> @@ -156,6 +156,25 @@ vreg_s6c_0p88: smpc6-regulator {
>>>   		regulator-always-on;
>>>   		vin-supply = <&vph_pwr>;
>>>   	};
>>> +
>>> +	wcd938x: codec {
>>
>> This probably should be under "sound" node. Anyway having it under soc
>> seemed incorrect.
> 
> yeah it might make sense to be under sound. I think this is a slimbus
> codec (right Srini..?) and this should be under slim node..

wcd938x can be moved out of soc node but not under sound as it is.

If we plan to move external codecs under sound node then sound node has 
to be converted in to a simple-bus I guess. If we do that we have to 
make sure that we are consistent across all the qcom dts. This does 
sound correct either.

Currently sound node is only used for sound-card, sound card uses LPASS 
IP which is part of SoC along with external or internal codecs.

I am not 100% sure moving aggregate devices like sound card which uses 
SoC components along with external components out of soc node is the 
right choice.

Moving sound out of soc node might also add some regressions as sound 
device is sometimes used to allocate dma memory, so we have to be 
careful with this move.

The reason why sound node is empty in SoC is because the wiring of dais 
are board specific. We could add compatible string to soc sound node if 
that helps clear some confusion.
> 
>>
>> I actually wonder where this wcd9380 sits? What type of bus?

WCD938x codec has two parts wcd938x-tx and wcd938x-rx which are under 
there respective SoundWire bus.

We can not move wcd938x-tx and wcd938x-rx out of there bus nodes which 
result with no device enumeration.

--srini



>>
>>
>>> +		compatible = "qcom,wcd9380-codec";
>>> +		#sound-dai-cells = <1>;
>>> +		reset-gpios = <&tlmm 32 0>;
>>> +		vdd-buck-supply = <&vreg_s4a_1p8>;
>>> +		vdd-rxtx-supply = <&vreg_s4a_1p8>;
>>> +		vdd-io-supply = <&vreg_s4a_1p8>;
>>> +		vdd-mic-bias-supply = <&vreg_bob>;
>>> +		qcom,micbias1-microvolt = <1800000>;
>>> +		qcom,micbias2-microvolt = <1800000>;
>>> +		qcom,micbias3-microvolt = <1800000>;
>>> +		qcom,micbias4-microvolt = <1800000>;
>>> +		qcom,mbhc-buttons-vthreshold-microvolt = <75000 150000 237000 500000 500000 500000 500000 500000>;
>>> +		qcom,mbhc-headset-vthreshold-microvolt = <1700000>;
>>> +		qcom,mbhc-headphone-vthreshold-microvolt = <50000>;
>>> +		qcom,rx-device = <&wcd_rx>;
>>> +		qcom,tx-device = <&wcd_tx>;
>>> +	};
>>>   };
>>>   
>>>   &adsp {
>>> @@ -627,27 +646,6 @@ &slpi {
>>>   	firmware-name = "qcom/sm8250/slpi.mbn";
>>>   };
>>>   
>>> -&soc {
>>> -	wcd938x: codec {
>>> -		compatible = "qcom,wcd9380-codec";
>>> -		#sound-dai-cells = <1>;
>>> -		reset-gpios = <&tlmm 32 0>;
>>> -		vdd-buck-supply = <&vreg_s4a_1p8>;
>>> -		vdd-rxtx-supply = <&vreg_s4a_1p8>;
>>> -		vdd-io-supply = <&vreg_s4a_1p8>;
>>> -		vdd-mic-bias-supply = <&vreg_bob>;
>>> -		qcom,micbias1-microvolt = <1800000>;
>>> -		qcom,micbias2-microvolt = <1800000>;
>>> -		qcom,micbias3-microvolt = <1800000>;
>>> -		qcom,micbias4-microvolt = <1800000>;
>>> -		qcom,mbhc-buttons-vthreshold-microvolt = <75000 150000 237000 500000 500000 500000 500000 500000>;
>>> -		qcom,mbhc-headset-vthreshold-microvolt = <1700000>;
>>> -		qcom,mbhc-headphone-vthreshold-microvolt = <50000>;
>>> -		qcom,rx-device = <&wcd_rx>;
>>> -		qcom,tx-device = <&wcd_tx>;
>>> -	};
>>> -};
>>> -
>>>   &sound {
>>>   	compatible = "qcom,sm8250-sndcard";
>>>   	model = "SM8250-MTP-WCD9380-WSA8810-VA-DMIC";
>>
>>
>> Best regards,
>> Krzysztof
> 

  reply	other threads:[~2022-03-29  8:44 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-28 14:30 [PATCH 0/6] arm64: dts: qcom: Get rid of some warnings Vinod Koul
2022-03-28 14:30 ` [PATCH 1/6] arm64: dts: qcom: sm8450: rename interconnect nodes Vinod Koul
2022-03-28 15:07   ` Krzysztof Kozlowski
2022-03-28 17:11     ` Vinod Koul
2022-03-28 14:30 ` [PATCH 2/6] arm64: dts: qcom: sm8350: move qup-opp-tables out of soc node Vinod Koul
2022-03-28 15:08   ` Krzysztof Kozlowski
2022-03-28 14:30 ` [PATCH 3/6] arm64: dts: qcom: sm8250: move qup-opp-table " Vinod Koul
2022-03-28 15:08   ` Krzysztof Kozlowski
2022-03-28 14:30 ` [PATCH 4/6] arm64: dts: qcom: sm8250: move sound node out of soc Vinod Koul
2022-03-28 15:14   ` Krzysztof Kozlowski
2022-03-28 17:14     ` Vinod Koul
2022-03-28 17:16       ` Krzysztof Kozlowski
2022-04-09  0:25       ` Bjorn Andersson
2022-03-28 14:30 ` [PATCH 5/6] arm64: dts: qcom: sm8250: move wcd938x node out of soc node Vinod Koul
2022-03-28 15:21   ` Krzysztof Kozlowski
2022-03-28 17:13     ` Vinod Koul
2022-03-29  8:44       ` Srinivas Kandagatla [this message]
2022-03-28 14:30 ` [PATCH 6/6] arm64: dts: qcom: sm8250: remove address cells from dsi nodes Vinod Koul
2022-03-28 15:31   ` Krzysztof Kozlowski
2022-03-28 15:54   ` Krzysztof Kozlowski

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=ae78d199-a782-75ed-5178-c9757be79f5d@linaro.org \
    --to=srinivas.kandagatla@linaro.org \
    --cc=agross@kernel.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.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).