2023-04-03 06:18:17

by Chunfeng Yun

[permalink] [raw]
Subject: [PATCH 1/2] dt-bindings: usb: mtk-xhci: add an optional frame count clock

Add optional clock 'frmcnt_ck' used on 4nm or advanced process SoC

Signed-off-by: Chunfeng Yun <[email protected]>
---
.../devicetree/bindings/usb/mediatek,mtk-xhci.yaml | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml b/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml
index c119caa9ad16..ee8167fbc541 100644
--- a/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml
+++ b/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml
@@ -77,6 +77,7 @@ properties:
- description: Mcu bus clock for register access
- description: DMA bus clock for data transfer
- description: controller clock
+ - description: frame count clock

clock-names:
minItems: 1
@@ -86,14 +87,15 @@ properties:
- const: mcu_ck
- const: dma_ck
- const: xhci_ck
+ - const: frmcnt_ck

assigned-clocks:
minItems: 1
- maxItems: 5
+ maxItems: 6

assigned-clock-parents:
minItems: 1
- maxItems: 5
+ maxItems: 6

phys:
description:
--
2.18.0


2023-04-03 06:18:24

by Chunfeng Yun

[permalink] [raw]
Subject: [PATCH 2/2] usb: xhci-mtk: add optional frame count clock

Add optional clock frmcnt_ck used on 4nm or advanced process SoC

Signed-off-by: Chunfeng Yun <[email protected]>
---
drivers/usb/host/xhci-mtk.c | 1 +
drivers/usb/host/xhci-mtk.h | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/usb/host/xhci-mtk.c b/drivers/usb/host/xhci-mtk.c
index f7cbb08fc506..90cf40d6d0c3 100644
--- a/drivers/usb/host/xhci-mtk.c
+++ b/drivers/usb/host/xhci-mtk.c
@@ -398,6 +398,7 @@ static int xhci_mtk_clks_get(struct xhci_hcd_mtk *mtk)
clks[2].id = "ref_ck";
clks[3].id = "mcu_ck";
clks[4].id = "dma_ck";
+ clks[5].id = "frmcnt_ck";

return devm_clk_bulk_get_optional(mtk->dev, BULK_CLKS_NUM, clks);
}
diff --git a/drivers/usb/host/xhci-mtk.h b/drivers/usb/host/xhci-mtk.h
index 1174a510dd38..faaaf05e36ce 100644
--- a/drivers/usb/host/xhci-mtk.h
+++ b/drivers/usb/host/xhci-mtk.h
@@ -15,7 +15,7 @@

#include "xhci.h"

-#define BULK_CLKS_NUM 5
+#define BULK_CLKS_NUM 6
#define BULK_VREGS_NUM 2

/* support at most 64 ep, use 32 size hash table */
--
2.18.0

2023-04-03 19:23:45

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 1/2] dt-bindings: usb: mtk-xhci: add an optional frame count clock

On 03/04/2023 08:02, Chunfeng Yun wrote:
> Add optional clock 'frmcnt_ck' used on 4nm or advanced process SoC
>
> Signed-off-by: Chunfeng Yun <[email protected]>
> ---
> .../devicetree/bindings/usb/mediatek,mtk-xhci.yaml | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml b/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml
> index c119caa9ad16..ee8167fbc541 100644
> --- a/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml
> +++ b/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml
> @@ -77,6 +77,7 @@ properties:
> - description: Mcu bus clock for register access
> - description: DMA bus clock for data transfer
> - description: controller clock
> + - description: frame count clock
>
> clock-names:
> minItems: 1
> @@ -86,14 +87,15 @@ properties:
> - const: mcu_ck
> - const: dma_ck
> - const: xhci_ck
> + - const: frmcnt_ck


Acked-by: Krzysztof Kozlowski <[email protected]>

>
> assigned-clocks:
> minItems: 1
> - maxItems: 5
> + maxItems: 6

But these should be dropped:
https://lore.kernel.org/linux-devicetree/[email protected]/T/#t

>
> assigned-clock-parents:
> minItems: 1
> - maxItems: 5
> + maxItems: 6
>
> phys:
> description:

Best regards,
Krzysztof

2023-04-07 05:50:18

by Chunfeng Yun

[permalink] [raw]
Subject: Re: [PATCH 1/2] dt-bindings: usb: mtk-xhci: add an optional frame count clock

On Mon, 2023-04-03 at 21:19 +0200, Krzysztof Kozlowski wrote:
> External email : Please do not click links or open attachments until
> you have verified the sender or the content.
>
>
> On 03/04/2023 08:02, Chunfeng Yun wrote:
> > Add optional clock 'frmcnt_ck' used on 4nm or advanced process SoC
> >
> > Signed-off-by: Chunfeng Yun <[email protected]>
> > ---
> > .../devicetree/bindings/usb/mediatek,mtk-xhci.yaml | 6
> > ++++--
> > 1 file changed, 4 insertions(+), 2 deletions(-)
> >
> > diff --git a/Documentation/devicetree/bindings/usb/mediatek,mtk-
> > xhci.yaml b/Documentation/devicetree/bindings/usb/mediatek,mtk-
> > xhci.yaml
> > index c119caa9ad16..ee8167fbc541 100644
> > --- a/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml
> > +++ b/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml
> > @@ -77,6 +77,7 @@ properties:
> > - description: Mcu bus clock for register access
> > - description: DMA bus clock for data transfer
> > - description: controller clock
> > + - description: frame count clock
> >
> > clock-names:
> > minItems: 1
> > @@ -86,14 +87,15 @@ properties:
> > - const: mcu_ck
> > - const: dma_ck
> > - const: xhci_ck
> > + - const: frmcnt_ck
>
>
> Acked-by: Krzysztof Kozlowski <[email protected]>
>
> >
> > assigned-clocks:
> > minItems: 1
> > - maxItems: 5
> > + maxItems: 6
>
> But these should be dropped:
>
https://lore.kernel.org/linux-devicetree/[email protected]/T/#t
>
Ok, I'll drop assigned-clocks change, thanks

> >
> > assigned-clock-parents:
> > minItems: 1
> > - maxItems: 5
> > + maxItems: 6
> >
> > phys:
> > description:
>
> Best regards,
> Krzysztof
>