All of lore.kernel.org
 help / color / mirror / Atom feed
From: AngeloGioacchino Del Regno  <angelogioacchino.delregno@somainline.org>
To: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: agross@kernel.org, robh+dt@kernel.org,
	linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, konrad.dybcio@somainline.org,
	marijn.suijten@somainline.org, martin.botka@somainline.org,
	~postmarketos/upstreaming@lists.sr.ht,
	phone-devel@vger.kernel.org, paul.bouchara@somainline.org
Subject: Re: [PATCH 7/7] arm64: dts: qcom: msm8998-xperia: Add audio clock and its pin
Date: Thu, 9 Sep 2021 12:57:30 +0200	[thread overview]
Message-ID: <30af450e-c98d-5e88-0506-75b1ec43bd42@somainline.org> (raw)
In-Reply-To: <YTdtjRonJBtJUk9N@ripper>

Il 07/09/21 15:47, Bjorn Andersson ha scritto:
> On Fri 03 Sep 11:09 PDT 2021, AngeloGioacchino Del Regno wrote:
> 
>> All smartphones of this platform are equipped with a WCD9335 audio
>> codec, getting its MCLK from PM8998 gpio13: add this clock to DT.
>>
>> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org>
>> Reviewed-by: Marijn Suijten <marijn.suijten@somainline.org>
>> ---
>>   .../dts/qcom/msm8998-sony-xperia-yoshino.dtsi | 19 +++++++++++++++++++
>>   1 file changed, 19 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/qcom/msm8998-sony-xperia-yoshino.dtsi b/arch/arm64/boot/dts/qcom/msm8998-sony-xperia-yoshino.dtsi
>> index 5fbe5abf4133..7aeebd3b2e9e 100644
>> --- a/arch/arm64/boot/dts/qcom/msm8998-sony-xperia-yoshino.dtsi
>> +++ b/arch/arm64/boot/dts/qcom/msm8998-sony-xperia-yoshino.dtsi
>> @@ -20,6 +20,19 @@ / {
>>   	qcom,msm-id = <0x124 0x20000>, <0x124 0x20001>; /* 8998v2, v2.1 */
>>   	qcom,board-id = <8 0>;
>>   
>> +	clocks {
>> +		compatible = "simple-bus";
>> +
>> +		div1_mclk: divclk1 {
>> +			compatible = "gpio-gate-clock";
>> +			pinctrl-0 = <&audio_mclk_pin>;
>> +			pinctrl-names = "default";
>> +			clocks = <&rpmcc RPM_SMD_DIV_CLK1>;
> 
> What controls the clock rate of divclk1?
> 

That's going to be assigned to WCD9335 (oh btw, I have working audio locally!
it's not great, but I can hear sounds from the internal speakers), but I
haven't added the entire audio configuration in these submitted commits because:
1. It needs two GDSCs in GCC: adding them without enabling the lpass iommu will
    produce a crash, as the iommu would go off when the kernel starts turning off
    unused stuff... and we have secure contexts there, which means that the
    hypervisor will say hello;
2. The lpass iommu needs a commit in the qcom smmu implementation detail driver,
    as we need to select a different context (not the last ctx, but the one before)
    for bypass streams emulation, as the last one seems to be untouchable... small
    preview of the required commit:
    qsmmu->bypass_cbndx = [value from dt], or [default == smmu->num_context_banks-1]
3. We need the lpass iommu to get "the audio stuff" (surely, no need to list it).

So that's the entire picture... I am planning to get this base merged in before
going for a cleanup and submission of the rest of what I have here.


Long story short: WCD9335 will be responsible for controlling this clock.

Cheers,
- Angelo

> Regards,
> Bjorn
> 
>> +			#clock-cells = <0>;
>> +			enable-gpios = <&pm8998_gpio 13 GPIO_ACTIVE_HIGH>;
>> +		};
>> +	};
>> +
>>   	board_vbat: vbat-regulator {
>>   		compatible = "regulator-fixed";
>>   		regulator-name = "VBAT";
>> @@ -313,6 +326,12 @@ cam_snapshot_pin_a: cam-snapshot-btn-active {
>>   		input-enable;
>>   		qcom,drive-strength = <PMIC_GPIO_STRENGTH_NO>;
>>   	};
>> +
>> +	audio_mclk_pin: audio-mclk-pin-active {
>> +		pins = "gpio13";
>> +		function = "func2";
>> +		power-source = <0>;
>> +	};
>>   };
>>   
>>   &pmi8998_gpio {
>> -- 
>> 2.32.0
>>


  reply	other threads:[~2021-09-09 10:57 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-03 18:09 [PATCH 1/7] arm64: dts: qcom: Introduce support for MSM8998 Sony Yoshino platform AngeloGioacchino Del Regno
2021-09-03 18:09 ` [PATCH 2/7] arm64: dts: qcom: msm8998-xperia: Add RMI4 touchscreen support AngeloGioacchino Del Regno
2021-09-07 13:41   ` Bjorn Andersson
2021-09-09 11:25     ` AngeloGioacchino Del Regno
2021-09-03 18:09 ` [PATCH 3/7] arm64: dts: qcom: msm8998-xperia: Add support for wcn3990 Bluetooth AngeloGioacchino Del Regno
2021-09-07 13:42   ` Bjorn Andersson
2021-09-09 13:19   ` Dmitry Baryshkov
2021-09-09 18:03     ` AngeloGioacchino Del Regno
2021-09-03 18:09 ` [PATCH 4/7] arm64: dts: qcom: msm8998-xperia: Add support for gpio vibrator AngeloGioacchino Del Regno
2021-09-03 18:09 ` [PATCH 5/7] arm64: dts: qcom: msm8998-xperia: Configure display boost regulators AngeloGioacchino Del Regno
2021-09-03 18:09 ` [PATCH 6/7] arm64: dts: qcom: msm8998-xperia: Add camera regulators AngeloGioacchino Del Regno
2021-09-03 18:09 ` [PATCH 7/7] arm64: dts: qcom: msm8998-xperia: Add audio clock and its pin AngeloGioacchino Del Regno
2021-09-07 13:47   ` Bjorn Andersson
2021-09-09 10:57     ` AngeloGioacchino Del Regno [this message]
2021-09-07 11:40 ` [PATCH 1/7] arm64: dts: qcom: Introduce support for MSM8998 Sony Yoshino platform kernel test robot
2021-09-07 11:40   ` kernel test robot
2021-09-07 13:04 ` Bjorn Andersson
2021-09-09 10:40   ` AngeloGioacchino Del Regno

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=30af450e-c98d-5e88-0506-75b1ec43bd42@somainline.org \
    --to=angelogioacchino.delregno@somainline.org \
    --cc=agross@kernel.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=konrad.dybcio@somainline.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marijn.suijten@somainline.org \
    --cc=martin.botka@somainline.org \
    --cc=paul.bouchara@somainline.org \
    --cc=phone-devel@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=~postmarketos/upstreaming@lists.sr.ht \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.