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

arm64: dts: qcom: sdm636-xiaomi-tulip: enable fan53526 buck regulator for LDDR4 #45

Open
wants to merge 2 commits into
base: qcom-sdm660-6.11.y
Choose a base branch
from
Open
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
10 changes: 10 additions & 0 deletions arch/arm64/boot/dts/qcom/sdm636-xiaomi-tulip.dts
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,16 @@

&blsp_i2c2 {
status = "okay";

regulator@60 {
compatible = "fcs,fan53526";
reg = <0x60>;
regulator-always-on;
regulator-min-microvolt = <1000000>;
regulator-max-microvolt = <1100000>;
vin-supply = <&vph_pwr>;
fcs,suspend-voltage-selector = <1>;
};
};

&blsp_i2c6 {
Expand Down
15 changes: 15 additions & 0 deletions drivers/regulator/fan53555.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,11 @@ enum fan53555_vendor {

enum {
FAN53526_CHIP_ID_01 = 1,
FAN53526_CHIP_ID_08 = 8,
};

enum {
FAN53526_CHIP_REV_01 = 1,
FAN53526_CHIP_REV_08 = 8,
};

Expand Down Expand Up @@ -272,6 +274,19 @@ static int fan53526_voltages_setup_fairchild(struct fan53555_device_info *di)
return -EINVAL;
}
break;
case FAN53526_CHIP_ID_08:
switch (di->chip_rev) {
case FAN53526_CHIP_REV_01:
di->vsel_min = 600000;
di->vsel_step = 6250;
break;
default:
dev_err(di->dev,
"Chip ID %d with rev %d not supported!\n",
di->chip_id, di->chip_rev);
return -EINVAL;
}
break;
default:
dev_err(di->dev,
"Chip ID %d not supported!\n", di->chip_id);
Expand Down