* [PATCH 1/4] ARM: ux540: Add ccu8540-uib-v3 Device Tree Machine
2013-05-29 13:33 [PATCH 0/4] Introduce ccu8540 uib-v3 Gabriel Fernandez
@ 2013-05-29 13:33 ` Gabriel Fernandez
2013-05-29 15:50 ` Lee Jones
2013-05-29 13:33 ` [PATCH 2/4] ARM: u8540: Add device tree support for lp5521 leds Gabriel Fernandez
` (2 subsequent siblings)
3 siblings, 1 reply; 10+ messages in thread
From: Gabriel Fernandez @ 2013-05-29 13:33 UTC (permalink / raw)
To: linux-kernel
Cc: Lee Jones, Linus Walleij, Olivier Clergeaud, Gabriel Fernandez
From: Gabriel Fernandez <gabriel.fernandez@st.com>
This board includes the U8540 platform and specifies only the
ST-Ericsson UIB version 3.
---
arch/arm/boot/dts/Makefile | 1 +
arch/arm/boot/dts/ccu8540-uib-v3.dts | 16 ++++++++++++++++
2 files changed, 17 insertions(+)
create mode 100644 arch/arm/boot/dts/ccu8540-uib-v3.dts
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 1995988..29cb5db 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -159,6 +159,7 @@ dtb-$(CONFIG_ARCH_U8500) += snowball.dtb \
hrefprev60.dtb \
hrefv60plus.dtb \
ccu8540.dtb \
+ ccu8540-uib-v3.dtb \
ccu9540.dtb
dtb-$(CONFIG_ARCH_SHMOBILE) += emev2-kzm9d.dtb \
r8a7740-armadillo800eva.dtb \
diff --git a/arch/arm/boot/dts/ccu8540-uib-v3.dts b/arch/arm/boot/dts/ccu8540-uib-v3.dts
new file mode 100644
index 0000000..4b4982e
--- /dev/null
+++ b/arch/arm/boot/dts/ccu8540-uib-v3.dts
@@ -0,0 +1,16 @@
+/*
+ * Copyright 2012 ST-Ericsson AB
+ *
+ * The code contained herein is licensed under the GNU General Public
+ * License. You may obtain a copy of the GNU General Public License
+ * Version 2 or later at the following locations:
+ *
+ * http://www.opensource.org/licenses/gpl-license.html
+ * http://www.gnu.org/copyleft/gpl.html
+ */
+
+#include "ccu8540.dts"
+
+/ {
+ model = "ST-Ericsson U8540 platform with device tree UIB v3";
+};
--
1.8.1.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH 1/4] ARM: ux540: Add ccu8540-uib-v3 Device Tree Machine
2013-05-29 13:33 ` [PATCH 1/4] ARM: ux540: Add ccu8540-uib-v3 Device Tree Machine Gabriel Fernandez
@ 2013-05-29 15:50 ` Lee Jones
2013-05-30 13:20 ` Gabriel Fernandez
0 siblings, 1 reply; 10+ messages in thread
From: Lee Jones @ 2013-05-29 15:50 UTC (permalink / raw)
To: Gabriel Fernandez
Cc: linux-kernel, Linus Walleij, Olivier Clergeaud, Gabriel Fernandez
On Wed, 29 May 2013, Gabriel Fernandez wrote:
> From: Gabriel Fernandez <gabriel.fernandez@st.com>
>
> This board includes the U8540 platform and specifies only the
> ST-Ericsson UIB version 3.
I'm confused by this.
Is it a new board, or just a UIB?
> ---
> arch/arm/boot/dts/Makefile | 1 +
> arch/arm/boot/dts/ccu8540-uib-v3.dts | 16 ++++++++++++++++
> 2 files changed, 17 insertions(+)
> create mode 100644 arch/arm/boot/dts/ccu8540-uib-v3.dts
>
> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
> index 1995988..29cb5db 100644
> --- a/arch/arm/boot/dts/Makefile
> +++ b/arch/arm/boot/dts/Makefile
> @@ -159,6 +159,7 @@ dtb-$(CONFIG_ARCH_U8500) += snowball.dtb \
> hrefprev60.dtb \
> hrefv60plus.dtb \
> ccu8540.dtb \
> + ccu8540-uib-v3.dtb \
> ccu9540.dtb
> dtb-$(CONFIG_ARCH_SHMOBILE) += emev2-kzm9d.dtb \
> r8a7740-armadillo800eva.dtb \
> diff --git a/arch/arm/boot/dts/ccu8540-uib-v3.dts b/arch/arm/boot/dts/ccu8540-uib-v3.dts
> new file mode 100644
> index 0000000..4b4982e
> --- /dev/null
> +++ b/arch/arm/boot/dts/ccu8540-uib-v3.dts
If this is a UIB, it should be an include file (*.dtsi).
> @@ -0,0 +1,16 @@
> +/*
> + * Copyright 2012 ST-Ericsson AB
> + *
> + * The code contained herein is licensed under the GNU General Public
> + * License. You may obtain a copy of the GNU General Public License
> + * Version 2 or later at the following locations:
> + *
> + * http://www.opensource.org/licenses/gpl-license.html
> + * http://www.gnu.org/copyleft/gpl.html
> + */
> +
> +#include "ccu8540.dts"
No, the other way round.
ccu8540.dts should include this one.
> +/ {
> + model = "ST-Ericsson U8540 platform with device tree UIB v3";
> +};
This patch doesn't actually do anything.
Fix it up, so it at least as some functionality.
--
Lee Jones
Linaro ST-Ericsson Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/4] ARM: ux540: Add ccu8540-uib-v3 Device Tree Machine
2013-05-29 15:50 ` Lee Jones
@ 2013-05-30 13:20 ` Gabriel Fernandez
2013-06-04 8:57 ` Linus Walleij
0 siblings, 1 reply; 10+ messages in thread
From: Gabriel Fernandez @ 2013-05-30 13:20 UTC (permalink / raw)
To: Lee Jones
Cc: linux-kernel, Linus Walleij, Olivier Clergeaud, Gabriel Fernandez
On 29 May 2013 17:50, Lee Jones <lee.jones@linaro.org> wrote:
> On Wed, 29 May 2013, Gabriel Fernandez wrote:
>
>> From: Gabriel Fernandez <gabriel.fernandez@st.com>
>>
>> This board includes the U8540 platform and specifies only the
>> ST-Ericsson UIB version 3.
>
> I'm confused by this.
>
> Is it a new board, or just a UIB?
For me it's a new board.
ccu8540.dts is a board without uib.
You can can plug on this board some different uibs.
That's why, i created a ccu8540-uib-v3.dts board in which i included a
common board ccu8540.dts
Another solution is to create one *.dtsi file with all uibs for
ccu8540 and makes a dynamique detection.
Linus, Lee what do you think about that ?
>
>> ---
>> arch/arm/boot/dts/Makefile | 1 +
>> arch/arm/boot/dts/ccu8540-uib-v3.dts | 16 ++++++++++++++++
>> 2 files changed, 17 insertions(+)
>> create mode 100644 arch/arm/boot/dts/ccu8540-uib-v3.dts
>>
>> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
>> index 1995988..29cb5db 100644
>> --- a/arch/arm/boot/dts/Makefile
>> +++ b/arch/arm/boot/dts/Makefile
>> @@ -159,6 +159,7 @@ dtb-$(CONFIG_ARCH_U8500) += snowball.dtb \
>> hrefprev60.dtb \
>> hrefv60plus.dtb \
>> ccu8540.dtb \
>> + ccu8540-uib-v3.dtb \
>> ccu9540.dtb
>> dtb-$(CONFIG_ARCH_SHMOBILE) += emev2-kzm9d.dtb \
>> r8a7740-armadillo800eva.dtb \
>> diff --git a/arch/arm/boot/dts/ccu8540-uib-v3.dts b/arch/arm/boot/dts/ccu8540-uib-v3.dts
>> new file mode 100644
>> index 0000000..4b4982e
>> --- /dev/null
>> +++ b/arch/arm/boot/dts/ccu8540-uib-v3.dts
>
> If this is a UIB, it should be an include file (*.dtsi).
>
>> @@ -0,0 +1,16 @@
>> +/*
>> + * Copyright 2012 ST-Ericsson AB
>> + *
>> + * The code contained herein is licensed under the GNU General Public
>> + * License. You may obtain a copy of the GNU General Public License
>> + * Version 2 or later at the following locations:
>> + *
>> + * http://www.opensource.org/licenses/gpl-license.html
>> + * http://www.gnu.org/copyleft/gpl.html
>> + */
>> +
>> +#include "ccu8540.dts"
>
> No, the other way round.
>
> ccu8540.dts should include this one.
>
>> +/ {
>> + model = "ST-Ericsson U8540 platform with device tree UIB v3";
>> +};
>
> This patch doesn't actually do anything.
>
> Fix it up, so it at least as some functionality.
>
> --
> Lee Jones
> Linaro ST-Ericsson Landing Team Lead
> Linaro.org │ Open source software for ARM SoCs
> Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/4] ARM: ux540: Add ccu8540-uib-v3 Device Tree Machine
2013-05-30 13:20 ` Gabriel Fernandez
@ 2013-06-04 8:57 ` Linus Walleij
0 siblings, 0 replies; 10+ messages in thread
From: Linus Walleij @ 2013-06-04 8:57 UTC (permalink / raw)
To: Gabriel Fernandez
Cc: Lee Jones, linux-kernel, Olivier Clergeaud, Gabriel Fernandez
On Thu, May 30, 2013 at 3:20 PM, Gabriel Fernandez
<gabriel.fernandez.st@gmail.com> wrote:
[Lee]
>> Is it a new board, or just a UIB?
>
> For me it's a new board.
>
> ccu8540.dts is a board without uib.
> You can can plug on this board some different uibs.
> That's why, i created a ccu8540-uib-v3.dts board in which i included a
> common board ccu8540.dts
So that means that ccu8540.dts will boot the system even
without any UIB if I understand correctly. Anything that
pertains to the UIB should be in the UIB overlay.
> Another solution is to create one *.dtsi file with all uibs for
> ccu8540 and makes a dynamique detection.
> Linus, Lee what do you think about that ?
I'm lost on this, dynamic detection would be done in the
boot loader, usually this just encodes one, static tree.
The first approach seems OK with me.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 2/4] ARM: u8540: Add device tree support for lp5521 leds
2013-05-29 13:33 [PATCH 0/4] Introduce ccu8540 uib-v3 Gabriel Fernandez
2013-05-29 13:33 ` [PATCH 1/4] ARM: ux540: Add ccu8540-uib-v3 Device Tree Machine Gabriel Fernandez
@ 2013-05-29 13:33 ` Gabriel Fernandez
2013-05-29 15:52 ` Lee Jones
2013-05-29 13:33 ` [PATCH 3/4] ARM: u8540: Add device tree support for bh1780 Gabriel Fernandez
2013-05-29 13:33 ` [PATCH 4/4] ARM: u8540: Add DT probing for SFH7741 Proximity Sensor Gabriel Fernandez
3 siblings, 1 reply; 10+ messages in thread
From: Gabriel Fernandez @ 2013-05-29 13:33 UTC (permalink / raw)
To: linux-kernel
Cc: Lee Jones, Linus Walleij, Olivier Clergeaud, Gabriel Fernandez,
Gabriel Fernandez
From: Gabriel Fernandez <gabriel.fernandez@st.com>
This patch adds DT probing of lp5521 leds for u8540.
Signed-off-by: Gabriel Fernandez <gabriel.fernandez@stericsson.com>
---
arch/arm/boot/dts/ccu8540-uib-v3.dts | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/arch/arm/boot/dts/ccu8540-uib-v3.dts b/arch/arm/boot/dts/ccu8540-uib-v3.dts
index 4b4982e..422a292 100644
--- a/arch/arm/boot/dts/ccu8540-uib-v3.dts
+++ b/arch/arm/boot/dts/ccu8540-uib-v3.dts
@@ -14,3 +14,25 @@
/ {
model = "ST-Ericsson U8540 platform with device tree UIB v3";
};
+
+&i2c2 {
+
+ lp5521@32 {
+ compatible = "national,lp5521";
+ reg = <0x32>;
+ label = "lp5521_pri";
+ clock-mode = /bits/ 8 <2>;
+ chan0 {
+ led-cur = /bits/ 8 <0x2f>;
+ max-cur = /bits/ 8 <0x5f>;
+ };
+ chan1 {
+ led-cur = /bits/ 8 <0x2f>;
+ max-cur = /bits/ 8 <0x5f>;
+ };
+ chan2 {
+ led-cur = /bits/ 8 <0x2f>;
+ max-cur = /bits/ 8 <0x5f>;
+ };
+ };
+};
--
1.8.1.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH 2/4] ARM: u8540: Add device tree support for lp5521 leds
2013-05-29 13:33 ` [PATCH 2/4] ARM: u8540: Add device tree support for lp5521 leds Gabriel Fernandez
@ 2013-05-29 15:52 ` Lee Jones
0 siblings, 0 replies; 10+ messages in thread
From: Lee Jones @ 2013-05-29 15:52 UTC (permalink / raw)
To: Gabriel Fernandez
Cc: linux-kernel, Linus Walleij, Olivier Clergeaud,
Gabriel Fernandez, Gabriel Fernandez
On Wed, 29 May 2013, Gabriel Fernandez wrote:
> From: Gabriel Fernandez <gabriel.fernandez@st.com>
>
> This patch adds DT probing of lp5521 leds for u8540.
>
> Signed-off-by: Gabriel Fernandez <gabriel.fernandez@stericsson.com>
> ---
> arch/arm/boot/dts/ccu8540-uib-v3.dts | 22 ++++++++++++++++++++++
> 1 file changed, 22 insertions(+)
>
> diff --git a/arch/arm/boot/dts/ccu8540-uib-v3.dts b/arch/arm/boot/dts/ccu8540-uib-v3.dts
> index 4b4982e..422a292 100644
> --- a/arch/arm/boot/dts/ccu8540-uib-v3.dts
> +++ b/arch/arm/boot/dts/ccu8540-uib-v3.dts
> @@ -14,3 +14,25 @@
> / {
> model = "ST-Ericsson U8540 platform with device tree UIB v3";
> };
> +
> +&i2c2 {
I'm really not a fan of this syntax.
I only see it lending itself to more abstraction and obfuscation.
> +
> + lp5521@32 {
> + compatible = "national,lp5521";
> + reg = <0x32>;
> + label = "lp5521_pri";
> + clock-mode = /bits/ 8 <2>;
> + chan0 {
> + led-cur = /bits/ 8 <0x2f>;
> + max-cur = /bits/ 8 <0x5f>;
> + };
> + chan1 {
> + led-cur = /bits/ 8 <0x2f>;
> + max-cur = /bits/ 8 <0x5f>;
> + };
> + chan2 {
> + led-cur = /bits/ 8 <0x2f>;
> + max-cur = /bits/ 8 <0x5f>;
> + };
> + };
> +};
More odd tabbing above.
--
Lee Jones
Linaro ST-Ericsson Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 3/4] ARM: u8540: Add device tree support for bh1780
2013-05-29 13:33 [PATCH 0/4] Introduce ccu8540 uib-v3 Gabriel Fernandez
2013-05-29 13:33 ` [PATCH 1/4] ARM: ux540: Add ccu8540-uib-v3 Device Tree Machine Gabriel Fernandez
2013-05-29 13:33 ` [PATCH 2/4] ARM: u8540: Add device tree support for lp5521 leds Gabriel Fernandez
@ 2013-05-29 13:33 ` Gabriel Fernandez
2013-05-29 15:54 ` Lee Jones
2013-05-29 13:33 ` [PATCH 4/4] ARM: u8540: Add DT probing for SFH7741 Proximity Sensor Gabriel Fernandez
3 siblings, 1 reply; 10+ messages in thread
From: Gabriel Fernandez @ 2013-05-29 13:33 UTC (permalink / raw)
To: linux-kernel
Cc: Lee Jones, Linus Walleij, Olivier Clergeaud, Gabriel Fernandez
From: Gabriel Fernandez <gabriel.fernandez@st.com>
This patch adds DT probing of the light sensor bh1780
for u8540.
Signed-off-by: Gabriel Fernandez <gabriel.fernandez@st.com>
---
arch/arm/boot/dts/ccu8540-uib-v3.dts | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/arm/boot/dts/ccu8540-uib-v3.dts b/arch/arm/boot/dts/ccu8540-uib-v3.dts
index 422a292..dc90571 100644
--- a/arch/arm/boot/dts/ccu8540-uib-v3.dts
+++ b/arch/arm/boot/dts/ccu8540-uib-v3.dts
@@ -16,6 +16,11 @@
};
&i2c2 {
+ bh1780@29 {
+ compatible = "bh1780";
+ reg = <0x29>;
+ vcc-supply = <&ab8500_ldo_aux1_reg>;
+ };
lp5521@32 {
compatible = "national,lp5521";
--
1.8.1.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH 3/4] ARM: u8540: Add device tree support for bh1780
2013-05-29 13:33 ` [PATCH 3/4] ARM: u8540: Add device tree support for bh1780 Gabriel Fernandez
@ 2013-05-29 15:54 ` Lee Jones
0 siblings, 0 replies; 10+ messages in thread
From: Lee Jones @ 2013-05-29 15:54 UTC (permalink / raw)
To: Gabriel Fernandez
Cc: linux-kernel, Linus Walleij, Olivier Clergeaud, Gabriel Fernandez
On Wed, 29 May 2013, Gabriel Fernandez wrote:
> From: Gabriel Fernandez <gabriel.fernandez@st.com>
>
> This patch adds DT probing of the light sensor bh1780
> for u8540.
>
> Signed-off-by: Gabriel Fernandez <gabriel.fernandez@st.com>
> ---
> arch/arm/boot/dts/ccu8540-uib-v3.dts | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/arch/arm/boot/dts/ccu8540-uib-v3.dts b/arch/arm/boot/dts/ccu8540-uib-v3.dts
> index 422a292..dc90571 100644
> --- a/arch/arm/boot/dts/ccu8540-uib-v3.dts
> +++ b/arch/arm/boot/dts/ccu8540-uib-v3.dts
> @@ -16,6 +16,11 @@
> };
>
> &i2c2 {
> + bh1780@29 {
> + compatible = "bh1780";
> + reg = <0x29>;
> + vcc-supply = <&ab8500_ldo_aux1_reg>;
> + };
>
> lp5521@32 {
> compatible = "national,lp5521";
For this patch, not withstanding the ones prior:
Acked-by: Lee Jones <lee.jones@linaro.org>
--
Lee Jones
Linaro ST-Ericsson Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 4/4] ARM: u8540: Add DT probing for SFH7741 Proximity Sensor
2013-05-29 13:33 [PATCH 0/4] Introduce ccu8540 uib-v3 Gabriel Fernandez
` (2 preceding siblings ...)
2013-05-29 13:33 ` [PATCH 3/4] ARM: u8540: Add device tree support for bh1780 Gabriel Fernandez
@ 2013-05-29 13:33 ` Gabriel Fernandez
3 siblings, 0 replies; 10+ messages in thread
From: Gabriel Fernandez @ 2013-05-29 13:33 UTC (permalink / raw)
To: linux-kernel
Cc: Lee Jones, Linus Walleij, Olivier Clergeaud, Gabriel Fernandez,
Gabriel Fernandez
From: Gabriel Fernandez <gabriel.fernandez@st.com>
Here we ensure the SFH7741 Proximity Sensor is registered through
gpio-keys when booting with Device Tree enabled.
Signed-off-by: Gabriel Fernandez <gabriel.fernandez@stericsson.com>
---
arch/arm/boot/dts/ccu8540-uib-v3.dts | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/arch/arm/boot/dts/ccu8540-uib-v3.dts b/arch/arm/boot/dts/ccu8540-uib-v3.dts
index dc90571..26f3106 100644
--- a/arch/arm/boot/dts/ccu8540-uib-v3.dts
+++ b/arch/arm/boot/dts/ccu8540-uib-v3.dts
@@ -13,6 +13,21 @@
/ {
model = "ST-Ericsson U8540 platform with device tree UIB v3";
+
+ gpio_keys {
+ compatible = "gpio-keys";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ v-vcc-supply = <&ab8500_ldo_aux1_reg>;
+
+ button@1 {
+ debounce_interval = <50>;
+ wakeup = <1>;
+ linux,code = <0xb>;
+ label = "SFH7741 Proximity Sensor";
+ gpios = <&gpio7 5 0x8>;
+ };
+ };
};
&i2c2 {
--
1.8.1.1
^ permalink raw reply related [flat|nested] 10+ messages in thread