Re: [PATCH v3 1/7] dt/bindings: Add binding for the Raspberry Pi clock provider
On 07/24/2015 09:30 AM, Lee Jones wrote: > On Tue, 07 Jul 2015, Eric Anholt wrote: > >> Lee Jones writes: >> >>> If I were the Clock Maintainer, I would have probably missed this >>> patch. You _must_ intimate which subsystem you are submitting to. >>> The hardware clocks are not controllable by the ARM, so we have to make requests to the firmware to do so from the VPU side. This will let us replace fixed clocks in our DT with actual clock control (and correct frequency information). v2: Include the dt-bindings header in this commit instead of the next one. Make the clock indices match the firmware clock IDs. Rename the binding's compat string. Move the firmware phandle to be under a vendor-specific namespace. Signed-off-by: Eric Anholt --- .../clock/raspberrypi,bcm2835-firmware-clocks.txt | 25 ++ include/dt-bindings/clk/raspberrypi.h | 23 2 files changed, 48 insertions(+) create mode 100644 Documentation/devicetree/bindings/clock/raspberrypi,bcm2835-firmware-clocks.txt create mode 100644 include/dt-bindings/clk/raspberrypi.h diff --git a/Documentation/devicetree/bindings/clock/raspberrypi,bcm2835-firmware-clocks.txt b/Documentation/devicetree/bindings/clock/raspberrypi,bcm2835-firmware-clocks.txt new file mode 100644 index 000..0972602 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/raspberrypi,bcm2835-firmware-clocks.txt @@ -0,0 +1,25 @@ +Raspberry Pi firmware clock provider. + +The Raspberry Pi architecture doesn't provide direct access to the +CLOCKMAN peripheral from the ARM side, so Linux has to make requests +to the VPU firmware to program them. + +This binding uses the common clock binding: +Documentation/devicetree/bindings/clock/clock-bindings.txt + +Required properties: +- compatible: Should be "raspberrypi,bcm2835-firmware-clocks" + +- #clock-cells: Shall have value <1>. The permitted clock-specifier +values can be found in +include/dt-bindings/clk/raspberrypi.h. + +- raspberrypi,firmware: Phandle to the firmware driver node. >>> >>> I think 'firmware' is a candidate for a generic phandle name. >> >> Stephen Warren asked in the last version that I change it from >> "firmware" to "raspberrypi,firmware", which made sense to me since we're >> not some core infrastructure using these references. Which should it >> be? > > We tend to use vendor specific bindings when others are unlikely to > make use of them. I would have thought that different vendors would > also make use of a generic 'firmware' phandle. The final decision > would probably be taken by the DT guys. I wouldn't expect there to be a need for a common firmware API for firmwares that don't implement some common standard (such as ACPI), since the operations supported by the firmwares will be firmware-specific, and hence not be amenable to generic clients (a client of the raspberrypi,firmware object may "translate" it to standard APIs such as clock, power domains, etc., while allowing other clients access to all the custom features). As such, I expect using a generic property name here isn't that useful. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v3 1/7] dt/bindings: Add binding for the Raspberry Pi clock provider
On 07/24/2015 09:30 AM, Lee Jones wrote: On Tue, 07 Jul 2015, Eric Anholt wrote: Lee Jones l...@kernel.org writes: If I were the Clock Maintainer, I would have probably missed this patch. You _must_ intimate which subsystem you are submitting to. The hardware clocks are not controllable by the ARM, so we have to make requests to the firmware to do so from the VPU side. This will let us replace fixed clocks in our DT with actual clock control (and correct frequency information). v2: Include the dt-bindings header in this commit instead of the next one. Make the clock indices match the firmware clock IDs. Rename the binding's compat string. Move the firmware phandle to be under a vendor-specific namespace. Signed-off-by: Eric Anholt e...@anholt.net --- .../clock/raspberrypi,bcm2835-firmware-clocks.txt | 25 ++ include/dt-bindings/clk/raspberrypi.h | 23 2 files changed, 48 insertions(+) create mode 100644 Documentation/devicetree/bindings/clock/raspberrypi,bcm2835-firmware-clocks.txt create mode 100644 include/dt-bindings/clk/raspberrypi.h diff --git a/Documentation/devicetree/bindings/clock/raspberrypi,bcm2835-firmware-clocks.txt b/Documentation/devicetree/bindings/clock/raspberrypi,bcm2835-firmware-clocks.txt new file mode 100644 index 000..0972602 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/raspberrypi,bcm2835-firmware-clocks.txt @@ -0,0 +1,25 @@ +Raspberry Pi firmware clock provider. + +The Raspberry Pi architecture doesn't provide direct access to the +CLOCKMAN peripheral from the ARM side, so Linux has to make requests +to the VPU firmware to program them. + +This binding uses the common clock binding: +Documentation/devicetree/bindings/clock/clock-bindings.txt + +Required properties: +- compatible: Should be raspberrypi,bcm2835-firmware-clocks + +- #clock-cells: Shall have value 1. The permitted clock-specifier +values can be found in +include/dt-bindings/clk/raspberrypi.h. + +- raspberrypi,firmware: Phandle to the firmware driver node. I think 'firmware' is a candidate for a generic phandle name. Stephen Warren asked in the last version that I change it from firmware to raspberrypi,firmware, which made sense to me since we're not some core infrastructure using these references. Which should it be? We tend to use vendor specific bindings when others are unlikely to make use of them. I would have thought that different vendors would also make use of a generic 'firmware' phandle. The final decision would probably be taken by the DT guys. I wouldn't expect there to be a need for a common firmware API for firmwares that don't implement some common standard (such as ACPI), since the operations supported by the firmwares will be firmware-specific, and hence not be amenable to generic clients (a client of the raspberrypi,firmware object may translate it to standard APIs such as clock, power domains, etc., while allowing other clients access to all the custom features). As such, I expect using a generic property name here isn't that useful. -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v3 1/7] dt/bindings: Add binding for the Raspberry Pi clock provider
On Tue, 07 Jul 2015, Eric Anholt wrote: > Lee Jones writes: > > > If I were the Clock Maintainer, I would have probably missed this > > patch. You _must_ intimate which subsystem you are submitting to. > > > >> The hardware clocks are not controllable by the ARM, so we have to > >> make requests to the firmware to do so from the VPU side. This will > >> let us replace fixed clocks in our DT with actual clock control (and > >> correct frequency information). > >> > >> v2: Include the dt-bindings header in this commit instead of the next > >> one. Make the clock indices match the firmware clock IDs. Rename > >> the binding's compat string. Move the firmware phandle to be > >> under a vendor-specific namespace. > >> > >> Signed-off-by: Eric Anholt > >> --- > >> .../clock/raspberrypi,bcm2835-firmware-clocks.txt | 25 > >> ++ > >> include/dt-bindings/clk/raspberrypi.h | 23 > >> > >> 2 files changed, 48 insertions(+) > >> create mode 100644 > >> Documentation/devicetree/bindings/clock/raspberrypi,bcm2835-firmware-clocks.txt > >> create mode 100644 include/dt-bindings/clk/raspberrypi.h > >> > >> diff --git > >> a/Documentation/devicetree/bindings/clock/raspberrypi,bcm2835-firmware-clocks.txt > >> > >> b/Documentation/devicetree/bindings/clock/raspberrypi,bcm2835-firmware-clocks.txt > >> new file mode 100644 > >> index 000..0972602 > >> --- /dev/null > >> +++ > >> b/Documentation/devicetree/bindings/clock/raspberrypi,bcm2835-firmware-clocks.txt > >> @@ -0,0 +1,25 @@ > >> +Raspberry Pi firmware clock provider. > >> + > >> +The Raspberry Pi architecture doesn't provide direct access to the > >> +CLOCKMAN peripheral from the ARM side, so Linux has to make requests > >> +to the VPU firmware to program them. > >> + > >> +This binding uses the common clock binding: > >> +Documentation/devicetree/bindings/clock/clock-bindings.txt > >> + > >> +Required properties: > >> +- compatible: Should be "raspberrypi,bcm2835-firmware-clocks" > >> + > >> +- #clock-cells: Shall have value <1>. The permitted > >> clock-specifier > >> +values can be found in > >> +include/dt-bindings/clk/raspberrypi.h. > >> + > >> +- raspberrypi,firmware: Phandle to the firmware driver node. > > > > I think 'firmware' is a candidate for a generic phandle name. > > Stephen Warren asked in the last version that I change it from > "firmware" to "raspberrypi,firmware", which made sense to me since we're > not some core infrastructure using these references. Which should it > be? We tend to use vendor specific bindings when others are unlikely to make use of them. I would have thought that different vendors would also make use of a generic 'firmware' phandle. The final decision would probably be taken by the DT guys. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v3 1/7] dt/bindings: Add binding for the Raspberry Pi clock provider
On Tue, 07 Jul 2015, Eric Anholt wrote: Lee Jones l...@kernel.org writes: If I were the Clock Maintainer, I would have probably missed this patch. You _must_ intimate which subsystem you are submitting to. The hardware clocks are not controllable by the ARM, so we have to make requests to the firmware to do so from the VPU side. This will let us replace fixed clocks in our DT with actual clock control (and correct frequency information). v2: Include the dt-bindings header in this commit instead of the next one. Make the clock indices match the firmware clock IDs. Rename the binding's compat string. Move the firmware phandle to be under a vendor-specific namespace. Signed-off-by: Eric Anholt e...@anholt.net --- .../clock/raspberrypi,bcm2835-firmware-clocks.txt | 25 ++ include/dt-bindings/clk/raspberrypi.h | 23 2 files changed, 48 insertions(+) create mode 100644 Documentation/devicetree/bindings/clock/raspberrypi,bcm2835-firmware-clocks.txt create mode 100644 include/dt-bindings/clk/raspberrypi.h diff --git a/Documentation/devicetree/bindings/clock/raspberrypi,bcm2835-firmware-clocks.txt b/Documentation/devicetree/bindings/clock/raspberrypi,bcm2835-firmware-clocks.txt new file mode 100644 index 000..0972602 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/raspberrypi,bcm2835-firmware-clocks.txt @@ -0,0 +1,25 @@ +Raspberry Pi firmware clock provider. + +The Raspberry Pi architecture doesn't provide direct access to the +CLOCKMAN peripheral from the ARM side, so Linux has to make requests +to the VPU firmware to program them. + +This binding uses the common clock binding: +Documentation/devicetree/bindings/clock/clock-bindings.txt + +Required properties: +- compatible: Should be raspberrypi,bcm2835-firmware-clocks + +- #clock-cells: Shall have value 1. The permitted clock-specifier +values can be found in +include/dt-bindings/clk/raspberrypi.h. + +- raspberrypi,firmware: Phandle to the firmware driver node. I think 'firmware' is a candidate for a generic phandle name. Stephen Warren asked in the last version that I change it from firmware to raspberrypi,firmware, which made sense to me since we're not some core infrastructure using these references. Which should it be? We tend to use vendor specific bindings when others are unlikely to make use of them. I would have thought that different vendors would also make use of a generic 'firmware' phandle. The final decision would probably be taken by the DT guys. -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v3 1/7] dt/bindings: Add binding for the Raspberry Pi clock provider
Lee Jones writes: > If I were the Clock Maintainer, I would have probably missed this > patch. You _must_ intimate which subsystem you are submitting to. > >> The hardware clocks are not controllable by the ARM, so we have to >> make requests to the firmware to do so from the VPU side. This will >> let us replace fixed clocks in our DT with actual clock control (and >> correct frequency information). >> >> v2: Include the dt-bindings header in this commit instead of the next >> one. Make the clock indices match the firmware clock IDs. Rename >> the binding's compat string. Move the firmware phandle to be >> under a vendor-specific namespace. >> >> Signed-off-by: Eric Anholt >> --- >> .../clock/raspberrypi,bcm2835-firmware-clocks.txt | 25 >> ++ >> include/dt-bindings/clk/raspberrypi.h | 23 >> 2 files changed, 48 insertions(+) >> create mode 100644 >> Documentation/devicetree/bindings/clock/raspberrypi,bcm2835-firmware-clocks.txt >> create mode 100644 include/dt-bindings/clk/raspberrypi.h >> >> diff --git >> a/Documentation/devicetree/bindings/clock/raspberrypi,bcm2835-firmware-clocks.txt >> >> b/Documentation/devicetree/bindings/clock/raspberrypi,bcm2835-firmware-clocks.txt >> new file mode 100644 >> index 000..0972602 >> --- /dev/null >> +++ >> b/Documentation/devicetree/bindings/clock/raspberrypi,bcm2835-firmware-clocks.txt >> @@ -0,0 +1,25 @@ >> +Raspberry Pi firmware clock provider. >> + >> +The Raspberry Pi architecture doesn't provide direct access to the >> +CLOCKMAN peripheral from the ARM side, so Linux has to make requests >> +to the VPU firmware to program them. >> + >> +This binding uses the common clock binding: >> +Documentation/devicetree/bindings/clock/clock-bindings.txt >> + >> +Required properties: >> +- compatible: Should be "raspberrypi,bcm2835-firmware-clocks" >> + >> +- #clock-cells: Shall have value <1>. The permitted >> clock-specifier >> + values can be found in >> + include/dt-bindings/clk/raspberrypi.h. >> + >> +- raspberrypi,firmware: Phandle to the firmware driver node. > > I think 'firmware' is a candidate for a generic phandle name. Stephen Warren asked in the last version that I change it from "firmware" to "raspberrypi,firmware", which made sense to me since we're not some core infrastructure using these references. Which should it be? signature.asc Description: PGP signature
Re: [PATCH v3 1/7] dt/bindings: Add binding for the Raspberry Pi clock provider
Lee Jones l...@kernel.org writes: If I were the Clock Maintainer, I would have probably missed this patch. You _must_ intimate which subsystem you are submitting to. The hardware clocks are not controllable by the ARM, so we have to make requests to the firmware to do so from the VPU side. This will let us replace fixed clocks in our DT with actual clock control (and correct frequency information). v2: Include the dt-bindings header in this commit instead of the next one. Make the clock indices match the firmware clock IDs. Rename the binding's compat string. Move the firmware phandle to be under a vendor-specific namespace. Signed-off-by: Eric Anholt e...@anholt.net --- .../clock/raspberrypi,bcm2835-firmware-clocks.txt | 25 ++ include/dt-bindings/clk/raspberrypi.h | 23 2 files changed, 48 insertions(+) create mode 100644 Documentation/devicetree/bindings/clock/raspberrypi,bcm2835-firmware-clocks.txt create mode 100644 include/dt-bindings/clk/raspberrypi.h diff --git a/Documentation/devicetree/bindings/clock/raspberrypi,bcm2835-firmware-clocks.txt b/Documentation/devicetree/bindings/clock/raspberrypi,bcm2835-firmware-clocks.txt new file mode 100644 index 000..0972602 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/raspberrypi,bcm2835-firmware-clocks.txt @@ -0,0 +1,25 @@ +Raspberry Pi firmware clock provider. + +The Raspberry Pi architecture doesn't provide direct access to the +CLOCKMAN peripheral from the ARM side, so Linux has to make requests +to the VPU firmware to program them. + +This binding uses the common clock binding: +Documentation/devicetree/bindings/clock/clock-bindings.txt + +Required properties: +- compatible: Should be raspberrypi,bcm2835-firmware-clocks + +- #clock-cells: Shall have value 1. The permitted clock-specifier + values can be found in + include/dt-bindings/clk/raspberrypi.h. + +- raspberrypi,firmware: Phandle to the firmware driver node. I think 'firmware' is a candidate for a generic phandle name. Stephen Warren asked in the last version that I change it from firmware to raspberrypi,firmware, which made sense to me since we're not some core infrastructure using these references. Which should it be? signature.asc Description: PGP signature
Re: [PATCH v3 1/7] dt/bindings: Add binding for the Raspberry Pi clock provider
If I were the Clock Maintainer, I would have probably missed this patch. You _must_ intimate which subsystem you are submitting to. > The hardware clocks are not controllable by the ARM, so we have to > make requests to the firmware to do so from the VPU side. This will > let us replace fixed clocks in our DT with actual clock control (and > correct frequency information). > > v2: Include the dt-bindings header in this commit instead of the next > one. Make the clock indices match the firmware clock IDs. Rename > the binding's compat string. Move the firmware phandle to be > under a vendor-specific namespace. > > Signed-off-by: Eric Anholt > --- > .../clock/raspberrypi,bcm2835-firmware-clocks.txt | 25 > ++ > include/dt-bindings/clk/raspberrypi.h | 23 > 2 files changed, 48 insertions(+) > create mode 100644 > Documentation/devicetree/bindings/clock/raspberrypi,bcm2835-firmware-clocks.txt > create mode 100644 include/dt-bindings/clk/raspberrypi.h > > diff --git > a/Documentation/devicetree/bindings/clock/raspberrypi,bcm2835-firmware-clocks.txt > > b/Documentation/devicetree/bindings/clock/raspberrypi,bcm2835-firmware-clocks.txt > new file mode 100644 > index 000..0972602 > --- /dev/null > +++ > b/Documentation/devicetree/bindings/clock/raspberrypi,bcm2835-firmware-clocks.txt > @@ -0,0 +1,25 @@ > +Raspberry Pi firmware clock provider. > + > +The Raspberry Pi architecture doesn't provide direct access to the > +CLOCKMAN peripheral from the ARM side, so Linux has to make requests > +to the VPU firmware to program them. > + > +This binding uses the common clock binding: > +Documentation/devicetree/bindings/clock/clock-bindings.txt > + > +Required properties: > +- compatible:Should be "raspberrypi,bcm2835-firmware-clocks" > + > +- #clock-cells: Shall have value <1>. The permitted > clock-specifier > + values can be found in > + include/dt-bindings/clk/raspberrypi.h. > + > +- raspberrypi,firmware: Phandle to the firmware driver node. I think 'firmware' is a candidate for a generic phandle name. Apart from that, binding looks pretty inert: Acked-by: Lee Jones > +Example: > + > +firmware_clocks: firmware-clocks { > + compatible = "raspberrypi,bcm2835-firmware-clocks"; > + #clock-cells = <1>; > + raspberrypi,firmware = <>; > +}; > diff --git a/include/dt-bindings/clk/raspberrypi.h > b/include/dt-bindings/clk/raspberrypi.h > new file mode 100644 > index 000..ceec90f > --- /dev/null > +++ b/include/dt-bindings/clk/raspberrypi.h > @@ -0,0 +1,23 @@ > +#/* > + * Copyright © 2015 Broadcom > + * > + * This program is free software; you can redistribute it and/or modify > + * it under the terms of the GNU General Public License version 2 as > + * published by the Free Software Foundation. > + */ > + > +#ifndef _DT_BINDINGS_CLK_RASPBERRYPI_H > +#define _DT_BINDINGS_CLK_RASPBERRYPI_H > + > +#define RPI_CLOCK_EMMC 1 > +#define RPI_CLOCK_UART0 2 > +#define RPI_CLOCK_ARM3 > +#define RPI_CLOCK_CORE 4 > +#define RPI_CLOCK_V3D5 > +#define RPI_CLOCK_H264 6 > +#define RPI_CLOCK_ISP7 > +#define RPI_CLOCK_SDRAM 8 > +#define RPI_CLOCK_PIXEL 9 > +#define RPI_CLOCK_PWM10 > + > +#endif -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v3 1/7] dt/bindings: Add binding for the Raspberry Pi clock provider
If I were the Clock Maintainer, I would have probably missed this patch. You _must_ intimate which subsystem you are submitting to. The hardware clocks are not controllable by the ARM, so we have to make requests to the firmware to do so from the VPU side. This will let us replace fixed clocks in our DT with actual clock control (and correct frequency information). v2: Include the dt-bindings header in this commit instead of the next one. Make the clock indices match the firmware clock IDs. Rename the binding's compat string. Move the firmware phandle to be under a vendor-specific namespace. Signed-off-by: Eric Anholt e...@anholt.net --- .../clock/raspberrypi,bcm2835-firmware-clocks.txt | 25 ++ include/dt-bindings/clk/raspberrypi.h | 23 2 files changed, 48 insertions(+) create mode 100644 Documentation/devicetree/bindings/clock/raspberrypi,bcm2835-firmware-clocks.txt create mode 100644 include/dt-bindings/clk/raspberrypi.h diff --git a/Documentation/devicetree/bindings/clock/raspberrypi,bcm2835-firmware-clocks.txt b/Documentation/devicetree/bindings/clock/raspberrypi,bcm2835-firmware-clocks.txt new file mode 100644 index 000..0972602 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/raspberrypi,bcm2835-firmware-clocks.txt @@ -0,0 +1,25 @@ +Raspberry Pi firmware clock provider. + +The Raspberry Pi architecture doesn't provide direct access to the +CLOCKMAN peripheral from the ARM side, so Linux has to make requests +to the VPU firmware to program them. + +This binding uses the common clock binding: +Documentation/devicetree/bindings/clock/clock-bindings.txt + +Required properties: +- compatible:Should be raspberrypi,bcm2835-firmware-clocks + +- #clock-cells: Shall have value 1. The permitted clock-specifier + values can be found in + include/dt-bindings/clk/raspberrypi.h. + +- raspberrypi,firmware: Phandle to the firmware driver node. I think 'firmware' is a candidate for a generic phandle name. Apart from that, binding looks pretty inert: Acked-by: Lee Jones l...@kernel.org +Example: + +firmware_clocks: firmware-clocks { + compatible = raspberrypi,bcm2835-firmware-clocks; + #clock-cells = 1; + raspberrypi,firmware = firmware; +}; diff --git a/include/dt-bindings/clk/raspberrypi.h b/include/dt-bindings/clk/raspberrypi.h new file mode 100644 index 000..ceec90f --- /dev/null +++ b/include/dt-bindings/clk/raspberrypi.h @@ -0,0 +1,23 @@ +#/* + * Copyright © 2015 Broadcom + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#ifndef _DT_BINDINGS_CLK_RASPBERRYPI_H +#define _DT_BINDINGS_CLK_RASPBERRYPI_H + +#define RPI_CLOCK_EMMC 1 +#define RPI_CLOCK_UART0 2 +#define RPI_CLOCK_ARM3 +#define RPI_CLOCK_CORE 4 +#define RPI_CLOCK_V3D5 +#define RPI_CLOCK_H264 6 +#define RPI_CLOCK_ISP7 +#define RPI_CLOCK_SDRAM 8 +#define RPI_CLOCK_PIXEL 9 +#define RPI_CLOCK_PWM10 + +#endif -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v3 1/7] dt/bindings: Add binding for the Raspberry Pi clock provider
Eric Anholt writes: > The hardware clocks are not controllable by the ARM, so we have to > make requests to the firmware to do so from the VPU side. This will > let us replace fixed clocks in our DT with actual clock control (and > correct frequency information). > > v2: Include the dt-bindings header in this commit instead of the next > one. Make the clock indices match the firmware clock IDs. Rename > the binding's compat string. Move the firmware phandle to be > under a vendor-specific namespace. Having failed to move the versioning bits below --- again, I'm adding scripting to hopefully catch myself if I'm about to do it again. signature.asc Description: PGP signature
[PATCH v3 1/7] dt/bindings: Add binding for the Raspberry Pi clock provider
The hardware clocks are not controllable by the ARM, so we have to make requests to the firmware to do so from the VPU side. This will let us replace fixed clocks in our DT with actual clock control (and correct frequency information). v2: Include the dt-bindings header in this commit instead of the next one. Make the clock indices match the firmware clock IDs. Rename the binding's compat string. Move the firmware phandle to be under a vendor-specific namespace. Signed-off-by: Eric Anholt --- .../clock/raspberrypi,bcm2835-firmware-clocks.txt | 25 ++ include/dt-bindings/clk/raspberrypi.h | 23 2 files changed, 48 insertions(+) create mode 100644 Documentation/devicetree/bindings/clock/raspberrypi,bcm2835-firmware-clocks.txt create mode 100644 include/dt-bindings/clk/raspberrypi.h diff --git a/Documentation/devicetree/bindings/clock/raspberrypi,bcm2835-firmware-clocks.txt b/Documentation/devicetree/bindings/clock/raspberrypi,bcm2835-firmware-clocks.txt new file mode 100644 index 000..0972602 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/raspberrypi,bcm2835-firmware-clocks.txt @@ -0,0 +1,25 @@ +Raspberry Pi firmware clock provider. + +The Raspberry Pi architecture doesn't provide direct access to the +CLOCKMAN peripheral from the ARM side, so Linux has to make requests +to the VPU firmware to program them. + +This binding uses the common clock binding: +Documentation/devicetree/bindings/clock/clock-bindings.txt + +Required properties: +- compatible: Should be "raspberrypi,bcm2835-firmware-clocks" + +- #clock-cells:Shall have value <1>. The permitted clock-specifier + values can be found in + include/dt-bindings/clk/raspberrypi.h. + +- raspberrypi,firmware:Phandle to the firmware driver node. + +Example: + +firmware_clocks: firmware-clocks { + compatible = "raspberrypi,bcm2835-firmware-clocks"; + #clock-cells = <1>; + raspberrypi,firmware = <>; +}; diff --git a/include/dt-bindings/clk/raspberrypi.h b/include/dt-bindings/clk/raspberrypi.h new file mode 100644 index 000..ceec90f --- /dev/null +++ b/include/dt-bindings/clk/raspberrypi.h @@ -0,0 +1,23 @@ +#/* + * Copyright © 2015 Broadcom + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#ifndef _DT_BINDINGS_CLK_RASPBERRYPI_H +#define _DT_BINDINGS_CLK_RASPBERRYPI_H + +#define RPI_CLOCK_EMMC 1 +#define RPI_CLOCK_UART02 +#define RPI_CLOCK_ARM 3 +#define RPI_CLOCK_CORE 4 +#define RPI_CLOCK_V3D 5 +#define RPI_CLOCK_H264 6 +#define RPI_CLOCK_ISP 7 +#define RPI_CLOCK_SDRAM8 +#define RPI_CLOCK_PIXEL9 +#define RPI_CLOCK_PWM 10 + +#endif -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v3 1/7] dt/bindings: Add binding for the Raspberry Pi clock provider
Eric Anholt e...@anholt.net writes: The hardware clocks are not controllable by the ARM, so we have to make requests to the firmware to do so from the VPU side. This will let us replace fixed clocks in our DT with actual clock control (and correct frequency information). v2: Include the dt-bindings header in this commit instead of the next one. Make the clock indices match the firmware clock IDs. Rename the binding's compat string. Move the firmware phandle to be under a vendor-specific namespace. Having failed to move the versioning bits below --- again, I'm adding scripting to hopefully catch myself if I'm about to do it again. signature.asc Description: PGP signature
[PATCH v3 1/7] dt/bindings: Add binding for the Raspberry Pi clock provider
The hardware clocks are not controllable by the ARM, so we have to make requests to the firmware to do so from the VPU side. This will let us replace fixed clocks in our DT with actual clock control (and correct frequency information). v2: Include the dt-bindings header in this commit instead of the next one. Make the clock indices match the firmware clock IDs. Rename the binding's compat string. Move the firmware phandle to be under a vendor-specific namespace. Signed-off-by: Eric Anholt e...@anholt.net --- .../clock/raspberrypi,bcm2835-firmware-clocks.txt | 25 ++ include/dt-bindings/clk/raspberrypi.h | 23 2 files changed, 48 insertions(+) create mode 100644 Documentation/devicetree/bindings/clock/raspberrypi,bcm2835-firmware-clocks.txt create mode 100644 include/dt-bindings/clk/raspberrypi.h diff --git a/Documentation/devicetree/bindings/clock/raspberrypi,bcm2835-firmware-clocks.txt b/Documentation/devicetree/bindings/clock/raspberrypi,bcm2835-firmware-clocks.txt new file mode 100644 index 000..0972602 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/raspberrypi,bcm2835-firmware-clocks.txt @@ -0,0 +1,25 @@ +Raspberry Pi firmware clock provider. + +The Raspberry Pi architecture doesn't provide direct access to the +CLOCKMAN peripheral from the ARM side, so Linux has to make requests +to the VPU firmware to program them. + +This binding uses the common clock binding: +Documentation/devicetree/bindings/clock/clock-bindings.txt + +Required properties: +- compatible: Should be raspberrypi,bcm2835-firmware-clocks + +- #clock-cells:Shall have value 1. The permitted clock-specifier + values can be found in + include/dt-bindings/clk/raspberrypi.h. + +- raspberrypi,firmware:Phandle to the firmware driver node. + +Example: + +firmware_clocks: firmware-clocks { + compatible = raspberrypi,bcm2835-firmware-clocks; + #clock-cells = 1; + raspberrypi,firmware = firmware; +}; diff --git a/include/dt-bindings/clk/raspberrypi.h b/include/dt-bindings/clk/raspberrypi.h new file mode 100644 index 000..ceec90f --- /dev/null +++ b/include/dt-bindings/clk/raspberrypi.h @@ -0,0 +1,23 @@ +#/* + * Copyright © 2015 Broadcom + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#ifndef _DT_BINDINGS_CLK_RASPBERRYPI_H +#define _DT_BINDINGS_CLK_RASPBERRYPI_H + +#define RPI_CLOCK_EMMC 1 +#define RPI_CLOCK_UART02 +#define RPI_CLOCK_ARM 3 +#define RPI_CLOCK_CORE 4 +#define RPI_CLOCK_V3D 5 +#define RPI_CLOCK_H264 6 +#define RPI_CLOCK_ISP 7 +#define RPI_CLOCK_SDRAM8 +#define RPI_CLOCK_PIXEL9 +#define RPI_CLOCK_PWM 10 + +#endif -- 2.1.4 -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/