devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Macpaul Lin <macpaul.lin@mediatek.com>
To: Alexandre Mergnat <amergnat@baylibre.com>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	AngeloGioacchino Del Regno 
	<angelogioacchino.delregno@collabora.com>,
	Fabien Parent <fparent@baylibre.com>,
	Macpaul Lin <macpaul.lin@mediatek.com>,
	<devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-mediatek@lists.infradead.org>
Cc: Bear Wang <bear.wang@mediatek.com>,
	Pablo Sun <pablo.sun@mediatek.com>,
	Macpaul Lin <macpaul@gmail.com>,
	Chunfeng Yun <chunfeng.yun@mediatek.com>
Subject: [PATCH v2 3/4] arm64: dts: mediatek: mt6360: add PMIC MT6360 related nodes
Date: Wed, 30 Aug 2023 19:15:31 +0800	[thread overview]
Message-ID: <20230830111532.9048-3-macpaul.lin@mediatek.com> (raw)
In-Reply-To: <20230830111532.9048-1-macpaul.lin@mediatek.com>

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 <macpaul.lin@mediatek.com>
---
 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


  parent reply	other threads:[~2023-08-30 18:34 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-25 11:46 [PATCH 1/4] arm64: dts: mediatek: mt8195-demo: fix the memory size to 8GB Macpaul Lin
2023-08-25 11:46 ` [PATCH 2/4] arm64: dts: mediatek: mt8195-demo: update and reorder reserved memory regions Macpaul Lin
2023-08-25 11:46 ` [PATCH 3/4] arm64: dts: mediatek: mt6360: add PMIC MT6360 related nodes Macpaul Lin
2023-08-28  4:36   ` Chen-Yu Tsai
2023-08-28  9:59     ` Macpaul Lin
2023-08-28 10:51       ` Chen-Yu Tsai
2023-08-30 11:10         ` Macpaul Lin
2023-08-25 11:46 ` [PATCH 4/4] arm64: dts: mediatek: mt8195-demo: simplify mt6360 nodes Macpaul Lin
2023-08-30 11:15 ` [PATCH v2 1/4] arm64: dts: mediatek: mt8195-demo: fix the memory size to 8GB Macpaul Lin
2023-08-30 11:15   ` [PATCH v2 2/4] arm64: dts: mediatek: mt8195-demo: update and reorder reserved memory regions Macpaul Lin
2023-08-30 11:15   ` Macpaul Lin [this message]
2023-08-30 11:20     ` [PATCH v2 3/4] arm64: dts: mediatek: mt6360: add PMIC MT6360 related nodes Krzysztof Kozlowski
2023-08-31  5:32       ` Macpaul Lin
2023-08-30 11:15   ` [PATCH v2 4/4] arm64: dts: mediatek: mt8195-demo: simplify mt6360 nodes Macpaul Lin
2023-08-30 11:30     ` Krzysztof Kozlowski
2023-08-31  4:06       ` Macpaul Lin
2023-09-05  3:45 ` [PATCH v3 1/2] arm64: dts: mediatek: mt8195-demo: fix the memory size to 8GB Macpaul Lin
2023-09-05  3:45   ` [PATCH v3 2/2] arm64: dts: mediatek: mt8195-demo: update and reorder reserved memory regions Macpaul Lin
2023-09-05  8:01     ` AngeloGioacchino Del Regno
2023-09-05  8:00   ` [PATCH v3 1/2] arm64: dts: mediatek: mt8195-demo: fix the memory size to 8GB AngeloGioacchino Del Regno
2023-09-05  8:15     ` Macpaul Lin
2023-09-07  9:15   ` AngeloGioacchino Del Regno

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230830111532.9048-3-macpaul.lin@mediatek.com \
    --to=macpaul.lin@mediatek.com \
    --cc=amergnat@baylibre.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=bear.wang@mediatek.com \
    --cc=chunfeng.yun@mediatek.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=fparent@baylibre.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=macpaul@gmail.com \
    --cc=matthias.bgg@gmail.com \
    --cc=pablo.sun@mediatek.com \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).