Hello, friend!
I understand that you want to add Q-in-Q VLAN 4000 to the downstream VLAN 1-4094 of the switch through the OLT, and then send the downstream VLAN to the ONT.
You can refer to the following configuration:
Set report mapping to ONT ETH port, ETH port transparent all the VLANs, in the service port using other-all to identity all the VLANs and using default tag transform add the outer VLAN tag.
HUAWEI(config)#vlan 100
HUAWEI(config)#port vlan 100 0/3 0
HUAWEI(config)#vlan attrib 100 q-in-q
HUAWEI(config)#ont-lineprofile gpon profile-id 10 profile-name QinQ100
HUAWEI(config-gpon-lineprofile-10)#tcont 1 dba-profile-id 10
HUAWEI(config-gpon-lineprofile-10)#mapping-mode port
HUAWEI(config-gpon-lineprofile-10)#gem add 0 eth tcont 1
HUAWEI(config-gpon-lineprofile-10)#gem mapping 0 0 eth 1
HUAWEI(config-gpon-lineprofile-10)#commit
HUAWEI(config-gpon-lineprofile-10)#quit
HUAWEI(config)#ont-srvprofile gpon profile-id 10 profile-name QinQ100
HUAWEI(config-gpon-srvprofile-10)#ont-port eth 4 pots 2 catv 1
HUAWEI(config-gpon-srvprofile-10)#port vlan eth 1 transparent
HUAWEI(config-gpon-srvprofile-10)#commit
HUAWEI(config-gpon-srvprofile-10)#quit
HUAWEI(config)#interface gpon 0/1
HUAWEI(config-if-gpon-0/1)#ont add 2 3 sn-auth 48575XXXXXXXXXXX omci ont-lineprofile-id 10 ont-srvprofile-id 10 desc QinQ100
HUAWEI(config-if-gpon-0/1)#quit
HUAWEI(config)#service-port vlan 100 gpon 0/1/2 ont 3 gemport 0 multi-service user-vlan other-all tag-transform default
Thanks!