mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] ARM: k3: beagleplay: Enable 32k crystal
@ 2025-06-11  9:36 Lars Schmidt
  2025-06-11 18:24 ` Ahmad Fatoum
  2025-06-12  7:40 ` Sascha Hauer
  0 siblings, 2 replies; 4+ messages in thread
From: Lars Schmidt @ 2025-06-11  9:36 UTC (permalink / raw)
  To: barebox; +Cc: Lars Schmidt

Signed-off-by: Lars Schmidt <l.schmidt@pengutronix.de>
---
 arch/arm/boards/beagleplay/Makefile |  1 +
 arch/arm/boards/beagleplay/board.c  | 30 +++++++++++++++++++++++++++++
 2 files changed, 31 insertions(+)
 create mode 100644 arch/arm/boards/beagleplay/board.c

diff --git a/arch/arm/boards/beagleplay/Makefile b/arch/arm/boards/beagleplay/Makefile
index a8c7320bdb..2d257fb4b2 100644
--- a/arch/arm/boards/beagleplay/Makefile
+++ b/arch/arm/boards/beagleplay/Makefile
@@ -1,2 +1,3 @@
 pbl-y += lowlevel.o
+obj-y += board.o
 pbl-$(CONFIG_MACH_K3_CORTEX_R5) += entry-r5.o ddr.o
diff --git a/arch/arm/boards/beagleplay/board.c b/arch/arm/boards/beagleplay/board.c
new file mode 100644
index 0000000000..dd42f0b7f0
--- /dev/null
+++ b/arch/arm/boards/beagleplay/board.c
@@ -0,0 +1,30 @@
+// SPDX-License-Identifier: GPL-2.0-only
+
+#define pr_fmt(fmt) "beagleplay: " fmt
+
+#include <linux/kernel.h>
+#include <mach/k3/common.h>
+#include <driver.h>
+#include <bbu.h>
+
+static int beagleplay_probe(struct device *dev)
+{
+	am625_enable_32k_crystal();
+
+	return 0;
+}
+
+static __maybe_unused struct of_device_id beagleplay_ids[] = {
+	{
+		.compatible = "beagle,am625-beagleplay",
+	}, {
+		/* sentinel */
+	}
+};
+
+static struct driver beagleplay_driver = {
+	.name = "beagleplay",
+	.probe = beagleplay_probe,
+	.of_compatible = beagleplay_ids,
+};
+coredevice_platform_driver(beagleplay_driver);
-- 
2.39.5




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

* Re: [PATCH] ARM: k3: beagleplay: Enable 32k crystal
  2025-06-11  9:36 [PATCH] ARM: k3: beagleplay: Enable 32k crystal Lars Schmidt
@ 2025-06-11 18:24 ` Ahmad Fatoum
  2025-06-12  7:40   ` Sascha Hauer
  2025-06-12  7:40 ` Sascha Hauer
  1 sibling, 1 reply; 4+ messages in thread
From: Ahmad Fatoum @ 2025-06-11 18:24 UTC (permalink / raw)
  To: Lars Schmidt, barebox

Hello Lars,

On 6/11/25 11:36, Lars Schmidt wrote:
> Signed-off-by: Lars Schmidt <l.schmidt@pengutronix.de>

Would it make sense to describe the existence of the external 32K
crystal in the DT, so we don't need to add code for every board?

Thanks,
Ahmad

> ---
>  arch/arm/boards/beagleplay/Makefile |  1 +
>  arch/arm/boards/beagleplay/board.c  | 30 +++++++++++++++++++++++++++++
>  2 files changed, 31 insertions(+)
>  create mode 100644 arch/arm/boards/beagleplay/board.c
> 
> diff --git a/arch/arm/boards/beagleplay/Makefile b/arch/arm/boards/beagleplay/Makefile
> index a8c7320bdb..2d257fb4b2 100644
> --- a/arch/arm/boards/beagleplay/Makefile
> +++ b/arch/arm/boards/beagleplay/Makefile
> @@ -1,2 +1,3 @@
>  pbl-y += lowlevel.o
> +obj-y += board.o
>  pbl-$(CONFIG_MACH_K3_CORTEX_R5) += entry-r5.o ddr.o
> diff --git a/arch/arm/boards/beagleplay/board.c b/arch/arm/boards/beagleplay/board.c
> new file mode 100644
> index 0000000000..dd42f0b7f0
> --- /dev/null
> +++ b/arch/arm/boards/beagleplay/board.c
> @@ -0,0 +1,30 @@
> +// SPDX-License-Identifier: GPL-2.0-only
> +
> +#define pr_fmt(fmt) "beagleplay: " fmt
> +
> +#include <linux/kernel.h>
> +#include <mach/k3/common.h>
> +#include <driver.h>
> +#include <bbu.h>
> +
> +static int beagleplay_probe(struct device *dev)
> +{
> +	am625_enable_32k_crystal();
> +
> +	return 0;
> +}
> +
> +static __maybe_unused struct of_device_id beagleplay_ids[] = {
> +	{
> +		.compatible = "beagle,am625-beagleplay",
> +	}, {
> +		/* sentinel */
> +	}
> +};
> +
> +static struct driver beagleplay_driver = {
> +	.name = "beagleplay",
> +	.probe = beagleplay_probe,
> +	.of_compatible = beagleplay_ids,
> +};
> +coredevice_platform_driver(beagleplay_driver);

-- 
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 |




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

* Re: [PATCH] ARM: k3: beagleplay: Enable 32k crystal
  2025-06-11  9:36 [PATCH] ARM: k3: beagleplay: Enable 32k crystal Lars Schmidt
  2025-06-11 18:24 ` Ahmad Fatoum
@ 2025-06-12  7:40 ` Sascha Hauer
  1 sibling, 0 replies; 4+ messages in thread
From: Sascha Hauer @ 2025-06-12  7:40 UTC (permalink / raw)
  To: barebox, Lars Schmidt


On Wed, 11 Jun 2025 11:36:22 +0200, Lars Schmidt wrote:
> 


Applied, thanks!

[1/1] ARM: k3: beagleplay: Enable 32k crystal
      https://git.pengutronix.de/cgit/barebox/commit/?id=b5883c42b29c (link may not be stable)

Best regards,
-- 
Sascha Hauer <s.hauer@pengutronix.de>




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

* Re: [PATCH] ARM: k3: beagleplay: Enable 32k crystal
  2025-06-11 18:24 ` Ahmad Fatoum
@ 2025-06-12  7:40   ` Sascha Hauer
  0 siblings, 0 replies; 4+ messages in thread
From: Sascha Hauer @ 2025-06-12  7:40 UTC (permalink / raw)
  To: Ahmad Fatoum; +Cc: Lars Schmidt, barebox

On Wed, Jun 11, 2025 at 08:24:22PM +0200, Ahmad Fatoum wrote:
> Hello Lars,
> 
> On 6/11/25 11:36, Lars Schmidt wrote:
> > Signed-off-by: Lars Schmidt <l.schmidt@pengutronix.de>
> 
> Would it make sense to describe the existence of the external 32K
> crystal in the DT, so we don't need to add code for every board?

Yes. For now it's ok though.

Sascha

> 
> Thanks,
> Ahmad
> 
> > ---
> >  arch/arm/boards/beagleplay/Makefile |  1 +
> >  arch/arm/boards/beagleplay/board.c  | 30 +++++++++++++++++++++++++++++
> >  2 files changed, 31 insertions(+)
> >  create mode 100644 arch/arm/boards/beagleplay/board.c
> > 
> > diff --git a/arch/arm/boards/beagleplay/Makefile b/arch/arm/boards/beagleplay/Makefile
> > index a8c7320bdb..2d257fb4b2 100644
> > --- a/arch/arm/boards/beagleplay/Makefile
> > +++ b/arch/arm/boards/beagleplay/Makefile
> > @@ -1,2 +1,3 @@
> >  pbl-y += lowlevel.o
> > +obj-y += board.o
> >  pbl-$(CONFIG_MACH_K3_CORTEX_R5) += entry-r5.o ddr.o
> > diff --git a/arch/arm/boards/beagleplay/board.c b/arch/arm/boards/beagleplay/board.c
> > new file mode 100644
> > index 0000000000..dd42f0b7f0
> > --- /dev/null
> > +++ b/arch/arm/boards/beagleplay/board.c
> > @@ -0,0 +1,30 @@
> > +// SPDX-License-Identifier: GPL-2.0-only
> > +
> > +#define pr_fmt(fmt) "beagleplay: " fmt
> > +
> > +#include <linux/kernel.h>
> > +#include <mach/k3/common.h>
> > +#include <driver.h>
> > +#include <bbu.h>
> > +
> > +static int beagleplay_probe(struct device *dev)
> > +{
> > +	am625_enable_32k_crystal();
> > +
> > +	return 0;
> > +}
> > +
> > +static __maybe_unused struct of_device_id beagleplay_ids[] = {
> > +	{
> > +		.compatible = "beagle,am625-beagleplay",
> > +	}, {
> > +		/* sentinel */
> > +	}
> > +};
> > +
> > +static struct driver beagleplay_driver = {
> > +	.name = "beagleplay",
> > +	.probe = beagleplay_probe,
> > +	.of_compatible = beagleplay_ids,
> > +};
> > +coredevice_platform_driver(beagleplay_driver);
> 
> -- 
> 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 |
> 
> 
> 

-- 
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 |



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

end of thread, other threads:[~2025-06-12  8:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-06-11  9:36 [PATCH] ARM: k3: beagleplay: Enable 32k crystal Lars Schmidt
2025-06-11 18:24 ` Ahmad Fatoum
2025-06-12  7:40   ` Sascha Hauer
2025-06-12  7:40 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox