--- arch/arm/boot/dts/overlays/overlay_map.dts.orig 2026-07-10 05:07:38.000000000 -0700 +++ arch/arm/boot/dts/overlays/overlay_map.dts 2026-07-11 08:26:21.832539399 -0700 @@ -43,6 +43,14 @@ bcm2711; }; + disable-ethernet { + bcm2711 = "disable-ethernet-pi4"; + }; + + disable-ethernet-pi4 { + bcm2711; + }; + disable-wifi { bcm2835; bcm2711; @@ -237,6 +245,14 @@ bcm2712; }; + Pi4ClickShield { + bcm2711 = "Pi4ClickShield-pi4"; + }; + + Pi4ClickShield-pi4 { + bcm2711; + }; + pi3-act-led { renamed = "act-led"; }; --- drivers/usb/gadget/legacy/hid.c.orig 2025-07-08 13:08:17.000000000 -0700 +++ drivers/usb/gadget/legacy/hid.c 2025-07-10 11:37:40.957188746 -0700 @@ -267,6 +267,48 @@ }, }; +/* Additional goop to define a USB raw HID gadget */ + +static struct hidg_func_descriptor raw_hid_data = { + .subclass = 0, /* No subclass */ + .protocol = 0, /* No protocol */ + .report_length = 64, + .report_desc_length = 33, + .report_desc = { +0x06, 0x00, 0xFF, // Usage Page = 0xFF00 (Vendor Defined Page 1) +0x09, 0x01, // Usage (Vendor Usage 1) +0xA1, 0x01, // Collection (Application) +// Input report +0x19, 0x01, // Usage Minimum +0x29, 0x40, // Usage Maximum +0x15, 0x00, // Logical Minimum +0x26, 0xFF, 0x00, // Logical Maximum +0x75, 0x08, // Report Size: 8-bit field size +0x95, 64, // Report Count +0x81, 0x02, // Input (Data, Array, Abs) +// Output report +0x19, 0x01, // Usage Minimum +0x29, 0x40, // Usage Maximum +0x75, 0x08, // Report Size: 8-bit field size +0x95, 64, // Report Count +0x91, 0x02, // Output (Data, Array, Abs) +0xC0 // End Collection + } +}; + +static struct platform_device raw_hid = { + .name = "hidg", + .id = 0, + .num_resources = 0, + .resource = 0, + .dev.platform_data = &raw_hid_data, +}; + +int __init init_raw_hid(void) +{ + pr_info("g_hid: loading raw HID descriptor\n"); + return platform_device_register(&raw_hid); +} MODULE_DESCRIPTION(DRIVER_DESC); MODULE_AUTHOR("Fabien Chouteau, Peter Korsgaard"); @@ -276,6 +318,8 @@ { int status; + init_raw_hid(); + status = platform_driver_probe(&hidg_plat_driver, hidg_plat_driver_probe); if (status < 0)