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

Provide more information about RAM from the bootloader #62

Open
konradybcio opened this issue Feb 14, 2023 · 6 comments
Open

Provide more information about RAM from the bootloader #62

konradybcio opened this issue Feb 14, 2023 · 6 comments

Comments

@konradybcio
Copy link

Qualcomm currently does

/memory[@somewhere]/ddr_device_type =

  • 5 - LPDDR3 # 3X never existed, 3E (3 overclocked) - did
  • 6 - LPDDR4
  • 7 - LPDDR4X
  • 8 - LPDDR5
  • 9 - LPDDR5X

with 1, 2, 3, 4 presumably going to LPDDR(1 / 2_S2 / 2_S4 / 2N), though no sources prove that

Introducing a common property to propagate that information to the operating system seems rather useful. In this Qualcomm-specific example, many on-SoC IP blocks need different settings based on the DDR type.

@krzk
Copy link

krzk commented Feb 27, 2023

I think this duplicates a bit Documentation/devicetree/bindings/memory-controllers/ddr/ in Linux kernel. We already describe memory under memory controllers. I guess the top level memory is only for parsing size/location for FW/OS.

@lumag
Copy link

lumag commented Mar 1, 2023

@krzk Generally I'd agree with you. The problem is:

  • This property has unfortunately already been used by the existing Qualcomm bootloaders,
  • Several bits in the GPU and display drivers should take DDR type into account when programming registers

I hate to ask this, but is there a chance to receive a pardon for this property, provided it is limited to Qualcomm platorms?

@robherring
Copy link
Member

Go look at 'lshw'. It already supports some similar properties in the memory nodes dating back to PowerMac days.

@lumag
Copy link

lumag commented Apr 5, 2023

@robherring I'm not sure if you comment is 'pro' or 'contra', could you please be more specific?

@robherring
Copy link
Member

robherring commented Apr 5, 2023

I'm saying if what's supported by lshw works for you, then I'd be open to supporting it.

However, note that with UEFI boot, there are no memory nodes...

@lumag
Copy link

lumag commented Apr 5, 2023

@robherring no, they are not supported by lshw.

We are currently in the following position: the existing bootloader writes this DT property. While we potentially can try persuading Qualcomm to use correct DT entry (no guarantees on the result though), existing devices are already ddr_device_type. The bootloader is cryptographically signed by the device vendor, so updating old them on existing hardware is close to being impossible.

Parsing this DDR memory type becomes important for the display and GPU drivers to properly setup the hardware. Thus we are asking for an "exception": we'd like to document the mentioned /memory@[something]/ddr_device_type for Qualcomm devices and use this DT property.

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

4 participants