[PATCH 04/15] arm64: dts: mediatek: radxa-nio-12l: Add external MT6360 PMIC on I2C6

AngeloGioacchino Del Regno posted 15 patches 10 months ago
There is a newer version of this series
[PATCH 04/15] arm64: dts: mediatek: radxa-nio-12l: Add external MT6360 PMIC on I2C6
Posted by AngeloGioacchino Del Regno 10 months ago
In preparation for adding the power tree for this board, add a node for
the MT6360 PMIC, connected to I2C6.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
---
 .../dts/mediatek/mt8395-radxa-nio-12l.dts     | 20 ++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/mediatek/mt8395-radxa-nio-12l.dts b/arch/arm64/boot/dts/mediatek/mt8395-radxa-nio-12l.dts
index 79358e1a3e60..281847b8f022 100644
--- a/arch/arm64/boot/dts/mediatek/mt8395-radxa-nio-12l.dts
+++ b/arch/arm64/boot/dts/mediatek/mt8395-radxa-nio-12l.dts
@@ -8,6 +8,7 @@
  */
 
 #include "mt8195.dtsi"
+#include <dt-bindings/interrupt-controller/irq.h>
 #include <dt-bindings/pinctrl/mt8195-pinfunc.h>
 
 / {
@@ -109,7 +110,15 @@ &i2c6 {
 	pinctrl-names = "default";
 	status = "okay";
 
-	/* MT6360 PMIC at 0x34 */
+	mt6360: pmic@34 {
+		compatible = "mediatek,mt6360";
+		reg = <0x34>;
+		interrupts-extended = <&pio 101 IRQ_TYPE_EDGE_FALLING>;
+		interrupt-names = "IRQB";
+		interrupt-controller;
+		#interrupt-cells = <1>;
+		pinctrl-0 = <&mt6360_pins>;
+	};
 };
 
 &pio {
@@ -140,6 +149,15 @@ pins {
 		};
 	};
 
+	mt6360_pins: mt6360-pins {
+		pins-irq {
+			pinmux = <PINMUX_GPIO100__FUNC_GPIO100>,
+				 <PINMUX_GPIO101__FUNC_GPIO101>;
+			input-enable;
+			bias-pull-up;
+		};
+	};
+
 	uart0_pins: uart0-pins {
 		pins-bus {
 			pinmux = <PINMUX_GPIO98__FUNC_UTXD0>,
-- 
2.43.0
Re: [PATCH 04/15] arm64: dts: mediatek: radxa-nio-12l: Add external MT6360 PMIC on I2C6
Posted by Krzysztof Kozlowski 10 months ago
On 12/01/2024 10:46, AngeloGioacchino Del Regno wrote:
> In preparation for adding the power tree for this board, add a node for
> the MT6360 PMIC, connected to I2C6.
> 
> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>

Why do you add new device in pieces? Logical change is "new device", not
"half of device". If the patch is too big, sure, split it into two
chunks, but not 15!


Best regards,
Krzysztof
Re: [PATCH 04/15] arm64: dts: mediatek: radxa-nio-12l: Add external MT6360 PMIC on I2C6
Posted by Matthias Brugger 9 months, 3 weeks ago

On 16/01/2024 09:16, Krzysztof Kozlowski wrote:
> On 12/01/2024 10:46, AngeloGioacchino Del Regno wrote:
>> In preparation for adding the power tree for this board, add a node for
>> the MT6360 PMIC, connected to I2C6.
>>
>> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
> 
> Why do you add new device in pieces? Logical change is "new device", not

Well we have done that in the past, so somehow for MediaTek tree that's ok to 
do. From my personal maintainer position it's easier to review 15 small patches 
then one or two huge ones.

Regards,
Matthias