diff mbox series

[v2,13/18] arm64: dts: qcom: sc7180: Add compat qcom,mdss-dsi-ctrl-sc7180

Message ID 20221107235654.1769462-14-bryan.odonoghue@linaro.org
State Superseded
Headers show
Series mdss-dsi-ctrl binding and dts fixes | expand

Commit Message

Bryan O'Donoghue Nov. 7, 2022, 11:56 p.m. UTC
Add silicon specific compatible qcom,mdss-dsi-ctrl-sc7180 to the
mdss-dsi-ctrl block. This allows us to differentiate the specific bindings
for sc7180 against the yaml documentation.

Cc: Andy Gross <agross@kernel.org>
Cc: Bjorn Andersson <andersson@kernel.org>
Cc: Konrad Dybcio <konrad.dybcio@somainline.org>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
Cc: linux-arm-msm@vger.kernel.org
Cc: devicetree@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: Douglas Anderson <dianders@chromium.org>
Cc: Rajendra Nayak <rnayak@codeaurora.org>
Cc: Sai Prakash Ranjan <saiprakash.ranjan@codeaurora.org>
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
---
 arch/arm64/boot/dts/qcom/sc7180.dtsi | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Bryan O'Donoghue Nov. 8, 2022, 12:16 p.m. UTC | #1
On 08/11/2022 00:24, Doug Anderson wrote:
> This seems fine, but I don't think it matches your bindings. Your
> bindings says you can have one compatible string. It could be
> "qcom,mdss-dsi-ctrl-sc7180" or it could be "qcom,mdss-dsi-ctrl".
> ...but your device tree has two compatible strings: the SoC specific
> one and the fallback one. You need to change your bindings to make
> this work.

With the update in this series the binding has a required const.

If you drop back to just "qcom,mdss-dsi-ctrl-sc7180" you get a warning 
like this.

arch/arm64/boot/dts/qcom/sc7180-trogdor-homestar-r4.dtb: dsi@ae94000: 
compatible: ['qcom,mdss-dsi-ctrl-sc7180'] is too short

If you just have 'qcom,mdss-dsi-ctrl' you get

arch/arm64/boot/dts/qcom/sc7180-trogdor-homestar-r4.dtb: dsi@ae94000: 
compatible:0: 'qcom,mdss-dsi-ctrl' is not one of 
['qcom,dsi-ctrl-6g-qcm2290', 'qcom,mdss-dsi-ctrl-apq8064', 
'qcom,mdss-dsi-ctrl-msm8916', 'qcom,mdss-dsi-ctrl-msm8974', 
'qcom,mdss-dsi-ctrl-msm8996', 'qcom,mdss-dsi-ctrl-sc7180', 
'qcom,mdss-dsi-ctrl-sc7280', 'qcom,mdss-dsi-ctrl-sdm630', 
'qcom,mdss-dsi-ctrl-sdm660', 'qcom,mdss-dsi-ctrl-sdm845', 
'qcom,mdss-dsi-ctrl-sm8250']

---
bod
Doug Anderson Nov. 8, 2022, 4:41 p.m. UTC | #2
Hi,

On Tue, Nov 8, 2022 at 4:16 AM Bryan O'Donoghue
<bryan.odonoghue@linaro.org> wrote:
>
> On 08/11/2022 00:24, Doug Anderson wrote:
> > This seems fine, but I don't think it matches your bindings. Your
> > bindings says you can have one compatible string. It could be
> > "qcom,mdss-dsi-ctrl-sc7180" or it could be "qcom,mdss-dsi-ctrl".
> > ...but your device tree has two compatible strings: the SoC specific
> > one and the fallback one. You need to change your bindings to make
> > this work.
>
> With the update in this series the binding has a required const.
>
> If you drop back to just "qcom,mdss-dsi-ctrl-sc7180" you get a warning
> like this.
>
> arch/arm64/boot/dts/qcom/sc7180-trogdor-homestar-r4.dtb: dsi@ae94000:
> compatible: ['qcom,mdss-dsi-ctrl-sc7180'] is too short
>
> If you just have 'qcom,mdss-dsi-ctrl' you get
>
> arch/arm64/boot/dts/qcom/sc7180-trogdor-homestar-r4.dtb: dsi@ae94000:
> compatible:0: 'qcom,mdss-dsi-ctrl' is not one of
> ['qcom,dsi-ctrl-6g-qcm2290', 'qcom,mdss-dsi-ctrl-apq8064',
> 'qcom,mdss-dsi-ctrl-msm8916', 'qcom,mdss-dsi-ctrl-msm8974',
> 'qcom,mdss-dsi-ctrl-msm8996', 'qcom,mdss-dsi-ctrl-sc7180',
> 'qcom,mdss-dsi-ctrl-sc7280', 'qcom,mdss-dsi-ctrl-sdm630',
> 'qcom,mdss-dsi-ctrl-sdm660', 'qcom,mdss-dsi-ctrl-sdm845',
> 'qcom,mdss-dsi-ctrl-sm8250']

Huh. I must have missed something then. Ah, I see the problem. Since
you didn't CC me on the bindings change I searched myself. I found
patch #7 in your series ("dt-bindings: msm: dsi-controller-main: Add
compatible strings for every current SoC"). In that patch everything
is flat. I didn't notice patch #8 in your series which changes this. I
would just get the compatibles right the right time. Looking at patch
#8 I see that Dmitry already suggested this.

So that means this is fine with me. A slight nit that I suspect Bjorn
would prefer you to blow past the 80 column limit and put both
compatibles on one line, but it's not huge in my mind.

Reviewed-by: Douglas Anderson <dianders@chromium.org>
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/qcom/sc7180.dtsi b/arch/arm64/boot/dts/qcom/sc7180.dtsi
index d2c374e9d8c03..07acb7f843d62 100644
--- a/arch/arm64/boot/dts/qcom/sc7180.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc7180.dtsi
@@ -2985,7 +2985,8 @@  opp-460000000 {
 			};
 
 			dsi0: dsi@ae94000 {
-				compatible = "qcom,mdss-dsi-ctrl";
+				compatible = "qcom,mdss-dsi-ctrl-sc7180",
+					     "qcom,mdss-dsi-ctrl";
 				reg = <0 0x0ae94000 0 0x400>;
 				reg-names = "dsi_ctrl";