From patchwork Wed Jun 19 15:49:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kanak Shilledar X-Patchwork-Id: 13704212 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 412B1C27C53 for ; Wed, 19 Jun 2024 15:50:46 +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=zd7wiy/VlVLvBtVtiqflRbF+ChuoP1J0JG+G7pVlywY=; b=KS0fg5UmxIjJpm0UjCWYHseBER uppzQOvjGdO4mrp+lUTboiBt4YPZguxRSlyMCHipsVB11HQr5a/7dYhIvJk9XK+XRLDHqRikfHjhz jlslWv0Zu1VWoulrF22g+BDzqeMqbdisTb6jv9DFb6G4Rg0ErpPVxJuewKNV7H/eAY2JIXXp3NzL3 OoIZoAs2OM1S9Za+Dnvkb5FMFHPVoW4FVHLzDYLjFftY8p3HcHEztVTqO8KFXDHK0I3wOz7vT9phB HiP4KHf9ryChzFB6POHqEr/AY5Uk3S5oE3ZUxiDqC+xfSomIONvhvtm1cUt0gh1fgMMoogL+ZTZgP GBAO9ueA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sJxZy-00000001u3y-2njQ; Wed, 19 Jun 2024 15:50:34 +0000 Received: from mail-pf1-x431.google.com ([2607:f8b0:4864:20::431]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sJxZw-00000001u2u-1BL3 for linux-arm-kernel@lists.infradead.org; Wed, 19 Jun 2024 15:50:33 +0000 Received: by mail-pf1-x431.google.com with SMTP id d2e1a72fcca58-7062bf8bb75so781b3a.0 for ; Wed, 19 Jun 2024 08:50:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1718812230; x=1719417030; 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=zd7wiy/VlVLvBtVtiqflRbF+ChuoP1J0JG+G7pVlywY=; b=kimVvnAIhWu7LULPlwLvQGSAY7VM0LPq4YzIJBKiochBiiQkYdmd3Xx7tkwAdtulkL aMcFgyjEtBHBXLFmPTPzvUJ9l4n/xB4zWAJdP+BehguixJAYM1UCB4jc6FCqrFEN7+r3 F3b7Zyd8rA1xEnueYHyCCcxq23NBx1yXW43JgmKspj1rNJQB3n7SRzz8lBcwo8xw2i80 GNLrBjZ9GYfct5r0lmZ2NaaOIRFHjRGk2sIRaX5gbTmMTHMZ+j8KmvLn/M4UwRpPxkin ALtBinkJ02PHiW2jKaKgDwP/X6N0iDbvsFiSqEJhy/9Useu10LyxqFqWjI0t1rm/3JRC STqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718812230; x=1719417030; 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=zd7wiy/VlVLvBtVtiqflRbF+ChuoP1J0JG+G7pVlywY=; b=Mh/mzmGMWen+2FD7iXpp2DIaL+YVIoLyXEWeVpyhT4cKF78LygSi57e84e6cqBLJMF PzOU9P2cVvo4DFzRl//DLU2wX/cZ5qBfD3utZTSH+OfqJOtMGSbsEE5ecgvI1iWpi55R T69tgvLlFdbJ8WBQtHPaBzk7uvukwvk+GmlrdmZ0vlSJSBT2vyqJeL4OrkYx4YiF/e07 yrCWkSxT+JF7U/I+ArcU9Y9FQcQnaUaDSXs+VXhVRpumrikLW0RwD2/Pa+7e/tHgQGdq 3CIK+8ux+gGx1zIT2KH39NaD1htqUZ6az9pZsVxY9vzm/9erd+ysLU3DF4w5h3FGS6M+ 7XBg== X-Forwarded-Encrypted: i=1; AJvYcCUYIHt9cY44SFfibAkPz+8+KWoDV29y7xmL3dS58i3V0/qz4nFdGr6vIFw3iDOcauXx6QZxL97xpibBktMJhAyddtckD2sfU7UYnoiwK3tkiEe5tW0= X-Gm-Message-State: AOJu0YzBUQS+1PRMR3gghujZnIBAMKdqnJNLMW8x6CGb8MKOTq7Wm4fk E+FmNbT+gfj38Ucrkjnx4mURw816HYBlGUE/ONOXNSuh5DlnFYjLmb8zOw== X-Google-Smtp-Source: AGHT+IF5kuW0M2dM/4GTa3QjwDZqbi4zHzmHnRmjAa5S++TiLw7FT1gdA2uZD4U2FAbY0OsBzKcPdQ== X-Received: by 2002:a05:6a00:2a6:b0:704:34a0:96c9 with SMTP id d2e1a72fcca58-70629cf6a33mr2553824b3a.30.1718812230417; Wed, 19 Jun 2024 08:50:30 -0700 (PDT) Received: from ga401ii.. ([2401:4900:1cc8:6da5:5a28:6118:91d6:c407]) by smtp.googlemail.com with ESMTPSA id d2e1a72fcca58-705ccb3cdc6sm10813934b3a.138.2024.06.19.08.50.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Jun 2024 08:50:29 -0700 (PDT) From: Kanak Shilledar To: Cc: Kanak Shilledar , Vladimir Zapolskiy , Andi Shyti , Rob Herring , Krzysztof Kozlowski , Conor Dooley , linux-arm-kernel@lists.infradead.org, linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] dt-bindings: i2c: convert to dt schema Date: Wed, 19 Jun 2024 21:19:36 +0530 Message-ID: <20240619154941.144011-2-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-20240619_085032_344183_0BA53161 X-CRM114-Status: GOOD ( 18.90 ) 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. Signed-off-by: Kanak Shilledar --- .../devicetree/bindings/i2c/i2c-lpc2k.txt | 33 ---------- .../bindings/i2c/nxp,lpc1788-i2c.yaml | 66 +++++++++++++++++++ 2 files changed, 66 insertions(+), 33 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..79d6774dd54f --- /dev/null +++ b/Documentation/devicetree/bindings/i2c/nxp,lpc1788-i2c.yaml @@ -0,0 +1,66 @@ +# 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: + description: physical address and length of the device registers + maxItems: 1 + + interrupts: + description: a single interrupt specifier + maxItems: 1 + + clocks: + description: clock for the device + maxItems: 1 + + clock-frequency: + description: the desired I2C bus clock frequency in Hz + default: 100000 + + resets: + description: reset for the device + maxItems: 1 + + '#address-cells': + const: 1 + + '#size-cells': + const: 0 + +required: + - compatible + - reg + - interrupts + - clocks + - "#address-cells" + - "#size-cells" + +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>; + };