mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Adam Ford <aford173@gmail.com>
Cc: linux-arm-kernel@lists.infradead.org, aford@beaconembedded.com,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Shawn Guo <shawnguo@kernel.org>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	Fabio Estevam <festevam@gmail.com>,
	NXP Linux Team <linux-imx@nxp.com>, Li Yang <leoyang.li@nxp.com>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH V2 2/2] arm64: dts: imx: Introduce imx8mp-beacon-kit
Date: Mon, 19 Dec 2022 09:56:32 +0100	[thread overview]
Message-ID: <fe605f23-b098-6279-23e7-8ceb2768f87b@linaro.org> (raw)
In-Reply-To: <CAHCN7xKHE-9VAysC4VLQNfT8c9j6AMZQFRsH+M2xE6-DSfbF7Q@mail.gmail.com>

On 18/12/2022 20:00, Adam Ford wrote:
> On Sun, Dec 18, 2022 at 12:42 PM Krzysztof Kozlowski
> <krzysztof.kozlowski@linaro.org> wrote:
>>
>> On 18/12/2022 00:43, Adam Ford wrote:
>>> Beacon Embedded has an i.MX8M Plus development kit which consists
>>> of a SOM + baseboard.  The SOM includes Bluetooth, WiFi, QSPI, eMMC,
>>> and one Ethernet PHY. The baseboard includes audio, HDMI, USB-C Dual
>>> Role port, USB Hub with five ports, a PCIe slot, and a second Ethernet
>>> PHY.
>>>
>>> Signed-off-by: Adam Ford <aford173@gmail.com>
>>> ---
>>> V2:  Fix whitespace, remove dead nodes, and fix some node and
>>> parameter names to address errors in 'make dt_binding_check'
>>
>> You still cannot check/test/build this DTS without Makefile.
> 
> The lack of makefile was an honest mistake as I forgot to add it to my
> patch.  I ran the make dt_binding_check and addressed many of the
> errors, but some of them are not unique to my board, because they were
> errors in the imx8mp.dtsi file. I addressed some of them by sending
> patches to fix some types in imx8mp.dtsi.  I will make sure V3 has the
> makefile updated.
> 
>>
>>>
>>> diff --git a/arch/arm64/boot/dts/freescale/imx8mp-beacon-kit.dts b/arch/arm64/boot/dts/freescale/imx8mp-beacon-kit.dts
>>> new file mode 100644
>>> index 000000000000..70399f2419cf
>>> --- /dev/null
>>> +++ b/arch/arm64/boot/dts/freescale/imx8mp-beacon-kit.dts
>>> @@ -0,0 +1,549 @@
>>> +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
>>> +/*
>>> + * Copyright 2022 Logic PD, Inc dba Beacon EmbeddedWorks
>>> + */
>>> +
>>> +/dts-v1/;
>>> +
>>> +#include <dt-bindings/usb/pd.h>
>>> +#include <dt-bindings/phy/phy-imx8-pcie.h>
>>> +#include "imx8mp.dtsi"
>>> +#include "imx8mp-beacon-som.dtsi"
>>> +
>>> +/ {
>>> +     model = "Beacon EmbeddedWorks i.MX8MPlus Development kit";
>>> +     compatible = "beacon,imx8mp-beacon-kit", "fsl,imx8mp";
>>> +
>>> +     aliases {
>>> +             ethernet0 = &eqos;
>>> +             ethernet1 = &fec;
>>> +     };
>>> +
>>> +     chosen {
>>> +             stdout-path = &uart2;
>>> +     };
>>> +
>>> +     connector-1 {
>>> +             compatible = "usb-c-connector";
>>> +             label = "USB-C";
>>> +             data-role = "dual";
>>> +
>>> +             ports {
>>> +                     #address-cells = <1>;
>>> +                     #size-cells = <0>;
>>> +                     port@0 {
>>> +                             reg = <0>;
>>> +                             hs_ep: endpoint {
>>> +                                     remote-endpoint = <&usb3_hs_ep>;
>>> +                             };
>>> +                     };
>>> +                     port@1 {
>>> +                             reg = <1>;
>>> +                             ss_ep: endpoint {
>>> +                                     remote-endpoint = <&hd3ss3220_in_ep>;
>>> +                             };
>>> +                     };
>>> +             };
>>> +     };
>>> +
>>> +     gpio-keys {
>>> +             compatible = "gpio-keys";
>>> +             autorepeat;
>>> +
>>> +             button-0 {
>>> +                     label = "btn0";
>>> +                     linux,code = <BTN_0>;
>>> +                     gpios = <&pca6416_1 12 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
>>> +                     wakeup-source;
>>> +             };
>>> +
>>> +             button-1 {
>>> +                     label = "btn1";
>>> +                     linux,code = <BTN_1>;
>>> +                     gpios = <&pca6416_1 13 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
>>> +                     wakeup-source;
>>> +             };
>>> +
>>> +             button-2 {
>>> +                     label = "btn2";
>>> +                     linux,code = <BTN_2>;
>>> +                     gpios = <&pca6416_1 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
>>> +                     wakeup-source;
>>> +             };
>>> +
>>> +             button-3 {
>>> +                     label = "btn3";
>>> +                     linux,code = <BTN_3>;
>>> +                     gpios = <&pca6416_1 15 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
>>> +                     wakeup-source;
>>> +             };
>>> +     };
>>> +
>>> +     leds {
>>> +             compatible = "gpio-leds";
>>> +
>>> +             led0 {
>>
>> No improvements here.
> I forgot the git commit --amend so my patch was missing the changes,
> but my machine has the fix.  Sorry about that.
> 
>>
>>> +                     label = "gen_led0";
>>> +                     gpios = <&pca6416_1 4 GPIO_ACTIVE_HIGH>;
>>> +                     default-state = "off";
>>> +             };
>>> +
>>> +             led1 {
>>> +                     label = "gen_led1";
>>> +                     gpios = <&pca6416_1 5 GPIO_ACTIVE_HIGH>;
>>> +                     default-state = "off";
>>> +             };
>>> +
>>> +             led2 {
>>> +                     label = "gen_led2";
>>> +                     gpios = <&pca6416_1 6 GPIO_ACTIVE_HIGH>;
>>> +                     default-state = "off";
>>> +             };
>>> +
>>> +             led3 {
>>> +                     pinctrl-names = "default";
>>> +                     pinctrl-0 = <&pinctrl_led3>;
>>> +                     label = "heartbeat";
>>> +                     gpios = <&gpio4 28 GPIO_ACTIVE_HIGH>;
>>> +                     linux,default-trigger = "heartbeat";
>>> +             };
>>> +     };
>>> +
>>> +     pcie0_refclk: pcie0-refclk {
>>> +             compatible = "fixed-clock";
>>> +             #clock-cells = <0>;
>>> +             clock-frequency = <100000000>;
>>> +     };
>>> +
>>> +     reg_usdhc2_vmmc: regulator-usdhc2 {
>>> +             compatible = "regulator-fixed";
>>> +             regulator-name = "VSD_3V3";
>>> +             regulator-min-microvolt = <3300000>;
>>> +             regulator-max-microvolt = <3300000>;
>>> +             gpio = <&gpio2 19 GPIO_ACTIVE_HIGH>;
>>> +             enable-active-high;
>>> +             startup-delay-us = <100>;
>>> +             off-on-delay-us = <20000>;
>>> +     };
>>> +
>>> +     reg_usb1_host_vbus: regulator-usb1-vbus {
>>> +             compatible = "regulator-fixed";
>>> +             regulator-name = "usb1_host_vbus";
>>> +             regulator-max-microvolt = <5000000>;
>>> +             regulator-min-microvolt = <5000000>;
>>> +             gpio = <&pca6416_1 0 GPIO_ACTIVE_HIGH>;
>>> +             enable-active-high;
>>> +     };
>>> +};
>>> +
>>> +&ecspi2 {
>>> +     pinctrl-names = "default";
>>> +     pinctrl-0 = <&pinctrl_ecspi2>;
>>> +     cs-gpios = <&gpio5 13 GPIO_ACTIVE_LOW>;
>>> +     status = "okay";
>>> +
>>> +     tpm: tpm@0 {
>>> +             pinctrl-names = "default";
>>> +             pinctrl-0 = <&pinctrl_tpm>;
>>> +             compatible = "infineon,slb9670";
>>> +             reg = <0>;
>>> +             reset-gpios = <&gpio4 0 GPIO_ACTIVE_LOW>;
>>> +             spi-max-frequency = <18500000>;
>>> +     };
>>> +};
>>> +
>>> +&fec {
>>> +     pinctrl-names = "default";
>>> +     pinctrl-0 = <&pinctrl_fec>;
>>> +     phy-mode = "rgmii-id";
>>> +     phy-handle = <&ethphy1>;
>>> +     phy-reset-gpios = <&gpio4 18 GPIO_ACTIVE_LOW>;
>>> +     phy-reset-post-delay = <150>;
>>> +     phy-reset-duration = <10>;
>>> +     fsl,magic-packet;
>>> +     status = "okay";
>>> +
>>> +     mdio {
>>> +             #address-cells = <1>;
>>> +             #size-cells = <0>;
>>> +
>>> +             ethphy1: ethernet1-phy@3 {
>>> +                     compatible = "ethernet-phy-ieee802.3-c22";
>>> +                     reg = <3>;
>>> +             };
>>> +     };
>>> +};
>>> +
>>> +&flexcan1 {
>>> +     pinctrl-names = "default";
>>> +     pinctrl-0 = <&pinctrl_flexcan1>;
>>> +     status = "okay";
>>> +};
>>> +
>>> +
>>> +&i2c2 {
>>> +     clock-frequency = <384000>;
>>> +     pinctrl-names = "default";
>>> +     pinctrl-0 = <&pinctrl_i2c2>;
>>> +     status = "okay";
>>> +
>>> +     pca6416_3: gpio-i2c2@20 {
>>
>> No improvements.
> 
> I am not sure what I am supposed to do here.  I already have one node
> called "gpio@20" and as far as I know, I can't have duplicate nodes
> with the same name.  I have the same GPIO expander with the same on a
> different i2c bus.  Do you have a recommendation as to what name I
> should use so the names are unique?
> 
>>
>>> +             compatible = "nxp,pcal6416";
>>> +             reg = <0x20>;
>>> +             gpio-controller;
>>> +             #gpio-cells = <2>;
>>> +             interrupt-parent = <&gpio4>;
>>> +             interrupts = <27 IRQ_TYPE_EDGE_FALLING>;
>>> +             interrupt-controller;
>>> +             #interrupt-cells = <2>;
>>> +     };
>>> +};
>>> +
>>> +&i2c3 {
>>> +     /* Connected to USB Hub */
>>> +     ptn5110: ptn5110@52 {
>>
>> No improvements ... I'll stop reviewing. No point if you do not intend
>> to apply the comments.
> 
> I changed this node from tcpc to ptn5110 per your last comment, and it
> matches other boards that use this and
> Documentation/devicetree/bindings/connector/usb-connector.yaml example
> uses ptn5110.
> Documentation/devicetree/bindings/usb/typec-tcpci.txt just called it
> "ptn5110@50" .

My comment was that node name has to be generic. ptn5110 is not generic
but specific. I gave you reference to examples of generic names but in
other boards there are more examples how this could be named.

> 
> imx8mm-evk.dtsi calls it "ptn5110: tcpc@50" so that's the example I
> followed.  I am guessing it fails the build test because there isn't a
> yaml file for this driver.
> 
> I wasn't intentionally ignoring your comments, and I honestly tried to
> catch them.
> 
> If you let me know how you want me to proceed, I will do a V3.

I stopped reviewing. Implement all the comments but if something is not
clear, just ask for clarification.

Best regards,
Krzysztof


      reply	other threads:[~2022-12-19  8:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-17 23:43 [PATCH V2 1/2] dt-bindings: arm: Add Beacon EmbeddedWorks i.MX8M Plus kit Adam Ford
2022-12-17 23:43 ` [PATCH V2 2/2] arm64: dts: imx: Introduce imx8mp-beacon-kit Adam Ford
2022-12-18 18:42   ` Krzysztof Kozlowski
2022-12-18 19:00     ` Adam Ford
2022-12-19  8:56       ` Krzysztof Kozlowski [this message]

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=fe605f23-b098-6279-23e7-8ceb2768f87b@linaro.org \
    --to=krzysztof.kozlowski@linaro.org \
    --cc=aford173@gmail.com \
    --cc=aford@beaconembedded.com \
    --cc=devicetree@vger.kernel.org \
    --cc=festevam@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=leoyang.li@nxp.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    /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: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®