Thread (9 messages) flat view 9 messages, 3 authors, 2020-07-22

Re: [PATCH 3/3] soc: mediatek: pwrap: add pwrap driver for MT6873/8192 SoCs

From: Hsin-hsiung Wang <hidden>
Date: 2020-07-22 04:26:09
Also in: linux-devicetree, linux-mediatek, lkml

Hi,

On Wed, 2020-07-22 at 00:51 +0200, Matthias Brugger wrote:
On 14/07/2020 11:53, Hsin-Hsiung Wang wrote:
quoted
MT6873/8192 are highly integrated SoCs and use PMIC_MT6359 for
power management. This patch adds pwrap master driver to
access PMIC_MT6359.

Signed-off-by: Hsin-Hsiung Wang <redacted>
---
  drivers/soc/mediatek/mtk-pmic-wrap.c | 98 ++++++++++++++++++++++++++++++++----
  1 file changed, 87 insertions(+), 11 deletions(-)
diff --git a/drivers/soc/mediatek/mtk-pmic-wrap.c b/drivers/soc/mediatek/mtk-pmic-wrap.c
index c897205..6e7f796f 100644
--- a/drivers/soc/mediatek/mtk-pmic-wrap.c
+++ b/drivers/soc/mediatek/mtk-pmic-wrap.c
@@ -24,11 +24,13 @@
  #define PWRAP_MT8135_BRIDGE_WDT_SRC_EN		0x54
  
  /* macro for wrapper status */
+#define PWRAP_GET_SWINF_2_FSM(x)	(((x) >> 1) & 0x00000007)
  #define PWRAP_GET_WACS_RDATA(x)		(((x) >> 0) & 0x0000ffff)
  #define PWRAP_GET_WACS_FSM(x)		(((x) >> 16) & 0x00000007)
  #define PWRAP_GET_WACS_REQ(x)		(((x) >> 19) & 0x00000001)
  #define PWRAP_STATE_SYNC_IDLE0		BIT(20)
  #define PWRAP_STATE_INIT_DONE0		BIT(21)
+#define PWRAP_STATE_INIT_DONE1		BIT(15)
  
  /* macro for WACS FSM */
  #define PWRAP_WACS_FSM_IDLE		0x00
@@ -74,6 +76,7 @@
  #define PWRAP_CAP_DCM		BIT(2)
  #define PWRAP_CAP_INT1_EN	BIT(3)
  #define PWRAP_CAP_WDT_SRC1	BIT(4)
+#define PWRAP_CAP_ARB		BIT(5)
This commit should be two patches (at least). One adding PWRAP_CAP_ARB and then 
another one adding MT6873 support.

Regards,
Matthias
Thanks for the comment. I will update it in next patch.
quoted
  
  /* defines for slave device wrapper registers */
  enum dew_regs {
[Delete]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help