From patchwork Sun Aug 13 11:44:47 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 9897737 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 06807603B4 for ; Sun, 13 Aug 2017 11:45:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EDB1B286DC for ; Sun, 13 Aug 2017 11:45:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E1E73286DD; Sun, 13 Aug 2017 11:45:03 +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=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id DE384286DE for ; Sun, 13 Aug 2017 11:45:02 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5C96E6E048; Sun, 13 Aug 2017 11:45:01 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lf0-x22b.google.com (mail-lf0-x22b.google.com [IPv6:2a00:1450:4010:c07::22b]) by gabe.freedesktop.org (Postfix) with ESMTPS id 221546E048 for ; Sun, 13 Aug 2017 11:44:59 +0000 (UTC) Received: by mail-lf0-x22b.google.com with SMTP id d17so30567245lfe.0 for ; Sun, 13 Aug 2017 04:44:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=43jRHixsiHxu4a+Nc4+94SFbrzkYu1qDx4VgKXaAcks=; b=c4f+of8bYbyDIrQ/zztheRMc/X2f4jzs2NE0QwVzhLbB1NHs7w+XZ8BIV8xlaNS94T 81clnudm2Ab8alOLZt7N+QXeIMb87vOEV1CKgLm9qgJWgttgvfbINAinkTp1+mUtcHrc HQBMN2CKAnagzGPouy+iqL/4TOlqS7qUtEJck= 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=43jRHixsiHxu4a+Nc4+94SFbrzkYu1qDx4VgKXaAcks=; b=kCj1zqocJ80jhMZ++sMyLvYnlGJE3aCe8IVUHanaQfAp+Z8J31atZJ57Bq5Nq1w5o/ WVVY/jHZ4ZP6nHy4iS32xagVBVH0SNCFOakC5eBVSO+oWsqrXn2hL1PBd1G25bmmRT0B mJgcgP3CrvJGWzJhSkl0Ag5qmBiXlmrdJDijbffVALcRpamTVcn+IA4c867GNWYgyOwu OJzN+dkBMK3IFFwmqIKGLRWsCJRnG8kt2sTRFK5KENyDXAvbKdju16GwqWFeWQL0TeUl 1tN5l8PC9HKOnDC47SsFS0D/Gt4WQyaqT9IaCPTkcVIEvsLM9YisnoH64OUNOUhmnEHu AExA== X-Gm-Message-State: AHYfb5jUbLHEX8rl0osblYvEH5hLKFjpH8jJcVCG+3cNOO7P+QZtSWS5 F2I6MHf24PjkPHga X-Received: by 10.46.78.1 with SMTP id c1mr6957136ljb.189.1502624698329; Sun, 13 Aug 2017 04:44:58 -0700 (PDT) Received: from fabina.bredbandsbolaget.se (c-277e71d5.014-348-6c756e10.cust.bredbandsbolaget.se. [213.113.126.39]) by smtp.gmail.com with ESMTPSA id 1sm749759lju.63.2017.08.13.04.44.56 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 13 Aug 2017 04:44:57 -0700 (PDT) From: Linus Walleij To: Thierry Reding , dri-devel@lists.freedesktop.org Subject: [PATCH 2/3] drm/panel: Add DT bindings for Ilitek ILI9322 Date: Sun, 13 Aug 2017 13:44:47 +0200 Message-Id: <20170813114448.20179-2-linus.walleij@linaro.org> X-Mailer: git-send-email 2.13.4 In-Reply-To: <20170813114448.20179-1-linus.walleij@linaro.org> References: <20170813114448.20179-1-linus.walleij@linaro.org> Cc: devicetree@vger.kernel.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP This adds device tree bindings for the Ilitek ILI9322 320x240 TFT panel driver. Cc: devicetree@vger.kernel.org Signed-off-by: Linus Walleij --- .../bindings/display/panel/ilitek,ili9322.txt | 120 +++++++++++++++++++++ 1 file changed, 120 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/panel/ilitek,ili9322.txt diff --git a/Documentation/devicetree/bindings/display/panel/ilitek,ili9322.txt b/Documentation/devicetree/bindings/display/panel/ilitek,ili9322.txt new file mode 100644 index 000000000000..d619b1ad14a6 --- /dev/null +++ b/Documentation/devicetree/bindings/display/panel/ilitek,ili9322.txt @@ -0,0 +1,120 @@ +Ilitek ILI9322 TFT panel driver with SPI control bus + +This is a driver for 320x240 TFT panels, accepting a variety of input +streams that get adapted and scaled to the panel. The panel output has +960 TFT source driver pins and 240 TFT gate driver pins, VCOM, VCOML and +VCOMH outputs. + +Required properties: + - compatible: "ilitek,ili9322" + - reg: address of the panel on the SPI bus + +Optional properties: + - width-mm: physical panel width [mm] + - height-mm: physical panel height [mm] + - vcc-supply: core voltage supply, see regulator/regulator.txt + - iovcc-supply: voltage supply for the interface input/output signals, + see regulator/regulator.txt + - vci-supply: voltage supply for analog parts, see regulator/regulator.txt + - reset-gpios: a GPIO spec for the reset pin, see gpio/gpio.txt + - ilitek,vreg1out-microvolt: the output in microvolts for the VREGOUT1 + regulator used to drive the physical display. Valid ranges are 3600 thru + 6000 in 100 microvolt increments. If not specified, hardware defaults will + be used (4.5V). + - ilitek,vcom-amplitude-percent: the percentage of VREGOUT1 used for the + peak-to-peak amplitude of the communcation signals to the physical display. + Valid ranges are 70 thru 132 percent in increments if two percent. Odd + percentages will be truncated. If not specified, hardware defaults will be + used (114%). + - ilitek,vcom-high-percent: the percentage of VREGOUT1 used for the peak + voltage on the communications link. Valid ranges are 37 thru 100 percent. + If not specified, hardware defaults will be used (91%). + - ilitek,gamma-correction-neg: a set of 8 nybbles describing negative + gamma correction for voltages V1 thru V8. Valid range 0..15 + - ilitek,gamma-correction-pos: a set of 8 nybbles describing positive + gamma correction for voltages V1 thru V8. Valid range 0..15 + These adjust what grayscale voltage will be output for input data V1 = 0, + V2 = 16, V3 = 48, V4 = 96, V5 = 160, V6 = 208, V7 = 240 and V8 = 255. + The curve is shaped like this: + + ^ + | V8 + | V7 + | V6 + | V5 + | V4 + | V3 + | V2 + | V1 + +-----------------------------------------------------------> + 0 16 48 96 160 208 240 255 + + The negative and postive gamma values adjust the V1 thru V8 up/down + according to the datasheet specifications. This is a property of the + physical display connected to the display controller and may vary. + If defined, both arrays must be supplied in full. If the properties + are not supplied, hardware defaults will be used. + + - ilitek,entry-mode: the panel can be connected to various input streams + and four of them can be selected by electronic straps on the display. + However it is possible to select another mode or override the + electronic default with this property. Valid values: + 0: 8 bit serial RGB through + 1: 8 bit serial RGB aligned + 2: 8 bit serial RGB dummy 320x240 + 3: 8 bit serial RGB dummy 360x240 + 4: disabled + 5: 24 bit parallel RGB through + 6: 24 bit parallel RGB aligned + 7: 24 bit YUV 640Y 320CbCr + 8: 24 bit YUV 720Y 360CbCr + 9: disabled + 10: 8 bit ITU-R BT.656 720Y 360CbCr + 11: 8 bit ITU-R BT.656 640Y 320CbCr + + The following optional properties only apply to RGB and YUV input modes and + can be omitted for BT.656 input modes: + + - flip-horizontal: flip the image horizontally (right-to-left scan) + - flip-vertical: flip the image vertically (down-to-up scan) + - pixelclk-active: see display/panel/display-timing.txt + - de-active: see display/panel/display-timing.txt + - hsync-active: see display/panel/display-timing.txt + - vsync-active: see display/panel/display-timing.txt + +The panel must obey the rules for a SPI slave device as specified in +spi/spi-bus.txt + +The device node can contain one 'port' child node with one child +'endpoint' node, according to the bindings defined in +media/video-interfaces.txt. This node should describe panel's video bus. + +Example: + +panel: display@0 { + compatible = "ilitek,ili9322"; + reg = <0>; + /* 50 ns min period = 20 MHz */ + spi-max-frequency = <20000000>; + spi-cpol; /* Clock active low */ + /* Panel LM918A01-1A SY-B4-091116-E0199 */ + width-mm = <65>; + height-mm = <50>; + ilitek,entry-mode = <11>; + ilitek,vreg1out-microvolt = <4600>; + ilitek,vcom-high-percent = <91>; + ilitek,vcom-amplitude-percent = <114>; + ilitek,gamma-correction-neg = <0xa>, <0x5>, <0x7>, + <0x7>, <0x7>, <0x5>, <0x1>, <0x6>; + ilitek,gamma-correction-pos = <0x7>, <0x7>, <0x3>, + <0x2>, <0x3>, <0x5>, <0x7>, <0x2>; + vcc-supply = <&vdisp>; + iovcc-supply = <&vdisp>; + vci-supply = <&vdisp>; + + port { + panel_in: endpoint { + remote-endpoint = <&display_out>; + }; + }; +};