Yidi Lin has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/46405 )
Change subject: soc/mediatek/mt8192: Add board-specific regulator APIs ......................................................................
soc/mediatek/mt8192: Add board-specific regulator APIs
Four regulators are required by DRAM driver.
BUG=b:147789962 BRANCH=none TEST=verified with DRAM driver
Signed-off-by: Yidi Lin yidi.lin@mediatek.com Change-Id: I0c2d471a7f8628735af90c5b5a5ab3012831e442 --- A src/soc/mediatek/common/include/soc/regulator.h 1 file changed, 17 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/05/46405/1
diff --git a/src/soc/mediatek/common/include/soc/regulator.h b/src/soc/mediatek/common/include/soc/regulator.h new file mode 100644 index 0000000..a5f4039 --- /dev/null +++ b/src/soc/mediatek/common/include/soc/regulator.h @@ -0,0 +1,17 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#ifndef SOC_MEDIATEK_COMMON_REGULATOR_H +#define SOC_MEDIATEK_COMMON_REGULATOR_H + +#include <stdint.h> + +void mainboard_set_vdd1_vol(uint32_t voltage_uv); +void mainboard_set_vdd2_vol(uint32_t voltage_uv); +void mainboard_set_vddq_vol(uint32_t voltage_uv); +void mainboard_set_vmddr_vol(uint32_t voltage_uv); + +uint32_t mainboard_get_vdd1_vol(void); +uint32_t mainboard_get_vdd2_vol(void); +uint32_t mainboard_get_vddq_vol(void); +uint32_t mainboard_get_vmddr_vol(void); +#endif /* SOC_MEDIATEK_COMMON_REGULATOR_H */
Hung-Te Lin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46405 )
Change subject: soc/mediatek/mt8192: Add board-specific regulator APIs ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/c/coreboot/+/46405/1/src/soc/mediatek/common/inc... File src/soc/mediatek/common/include/soc/regulator.h:
https://review.coreboot.org/c/coreboot/+/46405/1/src/soc/mediatek/common/inc... PS1, Line 8: void mainboard_set_vdd1_vol(uint32_t voltage_uv); : void mainboard_set_vdd2_vol(uint32_t voltage_uv); : void mainboard_set_vddq_vol(uint32_t voltage_uv); : void mainboard_set_vmddr_vol(uint32_t voltage_uv); : : uint32_t mainboard_get_vdd1_vol(void); : uint32_t mainboard_get_vdd2_vol(void); : uint32_t mainboard_get_vddq_vol(void); : uint32_t mainboard_get_vmddr_vol(void); I'd rather implement this by enums, e.g.,
enum mtk_regulator { MTK_REGULATOR_VDD1, MTK_REGULATOR_VDD2, MTK_REGULATOR_VDDQ, MTK_REGULATOR_VMDDR, };
void mainboard_set_regulator_vol(enum mtk_regualtor regulator, uint32_t voltage_uv); uint32_t mainboard_get_regulator_vol(enum mtk_regulator regulator);
Xi Chen has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46405 )
Change subject: soc/mediatek/mt8192: Add board-specific regulator APIs ......................................................................
Patch Set 4:
dram: verify pass.
Hello Xi Chen, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/46405
to look at the new patch set (#5).
Change subject: soc/mediatek/mt8192: Add board-specific regulator APIs ......................................................................
soc/mediatek/mt8192: Add board-specific regulator APIs
Four regulators are required by DRAM driver.
BUG=b:147789962 BRANCH=none TEST=verified with DRAM driver
Signed-off-by: Yidi Lin yidi.lin@mediatek.com Change-Id: I0c2d471a7f8628735af90c5b5a5ab3012831e442 --- A src/soc/mediatek/common/include/soc/regulator.h 1 file changed, 19 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/05/46405/5
Yidi Lin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46405 )
Change subject: soc/mediatek/mt8192: Add board-specific regulator APIs ......................................................................
Patch Set 5:
(1 comment)
https://review.coreboot.org/c/coreboot/+/46405/1/src/soc/mediatek/common/inc... File src/soc/mediatek/common/include/soc/regulator.h:
https://review.coreboot.org/c/coreboot/+/46405/1/src/soc/mediatek/common/inc... PS1, Line 8: void mainboard_set_vdd1_vol(uint32_t voltage_uv); : void mainboard_set_vdd2_vol(uint32_t voltage_uv); : void mainboard_set_vddq_vol(uint32_t voltage_uv); : void mainboard_set_vmddr_vol(uint32_t voltage_uv); : : uint32_t mainboard_get_vdd1_vol(void); : uint32_t mainboard_get_vdd2_vol(void); : uint32_t mainboard_get_vddq_vol(void); : uint32_t mainboard_get_vmddr_vol(void);
I'd rather implement this by enums, e.g., […]
Please review CB:46405 and CB:46406
Hung-Te Lin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46405 )
Change subject: soc/mediatek/mt8192: Add board-specific regulator APIs ......................................................................
Patch Set 5:
(1 comment)
https://review.coreboot.org/c/coreboot/+/46405/5//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/46405/5//COMMIT_MSG@8 PS5, Line 8: : Four regulators are required by DRAM driver. To enable DVFS, the DRAM driver needs to access four different regulators that SoC can't access directly and need board-specific implementations.
To support that we need to define the getter and setter APIs for those regulators.
Hello Xi Chen, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/46405
to look at the new patch set (#6).
Change subject: soc/mediatek/mt8192: Add board-specific regulator APIs ......................................................................
soc/mediatek/mt8192: Add board-specific regulator APIs
To enable DVFS, DRAM driver needs to access four different regulators that SoC can't access directly and need board-specific implementations.
To support that we need to define the getter and setter APIs for those regulators.
BUG=b:147789962 BRANCH=none TEST=verified with DRAM driver
Signed-off-by: Yidi Lin yidi.lin@mediatek.com Change-Id: I0c2d471a7f8628735af90c5b5a5ab3012831e442 --- A src/soc/mediatek/common/include/soc/regulator.h 1 file changed, 19 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/05/46405/6
Yidi Lin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46405 )
Change subject: soc/mediatek/mt8192: Add board-specific regulator APIs ......................................................................
Patch Set 6:
(1 comment)
https://review.coreboot.org/c/coreboot/+/46405/5//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/46405/5//COMMIT_MSG@8 PS5, Line 8: : Four regulators are required by DRAM driver.
To enable DVFS, the DRAM driver needs to access four different regulators that SoC can't access dire […]
Ack
Hung-Te Lin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46405 )
Change subject: soc/mediatek/mt8192: Add board-specific regulator APIs ......................................................................
Patch Set 6: Code-Review+2
Hung-Te Lin has submitted this change. ( https://review.coreboot.org/c/coreboot/+/46405 )
Change subject: soc/mediatek/mt8192: Add board-specific regulator APIs ......................................................................
soc/mediatek/mt8192: Add board-specific regulator APIs
To enable DVFS, DRAM driver needs to access four different regulators that SoC can't access directly and need board-specific implementations.
To support that we need to define the getter and setter APIs for those regulators.
BUG=b:147789962 BRANCH=none TEST=verified with DRAM driver
Signed-off-by: Yidi Lin yidi.lin@mediatek.com Change-Id: I0c2d471a7f8628735af90c5b5a5ab3012831e442 Reviewed-on: https://review.coreboot.org/c/coreboot/+/46405 Reviewed-by: Hung-Te Lin hungte@chromium.org Tested-by: build bot (Jenkins) no-reply@coreboot.org --- A src/soc/mediatek/common/include/soc/regulator.h 1 file changed, 19 insertions(+), 0 deletions(-)
Approvals: build bot (Jenkins): Verified Hung-Te Lin: Looks good to me, approved
diff --git a/src/soc/mediatek/common/include/soc/regulator.h b/src/soc/mediatek/common/include/soc/regulator.h new file mode 100644 index 0000000..258d550 --- /dev/null +++ b/src/soc/mediatek/common/include/soc/regulator.h @@ -0,0 +1,19 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#ifndef SOC_MEDIATEK_COMMON_REGULATOR_H +#define SOC_MEDIATEK_COMMON_REGULATOR_H + +#include <stdint.h> + +enum mtk_regulator { + MTK_REGULATOR_VDD1, + MTK_REGULATOR_VDD2, + MTK_REGULATOR_VDDQ, + MTK_REGULATOR_VMDDR, +}; + +void mainboard_set_regulator_vol(enum mtk_regulator regulator, + uint32_t voltage_uv); +uint32_t mainboard_get_regulator_vol(enum mtk_regulator regulator); + +#endif /* SOC_MEDIATEK_COMMON_REGULATOR_H */