All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] ARM: dts: Configure interconnect target module for am4 qspi
@ 2019-12-10 21:58 Tony Lindgren
  2019-12-10 21:58 ` [PATCH 2/2] ARM: OMAP2+: Drop legacy platform data " Tony Lindgren
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Tony Lindgren @ 2019-12-10 21:58 UTC (permalink / raw)
  To: linux-omap; +Cc: Benoît Cousson, devicetree, Jean Pihet

We can now probe devices with device tree only configuration using
ti-sysc interconnect target module driver. Let's configure the
module, but keep the legacy "ti,hwmods" peroperty to avoid new boot
time warnings. The legacy property will be removed in later patches
together with the legacy platform data.

Cc: Jean Pihet <jean.pihet@newoldbits.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 arch/arm/boot/dts/am4372.dtsi | 38 ++++++++++++++++++++++++++---------
 1 file changed, 28 insertions(+), 10 deletions(-)

diff --git a/arch/arm/boot/dts/am4372.dtsi b/arch/arm/boot/dts/am4372.dtsi
--- a/arch/arm/boot/dts/am4372.dtsi
+++ b/arch/arm/boot/dts/am4372.dtsi
@@ -305,17 +305,35 @@ gpmc: gpmc@50000000 {
 			status = "disabled";
 		};
 
-		qspi: spi@47900000 {
-			compatible = "ti,am4372-qspi";
-			reg = <0x47900000 0x100>,
-			      <0x30000000 0x4000000>;
-			reg-names = "qspi_base", "qspi_mmap";
-			#address-cells = <1>;
-			#size-cells = <0>;
+		target-module@47900000 {
+			compatible = "ti,sysc-omap4", "ti,sysc";
 			ti,hwmods = "qspi";
-			interrupts = <0 138 0x4>;
-			num-cs = <4>;
-			status = "disabled";
+			reg = <0x47900000 0x4>,
+			      <0x47900010 0x4>;
+			reg-names = "rev", "sysc";
+			ti,sysc-sidle = <SYSC_IDLE_FORCE>,
+					<SYSC_IDLE_NO>,
+					<SYSC_IDLE_SMART>,
+					<SYSC_IDLE_SMART_WKUP>;
+			clocks = <&l3s_clkctrl AM4_L3S_QSPI_CLKCTRL 0>;
+			clock-names = "fck";
+			#address-cells = <1>;
+			#size-cells = <1>;
+			ranges = <0x0 0x47900000 0x1000>,
+				 <0x30000000 0x30000000 0x4000000>;
+
+			qspi: spi@0 {
+				compatible = "ti,am4372-qspi";
+				reg = <0 0x100>,
+				      <0x30000000 0x4000000>;
+				reg-names = "qspi_base", "qspi_mmap";
+				clocks = <&dpll_per_m2_div4_ck>;
+				clock-names = "fck";
+				#address-cells = <1>;
+				#size-cells = <0>;
+				interrupts = <0 138 0x4>;
+				num-cs = <4>;
+			};
 		};
 
 		dss: dss@4832a000 {
-- 
2.24.0

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

* [PATCH 2/2] ARM: OMAP2+: Drop legacy platform data for am4 qspi
  2019-12-10 21:58 [PATCH 1/2] ARM: dts: Configure interconnect target module for am4 qspi Tony Lindgren
@ 2019-12-10 21:58 ` Tony Lindgren
  2019-12-11 19:17   ` Jean Pihet
  2019-12-11 19:17 ` [PATCH 1/2] ARM: dts: Configure interconnect target module " Jean Pihet
  2019-12-13  6:16 ` Keerthy
  2 siblings, 1 reply; 5+ messages in thread
From: Tony Lindgren @ 2019-12-10 21:58 UTC (permalink / raw)
  To: linux-omap; +Cc: Benoît Cousson, devicetree, Jean Pihet

We can now probe devices with ti-sysc interconnect driver and dts
data. Let's drop the related platform data and custom ti,hwmods
dts property.

As we're just dropping data, and the early platform data init
is based on the custom ti,hwmods property, we want to drop both
the platform data and ti,hwmods property in a single patch.

Cc: Jean Pihet <jean.pihet@newoldbits.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 arch/arm/boot/dts/am4372.dtsi              |  1 -
 arch/arm/mach-omap2/omap_hwmod_43xx_data.c | 34 ----------------------
 2 files changed, 35 deletions(-)

diff --git a/arch/arm/boot/dts/am4372.dtsi b/arch/arm/boot/dts/am4372.dtsi
--- a/arch/arm/boot/dts/am4372.dtsi
+++ b/arch/arm/boot/dts/am4372.dtsi
@@ -307,7 +307,6 @@ gpmc: gpmc@50000000 {
 
 		target-module@47900000 {
 			compatible = "ti,sysc-omap4", "ti,sysc";
-			ti,hwmods = "qspi";
 			reg = <0x47900000 0x4>,
 			      <0x47900010 0x4>;
 			reg-names = "rev", "sysc";
diff --git a/arch/arm/mach-omap2/omap_hwmod_43xx_data.c b/arch/arm/mach-omap2/omap_hwmod_43xx_data.c
--- a/arch/arm/mach-omap2/omap_hwmod_43xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_43xx_data.c
@@ -315,32 +315,6 @@ static struct omap_hwmod am43xx_usb_otg_ss1_hwmod = {
 	},
 };
 
-static struct omap_hwmod_class_sysconfig am43xx_qspi_sysc = {
-	.rev_offs	= 0,
-	.sysc_offs      = 0x0010,
-	.sysc_flags     = SYSC_HAS_SIDLEMODE,
-	.idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
-				SIDLE_SMART_WKUP),
-	.sysc_fields    = &omap_hwmod_sysc_type2,
-};
-
-static struct omap_hwmod_class am43xx_qspi_hwmod_class = {
-	.name   = "qspi",
-	.sysc   = &am43xx_qspi_sysc,
-};
-
-static struct omap_hwmod am43xx_qspi_hwmod = {
-	.name           = "qspi",
-	.class          = &am43xx_qspi_hwmod_class,
-	.clkdm_name     = "l3s_clkdm",
-	.main_clk       = "l3s_gclk",
-	.prcm = {
-		.omap4 = {
-			.clkctrl_offs = AM43XX_CM_PER_QSPI_CLKCTRL_OFFSET,
-			.modulemode   = MODULEMODE_SWCTRL,
-		},
-	},
-};
 
 /*
  * 'adc/tsc' class
@@ -681,13 +655,6 @@ static struct omap_hwmod_ocp_if am43xx_l3_s__usbotgss1 = {
 	.user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
-static struct omap_hwmod_ocp_if am43xx_l3_s__qspi = {
-	.master         = &am33xx_l3_s_hwmod,
-	.slave          = &am43xx_qspi_hwmod,
-	.clk            = "l3s_gclk",
-	.user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
 static struct omap_hwmod_ocp_if am43xx_dss__l3_main = {
 	.master		= &am43xx_dss_core_hwmod,
 	.slave		= &am33xx_l3_main_hwmod,
@@ -783,7 +750,6 @@ static struct omap_hwmod_ocp_if *am43xx_hwmod_ocp_ifs[] __initdata = {
 	&am43xx_l4_wkup__smartreflex1,
 	&am43xx_l4_wkup__timer1,
 	&am43xx_l4_wkup__adc_tsc,
-	&am43xx_l3_s__qspi,
 	&am33xx_l4_per__dcan0,
 	&am33xx_l4_per__dcan1,
 	&am33xx_l4_ls__timer2,
-- 
2.24.0

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

* Re: [PATCH 1/2] ARM: dts: Configure interconnect target module for am4 qspi
  2019-12-10 21:58 [PATCH 1/2] ARM: dts: Configure interconnect target module for am4 qspi Tony Lindgren
  2019-12-10 21:58 ` [PATCH 2/2] ARM: OMAP2+: Drop legacy platform data " Tony Lindgren
@ 2019-12-11 19:17 ` Jean Pihet
  2019-12-13  6:16 ` Keerthy
  2 siblings, 0 replies; 5+ messages in thread
From: Jean Pihet @ 2019-12-11 19:17 UTC (permalink / raw)
  To: Tony Lindgren; +Cc: linux-omap, Benoît Cousson, devicetree

Hi Tony,

On Tue, Dec 10, 2019 at 10:58 PM Tony Lindgren <tony@atomide.com> wrote:
>
> We can now probe devices with device tree only configuration using
> ti-sysc interconnect target module driver. Let's configure the
> module, but keep the legacy "ti,hwmods" peroperty to avoid new boot
> time warnings. The legacy property will be removed in later patches
> together with the legacy platform data.
>
> Cc: Jean Pihet <jean.pihet@newoldbits.com>
> Signed-off-by: Tony Lindgren <tony@atomide.com>

Tested OK on AM4376 QSPI.
Acked-by: Jean Pihet <jean.pihet@newoldbits.com>

Thanks!
Jean

> ---
>  arch/arm/boot/dts/am4372.dtsi | 38 ++++++++++++++++++++++++++---------
>  1 file changed, 28 insertions(+), 10 deletions(-)
>
> diff --git a/arch/arm/boot/dts/am4372.dtsi b/arch/arm/boot/dts/am4372.dtsi
> --- a/arch/arm/boot/dts/am4372.dtsi
> +++ b/arch/arm/boot/dts/am4372.dtsi
> @@ -305,17 +305,35 @@ gpmc: gpmc@50000000 {
>                         status = "disabled";
>                 };
>
> -               qspi: spi@47900000 {
> -                       compatible = "ti,am4372-qspi";
> -                       reg = <0x47900000 0x100>,
> -                             <0x30000000 0x4000000>;
> -                       reg-names = "qspi_base", "qspi_mmap";
> -                       #address-cells = <1>;
> -                       #size-cells = <0>;
> +               target-module@47900000 {
> +                       compatible = "ti,sysc-omap4", "ti,sysc";
>                         ti,hwmods = "qspi";
> -                       interrupts = <0 138 0x4>;
> -                       num-cs = <4>;
> -                       status = "disabled";
> +                       reg = <0x47900000 0x4>,
> +                             <0x47900010 0x4>;
> +                       reg-names = "rev", "sysc";
> +                       ti,sysc-sidle = <SYSC_IDLE_FORCE>,
> +                                       <SYSC_IDLE_NO>,
> +                                       <SYSC_IDLE_SMART>,
> +                                       <SYSC_IDLE_SMART_WKUP>;
> +                       clocks = <&l3s_clkctrl AM4_L3S_QSPI_CLKCTRL 0>;
> +                       clock-names = "fck";
> +                       #address-cells = <1>;
> +                       #size-cells = <1>;
> +                       ranges = <0x0 0x47900000 0x1000>,
> +                                <0x30000000 0x30000000 0x4000000>;
> +
> +                       qspi: spi@0 {
> +                               compatible = "ti,am4372-qspi";
> +                               reg = <0 0x100>,
> +                                     <0x30000000 0x4000000>;
> +                               reg-names = "qspi_base", "qspi_mmap";
> +                               clocks = <&dpll_per_m2_div4_ck>;
> +                               clock-names = "fck";
> +                               #address-cells = <1>;
> +                               #size-cells = <0>;
> +                               interrupts = <0 138 0x4>;
> +                               num-cs = <4>;
> +                       };
>                 };
>
>                 dss: dss@4832a000 {
> --
> 2.24.0

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

* Re: [PATCH 2/2] ARM: OMAP2+: Drop legacy platform data for am4 qspi
  2019-12-10 21:58 ` [PATCH 2/2] ARM: OMAP2+: Drop legacy platform data " Tony Lindgren
@ 2019-12-11 19:17   ` Jean Pihet
  0 siblings, 0 replies; 5+ messages in thread
From: Jean Pihet @ 2019-12-11 19:17 UTC (permalink / raw)
  To: Tony Lindgren; +Cc: linux-omap, Benoît Cousson, devicetree

Tony,

On Tue, Dec 10, 2019 at 10:58 PM Tony Lindgren <tony@atomide.com> wrote:
>
> We can now probe devices with ti-sysc interconnect driver and dts
> data. Let's drop the related platform data and custom ti,hwmods
> dts property.
>
> As we're just dropping data, and the early platform data init
> is based on the custom ti,hwmods property, we want to drop both
> the platform data and ti,hwmods property in a single patch.

Tested OK on AM4376 QSPI. The correct fck is found and the hwmod
warning is gone.
Acked-by: Jean Pihet <jean.pihet@newoldbits.com>

Thanks!
Jean

>
> Cc: Jean Pihet <jean.pihet@newoldbits.com>
> Signed-off-by: Tony Lindgren <tony@atomide.com>
> ---
>  arch/arm/boot/dts/am4372.dtsi              |  1 -
>  arch/arm/mach-omap2/omap_hwmod_43xx_data.c | 34 ----------------------
>  2 files changed, 35 deletions(-)
>
> diff --git a/arch/arm/boot/dts/am4372.dtsi b/arch/arm/boot/dts/am4372.dtsi
> --- a/arch/arm/boot/dts/am4372.dtsi
> +++ b/arch/arm/boot/dts/am4372.dtsi
> @@ -307,7 +307,6 @@ gpmc: gpmc@50000000 {
>
>                 target-module@47900000 {
>                         compatible = "ti,sysc-omap4", "ti,sysc";
> -                       ti,hwmods = "qspi";
>                         reg = <0x47900000 0x4>,
>                               <0x47900010 0x4>;
>                         reg-names = "rev", "sysc";
> diff --git a/arch/arm/mach-omap2/omap_hwmod_43xx_data.c b/arch/arm/mach-omap2/omap_hwmod_43xx_data.c
> --- a/arch/arm/mach-omap2/omap_hwmod_43xx_data.c
> +++ b/arch/arm/mach-omap2/omap_hwmod_43xx_data.c
> @@ -315,32 +315,6 @@ static struct omap_hwmod am43xx_usb_otg_ss1_hwmod = {
>         },
>  };
>
> -static struct omap_hwmod_class_sysconfig am43xx_qspi_sysc = {
> -       .rev_offs       = 0,
> -       .sysc_offs      = 0x0010,
> -       .sysc_flags     = SYSC_HAS_SIDLEMODE,
> -       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
> -                               SIDLE_SMART_WKUP),
> -       .sysc_fields    = &omap_hwmod_sysc_type2,
> -};
> -
> -static struct omap_hwmod_class am43xx_qspi_hwmod_class = {
> -       .name   = "qspi",
> -       .sysc   = &am43xx_qspi_sysc,
> -};
> -
> -static struct omap_hwmod am43xx_qspi_hwmod = {
> -       .name           = "qspi",
> -       .class          = &am43xx_qspi_hwmod_class,
> -       .clkdm_name     = "l3s_clkdm",
> -       .main_clk       = "l3s_gclk",
> -       .prcm = {
> -               .omap4 = {
> -                       .clkctrl_offs = AM43XX_CM_PER_QSPI_CLKCTRL_OFFSET,
> -                       .modulemode   = MODULEMODE_SWCTRL,
> -               },
> -       },
> -};
>
>  /*
>   * 'adc/tsc' class
> @@ -681,13 +655,6 @@ static struct omap_hwmod_ocp_if am43xx_l3_s__usbotgss1 = {
>         .user           = OCP_USER_MPU | OCP_USER_SDMA,
>  };
>
> -static struct omap_hwmod_ocp_if am43xx_l3_s__qspi = {
> -       .master         = &am33xx_l3_s_hwmod,
> -       .slave          = &am43xx_qspi_hwmod,
> -       .clk            = "l3s_gclk",
> -       .user           = OCP_USER_MPU | OCP_USER_SDMA,
> -};
> -
>  static struct omap_hwmod_ocp_if am43xx_dss__l3_main = {
>         .master         = &am43xx_dss_core_hwmod,
>         .slave          = &am33xx_l3_main_hwmod,
> @@ -783,7 +750,6 @@ static struct omap_hwmod_ocp_if *am43xx_hwmod_ocp_ifs[] __initdata = {
>         &am43xx_l4_wkup__smartreflex1,
>         &am43xx_l4_wkup__timer1,
>         &am43xx_l4_wkup__adc_tsc,
> -       &am43xx_l3_s__qspi,
>         &am33xx_l4_per__dcan0,
>         &am33xx_l4_per__dcan1,
>         &am33xx_l4_ls__timer2,
> --
> 2.24.0

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

* Re: [PATCH 1/2] ARM: dts: Configure interconnect target module for am4 qspi
  2019-12-10 21:58 [PATCH 1/2] ARM: dts: Configure interconnect target module for am4 qspi Tony Lindgren
  2019-12-10 21:58 ` [PATCH 2/2] ARM: OMAP2+: Drop legacy platform data " Tony Lindgren
  2019-12-11 19:17 ` [PATCH 1/2] ARM: dts: Configure interconnect target module " Jean Pihet
@ 2019-12-13  6:16 ` Keerthy
  2 siblings, 0 replies; 5+ messages in thread
From: Keerthy @ 2019-12-13  6:16 UTC (permalink / raw)
  To: Tony Lindgren, linux-omap; +Cc: Benoît Cousson, devicetree, Jean Pihet

[-- Attachment #1: Type: text/plain, Size: 2178 bytes --]



On 11/12/19 3:28 am, Tony Lindgren wrote:
> We can now probe devices with device tree only configuration using
> ti-sysc interconnect target module driver. Let's configure the
> module, but keep the legacy "ti,hwmods" peroperty to avoid new boot
> time warnings. The legacy property will be removed in later patches
> together with the legacy platform data.

Tested-by: Keerthy <j-keerthy@ti.com>

> 
> Cc: Jean Pihet <jean.pihet@newoldbits.com>
> Signed-off-by: Tony Lindgren <tony@atomide.com>
> ---
>  arch/arm/boot/dts/am4372.dtsi | 38 ++++++++++++++++++++++++++---------
>  1 file changed, 28 insertions(+), 10 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/am4372.dtsi b/arch/arm/boot/dts/am4372.dtsi
> --- a/arch/arm/boot/dts/am4372.dtsi
> +++ b/arch/arm/boot/dts/am4372.dtsi
> @@ -305,17 +305,35 @@ gpmc: gpmc@50000000 {
>  			status = "disabled";
>  		};
>  
> -		qspi: spi@47900000 {
> -			compatible = "ti,am4372-qspi";
> -			reg = <0x47900000 0x100>,
> -			      <0x30000000 0x4000000>;
> -			reg-names = "qspi_base", "qspi_mmap";
> -			#address-cells = <1>;
> -			#size-cells = <0>;
> +		target-module@47900000 {
> +			compatible = "ti,sysc-omap4", "ti,sysc";
>  			ti,hwmods = "qspi";
> -			interrupts = <0 138 0x4>;
> -			num-cs = <4>;
> -			status = "disabled";
> +			reg = <0x47900000 0x4>,
> +			      <0x47900010 0x4>;
> +			reg-names = "rev", "sysc";
> +			ti,sysc-sidle = <SYSC_IDLE_FORCE>,
> +					<SYSC_IDLE_NO>,
> +					<SYSC_IDLE_SMART>,
> +					<SYSC_IDLE_SMART_WKUP>;
> +			clocks = <&l3s_clkctrl AM4_L3S_QSPI_CLKCTRL 0>;
> +			clock-names = "fck";
> +			#address-cells = <1>;
> +			#size-cells = <1>;
> +			ranges = <0x0 0x47900000 0x1000>,
> +				 <0x30000000 0x30000000 0x4000000>;
> +
> +			qspi: spi@0 {
> +				compatible = "ti,am4372-qspi";
> +				reg = <0 0x100>,
> +				      <0x30000000 0x4000000>;
> +				reg-names = "qspi_base", "qspi_mmap";
> +				clocks = <&dpll_per_m2_div4_ck>;
> +				clock-names = "fck";
> +				#address-cells = <1>;
> +				#size-cells = <0>;
> +				interrupts = <0 138 0x4>;
> +				num-cs = <4>;
> +			};
>  		};
>  
>  		dss: dss@4832a000 {
> 

[-- Attachment #2: pEpkey.asc --]
[-- Type: application/pgp-keys, Size: 9065 bytes --]

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

end of thread, other threads:[~2019-12-13  6:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-10 21:58 [PATCH 1/2] ARM: dts: Configure interconnect target module for am4 qspi Tony Lindgren
2019-12-10 21:58 ` [PATCH 2/2] ARM: OMAP2+: Drop legacy platform data " Tony Lindgren
2019-12-11 19:17   ` Jean Pihet
2019-12-11 19:17 ` [PATCH 1/2] ARM: dts: Configure interconnect target module " Jean Pihet
2019-12-13  6:16 ` Keerthy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.