* [PATCH 0/2] ARM: dts: r8a7740/armadillo800eva: Add LCD support
@ 2023-06-22 9:23 Geert Uytterhoeven
2023-06-22 9:23 ` [PATCH 1/2] ARM: dts: r8a7740: Add LCDC nodes Geert Uytterhoeven
2023-06-22 9:23 ` [PATCH 2/2] ARM: dts: armadillo800eva: Add LCD panel Geert Uytterhoeven
0 siblings, 2 replies; 8+ messages in thread
From: Geert Uytterhoeven @ 2023-06-22 9:23 UTC (permalink / raw)
To: Magnus Damm, Laurent Pinchart
Cc: linux-renesas-soc, linux-arm-kernel, Geert Uytterhoeven
Hi all,
This patch series adds support for the two LCD Controllers (LCDC) on the
R-Mobile A1 SoC, and for the 5" WVGA TFT LCD panel on the
Armadillo-800-EVA development board.
For proper operation, this depends on:
1. Commit 410bb21319f69c2e ("drm/panel: simple: Add Ampire
AM-800480L1TMQW-T00H") in drm/drm-next,
2. Patch series "[PATCH 00/39] drm: renesas: shmobile: Atomic
conversion + DT support"
https://lore.kernel.org/r/cover.1687423204.git.geert+renesas@glider.be
3. Enabling CONFIG_DRM_SHMOBILE instead of CONFIG_FB_SH_MOBILE_LCDC.
Thanks for your comment!
Geert Uytterhoeven (2):
ARM: dts: r8a7740: Add LCDC nodes
ARM: dts: armadillo800eva: Add LCD panel
arch/arm/boot/dts/r8a7740-armadillo800eva.dts | 28 +++++++-
arch/arm/boot/dts/r8a7740.dtsi | 65 +++++++++++++++++++
2 files changed, 91 insertions(+), 2 deletions(-)
--
2.34.1
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
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/2] ARM: dts: r8a7740: Add LCDC nodes
2023-06-22 9:23 [PATCH 0/2] ARM: dts: r8a7740/armadillo800eva: Add LCD support Geert Uytterhoeven
@ 2023-06-22 9:23 ` Geert Uytterhoeven
2023-06-23 13:03 ` Laurent Pinchart
2023-06-22 9:23 ` [PATCH 2/2] ARM: dts: armadillo800eva: Add LCD panel Geert Uytterhoeven
1 sibling, 1 reply; 8+ messages in thread
From: Geert Uytterhoeven @ 2023-06-22 9:23 UTC (permalink / raw)
To: Magnus Damm, Laurent Pinchart
Cc: linux-renesas-soc, linux-arm-kernel, Geert Uytterhoeven
Add device nodes for the two LCD Controllers (LCDC) on the R-Mobile A1
SoC, and for the two optional external LCDL clock inputs.
Note that the HDMI clock for LCDC1 is not added, as this clock is not
yet supported.
Based on a patch by Laurent Pinchart adding the first LCDC device node.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Changes compared to Laurent's original:
- Add lcdc0 label,
- Rename node from display to lcdc-controller,
- Rename compatible value from "renesas,lcdc-r8a7740" to
"renesas,r8a7740-lcdc",
- Correct syntax of reg property,
- Use GIC_SPI macro,
- Add more clocks,
- Add power-domains property,
- Add status disabled,
- Remove second port from lcdc0, as only lcdc1 has an HDMI port,
- Add lcdc1 device node.
---
arch/arm/boot/dts/r8a7740.dtsi | 65 ++++++++++++++++++++++++++++++++++
1 file changed, 65 insertions(+)
diff --git a/arch/arm/boot/dts/r8a7740.dtsi b/arch/arm/boot/dts/r8a7740.dtsi
index 1b2cf5fa322b2985..55884ec701f8dab4 100644
--- a/arch/arm/boot/dts/r8a7740.dtsi
+++ b/arch/arm/boot/dts/r8a7740.dtsi
@@ -398,6 +398,61 @@ sh_fsi2: sound@fe1f0000 {
status = "disabled";
};
+ lcdc0: lcd-controller@fe940000 {
+ compatible = "renesas,r8a7740-lcdc";
+ reg = <0xfe940000 0x4000>;
+ interrupts = <GIC_SPI 177 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&mstp1_clks R8A7740_CLK_LCDC0>,
+ <&cpg_clocks R8A7740_CLK_M3>, <&lcdlclk0_clk>,
+ <&vou_clk>;
+ clock-names = "fck", "media", "lclk", "video";
+ power-domains = <&pd_a4lc>;
+ status = "disabled";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ lcdc0_rgb: endpoint {
+ };
+ };
+ };
+ };
+
+ lcdc1: lcd-controller@fe944000 {
+ compatible = "renesas,r8a7740-lcdc";
+ reg = <0xfe944000 0x4000>;
+ interrupts = <GIC_SPI 178 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&mstp1_clks R8A7740_CLK_LCDC1>,
+ <&cpg_clocks R8A7740_CLK_M3>, <&lcdlclk1_clk>,
+ <&vou_clk>;
+ clock-names = "fck", "media", "lclk", "video";
+ power-domains = <&pd_a4lc>;
+ status = "disabled";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ lcdc1_rgb: endpoint {
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+
+ lcdc1_hdmi: endpoint {
+ };
+ };
+ };
+ };
+
tmu0: timer@fff80000 {
compatible = "renesas,tmu-r8a7740", "renesas,tmu";
reg = <0xfff80000 0x2c>;
@@ -474,6 +529,16 @@ fsibck_clk: fsibck {
#clock-cells = <0>;
clock-frequency = <0>;
};
+ lcdlclk0_clk: lcdlclk0 {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-frequency = <0>;
+ };
+ lcdlclk1_clk: lcdlclk1 {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-frequency = <0>;
+ };
/* Special CPG clocks */
cpg_clocks: cpg_clocks@e6150000 {
--
2.34.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/2] ARM: dts: armadillo800eva: Add LCD panel
2023-06-22 9:23 [PATCH 0/2] ARM: dts: r8a7740/armadillo800eva: Add LCD support Geert Uytterhoeven
2023-06-22 9:23 ` [PATCH 1/2] ARM: dts: r8a7740: Add LCDC nodes Geert Uytterhoeven
@ 2023-06-22 9:23 ` Geert Uytterhoeven
2023-06-23 13:03 ` Laurent Pinchart
1 sibling, 1 reply; 8+ messages in thread
From: Geert Uytterhoeven @ 2023-06-22 9:23 UTC (permalink / raw)
To: Magnus Damm, Laurent Pinchart
Cc: linux-renesas-soc, linux-arm-kernel, Geert Uytterhoeven
Describe the 5" WVGA TFT LCD panel on the Armadillo-800-EVA development
board, and enable the LCD controller that drives it.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
arch/arm/boot/dts/r8a7740-armadillo800eva.dts | 28 +++++++++++++++++--
1 file changed, 26 insertions(+), 2 deletions(-)
diff --git a/arch/arm/boot/dts/r8a7740-armadillo800eva.dts b/arch/arm/boot/dts/r8a7740-armadillo800eva.dts
index 101413d5164913c5..fb6b432c4df2d948 100644
--- a/arch/arm/boot/dts/r8a7740-armadillo800eva.dts
+++ b/arch/arm/boot/dts/r8a7740-armadillo800eva.dts
@@ -132,7 +132,7 @@ i2c2: i2c-2 {
i2c-gpio,delay-us = <5>;
};
- backlight {
+ backlight: backlight {
compatible = "pwm-backlight";
pwms = <&tpu 2 33333 PWM_POLARITY_INVERTED>;
brightness-levels = <0 1 2 4 8 16 32 64 128 255>;
@@ -143,6 +143,18 @@ backlight {
enable-gpios = <&pfc 61 GPIO_ACTIVE_HIGH>;
};
+ panel {
+ compatible = "ampire,am-800480l1tmqw-t00h";
+ backlight = <&backlight>;
+ power-supply = <®_5p0v>;
+
+ port {
+ panel_in: endpoint {
+ remote-endpoint = <&lcdc0_rgb>;
+ };
+ };
+ };
+
sound {
compatible = "simple-audio-card";
@@ -228,10 +240,22 @@ rtc@30 {
};
};
-&pfc {
+&lcdc0 {
pinctrl-0 = <&lcd0_pins>;
pinctrl-names = "default";
+ status = "okay";
+
+ ports {
+ port@0 {
+ endpoint {
+ remote-endpoint = <&panel_in>;
+ };
+ };
+ };
+};
+
+&pfc {
ether_pins: ether {
groups = "gether_mii", "gether_int";
function = "gether";
--
2.34.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] ARM: dts: r8a7740: Add LCDC nodes
2023-06-22 9:23 ` [PATCH 1/2] ARM: dts: r8a7740: Add LCDC nodes Geert Uytterhoeven
@ 2023-06-23 13:03 ` Laurent Pinchart
2023-06-23 15:07 ` Geert Uytterhoeven
0 siblings, 1 reply; 8+ messages in thread
From: Laurent Pinchart @ 2023-06-23 13:03 UTC (permalink / raw)
To: Geert Uytterhoeven; +Cc: Magnus Damm, linux-renesas-soc, linux-arm-kernel
Hi Geert,
Thank you for the patch.
On Thu, Jun 22, 2023 at 11:23:14AM +0200, Geert Uytterhoeven wrote:
> Add device nodes for the two LCD Controllers (LCDC) on the R-Mobile A1
> SoC, and for the two optional external LCDL clock inputs.
>
> Note that the HDMI clock for LCDC1 is not added, as this clock is not
> yet supported.
>
> Based on a patch by Laurent Pinchart adding the first LCDC device node.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> Changes compared to Laurent's original:
> - Add lcdc0 label,
> - Rename node from display to lcdc-controller,
> - Rename compatible value from "renesas,lcdc-r8a7740" to
> "renesas,r8a7740-lcdc",
> - Correct syntax of reg property,
> - Use GIC_SPI macro,
> - Add more clocks,
> - Add power-domains property,
> - Add status disabled,
> - Remove second port from lcdc0, as only lcdc1 has an HDMI port,
> - Add lcdc1 device node.
> ---
> arch/arm/boot/dts/r8a7740.dtsi | 65 ++++++++++++++++++++++++++++++++++
> 1 file changed, 65 insertions(+)
>
> diff --git a/arch/arm/boot/dts/r8a7740.dtsi b/arch/arm/boot/dts/r8a7740.dtsi
> index 1b2cf5fa322b2985..55884ec701f8dab4 100644
> --- a/arch/arm/boot/dts/r8a7740.dtsi
> +++ b/arch/arm/boot/dts/r8a7740.dtsi
> @@ -398,6 +398,61 @@ sh_fsi2: sound@fe1f0000 {
> status = "disabled";
> };
>
> + lcdc0: lcd-controller@fe940000 {
> + compatible = "renesas,r8a7740-lcdc";
> + reg = <0xfe940000 0x4000>;
> + interrupts = <GIC_SPI 177 IRQ_TYPE_LEVEL_HIGH>;
> + clocks = <&mstp1_clks R8A7740_CLK_LCDC0>,
> + <&cpg_clocks R8A7740_CLK_M3>, <&lcdlclk0_clk>,
> + <&vou_clk>;
> + clock-names = "fck", "media", "lclk", "video";
> + power-domains = <&pd_a4lc>;
> + status = "disabled";
> +
> + ports {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + port@0 {
> + reg = <0>;
> +
> + lcdc0_rgb: endpoint {
> + };
> + };
> + };
> + };
> +
> + lcdc1: lcd-controller@fe944000 {
> + compatible = "renesas,r8a7740-lcdc";
> + reg = <0xfe944000 0x4000>;
> + interrupts = <GIC_SPI 178 IRQ_TYPE_LEVEL_HIGH>;
> + clocks = <&mstp1_clks R8A7740_CLK_LCDC1>,
> + <&cpg_clocks R8A7740_CLK_M3>, <&lcdlclk1_clk>,
> + <&vou_clk>;
> + clock-names = "fck", "media", "lclk", "video";
> + power-domains = <&pd_a4lc>;
> + status = "disabled";
> +
> + ports {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + port@0 {
> + reg = <0>;
> +
> + lcdc1_rgb: endpoint {
> + };
> + };
> +
> + port@1 {
> + reg = <1>;
> +
> + lcdc1_hdmi: endpoint {
> + };
> + };
> + };
> + };
> +
> tmu0: timer@fff80000 {
> compatible = "renesas,tmu-r8a7740", "renesas,tmu";
> reg = <0xfff80000 0x2c>;
> @@ -474,6 +529,16 @@ fsibck_clk: fsibck {
> #clock-cells = <0>;
> clock-frequency = <0>;
> };
> + lcdlclk0_clk: lcdlclk0 {
> + compatible = "fixed-clock";
> + #clock-cells = <0>;
> + clock-frequency = <0>;
> + };
> + lcdlclk1_clk: lcdlclk1 {
> + compatible = "fixed-clock";
> + #clock-cells = <0>;
> + clock-frequency = <0>;
> + };
The clock frequency seems quite low :-) As far as I understand, there
are the clocks fed to the external LCDLCLK pins. They belong to the
board DTS, not here. If a board doesn't provide an external clock, the
clock should simply be ommitted. The driver must thus treat it as
optional.
>
> /* Special CPG clocks */
> cpg_clocks: cpg_clocks@e6150000 {
--
Regards,
Laurent Pinchart
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] ARM: dts: armadillo800eva: Add LCD panel
2023-06-22 9:23 ` [PATCH 2/2] ARM: dts: armadillo800eva: Add LCD panel Geert Uytterhoeven
@ 2023-06-23 13:03 ` Laurent Pinchart
0 siblings, 0 replies; 8+ messages in thread
From: Laurent Pinchart @ 2023-06-23 13:03 UTC (permalink / raw)
To: Geert Uytterhoeven; +Cc: Magnus Damm, linux-renesas-soc, linux-arm-kernel
Hi Geert,
Thank you for the patch.
On Thu, Jun 22, 2023 at 11:23:15AM +0200, Geert Uytterhoeven wrote:
> Describe the 5" WVGA TFT LCD panel on the Armadillo-800-EVA development
> board, and enable the LCD controller that drives it.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> ---
> arch/arm/boot/dts/r8a7740-armadillo800eva.dts | 28 +++++++++++++++++--
> 1 file changed, 26 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/boot/dts/r8a7740-armadillo800eva.dts b/arch/arm/boot/dts/r8a7740-armadillo800eva.dts
> index 101413d5164913c5..fb6b432c4df2d948 100644
> --- a/arch/arm/boot/dts/r8a7740-armadillo800eva.dts
> +++ b/arch/arm/boot/dts/r8a7740-armadillo800eva.dts
> @@ -132,7 +132,7 @@ i2c2: i2c-2 {
> i2c-gpio,delay-us = <5>;
> };
>
> - backlight {
> + backlight: backlight {
> compatible = "pwm-backlight";
> pwms = <&tpu 2 33333 PWM_POLARITY_INVERTED>;
> brightness-levels = <0 1 2 4 8 16 32 64 128 255>;
> @@ -143,6 +143,18 @@ backlight {
> enable-gpios = <&pfc 61 GPIO_ACTIVE_HIGH>;
> };
>
> + panel {
> + compatible = "ampire,am-800480l1tmqw-t00h";
> + backlight = <&backlight>;
> + power-supply = <®_5p0v>;
> +
> + port {
> + panel_in: endpoint {
> + remote-endpoint = <&lcdc0_rgb>;
> + };
> + };
> + };
> +
> sound {
> compatible = "simple-audio-card";
>
> @@ -228,10 +240,22 @@ rtc@30 {
> };
> };
>
> -&pfc {
> +&lcdc0 {
> pinctrl-0 = <&lcd0_pins>;
> pinctrl-names = "default";
>
> + status = "okay";
> +
> + ports {
> + port@0 {
> + endpoint {
> + remote-endpoint = <&panel_in>;
> + };
> + };
> + };
> +};
> +
> +&pfc {
> ether_pins: ether {
> groups = "gether_mii", "gether_int";
> function = "gether";
--
Regards,
Laurent Pinchart
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] ARM: dts: r8a7740: Add LCDC nodes
2023-06-23 13:03 ` Laurent Pinchart
@ 2023-06-23 15:07 ` Geert Uytterhoeven
2023-06-23 15:12 ` Laurent Pinchart
0 siblings, 1 reply; 8+ messages in thread
From: Geert Uytterhoeven @ 2023-06-23 15:07 UTC (permalink / raw)
To: Laurent Pinchart; +Cc: Magnus Damm, linux-renesas-soc, linux-arm-kernel
Hi Laurent,
On Fri, Jun 23, 2023 at 3:03 PM Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
> On Thu, Jun 22, 2023 at 11:23:14AM +0200, Geert Uytterhoeven wrote:
> > Add device nodes for the two LCD Controllers (LCDC) on the R-Mobile A1
> > SoC, and for the two optional external LCDL clock inputs.
> >
> > Note that the HDMI clock for LCDC1 is not added, as this clock is not
> > yet supported.
> >
> > Based on a patch by Laurent Pinchart adding the first LCDC device node.
> >
> > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> > ---
> > Changes compared to Laurent's original:
> > - Add lcdc0 label,
> > - Rename node from display to lcdc-controller,
> > - Rename compatible value from "renesas,lcdc-r8a7740" to
> > "renesas,r8a7740-lcdc",
> > - Correct syntax of reg property,
> > - Use GIC_SPI macro,
> > - Add more clocks,
> > - Add power-domains property,
> > - Add status disabled,
> > - Remove second port from lcdc0, as only lcdc1 has an HDMI port,
> > - Add lcdc1 device node.
> > ---
> > arch/arm/boot/dts/r8a7740.dtsi | 65 ++++++++++++++++++++++++++++++++++
> > 1 file changed, 65 insertions(+)
> >
> > diff --git a/arch/arm/boot/dts/r8a7740.dtsi b/arch/arm/boot/dts/r8a7740.dtsi
> > index 1b2cf5fa322b2985..55884ec701f8dab4 100644
> > --- a/arch/arm/boot/dts/r8a7740.dtsi
> > +++ b/arch/arm/boot/dts/r8a7740.dtsi
> > @@ -398,6 +398,61 @@ sh_fsi2: sound@fe1f0000 {
> > status = "disabled";
> > };
> >
> > + lcdc0: lcd-controller@fe940000 {
> > + compatible = "renesas,r8a7740-lcdc";
> > + reg = <0xfe940000 0x4000>;
> > + interrupts = <GIC_SPI 177 IRQ_TYPE_LEVEL_HIGH>;
> > + clocks = <&mstp1_clks R8A7740_CLK_LCDC0>,
> > + <&cpg_clocks R8A7740_CLK_M3>, <&lcdlclk0_clk>,
> > + <&vou_clk>;
> > + clock-names = "fck", "media", "lclk", "video";
> > + power-domains = <&pd_a4lc>;
> > + status = "disabled";
> > +
> > + ports {
> > + #address-cells = <1>;
> > + #size-cells = <0>;
> > +
> > + port@0 {
> > + reg = <0>;
> > +
> > + lcdc0_rgb: endpoint {
> > + };
> > + };
> > + };
> > + };
> > +
> > + lcdc1: lcd-controller@fe944000 {
> > + compatible = "renesas,r8a7740-lcdc";
> > + reg = <0xfe944000 0x4000>;
> > + interrupts = <GIC_SPI 178 IRQ_TYPE_LEVEL_HIGH>;
> > + clocks = <&mstp1_clks R8A7740_CLK_LCDC1>,
> > + <&cpg_clocks R8A7740_CLK_M3>, <&lcdlclk1_clk>,
> > + <&vou_clk>;
> > + clock-names = "fck", "media", "lclk", "video";
> > + power-domains = <&pd_a4lc>;
> > + status = "disabled";
> > +
> > + ports {
> > + #address-cells = <1>;
> > + #size-cells = <0>;
> > +
> > + port@0 {
> > + reg = <0>;
> > +
> > + lcdc1_rgb: endpoint {
> > + };
> > + };
> > +
> > + port@1 {
> > + reg = <1>;
> > +
> > + lcdc1_hdmi: endpoint {
> > + };
> > + };
> > + };
> > + };
> > +
> > tmu0: timer@fff80000 {
> > compatible = "renesas,tmu-r8a7740", "renesas,tmu";
> > reg = <0xfff80000 0x2c>;
> > @@ -474,6 +529,16 @@ fsibck_clk: fsibck {
> > #clock-cells = <0>;
> > clock-frequency = <0>;
> > };
> > + lcdlclk0_clk: lcdlclk0 {
> > + compatible = "fixed-clock";
> > + #clock-cells = <0>;
> > + clock-frequency = <0>;
> > + };
> > + lcdlclk1_clk: lcdlclk1 {
> > + compatible = "fixed-clock";
> > + #clock-cells = <0>;
> > + clock-frequency = <0>;
> > + };
>
> The clock frequency seems quite low :-) As far as I understand, there
> are the clocks fed to the external LCDLCLK pins. They belong to the
> board DTS, not here. If a board doesn't provide an external clock, the
> clock should simply be ommitted. The driver must thus treat it as
> optional.
Usually, we do provide clock nodes with a zero rate in the SoC-specific
.dtsi for optional clocks.
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
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] ARM: dts: r8a7740: Add LCDC nodes
2023-06-23 15:07 ` Geert Uytterhoeven
@ 2023-06-23 15:12 ` Laurent Pinchart
2023-06-23 15:26 ` Geert Uytterhoeven
0 siblings, 1 reply; 8+ messages in thread
From: Laurent Pinchart @ 2023-06-23 15:12 UTC (permalink / raw)
To: Geert Uytterhoeven; +Cc: Magnus Damm, linux-renesas-soc, linux-arm-kernel
On Fri, Jun 23, 2023 at 05:07:44PM +0200, Geert Uytterhoeven wrote:
> On Fri, Jun 23, 2023 at 3:03 PM Laurent Pinchart wrote:
> > On Thu, Jun 22, 2023 at 11:23:14AM +0200, Geert Uytterhoeven wrote:
> > > Add device nodes for the two LCD Controllers (LCDC) on the R-Mobile A1
> > > SoC, and for the two optional external LCDL clock inputs.
> > >
> > > Note that the HDMI clock for LCDC1 is not added, as this clock is not
> > > yet supported.
> > >
> > > Based on a patch by Laurent Pinchart adding the first LCDC device node.
> > >
> > > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> > > ---
> > > Changes compared to Laurent's original:
> > > - Add lcdc0 label,
> > > - Rename node from display to lcdc-controller,
> > > - Rename compatible value from "renesas,lcdc-r8a7740" to
> > > "renesas,r8a7740-lcdc",
> > > - Correct syntax of reg property,
> > > - Use GIC_SPI macro,
> > > - Add more clocks,
> > > - Add power-domains property,
> > > - Add status disabled,
> > > - Remove second port from lcdc0, as only lcdc1 has an HDMI port,
> > > - Add lcdc1 device node.
> > > ---
> > > arch/arm/boot/dts/r8a7740.dtsi | 65 ++++++++++++++++++++++++++++++++++
> > > 1 file changed, 65 insertions(+)
> > >
> > > diff --git a/arch/arm/boot/dts/r8a7740.dtsi b/arch/arm/boot/dts/r8a7740.dtsi
> > > index 1b2cf5fa322b2985..55884ec701f8dab4 100644
> > > --- a/arch/arm/boot/dts/r8a7740.dtsi
> > > +++ b/arch/arm/boot/dts/r8a7740.dtsi
> > > @@ -398,6 +398,61 @@ sh_fsi2: sound@fe1f0000 {
> > > status = "disabled";
> > > };
> > >
> > > + lcdc0: lcd-controller@fe940000 {
> > > + compatible = "renesas,r8a7740-lcdc";
> > > + reg = <0xfe940000 0x4000>;
> > > + interrupts = <GIC_SPI 177 IRQ_TYPE_LEVEL_HIGH>;
> > > + clocks = <&mstp1_clks R8A7740_CLK_LCDC0>,
> > > + <&cpg_clocks R8A7740_CLK_M3>, <&lcdlclk0_clk>,
> > > + <&vou_clk>;
> > > + clock-names = "fck", "media", "lclk", "video";
> > > + power-domains = <&pd_a4lc>;
> > > + status = "disabled";
> > > +
> > > + ports {
> > > + #address-cells = <1>;
> > > + #size-cells = <0>;
> > > +
> > > + port@0 {
> > > + reg = <0>;
> > > +
> > > + lcdc0_rgb: endpoint {
> > > + };
> > > + };
> > > + };
> > > + };
> > > +
> > > + lcdc1: lcd-controller@fe944000 {
> > > + compatible = "renesas,r8a7740-lcdc";
> > > + reg = <0xfe944000 0x4000>;
> > > + interrupts = <GIC_SPI 178 IRQ_TYPE_LEVEL_HIGH>;
> > > + clocks = <&mstp1_clks R8A7740_CLK_LCDC1>,
> > > + <&cpg_clocks R8A7740_CLK_M3>, <&lcdlclk1_clk>,
> > > + <&vou_clk>;
> > > + clock-names = "fck", "media", "lclk", "video";
> > > + power-domains = <&pd_a4lc>;
> > > + status = "disabled";
> > > +
> > > + ports {
> > > + #address-cells = <1>;
> > > + #size-cells = <0>;
> > > +
> > > + port@0 {
> > > + reg = <0>;
> > > +
> > > + lcdc1_rgb: endpoint {
> > > + };
> > > + };
> > > +
> > > + port@1 {
> > > + reg = <1>;
> > > +
> > > + lcdc1_hdmi: endpoint {
> > > + };
> > > + };
> > > + };
> > > + };
> > > +
> > > tmu0: timer@fff80000 {
> > > compatible = "renesas,tmu-r8a7740", "renesas,tmu";
> > > reg = <0xfff80000 0x2c>;
> > > @@ -474,6 +529,16 @@ fsibck_clk: fsibck {
> > > #clock-cells = <0>;
> > > clock-frequency = <0>;
> > > };
> > > + lcdlclk0_clk: lcdlclk0 {
> > > + compatible = "fixed-clock";
> > > + #clock-cells = <0>;
> > > + clock-frequency = <0>;
> > > + };
> > > + lcdlclk1_clk: lcdlclk1 {
> > > + compatible = "fixed-clock";
> > > + #clock-cells = <0>;
> > > + clock-frequency = <0>;
> > > + };
> >
> > The clock frequency seems quite low :-) As far as I understand, there
> > are the clocks fed to the external LCDLCLK pins. They belong to the
> > board DTS, not here. If a board doesn't provide an external clock, the
> > clock should simply be ommitted. The driver must thus treat it as
> > optional.
>
> Usually, we do provide clock nodes with a zero rate in the SoC-specific
> .dtsi for optional clocks.
Who is "we" ? Is that a kernel-wide practice ? For rcar-du that's not
the case as far as I can tell.
--
Regards,
Laurent Pinchart
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] ARM: dts: r8a7740: Add LCDC nodes
2023-06-23 15:12 ` Laurent Pinchart
@ 2023-06-23 15:26 ` Geert Uytterhoeven
0 siblings, 0 replies; 8+ messages in thread
From: Geert Uytterhoeven @ 2023-06-23 15:26 UTC (permalink / raw)
To: Laurent Pinchart; +Cc: Magnus Damm, linux-renesas-soc, linux-arm-kernel
Hi Laurent,
On Fri, Jun 23, 2023 at 5:12 PM Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
> On Fri, Jun 23, 2023 at 05:07:44PM +0200, Geert Uytterhoeven wrote:
> > On Fri, Jun 23, 2023 at 3:03 PM Laurent Pinchart wrote:
> > > On Thu, Jun 22, 2023 at 11:23:14AM +0200, Geert Uytterhoeven wrote:
> > > > Add device nodes for the two LCD Controllers (LCDC) on the R-Mobile A1
> > > > SoC, and for the two optional external LCDL clock inputs.
> > > >
> > > > Note that the HDMI clock for LCDC1 is not added, as this clock is not
> > > > yet supported.
> > > >
> > > > Based on a patch by Laurent Pinchart adding the first LCDC device node.
> > > >
> > > > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> > > > ---
> > > > Changes compared to Laurent's original:
> > > > - Add lcdc0 label,
> > > > - Rename node from display to lcdc-controller,
> > > > - Rename compatible value from "renesas,lcdc-r8a7740" to
> > > > "renesas,r8a7740-lcdc",
> > > > - Correct syntax of reg property,
> > > > - Use GIC_SPI macro,
> > > > - Add more clocks,
> > > > - Add power-domains property,
> > > > - Add status disabled,
> > > > - Remove second port from lcdc0, as only lcdc1 has an HDMI port,
> > > > - Add lcdc1 device node.
> > > > ---
> > > > arch/arm/boot/dts/r8a7740.dtsi | 65 ++++++++++++++++++++++++++++++++++
> > > > 1 file changed, 65 insertions(+)
> > > >
> > > > diff --git a/arch/arm/boot/dts/r8a7740.dtsi b/arch/arm/boot/dts/r8a7740.dtsi
> > > > index 1b2cf5fa322b2985..55884ec701f8dab4 100644
> > > > --- a/arch/arm/boot/dts/r8a7740.dtsi
> > > > +++ b/arch/arm/boot/dts/r8a7740.dtsi
> > > > @@ -474,6 +529,16 @@ fsibck_clk: fsibck {
> > > > #clock-cells = <0>;
> > > > clock-frequency = <0>;
> > > > };
> > > > + lcdlclk0_clk: lcdlclk0 {
> > > > + compatible = "fixed-clock";
> > > > + #clock-cells = <0>;
> > > > + clock-frequency = <0>;
> > > > + };
> > > > + lcdlclk1_clk: lcdlclk1 {
> > > > + compatible = "fixed-clock";
> > > > + #clock-cells = <0>;
> > > > + clock-frequency = <0>;
> > > > + };
> > >
> > > The clock frequency seems quite low :-) As far as I understand, there
> > > are the clocks fed to the external LCDLCLK pins. They belong to the
> > > board DTS, not here. If a board doesn't provide an external clock, the
> > > clock should simply be ommitted. The driver must thus treat it as
> > > optional.
> >
> > Usually, we do provide clock nodes with a zero rate in the SoC-specific
> > .dtsi for optional clocks.
>
> Who is "we" ? Is that a kernel-wide practice ? For rcar-du that's not
> the case as far as I can tell.
"We" do for external CAN, SCIF, Audio, PCI, USB, ... clocks on R-Car.
Indeed not for DU...
It seems to be common on other platform, too:
git grep "clock-frequency = <0>;"
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
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2023-06-23 15:27 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-22 9:23 [PATCH 0/2] ARM: dts: r8a7740/armadillo800eva: Add LCD support Geert Uytterhoeven
2023-06-22 9:23 ` [PATCH 1/2] ARM: dts: r8a7740: Add LCDC nodes Geert Uytterhoeven
2023-06-23 13:03 ` Laurent Pinchart
2023-06-23 15:07 ` Geert Uytterhoeven
2023-06-23 15:12 ` Laurent Pinchart
2023-06-23 15:26 ` Geert Uytterhoeven
2023-06-22 9:23 ` [PATCH 2/2] ARM: dts: armadillo800eva: Add LCD panel Geert Uytterhoeven
2023-06-23 13:03 ` Laurent Pinchart
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).