Preheat oven to 350°F (175°C). Grease and flour two 9-inch round cake pans or line them with parchment.
In a large bowl, whisk together flour, baking powder, baking soda, and salt.
In another bowl, beat butter and sugar until light and fluffy (about 3–4 minutes).
Add egg yolks one at a time, beating well after each. Stir in vanilla extract.
Add dry ingredients to the butter mixture in three parts, alternating with buttermilk. Begin and end with dry mix.
Gently fold in the mashed black raspberries.
In a separate bowl, beat egg whites until stiff peaks form. Fold into the batter carefully.
Divide batter between pans. Bake for 30–35 minutes or until a toothpick inserted in the center comes out clean.
Cool in pans for 10 minutes, then transfer to wire racks to cool completely.
(Optional) Prepare frosting: Beat butter until creamy, add powdered sugar gradually with milk and vanilla until smooth. Frost the cooled cakes and garnish with berries.