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

Update for new version of RPi400 #1690

Merged
merged 2 commits into from
Mar 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/hal/drivers/cpuinfo.c
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/*
Copyright (c) 2012 Ben Croston

Revised by Ernesto Lo Valvo (ernesto.lovalvo@unipa.it) (12/01/2021)
Revised by Ernesto Lo Valvo (ernesto.lovalvo@unipa.it) (19/03/2022)
Added new version of Raspberry Pi4 and Raspberry Pi 400
Revised for version 3B (15/01/2021)
https://www.raspberrypi.org/documentation/hardware/raspberrypi/revision-codes/README.md
https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#raspberry-pi-revision-codes

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
Expand Down Expand Up @@ -100,7 +100,8 @@ int get_rpi_revision(void)
(strcmp(revision, "c03114") == 0) ||
(strcmp(revision, "d03114") == 0))
return 5;
else if (strcmp(revision, "c03130") == 0) /* Raspberry Pi 400 */
else if ((strcmp(revision, "c03130") == 0) || /* Raspberry Pi 400 */
(strcmp(revision, "c03131") == 0))
return 6;
else /* assume rev 7 */
return 7;
Expand Down
7 changes: 7 additions & 0 deletions src/hal/drivers/hal_pi_gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*
* made work for Raspberry2 9/2015 Michael Haberler
* Last change: Modify for Pi5 10/2019 andypugh
* Last change: Modify for Pi400 3/2022 elovalvo
s********************************************************************/


Expand Down Expand Up @@ -236,6 +237,12 @@ int rtapi_app_main(void)
rtapi_print_msg(RTAPI_MSG_INFO, "%d cores rev %d", ncores, rev);

switch (rev) {
case 6:
rtapi_print_msg(RTAPI_MSG_INFO, "RaspberryPi400\n");
pins = rpi2_pins;
gpios = rpi2_gpios;
npins = sizeof(rpi2_pins);
break;
case 5:
rtapi_print_msg(RTAPI_MSG_INFO, "Raspberry4\n");
pins = rpi2_pins;
Expand Down