Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp13982454ybl; Mon, 30 Dec 2019 01:39:03 -0800 (PST) X-Google-Smtp-Source: APXvYqzdtyMLwgOgAbM7ABiKB0i5EHj4bh2jRsnSf6mm4z9WH/5raUghqA1MZqPcgwLRYpOYZCB8 X-Received: by 2002:a9d:730e:: with SMTP id e14mr69291335otk.62.1577698743307; Mon, 30 Dec 2019 01:39:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577698743; cv=none; d=google.com; s=arc-20160816; b=kqAcEimNu9k0I+o7Dp7ol8D3gcLGqGSkPzZHyLCxZ3/ElJsMW1kBqgptCI0CgrJDZh 0uN8oIqJLfaVk1iEcwBzP/LHN/3aInJP0iOsoP2VDLFWVnvrRpAtQWyLHiUpuJ6V3TTF 977I6CbJo7AFiJ4xI5n2eyG1QZ8pi194qMKzd0uUReYDaHKdJvJMgzFCRVd3OVj/Y8PQ T8STjUyF5ttvlqGWsZkUwKp2+uOvhKn/vrKrwdS4fA8Dx3h+f7Fh3/2P/yIVfQsY7mxP 6LvIa8Dj6F7FrnT1xPKZjRD1d3MpWK900hS31GlhQf1JFlevYzb7uVbi1PQPTtUGvSPB mciw== 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=HEsmbipAwW0v5k2Dk4uWd1mq6oacihDpfL4YGD2Huys=; b=TJM7Z9bbiiaEPvCtrI33Od55SC1jIke32Dtd7oE3aaXuiXLOYr46mpUo1KgU3FQ5y5 j1tAgwu8cQreqO8bIedgmkdDeDn63YeQHc06ZURrHW2jreXdLlv4qgFt4Kuw74Yc+foU +qlzWsLTqoNBiFHt1Y4kxo8nwV0btDQ4xUMup0owyC4rQt9rh55NnfVIyPY8xVVV5ijf Y0sE2m0uuVQtQkOgTa6TIUWiTMSydZpV3Pc2b5MgIG/pJHrYTVS/Rc54/gknAnrJ96Yf yHbOoXAIa3PrvkpCT8KQCxvYE5DJROlxnwGZB19h3SmZqXAY/3xItnU0xXlFL2+2p0xd qyDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=PawEK2Rc; 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 y6si16569115oih.217.2019.12.30.01.38.51; Mon, 30 Dec 2019 01:39:03 -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=PawEK2Rc; 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 S1727398AbfL3JiA (ORCPT + 99 others); Mon, 30 Dec 2019 04:38:00 -0500 Received: from fllv0016.ext.ti.com ([198.47.19.142]:43940 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727162AbfL3JiA (ORCPT ); Mon, 30 Dec 2019 04:38:00 -0500 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id xBU9btZ8008994; Mon, 30 Dec 2019 03:37:55 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1577698675; bh=HEsmbipAwW0v5k2Dk4uWd1mq6oacihDpfL4YGD2Huys=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=PawEK2Rc6yNXpkLSBV37uUbqNZekrvmCmwfpDrqguyY9rbm1EgSYY9vZ4yv7Ra7i7 To/lNH56sqSLuuqamMoBxWX2l6DW6+EzdXYrW3zEBhYCfsdjf9oR8Cbqejg4AIi3sm yLidjSVu/zDDxMEaF8qfFOjZhl8/IGwzpvNWDquU= Received: from DFLE105.ent.ti.com (dfle105.ent.ti.com [10.64.6.26]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id xBU9btlr113518 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 30 Dec 2019 03:37:55 -0600 Received: from DFLE101.ent.ti.com (10.64.6.22) by DFLE105.ent.ti.com (10.64.6.26) 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 03:37:54 -0600 Received: from lelv0326.itg.ti.com (10.180.67.84) by DFLE101.ent.ti.com (10.64.6.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 03:37:54 -0600 Received: from [10.1.3.6] (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id xBU9bqS2026637; Mon, 30 Dec 2019 03:37:53 -0600 Subject: Re: [PATCH 2/3] dt-bindings: phy: Add lane-mode property to WIZ (SERDES wrapper) To: Rob Herring , Kishon Vijay Abraham I 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> 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: <15d0bd42-5bb5-ee14-9e2a-7beb55671e8a@ti.com> Date: Mon, 30 Dec 2019 11:37:52 +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: 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 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. Best regards, Jyri [1] include/linux/phy/phy.h -- Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki