Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1144668pxb; Fri, 26 Feb 2021 03:48:28 -0800 (PST) X-Google-Smtp-Source: ABdhPJyx6lZxzVacwcVaC6DBvjQY5GfnaVjWOW2jgekpK1reWo2j2OaeZo3SQg/LDx8oqghKGCUp X-Received: by 2002:a17:906:33d6:: with SMTP id w22mr2905420eja.104.1614340108453; Fri, 26 Feb 2021 03:48:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614340108; cv=none; d=google.com; s=arc-20160816; b=r9a1xvVSealRDN5/XQKqmOM0qO0FR1anwAZUjeRNDs7AQrT9ft/hjZzGAEusnvQHoD xp7mD2sKO5K+rPJb0dEf1j9b++tsm0Pn1jt5g+NNLiIbxshRSJ0R5Vwcv7tQKZfB+RVW icp19oBVjZ3I/WIAoANH4kjiIHnm8bPYOrrqyatFqXYWm57XOZFHnFjbbOLWc91Aest3 SJUr8GoTP88lAvrpLj1fG8CJDrPoK6aRTUc3HtQ127gCHQjuRi4AXHdHvBddih9s3cRw xyv15Ru5AdhpLH9fj/dUPjkz9E+iFSAzSjQQ/s9mL3rmlw+hqFQatGwcIvfE9BPyNjhQ LO6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=dOOeG6TMspF1gCesWUxh5qP32jy7kimqL06Y3Z/+g/0=; b=Ju2ZOOr6Uru1rOUW6nwRPwAOFKpW+tVDDGPTV6OZc2tlowiTHOqW7pQ6yfO2Rx0pDE mbLSQKFQOVcnlFcBNkZS9agJ3r1VfVN2Nnaem8s+DZttsJlfQp3dI7G6/cRiNqZ4PrRK LvLOsUqbBOjEV8CqxTBRa/RDSxpoS7GYE4uELbmsqDlNe8GmH8ouGH0afgIToC1qi7iE JYINEomzrLQqWnCiWstMQ65+gN9N2eX4x7tyegY+LFQuofsxnOQqPnOX6BjPgftr6nc2 LcUKsLujMUXBFHvVTUUWeuco9hJe7BuxJsO/uqKRGxDY08spQs99VNt1GY8BPrXjJH7B yugw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=LMeyElHg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r9si5968152edc.218.2021.02.26.03.48.06; Fri, 26 Feb 2021 03:48:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=LMeyElHg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229999AbhBZLrA (ORCPT + 99 others); Fri, 26 Feb 2021 06:47:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44860 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229751AbhBZLqx (ORCPT ); Fri, 26 Feb 2021 06:46:53 -0500 Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [IPv6:2a00:1450:4864:20::12f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 391A2C06174A; Fri, 26 Feb 2021 03:46:13 -0800 (PST) Received: by mail-lf1-x12f.google.com with SMTP id u4so13423338lfs.0; Fri, 26 Feb 2021 03:46:13 -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=dOOeG6TMspF1gCesWUxh5qP32jy7kimqL06Y3Z/+g/0=; b=LMeyElHgXJMq/n3KGHi7CwAb+AT/GeHbpnpavrbzv2V4TfUfC2u2vsQ2J0q08NOgdk VWH33UZ4Pja0xSe8iDVWlkmZWHy3LfM0rm4TfNgasdewZKG3adNR9UCgD5GRJee7dBgy fUw1bKFfDhXEn9ic0iUmSo6lF2mXz91yV1IyZ2ocKc2Iip/WNeZ9cQaqmQ4k325uGrFQ aKtT7MSiaRfKh92OwVIm8udRd/bbWH1A89SX/fVtO7wM90ChZQNAyF25GaoGrQ6s9myU IDNyPtXOG5aAtThvo8PoAOFFGBT1GLnK81QJ4K0aKOWwnenAuiY1JQVi7xRQ//dTEFQp brdA== 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=dOOeG6TMspF1gCesWUxh5qP32jy7kimqL06Y3Z/+g/0=; b=jGxc/M7g/t9l29Und/QC/lnKtHvCWJixWLFABsYjs3VP+xDpS/K8sNSTzPASzOYfI7 VxOXHClxGaXBTVR1tuUEqXn74vxPCjEZSzMcn+uqd75+9k9k8jENsAwqrLjCR5NpHGDy ynxCe0s7TFGyUsBkS7nXqi/d6H80WpOjkPasj+yaVK2RmlEDM8C4kzR4u7MbB8yWlLvH LU675SrUTYAltRZXsUA3qyPYinK1pvMQkFYZI+iTdItDP0oalJXbD2u7tbTrRrJ0/afI qYAtWWLmkFEA2XLb9RYLgPB2F9MMoKcZgP1q9p+pegF/NPlnnHH26tab7/qCP0G14WOe PjZw== X-Gm-Message-State: AOAM530JryyNzwBq6JX6ViB4NrrBVcw0+91D2lbtk8xj5cBLMopt/1Ia CJ4v/+snqoTr8FnWA5MNzeGrs0rEnk4= X-Received: by 2002:a05:6512:12c2:: with SMTP id p2mr1480976lfg.339.1614339971776; Fri, 26 Feb 2021 03:46:11 -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 f16sm1380475lfk.217.2021.02.26.03.46.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Feb 2021 03:46:11 -0800 (PST) From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= To: Kishon Vijay Abraham I , Vinod Koul , Rob Herring Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Florian Fainelli , Vivek Unune , bcm-kernel-feedback-list@broadcom.com, =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Subject: [PATCH 2/3] dt-bindings: phy: brcm,ns-usb2-phy: bind single CRU reg Date: Fri, 26 Feb 2021 12:45:00 +0100 Message-Id: <20210226114501.31086-2-zajec5@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210226114501.31086-1-zajec5@gmail.com> References: <20210226114501.31086-1-zajec5@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Rafał Miłecki The old binding was using whole DMU space. It was an overkill. DMU is a big block which contains e.g. CRU which contains e.g. PLLs, PHY, pinctrl and thermal blocks. Rework the binding to directly use a single CRU register that controls USB 2.0 PHY. It's still required to reference CRU generic clkset register so add a syscon for that. For a full DMU & CRU description see arch/arm/boot/dts/bcm5301x.dtsi . The old binding is deprecated now. Signed-off-by: Rafał Miłecki --- This has been verified using dt_binding_check I'd really like to get Rob's ack to make sure I don't do anything stupid It's a reworked version of my abonded 2019 patch: [PATCH V2 1/2] dt-bindings: bcm-ns-usb2-phy: rework binding to use CRU syscon https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20190108123907.19816-1-zajec5@gmail.com/ --- .../bindings/phy/brcm,ns-usb2-phy.yaml | 46 +++++++++++++++---- 1 file changed, 36 insertions(+), 10 deletions(-) diff --git a/Documentation/devicetree/bindings/phy/brcm,ns-usb2-phy.yaml b/Documentation/devicetree/bindings/phy/brcm,ns-usb2-phy.yaml index b8b683ce8fa9..8e056d4d205a 100644 --- a/Documentation/devicetree/bindings/phy/brcm,ns-usb2-phy.yaml +++ b/Documentation/devicetree/bindings/phy/brcm,ns-usb2-phy.yaml @@ -16,11 +16,20 @@ properties: const: brcm,ns-usb2-phy reg: - maxItems: 1 - description: DMU (Device Management Unit) address range + anyOf: + - maxItems: 1 + description: PHY control register + - maxItems: 1 + description: DMU (Device Management Unit) address range + deprecated: true reg-names: const: dmu + deprecated: true + + brcm,syscon-clkset: + description: phandle to syscon for clkset register + $ref: /schemas/types.yaml#/definitions/phandle clocks: maxItems: 1 @@ -34,22 +43,39 @@ properties: required: - reg - - reg-names - clocks - clock-names - "#phy-cells" +oneOf: + - required: + - brcm,syscon-clkset + - required: + - reg-names + additionalProperties: false examples: - | #include - usb2-phy@1800c000 { - compatible = "brcm,ns-usb2-phy"; - reg = <0x1800c000 0x1000>; - reg-names = "dmu"; - clocks = <&genpll BCM_NSP_GENPLL_USB_PHY_REF_CLK>; - clock-names = "phy-ref-clk"; - #phy-cells = <0>; + cru-bus@1800c100 { + compatible = "simple-bus"; + ranges = <0 0x1800c100 0x1a4>; + #address-cells = <1>; + #size-cells = <1>; + + usb2-phy@64 { + compatible = "brcm,ns-usb2-phy"; + reg = <0x64 0x4>; + brcm,syscon-clkset = <&clkset>; + clocks = <&genpll BCM_NSP_GENPLL_USB_PHY_REF_CLK>; + clock-names = "phy-ref-clk"; + #phy-cells = <0>; + }; + + clkset: syscon@80 { + compatible = "brcm,cru-clkset", "syscon"; + reg = <0x80 0x4>; + }; }; -- 2.26.2