2017-07-07 01:57:09

by Vladimir Barinov

[permalink] [raw]
Subject: [PATCH 0/2] clk: vc5: Add IDT VersaClock 5P49V5925

Hello,

This adds the folowing:
- Update IDT VersaClock 5 driver to support 5P49V5925
- Add bindings for IDT VersaClock 5P49V5925

Vladimir Barinov (2):
[1/2] clk: vc5: Add support for IDT VersaClock 5P49V5925
[2/2] dt: Add bindings for IDT VersaClock 5P49V5925

---
This patchset is against the 'kernel/git/torvalds/linux.git' repo.

Documentation/devicetree/bindings/clock/idt,versaclock5.txt | 11 +++++++----
drivers/clk/clk-versaclock5.c | 11 +++++++++++
2 files changed, 18 insertions(+), 4 deletions(-)


2017-07-07 01:57:55

by Vladimir Barinov

[permalink] [raw]
Subject: [PATCH 1/2] clk: vc5: Add support for IDT VersaClock 5P49V5925

From: Vladimir Barinov <[email protected]>

Update IDT VersaClock 5 driver to support 5P49V5925. This chip has only
external clock input, four fractional dividers (FODs) and five clock
outputs (four universal clock outputs and one reference clock output at
OUT0_SELB_I2C).

Signed-off-by: Vladimir Barinov <[email protected]>
---
drivers/clk/clk-versaclock5.c | 11 +++++++++++
1 file changed, 11 insertions(+)

diff --git a/drivers/clk/clk-versaclock5.c b/drivers/clk/clk-versaclock5.c
index ea7d552..88b749d 100644
--- a/drivers/clk/clk-versaclock5.c
+++ b/drivers/clk/clk-versaclock5.c
@@ -126,6 +126,7 @@
/* Supported IDT VC5 models. */
enum vc5_model {
IDT_VC5_5P49V5923,
+ IDT_VC5_5P49V5925,
IDT_VC5_5P49V5933,
IDT_VC5_5P49V5935,
};
@@ -595,6 +596,7 @@ static int vc5_map_index_to_output(const enum vc5_model model,
case IDT_VC5_5P49V5933:
return (n == 0) ? 0 : 3;
case IDT_VC5_5P49V5923:
+ case IDT_VC5_5P49V5925:
case IDT_VC5_5P49V5935:
default:
return n;
@@ -785,6 +787,13 @@ static int vc5_remove(struct i2c_client *client)
.flags = 0,
};

+static const struct vc5_chip_info idt_5p49v5925_info = {
+ .model = IDT_VC5_5P49V5925,
+ .clk_fod_cnt = 4,
+ .clk_out_cnt = 5,
+ .flags = 0,
+};
+
static const struct vc5_chip_info idt_5p49v5933_info = {
.model = IDT_VC5_5P49V5933,
.clk_fod_cnt = 2,
@@ -801,6 +810,7 @@ static int vc5_remove(struct i2c_client *client)

static const struct i2c_device_id vc5_id[] = {
{ "5p49v5923", .driver_data = IDT_VC5_5P49V5923 },
+ { "5p49v5925", .driver_data = IDT_VC5_5P49V5925 },
{ "5p49v5933", .driver_data = IDT_VC5_5P49V5933 },
{ "5p49v5935", .driver_data = IDT_VC5_5P49V5935 },
{ }
@@ -809,6 +819,7 @@ static int vc5_remove(struct i2c_client *client)

static const struct of_device_id clk_vc5_of_match[] = {
{ .compatible = "idt,5p49v5923", .data = &idt_5p49v5923_info },
+ { .compatible = "idt,5p49v5925", .data = &idt_5p49v5925_info },
{ .compatible = "idt,5p49v5933", .data = &idt_5p49v5933_info },
{ .compatible = "idt,5p49v5935", .data = &idt_5p49v5935_info },
{ },
--
1.9.1

2017-07-07 01:58:05

by Vladimir Barinov

[permalink] [raw]
Subject: [PATCH 2/2] dt: Add bindings for IDT VersaClock 5P49V5925

From: Vladimir Barinov <[email protected]>

IDT VersaClock 5 5P49V5925 has 4 clock outputs, 4 fractional dividers.
Input clock source can be taken only from external reference clock.

Signed-off-by: Vladimir Barinov <[email protected]>
---
Documentation/devicetree/bindings/clock/idt,versaclock5.txt | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/Documentation/devicetree/bindings/clock/idt,versaclock5.txt b/Documentation/devicetree/bindings/clock/idt,versaclock5.txt
index 53d7e50..a1ad9e0 100644
--- a/Documentation/devicetree/bindings/clock/idt,versaclock5.txt
+++ b/Documentation/devicetree/bindings/clock/idt,versaclock5.txt
@@ -6,19 +6,21 @@ from 3 to 12 output clocks.
==I2C device node==

Required properties:
-- compatible: shall be one of "idt,5p49v5923" , "idt,5p49v5933" ,
- "idt,5p49v5935".
+- compatible: shall be one of "idt,5p49v5923" , "idt,5p49v5925" ,
+ "idt,5p49v5933", "idt,5p49v5935".
- reg: i2c device address, shall be 0x68 or 0x6a.
- #clock-cells: from common clock binding; shall be set to 1.
- clocks: from common clock binding; list of parent clock handles,
- - 5p49v5923: (required) either or both of XTAL or CLKIN
+ - 5p49v5923 and
+ - 5p49v5925: (required) either or both of XTAL or CLKIN
reference clock.
- 5p49v5933 and
- 5p49v5935: (optional) property not present (internal
Xtal used) or CLKIN reference
clock.
- clock-names: from common clock binding; clock input names, can be
- - 5p49v5923: (required) either or both of "xin", "clkin".
+ - 5p49v5923 and
+ - 5p49v5925: (required) either or both of "xin", "clkin".
- 5p49v5933 and
- 5p49v5935: (optional) property not present or "clkin".

@@ -37,6 +39,7 @@ clock specifier, the following mapping applies:
1 -- OUT1
2 -- OUT4

+5P49V5925 and
5P49V5935:
0 -- OUT0_SEL_I2CB
1 -- OUT1
--
1.9.1

2017-07-09 13:38:16

by Marek Vasut

[permalink] [raw]
Subject: Re: [PATCH 1/2] clk: vc5: Add support for IDT VersaClock 5P49V5925

On 07/07/2017 03:57 AM, Vladimir Barinov wrote:
> From: Vladimir Barinov <[email protected]>
>
> Update IDT VersaClock 5 driver to support 5P49V5925. This chip has only
> external clock input, four fractional dividers (FODs) and five clock
> outputs (four universal clock outputs and one reference clock output at
> OUT0_SELB_I2C).
>
> Signed-off-by: Vladimir Barinov <[email protected]>

Reviewed-by: Marek Vasut <[email protected]>

> ---
> drivers/clk/clk-versaclock5.c | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> diff --git a/drivers/clk/clk-versaclock5.c b/drivers/clk/clk-versaclock5.c
> index ea7d552..88b749d 100644
> --- a/drivers/clk/clk-versaclock5.c
> +++ b/drivers/clk/clk-versaclock5.c
> @@ -126,6 +126,7 @@
> /* Supported IDT VC5 models. */
> enum vc5_model {
> IDT_VC5_5P49V5923,
> + IDT_VC5_5P49V5925,
> IDT_VC5_5P49V5933,
> IDT_VC5_5P49V5935,
> };
> @@ -595,6 +596,7 @@ static int vc5_map_index_to_output(const enum vc5_model model,
> case IDT_VC5_5P49V5933:
> return (n == 0) ? 0 : 3;
> case IDT_VC5_5P49V5923:
> + case IDT_VC5_5P49V5925:
> case IDT_VC5_5P49V5935:
> default:
> return n;
> @@ -785,6 +787,13 @@ static int vc5_remove(struct i2c_client *client)
> .flags = 0,
> };
>
> +static const struct vc5_chip_info idt_5p49v5925_info = {
> + .model = IDT_VC5_5P49V5925,
> + .clk_fod_cnt = 4,
> + .clk_out_cnt = 5,
> + .flags = 0,
> +};
> +
> static const struct vc5_chip_info idt_5p49v5933_info = {
> .model = IDT_VC5_5P49V5933,
> .clk_fod_cnt = 2,
> @@ -801,6 +810,7 @@ static int vc5_remove(struct i2c_client *client)
>
> static const struct i2c_device_id vc5_id[] = {
> { "5p49v5923", .driver_data = IDT_VC5_5P49V5923 },
> + { "5p49v5925", .driver_data = IDT_VC5_5P49V5925 },
> { "5p49v5933", .driver_data = IDT_VC5_5P49V5933 },
> { "5p49v5935", .driver_data = IDT_VC5_5P49V5935 },
> { }
> @@ -809,6 +819,7 @@ static int vc5_remove(struct i2c_client *client)
>
> static const struct of_device_id clk_vc5_of_match[] = {
> { .compatible = "idt,5p49v5923", .data = &idt_5p49v5923_info },
> + { .compatible = "idt,5p49v5925", .data = &idt_5p49v5925_info },
> { .compatible = "idt,5p49v5933", .data = &idt_5p49v5933_info },
> { .compatible = "idt,5p49v5935", .data = &idt_5p49v5935_info },
> { },
>


--
Best regards,
Marek Vasut

2017-07-09 13:38:20

by Marek Vasut

[permalink] [raw]
Subject: Re: [PATCH 2/2] dt: Add bindings for IDT VersaClock 5P49V5925

On 07/07/2017 03:57 AM, Vladimir Barinov wrote:
> From: Vladimir Barinov <[email protected]>
>
> IDT VersaClock 5 5P49V5925 has 4 clock outputs

In 1/2 you said it has 4 FODs and 5 outputs (and it does have 5 outputs,
4 from FODs and 1 I2C_OUTB).

>, 4 fractional dividers.
> Input clock source can be taken only from external reference clock.
>
> Signed-off-by: Vladimir Barinov <[email protected]>

You might want to rebase this on top of and retest against [1], there
are 8 patches in total fixing some stuff and adding VC6 support.

[1] https://patchwork.kernel.org/patch/9831797/

> ---
> Documentation/devicetree/bindings/clock/idt,versaclock5.txt | 11 +++++++----
> 1 file changed, 7 insertions(+), 4 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/clock/idt,versaclock5.txt b/Documentation/devicetree/bindings/clock/idt,versaclock5.txt
> index 53d7e50..a1ad9e0 100644
> --- a/Documentation/devicetree/bindings/clock/idt,versaclock5.txt
> +++ b/Documentation/devicetree/bindings/clock/idt,versaclock5.txt
> @@ -6,19 +6,21 @@ from 3 to 12 output clocks.
> ==I2C device node==
>
> Required properties:
> -- compatible: shall be one of "idt,5p49v5923" , "idt,5p49v5933" ,
> - "idt,5p49v5935".
> +- compatible: shall be one of "idt,5p49v5923" , "idt,5p49v5925" ,
> + "idt,5p49v5933", "idt,5p49v5935".
> - reg: i2c device address, shall be 0x68 or 0x6a.
> - #clock-cells: from common clock binding; shall be set to 1.
> - clocks: from common clock binding; list of parent clock handles,
> - - 5p49v5923: (required) either or both of XTAL or CLKIN
> + - 5p49v5923 and
> + - 5p49v5925: (required) either or both of XTAL or CLKIN
> reference clock.
> - 5p49v5933 and
> - 5p49v5935: (optional) property not present (internal
> Xtal used) or CLKIN reference
> clock.
> - clock-names: from common clock binding; clock input names, can be
> - - 5p49v5923: (required) either or both of "xin", "clkin".
> + - 5p49v5923 and
> + - 5p49v5925: (required) either or both of "xin", "clkin".
> - 5p49v5933 and
> - 5p49v5935: (optional) property not present or "clkin".
>
> @@ -37,6 +39,7 @@ clock specifier, the following mapping applies:
> 1 -- OUT1
> 2 -- OUT4
>
> +5P49V5925 and
> 5P49V5935:
> 0 -- OUT0_SEL_I2CB
> 1 -- OUT1
>


--
Best regards,
Marek Vasut

2017-07-09 17:38:33

by Vladimir Barinov

[permalink] [raw]
Subject: Re: [PATCH 2/2] dt: Add bindings for IDT VersaClock 5P49V5925

On 09.07.2017 16:31, Marek Vasut wrote:
> On 07/07/2017 03:57 AM, Vladimir Barinov wrote:
>> From: Vladimir Barinov <[email protected]>
>>
>> IDT VersaClock 5 5P49V5925 has 4 clock outputs
> In 1/2 you said it has 4 FODs and 5 outputs (and it does have 5 outputs,
> 4 from FODs and 1 I2C_OUTB).
That was a copy typo. Thank you for pointing to this.

>
>> , 4 fractional dividers.
>> Input clock source can be taken only from external reference clock.
>>
>> Signed-off-by: Vladimir Barinov <[email protected]>
> You might want to rebase this on top of and retest against [1], there
> are 8 patches in total fixing some stuff and adding VC6 support.
>
> [1] https://patchwork.kernel.org/patch/9831797/

I've tested your patch series with ULCB board and HDMI display.
I will rebase 5P49V5925 patches on top of them.

Regards,
Vladimir

2017-07-09 17:42:17

by Marek Vasut

[permalink] [raw]
Subject: Re: [PATCH 2/2] dt: Add bindings for IDT VersaClock 5P49V5925

On 07/09/2017 07:38 PM, Vladimir Barinov wrote:
> On 09.07.2017 16:31, Marek Vasut wrote:
>> On 07/07/2017 03:57 AM, Vladimir Barinov wrote:
>>> From: Vladimir Barinov <[email protected]>
>>>
>>> IDT VersaClock 5 5P49V5925 has 4 clock outputs
>> In 1/2 you said it has 4 FODs and 5 outputs (and it does have 5 outputs,
>> 4 from FODs and 1 I2C_OUTB).
> That was a copy typo. Thank you for pointing to this.
>
>>
>>> , 4 fractional dividers.
>>> Input clock source can be taken only from external reference clock.
>>>
>>> Signed-off-by: Vladimir Barinov
>>> <[email protected]>
>> You might want to rebase this on top of and retest against [1], there
>> are 8 patches in total fixing some stuff and adding VC6 support.
>>
>> [1] https://patchwork.kernel.org/patch/9831797/
>
> I've tested your patch series with ULCB board and HDMI display.
> I will rebase 5P49V5925 patches on top of them.

Thanks! That makes things easy :)

--
Best regards,
Marek Vasut