From 878a3ee38d6e876093f742403316e91301303a3d Mon Sep 17 00:00:00 2001 From: Sebastian Hesselbarth Date: Thu, 30 Oct 2014 11:21:27 +0100 Subject: [PATCH 1/6] ARM: berlin: Add AHCI and SATA PHY nodes to BG2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add DT nodes for the AHCI controller and SATA PHY found on Marvell Berlin2 SoCs. Acked-by: Antoine Ténart Signed-off-by: Sebastian Hesselbarth --- arch/arm/boot/dts/berlin2.dtsi | 39 ++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/arch/arm/boot/dts/berlin2.dtsi b/arch/arm/boot/dts/berlin2.dtsi index 20e7c394a008..015a06c67c91 100644 --- a/arch/arm/boot/dts/berlin2.dtsi +++ b/arch/arm/boot/dts/berlin2.dtsi @@ -311,6 +311,45 @@ }; }; + ahci: sata@e90000 { + compatible = "marvell,berlin2-ahci", "generic-ahci"; + reg = <0xe90000 0x1000>; + interrupts = ; + clocks = <&chip CLKID_SATA>; + #address-cells = <1>; + #size-cells = <0>; + + sata0: sata-port@0 { + reg = <0>; + phys = <&sata_phy 0>; + status = "disabled"; + }; + + sata1: sata-port@1 { + reg = <1>; + phys = <&sata_phy 1>; + status = "disabled"; + }; + }; + + sata_phy: phy@e900a0 { + compatible = "marvell,berlin2-sata-phy"; + reg = <0xe900a0 0x200>; + clocks = <&chip CLKID_SATA>; + #address-cells = <1>; + #size-cells = <0>; + #phy-cells = <1>; + status = "disabled"; + + sata-phy@0 { + reg = <0>; + }; + + sata-phy@1 { + reg = <1>; + }; + }; + chip: chip-control@ea0000 { compatible = "marvell,berlin2-chip-ctrl"; #clock-cells = <1>; From 9f6386e1ee3ad9cae0175a76d1e689c2c4b311a0 Mon Sep 17 00:00:00 2001 From: Sebastian Hesselbarth Date: Wed, 12 Nov 2014 00:18:59 +0100 Subject: [PATCH 2/6] ARM: berlin: Enable SATA on Sony NSZ-GS7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Marvell Berlin BG2 based Sony NSZ-GS7 has an unpopulated SATA plug on its PCB solder side. As it is quite easy to populate and I have done it, enable AHCI and SATA by default. Acked-by: Antoine Ténart Signed-off-by: Sebastian Hesselbarth --- arch/arm/boot/dts/berlin2-sony-nsz-gs7.dts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/arm/boot/dts/berlin2-sony-nsz-gs7.dts b/arch/arm/boot/dts/berlin2-sony-nsz-gs7.dts index 04f391b5c124..86d85d8896a3 100644 --- a/arch/arm/boot/dts/berlin2-sony-nsz-gs7.dts +++ b/arch/arm/boot/dts/berlin2-sony-nsz-gs7.dts @@ -26,8 +26,15 @@ }; }; +&ahci { status = "okay"; }; + ð1 { status = "okay"; }; +/* Unpopulated SATA plug on solder side */ +&sata0 { status = "okay"; }; + +&sata_phy { status = "okay"; }; + /* Samsung M8G2FA 8GB eMMC */ &sdhci2 { non-removable; From c539711ee79f997b0cdc136382167963932461b8 Mon Sep 17 00:00:00 2001 From: Antoine Tenart Date: Mon, 17 Nov 2014 14:35:44 +0100 Subject: [PATCH 3/6] ARM: dts: berlin: add BG2Q nodes for USB support Adds nodes describing the Marvell Berlin BG2Q USB PHY and USB. The BG2Q SoC has 3 USB host controller, compatible with ChipIdea. Signed-off-by: Antoine Tenart Signed-off-by: Sebastian Hesselbarth --- arch/arm/boot/dts/berlin2q.dtsi | 54 +++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/arch/arm/boot/dts/berlin2q.dtsi b/arch/arm/boot/dts/berlin2q.dtsi index a35deb37ffb5..35253c947a7c 100644 --- a/arch/arm/boot/dts/berlin2q.dtsi +++ b/arch/arm/boot/dts/berlin2q.dtsi @@ -114,6 +114,40 @@ #interrupt-cells = <3>; }; + usb_phy2: phy@a2f400 { + compatible = "marvell,berlin2-usb-phy"; + reg = <0xa2f400 0x128>; + #phy-cells = <0>; + resets = <&chip 0x104 14>; + status = "disabled"; + }; + + usb2: usb@a30000 { + compatible = "chipidea,usb2"; + reg = <0xa30000 0x10000>; + interrupts = ; + clocks = <&chip CLKID_USB2>; + phys = <&usb_phy2>; + phy-names = "usb-phy"; + status = "disabled"; + }; + + usb_phy0: phy@b74000 { + compatible = "marvell,berlin2-usb-phy"; + reg = <0xb74000 0x128>; + #phy-cells = <0>; + resets = <&chip 0x104 12>; + status = "disabled"; + }; + + usb_phy1: phy@b78000 { + compatible = "marvell,berlin2-usb-phy"; + reg = <0xb78000 0x128>; + #phy-cells = <0>; + resets = <&chip 0x104 13>; + status = "disabled"; + }; + eth0: ethernet@b90000 { compatible = "marvell,pxa168-eth"; reg = <0xb90000 0x10000>; @@ -404,6 +438,26 @@ }; }; + usb0: usb@ed0000 { + compatible = "chipidea,usb2"; + reg = <0xed0000 0x10000>; + interrupts = ; + clocks = <&chip CLKID_USB0>; + phys = <&usb_phy0>; + phy-names = "usb-phy"; + status = "disabled"; + }; + + usb1: usb@ee0000 { + compatible = "chipidea,usb2"; + reg = <0xee0000 0x10000>; + interrupts = ; + clocks = <&chip CLKID_USB1>; + phys = <&usb_phy1>; + phy-names = "usb-phy"; + status = "disabled"; + }; + apb@fc0000 { compatible = "simple-bus"; #address-cells = <1>; From fe354939edffe1f2579b4b372bad44e72bd9a9b3 Mon Sep 17 00:00:00 2001 From: Antoine Tenart Date: Mon, 17 Nov 2014 14:35:45 +0100 Subject: [PATCH 4/6] ARM: dts: Berlin: enable USB on the BG2Q DMP Enable the 2 available USB PHY and USB nodes on the Marvell Berlin BG2Q DMP. Signed-off-by: Antoine Tenart Signed-off-by: Sebastian Hesselbarth --- arch/arm/boot/dts/berlin2q-marvell-dmp.dts | 53 ++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/arch/arm/boot/dts/berlin2q-marvell-dmp.dts b/arch/arm/boot/dts/berlin2q-marvell-dmp.dts index a403b0a5ba91..28e7e2060c33 100644 --- a/arch/arm/boot/dts/berlin2q-marvell-dmp.dts +++ b/arch/arm/boot/dts/berlin2q-marvell-dmp.dts @@ -7,6 +7,8 @@ */ /dts-v1/; + +#include #include "berlin2q.dtsi" / { @@ -21,6 +23,39 @@ choosen { bootargs = "console=ttyS0,115200 earlyprintk"; }; + + regulators { + compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <0>; + + reg_usb0_vbus: regulator@0 { + compatible = "regulator-fixed"; + regulator-name = "usb0_vbus"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + gpio = <&portb 8 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; + + reg_usb1_vbus: regulator@1 { + compatible = "regulator-fixed"; + regulator-name = "usb1_vbus"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + gpio = <&portb 10 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; + + reg_usb2_vbus: regulator@2 { + compatible = "regulator-fixed"; + regulator-name = "usb2_vbus"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + gpio = <&portb 12 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; + }; }; &sdhci1 { @@ -46,6 +81,24 @@ status = "okay"; }; +&usb_phy0 { + status = "okay"; +}; + +&usb_phy2 { + status = "okay"; +}; + +&usb0 { + vbus-supply = <®_usb0_vbus>; + status = "okay"; +}; + +&usb2 { + vbus-supply = <®_usb2_vbus>; + status = "okay"; +}; + ð0 { status = "okay"; }; From e802b3a2bfd4f52a9b23037800fa0965aae92013 Mon Sep 17 00:00:00 2001 From: Sebastian Hesselbarth Date: Mon, 17 Nov 2014 14:35:46 +0100 Subject: [PATCH 5/6] ARM: dts: berlin: add BG2CD nodes for USB support Adds nodes describing the Marvell Berlin BG2CD USB PHY and USB. The BG2CD SoC has 2 USB ChipIdea controllers, with usb0 host-only and usb1 dual-role capable. Signed-off-by: Antoine Tenart Signed-off-by: Sebastian Hesselbarth --- arch/arm/boot/dts/berlin2cd.dtsi | 36 ++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/arch/arm/boot/dts/berlin2cd.dtsi b/arch/arm/boot/dts/berlin2cd.dtsi index 9e338ff80fd3..230df3b1770e 100644 --- a/arch/arm/boot/dts/berlin2cd.dtsi +++ b/arch/arm/boot/dts/berlin2cd.dtsi @@ -75,6 +75,22 @@ clocks = <&chip CLKID_TWD>; }; + usb_phy0: usb-phy@b74000 { + compatible = "marvell,berlin2cd-usb-phy"; + reg = <0xb74000 0x128>; + #phy-cells = <0>; + resets = <&chip 0x178 23>; + status = "disabled"; + }; + + usb_phy1: usb-phy@b78000 { + compatible = "marvell,berlin2cd-usb-phy"; + reg = <0xb78000 0x128>; + #phy-cells = <0>; + resets = <&chip 0x178 24>; + status = "disabled"; + }; + eth1: ethernet@b90000 { compatible = "marvell,pxa168-eth"; reg = <0xb90000 0x10000>; @@ -287,6 +303,26 @@ }; }; + usb0: usb@ed0000 { + compatible = "chipidea,usb2"; + reg = <0xed0000 0x200>; + interrupts = ; + clocks = <&chip CLKID_USB0>; + phys = <&usb_phy0>; + phy-names = "usb-phy"; + status = "disabled"; + }; + + usb1: usb@ee0000 { + compatible = "chipidea,usb2"; + reg = <0xee0000 0x200>; + interrupts = ; + clocks = <&chip CLKID_USB1>; + phys = <&usb_phy1>; + phy-names = "usb-phy"; + status = "disabled"; + }; + apb@fc0000 { compatible = "simple-bus"; #address-cells = <1>; From ea7aaa26273431650cb94e712c7c7cfec4306587 Mon Sep 17 00:00:00 2001 From: Sebastian Hesselbarth Date: Mon, 17 Nov 2014 14:35:47 +0100 Subject: [PATCH 6/6] ARM: dts: berlin: enable USB on the Google Chromecast Enable usb1 on Google Chromecast which is connected to micro-USB plug used for external power supply, too. Signed-off-by: Antoine Tenart Signed-off-by: Sebastian Hesselbarth --- arch/arm/boot/dts/berlin2cd-google-chromecast.dts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm/boot/dts/berlin2cd-google-chromecast.dts b/arch/arm/boot/dts/berlin2cd-google-chromecast.dts index bdcaff7c321e..30270be4d0c9 100644 --- a/arch/arm/boot/dts/berlin2cd-google-chromecast.dts +++ b/arch/arm/boot/dts/berlin2cd-google-chromecast.dts @@ -53,3 +53,7 @@ }; &uart0 { status = "okay"; }; + +&usb_phy1 { status = "okay"; }; + +&usb1 { status = "okay"; };