Add fan card PCA9552 to Witherspoon devicetree
Subsystems (2)
PATCH 1/1 Add fan card PCA9552 to Witherspoon devicetree
The Witherspoon OpenBMC system has a PCA9552 chip on the fan card that is used for fan fault and identify LED control. Adding this chip and the LED lines to the device tree.
--- arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts | 47 ++++++++++++++++++++++++ 1 file changed, 47 insertions(+)
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts +47 -0
@@ -203,6 +203,53 @@ compatible = "infineon,dps310"; reg = <0x76>; }; + + pca0: pca9552@60 { + compatible = "nxp,pca9552"; + reg = <0x60>; + fan0: led@0 { + label = "fan0:yellow"; + default-state = "keep"; + reg = <0>; + type = <PCA955X_TYPE_LED>; + }; + fan1: led@1 { + label = "fan1:yellow"; + default-state = "keep"; + reg = <1>; + type = <PCA955X_TYPE_LED>; + }; + fan2: led@2 { + label = "fan2:yellow"; + default-state = "keep"; + reg = <2>; + type = <PCA955X_TYPE_LED>; + }; + fan3: led@3 { + label = "fan3:yellow"; + default-state = "keep"; + reg = <3>; + type = <PCA955X_TYPE_LED>; + }; + led@13 { + label = "yellow"; + default-state = "keep"; + reg = <13>; + type = <PCA955X_TYPE_LED>; + }; + led@14 { + label = "green"; + default-state = "keep"; + reg = <14>; + type = <PCA955X_TYPE_LED>; + }; + led@15 { + label = "blue"; + default-state = "keep"; + reg = <15>; + type = <PCA955X_TYPE_LED>; + }; + }; }; &i2c4 {
Signature · 1 line
1.8.2.2
Joel Stanley
maintainerHello Brandon,
Quoted 3 lines · Brandon Wyman
The Witherspoon OpenBMC system has a PCA9552 chip on the fan card that is used for fan fault and identify LED control. Adding this chip and the LED lines to the device tree.
Great first submission. One issue I found, please see below.
Quoted 11 lines
Signed-off-by Brandon Wyman <[email protected]>--- arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts | 47 ++++++++++++++++++++++++ 1 file changed, 47 insertions(+)arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts +0
-0
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts line 209
Quoted 7 lines
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts +4
-0@@ -203,6 +203,53 @@ compatible = "infineon,dps310"; reg = <0x76>; }; + + pca0: pca9552@60 { + compatible = "nxp,pca9552"; + reg = <0x60>;
You've missed out the #address-cells and #size-cells properties here. Without these you would have seen this when you compiled the patch:
DTC arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dtb
Warning (reg_format): "reg" property in /ahb/apb/i2c@1e78a000/i2c-bus@100/pca9552@60/led@0 has invalid length (4 bytes) (#address-cells == 2, #size-cells == 1)
Warning (reg_format): "reg" property in /ahb/apb/i2c@1e78a000/i2c-bus@100/pca9552@60/led@1 has invalid length (4 bytes) (#address-cells == 2, #size-cells == 1)
Warning (avoid_default_addr_size): Relying on default #address-cells value for /ahb/apb/i2c@1e78a000/i2c-bus@100/pca9552@60/led@0
If you go back and check the bindings document, you will notice that it specifies these properties as required:
- #address-cells: must be 1
- #size-cells: must be 0
Please send a v2 with this fixed.
Cheers,
Joel
Quoted 49 lines
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts +43
-1+ fan0: led@0 { + label = "fan0:yellow"; + default-state = "keep"; + reg = <0>; + type = <PCA955X_TYPE_LED>; + }; + fan1: led@1 { + label = "fan1:yellow"; + default-state = "keep"; + reg = <1>; + type = <PCA955X_TYPE_LED>; + }; + fan2: led@2 { + label = "fan2:yellow"; + default-state = "keep"; + reg = <2>; + type = <PCA955X_TYPE_LED>; + }; + fan3: led@3 { + label = "fan3:yellow"; + default-state = "keep"; + reg = <3>; + type = <PCA955X_TYPE_LED>; + }; + led@13 { + label = "yellow"; + default-state = "keep"; + reg = <13>; + type = <PCA955X_TYPE_LED>; + }; + led@14 { + label = "green"; + default-state = "keep"; + reg = <14>; + type = <PCA955X_TYPE_LED>; + }; + led@15 { + label = "blue"; + default-state = "keep"; + reg = <15>; + type = <PCA955X_TYPE_LED>; + }; + }; }; &i2c4 { --1.8.2.2
A few comments on naming below. The names here have to match up with the MRW XML so code can find them, and we already took a shot at naming them in the XML.
Quoted 14 lines · Brandon Wyman
The Witherspoon OpenBMC system has a PCA9552 chip on the fan card that is used for fan fault and identify LED control. Adding this chip and the LED lines to the device tree.
Signed-off-by Brandon Wyman <[email protected]>--- arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts | 47 ++++++++++++++++++++++++ 1 file changed, 47 insertions(+)arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts +0
-0
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts line 211
Quoted 9 lines
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts +6
-0@@ -203,6 +203,53 @@ compatible = "infineon,dps310"; reg = <0x76>; }; + + pca0: pca9552@60 { + compatible = "nxp,pca9552"; + reg = <0x60>; + fan0: led@0 { + label = "fan0:yellow";
These are all fan fault LEDs. The MRW just calls them fan0, fan1, etc. I suppose fan0-fault would be OK here too and we could update the MRW.
Quoted 14 lines
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts +14
-0+ default-state = "keep"; + reg = <0>; + type = <PCA955X_TYPE_LED>; + }; + fan1: led@1 { + label = "fan1:yellow"; + default-state = "keep"; + reg = <1>; + type = <PCA955X_TYPE_LED>; + }; + fan2: led@2 { + label = "fan2:yellow"; + default-state = "keep"; + reg = <2>;
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts line 235
Quoted 10 lines
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts +10
-0+ type = <PCA955X_TYPE_LED>; + }; + fan3: led@3 { + label = "fan3:yellow"; + default-state = "keep"; + reg = <3>; + type = <PCA955X_TYPE_LED>; + }; + led@13 { + label = "yellow";
The fault LED in the back of the system is already called rear-fault, so this should probably be front-fault.
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts line 241
Quoted 6 lines
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts +6
-0+ default-state = "keep"; + reg = <13>; + type = <PCA955X_TYPE_LED>; + }; + led@14 { + label = "green";
front-power
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts line 247
Quoted 6 lines
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts +6
-0+ default-state = "keep"; + reg = <14>; + type = <PCA955X_TYPE_LED>; + }; + led@15 { + label = "blue";
front-id
Quoted 8 lines
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts +5
-0+ default-state = "keep"; + reg = <15>; + type = <PCA955X_TYPE_LED>; + }; + }; }; &i2c4 {
Quoted 45 lines · Joel Stanley
Hello Brandon,
Quoted 3 lines · Brandon Wyman
The Witherspoon OpenBMC system has a PCA9552 chip on the fan card that is used for fan fault and identify LED control. Adding this chip and the LED lines to the device tree.
Great first submission. One issue I found, please see below.
Quoted 11 lines
Signed-off-by Brandon Wyman <[email protected]>--- arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts | 47 ++++++++++++++++++++++++ 1 file changed, 47 insertions(+)arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts +0
-0arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts line 209
Quoted 7 lines
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts +4
-0@@ -203,6 +203,53 @@ compatible = "infineon,dps310"; reg = <0x76>; }; + + pca0: pca9552@60 { + compatible = "nxp,pca9552"; + reg = <0x60>;You've missed out the #address-cells and #size-cells properties here. Without these you would have seen this when you compiled the patch:
DTC
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dtb
Warning (reg_format): "reg" property in /ahb/apb/i2c@1e78a000/i2c-bus@100/pca9552@60/led@0 has invalid length (4 bytes) (#address-cells == 2, #size-cells == 1)
Warning (reg_format): "reg" property in /ahb/apb/i2c@1e78a000/i2c-bus@100/pca9552@60/led@1 has invalid length (4 bytes) (#address-cells == 2, #size-cells == 1)
Warning (avoid_default_addr_size): Relying on default #address-cells value for /ahb/apb/i2c@1e78a000/i2c-bus@100/pca9552@60/led@0If you go back and check the bindings document, you will notice that it specifies these properties as required:
Quoted 6 lines
- #address-cells: must be 1
- #size-cells: must be 0Please send a v2 with this fixed.
Okay, I missed that. Will do.
Quoted 55 lines
Cheers,
Joel
Quoted 49 lines
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts +43
-1+ fan0: led@0 { + label = "fan0:yellow"; + default-state = "keep"; + reg = <0>; + type = <PCA955X_TYPE_LED>; + }; + fan1: led@1 { + label = "fan1:yellow"; + default-state = "keep"; + reg = <1>; + type = <PCA955X_TYPE_LED>; + }; + fan2: led@2 { + label = "fan2:yellow"; + default-state = "keep"; + reg = <2>; + type = <PCA955X_TYPE_LED>; + }; + fan3: led@3 { + label = "fan3:yellow"; + default-state = "keep"; + reg = <3>; + type = <PCA955X_TYPE_LED>; + }; + led@13 { + label = "yellow"; + default-state = "keep"; + reg = <13>; + type = <PCA955X_TYPE_LED>; + }; + led@14 { + label = "green"; + default-state = "keep"; + reg = <14>; + type = <PCA955X_TYPE_LED>; + }; + led@15 { + label = "blue"; + default-state = "keep"; + reg = <15>; + type = <PCA955X_TYPE_LED>; + }; + }; }; &i2c4 { --1.8.2.2
Quoted 26 lines · Matt Spinler
A few comments on naming below. The names here have to match up with the MRW XML so code can find them, and we already took a shot at naming them in the XML.
Quoted 21 lines · Brandon Wyman
The Witherspoon OpenBMC system has a PCA9552 chip on the fan card that is used for fan fault and identify LED control. Adding this chip and the LED lines to the device tree.
Signed-off-by Brandon Wyman <[email protected]>--- arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts | 47 ++++++++++++++++++++++++ 1 file changed, 47 insertions(+)arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts +1
-0@@ -203,6 +203,53 @@ compatible = "infineon,dps310"; reg = <0x76>; }; +
Quoted 8 lines
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts line 211
Quoted 5 lines
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts +5
-0+ pca0: pca9552@60 { + compatible = "nxp,pca9552"; + reg = <0x60>; + fan0: led@0 { + label = "fan0:yellow";These are all fan fault LEDs. The MRW just calls them fan0, fan1, etc. I suppose fan0-fault would be OK here too and we could update the MRW.
Okay. So the alias and the label should be fan0-fault, fan1-fault, etc.?
Quoted 26 lines
Quoted 15 lines
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts +14
-0+ default-state = "keep"; + reg = <0>; + type = <PCA955X_TYPE_LED>; + }; + fan1: led@1 { + label = "fan1:yellow"; + default-state = "keep"; + reg = <1>; + type = <PCA955X_TYPE_LED>; + }; + fan2: led@2 { + label = "fan2:yellow"; + default-state = "keep"; + reg = <2>;arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts line 235
Quoted 10 lines
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts +10
-0+ type = <PCA955X_TYPE_LED>; + }; + fan3: led@3 { + label = "fan3:yellow"; + default-state = "keep"; + reg = <3>; + type = <PCA955X_TYPE_LED>; + }; + led@13 { + label = "yellow";
Quoted 2 lines
The fault LED in the back of the system is already called rear-fault, so this should probably be front-fault.
Alias and label front-fault?
Quoted 9 lines
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts line 241
Quoted 7 lines
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts +6
-0+ default-state = "keep"; + reg = <13>; + type = <PCA955X_TYPE_LED>; + }; + led@14 { + label = "green";front-power
Okay.
Quoted 9 lines
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts line 247
Quoted 7 lines
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts +6
-0+ default-state = "keep"; + reg = <14>; + type = <PCA955X_TYPE_LED>; + }; + led@15 { + label = "blue";front-id
Okay, that makes more sense than "blue".
Quoted 11 lines
Quoted 9 lines
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts +5
-0+ default-state = "keep"; + reg = <15>; + type = <PCA955X_TYPE_LED>; + }; + }; }; &i2c4 {
Joel Stanley
maintainerQuoted 8 lines · Cédric Le Goater
Quoted 7 lines · Joel Stanley
Hello Brandon,
Quoted 3 lines · Brandon Wyman
The Witherspoon OpenBMC system has a PCA9552 chip on the fan card that is used for fan fault and identify LED control. Adding this chip and the LED lines to the device tree.
Quoted 7 lines
Quoted 1 line
Great first submission. One issue I found, please see below.
Joel,
haven't you merged the patch defining all the PCA9552 pins as GPIOS ?
https://github.com/openbmc/linux/commit/db30464ee579176abc82d0fe95aa9b9ff76d0c3a
Yeah. We have a few PCA955x devices in the system.
There's the pca9552 used as GPIOs for the GPUs that you worked on the driver for. There's also a pca9551 that's used for driving LEDs, which is what Brandon is working on.
Cheers,
Joel
Quoted 8 lines · Joel Stanley
Hello Brandon,
Quoted 3 lines · Brandon Wyman
The Witherspoon OpenBMC system has a PCA9552 chip on the fan card that is used for fan fault and identify LED control. Adding this chip and the LED lines to the device tree.
Great first submission. One issue I found, please see below.
Joel,
haven't you merged the patch defining all the PCA9552 pins as GPIOS ?
https://github.com/openbmc/linux/commit/db30464ee579176abc82d0fe95aa9b9ff76d0c3a
Cheers ,
C.
Quoted 19 lines · Joel Stanley
Quoted 8 lines · Cédric Le Goater
Quoted 7 lines · Joel Stanley
Hello Brandon,
Quoted 3 lines · Brandon Wyman
The Witherspoon OpenBMC system has a PCA9552 chip on the fan card that is used for fan fault and identify LED control. Adding this chip and the LED lines to the device tree.
Quoted 7 lines
Quoted 1 line
Great first submission. One issue I found, please see below.
Joel,
haven't you merged the patch defining all the PCA9552 pins as GPIOS ?
https://github.com/openbmc/linux/commit/db30464ee579176abc82d0fe95aa9b9ff76d0c3a
Yeah. We have a few PCA955x devices in the system.
Quoted 7 lines
There's the pca9552 used as GPIOs for the GPUs that you worked on the driver for. There's also a pca9551 that's used for driving LEDs, which is what Brandon is working on.
Cheers,
Joel
That is correct. There are two such PCA9552 devices on the Witherspoon system. One is on I2C-11, the other is on I2C-3.