From: Stefan Wahren <stefan.wahren@i2se.com>
To: Florian Fainelli <f.fainelli@gmail.com>,
linux-arm-kernel@lists.infradead.org
Cc: "Al Cooper" <alcooperx@gmail.com>,
"Linus Walleij" <linus.walleij@linaro.org>,
"Rob Herring" <robh+dt@kernel.org>,
"Mark Rutland" <mark.rutland@arm.com>,
"Ray Jui" <rjui@broadcom.com>,
"Scott Branden" <sbranden@broadcom.com>,
"maintainer:BROADCOM BCM281XX/BCM11XXX/BCM216XX ARM ARCHITE..."
<bcm-kernel-feedback-list@broadcom.com>,
"Eric Anholt" <eric@anholt.net>,
"Doug Berger" <opendmb@gmail.com>,
"Matheus Castello" <matheus@castello.eng.br>,
"Rafał Miłecki" <rafal@milecki.pl>,
"Lukas Wunner" <lukas@wunner.de>,
"Nathan Chancellor" <natechancellor@gmail.com>,
"open list:PIN CONTROL SUBSYSTEM" <linux-gpio@vger.kernel.org>,
"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
<devicetree@vger.kernel.org>,
"moderated list:BROADCOM BCM2835 ARM ARCHITECTURE"
<linux-rpi-kernel@lists.infradead.org>,
"open list" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 3/3] pinctrl: bcm2835: bcm7211: Add support for 7211 pull-up functionality
Date: Mon, 13 May 2019 10:14:53 +0200 [thread overview]
Message-ID: <eb73a935-3638-e7b5-c85e-7857d61a7511@i2se.com> (raw)
In-Reply-To: <20190509205955.27842-4-f.fainelli@gmail.com>
Hi Florian,
On 09.05.19 22:59, Florian Fainelli wrote:
> From: Al Cooper <alcooperx@gmail.com>
>
> The 7211 has a new way of selecting the pull-up/pull-down setting
> for a GPIO pin. The registers used for the bcm2837, 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,bcm7211-gpio" and the kernel
> driver will use it to select which method is used to select
> pull-up/pull-down.
>
> Signed-off-by: Al Cooper <alcooperx@gmail.com>
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
> ---
> drivers/pinctrl/bcm/pinctrl-bcm2835.c | 85 +++++++++++++++++++++++++--
> 1 file changed, 80 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/pinctrl/bcm/pinctrl-bcm2835.c b/drivers/pinctrl/bcm/pinctrl-bcm2835.c
> index 183d1ffe6a75..35d9f9593000 100644
> --- a/drivers/pinctrl/bcm/pinctrl-bcm2835.c
> +++ b/drivers/pinctrl/bcm/pinctrl-bcm2835.c
> @@ -57,15 +57,26 @@
> #define GPAFEN0 0x88 /* Pin Async Falling Edge Detect */
> #define GPPUD 0x94 /* Pin Pull-up/down Enable */
> #define GPPUDCLK0 0x98 /* Pin Pull-up/down Enable Clock */
> +#define GP_GPIO_PUP_PDN_CNTRL_REG0 0xe4 /* 7211 Pin Pull-up/down select */
>
> #define FSEL_REG(p) (GPFSEL0 + (((p) / 10) * 4))
> #define FSEL_SHIFT(p) (((p) % 10) * 3)
> #define GPIO_REG_OFFSET(p) ((p) / 32)
> #define GPIO_REG_SHIFT(p) ((p) % 32)
>
> +#define PUD_7211_MASK 0x3
> +#define PUD_7211_REG_OFFSET(p) ((p) / 16)
> +#define PUD_7211_REG_SHIFT(p) (((p) % 16) * 2)
> +
> /* argument: bcm2835_pinconf_pull */
> #define BCM2835_PINCONF_PARAM_PULL (PIN_CONFIG_END + 1)
>
> +enum bcm7211_pinconf_pull {
> + BCM7211_PINCONFIG_PULL_NONE,
> + BCM7211_PINCONFIG_PULL_UP,
> + BCM7211_PINCONFIG_PULL_DOWN,
> +};
unfortunately this not usable for DTS files.
Please look at:
include/dt-bindings/pinctrl/bcm2835.h
Btw the meaning between BCM2835 and BCM7211 of pull down and up is
different :(
next prev parent reply other threads:[~2019-05-13 8:15 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-09 20:59 [PATCH 0/3] pinctrl: bcm: Allow PINCTRL_BCM2835 for ARCH_BRCMSTB Florian Fainelli
2019-05-09 20:59 ` [PATCH 1/3] dt-bindings: pinctrl: bcm2835-gpio: Document BCM7211 compatible Florian Fainelli
2019-05-16 13:25 ` Linus Walleij
2019-05-09 20:59 ` [PATCH 2/3] pinctrl: bcm: Allow PINCTRL_BCM2835 for ARCH_BRCMSTB Florian Fainelli
2019-05-16 13:25 ` Linus Walleij
2019-05-09 20:59 ` [PATCH 3/3] pinctrl: bcm2835: bcm7211: Add support for 7211 pull-up functionality Florian Fainelli
2019-05-13 8:14 ` Stefan Wahren [this message]
2019-05-13 16:27 ` Florian Fainelli
2019-05-16 13:27 ` Linus Walleij
2019-05-09 22:53 ` [PATCH 0/3] pinctrl: bcm: Allow PINCTRL_BCM2835 for ARCH_BRCMSTB Eric Anholt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=eb73a935-3638-e7b5-c85e-7857d61a7511@i2se.com \
--to=stefan.wahren@i2se.com \
--cc=alcooperx@gmail.com \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=devicetree@vger.kernel.org \
--cc=eric@anholt.net \
--cc=f.fainelli@gmail.com \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rpi-kernel@lists.infradead.org \
--cc=lukas@wunner.de \
--cc=mark.rutland@arm.com \
--cc=matheus@castello.eng.br \
--cc=natechancellor@gmail.com \
--cc=opendmb@gmail.com \
--cc=rafal@milecki.pl \
--cc=rjui@broadcom.com \
--cc=robh+dt@kernel.org \
--cc=sbranden@broadcom.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®