public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 0/4] Add a pinctrl driver for Merrifield to pinmux I2C#6
@ 2018-09-03 15:07 Georgii Staroselskii
  2018-09-03 15:07 ` [U-Boot] [PATCH 1/4] x86: cpu: introduce scu_ipc_raw_command() Georgii Staroselskii
                   ` (4 more replies)
  0 siblings, 5 replies; 17+ messages in thread
From: Georgii Staroselskii @ 2018-09-03 15:07 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

Georgii Staroselskii (4):
  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

 arch/x86/cpu/tangier/Makefile                      |   2 +-
 arch/x86/cpu/tangier/pinmux.c                      | 188 +++++++++++++++++++++
 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                                 |  35 ++++
 6 files changed, 260 insertions(+), 1 deletion(-)
 create mode 100644 arch/x86/cpu/tangier/pinmux.c

-- 
2.7.4

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

end of thread, other threads:[~2018-09-04 12:00 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-03 15:07 [U-Boot] [PATCH 0/4] Add a pinctrl driver for Merrifield to pinmux I2C#6 Georgii Staroselskii
2018-09-03 15:07 ` [U-Boot] [PATCH 1/4] x86: cpu: introduce scu_ipc_raw_command() Georgii Staroselskii
2018-09-03 18:22   ` Andy Shevchenko
2018-09-04  4:37     ` Bin Meng
2018-09-04 12:00       ` Georgii Staroselskii
2018-09-03 15:07 ` [U-Boot] [PATCH 2/4] x86: tangier: pinmux: add API to configure protected pins Georgii Staroselskii
2018-09-03 18:39   ` Andy Shevchenko
2018-09-04  4:37   ` Bin Meng
2018-09-04  4:50   ` Bin Meng
2018-09-03 15:07 ` [U-Boot] [PATCH 3/4] x86: dts: edison: configure I2C#6 pins Georgii Staroselskii
2018-09-03 18:23   ` Andy Shevchenko
2018-09-04  4:38     ` Bin Meng
2018-09-03 15:07 ` [U-Boot] [PATCH 4/4] x86: tangier: acpi: add I2C6 node Georgii Staroselskii
2018-09-03 18:23   ` Andy Shevchenko
2018-09-04  4:38   ` Bin Meng
2018-09-03 18:26 ` [U-Boot] [PATCH 0/4] Add a pinctrl driver for Merrifield to pinmux I2C#6 Andy Shevchenko
2018-09-03 18:43   ` Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox