Date: Tue, 24 Oct 2023 23:43:12 +0300 From: titus <titus@edc.ro> To: freebsd-arm <freebsd-arm@freebsd.org> Subject: RK3568 clock tree problems Message-ID: <F311B0DB-6BBE-43B7-B287-9314DA7A2AF3@edc.ro>
next in thread | raw e-mail | index | archive | help
while trying to make emmc work on an opi 3b i spotted some possible = problems with the clock tree / drivers the problems won=E2=80=99t surface if you don=E2=80=99t want to set to = many frequencies but still rk_clk_mux.c=20 will select any bogus frequency from the last parent if the initial = set_clock_freq call had ROUND_UP or ROUND_DOWN flag because it does not keeps a best frequency rk_clk_mux.c may select a =E2=80=9CBUSY=E2=80=9D parent if the parent = chosen is busy and it need its freq adjusted and the function will fail = but return succes because the=20 last call that sets the parent freq will ignore return code (the = set_freq function succeeds when DRYRUN is set even if the clock is busy) rk_clk_composite will not try to find a good frequency starting with the = current parent but with the first one and may change parent when only changing the div is possible neither of the above will stop searching if the required freq is reached rk3568_cru has incorrect div with definitions for some clocks which make = their designed frequency unconfigurable ex div25m with a parent of 1GHz has a div width of 5 bits instead of 6 i have some rough/wip patches if anyone needs them
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?F311B0DB-6BBE-43B7-B287-9314DA7A2AF3>