From patchwork Thu May 28 09:33:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Serge Semin X-Patchwork-Id: 11575401 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5B72013B4 for ; Thu, 28 May 2020 09:34:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4A091214D8 for ; Thu, 28 May 2020 09:34:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387408AbgE1Jdd (ORCPT ); Thu, 28 May 2020 05:33:33 -0400 Received: from mail.baikalelectronics.com ([87.245.175.226]:40510 "EHLO mail.baikalelectronics.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728224AbgE1Jdc (ORCPT ); Thu, 28 May 2020 05:33:32 -0400 Received: from localhost (unknown [127.0.0.1]) by mail.baikalelectronics.ru (Postfix) with ESMTP id D0A5180307C7; Thu, 28 May 2020 09:33:29 +0000 (UTC) X-Virus-Scanned: amavisd-new at baikalelectronics.ru Received: from mail.baikalelectronics.ru ([127.0.0.1]) by localhost (mail.baikalelectronics.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id D73ABvCPvBA9; Thu, 28 May 2020 12:33:29 +0300 (MSK) From: Serge Semin To: Jarkko Nikula , Wolfram Sang , Rob Herring CC: Serge Semin , Serge Semin , Alexey Malahov , Thomas Bogendoerfer , Andy Shevchenko , Mika Westerberg , , , , Subject: [PATCH v6 02/11] dt-bindings: i2c: Convert DW I2C slave to the DW I2C master example Date: Thu, 28 May 2020 12:33:12 +0300 Message-ID: <20200528093322.23553-3-Sergey.Semin@baikalelectronics.ru> In-Reply-To: <20200528093322.23553-1-Sergey.Semin@baikalelectronics.ru> References: <20200528093322.23553-1-Sergey.Semin@baikalelectronics.ru> MIME-Version: 1.0 X-ClientProxiedBy: MAIL.baikal.int (192.168.51.25) To mail (192.168.51.25) Sender: linux-mips-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org dtc currently doesn't support I2C_OWN_SLAVE_ADDRESS flag set in the i2c "reg" property. If dtc finds an i2c-slave sub-node having an address higher than ten-bits wide it'll print an ugly warning: Warning (i2c_bus_reg): /example-2/i2c@1120000/eeprom@64: I2C bus unit address format error, expected "40000064" Warning (i2c_bus_reg): /example-2/i2c@1120000/eeprom@64:reg: I2C address must be less than 10-bits, got "0x40000064" In order to silence dtc up let's replace the corresponding DT binding example with a normal DW I2C master mode-based one. It's done by clearing the I2C_OWN_SLAVE_ADDRESS bit in the reg property and converting the sub-node to be compatible with normal EEPROM like "atmel,24c02". Just revert this commit when dtc is fixed. Signed-off-by: Serge Semin Cc: Alexey Malahov Cc: Thomas Bogendoerfer Cc: Andy Shevchenko Cc: Mika Westerberg Cc: linux-mips@vger.kernel.org Reviewed-by: Rob Herring --- Rob, even though you asked for such modification, it might be a better to just ignore the warning until dtc is properly fixed. Andy and me agree with that. If you are also on the same side with us, just explicitly nack this patch so Jarkko or Wolfram would ignore it when merging in the series. Changelog v3: - This is a new patch created as a result of the Rob request to remove the EEPROM-slave bit setting in the DT binndings example until the dtc is fixed. Changelog v6: - Replace the "linux,slave-24c02" compatible string with "atmel,24c02" one so the example would be perceived as a normal DW I2C master mode. --- .../devicetree/bindings/i2c/snps,designware-i2c.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/i2c/snps,designware-i2c.yaml b/Documentation/devicetree/bindings/i2c/snps,designware-i2c.yaml index 4bd430b2b41d..dff3f267bdee 100644 --- a/Documentation/devicetree/bindings/i2c/snps,designware-i2c.yaml +++ b/Documentation/devicetree/bindings/i2c/snps,designware-i2c.yaml @@ -136,8 +136,8 @@ examples: interrupts = <0>; eeprom@64 { - compatible = "linux,slave-24c02"; - reg = <0x40000064>; + compatible = "atmel,24c02"; + reg = <0x64>; }; }; - |