All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v2 0/5] Add a pinctrl driver for Merrifield to pinmux I2C#6
@ 2018-09-04 14:34 Georgii Staroselskii
  2018-09-04 14:34 ` [U-Boot] [PATCH v2 1/5] x86: cpu: introduce scu_ipc_raw_command() Georgii Staroselskii
                   ` (5 more replies)
  0 siblings, 6 replies; 13+ messages in thread
From: Georgii Staroselskii @ 2018-09-04 14:34 UTC (permalink / raw)
  To: u-boot

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

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2018-09-09  1:06 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-04 14:34 [U-Boot] [PATCH v2 0/5] Add a pinctrl driver for Merrifield to pinmux I2C#6 Georgii Staroselskii
2018-09-04 14:34 ` [U-Boot] [PATCH v2 1/5] x86: cpu: introduce scu_ipc_raw_command() Georgii Staroselskii
2018-09-04 14:34 ` [U-Boot] [PATCH v2 2/5] x86: tangier: pinmux: add API to configure protected pins Georgii Staroselskii
2018-09-04 14:57   ` Andy Shevchenko
2018-09-05 15:24   ` Simon Glass
2018-09-05 15:44     ` Georgii Staroselskii
2018-09-09  1:06       ` Simon Glass
2018-09-04 14:34 ` [U-Boot] [PATCH v2 3/5] x86: dts: edison: configure I2C#6 pins Georgii Staroselskii
2018-09-04 14:34 ` [U-Boot] [PATCH v2 4/5] x86: tangier: acpi: add I2C6 node Georgii Staroselskii
2018-09-04 14:34 ` [U-Boot] [PATCH v2 5/5] x86: cpu: add docstring to scu_ipc_command() Georgii Staroselskii
2018-09-04 14:58   ` Andy Shevchenko
2018-09-05  4:40 ` [U-Boot] [PATCH v2 0/5] Add a pinctrl driver for Merrifield to pinmux I2C#6 Bin Meng
2018-09-05 10:58   ` Andy Shevchenko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.