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

overlays: spi-rtc: Add ds3232 and ds3234 #4292

Merged
merged 1 commit into from
Apr 21, 2021

Conversation

pelwell
Copy link
Contributor

@pelwell pelwell commented Apr 19, 2021

Extend the spi-rtc overlay to support the ds3232 and ds3234 RTCs, as
well as adding parameters to select difference SPI controllers and
chip selects.

N.B. The default CS is now active-low - use the "cs_high" parameter to
override this.

Signed-off-by: Phil Elwell [email protected]

Extend the spi-rtc overlay to support the ds3232 and ds3234 RTCs, as
well as adding parameters to select difference SPI controllers and
chip selects.

N.B. The default CS is now active-low - use the "cs_high" parameter to
override this.

Signed-off-by: Phil Elwell <[email protected]>
@pelwell
Copy link
Contributor Author

pelwell commented Apr 19, 2021

@Kriechi I don't know if you still use the spi-rtc,pcf2123 overlay, but this PR would invert (i.e. standardise) the sense of the CS line to make it active-low (the usual default). I would like to do this in order to regularise the use of this overlay, but I am aware that this would require current user of the overlay to append ,cs_high to their config.txt lines.

Do you have any comments?

@Kriechi
Copy link

Kriechi commented Apr 19, 2021

@pelwell thanks for reaching out - It's been a while since I last used this overlay. I currently have no active project with a pcf2123.

There could potentially be a lot of other people and projects using it... so I don't want to claim that this is a safe change.
Any chance of detecting this during the package upgrade and emit a warning or fail the upgrade?

@pelwell
Copy link
Contributor Author

pelwell commented Apr 19, 2021

There are many routes to install our kernels - rpi-update, apt upgrade, self-build, etc. - and no common mechanism to give such a warning. It is possible to set cs_high for pcf2123 by default and add a cs_low parameter (which would normally by a no-op), or change the default for all RTCs, but neither of those options is very appealing.

@pelwell
Copy link
Contributor Author

pelwell commented Apr 21, 2021

After some discussion we've opted to go with this version of the overlay. It does mean that existing users of the pcf2123 will find that it stops working, but that should be quick and easy to diagnose and resolve.

@pelwell pelwell merged commit a25f028 into raspberrypi:rpi-5.10.y Apr 21, 2021
popcornmix added a commit to raspberrypi/firmware that referenced this pull request Apr 21, 2021
See: raspberrypi/linux#4303

kernel: HDMI support for modes that require the scrambler (4k @ 60Hz, most importantly)
See: raspberrypi/linux#4302

kernel: overlays: spi-rtc: Add ds3232 and ds3234
See: raspberrypi/linux#4292

firmware: isp: Ensure the VRF is locked when setting up video colour denoise
See: raspberrypi/rpicam-apps#19

firmware: isp: Remove custom EV mappings from camera tunings

firmware: Add support for board-type=0xXX conditional filters in bootloader, bootcode and firmware

firmware: Two UART1 patches
See: #1566
popcornmix added a commit to Hexxeh/rpi-firmware that referenced this pull request Apr 21, 2021
See: raspberrypi/linux#4303

kernel: HDMI support for modes that require the scrambler (4k @ 60Hz, most importantly)
See: raspberrypi/linux#4302

kernel: overlays: spi-rtc: Add ds3232 and ds3234
See: raspberrypi/linux#4292

firmware: isp: Ensure the VRF is locked when setting up video colour denoise
See: raspberrypi/rpicam-apps#19

firmware: isp: Remove custom EV mappings from camera tunings

firmware: Add support for board-type=0xXX conditional filters in bootloader, bootcode and firmware

firmware: Two UART1 patches
See: raspberrypi/firmware#1566
@pelwell pelwell deleted the spirtc branch September 15, 2021 07:57
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

Successfully merging this pull request may close these issues.

2 participants