mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 09:11:26 +03:00
12c09aa93400f5d95289856a331e592097baedaa
The MTTCAN controller uses different core clock frequencies depending on the SoC variant: 40MHz for T264 and 50MHz for T194/T234. The 8Mbps data bitrate needs to be an exact divisor of the clock frequency for proper operation. For 40MHz clock: 8Mbps = 8000000 bps (40MHz / 5) For 50MHz clock: 8Mbps = 8333333 bps (50MHz / 6) The previous single MTTCAN_SPEED_8MBPS definition (8333333) only worked correctly for 50MHz clocks and would not divide evenly for 40MHz clocks. Split MTTCAN_SPEED_8MBPS into two separate defines: - MTTCAN_SPEED_8MBPS_40MHZ: 8000000 for exact 8Mbps on 40MHz clock - MTTCAN_SPEED_8MBPS_50MHZ: 8333333 for closest 8Mbps on 50MHz clock Both values use the same production settings (prod_c_can_8m) and will be selected based on the chip's configured clock frequency. The 5Mbps rate remains unchanged as it divides evenly for both clock frequencies. Bug 5497458 Change-Id: I17190ae6821f89d33e76114f20b91dbd65ba25f2 Signed-off-by: Shubhi Garg <shgarg@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3469194 Reviewed-by: Bibek Basu <bbasu@nvidia.com> Tested-by: Kevin Fu <chunhuaif@nvidia.com> GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com> Reviewed-by: svcacv <svcacv@nvidia.com>
Description
No description provided