From ade06a4c33bbf72db9ea3806c7e9dc3951b56518 Mon Sep 17 00:00:00 2001
From: Phil Elwell <phil@raspberrypi.com>
Date: Mon, 27 Jan 2025 14:17:46 +0000
Subject: [PATCH] overlays: Regularisation and improvements

A few small improvements, with a view to making the updated overlays
behave the same before and after the big conversion.

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
---
 arch/arm/boot/dts/overlays/ads1115-overlay.dts       | 3 ++-
 arch/arm/boot/dts/overlays/i2c-fan-overlay.dts       | 4 ++--
 arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts       | 3 ++-
 arch/arm/boot/dts/overlays/i2c-sensor-overlay.dts    | 3 ++-
 arch/arm/boot/dts/overlays/mcp23017-overlay.dts      | 3 ++-
 arch/arm/boot/dts/overlays/pca953x-overlay.dts       | 2 --
 arch/arm/boot/dts/overlays/pcf857x-overlay.dts       | 2 +-
 arch/arm/boot/dts/overlays/sc16is750-i2c-overlay.dts | 2 +-
 arch/arm/boot/dts/overlays/sc16is752-i2c-overlay.dts | 2 +-
 9 files changed, 13 insertions(+), 11 deletions(-)

--- a/arch/arm/boot/dts/overlays/ads1115-overlay.dts
+++ b/arch/arm/boot/dts/overlays/ads1115-overlay.dts
@@ -120,7 +120,8 @@
 		chd_cfg =         <&channel_d>,"reg:0";
 		chd_gain =        <&channel_d>,"ti,gain:0";
 		chd_datarate =    <&channel_d>,"ti,datarate:0";
-		i2c0 = <&frag100>, "target:0=",<&i2c0>;
+		i2c0 = <&frag100>, "target:0=",<&i2c0>,
+			      <0>,"+101+102";
 		i2c_csi_dsi = <&frag100>, "target:0=",<&i2c_csi_dsi>,
 			      <0>,"+101+102";
 		i2c_csi_dsi0 = <&frag100>, "target:0=",<&i2c_csi_dsi0>,
--- a/arch/arm/boot/dts/overlays/i2c-fan-overlay.dts
+++ b/arch/arm/boot/dts/overlays/i2c-fan-overlay.dts
@@ -17,7 +17,6 @@
 			emc2301: emc2301@2f {
 				compatible = "microchip,emc2301";
 				reg = <0x2f>;
-				status = "okay";
 				#cooling-cells = <0x02>;
 			};
 		};
@@ -82,7 +81,8 @@
 	};
 
 	__overrides__ {
-		i2c0 =		<&frag100>,"target:0=",<&i2c0>;
+		i2c0 =		<&frag100>,"target:0=",<&i2c0>,
+				<0>,"+101+102";
 		i2c_csi_dsi =	<&frag100>,"target:0=",<&i2c_csi_dsi>,
 				<0>,"+101+102";
 		i2c_csi_dsi0 = <&frag100>, "target:0=",<&i2c_csi_dsi0>,
--- a/arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts
+++ b/arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts
@@ -27,7 +27,8 @@
 	};
 
 	__overrides__ {
-		i2c0 = <&frag100>, "target:0=",<&i2c0>;
+		i2c0 = <&frag100>, "target:0=",<&i2c0>,
+			      <0>,"+101+102";
 		i2c_csi_dsi = <&frag100>, "target:0=",<&i2c_csi_dsi>,
 			      <0>,"+101+102";
 		i2c_csi_dsi0 = <&frag100>, "target:0=",<&i2c_csi_dsi0>,
--- a/arch/arm/boot/dts/overlays/i2c-sensor-overlay.dts
+++ b/arch/arm/boot/dts/overlays/i2c-sensor-overlay.dts
@@ -27,7 +27,8 @@
 	};
 
 	__overrides__ {
-		i2c0 = <&frag100>, "target:0=",<&i2c0>;
+		i2c0 = <&frag100>, "target:0=",<&i2c0>,
+			      <0>,"+101+102";
 		i2c_csi_dsi = <&frag100>, "target:0=",<&i2c_csi_dsi>,
 			      <0>,"+101+102";
 		i2c_csi_dsi0 = <&frag100>, "target:0=",<&i2c_csi_dsi0>,
--- a/arch/arm/boot/dts/overlays/mcp23017-overlay.dts
+++ b/arch/arm/boot/dts/overlays/mcp23017-overlay.dts
@@ -87,7 +87,8 @@
 		addr = <&mcp23017>,"reg:0", <&mcp23017_pins>,"reg:0";
 		mcp23008 = <0>,"=2";
 		noints = <0>,"!1!3";
-		i2c0 = <&frag100>, "target:0=",<&i2c0>;
+		i2c0 = <&frag100>, "target:0=",<&i2c0>,
+			      <0>,"+101+102";
 		i2c_csi_dsi = <&frag100>, "target:0=",<&i2c_csi_dsi>,
 			      <0>,"+101+102";
 		i2c_csi_dsi0 = <&frag100>, "target:0=",<&i2c_csi_dsi0>,
--- a/arch/arm/boot/dts/overlays/pca953x-overlay.dts
+++ b/arch/arm/boot/dts/overlays/pca953x-overlay.dts
@@ -17,8 +17,6 @@
 				reg = <0x20>;
 				gpio-controller;
 				#gpio-cells = <2>;
-
-				status = "okay";
 			};
 		};
 	};
--- a/arch/arm/boot/dts/overlays/pcf857x-overlay.dts
+++ b/arch/arm/boot/dts/overlays/pcf857x-overlay.dts
@@ -11,13 +11,13 @@
 		__overlay__ {
 			#address-cells = <1>;
 			#size-cells = <0>;
+			status = "okay";
 
 			pcf857x: pcf857x@0 {
 				compatible = "";
 				reg = <0x00>;
 				gpio-controller;
 				#gpio-cells = <2>;
-				status = "okay";
 			};
 		};
 	};
--- a/arch/arm/boot/dts/overlays/sc16is750-i2c-overlay.dts
+++ b/arch/arm/boot/dts/overlays/sc16is750-i2c-overlay.dts
@@ -27,7 +27,7 @@
 	};
 
 	fragment@1 {
-		target-path = "/";
+		target = <&clocks>;
 		__overlay__ {
 			sc16is750_clk: sc16is750_i2c_clk@48 {
 				compatible = "fixed-clock";
--- a/arch/arm/boot/dts/overlays/sc16is752-i2c-overlay.dts
+++ b/arch/arm/boot/dts/overlays/sc16is752-i2c-overlay.dts
@@ -27,7 +27,7 @@
 	};
 
 	fragment@1 {
-		target-path = "/";
+		target = <&clocks>;
 		__overlay__ {
 			sc16is752_clk: sc16is752_i2c_clk@48 {
 				compatible = "fixed-clock";
