All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4] i2c: at91: add compatible with microchip,sama7g5-i2c
@ 2022-01-04 18:43 Eugen Hristev
  2022-01-04 18:43 ` [PATCH 2/4] ARM: dts: at91: sama7g5: add flx8 and required nodes Eugen Hristev
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Eugen Hristev @ 2022-01-04 18:43 UTC (permalink / raw)
  To: hs, u-boot; +Cc: Eugen Hristev

Add compatible and data platform struct for sama7g5 SoC.

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
---
 drivers/i2c/at91_i2c.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/i2c/at91_i2c.c b/drivers/i2c/at91_i2c.c
index 6b4c0e4804..400a3786ca 100644
--- a/drivers/i2c/at91_i2c.c
+++ b/drivers/i2c/at91_i2c.c
@@ -305,6 +305,11 @@ static const struct at91_i2c_pdata sama5d2_config = {
 	.clk_offset = 3,
 };
 
+static const struct at91_i2c_pdata sama7g5_config = {
+	.clk_max_div = 7,
+	.clk_offset = 3,
+};
+
 static const struct udevice_id at91_i2c_ids[] = {
 { .compatible = "atmel,at91rm9200-i2c", .data = (long)&at91rm9200_config },
 { .compatible = "atmel,at91sam9260-i2c", .data = (long)&at91sam9260_config },
@@ -314,6 +319,7 @@ static const struct udevice_id at91_i2c_ids[] = {
 { .compatible = "atmel,at91sam9x5-i2c", .data = (long)&at91sam9x5_config },
 { .compatible = "atmel,sama5d4-i2c", .data = (long)&sama5d4_config },
 { .compatible = "atmel,sama5d2-i2c", .data = (long)&sama5d2_config },
+{ .compatible = "microchip,sama7g5-i2c", .data = (long)&sama7g5_config },
 { }
 };
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 2/4] ARM: dts: at91: sama7g5: add flx8 and required nodes
  2022-01-04 18:43 [PATCH 1/4] i2c: at91: add compatible with microchip,sama7g5-i2c Eugen Hristev
@ 2022-01-04 18:43 ` Eugen Hristev
  2022-01-04 18:43 ` [PATCH 3/4] ARM: dts: at91: sama7g5ek: move eeproms to flexcom8 Eugen Hristev
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 9+ messages in thread
From: Eugen Hristev @ 2022-01-04 18:43 UTC (permalink / raw)
  To: hs, u-boot; +Cc: Eugen Hristev

Add Flexcom8 node with required referenced nodes as phandles.
Since Flexcom8 is present in Linux, take the node exactly as-is from Linux.
Some nodes are referenced in Linux as phandles, the dma and the gic.
Add them as well to the file, even if they are unused by Uboot.
This is a step towards having the U-boot DT equivalent with the DT in Linux.

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
---
 arch/arm/dts/sama7g5.dtsi | 50 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 50 insertions(+)

diff --git a/arch/arm/dts/sama7g5.dtsi b/arch/arm/dts/sama7g5.dtsi
index 4a3c675d34..2505a2f83d 100644
--- a/arch/arm/dts/sama7g5.dtsi
+++ b/arch/arm/dts/sama7g5.dtsi
@@ -10,11 +10,15 @@
  */
 
 #include "skeleton.dtsi"
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/interrupt-controller/arm-gic.h>
 #include <dt-bindings/clk/at91.h>
+#include <dt-bindings/dma/at91.h>
 
 / {
 	model = "Microchip SAMA7G5 family SoC";
 	compatible = "microchip,sama7g5";
+	interrupt-parent = <&gic>;
 
 	clocks {
 		slow_rc_osc: slow_rc_osc {
@@ -191,6 +195,52 @@
 				clock-names = "pclk", "hclk";
 				status = "disabled";
 			};
+
+			dma0: dma-controller@e2808000 {
+				compatible = "microchip,sama7g5-dma";
+				reg = <0xe2808000 0x1000>;
+				interrupts = <GIC_SPI 112 IRQ_TYPE_LEVEL_HIGH>;
+				#dma-cells = <1>;
+				clocks = <&pmc PMC_TYPE_PERIPHERAL 22>;
+				clock-names = "dma_clk";
+				status = "disabled";
+			};
+
+			flx8: flexcom@e2818000 {
+				compatible = "atmel,sama5d2-flexcom";
+				reg = <0xe2818000 0x200>;
+				clocks = <&pmc PMC_TYPE_PERIPHERAL 46>;
+				#address-cells = <1>;
+				#size-cells = <1>;
+				ranges = <0x0 0xe2818000 0x800>;
+				status = "disabled";
+
+				i2c8: i2c@600 {
+					compatible = "microchip,sama7g5-i2c", "microchip,sam9x60-i2c";
+					reg = <0x600 0x200>;
+					interrupts = <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>;
+					#address-cells = <1>;
+					#size-cells = <0>;
+					clocks = <&pmc PMC_TYPE_PERIPHERAL 46>;
+					atmel,fifo-size = <32>;
+					dmas = <&dma0 AT91_XDMAC_DT_PERID(21)>,
+						<&dma0 AT91_XDMAC_DT_PERID(22)>;
+					dma-names = "rx", "tx";
+					atmel,use-dma-rx;
+					atmel,use-dma-tx;
+					status = "disabled";
+				};
+			};
+
+			gic: interrupt-controller@e8c11000 {
+				compatible = "arm,cortex-a7-gic";
+				#interrupt-cells = <3>;
+				#address-cells = <0>;
+				interrupt-controller;
+				interrupt-parent;
+				reg = <0xe8c11000 0x1000>,
+					<0xe8c12000 0x2000>;
+			};
 		};
 	};
 };
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 3/4] ARM: dts: at91: sama7g5ek: move eeproms to flexcom8
  2022-01-04 18:43 [PATCH 1/4] i2c: at91: add compatible with microchip,sama7g5-i2c Eugen Hristev
  2022-01-04 18:43 ` [PATCH 2/4] ARM: dts: at91: sama7g5: add flx8 and required nodes Eugen Hristev
@ 2022-01-04 18:43 ` Eugen Hristev
  2022-01-04 18:43 ` [PATCH 4/4] configs: at91: sama7g5ek: enable CONFIG_PHANDLE_CHECK_SEQ Eugen Hristev
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 9+ messages in thread
From: Eugen Hristev @ 2022-01-04 18:43 UTC (permalink / raw)
  To: hs, u-boot; +Cc: Eugen Hristev

The rev4 of the board sama7g5ek has the eeproms on flexcom8 instead of
flexcom1.
Initialize flexcom8 with required pincontrol and move the eeproms accordingly.

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
---
 arch/arm/dts/sama7g5ek.dts | 39 +++++++++++++++++++++++++++++---------
 1 file changed, 30 insertions(+), 9 deletions(-)

diff --git a/arch/arm/dts/sama7g5ek.dts b/arch/arm/dts/sama7g5ek.dts
index 16192ca0b1..6adb044258 100644
--- a/arch/arm/dts/sama7g5ek.dts
+++ b/arch/arm/dts/sama7g5ek.dts
@@ -20,6 +20,7 @@
 	aliases {
 		serial0 = &uart0;
 		i2c0 = &i2c1;
+		i2c1 = &i2c8;
 	};
 
 	chosen {
@@ -92,17 +93,31 @@
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_flx1_default>;
 	status = "okay";
+};
 
-	eeprom@52 {
-		compatible = "microchip,24aa02e48";
-		reg = <0x52>;
-		pagesize = <16>;
-	};
+&flx8 {
+	atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_TWI>;
+	status = "okay";
+
+	i2c8: i2c@600 {
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinctrl_i2c8_default>;
+		i2c-analog-filter;
+		i2c-digital-filter;
+		i2c-digital-filter-width-ns = <35>;
+		status = "okay";
 
-	eeprom@53 {
-		compatible = "microchip,24aa02e48";
-		reg = <0x53>;
-		pagesize = <16>;
+		eeprom@52 {
+			compatible = "microchip,24aa02e48";
+			reg = <0x52>;
+			pagesize = <16>;
+		};
+
+		eeprom@53 {
+			compatible = "microchip,24aa02e48";
+			reg = <0x53>;
+			pagesize = <16>;
+		};
 	};
 };
 
@@ -145,6 +160,12 @@
 		bias-pull-up;
 	};
 
+	pinctrl_i2c8_default: i2c8_default {
+		pinmux = <PIN_PC14__FLEXCOM8_IO0>,
+			 <PIN_PC13__FLEXCOM8_IO1>;
+		bias-disable;
+	};
+
 	pinctrl_qspi: qspi {
 		pinmux = <PIN_PB12__QSPI0_IO0>,
 			 <PIN_PB11__QSPI0_IO1>,
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 4/4] configs: at91: sama7g5ek: enable CONFIG_PHANDLE_CHECK_SEQ
  2022-01-04 18:43 [PATCH 1/4] i2c: at91: add compatible with microchip,sama7g5-i2c Eugen Hristev
  2022-01-04 18:43 ` [PATCH 2/4] ARM: dts: at91: sama7g5: add flx8 and required nodes Eugen Hristev
  2022-01-04 18:43 ` [PATCH 3/4] ARM: dts: at91: sama7g5ek: move eeproms to flexcom8 Eugen Hristev
@ 2022-01-04 18:43 ` Eugen Hristev
  2022-01-05 10:04 ` [PATCH 1/4] i2c: at91: add compatible with microchip,sama7g5-i2c Michael Walle
  2022-01-17  9:20 ` Eugen.Hristev
  4 siblings, 0 replies; 9+ messages in thread
From: Eugen Hristev @ 2022-01-04 18:43 UTC (permalink / raw)
  To: hs, u-boot; +Cc: Eugen Hristev

CONFIG_PHANDLE_CHECK_SEQ will allow different sequence number for nodes
that have the same name, but they are different.
In sama7g5ek case, there are multiple 'i2c@600' nodes which are child
nodes of different parent 'flexcom' nodes.
These are different i2c busses even if the node is the same, and have to be
differentiated.
Without this config, the sequence number 0 is reused for two i2c busses, and
this is something that we have to avoid:

Looking for 'i2c' at 4704, name i2c@600
   - serial0, /ahb/apb/serial@e1824200
   - i2c0, /ahb/apb/flexcom@e181c000/i2c@600
Found seq 0
i2c_post_bind: i2c@600, seq=0
Looking for 'i2c' at 6236, name i2c@600
   - serial0, /ahb/apb/serial@e1824200
   - i2c0, /ahb/apb/flexcom@e181c000/i2c@600
Found seq 0
i2c_post_bind: i2c@600, seq=0

After this patch:

Looking for 'i2c' at 4704, name i2c@600
   - serial0, /ahb/apb/serial@e1824200
   - i2c0, /ahb/apb/flexcom@e181c000/i2c@600
   - i2c1, /ahb/apb/flexcom@e2818000/i2c@600
Found seq 1

Before the patch:
=> i2c bus
Bus 0:  i2c@600
Bus 0:  i2c@600  (active 0)
   52: eeprom@52, offset len 1, flags 0
   53: eeprom@53, offset len 1, flags 0
=>

After the patch:
=> i2c bus
Bus 0:  i2c@600
Bus 1:  i2c@600  (active 1)
   52: eeprom@52, offset len 1, flags 0
   53: eeprom@53, offset len 1, flags 0

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
---
 configs/sama7g5ek_mmc1_defconfig | 1 +
 configs/sama7g5ek_mmc_defconfig  | 1 +
 2 files changed, 2 insertions(+)

diff --git a/configs/sama7g5ek_mmc1_defconfig b/configs/sama7g5ek_mmc1_defconfig
index e297489900..15a5c54e75 100644
--- a/configs/sama7g5ek_mmc1_defconfig
+++ b/configs/sama7g5ek_mmc1_defconfig
@@ -72,3 +72,4 @@ CONFIG_TIMER=y
 CONFIG_MCHP_PIT64B_TIMER=y
 CONFIG_OF_LIBFDT_OVERLAY=y
 # CONFIG_EFI_LOADER_HII is not set
+CONFIG_PHANDLE_CHECK_SEQ=y
diff --git a/configs/sama7g5ek_mmc_defconfig b/configs/sama7g5ek_mmc_defconfig
index 4f68a46456..7abd5c8a38 100644
--- a/configs/sama7g5ek_mmc_defconfig
+++ b/configs/sama7g5ek_mmc_defconfig
@@ -72,3 +72,4 @@ CONFIG_TIMER=y
 CONFIG_MCHP_PIT64B_TIMER=y
 CONFIG_OF_LIBFDT_OVERLAY=y
 # CONFIG_EFI_LOADER_HII is not set
+CONFIG_PHANDLE_CHECK_SEQ=y
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/4] i2c: at91: add compatible with microchip,sama7g5-i2c
  2022-01-04 18:43 [PATCH 1/4] i2c: at91: add compatible with microchip,sama7g5-i2c Eugen Hristev
                   ` (2 preceding siblings ...)
  2022-01-04 18:43 ` [PATCH 4/4] configs: at91: sama7g5ek: enable CONFIG_PHANDLE_CHECK_SEQ Eugen Hristev
@ 2022-01-05 10:04 ` Michael Walle
  2022-01-05 10:37   ` Eugen.Hristev
  2022-01-17  9:20 ` Eugen.Hristev
  4 siblings, 1 reply; 9+ messages in thread
From: Michael Walle @ 2022-01-05 10:04 UTC (permalink / raw)
  To: eugen.hristev; +Cc: hs, u-boot, Michael Walle

Hi,

> Add compatible and data platform struct for sama7g5 SoC.
> 
> Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
> ---
>  drivers/i2c/at91_i2c.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/drivers/i2c/at91_i2c.c b/drivers/i2c/at91_i2c.c
> index 6b4c0e4804..400a3786ca 100644
> --- a/drivers/i2c/at91_i2c.c
> +++ b/drivers/i2c/at91_i2c.c
> @@ -305,6 +305,11 @@ static const struct at91_i2c_pdata sama5d2_config = {
>  	.clk_offset = 3,
>  };
>  
> +static const struct at91_i2c_pdata sama7g5_config = {
> +	.clk_max_div = 7,
> +	.clk_offset = 3,
> +};
> +
>  static const struct udevice_id at91_i2c_ids[] = {
>  { .compatible = "atmel,at91rm9200-i2c", .data = (long)&at91rm9200_config },
>  { .compatible = "atmel,at91sam9260-i2c", .data = (long)&at91sam9260_config },
> @@ -314,6 +319,7 @@ static const struct udevice_id at91_i2c_ids[] = {
>  { .compatible = "atmel,at91sam9x5-i2c", .data = (long)&at91sam9x5_config },
>  { .compatible = "atmel,sama5d4-i2c", .data = (long)&sama5d4_config },
>  { .compatible = "atmel,sama5d2-i2c", .data = (long)&sama5d2_config },
> +{ .compatible = "microchip,sama7g5-i2c", .data = (long)&sama7g5_config },

I see that this compatible string is is also used in the linux
device tree, but there is no dt binding for it in linux. Could you
add it, so the binding is approved by Rob?

-michael

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/4] i2c: at91: add compatible with microchip,sama7g5-i2c
  2022-01-05 10:04 ` [PATCH 1/4] i2c: at91: add compatible with microchip,sama7g5-i2c Michael Walle
@ 2022-01-05 10:37   ` Eugen.Hristev
  2022-01-05 10:49     ` Michael Walle
  0 siblings, 1 reply; 9+ messages in thread
From: Eugen.Hristev @ 2022-01-05 10:37 UTC (permalink / raw)
  To: michael; +Cc: hs, u-boot

On 1/5/22 12:04 PM, Michael Walle wrote:
> Hi,
> 
>> Add compatible and data platform struct for sama7g5 SoC.
>>
>> Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
>> ---
>>   drivers/i2c/at91_i2c.c | 6 ++++++
>>   1 file changed, 6 insertions(+)
>>
>> diff --git a/drivers/i2c/at91_i2c.c b/drivers/i2c/at91_i2c.c
>> index 6b4c0e4804..400a3786ca 100644
>> --- a/drivers/i2c/at91_i2c.c
>> +++ b/drivers/i2c/at91_i2c.c
>> @@ -305,6 +305,11 @@ static const struct at91_i2c_pdata sama5d2_config = {
>>        .clk_offset = 3,
>>   };
>>
>> +static const struct at91_i2c_pdata sama7g5_config = {
>> +     .clk_max_div = 7,
>> +     .clk_offset = 3,
>> +};
>> +
>>   static const struct udevice_id at91_i2c_ids[] = {
>>   { .compatible = "atmel,at91rm9200-i2c", .data = (long)&at91rm9200_config },
>>   { .compatible = "atmel,at91sam9260-i2c", .data = (long)&at91sam9260_config },
>> @@ -314,6 +319,7 @@ static const struct udevice_id at91_i2c_ids[] = {
>>   { .compatible = "atmel,at91sam9x5-i2c", .data = (long)&at91sam9x5_config },
>>   { .compatible = "atmel,sama5d4-i2c", .data = (long)&sama5d4_config },
>>   { .compatible = "atmel,sama5d2-i2c", .data = (long)&sama5d2_config },
>> +{ .compatible = "microchip,sama7g5-i2c", .data = (long)&sama7g5_config },
> 
> I see that this compatible string is is also used in the linux
> device tree, but there is no dt binding for it in linux. Could you
> add it, so the binding is approved by Rob?

I can, for sure, but the current binding format is txt. I am not sure if 
we have to convert to yaml first, in which case it would be a little 
more difficult than just adding a new compatible string.
The current DT node in Linux is also compatible with sam9x60, and this 
string is already in the Linux binding file.
I could add the sam9x60 compatible instead, and it will still work, as 
9x60 type of i2c is the same as in sama7g5.
You think this option would be better for now ?

> 
> -michael
> 


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/4] i2c: at91: add compatible with microchip,sama7g5-i2c
  2022-01-05 10:37   ` Eugen.Hristev
@ 2022-01-05 10:49     ` Michael Walle
  2022-01-05 11:00       ` Eugen.Hristev
  0 siblings, 1 reply; 9+ messages in thread
From: Michael Walle @ 2022-01-05 10:49 UTC (permalink / raw)
  To: Eugen.Hristev; +Cc: hs, u-boot

Am 2022-01-05 11:37, schrieb Eugen.Hristev@microchip.com:
> On 1/5/22 12:04 PM, Michael Walle wrote:
>> Hi,
>> 
>>> Add compatible and data platform struct for sama7g5 SoC.
>>> 
>>> Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
>>> ---
>>>   drivers/i2c/at91_i2c.c | 6 ++++++
>>>   1 file changed, 6 insertions(+)
>>> 
>>> diff --git a/drivers/i2c/at91_i2c.c b/drivers/i2c/at91_i2c.c
>>> index 6b4c0e4804..400a3786ca 100644
>>> --- a/drivers/i2c/at91_i2c.c
>>> +++ b/drivers/i2c/at91_i2c.c
>>> @@ -305,6 +305,11 @@ static const struct at91_i2c_pdata 
>>> sama5d2_config = {
>>>        .clk_offset = 3,
>>>   };
>>> 
>>> +static const struct at91_i2c_pdata sama7g5_config = {
>>> +     .clk_max_div = 7,
>>> +     .clk_offset = 3,
>>> +};
>>> +
>>>   static const struct udevice_id at91_i2c_ids[] = {
>>>   { .compatible = "atmel,at91rm9200-i2c", .data = 
>>> (long)&at91rm9200_config },
>>>   { .compatible = "atmel,at91sam9260-i2c", .data = 
>>> (long)&at91sam9260_config },
>>> @@ -314,6 +319,7 @@ static const struct udevice_id at91_i2c_ids[] = {
>>>   { .compatible = "atmel,at91sam9x5-i2c", .data = 
>>> (long)&at91sam9x5_config },
>>>   { .compatible = "atmel,sama5d4-i2c", .data = (long)&sama5d4_config 
>>> },
>>>   { .compatible = "atmel,sama5d2-i2c", .data = (long)&sama5d2_config 
>>> },
>>> +{ .compatible = "microchip,sama7g5-i2c", .data = 
>>> (long)&sama7g5_config },
>> 
>> I see that this compatible string is is also used in the linux
>> device tree, but there is no dt binding for it in linux. Could you
>> add it, so the binding is approved by Rob?
> 
> I can, for sure, but the current binding format is txt. I am not sure 
> if
> we have to convert to yaml first, in which case it would be a little
> more difficult than just adding a new compatible string.
> The current DT node in Linux is also compatible with sam9x60, and this
> string is already in the Linux binding file.
> I could add the sam9x60 compatible instead, and it will still work, as
> 9x60 type of i2c is the same as in sama7g5.
> You think this option would be better for now ?

It's at least better than adding an undocumented string. But TBH,
this looks like "what can I do to avoid converting the dt binding
to yaml". Which eventually has to be done anyway, so now might be
a good opportunity for that :)

But looking at sama7g5_config above again, will that also be the
correct values for the generic sam9x60?

-michael

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/4] i2c: at91: add compatible with microchip,sama7g5-i2c
  2022-01-05 10:49     ` Michael Walle
@ 2022-01-05 11:00       ` Eugen.Hristev
  0 siblings, 0 replies; 9+ messages in thread
From: Eugen.Hristev @ 2022-01-05 11:00 UTC (permalink / raw)
  To: michael; +Cc: hs, u-boot

On 1/5/22 12:49 PM, Michael Walle wrote:
> Am 2022-01-05 11:37, schrieb Eugen.Hristev@microchip.com:
>> On 1/5/22 12:04 PM, Michael Walle wrote:
>>> Hi,
>>>
>>>> Add compatible and data platform struct for sama7g5 SoC.
>>>>
>>>> Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
>>>> ---
>>>>   drivers/i2c/at91_i2c.c | 6 ++++++
>>>>   1 file changed, 6 insertions(+)
>>>>
>>>> diff --git a/drivers/i2c/at91_i2c.c b/drivers/i2c/at91_i2c.c
>>>> index 6b4c0e4804..400a3786ca 100644
>>>> --- a/drivers/i2c/at91_i2c.c
>>>> +++ b/drivers/i2c/at91_i2c.c
>>>> @@ -305,6 +305,11 @@ static const struct at91_i2c_pdata
>>>> sama5d2_config = {
>>>>        .clk_offset = 3,
>>>>   };
>>>>
>>>> +static const struct at91_i2c_pdata sama7g5_config = {
>>>> +     .clk_max_div = 7,
>>>> +     .clk_offset = 3,
>>>> +};
>>>> +
>>>>   static const struct udevice_id at91_i2c_ids[] = {
>>>>   { .compatible = "atmel,at91rm9200-i2c", .data =
>>>> (long)&at91rm9200_config },
>>>>   { .compatible = "atmel,at91sam9260-i2c", .data =
>>>> (long)&at91sam9260_config },
>>>> @@ -314,6 +319,7 @@ static const struct udevice_id at91_i2c_ids[] = {
>>>>   { .compatible = "atmel,at91sam9x5-i2c", .data =
>>>> (long)&at91sam9x5_config },
>>>>   { .compatible = "atmel,sama5d4-i2c", .data = (long)&sama5d4_config
>>>> },
>>>>   { .compatible = "atmel,sama5d2-i2c", .data = (long)&sama5d2_config
>>>> },
>>>> +{ .compatible = "microchip,sama7g5-i2c", .data =
>>>> (long)&sama7g5_config },
>>>
>>> I see that this compatible string is is also used in the linux
>>> device tree, but there is no dt binding for it in linux. Could you
>>> add it, so the binding is approved by Rob?
>>
>> I can, for sure, but the current binding format is txt. I am not sure
>> if
>> we have to convert to yaml first, in which case it would be a little
>> more difficult than just adding a new compatible string.
>> The current DT node in Linux is also compatible with sam9x60, and this
>> string is already in the Linux binding file.
>> I could add the sam9x60 compatible instead, and it will still work, as
>> 9x60 type of i2c is the same as in sama7g5.
>> You think this option would be better for now ?
> 
> It's at least better than adding an undocumented string. But TBH,
> this looks like "what can I do to avoid converting the dt binding
> to yaml". Which eventually has to be done anyway, so now might be
> a good opportunity for that :)

You are right. It has to be done anyway, but I would not like to stop 
the addition to u-boot because of that.
Converting the i2c to yaml might open several other issues, and this 
might delay a simple compatible string in uboot a lot.
sam9x60 compatible has to be added anyway, since it's supported and it's 
already in the binding tree.
So I see this like an intermediary step.

> 
> But looking at sama7g5_config above again, will that also be the
> correct values for the generic sam9x60?

That's right.
I will follow up with a patch to add sam9x60, and think of converting 
the i2c binding later on.

> 
> -michael


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/4] i2c: at91: add compatible with microchip,sama7g5-i2c
  2022-01-04 18:43 [PATCH 1/4] i2c: at91: add compatible with microchip,sama7g5-i2c Eugen Hristev
                   ` (3 preceding siblings ...)
  2022-01-05 10:04 ` [PATCH 1/4] i2c: at91: add compatible with microchip,sama7g5-i2c Michael Walle
@ 2022-01-17  9:20 ` Eugen.Hristev
  4 siblings, 0 replies; 9+ messages in thread
From: Eugen.Hristev @ 2022-01-17  9:20 UTC (permalink / raw)
  To: hs, u-boot

On 1/4/22 8:43 PM, Eugen Hristev wrote:
> Add compatible and data platform struct for sama7g5 SoC.
> 
> Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
> ---


Applied patches 2-4 to u-boot-at91/master, and dropped patch 1.

Eugen


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2022-01-17  9:20 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-04 18:43 [PATCH 1/4] i2c: at91: add compatible with microchip,sama7g5-i2c Eugen Hristev
2022-01-04 18:43 ` [PATCH 2/4] ARM: dts: at91: sama7g5: add flx8 and required nodes Eugen Hristev
2022-01-04 18:43 ` [PATCH 3/4] ARM: dts: at91: sama7g5ek: move eeproms to flexcom8 Eugen Hristev
2022-01-04 18:43 ` [PATCH 4/4] configs: at91: sama7g5ek: enable CONFIG_PHANDLE_CHECK_SEQ Eugen Hristev
2022-01-05 10:04 ` [PATCH 1/4] i2c: at91: add compatible with microchip,sama7g5-i2c Michael Walle
2022-01-05 10:37   ` Eugen.Hristev
2022-01-05 10:49     ` Michael Walle
2022-01-05 11:00       ` Eugen.Hristev
2022-01-17  9:20 ` Eugen.Hristev

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.