Skip to contentSkip to conversation

input: misc: Add IBM Operation Panel driver

PATCH Superseded Eddie James 5 participants 11 messages Sep 8, 2020 – Sep 9, 2020

Subsystems (7)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Eddie James

author maintainer
#0 lore raw

v2 cover input: misc: Add IBM Operation Panel driver

This series adds support for input from the IBM Operation Panel, which is a simple controller with three buttons and an LCD display meant for interacting with a server. It's connected over I2C, typically to a service processor. This series only supports the input from the panel, in which the panel masters the I2C bus and sends data to the host system when someone presses a button on the controller.

Changes since v1:
- Redo DTS documentation example to use I2C_OWN_SLAVE_ADDRESS
- Reject commands received in the input driver that are too long
- Add a definition for the interrupt status mask in the Aspeed I2C driver
- Use I2C_OWN_SLAVE_ADDRESS for both dts additions

Eddie James (5):
dt-bindings: input: Add documentation for IBM Operation Panel
input: misc: Add IBM Operation Panel driver
i2c: aspeed: Mask IRQ status to relevant bits
ARM: dts: Aspeed: Tacoma: Add IBM Operation Panel I2C device
ARM: dts: Aspeed: Rainier: Add IBM Operation Panel I2C device

 .../bindings/input/ibm,op-panel.yaml          |  39 ++++
 MAINTAINERS                                   |   7 +
 arch/arm/boot/dts/aspeed-bmc-ibm-rainier.dts  |   7 +
 arch/arm/boot/dts/aspeed-bmc-opp-tacoma.dts   |   7 +
 drivers/i2c/busses/i2c-aspeed.c               |   2 +
 drivers/input/misc/Kconfig                    |  18 ++
 drivers/input/misc/Makefile                   |   1 +
 drivers/input/misc/ibm-panel.c                | 192 ++++++++++++++++++
 8 files changed, 273 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/input/ibm,op-panel.yaml
 create mode 100644 drivers/input/misc/ibm-panel.c
Signature · 1 line
2.26.2
author maintainer
#1 lore raw

PATCH v2 1/5 dt-bindings: input: Add documentation for IBM Operation Panel

Document the bindings for the IBM Operation Panel, which provides a simple interface to control a server. It has a display and three buttons.
Also update MAINTAINERS for the new file.

---
 .../bindings/input/ibm,op-panel.yaml          | 39 +++++++++++++++++++
 MAINTAINERS                                   |  6 +++
 2 files changed, 45 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/input/ibm,op-panel.yaml
Documentation/devicetree/bindings/input/ibm,op-panel.yaml new file +39 -0
new file mode 100644
index 000000000000..5f068fce93ad
@@ -0,0 +1,39 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/input/ibm,op-panel.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: IBM Operation Panel
+
+maintainers:
+  - Eddie James <[email protected]>
+
+description: |
+  The IBM Operation Panel provides a simple interface to control the connected
+  server. It has a display and three buttons: two directional arrows and one
+  'Enter' button.
+
+properties:
+  compatible:
+    const: ibm,op-panel
+
+  reg:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+
+examples:
+  - |
+    #include <dt-bindings/i2c/i2c.h>
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        ibm-op-panel at 62 {
+            compatible = "ibm,op-panel";
+            reg = <(0x62 | I2C_OWN_SLAVE_ADDRESS)>;
+        };
+    };
MAINTAINERS +6 -0
index 4a5d6797a206..0d83eada50e4 100644
@@ -8345,6 +8345,12 @@ T:	git git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux.git
 F:	Documentation/ia64/
 F:	arch/ia64/
 
+IBM Operation Panel Input Driver
+M:	Eddie James <[email protected]>
+L:	linux-input at vger.kernel.org
+S:	Maintained
+F:	Documentation/devicetree/bindings/input/ibm,op-panel.yaml
+
 IBM Power 842 compression accelerator
 M:	Haren Myneni <[email protected]>
 S:	Supported
Signature · 1 line
2.26.2
author maintainer
#2 lore raw

PATCH v2 2/5 input: misc: Add IBM Operation Panel driver

In reply to Eddie James

Add a driver to get the button events from the panel and provide them to userspace with the input subsystem. The panel is connected with I2C and controls the bus, so the driver registers as an I2C slave device.

---
 MAINTAINERS                    |   1 +
 drivers/input/misc/Kconfig     |  18 ++++
 drivers/input/misc/Makefile    |   1 +
 drivers/input/misc/ibm-panel.c | 192 +++++++++++++++++++++++++++++++++
 4 files changed, 212 insertions(+)
 create mode 100644 drivers/input/misc/ibm-panel.c
MAINTAINERS +1 -0
index 0d83eada50e4..0f9605c4cfc6 100644
@@ -8350,6 +8350,7 @@ M:	Eddie James <[email protected]>
 L:	linux-input at vger.kernel.org
 S:	Maintained
 F:	Documentation/devicetree/bindings/input/ibm,op-panel.yaml
+F:	drivers/input/misc/ibm-panel.c
 
 IBM Power 842 compression accelerator
 M:	Haren Myneni <[email protected]>
drivers/input/misc/Kconfig +18 -0
index 362e8a01980c..65ab1ce7b259 100644
@@ -708,6 +708,24 @@ config INPUT_ADXL34X_SPI
 	  To compile this driver as a module, choose M here: the
 	  module will be called adxl34x-spi.
 
+config INPUT_IBM_PANEL
+	tristate "IBM Operation Panel driver"
+	depends on I2C_SLAVE || COMPILE_TEST
+	help
+	  Say Y here if you have an IBM Operation Panel connected to your system
+	  over I2C. The panel is typically connected only to a system's service
+	  processor (BMC).
+
+	  If unsure, say N.
+
+	  The Operation Panel is a controller with some buttons and an LCD
+	  display that allows someone with physical access to the system to
+	  perform various administrative tasks. This driver only supports the part
+	  of the controller that sends commands to the system.
+
+	  To compile this driver as a module, choose M here: the module will be
+	  called ibm-panel.
+
 config INPUT_IMS_PCU
 	tristate "IMS Passenger Control Unit driver"
 	depends on USB
drivers/input/misc/Makefile +1 -0
index a48e5f2d859d..7e9edf0a142b 100644
@@ -38,6 +38,7 @@ obj-$(CONFIG_INPUT_GPIO_DECODER)	+= gpio_decoder.o
 obj-$(CONFIG_INPUT_GPIO_VIBRA)		+= gpio-vibra.o
 obj-$(CONFIG_INPUT_HISI_POWERKEY)	+= hisi_powerkey.o
 obj-$(CONFIG_HP_SDC_RTC)		+= hp_sdc_rtc.o
+obj-$(CONFIG_INPUT_IBM_PANEL)		+= ibm-panel.o
 obj-$(CONFIG_INPUT_IMS_PCU)		+= ims-pcu.o
 obj-$(CONFIG_INPUT_IQS269A)		+= iqs269a.o
 obj-$(CONFIG_INPUT_IXP4XX_BEEPER)	+= ixp4xx-beeper.o
drivers/input/misc/ibm-panel.c new file +192 -0

192 lines not on this page · raw message

Signature · 1 line
2.26.2
#3 lore raw

Hi Eddie,

Quoted 11 lines
drivers/input/misc/ibm-panel.c new file +11 -0
+	switch (event) {
+	case I2C_SLAVE_STOP:
+		command_size = panel->idx;
+		fallthrough;
+	case I2C_SLAVE_WRITE_REQUESTED:
+		panel->idx = 0;
+		break;
+	case I2C_SLAVE_WRITE_RECEIVED:
+		if (panel->idx < sizeof(panel->command))
+			panel->command[panel->idx++] = *val;
+		else

drivers/input/misc/ibm-panel.c line 112

Quoted 10 lines
drivers/input/misc/ibm-panel.c new file +10 -0
+			/*
+			 * The command is too long and therefore invalid, so set the index
+			 * to it's largest possible value. When a STOP is finally received,
+			 * the command will be rejected upon processing.
+			 */
+			panel->idx = U8_MAX;
+		break;
+	default:
+		break;
+	}

Sorry, I missed this in my last review. READ states are mandatory, so you will need something like this:

+ case I2C_SLAVE_READ_REQUESTED:
+ case I2C_SLAVE_READ_PROCESSED:
+ *val = 0xff;
+ break;

drivers/input/misc/ibm-panel.c line 117

Quoted 2 lines
drivers/input/misc/ibm-panel.c new file +2 -0
+	if (command_size)
+		ibm_panel_process_command(panel, command_size);

I wondered if you could check for the correct command_size here, so no need to call into the function when the size doesn't match?

drivers/input/misc/ibm-panel.c line 156

Quoted 5 lines
drivers/input/misc/ibm-panel.c new file +5 -0
+       rc = i2c_slave_register(client, ibm_panel_i2c_slave_cb);
+       if (rc) {
+               input_unregister_device(panel->input);
+               dev_err(&client->dev,
+                       "Failed to register I2C slave device: %d\n", rc);

This dev_err can go. The core will print messages if something goes wrong.

The rest looks good from an I2C point of view.

I'd think this all should go via the input tree?

Kind regards,

Wolfram

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linux-aspeed/attachments/20200908/a04ca8c7/attachment.sig>

author maintainer
#4 lore raw

PATCH v2 3/5 i2c: aspeed: Mask IRQ status to relevant bits

In reply to Eddie James

Mask the IRQ status to only the bits that the driver checks. This prevents excessive driver warnings when operating in slave mode when additional bits are set that the driver doesn't handle.

---
 drivers/i2c/busses/i2c-aspeed.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/i2c/busses/i2c-aspeed.c +2 -0
index 31268074c422..2a388911038a 100644
@@ -69,6 +69,7 @@
  * These share bit definitions, so use the same values for the enable &
  * status bits.
  */
+#define ASPEED_I2CD_INTR_ALL				0xf000ffff
 #define ASPEED_I2CD_INTR_SDA_DL_TIMEOUT			BIT(14)
 #define ASPEED_I2CD_INTR_BUS_RECOVER_DONE		BIT(13)
 #define ASPEED_I2CD_INTR_SLAVE_MATCH			BIT(7)
@@ -604,6 +605,7 @@ static irqreturn_t aspeed_i2c_bus_irq(int irq, void *dev_id)
 	writel(irq_received & ~ASPEED_I2CD_INTR_RX_DONE,
 	       bus->base + ASPEED_I2C_INTR_STS_REG);
 	readl(bus->base + ASPEED_I2C_INTR_STS_REG);
+	irq_received &= ASPEED_I2CD_INTR_ALL;
 	irq_remaining = irq_received;
 
 #if IS_ENABLED(CONFIG_I2C_SLAVE)
Signature · 1 line
2.26.2
Reviewed-by on v2 3/5
#5 lore raw

Re: [PATCH v2 3/5] i2c: aspeed: Mask IRQ status to relevant bits

Quoted 5 lines · Eddie James

Mask the IRQ status to only the bits that the driver checks. This prevents excessive driver warnings when operating in slave mode when additional bits are set that the driver doesn't handle.

Quoted 27 lines
---
 drivers/i2c/busses/i2c-aspeed.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/i2c/busses/i2c-aspeed.c +2 -0
index 31268074c422..2a388911038a 100644
@@ -69,6 +69,7 @@
  * These share bit definitions, so use the same values for the enable &
  * status bits.
  */
+#define ASPEED_I2CD_INTR_ALL				0xf000ffff
 #define ASPEED_I2CD_INTR_SDA_DL_TIMEOUT			BIT(14)
 #define ASPEED_I2CD_INTR_BUS_RECOVER_DONE		BIT(13)
 #define ASPEED_I2CD_INTR_SLAVE_MATCH			BIT(7)
@@ -604,6 +605,7 @@ static irqreturn_t aspeed_i2c_bus_irq(int irq, void *dev_id)
 	writel(irq_received & ~ASPEED_I2CD_INTR_RX_DONE,
 	       bus->base + ASPEED_I2C_INTR_STS_REG);
 	readl(bus->base + ASPEED_I2C_INTR_STS_REG);
+	irq_received &= ASPEED_I2CD_INTR_ALL;
 	irq_remaining = irq_received;
 
 #if IS_ENABLED(CONFIG_I2C_SLAVE)
Signature · 1 line
2.26.2
#6 lore raw

Re: [PATCH v2 3/5] i2c: aspeed: Mask IRQ status to relevant bits

In reply to Eddie James
I love your patch! Perhaps something to improve:

Hi Eddie,

I love your patch! Perhaps something to improve:

[auto build test WARNING on joel-aspeed/for-next]
[also build test WARNING on wsa/i2c/for-next linus/master v5.9-rc4 next-20200908] [cannot apply to input/next]
[If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Eddie-James/input-misc-Add-IBM-Operation-Panel-driver/20200909-120637
base:   https://git.kernel.org/pub/scm/linux/kernel/git/joel/aspeed.git for-next
config: x86_64-randconfig-a016-20200909 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 8893d0816ccdf8998d2e21b5430e9d6abe7ef465)

reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64

If you fix the issue, kindly add following tag as appropriate

All warnings (new ones prefixed by >>):

>> drivers/i2c/busses/i2c-aspeed.c:88:9: warning: 'ASPEED_I2CD_INTR_ALL' macro redefined [-Wmacro-redefined]
   #define ASPEED_I2CD_INTR_ALL                                                   \
           ^
   drivers/i2c/busses/i2c-aspeed.c:72:9: note: previous definition is here
   #define ASPEED_I2CD_INTR_ALL                            0xf000ffff
           ^

1 warning generated.

# https://github.com/0day-ci/linux/commit/6d9e57527652ab1a348f68145e41e6a19d5dc0dc
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Eddie-James/input-misc-Add-IBM-Operation-Panel-driver/20200909-120637 git checkout 6d9e57527652ab1a348f68145e41e6a19d5dc0dc
vim +/ASPEED_I2CD_INTR_ALL +88 drivers/i2c/busses/i2c-aspeed.c

f327c686d3ba44e Brendan Higgins 2017-06-20  65  
f327c686d3ba44e Brendan Higgins 2017-06-20  66  /* 0x0c : I2CD Interrupt Control Register &
f327c686d3ba44e Brendan Higgins 2017-06-20  67   * 0x10 : I2CD Interrupt Status Register
f327c686d3ba44e Brendan Higgins 2017-06-20  68   *
f327c686d3ba44e Brendan Higgins 2017-06-20  69   * These share bit definitions, so use the same values for the enable &
f327c686d3ba44e Brendan Higgins 2017-06-20  70   * status bits.
f327c686d3ba44e Brendan Higgins 2017-06-20  71   */
6d9e57527652ab1 Eddie James     2020-09-08  72  #define ASPEED_I2CD_INTR_ALL				0xf000ffff
f327c686d3ba44e Brendan Higgins 2017-06-20  73  #define ASPEED_I2CD_INTR_SDA_DL_TIMEOUT			BIT(14)
f327c686d3ba44e Brendan Higgins 2017-06-20  74  #define ASPEED_I2CD_INTR_BUS_RECOVER_DONE		BIT(13)
f9eb91350bb20b3 Brendan Higgins 2017-06-20  75  #define ASPEED_I2CD_INTR_SLAVE_MATCH			BIT(7)
f327c686d3ba44e Brendan Higgins 2017-06-20  76  #define ASPEED_I2CD_INTR_SCL_TIMEOUT			BIT(6)
f327c686d3ba44e Brendan Higgins 2017-06-20  77  #define ASPEED_I2CD_INTR_ABNORMAL			BIT(5)
f327c686d3ba44e Brendan Higgins 2017-06-20  78  #define ASPEED_I2CD_INTR_NORMAL_STOP			BIT(4)
f327c686d3ba44e Brendan Higgins 2017-06-20  79  #define ASPEED_I2CD_INTR_ARBIT_LOSS			BIT(3)
f327c686d3ba44e Brendan Higgins 2017-06-20  80  #define ASPEED_I2CD_INTR_RX_DONE			BIT(2)
f327c686d3ba44e Brendan Higgins 2017-06-20  81  #define ASPEED_I2CD_INTR_TX_NAK				BIT(1)
f327c686d3ba44e Brendan Higgins 2017-06-20  82  #define ASPEED_I2CD_INTR_TX_ACK				BIT(0)
3e9efc3299dd78a Jae Hyun Yoo    2018-08-23  83  #define ASPEED_I2CD_INTR_MASTER_ERRORS					       \
3e9efc3299dd78a Jae Hyun Yoo    2018-08-23  84  		(ASPEED_I2CD_INTR_SDA_DL_TIMEOUT |			       \
3e9efc3299dd78a Jae Hyun Yoo    2018-08-23  85  		 ASPEED_I2CD_INTR_SCL_TIMEOUT |				       \
3e9efc3299dd78a Jae Hyun Yoo    2018-08-23  86  		 ASPEED_I2CD_INTR_ABNORMAL |				       \
3e9efc3299dd78a Jae Hyun Yoo    2018-08-23  87  		 ASPEED_I2CD_INTR_ARBIT_LOSS)
f327c686d3ba44e Brendan Higgins 2017-06-20 @88  #define ASPEED_I2CD_INTR_ALL						       \
f327c686d3ba44e Brendan Higgins 2017-06-20  89  		(ASPEED_I2CD_INTR_SDA_DL_TIMEOUT |			       \
f327c686d3ba44e Brendan Higgins 2017-06-20  90  		 ASPEED_I2CD_INTR_BUS_RECOVER_DONE |			       \
f327c686d3ba44e Brendan Higgins 2017-06-20  91  		 ASPEED_I2CD_INTR_SCL_TIMEOUT |				       \
f327c686d3ba44e Brendan Higgins 2017-06-20  92  		 ASPEED_I2CD_INTR_ABNORMAL |				       \
f327c686d3ba44e Brendan Higgins 2017-06-20  93  		 ASPEED_I2CD_INTR_NORMAL_STOP |				       \
f327c686d3ba44e Brendan Higgins 2017-06-20  94  		 ASPEED_I2CD_INTR_ARBIT_LOSS |				       \
f327c686d3ba44e Brendan Higgins 2017-06-20  95  		 ASPEED_I2CD_INTR_RX_DONE |				       \
f327c686d3ba44e Brendan Higgins 2017-06-20  96  		 ASPEED_I2CD_INTR_TX_NAK |				       \
f327c686d3ba44e Brendan Higgins 2017-06-20  97  		 ASPEED_I2CD_INTR_TX_ACK)

f327c686d3ba44e Brendan Higgins 2017-06-20 98

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all at lists.01.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 37048 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linux-aspeed/attachments/20200909/d07b9eff/attachment-0001.gz>

#7 lore raw

Re: [PATCH v2 3/5] i2c: aspeed: Mask IRQ status to relevant bits

In reply to Eddie James
I love your patch! Perhaps something to improve:

Hi Eddie,

I love your patch! Perhaps something to improve:

[auto build test WARNING on joel-aspeed/for-next]
[also build test WARNING on wsa/i2c/for-next linus/master v5.9-rc4 next-20200908] [cannot apply to input/next]
[If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Eddie-James/input-misc-Add-IBM-Operation-Panel-driver/20200909-120637
base:   https://git.kernel.org/pub/scm/linux/kernel/git/joel/aspeed.git for-next
config: h8300-randconfig-r016-20200909 (attached as .config)
compiler: h8300-linux-gcc (GCC) 9.3.0

reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=h8300

If you fix the issue, kindly add following tag as appropriate

All warnings (new ones prefixed by >>):

>> drivers/i2c/busses/i2c-aspeed.c:88: warning: "ASPEED_I2CD_INTR_ALL" redefined
      88 | #define ASPEED_I2CD_INTR_ALL             \
         | 
   drivers/i2c/busses/i2c-aspeed.c:72: note: this is the location of the previous definition
      72 | #define ASPEED_I2CD_INTR_ALL    0xf000ffff
         | 

# https://github.com/0day-ci/linux/commit/6d9e57527652ab1a348f68145e41e6a19d5dc0dc
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Eddie-James/input-misc-Add-IBM-Operation-Panel-driver/20200909-120637 git checkout 6d9e57527652ab1a348f68145e41e6a19d5dc0dc
vim +/ASPEED_I2CD_INTR_ALL +88 drivers/i2c/busses/i2c-aspeed.c

f327c686d3ba44e Brendan Higgins 2017-06-20  65  
f327c686d3ba44e Brendan Higgins 2017-06-20  66  /* 0x0c : I2CD Interrupt Control Register &
f327c686d3ba44e Brendan Higgins 2017-06-20  67   * 0x10 : I2CD Interrupt Status Register
f327c686d3ba44e Brendan Higgins 2017-06-20  68   *
f327c686d3ba44e Brendan Higgins 2017-06-20  69   * These share bit definitions, so use the same values for the enable &
f327c686d3ba44e Brendan Higgins 2017-06-20  70   * status bits.
f327c686d3ba44e Brendan Higgins 2017-06-20  71   */
6d9e57527652ab1 Eddie James     2020-09-08  72  #define ASPEED_I2CD_INTR_ALL				0xf000ffff
f327c686d3ba44e Brendan Higgins 2017-06-20  73  #define ASPEED_I2CD_INTR_SDA_DL_TIMEOUT			BIT(14)
f327c686d3ba44e Brendan Higgins 2017-06-20  74  #define ASPEED_I2CD_INTR_BUS_RECOVER_DONE		BIT(13)
f9eb91350bb20b3 Brendan Higgins 2017-06-20  75  #define ASPEED_I2CD_INTR_SLAVE_MATCH			BIT(7)
f327c686d3ba44e Brendan Higgins 2017-06-20  76  #define ASPEED_I2CD_INTR_SCL_TIMEOUT			BIT(6)
f327c686d3ba44e Brendan Higgins 2017-06-20  77  #define ASPEED_I2CD_INTR_ABNORMAL			BIT(5)
f327c686d3ba44e Brendan Higgins 2017-06-20  78  #define ASPEED_I2CD_INTR_NORMAL_STOP			BIT(4)
f327c686d3ba44e Brendan Higgins 2017-06-20  79  #define ASPEED_I2CD_INTR_ARBIT_LOSS			BIT(3)
f327c686d3ba44e Brendan Higgins 2017-06-20  80  #define ASPEED_I2CD_INTR_RX_DONE			BIT(2)
f327c686d3ba44e Brendan Higgins 2017-06-20  81  #define ASPEED_I2CD_INTR_TX_NAK				BIT(1)
f327c686d3ba44e Brendan Higgins 2017-06-20  82  #define ASPEED_I2CD_INTR_TX_ACK				BIT(0)
3e9efc3299dd78a Jae Hyun Yoo    2018-08-23  83  #define ASPEED_I2CD_INTR_MASTER_ERRORS					       \
3e9efc3299dd78a Jae Hyun Yoo    2018-08-23  84  		(ASPEED_I2CD_INTR_SDA_DL_TIMEOUT |			       \
3e9efc3299dd78a Jae Hyun Yoo    2018-08-23  85  		 ASPEED_I2CD_INTR_SCL_TIMEOUT |				       \
3e9efc3299dd78a Jae Hyun Yoo    2018-08-23  86  		 ASPEED_I2CD_INTR_ABNORMAL |				       \
3e9efc3299dd78a Jae Hyun Yoo    2018-08-23  87  		 ASPEED_I2CD_INTR_ARBIT_LOSS)
f327c686d3ba44e Brendan Higgins 2017-06-20 @88  #define ASPEED_I2CD_INTR_ALL						       \
f327c686d3ba44e Brendan Higgins 2017-06-20  89  		(ASPEED_I2CD_INTR_SDA_DL_TIMEOUT |			       \
f327c686d3ba44e Brendan Higgins 2017-06-20  90  		 ASPEED_I2CD_INTR_BUS_RECOVER_DONE |			       \
f327c686d3ba44e Brendan Higgins 2017-06-20  91  		 ASPEED_I2CD_INTR_SCL_TIMEOUT |				       \
f327c686d3ba44e Brendan Higgins 2017-06-20  92  		 ASPEED_I2CD_INTR_ABNORMAL |				       \
f327c686d3ba44e Brendan Higgins 2017-06-20  93  		 ASPEED_I2CD_INTR_NORMAL_STOP |				       \
f327c686d3ba44e Brendan Higgins 2017-06-20  94  		 ASPEED_I2CD_INTR_ARBIT_LOSS |				       \
f327c686d3ba44e Brendan Higgins 2017-06-20  95  		 ASPEED_I2CD_INTR_RX_DONE |				       \
f327c686d3ba44e Brendan Higgins 2017-06-20  96  		 ASPEED_I2CD_INTR_TX_NAK |				       \
f327c686d3ba44e Brendan Higgins 2017-06-20  97  		 ASPEED_I2CD_INTR_TX_ACK)

f327c686d3ba44e Brendan Higgins 2017-06-20 98

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all at lists.01.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 29190 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linux-aspeed/attachments/20200909/fe12b971/attachment-0001.gz>

author maintainer
#8 lore raw

PATCH v2 4/5 ARM: dts: Aspeed: Tacoma: Add IBM Operation Panel I2C device

In reply to Eddie James

Set I2C bus 0 to multi-master mode and add the panel device that will register as a slave.

---
 arch/arm/boot/dts/aspeed-bmc-opp-tacoma.dts | 7 +++++++
 1 file changed, 7 insertions(+)
arch/arm/boot/dts/aspeed-bmc-opp-tacoma.dts +7 -0
index 5f4ee67ac787..4d070d6ba09f 100644
@@ -4,6 +4,7 @@
 
 #include "aspeed-g6.dtsi"
 #include <dt-bindings/gpio/aspeed-gpio.h>
+#include <dt-bindings/i2c/i2c.h>
 #include <dt-bindings/leds/leds-pca955x.h>
 
 / {
@@ -438,7 +439,13 @@ aliases {
 };
 
 &i2c0 {
+	multi-master;
 	status = "okay";
+
+	ibm-panel at 62 {
+		compatible = "ibm,op-panel";
+		reg = <(0x62 | I2C_OWN_SLAVE_ADDRESS)>;
+	};
 };
 
 &i2c1 {
Signature · 1 line
2.26.2
maintainer
#9 lore raw

Re: [PATCH v2 4/5] ARM: dts: Aspeed: Tacoma: Add IBM Operation Panel I2C device

Quoted 6 lines · Eddie James

Set I2C bus 0 to multi-master mode and add the panel device that will register as a slave.

I will take this and the rainier dts patch through the aspeed tree so we don't get conflicts.

Eddie, when you send v3, you can omit them.

Cheers,

Joel

Quoted 33 lines
---
 arch/arm/boot/dts/aspeed-bmc-opp-tacoma.dts | 7 +++++++
 1 file changed, 7 insertions(+)
arch/arm/boot/dts/aspeed-bmc-opp-tacoma.dts +7 -1
index 5f4ee67ac787..4d070d6ba09f 100644
@@ -4,6 +4,7 @@
 
 #include "aspeed-g6.dtsi"
 #include <dt-bindings/gpio/aspeed-gpio.h>
+#include <dt-bindings/i2c/i2c.h>
 #include <dt-bindings/leds/leds-pca955x.h>
 
 / {
@@ -438,7 +439,13 @@ aliases {
 };
 
 &i2c0 {
+       multi-master;
        status = "okay";
+
+       ibm-panel at 62 {
+               compatible = "ibm,op-panel";
+               reg = <(0x62 | I2C_OWN_SLAVE_ADDRESS)>;
+       };
 };
 
 &i2c1 {
--

2.26.2

author maintainer
#10 lore raw

PATCH v2 5/5 ARM: dts: Aspeed: Rainier: Add IBM Operation Panel I2C device

In reply to Eddie James

Set I2C bus 7 to multi-master mode and add the panel device that will register as a slave.

---
 arch/arm/boot/dts/aspeed-bmc-ibm-rainier.dts | 7 +++++++
 1 file changed, 7 insertions(+)
arch/arm/boot/dts/aspeed-bmc-ibm-rainier.dts +7 -0
index b94421f6cbd5..50d528444f5d 100644
@@ -4,6 +4,7 @@
 
 #include "aspeed-g6.dtsi"
 #include <dt-bindings/gpio/aspeed-gpio.h>
+#include <dt-bindings/i2c/i2c.h>
 #include <dt-bindings/leds/leds-pca955x.h>
 
 / {
@@ -698,6 +699,7 @@ eeprom at 53 {
 };
 
 &i2c7 {
+	multi-master;
 	status = "okay";
 
 	si7021-a20 at 20 {
@@ -831,6 +833,11 @@ gpio at 15 {
 		};
 	};
 
+	ibm-panel at 62 {
+		compatible = "ibm,op-panel";
+		reg = <(0x62 | I2C_OWN_SLAVE_ADDRESS)>;
+	};
+
 	dps: dps310 at 76 {
 		compatible = "infineon,dps310";
 		reg = <0x76>;
Signature · 1 line
2.26.2