Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dt-bindings: phy: brcm,ns-usb2-phy: bind just a PHY block

The old binding was covering the whole DMU block space (DMU block
contains CRU block which contains USB PHY). It was a bad design,
overkill and a non-generic solution.

Northstar's USB 2.0 PHY is a small block (part of the CRU MFD) and
binding should be designed to represent that properly. Rework the
binding to map just PHY with the "reg" property and use syscon to
reference shared register that controls block access.

The old binding is deprecated now.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20210913080024.6951-2-zajec5@gmail.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Rafał Miłecki and committed by
Vinod Koul
55b9b741 0fd732f8

+19 -6
+19 -6
Documentation/devicetree/bindings/phy/bcm-ns-usb2-phy.yaml
··· 18 18 const: brcm,ns-usb2-phy 19 19 20 20 reg: 21 - items: 22 - - description: iomem address range of DMU (Device Management Unit) 21 + anyOf: 22 + - maxItems: 1 23 + description: PHY control register 24 + - maxItems: 1 25 + description: iomem address range of DMU (Device Management Unit) 26 + deprecated: true 23 27 24 28 reg-names: 25 29 items: 26 30 - const: dmu 31 + 32 + brcm,syscon-clkset: 33 + description: phandle to syscon for clkset register 34 + $ref: /schemas/types.yaml#/definitions/phandle 27 35 28 36 clocks: 29 37 items: ··· 47 39 required: 48 40 - compatible 49 41 - reg 50 - - reg-names 51 42 - clocks 52 43 - clock-names 53 44 - "#phy-cells" 45 + 46 + oneOf: 47 + - required: 48 + - brcm,syscon-clkset 49 + - required: 50 + - reg-names 54 51 55 52 additionalProperties: false 56 53 57 54 examples: 58 55 - | 59 56 #include <dt-bindings/clock/bcm-nsp.h> 60 - phy@1800c000 { 57 + phy@1800c164 { 61 58 compatible = "brcm,ns-usb2-phy"; 62 - reg = <0x1800c000 0x1000>; 63 - reg-names = "dmu"; 59 + reg = <0x1800c164 0x4>; 60 + brcm,syscon-clkset = <&clkset>; 64 61 clocks = <&genpll BCM_NSP_GENPLL_USB_PHY_REF_CLK>; 65 62 clock-names = "phy-ref-clk"; 66 63 #phy-cells = <0>;