[PATCH v4 6/9] regulator: mt6359: Add support for MT6359 regulator

2020-12-15 Thread Hsin-Hsiung Wang
From: Wen Su The MT6359 is a regulator found on boards based on MediaTek MT6779 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: Wen Su Signed-off-by: Hsin-Hsiung Wang --- drivers/regulator/Kconfig

Re: [PATCH v3 5/8] regulator: mt6359: Add support for MT6359 regulator

2020-12-15 Thread Hsin-hsiung Wang
Hi, On Tue, 2020-11-24 at 17:07 +, Mark Brown wrote: > On Mon, Nov 23, 2020 at 11:48:07AM +0800, Hsin-Hsiung Wang wrote: > > > +static int mt6359_get_linear_voltage_sel(struct regulator_dev *rdev) > > +{ > > + struct mt6359_regulator_info *info = rdev_get_drvdat

[PATCH v3 2/8] dt-bindings: mfd: Add compatible for the MediaTek MT6359 PMIC

2020-11-22 Thread Hsin-Hsiung Wang
This adds compatible for the MediaTek MT6359 PMIC. Signed-off-by: Hsin-Hsiung Wang Reviewed-by: Rob Herring Acked-for-MFD-by: Lee Jones --- Documentation/devicetree/bindings/mfd/mt6397.txt | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree

[PATCH v3 0/8] Add Support for MediaTek PMIC MT6359

2020-11-22 Thread Hsin-Hsiung Wang
schema format. - remove unused compatible name. - update correct registers for VBBCK and VA09. Hsin-Hsiung Wang (6): mfd: mt6358: refine interrupt code dt-bindings: mfd: Add compatible for the MediaTek MT6359 PMIC dt-bindings: regulator: Add document for MT6359 regulator mfd: Add support for

[PATCH v3 8/8] arm64: dts: mt6359: add PMIC MT6359 related nodes

2020-11-22 Thread Hsin-Hsiung Wang
From: Wen Su add PMIC MT6359 related nodes which is for MT6779 platform Signed-off-by: Wen Su Signed-off-by: Hsin-Hsiung Wang --- arch/arm64/boot/dts/mediatek/mt6359.dtsi | 295 +++ 1 file changed, 295 insertions(+) create mode 100644 arch/arm64/boot/dts/mediatek/mt6359

[PATCH v3 6/8] regulator: mt6359: Set the enable time for LDOs

2020-11-22 Thread Hsin-Hsiung Wang
Add the enable time for LDOs. This patch is preparing for adding mt6359p regulator support. Signed-off-by: Hsin-Hsiung Wang Acked-by: Mark Brown --- drivers/regulator/mt6359-regulator.c | 65 ++-- 1 file changed, 42 insertions(+), 23 deletions(-) diff --git a/drivers

[PATCH v3 3/8] dt-bindings: regulator: Add document for MT6359 regulator

2020-11-22 Thread Hsin-Hsiung Wang
add dt-binding document for MediaTek MT6359 PMIC Signed-off-by: Hsin-Hsiung Wang --- .../bindings/regulator/mt6359-regulator.yaml | 145 ++ 1 file changed, 145 insertions(+) create mode 100644 Documentation/devicetree/bindings/regulator/mt6359-regulator.yaml diff --git a

[PATCH v3 4/8] mfd: Add support for the MediaTek MT6359 PMIC

2020-11-22 Thread Hsin-Hsiung Wang
pwrap. Signed-off-by: Hsin-Hsiung Wang Acked-for-MFD-by: Lee Jones --- drivers/mfd/mt6358-irq.c | 24 ++ drivers/mfd/mt6397-core.c| 23 ++ include/linux/mfd/mt6359/core.h | 133 +++ include/linux/mfd/mt6359/registers.h | 529 +++ include

[PATCH v3 7/8] regulator: mt6359: Add support for MT6359P regulator

2020-11-22 Thread Hsin-Hsiung Wang
The MT6359P is a eco version for MT6359 regulator. We add support based on MT6359 regulator driver. Signed-off-by: Hsin-Hsiung Wang --- drivers/regulator/mt6359-regulator.c | 413 - include/linux/mfd/mt6359p/registers.h | 249 + include/linux/regulator

[PATCH v3 5/8] regulator: mt6359: Add support for MT6359 regulator

2020-11-22 Thread Hsin-Hsiung Wang
From: Wen Su The MT6359 is a regulator found on boards based on MediaTek MT6779 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: Wen Su Signed-off-by: Hsin-Hsiung Wang Acked-by: Mark Brown --- drivers

[PATCH v3 1/8] mfd: mt6358: refine interrupt code

2020-11-22 Thread Hsin-Hsiung Wang
This patch refines the interrupt related code to support new chips. Signed-off-by: Hsin-Hsiung Wang --- drivers/mfd/mt6358-irq.c| 65 +++-- include/linux/mfd/mt6358/core.h | 8 ++-- 2 files changed, 41 insertions(+), 32 deletions(-) diff --git a/drivers/mfd

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

2019-08-28 Thread Hsin-hsiung Wang
Hi Matthias, On Fri, 2019-08-23 at 17:35 +0200, Matthias Brugger wrote: > > On 23/08/2019 05:45, Hsin-Hsiung Wang wrote: > > From: Ran Bi > > > > Alarm registers high byte was reserved for other functions. > > This add mask in alarm registers operation func

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

2019-08-28 Thread Hsin-hsiung Wang
Hi Mark, On Wed, 2019-08-28 at 11:45 +0100, Mark Brown wrote: > On Fri, Aug 23, 2019 at 11:45:28AM +0800, Hsin-Hsiung Wang wrote: > > 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 &g

Re: Aw: Re: [BUG] [PATCH v5 02/10] mfd: mt6397: extract irq related code from core driver

2019-08-28 Thread Hsin-hsiung Wang
Hi Frank/Matthias, On Fri, 2019-08-23 at 19:16 +0200, Frank Wunderlich wrote: > > Gesendet: Freitag, 23. August 2019 um 17:42 Uhr > > Von: "Matthias Brugger" > > > I suppose that's because 3/10 has code that should be in 2/10 and for some > > reason 3/10 was not pushed for linux-next inclusion.

[PATCH] arm64: dts: mt8183: fix pwrap gic number

2019-08-22 Thread Hsin-Hsiung Wang
The correct gic number of pwrap is 185 instead of 209. This patch fixes it to avoid triggering error interrupt. Fixes: e526c9bc11f8 ("arm64: dts: Add Mediatek SoC MT8183 and evaluation board dts and Makefile") Signed-off-by: Hsin-Hsiung Wang --- arch/arm64/boot/dts/mediatek/mt818

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

2019-08-22 Thread Hsin-hsiung Wang
Hi, On Mon, 2019-08-12 at 11:59 +0100, Lee Jones wrote: > On Mon, 05 Aug 2019, Hsin-Hsiung Wang wrote: > > > This adds support for the MediaTek MT6358 PMIC. This is a > > multifunction device with the following sub modules: > > > > - Regulator > > - RTC >

[PATCH v5 08/10] arm64: dts: mt6358: add PMIC MT6358 related nodes

2019-08-22 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 | 361 +++ 1 file changed, 361 insertions(+) create mode 100644 arch/arm64/boot/dts/mediatek/mt6358.dtsi diff --git a/arch/arm64

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

2019-08-22 Thread Hsin-Hsiung Wang
the pwrap. Signed-off-by: Hsin-Hsiung Wang --- drivers/mfd/Makefile | 3 +- drivers/mfd/mt6358-irq.c | 231 drivers/mfd/mt6397-core.c| 52 ++- include/linux/mfd/mt6358/core.h | 158 include

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

2019-08-22 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 | 38 ++ 1 file changed, 30 insertions(+), 8 deletions(-) diff --git a/dr

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

2019-08-22 Thread Hsin-Hsiung Wang
This adds compatible for the MediaTek MT6358 PMIC. Acked-for-mfd-by: Lee Jones Reviewed-by: Rob Herring 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

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

2019-08-22 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 v5 02/10] mfd: mt6397: extract irq related code from core driver

2019-08-22 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. Acked-for-mfd-by: Lee Jones Signed-off-by: Hsin-Hsiung Wang --- drivers/mfd/Makefile| 3

[PATCH v5 01/10] mfd: mt6397: clean up code

2019-08-22 Thread Hsin-Hsiung Wang
refine some variable name for more readable Acked-for-mfd-by: Lee Jones 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 337bccc

[PATCH v5 05/10] regulator: Add document for MT6358 regulator

2019-08-22 Thread Hsin-Hsiung Wang
add dt-binding document for MediaTek MT6358 PMIC Reviewed-by: Rob Herring Signed-off-by: Hsin-Hsiung Wang --- .../bindings/regulator/mt6358-regulator.txt| 358 + 1 file changed, 358 insertions(+) create mode 100644 Documentation/devicetree/bindings/regulator

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

2019-08-22 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") Acked-by: Alexandre Belloni Signed-off-by: Ran Bi ---

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

2019-08-22 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. Acked-for-mfd-by: Lee Jones Signed-off-by: Hsin-Hsiung Wang --- drivers/mfd/mt6397-core.c | 89 + driver

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

2019-08-22 Thread Hsin-Hsiung Wang
driver. - remove regulator-always-on for vemc. - change mtk rtc struct and variable naming. - use of_device_get_match_data() to replace of_match_device() for rtc driver. Hsin-Hsiung Wang (8): mfd: mt6397: clean up code mfd: mt6397: extract irq related code from core driver mfd: mt6397: modify

Re: Aw: Re: [PATCH] mfd: mt6397: fix probe after changing mt6397-core

2019-10-06 Thread Hsin-hsiung Wang
On Sat, 2019-10-05 at 10:16 +0200, Matthias Brugger wrote: > > On 04/10/2019 17:51, Frank Wunderlich wrote: > > This Question goes to Hsin-Hsiung Wang ;) > > > > i only took his code (and splitted the 3rd part) to get mt6323 working > > again without reverting th

Re: Aw: Re: [PATCH] mfd: mt6397: fix probe after changing mt6397-core

2019-10-06 Thread Hsin-hsiung Wang
On Sat, 2019-10-05 at 10:16 +0200, Matthias Brugger wrote: > > On 04/10/2019 17:51, Frank Wunderlich wrote: > > This Question goes to Hsin-Hsiung Wang ;) > > > > i only took his code (and splitted the 3rd part) to get mt6323 working > > again without reverting th

[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/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 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 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 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 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 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 05/10] regulator: Add document for MT6358 regulator

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

[PATCH v3 08/10] arm64: dts: mt6358: add PMIC MT6358 related nodes

2019-05-03 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 | 358 +++ 1 file changed, 358 insertions(+) create mode 100644 arch/arm64/boot/dts/mediatek/mt6358.dtsi diff --git a/arch/arm64/boot/dts

[PATCH v3 02/10] mfd: mt6397: extract irq related code from core driver

2019-05-03 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| 3 +- drivers/mfd/mt6397-core.c

[PATCH v3 01/10] mfd: mt6397: clean up code

2019-05-03 Thread Hsin-Hsiung Wang
refine some variable name for more readable Acked-for-MFD-by: Lee Jones 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 ab24e176ef44

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

2019-08-02 Thread Hsin-hsiung Wang
Hi Nicolas, On Tue, 2019-05-07 at 14:24 +0900, Nicolas Boichat wrote: > On Fri, May 3, 2019 at 6:34 PM Hsin-Hsiung Wang > wrote: > > ... > > This adds compatible for the MediaTek MT6358 PMIC. > > > > Acked-for-MFD-by: Lee Jones > > Signed-off-by: Hsin-Hsi

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

2019-08-04 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| 52 ++- include/linux/mfd/mt6358/core.h | 158 include

[PATCH v4 05/10] regulator: Add document for MT6358 regulator

2019-08-04 Thread Hsin-Hsiung Wang
add dt-binding document for MediaTek MT6358 PMIC Reviewed-by: Rob Herring Signed-off-by: Hsin-Hsiung Wang --- .../bindings/regulator/mt6358-regulator.txt| 358 + 1 file changed, 358 insertions(+) create mode 100644 Documentation/devicetree/bindings/regulator

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

2019-08-04 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 v4 09/10] rtc: mt6397: fix alarm register overwrite

2019-08-04 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 v4 02/10] mfd: mt6397: extract irq related code from core driver

2019-08-04 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| 3 +- drivers/mfd/mt6397-core.c

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

2019-08-04 Thread Hsin-Hsiung Wang
quality. - fix correct voltage register for vgpu. - remove useless define in mt6397-core.c. - add rtc node in 6358.dtsi. Hsin-Hsiung Wang (8): mfd: mt6397: clean up code mfd: mt6397: extract irq related code from core driver mfd: mt6397: modify suspend/resume behavior dt-bindings: mfd: Add

[PATCH v4 08/10] arm64: dts: mt6358: add PMIC MT6358 related nodes

2019-08-04 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 | 362 +++ 1 file changed, 362 insertions(+) create mode 100644 arch/arm64/boot/dts/mediatek/mt6358.dtsi diff --git a/arch/arm64

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

2019-08-04 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 v4 04/10] dt-bindings: mfd: Add compatible for the MediaTek MT6358 PMIC

2019-08-04 Thread Hsin-Hsiung Wang
This adds compatible for the MediaTek MT6358 PMIC. Acked-for-mfd-by: Lee Jones Reviewed-by: Rob Herring 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

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

2019-08-04 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. Review-by: Yingjoe Chen Signed-off-by: Ran Bi --- drivers/rtc/rtc-mt6397.c | 43 +++ 1 file changed, 35 insertions(+), 8

[PATCH v4 01/10] mfd: mt6397: clean up code

2019-08-04 Thread Hsin-Hsiung Wang
refine some variable name for more readable Acked-for-mfd-by: Lee Jones 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 337bccc

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

2019-08-06 Thread Hsin-hsiung Wang
Hi Mark, On Mon, 2019-08-05 at 14:10 +0100, Mark Brown wrote: > On Mon, Aug 05, 2019 at 01:21:55PM +0800, Hsin-Hsiung Wang wrote: > > > +static const u32 vmch_voltages[] = { > > + 290, 300, 330, > > +}; > > > +static const u32 vemc_voltages[] = {

[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

[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 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

[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 3/3] soc: mediatek: pwrap: add pwrap driver for MT6873/8192 SoCs

2020-07-14 Thread Hsin-Hsiung Wang
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 --- drivers/soc/mediatek/mtk-pmic-wrap.c | 98 1 file changed, 87 insertions(+), 11

[PATCH 1/3] soc: mediatek: pwrap: use BIT() macro

2020-07-14 Thread Hsin-Hsiung Wang
Use a better BIT() marco for the bit definition. No functional changes, cleanup only. Signed-off-by: Hsin-Hsiung Wang --- drivers/soc/mediatek/mtk-pmic-wrap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/soc/mediatek/mtk-pmic-wrap.c b/drivers/soc/mediatek/mtk

[PATCH 2/3] dt-bindings: mediatek: add compatible for MT6873/8192 pwrap

2020-07-14 Thread Hsin-Hsiung Wang
This adds dt-binding documentation of pwrap for Mediatek MT6873/8192 SoCs 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/3] Add PMIC wrapper support for Mediatek MT6873/8192 SoC IC

2020-07-14 Thread Hsin-Hsiung Wang
This series adds support for new SoC MT6873/8192 to the pmic-wrap driver. Hsin-Hsiung Wang (3): soc: mediatek: pwrap: use BIT() macro dt-bindings: mediatek: add compatible for MT6873/8192 pwrap soc: mediatek: pwrap: add pwrap driver for MT6873/8192 SoCs .../devicetree/bindings/soc

Re: [PATCH v2 1/2] dt-bindings: spmi: document binding for the Mediatek SPMI controller

2020-09-08 Thread Hsin-Hsiung Wang
Hi, On Tue, 2020-09-08 at 14:49 -0600, Rob Herring wrote: > On Fri, Aug 21, 2020 at 06:44:36PM +0800, Hsin-Hsiung Wang wrote: > > This adds documentation for the SPMI controller found on Mediatek SoCs. > > > > Signed-off-by: Hsin-Hsiung Wang > > --- > > .../

[PATCH v3 0/2] Add SPMI support for Mediatek MT6873/8192 SoC IC

2020-10-15 Thread Hsin-Hsiung Wang
This series adds support for new SoC MT6873/8192 to the spmi driver. changes since v2: - update binding document in DT schema format. Hsin-Hsiung Wang (2): dt-bindings: spmi: document binding for the Mediatek SPMI controller spmi: mediatek: Add support for MT6873/8192 .../bindings/spmi

[PATCH v3 1/2] dt-bindings: spmi: document binding for the Mediatek SPMI controller

2020-10-15 Thread Hsin-Hsiung Wang
This adds documentation for the SPMI controller found on Mediatek SoCs. Signed-off-by: Hsin-Hsiung Wang --- .../bindings/spmi/spmi-mtk-pmif.yaml | 71 +++ 1 file changed, 71 insertions(+) create mode 100644 Documentation/devicetree/bindings/spmi/spmi-mtk-pmif.yaml

[PATCH v3 2/2] spmi: mediatek: Add support for MT6873/8192

2020-10-15 Thread Hsin-Hsiung Wang
add spmi support for MT6873/8192. Signed-off-by: Hsin-Hsiung Wang --- drivers/spmi/Kconfig | 9 + drivers/spmi/Makefile| 1 + drivers/spmi/spmi-mtk-pmif.c | 474 +++ 3 files changed, 484 insertions(+) create mode 100644 drivers/spmi/spmi-mtk

Re: [PATCH v4 1/2] dt-bindings: spmi: document binding for the Mediatek SPMI controller

2020-10-19 Thread Hsin-Hsiung Wang
Hi, On Mon, 2020-10-19 at 14:52 -0500, Rob Herring wrote: > On Sat, 17 Oct 2020 00:10:33 +0800, Hsin-Hsiung Wang wrote: > > This adds documentation for the SPMI controller found on Mediatek SoCs. > > > > Signed-off-by: Hsin-Hsiung Wang > > --- > > .../bin

Re: [PATCH v4 1/2] dt-bindings: spmi: document binding for the Mediatek SPMI controller

2020-10-19 Thread Hsin-Hsiung Wang
Hi, On Mon, 2020-10-19 at 14:54 -0500, Rob Herring wrote: > On Sat, Oct 17, 2020 at 12:10:33AM +0800, Hsin-Hsiung Wang wrote: > > This adds documentation for the SPMI controller found on Mediatek SoCs. > > > > Signed-off-by: Hsin-Hsiung Wang > > --- > > If

[PATCH v2 3/3] regulator: mt6315: Add support for MT6315 regulator

2020-10-20 Thread Hsin-Hsiung Wang
The MT6315 is a regulator found on boards based on MediaTek MT8192 and probably other SoCs. It connects as a slave to SoC using SPMI. Signed-off-by: Hsin-Hsiung Wang --- drivers/regulator/Kconfig | 10 + drivers/regulator/Makefile | 1 + drivers/regulator

[PATCH v2 2/3] dt-bindings: regulator: document binding for MT6315 regulator

2020-10-20 Thread Hsin-Hsiung Wang
Add device tree binding information for MT6315 regulator driver. Example bindings for MT6315 are added. Signed-off-by: Hsin-Hsiung Wang --- .../regulator/mtk,mt6315-regulator.yaml | 88 +++ include/dt-bindings/regulator/mtk,mt6315.h| 17 2 files changed, 105

[PATCH v2 0/3] Add support for MT6315 regulator

2020-10-20 Thread Hsin-Hsiung Wang
regulator registration of combined buck in probe. Hsin-Hsiung Wang (3): spmi: Add driver shutdown support dt-bindings: regulator: document binding for MT6315 regulator regulator: mt6315: Add support for MT6315 regulator .../regulator/mtk,mt6315-regulator.yaml | 88 + drivers/regulator

[PATCH v2 1/3] spmi: Add driver shutdown support

2020-10-20 Thread Hsin-Hsiung Wang
Add new shutdown() method. Use it in the standard driver model style. Signed-off-by: Hsin-Hsiung Wang --- drivers/spmi/spmi.c | 9 + include/linux/spmi.h | 1 + 2 files changed, 10 insertions(+) diff --git a/drivers/spmi/spmi.c b/drivers/spmi/spmi.c index c16b60f645a4..161a48ca4acc

[PATCH 2/2] spmi: mediatek: Add support for MT6873/8192

2020-08-21 Thread Hsin-Hsiung Wang
add spmi support for MT6873/8192. Signed-off-by: Hsin-Hsiung Wang --- drivers/spmi/Kconfig | 9 + drivers/spmi/Makefile| 1 + drivers/spmi/spmi-mtk-pmif.c | 479 +++ 3 files changed, 489 insertions(+) create mode 100644 drivers/spmi

[PATCH 1/2] dt-bindings: spmi: document binding for the Mediatek SPMI controller

2020-08-21 Thread Hsin-Hsiung Wang
This adds documentation for the SPMI controller found on Mediatek SoCs. Signed-off-by: Hsin-Hsiung Wang --- .../devicetree/bindings/spmi/spmi-mtk-pmif.txt | 33 ++ 1 file changed, 33 insertions(+) create mode 100644 Documentation/devicetree/bindings/spmi/spmi-mtk

[PATCH 0/2] Add SPMI support for Mediatek MT6873/8192 SoC IC

2020-08-21 Thread Hsin-Hsiung Wang
This series adds support for new SoC MT6873/8192 to the spmi driver. Hsin-Hsiung Wang (2): dt-bindings: spmi: document binding for the Mediatek SPMI controller spmi: mediatek: Add support for MT6873/8192 .../devicetree/bindings/spmi/spmi-mtk-pmif.txt | 33 ++ drivers/spmi/Kconfig

[PATCH v2 1/2] dt-bindings: spmi: document binding for the Mediatek SPMI controller

2020-08-21 Thread Hsin-Hsiung Wang
This adds documentation for the SPMI controller found on Mediatek SoCs. Signed-off-by: Hsin-Hsiung Wang --- .../devicetree/bindings/spmi/spmi-mtk-pmif.txt | 33 ++ 1 file changed, 33 insertions(+) create mode 100644 Documentation/devicetree/bindings/spmi/spmi-mtk

[PATCH v2 2/2] spmi: mediatek: Add support for MT6873/8192

2020-08-21 Thread Hsin-Hsiung Wang
add spmi support for MT6873/8192. Signed-off-by: Hsin-Hsiung Wang --- drivers/spmi/Kconfig | 9 + drivers/spmi/Makefile| 1 + drivers/spmi/spmi-mtk-pmif.c | 474 +++ 3 files changed, 484 insertions(+) create mode 100644 drivers/spmi

[PATCH v2 0/2] Add SPMI support for Mediatek MT6873/8192 SoC IC

2020-08-21 Thread Hsin-Hsiung Wang
This series adds support for new SoC MT6873/8192 to the spmi driver. changes since v1: - remove unused function. - fix correct coding style for debug message. - fix the build fail for the error return value. Hsin-Hsiung Wang (2): dt-bindings: spmi: document binding for the Mediatek SPMI

[PATCH v4 1/2] dt-bindings: spmi: document binding for the Mediatek SPMI controller

2020-10-16 Thread Hsin-Hsiung Wang
This adds documentation for the SPMI controller found on Mediatek SoCs. Signed-off-by: Hsin-Hsiung Wang --- .../bindings/spmi/mtk,spmi-mtk-pmif.yaml | 70 +++ 1 file changed, 70 insertions(+) create mode 100644 Documentation/devicetree/bindings/spmi/mtk,spmi-mtk-pmif.yaml

[PATCH v4 0/2] Add SPMI support for Mediatek MT6873/8192 SoC IC

2020-10-16 Thread Hsin-Hsiung Wang
This series adds support for new SoC MT6873/8192 to the spmi driver. changes since v3: - update correct maintainer of the binding document. - modify debug messages in the mtk spmi probe function. - enable the sys clk and timer clk for spmi driver. Hsin-Hsiung Wang (2): dt-bindings: spmi

[PATCH v4 2/2] spmi: mediatek: Add support for MT6873/8192

2020-10-16 Thread Hsin-Hsiung Wang
add spmi support for MT6873/8192. Signed-off-by: Hsin-Hsiung Wang --- drivers/spmi/Kconfig | 9 + drivers/spmi/Makefile| 1 + drivers/spmi/spmi-mtk-pmif.c | 490 +++ 3 files changed, 500 insertions(+) create mode 100644 drivers/spmi/spmi-mtk

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

2020-07-23 Thread Hsin-Hsiung Wang
This adds compatible for the MediaTek MT6359 PMIC. Signed-off-by: Hsin-Hsiung Wang --- Documentation/devicetree/bindings/mfd/mt6397.txt | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/mfd/mt6397.txt b/Documentation/devicetree

[PATCH 6/8] regulator: mt6359: Set the enable time for LDOs

2020-07-23 Thread Hsin-Hsiung Wang
Add the enable time for LDOs. This patch is preparing for adding mt6359p regulator support. Signed-off-by: Hsin-Hsiung Wang --- drivers/regulator/mt6359-regulator.c | 65 +++- 1 file changed, 42 insertions(+), 23 deletions(-) diff --git a/drivers/regulator

<    1   2   3   >