phy: cadence: salvo: add salvo phy driver
Subsystems (3)
PATCH v2 1/2 phy: cadence: salvo: add salvo phy driver
Cadence SALVO PHY is a 28nm product, and is only used for USB3 & USB2. According to the Cadence, this PHY is a legacy Module, and Sierra and Torrent are later evolutions from it, and their sequence overlap is minimal, meaning we cannot reuse either (Sierra & Torrent) of the PHY drivers.
---
Changes for v2:
- No changes
drivers/phy/cadence/Kconfig | 9 + drivers/phy/cadence/Makefile | 1 + drivers/phy/cadence/phy-cadence-salvo.c | 316 ++++++++++++++++++++++++ 3 files changed, 326 insertions(+) create mode 100644 drivers/phy/cadence/phy-cadence-salvo.c
drivers/phy/cadence/Kconfig +9 -0
@@ -27,3 +27,12 @@ config PHY_CADENCE_SIERRA select GENERIC_PHY help Enable this to support the Cadence Sierra PHY driver + +config PHY_CADENCE_SALVO + tristate "Cadence Salvo PHY Driver" + depends on OF && HAS_IOMEM + select GENERIC_PHY + help + Enable this to support the Cadence SALVO PHY driver, + this PHY is a legacy PHY, and only are used for USB3 + and USB2.
drivers/phy/cadence/Makefile +1 -0
@@ -2,3 +2,4 @@ obj-$(CONFIG_PHY_CADENCE_DP) += phy-cadence-dp.o obj-$(CONFIG_PHY_CADENCE_DPHY) += cdns-dphy.o obj-$(CONFIG_PHY_CADENCE_SIERRA) += phy-cadence-sierra.o +obj-$(CONFIG_PHY_CADENCE_SALVO) += phy-cadence-salvo.o
drivers/phy/cadence/phy-cadence-salvo.c new file +316 -0
316 lines not on this page · raw message
Signature · 1 line
2.17.1
PATCH v2 2/2 doc: dt-binding: cdns-salvo-phy: add binding doc
Add Cadence SALVO PHY binding doc, this PHY is a legacy module, and is only used for USB3 and USB2.
---
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
Documentation/devicetree/bindings/phy/cdns,salvo-phy.yaml new file +49 -0
@@ -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 <[email protected]> + +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>; + };
Signature · 1 line
2.17.1
Rob Herring
maintainerRe: [PATCH v2 2/2] doc: dt-binding: cdns-salvo-phy: add binding doc
Quoted 12 lines · Peter Chen
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 <[email protected]>---
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.
Re: [PATCH v2 2/2] doc: dt-binding: cdns-salvo-phy: add binding doc
Quoted 9 lines · Rob Herring
Quoted 8 lines · Peter Chen
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 <[email protected]>---
Changes for v2:
- Fix kinds of yaml style issue
Quoted 8 lines
Quoted 4 lines
.../bindings/phy/cdns,salvo-phy.yaml | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 Documentation/devicetree/bindings/phy/cdns,salvo-phy.yamlMy 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
Quoted 2 lines
/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.
*/
Signature · 2 lines
Thanks, Peter Chen
Rob Herring
maintainerRe: [PATCH v2 2/2] doc: dt-binding: cdns-salvo-phy: add binding doc
Quoted 16 lines · Peter Chen
Quoted 14 lines · Rob Herring
Quoted 12 lines · Peter Chen
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 <[email protected]>---
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
Quoted 6 lines
Quoted 3 lines
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.
Quoted 7 lines
Quoted 3 lines
/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
Quoted 10 lines
/**
*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 customof_xlatefunction 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
RE: [PATCH v2 2/2] doc: dt-binding: cdns-salvo-phy: add binding doc
Quoted 20 lines
Quoted 17 lines · Rob Herring
Quoted 15 lines · Peter Chen
Quoted 13 lines
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 <[email protected]>---
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.yamlQuoted 3 lines
Quoted 3 lines
My bot found errors running 'make
dt_binding_check' on your patch:/builds/robherring/linux-dt-
Quoted 9 lines
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]+'Quoted 3 lines
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.
Quoted 25 lines
And you might want to be up to date with your kernel tree.
Quoted 9 lines
Quoted 5 lines
/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.cQuoted 13 lines
/**
*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 customof_xlatefunction that reads the *args* and
returns
* the appropriate phy.
*/
Quoted 2 lines
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
Rob Herring
maintainerRe: [PATCH v2 2/2] doc: dt-binding: cdns-salvo-phy: add binding doc
Quoted 31 lines · Peter Chen
Quoted 21 lines
Quoted 18 lines · Rob Herring
Quoted 15 lines · Peter Chen
Quoted 13 lines
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 <[email protected]>---
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.yamlQuoted 3 lines
Quoted 3 lines
My bot found errors running 'make
dt_binding_check' on your patch:/builds/robherring/linux-dt-
Quoted 9 lines
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]+'Quoted 3 lines
The 'power-domains' is described at:
Documentation/devicetree/bindings/power/power_domain.txt.txt files don't generate warnings.
Quoted 6 lines
I mean why
dt_bind_checkreport 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.
Quoted 25 lines
Quoted 25 lines
And you might want to be up to date with your kernel tree.
Quoted 22 lines
Quoted 5 lines
/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 customof_xlatefunction that reads the *args* and
returns
* the appropriate phy.
*/
Quoted 4 lines
Quoted 2 lines
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
Quoted 25 lines
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
Quoted 8 lines
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