Good Morning,
Apologies Heiko on taking so long for this v2.
This patch series adds support for the Pine64 touch panel to the rockpro64 single board computer. This panel attaches to the dsi port and includes an i2c touch screen.
The first two patches involve making the reset pin to the Feiyang fy07024di26a30d panel optional. On the rockpro64 and quartz64-a this pin is tied to dvdd and automatically comes high when power is applied. The third patch adds the device tree nodes to rockpro64 to permit the panel to be used.
Changelog: v2: - Drop patch 4 so we don't "enable" the nodes - Drop the unnecessary null checks - Rebase to 5.18-rc1
Peter Geis (3): dt-bindings: display: panel: feiyang, fy07024di26a30d: make reset gpio optional drm/panel: feiyang-fy07024di26a30d: make reset gpio optional arm64: dts: rockchip: add pine64 touch panel display to rockpro64
.../panel/feiyang,fy07024di26a30d.yaml | 1 - .../boot/dts/rockchip/rk3399-rockpro64.dtsi | 80 ++++++++++++++++++- .../drm/panel/panel-feiyang-fy07024di26a30d.c | 2 +- 3 files changed, 77 insertions(+), 6 deletions(-)
Some implementations do not use the reset signal, instead tying it to dvdd. Make the reset gpio optional to permit this.
Signed-off-by: Peter Geis pgwipeout@gmail.com Acked-by: Rob Herring robh@kernel.org --- .../bindings/display/panel/feiyang,fy07024di26a30d.yaml | 1 - 1 file changed, 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/display/panel/feiyang,fy07024di26a30d.yaml b/Documentation/devicetree/bindings/display/panel/feiyang,fy07024di26a30d.yaml index 95acf9e96f1c..1cf84c8dd85e 100644 --- a/Documentation/devicetree/bindings/display/panel/feiyang,fy07024di26a30d.yaml +++ b/Documentation/devicetree/bindings/display/panel/feiyang,fy07024di26a30d.yaml @@ -35,7 +35,6 @@ required: - reg - avdd-supply - dvdd-supply - - reset-gpios
additionalProperties: false
Some implementations do not use the reset signal, instead tying it to dvdd. Make the reset gpio optional to permit this.
Signed-off-by: Peter Geis pgwipeout@gmail.com --- drivers/gpu/drm/panel/panel-feiyang-fy07024di26a30d.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/panel/panel-feiyang-fy07024di26a30d.c b/drivers/gpu/drm/panel/panel-feiyang-fy07024di26a30d.c index a9cd7135cb51..ee61d60eceae 100644 --- a/drivers/gpu/drm/panel/panel-feiyang-fy07024di26a30d.c +++ b/drivers/gpu/drm/panel/panel-feiyang-fy07024di26a30d.c @@ -209,7 +209,7 @@ static int feiyang_dsi_probe(struct mipi_dsi_device *dsi) return dev_err_probe(&dsi->dev, PTR_ERR(ctx->avdd), "Couldn't get avdd regulator\n");
- ctx->reset = devm_gpiod_get(&dsi->dev, "reset", GPIOD_OUT_LOW); + ctx->reset = devm_gpiod_get_optional(&dsi->dev, "reset", GPIOD_OUT_LOW); if (IS_ERR(ctx->reset)) return dev_err_probe(&dsi->dev, PTR_ERR(ctx->reset), "Couldn't get our reset GPIO\n");
The Pine64 touch panel is a panel consisting of the Feiyang fy07024di26a30d panel with a Goodix gt911 touch screen. Add the device tree nodes to the rockpro64 to permit attaching this display to the device.
Signed-off-by: Peter Geis pgwipeout@gmail.com --- .../boot/dts/rockchip/rk3399-rockpro64.dtsi | 80 ++++++++++++++++++- 1 file changed, 76 insertions(+), 4 deletions(-)
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi index 45e77f86d329..f0fb450ddba6 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi @@ -20,6 +20,15 @@ chosen { stdout-path = "serial2:1500000n8"; };
+ /* enable for panel backlight support */ + backlight: backlight { + compatible = "pwm-backlight"; + pwms = <&pwm0 0 1000000 0>; + brightness-levels = <0 4 8 16 32 64 128 255>; + default-brightness-level = <5>; + status = "disabled"; + }; + clkin_gmac: external-gmac-clock { compatible = "fixed-clock"; clock-frequency = <125000000>; @@ -220,6 +229,14 @@ vdd_log: vdd-log { regulator-min-microvolt = <800000>; regulator-max-microvolt = <1700000>; }; + + avdd: avdd { + compatible = "regulator-fixed"; + regulator-name = "avdd"; + regulator-min-microvolt = <11000000>; + regulator-max-microvolt = <11000000>; + vin-supply = <&vcc3v3_s0>; + }; };
&cpu_l0 { @@ -301,6 +318,11 @@ &hdmi { status = "okay"; };
+/* force hdmi to vopb */ +&hdmi_in_vopl { + status = "disabled"; +}; + &hdmi_sound { status = "okay"; }; @@ -400,8 +422,6 @@ regulator-state-mem {
vcc3v0_touch: LDO_REG2 { regulator-name = "vcc3v0_touch"; - regulator-always-on; - regulator-boot-on; regulator-min-microvolt = <3000000>; regulator-max-microvolt = <3000000>; regulator-state-mem { @@ -490,8 +510,6 @@ regulator-state-mem {
vcc3v3_s0: SWITCH_REG2 { regulator-name = "vcc3v3_s0"; - regulator-always-on; - regulator-boot-on; regulator-state-mem { regulator-off-in-suspend; }; @@ -565,6 +583,19 @@ fusb0: typec-portc@22 { vbus-supply = <&vcc5v0_typec>; status = "okay"; }; + + /* enable for pine64 touch screen support */ + touch: touchscreen@5d { + compatible = "goodix,gt911"; + reg = <0x5d>; + AVDD28-supply = <&vcc3v0_touch>; + VDDIO-supply = <&vcc3v0_touch>; + interrupt-parent = <&gpio4>; + interrupts = <RK_PD5 IRQ_TYPE_EDGE_FALLING>; + irq-gpios = <&gpio4 RK_PD5 GPIO_ACTIVE_HIGH>; + reset-gpios = <&gpio4 RK_PD6 GPIO_ACTIVE_HIGH>; + status = "disabled"; + }; };
&i2s0 { @@ -600,6 +631,47 @@ &io_domains { gpio1830-supply = <&vcc_3v0>; };
+/* enable for pine64 panel display support */ +&mipi_dsi { + status = "disabled"; + clock-master; + + ports { + mipi_out: port@1 { + reg = <1>; + + mipi_out_panel: endpoint { + remote-endpoint = <&mipi_in_panel>; + }; + }; + }; + + mipi_panel: panel@0 { + compatible = "feiyang,fy07024di26a30d"; + reg = <0>; + avdd-supply = <&avdd>; + backlight = <&backlight>; + dvdd-supply = <&vcc3v3_s0>; + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + mipi_in_panel: endpoint { + remote-endpoint = <&mipi_out_panel>; + }; + }; + }; + }; +}; + +/* force dsi to vopl */ +&mipi_in_vopb { + status="disabled"; +}; + &pcie0 { ep-gpios = <&gpio2 RK_PD4 GPIO_ACTIVE_HIGH>; num-lanes = <4>;
On Wed, 11 May 2022 07:35:13 -0400, Peter Geis wrote:
Good Morning,
Apologies Heiko on taking so long for this v2.
This patch series adds support for the Pine64 touch panel to the rockpro64 single board computer. This panel attaches to the dsi port and includes an i2c touch screen.
[...]
Applied, thanks!
[1/3] dt-bindings: display: panel: feiyang, fy07024di26a30d: make reset gpio optional commit: d0956e2c520c9d730979a9669f27a77d40acac13 [2/3] drm/panel: feiyang-fy07024di26a30d: make reset gpio optional commit: de5db71e4c8c35ed5e92006e3064ce9230881ece
Best regards,
On Wed, 11 May 2022 07:35:13 -0400, Peter Geis wrote:
Good Morning,
Apologies Heiko on taking so long for this v2.
This patch series adds support for the Pine64 touch panel to the rockpro64 single board computer. This panel attaches to the dsi port and includes an i2c touch screen.
[...]
Applied, thanks!
[3/3] arm64: dts: rockchip: add pine64 touch panel display to rockpro64 ... for 5.20 .
The binding- and driver-change most likely won't reach drm-main and thus the next merge-window in time, so I've put the dts patch on a branch for 5.20 instead.
I've also made some ordering changes and dropped both the "force X to vopY" parts. DT is a hardware-description and not a configuration space ;-) . And a devicetree should definitly not try to work around implementation deficits of the kernel driver.
Both VOPs are capable of driving both hdmi and dsi with their relevant deficiencies being in terms of resolution or clock rates I guess, so anything related to selecting a matching VOP should be done in code in the kernel.
Best regards,
dri-devel@lists.freedesktop.org