The recent downgrade of Spanish debt by the S&P is not going to have a significant effect on the bonds' eligibility as collateral at the ECB. The ECB takes the best of the four ratings of Moody’s, S&P, Fitch, and DBRS to determine the eligibility for repo collateral. DBRS currently has Spain as A−, making downgrades by other rating agencies irrelevant - for now. Private sector collateral requirements are based on different criteria (h/t Kostas Kalevras), but the impact of the private sector changing collateral requirements will be minimal. That's because Span's banking system is entirely dependent on the ECB for funding (€378 bn borrowed) - and the ECB criteria is what ultimately matters. Even if all the rating agencies (including DBRS) assign junk ratings to Spanish bonds, the ECB would make them eligible automatically as soon as Spain officially requests the bailout - which should be coming soon.
A DBRS downgrade, even by one notch, would however have an impact on haircuts. In the AAA to A- range the haircut is 1.5% for the shorter maturity bonds and 4% for the longer ones. In the BBB+ to BBB- range (DBRS is one notch above that, while the other rating agencies are already there), the equivalent haircuts go up to 6.5% and 9%. It's quite amazing how one relatively small rating agency in Canada has the power to increase the ECB repo haircut requirements by 5% for the whole Spanish banking system.
These relatively loose inclusion criteria by the ECB are only available for central government bonds. Local and regional bonds (the equivalent to municipal bonds in the US) do not qualify for such eligibility framework. The ECB will simply not accept junk-rated regional bonds. Moreover DBRS does not rate many regional bonds in Europe, leaving them exposed to the big three rating agencies.
What makes the situation tricky is that many Spanish banks use regional bonds as collateral at the ECB. And many of these bonds are on the cusp of losing their investment grade status. In fact if Spain's central government bonds are downgraded to junk, the regional debt will get downgraded immediately after. That's because rating agencies typically can not leave regional debt unchanged when the central government bonds have been downgraded (that criteria to some extent applies to banks as well - the S&P followed the downgrade of Spain with downgrades of Banco Santander SA and Banco Bilbao Vizcaya Argentaria, Spain's largest lenders).
As the table below from JPMorgan shows, a number of Spanish regional bonds are already at risk. It means that some Spanish banks may end up with collateral shortage, requiring emergency funding from the Bank of Spain via the ELA program. Rating agency risk remains quite real for Spain and its banking system.