summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Define the checkstop GPIO for ZaiusMatt Spinler2017-02-071-1/+2
| | | | | | | Required so the BMC can detect a checkstop and reboot the host. Change-Id: I39dfc46b5173bd581b857851f41f388d2bd5ea79 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
* pysystemmgr: Dynamically locate the gpiochipAndrew Jeffery2017-02-061-1/+15
| | | | | | | | | This is required due to differences in the number of GPIOs between AST2400 and AST2500, which affects base GPIO value in the GPIO number space. Change-Id: I755aa340dc6a06a47a43bff8afb99d3a75f39185 Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
* Move pystatemgr over to new host control interfacesAndrew Geissler2017-01-301-6/+11
| | | | | Change-Id: I15b8d0c01164bda44a725b99879eac2b036c69d1 Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
* Move poweron and poweroff over to new host state interfacesAndrew Geissler2017-01-301-9/+14
| | | | | | | | Depends on this chain of code: https://gerrit.openbmc-project.xyz/#/c/1340/ Change-Id: Iac35b6a23a2b10a656a0e386de7796cd0194dfae Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
* zaius-config: Update GPIOs for EVT2Xo Wang2017-01-121-5/+1
| | | | | | | | | | | Remove unused (and now incorrect) FSI data and clock pins. Update reset pushbutton pin. Reset button will not work on the new pin as interrupts on GPIO port AA are pending a kernel fix. We're retiring EVT1 boards in favor of EVT2. Signed-off-by: Xo Wang <xow@google.com> Change-Id: Ib34a7ff81d9ad3013d128c827e4e8b4e9e030946
* Rename power_gpio to gpio_configs.Lei YU2017-01-125-5/+5
| | | | | Change-Id: I22382fbb19a077e333aba93ae81ae614ec0cb70a Signed-off-by: Lei YU <mine260309@gmail.com>
* GPIO abstraction for power and host controlLei YU2017-01-1212-238/+407
| | | | | | | | | | | | | | | | | | | | In libopenbmc_intf/power_gpio.c there are GPIO abstractions for power related GPIOs. Host control related GPIOs need to do the same abstraction. The changes include: 1. Add host control related GPIOs in gpio_configs and update system_manager.py 2. Update control_host_obj.c to use the abstracted GPIOs 3. Update GPIO_CONFIGS for all machines and add host control related GPIOs power_gpio will be renamed to gpio_configs in next commit; Resolves openbmc/openbmc#814 Change-Id: I7832065d495d7d64c5df2f5b177005b97e68900a Signed-off-by: Lei YU <mine260309@gmail.com>
* obmc-mgr-system: Support GPIOs in AA, AB, ACXo Wang2017-01-101-6/+7
| | | | | | | Add support for two letter GPIO names that start with A. Signed-off-by: Xo Wang <xow@google.com> Change-Id: Ie3a063f476f0ba84e2c8ad0415d7a6db59e8bda0
* Fix formattingAndrew Geissler2016-12-191-173/+175
| | | | | | | A formatting-only change Change-Id: Ib38451f3b54d752e3648a7fd103eef23d97637f9 Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
* Fix wrong reset pin settingYi Li2016-12-191-9/+9
| | | | | | | | | | | | | | | | | | | | | | When power on or power off host, the way to set reset pins based on pin polarity is not correct. This makes PCIE devices not working properly. This patch fixed bug introduced by commit: https://github.com/openbmc/skeleton/commit/3ab5436 and https://github.com/openbmc/skeleton/commit/0475f65 The relationship between expected reset pin state and pgood state looks like: pgood polarilty reset_pin(expected) 1 0 1 0 0 0 1 1 0 0 1 1 Related with openbmc/openbmc#876 Change-Id: Id0b36c15ed645c29f3ccc2aa507e50b31a718bb9 Signed-off-by: Yi Li <adamliyi@msn.com>
* Remove host0 from BMC_STARTING dependencyMatt Spinler2016-12-153-3/+0
| | | | | | | | /org/openbmc/control/host0 doesn't exist on p9 systems Change-Id: I4d7ea3ab97ae58f258851e1accc1e46c28f0e80a Signed-off-by: Matt Spinler <spinler@us.ibm.com>
* flasher: fix compile error in 84ab7ePatrick Williams2016-12-121-1/+1
| | | | | Change-Id: I99c65334477f346658d37d1523a58985f8057963 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* flasher: Use arch_flash_* correctlyCyril Bur2016-12-091-1/+7
| | | | | Change-Id: Ica87c55f08cc021a5c6cc0c53d8dafb1d854aec8 Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com>
* configs/Zaius: Add HWMON_CONFIG stub for UCD monitor, remove other devicesXo Wang2016-12-071-88/+4
| | | | | | | | | Add UCD I2C name to remove these warnings from the hwmon poller: "WARNING - hwmon: Unhandled hwmon: /sys/class/hwmon/hwmon0/" Remove other devices copied and pasted from another config. Signed-off-by: Xo Wang <xow@google.com> Change-Id: Id964535f17c278d9b3d8a7a540394b2d751ee610
* pytools/gpioutil: Strip whitespace from value readXo Wang2016-12-051-2/+2
| | | | | | | | Reading from the value file includes a newline following the value, so strip it. Signed-off-by: Xo Wang <xow@google.com> Change-Id: I075794d80f6db0ad8169c6a142ea56b34bd87164
* pytools/gpioutil: Don't set direction if already setXo Wang2016-12-051-4/+5
| | | | | | | | | | | | Writing "out" to GPIO direction will actually clear the output value. This makes it impossible to read the value of outputs with gpioutil since it always sets value to 0 before reading it. Fix: don't write direction if the direction already matches that requested. Change-Id: I2116e6c7f5800239dd89c4f47fe7fd087b3a87cd Signed-off-by: Xo Wang <xow@google.com>
* Cleanup Witherspoon GPIO configureYi Li2016-12-011-43/+24
| | | | | | | | | | | * remove GPIO configures not used by any code * add SOFTWARE_PGOOD * add net-name as comments Partially resolves openbmc/openbmc#648 Change-Id: I61f317abde182acb52841aab5b628b122c2f5546 Signed-off-by: Yi Li <adamliyi@msn.com>
* skeleton: Read mac from u-boot instead of net settingsAdriana Kobylak2016-11-211-5/+12
| | | | | | | | | | | | | The system mac should be read from u-boot, not from the network settings, since the network settings one can be the random mac set by the system, and if the random mac happens to have the locally managed bit turned on, it'll prevent the mac from vpd from being written into the system. Fixes openbmc/openbmc#627 Change-Id: I70ffaeb165881a2b83455f2953a4143cb471d688 Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
* Initialize GError* to NULL before calling g_dbus_proxy_new_synLei YU2016-11-191-1/+1
| | | | | | | | | | | | This fixes the crash issue of power_control when manually build and replace executable or library. The reason why it does not crash on a full OpenBMC build may be due to the prelink clear the stack (not sure). Fixes openbmc/openbmc#818. Change-Id: I17b0e2188ebe14815d67a7f07eba4906bde75e3c Signed-off-by: Lei YU <mine260309@gmail.com>
* op-pwrctl: Hold PCI resets until BootProgress passes BASE_INITIALIZATION stateYi Li2016-11-1810-25/+189
| | | | | | | | | | | | When powering on host, hold PCI resets until hostboot passes stage "BASE_INITIALIZATION"(0x14). This fix applies to Firestone and Garrison. Partially resolves openbmc/openbmc#315 Change-Id: Ic71c81406ac188b34df89569e2264ea0b94406f3 Signed-off-by: Yi Li <adamliyi@msn.com>
* Use system call to issue warmReset commandAndrew Geissler2016-11-171-11/+2
| | | | | | | | | | | | We hit intermittent problems with the existing g_spawn_command_line_async() call. Lets just keep it nice and simple with a system call. This will be refactored in story 783 this sprint. Partially resolves openbmc/openbmc#519 Change-Id: I545578a24e44cd73461af47c6074a618c0d2bad4 Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
* Fix GPIO and remove unused ones from Romulus.pyLei YU2016-11-161-34/+10
| | | | | | | | | | | | | | | 1. Remove unused GPIO configs; 2. Add comments of GPIO names in schematic for CRONUS_SEL, POWER_BUTTON, RESET_BUTTON; 3. Fix the GPIO configs for BMC_THROTTLE, IDBTN; The GPIO names are hard-coded for now and some of them conflict with P8. A future task will abstract the GPIO names so we can use names in schematic. Once the task is done, this file will be updated to use GPIO names in schematic. Change-Id: Id14b64c2546ae0538bb5a04c535f310f6933c97b Signed-off-by: Lei YU <mine260309@gmail.com>
* flasher: Move to new libflash APIJoel Stanley2016-11-041-15/+7
| | | | | | | | The new API unifies the PNOR and MTD flash access functions so we can call the one API. Change-Id: I49705f14d3433b3a1f4b7d70bccaeea7b494d6a6 Signed-off-by: Joel Stanley <joel@jms.id.au>
* flasher: BMC partition addresses are relative to start of flashJoel Stanley2016-11-041-2/+7
| | | | | | | | | These numbers were the physical address that the flash was mapped to when we were using MMIO access. With MTD access the addresses are relative to the start of the flash device. Change-Id: I7cba8df46fe3cf12ea100072ea77f30c1ecc6e2a Signed-off-by: Joel Stanley <joel@jms.id.au>
* flasher: Remove flash tuned messageJoel Stanley2016-11-041-4/+0
| | | | | | | | The kernel handles all tuning when accessing via mtd so this message is incorrect. Change-Id: I173fc54231a67aeb8b4305b2a333674f8e00d7df Signed-off-by: Joel Stanley <joel@jms.id.au>
* flasher: Unify flash setup functionsJoel Stanley2016-11-041-35/+17
| | | | | | | | | | They almost perform the same codepath, so unify them. This is in preparation for the upcoming libflash API change, they will call the same setup function. Change-Id: If41592f3dc0c5d98db34e7a25ef2f884b031695c Signed-off-by: Joel Stanley <joel@jms.id.au>
* flasher: Use BMC_MTD to represent bmcJoel Stanley2016-11-041-8/+8
| | | | | | | | We were using a boolean to say "yep, we're talking to the BMC flash". Use the enum that is provided by libflash to do this. Change-Id: If40ac3ee64c0827693c93c64ea18a0a34ef79a46 Signed-off-by: Joel Stanley <joel@jms.id.au>
* flasher: unify cleanup commandsJoel Stanley2016-11-041-9/+3
| | | | | | | | Now that we don't do locking there is no difference between the bmc and pnor cleanups. Change-Id: I5fe9d33ce799a84123f9e146e6856dbaa6684b1f Signed-off-by: Joel Stanley <joel@jms.id.au>
* flasher: Remove relocking of flashJoel Stanley2016-11-041-16/+4
| | | | | | | | When using MTD the libflash backend does not perform any locking of the flash, so this is a noop. Change-Id: I7cbac6a9e5c3382652fe1f3ada7b208df4af6b3e Signed-off-by: Joel Stanley <joel@jms.id.au>
* flasher: remove unused ffs_indexJoel Stanley2016-11-041-6/+0
| | | | | | | | | | | | | | ffs_index was used to ensure we updated the ffs header with the actual size. However, the ffs_index was hardcoded to -1 nd never updated, so this cade was never executed. Secondly, recent discussion[1] on the open-power bug tracker suggests that this was never something that should be done. [1] https://github.com/open-power/op-build/pull/696#issuecomment-255012092 Change-Id: I302b48213561c4d4490927fa0953c65a52d82c11 Signed-off-by: Joel Stanley <joel@jms.id.au>
* flasher: Remove unused blocklevel_get_infoJoel Stanley2016-11-041-8/+0
| | | | | | | We retrieve the parameters but don't do anything with them. Change-Id: I5689fb04d6a9f201a6aff6235925b86c77500823 Signed-off-by: Joel Stanley <joel@jms.id.au>
* Add IPMI 2.0 ColdReset command supportNan Li2016-11-014-17/+198
| | | | | | | | | | * Implement reset by reboot command issued in a shell * Work with related changes in phosphor-host-ipmid repo Resolves openbmc/openbmc#437 Change-Id: I8143b1ee9c0d547ee47e5bd3659a5126b6e5af98 Signed-off-by: Nan Li <william.bjlinan@hotmail.com>
* Add Romulus configJoel Stanley2016-10-311-0/+375
| | | | | | | | This is a dual socket Power9 OpenPower machine manufactured by IBM. Change-Id: I4e20f3c90880a08b5adb35775ee6e3ca6944814f Signed-off-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Lei YU <mine260309@gmail.com>
* config: Zaius: Add FSI mux selector GPIOXo Wang2016-10-311-0/+2
| | | | | | | | Add CRONUS_SEL to Zaius.py so it can be driven high (selects the BMC for FSI). Signed-off-by: Xo Wang <xow@google.com> Change-Id: I13da51f63872e37ccc963967f3bfb8135c0a6b38
* flasher: Use flash via MTD deviceJoel Stanley2016-10-311-1/+1
| | | | | | | | Now that we have a kernel driver for the NOR, switch do doing all operations via the MTD device. Change-Id: Iff760b79f0779665b44d9118643486900ea8946c Signed-off-by: Joel Stanley <joel@jms.id.au>
* flasher: Add copyright headerJoel Stanley2016-10-311-0/+16
| | | | | Change-Id: I100c00f1d0d19ef32ef45cb97e33eacee0962c3c Signed-off-by: Joel Stanley <joel@jms.id.au>
* Add hwmon0 config in Palmetto.py and Barreleye.pyLei YU2016-10-202-0/+10
| | | | | | | | | | | | Both Palmetto.py and Barreleye are missing hwmon0 in HWMON_CONFIG, which results in `Unhandled hwmon` warning log flood. Add hwmon0's config (i2c 0-0068 for RTC ds3231's temperature) to fix the issue. Resolves openbmc/openbmc#608 Change-Id: Ief6a13e2cec64fbc25348c715d81bf1e2f1f5564 Signed-off-by: Lei YU <mine260309@gmail.com>
* Remove unneeded 'startup-hacks' fileJosh King2016-10-203-16/+0
| | | | | | | | | | | | | | Removed the hacks file because there is no reason for the UART at this point. Also no longer need for the serial-stop. I did confirm that the VUART is still functioning with these changes. I also modified the top level Makefile to no longer include the hacks directory. Resolved openbmc/openbmc#586 Change-Id: I7c116b6736d35b1119564816df6ee6aa14616467 Signed-off-by: Josh King <jdking@us.ibm.com>
* configs: Zaius: Fix GPIO for RESET_BUTTONXo Wang2016-10-121-1/+1
| | | | | | | Incorrectly set to ball name rather than GPIO designator. Signed-off-by: Xo Wang <xow@google.com> Change-Id: Ibf246a4b7523c60e61386a9e5e95ab6de8255acd
* Add fanctl to skeletonYi Li2016-10-078-69/+521
| | | | | | | | | | | | | | | | | fanctl replaces pyfanctl. It provides fan control service with dbus object "/org/openbmc/control/fans". Currently there are two methods: setMax() to set all fans' speed to maximum, and updatePresent() to update the "Present" status of inventory objects: "/org/openbmc/inventory/system/chassis/fan*". In future, more methods will be added, like setting fan speed based on temperature sensor reading. Fixes openbmc/openbmc#93 Change-Id: Ic65089f5d0538cd5e17cfcd9f27e652ae6080ec5 Signed-off-by: Yi Li <adamliyi@msn.com>
* sync: add missing os module importBrad Bishop2016-10-051-0/+1
| | | | | | | fixes: openbmc/openbmc#641 Change-Id: I88dbcfb6d731bff66d7edf4866b61ede06f4c6f8 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* gpio: Raise exception on GPIO lookup failureXo Wang2016-10-061-3/+7
| | | | | | | | | This allows dbus calls to gpioInit to fail instead of only returning a default value. This behavior allows the C-side GPIO lookup to error out as expected. Signed-off-by: Xo Wang <xow@google.com> Change-Id: I13ad20de5d209716f26e46c12ca6941eb3dd5997
* Add Zaius board configurationXo Wang2016-10-051-0/+412
| | | | | | | | | | | Zaius is a POWER9 machine announced at the 2016 OpenPOWER summit. Notable differences from Witherspoon in this initial board configuration include Zaius's lack of I2C connections to OCC, lack of external memory buffers, and lack of power capping support. Change-Id: Iadf582b185d3128022659b33b9b0cecc8492f82c Signed-off-by: Xo Wang <xow@google.com>
* op-pwrctl: Fix polarity of power outputsXo Wang2016-10-041-2/+2
| | | | | | | | | | The power GPIO logic introduced in I83d55a7069558ec810bc2e0dbbff1c5495957e6d produces inverted polarity outputs for power-up and reset signals. This fixes the logic and allows systems to boot again. Change-Id: I0830b46c0c0c1e337085050483da0250d5d850f5 Signed-off-by: Xo Wang <xow@google.com>
* pwrctl: Add latch output to power controlXo Wang2016-10-044-4/+39
| | | | | | | | | | | | On the Zaius machine, the BMC signals that power up the CPU are gated by a latch to protect against GPIO blips during BMC reset/power loss. This adds an optional power GPIO configuration that controls the latch's enable pin. Its behavior is to assert high when the op-pwrctl runs, allowing power_up lines to propagate past their latches. Signed-off-by: Xo Wang <xow@google.com> Change-Id: Ibf0d1db771033cb9bba82575cca1bd21cfb3ad3d
* pwrctl: Use PowerGpio configuration for power controlXo Wang2016-10-041-63/+111
| | | | | | | | | Use power GPIO configuration read from Python system configuration to control power and reset lines. This removes the need for machine-specific patches. Signed-off-by: Xo Wang <xow@google.com> Change-Id: I83d55a7069558ec810bc2e0dbbff1c5495957e6d
* configs: Add POWER_CONFIG for machinesXo Wang2016-10-045-0/+66
| | | | | | | | | | Add configs that address differences in naming, polarity, and number of GPIOs used to control power sequencing and standby reset holds. These are based on existing per-machine patches to op-pwrctl. Signed-off-by: Xo Wang <xow@google.com> Change-Id: I9b1b076cda58899bec466f94ae8a9c87f9ed4124
* system_manager, libobmc-intf: Add power GPIO configuration interfaceXo Wang2016-10-044-2/+180
| | | | | | | | | | | | | This adds a dbus call (in org.openbmc.managers.System) and C binding (in libopenbmc-intf) to read a POWER_CONFIG from the Python system configuration that abstracts GPIO functionality (power good, reset, etc) from their net names in GPIO_CONFIG. This should eventually replace machine-specific patches to op-pwrctl that define their own power and reset lines. Change-Id: I56eaaf60ef852b68124e4a765942243ad17d06ac Signed-off-by: Xo Wang <xow@google.com>
* Formatting only fixAndrew Geissler2016-09-301-92/+75
| | | | | Change-Id: I4fa54f7f707f001c03ce06718a83781e2e6f173c Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
* Fix for Power Restore PolicyRatan Gupta2016-09-272-11/+51
| | | | | | | | | | | | | This fix is to make the Restore_last_state of Power Restore Policy to working properly. eg:- if the last state is Host_powered_on/off and system goes for pdu reboot then system should reach to the Host_Powred_On/Off state. Fixes openbmc/openbmc#196 Change-Id: If4bdb65a21452d7aa041312fcdbb1daa1b1b0424 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
OpenPOWER on IntegriCloud