From patchwork Thu Mar 8 09:48:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacob Chen X-Patchwork-Id: 10267531 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 7825160211 for ; Thu, 8 Mar 2018 10:07:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 66E882970E for ; Thu, 8 Mar 2018 10:07:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5BD0E29847; Thu, 8 Mar 2018 10:07:18 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 0DCAC2970E for ; Thu, 8 Mar 2018 10:07:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: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=Q4bLAJbelwYiVHvPr2TeO3ePqvtKl+25DHOLvnDnlII=; b=KRjs4D8nwjMftmEEKFMhyD64tn ZQEMGJTI+9XH8oa1HBBgVsXggXvp8rjLcHHUtfOCBNNroOVQOznnoF6JhsaMjyF2OFYNvI0BZYapy w6jp3sklRlYYPdFbaK65DQEgAlQtfVkPjgdtgywKHF2MFkvSsU+EdsOWtRI4hoQ4vhchO9/WWoyhT vFUInCpthnT57dRSFwgZ9UwSu/SDuEuZphu+kSgj7DohIBWYCLo9aFgP8F6lnHXX9DUSCBF/gX9yg A93IXqkjOIsdvvLHUxJQiVQckG8LNTv7VU/uX4onUYYMtpCFXa4zGgrq9HDW5r/NcCswreEizMW6J qpI6Y+fg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1etsSA-00065I-9i; Thu, 08 Mar 2018 10:07:14 +0000 Received: from mail-pg0-f65.google.com ([74.125.83.65]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1etsBH-0000ju-Bf; Thu, 08 Mar 2018 09:50:42 +0000 Received: by mail-pg0-f65.google.com with SMTP id e9so2020730pgs.10; Thu, 08 Mar 2018 01:49:36 -0800 (PST) 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; bh=y5TqD8SYoGSoam1GDoBCCNezNcXPz6Md7dQFrgLqxIA=; b=Uuu6XLvPDdyswLXdcmy/cJk2kByiUwkjd/UznCtNw0Bwt1ZHHwH90WOxyMnt+j+nV3 l+GT2n22lf7BWQkYo4jAEDw3io+dGHfbLPZprkaX2R0s/4sXEU4Hab/ewCVPc5n9rtAC upW+W7j6OIUGO4r80ACSvhHH6msVjcaulj2N8nl+1ojju4439LIZ2rAgNF2CKDFjUdIW rihsolPHd9BbC64v7sXcgUl2fHCCyDi/2qkEGTzORRp6y36TMGdgGFDoFDKE/qC4zUZk T/PJRd+UFuqd+cPn9xVCLDCyItLNbomhzwsHSYKdtIKHhPFMS/4hJX95mX7/HYWnz6sW 0e/g== X-Gm-Message-State: APf1xPDU5Ehvy32EaJEXfA8rH/y/nzAKWOtorlPWZZ5vSVO18I31PVFX RieLnOgQzmbwV59YN7rUDlwv1A== X-Google-Smtp-Source: AG47ELvLovqRoSXYEyR92bJrBEAhNzWne9NKczI67vsDhra+/RJN6FQ7TfL1mFgtTbZ+bKID316FdA== X-Received: by 10.101.97.67 with SMTP id o3mr21255558pgv.251.1520502575866; Thu, 08 Mar 2018 01:49:35 -0800 (PST) Received: from localhost.localdomain ([103.29.142.67]) by smtp.gmail.com with ESMTPSA id k66sm40411663pfb.123.2018.03.08.01.49.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 08 Mar 2018 01:49:35 -0800 (PST) From: Jacob Chen To: linux-rockchip@lists.infradead.org Subject: [PATCH v6 11/17] dt-bindings: Document the Rockchip MIPI RX D-PHY bindings Date: Thu, 8 Mar 2018 17:48:01 +0800 Message-Id: <20180308094807.9443-12-jacob-chen@iotwrt.com> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180308094807.9443-1-jacob-chen@iotwrt.com> References: <20180308094807.9443-1-jacob-chen@iotwrt.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180308_014948_204855_BFE51E5B X-CRM114-Status: GOOD ( 15.50 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, eddie.cai.linux@gmail.com, heiko@sntech.de, Jacob Chen , jeffy.chen@rock-chips.com, zyc@rock-chips.com, linux-kernel@vger.kernel.org, tfiga@chromium.org, hans.verkuil@cisco.com, laurent.pinchart@ideasonboard.com, sakari.ailus@linux.intel.com, mchehab@kernel.org, zhengsq@rock-chips.com, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org MIME-Version: 1.0 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Jacob Chen Add DT bindings documentation for Rockchip MIPI D-PHY RX Signed-off-by: Jacob Chen Reviewed-by: Rob Herring --- .../bindings/media/rockchip-mipi-dphy.txt | 90 ++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/rockchip-mipi-dphy.txt diff --git a/Documentation/devicetree/bindings/media/rockchip-mipi-dphy.txt b/Documentation/devicetree/bindings/media/rockchip-mipi-dphy.txt new file mode 100644 index 000000000000..d83700faf4c4 --- /dev/null +++ b/Documentation/devicetree/bindings/media/rockchip-mipi-dphy.txt @@ -0,0 +1,90 @@ +Rockchip SoC MIPI RX D-PHY +------------------------------------------------------------- + +Required properties: +- compatible: value should be one of the following + "rockchip,rk3288-mipi-dphy" + "rockchip,rk3399-mipi-dphy" +- clocks : list of clock specifiers, corresponding to entries in + clock-names property; +- clock-names: required clock name. + +MIPI RX D-PHY use registers in "general register files", it +should be a child of the GRF. +MIPI TXRX D-PHY have its own registers, it must have a reg property. + +Optional properties: +- reg: offset and length of the register set for the device. +- rockchip,grf: MIPI TX1RX1 D-PHY not only has its own register but also + the GRF, so it is only necessary for MIPI TX1RX1 D-PHY. + +port node +------------------- + +The device node should contain two 'port' child nodes, according to the bindings +defined in Documentation/devicetree/bindings/media/video-interfaces.txt. + +The first port show the sensors connected in this mipi-dphy. +- endpoint: + - remote-endpoint: Linked to a sensor with a MIPI CSI-2 video bus. + - data-lanes : (required) an array specifying active physical MIPI-CSI2 + data input lanes and their mapping to logical lanes; the + D-PHY can't reroute lanes, so the array's content should + be consecutive and only its length is meaningful. + +The port node must contain at least one endpoint. It could have multiple endpoints +linked to different sensors, but please note that they are not supposed to be +activated at the same time. + +The second port should be connected to isp node. +- endpoint: + - remote-endpoint: Linked to Rockchip ISP1, which is defined + in rockchip-isp1.txt. + +Device node example +------------------- + +grf: syscon@ff770000 { + compatible = "rockchip,rk3288-grf", "syscon", "simple-mfd"; + +... + + mipi_dphy_rx0: mipi-dphy-rx0 { + compatible = "rockchip,rk3399-mipi-dphy"; + clocks = <&cru SCLK_MIPIDPHY_REF>, + <&cru SCLK_DPHY_RX0_CFG>, + <&cru PCLK_VIO_GRF>; + clock-names = "dphy-ref", "dphy-cfg", "grf"; + power-domains = <&power RK3399_PD_VIO>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + #address-cells = <1>; + #size-cells = <0>; + + mipi_in_wcam: endpoint@0 { + reg = <0>; + remote-endpoint = <&wcam_out>; + data-lanes = <1 2>; + }; + mipi_in_ucam: endpoint@1 { + reg = <1>; + remote-endpoint = <&ucam_out>; + data-lanes = <1>; + }; + }; + + port@1 { + reg = <1>; + + dphy_rx0_out: endpoint { + remote-endpoint = <&isp0_mipi_in>; + }; + }; + }; + }; +};