AR300M turn off hardware UART - script help

Hello.

Can some body help me with this like script - but for QCA9531 SoC?

https://wiki.openwrt.org/doc/recipes/turnoff.uart.to.gpio

Datasheet for atheros/QCA9531_nowatermark.pdf at master · Deoptim/atheros · GitHub

On page 111 we can see:

7.4.14 GPIO Function 2 (GPIO_OUT_FUNCTION2)

23:16 | ENABLE_GPIO_10 | (UART0_SOUT)

15:8 | ENABLE_GPIO_9 | (UART0_SIN)

Also on page 113 we can see:

7.4.17 GPIO In Signals 0 (GPIO_IN_ENABLE0)

15:8 | UART0_SIN | (GPIO9)

When we use (example script) bit1 or bit8 - there is only one bit changes.

And when we need to change 15:8 or 23:16 on QCA9531 what we need to do? Fully fill ones /or/ zeros - range between 8-15bit /or/ 16-23bit?

for example like in script:

bit15_8="11111111<<8"

bit23_16=“11111111<<16”


And at the same time using a different address:

func_addres="0x18040034" #if we need only GPIO OUT function

or

func_addres=“0x18040044” #if we need only GPIO IN function (but only for GPIO9=UART0_SIN)


Please help me understand.