* [PATCH] arm64: dts: ti: k3-am62-wakeup: Configure ti-sysc for wkup_uart0
@ 2023-09-12 11:12 Tony Lindgren
2023-09-12 15:38 ` Dhruva Gole
2023-12-27 13:59 ` Vignesh Raghavendra
0 siblings, 2 replies; 6+ messages in thread
From: Tony Lindgren @ 2023-09-12 11:12 UTC (permalink / raw)
To: Nishanth Menon, Vignesh Raghavendra
Cc: devicetree, linux-arm-kernel, Dhruva Gole
The devices in the wkup domain are capable of waking up the system from
suspend. We can configure the wkup domain devices in a generic way using
the ti-sysc interconnect target module driver like we have done with the
earlier TI SoCs.
As ti-sysc manages the SYSCONFIG related registers independent of the
child hardware device, the wake-up configuration is also set even if
wkup_uart0 is reserved by sysfw.
The wkup_uart0 device has interconnect target module register mapping like
dra7 wkup uart. There is a 1 MB interconnect target range with one uart IP
block in the target module. The power domain and clock affects the whole
interconnect target module.
Note we change the functional clock name to follow the ti-sysc binding
and use "fck" instead of "fclk".
Cc: Dhruva Gole <d-gole@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi | 33 ++++++++++++++++++----
1 file changed, 27 insertions(+), 6 deletions(-)
diff --git a/arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi b/arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi
--- a/arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi
@@ -5,6 +5,8 @@
* Copyright (C) 2020-2022 Texas Instruments Incorporated - https://www.ti.com/
*/
+#include <dt-bindings/bus/ti-sysc.h>
+
&cbass_wakeup {
wkup_conf: syscon@43000000 {
compatible = "syscon", "simple-mfd";
@@ -19,14 +21,33 @@ chipid: chipid@14 {
};
};
- wkup_uart0: serial@2b300000 {
- compatible = "ti,am64-uart", "ti,am654-uart";
- reg = <0x00 0x2b300000 0x00 0x100>;
- interrupts = <GIC_SPI 186 IRQ_TYPE_LEVEL_HIGH>;
+ target-module@2b300000 {
+ compatible = "ti,sysc-omap2", "ti,sysc";
+ reg = <0 0x2b300050 0 0x4>,
+ <0 0x2b300054 0 0x4>,
+ <0 0x2b300058 0 0x4>;
+ reg-names = "rev", "sysc", "syss";
+ ti,sysc-mask = <(SYSC_OMAP2_ENAWAKEUP |
+ SYSC_OMAP2_SOFTRESET |
+ SYSC_OMAP2_AUTOIDLE)>;
+ ti,sysc-sidle = <SYSC_IDLE_FORCE>,
+ <SYSC_IDLE_NO>,
+ <SYSC_IDLE_SMART>,
+ <SYSC_IDLE_SMART_WKUP>;
+ ti,syss-mask = <1>;
power-domains = <&k3_pds 114 TI_SCI_PD_EXCLUSIVE>;
clocks = <&k3_clks 114 0>;
- clock-names = "fclk";
- status = "disabled";
+ clock-names = "fck";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges = <0 0 0x2b300000 0x100000>;
+
+ wkup_uart0: serial@2b300000 {
+ compatible = "ti,am64-uart", "ti,am654-uart";
+ reg = <0 0x100>;
+ interrupts = <GIC_SPI 186 IRQ_TYPE_LEVEL_HIGH>;
+ status = "disabled";
+ };
};
wkup_i2c0: i2c@2b200000 {
--
2.42.0
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] arm64: dts: ti: k3-am62-wakeup: Configure ti-sysc for wkup_uart0
2023-09-12 11:12 [PATCH] arm64: dts: ti: k3-am62-wakeup: Configure ti-sysc for wkup_uart0 Tony Lindgren
@ 2023-09-12 15:38 ` Dhruva Gole
2023-12-27 13:59 ` Vignesh Raghavendra
1 sibling, 0 replies; 6+ messages in thread
From: Dhruva Gole @ 2023-09-12 15:38 UTC (permalink / raw)
To: Tony Lindgren
Cc: Nishanth Menon, Vignesh Raghavendra, devicetree, linux-arm-kernel
On Sep 12, 2023 at 14:12:15 +0300, Tony Lindgren wrote:
> The devices in the wkup domain are capable of waking up the system from
> suspend. We can configure the wkup domain devices in a generic way using
> the ti-sysc interconnect target module driver like we have done with the
> earlier TI SoCs.
>
> As ti-sysc manages the SYSCONFIG related registers independent of the
> child hardware device, the wake-up configuration is also set even if
> wkup_uart0 is reserved by sysfw.
>
> The wkup_uart0 device has interconnect target module register mapping like
> dra7 wkup uart. There is a 1 MB interconnect target range with one uart IP
> block in the target module. The power domain and clock affects the whole
> interconnect target module.
>
> Note we change the functional clock name to follow the ti-sysc binding
> and use "fck" instead of "fclk".
>
> Cc: Dhruva Gole <d-gole@ti.com>
> Signed-off-by: Tony Lindgren <tony@atomide.com>
> ---
Have tested wakeup using wake_uart as I have pointed out in a previous patch for
ti-sysc, please find required patches here:
https://github.com/DhruvaG2000/v-linux/commits/v6.5-rc7_wkuart
Hence,
Tested-by: Dhruva Gole <d-gole@ti.com>
> arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi | 33 ++++++++++++++++++----
> 1 file changed, 27 insertions(+), 6 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi b/arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi
> --- a/arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi
> +++ b/arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi
> @@ -5,6 +5,8 @@
> * Copyright (C) 2020-2022 Texas Instruments Incorporated - https://www.ti.com/
> */
>
> +#include <dt-bindings/bus/ti-sysc.h>
> +
> &cbass_wakeup {
> wkup_conf: syscon@43000000 {
> compatible = "syscon", "simple-mfd";
> @@ -19,14 +21,33 @@ chipid: chipid@14 {
> };
> };
>
> - wkup_uart0: serial@2b300000 {
> - compatible = "ti,am64-uart", "ti,am654-uart";
> - reg = <0x00 0x2b300000 0x00 0x100>;
> - interrupts = <GIC_SPI 186 IRQ_TYPE_LEVEL_HIGH>;
> + target-module@2b300000 {
> + compatible = "ti,sysc-omap2", "ti,sysc";
> + reg = <0 0x2b300050 0 0x4>,
> + <0 0x2b300054 0 0x4>,
> + <0 0x2b300058 0 0x4>;
> + reg-names = "rev", "sysc", "syss";
> + ti,sysc-mask = <(SYSC_OMAP2_ENAWAKEUP |
> + SYSC_OMAP2_SOFTRESET |
> + SYSC_OMAP2_AUTOIDLE)>;
> + ti,sysc-sidle = <SYSC_IDLE_FORCE>,
> + <SYSC_IDLE_NO>,
> + <SYSC_IDLE_SMART>,
> + <SYSC_IDLE_SMART_WKUP>;
> + ti,syss-mask = <1>;
> power-domains = <&k3_pds 114 TI_SCI_PD_EXCLUSIVE>;
> clocks = <&k3_clks 114 0>;
> - clock-names = "fclk";
> - status = "disabled";
> + clock-names = "fck";
> + #address-cells = <1>;
> + #size-cells = <1>;
> + ranges = <0 0 0x2b300000 0x100000>;
> +
> + wkup_uart0: serial@2b300000 {
> + compatible = "ti,am64-uart", "ti,am654-uart";
> + reg = <0 0x100>;
> + interrupts = <GIC_SPI 186 IRQ_TYPE_LEVEL_HIGH>;
> + status = "disabled";
wondering if "reserved" makes more sense as it's currently being used by
SYSFW? I am okay with this disabled as well.
> + };
> };
>
> wkup_i2c0: i2c@2b200000 {
> --
> 2.42.0
--
Best regards,
Dhruva Gole <d-gole@ti.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] arm64: dts: ti: k3-am62-wakeup: Configure ti-sysc for wkup_uart0
@ 2023-12-18 7:38 Tony Lindgren
0 siblings, 0 replies; 6+ messages in thread
From: Tony Lindgren @ 2023-12-18 7:38 UTC (permalink / raw)
To: Nishanth Menon, Vignesh Raghavendra, Tero Kristo, Rob Herring,
Krzysztof Kozlowski, Conor Dooley
Cc: Dhruva Gole, Kevin Hilman, linux-arm-kernel, devicetree
The devices in the wkup domain are capable of waking up the system from
suspend. We can configure the wkup domain devices in a generic way using
the ti-sysc interconnect target module driver like we have done with the
earlier TI SoCs.
As ti-sysc manages the SYSCONFIG related registers independent of the
child hardware device, the wake-up configuration is also set even if
wkup_uart0 is reserved by sysfw.
The wkup_uart0 device has interconnect target module register mapping like
dra7 wkup uart. There is a 1 MB interconnect target range with one uart IP
block in the target module. The power domain and clock affects the whole
interconnect target module.
Note we change the functional clock name to follow the ti-sysc binding
and use "fck" instead of "fclk".
Tested-by: Dhruva Gole <d-gole@ti.com>
Reviewed-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
Changes since v2:
- Fix node name for 8250 IP, it's at offset 0 from the target module
- Added Kevin's Reviewed-by from v2 as the node name change is mostly
cosmetic
---
arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi | 33 ++++++++++++++++++----
1 file changed, 27 insertions(+), 6 deletions(-)
diff --git a/arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi b/arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi
--- a/arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi
@@ -5,6 +5,8 @@
* Copyright (C) 2020-2022 Texas Instruments Incorporated - https://www.ti.com/
*/
+#include <dt-bindings/bus/ti-sysc.h>
+
&cbass_wakeup {
wkup_conf: syscon@43000000 {
bootph-all;
@@ -21,14 +23,33 @@ chipid: chipid@14 {
};
};
- wkup_uart0: serial@2b300000 {
- compatible = "ti,am64-uart", "ti,am654-uart";
- reg = <0x00 0x2b300000 0x00 0x100>;
- interrupts = <GIC_SPI 186 IRQ_TYPE_LEVEL_HIGH>;
+ target-module@2b300000 {
+ compatible = "ti,sysc-omap2", "ti,sysc";
+ reg = <0 0x2b300050 0 0x4>,
+ <0 0x2b300054 0 0x4>,
+ <0 0x2b300058 0 0x4>;
+ reg-names = "rev", "sysc", "syss";
+ ti,sysc-mask = <(SYSC_OMAP2_ENAWAKEUP |
+ SYSC_OMAP2_SOFTRESET |
+ SYSC_OMAP2_AUTOIDLE)>;
+ ti,sysc-sidle = <SYSC_IDLE_FORCE>,
+ <SYSC_IDLE_NO>,
+ <SYSC_IDLE_SMART>,
+ <SYSC_IDLE_SMART_WKUP>;
+ ti,syss-mask = <1>;
power-domains = <&k3_pds 114 TI_SCI_PD_EXCLUSIVE>;
clocks = <&k3_clks 114 0>;
- clock-names = "fclk";
- status = "disabled";
+ clock-names = "fck";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges = <0 0 0x2b300000 0x100000>;
+
+ wkup_uart0: serial@0 {
+ compatible = "ti,am64-uart", "ti,am654-uart";
+ reg = <0 0x100>;
+ interrupts = <GIC_SPI 186 IRQ_TYPE_LEVEL_HIGH>;
+ status = "disabled";
+ };
};
wkup_i2c0: i2c@2b200000 {
--
2.43.0
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] arm64: dts: ti: k3-am62-wakeup: Configure ti-sysc for wkup_uart0
2023-09-12 11:12 [PATCH] arm64: dts: ti: k3-am62-wakeup: Configure ti-sysc for wkup_uart0 Tony Lindgren
2023-09-12 15:38 ` Dhruva Gole
@ 2023-12-27 13:59 ` Vignesh Raghavendra
2023-12-27 15:22 ` Raghavendra, Vignesh
1 sibling, 1 reply; 6+ messages in thread
From: Vignesh Raghavendra @ 2023-12-27 13:59 UTC (permalink / raw)
To: Nishanth Menon, Tony Lindgren
Cc: Vignesh Raghavendra, devicetree, linux-arm-kernel, Dhruva Gole
On Tue, 12 Sep 2023 14:12:15 +0300, Tony Lindgren wrote:
> The devices in the wkup domain are capable of waking up the system from
> suspend. We can configure the wkup domain devices in a generic way using
> the ti-sysc interconnect target module driver like we have done with the
> earlier TI SoCs.
>
> As ti-sysc manages the SYSCONFIG related registers independent of the
> child hardware device, the wake-up configuration is also set even if
> wkup_uart0 is reserved by sysfw.
>
> [...]
Applied, thanks!
[1/1] arm64: dts: ti: k3-am62-wakeup: Configure ti-sysc for wkup_uart0
commit: 86224524b52a8efba26f920736d08c8bfdd22d87
Best regards,
--
Vignesh
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] arm64: dts: ti: k3-am62-wakeup: Configure ti-sysc for wkup_uart0
2023-12-27 13:59 ` Vignesh Raghavendra
@ 2023-12-27 15:22 ` Raghavendra, Vignesh
2024-02-13 8:56 ` Tony Lindgren
0 siblings, 1 reply; 6+ messages in thread
From: Raghavendra, Vignesh @ 2023-12-27 15:22 UTC (permalink / raw)
To: Nishanth Menon, Tony Lindgren; +Cc: devicetree, linux-arm-kernel, Dhruva Gole
On 12/27/2023 7:29 PM, Vignesh Raghavendra wrote:
>
> On Tue, 12 Sep 2023 14:12:15 +0300, Tony Lindgren wrote:
>> The devices in the wkup domain are capable of waking up the system from
>> suspend. We can configure the wkup domain devices in a generic way using
>> the ti-sysc interconnect target module driver like we have done with the
>> earlier TI SoCs.
>>
>> As ti-sysc manages the SYSCONFIG related registers independent of the
>> child hardware device, the wake-up configuration is also set even if
>> wkup_uart0 is reserved by sysfw.
>>
>> [...]
>
> Applied, thanks!
>
> [1/1] arm64: dts: ti: k3-am62-wakeup: Configure ti-sysc for wkup_uart0
> commit: 86224524b52a8efba26f920736d08c8bfdd22d87
>
Please ignore above. I meant to pick v4. Sorry for the noise!
Regards
Vignesh
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] arm64: dts: ti: k3-am62-wakeup: Configure ti-sysc for wkup_uart0
2023-12-27 15:22 ` Raghavendra, Vignesh
@ 2024-02-13 8:56 ` Tony Lindgren
0 siblings, 0 replies; 6+ messages in thread
From: Tony Lindgren @ 2024-02-13 8:56 UTC (permalink / raw)
To: Raghavendra, Vignesh, Markus Schneider-Pargmann
Cc: Nishanth Menon, devicetree, linux-arm-kernel, Dhruva Gole
* Raghavendra, Vignesh <vigneshr@ti.com> [231227 15:22]:
>
>
> On 12/27/2023 7:29 PM, Vignesh Raghavendra wrote:
> >
> > On Tue, 12 Sep 2023 14:12:15 +0300, Tony Lindgren wrote:
> >> The devices in the wkup domain are capable of waking up the system from
> >> suspend. We can configure the wkup domain devices in a generic way using
> >> the ti-sysc interconnect target module driver like we have done with the
> >> earlier TI SoCs.
> >>
> >> As ti-sysc manages the SYSCONFIG related registers independent of the
> >> child hardware device, the wake-up configuration is also set even if
> >> wkup_uart0 is reserved by sysfw.
> >>
> >> [...]
> >
> > Applied, thanks!
> >
> > [1/1] arm64: dts: ti: k3-am62-wakeup: Configure ti-sysc for wkup_uart0
> > commit: 86224524b52a8efba26f920736d08c8bfdd22d87
> >
>
>
> Please ignore above. I meant to pick v4. Sorry for the noise!
So we need to add ti,no-reset-on-init as noted by Markus. As I'm not
seeing this in Linux next, I'll send out v5 patch. If you need an
incremental fix I can do that too naturally.
Regards,
Tony
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-02-13 8:56 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-12 11:12 [PATCH] arm64: dts: ti: k3-am62-wakeup: Configure ti-sysc for wkup_uart0 Tony Lindgren
2023-09-12 15:38 ` Dhruva Gole
2023-12-27 13:59 ` Vignesh Raghavendra
2023-12-27 15:22 ` Raghavendra, Vignesh
2024-02-13 8:56 ` Tony Lindgren
-- strict thread matches above, loose matches on Subject: below --
2023-12-18 7:38 Tony Lindgren
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).