Mhs40c display overlay

I have create a new to address a mhs40c display. This is a very cheap display, you can buy at ali for less than 15€.
As far as I can see, it is compatible with waveshare mhs40c.

https://www.waveshare.com/4inch-RPi-LCD-C.htm

I like to share the overlay. Maybe someone can use it.

/dts-v1/;
/plugin/;

/ {
model = “Radxa ROCK Pi S”;
compatible = “rockchip,rk3308”;

    fragment@0 {
            target = <&pinctrl>;
            __overlay__ {
                mhs40c {
                    mhs40c_pins: mhs40c_pins {
                            rockchip,pins = <0 15 0 &pcfg_pull_none>,
                                            <2 7 0 &pcfg_pull_none>,
                                            <2 9 0 &pcfg_pull_none>;
                    };
                };
            };
    };

    fragment@1 {
            target = <&spi2>;
            __overlay__ {
                    status = "okay";
                    max-freq = <48000000>;
                    #address-cells = <0x1>;
                    #size-cells = <0x0>;
                    mhs40c@0 {
                            compatible = "ilitek,ili9486";
                            status = "okay";
                            reg = <0>;
                            id = <0>;
                            pinctrl-names = "default";
                            pinctrl-0 = <&mhs40c_pins>;
                            spi-max-frequency = <15000000>;
                            txbuflen = <32768>;
                            rotate = <270>;
                            bgr = <0>;
                            fps = <30>;
                            buswidth = <8>;
                            regwidth = <16>;
                            reset-gpios = <&gpio2 7 0>;
                            dc-gpios = <&gpio2 9 0>;
                            debug = <0>;

                            init = < 0x10000f0 0xc3
                                0x10000f0 0x96
                                0x1000036 0x68
                                0x100003a 0x05
                                0x10000b0 0x80
                                0x10000b6 0x20 0x02
                                0x10000b5 0x02 0x02 0x00 0x04
                                0x10000b1 0x80 0x10
                                0x10000b4 0x00
                                0x10000b7 0xc6
                                0x10000c5 0x5d
                                0x10000e4 0x31
                                0x10000e8 0x40 0x8a 0x00 0x00 0x29 0x19 0xa5 0x33
                                0x10000c2
                                0x10000a7
                                0x10000e0 0xf0 0x09 0x13 0x12 0x12 0x2b 0x3c 0x44 0x4b 0x1b 0x18 0x17 0x1d 0x21
                                0x10000e1 0xf0 0x09 0x13 0x0c 0x0d 0x27 0x3b 0x44 0x4d 0x0b 0x17 0x17 0x1d 0x21
                                0x1000036 0xec
                                0x10000f0 0x3c
                                0x10000f0 0x69
                                0x1000013
                                0x1000011
                                0x1000029>;
                        
                    };
                    mhs40c@1 {
                            compatible = "ti,ads7846";
                            status = "okay";
                            reg = <1>;
                            id = <1>;
                            spi-max-frequency = <2000000>;
                            interrupts = <15 2>;
                            interrupt-parent = <&gpio0>;
                            pendown-gpio = <&gpio0 15 0>;
                            ti,x-plate-ohms = /bits/ 16 <60>;/*[00 3c];*/
                            ti,pressure-max = /bits/ 16 <255>;/*[00 ff];*/
                            ti,swap-xy = <0>;
                    };
            };
    };

};

The display has the disadvantage to block the GPIO header, so creating a wire-set is required. The driver blocks also i2s_8ch pins. To avoid that, the GPIO pins 18,22 may be moved to any other free GPIO pin.

After get it not working with changed GPIO, I have checked the provided rockips-waveshare overlays.
All of this overlays drops an issue in dmesg that the node waveshare_pins is unknown.
Means fragment@0 and fragment@1 are wrong.

After some research I figure out, that these fragments should belong to pinctrl, because they are using pinctrl-API, and not to gpio0/2.

I will update the overlay this evening.

Changing the gpio from 2_7/2_9 to 2_14/2_15 is also not working. Can see in dmesg that this is accepted ( GPIO_78/79) but the display is not working with this settings.
Maybe someone has an idea whats going on.

Edit:
OSI layer 8 issue. Had erroneous switch resset with cmd/data in my wires. Now all went fine.