linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] dt-bindings: ufs: mediatek,ufs: add compatible for MT8195 SoC
@ 2022-04-15 16:59 Fabien Parent
  2022-04-15 16:59 ` [PATCH 2/2] arm64: dts: mediatek: mt8195: add UFS HCI node Fabien Parent
  2022-04-18 11:49 ` [PATCH 1/2] dt-bindings: ufs: mediatek,ufs: add compatible for MT8195 SoC Krzysztof Kozlowski
  0 siblings, 2 replies; 4+ messages in thread
From: Fabien Parent @ 2022-04-15 16:59 UTC (permalink / raw)
  To: Alim Akhtar, Avri Altman, Rob Herring, Krzysztof Kozlowski,
	Matthias Brugger, Stanley Chu
  Cc: Fabien Parent, linux-scsi, devicetree, linux-kernel,
	linux-arm-kernel, linux-mediatek

Add bindings for the MT8195 UFS support.

The MT8195 SoC requires more clocks to be enabled compared to MT8183 and
MT8192. Document the clocks required for MT8195.

Signed-off-by: Fabien Parent <fparent@baylibre.com>
---
 .../devicetree/bindings/ufs/mediatek,ufs.yaml | 27 ++++++++++++++-----
 1 file changed, 21 insertions(+), 6 deletions(-)

diff --git a/Documentation/devicetree/bindings/ufs/mediatek,ufs.yaml b/Documentation/devicetree/bindings/ufs/mediatek,ufs.yaml
index 32fd535a514a..5ed36e95e933 100644
--- a/Documentation/devicetree/bindings/ufs/mediatek,ufs.yaml
+++ b/Documentation/devicetree/bindings/ufs/mediatek,ufs.yaml
@@ -14,16 +14,31 @@ allOf:
 
 properties:
   compatible:
-    enum:
-      - mediatek,mt8183-ufshci
-      - mediatek,mt8192-ufshci
+    oneOf:
+      - enum:
+          - mediatek,mt8183-ufshci
+          - mediatek,mt8192-ufshci
+      - items:
+          - const: mediatek,mt8195-ufshci
+          - const: mediatek,mt8183-ufshci
 
   clocks:
-    maxItems: 1
+    minItems: 1
+    maxItems: 8
 
   clock-names:
-    items:
-      - const: ufs
+    oneOf:
+      - items:
+          - const: ufs
+      - items:
+          - const: ufs
+          - const: ufs_aes
+          - const: ufs_tick
+          - const: unipro_sysclk
+          - const: unipro_tick
+          - const: unipro_mp_bclk
+          - const: ufs_tx_symbol
+          - const: ufs_mem_sub
 
   phys:
     maxItems: 1
-- 
2.35.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] arm64: dts: mediatek: mt8195: add UFS HCI node
  2022-04-15 16:59 [PATCH 1/2] dt-bindings: ufs: mediatek,ufs: add compatible for MT8195 SoC Fabien Parent
@ 2022-04-15 16:59 ` Fabien Parent
  2022-04-18 11:46   ` Krzysztof Kozlowski
  2022-04-18 11:49 ` [PATCH 1/2] dt-bindings: ufs: mediatek,ufs: add compatible for MT8195 SoC Krzysztof Kozlowski
  1 sibling, 1 reply; 4+ messages in thread
From: Fabien Parent @ 2022-04-15 16:59 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Matthias Brugger
  Cc: Fabien Parent, devicetree, linux-arm-kernel, linux-mediatek,
	linux-kernel

Add the node for the UFS HCI controller for the MediaTek MT8195 SoC.

Signed-off-by: Fabien Parent <fparent@baylibre.com>
---
 arch/arm64/boot/dts/mediatek/mt8195.dtsi | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/arch/arm64/boot/dts/mediatek/mt8195.dtsi b/arch/arm64/boot/dts/mediatek/mt8195.dtsi
index b57e620c2c72..2255e19cc3b2 100644
--- a/arch/arm64/boot/dts/mediatek/mt8195.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8195.dtsi
@@ -619,6 +619,30 @@ mmc2: mmc@11250000 {
 			status = "disabled";
 		};
 
+		ufshci: ufshci@11270000 {
+			compatible = "mediatek,mt8195-ufshci",
+				     "mediatek,mt8183-ufshci";
+			reg = <0 0x11270000 0 0x2300>;
+			interrupts = <GIC_SPI 137 IRQ_TYPE_LEVEL_HIGH 0>;
+			phys = <&ufsphy>;
+			clocks = <&infracfg_ao CLK_INFRA_AO_AES_UFSFDE>,
+				 <&infracfg_ao CLK_INFRA_AO_AES>,
+				 <&infracfg_ao CLK_INFRA_AO_UFS_TICK>,
+				 <&infracfg_ao CLK_INFRA_AO_UNIPRO_SYS>,
+				 <&infracfg_ao CLK_INFRA_AO_UNIPRO_TICK>,
+				 <&infracfg_ao CLK_INFRA_AO_UFS_MP_SAP_B>,
+				 <&infracfg_ao CLK_INFRA_AO_UFS_TX_SYMBOL>,
+				 <&infracfg_ao CLK_INFRA_AO_PERI_UFS_MEM_SUB>;
+			clock-names = "ufs", "ufs_aes", "ufs_tick",
+				      "unipro_sysclk", "unipro_tick",
+				      "unipro_mp_bclk", "ufs_tx_symbol",
+				      "ufs_mem_sub";
+			freq-table-hz = <0 0>, <0 0>, <0 0>,
+					<0 0>, <0 0>, <0 0>,
+					<0 0>, <0 0>;
+			status = "disabled";
+		};
+
 		xhci1: usb@11290000 {
 			compatible = "mediatek,mt8195-xhci",
 				     "mediatek,mtk-xhci";
-- 
2.35.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 2/2] arm64: dts: mediatek: mt8195: add UFS HCI node
  2022-04-15 16:59 ` [PATCH 2/2] arm64: dts: mediatek: mt8195: add UFS HCI node Fabien Parent
@ 2022-04-18 11:46   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 4+ messages in thread
From: Krzysztof Kozlowski @ 2022-04-18 11:46 UTC (permalink / raw)
  To: Fabien Parent, Rob Herring, Krzysztof Kozlowski, Matthias Brugger
  Cc: devicetree, linux-arm-kernel, linux-mediatek, linux-kernel

On 15/04/2022 18:59, Fabien Parent wrote:
> Add the node for the UFS HCI controller for the MediaTek MT8195 SoC.
> 
> Signed-off-by: Fabien Parent <fparent@baylibre.com>
> ---
>  arch/arm64/boot/dts/mediatek/mt8195.dtsi | 24 ++++++++++++++++++++++++
>  1 file changed, 24 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/mediatek/mt8195.dtsi b/arch/arm64/boot/dts/mediatek/mt8195.dtsi
> index b57e620c2c72..2255e19cc3b2 100644
> --- a/arch/arm64/boot/dts/mediatek/mt8195.dtsi
> +++ b/arch/arm64/boot/dts/mediatek/mt8195.dtsi
> @@ -619,6 +619,30 @@ mmc2: mmc@11250000 {
>  			status = "disabled";
>  		};
>  
> +		ufshci: ufshci@11270000 {

Generic node name, so just "ufs".


Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] dt-bindings: ufs: mediatek,ufs: add compatible for MT8195 SoC
  2022-04-15 16:59 [PATCH 1/2] dt-bindings: ufs: mediatek,ufs: add compatible for MT8195 SoC Fabien Parent
  2022-04-15 16:59 ` [PATCH 2/2] arm64: dts: mediatek: mt8195: add UFS HCI node Fabien Parent
@ 2022-04-18 11:49 ` Krzysztof Kozlowski
  1 sibling, 0 replies; 4+ messages in thread
From: Krzysztof Kozlowski @ 2022-04-18 11:49 UTC (permalink / raw)
  To: Fabien Parent, Alim Akhtar, Avri Altman, Rob Herring,
	Krzysztof Kozlowski, Matthias Brugger, Stanley Chu
  Cc: linux-scsi, devicetree, linux-kernel, linux-arm-kernel, linux-mediatek

On 15/04/2022 18:59, Fabien Parent wrote:
> Add bindings for the MT8195 UFS support.
> 
> The MT8195 SoC requires more clocks to be enabled compared to MT8183 and
> MT8192. Document the clocks required for MT8195.
> 
> Signed-off-by: Fabien Parent <fparent@baylibre.com>
> ---
>  .../devicetree/bindings/ufs/mediatek,ufs.yaml | 27 ++++++++++++++-----
>  1 file changed, 21 insertions(+), 6 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/ufs/mediatek,ufs.yaml b/Documentation/devicetree/bindings/ufs/mediatek,ufs.yaml
> index 32fd535a514a..5ed36e95e933 100644
> --- a/Documentation/devicetree/bindings/ufs/mediatek,ufs.yaml
> +++ b/Documentation/devicetree/bindings/ufs/mediatek,ufs.yaml
> @@ -14,16 +14,31 @@ allOf:
>  
>  properties:
>    compatible:
> -    enum:
> -      - mediatek,mt8183-ufshci
> -      - mediatek,mt8192-ufshci
> +    oneOf:
> +      - enum:
> +          - mediatek,mt8183-ufshci
> +          - mediatek,mt8192-ufshci
> +      - items:
> +          - const: mediatek,mt8195-ufshci
> +          - const: mediatek,mt8183-ufshci

Are you sure that these devices are compatible? Amount of clock
differences suggests that not (or original bindings were not complete).

>  
>    clocks:
> -    maxItems: 1
> +    minItems: 1
> +    maxItems: 8
>  
>    clock-names:
> -    items:
> -      - const: ufs
> +    oneOf:
> +      - items:
> +          - const: ufs
> +      - items:
> +          - const: ufs
> +          - const: ufs_aes
> +          - const: ufs_tick
> +          - const: unipro_sysclk
> +          - const: unipro_tick
> +          - const: unipro_mp_bclk
> +          - const: ufs_tx_symbol
> +          - const: ufs_mem_sub

Add allOf:if:then: which specifies these clocks per different compatible.

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-04-18 11:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-15 16:59 [PATCH 1/2] dt-bindings: ufs: mediatek,ufs: add compatible for MT8195 SoC Fabien Parent
2022-04-15 16:59 ` [PATCH 2/2] arm64: dts: mediatek: mt8195: add UFS HCI node Fabien Parent
2022-04-18 11:46   ` Krzysztof Kozlowski
2022-04-18 11:49 ` [PATCH 1/2] dt-bindings: ufs: mediatek,ufs: add compatible for MT8195 SoC Krzysztof Kozlowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).