CTCaer
ef1ce85735
bdk: sdmmc: rename bkops define
...
And remove dead code.
2026-03-18 22:35:01 +02:00
CTCaer
25fda88e46
bdk: sdmmc: homogenize return values
...
The actual target of this refactoring.
2026-02-22 08:32:34 +02:00
CTCaer
d328d56268
bdk: se: homogenize return values
2026-02-22 03:08:34 +02:00
CTCaer
e6984a149b
bdk: sdmmc: remove dependency to ram for init
2026-02-12 21:53:59 +02:00
CTCaer
9171fa70c9
bdk: mem: rename sdmmc dma buffer
2026-02-12 21:38:56 +02:00
CTCaer
607b19067a
bdk: se: use classic naming convention for XTS
2026-01-06 22:52:21 +02:00
CTCaer
4797b42e76
bdk: sdmmc: add defines for max block number
2025-12-17 04:30:12 +02:00
CTCaer
5176ce4394
bdk: sdmmc: correct drive ohms comment
2025-11-27 12:14:43 +02:00
CTCaer
9c028cd94a
bdk: clock: streamline sdmmc func naming
...
Additionally, restored the pclock variable because of _clock_sdmmc_config_clock_host store order.
2025-11-26 14:37:14 +02:00
CTCaer
bdf556fd36
bdk: storage: small mmc refactoring
...
- Correct some Response Type names
- And use _def for mmc defines similarly to sd_def
2025-08-27 15:08:11 +03:00
CTCaer
9fe953bee1
bdk: use f_unmount instead of null f_mount
2025-06-22 13:34:42 +03:00
CTCaer
05cc9b6985
bdk: refactor several comments and defines
2025-06-22 13:32:32 +03:00
CTCaer
b3194f6379
bdk: mc: fix warning for arbiter check
2025-04-30 09:14:32 +03:00
CTCaer
b9496f81b1
bdk: sdmmc: add extention regs read/parse
2025-01-24 16:42:14 +02:00
CTCaer
595ac2c11e
bdk: sdmmc: refactor error checking on rw
...
And also check if card status is ok after a read/write.
2025-01-24 15:44:33 +02:00
CTCaer
dcd4e4c4ec
bdk: sdmmc: check that cmd timed out if SDSC
...
Instead of assuming that, check it.
This fix will make SDUC not to be assumed as SDSC.
2025-01-24 15:40:38 +02:00
CTCaer
018ed3f38a
bdk: sdmmc: update unstuff_bits to use mod
...
Since unstuff_bits only supports 128bits, instead of subtracting the correct amount of bits with the offset array, use % 128.
2025-01-24 15:39:17 +02:00
CTCaer
e030a4ad6d
bdk: sdmmc: small refactor
2025-01-24 15:30:10 +02:00
CTCaer
5ce22a67dc
bdk: sdmmc: check for out bounds access
2025-01-24 15:21:20 +02:00
CTCaer
9e239df39e
bdk: constify various args
2024-10-04 21:45:57 +03:00
CTCaer
75a4a8ba1d
bdk: sdmmc: remove higher power limits
...
UHS-I Cards force a max of 1.44W even if higher modes are selected.
This does not change functionality, so remove them as unused.
2024-06-10 13:37:28 +03:00
CTCaer
a37b5c7841
bdk: sdmmc: no need to raise power limit for HS25
2024-06-10 13:24:07 +03:00
CTCaer
48334779a5
bdk: sdmmc: error reporting changes
...
- Correct transfer error message
- Add debug print for deinit
2024-06-08 17:41:11 +03:00
CTCaer
85eb5489fe
bdk: pmc: rename io/det power defines
2024-06-08 12:16:07 +03:00
CTCaer
a34206df5b
bdk: sdmmc: small changes
...
- Log warning for comp pad calibration timeout
- Rename some func/defines
- Increase SDMMC1 power disable wait to 10ms
No real perceived functionality change.
2024-06-07 17:09:30 +03:00
CTCaer
9d79af231e
bdk: use static where it should
2024-06-02 07:09:34 +03:00
CTCaer
d687b53249
bdk: heap: add zalloc and utilize it
2024-03-27 09:00:53 +02:00
CTCaer
f126486266
bdk: sdmmc: utilize block size defines
2024-03-12 15:47:14 +02:00
CTCaer
41d3565353
bdk: sdmmc: deduplicate function modes get
...
And parse the whole info
2023-12-27 15:01:20 +02:00
CTCaer
1e28320e5a
bdk: t210: add more mmio addresses
...
And simplify relevant drivers that hardcoded them.
2023-07-31 16:59:15 +03:00
CTCaer
820e6d5a6e
bdk: update cal0 struct
2023-06-10 23:48:45 +03:00
CTCaer
01afd2de56
bdk: sdmmc: properly report comp pad status
...
The reporting of the resistor being shorted or open was swapped. Fix that so it's immediately known what's the issue.
2023-06-09 10:37:47 +03:00
CTCaer
d621d96af1
bdk: sdmmc: refactor comments
2023-06-09 10:36:29 +03:00
CTCaer
bb10b8aea3
bdk: sdmmc: small refactor
2023-04-06 10:19:53 +03:00
CTCaer
811fa4c88b
bdk: sdmmc: add SD registers debug printing
...
Can be enabled with `SDMMC_DEBUG_PRINT_SD_REGS`
2023-04-06 10:13:35 +03:00
CTCaer
f4bf48e76a
bdk: sdmmc: add driver type set support
2023-03-31 09:04:10 +03:00
CTCaer
d258c82d52
bdk: sdmmc: add UHS DDR200 support
...
The bdk flag BDK_SDMMC_UHS_DDR200_SUPPORT can be used to enable it.
SD Card DDR200 (DDR208) support
Proper procedure:
1. Check that Vendor Specific Command System is supported.
Used as Enable DDR200 Bus.
2. Enable DDR200 bus mode via setting 14 to Group 2 via CMD6.
Access Mode group is left to default 0 (SDR12).
3. Setup clock to 200 or 208 MHz.
4. Set host to DDR bus mode that supports such high clocks.
Some hosts have special mode, others use DDR50 and others HS400.
5. Execute Tuning.
The true validation that this value in Group 2 activates it, is that DDR50 bus
and clocks/timings work fully after that point.
On Tegra X1, that can be done with DDR50 host mode.
Tuning though can't be done automatically on any DDR mode.
So it needs to be done manually and selected tap will be applied from the
biggest sampling window.
Finally, all that simply works, because the marketing materials for DDR200 are
basically overstatements to sell the feature. DDR200 is simply SDR104 in DDR mode,
so sampling on rising and falling edge and with variable output data window.
It can be supported by any host that is fast enough to support DDR at 200/208MHz
and can do hw/sw tuning for finding the proper sampling window in that mode.
Using a SDMMC controller on DDR200 mode at 400MHz, has latency allowance implications. The MC/EMC must be clocked enough to be able to serve the requests in time (512B in 1.28 ns).
2023-03-31 08:54:13 +03:00
CTCaer
7f32c6d211
bdk: sd: better removal detection handling
2023-03-31 08:31:20 +03:00
CTCaer
2f7e841b50
bdk: sdmmc: move sdr12 setup for better readability
2023-03-31 08:29:20 +03:00
CTCaer
29e32f09fb
bdk: sdmmc: properly identify sdmmc1 clk config
...
Remove schmitt trigger config from clock pin on sdmmc1 for identifying previous pinmuxing state.
2023-03-31 08:27:48 +03:00
CTCaer
b123571c56
bdk: sdmmc: only allow power raise if SDR50 and up
...
As per spec.
2023-03-31 08:26:19 +03:00
CTCaer
b7164a629f
bdk: sdmmc: allow max power limit to be set
...
Even if it defaults to 1.44W.
Some cards' firmware maybe be bugged.
The 3.3V regulator on all SKUs allow more than 800mA current anyway.
2023-03-31 08:24:52 +03:00
CTCaer
25be98b7e3
bdk: sdmmc: add UHS DDR50 support
...
But disable it by default in the auto selection.
2023-03-31 08:23:10 +03:00
CTCaer
502fc1ed50
bdk: sdmmc: rename ddr100 to the actual HS100 name
2023-03-31 08:15:40 +03:00
CTCaer
5e134ed54b
bdk: sdmmc: refactor defines
2023-03-31 08:00:14 +03:00
CTCaer
4cfe5f241e
bdk: sdmmc: remove eMMC OC
...
Additionally, the flag BDK_SDMMC_OC_AND_EXTRA_PRINT is now just BDK_SDMMC_EXTRA_PRINT
2023-03-31 07:55:17 +03:00
CTCaer
9a222e0e49
bdk: sdmmc: rename divisor param to card clock
2023-03-31 07:53:46 +03:00
CTCaer
298893f404
bdk: sdmmc: remove powersave arg from sdmmc init
2023-03-31 07:51:43 +03:00
CTCaer
1ce5bb10f8
bdk: sdmmc: refactor debug prints
2023-03-31 07:49:26 +03:00
CTCaer
d286ee4e9d
bdk: sd: only clear inserted when requested
...
Also rename var to further explain its usage
2023-02-23 01:25:05 +02:00