[U-Boot] [PATCH v2 0/5] Add a pinctrl driver for Merrifield to pinmux I2C#6
Georgii Staroselskii
georgii.staroselskii at emlid.com
Tue Sep 4 14:34:00 UTC 2018
We have lacked the support for any pinmuxing in U-Boot for Merrifield.
A need for pinmuxing some pins has arisen from the fact the I2C#6 is shared
with I2C#8 on Merrifield. The latter is not easily accessible because it's
a part of a separate MCU we don't have easy access to.
I2C#6 can be and should be made use of in Linux but couldn't because it
was blocked by the SCU.
The proposed change is to implement a minimalistic pinctrl driver that
reads the configuration off a device tree blob and configures the pins
accordingly.
The driver needs some changes to SCU API and thus the addition of
scu_ipc_raw_command().
Andy Shevchenko has been helping me by making a prior review and made
a lot of suggestions about the general approach that should be taken.
He should also be given credit for the initial kernel code that I have
taken as a reference.
The code has been tested on 5 different Edisons on Intel Edison Breakout
board and a couple of custom Emlid PCBs by booting a kernel and issuing
a i2cdetect -r -y 6 and then loading a driver that made use of the bus.
I also created a Gist on Github with a lot of relevant information like
- output of `acpidump -o tables.dat`
- dmesg
- output of `grep -H 15 /sys/bus/acpi/devices/*/status`
- cat /sys/kernel/debug/gpio
- cat /sys/kernel/debug/pinctrl/INTC1002\:00/pins
- output of `i2cdetect -y -r 6` w/ and w/o external device on the bus
Here it is:
https://gist.github.com/staroselskii/097808e05fd609dbafd4fe5ebd618708
Changes in v2 (Sep 4, 2018)
* fix most of the cosmetic issues
* allow setting pinmodes other than 1
* add a missing docstring to scu_ipc_command()
Georgii Staroselskii (5):
x86: cpu: introduce scu_ipc_raw_command()
x86: tangier: pinmux: add API to configure protected pins
x86: dts: edison: configure I2C#6 pins
x86: tangier: acpi: add I2C6 node
x86: cpu: add docstring to scu_ipc_command()
arch/x86/cpu/tangier/Makefile | 2 +-
arch/x86/cpu/tangier/pinmux.c | 196 +++++++++++++++++++++
arch/x86/dts/edison.dts | 22 +++
.../include/asm/arch-tangier/acpi/southcluster.asl | 10 ++
arch/x86/include/asm/scu.h | 4 +
arch/x86/lib/scu.c | 62 +++++++
6 files changed, 295 insertions(+), 1 deletion(-)
create mode 100644 arch/x86/cpu/tangier/pinmux.c
--
2.7.4
More information about the U-Boot
mailing list