All of lore.kernel.org
 help / color / mirror / Atom feed
From: Neil Armstrong <narmstrong@baylibre.com>
To: khilman@baylibre.com, linus.walleij@linaro.org
Cc: Neil Armstrong <narmstrong@baylibre.com>,
	linux-amlogic@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH 3/5] meson: pinctrl-gxbb: add support for TEST_N pin
Date: Wed,  1 Aug 2018 12:00:21 +0200	[thread overview]
Message-ID: <1533117623-27856-4-git-send-email-narmstrong@baylibre.com> (raw)
In-Reply-To: <1533117623-27856-1-git-send-email-narmstrong@baylibre.com>

The Amlogic Meson GXBB SoCs needs a Secure Monitor call to set the TEST_N
direction, add a special bank to support this pin.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
---
 drivers/pinctrl/meson/pinctrl-meson-gxbb.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/pinctrl/meson/pinctrl-meson-gxbb.c b/drivers/pinctrl/meson/pinctrl-meson-gxbb.c
index 2c97a2e0..c0954be 100644
--- a/drivers/pinctrl/meson/pinctrl-meson-gxbb.c
+++ b/drivers/pinctrl/meson/pinctrl-meson-gxbb.c
@@ -15,6 +15,7 @@
 #include <dt-bindings/gpio/meson-gxbb-gpio.h>
 #include "pinctrl-meson.h"
 #include "pinctrl-meson8-pmx.h"
+#include <linux/firmware/meson/meson_sm.h>
 
 static const struct pinctrl_pin_desc meson_gxbb_periphs_pins[] = {
 	MESON_PIN(GPIOZ_0),
@@ -823,6 +824,9 @@ static struct meson_bank meson_gxbb_periphs_banks[] = {
 static struct meson_bank meson_gxbb_aobus_banks[] = {
 	/*   name    first      last       irq    pullen  pull    dir     out     in  */
 	BANK("AO",   GPIOAO_0,  GPIOAO_13, 0, 13, 0,  0,  0, 16,  0,  0,  0, 16,  1,  0),
+	/* This PIN Direction must be set using a SMC call, so dir reg offset is the sm call */
+	BANK_SMC("TEST", GPIO_TEST_N, GPIO_TEST_N,
+					 -1, -1, 0, 30,  0, 14, SM_TEST_N_DIR, 1, 0, 31, 1, 31),
 };
 
 static struct meson_pinctrl_data meson_gxbb_periphs_pinctrl_data = {
-- 
2.7.4

WARNING: multiple messages have this Message-ID (diff)
From: narmstrong@baylibre.com (Neil Armstrong)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/5] meson: pinctrl-gxbb: add support for TEST_N pin
Date: Wed,  1 Aug 2018 12:00:21 +0200	[thread overview]
Message-ID: <1533117623-27856-4-git-send-email-narmstrong@baylibre.com> (raw)
In-Reply-To: <1533117623-27856-1-git-send-email-narmstrong@baylibre.com>

The Amlogic Meson GXBB SoCs needs a Secure Monitor call to set the TEST_N
direction, add a special bank to support this pin.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
---
 drivers/pinctrl/meson/pinctrl-meson-gxbb.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/pinctrl/meson/pinctrl-meson-gxbb.c b/drivers/pinctrl/meson/pinctrl-meson-gxbb.c
index 2c97a2e0..c0954be 100644
--- a/drivers/pinctrl/meson/pinctrl-meson-gxbb.c
+++ b/drivers/pinctrl/meson/pinctrl-meson-gxbb.c
@@ -15,6 +15,7 @@
 #include <dt-bindings/gpio/meson-gxbb-gpio.h>
 #include "pinctrl-meson.h"
 #include "pinctrl-meson8-pmx.h"
+#include <linux/firmware/meson/meson_sm.h>
 
 static const struct pinctrl_pin_desc meson_gxbb_periphs_pins[] = {
 	MESON_PIN(GPIOZ_0),
@@ -823,6 +824,9 @@ static struct meson_bank meson_gxbb_periphs_banks[] = {
 static struct meson_bank meson_gxbb_aobus_banks[] = {
 	/*   name    first      last       irq    pullen  pull    dir     out     in  */
 	BANK("AO",   GPIOAO_0,  GPIOAO_13, 0, 13, 0,  0,  0, 16,  0,  0,  0, 16,  1,  0),
+	/* This PIN Direction must be set using a SMC call, so dir reg offset is the sm call */
+	BANK_SMC("TEST", GPIO_TEST_N, GPIO_TEST_N,
+					 -1, -1, 0, 30,  0, 14, SM_TEST_N_DIR, 1, 0, 31, 1, 31),
 };
 
 static struct meson_pinctrl_data meson_gxbb_periphs_pinctrl_data = {
-- 
2.7.4

WARNING: multiple messages have this Message-ID (diff)
From: narmstrong@baylibre.com (Neil Armstrong)
To: linus-amlogic@lists.infradead.org
Subject: [PATCH 3/5] meson: pinctrl-gxbb: add support for TEST_N pin
Date: Wed,  1 Aug 2018 12:00:21 +0200	[thread overview]
Message-ID: <1533117623-27856-4-git-send-email-narmstrong@baylibre.com> (raw)
In-Reply-To: <1533117623-27856-1-git-send-email-narmstrong@baylibre.com>

The Amlogic Meson GXBB SoCs needs a Secure Monitor call to set the TEST_N
direction, add a special bank to support this pin.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
---
 drivers/pinctrl/meson/pinctrl-meson-gxbb.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/pinctrl/meson/pinctrl-meson-gxbb.c b/drivers/pinctrl/meson/pinctrl-meson-gxbb.c
index 2c97a2e0..c0954be 100644
--- a/drivers/pinctrl/meson/pinctrl-meson-gxbb.c
+++ b/drivers/pinctrl/meson/pinctrl-meson-gxbb.c
@@ -15,6 +15,7 @@
 #include <dt-bindings/gpio/meson-gxbb-gpio.h>
 #include "pinctrl-meson.h"
 #include "pinctrl-meson8-pmx.h"
+#include <linux/firmware/meson/meson_sm.h>
 
 static const struct pinctrl_pin_desc meson_gxbb_periphs_pins[] = {
 	MESON_PIN(GPIOZ_0),
@@ -823,6 +824,9 @@ static struct meson_bank meson_gxbb_periphs_banks[] = {
 static struct meson_bank meson_gxbb_aobus_banks[] = {
 	/*   name    first      last       irq    pullen  pull    dir     out     in  */
 	BANK("AO",   GPIOAO_0,  GPIOAO_13, 0, 13, 0,  0,  0, 16,  0,  0,  0, 16,  1,  0),
+	/* This PIN Direction must be set using a SMC call, so dir reg offset is the sm call */
+	BANK_SMC("TEST", GPIO_TEST_N, GPIO_TEST_N,
+					 -1, -1, 0, 30,  0, 14, SM_TEST_N_DIR, 1, 0, 31, 1, 31),
 };
 
 static struct meson_pinctrl_data meson_gxbb_periphs_pinctrl_data = {
-- 
2.7.4

  parent reply	other threads:[~2018-08-01 10:00 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-01 10:00 [PATCH 0/5] pinctrl: meson: Add support for TEST_N gpio Neil Armstrong
2018-08-01 10:00 ` Neil Armstrong
2018-08-01 10:00 ` Neil Armstrong
2018-08-01 10:00 ` [PATCH 2/5] pinctrl: meson: Add support to set direction with a secure monitor call Neil Armstrong
2018-08-01 10:00   ` Neil Armstrong
2018-08-01 10:00   ` Neil Armstrong
2018-08-01 20:23   ` Martin Blumenstingl
2018-08-01 20:23     ` Martin Blumenstingl
2018-08-01 20:23     ` Martin Blumenstingl
2018-08-01 20:23     ` Martin Blumenstingl
2018-08-02  7:52     ` Neil Armstrong
2018-08-02  7:52       ` Neil Armstrong
2018-08-02  7:52       ` Neil Armstrong
2018-08-02 11:21       ` Jerome Brunet
2018-08-02 11:21         ` Jerome Brunet
2018-08-02 11:21         ` Jerome Brunet
2018-08-02 20:42         ` Martin Blumenstingl
2018-08-02 20:42           ` Martin Blumenstingl
2018-08-02 20:42           ` Martin Blumenstingl
2018-08-03  8:10           ` Neil Armstrong
2018-08-03  8:10             ` Neil Armstrong
2018-08-03  8:10             ` Neil Armstrong
2018-08-01 10:00 ` Neil Armstrong [this message]
2018-08-01 10:00   ` [PATCH 3/5] meson: pinctrl-gxbb: add support for TEST_N pin Neil Armstrong
2018-08-01 10:00   ` Neil Armstrong
2018-08-01 10:00 ` [PATCH 4/5] meson: pinctrl-gxl: " Neil Armstrong
2018-08-01 10:00   ` Neil Armstrong
2018-08-01 10:00   ` Neil Armstrong
2018-08-01 10:00 ` [PATCH 5/5] meson: pinctrl-axg: " Neil Armstrong
2018-08-01 10:00   ` Neil Armstrong
2018-08-01 10:00   ` Neil Armstrong
2018-08-01 10:04 ` [PATCH 1/5] meson_sm: add TEST_N pin direction call Neil Armstrong
2018-08-01 10:04   ` Neil Armstrong
2018-08-01 10:04   ` Neil Armstrong
2018-08-03 17:06   ` Linus Walleij
2018-08-03 17:06     ` Linus Walleij
2018-08-03 17:06     ` Linus Walleij
2018-08-03 17:10 ` [PATCH 0/5] pinctrl: meson: Add support for TEST_N gpio Linus Walleij
2018-08-03 17:10   ` Linus Walleij
2018-08-03 17:10   ` Linus Walleij

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=1533117623-27856-4-git-send-email-narmstrong@baylibre.com \
    --to=narmstrong@baylibre.com \
    --cc=khilman@baylibre.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.