aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/bcm4908
diff options
context:
space:
mode:
authorRafał Miłecki <rafal@milecki.pl>2021-01-20 21:23:49 +0100
committerRafał Miłecki <rafal@milecki.pl>2021-01-20 22:00:22 +0100
commite6fb4d08a1aef49c5a10743dcdb72f59ff53870a (patch)
treecd25d30a2ed225be428fe738d9de088e68385f57 /target/linux/bcm4908
parentbc3dbd68c4ea8898d9f6b11984b80044a65d919f (diff)
downloadupstream-e6fb4d08a1aef49c5a10743dcdb72f59ff53870a.tar.gz
upstream-e6fb4d08a1aef49c5a10743dcdb72f59ff53870a.tar.bz2
upstream-e6fb4d08a1aef49c5a10743dcdb72f59ff53870a.zip
bcm4908: add DTS patches for USB PHY and partitions
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Diffstat (limited to 'target/linux/bcm4908')
-rw-r--r--target/linux/bcm4908/patches-5.4/300-arm64-dts-broadcom-bcm4908-describe-USB-PHY.patch132
-rw-r--r--target/linux/bcm4908/patches-5.4/301-arm64-dts-broadcom-bcm4908-improve-partitions-descri.patch69
2 files changed, 201 insertions, 0 deletions
diff --git a/target/linux/bcm4908/patches-5.4/300-arm64-dts-broadcom-bcm4908-describe-USB-PHY.patch b/target/linux/bcm4908/patches-5.4/300-arm64-dts-broadcom-bcm4908-describe-USB-PHY.patch
new file mode 100644
index 0000000000..b0b8cc5748
--- /dev/null
+++ b/target/linux/bcm4908/patches-5.4/300-arm64-dts-broadcom-bcm4908-describe-USB-PHY.patch
@@ -0,0 +1,132 @@
+From 28d11220a92e9fc4d7d1b8e52dc1c48980e336a1 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
+Date: Wed, 20 Jan 2021 20:34:00 +0100
+Subject: [PATCH] arm64: dts: broadcom: bcm4908: describe USB PHY
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+BCM4908 uses slightly modified STB family USB PHY. It handles OHCI/EHCI
+and XHCI. It requires powering up using the PMB.
+
+Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
+---
+ .../bcm4908/bcm4906-netgear-r8000p.dts | 17 +++++++++++++
+ .../bcm4908/bcm4908-asus-gt-ac5300.dts | 16 ++++++++++++
+ .../boot/dts/broadcom/bcm4908/bcm4908.dtsi | 25 ++++++++++++++++---
+ 3 files changed, 54 insertions(+), 4 deletions(-)
+
+--- a/arch/arm64/boot/dts/broadcom/bcm4908/bcm4906-netgear-r8000p.dts
++++ b/arch/arm64/boot/dts/broadcom/bcm4908/bcm4906-netgear-r8000p.dts
+@@ -26,6 +26,23 @@
+ };
+ };
+
++&usb_phy {
++ brcm,ioc = <1>;
++ status = "okay";
++};
++
++&ehci {
++ status = "okay";
++};
++
++&ohci {
++ status = "okay";
++};
++
++&xhci {
++ status = "okay";
++};
++
+ &nandcs {
+ nand-ecc-strength = <4>;
+ nand-ecc-step-size = <512>;
+--- a/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908-asus-gt-ac5300.dts
++++ b/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908-asus-gt-ac5300.dts
+@@ -44,6 +44,22 @@
+ };
+ };
+
++&usb_phy {
++ status = "okay";
++};
++
++&ehci {
++ status = "okay";
++};
++
++&ohci {
++ status = "okay";
++};
++
++&xhci {
++ status = "okay";
++};
++
+ &ports {
+ port@0 {
+ label = "lan2";
+--- a/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908.dtsi
++++ b/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908.dtsi
+@@ -2,6 +2,8 @@
+
+ #include <dt-bindings/interrupt-controller/irq.h>
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
++#include <dt-bindings/phy/phy.h>
++#include <dt-bindings/soc/bcm-pmb.h>
+
+ /dts-v1/;
+
+@@ -110,24 +112,39 @@
+ #size-cells = <1>;
+ ranges = <0x00 0x00 0x80000000 0x281000>;
+
+- usb@c300 {
++ usb_phy: usb-phy@c200 {
++ compatible = "brcm,bcm4908-usb-phy";
++ reg = <0xc200 0x100>;
++ reg-names = "crtl";
++ power-domains = <&pmb BCM_PMB_HOST_USB>;
++ dr_mode = "host";
++ brcm,has-xhci;
++ brcm,has-eohci;
++ #phy-cells = <1>;
++ status = "disabled";
++ };
++
++ ehci: usb@c300 {
+ compatible = "generic-ehci";
+ reg = <0xc300 0x100>;
+ interrupts = <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>;
++ phys = <&usb_phy PHY_TYPE_USB2>;
+ status = "disabled";
+ };
+
+- usb@c400 {
++ ohci: usb@c400 {
+ compatible = "generic-ohci";
+ reg = <0xc400 0x100>;
+ interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>;
++ phys = <&usb_phy PHY_TYPE_USB2>;
+ status = "disabled";
+ };
+
+- usb@d000 {
++ xhci: usb@d000 {
+ compatible = "generic-xhci";
+ reg = <0xd000 0x8c8>;
+ interrupts = <GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>;
++ phys = <&usb_phy PHY_TYPE_USB3>;
+ status = "disabled";
+ };
+
+@@ -222,7 +239,7 @@
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+- power-controller@2800c0 {
++ pmb: power-controller@2800c0 {
+ compatible = "brcm,bcm4908-pmb";
+ reg = <0x2800c0 0x40>;
+ #power-domain-cells = <1>;
diff --git a/target/linux/bcm4908/patches-5.4/301-arm64-dts-broadcom-bcm4908-improve-partitions-descri.patch b/target/linux/bcm4908/patches-5.4/301-arm64-dts-broadcom-bcm4908-improve-partitions-descri.patch
new file mode 100644
index 0000000000..524a433335
--- /dev/null
+++ b/target/linux/bcm4908/patches-5.4/301-arm64-dts-broadcom-bcm4908-improve-partitions-descri.patch
@@ -0,0 +1,69 @@
+From e401e6fe9195eabfc6c81d8aed920a75b5d7987b Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
+Date: Wed, 20 Jan 2021 20:53:35 +0100
+Subject: [PATCH] arm64: dts: broadcom: bcm4908: improve partitions description
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+1. Use proper bindings
+2. Add missing partitions
+
+Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
+---
+ .../bcm4908/bcm4906-netgear-r8000p.dts | 1 +
+ .../bcm4908/bcm4908-asus-gt-ac5300.dts | 27 ++++++++++++++++++-
+ 2 files changed, 27 insertions(+), 1 deletion(-)
+
+--- a/arch/arm64/boot/dts/broadcom/bcm4908/bcm4906-netgear-r8000p.dts
++++ b/arch/arm64/boot/dts/broadcom/bcm4908/bcm4906-netgear-r8000p.dts
+@@ -62,6 +62,7 @@
+ };
+
+ partition@100000 {
++ compatible = "brcm,bcm4908-firmware";
+ label = "firmware";
+ reg = <0x100000 0x4400000>;
+ };
+--- a/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908-asus-gt-ac5300.dts
++++ b/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908-asus-gt-ac5300.dts
+@@ -121,7 +121,7 @@
+ #size-cells = <0>;
+
+ partitions {
+- compatible = "fixed-partitions";
++ compatible = "brcm,bcm4908-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+@@ -129,5 +129,30 @@
+ label = "cferom";
+ reg = <0x0 0x100000>;
+ };
++
++ partition@100000 {
++ compatible = "brcm,bcm4908-firmware";
++ reg = <0x100000 0x5700000>;
++ };
++
++ partition@5800000 {
++ compatible = "brcm,bcm4908-firmware";
++ reg = <0x5800000 0x5700000>;
++ };
++
++ partition@af00000 {
++ label = "misc1";
++ reg = <0xaf00000 0x800000>;
++ };
++
++ partition@b700000 {
++ label = "misc2";
++ reg = <0xb700000 0x4000000>;
++ };
++
++ partition@f700000 {
++ label = "data";
++ reg = <0xf700000 0x800000>;
++ };
+ };
+ };