The “USB Accessories Disabled” message can appear even though the Casio CDP-220R has its own mains power supply.
Apple recommends disconnecting the accessory, reconnecting it, trying another port, and connecting it directly to the Mac rather than through a hub.
You have already tried different ports and cables and confirmed that no hub is involved.
The next step is to determine at which point the connection is failing: USB detection, MIDI detection, or communication with Logic Pro or GarageBand.
First, disconnect the USB cable from both the Mac and the Casio. Turn the Casio off, then turn it back on before starting the music software, as recommended in the CDP-220R manual.
Reconnect the USB cable directly to the Mac. (CASIO Official Website)
Then open System Information and select USB under Hardware.
Check whether the Casio, or a device identified as “CASIO USB-MIDI,” appears.
If it does not appear in System Information, macOS is not currently listing the keyboard as a connected USB device.
Since you have already tested different ports and cables and the same result occurs on two Macs, that information would be useful to provide to Casio for further troubleshooting.
If the keyboard does appear in System Information, open Audio MIDI Setup, choose Window > Show MIDI Studio, and check whether the keyboard appears there.
Apple states that USB MIDI devices are normally detected automatically.
If the device is not shown, click the Rescan MIDI button and confirm that the keyboard is connected and turned on. (Apple Support)
If the Casio appears in MIDI Studio, test the MIDI connection rather than proceeding immediately to Logic Pro or GarageBand.
Select the device, click Test MIDI Setup, and play notes on the Casio.
Apple explains that MIDI activity can be checked in MIDI Studio during this test. (Apple Support)
This gives three distinct results:
If the Casio does not appear in System Information, the problem is occurring before macOS has listed the keyboard as a USB device.
If it appears in System Information but not in Audio MIDI Setup, use Rescan MIDI and repeat the connection test.
If it appears in Audio MIDI Setup and responds during the MIDI test, the USB and MIDI connection is working, and the next step would be to check the device selection and MIDI settings in Logic Pro or GarageBand.
The Terminal command stopped the “USB Accessories Disabled” message, but it did not make the keyboard available to Logic Pro or GarageBand.
Therefore, stopping the message did not restore MIDI communication in this case.
Casio's USB-MIDI compatibility information lists macOS 15 as compatible and indicates that a special driver is not required.
The CDP-220R manual also identifies “CASIO USB-MIDI” as the device used with Mac music software.
For that reason, installing the Windows driver would not appear relevant to this Mac setup. (CASIO Official Website)
If the CDP-220R still does not appear in System Information on either Mac after these tests, I would give Casio the following information: the keyboard triggers the “USB Accessories Disabled” message and does not appear in macOS System Information on either of two Macs, despite testing different ports and USB cables. That should give Casio a clearer basis for advising on further troubleshooting.
Apple's USB troubleshooting information:
If you see USB Devices Disabled on your Mac
Apple's MIDI detection instructions:
If a connected MIDI device isn’t shown in Audio MIDI Setup on Mac
Apple's MIDI testing instructions:
Test your MIDI setup
Casio's USB-MIDI compatibility information:
Casio USB-MIDI compatibility information
The CDP-220R manual:
Casio CDP-220R manual