DTS file GPIO configuration tool for iMX8

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

DTS file GPIO configuration tool for iMX8

8,148 Views
viswa_kondapall
Contributor IV

Hi,

We are new to iMx8dx/qxp processors, We are looking GPIO configuration for DTS file for the different peripherals

Could you please help me any tool or application to configure the GPIO's for iMX8dx and iMX8qxp processors.

Regards,

Viswa

Tags (3)
0 Kudos
5 Replies

6,418 Views
viswa_kondapall
Contributor IV

Hi ,

The moment installed the tool, imx8dx/qxp is not came and not able to import to the new project.

regards,

Viswa

0 Kudos

6,418 Views
viswa_kondapall
Contributor IV

Hi,

1.

We installed PIN tool but IMX8dx/qxp database didn't find.

https://www.nxp.com/pages/pins-tool-for-i.mx-application-processors:PINS-TOOL-IMX

2. fsl-imx8dx.dtsi : has imx8qm only.

gpio1: gpio@5d090000 {
        compatible = "fsl,imx8qm-gpio", "fsl,imx35-gpio";
        reg = <0x0 0x5d090000 0x0 0x10000>;
        interrupts = <GIC_SPI 137 IRQ_TYPE_LEVEL_HIGH>;
        gpio-controller;
        #gpio-cells = <2>;
                power-domains = <&pd_lsio_gpio1>;
        interrupt-controller;
        #interrupt-cells = <2>;
    };

    gpio2: gpio@5d0a0000 {
        compatible = "fsl,imx8qm-gpio", "fsl,imx35-gpio";
        reg = <0x0 0x5d0a0000 0x0 0x10000>;
        interrupts = <GIC_SPI 138 IRQ_TYPE_LEVEL_HIGH>;
        gpio-controller;
        #gpio-cells = <2>;
                power-domains = <&pd_lsio_gpio2>;
        interrupt-controller;
        #interrupt-cells = <2>;
    };

    gpio3: gpio@5d0b0000 {
        compatible = "fsl,imx8qm-gpio", "fsl,imx35-gpio";
        reg = <0x0 0x5d0b0000 0x0 0x10000>;
        interrupts = <GIC_SPI 139 IRQ_TYPE_LEVEL_HIGH>;
        gpio-controller;
        #gpio-cells = <2>;
                power-domains = <&pd_lsio_gpio3>;
        interrupt-controller;
        #interrupt-cells = <2>;
    };

    gpio4: gpio@5d0c0000 {
        compatible = "fsl,imx8qm-gpio", "fsl,imx35-gpio";
        reg = <0x0 0x5d0c0000 0x0 0x10000>;
        interrupts = <GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH>;
        gpio-controller;
        #gpio-cells = <2>;
        power-domains = <&pd_lsio_gpio4>;
        interrupt-controller;
        #interrupt-cells = <2>;
    };

    gpio5: gpio@5d0d0000 {
        compatible = "fsl,imx8qm-gpio", "fsl,imx35-gpio";
        reg = <0x0 0x5d0d0000 0x0 0x10000>;
        interrupts = <GIC_SPI 141 IRQ_TYPE_LEVEL_HIGH>;
        gpio-controller;
        #gpio-cells = <2>;
                power-domains = <&pd_lsio_gpio5>;
        interrupt-controller;
        #interrupt-cells = <2>;
    };

3#: NO  DRIVER FOR GPIOS

didnt find the gpio driver in the kernel in "/drivers/gpio/"

which has got errors:  Not able to export. any GPIO.

[  115.430117] export_store: invalid GPIO 73 
[  184.114083] export_store: invalid GPIO 105 
[  342.974089] export_store: invalid GPIO 73

4#: GPIO DTS file config.

Please correct me if my DTS file config is wrong:

GPIO3_IO13    Output  
GPIO3_IO09    Output
GPIO3_IO10    Output                    
GPIO3_IO11    Input / Open drain    ?
GPIO3_IO12    Input / Open drain    ?
GPIO3_IO18    Output
GPIO1_IO20    Output
GPIO1_IO19    Output
GPIO1.IO13    Input - ADC Input  <--ADC

few GPIOs are  INPUT and few are OUTPUT.

fsl,pins = <        
                SC_P_QSPI0A_DQS_LSIO_GPIO3_IO13            0x20000021  as a Output is thos config value is correct ??
                SC_P_QSPI0A_DATA0_LSIO_GPIO3_IO09         0x20000021               
                SC_P_QSPI0A_DATA2_LSIO_GPIO3_IO11        0x24000021    /* No pullup, OPEN_DRAIN_INPUT, LSIO_GPIO3_IO11*/
                SC_P_QSPI0A_DATA3_LSIO_GPIO3_IO12        0x24000021    /* No pullup, OPEN_DRAIN_INPUT, LSIO_GPIO3_IO11*/
                SC_P_QSPI0B_DATA0_LSIO_GPIO3_IO18        0x20000021
                /*SC_P_FLEXCAN2_TX_LSIO_GPIO1_IO20        0x00000021 */
                SC_P_FLEXCAN2_RX_LSIO_GPIO1_IO19        0x20000021
                SC_P_ADC_IN5_ADMA_ADC_IN5            0x04000006  /*Drive select 12mA, OPEN_DRAIN_INPUT, ADMA_ADC_IN5  */
                        >;

Regards,

Viswa

0 Kudos

3,127 Views
dry
Senior Contributor I

I don't understand these addresses ... Cannot match IMX8 user guide and GPIO blocks addresses to what this Linux DTS has.. 

How does this work .? What is at 5d09000, GPIO1 starts at 0x30200000 etc ..

 

gpio1: gpio@5d090000 {
        compatible = "fsl,imx8qm-gpio", "fsl,imx35-gpio";
        reg = <0x0 0x5d090000 0x0 0x10000>;
        interrupts = <GIC_SPI 137 IRQ_TYPE_LEVEL_HIGH>;
        gpio-controller;
        #gpio-cells = <2>;
                power-domains = <&pd_lsio_gpio1>;
        interrupt-controller;
        #interrupt-cells = <2>;
    };

 

    gpio2: gpio@5d0a0000 {
        compatible = "fsl,imx8qm-gpio", "fsl,imx35-gpio";
        reg = <0x0 0x5d0a0000 0x0 0x10000>;
        interrupts = <GIC_SPI 138 IRQ_TYPE_LEVEL_HIGH>;
        gpio-controller;
        #gpio-cells = <2>;
                power-domains = <&pd_lsio_gpio2>;
        interrupt-controller;
        #interrupt-cells = <2>;
    };

 

    gpio3: gpio@5d0b0000 {
        compatible = "fsl,imx8qm-gpio", "fsl,imx35-gpio";
        reg = <0x0 0x5d0b0000 0x0 0x10000>;
        interrupts = <GIC_SPI 139 IRQ_TYPE_LEVEL_HIGH>;
        gpio-controller;
        #gpio-cells = <2>;
                power-domains = <&pd_lsio_gpio3>;
        interrupt-controller;
        #interrupt-cells = <2>;
    };

 

    gpio4: gpio@5d0c0000 {
        compatible = "fsl,imx8qm-gpio", "fsl,imx35-gpio";
        reg = <0x0 0x5d0c0000 0x0 0x10000>;
        interrupts = <GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH>;
        gpio-controller;
        #gpio-cells = <2>;
        power-domains = <&pd_lsio_gpio4>;
        interrupt-controller;
        #interrupt-cells = <2>;
    };

 

    gpio5: gpio@5d0d0000 {
        compatible = "fsl,imx8qm-gpio", "fsl,imx35-gpio";
        reg = <0x0 0x5d0d0000 0x0 0x10000>;
        interrupts = <GIC_SPI 141 IRQ_TYPE_LEVEL_HIGH>;
        gpio-controller;
        #gpio-cells = <2>;
                power-domains = <&pd_lsio_gpio5>;
        interrupt-controller;
        #interrupt-cells = <2>;
    };

adf

 

0 Kudos

6,418 Views
gusarambula
NXP TechSupport
NXP TechSupport

Hello Viswa,

Are you using the latest version of the Pins Tool? Please also make sure that the tool can connect to the internet. Sometimes you may not see the processor’s information if the tool cannot connect to the repositories to fetch the processor configuration.

I checked, and the configurations are available on the repository with the correct device tree code so you should be able to access it.

Regards,

0 Kudos

6,418 Views
gusarambula
NXP TechSupport
NXP TechSupport

Hello Viswa,

You may use the latest version of the Pins Tool for i.MX. The processor information is fetched by the application so please make sure that the tool has internet access.

https://www.nxp.com/pages/pins-tool-for-i.mx-application-processors:PINS-TOOL-IMX

This tool has a GUI and allows you to configure the muxing options and to generate the Device Tree code for your hardware.

I hope this helps,

Regards,

0 Kudos