mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-23 07:22:33 +00:00
190 lines
4.9 KiB
Diff
190 lines
4.9 KiB
Diff
|
From d8daf6289869513ed548bcb0da410d7de3e5d57a Mon Sep 17 00:00:00 2001
|
||
|
From: Maxime Ripard <maxime@cerno.tech>
|
||
|
Date: Wed, 10 Jun 2020 16:28:56 +0200
|
||
|
Subject: [PATCH] clk: rpi: Adjust DT binding to match upstream
|
||
|
|
||
|
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
|
||
|
---
|
||
|
arch/arm/boot/dts/bcm270x.dtsi | 6 ------
|
||
|
arch/arm/boot/dts/bcm2710-rpi-3-b-plus.dts | 5 +++++
|
||
|
arch/arm/boot/dts/bcm2710-rpi-3-b.dts | 5 +++++
|
||
|
arch/arm/boot/dts/bcm2710-rpi-cm3.dts | 5 +++++
|
||
|
arch/arm/boot/dts/bcm2711-rpi-4-b.dts | 5 +++++
|
||
|
arch/arm/boot/dts/bcm2711.dtsi | 6 ------
|
||
|
arch/arm/boot/dts/bcm2837-rpi-3-a-plus.dts | 5 +++++
|
||
|
arch/arm/boot/dts/bcm2837-rpi-3-b-plus.dts | 5 +++++
|
||
|
arch/arm/boot/dts/bcm2837-rpi-3-b.dts | 5 +++++
|
||
|
arch/arm/boot/dts/bcm2837-rpi-cm3.dtsi | 5 +++++
|
||
|
drivers/clk/bcm/clk-raspberrypi.c | 12 +++++++++++-
|
||
|
11 files changed, 51 insertions(+), 13 deletions(-)
|
||
|
|
||
|
--- a/arch/arm/boot/dts/bcm270x.dtsi
|
||
|
+++ b/arch/arm/boot/dts/bcm270x.dtsi
|
||
|
@@ -7,12 +7,6 @@
|
||
|
/delete-property/ stdout-path;
|
||
|
};
|
||
|
|
||
|
- firmware_clocks: firmware-clocks {
|
||
|
- compatible = "raspberrypi,firmware-clocks";
|
||
|
- raspberrypi,firmware = <&firmware>;
|
||
|
- #clock-cells = <1>;
|
||
|
- };
|
||
|
-
|
||
|
soc: soc {
|
||
|
|
||
|
watchdog: watchdog@7e100000 {
|
||
|
--- a/arch/arm/boot/dts/bcm2710-rpi-3-b-plus.dts
|
||
|
+++ b/arch/arm/boot/dts/bcm2710-rpi-3-b-plus.dts
|
||
|
@@ -85,6 +85,11 @@
|
||
|
};
|
||
|
|
||
|
&firmware {
|
||
|
+ firmware_clocks: clocks {
|
||
|
+ compatible = "raspberrypi,firmware-clocks";
|
||
|
+ #clock-cells = <1>;
|
||
|
+ };
|
||
|
+
|
||
|
expgpio: expgpio {
|
||
|
compatible = "raspberrypi,firmware-gpio";
|
||
|
gpio-controller;
|
||
|
--- a/arch/arm/boot/dts/bcm2710-rpi-3-b.dts
|
||
|
+++ b/arch/arm/boot/dts/bcm2710-rpi-3-b.dts
|
||
|
@@ -96,6 +96,11 @@
|
||
|
};
|
||
|
|
||
|
&firmware {
|
||
|
+ firmware_clocks: clocks {
|
||
|
+ compatible = "raspberrypi,firmware-clocks";
|
||
|
+ #clock-cells = <1>;
|
||
|
+ };
|
||
|
+
|
||
|
expgpio: expgpio {
|
||
|
compatible = "raspberrypi,firmware-gpio";
|
||
|
gpio-controller;
|
||
|
--- a/arch/arm/boot/dts/bcm2710-rpi-cm3.dts
|
||
|
+++ b/arch/arm/boot/dts/bcm2710-rpi-cm3.dts
|
||
|
@@ -58,6 +58,11 @@
|
||
|
};
|
||
|
|
||
|
&firmware {
|
||
|
+ firmware_clocks: clocks {
|
||
|
+ compatible = "raspberrypi,firmware-clocks";
|
||
|
+ #clock-cells = <1>;
|
||
|
+ };
|
||
|
+
|
||
|
expgpio: expgpio {
|
||
|
compatible = "raspberrypi,firmware-gpio";
|
||
|
gpio-controller;
|
||
|
--- a/arch/arm/boot/dts/bcm2711-rpi-4-b.dts
|
||
|
+++ b/arch/arm/boot/dts/bcm2711-rpi-4-b.dts
|
||
|
@@ -54,6 +54,11 @@
|
||
|
};
|
||
|
|
||
|
&firmware {
|
||
|
+ firmware_clocks: clocks {
|
||
|
+ compatible = "raspberrypi,firmware-clocks";
|
||
|
+ #clock-cells = <1>;
|
||
|
+ };
|
||
|
+
|
||
|
expgpio: gpio {
|
||
|
compatible = "raspberrypi,firmware-gpio";
|
||
|
gpio-controller;
|
||
|
--- a/arch/arm/boot/dts/bcm2711.dtsi
|
||
|
+++ b/arch/arm/boot/dts/bcm2711.dtsi
|
||
|
@@ -24,12 +24,6 @@
|
||
|
clock-output-names = "108MHz-clock";
|
||
|
};
|
||
|
|
||
|
- firmware_clocks: firmware-clocks {
|
||
|
- compatible = "raspberrypi,firmware-clocks";
|
||
|
- raspberrypi,firmware = <&firmware>;
|
||
|
- #clock-cells = <1>;
|
||
|
- };
|
||
|
-
|
||
|
soc {
|
||
|
/*
|
||
|
* Defined ranges:
|
||
|
--- a/arch/arm/boot/dts/bcm2837-rpi-3-a-plus.dts
|
||
|
+++ b/arch/arm/boot/dts/bcm2837-rpi-3-a-plus.dts
|
||
|
@@ -31,6 +31,11 @@
|
||
|
};
|
||
|
|
||
|
&firmware {
|
||
|
+ firmware_clocks: clocks {
|
||
|
+ compatible = "raspberrypi,firmware-clocks";
|
||
|
+ #clock-cells = <1>;
|
||
|
+ };
|
||
|
+
|
||
|
expgpio: gpio {
|
||
|
compatible = "raspberrypi,firmware-gpio";
|
||
|
gpio-controller;
|
||
|
--- a/arch/arm/boot/dts/bcm2837-rpi-3-b-plus.dts
|
||
|
+++ b/arch/arm/boot/dts/bcm2837-rpi-3-b-plus.dts
|
||
|
@@ -37,6 +37,11 @@
|
||
|
};
|
||
|
|
||
|
&firmware {
|
||
|
+ firmware_clocks: clocks {
|
||
|
+ compatible = "raspberrypi,firmware-clocks";
|
||
|
+ #clock-cells = <1>;
|
||
|
+ };
|
||
|
+
|
||
|
expgpio: gpio {
|
||
|
compatible = "raspberrypi,firmware-gpio";
|
||
|
gpio-controller;
|
||
|
--- a/arch/arm/boot/dts/bcm2837-rpi-3-b.dts
|
||
|
+++ b/arch/arm/boot/dts/bcm2837-rpi-3-b.dts
|
||
|
@@ -32,6 +32,11 @@
|
||
|
};
|
||
|
|
||
|
&firmware {
|
||
|
+ firmware_clocks: clocks {
|
||
|
+ compatible = "raspberrypi,firmware-clocks";
|
||
|
+ #clock-cells = <1>;
|
||
|
+ };
|
||
|
+
|
||
|
expgpio: gpio {
|
||
|
compatible = "raspberrypi,firmware-gpio";
|
||
|
gpio-controller;
|
||
|
--- a/arch/arm/boot/dts/bcm2837-rpi-cm3.dtsi
|
||
|
+++ b/arch/arm/boot/dts/bcm2837-rpi-cm3.dtsi
|
||
|
@@ -35,6 +35,11 @@
|
||
|
};
|
||
|
|
||
|
&firmware {
|
||
|
+ firmware_clocks: clocks {
|
||
|
+ compatible = "raspberrypi,firmware-clocks";
|
||
|
+ #clock-cells = <1>;
|
||
|
+ };
|
||
|
+
|
||
|
expgpio: gpio {
|
||
|
compatible = "raspberrypi,firmware-gpio";
|
||
|
gpio-controller;
|
||
|
--- a/drivers/clk/bcm/clk-raspberrypi.c
|
||
|
+++ b/drivers/clk/bcm/clk-raspberrypi.c
|
||
|
@@ -383,13 +383,23 @@ static int raspberrypi_clk_probe(struct
|
||
|
struct raspberrypi_clk *rpi;
|
||
|
int ret;
|
||
|
|
||
|
- firmware_node = of_parse_phandle(dev->of_node, "raspberrypi,firmware", 0);
|
||
|
+ /*
|
||
|
+ * We can be probed either through the an old-fashioned
|
||
|
+ * platform device registration or through a DT node that is a
|
||
|
+ * child of the firmware node. Handle both cases.
|
||
|
+ */
|
||
|
+ if (dev->of_node)
|
||
|
+ firmware_node = of_get_parent(dev->of_node);
|
||
|
+ else
|
||
|
+ firmware_node = of_find_compatible_node(NULL, NULL,
|
||
|
+ "raspberrypi,bcm2835-firmware");
|
||
|
if (!firmware_node) {
|
||
|
dev_err(dev, "Missing firmware node\n");
|
||
|
return -ENOENT;
|
||
|
}
|
||
|
|
||
|
firmware = rpi_firmware_get(firmware_node);
|
||
|
+ of_node_put(firmware_node);
|
||
|
if (!firmware)
|
||
|
return -EPROBE_DEFER;
|
||
|
|