* [PATCH 1/2] dt-bindings/phy: ingenic: Add compatibles for JZ4760(B) SoCs
@ 2021-01-20 11:59 Paul Cercueil
2021-01-20 11:59 ` [PATCH 2/2] phy: ingenic: Add support for the JZ4760 Paul Cercueil
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Paul Cercueil @ 2021-01-20 11:59 UTC (permalink / raw)
To: Kishon Vijay Abraham I, Vinod Koul, Rob Herring
Cc: od, devicetree, linux-kernel, Paul Cercueil
Add the ingenic,jz4760-phy and ingenic,jz4760b-phy compatible strings,
and make the ingenic,jz4770-phy compatible string require
ingenic,jz4760-phy as a fallback, since both work the same, and the
JZ4760 SoC is older.
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
---
.../bindings/phy/ingenic,phy-usb.yaml | 22 ++++++++++++-------
1 file changed, 14 insertions(+), 8 deletions(-)
diff --git a/Documentation/devicetree/bindings/phy/ingenic,phy-usb.yaml b/Documentation/devicetree/bindings/phy/ingenic,phy-usb.yaml
index 0fd93d71fe5a..3c65dfcf352b 100644
--- a/Documentation/devicetree/bindings/phy/ingenic,phy-usb.yaml
+++ b/Documentation/devicetree/bindings/phy/ingenic,phy-usb.yaml
@@ -15,13 +15,19 @@ properties:
pattern: '^usb-phy@.*'
compatible:
- enum:
- - ingenic,jz4770-phy
- - ingenic,jz4775-phy
- - ingenic,jz4780-phy
- - ingenic,x1000-phy
- - ingenic,x1830-phy
- - ingenic,x2000-phy
+ oneOf:
+ - enum:
+ - ingenic,jz4760-phy
+ - ingenic,jz4775-phy
+ - ingenic,jz4780-phy
+ - ingenic,x1000-phy
+ - ingenic,x1830-phy
+ - ingenic,x2000-phy
+ - items:
+ - enum:
+ - ingenic,jz4760b-phy
+ - ingenic,jz4770-phy
+ - const: ingenic,jz4760-phy
reg:
maxItems: 1
@@ -48,7 +54,7 @@ examples:
- |
#include <dt-bindings/clock/jz4770-cgu.h>
otg_phy: usb-phy@3c {
- compatible = "ingenic,jz4770-phy";
+ compatible = "ingenic,jz4770-phy", "ingenic,jz4760-phy";
reg = <0x3c 0x10>;
vcc-supply = <&vcc>;
--
2.29.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/2] phy: ingenic: Add support for the JZ4760
2021-01-20 11:59 [PATCH 1/2] dt-bindings/phy: ingenic: Add compatibles for JZ4760(B) SoCs Paul Cercueil
@ 2021-01-20 11:59 ` Paul Cercueil
2021-01-21 16:01 ` [PATCH 1/2] dt-bindings/phy: ingenic: Add compatibles for JZ4760(B) SoCs Rob Herring
2021-01-22 14:35 ` Rob Herring
2 siblings, 0 replies; 7+ messages in thread
From: Paul Cercueil @ 2021-01-20 11:59 UTC (permalink / raw)
To: Kishon Vijay Abraham I, Vinod Koul, Rob Herring
Cc: od, devicetree, linux-kernel, Paul Cercueil
Add support for the JZ4760 SoC, which behave exactly as the (newer)
JZ4770 SoC.
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
---
drivers/phy/ingenic/phy-ingenic-usb.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/phy/ingenic/phy-ingenic-usb.c b/drivers/phy/ingenic/phy-ingenic-usb.c
index ea127b177f46..42902a0278cc 100644
--- a/drivers/phy/ingenic/phy-ingenic-usb.c
+++ b/drivers/phy/ingenic/phy-ingenic-usb.c
@@ -201,7 +201,7 @@ static const struct phy_ops ingenic_usb_phy_ops = {
.owner = THIS_MODULE,
};
-static void jz4770_usb_phy_init(struct phy *phy)
+static void jz4760_usb_phy_init(struct phy *phy)
{
struct ingenic_usb_phy *priv = phy_get_drvdata(phy);
u32 reg;
@@ -288,8 +288,8 @@ static void x2000_usb_phy_init(struct phy *phy)
writel(reg, priv->base + REG_USBPCR_OFFSET);
}
-static const struct ingenic_soc_info jz4770_soc_info = {
- .usb_phy_init = jz4770_usb_phy_init,
+static const struct ingenic_soc_info jz4760_soc_info = {
+ .usb_phy_init = jz4760_usb_phy_init,
};
static const struct ingenic_soc_info jz4775_soc_info = {
@@ -363,7 +363,8 @@ static int ingenic_usb_phy_probe(struct platform_device *pdev)
}
static const struct of_device_id ingenic_usb_phy_of_matches[] = {
- { .compatible = "ingenic,jz4770-phy", .data = &jz4770_soc_info },
+ { .compatible = "ingenic,jz4760-phy", .data = &jz4760_soc_info },
+ { .compatible = "ingenic,jz4770-phy", .data = &jz4760_soc_info },
{ .compatible = "ingenic,jz4775-phy", .data = &jz4775_soc_info },
{ .compatible = "ingenic,jz4780-phy", .data = &jz4780_soc_info },
{ .compatible = "ingenic,x1000-phy", .data = &x1000_soc_info },
--
2.29.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] dt-bindings/phy: ingenic: Add compatibles for JZ4760(B) SoCs
2021-01-20 11:59 [PATCH 1/2] dt-bindings/phy: ingenic: Add compatibles for JZ4760(B) SoCs Paul Cercueil
2021-01-20 11:59 ` [PATCH 2/2] phy: ingenic: Add support for the JZ4760 Paul Cercueil
@ 2021-01-21 16:01 ` Rob Herring
2021-01-21 21:35 ` Paul Cercueil
2021-01-22 14:35 ` Rob Herring
2 siblings, 1 reply; 7+ messages in thread
From: Rob Herring @ 2021-01-21 16:01 UTC (permalink / raw)
To: Paul Cercueil
Cc: devicetree, linux-kernel, Vinod Koul, od, Rob Herring,
Kishon Vijay Abraham I
On Wed, 20 Jan 2021 11:59:44 +0000, Paul Cercueil wrote:
> Add the ingenic,jz4760-phy and ingenic,jz4760b-phy compatible strings,
> and make the ingenic,jz4770-phy compatible string require
> ingenic,jz4760-phy as a fallback, since both work the same, and the
> JZ4760 SoC is older.
>
> Signed-off-by: Paul Cercueil <paul@crapouillou.net>
> ---
> .../bindings/phy/ingenic,phy-usb.yaml | 22 ++++++++++++-------
> 1 file changed, 14 insertions(+), 8 deletions(-)
>
My bot found errors running 'make dt_binding_check' on your patch:
yamllint warnings/errors:
./Documentation/devicetree/bindings/phy/ingenic,phy-usb.yaml:20:9: [warning] wrong indentation: expected 10 but found 8 (indentation)
./Documentation/devicetree/bindings/phy/ingenic,phy-usb.yaml:27:9: [warning] wrong indentation: expected 10 but found 8 (indentation)
./Documentation/devicetree/bindings/phy/ingenic,phy-usb.yaml:28:11: [warning] wrong indentation: expected 12 but found 10 (indentation)
dtschema/dtc warnings/errors:
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/clock/ingenic,cgu.example.dt.yaml: clock-controller@10000000: usb-phy@3c:compatible: 'oneOf' conditional failed, one must be fixed:
['ingenic,jz4770-phy'] is too short
'ingenic,jz4770-phy' is not one of ['ingenic,jz4760-phy', 'ingenic,jz4775-phy', 'ingenic,jz4780-phy', 'ingenic,x1000-phy', 'ingenic,x1830-phy', 'ingenic,x2000-phy']
From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/clock/ingenic,cgu.yaml
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/clock/ingenic,cgu.example.dt.yaml: usb-phy@3c: compatible: 'oneOf' conditional failed, one must be fixed:
['ingenic,jz4770-phy'] is too short
'ingenic,jz4770-phy' is not one of ['ingenic,jz4760-phy', 'ingenic,jz4775-phy', 'ingenic,jz4780-phy', 'ingenic,x1000-phy', 'ingenic,x1830-phy', 'ingenic,x2000-phy']
From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/phy/ingenic,phy-usb.yaml
See https://patchwork.ozlabs.org/patch/1429154
This check can fail if there are any dependencies. The base for a patch
series is generally the most recent rc1.
If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:
pip3 install dtschema --upgrade
Please check and re-submit.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] dt-bindings/phy: ingenic: Add compatibles for JZ4760(B) SoCs
2021-01-21 16:01 ` [PATCH 1/2] dt-bindings/phy: ingenic: Add compatibles for JZ4760(B) SoCs Rob Herring
@ 2021-01-21 21:35 ` Paul Cercueil
0 siblings, 0 replies; 7+ messages in thread
From: Paul Cercueil @ 2021-01-21 21:35 UTC (permalink / raw)
To: Rob Herring
Cc: devicetree, linux-kernel, Vinod Koul, od, Rob Herring,
Kishon Vijay Abraham I
Hi Rob,
Le jeu. 21 janv. 2021 à 10:01, Rob Herring <robh@kernel.org> a écrit :
> On Wed, 20 Jan 2021 11:59:44 +0000, Paul Cercueil wrote:
>> Add the ingenic,jz4760-phy and ingenic,jz4760b-phy compatible
>> strings,
>> and make the ingenic,jz4770-phy compatible string require
>> ingenic,jz4760-phy as a fallback, since both work the same, and the
>> JZ4760 SoC is older.
>>
>> Signed-off-by: Paul Cercueil <paul@crapouillou.net>
>> ---
>> .../bindings/phy/ingenic,phy-usb.yaml | 22
>> ++++++++++++-------
>> 1 file changed, 14 insertions(+), 8 deletions(-)
>>
>
> My bot found errors running 'make dt_binding_check' on your patch:
>
> yamllint warnings/errors:
> ./Documentation/devicetree/bindings/phy/ingenic,phy-usb.yaml:20:9:
> [warning] wrong indentation: expected 10 but found 8 (indentation)
> ./Documentation/devicetree/bindings/phy/ingenic,phy-usb.yaml:27:9:
> [warning] wrong indentation: expected 10 but found 8 (indentation)
> ./Documentation/devicetree/bindings/phy/ingenic,phy-usb.yaml:28:11:
> [warning] wrong indentation: expected 12 but found 10 (indentation)
I can reproduce, however the indentation in the DTS looks awfully
correct to me. Could you tell me what it is doing wrong?
Cheers,
-Paul
> dtschema/dtc warnings/errors:
> /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/clock/ingenic,cgu.example.dt.yaml:
> clock-controller@10000000: usb-phy@3c:compatible: 'oneOf' conditional
> failed, one must be fixed:
> ['ingenic,jz4770-phy'] is too short
> 'ingenic,jz4770-phy' is not one of ['ingenic,jz4760-phy',
> 'ingenic,jz4775-phy', 'ingenic,jz4780-phy', 'ingenic,x1000-phy',
> 'ingenic,x1830-phy', 'ingenic,x2000-phy']
> From schema:
> /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/clock/ingenic,cgu.yaml
> /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/clock/ingenic,cgu.example.dt.yaml:
> usb-phy@3c: compatible: 'oneOf' conditional failed, one must be fixed:
> ['ingenic,jz4770-phy'] is too short
> 'ingenic,jz4770-phy' is not one of ['ingenic,jz4760-phy',
> 'ingenic,jz4775-phy', 'ingenic,jz4780-phy', 'ingenic,x1000-phy',
> 'ingenic,x1830-phy', 'ingenic,x2000-phy']
> From schema:
> /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/phy/ingenic,phy-usb.yaml
>
> See https://patchwork.ozlabs.org/patch/1429154
>
> This check can fail if there are any dependencies. The base for a
> patch
> series is generally the most recent rc1.
>
> If you already ran 'make dt_binding_check' and didn't see the above
> error(s), then make sure 'yamllint' is installed and dt-schema is up
> to
> date:
>
> pip3 install dtschema --upgrade
>
> Please check and re-submit.
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] dt-bindings/phy: ingenic: Add compatibles for JZ4760(B) SoCs
2021-01-20 11:59 [PATCH 1/2] dt-bindings/phy: ingenic: Add compatibles for JZ4760(B) SoCs Paul Cercueil
2021-01-20 11:59 ` [PATCH 2/2] phy: ingenic: Add support for the JZ4760 Paul Cercueil
2021-01-21 16:01 ` [PATCH 1/2] dt-bindings/phy: ingenic: Add compatibles for JZ4760(B) SoCs Rob Herring
@ 2021-01-22 14:35 ` Rob Herring
2021-01-22 14:42 ` Paul Cercueil
2 siblings, 1 reply; 7+ messages in thread
From: Rob Herring @ 2021-01-22 14:35 UTC (permalink / raw)
To: Paul Cercueil
Cc: Kishon Vijay Abraham I, Vinod Koul, od, devicetree, linux-kernel
On Wed, Jan 20, 2021 at 5:59 AM Paul Cercueil <paul@crapouillou.net> wrote:
>
> Add the ingenic,jz4760-phy and ingenic,jz4760b-phy compatible strings,
> and make the ingenic,jz4770-phy compatible string require
> ingenic,jz4760-phy as a fallback, since both work the same, and the
> JZ4760 SoC is older.
>
> Signed-off-by: Paul Cercueil <paul@crapouillou.net>
> ---
> .../bindings/phy/ingenic,phy-usb.yaml | 22 ++++++++++++-------
> 1 file changed, 14 insertions(+), 8 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/phy/ingenic,phy-usb.yaml b/Documentation/devicetree/bindings/phy/ingenic,phy-usb.yaml
> index 0fd93d71fe5a..3c65dfcf352b 100644
> --- a/Documentation/devicetree/bindings/phy/ingenic,phy-usb.yaml
> +++ b/Documentation/devicetree/bindings/phy/ingenic,phy-usb.yaml
> @@ -15,13 +15,19 @@ properties:
> pattern: '^usb-phy@.*'
>
> compatible:
> - enum:
> - - ingenic,jz4770-phy
> - - ingenic,jz4775-phy
> - - ingenic,jz4780-phy
> - - ingenic,x1000-phy
> - - ingenic,x1830-phy
> - - ingenic,x2000-phy
> + oneOf:
> + - enum:
> + - ingenic,jz4760-phy
This should be 2 more spaces indentation. Indent is always 2 more than
the above keyword and ignores '-'.
> + - ingenic,jz4775-phy
> + - ingenic,jz4780-phy
> + - ingenic,x1000-phy
> + - ingenic,x1830-phy
> + - ingenic,x2000-phy
> + - items:
> + - enum:
> + - ingenic,jz4760b-phy
> + - ingenic,jz4770-phy
> + - const: ingenic,jz4760-phy
>
> reg:
> maxItems: 1
> @@ -48,7 +54,7 @@ examples:
> - |
> #include <dt-bindings/clock/jz4770-cgu.h>
> otg_phy: usb-phy@3c {
> - compatible = "ingenic,jz4770-phy";
> + compatible = "ingenic,jz4770-phy", "ingenic,jz4760-phy";
> reg = <0x3c 0x10>;
>
> vcc-supply = <&vcc>;
> --
> 2.29.2
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] dt-bindings/phy: ingenic: Add compatibles for JZ4760(B) SoCs
2021-01-22 14:35 ` Rob Herring
@ 2021-01-22 14:42 ` Paul Cercueil
2021-01-22 16:06 ` [PATCH 1/2] dt-bindings/phy: ingenic: Add compatibles for?? " Rob Herring
0 siblings, 1 reply; 7+ messages in thread
From: Paul Cercueil @ 2021-01-22 14:42 UTC (permalink / raw)
To: Rob Herring
Cc: Kishon Vijay Abraham I, Vinod Koul, od, devicetree, linux-kernel
Hi Rob,
Le ven. 22 janv. 2021 à 8:35, Rob Herring <robh+dt@kernel.org> a
écrit :
> On Wed, Jan 20, 2021 at 5:59 AM Paul Cercueil <paul@crapouillou.net>
> wrote:
>>
>> Add the ingenic,jz4760-phy and ingenic,jz4760b-phy compatible
>> strings,
>> and make the ingenic,jz4770-phy compatible string require
>> ingenic,jz4760-phy as a fallback, since both work the same, and the
>> JZ4760 SoC is older.
>>
>> Signed-off-by: Paul Cercueil <paul@crapouillou.net>
>> ---
>> .../bindings/phy/ingenic,phy-usb.yaml | 22
>> ++++++++++++-------
>> 1 file changed, 14 insertions(+), 8 deletions(-)
>>
>> diff --git
>> a/Documentation/devicetree/bindings/phy/ingenic,phy-usb.yaml
>> b/Documentation/devicetree/bindings/phy/ingenic,phy-usb.yaml
>> index 0fd93d71fe5a..3c65dfcf352b 100644
>> --- a/Documentation/devicetree/bindings/phy/ingenic,phy-usb.yaml
>> +++ b/Documentation/devicetree/bindings/phy/ingenic,phy-usb.yaml
>> @@ -15,13 +15,19 @@ properties:
>> pattern: '^usb-phy@.*'
>>
>> compatible:
>> - enum:
>> - - ingenic,jz4770-phy
>> - - ingenic,jz4775-phy
>> - - ingenic,jz4780-phy
>> - - ingenic,x1000-phy
>> - - ingenic,x1830-phy
>> - - ingenic,x2000-phy
>> + oneOf:
>> + - enum:
>> + - ingenic,jz4760-phy
>
> This should be 2 more spaces indentation. Indent is always 2 more than
> the above keyword and ignores '-'.
Pretty confusing. But alright.
Cheers,
-Paul
>> + - ingenic,jz4775-phy
>> + - ingenic,jz4780-phy
>> + - ingenic,x1000-phy
>> + - ingenic,x1830-phy
>> + - ingenic,x2000-phy
>> + - items:
>> + - enum:
>> + - ingenic,jz4760b-phy
>> + - ingenic,jz4770-phy
>> + - const: ingenic,jz4760-phy
>>
>> reg:
>> maxItems: 1
>> @@ -48,7 +54,7 @@ examples:
>> - |
>> #include <dt-bindings/clock/jz4770-cgu.h>
>> otg_phy: usb-phy@3c {
>> - compatible = "ingenic,jz4770-phy";
>> + compatible = "ingenic,jz4770-phy", "ingenic,jz4760-phy";
>> reg = <0x3c 0x10>;
>>
>> vcc-supply = <&vcc>;
>> --
>> 2.29.2
>>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] dt-bindings/phy: ingenic: Add compatibles for?? JZ4760(B) SoCs
2021-01-22 14:42 ` Paul Cercueil
@ 2021-01-22 16:06 ` Rob Herring
0 siblings, 0 replies; 7+ messages in thread
From: Rob Herring @ 2021-01-22 16:06 UTC (permalink / raw)
To: Paul Cercueil
Cc: Kishon Vijay Abraham I, Vinod Koul, od, devicetree, linux-kernel
On Fri, Jan 22, 2021 at 02:42:28PM +0000, Paul Cercueil wrote:
> Hi Rob,
>
> Le ven. 22 janv. 2021 à 8:35, Rob Herring <robh+dt@kernel.org> a écrit :
> > On Wed, Jan 20, 2021 at 5:59 AM Paul Cercueil <paul@crapouillou.net>
> > wrote:
> > >
> > > Add the ingenic,jz4760-phy and ingenic,jz4760b-phy compatible
> > > strings,
> > > and make the ingenic,jz4770-phy compatible string require
> > > ingenic,jz4760-phy as a fallback, since both work the same, and the
> > > JZ4760 SoC is older.
> > >
> > > Signed-off-by: Paul Cercueil <paul@crapouillou.net>
> > > ---
> > > .../bindings/phy/ingenic,phy-usb.yaml | 22
> > > ++++++++++++-------
> > > 1 file changed, 14 insertions(+), 8 deletions(-)
> > >
> > > diff --git
> > > a/Documentation/devicetree/bindings/phy/ingenic,phy-usb.yaml
> > > b/Documentation/devicetree/bindings/phy/ingenic,phy-usb.yaml
> > > index 0fd93d71fe5a..3c65dfcf352b 100644
> > > --- a/Documentation/devicetree/bindings/phy/ingenic,phy-usb.yaml
> > > +++ b/Documentation/devicetree/bindings/phy/ingenic,phy-usb.yaml
> > > @@ -15,13 +15,19 @@ properties:
> > > pattern: '^usb-phy@.*'
> > >
> > > compatible:
> > > - enum:
> > > - - ingenic,jz4770-phy
> > > - - ingenic,jz4775-phy
> > > - - ingenic,jz4780-phy
> > > - - ingenic,x1000-phy
> > > - - ingenic,x1830-phy
> > > - - ingenic,x2000-phy
> > > + oneOf:
> > > + - enum:
> > > + - ingenic,jz4760-phy
> >
> > This should be 2 more spaces indentation. Indent is always 2 more than
> > the above keyword and ignores '-'.
>
> Pretty confusing. But alright.
TBC, either way is functional and these are the 2 main styles, so we
picked one. In some sequences, it's easy to miss a '-' where a space
would also be valid. For example:
items:
- items:
enum: ...
vs:
items:
items:
enum: ...
Both are valid (as items can be a list or sub-schema).
Rob
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2021-01-22 16:09 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-20 11:59 [PATCH 1/2] dt-bindings/phy: ingenic: Add compatibles for JZ4760(B) SoCs Paul Cercueil
2021-01-20 11:59 ` [PATCH 2/2] phy: ingenic: Add support for the JZ4760 Paul Cercueil
2021-01-21 16:01 ` [PATCH 1/2] dt-bindings/phy: ingenic: Add compatibles for JZ4760(B) SoCs Rob Herring
2021-01-21 21:35 ` Paul Cercueil
2021-01-22 14:35 ` Rob Herring
2021-01-22 14:42 ` Paul Cercueil
2021-01-22 16:06 ` [PATCH 1/2] dt-bindings/phy: ingenic: Add compatibles for?? " Rob Herring
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).