Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong sleep frequency for BCM43340 on GPCLK2? #831

Closed
lategoodbye opened this issue Jun 25, 2017 · 3 comments
Closed

Wrong sleep frequency for BCM43340 on GPCLK2? #831

lategoodbye opened this issue Jun 25, 2017 · 3 comments

Comments

@lategoodbye
Copy link

lategoodbye commented Jun 25, 2017

According to the dt-blob.dts the BCM43340 of the Raspberry Pi Zero W seems to uses GPCLK2 as the external Low-Power Oscillator. Looking at the datasheet the Low-Power Oscillator for the BCM43340 chip should have the frequency 32768 Hz. But if i dump the clock settings the frequency is set to 32000 Hz:

root@raspberrypi:/sys/kernel/debug# cat clk/clk_summary
   clock                         enable_cnt  prepare_cnt        rate   accuracy   phase
----------------------------------------------------------------------------------------
 uart1_pclk                               0            0   125000000          0 0
 uart0_pclk                               0            0     3000000          0 0
 apb_pclk                                 0            0   126000000          0 0
 otg                                      0            0   480000000          0 0
 osc                                      6            6    19200000          0 0
    gp2                                   1            1       32000          0 0

Is this intended or a bug?
Maybe this is related to the wifi power managment issues.

Edit: I'm using the latest Raspbian Jessie Lite image 2017-06-21.

@pelwell
Copy link
Contributor

pelwell commented Jun 26, 2017

That looks like a bug, probably due to a misuse of "32KHz" somewhere along the line.

I'll be surprised if it changes the behaviour in any significant way, but we'll get it fixed.

popcornmix added a commit that referenced this issue Jun 26, 2017
firmware: 2ndstage: Improve i2c_gpio support
firmware: i2c_gpio: Improve implementation and usage

firmware: Camplus: Enable RAW12 support in the ISP input formatter

firmware: scalerlib: Don't flip tiled format and swap R/B
firmware: arm_display: Provide mechanism to request tiled format framebuffer
See: #820

firmware: platform: Set BT LPO frequency to 32768Hz
See: #831
popcornmix added a commit to Hexxeh/rpi-firmware that referenced this issue Jun 26, 2017
firmware: 2ndstage: Improve i2c_gpio support
firmware: i2c_gpio: Improve implementation and usage

firmware: Camplus: Enable RAW12 support in the ISP input formatter

firmware: scalerlib: Don't flip tiled format and swap R/B
firmware: arm_display: Provide mechanism to request tiled format framebuffer
See: raspberrypi/firmware#820

firmware: platform: Set BT LPO frequency to 32768Hz
See: raspberrypi/firmware#831
@pelwell
Copy link
Contributor

pelwell commented Jun 27, 2017

A firmware with the correct clock rate is now available via rpi-update. Please test and close if appropriate.

@lategoodbye
Copy link
Author

Since the power management of the brcmfmac is completly disabled i don't expect any changes regarding to Wifi. But i can confirm the LPO frequency is correct now:

Linux raspberrypi 4.9.34+ #1013 Sun Jun 25 16:41:15 BST 2017 armv6l GNU/Linux

 clock                         enable_cnt  prepare_cnt        rate   accuracy   phase
----------------------------------------------------------------------------------------
uart1_pclk                               0            0   125000000          0 0
uart0_pclk                               0            0     3000000          0 0
apb_pclk                                 0            0   126000000          0 0
otg                                      0            0   480000000          0 0
osc                                      6            6    19200000          0 0
   gp2                                   1            1       32768          0 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants