From: Conor Dooley <conor.dooley@microchip.com>
This series updates the microchip icicle kit device tree by adding a host
of peripherals, and some updates to the memory map. In addition, the device
tree has been split into a third part, which contains "soft" peripherals
that are in the fpga fabric.
Several of the entries are for peripherals that have not get had their drivers
upstreamed, so in those cases the dt bindings are included where appropriate
in order to avoid as many "DT compatible string <x> appears un-documented"
errors as possible.
Depends on mpfs clock driver series [1] to provide:
dt-bindings/clock/microchip,mpfs-clock.h
and on the other changes to the icicle/mpfs device tree
that are already in linux/riscv/for-next.
[1] https://lore.kernel.org/linux-clk/20210818141102.36655-2-daire.mcnamara@microchip.com/
Conor Dooley (11):
dt-bindings: soc/microchip: update sys ctrlr compat string
dt-bindings: riscv: update microchip polarfire binds
dt-bindings: i2c: add bindings for microchip mpfs i2c
dt-bindings: rng: add bindings for microchip mpfs rng
dt-bindings: rtc: add bindings for microchip mpfs rtc
dt-bindings: soc/microchip: add bindings for mpfs system services
dt-bindings: gpio: add bindings for microchip mpfs gpio
dt-bindings: spi: add bindings for microchip mpfs spi
dt-bindings: usb: add bindings for microchip mpfs musb
riscv: icicle-kit: update microchip icicle kit device tree
MAINTAINERS: update riscv/microchip entry
Ivan Griffin (2):
dt-bindings: interrupt-controller: add defines for riscv-hart
dt-bindings: interrupt-controller: add defines for mpfs-plic
.../bindings/gpio/microchip,mpfs-gpio.yaml | 108 ++++++
.../bindings/i2c/microchip,mpfs-i2c.yaml | 74 ++++
.../microchip,polarfire-soc-mailbox.yaml | 4 +-
.../devicetree/bindings/riscv/microchip.yaml | 1 +
.../bindings/rng/microchip,mpfs-rng.yaml | 31 ++
.../bindings/rtc/microchip,mfps-rtc.yaml | 61 ++++
.../microchip,mpfs-generic-service.yaml | 31 ++
...icrochip,polarfire-soc-sys-controller.yaml | 4 +-
.../bindings/spi/microchip,mpfs-spi.yaml | 72 ++++
.../bindings/usb/microchip,mpfs-usb-host.yaml | 70 ++++
MAINTAINERS | 2 +
.../dts/microchip/microchip-mpfs-fabric.dtsi | 21 ++
.../microchip/microchip-mpfs-icicle-kit.dts | 159 +++++++--
.../boot/dts/microchip/microchip-mpfs.dtsi | 333 ++++++++++++++----
drivers/mailbox/mailbox-mpfs.c | 1 +
.../microchip,mpfs-plic.h | 199 +++++++++++
.../interrupt-controller/riscv-hart.h | 19 +
17 files changed, 1103 insertions(+), 87 deletions(-)
create mode 100644 Documentation/devicetree/bindings/gpio/microchip,mpfs-gpio.yaml
create mode 100644 Documentation/devicetree/bindings/i2c/microchip,mpfs-i2c.yaml
create mode 100644 Documentation/devicetree/bindings/rng/microchip,mpfs-rng.yaml
create mode 100644 Documentation/devicetree/bindings/rtc/microchip,mfps-rtc.yaml
create mode 100644 Documentation/devicetree/bindings/soc/microchip/microchip,mpfs-generic-service.yaml
create mode 100644 Documentation/devicetree/bindings/spi/microchip,mpfs-spi.yaml
create mode 100644 Documentation/devicetree/bindings/usb/microchip,mpfs-usb-host.yaml
create mode 100644 arch/riscv/boot/dts/microchip/microchip-mpfs-fabric.dtsi
create mode 100644 include/dt-bindings/interrupt-controller/microchip,mpfs-plic.h
create mode 100644 include/dt-bindings/interrupt-controller/riscv-hart.h
--
2.33.1
From: Ivan Griffin <redacted>
Provide named identifiers for device tree for RISC-V interrupts.
Licensed under GPL and MIT, as this file may be useful to any OS that
uses device tree.
Signed-off-by: Ivan Griffin <redacted>
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
---
.../interrupt-controller/riscv-hart.h | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
create mode 100644 include/dt-bindings/interrupt-controller/riscv-hart.h
Am Montag, 8. November 2021, 16:05:42 CET schrieb conor.dooley@microchip.com:
quoted hunk
From: Ivan Griffin <redacted>
Provide named identifiers for device tree for RISC-V interrupts.
Licensed under GPL and MIT, as this file may be useful to any OS that
uses device tree.
Signed-off-by: Ivan Griffin <redacted>
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
---
.../interrupt-controller/riscv-hart.h | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
create mode 100644 include/dt-bindings/interrupt-controller/riscv-hart.h
(1) From checking clic doc [0] I see an additional
12 CLIC software interrupt
defined.
(2) The doc states that the ordering is a recommendation and
"not mandatory in all incarnations of the CLIC"
Is that clarified somewhere else that this more than recommended?
Thanks
Heiko
[0] https://github.com/riscv/riscv-fast-interrupt/blob/master/clic.adoc
On Tue, Nov 23, 2021 at 4:38 PM Heiko Stübner [off-list ref] wrote:
Am Montag, 8. November 2021, 16:05:42 CET schrieb conor.dooley@microchip.com:
quoted
From: Ivan Griffin <redacted>
Provide named identifiers for device tree for RISC-V interrupts.
Licensed under GPL and MIT, as this file may be useful to any OS that
uses device tree.
Signed-off-by: Ivan Griffin <redacted>
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
---
.../interrupt-controller/riscv-hart.h | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
create mode 100644 include/dt-bindings/interrupt-controller/riscv-hart.h
(1) From checking clic doc [0] I see an additional
12 CLIC software interrupt
defined.
Local IRQ #12 is for S-mode guest external interrupts as-per
the ratified H-extension specification.
I guess CLIC spec needs to be updated.
Regards,
Anup
From: Rob Herring <robh@kernel.org> Date: 2021-11-29 19:59:45
On Mon, 08 Nov 2021 15:05:42 +0000, conor.dooley@microchip.com wrote:
From: Ivan Griffin <redacted>
Provide named identifiers for device tree for RISC-V interrupts.
Licensed under GPL and MIT, as this file may be useful to any OS that
uses device tree.
Signed-off-by: Ivan Griffin <redacted>
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
---
.../interrupt-controller/riscv-hart.h | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
create mode 100644 include/dt-bindings/interrupt-controller/riscv-hart.h
Some thoughts I had while reading the patch:
(1) Are these constants really helpful?
- the PLIC is part of the soc, so most references will be handled in
the core soc dtsi - and only once - and no board devicetree will
likely need to handle them at all
- named constants are helpful if they make the number clearer
but PLIC_INT_GPIO0_BIT2_OR_GPIO2_BIT2
or PLIC_INT_FABRIC_F2H_47 (and friends) probably do not really
provide any additional value to someone reading the devicetree source
(2) If they should stay, they probably need a different prefix as they're
pretty specific to the plic on the polarfire soc, so maybe
MPFS_PLIC_* ?
Heiko
From: Rob Herring <robh@kernel.org> Date: 2021-11-29 19:58:26
On Mon, Nov 08, 2021 at 03:05:43PM +0000, conor.dooley@microchip.com wrote:
From: Ivan Griffin <redacted>
Add device tree bindings for the Microchip Polarfire Soc interrupt
controller
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Ivan Griffin <redacted>
---
.../microchip,mpfs-plic.h | 199 ++++++++++++++++++
1 file changed, 199 insertions(+)
create mode 100644 include/dt-bindings/interrupt-controller/microchip,mpfs-plic.h
Notice how there are not SoC interrupt defines in this directory. That's
because we don't do defines for them. The 'rule' is only defines for
made up numbers which are not in a reference manual.
Rob
EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
On Mon, Nov 08, 2021 at 03:05:43PM +0000, conor.dooley@microchip.com wrote:
quoted
From: Ivan Griffin <redacted>
Add device tree bindings for the Microchip Polarfire Soc interrupt
controller
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Ivan Griffin <redacted>
---
.../microchip,mpfs-plic.h | 199 ++++++++++++++++++
1 file changed, 199 insertions(+)
create mode 100644 include/dt-bindings/interrupt-controller/microchip,mpfs-plic.h
Notice how there are not SoC interrupt defines in this directory. That's
because we don't do defines for them. The 'rule' is only defines for
made up numbers which are not in a reference manual.
Oh fair enough, I will drop these changes for V2 so. Thanks.
Hi Conor,
On Mon, Nov 8, 2021 at 4:06 PM [off-list ref] wrote:
From: Conor Dooley <conor.dooley@microchip.com>
Update 'compatible' strings for system controller drivers to the
approved Microchip name.
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
Is there any point in keeping the old compatible value?
Are there any real users? Most of the MPFS upstream DT is still in flux.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
Hi Conor,
On Mon, Nov 8, 2021 at 4:06 PM [off-list ref] wrote:
quoted
From: Conor Dooley <conor.dooley@microchip.com>
Update 'compatible' strings for system controller drivers to the
approved Microchip name.
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
Is there any point in keeping the old compatible value?
Are there any real users? Most of the MPFS upstream DT is still in flux.
yeah, true. and now is as good a time as any to just outright change it.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
On Mon, Nov 08, 2021 at 03:05:44PM +0000, conor.dooley@microchip.com wrote:
quoted
From: Conor Dooley <conor.dooley@microchip.com>
Update 'compatible' strings for system controller drivers to the
approved Microchip name.
Why do I care what Microchip approved? You all picked identifiers
(that's all it is) and now get to live with them.
Hi Rob,
You're speaking to the person who was perfectly happy with
"polarfire-soc" when I wrote the binding last year, but I was asked to
change it in order avoid having a different compatible string in the
device tree for the soc and in the binding for a device that only exists
in that soc.
If the v2 was a complete rename from "polarfire-soc-*" to "mpfs-*",
including the file name - as opposed to an addition and I changed the
commit message to the following would you be happier with the patch?
> Change "polarfire-soc-*" compatible strings to "mpfs-*" in its system
> controller bindings in order to match the compatible string used in
> the soc binding and device tree.
Thanks,
Conor.
Doesn't the "s" in "mpfs" already stand for "soc"?
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
Hi Conor,
On Mon, Nov 8, 2021 at 4:06 PM [off-list ref] wrote:
Doesn't the "s" in "mpfs" already stand for "soc"?
not wrong, but using mpf-soc would be confusing since "mpf" is the part
name for the non soc fpga. is it fine to just reuse "mpfs" for the dtsi
overall compatible and for the soc subsection?
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Doesn't the "s" in "mpfs" already stand for "soc"?
not wrong, but using mpf-soc would be confusing since "mpf" is the part
name for the non soc fpga. is it fine to just reuse "mpfs" for the dtsi
overall compatible and for the soc subsection?
I really meant: what is the difference between "microchip,mpfs" and
"microchip,mpfs-soc"? Can't you just use the former?
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Doesn't the "s" in "mpfs" already stand for "soc"?
not wrong, but using mpf-soc would be confusing since "mpf" is the part
name for the non soc fpga. is it fine to just reuse "mpfs" for the dtsi
overall compatible and for the soc subsection?
I really meant: what is the difference between "microchip,mpfs" and
"microchip,mpfs-soc"? Can't you just use the former?
definitly agreed :-)
Having the board named as
compatible = "microchip,mpfs-icicle-kit", "microchip,mpfs"
sounds the most sensible.
As Conor wrote, "mpfs" is the name of the soc itself - with mpf being
the fpga part, so that would follow what boards in other parts of the
kernel do.
Heiko
@@ -0,0 +1,74 @@+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)+%YAML1.2+---+$id:http://devicetree.org/schemas/i2c/microchip,mpfs-i2c.yaml#+$schema:http://devicetree.org/meta-schemas/core.yaml#++title:Microchip MPFS I2C Controller Device Tree Bindings++maintainers:+-Daire McNamara <daire.mcnamara@microchip.com>++description:|+This I2C controller is found on the Microchip PolarFire SoC.++allOf:+-$ref:/schemas/i2c/i2c-controller.yaml#++properties:+compatible:+enum:+-microchip,mpfs-i2c# Microchip PolarFire SoC compatible SoCs++reg:+maxItems:1++interrupts:+maxItems:1++clocks:+description:Phandle of the clock feeding the I2C controller.+minItems:1++clock-frequency:+description:|+Desired I2C bus clock frequency in Hz. As only Standard and Fast+modes are supported, possible values are 100000 and 400000.+enum:[100000,400000]++required:+-compatible+-reg+-interrupts+-clocks++unevaluatedProperties:false++examples:+-|+#include <dt-bindings/clock/microchip,mpfs-clock.h>+soc {+#address-cells = <2>;+#size-cells = <2>;+i2c@2010a000 {+compatible = "microchip,mpfs-i2c";+reg = <0 0x2010a000 0 0x1000>;+interrupts = <58>;+clock-frequency = <100000>;+clocks = <&clkcfg CLK_I2C0>;+};+};+-|+#include <dt-bindings/clock/microchip,mpfs-clock.h>+soc {+#address-cells = <2>;+#size-cells = <2>;+i2c@2010b000 {+compatible = "microchip,mpfs-i2c";+reg = <0 0x2010b000 0 0x1000>;+interrupts = <61>;+clock-frequency = <100000>;+clocks = <&clkcfg CLK_I2C1>;+};+};+...
@@ -0,0 +1,74 @@+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)+%YAML1.2+---+$id:http://devicetree.org/schemas/i2c/microchip,mpfs-i2c.yaml#+$schema:http://devicetree.org/meta-schemas/core.yaml#++title:Microchip MPFS I2C Controller Device Tree Bindings++maintainers:+-Daire McNamara <daire.mcnamara@microchip.com>++description:|+This I2C controller is found on the Microchip PolarFire SoC.++allOf:+-$ref:/schemas/i2c/i2c-controller.yaml#++properties:+compatible:+enum:+-microchip,mpfs-i2c# Microchip PolarFire SoC compatible SoCs++reg:+maxItems:1++interrupts:+maxItems:1++clocks:+description:Phandle of the clock feeding the I2C controller.
Skip such descriptions here and in other patches - they do not introduce
any meaningful information.
+ minItems: 1
Define instead exact number of clocks or maxItems... but why would they
be variable?
From: Rob Herring <robh@kernel.org> Date: 2021-11-09 04:06:38
On Mon, 08 Nov 2021 15:05:46 +0000, conor.dooley@microchip.com wrote:
From: Conor Dooley <conor.dooley@microchip.com>
Add device tree bindings for the i2c controller on
the Microchip PolarFire SoC.
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Daire McNamara <daire.mcnamara@microchip.com>
---
.../bindings/i2c/microchip,mpfs-i2c.yaml | 74 +++++++++++++++++++
1 file changed, 74 insertions(+)
create mode 100644 Documentation/devicetree/bindings/i2c/microchip,mpfs-i2c.yaml
My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):
yamllint warnings/errors:
dtschema/dtc warnings/errors:
Documentation/devicetree/bindings/i2c/microchip,mpfs-i2c.example.dts:19:18: fatal error: dt-bindings/clock/microchip,mpfs-clock.h: No such file or directory
19 | #include <dt-bindings/clock/microchip,mpfs-clock.h>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [scripts/Makefile.lib:385: Documentation/devicetree/bindings/i2c/microchip,mpfs-i2c.example.dt.yaml] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:1441: dt_binding_check] Error 2
doc reference errors (make refcheckdocs):
See https://patchwork.ozlabs.org/patch/1552366
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.
@@ -0,0 +1,31 @@+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)+%YAML1.2+---+$id:"http://devicetree.org/schemas/rng/microchip,mpfs-rng.yaml#"+$schema:"http://devicetree.org/meta-schemas/core.yaml#"++title:Microchip MPFS random number generator++maintainers:+-Conor Dooley <conor.dooley@microchip.com>++properties:+compatible:+const:microchip,polarfire-soc-rng++syscontroller:+maxItems:1+description:name of the system controller device node++required:+-compatible+-"syscontroller"++additionalProperties:false++examples:+-|+hwrandom:hwrandom {+compatible = "microchip,polarfire-soc-rng";+syscontroller = <&syscontroller>;+};
@@ -0,0 +1,31 @@+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)+%YAML1.2+---+$id:"http://devicetree.org/schemas/rng/microchip,mpfs-rng.yaml#"+$schema:"http://devicetree.org/meta-schemas/core.yaml#"++title:Microchip MPFS random number generator++maintainers:+-Conor Dooley <conor.dooley@microchip.com>++properties:+compatible:+const:microchip,polarfire-soc-rng++syscontroller:+maxItems:1+description:name of the system controller device node
There are several issues with this:
1. You need to describe the type.
2. Description is not helpful (just copying the name of property) and
actually misleading because you do not put there the name of device node.
3. What is it? Looks like syscon (or sometimes called sysreg). If yes,
please use existing syscon bindings.
@@ -0,0 +1,31 @@+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)+%YAML1.2+---+$id:"http://devicetree.org/schemas/rng/microchip,mpfs-rng.yaml#"+$schema:"http://devicetree.org/meta-schemas/core.yaml#"++title:Microchip MPFS random number generator++maintainers:+-Conor Dooley <conor.dooley@microchip.com>++properties:+compatible:+const:microchip,polarfire-soc-rng++syscontroller:+maxItems:1+description:name of the system controller device node
There are several issues with this:
1. You need to describe the type.
2. Description is not helpful (just copying the name of property) and
actually misleading because you do not put there the name of device node.
3. What is it? Looks like syscon (or sometimes called sysreg). If yes,
please use existing syscon bindings.
1 & 2 - Correct, it is bad & I'll write a better description for it.
3 - Its a system controller implemented as a mailbox. The syscontroller
is the mailbox client, which the rng and generic drivers both use.
@@ -0,0 +1,31 @@+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)+%YAML1.2+---+$id:"http://devicetree.org/schemas/rng/microchip,mpfs-rng.yaml#"+$schema:"http://devicetree.org/meta-schemas/core.yaml#"++title:Microchip MPFS random number generator++maintainers:+-Conor Dooley <conor.dooley@microchip.com>++properties:+compatible:+const:microchip,polarfire-soc-rng++syscontroller:+maxItems:1+description:name of the system controller device node
There are several issues with this:
1. You need to describe the type.
2. Description is not helpful (just copying the name of property) and
actually misleading because you do not put there the name of device node.
3. What is it? Looks like syscon (or sometimes called sysreg). If yes,
please use existing syscon bindings.
1 & 2 - Correct, it is bad & I'll write a better description for it.
3 - Its a system controller implemented as a mailbox. The syscontroller
is the mailbox client, which the rng and generic drivers both use.
I understood that pointed device node is a mailbox, not this node. But
here, what is it here? How do you use it here?
Best regards,
Krzysztof
@@ -0,0 +1,31 @@+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)+%YAML1.2+---+$id:"http://devicetree.org/schemas/rng/microchip,mpfs-rng.yaml#"+$schema:"http://devicetree.org/meta-schemas/core.yaml#"++title:Microchip MPFS random number generator++maintainers:+-Conor Dooley <conor.dooley@microchip.com>++properties:+compatible:+const:microchip,polarfire-soc-rng++syscontroller:+maxItems:1+description:name of the system controller device node
There are several issues with this:
1. You need to describe the type.
2. Description is not helpful (just copying the name of property) and
actually misleading because you do not put there the name of device node.
3. What is it? Looks like syscon (or sometimes called sysreg). If yes,
please use existing syscon bindings.
1 & 2 - Correct, it is bad & I'll write a better description for it.
3 - Its a system controller implemented as a mailbox. The syscontroller
is the mailbox client, which the rng and generic drivers both use.
I understood that pointed device node is a mailbox, not this node. But
here, what is it here? How do you use it here?
The system controller is the means of access to the random number
generator. The phandle to the sys controller is provided here so that
the rng driver can locate the mailbox client through which it requests
random numbers.
I'm not quite sure that I am answering the question you are asking though.
@@ -0,0 +1,31 @@+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)+%YAML1.2+---+$id:"http://devicetree.org/schemas/rng/microchip,mpfs-rng.yaml#"+$schema:"http://devicetree.org/meta-schemas/core.yaml#"++title:Microchip MPFS random number generator++maintainers:+-Conor Dooley <conor.dooley@microchip.com>++properties:+compatible:+const:microchip,polarfire-soc-rng++syscontroller:+maxItems:1+description:name of the system controller device node
There are several issues with this:
1. You need to describe the type.
2. Description is not helpful (just copying the name of property) and
actually misleading because you do not put there the name of device node.
3. What is it? Looks like syscon (or sometimes called sysreg). If yes,
please use existing syscon bindings.
1 & 2 - Correct, it is bad & I'll write a better description for it.
3 - Its a system controller implemented as a mailbox. The syscontroller
is the mailbox client, which the rng and generic drivers both use.
I understood that pointed device node is a mailbox, not this node. But
here, what is it here? How do you use it here?
The system controller is the means of access to the random number
generator. The phandle to the sys controller is provided here so that
the rng driver can locate the mailbox client through which it requests
random numbers.
I am asking this to understand whether there is a generic or existing
property which should be used instead.
If I understand correctly, the rng driver needs a mailbox client? If it
is mailbox client, then there is a property: "mboxes". Use this one
(look for existing bindings, e.g.
Documentation/devicetree/bindings/firmware/arm,scmi.yaml).
Best regards,
Krzysztof
@@ -0,0 +1,31 @@+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)+%YAML1.2+---+$id:"http://devicetree.org/schemas/rng/microchip,mpfs-rng.yaml#"+$schema:"http://devicetree.org/meta-schemas/core.yaml#"++title:Microchip MPFS random number generator++maintainers:+-Conor Dooley <conor.dooley@microchip.com>++properties:+compatible:+const:microchip,polarfire-soc-rng++syscontroller:+maxItems:1+description:name of the system controller device node
There are several issues with this:
1. You need to describe the type.
2. Description is not helpful (just copying the name of property) and
actually misleading because you do not put there the name of device node.
3. What is it? Looks like syscon (or sometimes called sysreg). If yes,
please use existing syscon bindings.
1 & 2 - Correct, it is bad & I'll write a better description for it.
3 - Its a system controller implemented as a mailbox. The syscontroller
is the mailbox client, which the rng and generic drivers both use.
I understood that pointed device node is a mailbox, not this node. But
here, what is it here? How do you use it here?
The system controller is the means of access to the random number
generator. The phandle to the sys controller is provided here so that
the rng driver can locate the mailbox client through which it requests
random numbers.
I am asking this to understand whether there is a generic or existing
property which should be used instead.
If I understand correctly, the rng driver needs a mailbox client?
Correct, it needs one. Binding for that is here:
Documentation/devicetree/bindings/soc/microchip/microchip,polarfire-soc-sys-controller.yaml
If it is a mailbox client, then there is a property: "mboxes". Use this one
(look for existing bindings, e.g.
Documentation/devicetree/bindings/firmware/arm,scmi.yaml).
Best regards,
Krzysztof
@@ -0,0 +1,31 @@+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)+%YAML1.2+---+$id:"http://devicetree.org/schemas/rng/microchip,mpfs-rng.yaml#"+$schema:"http://devicetree.org/meta-schemas/core.yaml#"++title:Microchip MPFS random number generator++maintainers:+-Conor Dooley <conor.dooley@microchip.com>++properties:+compatible:+const:microchip,polarfire-soc-rng++syscontroller:+maxItems:1+description:name of the system controller device node
There are several issues with this:
1. You need to describe the type.
2. Description is not helpful (just copying the name of property) and
actually misleading because you do not put there the name of device node.
3. What is it? Looks like syscon (or sometimes called sysreg). If yes,
please use existing syscon bindings.
1 & 2 - Correct, it is bad & I'll write a better description for it.
3 - Its a system controller implemented as a mailbox. The syscontroller
is the mailbox client, which the rng and generic drivers both use.
I understood that pointed device node is a mailbox, not this node. But
here, what is it here? How do you use it here?
The system controller is the means of access to the random number
generator. The phandle to the sys controller is provided here so that
the rng driver can locate the mailbox client through which it requests
random numbers.
I am asking this to understand whether there is a generic or existing
property which should be used instead.
If I understand correctly, the rng driver needs a mailbox client?
Correct, it needs one. Binding for that is here:
Documentation/devicetree/bindings/soc/microchip/microchip,polarfire-soc-sys-controller.yaml
The rng node and others should be a child of the sys controller node.
Rob
Hi Conor,
On Mon, Nov 8, 2021 at 4:07 PM [off-list ref] wrote:
From: Conor Dooley <conor.dooley@microchip.com>
Add device tree bindings for the hardware rng device accessed via
the system services on the Microchip PolarFire SoC.
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
@@ -0,0 +1,31 @@+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)+%YAML1.2+---+$id:"http://devicetree.org/schemas/rng/microchip,mpfs-rng.yaml#"+$schema:"http://devicetree.org/meta-schemas/core.yaml#"++title:Microchip MPFS random number generator++maintainers:+-Conor Dooley <conor.dooley@microchip.com>++properties:+compatible:+const:microchip,polarfire-soc-rng
"microchip,mpfs-rng", for consistency with other bindings?
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
Hi Conor,
On Mon, Nov 8, 2021 at 4:07 PM [off-list ref] wrote:
quoted
From: Conor Dooley <conor.dooley@microchip.com>
Add device tree bindings for the hardware rng device accessed via
the system services on the Microchip PolarFire SoC.
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
@@ -0,0 +1,31 @@+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)+%YAML1.2+---+$id:"http://devicetree.org/schemas/rng/microchip,mpfs-rng.yaml#"+$schema:"http://devicetree.org/meta-schemas/core.yaml#"++title:Microchip MPFS random number generator++maintainers:+-Conor Dooley <conor.dooley@microchip.com>++properties:+compatible:+const:microchip,polarfire-soc-rng
"microchip,mpfs-rng", for consistency with other bindings?
correct, dropped the wrong one while cleaning up since this doesnt match
the device tree.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
From: Conor Dooley <conor.dooley@microchip.com>
Add device tree bindings for the services provided by the system
controller directly on the Microchip PolarFire SoC.
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
---
.../microchip,mpfs-generic-service.yaml | 31 +++++++++++++++++++
1 file changed, 31 insertions(+)
create mode 100644 Documentation/devicetree/bindings/soc/microchip/microchip,mpfs-generic-service.yaml
@@ -0,0 +1,31 @@+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)+%YAML1.2+---+$id:"http://devicetree.org/schemas/soc/microchip/microchip,mpfs-generic-service.yaml#"+$schema:"http://devicetree.org/meta-schemas/core.yaml#"++title:Microchip MPFS system services++maintainers:+-Conor Dooley <conor.dooley@microchip.com>++properties:+compatible:+const:microchip,mpfs-generic-service++syscontroller:+maxItems:1+description:name of the system controller device node++required:+-compatible+-"syscontroller"++additionalProperties:false++examples:+-|+sysserv:sysserv {+compatible = "microchip,mpfs-generic-service";+syscontroller = <&syscontroller>;+};
From: Krzysztof Kozlowski <hidden> Date: 2021-11-08 21:20:58
On 08/11/2021 16:05, conor.dooley@microchip.com wrote:
quoted hunk
From: Conor Dooley <conor.dooley@microchip.com>
Add device tree bindings for the services provided by the system
controller directly on the Microchip PolarFire SoC.
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
---
.../microchip,mpfs-generic-service.yaml | 31 +++++++++++++++++++
1 file changed, 31 insertions(+)
create mode 100644 Documentation/devicetree/bindings/soc/microchip/microchip,mpfs-generic-service.yaml
@@ -0,0 +1,31 @@+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)+%YAML1.2+---+$id:"http://devicetree.org/schemas/soc/microchip/microchip,mpfs-generic-service.yaml#"+$schema:"http://devicetree.org/meta-schemas/core.yaml#"++title:Microchip MPFS system services++maintainers:+-Conor Dooley <conor.dooley@microchip.com>++properties:+compatible:+const:microchip,mpfs-generic-service++syscontroller:+maxItems:1+description:name of the system controller device node
From: Rob Herring <robh@kernel.org> Date: 2021-11-09 04:06:47
On Mon, 08 Nov 2021 15:05:48 +0000, conor.dooley@microchip.com wrote:
From: Conor Dooley <conor.dooley@microchip.com>
Add device tree bindings for the real time clock on
the Microchip PolarFire SoC.
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Daire McNamara <daire.mcnamara@microchip.com>
---
.../bindings/rtc/microchip,mfps-rtc.yaml | 61 +++++++++++++++++++
1 file changed, 61 insertions(+)
create mode 100644 Documentation/devicetree/bindings/rtc/microchip,mfps-rtc.yaml
My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):
yamllint warnings/errors:
dtschema/dtc warnings/errors:
Documentation/devicetree/bindings/rtc/microchip,mfps-rtc.example.dts:19:18: fatal error: dt-bindings/clock/microchip,mpfs-clock.h: No such file or directory
19 | #include <dt-bindings/clock/microchip,mpfs-clock.h>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [scripts/Makefile.lib:385: Documentation/devicetree/bindings/rtc/microchip,mfps-rtc.example.dt.yaml] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:1441: dt_binding_check] Error 2
doc reference errors (make refcheckdocs):
See https://patchwork.ozlabs.org/patch/1552374
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.
Hi Conor,
On Mon, Nov 8, 2021 at 4:07 PM [off-list ref] wrote:
From: Conor Dooley <conor.dooley@microchip.com>
Add device tree bindings for the real time clock on
the Microchip PolarFire SoC.
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Daire McNamara <daire.mcnamara@microchip.com>
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
@@ -0,0 +1,108 @@+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)+%YAML1.2+---+$id:http://devicetree.org/schemas/gpio/microchip,mpfs-gpio.yaml#+$schema:http://devicetree.org/meta-schemas/core.yaml#++title:Microchip MPFS GPIO Controller Device Tree Bindings++maintainers:+-Conor Dooley <conor.dooley@microchip.com>++description:|+This GPIO controller is found on the Microchip PolarFire SoC.
If "Microchip MPFS" means "Microchip PolarFire SoC", then this is
duplicating the title. Similarly to your previous patches. Skip it then,
there is no point to have descriptions which are obvious or duplicating
existing information.
From: Rob Herring <robh@kernel.org> Date: 2021-11-09 04:06:43
On Mon, 08 Nov 2021 15:05:50 +0000, conor.dooley@microchip.com wrote:
From: Conor Dooley <conor.dooley@microchip.com>
Add device tree bindings for the gpio controller on
the Microchip PolarFire SoC.
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
---
.../bindings/gpio/microchip,mpfs-gpio.yaml | 108 ++++++++++++++++++
1 file changed, 108 insertions(+)
create mode 100644 Documentation/devicetree/bindings/gpio/microchip,mpfs-gpio.yaml
My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):
yamllint warnings/errors:
dtschema/dtc warnings/errors:
Documentation/devicetree/bindings/gpio/microchip,mpfs-gpio.example.dts:19:18: fatal error: dt-bindings/clock/microchip,mpfs-clock.h: No such file or directory
19 | #include "dt-bindings/clock/microchip,mpfs-clock.h"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [scripts/Makefile.lib:385: Documentation/devicetree/bindings/gpio/microchip,mpfs-gpio.example.dt.yaml] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:1441: dt_binding_check] Error 2
doc reference errors (make refcheckdocs):
See https://patchwork.ozlabs.org/patch/1552384
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.
Hi Conor,
On Mon, Nov 8, 2021 at 4:07 PM [off-list ref] wrote:
From: Conor Dooley <conor.dooley@microchip.com>
Add device tree bindings for the gpio controller on
the Microchip PolarFire SoC.
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
@@ -0,0 +1,108 @@+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)+%YAML1.2+---+$id:http://devicetree.org/schemas/gpio/microchip,mpfs-gpio.yaml#+$schema:http://devicetree.org/meta-schemas/core.yaml#++title:Microchip MPFS GPIO Controller Device Tree Bindings++maintainers:+-Conor Dooley <conor.dooley@microchip.com>++description:|+This GPIO controller is found on the Microchip PolarFire SoC.++properties:+compatible:+items:+-enum:+-microchip,mpfs-gpio+-microsemi,ms-pf-mss-gpio
What's the difference between these two?
If there is a difference, please add a comment "# <explanation>"
to each entry.
If there is no difference, please drop the second one.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
@@ -0,0 +1,72 @@+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)+%YAML1.2+---+$id:http://devicetree.org/schemas/spi/microchip,mpfs-spi.yaml#+$schema:http://devicetree.org/meta-schemas/core.yaml#++title:Microchip MPFS {Q,}SPI Controller Device Tree Bindings++maintainers:+-Conor Dooley <conor.dooley@microchip.com>++description:|+This {Q,}SPI controller is found on the Microchip PolarFire SoC.++allOf:+-$ref:"spi-controller.yaml#"
From: Rob Herring <robh@kernel.org> Date: 2021-11-09 04:06:59
On Mon, 08 Nov 2021 15:05:51 +0000, conor.dooley@microchip.com wrote:
From: Conor Dooley <conor.dooley@microchip.com>
Add device tree bindings for the {q,}spi controller on
the Microchip PolarFire SoC.
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
---
.../bindings/spi/microchip,mpfs-spi.yaml | 72 +++++++++++++++++++
1 file changed, 72 insertions(+)
create mode 100644 Documentation/devicetree/bindings/spi/microchip,mpfs-spi.yaml
My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):
yamllint warnings/errors:
dtschema/dtc warnings/errors:
Documentation/devicetree/bindings/spi/microchip,mpfs-spi.example.dts:19:18: fatal error: dt-bindings/clock/microchip,mpfs-clock.h: No such file or directory
19 | #include "dt-bindings/clock/microchip,mpfs-clock.h"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [scripts/Makefile.lib:385: Documentation/devicetree/bindings/spi/microchip,mpfs-spi.example.dt.yaml] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:1441: dt_binding_check] Error 2
doc reference errors (make refcheckdocs):
See https://patchwork.ozlabs.org/patch/1552385
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.
EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
On Mon, 08 Nov 2021 15:05:51 +0000, conor.dooley@microchip.com wrote:
quoted
From: Conor Dooley <conor.dooley@microchip.com>
Add device tree bindings for the {q,}spi controller on
the Microchip PolarFire SoC.
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
---
.../bindings/spi/microchip,mpfs-spi.yaml | 72 +++++++++++++++++++
1 file changed, 72 insertions(+)
create mode 100644 Documentation/devicetree/bindings/spi/microchip,mpfs-spi.yaml
My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):
yamllint warnings/errors:
dtschema/dtc warnings/errors:
Documentation/devicetree/bindings/spi/microchip,mpfs-spi.example.dts:19:18: fatal error: dt-bindings/clock/microchip,mpfs-clock.h: No such file or directory
19 | #include "dt-bindings/clock/microchip,mpfs-clock.h"
Rob,
Should I drop the header from the example or is there a way for me
specify the dependent patch to pass this check?
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [scripts/Makefile.lib:385: Documentation/devicetree/bindings/spi/microchip,mpfs-spi.example.dt.yaml] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:1441: dt_binding_check] Error 2
doc reference errors (make refcheckdocs):
See https://patchwork.ozlabs.org/patch/1552385
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.
From: Krzysztof Kozlowski <hidden> Date: 2021-11-09 12:53:39
On 09/11/2021 13:16, Conor.Dooley@microchip.com wrote:
On 09/11/2021 04:06, Rob Herring wrote:
quoted
EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
On Mon, 08 Nov 2021 15:05:51 +0000, conor.dooley@microchip.com wrote:
quoted
From: Conor Dooley <conor.dooley@microchip.com>
Add device tree bindings for the {q,}spi controller on
the Microchip PolarFire SoC.
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
---
.../bindings/spi/microchip,mpfs-spi.yaml | 72 +++++++++++++++++++
1 file changed, 72 insertions(+)
create mode 100644 Documentation/devicetree/bindings/spi/microchip,mpfs-spi.yaml
My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):
yamllint warnings/errors:
dtschema/dtc warnings/errors:
Documentation/devicetree/bindings/spi/microchip,mpfs-spi.example.dts:19:18: fatal error: dt-bindings/clock/microchip,mpfs-clock.h: No such file or directory
19 | #include "dt-bindings/clock/microchip,mpfs-clock.h"
Rob,
Should I drop the header from the example or is there a way for me
specify the dependent patch to pass this check?
The error has to be fixed, although not necessarily by dropping the
header, but by posting it. How this can pass on your system? There is no
such file added in this patchset.
Best regards,
Krzysztof
EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
On 09/11/2021 13:16, Conor.Dooley@microchip.com wrote:
quoted
On 09/11/2021 04:06, Rob Herring wrote:
quoted
EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
On Mon, 08 Nov 2021 15:05:51 +0000, conor.dooley@microchip.com wrote:
quoted
From: Conor Dooley <conor.dooley@microchip.com>
Add device tree bindings for the {q,}spi controller on
the Microchip PolarFire SoC.
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
---
.../bindings/spi/microchip,mpfs-spi.yaml | 72 +++++++++++++++++++
1 file changed, 72 insertions(+)
create mode 100644 Documentation/devicetree/bindings/spi/microchip,mpfs-spi.yaml
My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):
yamllint warnings/errors:
dtschema/dtc warnings/errors:
Documentation/devicetree/bindings/spi/microchip,mpfs-spi.example.dts:19:18: fatal error: dt-bindings/clock/microchip,mpfs-clock.h: No such file or directory
19 | #include "dt-bindings/clock/microchip,mpfs-clock.h"
Rob,
Should I drop the header from the example or is there a way for me
specify the dependent patch to pass this check?
The error has to be fixed, although not necessarily by dropping the
header, but by posting it. How this can pass on your system? There is no
such file added in this patchset.