mbox series

[v3,0/2] Add SMI reset and clamp for MediaTek MT8188 SoC

Message ID 20250121064934.13482-1-friday.yang@mediatek.com (mailing list archive)
Headers show
Series Add SMI reset and clamp for MediaTek MT8188 SoC | expand

Message

Friday Yang Jan. 21, 2025, 6:49 a.m. UTC
Based on tag: next-20250120, linux-next/master

When we enable/disable power domain, the SMI LARBs linked to this power
domain could be affected by the bus glitch. To avoid this issue, SMI
need to apply clamp and reset opereations.

This patch mainly add these functions:
1) Register genpd callback for SMI LARBs and handle this power domain
   status change in SMI driver.
2) Add bindings to support SMI Sub Common for MT8188.
3) Add bindings to support SMI larbs reset opearation.

Changes v3:
- Remove redundant descriptions for 'resets' and 'reset-names'
- Modify the requirements for 'resets' and 'reset-names'
- Rename 'mtk_smi_larb_parse_clamp' to 'mtk_smi_larb_parse_clamp_optional'
- Rename 'mtk_smi_larb_parse_reset' to 'mtk_smi_larb_parse_reset_optional'
- Merge 'mtk_smi_larb_clamp_protect_enable' and
  'mtk_smi_larb_clamp_protect_disble' into one function
- Modify the definition for mtk_smi_larb_clamp_port_mt8188,
  use 'larbid' as the index of the array
- Use 'syscon_regmap_lookup_by_phandle' instead of 'device_node_to_regmap'
- Do Not parse 'resets', just check the return value of
  'devm_reset_control_get'
- Add 'has_gals' flag for 'mtk_smi_sub_common_mt8188'

v2:
https://lore.kernel.org/lkml/20241120063701.8194-2-friday.yang@mediatek.com/
https://lore.kernel.org/lkml/20241120063701.8194-3-friday.yang@mediatek.com/

friday.yang (2):
  dt-bindings: memory: mediatek: Add support for SMI reset and clamp
  memory: mtk-smi: mt8188: Add support for SMI reset and clamp

 .../mediatek,smi-common.yaml                  |   2 +
 .../memory-controllers/mediatek,smi-larb.yaml |  20 +++
 drivers/memory/mtk-smi.c                      | 141 +++++++++++++++++-
 3 files changed, 159 insertions(+), 4 deletions(-)

--
2.46.0