Need description of SG2002 register 0x0502707C

Hi,

I am using Duo 256M board and I found below lines of code in duo-init.sh file.

# Set Pin-29(GP22) to GPIO
devmem 0x0502707c 32 0x111
devmem 0x03001068 32 0x3

In SG2002 technical reference manual I found that, Duo256’s GP22 is pin 41 of MCU which is PWR_SEQ2 and it has registers 0x03001088 to set pin functionality and 0x0502700C to setup IO control like pull-up/down.

But in shell script the used address 0x0502707C is not found in SG2002 technical reference manual and address 0x03001068 is to setup pin 27 which is JTAG_CPU_TCK_TCK.

Is anybody know about this address 0x0502707C?

I found in uboot code that the pin GP22 is already configured as GPIO properly.

PINMUX_CONFIG(PWR_SEQ2, PWR_GPIO_4); // GP22

I tried to make it as output and writing zero by using /sys/class/gpio/gpio356/direction and …/value. But, I am always getting value as 1 always even though writing 0. Can anybody suggest me how to configure it properly.

The SG2002 technical reference manuals available in English and Chinese languages.

Thank you.

2 Likes

GP22 is pin 29 on the Duo256 schematic, not the MCU package. I do not have a searchable TRM for this MCU to investigate your other queries.

2 Likes

Hi @ewp

Thanks for your reply. Sorry, I forgot to mention pin 41 of SG2002 MCU. I updated my post with links to TRM, please check now.

2 Likes

from
Documentation/devicetree/bindings/pinctrl/sophgo,cv1800-pinctrl.yaml
in upstream

examples:

  • |
    #include <dt-bindings/pinctrl/pinctrl-cv1800b.h>
pinctrl@3001000 {
    compatible = "sophgo,cv1800b-pinctrl";
    reg = <0x03001000 0x1000>,
          <0x05027000 0x1000>;
    reg-names = "sys", "rtc";

    uart0_cfg: uart0-cfg {
        uart0-pins {
            pinmux = <PINMUX(PIN_UART0_TX, 0)>,
                     <PINMUX(PIN_UART0_RX, 0)>;
            bias-pull-up;
            drive-strength-microamp = <10800>;
            input-schmitt-microvolt = <0>;
            power-source = <3300>;
            slew-rate = <0>;
        };
    };
};

…

1 Like

Thanks, my TRM was an early alpha version. 0x05027… is RTCSYS_IO but not documented further. Perhaps it is documented in an earlier cv180x TRM, but I cannot find one. Perhaps I’m missing something.

1 Like