From patchwork Tue Jun 25 06:59:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kanak Shilledar X-Patchwork-Id: 13710691 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A7E9AC30653 for ; Tue, 25 Jun 2024 07:00:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=bw+JuciPmVPvxL173XrvRPex6ZJzB6ISGkebILK54mY=; b=lndpj3xsnyDB25KOLyiHzbkYnW 2kSXQaK88x/vpjacBS2U/yP+dodCRSNiFk8AQi8S6sR7IWhuB0GBB3xrSL/2Be1fSkPbJ80H/urCT mWq5Xh25nya2sfmuhIES41xwSaVNrEm/0dLu8GAViSMFB76kNuB7wxSxsk1XR9nlEiCRd2tkv8r7z GdB5DCxxTq5ia1lw5ODK2QtkeIn/P8/w+m0BXxvgcrRfAGxssHD29Wo0izpWhXGJX7iV/XLkbffs+ 4wwx3Q2WTZkT93gkcGZnOLpHjDrDiO8LvsiT0dL8Ghj4rUk9VMGrMhKKoZopo8mzIS2rdHk7ET6Ze ffU1r7XA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sM09p-00000001rWd-0HAU; Tue, 25 Jun 2024 07:00:01 +0000 Received: from mail-pl1-x631.google.com ([2607:f8b0:4864:20::631]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sM09j-00000001rVj-1PZq for linux-arm-kernel@lists.infradead.org; Tue, 25 Jun 2024 06:59:56 +0000 Received: by mail-pl1-x631.google.com with SMTP id d9443c01a7336-1f9a78c6c5dso40652875ad.1 for ; Mon, 24 Jun 2024 23:59:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719298792; x=1719903592; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=bw+JuciPmVPvxL173XrvRPex6ZJzB6ISGkebILK54mY=; b=m6kZlLffhRIJEbXmfSS94M7ZaAfMaM8PqjVDecEJIinV50ZIVNM6vmVuopmj3PW/0B XOp9f1XNmpmQvrfhZW0qoBIQBeZydqEar27GlLIvABAlCY4v+8sh6dzjCGf+JdWAvjLx W9IETwSCF2Mq05lxcfHuxsRPjqyxtLdmhvrqTUR89U0G2Egxq5L7ez4ZUrWXLOLthacX h7QMQ9fcTbvvg8fXh7rH9Y8kC2dofjPYfYpJMSrb3TflrcXfqk9RttdDSbYfxX3aUALj 25Ff/9bzvjK56zYcRyj+0tV1r9aCQbAftDwtcmTupazuJY8ZmRh7TJr478qg5Dr5YZ+x OEQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719298792; x=1719903592; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=bw+JuciPmVPvxL173XrvRPex6ZJzB6ISGkebILK54mY=; b=nLkOrD+N/jW4BwcNBIm9JjijBJ/PcbJbT3N8R6XOrTa1duQwnOIFAvKRL8lMMpCyZX ROEOD5P4jvoRVZUZnZu+e7CLvWyS0sm+U2a4ApyQ4Y2lLqeANn2L/u2s5zIE17Sp7/aY 3GFvfv5woz1tLZ1wcyDJkiFuzm2W9nDdOBUSAihB6dyBAACHPzPdAotOgxHZZGSq8jmc TFusa+aR25bIGPkoEw1E1FEBw6hpQ/H8yEU9VONwwbVBaNUh9+aTy8KuncRVZi29cZvO J5Dhn20XM3/csi8R1KA8Jvyz7KCDL/1v5HDlcllq3uyHs9uPeVzgPOB+Bn3WwRGXHvNS VslA== X-Forwarded-Encrypted: i=1; AJvYcCUP2FBvNcCdePC973Rmta5HbgJI7mlXIOHJwyzZ1JL2JSMd+1AVxHvMwjwq1v4OvpsCULRvyv6yNOgT1yO3g/fxRV5k4E5Z/5Ixjd/CdDANIMzcSPM= X-Gm-Message-State: AOJu0YwjEHO6hMKWVbi4i6k1Be8x99aYgpMWj+IR8aATbycLXJIshWFG e5WpU9bKVFHcpd1UyZWVAHYBibhfWJEKmhpoETmbZN1ANgAP87+L X-Google-Smtp-Source: AGHT+IG6L8tRjyFldqQM5owIqKHxJ6YI3PpEsCoaVkIWstg5l1QolFRdaUa+/mFWitIadxYiqj94TQ== X-Received: by 2002:a17:902:c943:b0:1f9:f6e6:5ace with SMTP id d9443c01a7336-1fa23f159cemr76844995ad.48.1719298791618; Mon, 24 Jun 2024 23:59:51 -0700 (PDT) Received: from ga401ii.SRMIST.EDU.IN ([14.96.13.220]) by smtp.googlemail.com with ESMTPSA id d9443c01a7336-1f9eb2f0318sm74041615ad.2.2024.06.24.23.59.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jun 2024 23:59:51 -0700 (PDT) From: Kanak Shilledar To: Cc: Kanak Shilledar , Krzysztof Kozlowski , Andi Shyti , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Vladimir Zapolskiy , linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v3] dt-bindings: i2c: nxp,lpc1788-i2c: convert to dt schema Date: Tue, 25 Jun 2024 12:29:32 +0530 Message-ID: <20240625065939.6146-1-kanakshilledar@gmail.com> X-Mailer: git-send-email 2.45.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240624_235955_488278_4532C31D X-CRM114-Status: GOOD ( 20.65 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Convert the NXP I2C controller for LPC2xxx/178x/18xx/43xx to newer DT schema. Created DT schema based on the .txt file which had `compatible`, `reg`, `interrupts`, `clocks`, `#address-cells` and `#size-cells` as required properties. Additional changes to the original .txt binding - added maintainer from the MAINTAINERS file. - added resets property required by the corresponding DTS files. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Kanak Shilledar --- Changes in v3: - removed "address-cells" and "size-cells" as per feedback. Changes in v2: - updated subject line to include device name. - changed removed description from properties except `clock-frequency`. - updated MAINTAINERS to track this file. --- .../devicetree/bindings/i2c/i2c-lpc2k.txt | 33 ------------ .../bindings/i2c/nxp,lpc1788-i2c.yaml | 54 +++++++++++++++++++ MAINTAINERS | 2 +- 3 files changed, 55 insertions(+), 34 deletions(-) delete mode 100644 Documentation/devicetree/bindings/i2c/i2c-lpc2k.txt create mode 100644 Documentation/devicetree/bindings/i2c/nxp,lpc1788-i2c.yaml diff --git a/Documentation/devicetree/bindings/i2c/i2c-lpc2k.txt b/Documentation/devicetree/bindings/i2c/i2c-lpc2k.txt deleted file mode 100644 index 4101aa621ad4..000000000000 --- a/Documentation/devicetree/bindings/i2c/i2c-lpc2k.txt +++ /dev/null @@ -1,33 +0,0 @@ -NXP I2C controller for LPC2xxx/178x/18xx/43xx - -Required properties: - - compatible: must be "nxp,lpc1788-i2c" - - reg: physical address and length of the device registers - - interrupts: a single interrupt specifier - - clocks: clock for the device - - #address-cells: should be <1> - - #size-cells: should be <0> - -Optional properties: -- clock-frequency: the desired I2C bus clock frequency in Hz; in - absence of this property the default value is used (100 kHz). - -Example: -i2c0: i2c@400a1000 { - compatible = "nxp,lpc1788-i2c"; - reg = <0x400a1000 0x1000>; - interrupts = <18>; - clocks = <&ccu1 CLK_APB1_I2C0>; - #address-cells = <1>; - #size-cells = <0>; -}; - -&i2c0 { - clock-frequency = <400000>; - - lm75@48 { - compatible = "nxp,lm75"; - reg = <0x48>; - }; -}; - diff --git a/Documentation/devicetree/bindings/i2c/nxp,lpc1788-i2c.yaml b/Documentation/devicetree/bindings/i2c/nxp,lpc1788-i2c.yaml new file mode 100644 index 000000000000..9a1b95c2d03c --- /dev/null +++ b/Documentation/devicetree/bindings/i2c/nxp,lpc1788-i2c.yaml @@ -0,0 +1,54 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/i2c/nxp,lpc1788-i2c.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: NXP I2C controller for LPC2xxx/178x/18xx/43xx + +maintainers: + - Vladimir Zapolskiy + +allOf: + - $ref: /schemas/i2c/i2c-controller.yaml# + +properties: + compatible: + const: nxp,lpc1788-i2c + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + clocks: + maxItems: 1 + + clock-frequency: + description: the desired I2C bus clock frequency in Hz + default: 100000 + + resets: + maxItems: 1 + +required: + - compatible + - reg + - interrupts + - clocks + +unevaluatedProperties: false + +examples: + - | + #include "dt-bindings/clock/lpc18xx-ccu.h" + + i2c@400a1000 { + compatible = "nxp,lpc1788-i2c"; + reg = <0x400a1000 0x1000>; + interrupts = <18>; + clocks = <&ccu1 CLK_APB1_I2C0>; + #address-cells = <1>; + #size-cells = <0>; + }; diff --git a/MAINTAINERS b/MAINTAINERS index cf9c9221c388..920e4f28b5ae 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2374,7 +2374,7 @@ ARM/LPC18XX ARCHITECTURE M: Vladimir Zapolskiy L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) S: Maintained -F: Documentation/devicetree/bindings/i2c/i2c-lpc2k.txt +F: Documentation/devicetree/bindings/i2c/nxp,lpc1788-i2c.yaml F: arch/arm/boot/dts/nxp/lpc/lpc43* F: drivers/i2c/busses/i2c-lpc2k.c F: drivers/memory/pl172.c