Message ID | 20201118132440.15862-2-zajec5@gmail.com |
---|---|
State | Superseded |
Headers | show |
Series | reset: support Broadcom's PMB | expand |
On Wed, 18 Nov 2020 14:24:39 +0100, Rafał Miłecki wrote: > From: Rafał Miłecki <rafal@milecki.pl> > > Broadcom's PMB is reset controller used for disabling and enabling SoC > devices. > > Signed-off-by: Rafał Miłecki <rafal@milecki.pl> > --- > .../devicetree/bindings/reset/brcm,pmb.yaml | 51 +++++++++++++++++++ > include/dt-bindings/reset/brcm,pmb.h | 9 ++++ > 2 files changed, 60 insertions(+) > create mode 100644 Documentation/devicetree/bindings/reset/brcm,pmb.yaml > create mode 100644 include/dt-bindings/reset/brcm,pmb.h > My bot found errors running 'make dt_binding_check' on your patch: yamllint warnings/errors: dtschema/dtc warnings/errors: Error: Documentation/devicetree/bindings/reset/brcm,pmb.example.dts:31.5-6 syntax error FATAL ERROR: Unable to parse input tree make[1]: *** [scripts/Makefile.lib:342: Documentation/devicetree/bindings/reset/brcm,pmb.example.dt.yaml] Error 1 make[1]: *** Waiting for unfinished jobs.... make: *** [Makefile:1364: dt_binding_check] Error 2 See https://patchwork.ozlabs.org/patch/1402238 The base for the patch is generally the last rc1. Any dependencies should be noted. 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.
On 11/18/20 5:24 AM, Rafał Miłecki wrote: > From: Rafał Miłecki <rafal@milecki.pl> > > Broadcom's PMB is reset controller used for disabling and enabling SoC > devices. > > Signed-off-by: Rafał Miłecki <rafal@milecki.pl> > --- > .../devicetree/bindings/reset/brcm,pmb.yaml | 51 +++++++++++++++++++ > include/dt-bindings/reset/brcm,pmb.h | 9 ++++ > 2 files changed, 60 insertions(+) > create mode 100644 Documentation/devicetree/bindings/reset/brcm,pmb.yaml > create mode 100644 include/dt-bindings/reset/brcm,pmb.h > > diff --git a/Documentation/devicetree/bindings/reset/brcm,pmb.yaml b/Documentation/devicetree/bindings/reset/brcm,pmb.yaml > new file mode 100644 > index 000000000000..ea78ab629c45 > --- /dev/null > +++ b/Documentation/devicetree/bindings/reset/brcm,pmb.yaml > @@ -0,0 +1,51 @@ > +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/reset/brcm,pmb.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Broadcom PMB Master reset controller > + > +description: This document describes Broadcom's PMB controller. It supports > + resetting various types of connected devices (e.g. PCIe, USB, SATA). It > + requires specifying device address. > + > +maintainers: > + - Rafał Miłecki <rafal@milecki.pl> > + > +properties: > + compatible: > + enum: > + - brcm,bcm4908-pmb # PMB on BCM4908 and compatible SoCs > + > + reg: > + maxItems: 1 > + > + big-endian: > + $ref: /schemas/types.yaml#/definitions/flag > + description: > + Flag to use for block working in big endian mode. > + > + "#reset-cells": > + const: 2 I believe we would need a description of the #reset-cells property that indicates what they do. Other than that and the build failure below: Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> > + > +required: > + - compatible > + - reg > + - "#reset-cells" > + > +additionalProperties: false > + > +examples: > + - | > + #include <dt-bindings/reset/brcm,pmb.h> > + > + pmb: reset-controller@802800e0 { > + compatible = "brcm,bcm4908-pmb"; > + reg = <0x802800e0 0x20>; > + #reset-cells = <2>; > + }; > + > + foo { > + resets = <&pmb BRCM_PMB_USB 17>; > + } You are missing a ';' here which is why the binding example did not build. > diff --git a/include/dt-bindings/reset/brcm,pmb.h b/include/dt-bindings/reset/brcm,pmb.h > new file mode 100644 > index 000000000000..1b724e451de1 > --- /dev/null > +++ b/include/dt-bindings/reset/brcm,pmb.h > @@ -0,0 +1,9 @@ > +/* SPDX-License-Identifier: GPL-2.0-or-later OR MIT */ > + > +#ifndef _DT_BINDINGS_RESET_BRCM_PMB > +#define _DT_BINDINGS_RESET_BRCM_PMB > + > +#define BRCM_PMB_USB 0x01 > +#define BRCM_PMB_PCIE 0x02 > + > +#endif >
On Wed, 18 Nov 2020 at 22:47, Florian Fainelli <f.fainelli@gmail.com> wrote: > On 11/18/20 1:45 PM, Florian Fainelli wrote: > > On 11/18/20 5:24 AM, Rafał Miłecki wrote: > >> From: Rafał Miłecki <rafal@milecki.pl> > >> > >> Broadcom's PMB is reset controller used for disabling and enabling SoC > >> devices. > >> > >> Signed-off-by: Rafał Miłecki <rafal@milecki.pl> > >> --- > >> .../devicetree/bindings/reset/brcm,pmb.yaml | 51 +++++++++++++++++++ > >> include/dt-bindings/reset/brcm,pmb.h | 9 ++++ > >> 2 files changed, 60 insertions(+) > >> create mode 100644 Documentation/devicetree/bindings/reset/brcm,pmb.yaml > >> create mode 100644 include/dt-bindings/reset/brcm,pmb.h > >> > >> diff --git a/Documentation/devicetree/bindings/reset/brcm,pmb.yaml b/Documentation/devicetree/bindings/reset/brcm,pmb.yaml > >> new file mode 100644 > >> index 000000000000..ea78ab629c45 > >> --- /dev/null > >> +++ b/Documentation/devicetree/bindings/reset/brcm,pmb.yaml > >> @@ -0,0 +1,51 @@ > >> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause > >> +%YAML 1.2 > >> +--- > >> +$id: http://devicetree.org/schemas/reset/brcm,pmb.yaml# > >> +$schema: http://devicetree.org/meta-schemas/core.yaml# > >> + > >> +title: Broadcom PMB Master reset controller > >> + > >> +description: This document describes Broadcom's PMB controller. It supports > >> + resetting various types of connected devices (e.g. PCIe, USB, SATA). It > >> + requires specifying device address. > >> + > >> +maintainers: > >> + - Rafał Miłecki <rafal@milecki.pl> > >> + > >> +properties: > >> + compatible: > >> + enum: > >> + - brcm,bcm4908-pmb # PMB on BCM4908 and compatible SoCs > >> + > >> + reg: > >> + maxItems: 1 > >> + > >> + big-endian: > >> + $ref: /schemas/types.yaml#/definitions/flag > >> + description: > >> + Flag to use for block working in big endian mode. > >> + > >> + "#reset-cells": > >> + const: 2 > > > > I believe we would need a description of the #reset-cells property that > > indicates what they do. > > > > Other than that and the build failure below: > > I don't know how to express constraints on each of the cells, but since > they are represented by 8 bits you may want to add mininimum: 0 / > maximum: 255 constraints in the YAML binding. I don't think there is syntax for that, I'll just use descriptions as other bindings do. -- Rafał
diff --git a/Documentation/devicetree/bindings/reset/brcm,pmb.yaml b/Documentation/devicetree/bindings/reset/brcm,pmb.yaml new file mode 100644 index 000000000000..ea78ab629c45 --- /dev/null +++ b/Documentation/devicetree/bindings/reset/brcm,pmb.yaml @@ -0,0 +1,51 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/reset/brcm,pmb.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Broadcom PMB Master reset controller + +description: This document describes Broadcom's PMB controller. It supports + resetting various types of connected devices (e.g. PCIe, USB, SATA). It + requires specifying device address. + +maintainers: + - Rafał Miłecki <rafal@milecki.pl> + +properties: + compatible: + enum: + - brcm,bcm4908-pmb # PMB on BCM4908 and compatible SoCs + + reg: + maxItems: 1 + + big-endian: + $ref: /schemas/types.yaml#/definitions/flag + description: + Flag to use for block working in big endian mode. + + "#reset-cells": + const: 2 + +required: + - compatible + - reg + - "#reset-cells" + +additionalProperties: false + +examples: + - | + #include <dt-bindings/reset/brcm,pmb.h> + + pmb: reset-controller@802800e0 { + compatible = "brcm,bcm4908-pmb"; + reg = <0x802800e0 0x20>; + #reset-cells = <2>; + }; + + foo { + resets = <&pmb BRCM_PMB_USB 17>; + } diff --git a/include/dt-bindings/reset/brcm,pmb.h b/include/dt-bindings/reset/brcm,pmb.h new file mode 100644 index 000000000000..1b724e451de1 --- /dev/null +++ b/include/dt-bindings/reset/brcm,pmb.h @@ -0,0 +1,9 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later OR MIT */ + +#ifndef _DT_BINDINGS_RESET_BRCM_PMB +#define _DT_BINDINGS_RESET_BRCM_PMB + +#define BRCM_PMB_USB 0x01 +#define BRCM_PMB_PCIE 0x02 + +#endif