Improve the wkup_m3_ipc driver to better support the TI Wakeup Cortex M3
device found on TI AM33xx and AM43xx SoCs.
This series derives from these commits in the ti-linux-5.10.y branch of
the TI Linux repo [1]:
6ab4eff1034b ("remoteproc: move rproc_da_to_va declaration to remoteproc.h")
2a9be39a26f7 ("dt-bindings: wkup_m3_ipc: Add vtt toggling bindings")
c65263f9e12c ("wkup_m3_ipc: Add support for toggling VTT regulator")
5c6c821803e1 ("dt-bindings: wkup_m3_ipc: Add ti,io-isolation property")
196c46f7577d ("wkup_m3_ipc: Add support for IO Isolation")
c28acc847e5d ("soc: ti: wkup_m3_ipc: Add support for i2c voltage scaling")
a4f9ef4ab5ca ("ARM: dts: am437x-gp-evm: Enable wkup_m3 control of IO isolation")
94de756f1771 ("ARM: dts: am33xx: Add scale data fw to wkup_m3_ipc node")
b7ae4b063793 ("ARM: dts: am43xx: Add scale data fw to wkup_m3_ipc node")
451ec7871ae7 ("soc: ti: wkup_m3_ipc: Add debug option to halt m3 in suspend")
Minor changes have been made to some patches to resolve conflicts and
to split i2c voltage scaling dt-bindings into separate patch.
[1] git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git
Dave Gerlach (10):
dt-bindings: wkup_m3_ipc: Add vtt toggling bindings
soc: ti: wkup_m3_ipc: Add support for toggling VTT regulator
dt-bindings: wkup_m3_ipc: Add ti,io-isolation property
soc: ti: wkup_m3_ipc: Add support for IO Isolation
ARM: dts: am437x-gp-evm: Enable wkup_m3 control of IO isolation
dt-bindings: wkup_m3_ipc: Add scale-data-fw property
soc: ti: wkup_m3_ipc: Add support for i2c voltage scaling
ARM: dts: am33xx: Add scale data fw to wkup_m3_ipc node
ARM: dts: am43xx: Add scale data fw to wkup_m3_ipc node
soc: ti: wkup_m3_ipc: Add debug option to halt m3 in suspend
Suman Anna (1):
remoteproc: move rproc_da_to_va declaration to remoteproc.h
.../bindings/soc/ti/wkup_m3_ipc.txt | 91 ++++++++
arch/arm/boot/dts/am335x-bone-common.dtsi | 4 +
arch/arm/boot/dts/am335x-evm.dts | 4 +
arch/arm/boot/dts/am335x-evmsk.dts | 4 +
arch/arm/boot/dts/am437x-gp-evm.dts | 5 +
arch/arm/boot/dts/am437x-sk-evm.dts | 4 +
arch/arm/boot/dts/am43x-epos-evm.dts | 4 +
drivers/remoteproc/remoteproc_internal.h | 1 -
drivers/soc/ti/wkup_m3_ipc.c | 208 +++++++++++++++++-
include/linux/remoteproc.h | 1 +
include/linux/wkup_m3_ipc.h | 13 ++
11 files changed, 334 insertions(+), 5 deletions(-)
--
2.32.0
From: Dave Gerlach <[email protected]>
Add appropriate scale-data-fw names for all am43xx platforms.
Signed-off-by: Dave Gerlach <[email protected]>
Signed-off-by: Keerthy <[email protected]>
Signed-off-by: Drew Fustini <[email protected]>
---
arch/arm/boot/dts/am437x-gp-evm.dts | 1 +
arch/arm/boot/dts/am437x-sk-evm.dts | 4 ++++
arch/arm/boot/dts/am43x-epos-evm.dts | 4 ++++
3 files changed, 9 insertions(+)
diff --git a/arch/arm/boot/dts/am437x-gp-evm.dts b/arch/arm/boot/dts/am437x-gp-evm.dts
index 91b67b428a06..ad561f81af3a 100644
--- a/arch/arm/boot/dts/am437x-gp-evm.dts
+++ b/arch/arm/boot/dts/am437x-gp-evm.dts
@@ -1129,6 +1129,7 @@ &cpu {
&wkup_m3_ipc {
ti,set-io-isolation;
+ ti,scale-data-fw = "am43x-evm-scale-data.bin";
};
&pruss1_mdio {
diff --git a/arch/arm/boot/dts/am437x-sk-evm.dts b/arch/arm/boot/dts/am437x-sk-evm.dts
index 20a34d2d85df..7b518aff5f8f 100644
--- a/arch/arm/boot/dts/am437x-sk-evm.dts
+++ b/arch/arm/boot/dts/am437x-sk-evm.dts
@@ -893,6 +893,10 @@ vpfe0_ep: endpoint {
};
};
+&wkup_m3_ipc {
+ ti,scale-data-fw = "am43x-evm-scale-data.bin";
+};
+
&pruss1_mdio {
status = "disabled";
};
diff --git a/arch/arm/boot/dts/am43x-epos-evm.dts b/arch/arm/boot/dts/am43x-epos-evm.dts
index 2f4d2e4e9b3e..a734bdc5e126 100644
--- a/arch/arm/boot/dts/am43x-epos-evm.dts
+++ b/arch/arm/boot/dts/am43x-epos-evm.dts
@@ -1019,6 +1019,10 @@ &cpu {
cpu0-supply = <&dcdc2>;
};
+&wkup_m3_ipc {
+ ti,scale-data-fw = "am43x-evm-scale-data.bin";
+};
+
&pruss1_mdio {
status = "disabled";
};
--
2.32.0
From: Dave Gerlach <[email protected]>
AM43xx support isolation of the IOs so that control is taken
from the peripheral they are connected to and overridden by values
present in the CTRL_CONF_* registers for the pad in the control module.
The actual toggling happens from the wkup_m3, so use a DT property from
thea wkup_m3_ipc node to allow the PM code to communicate the necessity
for placing the IOs into isolation to the firmware.
Signed-off-by: Dave Gerlach <[email protected]>
Signed-off-by: Keerthy <[email protected]>
Signed-off-by: Drew Fustini <[email protected]>
---
drivers/soc/ti/wkup_m3_ipc.c | 14 ++++++++++++--
include/linux/wkup_m3_ipc.h | 1 +
2 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/drivers/soc/ti/wkup_m3_ipc.c b/drivers/soc/ti/wkup_m3_ipc.c
index 974b4118a893..e7ae942b7014 100644
--- a/drivers/soc/ti/wkup_m3_ipc.c
+++ b/drivers/soc/ti/wkup_m3_ipc.c
@@ -46,6 +46,8 @@
#define IPC_VTT_STAT_MASK (0x1 << 3)
#define IPC_VTT_GPIO_PIN_SHIFT (0x4)
#define IPC_VTT_GPIO_PIN_MASK (0x3f << 4)
+#define IPC_IO_ISOLATION_STAT_SHIFT (10)
+#define IPC_IO_ISOLATION_STAT_MASK (0x1 << 10)
#define M3_STATE_UNKNOWN 0
#define M3_STATE_RESET 1
@@ -228,6 +230,11 @@ static void wkup_m3_set_vtt_gpio(struct wkup_m3_ipc *m3_ipc, int gpio)
(gpio << IPC_VTT_GPIO_PIN_SHIFT);
}
+static void wkup_m3_set_io_isolation(struct wkup_m3_ipc *m3_ipc)
+{
+ m3_ipc->isolation_conf = (1 << IPC_IO_ISOLATION_STAT_SHIFT);
+}
+
/* Public functions */
/**
* wkup_m3_set_mem_type - Pass wkup_m3 which type of memory is in use
@@ -308,8 +315,8 @@ static int wkup_m3_prepare_low_power(struct wkup_m3_ipc *m3_ipc, int state)
wkup_m3_ctrl_ipc_write(m3_ipc, m3_ipc->resume_addr, 0);
wkup_m3_ctrl_ipc_write(m3_ipc, m3_power_state, 1);
wkup_m3_ctrl_ipc_write(m3_ipc, m3_ipc->mem_type |
- m3_ipc->vtt_conf, 4);
-
+ m3_ipc->vtt_conf |
+ m3_ipc->isolation_conf, 4);
wkup_m3_ctrl_ipc_write(m3_ipc, DS_IPC_DEFAULT, 2);
wkup_m3_ctrl_ipc_write(m3_ipc, DS_IPC_DEFAULT, 3);
wkup_m3_ctrl_ipc_write(m3_ipc, DS_IPC_DEFAULT, 5);
@@ -519,6 +526,9 @@ static int wkup_m3_ipc_probe(struct platform_device *pdev)
dev_warn(dev, "Invalid VTT GPIO(%d) pin\n", temp);
}
+ if (of_find_property(np, "ti,set-io-isolation", NULL))
+ wkup_m3_set_io_isolation(m3_ipc);
+
/*
* Wait for firmware loading completion in a thread so we
* can boot the wkup_m3 as soon as it's ready without holding
diff --git a/include/linux/wkup_m3_ipc.h b/include/linux/wkup_m3_ipc.h
index 2bc52c6381d5..b706eac58f92 100644
--- a/include/linux/wkup_m3_ipc.h
+++ b/include/linux/wkup_m3_ipc.h
@@ -34,6 +34,7 @@ struct wkup_m3_ipc {
int mem_type;
unsigned long resume_addr;
int vtt_conf;
+ int isolation_conf;
int state;
struct completion sync_complete;
--
2.32.0
On 13:53-20220219, Drew Fustini wrote:
> Improve the wkup_m3_ipc driver to better support the TI Wakeup Cortex M3
> device found on TI AM33xx and AM43xx SoCs.
>
> This series derives from these commits in the ti-linux-5.10.y branch of
> the TI Linux repo [1]:
>
> 6ab4eff1034b ("remoteproc: move rproc_da_to_va declaration to remoteproc.h")
> 2a9be39a26f7 ("dt-bindings: wkup_m3_ipc: Add vtt toggling bindings")
> c65263f9e12c ("wkup_m3_ipc: Add support for toggling VTT regulator")
> 5c6c821803e1 ("dt-bindings: wkup_m3_ipc: Add ti,io-isolation property")
> 196c46f7577d ("wkup_m3_ipc: Add support for IO Isolation")
> c28acc847e5d ("soc: ti: wkup_m3_ipc: Add support for i2c voltage scaling")
> a4f9ef4ab5ca ("ARM: dts: am437x-gp-evm: Enable wkup_m3 control of IO isolation")
> 94de756f1771 ("ARM: dts: am33xx: Add scale data fw to wkup_m3_ipc node")
> b7ae4b063793 ("ARM: dts: am43xx: Add scale data fw to wkup_m3_ipc node")
> 451ec7871ae7 ("soc: ti: wkup_m3_ipc: Add debug option to halt m3 in suspend")
>
> Minor changes have been made to some patches to resolve conflicts and
> to split i2c voltage scaling dt-bindings into separate patch.
>
> [1] git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git
>
> Dave Gerlach (10):
> dt-bindings: wkup_m3_ipc: Add vtt toggling bindings
> soc: ti: wkup_m3_ipc: Add support for toggling VTT regulator
> dt-bindings: wkup_m3_ipc: Add ti,io-isolation property
> soc: ti: wkup_m3_ipc: Add support for IO Isolation
> ARM: dts: am437x-gp-evm: Enable wkup_m3 control of IO isolation
> dt-bindings: wkup_m3_ipc: Add scale-data-fw property
> soc: ti: wkup_m3_ipc: Add support for i2c voltage scaling
> ARM: dts: am33xx: Add scale data fw to wkup_m3_ipc node
> ARM: dts: am43xx: Add scale data fw to wkup_m3_ipc node
> soc: ti: wkup_m3_ipc: Add debug option to halt m3 in suspend
>
> Suman Anna (1):
> remoteproc: move rproc_da_to_va declaration to remoteproc.h
This series seems to needing to go to various maintainers here
Series should cleanup (example: txt files to yaml bindings),
prior to creating patch series for each maintainer. I'd suggest bindings
and drivers in 1 kernel rev and follow it up with dts updata for the
next rev.
>
> .../bindings/soc/ti/wkup_m3_ipc.txt | 91 ++++++++
> arch/arm/boot/dts/am335x-bone-common.dtsi | 4 +
> arch/arm/boot/dts/am335x-evm.dts | 4 +
> arch/arm/boot/dts/am335x-evmsk.dts | 4 +
> arch/arm/boot/dts/am437x-gp-evm.dts | 5 +
> arch/arm/boot/dts/am437x-sk-evm.dts | 4 +
> arch/arm/boot/dts/am43x-epos-evm.dts | 4 +
> drivers/remoteproc/remoteproc_internal.h | 1 -
> drivers/soc/ti/wkup_m3_ipc.c | 208 +++++++++++++++++-
> include/linux/remoteproc.h | 1 +
> include/linux/wkup_m3_ipc.h | 13 ++
> 11 files changed, 334 insertions(+), 5 deletions(-)
>
> --
> 2.32.0
>
--
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D)/Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D