[PATCH v2 5/5] clk: rockchip: rk3588: fix up the frac pll calculation

2023-10-12 Thread Elaine Zhang
rk3588 frac pll: FFVCO = ((m + k / 65536) * FFIN) / p FFOUT = ((m + k / 65536) * FFIN) / (p * 2s) k is the original code, but the K[15:0] is complement code (6'b1000___ <= K[15:0] <= 16'b0111___), need to be converted. Signed-off-by: Elaine Zhang --- drivers/clk/ro

[PATCH v2 4/5] clk: rockchip: rk3588: Avoid re-setting the pll rate of dclk_vop's parent

2023-10-12 Thread Elaine Zhang
Optimize setting process. Signed-off-by: Elaine Zhang --- drivers/clk/rockchip/clk_rk3588.c | 24 +--- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/drivers/clk/rockchip/clk_rk3588.c b/drivers/clk/rockchip/clk_rk3588.c index 7ba037ad72ba..a995dd5591d3

[PATCH v2 3/5] clk: rockchip: rk3588: support aclk_top_root set 750M

2023-10-11 Thread Elaine Zhang
aclk_top_root choose a parent clock that does not change. Signed-off-by: Elaine Zhang --- drivers/clk/rockchip/clk_rk3588.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/clk/rockchip/clk_rk3588.c b/drivers/clk/rockchip/clk_rk3588.c index c86176264147

[PATCH v2 1/5] clk: rockchip: rk3568: support dclk_vop select more parent clks

2023-10-11 Thread Elaine Zhang
For dclk_vop to support more frequencies. Signed-off-by: Elaine Zhang --- drivers/clk/rockchip/clk_rk3568.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/clk/rockchip/clk_rk3568.c b/drivers/clk/rockchip/clk_rk3568.c index 599b7b130eb9..68f59e57

[PATCH v2 0/5] clk : rockchip: update rk3568 and rk3588 clk driver

2023-10-11 Thread Elaine Zhang
Change in V2: drop [PATCH v1 1/7] and [PATCH v1 2/7], upstream kernel first. update commit message and remove change id. Elaine Zhang (3): clk: rockchip: rk3568: support dclk_vop select more parent clks clk: rockchip: rk3588: support aclk_top_root set 750M clk: rockchip: rk3588: fix up

[PATCH v2 2/5] clk: rk3588: Add 742.5M parameter for PLL

2023-10-11 Thread Elaine Zhang
From: Guochun Huang For a specific frequency. Signed-off-by: Guochun Huang Signed-off-by: Elaine Zhang --- drivers/clk/rockchip/clk_rk3588.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/clk/rockchip/clk_rk3588.c b/drivers/clk/rockchip/clk_rk3588.c index 119b1337bdf2

[PATCH v1 2/7] clk: rockchip: rk3568: add i2s3 clk

2023-10-10 Thread Elaine Zhang
Change-Id: If20fe16260d2b584d4216d1dbabffcb25478fb1d Signed-off-by: Elaine Zhang --- .../include/asm/arch-rockchip/cru_rk3568.h| 36 +++ drivers/clk/rockchip/clk_rk3568.c | 218 ++ 2 files changed, 254 insertions(+) diff --git a/arch/arm/include/asm/arch

[PATCH v1 4/7] clk: rk3588: Add 742.5M parameter for PLL

2023-10-10 Thread Elaine Zhang
From: Guochun Huang Change-Id: I5a842a3103df9a566789e7635fb484e4bb0bf427 Signed-off-by: Guochun Huang Signed-off-by: Elaine Zhang --- drivers/clk/rockchip/clk_rk3588.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/clk/rockchip/clk_rk3588.c b/drivers/clk/rockchip/clk_rk3588.c

[PATCH v1 3/7] clk: rockchip: rk3568: support dclk_vop select more parent clks

2023-10-10 Thread Elaine Zhang
Change-Id: Ib823620ff7940f8d62e78010817ca9b5f06995dd Signed-off-by: Elaine Zhang --- drivers/clk/rockchip/clk_rk3568.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/clk/rockchip/clk_rk3568.c b/drivers/clk/rockchip/clk_rk3568.c index 469014439be4

[PATCH v1 5/7] clk: rockchip: rk3588: support aclk_top_root set 750M

2023-10-10 Thread Elaine Zhang
Change-Id: I78f00d37a645f37e28587d1c31f3179d5fa891e7 Signed-off-by: Elaine Zhang --- drivers/clk/rockchip/clk_rk3588.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/clk/rockchip/clk_rk3588.c b/drivers/clk/rockchip/clk_rk3588.c index c86176264147

[PATCH v1 0/7] clk : rockchip: update rk3568 and rk3588 clk driver

2023-10-10 Thread Elaine Zhang
Elaine Zhang (5): rockchip: dts: rk3568: Resync from kernel-4.19 clk: rockchip: rk3568: add i2s3 clk clk: rockchip: rk3568: support dclk_vop select more parent clks clk: rockchip: rk3588: support aclk_top_root set 750M clk: rockchip: rk3588: fix up the frac pll calculation Guochun Huang

[PATCH v1 1/7] rockchip: dts: rk3568: Resync from kernel-4.19

2023-10-10 Thread Elaine Zhang
Resync from kernel-4.19: (a6cf6aca12c0 drivers: rkflash: Ajudst the dll strategy) Change-Id: I7b7134946b76dbd8963cfaafdc5b56750622855e Signed-off-by: Elaine Zhang --- include/dt-bindings/clock/rk3568-cru.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/include/dt-bindings/clock

[PATCH v2] clk: rockchip: rk3568: update clks

2021-10-12 Thread Elaine Zhang
fix up ppll init freq. support tclk_emmc. add freq (26M) for mmc device. fix up the sfc clk rate unit error. Change in V2: remove change id. Signed-off-by: Elaine Zhang --- arch/arm/include/asm/arch-rockchip/cru_rk3568.h | 2 +- drivers/clk/rockchip/clk_rk3568.c | 11

[PATCH v1] clk: rockchip: rk3568: update clks

2021-09-26 Thread Elaine Zhang
fix up ppll init freq. support tclk_emmc. add freq (26M) for mmc device. fix up the sfc clk rate unit error. Change-Id: I41daa2c1daf55ab07229c1513c6be51b90125cfd Signed-off-by: Elaine Zhang --- arch/arm/include/asm/arch-rockchip/cru_rk3568.h | 2 +- drivers/clk/rockchip/clk_rk3568.c

[RESEND PATCH v2 1/2] rockchip: rk3568: add device tree file

2021-06-23 Thread Elaine Zhang
Add dts binding header for rk3568, files origin from kernel. Signed-off-by: Elaine Zhang Reviewed-by: Kever Yang --- include/dt-bindings/clock/rk3568-cru.h | 925 + 1 file changed, 925 insertions(+) create mode 100644 include/dt-bindings/clock/rk3568-cru.h diff --git

[RESEND PATCH v2 0/2] clk: rockchip: rk3568: add clock driver

2021-06-23 Thread Elaine Zhang
Add basic clock for rk3568 which including cpu, bus, mmc, i2c, pwm, gmac ...clocks init. Change in V2: [PATCH v2 0/1]: No change. [PATCH v2 0/2]: update the copyright info and remove unused clock set/get. Elaine Zhang (2): rockchip: rk3568: add device tree file rockchip: rk3568: add clock

[RESEND PATCH v2 2/2] rockchip: rk3568: add clock driver

2021-06-23 Thread Elaine Zhang
Add rk3568 clock driver and cru structure definition. Signed-off-by: Elaine Zhang --- .../include/asm/arch-rockchip/cru_rk3568.h| 504 +++ drivers/clk/rockchip/Makefile |1 + drivers/clk/rockchip/clk_rk3568.c | 2832 + 3 files changed, 3337

[RESEND PATCH v2 2/2] rockchip: rk3568: add clock driver

2021-06-01 Thread Elaine Zhang
Add rk3568 clock driver and cru structure definition. Signed-off-by: Elaine Zhang --- .../include/asm/arch-rockchip/cru_rk3568.h| 504 +++ drivers/clk/rockchip/Makefile |1 + drivers/clk/rockchip/clk_rk3568.c | 2959 + 3 files changed, 3464

[U-Boot] [PATCH v1] rockchip: clk: pll: add common pll setting funcs

2019-10-24 Thread Elaine Zhang
Common PLL setup function, compatible with different SOC. Mainly for the subsequent new SOC use. Signed-off-by: Elaine Zhang --- arch/arm/include/asm/arch-rockchip/clock.h | 76 + drivers/clk/rockchip/Makefile | 1 + drivers/clk/rockchip/clk_pll.c | 361

[U-Boot] [PATCH v4 6/6] power: pmic: rk809: support rk809 pmic

2019-09-26 Thread Elaine Zhang
From: Joseph Chen The RK809 is a Power Management IC (PMIC) for multimedia and handheld devices. They contains the following components: - Regulators(5*BUCKs, 9*LDOs, 2*SWITCHs) - RTC - Clocking Signed-off-by: Joseph Chen Signed-off-by: Elaine Zhang Reviewed-by: Kever Yang

[U-Boot] [PATCH v4 4/6] power: pmic: rk805: support rk805 pmic

2019-09-26 Thread Elaine Zhang
The RK805 are a Power Management IC (PMIC) for multimedia and handheld devices. They contains the following components: - Regulators(4*BUCKs, 3*LDOs) - RTC - Clocking Signed-off-by: Elaine Zhang Reviewed-by: Kever Yang --- drivers/power/pmic/rk8xx.c | 1 + drivers/power

[U-Boot] [PATCH v4 5/6] power: pmic: rk817: support rk817 pmic

2019-09-26 Thread Elaine Zhang
From: Joseph Chen The RK817 is a Power Management IC (PMIC) for multimedia and handheld devices. They contains the following components: - Regulators(4*BUCKs, 1* BOOST, 9*LDOs, 1*SWITCH) - RTC - Clocking Signed-off-by: Joseph Chen Signed-off-by: Elaine Zhang Reviewed-by: Kever

[U-Boot] [PATCH v4 3/6] power: pmic: rk816: support rk816 pmic

2019-09-26 Thread Elaine Zhang
The RK816 is a Power Management IC (PMIC) for multimedia and handheld devices. They contains the following components: - Regulators(4*BUCKs, 1*BOOST, 6*LDOs, 1*SWITCH) - RTC - Clocking Signed-off-by: Elaine Zhang Reviewed-by: Kever Yang --- drivers/power/pmic/rk8xx.c | 1

[U-Boot] [PATCH v4 1/6] dm: regulator: support regulator more state

2019-09-26 Thread Elaine Zhang
-off-by: Elaine Zhang Reviewed-by: Kever Yang --- doc/device-tree-bindings/regulator/regulator.txt | 27 + drivers/power/regulator/regulator-uclass.c | 70 include/power/regulator.h| 64 ++ test/dm/regulator.c

[U-Boot] [PATCH v4 2/6] power: regulator: rk8xx: update the driver for rk808 and rk818

2019-09-26 Thread Elaine Zhang
In order to adapt the following pmics, make the interface more compatible. Support buck and ldo suspend voltage setting and getting. Supprot buck and ldo suspend enable/disable setting and getting. Signed-off-by: Elaine Zhang Reviewed-by: Kever Yang --- drivers/power/regulator/rk8xx.c | 547

[U-Boot] [PATCH v4 0/6] power: pmic: support more PMIC

2019-09-26 Thread Elaine Zhang
], support rk816 pmic and update commit message. [PATCH v2 4/8]: Update commit message. [PATCH v2 5/8]: No change. [PATCH v2 6/8]: No change. [PATCH v2 7/8]: Remove rk809 keywords and update commit message. [PATCH v2 8/8]: Update commit message. Elaine Zhang (3): power: regulator: rk8xx: update

[U-Boot] [PATCH v3 7/8] power: pmic: rk817: support rk817 pmic

2019-09-19 Thread Elaine Zhang
From: Joseph Chen The RK817 is a Power Management IC (PMIC) for multimedia and handheld devices. They contains the following components: - Regulators(4*BUCKs, 1* BOOST, 9*LDOs, 1*SWITCH) - RTC - Clocking Signed-off-by: Joseph Chen Signed-off-by: Elaine Zhang --- drivers/power

[U-Boot] [PATCH v3 6/8] power: pmic: rk8xx: add pmic_shutdown() implement

2019-09-19 Thread Elaine Zhang
From: Joseph Chen add rk8xx_shutdown for pmic shutdown. It is used in applications such as UBOOT shutdown charging. Signed-off-by: Joseph Chen Signed-off-by: Elaine Zhang --- drivers/power/pmic/rk8xx.c | 39 +++ 1 file changed, 39 insertions(+) diff --git

[U-Boot] [PATCH v3 8/8] power: pmic: rk809: support rk809 pmic

2019-09-19 Thread Elaine Zhang
From: Joseph Chen The RK809 is a Power Management IC (PMIC) for multimedia and handheld devices. They contains the following components: - Regulators(5*BUCKs, 9*LDOs, 2*SWITCHs) - RTC - Clocking Signed-off-by: Joseph Chen Signed-off-by: Elaine Zhang --- drivers/power/pmic/rk8xx.c

[U-Boot] [PATCH v3 5/8] dm: pmic: add pmic_shutdown() interface

2019-09-19 Thread Elaine Zhang
From: Joseph Chen It is a common requirement to shutdown some PMIC. Provide some simple convenience functions to do this. Signed-off-by: Joseph Chen Signed-off-by: Elaine Zhang --- drivers/power/pmic/pmic-uclass.c | 11 +++ include/power/pmic.h | 9 + 2 files

[U-Boot] [PATCH v3 4/8] power: pmic: rk805: support rk805 pmic

2019-09-19 Thread Elaine Zhang
The RK805 are a Power Management IC (PMIC) for multimedia and handheld devices. They contains the following components: - Regulators(4*BUCKs, 3*LDOs) - RTC - Clocking Signed-off-by: Elaine Zhang --- drivers/power/pmic/rk8xx.c | 1 + drivers/power/regulator/rk8xx.c | 17

[U-Boot] [PATCH v3 3/8] power: pmic: rk816: support rk816 pmic

2019-09-19 Thread Elaine Zhang
The RK816 is a Power Management IC (PMIC) for multimedia and handheld devices. They contains the following components: - Regulators(4*BUCKs, 1*BOOST, 6*LDOs, 1*SWITCH) - RTC - Clocking Signed-off-by: Elaine Zhang --- drivers/power/pmic/rk8xx.c | 1 + drivers/power/regulator

[U-Boot] [PATCH v3 2/8] power: regulator: rk8xx: update the driver for rk808 and rk818

2019-09-19 Thread Elaine Zhang
In order to adapt the following pmics, make the interface more compatible. Support buck and ldo suspend voltage setting and getting. Supprot buck and ldo suspend enable/disable setting and getting. Signed-off-by: Elaine Zhang --- drivers/power/regulator/rk8xx.c | 547

[U-Boot] [PATCH v3 0/8] power: pmic: support more PMIC

2019-09-19 Thread Elaine Zhang
v2 4/8]: Update commit message. [PATCH v2 5/8]: No change. [PATCH v2 6/8]: No change. [PATCH v2 7/8]: Remove rk809 keywords and update commit message. [PATCH v2 8/8]: Update commit message. Elaine Zhang (3): power: regulator: rk8xx: update the driver for rk808 and rk818 power: pmic: rk816

[U-Boot] [PATCH v3 1/8] dm: regulator: support regulator more state

2019-09-19 Thread Elaine Zhang
-off-by: Elaine Zhang --- doc/device-tree-bindings/regulator/regulator.txt | 27 + drivers/power/regulator/regulator-uclass.c | 70 include/power/regulator.h| 64 ++ test/dm/regulator.c

[U-Boot] [PATCH v2 7/8] power: pmic: rk817: support rk817 pmic

2019-09-10 Thread Elaine Zhang
From: Joseph Chen The RK817 is a Power Management IC (PMIC) for multimedia and handheld devices. They contains the following components: - Regulators(4*BUCKs, 1* BOOST, 9*LDOs, 1*SWITCH) - RTC - Clocking Signed-off-by: Joseph Chen Signed-off-by: Elaine Zhang --- drivers/power

[U-Boot] [PATCH v2 6/8] power: pmic: rk8xx: add pmic_shutdown() implement

2019-09-10 Thread Elaine Zhang
From: Joseph Chen Signed-off-by: Joseph Chen Signed-off-by: Elaine Zhang --- drivers/power/pmic/rk8xx.c | 39 +++ 1 file changed, 39 insertions(+) diff --git a/drivers/power/pmic/rk8xx.c b/drivers/power/pmic/rk8xx.c index 00c8a2e091d8..df2056913ced 100644

[U-Boot] [PATCH v2 8/8] power: pmic: rk809: support rk809 pmic

2019-09-10 Thread Elaine Zhang
From: Joseph Chen The RK809 is a Power Management IC (PMIC) for multimedia and handheld devices. They contains the following components: - Regulators(5*BUCKs, 9*LDOs, 2*SWITCHs) - RTC - Clocking Signed-off-by: Joseph Chen Signed-off-by: Elaine Zhang --- drivers/power/pmic/rk8xx.c

[U-Boot] [PATCH v2 5/8] dm: pmic: add pmic_shutdown() interface

2019-09-10 Thread Elaine Zhang
From: Joseph Chen Signed-off-by: Joseph Chen Signed-off-by: Elaine Zhang --- drivers/power/pmic/pmic-uclass.c | 11 +++ include/power/pmic.h | 9 + 2 files changed, 20 insertions(+) diff --git a/drivers/power/pmic/pmic-uclass.c b/drivers/power/pmic/pmic-uclass.c

[U-Boot] [PATCH v2 4/8] power: pmic: rk805: support rk805 pmic

2019-09-10 Thread Elaine Zhang
The RK805 are a Power Management IC (PMIC) for multimedia and handheld devices. They contains the following components: - Regulators(4*BUCKs, 3*LDOs) - RTC - Clocking Signed-off-by: Elaine Zhang --- drivers/power/pmic/rk8xx.c | 1 + drivers/power/regulator/rk8xx.c | 17

[U-Boot] [PATCH v2 3/8] power: pmic: rk816: support rk816 pmic

2019-09-10 Thread Elaine Zhang
The RK816 is a Power Management IC (PMIC) for multimedia and handheld devices. They contains the following components: - Regulators(4*BUCKs, 1*BOOST, 6*LDOs, 1*SWITCH) - RTC - Clocking Signed-off-by: Elaine Zhang --- drivers/power/pmic/rk8xx.c | 1 + drivers/power/regulator

[U-Boot] [PATCH v2 2/8] power: regulator: rk8xx: update the driver for rk808 and rk818

2019-09-10 Thread Elaine Zhang
In order to adapt the following pmics, make the interface more compatible. Support buck and ldo suspend voltage setting and getting. Supprot buck and ldo suspend enable/disable setting and getting. Signed-off-by: Elaine Zhang --- drivers/power/regulator/rk8xx.c | 547

[U-Boot] [PATCH v2 0/8] power: pmic: support more PMIC

2019-09-10 Thread Elaine Zhang
. [PATCH v2 4/8]: Update commit message. [PATCH v2 5/8]: No change. [PATCH v2 6/8]: No change. [PATCH v2 7/8]: Remove rk809 keywords and update commit message. [PATCH v2 8/8]: Update commit message. Elaine Zhang (3): power: regulator: rk8xx: update the driver for rk808 and rk818 power: pmic: rk816

[U-Boot] [PATCH v2 1/8] dm: regulator: support regulator more state

2019-09-10 Thread Elaine Zhang
-off-by: Elaine Zhang --- drivers/power/regulator/regulator-uclass.c | 67 ++ include/power/regulator.h | 42 +++ test/dm/regulator.c| 46 3 files changed, 155 insertions(+) diff --git

[U-Boot] [PATCH v1 5/7] power: pmic: rk8xx: add pmic_shutdown() implement

2019-09-04 Thread Elaine Zhang
From: Joseph Chen Signed-off-by: Joseph Chen Signed-off-by: Elaine Zhang --- drivers/power/pmic/rk8xx.c | 39 +++ 1 file changed, 39 insertions(+) diff --git a/drivers/power/pmic/rk8xx.c b/drivers/power/pmic/rk8xx.c index 00c8a2e091d8..df2056913ced 100644

[U-Boot] [PATCH v1 2/7] power: pmic: rk816: support rk816 pmic

2019-09-04 Thread Elaine Zhang
Signed-off-by: Elaine Zhang --- drivers/power/pmic/rk8xx.c | 1 + drivers/power/regulator/rk8xx.c | 674 +++- include/power/rk8xx_pmic.h | 11 +- 3 files changed, 600 insertions(+), 86 deletions(-) diff --git a/drivers/power/pmic/rk8xx.c b

[U-Boot] [PATCH v1 7/7] pmic: add rk809 support

2019-09-04 Thread Elaine Zhang
From: Joseph Chen include sub modules: pmic, regulator Signed-off-by: Joseph Chen Signed-off-by: Elaine Zhang --- drivers/power/pmic/rk8xx.c | 6 - drivers/power/regulator/rk8xx.c | 55 - include/power/rk8xx_pmic.h | 1 + 3 files

[U-Boot] [PATCH v1 6/7] pmic: add RK817 support

2019-09-04 Thread Elaine Zhang
From: Joseph Chen include sub modules: pmic, regulator Signed-off-by: Joseph Chen Signed-off-by: Elaine Zhang --- drivers/power/pmic/rk8xx.c | 109 -- drivers/power/regulator/rk8xx.c | 198 +++- include/power/rk8xx_pmic.h

[U-Boot] [PATCH v1 1/7] dm: regulator: support regulator more state

2019-09-04 Thread Elaine Zhang
-off-by: Elaine Zhang --- drivers/power/regulator/regulator-uclass.c | 67 ++ include/power/regulator.h | 42 +++ 2 files changed, 109 insertions(+) diff --git a/drivers/power/regulator/regulator-uclass.c b/drivers/power/regulator

[U-Boot] [PATCH v1 3/7] power: pmic: rk805: support rk805 pmic

2019-09-04 Thread Elaine Zhang
Signed-off-by: Elaine Zhang --- drivers/power/pmic/rk8xx.c | 1 + drivers/power/regulator/rk8xx.c | 17 + include/power/rk8xx_pmic.h | 1 + 3 files changed, 19 insertions(+) diff --git a/drivers/power/pmic/rk8xx.c b/drivers/power/pmic/rk8xx.c index 1900de9d1cdb

[U-Boot] [PATCH v1 4/7] dm: pmic: add pmic_shutdown() interface

2019-09-04 Thread Elaine Zhang
From: Joseph Chen Signed-off-by: Joseph Chen Signed-off-by: Elaine Zhang --- drivers/power/pmic/pmic-uclass.c | 11 +++ include/power/pmic.h | 9 + 2 files changed, 20 insertions(+) diff --git a/drivers/power/pmic/pmic-uclass.c b/drivers/power/pmic/pmic-uclass.c

[U-Boot] [PATCH v1 0/8] power: pmic: support more PMIC

2019-09-04 Thread Elaine Zhang
Support more PMIC and improve compatibility between pmics. Elaine Zhang (2): power: pmic: rk816: support rk816 pmic power: pmic: rk805: support rk805 pmic Joseph Chen (6): dm: regulator: support regulator more state power: pmic: rk8xx: bind more function dm: pmic: add pmic_shutdown

Re: [U-Boot] [PATCH] power: regulator: pwm: support pwm polarity setting

2017-04-10 Thread Elaine Zhang
On 04/07/2017 07:28 PM, Jaehoon Chung wrote: Hi Kever, On 04/07/2017 08:02 PM, Kever Yang wrote: The latest kernel PWM drivers enable the polarity settings. When system run from U-Boot to kerenl, if there are differences in polarity set or duty cycle, the PMW will re-init: close -> set

Re: [U-Boot] [PATCH] power: regulator: pwm: support pwm polarity setting

2017-04-10 Thread Elaine Zhang
On 04/10/2017 03:28 AM, Simon Glass wrote: Hi, On 7 April 2017 at 05:02, Kever Yang wrote: The latest kernel PWM drivers enable the polarity settings. When system run from U-Boot to kerenl, if there are differences in polarity set or duty cycle, the PMW will