* [PATCH v2 0/2] Commonize pinctrl for camera master clock on Qualcomm SDM845
@ 2025-12-17 11:39 David Heidelberg via B4 Relay
2025-12-17 11:39 ` [PATCH v2 1/2] arm64: dts: qcom: sdm845: Introduce camera master clock pinctrl David Heidelberg via B4 Relay
2025-12-17 11:39 ` [PATCH v2 2/2] arm64: dts: qcom: sdm845-db845c: Use pad fn instead of defining own David Heidelberg via B4 Relay
0 siblings, 2 replies; 7+ messages in thread
From: David Heidelberg via B4 Relay @ 2025-12-17 11:39 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Vladimir Zapolskiy
Cc: linux-arm-msm, devicetree, linux-kernel, phone-devel, David Heidelberg
Inspired by Richard's patch set for SDM670, I noticed that SDM845
follows the same pattern. This change prepares for enabling
additional cameras.
These pinctrl settings have been verified against the downstream
SDM845 kernel.
Since most of these are not yet used in mainline, testing was done
on sdm845-next using OnePlus 6 cameras with downstream drivers.
Thank you
David
Signed-off-by: David Heidelberg <david@ixit.cz>
---
Changes in v2:
- Added mclk3. (Vladimir)
- Reword commit messages.
- Corrected commit msg name. (Konrad)
- Link to v1: https://lore.kernel.org/r/20251213-sdm845-mclk-v1-0-197bc947d4c6@ixit.cz
---
David Heidelberg (2):
arm64: dts: qcom: sdm845: Introduce camera master clock pinctrl
arm64: dts: qcom: sdm845-db845c: Use pad fn instead of defining own
.../qcom/sdm845-db845c-navigation-mezzanine.dtso | 2 +-
arch/arm64/boot/dts/qcom/sdm845-db845c.dts | 16 -------
arch/arm64/boot/dts/qcom/sdm845.dtsi | 56 ++++++++++++++++++++++
3 files changed, 57 insertions(+), 17 deletions(-)
---
base-commit: 12b95d29eb979e5c4f4f31bb05817bc935c52050
change-id: 20251213-sdm845-mclk-041f2a952e31
Best regards,
--
David Heidelberg <david@ixit.cz>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v2 1/2] arm64: dts: qcom: sdm845: Introduce camera master clock pinctrl
2025-12-17 11:39 [PATCH v2 0/2] Commonize pinctrl for camera master clock on Qualcomm SDM845 David Heidelberg via B4 Relay
@ 2025-12-17 11:39 ` David Heidelberg via B4 Relay
2025-12-17 11:43 ` Konrad Dybcio
2025-12-17 11:39 ` [PATCH v2 2/2] arm64: dts: qcom: sdm845-db845c: Use pad fn instead of defining own David Heidelberg via B4 Relay
1 sibling, 1 reply; 7+ messages in thread
From: David Heidelberg via B4 Relay @ 2025-12-17 11:39 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Vladimir Zapolskiy
Cc: linux-arm-msm, devicetree, linux-kernel, phone-devel, David Heidelberg
From: David Heidelberg <david@ixit.cz>
Put clock pins configuration for camera master clock into the dtsi.
Reviewed-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>
Signed-off-by: David Heidelberg <david@ixit.cz>
---
arch/arm64/boot/dts/qcom/sdm845.dtsi | 56 ++++++++++++++++++++++++++++++++++++
1 file changed, 56 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi
index bf2f9c04adba7..c0f21a745fb0c 100644
--- a/arch/arm64/boot/dts/qcom/sdm845.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi
@@ -2805,6 +2805,62 @@ tlmm: pinctrl@3400000 {
gpio-ranges = <&tlmm 0 0 151>;
wakeup-parent = <&pdc_intc>;
+ cam_mclk0_default: cam-mclk0-default-state {
+ pins = "gpio13";
+ function = "cam_mclk";
+ drive-strength = <2>;
+ bias-disable;
+ };
+
+ cam_mclk0_sleep: cam-mclk0-sleep-state {
+ pins = "gpio13";
+ function = "cam_mclk";
+ drive-strength = <2>;
+ bias-pull-down;
+ };
+
+ cam_mclk1_default: cam-mclk1-default-state {
+ pins = "gpio14";
+ function = "cam_mclk";
+ drive-strength = <2>;
+ bias-disable;
+ };
+
+ cam_mclk1_sleep: cam-mclk1-sleep-state {
+ pins = "gpio14";
+ function = "cam_mclk";
+ drive-strength = <2>;
+ bias-pull-down;
+ };
+
+ cam_mclk2_default: cam-mclk2-default-state {
+ pins = "gpio15";
+ function = "cam_mclk";
+ drive-strength = <2>;
+ bias-disable;
+ };
+
+ cam_mclk2_sleep: cam-mclk2-sleep-state {
+ pins = "gpio15";
+ function = "cam_mclk";
+ drive-strength = <2>;
+ bias-pull-down;
+ };
+
+ cam_mclk3_default: cam-mclk3-default-state {
+ pins = "gpio16";
+ function = "cam_mclk";
+ drive-strength = <2>;
+ bias-disable;
+ };
+
+ cam_mclk3_sleep: cam-mclk3-sleep-state {
+ pins = "gpio16";
+ function = "cam_mclk";
+ drive-strength = <2>;
+ bias-pull-down;
+ };
+
cci0_default: cci0-default-state {
/* SDA, SCL */
pins = "gpio17", "gpio18";
--
2.51.0
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v2 2/2] arm64: dts: qcom: sdm845-db845c: Use pad fn instead of defining own
2025-12-17 11:39 [PATCH v2 0/2] Commonize pinctrl for camera master clock on Qualcomm SDM845 David Heidelberg via B4 Relay
2025-12-17 11:39 ` [PATCH v2 1/2] arm64: dts: qcom: sdm845: Introduce camera master clock pinctrl David Heidelberg via B4 Relay
@ 2025-12-17 11:39 ` David Heidelberg via B4 Relay
2025-12-18 12:25 ` Konrad Dybcio
1 sibling, 1 reply; 7+ messages in thread
From: David Heidelberg via B4 Relay @ 2025-12-17 11:39 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Vladimir Zapolskiy
Cc: linux-arm-msm, devicetree, linux-kernel, phone-devel, David Heidelberg
From: David Heidelberg <david@ixit.cz>
Instead of defining own pad function for master clock, pick one offered
by sdm845 device-tree include.
Reviewed-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>
Signed-off-by: David Heidelberg <david@ixit.cz>
---
.../dts/qcom/sdm845-db845c-navigation-mezzanine.dtso | 2 +-
arch/arm64/boot/dts/qcom/sdm845-db845c.dts | 16 ----------------
2 files changed, 1 insertion(+), 17 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/sdm845-db845c-navigation-mezzanine.dtso b/arch/arm64/boot/dts/qcom/sdm845-db845c-navigation-mezzanine.dtso
index dbe1911d8e470..f6c2c98970d76 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-db845c-navigation-mezzanine.dtso
+++ b/arch/arm64/boot/dts/qcom/sdm845-db845c-navigation-mezzanine.dtso
@@ -40,7 +40,7 @@ camera@10 {
/* CAM0_RST_N */
reset-gpios = <&tlmm 9 GPIO_ACTIVE_LOW>;
pinctrl-names = "default";
- pinctrl-0 = <&cam0_default>;
+ pinctrl-0 = <&cam0_default &cam_mclk0_default>;
clocks = <&clock_camcc CAM_CC_MCLK0_CLK>;
clock-names = "xvclk";
diff --git a/arch/arm64/boot/dts/qcom/sdm845-db845c.dts b/arch/arm64/boot/dts/qcom/sdm845-db845c.dts
index ce23f87e0316b..518d2ec657b13 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-db845c.dts
+++ b/arch/arm64/boot/dts/qcom/sdm845-db845c.dts
@@ -877,14 +877,6 @@ rst-pins {
drive-strength = <16>;
bias-disable;
};
-
- mclk0-pins {
- pins = "gpio13";
- function = "cam_mclk";
-
- drive-strength = <16>;
- bias-disable;
- };
};
cam3_default: cam3-default-state {
@@ -895,14 +887,6 @@ rst-pins {
drive-strength = <16>;
bias-disable;
};
-
- mclk3-pins {
- function = "cam_mclk";
- pins = "gpio16";
-
- drive-strength = <16>;
- bias-disable;
- };
};
dsi_sw_sel: dsi-sw-sel-state {
--
2.51.0
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 1/2] arm64: dts: qcom: sdm845: Introduce camera master clock pinctrl
2025-12-17 11:39 ` [PATCH v2 1/2] arm64: dts: qcom: sdm845: Introduce camera master clock pinctrl David Heidelberg via B4 Relay
@ 2025-12-17 11:43 ` Konrad Dybcio
0 siblings, 0 replies; 7+ messages in thread
From: Konrad Dybcio @ 2025-12-17 11:43 UTC (permalink / raw)
To: david, Bjorn Andersson, Konrad Dybcio, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Vladimir Zapolskiy
Cc: linux-arm-msm, devicetree, linux-kernel, phone-devel
On 12/17/25 12:39 PM, David Heidelberg via B4 Relay wrote:
> From: David Heidelberg <david@ixit.cz>
>
> Put clock pins configuration for camera master clock into the dtsi.
>
> Reviewed-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>
> Signed-off-by: David Heidelberg <david@ixit.cz>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Konrad
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 2/2] arm64: dts: qcom: sdm845-db845c: Use pad fn instead of defining own
2025-12-17 11:39 ` [PATCH v2 2/2] arm64: dts: qcom: sdm845-db845c: Use pad fn instead of defining own David Heidelberg via B4 Relay
@ 2025-12-18 12:25 ` Konrad Dybcio
2025-12-22 14:01 ` David Heidelberg
0 siblings, 1 reply; 7+ messages in thread
From: Konrad Dybcio @ 2025-12-18 12:25 UTC (permalink / raw)
To: david, Bjorn Andersson, Konrad Dybcio, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Vladimir Zapolskiy
Cc: linux-arm-msm, devicetree, linux-kernel, phone-devel
On 12/17/25 12:39 PM, David Heidelberg via B4 Relay wrote:
> From: David Heidelberg <david@ixit.cz>
>
> Instead of defining own pad function for master clock, pick one offered
> by sdm845 device-tree include.
I'm a little bitter about the wording - the pad function here is "cam_mclk",
whereas what you're doing is inheriting a common pinmux/pincfg node that
refers to that function
[...]
> - mclk0-pins {
> - pins = "gpio13";
> - function = "cam_mclk";
> -
> - drive-strength = <16>;
This patch changes the drive-strength (16 -> 2 mA)
FWIW it's 2 on reference designs and Sony boards, check your
downstream kernel
Konrad
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 2/2] arm64: dts: qcom: sdm845-db845c: Use pad fn instead of defining own
2025-12-18 12:25 ` Konrad Dybcio
@ 2025-12-22 14:01 ` David Heidelberg
2025-12-29 12:59 ` Konrad Dybcio
0 siblings, 1 reply; 7+ messages in thread
From: David Heidelberg @ 2025-12-22 14:01 UTC (permalink / raw)
To: Konrad Dybcio, Bjorn Andersson, Konrad Dybcio, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Vladimir Zapolskiy,
Robert Foss
Cc: linux-arm-msm, devicetree, linux-kernel, phone-devel
On 18/12/2025 13:25, Konrad Dybcio wrote:
> On 12/17/25 12:39 PM, David Heidelberg via B4 Relay wrote:
>> From: David Heidelberg <david@ixit.cz>
>>
>> Instead of defining own pad function for master clock, pick one offered
>> by sdm845 device-tree include.
>
> I'm a little bitter about the wording - the pad function here is "cam_mclk",
> whereas what you're doing is inheriting a common pinmux/pincfg node that
> refers to that function
>
> [...]
>
>> - mclk0-pins {
>> - pins = "gpio13";
>> - function = "cam_mclk";
>> -
>> - drive-strength = <16>;
>
> This patch changes the drive-strength (16 -> 2 mA)
>
> FWIW it's 2 on reference designs and Sony boards, check your
> downstream kernel
I don't have any. I'm fine with this patch not getting applied, but I'll
CC Robert who added the support, maybe he can verify.
David
>
> Konrad
--
David Heidelberg
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 2/2] arm64: dts: qcom: sdm845-db845c: Use pad fn instead of defining own
2025-12-22 14:01 ` David Heidelberg
@ 2025-12-29 12:59 ` Konrad Dybcio
0 siblings, 0 replies; 7+ messages in thread
From: Konrad Dybcio @ 2025-12-29 12:59 UTC (permalink / raw)
To: David Heidelberg, Bjorn Andersson, Konrad Dybcio, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Vladimir Zapolskiy,
Robert Foss
Cc: linux-arm-msm, devicetree, linux-kernel, phone-devel
On 12/22/25 3:01 PM, David Heidelberg wrote:
> On 18/12/2025 13:25, Konrad Dybcio wrote:
>> On 12/17/25 12:39 PM, David Heidelberg via B4 Relay wrote:
>>> From: David Heidelberg <david@ixit.cz>
>>>
>>> Instead of defining own pad function for master clock, pick one offered
>>> by sdm845 device-tree include.
>>
>> I'm a little bitter about the wording - the pad function here is "cam_mclk",
>> whereas what you're doing is inheriting a common pinmux/pincfg node that
>> refers to that function
>>
>> [...]
>>
>>> - mclk0-pins {
>>> - pins = "gpio13";
>>> - function = "cam_mclk";
>>> -
>>> - drive-strength = <16>;
>>
>> This patch changes the drive-strength (16 -> 2 mA)
>>
>> FWIW it's 2 on reference designs and Sony boards, check your
>> downstream kernel
>
> I don't have any. I'm fine with this patch not getting applied, but I'll CC Robert who added the support, maybe he can verify.
FWIW this can be verified at runtime as well (running downstream) with
cat /sys/kernel/debug/gpio
Konrad
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2025-12-29 12:59 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-12-17 11:39 [PATCH v2 0/2] Commonize pinctrl for camera master clock on Qualcomm SDM845 David Heidelberg via B4 Relay
2025-12-17 11:39 ` [PATCH v2 1/2] arm64: dts: qcom: sdm845: Introduce camera master clock pinctrl David Heidelberg via B4 Relay
2025-12-17 11:43 ` Konrad Dybcio
2025-12-17 11:39 ` [PATCH v2 2/2] arm64: dts: qcom: sdm845-db845c: Use pad fn instead of defining own David Heidelberg via B4 Relay
2025-12-18 12:25 ` Konrad Dybcio
2025-12-22 14:01 ` David Heidelberg
2025-12-29 12:59 ` Konrad Dybcio
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®