Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp519imd; Wed, 31 Oct 2018 13:34:35 -0700 (PDT) X-Google-Smtp-Source: AJdET5eIA+gF4dAkI0yATTPfx+SagcNPHdX30i04hHDV36IkjHL4ilI+B/tsNExdDHG/raYJTZSn X-Received: by 2002:a62:36c3:: with SMTP id d186-v6mr4757298pfa.133.1541018075693; Wed, 31 Oct 2018 13:34:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541018075; cv=none; d=google.com; s=arc-20160816; b=M7qvYeogsRMP+m+dx2JV/aju5YMXdH9A9m2NSijqEE18ylwmh9vfQqLaoomD/AiXOA HwI6LmJyPwi8ToiScmMpJZWIotgJAqhExtWNND0VMWJq3bCTgoBUXf4NORIMVrbvDdIr mER3OrFiZS0/wQzGWDk/NQnXVpjqEAey6ini6IIDvu1iyVc789hio1hR/RuWvN4hfynF wOJPW7n3eyB4a67Impo/UpIVZlxpYOFpFQ9aQTNLc8wlUS5+rxeC7imkL0k2v4k0XV9/ UX7FI1Vpw73ZhIWqy18SG8MkJ35hteOYXs4yjsBownVTdjSM0UU12fomPacFfeE4PmG4 M/bg== 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=nCU8vX7Y7yGTnMWOy+DaMWgeWZlW/HTweKoDj9NslI0=; b=HvwYpJ0geT0uurVbWBHZnfi4YjmPDa3GLORQPuAgEkpT0gXh9ge8yBUIe8HwqVCgY3 MzhkcR5wjwT+2GkrAKptkPsqsEDdVtHFYKywrSecXDK3ePtOQkyKD+K0SsOoWz8sBZ1B vHWKB1rv2R6KoHwIsc+VtmgRjoxdchTUZtODh7UiavWJkDXLdBInLJhgw/Pxb9d7+YXE WrVmHxBgroopiQ98GqftStts+VyYc8kOga+TJ7Pz6DeM6LNj74iHRkLUgB5zPkayOWNe hWDRrSOwI4qYkAn7bQ2ht9+bTYoyr2z2TGvGylZTuqkeSecJ3gtnSy/FbSDn0KKiomiz j7zg== 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 u91-v6si16624835plb.180.2018.10.31.13.34.19; Wed, 31 Oct 2018 13:34:35 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729963AbeKAFbR (ORCPT + 99 others); Thu, 1 Nov 2018 01:31:17 -0400 Received: from mleia.com ([178.79.152.223]:48336 "EHLO mail.mleia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726318AbeKAFbR (ORCPT ); Thu, 1 Nov 2018 01:31:17 -0400 Received: from mail.mleia.com (localhost [127.0.0.1]) by mail.mleia.com (Postfix) with ESMTP id A6721424849; Wed, 31 Oct 2018 20:31:37 +0000 (GMT) Subject: Re: [PATCH 3/7] dt-bindings: pinctrl: ds90ux9xx: add description of TI DS90Ux9xx pinmux To: Luca Ceresoli , Laurent Pinchart Cc: Vladimir Zapolskiy , Lee Jones , Linus Walleij , Rob Herring , Marek Vasut , Wolfram Sang , devicetree@vger.kernel.org, linux-gpio@vger.kernel.org, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org References: <20181008211205.2900-1-vz@mleia.com> <8675619.KiXOS7fxCj@avalon> <9bd129b4-ce18-b036-9376-2cb1cb76aaf2@mentor.com> <2595665.eknevzee7a@avalon> <3bfa5338-16a0-f9e2-2c82-70af12e25fb1@lucaceresoli.net> From: Vladimir Zapolskiy Message-ID: Date: Wed, 31 Oct 2018 22:31:36 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <3bfa5338-16a0-f9e2-2c82-70af12e25fb1@lucaceresoli.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-49551924 X-CRM114-CacheID: sfid-20181031_203137_710919_B0642AD6 X-CRM114-Status: GOOD ( 20.23 ) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Luca, On 10/30/2018 06:44 PM, Luca Ceresoli wrote: > Hi Vladimir, > > On 16/10/18 14:48, Laurent Pinchart wrote: >> Hi Vladimir, >> >> On Saturday, 13 October 2018 16:47:48 EEST Vladimir Zapolskiy wrote: >>> On 10/12/2018 03:01 PM, Laurent Pinchart wrote: >>>> On Tuesday, 9 October 2018 00:12:01 EEST Vladimir Zapolskiy wrote: >>>>> From: Vladimir Zapolskiy >>>>> >>>>> TI DS90Ux9xx de-/serializers have a capability to multiplex pin >>>>> functions, in particular a pin may have selectable functions of GPIO, >>>>> GPIO line transmitter, one of I2S lines, one of RGB24 video signal lines >>>>> and so on. >>>>> >>>>> The change adds a description of DS90Ux9xx pin multiplexers and GPIO >>>>> controllers. >>>>> >>>>> Signed-off-by: Vladimir Zapolskiy > [...] >>>>> +Available pins, groups and functions (reference to device datasheets): >>>>> + >>>>> +function: "gpio" ("gpio4" is on DS90Ux925 and DS90Ux926 only, >>>>> + "gpio9" is on DS90Ux940 only) >>>>> + - pins: "gpio0", "gpio1", "gpio2", "gpio3", "gpio4", "gpio5", "gpio6", >>>>> + "gpio7", "gpio8", "gpio9" >>>>> + >>>>> +function: "gpio-remote" >>>>> + - pins: "gpio0", "gpio1", "gpio2", "gpio3" >>>>> + >>>>> +function: "pass" (DS90Ux940 specific only) >>>>> + - pins: "gpio0", "gpio3" >>>> >>>> What do those functions mean ? >>> >>> "gpio" function should be already familiar to you. >> >> I assume this function is only available for the local device, not the remote >> one ? >> >>> "gpio-remote" function is the pin function for a GPIO line bridging. >>> >>> "pass" function sets a pin to a status pin function for detecting >>> display timing issues, namely DE or Vsync length value mismatch. >> >> All this is not clear at all from the proposed DT bindings, it should be >> properly documented. > > It's not clear to me as well. The "gpio-remote" can mean two different > things (at least in the camera serdes TI chips): > > - a GPIO input on the the *local* chip, replicated as an output on the > *remote* chip > - a GPIO input on the the *remote* chip, replicated as an output on the > *local* chip > > How to you differentiate them in DT? > "gpio-remote" function is directly translated into "GPIOx Remote Enable" bit setting, the documentation says: 1) Deserializer IC pin configuration: Enable GPIO control from remote Serializer. The GPIO pin will be an output, and the value is received from the remote Serializer. 2) Serializer IC pin configuration: Enable GPIO control from remote Deserializer. The GPIO pin will be an output, and the value is received from the remote Deserializer. So, it is always an output signal, the line signal is "bridged" (repeated) as a corresponding line signal on a remote IC, note that there is no difference between serializer and deserializer ICs. > The "pass" function is also not clear. A comprehensive example would > help a lot. As this devicetree documentation says, the "pass" pin function is specific for DS90Ux940 deserializer, I would suggest to check its datasheet for getting a comprehensive answer, but I've already copy-pasted information from the datasheet into my previous answer to Laurent. The reason why the "pass" pin function is listed is quite simple, the pin function interferes other pin functions, see DS90Ux940 GPIO0 and GPIO3 controls, I hope I've managed to describe it properly by DS90UX940_GPIO(0, ...) and DS90UX940_GPIO(3, ...) pin descriptions in the pinctrl driver. -- Best wishes, Vladimir