All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH linux 1/2] ARM: dts: aspeed: zaius: Add 1-wire buses
@ 2016-11-16 23:29 Xo Wang
  2016-11-16 23:29 ` [PATCH linux 2/2] ARM: dts: aspeed: zaius: Add I2C master selector and hotswap controller Xo Wang
  2016-11-17  4:55 ` [PATCH linux 1/2] ARM: dts: aspeed: zaius: Add 1-wire buses Joel Stanley
  0 siblings, 2 replies; 6+ messages in thread
From: Xo Wang @ 2016-11-16 23:29 UTC (permalink / raw)
  To: openbmc

Add device-tree bindings to instantiate GPIO-based 1-wire buses. These
go to headers for DS18B20 thermal sensors.

Signed-off-by: Xo Wang <xow@google.com>
---
 arch/arm/boot/dts/aspeed-bmc-opp-zaius.dts | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/arch/arm/boot/dts/aspeed-bmc-opp-zaius.dts b/arch/arm/boot/dts/aspeed-bmc-opp-zaius.dts
index b52e45e..3d997d9 100644
--- a/arch/arm/boot/dts/aspeed-bmc-opp-zaius.dts
+++ b/arch/arm/boot/dts/aspeed-bmc-opp-zaius.dts
@@ -20,6 +20,26 @@
 		reg = <0x80000000 0x40000000>;
 	};
 
+	onewire0 {
+		compatible = "w1-gpio";
+		gpios = <&gpio ASPEED_GPIO(H, 0) GPIO_ACTIVE_HIGH>;
+	};
+
+	onewire1 {
+		compatible = "w1-gpio";
+		gpios = <&gpio ASPEED_GPIO(H, 1) GPIO_ACTIVE_HIGH>;
+	};
+
+	onewire2 {
+		compatible = "w1-gpio";
+		gpios = <&gpio ASPEED_GPIO(H, 2) GPIO_ACTIVE_HIGH>;
+	};
+
+	onewire3 {
+		compatible = "w1-gpio";
+		gpios = <&gpio ASPEED_GPIO(H, 3) GPIO_ACTIVE_HIGH>;
+	};
+
 	leds {
 		compatible = "gpio-leds";
 
-- 
2.8.0.rc3.226.g39d4020

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH linux 2/2] ARM: dts: aspeed: zaius: Add I2C master selector and hotswap controller
  2016-11-16 23:29 [PATCH linux 1/2] ARM: dts: aspeed: zaius: Add 1-wire buses Xo Wang
@ 2016-11-16 23:29 ` Xo Wang
  2016-11-17  4:59   ` Joel Stanley
  2016-11-17  4:55 ` [PATCH linux 1/2] ARM: dts: aspeed: zaius: Add 1-wire buses Joel Stanley
  1 sibling, 1 reply; 6+ messages in thread
From: Xo Wang @ 2016-11-16 23:29 UTC (permalink / raw)
  To: openbmc

Add device-tree bindings to instantiate the PCA9541A I2C master
selector. This driver allows mastering downstream devices after sending
an arbitration request to the PCA9541A. Downstream devices go into the
'i2c-arb' child node.

Instantiate the HWMON client driver for the TI LM5066I hotswap
controller present on Zaius EVT2 downstream of the master selector.

Signed-off-by: Xo Wang <xow@google.com>
---
 arch/arm/boot/dts/aspeed-bmc-opp-zaius.dts | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/aspeed-bmc-opp-zaius.dts b/arch/arm/boot/dts/aspeed-bmc-opp-zaius.dts
index 3d997d9..136eb1d 100644
--- a/arch/arm/boot/dts/aspeed-bmc-opp-zaius.dts
+++ b/arch/arm/boot/dts/aspeed-bmc-opp-zaius.dts
@@ -210,8 +210,23 @@
 &i2c7 {
 	status = "okay";
 
-	/* MUX PCA9541A (other master: CPU0 PCIe 1)
-	 *   ADM1272 PMBUS @10h
+	pca9541a@70 {
+		compatible = "nxp,pca9541";
+		reg = <0x70>;
+
+		i2c-arb {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			hotswap@10 {
+				compatible = "ti,lm5066";
+				reg = <0x10>;
+			};
+		};
+	};
+
+	/* Master selector PCA9541A @70h (other master: CPU0)
+	 *   LM5066I PMBUS @10h
 	 */
 	/* 12V SMPS Q54SH12050NNDH @61h */
 	/* CPU0 VR ISL68137 0.7V, 0.96V PMBUS @64h */
-- 
2.8.0.rc3.226.g39d4020

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH linux 1/2] ARM: dts: aspeed: zaius: Add 1-wire buses
  2016-11-16 23:29 [PATCH linux 1/2] ARM: dts: aspeed: zaius: Add 1-wire buses Xo Wang
  2016-11-16 23:29 ` [PATCH linux 2/2] ARM: dts: aspeed: zaius: Add I2C master selector and hotswap controller Xo Wang
@ 2016-11-17  4:55 ` Joel Stanley
  1 sibling, 0 replies; 6+ messages in thread
From: Joel Stanley @ 2016-11-17  4:55 UTC (permalink / raw)
  To: Xo Wang; +Cc: OpenBMC Maillist

On Thu, Nov 17, 2016 at 9:59 AM, Xo Wang <xow@google.com> wrote:
> Add device-tree bindings to instantiate GPIO-based 1-wire buses. These
> go to headers for DS18B20 thermal sensors.
>
> Signed-off-by: Xo Wang <xow@google.com>
> ---
>  arch/arm/boot/dts/aspeed-bmc-opp-zaius.dts | 20 ++++++++++++++++++++
>  1 file changed, 20 insertions(+)
>
> diff --git a/arch/arm/boot/dts/aspeed-bmc-opp-zaius.dts b/arch/arm/boot/dts/aspeed-bmc-opp-zaius.dts
> index b52e45e..3d997d9 100644
> --- a/arch/arm/boot/dts/aspeed-bmc-opp-zaius.dts
> +++ b/arch/arm/boot/dts/aspeed-bmc-opp-zaius.dts
> @@ -20,6 +20,26 @@
>                 reg = <0x80000000 0x40000000>;
>         };
>
> +       onewire0 {

I wasn't sure if we should use a cell index: onewire@0, onewire@1, ...
The binding suggests yes, but the convention is usually to make the
cell index correspond to the reg property, and we don't have one one
here.

Lets merge it as is.

Reviewed-by: Joel Stanley <joel@jms.id.au>


> +               compatible = "w1-gpio";
> +               gpios = <&gpio ASPEED_GPIO(H, 0) GPIO_ACTIVE_HIGH>;
> +       };
> +
> +       onewire1 {
> +               compatible = "w1-gpio";
> +               gpios = <&gpio ASPEED_GPIO(H, 1) GPIO_ACTIVE_HIGH>;
> +       };
> +
> +       onewire2 {
> +               compatible = "w1-gpio";
> +               gpios = <&gpio ASPEED_GPIO(H, 2) GPIO_ACTIVE_HIGH>;
> +       };
> +
> +       onewire3 {
> +               compatible = "w1-gpio";
> +               gpios = <&gpio ASPEED_GPIO(H, 3) GPIO_ACTIVE_HIGH>;
> +       };
> +
>         leds {
>                 compatible = "gpio-leds";
>
> --
> 2.8.0.rc3.226.g39d4020
>
> _______________________________________________
> openbmc mailing list
> openbmc@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/openbmc

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH linux 2/2] ARM: dts: aspeed: zaius: Add I2C master selector and hotswap controller
  2016-11-16 23:29 ` [PATCH linux 2/2] ARM: dts: aspeed: zaius: Add I2C master selector and hotswap controller Xo Wang
@ 2016-11-17  4:59   ` Joel Stanley
  2016-11-17 21:53     ` Xo Wang
  0 siblings, 1 reply; 6+ messages in thread
From: Joel Stanley @ 2016-11-17  4:59 UTC (permalink / raw)
  To: Xo Wang; +Cc: OpenBMC Maillist

Hi Xo,

On Thu, Nov 17, 2016 at 9:59 AM, Xo Wang <xow@google.com> wrote:
> Add device-tree bindings to instantiate the PCA9541A I2C master
> selector. This driver allows mastering downstream devices after sending
> an arbitration request to the PCA9541A. Downstream devices go into the
> 'i2c-arb' child node.

I took a look at the bindings document for i2c-mux[1] and it suggests
something different.

Is there a reason why you didn't follow what it says?

[1] https://www.kernel.org/doc/Documentation/devicetree/bindings/i2c/i2c-mux.txt

Cheers,

Joel


>
> Instantiate the HWMON client driver for the TI LM5066I hotswap
> controller present on Zaius EVT2 downstream of the master selector.
>
> Signed-off-by: Xo Wang <xow@google.com>
> ---
>  arch/arm/boot/dts/aspeed-bmc-opp-zaius.dts | 19 +++++++++++++++++--
>  1 file changed, 17 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/boot/dts/aspeed-bmc-opp-zaius.dts b/arch/arm/boot/dts/aspeed-bmc-opp-zaius.dts
> index 3d997d9..136eb1d 100644
> --- a/arch/arm/boot/dts/aspeed-bmc-opp-zaius.dts
> +++ b/arch/arm/boot/dts/aspeed-bmc-opp-zaius.dts
> @@ -210,8 +210,23 @@
>  &i2c7 {
>         status = "okay";
>
> -       /* MUX PCA9541A (other master: CPU0 PCIe 1)
> -        *   ADM1272 PMBUS @10h
> +       pca9541a@70 {
> +               compatible = "nxp,pca9541";
> +               reg = <0x70>;
> +
> +               i2c-arb {
> +                       #address-cells = <1>;
> +                       #size-cells = <0>;
> +
> +                       hotswap@10 {
> +                               compatible = "ti,lm5066";
> +                               reg = <0x10>;
> +                       };
> +               };
> +       };
> +
> +       /* Master selector PCA9541A @70h (other master: CPU0)
> +        *   LM5066I PMBUS @10h
>          */
>         /* 12V SMPS Q54SH12050NNDH @61h */
>         /* CPU0 VR ISL68137 0.7V, 0.96V PMBUS @64h */
> --
> 2.8.0.rc3.226.g39d4020
>
> _______________________________________________
> openbmc mailing list
> openbmc@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/openbmc

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH linux 2/2] ARM: dts: aspeed: zaius: Add I2C master selector and hotswap controller
  2016-11-17  4:59   ` Joel Stanley
@ 2016-11-17 21:53     ` Xo Wang
  2016-11-18  2:51       ` Joel Stanley
  0 siblings, 1 reply; 6+ messages in thread
From: Xo Wang @ 2016-11-17 21:53 UTC (permalink / raw)
  To: Joel Stanley; +Cc: OpenBMC Maillist

Hi Joel,

On Wed, Nov 16, 2016 at 8:59 PM, Joel Stanley <joel@jms.id.au> wrote:
> Hi Xo,
>
> On Thu, Nov 17, 2016 at 9:59 AM, Xo Wang <xow@google.com> wrote:
>> Add device-tree bindings to instantiate the PCA9541A I2C master
>> selector. This driver allows mastering downstream devices after sending
>> an arbitration request to the PCA9541A. Downstream devices go into the
>> 'i2c-arb' child node.
>
> I took a look at the bindings document for i2c-mux[1] and it suggests
> something different.
>
> Is there a reason why you didn't follow what it says?
>
> [1] https://www.kernel.org/doc/Documentation/devicetree/bindings/i2c/i2c-mux.txt
>

I was following the I2C arbitration bus doc, which has its i2c slave
device nodes in an "i2c-arb" child node. I'm not sure why it was
written differently from "i2c-mux" bindings.

To be clear, I haven't 100% tested the LM5066I instantiation since the
motherboard I have actually has an ADI ADM1272 at address 0x10
downstream of the NXP PCA9541A.

https://www.kernel.org/doc/Documentation/devicetree/bindings/i2c/i2c-arb.txt

cheers
xo

> Cheers,
>
> Joel
>
>
>>
>> Instantiate the HWMON client driver for the TI LM5066I hotswap
>> controller present on Zaius EVT2 downstream of the master selector.
>>
>> Signed-off-by: Xo Wang <xow@google.com>
>> ---
>>  arch/arm/boot/dts/aspeed-bmc-opp-zaius.dts | 19 +++++++++++++++++--
>>  1 file changed, 17 insertions(+), 2 deletions(-)
>>
>> diff --git a/arch/arm/boot/dts/aspeed-bmc-opp-zaius.dts b/arch/arm/boot/dts/aspeed-bmc-opp-zaius.dts
>> index 3d997d9..136eb1d 100644
>> --- a/arch/arm/boot/dts/aspeed-bmc-opp-zaius.dts
>> +++ b/arch/arm/boot/dts/aspeed-bmc-opp-zaius.dts
>> @@ -210,8 +210,23 @@
>>  &i2c7 {
>>         status = "okay";
>>
>> -       /* MUX PCA9541A (other master: CPU0 PCIe 1)
>> -        *   ADM1272 PMBUS @10h
>> +       pca9541a@70 {
>> +               compatible = "nxp,pca9541";
>> +               reg = <0x70>;
>> +
>> +               i2c-arb {
>> +                       #address-cells = <1>;
>> +                       #size-cells = <0>;
>> +
>> +                       hotswap@10 {
>> +                               compatible = "ti,lm5066";
>> +                               reg = <0x10>;
>> +                       };
>> +               };
>> +       };
>> +
>> +       /* Master selector PCA9541A @70h (other master: CPU0)
>> +        *   LM5066I PMBUS @10h
>>          */
>>         /* 12V SMPS Q54SH12050NNDH @61h */
>>         /* CPU0 VR ISL68137 0.7V, 0.96V PMBUS @64h */
>> --
>> 2.8.0.rc3.226.g39d4020
>>
>> _______________________________________________
>> openbmc mailing list
>> openbmc@lists.ozlabs.org
>> https://lists.ozlabs.org/listinfo/openbmc

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH linux 2/2] ARM: dts: aspeed: zaius: Add I2C master selector and hotswap controller
  2016-11-17 21:53     ` Xo Wang
@ 2016-11-18  2:51       ` Joel Stanley
  0 siblings, 0 replies; 6+ messages in thread
From: Joel Stanley @ 2016-11-18  2:51 UTC (permalink / raw)
  To: Xo Wang; +Cc: OpenBMC Maillist

On Fri, Nov 18, 2016 at 8:23 AM, Xo Wang <xow@google.com> wrote:
> Hi Joel,
>
> On Wed, Nov 16, 2016 at 8:59 PM, Joel Stanley <joel@jms.id.au> wrote:
>> Hi Xo,
>>
>> On Thu, Nov 17, 2016 at 9:59 AM, Xo Wang <xow@google.com> wrote:
>>> Add device-tree bindings to instantiate the PCA9541A I2C master
>>> selector. This driver allows mastering downstream devices after sending
>>> an arbitration request to the PCA9541A. Downstream devices go into the
>>> 'i2c-arb' child node.
>>
>> I took a look at the bindings document for i2c-mux[1] and it suggests
>> something different.
>>
>> Is there a reason why you didn't follow what it says?
>>
>> [1] https://www.kernel.org/doc/Documentation/devicetree/bindings/i2c/i2c-mux.txt
>>
>
> I was following the I2C arbitration bus doc, which has its i2c slave
> device nodes in an "i2c-arb" child node. I'm not sure why it was
> written differently from "i2c-mux" bindings.
>
> To be clear, I haven't 100% tested the LM5066I instantiation since the
> motherboard I have actually has an ADI ADM1272 at address 0x10
> downstream of the NXP PCA9541A.
>
> https://www.kernel.org/doc/Documentation/devicetree/bindings/i2c/i2c-arb.txt
>

Okay. Thanks for the explanation. I have merged both patches into dev-4.7.

Cheers,

Joel

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-11-18  2:52 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-16 23:29 [PATCH linux 1/2] ARM: dts: aspeed: zaius: Add 1-wire buses Xo Wang
2016-11-16 23:29 ` [PATCH linux 2/2] ARM: dts: aspeed: zaius: Add I2C master selector and hotswap controller Xo Wang
2016-11-17  4:59   ` Joel Stanley
2016-11-17 21:53     ` Xo Wang
2016-11-18  2:51       ` Joel Stanley
2016-11-17  4:55 ` [PATCH linux 1/2] ARM: dts: aspeed: zaius: Add 1-wire buses Joel Stanley

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.