Skip to content
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
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ On UEFI and FreeBSD raw port I/O is used - on Linux this can also be used as a f
| AMD Ryzen AI 300 | Yes | [6.12](https://github.com/torvalds/linux/commit/62be134abf4250474a7a694837064bc783d2b291) | Yes |
| Framework 16 | | | |
| AMD Ryzen 7040 | Yes | [6.10](https://github.com/torvalds/linux/commit/c8f460d991df93d87de01a96b783cad5a2da9616) | BIOS 3.06+ |
| AMD Ryzen AI 300 | Yes | [6.10](https://github.com/torvalds/linux/commit/c8f460d991df93d87de01a96b783cad5a2da9616) | Yes |
| Framework Desktop | | | |
| AMD Ryzen AI Max | Yes | [6.15](https://github.com/torvalds/linux/commit/d83c45aeec9b223fe6db4175e9d1c4f5699cc37a) | Yes |

Expand Down Expand Up @@ -129,6 +130,7 @@ All of these need EC communication support in order to work.
- [x] Framework Laptop 13 (AMD Ryzen 7080)
- [x] Framework Laptop 13 (AMD Ryzen AI 300)
- [x] Framework Laptop 16 (AMD Ryzen 7080)
- [x] Framework Laptop 16 (AMD Ryzen AI 300)
- [x] Framework Desktop (AMD Ryzen AI Max 300)
- [x] Port I/O communication on Linux
- [x] Port I/O communication in UEFI
Expand Down
12 changes: 8 additions & 4 deletions framework_lib/src/ccgx/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,18 @@ impl PdPort {
(
Platform::Framework13Amd7080
| Platform::Framework13AmdAi300
| Platform::Framework16Amd7080,
| Platform::Framework16Amd7080
| Platform::Framework16AmdAi300,
PdPort::Right01,
) => 0x42,
(
Platform::Framework13Amd7080
| Platform::Framework13AmdAi300
| Platform::Framework16Amd7080,
| Platform::Framework16Amd7080
| Platform::Framework16AmdAi300,
PdPort::Left23,
) => 0x40,
(Platform::Framework16Amd7080, PdPort::Back) => 0x42,
(Platform::Framework16Amd7080 | Platform::Framework16AmdAi300, PdPort::Back) => 0x42,
(Platform::FrameworkDesktopAmdAiMax300, PdPort::Back) => 0x08,
(Platform::FrameworkDesktopAmdAiMax300, _) => unsupported?,
// Framework Intel Platforms (CCG5 and CCG6)
Expand Down Expand Up @@ -120,6 +122,7 @@ impl PdPort {
(
Platform::Framework13Amd7080
| Platform::Framework16Amd7080
| Platform::Framework16AmdAi300
| Platform::IntelCoreUltra1
| Platform::Framework13AmdAi300
| Platform::Framework12IntelGen13,
Expand All @@ -128,12 +131,13 @@ impl PdPort {
(
Platform::Framework13Amd7080
| Platform::Framework16Amd7080
| Platform::Framework16AmdAi300
| Platform::IntelCoreUltra1
| Platform::Framework13AmdAi300
| Platform::Framework12IntelGen13,
PdPort::Left23,
) => 2,
(Platform::Framework16Amd7080, PdPort::Back) => 5,
(Platform::Framework16Amd7080 | Platform::Framework16AmdAi300, PdPort::Back) => 5,
(Platform::FrameworkDesktopAmdAiMax300, PdPort::Back) => 1,
(Platform::FrameworkDesktopAmdAiMax300, _) => unsupported?,
(Platform::UnknownSystem, _) => {
Expand Down
8 changes: 8 additions & 0 deletions framework_lib/src/esrt/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,12 @@ pub const FL16_BIOS_GUID: GUID = GUID::build_from_components(
0x5d64,
&[0x8e, 0x18, 0x65, 0x8d, 0x20, 0x5a, 0xcf, 0x34],
);
pub const AMD16_AI300_BIOS_GUID: GUID = GUID::build_from_components(
0x820436ee,
0x8208,
0x463b,
&[0x92, 0xb8, 0x82, 0x77, 0xd6, 0x38, 0x4d, 0x93],
);
pub const AMD13_RYZEN7040_BIOS_GUID: GUID = GUID::build_from_components(
0xb5f7dcc1,
0x568c,
Expand Down Expand Up @@ -186,6 +192,7 @@ pub enum FrameworkGuidKind {
RplUCsme,
MtlCsme,
Fl16Bios,
Amd16Ai300Bios,
Amd13Ryzen7040Bios,
Amd13Ai300Bios,
DesktopAmdAi300Bios,
Expand All @@ -201,6 +208,7 @@ pub fn match_guid_kind(guid: &CGuid) -> FrameworkGuidKind {
MTL_BIOS_GUID => FrameworkGuidKind::MtlBios,
FW12_RPL_BIOS_GUID => FrameworkGuidKind::Fw12RplBios,
FL16_BIOS_GUID => FrameworkGuidKind::Fl16Bios,
AMD16_AI300_BIOS_GUID => FrameworkGuidKind::Amd16Ai300Bios,
AMD13_RYZEN7040_BIOS_GUID => FrameworkGuidKind::Amd13Ryzen7040Bios,
AMD13_AI300_BIOS_GUID => FrameworkGuidKind::Amd13Ai300Bios,
DESKTOP_AMD_AI300_BIOS_GUID => FrameworkGuidKind::DesktopAmdAi300Bios,
Expand Down
9 changes: 5 additions & 4 deletions framework_lib/src/power.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ use crate::chromium_ec::command::EcRequestRaw;
use crate::chromium_ec::commands::*;
use crate::chromium_ec::*;
use crate::smbios;
use crate::smbios::get_platform;
use crate::util::{Platform, PlatformFamily};

/// Maximum length of strings in memmap
Expand Down Expand Up @@ -358,6 +357,7 @@ pub fn print_thermal(ec: &CrosEc) {
let fans = ec.read_memory(EC_MEMMAP_FAN, 0x08).unwrap();

let platform = smbios::get_platform();
let family = smbios::get_family();
let remaining_sensors = match platform {
Some(Platform::IntelGen11) | Some(Platform::IntelGen12) | Some(Platform::IntelGen13) => {
println!(" F75303_Local: {:>4}", TempSensor::from(temps[0]));
Expand Down Expand Up @@ -396,13 +396,14 @@ pub fn print_thermal(ec: &CrosEc) {
Some(
Platform::Framework13Amd7080
| Platform::Framework13AmdAi300
| Platform::Framework16Amd7080,
| Platform::Framework16Amd7080
| Platform::Framework16AmdAi300,
) => {
println!(" F75303_Local: {:>4}", TempSensor::from(temps[0]));
println!(" F75303_CPU: {:>4}", TempSensor::from(temps[1]));
println!(" F75303_DDR: {:>4}", TempSensor::from(temps[2]));
println!(" APU: {:>4}", TempSensor::from(temps[3]));
if matches!(platform, Some(Platform::Framework16Amd7080)) {
if family == Some(PlatformFamily::Framework16) {
println!(" dGPU VR: {:>4}", TempSensor::from(temps[4]));
println!(" dGPU VRAM: {:>4}", TempSensor::from(temps[5]));
println!(" dGPU AMB: {:>4}", TempSensor::from(temps[6]));
Expand Down Expand Up @@ -721,7 +722,7 @@ pub fn get_pd_info(ec: &CrosEc, ports: u8) -> Vec<EcResult<UsbPdPowerInfo>> {
}

pub fn get_and_print_pd_info(ec: &CrosEc) {
let fl16 = Some(crate::util::Platform::Framework16Amd7080) == get_platform();
let fl16 = Some(PlatformFamily::Framework16) == smbios::get_family();
let ports = 4; // All our platforms have 4 PD ports so far
let infos = get_pd_info(ec, ports);
for (port, info) in infos.iter().enumerate().take(ports.into()) {
Expand Down
1 change: 1 addition & 0 deletions framework_lib/src/smbios.rs
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,7 @@ pub fn get_platform() -> Option<Platform> {
"Laptop 12 (13th Gen Intel Core)" => Some(Platform::Framework12IntelGen13),
"Laptop 13 (Intel Core Ultra Series 1)" => Some(Platform::IntelCoreUltra1),
"Laptop 16 (AMD Ryzen 7040 Series)" => Some(Platform::Framework16Amd7080),
"Laptop 16 (AMD Ryzen AI 300 Series)" => Some(Platform::Framework16AmdAi300),
"Desktop (AMD Ryzen AI Max 300 Series)" => Some(Platform::FrameworkDesktopAmdAiMax300),
_ => Some(Platform::UnknownSystem),
};
Expand Down
4 changes: 4 additions & 0 deletions framework_lib/src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ pub enum Platform {
Framework13AmdAi300,
/// Framework 16 - AMD Ryzen 7080 Series
Framework16Amd7080,
/// Framework 16 - AMD Ryzen AI 300 Series
Framework16AmdAi300,
/// Framework Desktop - AMD Ryzen AI Max 300
FrameworkDesktopAmdAiMax300,
/// Generic Framework device
Expand Down Expand Up @@ -66,6 +68,7 @@ impl Platform {
Platform::Framework13Amd7080
| Platform::Framework13AmdAi300
| Platform::Framework16Amd7080
| Platform::Framework16AmdAi300
| Platform::FrameworkDesktopAmdAiMax300 => Some(CpuVendor::Amd),
Platform::GenericFramework(..) => None,
Platform::UnknownSystem => None,
Expand All @@ -81,6 +84,7 @@ impl Platform {
| Platform::Framework13Amd7080
| Platform::Framework13AmdAi300 => Some(PlatformFamily::Framework13),
Platform::Framework16Amd7080 => Some(PlatformFamily::Framework16),
Platform::Framework16AmdAi300 => Some(PlatformFamily::Framework16),
Platform::FrameworkDesktopAmdAiMax300 => Some(PlatformFamily::FrameworkDesktop),
Platform::GenericFramework(..) => None,
Platform::UnknownSystem => None,
Expand Down
Loading