Merge branch 'sdk-2.2.0'

Upgrade to sdk 2.2.0, which grings at least one bug fix (correctly
advertising break support to the host).

The rest is a moderately interesting watchdog fix, and some preliminary
work for Pico-2 (not tested).

Signed-off-by: Marc Zyngier <maz@kernel.org>
diff --git a/m1-pd-bmc.h b/m1-pd-bmc.h
index 9e62316..4c1ccc7 100644
--- a/m1-pd-bmc.h
+++ b/m1-pd-bmc.h
@@ -11,7 +11,7 @@
 
 struct gpio_pin_config {
 	uint16_t		pin;
-	enum gpio_function	mode;
+	gpio_function_t		mode;
 	int			dir;
 	bool			pu;
 	bool			level;
@@ -73,3 +73,15 @@
 	} while(0)
 
 #define ARRAY_SIZE(arr)	(sizeof(arr) / sizeof((arr)[0]))
+
+/*
+ * Stupid hack. Probably best to move this to a per-platform file if
+ * this ever grows.
+ */
+#if defined(RASPBERRYPI_PICO)
+#define FRQ_KHZ	133000
+#elif defined(RASPBERRYPI_PICO2)
+#define FRQ_KHZ	150000
+#else
+#error Unknown board
+#endif
diff --git a/pico-sdk b/pico-sdk
index 6a7db34..a1438df 160000
--- a/pico-sdk
+++ b/pico-sdk
@@ -1 +1 @@
-Subproject commit 6a7db34ff63345a7badec79ebea3aaef1712f374
+Subproject commit a1438dff1d38bd9c65dbd693f0e5db4b9ae91779
diff --git a/start.c b/start.c
index 383a5b5..b3e0c49 100644
--- a/start.c
+++ b/start.c
@@ -2,6 +2,7 @@
 
 #include <stddef.h>
 
+#include "hardware/clocks.h"
 #include "bsp/board.h"
 #include "tusb.h"
 #include "m1-pd-bmc.h"
@@ -428,7 +429,7 @@
 
 	set_upstream_ops(false);
 
-	success = set_sys_clock_khz(133000, false);
+	success = set_sys_clock_khz(FRQ_KHZ, false);
 
 	board_init();
 
diff --git a/vdmtool.c b/vdmtool.c
index 556116d..bf778fa 100644
--- a/vdmtool.c
+++ b/vdmtool.c
@@ -731,8 +731,11 @@
 
 static int64_t tick_cb(alarm_id_t id, void *arg)
 {
-	watchdog_update();
-
+	/*
+	 * Only re-arm the timer. The interrupt should cause the main
+	 * loop to pet the watchdog. If we're stuck anywhere else,
+	 * no petting will happen and the watchdog will bite.
+	 */
 	return TICK_PERIOD_US;
 }
 
@@ -751,6 +754,8 @@
 	while (1) {
 		bool busy = false;
 
+		watchdog_update();
+
 		for_each_cxt(cxt) {
 			gpio_put(PIN(cxt, LED_G), HIGH);
 			busy |= m1_pd_bmc_run_one(cxt);