From patchwork Thu Mar 14 16:37:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 160358 Delivered-To: patch@linaro.org Received: by 2002:a02:5cc1:0:0:0:0:0 with SMTP id w62csp15721188jad; Thu, 14 Mar 2019 09:37:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqxQaUfE+MyguOX85Vjq0TatXTRG4eJD+CjrMrivwFQp/HwJJD9sJ8tZwJh29w5b0reABxSV X-Received: by 2002:a17:902:e090:: with SMTP id cb16mr50658115plb.32.1552581457217; Thu, 14 Mar 2019 09:37:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552581457; cv=none; d=google.com; s=arc-20160816; b=L+w78dCf8KJaJOizFGQUt25eSEQkEe2t0v1KF2AT0GRZL+MSsPPQLxt188hopCMb2E JvlmBKkIYJYH0vY2hx6jvdsNUBPqEW+I3dVD4wEVHj6r7xpeKTC1kbc9FAVdlV1MKt0Y lJUywkhokdLScm3qiNG8S6mStfMw1os7GSz5XCUWrEcfpfp8IXGcHMrPT72clB3MesWD +40+/V8q2gNJiWTPNZBk9yJHNHBOn8Lhi4z4U3R8nh83KbC1Vf9KELKHJ0ik2PFBx9iC uUKWArZp1FwZUTw3CkEJd381dzBcfM6zH3M4SUI6z81ee9uSdM22HdrY/vqIVIVFLQZ9 scOA== 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:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=dwBoD1sDij0jsG9awwD4X8EaqLlNFJrsNhL/sg7fZs4=; b=Ji/HfZDxYq/xD2iMVzTaFRWi8WdRyz+bo3DgMECOLRSZMMP6Ul7YXipn6zlVRYXrJn 6DlYQE6GuYFKSOuGIY87dUFuU+AHNyRlDXFeWk7Idg3Y++b2uFkvcJ4Wq2AMOtN0Neio tePlZZMTyyill/LGVD+vBdTBMmWV3PpwiGUUiNTRGKtwmK24HxHe0vTmB3820nur4ELf n44Z9iMPwnfM9MOt6iY45HGRTykC29w4uiZIQkbf2XvjtH9IC7ySYczrsPMraJB4QEus CtLDUlzSLXPL01I3meJPmtohMYfMKOvK2ceyArHM250RlL7ijP7jVu9JKN5j5Tbezzf8 LMwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=2C1BnO+e; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-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 k1si11579541pgo.417.2019.03.14.09.37.37; Thu, 14 Mar 2019 09:37:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=2C1BnO+e; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727508AbfCNQhg (ORCPT + 7 others); Thu, 14 Mar 2019 12:37:36 -0400 Received: from mail-wm1-f68.google.com ([209.85.128.68]:35787 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726579AbfCNQhg (ORCPT ); Thu, 14 Mar 2019 12:37:36 -0400 Received: by mail-wm1-f68.google.com with SMTP id y15so3443850wma.0 for ; Thu, 14 Mar 2019 09:37:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=dwBoD1sDij0jsG9awwD4X8EaqLlNFJrsNhL/sg7fZs4=; b=2C1BnO+e4y1GwCrS1NfwUUMq1/Fa5o3j6RsYEUcswvhmhrYWDk8A2bYUkhUpaBAoiW zAdsrQlZVeoaZE3V2Qd0J9iuOBNut/uIf7s5DaLkqL1aNdv+Jx+YrzA8ht00YaxpteHY 0TU+FRBcDi9wSoeb6jlazARzfdfNWd+S3uufrj80hGTVCcpyZnAqCUGlOCuaye/qqicY UCJ7b0m2JQBFNyTYHww9e8peZWWzr/GfMc9yCCjVMbj49pFX+vFxLjbY1+N/JeHTKTus oAl1FA+vppJy8FJb0YKubDPmDM0Z7yqBLdJe2R1c85Yo80EtpAaoSrpznnvmv6tkoHfq O5Qw== 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:mime-version :content-transfer-encoding; bh=dwBoD1sDij0jsG9awwD4X8EaqLlNFJrsNhL/sg7fZs4=; b=imBxDSvuZzm+fzmLoGlZxGFTVIuIQh1b5GuWuuvcLvYvHPcPGDomunkBjxhzDml/13 at5UpydEPLSbeFXIzcXNzei3+Ix4oJfaBSyxBq7O4wYGUJ76mL4wZVg0BTVW/rtBDsFD bVbLL58SLupjvg5ZYGqRCipIRPbxa2/hrW/yfeT8C3vO1EbQNMYbhbbQcFT5BtEsbvHr v39zbSGH7Wknp9eAhkTo+wMiq+UVI2GU4tnDn4PFAb7vX6u6TrnU56pK8Zh09ABvysFk NF6Mmve2SBKHO99w6d+FKctDifkNauJrrSJEjfy6BP6rBzn3Cq5z0u+8tyj/OjIUgVh3 ksJg== X-Gm-Message-State: APjAAAX9WNNScjyN9KNtEXUQaupZ1/TwICPZixK++blV8ivfNG82++Io iI6nnY6dyZSR32nAXYq0KHknQw== X-Received: by 2002:a1c:c90e:: with SMTP id f14mr3065130wmb.23.1552581453702; Thu, 14 Mar 2019 09:37:33 -0700 (PDT) Received: from boomer.local ([2a01:e34:eeb6:4690:106b:bae3:31ed:7561]) by smtp.googlemail.com with ESMTPSA id u17sm45003315wrg.71.2019.03.14.09.37.32 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 14 Mar 2019 09:37:32 -0700 (PDT) From: Jerome Brunet To: Linus Walleij , Kevin Hilman Cc: Jerome Brunet , devicetree@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, Guillaume La Roque Subject: [PATCH 0/2] pinctrl: meson: add g12a drive strength support Date: Thu, 14 Mar 2019 17:37:23 +0100 Message-Id: <20190314163725.7918-1-jbrunet@baylibre.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The purpose of this patchset is to add drive-strength support in meson pinconf driver. This is a new feature that was added on the g12a. It is critical for us to support this since many functions are failing with default pad drive-strength. Now the slightly annoying part :( The value achievable by the SoC are 0.5mA, 2.5mA, 3mA and 4mA and the DT property 'drive-strength' is expressed in mA. 1) Rounding down the value, we could be requesting a 0mA drive strength. That would look weird. 2) Rounding up, we can't distinguish between 2.5mA and 3mA To solve this issue in this in this v1, we chose to document that, on Amlogic, drive-strength is expressed in uA instead of mA. It works well and there is no impact on the other platforms but I'm not sure this is really OK with the DT rules ? Linus, if this is not OK with you, here are 2 other options we are considering. We would be very interested to get your opinion on the matter: 1) instead the generic 'drive-strength' property, we could add an amlogic specific property, 'amlogic,drive-strength'. It would be expressed in uA and parsed in amlogic specific code. I think this option is kind of overkill. Expressing drive strength in uA is not really amlogic specific so it does not make much sense, but it would work ... 2) Add another generic property "drive-strength-uA". The change to do so would be minimal and could be benefit to other platforms later on. Cheers Jerome Guillaume La Roque (2): dt-bindings: pinctrl: meson: Add drive-strength property pinctrl: meson: add support of drive-strength .../bindings/pinctrl/meson,pinctrl.txt | 3 + drivers/pinctrl/meson/pinctrl-meson-g12a.c | 36 ++-- drivers/pinctrl/meson/pinctrl-meson.c | 166 +++++++++++++----- drivers/pinctrl/meson/pinctrl-meson.h | 20 ++- 4 files changed, 165 insertions(+), 60 deletions(-) -- 2.20.1