nixy82
Posts: 42
Joined: Sat Sep 12, 2015 9:19 am

CM3 ACT LED no longer blinking with mmc activity?

Thu Jan 19, 2017 11:19 am

Hi

Is it just my setup or does the ACT led on the CM3 (hanging off GPIO47 via a FET as per CMIO schematics) no longer flash indicating MMC activity as the CM1 did?

What I observe on power up :

LED on for an instant, then off, then back on solid for remaining duration of boot and operation

On shutdown, at very end of sequence, it flashes for around 3 seconds then turns off


So far I've tried removing my custom dt-blob.bin from /boot but the result is the same, any pointers as to what I'm doing wrong here?

Here's some details in case that helps :

# uname -a
Linux raspberrypi 4.4.43-v7+ #948 SMP Sun Jan 15 22:20:07 GMT 2017 armv7l GNU/Linux

# vcdbg log msg
001913.273: HDMI:EDID version 1.3, 0 extensions, screen size 38x30 cm
001913.339: HDMI:EDID features - videodef 0x80 !standby !suspend active off; colour encoding:RGB444|YCbCr444|YCbCr422; sRGB is default colourspace; preferred format is native; does not support GTF
001913.424: HDMI:EDID found preferred DMT detail timing format: 1280x1024p @ 60 Hz (35)
001913.466: HDMI:EDID found DMT format: code 4, 640x480p @ 60 Hz in established timing I/II
001913.502: HDMI:EDID found DMT format: code 6, 640x480p @ 75 Hz in established timing I/II
001913.541: HDMI:EDID found DMT format: code 9, 800x600p @ 60 Hz in established timing I/II
001913.578: HDMI:EDID found DMT format: code 11, 800x600p @ 75 Hz in established timing I/II
001913.618: HDMI:EDID found DMT format: code 16, 1024x768p @ 60 Hz in established timing I/II
001913.658: HDMI:EDID found DMT format: code 18, 1024x768p @ 75 Hz in established timing I/II
001913.698: HDMI:EDID found DMT format: code 36, 1280x1024p @ 75 Hz in established timing I/II
001913.787: HDMI:EDID standard timings block x 8: 0x714F 8180 0101 0101 0101 0101 0101 0101
001913.838: HDMI:EDID found DMT format: code 21, 1152x864p @ 75 Hz (4:3) in standard timing 0
001913.889: HDMI:EDID found DMT format: code 35, 1280x1024p @ 60 Hz (5:4) in standard timing 1
001913.925: HDMI:EDID filtering formats with pixel clock > 162 MHz or h. blanking > 1023
001914.033: HDMI:EDID preferred mode remained as DMT (35) 1280x1024p @ 60 Hz with pixel clock 108 MHz
001926.223: HDMI:Setting property pixel encoding to Default
001926.244: HDMI:Setting property pixel clock type to PAL
001926.263: HDMI:Setting property content type flag to No data
001926.283: HDMI:Setting property fuzzy format match to enabled
001926.363: gpioman: gpioman_get_pin_num: pin DISPLAY_SDA not defined
001927.625: gpioman: gpioman_get_pin_num: pin BT_ON not defined
001927.647: gpioman: gpioman_get_pin_num: pin WL_ON not defined
001957.537: hdmi: HDMI:>>>>>>>>>>>>>Rx sensed, reading EDID<<<<<<<<<<<<<
001969.609: hdmi: HDMI:EDID version 1.3, 0 extensions, screen size 38x30 cm
001969.680: hdmi: HDMI:EDID features - videodef 0x80 !standby !suspend active off; colour encoding:RGB444|YCbCr444|YCbCr422; sRGB is default colourspace; preferred format is native; does not support GTF
001969.765: hdmi: HDMI:EDID found preferred DMT detail timing format: 1280x1024p @ 60 Hz (35)
001969.810: hdmi: HDMI:EDID found DMT format: code 4, 640x480p @ 60 Hz in established timing I/II
001969.852: hdmi: HDMI:EDID found DMT format: code 6, 640x480p @ 75 Hz in established timing I/II
001969.892: hdmi: HDMI:EDID found DMT format: code 9, 800x600p @ 60 Hz in established timing I/II
001969.935: hdmi: HDMI:EDID found DMT format: code 11, 800x600p @ 75 Hz in established timing I/II
001969.977: hdmi: HDMI:EDID found DMT format: code 16, 1024x768p @ 60 Hz in established timing I/II
001970.018: hdmi: HDMI:EDID found DMT format: code 18, 1024x768p @ 75 Hz in established timing I/II
001970.063: hdmi: HDMI:EDID found DMT format: code 36, 1280x1024p @ 75 Hz in established timing I/II
001970.154: hdmi: HDMI:EDID standard timings block x 8: 0x714F 8180 0101 0101 0101 0101 0101 0101
001970.207: hdmi: HDMI:EDID found DMT format: code 21, 1152x864p @ 75 Hz (4:3) in standard timing 0
001970.258: hdmi: HDMI:EDID found DMT format: code 35, 1280x1024p @ 60 Hz (5:4) in standard timing 1
001970.299: hdmi: HDMI:EDID filtering formats with pixel clock > 162 MHz or h. blanking > 1023
001970.412: hdmi: HDMI:EDID preferred mode remained as DMT (35) 1280x1024p @ 60 Hz with pixel clock 108 MHz
001970.432: hdmi: HDMI: hotplug attached with DVI support
001970.467: hdmi: HDMI:hdmi_get_state is deprecated, use hdmi_get_display_state instead
001970.678: hdmi: Setting pixel clock to 25200000 Hz
001971.864: hdmi: requested pixel clock @ 25200000 Hz, measured as 25200000 Hz
001971.905: hdmi: HDMI: power_on to DMT mode [email protected]
001972.958: hdmi: Setting pixel clock to 108000000 Hz
001974.043: hdmi: requested pixel clock @ 108000000 Hz, measured as 108000000 Hz
001974.106: hdmi: HDMI: Action callback added to queue to happen at frame 0
001991.000: *** Restart logging
001992.407: Read command line from file 'cmdline.txt'
dwc_otg.lpm_enable=0 console=serial1,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait maxcpus=4
002350.381: Loading 'kernel7.img' to 0x8000 size 0x409440
002350.431: No kernel trailer (run mkknlimg to fix) - assuming DT-capable
002353.469: Loading 'bcm2710-rpi-cm3.dtb' to 0x411440 size 0x3bf6
002460.837: Loaded overlay 'mmc'
002501.235: Loaded overlay 'uart0'
002501.251: dtparam: txd0_pin=32
002501.706: dtparam: rxd0_pin=33
002538.519: Loaded overlay 'uart1'
002538.535: dtparam: txd1_pin=14
002539.009: dtparam: rxd1_pin=15
002539.603: dtparam: i2c1=on
002587.856: Loaded overlay 'i2c-rtc'
002587.871: dtparam: ds1307=true
003699.797: Device tree loaded to 0x2effb900 (size 0x469e)
003701.688: gpioman: gpioman_get_pin_num: pin SDCARD_CONTROL_POWER not defined
005726.255: vchiq_core: vchiq_init_state: slot_zero = 0xfac80000, is_master = 1
005730.629: hdmi: HDMI:hdmi_get_state is deprecated, use hdmi_get_display_state instead
005731.916: cec: setting callback (0x3DCA9968)
005735.845: TV service:host side not connected, dropping notification 0x00000002, 0x00000002, 0x00000023

urosg
Posts: 13
Joined: Sat Aug 22, 2015 1:08 am

Re: CM3 ACT LED no longer blinking with mmc activity?

Mon Jan 23, 2017 1:16 pm

Hi,

noticed the same, and looking at the GPIO settings after the system is loaded and it shows on pin 46/47 initialized as I2C ?

I guess some devicetree hacking will have to be done to get things back in order, I also miss UART availability out of the box as I have and UART->USB circuit on my boards for debugging and after first boot on CM3 it didn't work, only after changes in config.txt

Code: Select all

dtparam=uart0=on
it did work.

On the old CM the GPIO46 is set to INPUT and GPIO47 to OUTPUT.

urosg
Posts: 13
Joined: Sat Aug 22, 2015 1:08 am

Re: CM3 ACT LED no longer blinking with mmc activity?

Mon Jan 23, 2017 1:27 pm

In the default device trees for CM and CM3 are different declarations for act led.

Declaration for CM1:
dt-cm1.PNG
dt-cm1.PNG (6.27 KiB) Viewed 4021 times
Declaration for CM3:
dt-cm3.PNG
dt-cm3.PNG (6.5 KiB) Viewed 4021 times
It is seen that in CM1 declaration the GPIO 47 is set as ACT LED pin whereas in CM3 GPIO0 (?) is declared.

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6870
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: CM3 ACT LED no longer blinking with mmc activity?

Mon Jan 23, 2017 2:34 pm

EMMC_ENABLE_N is the line connected to the LED on the CMIO.

CM1 - https://github.com/raspberrypi/firmware ... .dts#L1538

Code: Select all

[email protected] { function = "output"; termination = "no_pulling"; polarity = "active_low"; }; // EMMC_ENABLE_N
CM3 - https://github.com/raspberrypi/firmware ... .dts#L1336

Code: Select all

[email protected] { function = "output"; termination = "no_pulling"; polarity = "active_low"; }; // EMMC_ENABLE_N
And look at the source Linux DT - https://github.com/raspberrypi/linux/bl ... 3.dts#L123

Code: Select all

&leds {
	act_led: act {
		label = "led0";
		linux,default-trigger = "mmc0";
		gpios = <&virtgpio 0 0>;
	};
};
Same as the Pi3 in that regard.

If you've been referencing it directly as GPIO47 then that's your issue.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2217
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: CM3 ACT LED no longer blinking with mmc activity?

Mon Jan 23, 2017 2:38 pm

I think there is at least one error here, and possibly two: the virtgpio reference in the dtb should be to GPIO 1 of the expander, not 0. However, even when I correct that I can't get the LED to go off, so something else strange is going on.

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6870
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: CM3 ACT LED no longer blinking with mmc activity?

Mon Jan 23, 2017 3:00 pm

PhilE wrote:I think there is at least one error here, and possibly two: the virtgpio reference in the dtb should be to GPIO 1 of the expander, not 0. However, even when I correct that I can't get the LED to go off, so something else strange is going on.
I seem to recall that the virtgpio driver was a touch quirky and didn't map directly to the actual GPIOs, so the GPIO number didn't matter.

Would the absence of the [email protected]_DISK_ACTIVITY have anything to do with it? I see reference to that in the VC side of the virtgpio driver (arm_loader.c).
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2217
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: CM3 ACT LED no longer blinking with mmc activity?

Mon Jan 23, 2017 4:37 pm

I've narrowed it down to a firmware issue - the DTB is OK as far as the ACT LED is concerned - but finding the best solution will take a bit longer.

urosg
Posts: 13
Joined: Sat Aug 22, 2015 1:08 am

Re: CM3 ACT LED no longer blinking with mmc activity?

Tue Jan 24, 2017 4:58 am

6by9 wrote:EMMC_ENABLE_N is the line connected to the LED on the CMIO.

CM1 - https://github.com/raspberrypi/firmware ... .dts#L1538

Code: Select all

[email protected] { function = "output"; termination = "no_pulling"; polarity = "active_low"; }; // EMMC_ENABLE_N
CM3 - https://github.com/raspberrypi/firmware ... .dts#L1336

Code: Select all

[email protected] { function = "output"; termination = "no_pulling"; polarity = "active_low"; }; // EMMC_ENABLE_N
If you've been referencing it directly as GPIO47 then that's your issue.
I have not been referencing it directly, I have just decompiled the devicetree files in /boot and compared and went from there and since the circuit didn't change, something else must have, don't you think?

I confess I didn't think to look in sources on github and did also forget that the CM3 has an GPIO expander for these two pins, but nevertheless as then discovered by PhilE there is an issue there.
PhilE wrote: I've narrowed it down to a firmware issue - the DTB is OK as far as the ACT LED is concerned - but finding the best solution will take a bit longer.

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6870
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: CM3 ACT LED no longer blinking with mmc activity?

Tue Jan 24, 2017 6:45 am

urosg wrote:I have not been referencing it directly, I have just decompiled the devicetree files in /boot and compared and went from there and since the circuit didn't change, something else must have, don't you think?

I confess I didn't think to look in sources on github and did also forget that the CM3 has an GPIO expander for these two pins, but nevertheless as then discovered by PhilE there is an issue there.
PhilE wrote: I've narrowed it down to a firmware issue - the DTB is OK as far as the ACT LED is concerned - but finding the best solution will take a bit longer.
I'd exchanged a couple of messages with Phil offline.
The fact that line is also the EMMC_ENABLE_N line means the GPU can't be told about as it will disable its own EMMC, but it needs to be told about it to use as the activity LED. Discussions are ongoing for a workable solution.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

urosg
Posts: 13
Joined: Sat Aug 22, 2015 1:08 am

Re: CM3 ACT LED no longer blinking with mmc activity?

Mon Jan 30, 2017 5:16 am

Hopefully a workable solution will be found soon.

Thanks 6by9 and PhilE

tehn
Posts: 3
Joined: Wed Feb 22, 2017 2:47 am

Re: CM3 ACT LED no longer blinking with mmc activity?

Wed Feb 22, 2017 8:43 pm

Checking in on this topic to see if any progress has been made in the last several weeks.

Between this and UART0 being disabled by default, I was completely perplexed why my CM1 seemed to work perfectly well in my custom (minimal) IO board, and the CM3 looked completely dead. Happily it is not dead!

Thanks!

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2217
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: CM3 ACT LED no longer blinking with mmc activity?

Thu Feb 23, 2017 10:12 am

The current firmware release contains a fix for this. You can install it by running "sudo rpi-update". Note that firmware downloaded by rpi-update is less tested than full Raspbian releases, so it is wise to backup any important data before updating.

rzusman
Posts: 346
Joined: Fri Jan 01, 2016 10:27 pm

Re: CM3 ACT LED no longer blinking with mmc activity?

Wed Apr 05, 2017 11:55 pm

PhilE wrote:The current firmware release contains a fix for this. You can install it by running "sudo rpi-update". Note that firmware downloaded by rpi-update is less tested than full Raspbian releases, so it is wise to backup any important data before updating.
Is this fix backwards-compatible with the CM1?
I would like to be able to run the same image on both boards.

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2217
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: CM3 ACT LED no longer blinking with mmc activity?

Thu Apr 06, 2017 5:36 am

Yes, as far as I know - I haven't tried it myself though.

MrBool
Posts: 103
Joined: Sat Jul 05, 2014 9:51 am

Re: CM3 ACT LED no longer blinking with mmc activity?

Tue Apr 18, 2017 2:24 pm

I tested ACT LED on CM and CM3 with Raspbian image from March.
On CM everything works fine.
On CM3 I noticed strange behavior. By default trigger is setup as heartbeat and it works fine. I can also control ACT LED by /sys/class/leds/led0/brightness. But when I want to control ACT LED by "gpio write 47 1". It does not work.

I noticed also that I have to comment below line in my config.txt:
dtparam=act_led_gpio=47
to ACT LED works properly.

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2217
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: CM3 ACT LED no longer blinking with mmc activity?

Tue Apr 18, 2017 2:58 pm

1) The activity LED isn't (directly) attached to GPIO47 - instead it is on an I2C-addressed GPIO expander.

2) You shouldn't be using gpio to control the LED under the feet of the LED subsystem - use the LED API instead (which unfortunately needs root privilege):

Code: Select all

[email protected]:~$ sudo sh -c "echo default-on >/sys/class/leds/led1/trigger"   # On
[email protected]:~$ sudo sh -c "echo none >/sys/class/leds/led1/trigger"         # Off
Once a static (non-flashing) trigger has been set you can then use:

Code: Select all

[email protected]:~$ sudo sh -c "echo 1 >/sys/class/leds/led1/brightness"   # On
[email protected]:~$ sudo sh -c "echo 0 >/sys/class/leds/led1/brightness"   # Off

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6870
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: CM3 ACT LED no longer blinking with mmc activity?

Tue Apr 18, 2017 3:18 pm

PhilE wrote:2) You shouldn't be using gpio to control the LED under the feet of the LED subsystem - use the LED API instead (which unfortunately needs root privilege):
Iff the LED were disassociated with the LED, then slightly curiously it appears that the sysfs gpio framework is owned root:gpio with user pi being in the gpio group by default. This is NOT a recommendation to go down that route, but another alternative.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2217
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: CM3 ACT LED no longer blinking with mmc activity?

Tue Apr 18, 2017 3:22 pm

It's not particularly curious, it's just that we have udev rules to control the ownership and permissions of the GPIO nodes. I'm sure we could do something similar for LEDs.

MrBool
Posts: 103
Joined: Sat Jul 05, 2014 9:51 am

Re: CM3 ACT LED no longer blinking with mmc activity?

Tue Apr 18, 2017 3:32 pm

PhilE wrote:1) The activity LED isn't (directly) attached to GPIO47 - instead it is on an I2C-addressed GPIO expander.
Thank you PhilE for your reply.
I checked schematic of CM3 and I see that EMMC_EN_N_1V8 signal which control ACT LED is connected to FXL6408UMX (I2C GPIO expander). Now all is clear.
So I confirm that the problem with CM3 ACT LED does not exist anymore.

Return to “Compute Module”