mbox series

[v5,0/3] Add dw_mmc support for rk3576

Message ID 010201919996ef8a-db8bbe89-3c18-4dc3-bd0c-6498f09d978a-000000@eu-west-1.amazonses.com (mailing list archive)
Headers show
Series Add dw_mmc support for rk3576 | expand

Message

Detlev Casanova Aug. 28, 2024, 3:24 p.m. UTC
The SD card controller on the rk3576 SoC stores the phase settings into
the dw_mmc controller, so the code has to be adapted to implement that.

Although the feature can be detected through the USRID register value, the
decision to use it is based on the compatible.

The compatible for rk3576 is added in its own group of compatible to mark
that all devices compatible with rk3576 have internal phase settings and
don't have the ciu-drive and ciu-sample clocks.

Changes since v4:
- Drop commit that ignores phase above 270 degrees
- Use a bool instead of int for internal_phase field
- Fix pahse typo

Changes since v3:
- Remove internal phase auto detection
- Set compatible in own block, with own dt_parse function
- Add internal_phase variable
- Use function to set clock parameters based on internal_phase variable
  instead of multiple ifs
- Use different commit for skipping phases higher than 270

Changes since v2:
- Drop rockchip,v2-tuning and use compatible-based detection
- Fix coding style

Changes since v1:
- Renamed use-v2-tuning to v2-tuning
- Rewrite v2-tuning description as the hardware feature

Detlev.

Detlev Casanova (2):
  dt-bindings: mmc: Add support for rk3576 dw-mshc
  mmc: dw_mmc-rockchip: Add support for rk3576 SoCs

Shawn Lin (1):
  mmc: dw_mmc-rockchip: Add internal phase support

 .../bindings/mmc/rockchip-dw-mshc.yaml        |   2 +
 drivers/mmc/host/dw_mmc-rockchip.c            | 217 ++++++++++++++++--
 2 files changed, 204 insertions(+), 15 deletions(-)

Comments

Heiko Stuebner Aug. 29, 2024, 11:43 a.m. UTC | #1
Am Mittwoch, 28. August 2024, 17:24:51 CEST schrieb Detlev Casanova:
> The SD card controller on the rk3576 SoC stores the phase settings into
> the dw_mmc controller, so the code has to be adapted to implement that.
> 
> Although the feature can be detected through the USRID register value, the
> decision to use it is based on the compatible.
> 
> The compatible for rk3576 is added in its own group of compatible to mark
> that all devices compatible with rk3576 have internal phase settings and
> don't have the ciu-drive and ciu-sample clocks.
> 
> Changes since v4:
> - Drop commit that ignores phase above 270 degrees
> - Use a bool instead of int for internal_phase field
> - Fix pahse typo

Sending through some Amazon thing broke your message-ids in this series
too.
Ulf Hansson Sept. 3, 2024, 12:37 p.m. UTC | #2
On Wed, 28 Aug 2024 at 17:24, Detlev Casanova
<detlev.casanova@collabora.com> wrote:
>
> The SD card controller on the rk3576 SoC stores the phase settings into
> the dw_mmc controller, so the code has to be adapted to implement that.
>
> Although the feature can be detected through the USRID register value, the
> decision to use it is based on the compatible.
>
> The compatible for rk3576 is added in its own group of compatible to mark
> that all devices compatible with rk3576 have internal phase settings and
> don't have the ciu-drive and ciu-sample clocks.
>
> Changes since v4:
> - Drop commit that ignores phase above 270 degrees
> - Use a bool instead of int for internal_phase field
> - Fix pahse typo
>
> Changes since v3:
> - Remove internal phase auto detection
> - Set compatible in own block, with own dt_parse function
> - Add internal_phase variable
> - Use function to set clock parameters based on internal_phase variable
>   instead of multiple ifs
> - Use different commit for skipping phases higher than 270
>
> Changes since v2:
> - Drop rockchip,v2-tuning and use compatible-based detection
> - Fix coding style
>
> Changes since v1:
> - Renamed use-v2-tuning to v2-tuning
> - Rewrite v2-tuning description as the hardware feature
>
> Detlev.
>
> Detlev Casanova (2):
>   dt-bindings: mmc: Add support for rk3576 dw-mshc
>   mmc: dw_mmc-rockchip: Add support for rk3576 SoCs
>
> Shawn Lin (1):
>   mmc: dw_mmc-rockchip: Add internal phase support
>
>  .../bindings/mmc/rockchip-dw-mshc.yaml        |   2 +
>  drivers/mmc/host/dw_mmc-rockchip.c            | 217 ++++++++++++++++--
>  2 files changed, 204 insertions(+), 15 deletions(-)
>

The series applied for next, thanks!

Kind regards
Uffe