[U-Boot] [PATCH v3 00/34] Add support for 1wire protocol and 1wire eeproms
Eugen Hristev
eugen.hristev at microchip.com
Mon Aug 20 14:25:39 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 3 of the rework, version 1 was titled:
[PATCH 00/20] Add support for 1wire protocol and 1wire eeproms
and version 2 was titled:
[PATCH v2 00/30] Add support for 1wire protocol and 1wire eeproms
It addresses feedback received in the first version and fixes a few bugs
found in the second 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, sama5d4_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 v3 01/34] 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 v3 02/34] w1: Add 1-Wire gpio driver
Add the bindings documentation in:
[PATCH v3 03/34] dt-bindings: W1: w1-gpio: added bindings for w1-gpio
A uclass driver is added for one wire eeproms, in patch :
[PATCH v3 04/34] W1-EEPROM: Add an W1-EEPROM uclass for 1 wire EEPROMs
Connection between memories and the bus is done in the patch:
[PATCH v3 05/34] w1: identify devices with w1-eeprom uclas
Specific driver for the DS24 Maxim EEPROMs is added in the patch:
[PATCH v3 06/34] W1-EEPROM: add support for Maxim DS24 eeprom families
Bindings for the DS24xxx driver added in the patch:
[PATCH v3 07/34] dt-bindings: w1-eeprom: ds24xxx: create bindings
A sandbox driver for a onewire EEPROM is added in patch:
[PATCH v3 08/34] W1-EEPROM: add sandbox driver
Bindings for the sandbox eeprom driver added in patch:
[PATCH v3 09/34] dt-bindings: w1-eeprom: eep_sandbox: create bindings
A command is added for the onewire protocol in patch:
[PATCH v3 10/34] w1: add command for onewire protocol
Pinctrl driver for sandbox was updated to add a new group and function for w1:
[PATCH v3 11/34] pinctrl: sandbox: add gpio onewire w1 group
Add a node in sandbox DT to have a test node for sandbox.
[PATCH v3 12/34] sandbox: DTS: w1: add node for one wire interface on
GPIO
The defconfig for sandbox is updated to include the drivers:
[PATCH v3 13/34] configs: sandbox: add onewire w1 and sandbox
eeprom
Configuration for sama5d2 xplained is updated in patch:
[PATCH v3 14/34] configs: sama5d2_xplained: add onewire and eeprom
Configuration for sama5d3 xplained is updated in patch:
[PATCH v3 15/34] configs: sama5d3_xplained: add onewire and eeprom
Configuration for sama5d27_som1_ek is updated in patch:
[PATCH v3 16/34] configs: sama5d27_som1_ek: add onewire and eeprom
drivers
Configuration for sama5d2 ptc is updated in patch:
[PATCH v3 17/34] configs: sama5d2_ptc_ek: add onewire and eeprom
drivers
Configuration for sama5d4 xplained is updated in patch:
[PATCH v3 18/34] configs: sama5d4_xplained: add onewire and eeprom
drivers
Pda detection is added in the common part for atmel boards:
[PATCH v3 19/34] board: atmel: add support for pda detection
Specifically add it for Sama5d2 xplained board in patch:
[PATCH v3 20/34] board: sama5d2_xplained: add pda detect call at init
time
Specifically add it for Sama5d3 xplained board in patch:
[PATCH v3 21/34] board: sama5d3_xplained: add pda detect call at init
time
Specifically add it for Sama5d27 som1 ek board in patch:
[PATCH v3 22/34] board: sama5d27_som1_ek: add pda detect call at init
time
Specifically add it for Sama5d27 ptc ek board in patch:
[PATCH v3 23/34] board: sama5d2_ptc_ek: add pda detect call at init
time
Specifically add it for Sama5d4 xplained board in patch:
[PATCH v3 24/34] board: sama5d4_xplained: add pda detect call at init
time
Add support for overlays for sama5d2 xplained config in patch:
[PATCH v3 25/34] configs: sama5d2_xplained: add fdt overlay support
Add support for overlays for sama5d3 xplained config in patch:
[PATCH v3 26/34] configs: sama5d3_xplained: add fdt overlay support
Add support for overlays for sama5d2 ptc ek config in patch:
[PATCH v3 27/34] configs: sama5d2_ptc_ek: add fdt overlay support
Add support for overlays for sama5d2 som1 ek config in patch:
[PATCH v3 28/34] configs: sama5d27_som1_ek: add fdt overlay support
Add support for overlays for sama5d4 xplained config in patch:
[PATCH v3 29/34] configs: sama5d4_xplained: 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 v3 30/34] 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 v3 31/34] 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 v3 32/34] 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 v3 33/34] ARM: dts: at91: sama5d2_ptc: add onewire connector
for LCD eeprom
The DT for sama5d2 xplained is updated to include a onewire node.
This is done in patch:
[PATCH v3 34/34] ARM: dts: at91: sama5d4_xplained: add onewire connector
for LCD eeprom
Changes in v3:
- add suport for sama5d4 xplained.
- modified the reset ops for the w1-gpio driver to also check for bus
release by the memory after the presence pulse. This is done to avoid the
case when the bus is being kept indefinitely at low, thus confusing the
detection algorithm.
- fixed issue in w1-uclass when the id for the child node was improperly saved
- fixed issue when the gpio driver was returning only FFs but the read buf
function error code was not checked.
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 (30):
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
configs: sama5d4_xplained: 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
board: sama5d4_xplained: 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
configs: sama5d4_xplained: 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
ARM: dts: at91: sama5d4_xplained: 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/at91-sama5d4_xplained.dts | 16 ++
arch/arm/dts/sama5d2.dtsi | 5 +
arch/arm/dts/sama5d3.dtsi | 5 +
arch/arm/dts/sama5d4.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 +
board/atmel/sama5d4_xplained/sama5d4_xplained.c | 3 +
cmd/Kconfig | 7 +
cmd/Makefile | 1 +
cmd/w1.c | 126 +++++++++++
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/sama5d4_xplained_mmc_defconfig | 5 +
configs/sama5d4_xplained_nandflash_defconfig | 5 +
configs/sama5d4_xplained_spiflash_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 | 116 ++++++++++
drivers/w1/Kconfig | 25 +++
drivers/w1/Makefile | 3 +
drivers/w1/w1-gpio.c | 176 +++++++++++++++
drivers/w1/w1-uclass.c | 240 +++++++++++++++++++++
include/dm/uclass-id.h | 2 +
include/w1-eeprom.h | 33 +++
include/w1.h | 37 ++++
48 files changed, 1295 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