arm64: dts: rockchip: add pine64 touch panel display to rockpro64
authorPeter Geis <pgwipeout@gmail.com>
Wed, 11 May 2022 11:35:16 +0000 (07:35 -0400)
committerHeiko Stuebner <heiko@sntech.de>
Tue, 7 Jun 2022 09:14:33 +0000 (11:14 +0200)
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>
Link: https://lore.kernel.org/r/20220511113517.4172962-4-pgwipeout@gmail.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi

index 45e77f8..6fdeee7 100644 (file)
                stdout-path = "serial2:1500000n8";
        };
 
+       /* enable for panel backlight support */
+       backlight: backlight {
+               compatible = "pwm-backlight";
+               brightness-levels = <0 4 8 16 32 64 128 255>;
+               default-brightness-level = <5>;
+               pwms = <&pwm0 0 1000000 0>;
+               status = "disabled";
+       };
+
        clkin_gmac: external-gmac-clock {
                compatible = "fixed-clock";
                clock-frequency = <125000000>;
                };
        };
 
+       avdd: avdd-regulator {
+               compatible = "regulator-fixed";
+               regulator-name = "avdd";
+               regulator-min-microvolt = <11000000>;
+               regulator-max-microvolt = <11000000>;
+               vin-supply = <&vcc3v3_s0>;
+       };
+
        vcc12v_dcin: vcc12v-dcin {
                compatible = "regulator-fixed";
                regulator-name = "vcc12v_dcin";
 
                        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 {
 
                        vcc3v3_s0: SWITCH_REG2 {
                                regulator-name = "vcc3v3_s0";
-                               regulator-always-on;
-                               regulator-boot-on;
                                regulator-state-mem {
                                        regulator-off-in-suspend;
                                };
                vbus-supply = <&vcc5v0_typec>;
                status = "okay";
        };
+
+       /* enable for pine64 touch screen support */
+       touch: touchscreen@5d {
+               compatible = "goodix,gt911";
+               reg = <0x5d>;
+               interrupt-parent = <&gpio4>;
+               interrupts = <RK_PD5 IRQ_TYPE_EDGE_FALLING>;
+               AVDD28-supply = <&vcc3v0_touch>;
+               VDDIO-supply = <&vcc3v0_touch>;
+               irq-gpios = <&gpio4 RK_PD5 GPIO_ACTIVE_HIGH>;
+               reset-gpios = <&gpio4 RK_PD6 GPIO_ACTIVE_HIGH>;
+               status = "disabled";
+       };
 };
 
 &i2s0 {
        gpio1830-supply = <&vcc_3v0>;
 };
 
+/* enable for pine64 panel display support */
+&mipi_dsi {
+       clock-master;
+       status = "disabled";
+
+       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>;
+                               };
+                       };
+               };
+       };
+};
+
 &pcie0 {
        ep-gpios = <&gpio2 RK_PD4 GPIO_ACTIVE_HIGH>;
        num-lanes = <4>;