Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id 155D5E00DD2; Fri, 16 Dec 2016 02:04:22 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on yocto-www.yoctoproject.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no * trust * [82.188.252.231 listed in list.dnswl.org] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] X-Greylist: delayed 607 seconds by postgrey-1.32 at yocto-www; Fri, 16 Dec 2016 02:04:17 PST Received: from mail.smigroup.it (MAIL.SMIGROUP.IT [82.188.252.231]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 55181E00DB0 for ; Fri, 16 Dec 2016 02:04:17 -0800 (PST) Received: from mail.smigroup.it (unknown [192.168.50.4]) by srv-gwmail.smigroup.local with smtp id 2092_0bb8_b5c5f9da_3e1f_4fdb_a7fd_f4f0274e9fae; Fri, 16 Dec 2016 10:54:08 +0100 Received: from localhost (localhost [127.0.0.1]) by mail.smigroup.it (Postfix) with ESMTP id AC5999C7394 for ; Fri, 16 Dec 2016 10:54:08 +0100 (CET) X-Virus-Scanned: amavisd-new at smigroup.it Received: from mail.smigroup.it ([127.0.0.1]) by localhost (mail.smigroup.it [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qeRk53CA18qe for ; Fri, 16 Dec 2016 10:54:08 +0100 (CET) Received: from port-msalvini (unknown [10.0.43.12]) by mail.smigroup.it (Postfix) with ESMTPSA id 9A9039C7392 for ; Fri, 16 Dec 2016 10:54:08 +0100 (CET) Message-ID: <1481881950.4242.39.camel@smigroup.net> From: Mauro Salvini To: meta-freescale Date: Fri, 16 Dec 2016 10:52:30 +0100 Organization: SmiTec s.p.a. X-Mailer: Evolution 3.12.9-1+b1 Mime-Version: 1.0 Subject: Operating points mismatch on imx6sx SabreSD DTS? X-BeenThere: meta-freescale@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Usage and development list for the meta-fsl-* layers List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Dec 2016 10:04:22 -0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Hi, I'm using krogoth branch of meta-fsl-arm and I'm doing some modifications on imx6sx-sdb.dts to tailor it on my custom board based on SabreSD rev. B. I'm facing with a thing that seems a mismatch between u-boot and linux domains, I try to explain it. On cpu0 section of imx6sx.dtsi file I can find these operating points: operating-points = < /* kHz uV */ 996000 1250000 792000 1175000 396000 1075000 198000 975000 >; fsl,soc-operating-points = < /* ARM kHz SOC uV */ 996000 1175000 792000 1175000 396000 1175000 198000 1175000 >; arm-supply = <®_arm>; soc-supply = <®_soc>; These settings seems to come from table 10 in IMX6SXCEC.pdf, the imx6sx datasheet. In imx6sx-sdb.dts file these settings are overwritten with these ones: operating-points = < /* kHz uV */ 996000 1250000 792000 1175000 396000 1175000 198000 1175000 >; fsl,soc-operating-points = < /* ARM kHz SOC uV */ 996000 1250000 792000 1175000 396000 1175000 198000 1175000 >; arm-supply = <&sw1a_reg>; soc-supply = <&sw1a_reg>; fsl,arm-soc-shared = <1>; to use sw1a_reg (SW1AB regulator into PFuze200 that is on SabreSD board). Furthermore, enables "fsl,ldo-bypass" property to bypass internal LDOs as we have a pfuze. These values seems derived from above mentioned table 10 from datasheet, LDO-disabled section: I can understand that the two tables have same values because PFuze power source is shared between ARM domain and SOC domain, and values are the best trade-off to both SOC_IN and ARM_IN rails. But here the mismatch: ARM and SOC LDOs are programmed to 1.150V and 1.175V respectively (I read 0x020c8140 register that has 0x004c0012 value, see PMU_REG_CORE into imx6sx reference manual; 1.175V set by u-boot), so operating points into imx6sx-sdb.dts does not respect assertion into LDO enabled section from datasheet: "VDDARM_IN must be 125mV higher than the LDO Output Set Point (VDD_ARM_CAP) for correct supply voltage regulation." I read source code to get an answer, and I found these items: - u-boot sets SOC LDO only to 1.175V (board_postclk_init() call into arch/arm/cpu/armv7/mx6/soc.c) - linux has this comment into arch/arm/mach-imx/gpc.c, when "fsl,ldo-bypass" property was read: /* We only bypass pu since arm and soc has been set in u-boot */ in facts, this piece of code bypasses only "pu" regulator (anyway not present on sabresd), leaving ARM and SOC LDOs untouched - in imx6sx-sdb-ldo.dts (that disables LDO-bypass and re-enables internal LDOs), original operating point and regulators are set, and set to 0 "fsl,ldo-bypass", with comment "use ldo-enable, u-boot will check it and configure" It seems that kernel expects that u-boot reads from dtb to find if internal LDOs must be bypassed or not, but this never happens, instead u-boot sets SOC LDO to 1.175V and leave ARM LDO untouched (1.150V), so when linux starts and uses operating points on pfuze it works with out-of-specs voltages-frequencies applied on ARM and SOC LDOs due to settings done by u-boot. Or simply I have miss some point? Sorry if it is not the right point to post this, but since meta-fsl-arm layer brings up u-boot and linux into an image, I think it could be the right one. Thanks in advance, regards Mauro