My question involves criminal law for the state of: California

My boyfriend broke into a guy's house - someone that I was involved with in the past. He went over because he wanted to talk to him. He refused to open the door. My boyfriend broke his window and opened the door. When he went in he had his helmet in hand (he rides a motorcycle) and the guy that lives there hit my boyfriend over the head with a bottle. My boyfriend did not go down but the guy that lives there tried to hold him down by pushing him against the wall. My boyfriend repeatedly told him that he just wanted to talk to him. The guy that lived there began choking him so my boyfriend started hitting him with his helmet. He is now arrested and is being charged with residential burglary and assault with a deadly weapon. He is a first-time offender. We, along with my family and his, don't have the money to hire a lawyer. I would like to know if you think it is worth trying to gather up the money to get a lawyer or if we should just use the public defender. Also, does anyone know what he might be punished with as far as jail time? Do we have any hope? He did not go in with the intention to steal or harm.