Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp1431435ybj; Fri, 8 May 2020 00:54:10 -0700 (PDT) X-Google-Smtp-Source: APiQypLRpaZUsfoY9zijel0E/m2tpkEpvna5W52vubwYvY92rgSzBV2jCHiXEJguXrCkLgva5so9 X-Received: by 2002:a17:906:6411:: with SMTP id d17mr855422ejm.109.1588924450777; Fri, 08 May 2020 00:54:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588924450; cv=none; d=google.com; s=arc-20160816; b=aaV6ktPAhxvLizmH/8pnzXkwCiFjbXv316IXL7dKmVJNl2Zs/ITTmsTIN4EzGceUKi VHkbe/JErqwApKeyMuEHWkPgoLNhdX1hspxpPcJYfa14wfw3bzw7J7mXJ4sZpH+3qJej fAWBlqJPaaBYVp2US/S8FXd5kfdtSY8eeC+HCHW8aFb6aTvPXCKM9RC2iTWw10jY26lK ql/5/HM75KColt+Gi62CZd1DITZI6BVTgkq5Cy8WBXb8RPGhkx1J32tYOhZegvLwnt94 s7JX9ckj6u2gEUavoJYg0Hhzi8VKxu58S22XPBF7u40mslkyN10yt0FTll06YAvI16Un zvuA== 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=tplglm/g5jD+nhYnoLzqRzsabkE52+jjVIaqi5MySV0=; b=FcOlIMC6oxt4TqE6gZuI6js/xwWwYRABPtoznG4zTneCboyq4zS5CK/gkON99YJIZa sOZwuHncg/ofpECjrjbgGZjZ4GVlqnIMzMVWftovVjC6602Y77qLaskIrAkK27S/S1q6 82YlVYp9aQGF5ihSgOdFKrBodvl02vfng150Y0vmI3YWCmK6BrA0MTga82GVjPslehnP m7uBuTBAsoduBTkqVPhWucR2aex7c2kb5aJ6VdbFCds7NZ8muid2GlmaWaO2O/+TcbNr Nj32R1IfLAK/N9zFiAIf20tvXwDigoh+YvtH8UyV7IYIIfimYFZvXIqW00y87gLsHPqS s3yg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=nX3HI5fZ; 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 dc9si523038ejb.503.2020.05.08.00.53.46; Fri, 08 May 2020 00:54:10 -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=nX3HI5fZ; 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 S1726767AbgEHHuV (ORCPT + 99 others); Fri, 8 May 2020 03:50:21 -0400 Received: from fllv0015.ext.ti.com ([198.47.19.141]:44106 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726036AbgEHHuV (ORCPT ); Fri, 8 May 2020 03:50:21 -0400 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 0487oD6q011100; Fri, 8 May 2020 02:50:13 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1588924213; bh=tplglm/g5jD+nhYnoLzqRzsabkE52+jjVIaqi5MySV0=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=nX3HI5fZdDuxSsGdGX8/gHo4q/JzaHoYq43tvCuFTvjqgRlBgQqakEEh28fnK1FNi HNvSdBAvVeOnyhVIrTo00Qm8CBJDb8w8Hqh0QXOWlqcQKnPFFHQqHDv2IMYPoETT0e LzD715a/ztTvr3j36kypm/A29NhPNx97tN9dX0D4= Received: from DLEE113.ent.ti.com (dlee113.ent.ti.com [157.170.170.24]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 0487oDVf057360 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 8 May 2020 02:50:13 -0500 Received: from DLEE109.ent.ti.com (157.170.170.41) by DLEE113.ent.ti.com (157.170.170.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3; Fri, 8 May 2020 02:50:12 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DLEE109.ent.ti.com (157.170.170.41) 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; Fri, 8 May 2020 02:50:12 -0500 Received: from [192.168.2.6] (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 0487oALu043615; Fri, 8 May 2020 02:50:11 -0500 Subject: Re: [PATCH v1 2/2] phy: phy-cadence-torrent: Use PHY kernel APIs to set PHY attributes To: Maxime Ripard , Swapnil Kashinath Jakhade CC: Yuti Suresh Amonkar , "linux-kernel@vger.kernel.org" , "kishon@ti.com" , "mark.rutland@arm.com" , "jsarha@ti.com" , "praneeth@ti.com" , Milind Parab 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: Tomi Valkeinen Message-ID: Date: Fri, 8 May 2020 10:50:10 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <20200507171738.atzyfpueo6bjbwpb@gilmour.lan> Content-Type: text/plain; charset="utf-8"; format=flowed 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 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. Tomi -- Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki