From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7F7ADC4360C for ; Fri, 27 Sep 2019 19:29:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3AB7D20872 for ; Fri, 27 Sep 2019 19:29:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=gmx.net header.i=@gmx.net header.b="CFD2KyoQ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725813AbfI0T3L (ORCPT ); Fri, 27 Sep 2019 15:29:11 -0400 Received: from mout.gmx.net ([212.227.15.18]:34015 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725789AbfI0T3L (ORCPT ); Fri, 27 Sep 2019 15:29:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1569612522; bh=LqPvzgMl3M/SdWVKtQw9Xc3eQlGWH+qD7BITZ5irqno=; h=X-UI-Sender-Class:Subject:From:To:Cc:References:Date:In-Reply-To; b=CFD2KyoQN+r9Ao45VZBsbIkex6rouXGNx1P6G9ThoDHBExPJePHm/mFyYEjY6E1Y0 9tF31PL87m2KUNY8iIF4Wlg9Stde9oWqgOfZdD1aV55hn1KqF6JonvtK1qOgYr63iE s6IoYlu33Ng8vSgNisENPwrtpCvm5IM1D12y0SlA= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.1.162] ([37.4.249.130]) by mail.gmx.com (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MDQeK-1iL3BU1H7u-00AWac; Fri, 27 Sep 2019 21:28:42 +0200 Subject: Re: [PATCH 12/18] pinctrl: bcm2835: Add support for BCM2711 pull-up functionality From: Stefan Wahren To: Linus Walleij Cc: Eric Anholt , Florian Fainelli , Ray Jui , Scott Branden , Nicolas Saenz Julienne , Matthias Brugger , Rob Herring , Mark Rutland , Michael Turquette , Stephen Boyd , Ulf Hansson , Adrian Hunter , bcm-kernel-feedback-list , Linux ARM , linux-rpi-kernel , "open list:GPIO SUBSYSTEM" , linux-mmc References: <1563776607-8368-1-git-send-email-wahrenst@gmx.net> <1563776607-8368-3-git-send-email-wahrenst@gmx.net> <63f17284-5551-9492-9eff-f8a4c003196b@gmx.net> Message-ID: <66dc2cad-673e-0a0b-0aeb-3d62fa2d4ccf@gmx.net> Date: Fri, 27 Sep 2019 21:28:39 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <63f17284-5551-9492-9eff-f8a4c003196b@gmx.net> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-Language: en-US X-Provags-ID: V03:K1:m931275HWhQSHbM32Q2ns3BKfQMzOJGFIpVmiNhwMIwCERHWzwd GdA69OHtFGIOg9L5HvHVmVV3UkZrKSNrU1wrNrTrky0BgiM6pkL1wOsGdtF74/GJA8dUsL4 cgwvQDVUiL9Pm/Ud8wSyB2rsofVTjJzglVE8JkOnMkrZMQZOlogqd55IfwqzPlq/sQN66uQ SbJfpK26XEFSWZYIYKZng== X-UI-Out-Filterresults: notjunk:1;V03:K0:uN12ArYQTqI=:N2NdjvtlX4d+KMqCzXJ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TlrKO5862x1QN6syEfnodYahbbnUuo9 cb38ECoRlWvv7h9GEsZi2Ael5+QdQ9luDG++oENAKEdip37ptpaeATr4xxnpbZJBidLqaIXz9 9yTLDtC0IW0KsWarjkuxC+i1WD2xGhR9dhAzZcjZla9kaj2zqDpzPJ51sjUqtGb18b4jNPfW3 2Z+PvXvA/I/3+7uB2n/6d7j8U1d1lUJ9O5zdBCM9MosPZe9prr3C83puXKQU= Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org Hi Linus, Am 11.08.19 um 22:15 schrieb Stefan Wahren: > Am 05.08.19 um 11:38 schrieb Linus Walleij: >> On Mon, Jul 22, 2019 at 8:24 AM Stefan Wahren wrote: >> >>> The BCM2711 has a new way of selecting the pull-up/pull-down setting >>> for a GPIO pin. The registers used for the BCM2835, GP_PUD and >>> GP_PUDCLKn0, are no longer connected. A new set of registers, >>> GP_GPIO_PUP_PDN_CNTRL_REGx must be used. This commit will add >>> a new compatible string "brcm,bcm2711-gpio" and the kernel >>> driver will use it to select which method is used to select >>> pull-up/pull-down. >>> >>> This patch based on a patch by Al Cooper which was intended for the >>> BCM7211. This is a bugfixed and improved version. >>> >>> Signed-off-by: Stefan Wahren >> Patch applied. > Thanks >> I think I complained about some other version of this patch, this one >> looks entirely acceptable. >> >> Can we get rid of custom pull settings etc from the upstream device >> trees so we don't set bad examples? I have a strong urge to >> throw in a pr_warn() about any use of it. > Ironically, my pre-RFC version tried to convert all BCM2835 pinmux > settings to generic ones. Unfortunately it seems that i made a mistake, > because it didn't work as expected. Since we stumpled above more and > more other issues (not relevant to pinctrl) during upstream review, i > decided to start with legacy pull-up support, so we can fix this later > in the devicetree for both platforms (currently BCM2711 uses most of the > old BCM2835 pinmuxes including the legacy stuff). So yes my plan is to > fix this soon. today i had the time to try this out. Instead of the following: =C2=A0=C2=A0=C2=A0 i2c0_gpio0: i2c0_gpio0 { =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 brcm,pins =3D <0 1>; =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 brcm,function =3D ; =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 brcm,pull =3D ; =C2=A0=C2=A0=C2=A0 } you want this? =C2=A0=C2=A0=C2=A0 i2c0_gpio0: i2c0_gpio0 { =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 pin-sda { =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 function =3D "alt= 0"; =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 pins =3D "gpio0"; =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 bias-pull-up; =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 }; =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 pin-scl { =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 function =3D "alt= 0"; =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 pins =3D "gpio1"; =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 bias-disable; =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 }; =C2=A0=C2=A0=C2=A0 }; Unfortunately i don't know U-Boot is handle the BCM2835 specific pinctrl functions. > > Stefan > >> Yours, >> Linus Walleij