This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM335x GPIO muxing in device tree gets reset during kernel load

Other Parts Discussed in Thread: AM3352, TPS65910

Hi

I want to configure set of CPU pins to be used as GPIO inputs or outputs with default values. We are using am3352 CPU and custom board similar to Beaglebone Black.

I checked through debug logs that device tree get parsed correctly.

But when I check after the Kernel loads, All the GPIOs I have pinmuxed are in default state (ie: all are inputs and value is 0)

Directions and default values I set in device tree are not there. (reset?)

Any clue or help is much appreciated.

I decided to do this pinmuxing in device tree and my device tree entries are as follows.

/* In am33xx.dtsi, same file as used in Beaglebone Black */

 gpio0: gpio@44e07000 {

            compatible = "ti,omap4-gpio";

            ti,hwmods = "gpio1";

            gpio-controller;

            #gpio-cells = <2>;

            interrupt-controller;

            #interrupt-cells = <2>;

            reg = <0x44e07000 0x1000>;

            interrupts = <96>;

        };

 

        gpio1: gpio@4804c000 {

            compatible = "ti,omap4-gpio";

            ti,hwmods = "gpio2";

            gpio-controller;

            #gpio-cells = <2>;

            interrupt-controller;

            #interrupt-cells = <2>;

            reg = <0x4804c000 0x1000>;

            interrupts = <98>;

        };

 

        gpio2: gpio@481ac000 {

            compatible = "ti,omap4-gpio";

            ti,hwmods = "gpio3";

            gpio-controller;

            #gpio-cells = <2>;

            interrupt-controller;

            #interrupt-cells = <2>;

            reg = <0x481ac000 0x1000>;

            interrupts = <32>;

        };

 

        gpio3: gpio@481ae000 {

            compatible = "ti,omap4-gpio";

            ti,hwmods = "gpio4";

            gpio-controller;

            #gpio-cells = <2>;

            interrupt-controller;

            #interrupt-cells = <2>;

            reg = <0x481ae000 0x1000>;

            interrupts = <62>;

        };

/* Then in am335x-boneblack.dts file  i have added following*/

&am33xx_pinmux {

gpio0_pins: gpio0_pins {

        pinctrl-single,pins = <                                                       

            0x144 (PIN_OUTPUT_PULLUP | MUX_MODE7)     /* RMII1_REF_CLK as GPIO out */

            0x158 (PIN_OUTPUT_PULLDOWN | MUX_MODE7)   /* pin conf_spi0_d1 as GPIO out */              

            0x15c (PIN_OUTPUT_PULLDOWN | MUX_MODE7)   /* pin conf_spi0_cs0 as GPIO out */              

            /*0x160 (PIN_INPUT | MUX_MODE7)*/             /* pin conf_spi0_cs1 as GPIO input */              

        >;

    };

 

    gpio1_pins: gpio1_pins {

        pinctrl-single,pins = <                                                      

            0x050 (PIN_INPUT | MUX_MODE7)             /* pin conf_gpmc_a4 as GPIO input */              

            0x054 (PIN_OUTPUT_PULLUP | MUX_MODE7)     /* pin conf_gpmc_a5 as GPIO out */              

            0x05c (PIN_INPUT | MUX_MODE7)             /* pin conf_gpmc_a7 as GPIO input */              

            0x058 (PIN_OUTPUT_PULLDOWN | MUX_MODE7)   /* pin conf_gpmc_a6 as GPIO out */              

            0x060 (PIN_INPUT | MUX_MODE7)             /* pin conf_gpmc_a8 as GPIO input */              

            0x064 (PIN_INPUT | MUX_MODE7)             /* pin conf_gpmc_a9 as GPIO input */              

            /*0x068 (PIN_OUTPUT_PULLUP | MUX_MODE7)*/     /* pin conf_gpmc_a10 as GPIO out */              

            0x06c (PIN_INPUT | MUX_MODE7)             /* pin conf_gpmc_a11 as GPIO input */              

            /*0x078 (PIN_OUTPUT_PULLUP | MUX_MODE7)*/     /* pin gpmc_ben1 as GPIO out */              

            0x080 (PIN_INPUT | MUX_MODE7)             /* pin conf_gpmc_csn1 as GPIO input */              

            0x084 (PIN_INPUT | MUX_MODE7)             /* pin conf_gpmc_csn2 as GPIO input */              

        >;

    };

 

    gpio2_pins: gpio2_pins {

       pinctrl-single,pins = <                                                      

            0x088 (PIN_OUTPUT_PULLDOWN | MUX_MODE7)   /* pin conf_gpmc_csn3 as GPIO output */              

            0x08c (PIN_INPUT | MUX_MODE7)             /* pin conf_gpmc_csn3 as GPIO input */              

            0x0a4 (PIN_OUTPUT_PULLUP | MUX_MODE7)     /* pin conf_lcd_data1 as GPIO out */              

            0x0a8 (PIN_OUTPUT_PULLDOWN | MUX_MODE7)   /* pin conf_lcd_data2 as GPIO out */              

            0x0b0 (PIN_INPUT | MUX_MODE7)             /* pin conf_lcd_data4 as GPIO input */              

            0x0b4 (PIN_OUTPUT_PULLDOWN | MUX_MODE7)   /* pin conf_lcd_data5 as GPIO out */              

            0x0b8 (PIN_OUTPUT_PULLDOWN | MUX_MODE7)   /* pin conf_lcd_data6 as GPIO out */              

            0x0bc (PIN_OUTPUT_PULLDOWN | MUX_MODE7)   /* pin conf_lcd_data7 as GPIO out */              

            0x0e8 (PIN_INPUT | MUX_MODE7)             /* pin conf_lcd_pclk as GPIO input */              

            0x0e0 (PIN_INPUT | MUX_MODE7)             /* pin conf_lcd_vsync as GPIO input */              

        >;

    };

 

   gpio3_pins: gpio3_pins {

        pinctrl-single,pins = <                                                      

            /*0x1a0 (PIN_OUTPUT_PULLUP | MUX_MODE7)*/   /* pin conf_mcasp0_aclkr as GPIO out */              

            0x1a4 (PIN_INPUT | MUX_MODE7)   /* pin conf_mcasp0_fsr as GPIO input */              

            0x1a8 (PIN_INPUT | MUX_MODE7)   /* pin conf_mcasp0_axr1 as GPIO input */              

        >;

    };

};

&gpio0{

    ti,gpio-always-on;

    pinctrl-names = "default";

    pinctrl-0 = <&gpio0_pins>;

 

    status = "okay";

};

 

&gpio1{

    ti,gpio-always-on;

    pinctrl-names = "default";

    pinctrl-0 = <&gpio1_pins>;

 

    status = "okay";

};

 

&gpio2{

    ti,gpio-always-on;

    pinctrl-names = "default";

    pinctrl-0 = <&gpio2_pins>;

 

    status = "okay";

};

 

&gpio3{

    ti,gpio-always-on;

    pinctrl-names = "default";

    pinctrl-0 = <&gpio3_pins>;

 

    status = "okay";

};

 

  • I will ask the software team to comment.
  • Hi,

    Have you verified, that those pins are NOT used by another dts node?

    Best Regards,
    Yordan
  • Yes, these pins are not used by eny other DT nodes. These pins are allocated as GPIOs in our design. There will be pin conflicts if same pins are used by other nodes. So no conflicts in my case.

    Is there any difference beween writing

    gpio3_pins: gpio3_pins {.....}

    and

    gpio3_pins: pinmux_gpio3_pins {....}
  • No, this shouldn't be a problem.

    Could you test with only one GPIO, lets say gpio0. Do the following settings:

    gpio0: gpio@44e07000 {

    compatible = "ti,omap4-gpio";

    ti,hwmods = "gpio1";

    gpio-controller;

    #gpio-cells = <2>;

    interrupt-controller;

    #interrupt-cells = <2>;

    reg = <0x44e07000 0x1000>;

    interrupts = <96>;

    };

    gpio0_pins: gpio0_pins {

    pinctrl-single,pins = <

    0x144 (PIN_OUTPUT_PULLUP | MUX_MODE7) /* RMII1_REF_CLK as GPIO out */

    >;
    };

    &gpio0 {

    ti,gpio-always-on;

    pinctrl-names = "default";

    pinctrl-0 = <&gpio0_pins>;

    status = "okay";

    };

    And see if you will get gpio29 on the scope, or if you will be able to work with it from /sys/class/gpio/, as described here: www.kernel.org/.../sysfs.txt

    Best Regards,
    Yordan
  • Also can you share your bootlog?

    Best Regards,
    Yordan
  • Hi Yordan,

    Here is my boot console log. (It has some debug messages i put, so please ignore those messages)
    In the meantime i will test what you have suggested. Thanks.

    Starting kernel ...

    [ 0.000000] Booting Linux on physical CPU 0x0
    [ 0.000000] Initializing cgroup subsys cpuset
    [ 0.000000] Initializing cgroup subsys cpu
    [ 0.000000] Initializing cgroup subsys cpuacct
    [ 0.000000] Linux version 4.1.6-BC-0.1.0 (nilan.chamara@wr-dt042l) (gcc version 5.1.1 20150608 (Linaro GCC 5.1-2015.08) ) #14 SMP Sat Jun 4 18:21:40 AEST 2016
    [ 0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c5387d
    [ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
    [ 0.000000] Machine model: TI AM335x BeagleBone Black
    [ 0.000000] cma: Reserved 16 MiB at 0x9e800000
    [ 0.000000] Memory policy: Data cache writeback
    [ 0.000000] CPU: All CPU(s) started in SVC mode.
    [ 0.000000] AM335X ES2.1 (neon )
    [ 0.000000] ############## am33xx_hwmod_init 1 ##########
    [ 0.000000] ################# omap_hwmod_am33xx_reg ################
    [ 0.000000] ############## am33xx_hwmod_init 2 ##########
    [ 0.000000] ############## am33xx_hwmod_init 3 ##########
    [ 0.000000] PERCPU: Embedded 13 pages/cpu @df929000 s22272 r8192 d22784 u53248
    [ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 129408
    [ 0.000000] Kernel command line: console=ttyO0,115200n8 root=ubi0:rootfs rw ubi.mtd=NAND.rootfs1,2048 rootfstype=ubifs rootwait=1
    [ 0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
    [ 0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
    [ 0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
    [ 0.000000] Memory: 489160K/522240K available (7132K kernel code, 802K rwdata, 2512K rodata, 488K init, 348K bss, 16696K reserved, 16384K cma-reserved, 0K highmem)
    [ 0.000000] Virtual kernel memory layout:
    [ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
    [ 0.000000] fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
    [ 0.000000] vmalloc : 0xe0800000 - 0xff000000 ( 488 MB)
    [ 0.000000] lowmem : 0xc0000000 - 0xe0000000 ( 512 MB)
    [ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
    [ 0.000000] modules : 0xbf000000 - 0xbfe00000 ( 14 MB)
    [ 0.000000] .text : 0xc0008000 - 0xc0973564 (9646 kB)
    [ 0.000000] .init : 0xc0974000 - 0xc09ee000 ( 488 kB)
    [ 0.000000] .data : 0xc09ee000 - 0xc0ab6838 ( 803 kB)
    [ 0.000000] .bss : 0xc0ab9000 - 0xc0b100c0 ( 349 kB)
    [ 0.000000] Hierarchical RCU implementation.
    [ 0.000000] Additional per-CPU info printed with stalls.
    [ 0.000000] RCU restricting CPUs from NR_CPUS=2 to nr_cpu_ids=1.
    [ 0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
    [ 0.000000] NR_IRQS:16 nr_irqs:16 16
    [ 0.000000] IRQ: Found an INTC at 0xfa200000 (revision 5.0) with 128 interrupts
    [ 0.000000] OMAP clockevent source: timer2 at 24000000 Hz
    [ 0.000020] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
    [ 0.000053] clocksource timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
    [ 0.000074] OMAP clocksource: timer1 at 24000000 Hz
    [ 0.000562] Console: colour dummy device 80x30
    [ 0.000606] Calibrating delay loop... 597.60 BogoMIPS (lpj=2988032)
    [ 0.118579] pid_max: default: 32768 minimum: 301
    [ 0.118804] Security Framework initialized
    [ 0.118915] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
    [ 0.118933] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
    [ 0.120192] Initializing cgroup subsys blkio
    [ 0.120235] Initializing cgroup subsys memory
    [ 0.120302] Initializing cgroup subsys devices
    [ 0.120329] Initializing cgroup subsys freezer
    [ 0.120367] Initializing cgroup subsys perf_event
    [ 0.120418] CPU: Testing write buffer coherency: ok
    [ 0.121010] CPU0: thread -1, cpu 0, socket -1, mpidr 0
    [ 0.121161] Setting up static identity map for 0x80008280 - 0x800082f0
    [ 0.123458] Brought up 1 CPUs
    [ 0.123490] SMP: Total of 1 processors activated (597.60 BogoMIPS).
    [ 0.123504] CPU: All CPU(s) started in SVC mode.
    [ 0.124637] devtmpfs: initialized
    [ 0.148385] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
    [ 0.181842] omap_hwmod: tptc0 using broken dt data from edma
    [ 0.182195] omap_hwmod: tptc1 using broken dt data from edma
    [ 0.182526] omap_hwmod: tptc2 using broken dt data from edma
    [ 0.190287] omap_hwmod: debugss: _wait_target_disable failed
    [ 0.246914] clocksource jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
    [ 0.249579] pinctrl core: initialized pinctrl subsystem
    [ 0.251516] NET: Registered protocol family 16
    [ 0.255515] DMA: preallocated 256 KiB pool for atomic coherent allocations
    [ 0.256714] cpuidle: using governor ladder
    [ 0.256748] cpuidle: using governor menu
    [ 0.262889] ################# dt_to_map_one_config /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/gpio0_pins,
    [ 0.262916] ################# next_parent /ocp/l4_wkup@44c00000/scm@210000/pinmux@800,
    [ 0.262933] ################# next_parent /ocp/l4_wkup@44c00000/scm@210000,
    [ 0.262947] ################# next_parent /ocp/l4_wkup@44c00000,
    [ 0.262960] ################# next_parent /ocp,
    [ 0.262972] ################# next_parent /,
    [ 0.262997] omap_gpio 44e07000.gpio: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/gpio0_pins, deferring probe
    [ 0.263549] ################# dt_to_map_one_config /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/gpio1_pins,
    [ 0.263566] ################# next_parent /ocp/l4_wkup@44c00000/scm@210000/pinmux@800,
    [ 0.263582] ################# next_parent /ocp/l4_wkup@44c00000/scm@210000,
    [ 0.263595] ################# next_parent /ocp/l4_wkup@44c00000,
    [ 0.263608] ################# next_parent /ocp,
    [ 0.263620] ################# next_parent /,
    [ 0.263639] omap_gpio 4804c000.gpio: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/gpio1_pins, deferring probe
    [ 0.264142] ################# dt_to_map_one_config /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/gpio2_pins,
    [ 0.264159] ################# next_parent /ocp/l4_wkup@44c00000/scm@210000/pinmux@800,
    [ 0.264173] ################# next_parent /ocp/l4_wkup@44c00000/scm@210000,
    [ 0.264187] ################# next_parent /ocp/l4_wkup@44c00000,
    [ 0.264200] ################# next_parent /ocp,
    [ 0.264212] ################# next_parent /,
    [ 0.264230] omap_gpio 481ac000.gpio: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/gpio2_pins, deferring probe
    [ 0.264728] ################# dt_to_map_one_config /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/gpio3_pins,
    [ 0.264746] ################# next_parent /ocp/l4_wkup@44c00000/scm@210000/pinmux@800,
    [ 0.264760] ################# next_parent /ocp/l4_wkup@44c00000/scm@210000,
    [ 0.264774] ################# next_parent /ocp/l4_wkup@44c00000,
    [ 0.264787] ################# next_parent /ocp,
    [ 0.264799] ################# next_parent /,
    [ 0.264816] omap_gpio 481ae000.gpio: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/gpio3_pins, deferring probe
    [ 0.275407] ################# dt_to_map_one_config /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/nandflash_pins_default,
    [ 0.275436] ################# next_parent /ocp/l4_wkup@44c00000/scm@210000/pinmux@800,
    [ 0.275453] ################# next_parent /ocp/l4_wkup@44c00000/scm@210000,
    [ 0.275468] ################# next_parent /ocp/l4_wkup@44c00000,
    [ 0.275481] ################# next_parent /ocp,
    [ 0.275493] ################# next_parent /,
    [ 0.275514] omap-gpmc 50000000.gpmc: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/nandflash_pins_default, deferring probe
    [ 0.280431] No ATAGs?
    [ 0.280472] hw-breakpoint: debug architecture 0x4 unsupported.
    [ 0.283279] omap4_sram_init:Unable to allocate sram needed to handle errata I688
    [ 0.283306] omap4_sram_init:Unable to get sram pool needed to handle errata I688
    [ 0.312455] edma-dma-engine edma-dma-engine.0: TI EDMA DMA engine driver
    [ 0.316891] SCSI subsystem initialized
    [ 0.317470] usbcore: registered new interface driver usbfs
    [ 0.317597] usbcore: registered new interface driver hub
    [ 0.317759] usbcore: registered new device driver usb
    [ 0.318758] ################# dt_to_map_one_config /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_i2c0_pins,
    [ 0.318780] ################# next_parent /ocp/l4_wkup@44c00000/scm@210000/pinmux@800,
    [ 0.318796] ################# next_parent /ocp/l4_wkup@44c00000/scm@210000,
    [ 0.318810] ################# next_parent /ocp/l4_wkup@44c00000,
    [ 0.318822] ################# next_parent /ocp,
    [ 0.318835] ################# next_parent /,
    [ 0.318858] omap_i2c 44e0b000.i2c: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_i2c0_pins, deferring probe
    [ 0.318936] ################# dt_to_map_one_config /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_i2c2_pins,
    [ 0.318951] ################# next_parent /ocp/l4_wkup@44c00000/scm@210000/pinmux@800,
    [ 0.318964] ################# next_parent /ocp/l4_wkup@44c00000/scm@210000,
    [ 0.318977] ################# next_parent /ocp/l4_wkup@44c00000,
    [ 0.318990] ################# next_parent /ocp,
    [ 0.319002] ################# next_parent /,
    [ 0.319019] omap_i2c 4819c000.i2c: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_i2c2_pins, deferring probe
    [ 0.319328] ############# MMC_INIT 1 ############
    [ 0.319413] ############# MMC_INIT 2 ############
    [ 0.319521] ############# MMC_INIT 3 ############
    [ 0.319562] ############# MMC_INIT 4 ############
    [ 0.319655] ############# MMC_INIT 5 ############
    [ 0.319979] Advanced Linux Sound Architecture Driver Initialized.
    [ 0.321851] cfg80211: Calling CRDA to update world regulatory domain
    [ 0.322651] Switched to clocksource timer1
    [ 0.422784] NET: Registered protocol family 2
    [ 0.424023] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
    [ 0.424134] TCP bind hash table entries: 4096 (order: 4, 81920 bytes)
    [ 0.424298] TCP: Hash tables configured (established 4096 bind 4096)
    [ 0.424424] UDP hash table entries: 256 (order: 1, 12288 bytes)
    [ 0.424469] UDP-Lite hash table entries: 256 (order: 1, 12288 bytes)
    [ 0.424797] NET: Registered protocol family 1
    [ 0.425532] RPC: Registered named UNIX socket transport module.
    [ 0.425554] RPC: Registered udp transport module.
    [ 0.425566] RPC: Registered tcp transport module.
    [ 0.425578] RPC: Registered tcp NFSv4.1 backchannel transport module.
    [ 0.426900] CPU PMU: Failed to parse /pmu/interrupt-affinity[0]
    [ 0.426989] hw perfevents: enabled with armv7_cortex_a8 PMU driver, 5 counters available
    [ 0.430088] futex hash table entries: 256 (order: 2, 16384 bytes)
    [ 0.430275] audit: initializing netlink subsys (disabled)
    [ 0.430383] audit: type=2000 audit(0.420:1): initialized
    [ 0.433383] VFS: Disk quotas dquot_6.6.0
    [ 0.433523] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
    [ 0.434829] NFS: Registering the id_resolver key type
    [ 0.434937] Key type id_resolver registered
    [ 0.434952] Key type id_legacy registered
    [ 0.438917] io scheduler noop registered
    [ 0.438953] io scheduler deadline registered
    [ 0.439055] io scheduler cfq registered (default)
    [ 0.440384] ################# dt_to_map_one_config /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_clkout2_pin,
    [ 0.440408] ################# next_parent /ocp/l4_wkup@44c00000/scm@210000/pinmux@800,
    [ 0.440881] ################# dt_to_map_one_config /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_clkout2_pin,
    [ 0.440900] ################# next_parent /ocp/l4_wkup@44c00000/scm@210000/pinmux@800,
    [ 0.441131] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568
    [ 0.443277] ################# dt_to_map_one_config /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/ecap0_pins_default,
    [ 0.443304] ################# next_parent /ocp/l4_wkup@44c00000/scm@210000/pinmux@800,
    [ 0.446105] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
    [ 0.449509] ################# dt_to_map_one_config /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_uart0_pins,
    [ 0.449534] ################# next_parent /ocp/l4_wkup@44c00000/scm@210000/pinmux@800,
    [ 0.449767] omap_uart 44e09000.serial: no wakeirq for uart0
    [ 0.450055] 44e09000.serial: ttyO0 at MMIO 0x44e09000 (irq = 27, base_baud = 3000000) is a OMAP UART0
    [ 1.633526] console [ttyO0] enabled
    [ 1.638105] ################# dt_to_map_one_config /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/uart1_pins,
    [ 1.648638] ################# next_parent /ocp/l4_wkup@44c00000/scm@210000/pinmux@800,
    [ 1.657472] omap_uart 48022000.serial: no wakeirq for uart1
    [ 1.663689] 48022000.serial: ttyO1 at MMIO 0x48022000 (irq = 28, base_baud = 3000000) is a OMAP UART1
    [ 1.674234] ################# dt_to_map_one_config /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/uart2_pins,
    [ 1.684695] ################# next_parent /ocp/l4_wkup@44c00000/scm@210000/pinmux@800,
    [ 1.693434] omap_uart 48024000.serial: no wakeirq for uart2
    [ 1.699506] 48024000.serial: ttyO2 at MMIO 0x48024000 (irq = 29, base_baud = 3000000) is a OMAP UART2
    [ 1.710037] ################# dt_to_map_one_config /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/uart4_pins,
    [ 1.720505] ################# next_parent /ocp/l4_wkup@44c00000/scm@210000/pinmux@800,
    [ 1.729288] omap_uart 481a8000.serial: no wakeirq for uart4
    [ 1.735419] 481a8000.serial: ttyO4 at MMIO 0x481a8000 (irq = 30, base_baud = 3000000) is a OMAP UART4
    [ 1.747175] omap_rng 48310000.rng: OMAP Random Number Generator ver. 20
    [ 1.774280] brd: module loaded
    [ 1.787419] loop: module loaded
    [ 1.797118] usbcore: registered new interface driver cdc_ether
    [ 1.803526] usbcore: registered new interface driver cdc_eem
    [ 1.809587] usbcore: registered new interface driver rndis_host
    [ 1.815972] usbcore: registered new interface driver cdc_subset
    [ 1.822408] usbcore: registered new interface driver cdc_ncm
    [ 1.828524] usbcore: registered new interface driver cdc_mbim
    [ 1.835753] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
    [ 1.842746] ehci-platform: EHCI generic platform driver
    [ 1.848603] ehci-omap: OMAP-EHCI Host Controller driver
    [ 1.854396] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
    [ 1.860937] ohci-platform: OHCI generic platform driver
    [ 1.866763] ohci-omap3: OHCI OMAP3 driver
    [ 1.871339] usbcore: registered new interface driver cdc_acm
    [ 1.877359] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
    [ 1.885929] usbcore: registered new interface driver cdc_wdm
    [ 1.894452] 47401300.usb-phy supply vcc not found, using dummy regulator
    [ 1.904472] musb-hdrc musb-hdrc.0.auto: Need DT for the DMA engine.
    [ 1.913249] 47401b00.usb-phy supply vcc not found, using dummy regulator
    [ 1.923137] musb-hdrc musb-hdrc.1.auto: Need DT for the DMA engine.
    [ 1.930034] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
    [ 1.936873] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 1
    [ 1.945668] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
    [ 1.952885] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    [ 1.960500] usb usb1: Product: MUSB HDRC host driver
    [ 1.965765] usb usb1: Manufacturer: Linux 4.1.6-BC-0.1.0 musb-hcd
    [ 1.972190] usb usb1: SerialNumber: musb-hdrc.1.auto
    [ 1.978777] hub 1-0:1.0: USB hub found
    [ 1.982932] hub 1-0:1.0: 1 port detected
    [ 2.001184] using random self ethernet address
    [ 2.006014] using random host ethernet address
    [ 2.011871] usb0: HOST MAC aa:d6:3a:dc:55:9b
    [ 2.016543] usb0: MAC b2:30:2a:05:2b:07
    [ 2.020643] using random self ethernet address
    [ 2.025384] using random host ethernet address
    [ 2.030368] g_ether gadget: Ethernet Gadget, version: Memorial Day 2008
    [ 2.037387] g_ether gadget: g_ether ready
    [ 2.043959] omap_rtc 44e3e000.rtc: rtc core: registered 44e3e000.rtc as rtc0
    [ 2.052064] i2c /dev entries driver
    [ 2.058314] omap_wdt: OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec
    [ 2.067341] ################# dt_to_map_one_config /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_mmc1_pins,
    [ 2.078341] ################# next_parent /ocp/l4_wkup@44c00000/scm@210000/pinmux@800,
    [ 2.086971] ################# dt_to_map_one_config /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_mmc1_pins_sleep,
    [ 2.098465] ################# next_parent /ocp/l4_wkup@44c00000/scm@210000/pinmux@800,
    [ 2.107250] $$$$$$$$$$$$ mmc_of_parse 1 $$$$$$$$$$$$$$$
    [ 2.112816] $$$$$$$$$$$$ mmc_of_parse bus width 4 $$$$$$$$$$$$$$$
    [ 2.119227] $$$$$$$$$$$$ mmc_of_parse bus width of_property_read_bool $$$$$$$$$$$$$$$
    [ 2.127489] $$$$$$$$$$$$ mmc_of_parse broken-cd $$$$$$$$$$$$$$$
    [ 2.133862] $$$$$$$$$$$$ mmc_of_parse passed set to plll $$$$$$$$$$$$$$$
    [ 2.141021] $$$$$$$$$$$$ mmc_of_parse passed WP part $$$$$$$$$$$$$$$
    [ 2.147775] $$$$$$$$$$$$ mmc_of_parse end $$$$$$$$$$$$$$$
    [ 2.164646] $$$$$$$$$$$$ mmc_start_host $$$$$$$$$$
    [ 2.202639] $$$$$$$$$$$$ mmc_gpiod_request_cd_irq $$$$$$$$$$
    [ 2.208614] $$$$$$$$$$$$ mmc_gpiod_request_cd_irq host->slot.cd_irq >= 0 || !ctx || !ctx->cd_gpio $$$$$$$$$$
    [ 2.220271] ledtrig-cpu: registered to indicate activity on CPUs
    [ 2.235405] ################# dt_to_map_one_config /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/mcasp0_audio_pins,
    [ 2.246564] ################# next_parent /ocp/l4_wkup@44c00000/scm@210000/pinmux@800,
    [ 2.255171] ################# dt_to_map_one_config /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/mcasp0_pins_sleep,
    [ 2.266198] ################# next_parent /ocp/l4_wkup@44c00000/scm@210000/pinmux@800,
    [ 2.278951] oprofile: using arm/armv7
    [ 2.283143] nf_conntrack version 0.5.0 (7899 buckets, 31596 max)
    [ 2.290430] ip_tables: (C) 2000-2006 Netfilter Core Team
    [ 2.296430] Initializing XFRM netlink socket
    [ 2.301120] NET: Registered protocol family 10
    [ 2.307948] sit: IPv6 over IPv4 tunneling driver
    [ 2.314379] NET: Registered protocol family 17
    [ 2.319125] NET: Registered protocol family 15
    [ 2.324073] Key type dns_resolver registered
    [ 2.328896] omap_voltage_late_init: Voltage driver support not added
    [ 2.335682] sr_dev_init: No voltage domain specified for smartreflex0. Cannot initialize
    [ 2.344225] sr_dev_init: No voltage domain specified for smartreflex1. Cannot initialize
    [ 2.353453] cpu cpu0: of_pm_voltdm_notifier_register: Failed to get cpu0 regulator/voltdm: -517
    [ 2.362699] cpu cpu0: cpu0 clock notifier not ready, retry
    [ 2.368856] ThumbEE CPU extension supported.
    [ 2.373443] Registering SWP/SWPB emulation handler
    [ 2.378507] SmartReflex Class3 initialized
    [ 2.387691] ################# dt_to_map_one_config /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/gpio0_pins,
    [ 2.398181] ################# next_parent /ocp/l4_wkup@44c00000/scm@210000/pinmux@800,
    [ 2.407828] OMAP GPIO hardware version 0.1
    [ 2.412287] ################# dt_to_map_one_config /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/gpio1_pins,
    [ 2.422769] ################# next_parent /ocp/l4_wkup@44c00000/scm@210000/pinmux@800,
    [ 2.432288] ################# dt_to_map_one_config /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/gpio2_pins,
    [ 2.442768] ################# next_parent /ocp/l4_wkup@44c00000/scm@210000/pinmux@800,
    [ 2.452335] g_ether gadget: high-speed config #1: CDC Ethernet (EEM)
    [ 2.459443] ################# dt_to_map_one_config /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/gpio3_pins,
    [ 2.469964] ################# next_parent /ocp/l4_wkup@44c00000/scm@210000/pinmux@800,
    [ 2.479484] ################# dt_to_map_one_config /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/nandflash_pins_default,
    [ 2.490999] ################# next_parent /ocp/l4_wkup@44c00000/scm@210000/pinmux@800,
    [ 2.499585] ################# dt_to_map_one_config /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/nandflash_pins_sleep,
    [ 2.510903] ################# next_parent /ocp/l4_wkup@44c00000/scm@210000/pinmux@800,
    [ 2.519721] omap-gpmc 50000000.gpmc: GPMC revision 6.0
    [ 2.525198] gpmc_mem_init: disabling cs 0 mapped at 0x0-0x1000000
    [ 2.533680] nand: device found, Manufacturer ID: 0x2c, Chip ID: 0xcc
    [ 2.540379] nand: Micron MT29F4G16ABADAWP
    [ 2.544712] nand: 512 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
    [ 2.552785] nand: using OMAP_ECC_BCH8_CODE_HW ECC scheme
    [ 2.558548] 12 ofpart partitions found on MTD device 8000000.nand
    [ 2.564996] Creating 12 MTD partitions on "8000000.nand":
    [ 2.570698] 0x000000000000-0x000000040000 : "NAND.SPL1"
    [ 2.579008] 0x000000040000-0x000000340000 : "NAND.u-boot1"
    [ 2.588057] 0x000000340000-0x000000380000 : "NAND.u-boot-env1"
    [ 2.596269] 0x000000380000-0x000000400000 : "NAND.kernel-dtb1"
    [ 2.604430] 0x000000400000-0x000000c00000 : "NAND.kernel1"
    [ 2.615027] 0x000000c00000-0x000010000000 : "NAND.rootfs1"
    [ 2.713361] 0x000010000000-0x000010040000 : "NAND.SPL2"
    [ 2.720806] 0x000010040000-0x000010340000 : "NAND.u-boot2"
    [ 2.729591] 0x000010340000-0x000010380000 : "NAND.u-boot-env2"
    [ 2.737758] 0x000010380000-0x000010400000 : "NAND.kernel-dtb2"
    [ 2.746019] 0x000010400000-0x000010c00000 : "NAND.kernel2"
    [ 2.756715] 0x000010c00000-0x000020000000 : "NAND.rootfs2"
    [ 2.856188] ################# dt_to_map_one_config /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_i2c0_pins,
    [ 2.867233] ################# next_parent /ocp/l4_wkup@44c00000/scm@210000/pinmux@800,
    [ 2.897314] vrtc: failed to get the current voltage(-22)
    [ 2.903287] tps65910 0-002d: failed to register tps65910-pmic regulator
    [ 2.910295] tps65910-pmic: probe of tps65910-pmic failed with error -22
    [ 2.918066] i2c i2c-0: of_i2c: modalias failure on /ocp/i2c@44e0b000/tpssr@12
    [ 2.926260] sbs-battery 0-0016: sbs_probe: Failed to get device status
    [ 2.933226] sbs-battery: probe of 0-0016 failed with error -121
    [ 2.943977] omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 400 kHz
    [ 2.950170] ################# dt_to_map_one_config /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_i2c2_pins,
    [ 2.961153] ################# next_parent /ocp/l4_wkup@44c00000/scm@210000/pinmux@800,
    [ 2.971606] i2c i2c-2: of_i2c: modalias failure on /ocp/i2c@4819c000/eep@50
    [ 2.979070] i2c i2c-2: of_i2c: modalias failure on /ocp/i2c@4819c000/ts1@48
    [ 2.986432] i2c i2c-2: of_i2c: modalias failure on /ocp/i2c@4819c000/ts2@49
    [ 2.993788] i2c i2c-2: of_i2c: modalias failure on /ocp/i2c@4819c000/adc@36
    [ 3.001138] omap_i2c 4819c000.i2c: bus 2 rev0.11 at 400 kHz
    [ 3.008637] davinci_evm sound: ASoC: DAPM unknown pin MONO_LOUT
    [ 3.015008] davinci_evm sound: ASoC: DAPM unknown pin HPLCOM
    [ 3.020967] davinci_evm sound: ASoC: DAPM unknown pin HPRCOM
    [ 3.028646] davinci_evm sound: null-codec-dai <-> 48038000.mcasp mapping ok
    [ 3.036104] davinci_evm sound: ASoC: no source widget found for TX
    [ 3.042688] davinci_evm sound: ASoC: Failed to add route TX -> direct -> HDMI Out
    [ 3.054346] cpu cpu0: of_pm_voltdm_notifier_register: Failed to get cpu0 regulator/voltdm: -517
    [ 3.063624] cpu cpu0: cpu0 clock notifier not ready, retry
    [ 3.070118] ubi0: attaching mtd5
    [ 3.142845] usb 1-1: new high-speed USB device number 2 using musb-hdrc
    [ 3.308119] usb 1-1: New USB device found, idVendor=1546, idProduct=1140
    [ 3.315249] usb 1-1: New USB device strings: Mfr=3, Product=2, SerialNumber=0
    [ 3.322803] usb 1-1: Product: MODEM-LTE-FLASHER
    [ 3.327582] usb 1-1: Manufacturer: u-blox
    [ 3.365561] cpu cpu0: of_pm_voltdm_notifier_register: Failed to get cpu0 regulator/voltdm: -517
    [ 3.374834] cpu cpu0: cpu0 clock notifier not ready, retry
    [ 3.482831] cfg80211: Calling CRDA to update world regulatory domain
    [ 3.889289] ubi0: scanning is finished
    [ 3.902895] ubi0: attached mtd5 (name "NAND.rootfs1", size 244 MiB)
    [ 3.909529] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
    [ 3.916830] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 512
    [ 3.923920] ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
    [ 3.931257] ubi0: good PEBs: 1952, bad PEBs: 0, corrupted PEBs: 0
    [ 3.937703] ubi0: user volume: 1, internal volumes: 1, max. volumes count: 128
    [ 3.945343] ubi0: max/mean erase counter: 2/0, WL threshold: 4096, image sequence number: 297265648
    [ 3.954904] ubi0: available PEBs: 0, total reserved PEBs: 1952, PEBs reserved for bad PEB handling: 80
    [ 3.965600] ################# dt_to_map_one_config /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/cpsw_default,
    [ 3.976238] ################# next_parent /ocp/l4_wkup@44c00000/scm@210000/pinmux@800,
    [ 3.984876] ################# dt_to_map_one_config /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/cpsw_sleep,
    [ 3.995269] ################# next_parent /ocp/l4_wkup@44c00000/scm@210000/pinmux@800,
    [ 4.004992] ################# dt_to_map_one_config /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/davinci_mdio_default,
    [ 4.016378] ################# next_parent /ocp/l4_wkup@44c00000/scm@210000/pinmux@800,
    [ 4.025001] ################# dt_to_map_one_config /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/davinci_mdio_sleep,
    [ 4.036100] ################# next_parent /ocp/l4_wkup@44c00000/scm@210000/pinmux@800,
    [ 4.059102] ubi0: background thread "ubi_bgt0d" started, PID 49
    [ 4.102721] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6
    [ 4.109154] davinci_mdio 4a101000.mdio: detected phy mask fffffffe
    [ 4.117022] libphy: 4a101000.mdio: probed
    [ 4.121272] davinci_mdio 4a101000.mdio: phy[0]: device 4a101000.mdio:00, driver SMSC LAN8710/LAN8720
    [ 4.132203] cpsw 4a100000.ethernet: Detected MACID = a0:f6:fd:50:0f:05
    [ 4.141424] omap_rtc 44e3e000.rtc: setting system clock to 2000-01-01 00:00:02 UTC (946684802)
    [ 4.150641] sr_init: No PMIC hook to init smartreflex
    [ 4.156325] sr_init: platform driver register failed for SR
    [ 4.171362] vmmcsd_fixed: disabling
    [ 4.175407] ALSA device list:
    [ 4.178544] #0: AM335x McASP0
    [ 4.182841] cpu cpu0: of_pm_voltdm_notifier_register: Failed to get cpu0 regulator/voltdm: -517
    [ 4.192013] cpu cpu0: cpu0 clock notifier not ready, retry
    [ 4.222469] UBIFS (ubi0:0): recovery needed
    [ 4.227448] UBIFS (ubi0:0): background thread "ubifs_bgt0_0" started, PID 52
    [ 4.306302] UBIFS (ubi0:0): recovery completed
    [ 4.311218] UBIFS (ubi0:0): UBIFS: mounted UBI device 0, volume 0, name "rootfs"
    [ 4.319090] UBIFS (ubi0:0): LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
    [ 4.329553] UBIFS (ubi0:0): FS size: 235794432 bytes (224 MiB, 1857 LEBs), journal size 9023488 bytes (8 MiB, 72 LEBs)
    [ 4.340826] UBIFS (ubi0:0): reserved for root: 0 bytes (0 KiB)
    [ 4.346996] UBIFS (ubi0:0): media format: w4/r0 (latest is w4/r0), UUID DF8610CD-9C16-4064-B309-2BF38A270806, small LPT model
    [ 4.359819] VFS: Mounted root (ubifs filesystem) on device 0:16.
    [ 4.366596] devtmpfs: mounted
    [ 4.370789] Freeing unused kernel memory: 488K (c0974000 - c09ee000)
    Starting logging: OK
    Initializing random number generator... [ 4.841184] random: dd urandom read with 9 bits of entropy available
    done.
    Reset Wifi Module again!!Sleeping for 2 seconds!![ 5.548613] mmc0: new high speed SDIO card at address fffd
    [ 6.162773] usb 1-1: USB disconnect, device number 2
    [ 6.642699] cfg80211: Calling CRDA to update world regulatory domain
    Inserting Wifi driver into Kernelcommand failed: No such file or directory (-2)
    [ 7.143594] onebox_wlan_nongpl: module license 'unspecified' taints kernel.
    [ 7.150955] Disabling lock debugging due to kernel taint
    [ 7.325478] cpu cpu0: of_pm_voltdm_notifier_register: Failed to get cpu0 regulator/voltdm: -517
    [ 7.334863] cpu cpu0: cpu0 clock notifier not ready, retry
    Waiting for driver to finish initialization, 1
    Driver initialization is done
    Creating VAP in AP mode
    VAP created Successfully
    OK
    Starting network...
    [ 8.893173] usb 1-1: new high-speed USB device number 3 using musb-hdrc
    [ 9.054388] usb 1-1: New USB device found, idVendor=1546, idProduct=1146
    [ 9.061490] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
    [ 9.069171] usb 1-1: Product: MODEM-LTE
    [ 9.073267] usb 1-1: Manufacturer: u-blox
    [ 9.077496] usb 1-1: SerialNumber: 000000000100
    [ 9.116017] rndis_host 1-1:1.0 usb1: register 'rndis_host' at usb-musb-hdrc.1.auto-1, RNDIS device, 02:06:04:16:00:0b
    [ 9.129404] cpu cpu0: of_pm_voltdm_notifier_register: Failed to get cpu0 regulator/voltdm: -517
    [ 9.138802] cpu cpu0: cpu0 clock notifier not ready, retry
    [ 9.164085] cdc_acm 1-1:1.2: ttyACM0: USB ACM device
    [ 9.169934] cpu cpu0: of_pm_voltdm_notifier_register: Failed to get cpu0 regulator/voltdm: -517
    [ 9.179260] cpu cpu0: cpu0 clock notifier not ready, retry
    [ 9.213872] cpu cpu0: of_pm_voltdm_notifier_register: Failed to get cpu0 regulator/voltdm: -517
    [ 9.223268] cpu cpu0: cpu0 clock notifier not ready, retry
    Enabling IPv4 Forwarding:net.ipv4.ip_forward = 1
    Configuring iptables:OK
    Starting Network Interface Plugging Daemon: eth0[ 9.482111] net eth0: initializing cpsw version 1.12 (0)
    [ 9.490519] net eth0: phy found : id is : 0x7c0f1
    [ 9.495719] libphy: PHY 4a101000.mdio:01 not found
    [ 9.500766] net eth0: phy 4a101000.mdio:01 not found on slave 1
    [ 9.513031] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
    usb1.
    Starting dropbear sshd: OK
    Starting gpsd: OK
  • Hi Yordan,
    I did as you mentioned. (Tested with just one GPIO with DT pinmuxing). But the result is same.

    [root@cioffi gpio]# echo 29 > export
    [root@cioffi gpio]# cat gpio29/direction
    in
    [root@cioffi gpio]# cat gpio29/value
    0
    [root@cioffi gpio]#
  • Nilan,

    Was there ever a resolution to this problem? I am experiencing a similar issue on my board.

    Thanks,
    Dallas
  • Hi Dallas,

    I managed to resolve the problem by modifying the GPIO driver.  I will post the exact change I did, once I get back home today.

  • Hi Dallas,

    Sorry for delay, below is the patch of change i have done.

    1 diff --git a/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c b/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c
      2 index cb6f820..48fe676 100644
      3 --- a/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c
      4 +++ b/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c
      5 @@ -608,7 +608,7 @@ static struct omap_hwmod_class_sysconfig am33xx_gpio_sysc = {
      6     .sysc_offs  = 0x0010,
      7     .syss_offs  = 0x0114,
      8     .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_ENAWAKEUP |
      9 -             SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
     10 +             SYSC_HAS_SIDLEMODE /*|SYSC_HAS_SOFTRESET*/ |
     11               SYSS_HAS_RESET_STATUS),
     12     .idlemodes  = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
     13               SIDLE_SMART_WKUP),