Well, I can compile and run the zephyr samples (e. g. peripheral_hr and central_hr). They are using longe range. I am now wondering how I can set which phy (S=8 or S=2) should be used (for advertising and connection).
Long range is not supported in advertising (Extended Advertising feature is not supported), hence long range connection too cannot be established. After legacy connection is established Bluetooth Host performs a PHY update procedure to achieve a preferred 2M PHY connection (by default, behaviour if peer supports 2M). This code is internal in hci_core.c, you may change the preferred PHY to S8 or S2 instead for experimentation (only). Feel free to revert back if you face issues.