Received: by 10.223.185.116 with SMTP id b49csp6109788wrg; Thu, 8 Mar 2018 01:51:51 -0800 (PST) X-Google-Smtp-Source: AG47ELse5hU0TLfZCZKNt5w/ci0BBajzOyLacnxmzBfGgz95K2qTf6AA9o3dq0bNzZaGLibFOJ22 X-Received: by 10.101.77.195 with SMTP id q3mr3290468pgt.283.1520502711631; Thu, 08 Mar 2018 01:51:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520502711; cv=none; d=google.com; s=arc-20160816; b=E79KjVu331Q0eQrnZJIhNYvI0UplcqQZl4nTWQLtgA1FXqnW0pjKZIomNYloboZ9K1 ObNVo7kEPtPVko7+k3qI2a83Q1qiLYiFoZzxGfl6XtgVZNweihWL/GESCygntarqx4qY 5YapeOVc1qEFu133uPHut428j3cK5oMk+foviAotgnug1dOW4SE2dZupM5lqPQO7qQkd s95vX7arm5hcSSvnNZe/2iP2eN2Vgt7V+Nxi8iXy7I0JtBj9Qq2UHsaOUU8q3ULg1xjt o7dBOuT1goBVhrioQpj7Tl7sRaMugJAHh6RziBeLmz2vXuY9/EtgL8AGrlT3bhBtTMDx ansQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=y5TqD8SYoGSoam1GDoBCCNezNcXPz6Md7dQFrgLqxIA=; b=HQG4ezJgrBpejh4QIfWJFS6EJIgeEBNghvK8KVQn1QAHhb2m3lZ33FEVBZe/gi0dIt ObSyolRH7kPaBY3yZ2PANT5Xk/zvnm6u+AsGJlSDgc+rn+R66wp2Ok3q/4wUum+FtUbA AoA4XY4+fgW9iezgOZlCxy8UcP1sO/F7Ibgv1058OzT+bwsAMa8nbgEtY8dPevpnU2mA zCuWnT7OW01KyXvED5WH4bYZJ48Cd3idRTouSOhG6OPmqKllkyGkj5BfD2AnPMElko2x 4+0xOWGxzhrPHM3YGVGnE2tDTyRkOEuUTtaKIzcxL7KEdl9uG/WZjd9o4s62V4S2iWl7 FYAA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q22si15615425pfj.50.2018.03.08.01.51.36; Thu, 08 Mar 2018 01:51:51 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965773AbeCHJtq (ORCPT + 99 others); Thu, 8 Mar 2018 04:49:46 -0500 Received: from mail-pg0-f67.google.com ([74.125.83.67]:36463 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935744AbeCHJtg (ORCPT ); Thu, 8 Mar 2018 04:49:36 -0500 Received: by mail-pg0-f67.google.com with SMTP id i14so2034405pgv.3; 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=bl7QYdpqo+WxhJ2QI6tF/JVz1JlipL4L+XE0utG6ysBwLTl2Gmwpf468u6QC3TQbCC i8PpQMwtNMgchl4k6ZImwmeeYUGqsQaKv8u5TvkfS09l6aqwj52n6Yya51Tkm94WPqbD tDRFLb3IjjGVAAYiLtufwcrbc+X834YMJtKG4lS3oXWnYkpuNFH0FcKJYB/xxLikBYqA KyZyiPnDtKL5rHPdMhTJPFDl1NtKGpDj888HZ7swZ4DBiLeazD7FfXXaJRsue+e5nhuG 3Pc5cKRnceotOcmlTc/GT9el7tGyaF+VuDKrkx4bBSufBKLZuP6AN6vVlqQ0sYYfSepA 3Fpg== X-Gm-Message-State: APf1xPCnmdN/DTlUN+1iqsxSLIT7N6pyROMBimYrk+BdRR/th8/Wi2Ki G6Num1RXf/W8C/0T6n06Qkw= 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 Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, mchehab@kernel.org, linux-media@vger.kernel.org, sakari.ailus@linux.intel.com, hans.verkuil@cisco.com, tfiga@chromium.org, zhengsq@rock-chips.com, laurent.pinchart@ideasonboard.com, zyc@rock-chips.com, eddie.cai.linux@gmail.com, jeffy.chen@rock-chips.com, devicetree@vger.kernel.org, heiko@sntech.de, Jacob Chen 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> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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>; + }; + }; + }; + }; +}; -- 2.16.1