Skip to contentSkip to conversation

sam9x60_curiosity PDA detection support

PATCH In review Durai Manickam KR 2 participants 5 messages Jul 7, 2022 – Aug 17, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover sam9x60_curiosity PDA detection support

This patch series adds the PDA detection support for sam9x60_curiosity rev4 boards. In rev4, the raspberry-pi display is replaced by PDA display.

Durai Manickam KR (3):
configs: sama9x60_curiosity: add onewire and eeprom drivers
board: sam9x60_curiosity: add pda detect call at init time
ARM: dts: at91: sam9x60_curiosity: add onewire support

 arch/arm/dts/at91-sam9x60_curiosity.dts         | 17 +++++++++++++++++
 .../atmel/sam9x60_curiosity/sam9x60_curiosity.c |  4 ++++
 configs/sam9x60_curiosity_mmc_defconfig         |  4 ++++
 3 files changed, 25 insertions(+)
Signature · 1 line
2.25.1
#1 lore raw

PATCH 1/3 configs: sama9x60_curiosity: add onewire and eeprom drivers

SAM9X60 SoC can have extra clip boards (PDAs) connected, which have an EEPROM memory for identification. A special GPIO can be used to read this memory over 1wire protocol. Enabling one wire and eeprom drivers for this memory.

---
 configs/sam9x60_curiosity_mmc_defconfig | 4 ++++
 1 file changed, 4 insertions(+)
configs/sam9x60_curiosity_mmc_defconfig +4 -0
index 5a58d8486f..89f7682252 100644
@@ -73,4 +73,8 @@ CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_TIMER=y
 CONFIG_MCHP_PIT64B_TIMER=y
+CONFIG_W1=y
+CONFIG_W1_GPIO=y
+CONFIG_W1_EEPROM=y
+CONFIG_W1_EEPROM_DS24XXX=y
 CONFIG_OF_LIBFDT_OVERLAY=y
Signature · 1 line
2.25.1
#2 lore raw

PATCH 2/3 board: sam9x60_curiosity: add pda detect call at init time

In reply to Durai Manickam KR

Call the PDA detection mechanism at boot time so that we can have the pda environment variable ready for use.

---
 board/atmel/sam9x60_curiosity/sam9x60_curiosity.c | 4 ++++
 1 file changed, 4 insertions(+)
board/atmel/sam9x60_curiosity/sam9x60_curiosity.c +4 -0
index d8f32c93b5..8cf67d148d 100644
@@ -19,6 +19,8 @@
 #include <asm/io.h>
 #include <asm/mach-types.h>
 
+extern void at91_pda_detect(void);
+
 DECLARE_GLOBAL_DATA_PTR;
 
 void at91_prepare_cpu_var(void);
@@ -27,6 +29,8 @@ int board_late_init(void)
 {
 	at91_prepare_cpu_var();
 
+	at91_pda_detect();
+
 	return 0;
 }
 
Signature · 1 line
2.25.1
#3 lore raw

PATCH 3/3 ARM: dts: at91: sam9x60_curiosity: add onewire support

In reply to Durai Manickam KR

Add support for onewire memory.

---
 arch/arm/dts/at91-sam9x60_curiosity.dts | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
arch/arm/dts/at91-sam9x60_curiosity.dts +17 -0
index 2e7ccb0ffb..7c5b6ae2b8 100644
@@ -44,6 +44,11 @@
 							<AT91_PIOA 0 AT91_PERIPH_A AT91_PINCTRL_NONE
 							 AT91_PIOA 1 AT91_PERIPH_A AT91_PINCTRL_NONE>;
 					};
+
+					pinctrl_onewire_tm_default: onewire_tm_default {
+						atmel,pins =
+							<AT91_PIOD 14 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP>;
+					};
 			};
 		};
 	};
@@ -66,6 +71,18 @@
 	memory {
 		reg = <0x20000000 0x8000000>;
 	};
+
+	onewire_tm: onewire {
+		gpios = <&pioD 14 GPIO_ACTIVE_HIGH>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinctrl_onewire_tm_default>;
+		status = "okay";
+
+		w1_eeprom: w1_eeprom@0 {
+			compatible = "maxim,ds24b33";
+			status = "okay";
+		};
+	};
 };
 
 &macb0 {
Signature · 1 line
2.25.1
#4 lore raw
In reply to Durai Manickam KR
Quoted 8 lines · Durai Manickam KR

This patch series adds the PDA detection support for sam9x60_curiosity rev4 boards. In rev4, the raspberry-pi display is replaced by PDA display.

Durai Manickam KR (3):
configs: sama9x60_curiosity: add onewire and eeprom drivers
board: sam9x60_curiosity: add pda detect call at init time
ARM: dts: at91: sam9x60_curiosity: add onewire support

Quoted 5 lines
  arch/arm/dts/at91-sam9x60_curiosity.dts         | 17 +++++++++++++++++
  .../atmel/sam9x60_curiosity/sam9x60_curiosity.c |  4 ++++
  configs/sam9x60_curiosity_mmc_defconfig         |  4 ++++
  3 files changed, 25 insertions(+)

Applied series to u-boot-at91/next , thanks !