A source told ESPN's Jeff Passan that the deal -- announced Monday by general manager A.J. Preller -- is for $5 million with a club option for the third year.
Johnson, 28, struggled in the big leagues in his previous stint. The 2012 first-round pick of the Cubs made only one appearance for Chicago before being waived in 2017 and claimed by the Giants. He played for San Francisco in 2018, posting a 5.56 ERA over 37 appearances.
He spent the 2019 season with the Hanshin Tigers in Nippon Professional Baseball, where he went 2-3 with a 1.38 ERA and 40 holds in 58 appearances.
Johnson will make $2 million in each of the 2020 and 2021 seasons, sources said. The 2022 option is for $3 million and includes a $1 million buyout.
The Associated Press contributed to this report.