devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] ARM64: dts: meson-axg: i2c clean-up
@ 2018-05-16 15:52 Jerome Brunet
  2018-05-16 15:52 ` [PATCH 1/2] ARM64: dts: meson-axg: clean-up i2c nodes Jerome Brunet
  2018-05-16 15:52 ` [PATCH 2/2] ARM64: dts: meson-axg: remove incorrect i2c ao clock Jerome Brunet
  0 siblings, 2 replies; 4+ messages in thread
From: Jerome Brunet @ 2018-05-16 15:52 UTC (permalink / raw)
  To: Kevin Hilman, Carlo Caione
  Cc: Jerome Brunet, devicetree, linux-arm-kernel, linux-amlogic, linux-kernel

This patchset fixes a few problems found in the i2c nodes of
amlogic's meson-axg paltform.

Jerome Brunet (2):
  ARM64: dts: meson-axg: clean-up i2c nodes
  ARM64: dts: meson-axg: remove incorrect i2c ao clock

 arch/arm64/boot/dts/amlogic/meson-axg.dtsi | 42 ++++++++++++++----------------
 1 file changed, 19 insertions(+), 23 deletions(-)

-- 
2.14.3

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/2] ARM64: dts: meson-axg: clean-up i2c nodes
  2018-05-16 15:52 [PATCH 0/2] ARM64: dts: meson-axg: i2c clean-up Jerome Brunet
@ 2018-05-16 15:52 ` Jerome Brunet
  2018-05-16 15:52 ` [PATCH 2/2] ARM64: dts: meson-axg: remove incorrect i2c ao clock Jerome Brunet
  1 sibling, 0 replies; 4+ messages in thread
From: Jerome Brunet @ 2018-05-16 15:52 UTC (permalink / raw)
  To: Kevin Hilman, Carlo Caione
  Cc: Jerome Brunet, devicetree, linux-arm-kernel, linux-amlogic, linux-kernel

Remove undocumented and unused "clk_i2c" clock name and second interrupt
from i2c nodes of meson-axg platform

Those seems to have been copy/pasted from the vendor kernel

Fixes: dc6f858e2690 ("ARM64: dts: meson-axg: add I2C DT info for Meson-AXG SoC")
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
---
 arch/arm64/boot/dts/amlogic/meson-axg.dtsi | 37 +++++++++++-------------------
 1 file changed, 14 insertions(+), 23 deletions(-)

diff --git a/arch/arm64/boot/dts/amlogic/meson-axg.dtsi b/arch/arm64/boot/dts/amlogic/meson-axg.dtsi
index 381bd2c707a7..b59f341104d7 100644
--- a/arch/arm64/boot/dts/amlogic/meson-axg.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-axg.dtsi
@@ -214,50 +214,42 @@
 
 			i2c0: i2c@1f000 {
 				compatible = "amlogic,meson-axg-i2c";
-				status = "disabled";
 				reg = <0x0 0x1f000 0x0 0x20>;
-				interrupts = <GIC_SPI 21 IRQ_TYPE_EDGE_RISING>,
-					<GIC_SPI 47 IRQ_TYPE_EDGE_RISING>;
+				interrupts = <GIC_SPI 21 IRQ_TYPE_EDGE_RISING>;
+				clocks = <&clkc CLKID_I2C>;
 				#address-cells = <1>;
 				#size-cells = <0>;
-				clocks = <&clkc CLKID_I2C>;
-				clock-names = "clk_i2c";
+				status = "disabled";
 			};
 
 			i2c1: i2c@1e000 {
 				compatible = "amlogic,meson-axg-i2c";
+				reg = <0x0 0x1e000 0x0 0x20>;
+				interrupts = <GIC_SPI 214 IRQ_TYPE_EDGE_RISING>;
+				clocks = <&clkc CLKID_I2C>;
 				#address-cells = <1>;
 				#size-cells = <0>;
-				reg = <0x0 0x1e000 0x0 0x20>;
 				status = "disabled";
-				interrupts = <GIC_SPI 214 IRQ_TYPE_EDGE_RISING>,
-					<GIC_SPI 48 IRQ_TYPE_EDGE_RISING>;
-				clocks = <&clkc CLKID_I2C>;
-				clock-names = "clk_i2c";
 			};
 
 			i2c2: i2c@1d000 {
 				compatible = "amlogic,meson-axg-i2c";
-				status = "disabled";
 				reg = <0x0 0x1d000 0x0 0x20>;
-				interrupts = <GIC_SPI 215 IRQ_TYPE_EDGE_RISING>,
-					<GIC_SPI 49 IRQ_TYPE_EDGE_RISING>;
+				interrupts = <GIC_SPI 215 IRQ_TYPE_EDGE_RISING>;
+				clocks = <&clkc CLKID_I2C>;
 				#address-cells = <1>;
 				#size-cells = <0>;
-				clocks = <&clkc CLKID_I2C>;
-				clock-names = "clk_i2c";
+				status = "disabled";
 			};
 
 			i2c3: i2c@1c000 {
 				compatible = "amlogic,meson-axg-i2c";
-				status = "disabled";
 				reg = <0x0 0x1c000 0x0 0x20>;
-				interrupts = <GIC_SPI 39 IRQ_TYPE_EDGE_RISING>,
-					<GIC_SPI 50 IRQ_TYPE_EDGE_RISING>;
+				interrupts = <GIC_SPI 39 IRQ_TYPE_EDGE_RISING>;
+				clocks = <&clkc CLKID_I2C>;
 				#address-cells = <1>;
 				#size-cells = <0>;
-				clocks = <&clkc CLKID_I2C>;
-				clock-names = "clk_i2c";
+				status = "disabled";
 			};
 
 			uart_A: serial@24000 {
@@ -1116,13 +1108,12 @@
 
 			i2c_AO: i2c@5000 {
 				compatible = "amlogic,meson-axg-i2c";
-				status = "disabled";
 				reg = <0x0 0x05000 0x0 0x20>;
 				interrupts = <GIC_SPI 195 IRQ_TYPE_EDGE_RISING>;
+				clocks = <&clkc CLKID_I2C>;
 				#address-cells = <1>;
 				#size-cells = <0>;
-				clocks = <&clkc CLKID_I2C>;
-				clock-names = "clk_i2c";
+				status = "disabled";
 			};
 
 			uart_AO: serial@3000 {
-- 
2.14.3

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] ARM64: dts: meson-axg: remove incorrect i2c ao clock
  2018-05-16 15:52 [PATCH 0/2] ARM64: dts: meson-axg: i2c clean-up Jerome Brunet
  2018-05-16 15:52 ` [PATCH 1/2] ARM64: dts: meson-axg: clean-up i2c nodes Jerome Brunet
@ 2018-05-16 15:52 ` Jerome Brunet
  2018-05-16 16:27   ` Jerome Brunet
  1 sibling, 1 reply; 4+ messages in thread
From: Jerome Brunet @ 2018-05-16 15:52 UTC (permalink / raw)
  To: Kevin Hilman, Carlo Caione
  Cc: Jerome Brunet, devicetree, linux-arm-kernel, linux-amlogic, linux-kernel

The clock specified for the i2c AO controller is the one from
the EE domain, which is incorrect as this controller needs the
clock from AO clock controller.

Replace with xtal to avoid claiming an unrelated gate until the
required clock controller becomes available.

Fixes: dc6f858e2690 ("ARM64: dts: meson-axg: add I2C DT info for Meson-AXG SoC")
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
---
 arch/arm64/boot/dts/amlogic/meson-axg.dtsi | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/amlogic/meson-axg.dtsi b/arch/arm64/boot/dts/amlogic/meson-axg.dtsi
index b59f341104d7..b82b9d79ec49 100644
--- a/arch/arm64/boot/dts/amlogic/meson-axg.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-axg.dtsi
@@ -1110,7 +1110,12 @@
 				compatible = "amlogic,meson-axg-i2c";
 				reg = <0x0 0x05000 0x0 0x20>;
 				interrupts = <GIC_SPI 195 IRQ_TYPE_EDGE_RISING>;
-				clocks = <&clkc CLKID_I2C>;
+
+				/*
+				 * FIXME: replace with the correct clock when
+				 * the controller is available
+				 */
+				clocks = <&xtal>;
 				#address-cells = <1>;
 				#size-cells = <0>;
 				status = "disabled";
-- 
2.14.3

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 2/2] ARM64: dts: meson-axg: remove incorrect i2c ao clock
  2018-05-16 15:52 ` [PATCH 2/2] ARM64: dts: meson-axg: remove incorrect i2c ao clock Jerome Brunet
@ 2018-05-16 16:27   ` Jerome Brunet
  0 siblings, 0 replies; 4+ messages in thread
From: Jerome Brunet @ 2018-05-16 16:27 UTC (permalink / raw)
  To: Kevin Hilman, Carlo Caione
  Cc: devicetree, linux-arm-kernel, linux-amlogic, linux-kernel

On Wed, 2018-05-16 at 17:52 +0200, Jerome Brunet wrote:
> The clock specified for the i2c AO controller is the one from
> the EE domain, which is incorrect as this controller needs the
> clock from AO clock controller.
> 
> Replace with xtal to avoid claiming an unrelated gate until the
> required clock controller becomes available.

I wrongly assumed the gate was provided by the clkc from AO domain.
Looking at what we did for the GX series, it seems to be provided by the EE
controller with CLKID_AO_I2C.

I'll send a v2 fixing this.
Sorry for the noise

> 
> Fixes: dc6f858e2690 ("ARM64: dts: meson-axg: add I2C DT info for Meson-AXG SoC")
> Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
> ---
>  arch/arm64/boot/dts/amlogic/meson-axg.dtsi | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm64/boot/dts/amlogic/meson-axg.dtsi b/arch/arm64/boot/dts/amlogic/meson-axg.dtsi
> index b59f341104d7..b82b9d79ec49 100644
> --- a/arch/arm64/boot/dts/amlogic/meson-axg.dtsi
> +++ b/arch/arm64/boot/dts/amlogic/meson-axg.dtsi
> @@ -1110,7 +1110,12 @@
>  				compatible = "amlogic,meson-axg-i2c";
>  				reg = <0x0 0x05000 0x0 0x20>;
>  				interrupts = <GIC_SPI 195 IRQ_TYPE_EDGE_RISING>;
> -				clocks = <&clkc CLKID_I2C>;
> +
> +				/*
> +				 * FIXME: replace with the correct clock when
> +				 * the controller is available
> +				 */
> +				clocks = <&xtal>;
>  				#address-cells = <1>;
>  				#size-cells = <0>;
>  				status = "disabled";

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-05-16 16:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-16 15:52 [PATCH 0/2] ARM64: dts: meson-axg: i2c clean-up Jerome Brunet
2018-05-16 15:52 ` [PATCH 1/2] ARM64: dts: meson-axg: clean-up i2c nodes Jerome Brunet
2018-05-16 15:52 ` [PATCH 2/2] ARM64: dts: meson-axg: remove incorrect i2c ao clock Jerome Brunet
2018-05-16 16:27   ` Jerome Brunet

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