* [PATCH 1/2] include: dt-bindings: mfd: add atmel flexcom include file
@ 2021-08-27 10:44 Eugen Hristev
2021-08-27 10:44 ` [PATCH 2/2] ARM: dts: at91: update flexcom defines using " Eugen Hristev
2021-09-20 6:39 ` [PATCH 1/2] include: dt-bindings: mfd: add atmel flexcom " Eugen.Hristev
0 siblings, 2 replies; 3+ messages in thread
From: Eugen Hristev @ 2021-08-27 10:44 UTC (permalink / raw)
To: u-boot; +Cc: Eugen Hristev
Add dt-bindings include file for Atmel Flexcom hardware block.
This file is copied from Linux kernel.
It is used in devicetrees from Linux.
Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
---
MAINTAINERS | 1 +
include/dt-bindings/mfd/atmel-flexcom.h | 15 +++++++++++++++
2 files changed, 16 insertions(+)
create mode 100644 include/dt-bindings/mfd/atmel-flexcom.h
diff --git a/MAINTAINERS b/MAINTAINERS
index 776ff703b9..f4059c1cf4 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -312,6 +312,7 @@ F: arch/arm/mach-at91/
F: board/atmel/
F: drivers/cpu/at91_cpu.c
F: drivers/misc/microchip_flexcom.c
+F: include/dt-bindings/mfd/atmel-flexcom.h
F: drivers/timer/mchp-pit64b-timer.c
ARM NEXELL S5P4418
diff --git a/include/dt-bindings/mfd/atmel-flexcom.h b/include/dt-bindings/mfd/atmel-flexcom.h
new file mode 100644
index 0000000000..4e2fc32363
--- /dev/null
+++ b/include/dt-bindings/mfd/atmel-flexcom.h
@@ -0,0 +1,15 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+/*
+ * This header provides macros for Atmel Flexcom DT bindings.
+ *
+ * Copyright (C) 2015 Cyrille Pitchen <cyrille.pitchen@atmel.com>
+ */
+
+#ifndef __DT_BINDINGS_ATMEL_FLEXCOM_H__
+#define __DT_BINDINGS_ATMEL_FLEXCOM_H__
+
+#define ATMEL_FLEXCOM_MODE_USART 1
+#define ATMEL_FLEXCOM_MODE_SPI 2
+#define ATMEL_FLEXCOM_MODE_TWI 3
+
+#endif /* __DT_BINDINGS_ATMEL_FLEXCOM_H__ */
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] ARM: dts: at91: update flexcom defines using include file
2021-08-27 10:44 [PATCH 1/2] include: dt-bindings: mfd: add atmel flexcom include file Eugen Hristev
@ 2021-08-27 10:44 ` Eugen Hristev
2021-09-20 6:39 ` [PATCH 1/2] include: dt-bindings: mfd: add atmel flexcom " Eugen.Hristev
1 sibling, 0 replies; 3+ messages in thread
From: Eugen Hristev @ 2021-08-27 10:44 UTC (permalink / raw)
To: u-boot; +Cc: Eugen Hristev
Replace the number in the flexcom-mode property with the define from the
include file.
This corresponds to the approach in Linux kernel.
Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
---
arch/arm/dts/sam9x60ek.dts | 3 ++-
arch/arm/dts/sama7g5ek.dts | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/arch/arm/dts/sam9x60ek.dts b/arch/arm/dts/sam9x60ek.dts
index 77edd593b4..32ffe93b4d 100644
--- a/arch/arm/dts/sam9x60ek.dts
+++ b/arch/arm/dts/sam9x60ek.dts
@@ -7,6 +7,7 @@
* Author: Sandeep Sheriker M <Sandeepsheriker.mallikarjun@microchip.com>
*/
/dts-v1/;
+#include <dt-bindings/mfd/atmel-flexcom.h>
#include "sam9x60.dtsi"
/ {
@@ -57,7 +58,7 @@
};
flx0: flexcom@f801c600 {
- atmel,flexcom-mode = <3>;
+ atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_TWI>;
status = "okay";
i2c@600 {
diff --git a/arch/arm/dts/sama7g5ek.dts b/arch/arm/dts/sama7g5ek.dts
index 3a4fdd38a5..1c59a8aaf8 100644
--- a/arch/arm/dts/sama7g5ek.dts
+++ b/arch/arm/dts/sama7g5ek.dts
@@ -8,6 +8,7 @@
* 2020, Claudiu Beznea <claudiu.beznea@microchip.com>
*/
/dts-v1/;
+#include <dt-bindings/mfd/atmel-flexcom.h>
#include "sama7g5.dtsi"
#include "sama7g5-pinfunc.h"
@@ -64,7 +65,7 @@
};
&flx1 {
- atmel,flexcom-mode = <3>;
+ atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_TWI>;
status = "okay";
};
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/2] include: dt-bindings: mfd: add atmel flexcom include file
2021-08-27 10:44 [PATCH 1/2] include: dt-bindings: mfd: add atmel flexcom include file Eugen Hristev
2021-08-27 10:44 ` [PATCH 2/2] ARM: dts: at91: update flexcom defines using " Eugen Hristev
@ 2021-09-20 6:39 ` Eugen.Hristev
1 sibling, 0 replies; 3+ messages in thread
From: Eugen.Hristev @ 2021-09-20 6:39 UTC (permalink / raw)
To: u-boot
On 8/27/21 1:44 PM, Eugen Hristev wrote:
> Add dt-bindings include file for Atmel Flexcom hardware block.
> This file is copied from Linux kernel.
> It is used in devicetrees from Linux.
>
> Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
> ---
Applied series to u-boot-atmel/next
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-09-20 6:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-27 10:44 [PATCH 1/2] include: dt-bindings: mfd: add atmel flexcom include file Eugen Hristev
2021-08-27 10:44 ` [PATCH 2/2] ARM: dts: at91: update flexcom defines using " Eugen Hristev
2021-09-20 6:39 ` [PATCH 1/2] include: dt-bindings: mfd: add atmel flexcom " Eugen.Hristev
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.