[U-Boot] [PATCH v2 00/30] Add support for 1wire protocol and 1wire eeproms

Eugen Hristev eugen.hristev at microchip.com
Thu Aug 9 13:53:44 UTC 2018


This is a patch series originally written by Maxime Ripard,
https://lists.denx.de/pipermail/u-boot/2016-November/272138.html

titled:

[U-Boot] [PATCH RESEND 0/9] sunxi: chip: Enable the DIP auto-detection

and reworked to include support for the EEPROMs on the PDAs connected
to the sama xplained boards.

This is the version 2 of the rework, version 1 was titled:
[PATCH 00/20] Add support for 1wire protocol and 1wire eeproms

It addresses feedback received in the first version.

The patch series adds first a driver for onewire uclass, and onewire over
gpio bitbanging driver. Then it adds a uclass for onewire EEPROMS, and
specific driver for Maxim EEPROMs. I have added some sandbox support,
configuration and device tree for it and for boards sama5d2_xplained,
sama5d3_xplained, sama5d2_ptc_ek and sama5d27_som1_ek.
Also added common code for PDA detection, as the memory
on the PDAs is connected to the SoC on the onewire bus.

Thanks to everyone for the review and feedback.

Below is a short summary of the commits:

The series adds a w1-uclass driver for the onewire interface u-class.
This is done in patch:
[PATCH v2 01/30] w1: Add 1-Wire uclass

Also, we add a driver for the w1-uclass specific to the onewire over
bitbanged gpio, this is done in patch:
[PATCH v2 02/30] w1: Add 1-Wire gpio driver

Add the bindings documentation in:
[PATCH v2 03/30] dt-bindings: W1: w1-gpio: added bindings for w1-gpio

A uclass driver is added for one wire eeproms, in patch :
[PATCH v2 04/30] W1-EEPROM: Add an W1-EEPROM uclass for 1 wire EEPROMs

Connection between memories and the bus is done in the patch:
[PATCH v2 05/30] w1: identify devices with w1-eeprom uclas

Specific driver for the DS24 Maxim EEPROMs is added in the patch:
[PATCH v2 06/30] W1-EEPROM: add support for Maxim DS24 eeprom families

Bindings for the DS24xxx driver added in the patch:
[PATCH v2 07/30] dt-bindings: w1-eeprom: ds24xxx: create bindings

A sandbox driver for a onewire EEPROM is added in patch:
[PATCH v2 08/30] W1-EEPROM: add sandbox driver

Bindings for the sandbox eeprom driver added in patch:
[PATCH v2 09/30] dt-bindings: w1-eeprom: eep_sandbox: create bindings

A command is added for the onewire protocol in patch:
[PATCH v2 10/30] w1: add command for onewire protocol

Pinctrl driver for sandbox was updated to add a new group and function for w1:
[PATCH v2 11/30] pinctrl: sandbox: add gpio onewire w1 group

Add a node in sandbox DT to have a test node for sandbox.
[PATCH v2 12/30] sandbox: DTS: w1: add node for one wire interface on
 GPIO

The defconfig for sandbox is updated to include the drivers:
[PATCH v2 13/30] configs: sandbox: add onewire w1 and sandbox
 eeprom

Configuration for sama5d2 xplained is updated in patch:
[PATCH v2 14/30] configs: sama5d2_xplained: add onewire and eeprom

Configuration for sama5d3 xplained is updated in patch:
[PATCH v2 15/30] configs: sama5d3_xplained: add onewire and eeprom

Configuration for sama5d27_som1_ek is updated in patch:
[PATCH v2 16/30] configs: sama5d27_som1_ek: add onewire and eeprom
 drivers

Configuration for sama5d2 ptc is updated in patch:
[PATCH v2 17/30] configs: sama5d2_ptc_ek: add onewire and eeprom
 drivers

Pda detection is added in the common part for atmel boards:
[PATCH v2 18/30] board: atmel: add support for pda detection

Specifically add it for Sama5d2 xplained board in patch:
[PATCH v2 19/30] board: sama5d2_xplained: add pda detect call at init
 time

Specifically add it for Sama5d3 xplained board in patch:
[PATCH v2 20/30] board: sama5d3_xplained: add pda detect call at init
 time

Specifically add it for Sama5d27 som1 ek board in patch:
[PATCH v2 21/30] board: sama5d27_som1_ek: add pda detect call at init
 time

Specifically add it for Sama5d27 ptc ek board in patch:
[PATCH v2 22/30] board: sama5d2_ptc_ek: add pda detect call at init
 time

Add support for overlays for sama5d2 xplained config in patch:
[PATCH v2 23/30] configs: sama5d2_xplained: add fdt overlay support

Add support for overlays for sama5d3 xplained config in patch:
[PATCH v2 24/30] configs: sama5d3_xplained: add fdt overlay support

Add support for overlays for sama5d2 ptc ek config in patch:
[PATCH v2 25/30] configs: sama5d2_ptc_ek: add fdt overlay support

Add support for overlays for sama5d2 som1 ek config in patch:
[PATCH v2 26/30] configs: sama5d27_som1_ek: add fdt overlay support

The DT for the SAMA5D2 Soc and xplained is updated to include a onewire node.
This is done in patch:
[PATCH v2 27/30] ARM: dts: at91: sama5d2_xplained: add onewire connector

The DT for the SAMA5D3 Soc and xplained is updated to include a onewire node.
This is done in patch:
[PATCH v2 28/30] ARM: dts: at91: sama5d3_xplained: add onewire connector

The DT for sama5d27 som1 ek is updated to include a onewire node.
This is done in patch:
[PATCH v2 29/30] ARM: dts: at91: sama5d27_som1_ek: add onewire
 connector for LCD eeprom

The DT for sama5d2 ptc ek is updated to include a onewire node.
This is done in patch:
[PATCH v2 30/30] ARM: dts: at91: sama5d2_ptc: add onewire connector
 for LCD eeprom

Changes in v2:
- added support for two more boards: the PTC ek and the SOM1 ek.
- modified the enumerate mechanism, to search through devicetree nodes,
the memories are now in device tree, as suggested by Simon Glass.
When a serial number is read from the bus, the driver will match it
with a corresponding node in device tree.
- modified the probe mechanism for the bus, when trying to get the bus
use a different get function that will also probe the driver, regardless
of present aliases in DT.
- added bindings for ds24xxx driver and eep_sandbox, because they are
referenced from devicetree now.

Eugen Hristev (26):
  dt-bindings: W1: w1-gpio: added bindings for w1-gpio
  w1: identify devices with w1-eeprom uclass
  dt-bindings: w1-eeprom: ds24xxx: create bindings
  W1-EEPROM: add sandbox driver
  dt-bindings: w1-eeprom: eep_sandbox: create bindings
  w1: add command for onewire protocol
  pinctrl: sandbox: add gpio onewire w1 group
  sandbox: DTS: w1: add node for one wire interface on GPIO
  configs: sandbox: add onewire w1 and sandbox eeprom
  configs: sama5d2_xplained: add onewire and eeprom drivers
  configs: sama5d3_xplained: add onewire and eeprom drivers
  configs: sama5d27_som1_ek: add onewire and eeprom drivers
  configs: sama5d2_ptc_ek: add onewire and eeprom drivers
  board: atmel: add support for pda detection
  board: sama5d2_xplained: add pda detect call at init time
  board: sama5d3_xplained: add pda detect call at init time
  board: sama5d27_som1_ek: add pda detect call at init time
  board: sama5d2_ptc_ek: add pda detect call at init time
  configs: sama5d2_xplained: add fdt overlay support
  configs: sama5d3_xplained: add fdt overlay support
  configs: sama5d2_ptc_ek: add fdt overlay support
  configs: sama5d27_som1_ek: add fdt overlay support
  ARM: dts: at91: sama5d2_xplained: add onewire connector for LCD eeprom
  ARM: dts: at91: sama5d3_xplained: add onewire connector for LCD eeprom
  ARM: dts: at91: sama5d27_som1_ek: add onewire connector for LCD eeprom
  ARM: dts: at91: sama5d2_ptc: add onewire connector for LCD eeprom

Maxime Ripard (4):
  w1: Add 1-Wire uclass
  w1: Add 1-Wire gpio driver
  W1-EEPROM: Add an W1-EEPROM uclass for 1 wire EEPROMs
  W1-EEPROM: add support for Maxim DS24 eeprom families

 arch/arm/dts/at91-sama5d27_som1_ek.dts             |  17 ++
 arch/arm/dts/at91-sama5d2_ptc_ek.dts               |  17 ++
 arch/arm/dts/at91-sama5d2_xplained.dts             |  17 ++
 arch/arm/dts/at91-sama5d3_xplained.dts             |  17 ++
 arch/arm/dts/sama5d2.dtsi                          |   5 +
 arch/arm/dts/sama5d3.dtsi                          |   5 +
 arch/arm/mach-at91/Kconfig                         |   2 +
 arch/sandbox/dts/sandbox.dts                       |  20 ++
 board/atmel/common/board.c                         |  55 +++++
 board/atmel/sama5d27_som1_ek/sama5d27_som1_ek.c    |   3 +
 board/atmel/sama5d2_ptc_ek/sama5d2_ptc_ek.c        |  10 +
 board/atmel/sama5d2_xplained/sama5d2_xplained.c    |   3 +
 board/atmel/sama5d3_xplained/sama5d3_xplained.c    |  10 +
 cmd/Kconfig                                        |   7 +
 cmd/Makefile                                       |   1 +
 cmd/w1.c                                           | 121 +++++++++++
 configs/sama5d27_som1_ek_mmc_defconfig             |   5 +
 configs/sama5d2_ptc_ek_mmc_defconfig               |   5 +
 configs/sama5d2_ptc_ek_nandflash_defconfig         |   5 +
 configs/sama5d2_xplained_mmc_defconfig             |   5 +
 configs/sama5d2_xplained_spiflash_defconfig        |   5 +
 configs/sama5d3_xplained_mmc_defconfig             |   5 +
 configs/sama5d3_xplained_nandflash_defconfig       |   5 +
 configs/sandbox_defconfig                          |   4 +
 doc/device-tree-bindings/w1-eeprom/ds24xxx.txt     |  37 ++++
 doc/device-tree-bindings/w1-eeprom/eep_sandbox.txt |  34 +++
 doc/device-tree-bindings/w1/w1-gpio.txt            |  40 ++++
 drivers/Kconfig                                    |   4 +
 drivers/Makefile                                   |   2 +
 drivers/pinctrl/pinctrl-sandbox.c                  |   3 +
 drivers/w1-eeprom/Kconfig                          |  29 +++
 drivers/w1-eeprom/Makefile                         |   5 +
 drivers/w1-eeprom/ds24xxx.c                        |  55 +++++
 drivers/w1-eeprom/eep_sandbox.c                    |  61 ++++++
 drivers/w1-eeprom/w1-eeprom-uclass.c               | 109 ++++++++++
 drivers/w1/Kconfig                                 |  25 +++
 drivers/w1/Makefile                                |   3 +
 drivers/w1/w1-gpio.c                               | 158 ++++++++++++++
 drivers/w1/w1-uclass.c                             | 239 +++++++++++++++++++++
 include/dm/uclass-id.h                             |   2 +
 include/w1-eeprom.h                                |  33 +++
 include/w1.h                                       |  37 ++++
 42 files changed, 1225 insertions(+)
 create mode 100644 cmd/w1.c
 create mode 040000 doc/device-tree-bindings/w1-eeprom
 create mode 100644 doc/device-tree-bindings/w1-eeprom/ds24xxx.txt
 create mode 100644 doc/device-tree-bindings/w1-eeprom/eep_sandbox.txt
 create mode 040000 doc/device-tree-bindings/w1
 create mode 100644 doc/device-tree-bindings/w1/w1-gpio.txt
 create mode 040000 drivers/w1-eeprom
 create mode 100644 drivers/w1-eeprom/Kconfig
 create mode 100644 drivers/w1-eeprom/Makefile
 create mode 100644 drivers/w1-eeprom/ds24xxx.c
 create mode 100644 drivers/w1-eeprom/eep_sandbox.c
 create mode 100644 drivers/w1-eeprom/w1-eeprom-uclass.c
 create mode 040000 drivers/w1
 create mode 100644 drivers/w1/Kconfig
 create mode 100644 drivers/w1/Makefile
 create mode 100644 drivers/w1/w1-gpio.c
 create mode 100644 drivers/w1/w1-uclass.c
 create mode 100644 include/w1-eeprom.h
 create mode 100644 include/w1.h

-- 
2.7.4



More information about the U-Boot mailing list