diff --git a/esptool.py b/esptool.py
index <HASH>..<HASH> 100755
--- a/esptool.py
+++ b/esptool.py
@@ -2830,6 +2830,7 @@ def main(custom_commandline=None):
 
     parser.add_argument('--chip', '-c',
                         help='Target chip type',
+                        type=lambda c: c.lower().replace('-', ''),  # support ESP32-S2, etc.
                         choices=['auto', 'esp8266', 'esp32', 'esp32s2'],
                         default=os.environ.get('ESPTOOL_CHIP', 'auto'))
esptool: Support different capitalization and hyphenation for --chip argument

Allows (for example) marketing formats like ESP<I>-S2, ESP<I>, plus some
not actually correct formats like ESP-<I>, Esp<I>, etc.