Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp5503246pxj; Wed, 26 May 2021 12:04:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxu43Fr/UavaBMdhDBH6KVjqyUMhtt/QOgPSahAe96NxUkFaMr+MhGc+OfdQQ8PKIVq5FjT X-Received: by 2002:a05:6402:44:: with SMTP id f4mr39258181edu.364.1622055897855; Wed, 26 May 2021 12:04:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622055897; cv=none; d=google.com; s=arc-20160816; b=Qm+FALs5SG+3KcAP+FmxKThKYBV14KRXsW12EowvR8ytL8VF148RbDwcBRBRN8d1yS 5P3R1dOVSnEV8NTs1TWDVePsQVtVscTai40K4l+FSc5txYpps9liMcCFetSPnDJMFrJg hFA2QXfwtjVbWVUsDD3MYzq+2rnijZa4LLln2QwHKXs3sqvCVhQA4cjZzzrdoWxxrmG4 PhH9rzQpJl6Y8jiQhxA8D8niiVgaV0LkSGVryhYJxtOQcR8kA3FX7gZsdPPYAvYv24ss rOxk0Qqnyc5aXzBs2T1ub5MftHkUBOKMhMd6ewvVKffcglrp+2aKxM+bzS1DRZ9r3Qf9 AhTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=tiiN7makazoom7pCtyD0iCir4iR2Oy+IqqShZdnezTE=; b=QTteSmX3ydl7GcLfohZp48tvqSN62rZwgQ0MWDziKNpBCusOrUjPUaeFzYBXPdpC+W uYGTQEILHgSwtQN92h7iqiKkqzhVoD9u/cNRpbdSPBU4zYekaIV3vep30TFGVblfS7hR KIu1N031HoQH/uxOmMsVgv8ehYHftHEFNfN9VxhxYx+/oPLfnU+tHpCJwtnfnQSUpXgw WZI8HlxVhQWQTk9bxatH2XUXBYZwwC6Ate/6EznIXRUh0hYJSjbgJN9jXg75KFCtPvDv u5un0kpZ/wGeNBFOQAzveH7Yn37T8pOCG3yGRhexFAfJqkl2jDlMPgaAkFXT2ypQZk91 ff0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=I3O+BFF7; 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 n15si212237eje.552.2021.05.26.12.04.23; Wed, 26 May 2021 12:04:57 -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=I3O+BFF7; 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 S234771AbhEZPZE (ORCPT + 99 others); Wed, 26 May 2021 11:25:04 -0400 Received: from fllv0015.ext.ti.com ([198.47.19.141]:57164 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235396AbhEZPY6 (ORCPT ); Wed, 26 May 2021 11:24:58 -0400 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 14QFNKSo076748; Wed, 26 May 2021 10:23:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1622042600; bh=tiiN7makazoom7pCtyD0iCir4iR2Oy+IqqShZdnezTE=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=I3O+BFF7WXi1/Usorz2skRjQlEDLzU/xcXlr1fe6iT2SiBznJ+9ppkUW+dCVzK5h4 l+xn9qiMsUA9v9eFVBmdDDaWaDVe7vUJmO+OJivOYJGU0N1Y3wdlFfCotQzp4LiJCl zlTfO+TjALGUe1mMVIA2C0czqvVgY2p5j3g2Srt8= Received: from DLEE110.ent.ti.com (dlee110.ent.ti.com [157.170.170.21]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 14QFNKUI078202 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 26 May 2021 10:23:20 -0500 Received: from DLEE115.ent.ti.com (157.170.170.26) by DLEE110.ent.ti.com (157.170.170.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Wed, 26 May 2021 10:23:19 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DLEE115.ent.ti.com (157.170.170.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2 via Frontend Transport; Wed, 26 May 2021 10:23:19 -0500 Received: from pratyush-OptiPlex-790.dhcp.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 14QFN9JZ056314; Wed, 26 May 2021 10:23:15 -0500 From: Pratyush Yadav To: Maxime Ripard , Mauro Carvalho Chehab , Rob Herring , Pratyush Yadav , Kishon Vijay Abraham I , Vinod Koul , Peter Ujfalusi , Steve Longerbeam , Benoit Parrot , , , , , CC: Vignesh Raghavendra , Tomi Valkeinen , Chunfeng Yun , Laurent Pinchart Subject: [PATCH v2 01/18] phy: Distinguish between Rx and Tx for MIPI D-PHY with submodes Date: Wed, 26 May 2021 20:52:51 +0530 Message-ID: <20210526152308.16525-2-p.yadav@ti.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210526152308.16525-1-p.yadav@ti.com> References: <20210526152308.16525-1-p.yadav@ti.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Paul Kocialkowski 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 Signed-off-by: Pratyush Yadav --- (no changes since v1) include/linux/phy/phy-mipi-dphy.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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.30.0