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: 10853303 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B122217EF for ; Thu, 14 Mar 2019 16:37:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9B8FD2A492 for ; Thu, 14 Mar 2019 16:37:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8F5DC2A4B3; Thu, 14 Mar 2019 16:37:42 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED 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 3FAF12A492 for ; Thu, 14 Mar 2019 16:37:42 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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=LduoVhwszDU8cDTTPhBbfCQHA3rsDqJjV3wM3iDC7mo=; b=NP5ujWe/y/O+og wk5SSJr5acbSmffXqD2SBbjQfwkug9UA8I4hpi1Y93YpVCSpLtpLalJ6MGlIzAajfn6q+1ubJIiFN gy9jvDXnGxF0BVhKXmyQRJN5BhF9Jr2Sn+yB1NB9jB/9oG6an28Whi7mL2lSc2u03bPqrbqPd05M8 Pso+pb7XW8ddkYrOClPMQmwHu0VYrtBWdHYyxMWIa+E6p/gC9mMKxGdtu1oTVPOPeHZPdv1KqXzNF zYeJOvDfgDaw5qZcV2cEl86Ek/zLMVqthIQQpedDtRjIrpwxVQerJeI/lgfGmiAhnzLKcKJKcSi4J ejNoHlC0jt7KxYESJSLg==; 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 1h4TMT-0002Wy-An; Thu, 14 Mar 2019 16:37:41 +0000 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h4TMP-0002VU-9q for linux-amlogic@lists.infradead.org; Thu, 14 Mar 2019 16:37:39 +0000 Received: by mail-wm1-x343.google.com with SMTP id 4so3691735wmf.5 for ; Thu, 14 Mar 2019 09:37:35 -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=KJ6mJ79jBUdzHsc/NqPr0antQe/t61+dIugCcPyYzkuNdeb2HPx0L1juADHAWDnoEu yqDQrdndhH96caSneFOb+biTP8JmkEOoyWwBcWjat9GbrkQjwvBQvaNx72aOvkeHvPlk BTdkpbEM92RRXBtj9FNmk4TPJHRsRqrxi7QAbo/G8cK96TAdvnOPxYueF5tr20PIQ0CF my+qzp8VW1F/PpzPVa6yUlFk9pwwvZXa+kkKNkAyjzoGbdwWOOLJHi2l2+pdfiO1zrIz cI9kusCjU2MVKcd/axkHMHFQAajBsPPSw7SPdVdoPFnsHS9t/Yvrferige7MVSjRWbzG Tjzg== X-Gm-Message-State: APjAAAX6waGDcJvVEk87XjTtOz+caUalWGIkgcjaJwYo/8PvFqTOwap0 AXaSBgOZcCIkJVvpdsvG/71rlQ== X-Google-Smtp-Source: APXvYqyHqgo2GfsBipQLYm3mmLaMOA3ytFrbvaK2Mufl3Ofrsvc6OJLYXa8DVtqK5L2BZUrdV7m+ZQ== 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190314_093737_389390_C51AA7C3 X-CRM114-Status: GOOD ( 13.71 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, Guillaume La Roque , linux-amlogic@lists.infradead.org, Jerome Brunet Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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(-)