// SPDX-License-Identifier: (GPL-2.0+ or MIT)
// Copyright (C) 2021-2022 Samuel Holland <samuel@sholland.org>

/ {
	reg_vcc: vcc {
		compatible = "regulator-fixed";
		regulator-name = "vcc";
		regulator-min-microvolt = <5000000>;
		regulator-max-microvolt = <5000000>;
	};

	reg_vcc_3v3: vcc-3v3 {
		compatible = "regulator-fixed";
		regulator-name = "vcc-3v3";
		regulator-min-microvolt = <3300000>;
		regulator-max-microvolt = <3300000>;
		vin-supply = <&reg_vcc>;
	};
};

&codec {
	avcc-supply = <&reg_aldo>;
	hpvcc-supply = <&reg_hpldo>;
};

&hdmi {
	hvcc-supply = <&reg_ldoa>;
};

&lradc {
	vref-supply = <&reg_aldo>;
};

&pio {
	vcc-pb-supply = <&reg_vcc_3v3>;
	vcc-pc-supply = <&reg_vcc_3v3>;
	vcc-pd-supply = <&reg_vcc_3v3>;
	vcc-pe-supply = <&reg_vcc_3v3>;
	vcc-pf-supply = <&reg_vcc_3v3>;
	vcc-pg-supply = <&reg_vcc_3v3>;
};

&reg_aldo {
	regulator-min-microvolt = <1800000>;
	regulator-max-microvolt = <1800000>;
	vdd33-supply = <&reg_vcc_3v3>;
};

&reg_hpldo {
	regulator-min-microvolt = <1800000>;
	regulator-max-microvolt = <1800000>;
	hpldoin-supply = <&reg_vcc_3v3>;
};

&reg_ldoa {
	regulator-always-on;
	regulator-min-microvolt = <1800000>;
	regulator-max-microvolt = <1800000>;
	ldo-in-supply = <&reg_vcc_3v3>;
};

&ths {
	vref-supply = <&reg_aldo>;
};
