From patchwork Fri May 18 00:59:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Ford X-Patchwork-Id: 10407969 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 CC0876031B for ; Fri, 18 May 2018 01:00:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B1958287ED for ; Fri, 18 May 2018 01:00:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A421B287EA; Fri, 18 May 2018 01:00:04 +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=-2.9 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM, MAILING_LIST_MULTI autolearn=ham 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 30C84287EA for ; Fri, 18 May 2018 01:00:03 +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: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:In-Reply-To: References:List-Owner; bh=R65kELlIe9RjdIGziWeStL2l7Rph/SRRIw3l0gEVqIM=; b=h/F rPCJdRkq9bvWxcv/qe1Dl0Ar2aM2yXMOosmzMage8r4xpt3opPl4E76OTdW3fAQ6dKsDJ6+DBbihh lXhRqBNm3oGgyIp9G5F7ZV1c+R4HCyoPJw8kKYlY2KVVDIkTNrfD+ibHqPmZZlqe9+PPFXdxPq+tm tStlitwSBABq5EaOLzNmq8YDvLa67wv4rcrFE0zaCt2PJl2FgyBCBXDLXP+EEtddtIvaC2bkHweHU D07/7j2v9DdLaiXHflhBJmgCeeQDY2rGhuLwBBuNPj2ZPnfyf0Xa8U6BGCaGUJ+/MAopZW3ACBp4z 14mbxEfoS8Z9DQnXb9HAsyTHxVvzpEA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fJTkV-0001Uf-4B; Fri, 18 May 2018 00:59:59 +0000 Received: from mail-it0-x241.google.com ([2607:f8b0:4001:c0b::241]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fJTkS-0001Tl-Ab for linux-arm-kernel@lists.infradead.org; Fri, 18 May 2018 00:59:57 +0000 Received: by mail-it0-x241.google.com with SMTP id n64-v6so11179771itb.3 for ; Thu, 17 May 2018 17:59:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=GiCzfiv4ifHfcPhUwznNFi9/spUeUNXwo7RrpOlO3Do=; b=lr2Q57tCzqyC9Yu8pNfTH+zfl9YQbQexzpcySdGoNgp5xo9xpfPiZdrwdmpvRBt1ru NC2R4+8wMe1GD59rTtfnmjWU7lxKxI1lbV5DlwPzC8EaQw7HuoxKUki82wgDc7OhElHH 3T+S0EomTSyRa1SHIUAxpyw5/E0YHCAiBuvSppk7jOP1rgMVG86bczSvBYkvaXfmHXbI /jiEB5YEVBzk/efUrleanlp+o4etaTVwqIAJPoG5tm9AjhFnhjqAZbTln+9zPY0CqX3x NUawm3Ze4ZxuaFF9JHf0Nho/elbnC4AbI7cj6hYO0ZUP+xUqNC2wAgr4WN+2hFkBKYxc rL4A== 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; bh=GiCzfiv4ifHfcPhUwznNFi9/spUeUNXwo7RrpOlO3Do=; b=NPQrcFCGoSHYcMFUUE0033OoIL6FN2Jp2iR694IunJrT8JKHgc7S3wIsCIkuiCmjMU JCMSKd/s/W99zB0PMmwc2hltKAOY5iDQHqYrSBRIJgrczeDIKN2gwmKsyDnC6hP/+n3U ZRhSI4oOd6ICH2p5FQSZhBpxgwm8wfRUjbWdyDe/oKbM67qF+WNUt4VOZ7l5hz8hrpl5 zvD/ugdEcsD0xc0SjOf+iiTjNH3GzfcsVzstJFoj+2tgstwo5oGu8CYAGcrhcYYftgc+ r229TEMXxLLQ2fY9/BpuJZeDx8kguL/LRHH8IjntyMVKgJLSLPdwuo+OqGNYMxMtASUw d7ng== X-Gm-Message-State: ALKqPwdatOHdY6IL8jic4fwAgCKHHgOxD2R2UGdxiAXXgpjSkPh4HwVN CK6nvD5pWLDFddpS5DtXxJ1I1A== X-Google-Smtp-Source: AB8JxZqCD3q+2ZVfC940dGtPFdmJa+v6GxOH1XZ85Qe24thoCHFyHkcnKsn7Ui/kc8HM4d55xvuVUg== X-Received: by 2002:a24:a648:: with SMTP id r8-v6mr4972092iti.147.1526605183443; Thu, 17 May 2018 17:59:43 -0700 (PDT) Received: from localhost.localdomain (c-73-65-120-235.hsd1.mn.comcast.net. [73.65.120.235]) by smtp.gmail.com with ESMTPSA id e15-v6sm3560489ioc.54.2018.05.17.17.59.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 17 May 2018 17:59:42 -0700 (PDT) From: Adam Ford To: linux-arm-kernel@lists.infradead.org Subject: [PATCH V5] ARM: dts: da850-evm: Enable LCD and Backlight Date: Thu, 17 May 2018 19:59:35 -0500 Message-Id: <20180518005935.29104-1-aford173@gmail.com> X-Mailer: git-send-email 2.17.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180517_175956_365255_4D3DAD72 X-CRM114-Status: GOOD ( 20.32 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Adam Ford , devicetree@vger.kernel.org, nsekhar@ti.com, adam.ford@logicpd.com MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP When using the board files the LCD works, but not with the DT. This adds enables the original da850-evm to work with the same LCD in device tree mode. The EVM has a gpio for the regulator and a PWM for dimming the backlight. The LCD and the vpif display pins are mutually exclusive, so if using the LCD, do not load the vpif driver. Signed-off-by: Adam Ford --- V5: Resync against v4.18/dt V4: Move the backlight to PWM, so the driver can control the regulator allowing the regulator to power down and enabling the ability to change the brightness of the backlight V3: Fix errant GPIO, label GPIO pins, and rename the regulator to be more explict to backlight which better matches the schematic. Updated the description to explain that it cannot be used at the same time as the vpif driver. V2: Add regulator and GPIO enable pins. Remove PWM backlight and replace with GPIO diff --git a/arch/arm/boot/dts/da850-evm.dts b/arch/arm/boot/dts/da850-evm.dts index 0e82bb988fde..5bf6ea513b12 100644 --- a/arch/arm/boot/dts/da850-evm.dts +++ b/arch/arm/boot/dts/da850-evm.dts @@ -27,6 +27,58 @@ spi0 = &spi1; }; + backlight:backlight-pwm { + pinctrl-names = "default"; + pinctrl-0 = <&ecap2_pins>; + power-supply = <&backlight_reg>; + compatible = "pwm-backlight"; + pwms = <&ecap2 0 50000 0>; + brightness-levels = <0 10 20 30 40 50 60 70 80 90 99>; + default-brightness-level = <7>; + }; + + panel { + compatible = "ti,tilcdc,panel"; + pinctrl-names = "default"; + pinctrl-0 = <&lcd_pins>; + /* The vpif and the LCD are mutually exclusive. + * To enable VPIF, change the status below to 'disabled' then + * then change the status of the vpif below to 'okay' */ + status = "okay"; + enable-gpios = <&gpio 40 GPIO_ACTIVE_HIGH>; /* lcd_panel_pwr */ + + panel-info { + ac-bias = <255>; + ac-bias-intrpt = <0>; + dma-burst-sz = <16>; + bpp = <16>; + fdd = <0x80>; + sync-edge = <0>; + sync-ctrl = <1>; + raster-order = <0>; + fifo-th = <0>; + }; + + display-timings { + native-mode = <&timing0>; + timing0: 480x272 { + clock-frequency = <9000000>; + hactive = <480>; + vactive = <272>; + hfront-porch = <3>; + hback-porch = <2>; + hsync-len = <42>; + vback-porch = <3>; + vfront-porch = <4>; + vsync-len = <11>; + hsync-active = <0>; + vsync-active = <0>; + de-active = <1>; + pixelclk-active = <1>; + }; + }; + }; + vbat: fixedregulator0 { compatible = "regulator-fixed"; regulator-name = "vbat"; @@ -35,6 +87,15 @@ regulator-boot-on; }; + backlight_reg: backlight-regulator { + compatible = "regulator-fixed"; + regulator-name = "lcd_backlight_pwr"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + gpio = <&gpio 47 GPIO_ACTIVE_HIGH>; /* lcd_backlight_pwr */ + enable-active-high; + }; + sound { compatible = "simple-audio-card"; simple-audio-card,name = "DA850/OMAP-L138 EVM"; @@ -63,6 +124,10 @@ }; }; +&ecap2 { + status = "okay"; +}; + &pmx_core { status = "okay"; @@ -109,6 +174,10 @@ status = "okay"; }; +&lcdc { + status = "okay"; +}; + &i2c0 { status = "okay"; clock-frequency = <100000>; @@ -336,5 +405,8 @@ &vpif { pinctrl-names = "default"; pinctrl-0 = <&vpif_capture_pins>, <&vpif_display_pins>; - status = "okay"; + /* The vpif and the LCD are mutually exclusive. + * To enable VPIF, disable the ti,tilcdc,panel then + * changed the status below to 'okay' */ + status = "disabled"; };