From patchwork Wed Sep 13 15:07:47 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Stevenson X-Patchwork-Id: 813482 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=raspberrypi.org header.i=@raspberrypi.org header.b="LR0/D1ue"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=raspberrypi-org.20150623.gappssmtp.com header.i=@raspberrypi-org.20150623.gappssmtp.com header.b="VsvT2bEn"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3xslZh5BWGz9sPk for ; Thu, 14 Sep 2017 01:14:52 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752458AbdIMPOs (ORCPT ); Wed, 13 Sep 2017 11:14:48 -0400 Received: from mx07-00252a01.pphosted.com ([62.209.51.214]:37818 "EHLO mx07-00252a01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751882AbdIMPOk (ORCPT ); Wed, 13 Sep 2017 11:14:40 -0400 X-Greylist: delayed 358 seconds by postgrey-1.27 at vger.kernel.org; Wed, 13 Sep 2017 11:14:40 EDT Received: from pps.filterd (m0102628.ppops.net [127.0.0.1]) by mx07-00252a01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id v8DF58Bs023539 for ; Wed, 13 Sep 2017 16:08:47 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.org; h=from : to : cc : subject : date : message-id : in-reply-to : references : in-reply-to : references; s=pp; bh=0HyA+WlZPUApiYBcDcQLyg1zWD4AcwR+lrIGJFr0EJQ=; b=LR0/D1ueARS9Ype/wIMY1mb2zvkuawnGblkKrSRtF5vXO9aAI/OF4ZUNvBokyWvJ+xhG QG54Bm07V+umKACe2jrUL9ZcaqufT/g5wDaKXYCPGpg8PeaeaG2OirNk91Hjg2cmt/wz JWXbbhmorU6FaSTGlbDKU54hrrA/sk3KZ14fEt0il4McezFNPR8+zXdQUorce0fBU4mH smpsHGoaAaN7+0HeYpB8VeJanQax4PgqYo0TydLo7ojXAUG9kd72EyBQOwiANMZylcRl qF5PHqf0csfcQULb233AfpaYBaaPAoUcB+DtbUQJUMJhr6ZB855Q9pPk7tIQAdLsyymG OQ== Received: from mail-wm0-f71.google.com (mail-wm0-f71.google.com [74.125.82.71]) by mx07-00252a01.pphosted.com with ESMTP id 2cv5pysxkv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=OK) for ; Wed, 13 Sep 2017 16:08:47 +0100 Received: by mail-wm0-f71.google.com with SMTP id m127so1058333wmm.3 for ; Wed, 13 Sep 2017 08:08:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=0HyA+WlZPUApiYBcDcQLyg1zWD4AcwR+lrIGJFr0EJQ=; b=VsvT2bEna7PnzMHyvXF/53KBLDwEOqXHohm4NmufhMjI+NAqIilxmH425lvyPkr7Ju croz/6OvegtN5/GAwKxilREcso6Cr13Rutt6GSB1oam37Ug1Dk6MRuehBF0re+j/zs8h WYCntRIwnw+FIhFprUrh6fPPyEm/B57ctWEDnEELBIQRd3/uhBseCLuHxY1vZ0IQZowY QuiRJSlcUrDRJof7X7AgXgD569KD34PcRNaMG0xMaZda3r4TdEjxuW+gExc5pQb9R/N5 gJnjhkqxkVywkptfGtWiLIWD8aXCxsJ5VqjOZkv/NgC/w9gI0fWSYkHHcONd1KdUlj5V lxSw== 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:in-reply-to:references; bh=0HyA+WlZPUApiYBcDcQLyg1zWD4AcwR+lrIGJFr0EJQ=; b=d3iVc+clUFUYypmVH+v9kNA7M0vJ+CZ06wk4Q1Jqi5tOvw23BCXEfKwGWIXZiYqmlx OHAFdzEjwqgDtrerVdSrDP5o26SiUMdDiupbStZ3TqjYWBV9kIlIxWOMHktfKRUhzzRh 6NKKvjJSi48/g/f0OSodiF5t7jNLERnhNX3rwXDrsPNRBvbRZ8nDGgUo7zO2l3HnobRm 3iJ/A1mK7FlNi86IurdmLKA59oKi/rTw1fJG5/VA4hLZszFXmY6DmsSl9i+9hohZqJqR Mkn/KCvCgD1P/Xu7E98meauU0BBAjZki7zY0lvUXJm7L3bJuYyP9zvyoPpz/QQYxhZOh kH+w== X-Gm-Message-State: AHPjjUgMO040byx7vcqIL2y0PSvPwyNc5yf1WhdLoCftZr6DvsEBaIbI 8ktiMWPkDael4qOm1HR+HywthNv4U0AO8bMrTur0EgP9ZvxJee5EqOJyqZAv4BVdg0AqPQs9ozu KNLR4Ve6Ya8mI X-Received: by 10.223.130.166 with SMTP id 35mr16196856wrc.249.1505315326899; Wed, 13 Sep 2017 08:08:46 -0700 (PDT) X-Google-Smtp-Source: ADKCNb6rBuE5UzyaMRX6Sy00Qj6hR/6Wh0w+6jPU16vS3/Ckm/QmDDBNk973Mm0nap9VFH2nTE7kyA== X-Received: by 10.223.130.166 with SMTP id 35mr16196831wrc.249.1505315326632; Wed, 13 Sep 2017 08:08:46 -0700 (PDT) Received: from dave-VirtualBox.pitowers.org ([217.33.127.173]) by smtp.googlemail.com with ESMTPSA id n71sm1127985wmg.20.2017.09.13.08.08.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 13 Sep 2017 08:08:45 -0700 (PDT) From: Dave Stevenson To: Mauro Carvalho Chehab , Rob Herring , Hans Verkuil , Eric Anholt , Stefan Wahren , Sakari Ailus , linux-media@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, devicetree@vger.kernel.org Cc: Dave Stevenson Subject: [PATCH v2 2/4] [media] dt-bindings: Document BCM283x CSI2/CCP2 receiver Date: Wed, 13 Sep 2017 16:07:47 +0100 Message-Id: <9ad8b23d5c394b64ed02f9a5ebc49209696a5ace.1505314390.git.dave.stevenson@raspberrypi.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: References: In-Reply-To: References: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-09-13_04:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_spam_notspam policy=outbound_spam score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000 definitions=main-1709130236 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Document the DT bindings for the CSI2/CCP2 receiver peripheral (known as Unicam) on BCM283x SoCs. Signed-off-by: Dave Stevenson --- .../devicetree/bindings/media/bcm2835-unicam.txt | 107 +++++++++++++++++++++ 1 file changed, 107 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/bcm2835-unicam.txt diff --git a/Documentation/devicetree/bindings/media/bcm2835-unicam.txt b/Documentation/devicetree/bindings/media/bcm2835-unicam.txt new file mode 100644 index 0000000..2ee5af7 --- /dev/null +++ b/Documentation/devicetree/bindings/media/bcm2835-unicam.txt @@ -0,0 +1,107 @@ +Broadcom BCM283x Camera Interface (Unicam) +------------------------------------------ + +The Unicam block on BCM283x SoCs is the receiver for either +CSI-2 or CCP2 data from image sensors or similar devices. + +There are two camera drivers in the kernel for BCM283x - this one +and bcm2835-camera (currently in staging). + +This driver is purely the kernel controlling the Unicam peripheral - there +is no involvement with the VideoCore firmware. Unicam receives CSI-2 +(or CCP2) data and writes it into SDRAM. There is no additional processing +performed. +It should be possible to connect it to any sensor with a +suitable output interface and V4L2 subdevice driver. + +bcm2835-camera uses the VideoCore firmware to control the sensor, +Unicam, ISP, and various tuner control loops. Fully processed frames are +delivered to the driver by the firmware. It only has sensor drivers +for Omnivision OV5647, and Sony IMX219 sensors, and is closed source. + +The two drivers are mutually exclusive for the same Unicam instance. +The firmware checks the device tree configuration during boot. If +it finds device tree nodes called csi0 or csi1 then it will block the +firmware from accessing the peripheral, and bcm2835-camera will +not be able to stream data. +It should be possible to use bcm2835-camera on one camera interface +and bcm2835-unicam on the other interface if there is a need to. + +Required properties: +=================== +- compatible : must be "brcm,bcm2835-unicam". +- reg : physical base address and length of the register sets for the + device. +- interrupts : should contain the IRQ line for this Unicam instance. +- clocks : list of clock specifiers, corresponding to entries in + clock-names property. +- clock-names : must contain an "lp_clock" entry, matching entries + in the clocks property. + +Unicam supports a single port node. It should contain one 'port' child node +with child 'endpoint' node. Please refer to the bindings defined in +Documentation/devicetree/bindings/media/video-interfaces.txt. + +Within the endpoint node, the following properties are mandatory: +- remote-endpoint : links to the source device endpoint. +- data-lanes : An array denoting how many data lanes are physically + present for this CSI-2 receiver instance. This can + be limited by either the SoC itself, or by the + breakout on the platform. + Lane reordering is not supported, so lanes must be + in order, starting at 1. + +Lane reordering is not supported on the clock lane, so the optional property +"clock-lane" will implicitly be <0>. +Similarly lane inversion is not supported, therefore "lane-polarities" will +implicitly be <0 0 0 0 0>. +Neither of these values will be checked. + +Example: + csi1: csi@7e801000 { + compatible = "brcm,bcm2835-unicam"; + reg = <0x7e801000 0x800>, + <0x7e802004 0x4>; + interrupts = <2 7>; + clocks = <&clocks BCM2835_CLOCK_CAM1>; + clock-names = "lp_clock"; + + port { + #address-cells = <1>; + #size-cells = <0>; + + csi1_ep: endpoint { + remote-endpoint = <&tc358743_0>; + data-lanes = <1 2>; + }; + }; + }; + + i2c0: i2c@7e205000 { + + tc358743: csi-hdmi-bridge@0f { + compatible = "toshiba,tc358743"; + reg = <0x0f>; + status = "okay"; + + clocks = <&tc358743_clk>; + clock-names = "refclk"; + + tc358743_clk: bridge-clk { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <27000000>; + }; + + port { + tc358743_0: endpoint { + remote-endpoint = <&csi1_ep>; + clock-lanes = <0>; + data-lanes = <1 2>; + clock-noncontinuous; + link-frequencies = + /bits/ 64 <297000000>; + }; + }; + }; + };