The opening height can be adjusted if function of the garage; herewith an excerpt of the Users's Manual :
Changing the power liftgate fully open
position
The power liftgate fully-open position can
be changed according to the height of a
garage.
When changing the position
1. Stop the liftgate at the desired position.
2. Press the power liftgate close switch
for about three seconds.
A beep sound is activated two times to
indicate that the position change has
been completed.
NOTE
Set the desired fully-open position of the
liftgate at the position where it is open
more than halfway. The position where it
is less than halfway open cannot be set.
To reset
1. Open the liftgate.
2. Press the power liftgate close switch
for about seven seconds.
A beep sound is activated three times
to indicated that the reset has been
completed.
The full manual can be found here :
https://s3.amazonaws.com/tsd.mazdausa.com/Mazda_Owners_Manuals/2017/2017_CX5_OM.pdf