diff mbox series

[v2,13/18] arm64: dts: mediatek: mt7988: add i2c to bpi-r4 board

Message ID 20241202122602.30734-14-linux@fw-web.de (mailing list archive)
State New
Headers show
Series continue mt7988 devicetree work | expand

Commit Message

Frank Wunderlich Dec. 2, 2024, 12:25 p.m. UTC
From: Frank Wunderlich <frank-w@public-files.de>

Add basic i2c nodes to bananapi R4 board.

Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
---
 .../boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts    | 12 ++++++++++++
 arch/arm64/boot/dts/mediatek/mt7988a.dtsi            |  6 +++---
 2 files changed, 15 insertions(+), 3 deletions(-)

Comments

AngeloGioacchino Del Regno Dec. 3, 2024, 9:40 a.m. UTC | #1
Il 02/12/24 13:25, Frank Wunderlich ha scritto:
> From: Frank Wunderlich <frank-w@public-files.de>
> 
> Add basic i2c nodes to bananapi R4 board.
> 
> Signed-off-by: Frank Wunderlich <frank-w@public-files.de>

arm64: dts: mediatek: mt7988a-bpi-r4: Enable I2C controllers

Enable the I2C0, I2C2 controllers found on the BananaPi R4 board; these
controllers are accessible at ... I don't know, a header on the board?

After which,

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Frank Wunderlich Dec. 3, 2024, 10:58 a.m. UTC | #2
Am 3. Dezember 2024 10:40:38 MEZ schrieb AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>:
>Il 02/12/24 13:25, Frank Wunderlich ha scritto:
>> From: Frank Wunderlich <frank-w@public-files.de>
>> 
>> Add basic i2c nodes to bananapi R4 board.
>> 
>> Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
>
>arm64: dts: mediatek: mt7988a-bpi-r4: Enable I2C controllers
>
>Enable the I2C0, I2C2 controllers found on the BananaPi R4 board; these
>controllers are accessible at ... I don't know, a header on the board?

These 2 i2c have directly connected spare devices (pmic on i2c0 and i2c-mux on i2c2 added in later commits to have it a bit cleaner). I2c1 is on gpio header which i have not added to let user choose if he wants i2c option or gpio. I can also add i2c1 to r4 board with the right pinctrl but imho it should be disabled to have gpio function default.

>After which,
>
>Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
>
>


regards Frank
AngeloGioacchino Del Regno Dec. 3, 2024, 2:22 p.m. UTC | #3
Il 03/12/24 11:58, Frank Wunderlich ha scritto:
> Am 3. Dezember 2024 10:40:38 MEZ schrieb AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>:
>> Il 02/12/24 13:25, Frank Wunderlich ha scritto:
>>> From: Frank Wunderlich <frank-w@public-files.de>
>>>
>>> Add basic i2c nodes to bananapi R4 board.
>>>
>>> Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
>>
>> arm64: dts: mediatek: mt7988a-bpi-r4: Enable I2C controllers
>>
>> Enable the I2C0, I2C2 controllers found on the BananaPi R4 board; these
>> controllers are accessible at ... I don't know, a header on the board?
> 
> These 2 i2c have directly connected spare devices (pmic on i2c0 and i2c-mux on i2c2 added in later commits to have it a bit cleaner). I2c1 is on gpio header which i have not added to let user choose if he wants i2c option or gpio. I can also add i2c1 to r4 board with the right pinctrl but imho it should be disabled to have gpio function default.

And again, you should really add all that information to the commit description,
as that not only helps me to review your submission, but also helps other people
checking the commit history....!

Cheers

> 
>> After which,
>>
>> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
>>
>>
> 
> 
> regards Frank
Frank Wunderlich Dec. 3, 2024, 3:28 p.m. UTC | #4
Am 2024-12-03 15:22, schrieb AngeloGioacchino Del Regno:
> Il 03/12/24 11:58, Frank Wunderlich ha scritto:
>> Am 3. Dezember 2024 10:40:38 MEZ schrieb AngeloGioacchino Del Regno 
>> <angelogioacchino.delregno@collabora.com>:
>>> Il 02/12/24 13:25, Frank Wunderlich ha scritto:
>>>> From: Frank Wunderlich <frank-w@public-files.de>
>>>> 
>>>> Add basic i2c nodes to bananapi R4 board.
>>>> 
>>>> Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
>>> 
>>> arm64: dts: mediatek: mt7988a-bpi-r4: Enable I2C controllers
>>> 
>>> Enable the I2C0, I2C2 controllers found on the BananaPi R4 board; 
>>> these
>>> controllers are accessible at ... I don't know, a header on the 
>>> board?
>> 
>> These 2 i2c have directly connected spare devices (pmic on i2c0 and 
>> i2c-mux on i2c2 added in later commits to have it a bit cleaner). I2c1 
>> is on gpio header which i have not added to let user choose if he 
>> wants i2c option or gpio. I can also add i2c1 to r4 board with the 
>> right pinctrl but imho it should be disabled to have gpio function 
>> default.
> 
> And again, you should really add all that information to the commit 
> description,
> as that not only helps me to review your submission, but also helps 
> other people
> checking the commit history....!

this ine i would rephrase like this

     arm64: dts: mediatek: mt7988a-bpi-r4: Enable I2C controllers

     Enable the I2C0, I2C2 controllers found on the BananaPi R4 board.
     Both controllers are not accessible from user and having fixed spare
     devices. I2C0 have a pmic connected, I2C2 is used with 
I2C-multiplexer
     for e.g. SFP cages.
     The missing I2C1 is connected to GPIO header which can have either 
GPIO
     mode or I2C mode.


> Cheers
> 
>> 
>>> After which,
>>> 
>>> Reviewed-by: AngeloGioacchino Del Regno 
>>> <angelogioacchino.delregno@collabora.com>
>>> 
>>> 
>> 
>> 
>> regards Frank
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts b/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts
index 1c2a806f6f6c..13ca016d6a67 100644
--- a/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts
+++ b/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts
@@ -61,6 +61,18 @@  cpu_trip_active_low: active-low {
 	};
 };
 
+&i2c0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c0_pins>;
+	status = "okay";
+};
+
+&i2c2 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c2_1_pins>;
+	status = "okay";
+};
+
 &pio {
 	mdio0_pins: mdio0-pins {
 		mux {
diff --git a/arch/arm64/boot/dts/mediatek/mt7988a.dtsi b/arch/arm64/boot/dts/mediatek/mt7988a.dtsi
index 956f2be600a2..eebbdfe55774 100644
--- a/arch/arm64/boot/dts/mediatek/mt7988a.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt7988a.dtsi
@@ -269,7 +269,7 @@  serial@11000200 {
 			status = "disabled";
 		};
 
-		i2c@11003000 {
+		i2c0: i2c@11003000 {
 			compatible = "mediatek,mt7981-i2c";
 			reg = <0 0x11003000 0 0x1000>,
 			      <0 0x10217080 0 0x80>;
@@ -283,7 +283,7 @@  i2c@11003000 {
 			status = "disabled";
 		};
 
-		i2c@11004000 {
+		i2c1: i2c@11004000 {
 			compatible = "mediatek,mt7981-i2c";
 			reg = <0 0x11004000 0 0x1000>,
 			      <0 0x10217100 0 0x80>;
@@ -297,7 +297,7 @@  i2c@11004000 {
 			status = "disabled";
 		};
 
-		i2c@11005000 {
+		i2c2: i2c@11005000 {
 			compatible = "mediatek,mt7981-i2c";
 			reg = <0 0x11005000 0 0x1000>,
 			      <0 0x10217180 0 0x80>;