10b2f7ad1SMaxime Ripard# SPDX-License-Identifier: GPL-2.0 20b2f7ad1SMaxime Ripard%YAML 1.2 30b2f7ad1SMaxime Ripard--- 40b2f7ad1SMaxime Ripard$id: http://devicetree.org/schemas/phy/allwinner,sun8i-h3-usb-phy.yaml# 50b2f7ad1SMaxime Ripard$schema: http://devicetree.org/meta-schemas/core.yaml# 60b2f7ad1SMaxime Ripard 7dd3cb467SAndrew Lunntitle: Allwinner H3 USB PHY 80b2f7ad1SMaxime Ripard 90b2f7ad1SMaxime Ripardmaintainers: 100b2f7ad1SMaxime Ripard - Chen-Yu Tsai <wens@csie.org> 110b2f7ad1SMaxime Ripard - Maxime Ripard <mripard@kernel.org> 120b2f7ad1SMaxime Ripard 130b2f7ad1SMaxime Ripardproperties: 140b2f7ad1SMaxime Ripard "#phy-cells": 150b2f7ad1SMaxime Ripard const: 1 160b2f7ad1SMaxime Ripard 170b2f7ad1SMaxime Ripard compatible: 18c63fef4cSAndre Przywara enum: 19c63fef4cSAndre Przywara - allwinner,sun8i-h3-usb-phy 20c63fef4cSAndre Przywara - allwinner,sun50i-h616-usb-phy 210b2f7ad1SMaxime Ripard 220b2f7ad1SMaxime Ripard reg: 230b2f7ad1SMaxime Ripard items: 240b2f7ad1SMaxime Ripard - description: PHY Control registers 250b2f7ad1SMaxime Ripard - description: PHY PMU0 registers 260b2f7ad1SMaxime Ripard - description: PHY PMU1 registers 270b2f7ad1SMaxime Ripard - description: PHY PMU2 registers 280b2f7ad1SMaxime Ripard - description: PHY PMU3 registers 290b2f7ad1SMaxime Ripard 300b2f7ad1SMaxime Ripard reg-names: 310b2f7ad1SMaxime Ripard items: 320b2f7ad1SMaxime Ripard - const: phy_ctrl 330b2f7ad1SMaxime Ripard - const: pmu0 340b2f7ad1SMaxime Ripard - const: pmu1 350b2f7ad1SMaxime Ripard - const: pmu2 360b2f7ad1SMaxime Ripard - const: pmu3 370b2f7ad1SMaxime Ripard 380b2f7ad1SMaxime Ripard clocks: 39*6964affeSAndre Przywara minItems: 4 400b2f7ad1SMaxime Ripard items: 410b2f7ad1SMaxime Ripard - description: USB OTG PHY bus clock 420b2f7ad1SMaxime Ripard - description: USB Host 0 PHY bus clock 430b2f7ad1SMaxime Ripard - description: USB Host 1 PHY bus clock 440b2f7ad1SMaxime Ripard - description: USB Host 2 PHY bus clock 45*6964affeSAndre Przywara - description: PMU clock for host port 2 460b2f7ad1SMaxime Ripard 470b2f7ad1SMaxime Ripard clock-names: 48*6964affeSAndre Przywara minItems: 4 490b2f7ad1SMaxime Ripard items: 500b2f7ad1SMaxime Ripard - const: usb0_phy 510b2f7ad1SMaxime Ripard - const: usb1_phy 520b2f7ad1SMaxime Ripard - const: usb2_phy 530b2f7ad1SMaxime Ripard - const: usb3_phy 54*6964affeSAndre Przywara - const: pmu2_clk 550b2f7ad1SMaxime Ripard 560b2f7ad1SMaxime Ripard resets: 570b2f7ad1SMaxime Ripard items: 580b2f7ad1SMaxime Ripard - description: USB OTG reset 590b2f7ad1SMaxime Ripard - description: USB Host 1 Controller reset 600b2f7ad1SMaxime Ripard - description: USB Host 2 Controller reset 610b2f7ad1SMaxime Ripard - description: USB Host 3 Controller reset 620b2f7ad1SMaxime Ripard 630b2f7ad1SMaxime Ripard reset-names: 640b2f7ad1SMaxime Ripard items: 650b2f7ad1SMaxime Ripard - const: usb0_reset 660b2f7ad1SMaxime Ripard - const: usb1_reset 670b2f7ad1SMaxime Ripard - const: usb2_reset 680b2f7ad1SMaxime Ripard - const: usb3_reset 690b2f7ad1SMaxime Ripard 700b2f7ad1SMaxime Ripard usb0_id_det-gpios: 710499220dSRob Herring maxItems: 1 720b2f7ad1SMaxime Ripard description: GPIO to the USB OTG ID pin 730b2f7ad1SMaxime Ripard 740b2f7ad1SMaxime Ripard usb0_vbus_det-gpios: 750499220dSRob Herring maxItems: 1 760b2f7ad1SMaxime Ripard description: GPIO to the USB OTG VBUS detect pin 770b2f7ad1SMaxime Ripard 780b2f7ad1SMaxime Ripard usb0_vbus_power-supply: 790b2f7ad1SMaxime Ripard description: Power supply to detect the USB OTG VBUS 800b2f7ad1SMaxime Ripard 810b2f7ad1SMaxime Ripard usb0_vbus-supply: 820b2f7ad1SMaxime Ripard description: Regulator controlling USB OTG VBUS 830b2f7ad1SMaxime Ripard 840b2f7ad1SMaxime Ripard usb1_vbus-supply: 850b2f7ad1SMaxime Ripard description: Regulator controlling USB1 Host controller 860b2f7ad1SMaxime Ripard 870b2f7ad1SMaxime Ripard usb2_vbus-supply: 880b2f7ad1SMaxime Ripard description: Regulator controlling USB2 Host controller 890b2f7ad1SMaxime Ripard 900b2f7ad1SMaxime Ripard usb3_vbus-supply: 910b2f7ad1SMaxime Ripard description: Regulator controlling USB3 Host controller 920b2f7ad1SMaxime Ripard 930b2f7ad1SMaxime Ripardrequired: 940b2f7ad1SMaxime Ripard - "#phy-cells" 950b2f7ad1SMaxime Ripard - compatible 960b2f7ad1SMaxime Ripard - clocks 970b2f7ad1SMaxime Ripard - clock-names 980b2f7ad1SMaxime Ripard - reg 990b2f7ad1SMaxime Ripard - reg-names 1000b2f7ad1SMaxime Ripard - resets 1010b2f7ad1SMaxime Ripard - reset-names 1020b2f7ad1SMaxime Ripard 103*6964affeSAndre PrzywaraallOf: 104*6964affeSAndre Przywara - if: 105*6964affeSAndre Przywara properties: 106*6964affeSAndre Przywara compatible: 107*6964affeSAndre Przywara contains: 108*6964affeSAndre Przywara enum: 109*6964affeSAndre Przywara - allwinner,sun50i-h616-usb-phy 110*6964affeSAndre Przywara then: 111*6964affeSAndre Przywara properties: 112*6964affeSAndre Przywara clocks: 113*6964affeSAndre Przywara minItems: 5 114*6964affeSAndre Przywara 115*6964affeSAndre Przywara clock-names: 116*6964affeSAndre Przywara minItems: 5 117*6964affeSAndre Przywara else: 118*6964affeSAndre Przywara properties: 119*6964affeSAndre Przywara clocks: 120*6964affeSAndre Przywara maxItems: 4 121*6964affeSAndre Przywara 122*6964affeSAndre Przywara clock-names: 123*6964affeSAndre Przywara maxItems: 4 124*6964affeSAndre Przywara 1250b2f7ad1SMaxime RipardadditionalProperties: false 1260b2f7ad1SMaxime Ripard 1270b2f7ad1SMaxime Ripardexamples: 1280b2f7ad1SMaxime Ripard - | 1290b2f7ad1SMaxime Ripard #include <dt-bindings/gpio/gpio.h> 1300b2f7ad1SMaxime Ripard #include <dt-bindings/clock/sun8i-h3-ccu.h> 1310b2f7ad1SMaxime Ripard #include <dt-bindings/reset/sun8i-h3-ccu.h> 1320b2f7ad1SMaxime Ripard 1330b2f7ad1SMaxime Ripard phy@1c19400 { 1340b2f7ad1SMaxime Ripard #phy-cells = <1>; 1350b2f7ad1SMaxime Ripard compatible = "allwinner,sun8i-h3-usb-phy"; 1360b2f7ad1SMaxime Ripard reg = <0x01c19400 0x2c>, 1370b2f7ad1SMaxime Ripard <0x01c1a800 0x4>, 1380b2f7ad1SMaxime Ripard <0x01c1b800 0x4>, 1390b2f7ad1SMaxime Ripard <0x01c1c800 0x4>, 1400b2f7ad1SMaxime Ripard <0x01c1d800 0x4>; 1410b2f7ad1SMaxime Ripard reg-names = "phy_ctrl", 1420b2f7ad1SMaxime Ripard "pmu0", 1430b2f7ad1SMaxime Ripard "pmu1", 1440b2f7ad1SMaxime Ripard "pmu2", 1450b2f7ad1SMaxime Ripard "pmu3"; 1460b2f7ad1SMaxime Ripard clocks = <&ccu CLK_USB_PHY0>, 1470b2f7ad1SMaxime Ripard <&ccu CLK_USB_PHY1>, 1480b2f7ad1SMaxime Ripard <&ccu CLK_USB_PHY2>, 1490b2f7ad1SMaxime Ripard <&ccu CLK_USB_PHY3>; 1500b2f7ad1SMaxime Ripard clock-names = "usb0_phy", 1510b2f7ad1SMaxime Ripard "usb1_phy", 1520b2f7ad1SMaxime Ripard "usb2_phy", 1530b2f7ad1SMaxime Ripard "usb3_phy"; 1540b2f7ad1SMaxime Ripard resets = <&ccu RST_USB_PHY0>, 1550b2f7ad1SMaxime Ripard <&ccu RST_USB_PHY1>, 1560b2f7ad1SMaxime Ripard <&ccu RST_USB_PHY2>, 1570b2f7ad1SMaxime Ripard <&ccu RST_USB_PHY3>; 1580b2f7ad1SMaxime Ripard reset-names = "usb0_reset", 1590b2f7ad1SMaxime Ripard "usb1_reset", 1600b2f7ad1SMaxime Ripard "usb2_reset", 1610b2f7ad1SMaxime Ripard "usb3_reset"; 1620b2f7ad1SMaxime Ripard usb0_id_det-gpios = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */ 1630b2f7ad1SMaxime Ripard usb0_vbus-supply = <®_usb0_vbus>; 1640b2f7ad1SMaxime Ripard usb1_vbus-supply = <®_usb1_vbus>; 1650b2f7ad1SMaxime Ripard usb2_vbus-supply = <®_usb2_vbus>; 1660b2f7ad1SMaxime Ripard usb3_vbus-supply = <®_usb3_vbus>; 1670b2f7ad1SMaxime Ripard }; 168