Would it be possible, with genetic engineering, to create a form of tree which produces wood with the same strength/hardness as granite, capable of being used in place of stone for castle-style walls and other defense structures? What minerals and/or nutrients would be required?
This plant would not need to be able to survive in the wild, nor will it need to evolve, so don't worry about that level of plausibility. It is ok for the plant to not be self-sustaining, that is it fine for it to require added fertilizer and food to grow. The group creating these plants has access to technology for genetic engineering much greater than Earth's, but otherwise has late-medieval/early renaissance technology.
Minor deviations in the way plants work are fine.
Pure rock is not acceptable, the resulting wood must still be at least technically wood, with some organic material. Essentially, the product must be distinguishable from ordinary inorganic rock when a small bit of it is analyzed in a modern lab without context. I'm OK with a plant that basically creates granite or a similar rock with cellular residue left in the rock, but I would like an explanation on how this plant could grow with this world's physics. How does a plant avoid turning all of its living cells into rock, and still grow to a sizable height?