Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp14088114ybl; Mon, 30 Dec 2019 03:55:42 -0800 (PST) X-Google-Smtp-Source: APXvYqx3M8slyz4xernGRvNTU5gWSm7euGqfrTt5D9O+ox3jGD1G85qofweK9IXyFFqgKu5TUwCn X-Received: by 2002:a05:6830:1651:: with SMTP id h17mr70151749otr.167.1577706942539; Mon, 30 Dec 2019 03:55:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577706942; cv=none; d=google.com; s=arc-20160816; b=u8UmWGgtfTFrlhD2L1dkRXXN+SAIy59F4JwwgVjHgyE6QAZiUe/QFy88y0r21ZrWTj 4YysBDxdd+BvbAlZ57ZgNak1m9wfhPKkEn/LTPNeh01wnY74dfItXwUGNY+rxyp77NlE IhPneA4dekM58+PzOtkH9LVDdPmQDboOJ+g91ys1pvwXrXJN8mlCWAD5DaD2bJeOli4o vVYDmSfa5R3r+bK6EhwulDVdaWR3GEFDDUP8w4FnSa28ritSUCz3eTg/zI009kb1G8FT d0dG3dHSQft05LCsW37UoxtjGaE2+rIj+YAgQ3hd5zlgbdzq3oX//Fy+BJGOR6iXysE0 qV5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:autocrypt:from:references:cc:to:subject:dkim-signature; bh=qZ7AmClmWJBfPxy30yYDhId09pXcWEI0aLIuvlycsbw=; b=xt/DOXMv64U1+oCF3QGIaIBdi3CStNmCFkH2j8kpPC8gsPbUxSzXURL30oZNBRhW/P 9k/Pa5xYdQkxaQWTJ+xKdq4U/atVAaT7Ny9vUJMg4L1M2P+e7Q4Vozivl57ryuOm6xTl XsoYaKjd7U7762pjK2JR5plle8AiFVcbHJqZQPqTtL6G9wsndq0UT/ibaVJ6Qz1d6aGW FhnTL69bNh2wjz2ah0bHTELAYQ5/a7BaPvnXEf46JuRdxPvOYnqzE+9vzPIK6oF+BULV Kbl/LrbTIWADBEyhuFX/bnSvE6/i56Eq2/mXxdsJno20OYv9PNG1Ygo1wln2Lf+kz//6 S6HQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=GINpgdYu; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h64si14711453oif.215.2019.12.30.03.55.30; Mon, 30 Dec 2019 03:55:42 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=GINpgdYu; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727438AbfL3Lyr (ORCPT + 99 others); Mon, 30 Dec 2019 06:54:47 -0500 Received: from lelv0142.ext.ti.com ([198.47.23.249]:56764 "EHLO lelv0142.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726196AbfL3Lyr (ORCPT ); Mon, 30 Dec 2019 06:54:47 -0500 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id xBUBsgdM026883; Mon, 30 Dec 2019 05:54:42 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1577706882; bh=qZ7AmClmWJBfPxy30yYDhId09pXcWEI0aLIuvlycsbw=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=GINpgdYuyuCxcLswdo/0HbfUs1IRn27j0J+tlJgG7affnnUi+LeX5LqtZePJKZPgw wfK3ugvUdmIxoXLBDlWfOQfq+OwAuA2/o/au4uN+paAfZA01MT2lonoCUvPlpirkBn QZ0toGtg8GQGXT1+MPTMsDdLj3LPVqZO0Qaymue4= Received: from DLEE107.ent.ti.com (dlee107.ent.ti.com [157.170.170.37]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTP id xBUBsg2n062128; Mon, 30 Dec 2019 05:54:42 -0600 Received: from DLEE111.ent.ti.com (157.170.170.22) by DLEE107.ent.ti.com (157.170.170.37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3; Mon, 30 Dec 2019 05:54:41 -0600 Received: from lelv0327.itg.ti.com (10.180.67.183) by DLEE111.ent.ti.com (157.170.170.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3 via Frontend Transport; Mon, 30 Dec 2019 05:54:41 -0600 Received: from [10.1.3.6] (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id xBUBsd0f072579; Mon, 30 Dec 2019 05:54:40 -0600 Subject: Re: [PATCH 2/3] dt-bindings: phy: Add lane-mode property to WIZ (SERDES wrapper) To: Kishon Vijay Abraham I , Rob Herring CC: "linux-kernel@vger.kernel.org" , , Tomi Valkeinen , Praneeth Bajjuri , Yuti Amonkar , Swapnil Kashinath Jakhade , Roger Quadros References: <20191219190833.GA16358@bogus> <3cf64e30-6b4d-a138-7164-54d1cdc8e05a@ti.com> <15d0bd42-5bb5-ee14-9e2a-7beb55671e8a@ti.com> <763b3a26-98bd-25c2-687b-e644c5bcb05b@ti.com> From: Jyri Sarha Autocrypt: addr=jsarha@ti.com; prefer-encrypt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YKQrRnMk/dIPWg6AJx38Cl4P9PK1JX 8VK661BG8GXsXJ3uZbPSu6K0+FiJy09N4IW7CPJNABEBAAHCwV8EGAECAAkFAlbdWt8CGwwA CgkQkDazUNfWGUFOfRAA5K/z9DXVEl2kkuMuIWkgtuuLQ7ZwqgxGP3dMA5z3Iv/N+VNRGbaw oxf+ZkTbJHEE/dWclj1TDtpET/t6BJNLaldLtJ1PborQH+0jTmGbsquemKPgaHeSU8vYLCdc GV/Rz+3FN0/fRdmoq2+bIHght4T6KZJ6jsrnBhm7y6gzjMOiftH6M5GXPjU0/FsU09qsk/af jbwLETaea0mlWMrLd9FC2KfVITA/f/YG2gqtUUF9WlizidyctWJqSTZn08MdzaoPItIkRUTv 6Bv6rmFn0daWkHt23BLd0ZP7e7pON1rqNVljWjWQ/b/E/SzeETrehgiyDr8pP+CLlC+vSQxi XtjhWjt1ItFLXxb4/HLZbb/L4gYX7zbZ3NwkON6Ifn3VU7UwqxGLmKfUwu/mFV+DXif1cKSS v6vWkVQ6Go9jPsSMFxMXPA5317sZZk/v18TAkIiwFqda3/SSjwc3e8Y76/DwPvUQd36lEbva uBrUXDDhCoiZnjQaNz/J+o9iYjuMTpY1Wp+igjIretYr9+kLvGsoPo/kTPWyiuh/WiFU2d6J PMCGFGhodTS5qmQA6IOuazek1qSZIl475u3E2uG98AEX/kRhSzgpsbvADPEUPaz75uvlmOCX tv+Sye9QT4Z1QCh3lV/Zh4GlY5lt4MwYnqFCxroK/1LpkLgdyQ4rRVw= Message-ID: <8e7506c4-9871-1a81-0477-322c0516ff99@ti.com> Date: Mon, 30 Dec 2019 13:54:39 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 In-Reply-To: <763b3a26-98bd-25c2-687b-e644c5bcb05b@ti.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-GB Content-Transfer-Encoding: 8bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 30/12/2019 12:18, Kishon Vijay Abraham I wrote: > Hi, > > On 30/12/19 3:07 PM, Jyri Sarha wrote: >> On 24/12/2019 23:31, Rob Herring wrote: >>> On Fri, Dec 20, 2019 at 5:52 AM Jyri Sarha wrote: >>>> >>>> On 19/12/2019 21:08, Rob Herring wrote: >>>>> On Mon, Dec 09, 2019 at 06:22:11PM +0200, Jyri Sarha wrote: >>>>>> Add property to indicate the usage of SERDES lane controlled by the >>>>>> WIZ wrapper. The wrapper configuration has some variation depending on >>>>>> how each lane is going to be used. >>>>>> >>>>>> Signed-off-by: Jyri Sarha >>>>>> --- >>>>>> .../devicetree/bindings/phy/ti,phy-j721e-wiz.yaml | 12 ++++++++++++ >>>>>> 1 file changed, 12 insertions(+) >>>>>> >>>>>> diff --git a/Documentation/devicetree/bindings/phy/ti,phy-j721e-wiz.yaml b/Documentation/devicetree/bindings/phy/ti,phy-j721e-wiz.yaml >>>>>> index 94e3b4b5ed8e..399725f65278 100644 >>>>>> --- a/Documentation/devicetree/bindings/phy/ti,phy-j721e-wiz.yaml >>>>>> +++ b/Documentation/devicetree/bindings/phy/ti,phy-j721e-wiz.yaml >>>>>> @@ -97,6 +97,18 @@ patternProperties: >>>>>> Torrent SERDES should follow the bindings specified in >>>>>> Documentation/devicetree/bindings/phy/phy-cadence-dp.txt >>>>>> >>>>>> + "^lane[1-4]-mode$": >>>>>> + allOf: >>>>>> + - $ref: /schemas/types.yaml#/definitions/uint32 >>>>>> + - enum: [0, 1, 2, 3, 4, 5, 6] >>>>>> + description: | >>>>>> + Integer describing static lane usage for the lane indicated in >>>>>> + the property name. For Sierra there may be properties lane0 and >>>>>> + lane1, for Torrent all lane[1-4]-mode properties may be >>>>>> + there. The constants to indicate the lane usage are defined in >>>>>> + "include/dt-bindings/phy/phy.h". The lane is assumed to be unused >>>>>> + if its lane-use property does not exist. >>>>> >>>>> The defines were intended to be in 'phys' cells. Does putting both lane >>>>> and mode in the client 'phys' properties not work? >>>>> >>>> >>>> Let me first check if I understood you. So you are suggesting something >>>> like this: >>>> >>>> dp-phy { >>>> #phy-cells = <5>; /* 1 for phy-type and 4 for lanes = 5 */ >>>> ... >>>> }; >>>> >>>> dp-bridge { >>>> ... >>>> phys = <&dp-phy PHY_TYPE_DP 1 1 0 0>; /* lanes 0 and 1 for DP */ >>> >>> Yes, but I think the lanes can be a single cell mask. And I'd probably >>> make that the first cell which is generally "which PHY" and make >>> type/mode the 2nd cell. I'd look for other users of PHY_TYPE_ defines >>> and match what they've done if possible. >>> >> >> I see. This will cause some head ache on the driver implementation side, >> as there is no way for the phy driver to peek the lane use or type from >> the phy client's device tree node. It also looks to me that the phy >> API[1] has to be extended quite a bit before the phy client can pass the >> lane usage information to the phy driver. It will cause some pain to >> implement the extension without breaking the phy API and causing a nasty >> cross dependency over all the phy client domains. >> >> Also, there is not much point in putting the PHY_TYPE constant to the >> phy client's node, as normally the phy client driver will know quite >> well what PHY_TYPE to use. E.g. a SATA driver will always select >> PHY_TYPE_SATA and a PCIE driver will select PHY_TYPE_PCIE, etc. >> >> Kishon, if we have to take this road it also starts to sound like we >> will have to move the phy client's phandle to point to the phy wrapper >> node, if we want to keep the actual phy driver wrapper agnostic. Then we >> can make the wrapper to act like a proxy that forwards the phy_ops calls >> to the actual phy driver. Luckily the per lane phy-type selection is not >> a blocker for our j721e DisplayPort functionality. > > WIZ is a PHY wrapper and not a PHY in itself. I'm not inclined in > modeling WIZ as a PHY and adding an additional level of indirection. > This can add more challenges w.r.t PHY sequencing and can also lead to > locking issues. That also doesn't accurately represent the HW bock. > Ok, then assuming the phy wrapper node's lane-mode property can't be used and if the lane-mode information is only available at the phy client driver, we must somehow deliver the phy-mode information from the phy client driver to the phy wrapper driver. Maybe a way for the phy wrapper driver to request the phy-mode from the actual phy driver, which in turn gets it from the phy client through phy_ops set_mode() call-back. Then there is the extra twist of a single phy driver serving multiple phy clients using different lanes, but we do not need to cross that bridge for the current DisplayPort functionality. Best regards, Jyri -- Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki