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

Specify voltage regulators in device tree #12

Open
hansemro opened this issue Apr 17, 2021 · 5 comments
Open

Specify voltage regulators in device tree #12

hansemro opened this issue Apr 17, 2021 · 5 comments
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@hansemro
Copy link
Owner

hansemro commented Apr 17, 2021

Resources:

@hansemro
Copy link
Owner Author

Kernel log from 3.4.48:

[    0.295166] VUSB: 3300 mV normal standby
[    0.298645] twl6030_usb twl6030_usb: Initialized TWL6030 USB module
[    0.299774] V2V1: 2100 mV 
[    0.300231] VMMC: 1200 <--> 3000 mV at 1800 mV normal standby
[    0.301116] VPP: 1800 <--> 2500 mV at 1900 mV normal standby
[    0.301696] VUSIM: 1200 <--> 3300 mV at 1800 mV normal standby
[    0.302581] VCXIO: 1800 mV normal standby
[    0.303283] VDAC: 1800 mV normal standby
[    0.304107] VAUX1_6030: 1000 <--> 3300 mV at 2800 mV normal standby
[    0.305145] VAUX2_6030: 1200 <--> 3300 mV at 1800 mV normal standby
[    0.305725] VAUX3_6030: 1000 <--> 3300 mV at 1200 mV normal standby
[    0.306640] VANA: 2100 mV normal standby
[    0.307464] CLK32KG: normal

@hansemro hansemro self-assigned this Apr 17, 2021
@hansemro hansemro added enhancement New feature or request help wanted Extra attention is needed labels Apr 17, 2021
@hansemro
Copy link
Owner Author

hansemro commented Apr 17, 2021

arch/arm/boot/dts/omap4-kc1.dts:

&vaux1 {
	regulator-min-microvolt = <1000000>;
	regulator-max-microvolt = <3300000>;
	regulator-always-on;
};

&vaux2 {
	regulator-min-microvolt = <1200000>;
	regulator-max-microvolt = <3300000>;
	regulator-always-on;
};

&vaux3 {
	regulator-min-microvolt = <1000000>;
	regulator-max-microvolt = <3300000>;
};

&vmmc {
	regulator-min-microvolt = <1200000>;
	regulator-max-microvolt = <3000000>;
};

&vpp {
	regulator-min-microvolt = <1800000>;
	regulator-max-microvolt = <2500000>;
	regulator-state-mem {
		regulator-off-in-suspend;
	};
};

&vusim {
	regulator-min-microvolt = <1200000>;
	regulator-max-microvolt = <3300000>;
};

&vana {
	regulator-min-microvolt = <2100000>;
	regulator-max-microvolt = <2100000>;
};

&vcxio {
	regulator-min-microvolt = <1800000>;
	regulator-max-microvolt = <1800000>;
};

&vdac {
	regulator-min-microvolt = <1800000>;
	regulator-max-microvolt = <1800000>;
};

&vusb {
	regulator-min-microvolt = <3300000>;
	regulator-max-microvolt = <3300000>;
	regulator-state-mem {
		regulator-off-in-suspend;
	};
};

Kernel log (5.11.0):

[    1.640228] pbias_mmc_omap4: 1800 <--> 3000 mV at 3000 mV, disabled
[    1.642578] abb_mpu: 1025 <--> 1389 mV, enabled
[    2.825622] usb usb1: New USB device found, idVendor=1d6b, idProduct=0001, bcdDevice= 5.11
[    3.053283] twl6030_uv_to_vsel:OUT OF RANGE! non mapped vsel for 1375000 Vs max 1316660
[    3.061798] twl6030_uv_to_vsel:OUT OF RANGE! non mapped vsel for 1375000 Vs max 1316660
[    3.070312] twl6030_uv_to_vsel:OUT OF RANGE! non mapped vsel for 1375000 Vs max 1316660
[    3.078796] twl6030_uv_to_vsel:OUT OF RANGE! non mapped vsel for 1375000 Vs max 1316660
[    3.087280] twl6030_uv_to_vsel:OUT OF RANGE! non mapped vsel for 1375000 Vs max 1316660
[    3.095764] twl6030_uv_to_vsel:OUT OF RANGE! non mapped vsel for 1375000 Vs max 1316660
[    3.104278] twl6030_uv_to_vsel:OUT OF RANGE! non mapped vsel for 1410000 Vs max 1316660
[    3.380432] vwl1271: 1800 mV, disabled
[    3.381530] reg-fixed-voltage wl12xx_vmmc: vwl1271 supplying 1800000uV
[    3.632934] VAUX1_6030: 1000 <--> 3300 mV at 2800 mV, enabled
[    3.637512] VAUX2_6030: 1200 <--> 3300 mV at 1800 mV, enabled
[    3.641265] VAUX3_6030: 1000 <--> 3300 mV at 1200 mV, disabled
[    3.645172] VMMC: 1200 <--> 3000 mV at 1800 mV, disabled
[    3.648986] VPP: 1800 <--> 2500 mV at 1900 mV, disabled
[    3.652770] VUSIM: 1200 <--> 3300 mV at 1800 mV, disabled
[    3.655975] VDAC: 1800 mV, enabled
[    3.658721] VANA: 2100 mV, enabled
[    3.662322] VCXIO: 1800 mV, enabled
[    3.665222] VUSB: 3300 mV, disabled
[    3.667327] V1V8: override min_uV, 1 -> 1800000
[    3.667327] V1V8: override max_uV, 2147483647 -> 1800000
[    3.668579] V1V8: 1800 mV, enabled
[    3.670654] V2V1: override min_uV, 1 -> 2100000
[    3.670654] V2V1: override max_uV, 2147483647 -> 2100000
[    3.675933] V2V1: 2100 mV, enabled
[    3.818389] VAUX1_6030: ramp_delay not set
[   34.399414] VDAC: disabling
[   34.400512] VANA: disabling

@hansemro
Copy link
Owner Author

hansemro commented Apr 18, 2021

TWL6030 voltage regulator notes:

  • VDAC: ?
  • VMMC: vmmc1 (omap_hsmmc.0)
  • VAUX1: eMMC/vmmc2 (omap_hsmmc.1)
  • VAUX2: BMA250 (g-sensor)
  • VAUX3: ILITEK touchscreen
  • VPP: ?
  • VANA: ?
  • VUSIM: audio codec
  • VCXIO: omapdss

Other voltage regulator notes:

  • VWLAN/VL1271: vmmc5 (omap_hsmmc.4)

@hansemro
Copy link
Owner Author

Kernel log without device tree changes (for reference):

[    3.549407] VAUX1_6030: 1000 <--> 3000 mV at 2800 mV, enabled
[    3.553497] VAUX2_6030: 1200 <--> 2800 mV at 1800 mV, disabled
[    3.557281] VAUX3_6030: 1000 <--> 3000 mV at 1200 mV, disabled
[    3.701324] VAUX1_6030: ramp_delay not set
[    3.571166] VDAC: override min_uV, 1 -> 1800000
[    3.571166] VDAC: override max_uV, 2147483647 -> 1800000
[    3.573944] VANA: override min_uV, 1 -> 2100000
[    3.573944] VANA: override max_uV, 2147483647 -> 2100000
[    3.574676] VCXIO: override min_uV, 1 -> 1800000
[    3.576721] VCXIO: override max_uV, 2147483647 -> 1800000
[    3.580139] VUSB: override min_uV, 1 -> 3300000
[    3.580169] VUSB: override max_uV, 2147483647 -> 3300000
[    3.582946] V1V8: override min_uV, 1 -> 1800000
[    3.582977] V1V8: override max_uV, 2147483647 -> 1800000
[    3.584259] V2V1: override min_uV, 1 -> 2100000
[    3.584259] V2V1: override max_uV, 2147483647 -> 2100000

@hansemro
Copy link
Owner Author

hansemro commented Apr 22, 2021

The dtb appended to Hashcode's 4.4 kernel has the following entries for voltage regulator:

				vaux1: regulator-vaux1 {
					compatible = "ti,twl6030-vaux1";
					regulator-min-microvolt = <1000000>;
					regulator-max-microvolt = <3000000>;
				};

				vaux2: regulator-vaux2 {
					compatible = "ti,twl6030-vaux2";
					regulator-min-microvolt = <1200000>;
					regulator-max-microvolt = <2800000>;
				};

				vaux3: regulator-vaux3 {
					compatible = "ti,twl6030-vaux3";
					regulator-min-microvolt = <1000000>;
					regulator-max-microvolt = <3000000>;
				};

				vmmc: regulator-vmmc {
					compatible = "ti,twl6030-vmmc";
					regulator-min-microvolt = <1200000>;
					regulator-max-microvolt = <3000000>;
				};

				vpp: regulator-vpp {
					compatible = "ti,twl6030-vpp";
					regulator-min-microvolt = <1800000>;
					regulator-max-microvolt = <2500000>;
				};

				vusim: regulator-vusim {
					compatible = "ti,twl6030-vusim";
					regulator-min-microvolt = <1200000>;
					regulator-max-microvolt = <2900000>;
				};

				vdac: regulator-vdac {
					compatible = "ti,twl6030-vdac";
				};

				vana: regulator-vana {
					compatible = "ti,twl6030-vana";
				};

				vcxio: regulator-vcxio {
					compatible = "ti,twl6030-vcxio";
					regulator-always-on;
				};

				vusb: regulator-vusb {
					compatible = "ti,twl6030-vusb";
					linux,phandle = <0x87>;
					phandle = <0x87>;
				};

				v1v8: regulator-v1v8 {
					compatible = "ti,twl6030-v1v8";
					regulator-always-on;
				};

				v2v1: regulator-v2v1 {
					compatible = "ti,twl6030-v2v1";
					regulator-always-on;
				};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant