dm: exynos: Driver model improvements leading to spring support
Subsystems (8)
v2 cover dm: exynos: Driver model improvements leading to spring support
This series adds a number of fixes and improvements to driver model as well as two new uclasses (video bridges and I2c muxes).
The series is aimed at adding support for spring (HP 11 Chromebook). Since it is very similar to other ARM Chromebooks, some effory is made to use common code rather than duplicating functionality. In fact spring uses the same code as several other boards, just with a different device tree and a few configuration changes.
Audio works correctly on pit, pi, spring and snow with this series. A bug in the I2C driver broken this recently.
The exynos implementation still has a few rough areas - e.g. some hard-coded GPIOs and the old-style SPL. Also it does not yet support CPU frequency scaling and power management.
Spring has some oddities and they are hard to handle with U-Boot's old way of doing drivers. With driver model these can be implemented cleanly and this sort of problem was the original motivation for my interest in driver model.
This series is available at u-boot-dm in branch spring-working. It is based on the previous set of driver model changes in branch clk-working.
Changes in v2:
- Add a README explaining the algorithm and update the commit message
- Add a comment about DVS in the driver
- Add a new patch to hold off the need for driver model pinctrl
- Add new patch to correct LDO and BUCK naming
- Rebase to dm/master
- Update commit message and header file to better explain select()/deselect()
Simon Glass (19):
exynos: dts: Correct LDO and BUCK naming
video: Work around lack of pinctrl
dm: i2c: Add support for multiplexed I2C buses
i2c: Add a mux for GPIO-based I2C bus arbitration
dm: cros_ec: Convert the I2C tunnel code to use driver model
cros_ec: Support the LDO access method used by spring
dm: pmic: max77686: Support all BUCK regulators
exynos: dts: Drop the old TPS65090 I2C node
exynos: Add common board code for exynos5 boards that use device tree
exynos: Enable new features for exynos5 boards
exynos: config: Move common options to the common headers and tidy up
exynos: Drop old exynos5420-specific board code
exynos: Drop old exynos5250-specific board code
power: Remove old TPS65090 drivers
cros_ec: Remove the old tunnel code
video: Remove the old parade driver
dts: Drop unused compatible ID for the NXP video bridge
exynos: video: Remove non-device-tree code
exynos: Add support for spring
arch/arm/cpu/armv7/exynos/Kconfig | 6 + arch/arm/dts/Makefile | 1 + arch/arm/dts/exynos4412-odroid.dts | 56 +-- arch/arm/dts/exynos4412-trats2.dts | 70 ++-- arch/arm/dts/exynos5250-snow.dts | 16 - arch/arm/dts/exynos5250-spring.dts | 588 +++++++++++++++++++++++++++++ arch/arm/include/asm/arch-exynos/dp_info.h | 2 - board/samsung/common/Makefile | 1 + board/samsung/common/exynos5-dt.c | 362 ++++++++++++++++++ board/samsung/smdk5250/Kconfig | 13 + board/samsung/smdk5250/MAINTAINERS | 6 + board/samsung/smdk5250/Makefile | 4 - board/samsung/smdk5250/exynos5-dt.c | 306 --------------- board/samsung/smdk5420/Makefile | 4 - board/samsung/smdk5420/smdk5420.c | 143 ------- configs/arndale_defconfig | 2 + configs/odroid-xu3_defconfig | 6 + configs/peach-pi_defconfig | 19 + configs/peach-pit_defconfig | 19 + configs/smdk5250_defconfig | 10 + configs/smdk5420_defconfig | 6 + configs/snow_defconfig | 23 ++ configs/spring_defconfig | 42 +++ doc/README.i2c | 60 +++ doc/device-tree-bindings/i2c/i2c-mux.txt | 60 +++ drivers/i2c/Kconfig | 26 ++ drivers/i2c/Makefile | 4 + drivers/i2c/cros_ec_ldo.c | 77 ++++ drivers/i2c/cros_ec_tunnel.c | 41 ++ drivers/i2c/muxes/Kconfig | 17 + drivers/i2c/muxes/Makefile | 7 + drivers/i2c/muxes/i2c-arb-gpio-challenge.c | 147 ++++++++ drivers/i2c/muxes/i2c-mux-uclass.c | 198 ++++++++++ drivers/misc/cros_ec.c | 288 +++----------- drivers/power/pmic/Makefile | 2 - drivers/power/pmic/pmic_tps65090.c | 310 --------------- drivers/power/pmic/pmic_tps65090_ec.c | 218 ----------- drivers/power/regulator/max77686.c | 18 +- drivers/video/Makefile | 1 - drivers/video/bridge/video-bridge-uclass.c | 28 +- drivers/video/exynos_dp.c | 22 -- drivers/video/parade.c | 231 ------------ include/configs/arndale.h | 18 +- include/configs/exynos5-common.h | 13 +- include/configs/exynos5-dt-common.h | 21 +- include/configs/exynos5250-common.h | 16 +- include/configs/exynos5420-common.h | 9 +- include/configs/odroid_xu3.h | 2 + include/configs/peach-pi.h | 14 +- include/configs/peach-pit.h | 24 +- include/configs/smdk5250.h | 16 +- include/configs/smdk5420.h | 10 +- include/configs/snow.h | 15 +- include/configs/spring.h | 20 + include/cros_ec.h | 16 +- include/dm/uclass-id.h | 1 + include/fdtdec.h | 3 - include/i2c.h | 39 ++ include/parade.h | 18 - include/power/tps65090_pmic.h | 73 ---- lib/fdtdec.c | 3 - 61 files changed, 1997 insertions(+), 1794 deletions(-) create mode 100644 arch/arm/dts/exynos5250-spring.dts create mode 100644 board/samsung/common/exynos5-dt.c delete mode 100644 board/samsung/smdk5250/exynos5-dt.c delete mode 100644 board/samsung/smdk5420/smdk5420.c create mode 100644 configs/spring_defconfig create mode 100644 doc/README.i2c create mode 100644 doc/device-tree-bindings/i2c/i2c-mux.txt create mode 100644 drivers/i2c/cros_ec_ldo.c create mode 100644 drivers/i2c/cros_ec_tunnel.c create mode 100644 drivers/i2c/muxes/Kconfig create mode 100644 drivers/i2c/muxes/Makefile create mode 100644 drivers/i2c/muxes/i2c-arb-gpio-challenge.c create mode 100644 drivers/i2c/muxes/i2c-mux-uclass.c delete mode 100644 drivers/power/pmic/pmic_tps65090.c delete mode 100644 drivers/power/pmic/pmic_tps65090_ec.c delete mode 100644 drivers/video/parade.c create mode 100644 include/configs/spring.h delete mode 100644 include/parade.h delete mode 100644 include/power/tps65090_pmic.h
Signature · 1 line
2.5.0.rc2.392.g76e840b
PATCH v2 1/19 exynos: dts: Correct LDO and BUCK naming
At present lower case is used for the regulator names in the device tree. The kernel uses upper case and U-Boot will require this also since it will move to a case-sensitive name check.
---
Changes in v2:
- Add new patch to correct LDO and BUCK naming
arch/arm/dts/exynos4412-odroid.dts | 56 +++++++++++++++--------------- arch/arm/dts/exynos4412-trats2.dts | 70 +++++++++++++++++++------------------- 2 files changed, 63 insertions(+), 63 deletions(-)
arch/arm/dts/exynos4412-odroid.dts +28 -28
@@ -42,103 +42,103 @@ #clock-cells = <1>; voltage-regulators { - ldo1_reg: ldo1 { + ldo1_reg: LDO1 { regulator-name = "VDD_ALIVE_1.0V"; regulator-min-microvolt = <1000000>; regulator-max-microvolt = <1000000>; }; - ldo2_reg: ldo2 { + ldo2_reg: LDO2 { regulator-name = "VDDQ_VM1M2_1.2V"; regulator-min-microvolt = <1200000>; regulator-max-microvolt = <1200000>; }; - ldo3_reg: ldo3 { + ldo3_reg: LDO3 { regulator-name = "VCC_1.8V_AP"; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>; }; - ldo4_reg: ldo4 { + ldo4_reg: LDO4 { regulator-name = "VDDQ_MMC2_2.8V"; regulator-min-microvolt = <2800000>; regulator-max-microvolt = <2800000>; }; - ldo5_reg: ldo5 { + ldo5_reg: LDO5 { regulator-name = "VDDQ_MMC0/1/3_1.8V"; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>; }; - ldo6_reg: ldo6 { + ldo6_reg: LDO6 { regulator-name = "VMPLL_1.0V"; regulator-min-microvolt = <1100000>; regulator-max-microvolt = <1100000>; }; - ldo7_reg: ldo7 { + ldo7_reg: LDO7 { regulator-name = "VPLL_1.1V"; regulator-min-microvolt = <1100000>; regulator-max-microvolt = <1100000>; }; - ldo8_reg: ldo8 { + ldo8_reg: LDO8 { regulator-name = "VDD_MIPI/HDMI_1.0V"; regulator-min-microvolt = <1000000>; regulator-max-microvolt = <1000000>; }; - ldo10_reg: ldo10 { + ldo10_reg: LDO10 { regulator-name = "VDD_MIPI/HDMI_1.8V"; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>; }; - ldo11_reg: ldo11 { + ldo11_reg: LDO11 { regulator-name = "VDD_ABB1_1.8V"; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>; }; - ldo12_reg: ldo12 { + ldo12_reg: LDO12 { regulator-name = "VDD_UOTG_3.0V"; regulator-min-microvolt = <3000000>; regulator-max-microvolt = <3000000>; }; - ldo13_reg: ldo13 { + ldo13_reg: LDO13 { regulator-name = "VDD_C2C_1.8V"; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>; }; - ldo14_reg: ldo14 { + ldo14_reg: LDO14 { regulator-name = "VDD_ABB02_1.8V"; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>; }; - ldo15_reg: ldo15 { + ldo15_reg: LDO15 { regulator-name = "VDD_HSIC/OTG_1.0V"; regulator-min-microvolt = <1000000>; regulator-max-microvolt = <1000000>; }; - ldo16_reg: ldo16 { + ldo16_reg: LDO16 { regulator-name = "VDD_HSIC_1.8V"; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>; }; - ldo17_reg: ldo17 { + ldo17_reg: LDO17 { regulator-name = "VDDQ_CAM_1.2V"; regulator-min-microvolt = <1200000>; regulator-max-microvolt = <1200000>; }; - ldo20_reg: ldo20 { + ldo20_reg: LDO20 { regulator-name = "VDDQ_EMMC_1.8V"; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>;
@@ -146,7 +146,7 @@ regulator-boot-on; }; - ldo21_reg: ldo21 { + ldo21_reg: LDO21 { regulator-name = "TFLASH_2.8V"; regulator-min-microvolt = <2800000>; regulator-max-microvolt = <2800000>;
@@ -154,7 +154,7 @@ regulator-boot-on; }; - ldo22_reg: ldo22 { + ldo22_reg: LDO22 { regulator-name = "VDDQ_EMMC_2.8V"; regulator-min-microvolt = <2800000>; regulator-max-microvolt = <2800000>;
@@ -162,56 +162,56 @@ regulator-boot-on; }; - ldo25_reg: ldo25 { + ldo25_reg: LDO25 { regulator-compatible = "LDO25"; regulator-name = "VDDQ_LCD_3.0V"; regulator-min-microvolt = <3000000>; regulator-max-microvolt = <3000000>; }; - buck1_reg: buck1 { + buck1_reg: BUCK1 { regulator-name = "VDD_MIF_1.0V"; regulator-min-microvolt = <8500000>; regulator-max-microvolt = <1100000>; }; - buck2_reg: buck2 { + buck2_reg: BUCK2 { regulator-name = "VDD_ARM_1.0V"; regulator-min-microvolt = <850000>; regulator-max-microvolt = <1500000>; }; - buck3_reg: buck3 { + buck3_reg: BUCK3 { regulator-name = "VDD_INT_1.1V"; regulator-min-microvolt = <850000>; regulator-max-microvolt = <1150000>; }; - buck4_reg: buck4 { + buck4_reg: BUCK4 { regulator-name = "VDD_G3D_1.0V"; regulator-min-microvolt = <850000>; regulator-max-microvolt = <1150000>; }; - buck5_reg: buck5 { + buck5_reg: BUCK5 { regulator-name = "VDDQ_AP_1.2V"; regulator-min-microvolt = <1200000>; regulator-max-microvolt = <1200000>; }; - buck6_reg: buck6 { + buck6_reg: BUCK6 { regulator-name = "VCC_INL1/7_1.35V"; regulator-min-microvolt = <1350000>; regulator-max-microvolt = <1350000>; }; - buck7_reg: buck7 { + buck7_reg: BUCK7 { regulator-name = "VCC_INL2/3/5_2.0V"; regulator-min-microvolt = <2000000>; regulator-max-microvolt = <2000000>; }; - buck8_reg: buck8 { + buck8_reg: BUCK8 { regulator-name = "VCC_P3V3_2.85V"; regulator-min-microvolt = <2850000>; regulator-max-microvolt = <3300000>;
arch/arm/dts/exynos4412-trats2.dts +35 -35
280 lines not on this page · raw message
Signature · 1 line
2.5.0.rc2.392.g76e840b
PATCH v2 1/19 exynos: dts: Correct LDO and BUCK naming
Quoted 5 lines · Simon Glass
At present lower case is used for the regulator names in the device tree. The kernel uses upper case and U-Boot will require this also since it will move to a case-sensitive name check.
Signed-off-by Simon Glass <[email protected]>
Quoted 8 lines
---
Changes in v2:
- Add new patch to correct LDO and BUCK namingarch/arm/dts/exynos4412-odroid.dts | 56 +++++++++++++++--------------- arch/arm/dts/exynos4412-trats2.dts | 70 +++++++++++++++++++------------------- 2 files changed, 63 insertions(+), 63 deletions(-)
Applied to u-boot-dm.
PATCH v2 2/19 video: Work around lack of pinctrl
In reply to Simon GlassWe haven't quite got pinctrl ready to apply to mainline. We don't want to GPIO pull-up/down support to the driver model GPIO layer either. So work around this for now.
We can address this when pinctrl is complete.
---
Changes in v2:
- Add a new patch to hold off the need for driver model pinctrl
drivers/video/bridge/video-bridge-uclass.c | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-)
drivers/video/bridge/video-bridge-uclass.c +18 -10
@@ -57,22 +57,30 @@ static int video_bridge_pre_probe(struct udevice *dev)debug ("%s: Could not decode sleep-gpios (%d)\n" , __func__, ret);return ret; } - ret =dm_gpio_set_pull (&uc_priv->sleep,GPIO_PULL_NONE ); -if (ret) { -debug ("%s: Could not set sleep pull value\n" , __func__); -return ret; - } +/* +* Drop this for now as we do not have driver model pinctrl support +* +* ret = dm_gpio_set_pull(&uc_priv->sleep, GPIO_PULL_NONE); +* if (ret) { +* debug("%s: Could not set sleep pull value\n", __func__); +* return ret; +* } +*/ ret =gpio_request_by_name (dev,"reset-gpios" ,0 , &uc_priv->reset,GPIOD_IS_OUT );if (ret) {debug ("%s: Could not decode reset-gpios (%d)\n" , __func__, ret);return ret; } - ret =dm_gpio_set_pull (&uc_priv->reset,GPIO_PULL_NONE ); -if (ret) { -debug ("%s: Could not set reset pull value\n" , __func__); -return ret; - } +/* +* Drop this for now as we do not have driver model pinctrl support +* +* ret = dm_gpio_set_pull(&uc_priv->reset, GPIO_PULL_NONE); +* if (ret) { +* debug("%s: Could not set reset pull value\n", __func__); +* return ret; +* } +*/ ret =gpio_request_by_name (dev,"hotplug-gpios" ,0 , &uc_priv->hotplug,GPIOD_IS_IN );if (ret && ret != -ENOENT ) {
Signature · 1 line
2.5.0.rc2.392.g76e840b
PATCH v2 2/19 video: Work around lack of pinctrl
Quoted 6 lines · Simon Glass
We haven't quite got pinctrl ready to apply to mainline. We don't want to GPIO pull-up/down support to the driver model GPIO layer either. So work around this for now.
We can address this when pinctrl is complete.
Quoted 8 lines
Signed-off-by Simon Glass <[email protected]>---
Changes in v2:
- Add a new patch to hold off the need for driver model pinctrldrivers/video/bridge/video-bridge-uclass.c | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-)
Applied to u-boot-dm.
PATCH v2 3/19 dm: i2c: Add support for multiplexed I2C buses
In reply to Simon GlassAdd a new I2C_MUX uclass. Devices in this class can multiplex between several I2C buses, selecting them one at a time for use by the system. The multiplexing mechanism is left to the driver to decide - it may be controlled by GPIOs, for example.
The uclass supports only two methods: select() and deselect().
The current mux state is expected to be stored in the mux itself since it is the only thing that knows how to make things work. The mux can record the current state and then avoid switching unless it is necessary. So select() can be skipped if the mux is already in the correct state. Also deselect() can be made a nop if required.
---
Changes in v2:
- Update commit message and header file to better explain select()/deselect()
doc/device-tree-bindings/i2c/i2c-mux.txt | 60 ++++++++++ drivers/i2c/Kconfig | 2 + drivers/i2c/Makefile | 2 + drivers/i2c/muxes/Kconfig | 8 ++ drivers/i2c/muxes/Makefile | 6 + drivers/i2c/muxes/i2c-mux-uclass.c | 198 +++++++++++++++++++++++++++++++ include/dm/uclass-id.h | 1 + include/i2c.h | 39 ++++++ 8 files changed, 316 insertions(+) create mode 100644 doc/device-tree-bindings/i2c/i2c-mux.txt create mode 100644 drivers/i2c/muxes/Kconfig create mode 100644 drivers/i2c/muxes/Makefile create mode 100644 drivers/i2c/muxes/i2c-mux-uclass.c
doc/device-tree-bindings/i2c/i2c-mux.txt new file +60 -0
@@ -0,0 +1,60 @@ +Common i2c bus multiplexer/switch properties. + +An i2c bus multiplexer/switch will have several child busses that are +numbered uniquely in a device dependent manner. The nodes for an i2c bus +multiplexer/switch will have one child node for each child +bus. + +Required properties: +- #address-cells = <1>; +- #size-cells = <0>; + +Required properties for child nodes: +- #address-cells = <1>; +- #size-cells = <0>; +- reg : The sub-bus number. + +Optional properties for child nodes: +- Other properties specific to the multiplexer/switch hardware. +- Child nodes conforming to i2c bus binding + + +Example : + + /* + An NXP pca9548 8 channel I2C multiplexer at address 0x70 + with two NXP pca8574 GPIO expanders attached, one each to + ports 3 and 4. + */ + + mux at 70 { + compatible = "nxp,pca9548"; + reg = <0x70>; + #address-cells = <1>; + #size-cells = <0>; + + i2c at 3 { + #address-cells = <1>; + #size-cells = <0>; + reg = <3>; + + gpio1: gpio at 38 { + compatible = "nxp,pca8574"; + reg = <0x38>; + #gpio-cells = <2>; + gpio-controller; + }; + }; + i2c at 4 { + #address-cells = <1>; + #size-cells = <0>; + reg = <4>; + + gpio2: gpio at 38 { + compatible = "nxp,pca8574"; + reg = <0x38>; + #gpio-cells = <2>; + gpio-controller; + }; + }; + };
drivers/i2c/Kconfig +2 -0
@@ -73,3 +73,5 @@ config SYS_I2C_UNIPHIER_F help Support for UniPhier FIFO-builtin I2C controller driver. This I2C controller is used on PH1-Pro4 or newer UniPhier SoCs. + +source "drivers/i2c/muxes/Kconfig"
drivers/i2c/Makefile +2 -0
@@ -37,3 +37,5 @@ obj-$(CONFIG_SYS_I2C_TEGRA) += tegra_i2c.o obj-$(CONFIG_SYS_I2C_UNIPHIER) += i2c-uniphier.o obj-$(CONFIG_SYS_I2C_UNIPHIER_F) += i2c-uniphier-f.o obj-$(CONFIG_SYS_I2C_ZYNQ) += zynq_i2c.o + +obj-y += muxes/
drivers/i2c/muxes/Kconfig new file +8 -0
@@ -0,0 +1,8 @@ +config I2C_MUX + bool "Suport I2C multiplexers" + depends on DM_I2C + help + This enables I2C buses to be multiplexed, so that you can select + one of several buses using some sort of control mechanism. The + bus select is handled automatically when that bus is accessed, + using a suitable I2C MUX driver.
drivers/i2c/muxes/Makefile new file +6 -0
@@ -0,0 +1,6 @@ +# +# Copyright (c) 2015 Google, Inc +# +# SPDX-License-Identifier: GPL-2.0+ +# +obj-$(CONFIG_I2C_MUX) += i2c-mux-uclass.o
drivers/i2c/muxes/i2c-mux-uclass.c new file +198 -0
198 lines not on this page · raw message
include/dm/uclass-id.h +1 -0
@@ -35,6 +35,7 @@ enum uclass_id {UCLASS_I2C ,/* I2C bus */ UCLASS_I2C_EEPROM ,/* I2C EEPROM device */ UCLASS_I2C_GENERIC ,/* Generic I2C device */ +UCLASS_I2C_MUX ,/* I2C multiplexer */ UCLASS_LED ,/* Light-emitting diode (LED) */ UCLASS_LPC ,/* x86 'low pin count' interface */ UCLASS_MASS_STORAGE, /* Mass storage device */
include/i2c.h +39 -0
@@ -445,6 +445,45 @@ struct dm_i2c_ops {#define i2c_get_ops (dev) ((struct dm_i2c_ops *)(dev)->driver->ops)/** +* struct i2c_mux_ops - operations for an I2C mux +* +* The current mux state is expected to be stored in the mux itself since +* it is the only thing that knows how to make things work. The mux can +* record the current state and then avoid switching unless it is necessary. +* So select() can be skipped if the mux is already in the correct state. +* Also deselect() can be made a nop if required. +*/ +struct i2c_mux_ops { +/** +* select() - select one of of I2C buses attached to a mux +* +* This will be called when there is no bus currently selected by the +* mux. This method does not need to deselect the old bus since +* deselect() will be already have been called if necessary. +* +* @mux: Mux device +* @bus: I2C bus to select +* @channel: Channel number correponding to the bus to select +* @return 0 if OK, -ve on error +*/ +int (*select)(struct udevice *mux,struct udevice *bus,uint channel); + +/** +* deselect() - select one of of I2C buses attached to a mux +* +* This is used to deselect the currently selected I2C bus. +* +* @mux: Mux device +* @bus: I2C bus to deselect +* @channel: Channel number correponding to the bus to deselect +* @return 0 if OK, -ve on error +*/ +int (*deselect)(struct udevice *mux,struct udevice *bus,uint channel); +}; + +#define i2c_mux_get_ops (dev) ((struct i2c_mux_ops *)(dev)->driver->ops) + +/** * i2c_get_chip() - get a device to use to access a chip on a bus * * This returns the device for the given chip address. The device can then
Signature · 1 line
2.5.0.rc2.392.g76e840b
PATCH v2 3/19 dm: i2c: Add support for multiplexed I2C buses
Quoted 19 lines · Simon Glass
Add a new
I2C_MUXuclass. Devices in this class can multiplex between several I2C buses, selecting them one at a time for use by the system. The multiplexing mechanism is left to the driver to decide - it may be controlled by GPIOs, for example.The uclass supports only two methods:
select()anddeselect().The current mux state is expected to be stored in the mux itself since it is the only thing that knows how to make things work. The mux can record the current state and then avoid switching unless it is necessary. So
select()can be skipped if the mux is already in the correct state. Alsodeselect()can be made a nop if required.Signed-off-by Simon Glass <[email protected]>---
Changes in v2:
- Update commit message and header file to better explain select()/deselect()
Quoted 13 lines
doc/device-tree-bindings/i2c/i2c-mux.txt | 60 ++++++++++ drivers/i2c/Kconfig | 2 + drivers/i2c/Makefile | 2 + drivers/i2c/muxes/Kconfig | 8 ++ drivers/i2c/muxes/Makefile | 6 + drivers/i2c/muxes/i2c-mux-uclass.c | 198 +++++++++++++++++++++++++++++++ include/dm/uclass-id.h | 1 + include/i2c.h | 39 ++++++ 8 files changed, 316 insertions(+) create mode 100644 doc/device-tree-bindings/i2c/i2c-mux.txt create mode 100644 drivers/i2c/muxes/Kconfig create mode 100644 drivers/i2c/muxes/Makefile create mode 100644 drivers/i2c/muxes/i2c-mux-uclass.c
Applied to u-boot-dm.
PATCH v2 4/19 i2c: Add a mux for GPIO-based I2C bus arbitration
In reply to Simon GlassWhile I2C supports multi-master buses this is difficult to get right. The implementation on the master side in software is quite complex. Clock-stretching and the arbitrary time that an I2C transaction can take make it difficult to share the bus fairly in the face of high traffic. When one or more masters can be reset independently part-way through a transaction it is hard to know the state of the bus.
This driver provides a scheme based on two 'claim' GPIOs, one driven by the AP (Application Processor, meaning the main CPU) and one driven by the EC (Embedded Controller, a small CPU aimed at handling system tasks). With these they can communicate and reliably share the bus. This scheme has minimal overhead and involves very little code. It is used on snow to permit the EC and the AP to share access to the main system PMIC and battery. The scheme can survive reboots by either side without difficulty. This scheme has been tested in the field with millions of devices.
Since U-Boot runs on the AP, the terminology used is 'our' claim GPIO, meaning the AP's, and 'their' claim GPIO, meaning the EC's. This terminology is used by the device tree bindings in Linux also.
---
Changes in v2:
- Add a README explaining the algorithm and update the commit message
doc/README.i2c | 60 ++++++++++++ drivers/i2c/muxes/Kconfig | 9 ++ drivers/i2c/muxes/Makefile | 1 + drivers/i2c/muxes/i2c-arb-gpio-challenge.c | 147 +++++++++++++++++++++++++++++ 4 files changed, 217 insertions(+) create mode 100644 doc/README.i2c create mode 100644 drivers/i2c/muxes/i2c-arb-gpio-challenge.c
doc/README.i2c new file +60 -0
@@ -0,0 +1,60 @@ +I2C Bus Arbitration +=================== + +While I2C supports multi-master buses this is difficult to get right. +The implementation on the master side in software is quite complex. +Clock-stretching and the arbitrary time that an I2C transaction can take +make it difficult to share the bus fairly in the face of high traffic. +When one or more masters can be reset independently part-way through a +transaction it is hard to know the state of the bus. + +U-Boot provides a scheme based on two 'claim' GPIOs, one driven by the +AP (Application Processor, meaning the main CPU) and one driven by the EC +(Embedded Controller, a small CPU aimed at handling system tasks). With +these they can communicate and reliably share the bus. This scheme has +minimal overhead and involves very little code. The scheme can survive +reboots by either side without difficulty. + +Since U-Boot runs on the AP, the terminology used is 'our' claim GPIO, +meaning the AP's, and 'their' claim GPIO, meaning the EC's. This terminology +is used by the device tree bindings in Linux also. + +The driver is implemented as an I2C mux, as it is in Linux. See +i2c-arb-gpio-challenge for the implementation. + +GPIO lines are shared between the AP and EC to manage the bus. The AP and EC +each have a 'bus claim' line, which is an output that the other can see. + +- AP_CLAIM: output from AP, signalling to the EC that the AP wants the bus +- EC_CLAIM: output from EC, signalling to the AP that the EC wants the bus + +The basic algorithm is to assert your line when you want the bus, then make +sure that the other side doesn't want it also. A detailed explanation is best +done with an example. + +Let's say the AP wants to claim the bus. It: + +1. Asserts AP_CLAIM +2. Waits a little bit for the other side to notice (slew time) +3. Checks EC_CLAIM. If this is not asserted, then the AP has the bus, and we + are done +4. Otherwise, wait for a few milliseconds (retry time) and see if EC_CLAIM is + released +5. If not, back off, release the claim and wait for a few more milliseconds + (retry time again) +6. Go back to 1 if things don't look wedged (wait time has expired) +7. Panic. The other side is hung with the CLAIM line set. + +The same algorithm applies on the EC. + +To release the bus, just de-assert the claim line. + +Typical delays are: +- slew time 10 us +- retry time 3 ms +- wait time - 50ms + +In general the traffic is fairly light, and in particular the EC wants access +to the bus quite rarely (maybe every 10s or 30s to check the battery). This +scheme works very nicely with very low contention. There is only a 10 us +wait for access to the bus assuming that the other side isn't using it.
drivers/i2c/muxes/Kconfig +9 -0
@@ -6,3 +6,12 @@ config I2C_MUX one of several buses using some sort of control mechanism. The bus select is handled automatically when that bus is accessed, using a suitable I2C MUX driver. + +config I2C_ARB_GPIO_CHALLENGE + bool "GPIO-based I2C arbitration" + depends on I2C_MUX + help + If you say yes to this option, support will be included for an + I2C multimaster arbitration scheme using GPIOs and a challenge & + response mechanism where masters have to claim the bus by asserting + a GPIO.
drivers/i2c/muxes/Makefile +1 -0
@@ -3,4 +3,5 @@ # # SPDX-License-Identifier: GPL-2.0+ # +obj-$(CONFIG_I2C_ARB_GPIO_CHALLENGE) += i2c-arb-gpio-challenge.o obj-$(CONFIG_I2C_MUX) += i2c-mux-uclass.o
drivers/i2c/muxes/i2c-arb-gpio-challenge.c new file +147 -0
147 lines not on this page · raw message
Signature · 1 line
2.5.0.rc2.392.g76e840b
PATCH v2 4/19 i2c: Add a mux for GPIO-based I2C bus arbitration
Quoted 26 lines · Simon Glass
While I2C supports multi-master buses this is difficult to get right. The implementation on the master side in software is quite complex. Clock-stretching and the arbitrary time that an I2C transaction can take make it difficult to share the bus fairly in the face of high traffic. When one or more masters can be reset independently part-way through a transaction it is hard to know the state of the bus.
This driver provides a scheme based on two 'claim' GPIOs, one driven by the AP (Application Processor, meaning the main CPU) and one driven by the EC (Embedded Controller, a small CPU aimed at handling system tasks). With these they can communicate and reliably share the bus. This scheme has minimal overhead and involves very little code. It is used on snow to permit the EC and the AP to share access to the main system PMIC and battery. The scheme can survive reboots by either side without difficulty. This scheme has been tested in the field with millions of devices.
Since U-Boot runs on the AP, the terminology used is 'our' claim GPIO, meaning the AP's, and 'their' claim GPIO, meaning the EC's. This terminology is used by the device tree bindings in Linux also.
Signed-off-by Simon Glass <[email protected]>---
Changes in v2:
- Add a README explaining the algorithm and update the commit message
Quoted 7 lines
doc/README.i2c | 60 ++++++++++++ drivers/i2c/muxes/Kconfig | 9 ++ drivers/i2c/muxes/Makefile | 1 + drivers/i2c/muxes/i2c-arb-gpio-challenge.c | 147 +++++++++++++++++++++++++++++ 4 files changed, 217 insertions(+) create mode 100644 doc/README.i2c create mode 100644 drivers/i2c/muxes/i2c-arb-gpio-challenge.c
Applied to u-boot-dm.
PATCH v2 5/19 dm: cros_ec: Convert the I2C tunnel code to use driver model
In reply to Simon GlassThe Chrome OS EC supports tunnelling through to an I2C bus on the EC. This currently uses a copy of the I2C command code and a special 'crosec' sub-command.
With driver model we can define an I2C bus which tunnels through to the EC, and use the normal 'i2c' command to access it. This simplifies the code and removes some duplication.
Add an I2C driver which tunnels through to the EC. Adjust the EC code to support binding child devices so that it can be set up. Adjust the existing I2C xfer function to fit driver model better.
For now the old code remains to allow things to still work. It will be removed in a later patch once the new flow is fully enabled.
---
Changes in v2: None
configs/peach-pi_defconfig | 2 + configs/peach-pit_defconfig | 2 + drivers/i2c/Kconfig | 11 +++++ drivers/i2c/Makefile | 1 + drivers/i2c/cros_ec_tunnel.c | 41 +++++++++++++++ drivers/misc/cros_ec.c | 93 +++++++++++++++++++++++++++++++++-- drivers/power/pmic/pmic_tps65090_ec.c | 8 +-- include/cros_ec.h | 14 +++++- 8 files changed, 161 insertions(+), 11 deletions(-) create mode 100644 drivers/i2c/cros_ec_tunnel.c
configs/peach-pi_defconfig +2 -0
@@ -12,3 +12,5 @@ CONFIG_CROS_EC_SPI=y CONFIG_CROS_EC_KEYB=y CONFIG_USB=y CONFIG_DM_USB=y +CONFIG_I2C_MUX=y +CONFIG_I2C_CROS_EC_TUNNEL=y
configs/peach-pit_defconfig +2 -0
@@ -12,3 +12,5 @@ CONFIG_CROS_EC_SPI=y CONFIG_CROS_EC_KEYB=y CONFIG_USB=y CONFIG_DM_USB=y +CONFIG_I2C_MUX=y +CONFIG_I2C_CROS_EC_TUNNEL=y
drivers/i2c/Kconfig +11 -0
@@ -19,6 +19,17 @@ config DM_I2C_COMPAT to convert all code for a board in a single commit. It should not be enabled for any board in an official release. +config I2C_CROS_EC_TUNNEL + tristate "Chrome OS EC tunnel I2C bus" + depends on CROS_EC + help + This provides an I2C bus that will tunnel i2c commands through to + the other side of the Chrome OS EC to the I2C bus connected there. + This will work whatever the interface used to talk to the EC (SPI, + I2C or LPC). Some Chromebooks use this when the hardware design + does not allow direct access to the main PMIC from the AP. + + config DM_I2C_GPIO bool "Enable Driver Model for software emulated I2C bus driver" depends on DM_I2C && DM_GPIO
drivers/i2c/Makefile +1 -0
@@ -7,6 +7,7 @@ obj-$(CONFIG_DM_I2C) += i2c-uclass.o obj-$(CONFIG_DM_I2C_COMPAT) += i2c-uclass-compat.o obj-$(CONFIG_DM_I2C_GPIO) += i2c-gpio.o +obj-$(CONFIG_I2C_CROS_EC_TUNNEL) += cros_ec_tunnel.o obj-$(CONFIG_SYS_I2C_ADI) += adi_i2c.o obj-$(CONFIG_I2C_MV) += mv_i2c.o
drivers/i2c/cros_ec_tunnel.c new file +41 -0
41 lines not on this page · raw message
drivers/misc/cros_ec.c +88 -5
133 lines not on this page · raw message
drivers/power/pmic/pmic_tps65090_ec.c +4 -4
@@ -56,8 +56,8 @@ enum {*/ static int tps65090_read (u32 reg,u8 *val) { -return cros_ec_i2c_xfer (config.dev,TPS65090_ADDR , reg,1 , - val,1 , true); +return cros_ec_i2c_xfer_old (config.dev,TPS65090_ADDR , reg,1 , + val,1 , true); }/**
@@ -69,8 +69,8 @@ static int tps65090_read(u32 reg, u8 *val)*/ static int tps65090_write (u32 reg,u8 val) { -return cros_ec_i2c_xfer (config.dev,TPS65090_ADDR , reg,1 , - &val,1 , false); +return cros_ec_i2c_xfer_old (config.dev,TPS65090_ADDR , reg,1 , + &val,1 , false); }/**
include/cros_ec.h +12 -2
@@ -390,6 +390,16 @@ int cros_ec_decode_ec_flash(const void *blob, int node,*/ void cros_ec_check_keyboard (struct cros_ec_dev *dev); +struct i2c_msg ; +/* +* Tunnel an I2C transfer to the EC +* +* @param dev CROS-EC device +* @param msg List of messages to transfer +* @param nmsgs Number of messages to transfer +*/ +int cros_ec_i2c_tunnel (struct udevice *dev,struct i2c_msg *msg,int nmsgs); +/* * Tunnel an I2C transfer to the EC *
@@ -401,7 +411,7 @@ void cros_ec_check_keyboard(struct cros_ec_dev *dev);* @param len Length of buffer * @param is_read 1 if this is a read, 0 if this is a write */ -int cros_ec_i2c_xfer (struct cros_ec_dev *dev,uchar chip,uint addr, -int alen,uchar *buffer,int len,int is_read); +int cros_ec_i2c_xfer_old (struct cros_ec_dev *dev,uchar chip,uint addr, +int alen,uchar *buffer,int len,int is_read);#endif
Signature · 1 line
2.5.0.rc2.392.g76e840b
PATCH v2 5/19 dm: cros_ec: Convert the I2C tunnel code to use driver model
Quoted 20 lines · Simon Glass
The Chrome OS EC supports tunnelling through to an I2C bus on the EC. This currently uses a copy of the I2C command code and a special 'crosec' sub-command.
With driver model we can define an I2C bus which tunnels through to the EC, and use the normal 'i2c' command to access it. This simplifies the code and removes some duplication.
Add an I2C driver which tunnels through to the EC. Adjust the EC code to support binding child devices so that it can be set up. Adjust the existing I2C xfer function to fit driver model better.
For now the old code remains to allow things to still work. It will be removed in a later patch once the new flow is fully enabled.
Signed-off-by Simon Glass <[email protected]>---
Changes in v2: None
Quoted 10 lines
configs/peach-pi_defconfig | 2 + configs/peach-pit_defconfig | 2 + drivers/i2c/Kconfig | 11 +++++ drivers/i2c/Makefile | 1 + drivers/i2c/cros_ec_tunnel.c | 41 +++++++++++++++ drivers/misc/cros_ec.c | 93 +++++++++++++++++++++++++++++++++-- drivers/power/pmic/pmic_tps65090_ec.c | 8 +-- include/cros_ec.h | 14 +++++- 8 files changed, 161 insertions(+), 11 deletions(-) create mode 100644 drivers/i2c/cros_ec_tunnel.c
Applied to u-boot-dm.
PATCH v2 6/19 cros_ec: Support the LDO access method used by spring
In reply to Simon GlassAdd a driver to support the special LDO access used by spring. This is a custom method in the cros_ec protocol - it does not use an I2C pass-through.
There are two implementation choices:
1. Write a special LDO driver which can talk across the EC. Duplicate all the logic from TPS65090 for retrying when the LDO fails to come up.
2. Write a special I2C bus driver which pretends to be a TPS65090 and transfers reads and writes using the LDO message.
Either is distasteful. The latter method is chosen since it results in less code duplication and a fairly simple (30-line) implementation of the core logic.
The crosec 'ldo' subcommand could be removed (since i2c md/mw will work instead) but is retained as a convenience.
---
Changes in v2: None
drivers/i2c/Kconfig | 13 ++++++++ drivers/i2c/Makefile | 1 + drivers/i2c/cros_ec_ldo.c | 77 +++++++++++++++++++++++++++++++++++++++++++++++ drivers/misc/cros_ec.c | 21 +++++++------ include/cros_ec.h | 4 +-- 5 files changed, 104 insertions(+), 12 deletions(-) create mode 100644 drivers/i2c/cros_ec_ldo.c
drivers/i2c/Kconfig +13 -0
@@ -29,6 +29,19 @@ config I2C_CROS_EC_TUNNEL I2C or LPC). Some Chromebooks use this when the hardware design does not allow direct access to the main PMIC from the AP. +config I2C_CROS_EC_LDO + bool "Provide access to LDOs on the Chrome OS EC" + depends on CROS_EC + ---help--- + On many Chromebooks the main PMIC is inaccessible to the AP. This is + often dealt with by using an I2C pass-through interface provided by + the EC. On some unfortunate models (e.g. Spring) the pass-through + is not available, and an LDO message is available instead. This + option enables a driver which provides very basic access to those + regulators, via the EC. We implement this as an I2C bus which + emulates just the TPS65090 messages we know about. This is done to + avoid duplicating the logic in the TPS65090 regulator driver for + enabling/disabling an LDO. config DM_I2C_GPIO bool "Enable Driver Model for software emulated I2C bus driver"
drivers/i2c/Makefile +1 -0
@@ -8,6 +8,7 @@ obj-$(CONFIG_DM_I2C) += i2c-uclass.o obj-$(CONFIG_DM_I2C_COMPAT) += i2c-uclass-compat.o obj-$(CONFIG_DM_I2C_GPIO) += i2c-gpio.o obj-$(CONFIG_I2C_CROS_EC_TUNNEL) += cros_ec_tunnel.o +obj-$(CONFIG_I2C_CROS_EC_LDO) += cros_ec_ldo.o obj-$(CONFIG_SYS_I2C_ADI) += adi_i2c.o obj-$(CONFIG_I2C_MV) += mv_i2c.o
drivers/i2c/cros_ec_ldo.c new file +77 -0
77 lines not on this page · raw message
drivers/misc/cros_ec.c +11 -10
@@ -931,31 +931,32 @@ int cros_ec_write_vbnvcontext(struct cros_ec_dev *dev, const uint8_t *block)return 0 ; } -int cros_ec_set_ldo (struct cros_ec_dev *dev,uint8_t index,uint8_t state) +int cros_ec_set_ldo (struct udevice *dev,uint8_t index,uint8_t state) { +struct cros_ec_dev *cdev =dev_get_uclass_priv (dev);struct ec_params_ldo_set params; params.index = index; params.state = state; -if (ec_command_inptr (dev,EC_CMD_LDO_SET ,0 , - ¶ms,sizeof (params), -NULL ,0 )) +if (ec_command_inptr (cdev,EC_CMD_LDO_SET ,0 , ¶ms,sizeof (params), +NULL ,0 ))return -1 ;return 0 ; } -int cros_ec_get_ldo (struct cros_ec_dev *dev,uint8_t index,uint8_t *state) +int cros_ec_get_ldo (struct udevice *dev,uint8_t index,uint8_t *state) { +struct cros_ec_dev *cdev =dev_get_uclass_priv (dev);struct ec_params_ldo_get params;struct ec_response_ldo_get *resp; params.index = index; -if (ec_command_inptr (dev,EC_CMD_LDO_GET ,0 , - ¶ms,sizeof (params), - (uint8_t **)&resp,sizeof (*resp)) !=sizeof (*resp)) +if (ec_command_inptr (cdev,EC_CMD_LDO_GET ,0 , ¶ms,sizeof (params), + (uint8_t **)&resp,sizeof (*resp)) != +sizeof (*resp))return -1 ; *state = resp->state;
@@ -1681,9 +1682,9 @@ static int do_cros_ec(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) state =simple_strtoul (argv[3 ], &endp,10 );if (*argv[3 ] ==0 || *endp !=0 )return CMD_RET_USAGE ; - ret =cros_ec_set_ldo (dev, index, state); + ret =cros_ec_set_ldo (udev, index, state); }else { - ret =cros_ec_get_ldo (dev, index, &state); + ret =cros_ec_get_ldo (udev, index, &state);if (!ret) { printf("LDO%d: %s\n", index, state == EC_LDO_STATE_ON ?
include/cros_ec.h +2 -2
@@ -350,7 +350,7 @@ int cros_ec_read_build_info(struct cros_ec_dev *dev, char **strp);* @param state new state of the LDO/FET : EC_LDO_STATE_ON|OFF * @return 0 if ok, -1 on error */ -int cros_ec_set_ldo (struct cros_ec_dev *dev,uint8_t index,uint8_t state); +int cros_ec_set_ldo (struct udevice *dev,uint8_t index,uint8_t state);/** * Read back a LDO / FET current state.
@@ -360,7 +360,7 @@ int cros_ec_set_ldo(struct cros_ec_dev *dev, uint8_t index, uint8_t state);* @param state current state of the LDO/FET : EC_LDO_STATE_ON|OFF * @return 0 if ok, -1 on error */ -int cros_ec_get_ldo (struct cros_ec_dev *dev,uint8_t index,uint8_t *state); +int cros_ec_get_ldo (struct udevice *dev,uint8_t index,uint8_t *state);/** * Get access to the error reported when cros_ec_board_init() was called
Signature · 1 line
2.5.0.rc2.392.g76e840b
PATCH v2 6/19 cros_ec: Support the LDO access method used by spring
Quoted 24 lines · Simon Glass
Add a driver to support the special LDO access used by spring. This is a custom method in the
cros_ecprotocol - it does not use an I2C pass-through.There are two implementation choices:
1. Write a special LDO driver which can talk across the EC. Duplicate all the logic from TPS65090 for retrying when the LDO fails to come up.
2. Write a special I2C bus driver which pretends to be a TPS65090 and transfers reads and writes using the LDO message.
Either is distasteful. The latter method is chosen since it results in less code duplication and a fairly simple (30-line) implementation of the core logic.
The crosec 'ldo' subcommand could be removed (since i2c md/mw will work instead) but is retained as a convenience.
Signed-off-by Simon Glass <[email protected]>---
Changes in v2: None
Quoted 7 lines
drivers/i2c/Kconfig | 13 ++++++++ drivers/i2c/Makefile | 1 + drivers/i2c/cros_ec_ldo.c | 77 +++++++++++++++++++++++++++++++++++++++++++++++ drivers/misc/cros_ec.c | 21 +++++++------ include/cros_ec.h | 4 +-- 5 files changed, 104 insertions(+), 12 deletions(-) create mode 100644 drivers/i2c/cros_ec_ldo.c
Applied to u-boot-dm.
PATCH v2 7/19 dm: pmic: max77686: Support all BUCK regulators
In reply to Simon GlassAdd support for all BUCK regulators, now that the correct register is accessed for each.
---
Changes in v2:
- Add a comment about DVS in the driver
drivers/power/regulator/max77686.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-)
drivers/power/regulator/max77686.c +10 -8
@@ -81,13 +81,15 @@ static int max77686_buck_volt2hex(int buck, int uV)/* hex = (uV - 600000) / 12500; */ hex = (uV -MAX77686_BUCK_UV_LMIN ) /MAX77686_BUCK_UV_LSTEP ; hex_max =MAX77686_BUCK234_VOLT_MAX_HEX ; -/** -* Those use voltage scaller - temporary not implemented -* so return just 0 -*/ -return -ENOSYS ; +break ;default : -/* hex = (uV - 750000) / 50000; */ +/* +* hex = (uV - 750000) / 50000. We assume that dynamic voltage +* scaling via GPIOs is not enabled and don't support that. +* If this is enabled then the driver will need to take that +* into account anrd check different registers depending on +* the current setting See the datasheet for details. +*/ hex = (uV -MAX77686_BUCK_UV_HMIN ) /MAX77686_BUCK_UV_HSTEP ; hex_max =MAX77686_BUCK_VOLT_MAX_HEX ;break ;
@@ -379,11 +381,11 @@ static int max77686_buck_val(struct udevice *dev, int op, int *uV)case 2 :case 3 :case 4 : -/* Those use voltage scallers - will support in the future */ mask =MAX77686_BUCK234_VOLT_MASK ; -return -ENOSYS ; +break ;default : mask =MAX77686_BUCK_VOLT_MASK ; +break ; } ret =pmic_read (dev->parent, adr, &val,1 );
Signature · 1 line
2.5.0.rc2.392.g76e840b
PATCH v2 7/19 dm: pmic: max77686: Support all BUCK regulators
Hello Simon,
Quoted 23 lines · Simon Glass
Add support for all BUCK regulators, now that the correct register is accessed for each.
Signed-off-by Simon Glass <[email protected]>---
Changes in v2:
- Add a comment about DVS in the driverdrivers/power/regulator/max77686.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-)drivers/power/regulator/max77686.c +0
-3@@ -81,13 +81,15 @@ static int max77686_buck_volt2hex(int buck, int uV)/* hex = (uV - 600000) / 12500; */ hex = (uV -MAX77686_BUCK_UV_LMIN ) /MAX77686_BUCK_UV_LSTEP ; hex_max =MAX77686_BUCK234_VOLT_MAX_HEX ; -/** -* Those use voltage scaller - temporary not implemented -* so return just 0
drivers/power/regulator/max77686.c static int max77686_buck_volt2hex(int buck, int uV) · line 90
Quoted 10 lines
drivers/power/regulator/max77686.c +6
-3-*/ -return -ENOSYS ; +break ;default : -/* hex = (uV - 750000) / 50000; */ +/* +* hex = (uV - 750000) / 50000. We assume that dynamic voltage +* scaling via GPIOs is not enabled and don't support that. +* If this is enabled then the driver will need to take that +* into account anrd check different registers depending on
and check
drivers/power/regulator/max77686.c static int max77686_buck_volt2hex(int buck, int uV) · line 91
Quoted 1 line
drivers/power/regulator/max77686.c +1
-0+* the current setting See the datasheet for details.
setting. See
... snip ...
Best regards,
Signature · 4 lines
Przemyslaw Marczak Samsung R&D Institute Poland Samsung Electronics p.marczak at samsung.com
PATCH v2 7/19 dm: pmic: max77686: Support all BUCK regulators
In reply to Simon GlassQuoted 11 lines · Simon Glass
Add support for all BUCK regulators, now that the correct register is accessed for each.
Signed-off-by Simon Glass <[email protected]>---
Changes in v2:
- Add a comment about DVS in the driverdrivers/power/regulator/max77686.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-)
Applied to u-boot-dm.
PATCH v2 8/19 exynos: dts: Drop the old TPS65090 I2C node
In reply to Simon GlassWhile the AP can access the main PMIC on snow, it must coordinate with the EC which also wants access. Drop the old definition, which can in principle generate collision errors. We will use the new arbitration driver instead.
---
Changes in v2: None
arch/arm/dts/exynos5250-snow.dts | 16 ---------------- 1 file changed, 16 deletions(-)
arch/arm/dts/exynos5250-snow.dts +0 -16
@@ -95,22 +95,6 @@ }; }; - - i2c4: i2c at 12CA0000 { - cros_ec_old: cros-ec at 1e { - reg = <0x1e>; - compatible = "google,cros-ec-i2c"; - i2c-max-frequency = <100000>; - u-boot,i2c-offset-len = <0>; - ec-interrupt = <&gpx1 6 GPIO_ACTIVE_LOW>; - }; - - power-regulator at 48 { - compatible = "ti,tps65090"; - reg = <0x48>; - }; - }; - i2c-arbitrator { compatible = "i2c-arb-gpio-challenge"; #address-cells = <1>;
Signature · 1 line
2.5.0.rc2.392.g76e840b
PATCH v2 8/19 exynos: dts: Drop the old TPS65090 I2C node
Quoted 11 lines · Simon Glass
While the AP can access the main PMIC on snow, it must coordinate with the EC which also wants access. Drop the old definition, which can in principle generate collision errors. We will use the new arbitration driver instead.
Signed-off-by Simon Glass <[email protected]>---
Changes in v2: None
arch/arm/dts/exynos5250-snow.dts | 16 ---------------- 1 file changed, 16 deletions(-)
Applied to u-boot-dm.
PATCH v2 9/19 exynos: Add common board code for exynos5 boards that use device tree
In reply to Simon GlassSome boards use device tree for almost all board-specific configuration. They therefore do not need their own separate board code, but can all use the same version. Add a common version of the board code. It uses the PMIC, regulator and video bridge uclasses. This will support smdk5250, smdk5420, snow, spring, pit and pi.
---
Changes in v2: None
board/samsung/common/Makefile | 1 + board/samsung/common/exynos5-dt.c | 362 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 363 insertions(+) create mode 100644 board/samsung/common/exynos5-dt.c
board/samsung/common/Makefile +1 -0
@@ -11,4 +11,5 @@ obj-$(CONFIG_MISC_COMMON) += misc.o ifndef CONFIG_SPL_BUILD obj-$(CONFIG_BOARD_COMMON) += board.o +obj-$(CONFIG_EXYNOS5_DT) += exynos5-dt.o endif
board/samsung/common/exynos5-dt.c new file +362 -0
362 lines not on this page · raw message
Signature · 1 line
2.5.0.rc2.392.g76e840b
PATCH v2 9/19 exynos: Add common board code for exynos5 boards that use device tree
Hello Simon,
Quoted 129 lines · Simon Glass
Some boards use device tree for almost all board-specific configuration. They therefore do not need their own separate board code, but can all use the same version. Add a common version of the board code. It uses the PMIC, regulator and video bridge uclasses. This will support smdk5250, smdk5420, snow, spring, pit and pi.
Signed-off-by Simon Glass <[email protected]>---
Changes in v2: None
board/samsung/common/Makefile | 1 + board/samsung/common/exynos5-dt.c | 362 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 363 insertions(+)create mode 100644
board/samsung/common/exynos5-dt.cboard/samsung/common/Makefile +1
-0@@ -11,4 +11,5 @@ obj-$(CONFIG_MISC_COMMON) += misc.o ifndef CONFIG_SPL_BUILD obj-$(CONFIG_BOARD_COMMON) += board.o +obj-$(CONFIG_EXYNOS5_DT) += exynos5-dt.o endifboard/samsung/common/exynos5-dt.c new file +97
-0@@ -0,0 +1,362 @@ +/* +* Copyright (C) 2012 Samsung Electronics +* +* SPDX-License-Identifier: GPL-2.0+ +*/ + +#include <common.h> +#include <dm.h> +#include <dwc3-uboot.h> +#include <fdtdec.h> +#include <asm/io.h> +#include <errno.h> +#include <i2c.h> +#include <mmc.h> +#include <netdev.h> +#include <samsung-usb-phy-uboot.h> +#include <spi.h> +#include <usb.h> +#include <video_bridge.h> +#include <asm/gpio.h> +#include <asm/arch/cpu.h> +#include <asm/arch/dwmmc.h> +#include <asm/arch/mmc.h> +#include <asm/arch/pinmux.h> +#include <asm/arch/power.h> +#include <asm/arch/sromc.h> +#include <power/pmic.h> +#include <power/max77686_pmic.h> +#include <power/regulator.h> +#include <power/s5m8767.h> +#include <tmu.h> + +DECLARE_GLOBAL_DATA_PTR ; + +static void board_enable_audio_codec (void ) +{ +int node, ret; +struct gpio_desc en_gpio; + + node =fdtdec_next_compatible (gd->fdt_blob,0 , +COMPAT_SAMSUNG_EXYNOS5_SOUND ); +if (node <=0 ) +return ; + + ret =gpio_request_by_name_nodev (gd->fdt_blob, node, +"codec-enable-gpio" ,0 , &en_gpio, +GPIOD_IS_OUT |GPIOD_IS_OUT_ACTIVE ); +if (ret == -FDT_ERR_NOTFOUND ) +return ; + +/* Turn on the GPIO which connects to the codec's "enable" line. */ +gpio_set_pull (gpio_get_number (&en_gpio),S5P_GPIO_PULL_NONE ); + +#ifdef CONFIG_SOUND_MAX98095 +/* Enable MAX98095 Codec */ +gpio_request (EXYNOS5_GPIO_X17 ,"max98095_enable" ); +gpio_direction_output (EXYNOS5_GPIO_X17 ,1 ); +gpio_set_pull (EXYNOS5_GPIO_X17 ,S5P_GPIO_PULL_NONE ); +#endif +} + +int exynos_init (void ) +{ +board_enable_audio_codec (); + +return 0 ; +} + +static int exynos_set_regulator (const char *name,uint uv) +{ +struct udevice *dev; +int ret; + + ret =regulator_get_by_platname (name, &dev); +if (ret) { +debug ("%s: Cannot find regulator %s\n" , __func__, name); +return ret; + } + ret =regulator_set_value (dev, uv); +if (ret) { +debug ("%s: Cannot set regulator %s\n" , __func__, name); +return ret; + } + +return 0 ; +} + +int exynos_power_init (void ) +{ +struct udevice *dev; +int ret; + + ret =pmic_get ("max77686" , &dev); +if (!ret) { +/* TODO(sjg at chromium.org): Move into the clock/pmic API */ + ret =pmic_clrsetbits (dev,MAX77686_REG_PMIC_32KHZ ,0 , +MAX77686_32KHCP_EN );
board/samsung/common/exynos5-dt.c line 107
Quoted 10 lines
board/samsung/common/exynos5-dt.c new file +10
-0+if (ret) +return ret; + ret =pmic_clrsetbits (dev,MAX77686_REG_PMIC_BBAT ,0 , +MAX77686_BBCHOSTEN |MAX77686_BBCVS_3_5V ); +if (ret) +return ret; + }else { + ret =pmic_get ("s5m8767-pmic" , &dev); +/* TODO(sjg at chromium.org): Use driver model to access clock */ +#ifdef CONFIG_PMIC_S5M8767
What about: "if (dev)" or "if (!ret && dev)", instead of #ifdef?
board/samsung/common/exynos5-dt.c line 110
Quoted 3 lines
board/samsung/common/exynos5-dt.c new file +3
-0+if (!ret) +s5m8767_enable_32khz_cp (dev); +#endif
... snip ...
Best regards
Signature · 4 lines
Przemyslaw Marczak Samsung R&D Institute Poland Samsung Electronics p.marczak at samsung.com
PATCH v2 9/19 exynos: Add common board code for exynos5 boards that use device tree
Hi Prazemyslaw,
Quoted 144 lines · Przemyslaw Marczak
Hello Simon,
Quoted 140 lines · Simon Glass
Some boards use device tree for almost all board-specific configuration. They therefore do not need their own separate board code, but can all use the same version. Add a common version of the board code. It uses the PMIC, regulator and video bridge uclasses. This will support smdk5250, smdk5420, snow, spring, pit and pi.
Signed-off-by Simon Glass <[email protected]>---
Changes in v2: None
board/samsung/common/Makefile | 1 + board/samsung/common/exynos5-dt.c | 362 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 363 insertions(+)create mode 100644
board/samsung/common/exynos5-dt.cboard/samsung/common/Makefile +1
-0@@ -11,4 +11,5 @@ obj-$(CONFIG_MISC_COMMON) += misc.o ifndef CONFIG_SPL_BUILD obj-$(CONFIG_BOARD_COMMON) += board.o +obj-$(CONFIG_EXYNOS5_DT) += exynos5-dt.o endifboard/samsung/common/exynos5-dt.c new file +47
-0@@ -0,0 +1,362 @@ +/* +* Copyright (C) 2012 Samsung Electronics +* +* SPDX-License-Identifier: GPL-2.0+ +*/ + +#include <common.h> +#include <dm.h> +#include <dwc3-uboot.h> +#include <fdtdec.h> +#include <asm/io.h> +#include <errno.h> +#include <i2c.h> +#include <mmc.h> +#include <netdev.h> +#include <samsung-usb-phy-uboot.h> +#include <spi.h> +#include <usb.h> +#include <video_bridge.h> +#include <asm/gpio.h> +#include <asm/arch/cpu.h> +#include <asm/arch/dwmmc.h> +#include <asm/arch/mmc.h> +#include <asm/arch/pinmux.h> +#include <asm/arch/power.h> +#include <asm/arch/sromc.h> +#include <power/pmic.h> +#include <power/max77686_pmic.h> +#include <power/regulator.h> +#include <power/s5m8767.h> +#include <tmu.h> + +DECLARE_GLOBAL_DATA_PTR ; + +static void board_enable_audio_codec (void ) +{ +int node, ret; +struct gpio_desc en_gpio; + + node =fdtdec_next_compatible (gd->fdt_blob,0 , +COMPAT_SAMSUNG_EXYNOS5_SOUND ); +if (node <=0 ) +return ; + + ret = gpio_request_by_name_nodev(gd->fdt_blob, node, + "codec-enable-gpio", 0, &en_gpio, + GPIOD_IS_OUT |
GPIOD_IS_OUT_ACTIVE);board/samsung/common/exynos5-dt.c new file +4
-0+if (ret == -FDT_ERR_NOTFOUND ) +return ; + +/* Turn on the GPIO which connects to the codec's "enable" line. */
board/samsung/common/exynos5-dt.c new file +52
-0+gpio_set_pull (gpio_get_number (&en_gpio),S5P_GPIO_PULL_NONE ); + +#ifdef CONFIG_SOUND_MAX98095 +/* Enable MAX98095 Codec */ +gpio_request (EXYNOS5_GPIO_X17 ,"max98095_enable" ); +gpio_direction_output (EXYNOS5_GPIO_X17 ,1 ); +gpio_set_pull (EXYNOS5_GPIO_X17 ,S5P_GPIO_PULL_NONE ); +#endif +} + +int exynos_init (void ) +{ +board_enable_audio_codec (); + +return 0 ; +} + +static int exynos_set_regulator (const char *name,uint uv) +{ +struct udevice *dev; +int ret; + + ret =regulator_get_by_platname (name, &dev); +if (ret) { +debug ("%s: Cannot find regulator %s\n" , __func__, name); +return ret; + } + ret =regulator_set_value (dev, uv); +if (ret) { +debug ("%s: Cannot set regulator %s\n" , __func__, name); +return ret; + } + +return 0 ; +} + +int exynos_power_init (void ) +{ +struct udevice *dev; +int ret; + + ret =pmic_get ("max77686" , &dev); +if (!ret) { +/* TODO(sjg at chromium.org): Move into the clock/pmic API */ + ret =pmic_clrsetbits (dev,MAX77686_REG_PMIC_32KHZ ,0 , +MAX77686_32KHCP_EN ); +if (ret) +return ret; + ret =pmic_clrsetbits (dev,MAX77686_REG_PMIC_BBAT ,0 , +MAX77686_BBCHOSTEN |MAX77686_BBCVS_3_5V ); +if (ret) +return ret;
Quoted 13 lines
Quoted 5 lines
board/samsung/common/exynos5-dt.c new file +3
-0+ }else { + ret =pmic_get ("s5m8767-pmic" , &dev); +/* TODO(sjg at chromium.org): Use driver model to access clock */
+#ifdefCONFIG_PMIC_S5M8767What about: "if (dev)" or "if (!ret && dev)", instead of #ifdef?
Quoted 3 lines
board/samsung/common/exynos5-dt.c new file +3
-0+if (!ret) +s5m8767_enable_32khz_cp (dev); +#endif
Unfortunately s5m8767_enable_32khz_cp() doesn't go through driver model so we can't call it if it is not compiled in. The correct fix would be to add a clock device as a child of the PMIC and set that up with the clock uclass. Later.
Applied to u-boot-dm.
Regards,
Simon
PATCH v2 10/19 exynos: Enable new features for exynos5 boards
In reply to Simon GlassEnable PMICs, regulators and the like so that new drivers will be made available.
---
Changes in v2: None
board/samsung/smdk5420/smdk5420.c | 2 +- configs/arndale_defconfig | 2 ++ configs/odroid-xu3_defconfig | 6 ++++++ configs/peach-pi_defconfig | 17 +++++++++++++++++ configs/peach-pit_defconfig | 17 +++++++++++++++++ configs/smdk5250_defconfig | 10 ++++++++++ configs/smdk5420_defconfig | 6 ++++++ configs/snow_defconfig | 23 +++++++++++++++++++++++ include/configs/arndale.h | 4 ++++ include/configs/exynos5-common.h | 10 ++-------- include/configs/exynos5-dt-common.h | 5 ----- include/configs/smdk5250.h | 3 --- include/configs/snow.h | 3 --- 13 files changed, 88 insertions(+), 20 deletions(-)
board/samsung/smdk5420/smdk5420.c +1 -1
@@ -50,9 +50,9 @@ static int has_edp_bridge(void)void exynos_lcd_power_on (void ) { +#ifdef CONFIG_POWER_TPS65090 int ret; -#ifdef CONFIG_POWER_TPS65090 ret =tps65090_init ();if (ret <0 ) {printf ("%s: tps65090_init() failed\n" , __func__);
configs/arndale_defconfig +2 -0
@@ -13,3 +13,5 @@ CONFIG_SOUND_MAX98095=y CONFIG_SOUND_WM8994=y CONFIG_USB=y CONFIG_DM_USB=y +CONFIG_DM_I2C=y +CONFIG_DM_I2C_COMPAT=y
configs/odroid-xu3_defconfig +6 -0
@@ -7,3 +7,9 @@ CONFIG_DEFAULT_DEVICE_TREE="exynos5422-odroidxu3" # CONFIG_CMD_SETEXPR is not set CONFIG_USB=y CONFIG_DM_USB=y +CONFIG_CMD_NET=y +CONFIG_DM_I2C=y +CONFIG_DM_I2C_COMPAT=y +CONFIG_DM_PMIC=y +CONFIG_DM_REGULATOR=y +CONFIG_VIDEO_BRIDGE=y
configs/peach-pi_defconfig +17 -0
@@ -14,3 +14,20 @@ CONFIG_USB=y CONFIG_DM_USB=y CONFIG_I2C_MUX=y CONFIG_I2C_CROS_EC_TUNNEL=y +CONFIG_SOUND=y +CONFIG_I2S=y +CONFIG_I2S_SAMSUNG=y +CONFIG_SOUND_MAX98095=y +CONFIG_SOUND_WM8994=y +CONFIG_DM_I2C=y +CONFIG_DM_PMIC=y +CONFIG_DM_REGULATOR=y +CONFIG_PMIC_TPS65090=y +CONFIG_REGULATOR_TPS65090=y +CONFIG_DM_I2C_COMPAT=y +CONFIG_I2C_ARB_GPIO_CHALLENGE=y +CONFIG_CMD_PMIC=y +CONFIG_CMD_REGULATOR=y +CONFIG_ERRNO_STR=y +CONFIG_VIDEO_BRIDGE=y +CONFIG_VIDEO_BRIDGE_PARADE_PS862X=y
configs/peach-pit_defconfig +17 -0
@@ -14,3 +14,20 @@ CONFIG_USB=y CONFIG_DM_USB=y CONFIG_I2C_MUX=y CONFIG_I2C_CROS_EC_TUNNEL=y +CONFIG_SOUND=y +CONFIG_I2S=y +CONFIG_I2S_SAMSUNG=y +CONFIG_SOUND_MAX98095=y +CONFIG_SOUND_WM8994=y +CONFIG_DM_I2C=y +CONFIG_DM_PMIC=y +CONFIG_DM_REGULATOR=y +CONFIG_PMIC_TPS65090=y +CONFIG_REGULATOR_TPS65090=y +CONFIG_DM_I2C_COMPAT=y +CONFIG_I2C_ARB_GPIO_CHALLENGE=y +CONFIG_CMD_PMIC=y +CONFIG_CMD_REGULATOR=y +CONFIG_ERRNO_STR=y +CONFIG_VIDEO_BRIDGE=y +CONFIG_VIDEO_BRIDGE_PARADE_PS862X=y
configs/smdk5250_defconfig +10 -0
@@ -14,3 +14,13 @@ CONFIG_SOUND_MAX98095=y CONFIG_SOUND_WM8994=y CONFIG_USB=y CONFIG_DM_USB=y +CONFIG_DM_I2C=y +CONFIG_DM_I2C_COMPAT=y +CONFIG_DM_PMIC=y +CONFIG_DM_REGULATOR=y +CONFIG_CMD_PMIC=y +CONFIG_CMD_REGULATOR=y +CONFIG_ERRNO_STR=y +CONFIG_DM_PMIC_MAX77686=y +CONFIG_DM_REGULATOR_MAX77686=y +CONFIG_VIDEO_BRIDGE=y
configs/smdk5420_defconfig +6 -0
@@ -8,3 +8,9 @@ CONFIG_SPL=y CONFIG_SPI_FLASH=y CONFIG_USB=y CONFIG_DM_USB=y +CONFIG_CMD_NET=y +CONFIG_DM_I2C=y +CONFIG_DM_I2C_COMPAT=y +CONFIG_DM_PMIC=y +CONFIG_DM_REGULATOR=y +CONFIG_VIDEO_BRIDGE=y
configs/snow_defconfig +23 -0
@@ -18,3 +18,26 @@ CONFIG_SOUND_MAX98095=y CONFIG_SOUND_WM8994=y CONFIG_USB=y CONFIG_DM_USB=y +CONFIG_DM_I2C=y +CONFIG_DM_PMIC=y +CONFIG_DM_REGULATOR=y +CONFIG_PMIC_TPS65090=y +CONFIG_REGULATOR_TPS65090=y +CONFIG_DM_I2C_COMPAT=y +CONFIG_I2C_ARB_GPIO_CHALLENGE=y +CONFIG_I2C_MUX=y +CONFIG_CMD_PMIC=y +CONFIG_CMD_REGULATOR=y +CONFIG_ERRNO_STR=y +CONFIG_DM_PMIC_MAX77686=y +CONFIG_DM_REGULATOR_MAX77686=y +CONFIG_DEBUG_UART=y +CONFIG_DEBUG_UART_S5P=y +CONFIG_DEBUG_UART_CLOCK=100000000 +CONFIG_DEBUG_UART_BASE=0x12c30000 +CONFIG_I2C_CROS_EC_LDO=y +CONFIG_PMIC_S5M8767=y +CONFIG_REGULATOR_S5M8767=y +CONFIG_VIDEO_BRIDGE=y +CONFIG_VIDEO_BRIDGE_PARADE_PS862X=y +CONFIG_VIDEO_BRIDGE_NXP_PTN3460=y
include/configs/arndale.h +4 -0
@@ -60,4 +60,8 @@/* The PERIPHBASE in the CBAR register is wrong on the Arndale, so override it */ #define CONFIG_ARM_GIC_BASE_ADDRESS 0x10480000 +/* Power */ +#define CONFIG_POWER +#define CONFIG_POWER_I2C +#endif /* __CONFIG_H */
include/configs/exynos5-common.h +2 -8
@@ -67,6 +67,8 @@#define CONFIG_SPL_LIBCOMMON_SUPPORT #define CONFIG_SPL_GPIO_SUPPORT +#define CONFIG_SPL_SERIAL_SUPPORT +#define CONFIG_SPL_LIBGENERIC_SUPPORT /* specific .lds file */ #define CONFIG_SPL_LDSCRIPT "board/samsung/common/exynos-uboot-spl.lds"
@@ -126,10 +128,6 @@#define SPI_FLASH_UBOOT_POS (CONFIG_SEC_FW_SIZE + CONFIG_BL1_SIZE)/* I2C */ - -/* TODO([email protected]): Move these two options to Kconfig */ -#define CONFIG_DM_I2C -#define CONFIG_DM_I2C_COMPAT #define CONFIG_CMD_I2C #define CONFIG_SYS_I2C_S3C24X0 #define CONFIG_SYS_I2C_S3C24X0_SPEED 100000/* 100 Kbps */
@@ -149,10 +147,6 @@#define CONFIG_OF_SPI #endif -/* Power */ -#define CONFIG_POWER -#define CONFIG_POWER_I2C -#ifdef CONFIG_ENV_IS_IN_SPI_FLASH #define CONFIG_ENV_SPI_MODE SPI_MODE_0#define CONFIG_ENV_SECT_SIZE CONFIG_ENV_SIZE
include/configs/exynos5-dt-common.h +0 -5
@@ -18,11 +18,6 @@#include "exynos5-common.h" -/* PMIC */ -#define CONFIG_POWER -#define CONFIG_POWER_I2C -#define CONFIG_POWER_TPS65090 -/* Enable keyboard */ #define CONFIG_KEYBOARD
include/configs/smdk5250.h +0 -3
@@ -17,9 +17,6 @@#include <configs/exynos5250-common.h> -/* PMIC */ -#define CONFIG_POWER_MAX77686 -#define CONFIG_BOARD_COMMON #define CONFIG_USB_XHCI
include/configs/snow.h +0 -3
@@ -18,9 +18,6 @@#include <configs/exynos5250-common.h> #include <configs/exynos5-dt-common.h> - -#define CONFIG_POWER_TPS65090_I2C -#define CONFIG_BOARD_COMMON #define CONFIG_USB_XHCI
Signature · 1 line
2.5.0.rc2.392.g76e840b
PATCH v2 10/19 exynos: Enable new features for exynos5 boards
Quoted 8 lines · Simon Glass
Enable PMICs, regulators and the like so that new drivers will be made available.
Signed-off-by Simon Glass <[email protected]>---
Changes in v2: None
Quoted 14 lines
board/samsung/smdk5420/smdk5420.c | 2 +- configs/arndale_defconfig | 2 ++ configs/odroid-xu3_defconfig | 6 ++++++ configs/peach-pi_defconfig | 17 +++++++++++++++++ configs/peach-pit_defconfig | 17 +++++++++++++++++ configs/smdk5250_defconfig | 10 ++++++++++ configs/smdk5420_defconfig | 6 ++++++ configs/snow_defconfig | 23 +++++++++++++++++++++++ include/configs/arndale.h | 4 ++++ include/configs/exynos5-common.h | 10 ++-------- include/configs/exynos5-dt-common.h | 5 ----- include/configs/smdk5250.h | 3 --- include/configs/snow.h | 3 --- 13 files changed, 88 insertions(+), 20 deletions(-)
Applied to u-boot-dm.
PATCH v2 11/19 exynos: config: Move common options to the common headers and tidy up
In reply to Simon GlassMany options are duplicated on the exynos5 boards. Move these to the common files. Also some options are not used so can be removed.
Tidy this up to make the files easier to maintain.
---
Changes in v2:
- Rebase to dm/master
include/configs/arndale.h | 14 ++------------ include/configs/exynos5-common.h | 3 --- include/configs/exynos5-dt-common.h | 16 +++++++++++++++- include/configs/exynos5250-common.h | 16 ++++++---------- include/configs/exynos5420-common.h | 9 +++------ include/configs/odroid_xu3.h | 2 ++ include/configs/peach-pi.h | 12 +----------- include/configs/peach-pit.h | 20 +------------------- include/configs/smdk5250.h | 15 ++++----------- include/configs/smdk5420.h | 10 ++++------ include/configs/snow.h | 12 +----------- 11 files changed, 39 insertions(+), 90 deletions(-)
include/configs/arndale.h +2 -12
@@ -13,6 +13,7 @@ "fdtfile=exynos5250-arndale.dtb\0"#include "exynos5250-common.h" +#include <configs/exynos5-common.h> /* SD/MMC configuration */ #define CONFIG_SUPPORT_EMMC_BOOT
@@ -20,15 +21,6 @@/* allow to overwrite serial and ethaddr */ #define CONFIG_ENV_OVERWRITE -/* USB */ -#define CONFIG_USB_EHCI -#define CONFIG_USB_EHCI_EXYNOS - -#define CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS 3 -#define CONFIG_USB_HOST_ETHER -#define CONFIG_USB_ETHER_ASIX -#define CONFIG_USB_ETHER_ASIX88179 -/* MMC SPL */ #define CONFIG_EXYNOS_SPL
@@ -36,9 +28,6 @@#define CONFIG_SYS_PROMPT "ARNDALE # "#define CONFIG_DEFAULT_CONSOLE "console=ttySAC2,115200n8\0" -#define CONFIG_NR_DRAM_BANKS 8 -#define SDRAM_BANK_SIZE (256UL << 20UL)/* 256 MB */ -#define CONFIG_IDENT_STRING " for ARNDALE"#define CONFIG_ENV_IS_IN_MMC
@@ -49,6 +38,7 @@#define CONFIG_SYS_INIT_SP_ADDR CONFIG_IRAM_STACK/* PMIC */ +#define CONFIG_POWER #define CONFIG_PMIC #define CONFIG_POWER_I2C
include/configs/exynos5-common.h +0 -3
@@ -143,8 +143,6 @@#define CONFIG_SPI_FLASH_GIGADEVICE #define CONFIG_SF_DEFAULT_MODE SPI_MODE_0#define CONFIG_SF_DEFAULT_SPEED 50000000 -#define EXYNOS5_SPI_NUM_CONTROLLERS 5 -#define CONFIG_OF_SPI #endif #ifdef CONFIG_ENV_IS_IN_SPI_FLASH
@@ -194,7 +192,6 @@#define CONFIG_FIT #define CONFIG_FIT_BEST_MATCH -#define BOOT_TARGET_DEVICES (func) \ func(MMC, mmc, 1) \ func(MMC, mmc, 0) \
include/configs/exynos5-dt-common.h +15 -1
@@ -16,7 +16,21 @@"stdout=serial,lcd\0" \ "stderr=serial,lcd\0" -#include "exynos5-common.h" +#define CONFIG_ENV_IS_IN_SPI_FLASH +#define CONFIG_ENV_SPI_BASE 0x12D30000 +#define FLASH_SIZE (4 << 20) +#define CONFIG_ENV_OFFSET (FLASH_SIZE - CONFIG_ENV_SECT_SIZE) +#define CONFIG_SPI_BOOTING + +#define CONFIG_BOARD_COMMON + +/* Display */ +#define CONFIG_LCD +#ifdef CONFIG_LCD +#define CONFIG_EXYNOS_FB +#define CONFIG_EXYNOS_DP +#define LCD_BPP LCD_COLOR16 +#endif /* Enable keyboard */ #define CONFIG_KEYBOARD
include/configs/exynos5250-common.h +6 -10
@@ -10,7 +10,6 @@#ifndef __CONFIG_5250_H#define __CONFIG_5250_H -#include <configs/exynos5-common.h> #define CONFIG_EXYNOS5250 #define CONFIG_SYS_SDRAM_BASE 0x40000000
@@ -28,16 +27,13 @@#define CONFIG_SYS_INIT_SP_ADDR CONFIG_IRAM_STACK -/* I2C */ -#define CONFIG_MAX_I2C_NUM 8 +/* USB */ +#define CONFIG_USB_EHCI +#define CONFIG_USB_EHCI_EXYNOS -/* Display */ -#define CONFIG_LCD -#ifdef CONFIG_LCD -#define CONFIG_EXYNOS_FB -#define CONFIG_EXYNOS_DP -#define LCD_BPP LCD_COLOR16 -#endif +#define CONFIG_USB_HOST_ETHER +#define CONFIG_USB_ETHER_ASIX +#define CONFIG_USB_ETHER_ASIX88179 /* DRAM Memory Banks */ #define CONFIG_NR_DRAM_BANKS 8
include/configs/exynos5420-common.h +3 -6
@@ -13,8 +13,6 @@/* A variant of Exynos5420 (Exynos5 Family) */ #define CONFIG_EXYNOS5800 -#include <configs/exynos5-common.h> -#define MACH_TYPE_SMDK5420 8002#define CONFIG_MACH_TYPE MACH_TYPE_SMDK5420
@@ -32,10 +30,6 @@#define CONFIG_DEVICE_TREE_LIST "exynos5800-peach-pi" \ "exynos5420-peach-pit exynos5420-smdk5420" -#define CONFIG_MAX_I2C_NUM 11 - -#define CONFIG_BOARD_REV_GPIO_COUNT 2 -#define CONFIG_PHY_IRAM_BASE 0x02020000/* Address for relocating helper code (Last 4 KB of IRAM) */
@@ -52,4 +46,7 @@*/ #define CONFIG_CORE_COUNT 0x8 +#define CONFIG_USB_XHCI +#define CONFIG_USB_XHCI_EXYNOS +#endif /* __CONFIG_EXYNOS5420_H */
include/configs/odroid_xu3.h +2 -0
@@ -9,7 +9,9 @@#define __CONFIG_ODROID_XU3_H#include "exynos5420-common.h" +#include <configs/exynos5-common.h> +#undef CONFIG_ENV_IS_IN_SPI_FLASH#define CONFIG_SYS_PROMPT "ODROID-XU3 # "#define CONFIG_IDENT_STRING " for ODROID-XU3"
include/configs/peach-pi.h +1 -11
@@ -9,12 +9,6 @@#ifndef __CONFIG_PEACH_PI_H#define __CONFIG_PEACH_PI_H -#define CONFIG_ENV_IS_IN_SPI_FLASH -#define CONFIG_ENV_SPI_BASE 0x12D30000 -#define FLASH_SIZE (0x4 << 20) -#define CONFIG_ENV_OFFSET (FLASH_SIZE - CONFIG_BL2_SIZE) -#define CONFIG_SPI_BOOTING -#define MEM_LAYOUT_ENV_SETTINGS \ "bootm_size=0x10000000\0" \ "kernel_addr_r=0x22000000\0" \
@@ -25,8 +19,7 @@#include <configs/exynos5420-common.h> #include <configs/exynos5-dt-common.h> - -#define CONFIG_BOARD_COMMON +#include <configs/exynos5-common.h> #define CONFIG_SYS_SDRAM_BASE 0x20000000#define CONFIG_SYS_TEXT_BASE 0x23E00000
@@ -51,9 +44,6 @@#define CONFIG_POWER_TPS65090_EC -#define CONFIG_USB_XHCI -#define CONFIG_USB_XHCI_EXYNOS -/* DRAM Memory Banks */ #define CONFIG_NR_DRAM_BANKS 7#define SDRAM_BANK_SIZE (512UL << 20UL)/* 512 MB */
include/configs/peach-pit.h +1 -19
@@ -9,12 +9,6 @@#ifndef __CONFIG_PEACH_PIT_H#define __CONFIG_PEACH_PIT_H -#define CONFIG_ENV_IS_IN_SPI_FLASH -#define CONFIG_ENV_SPI_BASE 0x12D30000 -#define FLASH_SIZE (0x4 << 20) -#define CONFIG_ENV_OFFSET (FLASH_SIZE - CONFIG_BL2_SIZE) -#define CONFIG_SPI_BOOTING -#define MEM_LAYOUT_ENV_SETTINGS \ "bootm_size=0x10000000\0" \ "kernel_addr_r=0x22000000\0" \
@@ -25,8 +19,7 @@#include <configs/exynos5420-common.h> #include <configs/exynos5-dt-common.h> - -#define CONFIG_BOARD_COMMON +#include <configs/exynos5-common.h> #define CONFIG_SYS_SDRAM_BASE 0x20000000#define CONFIG_SYS_TEXT_BASE 0x23E00000
@@ -41,19 +34,8 @@#define CONFIG_VIDEO_PARADE -/* Display */ -#define CONFIG_LCD -#ifdef CONFIG_LCD -#define CONFIG_EXYNOS_FB -#define CONFIG_EXYNOS_DP -#define LCD_BPP LCD_COLOR16 -#endif -#define CONFIG_POWER_TPS65090_EC -#define CONFIG_USB_XHCI -#define CONFIG_USB_XHCI_EXYNOS -/* DRAM Memory Banks */ #define CONFIG_NR_DRAM_BANKS 4#define SDRAM_BANK_SIZE (512UL << 20UL)/* 512 MB */
include/configs/smdk5250.h +4 -11
@@ -9,23 +9,16 @@#ifndef __CONFIG_SMDK_H#define __CONFIG_SMDK_H -#define CONFIG_ENV_IS_IN_SPI_FLASH -#define CONFIG_ENV_SPI_BASE 0x12D30000 -#define FLASH_SIZE (0x4 << 20) -#define CONFIG_ENV_OFFSET (FLASH_SIZE - CONFIG_BL2_SIZE) -#define CONFIG_SPI_BOOTING -#include <configs/exynos5250-common.h> +#include <configs/exynos5-dt-common.h> +#include <configs/exynos5-common.h> -#define CONFIG_BOARD_COMMON +#undef CONFIG_KEYBOARD -#define CONFIG_USB_XHCI -#define CONFIG_USB_XHCI_EXYNOS +#define CONFIG_BOARD_COMMON #define CONFIG_SYS_PROMPT "SMDK5250 # "#define CONFIG_IDENT_STRING " for SMDK5250" - -/* Miscellaneous configurable options */ #define CONFIG_DEFAULT_CONSOLE "console=ttySAC1,115200n8\0"#endif /* __CONFIG_SMDK_H */
include/configs/smdk5420.h +4 -6
@@ -9,13 +9,11 @@#ifndef __CONFIG_SMDK5420_H#define __CONFIG_SMDK5420_H -#define CONFIG_ENV_IS_IN_SPI_FLASH -#define CONFIG_ENV_SPI_BASE 0x12D30000 -#define FLASH_SIZE (0x4 << 20) -#define CONFIG_ENV_OFFSET (FLASH_SIZE - CONFIG_BL2_SIZE) -#define CONFIG_SPI_BOOTING -#include <configs/exynos5420-common.h> +#include <configs/exynos5-dt-common.h> +#include <configs/exynos5-common.h> + +#undef CONFIG_KEYBOARD#define CONFIG_BOARD_COMMON
include/configs/snow.h +1 -11
@@ -9,22 +9,12 @@#ifndef __CONFIG_SNOW_H#define __CONFIG_SNOW_H -#define CONFIG_ENV_IS_IN_SPI_FLASH -#define CONFIG_ENV_SPI_BASE 0x12D30000 -#define FLASH_SIZE (0x4 << 20) -#define CONFIG_ENV_OFFSET (FLASH_SIZE - CONFIG_BL2_SIZE) -#define CONFIG_SPI_BOOTING -#include <configs/exynos5250-common.h> #include <configs/exynos5-dt-common.h> +#include <configs/exynos5-common.h> #define CONFIG_BOARD_COMMON -#define CONFIG_USB_XHCI -#define CONFIG_USB_EHCI -#define CONFIG_USB_XHCI_EXYNOS -#define CONFIG_USB_EHCI_EXYNOS -#define CONFIG_SYS_PROMPT "snow # "#define CONFIG_IDENT_STRING " for snow"#define CONFIG_DEFAULT_CONSOLE "console=ttySAC1,115200n8\0"
Signature · 1 line
2.5.0.rc2.392.g76e840b
PATCH v2 11/19 exynos: config: Move common options to the common headers and tidy up
Quoted 12 lines · Simon Glass
Many options are duplicated on the exynos5 boards. Move these to the common files. Also some options are not used so can be removed.
Tidy this up to make the files easier to maintain.
Signed-off-by Simon Glass <[email protected]>---
Changes in v2:
- Rebase to dm/master
Quoted 12 lines
include/configs/arndale.h | 14 ++------------ include/configs/exynos5-common.h | 3 --- include/configs/exynos5-dt-common.h | 16 +++++++++++++++- include/configs/exynos5250-common.h | 16 ++++++---------- include/configs/exynos5420-common.h | 9 +++------ include/configs/odroid_xu3.h | 2 ++ include/configs/peach-pi.h | 12 +----------- include/configs/peach-pit.h | 20 +------------------- include/configs/smdk5250.h | 15 ++++----------- include/configs/smdk5420.h | 10 ++++------ include/configs/snow.h | 12 +----------- 11 files changed, 39 insertions(+), 90 deletions(-)
Applied to u-boot-dm.
PATCH v2 12/19 exynos: Drop old exynos5420-specific board code
In reply to Simon GlassNow that exynos5420 boards can use the generic exynos5 code, switch over to it and remove the old code.
---
Changes in v2: None
board/samsung/smdk5420/Makefile | 4 - board/samsung/smdk5420/smdk5420.c | 143 ------------------------------------ include/configs/exynos5420-common.h | 2 + 3 files changed, 2 insertions(+), 147 deletions(-) delete mode 100644 board/samsung/smdk5420/smdk5420.c
board/samsung/smdk5420/Makefile +0 -4
@@ -5,7 +5,3 @@ # obj-y += smdk5420_spl.o - -ifndef CONFIG_SPL_BUILD -obj-y += smdk5420.o -endif
board/samsung/smdk5420/smdk5420.c deleted +0 -143
143 lines not on this page · raw message
include/configs/exynos5420-common.h +2 -0
@@ -13,6 +13,8 @@/* A variant of Exynos5420 (Exynos5 Family) */ #define CONFIG_EXYNOS5800 +#define CONFIG_EXYNOS5_DT +#define MACH_TYPE_SMDK5420 8002#define CONFIG_MACH_TYPE MACH_TYPE_SMDK5420
Signature · 1 line
2.5.0.rc2.392.g76e840b
PATCH v2 12/19 exynos: Drop old exynos5420-specific board code
Quoted 7 lines · Simon Glass
Now that exynos5420 boards can use the generic exynos5 code, switch over to it and remove the old code.
Signed-off-by Simon Glass <[email protected]>---
Quoted 7 lines
Changes in v2: None
board/samsung/smdk5420/Makefile | 4 - board/samsung/smdk5420/smdk5420.c | 143 ------------------------------------ include/configs/exynos5420-common.h | 2 + 3 files changed, 2 insertions(+), 147 deletions(-) delete mode 100644 board/samsung/smdk5420/smdk5420.c
Applied to u-boot-dm.
PATCH v2 13/19 exynos: Drop old exynos5250-specific board code
In reply to Simon GlassNow that most exynos5250 boards can use the generic exynos5 code, switch over to it and remove the old code.
---
Changes in v2: None
board/samsung/smdk5250/Makefile | 4 - board/samsung/smdk5250/exynos5-dt.c | 306 ------------------------------------ include/configs/exynos5-dt-common.h | 2 + 3 files changed, 2 insertions(+), 310 deletions(-) delete mode 100644 board/samsung/smdk5250/exynos5-dt.c
board/samsung/smdk5250/Makefile +0 -4
@@ -5,7 +5,3 @@ # obj-y += smdk5250_spl.o - -ifndef CONFIG_SPL_BUILD -obj-y += exynos5-dt.o -endif
board/samsung/smdk5250/exynos5-dt.c deleted +0 -306
306 lines not on this page · raw message
include/configs/exynos5-dt-common.h +2 -0
@@ -16,6 +16,8 @@"stdout=serial,lcd\0" \ "stderr=serial,lcd\0" +#define CONFIG_EXYNOS5_DT +#define CONFIG_ENV_IS_IN_SPI_FLASH #define CONFIG_ENV_SPI_BASE 0x12D30000#define FLASH_SIZE (4 << 20)
Signature · 1 line
2.5.0.rc2.392.g76e840b
PATCH v2 13/19 exynos: Drop old exynos5250-specific board code
Quoted 6 lines · Simon Glass
Now that most exynos5250 boards can use the generic exynos5 code, switch over to it and remove the old code.
Signed-off-by Simon Glass <[email protected]>---
Quoted 7 lines
Changes in v2: None
board/samsung/smdk5250/Makefile | 4 - board/samsung/smdk5250/exynos5-dt.c | 306 ------------------------------------ include/configs/exynos5-dt-common.h | 2 + 3 files changed, 2 insertions(+), 310 deletions(-) delete mode 100644 board/samsung/smdk5250/exynos5-dt.c
Applied to u-boot-dm.
PATCH v2 14/19 power: Remove old TPS65090 drivers
In reply to Simon GlassRemove the old drivers (both the normal one and the cros_ec one) now that we have new drivers that use driver model.
---
Changes in v2: None
drivers/power/pmic/Makefile | 2 - drivers/power/pmic/pmic_tps65090.c | 310 ---------------------------------- drivers/power/pmic/pmic_tps65090_ec.c | 218 ------------------------ include/configs/peach-pit.h | 2 - include/fdtdec.h | 1 - include/power/tps65090_pmic.h | 73 -------- lib/fdtdec.c | 1 - 7 files changed, 607 deletions(-) delete mode 100644 drivers/power/pmic/pmic_tps65090.c delete mode 100644 drivers/power/pmic/pmic_tps65090_ec.c delete mode 100644 include/power/tps65090_pmic.h
drivers/power/pmic/Makefile +0 -2
@@ -18,8 +18,6 @@ obj-$(CONFIG_POWER_MAX8997) += pmic_max8997.o obj-$(CONFIG_POWER_MUIC_MAX8997) += muic_max8997.o obj-$(CONFIG_POWER_MAX77686) += pmic_max77686.o obj-$(CONFIG_POWER_PFUZE100) += pmic_pfuze100.o -obj-$(CONFIG_POWER_TPS65090_I2C) += pmic_tps65090.o -obj-$(CONFIG_POWER_TPS65090_EC) += pmic_tps65090_ec.o obj-$(CONFIG_POWER_TPS65217) += pmic_tps65217.o obj-$(CONFIG_POWER_TPS65218) += pmic_tps62362.o obj-$(CONFIG_POWER_TPS65218) += pmic_tps65218.o
drivers/power/pmic/pmic_tps65090.c deleted +0 -310
310 lines not on this page · raw message
drivers/power/pmic/pmic_tps65090_ec.c deleted +0 -218
218 lines not on this page · raw message
include/configs/peach-pit.h +0 -2
@@ -34,8 +34,6 @@#define CONFIG_VIDEO_PARADE -#define CONFIG_POWER_TPS65090_EC -/* DRAM Memory Banks */ #define CONFIG_NR_DRAM_BANKS 4#define SDRAM_BANK_SIZE (512UL << 20UL)/* 512 MB */
include/fdtdec.h +0 -1
@@ -170,7 +170,6 @@ enum fdt_compat_id {COMPAT_INFINEON_SLB9645_TPM ,/* Infineon SLB9645 TPM */ COMPAT_SAMSUNG_EXYNOS5_I2C ,/* Exynos5 High Speed I2C Controller */ COMPAT_SANDBOX_LCD_SDL ,/* Sandbox LCD emulation with SDL */ -COMPAT_TI_TPS65090 ,/* Texas Instrument TPS65090 */ COMPAT_NXP_PTN3460 ,/* NXP PTN3460 DP/LVDS bridge */ COMPAT_SAMSUNG_EXYNOS_SYSMMU ,/* Exynos sysmmu */ COMPAT_PARADE_PS8625, /* Parade PS8622 EDP->LVDS bridge */
include/power/tps65090_pmic.h deleted +0 -73
73 lines not on this page · raw message
lib/fdtdec.c +0 -1
@@ -62,7 +62,6 @@ static const char * const compat_names[COMPAT_COUNT] = {COMPAT (INFINEON_SLB9645_TPM ,"infineon,slb9645tt" ),COMPAT (SAMSUNG_EXYNOS5_I2C ,"samsung,exynos5-hsi2c" ),COMPAT (SANDBOX_LCD_SDL ,"sandbox,lcd-sdl" ), -COMPAT (TI_TPS65090 ,"ti,tps65090" ),COMPAT (COMPAT_NXP_PTN3460 ,"nxp,ptn3460" ),COMPAT (SAMSUNG_EXYNOS_SYSMMU ,"samsung,sysmmu-v3.3" ), COMPAT(PARADE_PS8625, "parade,ps8625"),
Signature · 1 line
2.5.0.rc2.392.g76e840b
PATCH v2 14/19 power: Remove old TPS65090 drivers
Quoted 8 lines · Simon Glass
Remove the old drivers (both the normal one and the
cros_econe) now that we have new drivers that use driver model.Signed-off-by Simon Glass <[email protected]>---
Changes in v2: None
Quoted 11 lines
drivers/power/pmic/Makefile | 2 - drivers/power/pmic/pmic_tps65090.c | 310 ---------------------------------- drivers/power/pmic/pmic_tps65090_ec.c | 218 ------------------------ include/configs/peach-pit.h | 2 - include/fdtdec.h | 1 - include/power/tps65090_pmic.h | 73 -------- lib/fdtdec.c | 1 - 7 files changed, 607 deletions(-) delete mode 100644 drivers/power/pmic/pmic_tps65090.c delete mode 100644 drivers/power/pmic/pmic_tps65090_ec.c delete mode 100644 include/power/tps65090_pmic.h
Applied to u-boot-dm.
PATCH v2 15/19 cros_ec: Remove the old tunnel code
In reply to Simon GlassThis is not needed with driver mode. Remove it.
---
Changes in v2: None
drivers/misc/cros_ec.c | 268 +------------------------------------------------ include/cros_ec.h | 14 --- 2 files changed, 1 insertion(+), 281 deletions(-)
drivers/misc/cros_ec.c +1 -267
@@ -1055,87 +1055,6 @@ int cros_ec_decode_ec_flash(const void *blob, int node,return 0 ; } -int cros_ec_i2c_xfer_old (struct cros_ec_dev *dev,uchar chip,uint addr, -int alen,uchar *buffer,int len,int is_read) -{ -union { -struct ec_params_i2c_passthru p; -uint8_t outbuf[EC_PROTO2_MAX_PARAM_SIZE ]; - } params; -union { -struct ec_response_i2c_passthru r; -uint8_t inbuf[EC_PROTO2_MAX_PARAM_SIZE ]; - } response; -struct ec_params_i2c_passthru *p = ¶ms.p; -struct ec_response_i2c_passthru *r = &response.r; -struct ec_params_i2c_passthru_msg *msg = p->msg; -uint8_t *pdata; -int read_len, write_len; -int size; -int rv; - - p->port =0 ; - -if (alen !=1 ) { -printf ("Unsupported address length %d\n" , alen); -return -1 ; - } -if (is_read) { - read_len = len; - write_len = alen; - p->num_msgs =2 ; - }else { - read_len =0 ; - write_len = alen + len; - p->num_msgs =1 ; - } - - size =sizeof (*p) + p->num_msgs *sizeof (*msg); -if (size + write_len >sizeof (params)) { -puts ("Params too large for buffer\n" ); -return -1 ; - } -if (sizeof (*r) + read_len >sizeof (response)) { -puts ("Read length too big for buffer\n" ); -return -1 ; - } - -/* Create a message to write the register address and optional data */ - pdata = (uint8_t *)p + size; - msg->addr_flags = chip; - msg->len = write_len; - pdata[0 ] = addr; -if (!is_read) -memcpy (pdata +1 , buffer, len); - msg++; - -if (read_len) { - msg->addr_flags = chip |EC_I2C_FLAG_READ ; - msg->len = read_len; - } - - rv =ec_command (dev,EC_CMD_I2C_PASSTHRU ,0 , p, size + write_len, - r,sizeof (*r) + read_len); -if (rv <0 ) -return rv; - -/* Parse response */ -if (r->i2c_status &EC_I2C_STATUS_ERROR ) { -printf ("Transfer failed with status=0x%x\n" , r->i2c_status); -return -1 ; - } - -if (rv <sizeof (*r) + read_len) { -puts ("Truncated read response\n" ); -return -1 ; - } - -if (read_len) -memcpy (buffer, r->data, read_len); - -return 0 ; -} -int cros_ec_i2c_tunnel (struct udevice *dev,struct i2c_msg *in,int nmsgs) {struct cros_ec_dev *cdev =dev_get_uclass_priv (dev);
@@ -1266,187 +1185,6 @@ static int do_read_write(struct cros_ec_dev *dev, int is_write, int argc,return 0 ; } -/** -* get_alen() - Small parser helper function to get address length -* -* Returns the address length. -*/ -static uint get_alen (char *arg) -{ -int j; -int alen; - - alen =1 ; -for (j =0 ; j <8 ; j++) { -if (arg[j] =='.' ) { - alen = arg[j+1 ] -'0' ; -break ; - }else if (arg[j] =='\0' ) { -break ; - } - } -return alen; -} - -#define DISP_LINE_LEN 16 - -/* -* TODO([email protected]): This code copied almost verbatim from cmd_i2c.c -* so we can remove it later. -*/ -static int cros_ec_i2c_md (struct cros_ec_dev *dev,int flag,int argc, -char *const argv[]) -{ -u_char chip; -uint addr, alen, length =0x10 ; -int j, nbytes, linebytes; - -if (argc <2 ) -return CMD_RET_USAGE ; - -if (1 || (flag &CMD_FLAG_REPEAT ) ==0 ) { -/* -* New command specified. -*/ - -/* -* I2C chip address -*/ - chip =simple_strtoul (argv[0 ],NULL ,16 ); - -/* -* I2C data address within the chip. This can be 1 or -* 2 bytes long. Some day it might be 3 bytes long :-). -*/ - addr =simple_strtoul (argv[1 ],NULL ,16 ); - alen =get_alen (argv[1 ]); -if (alen >3 ) -return CMD_RET_USAGE ; - -/* -* If another parameter, it is the length to display. -* Length is the number of objects, not number of bytes. -*/ -if (argc >2 ) - length =simple_strtoul (argv[2 ],NULL ,16 ); - } - -/* -* Print the lines. -* -* We buffer all read data, so we can make sure data is read only -* once. -*/ - nbytes = length; -do { -unsigned char linebuf[DISP_LINE_LEN ]; -unsigned char *cp; - - linebytes = (nbytes >DISP_LINE_LEN ) ?DISP_LINE_LEN : nbytes; - -if (cros_ec_i2c_xfer_old (dev, chip, addr, alen, linebuf, - linebytes,1 )) -puts ("Error reading the chip.\n" ); -else { -printf ("%04x:" , addr); - cp = linebuf; -for (j =0 ; j < linebytes; j++) { -printf (" %02x" , *cp++); - addr++; - } -puts (" " ); - cp = linebuf; -for (j =0 ; j < linebytes; j++) { -if ((*cp <0x20 ) || (*cp >0x7e )) -puts ("." ); -else -printf ("%c" , *cp); - cp++; - } -putc ('\n' ); - } - nbytes -= linebytes; - }while (nbytes >0 ); - -return 0 ; -} - -static int cros_ec_i2c_mw (struct cros_ec_dev *dev,int flag,int argc, -char *const argv[]) -{ -uchar chip; -ulong addr; -uint alen; -uchar byte; -int count; - -if ((argc <3 ) || (argc >4 )) -return CMD_RET_USAGE ; - -/* -* Chip is always specified. -*/ - chip =simple_strtoul (argv[0 ],NULL ,16 ); - -/* -* Address is always specified. -*/ - addr =simple_strtoul (argv[1 ],NULL ,16 ); - alen =get_alen (argv[1 ]); -if (alen >3 ) -return CMD_RET_USAGE ; - -/* -* Value to write is always specified. -*/ - byte =simple_strtoul (argv[2 ],NULL ,16 ); - -/* -* Optional count -*/ -if (argc ==4 ) - count =simple_strtoul (argv[3 ],NULL ,16 ); -else - count =1 ; - -while (count-- >0 ) { -if (cros_ec_i2c_xfer_old (dev, chip, addr++, alen, &byte,1 ,0 )) -puts ("Error writing the chip.\n" ); -/* -* Wait for the write to complete. The write can take -* up to 10mSec (we allow a little more time). -*/ -/* -* No write delay with FRAM devices. -*/ -#if !defined(CONFIG_SYS_I2C_FRAM ) -udelay (11000 ); -#endif - } - -return 0 ; -} - -/* Temporary code until we have driver model and can use the i2c command */ -static int cros_ec_i2c_passthrough (struct cros_ec_dev *dev,int flag, -int argc,char *const argv[]) -{ -const char *cmd; - -if (argc <1 ) -return CMD_RET_USAGE ; - cmd = *argv++; - argc--; -if (0 ==strcmp ("md" , cmd)) -cros_ec_i2c_md (dev, flag, argc, argv); -else if (0 ==strcmp ("mw" , cmd)) -cros_ec_i2c_mw (dev, flag, argc, argv); -else -return CMD_RET_USAGE ; - -return 0 ; -} -static int do_cros_ec (cmd_tbl_t *cmdtp,int flag,int argc,char *const argv[]) {struct cros_ec_dev *dev;
@@ -1696,8 +1434,6 @@ static int do_cros_ec(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])debug ("%s: Could not access LDO%d\n" , __func__, index);return ret; } - }else if (0 ==strcmp ("i2c" , cmd)) { - ret =cros_ec_i2c_passthrough (dev, flag, argc -2 , argv +2 ); }else {return CMD_RET_USAGE ; }
@@ -1734,9 +1470,7 @@ U_BOOT_CMD("crosec vbnvcontext [hexstring] Read [write] VbNvContext from EC\n" "crosec ldo <idx> [<state>] Switch/Read LDO state\n" "crosec test run tests on cros_ec\n" -"crosec version Read CROS-EC version\n" -"crosec i2c md chip address[.0, .1, .2] [# of objects] - read from I2C passthru\n" -"crosec i2c mw chip address[.0, .1, .2] value [count] - write to I2C passthru (fill)" +"crosec version Read CROS-EC version" );#endif
include/cros_ec.h +0 -14
@@ -400,18 +400,4 @@ struct i2c_msg;*/ int cros_ec_i2c_tunnel (struct udevice *dev,struct i2c_msg *msg,int nmsgs); -/* -* Tunnel an I2C transfer to the EC -* -* @param dev CROS-EC device -* @param chip Chip address (7-bit I2C address) -* @param addr Register address to read/write -* @param alen Length of register address in bytes -* @param buffer Buffer containing data to read/write -* @param len Length of buffer -* @param is_read 1 if this is a read, 0 if this is a write -*/ -int cros_ec_i2c_xfer_old (struct cros_ec_dev *dev,uchar chip,uint addr, -int alen,uchar *buffer,int len,int is_read); -#endif
Signature · 1 line
2.5.0.rc2.392.g76e840b
PATCH v2 15/19 cros_ec: Remove the old tunnel code
Quoted 10 lines · Simon Glass
This is not needed with driver mode. Remove it.
Signed-off-by Simon Glass <[email protected]>---
Changes in v2: None
drivers/misc/cros_ec.c | 268 +------------------------------------------------ include/cros_ec.h | 14 --- 2 files changed, 1 insertion(+), 281 deletions(-)
Applied to u-boot-dm.
PATCH v2 16/19 video: Remove the old parade driver
In reply to Simon GlassWe have a new one which uses driver model and device tree configuration. Remove the old one.
---
Changes in v2: None
drivers/video/Makefile | 1 - drivers/video/parade.c | 231 -------------------------------------------- include/configs/peach-pi.h | 2 - include/configs/peach-pit.h | 2 - include/fdtdec.h | 1 - include/parade.h | 18 ---- lib/fdtdec.c | 1 - 7 files changed, 256 deletions(-) delete mode 100644 drivers/video/parade.c delete mode 100644 include/parade.h
drivers/video/Makefile +0 -1
@@ -51,7 +51,6 @@ obj-$(CONFIG_VIDEO_VESA) += vesa_fb.o obj-$(CONFIG_FORMIKE) += formike.o obj-$(CONFIG_LG4573) += lg4573.o obj-$(CONFIG_AM335X_LCD) += am335x-fb.o -obj-$(CONFIG_VIDEO_PARADE) += parade.o obj-${CONFIG_VIDEO_TEGRA124} += tegra124/
drivers/video/parade.c deleted +0 -231
231 lines not on this page · raw message
include/configs/peach-pi.h +0 -2
@@ -32,8 +32,6 @@#define CONFIG_SYS_PROMPT "Peach-Pi # "#define CONFIG_IDENT_STRING " for Peach-Pi" -#define CONFIG_VIDEO_PARADE -/* Display */ #define CONFIG_LCD #ifdef CONFIG_LCD
include/configs/peach-pit.h +0 -2
@@ -32,8 +32,6 @@#define CONFIG_SYS_PROMPT "Peach-Pit # "#define CONFIG_IDENT_STRING " for Peach-Pit" -#define CONFIG_VIDEO_PARADE -/* DRAM Memory Banks */ #define CONFIG_NR_DRAM_BANKS 4#define SDRAM_BANK_SIZE (512UL << 20UL)/* 512 MB */
include/fdtdec.h +0 -1
@@ -172,7 +172,6 @@ enum fdt_compat_id {COMPAT_SANDBOX_LCD_SDL ,/* Sandbox LCD emulation with SDL */ COMPAT_NXP_PTN3460 ,/* NXP PTN3460 DP/LVDS bridge */ COMPAT_SAMSUNG_EXYNOS_SYSMMU ,/* Exynos sysmmu */ -COMPAT_PARADE_PS8625 ,/* Parade PS8622 EDP->LVDS bridge */ COMPAT_INTEL_MICROCODE ,/* Intel microcode update */ COMPAT_MEMORY_SPD ,/* Memory SPD information */ COMPAT_INTEL_PANTHERPOINT_AHCI, /* Intel Pantherpoint AHCI */
include/parade.h deleted +0 -18
@@ -1,18 +0,0 @@ -/* -* (C) Copyright 2012 Samsung Electronics -* Donghwa Lee <[email protected]> -* -* SPDX-License-Identifier: GPL-2.0+ -*/ - -#ifndef __PARADE_H__ -#define __PARADE_H__ - -/* Initialize the Parade dP<->LVDS bridge if present */ -#ifdef CONFIG_VIDEO_PARADE -int parade_init (const void *blob); -#else -static inline int parade_init (const void *blob) {return -1 ; } -#endif - -#endif /* __PARADE_H__ */
lib/fdtdec.c +0 -1
@@ -64,7 +64,6 @@ static const char * const compat_names[COMPAT_COUNT] = {COMPAT (SANDBOX_LCD_SDL ,"sandbox,lcd-sdl" ),COMPAT (COMPAT_NXP_PTN3460 ,"nxp,ptn3460" ),COMPAT (SAMSUNG_EXYNOS_SYSMMU ,"samsung,sysmmu-v3.3" ), -COMPAT (PARADE_PS8625 ,"parade,ps8625" ),COMPAT (INTEL_MICROCODE ,"intel,microcode" ),COMPAT (MEMORY_SPD ,"memory-spd" ), COMPAT(INTEL_PANTHERPOINT_AHCI, "intel,pantherpoint-ahci"),
Signature · 1 line
2.5.0.rc2.392.g76e840b
PATCH v2 16/19 video: Remove the old parade driver
Quoted 4 lines · On Mon, 3 Aug 2015 08:19:34 -0600 Simon Glass <[email protected]> wrote:
We have a new one which uses driver model and device tree configuration. Remove the old one.
Signed-off-by Simon Glass <[email protected]>
PATCH v2 16/19 video: Remove the old parade driver
In reply to Simon GlassQuoted 8 lines · Simon Glass
We have a new one which uses driver model and device tree configuration. Remove the old one.
Signed-off-by Simon Glass <[email protected]>---
Changes in v2: None
Quoted 10 lines
drivers/video/Makefile | 1 - drivers/video/parade.c | 231 -------------------------------------------- include/configs/peach-pi.h | 2 - include/configs/peach-pit.h | 2 - include/fdtdec.h | 1 - include/parade.h | 18 ---- lib/fdtdec.c | 1 - 7 files changed, 256 deletions(-) delete mode 100644 drivers/video/parade.c delete mode 100644 include/parade.h
Applied to u-boot-dm.
PATCH v2 17/19 dts: Drop unused compatible ID for the NXP video bridge
In reply to Simon GlassThis has moved to driver model so we can drop the fdtdec support.
---
Changes in v2: None
include/fdtdec.h | 1 - lib/fdtdec.c | 1 - 2 files changed, 2 deletions(-)
include/fdtdec.h +0 -1
@@ -170,7 +170,6 @@ enum fdt_compat_id {COMPAT_INFINEON_SLB9645_TPM ,/* Infineon SLB9645 TPM */ COMPAT_SAMSUNG_EXYNOS5_I2C ,/* Exynos5 High Speed I2C Controller */ COMPAT_SANDBOX_LCD_SDL ,/* Sandbox LCD emulation with SDL */ -COMPAT_NXP_PTN3460 ,/* NXP PTN3460 DP/LVDS bridge */ COMPAT_SAMSUNG_EXYNOS_SYSMMU ,/* Exynos sysmmu */ COMPAT_INTEL_MICROCODE ,/* Intel microcode update */ COMPAT_MEMORY_SPD, /* Memory SPD information */
lib/fdtdec.c +0 -1
@@ -62,7 +62,6 @@ static const char * const compat_names[COMPAT_COUNT] = {COMPAT (INFINEON_SLB9645_TPM ,"infineon,slb9645tt" ),COMPAT (SAMSUNG_EXYNOS5_I2C ,"samsung,exynos5-hsi2c" ),COMPAT (SANDBOX_LCD_SDL ,"sandbox,lcd-sdl" ), -COMPAT (COMPAT_NXP_PTN3460 ,"nxp,ptn3460" ),COMPAT (SAMSUNG_EXYNOS_SYSMMU ,"samsung,sysmmu-v3.3" ),COMPAT (INTEL_MICROCODE ,"intel,microcode" ), COMPAT(MEMORY_SPD, "memory-spd"),
Signature · 1 line
2.5.0.rc2.392.g76e840b
PATCH v2 17/19 dts: Drop unused compatible ID for the NXP video bridge
Quoted 10 lines · Simon Glass
This has moved to driver model so we can drop the fdtdec support.
Signed-off-by Simon Glass <[email protected]>---
Changes in v2: None
include/fdtdec.h | 1 - lib/fdtdec.c | 1 - 2 files changed, 2 deletions(-)
Applied to u-boot-dm.
PATCH v2 18/19 exynos: video: Remove non-device-tree code
In reply to Simon GlassWe always use device tree on exynos, so remove the unused code.
---
Changes in v2: None
arch/arm/include/asm/arch-exynos/dp_info.h | 2 -- drivers/video/exynos_dp.c | 22 ---------------------- 2 files changed, 24 deletions(-)
arch/arm/include/asm/arch-exynos/dp_info.h +0 -2
@@ -197,6 +197,4 @@ unsigned int exynos_init_dp(void) }#endif -void exynos_set_dp_platform_data (struct exynos_dp_platform_data *pd); -#endif /* _DP_INFO_H */
drivers/video/exynos_dp.c +0 -22
@@ -22,8 +22,6 @@DECLARE_GLOBAL_DATA_PTR ; -static struct exynos_dp_platform_data *dp_pd; -void __exynos_set_dp_phy (unsigned int onoff) { }
@@ -851,7 +849,6 @@ static unsigned int exynos_dp_config_video(struct edp_device_info *edp_info)return ret; } -#ifdef CONFIG_OF_CONTROL int exynos_dp_parse_dt (const void *blob,struct edp_device_info *edp_info) { unsigned int node = fdtdec_next_compatible(blob, 0,
@@ -905,7 +902,6 @@ int exynos_dp_parse_dt(const void *blob, struct edp_device_info *edp_info) "samsung,color-depth", 0);return 0 ; } -#endif unsigned int exynos_init_dp (void ) {
@@ -918,16 +914,8 @@ unsigned int exynos_init_dp(void)return -EFAULT ; } -#ifdef CONFIG_OF_CONTROL if (exynos_dp_parse_dt (gd->fdt_blob, edp_info))debug ("unable to parse DP DT node\n" ); -#else - edp_info = dp_pd->edp_dev_info; -if (edp_info ==NULL ) { -debug ("failed to get edp_info data.\n" ); -return -EFAULT ; - } -#endif exynos_dp_set_base_addr ();
@@ -971,13 +959,3 @@ unsigned int exynos_init_dp(void)return ret; } - -void exynos_set_dp_platform_data (struct exynos_dp_platform_data *pd) -{ -if (pd ==NULL ) { -debug ("pd is NULL\n" ); -return ; - } - - dp_pd = pd; -}
Signature · 1 line
2.5.0.rc2.392.g76e840b
PATCH v2 18/19 exynos: video: Remove non-device-tree code
Hi Simon,
Quoted 3 lines · On Mon, 3 Aug 2015 08:19:36 -0600 Simon Glass <[email protected]> wrote:
We always use device tree on exynos, so remove the unused code.
Signed-off-by Simon Glass <[email protected]>
PATCH v2 18/19 exynos: video: Remove non-device-tree code
In reply to Simon GlassQuoted 10 lines · Simon Glass
We always use device tree on exynos, so remove the unused code.
Signed-off-by Simon Glass <[email protected]>---
Changes in v2: None
arch/arm/include/asm/arch-exynos/dp_info.h | 2 -- drivers/video/exynos_dp.c | 22 ---------------------- 2 files changed, 24 deletions(-)
Applied to u-boot-dm.
PATCH v2 19/19 exynos: Add support for spring
In reply to Simon GlassSpring is the first ARM-based HP Chromebook 11. It is similar to snow and it uses the same Samsung Exynos5250 chip. But has some unusual features. Mainline support for it has lagged snow (both in kernel and U-Boot). Now that the exynos5 code is common we can support spring just by adding a device tree and a few lines of configuration.
---
Changes in v2:
- Rebase to dm/master
arch/arm/cpu/armv7/exynos/Kconfig | 6 + arch/arm/dts/Makefile | 1 + arch/arm/dts/exynos5250-spring.dts | 588 +++++++++++++++++++++++++++++++++++++ board/samsung/smdk5250/Kconfig | 13 + board/samsung/smdk5250/MAINTAINERS | 6 + configs/spring_defconfig | 42 +++ include/configs/spring.h | 20 ++ 7 files changed, 676 insertions(+) create mode 100644 arch/arm/dts/exynos5250-spring.dts create mode 100644 configs/spring_defconfig create mode 100644 include/configs/spring.h
arch/arm/cpu/armv7/exynos/Kconfig +6 -0
@@ -51,6 +51,12 @@ config TARGET_SNOW select OF_CONTROL select SPL_DISABLE_OF_CONTROL +config TARGET_SPRING + bool "Spring board" + select SUPPORT_SPL + select OF_CONTROL + select SPL_DISABLE_OF_CONTROL + config TARGET_SMDK5420 bool "SMDK5420 board" select SUPPORT_SPL
arch/arm/dts/Makefile +1 -0
@@ -9,6 +9,7 @@ dtb-$(CONFIG_EXYNOS4) += exynos4210-origen.dtb \ dtb-$(CONFIG_EXYNOS5) += exynos5250-arndale.dtb \ exynos5250-snow.dtb \ + exynos5250-spring.dtb \ exynos5250-smdk5250.dtb \ exynos5420-smdk5420.dtb \ exynos5420-peach-pit.dtb \
arch/arm/dts/exynos5250-spring.dts new file +588 -0
588 lines not on this page · raw message
board/samsung/smdk5250/Kconfig +13 -0
@@ -23,3 +23,16 @@ config SYS_CONFIG_NAME default "snow" endif + +if TARGET_SPRING + +config SYS_BOARD + default "smdk5250" + +config SYS_VENDOR + default "samsung" + +config SYS_CONFIG_NAME + default "spring" + +endif
board/samsung/smdk5250/MAINTAINERS +6 -0
@@ -10,3 +10,9 @@ M: Akshay Saraswat <[email protected]> S: Maintained F: include/configs/snow.h F: configs/snow_defconfig + +SPRING BOARD +M: Simon Glass <[email protected]> +S: Maintained +F: include/configs/spring.h +F: configs/spring_defconfig
configs/spring_defconfig new file +42 -0
42 lines not on this page · raw message
include/configs/spring.h new file +20 -0
@@ -0,0 +1,20 @@ +/* +* Copyright (c) 2015 Google, Inc +* +* SPDX-License-Identifier: GPL-2.0+ +*/ + +#ifndef __CONFIG_SPRING_H +#define __CONFIG_SPRING_H + +#include <configs/exynos5250-common.h> +#include <configs/exynos5-dt-common.h> +#include <configs/exynos5-common.h> + +#define CONFIG_BOARD_COMMON + +#define CONFIG_SYS_PROMPT "spring # " +#define CONFIG_IDENT_STRING " for spring" +#define CONFIG_DEFAULT_CONSOLE "console=ttySAC1,115200n8\0" + +#endif /* __CONFIG_SPRING_H */
Signature · 1 line
2.5.0.rc2.392.g76e840b
PATCH v2 19/19 exynos: Add support for spring
Quoted 12 lines · Simon Glass
Spring is the first ARM-based HP Chromebook 11. It is similar to snow and it uses the same Samsung Exynos5250 chip. But has some unusual features. Mainline support for it has lagged snow (both in kernel and U-Boot). Now that the exynos5 code is common we can support spring just by adding a device tree and a few lines of configuration.
Signed-off-by Simon Glass <[email protected]>---
Changes in v2:
- Rebase to dm/master
Quoted 11 lines
arch/arm/cpu/armv7/exynos/Kconfig | 6 + arch/arm/dts/Makefile | 1 + arch/arm/dts/exynos5250-spring.dts | 588 +++++++++++++++++++++++++++++++++++++ board/samsung/smdk5250/Kconfig | 13 + board/samsung/smdk5250/MAINTAINERS | 6 + configs/spring_defconfig | 42 +++ include/configs/spring.h | 20 ++ 7 files changed, 676 insertions(+) create mode 100644 arch/arm/dts/exynos5250-spring.dts create mode 100644 configs/spring_defconfig create mode 100644 include/configs/spring.h
Applied to u-boot-dm.
v2 cover dm: exynos: Driver model improvements leading to spring support
In reply to Simon GlassHello Simon,
Quoted 126 lines · Simon Glass
This series adds a number of fixes and improvements to driver model as well as two new uclasses (video bridges and I2c muxes).
The series is aimed at adding support for spring (HP 11 Chromebook). Since it is very similar to other ARM Chromebooks, some effory is made to use common code rather than duplicating functionality. In fact spring uses the same code as several other boards, just with a different device tree and a few configuration changes.
Audio works correctly on pit, pi, spring and snow with this series. A bug in the I2C driver broken this recently.
The exynos implementation still has a few rough areas - e.g. some hard-coded GPIOs and the old-style SPL. Also it does not yet support CPU frequency scaling and power management.
Spring has some oddities and they are hard to handle with U-Boot's old way of doing drivers. With driver model these can be implemented cleanly and this sort of problem was the original motivation for my interest in driver model.
This series is available at u-boot-dm in branch spring-working. It is based on the previous set of driver model changes in branch clk-working.
Changes in v2:
- Add a README explaining the algorithm and update the commit message
- Add a comment about DVS in the driver
- Add a new patch to hold off the need for driver model pinctrl
- Add new patch to correct LDO and BUCK naming
- Rebase to dm/master
- Update commit message and header file to better explain select()/deselect()Simon Glass (19):
exynos: dts: Correct LDO and BUCK naming
video: Work around lack of pinctrl
dm: i2c: Add support for multiplexed I2C buses
i2c: Add a mux for GPIO-based I2C bus arbitration
dm:cros_ec: Convert the I2C tunnel code to use driver model
cros_ec: Support the LDO access method used by spring
dm: pmic: max77686: Support all BUCK regulators
exynos: dts: Drop the old TPS65090 I2C node
exynos: Add common board code for exynos5 boards that use device tree
exynos: Enable new features for exynos5 boards
exynos: config: Move common options to the common headers and tidy up
exynos: Drop old exynos5420-specific board code
exynos: Drop old exynos5250-specific board code
power: Remove old TPS65090 drivers
cros_ec: Remove the old tunnel code
video: Remove the old parade driver
dts: Drop unused compatible ID for the NXP video bridge
exynos: video: Remove non-device-tree code
exynos: Add support for springarch/arm/cpu/armv7/exynos/Kconfig | 6 + arch/arm/dts/Makefile | 1 + arch/arm/dts/exynos4412-odroid.dts | 56 +-- arch/arm/dts/exynos4412-trats2.dts | 70 ++-- arch/arm/dts/exynos5250-snow.dts | 16 - arch/arm/dts/exynos5250-spring.dts | 588 +++++++++++++++++++++++++++++ arch/arm/include/asm/arch-exynos/dp_info.h | 2 - board/samsung/common/Makefile | 1 + board/samsung/common/exynos5-dt.c | 362 ++++++++++++++++++ board/samsung/smdk5250/Kconfig | 13 + board/samsung/smdk5250/MAINTAINERS | 6 + board/samsung/smdk5250/Makefile | 4 - board/samsung/smdk5250/exynos5-dt.c | 306 --------------- board/samsung/smdk5420/Makefile | 4 - board/samsung/smdk5420/smdk5420.c | 143 ------- configs/arndale_defconfig | 2 + configs/odroid-xu3_defconfig | 6 + configs/peach-pi_defconfig | 19 + configs/peach-pit_defconfig | 19 + configs/smdk5250_defconfig | 10 + configs/smdk5420_defconfig | 6 + configs/snow_defconfig | 23 ++ configs/spring_defconfig | 42 +++ doc/README.i2c | 60 +++ doc/device-tree-bindings/i2c/i2c-mux.txt | 60 +++ drivers/i2c/Kconfig | 26 ++ drivers/i2c/Makefile | 4 + drivers/i2c/cros_ec_ldo.c | 77 ++++ drivers/i2c/cros_ec_tunnel.c | 41 ++ drivers/i2c/muxes/Kconfig | 17 + drivers/i2c/muxes/Makefile | 7 + drivers/i2c/muxes/i2c-arb-gpio-challenge.c | 147 ++++++++ drivers/i2c/muxes/i2c-mux-uclass.c | 198 ++++++++++ drivers/misc/cros_ec.c | 288 +++----------- drivers/power/pmic/Makefile | 2 - drivers/power/pmic/pmic_tps65090.c | 310 --------------- drivers/power/pmic/pmic_tps65090_ec.c | 218 ----------- drivers/power/regulator/max77686.c | 18 +- drivers/video/Makefile | 1 - drivers/video/bridge/video-bridge-uclass.c | 28 +- drivers/video/exynos_dp.c | 22 -- drivers/video/parade.c | 231 ------------ include/configs/arndale.h | 18 +- include/configs/exynos5-common.h | 13 +- include/configs/exynos5-dt-common.h | 21 +- include/configs/exynos5250-common.h | 16 +- include/configs/exynos5420-common.h | 9 +- include/configs/odroid_xu3.h | 2 + include/configs/peach-pi.h | 14 +- include/configs/peach-pit.h | 24 +- include/configs/smdk5250.h | 16 +- include/configs/smdk5420.h | 10 +- include/configs/snow.h | 15 +- include/configs/spring.h | 20 + include/cros_ec.h | 16 +- include/dm/uclass-id.h | 1 + include/fdtdec.h | 3 - include/i2c.h | 39 ++ include/parade.h | 18 - include/power/tps65090_pmic.h | 73 ---- lib/fdtdec.c | 3 - 61 files changed, 1997 insertions(+), 1794 deletions(-)create mode 100644
arch/arm/dts/exynos5250-spring.dtscreate mode 100644board/samsung/common/exynos5-dt.cdelete mode 100644board/samsung/smdk5250/exynos5-dt.cdelete mode 100644board/samsung/smdk5420/smdk5420.ccreate mode 100644 configs/spring_defconfig create mode 100644 doc/README.i2c
create mode 100644doc/device-tree-bindings/i2c/i2c-mux.txtcreate mode 100644drivers/i2c/cros_ec_ldo.ccreate mode 100644drivers/i2c/cros_ec_tunnel.ccreate mode 100644drivers/i2c/muxes/Kconfigcreate mode 100644drivers/i2c/muxes/Makefile
Quoted 9 lines
create mode 100644
drivers/i2c/muxes/i2c-arb-gpio-challenge.ccreate mode 100644drivers/i2c/muxes/i2c-mux-uclass.cdelete mode 100644drivers/power/pmic/pmic_tps65090.cdelete mode 100644drivers/power/pmic/pmic_tps65090_ec.cdelete mode 100644drivers/video/parade.c
create mode 100644include/configs/spring.h
delete mode 100644include/parade.h
delete mode 100644include/power/tps65090_pmic.h
That's great job! I've got only two cosmetics comments.
Tested-on: Odroid U3(E4412) and Odroid XU3(E5422).
Best regards,
Signature · 4 lines
Przemyslaw Marczak Samsung R&D Institute Poland Samsung Electronics p.marczak at samsung.com