Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp196554ybk; Tue, 12 May 2020 20:08:23 -0700 (PDT) X-Google-Smtp-Source: APiQypLT/22JXqZ+xxlr+02H4J29PD2F8Ywu59Lwq4bKXbMZjecTnUf3UNXXNeAB0ROqjvhv34T1 X-Received: by 2002:a17:906:86d6:: with SMTP id j22mr13463001ejy.1.1589339302858; Tue, 12 May 2020 20:08:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589339302; cv=none; d=google.com; s=arc-20160816; b=FAZ5BgQ3DgcGMR6VfxDIMf9CqPe8vsrKeDSQHs4Bi2y6Nl7euTJKZaRDdJRSkvzLGR 6GCs9oxhXk3ARRVKv6TuzqQV29f4zTdmHHKrmPo9OrC/9q5G31CiC7AFxmQ1Ns6rKudb /iyJAY7Oe15a27XmfwlOGs4JVr6FvcT4AIF4y89NQJz8cULnQeTnqssmONW2BAbBYQuW O+lG5Rz/sYXNGAEHutyI93pdea7uP09wspieMUIlxD66HAyVyw1iAczg1NUD6h4j/B94 LGZhD8Yy1dgrB8lBgyLAtj/lYs6Ym18lS6S2R8eVYDzBu1PPYQs2161rMkpjuT9hqTV3 VFaQ== 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:from:references:cc:to:subject:dkim-signature; bh=/W0losaKE+OtadQbq8BpFkOvawfv3WrRa9LJr4eZlKs=; b=kTmc5XQJsm2r3moLHTwgVZQsaExQBgNy4bxXOuqfP3s5DUl0F8/99kgQbZm8W+//04 fTALZBckRpgojnR0YM5G22b/iEVBc8BQu247uNT3amEC7tb7AnI1ED/HiefXdQRrjkYZ dSt/aLEwZC4p50bn9oS5kASosajp4NhUajUeOUHy1Lzy3jlqGhvWN+8g/j4B3FYYqF+F vVAKX0C83gbFhrNsKONnwXfoc6vONntTZfHvmeZFfyLdMV+G4GGzeoOBIgxx1UbBhN7t YpimRYuR8/sDT4vJSxD7brZGIfDguuRhUsesLAXnxYDYhBbTpbvLYRUSxf0pBYU1gIwt 66Tg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=ivT0SzG3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id d16si49073edp.315.2020.05.12.20.07.59; Tue, 12 May 2020 20:08:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=ivT0SzG3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1728279AbgEMChn (ORCPT + 99 others); Tue, 12 May 2020 22:37:43 -0400 Received: from fllv0016.ext.ti.com ([198.47.19.142]:57574 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725898AbgEMChn (ORCPT ); Tue, 12 May 2020 22:37:43 -0400 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 04D2badb092448; Tue, 12 May 2020 21:37:36 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1589337456; bh=/W0losaKE+OtadQbq8BpFkOvawfv3WrRa9LJr4eZlKs=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=ivT0SzG3dwpvMLQHOz5Jyvx7SF7cqz8jRsZhTVvuOsscD0f9tWMILSJ6joy76NVDy 5ojK7usvdwcSyZy2S8isAFuBXAzomTYxkTW1Ga9zX9BxOzIcSs9395688T7xIfVuCY n4MTWPuFsdxygXSjMgAVIWpmzuLm0nD0iMIjnob4= Received: from DFLE100.ent.ti.com (dfle100.ent.ti.com [10.64.6.21]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 04D2ba7K026237 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 12 May 2020 21:37:36 -0500 Received: from DFLE115.ent.ti.com (10.64.6.36) by DFLE100.ent.ti.com (10.64.6.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3; Tue, 12 May 2020 21:37:36 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DFLE115.ent.ti.com (10.64.6.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3 via Frontend Transport; Tue, 12 May 2020 21:37:35 -0500 Received: from [10.250.233.85] (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 04D2bWDX060736; Tue, 12 May 2020 21:37:33 -0500 Subject: Re: [PATCH v1 2/2] phy: phy-cadence-torrent: Use PHY kernel APIs to set PHY attributes To: Tomi Valkeinen , Maxime Ripard , Swapnil Kashinath Jakhade CC: Yuti Suresh Amonkar , "linux-kernel@vger.kernel.org" , "mark.rutland@arm.com" , "jsarha@ti.com" , "praneeth@ti.com" , Milind Parab , Vinod Koul References: <1588057804-29161-1-git-send-email-yamonkar@cadence.com> <1588057804-29161-3-git-send-email-yamonkar@cadence.com> <20200429122750.hup7vbmz3xnpfwa5@gilmour.lan> <20200507171738.atzyfpueo6bjbwpb@gilmour.lan> From: Kishon Vijay Abraham I Message-ID: Date: Wed, 13 May 2020 08:07:32 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit 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 Hi, On 5/8/2020 1:20 PM, Tomi Valkeinen wrote: > On 07/05/2020 20:17, Maxime Ripard wrote: > >>> Actually, for this particular case, consumer driver will be the Cadence MHDP >>> bridge driver for DisplayPort which is also under review process for >>> upstreaming [1]. So this DRM bridge driver will make use of the PHY APIs >>> phy_get_bus_width() and phy_get_max_link_rate() during execution of probe >>> function to get the number of lanes and maximum link rate supported by Cadence >>> Torrent PHY. This information is required to set the host capabilities in the >>> DRM bridge driver, based on which initial values for DisplayPort link training >>> will be determined. >>> >>> The changes in this PHY patch series are based on suggestions in the review >>> comments in [1] which asks to use kernel PHY APIs to read these properties >>> instead of directly accessing PHY device node. The complete driver and actual >>> use of these APIs can be found in [2]. This is how we are planning to use >>> these APIs. >> >> I haven't really looked into the displayport spec, but I'd assume that there's a >> lot more parameters that would need to be negociated between the phy and the DP >> block? If so, then it would make more sense to follow the path we did for >> MIPI-DSI where the parameters can be negociated through the phy_configure / >> phy_validate interface. > > I don't think this is negotiation, but just exposing the (max) capabilities of > PHY, inside which the configure can work. Maybe all the capabilities could > handled with a struct (struct phy_attrs), instead of adding separate functions > for each, though. yeah, that makes sense. Just that users should take care not to over-write all the phy attributes with partial information. Thanks Kishon