Skip to content

Commit

Permalink
Add separate DeviceInfo for BCM2712
Browse files Browse the repository at this point in the history
  • Loading branch information
golemparts committed Sep 28, 2023
1 parent 61c98ed commit a7b5a19
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const GPIO_OFFSET: u32 = 0x20_0000;
// Number of GPIO lines
const GPIO_LINES_BCM283X: u8 = 54;
const GPIO_LINES_BCM2711: u8 = 58;
const GPIO_LINES_BCM2712: u8 = 58;

/// Errors that can occur when trying to identify the Raspberry Pi hardware.
#[derive(Debug)]
Expand Down Expand Up @@ -376,14 +377,20 @@ impl DeviceInfo {
Model::RaspberryPi4B
| Model::RaspberryPi400
| Model::RaspberryPiComputeModule4
| Model::RaspberryPiComputeModule4S
| Model::RaspberryPi5 => Ok(DeviceInfo {
| Model::RaspberryPiComputeModule4S => Ok(DeviceInfo {
model,
soc: SoC::Bcm2711,
peripheral_base: PERIPHERAL_BASE_RPI4,
gpio_offset: GPIO_OFFSET,
gpio_lines: GPIO_LINES_BCM2711,
}),
Model::RaspberryPi5 => Ok(DeviceInfo {
model,
soc: SoC::Bcm2712,
peripheral_base: PERIPHERAL_BASE_RPI4,
gpio_offset: GPIO_OFFSET,
gpio_lines: GPIO_LINES_BCM2712,
}),
}
}

Expand Down

0 comments on commit a7b5a19

Please sign in to comment.