Re: [U-Boot] Rockchip RK3288 regulator device table problem
Hi Rick, On 3 January 2017 at 11:21, Rick Bronsonwrote: > Hi Simon, > > I'm not sure what to do about (in drivers/power/regulator/rk808.c): > > static const struct rk808_reg_info rk808_ldo[] = { > { 100, 10, LDO1_ON_VSEL, 5, }, > ... > > I had to change this table as my LDO values are different for this > board. I'd like to fix it to take values from the device tree but > couldn't find an example. Maybe you can point me to one. Do you mean that the table values are wrong? They should be defined in the datasheet. Or if you are trying to change the voltages, you can use the device tree. See for example rk3288-firefly.dtsi: regulator-min-microvolt = <85>; regulator-max-microvolt = <135>; Then you call regulator_set_value() to set the voltage, or perhaps regulator_autoset() if there is only one voltage. Or even regulators_enable_boot_on(). Regards, Simon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Rockchip RK3288 regulator device table problem
Hi Simon, I'm not sure what to do about (in drivers/power/regulator/rk808.c): static const struct rk808_reg_info rk808_ldo[] = { { 100, 10, LDO1_ON_VSEL, 5, }, ... I had to change this table as my LDO values are different for this board. I'd like to fix it to take values from the device tree but couldn't find an example. Maybe you can point me to one. Thanks, Rick ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Rockchip RK3288 regulator device table problem
Hi Rick, On 12 December 2016 at 09:57, Rick Bronsonwrote: > Hi Simon, > >> >> On 9 December 2016 at 18:12, Rick Bronson wrote: >> > Hi All, >> > >> > How do I enable a particular regulator upon boot? I have two >> > identically set LDO entries: >> > >> > vccio_en: LDO_REG1 { >> > regulator-always-on; >> > regulator-boot-on; >> > regulator-min-microvolt = <330>; >> > regulator-max-microvolt = <330>; >> > regulator-name = "vccio_en"; >> > regulator-state-mem { >> > regulator-on-in-suspend; >> > regulator-suspend-microvolt = > <330>; >> > }; >> > }; >> > >> > vcc33_mic: LDO_REG2 { >> > regulator-always-on; >> > regulator-boot-on; >> > regulator-min-microvolt = <330>; >> > regulator-max-microvolt = <330>; >> > regulator-name = "vcc33_mic"; >> > regulator-state-mem { >> > regulator-on-in-suspend; >> > regulator-suspend-microvolt = > <330>; >> > }; >> > }; >> > >> > Yet one is enabled, the other disabled, any idea why?: >> > >> > => regulator status >> > Name EnableduV mA Mode >> > ... >> > vccio_en enabled 330 - - >> > vcc33_micdisabled 330 - - >> > >> > And oddly, the uV values actually don't come from the DT but from >> > the rk808_ldo table in drivers/power/regulator/rk808.c >> >> Do you think this is happening by PMIC settings (in the device) rather >> than through U-Boot? > > Think I found the reason for this, it's this way because of the way > BOOT0, BOOT1 are strapped on the RK808. > >> >> > >> > Any ideas? >> > >> > Thanks for any help. >> > >> >> There is a function called regulators_enable_boot_on() which enables >> all boot-on regulators that have a fixed voltage, but I don't think >> that is called with rockchip. >> >> Now that I look at it, I cannot see why I put the voltage values in >> the driver. They should come form DT. > > Do you think the right way to solve this is (from common/board_r.c): > > __weak int power_init_board(void) > { > regulators_enable_boot_on(false); > return 0; > } > > Tried this but it seems to introduce a race condition because often, it > hangs. This should only enable regulators - never disable them. I suggest trying to call regulator_autoset() for each regulator in turn in your function so that you know what causes the problem. I can't really imagine why enabling a regulator could cause a problem though. You might consider putting the code in board_init(). > > Cheers, > > Rick > > Regards, Simon > ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Rockchip RK3288 regulator device table problem
On 12/13/2016 01:57 AM, Rick Bronson wrote: > Hi Simon, > >> >> On 9 December 2016 at 18:12, Rick Bronsonwrote: >>> Hi All, >>> >>> How do I enable a particular regulator upon boot? I have two >>> identically set LDO entries: >>> >>> vccio_en: LDO_REG1 { >>> regulator-always-on; >>> regulator-boot-on; >>> regulator-min-microvolt = <330>; >>> regulator-max-microvolt = <330>; >>> regulator-name = "vccio_en"; >>> regulator-state-mem { >>> regulator-on-in-suspend; >>> regulator-suspend-microvolt = > <330>; >>> }; >>> }; >>> >>> vcc33_mic: LDO_REG2 { >>> regulator-always-on; >>> regulator-boot-on; >>> regulator-min-microvolt = <330>; >>> regulator-max-microvolt = <330>; >>> regulator-name = "vcc33_mic"; >>> regulator-state-mem { >>> regulator-on-in-suspend; >>> regulator-suspend-microvolt = > <330>; >>> }; >>> }; >>> >>> Yet one is enabled, the other disabled, any idea why?: >>> >>> => regulator status >>> Name EnableduV mA Mode >>> ... >>> vccio_en enabled 330 - - >>> vcc33_micdisabled 330 - - >>> >>> And oddly, the uV values actually don't come from the DT but from >>> the rk808_ldo table in drivers/power/regulator/rk808.c >> >> Do you think this is happening by PMIC settings (in the device) rather >> than through U-Boot? > > Think I found the reason for this, it's this way because of the way > BOOT0, BOOT1 are strapped on the RK808. > >> >>> >>> Any ideas? >>> >>> Thanks for any help. >>> >> >> There is a function called regulators_enable_boot_on() which enables >> all boot-on regulators that have a fixed voltage, but I don't think >> that is called with rockchip. >> >> Now that I look at it, I cannot see why I put the voltage values in >> the driver. They should come form DT. > > Do you think the right way to solve this is (from common/board_r.c): > > __weak int power_init_board(void) > { > regulators_enable_boot_on(false); > return 0; > } > > Tried this but it seems to introduce a race condition because often, it > hangs. I think it's not solution..I don't know how Simon think about.. But if you need to put regulators_enable_boot_on()..then you put "power_init_board()" in board/rockchip/evb_rk3036(?). In other words, make the power_init_board() for rockhip...not touch the "__weak int power_init_board()".? Best Regards, Jaehoon Chung > > Cheers, > > Rick > > > > ___ > U-Boot mailing list > U-Boot@lists.denx.de > http://lists.denx.de/mailman/listinfo/u-boot > > > ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Rockchip RK3288 regulator device table problem
Hi Simon, > > On 9 December 2016 at 18:12, Rick Bronsonwrote: > > Hi All, > > > > How do I enable a particular regulator upon boot? I have two > > identically set LDO entries: > > > > vccio_en: LDO_REG1 { > > regulator-always-on; > > regulator-boot-on; > > regulator-min-microvolt = <330>; > > regulator-max-microvolt = <330>; > > regulator-name = "vccio_en"; > > regulator-state-mem { > > regulator-on-in-suspend; > > regulator-suspend-microvolt = <330>; > > }; > > }; > > > > vcc33_mic: LDO_REG2 { > > regulator-always-on; > > regulator-boot-on; > > regulator-min-microvolt = <330>; > > regulator-max-microvolt = <330>; > > regulator-name = "vcc33_mic"; > > regulator-state-mem { > > regulator-on-in-suspend; > > regulator-suspend-microvolt = <330>; > > }; > > }; > > > > Yet one is enabled, the other disabled, any idea why?: > > > > => regulator status > > Name EnableduV mA Mode > > ... > > vccio_en enabled 330 - - > > vcc33_micdisabled 330 - - > > > > And oddly, the uV values actually don't come from the DT but from > > the rk808_ldo table in drivers/power/regulator/rk808.c > > Do you think this is happening by PMIC settings (in the device) rather > than through U-Boot? Think I found the reason for this, it's this way because of the way BOOT0, BOOT1 are strapped on the RK808. > > > > > Any ideas? > > > > Thanks for any help. > > > > There is a function called regulators_enable_boot_on() which enables > all boot-on regulators that have a fixed voltage, but I don't think > that is called with rockchip. > > Now that I look at it, I cannot see why I put the voltage values in > the driver. They should come form DT. Do you think the right way to solve this is (from common/board_r.c): __weak int power_init_board(void) { regulators_enable_boot_on(false); return 0; } Tried this but it seems to introduce a race condition because often, it hangs. Cheers, Rick ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Rockchip RK3288 regulator device table problem
Hi Rick, On 9 December 2016 at 18:12, Rick Bronsonwrote: > Hi All, > > How do I enable a particular regulator upon boot? I have two > identically set LDO entries: > > vccio_en: LDO_REG1 { > regulator-always-on; > regulator-boot-on; > regulator-min-microvolt = <330>; > regulator-max-microvolt = <330>; > regulator-name = "vccio_en"; > regulator-state-mem { > regulator-on-in-suspend; > regulator-suspend-microvolt = > <330>; > }; > }; > > vcc33_mic: LDO_REG2 { > regulator-always-on; > regulator-boot-on; > regulator-min-microvolt = <330>; > regulator-max-microvolt = <330>; > regulator-name = "vcc33_mic"; > regulator-state-mem { > regulator-on-in-suspend; > regulator-suspend-microvolt = > <330>; > }; > }; > > Yet one is enabled, the other disabled, any idea why?: > > => regulator status > Name EnableduV mA Mode > ... > vccio_en enabled 330 - - > vcc33_micdisabled 330 - - > > And oddly, the uV values actually don't come from the DT but from > the rk808_ldo table in drivers/power/regulator/rk808.c Do you think this is happening by PMIC settings (in the device) rather than through U-Boot? > > Any ideas? > > Thanks for any help. > There is a function called regulators_enable_boot_on() which enables all boot-on regulators that have a fixed voltage, but I don't think that is called with rockchip. Now that I look at it, I cannot see why I put the voltage values in the driver. They should come form DT. > Rick > > > Regards, Simon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] Rockchip RK3288 regulator device table problem
Hi All, How do I enable a particular regulator upon boot? I have two identically set LDO entries: vccio_en: LDO_REG1 { regulator-always-on; regulator-boot-on; regulator-min-microvolt = <330>; regulator-max-microvolt = <330>; regulator-name = "vccio_en"; regulator-state-mem { regulator-on-in-suspend; regulator-suspend-microvolt = <330>; }; }; vcc33_mic: LDO_REG2 { regulator-always-on; regulator-boot-on; regulator-min-microvolt = <330>; regulator-max-microvolt = <330>; regulator-name = "vcc33_mic"; regulator-state-mem { regulator-on-in-suspend; regulator-suspend-microvolt = <330>; }; }; Yet one is enabled, the other disabled, any idea why?: => regulator status Name EnableduV mA Mode ... vccio_en enabled 330 - - vcc33_micdisabled 330 - - And oddly, the uV values actually don't come from the DT but from the rk808_ldo table in drivers/power/regulator/rk808.c Any ideas? Thanks for any help. Rick ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot