From: Sean Anderson <seanga2@gmail.com>
To: u-boot@lists.denx.de
Subject: [PATCH 1/2] pinctrl: k210: Fix inverted IE and OE for I2C
Date: Sun, 25 Oct 2020 16:00:09 -0400 [thread overview]
Message-ID: <20201025200010.550920-1-seanga2@gmail.com> (raw)
I2C and SCCB previously shared defaults. However, SCCB needs OE_INV and
IE_INV set, but I2C cannot have those bits set. This adds a separate
default for SCCB.
Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reported-by: Damien Le Moal <Damien.LeMoal@wdc.com>
---
drivers/pinctrl/pinctrl-kendryte.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/pinctrl/pinctrl-kendryte.c b/drivers/pinctrl/pinctrl-kendryte.c
index 5ad049d955..259a0b507b 100644
--- a/drivers/pinctrl/pinctrl-kendryte.c
+++ b/drivers/pinctrl/pinctrl-kendryte.c
@@ -55,8 +55,9 @@
#define K210_PC_MODE_IN (K210_PC_IE | K210_PC_ST)
#define K210_PC_MODE_OUT (K210_PC_DRIVE_7 | K210_PC_OE)
-#define K210_PC_MODE_I2C (K210_PC_MODE_IN | K210_PC_IE_INV | K210_PC_SL | \
- K210_PC_OE | K210_PC_OE_INV | K210_PC_PU)
+#define K210_PC_MODE_I2C (K210_PC_MODE_IN | K210_PC_SL | K210_PC_OE | \
+ K210_PC_PU)
+#define K210_PC_MODE_SCCB (K210_PC_MODE_I2C | K210_PC_OE_INV | K210_PC_IE_INV)
#define K210_PC_MODE_SPI (K210_PC_MODE_IN | K210_PC_IE_INV | \
K210_PC_MODE_OUT | K210_PC_OE_INV)
#define K210_PC_MODE_GPIO (K210_PC_MODE_IN | K210_PC_MODE_OUT)
@@ -189,6 +190,7 @@ static const u32 k210_pc_mode_id_to_mode[] = {
[K210_PC_DEFAULT_IN_TIE] = K210_PC_MODE_IN,
DEFAULT(OUT),
DEFAULT(I2C),
+ DEFAULT(SCCB),
DEFAULT(SPI),
DEFAULT(GPIO),
[K210_PC_DEFAULT_INT13] = K210_PC_MODE_IN | K210_PC_PU,
@@ -362,8 +364,8 @@ static const struct k210_pcf_info k210_pcf_infos[] = {
FUNC(DVP_D5, IN),
FUNC(DVP_D6, IN),
FUNC(DVP_D7, IN),
- FUNC(SCCB_SCLK, I2C),
- FUNC(SCCB_SDA, I2C),
+ FUNC(SCCB_SCLK, SCCB),
+ FUNC(SCCB_SDA, SCCB),
FUNC(UART1_CTS, IN),
FUNC(UART1_DSR, IN),
FUNC(UART1_DCD, IN),
--
2.28.0
next reply other threads:[~2020-10-25 20:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-25 20:00 Sean Anderson [this message]
2020-10-25 20:00 ` [PATCH 2/2] pinctrl: k210: Rename power domains to match datasheet Sean Anderson
2020-11-03 6:41 ` Rick Chen
2020-11-03 6:40 ` [PATCH 1/2] pinctrl: k210: Fix inverted IE and OE for I2C Rick Chen
2020-11-13 7:19 ` Rick Chen
2020-11-13 13:44 ` Sean Anderson
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=20201025200010.550920-1-seanga2@gmail.com \
--to=seanga2@gmail.com \
--cc=u-boot@lists.denx.de \
/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