How to find gpio to rtl8366s switch?

hello i try to porting new Archer C5v4 and now I'm confronted with the fact that the switch is not detected. help find the required configuration

ethernet@10100000 {
	status = "okay";
	mtd-mac-address = <&rom 0xf100>;

	port@5 {
		status = "okay";
		mediatek,fixed-link = <1000 1 1 1>;
		phy-mode = "rgmii";
	};

};
rtl8366s {
	compatible = "realtek,rtl8366s";
	gpio-sda = <&gpio0 5 0>;
	gpio-sck = <&gpio0 7 0>;
};

Well it would be easiest to get it from GPL sources.

Why do you think there is rtl8366s there?
Wikidevi has rtl8367s.

Hello, I'm absolutely not sure about this configuration, please tell me how to properly configure it, in the bootlog there is a message about Rtl8367c

I have no idea how well is rtl8367s supported now and even if it is possible to configure it in DTS.
I just answered why rtl8366s was not detected. It wasn't because the device hasn't that chip.

https://pastebin.com/76eWvrYw

original bootlog
https://pastebin.com/76eWvrYw

openwrt bootlog
https://pastebin.com/VJpLYgCK

[ 0.877078] Realtek RTL8366S ethernet switch driver version 0.2.2
[ 0.883424] rtl8366s rtl8366s: using GPIO pins 1 (SDA) and 2 (SCK)
[ 0.889861] rtl8366s rtl8366s: unknown chip id (0303)
[ 0.895028] rtl8366s rtl8366s: chip detection failed, err=-19
[ 0.904276] gsw: setting port4 to ephy mode

You can try compatible = "realtek,rtl8367", but I don't think it is managed by gpio.

like this ?

ethernet@10100000 {
	status = "okay";
	mtd-mac-address = <&rom 0xf100>;

	port@5 {
		status = "okay";
		mediatek,fixed-link = <1000 1 1 1>;
		phy-mode = "rgmii";
	};
};

rtl8367b {
	compatible = "rtl8367b";
	realtek,extif1 = <1 0 1 1 1 1 1 1 2>;
	realtek,cpu-port = <6>;
};

But that driver supports only R and M revisions of the chip. It is unlikely this one will be detected either.

Most likely rtl8367s is not supported now.

я так понимаю мы с вами можем и на русском общаться , насколько я понимаю этот чип не имеет поддержки опенврт вообще (

It's not a good idea to write in Russian at an English forum. There are Russian forums where this can be discussed.
It is correct. There is no support for this device.

But if it is a fixed link, you don't have to declare a switch in DTS. It will work without that, but the switch will be unmanaged.
The problem is if the other gmac is using the switch too.

Banana Pi BPI R64 https://patchwork.ozlabs.org/patch/755337/ has this switch. and have dts for openwrt

Only need help configuring for this router

Wrong. That device has mt7530 switch.