Based on the original Amlogic-GXBB watchdog driver, support
for Amlogic-T7 watchdog is added.
Huqiang Qin (4):
dt-bindings: watchdog: Add support for Amlogic-T7 SoCs
watchdog: Add a new struct for Amlogic-GXBB driver
watchdog: Add support for Amlogic-T7 SoCs
arm64: dts: Add watchdog node for Amlogic-T7 SoCs
.../watchdog/amlogic,meson-gxbb-wdt.yaml | 1 +
arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi | 6 ++++++
drivers/watchdog/meson_gxbb_wdt.c | 21 ++++++++++++++++---
3 files changed, 25 insertions(+), 3 deletions(-)
--
2.37.1
Compared with the previous Amlogic-GXBB, the watchdog of Amlogic-T7
has a different reset enable bit.
Signed-off-by: Huqiang Qin <[email protected]>
---
drivers/watchdog/meson_gxbb_wdt.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/watchdog/meson_gxbb_wdt.c b/drivers/watchdog/meson_gxbb_wdt.c
index a6c0d743b607..dc48b0a332c3 100644
--- a/drivers/watchdog/meson_gxbb_wdt.c
+++ b/drivers/watchdog/meson_gxbb_wdt.c
@@ -147,8 +147,13 @@ static const struct wdt_params gxbb_params = {
.rst_shift = 21,
};
+static const struct wdt_params t7_params = {
+ .rst_shift = 22,
+};
+
static const struct of_device_id meson_gxbb_wdt_dt_ids[] = {
{ .compatible = "amlogic,meson-gxbb-wdt", .data = &gxbb_params, },
+ { .compatible = "amlogic,t7-wdt", .data = &t7_params, },
{ /* sentinel */ },
};
MODULE_DEVICE_TABLE(of, meson_gxbb_wdt_dt_ids);
--
2.37.1
Add watchdog device.
Signed-off-by: Huqiang Qin <[email protected]>
---
arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi b/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi
index 1423d4a79156..6e34d11214b7 100644
--- a/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi
+++ b/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi
@@ -143,6 +143,12 @@ apb4: bus@fe000000 {
#size-cells = <2>;
ranges = <0x0 0x0 0x0 0xfe000000 0x0 0x480000>;
+ watchdog@2100 {
+ compatible = "amlogic,t7-wdt";
+ reg = <0x0 0x2100 0x0 0x10>;
+ clocks = <&xtal>;
+ };
+
uart_a: serial@78000 {
compatible = "amlogic,t7-uart", "amlogic,meson-s4-uart";
reg = <0x0 0x78000 0x0 0x18>;
--
2.37.1
On Wed, Jul 26, 2023 at 07:21:46PM +0800, Huqiang Qin wrote:
> Add watchdog device.
>
> Signed-off-by: Huqiang Qin <[email protected]>
Reviewed-by: Dmitry Rokosov <[email protected]>
> ---
> arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi b/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi
> index 1423d4a79156..6e34d11214b7 100644
> --- a/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi
> +++ b/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi
> @@ -143,6 +143,12 @@ apb4: bus@fe000000 {
> #size-cells = <2>;
> ranges = <0x0 0x0 0x0 0xfe000000 0x0 0x480000>;
>
> + watchdog@2100 {
> + compatible = "amlogic,t7-wdt";
> + reg = <0x0 0x2100 0x0 0x10>;
> + clocks = <&xtal>;
> + };
> +
> uart_a: serial@78000 {
> compatible = "amlogic,t7-uart", "amlogic,meson-s4-uart";
> reg = <0x0 0x78000 0x0 0x18>;
> --
> 2.37.1
>
>
> _______________________________________________
> linux-amlogic mailing list
> [email protected]
> http://lists.infradead.org/mailman/listinfo/linux-amlogic
--
Thank you,
Dmitry