// SPDX-License-Identifier: BSD-3-Clause
/*
 * Copyright (c) 2021, Konrad Dybcio <konrad.dybcio@somainline.org>
 */

/dts-v1/;

#include "sdm845-sony-xperia-tama.dtsi"

/* XZ3 uses an Atmel touchscreen instead. */
/delete-node/ &touchscreen;

/ {
	model = "Sony Xperia XZ3";
	compatible = "sony,akatsuki-row", "qcom,sdm845";

	/* Fixed DCDC for the OLED panel */
	ts_vddio_supply: ts-vddio-regulator {
		compatible = "regulator-fixed";
		regulator-name = "ts_vddio";

		regulator-min-microvolt = <1840000>;
		regulator-max-microvolt = <1840000>;

		gpio = <&tlmm 133 GPIO_ACTIVE_HIGH>;
		enable-active-high;
		regulator-boot-on;
	};
};

&ibb {
	status = "disabled";
};

&lab {
	status = "disabled";
};

&panel {
	/* Akatsuki uses an OLED panel. */
	/delete-property/ backlight;
	/delete-property/ vsp-supply;
	/delete-property/ vsn-supply;
	/delete-property/ touch-reset-gpios;
};

&pmi8998_wled {
	status = "disabled";
};

&tlmm {
	ts_vddio_en: ts-vddio-en-state {
		pins = "gpio133";
		function = "gpio";
		drive-strength = <2>;
		bias-disable;
		output-high;
	};
};

&vreg_l14a_1p8 {
	regulator-min-microvolt = <1840000>;
	regulator-max-microvolt = <1840000>;
};

&vreg_l22a_2p8 {
	/* Note: Round-down from 2700000 to be a multiple of PLDO step-size 8000 */
	regulator-min-microvolt = <2696000>;
	regulator-max-microvolt = <2696000>;
};

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