Five days sound enough, but that depends on your places to visit and traveling paces.
Which place(s) in Nagano Prefecture will you visit?
("Nagano" may refer to Nagano Prefecture or Nagano City in the prefecture.)
I suppose you had better expect one full day for a one-way trip on Tateyama Kurobe Alpine Route between Shinano-Omachi and Toyama.
To Shirakawa-go (in Gifu Prefecture), more buses are available from Takayama City (in Gifu Prefecture) than from Kanazawa City (in Ishikawa Prefecture).
If your places to visit in Nagano Prefecture are inside Matsumoto City,
and if you do not tour Tokyo Metropolis,
and if you can reserve your seats in buses from Takayama to Shirakawa-go and from Shirakawa-go to Kanazawa,
you can travel like the below after your Kyoto trips.
Kyoto
--[JR Tokaido Shinkansen] or [Kintetsu lines] or [highway bus]--
Nagoya
--[JR: Ltd. Express "Hida"] or [highway bus]--
Takayama
--[highway bus]--
Shirakawa-go
--[highway bus]--
Kanazawa
--[JR]--
Toyama
--(Tateyama Kurobe Alpine Route)--
Shinano-Omachi
--[JR]--
Matsumoto
--[highway bus]--
Osaka.
: If you just pass by Nagoya and Takayama, you can leave Kyoto in the morning and visit Shirakawa-go on Day (N+1), tour Kanazawa on Day (N+2), travel on Alpine Route on Day (N+3), tour Matsumoto on Day (N+4) and travel back to Osaka on Day (N+5).
: If you tour Nagoya, Takayama and Kanazawa, five days may not be enough for the whole way.
Note
: September 15 and 23 of 2014 will be holidays.
: Please make sure that you pay attention to official information on typhoons when one may approach Japan around the time of this journey.
http://www.jma.go.jp/en/typh/