Re: [PATCH] ARM: dts: Explicitly set dr_mode on exynos5250-snow
Hello Sjoerd, On Fri, Nov 14, 2014 at 8:46 PM, Sjoerd Simons sjoerd.sim...@collabora.co.uk wrote: Explicitly set the dr_mode for the dwc3 controller on the Snow board to host mode. This is required to ensure the controller is initialized in the right mode if the kernel is build with USB gadget support. The patch looks good to me. Reviewed-by: Javier Martinez Canillas javier.marti...@collabora.co.uk Kukjin, I think $subject is -rc material since this issue is seen after commit 508423b (ARM: exynos_defconfig: enable USB gadget support) which landed in 3.18. Best regards, Javier -- To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH V8 01/14] drm/bridge: ptn3460: Few trivial cleanups
This patch does the following changes: -- Use usleep_range instead of udelay. -- Remove driver_private member from ptn3460 structure. -- Make all possible functions and structures static. -- Use dev_err for non-DRM errors. -- Arrange header files alphabetically. -- s/edid/EDID in all error messages. Signed-off-by: Ajay Kumar ajaykumar...@samsung.com --- drivers/gpu/drm/bridge/ptn3460.c | 95 +++--- 1 file changed, 48 insertions(+), 47 deletions(-) diff --git a/drivers/gpu/drm/bridge/ptn3460.c b/drivers/gpu/drm/bridge/ptn3460.c index d466696..4db38e1 100644 --- a/drivers/gpu/drm/bridge/ptn3460.c +++ b/drivers/gpu/drm/bridge/ptn3460.c @@ -13,19 +13,19 @@ * GNU General Public License for more details. */ +#include linux/delay.h +#include linux/gpio.h +#include linux/i2c.h #include linux/module.h #include linux/of.h #include linux/of_gpio.h -#include linux/i2c.h -#include linux/gpio.h -#include linux/delay.h -#include drmP.h -#include drm_edid.h +#include bridge/ptn3460.h + #include drm_crtc.h #include drm_crtc_helper.h - -#include bridge/ptn3460.h +#include drm_edid.h +#include drmP.h #define PTN3460_EDID_ADDR 0x0 #define PTN3460_EDID_EMULATION_ADDR0x84 @@ -37,7 +37,7 @@ struct ptn3460_bridge { struct drm_connector connector; struct i2c_client *client; struct drm_encoder *encoder; - struct drm_bridge *bridge; + struct drm_bridge bridge; struct edid *edid; int gpio_pd_n; int gpio_rst_n; @@ -45,6 +45,18 @@ struct ptn3460_bridge { bool enabled; }; +static inline struct ptn3460_bridge * + bridge_to_ptn3460(struct drm_bridge *bridge) +{ + return container_of(bridge, struct ptn3460_bridge, bridge); +} + +static inline struct ptn3460_bridge * + connector_to_ptn3460(struct drm_connector *connector) +{ + return container_of(connector, struct ptn3460_bridge, connector); +} + static int ptn3460_read_bytes(struct ptn3460_bridge *ptn_bridge, char addr, u8 *buf, int len) { @@ -92,7 +104,7 @@ static int ptn3460_select_edid(struct ptn3460_bridge *ptn_bridge) ret = ptn3460_write_byte(ptn_bridge, PTN3460_EDID_SRAM_LOAD_ADDR, ptn_bridge-edid_emulation); if (ret) { - DRM_ERROR(Failed to transfer edid to sram, ret=%d\n, ret); + DRM_ERROR(Failed to transfer EDID to sram, ret=%d\n, ret); return ret; } @@ -102,7 +114,7 @@ static int ptn3460_select_edid(struct ptn3460_bridge *ptn_bridge) ret = ptn3460_write_byte(ptn_bridge, PTN3460_EDID_EMULATION_ADDR, val); if (ret) { - DRM_ERROR(Failed to write edid value, ret=%d\n, ret); + DRM_ERROR(Failed to write EDID value, ret=%d\n, ret); return ret; } @@ -111,7 +123,7 @@ static int ptn3460_select_edid(struct ptn3460_bridge *ptn_bridge) static void ptn3460_pre_enable(struct drm_bridge *bridge) { - struct ptn3460_bridge *ptn_bridge = bridge-driver_private; + struct ptn3460_bridge *ptn_bridge = bridge_to_ptn3460(bridge); int ret; if (ptn_bridge-enabled) @@ -122,7 +134,7 @@ static void ptn3460_pre_enable(struct drm_bridge *bridge) if (gpio_is_valid(ptn_bridge-gpio_rst_n)) { gpio_set_value(ptn_bridge-gpio_rst_n, 0); - udelay(10); + usleep_range(10, 20); gpio_set_value(ptn_bridge-gpio_rst_n, 1); } @@ -135,7 +147,7 @@ static void ptn3460_pre_enable(struct drm_bridge *bridge) ret = ptn3460_select_edid(ptn_bridge); if (ret) - DRM_ERROR(Select edid failed ret=%d\n, ret); + DRM_ERROR(Select EDID failed ret=%d\n, ret); ptn_bridge-enabled = true; } @@ -146,7 +158,7 @@ static void ptn3460_enable(struct drm_bridge *bridge) static void ptn3460_disable(struct drm_bridge *bridge) { - struct ptn3460_bridge *ptn_bridge = bridge-driver_private; + struct ptn3460_bridge *ptn_bridge = bridge_to_ptn3460(bridge); if (!ptn_bridge-enabled) return; @@ -164,9 +176,9 @@ static void ptn3460_post_disable(struct drm_bridge *bridge) { } -void ptn3460_bridge_destroy(struct drm_bridge *bridge) +static void ptn3460_bridge_destroy(struct drm_bridge *bridge) { - struct ptn3460_bridge *ptn_bridge = bridge-driver_private; + struct ptn3460_bridge *ptn_bridge = bridge_to_ptn3460(bridge); drm_bridge_cleanup(bridge); if (gpio_is_valid(ptn_bridge-gpio_pd_n)) @@ -176,7 +188,7 @@ void ptn3460_bridge_destroy(struct drm_bridge *bridge) /* Nothing else to free, we've got devm allocated memory */ } -struct drm_bridge_funcs ptn3460_bridge_funcs = { +static struct drm_bridge_funcs ptn3460_bridge_funcs = { .pre_enable = ptn3460_pre_enable, .enable =
[PATCH V8 04/14] drm/bridge: ptn3460: Convert to i2c driver model
Use drm_bridge helpers to modify the driver to support i2c driver model. Signed-off-by: Ajay Kumar ajaykumar...@samsung.com --- drivers/gpu/drm/bridge/Kconfig |2 + drivers/gpu/drm/bridge/ptn3460.c| 124 +-- drivers/gpu/drm/exynos/exynos_dp_core.c | 22 -- 3 files changed, 86 insertions(+), 62 deletions(-) diff --git a/drivers/gpu/drm/bridge/Kconfig b/drivers/gpu/drm/bridge/Kconfig index 884923f..4254c2b 100644 --- a/drivers/gpu/drm/bridge/Kconfig +++ b/drivers/gpu/drm/bridge/Kconfig @@ -1,5 +1,7 @@ config DRM_PTN3460 tristate PTN3460 DP/LVDS bridge depends on DRM + depends on OF I2C select DRM_KMS_HELPER ---help--- + ptn3460 eDP-LVDS bridge chip driver. diff --git a/drivers/gpu/drm/bridge/ptn3460.c b/drivers/gpu/drm/bridge/ptn3460.c index 4a818c1..7adeb60 100644 --- a/drivers/gpu/drm/bridge/ptn3460.c +++ b/drivers/gpu/drm/bridge/ptn3460.c @@ -36,7 +36,6 @@ struct ptn3460_bridge { struct drm_connector connector; struct i2c_client *client; - struct drm_encoder *encoder; struct drm_bridge bridge; struct edid *edid; int gpio_pd_n; @@ -176,13 +175,6 @@ static void ptn3460_post_disable(struct drm_bridge *bridge) { } -static struct drm_bridge_funcs ptn3460_bridge_funcs = { - .pre_enable = ptn3460_pre_enable, - .enable = ptn3460_enable, - .disable = ptn3460_disable, - .post_disable = ptn3460_post_disable, -}; - static int ptn3460_get_modes(struct drm_connector *connector) { struct ptn3460_bridge *ptn_bridge; @@ -227,7 +219,7 @@ static struct drm_encoder *ptn3460_best_encoder(struct drm_connector *connector) { struct ptn3460_bridge *ptn_bridge = connector_to_ptn3460(connector); - return ptn_bridge-encoder; + return ptn_bridge-bridge.encoder; } static struct drm_connector_helper_funcs ptn3460_connector_helper_funcs = { @@ -253,31 +245,66 @@ static struct drm_connector_funcs ptn3460_connector_funcs = { .destroy = ptn3460_connector_destroy, }; -int ptn3460_init(struct drm_device *dev, struct drm_encoder *encoder, - struct i2c_client *client, struct device_node *node) +int ptn3460_bridge_attach(struct drm_bridge *bridge) { + struct ptn3460_bridge *ptn_bridge = bridge_to_ptn3460(bridge); int ret; + + if (!bridge-encoder) { + DRM_ERROR(Parent encoder object not found); + return -ENODEV; + } + + ret = drm_connector_init(bridge-dev, ptn_bridge-connector, + ptn3460_connector_funcs, DRM_MODE_CONNECTOR_LVDS); + if (ret) { + DRM_ERROR(Failed to initialize connector with drm\n); + return ret; + } + drm_connector_helper_add(ptn_bridge-connector, + ptn3460_connector_helper_funcs); + drm_connector_register(ptn_bridge-connector); + drm_mode_connector_attach_encoder(ptn_bridge-connector, + bridge-encoder); + + return ret; +} + +static struct drm_bridge_funcs ptn3460_bridge_funcs = { + .pre_enable = ptn3460_pre_enable, + .enable = ptn3460_enable, + .disable = ptn3460_disable, + .post_disable = ptn3460_post_disable, + .attach = ptn3460_bridge_attach, +}; + +static int ptn3460_probe(struct i2c_client *client, + const struct i2c_device_id *id) +{ + struct device *dev = client-dev; struct ptn3460_bridge *ptn_bridge; + int ret; - ptn_bridge = devm_kzalloc(dev-dev, sizeof(*ptn_bridge), GFP_KERNEL); + ptn_bridge = devm_kzalloc(dev, sizeof(*ptn_bridge), GFP_KERNEL); if (!ptn_bridge) { return -ENOMEM; } ptn_bridge-client = client; - ptn_bridge-encoder = encoder; - ptn_bridge-gpio_pd_n = of_get_named_gpio(node, powerdown-gpio, 0); + ptn_bridge-gpio_pd_n = of_get_named_gpio(dev-of_node, + powerdown-gpio, 0); if (gpio_is_valid(ptn_bridge-gpio_pd_n)) { ret = gpio_request_one(ptn_bridge-gpio_pd_n, GPIOF_OUT_INIT_HIGH, PTN3460_PD_N); if (ret) { - dev_err(client-dev, - Request powerdown-gpio failed (%d)\n, ret); + dev_err(dev, Request powerdown-gpio failed (%d)\n, + ret); return ret; } } - ptn_bridge-gpio_rst_n = of_get_named_gpio(node, reset-gpio, 0); + ptn_bridge-gpio_rst_n = of_get_named_gpio(dev-of_node, + reset-gpio, 0); if (gpio_is_valid(ptn_bridge-gpio_rst_n)) { /* * Request the reset pin low to
[PATCH V8 00/14] drm/exynos: few patches to enhance bridge chip support
This series is based on master branch of Linus tree at: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git Changes since V2: -- Address comments from Jingoo Han for ps8622 driver -- Address comments from Daniel, Rob and Thierry regarding bridge chaining -- Address comments from Thierry regarding the names for new drm_panel functions Changes since V3: -- Remove hotplug based initialization of exynos_dp -- Make exynos_dp work directly with drm_panel, remove dependency on panel_binder -- Minor cleanups in panel_binder and panel_lvds driver Changes since V4: -- Use gpiod interface for panel-lvds and ps8622 drivers. -- Address comments from Javier. -- Fix compilation issues when PANEL_BINDER is selected as module. -- Split Documentation patches from driver patches. -- Rebase on top of the tree. Changes since V5: -- Modify bridge drivers to support driver model. -- Drop the concept of bridge chain(sincle there are no 2 real bridges) Hence drop bridge-panel_binder layer. -- Drop panel-lvds driver and accomodate the required changes in panel-simple driver. -- Use gpiod interface in ptn3460 driver. -- Address all comments by Thierry Reding for V5 series. -- Address comments from Sean Paul for exynos_dp_commit issue. Changes since V6: -- Panel patches were seperated and they are merged already. -- Fix few issues with ptn3460, before modifying the bridge core. -- Modify drm_bridge as per Thierry's comments for V6 series. -- Add drm_bridge changes minimally without breaking existing code. -- Add new features for ptn3460, step-by-step. -- Address comments from Thierry and Andreas for ptn3460 and ps8622. -- Split documentation patches from driver patches. Changes since V7: -- Address comments from Tomi and Laurent: -- Use videoports and endpoints to represent the connection between encoder, bridge and the panel, instead of using phandles. -- Address comments from Daniel: -- Make the patch description more descriptive. -- remove device pointer from drm_bridge, and just use device_node instead. -- don't pass encoder pointer to bridge_attach. -- Address comments from Sean Paul: -- Remove bridge from mode_config, and pull out drm_bridge functions from drm_crtc.c to drm_bridge.c Note: This patchset creates the following Kconfig ambiguity. Any pointers to fix the same are welcome. drivers/video/fbdev/Kconfig:5:error: recursive dependency detected! drivers/video/fbdev/Kconfig:5: symbol FB is selected by DRM_KMS_FB_HELPER drivers/gpu/drm/Kconfig:34: symbol DRM_KMS_FB_HELPER depends on DRM_KMS_HELPER drivers/gpu/drm/Kconfig:28: symbol DRM_KMS_HELPER is selected by DRM_PTN3460 drivers/gpu/drm/bridge/Kconfig:1: symbol DRM_PTN3460 depends on I2C drivers/i2c/Kconfig:7: symbol I2C is selected by FB_DDC drivers/video/fbdev/Kconfig:59: symbol FB_DDC is selected by FB_CYBER2000_DDC drivers/video/fbdev/Kconfig:374:symbol FB_CYBER2000_DDC depends on FB_CYBER2000 drivers/video/fbdev/Kconfig:362:symbol FB_CYBER2000 depends on FB Ajay Kumar (13): [PATCH V8 1/14] drm/bridge: ptn3460: Few trivial cleanups [PATCH V8 2/14] drm/bridge: do not pass drm_bridge_funcs to drm_bridge_init [PATCH V8 3/14] drm/bridge: make bridge registration independent of drm flow [PATCH V8 4/14] drm/bridge: ptn3460: Convert to i2c driver model [PATCH V8 5/14] drm/exynos: dp: support drm_bridge [PATCH V8 6/14] drm/bridge: ptn3460: support drm_panel [PATCH V8 7/14] drm/bridge: ptn3460: probe connector at the end of bridge attach [PATCH V8 8/14] drm/bridge: ptn3460: use gpiod interface [PATCH V8 9/14] Documentation: drm: bridge: move to video/bridge [PATCH V8 10/14] Documentation: devicetree: Add vendor prefix for parade [PATCH V8 11/14] Documentation: bridge: Add documentation for ps8622 DT properties [PATCH V8 13/14] ARM: dts: snow: represent the connection between bridge and panel using videoport and endpoints [PATCH V8 14/14] ARM: dts: peach-pit: represent the connection between bridge and panel using videoport and endpoints Vincent Palatin (1): [PATCH V8 12/14] drm/bridge: Add i2c based driver for ps8622/ps8625 bridge .../devicetree/bindings/drm/bridge/ptn3460.txt | 27 - .../devicetree/bindings/vendor-prefixes.txt|1 + .../devicetree/bindings/video/bridge/ps8622.txt| 31 + .../devicetree/bindings/video/bridge/ptn3460.txt | 39 ++ .../devicetree/bindings/video/exynos_dp.txt| 12 + arch/arm/boot/dts/exynos5250-snow.dts | 30 +- arch/arm/boot/dts/exynos5420-peach-pit.dts | 31 +-
[PATCH V8 03/14] drm/bridge: make bridge registration independent of drm flow
Currently, third party bridge drivers(ptn3460) are dependent on the corresponding encoder driver init, since bridge driver needs a drm_device pointer to finish drm initializations. The encoder driver passes the drm_device pointer to the bridge driver. Because of this dependency, third party drivers like ptn3460 doesn't adhere to the driver model. In this patch, we reframe the bridge registration framework so that bridge initialization is split into 2 steps, and bridge registration happens independent of drm flow: --Step 1: gather all the bridge settings independent of drm and add the bridge onto a global list of bridges. --Step 2: when the encoder driver is probed, call drm_bridge_attach for the corresponding bridge so that the bridge receives drm_device pointer and continues with connector and other drm initializations. The old set of bridge helpers are removed, and a set of new helpers are added to accomplish the 2 step initialization. The bridge devices register themselves onto global list of bridges when they get probed by calling drm_bridge_add. The parent encoder driver waits till the bridge is available in the lookup table(by calling of_drm_find_bridge) and then continues with its initialization. The encoder driver should also call drm_bridge_attach to pass on the drm_device to the bridge object. drm_bridge_attach inturn calls bridge-funcs-attach so that bridge can continue with drm related initializations. Signed-off-by: Ajay Kumar ajaykumar...@samsung.com --- drivers/gpu/drm/Makefile |2 +- drivers/gpu/drm/bridge/ptn3460.c | 27 +- drivers/gpu/drm/drm_bridge.c | 91 drivers/gpu/drm/drm_crtc.c | 65 --- drivers/gpu/drm/msm/hdmi/hdmi.c|7 +-- drivers/gpu/drm/msm/hdmi/hdmi.h|1 + drivers/gpu/drm/msm/hdmi/hdmi_bridge.c |7 ++- drivers/gpu/drm/sti/sti_hda.c | 10 +--- drivers/gpu/drm/sti/sti_hdmi.c | 10 +--- include/drm/bridge/ptn3460.h |8 +++ include/drm/drm_crtc.h | 26 - 11 files changed, 136 insertions(+), 118 deletions(-) create mode 100644 drivers/gpu/drm/drm_bridge.c diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile index 9292a76..00f97a5 100644 --- a/drivers/gpu/drm/Makefile +++ b/drivers/gpu/drm/Makefile @@ -14,7 +14,7 @@ drm-y :=drm_auth.o drm_bufs.o drm_cache.o \ drm_info.o drm_debugfs.o drm_encoder_slave.o \ drm_trace_points.o drm_global.o drm_prime.o \ drm_rect.o drm_vma_manager.o drm_flip_work.o \ - drm_modeset_lock.o + drm_modeset_lock.o drm_bridge.o drm-$(CONFIG_COMPAT) += drm_ioc32.o drm-$(CONFIG_DRM_GEM_CMA_HELPER) += drm_gem_cma_helper.o diff --git a/drivers/gpu/drm/bridge/ptn3460.c b/drivers/gpu/drm/bridge/ptn3460.c index a2ddc8d..4a818c1 100644 --- a/drivers/gpu/drm/bridge/ptn3460.c +++ b/drivers/gpu/drm/bridge/ptn3460.c @@ -176,24 +176,11 @@ static void ptn3460_post_disable(struct drm_bridge *bridge) { } -static void ptn3460_bridge_destroy(struct drm_bridge *bridge) -{ - struct ptn3460_bridge *ptn_bridge = bridge_to_ptn3460(bridge); - - drm_bridge_cleanup(bridge); - if (gpio_is_valid(ptn_bridge-gpio_pd_n)) - gpio_free(ptn_bridge-gpio_pd_n); - if (gpio_is_valid(ptn_bridge-gpio_rst_n)) - gpio_free(ptn_bridge-gpio_rst_n); - /* Nothing else to free, we've got devm allocated memory */ -} - static struct drm_bridge_funcs ptn3460_bridge_funcs = { .pre_enable = ptn3460_pre_enable, .enable = ptn3460_enable, .disable = ptn3460_disable, .post_disable = ptn3460_post_disable, - .destroy = ptn3460_bridge_destroy, }; static int ptn3460_get_modes(struct drm_connector *connector) @@ -314,7 +301,7 @@ int ptn3460_init(struct drm_device *dev, struct drm_encoder *encoder, } ptn_bridge-bridge.funcs = ptn3460_bridge_funcs; - ret = drm_bridge_init(dev, ptn_bridge-bridge); + ret = drm_bridge_attach(dev, ptn_bridge-bridge); if (ret) { DRM_ERROR(Failed to initialize bridge with drm\n); goto err; @@ -343,3 +330,15 @@ err: return ret; } EXPORT_SYMBOL(ptn3460_init); + +void ptn3460_destroy(struct drm_bridge *bridge) +{ + struct ptn3460_bridge *ptn_bridge = bridge-driver_private; + + if (gpio_is_valid(ptn_bridge-gpio_pd_n)) + gpio_free(ptn_bridge-gpio_pd_n); + if (gpio_is_valid(ptn_bridge-gpio_rst_n)) + gpio_free(ptn_bridge-gpio_rst_n); + /* Nothing else to free, we've got devm allocated memory */ +} +EXPORT_SYMBOL(ptn3460_destroy); diff --git a/drivers/gpu/drm/drm_bridge.c b/drivers/gpu/drm/drm_bridge.c new file mode 100644 index 000..d1187e5 --- /dev/null +++ b/drivers/gpu/drm/drm_bridge.c @@ -0,0 +1,91 @@ +/* + *
[PATCH V8 02/14] drm/bridge: do not pass drm_bridge_funcs to drm_bridge_init
Assign the pointer to bridge ops structure(drm_bridge_funcs) in the bridge driver itself, instead of passing it to drm_bridge_init. This will allow bridge driver developer to pack bridge private information inside the bridge object and pass only the drm-relevant information to drm_bridge_init. Signed-off-by: Ajay Kumar ajaykumar...@samsung.com --- drivers/gpu/drm/bridge/ptn3460.c |3 ++- drivers/gpu/drm/drm_crtc.c |5 + drivers/gpu/drm/msm/hdmi/hdmi_bridge.c |3 ++- drivers/gpu/drm/sti/sti_hda.c |3 ++- drivers/gpu/drm/sti/sti_hdmi.c |3 ++- include/drm/drm_crtc.h |3 +-- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/bridge/ptn3460.c b/drivers/gpu/drm/bridge/ptn3460.c index 4db38e1..a2ddc8d 100644 --- a/drivers/gpu/drm/bridge/ptn3460.c +++ b/drivers/gpu/drm/bridge/ptn3460.c @@ -313,7 +313,8 @@ int ptn3460_init(struct drm_device *dev, struct drm_encoder *encoder, goto err; } - ret = drm_bridge_init(dev, ptn_bridge-bridge, ptn3460_bridge_funcs); + ptn_bridge-bridge.funcs = ptn3460_bridge_funcs; + ret = drm_bridge_init(dev, ptn_bridge-bridge); if (ret) { DRM_ERROR(Failed to initialize bridge with drm\n); goto err; diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c index e79c8d3..408c053 100644 --- a/drivers/gpu/drm/drm_crtc.c +++ b/drivers/gpu/drm/drm_crtc.c @@ -1011,7 +1011,6 @@ EXPORT_SYMBOL(drm_connector_unplug_all); * drm_bridge_init - initialize a drm transcoder/bridge * @dev: drm device * @bridge: transcoder/bridge to set up - * @funcs: bridge function table * * Initialises a preallocated bridge. Bridges should be * subclassed as part of driver connector objects. @@ -1019,8 +1018,7 @@ EXPORT_SYMBOL(drm_connector_unplug_all); * Returns: * Zero on success, error code on failure. */ -int drm_bridge_init(struct drm_device *dev, struct drm_bridge *bridge, - const struct drm_bridge_funcs *funcs) +int drm_bridge_init(struct drm_device *dev, struct drm_bridge *bridge) { int ret; @@ -1031,7 +1029,6 @@ int drm_bridge_init(struct drm_device *dev, struct drm_bridge *bridge, goto out; bridge-dev = dev; - bridge-funcs = funcs; list_add_tail(bridge-head, dev-mode_config.bridge_list); dev-mode_config.num_bridge++; diff --git a/drivers/gpu/drm/msm/hdmi/hdmi_bridge.c b/drivers/gpu/drm/msm/hdmi/hdmi_bridge.c index f6cf745..0309539 100644 --- a/drivers/gpu/drm/msm/hdmi/hdmi_bridge.c +++ b/drivers/gpu/drm/msm/hdmi/hdmi_bridge.c @@ -221,8 +221,9 @@ struct drm_bridge *hdmi_bridge_init(struct hdmi *hdmi) hdmi_bridge-hdmi = hdmi_reference(hdmi); bridge = hdmi_bridge-base; + bridge-funcs = hdmi_bridge_funcs; - drm_bridge_init(hdmi-dev, bridge, hdmi_bridge_funcs); + drm_bridge_init(hdmi-dev, bridge); return bridge; diff --git a/drivers/gpu/drm/sti/sti_hda.c b/drivers/gpu/drm/sti/sti_hda.c index 2ae9a9b..6cf145d 100644 --- a/drivers/gpu/drm/sti/sti_hda.c +++ b/drivers/gpu/drm/sti/sti_hda.c @@ -664,7 +664,8 @@ static int sti_hda_bind(struct device *dev, struct device *master, void *data) return -ENOMEM; bridge-driver_private = hda; - drm_bridge_init(drm_dev, bridge, sti_hda_bridge_funcs); + bridge-funcs = sti_hda_bridge_funcs; + drm_bridge_init(drm_dev, bridge); encoder-bridge = bridge; connector-encoder = encoder; diff --git a/drivers/gpu/drm/sti/sti_hdmi.c b/drivers/gpu/drm/sti/sti_hdmi.c index b22968c..285f723 100644 --- a/drivers/gpu/drm/sti/sti_hdmi.c +++ b/drivers/gpu/drm/sti/sti_hdmi.c @@ -628,7 +628,8 @@ static int sti_hdmi_bind(struct device *dev, struct device *master, void *data) return -ENOMEM; bridge-driver_private = hdmi; - drm_bridge_init(drm_dev, bridge, sti_hdmi_bridge_funcs); + bridge-funcs = sti_hdmi_bridge_funcs; + drm_bridge_init(drm_dev, bridge); encoder-bridge = bridge; connector-encoder = encoder; diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index c40070a..5a3bce17 100644 --- a/include/drm/drm_crtc.h +++ b/include/drm/drm_crtc.h @@ -912,8 +912,7 @@ extern unsigned int drm_connector_index(struct drm_connector *connector); /* helper to unplug all connectors from sysfs for device */ extern void drm_connector_unplug_all(struct drm_device *dev); -extern int drm_bridge_init(struct drm_device *dev, struct drm_bridge *bridge, - const struct drm_bridge_funcs *funcs); +extern int drm_bridge_init(struct drm_device *dev, struct drm_bridge *bridge); extern void drm_bridge_cleanup(struct drm_bridge *bridge); extern int drm_encoder_init(struct drm_device *dev, -- 1.7.9.5 -- To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in the body of a message to
[PATCH V8 13/14] ARM: dts: snow: represent the connection between bridge and panel using videoport and endpoints
Define videoports and use endpoints to describe the connection between the encoder, bridge and the panel, instead of using phandles. Signed-off-by: Ajay Kumar ajaykumar...@samsung.com --- arch/arm/boot/dts/exynos5250-snow.dts | 30 -- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/arch/arm/boot/dts/exynos5250-snow.dts b/arch/arm/boot/dts/exynos5250-snow.dts index e51fcef..877117f 100644 --- a/arch/arm/boot/dts/exynos5250-snow.dts +++ b/arch/arm/boot/dts/exynos5250-snow.dts @@ -254,7 +254,20 @@ powerdown-gpios = gpy2 5 GPIO_ACTIVE_HIGH; reset-gpios = gpx1 5 GPIO_ACTIVE_HIGH; edid-emulation = 5; - panel = panel; + + ports { + port@0 { + bridge_out: endpoint { + remote-endpoint = panel_in; + }; + }; + + port@1 { + bridge_in: endpoint { + remote-endpoint = dp_out; + }; + }; + }; }; }; @@ -328,6 +341,12 @@ compatible = auo,b116xw03; power-supply = fet6; backlight = backlight; + + port { + panel_in: endpoint { + remote-endpoint = bridge_out; + }; + }; }; dp-controller@145B { @@ -341,7 +360,14 @@ samsung,link-rate = 0x0a; samsung,lane-count = 2; samsung,hpd-gpio = gpx0 7 0; - bridge = ptn3460; + + ports { + port@0 { + dp_out: endpoint { + remote-endpoint = bridge_in; + }; + }; + }; }; }; -- 1.7.9.5 -- To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH V8 08/14] drm/bridge: ptn3460: use gpiod interface
Modify driver to support gpiod interface. Signed-off-by: Ajay Kumar ajaykumar...@samsung.com --- drivers/gpu/drm/bridge/ptn3460.c | 88 -- 1 file changed, 36 insertions(+), 52 deletions(-) diff --git a/drivers/gpu/drm/bridge/ptn3460.c b/drivers/gpu/drm/bridge/ptn3460.c index 9f800a1..826833e 100644 --- a/drivers/gpu/drm/bridge/ptn3460.c +++ b/drivers/gpu/drm/bridge/ptn3460.c @@ -42,8 +42,8 @@ struct ptn3460_bridge { struct drm_bridge bridge; struct edid *edid; struct drm_panel *panel; - int gpio_pd_n; - int gpio_rst_n; + struct gpio_desc *gpio_pd_n; + struct gpio_desc *gpio_rst_n; u32 edid_emulation; bool enabled; }; @@ -132,14 +132,11 @@ static void ptn3460_pre_enable(struct drm_bridge *bridge) if (ptn_bridge-enabled) return; - if (gpio_is_valid(ptn_bridge-gpio_pd_n)) - gpio_set_value(ptn_bridge-gpio_pd_n, 1); + gpiod_set_value(ptn_bridge-gpio_pd_n, 1); - if (gpio_is_valid(ptn_bridge-gpio_rst_n)) { - gpio_set_value(ptn_bridge-gpio_rst_n, 0); - usleep_range(10, 20); - gpio_set_value(ptn_bridge-gpio_rst_n, 1); - } + gpiod_set_value(ptn_bridge-gpio_rst_n, 0); + usleep_range(10, 20); + gpiod_set_value(ptn_bridge-gpio_rst_n, 1); if (drm_panel_prepare(ptn_bridge-panel)) { DRM_ERROR(failed to prepare panel\n); @@ -184,11 +181,8 @@ static void ptn3460_disable(struct drm_bridge *bridge) return; } - if (gpio_is_valid(ptn_bridge-gpio_rst_n)) - gpio_set_value(ptn_bridge-gpio_rst_n, 1); - - if (gpio_is_valid(ptn_bridge-gpio_pd_n)) - gpio_set_value(ptn_bridge-gpio_pd_n, 0); + gpiod_set_value(ptn_bridge-gpio_rst_n, 1); + gpiod_set_value(ptn_bridge-gpio_pd_n, 0); } static void ptn3460_post_disable(struct drm_bridge *bridge) @@ -335,39 +329,41 @@ static int ptn3460_probe(struct i2c_client *client, } ptn_bridge-client = client; - ptn_bridge-gpio_pd_n = of_get_named_gpio(dev-of_node, - powerdown-gpio, 0); - if (gpio_is_valid(ptn_bridge-gpio_pd_n)) { - ret = gpio_request_one(ptn_bridge-gpio_pd_n, - GPIOF_OUT_INIT_HIGH, PTN3460_PD_N); - if (ret) { - dev_err(dev, Request powerdown-gpio failed (%d)\n, - ret); - return ret; - } + + ptn_bridge-gpio_pd_n = devm_gpiod_get(client-dev, powerdown); + if (IS_ERR(ptn_bridge-gpio_pd_n)) { + ret = PTR_ERR(ptn_bridge-gpio_pd_n); + dev_err(dev, cannot get gpio_pd_n %d\n, ret); + return ret; } - ptn_bridge-gpio_rst_n = of_get_named_gpio(dev-of_node, - reset-gpio, 0); - if (gpio_is_valid(ptn_bridge-gpio_rst_n)) { - /* -* Request the reset pin low to avoid the bridge being -* initialized prematurely -*/ - ret = gpio_request_one(ptn_bridge-gpio_rst_n, - GPIOF_OUT_INIT_LOW, PTN3460_RST_N); - if (ret) { - dev_err(dev, Request reset-gpio failed (%d)\n, ret); - gpio_free(ptn_bridge-gpio_pd_n); - return ret; - } + ret = gpiod_direction_output(ptn_bridge-gpio_pd_n, 1); + if (ret) { + DRM_ERROR(cannot configure gpio_pd_n\n); + return ret; + } + + ptn_bridge-gpio_rst_n = devm_gpiod_get(client-dev, reset); + if (IS_ERR(ptn_bridge-gpio_rst_n)) { + ret = PTR_ERR(ptn_bridge-gpio_rst_n); + DRM_ERROR(cannot get gpio_rst_n %d\n, ret); + return ret; + } + /* +* Request the reset pin low to avoid the bridge being +* initialized prematurely +*/ + ret = gpiod_direction_output(ptn_bridge-gpio_rst_n, 0); + if (ret) { + DRM_ERROR(cannot configure gpio_rst_n\n); + return ret; } ret = of_property_read_u32(dev-of_node, edid-emulation, ptn_bridge-edid_emulation); if (ret) { dev_err(dev, Can't read EDID emulation value\n); - goto err; + return ret; } ptn_bridge-bridge.funcs = ptn3460_bridge_funcs; @@ -375,19 +371,12 @@ static int ptn3460_probe(struct i2c_client *client, ret = drm_bridge_add(ptn_bridge-bridge); if (ret) { DRM_ERROR(Failed to add bridge\n); - goto err; + return ret; } i2c_set_clientdata(client, ptn_bridge); return
[PATCH V8 11/14] Documentation: bridge: Add documentation for ps8622 DT properties
Add documentation for DT properties supported by ps8622/ps8625 eDP-LVDS converter. Signed-off-by: Ajay Kumar ajaykumar...@samsung.com --- .../devicetree/bindings/video/bridge/ps8622.txt| 31 1 file changed, 31 insertions(+) create mode 100644 Documentation/devicetree/bindings/video/bridge/ps8622.txt diff --git a/Documentation/devicetree/bindings/video/bridge/ps8622.txt b/Documentation/devicetree/bindings/video/bridge/ps8622.txt new file mode 100644 index 000..c989c38 --- /dev/null +++ b/Documentation/devicetree/bindings/video/bridge/ps8622.txt @@ -0,0 +1,31 @@ +ps8622-bridge bindings + +Required properties: + - compatible: parade,ps8622 or parade,ps8625 + - reg: first i2c address of the bridge + - sleep-gpios: OF device-tree gpio specification for PD_ pin. + - reset-gpios: OF device-tree gpio specification for RST_ pin. + +Optional properties: + - lane-count: number of DP lanes to use + - use-external-pwm: backlight will be controlled by an external PWM + - video interfaces: Device node can contain video interface port + nodes for panel according to [1]. + +[1]: Documentation/devicetree/bindings/media/video-interfaces.txt + +Example: + lvds-bridge@48 { + compatible = parade,ps8622; + reg = 0x48; + sleep-gpios = gpc3 6 1 0 0; + reset-gpios = gpc3 1 1 0 0; + lane-count = 1; + ports { + port@0 { + bridge_out: endpoint { + remote-endpoint = panel_in; + }; + }; + }; + }; -- 1.7.9.5 -- To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH V8 07/14] drm/bridge: ptn3460: probe connector at the end of bridge attach
Force bridge connector detection at the end of the bridge attach. This is needed to detect the bridge connector early. Signed-off-by: Ajay Kumar ajaykumar...@samsung.com --- drivers/gpu/drm/bridge/ptn3460.c |3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/bridge/ptn3460.c b/drivers/gpu/drm/bridge/ptn3460.c index e6d5ae7..9f800a1 100644 --- a/drivers/gpu/drm/bridge/ptn3460.c +++ b/drivers/gpu/drm/bridge/ptn3460.c @@ -281,6 +281,7 @@ int ptn3460_bridge_attach(struct drm_bridge *bridge) return -ENODEV; } + ptn_bridge-connector.polled = DRM_CONNECTOR_POLL_HPD; ret = drm_connector_init(bridge-dev, ptn_bridge-connector, ptn3460_connector_funcs, DRM_MODE_CONNECTOR_LVDS); if (ret) { @@ -296,6 +297,8 @@ int ptn3460_bridge_attach(struct drm_bridge *bridge) if (ptn_bridge-panel) drm_panel_attach(ptn_bridge-panel, ptn_bridge-connector); + drm_helper_hpd_irq_event(ptn_bridge-connector.dev); + return ret; } -- 1.7.9.5 -- To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH V8 09/14] Documentation: drm: bridge: move to video/bridge
Move drm/bridge documentation to video/bridge. Also, add proper documentation for gpios used by ptn3460. Signed-off-by: Ajay Kumar ajaykumar...@samsung.com --- .../devicetree/bindings/drm/bridge/ptn3460.txt | 39 .../devicetree/bindings/video/bridge/ptn3460.txt | 39 2 files changed, 39 insertions(+), 39 deletions(-) delete mode 100644 Documentation/devicetree/bindings/drm/bridge/ptn3460.txt create mode 100644 Documentation/devicetree/bindings/video/bridge/ptn3460.txt diff --git a/Documentation/devicetree/bindings/drm/bridge/ptn3460.txt b/Documentation/devicetree/bindings/drm/bridge/ptn3460.txt deleted file mode 100644 index 663fe6c..000 --- a/Documentation/devicetree/bindings/drm/bridge/ptn3460.txt +++ /dev/null @@ -1,39 +0,0 @@ -ptn3460 bridge bindings - -Required properties: - - compatible: nxp,ptn3460 - - reg: i2c address of the bridge - - powerdown-gpio: OF device-tree gpio specification - - reset-gpio: OF device-tree gpio specification - - edid-emulation: The EDID emulation entry to use - +---++--+ - | Value | Resolution | Description | - | 0 | 1024x768 | NXP Generic | - | 1 | 1920x1080 | NXP Generic | - | 2 | 1920x1080 | NXP Generic | - | 3 | 1600x900 | Samsung LTM200KT | - | 4 | 1920x1080 | Samsung LTM230HT | - | 5 | 1366x768 | NXP Generic | - | 6 | 1600x900 | ChiMei M215HGE | - +---++--+ - - - video interfaces: Device node can contain video interface port - nodes for panel according to [1]. - -[1]: Documentation/devicetree/bindings/media/video-interfaces.txt - -Example: - lvds-bridge@20 { - compatible = nxp,ptn3460; - reg = 0x20; - powerdown-gpio = gpy2 5 1 0 0; - reset-gpio = gpx1 5 1 0 0; - edid-emulation = 5; - ports { - port@0 { - bridge_out: endpoint { - remote-endpoint = panel_in; - }; - }; - }; - }; diff --git a/Documentation/devicetree/bindings/video/bridge/ptn3460.txt b/Documentation/devicetree/bindings/video/bridge/ptn3460.txt new file mode 100644 index 000..361971b --- /dev/null +++ b/Documentation/devicetree/bindings/video/bridge/ptn3460.txt @@ -0,0 +1,39 @@ +ptn3460 bridge bindings + +Required properties: + - compatible: nxp,ptn3460 + - reg: i2c address of the bridge + - powerdown-gpio: OF device-tree gpio specification for PD_N pin. + - reset-gpio: OF device-tree gpio specification for RST_N pin. + - edid-emulation: The EDID emulation entry to use + +---++--+ + | Value | Resolution | Description | + | 0 | 1024x768 | NXP Generic | + | 1 | 1920x1080 | NXP Generic | + | 2 | 1920x1080 | NXP Generic | + | 3 | 1600x900 | Samsung LTM200KT | + | 4 | 1920x1080 | Samsung LTM230HT | + | 5 | 1366x768 | NXP Generic | + | 6 | 1600x900 | ChiMei M215HGE | + +---++--+ + + - video interfaces: Device node can contain video interface port + nodes for panel according to [1]. + +[1]: Documentation/devicetree/bindings/media/video-interfaces.txt + +Example: + lvds-bridge@20 { + compatible = nxp,ptn3460; + reg = 0x20; + powerdown-gpio = gpy2 5 1 0 0; + reset-gpio = gpx1 5 1 0 0; + edid-emulation = 5; + ports { + port@0 { + bridge_out: endpoint { + remote-endpoint = panel_in; + }; + }; + }; + }; -- 1.7.9.5 -- To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH V8 14/14] ARM: dts: peach-pit: represent the connection between bridge and panel using videoport and endpoints
Define videoports and use endpoints to describe the connection between the encoder, bridge and the panel, instead of using phandles. Signed-off-by: Ajay Kumar ajaykumar...@samsung.com --- arch/arm/boot/dts/exynos5420-peach-pit.dts | 31 ++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/arch/arm/boot/dts/exynos5420-peach-pit.dts b/arch/arm/boot/dts/exynos5420-peach-pit.dts index 82cdb74..9d06aef 100644 --- a/arch/arm/boot/dts/exynos5420-peach-pit.dts +++ b/arch/arm/boot/dts/exynos5420-peach-pit.dts @@ -107,6 +107,12 @@ compatible = auo,b116xw03; power-supply = tps65090_fet6; backlight = backlight; + + port { + panel_in: endpoint { + remote-endpoint = bridge_out; + }; + }; }; }; @@ -126,7 +132,14 @@ samsung,link-rate = 0x06; samsung,lane-count = 2; samsung,hpd-gpio = gpx2 6 0; - bridge = ps8625; + + ports { + port@0 { + dp_out: endpoint { + remote-endpoint = bridge_in; + }; + }; + }; }; fimd { @@ -504,8 +517,22 @@ sleep-gpios = gpx3 5 GPIO_ACTIVE_HIGH; reset-gpios = gpy7 7 GPIO_ACTIVE_HIGH; lane-count = 2; - panel = panel; use-external-pwm; + + ports { + port@0 { + bridge_out: endpoint { + remote-endpoint = panel_in; + }; + }; + + port@1 { + bridge_in: endpoint { + remote-endpoint = dp_out; + }; + }; + }; + }; }; -- 1.7.9.5 -- To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH V8 10/14] Documentation: devicetree: Add vendor prefix for parade
ps8622 eDP-LVDS converter bridge chip is from parade technologies Signed-off-by: Ajay Kumar ajaykumar...@samsung.com --- .../devicetree/bindings/vendor-prefixes.txt|1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt index 723999d..0be1508 100644 --- a/Documentation/devicetree/bindings/vendor-prefixes.txt +++ b/Documentation/devicetree/bindings/vendor-prefixes.txt @@ -110,6 +110,7 @@ nxp NXP Semiconductors onnn ON Semiconductor Corp. opencores OpenCores.org panasonic Panasonic Corporation +parade Parade Technologies Inc. phytec PHYTEC Messtechnik GmbH picochip Picochip Ltd plathome Plat'Home Co., Ltd. -- 1.7.9.5 -- To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH V8 05/14] drm/exynos: dp: support drm_bridge
Modify driver to support drm_bridge. Signed-off-by: Ajay Kumar ajaykumar...@samsung.com --- .../devicetree/bindings/video/exynos_dp.txt| 12 +++ drivers/gpu/drm/exynos/exynos_dp_core.c| 37 drivers/gpu/drm/exynos/exynos_dp_core.h|1 + 3 files changed, 44 insertions(+), 6 deletions(-) diff --git a/Documentation/devicetree/bindings/video/exynos_dp.txt b/Documentation/devicetree/bindings/video/exynos_dp.txt index 53dbccf..7a3a9cd 100644 --- a/Documentation/devicetree/bindings/video/exynos_dp.txt +++ b/Documentation/devicetree/bindings/video/exynos_dp.txt @@ -66,6 +66,10 @@ Optional properties for dp-controller: Hotplug detect GPIO. Indicates which GPIO should be used for hotplug detection + -video interfaces: Device node can contain video interface port + nodes according to [1]. + +[1]: Documentation/devicetree/bindings/media/video-interfaces.txt Example: @@ -105,4 +109,12 @@ Board Specific portion: vsync-len = 6; }; }; + + ports { + port@0 { + dp_out: endpoint { + remote-endpoint = bridge_in; + }; + }; + }; }; diff --git a/drivers/gpu/drm/exynos/exynos_dp_core.c b/drivers/gpu/drm/exynos/exynos_dp_core.c index 5025b70..d30c748 100644 --- a/drivers/gpu/drm/exynos/exynos_dp_core.c +++ b/drivers/gpu/drm/exynos/exynos_dp_core.c @@ -18,6 +18,7 @@ #include linux/interrupt.h #include linux/of.h #include linux/of_gpio.h +#include linux/of_graph.h #include linux/gpio.h #include linux/component.h #include linux/phy/phy.h @@ -989,9 +990,19 @@ static struct drm_connector_helper_funcs exynos_dp_connector_helper_funcs = { }; /* returns the number of bridges attached */ -static int exynos_drm_attach_lcd_bridge(struct drm_device *dev, +static int exynos_drm_attach_lcd_bridge(struct exynos_dp_device *dp, struct drm_encoder *encoder) { + int ret; + + encoder-bridge = dp-bridge; + dp-bridge-encoder = encoder; + ret = drm_bridge_attach(encoder-dev, dp-bridge); + if (ret) { + DRM_ERROR(Failed to attach bridge to drm\n); + return ret; + } + return 0; } @@ -1005,9 +1016,11 @@ static int exynos_dp_create_connector(struct exynos_drm_display *display, dp-encoder = encoder; /* Pre-empt DP connector creation if there's a bridge */ - ret = exynos_drm_attach_lcd_bridge(dp-drm_dev, encoder); - if (ret) - return 0; + if (dp-bridge) { + ret = exynos_drm_attach_lcd_bridge(dp, encoder); + if (!ret) + return 0; + } connector-polled = DRM_CONNECTOR_POLL_HPD; @@ -1259,7 +1272,7 @@ static int exynos_dp_bind(struct device *dev, struct device *master, void *data) if (ret) return ret; - if (!dp-panel) { + if (!dp-panel !dp-bridge) { ret = exynos_dp_dt_parse_panel(dp); if (ret) return ret; @@ -1345,7 +1358,7 @@ static const struct component_ops exynos_dp_ops = { static int exynos_dp_probe(struct platform_device *pdev) { struct device *dev = pdev-dev; - struct device_node *panel_node; + struct device_node *panel_node, *bridge_node, *endpoint; struct exynos_dp_device *dp; int ret; @@ -1367,6 +1380,18 @@ static int exynos_dp_probe(struct platform_device *pdev) return -EPROBE_DEFER; } + endpoint = of_graph_get_next_endpoint(dev-of_node, NULL); + if (endpoint) { + bridge_node = of_graph_get_remote_port_parent(endpoint); + if (bridge_node) { + dp-bridge = of_drm_find_bridge(bridge_node); + of_node_put(bridge_node); + if (!dp-bridge) + return -EPROBE_DEFER; + } else + return -EPROBE_DEFER; + } + exynos_dp_display.ctx = dp; ret = component_add(pdev-dev, exynos_dp_ops); diff --git a/drivers/gpu/drm/exynos/exynos_dp_core.h b/drivers/gpu/drm/exynos/exynos_dp_core.h index a1aee69..3b0ba93 100644 --- a/drivers/gpu/drm/exynos/exynos_dp_core.h +++ b/drivers/gpu/drm/exynos/exynos_dp_core.h @@ -150,6 +150,7 @@ struct exynos_dp_device { struct drm_connectorconnector; struct drm_encoder *encoder; struct drm_panel*panel; + struct drm_bridge *bridge; struct clk *clock; unsigned intirq; void __iomem*reg_base; -- 1.7.9.5 -- To unsubscribe from this list: send the line
[PATCH V8 12/14] drm/bridge: Add i2c based driver for ps8622/ps8625 bridge
From: Vincent Palatin vpala...@chromium.org This patch adds drm_bridge driver for parade DisplayPort to LVDS bridge chip. Signed-off-by: Vincent Palatin vpala...@chromium.org Signed-off-by: Andrew Bresticker abres...@chromium.org Signed-off-by: Sean Paul seanp...@chromium.org Signed-off-by: Rahul Sharma rahul.sha...@samsung.com Signed-off-by: Ajay Kumar ajaykumar...@samsung.com --- drivers/gpu/drm/bridge/Kconfig |9 + drivers/gpu/drm/bridge/Makefile |1 + drivers/gpu/drm/bridge/ps8622.c | 684 +++ 3 files changed, 694 insertions(+) create mode 100644 drivers/gpu/drm/bridge/ps8622.c diff --git a/drivers/gpu/drm/bridge/Kconfig b/drivers/gpu/drm/bridge/Kconfig index 8b426e2..d06eda3 100644 --- a/drivers/gpu/drm/bridge/Kconfig +++ b/drivers/gpu/drm/bridge/Kconfig @@ -6,3 +6,12 @@ config DRM_PTN3460 select DRM_PANEL ---help--- ptn3460 eDP-LVDS bridge chip driver. + +config DRM_PS8622 + tristate Parade eDP/LVDS bridge + depends on OF I2C + select DRM_PANEL + select BACKLIGHT_LCD_SUPPORT + select BACKLIGHT_CLASS_DEVICE + ---help--- + parade eDP-LVDS bridge chip driver. diff --git a/drivers/gpu/drm/bridge/Makefile b/drivers/gpu/drm/bridge/Makefile index b4733e1..105da3e 100644 --- a/drivers/gpu/drm/bridge/Makefile +++ b/drivers/gpu/drm/bridge/Makefile @@ -1,3 +1,4 @@ ccflags-y := -Iinclude/drm +obj-$(CONFIG_DRM_PS8622) += ps8622.o obj-$(CONFIG_DRM_PTN3460) += ptn3460.o diff --git a/drivers/gpu/drm/bridge/ps8622.c b/drivers/gpu/drm/bridge/ps8622.c new file mode 100644 index 000..5474a39 --- /dev/null +++ b/drivers/gpu/drm/bridge/ps8622.c @@ -0,0 +1,684 @@ +/* + * Parade PS8622 eDP/LVDS bridge driver + * + * Copyright (C) 2014 Google, Inc. + * + * This software is licensed under the terms of the GNU General Public + * License version 2, as published by the Free Software Foundation, and + * may be copied, distributed, and modified under those terms. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include linux/backlight.h +#include linux/delay.h +#include linux/err.h +#include linux/fb.h +#include linux/gpio.h +#include linux/i2c.h +#include linux/module.h +#include linux/of.h +#include linux/of_device.h +#include linux/of_graph.h +#include linux/pm.h +#include linux/regulator/consumer.h + +#include drm/drm_panel.h + +#include drmP.h +#include drm_crtc.h +#include drm_crtc_helper.h + +/* Brightness scale on the Parade chip */ +#define PS8622_MAX_BRIGHTNESS 0xff + +/* Timings taken from the version 1.7 datasheet for the PS8622/PS8625 */ +#define PS8622_POWER_RISE_T1_MIN_US 10 +#define PS8622_POWER_RISE_T1_MAX_US 1 +#define PS8622_RST_HIGH_T2_MIN_US 3000 +#define PS8622_RST_HIGH_T2_MAX_US 3 +#define PS8622_PWMO_END_T12_MS 200 +#define PS8622_POWER_FALL_T16_MAX_US 1 +#define PS8622_POWER_OFF_T17_MS 500 + +#if ((PS8622_RST_HIGH_T2_MIN_US + PS8622_POWER_RISE_T1_MAX_US) \ + (PS8622_RST_HIGH_T2_MAX_US + PS8622_POWER_RISE_T1_MIN_US)) +#error T2.min + T1.max must be less than T2.max + T1.min +#endif + +struct ps8622_bridge { + struct drm_connector connector; + struct i2c_client *client; + struct drm_bridge bridge; + struct drm_panel *panel; + struct regulator *v12; + struct backlight_device *bl; + + struct gpio_desc *gpio_slp; + struct gpio_desc *gpio_rst; + + u32 max_lane_count; + u32 lane_count; + + bool enabled; +}; + +static inline struct ps8622_bridge * + bridge_to_ps8622(struct drm_bridge *bridge) +{ + return container_of(bridge, struct ps8622_bridge, bridge); +} + +static inline struct ps8622_bridge * + connector_to_ps8622(struct drm_connector *connector) +{ + return container_of(connector, struct ps8622_bridge, connector); +} + +static int ps8622_set(struct i2c_client *client, u8 page, u8 reg, u8 val) +{ + int ret; + struct i2c_adapter *adap = client-adapter; + struct i2c_msg msg; + u8 data[] = {reg, val}; + + msg.addr = client-addr + page; + msg.flags = 0; + msg.len = sizeof(data); + msg.buf = data; + + ret = i2c_transfer(adap, msg, 1); + if (ret != 1) + pr_warn(PS8622 I2C write (0x%02x,0x%02x,0x%02x) failed: %d\n, + client-addr + page, reg, val, ret); + return !(ret == 1); +} + +static int ps8622_send_config(struct ps8622_bridge *ps8622) +{ + struct i2c_client *cl = ps8622-client; + int err = 0; + + /* HPD low */ + err = ps8622_set(cl, 0x02, 0xa1, 0x01); + if (err) + goto error; + + /* SW setting: [1:0] SW output 1.2V voltage is lower to 96% */ + err = ps8622_set(cl, 0x04, 0x14, 0x01); + if
[PATCH V8 06/14] drm/bridge: ptn3460: support drm_panel
Add drm_panel calls to the driver to make the panel and bridge work together in tandem. Signed-off-by: Ajay Kumar ajaykumar...@samsung.com --- .../devicetree/bindings/drm/bridge/ptn3460.txt | 12 ++ drivers/gpu/drm/bridge/Kconfig |1 + drivers/gpu/drm/bridge/ptn3460.c | 42 3 files changed, 55 insertions(+) diff --git a/Documentation/devicetree/bindings/drm/bridge/ptn3460.txt b/Documentation/devicetree/bindings/drm/bridge/ptn3460.txt index 52b93b2..663fe6c 100644 --- a/Documentation/devicetree/bindings/drm/bridge/ptn3460.txt +++ b/Documentation/devicetree/bindings/drm/bridge/ptn3460.txt @@ -17,6 +17,11 @@ Required properties: | 6 | 1600x900 | ChiMei M215HGE | +---++--+ + - video interfaces: Device node can contain video interface port + nodes for panel according to [1]. + +[1]: Documentation/devicetree/bindings/media/video-interfaces.txt + Example: lvds-bridge@20 { compatible = nxp,ptn3460; @@ -24,4 +29,11 @@ Example: powerdown-gpio = gpy2 5 1 0 0; reset-gpio = gpx1 5 1 0 0; edid-emulation = 5; + ports { + port@0 { + bridge_out: endpoint { + remote-endpoint = panel_in; + }; + }; + }; }; diff --git a/drivers/gpu/drm/bridge/Kconfig b/drivers/gpu/drm/bridge/Kconfig index 4254c2b..8b426e2 100644 --- a/drivers/gpu/drm/bridge/Kconfig +++ b/drivers/gpu/drm/bridge/Kconfig @@ -3,5 +3,6 @@ config DRM_PTN3460 depends on DRM depends on OF I2C select DRM_KMS_HELPER + select DRM_PANEL ---help--- ptn3460 eDP-LVDS bridge chip driver. diff --git a/drivers/gpu/drm/bridge/ptn3460.c b/drivers/gpu/drm/bridge/ptn3460.c index 7adeb60..e6d5ae7 100644 --- a/drivers/gpu/drm/bridge/ptn3460.c +++ b/drivers/gpu/drm/bridge/ptn3460.c @@ -19,6 +19,9 @@ #include linux/module.h #include linux/of.h #include linux/of_gpio.h +#include linux/of_graph.h + +#include drm/drm_panel.h #include bridge/ptn3460.h @@ -38,6 +41,7 @@ struct ptn3460_bridge { struct i2c_client *client; struct drm_bridge bridge; struct edid *edid; + struct drm_panel *panel; int gpio_pd_n; int gpio_rst_n; u32 edid_emulation; @@ -137,6 +141,11 @@ static void ptn3460_pre_enable(struct drm_bridge *bridge) gpio_set_value(ptn_bridge-gpio_rst_n, 1); } + if (drm_panel_prepare(ptn_bridge-panel)) { + DRM_ERROR(failed to prepare panel\n); + return; + } + /* * There's a bug in the PTN chip where it falsely asserts hotplug before * it is fully functional. We're forced to wait for the maximum start up @@ -153,6 +162,12 @@ static void ptn3460_pre_enable(struct drm_bridge *bridge) static void ptn3460_enable(struct drm_bridge *bridge) { + struct ptn3460_bridge *ptn_bridge = bridge_to_ptn3460(bridge); + + if (drm_panel_enable(ptn_bridge-panel)) { + DRM_ERROR(failed to enable panel\n); + return; + } } static void ptn3460_disable(struct drm_bridge *bridge) @@ -164,6 +179,11 @@ static void ptn3460_disable(struct drm_bridge *bridge) ptn_bridge-enabled = false; + if (drm_panel_disable(ptn_bridge-panel)) { + DRM_ERROR(failed to disable panel\n); + return; + } + if (gpio_is_valid(ptn_bridge-gpio_rst_n)) gpio_set_value(ptn_bridge-gpio_rst_n, 1); @@ -173,6 +193,12 @@ static void ptn3460_disable(struct drm_bridge *bridge) static void ptn3460_post_disable(struct drm_bridge *bridge) { + struct ptn3460_bridge *ptn_bridge = bridge_to_ptn3460(bridge); + + if (drm_panel_unprepare(ptn_bridge-panel)) { + DRM_ERROR(failed to unprepare panel\n); + return; + } } static int ptn3460_get_modes(struct drm_connector *connector) @@ -267,6 +293,9 @@ int ptn3460_bridge_attach(struct drm_bridge *bridge) drm_mode_connector_attach_encoder(ptn_bridge-connector, bridge-encoder); + if (ptn_bridge-panel) + drm_panel_attach(ptn_bridge-panel, ptn_bridge-connector); + return ret; } @@ -283,6 +312,7 @@ static int ptn3460_probe(struct i2c_client *client, { struct device *dev = client-dev; struct ptn3460_bridge *ptn_bridge; + struct device_node *endpoint, *panel_node; int ret; ptn_bridge = devm_kzalloc(dev, sizeof(*ptn_bridge), GFP_KERNEL); @@ -290,6 +320,17 @@ static int ptn3460_probe(struct i2c_client *client, return -ENOMEM; } + endpoint =
Re: [PATCH] PM / Domains: Change prototype for the -attach_dev() callback
Hi Rafael, On Sat, Nov 15, 2014 at 12:48 AM, Rafael J. Wysocki r...@rjwysocki.net wrote: Subject: [PATCH] PM / Domains: Change prototype for the attach and detach callbacks Convert the prototypes to return an int in order to support error handling in these callbacks. Also, as suggested by Dmitry Torokhov, pass the domain pointer for use inside the callbacks, and so that they match the existing power_on/power_off callbacks which currently take the domain pointer. Acked-by: Dmitry Torokhov dmitry.torok...@gmail.com [khilman: added domain as parameter to callbacks, as suggested by Dmitry] Signed-off-by: Ulf Hansson ulf.hans...@linaro.org Signed-off-by: Kevin Hilman khil...@linaro.org That's in the Linus' tree now. Thank you very much. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say programmer or something like that. -- Linus Torvalds -- To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: exynos5250/arndale: failed to set cpu voltage
Hi Abhilash, On 13 November 2014 18:50, Abhilash Kesavan kesavan.abhil...@gmail.com wrote: Hello Tyler, On Fri, Nov 14, 2014 at 3:30 AM, Tyler Baker tyler.ba...@linaro.org wrote: In recent upstream kernels, exynos5420-based arndale boards have been Boot logs are only for 5250, typo ? Apologies, this is a typo. Should have been 5250 as you mentioned. producing boot-time errors due to the fact they failed to set the cpu voltage. These message flood the serial console even after userspace has been loaded, yielding the console unusable without forcing a lower log level. These errors are produced _only_ with the multi_v7_defconfig and they are _not_ present with exynos_defconfig. Here are some recent boot logs showing the boot errors: mainline/v3.18-rc4-65-g2c54396: multi_v7_defconfig: http://storage.armcloud.us/kernel-ci/mainline/v3.18-rc4-65-g2c54396/arm-multi_v7_defconfig/boot-exynos5250-arndale.html exynos_defconfig: http://storage.armcloud.us/kernel-ci/mainline/v3.18-rc4-65-g2c54396/arm-exynos_defconfig/boot-exynos5250-arndale.html From the boot logs it appears that the S5M8767 regulator does not get probed with multi_v7_defconfig and you get the following messages: [1.147412] deviceless supply vdd_arm not found, using dummy regulator [1.152669] exynos-cpufreq exynos-cpufreq: failed to set cpu voltage to 130 [1.159771] cpufreq: __target_index: Failed to change cpu frequency: -22 Both multi_v7_defconfig and exynos_defconfig have the S5M8767 regulator enabled. However multi_v7_defconfig does not have the S3C I2C controller enabled while exynos_defconfig does. Can you re-check after enabling CONFIG_I2C_S3C2410 ? I have retested my two arndale boards with multi_v7_defconfg+CONFIG_I2C_S3C2410=y on mainline, next, and arm-soc. Enabling S3C I2C controller does resolve the issue I have reported above. It seems reasonable to patch the multi_v7_defconfig to enable this option by default, thoughts? Regards, Abhilash next/next-20141113: multi_v7_defconfig: http://storage.armcloud.us/kernel-ci/next/next-20141113/arm-multi_v7_defconfig/boot-exynos5250-arndale.html exynos_defconfig: http://storage.armcloud.us/kernel-ci/next/next-20141113/arm-exynos_defconfig/boot-exynos5250-arndale.html arm-soc/v3.18-rc4-185-gbfcf8f9: multi_v7_defconfig: http://storage.armcloud.us/kernel-ci/arm-soc/v3.18-rc4-185-gbfcf8f9/arm-multi_v7_defconfig/boot-exynos5250-arndale.html exynos_defconfig: http://storage.armcloud.us/kernel-ci/arm-soc/v3.18-rc4-185-gbfcf8f9/arm-exynos_defconfig/boot-exynos5250-arndale.html Cheers, -- Tyler Baker Tech Lead, LAVA Linaro.org | Open source software for ARM SoCs Follow Linaro: http://www.facebook.com/pages/Linaro http://twitter.com/#!/linaroorg - http://www.linaro.org/linaro-blog ___ linux-arm-kernel mailing list linux-arm-ker...@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel Cheers, -- Tyler Baker Tech Lead, LAVA Linaro.org | Open source software for ARM SoCs Follow Linaro: http://www.facebook.com/pages/Linaro http://twitter.com/#!/linaroorg - http://www.linaro.org/linaro-blog -- To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2 00/33] thermal: exynos: convert the driver to use per-SoC type operations
Hello Bartlomiej, On Thu, Nov 13, 2014 at 04:00:55PM +0100, Bartlomiej Zolnierkiewicz wrote: Hi, This patch series replaces the hardware registers abstractions in the Exynos thermal driver by the usage of per-SoC type operations. Good! I think the driver is a bit confusing because it has two ways of checking features: soc based and feature flag based. Thus, removing one is a good step. Such solution provides simpler, easier to understand code and Well, that is arguable. IMO, the feature based solution is naturally easier to understand as while reading the code, you think about the feature not about chip / IP/ SoC versions. Besides, having soc based approach spreads many if's in your code base. Anyways, so far no one working in the Exynos code base has nacked your proposal. Apart from that, the issue I had with it, as I mentioned, was the fact that it currently has two ways of representing / checking features. That is for sure the major issue. allows removal of ~250 LOCs (~11% of the whole source code) from the driver. Some other driver improvements are now also possible thanks to these changes but are scheduled at later time (like consolidating code for clearing IRQs using INTCLEAR register). I am not sure I get your point here. I understand you are basing new changes in the code on top of this series, but I don't see how this refactoring could enable other feature implementions. The patchset should not cause any functionality changes. This means that unless there are some bugs in the patches itself there should be no behavior changes for the driver (this also includes lack of changes in the way hardware is accessed by the driver). All testing was done on (Exynos4412 SoC based) ODROID U3 board (some additional patches are needed to make the Exynos thermal driver work on this hardware). Is it possible to spread testing here? I would like to have coverage for all supported chip versions. The reasoning is because the driver supports more than Exynos4412, and the amount of changes are considerably big. One thing I can do is to start testing in linux-next on this code. Thus, I can merge it in my -next branch (which includes my -linus and -fixes branches). But so far, it would not be queued. My proposal is that these changes will be sent only for the 3.19 merge window though. For 3.18 -rc's I believe it is too late. However, to get it into 3.19, I request you to provide the testing in all supported chips, as I mentioned. Do you think it is doable before Linus opens 3.19 merge window? Depends on: - 'next' branch of linux-soc-thermal.git kernel tree from Eduardo Thanks for attending my request. Changes since v1 (https://lkml.org/lkml/2014/9/18/305): - rebased on top of the current linux-soc-thermal kernel Best regards, -- Bartlomiej Zolnierkiewicz Samsung RD Institute Poland Samsung Electronics Bartlomiej Zolnierkiewicz (33): thermal: exynos: remove needless triminfo_data abstraction thermal: exynos: remove needless tmu_status abstraction thermal: exynos: remove needless threshold_temp abstraction thermal: exynos: remove needless triminfo_ctrl abstraction thermal: exynos: remove needless test_mux_addr_shift abstraction thermal: exynos: remove needless therm_trip_[mode,mask]_shift abstractions thermal: exynos: remove needless therm_trip_en_shift abstraction thermal: exynos: remove needless emul_temp_shift abstraction thermal: exynos: remove needless emul_time_shift abstraction thermal: exynos: replace tmu_irqstatus check by Exynos5440 one thermal: exynos: replace tmu_pmin check by Exynos5440 one thermal: exynos: simplify HW_TRIP level setting thermal: exynos: replace threshold_falling check by Exynos SoC type one thermal: exynos: remove TMU_SUPPORT_READY_STATUS flag thermal: exynos: remove TMU_SUPPORT_TRIM_RELOAD flag thermal: exynos: add sanitize_temp_error() helper thermal: exynos: add get_th_reg() helper thermal: exynos: add -tmu_initialize method thermal: exynos: add get_con_reg() helper thermal: exynos: add -tmu_control method thermal: exynos: add -tmu_read method thermal: exynos: add get_emul_con_reg() helper thermal: exynos: add -tmu_set_emulation method thermal: exynos: add -tmu_clear_irqs method thermal: exynos: remove TMU_SUPPORT_FALLING_TRIP flag thermal: exynos: remove TMU_SUPPORT_EMUL_TIME flag thermal: exynos: remove TMU_SUPPORT_EMULATION flag thermal: exynos: remove TMU_SUPPORT_ADDRESS_MULTIPLE flag thermal: exynos: remove TMU_SUPPORT_MULTI_INST flag thermal: exynos: remove test_mux pdata field thermal: exynos: remove SoC type ifdefs thermal: exynos: remove __EXYNOS5420_TMU_DATA macro thermal: exynos: remove exynos_tmu_data.h include drivers/thermal/samsung/exynos_thermal_common.h | 1 - drivers/thermal/samsung/exynos_tmu.c| 692 drivers/thermal/samsung/exynos_tmu.h| 123
RE: [PATCH] ARM: dts: Explicitly set dr_mode on exynos5250-snow
Javier Martinez Canillas wrote: Hello Sjoerd, Hi, On Fri, Nov 14, 2014 at 8:46 PM, Sjoerd Simons sjoerd.sim...@collabora.co.uk wrote: Explicitly set the dr_mode for the dwc3 controller on the Snow board to host mode. This is required to ensure the controller is initialized in the right mode if the kernel is build with USB gadget support. The patch looks good to me. Reviewed-by: Javier Martinez Canillas javier.marti...@collabora.co.uk Kukjin, I think $subject is -rc material since this issue is seen after commit 508423b (ARM: exynos_defconfig: enable USB gadget support) which landed in 3.18. Yeah, you're right. I'll queue this into -fixes for 3.18. Thanks, Kukjin -- To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: [PATCH v8 0/7] Enable L2 cache support on Exynos4210/4x12 SoCs
Arnd Bergmann wrote: On Friday 14 November 2014 15:11:58 Marek Szyprowski wrote: I assume that after all comments from previous versions, no more changes are needed to this patchset and I would really like to have it queued to v3.19. Arnd, Olof: could you take this patchset thought arm-soc tree? It already contains all dependencies. Kukjin: could you ack this patchset? I'd rather see this merged through Russell's tree, as most of the patches are for core code, and only three are for the platform. For the exynos patches: Acked-by: Arnd Bergmann a...@arndb.de I'm also fine on this series for the exynos stuff: Acked-by: Kukjin Kim kgene@samsung.com And agree with Arnd's suggestion to handle in rmk tree. (I think seems this has no dependency with samsung tree) Thanks, Kukjin -- To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] serial: samsung: Fix serial config dependencies for exynos7
Hello Greg, On Tue, Nov 11, 2014 at 7:55 PM, Abhilash Kesavan kesavan.abhil...@gmail.com wrote: Hi Greg, On Tue, Sep 30, 2014 at 8:02 PM, Abhilash Kesavan kesavan.abhil...@gmail.com wrote: Hi Tomasz, On Tue, Sep 30, 2014 at 4:08 AM, Tomasz Figa tomasz.f...@gmail.com wrote: Hi Abhilash, The patch itself seems fine, but I wonder if those config options aren't really just leftovers from the past and couldn't be completely removed. On 29.09.2014 07:16, Abhilash Kesavan wrote: From: Pankaj Dubey pankaj.du...@samsung.com Exynos7 has a similar serial controller to that present in older Samsung SoCs. To re-use the existing serial driver on Exynos7 we need to have SERIAL_SAMSUNG_UARTS_4 and SERIAL_SAMSUNG_UARTS selected. This is not possible because these symbols are dependent on PLAT_SAMSUNG which is not present for the ARMv8 based exynos7. Change the dependency of these symbols from PLAT_SAMSUNG to the serial driver thus making it available on exynos7. As the existing platform specific code making use of these symbols is related to uart driver this change in dependency should not cause any issues. Signed-off-by: Pankaj Dubey pankaj.du...@samsung.com Signed-off-by: Naveen Krishna Chatradhi ch.nav...@samsung.com Signed-off-by: Abhilash Kesavan a.kesa...@samsung.com Cc: Greg Kroah-Hartman gre...@linuxfoundation.org --- Build tested with s3c6400_defconfig, exynos_defconfig and arm64's defconfig with and without the serial driver enabled. drivers/tty/serial/Kconfig |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/tty/serial/Kconfig b/drivers/tty/serial/Kconfig index 81f6ee7..e6c0bcb 100644 --- a/drivers/tty/serial/Kconfig +++ b/drivers/tty/serial/Kconfig @@ -249,14 +249,14 @@ config SERIAL_SAMSUNG config SERIAL_SAMSUNG_UARTS_4 bool - depends on PLAT_SAMSUNG + depends on SERIAL_SAMSUNG default y if !(CPU_S3C2410 || CPU_S3C2412 || CPU_S3C2440 || CPU_S3C2442) help Internal node for the common case of 4 Samsung compatible UARTs The only place where this symbol is used is below. config SERIAL_SAMSUNG_UARTS int - depends on PLAT_SAMSUNG + depends on SERIAL_SAMSUNG default 4 if SERIAL_SAMSUNG_UARTS_4 || CPU_S3C2416 default 3 help With this symbol the situation isn't that easy, but still should be manageable. Looking at the serial-samsung driver, all occurrences of CONFIG_SERIAL_SAMSUNG_UARTS could be simply replaced with a locally defined number equal to the maximum value - in this case 4. There are also two places in arch/arm where this symbol is used: 1) In arch/arm/mach-s3c64xx/irq-pm.c it's used as the number of serial ports which need suspend/resume handling. Since on s3c64xx the number is always 4, it can be simply defined locally as a constant. 2) In arch/arm/plat-samsung/init.c it is used to determine size of a static array of UART ports and to check whether the UART driver is enabled. In former case I believe it should be safe to hardcode it to 4 as well, in latter CONFIG_SERIAL_SAMSUNG can be used. I will post patches removing these two symbols. I posted a couple of patches handling Tomasz' comments but Kukjin prefers the approach in this patch (Discussion here: http://www.spinics.net/lists/linux-samsung-soc/msg38742.html). Can you please review the patch. This is a gentle reminder. The patch is required for serial enablement on the new exynos7 SoC, kindly take a look. Thanks, Abhilash -- To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v7 0/7] Enable support for Samsung Exynos7 SoC
Hi Olof and Arnd On Tue, Nov 11, 2014 at 7:59 PM, Abhilash Kesavan kesavan.abhil...@gmail.com wrote: Hello Olof and Arnd, On Sun, Nov 9, 2014 at 9:50 AM, Abhilash Kesavan a.kesa...@samsung.com wrote: These were originally part of 2 patchsets[1][2] adding support for Exynos7. The clock and pinctrl patches are going through the respective maintainer's tree; hence the remaining dt related patches have been consolidated and are being posted here as a separate series. This patchset has build dependencies on the following patches: a] [GIT PULL] Samsung clock changes for 3.19 - specifically the clock dt bindings header. http://comments.gmane.org/gmane.linux.kernel.samsung-soc/39142 b] tty: serial: samsung: Clean-up selection of number of available UARTs http://www.spinics.net/lists/linux-samsung-soc/msg37418.html c] dts, kbuild: Implement support for dtb vendor subdirs(merged in linux-next) https://lkml.org/lkml/2014/10/21/654 [1] arch: arm64: Enable support for Samsung Exynos7 SoC http://www.spinics.net/lists/linux-samsung-soc/msg37047.html [2] Add clock and DT support for a few IPs on Exynos7 http://www.spinics.net/lists/linux-samsung-soc/msg37973.html Changes since v6: - Fixed the platform ordering (exynos before thunder) in Kconfig file. - Fixed the ordering of reg and enable-method properties in cpu node as per Lorenzo Pieralisi's comment. Do you have any comments on this patchset ? A gentle reminder regarding this patch set. Kindly review. Abhilash Abhilash Kesavan (2): arm64: dts: Add PMU DT node for exynos7 SoC arm64: dts: Add nodes for mmc, i2c, rtc, watchdog, adc on Exynos7 Alim Akhtar (2): arm64: exynos7: Enable ARMv8 based Exynos7 (SoC) support arm64: Enable Exynos7 SOC in the defconfig Naveen Krishna Ch (2): arm64: dts: Add initial device tree support for EXYNOS7 arm64: dts: Add initial pinctrl support to EXYNOS7 Pankaj Dubey (1): arm64: dts: add dt-bindings/ symlink .../devicetree/bindings/arm/samsung/pmu.txt| 1 + arch/arm64/Kconfig | 17 + arch/arm64/boot/dts/Makefile | 1 + arch/arm64/boot/dts/exynos/Makefile| 5 + arch/arm64/boot/dts/exynos/exynos7-espresso.dts| 84 +++ arch/arm64/boot/dts/exynos/exynos7-pinctrl.dtsi| 588 + arch/arm64/boot/dts/exynos/exynos7.dtsi| 530 +++ arch/arm64/boot/dts/include/dt-bindings| 1 + arch/arm64/configs/defconfig | 4 + 9 files changed, 1231 insertions(+) create mode 100644 arch/arm64/boot/dts/exynos/Makefile create mode 100644 arch/arm64/boot/dts/exynos/exynos7-espresso.dts create mode 100644 arch/arm64/boot/dts/exynos/exynos7-pinctrl.dtsi create mode 100644 arch/arm64/boot/dts/exynos/exynos7.dtsi create mode 12 arch/arm64/boot/dts/include/dt-bindings -- 2.1.0 -- To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: [PATCH v7 0/7] Enable support for Samsung Exynos7 SoC
Abhilash Kesavan wrote: Hi Olof and Arnd Hi On Tue, Nov 11, 2014 at 7:59 PM, Abhilash Kesavan kesavan.abhil...@gmail.com wrote: Hello Olof and Arnd, On Sun, Nov 9, 2014 at 9:50 AM, Abhilash Kesavan a.kesa...@samsung.com wrote: These were originally part of 2 patchsets[1][2] adding support for Exynos7. The clock and pinctrl patches are going through the respective maintainer's tree; hence the remaining dt related patches have been consolidated and are being posted here as a separate series. This patchset has build dependencies on the following patches: a] [GIT PULL] Samsung clock changes for 3.19 - specifically the clock dt bindings header. http://comments.gmane.org/gmane.linux.kernel.samsung-soc/39142 b] tty: serial: samsung: Clean-up selection of number of available UARTs http://www.spinics.net/lists/linux-samsung-soc/msg37418.html c] dts, kbuild: Implement support for dtb vendor subdirs(merged in linux-next) https://lkml.org/lkml/2014/10/21/654 [1] arch: arm64: Enable support for Samsung Exynos7 SoC http://www.spinics.net/lists/linux-samsung-soc/msg37047.html [2] Add clock and DT support for a few IPs on Exynos7 http://www.spinics.net/lists/linux-samsung-soc/msg37973.html Changes since v6: - Fixed the platform ordering (exynos before thunder) in Kconfig file. - Fixed the ordering of reg and enable-method properties in cpu node as per Lorenzo Pieralisi's comment. Do you have any comments on this patchset ? A gentle reminder regarding this patch set. Kindly review. As I commented before, looks good to me, so shall I queue this in samsung tree with dependencies such as clock stuff? I'm happy with either way samsung tree or arm-soc tree directly though. Thanks, Kukjin Abhilash Abhilash Kesavan (2): arm64: dts: Add PMU DT node for exynos7 SoC arm64: dts: Add nodes for mmc, i2c, rtc, watchdog, adc on Exynos7 Alim Akhtar (2): arm64: exynos7: Enable ARMv8 based Exynos7 (SoC) support arm64: Enable Exynos7 SOC in the defconfig Naveen Krishna Ch (2): arm64: dts: Add initial device tree support for EXYNOS7 arm64: dts: Add initial pinctrl support to EXYNOS7 Pankaj Dubey (1): arm64: dts: add dt-bindings/ symlink .../devicetree/bindings/arm/samsung/pmu.txt| 1 + arch/arm64/Kconfig | 17 + arch/arm64/boot/dts/Makefile | 1 + arch/arm64/boot/dts/exynos/Makefile| 5 + arch/arm64/boot/dts/exynos/exynos7-espresso.dts| 84 +++ arch/arm64/boot/dts/exynos/exynos7-pinctrl.dtsi| 588 + arch/arm64/boot/dts/exynos/exynos7.dtsi| 530 +++ arch/arm64/boot/dts/include/dt-bindings| 1 + arch/arm64/configs/defconfig | 4 + 9 files changed, 1231 insertions(+) create mode 100644 arch/arm64/boot/dts/exynos/Makefile create mode 100644 arch/arm64/boot/dts/exynos/exynos7-espresso.dts create mode 100644 arch/arm64/boot/dts/exynos/exynos7-pinctrl.dtsi create mode 100644 arch/arm64/boot/dts/exynos/exynos7.dtsi create mode 12 arch/arm64/boot/dts/include/dt-bindings -- 2.1.0 ___ linux-arm-kernel mailing list linux-arm-ker...@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel -- To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html