AR300M turn off hardware UART - script help


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

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:



And at the same time using a different address:

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


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

Please help me understand.