diff mbox series

[v4,3/4] arm64: dts: meson: Add DDR PMU node

Message ID 20220805071426.2598818-3-jiucheng.xu@amlogic.com (mailing list archive)
State Superseded
Headers show
Series [v4,1/4] perf/amlogic: Add support for Amlogic meson G12 SoC DDR PMU driver | expand

Commit Message

Jiucheng Xu Aug. 5, 2022, 7:14 a.m. UTC
Add DDR PMU device node for G12 series SoC

Signed-off-by: Jiucheng Xu <jiucheng.xu@amlogic.com>
---
Changes v3 -> v4:
  - No change

Changes v2 -> v3:
  - No change

Changes v1 -> v2:
  - Remove model, dmc_nr, chann_nr properties
  - Add g12a-ddr-pmu, g12b-ddr-pmu, sm1-ddr-pmu compatibles as
    identifier
---
 arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi | 7 +++++++
 arch/arm64/boot/dts/amlogic/meson-g12a.dtsi       | 4 ++++
 arch/arm64/boot/dts/amlogic/meson-g12b.dtsi       | 4 ++++
 arch/arm64/boot/dts/amlogic/meson-sm1.dtsi        | 4 ++++
 4 files changed, 19 insertions(+)

Comments

Krzysztof Kozlowski Aug. 5, 2022, 8:22 a.m. UTC | #1
On 05/08/2022 09:14, Jiucheng Xu wrote:
> Add DDR PMU device node for G12 series SoC
> 
> Signed-off-by: Jiucheng Xu <jiucheng.xu@amlogic.com>
> ---
> Changes v3 -> v4:
>   - No change
> 
> Changes v2 -> v3:
>   - No change
> 
> Changes v1 -> v2:
>   - Remove model, dmc_nr, chann_nr properties
>   - Add g12a-ddr-pmu, g12b-ddr-pmu, sm1-ddr-pmu compatibles as
>     identifier
> ---
>  arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi | 7 +++++++
>  arch/arm64/boot/dts/amlogic/meson-g12a.dtsi       | 4 ++++
>  arch/arm64/boot/dts/amlogic/meson-g12b.dtsi       | 4 ++++
>  arch/arm64/boot/dts/amlogic/meson-sm1.dtsi        | 4 ++++
>  4 files changed, 19 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
> index 45947c1031c4..7e556fe575be 100644
> --- a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
> +++ b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
> @@ -2146,6 +2146,13 @@ hdmi_tx_out: endpoint {
>  			};
>  		};
>  
> +		ddr_pmu: ddr_pmu@ff638000 {

No underscores in node names.

Node names should be generic, so pmu.
https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation

> +			compatible = "amlogic,g12-ddr-pmu";
> +			reg = <0x0 0xff638000 0x0 0x100
> +			       0x0 0xff638c00 0x0 0x100>;
> +			interrupts = <GIC_SPI 52 IRQ_TYPE_EDGE_RISING>;
> +		};
> +
>  		gic: interrupt-controller@ffc01000 {
>  			compatible = "arm,gic-400";
>  			reg = <0x0 0xffc01000 0 0x1000>,
> diff --git a/arch/arm64/boot/dts/amlogic/meson-g12a.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12a.dtsi
> index fb0ab27d1f64..4a32e081e70e 100644
> --- a/arch/arm64/boot/dts/amlogic/meson-g12a.dtsi
> +++ b/arch/arm64/boot/dts/amlogic/meson-g12a.dtsi
> @@ -133,3 +133,7 @@ map1 {
>  		};
>  	};
>  };
> +
> +&ddr_pmu {
> +	compatible = "amlogic,g12a-ddr-pmu";
> +};

Adding nodes at the end causes conflicts. They should be added in some
order...

Best regards,
Krzysztof
Jiucheng Xu Aug. 5, 2022, 9:57 a.m. UTC | #2
On 2022/8/5 16:22, Krzysztof Kozlowski wrote:
> [ EXTERNAL EMAIL ]
>
> On 05/08/2022 09:14, Jiucheng Xu wrote:
>> Add DDR PMU device node for G12 series SoC
>>
>> Signed-off-by: Jiucheng Xu <jiucheng.xu@amlogic.com>
>> ---
>> Changes v3 -> v4:
>>    - No change
>>
>> Changes v2 -> v3:
>>    - No change
>>
>> Changes v1 -> v2:
>>    - Remove model, dmc_nr, chann_nr properties
>>    - Add g12a-ddr-pmu, g12b-ddr-pmu, sm1-ddr-pmu compatibles as
>>      identifier
>> ---
>>   arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi | 7 +++++++
>>   arch/arm64/boot/dts/amlogic/meson-g12a.dtsi       | 4 ++++
>>   arch/arm64/boot/dts/amlogic/meson-g12b.dtsi       | 4 ++++
>>   arch/arm64/boot/dts/amlogic/meson-sm1.dtsi        | 4 ++++
>>   4 files changed, 19 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
>> index 45947c1031c4..7e556fe575be 100644
>> --- a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
>> +++ b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
>> @@ -2146,6 +2146,13 @@ hdmi_tx_out: endpoint {
>>   			};
>>   		};
>>   
>> +		ddr_pmu: ddr_pmu@ff638000 {
> No underscores in node names.
>
> Node names should be generic, so pmu.
> https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation
Okay, I will modify it.
>
>> +			compatible = "amlogic,g12-ddr-pmu";
>> +			reg = <0x0 0xff638000 0x0 0x100
>> +			       0x0 0xff638c00 0x0 0x100>;
>> +			interrupts = <GIC_SPI 52 IRQ_TYPE_EDGE_RISING>;
>> +		};
>> +
>>   		gic: interrupt-controller@ffc01000 {
>>   			compatible = "arm,gic-400";
>>   			reg = <0x0 0xffc01000 0 0x1000>,
>> diff --git a/arch/arm64/boot/dts/amlogic/meson-g12a.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12a.dtsi
>> index fb0ab27d1f64..4a32e081e70e 100644
>> --- a/arch/arm64/boot/dts/amlogic/meson-g12a.dtsi
>> +++ b/arch/arm64/boot/dts/amlogic/meson-g12a.dtsi
>> @@ -133,3 +133,7 @@ map1 {
>>   		};
>>   	};
>>   };
>> +
>> +&ddr_pmu {
>> +	compatible = "amlogic,g12a-ddr-pmu";
>> +};
> Adding nodes at the end causes conflicts. They should be added in some
> order...
Is alphabetical order okay?
>
> Best regards,
> Krzysztof
>
Krzysztof Kozlowski Aug. 8, 2022, 6:14 a.m. UTC | #3
On 05/08/2022 11:57, Jiucheng Xu wrote:
>>> +&ddr_pmu {
>>> +	compatible = "amlogic,g12a-ddr-pmu";
>>> +};
>> Adding nodes at the end causes conflicts. They should be added in some
>> order...
> Is alphabetical order okay?

Yes.


Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
index 45947c1031c4..7e556fe575be 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
@@ -2146,6 +2146,13 @@  hdmi_tx_out: endpoint {
 			};
 		};
 
+		ddr_pmu: ddr_pmu@ff638000 {
+			compatible = "amlogic,g12-ddr-pmu";
+			reg = <0x0 0xff638000 0x0 0x100
+			       0x0 0xff638c00 0x0 0x100>;
+			interrupts = <GIC_SPI 52 IRQ_TYPE_EDGE_RISING>;
+		};
+
 		gic: interrupt-controller@ffc01000 {
 			compatible = "arm,gic-400";
 			reg = <0x0 0xffc01000 0 0x1000>,
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12a.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12a.dtsi
index fb0ab27d1f64..4a32e081e70e 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12a.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-g12a.dtsi
@@ -133,3 +133,7 @@  map1 {
 		};
 	};
 };
+
+&ddr_pmu {
+	compatible = "amlogic,g12a-ddr-pmu";
+};
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b.dtsi
index ee8fcae9f9f0..d91eca5a9afc 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12b.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b.dtsi
@@ -139,3 +139,7 @@  map1 {
 &mali {
 	dma-coherent;
 };
+
+&ddr_pmu {
+	compatible = "amlogic,g12b-ddr-pmu";
+};
diff --git a/arch/arm64/boot/dts/amlogic/meson-sm1.dtsi b/arch/arm64/boot/dts/amlogic/meson-sm1.dtsi
index 80737731af3f..7d62c661fde5 100644
--- a/arch/arm64/boot/dts/amlogic/meson-sm1.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-sm1.dtsi
@@ -543,3 +543,7 @@  &vpu {
 &usb {
 	power-domains = <&pwrc PWRC_SM1_USB_ID>;
 };
+
+&ddr_pmu {
+	compatible = "amlogic,sm1-ddr-pmu";
+};