[PATCH v3 09/10] rtc: mt6397: fix alarm register overwrite

2019-05-03 Thread Hsin-Hsiung Wang
From: Ran Bi Alarm registers high byte was reserved for other functions. This add mask in alarm registers operation functions. This also fix error condition in interrupt handler. Fixes: fc2979118f3f ("rtc: mediatek: Add MT6397 RTC driver") Signed-off-by: Ran Bi --- drivers/rtc/rtc-mt6397.c |

[PATCH v3 07/10] regulator: mt6358: Add support for MT6358 regulator

2019-05-03 Thread Hsin-Hsiung Wang
The MT6358 is a regulator found on boards based on MediaTek MT8183 and probably other SoCs. It is a so called pmic and connects as a slave to SoC using SPI, wrapped inside the pmic-wrapper. Signed-off-by: Hsin-Hsiung Wang --- drivers/regulator/Kconfig | 9 + drivers/regulator

[PATCH v3 06/10] mfd: Add support for the MediaTek MT6358 PMIC

2019-05-03 Thread Hsin-Hsiung Wang
the pwrap. Signed-off-by: Hsin-Hsiung Wang --- drivers/mfd/Makefile | 3 +- drivers/mfd/mt6358-irq.c | 229 ++ drivers/mfd/mt6397-core.c| 64 +- include/linux/mfd/mt6358/core.h | 158 +++ include/linux/mfd/mt6358

[PATCH v3 10/10] rtc: Add support for the MediaTek MT6358 RTC

2019-05-03 Thread Hsin-Hsiung Wang
From: Ran Bi This add support for the MediaTek MT6358 RTC. Driver using compatible data to store different RTC_WRTGR address offset. Signed-off-by: Ran Bi --- drivers/rtc/rtc-mt6397.c | 43 1 file changed, 35 insertions(+), 8 deletions(-) diff --git a/

[PATCH v3 00/10] Add Support for MediaTek PMIC MT6358

2019-05-03 Thread Hsin-Hsiung Wang
. - some minor bug fix of mfd driver, like adding IRQCHIP_SKIP_SET_WAKE flag. - remove unused MT6358 register. - merge the same voltage table and remove unused chip id in the MT6358 regulator driver. Hsin-Hsiung Wang (8): mfd: mt6397: clean up code mfd: mt6397: extract irq related code from

[PATCH v3 04/10] dt-bindings: mfd: Add compatible for the MediaTek MT6358 PMIC

2019-05-03 Thread Hsin-Hsiung Wang
This adds compatible for the MediaTek MT6358 PMIC. Acked-for-MFD-by: Lee Jones Signed-off-by: Hsin-Hsiung Wang --- Documentation/devicetree/bindings/mfd/mt6397.txt | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Documentation/devicetree/bindings/mfd/mt6397.txt

[PATCH v3 03/10] mfd: mt6397: modify suspend/resume behavior

2019-05-03 Thread Hsin-Hsiung Wang
Some pmics don't need backup interrupt settings, so we change to use pm notifier for the pmics which are necessary to store settings. Signed-off-by: Hsin-Hsiung Wang --- drivers/mfd/mt6397-core.c | 89 ++--- drivers/mfd/mt6397-irq.c

[PATCH v2 1/9] mfd: mt6397: clean up code

2019-03-10 Thread Hsin-Hsiung Wang
clean up code Signed-off-by: Hsin-Hsiung Wang --- drivers/mfd/mt6397-core.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/mfd/mt6397-core.c b/drivers/mfd/mt6397-core.c index 77b64bd..acb9812 100644 --- a/drivers/mfd/mt6397-core.c +++ b/drivers/mfd

[PATCH v2 4/9] regulator: Add document for MT6358 regulator

2019-03-10 Thread Hsin-Hsiung Wang
add dt-binding document for MediaTek MT6358 PMIC Signed-off-by: Hsin-Hsiung Wang --- .../bindings/regulator/mt6358-regulator.txt| 318 + 1 file changed, 318 insertions(+) create mode 100644 Documentation/devicetree/bindings/regulator/mt6358-regulator.txt diff

[PATCH v2 5/9] mfd: Add support for the MediaTek MT6358 PMIC

2019-03-10 Thread Hsin-Hsiung Wang
the pwrap. Signed-off-by: Hsin-Hsiung Wang --- drivers/mfd/Makefile |2 +- drivers/mfd/mt6358-irq.c | 236 + drivers/mfd/mt6397-core.c| 63 +- include/linux/mfd/mt6358/core.h | 158 +++ include/linux/mfd/mt6358/registers.h | 1926

[PATCH v2 2/9] mfd: mt6397: extract irq related code from core driver

2019-03-10 Thread Hsin-Hsiung Wang
In order to support different types of irq design, we decide to add separate irq drivers for different design and keep mt6397 mfd core simple and reusable to all generations of PMICs so far. Signed-off-by: Hsin-Hsiung Wang --- drivers/mfd/Makefile| 2 +- drivers/mfd/mt6397-core.c

[PATCH v2 9/9] rtc: Add support for the MediaTek MT6358 RTC

2019-03-10 Thread Hsin-Hsiung Wang
From: Ran Bi This add support for the MediaTek MT6358 RTC. MT6397 mfd will pass RTC_WRTGR address offset to RTC driver. Signed-off-by: Ran Bi --- drivers/rtc/rtc-mt6397.c | 16 ++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/drivers/rtc/rtc-mt6397.c b/drivers/rt

[PATCH v2 6/9] regulator: mt6358: Add support for MT6358 regulator

2019-03-10 Thread Hsin-Hsiung Wang
The MT6358 is a regulator found on boards based on MediaTek MT8183 and probably other SoCs. It is a so called pmic and connects as a slave to SoC using SPI, wrapped inside the pmic-wrapper. Signed-off-by: Hsin-Hsiung Wang --- drivers/regulator/Kconfig | 9 + drivers/regulator

[PATCH v2 0/9] Add Support for MediaTek PMIC MT6358

2019-03-10 Thread Hsin-Hsiung Wang
. - add support for the MediaTek MT6358 RTC. Hsin-Hsiung Wang (7): mfd: mt6397: clean up code mfd: mt6397: extract irq related code from core driver dt-bindings: mfd: Add compatible for the MediaTek MT6358 PMIC regulator: Add document for MT6358 regulator mfd: Add support for the MediaTek

[PATCH v2 8/9] rtc: mt6397: fix alarm register overwrite

2019-03-10 Thread Hsin-Hsiung Wang
From: Ran Bi Alarm registers high byte was reserved for other functions. This add mask in alarm registers operation functions. This also fix error condition in interrupt handler. Fixes: fc2979118f3f ("rtc: mediatek: Add MT6397 RTC driver") Signed-off-by: Ran Bi --- drivers/rtc/rtc-mt6397.c |

[PATCH v2 3/9] dt-bindings: mfd: Add compatible for the MediaTek MT6358 PMIC

2019-03-10 Thread Hsin-Hsiung Wang
This adds compatible for the MediaTek MT6358 PMIC. Signed-off-by: Hsin-Hsiung Wang --- Documentation/devicetree/bindings/mfd/mt6397.txt | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Documentation/devicetree/bindings/mfd/mt6397.txt b/Documentation/devicetree

[PATCH v2 7/9] arm64: dts: mt6358: add PMIC MT6358 related nodes

2019-03-10 Thread Hsin-Hsiung Wang
add PMIC MT6358 related nodes which is for mt8183 platform Signed-off-by: Hsin-Hsiung Wang --- arch/arm64/boot/dts/mediatek/mt6358.dtsi | 318 +++ 1 file changed, 318 insertions(+) create mode 100644 arch/arm64/boot/dts/mediatek/mt6358.dtsi diff --git a/arch/arm64

Re: [PATCH 5/6] regulator: mt6358: Add support for MT6358 regulator

2019-01-31 Thread Hsin-hsiung Wang
Hi Mark, On Wed, 2019-01-30 at 15:18 +, Mark Brown wrote: > On Wed, Jan 30, 2019 at 05:18:10PM +0800, Hsin-Hsiung Wang wrote: > > > +static const struct of_device_id mt6358_of_match[] = { > > + { .compatible = "mediatek,mt6358-regulator&quo

Re: [PATCH 4/6] mfd: Add support for the MediaTek MT6358 PMIC

2019-01-31 Thread Hsin-hsiung Wang
Hi Pi-Hsun, On Thu, 2019-01-31 at 11:56 +0800, Pi-Hsun Shih wrote: > On Wed, Jan 30, 2019 at 5:19 PM Hsin-Hsiung Wang > wrote: > > > > This adds support for the MediaTek MT6358 PMIC. This is a > > multifunction device with the following sub modules: > > > &g

[PATCH 0/6] Add Support for MediaTek PMIC MT6358 MFD Core and Regulator

2019-01-30 Thread Hsin-Hsiung Wang
This patchset including refactoring interrupt add support to MT6358 PMIC. MT6358 is the primary PMIC for MT8183 platform. Hsin-Hsiung Wang (6): mfd: mt6397: extract irq related code from core driver dt-bindings: mfd: Add compatible for the MediaTek MT6358 PMIC regulator: Add document for

[PATCH 1/6] mfd: mt6397: extract irq related code from core driver

2019-01-30 Thread Hsin-Hsiung Wang
In order to support different types of irq design, we decide to add separate irq drivers for different design and keep mt6397 mfd core simple and reusable to all generations of PMICs so far. Signed-off-by: Hsin-Hsiung Wang --- drivers/mfd/Makefile| 2 +- drivers/mfd/mt6397-core.c

[PATCH 3/6] regulator: Add document for MT6358 regulator

2019-01-30 Thread Hsin-Hsiung Wang
add dt-binding document for MediaTek MT6358 PMIC Signed-off-by: Hsin-Hsiung Wang --- .../bindings/regulator/mt6358-regulator.txt| 318 + 1 file changed, 318 insertions(+) create mode 100644 Documentation/devicetree/bindings/regulator/mt6358-regulator.txt diff

[PATCH 2/6] dt-bindings: mfd: Add compatible for the MediaTek MT6358 PMIC

2019-01-30 Thread Hsin-Hsiung Wang
This adds compatible for the MediaTek MT6358 PMIC. Signed-off-by: Hsin-Hsiung Wang --- Documentation/devicetree/bindings/mfd/mt6397.txt | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/mfd/mt6397.txt b/Documentation/devicetree

[PATCH 5/6] regulator: mt6358: Add support for MT6358 regulator

2019-01-30 Thread Hsin-Hsiung Wang
The MT6358 is a regulator found on boards based on MediaTek MT8183 and probably other SoCs. It is a so called pmic and connects as a slave to SoC using SPI, wrapped inside the pmic-wrapper. Signed-off-by: Hsin-Hsiung Wang --- drivers/regulator/Kconfig | 9 + drivers/regulator

[PATCH 4/6] mfd: Add support for the MediaTek MT6358 PMIC

2019-01-30 Thread Hsin-Hsiung Wang
the pwrap. Signed-off-by: Hsin-Hsiung Wang --- drivers/mfd/Makefile |2 +- drivers/mfd/mt6358-irq.c | 236 + drivers/mfd/mt6397-core.c| 62 +- include/linux/mfd/mt6358/core.h | 158 +++ include/linux/mfd/mt6358/registers.h | 1926

[PATCH 6/6] arm64: dts: mt6358: add PMIC MT6358 related nodes

2019-01-30 Thread Hsin-Hsiung Wang
add PMIC MT6358 related nodes which is for MT8183 platform Signed-off-by: Hsin-Hsiung Wang --- arch/arm64/boot/dts/mediatek/mt6358.dtsi | 318 +++ 1 file changed, 318 insertions(+) create mode 100644 arch/arm64/boot/dts/mediatek/mt6358.dtsi diff --git a/arch/arm64

[PATCH 3/4] soc: mediatek: add mt8183 pwrap support

2018-09-19 Thread Hsin-Hsiung Wang
MT6358 is a new power management IC and it is used for mt8183 SoCs. To define mt6358_regs for pmic register mapping and pmic_mt6358 for accessing register. Adding one more interrupt and wdt source. Signed-off-by: Hsin-Hsiung Wang --- drivers/soc/mediatek/mtk-pmic-wrap.c | 195

[PATCH 1/4] dt-bindings: mediatek: add compatible for mt8183 pwrap

2018-09-19 Thread Hsin-Hsiung Wang
This adds dt-binding documentation of pwrap for Mediatek MT8183 SoC Platform. Signed-off-by: Hsin-Hsiung Wang --- Documentation/devicetree/bindings/soc/mediatek/pwrap.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/soc/mediatek/pwrap.txt b

[PATCH 0/4] Add PMIC wrapper support for Mediatek MT8183 SoC IC

2018-09-19 Thread Hsin-Hsiung Wang
This series adds support for a new PMIC MT6358 and a new SoC MT8183 to the pmic-wrap driver. Hsin-Hsiung Wang (4): dt-bindings: mediatek: add compatible for mt8183 pwrap soc: mediatek: use group of bits for pwrap capability soc: mediatek: add mt8183 pwrap support arm64: dts: mediatek: add

[PATCH 2/4] soc: mediatek: use group of bits for pwrap capability

2018-09-19 Thread Hsin-Hsiung Wang
Use group of bits for pwrap capability instead of elements of structure. This patch is preparing for adding mt8183 pwrap support. Signed-off-by: Hsin-Hsiung Wang --- drivers/soc/mediatek/mtk-pmic-wrap.c | 248 ++- 1 file changed, 129 insertions(+), 119 deletions

[PATCH 4/4] arm64: dts: mediatek: add pwrap device node for mt8183

2018-09-19 Thread Hsin-Hsiung Wang
add pwrap device node for mt8183. Signed-off-by: Hsin-Hsiung Wang --- arch/arm64/boot/dts/mediatek/mt8183.dtsi | 10 ++ 1 file changed, 10 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8183.dtsi b/arch/arm64/boot/dts/mediatek/mt8183.dtsi index c22a2dc..fa67d781 100644

<    1   2   3