Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp4626958pxb; Sat, 12 Feb 2022 11:55:48 -0800 (PST) X-Google-Smtp-Source: ABdhPJwGEXlk2b/Iqt1tnUrvylZ/+ygorSiAM6ew7CLYhjk7rIrPzjRj6VGhm8WlChyjvO5nqPm2 X-Received: by 2002:a05:6402:4391:: with SMTP id o17mr8011961edc.48.1644695748249; Sat, 12 Feb 2022 11:55:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644695748; cv=none; d=google.com; s=arc-20160816; b=gVIPZLvDr0OUmH22U67dnfTXnUU9U1+jVxuRgyKBlDdfLm3DDIBU5TcjgOwuniAHDy du2UH9q2Y5Fzoi2ED2YnX9sSd+lBVozHRoDhPaNv84WrUDzG67UG5dR4e1imlxBLQmm7 wm113JHowUMS1oXnfbat75B+ahjmfFS6AsiRVku4iygvzaX+VIUkZdwCYIdZOiCo+Wr3 QoUfSbxcDQyA03XJbQu5sN3Zbhi8O26BkyRNE1dPsq59BnlBS1AYSRRzVEQz7HIWWKbD Q7rPbutiLCmlDjFJ+QihpEVDPxcSpJHMk/jGRK5qBry4DAT0f9EckBmtdWNm45KRHIle HiWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=RitMZ3fNWOb4T6V19TCqNO/AXShHWq8hEhjj18nvmUo=; b=NyejnFCG6c/YijC0c4fBktPdIKl/KBpC1rPtmGww3EBRQn393moHY+aC3uw4Qimrwh SmJU1hTeojz0ieU/H1v7QbMA07VvpQ/cOT4wPql6kwSv9gFowd9AJephs7ES1exjT0bM A6bGiCKeQDxF9ybGLCOgJFEcQKQg1P4pDbK1gcT9NqyQvwKd8RACE+9fKpOrxXnLbvOJ vJ9eqTls6dqyaHHHLWtC7Ui5fVSW3ouogHOi/2VzPqpAhz07DoYsWPLZ02NxdQl71L/o Pq0gKBg26hA8hGqS6weXtYxc6YVweHd0dbwzGLHNg8qKbS/uvMc64kUK0ZFAwPGetHgt BulA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=IMLv4XNB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gz11si5932268ejc.529.2022.02.12.11.55.21; Sat, 12 Feb 2022 11:55:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=IMLv4XNB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238340AbiBKUsB (ORCPT + 93 others); Fri, 11 Feb 2022 15:48:01 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:42910 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353360AbiBKUsA (ORCPT ); Fri, 11 Feb 2022 15:48:00 -0500 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2F2B1CEC; Fri, 11 Feb 2022 12:47:59 -0800 (PST) Received: from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 752CC93; Fri, 11 Feb 2022 21:47:57 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1644612477; bh=ehf6vTlCeB9+XYe9AmuIirbghRbW0KEWGRwclDo3v5c=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=IMLv4XNB8rkEmEcFHY5ynpBplZLVhBle485lTzKMlvpAAGn8QYGGIggZx6kaNBarf +6zUn47Uo7bvLS58Y0bNE5kfUt9FKGWXHaOW258MJlIJyhoN7xVL+B77t/BA/yUAfD HSd3OL2ofQH601HhtMr2CDJwBnFFHjt1kybXQLVM= Date: Fri, 11 Feb 2022 22:47:53 +0200 From: Laurent Pinchart To: Paul Kocialkowski Cc: Rob Herring , linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org, linux-clk@vger.kernel.org, linux-staging@lists.linux.dev, Yong Deng , Mauro Carvalho Chehab , Maxime Ripard , Sakari Ailus , Hans Verkuil , Chen-Yu Tsai , Jernej Skrabec , Greg Kroah-Hartman , Helen Koike , Thomas Petazzoni Subject: Re: [PATCH v2 05/66] dt-bindings: sun6i-a31-mipi-dphy: Add optional direction property Message-ID: References: <20220205185429.2278860-1-paul.kocialkowski@bootlin.com> <20220205185429.2278860-6-paul.kocialkowski@bootlin.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 11, 2022 at 04:12:29PM +0100, Paul Kocialkowski wrote: > Hi Rob, > > On Fri 11 Feb 22, 09:03, Rob Herring wrote: > > On Sat, Feb 05, 2022 at 07:53:28PM +0100, Paul Kocialkowski wrote: > > > The Allwinner A31 MIPI D-PHY block supports both tx and rx directions, > > > although each instance of the block is meant to be used in one > > > direction only. There will typically be one instance for MIPI DSI and > > > one for MIPI CSI-2 (it seems unlikely to ever see a shared instance). > > > > > > Describe the direction with a new allwinner,direction property. > > > For backwards compatibility, the property is optional and tx mode > > > should be assumed by default. > > > > > > Signed-off-by: Paul Kocialkowski > > > --- > > > .../bindings/phy/allwinner,sun6i-a31-mipi-dphy.yaml | 12 ++++++++++++ > > > 1 file changed, 12 insertions(+) > > > > > > diff --git a/Documentation/devicetree/bindings/phy/allwinner,sun6i-a31-mipi-dphy.yaml b/Documentation/devicetree/bindings/phy/allwinner,sun6i-a31-mipi-dphy.yaml > > > index d0b541a461f3..22636c9fdab8 100644 > > > --- a/Documentation/devicetree/bindings/phy/allwinner,sun6i-a31-mipi-dphy.yaml > > > +++ b/Documentation/devicetree/bindings/phy/allwinner,sun6i-a31-mipi-dphy.yaml > > > @@ -37,6 +37,18 @@ properties: > > > resets: > > > maxItems: 1 > > > > > > + allwinner,direction: > > > + $ref: '/schemas/types.yaml#/definitions/string' > > > + description: | > > > + Direction of the D-PHY: > > > + - "rx" for receiving (e.g. when used with MIPI CSI-2); > > > + - "tx" for transmitting (e.g. when used with MIPI DSI). > > > + > > > + enum: > > > + - tx > > > + - rx > > > + default: tx > > > > Can you the phy mode to imply the direction? > > So there was a first attempt at this which introduced a PHY submode but > it was concluded after discussions that the direction is not really a > mode of operation choice, in the sense that the D-PHY cannot be reconfigured > to behave in Rx or Tx mode: it is instead statically assigned to one role > or the other. This is why it feels more appropriate to describe it in the > device-tree. Another option could be different compatible strings, as the RX and TX PHYs actually have very little in common. I don't mind much either way. > See this thread from the previous iteration: > https://patchwork.linuxtv.org/project/linux-media/patch/20210115200141.1397785-3-paul.kocialkowski@bootlin.com/#128800 -- Regards, Laurent Pinchart