Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp2304370rdb; Fri, 8 Dec 2023 04:36:42 -0800 (PST) X-Google-Smtp-Source: AGHT+IEOYnt4/teLdbZfiutL2rnjhL7Ipl3ldzEeu7ji8Xvf7J8OLdPkxVXGQTm4LyYVv7Ir29Zv X-Received: by 2002:a17:902:d2cc:b0:1d0:cec3:4568 with SMTP id n12-20020a170902d2cc00b001d0cec34568mr4218577plc.54.1702039002389; Fri, 08 Dec 2023 04:36:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702039002; cv=none; d=google.com; s=arc-20160816; b=XsZm23xqYaUZy4aNazjKxhuY2bG1tDyeCfj2IF/7E/3C2n2NXNgTRzjWHnT3pFQ1zl yXuAYKo7OHcb09MtAQ8+90GlSAS4kRsDIlrlNcS0zUNXavM7A49fuMxUYzbKbwXbKkkc ukwneyIsJ8ouPdpLlNMkR7m4lm974fwsbxsNJWVJqiJqiiWmiZxwvpfn5w33PNkDSv0p W8enxHq0WWbUg2iRtRtDoWZMPV3hCLMvEwgJ057xJAPHFnELtvb5CvVzOc125ZjkxUL8 WMAz6UZiGUy8ds8YllUvGvr7CNGmNX+iV++nIbmiw2w201tTnQAgKwwk6YgqLbJd1F78 zr/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=GF4BPHYAiYD5N4yRheSGUKFfKbUOf7tXCDFHJS8cLkA=; fh=x9nihIsdLHjSJ6KRyvsauueqwXneElNuRCT3LM+wRYY=; b=nfRBkhNnkz3sKD/OcUp/inVjy/tq1mtzBjsHU/MijoBpL4UHr9DbXkrl6+q9ugqAA2 4YidLlon1GCy0oQa9fo3Y9LCDA7+/u5F5XhdsFFi6SKwunlhEJosROtJomjWzuvdc10A MaFVTXv2CDhz4ZfKZ1wftg6UqGal19S4em9dYgDBMU4mYu0FTu5n4vjBJOQnoBPVdgl8 7Yx90tNC6/MWrPM2SLbtev0SYaRK5mrfwykxGh7EuIy6/LbvNBpy9vPJMV6fMp4WVSjt zNmtVQh5JTi+DB3dUUnMUfMeD6Yx046k9cXqhtzBVtqSSAhacBnxMv4etB4i2aL72+4i j08A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vV79CjBb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id z3-20020a1709028f8300b001d0b2230dbfsi1485166plo.266.2023.12.08.04.36.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Dec 2023 04:36:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vV79CjBb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id C624D82C9DBC; Fri, 8 Dec 2023 04:36:39 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233526AbjLHMfi (ORCPT + 99 others); Fri, 8 Dec 2023 07:35:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52140 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233446AbjLHMff (ORCPT ); Fri, 8 Dec 2023 07:35:35 -0500 Received: from mail-yw1-x1129.google.com (mail-yw1-x1129.google.com [IPv6:2607:f8b0:4864:20::1129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 98777E0 for ; Fri, 8 Dec 2023 04:35:41 -0800 (PST) Received: by mail-yw1-x1129.google.com with SMTP id 00721157ae682-5cbcfdeaff3so19709907b3.0 for ; Fri, 08 Dec 2023 04:35:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1702038941; x=1702643741; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=GF4BPHYAiYD5N4yRheSGUKFfKbUOf7tXCDFHJS8cLkA=; b=vV79CjBbp1D/VLLWbWXkJImlkRuybeeP8zcWhCY3NuPHKNhr0wQj9gb6qjgSYFpOv8 i5XKWinNd8iUTwW8/8QGL6pXj0qMcYtAx/JLMsvbk1ySMaEJOpsVuS+eSv/5FCptutPq CJeIb+Z0adGO6yHkjctDla/l3qHwPr0rOZBWFXXhkts6AO8E2lNDdkaA0q8BrJzX5qHk 3sF2HGEUFtOHlHcrzq6zPLVIEKhXQszaW9i3l2kFyUfCP9NKGoMtM2m7vGWta2wrwo5d lOaP9F3acV9Rc78xb3vAMD7q/zzxJbDV0X2tvWvXVUCzyo4LMrz82G0CaHTpAT2ZLfHM qEVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702038941; x=1702643741; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=GF4BPHYAiYD5N4yRheSGUKFfKbUOf7tXCDFHJS8cLkA=; b=cPBtNZWc2qFLOmInb2COb5U6sPBcSJeJx5jv+E+QXfLlDVR5PgV5F6mYJqtC3czba6 mvKaUvEBaKWXbaJNxEvhAHdz7bQa+GxCP4rO2QA+5uAL/pcau4FR+6l9LEW2rlOymgka hBjh+uq7+SRm8+IcPWDu3DsRgviu7n9cgiLeJnexTP+hFrVZbF87J8NCBC6QdwJNIUbC Cr0z4ucU1EvLsgjMnnNw32sQms60aST04WWQIVGJZ28rEII+kdoCbdXEMnRt4Ly8i3et PwB6CwrirLzxaBZ9hcEvejmL31ZRoQpPagxHu0HXH3tzm6Acvcn5GRFf0e2HT9vz1Cvo u2pA== X-Gm-Message-State: AOJu0YznGzXu8V46vrKOX12Mbh9x1urB0Lm5BbOE397Uk88Iv0FFxyzs b3klbW/8nAPPZPPMKtdkDor2i9pS6mcLLKG23Ja9jA== X-Received: by 2002:a05:690c:368a:b0:5d8:67b8:6d13 with SMTP id fu10-20020a05690c368a00b005d867b86d13mr4004640ywb.76.1702038940776; Fri, 08 Dec 2023 04:35:40 -0800 (PST) MIME-Version: 1.0 References: <20231122-phy-qualcomm-edp-x1e80100-v3-0-576fc4e9559d@linaro.org> <20231122-phy-qualcomm-edp-x1e80100-v3-2-576fc4e9559d@linaro.org> <545d3ace-66e5-4470-b3a4-cbdac5ae473d@linaro.org> In-Reply-To: From: Dmitry Baryshkov Date: Fri, 8 Dec 2023 14:35:29 +0200 Message-ID: Subject: Re: [PATCH v3 2/3] dt-bindings: phy: qcom-edp: Add X1E80100 PHY compatibles To: Krzysztof Kozlowski Cc: Konrad Dybcio , Abel Vesa , Andy Gross , Bjorn Andersson , Vinod Koul , Kishon Vijay Abraham I , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Abhinav Kumar , Johan Hovold , linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Fri, 08 Dec 2023 04:36:40 -0800 (PST) On Fri, 8 Dec 2023 at 14:21, Krzysztof Kozlowski wrote: > > On 08/12/2023 13:17, Dmitry Baryshkov wrote: > >>>>>> Anyway, I was thinking this should be rather argument to phy-cells. > >>>>> I'm not sure I'm for this, because the results would be: > >>>>> > >>>>> --- device.dts --- > >>>>> &dp_controller0 { > >>>>> phys = <&dp_phy0 PHY_EDP>; > >>>>> }; > >>>>> > >>>>> &dp_controller1 { > >>>>> phys = <&dp_phy1 PHY_DP>; > >>>>> }; > >>>>> ------------------ > >>>>> > >>>>> as opposed to: > >>>>> > >>>>> --- device.dts --- > >>>>> &dp_phy0 { > >>>>> phy-type ; > >>>>> }; > >>>>> > >>>>> &dp_phy1 { > >>>>> phy-type = ; > >>>>> }; > >>>>> ------------------ > >>>> > >>>> Which is exactly what I proposed/wanted to see. > >>>> > >>>>> > >>>>> i.e., we would be saying "this board is connected to this phy > >>>>> instead" vs "this phy is of this type on this board". > >>>>> > >>>>> While none of them really fit the "same hw, different config" > >>>>> situation, I'd vote for the latter one being closer to the > >>>>> truth > >>>> > >>>> Then maybe I miss the bigger picture, but commit msg clearly says: > >>>> "multiple PHYs that can work in both eDP or DP mode" > >>>> > >>>> If this is not the case, describe the hardware correctly in the commit > >>>> msg, so people will not ask stupid questions... > >>> > >>> There are multiple PHYs (each of them at its own address space). Each > >>> of the PHYs in question can be used either for the DisplayPort output > >>> (directly or through the USB-C) or to drive the eDP panel. > >>> > >>> Same applies to the displayport-controller. It can either drive the DP > >>> or eDP output, hardware-wise it is the same. > >> > >> Therefore what I proposed was correct - the block which uses the phy > >> configures its mode. Because this part: > >> "this phy is of this type on this board". > >> is not true. The phy is both types. > > > > But hopefully you don't mean using #phy-cells here. There are no > > sub-PHYs or anything like that. > > I am exactly talking about phy-cells. Look at first example from Abel's > code. I always had an impression that #foo-cells means that there are different units within the major handler. I.e. #clock-cells mean that there are several different clocks, #reset-cells mean that there are several resets, etc. Ok, maybe this is not a perfect description. We need cells to identify a particular instance within the major block. Maybe that sounds more correct. For the USB+DP PHY we use #phy-cells to select between USB3 and DP PHYs. But for these PHYs we do not have sub-devices, sub-blocks, etc. There is a single PHY which works in either of the modes. Last, but not least, using #phy-cells in this way would create asymmetry with all the other PHYs (and especially other QMP PHYs) present on these platforms. If you feel that phy-type is not an appropriate solution, I'd vote for not having the type in DT at all, letting the DP controller determine the proper mode on its own. -- With best wishes Dmitry