diff mbox series

[v2,3/4] arm64: dts: mediatek: mt6360: add PMIC MT6360 related nodes

Message ID 20230830111532.9048-3-macpaul.lin@mediatek.com
State New
Headers show
Series [v2,1/4] arm64: dts: mediatek: mt8195-demo: fix the memory size to 8GB | expand

Commit Message

Macpaul Lin Aug. 30, 2023, 11:15 a.m. UTC
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

Comments

Krzysztof Kozlowski Aug. 30, 2023, 11:20 a.m. UTC | #1
On 30/08/2023 13:15, Macpaul Lin wrote:
> +
> +	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 {

It does not look like you tested the DTS against bindings. Please run
`make dtbs_check W=1` (see
Documentation/devicetree/bindings/writing-schema.rst or
https://www.linaro.org/blog/tips-and-tricks-for-validating-devicetree-sources-with-the-devicetree-schema/
for instructions).

Best regards,
Krzysztof
diff mbox series

Patch

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>;
+		};
+	};
+};