Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp852992ybi; Fri, 12 Jul 2019 05:44:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqwLvsmKUjvtVDppUnYZF8a/ZPjP1jWVHwvt53UrrNf2ZN1ZZeEcV3ZSboLBEOJ5yQx00M8t X-Received: by 2002:a17:90a:384d:: with SMTP id l13mr11765365pjf.86.1562935452134; Fri, 12 Jul 2019 05:44:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562935452; cv=none; d=google.com; s=arc-20160816; b=xZOHoBCmr+PPE3bJ3Mxr5HW4G9ao38dUWNhbbFaOKFROvxS2l3XchtmHe2ib9ujXto BOxFg/fFZkPJ09cc/5pE0VhmsvZc+WiSmCU+29hOQxX7Uwe7mA9CeG1vVWPbssVJivTl 0dtoCTUtAO0Qdv4kSQXbz5a0sxQ6BotA4nXX61lciZQzQeCBFqd/7Z05jv0yqKJAbeLH qFIT2CIHZOFZCRswN46iawfln1yook/9Bck7tXgwZFTErmxpVralflm2H4PjzPZEmxnV S4fCqxe2W10hxzt5k5OcKSZSiTE43i2lpOzoAnnbGhYp/MKcYXHMsGh57v/pWxPCNi7y 7Qjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=M5lF1bOTcFHmjbthn+Fyc0mmYIPRGE0y+4yCjVIJd8M=; b=vAZ/HFlBmCceE4EiUfFwyIUBGqR3Mb2LzW01gcuFzDNaSKFP/dK5+XEEEPfA1Qq2pk Xw81od25NelwnxGvzJeQ5pnCn0sdpoFzU8hkWbK4xIcLf3b53yRqtSQVt4PdXEZ6ZlMA e5iYs8/ljyVGlLwr0CZOqwSj9STR8k2lA09Nc+VYj7yaJSwLHeRYmfk8R2AMM0AxOCje 27jHIwBSf6G35a0ZNRWWy/D3nXTcE2oznVf0J4CXKJbguZtzjhTnEMCEFLONNAAv0p0o M/9d7IOENbVufoTX96dq4Xsy1sen4RbHQL0OT0tIeyTwgO0dQYlBaZEMejOKVCxs36pE KA/w== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=codethink.co.uk Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f8si8061105pgd.496.2019.07.12.05.43.56; Fri, 12 Jul 2019 05:44:12 -0700 (PDT) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=codethink.co.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727691AbfGLMnR (ORCPT + 99 others); Fri, 12 Jul 2019 08:43:17 -0400 Received: from imap1.codethink.co.uk ([176.9.8.82]:49151 "EHLO imap1.codethink.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727553AbfGLMnQ (ORCPT ); Fri, 12 Jul 2019 08:43:16 -0400 Received: from [167.98.27.226] (helo=[10.35.6.255]) by imap1.codethink.co.uk with esmtpsa (Exim 4.84_2 #1 (Debian)) id 1hlutK-0005qb-Ha; Fri, 12 Jul 2019 13:43:10 +0100 Subject: Re: [PATCH v1 03/11] dt-bindings: display/bridge: Add config property for ti948 To: Laurent Pinchart Cc: Andrzej Hajda , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, David Airlie , Daniel Vetter , Rob Herring , Mark Rutland , linux-kernel@lists.codethink.co.uk, Patrick Glaser , Nate Case References: <20190611140412.32151-1-michael.drake@codethink.co.uk> <20190611140412.32151-4-michael.drake@codethink.co.uk> <20190611180710.GT5016@pendragon.ideasonboard.com> From: Michael Drake Message-ID: <80e585a3-222a-5b98-7835-85b721a3beb1@codethink.co.uk> Date: Fri, 12 Jul 2019 13:43:09 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: <20190611180710.GT5016@pendragon.ideasonboard.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Laurent, On 11/06/2019 19:07, Laurent Pinchart wrote: > Hi Michael, > > Thank you for the patch. My pleasure, and thank you for the feedback! > On Tue, Jun 11, 2019 at 03:04:04PM +0100, Michael Drake wrote: >> The config property can be used to provide an array of >> register addresses and values to be written to configure >> the device for the board. > > Please don't. DT describes the hardware (or more accurately the system), > it's not meant to store arbitrary configuration data. All the registers > specified below should instead be set by the driver based on a > combination of hardware description and information obtained at runtime. OK, understood. I'll work on this. For some of them explicit firmware properties would be appropriate. I'll go through it to ascertain what can be determined at runtime. >> Signed-off-by: Michael Drake >> Cc: Patrick Glaser >> Cc: Nate Case >> --- >> .../bindings/display/bridge/ti,ds90ub948.txt | 21 +++++++++++++++++++ >> 1 file changed, 21 insertions(+) >> >> diff --git a/Documentation/devicetree/bindings/display/bridge/ti,ds90ub948.txt b/Documentation/devicetree/bindings/display/bridge/ti,ds90ub948.txt >> index f9e86cb22900..1e7033b0f3b7 100644 >> --- a/Documentation/devicetree/bindings/display/bridge/ti,ds90ub948.txt >> +++ b/Documentation/devicetree/bindings/display/bridge/ti,ds90ub948.txt >> @@ -12,6 +12,8 @@ Required properties: >> Optional properties: >> >> - regulators: List of regulator name strings to enable for operation of device. >> +- config: List of , pairs to be set to configure >> + device on powerup. The register addresses and values are 8bit. >> >> Example >> ------- >> @@ -21,4 +23,23 @@ ti948: ds90ub948@0 { >> >> regulators: "vcc", >> "vcc_disp"; >> + config: >> + /* set error count to max */ >> + <0x41>, <0x1f>, >> + /* sets output mode, no change noticed */ >> + <0x49>, <0xe0>, >> + /* speed up I2C, 0xE is around 480KHz */ >> + <0x26>, <0x0e>, >> + /* speed up I2C, 0xE is around 480KHz */ >> + <0x27>, <0x0e>, >> + /* sets GPIO0 as an input */ >> + <0x1D>, <0x13>, >> + /* set GPIO2 high, backlight PWM (set to 0x50 for normal use) */ >> + <0x1E>, <0x50>, >> + /* sets GPIO3 as an output with remote control for touch XRES */ >> + <0x1F>, <0x05>, >> + /* set GPIO5 high, backlight enable on new display */ >> + <0x20>, <0x09>, >> + /* set GPIO7 and GPIO8 high to enable touch power and prox sense */ >> + <0x21>, <0x91>; >> }; > -- Michael Drake https://www.codethink.co.uk/