Only cash contributions (e.g., checks, credit card charges) are acceptable in 529 plans. You’ll have to sell the stock and donate the proceeds. If the stock has appreciated, you’ll owe capital gains tax on your profits; if the value has declined, you’ll be able to take a tax loss.
Items, such as interest, state and local income and sales taxes, charitable contributions, and medical deductions, claimed on Schedule A of Form 1040. Itemized deductions are subtracted from adjusted gross income to arrive at taxable income. The amount of itemized deductions is also subject to a reduction when adjusted gross income exceeds certain limits.