* [PATCH v2 0/8] r8a7795/6 Salvator-X PWM enablement
@ 2017-04-27 14:37 Ulrich Hecht
2017-04-27 14:37 ` [PATCH v2 1/8] pinctrl: sh-pfc: r8a7796: Add PWM pins, groups and functions Ulrich Hecht
` (9 more replies)
0 siblings, 10 replies; 29+ messages in thread
From: Ulrich Hecht @ 2017-04-27 14:37 UTC (permalink / raw)
To: geert, horms
Cc: linux-pwm, linux-renesas-soc, magnus.damm, laurent.pinchart,
Ulrich Hecht
Hi!
Here's the revised series enabling PWMs on r8a7795 and r8a7796 Salvator-X
boards.
This revision addresses the issues found by Geert and adds Laurent's
backlight support patch, including a version for r8a7796.
CU
Uli
Changes since v1:
- PWM clock is S0D12, not S3D4
- dts: fix register lengths, add resets
- only enable one set of pins for each PWM
- add backlight support
Laurent Pinchart (1):
arm64: dts: r8a7795: salvator-x: Add panel backlight support
Ryo Kodama (2):
clk: renesas: r8a7796: add PWM clock
arm64: dts: r8a7796-salvator-x: Add PWM device support
Takeshi Kihara (3):
pinctrl: sh-pfc: r8a7796: Add PWM pins, groups and functions
arm64: dts: r8a7796: Add PWM device nodes
arm64: dts: r8a7795-salvator-x: Enable PWM2
Ulrich Hecht (2):
arm64: dts: r8a7796: salvator-x: Add panel backlight support
dt-bindings: pwm: Add R-Car M3-W device tree bindings
.../devicetree/bindings/pwm/renesas,pwm-rcar.txt | 1 +
arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts | 34 +++++
arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts | 35 +++++
arch/arm64/boot/dts/renesas/r8a7796.dtsi | 70 ++++++++++
drivers/clk/renesas/r8a7796-cpg-mssr.c | 1 +
drivers/pinctrl/sh-pfc/pfc-r8a7796.c | 153 +++++++++++++++++++++
6 files changed, 294 insertions(+)
--
2.7.4
^ permalink raw reply [flat|nested] 29+ messages in thread
* [PATCH v2 1/8] pinctrl: sh-pfc: r8a7796: Add PWM pins, groups and functions
2017-04-27 14:37 [PATCH v2 0/8] r8a7795/6 Salvator-X PWM enablement Ulrich Hecht
@ 2017-04-27 14:37 ` Ulrich Hecht
2017-04-27 14:37 ` [PATCH v2 2/8] clk: renesas: r8a7796: add PWM clock Ulrich Hecht
` (8 subsequent siblings)
9 siblings, 0 replies; 29+ messages in thread
From: Ulrich Hecht @ 2017-04-27 14:37 UTC (permalink / raw)
To: geert, horms
Cc: linux-pwm, linux-renesas-soc, magnus.damm, laurent.pinchart,
Takeshi Kihara, Ulrich Hecht
From: Takeshi Kihara <takeshi.kihara.df@renesas.com>
This patch adds PWM{0,1,2,3,4,5,6} pins, groups and functions to
R8A7796 SoC.
Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
---
drivers/pinctrl/sh-pfc/pfc-r8a7796.c | 153 +++++++++++++++++++++++++++++++++++
1 file changed, 153 insertions(+)
diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a7796.c b/drivers/pinctrl/sh-pfc/pfc-r8a7796.c
index b0362ae..668c688 100644
--- a/drivers/pinctrl/sh-pfc/pfc-r8a7796.c
+++ b/drivers/pinctrl/sh-pfc/pfc-r8a7796.c
@@ -2955,6 +2955,105 @@ static const unsigned int msiof3_rxd_e_mux[] = {
MSIOF3_RXD_E_MARK,
};
+/* - PWM0 --------------------------------------------------------------------*/
+static const unsigned int pwm0_pins[] = {
+ /* PWM */
+ RCAR_GP_PIN(2, 6),
+};
+static const unsigned int pwm0_mux[] = {
+ PWM0_MARK,
+};
+/* - PWM1 --------------------------------------------------------------------*/
+static const unsigned int pwm1_a_pins[] = {
+ /* PWM */
+ RCAR_GP_PIN(2, 7),
+};
+static const unsigned int pwm1_a_mux[] = {
+ PWM1_A_MARK,
+};
+static const unsigned int pwm1_b_pins[] = {
+ /* PWM */
+ RCAR_GP_PIN(1, 8),
+};
+static const unsigned int pwm1_b_mux[] = {
+ PWM1_B_MARK,
+};
+/* - PWM2 --------------------------------------------------------------------*/
+static const unsigned int pwm2_a_pins[] = {
+ /* PWM */
+ RCAR_GP_PIN(2, 8),
+};
+static const unsigned int pwm2_a_mux[] = {
+ PWM2_A_MARK,
+};
+static const unsigned int pwm2_b_pins[] = {
+ /* PWM */
+ RCAR_GP_PIN(1, 11),
+};
+static const unsigned int pwm2_b_mux[] = {
+ PWM2_B_MARK,
+};
+/* - PWM3 --------------------------------------------------------------------*/
+static const unsigned int pwm3_a_pins[] = {
+ /* PWM */
+ RCAR_GP_PIN(1, 0),
+};
+static const unsigned int pwm3_a_mux[] = {
+ PWM3_A_MARK,
+};
+static const unsigned int pwm3_b_pins[] = {
+ /* PWM */
+ RCAR_GP_PIN(2, 2),
+};
+static const unsigned int pwm3_b_mux[] = {
+ PWM3_B_MARK,
+};
+/* - PWM4 --------------------------------------------------------------------*/
+static const unsigned int pwm4_a_pins[] = {
+ /* PWM */
+ RCAR_GP_PIN(1, 1),
+};
+static const unsigned int pwm4_a_mux[] = {
+ PWM4_A_MARK,
+};
+static const unsigned int pwm4_b_pins[] = {
+ /* PWM */
+ RCAR_GP_PIN(2, 3),
+};
+static const unsigned int pwm4_b_mux[] = {
+ PWM4_B_MARK,
+};
+/* - PWM5 --------------------------------------------------------------------*/
+static const unsigned int pwm5_a_pins[] = {
+ /* PWM */
+ RCAR_GP_PIN(1, 2),
+};
+static const unsigned int pwm5_a_mux[] = {
+ PWM5_A_MARK,
+};
+static const unsigned int pwm5_b_pins[] = {
+ /* PWM */
+ RCAR_GP_PIN(2, 4),
+};
+static const unsigned int pwm5_b_mux[] = {
+ PWM5_B_MARK,
+};
+/* - PWM6 --------------------------------------------------------------------*/
+static const unsigned int pwm6_a_pins[] = {
+ /* PWM */
+ RCAR_GP_PIN(1, 3),
+};
+static const unsigned int pwm6_a_mux[] = {
+ PWM6_A_MARK,
+};
+static const unsigned int pwm6_b_pins[] = {
+ /* PWM */
+ RCAR_GP_PIN(2, 5),
+};
+static const unsigned int pwm6_b_mux[] = {
+ PWM6_B_MARK,
+};
+
/* - SCIF0 ------------------------------------------------------------------ */
static const unsigned int scif0_data_pins[] = {
/* RX, TX */
@@ -3565,6 +3664,19 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {
SH_PFC_PIN_GROUP(msiof3_ss2_e),
SH_PFC_PIN_GROUP(msiof3_txd_e),
SH_PFC_PIN_GROUP(msiof3_rxd_e),
+ SH_PFC_PIN_GROUP(pwm0),
+ SH_PFC_PIN_GROUP(pwm1_a),
+ SH_PFC_PIN_GROUP(pwm1_b),
+ SH_PFC_PIN_GROUP(pwm2_a),
+ SH_PFC_PIN_GROUP(pwm2_b),
+ SH_PFC_PIN_GROUP(pwm3_a),
+ SH_PFC_PIN_GROUP(pwm3_b),
+ SH_PFC_PIN_GROUP(pwm4_a),
+ SH_PFC_PIN_GROUP(pwm4_b),
+ SH_PFC_PIN_GROUP(pwm5_a),
+ SH_PFC_PIN_GROUP(pwm5_b),
+ SH_PFC_PIN_GROUP(pwm6_a),
+ SH_PFC_PIN_GROUP(pwm6_b),
SH_PFC_PIN_GROUP(scif0_data),
SH_PFC_PIN_GROUP(scif0_clk),
SH_PFC_PIN_GROUP(scif0_ctrl),
@@ -3879,6 +3991,40 @@ static const char * const msiof3_groups[] = {
"msiof3_rxd_e",
};
+static const char * const pwm0_groups[] = {
+ "pwm0",
+};
+
+static const char * const pwm1_groups[] = {
+ "pwm1_a",
+ "pwm1_b",
+};
+
+static const char * const pwm2_groups[] = {
+ "pwm2_a",
+ "pwm2_b",
+};
+
+static const char * const pwm3_groups[] = {
+ "pwm3_a",
+ "pwm3_b",
+};
+
+static const char * const pwm4_groups[] = {
+ "pwm4_a",
+ "pwm4_b",
+};
+
+static const char * const pwm5_groups[] = {
+ "pwm5_a",
+ "pwm5_b",
+};
+
+static const char * const pwm6_groups[] = {
+ "pwm6_a",
+ "pwm6_b",
+};
+
static const char * const scif0_groups[] = {
"scif0_data",
"scif0_clk",
@@ -3991,6 +4137,13 @@ static const struct sh_pfc_function pinmux_functions[] = {
SH_PFC_FUNCTION(msiof1),
SH_PFC_FUNCTION(msiof2),
SH_PFC_FUNCTION(msiof3),
+ SH_PFC_FUNCTION(pwm0),
+ SH_PFC_FUNCTION(pwm1),
+ SH_PFC_FUNCTION(pwm2),
+ SH_PFC_FUNCTION(pwm3),
+ SH_PFC_FUNCTION(pwm4),
+ SH_PFC_FUNCTION(pwm5),
+ SH_PFC_FUNCTION(pwm6),
SH_PFC_FUNCTION(scif0),
SH_PFC_FUNCTION(scif1),
SH_PFC_FUNCTION(scif2),
--
2.7.4
^ permalink raw reply related [flat|nested] 29+ messages in thread
* [PATCH v2 2/8] clk: renesas: r8a7796: add PWM clock
2017-04-27 14:37 [PATCH v2 0/8] r8a7795/6 Salvator-X PWM enablement Ulrich Hecht
2017-04-27 14:37 ` [PATCH v2 1/8] pinctrl: sh-pfc: r8a7796: Add PWM pins, groups and functions Ulrich Hecht
@ 2017-04-27 14:37 ` Ulrich Hecht
2017-04-27 14:37 ` [PATCH v2 3/8] arm64: dts: r8a7796: Add PWM device nodes Ulrich Hecht
` (7 subsequent siblings)
9 siblings, 0 replies; 29+ messages in thread
From: Ulrich Hecht @ 2017-04-27 14:37 UTC (permalink / raw)
To: geert, horms
Cc: linux-pwm, linux-renesas-soc, magnus.damm, laurent.pinchart,
Ryo Kodama, Takeshi Kihara, Ulrich Hecht
From: Ryo Kodama <ryo.kodama.vz@renesas.com>
This patch adds PWM clock for PWM.
Signed-off-by: Ryo Kodama <ryo.kodama.vz@renesas.com>
Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
[uli: changed from S3D4 to S0D12 in accordance with datasheet]
Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
---
drivers/clk/renesas/r8a7796-cpg-mssr.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/clk/renesas/r8a7796-cpg-mssr.c b/drivers/clk/renesas/r8a7796-cpg-mssr.c
index 9d114b3..3f1c5aa4 100644
--- a/drivers/clk/renesas/r8a7796-cpg-mssr.c
+++ b/drivers/clk/renesas/r8a7796-cpg-mssr.c
@@ -151,6 +151,7 @@ static const struct mssr_mod_clk r8a7796_mod_clks[] __initconst = {
DEF_MOD("hscif1", 519, R8A7796_CLK_S3D1),
DEF_MOD("hscif0", 520, R8A7796_CLK_S3D1),
DEF_MOD("thermal", 522, R8A7796_CLK_CP),
+ DEF_MOD("pwm", 523, R8A7796_CLK_S0D12),
DEF_MOD("fcpvd2", 601, R8A7796_CLK_S0D2),
DEF_MOD("fcpvd1", 602, R8A7796_CLK_S0D2),
DEF_MOD("fcpvd0", 603, R8A7796_CLK_S0D2),
--
2.7.4
^ permalink raw reply related [flat|nested] 29+ messages in thread
* [PATCH v2 3/8] arm64: dts: r8a7796: Add PWM device nodes
2017-04-27 14:37 [PATCH v2 0/8] r8a7795/6 Salvator-X PWM enablement Ulrich Hecht
2017-04-27 14:37 ` [PATCH v2 1/8] pinctrl: sh-pfc: r8a7796: Add PWM pins, groups and functions Ulrich Hecht
2017-04-27 14:37 ` [PATCH v2 2/8] clk: renesas: r8a7796: add PWM clock Ulrich Hecht
@ 2017-04-27 14:37 ` Ulrich Hecht
2017-04-27 14:37 ` [PATCH v2 4/8] arm64: dts: r8a7796: salvator-x: Add panel backlight support Ulrich Hecht
` (6 subsequent siblings)
9 siblings, 0 replies; 29+ messages in thread
From: Ulrich Hecht @ 2017-04-27 14:37 UTC (permalink / raw)
To: geert, horms
Cc: linux-pwm, linux-renesas-soc, magnus.damm, laurent.pinchart,
Takeshi Kihara, Ulrich Hecht
From: Takeshi Kihara <takeshi.kihara.df@renesas.com>
This patch adds PWM{0,1,2,3,4,5,6} device nodes for R8A7796 SoC.
Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
[uli: added resets, shortened reg lengths to 8]
Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
---
arch/arm64/boot/dts/renesas/r8a7796.dtsi | 70 ++++++++++++++++++++++++++++++++
1 file changed, 70 insertions(+)
diff --git a/arch/arm64/boot/dts/renesas/r8a7796.dtsi b/arch/arm64/boot/dts/renesas/r8a7796.dtsi
index 798fe0f..9a12d9d 100644
--- a/arch/arm64/boot/dts/renesas/r8a7796.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a7796.dtsi
@@ -455,6 +455,76 @@
status = "disabled";
};
+ pwm0: pwm@e6e30000 {
+ compatible = "renesas,pwm-r8a7796", "renesas,pwm-rcar";
+ reg = <0 0xe6e30000 0 8>;
+ #pwm-cells = <2>;
+ clocks = <&cpg CPG_MOD 523>;
+ resets = <&cpg 523>;
+ power-domains = <&sysc R8A7796_PD_ALWAYS_ON>;
+ status = "disabled";
+ };
+
+ pwm1: pwm@e6e31000 {
+ compatible = "renesas,pwm-r8a7796", "renesas,pwm-rcar";
+ reg = <0 0xe6e31000 0 8>;
+ #pwm-cells = <2>;
+ clocks = <&cpg CPG_MOD 523>;
+ resets = <&cpg 523>;
+ power-domains = <&sysc R8A7796_PD_ALWAYS_ON>;
+ status = "disabled";
+ };
+
+ pwm2: pwm@e6e32000 {
+ compatible = "renesas,pwm-r8a7796", "renesas,pwm-rcar";
+ reg = <0 0xe6e32000 0 8>;
+ #pwm-cells = <2>;
+ clocks = <&cpg CPG_MOD 523>;
+ resets = <&cpg 523>;
+ power-domains = <&sysc R8A7796_PD_ALWAYS_ON>;
+ status = "disabled";
+ };
+
+ pwm3: pwm@e6e33000 {
+ compatible = "renesas,pwm-r8a7796", "renesas,pwm-rcar";
+ reg = <0 0xe6e33000 0 8>;
+ #pwm-cells = <2>;
+ clocks = <&cpg CPG_MOD 523>;
+ resets = <&cpg 523>;
+ power-domains = <&sysc R8A7796_PD_ALWAYS_ON>;
+ status = "disabled";
+ };
+
+ pwm4: pwm@e6e34000 {
+ compatible = "renesas,pwm-r8a7796", "renesas,pwm-rcar";
+ reg = <0 0xe6e34000 0 8>;
+ #pwm-cells = <2>;
+ clocks = <&cpg CPG_MOD 523>;
+ resets = <&cpg 523>;
+ power-domains = <&sysc R8A7796_PD_ALWAYS_ON>;
+ status = "disabled";
+ };
+
+ pwm5: pwm@e6e35000 {
+ compatible = "renesas,pwm-r8a7796", "renesas,pwm-rcar";
+ reg = <0 0xe6e35000 0 8>;
+ #pwm-cells = <2>;
+ clocks = <&cpg CPG_MOD 523>;
+ resets = <&cpg 523>;
+ power-domains = <&sysc R8A7796_PD_ALWAYS_ON>;
+ status = "disabled";
+ };
+
+ pwm6: pwm@e6e36000 {
+ compatible = "renesas,pwm-r8a7796", "renesas,pwm-rcar";
+ reg = <0 0xe6e36000 0 8>;
+ #pwm-cells = <2>;
+ clocks = <&cpg CPG_MOD 523>;
+ resets = <&cpg 523>;
+ power-domains = <&sysc R8A7796_PD_ALWAYS_ON>;
+ status = "disabled";
+ };
+
i2c0: i2c@e6500000 {
#address-cells = <1>;
#size-cells = <0>;
--
2.7.4
^ permalink raw reply related [flat|nested] 29+ messages in thread
* [PATCH v2 4/8] arm64: dts: r8a7796: salvator-x: Add panel backlight support
2017-04-27 14:37 [PATCH v2 0/8] r8a7795/6 Salvator-X PWM enablement Ulrich Hecht
` (2 preceding siblings ...)
2017-04-27 14:37 ` [PATCH v2 3/8] arm64: dts: r8a7796: Add PWM device nodes Ulrich Hecht
@ 2017-04-27 14:37 ` Ulrich Hecht
2017-04-27 14:43 ` Laurent Pinchart
2017-09-05 15:08 ` Geert Uytterhoeven
2017-04-27 14:37 ` [PATCH v2 5/8] arm64: dts: r8a7796-salvator-x: Add PWM device support Ulrich Hecht
` (5 subsequent siblings)
9 siblings, 2 replies; 29+ messages in thread
From: Ulrich Hecht @ 2017-04-27 14:37 UTC (permalink / raw)
To: geert, horms
Cc: linux-pwm, linux-renesas-soc, magnus.damm, laurent.pinchart,
Ulrich Hecht
The panel backlight is controlled through a GPIO and a PWM channel.
Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
---
arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts b/arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts
index 14d9e51..abda84c 100644
--- a/arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts
+++ b/arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts
@@ -133,6 +133,11 @@
function = "i2c2";
};
+ pwm1_pins: pwm {
+ groups = "pwm1_a";
+ function = "pwm1";
+ };
+
sdhi0_pins: sd0 {
groups = "sdhi0_data4", "sdhi0_ctrl";
function = "sdhi0";
@@ -183,6 +188,16 @@
interrupt-parent = <&gpio2>;
interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
};
+
+ backlight: backlight {
+ compatible = "pwm-backlight";
+ pwms = <&pwm1 0 50000>;
+
+ brightness-levels = <256 128 64 16 8 4 0>;
+ default-brightness-level = <6>;
+
+ enable-gpios = <&gpio6 7 GPIO_ACTIVE_HIGH>;
+ };
};
&extal_clk {
@@ -235,6 +250,13 @@
status = "okay";
};
+&pwm1 {
+ pinctrl-0 = <&pwm1_pins>;
+ pinctrl-names = "default";
+
+ status = "okay";
+};
+
&scif1 {
pinctrl-0 = <&scif1_pins>;
pinctrl-names = "default";
--
2.7.4
^ permalink raw reply related [flat|nested] 29+ messages in thread
* [PATCH v2 5/8] arm64: dts: r8a7796-salvator-x: Add PWM device support
2017-04-27 14:37 [PATCH v2 0/8] r8a7795/6 Salvator-X PWM enablement Ulrich Hecht
` (3 preceding siblings ...)
2017-04-27 14:37 ` [PATCH v2 4/8] arm64: dts: r8a7796: salvator-x: Add panel backlight support Ulrich Hecht
@ 2017-04-27 14:37 ` Ulrich Hecht
2017-04-27 14:37 ` [PATCH v2 6/8] arm64: dts: r8a7795: salvator-x: Add panel backlight support Ulrich Hecht
` (4 subsequent siblings)
9 siblings, 0 replies; 29+ messages in thread
From: Ulrich Hecht @ 2017-04-27 14:37 UTC (permalink / raw)
To: geert, horms
Cc: linux-pwm, linux-renesas-soc, magnus.damm, laurent.pinchart,
Ryo Kodama, Takeshi Kihara, Ulrich Hecht
From: Ryo Kodama <ryo.kodama.vz@renesas.com>
This patch adds support of PWM2 device for Salvator-X board on
R8A7796 SoC.
Signed-off-by: Ryo Kodama <ryo.kodama.vz@renesas.com>
Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
---
arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts b/arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts
index abda84c..1516959 100644
--- a/arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts
+++ b/arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts
@@ -138,6 +138,11 @@
function = "pwm1";
};
+ pwm2_pins: pwm2 {
+ groups = "pwm2_a";
+ function = "pwm2";
+ };
+
sdhi0_pins: sd0 {
groups = "sdhi0_data4", "sdhi0_ctrl";
function = "sdhi0";
@@ -257,6 +262,14 @@
status = "okay";
};
+&pwm2 {
+ /* PMIC DC/DC switching frequency synchronization */
+ pinctrl-0 = <&pwm2_pins>;
+ pinctrl-names = "default";
+
+ status = "okay";
+};
+
&scif1 {
pinctrl-0 = <&scif1_pins>;
pinctrl-names = "default";
--
2.7.4
^ permalink raw reply related [flat|nested] 29+ messages in thread
* [PATCH v2 6/8] arm64: dts: r8a7795: salvator-x: Add panel backlight support
2017-04-27 14:37 [PATCH v2 0/8] r8a7795/6 Salvator-X PWM enablement Ulrich Hecht
` (4 preceding siblings ...)
2017-04-27 14:37 ` [PATCH v2 5/8] arm64: dts: r8a7796-salvator-x: Add PWM device support Ulrich Hecht
@ 2017-04-27 14:37 ` Ulrich Hecht
2017-04-27 14:42 ` Laurent Pinchart
2017-04-27 14:37 ` [PATCH v2 7/8] arm64: dts: r8a7795-salvator-x: Enable PWM2 Ulrich Hecht
` (3 subsequent siblings)
9 siblings, 1 reply; 29+ messages in thread
From: Ulrich Hecht @ 2017-04-27 14:37 UTC (permalink / raw)
To: geert, horms
Cc: linux-pwm, linux-renesas-soc, magnus.damm, laurent.pinchart,
Laurent Pinchart
From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
The panel backlight is controlled through a GPIO and a PWM channel.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
index bf4674e..8558b27 100644
--- a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
+++ b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
@@ -280,6 +280,16 @@
};
};
};
+
+ backlight: backlight {
+ compatible = "pwm-backlight";
+ pwms = <&pwm1 0 50000>;
+
+ brightness-levels = <256 128 64 16 8 4 0>;
+ default-brightness-level = <6>;
+
+ enable-gpios = <&gpio6 7 GPIO_ACTIVE_HIGH>;
+ };
};
&du {
@@ -366,6 +376,11 @@
function = "du";
};
+ pwm1_pins: pwm {
+ groups = "pwm1_a";
+ function = "pwm1";
+ };
+
sdhi0_pins: sd0 {
groups = "sdhi0_data4", "sdhi0_ctrl";
function = "sdhi0";
@@ -441,6 +456,13 @@
};
};
+&pwm1 {
+ pinctrl-0 = <&pwm1_pins>;
+ pinctrl-names = "default";
+
+ status = "okay";
+};
+
&scif1 {
pinctrl-0 = <&scif1_pins>;
pinctrl-names = "default";
--
2.7.4
^ permalink raw reply related [flat|nested] 29+ messages in thread
* [PATCH v2 7/8] arm64: dts: r8a7795-salvator-x: Enable PWM2
2017-04-27 14:37 [PATCH v2 0/8] r8a7795/6 Salvator-X PWM enablement Ulrich Hecht
` (5 preceding siblings ...)
2017-04-27 14:37 ` [PATCH v2 6/8] arm64: dts: r8a7795: salvator-x: Add panel backlight support Ulrich Hecht
@ 2017-04-27 14:37 ` Ulrich Hecht
2017-04-27 14:40 ` Laurent Pinchart
2017-04-27 14:37 ` [PATCH v2 8/8] dt-bindings: pwm: Add R-Car M3-W device tree bindings Ulrich Hecht
` (2 subsequent siblings)
9 siblings, 1 reply; 29+ messages in thread
From: Ulrich Hecht @ 2017-04-27 14:37 UTC (permalink / raw)
To: geert, horms
Cc: linux-pwm, linux-renesas-soc, magnus.damm, laurent.pinchart,
Takeshi Kihara, Ulrich Hecht
From: Takeshi Kihara <takeshi.kihara.df@renesas.com>
This patch enables PWM2 for Salvator-X board on R8A7795 SoC.
Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
---
arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
index 8558b27..534b17e 100644
--- a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
+++ b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
@@ -381,6 +381,11 @@
function = "pwm1";
};
+ pwm2_pins: pwm2 {
+ groups = "pwm2_a";
+ function = "pwm2";
+ };
+
sdhi0_pins: sd0 {
groups = "sdhi0_data4", "sdhi0_ctrl";
function = "sdhi0";
@@ -463,6 +468,13 @@
status = "okay";
};
+&pwm2 {
+ /* PMIC DC/DC switching frequency synchronization */
+ pinctrl-0 = <&pwm2_pins>;
+ pinctrl-names = "default";
+ status = "okay";
+};
+
&scif1 {
pinctrl-0 = <&scif1_pins>;
pinctrl-names = "default";
--
2.7.4
^ permalink raw reply related [flat|nested] 29+ messages in thread
* [PATCH v2 8/8] dt-bindings: pwm: Add R-Car M3-W device tree bindings
2017-04-27 14:37 [PATCH v2 0/8] r8a7795/6 Salvator-X PWM enablement Ulrich Hecht
` (6 preceding siblings ...)
2017-04-27 14:37 ` [PATCH v2 7/8] arm64: dts: r8a7795-salvator-x: Enable PWM2 Ulrich Hecht
@ 2017-04-27 14:37 ` Ulrich Hecht
2017-04-27 14:50 ` Geert Uytterhoeven
2017-04-28 7:29 ` [PATCH v2 0/8] r8a7795/6 Salvator-X PWM enablement Simon Horman
2017-05-12 9:16 ` Simon Horman
9 siblings, 1 reply; 29+ messages in thread
From: Ulrich Hecht @ 2017-04-27 14:37 UTC (permalink / raw)
To: geert, horms
Cc: linux-pwm, linux-renesas-soc, magnus.damm, laurent.pinchart,
Ulrich Hecht
Add device tree bindings for the PWM controller found on R-Car M3-W SoCs.
Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
---
Documentation/devicetree/bindings/pwm/renesas,pwm-rcar.txt | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/pwm/renesas,pwm-rcar.txt b/Documentation/devicetree/bindings/pwm/renesas,pwm-rcar.txt
index d6de643..7e94b80 100644
--- a/Documentation/devicetree/bindings/pwm/renesas,pwm-rcar.txt
+++ b/Documentation/devicetree/bindings/pwm/renesas,pwm-rcar.txt
@@ -8,6 +8,7 @@ Required Properties:
- "renesas,pwm-r8a7791": for R-Car M2-W
- "renesas,pwm-r8a7794": for R-Car E2
- "renesas,pwm-r8a7795": for R-Car H3
+ - "renesas,pwm-r8a7796": for R-Car M3-W
- reg: base address and length of the registers block for the PWM.
- #pwm-cells: should be 2. See pwm.txt in this directory for a description of
the cells format.
--
2.7.4
^ permalink raw reply related [flat|nested] 29+ messages in thread
* Re: [PATCH v2 7/8] arm64: dts: r8a7795-salvator-x: Enable PWM2
2017-04-27 14:37 ` [PATCH v2 7/8] arm64: dts: r8a7795-salvator-x: Enable PWM2 Ulrich Hecht
@ 2017-04-27 14:40 ` Laurent Pinchart
2017-08-30 8:06 ` Simon Horman
0 siblings, 1 reply; 29+ messages in thread
From: Laurent Pinchart @ 2017-04-27 14:40 UTC (permalink / raw)
To: Ulrich Hecht
Cc: geert, horms, linux-pwm, linux-renesas-soc, magnus.damm, Takeshi Kihara
Hi Ulrich,
Thank you for the patch.
On Thursday 27 Apr 2017 16:37:42 Ulrich Hecht wrote:
> From: Takeshi Kihara <takeshi.kihara.df@renesas.com>
>
> This patch enables PWM2 for Salvator-X board on R8A7795 SoC.
>
> Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
> Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
> ---
> arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
> b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts index 8558b27..534b17e
> 100644
> --- a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
> +++ b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
> @@ -381,6 +381,11 @@
> function = "pwm1";
> };
>
> + pwm2_pins: pwm2 {
> + groups = "pwm2_a";
> + function = "pwm2";
> + };
> +
> sdhi0_pins: sd0 {
> groups = "sdhi0_data4", "sdhi0_ctrl";
> function = "sdhi0";
> @@ -463,6 +468,13 @@
> status = "okay";
> };
>
> +&pwm2 {
> + /* PMIC DC/DC switching frequency synchronization */
Please pardon the stupid question, but if the PWM channel is used by the PMIC,
is there a point in enabling it without a PMIC DT node using it ?
> + pinctrl-0 = <&pwm2_pins>;
> + pinctrl-names = "default";
> + status = "okay";
> +};
> +
> &scif1 {
> pinctrl-0 = <&scif1_pins>;
> pinctrl-names = "default";
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [PATCH v2 6/8] arm64: dts: r8a7795: salvator-x: Add panel backlight support
2017-04-27 14:37 ` [PATCH v2 6/8] arm64: dts: r8a7795: salvator-x: Add panel backlight support Ulrich Hecht
@ 2017-04-27 14:42 ` Laurent Pinchart
2017-04-27 14:43 ` Laurent Pinchart
0 siblings, 1 reply; 29+ messages in thread
From: Laurent Pinchart @ 2017-04-27 14:42 UTC (permalink / raw)
To: Ulrich Hecht
Cc: geert, horms, linux-pwm, linux-renesas-soc, magnus.damm,
Laurent Pinchart
Hi Ulrich,
Thank you for the patch.
On Thursday 27 Apr 2017 16:37:41 Ulrich Hecht wrote:
> From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
>
> The panel backlight is controlled through a GPIO and a PWM channel.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
> arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts | 22 +++++++++++++++++++
> 1 file changed, 22 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
> b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts index bf4674e..8558b27
> 100644
> --- a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
> +++ b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
> @@ -280,6 +280,16 @@
> };
> };
> };
> +
> + backlight: backlight {
> + compatible = "pwm-backlight";
> + pwms = <&pwm1 0 50000>;
> +
> + brightness-levels = <256 128 64 16 8 4 0>;
> + default-brightness-level = <6>;
> +
> + enable-gpios = <&gpio6 7 GPIO_ACTIVE_HIGH>;
> + };
> };
>
> &du {
> @@ -366,6 +376,11 @@
> function = "du";
> };
>
> + pwm1_pins: pwm {
> + groups = "pwm1_a";
> + function = "pwm1";
> + };
> +
> sdhi0_pins: sd0 {
> groups = "sdhi0_data4", "sdhi0_ctrl";
> function = "sdhi0";
> @@ -441,6 +456,13 @@
> };
> };
>
> +&pwm1 {
> + pinctrl-0 = <&pwm1_pins>;
> + pinctrl-names = "default";
> +
> + status = "okay";
> +};
> +
> &scif1 {
> pinctrl-0 = <&scif1_pins>;
> pinctrl-names = "default";
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [PATCH v2 6/8] arm64: dts: r8a7795: salvator-x: Add panel backlight support
2017-04-27 14:42 ` Laurent Pinchart
@ 2017-04-27 14:43 ` Laurent Pinchart
2017-04-28 5:23 ` Simon Horman
0 siblings, 1 reply; 29+ messages in thread
From: Laurent Pinchart @ 2017-04-27 14:43 UTC (permalink / raw)
To: Ulrich Hecht
Cc: geert, horms, linux-pwm, linux-renesas-soc, magnus.damm,
Laurent Pinchart
On Thursday 27 Apr 2017 17:42:53 Laurent Pinchart wrote:
> On Thursday 27 Apr 2017 16:37:41 Ulrich Hecht wrote:
> > From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> >
> > The panel backlight is controlled through a GPIO and a PWM channel.
> >
> > Signed-off-by: Laurent Pinchart
> > <laurent.pinchart+renesas@ideasonboard.com>
>
> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Please ignore this, I meant to reply to the M3-W patch.
>
> > ---
> >
> > arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts | 22 +++++++++++++++++
> > 1 file changed, 22 insertions(+)
> >
> > diff --git a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
> > b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts index
> > bf4674e..8558b27
> > 100644
> > --- a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
> > +++ b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
> > @@ -280,6 +280,16 @@
> >
> > };
> >
> > };
> >
> > };
> >
> > +
> > + backlight: backlight {
> > + compatible = "pwm-backlight";
> > + pwms = <&pwm1 0 50000>;
> > +
> > + brightness-levels = <256 128 64 16 8 4 0>;
> > + default-brightness-level = <6>;
> > +
> > + enable-gpios = <&gpio6 7 GPIO_ACTIVE_HIGH>;
> > + };
> >
> > };
> >
> > &du {
> >
> > @@ -366,6 +376,11 @@
> >
> > function = "du";
> >
> > };
> >
> > + pwm1_pins: pwm {
> > + groups = "pwm1_a";
> > + function = "pwm1";
> > + };
> > +
> >
> > sdhi0_pins: sd0 {
> >
> > groups = "sdhi0_data4", "sdhi0_ctrl";
> > function = "sdhi0";
> >
> > @@ -441,6 +456,13 @@
> >
> > };
> >
> > };
> >
> > +&pwm1 {
> > + pinctrl-0 = <&pwm1_pins>;
> > + pinctrl-names = "default";
> > +
> > + status = "okay";
> > +};
> > +
> >
> > &scif1 {
> >
> > pinctrl-0 = <&scif1_pins>;
> > pinctrl-names = "default";
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [PATCH v2 4/8] arm64: dts: r8a7796: salvator-x: Add panel backlight support
2017-04-27 14:37 ` [PATCH v2 4/8] arm64: dts: r8a7796: salvator-x: Add panel backlight support Ulrich Hecht
@ 2017-04-27 14:43 ` Laurent Pinchart
2017-05-13 18:56 ` Laurent Pinchart
2017-09-05 15:08 ` Geert Uytterhoeven
1 sibling, 1 reply; 29+ messages in thread
From: Laurent Pinchart @ 2017-04-27 14:43 UTC (permalink / raw)
To: Ulrich Hecht; +Cc: geert, horms, linux-pwm, linux-renesas-soc, magnus.damm
Hi Ulrich,
Thank you for the patch.
On Thursday 27 Apr 2017 16:37:39 Ulrich Hecht wrote:
> The panel backlight is controlled through a GPIO and a PWM channel.
>
> Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
> arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts | 22 ++++++++++++++++++
> 1 file changed, 22 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts
> b/arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts index 14d9e51..abda84c
> 100644
> --- a/arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts
> +++ b/arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts
> @@ -133,6 +133,11 @@
> function = "i2c2";
> };
>
> + pwm1_pins: pwm {
> + groups = "pwm1_a";
> + function = "pwm1";
> + };
> +
> sdhi0_pins: sd0 {
> groups = "sdhi0_data4", "sdhi0_ctrl";
> function = "sdhi0";
> @@ -183,6 +188,16 @@
> interrupt-parent = <&gpio2>;
> interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
> };
> +
> + backlight: backlight {
> + compatible = "pwm-backlight";
> + pwms = <&pwm1 0 50000>;
> +
> + brightness-levels = <256 128 64 16 8 4 0>;
> + default-brightness-level = <6>;
> +
> + enable-gpios = <&gpio6 7 GPIO_ACTIVE_HIGH>;
> + };
> };
>
> &extal_clk {
> @@ -235,6 +250,13 @@
> status = "okay";
> };
>
> +&pwm1 {
> + pinctrl-0 = <&pwm1_pins>;
> + pinctrl-names = "default";
> +
> + status = "okay";
> +};
> +
> &scif1 {
> pinctrl-0 = <&scif1_pins>;
> pinctrl-names = "default";
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [PATCH v2 8/8] dt-bindings: pwm: Add R-Car M3-W device tree bindings
2017-04-27 14:37 ` [PATCH v2 8/8] dt-bindings: pwm: Add R-Car M3-W device tree bindings Ulrich Hecht
@ 2017-04-27 14:50 ` Geert Uytterhoeven
2017-04-28 5:24 ` Simon Horman
0 siblings, 1 reply; 29+ messages in thread
From: Geert Uytterhoeven @ 2017-04-27 14:50 UTC (permalink / raw)
To: Ulrich Hecht
Cc: Simon Horman, Linux PWM List, Linux-Renesas, Magnus Damm,
Laurent Pinchart
On Thu, Apr 27, 2017 at 4:37 PM, Ulrich Hecht
<ulrich.hecht+renesas@gmail.com> wrote:
> Add device tree bindings for the PWM controller found on R-Car M3-W SoCs.
>
> Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
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
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [PATCH v2 6/8] arm64: dts: r8a7795: salvator-x: Add panel backlight support
2017-04-27 14:43 ` Laurent Pinchart
@ 2017-04-28 5:23 ` Simon Horman
0 siblings, 0 replies; 29+ messages in thread
From: Simon Horman @ 2017-04-28 5:23 UTC (permalink / raw)
To: Laurent Pinchart
Cc: Ulrich Hecht, geert, linux-pwm, linux-renesas-soc, magnus.damm,
Laurent Pinchart
On Thu, Apr 27, 2017 at 05:43:35PM +0300, Laurent Pinchart wrote:
> On Thursday 27 Apr 2017 17:42:53 Laurent Pinchart wrote:
> > On Thursday 27 Apr 2017 16:37:41 Ulrich Hecht wrote:
> > > From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> > >
> > > The panel backlight is controlled through a GPIO and a PWM channel.
> > >
> > > Signed-off-by: Laurent Pinchart
> > > <laurent.pinchart+renesas@ideasonboard.com>
> >
> > Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
>
> Please ignore this, I meant to reply to the M3-W patch.
Thanks, noted.
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [PATCH v2 8/8] dt-bindings: pwm: Add R-Car M3-W device tree bindings
2017-04-27 14:50 ` Geert Uytterhoeven
@ 2017-04-28 5:24 ` Simon Horman
0 siblings, 0 replies; 29+ messages in thread
From: Simon Horman @ 2017-04-28 5:24 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Ulrich Hecht, Linux PWM List, Linux-Renesas, Magnus Damm,
Laurent Pinchart
On Thu, Apr 27, 2017 at 04:50:37PM +0200, Geert Uytterhoeven wrote:
> On Thu, Apr 27, 2017 at 4:37 PM, Ulrich Hecht
> <ulrich.hecht+renesas@gmail.com> wrote:
> > Add device tree bindings for the PWM controller found on R-Car M3-W SoCs.
> >
> > Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
>
> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [PATCH v2 0/8] r8a7795/6 Salvator-X PWM enablement
2017-04-27 14:37 [PATCH v2 0/8] r8a7795/6 Salvator-X PWM enablement Ulrich Hecht
` (7 preceding siblings ...)
2017-04-27 14:37 ` [PATCH v2 8/8] dt-bindings: pwm: Add R-Car M3-W device tree bindings Ulrich Hecht
@ 2017-04-28 7:29 ` Simon Horman
2017-05-12 9:16 ` Simon Horman
9 siblings, 0 replies; 29+ messages in thread
From: Simon Horman @ 2017-04-28 7:29 UTC (permalink / raw)
To: Ulrich Hecht
Cc: geert, linux-pwm, linux-renesas-soc, magnus.damm, laurent.pinchart
On Thu, Apr 27, 2017 at 04:37:35PM +0200, Ulrich Hecht wrote:
> Hi!
>
> Here's the revised series enabling PWMs on r8a7795 and r8a7796 Salvator-X
> boards.
>
> This revision addresses the issues found by Geert and adds Laurent's
> backlight support patch, including a version for r8a7796.
>
> CU
> Uli
>
> Changes since v1:
> - PWM clock is S0D12, not S3D4
> - dts: fix register lengths, add resets
> - only enable one set of pins for each PWM
> - add backlight support
>
>
> Laurent Pinchart (1):
> arm64: dts: r8a7795: salvator-x: Add panel backlight support
>
> Ryo Kodama (2):
> clk: renesas: r8a7796: add PWM clock
> arm64: dts: r8a7796-salvator-x: Add PWM device support
>
> Takeshi Kihara (3):
> pinctrl: sh-pfc: r8a7796: Add PWM pins, groups and functions
> arm64: dts: r8a7796: Add PWM device nodes
> arm64: dts: r8a7795-salvator-x: Enable PWM2
>
> Ulrich Hecht (2):
> arm64: dts: r8a7796: salvator-x: Add panel backlight support
> dt-bindings: pwm: Add R-Car M3-W device tree bindings
Hi,
am I correct in thinking that the dts patches do not cause a regression and
their only DT dependency is on the "renesas,pwm-r8a7796" compat string.
If so I am of a mind to quire them up as the nodes that need the new compat
string also make use of the "renesas,pwm-rcar" compat string which is
already present in mainline.
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [PATCH v2 0/8] r8a7795/6 Salvator-X PWM enablement
2017-04-27 14:37 [PATCH v2 0/8] r8a7795/6 Salvator-X PWM enablement Ulrich Hecht
` (8 preceding siblings ...)
2017-04-28 7:29 ` [PATCH v2 0/8] r8a7795/6 Salvator-X PWM enablement Simon Horman
@ 2017-05-12 9:16 ` Simon Horman
2017-05-12 10:00 ` Laurent Pinchart
9 siblings, 1 reply; 29+ messages in thread
From: Simon Horman @ 2017-05-12 9:16 UTC (permalink / raw)
To: Ulrich Hecht
Cc: geert, linux-pwm, linux-renesas-soc, magnus.damm, laurent.pinchart
On Thu, Apr 27, 2017 at 04:37:35PM +0200, Ulrich Hecht wrote:
> Hi!
>
> Here's the revised series enabling PWMs on r8a7795 and r8a7796 Salvator-X
> boards.
>
> This revision addresses the issues found by Geert and adds Laurent's
> backlight support patch, including a version for r8a7796.
>
> CU
> Uli
>
> Changes since v1:
> - PWM clock is S0D12, not S3D4
> - dts: fix register lengths, add resets
> - only enable one set of pins for each PWM
> - add backlight support
>
>
> Laurent Pinchart (1):
> arm64: dts: r8a7795: salvator-x: Add panel backlight support
>
> Ryo Kodama (2):
> clk: renesas: r8a7796: add PWM clock
> arm64: dts: r8a7796-salvator-x: Add PWM device support
>
> Takeshi Kihara (3):
> pinctrl: sh-pfc: r8a7796: Add PWM pins, groups and functions
> arm64: dts: r8a7796: Add PWM device nodes
> arm64: dts: r8a7795-salvator-x: Enable PWM2
I did not notice any regressions on salvator-x/r8a7796 after applying up
the dts patches without the clk and pinctrl patches. So I have queued up
the dts patches as follows:
* arm64: dts: r8a7796: Add PWM device nodes
-> applied
* arm64: dts: r8a7795: salvator-x: Add panel backlight support
* arm64: dts: r8a7795-salvator-x: Enable PWM2
-> applied to salvator-x.dtsi instead of r8a7796-salvator-x.dts
* arm64: dts: r8a7796: salvator-x: Add panel backlight support
* arm64: dts: r8a7796-salvator-x: Add PWM device support
-> not applied as they would be the same changes as those above
applied to salvator-x.dtsi
> Ulrich Hecht (2):
> arm64: dts: r8a7796: salvator-x: Add panel backlight support
> dt-bindings: pwm: Add R-Car M3-W device tree bindings
I took the liberty of reposting the dt-bindings patch with an updated To/Cc
list.
> .../devicetree/bindings/pwm/renesas,pwm-rcar.txt | 1 +
> arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts | 34 +++++
> arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts | 35 +++++
> arch/arm64/boot/dts/renesas/r8a7796.dtsi | 70 ++++++++++
> drivers/clk/renesas/r8a7796-cpg-mssr.c | 1 +
> drivers/pinctrl/sh-pfc/pfc-r8a7796.c | 153 +++++++++++++++++++++
> 6 files changed, 294 insertions(+)
>
> --
> 2.7.4
>
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [PATCH v2 0/8] r8a7795/6 Salvator-X PWM enablement
2017-05-12 9:16 ` Simon Horman
@ 2017-05-12 10:00 ` Laurent Pinchart
2017-05-12 10:36 ` Ulrich Hecht
2017-05-15 5:42 ` Simon Horman
0 siblings, 2 replies; 29+ messages in thread
From: Laurent Pinchart @ 2017-05-12 10:00 UTC (permalink / raw)
To: Simon Horman
Cc: Ulrich Hecht, geert, linux-pwm, linux-renesas-soc, magnus.damm
Hi Simon,
On Friday 12 May 2017 11:16:39 Simon Horman wrote:
> On Thu, Apr 27, 2017 at 04:37:35PM +0200, Ulrich Hecht wrote:
> > Hi!
> >
> > Here's the revised series enabling PWMs on r8a7795 and r8a7796 Salvator-X
> > boards.
> >
> > This revision addresses the issues found by Geert and adds Laurent's
> > backlight support patch, including a version for r8a7796.
> >
> > CU
> > Uli
> >
> > Changes since v1:
> > - PWM clock is S0D12, not S3D4
> > - dts: fix register lengths, add resets
> > - only enable one set of pins for each PWM
> > - add backlight support
> >
> > Laurent Pinchart (1):
> > arm64: dts: r8a7795: salvator-x: Add panel backlight support
> >
> > Ryo Kodama (2):
> > clk: renesas: r8a7796: add PWM clock
> > arm64: dts: r8a7796-salvator-x: Add PWM device support
> >
> > Takeshi Kihara (3):
> > pinctrl: sh-pfc: r8a7796: Add PWM pins, groups and functions
> > arm64: dts: r8a7796: Add PWM device nodes
> > arm64: dts: r8a7795-salvator-x: Enable PWM2
>
> I did not notice any regressions on salvator-x/r8a7796 after applying up
> the dts patches without the clk and pinctrl patches. So I have queued up
> the dts patches as follows:
>
> * arm64: dts: r8a7796: Add PWM device nodes
> -> applied
>
> * arm64: dts: r8a7795: salvator-x: Add panel backlight support
> * arm64: dts: r8a7795-salvator-x: Enable PWM2
I've asked Ulrich for a clarification on this patch as I'm not sure it's
needed, but he hasn't answered yet. Could we delay merging it until the
situation is clarified ?
All other patches in this series should be fine.
> -> applied to salvator-x.dtsi instead of r8a7796-salvator-x.dts
>
> * arm64: dts: r8a7796: salvator-x: Add panel backlight support
> * arm64: dts: r8a7796-salvator-x: Add PWM device support
> -> not applied as they would be the same changes as those above
> applied to salvator-x.dtsi
>
> > Ulrich Hecht (2):
> > arm64: dts: r8a7796: salvator-x: Add panel backlight support
> > dt-bindings: pwm: Add R-Car M3-W device tree bindings
>
> I took the liberty of reposting the dt-bindings patch with an updated To/Cc
> list.
>
> > .../devicetree/bindings/pwm/renesas,pwm-rcar.txt | 1 +
> > arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts | 34 +++++
> > arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts | 35 +++++
> > arch/arm64/boot/dts/renesas/r8a7796.dtsi | 70 ++++++++++
> > drivers/clk/renesas/r8a7796-cpg-mssr.c | 1 +
> > drivers/pinctrl/sh-pfc/pfc-r8a7796.c | 153 ++++++++++++++++
> > 6 files changed, 294 insertions(+)
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [PATCH v2 0/8] r8a7795/6 Salvator-X PWM enablement
2017-05-12 10:00 ` Laurent Pinchart
@ 2017-05-12 10:36 ` Ulrich Hecht
2017-05-12 11:03 ` Laurent Pinchart
2017-05-15 5:42 ` Simon Horman
1 sibling, 1 reply; 29+ messages in thread
From: Ulrich Hecht @ 2017-05-12 10:36 UTC (permalink / raw)
To: Laurent Pinchart
Cc: Simon Horman, geert, Linux PWM List, Linux-Renesas, Magnus Damm
On Fri, May 12, 2017 at 12:00 PM, Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
>> * arm64: dts: r8a7795-salvator-x: Enable PWM2
>
> I've asked Ulrich for a clarification on this patch as I'm not sure it's
> needed, but he hasn't answered yet. Could we delay merging it until the
> situation is clarified ?
Enabling it allows to control the switching frequency from userspace
via sysfs. I guess it's a matter of taste whether to do this by
default, but I see no downside to it.
CU
Uli
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [PATCH v2 0/8] r8a7795/6 Salvator-X PWM enablement
2017-05-12 10:36 ` Ulrich Hecht
@ 2017-05-12 11:03 ` Laurent Pinchart
0 siblings, 0 replies; 29+ messages in thread
From: Laurent Pinchart @ 2017-05-12 11:03 UTC (permalink / raw)
To: Ulrich Hecht
Cc: Simon Horman, geert, Linux PWM List, Linux-Renesas, Magnus Damm
Hi Ulrich,
On Friday 12 May 2017 12:36:50 Ulrich Hecht wrote:
> On Fri, May 12, 2017 at 12:00 PM, Laurent Pinchart wrote:
> >> * arm64: dts: r8a7795-salvator-x: Enable PWM2
> >
> > I've asked Ulrich for a clarification on this patch as I'm not sure it's
> > needed, but he hasn't answered yet. Could we delay merging it until the
> > situation is clarified ?
>
> Enabling it allows to control the switching frequency from userspace
> via sysfs. I guess it's a matter of taste whether to do this by
> default, but I see no downside to it.
For PWM signals that are meant to be used by expansion boards, sure, but this
one is meant to control the PMIC. I'd rather not let userspace mess with it.
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [PATCH v2 4/8] arm64: dts: r8a7796: salvator-x: Add panel backlight support
2017-04-27 14:43 ` Laurent Pinchart
@ 2017-05-13 18:56 ` Laurent Pinchart
2017-05-15 5:48 ` Simon Horman
0 siblings, 1 reply; 29+ messages in thread
From: Laurent Pinchart @ 2017-05-13 18:56 UTC (permalink / raw)
To: horms; +Cc: Ulrich Hecht, geert, linux-pwm, linux-renesas-soc, magnus.damm
Hi Simon,
I'm afraid you added nodes in the wrong places when applying the patch to
salvator-x.dtsi :-( Please see below.
On Thursday 27 Apr 2017 17:43:56 Laurent Pinchart wrote:
> Hi Ulrich,
>
> Thank you for the patch.
>
> On Thursday 27 Apr 2017 16:37:39 Ulrich Hecht wrote:
> > The panel backlight is controlled through a GPIO and a PWM channel.
> >
> > Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
>
> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
>
> > ---
> >
> > arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts | 22 ++++++++++++++++
> > 1 file changed, 22 insertions(+)
> >
> > diff --git a/arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts
> > b/arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts index
> > 14d9e51..abda84c
> > 100644
> > --- a/arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts
> > +++ b/arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts
> > @@ -133,6 +133,11 @@
> > function = "i2c2";
> > };
> >
> > + pwm1_pins: pwm {
> > + groups = "pwm1_a";
> > + function = "pwm1";
> > + };
> > +
This is alphabetically ordered here and isn't anymore in your devel branch.
> > sdhi0_pins: sd0 {
> > groups = "sdhi0_data4", "sdhi0_ctrl";
> > function = "sdhi0";
> > @@ -183,6 +188,16 @@
> > interrupt-parent = <&gpio2>;
> > interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
> > };
> > +
> > + backlight: backlight {
> > + compatible = "pwm-backlight";
> > + pwms = <&pwm1 0 50000>;
> > +
> > + brightness-levels = <256 128 64 16 8 4 0>;
> > + default-brightness-level = <6>;
> > +
> > + enable-gpios = <&gpio6 7 GPIO_ACTIVE_HIGH>;
> > + };
The backlight node needs to be added as a child of the root node, while you've
added it to the DU node in your devel branch.
> > };
> >
> > &extal_clk {
> > @@ -235,6 +250,13 @@
> > status = "okay";
> > };
> >
> > +&pwm1 {
> > + pinctrl-0 = <&pwm1_pins>;
> > + pinctrl-names = "default";
> > +
> > + status = "okay";
> > +};
> > +
This is alphabetically ordered here and isn't anymore in your devel branch.
Can you rebase your devel branch to fix this ?
> > &scif1 {
> > pinctrl-0 = <&scif1_pins>;
> > pinctrl-names = "default";
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [PATCH v2 0/8] r8a7795/6 Salvator-X PWM enablement
2017-05-12 10:00 ` Laurent Pinchart
2017-05-12 10:36 ` Ulrich Hecht
@ 2017-05-15 5:42 ` Simon Horman
1 sibling, 0 replies; 29+ messages in thread
From: Simon Horman @ 2017-05-15 5:42 UTC (permalink / raw)
To: Laurent Pinchart
Cc: Ulrich Hecht, geert, linux-pwm, linux-renesas-soc, magnus.damm
On Fri, May 12, 2017 at 01:00:34PM +0300, Laurent Pinchart wrote:
> Hi Simon,
>
> On Friday 12 May 2017 11:16:39 Simon Horman wrote:
> > On Thu, Apr 27, 2017 at 04:37:35PM +0200, Ulrich Hecht wrote:
> > > Hi!
> > >
> > > Here's the revised series enabling PWMs on r8a7795 and r8a7796 Salvator-X
> > > boards.
> > >
> > > This revision addresses the issues found by Geert and adds Laurent's
> > > backlight support patch, including a version for r8a7796.
> > >
> > > CU
> > > Uli
> > >
> > > Changes since v1:
> > > - PWM clock is S0D12, not S3D4
> > > - dts: fix register lengths, add resets
> > > - only enable one set of pins for each PWM
> > > - add backlight support
> > >
> > > Laurent Pinchart (1):
> > > arm64: dts: r8a7795: salvator-x: Add panel backlight support
> > >
> > > Ryo Kodama (2):
> > > clk: renesas: r8a7796: add PWM clock
> > > arm64: dts: r8a7796-salvator-x: Add PWM device support
> > >
> > > Takeshi Kihara (3):
> > > pinctrl: sh-pfc: r8a7796: Add PWM pins, groups and functions
> > > arm64: dts: r8a7796: Add PWM device nodes
> > > arm64: dts: r8a7795-salvator-x: Enable PWM2
> >
> > I did not notice any regressions on salvator-x/r8a7796 after applying up
> > the dts patches without the clk and pinctrl patches. So I have queued up
> > the dts patches as follows:
> >
> > * arm64: dts: r8a7796: Add PWM device nodes
> > -> applied
> >
> > * arm64: dts: r8a7795: salvator-x: Add panel backlight support
> > * arm64: dts: r8a7795-salvator-x: Enable PWM2
>
> I've asked Ulrich for a clarification on this patch as I'm not sure it's
> needed, but he hasn't answered yet. Could we delay merging it until the
> situation is clarified ?
Sure, I will drop the "Enable PWM2" patch.
> All other patches in this series should be fine.
>
> > -> applied to salvator-x.dtsi instead of r8a7796-salvator-x.dts
> >
> > * arm64: dts: r8a7796: salvator-x: Add panel backlight support
> > * arm64: dts: r8a7796-salvator-x: Add PWM device support
> > -> not applied as they would be the same changes as those above
> > applied to salvator-x.dtsi
> >
> > > Ulrich Hecht (2):
> > > arm64: dts: r8a7796: salvator-x: Add panel backlight support
> > > dt-bindings: pwm: Add R-Car M3-W device tree bindings
> >
> > I took the liberty of reposting the dt-bindings patch with an updated To/Cc
> > list.
> >
> > > .../devicetree/bindings/pwm/renesas,pwm-rcar.txt | 1 +
> > > arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts | 34 +++++
> > > arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts | 35 +++++
> > > arch/arm64/boot/dts/renesas/r8a7796.dtsi | 70 ++++++++++
> > > drivers/clk/renesas/r8a7796-cpg-mssr.c | 1 +
> > > drivers/pinctrl/sh-pfc/pfc-r8a7796.c | 153 ++++++++++++++++
> > > 6 files changed, 294 insertions(+)
>
> --
> Regards,
>
> Laurent Pinchart
>
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [PATCH v2 4/8] arm64: dts: r8a7796: salvator-x: Add panel backlight support
2017-05-13 18:56 ` Laurent Pinchart
@ 2017-05-15 5:48 ` Simon Horman
2017-05-15 6:50 ` Laurent Pinchart
0 siblings, 1 reply; 29+ messages in thread
From: Simon Horman @ 2017-05-15 5:48 UTC (permalink / raw)
To: Laurent Pinchart
Cc: Ulrich Hecht, geert, linux-pwm, linux-renesas-soc, magnus.damm
On Sat, May 13, 2017 at 09:56:12PM +0300, Laurent Pinchart wrote:
> Hi Simon,
>
> I'm afraid you added nodes in the wrong places when applying the patch to
> salvator-x.dtsi :-( Please see below.
>
> On Thursday 27 Apr 2017 17:43:56 Laurent Pinchart wrote:
> > Hi Ulrich,
> >
> > Thank you for the patch.
> >
> > On Thursday 27 Apr 2017 16:37:39 Ulrich Hecht wrote:
> > > The panel backlight is controlled through a GPIO and a PWM channel.
> > >
> > > Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
> >
> > Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> >
> > > ---
> > >
> > > arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts | 22 ++++++++++++++++
> > > 1 file changed, 22 insertions(+)
> > >
> > > diff --git a/arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts
> > > b/arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts index
> > > 14d9e51..abda84c
> > > 100644
> > > --- a/arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts
> > > +++ b/arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts
> > > @@ -133,6 +133,11 @@
> > > function = "i2c2";
> > > };
> > >
> > > + pwm1_pins: pwm {
> > > + groups = "pwm1_a";
> > > + function = "pwm1";
> > > + };
> > > +
>
> This is alphabetically ordered here and isn't anymore in your devel branch.
Thanks, I will move it from between scif_clk_pins and sdhi0_pins to
between i2c2_pins and scif1_pins.
> > > sdhi0_pins: sd0 {
> > > groups = "sdhi0_data4", "sdhi0_ctrl";
> > > function = "sdhi0";
> > > @@ -183,6 +188,16 @@
> > > interrupt-parent = <&gpio2>;
> > > interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
> > > };
> > > +
> > > + backlight: backlight {
> > > + compatible = "pwm-backlight";
> > > + pwms = <&pwm1 0 50000>;
> > > +
> > > + brightness-levels = <256 128 64 16 8 4 0>;
> > > + default-brightness-level = <6>;
> > > +
> > > + enable-gpios = <&gpio6 7 GPIO_ACTIVE_HIGH>;
> > > + };
>
> The backlight node needs to be added as a child of the root node, while you've
> added it to the DU node in your devel branch.
Thanks. I have moved it to between audio_clkout and reg_1p8v in
the root node.
> > > };
> > >
> > > &extal_clk {
> > > @@ -235,6 +250,13 @@
> > > status = "okay";
> > > };
> > >
> > > +&pwm1 {
> > > + pinctrl-0 = <&pwm1_pins>;
> > > + pinctrl-names = "default";
> > > +
> > > + status = "okay";
> > > +};
> > > +
>
> This is alphabetically ordered here and isn't anymore in your devel branch.
Thanks, I have moved it from between rcar_sound and scif1 to
between pfc and rcar_sound.
> Can you rebase your devel branch to fix this ?
Sure. I have the following in my local tree which I plan to push
a later today.
From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
[PATCH] arm64: dts: salvator-x: Add panel backlight support
The panel backlight is controlled through a GPIO and a PWM channel.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
[simon: apply to salvator-x.dtsi instead of r8a7795-salvator-x.dts]
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
arch/arm64/boot/dts/renesas/salvator-x.dtsi | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/arch/arm64/boot/dts/renesas/salvator-x.dtsi b/arch/arm64/boot/dts/renesas/salvator-x.dtsi
index d5eb022d247c..7240bcd75918 100644
--- a/arch/arm64/boot/dts/renesas/salvator-x.dtsi
+++ b/arch/arm64/boot/dts/renesas/salvator-x.dtsi
@@ -58,6 +58,16 @@
clock-frequency = <11289600>;
};
+ backlight: backlight {
+ compatible = "pwm-backlight";
+ pwms = <&pwm1 0 50000>;
+
+ brightness-levels = <256 128 64 16 8 4 0>;
+ default-brightness-level = <6>;
+
+ enable-gpios = <&gpio6 7 GPIO_ACTIVE_HIGH>;
+ };
+
reg_1p8v: regulator0 {
compatible = "regulator-fixed";
regulator-name = "fixed-1.8V";
@@ -358,6 +368,11 @@
function = "i2c2";
};
+ pwm1_pins: pwm {
+ groups = "pwm1_a";
+ function = "pwm1";
+ };
+
scif1_pins: scif1 {
groups = "scif1_data_a", "scif1_ctrl";
function = "scif1";
@@ -443,6 +458,13 @@
};
};
+&pwm1 {
+ pinctrl-0 = <&pwm1_pins>;
+ pinctrl-names = "default";
+
+ status = "okay";
+};
+
&rcar_sound {
pinctrl-0 = <&sound_pins &sound_clk_pins>;
pinctrl-names = "default";
--
2.1.4
^ permalink raw reply related [flat|nested] 29+ messages in thread
* Re: [PATCH v2 4/8] arm64: dts: r8a7796: salvator-x: Add panel backlight support
2017-05-15 5:48 ` Simon Horman
@ 2017-05-15 6:50 ` Laurent Pinchart
2017-05-15 6:59 ` Simon Horman
0 siblings, 1 reply; 29+ messages in thread
From: Laurent Pinchart @ 2017-05-15 6:50 UTC (permalink / raw)
To: Simon Horman
Cc: Ulrich Hecht, geert, linux-pwm, linux-renesas-soc, magnus.damm
Hi Simon,
On Monday 15 May 2017 07:48:11 Simon Horman wrote:
> On Sat, May 13, 2017 at 09:56:12PM +0300, Laurent Pinchart wrote:
> > Hi Simon,
> >
> > I'm afraid you added nodes in the wrong places when applying the patch to
> > salvator-x.dtsi :-( Please see below.
> >
> > On Thursday 27 Apr 2017 17:43:56 Laurent Pinchart wrote:
> >> Hi Ulrich,
> >>
> >> Thank you for the patch.
> >>
> >> On Thursday 27 Apr 2017 16:37:39 Ulrich Hecht wrote:
> >>> The panel backlight is controlled through a GPIO and a PWM channel.
> >>>
> >>> Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
> >>
> >> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> >>
> >>> ---
> >>>
> >>> arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts | 22 +++++++++++++
> >>> 1 file changed, 22 insertions(+)
> >>>
> >>> diff --git a/arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts
> >>> b/arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts index
> >>> 14d9e51..abda84c
> >>> 100644
> >>> --- a/arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts
> >>> +++ b/arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts
> >>> @@ -133,6 +133,11 @@
> >>> function = "i2c2";
> >>> };
> >>>
> >>> + pwm1_pins: pwm {
> >>> + groups = "pwm1_a";
> >>> + function = "pwm1";
> >>> + };
> >>> +
> >
> > This is alphabetically ordered here and isn't anymore in your devel
> > branch.
>
> Thanks, I will move it from between scif_clk_pins and sdhi0_pins to
> between i2c2_pins and scif1_pins.
>
> >>> sdhi0_pins: sd0 {
> >>> groups = "sdhi0_data4", "sdhi0_ctrl";
> >>> function = "sdhi0";
> >>> @@ -183,6 +188,16 @@
> >>> interrupt-parent = <&gpio2>;
> >>> interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
> >>> };
> >>> +
> >>> + backlight: backlight {
> >>> + compatible = "pwm-backlight";
> >>> + pwms = <&pwm1 0 50000>;
> >>> +
> >>> + brightness-levels = <256 128 64 16 8 4 0>;
> >>> + default-brightness-level = <6>;
> >>> +
> >>> + enable-gpios = <&gpio6 7 GPIO_ACTIVE_HIGH>;
> >>> + };
> >
> > The backlight node needs to be added as a child of the root node, while
> > you've added it to the DU node in your devel branch.
>
> Thanks. I have moved it to between audio_clkout and reg_1p8v in
> the root node.
>
> >>> };
> >>>
> >>> &extal_clk {
> >>> @@ -235,6 +250,13 @@
> >>> status = "okay";
> >>> };
> >>>
> >>> +&pwm1 {
> >>> + pinctrl-0 = <&pwm1_pins>;
> >>> + pinctrl-names = "default";
> >>> +
> >>> + status = "okay";
> >>> +};
> >>> +
> >
> > This is alphabetically ordered here and isn't anymore in your devel
> > branch.
>
> Thanks, I have moved it from between rcar_sound and scif1 to
> between pfc and rcar_sound.
>
> > Can you rebase your devel branch to fix this ?
>
> Sure. I have the following in my local tree which I plan to push
> a later today.
That looks good to me, thank you !
> From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
>
> [PATCH] arm64: dts: salvator-x: Add panel backlight support
>
> The panel backlight is controlled through a GPIO and a PWM channel.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> [simon: apply to salvator-x.dtsi instead of r8a7795-salvator-x.dts]
> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
> ---
> arch/arm64/boot/dts/renesas/salvator-x.dtsi | 22 ++++++++++++++++++++++
> 1 file changed, 22 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/renesas/salvator-x.dtsi
> b/arch/arm64/boot/dts/renesas/salvator-x.dtsi index
> d5eb022d247c..7240bcd75918 100644
> --- a/arch/arm64/boot/dts/renesas/salvator-x.dtsi
> +++ b/arch/arm64/boot/dts/renesas/salvator-x.dtsi
> @@ -58,6 +58,16 @@
> clock-frequency = <11289600>;
> };
>
> + backlight: backlight {
> + compatible = "pwm-backlight";
> + pwms = <&pwm1 0 50000>;
> +
> + brightness-levels = <256 128 64 16 8 4 0>;
> + default-brightness-level = <6>;
> +
> + enable-gpios = <&gpio6 7 GPIO_ACTIVE_HIGH>;
> + };
> +
> reg_1p8v: regulator0 {
> compatible = "regulator-fixed";
> regulator-name = "fixed-1.8V";
> @@ -358,6 +368,11 @@
> function = "i2c2";
> };
>
> + pwm1_pins: pwm {
> + groups = "pwm1_a";
> + function = "pwm1";
> + };
> +
> scif1_pins: scif1 {
> groups = "scif1_data_a", "scif1_ctrl";
> function = "scif1";
> @@ -443,6 +458,13 @@
> };
> };
>
> +&pwm1 {
> + pinctrl-0 = <&pwm1_pins>;
> + pinctrl-names = "default";
> +
> + status = "okay";
> +};
> +
> &rcar_sound {
> pinctrl-0 = <&sound_pins &sound_clk_pins>;
> pinctrl-names = "default";
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [PATCH v2 4/8] arm64: dts: r8a7796: salvator-x: Add panel backlight support
2017-05-15 6:50 ` Laurent Pinchart
@ 2017-05-15 6:59 ` Simon Horman
0 siblings, 0 replies; 29+ messages in thread
From: Simon Horman @ 2017-05-15 6:59 UTC (permalink / raw)
To: Laurent Pinchart
Cc: Ulrich Hecht, geert, linux-pwm, linux-renesas-soc, magnus.damm
On Mon, May 15, 2017 at 09:50:39AM +0300, Laurent Pinchart wrote:
> Hi Simon,
>
> On Monday 15 May 2017 07:48:11 Simon Horman wrote:
> > On Sat, May 13, 2017 at 09:56:12PM +0300, Laurent Pinchart wrote:
> > > Hi Simon,
> > >
> > > I'm afraid you added nodes in the wrong places when applying the patch to
> > > salvator-x.dtsi :-( Please see below.
> > >
> > > On Thursday 27 Apr 2017 17:43:56 Laurent Pinchart wrote:
> > >> Hi Ulrich,
> > >>
> > >> Thank you for the patch.
> > >>
> > >> On Thursday 27 Apr 2017 16:37:39 Ulrich Hecht wrote:
> > >>> The panel backlight is controlled through a GPIO and a PWM channel.
> > >>>
> > >>> Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
> > >>
> > >> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> > >>
> > >>> ---
> > >>>
> > >>> arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts | 22 +++++++++++++
> > >>> 1 file changed, 22 insertions(+)
> > >>>
> > >>> diff --git a/arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts
> > >>> b/arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts index
> > >>> 14d9e51..abda84c
> > >>> 100644
> > >>> --- a/arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts
> > >>> +++ b/arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts
> > >>> @@ -133,6 +133,11 @@
> > >>> function = "i2c2";
> > >>> };
> > >>>
> > >>> + pwm1_pins: pwm {
> > >>> + groups = "pwm1_a";
> > >>> + function = "pwm1";
> > >>> + };
> > >>> +
> > >
> > > This is alphabetically ordered here and isn't anymore in your devel
> > > branch.
> >
> > Thanks, I will move it from between scif_clk_pins and sdhi0_pins to
> > between i2c2_pins and scif1_pins.
> >
> > >>> sdhi0_pins: sd0 {
> > >>> groups = "sdhi0_data4", "sdhi0_ctrl";
> > >>> function = "sdhi0";
> > >>> @@ -183,6 +188,16 @@
> > >>> interrupt-parent = <&gpio2>;
> > >>> interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
> > >>> };
> > >>> +
> > >>> + backlight: backlight {
> > >>> + compatible = "pwm-backlight";
> > >>> + pwms = <&pwm1 0 50000>;
> > >>> +
> > >>> + brightness-levels = <256 128 64 16 8 4 0>;
> > >>> + default-brightness-level = <6>;
> > >>> +
> > >>> + enable-gpios = <&gpio6 7 GPIO_ACTIVE_HIGH>;
> > >>> + };
> > >
> > > The backlight node needs to be added as a child of the root node, while
> > > you've added it to the DU node in your devel branch.
> >
> > Thanks. I have moved it to between audio_clkout and reg_1p8v in
> > the root node.
> >
> > >>> };
> > >>>
> > >>> &extal_clk {
> > >>> @@ -235,6 +250,13 @@
> > >>> status = "okay";
> > >>> };
> > >>>
> > >>> +&pwm1 {
> > >>> + pinctrl-0 = <&pwm1_pins>;
> > >>> + pinctrl-names = "default";
> > >>> +
> > >>> + status = "okay";
> > >>> +};
> > >>> +
> > >
> > > This is alphabetically ordered here and isn't anymore in your devel
> > > branch.
> >
> > Thanks, I have moved it from between rcar_sound and scif1 to
> > between pfc and rcar_sound.
> >
> > > Can you rebase your devel branch to fix this ?
> >
> > Sure. I have the following in my local tree which I plan to push
> > a later today.
>
> That looks good to me, thank you !
Thanks for checking.
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [PATCH v2 7/8] arm64: dts: r8a7795-salvator-x: Enable PWM2
2017-04-27 14:40 ` Laurent Pinchart
@ 2017-08-30 8:06 ` Simon Horman
2017-08-30 8:08 ` Simon Horman
0 siblings, 1 reply; 29+ messages in thread
From: Simon Horman @ 2017-08-30 8:06 UTC (permalink / raw)
To: Laurent Pinchart
Cc: Ulrich Hecht, geert, linux-pwm, linux-renesas-soc, magnus.damm,
Takeshi Kihara
On Thu, Apr 27, 2017 at 05:40:51PM +0300, Laurent Pinchart wrote:
> Hi Ulrich,
>
> Thank you for the patch.
>
> On Thursday 27 Apr 2017 16:37:42 Ulrich Hecht wrote:
> > From: Takeshi Kihara <takeshi.kihara.df@renesas.com>
> >
> > This patch enables PWM2 for Salvator-X board on R8A7795 SoC.
> >
> > Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
> > Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
> > ---
> > arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts | 12 ++++++++++++
> > 1 file changed, 12 insertions(+)
> >
> > diff --git a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
> > b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts index 8558b27..534b17e
> > 100644
> > --- a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
> > +++ b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
> > @@ -381,6 +381,11 @@
> > function = "pwm1";
> > };
> >
> > + pwm2_pins: pwm2 {
> > + groups = "pwm2_a";
> > + function = "pwm2";
> > + };
> > +
> > sdhi0_pins: sd0 {
> > groups = "sdhi0_data4", "sdhi0_ctrl";
> > function = "sdhi0";
> > @@ -463,6 +468,13 @@
> > status = "okay";
> > };
> >
> > +&pwm2 {
> > + /* PMIC DC/DC switching frequency synchronization */
>
> Please pardon the stupid question, but if the PWM channel is used by the PMIC,
> is there a point in enabling it without a PMIC DT node using it ?
Hi Ulrich,
I'm wondering if you have any plans to follow-up on this patch.
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [PATCH v2 7/8] arm64: dts: r8a7795-salvator-x: Enable PWM2
2017-08-30 8:06 ` Simon Horman
@ 2017-08-30 8:08 ` Simon Horman
0 siblings, 0 replies; 29+ messages in thread
From: Simon Horman @ 2017-08-30 8:08 UTC (permalink / raw)
To: Laurent Pinchart
Cc: Ulrich Hecht, geert, linux-pwm, linux-renesas-soc, magnus.damm,
Takeshi Kihara
On Wed, Aug 30, 2017 at 10:06:30AM +0200, Simon Horman wrote:
> On Thu, Apr 27, 2017 at 05:40:51PM +0300, Laurent Pinchart wrote:
> > Hi Ulrich,
> >
> > Thank you for the patch.
> >
> > On Thursday 27 Apr 2017 16:37:42 Ulrich Hecht wrote:
> > > From: Takeshi Kihara <takeshi.kihara.df@renesas.com>
> > >
> > > This patch enables PWM2 for Salvator-X board on R8A7795 SoC.
> > >
> > > Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
> > > Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
> > > ---
> > > arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts | 12 ++++++++++++
> > > 1 file changed, 12 insertions(+)
> > >
> > > diff --git a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
> > > b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts index 8558b27..534b17e
> > > 100644
> > > --- a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
> > > +++ b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
> > > @@ -381,6 +381,11 @@
> > > function = "pwm1";
> > > };
> > >
> > > + pwm2_pins: pwm2 {
> > > + groups = "pwm2_a";
> > > + function = "pwm2";
> > > + };
> > > +
> > > sdhi0_pins: sd0 {
> > > groups = "sdhi0_data4", "sdhi0_ctrl";
> > > function = "sdhi0";
> > > @@ -463,6 +468,13 @@
> > > status = "okay";
> > > };
> > >
> > > +&pwm2 {
> > > + /* PMIC DC/DC switching frequency synchronization */
> >
> > Please pardon the stupid question, but if the PWM channel is used by the PMIC,
> > is there a point in enabling it without a PMIC DT node using it ?
>
> Hi Ulrich,
>
> I'm wondering if you have any plans to follow-up on this patch.
And likewise
"[v2,5/8] arm64: dts: r8a7796-salvator-x: Add PWM device support"
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [PATCH v2 4/8] arm64: dts: r8a7796: salvator-x: Add panel backlight support
2017-04-27 14:37 ` [PATCH v2 4/8] arm64: dts: r8a7796: salvator-x: Add panel backlight support Ulrich Hecht
2017-04-27 14:43 ` Laurent Pinchart
@ 2017-09-05 15:08 ` Geert Uytterhoeven
1 sibling, 0 replies; 29+ messages in thread
From: Geert Uytterhoeven @ 2017-09-05 15:08 UTC (permalink / raw)
To: Ulrich Hecht
Cc: Simon Horman, Linux PWM List, Linux-Renesas, Magnus Damm,
Laurent Pinchart
Hi Ulrich,
On Thu, Apr 27, 2017 at 4:37 PM, Ulrich Hecht
<ulrich.hecht+renesas@gmail.com> wrote:
> The panel backlight is controlled through a GPIO and a PWM channel.
>
> Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
> ---
> arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts | 22 ++++++++++++++++++++++
> 1 file changed, 22 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts b/arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts
> index 14d9e51..abda84c 100644
> --- a/arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts
> +++ b/arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts
> @@ -133,6 +133,11 @@
> function = "i2c2";
> };
>
> + pwm1_pins: pwm {
> + groups = "pwm1_a";
> + function = "pwm1";
> + };
> +
> sdhi0_pins: sd0 {
> groups = "sdhi0_data4", "sdhi0_ctrl";
> function = "sdhi0";
> @@ -183,6 +188,16 @@
> interrupt-parent = <&gpio2>;
> interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
> };
> +
> + backlight: backlight {
> + compatible = "pwm-backlight";
> + pwms = <&pwm1 0 50000>;
> +
> + brightness-levels = <256 128 64 16 8 4 0>;
> + default-brightness-level = <6>;
> +
> + enable-gpios = <&gpio6 7 GPIO_ACTIVE_HIGH>;
> + };
> };
This prints the following warning:
pwm-backlight backlight: backlight supply power not found, using dummy regulator
According to Documentation/devicetree/bindings/leds/backlight/pwm-backlight.txt,
the "power-supply" property is required.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
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
^ permalink raw reply [flat|nested] 29+ messages in thread
end of thread, other threads:[~2017-09-05 15:08 UTC | newest]
Thread overview: 29+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-27 14:37 [PATCH v2 0/8] r8a7795/6 Salvator-X PWM enablement Ulrich Hecht
2017-04-27 14:37 ` [PATCH v2 1/8] pinctrl: sh-pfc: r8a7796: Add PWM pins, groups and functions Ulrich Hecht
2017-04-27 14:37 ` [PATCH v2 2/8] clk: renesas: r8a7796: add PWM clock Ulrich Hecht
2017-04-27 14:37 ` [PATCH v2 3/8] arm64: dts: r8a7796: Add PWM device nodes Ulrich Hecht
2017-04-27 14:37 ` [PATCH v2 4/8] arm64: dts: r8a7796: salvator-x: Add panel backlight support Ulrich Hecht
2017-04-27 14:43 ` Laurent Pinchart
2017-05-13 18:56 ` Laurent Pinchart
2017-05-15 5:48 ` Simon Horman
2017-05-15 6:50 ` Laurent Pinchart
2017-05-15 6:59 ` Simon Horman
2017-09-05 15:08 ` Geert Uytterhoeven
2017-04-27 14:37 ` [PATCH v2 5/8] arm64: dts: r8a7796-salvator-x: Add PWM device support Ulrich Hecht
2017-04-27 14:37 ` [PATCH v2 6/8] arm64: dts: r8a7795: salvator-x: Add panel backlight support Ulrich Hecht
2017-04-27 14:42 ` Laurent Pinchart
2017-04-27 14:43 ` Laurent Pinchart
2017-04-28 5:23 ` Simon Horman
2017-04-27 14:37 ` [PATCH v2 7/8] arm64: dts: r8a7795-salvator-x: Enable PWM2 Ulrich Hecht
2017-04-27 14:40 ` Laurent Pinchart
2017-08-30 8:06 ` Simon Horman
2017-08-30 8:08 ` Simon Horman
2017-04-27 14:37 ` [PATCH v2 8/8] dt-bindings: pwm: Add R-Car M3-W device tree bindings Ulrich Hecht
2017-04-27 14:50 ` Geert Uytterhoeven
2017-04-28 5:24 ` Simon Horman
2017-04-28 7:29 ` [PATCH v2 0/8] r8a7795/6 Salvator-X PWM enablement Simon Horman
2017-05-12 9:16 ` Simon Horman
2017-05-12 10:00 ` Laurent Pinchart
2017-05-12 10:36 ` Ulrich Hecht
2017-05-12 11:03 ` Laurent Pinchart
2017-05-15 5:42 ` Simon Horman
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.