2023-04-18 01:27:53

by Nishanth Menon

[permalink] [raw]
Subject: [PATCH 0/3] arm64: dts: ti: k3-am62a: Add timers, wdt and fixup

Hi,

This is a series that adds wdt, timers to am62ax support, and adds the
missing description for uart1 and wkup_uart that is used by firmware.

Nishanth Menon (3):
arm64: dts: ti: k3-am62a: Add general purpose timers
arm64: dts: ti: k3-am62a: Add watchdog nodes
arm64: dts: ti: k3-am62a7-evm: Describe main_uart1 and wkup_uart

arch/arm64/boot/dts/ti/k3-am62a-main.dtsi | 141 ++++++++++++++++++++
arch/arm64/boot/dts/ti/k3-am62a-mcu.dtsi | 56 ++++++++
arch/arm64/boot/dts/ti/k3-am62a-wakeup.dtsi | 11 ++
arch/arm64/boot/dts/ti/k3-am62a7-sk.dts | 36 +++++
4 files changed, 244 insertions(+)

--
2.40.0


2023-04-18 01:28:12

by Nishanth Menon

[permalink] [raw]
Subject: [PATCH 3/3] arm64: dts: ti: k3-am62a7-evm: Describe main_uart1 and wkup_uart

wkup_uart and main_uart1 on this platform is used by tifs and DM
firmwares. Describe them for completeness including the pinmux.

Signed-off-by: Nishanth Menon <[email protected]>
---
arch/arm64/boot/dts/ti/k3-am62a7-sk.dts | 36 +++++++++++++++++++++++++
1 file changed, 36 insertions(+)

diff --git a/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts b/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts
index f6a67f072dca..8f0589f4921e 100644
--- a/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts
+++ b/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts
@@ -17,7 +17,9 @@ / {
model = "Texas Instruments AM62A7 SK";

aliases {
+ serial0 = &wkup_uart0;
serial2 = &main_uart0;
+ serial3 = &main_uart1;
mmc1 = &sdhci1;
};

@@ -114,6 +116,24 @@ led-0 {
};
};

+&mcu_pmx0 {
+ wkup_uart0_pins_default: wkup-uart0-pins-default {
+ pinctrl-single,pins = <
+ AM62X_MCU_IOPAD(0x02c, PIN_INPUT, 0) /* (C6) WKUP_UART0_CTSn */
+ AM62X_MCU_IOPAD(0x030, PIN_OUTPUT, 0) /* (A4) WKUP_UART0_RTSn */
+ AM62X_MCU_IOPAD(0x024, PIN_INPUT, 0) /* (B4) WKUP_UART0_RXD */
+ AM62X_MCU_IOPAD(0x028, PIN_OUTPUT, 0) /* (C5) WKUP_UART0_TXD */
+ >;
+ };
+};
+
+/* WKUP UART0 is used for DM firmware logs */
+&wkup_uart0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&wkup_uart0_pins_default>;
+ status = "reserved";
+};
+
&main_pmx0 {
main_uart0_pins_default: main-uart0-pins-default {
pinctrl-single,pins = <
@@ -122,6 +142,15 @@ AM62AX_IOPAD(0x1cc, PIN_OUTPUT, 0) /* (E14) UART0_TXD */
>;
};

+ main_uart1_pins_default: main-uart1-pins-default {
+ pinctrl-single,pins = <
+ AM62X_IOPAD(0x194, PIN_INPUT, 2) /* (B19) MCASP0_AXR3.UART1_CTSn */
+ AM62X_IOPAD(0x198, PIN_OUTPUT, 2) /* (A19) MCASP0_AXR2.UART1_RTSn */
+ AM62X_IOPAD(0x1ac, PIN_INPUT, 2) /* (E19) MCASP0_AFSR.UART1_RXD */
+ AM62X_IOPAD(0x1b0, PIN_OUTPUT, 2) /* (A20) MCASP0_ACLKR.UART1_TXD */
+ >;
+ };
+
main_i2c0_pins_default: main-i2c0-pins-default {
pinctrl-single,pins = <
AM62AX_IOPAD(0x1e0, PIN_INPUT_PULLUP, 0) /* (B16) I2C0_SCL */
@@ -254,6 +283,13 @@ &main_uart0 {
pinctrl-0 = <&main_uart0_pins_default>;
};

+/* Main UART1 is used for TIFS firmware logs */
+&main_uart1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&main_uart1_pins_default>;
+ status = "reserved";
+};
+
&usbss1 {
status = "okay";
};
--
2.40.0

2023-04-18 01:28:14

by Nishanth Menon

[permalink] [raw]
Subject: [PATCH 1/3] arm64: dts: ti: k3-am62a: Add general purpose timers

Similar to commit 3308a31c507c ("arm64: dts: ti: k3-am62: Add general
purpose timers for am62"), there are 12 general purpose timers on am62a7
split between 8 in main and 4 in mcu domains. The 4 in mcu domain do not
have interrupts that are routable to a53.

We configure the timers with the 25 MHz input clock by default as the
32.768 kHz clock may not be wired on the device. We leave the MCU domain
timers clock mux unconfigured, and mark the MCU domain timers reserved.
The MCU domain timers are likely reserved by the software for the ESM
module.

Signed-off-by: Nishanth Menon <[email protected]>
---
arch/arm64/boot/dts/ti/k3-am62a-main.dtsi | 96 +++++++++++++++++++++++
arch/arm64/boot/dts/ti/k3-am62a-mcu.dtsi | 45 +++++++++++
2 files changed, 141 insertions(+)

diff --git a/arch/arm64/boot/dts/ti/k3-am62a-main.dtsi b/arch/arm64/boot/dts/ti/k3-am62a-main.dtsi
index 393a1a40b68b..59d1199e43c9 100644
--- a/arch/arm64/boot/dts/ti/k3-am62a-main.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am62a-main.dtsi
@@ -177,6 +177,102 @@ main_pmx0: pinctrl@f4000 {
pinctrl-single,function-mask = <0xffffffff>;
};

+ main_timer0: timer@2400000 {
+ compatible = "ti,am654-timer";
+ reg = <0x00 0x2400000 0x00 0x400>;
+ interrupts = <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&k3_clks 36 2>;
+ clock-names = "fck";
+ assigned-clocks = <&k3_clks 36 2>;
+ assigned-clock-parents = <&k3_clks 36 3>;
+ power-domains = <&k3_pds 36 TI_SCI_PD_EXCLUSIVE>;
+ ti,timer-pwm;
+ };
+
+ main_timer1: timer@2410000 {
+ compatible = "ti,am654-timer";
+ reg = <0x00 0x2410000 0x00 0x400>;
+ interrupts = <GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&k3_clks 37 2>;
+ clock-names = "fck";
+ assigned-clocks = <&k3_clks 37 2>;
+ assigned-clock-parents = <&k3_clks 37 3>;
+ power-domains = <&k3_pds 37 TI_SCI_PD_EXCLUSIVE>;
+ ti,timer-pwm;
+ };
+
+ main_timer2: timer@2420000 {
+ compatible = "ti,am654-timer";
+ reg = <0x00 0x2420000 0x00 0x400>;
+ interrupts = <GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&k3_clks 38 2>;
+ clock-names = "fck";
+ assigned-clocks = <&k3_clks 38 2>;
+ assigned-clock-parents = <&k3_clks 38 3>;
+ power-domains = <&k3_pds 38 TI_SCI_PD_EXCLUSIVE>;
+ ti,timer-pwm;
+ };
+
+ main_timer3: timer@2430000 {
+ compatible = "ti,am654-timer";
+ reg = <0x00 0x2430000 0x00 0x400>;
+ interrupts = <GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&k3_clks 39 2>;
+ clock-names = "fck";
+ assigned-clocks = <&k3_clks 39 2>;
+ assigned-clock-parents = <&k3_clks 39 3>;
+ power-domains = <&k3_pds 39 TI_SCI_PD_EXCLUSIVE>;
+ ti,timer-pwm;
+ };
+
+ main_timer4: timer@2440000 {
+ compatible = "ti,am654-timer";
+ reg = <0x00 0x2440000 0x00 0x400>;
+ interrupts = <GIC_SPI 124 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&k3_clks 40 2>;
+ clock-names = "fck";
+ assigned-clocks = <&k3_clks 40 2>;
+ assigned-clock-parents = <&k3_clks 40 3>;
+ power-domains = <&k3_pds 40 TI_SCI_PD_EXCLUSIVE>;
+ ti,timer-pwm;
+ };
+
+ main_timer5: timer@2450000 {
+ compatible = "ti,am654-timer";
+ reg = <0x00 0x2450000 0x00 0x400>;
+ interrupts = <GIC_SPI 125 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&k3_clks 41 2>;
+ clock-names = "fck";
+ assigned-clocks = <&k3_clks 41 2>;
+ assigned-clock-parents = <&k3_clks 41 3>;
+ power-domains = <&k3_pds 41 TI_SCI_PD_EXCLUSIVE>;
+ ti,timer-pwm;
+ };
+
+ main_timer6: timer@2460000 {
+ compatible = "ti,am654-timer";
+ reg = <0x00 0x2460000 0x00 0x400>;
+ interrupts = <GIC_SPI 126 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&k3_clks 42 2>;
+ clock-names = "fck";
+ assigned-clocks = <&k3_clks 42 2>;
+ assigned-clock-parents = <&k3_clks 42 3>;
+ power-domains = <&k3_pds 42 TI_SCI_PD_EXCLUSIVE>;
+ ti,timer-pwm;
+ };
+
+ main_timer7: timer@2470000 {
+ compatible = "ti,am654-timer";
+ reg = <0x00 0x2470000 0x00 0x400>;
+ interrupts = <GIC_SPI 127 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&k3_clks 43 2>;
+ clock-names = "fck";
+ assigned-clocks = <&k3_clks 43 2>;
+ assigned-clock-parents = <&k3_clks 43 3>;
+ power-domains = <&k3_pds 43 TI_SCI_PD_EXCLUSIVE>;
+ ti,timer-pwm;
+ };
+
main_uart0: serial@2800000 {
compatible = "ti,am64-uart", "ti,am654-uart";
reg = <0x00 0x02800000 0x00 0x100>;
diff --git a/arch/arm64/boot/dts/ti/k3-am62a-mcu.dtsi b/arch/arm64/boot/dts/ti/k3-am62a-mcu.dtsi
index 2bb813e784a2..50c94a55fe85 100644
--- a/arch/arm64/boot/dts/ti/k3-am62a-mcu.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am62a-mcu.dtsi
@@ -15,6 +15,51 @@ mcu_pmx0: pinctrl@4084000 {
status = "disabled";
};

+ /*
+ * The MCU domain timer interrupts are routed only to the ESM module,
+ * and not currently available for Linux. The MCU domain timers are
+ * of limited use without interrupts, and likely reserved by the ESM.
+ */
+ mcu_timer0: timer@4800000 {
+ compatible = "ti,am654-timer";
+ reg = <0x00 0x4800000 0x00 0x400>;
+ clocks = <&k3_clks 35 2>;
+ clock-names = "fck";
+ power-domains = <&k3_pds 35 TI_SCI_PD_EXCLUSIVE>;
+ ti,timer-pwm;
+ status = "reserved";
+ };
+
+ mcu_timer1: timer@4810000 {
+ compatible = "ti,am654-timer";
+ reg = <0x00 0x4810000 0x00 0x400>;
+ clocks = <&k3_clks 48 2>;
+ clock-names = "fck";
+ power-domains = <&k3_pds 48 TI_SCI_PD_EXCLUSIVE>;
+ ti,timer-pwm;
+ status = "reserved";
+ };
+
+ mcu_timer2: timer@4820000 {
+ compatible = "ti,am654-timer";
+ reg = <0x00 0x4820000 0x00 0x400>;
+ clocks = <&k3_clks 49 2>;
+ clock-names = "fck";
+ power-domains = <&k3_pds 49 TI_SCI_PD_EXCLUSIVE>;
+ ti,timer-pwm;
+ status = "reserved";
+ };
+
+ mcu_timer3: timer@4830000 {
+ compatible = "ti,am654-timer";
+ reg = <0x00 0x4830000 0x00 0x400>;
+ clocks = <&k3_clks 50 2>;
+ clock-names = "fck";
+ power-domains = <&k3_pds 50 TI_SCI_PD_EXCLUSIVE>;
+ ti,timer-pwm;
+ status = "reserved";
+ };
+
mcu_uart0: serial@4a00000 {
compatible = "ti,am64-uart", "ti,am654-uart";
reg = <0x00 0x04a00000 0x00 0x100>;
--
2.40.0

2023-04-18 09:50:00

by Tony Lindgren

[permalink] [raw]
Subject: Re: [PATCH 0/3] arm64: dts: ti: k3-am62a: Add timers, wdt and fixup

* Nishanth Menon <[email protected]> [230418 01:32]:
> This is a series that adds wdt, timers to am62ax support, and adds the
> missing description for uart1 and wkup_uart that is used by firmware.

Looks good to me:

Reviewed-by: Tony Lindgren <[email protected]>

2023-04-19 11:45:51

by Roger Quadros

[permalink] [raw]
Subject: Re: [PATCH 0/3] arm64: dts: ti: k3-am62a: Add timers, wdt and fixup



On 18/04/2023 04:27, Nishanth Menon wrote:
> Hi,
>
> This is a series that adds wdt, timers to am62ax support, and adds the
> missing description for uart1 and wkup_uart that is used by firmware.
>
> Nishanth Menon (3):
> arm64: dts: ti: k3-am62a: Add general purpose timers
> arm64: dts: ti: k3-am62a: Add watchdog nodes
> arm64: dts: ti: k3-am62a7-evm: Describe main_uart1 and wkup_uart
>
> arch/arm64/boot/dts/ti/k3-am62a-main.dtsi | 141 ++++++++++++++++++++
> arch/arm64/boot/dts/ti/k3-am62a-mcu.dtsi | 56 ++++++++
> arch/arm64/boot/dts/ti/k3-am62a-wakeup.dtsi | 11 ++
> arch/arm64/boot/dts/ti/k3-am62a7-sk.dts | 36 +++++
> 4 files changed, 244 insertions(+)
>

Reviewed-by: Roger Quadros <[email protected]>

2023-06-06 17:23:14

by Vignesh Raghavendra

[permalink] [raw]
Subject: Re: [PATCH 0/3] arm64: dts: ti: k3-am62a: Add timers, wdt and fixup

Hi Nishanth Menon,

On Mon, 17 Apr 2023 20:27:14 -0500, Nishanth Menon wrote:
> This is a series that adds wdt, timers to am62ax support, and adds the
> missing description for uart1 and wkup_uart that is used by firmware.
>
> Nishanth Menon (3):
> arm64: dts: ti: k3-am62a: Add general purpose timers
> arm64: dts: ti: k3-am62a: Add watchdog nodes
> arm64: dts: ti: k3-am62a7-evm: Describe main_uart1 and wkup_uart
>
> [...]

I have applied the following to branch ti-k3-dts-next on [1].
Thank you!

[1/3] arm64: dts: ti: k3-am62a: Add general purpose timers
commit: 68dd81a75192248a2c29650d21da495069c74ffa
[2/3] arm64: dts: ti: k3-am62a: Add watchdog nodes
commit: 804702e4c2aa5eae4611e9389833631a6b22e913
[3/3] arm64: dts: ti: k3-am62a7-evm: Describe main_uart1 and wkup_uart
(no commit info)

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent up the chain during
the next merge window (or sooner if it is a relevant bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux.git
--
Vignesh


2023-06-06 18:08:01

by Vignesh Raghavendra

[permalink] [raw]
Subject: Re: [PATCH 0/3] arm64: dts: ti: k3-am62a: Add timers, wdt and fixup



On 06/06/23 10:51 pm, Vignesh Raghavendra wrote:
> Hi Nishanth Menon,
>
> On Mon, 17 Apr 2023 20:27:14 -0500, Nishanth Menon wrote:
>> This is a series that adds wdt, timers to am62ax support, and adds the
>> missing description for uart1 and wkup_uart that is used by firmware.
>>
>> Nishanth Menon (3):
>> arm64: dts: ti: k3-am62a: Add general purpose timers
>> arm64: dts: ti: k3-am62a: Add watchdog nodes
>> arm64: dts: ti: k3-am62a7-evm: Describe main_uart1 and wkup_uart
>>
>> [...]
>
> I have applied the following to branch ti-k3-dts-next on [1].
> Thank you!
>
> [1/3] arm64: dts: ti: k3-am62a: Add general purpose timers
> commit: 68dd81a75192248a2c29650d21da495069c74ffa
> [2/3] arm64: dts: ti: k3-am62a: Add watchdog nodes
> commit: 804702e4c2aa5eae4611e9389833631a6b22e913
> [3/3] arm64: dts: ti: k3-am62a7-evm: Describe main_uart1 and wkup_uart
> (no commit info)
>

I ended up picking up [0] for 3/3 instead:

[0] https://lore.kernel.org/r/[email protected]