The quotient \(\Gamma \backslash ({{\,\mathrm{\mathfrak {H}}\,}}\times {{\,\mathrm{\mathfrak {H}}\,}}_p)\) of the product of a Poincaré and a Drinfeld upper half plane by a discrete p-arithmetic subgroup \(\Gamma \) of \({{\,\mathrm{\textrm{SL}}\,}}_2({{\,\mathrm{\mathbb {R}}\,}})\times {{\,\mathrm{\textrm{SL}}\,}}_2({{\,\mathrm{\mathbb {Q}}\,}}_p)\) is equipped with an infinite supply of closed geodesic cycles of real dimension one, which are indexed by ideals in orders in real quadratic fields in which the prime p is non-split. This article lays the foundations for an arithmetic intersection theory of such cycles by defining a p-adic Green’s function generalising the “differences of real quadratic singular moduli” explored in Darmon and Vonk (Duke Math J 170(1):23–93, 2021). When the second cohomology group of \(\Gamma \) is trivial, the values of this p-adic Green’s function are conjectured to be p-adic logarithms of algebraic numbers belonging to a suitable compositum of ring class fields of real quadratic fields. For general \(\Gamma \) , they should encode the analytic contribution to the p-adic height pairing between Stark–Heegner points which are conjecturally defined over the same ring class fields.