Code DD in box 12 is the total amount of money that your employer and you (through payroll deduction) paid towards health insurance premiums, which may or may not be an HDHP.
Code W in box 12 indicates the amount of money that your employer and your (again, through payroll deduction) contributed to your HSA.
That is, if your employer coded a W in box 12 on your W-2 along with a dollar amount, then your employer thinks you have an HSA. As you seems to realize, you need to be covered by an HDHP to be eligible to contribute to an HSA.
NOTE: if your employer tells you that you have a CDHP, note that this is an industry term, not an IRS term. A CDHP is a reference to the combination of a health plan (could be an HDHP) with some tax-advantaged financial instrument like an HSA, HRA, or FSA.
In short, talk to your employer about the meaning of those codes on your W-2.