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.

Linux/AM3505: Issue with pctldev for omap_hsmmc

Part Number: AM3505
Other Parts Discussed in Thread: AM3517,

Tool/software: Linux

Hello all;

We are porting our build from 2.6.34 to 4.4, which means we are creating a device tree for our board, essentially repeating board bring-up.

The command line sets the root:

console=ttyS2,115200n8 root=/dev/mmcblk1p2 rw rootfstype=ext3 rootwait board_scepter.part_num=400-0103 mem=64M at24.io_limit=1024

but we do not get the RFS:

[    1.559135] Waiting for root device /dev/mmcblk1p2...

Originally we tried for:

CONFIG_MMC_OMAP=y
# CONFIG_MMC_OMAP_HS is not set

With this .config there are no unusual boot messages about deferring probe.  Then we checked the old .config for 2.6.34 and found this:

# CONFIG_MMC_OMAP is not set
CONFIG_MMC_OMAP_HS=y

So we switched the 4.4 build over.  Now we get: 

omap_hsmmc 4809c000.mmc: could not find pctldev for node /ocp/l4@48000000/scm@2000/pinmux@30/pinmux_mmc1_pins, deferring probe

which seems to be progress.  But searching around has led us in two conflicting directions:

  1. It's a hardware bug.
  2. We need to add a gpio that indicates the card is inserted (/dev/mmcblk1p2 is an SD card).

Were we correct to switch over to omap_hsmmc?  What are we missing?

Any inputs you might have would be greatly appreciated.

Boot output and the beginnings of our device tree posted below.

Thanks!

BOOT __________________________________________

U-Boot SPL 2012.04.01sst7 (Mar 15 2013 - 09:31:10)
OMAP SD/MMC: 0
reading u-boot.img
reading u-boot.img


U-Boot 2012.04.01sst7 (Mar 15 2013 - 09:31:25)

AM35XX-GP ES2.0, CPU-OPP2, L3-165MHz, Max CPU Clock 600 Mhz
Scepter Board + LPDDR/NAND
I2C: ready
DRAM: 64 MiB
NAND: 256 MiB
MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
In: serial
Out: serial
Err: serial
Die ID #44340001000000000160ae2c14002016
BRD REV: 1
SYS BOOT: 3
Net: davinci_emac_initialize
DaVinci-EMAC
Hit any key to stop autoboot: 0
mmc1 is current device
reading boot.scr

123 bytes read
Running bootscript from mmc ...
## Executing script at 82000010
reading uImage

2918424 bytes read
Booting from mmc ...
mmc0 is current device
## Booting kernel from Legacy Image at 82000010 ...
Image Name: Linux-4.4.42-yocto-standard-0009
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2918360 Bytes = 2.8 MiB
Load Address: 80008000
Entry Point: 80008000
Verifying Checksum ... OK
Loading Kernel Image ... OK
OK

Starting kernel ...

[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Initializing cgroup subsys cpuacct
[ 0.000000] Linux version 4.4.42-yocto-standard-00095-ge740fe6-dirty (cdunson@toochain) (gcc version 4.9.2 (GCC) ) #88 PREEMPT Mon Mar 27 15:36:39 PDT 2017
[ 0.000000] CPU: ARMv7 Processor [411fc087] revision 7 (ARMv7), cr=10c5387d
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
[ 0.000000] Machine model: SST Scepter
[ 0.000000] Memory policy: Data cache writeback
[ 0.000000] CPU: All CPU(s) started in SVC mode.
[ 0.000000] AM3517 ES1.1 (l2cache sgx neon )
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 16000
[ 0.000000] Kernel command line: console=ttyS2,115200n8 root=/dev/mmcblk1p2 rw rootfstype=ext3 rootwait board_scepter.part_num=400-0103 mem=64M at24.io_limit=1024
[ 0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
[ 0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[ 0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.000000] Memory: 57784K/64512K available (4049K kernel code, 263K rwdata, 1116K rodata, 248K init, 148K bss, 6728K reserved, 0K 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 : 0xc4800000 - 0xff800000 ( 944 MB)
[ 0.000000] lowmem : 0xc0000000 - 0xc4000000 ( 64 MB)
[ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
[ 0.000000] .text : 0xc0008000 - 0xc0513a6c (5167 kB)
[ 0.000000] .init : 0xc0514000 - 0xc0552000 ( 248 kB)
[ 0.000000] .data : 0xc0552000 - 0xc0593d80 ( 264 kB)
[ 0.000000] .bss : 0xc0593d80 - 0xc05b8d80 ( 148 kB)
[ 0.000000] Preemptible hierarchical RCU implementation.
[ 0.000000] Build-time adjustment of leaf fanout to 32.
[ 0.000000] NR_IRQS:16 nr_irqs:16 16
[ 0.000000] IRQ: Found an INTC at 0xfa200000 (revision 4.0) with 96 interrupts
[ 0.000000] Clocking rate (Crystal/Core/MPU): 26.0/332/600 MHz
[ 0.000000] OMAP clockevent source: timer2 at 13000000 Hz
[ 0.000023] sched_clock: 32 bits at 13MHz, resolution 76ns, wraps every 165191050201ns
[ 0.000055] clocksource: timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 147020034397 ns
[ 0.000072] OMAP clocksource: timer1 at 13000000 Hz
[ 0.000411] Console: colour dummy device 80x30
[ 0.000457] Calibrating delay loop... 597.60 BogoMIPS (lpj=2988032)
[ 0.117673] pid_max: default: 32768 minimum: 301
[ 0.117859] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.117880] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.118873] Initializing cgroup subsys devices
[ 0.118910] Initializing cgroup subsys net_cls
[ 0.118951] CPU: Testing write buffer coherency: ok
[ 0.119465] Setting up static identity map for 0x800082c0 - 0x80008318
[ 0.121193] devtmpfs: initialized
[ 0.148938] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 1
[ 0.161652] omap_hwmod: mcbsp2_sidetone using broken dt data from mcbsp
[ 0.162048] omap_hwmod: mcbsp3_sidetone using broken dt data from mcbsp
[ 0.213512] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.213837] pinctrl core: initialized pinctrl subsystem
[ 0.215491] NET: Registered protocol family 16
[ 0.216846] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 0.218298] Reprogramming SDRC clock to 332000000 Hz
[ 0.221687] platform 480c5000.aes: Cannot lookup hwmod 'aes'
[ 0.224908] OMAP GPIO hardware version 2.5
[ 0.236130] platform 480c3000.sham: Cannot lookup hwmod 'sham'
[ 0.236518] platform 480cb000.smartreflex: Cannot lookup hwmod 'smartreflex_core'
[ 0.241866] omap-gpmc 6e000000.gpmc: GPMC revision 5.0
[ 0.241897] gpmc_mem_init: disabling cs 0 mapped at 0x0-0x1000000
[ 0.242391] platform 480ab000.usb_otg_hs: Cannot lookup hwmod 'usb_otg_hs'
[ 0.246353] OMAP DMA hardware revision 4.0
[ 0.279834] usbcore: registered new interface driver usbfs
[ 0.279930] usbcore: registered new interface driver hub
[ 0.280054] usbcore: registered new device driver usb
[ 0.281352] omap_i2c 48070000.i2c: bus 0 rev3.3 at 400 kHz
[ 0.282092] omap_i2c 48072000.i2c: bus 1 rev3.3 at 400 kHz
[ 0.282727] omap_i2c 48060000.i2c: bus 2 rev3.3 at 400 kHz
[ 0.283026] pps_core: LinuxPPS API ver. 1 registered
[ 0.283042] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[ 0.283098] PTP clock support registered
[ 0.283583] Advanced Linux Sound Architecture Driver Initialized.
[ 0.284797] clocksource: Switched to clocksource timer1
[ 0.301983] NET: Registered protocol family 2
[ 0.303026] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.303063] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.303092] TCP: Hash tables configured (established 1024 bind 1024)
[ 0.303225] UDP hash table entries: 256 (order: 0, 4096 bytes)
[ 0.303254] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[ 0.303477] NET: Registered protocol family 1
[ 0.311610] futex hash table entries: 256 (order: -1, 3072 bytes)
[ 0.312897] jffs2: version 2.2. (NAND) (SUMMARY) �© 2001-2006 Red Hat, Inc.
[ 0.320196] io scheduler noop registered
[ 0.320232] io scheduler deadline registered (default)
[ 0.422601] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[ 0.425546] 4806a000.serial: ttyS0 at MMIO 0x4806a000 (irq = 88, base_baud = 3000000) is a 8250
[ 0.426605] 4806c000.serial: ttyS1 at MMIO 0x4806c000 (irq = 89, base_baud = 3000000) is a 8250
[ 0.427519] console [ttyS2] disabled
[ 0.427615] 49020000.serial: ttyS2 at MMIO 0x49020000 (irq = 90, base_baud = 3000000) is a 8250
[ 0.966395] console [ttyS2] enabled
[ 0.971141] 4809e000.serial: ttyS3 at MMIO 0x4809e000 (irq = 100, base_baud = 3000000) is a 8250
[ 0.999413] brd: module loaded
[ 1.012272] loop: module loaded
[ 1.017224] tun: Universal TUN/TAP device driver, 1.6
[ 1.022309] tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
[ 1.074846] davinci_mdio davinci_mdio.0: davinci mdio revision 1.5
[ 1.081072] davinci_mdio davinci_mdio.0: detected phy mask fffffffe
[ 1.087728] libphy: davinci_mdio.0: probed
[ 1.091860] davinci_mdio davinci_mdio.0: phy[0]: device davinci_mdio.0:00, driver SMSC LAN8710/LAN8720
[ 1.101891] PPP generic driver version 2.4.2
[ 1.106610] PPP BSD Compression module registered
[ 1.111353] PPP Deflate Compression module registered
[ 1.116495] PPP MPPE Compression module registered
[ 1.121323] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 1.127922] ehci-omap: OMAP-EHCI Host Controller driver
[ 1.133701] ehci-omap 48064800.ehci: EHCI Host Controller
[ 1.139240] ehci-omap 48064800.ehci: new USB bus registered, assigned bus number 1
[ 1.147092] ehci-omap 48064800.ehci: irq 93, io mem 0x48064800
[ 1.164856] ehci-omap 48064800.ehci: USB 2.0 started, EHCI 1.00
[ 1.172140] hub 1-0:1.0: USB hub found
[ 1.176056] hub 1-0:1.0: 3 ports detected
[ 1.181203] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 1.187543] ohci-omap3: OHCI OMAP3 driver
[ 1.191983] ohci-omap3 48064400.ohci: OHCI Host Controller
[ 1.197635] ohci-omap3 48064400.ohci: new USB bus registered, assigned bus number 2
[ 1.205521] ohci-omap3 48064400.ohci: irq 92, io mem 0x48064400
[ 1.289282] hub 2-0:1.0: USB hub found
[ 1.293112] hub 2-0:1.0: 3 ports detected
[ 1.298322] usbcore: registered new interface driver cdc_acm
[ 1.304013] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
[ 1.312727] omap_hsmmc 4809c000.mmc: could not find pctldev for node /ocp/l4@48000000/scm@2000/pinmux@30/pinmux_mmc1_pins, deferring probe
[ 1.327247] Netfilter messages via NETLINK v0.30.
[ 1.332020] nf_conntrack version 0.5.0 (902 buckets, 3608 max)
[ 1.338314] ctnetlink v0.93: registering with nfnetlink.
[ 1.344297] ip_tables: (C) 2000-2006 Netfilter Core Team
[ 1.349956] arp_tables: (C) 2002 David S. Miller
[ 1.354701] NET: Registered protocol family 17
[ 1.359292] NET: Registered protocol family 15
[ 1.364014] omap2_set_init_voltage: unable to find boot up OPP for vdd_mpu_iva
[ 1.371315] omap2_set_init_voltage: unable to set vdd_mpu_iva
[ 1.377135] omap2_set_init_voltage: unable to find boot up OPP for vdd_core
[ 1.384131] omap2_set_init_voltage: unable to set vdd_core
[ 1.390111] PM: no software I/O chain control; some wakeups may be lost
[ 1.397119] pm: Failed to request pm_wkup irq
[ 1.401573] ThumbEE CPU extension supported.
[ 1.408393] omap_hsmmc 4809c000.mmc: could not find pctldev for node /ocp/l4@48000000/scm@2000/pinmux@30/pinmux_mmc1_pins, deferring probe
[ 1.422027] davinci_emac davinci_emac.0: using random MAC addr: 0e:3e:64:50:e1:b2
[ 1.430851] omap_hsmmc 4809c000.mmc: could not find pctldev for node /ocp/l4@48000000/scm@2000/pinmux@30/pinmux_mmc1_pins, deferring probe
[ 1.447032] device-tree: Duplicate name in testcase-data, renamed to "duplicate-name#1"
[ 1.460638] ### dt-test ### start of unittest - you will see error messages
[ 1.468779] /testcase-data/phandle-tests/consumer-a: could not get #phandle-cells-missing for /testcase-data/phandle-tests/provider1
[ 1.480829] /testcase-data/phandle-tests/consumer-a: could not get #phandle-cells-missing for /testcase-data/phandle-tests/provider1
[ 1.492883] /testcase-data/phandle-tests/consumer-a: could not find phandle
[ 1.499954] /testcase-data/phandle-tests/consumer-a: could not find phandle
[ 1.507001] /testcase-data/phandle-tests/consumer-a: arguments longer than property
[ 1.514714] /testcase-data/phandle-tests/consumer-a: arguments longer than property
[ 1.523709] irq: no irq domain found for /testcase-data/interrupts/intc0 !
[ 1.533198] ### dt-test ### end of unittest - 110 passed, 0 failed
[ 1.551550] ALSA device list:
[ 1.554568] No soundcards found.
[ 1.559135] Waiting for root device /dev/mmcblk1p2...

DTS ___________________________________________________________________

/dts-v1/;

#include "am3517.dtsi"

/ {
model = "SST Scepter";
compatible = "scepter", "ti,am3517-evm", "ti,am3517", "ti,omap3";

memory {
device_type = "memory";
reg = <0x80000000 0x20000000>; /* 512 MB */
};

vmmc_fixed: vmmc {
compatible = "regulator-always-on";
/* compatible = "regulator-fixed"; */
regulator-name = "vmmc_fixed";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
};
};

&am35x_otg_hs {
status = "okay";
};


&davinci_emac {
status = "okay";
};

&davinci_mdio {
status = "okay";
};

&i2c1 {
clock-frequency = <400000>;
};

&i2c2 {
clock-frequency = <400000>;
};

&i2c3 {
clock-frequency = <400000>;
};

&mmc1 {
status = "okay";
vmmc-supply = <&vmmc_fixed>;
pinctrl-names = "default", "sleep";
pinctrl-0 = <&mmc1_pins_default>;
pinctrl-1 = <&mmc1_pins_sleep>;
bus-width = <0x4>;
ti,non-removable;
disable-wp;
/* cd-gpios = <&gpio1 6 GPIO_ACTIVE_HIGH>;
cd-inverted;*/
};

&mmc2 {
status = "disabled";
};

&mmc3 {
status = "disabled";
};


&uart1 {
status = "okay";
};

&uart2 {
status = "okay";
};

/*&uart3 {
status = "okay";
};*/

&uart4 {
status = "okay";
};

&omap3_pmx_core {
pinctrl-names = "default";

mmc1_pins_default: pinmux_mmc1_pins {
pinctrl-single,pins = <
0x144 ( PIN_INPUT_PULLUP | MUX_MODE0 ) /* mmc1_clk, CPU_MMC1_CLK*/
0x146 ( INPUT_EN | PULL_UP | MUX_MODE0 ) /* mmc1_cmd, CPU_MMC1_CMD*/
0x148 ( INPUT_EN | PULL_UP | MUX_MODE0 ) /* mmc1_dat0, CPU_MMC1_DAT0*/
0x14A ( INPUT_EN | PULL_UP | MUX_MODE0 ) /* mmc1_dat1, CPU_MMC1_DAT1*/
0x14C ( INPUT_EN | PULL_UP | MUX_MODE0 ) /* mmc1_dat2, CPU_MMC1_DAT2*/
0x14E ( INPUT_EN | PULL_UP | MUX_MODE0 ) /* mmc1_dat3, CPU_MMC1_DAT3*/
> ;
} ;

/* mmc1_pins: pinmux_mmc1_pins {
pinctrl-single,pins = <
OMAP3_CORE1_IOPAD(0x2144, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc1_clk.sdmmc1_clk */
/* OMAP3_CORE1_IOPAD(0x2146, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc1_cmd.sdmmc1_cmd */
/* OMAP3_CORE1_IOPAD(0x2148, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc1_dat0.sdmmc1_dat0 */
/* OMAP3_CORE1_IOPAD(0x214a, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc1_dat1.sdmmc1_dat1 */
/* OMAP3_CORE1_IOPAD(0x214c, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc1_dat2.sdmmc1_dat2 */
/* OMAP3_CORE1_IOPAD(0x214e, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc1_dat3.sdmmc1_dat3 */
/* >;
/* };
*/
mmc1_pins_sleep: pinmux_mmc1_pins_sleep {
pinctrl-single,pins = <
0x144 ( PIN_INPUT_PULLUP | MUX_MODE0 ) /* mmc1_clk, CPU_MMC1_CLK*/
0x146 ( INPUT_EN | PULL_UP | MUX_MODE0 ) /* mmc1_cmd, CPU_MMC1_CMD*/
0x148 ( INPUT_EN | PULL_UP | MUX_MODE0 ) /* mmc1_dat0, CPU_MMC1_DAT0*/
0x14A ( INPUT_EN | PULL_UP | MUX_MODE0 ) /* mmc1_dat1, CPU_MMC1_DAT1*/
0x14C ( INPUT_EN | PULL_UP | MUX_MODE0 ) /* mmc1_dat2, CPU_MMC1_DAT2*/
0x14E ( INPUT_EN | PULL_UP | MUX_MODE0 ) /* mmc1_dat3, CPU_MMC1_DAT3*/
> ;
} ;

mmc2_pins_default: pinmux_mmc2_pins_default {
pinctrl-single,pins = <
0x158 ( PIN_INPUT_PULLUP | MUX_MODE0 ) /* mmc2_clk, CPU_MMC2_CLK*/
0x15A ( PIN_INPUT_PULLUP | MUX_MODE0 ) /* mmc2_cmd, CPU_MMC2_CMD*/
0x15C ( PIN_INPUT_PULLUP | MUX_MODE0 ) /* mmc2_dat0, CPU_MMC2_DAT0*/
0x15E ( PIN_INPUT_PULLUP | MUX_MODE0 ) /* mmc2_dat1, CPU_MMC2_DAT1*/
0x160 ( PIN_INPUT_PULLUP | MUX_MODE0 ) /* mmc2_dat2, CPU_MMC2_DAT2*/
0x162 ( PIN_INPUT_PULLUP | MUX_MODE0 ) /* mmc2_dat3, CPU_MMC2_DAT3*/
0x164 ( PIN_INPUT_PULLDOWN | MUX_MODE1 ) /* HY-DBG: MMC2_DIR_DAT0 gpio_136, BD_REV2*/
0x166 ( PIN_INPUT_PULLDOWN | MUX_MODE1 ) /* HY-DBG: MMC2_DIR_DAT1 gpio_137, BD_REV3*/
> ;
} ;

mmc2_pins_sleep: pinmux_mmc2_pins_sleep {
pinctrl-single,pins = <
0x158 ( PIN_INPUT_PULLUP | MUX_MODE0 ) /* mmc2_clk, CPU_MMC2_CLK*/
0x15A ( PIN_INPUT_PULLUP | MUX_MODE0 ) /* mmc2_cmd, CPU_MMC2_CMD*/
0x15C ( PIN_INPUT_PULLUP | MUX_MODE0 ) /* mmc2_dat0, CPU_MMC2_DAT0*/
0x15E ( PIN_INPUT_PULLUP | MUX_MODE0 ) /* mmc2_dat1, CPU_MMC2_DAT1*/
0x160 ( PIN_INPUT_PULLUP | MUX_MODE0 ) /* mmc2_dat2, CPU_MMC2_DAT2*/
0x162 ( PIN_INPUT_PULLUP | MUX_MODE0 ) /* mmc2_dat3, CPU_MMC2_DAT3*/
0x164 ( PIN_INPUT_PULLDOWN | MUX_MODE1 ) /* HY-DBG: MMC2_DIR_DAT0 gpio_136, BD_REV2*/
0x166 ( PIN_INPUT_PULLDOWN | MUX_MODE1 ) /* HY-DBG: MMC2_DIR_DAT1 gpio_137, BD_REV3*/
> ;
} ;
} ;

  • The software team have been notified. They will respond here.
  • Clark,

    Unfortunately, we can't help with this kind of port, but here are some pointers from what I can see:

    Clark Dunson said:
    Were we correct to switch over to omap_hsmmc?  What are we missing?

    Yes

    Clark Dunson said:
    omap_hsmmc 4809c000.mmc: could not find pctldev for node /ocp/l4@48000000/scm@2000/pinmux@30/pinmux_mmc1_pins, deferring probe

    Parsing the DT can't find this node. From a quick glance, I think it needs to be in a different spot in the tree.

    Clark Dunson said:
    #include "am3517.dtsi"

    This is probably not the best place to start for an AM3505 based project.

    Have a look at the omap3-beagleboard.dts file which should be closer to what you are doing.

    Happy porting!