linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] RFC: powerpc: wii.dts: Fix up GPIO I2C bus
@ 2022-03-03 15:50 Linus Walleij
  0 siblings, 0 replies; only message in thread
From: Linus Walleij @ 2022-03-03 15:50 UTC (permalink / raw)
  To: Michael Ellerman, Benjamin Herrenschmidt, Paul Mackerras
  Cc: Alexandre Belloni, Emmanuel Gil Peyrot, Albert Herranz,
	Jonathan Neuschäfer, linuxppc-dev, Linus Walleij

This portion of the device tree just looks weird to me.
We have a standard way of doing I2C-over-GPIO and it is
a separate device tree node outside of the SoC node, not
inside the GPIO node.

Cc: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
Cc: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Cc: Albert Herranz <albert_herranz@yahoo.es>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 arch/powerpc/boot/dts/wii.dts | 43 ++++++++++++++---------------------
 1 file changed, 17 insertions(+), 26 deletions(-)

diff --git a/arch/powerpc/boot/dts/wii.dts b/arch/powerpc/boot/dts/wii.dts
index e46143c32308..2e51100d2dab 100644
--- a/arch/powerpc/boot/dts/wii.dts
+++ b/arch/powerpc/boot/dts/wii.dts
@@ -192,31 +192,6 @@ GPIO: gpio@d8000c0 {
 			#interrupt-cells = <2>;
 			interrupts = <10>;
 			interrupt-parent = <&PIC1>;
-
-			/*
-			 * This is commented out while a standard binding
-			 * for i2c over gpio is defined.
-			 */
-			/*
-			i2c-video {
-				#address-cells = <1>;
-				#size-cells = <0>;
-			        compatible = "i2c-gpio";
-
-			        gpios = <&GPIO 15 0
-			                 &GPIO 14 0>;
-			        clock-frequency = <250000>;
-				no-clock-stretching;
-			        scl-is-open-drain;
-			        sda-is-open-drain;
-			        sda-enforce-dir;
-
-			        AVE: audio-video-encoder@70 {
-			                compatible = "nintendo,wii-audio-video-encoder";
-			                reg = <0x70>;
-			        };
-			};
-			*/
 		};
 
 		control@d800100 {
@@ -268,5 +243,21 @@ eject {
 			linux,code = <KEY_EJECTCD>;
 		};
 	};
-};
 
+	i2c-video {
+		#address-cells = <1>;
+		#size-cells = <0>;
+		compatible = "i2c-gpio";
+
+		sda-gpios = <&GPIO 15 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
+		scl-gpios = <&GPIO 14 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
+		clock-frequency = <250000>;
+		no-clock-stretching;
+		sda-enforce-dir;
+
+		AVE: audio-video-encoder@70 {
+			compatible = "nintendo,wii-audio-video-encoder";
+			reg = <0x70>;
+		};
+	};
+};
-- 
2.35.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2022-03-03 15:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-03 15:50 [PATCH] RFC: powerpc: wii.dts: Fix up GPIO I2C bus Linus Walleij

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).