From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eugen Hristev Date: Thu, 19 Jul 2018 12:57:48 +0300 Subject: [U-Boot] [PATCH 00/20] Add support for 1wire protocol and 1wire eeproms Message-ID: <1531994288-19423-1-git-send-email-eugen.hristev@microchip.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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. 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 and sama5d3_xplained. 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 01/20] 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 02/20] w1: Add 1-Wire gpio driver Add the bindings documentation in: [PATCH 03/20] dt-bindings: W1: w1-gpio: added bindings for w1-gpio A uclass driver is added for one wire eeproms, in patch : [PATCH 04/20] W1-EEPROM: Add an W1-EEPROM uclass for 1 wire EEPROMs Specific driver for the DS24 Maxim EEPROMs is added in the patch: [PATCH 05/20] W1-EEPROM: add support for Maxim DS24 eeprom families A sandbox driver for a onewire EEPROM is added in patch: [PATCH 06/20] W1-EEPROM: add sandbox driver A command is added for the onewire protocol in patch: [PATCH 07/20] w1: add command for onewire protocol Pinctrl driver for sandbox was updated to add a new group and function for w1: [PATCH 08/20] pinctrl: sandbox: add gpio onewire w1 group Add a node in sandbox DT to have a test node for sandbox. [PATCH 09/20] sandbox: DTS: w1: add node for one wire interface on GPIO The defconfig for sandbox is updated to include the drivers: [PATCH 10/20] configs: sandbox: add onewire w1 and sandbox eeprom Modify the w1 class driver to add a sandbox device if sandbox is configured: [PATCH 11/20] w1: enumerate sandbox driver if configured Configuration for sama5d2 xplained is updated in patch: [PATCH 12/20] configs: sama5d2_xplained: add onewire and eeprom Configuration for sama5d3 xplained is updated in patch: [PATCH 13/20] configs: sama5d3_xplained: add onewire and eeprom Pda detection is added in the common part for atmel boards: [PATCH 14/20] board: atmel: add support for pda detection Specifically add it for Sama5d2 xplained board in patch: [PATCH 15/20] board: sama5d2_xplained: add pda detect call at init time Specifically add it for Sama5d3 xplained board in patch: [PATCH 16/20] board: sama5d3_xplained: add pda detect call at init time Add support for overlays for sama5d2 xplained config in patch: [PATCH 17/20] configs: sama5d2_xplained: add fdt overlay support Add support for overlays for sama5d3 xplained config in patch: [PATCH 18/20] configs: sama5d3_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 19/20] 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 20/20] ARM: dts: at91: sama5d3_xplained: add onewire connector Eugen Hristev (16): dt-bindings: W1: w1-gpio: added bindings for w1-gpio W1-EEPROM: add sandbox driver 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 w1: enumerate sandbox driver if configured configs: sama5d2_xplained: add onewire and eeprom drivers configs: sama5d3_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 configs: sama5d2_xplained: add fdt overlay support configs: sama5d3_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 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-sama5d2_xplained.dts | 12 ++ arch/arm/dts/at91-sama5d3_xplained.dts | 12 ++ arch/arm/dts/sama5d2.dtsi | 6 + arch/arm/dts/sama5d3.dtsi | 6 + arch/arm/mach-at91/Kconfig | 1 + arch/sandbox/dts/sandbox.dts | 15 ++ board/atmel/common/board.c | 55 +++++ 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/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/w1-gpio.txt | 26 +++ 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 | 46 ++++ drivers/w1-eeprom/eep_sandbox.c | 57 +++++ drivers/w1-eeprom/w1-eeprom-uclass.c | 56 +++++ drivers/w1/Kconfig | 25 +++ drivers/w1/Makefile | 3 + drivers/w1/w1-gpio.c | 158 ++++++++++++++ drivers/w1/w1-uclass.c | 273 ++++++++++++++++++++++++ include/dm/uclass-id.h | 2 + include/w1-eeprom.h | 28 +++ include/w1.h | 49 +++++ 33 files changed, 1039 insertions(+) create mode 100644 cmd/w1.c 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