Skip to contentSkip to conversation

ARM: shmobile: armadillo-reference: Add PWM backlight node to DT

PATCH In review Laurent Pinchart 4 participants 9 messages Sep 11, 2013 – Apr 8, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: shmobile: armadillo-reference: Add PWM backlight node to DT

---
 .../boot/dts/r8a7740-armadillo800eva-reference.dts    | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts +19 -0
index c638e4a..801442b 100644
@@ -11,6 +11,7 @@
 /dts-v1/;
 /include/ "r8a7740.dtsi"
 #include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/pwm/pwm.h>
 
 / {
 	model = "armadillo 800 eva reference";
@@ -49,6 +50,15 @@
 			gpios = <&pfc 177 GPIO_ACTIVE_HIGH>;
 		};
 	};
+
+	backlight {
+		compatible = "pwm-backlight";
+		pwms = <&tpu 2 33333 PWM_POLARITY_INVERTED>;
+		brightness-levels = <0 1 2 4 8 16 32 64 128 255>;
+		default-brightness-level = <9>;
+		pinctrl-0 = <&backlight_pins>;
+		pinctrl-names = "default";
+	};
 };
 
 &i2c0 {
@@ -76,4 +86,13 @@
 		renesas,groups = "intc_irq10";
 		renesas,function = "intc";
 	};
+
+	backlight_pins: backlight {
+		renesas,groups = "tpu0_to2_1";
+		renesas,function = "tpu0";
+	};
+};
+
+&tpu {
+	status = "okay";
 };
Signature · 3 lines
Regards,

Laurent Pinchart
#1 lore raw
Quoted 4 lines · Laurent Pinchart
---
 .../boot/dts/r8a7740-armadillo800eva-reference.dts    | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

Thanks, I have queued this up for v3.13.
It should appear in the devel branch of the renesas tree the next time I push. That will most likely be in the next few hours.

#2 lore raw

PATCH 1/1 ARM: shmobile: armadillo-reference dts: enable RTC

In reply to Laurent Pinchart

This enables the Seiko real-time clock that is attached to a couple of GPIO pins.

---
 .../arm/boot/dts/r8a7740-armadillo800eva-reference.dts | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts +18 -0
index b79ea51..ac352ef 100644
@@ -118,6 +118,16 @@
 		};
 	};
 
+	i2c2: i2c@2 {
+		#address-cells = <1>;
+		#size-cells = <0>;
+		compatible = "i2c-gpio";
+		gpios = <&pfc 208 GPIO_ACTIVE_HIGH /* sda */
+			 &pfc 91 GPIO_ACTIVE_HIGH /* scl */
+			>;
+		i2c-gpio,delay-us = <5>;
+	};
+
 	backlight {
 		compatible = "pwm-backlight";
 		pwms = <&tpu 2 33333 PWM_POLARITY_INVERTED>;
@@ -178,6 +188,14 @@
 	};
 };
 
+&i2c2 {
+	status = "okay";
+	rtc@30 {
+		compatible = "seiko,s35390a";
+		reg = <0x30>;
+	};
+};
+
 &pfc {
 	pinctrl-0 = <&scifa1_pins>;
 	pinctrl-names = "default";
Signature · 1 line
1.8.4.5
#3 lore raw

Re: [PATCH] ARM: shmobile: armadillo-reference dts: enable RTC

(cc devicetree)

Quoted 30 lines · Ulrich Hecht

This enables the Seiko real-time clock that is attached to a couple of GPIO pins.

---
 .../arm/boot/dts/r8a7740-armadillo800eva-reference.dts | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts +10 -0
index b79ea51..ac352ef 100644
@@ -118,6 +118,16 @@
                };
        };
 
+       i2c2: i2c@2 {
+               #address-cells = <1>;
+               #size-cells = <0>;
+               compatible = "i2c-gpio";
+               gpios = <&pfc 208 GPIO_ACTIVE_HIGH /* sda */
+                        &pfc 91 GPIO_ACTIVE_HIGH /* scl */
+                       >;
+               i2c-gpio,delay-us = <5>;
+       };
+
        backlight {
                compatible = "pwm-backlight";
                pwms = <&tpu 2 33333 PWM_POLARITY_INVERTED>;

arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts line 194

Quoted 7 lines
arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts +4 -0
@@ -178,6 +188,14 @@
        };
 };
 
+&i2c2 {
+       status = "okay";
+       rtc@30 {
+               compatible = "seiko,s35390a";

I think this should be "sii,s35390a", for Seiko Instruments Inc.

Quoted 9 lines
arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts +4 -1
+               reg = <0x30>;
+       };
+};
+
 &pfc {
        pinctrl-0 = <&scifa1_pins>;
        pinctrl-names = "default";
--

1.8.4.5

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

#4 lore raw

Re: [PATCH] ARM: shmobile: armadillo-reference dts: enable RTC

In reply to Laurent Pinchart
Quoted 2 lines · Ulrich Hecht

This enables the Seiko real-time clock that is attached to a couple of GPIO pins.

Hi Ulrich,

I am a little confused about i2c2 appearing below as the documentation that I have only seems to refer to the presence of i2c0 and i2c1.

Quoted 50 lines
---
 .../arm/boot/dts/r8a7740-armadillo800eva-reference.dts | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts +18 -0
index b79ea51..ac352ef 100644
@@ -118,6 +118,16 @@
 		};
 	};
 
+	i2c2: i2c@2 {
+		#address-cells = <1>;
+		#size-cells = <0>;
+		compatible = "i2c-gpio";
+		gpios = <&pfc 208 GPIO_ACTIVE_HIGH /* sda */
+			 &pfc 91 GPIO_ACTIVE_HIGH /* scl */
+			>;
+		i2c-gpio,delay-us = <5>;
+	};
+
 	backlight {
 		compatible = "pwm-backlight";
 		pwms = <&tpu 2 33333 PWM_POLARITY_INVERTED>;
@@ -178,6 +188,14 @@
 	};
 };
 
+&i2c2 {
+	status = "okay";
+	rtc@30 {
+		compatible = "seiko,s35390a";
+		reg = <0x30>;
+	};
+};
+
 &pfc {
 	pinctrl-0 = <&scifa1_pins>;
 	pinctrl-names = "default";
Signature · 6 lines
1.8.4.5

--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#5 lore raw

Re: [PATCH] ARM: shmobile: armadillo-reference dts: enable RTC

In reply to Laurent Pinchart

Hi!

Quoted 3 lines · Simon Horman

I am a little confused about i2c2 appearing below as the documentation that I have only seems to refer to the presence of i2c0 and i2c1.

This thing doesn't use any of the SoC I2C controllers, it's just hooked up to two GPIO pins. The board docs don't give much detail, but I found the relevant info in the Android vendor kernel, which is where this "bus" is called i2c2. The name is arbitrary, though.

CU
Uli

#6 lore raw

Re: [PATCH] ARM: shmobile: armadillo-reference dts: enable RTC

In reply to Laurent Pinchart
Quoted 9 lines · Ulrich Hecht
Quoted 3 lines · Simon Horman

I am a little confused about i2c2 appearing below as the documentation that I have only seems to refer to the presence of i2c0 and i2c1.

This thing doesn't use any of the SoC I2C controllers, it's just hooked up to two GPIO pins. The board docs don't give much detail, but I found the relevant info in the Android vendor kernel, which is where this "bus" is called i2c2. The name is arbitrary, though.

Table 3.1 does mention "I2C2 (GPIO) For RTC only", and the docs also mention it's a s35390a.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

#7 lore raw

Re: [PATCH] ARM: shmobile: armadillo-reference dts: enable RTC

In reply to Laurent Pinchart
Quoted 6 lines · Geert Uytterhoeven
Quoted 5 lines · Ulrich Hecht
Quoted 3 lines · Simon Horman

I am a little confused about i2c2 appearing below as the documentation that I have only seems to refer to the presence of i2c0 and i2c1.

Quoted 7 lines
Quoted 4 lines

This thing doesn't use any of the SoC I2C controllers, it's just hooked up to two GPIO pins. The board docs don't give much detail, but I found the relevant info in the Android vendor kernel, which is where this "bus" is called i2c2. The name is arbitrary, though.

Table 3.1 does mention "I2C2 (GPIO) For RTC only", and the docs also mention it's a s35390a.

And board-armadillo800eva.c also contains support for it.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

#8 lore raw

Re: [PATCH] ARM: shmobile: armadillo-reference dts: enable RTC

In reply to Laurent Pinchart
Quoted 8 lines · Geert Uytterhoeven
Quoted 6 lines · Geert Uytterhoeven
Quoted 5 lines · Ulrich Hecht
Quoted 3 lines · Simon Horman

I am a little confused about i2c2 appearing below as the documentation that I have only seems to refer to the presence of i2c0 and i2c1.

Quoted 7 lines
Quoted 7 lines
Quoted 4 lines

This thing doesn't use any of the SoC I2C controllers, it's just hooked up to two GPIO pins. The board docs don't give much detail, but I found the relevant info in the Android vendor kernel, which is where this "bus" is called i2c2. The name is arbitrary, though.

Table 3.1 does mention "I2C2 (GPIO) For RTC only", and the docs also mention it's a s35390a.

I think you may have a different version of the documentation to me. But in any case I trust the combined judgement of you and Ulrich.

Quoted 1 line

And board-armadillo800eva.c also contains support for it.

That I see :)

I will queue up this patch.