dd
is unreliable for that purpose on an SSD because of the overprovisioning. Better is to use blkdiscard
.
sudo blkdiscard -sf /dev/name-of-device-here
The firmware will normally not be touched by this. It’s located in a section of the device that isn’t accessible from userspace.