From patchwork Sun Apr 23 12:39:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanislav Jakubek X-Patchwork-Id: 676355 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 B05EDC77B76 for ; Sun, 23 Apr 2023 12:39:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229674AbjDWMjR (ORCPT ); Sun, 23 Apr 2023 08:39:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58038 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229441AbjDWMjR (ORCPT ); Sun, 23 Apr 2023 08:39:17 -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 CEB5E10E6; Sun, 23 Apr 2023 05:39:15 -0700 (PDT) Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-3f20215fa70so2064315e9.0; Sun, 23 Apr 2023 05:39:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682253554; x=1684845554; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=BeqKCC7uf5DiAni7uVUYCtTkzdp3ZvJDjEiLgnmAtxI=; b=svhlXU/RGgLcijkj+oBP0kZRxHo6C9vOKYp0BCFqaB9D8oObxbSLxaCEt1BDg2PtIn G4U8wnUjofQnvC87AyMHmnsvUiOavgKXJQo6xPrHX/0Lf0iaa+QIwvoVdSg0ADPFGqie ZNzKX17/brDR58OF7vLkcsqRipgrbSPZCVS7zkFmyqN/wEWdHOt7fXUv0+ismF5OY5Pp DTN7Vj0S+taREB9JLg8UGYwD5tBlEXgDkDMrdAqO0LGeEihoA+PTREXL9deQJqzsijjj Se9MHh7vrmpeTFnFG92SNSwc7MZtaF9OcxNX5keH3PdMgpdpfDJa1vVvLobxOalbBNvm xyGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682253554; x=1684845554; 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=BeqKCC7uf5DiAni7uVUYCtTkzdp3ZvJDjEiLgnmAtxI=; b=mHaQ0JciWmF/u5BOa4Gak1LbXsRhRr/mAUOBi9Oos6+/wqo3TD4LZcPhxL8NBLDHOe 0stt86U4wwr/w2MHidPhCMSp/nUXVTZ/Fq3Wa+9FWC+X/X+e+rWBrnfe6rFAK5E3Or20 Yx6oJhwSRr+oDUPO25C9u60mb8maP67e+4avMpO9XK51ssC3Y2l+WuQKqyJ8pU+UWCde cxFZNHwqLpNPXs/PZLXYAm3dWIonr0vqd1dwyvDiTfwx3GkN9jOkc0Z66b2Cq1RRMiDA gBjymH2+KgY9tpnYDTPjiVFMuzbK0uYFWgjtGtsLRFQZeo73E1ExcEqJs2HsTg2HvRy+ Ympw== X-Gm-Message-State: AAQBX9chKkSooc6Td62rgNhcXzBx14xbnMrik7AlltTMKbVfdui/sHKg NM3r0CkdgoyWApLkVxGpsEkr+stPBiB3Ng== X-Google-Smtp-Source: AKy350ZwDjFRhnNGLWmg7d5IHRZezUWe1gKwK3plZAKzydSJRm31G6A2J5GelTjXEx5804auUVaFVQ== X-Received: by 2002:a7b:c848:0:b0:3f1:727d:77a6 with SMTP id c8-20020a7bc848000000b003f1727d77a6mr5981843wml.3.1682253554256; Sun, 23 Apr 2023 05:39:14 -0700 (PDT) Received: from standask-GA-A55M-S2HP ([188.123.113.247]) by smtp.gmail.com with ESMTPSA id p5-20020a05600c468500b003f18141a016sm12412408wmo.18.2023.04.23.05.39.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Apr 2023 05:39:14 -0700 (PDT) Date: Sun, 23 Apr 2023 14:39:12 +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, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 1/2] ARM: dts: bcm23550: Add SoC-specific I2C compatible Message-ID: <9875ec0211187e4f5e2a4379c63eacdb69b31d7a.1682252615.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 Reviewed-by: Krzysztof Kozlowski Acked-by: Wolfram Sang --- Changes in v2: - none 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 Sun Apr 23 12:40:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanislav Jakubek X-Patchwork-Id: 677379 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 04901C77B73 for ; Sun, 23 Apr 2023 12:40:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229792AbjDWMkY (ORCPT ); Sun, 23 Apr 2023 08:40:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58586 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229441AbjDWMkX (ORCPT ); Sun, 23 Apr 2023 08:40:23 -0400 Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 436E91726; Sun, 23 Apr 2023 05:40:22 -0700 (PDT) Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-2f95231618aso2060130f8f.1; Sun, 23 Apr 2023 05:40:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682253621; x=1684845621; 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=zo9wJCHv4Oo4xHmcfbocaOEILn2riMVbCffKcYD70nU=; b=FLL8vAzlZWtV+BbaSTC75869ZSmC5pSjZ8ceJoWgnpgy1s+pe5zAb8e2MQA96PVk6R 6FA5u/Ijc9pQmzG8kyR8V/0SQ0hotstpegRt39vcHn6SvJjR1SzlLGaVKGVfD1I0fw1P F1lpAC54YKfJtfJRC+W+hkr0SFSzy+gA2CoyR3zHKBVxfx744anSZNHodpYTT6fSaQxp olguK7uZBjPGbThp0Sx9mumF7FtWt2WYiX27WGIYWYa8mcHe+h7a/7+SwvbgtaAJft7f v6V2NwrIEgrsdjhtYvLFdsE0KilqefDZEn51ubSHzWRXXKdWYELICdiqWqVHNGi3tRAR xjGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682253621; x=1684845621; 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=zo9wJCHv4Oo4xHmcfbocaOEILn2riMVbCffKcYD70nU=; b=MMFdaS89Qpei+GN6g6bBPqzYREccT2zIxYxPCpeDA4362hxdxMy9PLSYQTigQXfhXx g/0KUy2vlNYsMHjU8FhaHmFJNDt3yoE02UnGzPMq8vgK/OOCSEKEXIZ1d0p/J1/AYBNC lZcMwGIFT3xofHEwg+Uo4oFcNaAnaeVFzW0EyWXEcXp3OlUI4I032qiYwiibOtRPgaal vTgQ0WQJmInJK7Y8qByQF2b/l7em9aNiwz359L8L9iURBEm6J7P3SEpWu+vpE2fgjpID 3ZrdF8O3eoWGuUtkqTF5ZzbtgSbPlDjxYzVW57JoF3guf6i9Y1XRhHISYs0E39cTX5Mj B/DQ== X-Gm-Message-State: AAQBX9cY78C4rS+FRRFBcMRltr9O13Z1g3CqWHNR1gsEcB0OtJxky+bv lPfXc9xuL0yVk2TKNlxXKpw= X-Google-Smtp-Source: AKy350ale8DTeU3rstHGIHi+s8KZ+KcjckZueD1LAWiwhKV4Kc/QSjBAbrxaTpJEd4hPzsVk9jE17g== X-Received: by 2002:adf:d4c6:0:b0:2ce:aa2d:c625 with SMTP id w6-20020adfd4c6000000b002ceaa2dc625mr7343766wrk.22.1682253620512; Sun, 23 Apr 2023 05:40:20 -0700 (PDT) Received: from standask-GA-A55M-S2HP ([188.123.113.247]) by smtp.gmail.com with ESMTPSA id k6-20020a5d5246000000b002fe87e0706bsm8550789wrc.97.2023.04.23.05.40.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Apr 2023 05:40:20 -0700 (PDT) Date: Sun, 23 Apr 2023 14:40:18 +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, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 2/2] dt-bindings: i2c: brcm,kona-i2c: convert to YAML Message-ID: <72ba28004afb733224f7294a146fc2a6a5a834a7.1682252615.git.stano.jakubek@gmail.com> References: <9875ec0211187e4f5e2a4379c63eacdb69b31d7a.1682252615.git.stano.jakubek@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <9875ec0211187e4f5e2a4379c63eacdb69b31d7a.1682252615.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 --- Changes in v2: - add missing arm-gic.h include - fix indentation to 4 spaces .../devicetree/bindings/i2c/brcm,kona-i2c.txt | 35 ----------- .../bindings/i2c/brcm,kona-i2c.yaml | 59 +++++++++++++++++++ 2 files changed, 59 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..7a694af90fc6 --- /dev/null +++ b/Documentation/devicetree/bindings/i2c/brcm,kona-i2c.yaml @@ -0,0 +1,59 @@ +# 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 + #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>; + }; +...