05 Nov, 2015
1 commit
-
Commit: sandbox: add ADC driver
adds the driver without its main header file.
It causes build brake for sandbox_defonfig.This commit adds a missing header:
- include/sandbox-adc.hSigned-off-by: Przemyslaw Marczak
Cc: Minkyu Kang
Cc: Simon Glass
Signed-off-by: Minkyu Kang
02 Nov, 2015
21 commits
-
This patch will fix these checkpatch issues.
CHECK: Alignment should match open parenthesis
+ printf("Enter: %s %s\n", mode_name[mode][0],
+ mode_info[mode]);CHECK: Alignment should match open parenthesis
+ lcd_printf("\n\n\t%s %s\n", mode_name[mode][0],
+ mode_info[mode]);CHECK: Alignment should match open parenthesis
+ lcd_printf("\t%s %s - %s\n\n", selection[i],
+ mode_name[i][0],Signed-off-by: Minkyu Kang
-
This patch will fix these checkpatch issues.
+static const char *mmc_regulators[] = {
CHECK: Blank lines aren't necessary before a close brace '}'
+
+}Signed-off-by: Minkyu Kang
-
This patch will fix these checkpatch issues.
ERROR: spaces required around that '==' (ctx:VxV)
+#if FCLK_SPEED==0 /* Fout = 203MHz, Fin = 12MHz for Audio */ERROR: spaces required around that '==' (ctx:VxV)
+#elif FCLK_SPEED==1 /* Fout = 202.8MHz */ERROR: spaces required around that '==' (ctx:VxV)
+#if USB_CLOCK==0ERROR: spaces required around that '==' (ctx:VxV)
+#elif USB_CLOCK==1CHECK: spaces required around that ':' (ctx:VxV)
+ "bne 1b":"=r" (loops):"0" (loops));Signed-off-by: Minkyu Kang
-
This patch will fix these checkpatch issues.
WARNING: Avoid unnecessary line continuations
+ gd->bd->bi_dram[0].size = get_ram_size((long *)PHYS_SDRAM_1, \WARNING: Avoid unnecessary line continuations
+ gd->bd->bi_dram[1].size = get_ram_size((long *)PHYS_SDRAM_2, \WARNING: Avoid unnecessary line continuations
+ gd->bd->bi_dram[2].size = get_ram_size((long *)PHYS_SDRAM_3, \WARNING: Avoid unnecessary line continuations
+ gd->bd->bi_dram[3].size = get_ram_size((long *)PHYS_SDRAM_4, \Signed-off-by: Minkyu Kang
-
This patch will fix these checkpatch issues.
ERROR: Macros with complex values should be enclosed in parentheses
+#define DEFAULT_DQS_X4 (DEFAULT_DQS << 24) || (DEFAULT_DQS << 16) \
+ || (DEFAULT_DQS << 8) || (DEFAULT_DQS << 0)ERROR: space prohibited before that ',' (ctx:WxW)
+ writel(val , &drex0->concontrol);
^ERROR: space prohibited before that ',' (ctx:WxW)
+ writel(val , &drex1->concontrol);
^Signed-off-by: Minkyu Kang
-
The SD card detection depends on checking one pin state.
But the pin was configured after card was detected, which is wrong.This commit fixes this, by moving call to pinmux before use the pin.
Tested-on: Odroid U3 and Odroid X2.
Signed-off-by: Przemyslaw Marczak
Cc: Guillaume GARDET
Cc: Lukasz Majewski
Cc: Jaehoon Chung
Cc: Minkyu Kang
Cc: Simon Glass
Acked-by: Jaehoon Chung
Tested-by: Lukasz Majewski
Signed-off-by: Minkyu Kang -
There are 8 pins for SD card in Exynos, but the MUX was configured
only for 7, since the one was used for card detection.
This caused the pin's pull wrong configuration.This commit fixes this and the card detect can work properly,
after call this function.Tested-on: Odroid U3 and Odroid X2.
Signed-off-by: Przemyslaw Marczak
Cc: Guillaume GARDET
Cc: Lukasz Majewski
Cc: Jaehoon Chung
Cc: Minkyu Kang
Cc: Simon Glass
Acked-by: Jaehoon Chung
Tested-by: Lukasz Majewski
Signed-off-by: Minkyu Kang -
This commit adds unit tests for ADC uclass's methods using sandbox ADC.
Testing proper ADC binding:
- dm_test_adc_bind() - device binding
- dm_test_adc_wrong_channel_selection() - checking wrong channel selectionTesting ADC supply operations:
- dm_test_adc_supply():
- Vdd/Vss values validating
- Vdd regulator updated value validating
- Vdd regulator's auto enable state validatingTesting ADC operations results:
- dm_test_adc_single_channel_conversion() - single channel start/data
- dm_test_adc_single_channel_shot() - single channel shot
- dm_test_adc_multi_channel_conversion() - multi channel start/data
- dm_test_adc_multi_channel_shot() - multi channel single shotSigned-off-by: Przemyslaw Marczak
Cc: Simon Glass
Signed-off-by: Minkyu Kang -
This commit adds implementation of Sandbox ADC device emulation.
The device provides:
- single and multi-channel conversion
- 4 channels with predefined conversion output data
- 16-bit resolutionSigned-off-by: Przemyslaw Marczak
Cc: Simon Glass
Signed-off-by: Minkyu Kang -
This commit adds additional file with implementation of board
detection code for Odroid-XU3/XU4.The detection depends on compatible found in fdt:
- "samsung,exynos5" - uses Exynos5 generic code
- "samsung,odroidxu3" - try detect XU3 revisionThere are few revisions of Odroid XU3/XU4, each can be detected
by checking the value of channel 9 of built-in ADC:
Rev ADC Board
0.1 0 XU3 0.1
0.2 372 XU3 0.2 | XU3L - no DISPLAYPORT
0.3 1280 XU4 0.1The detection code depends on the ADC+10% value.
Implementation of functions:
- set_board_type() - read ADC and set type
- get_board_rev() - returns board revision: 1..3
- get_board_type() - returns board type stringAdditional functions with return values of bool:
- board_is_generic() - true if found compatible "samsung,exynos5"
but not "samsung,odroidxu3"
- board_is_odroidxu3() - true if found compatible "samsung,odroidxu3"
and one of XU3 revision.
- board_is_odroidxu4() - true if found compatible "samsung,odroidxu3"
and XU4 revision.After I2C controller init, the get_board_type() can check
if the XU3 board is a "Lite" variant, by probing chip
0x40 on I2C0 (INA231 - exists only on non-lite).
This is useful for setting fdt file name at misc_init_r().Enabled configs:
- CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
- CONFIG_ODROID_REV_AIN
- CONFIG_REVISION_TAG
- CONFIG_BOARD_TYPESSigned-off-by: Przemyslaw Marczak
Cc: Minkyu Kang
Cc: Simon Glass
Tested-by: Anand Moon
Signed-off-by: Minkyu Kang -
This ADC is required for Odroid's board revision detection.
The pre-reloc request is enabled, since board detection will
be done in one of early function call.Signed-off-by: Przemyslaw Marczak
Cc: Minkyu Kang
Cc: Simon Glass
Signed-off-by: Minkyu Kang -
This commit adds common ADC node, which is disabled as default.
Signed-off-by: Przemyslaw Marczak
Cc: Minkyu Kang
Cc: Simon Glass
Reviewed-by: Simon Glass
Signed-off-by: Minkyu Kang -
Signed-off-by: Przemyslaw Marczak
Cc: Minkyu Kang
Cc: Simon Glass
Tested-by: Anand Moon
Signed-off-by: Minkyu Kang -
This commit adds driver for Exynos54xx ADC subsystem.
The driver is implemented using driver model, amd provides
ADC uclass's methods for ADC single channel operations:
- adc_start_channel()
- adc_channel_data()
- adc_stop()The basic parameters of ADC conversion, are:
- sample rate: 600KSPS
- output the data as average of 8 time conversionADC features:
- sample rate: 600KSPS
- resolution: 12-bit
- channels: 10 (analog multiplexer)Signed-off-by: Przemyslaw Marczak
Cc: Minkyu Kang
Cc: Simon Glass
Signed-off-by: Minkyu Kang -
This commit adds:
- new uclass id: UCLASS_ADC
- new uclass driver: drivers/adc/adc-uclass.cThe new uclass's API allows for ADC operation on:
* single-channel with channel selection by a number
* multti-channel with channel selection by bit maskADC uclass's functions:
* single-channel:
- adc_start_channel() - start channel conversion
- adc_channel_data() - get conversion data
- adc_channel_single_shot() - start/get conversion data
* multi-channel:
- adc_start_channels() - start selected channels conversion
- adc_channels_data() - get conversion data
- adc_channels_single_shot() - start/get conversion data for channels
selected by bit mask
* general:
- adc_stop() - stop the conversion
- adc_vdd_value() - positive reference Voltage value with polarity [uV]
- adc_vss_value() - negative reference Voltage value with polarity [uV]
- adc_data_mask() - conversion data bit maskThe device tree can provide below constraints/properties:
- vdd-polarity-negative: if true: Vdd = vdd-microvolts * (-1)
- vss-polarity-negative: if true: Vss = vss-microvolts * (-1)
- vdd-supply: phandle to Vdd regulator's node
- vss-supply: phandle to Vss regulator's node
And optional, checked only if the above corresponding, doesn't exist:
- vdd-microvolts: positive reference Voltage [uV]
- vss-microvolts: negative reference Voltage [uV]Signed-off-by: Przemyslaw Marczak
Cc: Simon Glass
Signed-off-by: Minkyu Kang -
Some devices are supplied by configurable regulator's output.
But there was no function for getting it. This commit adds
function, that allows for getting the supply device by it's phandle.The returned regulator device can be used with regulator uclass's API.
Signed-off-by: Przemyslaw Marczak
Cc: Simon Glass
Signed-off-by: Minkyu Kang -
This driver allows I/O operations on the Samsung S2MPS11 PMIC,
which provides lots of LDO/BUCK outputs.To enable it, update defconfig with:
- CONFIG_PMIC_S2MPS11
and additional, if were not defined:
- CONFIG_CMD_PMIC
- CONFIG_ERRNO_STRThe binding info: doc/device-tree-bindings/pmic/s2mps11.txt
Signed-off-by: Przemyslaw Marczak
Reviewed-by: Simon Glass
Tested-by: Anand Moon
Signed-off-by: Minkyu Kang -
The proper CPU ID for those Exynos variants is 0x5422,
but before the 0x5800 was set. This commit fix this back.Changes:
- set cpu id to 0x5422 instead of 0x5800
- remove macro proid_is_exynos5800()
- add macro proid_is_exynos5422()
- change the calls to proid_is_exynos5800() with new macroSigned-off-by: Przemyslaw Marczak
Cc: Minkyu Kang
Cc: Simon Glass
Tested-by: Anand Moon
Signed-off-by: Minkyu Kang -
This platform is based on Exynos5800 but the cpu id is 0x5422.
This doesn't fit the common Exynos SoC name convention, so now,
the CPU name is defined by device tree string, to be printed
properly.Signed-off-by: Przemyslaw Marczak
Cc: Minkyu Kang
Cc: Simon Glass
Reviewed-by: Simon Glass
Tested-by: Anand Moon
Signed-off-by: Minkyu Kang -
The CPU name for Exynos was concatenated with cpu id,
but for new Exynos platforms, like Chromebook Peach Pi
based on Exynos5800, the name of SoC variant does not
include the real SoC cpu id (0x5422).For such case, the CPU name should be defined in device tree.
This commit introduces new device-tree property for Exynos:
- "cpu-model" - with cpu name string
If defined, then the cpu id is not printed.Signed-off-by: Przemyslaw Marczak
Cc: Minkyu Kang
Cc: Simon Glass
Reviewed-by: Simon Glass
Tested-by: Anand Moon
Signed-off-by: Minkyu Kang -
The function get_board_type() is called in two places by common code,
but the returned pointer was never check.This commit adds checking the returned pointer, before use it.
Signed-off-by: Przemyslaw Marczak
Cc: Minkyu Kang
Reviewed-by: Simon Glass
Tested-by: Anand Moon
Signed-off-by: Minkyu Kang
31 Oct, 2015
7 commits
-
At present the debug UART is not selected which causes a build error.
Correct this.Signed-off-by: Simon Glass
-
As more features are added for SD boot on LS1021A QDS board,
the size of U-Boot is larger. CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS
needs to be adjusted to a suitable value.Starting address of the malloc pool used in SPL needs to be
adjusted too, or it will occupy the address u-boot loads.Signed-off-by: Alison Wang
Reviewed-by: York Sun -
I2C1 can work on ls102xa rev2.0 SD boot, so add
ID EEPROM for SD boot.Signed-off-by: Yuan Yao
Reviewed-by: York Sun -
It will take more than 1s when wake up from deep sleep. Most of the
time is spent on outputing information. This patch reduced the deep
sleep latency by:
1. avoid outputing system informaton
2. remove flush cache after DDR restore
3. skip reloading second stage uboot binary when SD bootSigned-off-by: Tang Yuantian
Reviewed-by: York Sun -
The ITS bit was being read incorrectly beacause of operator
precedence. The same ahs been corrected.Signed-off-by: Lawish Deshmukh
Signed-off-by: Aneesh Bansal
Reviewed-by: York Sun -
SR_IE(Self-refresh interrupt enable) is needed for
Hardware Based Self-Refresh. Make it configurable and let
board code handle the rest.Signed-off-by: Joakim Tjernlund
Reviewed-by: York Sun
30 Oct, 2015
11 commits
-
Signed-off-by: Tom Rini
-
eth_get_dev() can return NULL which means device_probe() fails for
that ethernet device. Add return value check in various places or
U-Boot will crash due to NULL pointer access.With this commit, 'dm_test_eth_act' test case passes.
Signed-off-by: Bin Meng
Acked-by: Joe Hershberger -
U-Boot crashes when doing a 'ping' with the following test scenario:
- All ethernet devices are not probed
- "ethaddr" for all ethernet devices are not set
- "ethact" is set to a valid ethernet device nameAdd a new test case 'dm_test_eth_act' to hit such scenario.
Signed-off-by: Bin Meng
Acked-by: Joe Hershberger -
platdata->enetaddr was assigned to a value in dev_probe() last time.
If we don't clear it, for dev_probe() at the second time, dm eth
will end up treating it as a MAC address from ROM no matter where it
came from originally (maybe env, ROM, or even random). Fix this by
clearing platdata->enetaddr when removing an Ethernet device.Signed-off-by: Bin Meng
Acked-by: Joe Hershberger -
dev->uclass->uc_drv->per_device_auto_alloc_size is to be freed in
device_free(), so is dev->seq. Remove these unnecessary codes.Signed-off-by: Bin Meng
Acked-by: Simon Glass -
In pch_gbe_probe(), some additional resources are allocated
(eg: mdio, phy). We should free these in the driver remove phase.
Add pch_gbe_remove() to clean it up.Signed-off-by: Bin Meng
Reviewed-by: Simon Glass
Acked-by: Joe Hershberger -
In designware_eth_probe(), some additional resources are allocated
(eg: mdio, phy). We should free these in the driver remove phase.
Add designware_eth_remove() to clean it up.Signed-off-by: Bin Meng
Acked-by: Simon Glass -
Currently there is no API to uninitialize mdio. Add two APIs for this.
Signed-off-by: Bin Meng
Acked-by: Joe Hershberger -
In phy_connect_dev(), if the phy device has an accociated mac device
before, a warning message will be printed. But we should test the
old device against the new one, if they are actually the same one,
don't print the warning message.Signed-off-by: Bin Meng
Acked-by: Joe Hershberger -
In get_phy_device_by_mask(), when no phy is found, currently we only
print a message to show the first phy address that is not found. But
this is not always the case as multiple phys can be specified by
phy_mask. Change to print all phys that are not found, and to reduce
the console boot log, change to use 'debug' instead of 'printf'.Signed-off-by: Bin Meng
Acked-by: Joe Hershberger