We study heavy-heavy and heavy-light quark systems for charm with a relativistic heavy quark action in 2+1 flavor lattice QCD. Configurations are generated by the PACS-CS Collaboration at the lattice spacing is $a=0.09$ fm with the lattice size of $32^3times 64$ employing the $O(a)$-improved Wilson quark action and the Iwasaki gauge action. We present preliminary results for the charmonium spectrum and the $D$ and $D_s$ meson decay constants evaluated at 3.5 MeV$< m_{rm ud}<$ 12 MeV with $m_{rm s}$ around the physical value. We investigate the dynamical quark mass dependences of the hyperfine and the orbital splittings. The decay constants are compared with the recent experimental values.