All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH V5 0/4] Pwrap: Mediatek pwrap driver for mt6797
@ 2018-05-10 13:01 argus.lin
  2018-05-10 13:01 ` [PATCH V5 1/4] dt-bindings: pwrap: mediatek: add pwrap support for MT6797 argus.lin
                   ` (3 more replies)
  0 siblings, 4 replies; 16+ messages in thread
From: argus.lin @ 2018-05-10 13:01 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland, Matthias Brugger, Catalin Marinas,
	Will Deacon
  Cc: Chenglin Xu, argus.lin, Sean Wang, wsd_upstream, henryc.chen,
	flora.fu, Chen Zhong, Christophe Jaillet, Arvind Yadav,
	devicetree, linux-kernel, linux-arm-kernel, linux-mediatek


[-- Attachment #1.1: Type: text/html, Size: 2539 bytes --]

[-- Attachment #1.2: Type: text/plain, Size: 1585 bytes --]

From: Argus Lin <argus.lin@mediatek.com>

Here's version 5 of the patch series, include 4 patches:
1. fix bug at cipher init for
5ae48040aa47 ("soc: mediatek: PMIC wrap: add mt6323 slave support")
2. add pwrap driver for mt6797 SoCs.
3. add mt6351 support for mt6797 SoCs.
4. remove caps flag at patch V4 and keep to use has_bridge.

Changes from v3 to v4:
1)add caps flag for pwrap to explain pwrap's capability.
2)remove has_bridge flag, replace by caps flag.
3)add int1_en_all flag for new interrupt.
4)add pwrap drivers for mt6797 SoCs.
5)fix bug at cipher init for
5ae48040aa47 ("soc: mediatek: PMIC wrap: add mt6323 slave support")
6)add mt6351 support for mt6797 SoCs.

Changes from v2 to v3:
1)adjust upstream patch sequence.
2)fix build error for new filed at pmic_wrapper_type.
3)adjust pmic_type enum sequence.

Changes from v1 to v2:
1) add new capability field and MARCO for different pwrap series, the capability include BRIDGE, RESET, DCM, PRIORITY_SEL and INT1_EN.
2) add starvaction for mt6797 pwrap.
3) add INT1 interrupt to handle starvaction and request exception.



Argus Lin (4):
  dt-bindings: pwrap: mediatek: add pwrap support for MT6797
  soc: mediatek: pwrap: fix cipher init setting error
  soc: mediatek: pwrap: add pwrap driver for mt6797 SoCs
  soc: mediatek: pwrap: add mt6351 driver for mt6797 SoCs

 .../devicetree/bindings/soc/mediatek/pwrap.txt     |  1 +
 drivers/soc/mediatek/mtk-pmic-wrap.c               | 81 +++++++++++++++++++++-
 2 files changed, 80 insertions(+), 2 deletions(-)

-- 
1.8.1.1.dirty

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH V5 1/4] dt-bindings: pwrap: mediatek: add pwrap support for MT6797
  2018-05-10 13:01 [PATCH V5 0/4] Pwrap: Mediatek pwrap driver for mt6797 argus.lin
@ 2018-05-10 13:01 ` argus.lin
  2018-05-15  9:31     ` Matthias Brugger
  2018-05-10 13:01 ` [PATCH V5 2/4] soc: mediatek: pwrap: fix cipher init setting error argus.lin
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 16+ messages in thread
From: argus.lin @ 2018-05-10 13:01 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland, Matthias Brugger, Catalin Marinas,
	Will Deacon
  Cc: Chenglin Xu, argus.lin, Sean Wang, wsd_upstream, henryc.chen,
	flora.fu, Chen Zhong, Christophe Jaillet, Arvind Yadav,
	devicetree, linux-kernel, linux-arm-kernel, linux-mediatek


[-- Attachment #1.1: Type: text/html, Size: 1779 bytes --]

[-- Attachment #1.2: Type: text/plain, Size: 809 bytes --]

From: Argus Lin <argus.lin@mediatek.com>

We add pwrap support for MT6797 SoCs.

---
 Documentation/devicetree/bindings/soc/mediatek/pwrap.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/soc/mediatek/pwrap.txt b/Documentation/devicetree/bindings/soc/mediatek/pwrap.txt
index bf80e3f..f9987c3 100644
--- a/Documentation/devicetree/bindings/soc/mediatek/pwrap.txt
+++ b/Documentation/devicetree/bindings/soc/mediatek/pwrap.txt
@@ -19,6 +19,7 @@ IP Pairing
 Required properties in pwrap device node.
 - compatible:
 	"mediatek,mt2701-pwrap" for MT2701/7623 SoCs
+	"mediatek,mt6797-pwrap" for MT6797 SoCs
 	"mediatek,mt7622-pwrap" for MT7622 SoCs
 	"mediatek,mt8135-pwrap" for MT8135 SoCs
 	"mediatek,mt8173-pwrap" for MT8173 SoCs
-- 
1.8.1.1.dirty

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH V5 2/4] soc: mediatek: pwrap: fix cipher init setting error
  2018-05-10 13:01 [PATCH V5 0/4] Pwrap: Mediatek pwrap driver for mt6797 argus.lin
  2018-05-10 13:01 ` [PATCH V5 1/4] dt-bindings: pwrap: mediatek: add pwrap support for MT6797 argus.lin
@ 2018-05-10 13:01 ` argus.lin
  2018-05-11  9:26     ` Matthias Brugger
  2018-05-15  9:50     ` Matthias Brugger
  2018-05-10 13:01 ` [PATCH V5 3/4] soc: mediatek: pwrap: add pwrap driver for mt6797 SoCs argus.lin
  2018-05-10 13:01 ` [PATCH V5 4/4] soc: mediatek: pwrap: add mt6351 " argus.lin
  3 siblings, 2 replies; 16+ messages in thread
From: argus.lin @ 2018-05-10 13:01 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland, Matthias Brugger, Catalin Marinas,
	Will Deacon
  Cc: Chenglin Xu, argus.lin, Sean Wang, wsd_upstream, henryc.chen,
	flora.fu, Chen Zhong, Christophe Jaillet, Arvind Yadav,
	devicetree, linux-kernel, linux-arm-kernel, linux-mediatek


[-- Attachment #1.1: Type: text/html, Size: 2029 bytes --]

[-- Attachment #1.2: Type: text/plain, Size: 1063 bytes --]

From: Argus Lin <argus.lin@mediatek.com>

PWRAP_DEW_CIPHER_LOAD and PWRAP_DEW_CIPHER_START only exist at
PMIC_mt6397 datasheet. We fix it before merge PMIC_mt6351 driver.

Fixes: 5ae48040aa47 ("soc: mediatek: PMIC wrap: add mt6323 slave support")
---
 drivers/soc/mediatek/mtk-pmic-wrap.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/soc/mediatek/mtk-pmic-wrap.c b/drivers/soc/mediatek/mtk-pmic-wrap.c
index e9e054a..9a01e30 100644
--- a/drivers/soc/mediatek/mtk-pmic-wrap.c
+++ b/drivers/soc/mediatek/mtk-pmic-wrap.c
@@ -1080,8 +1080,6 @@ static int pwrap_init_cipher(struct pmic_wrapper *wrp)
 	pwrap_write(wrp, wrp->slave->dew_regs[PWRAP_DEW_CIPHER_SWRST], 0x0);
 	pwrap_write(wrp, wrp->slave->dew_regs[PWRAP_DEW_CIPHER_KEY_SEL], 0x1);
 	pwrap_write(wrp, wrp->slave->dew_regs[PWRAP_DEW_CIPHER_IV_SEL], 0x2);
-	pwrap_write(wrp, wrp->slave->dew_regs[PWRAP_DEW_CIPHER_LOAD], 0x1);
-	pwrap_write(wrp, wrp->slave->dew_regs[PWRAP_DEW_CIPHER_START], 0x1);
 
 	switch (wrp->slave->type) {
 	case PMIC_MT6397:
-- 
1.8.1.1.dirty

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH V5 3/4] soc: mediatek: pwrap: add pwrap driver for mt6797 SoCs
  2018-05-10 13:01 [PATCH V5 0/4] Pwrap: Mediatek pwrap driver for mt6797 argus.lin
  2018-05-10 13:01 ` [PATCH V5 1/4] dt-bindings: pwrap: mediatek: add pwrap support for MT6797 argus.lin
  2018-05-10 13:01 ` [PATCH V5 2/4] soc: mediatek: pwrap: fix cipher init setting error argus.lin
@ 2018-05-10 13:01 ` argus.lin
  2018-05-15  9:56     ` Matthias Brugger
  2018-05-10 13:01 ` [PATCH V5 4/4] soc: mediatek: pwrap: add mt6351 " argus.lin
  3 siblings, 1 reply; 16+ messages in thread
From: argus.lin @ 2018-05-10 13:01 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland, Matthias Brugger, Catalin Marinas,
	Will Deacon
  Cc: Chenglin Xu, argus.lin, Sean Wang, wsd_upstream, henryc.chen,
	flora.fu, Chen Zhong, Christophe Jaillet, Arvind Yadav,
	devicetree, linux-kernel, linux-arm-kernel, linux-mediatek


[-- Attachment #1.1: Type: text/html, Size: 4035 bytes --]

[-- Attachment #1.2: Type: text/plain, Size: 3067 bytes --]

From: Argus Lin <argus.lin@mediatek.com>

mt6797 is a highly integrated SoCs, it uses mt6351 for power management.
We need to add pwrap driver to access mt6351. Pwrap of mt6797 support
dynamic priority meichanism, sequence monitor and starvation mechanism
to make transaction more reliable.

---
 drivers/soc/mediatek/mtk-pmic-wrap.c | 50 ++++++++++++++++++++++++++++++++++++
 1 file changed, 50 insertions(+)

diff --git a/drivers/soc/mediatek/mtk-pmic-wrap.c b/drivers/soc/mediatek/mtk-pmic-wrap.c
index 9a01e30..d03e2d4 100644
--- a/drivers/soc/mediatek/mtk-pmic-wrap.c
+++ b/drivers/soc/mediatek/mtk-pmic-wrap.c
@@ -366,6 +366,39 @@ enum pwrap_regs {
 	[PWRAP_ADC_RDATA_ADDR2] =	0x154,
 };
 
+static int mt6797_regs[] = {
+	[PWRAP_MUX_SEL] =		0x0,
+	[PWRAP_WRAP_EN] =		0x4,
+	[PWRAP_DIO_EN] =		0x8,
+	[PWRAP_SIDLY] =			0xC,
+	[PWRAP_RDDMY] =			0x10,
+	[PWRAP_CSHEXT_WRITE] =		0x18,
+	[PWRAP_CSHEXT_READ] =		0x1C,
+	[PWRAP_CSLEXT_START] =		0x20,
+	[PWRAP_CSLEXT_END] =		0x24,
+	[PWRAP_STAUPD_PRD] =		0x28,
+	[PWRAP_HARB_HPRIO] =		0x50,
+	[PWRAP_HIPRIO_ARB_EN] =		0x54,
+	[PWRAP_MAN_EN] =		0x60,
+	[PWRAP_MAN_CMD] =		0x64,
+	[PWRAP_WACS0_EN] =		0x70,
+	[PWRAP_WACS1_EN] =		0x84,
+	[PWRAP_WACS2_EN] =		0x98,
+	[PWRAP_INIT_DONE2] =		0x9C,
+	[PWRAP_WACS2_CMD] =		0xA0,
+	[PWRAP_WACS2_RDATA] =		0xA4,
+	[PWRAP_WACS2_VLDCLR] =		0xA8,
+	[PWRAP_INT_EN] =		0xC0,
+	[PWRAP_INT_FLG_RAW] =		0xC4,
+	[PWRAP_INT_FLG] =		0xC8,
+	[PWRAP_INT_CLR] =		0xCC,
+	[PWRAP_TIMER_EN] =		0xF4,
+	[PWRAP_WDT_UNIT] =		0xFC,
+	[PWRAP_WDT_SRC_EN] =		0x100,
+	[PWRAP_DCM_EN] =		0x1CC,
+	[PWRAP_DCM_DBC_PRD] =		0x1D4,
+};
+
 static int mt7622_regs[] = {
 	[PWRAP_MUX_SEL] =		0x0,
 	[PWRAP_WRAP_EN] =		0x4,
@@ -641,6 +674,7 @@ enum pmic_type {
 
 enum pwrap_type {
 	PWRAP_MT2701,
+	PWRAP_MT6797,
 	PWRAP_MT7622,
 	PWRAP_MT8135,
 	PWRAP_MT8173,
@@ -1067,6 +1101,7 @@ static int pwrap_init_cipher(struct pmic_wrapper *wrp)
 		pwrap_writel(wrp, 1, PWRAP_CIPHER_START);
 		break;
 	case PWRAP_MT2701:
+	case PWRAP_MT6797:
 	case PWRAP_MT8173:
 		pwrap_writel(wrp, 1, PWRAP_CIPHER_EN);
 		break;
@@ -1396,6 +1431,18 @@ static irqreturn_t pwrap_interrupt(int irqno, void *dev_id)
 	.init_soc_specific = pwrap_mt2701_init_soc_specific,
 };
 
+static const struct pmic_wrapper_type pwrap_mt6797 = {
+	.regs = mt6797_regs,
+	.type = PWRAP_MT6797,
+	.arb_en_all = 0x01fff,
+	.int_en_all = 0xffffffc6,
+	.spi_w = PWRAP_MAN_CMD_SPI_WRITE,
+	.wdt_src = PWRAP_WDT_SRC_MASK_ALL,
+	.has_bridge = 0,
+	.init_reg_clock = pwrap_common_init_reg_clock,
+	.init_soc_specific = NULL,
+};
+
 static const struct pmic_wrapper_type pwrap_mt7622 = {
 	.regs = mt7622_regs,
 	.type = PWRAP_MT7622,
@@ -1437,6 +1484,9 @@ static irqreturn_t pwrap_interrupt(int irqno, void *dev_id)
 		.compatible = "mediatek,mt2701-pwrap",
 		.data = &pwrap_mt2701,
 	}, {
+		.compatible = "mediatek,mt6797-pwrap",
+		.data = &pwrap_mt6797,
+	}, {
 		.compatible = "mediatek,mt7622-pwrap",
 		.data = &pwrap_mt7622,
 	}, {
-- 
1.8.1.1.dirty

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH V5 4/4] soc: mediatek: pwrap: add mt6351 driver for mt6797 SoCs
  2018-05-10 13:01 [PATCH V5 0/4] Pwrap: Mediatek pwrap driver for mt6797 argus.lin
                   ` (2 preceding siblings ...)
  2018-05-10 13:01 ` [PATCH V5 3/4] soc: mediatek: pwrap: add pwrap driver for mt6797 SoCs argus.lin
@ 2018-05-10 13:01 ` argus.lin
  3 siblings, 0 replies; 16+ messages in thread
From: argus.lin @ 2018-05-10 13:01 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland, Matthias Brugger, Catalin Marinas,
	Will Deacon
  Cc: Chenglin Xu, argus.lin, Sean Wang, wsd_upstream, henryc.chen,
	flora.fu, Chen Zhong, Christophe Jaillet, Arvind Yadav,
	devicetree, linux-kernel, linux-arm-kernel, linux-mediatek


[-- Attachment #1.1: Type: text/html, Size: 3222 bytes --]

[-- Attachment #1.2: Type: text/plain, Size: 2248 bytes --]

From: Argus Lin <argus.lin@mediatek.com>

MT6351 is a new power management IC and it is used for mt6797 SoCs. We
need to add mt6351_regs for pmic register mapping and pmic_mt6351 for
accessing register.

---
 drivers/soc/mediatek/mtk-pmic-wrap.c | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/drivers/soc/mediatek/mtk-pmic-wrap.c b/drivers/soc/mediatek/mtk-pmic-wrap.c
index d03e2d4..4cf9496 100644
--- a/drivers/soc/mediatek/mtk-pmic-wrap.c
+++ b/drivers/soc/mediatek/mtk-pmic-wrap.c
@@ -146,6 +146,21 @@ enum dew_regs {
 	[PWRAP_DEW_CIPHER_SWRST] =	0xbc24,
 };
 
+static const u32 mt6351_regs[] = {
+	[PWRAP_DEW_DIO_EN] =		0x02F2,
+	[PWRAP_DEW_READ_TEST] =		0x02F4,
+	[PWRAP_DEW_WRITE_TEST] =	0x02F6,
+	[PWRAP_DEW_CRC_EN] =		0x02FA,
+	[PWRAP_DEW_CRC_VAL] =		0x02FC,
+	[PWRAP_DEW_CIPHER_KEY_SEL] =	0x0300,
+	[PWRAP_DEW_CIPHER_IV_SEL] =	0x0302,
+	[PWRAP_DEW_CIPHER_EN] =		0x0304,
+	[PWRAP_DEW_CIPHER_RDY] =	0x0306,
+	[PWRAP_DEW_CIPHER_MODE] =	0x0308,
+	[PWRAP_DEW_CIPHER_SWRST] =	0x030A,
+	[PWRAP_DEW_RDDMY_NO] =		0x030C,
+};
+
 enum pwrap_regs {
 	PWRAP_MUX_SEL,
 	PWRAP_WRAP_EN,
@@ -668,6 +683,7 @@ enum pwrap_regs {
 
 enum pmic_type {
 	PMIC_MT6323,
+	PMIC_MT6351,
 	PMIC_MT6380,
 	PMIC_MT6397,
 };
@@ -1124,6 +1140,7 @@ static int pwrap_init_cipher(struct pmic_wrapper *wrp)
 			    0x1);
 		break;
 	case PMIC_MT6323:
+	case PMIC_MT6351:
 		pwrap_write(wrp, wrp->slave->dew_regs[PWRAP_DEW_CIPHER_EN],
 			    0x1);
 		break;
@@ -1400,6 +1417,15 @@ static irqreturn_t pwrap_interrupt(int irqno, void *dev_id)
 	.pwrap_write = pwrap_write16,
 };
 
+static const struct pwrap_slv_type pmic_mt6351 = {
+	.dew_regs = mt6351_regs,
+	.type = PMIC_MT6351,
+	.regmap = &pwrap_regmap_config16,
+	.caps = 0,
+	.pwrap_read = pwrap_read16,
+	.pwrap_write = pwrap_write16,
+};
+
 static const struct of_device_id of_slave_match_tbl[] = {
 	{
 		.compatible = "mediatek,mt6323",
@@ -1414,6 +1440,9 @@ static irqreturn_t pwrap_interrupt(int irqno, void *dev_id)
 		.compatible = "mediatek,mt6397",
 		.data = &pmic_mt6397,
 	}, {
+		.compatible = "mediatek,mt6351",
+		.data = &pmic_mt6351,
+	}, {
 		/* sentinel */
 	}
 };
-- 
1.8.1.1.dirty

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [PATCH V5 2/4] soc: mediatek: pwrap: fix cipher init setting error
  2018-05-10 13:01 ` [PATCH V5 2/4] soc: mediatek: pwrap: fix cipher init setting error argus.lin
@ 2018-05-11  9:26     ` Matthias Brugger
  2018-05-15  9:50     ` Matthias Brugger
  1 sibling, 0 replies; 16+ messages in thread
From: Matthias Brugger @ 2018-05-11  9:26 UTC (permalink / raw)
  To: argus.lin, Rob Herring, Mark Rutland, Catalin Marinas, Will Deacon
  Cc: Chenglin Xu, Sean Wang, wsd_upstream, henryc.chen, flora.fu,
	Chen Zhong, Christophe Jaillet, Arvind Yadav, devicetree,
	linux-kernel, linux-arm-kernel, linux-mediatek



On 05/10/2018 03:01 PM, argus.lin@mediatek.com wrote:
> From: Argus Lin <argus.lin@mediatek.com>
> 
> PWRAP_DEW_CIPHER_LOAD and PWRAP_DEW_CIPHER_START only exist at
> PMIC_mt6397 datasheet. We fix it before merge PMIC_mt6351 driver.

Please don't put info like "We fix it before merge PMIC_mt6351 driver." in the
commit message. You can see this from the git log later and it does not add any
value.

Regards,
Matthias

> 
> Fixes: 5ae48040aa47 ("soc: mediatek: PMIC wrap: add mt6323 slave support")
> ---
>  drivers/soc/mediatek/mtk-pmic-wrap.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/soc/mediatek/mtk-pmic-wrap.c b/drivers/soc/mediatek/mtk-pmic-wrap.c
> index e9e054a..9a01e30 100644
> --- a/drivers/soc/mediatek/mtk-pmic-wrap.c
> +++ b/drivers/soc/mediatek/mtk-pmic-wrap.c
> @@ -1080,8 +1080,6 @@ static int pwrap_init_cipher(struct pmic_wrapper *wrp)
>  	pwrap_write(wrp, wrp->slave->dew_regs[PWRAP_DEW_CIPHER_SWRST], 0x0);
>  	pwrap_write(wrp, wrp->slave->dew_regs[PWRAP_DEW_CIPHER_KEY_SEL], 0x1);
>  	pwrap_write(wrp, wrp->slave->dew_regs[PWRAP_DEW_CIPHER_IV_SEL], 0x2);
> -	pwrap_write(wrp, wrp->slave->dew_regs[PWRAP_DEW_CIPHER_LOAD], 0x1);
> -	pwrap_write(wrp, wrp->slave->dew_regs[PWRAP_DEW_CIPHER_START], 0x1);
>  
>  	switch (wrp->slave->type) {
>  	case PMIC_MT6397:
> -- 
> 1.8.1.1.dirty
> 
> ************* Email Confidentiality Notice ********************
> The information contained in this e-mail message (including any 
> attachments) may be confidential, proprietary, privileged, or otherwise
> exempt from disclosure under applicable laws. It is intended to be 
> conveyed only to the designated recipient(s). Any use, dissemination, 
> distribution, printing, retaining or copying of this e-mail (including its 
> attachments) by unintended recipient(s) is strictly prohibited and may 
> be unlawful. If you are not an intended recipient of this e-mail, or believe 
> that you have received this e-mail in error, please notify the sender 
> immediately (by replying to this e-mail), delete any and all copies of 
> this e-mail (including any attachments) from your system, and do not
> disclose the content of this e-mail to any other person. Thank you!
> 

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH V5 2/4] soc: mediatek: pwrap: fix cipher init setting error
@ 2018-05-11  9:26     ` Matthias Brugger
  0 siblings, 0 replies; 16+ messages in thread
From: Matthias Brugger @ 2018-05-11  9:26 UTC (permalink / raw)
  To: linux-arm-kernel



On 05/10/2018 03:01 PM, argus.lin at mediatek.com wrote:
> From: Argus Lin <argus.lin@mediatek.com>
> 
> PWRAP_DEW_CIPHER_LOAD and PWRAP_DEW_CIPHER_START only exist at
> PMIC_mt6397 datasheet. We fix it before merge PMIC_mt6351 driver.

Please don't put info like "We fix it before merge PMIC_mt6351 driver." in the
commit message. You can see this from the git log later and it does not add any
value.

Regards,
Matthias

> 
> Fixes: 5ae48040aa47 ("soc: mediatek: PMIC wrap: add mt6323 slave support")
> ---
>  drivers/soc/mediatek/mtk-pmic-wrap.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/soc/mediatek/mtk-pmic-wrap.c b/drivers/soc/mediatek/mtk-pmic-wrap.c
> index e9e054a..9a01e30 100644
> --- a/drivers/soc/mediatek/mtk-pmic-wrap.c
> +++ b/drivers/soc/mediatek/mtk-pmic-wrap.c
> @@ -1080,8 +1080,6 @@ static int pwrap_init_cipher(struct pmic_wrapper *wrp)
>  	pwrap_write(wrp, wrp->slave->dew_regs[PWRAP_DEW_CIPHER_SWRST], 0x0);
>  	pwrap_write(wrp, wrp->slave->dew_regs[PWRAP_DEW_CIPHER_KEY_SEL], 0x1);
>  	pwrap_write(wrp, wrp->slave->dew_regs[PWRAP_DEW_CIPHER_IV_SEL], 0x2);
> -	pwrap_write(wrp, wrp->slave->dew_regs[PWRAP_DEW_CIPHER_LOAD], 0x1);
> -	pwrap_write(wrp, wrp->slave->dew_regs[PWRAP_DEW_CIPHER_START], 0x1);
>  
>  	switch (wrp->slave->type) {
>  	case PMIC_MT6397:
> -- 
> 1.8.1.1.dirty
> 
> ************* Email Confidentiality Notice ********************
> The information contained in this e-mail message (including any 
> attachments) may be confidential, proprietary, privileged, or otherwise
> exempt from disclosure under applicable laws. It is intended to be 
> conveyed only to the designated recipient(s). Any use, dissemination, 
> distribution, printing, retaining or copying of this e-mail (including its 
> attachments) by unintended recipient(s) is strictly prohibited and may 
> be unlawful. If you are not an intended recipient of this e-mail, or believe 
> that you have received this e-mail in error, please notify the sender 
> immediately (by replying to this e-mail), delete any and all copies of 
> this e-mail (including any attachments) from your system, and do not
> disclose the content of this e-mail to any other person. Thank you!
> 

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH V5 1/4] dt-bindings: pwrap: mediatek: add pwrap support for MT6797
  2018-05-10 13:01 ` [PATCH V5 1/4] dt-bindings: pwrap: mediatek: add pwrap support for MT6797 argus.lin
@ 2018-05-15  9:31     ` Matthias Brugger
  0 siblings, 0 replies; 16+ messages in thread
From: Matthias Brugger @ 2018-05-15  9:31 UTC (permalink / raw)
  To: argus.lin, Rob Herring, Mark Rutland, Catalin Marinas, Will Deacon
  Cc: Chenglin Xu, Sean Wang, wsd_upstream, henryc.chen, flora.fu,
	Chen Zhong, Christophe Jaillet, Arvind Yadav, devicetree,
	linux-kernel, linux-arm-kernel, linux-mediatek



On 05/10/2018 03:01 PM, argus.lin@mediatek.com wrote:
> From: Argus Lin <argus.lin@mediatek.com>
> 
> We add pwrap support for MT6797 SoCs.
> 

You forgot the Signed-off-by tag.

> ---
>  Documentation/devicetree/bindings/soc/mediatek/pwrap.txt | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/Documentation/devicetree/bindings/soc/mediatek/pwrap.txt b/Documentation/devicetree/bindings/soc/mediatek/pwrap.txt
> index bf80e3f..f9987c3 100644
> --- a/Documentation/devicetree/bindings/soc/mediatek/pwrap.txt
> +++ b/Documentation/devicetree/bindings/soc/mediatek/pwrap.txt
> @@ -19,6 +19,7 @@ IP Pairing
>  Required properties in pwrap device node.
>  - compatible:
>  	"mediatek,mt2701-pwrap" for MT2701/7623 SoCs
> +	"mediatek,mt6797-pwrap" for MT6797 SoCs
>  	"mediatek,mt7622-pwrap" for MT7622 SoCs
>  	"mediatek,mt8135-pwrap" for MT8135 SoCs
>  	"mediatek,mt8173-pwrap" for MT8173 SoCs
> -- 
> 1.8.1.1.dirty
> 
> ************* Email Confidentiality Notice ********************
> The information contained in this e-mail message (including any 
> attachments) may be confidential, proprietary, privileged, or otherwise
> exempt from disclosure under applicable laws. It is intended to be 
> conveyed only to the designated recipient(s). Any use, dissemination, 
> distribution, printing, retaining or copying of this e-mail (including its 
> attachments) by unintended recipient(s) is strictly prohibited and may 
> be unlawful. If you are not an intended recipient of this e-mail, or believe 
> that you have received this e-mail in error, please notify the sender 
> immediately (by replying to this e-mail), delete any and all copies of 
> this e-mail (including any attachments) from your system, and do not
> disclose the content of this e-mail to any other person. Thank you!
> 

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH V5 1/4] dt-bindings: pwrap: mediatek: add pwrap support for MT6797
@ 2018-05-15  9:31     ` Matthias Brugger
  0 siblings, 0 replies; 16+ messages in thread
From: Matthias Brugger @ 2018-05-15  9:31 UTC (permalink / raw)
  To: linux-arm-kernel



On 05/10/2018 03:01 PM, argus.lin at mediatek.com wrote:
> From: Argus Lin <argus.lin@mediatek.com>
> 
> We add pwrap support for MT6797 SoCs.
> 

You forgot the Signed-off-by tag.

> ---
>  Documentation/devicetree/bindings/soc/mediatek/pwrap.txt | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/Documentation/devicetree/bindings/soc/mediatek/pwrap.txt b/Documentation/devicetree/bindings/soc/mediatek/pwrap.txt
> index bf80e3f..f9987c3 100644
> --- a/Documentation/devicetree/bindings/soc/mediatek/pwrap.txt
> +++ b/Documentation/devicetree/bindings/soc/mediatek/pwrap.txt
> @@ -19,6 +19,7 @@ IP Pairing
>  Required properties in pwrap device node.
>  - compatible:
>  	"mediatek,mt2701-pwrap" for MT2701/7623 SoCs
> +	"mediatek,mt6797-pwrap" for MT6797 SoCs
>  	"mediatek,mt7622-pwrap" for MT7622 SoCs
>  	"mediatek,mt8135-pwrap" for MT8135 SoCs
>  	"mediatek,mt8173-pwrap" for MT8173 SoCs
> -- 
> 1.8.1.1.dirty
> 
> ************* Email Confidentiality Notice ********************
> The information contained in this e-mail message (including any 
> attachments) may be confidential, proprietary, privileged, or otherwise
> exempt from disclosure under applicable laws. It is intended to be 
> conveyed only to the designated recipient(s). Any use, dissemination, 
> distribution, printing, retaining or copying of this e-mail (including its 
> attachments) by unintended recipient(s) is strictly prohibited and may 
> be unlawful. If you are not an intended recipient of this e-mail, or believe 
> that you have received this e-mail in error, please notify the sender 
> immediately (by replying to this e-mail), delete any and all copies of 
> this e-mail (including any attachments) from your system, and do not
> disclose the content of this e-mail to any other person. Thank you!
> 

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH V5 2/4] soc: mediatek: pwrap: fix cipher init setting error
  2018-05-10 13:01 ` [PATCH V5 2/4] soc: mediatek: pwrap: fix cipher init setting error argus.lin
@ 2018-05-15  9:50     ` Matthias Brugger
  2018-05-15  9:50     ` Matthias Brugger
  1 sibling, 0 replies; 16+ messages in thread
From: Matthias Brugger @ 2018-05-15  9:50 UTC (permalink / raw)
  To: argus.lin, Rob Herring, Mark Rutland, Catalin Marinas, Will Deacon
  Cc: Chenglin Xu, Sean Wang, wsd_upstream, henryc.chen, flora.fu,
	Chen Zhong, Christophe Jaillet, Arvind Yadav, devicetree,
	linux-kernel, linux-arm-kernel, linux-mediatek



On 05/10/2018 03:01 PM, argus.lin@mediatek.com wrote:
> From: Argus Lin <argus.lin@mediatek.com>
> 
> PWRAP_DEW_CIPHER_LOAD and PWRAP_DEW_CIPHER_START only exist at
> PMIC_mt6397 datasheet. We fix it before merge PMIC_mt6351 driver.
> 
> Fixes: 5ae48040aa47 ("soc: mediatek: PMIC wrap: add mt6323 slave support")

Same here, you forgot Signed-off-by tag.

> ---
>  drivers/soc/mediatek/mtk-pmic-wrap.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/soc/mediatek/mtk-pmic-wrap.c b/drivers/soc/mediatek/mtk-pmic-wrap.c
> index e9e054a..9a01e30 100644
> --- a/drivers/soc/mediatek/mtk-pmic-wrap.c
> +++ b/drivers/soc/mediatek/mtk-pmic-wrap.c
> @@ -1080,8 +1080,6 @@ static int pwrap_init_cipher(struct pmic_wrapper *wrp)
>  	pwrap_write(wrp, wrp->slave->dew_regs[PWRAP_DEW_CIPHER_SWRST], 0x0);
>  	pwrap_write(wrp, wrp->slave->dew_regs[PWRAP_DEW_CIPHER_KEY_SEL], 0x1);
>  	pwrap_write(wrp, wrp->slave->dew_regs[PWRAP_DEW_CIPHER_IV_SEL], 0x2);
> -	pwrap_write(wrp, wrp->slave->dew_regs[PWRAP_DEW_CIPHER_LOAD], 0x1);
> -	pwrap_write(wrp, wrp->slave->dew_regs[PWRAP_DEW_CIPHER_START], 0x1);
>  
>  	switch (wrp->slave->type) {
>  	case PMIC_MT6397:
> -- 
> 1.8.1.1.dirty
> 
> ************* Email Confidentiality Notice ********************
> The information contained in this e-mail message (including any 
> attachments) may be confidential, proprietary, privileged, or otherwise
> exempt from disclosure under applicable laws. It is intended to be 
> conveyed only to the designated recipient(s). Any use, dissemination, 
> distribution, printing, retaining or copying of this e-mail (including its 
> attachments) by unintended recipient(s) is strictly prohibited and may 
> be unlawful. If you are not an intended recipient of this e-mail, or believe 
> that you have received this e-mail in error, please notify the sender 
> immediately (by replying to this e-mail), delete any and all copies of 
> this e-mail (including any attachments) from your system, and do not
> disclose the content of this e-mail to any other person. Thank you!
> 

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH V5 2/4] soc: mediatek: pwrap: fix cipher init setting error
@ 2018-05-15  9:50     ` Matthias Brugger
  0 siblings, 0 replies; 16+ messages in thread
From: Matthias Brugger @ 2018-05-15  9:50 UTC (permalink / raw)
  To: linux-arm-kernel



On 05/10/2018 03:01 PM, argus.lin at mediatek.com wrote:
> From: Argus Lin <argus.lin@mediatek.com>
> 
> PWRAP_DEW_CIPHER_LOAD and PWRAP_DEW_CIPHER_START only exist at
> PMIC_mt6397 datasheet. We fix it before merge PMIC_mt6351 driver.
> 
> Fixes: 5ae48040aa47 ("soc: mediatek: PMIC wrap: add mt6323 slave support")

Same here, you forgot Signed-off-by tag.

> ---
>  drivers/soc/mediatek/mtk-pmic-wrap.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/soc/mediatek/mtk-pmic-wrap.c b/drivers/soc/mediatek/mtk-pmic-wrap.c
> index e9e054a..9a01e30 100644
> --- a/drivers/soc/mediatek/mtk-pmic-wrap.c
> +++ b/drivers/soc/mediatek/mtk-pmic-wrap.c
> @@ -1080,8 +1080,6 @@ static int pwrap_init_cipher(struct pmic_wrapper *wrp)
>  	pwrap_write(wrp, wrp->slave->dew_regs[PWRAP_DEW_CIPHER_SWRST], 0x0);
>  	pwrap_write(wrp, wrp->slave->dew_regs[PWRAP_DEW_CIPHER_KEY_SEL], 0x1);
>  	pwrap_write(wrp, wrp->slave->dew_regs[PWRAP_DEW_CIPHER_IV_SEL], 0x2);
> -	pwrap_write(wrp, wrp->slave->dew_regs[PWRAP_DEW_CIPHER_LOAD], 0x1);
> -	pwrap_write(wrp, wrp->slave->dew_regs[PWRAP_DEW_CIPHER_START], 0x1);
>  
>  	switch (wrp->slave->type) {
>  	case PMIC_MT6397:
> -- 
> 1.8.1.1.dirty
> 
> ************* Email Confidentiality Notice ********************
> The information contained in this e-mail message (including any 
> attachments) may be confidential, proprietary, privileged, or otherwise
> exempt from disclosure under applicable laws. It is intended to be 
> conveyed only to the designated recipient(s). Any use, dissemination, 
> distribution, printing, retaining or copying of this e-mail (including its 
> attachments) by unintended recipient(s) is strictly prohibited and may 
> be unlawful. If you are not an intended recipient of this e-mail, or believe 
> that you have received this e-mail in error, please notify the sender 
> immediately (by replying to this e-mail), delete any and all copies of 
> this e-mail (including any attachments) from your system, and do not
> disclose the content of this e-mail to any other person. Thank you!
> 

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH V5 3/4] soc: mediatek: pwrap: add pwrap driver for mt6797 SoCs
  2018-05-10 13:01 ` [PATCH V5 3/4] soc: mediatek: pwrap: add pwrap driver for mt6797 SoCs argus.lin
@ 2018-05-15  9:56     ` Matthias Brugger
  0 siblings, 0 replies; 16+ messages in thread
From: Matthias Brugger @ 2018-05-15  9:56 UTC (permalink / raw)
  To: argus.lin, Rob Herring, Mark Rutland, Catalin Marinas, Will Deacon
  Cc: Chenglin Xu, Sean Wang, wsd_upstream, henryc.chen, flora.fu,
	Chen Zhong, Christophe Jaillet, Arvind Yadav, devicetree,
	linux-kernel, linux-arm-kernel, linux-mediatek



On 05/10/2018 03:01 PM, argus.lin@mediatek.com wrote:
> From: Argus Lin <argus.lin@mediatek.com>
> 
> mt6797 is a highly integrated SoCs, it uses mt6351 for power management.
> We need to add pwrap driver to access mt6351. Pwrap of mt6797 support
> dynamic priority meichanism, sequence monitor and starvation mechanism
> to make transaction more reliable.
> 

This is drivers differs vastly from V4, but I can't find any explanation why.
Can you please elaborate. For the record the explanation should have been done
in the cover letter.

Thanks,
Matthias

> ---
>  drivers/soc/mediatek/mtk-pmic-wrap.c | 50 ++++++++++++++++++++++++++++++++++++
>  1 file changed, 50 insertions(+)
> 
> diff --git a/drivers/soc/mediatek/mtk-pmic-wrap.c b/drivers/soc/mediatek/mtk-pmic-wrap.c
> index 9a01e30..d03e2d4 100644
> --- a/drivers/soc/mediatek/mtk-pmic-wrap.c
> +++ b/drivers/soc/mediatek/mtk-pmic-wrap.c
> @@ -366,6 +366,39 @@ enum pwrap_regs {
>  	[PWRAP_ADC_RDATA_ADDR2] =	0x154,
>  };
>  
> +static int mt6797_regs[] = {
> +	[PWRAP_MUX_SEL] =		0x0,
> +	[PWRAP_WRAP_EN] =		0x4,
> +	[PWRAP_DIO_EN] =		0x8,
> +	[PWRAP_SIDLY] =			0xC,
> +	[PWRAP_RDDMY] =			0x10,
> +	[PWRAP_CSHEXT_WRITE] =		0x18,
> +	[PWRAP_CSHEXT_READ] =		0x1C,
> +	[PWRAP_CSLEXT_START] =		0x20,
> +	[PWRAP_CSLEXT_END] =		0x24,
> +	[PWRAP_STAUPD_PRD] =		0x28,
> +	[PWRAP_HARB_HPRIO] =		0x50,
> +	[PWRAP_HIPRIO_ARB_EN] =		0x54,
> +	[PWRAP_MAN_EN] =		0x60,
> +	[PWRAP_MAN_CMD] =		0x64,
> +	[PWRAP_WACS0_EN] =		0x70,
> +	[PWRAP_WACS1_EN] =		0x84,
> +	[PWRAP_WACS2_EN] =		0x98,
> +	[PWRAP_INIT_DONE2] =		0x9C,
> +	[PWRAP_WACS2_CMD] =		0xA0,
> +	[PWRAP_WACS2_RDATA] =		0xA4,
> +	[PWRAP_WACS2_VLDCLR] =		0xA8,
> +	[PWRAP_INT_EN] =		0xC0,
> +	[PWRAP_INT_FLG_RAW] =		0xC4,
> +	[PWRAP_INT_FLG] =		0xC8,
> +	[PWRAP_INT_CLR] =		0xCC,
> +	[PWRAP_TIMER_EN] =		0xF4,
> +	[PWRAP_WDT_UNIT] =		0xFC,
> +	[PWRAP_WDT_SRC_EN] =		0x100,
> +	[PWRAP_DCM_EN] =		0x1CC,
> +	[PWRAP_DCM_DBC_PRD] =		0x1D4,
> +};
> +
>  static int mt7622_regs[] = {
>  	[PWRAP_MUX_SEL] =		0x0,
>  	[PWRAP_WRAP_EN] =		0x4,
> @@ -641,6 +674,7 @@ enum pmic_type {
>  
>  enum pwrap_type {
>  	PWRAP_MT2701,
> +	PWRAP_MT6797,
>  	PWRAP_MT7622,
>  	PWRAP_MT8135,
>  	PWRAP_MT8173,
> @@ -1067,6 +1101,7 @@ static int pwrap_init_cipher(struct pmic_wrapper *wrp)
>  		pwrap_writel(wrp, 1, PWRAP_CIPHER_START);
>  		break;
>  	case PWRAP_MT2701:
> +	case PWRAP_MT6797:
>  	case PWRAP_MT8173:
>  		pwrap_writel(wrp, 1, PWRAP_CIPHER_EN);
>  		break;
> @@ -1396,6 +1431,18 @@ static irqreturn_t pwrap_interrupt(int irqno, void *dev_id)
>  	.init_soc_specific = pwrap_mt2701_init_soc_specific,
>  };
>  
> +static const struct pmic_wrapper_type pwrap_mt6797 = {
> +	.regs = mt6797_regs,
> +	.type = PWRAP_MT6797,
> +	.arb_en_all = 0x01fff,
> +	.int_en_all = 0xffffffc6,
> +	.spi_w = PWRAP_MAN_CMD_SPI_WRITE,
> +	.wdt_src = PWRAP_WDT_SRC_MASK_ALL,
> +	.has_bridge = 0,
> +	.init_reg_clock = pwrap_common_init_reg_clock,
> +	.init_soc_specific = NULL,
> +};
> +
>  static const struct pmic_wrapper_type pwrap_mt7622 = {
>  	.regs = mt7622_regs,
>  	.type = PWRAP_MT7622,
> @@ -1437,6 +1484,9 @@ static irqreturn_t pwrap_interrupt(int irqno, void *dev_id)
>  		.compatible = "mediatek,mt2701-pwrap",
>  		.data = &pwrap_mt2701,
>  	}, {
> +		.compatible = "mediatek,mt6797-pwrap",
> +		.data = &pwrap_mt6797,
> +	}, {
>  		.compatible = "mediatek,mt7622-pwrap",
>  		.data = &pwrap_mt7622,
>  	}, {
> -- 
> 1.8.1.1.dirty
> 
> ************* Email Confidentiality Notice
>  ********************
> The information contained in this e-mail message (including any 
> attachments) may be confidential, proprietary, privileged, or otherwise
> exempt from disclosure under applicable laws. It is intended to be 
> conveyed only to the designated recipient(s). Any use, dissemination, 
> distribution, printing, retaining or copying of this e-mail (including its 
> attachments) by unintended recipient(s) is strictly prohibited and may 
> be unlawful. If you are not an intended recipient of this e-mail, or believe
>  
> that you have received this e-mail in error, please notify the sender 
> immediately (by replying to this e-mail), delete any and all copies of 
> this e-mail (including any attachments) from your system, and do not
> disclose the content of this e-mail to any other person. Thank
>  you!
> 

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH V5 3/4] soc: mediatek: pwrap: add pwrap driver for mt6797 SoCs
@ 2018-05-15  9:56     ` Matthias Brugger
  0 siblings, 0 replies; 16+ messages in thread
From: Matthias Brugger @ 2018-05-15  9:56 UTC (permalink / raw)
  To: linux-arm-kernel



On 05/10/2018 03:01 PM, argus.lin at mediatek.com wrote:
> From: Argus Lin <argus.lin@mediatek.com>
> 
> mt6797 is a highly integrated SoCs, it uses mt6351 for power management.
> We need to add pwrap driver to access mt6351. Pwrap of mt6797 support
> dynamic priority meichanism, sequence monitor and starvation mechanism
> to make transaction more reliable.
> 

This is drivers differs vastly from V4, but I can't find any explanation why.
Can you please elaborate. For the record the explanation should have been done
in the cover letter.

Thanks,
Matthias

> ---
>  drivers/soc/mediatek/mtk-pmic-wrap.c | 50 ++++++++++++++++++++++++++++++++++++
>  1 file changed, 50 insertions(+)
> 
> diff --git a/drivers/soc/mediatek/mtk-pmic-wrap.c b/drivers/soc/mediatek/mtk-pmic-wrap.c
> index 9a01e30..d03e2d4 100644
> --- a/drivers/soc/mediatek/mtk-pmic-wrap.c
> +++ b/drivers/soc/mediatek/mtk-pmic-wrap.c
> @@ -366,6 +366,39 @@ enum pwrap_regs {
>  	[PWRAP_ADC_RDATA_ADDR2] =	0x154,
>  };
>  
> +static int mt6797_regs[] = {
> +	[PWRAP_MUX_SEL] =		0x0,
> +	[PWRAP_WRAP_EN] =		0x4,
> +	[PWRAP_DIO_EN] =		0x8,
> +	[PWRAP_SIDLY] =			0xC,
> +	[PWRAP_RDDMY] =			0x10,
> +	[PWRAP_CSHEXT_WRITE] =		0x18,
> +	[PWRAP_CSHEXT_READ] =		0x1C,
> +	[PWRAP_CSLEXT_START] =		0x20,
> +	[PWRAP_CSLEXT_END] =		0x24,
> +	[PWRAP_STAUPD_PRD] =		0x28,
> +	[PWRAP_HARB_HPRIO] =		0x50,
> +	[PWRAP_HIPRIO_ARB_EN] =		0x54,
> +	[PWRAP_MAN_EN] =		0x60,
> +	[PWRAP_MAN_CMD] =		0x64,
> +	[PWRAP_WACS0_EN] =		0x70,
> +	[PWRAP_WACS1_EN] =		0x84,
> +	[PWRAP_WACS2_EN] =		0x98,
> +	[PWRAP_INIT_DONE2] =		0x9C,
> +	[PWRAP_WACS2_CMD] =		0xA0,
> +	[PWRAP_WACS2_RDATA] =		0xA4,
> +	[PWRAP_WACS2_VLDCLR] =		0xA8,
> +	[PWRAP_INT_EN] =		0xC0,
> +	[PWRAP_INT_FLG_RAW] =		0xC4,
> +	[PWRAP_INT_FLG] =		0xC8,
> +	[PWRAP_INT_CLR] =		0xCC,
> +	[PWRAP_TIMER_EN] =		0xF4,
> +	[PWRAP_WDT_UNIT] =		0xFC,
> +	[PWRAP_WDT_SRC_EN] =		0x100,
> +	[PWRAP_DCM_EN] =		0x1CC,
> +	[PWRAP_DCM_DBC_PRD] =		0x1D4,
> +};
> +
>  static int mt7622_regs[] = {
>  	[PWRAP_MUX_SEL] =		0x0,
>  	[PWRAP_WRAP_EN] =		0x4,
> @@ -641,6 +674,7 @@ enum pmic_type {
>  
>  enum pwrap_type {
>  	PWRAP_MT2701,
> +	PWRAP_MT6797,
>  	PWRAP_MT7622,
>  	PWRAP_MT8135,
>  	PWRAP_MT8173,
> @@ -1067,6 +1101,7 @@ static int pwrap_init_cipher(struct pmic_wrapper *wrp)
>  		pwrap_writel(wrp, 1, PWRAP_CIPHER_START);
>  		break;
>  	case PWRAP_MT2701:
> +	case PWRAP_MT6797:
>  	case PWRAP_MT8173:
>  		pwrap_writel(wrp, 1, PWRAP_CIPHER_EN);
>  		break;
> @@ -1396,6 +1431,18 @@ static irqreturn_t pwrap_interrupt(int irqno, void *dev_id)
>  	.init_soc_specific = pwrap_mt2701_init_soc_specific,
>  };
>  
> +static const struct pmic_wrapper_type pwrap_mt6797 = {
> +	.regs = mt6797_regs,
> +	.type = PWRAP_MT6797,
> +	.arb_en_all = 0x01fff,
> +	.int_en_all = 0xffffffc6,
> +	.spi_w = PWRAP_MAN_CMD_SPI_WRITE,
> +	.wdt_src = PWRAP_WDT_SRC_MASK_ALL,
> +	.has_bridge = 0,
> +	.init_reg_clock = pwrap_common_init_reg_clock,
> +	.init_soc_specific = NULL,
> +};
> +
>  static const struct pmic_wrapper_type pwrap_mt7622 = {
>  	.regs = mt7622_regs,
>  	.type = PWRAP_MT7622,
> @@ -1437,6 +1484,9 @@ static irqreturn_t pwrap_interrupt(int irqno, void *dev_id)
>  		.compatible = "mediatek,mt2701-pwrap",
>  		.data = &pwrap_mt2701,
>  	}, {
> +		.compatible = "mediatek,mt6797-pwrap",
> +		.data = &pwrap_mt6797,
> +	}, {
>  		.compatible = "mediatek,mt7622-pwrap",
>  		.data = &pwrap_mt7622,
>  	}, {
> -- 
> 1.8.1.1.dirty
> 
> ************* Email Confidentiality Notice
>  ********************
> The information contained in this e-mail message (including any 
> attachments) may be confidential, proprietary, privileged, or otherwise
> exempt from disclosure under applicable laws. It is intended to be 
> conveyed only to the designated recipient(s). Any use, dissemination, 
> distribution, printing, retaining or copying of this e-mail (including its 
> attachments) by unintended recipient(s) is strictly prohibited and may 
> be unlawful. If you are not an intended recipient of this e-mail, or believe
>  
> that you have received this e-mail in error, please notify the sender 
> immediately (by replying to this e-mail), delete any and all copies of 
> this e-mail (including any attachments) from your system, and do not
> disclose the content of this e-mail to any other person. Thank
>  you!
> 

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH V5 1/4] dt-bindings: pwrap: mediatek: add pwrap support for MT6797
       [not found] ` <1528714200-2500-1-git-send-email-argus.lin-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
@ 2018-06-11 10:49   ` argus.lin-NuS5LvNUpcJWk0Htik3J/w
  0 siblings, 0 replies; 16+ messages in thread
From: argus.lin-NuS5LvNUpcJWk0Htik3J/w @ 2018-06-11 10:49 UTC (permalink / raw)
  To: argus.lin-NuS5LvNUpcJWk0Htik3J/w
  Cc: linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

From: Argus Lin <argus.lin-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>

Add binding document of pwrap for MT6797 SoCs.

Signed-off-by: Argus Lin <argus.lin-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
---
 Documentation/devicetree/bindings/soc/mediatek/pwrap.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/soc/mediatek/pwrap.txt b/Documentation/devicetree/bindings/soc/mediatek/pwrap.txt
index bf80e3f..f9987c3 100644
--- a/Documentation/devicetree/bindings/soc/mediatek/pwrap.txt
+++ b/Documentation/devicetree/bindings/soc/mediatek/pwrap.txt
@@ -19,6 +19,7 @@ IP Pairing
 Required properties in pwrap device node.
 - compatible:
 	"mediatek,mt2701-pwrap" for MT2701/7623 SoCs
+	"mediatek,mt6797-pwrap" for MT6797 SoCs
 	"mediatek,mt7622-pwrap" for MT7622 SoCs
 	"mediatek,mt8135-pwrap" for MT8135 SoCs
 	"mediatek,mt8173-pwrap" for MT8173 SoCs
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH V5 1/4] dt-bindings: pwrap: mediatek: add pwrap support for MT6797
  2018-06-08  8:17 [PATCH V5 0/4] Pwrap: Mediatek pwrap driver for mt6797 Argus Lin
@ 2018-06-08  8:17 ` Argus Lin
  0 siblings, 0 replies; 16+ messages in thread
From: Argus Lin @ 2018-06-08  8:17 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland, Matthias Brugger, Catalin Marinas,
	Will Deacon
  Cc: Chenglin Xu, argus.lin, Sean Wang  <sean.wang@mediatek.com>,
	<wsd_upstream@mediatek.com>,,
	flora.fu, Chen Zhong, Christophe Jaillet, Arvind Yadav,
	devicetree, linux-kernel, linux-arm-kernel, linux-mediatek


[-- Attachment #1.1: Type: text/html, Size: 1801 bytes --]

[-- Attachment #1.2: Type: text/plain, Size: 825 bytes --]

Add binding document of pwrap for MT6797 SoCs.

Signed-off-by: Argus Lin <argus.lin@mediatek.com>
---
 Documentation/devicetree/bindings/soc/mediatek/pwrap.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/soc/mediatek/pwrap.txt b/Documentation/devicetree/bindings/soc/mediatek/pwrap.txt
index bf80e3f..f9987c3 100644
--- a/Documentation/devicetree/bindings/soc/mediatek/pwrap.txt
+++ b/Documentation/devicetree/bindings/soc/mediatek/pwrap.txt
@@ -19,6 +19,7 @@ IP Pairing
 Required properties in pwrap device node.
 - compatible:
 	"mediatek,mt2701-pwrap" for MT2701/7623 SoCs
+	"mediatek,mt6797-pwrap" for MT6797 SoCs
 	"mediatek,mt7622-pwrap" for MT7622 SoCs
 	"mediatek,mt8135-pwrap" for MT8135 SoCs
 	"mediatek,mt8173-pwrap" for MT8173 SoCs
-- 
1.8.1.1.dirty

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH V5 1/4] dt-bindings: pwrap: mediatek: add pwrap support for MT6797
  2018-06-08  7:39 [PATCH V5 0/4] Pwrap: Mediatek pwrap driver for mt6797 Argus Lin
@ 2018-06-08  7:39 ` Argus Lin
  0 siblings, 0 replies; 16+ messages in thread
From: Argus Lin @ 2018-06-08  7:39 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland, Matthias Brugger, Catalin Marinas,
	Will Deacon
  Cc: Chenglin Xu, argus.lin, Sean Wang, wsd_upstream, henryc.chen,
	flora.fu, Chen Zhong, Christophe Jaillet, Arvind Yadav,
	devicetree, linux-kernel, linux-arm-kernel, linux-mediatek


[-- Attachment #1.1: Type: text/html, Size: 1801 bytes --]

[-- Attachment #1.2: Type: text/plain, Size: 825 bytes --]

Add binding document of pwrap for MT6797 SoCs.

Signed-off-by: Argus Lin <argus.lin@mediatek.com>
---
 Documentation/devicetree/bindings/soc/mediatek/pwrap.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/soc/mediatek/pwrap.txt b/Documentation/devicetree/bindings/soc/mediatek/pwrap.txt
index bf80e3f..f9987c3 100644
--- a/Documentation/devicetree/bindings/soc/mediatek/pwrap.txt
+++ b/Documentation/devicetree/bindings/soc/mediatek/pwrap.txt
@@ -19,6 +19,7 @@ IP Pairing
 Required properties in pwrap device node.
 - compatible:
 	"mediatek,mt2701-pwrap" for MT2701/7623 SoCs
+	"mediatek,mt6797-pwrap" for MT6797 SoCs
 	"mediatek,mt7622-pwrap" for MT7622 SoCs
 	"mediatek,mt8135-pwrap" for MT8135 SoCs
 	"mediatek,mt8173-pwrap" for MT8173 SoCs
-- 
1.8.1.1.dirty

^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2018-06-11 10:49 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-10 13:01 [PATCH V5 0/4] Pwrap: Mediatek pwrap driver for mt6797 argus.lin
2018-05-10 13:01 ` [PATCH V5 1/4] dt-bindings: pwrap: mediatek: add pwrap support for MT6797 argus.lin
2018-05-15  9:31   ` Matthias Brugger
2018-05-15  9:31     ` Matthias Brugger
2018-05-10 13:01 ` [PATCH V5 2/4] soc: mediatek: pwrap: fix cipher init setting error argus.lin
2018-05-11  9:26   ` Matthias Brugger
2018-05-11  9:26     ` Matthias Brugger
2018-05-15  9:50   ` Matthias Brugger
2018-05-15  9:50     ` Matthias Brugger
2018-05-10 13:01 ` [PATCH V5 3/4] soc: mediatek: pwrap: add pwrap driver for mt6797 SoCs argus.lin
2018-05-15  9:56   ` Matthias Brugger
2018-05-15  9:56     ` Matthias Brugger
2018-05-10 13:01 ` [PATCH V5 4/4] soc: mediatek: pwrap: add mt6351 " argus.lin
2018-06-08  7:39 [PATCH V5 0/4] Pwrap: Mediatek pwrap driver for mt6797 Argus Lin
2018-06-08  7:39 ` [PATCH V5 1/4] dt-bindings: pwrap: mediatek: add pwrap support for MT6797 Argus Lin
2018-06-08  8:17 [PATCH V5 0/4] Pwrap: Mediatek pwrap driver for mt6797 Argus Lin
2018-06-08  8:17 ` [PATCH V5 1/4] dt-bindings: pwrap: mediatek: add pwrap support for MT6797 Argus Lin
2018-06-11 10:49 [PATCH V5 0/4] Pwrap: Mediatek pwrap driver for mt6797 argus.lin-NuS5LvNUpcJWk0Htik3J/w
     [not found] ` <1528714200-2500-1-git-send-email-argus.lin-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
2018-06-11 10:49   ` [PATCH V5 1/4] dt-bindings: pwrap: mediatek: add pwrap support for MT6797 argus.lin-NuS5LvNUpcJWk0Htik3J/w

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.