Message ID | 20200314093941.2533-2-peter.chen@nxp.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | [v2,1/2] phy: cadence: salvo: add salvo phy driver | expand |
On Sat, 14 Mar 2020 17:39:41 +0800, Peter Chen wrote: > Add Cadence SALVO PHY binding doc, this PHY is a legacy module, > and is only used for USB3 and USB2. > > Signed-off-by: Peter Chen <peter.chen@nxp.com> > --- > Changes for v2: > - Fix kinds of yaml style issue > > .../bindings/phy/cdns,salvo-phy.yaml | 49 +++++++++++++++++++ > 1 file changed, 49 insertions(+) > create mode 100644 Documentation/devicetree/bindings/phy/cdns,salvo-phy.yaml > My bot found errors running 'make dt_binding_check' on your patch: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/phy/cdns,salvo-phy.example.dt.yaml: usb3-phy@5B160000: 'power-domains' does not match any of the regexes: 'pinctrl-[0-9]+' /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/phy/cdns,salvo-phy.example.dt.yaml: usb3-phy@5B160000: #phy-cells:0:0: 1 was expected See https://patchwork.ozlabs.org/patch/1254920 Please check and re-submit.
On 20-03-18 16:04:20, Rob Herring wrote: > On Sat, 14 Mar 2020 17:39:41 +0800, Peter Chen wrote: > > Add Cadence SALVO PHY binding doc, this PHY is a legacy module, > > and is only used for USB3 and USB2. > > > > Signed-off-by: Peter Chen <peter.chen@nxp.com> > > --- > > Changes for v2: > > - Fix kinds of yaml style issue > > > > .../bindings/phy/cdns,salvo-phy.yaml | 49 +++++++++++++++++++ > > 1 file changed, 49 insertions(+) > > create mode 100644 Documentation/devicetree/bindings/phy/cdns,salvo-phy.yaml > > > > My bot found errors running 'make dt_binding_check' on your patch: > > /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/phy/cdns,salvo-phy.example.dt.yaml: usb3-phy@5B160000: 'power-domains' does not match any of the regexes: 'pinctrl-[0-9]+' The 'power-domains' is described at: Documentation/devicetree/bindings/power/power_domain.txt > /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/phy/cdns,salvo-phy.example.dt.yaml: usb3-phy@5B160000: #phy-cells:0:0: 1 was expected > #phy-cell could be 0 if it is a dedicated PHY, eg single function PHY. See below comments from drivers/phy/phy-core.c /** * of_phy_simple_xlate() - returns the phy instance from phy provider * @dev: the PHY provider device * @args: of_phandle_args (not used here) * * Intended to be used by phy provider for the common case where #phy-cells is * 0. For other cases where #phy-cells is greater than '0', the phy provider * should provide a custom of_xlate function that reads the *args* and returns * the appropriate phy. */
On Thu, Mar 19, 2020 at 12:46 AM Peter Chen <peter.chen@nxp.com> wrote: > > On 20-03-18 16:04:20, Rob Herring wrote: > > On Sat, 14 Mar 2020 17:39:41 +0800, Peter Chen wrote: > > > Add Cadence SALVO PHY binding doc, this PHY is a legacy module, > > > and is only used for USB3 and USB2. > > > > > > Signed-off-by: Peter Chen <peter.chen@nxp.com> > > > --- > > > Changes for v2: > > > - Fix kinds of yaml style issue > > > > > > .../bindings/phy/cdns,salvo-phy.yaml | 49 +++++++++++++++++++ > > > 1 file changed, 49 insertions(+) > > > create mode 100644 Documentation/devicetree/bindings/phy/cdns,salvo-phy.yaml > > > > > > > My bot found errors running 'make dt_binding_check' on your patch: > > > > /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/phy/cdns,salvo-phy.example.dt.yaml: usb3-phy@5B160000: 'power-domains' does not match any of the regexes: 'pinctrl-[0-9]+' > > The 'power-domains' is described at: > Documentation/devicetree/bindings/power/power_domain.txt .txt files don't generate warnings. And you might want to be up to date with your kernel tree. > > > /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/phy/cdns,salvo-phy.example.dt.yaml: usb3-phy@5B160000: #phy-cells:0:0: 1 was expected > > > > #phy-cell could be 0 if it is a dedicated PHY, eg single function PHY. > See below comments from drivers/phy/phy-core.c > > /** > * of_phy_simple_xlate() - returns the phy instance from phy provider > * @dev: the PHY provider device > * @args: of_phandle_args (not used here) > * > * Intended to be used by phy provider for the common case where #phy-cells is > * 0. For other cases where #phy-cells is greater than '0', the phy provider > * should provide a custom of_xlate function that reads the *args* and returns > * the appropriate phy. > */ What's your point? You have an error either in the schema or the example. You must fix it. Rob
> > On 20-03-18 16:04:20, Rob Herring wrote: > > > On Sat, 14 Mar 2020 17:39:41 +0800, Peter Chen wrote: > > > > Add Cadence SALVO PHY binding doc, this PHY is a legacy module, > > > > and is only used for USB3 and USB2. > > > > > > > > Signed-off-by: Peter Chen <peter.chen@nxp.com> > > > > --- > > > > Changes for v2: > > > > - Fix kinds of yaml style issue > > > > > > > > .../bindings/phy/cdns,salvo-phy.yaml | 49 +++++++++++++++++++ > > > > 1 file changed, 49 insertions(+) > > > > create mode 100644 > > > > Documentation/devicetree/bindings/phy/cdns,salvo-phy.yaml > > > > > > > > > > My bot found errors running 'make dt_binding_check' on your patch: > > > > > > /builds/robherring/linux-dt- > review/Documentation/devicetree/bindings/phy/cdns,salvo-phy.example.dt.yaml: > usb3-phy@5B160000: 'power-domains' does not match any of the regexes: 'pinctrl- > [0-9]+' > > > > The 'power-domains' is described at: > > Documentation/devicetree/bindings/power/power_domain.txt > > .txt files don't generate warnings. > I mean why dt_bind_check report below: usb3-phy@5B160000: 'power-domains' does not match any of the regexes: 'pinctrl- [0-9]+' It is 'power-domains', and not related to pinctrl. > And you might want to be up to date with your kernel tree. > > > > > > /builds/robherring/linux-dt-review/Documentation/devicetree/bindings > > > /phy/cdns,salvo-phy.example.dt.yaml: usb3-phy@5B160000: > > > #phy-cells:0:0: 1 was expected > > > > > > > #phy-cell could be 0 if it is a dedicated PHY, eg single function PHY. > > See below comments from drivers/phy/phy-core.c > > > > /** > > * of_phy_simple_xlate() - returns the phy instance from phy provider > > * @dev: the PHY provider device > > * @args: of_phandle_args (not used here) > > * > > * Intended to be used by phy provider for the common case where > > #phy-cells is > > * 0. For other cases where #phy-cells is greater than '0', the phy > > provider > > * should provide a custom of_xlate function that reads the *args* and > > returns > > * the appropriate phy. > > */ > > What's your point? You have an error either in the schema or the example. You > must fix it. I mean #phy-cells can be 0, but your script said it should be 1. I run dt-binding-check at local, no issue is reported, the cdns,salvo-phy.yaml is at the last two. b29397@b29397-desktop:~/work/projects/upstream/usb$ ./mk.sh dt make[1]: Entering directory '/home/b29397/work/projects/upstream/usb/outout/imx_v8' CHKDT Documentation/devicetree/bindings/arm/cpus.yaml CHKDT Documentation/devicetree/bindings/arm/stm32/st,mlahb.yaml CHKDT Documentation/devicetree/bindings/arm/psci.yaml CHKDT Documentation/devicetree/bindings/arm/fsl.yaml CHKDT Documentation/devicetree/bindings/bus/allwinner,sun8i-a23-rsb.yaml CHKDT Documentation/devicetree/bindings/clock/qcom,gcc-apq8064.yaml CHKDT Documentation/devicetree/bindings/clock/allwinner,sun4i-a10-osc-clk.yaml CHKDT Documentation/devicetree/bindings/clock/allwinner,sun9i-a80-gt-clk.yaml CHKDT Documentation/devicetree/bindings/display/bridge/anx6345.yaml CHKDT Documentation/devicetree/bindings/display/simple-framebuffer.yaml CHKDT Documentation/devicetree/bindings/display/panel/leadtek,ltk500hd1829.yaml CHKDT Documentation/devicetree/bindings/display/panel/xinpeng,xpp055c272.yaml CHKDT Documentation/devicetree/bindings/display/allwinner,sun4i-a10-tcon.yaml CHKDT Documentation/devicetree/bindings/display/allwinner,sun4i-a10-tv-encoder.yaml CHKDT Documentation/devicetree/bindings/dma/ti/k3-udma.yaml CHKDT Documentation/devicetree/bindings/gpu/arm,mali-midgard.yaml CHKDT Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml CHKDT Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.yaml CHKDT Documentation/devicetree/bindings/input/touchscreen/goodix.yaml CHKDT Documentation/devicetree/bindings/leds/common.yaml CHKDT Documentation/devicetree/bindings/media/allwinner,sun4i-a10-csi.yaml CHKDT Documentation/devicetree/bindings/media/ti,cal.yaml CHKDT Documentation/devicetree/bindings/memory-controllers/nvidia,tegra124-emc.yaml CHKDT Documentation/devicetree/bindings/mfd/max77650.yaml CHKDT Documentation/devicetree/bindings/mmc/mmc-controller.yaml CHKDT Documentation/devicetree/bindings/net/mdio.yaml CHKDT Documentation/devicetree/bindings/nvmem/nvmem.yaml CHKDT Documentation/devicetree/bindings/phy/cdns,salvo-phy.yaml CHKDT Documentation/devicetree/bindings/phy/allwinner,sun4i-a10-usb-phy.yaml Thanks, Peter
On Thu, Mar 19, 2020 at 7:29 PM Peter Chen <peter.chen@nxp.com> wrote: > > > > > On 20-03-18 16:04:20, Rob Herring wrote: > > > > On Sat, 14 Mar 2020 17:39:41 +0800, Peter Chen wrote: > > > > > Add Cadence SALVO PHY binding doc, this PHY is a legacy module, > > > > > and is only used for USB3 and USB2. > > > > > > > > > > Signed-off-by: Peter Chen <peter.chen@nxp.com> > > > > > --- > > > > > Changes for v2: > > > > > - Fix kinds of yaml style issue > > > > > > > > > > .../bindings/phy/cdns,salvo-phy.yaml | 49 +++++++++++++++++++ > > > > > 1 file changed, 49 insertions(+) > > > > > create mode 100644 > > > > > Documentation/devicetree/bindings/phy/cdns,salvo-phy.yaml > > > > > > > > > > > > > My bot found errors running 'make dt_binding_check' on your patch: > > > > > > > > /builds/robherring/linux-dt- > > review/Documentation/devicetree/bindings/phy/cdns,salvo-phy.example.dt.yaml: > > usb3-phy@5B160000: 'power-domains' does not match any of the regexes: 'pinctrl- > > [0-9]+' > > > > > > The 'power-domains' is described at: > > > Documentation/devicetree/bindings/power/power_domain.txt > > > > .txt files don't generate warnings. > > > > I mean why dt_bind_check report below: > > usb3-phy@5B160000: 'power-domains' does not match any of the regexes: 'pinctrl- > [0-9]+' > > It is 'power-domains', and not related to pinctrl. This means that you haven't defined 'power-domains' as a property for this binding. The error message just prints out possible regex's. > > And you might want to be up to date with your kernel tree. > > > > > > > > > /builds/robherring/linux-dt-review/Documentation/devicetree/bindings > > > > /phy/cdns,salvo-phy.example.dt.yaml: usb3-phy@5B160000: > > > > #phy-cells:0:0: 1 was expected > > > > > > > > > > #phy-cell could be 0 if it is a dedicated PHY, eg single function PHY. > > > See below comments from drivers/phy/phy-core.c > > > > > > /** > > > * of_phy_simple_xlate() - returns the phy instance from phy provider > > > * @dev: the PHY provider device > > > * @args: of_phandle_args (not used here) > > > * > > > * Intended to be used by phy provider for the common case where > > > #phy-cells is > > > * 0. For other cases where #phy-cells is greater than '0', the phy > > > provider > > > * should provide a custom of_xlate function that reads the *args* and > > > returns > > > * the appropriate phy. > > > */ > > > > What's your point? You have an error either in the schema or the example. You > > must fix it. > > I mean #phy-cells can be 0, but your script said it should be 1. No, your schema said it must be 1: + "#phy-cells": + const: 1 > I run dt-binding-check at local, no issue is reported, the cdns,salvo-phy.yaml is at the last two. > > b29397@b29397-desktop:~/work/projects/upstream/usb$ ./mk.sh dt > make[1]: Entering directory '/home/b29397/work/projects/upstream/usb/outout/imx_v8' > CHKDT Documentation/devicetree/bindings/arm/cpus.yaml > CHKDT Documentation/devicetree/bindings/arm/stm32/st,mlahb.yaml > CHKDT Documentation/devicetree/bindings/arm/psci.yaml > CHKDT Documentation/devicetree/bindings/arm/fsl.yaml > CHKDT Documentation/devicetree/bindings/bus/allwinner,sun8i-a23-rsb.yaml > CHKDT Documentation/devicetree/bindings/clock/qcom,gcc-apq8064.yaml > CHKDT Documentation/devicetree/bindings/clock/allwinner,sun4i-a10-osc-clk.yaml > CHKDT Documentation/devicetree/bindings/clock/allwinner,sun9i-a80-gt-clk.yaml > CHKDT Documentation/devicetree/bindings/display/bridge/anx6345.yaml > CHKDT Documentation/devicetree/bindings/display/simple-framebuffer.yaml > CHKDT Documentation/devicetree/bindings/display/panel/leadtek,ltk500hd1829.yaml > CHKDT Documentation/devicetree/bindings/display/panel/xinpeng,xpp055c272.yaml > CHKDT Documentation/devicetree/bindings/display/allwinner,sun4i-a10-tcon.yaml > CHKDT Documentation/devicetree/bindings/display/allwinner,sun4i-a10-tv-encoder.yaml > CHKDT Documentation/devicetree/bindings/dma/ti/k3-udma.yaml > CHKDT Documentation/devicetree/bindings/gpu/arm,mali-midgard.yaml > CHKDT Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml > CHKDT Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.yaml > CHKDT Documentation/devicetree/bindings/input/touchscreen/goodix.yaml > CHKDT Documentation/devicetree/bindings/leds/common.yaml > CHKDT Documentation/devicetree/bindings/media/allwinner,sun4i-a10-csi.yaml > CHKDT Documentation/devicetree/bindings/media/ti,cal.yaml > CHKDT Documentation/devicetree/bindings/memory-controllers/nvidia,tegra124-emc.yaml > CHKDT Documentation/devicetree/bindings/mfd/max77650.yaml > CHKDT Documentation/devicetree/bindings/mmc/mmc-controller.yaml > CHKDT Documentation/devicetree/bindings/net/mdio.yaml > CHKDT Documentation/devicetree/bindings/nvmem/nvmem.yaml > CHKDT Documentation/devicetree/bindings/phy/cdns,salvo-phy.yaml > CHKDT Documentation/devicetree/bindings/phy/allwinner,sun4i-a10-usb-phy.yaml There's 2 stages. Checking the schema as above and then checking the examples. It's the example that's failing. If there's an unrelated failure, you need to run 'make -k' to keep going on error. Rob
diff --git a/Documentation/devicetree/bindings/phy/cdns,salvo-phy.yaml b/Documentation/devicetree/bindings/phy/cdns,salvo-phy.yaml new file mode 100644 index 000000000000..ccfcb990eb1e --- /dev/null +++ b/Documentation/devicetree/bindings/phy/cdns,salvo-phy.yaml @@ -0,0 +1,49 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +# Copyright (c) 2020 NXP +%YAML 1.2 +--- +$id: "http://devicetree.org/schemas/phy/cdns,salvo-phy.yaml#" +$schema: "http://devicetree.org/meta-schemas/core.yaml#" + +title: Cadence SALVO PHY + +maintainers: + - Peter Chen <peter.chen@nxp.com> + +properties: + compatible: + enum: + - nxp,salvo-phy + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + + clock-names: + items: + - const: salvo_phy_clk + + "#phy-cells": + const: 1 + +required: + - compatible + - reg + - "#phy-cells" + +additionalProperties: false + +examples: + - | + #include <dt-bindings/firmware/imx/rsrc.h> + + usb3phy: usb3-phy@5B160000 { + compatible = "nxp,salvo-phy"; + reg = <0x5B160000 0x40000>; + clocks = <&usb3_lpcg 4>; + clock-names = "salvo_phy_clk"; + power-domains = <&pd IMX_SC_R_USB_2_PHY>; + #phy-cells = <0>; + };
Add Cadence SALVO PHY binding doc, this PHY is a legacy module, and is only used for USB3 and USB2. Signed-off-by: Peter Chen <peter.chen@nxp.com> --- Changes for v2: - Fix kinds of yaml style issue .../bindings/phy/cdns,salvo-phy.yaml | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 Documentation/devicetree/bindings/phy/cdns,salvo-phy.yaml