From mboxrd@z Thu Jan 1 00:00:00 1970 From: Heiko =?ISO-8859-1?Q?St=FCbner?= Date: Sun, 17 Jul 2016 17:47:40 +0200 Subject: [U-Boot] [PATCH 7/9] rockchip: rk3188: Add pinctrl driver In-Reply-To: References: <1468621041-11487-1-git-send-email-heiko@sntech.de> <1468621041-11487-8-git-send-email-heiko@sntech.de> Message-ID: <12664008.oGOD5FMGjy@diego> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Simon, Am Sonntag, 17. Juli 2016, 08:13:51 schrieb Simon Glass: > On 15 July 2016 at 16:17, Heiko Stuebner wrote: > > Add a driver which supports pin multiplexing setup for the most commonly > > used peripherals. > > > > Signed-off-by: Heiko Stuebner > > --- > > > > drivers/pinctrl/Kconfig | 9 + > > drivers/pinctrl/rockchip/Makefile | 1 + > > drivers/pinctrl/rockchip/pinctrl_rk3188.c | 614 > > ++++++++++++++++++++++++++++++ 3 files changed, 624 insertions(+) > > create mode 100644 drivers/pinctrl/rockchip/pinctrl_rk3188.c > > Acked-by: Simon Glass > > But is it possible to use some common code with the rk3288 driver? > Things like rk3288_pinctrl_set_pins()? I don't really think that will fly. The iomux area always sees a lot of creativity when the GRF gets designed. For example on the rk3288 you have gpio0 iomux + pull + etc in the pmu and all other banks in the grf. On the rk3188 the iomux is contained completely in the grf but the pull setting of the first _12_ pins are living in the pmu - and even their ordering is inverted - see the whole if(flags) part in the rk3188 pinctrl driver. The rk3399 introduces even more funny things. So I don't see where we would save without adding all the indirection the linux driver currently has. Heiko