From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> To: Ariel D'Alessandro <ariel.dalessandro@collabora.com>, bcm-kernel-feedback-list@broadcom.com, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-rpi-kernel@lists.infradead.org Cc: arnd@arndb.de, f.fainelli@gmail.com, krzyszccf.kozlowski+dt@linaro.org, nsaenz@kernel.org, olof@lixom.net, robh+dt@kernel.org, soc@kernel.org, stefan.wahren@i2se.com, william.zhang@broadcom.com Subject: Re: [PATCH] ARM: dts: Add Raspberry Pi Compute Module 4 CANOPi Board Date: Tue, 20 Sep 2022 11:51:19 +0200 [thread overview] Message-ID: <e652ad18-3a35-e8a0-939c-5f2a59cfc3d0@linaro.org> (raw) In-Reply-To: <20220916153156.30412-1-ariel.dalessandro@collabora.com> On 16/09/2022 17:31, Ariel D'Alessandro wrote: > The Eclipse KUKSA CANOPi [0] is a baseboard for the Raspberry Compute > Module 4 (CM4). It contains a VIA VL805 4 Port USB controller and two > MCP251xFD based CAN-FD interfaces. > > [0] https://github.com/boschresearch/kuksa.hardware > > Signed-off-by: Ariel D'Alessandro <ariel.dalessandro@collabora.com> > --- > arch/arm/boot/dts/Makefile | 1 + > arch/arm/boot/dts/bcm2711-rpi-cm4-canopi.dts | 139 ++++++++++++++++++ > arch/arm64/boot/dts/broadcom/Makefile | 1 + > .../dts/broadcom/bcm2711-rpi-cm4-canopi.dts | 2 + > 4 files changed, 143 insertions(+) > create mode 100644 arch/arm/boot/dts/bcm2711-rpi-cm4-canopi.dts > create mode 100644 arch/arm64/boot/dts/broadcom/bcm2711-rpi-cm4-canopi.dts > > diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile > index 05d8aef6e5d2..8930ab2c132c 100644 > --- a/arch/arm/boot/dts/Makefile > +++ b/arch/arm/boot/dts/Makefile > @@ -98,6 +98,7 @@ dtb-$(CONFIG_ARCH_BCM2835) += \ > bcm2837-rpi-zero-2-w.dtb \ > bcm2711-rpi-400.dtb \ > bcm2711-rpi-4-b.dtb \ > + bcm2711-rpi-cm4-canopi.dtb \ > bcm2711-rpi-cm4-io.dtb \ > bcm2835-rpi-zero.dtb \ > bcm2835-rpi-zero-w.dtb > diff --git a/arch/arm/boot/dts/bcm2711-rpi-cm4-canopi.dts b/arch/arm/boot/dts/bcm2711-rpi-cm4-canopi.dts > new file mode 100644 > index 000000000000..52ec5908883c > --- /dev/null > +++ b/arch/arm/boot/dts/bcm2711-rpi-cm4-canopi.dts > @@ -0,0 +1,139 @@ > +// SPDX-License-Identifier: GPL-2.0 > +/dts-v1/; > +#include "bcm2711-rpi-cm4.dtsi" > + > +/ { > + model = "Raspberry Pi Compute Module 4 CANOPi Board"; Where is the compatible? > + > + clocks { > + clk_mcp251xfd_osc: mcp251xfd-osc { Node names should be generic. https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation > + #clock-cells = <0>; > + compatible = "fixed-clock"; > + clock-frequency = <20000000>; > + }; > + }; > + > + leds { This does not look valid. Does not look like you tested the DTS against bindings. Please run `make dtbs_check` (see Documentation/devicetree/bindings/writing-schema.rst for instructions). > + led-act { > + gpios = <&gpio 42 GPIO_ACTIVE_HIGH>; What about the rest? Why only gpios? Does it pass dtbs_check? > + }; > + > + led-pwr { > + label = "PWR"; > + gpios = <&expgpio 2 GPIO_ACTIVE_LOW>; > + default-state = "keep"; > + linux,default-trigger = "default-on"; > + }; > + }; > +}; > + > +&ddc0 { > + status = "okay"; > +}; > + > +&ddc1 { > + status = "okay"; > +}; > + > +&hdmi0 { > + status = "okay"; > +}; > + > +&hdmi1 { > + status = "okay"; > +}; > + > +&i2c0 { > + pinctrl-names = "default"; > + pinctrl-0 = <&i2c0_gpio44>; > + status = "okay"; > + clock-frequency = <100000>; > + > + pcf85063a@51 { Node names should be generic. https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation > + compatible = "nxp,pcf85063a"; > + reg = <0x51>; > + }; > +}; > + > +&pcie0 { > + pci@0,0 { > + device_type = "pci"; > + #address-cells = <3>; > + #size-cells = <2>; > + ranges; > + > + reg = <0 0 0 0 0>; > + > + usb@0,0 { > + reg = <0 0 0 0 0>; > + resets = <&reset RASPBERRYPI_FIRMWARE_RESET_ID_USB>; > + }; > + }; > +}; > + > +&pixelvalve0 { > + status = "okay"; > +}; > + > +&pixelvalve1 { > + status = "okay"; > +}; > + > +&pixelvalve2 { > + status = "okay"; > +}; > + > +&pixelvalve4 { > + status = "okay"; > +}; > + > +&spi { > + status = "okay"; > + pinctrl-names = "default"; > + pinctrl-0 = <&spi0_gpio7>; > + cs-gpios = <&gpio 8 1>, <&gpio 7 1>; Use GPIO flags/defines. This applies everywhere. > + dmas = <&dma 6>, <&dma 7>; > + dma-names = "tx", "rx"; > + > + mcp251xfd0: mcp251xfd@0 { Node names should be generic. https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation > + compatible = "microchip,mcp251xfd"; > + reg = <0>; > + pinctrl-names = "default"; > + pinctrl-0 = <&mcp251xfd0_pins>; > + spi-max-frequency = <20000000>; > + interrupt-parent = <&gpio>; > + interrupts = <27 IRQ_TYPE_LEVEL_LOW>; > + clocks = <&clk_mcp251xfd_osc>; > + }; > + > + mcp251xfd1: mcp251xfd@1 { Node names should be generic. https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation > + compatible = "microchip,mcp251xfd"; > + reg = <1>; > + pinctrl-names = "default"; > + pinctrl-0 = <&mcp251xfd1_pins>; > + spi-max-frequency = <20000000>; > + interrupt-parent = <&gpio>; > + interrupts = <22 IRQ_TYPE_LEVEL_LOW>; > + clocks = <&clk_mcp251xfd_osc>; > + }; > +}; > + > +&gpio { > + mcp251xfd0_pins: mcp251xfd0_pins { No underscores in node names. > + brcm,pins = <27>; > + brcm,function = <BCM2835_FSEL_GPIO_IN>; > + }; > + > + mcp251xfd1_pins: mcp251xfd1_pins { Ditto > + brcm,pins = <22>; > + brcm,function = <BCM2835_FSEL_GPIO_IN>; > + }; > +}; > + > +&vc4 { > + status = "okay"; > +}; > + > +&vec { > + status = "disabled"; > +}; Best regards, Krzysztof
WARNING: multiple messages have this Message-ID (diff)
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> To: Ariel D'Alessandro <ariel.dalessandro@collabora.com>, bcm-kernel-feedback-list@broadcom.com, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-rpi-kernel@lists.infradead.org Cc: arnd@arndb.de, f.fainelli@gmail.com, krzyszccf.kozlowski+dt@linaro.org, nsaenz@kernel.org, olof@lixom.net, robh+dt@kernel.org, soc@kernel.org, stefan.wahren@i2se.com, william.zhang@broadcom.com Subject: Re: [PATCH] ARM: dts: Add Raspberry Pi Compute Module 4 CANOPi Board Date: Tue, 20 Sep 2022 11:51:19 +0200 [thread overview] Message-ID: <e652ad18-3a35-e8a0-939c-5f2a59cfc3d0@linaro.org> (raw) In-Reply-To: <20220916153156.30412-1-ariel.dalessandro@collabora.com> On 16/09/2022 17:31, Ariel D'Alessandro wrote: > The Eclipse KUKSA CANOPi [0] is a baseboard for the Raspberry Compute > Module 4 (CM4). It contains a VIA VL805 4 Port USB controller and two > MCP251xFD based CAN-FD interfaces. > > [0] https://github.com/boschresearch/kuksa.hardware > > Signed-off-by: Ariel D'Alessandro <ariel.dalessandro@collabora.com> > --- > arch/arm/boot/dts/Makefile | 1 + > arch/arm/boot/dts/bcm2711-rpi-cm4-canopi.dts | 139 ++++++++++++++++++ > arch/arm64/boot/dts/broadcom/Makefile | 1 + > .../dts/broadcom/bcm2711-rpi-cm4-canopi.dts | 2 + > 4 files changed, 143 insertions(+) > create mode 100644 arch/arm/boot/dts/bcm2711-rpi-cm4-canopi.dts > create mode 100644 arch/arm64/boot/dts/broadcom/bcm2711-rpi-cm4-canopi.dts > > diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile > index 05d8aef6e5d2..8930ab2c132c 100644 > --- a/arch/arm/boot/dts/Makefile > +++ b/arch/arm/boot/dts/Makefile > @@ -98,6 +98,7 @@ dtb-$(CONFIG_ARCH_BCM2835) += \ > bcm2837-rpi-zero-2-w.dtb \ > bcm2711-rpi-400.dtb \ > bcm2711-rpi-4-b.dtb \ > + bcm2711-rpi-cm4-canopi.dtb \ > bcm2711-rpi-cm4-io.dtb \ > bcm2835-rpi-zero.dtb \ > bcm2835-rpi-zero-w.dtb > diff --git a/arch/arm/boot/dts/bcm2711-rpi-cm4-canopi.dts b/arch/arm/boot/dts/bcm2711-rpi-cm4-canopi.dts > new file mode 100644 > index 000000000000..52ec5908883c > --- /dev/null > +++ b/arch/arm/boot/dts/bcm2711-rpi-cm4-canopi.dts > @@ -0,0 +1,139 @@ > +// SPDX-License-Identifier: GPL-2.0 > +/dts-v1/; > +#include "bcm2711-rpi-cm4.dtsi" > + > +/ { > + model = "Raspberry Pi Compute Module 4 CANOPi Board"; Where is the compatible? > + > + clocks { > + clk_mcp251xfd_osc: mcp251xfd-osc { Node names should be generic. https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation > + #clock-cells = <0>; > + compatible = "fixed-clock"; > + clock-frequency = <20000000>; > + }; > + }; > + > + leds { This does not look valid. Does not look like you tested the DTS against bindings. Please run `make dtbs_check` (see Documentation/devicetree/bindings/writing-schema.rst for instructions). > + led-act { > + gpios = <&gpio 42 GPIO_ACTIVE_HIGH>; What about the rest? Why only gpios? Does it pass dtbs_check? > + }; > + > + led-pwr { > + label = "PWR"; > + gpios = <&expgpio 2 GPIO_ACTIVE_LOW>; > + default-state = "keep"; > + linux,default-trigger = "default-on"; > + }; > + }; > +}; > + > +&ddc0 { > + status = "okay"; > +}; > + > +&ddc1 { > + status = "okay"; > +}; > + > +&hdmi0 { > + status = "okay"; > +}; > + > +&hdmi1 { > + status = "okay"; > +}; > + > +&i2c0 { > + pinctrl-names = "default"; > + pinctrl-0 = <&i2c0_gpio44>; > + status = "okay"; > + clock-frequency = <100000>; > + > + pcf85063a@51 { Node names should be generic. https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation > + compatible = "nxp,pcf85063a"; > + reg = <0x51>; > + }; > +}; > + > +&pcie0 { > + pci@0,0 { > + device_type = "pci"; > + #address-cells = <3>; > + #size-cells = <2>; > + ranges; > + > + reg = <0 0 0 0 0>; > + > + usb@0,0 { > + reg = <0 0 0 0 0>; > + resets = <&reset RASPBERRYPI_FIRMWARE_RESET_ID_USB>; > + }; > + }; > +}; > + > +&pixelvalve0 { > + status = "okay"; > +}; > + > +&pixelvalve1 { > + status = "okay"; > +}; > + > +&pixelvalve2 { > + status = "okay"; > +}; > + > +&pixelvalve4 { > + status = "okay"; > +}; > + > +&spi { > + status = "okay"; > + pinctrl-names = "default"; > + pinctrl-0 = <&spi0_gpio7>; > + cs-gpios = <&gpio 8 1>, <&gpio 7 1>; Use GPIO flags/defines. This applies everywhere. > + dmas = <&dma 6>, <&dma 7>; > + dma-names = "tx", "rx"; > + > + mcp251xfd0: mcp251xfd@0 { Node names should be generic. https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation > + compatible = "microchip,mcp251xfd"; > + reg = <0>; > + pinctrl-names = "default"; > + pinctrl-0 = <&mcp251xfd0_pins>; > + spi-max-frequency = <20000000>; > + interrupt-parent = <&gpio>; > + interrupts = <27 IRQ_TYPE_LEVEL_LOW>; > + clocks = <&clk_mcp251xfd_osc>; > + }; > + > + mcp251xfd1: mcp251xfd@1 { Node names should be generic. https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation > + compatible = "microchip,mcp251xfd"; > + reg = <1>; > + pinctrl-names = "default"; > + pinctrl-0 = <&mcp251xfd1_pins>; > + spi-max-frequency = <20000000>; > + interrupt-parent = <&gpio>; > + interrupts = <22 IRQ_TYPE_LEVEL_LOW>; > + clocks = <&clk_mcp251xfd_osc>; > + }; > +}; > + > +&gpio { > + mcp251xfd0_pins: mcp251xfd0_pins { No underscores in node names. > + brcm,pins = <27>; > + brcm,function = <BCM2835_FSEL_GPIO_IN>; > + }; > + > + mcp251xfd1_pins: mcp251xfd1_pins { Ditto > + brcm,pins = <22>; > + brcm,function = <BCM2835_FSEL_GPIO_IN>; > + }; > +}; > + > +&vc4 { > + status = "okay"; > +}; > + > +&vec { > + status = "disabled"; > +}; Best regards, Krzysztof _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2022-09-20 9:51 UTC|newest] Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-09-16 15:31 [PATCH] ARM: dts: Add Raspberry Pi Compute Module 4 CANOPi Board Ariel D'Alessandro 2022-09-16 15:31 ` Ariel D'Alessandro 2022-09-17 10:18 ` Stefan Wahren 2022-09-17 10:18 ` Stefan Wahren 2022-09-19 7:47 ` Alexander Dahl 2022-09-19 7:47 ` Alexander Dahl 2022-09-19 11:18 ` Stefan Wahren 2022-09-19 11:18 ` Stefan Wahren 2022-09-20 8:31 ` Alexander Dahl 2022-09-20 8:31 ` Alexander Dahl 2022-09-20 15:41 ` Stefan Wahren 2022-09-20 15:41 ` Stefan Wahren 2022-09-20 9:51 ` Krzysztof Kozlowski [this message] 2022-09-20 9:51 ` Krzysztof Kozlowski 2022-10-20 12:16 ` Pavel Machek 2022-10-20 12:16 ` Pavel Machek
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=e652ad18-3a35-e8a0-939c-5f2a59cfc3d0@linaro.org \ --to=krzysztof.kozlowski@linaro.org \ --cc=ariel.dalessandro@collabora.com \ --cc=arnd@arndb.de \ --cc=bcm-kernel-feedback-list@broadcom.com \ --cc=devicetree@vger.kernel.org \ --cc=f.fainelli@gmail.com \ --cc=krzyszccf.kozlowski+dt@linaro.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-rpi-kernel@lists.infradead.org \ --cc=nsaenz@kernel.org \ --cc=olof@lixom.net \ --cc=robh+dt@kernel.org \ --cc=soc@kernel.org \ --cc=stefan.wahren@i2se.com \ --cc=william.zhang@broadcom.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.