* [PATCH 1/2] pinctrl: bcm2835: add pinctrl pre-processor define
@ 2015-04-12 12:33 Alexander Stein
[not found] ` <1428842036-14202-1-git-send-email-alexanders83-S0/GAf8tV78@public.gmane.org>
0 siblings, 1 reply; 6+ messages in thread
From: Alexander Stein @ 2015-04-12 12:33 UTC (permalink / raw)
To: Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
Stephen Warren, Lee Jones
Cc: Alexander Stein, devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-rpi-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
This adds defines for the BCM2835 function selections. This is notably
useful as the functions are not ordered.
Signed-off-by: Alexander Stein <alexanders83-S0/GAf8tV78@public.gmane.org>
---
include/dt-bindings/pinctrl/bcm2835.h | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
create mode 100644 include/dt-bindings/pinctrl/bcm2835.h
diff --git a/include/dt-bindings/pinctrl/bcm2835.h b/include/dt-bindings/pinctrl/bcm2835.h
new file mode 100644
index 000000000000..e90f437ce4a6
--- /dev/null
+++ b/include/dt-bindings/pinctrl/bcm2835.h
@@ -0,0 +1,20 @@
+/*
+ * This header provides constants for bcm2835 pinctrl bindings.
+ *
+ * Copyright (C) 2015 Alexander Stein <alexanders83-S0/GAf8tV78@public.gmane.org>
+ *
+ */
+
+#ifndef __DT_BINDINGS_BCM2835_PINCTRL_H__
+#define __DT_BINDINGS_BCM2835_PINCTRL_H__
+
+#define BCM2835_GPIO_INPUT 0
+#define BCM2835_GPIO_OUTPUT 1
+#define BCM2835_GPIO_ALT0 4
+#define BCM2835_GPIO_ALT1 5
+#define BCM2835_GPIO_ALT2 6
+#define BCM2835_GPIO_ALT3 7
+#define BCM2835_GPIO_ALT4 3
+#define BCM2835_GPIO_ALT5 2
+
+#endif /* __DT_BINDINGS_BCM2835_PINCTRL_H__ */
--
2.3.5
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] ARM: bcm2835: Use pinctrl defines
[not found] ` <1428842036-14202-1-git-send-email-alexanders83-S0/GAf8tV78@public.gmane.org>
@ 2015-04-12 12:33 ` Alexander Stein
2015-04-13 3:22 ` [PATCH 1/2] pinctrl: bcm2835: add pinctrl pre-processor define Stephen Warren
2015-04-13 16:31 ` Stefan Wahren
2 siblings, 0 replies; 6+ messages in thread
From: Alexander Stein @ 2015-04-12 12:33 UTC (permalink / raw)
To: Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
Stephen Warren, Lee Jones
Cc: Alexander Stein, devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-rpi-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
Using the more descriptive defines rather than pure numbers we can rid
of the comments.
We need to use #include to use CPP for the new include directory.
Signed-off-by: Alexander Stein <alexanders83-S0/GAf8tV78@public.gmane.org>
---
arch/arm/boot/dts/bcm2835-rpi-b-plus.dts | 4 ++--
arch/arm/boot/dts/bcm2835-rpi-b.dts | 6 +++---
arch/arm/boot/dts/bcm2835-rpi.dtsi | 8 ++++----
arch/arm/boot/dts/bcm2835.dtsi | 3 ++-
4 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts b/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts
index e479515099c3..672b8c5d6a62 100644
--- a/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts
+++ b/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts
@@ -1,5 +1,5 @@
/dts-v1/;
-/include/ "bcm2835-rpi.dtsi"
+#include "bcm2835-rpi.dtsi"
/ {
compatible = "raspberrypi,model-b-plus", "brcm,bcm2835";
@@ -25,6 +25,6 @@
/* I2S interface */
i2s_alt0: i2s_alt0 {
brcm,pins = <18 19 20 21>;
- brcm,function = <4>; /* alt0 */
+ brcm,function = <BCM2835_GPIO_ALT0>;
};
};
diff --git a/arch/arm/boot/dts/bcm2835-rpi-b.dts b/arch/arm/boot/dts/bcm2835-rpi-b.dts
index bafa46fc226a..ae0f1a930630 100644
--- a/arch/arm/boot/dts/bcm2835-rpi-b.dts
+++ b/arch/arm/boot/dts/bcm2835-rpi-b.dts
@@ -1,5 +1,5 @@
/dts-v1/;
-/include/ "bcm2835-rpi.dtsi"
+#include "bcm2835-rpi.dtsi"
/ {
compatible = "raspberrypi,model-b", "brcm,bcm2835";
@@ -18,6 +18,6 @@
/* I2S interface */
i2s_alt2: i2s_alt2 {
brcm,pins = <28 29 30 31>;
- brcm,function = <6>; /* alt2 */
+ brcm,function = <BCM2835_GPIO_ALT2>;
};
-};
+};
\ No newline at end of file
diff --git a/arch/arm/boot/dts/bcm2835-rpi.dtsi b/arch/arm/boot/dts/bcm2835-rpi.dtsi
index c7064487017d..1b484703f57c 100644
--- a/arch/arm/boot/dts/bcm2835-rpi.dtsi
+++ b/arch/arm/boot/dts/bcm2835-rpi.dtsi
@@ -1,4 +1,4 @@
-/include/ "bcm2835.dtsi"
+#include "bcm2835.dtsi"
/ {
memory {
@@ -21,17 +21,17 @@
gpioout: gpioout {
brcm,pins = <6>;
- brcm,function = <1>; /* GPIO out */
+ brcm,function = <BCM2835_GPIO_OUTPUT>;
};
alt0: alt0 {
brcm,pins = <0 1 2 3 4 5 7 8 9 10 11 14 15 40 45>;
- brcm,function = <4>; /* alt0 */
+ brcm,function = <BCM2835_GPIO_ALT0>;
};
alt3: alt3 {
brcm,pins = <48 49 50 51 52 53>;
- brcm,function = <7>; /* alt3 */
+ brcm,function = <BCM2835_GPIO_ALT3>;
};
};
diff --git a/arch/arm/boot/dts/bcm2835.dtsi b/arch/arm/boot/dts/bcm2835.dtsi
index 3342cb1407bc..e39737ba47b4 100644
--- a/arch/arm/boot/dts/bcm2835.dtsi
+++ b/arch/arm/boot/dts/bcm2835.dtsi
@@ -1,4 +1,5 @@
-/include/ "skeleton.dtsi"
+#include "skeleton.dtsi"
+#include <dt-bindings/pinctrl/bcm2835.h>
/ {
compatible = "brcm,bcm2835";
--
2.3.5
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] pinctrl: bcm2835: add pinctrl pre-processor define
[not found] ` <1428842036-14202-1-git-send-email-alexanders83-S0/GAf8tV78@public.gmane.org>
2015-04-12 12:33 ` [PATCH 2/2] ARM: bcm2835: Use pinctrl defines Alexander Stein
@ 2015-04-13 3:22 ` Stephen Warren
2015-04-13 16:31 ` Stefan Wahren
2 siblings, 0 replies; 6+ messages in thread
From: Stephen Warren @ 2015-04-13 3:22 UTC (permalink / raw)
To: Alexander Stein, Lee Jones
Cc: Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-rpi-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
On 04/12/2015 06:33 AM, Alexander Stein wrote:
> This adds defines for the BCM2835 function selections. This is notably
> useful as the functions are not ordered.
The series,
Acked-by: Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] pinctrl: bcm2835: add pinctrl pre-processor define
[not found] ` <1428842036-14202-1-git-send-email-alexanders83-S0/GAf8tV78@public.gmane.org>
2015-04-12 12:33 ` [PATCH 2/2] ARM: bcm2835: Use pinctrl defines Alexander Stein
2015-04-13 3:22 ` [PATCH 1/2] pinctrl: bcm2835: add pinctrl pre-processor define Stephen Warren
@ 2015-04-13 16:31 ` Stefan Wahren
[not found] ` <1128901690.288098.1428942677965.JavaMail.open-xchange-h4m1HHXQYNGvCDav5jC2oMgmgJlYmuWJ@public.gmane.org>
2 siblings, 1 reply; 6+ messages in thread
From: Stefan Wahren @ 2015-04-13 16:31 UTC (permalink / raw)
To: Alexander Stein, Lee Jones, Pawel Moll, Rob Herring, Ian Campbell,
Kumar Gala, Stephen Warren, Mark Rutland
Cc: linux-rpi-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
devicetree-u79uwXL29TY76Z2rM5mHXA
Hi Alexander,
> Alexander Stein <alexanders83-S0/GAf8tV78@public.gmane.org> hat am 12. April 2015 um 14:33
> geschrieben:
>
>
> This adds defines for the BCM2835 function selections. This is notably
> useful as the functions are not ordered.
if you look at Lee's repository then you will see this is already implemented.
Best regards
Stefan
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Re: [PATCH 1/2] pinctrl: bcm2835: add pinctrl pre-processor define
[not found] ` <1128901690.288098.1428942677965.JavaMail.open-xchange-h4m1HHXQYNGvCDav5jC2oMgmgJlYmuWJ@public.gmane.org>
@ 2015-04-13 17:43 ` Alexander Stein
2015-04-13 20:14 ` Stefan Wahren
0 siblings, 1 reply; 6+ messages in thread
From: Alexander Stein @ 2015-04-13 17:43 UTC (permalink / raw)
To: Stefan Wahren
Cc: Lee Jones, Pawel Moll, Rob Herring, Ian Campbell, Kumar Gala,
Stephen Warren, Mark Rutland,
linux-rpi-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
devicetree-u79uwXL29TY76Z2rM5mHXA
On Monday 13 April 2015, 18:31:17 wrote Stefan Wahren:
> Hi Alexander,
>
> > Alexander Stein <alexanders83-S0/GAf8tV78@public.gmane.org> hat am 12. April 2015 um 14:33
> > geschrieben:
> >
> >
> > This adds defines for the BCM2835 function selections. This is notably
> > useful as the functions are not ordered.
>
> if you look at Lee's repository then you will see this is already
implemented.
Thanks for that information. But I've yet to find it, those 2 on
https://git.kernel.org/cgit/ don't seem to contain that. Could you please give
me an URL for that repository + branch? Thanks a lot.
Best regards,
Alexander
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Re: [PATCH 1/2] pinctrl: bcm2835: add pinctrl pre-processor define
2015-04-13 17:43 ` Alexander Stein
@ 2015-04-13 20:14 ` Stefan Wahren
0 siblings, 0 replies; 6+ messages in thread
From: Stefan Wahren @ 2015-04-13 20:14 UTC (permalink / raw)
To: Alexander Stein
Cc: Lee Jones, Pawel Moll, Rob Herring, Ian Campbell, Kumar Gala,
Stephen Warren, Mark Rutland,
linux-rpi-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
devicetree-u79uwXL29TY76Z2rM5mHXA
Hi Alexander,
> Alexander Stein <alexanders83-S0/GAf8tV78@public.gmane.org> hat am 13. April 2015 um 19:43
> geschrieben:
>
>
> On Monday 13 April 2015, 18:31:17 wrote Stefan Wahren:
> > Hi Alexander,
> >
> > > Alexander Stein <alexanders83-S0/GAf8tV78@public.gmane.org> hat am 12. April 2015 um 14:33
> > > geschrieben:
> > >
> > >
> > > This adds defines for the BCM2835 function selections. This is notably
> > > useful as the functions are not ordered.
> >
> > if you look at Lee's repository then you will see this is already
> implemented.
>
> Thanks for that information. But I've yet to find it, those 2 on
> https://git.kernel.org/cgit/ don't seem to contain that. Could you please give
> me an URL for that repository + branch? Thanks a lot.
sorry for the confusion:
https://git.kernel.org/cgit/linux/kernel/git/rpi/linux-rpi.git/log/?h=for-rpi-next
>
> Best regards,
> Alexander
>
Stefan
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-04-13 20:14 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-12 12:33 [PATCH 1/2] pinctrl: bcm2835: add pinctrl pre-processor define Alexander Stein
[not found] ` <1428842036-14202-1-git-send-email-alexanders83-S0/GAf8tV78@public.gmane.org>
2015-04-12 12:33 ` [PATCH 2/2] ARM: bcm2835: Use pinctrl defines Alexander Stein
2015-04-13 3:22 ` [PATCH 1/2] pinctrl: bcm2835: add pinctrl pre-processor define Stephen Warren
2015-04-13 16:31 ` Stefan Wahren
[not found] ` <1128901690.288098.1428942677965.JavaMail.open-xchange-h4m1HHXQYNGvCDav5jC2oMgmgJlYmuWJ@public.gmane.org>
2015-04-13 17:43 ` Alexander Stein
2015-04-13 20:14 ` Stefan Wahren
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).