linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] arm64: dts: imx8mm-beacon-som: Fix RTC aliases
@ 2020-11-25 21:03 Adam Ford
  2020-11-25 21:03 ` [PATCH 2/2] arm64: dts: imx8mm-beacon-som: Fix PMIC clock error Adam Ford
  2020-11-26  8:03 ` [PATCH 1/2] arm64: dts: imx8mm-beacon-som: Fix RTC aliases Krzysztof Kozlowski
  0 siblings, 2 replies; 4+ messages in thread
From: Adam Ford @ 2020-11-25 21:03 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: devicetree, Fabio Estevam, Adam Ford, Sascha Hauer, aford,
	Krzysztof Kozlowski, linux-kernel, Rob Herring, NXP Linux Team,
	Pengutronix Kernel Team, Shawn Guo

On the i.MX8MM Beacon SOM, there is an RTC chip which is fed power
from the baseboard during power off.  The SNVS RTC integrated into
the SoC is not fed power.  Depending on the order the modules are
loaded, this can be a problem if the external RTC isn't rtc0.

Make the alias for rtc0 point to the external RTC all the time and
rtc1 point to the SVNS in order to correctly hold date/time over
a power-cycle.

Fixes: 593816fa2f35 ("arm64: dts: imx: Add Beacon i.MX8m-Mini development kit")

Signed-off-by: Adam Ford <aford173@gmail.com>

diff --git a/arch/arm64/boot/dts/freescale/imx8mm-beacon-som.dtsi b/arch/arm64/boot/dts/freescale/imx8mm-beacon-som.dtsi
index 5565775270f9..9bdefbba9e90 100644
--- a/arch/arm64/boot/dts/freescale/imx8mm-beacon-som.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mm-beacon-som.dtsi
@@ -4,6 +4,11 @@
  */
 
 / {
+	aliases {
+		rtc0 = &rtc;
+		rtc1 = &snvs_rtc;
+	};
+
 	usdhc1_pwrseq: usdhc1_pwrseq {
 		compatible = "mmc-pwrseq-simple";
 		pinctrl-names = "default";
@@ -219,7 +224,7 @@ eeprom@50 {
 		reg = <0x50>;
 	};
 
-	rtc@51 {
+	rtc: rtc@51 {
 		compatible = "nxp,pcf85263";
 		reg = <0x51>;
 	};
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] arm64: dts: imx8mm-beacon-som:  Fix PMIC clock error
  2020-11-25 21:03 [PATCH 1/2] arm64: dts: imx8mm-beacon-som: Fix RTC aliases Adam Ford
@ 2020-11-25 21:03 ` Adam Ford
  2020-11-26  8:07   ` Krzysztof Kozlowski
  2020-11-26  8:03 ` [PATCH 1/2] arm64: dts: imx8mm-beacon-som: Fix RTC aliases Krzysztof Kozlowski
  1 sibling, 1 reply; 4+ messages in thread
From: Adam Ford @ 2020-11-25 21:03 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: devicetree, Fabio Estevam, Adam Ford, Sascha Hauer, aford,
	Krzysztof Kozlowski, linux-kernel, Rob Herring, NXP Linux Team,
	Pengutronix Kernel Team, Shawn Guo

The PMIC throws an errors because the clock isn't assigned to it.
Fix this by assigning the clocks info.

Fixes:  acb01032e11a ("arm64: defconfig: Enable clock driver for ROHM BD718x7 PMIC")

Signed-off-by: Adam Ford <aford173@gmail.com>

diff --git a/arch/arm64/boot/dts/freescale/imx8mm-beacon-som.dtsi b/arch/arm64/boot/dts/freescale/imx8mm-beacon-som.dtsi
index 9bdefbba9e90..d897913537ca 100644
--- a/arch/arm64/boot/dts/freescale/imx8mm-beacon-som.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mm-beacon-som.dtsi
@@ -111,6 +111,10 @@ pmic@4b {
 		interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
 		rohm,reset-snvs-powered;
 
+		#clock-cells = <0>;
+		clocks = <&osc_32k 0>;
+		clock-output-names = "clk-32k-out";
+
 		regulators {
 			buck1_reg: BUCK1 {
 				regulator-name = "buck1";
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] arm64: dts: imx8mm-beacon-som: Fix RTC aliases
  2020-11-25 21:03 [PATCH 1/2] arm64: dts: imx8mm-beacon-som: Fix RTC aliases Adam Ford
  2020-11-25 21:03 ` [PATCH 2/2] arm64: dts: imx8mm-beacon-som: Fix PMIC clock error Adam Ford
@ 2020-11-26  8:03 ` Krzysztof Kozlowski
  1 sibling, 0 replies; 4+ messages in thread
From: Krzysztof Kozlowski @ 2020-11-26  8:03 UTC (permalink / raw)
  To: Adam Ford
  Cc: devicetree, Fabio Estevam, Sascha Hauer, aford, linux-kernel,
	Rob Herring, NXP Linux Team, Pengutronix Kernel Team, Shawn Guo,
	linux-arm-kernel

On Wed, Nov 25, 2020 at 03:03:38PM -0600, Adam Ford wrote:
> On the i.MX8MM Beacon SOM, there is an RTC chip which is fed power
> from the baseboard during power off.  The SNVS RTC integrated into
> the SoC is not fed power.  Depending on the order the modules are
> loaded, this can be a problem if the external RTC isn't rtc0.
> 
> Make the alias for rtc0 point to the external RTC all the time and
> rtc1 point to the SVNS in order to correctly hold date/time over
> a power-cycle.
> 
> Fixes: 593816fa2f35 ("arm64: dts: imx: Add Beacon i.MX8m-Mini development kit")

There is no bug here so this is not a fix. Please remove the "fix" from
the title and "Fixes" tag.

This is purely for making user-space RTC lookup easier, nothing to fix.

Best regards,
Krzysztof

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 2/2] arm64: dts: imx8mm-beacon-som:  Fix PMIC clock error
  2020-11-25 21:03 ` [PATCH 2/2] arm64: dts: imx8mm-beacon-som: Fix PMIC clock error Adam Ford
@ 2020-11-26  8:07   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 4+ messages in thread
From: Krzysztof Kozlowski @ 2020-11-26  8:07 UTC (permalink / raw)
  To: Adam Ford
  Cc: devicetree, Fabio Estevam, Sascha Hauer, aford, linux-kernel,
	Rob Herring, NXP Linux Team, Pengutronix Kernel Team, Shawn Guo,
	linux-arm-kernel

On Wed, Nov 25, 2020 at 03:03:39PM -0600, Adam Ford wrote:
> The PMIC throws an errors because the clock isn't assigned to it.
> Fix this by assigning the clocks info.
> 
> Fixes:  acb01032e11a ("arm64: defconfig: Enable clock driver for ROHM BD718x7 PMIC")

Hi,

This is not the correct Fixes tag. The defconfig change did not
introduce any bug in DTS. The error message was there before, regardless
of defconfigs. Defconfigs are merely a development or distro aid, not a
definition of working state.

If it really was a bug, then the commit adding DTS is to blame.

Second, I am not sure if there is a bug here to fix - having incomplete
DTS is a bug? Missing device nodes in DTS is a bug?

Also, pay attention to proper white spaces. There is only single
whitespace after ':' and no blank line after entire Fixes tag.

Best regards,
Krzysztof

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-11-26  8:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-25 21:03 [PATCH 1/2] arm64: dts: imx8mm-beacon-som: Fix RTC aliases Adam Ford
2020-11-25 21:03 ` [PATCH 2/2] arm64: dts: imx8mm-beacon-som: Fix PMIC clock error Adam Ford
2020-11-26  8:07   ` Krzysztof Kozlowski
2020-11-26  8:03 ` [PATCH 1/2] arm64: dts: imx8mm-beacon-som: Fix RTC aliases Krzysztof Kozlowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).