From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A3F74C433EF for ; Thu, 31 Mar 2022 09:35:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234144AbiCaJg7 (ORCPT ); Thu, 31 Mar 2022 05:36:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40636 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234129AbiCaJg6 (ORCPT ); Thu, 31 Mar 2022 05:36:58 -0400 Received: from mail-qt1-x834.google.com (mail-qt1-x834.google.com [IPv6:2607:f8b0:4864:20::834]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 03841A9940 for ; Thu, 31 Mar 2022 02:35:10 -0700 (PDT) Received: by mail-qt1-x834.google.com with SMTP id i4so20917857qti.7 for ; Thu, 31 Mar 2022 02:35:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=lsN5p6Zbb92CWY0fCQlSnWVHSmMIpn5JDGM4v10NtKE=; b=ZunWdYGe8+BLAfVsPhIKSdgfp/G02w2RPLviviav8MFDJAF80hz+gYJdoOGSo34tqv +GOt1h6oPls11MbrXMWncQOXZmfdT+lhqoeeAdjHnzcDo7Y+ls+43qjcKa4FnDUZBr8g sfb8w/YhyQ+I+txxTbyARU1xScgG75osTxNrQd/eW37hUwLOqmWqtNTAMgYkd6Ktg+8v SISvG4vs6TaDZYpzkTU2u3b1ge4YO9UUK1QU+l3rIQdKqsBt2Cv/PAH7mIcmQDs8WgY7 CqOd27nG1iOkKCVqS+VcVciIKPjF7ot65oGt3h7/40D3BucYPbivC79Gb3PETsi4mdBl 9MPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=lsN5p6Zbb92CWY0fCQlSnWVHSmMIpn5JDGM4v10NtKE=; b=JD/Ane5PAz21ud+h0jC+r6x04io8/bQnavnvdyyDA0C+QmUwkA1PfRQ3h+iFQMjcE0 lBOFnB0Mcld6NJFzHVWMjpQxoG17MCi20SyNOwc8Vg4MYBKGXO1zwbvLTX4lbI+LCAZW yKGkbrCpnv/5ld8TC9sIWzQL2H+uQObRFLhmvb7LmfD3C9iHkf6l4jiPYKH/TPsL7Ybh sWVED/jIG8NnnTgu14C4l2RODe/hUF9r9nNrq7mMX2ehVsOT8PqZ0Vh1GVwq+NWZzeLF PgsD+FcwVDFxXlwFry6W6mN4A5f1p11hluaiqtXhWwrwIrbtIXnBlosyiqtep8NVvCPU rHGQ== X-Gm-Message-State: AOAM533STTH877vKT5DF79r837faSgtpH+tF0Fxp7BctAU3aSZyCvwlt P9QdK15tLFz93DBrKYBTCJu7Y1xiOXNzw+tMKzuN9Q== X-Google-Smtp-Source: ABdhPJzGd4rqpbpprVxRT58SQ0mWkivwbwlishXbW/R3KM5sUWLDKwn+nH2fugALpTWwKgteKCnQM+TuY1AtSd9ZY20= X-Received: by 2002:ac8:5702:0:b0:2e1:ec8a:917a with SMTP id 2-20020ac85702000000b002e1ec8a917amr3318464qtw.682.1648719309154; Thu, 31 Mar 2022 02:35:09 -0700 (PDT) MIME-Version: 1.0 References: <20220328152923.90623-1-krzysztof.kozlowski@linaro.org> <12b0056b-8032-452b-f325-6f36037b5a80@linaro.org> In-Reply-To: From: Dmitry Baryshkov Date: Thu, 31 Mar 2022 12:34:58 +0300 Message-ID: Subject: Re: [PATCH] dt-bindings: display: msm: dsi: remove address/size cells To: Vinod Koul Cc: Rob Herring , Krzysztof Kozlowski , Rob Clark , Sean Paul , Abhinav Kumar , David Airlie , Daniel Vetter , Krzysztof Kozlowski , linux-arm-msm , dri-devel , freedreno , devicetree@vger.kernel.org, "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org On Thu, 31 Mar 2022 at 09:05, Vinod Koul wrote: > > On 29-03-22, 10:52, Rob Herring wrote: > > On Tue, Mar 29, 2022 at 12:01:52PM +0530, Vinod Koul wrote: > > > On 28-03-22, 13:21, Rob Herring wrote: > > > > On Mon, Mar 28, 2022 at 12:18 PM Krzysztof Kozlowski > > > > wrote: > > > > > > > > > > On 28/03/2022 19:16, Vinod Koul wrote: > > > > > > On 28-03-22, 19:43, Dmitry Baryshkov wrote: > > > > > >> On Mon, 28 Mar 2022 at 18:30, Krzysztof Kozlowski > > > > > >> wrote: > > > > > >>> > > > > > >>> The DSI node is not a bus and the children do not have unit addresses. > > > > > >>> > > > > > >>> Reported-by: Vinod Koul > > > > > >>> Signed-off-by: Krzysztof Kozlowski > > > > > >> > > > > > >> NAK. > > > > > >> DSI panels are children of the DSI device tree node with the reg = <0>; address. > > > > > >> This is the convention used by other platforms too (see e.g. > > > > > >> arch/arm64/boot/dts/freescale/imx8mq-evk.dts). > > > > > > > > > > > > So we should add reg = 0, i will update my dtsi fix > > > > > > > > > > > > > > > > To "ports" node? No. The reg=0 is for children of the bus, so the > > > > > panels. How to combine both without warnings - ports and panel@0 - I > > > > > don't know yet... > > > > > > > > I don't think that should case a warning. Or at least it's one we turn off. > > > > > > Well in this case I think we might need a fix: > > > Here is the example quoted in the binding. We have ports{} and then the > > > two port@0 and port@1 underneath. > > > > It's the #address-cells/#size-cells under 'ports' that applies to 'port' > > nodes. As 'ports' has no address (reg) itself, it doesn't need > > #address-cells/#size-cells in its parent node. > > > > > > > > So it should be okay to drop #address-cells/#size-cells from dsi node > > > but keep in ports node... > > > > Yes. > > > > > Thoughts...? > > > > But I thought a panel@0 node was being added? If so then you need to add > > them back. > > I guess we should make this optional, keep it when adding panel@0 node > and skip for rest where not applicable..? Dmitry is that fine with you? This sounds like a workaround. When a panel node is added together with the '#address-cells' / '#size-cells' properties, we will get warnings for the 'ports' node. I'd prefer to leave things to pinpoint that the problem is generic rather than being specific to several device trees with the DSI panel nodes. How do other platforms solve the issue? In fact we can try shifting to the following dts schema: dsi@ae940000 { compatible = "qcom,mdss-dsi-ctrl"; ports { #adress-cells = <1>; #size-cells = <0>; port@0 { reg = <0>; dsi0_in: endpoint {}; }; port@1 { reg = <1>; dsi0_out: endpoint { remote-endpoint = <&panel_in>; }; }; /* dsi-bus is a generic part */ dsi-bus { #adress-cells = <1>; #size-cells = <0>; /* panel@0 goes to the board file */ panel@0 { compatible = "vendor,some-panel"; ports { #adress-cells = <1>; #size-cells = <0>; port@0 { reg = <0>; panel_in: endpoint { remote-endpoint = <&dsi0_out>; }; }; }; }; }; WDYT? -- With best wishes Dmitry From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id F0541C433FE for ; Thu, 31 Mar 2022 09:35:10 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7A00210EB06; Thu, 31 Mar 2022 09:35:10 +0000 (UTC) Received: from mail-qt1-x832.google.com (mail-qt1-x832.google.com [IPv6:2607:f8b0:4864:20::832]) by gabe.freedesktop.org (Postfix) with ESMTPS id 150E210EB06 for ; Thu, 31 Mar 2022 09:35:10 +0000 (UTC) Received: by mail-qt1-x832.google.com with SMTP id 10so20907512qtz.11 for ; Thu, 31 Mar 2022 02:35:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=lsN5p6Zbb92CWY0fCQlSnWVHSmMIpn5JDGM4v10NtKE=; b=ZunWdYGe8+BLAfVsPhIKSdgfp/G02w2RPLviviav8MFDJAF80hz+gYJdoOGSo34tqv +GOt1h6oPls11MbrXMWncQOXZmfdT+lhqoeeAdjHnzcDo7Y+ls+43qjcKa4FnDUZBr8g sfb8w/YhyQ+I+txxTbyARU1xScgG75osTxNrQd/eW37hUwLOqmWqtNTAMgYkd6Ktg+8v SISvG4vs6TaDZYpzkTU2u3b1ge4YO9UUK1QU+l3rIQdKqsBt2Cv/PAH7mIcmQDs8WgY7 CqOd27nG1iOkKCVqS+VcVciIKPjF7ot65oGt3h7/40D3BucYPbivC79Gb3PETsi4mdBl 9MPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=lsN5p6Zbb92CWY0fCQlSnWVHSmMIpn5JDGM4v10NtKE=; b=2UUIS49scSghAsbs7JS4fQSGtpfRavWXzJ5wkJA1n4QG5jbeyFV0TSsZHq7BfPUgHw BnEoMh2GDTlFlchnCNwUJrpvEqmzfq/88tM/CXPUtacU2apKtMM6c59cL3jdiQdbnfZK IL+TATw1WjMFh0Oj/ntTfCBnL2c/nh3rZ7nYGWjqKOJlsoxKmlExgtyHuunO35N8ueyc sReQ+hHx/bugrOpMYErrEmj2NSxpIDwrF4irvmEfH5LlKe7lWSPAO8seXlHRtYhyzAKT OCe8D9WBNFEenoidJ+M2NRhqPN9jkE1gJCRv7MYNoo7Gf1I5tdMibjk5CIpsuH01dejb yMkw== X-Gm-Message-State: AOAM5335RZhkQAorPL/yLg0DnL4HrzA+QimoDkCoOCC7XAOqR190WDtR Sw1EOaFAzi/xTRZdD8pKR3rAzGbTG/8Z6uRflg1fvQ== X-Google-Smtp-Source: ABdhPJzGd4rqpbpprVxRT58SQ0mWkivwbwlishXbW/R3KM5sUWLDKwn+nH2fugALpTWwKgteKCnQM+TuY1AtSd9ZY20= X-Received: by 2002:ac8:5702:0:b0:2e1:ec8a:917a with SMTP id 2-20020ac85702000000b002e1ec8a917amr3318464qtw.682.1648719309154; Thu, 31 Mar 2022 02:35:09 -0700 (PDT) MIME-Version: 1.0 References: <20220328152923.90623-1-krzysztof.kozlowski@linaro.org> <12b0056b-8032-452b-f325-6f36037b5a80@linaro.org> In-Reply-To: From: Dmitry Baryshkov Date: Thu, 31 Mar 2022 12:34:58 +0300 Message-ID: Subject: Re: [PATCH] dt-bindings: display: msm: dsi: remove address/size cells To: Vinod Koul Content-Type: text/plain; charset="UTF-8" X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, David Airlie , linux-arm-msm , dri-devel , Abhinav Kumar , Krzysztof Kozlowski , Krzysztof Kozlowski , freedreno , Sean Paul , "linux-kernel@vger.kernel.org" Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Thu, 31 Mar 2022 at 09:05, Vinod Koul wrote: > > On 29-03-22, 10:52, Rob Herring wrote: > > On Tue, Mar 29, 2022 at 12:01:52PM +0530, Vinod Koul wrote: > > > On 28-03-22, 13:21, Rob Herring wrote: > > > > On Mon, Mar 28, 2022 at 12:18 PM Krzysztof Kozlowski > > > > wrote: > > > > > > > > > > On 28/03/2022 19:16, Vinod Koul wrote: > > > > > > On 28-03-22, 19:43, Dmitry Baryshkov wrote: > > > > > >> On Mon, 28 Mar 2022 at 18:30, Krzysztof Kozlowski > > > > > >> wrote: > > > > > >>> > > > > > >>> The DSI node is not a bus and the children do not have unit addresses. > > > > > >>> > > > > > >>> Reported-by: Vinod Koul > > > > > >>> Signed-off-by: Krzysztof Kozlowski > > > > > >> > > > > > >> NAK. > > > > > >> DSI panels are children of the DSI device tree node with the reg = <0>; address. > > > > > >> This is the convention used by other platforms too (see e.g. > > > > > >> arch/arm64/boot/dts/freescale/imx8mq-evk.dts). > > > > > > > > > > > > So we should add reg = 0, i will update my dtsi fix > > > > > > > > > > > > > > > > To "ports" node? No. The reg=0 is for children of the bus, so the > > > > > panels. How to combine both without warnings - ports and panel@0 - I > > > > > don't know yet... > > > > > > > > I don't think that should case a warning. Or at least it's one we turn off. > > > > > > Well in this case I think we might need a fix: > > > Here is the example quoted in the binding. We have ports{} and then the > > > two port@0 and port@1 underneath. > > > > It's the #address-cells/#size-cells under 'ports' that applies to 'port' > > nodes. As 'ports' has no address (reg) itself, it doesn't need > > #address-cells/#size-cells in its parent node. > > > > > > > > So it should be okay to drop #address-cells/#size-cells from dsi node > > > but keep in ports node... > > > > Yes. > > > > > Thoughts...? > > > > But I thought a panel@0 node was being added? If so then you need to add > > them back. > > I guess we should make this optional, keep it when adding panel@0 node > and skip for rest where not applicable..? Dmitry is that fine with you? This sounds like a workaround. When a panel node is added together with the '#address-cells' / '#size-cells' properties, we will get warnings for the 'ports' node. I'd prefer to leave things to pinpoint that the problem is generic rather than being specific to several device trees with the DSI panel nodes. How do other platforms solve the issue? In fact we can try shifting to the following dts schema: dsi@ae940000 { compatible = "qcom,mdss-dsi-ctrl"; ports { #adress-cells = <1>; #size-cells = <0>; port@0 { reg = <0>; dsi0_in: endpoint {}; }; port@1 { reg = <1>; dsi0_out: endpoint { remote-endpoint = <&panel_in>; }; }; /* dsi-bus is a generic part */ dsi-bus { #adress-cells = <1>; #size-cells = <0>; /* panel@0 goes to the board file */ panel@0 { compatible = "vendor,some-panel"; ports { #adress-cells = <1>; #size-cells = <0>; port@0 { reg = <0>; panel_in: endpoint { remote-endpoint = <&dsi0_out>; }; }; }; }; }; WDYT? -- With best wishes Dmitry