From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932465AbcJZRgL (ORCPT ); Wed, 26 Oct 2016 13:36:11 -0400 Received: from mail-wm0-f43.google.com ([74.125.82.43]:36868 "EHLO mail-wm0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754722AbcJZRgF (ORCPT ); Wed, 26 Oct 2016 13:36:05 -0400 From: Bartosz Golaszewski To: Kevin Hilman , Michael Turquette , Sekhar Nori , Rob Herring , Frank Rowand , Mark Rutland , Peter Ujfalusi , Russell King Cc: LKML , arm-soc , linux-drm , linux-devicetree , Jyri Sarha , Tomi Valkeinen , David Airlie , Laurent Pinchart , Bartosz Golaszewski Subject: [PATCH 0/2] ARM: da850: new drivers for better LCDC support Date: Wed, 26 Oct 2016 19:35:53 +0200 Message-Id: <1477503355-2600-1-git-send-email-bgolaszewski@baylibre.com> X-Mailer: git-send-email 2.1.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This series adds two new drivers in order to better support the LCDC rev1 present on the da850 boards. The first patch adds a new memory driver which allows to write to the DDR2/mDDR memory controller present on the da8xx SoCs. Since the memory controller region is not mapped by anyone else, I went with platform_get_resource() and ioremap() approach. The second patch adds a new bus driver which allows to interact with the MSTPRI registers of the SYSCFG0 module. The SYSCFG0 registers are used by many drivers, hence the syscon/regmap approach. As is mentioned in the comments: we don't want to commit to supporting stable interfaces (DT bindings or sysfs attributes) so we hardcode the settings required by some boards (for now only da850-lcdk) with the hope that linux gets an appropriate framework for performance knobs in the future. Potential extensions of these drivers should be straightforward in the future. Tested on a da850-lcdk with a display connected over VGA and some additional work on the tilcdc driver. NOTE I'm sending this as v1, but it's a follow-up to a series I sent previously and the RFC with the ddrctl driver. I dropped the dt patch for now. Bartosz Golaszewski (2): ARM: memory: da8xx-ddrctl: new driver ARM: bus: da8xx-mstpri: new driver .../devicetree/bindings/bus/ti,da850-mstpri.txt | 20 ++ .../memory-controllers/ti-da8xx-ddrctl.txt | 20 ++ drivers/bus/Kconfig | 9 + drivers/bus/Makefile | 2 + drivers/bus/da8xx-mstpri.c | 266 +++++++++++++++++++++ drivers/memory/Kconfig | 8 + drivers/memory/Makefile | 1 + drivers/memory/da8xx-ddrctl.c | 175 ++++++++++++++ 8 files changed, 501 insertions(+) create mode 100644 Documentation/devicetree/bindings/bus/ti,da850-mstpri.txt create mode 100644 Documentation/devicetree/bindings/memory-controllers/ti-da8xx-ddrctl.txt create mode 100644 drivers/bus/da8xx-mstpri.c create mode 100644 drivers/memory/da8xx-ddrctl.c -- 2.9.3 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bartosz Golaszewski Subject: [PATCH 0/2] ARM: da850: new drivers for better LCDC support Date: Wed, 26 Oct 2016 19:35:53 +0200 Message-ID: <1477503355-2600-1-git-send-email-bgolaszewski@baylibre.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Return-path: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Kevin Hilman , Michael Turquette , Sekhar Nori , Rob Herring , Frank Rowand , Mark Rutland , Peter Ujfalusi , Russell King Cc: linux-devicetree , LKML , linux-drm , Bartosz Golaszewski , Tomi Valkeinen , Jyri Sarha , arm-soc , Laurent Pinchart List-Id: devicetree@vger.kernel.org VGhpcyBzZXJpZXMgYWRkcyB0d28gbmV3IGRyaXZlcnMgaW4gb3JkZXIgdG8gYmV0dGVyIHN1cHBv cnQgdGhlIExDREMKcmV2MSBwcmVzZW50IG9uIHRoZSBkYTg1MCBib2FyZHMuCgpUaGUgZmlyc3Qg cGF0Y2ggYWRkcyBhIG5ldyBtZW1vcnkgZHJpdmVyIHdoaWNoIGFsbG93cyB0byB3cml0ZSB0byB0 aGUKRERSMi9tRERSIG1lbW9yeSBjb250cm9sbGVyIHByZXNlbnQg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uYWwgd29yayBvbiB0aGUgdGlsY2RjIGRyaXZl ci4KCk5PVEUgSSdtIHNlbmRpbmcgdGhpcyBhcyB2MSwgYnV0IGl0J3MgYSBmb2xsb3ctdXAgdG8g YSBzZXJpZXMgSSBzZW50CnByZXZpb3VzbHkgYW5kIHRoZSBSRkMgd2l0aCB0aGUgZGRyY3RsIGRy aXZlci4gSSBkcm9wcGVkIHRoZSBkdCBwYXRjaApmb3Igbm93LgoKQmFydG9zeiBHb2xhc3pld3Nr aSAoMik6CiAgQVJNOiBtZW1vcnk6IGRhOHh4LWRkcmN0bDogbmV3IGRyaXZlcgogIEFSTTogYnVz OiBkYTh4eC1tc3Rwcmk6IG5ldyBkcml2ZXIKCiAuLi4vZGV2aWNldHJlZS9iaW5kaW5ncy9idXMv dGksZGE4NTAtbXN0cHJpLnR4dCAgICB8ICAyMCArKwogLi4uL21lbW9yeS1jb250cm9sbGVycy90 aS1kYTh4eC1kZHJjdGwudHh0ICAgICAgICAgfCAgMjAgKysKIGRyaXZlcnMvYnVzL0tjb25maWcg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgICA5ICsKIGRyaXZlcnMvYnVzL01ha2Vm aWxlICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgICAyICsKIGRyaXZlcnMvYnVzL2Rh OHh4LW1zdHByaS5jICAgICAgICAgICAgICAgICAgICAgICAgIHwgMjY2ICsrKysrKysrKysrKysr KysrKysrKwogZHJpdmVycy9tZW1vcnkvS2NvbmZpZyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgfCAgIDggKwogZHJpdmVycy9tZW1vcnkvTWFrZWZpbGUgICAgICAgICAgICAgICAgICAgICAg ICAgICAgfCAgIDEgKwogZHJpdmVycy9tZW1vcnkvZGE4eHgtZGRyY3RsLmMgICAgICAgICAgICAg ICAgICAgICAgfCAxNzUgKysrKysrKysrKysrKysKIDggZmlsZXMgY2hhbmdlZCwgNTAxIGluc2Vy dGlvbnMoKykKIGNyZWF0ZSBtb2RlIDEwMDY0NCBEb2N1bWVudGF0aW9uL2RldmljZXRyZWUvYmlu ZGluZ3MvYnVzL3RpLGRhODUwLW1zdHByaS50eHQKIGNyZWF0ZSBtb2RlIDEwMDY0NCBEb2N1bWVu dGF0aW9uL2RldmljZXRyZWUvYmluZGluZ3MvbWVtb3J5LWNvbnRyb2xsZXJzL3RpLWRhOHh4LWRk cmN0bC50eHQKIGNyZWF0ZSBtb2RlIDEwMDY0NCBkcml2ZXJzL2J1cy9kYTh4eC1tc3RwcmkuYwog Y3JlYXRlIG1vZGUgMTAwNjQ0IGRyaXZlcnMvbWVtb3J5L2RhOHh4LWRkcmN0bC5jCgotLSAKMi45 LjMKCl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCmRyaS1k ZXZlbCBtYWlsaW5nIGxpc3QKZHJpLWRldmVsQGxpc3RzLmZyZWVkZXNrdG9wLm9yZwpodHRwczov L2xpc3RzLmZyZWVkZXNrdG9wLm9yZy9tYWlsbWFuL2xpc3RpbmZvL2RyaS1kZXZlbAo= From mboxrd@z Thu Jan 1 00:00:00 1970 From: bgolaszewski@baylibre.com (Bartosz Golaszewski) Date: Wed, 26 Oct 2016 19:35:53 +0200 Subject: [PATCH 0/2] ARM: da850: new drivers for better LCDC support Message-ID: <1477503355-2600-1-git-send-email-bgolaszewski@baylibre.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org This series adds two new drivers in order to better support the LCDC rev1 present on the da850 boards. The first patch adds a new memory driver which allows to write to the DDR2/mDDR memory controller present on the da8xx SoCs. Since the memory controller region is not mapped by anyone else, I went with platform_get_resource() and ioremap() approach. The second patch adds a new bus driver which allows to interact with the MSTPRI registers of the SYSCFG0 module. The SYSCFG0 registers are used by many drivers, hence the syscon/regmap approach. As is mentioned in the comments: we don't want to commit to supporting stable interfaces (DT bindings or sysfs attributes) so we hardcode the settings required by some boards (for now only da850-lcdk) with the hope that linux gets an appropriate framework for performance knobs in the future. Potential extensions of these drivers should be straightforward in the future. Tested on a da850-lcdk with a display connected over VGA and some additional work on the tilcdc driver. NOTE I'm sending this as v1, but it's a follow-up to a series I sent previously and the RFC with the ddrctl driver. I dropped the dt patch for now. Bartosz Golaszewski (2): ARM: memory: da8xx-ddrctl: new driver ARM: bus: da8xx-mstpri: new driver .../devicetree/bindings/bus/ti,da850-mstpri.txt | 20 ++ .../memory-controllers/ti-da8xx-ddrctl.txt | 20 ++ drivers/bus/Kconfig | 9 + drivers/bus/Makefile | 2 + drivers/bus/da8xx-mstpri.c | 266 +++++++++++++++++++++ drivers/memory/Kconfig | 8 + drivers/memory/Makefile | 1 + drivers/memory/da8xx-ddrctl.c | 175 ++++++++++++++ 8 files changed, 501 insertions(+) create mode 100644 Documentation/devicetree/bindings/bus/ti,da850-mstpri.txt create mode 100644 Documentation/devicetree/bindings/memory-controllers/ti-da8xx-ddrctl.txt create mode 100644 drivers/bus/da8xx-mstpri.c create mode 100644 drivers/memory/da8xx-ddrctl.c -- 2.9.3