This patch series update Facebook Bletchley BMC devicetree base on EVT HW
schematioc design, and rebase SLED numbering to 1-based for OpenBMC
multi-host.
- GPIO:
- adding more gpio line names
- include interrupt line in io expander for gpio interrupt monitoring
- SPI flash:
- adding dual flash BSM module support
- switch to spi2-gpio on spi2 due to unstable signal issue
- Hwmon Sensors:
- adding INA230 sensors for monitoring
- fix ADM1278 shunt-resistor
- MDIO Bus: enable mido3 bus
- RTC: switch to external battery-backed rtc
- OpenBMC: 1-based SLED numbering
LINK: [v1] https://lore.kernel.org/all/[email protected]/
Changes v1 --> v2:
- update the details of new added gpio line names in commit message
- add battery-backed rtc information in comment and commit message
Potin Lai (10):
arch: arm: dts: bletchley: switch sled numbering to 1-based
arch: arm: dts: bletchley: separate leds into multiple groups
arch: arm: dts: bletchley: update gpio-line-names
arch: arm: dts: bletchley: update fmc configurations
arch: arm: dts: bletchley: switch to spi-gpio for spi2
arch: arm: dts: bletchley: add interrupt support for sled io expander
arch: arm: dts: bletchley: add shunt-resistor for ADM1278
arch: arm: dts: bletchley: add INA230 sensor on each sled
arch: arm: dts: bletchley: enable mdio3 bus
arch: arm: dts: bletchley: cleanup redundant nodes
.../dts/aspeed-bmc-facebook-bletchley.dts | 303 +++++++++++-------
1 file changed, 194 insertions(+), 109 deletions(-)
--
2.17.1
fix with correct shunt-resistor value base on EVT HW
Signed-off-by: Potin Lai <[email protected]>
---
arch/arm/boot/dts/aspeed-bmc-facebook-bletchley.dts | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/boot/dts/aspeed-bmc-facebook-bletchley.dts b/arch/arm/boot/dts/aspeed-bmc-facebook-bletchley.dts
index 8afaa8f52c38..76c086ea7b71 100644
--- a/arch/arm/boot/dts/aspeed-bmc-facebook-bletchley.dts
+++ b/arch/arm/boot/dts/aspeed-bmc-facebook-bletchley.dts
@@ -715,6 +715,7 @@
adm1278@11 {
compatible = "adi,adm1278";
reg = <0x11>;
+ shunt-resistor-micro-ohms = <300>;
};
tmp421@4c {
--
2.17.1
Enable interrupt support for all sledx_ioexp, so userspace can monitor
gpio from io expander by interrupt
Signed-off-by: Potin Lai <[email protected]>
---
.../dts/aspeed-bmc-facebook-bletchley.dts | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/arch/arm/boot/dts/aspeed-bmc-facebook-bletchley.dts b/arch/arm/boot/dts/aspeed-bmc-facebook-bletchley.dts
index 3c54e4a892c9..8afaa8f52c38 100644
--- a/arch/arm/boot/dts/aspeed-bmc-facebook-bletchley.dts
+++ b/arch/arm/boot/dts/aspeed-bmc-facebook-bletchley.dts
@@ -6,6 +6,7 @@
#include <dt-bindings/gpio/aspeed-gpio.h>
#include <dt-bindings/usb/pd.h>
#include <dt-bindings/leds/leds-pca955x.h>
+#include <dt-bindings/interrupt-controller/irq.h>
/ {
model = "Facebook Bletchley BMC";
@@ -268,6 +269,9 @@
gpio-controller;
#gpio-cells = <2>;
+ interrupt-parent = <&gpio0>;
+ interrupts = <ASPEED_GPIO(M, 0) IRQ_TYPE_LEVEL_LOW>;
+
gpio-line-names =
"SLED1_MS_DETECT1","SLED1_VBUS_BMC_EN","SLED1_INA230_ALERT","SLED1_P12V_STBY_ALERT",
"SLED1_SSD_ALERT","SLED1_MS_DETECT0","SLED1_RST_CCG5","SLED1_FUSB302_INT",
@@ -331,6 +335,9 @@
gpio-controller;
#gpio-cells = <2>;
+ interrupt-parent = <&gpio0>;
+ interrupts = <ASPEED_GPIO(M, 1) IRQ_TYPE_LEVEL_LOW>;
+
gpio-line-names =
"SLED2_MS_DETECT1","SLED2_VBUS_BMC_EN","SLED2_INA230_ALERT","SLED2_P12V_STBY_ALERT",
"SLED2_SSD_ALERT","SLED2_MS_DETECT0","SLED2_RST_CCG5","SLED2_FUSB302_INT",
@@ -398,6 +405,9 @@
gpio-controller;
#gpio-cells = <2>;
+ interrupt-parent = <&gpio0>;
+ interrupts = <ASPEED_GPIO(M, 2) IRQ_TYPE_LEVEL_LOW>;
+
gpio-line-names =
"SLED3_MS_DETECT1","SLED3_VBUS_BMC_EN","SLED3_INA230_ALERT","SLED3_P12V_STBY_ALERT",
"SLED3_SSD_ALERT","SLED3_MS_DETECT0","SLED3_RST_CCG5","SLED3_FUSB302_INT",
@@ -461,6 +471,9 @@
gpio-controller;
#gpio-cells = <2>;
+ interrupt-parent = <&gpio0>;
+ interrupts = <ASPEED_GPIO(M, 3) IRQ_TYPE_LEVEL_LOW>;
+
gpio-line-names =
"SLED4_MS_DETECT1","SLED4_VBUS_BMC_EN","SLED4_INA230_ALERT","SLED4_P12V_STBY_ALERT",
"SLED4_SSD_ALERT","SLED4_MS_DETECT0","SLED4_RST_CCG5","SLED4_FUSB302_INT",
@@ -524,6 +537,9 @@
gpio-controller;
#gpio-cells = <2>;
+ interrupt-parent = <&gpio0>;
+ interrupts = <ASPEED_GPIO(M, 4) IRQ_TYPE_LEVEL_LOW>;
+
gpio-line-names =
"SLED5_MS_DETECT1","SLED5_VBUS_BMC_EN","SLED5_INA230_ALERT","SLED5_P12V_STBY_ALERT",
"SLED5_SSD_ALERT","SLED5_MS_DETECT0","SLED5_RST_CCG5","SLED5_FUSB302_INT",
@@ -587,6 +603,9 @@
gpio-controller;
#gpio-cells = <2>;
+ interrupt-parent = <&gpio0>;
+ interrupts = <ASPEED_GPIO(M, 5) IRQ_TYPE_LEVEL_LOW>;
+
gpio-line-names =
"SLED6_MS_DETECT1","SLED6_VBUS_BMC_EN","SLED6_INA230_ALERT","SLED6_P12V_STBY_ALERT",
"SLED6_SSD_ALERT","SLED6_MS_DETECT0","SLED6_RST_CCG5","SLED6_FUSB302_INT",
--
2.17.1
Switch to spi-gpio driver to avoid unstable signal issue with EVT HW
Signed-off-by: Potin Lai <[email protected]>
---
arch/arm/boot/dts/aspeed-bmc-facebook-bletchley.dts | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/arch/arm/boot/dts/aspeed-bmc-facebook-bletchley.dts b/arch/arm/boot/dts/aspeed-bmc-facebook-bletchley.dts
index b01f1e7adb81..3c54e4a892c9 100644
--- a/arch/arm/boot/dts/aspeed-bmc-facebook-bletchley.dts
+++ b/arch/arm/boot/dts/aspeed-bmc-facebook-bletchley.dts
@@ -227,8 +227,16 @@
&spi2 {
status = "okay";
- pinctrl-names = "default";
- pinctrl-0 = <&pinctrl_spi2_default>;
+
+ compatible = "spi-gpio";
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ gpio-sck = <&gpio0 ASPEED_GPIO(X, 3) GPIO_ACTIVE_HIGH>;
+ gpio-mosi = <&gpio0 ASPEED_GPIO(X, 4) GPIO_ACTIVE_HIGH>;
+ gpio-miso = <&gpio0 ASPEED_GPIO(X, 5) GPIO_ACTIVE_HIGH>;
+ num-chipselects = <1>;
+ cs-gpios = <&gpio0 ASPEED_GPIO(X, 0) GPIO_ACTIVE_LOW>;
flash@0 {
status = "okay";
--
2.17.1
On Mon, Feb 14, 2022 at 12:25:28PM +0800, Potin Lai wrote:
> This patch series update Facebook Bletchley BMC devicetree base on EVT HW
> schematioc design, and rebase SLED numbering to 1-based for OpenBMC
> multi-host.
>
> - GPIO:
> - adding more gpio line names
> - include interrupt line in io expander for gpio interrupt monitoring
>
> - SPI flash:
> - adding dual flash BSM module support
> - switch to spi2-gpio on spi2 due to unstable signal issue
>
> - Hwmon Sensors:
> - adding INA230 sensors for monitoring
> - fix ADM1278 shunt-resistor
>
> - MDIO Bus: enable mido3 bus
>
> - RTC: switch to external battery-backed rtc
>
> - OpenBMC: 1-based SLED numbering
>
>
> LINK: [v1] https://lore.kernel.org/all/[email protected]/
>
>
> Changes v1 --> v2:
> - update the details of new added gpio line names in commit message
> - add battery-backed rtc information in comment and commit message
Thank you for the details there Potin.
>
> Potin Lai (10):
> arch: arm: dts: bletchley: switch sled numbering to 1-based
> arch: arm: dts: bletchley: separate leds into multiple groups
> arch: arm: dts: bletchley: update gpio-line-names
> arch: arm: dts: bletchley: update fmc configurations
> arch: arm: dts: bletchley: switch to spi-gpio for spi2
> arch: arm: dts: bletchley: add interrupt support for sled io expander
> arch: arm: dts: bletchley: add shunt-resistor for ADM1278
> arch: arm: dts: bletchley: add INA230 sensor on each sled
> arch: arm: dts: bletchley: enable mdio3 bus
> arch: arm: dts: bletchley: cleanup redundant nodes
>
> .../dts/aspeed-bmc-facebook-bletchley.dts | 303 +++++++++++-------
> 1 file changed, 194 insertions(+), 109 deletions(-)
>
> --
> 2.17.1
>
Entire series is
Reviewed-by: Patrick Williams <[email protected]>
--
Patrick Williams
On Mon, 14 Feb 2022 at 04:26, Potin Lai <[email protected]> wrote:
>
> This patch series update Facebook Bletchley BMC devicetree base on EVT HW
> schematioc design, and rebase SLED numbering to 1-based for OpenBMC
> multi-host.
>
> - GPIO:
> - adding more gpio line names
> - include interrupt line in io expander for gpio interrupt monitoring
>
> - SPI flash:
> - adding dual flash BSM module support
> - switch to spi2-gpio on spi2 due to unstable signal issue
>
> - Hwmon Sensors:
> - adding INA230 sensors for monitoring
> - fix ADM1278 shunt-resistor
>
> - MDIO Bus: enable mido3 bus
>
> - RTC: switch to external battery-backed rtc
>
> - OpenBMC: 1-based SLED numbering
>
>
> LINK: [v1] https://lore.kernel.org/all/[email protected]/
>
>
> Changes v1 --> v2:
> - update the details of new added gpio line names in commit message
> - add battery-backed rtc information in comment and commit message
Looks good. I made some comments on the spi2 patch, please fix those
up and I will merge.
Note that the convention for patch names is:
ARM: dts: aspeed: bletchley: Description with sentence case
If you could update your patches to follow that it would be appreciated.
There's no need to re-send your series for the openbmc tree; I can
merge those once we've reviewed the ones for mainline.
Cheers,
Joel
>
> Potin Lai (10):
> arch: arm: dts: bletchley: switch sled numbering to 1-based
> arch: arm: dts: bletchley: separate leds into multiple groups
> arch: arm: dts: bletchley: update gpio-line-names
> arch: arm: dts: bletchley: update fmc configurations
> arch: arm: dts: bletchley: switch to spi-gpio for spi2
> arch: arm: dts: bletchley: add interrupt support for sled io expander
> arch: arm: dts: bletchley: add shunt-resistor for ADM1278
> arch: arm: dts: bletchley: add INA230 sensor on each sled
> arch: arm: dts: bletchley: enable mdio3 bus
> arch: arm: dts: bletchley: cleanup redundant nodes
>
> .../dts/aspeed-bmc-facebook-bletchley.dts | 303 +++++++++++-------
> 1 file changed, 194 insertions(+), 109 deletions(-)
>
> --
> 2.17.1
>
On Mon, 14 Feb 2022 at 04:26, Potin Lai <[email protected]> wrote:
>
> Switch to spi-gpio driver to avoid unstable signal issue with EVT HW
>
> Signed-off-by: Potin Lai <[email protected]>
> ---
> arch/arm/boot/dts/aspeed-bmc-facebook-bletchley.dts | 12 ++++++++++--
> 1 file changed, 10 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/boot/dts/aspeed-bmc-facebook-bletchley.dts b/arch/arm/boot/dts/aspeed-bmc-facebook-bletchley.dts
> index b01f1e7adb81..3c54e4a892c9 100644
> --- a/arch/arm/boot/dts/aspeed-bmc-facebook-bletchley.dts
> +++ b/arch/arm/boot/dts/aspeed-bmc-facebook-bletchley.dts
> @@ -227,8 +227,16 @@
>
> &spi2 {
> status = "okay";
> - pinctrl-names = "default";
> - pinctrl-0 = <&pinctrl_spi2_default>;
> +
> + compatible = "spi-gpio";
This is a bit strange. You're effectively rewriting the node with a new one.
It would make more sense to leave spi2 disabled (the default), and add
a new node:
spi {
compatible = "spi-gpio";
#address-cells = <1>;
#size-cells = <0>;
gpio-sck = <&gpio0 ASPEED_GPIO(X, 3) GPIO_ACTIVE_HIGH>;
gpio-mosi = <&gpio0 ASPEED_GPIO(X, 4) GPIO_ACTIVE_HIGH>;
gpio-miso = <&gpio0 ASPEED_GPIO(X, 5) GPIO_ACTIVE_HIGH>;
num-chipselects = <1>;
cs-gpios = <&gpio0 ASPEED_GPIO(X, 0) GPIO_ACTIVE_LOW>;
flash@0 {
status = "okay";
etc.
Your new spi node doesn't need the pinctrl or clock properties.
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + gpio-sck = <&gpio0 ASPEED_GPIO(X, 3) GPIO_ACTIVE_HIGH>;
> + gpio-mosi = <&gpio0 ASPEED_GPIO(X, 4) GPIO_ACTIVE_HIGH>;
> + gpio-miso = <&gpio0 ASPEED_GPIO(X, 5) GPIO_ACTIVE_HIGH>;
> + num-chipselects = <1>;
> + cs-gpios = <&gpio0 ASPEED_GPIO(X, 0) GPIO_ACTIVE_LOW>;
>
> flash@0 {
> status = "okay";
> --
> 2.17.1
>