From patchwork Wed Jan 6 20:58:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= X-Patchwork-Id: 12002279 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B4920C433E0 for ; Wed, 6 Jan 2021 21:01:30 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6DEE32313A for ; Wed, 6 Jan 2021 21:01:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6DEE32313A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=neOSHjoheRqtAJgQGqALhFaRc9O9tvovsCEuXThU0yY=; b=aXwEPl1qe3U09oHeKex66TJ/d6 rAjlA+pb3388m8oUyEXblxUVcmyAc+xR5LysbbphwvDWvPvP1gopFktLMw9/mRmYdxqoUHrBatfxJ iF2tPRTcI7hnZUlf5Sn127RXK9BX6DF/wrveLcMzB0j9eWEJlKt2bsz4Q8LvqCzvmKk5DmEhqCaK2 g9F7wWzusqBJTaF3/DdVjXMghJYvAvJi6vvJqeR60aO/hf7JEAIhRRLuSflRyG+FFmuGQLhkdFsIu Eb0EcNK3e6hx0ol0g+1Yb6XUyjy1a5NFx/IdDx/DqC03eDt7SPGfTlvmkb/r0ZbnneBjFTOJEluJc Xv57sFDQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxFtM-0000YX-1Y; Wed, 06 Jan 2021 20:58:52 +0000 Received: from mail-lf1-x12e.google.com ([2a00:1450:4864:20::12e]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxFtJ-0000Xm-94 for linux-arm-kernel@lists.infradead.org; Wed, 06 Jan 2021 20:58:50 +0000 Received: by mail-lf1-x12e.google.com with SMTP id a12so9681729lfl.6 for ; Wed, 06 Jan 2021 12:58:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=k3C5qorUchd+Gu0RBmxpHfL4EcgXGnmcBFZeCm/djUM=; b=XOjzHs0sO8WMuE1pI9KPEMRZh4qP+N/82ss3Q80wrQ11VKxDXQ/mJYE3HlzuBqT8Tf 22nUqywKbapA9EG5lELIr4/TpvHerp42XxXIGeoKZSPSykGAurMM15Gi4LkFxRgEY+A1 CuD2qEsWfwua2lKJlLyMTg9Hcwci9IhgvLDFImEAflZplnp54rVDtBnKNkH3/uymlpfD ylXPyNaB4taY+BHDlkVeU3Y7DZi9RdRcSE4BUrFoSNMXPYyRBnj4O2fox4ugH9jnFZrd 8mV2jvmaYPMKAHhK7AwkYCjVCLJnO0rkzdKn+As89C5tDALIOv0BHgfMbQ51fmO98PyX iGCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=k3C5qorUchd+Gu0RBmxpHfL4EcgXGnmcBFZeCm/djUM=; b=rWIdRbhGrbOiAbtj7hL60V7Lm9P+kY5Y6ETzzPlm5RjHxvIc2XGH78QeiWtNQzyGyI 3gAYe4iZEz2vHFIAB0xHQZpAfk0xJiwYFaZscrMeBCPmBdPl5QkYa9FNBLsHUv9ZjKv3 Iv+PFU6ukaA/PVzwJdBqYB3qOZofI2ob0Le3Hzj8tTBJGHPhR9bdBca+R/Mkv5lEcGnf SCeJNT1S2GCJZsjToiEU4dEDptiV+zbfOlG7pAfw0fUCStpLFfhHY6F4XB028FLQ2Elr QC22shybAAVECOVXaq3U/bWxWde3zk6QOG1mftwaDU7AwfPBPqyi5czQNdIzuAnfpJ/6 zRnw== X-Gm-Message-State: AOAM533sVz/+JWQK83fA7UTIOLE+gQhBcDnulMMObfHm7jSmWXmpBPQP xABADuV+793j7SRLQMW55tY= X-Google-Smtp-Source: ABdhPJzeGC5FwbnoLaHqLEVv4OMKzhoXrCvTwpV5/LnR17RNB+ki4wzBhjfK0685TwIXfXhzuZhugA== X-Received: by 2002:a19:d82:: with SMTP id 124mr2502083lfn.604.1609966727766; Wed, 06 Jan 2021 12:58:47 -0800 (PST) Received: from localhost.lan (ip-194-187-74-233.konfederacka.maverick.com.pl. [194.187.74.233]) by smtp.gmail.com with ESMTPSA id t3sm606970lfe.263.2021.01.06.12.58.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Jan 2021 12:58:47 -0800 (PST) From: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= To: Kishon Vijay Abraham I , Vinod Koul , Rob Herring Subject: [PATCH V4 1/3] dt-bindings: phy: brcm, brcmstb-usb-phy: convert to the json-schema Date: Wed, 6 Jan 2021 21:58:36 +0100 Message-Id: <20210106205838.10964-1-zajec5@gmail.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210106_155849_345643_9B655677 X-CRM114-Status: GOOD ( 19.46 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Florian Fainelli , Al Cooper , linux-kernel@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com, =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Rafał Miłecki Changes that require mentioning: 1. interrupt-names Name "wakeup" was changed to the "wake". It matches example and what Linux driver looks for in the first place 2. brcm,ipp and brcm,ioc Both were described as booleans with 0 / 1 values. In examples they were integers and Linux checks for int as well. Both got uint32. 3. Added minimal description Signed-off-by: Rafał Miłecki Reviewed-by: Rob Herring Reviewed-by: Florian Fainelli --- V2: Add Al as maintainer V3: Define "reg" and "reg-names" directly in the properties V4: additionalProperties: false Fix example to use brcm,syscon-piarbctl (with the prefix) --- .../bindings/phy/brcm,brcmstb-usb-phy.txt | 86 -------- .../bindings/phy/brcm,brcmstb-usb-phy.yaml | 193 ++++++++++++++++++ 2 files changed, 193 insertions(+), 86 deletions(-) delete mode 100644 Documentation/devicetree/bindings/phy/brcm,brcmstb-usb-phy.txt create mode 100644 Documentation/devicetree/bindings/phy/brcm,brcmstb-usb-phy.yaml diff --git a/Documentation/devicetree/bindings/phy/brcm,brcmstb-usb-phy.txt b/Documentation/devicetree/bindings/phy/brcm,brcmstb-usb-phy.txt deleted file mode 100644 index 698aacbdcfc4..000000000000 --- a/Documentation/devicetree/bindings/phy/brcm,brcmstb-usb-phy.txt +++ /dev/null @@ -1,86 +0,0 @@ -Broadcom STB USB PHY - -Required properties: -- compatible: should be one of - "brcm,brcmstb-usb-phy" - "brcm,bcm7216-usb-phy" - "brcm,bcm7211-usb-phy" - -- reg and reg-names properties requirements are specific to the - compatible string. - "brcm,brcmstb-usb-phy": - - reg: 1 or 2 offset and length pairs. One for the base CTRL registers - and an optional pair for systems with USB 3.x support - - reg-names: not specified - "brcm,bcm7216-usb-phy": - - reg: 3 offset and length pairs for CTRL, XHCI_EC and XHCI_GBL - registers - - reg-names: "ctrl", "xhci_ec", "xhci_gbl" - "brcm,bcm7211-usb-phy": - - reg: 5 offset and length pairs for CTRL, XHCI_EC, XHCI_GBL, - USB_PHY and USB_MDIO registers and an optional pair - for the BDC registers - - reg-names: "ctrl", "xhci_ec", "xhci_gbl", "usb_phy", "usb_mdio", "bdc_ec" - -- #phy-cells: Shall be 1 as it expects one argument for setting - the type of the PHY. Possible values are: - - PHY_TYPE_USB2 for USB1.1/2.0 PHY - - PHY_TYPE_USB3 for USB3.x PHY - -Optional Properties: -- clocks : clock phandles. -- clock-names: String, clock name. -- interrupts: wakeup interrupt -- interrupt-names: "wakeup" -- brcm,ipp: Boolean, Invert Port Power. - Possible values are: 0 (Don't invert), 1 (Invert) -- brcm,ioc: Boolean, Invert Over Current detection. - Possible values are: 0 (Don't invert), 1 (Invert) -- dr_mode: String, PHY Device mode. - Possible values are: "host", "peripheral ", "drd" or "typec-pd" - If this property is not defined, the phy will default to "host" mode. -- brcm,syscon-piarbctl: phandle to syscon for handling config registers -NOTE: one or both of the following two properties must be set -- brcm,has-xhci: Boolean indicating the phy has an XHCI phy. -- brcm,has-eohci: Boolean indicating the phy has an EHCI/OHCI phy. - - -Example: - -usbphy_0: usb-phy@f0470200 { - reg = <0xf0470200 0xb8>, - <0xf0471940 0x6c0>; - compatible = "brcm,brcmstb-usb-phy"; - #phy-cells = <1>; - dr_mode = "host" - brcm,ioc = <1>; - brcm,ipp = <1>; - brcm,has-xhci; - brcm,has-eohci; - clocks = <&usb20>, <&usb30>; - clock-names = "sw_usb", "sw_usb3"; -}; - -usb-phy@29f0200 { - reg = <0x29f0200 0x200>, - <0x29c0880 0x30>, - <0x29cc100 0x534>, - <0x2808000 0x24>, - <0x2980080 0x8>; - reg-names = "ctrl", - "xhci_ec", - "xhci_gbl", - "usb_phy", - "usb_mdio"; - brcm,ioc = <0x0>; - brcm,ipp = <0x0>; - compatible = "brcm,bcm7211-usb-phy"; - interrupts = <0x30>; - interrupt-parent = <&vpu_intr1_nosec_intc>; - interrupt-names = "wake"; - #phy-cells = <0x1>; - brcm,has-xhci; - syscon-piarbctl = <&syscon_piarbctl>; - clocks = <&scmi_clk 256>; - clock-names = "sw_usb"; -}; diff --git a/Documentation/devicetree/bindings/phy/brcm,brcmstb-usb-phy.yaml b/Documentation/devicetree/bindings/phy/brcm,brcmstb-usb-phy.yaml new file mode 100644 index 000000000000..a5780beadf97 --- /dev/null +++ b/Documentation/devicetree/bindings/phy/brcm,brcmstb-usb-phy.yaml @@ -0,0 +1,193 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/phy/brcm,brcmstb-usb-phy.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Broadcom STB USB PHY + +description: Broadcom's PHY that handles EHCI/OHCI and/or XHCI + +maintainers: + - Al Cooper + - Rafał Miłecki + +properties: + compatible: + enum: + - brcm,bcm7211-usb-phy + - brcm,bcm7216-usb-phy + - brcm,brcmstb-usb-phy + + reg: + minItems: 1 + maxItems: 6 + items: + - description: the base CTRL register + - description: XHCI EC register + - description: XHCI GBL register + - description: USB PHY register + - description: USB MDIO register + - description: BDC register + + reg-names: + minItems: 1 + maxItems: 6 + items: + - const: ctrl + - const: xhci_ec + - const: xhci_gbl + - const: usb_phy + - const: usb_mdio + - const: bdc_ec + + clocks: + minItems: 1 + maxItems: 2 + + clock-names: + minItems: 1 + maxItems: 2 + items: + - const: sw_usb + - const: sw_usb3 + + interrupts: + description: wakeup interrupt + + interrupt-names: + const: wake + + brcm,ipp: + $ref: /schemas/types.yaml#/definitions/uint32 + description: Invert Port Power + minimum: 0 + maximum: 1 + + brcm,ioc: + $ref: /schemas/types.yaml#/definitions/uint32 + description: Invert Over Current detection + minimum: 0 + maximum: 1 + + dr_mode: + description: PHY Device mode. If this property is not defined, the PHY will + default to "host" mode. + enum: + - host + - peripheral + - drd + - typec-pd + + brcm,syscon-piarbctl: + description: phandle to syscon for handling config registers + $ref: /schemas/types.yaml#/definitions/phandle + + brcm,has-xhci: + description: Indicates the PHY has an XHCI PHY. + type: boolean + + brcm,has-eohci: + description: Indicates the PHY has an EHCI/OHCI PHY. + type: boolean + + "#phy-cells": + description: | + Cell allows setting the type of the PHY. Possible values are: + - PHY_TYPE_USB2 for USB1.1/2.0 PHY + - PHY_TYPE_USB3 for USB3.x PHY + const: 1 + +required: + - reg + - "#phy-cells" + +anyOf: + - required: + - brcm,has-xhci + - required: + - brcm,has-eohci + +allOf: + - if: + properties: + compatible: + contains: + const: brcm,brcmstb-usb-phy + then: + properties: + reg: + minItems: 1 + maxItems: 2 + - if: + properties: + compatible: + contains: + const: brcm,bcm7211-usb-phy + then: + properties: + reg: + minItems: 5 + maxItems: 6 + reg-names: + minItems: 5 + maxItems: 6 + - if: + properties: + compatible: + contains: + const: brcm,bcm7216-usb-phy + then: + properties: + reg: + minItems: 3 + maxItems: 3 + reg-names: + minItems: 3 + maxItems: 3 + +additionalProperties: false + +examples: + - | + #include + + usb-phy@f0470200 { + compatible = "brcm,brcmstb-usb-phy"; + reg = <0xf0470200 0xb8>, + <0xf0471940 0x6c0>; + #phy-cells = <1>; + dr_mode = "host"; + brcm,ioc = <1>; + brcm,ipp = <1>; + brcm,has-xhci; + brcm,has-eohci; + clocks = <&usb20>, <&usb30>; + clock-names = "sw_usb", "sw_usb3"; + }; + - | + #include + + usb-phy@29f0200 { + compatible = "brcm,bcm7211-usb-phy"; + reg = <0x29f0200 0x200>, + <0x29c0880 0x30>, + <0x29cc100 0x534>, + <0x2808000 0x24>, + <0x2980080 0x8>; + reg-names = "ctrl", + "xhci_ec", + "xhci_gbl", + "usb_phy", + "usb_mdio"; + brcm,ioc = <0x0>; + brcm,ipp = <0x0>; + interrupts = <0x30>; + interrupt-parent = <&vpu_intr1_nosec_intc>; + interrupt-names = "wake"; + #phy-cells = <0x1>; + brcm,has-xhci; + brcm,syscon-piarbctl = <&syscon_piarbctl>; + clocks = <&scmi_clk 256>; + clock-names = "sw_usb"; + }; From patchwork Wed Jan 6 20:58:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= X-Patchwork-Id: 12002277 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A0951C433E0 for ; Wed, 6 Jan 2021 21:01:24 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5B99C2313A for ; Wed, 6 Jan 2021 21:01:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5B99C2313A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=+fPYLlyOm/CBNYGN5Sscoz7+mP+xNHIogHseLCvVzBQ=; b=ys70sGypUp7UKwPrmTJIV9cAk rAeQSf5YavASsmekcY9wzC51ZxmB2V4s0iLcF7n5/fjQ/gTltsP5pKfQM8NAcUPVxIXNJdpa/V/nC Gd1KSa7U3bJAUqYDBbv+fyurp/FpKj4WOY+uqyK7DiS/OxOaoo3PBzo/Hh1zRyE0F33F3QXEFhqpk r1H8fxIhg5ae57IX50Cn11dZXxHMi+BLO+BLb7UXy4yw1RIT9RQMH1tc43yzz2irCQrmVSAKTqtLx wW1s0QCVSt3mPHcm/cIPIfXeJVAYEIZHDXTt/qcf8AQDHjccnNvuLplFbGbr7SrQchrp6a4l2x+bh KZqqRCa6A==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxFtO-0000ZG-Gt; Wed, 06 Jan 2021 20:58:54 +0000 Received: from mail-lf1-x130.google.com ([2a00:1450:4864:20::130]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxFtL-0000Y9-6p for linux-arm-kernel@lists.infradead.org; Wed, 06 Jan 2021 20:58:52 +0000 Received: by mail-lf1-x130.google.com with SMTP id h22so9757367lfu.2 for ; Wed, 06 Jan 2021 12:58:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=pphb7wrsc+c5YZrOm38o1FrhievSA5Jx32bg5aoI1/A=; b=ZHsN3VC0q0Nn1YIr0Ukx+/4Q0FFRpOoKCaaFe3Bl0+Jl1U0ChMUT3bvpe2AVJV008F U9NbqGPf81BO1xif+tkXeg8jLP6mt3AUd5ed0Klsx0zrMj0RpRI1piYZif6wJiPNZQBA 2pCWhBypeGGz6j3BAgVk2N8rbnB62FV2EzB5t+Ufx5v6m136hjnvsxyJqbAw2qPIxfgg 3rzm5CXiYlG4zzwqXyhmWsLXaJIpjxE2gDbEroTKBNh28C8GOra6G5nxra5oLQyWhCn3 m3c4wqZn+xL55/M4dtTo9fYQUqiyhPOvHSG9OdfNfIF4EieI5USoSJajev0BycFYyRDZ aYow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=pphb7wrsc+c5YZrOm38o1FrhievSA5Jx32bg5aoI1/A=; b=c/d3hDfyRcX2dIv+zvKJgZWEjwAWO81c5KJDW8NsLfB0cu818M2K83/sPNHdA2yH6W E/tTAILlAwswWafUmq4I94f9VioPa2rPpQafUwiZs6dMBKbBW3kwOSi484sBJH0ZC44R l3a6wXtgR+Wzbhk9h+CuXNGLtWeRsj+4z1/yNh0rJdvZXdhjBWJ9Cy+HIANcHGIeEwkA gSBRUeNwWw0bx4nlx3fkRbWSICP16Z9zAZkFpVX2JGE7V6gYxUYA8PK7d7M6Q+QJFGVV mo9QEDeNyfoZzrRd/+lQnwzO4d1CwNIROlRnfFiaef8288P22tqVqxonCcpp5aBuJdWn 8ZEA== X-Gm-Message-State: AOAM530S4CVniDlycjUNfU9jOomOzrMwm++v5qExXRkifzVLBPnx3+1l BavDW2x3VlJCtFHuRyhOzsc= X-Google-Smtp-Source: ABdhPJzxXwmn/oI4ZLMGFYfSOoUpKqx5vPY/5BDqCQhRFt8UMHvieheVz0Pk0aXJcrCDbem6SUZgIw== X-Received: by 2002:a05:6512:30d:: with SMTP id t13mr2622323lfp.84.1609966729843; Wed, 06 Jan 2021 12:58:49 -0800 (PST) Received: from localhost.lan (ip-194-187-74-233.konfederacka.maverick.com.pl. [194.187.74.233]) by smtp.gmail.com with ESMTPSA id t3sm606970lfe.263.2021.01.06.12.58.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Jan 2021 12:58:49 -0800 (PST) From: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= To: Kishon Vijay Abraham I , Vinod Koul , Rob Herring Subject: [PATCH V4 2/3] dt-bindings: phy: brcm, brcmstb-usb-phy: add BCM4908 binding Date: Wed, 6 Jan 2021 21:58:37 +0100 Message-Id: <20210106205838.10964-2-zajec5@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210106205838.10964-1-zajec5@gmail.com> References: <20210106205838.10964-1-zajec5@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210106_155851_545901_B37212ED X-CRM114-Status: GOOD ( 11.39 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Florian Fainelli , Al Cooper , linux-kernel@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com, =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Rafał Miłecki BCM4908 uses the same PHY and may require just a slightly different programming. Signed-off-by: Rafał Miłecki Acked-by: Florian Fainelli Acked-by: Rob Herring --- .../devicetree/bindings/phy/brcm,brcmstb-usb-phy.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/phy/brcm,brcmstb-usb-phy.yaml b/Documentation/devicetree/bindings/phy/brcm,brcmstb-usb-phy.yaml index a5780beadf97..0497368d1fca 100644 --- a/Documentation/devicetree/bindings/phy/brcm,brcmstb-usb-phy.yaml +++ b/Documentation/devicetree/bindings/phy/brcm,brcmstb-usb-phy.yaml @@ -15,6 +15,7 @@ maintainers: properties: compatible: enum: + - brcm,bcm4908-usb-phy - brcm,bcm7211-usb-phy - brcm,bcm7216-usb-phy - brcm,brcmstb-usb-phy @@ -113,7 +114,9 @@ allOf: properties: compatible: contains: - const: brcm,brcmstb-usb-phy + enum: + - const: brcm,bcm4908-usb-phy + - const: brcm,brcmstb-usb-phy then: properties: reg: From patchwork Wed Jan 6 20:58:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= X-Patchwork-Id: 12002281 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C2018C433E6 for ; Wed, 6 Jan 2021 21:01:31 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7F9782313A for ; Wed, 6 Jan 2021 21:01:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7F9782313A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=VRXrRCzOkTUpS9tc5l6ha5SDKs+hphDl8YgbV2YZGuI=; b=totu+XblUzKHonl6FaTrbQS61 tYY+SpNU7u07AGTpAbWV0h/AjtqrF/T1c8SJxiYn4OFHV12dH7iPloG2Cm4MnGxroGC2PejLbZYtc ptdEJ0tqx51gtbFJkTNasUe0hsSUFo5jNAExl2wKEqqjEH8Sjb8sd0FuG5AEsSok2Nn5550+8dNth q3o31pAo+59+ZrxJSyuZRySyEiE2EBGx0ilbiXG+sDfC39t2tL2xylj1mbhh6uqCs4dnoT9YrNdQf xD2OoOlSvxT8RgGFg/Lv+c6yUyaqhZgX5hkgXX6dV5l7UznBYUVjGbZcpUKFfzjVlNoXQukXEfHTD zZfd/2fLA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxFtR-0000Zm-D5; Wed, 06 Jan 2021 20:58:57 +0000 Received: from mail-lf1-x129.google.com ([2a00:1450:4864:20::129]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxFtN-0000Yb-2R for linux-arm-kernel@lists.infradead.org; Wed, 06 Jan 2021 20:58:53 +0000 Received: by mail-lf1-x129.google.com with SMTP id h22so9757528lfu.2 for ; Wed, 06 Jan 2021 12:58:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=JwP+zFz/2tJGJq7cqXl5uLiK2iVo8O2/+HMJMszT670=; b=r5ov6drRZOWp+YE1g8s7nU1UotDKrkl3JsvtXtP5qJbrhFLDLlP2vGMAsTheKkXQlh 3IkHZGsQQeDd0VH8v/0GX8ZPCsYhYBN/tYI171YIA8jm2osB/LDzUqXEQ/gL2bo7zpnC 0R+fy6kETp5a9Vch9WqOrTdK1kS6Z5W0W5UrnaiZBSEaPa//BniqKMWyNbq9o6l7470w wO7AwK7AulJbs2iUXsGnF6LMps+u7boRrLUnlA/JI3Pg6hM5T0rEKg4LYHKhUNPEj31x XKos6zWigF6bRHb0AxgcrsiZ65SrD9et5AJB9/a4YTKLHINhvrn9lx8/3MjCtIOlfxGI s+Zw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=JwP+zFz/2tJGJq7cqXl5uLiK2iVo8O2/+HMJMszT670=; b=O2XwRYkXGZnIw9jzcX2vaiE0dGDQ1Kh5jvSotytdJYKIeDY6dHxlLFrpZ8rBqon0GV tdJbd19Pf/D5rqB/IB7kZETp/OZYsTVERrj73tpS/AGPsNWugMCdhGADnubuR0hkkKmK /oZU5TmIT42BHD5sChLbtPtkG07MXW6h3IpCL+EUKQH2gf5POxECLlOzGpNoaq3yKg3a iVSXkf4EOmUolHpc5jDUetoWZrlK59s6cRkk7UvUH3+KZ5pQTgqclvGn0eGFNMfUlqbi VPDTvgu5B30fCq0EIOGMFs7xcQTEPqvLFzmuRdbC4hSSurmtCOAh201O5GcJm5650h4o gZdQ== X-Gm-Message-State: AOAM533Vdpp1AGfrV8B6USjbchddiuf3oqbucb7WMFuTByhXHi7acbpc q398ZlcuPpoFbTJnsW1qTBE= X-Google-Smtp-Source: ABdhPJwONQac4yfNQrG0w79mZ4u3LUCQ0bwiw0Mrz7EkedpAuWT5I5jaMCYC9E235zm57rtKP2sjXQ== X-Received: by 2002:a19:904:: with SMTP id 4mr2775748lfj.64.1609966731590; Wed, 06 Jan 2021 12:58:51 -0800 (PST) Received: from localhost.lan (ip-194-187-74-233.konfederacka.maverick.com.pl. [194.187.74.233]) by smtp.gmail.com with ESMTPSA id t3sm606970lfe.263.2021.01.06.12.58.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Jan 2021 12:58:51 -0800 (PST) From: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= To: Kishon Vijay Abraham I , Vinod Koul , Rob Herring Subject: [PATCH V4 3/3] phy: phy-brcm-usb: support PHY on the BCM4908 Date: Wed, 6 Jan 2021 21:58:38 +0100 Message-Id: <20210106205838.10964-3-zajec5@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210106205838.10964-1-zajec5@gmail.com> References: <20210106205838.10964-1-zajec5@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210106_155853_157192_F055D13C X-CRM114-Status: GOOD ( 15.04 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Florian Fainelli , Al Cooper , linux-kernel@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com, =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Rafał Miłecki BCM4908 seems to have slightly different registers but works when programmed just like the STB one. Signed-off-by: Rafał Miłecki Acked-by: Florian Fainelli --- V2: Update Kconfig as well --- drivers/phy/broadcom/Kconfig | 3 ++- drivers/phy/broadcom/phy-brcm-usb.c | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/phy/broadcom/Kconfig b/drivers/phy/broadcom/Kconfig index a1f1a9c90d0d..09256339bd04 100644 --- a/drivers/phy/broadcom/Kconfig +++ b/drivers/phy/broadcom/Kconfig @@ -91,10 +91,11 @@ config PHY_BRCM_SATA config PHY_BRCM_USB tristate "Broadcom STB USB PHY driver" - depends on ARCH_BRCMSTB || COMPILE_TEST + depends on ARCH_BCM4908 || ARCH_BRCMSTB || COMPILE_TEST depends on OF select GENERIC_PHY select SOC_BRCMSTB + default ARCH_BCM4908 default ARCH_BRCMSTB help Enable this to support the Broadcom STB USB PHY. diff --git a/drivers/phy/broadcom/phy-brcm-usb.c b/drivers/phy/broadcom/phy-brcm-usb.c index 99fbc7e4138b..63f922a5f29b 100644 --- a/drivers/phy/broadcom/phy-brcm-usb.c +++ b/drivers/phy/broadcom/phy-brcm-usb.c @@ -285,6 +285,10 @@ static const struct match_chip_info chip_info_7445 = { }; static const struct of_device_id brcm_usb_dt_ids[] = { + { + .compatible = "brcm,bcm4908-usb-phy", + .data = &chip_info_7445, + }, { .compatible = "brcm,bcm7216-usb-phy", .data = &chip_info_7216,