diff mbox series

[v5,5/6] mips: dts: realtek: Add I2C controllers

Message ID 20240925215847.3594898-6-chris.packham@alliedtelesis.co.nz
State New
Headers show
Series RTL9300 support for reboot and i2c | expand

Commit Message

Chris Packham Sept. 25, 2024, 9:58 p.m. UTC
Add the I2C controllers that are part of the RTL9300 SoC.

Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
---

Notes:
    Changes in v5:
    - Update compatibles
    Changes in v4:
    - Skipped due to combining patch series
    Changes in v3:
    - None
    Changes in v2:
    - Use reg property

 arch/mips/boot/dts/realtek/rtl9302c.dtsi |  8 ++++++++
 arch/mips/boot/dts/realtek/rtl930x.dtsi  | 16 ++++++++++++++++
 2 files changed, 24 insertions(+)

Comments

Krzysztof Kozlowski Sept. 26, 2024, 6:37 a.m. UTC | #1
On Thu, Sep 26, 2024 at 09:58:46AM +1200, Chris Packham wrote:
> Add the I2C controllers that are part of the RTL9300 SoC.
> 
> Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
> ---
> 
> Notes:
>     Changes in v5:
>     - Update compatibles
>     Changes in v4:
>     - Skipped due to combining patch series
>     Changes in v3:
>     - None
>     Changes in v2:
>     - Use reg property
> 
>  arch/mips/boot/dts/realtek/rtl9302c.dtsi |  8 ++++++++
>  arch/mips/boot/dts/realtek/rtl930x.dtsi  | 16 ++++++++++++++++
>  2 files changed, 24 insertions(+)
> 
> diff --git a/arch/mips/boot/dts/realtek/rtl9302c.dtsi b/arch/mips/boot/dts/realtek/rtl9302c.dtsi
> index 80d9f407e758..56c35e8b8b62 100644
> --- a/arch/mips/boot/dts/realtek/rtl9302c.dtsi
> +++ b/arch/mips/boot/dts/realtek/rtl9302c.dtsi
> @@ -5,3 +5,11 @@
>  &switch0 {
>  	compatible = "realtek,rtl9302c-switch", "realtek,rtl9300-switch", "syscon", "simple-mfd";
>  };
> +
> +&i2c0 {
> +	compatible = "realtek,rtl9302c-i2c", "realtek,rtl9300-i2c";
> +};
> +
> +&i2c1 {
> +	compatible = "realtek,rtl9302c-i2c", "realtek,rtl9300-i2c";
> +};
> diff --git a/arch/mips/boot/dts/realtek/rtl930x.dtsi b/arch/mips/boot/dts/realtek/rtl930x.dtsi
> index 89b8854596cd..2fb8461af575 100644
> --- a/arch/mips/boot/dts/realtek/rtl930x.dtsi
> +++ b/arch/mips/boot/dts/realtek/rtl930x.dtsi
> @@ -41,6 +41,22 @@ reboot@c {
>  			reg = <0x0c 0x4>;
>  			value = <0x01>;
>  		};
> +
> +		i2c0: i2c@36c {
> +			compatible = "realtek,rtl9300-i2c";
> +			reg = <0x36c 0x14>;
> +			status = "disabled";

Usual convention is to have status the last. Maybe MIPS has different,
so keep whatever is consistent in your case.

Anyway:

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Best regards,
Krzysztof
Chris Packham Sept. 26, 2024, 8:52 p.m. UTC | #2
On 26/09/24 18:37, Krzysztof Kozlowski wrote:
> On Thu, Sep 26, 2024 at 09:58:46AM +1200, Chris Packham wrote:
>> Add the I2C controllers that are part of the RTL9300 SoC.
>>
>> Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
>> ---
>>
>> Notes:
>>      Changes in v5:
>>      - Update compatibles
>>      Changes in v4:
>>      - Skipped due to combining patch series
>>      Changes in v3:
>>      - None
>>      Changes in v2:
>>      - Use reg property
>>
>>   arch/mips/boot/dts/realtek/rtl9302c.dtsi |  8 ++++++++
>>   arch/mips/boot/dts/realtek/rtl930x.dtsi  | 16 ++++++++++++++++
>>   2 files changed, 24 insertions(+)
>>
>> diff --git a/arch/mips/boot/dts/realtek/rtl9302c.dtsi b/arch/mips/boot/dts/realtek/rtl9302c.dtsi
>> index 80d9f407e758..56c35e8b8b62 100644
>> --- a/arch/mips/boot/dts/realtek/rtl9302c.dtsi
>> +++ b/arch/mips/boot/dts/realtek/rtl9302c.dtsi
>> @@ -5,3 +5,11 @@
>>   &switch0 {
>>   	compatible = "realtek,rtl9302c-switch", "realtek,rtl9300-switch", "syscon", "simple-mfd";
>>   };
>> +
>> +&i2c0 {
>> +	compatible = "realtek,rtl9302c-i2c", "realtek,rtl9300-i2c";
>> +};
>> +
>> +&i2c1 {
>> +	compatible = "realtek,rtl9302c-i2c", "realtek,rtl9300-i2c";
>> +};
>> diff --git a/arch/mips/boot/dts/realtek/rtl930x.dtsi b/arch/mips/boot/dts/realtek/rtl930x.dtsi
>> index 89b8854596cd..2fb8461af575 100644
>> --- a/arch/mips/boot/dts/realtek/rtl930x.dtsi
>> +++ b/arch/mips/boot/dts/realtek/rtl930x.dtsi
>> @@ -41,6 +41,22 @@ reboot@c {
>>   			reg = <0x0c 0x4>;
>>   			value = <0x01>;
>>   		};
>> +
>> +		i2c0: i2c@36c {
>> +			compatible = "realtek,rtl9300-i2c";
>> +			reg = <0x36c 0x14>;
>> +			status = "disabled";
> Usual convention is to have status the last. Maybe MIPS has different,
> so keep whatever is consistent in your case.

I'll send out a fixup patch that can be folded into this. Hopefully 
Thomas can combine them at his end (or if there is a need for a v6 I can).

I'll probably have other series touching this file so if the fixup 
doesn't make it now I can include it in a future series.

>
> Anyway:
>
> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>
> Best regards,
> Krzysztof
>
diff mbox series

Patch

diff --git a/arch/mips/boot/dts/realtek/rtl9302c.dtsi b/arch/mips/boot/dts/realtek/rtl9302c.dtsi
index 80d9f407e758..56c35e8b8b62 100644
--- a/arch/mips/boot/dts/realtek/rtl9302c.dtsi
+++ b/arch/mips/boot/dts/realtek/rtl9302c.dtsi
@@ -5,3 +5,11 @@ 
 &switch0 {
 	compatible = "realtek,rtl9302c-switch", "realtek,rtl9300-switch", "syscon", "simple-mfd";
 };
+
+&i2c0 {
+	compatible = "realtek,rtl9302c-i2c", "realtek,rtl9300-i2c";
+};
+
+&i2c1 {
+	compatible = "realtek,rtl9302c-i2c", "realtek,rtl9300-i2c";
+};
diff --git a/arch/mips/boot/dts/realtek/rtl930x.dtsi b/arch/mips/boot/dts/realtek/rtl930x.dtsi
index 89b8854596cd..2fb8461af575 100644
--- a/arch/mips/boot/dts/realtek/rtl930x.dtsi
+++ b/arch/mips/boot/dts/realtek/rtl930x.dtsi
@@ -41,6 +41,22 @@  reboot@c {
 			reg = <0x0c 0x4>;
 			value = <0x01>;
 		};
+
+		i2c0: i2c@36c {
+			compatible = "realtek,rtl9300-i2c";
+			reg = <0x36c 0x14>;
+			status = "disabled";
+			#address-cells = <1>;
+			#size-cells = <0>;
+		};
+
+		i2c1: i2c@388 {
+			compatible = "realtek,rtl9300-i2c";
+			reg = <0x388 0x14>;
+			status = "disabled";
+			#address-cells = <1>;
+			#size-cells = <0>;
+		};
 	};
 };