2023-08-30 18:53:14

by Macpaul Lin

[permalink] [raw]
Subject: [PATCH v2 3/4] arm64: dts: mediatek: mt6360: add PMIC MT6360 related nodes

MT6360 is the secondary PMIC for MT8195.
It supports USB Type-C and PD functions.
Add MT6360 related common nodes which is used for MT8195 platform, includes
- charger
- ADC
- LED
- regulators

Signed-off-by: Macpaul Lin <[email protected]>
---
arch/arm64/boot/dts/mediatek/mt6360.dtsi | 85 ++++++++++++++++++++++++
1 file changed, 85 insertions(+)
create mode 100644 arch/arm64/boot/dts/mediatek/mt6360.dtsi

Change for v2:
- Remove the following properties according to Chen-Yu Tsai's suggestion
- regulator-name
- regulator-min-microvolt
- regulator-max-microvolt

diff --git a/arch/arm64/boot/dts/mediatek/mt6360.dtsi b/arch/arm64/boot/dts/mediatek/mt6360.dtsi
new file mode 100644
index 000000000000..a89fd43d0f1f
--- /dev/null
+++ b/arch/arm64/boot/dts/mediatek/mt6360.dtsi
@@ -0,0 +1,85 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright (C) 2023 MediaTek Inc.
+ */
+
+#include <dt-bindings/regulator/mediatek,mt6360-regulator.h>
+
+&mt6360 {
+ interrupt-controller;
+ interrupt-parent = <&pio>;
+ interrupt-names = "IRQB";
+
+ charger {
+ compatible = "mediatek,mt6360-chg";
+ richtek,vinovp-microvolt = <14500000>;
+
+ otg_vbus_regulator: usb-otg-vbus-regulator {
+ regulator-compatible = "usb-otg-vbus";
+ };
+ };
+
+ adc {
+ compatible = "mediatek,mt6360-adc";
+ #io-channel-cells = <1>;
+ };
+
+ led {
+ compatible = "mediatek,mt6360-led";
+ };
+
+ regulator {
+ compatible = "mediatek,mt6360-regulator";
+ LDO_VIN3-supply = <&mt6360_emi_vddq_buck2_reg>;
+
+ mt6360_emi_vdd2_buck1_reg: buck1-emi-vdd2 {
+ regulator-compatible = "BUCK1";
+ regulator-allowed-modes = <MT6360_OPMODE_NORMAL
+ MT6360_OPMODE_LP
+ MT6360_OPMODE_ULP>;
+ };
+
+ mt6360_emi_vddq_buck2_reg: buck2-emi-vddq {
+ regulator-compatible = "BUCK2";
+ regulator-allowed-modes = <MT6360_OPMODE_NORMAL
+ MT6360_OPMODE_LP
+ MT6360_OPMODE_ULP>;
+ };
+
+ mt6360_tp1_p3v0_ldo1_reg: ldo1-tp1-p3v0 {
+ regulator-compatible = "LDO1";
+ regulator-allowed-modes = <MT6360_OPMODE_NORMAL
+ MT6360_OPMODE_LP>;
+ };
+
+ mt6360_panel1_p1v8_ldo2_reg: ldo2-panel1-p1v8 {
+ regulator-compatible = "LDO2";
+ regulator-allowed-modes = <MT6360_OPMODE_NORMAL
+ MT6360_OPMODE_LP>;
+ };
+
+ mt6360_vmc_pmu_ldo3_reg: ldo3-vmc-pmu {
+ regulator-compatible = "LDO3";
+ regulator-allowed-modes = <MT6360_OPMODE_NORMAL
+ MT6360_OPMODE_LP>;
+ };
+
+ mt6360_vmch_pmu_ldo5_reg: ldo5-vmch-pmu {
+ regulator-compatible = "LDO5";
+ regulator-allowed-modes = <MT6360_OPMODE_NORMAL
+ MT6360_OPMODE_LP>;
+ };
+
+ mt6360_ldo6_reg: ldo6-mt6360 {
+ regulator-compatible = "LDO6";
+ regulator-allowed-modes = <MT6360_OPMODE_NORMAL
+ MT6360_OPMODE_LP>;
+ };
+
+ mt6360_emi_vmddr_en_ldo7_reg: ldo7-emi-vmddr-en {
+ regulator-compatible = "LDO7";
+ regulator-allowed-modes = <MT6360_OPMODE_NORMAL
+ MT6360_OPMODE_LP>;
+ };
+ };
+};
--
2.18.0