devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: nick.hawkins@hpe.com, verdun@hpe.com, robh+dt@kernel.org,
	krzysztof.kozlowski+dt@linaro.org, lee@kernel.org,
	linux@armlinux.org.uk, linux-i2c@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v1 4/6] ARM: dts: hpe: Add I2C Topology
Date: Sat, 17 Dec 2022 11:58:42 +0100	[thread overview]
Message-ID: <0a537c59-acd7-3f7f-8618-cc0e91a6a58a@linaro.org> (raw)
In-Reply-To: <20221216183532.78933-5-nick.hawkins@hpe.com>

On 16/12/2022 19:35, nick.hawkins@hpe.com wrote:
> From: Nick Hawkins <nick.hawkins@hpe.com>
> 
> Add 9 I2C Engines, 2 MUXs, and a EEPROM to the device tree.
> 
> Signed-off-by: Nick Hawkins <nick.hawkins@hpe.com>
> ---
>  arch/arm/boot/dts/hpe-bmc-dl360gen10.dts |  72 ++++++++++++++
>  arch/arm/boot/dts/hpe-gxp.dtsi           | 115 +++++++++++++++++++++++
>  2 files changed, 187 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/hpe-bmc-dl360gen10.dts b/arch/arm/boot/dts/hpe-bmc-dl360gen10.dts
> index 3a7382ce40ef..d9008e2cfed3 100644
> --- a/arch/arm/boot/dts/hpe-bmc-dl360gen10.dts
> +++ b/arch/arm/boot/dts/hpe-bmc-dl360gen10.dts
> @@ -23,4 +23,76 @@
>  		device_type = "memory";
>  		reg = <0x40000000 0x20000000>;
>  	};
> +
> +	i2cmux@4 {
> +		compatible = "i2c-mux-reg";
> +		i2c-parent = <&i2c4>;
> +		reg = <0xd1000074 1>;

Did you check this? `dtbs_check` and `dtbs W=1`? Reg looks different
than unit.

> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +
> +		i2c4@1 {

Node names should be generic.
https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation

i2c@

> +			reg = <1>;
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +		};
> +> +		i2c4@3 {

Node names should be generic.
https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation

> +			reg = <3>;
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +		};
> +
> +		i2c4@4 {

Node names should be generic.
https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation

> +			reg = <4>;
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +		};
> +	};
> +
> +	i2cmux@6 {
> +		compatible = "i2c-mux-reg";
> +		i2c-parent = <&i2c6>;
> +		reg = <0xd1000076 1>;

Same question.

> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +
> +		i2c6@1 {

and so on...

> +			reg = <1>;
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +		};
> +
> +		i2c6@2 {
> +			reg = <2>;
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +		};
> +
> +		i2c6@3 {
> +			reg = <3>;
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +		};
> +
> +		i2c6@4 {
> +			reg = <4>;
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +		};
> +
> +		i2c6@5 {
> +			reg = <5>;
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +		};
> +	};
> +};
> +
> +&i2c2 {
> +	eeprom@50 {
> +		compatible = "atmel,24c02";
> +		pagesize = <8>;
> +		reg = <0x50>;
> +	};
>  };
> diff --git a/arch/arm/boot/dts/hpe-gxp.dtsi b/arch/arm/boot/dts/hpe-gxp.dtsi
> index cf735b3c4f35..27e68932021c 100644
> --- a/arch/arm/boot/dts/hpe-gxp.dtsi
> +++ b/arch/arm/boot/dts/hpe-gxp.dtsi
> @@ -122,6 +122,121 @@
>  				interrupts = <6>;
>  				interrupt-parent = <&vic0>;
>  			};
> +
> +			sysreg_system_controller: syscon@f8 {
> +				compatible = "hpe,gxp-sysreg", "syscon";
> +				reg = <0xf8 0x8>;
> +			};
> +
> +			i2c0: i2c@2000 {
> +				compatible = "hpe,gxp-i2c";
> +				reg = <0x2000 0x70>;
> +				interrupts = <9>;
> +				interrupt-parent = <&vic0>;
> +				#address-cells = <1>;
> +				#size-cells = <0>;
> +				hpe,sysreg-phandle = <&sysreg_system_controller>;
> +				hpe,i2c-max-bus-freq = <100000>;

Busses should stay disabled in DTSI and only enabled by specific board,
when needed.

> +			};
> +
> +			i2c1: i2c@2100 {
> +				compatible = "hpe,gxp-i2c";
> +				reg = <0x2100 0x70>;
> +				interrupts = <9>;
> +				interrupt-parent = <&vic0>;
> +				#address-cells = <1>;
> +				#size-cells = <0>;
> +				hpe,sysreg-phandle = <&sysreg_system_controller>;
> +				hpe,i2c-max-bus-freq = <100000>;
> +			};
> +

Best regards,
Krzysztof


  reply	other threads:[~2022-12-17 10:58 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-16 18:35 [PATCH v1 0/6] ARM: Add GXP I2C Support nick.hawkins
2022-12-16 18:35 ` [PATCH v1 1/6] i2c: hpe: Add GXP SoC I2C Controller nick.hawkins
2022-12-17 10:51   ` Krzysztof Kozlowski
2023-01-09 20:23     ` Hawkins, Nick
2023-01-10  8:35       ` Krzysztof Kozlowski
2022-12-16 18:35 ` [PATCH v1 2/6] dt-bindings: i2c: hpe,gxp-i2c nick.hawkins
2022-12-17 10:55   ` Krzysztof Kozlowski
2022-12-16 18:35 ` [PATCH v1 3/6] dt-bindings: mfd: syscon: Document GXP register compatible nick.hawkins
2022-12-17 10:59   ` Krzysztof Kozlowski
2023-01-04 17:20   ` Lee Jones
2022-12-16 18:35 ` [PATCH v1 4/6] ARM: dts: hpe: Add I2C Topology nick.hawkins
2022-12-17 10:58   ` Krzysztof Kozlowski [this message]
2022-12-16 18:35 ` [PATCH v1 5/6] ARM: multi_v7_defconfig: add gxp i2c module nick.hawkins
2022-12-16 18:35 ` [PATCH v1 6/6] MAINTAINERS: Add HPE GXP I2C Support nick.hawkins

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=0a537c59-acd7-3f7f-8618-cc0e91a6a58a@linaro.org \
    --to=krzysztof.kozlowski@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=lee@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=nick.hawkins@hpe.com \
    --cc=robh+dt@kernel.org \
    --cc=verdun@hpe.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: 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;
as well as URLs for NNTP newsgroup(s).