From: Jaehoon Chung Date: Thu, 15 Dec 2016 21:09:11 +0900 Subject: [U-Boot] Rockchip RK3288 regulator device table problem In-Reply-To: <98578228d129a2c077318eda60cea817.squirrel@webmail.efn.org> References: <98578228d129a2c077318eda60cea817.squirrel@webmail.efn.org> Message-ID: <92fe3266-1258-cf80-c65d-6989df49c43c@samsung.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 12/13/2016 01:57 AM, Rick Bronson wrote: > 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 = <3300000>; >>> regulator-max-microvolt = <3300000>; >>> regulator-name = "vccio_en"; >>> regulator-state-mem { >>> regulator-on-in-suspend; >>> regulator-suspend-microvolt = > <3300000>; >>> }; >>> }; >>> >>> vcc33_mic: LDO_REG2 { >>> regulator-always-on; >>> regulator-boot-on; >>> regulator-min-microvolt = <3300000>; >>> regulator-max-microvolt = <3300000>; >>> regulator-name = "vcc33_mic"; >>> regulator-state-mem { >>> regulator-on-in-suspend; >>> regulator-suspend-microvolt = > <3300000>; >>> }; >>> }; >>> >>> Yet one is enabled, the other disabled, any idea why?: >>> >>> => regulator status >>> Name Enabled uV mA Mode >>> ... >>> vccio_en enabled 3300000 - - >>> vcc33_mic disabled 3300000 - - >>> >>> 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 at lists.denx.de > http://lists.denx.de/mailman/listinfo/u-boot > > >