From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.5 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 48B6EC4363A for ; Fri, 23 Oct 2020 18:15:07 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B16BD20759 for ; Fri, 23 Oct 2020 18:15:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="kzJ7hj4L"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="lFi+TwD2" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B16BD20759 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-ID:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=h91ZaPA6Bd3FlrxUGC1sS8TRkkOs7uFAKu9x+7tm/fQ=; b=kzJ7hj4Lko9ysyXwE+su6+g4k xPINarCp3tUv2RgchJYqfASc9WrIrzOSjpLnG+Jx/arJ1CPwgGCoQlCcssXUKTWvwW8aMhjE8VTN+ E6BPk55DAU7OUKU1RG1z3LLWCXwkS7BKp6fMYlOjAanCfC/BmksX2eboOYsj1B8wwT3Rx8Ep5Nd2/ wPT42DoZ/Nz2LHHU1krYp8AnqK/uIkEUmr3gcXZfkmTNfYnS9CwbBfn6VQY7QPZhdd8IlPH5ftcc+ 0aeZwkTuyb++tNQ+FMykWJehDp8oKsL09p2OqbkZxnnjQjTAK8lVW3Ubex9sVe9hCuIrZqC7vp3wR zA0zTksxg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kW1ZM-0006zT-GU; Fri, 23 Oct 2020 18:13:40 +0000 Received: from mail-ej1-x641.google.com ([2a00:1450:4864:20::641]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kW1ZJ-0006ya-7O for linux-arm-kernel@lists.infradead.org; Fri, 23 Oct 2020 18:13:38 +0000 Received: by mail-ej1-x641.google.com with SMTP id h24so3592042ejg.9 for ; Fri, 23 Oct 2020 11:13:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=J4Eh2qaJksTCTY1k45teLXaWXNH/ycvD9ltpm944k0Q=; b=lFi+TwD2vaAsrYHdJUzkp6N61fIOnh9+vKHJEudtGhn9CdTxA44JxC28ilTy4/53iD ZVNwMOqKf0jPH8k5codeD54T6uVec8mcd9Bk4K5U4bma2IoUpueoyD9uSEy78ml8VzRO LNcsCN+TUIF596XouiRcRboHJoyDTnt8yBoYr3qu92wlW8KRgB+TzWYlVReuER3Y9eT2 jBaT+9DrkKSorVSnG5g4Zfn+XCrfUPJ/o91TjhXX9BrbjUxSp4dT1zTe6EkvYKk2TaPf aS6qcZz5zum5mdHIKGuv52mVvYKDP6G+CICO+eYC4YmEc1rzn+QCRmmtN+LFmBJpr+C0 zX+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=J4Eh2qaJksTCTY1k45teLXaWXNH/ycvD9ltpm944k0Q=; b=lW+i2GJ3z2H0OmPq1x+d1fDU89FayW2wc6oJ7D5eHkE0b8CHNOwbwMKpb1SYIpafna SrQfwaqZzgCdXBdinC2J7uQVIm2t8IDQmO1rYTVfO6fXK4HVfibZQ8p/oPpt+3b4iq2k lFCRM5VIYu05+2e5LJ2jIhwMqviabAGFzfNSfF6PT/qnnRFLj6KacUu6wEnB4HAsqiNS SCm4upXS1Cs7c/7cJwKLYdcSawHOOaogqSrutsVqas63KAHmQf6DLaUZVlKyxqqlulXA lmElOODu+gNisnrp9nhucYEga0FSh66PcTB5LvFwVDaif3m8JKt3jnjTu5GPC6ld39CZ VmOA== X-Gm-Message-State: AOAM533m0m9bYhN8ghKxXu3Y6r+Ij9A8q2UJ+w9SJYRE+yTBAGJXl5mH N+j4k9ZvYFRfFyuAtFnpHuc= X-Google-Smtp-Source: ABdhPJw4MiBcK6lhwt3Mpbwm8hf16I6Hw1+0s7bS8R/2YorDzTQE48+QOyklgXhBBgNG0ZQGdqDUyg== X-Received: by 2002:a17:906:12cf:: with SMTP id l15mr3434340ejb.540.1603476814307; Fri, 23 Oct 2020 11:13:34 -0700 (PDT) Received: from kista.localnet (cpe1-5-97.cable.triera.net. [213.161.5.97]) by smtp.gmail.com with ESMTPSA id k23sm1231498ejk.0.2020.10.23.11.13.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Oct 2020 11:13:32 -0700 (PDT) From: Jernej =?utf-8?B?xaBrcmFiZWM=?= To: linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devel@driverdev.osuosl.org, linux-sunxi@googlegroups.com Subject: Re: [linux-sunxi] [PATCH 01/14] phy: Distinguish between Rx and Tx for MIPI D-PHY with submodes Date: Fri, 23 Oct 2020 20:18:58 +0200 Message-ID: <7673189.jqQXtdQLJ6@kista> In-Reply-To: <20201023174546.504028-2-paul.kocialkowski@bootlin.com> References: <20201023174546.504028-1-paul.kocialkowski@bootlin.com> <20201023174546.504028-2-paul.kocialkowski@bootlin.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201023_141337_349480_13D78BDC X-CRM114-Status: GOOD ( 26.23 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Hans Verkuil , Philipp Zabel , Thomas Petazzoni , Greg Kroah-Hartman , Helen Koike , Vinod Koul , Maxime Ripard , Kishon Vijay Abraham I , paul.kocialkowski@bootlin.com, Chen-Yu Tsai , Rob Herring , Hans Verkuil , Yong Deng , Sakari Ailus , Mauro Carvalho Chehab , kevin.lhopital@hotmail.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi! Dne petek, 23. oktober 2020 ob 19:45:33 CEST je Paul Kocialkowski napisal(a): > As some D-PHY controllers support both Rx and Tx mode, we need a way for > users to explicitly request one or the other. For instance, Rx mode can > be used along with MIPI CSI-2 while Tx mode can be used with MIPI DSI. > > Introduce new MIPI D-PHY PHY submodes to use with PHY_MODE_MIPI_DPHY. > The default (zero value) is kept to Tx so only the rkisp1 driver, which > uses D-PHY in Rx mode, needs to be adapted. > > Signed-off-by: Paul Kocialkowski > --- > drivers/staging/media/rkisp1/rkisp1-isp.c | 3 ++- > include/linux/phy/phy-mipi-dphy.h | 13 +++++++++++++ I think some changes are missing in this patch. For example, phy_set_mode_ext() must be modified to take another argument, otherwise change of rkisp1-isp driver doesn't make much sense. Best regards, Jernej > 2 files changed, 15 insertions(+), 1 deletion(-) > > diff --git a/drivers/staging/media/rkisp1/rkisp1-isp.c b/drivers/staging/ media/rkisp1/rkisp1-isp.c > index 6ec1e9816e9f..0afbce00121e 100644 > --- a/drivers/staging/media/rkisp1/rkisp1-isp.c > +++ b/drivers/staging/media/rkisp1/rkisp1-isp.c > @@ -902,7 +902,8 @@ static int rkisp1_mipi_csi2_start(struct rkisp1_isp *isp, > > phy_mipi_dphy_get_default_config(pixel_clock, isp->sink_fmt- >bus_width, > sensor->lanes, cfg); > - phy_set_mode(sensor->dphy, PHY_MODE_MIPI_DPHY); > + phy_set_mode_ext(cdev->dphy, PHY_MODE_MIPI_DPHY, > + PHY_MIPI_DPHY_SUBMODE_RX); > phy_configure(sensor->dphy, &opts); > phy_power_on(sensor->dphy); > > diff --git a/include/linux/phy/phy-mipi-dphy.h b/include/linux/phy/phy-mipi- dphy.h > index a877ffee845d..0f57ef46a8b5 100644 > --- a/include/linux/phy/phy-mipi-dphy.h > +++ b/include/linux/phy/phy-mipi-dphy.h > @@ -6,6 +6,19 @@ > #ifndef __PHY_MIPI_DPHY_H_ > #define __PHY_MIPI_DPHY_H_ > > +/** > + * enum phy_mipi_dphy_submode - MIPI D-PHY sub-mode > + * > + * A MIPI D-PHY can be used to transmit or receive data. > + * Since some controllers can support both, the direction to enable is specified > + * with the PHY sub-mode. Transmit is assumed by default with phy_set_mode. > + */ > + > +enum phy_mipi_dphy_submode { > + PHY_MIPI_DPHY_SUBMODE_TX = 0, > + PHY_MIPI_DPHY_SUBMODE_RX, > +}; > + > /** > * struct phy_configure_opts_mipi_dphy - MIPI D-PHY configuration set > * > -- > 2.28.0 > > -- > You received this message because you are subscribed to the Google Groups "linux-sunxi" group. > To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe@googlegroups.com. > To view this discussion on the web, visit https://groups.google.com/d/msgid/ linux-sunxi/20201023174546.504028-2-paul.kocialkowski%40bootlin.com. > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel