Difference between revisions of "User:Z3ntu/Qualcomm Mainlining"

From postmarketOS
Jump to navigation Jump to search
(Created page with "== First steps for a new SoC == * gcc (global clock controller) * SoC dtsi * device dts * pinctrl? == smem == Downstream compatible: "qcom,smem" Normally the reg for reg-n...")
 
Line 15: Line 15:
  
 
This should enable you to read socinfo from /sys/devices/soc0/* and /sys/kernel/debug/qcom_socinfo/* (assuming you've enabled CONFIG_QCOM_SOCINFO and mounted debugfs)
 
This should enable you to read socinfo from /sys/devices/soc0/* and /sys/kernel/debug/qcom_socinfo/* (assuming you've enabled CONFIG_QCOM_SOCINFO and mounted debugfs)
 +
 +
== rpm regulators ==
 +
 +
Downstream: compatible = "qcom,rpm-smd-regulator-resource";
 +
 +
struct rpm_regulator_data[]:
 +
 +
name: take s1 from regulator-s1
 +
type: translate qcom,resource-name to constant
 +
id: qcom,resource-id
 +
desc: ???
 +
supply: check pins it seems, VDD_GR1 - VDD_GR7 (not obvious what they supply but sometimes it's noted), normally something like VDD_L13_20_23_24

Revision as of 06:23, 27 April 2021

First steps for a new SoC

  • gcc (global clock controller)
  • SoC dtsi
  • device dts
  • pinctrl?

smem

Downstream compatible: "qcom,smem"

Normally the reg for reg-names = "smem" is used with address & size. BUT if e.g. smem_targ_info_imem is set, then the driver will read the address from this register and ignore the address from dts.

The error "qcom-smem smem: SMEM is not initialized by SBL" very likely means that the address is wrong. Double check the downstream driver and add some prints to see what's happening there. In msm8226 driver, a print after smem_targ_info_done with "SMEM_INFO("%s: got smem_ram_phys %pa and smem_ram_size %pa !\n", __func__, &smem_ram_phys, &smem_ram_size);" was useful.

This should enable you to read socinfo from /sys/devices/soc0/* and /sys/kernel/debug/qcom_socinfo/* (assuming you've enabled CONFIG_QCOM_SOCINFO and mounted debugfs)

rpm regulators

Downstream: compatible = "qcom,rpm-smd-regulator-resource";

struct rpm_regulator_data[]:

name: take s1 from regulator-s1 type: translate qcom,resource-name to constant id: qcom,resource-id desc: ??? supply: check pins it seems, VDD_GR1 - VDD_GR7 (not obvious what they supply but sometimes it's noted), normally something like VDD_L13_20_23_24