* [PATCH] ARM: dts: imx6qdl: phycore: Remove emmc vmmc-supply @ 2019-12-03 13:48 Stefan Riedmueller 2019-12-05 8:07 ` Sascha Hauer 0 siblings, 1 reply; 6+ messages in thread From: Stefan Riedmueller @ 2019-12-03 13:48 UTC (permalink / raw) To: barebox There is no driver for the eMMC's vmmc-supply regulator in the barebox. Use a dummy regulator instead by simply deleting the vmmc-supply property. Signed-off-by: Stefan Riedmueller <s.riedmueller@phytec.de> --- arch/arm/dts/imx6qdl-phytec-phycore-som.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/dts/imx6qdl-phytec-phycore-som.dtsi b/arch/arm/dts/imx6qdl-phytec-phycore-som.dtsi index 69f252b42382..974e271f453d 100644 --- a/arch/arm/dts/imx6qdl-phytec-phycore-som.dtsi +++ b/arch/arm/dts/imx6qdl-phytec-phycore-som.dtsi @@ -112,6 +112,7 @@ }; &usdhc4 { + /delete-property/ vmmc-supply; partitions { compatible = "fixed-partitions"; #address-cells = <1>; -- 2.7.4 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] ARM: dts: imx6qdl: phycore: Remove emmc vmmc-supply 2019-12-03 13:48 [PATCH] ARM: dts: imx6qdl: phycore: Remove emmc vmmc-supply Stefan Riedmueller @ 2019-12-05 8:07 ` Sascha Hauer 2019-12-05 8:37 ` Ahmad Fatoum 0 siblings, 1 reply; 6+ messages in thread From: Sascha Hauer @ 2019-12-05 8:07 UTC (permalink / raw) To: Stefan Riedmueller; +Cc: barebox Hi Stefan, On Tue, Dec 03, 2019 at 02:48:41PM +0100, Stefan Riedmueller wrote: > There is no driver for the eMMC's vmmc-supply regulator in the barebox. > Use a dummy regulator instead by simply deleting the vmmc-supply > property. > > Signed-off-by: Stefan Riedmueller <s.riedmueller@phytec.de> > --- > arch/arm/dts/imx6qdl-phytec-phycore-som.dtsi | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/arch/arm/dts/imx6qdl-phytec-phycore-som.dtsi b/arch/arm/dts/imx6qdl-phytec-phycore-som.dtsi > index 69f252b42382..974e271f453d 100644 > --- a/arch/arm/dts/imx6qdl-phytec-phycore-som.dtsi > +++ b/arch/arm/dts/imx6qdl-phytec-phycore-som.dtsi > @@ -112,6 +112,7 @@ > }; > > &usdhc4 { > + /delete-property/ vmmc-supply; I don't like this approach very much. It's fine for barebox, but leads to problems once you start Linux with the barebox device tree. I'd rather go with the unmodified device trees (apart from the things barebox changes to the device trees in order to start Linux). One idea that comes to my mind is: Would it be possible to provide a call like int regulator_provide_dummy(struct device_node *np); Boards could call this to let barebox provide a dummy regulator for the given node (the "dlg,da9062" node in your case) and its child nodes. In of_regulator_get() we then see if the desired regulator is a child node of a node registered as dummy provider, then register a dummy regulator and return it. Sascha -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] ARM: dts: imx6qdl: phycore: Remove emmc vmmc-supply 2019-12-05 8:07 ` Sascha Hauer @ 2019-12-05 8:37 ` Ahmad Fatoum 2019-12-05 13:08 ` Stefan Riedmüller 0 siblings, 1 reply; 6+ messages in thread From: Ahmad Fatoum @ 2019-12-05 8:37 UTC (permalink / raw) To: barebox Hello, On 12/5/19 9:07 AM, Sascha Hauer wrote: > On Tue, Dec 03, 2019 at 02:48:41PM +0100, Stefan Riedmueller wrote: >> There is no driver for the eMMC's vmmc-supply regulator in the barebox. >> Use a dummy regulator instead by simply deleting the vmmc-supply >> property. >> >> Signed-off-by: Stefan Riedmueller <s.riedmueller@phytec.de> >> --- >> arch/arm/dts/imx6qdl-phytec-phycore-som.dtsi | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/arch/arm/dts/imx6qdl-phytec-phycore-som.dtsi b/arch/arm/dts/imx6qdl-phytec-phycore-som.dtsi >> index 69f252b42382..974e271f453d 100644 >> --- a/arch/arm/dts/imx6qdl-phytec-phycore-som.dtsi >> +++ b/arch/arm/dts/imx6qdl-phytec-phycore-som.dtsi >> @@ -112,6 +112,7 @@ >> }; >> >> &usdhc4 { >> + /delete-property/ vmmc-supply; > > I don't like this approach very much. It's fine for barebox, but leads > to problems once you start Linux with the barebox device tree. I'd > rather go with the unmodified device trees (apart from the things > barebox changes to the device trees in order to start Linux). How about a barebox,regulator-always-on property? If the regulator is unnecessary, it basically means you can assume it's always on when barebox runs. If regulator_get is called with a property that points to such a node, a dummy regulator is returned with which enable is a no-op. Additionally, do the same for regulator-always-on, so the in-barebox device tree only needs to mark non regulator-always-on that are expected to be always on when it runs due to strapping/fuses as barebox,regulator-always-on. Thoughts? Ahmad -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] ARM: dts: imx6qdl: phycore: Remove emmc vmmc-supply 2019-12-05 8:37 ` Ahmad Fatoum @ 2019-12-05 13:08 ` Stefan Riedmüller 2019-12-05 13:31 ` Ahmad Fatoum 0 siblings, 1 reply; 6+ messages in thread From: Stefan Riedmüller @ 2019-12-05 13:08 UTC (permalink / raw) To: barebox Hi, On 05.12.19 09:37, Ahmad Fatoum wrote: > Hello, > > On 12/5/19 9:07 AM, Sascha Hauer wrote: >> On Tue, Dec 03, 2019 at 02:48:41PM +0100, Stefan Riedmueller wrote: >>> There is no driver for the eMMC's vmmc-supply regulator in the barebox. >>> Use a dummy regulator instead by simply deleting the vmmc-supply >>> property. >>> >>> Signed-off-by: Stefan Riedmueller <s.riedmueller@phytec.de> >>> --- >>> arch/arm/dts/imx6qdl-phytec-phycore-som.dtsi | 1 + >>> 1 file changed, 1 insertion(+) >>> >>> diff --git a/arch/arm/dts/imx6qdl-phytec-phycore-som.dtsi b/arch/arm/dts/imx6qdl-phytec-phycore-som.dtsi >>> index 69f252b42382..974e271f453d 100644 >>> --- a/arch/arm/dts/imx6qdl-phytec-phycore-som.dtsi >>> +++ b/arch/arm/dts/imx6qdl-phytec-phycore-som.dtsi >>> @@ -112,6 +112,7 @@ >>> }; >>> >>> &usdhc4 { >>> + /delete-property/ vmmc-supply; >> >> I don't like this approach very much. It's fine for barebox, but leads >> to problems once you start Linux with the barebox device tree. I'd >> rather go with the unmodified device trees (apart from the things >> barebox changes to the device trees in order to start Linux). > > How about a barebox,regulator-always-on property? If the regulator is unnecessary, > it basically means you can assume it's always on when barebox runs. > > If regulator_get is called with a property that points to such a node, a dummy > regulator is returned with which enable is a no-op. Additionally, do the same > for regulator-always-on, so the in-barebox device tree only needs to mark > non regulator-always-on that are expected to be always on when it runs due to > strapping/fuses as barebox,regulator-always-on. What about regulators that are marked as regulator-always-on but need voltage adjustments? Or isn't this a real use case for the bootloader? Regards, Stefan > > Thoughts? > Ahmad > _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] ARM: dts: imx6qdl: phycore: Remove emmc vmmc-supply 2019-12-05 13:08 ` Stefan Riedmüller @ 2019-12-05 13:31 ` Ahmad Fatoum 2019-12-06 14:23 ` Sascha Hauer 0 siblings, 1 reply; 6+ messages in thread From: Ahmad Fatoum @ 2019-12-05 13:31 UTC (permalink / raw) To: barebox Hi, On 12/5/19 2:08 PM, Stefan Riedmüller wrote: > What about regulators that are marked as regulator-always-on but need voltage adjustments? Or isn't this a real use case for the bootloader? If someone absolutely need the voltage adjustments, they'll have to implement a proper regulator driver to realize it[1]. The [barebox,]regulator-always-on handling I suggest, is only a fallback if there is no regulator found. Cheers Ahmad -- Pengutronix e.K. | | Steuerwalder Str. 21 | https://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] ARM: dts: imx6qdl: phycore: Remove emmc vmmc-supply 2019-12-05 13:31 ` Ahmad Fatoum @ 2019-12-06 14:23 ` Sascha Hauer 0 siblings, 0 replies; 6+ messages in thread From: Sascha Hauer @ 2019-12-06 14:23 UTC (permalink / raw) To: Ahmad Fatoum; +Cc: barebox On Thu, Dec 05, 2019 at 02:31:53PM +0100, Ahmad Fatoum wrote: > Hi, > > On 12/5/19 2:08 PM, Stefan Riedmüller wrote: > > What about regulators that are marked as regulator-always-on but need voltage adjustments? Or isn't this a real use case for the bootloader? > > If someone absolutely need the voltage adjustments, they'll have to implement > a proper regulator driver to realize it[1]. The [barebox,]regulator-always-on > handling I suggest, is only a fallback if there is no regulator found. What if the driver is present but not yet probed? We would return a dummy regulator and no longer -EPROBE_DEFER. Sascha -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2019-12-06 14:23 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2019-12-03 13:48 [PATCH] ARM: dts: imx6qdl: phycore: Remove emmc vmmc-supply Stefan Riedmueller 2019-12-05 8:07 ` Sascha Hauer 2019-12-05 8:37 ` Ahmad Fatoum 2019-12-05 13:08 ` Stefan Riedmüller 2019-12-05 13:31 ` Ahmad Fatoum 2019-12-06 14:23 ` Sascha Hauer
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox