2022-11-24 01:54:07

by Bryan O'Donoghue

[permalink] [raw]
Subject: [PATCH v3 00/18] mdss-dsi-ctrl binding and dts fixes

V3:
- Moves declaration of mdss-dsi-ctrl into compat string declaration
patch - Krzysztof, Dmitry
- Renames qcm-2290 compat string to agreed compat "qcom,socname-dsi-ctrl"
Dmirty, Krzysztof
- Adds empty line after if clause in yaml control flow section - Dmirty
- Adds Rb/Ack - Krzysztof, Dmitry, Doug, David
- vdd*
Looking into this some more, I don't believe vdd, vdda, vddio ought to be
required properties. Its up to the PCB manufacturer and the panel in-use
how that panel is powered. Powering the panel is not something that
even necessarily needs to be done from the dsi-ctrl driver.
Originally marking vdd* as required in the .txt was an error, its not a
SoC level dtsi requirement.
- clock-names
Rather than replicate the clock-name in each if block I listed them with
a specific description from a similar reference in usb/qcom,dwc3.yaml.

https://lore.kernel.org/linux-arm-msm/[email protected]/

V2:
https://www.spinics.net/lists/linux-arm-msm/msg116326.html

- Moves the DSI PHY changes to a different later series.
There are enough dsi-controller-main changes to justify its own
standalone series.

- The original phy-name binding change given discussion with Rob and
Krzysztof became its own standalone series that has since been merged.
https://www.mail-archive.com/[email protected]/msg403214.html

- Retains the drop of power-domain from yaml as a required property.
I dug into the available dtsi. The apq8064 doesn't appear to have any
GDSC which can be attached as a power-domain, which means the
power-domain requirement is not universal across the various silicon
versions.

- Adds Dmitry's RB to power-domain drop

- For the clock declarations I've
* I noticed that the simple change I had worked for msm8939 but
subsquently broke other dtsi which drove a bigger change to document
the clocks on a per compatible basis.
* Added compat strings in yaml.
* Moved the allOf down later in the file to acomodate the if/then.
* Number of clocks validated on a per compatible basis
* The driver code which doesn't care about the number of clocks
can still operate on the mdss-dsi-ctrl compat but the dts checks will
validate against the compat string and yaml.

- vdd descriptions
Took the previous text I missed from the .txt file - Krzysztof, Dmitry
Adds vdd, vdda and vddio to the required list. This exposes warnings in
existing dtsi but the previous .txt declared these regulators as
required. - Krzysztof

V1:
This series fixes up a number of dtbs checks which are being flagged adding
in the msm8939 dtsi.


When converting from .txt to .yaml a number of the parameters for the older
msm8916 silicon were not transmitted into the yaml.

Adding in the msm8939 which is a near 1:1 copy of the msm8916 in terms of
dtsi triggers a rake of dtbs checks as a result.

https://www.mail-archive.com/[email protected]/msg403211.html

Bryan O'Donoghue (18):
dt-bindings: msm: dsi-controller-main: Fix operating-points-v2
constraint
dt-bindings: msm: dsi-controller-main: Fix power-domain constraint
dt-bindings: msm: dsi-controller-main: Rename qcom,dsi-ctrl-6g-qcm2290
to qcom,qcm2290-dsi-ctrl
dt-bindings: msm: dsi-controller-main: Add compatible strings for
every current SoC
dt-bindings: msm: dsi-controller-main: Document clocks on a per
compatible basis
dt-bindings: msm: dsi-controller-main: Fix description of core clock
dt-bindings: msm: dsi-controller-main: Fix clock declarations
dt-bindings: msm: dsi-controller-main: Add vdd* descriptions back in
ARM: dts: qcom: apq8064: add compat qcom,apq8064-dsi-ctrl
ARM: dts: qcom: msm8974: Add compat qcom,msm8974-dsi-ctrl
arm64: dts: qcom: msm8916: Add compat qcom,msm8916-dsi-ctrl
arm64: dts: qcom: msm8996: Add compat qcom,msm8996-dsi-ctrl
arm64: dts: qcom: sc7180: Add compat qcom,sc7180-dsi-ctrl
arm64: dts: qcom: sc7280: Add compat qcom,sc7280-dsi-ctrl
arm64: dts: qcom: sdm630: Add compat qcom,sdm630-dsi-ctrl
arm64: dts: qcom: sdm660: Add compat qcom,sdm660-dsi-ctrl
arm64: dts: qcom: sdm845: Add compat qcom,sdm845-dsi-ctrl
arm64: dts: qcom: sm8250: Add compat qcom,sm8250-dsi-ctrl

.../display/msm/dsi-controller-main.yaml | 205 ++++++++++++++++--
arch/arm/boot/dts/qcom-apq8064.dtsi | 3 +-
arch/arm/boot/dts/qcom-msm8974.dtsi | 3 +-
arch/arm64/boot/dts/qcom/msm8916.dtsi | 3 +-
arch/arm64/boot/dts/qcom/msm8996.dtsi | 6 +-
arch/arm64/boot/dts/qcom/sc7180.dtsi | 3 +-
arch/arm64/boot/dts/qcom/sc7280.dtsi | 3 +-
arch/arm64/boot/dts/qcom/sdm630.dtsi | 3 +-
arch/arm64/boot/dts/qcom/sdm660.dtsi | 3 +-
arch/arm64/boot/dts/qcom/sdm845.dtsi | 6 +-
arch/arm64/boot/dts/qcom/sm8250.dtsi | 6 +-
11 files changed, 208 insertions(+), 36 deletions(-)

--
2.38.1


2022-11-24 01:54:52

by Bryan O'Donoghue

[permalink] [raw]
Subject: [PATCH v3 11/18] arm64: dts: qcom: msm8916: Add compat qcom,msm8916-dsi-ctrl

Add silicon specific compatible qcom,msm8916-dsi-ctrl to the
mdss-dsi-ctrl block. This allows us to differentiate the specific bindings
for msm8916 against the yaml documentation.

Signed-off-by: Bryan O'Donoghue <[email protected]>
---
arch/arm64/boot/dts/qcom/msm8916.dtsi | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/msm8916.dtsi b/arch/arm64/boot/dts/qcom/msm8916.dtsi
index c1d8a1b388d27..20e72038cadfe 100644
--- a/arch/arm64/boot/dts/qcom/msm8916.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8916.dtsi
@@ -1021,7 +1021,8 @@ mdp5_intf1_out: endpoint {
};

dsi0: dsi@1a98000 {
- compatible = "qcom,mdss-dsi-ctrl";
+ compatible = "qcom,msm8916-dsi-ctrl",
+ "qcom,mdss-dsi-ctrl";
reg = <0x01a98000 0x25c>;
reg-names = "dsi_ctrl";

--
2.38.1

2022-11-24 01:57:16

by Bryan O'Donoghue

[permalink] [raw]
Subject: [PATCH v3 08/18] dt-bindings: msm: dsi-controller-main: Add vdd* descriptions back in

When converting from .txt to .yaml we didn't include descriptions for the
existing regulator supplies.

- vdd
- vdda
- vddio

Add those descriptions into the yaml now as they were prior to the
conversion. In the .txt description we marked these regulators as required,
however, that requirement appears to have been in error.

Taking the example of sc7180-trogdor-wormdingler.dtsi. The avdd and avee
come from GPIO controlled external regulators, not the SoC and in this case
there's no need for vddio to power an I/O bus. Similarly the regulators for
the LCD are controlled by the panel driver not by the dsi-ctrl driver.

It would be possible to connect a different type of panel to the DSI bus
here in which case we may or may not want to make use of vdd, vdda or
vddio.

This is also the case for older chipsets like apq8064, msm8916 etc the vdd*
regulators in the dsi-ctrl block are helpers not dependencies.

Add the description of vdd, vdda and vddio back in for the existing
upstream dts where vdd, vdda or vddio are already declared but, don't
declare those regulators required - they are not SoC requirements.

Fixes: 4dbe55c97741 ("dt-bindings: msm: dsi: add yaml schemas for DSI bindings")
Signed-off-by: Bryan O'Donoghue <[email protected]>
---
.../bindings/display/msm/dsi-controller-main.yaml | 12 ++++++++++++
1 file changed, 12 insertions(+)

diff --git a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
index 0fbb0c04f4b06..bcbcbdca1a78a 100644
--- a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
+++ b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
@@ -133,6 +133,18 @@ properties:
- port@0
- port@1

+ vdd-supply:
+ description:
+ vdd regulator device node
+
+ vddio-supply:
+ description:
+ vdd-io regulator device node
+
+ vdda-supply:
+ description:
+ vdda regulator device node
+
required:
- compatible
- reg
--
2.38.1

2022-11-26 15:44:33

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v3 08/18] dt-bindings: msm: dsi-controller-main: Add vdd* descriptions back in

On 24/11/2022 01:47, Bryan O'Donoghue wrote:
> When converting from .txt to .yaml we didn't include descriptions for the
> existing regulator supplies.
>
> - vdd
> - vdda
> - vddio
>
> Add those descriptions into the yaml now as they were prior to the
> conversion. In the .txt description we marked these regulators as required,
> however, that requirement appears to have been in error.
>
> Taking the example of sc7180-trogdor-wormdingler.dtsi. The avdd and avee
> come from GPIO controlled external regulators, not the SoC and in this case
> there's no need for vddio to power an I/O bus. Similarly the regulators for
> the LCD are controlled by the panel driver not by the dsi-ctrl driver.
>
> It would be possible to connect a different type of panel to the DSI bus
> here in which case we may or may not want to make use of vdd, vdda or
> vddio.
>
> This is also the case for older chipsets like apq8064, msm8916 etc the vdd*
> regulators in the dsi-ctrl block are helpers not dependencies.
>
> Add the description of vdd, vdda and vddio back in for the existing
> upstream dts where vdd, vdda or vddio are already declared but, don't
> declare those regulators required - they are not SoC requirements.
>
> Fixes: 4dbe55c97741 ("dt-bindings: msm: dsi: add yaml schemas for DSI bindings")
> Signed-off-by: Bryan O'Donoghue <[email protected]>
> ---
> .../bindings/display/msm/dsi-controller-main.yaml | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
> index 0fbb0c04f4b06..bcbcbdca1a78a 100644
> --- a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
> +++ b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
> @@ -133,6 +133,18 @@ properties:
> - port@0
> - port@1
>
> + vdd-supply:
> + description:
> + vdd regulator device node

I see my comment was not really implemented. I asked:
1. vdd->VDD
2. Drop "device node". It's not a device node. It's a VDD regulator.


Best regards,
Krzysztof

2022-11-26 18:55:34

by Bryan O'Donoghue

[permalink] [raw]
Subject: Re: [PATCH v3 08/18] dt-bindings: msm: dsi-controller-main: Add vdd* descriptions back in

On 26/11/2022 14:46, Krzysztof Kozlowski wrote:
> 1. vdd->VDD

Hmm.

I honestly didn't pick that up from your previous comment but, np.

---
bod