From patchwork Sat Apr 22 18:06:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanislav Jakubek X-Patchwork-Id: 676364 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EB54DC6FD18 for ; Sat, 22 Apr 2023 18:07:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229556AbjDVSHE (ORCPT ); Sat, 22 Apr 2023 14:07:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46640 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229510AbjDVSHD (ORCPT ); Sat, 22 Apr 2023 14:07:03 -0400 Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B4B6C19B; Sat, 22 Apr 2023 11:07:01 -0700 (PDT) Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-2febac9cacdso1719144f8f.1; Sat, 22 Apr 2023 11:07:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682186818; x=1684778818; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=S+ZAi4MB2iglmobNNPKpLNUvG+fr9DuzoLdnk3gLDW0=; b=eEiInu1JXd0HVKLPJ+IYQmIZSbHZsi/HXtnF+nCYyABJJ+8g96NfpkWyK8wTtVdPwF JkU++tJq4aRInbTihKDkcTGpGd0uRm4YNWB8gzGOjUTSJv0lSlFcZ/rYS0pHi9aMn/SM QhFOeu21JLESA+uXcjNV93Fro8BP2rXWTadCqnuEnw1aRW+NFW/HQLOkga4iHehRQNz0 wjVYPPdwXw5ATClKpWa5oDmuy2GIUecTeu+iGVXrgTIGQdfMGbWdINFumH5FmiIk2CF8 d9Z66F5+RfP8jG9TtJSwpLKPja7KNb0dVJRYqjWkXUFAyOCl2ffYbct8+yxm+DI6bMUN aouQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682186818; x=1684778818; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=S+ZAi4MB2iglmobNNPKpLNUvG+fr9DuzoLdnk3gLDW0=; b=ERBqrI1zP8bnyh4H8yaca+EbQ+ia1BLQoHeY/Ri1d0Hwi2HtzFIf0oMpSOesIHHEgK 3bofpk72MWQvDyv08v7pgm3na0lnlsGa0zv3rG31+8WHycKQBlGfSv2VhtFb8BqJW7Hw uTcnMDh4j14luUKAH9DtrnQP6aa47eAZElp2QhwEa0XHIm5FDcabBToGwNPbF5XxzkeG DBGG0+CcHhPaYrrmLWx/mKPTtkr+oFFeWaPyB8ypuVtITQ4JTqM/GQgsDeYpmnfCfYc7 cy5x10Skbq6iHtnl06l5g3u2RQ2NRwXnUPg9YdHxJA8pS4LkvI64jRL0k29VWFht1v+g PWjg== X-Gm-Message-State: AAQBX9cYyojg1+B0tmWE7QxcpLAnfhvcvxKPOj4/dZfqXJI2r95F54FL SY+I31+j5IcbpkHyNhsBL7M= X-Google-Smtp-Source: AKy350YsabFQpa76t44sd7bC+cmvABmHWtla6OM6vDd5rGqx3sfSVw9yneNqhVjpnbPxSLHgKLDdMA== X-Received: by 2002:adf:db0d:0:b0:2ce:a30d:f764 with SMTP id s13-20020adfdb0d000000b002cea30df764mr6190607wri.21.1682186818233; Sat, 22 Apr 2023 11:06:58 -0700 (PDT) Received: from standask-GA-A55M-S2HP ([188.123.113.247]) by smtp.gmail.com with ESMTPSA id f17-20020a5d58f1000000b002cea8e3bd54sm6967777wrd.53.2023.04.22.11.06.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 22 Apr 2023 11:06:57 -0700 (PDT) Date: Sat, 22 Apr 2023 20:06:56 +0200 From: Stanislav Jakubek To: Rob Herring , Krzysztof Kozlowski , Florian Fainelli , Ray Jui , Scott Branden Cc: bcm-kernel-feedback-list@broadcom.com, linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] ARM: dts: bcm23550: Add SoC-specific I2C compatible Message-ID: <9875ec0211187e4f5e2a4379c63eacdb69b31d7a.1682185969.git.stano.jakubek@gmail.com> MIME-Version: 1.0 Content-Disposition: inline Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add BCM23550-specific compatible for brcm,kona-i2c nodes. While not currently used by the i2c-bcm-kona driver, they can serve for further customization, if required. Done in preparation for dt-binding coversion to DT schema. Signed-off-by: Stanislav Jakubek --- arch/arm/boot/dts/bcm23550.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm/boot/dts/bcm23550.dtsi b/arch/arm/boot/dts/bcm23550.dtsi index a36c9b1d23c8..32b244b8546c 100644 --- a/arch/arm/boot/dts/bcm23550.dtsi +++ b/arch/arm/boot/dts/bcm23550.dtsi @@ -159,7 +159,7 @@ uartb3: serial@2000 { }; bsc1: i2c@16000 { - compatible = "brcm,kona-i2c"; + compatible = "brcm,bcm23550-i2c", "brcm,kona-i2c"; reg = <0x00016000 0x70>; interrupts = ; #address-cells = <1>; @@ -169,7 +169,7 @@ bsc1: i2c@16000 { }; bsc2: i2c@17000 { - compatible = "brcm,kona-i2c"; + compatible = "brcm,bcm23550-i2c", "brcm,kona-i2c"; reg = <0x00017000 0x70>; interrupts = ; #address-cells = <1>; @@ -179,7 +179,7 @@ bsc2: i2c@17000 { }; bsc3: i2c@18000 { - compatible = "brcm,kona-i2c"; + compatible = "brcm,bcm23550-i2c", "brcm,kona-i2c"; reg = <0x00018000 0x70>; interrupts = ; #address-cells = <1>; @@ -189,7 +189,7 @@ bsc3: i2c@18000 { }; bsc4: i2c@1c000 { - compatible = "brcm,kona-i2c"; + compatible = "brcm,bcm23550-i2c", "brcm,kona-i2c"; reg = <0x0001c000 0x70>; interrupts = ; #address-cells = <1>; From patchwork Sat Apr 22 18:07:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanislav Jakubek X-Patchwork-Id: 676224 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1AC74C77B78 for ; Sat, 22 Apr 2023 18:07:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229751AbjDVSHn (ORCPT ); Sat, 22 Apr 2023 14:07:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47348 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229587AbjDVSHm (ORCPT ); Sat, 22 Apr 2023 14:07:42 -0400 Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4944519B; Sat, 22 Apr 2023 11:07:41 -0700 (PDT) Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-3f1957e80a2so38092875e9.1; Sat, 22 Apr 2023 11:07:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682186860; x=1684778860; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=cMC/WYCs+O5/GQ2fJfJkDG2YCTzb8/HxNIUvGlcuZ8Q=; b=OP4aDpB4OVKsFekT46euDox7xTbn1SprnPwhlkqr/E4JouEOqXnRTqPt3YIi7ySrWZ SetHDFRSYbCSveXqbDA5QxISnlH0VkJoHYXFBPC4GAQm2FJgkcw6vJNC9mb9bwd2A/om byMRO2F0m/ELzc9H0YTYVPT6PCZQwm8gfmEhZ/ACyqsXn8oC/G5giAVw7GGmvIBUiGV3 epmtmR8+yWW+cR6slIEFCJGn8ptmBO4wU7ovlX4lehSBUGUW6/GRlzm5bft68olQdKnp JykGPx6UyFCb+tV7dATBu1Ai98bWnl9CkfKNHiFmOuRqqIJxgERnCPlrD7Tt0wq1+TAe 42Ww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682186860; x=1684778860; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=cMC/WYCs+O5/GQ2fJfJkDG2YCTzb8/HxNIUvGlcuZ8Q=; b=AdVifp/I8HzcxHPq5H3jY88ncbcez36iGGF8Gj25n0O7qriU1OKzcit9dSPH5efPmC r120/IzQ0ZCUYQu7X8Fmv3gsrrlW64ZwrUEedWFmNnTYf63uIqk2x6D5ETcgUpZL6UbI yt6KEJwGWFtAg5/H0Hm9cfqsjIGfPVYLC7GMaTfJDz3wPm11UzfTDMkVXvfKboJ3OBSp nr2mAQLVfnxzM6BxfkFFPN43hPSdMi7pVa8yCU86L8Xo1PviLIy8E5DBHcyZLqZ2m9BD FVEIqYPuAfWwn+ij5DQWz4uqRbVpFBYWbFj0M8TA75AxdBm9CkgAxpnuX7kJz+IaOmcb 3COw== X-Gm-Message-State: AAQBX9cb+odrlmUvonPTzkkXhs7R8Ynzw0LZtQDkvpIBsFRiOco1Pcuh xNhKMBS4NLUfYR/k2fGrHDs= X-Google-Smtp-Source: AKy350br6PiT/AI7TGKfMADqaYGNrJ/6KKXZphHdYJRhn3yTL6zhwv5Vy7FMR5CffeNlA/KNhUZObA== X-Received: by 2002:a05:600c:3b8e:b0:3f1:754e:69e6 with SMTP id n14-20020a05600c3b8e00b003f1754e69e6mr4256718wms.17.1682186859784; Sat, 22 Apr 2023 11:07:39 -0700 (PDT) Received: from standask-GA-A55M-S2HP ([188.123.113.247]) by smtp.gmail.com with ESMTPSA id q17-20020a1cf311000000b003eeb1d6a470sm7855243wmq.13.2023.04.22.11.07.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 22 Apr 2023 11:07:39 -0700 (PDT) Date: Sat, 22 Apr 2023 20:07:37 +0200 From: Stanislav Jakubek To: Rob Herring , Krzysztof Kozlowski , Florian Fainelli , Ray Jui , Scott Branden Cc: bcm-kernel-feedback-list@broadcom.com, linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] dt-bindings: i2c: brcm,kona-i2c: convert to YAML Message-ID: <9f4a9a8e20084ba895a309e7d2b78d2047a84ac6.1682185969.git.stano.jakubek@gmail.com> References: <9875ec0211187e4f5e2a4379c63eacdb69b31d7a.1682185969.git.stano.jakubek@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <9875ec0211187e4f5e2a4379c63eacdb69b31d7a.1682185969.git.stano.jakubek@gmail.com> Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Convert Broadcom Kona family I2C bindings to DT schema. Changes during conversion: - add used, but previously undocumented SoC-specific compatibles - drop references to SoCs that are not upstream - add supported clock frequencies according to the Linux driver [1] [1] https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/drivers/i2c/busses/i2c-bcm-kona.c#n731 Signed-off-by: Stanislav Jakubek --- .../devicetree/bindings/i2c/brcm,kona-i2c.txt | 35 ----------- .../bindings/i2c/brcm,kona-i2c.yaml | 58 +++++++++++++++++++ 2 files changed, 58 insertions(+), 35 deletions(-) delete mode 100644 Documentation/devicetree/bindings/i2c/brcm,kona-i2c.txt create mode 100644 Documentation/devicetree/bindings/i2c/brcm,kona-i2c.yaml diff --git a/Documentation/devicetree/bindings/i2c/brcm,kona-i2c.txt b/Documentation/devicetree/bindings/i2c/brcm,kona-i2c.txt deleted file mode 100644 index 1b87b741fa8e..000000000000 --- a/Documentation/devicetree/bindings/i2c/brcm,kona-i2c.txt +++ /dev/null @@ -1,35 +0,0 @@ -Broadcom Kona Family I2C -========================= - -This I2C controller is used in the following Broadcom SoCs: - - BCM11130 - BCM11140 - BCM11351 - BCM28145 - BCM28155 - -Required Properties -------------------- -- compatible: "brcm,bcm11351-i2c", "brcm,kona-i2c" -- reg: Physical base address and length of controller registers -- interrupts: The interrupt number used by the controller -- clocks: clock specifier for the kona i2c external clock -- clock-frequency: The I2C bus frequency in Hz -- #address-cells: Should be <1> -- #size-cells: Should be <0> - -Refer to clocks/clock-bindings.txt for generic clock consumer -properties. - -Example: - -i2c@3e016000 { - compatible = "brcm,bcm11351-i2c","brcm,kona-i2c"; - reg = <0x3e016000 0x80>; - interrupts = ; - clocks = <&bsc1_clk>; - clock-frequency = <400000>; - #address-cells = <1>; - #size-cells = <0>; -}; diff --git a/Documentation/devicetree/bindings/i2c/brcm,kona-i2c.yaml b/Documentation/devicetree/bindings/i2c/brcm,kona-i2c.yaml new file mode 100644 index 000000000000..636912d8518d --- /dev/null +++ b/Documentation/devicetree/bindings/i2c/brcm,kona-i2c.yaml @@ -0,0 +1,58 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/i2c/brcm,kona-i2c.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Broadcom Kona family I2C controller + +maintainers: + - Florian Fainelli + +allOf: + - $ref: /schemas/i2c/i2c-controller.yaml# + +properties: + compatible: + items: + - enum: + - brcm,bcm11351-i2c + - brcm,bcm21664-i2c + - brcm,bcm23550-i2c + - const: brcm,kona-i2c + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + clocks: + maxItems: 1 + + clock-frequency: + enum: [ 100000, 400000, 1000000, 3400000 ] + +required: + - compatible + - reg + - interrupts + - clocks + - clock-frequency + +unevaluatedProperties: false + +examples: + - | + #include + + i2c@3e016000 { + compatible = "brcm,bcm11351-i2c", "brcm,kona-i2c"; + reg = <0x3e016000 0x80>; + interrupts = ; + clocks = <&bsc1_clk>; + clock-frequency = <400000>; + #address-cells = <1>; + #size-cells = <0>; + }; +...