What do you mean "the same"? ATmega1284p is not available in BGA package and this chip clearly is a BGA chip.
And if you are talking about pin names like TDI, TDO, TCK, then there are thousands of chips with those pins, it is just a standard JTAG port.
And if it is an Apple chip, you can rest assured there is no way to read it.
And also SWDIO/SWCLK suggest that it is likely to be an ARM Cortex device. I would guess some NXP device.