From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S969231AbdD1MHS (ORCPT ); Fri, 28 Apr 2017 08:07:18 -0400 Received: from relmlor3.renesas.com ([210.160.252.173]:36807 "EHLO relmlie2.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S965660AbdD1MHO (ORCPT ); Fri, 28 Apr 2017 08:07:14 -0400 X-IronPort-AV: E=Sophos;i="5.37,388,1488812400"; d="scan'208";a="242134641" From: Chris Brandt To: Linus Walleij , Andy Shevchenko CC: Jacopo Mondi , Geert Uytterhoeven , Laurent Pinchart , Rob Herring , "Mark Rutland" , Russell King - ARM Linux , Linux-Renesas , "linux-gpio@vger.kernel.org" , devicetree , "linux-kernel@vger.kernel.org" Subject: RE: [PATCH v5 01/10] pinctrl: generic: Add bi-directional and output-enable Thread-Topic: [PATCH v5 01/10] pinctrl: generic: Add bi-directional and output-enable Thread-Index: AQHSvy8kW/T8jbNXV0G/jE8WsCEqd6HZTneAgAEnEICAACrhkA== Date: Fri, 28 Apr 2017 12:07:07 +0000 Message-ID: References: <1493281194-5200-1-git-send-email-jacopo+renesas@jmondi.org> <1493281194-5200-2-git-send-email-jacopo+renesas@jmondi.org> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: linaro.org; dkim=none (message not signed) header.d=none;linaro.org; dmarc=none action=none header.from=renesas.com; x-originating-ip: [75.60.247.61] x-microsoft-exchange-diagnostics: 1;SG2PR06MB1167;7:zoNV3vt1NL72SLpp5KyTBWskbyINamcMPToMivolyYaDZ4iQN4eHoM84rY30cKWz3DY875V/6B1jGXCI0U0HrBYAILb3QG2hi1F4kN0XqXTEsytyrCfI9ye7X81lCmELmmd2jyLZ3dKsl3Hz8lEtvL+1DcNdKmDEfFJyFZEhHU3lOhYaWD989sHqQSI6nCsEY79XyHg5MVdWiIZLRtUff0D6X3TxEHIlEfa9SWZVo81Ka0U+GYStewIFFHIqHcKhOJArXqU/pKi0Q9ATITbX5yiTYYz1nsvLJx/g+CfarFqROV+56gOqdxjDp6TD0JWyuy1Ivy/kJy28Qs5UDuT/8w==;20:hLhV9NwVMgE0H316Nv2EBiG/TVn60onU7jgnSA73TLqhP/HlbKhXpFKRO3nMhtw5zuvdcTvUqVXShNICqBbnhRRihojzjcBtYt9ORzMlmZNAK55K6i+QBz4s6iGWOgpkllqlOab+LW9N0Z1IbgsjOSqC3Ot3vg0M+ncwkNq3T6o= x-ms-office365-filtering-correlation-id: 5f2ad2b2-7e78-4471-b6d7-08d48e2f17c2 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(2017030254075)(48565401081)(201703131423075)(201703031133081)(201702281549075);SRVR:SG2PR06MB1167; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040450)(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001)(93006095)(93001095)(6055026)(6041248)(20161123560025)(20161123562025)(20161123564025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(6072148);SRVR:SG2PR06MB1167;BCL:0;PCL:0;RULEID:;SRVR:SG2PR06MB1167; x-forefront-prvs: 029174C036 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(39860400002)(39850400002)(39400400002)(39840400002)(39450400003)(39410400002)(24454002)(50986999)(76176999)(54906002)(7696004)(6116002)(2900100001)(81166006)(54356999)(8676002)(86362001)(33656002)(93886004)(122556002)(3846002)(39060400002)(8936002)(66066001)(189998001)(102836003)(5660300001)(4326008)(55016002)(6246003)(53936002)(25786009)(74316002)(3280700002)(6506006)(2950100002)(6436002)(305945005)(7736002)(7416002)(3660700001)(99286003)(38730400002)(2906002)(229853002)(77096006)(9686003)(41533002);DIR:OUT;SFP:1102;SCL:1;SRVR:SG2PR06MB1167;H:SG2PR06MB1165.apcprd06.prod.outlook.com;FPR:;SPF:None;MLV:ovrnspm;PTR:InfoNoRecords;LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Apr 2017 12:07:07.7154 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-Transport-CrossTenantHeadersStamped: SG2PR06MB1167 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id v3SC7O9s022982 On Friday, April 28, 2017, Linus Walleij wrote: > > For me it looks like you are trying to alias open-drain + bias or > > alike. Don't actually see the benefit of it. > > Andy is bringing up a valid point. And I remember asking about this before. > > What does "bi-directional" really mean, electrically speaking? > > Does is just mean open drain and/or open source actually? > (See Documentation/gpio/driver.txt for an explanation of how open > drain/source works.) > > When you set an output without setting a value, what happens electrically? > > Isn't this bias-high-impedance / High-Z? > > Hopefully you can find the answer from Renesas hardware dept. > > You can certainly call it whatever the datasheet calls it in your driver > #defines but for the DT bindings we would ideally have the physical world > things. The main reason is this pin controller is too dumb to do what it's supposed to with 1 register setting. Take the SDHI data pins. You send AND receive data over those pins (and they are not open drain). The issue is that the PFC HW that enables the connections between the SDHI IP block and the I/O pad buffers can only enable one path/signal/direction to the buffer enables (in or out). So for a pin that needs both directions, the PFC enables output and the "bidirectional register" is used to enable the input buffer as well. In the RZ/A1 HW manual you can kind of see that in 54.18 Port Control Logical Diagram (but that wasn't obvious to me at first). # side note, the way the registers are arranged is also ridiculous in my opinion. I'm not a fan of this particular IP. The good news is the RZ/A1 is the only chip series I've seen with this PFC IP (I can't even figure out where it came from internally). And as far as I know, it will not appear in any other RZ series chips. Chris